From 154cfcfae1acfd158b2b6d24f532e39bf9e84203 Mon Sep 17 00:00:00 2001 From: AntoXa PRO Date: Thu, 27 Jul 2023 15:36:52 +0300 Subject: [PATCH] big update --- src/colors.ts | 14 +++++ src/components/Alert.vue | 17 +++++- src/components/Btn.vue | 18 ++++-- src/components/Card.vue | 19 ++++++ src/components/Field.vue | 17 ++++-- src/components/FieldCheckbox.vue | 4 ++ src/components/FieldSelect.vue | 13 +++-- src/components/FieldSelectGender.vue | 7 +-- src/components/Icon.vue | 83 ++------------------------- src/components/IconVisibility.vue | 28 +++++++++ src/components/PickerDays.vue | 50 ++++++++++++++++ src/components/Table.vue | 5 ++ src/components/index.ts | 4 ++ src/css/common.sass | 52 ++++++++++++++--- src/css/theme.sass | 19 +++--- src/icons.ts | 86 ++++++++++++++++++++++++++++ src/index.ts | 2 + 17 files changed, 319 insertions(+), 119 deletions(-) create mode 100644 src/colors.ts create mode 100644 src/components/Card.vue create mode 100644 src/components/IconVisibility.vue create mode 100644 src/components/PickerDays.vue create mode 100644 src/components/Table.vue create mode 100644 src/icons.ts 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 @@ 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 @@ + + + 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" />