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.
Files changed (92) hide show
  1. package/dist/sprintify-ui.es.js +4411 -4353
  2. package/dist/style.css +1 -1
  3. package/dist/types/components/BaseAddressForm.vue.d.ts +2 -2
  4. package/dist/types/components/BaseAutocomplete.vue.d.ts +6 -6
  5. package/dist/types/components/BaseAutocompleteDrawer.vue.d.ts +3 -3
  6. package/dist/types/components/BaseAutocompleteFetch.vue.d.ts +6 -6
  7. package/dist/types/components/BaseBadge.vue.d.ts +3 -3
  8. package/dist/types/components/BaseBelongsTo.vue.d.ts +6 -6
  9. package/dist/types/components/BaseBelongsToFetch.vue.d.ts +6 -6
  10. package/dist/types/components/BaseButton.vue.d.ts +6 -0
  11. package/dist/types/components/BaseButtonGroup.vue.d.ts +3 -3
  12. package/dist/types/components/BaseCardRow.vue.d.ts +3 -3
  13. package/dist/types/components/BaseColor.vue.d.ts +3 -3
  14. package/dist/types/components/BaseContainer.vue.d.ts +47 -30
  15. package/dist/types/components/BaseDataIterator.vue.d.ts +3 -3
  16. package/dist/types/components/BaseDataIteratorSectionColumns.vue.d.ts +12 -12
  17. package/dist/types/components/BaseDataTable.vue.d.ts +3 -3
  18. package/dist/types/components/BaseDataTableRowAction.vue.d.ts +2 -2
  19. package/dist/types/components/BaseDataTableTemplate.vue.d.ts +3 -3
  20. package/dist/types/components/BaseDatePicker.vue.d.ts +3 -3
  21. package/dist/types/components/BaseDateSelect.vue.d.ts +3 -3
  22. package/dist/types/components/BaseField.vue.d.ts +3 -3
  23. package/dist/types/components/BaseInput.vue.d.ts +3 -3
  24. package/dist/types/components/BaseInputError.vue.d.ts +3 -3
  25. package/dist/types/components/BaseInputLabel.vue.d.ts +3 -3
  26. package/dist/types/components/BaseJsonReader.vue.d.ts +2 -2
  27. package/dist/types/components/BaseMenu.vue.d.ts +1 -1
  28. package/dist/types/components/BasePassword.vue.d.ts +3 -3
  29. package/dist/types/components/BaseRichText.vue.d.ts +3 -3
  30. package/dist/types/components/BaseSelect.vue.d.ts +3 -3
  31. package/dist/types/components/BaseSwitch.vue.d.ts +3 -3
  32. package/dist/types/components/BaseTableColumn.vue.d.ts +1 -1
  33. package/dist/types/components/BaseTagAutocomplete.vue.d.ts +3 -3
  34. package/dist/types/components/BaseTextarea.vue.d.ts +3 -3
  35. package/dist/types/components/BaseTextareaAutoresize.vue.d.ts +3 -3
  36. package/dist/types/components/BaseTimePicker.vue.d.ts +3 -3
  37. package/dist/types/composables/field.d.ts +1 -1
  38. package/dist/types/composables/inputSize.d.ts +1 -1
  39. package/dist/types/utils/sizeBehaviors.d.ts +4 -0
  40. package/dist/types/utils/sizes.d.ts +15 -0
  41. package/package.json +1 -1
  42. package/src/assets/base-rich-text.css +101 -0
  43. package/src/components/BaseAddressForm.stories.js +2 -1
  44. package/src/components/BaseAddressForm.vue +2 -0
  45. package/src/components/BaseAutocomplete.stories.js +1 -3
  46. package/src/components/BaseAutocomplete.vue +5 -5
  47. package/src/components/BaseAutocompleteFetch.stories.js +1 -3
  48. package/src/components/BaseAutocompleteFetch.vue +2 -2
  49. package/src/components/BaseBadge.stories.js +11 -4
  50. package/src/components/BaseBadge.vue +7 -4
  51. package/src/components/BaseBelongsTo.stories.js +1 -3
  52. package/src/components/BaseBelongsTo.vue +2 -2
  53. package/src/components/BaseBelongsToFetch.stories.js +1 -4
  54. package/src/components/BaseBelongsToFetch.vue +2 -2
  55. package/src/components/BaseButton.stories.js +1 -8
  56. package/src/components/BaseButton.vue +29 -21
  57. package/src/components/BaseButtonGroup.stories.js +1 -3
  58. package/src/components/BaseButtonGroup.vue +2 -0
  59. package/src/components/BaseColor.stories.js +1 -3
  60. package/src/components/BaseContainer.vue +55 -41
  61. package/src/components/BaseDataIterator.stories.js +1 -2
  62. package/src/components/BaseDataIteratorSectionButton.vue +1 -1
  63. package/src/components/BaseDatePicker.stories.js +1 -4
  64. package/src/components/BaseDatePicker.vue +4 -0
  65. package/src/components/BaseDateSelect.stories.js +1 -4
  66. package/src/components/BaseDateSelect.vue +2 -0
  67. package/src/components/BaseHasMany.stories.js +1 -3
  68. package/src/components/BaseInput.stories.js +1 -1
  69. package/src/components/BaseInput.vue +6 -0
  70. package/src/components/BaseInputError.vue +2 -0
  71. package/src/components/BaseInputLabel.vue +2 -0
  72. package/src/components/BaseJsonReader.stories.js +1 -2
  73. package/src/components/BaseJsonReaderItem.vue +8 -0
  74. package/src/components/BasePassword.stories.js +1 -3
  75. package/src/components/BaseRichText.stories.js +1 -2
  76. package/src/components/BaseRichText.vue +4 -1
  77. package/src/components/BaseSelect.stories.js +1 -2
  78. package/src/components/BaseSelect.vue +2 -0
  79. package/src/components/BaseShortcut.stories.js +2 -4
  80. package/src/components/BaseSwitch.stories.js +1 -3
  81. package/src/components/BaseTagAutocomplete.stories.js +1 -3
  82. package/src/components/BaseTagAutocomplete.vue +12 -0
  83. package/src/components/BaseTagAutocompleteFetch.stories.js +1 -3
  84. package/src/components/BaseTextarea.stories.js +1 -4
  85. package/src/components/BaseTextarea.vue +2 -0
  86. package/src/components/BaseTextareaAutoresize.stories.js +1 -4
  87. package/src/components/BaseTextareaAutoresize.vue +6 -4
  88. package/src/components/BaseTimePicker.stories.js +1 -4
  89. package/src/components/BaseTimePicker.vue +22 -18
  90. package/src/stories/PageInputSizes.vue +16 -18
  91. package/src/utils/sizeBehaviors.ts +4 -0
  92. package/src/utils/sizes.ts +18 -3
