sprintify-ui 0.7.3 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sprintify-ui.es.js +4411 -4353
- package/dist/style.css +1 -1
- package/dist/types/components/BaseAddressForm.vue.d.ts +2 -2
- package/dist/types/components/BaseAutocomplete.vue.d.ts +6 -6
- package/dist/types/components/BaseAutocompleteDrawer.vue.d.ts +3 -3
- package/dist/types/components/BaseAutocompleteFetch.vue.d.ts +6 -6
- package/dist/types/components/BaseBadge.vue.d.ts +3 -3
- package/dist/types/components/BaseBelongsTo.vue.d.ts +6 -6
- package/dist/types/components/BaseBelongsToFetch.vue.d.ts +6 -6
- package/dist/types/components/BaseButton.vue.d.ts +6 -0
- package/dist/types/components/BaseButtonGroup.vue.d.ts +3 -3
- package/dist/types/components/BaseCardRow.vue.d.ts +3 -3
- package/dist/types/components/BaseColor.vue.d.ts +3 -3
- package/dist/types/components/BaseContainer.vue.d.ts +47 -30
- package/dist/types/components/BaseDataIterator.vue.d.ts +3 -3
- package/dist/types/components/BaseDataIteratorSectionColumns.vue.d.ts +12 -12
- package/dist/types/components/BaseDataTable.vue.d.ts +3 -3
- package/dist/types/components/BaseDataTableRowAction.vue.d.ts +2 -2
- package/dist/types/components/BaseDataTableTemplate.vue.d.ts +3 -3
- package/dist/types/components/BaseDatePicker.vue.d.ts +3 -3
- package/dist/types/components/BaseDateSelect.vue.d.ts +3 -3
- package/dist/types/components/BaseField.vue.d.ts +3 -3
- package/dist/types/components/BaseInput.vue.d.ts +3 -3
- package/dist/types/components/BaseInputError.vue.d.ts +3 -3
- package/dist/types/components/BaseInputLabel.vue.d.ts +3 -3
- package/dist/types/components/BaseJsonReader.vue.d.ts +2 -2
- package/dist/types/components/BaseMenu.vue.d.ts +1 -1
- package/dist/types/components/BasePassword.vue.d.ts +3 -3
- package/dist/types/components/BaseRichText.vue.d.ts +3 -3
- package/dist/types/components/BaseSelect.vue.d.ts +3 -3
- package/dist/types/components/BaseSwitch.vue.d.ts +3 -3
- package/dist/types/components/BaseTableColumn.vue.d.ts +1 -1
- package/dist/types/components/BaseTagAutocomplete.vue.d.ts +3 -3
- package/dist/types/components/BaseTextarea.vue.d.ts +3 -3
- package/dist/types/components/BaseTextareaAutoresize.vue.d.ts +3 -3
- package/dist/types/components/BaseTimePicker.vue.d.ts +3 -3
- package/dist/types/composables/field.d.ts +1 -1
- package/dist/types/composables/inputSize.d.ts +1 -1
- package/dist/types/utils/sizeBehaviors.d.ts +4 -0
- package/dist/types/utils/sizes.d.ts +15 -0
- package/package.json +1 -1
- package/src/assets/base-rich-text.css +101 -0
- package/src/components/BaseAddressForm.stories.js +2 -1
- package/src/components/BaseAddressForm.vue +2 -0
- package/src/components/BaseAutocomplete.stories.js +1 -3
- package/src/components/BaseAutocomplete.vue +5 -5
- package/src/components/BaseAutocompleteFetch.stories.js +1 -3
- package/src/components/BaseAutocompleteFetch.vue +2 -2
- package/src/components/BaseBadge.stories.js +11 -4
- package/src/components/BaseBadge.vue +7 -4
- package/src/components/BaseBelongsTo.stories.js +1 -3
- package/src/components/BaseBelongsTo.vue +2 -2
- package/src/components/BaseBelongsToFetch.stories.js +1 -4
- package/src/components/BaseBelongsToFetch.vue +2 -2
- package/src/components/BaseButton.stories.js +1 -8
- package/src/components/BaseButton.vue +29 -21
- package/src/components/BaseButtonGroup.stories.js +1 -3
- package/src/components/BaseButtonGroup.vue +2 -0
- package/src/components/BaseColor.stories.js +1 -3
- package/src/components/BaseContainer.vue +55 -41
- package/src/components/BaseDataIterator.stories.js +1 -2
- package/src/components/BaseDataIteratorSectionButton.vue +1 -1
- package/src/components/BaseDatePicker.stories.js +1 -4
- package/src/components/BaseDatePicker.vue +4 -0
- package/src/components/BaseDateSelect.stories.js +1 -4
- package/src/components/BaseDateSelect.vue +2 -0
- package/src/components/BaseHasMany.stories.js +1 -3
- package/src/components/BaseInput.stories.js +1 -1
- package/src/components/BaseInput.vue +6 -0
- package/src/components/BaseInputError.vue +2 -0
- package/src/components/BaseInputLabel.vue +2 -0
- package/src/components/BaseJsonReader.stories.js +1 -2
- package/src/components/BaseJsonReaderItem.vue +8 -0
- package/src/components/BasePassword.stories.js +1 -3
- package/src/components/BaseRichText.stories.js +1 -2
- package/src/components/BaseRichText.vue +4 -1
- package/src/components/BaseSelect.stories.js +1 -2
- package/src/components/BaseSelect.vue +2 -0
- package/src/components/BaseShortcut.stories.js +2 -4
- package/src/components/BaseSwitch.stories.js +1 -3
- package/src/components/BaseTagAutocomplete.stories.js +1 -3
- package/src/components/BaseTagAutocomplete.vue +12 -0
- package/src/components/BaseTagAutocompleteFetch.stories.js +1 -3
- package/src/components/BaseTextarea.stories.js +1 -4
- package/src/components/BaseTextarea.vue +2 -0
- package/src/components/BaseTextareaAutoresize.stories.js +1 -4
- package/src/components/BaseTextareaAutoresize.vue +6 -4
- package/src/components/BaseTimePicker.stories.js +1 -4
- package/src/components/BaseTimePicker.vue +22 -18
- package/src/stories/PageInputSizes.vue +16 -18
- package/src/utils/sizeBehaviors.ts +4 -0
- package/src/utils/sizes.ts +18 -3
|
@@ -12,7 +12,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12
12
|
};
|
|
13
13
|
size: {
|
|
14
14
|
default: undefined;
|
|
15
|
-
type: PropType<"xs" | "sm" | "md">;
|
|
15
|
+
type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
16
16
|
};
|
|
17
17
|
name: {
|
|
18
18
|
default: undefined;
|
|
@@ -48,7 +48,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
48
48
|
};
|
|
49
49
|
size: {
|
|
50
50
|
default: undefined;
|
|
51
|
-
type: PropType<"xs" | "sm" | "md">;
|
|
51
|
+
type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
52
52
|
};
|
|
53
53
|
name: {
|
|
54
54
|
default: undefined;
|
|
@@ -73,7 +73,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
73
73
|
}, {
|
|
74
74
|
required: boolean;
|
|
75
75
|
modelValue: string | null;
|
|
76
|
-
size: "xs" | "sm" | "md";
|
|
76
|
+
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
77
77
|
name: string;
|
|
78
78
|
placeholder: string;
|
|
79
79
|
disabled: boolean;
|
|
@@ -11,7 +11,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
11
11
|
};
|
|
12
12
|
size: {
|
|
13
13
|
default: undefined;
|
|
14
|
-
type: PropType<"xs" | "sm" | "md">;
|
|
14
|
+
type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
15
15
|
};
|
|
16
16
|
toolbar: {
|
|
17
17
|
type: PropType<string | unknown[] | Record<string, any> | undefined>;
|
|
@@ -54,7 +54,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
54
|
};
|
|
55
55
|
size: {
|
|
56
56
|
default: undefined;
|
|
57
|
-
type: PropType<"xs" | "sm" | "md">;
|
|
57
|
+
type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
58
58
|
};
|
|
59
59
|
toolbar: {
|
|
60
60
|
type: PropType<string | unknown[] | Record<string, any> | undefined>;
|
|
@@ -89,7 +89,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
89
89
|
}, {
|
|
90
90
|
required: boolean;
|
|
91
91
|
modelValue: string | Delta | null | undefined;
|
|
92
|
-
size: "xs" | "sm" | "md";
|
|
92
|
+
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
93
93
|
name: string;
|
|
94
94
|
placeholder: string;
|
|
95
95
|
disabled: boolean;
|
|
@@ -16,7 +16,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
16
16
|
};
|
|
17
17
|
size: {
|
|
18
18
|
default: undefined;
|
|
19
|
-
type: PropType<"xs" | "sm" | "md">;
|
|
19
|
+
type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
20
20
|
};
|
|
21
21
|
placeholder: {
|
|
22
22
|
default: string;
|
|
@@ -67,7 +67,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
67
67
|
};
|
|
68
68
|
size: {
|
|
69
69
|
default: undefined;
|
|
70
|
-
type: PropType<"xs" | "sm" | "md">;
|
|
70
|
+
type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
71
71
|
};
|
|
72
72
|
placeholder: {
|
|
73
73
|
default: string;
|
|
@@ -107,7 +107,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
107
107
|
class: string | string[];
|
|
108
108
|
required: boolean;
|
|
109
109
|
modelValue: SelectOption | undefined;
|
|
110
|
-
size: "xs" | "sm" | "md";
|
|
110
|
+
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
111
111
|
options: RawOption[];
|
|
112
112
|
labelKey: string;
|
|
113
113
|
valueKey: string;
|
|
@@ -14,7 +14,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
14
14
|
};
|
|
15
15
|
size: {
|
|
16
16
|
default: string;
|
|
17
|
-
type: PropType<"xs" | "sm" | "
|
|
17
|
+
type: PropType<"xs" | "sm" | "lg" | "xl" | "base">;
|
|
18
18
|
};
|
|
19
19
|
hasError: {
|
|
20
20
|
default: boolean;
|
|
@@ -53,7 +53,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
53
53
|
};
|
|
54
54
|
size: {
|
|
55
55
|
default: string;
|
|
56
|
-
type: PropType<"xs" | "sm" | "
|
|
56
|
+
type: PropType<"xs" | "sm" | "lg" | "xl" | "base">;
|
|
57
57
|
};
|
|
58
58
|
hasError: {
|
|
59
59
|
default: boolean;
|
|
@@ -80,7 +80,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
80
80
|
}, {
|
|
81
81
|
required: boolean;
|
|
82
82
|
modelValue: string | number | boolean | null | undefined;
|
|
83
|
-
size: "xs" | "sm" | "
|
|
83
|
+
size: "xs" | "sm" | "lg" | "xl" | "base";
|
|
84
84
|
color: "info" | "success" | "danger" | "warning" | "primary" | "dark" | "light";
|
|
85
85
|
name: string;
|
|
86
86
|
disabled: boolean;
|
|
@@ -154,8 +154,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
154
154
|
};
|
|
155
155
|
}>>, {
|
|
156
156
|
field: string;
|
|
157
|
-
width: number;
|
|
158
157
|
searchable: boolean;
|
|
158
|
+
width: number;
|
|
159
159
|
meta: unknown[] | Record<string, any>;
|
|
160
160
|
label: string;
|
|
161
161
|
customKey: string | number;
|
|
@@ -64,7 +64,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
64
64
|
};
|
|
65
65
|
size: {
|
|
66
66
|
default: undefined;
|
|
67
|
-
type: PropType<"xs" | "sm" | "md">;
|
|
67
|
+
type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
68
68
|
};
|
|
69
69
|
dropdownShow: {
|
|
70
70
|
default: string;
|
|
@@ -153,7 +153,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
153
153
|
};
|
|
154
154
|
size: {
|
|
155
155
|
default: undefined;
|
|
156
|
-
type: PropType<"xs" | "sm" | "md">;
|
|
156
|
+
type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
157
157
|
};
|
|
158
158
|
dropdownShow: {
|
|
159
159
|
default: string;
|
|
@@ -180,7 +180,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
180
180
|
}, {
|
|
181
181
|
filter: (option: NormalizedOption) => boolean;
|
|
182
182
|
required: boolean;
|
|
183
|
-
size: "xs" | "sm" | "md";
|
|
183
|
+
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
184
184
|
name: string;
|
|
185
185
|
placeholder: string;
|
|
186
186
|
loading: boolean;
|
|
@@ -12,7 +12,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12
12
|
};
|
|
13
13
|
size: {
|
|
14
14
|
default: undefined;
|
|
15
|
-
type: PropType<"xs" | "sm" | "md">;
|
|
15
|
+
type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
16
16
|
};
|
|
17
17
|
class: {
|
|
18
18
|
default: string;
|
|
@@ -68,7 +68,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
68
68
|
};
|
|
69
69
|
size: {
|
|
70
70
|
default: undefined;
|
|
71
|
-
type: PropType<"xs" | "sm" | "md">;
|
|
71
|
+
type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
72
72
|
};
|
|
73
73
|
class: {
|
|
74
74
|
default: string;
|
|
@@ -115,7 +115,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
115
115
|
type: string;
|
|
116
116
|
required: boolean;
|
|
117
117
|
modelValue: string | null | undefined;
|
|
118
|
-
size: "xs" | "sm" | "md";
|
|
118
|
+
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
119
119
|
name: string;
|
|
120
120
|
placeholder: string;
|
|
121
121
|
disabled: boolean;
|
|
@@ -20,7 +20,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
20
20
|
};
|
|
21
21
|
size: {
|
|
22
22
|
default: undefined;
|
|
23
|
-
type: PropType<"xs" | "sm" | "md">;
|
|
23
|
+
type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
24
24
|
};
|
|
25
25
|
maxHeight: {
|
|
26
26
|
default: number;
|
|
@@ -77,7 +77,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
77
77
|
};
|
|
78
78
|
size: {
|
|
79
79
|
default: undefined;
|
|
80
|
-
type: PropType<"xs" | "sm" | "md">;
|
|
80
|
+
type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
81
81
|
};
|
|
82
82
|
maxHeight: {
|
|
83
83
|
default: number;
|
|
@@ -115,7 +115,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
115
115
|
}, {
|
|
116
116
|
required: boolean;
|
|
117
117
|
modelValue: string | null;
|
|
118
|
-
size: "xs" | "sm" | "md";
|
|
118
|
+
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
119
119
|
name: string;
|
|
120
120
|
placeholder: string;
|
|
121
121
|
disabled: boolean;
|
|
@@ -6,7 +6,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6
6
|
};
|
|
7
7
|
size: {
|
|
8
8
|
default: undefined;
|
|
9
|
-
type: PropType<"xs" | "sm" | "md">;
|
|
9
|
+
type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
10
10
|
};
|
|
11
11
|
class: {
|
|
12
12
|
default: string;
|
|
@@ -57,7 +57,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
57
57
|
};
|
|
58
58
|
size: {
|
|
59
59
|
default: undefined;
|
|
60
|
-
type: PropType<"xs" | "sm" | "md">;
|
|
60
|
+
type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
61
61
|
};
|
|
62
62
|
class: {
|
|
63
63
|
default: string;
|
|
@@ -105,7 +105,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
105
105
|
class: string | string[];
|
|
106
106
|
required: boolean;
|
|
107
107
|
modelValue: string | null | undefined;
|
|
108
|
-
size: "xs" | "sm" | "md";
|
|
108
|
+
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
109
109
|
name: string;
|
|
110
110
|
placeholder: string;
|
|
111
111
|
disabled: boolean;
|
|
@@ -14,7 +14,7 @@ export declare function useField(config: Config): {
|
|
|
14
14
|
nameInternal: import("vue").ComputedRef<string>;
|
|
15
15
|
hasErrorInternal: import("vue").ComputedRef<boolean>;
|
|
16
16
|
errorMessageInternal: import("vue").ComputedRef<string | null | undefined>;
|
|
17
|
-
sizeInternal: import("vue").ComputedRef<"xs" | "sm" | "md">;
|
|
17
|
+
sizeInternal: import("vue").ComputedRef<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
18
18
|
emitUpdate: (value: any) => void;
|
|
19
19
|
enableForm: () => void;
|
|
20
20
|
disableForm: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Size } from "@/utils/sizes";
|
|
2
2
|
import { MaybeRef } from "vue";
|
|
3
3
|
declare function useInputSize(size: MaybeRef<Size | '' | undefined | null>): {
|
|
4
|
-
size: import("vue").ComputedRef<"xs" | "sm" | "md">;
|
|
4
|
+
size: import("vue").ComputedRef<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
5
5
|
};
|
|
6
6
|
export { useInputSize };
|
|
@@ -3,16 +3,31 @@ declare const sizes: {
|
|
|
3
3
|
fontSize: string;
|
|
4
4
|
height: string;
|
|
5
5
|
iconSize: string;
|
|
6
|
+
buttonClass: string;
|
|
6
7
|
};
|
|
7
8
|
sm: {
|
|
8
9
|
fontSize: string;
|
|
9
10
|
height: string;
|
|
10
11
|
iconSize: string;
|
|
12
|
+
buttonClass: string;
|
|
11
13
|
};
|
|
12
14
|
md: {
|
|
13
15
|
fontSize: string;
|
|
14
16
|
height: string;
|
|
15
17
|
iconSize: string;
|
|
18
|
+
buttonClass: string;
|
|
19
|
+
};
|
|
20
|
+
lg: {
|
|
21
|
+
fontSize: string;
|
|
22
|
+
height: string;
|
|
23
|
+
iconSize: string;
|
|
24
|
+
buttonClass: string;
|
|
25
|
+
};
|
|
26
|
+
xl: {
|
|
27
|
+
fontSize: string;
|
|
28
|
+
height: string;
|
|
29
|
+
iconSize: string;
|
|
30
|
+
buttonClass: string;
|
|
16
31
|
};
|
|
17
32
|
};
|
|
18
33
|
type Size = keyof typeof sizes;
|
package/package.json
CHANGED
|
@@ -217,4 +217,105 @@ body {
|
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
+
|
|
221
|
+
/* Size: md */
|
|
222
|
+
.base-rich-text-md {
|
|
223
|
+
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* Size: lg */
|
|
227
|
+
.base-rich-text-lg {
|
|
228
|
+
.ql-editor {
|
|
229
|
+
|
|
230
|
+
@apply p-5;
|
|
231
|
+
|
|
232
|
+
&.ql-blank::before {
|
|
233
|
+
@apply text-lg left-5;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
h1 {
|
|
238
|
+
@apply text-5xl;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
h2 {
|
|
242
|
+
@apply text-4xl;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
h3 {
|
|
246
|
+
@apply text-3xl;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
h4 {
|
|
250
|
+
@apply text-2xl;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
p {
|
|
254
|
+
@apply text-lg;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
ol,
|
|
258
|
+
ul {
|
|
259
|
+
li {
|
|
260
|
+
@apply text-lg;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
blockquote {
|
|
265
|
+
@apply text-lg;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
pre, .ql-syntax {
|
|
269
|
+
@apply text-lg;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/* Size: xl */
|
|
275
|
+
.base-rich-text-xl {
|
|
276
|
+
.ql-editor {
|
|
277
|
+
|
|
278
|
+
@apply p-6;
|
|
279
|
+
|
|
280
|
+
&.ql-blank::before {
|
|
281
|
+
@apply text-xl left-6;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
h1 {
|
|
286
|
+
@apply text-6xl;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
h2 {
|
|
290
|
+
@apply text-5xl;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
h3 {
|
|
294
|
+
@apply text-2xl;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
h4 {
|
|
298
|
+
@apply text-xl;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
p {
|
|
302
|
+
@apply text-xl;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
ol,
|
|
306
|
+
ul {
|
|
307
|
+
li {
|
|
308
|
+
@apply text-xl;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
blockquote {
|
|
313
|
+
@apply text-xl;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
pre, .ql-syntax {
|
|
317
|
+
@apply text-xl;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
220
321
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import BaseAddressForm from './BaseAddressForm.vue';
|
|
2
2
|
import ShowValue from '../../.storybook/components/ShowValue.vue';
|
|
3
|
+
import { sizes } from '../../.storybook/utils';
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
title: 'Form/BaseAddressForm',
|
|
@@ -7,7 +8,7 @@ export default {
|
|
|
7
8
|
argTypes: {
|
|
8
9
|
size: {
|
|
9
10
|
control: { type: 'select' },
|
|
10
|
-
options:
|
|
11
|
+
options: sizes,
|
|
11
12
|
},
|
|
12
13
|
},
|
|
13
14
|
args: {
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { createFieldStory, options } from '../../.storybook/utils';
|
|
1
|
+
import { createFieldStory, options, sizes } from '../../.storybook/utils';
|
|
2
2
|
import BaseAutocomplete from './BaseAutocomplete.vue';
|
|
3
3
|
import ShowValue from '@/../.storybook/components/ShowValue.vue';
|
|
4
4
|
import { computed } from 'vue';
|
|
5
5
|
|
|
6
|
-
const sizes = ['xs', 'sm', 'md'];
|
|
7
|
-
|
|
8
6
|
export default {
|
|
9
7
|
title: 'Form/BaseAutocomplete',
|
|
10
8
|
component: BaseAutocomplete,
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
</div>
|
|
45
45
|
|
|
46
46
|
<div
|
|
47
|
-
v-if="
|
|
47
|
+
v-if="showRemoveButtonInternal"
|
|
48
48
|
class="absolute right-0 top-0 flex h-full p-1"
|
|
49
49
|
>
|
|
50
50
|
<button
|
|
@@ -197,7 +197,7 @@ const props = defineProps({
|
|
|
197
197
|
default: false,
|
|
198
198
|
type: Boolean,
|
|
199
199
|
},
|
|
200
|
-
|
|
200
|
+
showRemoveButton: {
|
|
201
201
|
default: true,
|
|
202
202
|
type: Boolean,
|
|
203
203
|
},
|
|
@@ -515,7 +515,7 @@ const deleteButtonIconClasses = computed(() => {
|
|
|
515
515
|
|
|
516
516
|
const inputClasses = computed(() => {
|
|
517
517
|
const base = 'w-full';
|
|
518
|
-
const paddingRight =
|
|
518
|
+
const paddingRight = showRemoveButtonInternal.value ? 'pr-5' : '';
|
|
519
519
|
const withSelect = props.select ? 'rounded-l-none' : '';
|
|
520
520
|
|
|
521
521
|
return [
|
|
@@ -525,8 +525,8 @@ const inputClasses = computed(() => {
|
|
|
525
525
|
];
|
|
526
526
|
})
|
|
527
527
|
|
|
528
|
-
const
|
|
529
|
-
return normalizedModelValue.value && !props.disabled && props.showModelValue && props.
|
|
528
|
+
const showRemoveButtonInternal = computed(() => {
|
|
529
|
+
return normalizedModelValue.value && !props.disabled && props.showModelValue && props.showRemoveButton;
|
|
530
530
|
});
|
|
531
531
|
|
|
532
532
|
defineExpose({
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import BaseAutocompleteFetch from './BaseAutocompleteFetch.vue';
|
|
2
2
|
import ShowValue from '@/../.storybook/components/ShowValue.vue';
|
|
3
3
|
import { options } from '@/../.storybook/utils';
|
|
4
|
-
import { createFieldStory } from '../../.storybook/utils';
|
|
5
|
-
|
|
6
|
-
const sizes = ['xs', 'sm', 'md'];
|
|
4
|
+
import { createFieldStory, sizes } from '../../.storybook/utils';
|
|
7
5
|
|
|
8
6
|
export default {
|
|
9
7
|
title: 'Form/BaseAutocompleteFetch',
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
:focus-on-mount="focusOnMount"
|
|
21
21
|
:show-empty-option="showEmptyOption"
|
|
22
22
|
:empty-option-label="emptyOptionLabel"
|
|
23
|
-
:show-
|
|
23
|
+
:show-remove-button="showRemoveButton"
|
|
24
24
|
:select="select"
|
|
25
25
|
:filter="filterOptions"
|
|
26
26
|
@clear="onClear"
|
|
@@ -155,7 +155,7 @@ const props = defineProps({
|
|
|
155
155
|
default: false,
|
|
156
156
|
type: Boolean,
|
|
157
157
|
},
|
|
158
|
-
|
|
158
|
+
showRemoveButton: {
|
|
159
159
|
default: true,
|
|
160
160
|
type: Boolean,
|
|
161
161
|
},
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
+
import { sizes } from '../../.storybook/utils';
|
|
1
2
|
import BaseBadge from './BaseBadge.vue';
|
|
2
3
|
|
|
3
4
|
import { palette } from '@/utils/colors';
|
|
4
5
|
|
|
5
6
|
const colors = [...Object.keys(palette), '#ff0000', '#dbeafe'];
|
|
6
7
|
|
|
7
|
-
const sizes = ['sm', 'md', 'lg'];
|
|
8
|
-
|
|
9
8
|
export default {
|
|
10
9
|
title: 'Components/BaseBadge',
|
|
11
10
|
component: BaseBadge,
|
|
@@ -52,7 +51,7 @@ export const Colors = (args) => ({
|
|
|
52
51
|
template: `
|
|
53
52
|
<div v-for="color in colors" :key="color" class="mb-1">
|
|
54
53
|
<p class="text-xs text-slate-600 leading-tight">{{ color }}</p>
|
|
55
|
-
<BaseBadge v-bind="args" :color="color"
|
|
54
|
+
<BaseBadge v-bind="args" :color="color">
|
|
56
55
|
Administrator
|
|
57
56
|
</BaseBadge>
|
|
58
57
|
</div>
|
|
@@ -61,6 +60,7 @@ export const Colors = (args) => ({
|
|
|
61
60
|
|
|
62
61
|
Colors.args = {
|
|
63
62
|
contrast: 'high',
|
|
63
|
+
icon: 'heroicons:beaker-20-solid',
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
export const Contrast = (args) => ({
|
|
@@ -71,7 +71,7 @@ export const Contrast = (args) => ({
|
|
|
71
71
|
template: `
|
|
72
72
|
<div v-for="color in colors" :key="color" class="mb-1">
|
|
73
73
|
<p class="text-xs text-slate-600 leading-tight">{{ color }}</p>
|
|
74
|
-
<BaseBadge v-bind="args" :color="color"
|
|
74
|
+
<BaseBadge v-bind="args" :color="color">
|
|
75
75
|
Administrator
|
|
76
76
|
</BaseBadge>
|
|
77
77
|
</div>
|
|
@@ -80,6 +80,7 @@ export const Contrast = (args) => ({
|
|
|
80
80
|
|
|
81
81
|
Contrast.args = {
|
|
82
82
|
contrast: 'low',
|
|
83
|
+
icon: 'heroicons:beaker-20-solid',
|
|
83
84
|
};
|
|
84
85
|
|
|
85
86
|
export const Sizes = (args) => ({
|
|
@@ -97,6 +98,12 @@ export const Sizes = (args) => ({
|
|
|
97
98
|
`,
|
|
98
99
|
});
|
|
99
100
|
|
|
101
|
+
Sizes.args = {
|
|
102
|
+
contrast: 'high',
|
|
103
|
+
icon: 'heroicons:beaker-20-solid',
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
|
|
100
107
|
export const Wrap = (args) => ({
|
|
101
108
|
components: { BaseBadge },
|
|
102
109
|
setup() {
|
|
@@ -15,11 +15,10 @@
|
|
|
15
15
|
|
|
16
16
|
<script lang="ts" setup>
|
|
17
17
|
import { getColorConfig } from '@/utils/colors';
|
|
18
|
+
import { Size, sizes } from '@/utils/sizes';
|
|
18
19
|
import { Icon as BaseIcon } from '@iconify/vue';
|
|
19
20
|
import { twMerge } from 'tailwind-merge';
|
|
20
21
|
|
|
21
|
-
const sizes = ['sm', 'md', 'lg'];
|
|
22
|
-
|
|
23
22
|
defineOptions({
|
|
24
23
|
inheritAttrs: false,
|
|
25
24
|
});
|
|
@@ -29,7 +28,7 @@ const props = withDefaults(
|
|
|
29
28
|
class?: string | string[];
|
|
30
29
|
contrast?: 'low' | 'high';
|
|
31
30
|
color?: string;
|
|
32
|
-
size?:
|
|
31
|
+
size?: Size;
|
|
33
32
|
icon?: string;
|
|
34
33
|
wrap?: boolean;
|
|
35
34
|
bordered?: boolean;
|
|
@@ -61,7 +60,7 @@ const colorStyle = computed((): Record<string, string> => {
|
|
|
61
60
|
});
|
|
62
61
|
|
|
63
62
|
const sizeInternal = computed(() => {
|
|
64
|
-
if (!sizes.includes(props.size)) {
|
|
63
|
+
if (!Object.keys(sizes).includes(props.size)) {
|
|
65
64
|
return 'md';
|
|
66
65
|
}
|
|
67
66
|
|
|
@@ -71,9 +70,11 @@ const sizeInternal = computed(() => {
|
|
|
71
70
|
const classes = computed(() => {
|
|
72
71
|
const base = 'inline-flex items-center rounded leading-tight';
|
|
73
72
|
const size = {
|
|
73
|
+
xs: 'px-1 py-px text-[9px]',
|
|
74
74
|
sm: 'px-1.5 py-px text-[10px]',
|
|
75
75
|
md: 'px-1.5 py-0.5 text-xs',
|
|
76
76
|
lg: 'px-1.5 py-0.5 text-sm',
|
|
77
|
+
xl: 'px-2.5 py-1.5 text-sm',
|
|
77
78
|
}[sizeInternal.value];
|
|
78
79
|
|
|
79
80
|
const wrap = props.wrap ? '' : 'whitespace-nowrap';
|
|
@@ -84,9 +85,11 @@ const classes = computed(() => {
|
|
|
84
85
|
const iconSizeClasses = computed(() => {
|
|
85
86
|
|
|
86
87
|
const size = {
|
|
88
|
+
xs: 'h-2 w-2 mr-1',
|
|
87
89
|
sm: 'h-2.5 w-2.5 mr-1',
|
|
88
90
|
md: 'h-3 w-3 mr-1',
|
|
89
91
|
lg: 'h-4 w-4 mr-1',
|
|
92
|
+
xl: 'h-5 w-5 mr-1.5',
|
|
90
93
|
}[sizeInternal.value];
|
|
91
94
|
|
|
92
95
|
return size;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import BaseBelongsTo from './BaseBelongsTo.vue';
|
|
2
2
|
import ShowValue from '@/../.storybook/components/ShowValue.vue';
|
|
3
3
|
import { options } from '@/../.storybook/utils';
|
|
4
|
-
import { createFieldStory } from '../../.storybook/utils';
|
|
5
|
-
|
|
6
|
-
const sizes = ['xs', 'sm', 'md'];
|
|
4
|
+
import { createFieldStory, sizes } from '../../.storybook/utils';
|
|
7
5
|
|
|
8
6
|
export default {
|
|
9
7
|
title: 'Form/BaseBelongsTo',
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
:dropdown-show="dropdownShow"
|
|
16
16
|
:show-model-value="showModelValue"
|
|
17
17
|
:show-empty-option="showEmptyOption"
|
|
18
|
-
:show-
|
|
18
|
+
:show-remove-button="showRemoveButton"
|
|
19
19
|
:empty-option-label="emptyOptionLabel"
|
|
20
20
|
:visible-focus="visibleFocus"
|
|
21
21
|
:focus-on-mount="focusOnMount"
|
|
@@ -116,7 +116,7 @@ const props = defineProps({
|
|
|
116
116
|
default: false,
|
|
117
117
|
type: Boolean,
|
|
118
118
|
},
|
|
119
|
-
|
|
119
|
+
showRemoveButton: {
|
|
120
120
|
default: true,
|
|
121
121
|
type: Boolean,
|
|
122
122
|
},
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import BaseBelongsToFetch from './BaseBelongsToFetch.vue';
|
|
2
2
|
import ShowValue from '@/../.storybook/components/ShowValue.vue';
|
|
3
|
-
import {
|
|
4
|
-
import { createFieldStory } from '../../.storybook/utils';
|
|
5
|
-
|
|
6
|
-
const sizes = ['xs', 'sm', 'base'];
|
|
3
|
+
import { createFieldStory, sizes } from '../../.storybook/utils';
|
|
7
4
|
|
|
8
5
|
export default {
|
|
9
6
|
title: 'Form/BaseBelongsToFetch',
|