diff --git a/src/colors.ts b/src/colors.ts
new file mode 100644
index 0000000..6cbdcfd
--- /dev/null
+++ b/src/colors.ts
@@ -0,0 +1,14 @@
+export enum ColorEnum {
+ primary = 'primary',
+ accent = 'accent',
+ info = 'info',
+ success = 'success',
+ warning = 'warning',
+ error = 'error',
+ dark = 'dark',
+ light = 'light'
+}
+
+export type TColor = keyof typeof ColorEnum
+
+export const colors = Object.keys(ColorEnum)
diff --git a/src/components/Alert.vue b/src/components/Alert.vue
index bfe1082..f92ce56 100644
--- a/src/components/Alert.vue
+++ b/src/components/Alert.vue
@@ -1,13 +1,24 @@
- {{ props.value }}
-
+
+
+
+
+ {{ props.value }}
+
+
diff --git a/src/components/Btn.vue b/src/components/Btn.vue
index ee75a99..7d68d61 100644
--- a/src/components/Btn.vue
+++ b/src/components/Btn.vue
@@ -1,19 +1,29 @@
-
+
diff --git a/src/components/Card.vue b/src/components/Card.vue
new file mode 100644
index 0000000..1b5ef59
--- /dev/null
+++ b/src/components/Card.vue
@@ -0,0 +1,19 @@
+
+
+
+
+
+
{{ props.title }}
+
+
+
+
+
+
+
+
+
diff --git a/src/components/Field.vue b/src/components/Field.vue
index 7f6d326..271a7bc 100644
--- a/src/components/Field.vue
+++ b/src/components/Field.vue
@@ -6,8 +6,10 @@ const props = defineProps<{
error?: string
readonly?: boolean
disabled?: boolean
- checked?: boolean
+ placeholder?: string
tag?: 'input' | 'textarea' | 'select'
+ checked?: boolean
+ options?: { text: string, value: any }[]
}>()
// Emits.
@@ -57,29 +59,34 @@ const inputHandler = (val: any) => {
v-if="!tag || tag === 'input'"
:type="props.type"
:value="props.modelValue"
- :reatonly="props.readonly"
+ :readonly="props.readonly"
:disabled="props.disabled"
:checked="checked"
+ :placeholder="props.placeholder"
@input="inputHandler"
class="input"
/>
{{ props.error }}
diff --git a/src/components/FieldCheckbox.vue b/src/components/FieldCheckbox.vue
index a306d57..ca40b15 100644
--- a/src/components/FieldCheckbox.vue
+++ b/src/components/FieldCheckbox.vue
@@ -5,6 +5,8 @@ import { computed } from 'vue'
// Props.
const props = defineProps<{
modelValue?: boolean
+ disabled?: boolean
+ readonly?: boolean
}>()
// Emits.
@@ -22,6 +24,8 @@ const updateHandler = () => emit('update:modelValue', !props.modelValue)
type="checkbox"
class="ui-field-checkbox"
:checked="value"
+ :disabled="props.disabled"
+ :readonly="props.readonly"
@input="updateHandler"
/>
diff --git a/src/components/FieldSelect.vue b/src/components/FieldSelect.vue
index 31248c9..9c73e63 100644
--- a/src/components/FieldSelect.vue
+++ b/src/components/FieldSelect.vue
@@ -4,7 +4,7 @@ import UiField from './Field.vue'
const props = defineProps<{
modelValue?: string | number,
- options: { value: string, text: string }[]
+ options: { text: string, value: any }[]
}>()
const emit = defineEmits<{ (e: 'update:modelValue', v?: any): void }>()
@@ -16,9 +16,10 @@ const displayValue = computed({
-
-
-
+
diff --git a/src/components/FieldSelectGender.vue b/src/components/FieldSelectGender.vue
index d06f095..da09d66 100644
--- a/src/components/FieldSelectGender.vue
+++ b/src/components/FieldSelectGender.vue
@@ -1,8 +1,8 @@
- Select gender
-
+
diff --git a/src/components/Icon.vue b/src/components/Icon.vue
index 150959c..a03859f 100644
--- a/src/components/Icon.vue
+++ b/src/components/Icon.vue
@@ -1,87 +1,12 @@
-
-
+
+
+
+
+
diff --git a/src/components/PickerDays.vue b/src/components/PickerDays.vue
new file mode 100644
index 0000000..887fde1
--- /dev/null
+++ b/src/components/PickerDays.vue
@@ -0,0 +1,50 @@
+
+
+
+
+
+ {{props.label}}:
+
+
+
+
+
{{ error }}
+
+
diff --git a/src/components/Table.vue b/src/components/Table.vue
new file mode 100644
index 0000000..16ed6ff
--- /dev/null
+++ b/src/components/Table.vue
@@ -0,0 +1,5 @@
+
+
+
diff --git a/src/components/index.ts b/src/components/index.ts
index da20440..46edf80 100644
--- a/src/components/index.ts
+++ b/src/components/index.ts
@@ -10,5 +10,9 @@ export { default as UiFieldDate } from './FieldDate.vue'
export { default as UiFieldCheckbox } from './FieldCheckbox.vue'
export { default as UiFieldSelect } from './FieldSelect.vue'
export { default as UiFieldSelectGender } from './FieldSelectGender.vue'
+export { default as UiPickerDays } from './PickerDays.vue'
export { default as UiIcon } from './Icon.vue'
+export { default as UiIconVisibility } from './IconVisibility.vue'
export { default as UiForm } from './Form.vue'
+export { default as UiCard } from './Card.vue'
+export { default as UiTable } from './Table.vue'
diff --git a/src/css/common.sass b/src/css/common.sass
index feb9614..a077d61 100644
--- a/src/css/common.sass
+++ b/src/css/common.sass
@@ -28,38 +28,58 @@ p
&-btn
@apply px-4 border
@apply flex justify-center items-center
- > *:not(:last-child)
- @apply mr-1
- > .ui-icon:first-child
- @apply ml-[-5px]
+ // > *:not(:last-child)
+ // @apply mr-1
+ // > .ui-icon:first-child
+ // @apply ml-[-5px]
&-field
.label
@apply mb-1
.input
@apply block w-full border px-2 py-2
- outline: none
.message
@apply mt-1 text-sm
&-checkbox
@apply flex items-center justify-start
+ .label
+ @apply mb-0
.input
- @apply w-max order-first mr-4
- @apply w-[24px] h-[24px] border rounded
+ @apply w-max order-first mr-2
+ @apply w-[24px] h-[24px] min-w-[24px] min-h-[24px]
+ @apply border rounded
&-textarea
.input
@apply min-h-[80px]
&-alert
- @apply border p-2
+ @apply relative border
&:not(:last-child)
@apply mb-2
+ &-close
+ @apply absolute top-0 right-0 p-2
+ .ui-icon
+ @apply cursor-pointer
+ &-content
+ @apply p-3
&-icon
@apply block w-[24px]
+ &-card
+ @apply flex flex-col
+ @apply border bg-white
+ &-head
+ @apply pt-3 px-3
+ &-body
+ @apply p-3
+ @apply flex-1
+ &-actions
+ @apply pb-3 px-3
+ @apply flex gap-2
+
&-form
&-header
@apply pb-4
@@ -74,3 +94,19 @@ p
@apply flex items-center pt-4
> *:not(:last-child)
@apply mr-2
+
+ &-table
+ @apply w-full
+ thead
+ tr
+ th
+ @apply py-2 px-3
+ @apply text-sm text-left
+ tbody
+ tr
+ &:hover
+ @apply bg-light
+ &:not(:first-child)
+ @apply border-t
+ td
+ @apply p-2
diff --git a/src/css/theme.sass b/src/css/theme.sass
index 16d29a5..add8ce9 100644
--- a/src/css/theme.sass
+++ b/src/css/theme.sass
@@ -1,9 +1,4 @@
.ui
- &-btn
- @apply outline-none
- &:hover:not(:active)
- @apply bg-opacity-80
-
&-btn,
&-alert
@apply bg-white
@@ -27,19 +22,23 @@
@apply text-white bg-light border-light
&-field
+ .input
+ @apply bg-white text-dark
&.error
.label,
.input,
.message
@apply text-error border-error
- &.disabled
+ &:disabled
.input
@apply bg-light/10 text-dark/60
- &-field .input
- @apply bg-white dark:bg-white/10
+ &-btn
+ @apply outline-none
+ &:hover:not(:active)
+ @apply bg-opacity-80
&-btn,
&-alert,
- &-field .input
+ &-field .input,
+ &-card
@apply rounded
-
diff --git a/src/icons.ts b/src/icons.ts
new file mode 100644
index 0000000..8c90f49
--- /dev/null
+++ b/src/icons.ts
@@ -0,0 +1,86 @@
+export const icons = {
+ account: `
+
+
+ `,
+ doc: `
+
+ `,
+ vk: `
+
+ `,
+ youtube: `
+
+
+ `,
+ video: `
+
+
+ `,
+ yandex: `
+
+ `,
+ menu: `
+
+
+
+
+ `,
+ close: `
+
+
+ `,
+ 'arrow-down': `
+
+
+ `,
+ car: `
+
+
+
+
+ `,
+ review: `
+
+ `,
+ phone: `
+
+ `,
+ circle: `
+
+ `,
+ dzen: `
+
+ `,
+ instagram: `
+
+
+
+ `,
+ moon: `
+
+ `,
+ sun: `
+
+
+
+
+
+
+
+
+
+ `,
+ edit: `
+
+ `,
+ visibility: `
+
+
+ `,
+ visibility_off: `
+
+ `
+}
+
+export type TUiIcon = keyof typeof icons
diff --git a/src/index.ts b/src/index.ts
index cb64ac1..d1c5e15 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1 +1,3 @@
export * from './components'
+export * from './icons'
+export * from './colors'