@@ -15,7 +15,7 @@
15
15
  :dropdown-show="dropdownShow"
16
16
  :show-model-value="showModelValue"
17
17
  :show-empty-option="showEmptyOption"
18
- :show-delete-button="showDeleteButton"
18
+ :show-remove-button="showRemoveButton"
19
19
  :empty-option-label="emptyOptionLabel"
20
20
  :visible-focus="visibleFocus"
21
21
  :focus-on-mount="focusOnMount"
@@ -127,7 +127,7 @@ const props = defineProps({
127
127
  default: false,
128
128
  type: Boolean,
129
129
  },
130
- showDeleteButton: {
130
+ showRemoveButton: {
131
131
  default: true,
132
132
  type: Boolean,
133
133
  },
@@ -1,3 +1,4 @@
1
+ import { sizes } from '../../.storybook/utils';
1
2
  import BaseButton from './BaseButton.vue';
2
3
 
3
4
  const colors = [
@@ -24,14 +25,6 @@ const colors = [
24
25
  'slate-200-outline',
25
26
  ];
26
27
 
27
- const sizes = [
28
- 'xs',
29
- 'sm',
30
- 'md',
31
- 'lg',
32
- 'xl',
33
- ];
34
-
35
28
  export default {
36
29
  title: 'Components/BaseButton',
37
30
  component: BaseButton,
@@ -50,6 +50,9 @@ import { RouteLocationRaw } from 'vue-router';
50
50
  import { BaseIcon } from '.';
51
51
  import { getColorConfig } from '@/utils/colors';
52
52
  import { isSlotEmpty } from '@/utils/slots';
53
+ import { Size, sizes } from '@/utils/sizes';
54
+ import { SizeBehavior } from '@/utils/sizeBehaviors';
55
+ import { useInputSize } from '@/composables/inputSize';
53
56
 
54
57
  defineOptions({
55
58
  inheritAttrs: false,
@@ -57,14 +60,6 @@ defineOptions({
57
60
 
58
61
  const slots = useSlots();
59
62
 
60
- const sizes = {
61
- 'xs': 'btn-xs',
62
- 'sm': 'btn-sm',
63
- 'md': 'btn-md',
64
- 'lg': 'btn-lg',
65
- 'xl': 'btn-xl',
66
- };
67
-
68
63
  const colors = {
69
64
  '': '',
70
65
  'primary': 'btn-primary',
@@ -95,7 +90,8 @@ const props = withDefaults(defineProps<{
95
90
  href?: string;
96
91
  type?: 'button' | 'submit' | 'reset';
97
92
  iconPosition?: 'start' | 'end';
98
- size?: keyof typeof sizes;
93
+ size?: Size;
94
+ sizeBehavior?: SizeBehavior;
99
95
  color?: keyof typeof colors | string;
100
96
  to?: RouteLocationRaw;
101
97
  }>(), {
@@ -108,12 +104,24 @@ const props = withDefaults(defineProps<{
108
104
  type: 'submit',
109
105
  iconPosition: 'start',
110
106
  size: 'md',
107
+ sizeBehavior: SizeBehavior.default,
111
108
  color: '',
112
109
  to: undefined,
113
110
  });
114
111
 
115
112
  defineEmits(['click']);
116
113
 
114
+ const sizeInternal = computed(() => {
115
+
116
+ if (props.sizeBehavior == SizeBehavior.default) {
117
+ return props.size;
118
+ }
119
+
120
+ const inputSize = useInputSize(props.size);
121
+
122
+ return inputSize.size.value;
123
+ });
124
+
117
125
  const iconOnly = computed(() => {
118
126
  return props.icon && isSlotEmpty(slots.default);
119
127
  });
@@ -131,8 +139,8 @@ const classes = computed(() => {
131
139
 
132
140
  }
133
141
 
134
- if (props.size) {
135
- classes.push(sizes[props.size]);
142
+ if (sizeInternal.value) {
143
+ classes.push(sizes[sizeInternal.value]?.buttonClass);
136
144
  }
137
145
 
138
146
  if (iconOnly.value) {
@@ -166,15 +174,15 @@ const containerClass = computed(() => {
166
174
  }
167
175
 
168
176
  if (props.icon) {
169
- if (props.size == 'xs') {
177
+ if (sizeInternal.value == 'xs') {
170
178
  classes.push('gap-0.5');
171
- } else if (props.size == 'sm') {
179
+ } else if (sizeInternal.value == 'sm') {
172
180
  classes.push('gap-0.5');
173
- } else if (props.size == 'md') {
181
+ } else if (sizeInternal.value == 'md') {
174
182
  classes.push('gap-1');
175
- } else if (props.size == 'lg') {
183
+ } else if (sizeInternal.value == 'lg') {
176
184
  classes.push('gap-1');
177
- } else if (props.size == 'xl') {
185
+ } else if (sizeInternal.value == 'xl') {
178
186
  classes.push('gap-1');
179
187
  }
180
188
  }
@@ -193,15 +201,15 @@ const iconClass = computed(() => {
193
201
  }
194
202
  }
195
203
 
196
- if (props.size === 'xs') {
204
+ if (sizeInternal.value === 'xs') {
197
205
  classes.push('h-3 w-3');
198
- } else if (props.size === 'sm') {
206
+ } else if (sizeInternal.value === 'sm') {
199
207
  classes.push('h-3.5 w-3.5');
200
- } else if (props.size === 'md') {
208
+ } else if (sizeInternal.value === 'md') {
201
209
  classes.push('h-4 w-4');
202
- } else if (props.size === 'lg') {
210
+ } else if (sizeInternal.value === 'lg') {
203
211
  classes.push('h-5 w-5');
204
- } else if (props.size === 'xl') {
212
+ } else if (sizeInternal.value === 'xl') {
205
213
  classes.push('h-6 w-6');
206
214
  }
207
215
 
@@ -1,9 +1,7 @@
1
- import { createFieldStory, options } from '../../.storybook/utils';
1
+ import { createFieldStory, options, sizes } from '../../.storybook/utils';
2
2
  import BaseButtonGroup from './BaseButtonGroup.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/BaseButtonGroup',
9
7
  component: BaseButtonGroup,
@@ -170,6 +170,8 @@ const wrapperClasses = computed(() => {
170
170
  "xs": "gap-0.5",
171
171
  "sm": "gap-1",
172
172
  "md": "gap-1.5",
173
+ "lg": "gap-1.5",
174
+ "xl": "gap-1.5",
173
175
  }[sizeInternal.value]
174
176
  }
175
177
 
@@ -1,9 +1,7 @@
1
- import { createFieldStory } from '../../.storybook/utils';
1
+ import { createFieldStory, sizes } from '../../.storybook/utils';
2
2
  import BaseColor from './BaseColor.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/BaseColor',
9
7
  component: BaseColor,
@@ -1,50 +1,64 @@
1
1
  <template>
2
2
  <div
3
- class="mx-auto w-full md:px-8"
4
- :class="[width, { 'px-4': !paddinglessMobile }]"
3
+ :class="classInternal"
5
4
  >
6
5
  <slot />
7
6
  </div>
8
7
  </template>
9
8
 
10
- <script lang="ts">
11
- import { defineComponent } from 'vue';
12
-
13
- export default defineComponent({
14
- props: {
15
- size: {
16
- default: '7xl',
17
- type: String,
18
- },
19
- paddinglessMobile: {
20
- default: false,
21
- type: Boolean,
22
- },
23
- fluid: {
24
- default: false,
25
- type: Boolean,
26
- },
27
- },
28
- computed: {
29
- width() {
30
- if (this.fluid) {
31
- return 'max-w-full';
32
- }
33
-
34
- const sizes = {
35
- lg: 'max-w-lg',
36
- xl: 'max-w-xl',
37
- '2xl': 'max-w-2xl',
38
- '3xl': 'max-w-3xl',
39
- '4xl': 'max-w-4xl',
40
- '5xl': 'max-w-5xl',
41
- '6xl': 'max-w-6xl',
42
- '7xl': 'max-w-7xl',
43
- full: 'max-w-full',
44
- } as { [key: string]: string };
45
-
46
- return sizes[this.size] || 'max-w-5xl';
47
- },
48
- },
9
+ <script lang="ts" setup>
10
+ import { twMerge } from 'tailwind-merge';
11
+
12
+
13
+ defineOptions({
14
+ inheritAttrs: false,
15
+ });
16
+
17
+ const sizes = {
18
+ lg: 'max-w-lg',
19
+ xl: 'max-w-xl',
20
+ '2xl': 'max-w-2xl',
21
+ '3xl': 'max-w-3xl',
22
+ '4xl': 'max-w-4xl',
23
+ '5xl': 'max-w-5xl',
24
+ '6xl': 'max-w-6xl',
25
+ '7xl': 'max-w-7xl',
26
+ full: 'max-w-full',
27
+ } as { [key: string]: string };
28
+
29
+ type Size = keyof typeof sizes;
30
+
31
+ const props = withDefaults(defineProps<{
32
+ class?: string | string[];
33
+ size?: Size,
34
+ paddinglessMobile?: boolean;
35
+ fluid?: boolean;
36
+ }>(), {
37
+ class: '',
38
+ size: '7xl',
39
+ paddinglessMobile: false,
40
+ fluid: false,
41
+ });
42
+
43
+ const widthClass = computed(() => {
44
+ if (props.fluid) {
45
+ return 'max-w-full';
46
+ }
47
+
48
+ return sizes[props.size] || 'max-w-5xl';
49
49
  });
50
+
51
+ const classInternal = computed(() => {
52
+
53
+ const baseClass = 'mx-auto w-full';
54
+ const paddingClass = props.paddinglessMobile ? 'px-0 md:px-8' : 'px-4 md:px-8';
55
+
56
+ return twMerge(
57
+ baseClass,
58
+ paddingClass,
59
+ widthClass.value,
60
+ props.class,
61
+ );
62
+ });
63
+
50
64
  </script>
@@ -3,8 +3,7 @@ import BaseSelect from './BaseSelect.vue';
3
3
  import BaseCard from './BaseCard.vue';
4
4
  import BaseCardRow from './BaseCardRow.vue';
5
5
  import BaseLoadingCover from './BaseLoadingCover.vue';
6
-
7
- const sizes = ['xs', 'sm', 'md'];
6
+ import { sizes } from '../../.storybook/utils';
8
7
 
9
8
  export default {
10
9
  title: 'Data/BaseDataIterator',
@@ -12,7 +12,7 @@
12
12
  v-if="section.count"
13
13
  class="ml-2"
14
14
  color="blue"
15
- :size="size == 'sm' ? 'sm' : 'base'"
15
+ :size="size == 'sm' ? 'sm' : 'md'"
16
16
  >
17
17
  {{ section.count }}
18
18
  </BaseBadge>
@@ -1,9 +1,7 @@
1
1
  import BaseDatePicker from './BaseDatePicker.vue';
2
2
  import ShowValue from '@/../.storybook/components/ShowValue.vue';
3
3
  import { DateTime } from 'luxon';
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/BaseDatePicker',
@@ -149,7 +147,6 @@ const TemplateSizes = (args) => ({
149
147
  components: { BaseDatePicker },
150
148
  setup() {
151
149
  const value = ref(null);
152
- const sizes = ['xs', 'sm', 'md'];
153
150
  return { args, value, sizes };
154
151
  },
155
152
  template: `
@@ -312,6 +312,8 @@ const classes = computed(() => {
312
312
  'xs': 'pl-[1.54rem] pr-5',
313
313
  'sm': 'pl-[2.1rem] pr-6',
314
314
  'md': 'pl-10 pr-7',
315
+ 'lg': 'pl-10 pr-7',
316
+ 'xl': 'pl-11 pr-7',
315
317
  }[sizeInternal.value];
316
318
 
317
319
  const paddingRight = props.modelValue ? padding : 'pr-0';
@@ -335,6 +337,8 @@ const iconWrapClasses = computed(() => {
335
337
  'xs': 'pl-2',
336
338
  'sm': 'pl-2.5',
337
339
  'md': 'pl-3',
340
+ 'lg': 'pl-3',
341
+ 'xl': 'pl-3',
338
342
  }[sizeInternal.value];
339
343
 
340
344
  return twMerge(
@@ -1,8 +1,6 @@
1
1
  import BaseDateSelect from './BaseDateSelect.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/BaseDateSelect',
@@ -51,7 +49,6 @@ const TemplateSizes = (args) => ({
51
49
  components: { BaseDateSelect },
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: `
@@ -6,6 +6,8 @@
6
6
  sizeInternal === 'xs' ? 'gap-0.5' : '',
7
7
  sizeInternal === 'sm' ? 'gap-0.5' : '',
8
8
  sizeInternal === 'md' ? 'gap-1' : '',
9
+ sizeInternal === 'lg' ? 'gap-1' : '',
10
+ sizeInternal === 'xl' ? 'gap-1' : '',
9
11
  ]"
10
12
  >
11
13
  <BaseSelect
@@ -1,12 +1,10 @@
1
1
  import BaseHasMany from './BaseHasMany.vue';
2
2
  import ShowValue from '@/../.storybook/components/ShowValue.vue';
3
- import { createFieldStory, options } from '../../.storybook/utils';
3
+ import { createFieldStory, options, sizes } from '../../.storybook/utils';
4
4
  import BaseAppSnackbars from './BaseAppSnackbars.vue';
5
5
  import QueryString from 'qs';
6
6
  import { random } from 'lodash';
7
7
 
8
- const sizes = ['xs', 'sm', 'md'];
9
-
10
8
  export default {
11
9
  title: 'Form/BaseHasMany',
12
10
  component: BaseHasMany,
@@ -1,6 +1,7 @@
1
1
  import BaseInput from './BaseInput.vue';
2
2
  import ShowValue from '@/../.storybook/components/ShowValue.vue';
3
3
  import { createFieldStory } from '@/../.storybook/utils';
4
+ import { sizes } from '../../.storybook/utils';
4
5
 
5
6
  export default {
6
7
  title: 'Form/BaseInput',
@@ -172,7 +173,6 @@ const TemplateSizes = (args) => ({
172
173
  components: { BaseInput },
173
174
  setup() {
174
175
  const value = ref(null);
175
- const sizes = ['xs', 'sm', 'md'];
176
176
  return { args, value, sizes };
177
177
  },
178
178
  template: `
@@ -315,6 +315,8 @@ const baseClasses = computed(() => {
315
315
  xs: [hasLeftDecoration.value ? 'pl-0' : 'pl-2', hasRightDecoration.value ? 'pr-0' : 'pr-2'],
316
316
  sm: [hasLeftDecoration.value ? 'pl-0' : 'pl-2.5', hasRightDecoration.value ? 'pr-0' : 'pr-2.5'],
317
317
  md: [hasLeftDecoration.value ? 'pl-0' : 'pl-3', hasRightDecoration.value ? 'pr-1' : 'pr-3'],
318
+ lg: [hasLeftDecoration.value ? 'pl-0' : 'pl-4', hasRightDecoration.value ? 'pr-0' : 'pr-4'],
319
+ xl: [hasLeftDecoration.value ? 'pl-0' : 'pl-5', hasRightDecoration.value ? 'pr-0' : 'pr-5'],
318
320
  }[sizeInternal.value];
319
321
 
320
322
  return [
@@ -331,6 +333,8 @@ const decorationWrapClasses = computed(() => {
331
333
  xs: 'first:pl-0.5 last:pr-0.5 py-0.5',
332
334
  sm: 'first:pl-1 last:pr-1 py-1',
333
335
  md: 'first:pl-1 last:pr-1 py-1',
336
+ lg: 'first:pl-1 last:pr-1 py-1.5',
337
+ xl: 'first:pl-1 last:pr-1 py-2',
334
338
  }[sizeInternal.value];
335
339
 
336
340
  return [
@@ -346,6 +350,8 @@ const decorationClasses = computed(() => {
346
350
  xs: 'p-1',
347
351
  sm: 'p-1.5',
348
352
  md: 'p-2',
353
+ lg: 'p-1.5',
354
+ xl: 'p-1.5',
349
355
  }[sizeInternal.value];
350
356
 
351
357
  return `${base} ${textColor} ${padding}`;
@@ -26,6 +26,8 @@ const classes = computed(() => {
26
26
  'xs': 'text-xs mb-0.5',
27
27
  'sm': 'text-xs mb-1',
28
28
  'md': 'text-sm mb-1',
29
+ 'lg': 'text-base mb-1',
30
+ 'xl': 'text-base mb-1',
29
31
  }[size.value];
30
32
 
31
33
  return [
@@ -73,6 +73,8 @@ const classes = computed(() => {
73
73
  'xs': 'text-xs mb-[0.2rem]',
74
74
  'sm': 'text-sm mb-1',
75
75
  'md': 'text-sm mb-1',
76
+ 'lg': 'text-base mb-1',
77
+ 'xl': 'text-base mb-1',
76
78
  }[size.value];
77
79
 
78
80
  return twMerge(base, responsive, props.class);
@@ -1,8 +1,7 @@
1
+ import { sizes } from '../../.storybook/utils';
1
2
  import BaseJsonReader from './BaseJsonReader.vue';
2
3
  import ShowValue from '@/../.storybook/components/ShowValue.vue';
3
4
 
4
- const sizes = ['xs', 'sm', 'md'];
5
-
6
5
  export default {
7
6
  title: 'Components/BaseJsonReader',
8
7
  component: BaseJsonReader,
@@ -99,6 +99,14 @@ const classSizeChevron = computed(() => {
99
99
  width: 'w-3.5',
100
100
  height: 'h-3.5',
101
101
  },
102
+ lg: {
103
+ width: 'w-4',
104
+ height: 'h-4',
105
+ },
106
+ xl: {
107
+ width: 'w-5',
108
+ height: 'h-5',
109
+ },
102
110
  };
103
111
 
104
112
  const sizeConfig = chevronSizes[props.size];
@@ -1,8 +1,7 @@
1
+ import { sizes } from '../../.storybook/utils';
1
2
  import BasePassword from './BasePassword.vue';
2
3
  import { createFieldStory } from '@/../.storybook/utils';
3
4
 
4
- const sizes = ['xs', 'sm', 'md'];
5
-
6
5
  export default {
7
6
  title: 'Form/BasePassword',
8
7
  component: BasePassword,
@@ -67,7 +66,6 @@ const TemplateSizes = (args) => ({
67
66
  components: { BasePassword },
68
67
  setup() {
69
68
  const value = ref(null);
70
- const sizes = ['xs', 'sm', 'md'];
71
69
  return { args, value, sizes };
72
70
  },
73
71
  template: `
@@ -1,8 +1,7 @@
1
1
  import BaseRichText from './BaseRichText.vue';
2
2
  import ShowValue from '@/../.storybook/components/ShowValue.vue';
3
3
  import { createFieldStory } from '@/../.storybook/utils';
4
-
5
- const sizes = ['xs', 'sm', 'md'];
4
+ import { sizes } from '../../.storybook/utils';
6
5
 
7
6
  const toolbarOptions = [
8
7
  'full',
@@ -3,8 +3,11 @@
3
3
  class="base-rich-text relative"
4
4
  :class="[
5
5
  hasErrorInternal ? 'error' : '',
6
- sizeInternal == 'sm' ? 'base-rich-text-sm' : '',
7
6
  sizeInternal == 'xs' ? 'base-rich-text-xs' : '',
7
+ sizeInternal == 'sm' ? 'base-rich-text-sm' : '',
8
+ sizeInternal == 'md' ? 'base-rich-text-base' : '',
9
+ sizeInternal == 'lg' ? 'base-rich-text-lg' : '',
10
+ sizeInternal == 'xl' ? 'base-rich-text-xl' : '',
8
11
  ]"
9
12
  >
10
13
  <quill-editor
@@ -1,7 +1,7 @@
1
1
  import BaseSelect from './BaseSelect.vue';
2
2
  import BaseInputLabel from './BaseInputLabel.vue';
3
3
  import ShowValue from '../../.storybook/components/ShowValue.vue';
4
- import { createFieldStory } from '../../.storybook/utils.js';
4
+ import { createFieldStory, sizes } from '../../.storybook/utils.js';
5
5
  import { options } from '../../.storybook/utils';
6
6
  import { computed } from 'vue';
7
7
 
@@ -82,7 +82,6 @@ const TemplateSizes = (args) => ({
82
82
  components: { BaseSelect },
83
83
  setup() {
84
84
  const value = ref(null);
85
- const sizes = ['xs', 'sm', 'md'];
86
85
  return { args, value, sizes, options };
87
86
  },
88
87
  template: `
@@ -221,6 +221,8 @@ const classes = computed(() => {
221
221
  xs: 'pl-2 pr-7',
222
222
  sm: 'pl-2.5 pr-8',
223
223
  md: 'pl-3 pr-10',
224
+ lg: 'pl-4 pr-11',
225
+ xl: 'pl-4 pr-11',
224
226
  }[sizeInternal.value];
225
227
 
226
228
  return twMerge([
@@ -3,8 +3,6 @@ import { palette } from '@/utils/colors';
3
3
 
4
4
  const colors = [...Object.keys(palette), '#ff0000', '#dbeafe'];
5
5
 
6
- const sizes = ['base', 'lg'];
7
-
8
6
  export default {
9
7
  title: 'Components/BaseShortcut',
10
8
  component: BaseShortcut,
@@ -42,7 +40,7 @@ Basic.args = {
42
40
  export const Colors = (args) => ({
43
41
  components: { BaseShortcut },
44
42
  setup() {
45
- return { args, colors, sizes };
43
+ return { args, colors };
46
44
  },
47
45
  template: `
48
46
  <div v-for="color in colors" :key="color">
@@ -64,7 +62,7 @@ Colors.args = {
64
62
  export const Contrast = (args) => ({
65
63
  components: { BaseShortcut },
66
64
  setup() {
67
- return { args, colors, sizes };
65
+ return { args, colors };
68
66
  },
69
67
  template: `
70
68
  <div v-for="color in colors" :key="color">
@@ -1,6 +1,6 @@
1
1
  import BaseSwitch from './BaseSwitch.vue';
2
2
  import BaseContainer from './BaseContainer.vue';
3
- import { createFieldStory } from '../../.storybook/utils';
3
+ import { createFieldStory, sizes } from '../../.storybook/utils';
4
4
 
5
5
  export default {
6
6
  title: 'Form/BaseSwitch',
@@ -82,8 +82,6 @@ const Colors = (args) => ({
82
82
  export const AllColors = Colors.bind({});
83
83
  AllColors.args = {};
84
84
 
85
- const sizes = ['xs', 'sm', 'base', 'lg', 'xl'];
86
-
87
85
  const Sizes = (args) => ({
88
86
  components: {
89
87
  BaseSwitch,
@@ -1,10 +1,8 @@
1
- import { createFieldStory, options } from '../../.storybook/utils';
1
+ import { createFieldStory, options, sizes } from '../../.storybook/utils';
2
2
  import BaseTagAutocomplete from './BaseTagAutocomplete.vue';
3
3
  import ShowValue from '@/../.storybook/components/ShowValue.vue';
4
4
  import BaseAppSnackbars from './BaseAppSnackbars.vue';
5
5
 
6
- const sizes = ['xs', 'sm', 'md'];
7
-
8
6
  export default {
9
7
  title: 'Form/BaseTagAutocomplete',
10
8
  component: BaseTagAutocomplete,