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
|
@@ -428,6 +428,8 @@ const wrapperClass = computed(() => {
|
|
|
428
428
|
'xs': 'min-h-control-xs gap-0.5 p-0.5',
|
|
429
429
|
'sm': 'min-h-control-sm gap-0.5 p-0.5',
|
|
430
430
|
'md': 'min-h-control-md gap-1 p-1',
|
|
431
|
+
'lg': 'min-h-control-lg gap-1 p-1',
|
|
432
|
+
'xl': 'min-h-control-xl gap-1 p-1',
|
|
431
433
|
}[sizeInternal.value];
|
|
432
434
|
|
|
433
435
|
const focus = opened.value ? 'input-focus border-blue-300' : '';
|
|
@@ -440,6 +442,8 @@ const innerHeight = computed(() => {
|
|
|
440
442
|
'xs': 'h-[calc(theme(spacing.control-xs)_-_theme(spacing[0.5])_-_theme(spacing[0.5])_-_2px)]',
|
|
441
443
|
'sm': 'h-[calc(theme(spacing.control-sm)_-_theme(spacing[0.5])_-_theme(spacing[0.5])_-_2px)]',
|
|
442
444
|
'md': 'h-[calc(theme(spacing.control-md)_-_theme(spacing.1)_-_theme(spacing.1)_-_2px)]',
|
|
445
|
+
'lg': 'h-[calc(theme(spacing.control-lg)_-_theme(spacing.1)_-_theme(spacing.1)_-_2px)]',
|
|
446
|
+
'xl': 'h-[calc(theme(spacing.control-xl)_-_theme(spacing.1)_-_theme(spacing.1)_-_2px)]',
|
|
443
447
|
}[sizeInternal.value];
|
|
444
448
|
|
|
445
449
|
return height;
|
|
@@ -455,6 +459,8 @@ const inputClasses = computed(() => {
|
|
|
455
459
|
'xs': 'pl-1.5',
|
|
456
460
|
'sm': 'pl-2',
|
|
457
461
|
'md': 'pl-2.5',
|
|
462
|
+
'lg': 'pl-2.5',
|
|
463
|
+
'xl': 'pl-2.5',
|
|
458
464
|
}[sizeInternal.value];
|
|
459
465
|
|
|
460
466
|
return [base, padding, innerHeight.value, focus, disabled, sizeConfig.fontSize];
|
|
@@ -468,12 +474,16 @@ const selectionClass = (selection: NormalizedOption): string => {
|
|
|
468
474
|
'xs': 'text-xs',
|
|
469
475
|
'sm': 'text-xs',
|
|
470
476
|
'md': 'text-sm',
|
|
477
|
+
'lg': 'text-base',
|
|
478
|
+
'xl': 'text-base',
|
|
471
479
|
}[sizeInternal.value];
|
|
472
480
|
|
|
473
481
|
const padding = {
|
|
474
482
|
'xs': 'pl-2',
|
|
475
483
|
'sm': 'pl-2',
|
|
476
484
|
'md': 'pl-3',
|
|
485
|
+
'lg': 'pl-3',
|
|
486
|
+
'xl': 'pl-4',
|
|
477
487
|
}[sizeInternal.value];
|
|
478
488
|
|
|
479
489
|
let color = 'bg-slate-200 border-slate-300';
|
|
@@ -497,6 +507,8 @@ const selectionDeleteClasses = computed(() => {
|
|
|
497
507
|
'xs': 'pl-1 pr-2',
|
|
498
508
|
'sm': 'pl-1 pr-2',
|
|
499
509
|
'md': 'pl-1 pr-3',
|
|
510
|
+
'lg': 'pl-2 pr-3',
|
|
511
|
+
'xl': 'pl-3 pr-4',
|
|
500
512
|
}[sizeInternal.value];
|
|
501
513
|
|
|
502
514
|
const disabled = props.disabled ? 'cursor-not-allowed opacity-60' : '';
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import BaseTagAutocompleteFetch from './BaseTagAutocompleteFetch.vue';
|
|
2
2
|
import ShowValue from '@/../.storybook/components/ShowValue.vue';
|
|
3
|
-
import { createFieldStory } from '../../.storybook/utils';
|
|
3
|
+
import { createFieldStory, sizes } from '../../.storybook/utils';
|
|
4
4
|
import BaseAppSnackbars from './BaseAppSnackbars.vue';
|
|
5
5
|
|
|
6
|
-
const sizes = ['xs', 'sm', 'md'];
|
|
7
|
-
|
|
8
6
|
export default {
|
|
9
7
|
title: 'Form/BaseTagAutocompleteFetch',
|
|
10
8
|
component: BaseTagAutocompleteFetch,
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { createFieldStory } from '../../.storybook/utils';
|
|
1
|
+
import { createFieldStory, sizes } from '../../.storybook/utils';
|
|
2
2
|
import BaseTextarea from './BaseTextarea.vue';
|
|
3
3
|
|
|
4
|
-
const sizes = ['xs', 'sm', 'md'];
|
|
5
|
-
|
|
6
4
|
export default {
|
|
7
5
|
title: 'Form/BaseTextarea',
|
|
8
6
|
component: BaseTextarea,
|
|
@@ -54,7 +52,6 @@ const TemplateSizes = (args) => ({
|
|
|
54
52
|
components: { BaseTextarea },
|
|
55
53
|
setup() {
|
|
56
54
|
const value = ref(null);
|
|
57
|
-
const sizes = ['xs', 'sm', 'md'];
|
|
58
55
|
return { args, value, sizes };
|
|
59
56
|
},
|
|
60
57
|
template: `
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import BaseTextareaAutoresize from './BaseTextareaAutoresize.vue';
|
|
2
2
|
import ShowValue from '@/../.storybook/components/ShowValue.vue';
|
|
3
|
-
import { createFieldStory } from '../../.storybook/utils';
|
|
4
|
-
|
|
5
|
-
const sizes = ['xs', 'sm', 'md'];
|
|
3
|
+
import { createFieldStory, sizes } from '../../.storybook/utils';
|
|
6
4
|
|
|
7
5
|
export default {
|
|
8
6
|
title: 'Form/BaseTextareaAutoresize',
|
|
@@ -98,7 +96,6 @@ const TemplateSizes = (args) => ({
|
|
|
98
96
|
components: { BaseTextareaAutoresize },
|
|
99
97
|
setup() {
|
|
100
98
|
const value = ref(null);
|
|
101
|
-
const sizes = ['xs', 'sm', 'md'];
|
|
102
99
|
return { args, value, sizes };
|
|
103
100
|
},
|
|
104
101
|
template: `
|
|
@@ -145,7 +145,7 @@ function onFocus(event: FocusEvent) {
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
const textareaClasses = computed(() => {
|
|
148
|
-
const base = 'input-rounded leading-normal tracking-normal border transition-colors duration-200';
|
|
148
|
+
const base = 'input-rounded leading-normal tracking-normal border transition-colors duration-200 min-h-[1rem]';
|
|
149
149
|
const disabled = 'disabled:cursor-not-allowed disabled:text-slate-300';
|
|
150
150
|
const focus = 'focus:input-focus';
|
|
151
151
|
const error = hasErrorInternal.value ? 'border-red-500 focus:input-focus-error' : 'border-slate-300';
|
|
@@ -153,9 +153,11 @@ const textareaClasses = computed(() => {
|
|
|
153
153
|
const sizeConfig = sizes[sizeInternal.value];
|
|
154
154
|
|
|
155
155
|
const sizeClasses = {
|
|
156
|
-
xs: 'px-2 py-[
|
|
157
|
-
sm: 'px-2.5 py-[
|
|
158
|
-
md: 'px-3 py-[
|
|
156
|
+
xs: 'px-2 py-[4px]',
|
|
157
|
+
sm: 'px-2.5 py-[5px]',
|
|
158
|
+
md: 'px-3 py-[7px]',
|
|
159
|
+
lg: 'px-3 py-[9px]',
|
|
160
|
+
xl: 'px-4 py-[13px]',
|
|
159
161
|
}[sizeInternal.value];
|
|
160
162
|
|
|
161
163
|
return twMerge(
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { createFieldStory } from '../../.storybook/utils';
|
|
1
|
+
import { createFieldStory, sizes } from '../../.storybook/utils';
|
|
2
2
|
import BaseTimePicker from './BaseTimePicker.vue';
|
|
3
3
|
import ShowValue from '@/../.storybook/components/ShowValue.vue';
|
|
4
4
|
|
|
5
|
-
const sizes = ['xs', 'sm', 'md'];
|
|
6
|
-
|
|
7
5
|
export default {
|
|
8
6
|
title: 'Form/BaseTimePicker',
|
|
9
7
|
component: BaseTimePicker,
|
|
@@ -51,7 +49,6 @@ const TemplateSizes = (args) => ({
|
|
|
51
49
|
components: { BaseTimePicker },
|
|
52
50
|
setup() {
|
|
53
51
|
const value = ref(null);
|
|
54
|
-
const sizes = ['xs', 'sm', 'md'];
|
|
55
52
|
return { args, value, sizes };
|
|
56
53
|
},
|
|
57
54
|
template: `
|
|
@@ -156,7 +156,7 @@ const props = defineProps({
|
|
|
156
156
|
type: String,
|
|
157
157
|
},
|
|
158
158
|
placeholder: {
|
|
159
|
-
default
|
|
159
|
+
default() {
|
|
160
160
|
return t('sui.click_or_select_time');
|
|
161
161
|
},
|
|
162
162
|
type: String,
|
|
@@ -198,18 +198,18 @@ const { nameInternal, hasErrorInternal, emitUpdate, sizeInternal } =
|
|
|
198
198
|
emit: emit,
|
|
199
199
|
});
|
|
200
200
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
return new RegExp(
|
|
204
|
-
`^([01]?[0-9]|2[0-3]):([0-5][0-9])$`
|
|
205
|
-
);
|
|
206
|
-
}
|
|
207
|
-
|
|
201
|
+
const timeRegex = computed(() => {
|
|
202
|
+
if (props.disabledSeconds) {
|
|
208
203
|
return new RegExp(
|
|
209
|
-
`^([01]?[0-9]|2[0-3]):([0-5][0-9])
|
|
204
|
+
`^([01]?[0-9]|2[0-3]):([0-5][0-9])$`
|
|
210
205
|
);
|
|
211
|
-
}
|
|
212
|
-
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
return new RegExp(
|
|
209
|
+
`^([01]?[0-9]|2[0-3]):([0-5][0-9])(:([0-5][0-9]))?$`
|
|
210
|
+
);
|
|
211
|
+
});
|
|
212
|
+
// const timeRegex = /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/;
|
|
213
213
|
const modelValueFormatted = computed((): string | string[] | null => {
|
|
214
214
|
if (!props.modelValue) {
|
|
215
215
|
return null;
|
|
@@ -232,6 +232,8 @@ const classes = computed(() => {
|
|
|
232
232
|
'xs': 'pl-[1.54rem] pr-5',
|
|
233
233
|
'sm': 'pl-[2.1rem] pr-6',
|
|
234
234
|
'md': 'pl-10 pr-7',
|
|
235
|
+
'lg': 'pl-10 pr-7',
|
|
236
|
+
'xl': 'pl-11 pr-7',
|
|
235
237
|
}[sizeInternal.value];
|
|
236
238
|
|
|
237
239
|
const paddingRight = props.modelValue ? padding : 'pr-0';
|
|
@@ -265,6 +267,8 @@ const iconWrapClasses = computed(() => {
|
|
|
265
267
|
'xs': 'pl-2',
|
|
266
268
|
'sm': 'pl-2.5',
|
|
267
269
|
'md': 'pl-3',
|
|
270
|
+
'lg': 'pl-3',
|
|
271
|
+
'xl': 'pl-3',
|
|
268
272
|
}[sizeInternal.value];
|
|
269
273
|
|
|
270
274
|
return twMerge(
|
|
@@ -316,7 +320,7 @@ const minutes = computed(() => generateValues(60, props.minuteStep));
|
|
|
316
320
|
const seconds = computed(() => generateValues(60, props.secondStep));
|
|
317
321
|
|
|
318
322
|
function selectTime(time: string, type: string) {
|
|
319
|
-
|
|
323
|
+
|
|
320
324
|
if (type === 'hour') {
|
|
321
325
|
hourValue.value = time;
|
|
322
326
|
}
|
|
@@ -328,7 +332,7 @@ function selectTime(time: string, type: string) {
|
|
|
328
332
|
}
|
|
329
333
|
|
|
330
334
|
if (props.disabledSeconds) {
|
|
331
|
-
|
|
335
|
+
secondValue.value = '00';
|
|
332
336
|
}
|
|
333
337
|
}
|
|
334
338
|
|
|
@@ -336,7 +340,7 @@ function ok(close: () => void) {
|
|
|
336
340
|
let time = `${hourValue.value}:${minuteValue.value}:${secondValue.value}`;
|
|
337
341
|
|
|
338
342
|
if (props.disabledSeconds) {
|
|
339
|
-
|
|
343
|
+
time = `${hourValue.value}:${minuteValue.value}`;
|
|
340
344
|
}
|
|
341
345
|
|
|
342
346
|
if (!timeRegex.value.test(time)) {
|
|
@@ -358,7 +362,7 @@ function now(close: () => void) {
|
|
|
358
362
|
let time = `${hourValue.value}:${minuteValue.value}:${secondValue.value}`;
|
|
359
363
|
|
|
360
364
|
if (props.disabledSeconds) {
|
|
361
|
-
|
|
365
|
+
time = `${hourValue.value}:${minuteValue.value}`;
|
|
362
366
|
}
|
|
363
367
|
|
|
364
368
|
emitUpdate(time);
|
|
@@ -367,9 +371,9 @@ function now(close: () => void) {
|
|
|
367
371
|
}
|
|
368
372
|
|
|
369
373
|
const clearSelectedValues = () => {
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
374
|
+
hourValue.value = null;
|
|
375
|
+
minuteValue.value = null;
|
|
376
|
+
secondValue.value = null;
|
|
373
377
|
};
|
|
374
378
|
|
|
375
379
|
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="p-5 flex flex-col gap-4 overflow-x-scroll overflow-y-visible pb-[400px]">
|
|
3
3
|
<div
|
|
4
|
-
v-for="size in sizes"
|
|
4
|
+
v-for="(sizeObj, size) in sizes"
|
|
5
5
|
:key="size"
|
|
6
6
|
>
|
|
7
7
|
<div class="flex gap-1">
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
</div>
|
|
141
141
|
|
|
142
142
|
<div
|
|
143
|
-
v-for="size in sizes"
|
|
143
|
+
v-for="(sizeObj, size) in sizes"
|
|
144
144
|
:key="size"
|
|
145
145
|
class="flex flex-col gap-3"
|
|
146
146
|
>
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
</div>
|
|
158
158
|
|
|
159
159
|
<div
|
|
160
|
-
v-for="size in sizes"
|
|
160
|
+
v-for="(sizeObj, size) in sizes"
|
|
161
161
|
:key="size"
|
|
162
162
|
class="flex flex-col gap-3"
|
|
163
163
|
>
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
</template>
|
|
177
177
|
|
|
178
178
|
<script lang="ts" setup>
|
|
179
|
-
import {
|
|
179
|
+
import { sizes } from '@/utils/sizes';
|
|
180
180
|
import BaseField from '@/components/BaseField.vue';
|
|
181
181
|
import BaseSelect from '@/components/BaseSelect.vue';
|
|
182
182
|
import BaseAutocomplete from '@/components/BaseAutocomplete.vue';
|
|
@@ -195,8 +195,6 @@ import BaseDatePicker from '@/components/BaseDatePicker.vue';
|
|
|
195
195
|
import BaseDateSelect from '@/components/BaseDateSelect.vue';
|
|
196
196
|
import BaseTimePicker from '@/components/BaseTimePicker.vue';
|
|
197
197
|
|
|
198
|
-
const sizes = ref<Size[]>(['xs', 'sm', 'md']);
|
|
199
|
-
|
|
200
198
|
const text = ref('');
|
|
201
199
|
const number = ref('');
|
|
202
200
|
|
|
@@ -214,18 +212,18 @@ const colors = ref([]);
|
|
|
214
212
|
const date = ref(null);
|
|
215
213
|
|
|
216
214
|
const options = [
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
215
|
+
{ label: 'Dark Vader', value: 'dark_vader', type: 'sith' },
|
|
216
|
+
{ label: 'Darth Maul', value: 'darth_maul', type: 'sith' },
|
|
217
|
+
{ label: 'Dark Sidious', value: 'dark_sidious', type: 'sith' },
|
|
218
|
+
{ label: 'Obi Wan Kenobi', value: 'obiwan', type: 'jedi' },
|
|
219
|
+
{ label: 'Anakin Skywalker', value: 'anakin', type: 'jedi' },
|
|
220
|
+
{ label: 'Mace Windu', value: 'windu', type: 'jedi' },
|
|
221
|
+
{ label: 'Padme Amidala', value: 'padme', type: 'jedi' },
|
|
222
|
+
{ label: 'Princesse Leila', value: 'leila', type: 'jedi' },
|
|
223
|
+
{ label: 'Qui Gon Gin', value: 'quigon', type: 'jedi' },
|
|
224
|
+
{ label: 'Chewbaca', value: 'chewbaca', type: 'jedi' },
|
|
225
|
+
{ label: 'C3P0', value: 'c3p0', type: 'jedi' },
|
|
226
|
+
{ label: 'R2D2', value: 'r2d2', type: 'jedi' },
|
|
229
227
|
];
|
|
230
228
|
|
|
231
229
|
</script>
|
package/src/utils/sizes.ts
CHANGED
|
@@ -2,18 +2,33 @@ const sizes = {
|
|
|
2
2
|
xs: {
|
|
3
3
|
fontSize: 'text-xs',
|
|
4
4
|
height: 'h-control-xs',
|
|
5
|
-
iconSize: 'h-[0.9rem] w-[0.9rem]'
|
|
5
|
+
iconSize: 'h-[0.9rem] w-[0.9rem]',
|
|
6
|
+
buttonClass: 'btn-xs',
|
|
6
7
|
},
|
|
7
8
|
sm: {
|
|
8
9
|
fontSize: 'text-sm',
|
|
9
10
|
height: 'h-control-sm',
|
|
10
|
-
iconSize: 'h-[1.125rem] w-[1.125rem]'
|
|
11
|
+
iconSize: 'h-[1.125rem] w-[1.125rem]',
|
|
12
|
+
buttonClass: 'btn-sm',
|
|
11
13
|
},
|
|
12
14
|
md: {
|
|
13
15
|
fontSize: 'text-base',
|
|
14
16
|
height: 'h-control-md',
|
|
15
|
-
iconSize: 'h-5 w-5'
|
|
17
|
+
iconSize: 'h-5 w-5',
|
|
18
|
+
buttonClass: 'btn-md',
|
|
16
19
|
},
|
|
20
|
+
lg: {
|
|
21
|
+
fontSize: 'text-lg',
|
|
22
|
+
height: 'h-control-lg',
|
|
23
|
+
iconSize: 'h-6 w-6',
|
|
24
|
+
buttonClass: 'btn-lg',
|
|
25
|
+
},
|
|
26
|
+
xl: {
|
|
27
|
+
fontSize: 'text-xl',
|
|
28
|
+
height: 'h-control-xl',
|
|
29
|
+
iconSize: 'h-7 w-7',
|
|
30
|
+
buttonClass: 'btn-xl',
|
|
31
|
+
}
|
|
17
32
|
};
|
|
18
33
|
|
|
19
34
|
type Size = keyof typeof sizes;
|