sprintify-ui 0.1.14 → 0.1.16

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 (66) hide show
  1. package/README.md +1 -26
  2. package/dist/sprintify-ui.es.js +11391 -11329
  3. package/dist/style.css +1 -1
  4. package/dist/types/src/components/BaseAutocomplete.vue.d.ts +1 -1
  5. package/dist/types/src/components/BaseAutocompleteFetch.vue.d.ts +2 -2
  6. package/dist/types/src/components/BaseBelongsTo.vue.d.ts +1 -1
  7. package/dist/types/src/components/BaseCounter.vue.d.ts +4 -3
  8. package/dist/types/src/components/BaseDatePicker.vue.d.ts +1 -1
  9. package/dist/types/src/components/BaseFileUploader.vue.d.ts +1 -1
  10. package/dist/types/src/components/BaseHeader.vue.d.ts +6 -1
  11. package/dist/types/src/components/BaseMediaLibrary.vue.d.ts +1 -1
  12. package/dist/types/src/components/BaseMediaListItem.vue.d.ts +1 -1
  13. package/dist/types/src/components/BaseMenuItem.vue.d.ts +4 -3
  14. package/dist/types/src/components/BaseNumber.vue.d.ts +3 -3
  15. package/dist/types/src/components/BaseSwitch.vue.d.ts +0 -27
  16. package/dist/types/src/components/BaseTableColumn.vue.d.ts +1 -1
  17. package/dist/types/src/components/BaseTagAutocomplete.vue.d.ts +1 -1
  18. package/dist/types/src/composables/mediaQuery.d.ts +2 -2
  19. package/dist/types/src/i18n/index.d.ts +1 -0
  20. package/dist/types/src/index.d.ts +0 -178
  21. package/dist/types/src/stores/i18n.d.ts +5 -0
  22. package/dist/types/src/types/index.d.ts +3 -2
  23. package/package.json +7 -6
  24. package/src/components/BaseActionItemButton.vue +2 -0
  25. package/src/components/BaseAddressForm.vue +8 -7
  26. package/src/components/BaseAutocomplete.vue +3 -3
  27. package/src/components/BaseAutocompleteDrawer.vue +2 -1
  28. package/src/components/BaseAutocompleteFetch.vue +2 -1
  29. package/src/components/BaseCharacterCounter.vue +2 -1
  30. package/src/components/BaseClipboard.vue +4 -2
  31. package/src/components/BaseCounter.stories.js +1 -1
  32. package/src/components/BaseCounter.vue +5 -3
  33. package/src/components/BaseCropper.vue +2 -5
  34. package/src/components/BaseCropperModal.vue +3 -2
  35. package/src/components/BaseDataIterator.vue +6 -7
  36. package/src/components/BaseDataTable.vue +14 -14
  37. package/src/components/BaseDatePicker.vue +4 -4
  38. package/src/components/BaseDateSelect.vue +10 -10
  39. package/src/components/BaseDialog.vue +5 -6
  40. package/src/components/BaseDisplayRelativeTime.vue +6 -6
  41. package/src/components/BaseFilePicker.vue +7 -8
  42. package/src/components/BaseFileUploader.vue +3 -3
  43. package/src/components/BaseForm.vue +3 -3
  44. package/src/components/BaseHeader.stories.js +12 -5
  45. package/src/components/BaseHeader.vue +73 -74
  46. package/src/components/BaseIconPicker.vue +2 -1
  47. package/src/components/BaseLayoutNotificationDropdown.vue +3 -2
  48. package/src/components/BaseMediaLibrary.vue +8 -11
  49. package/src/components/BaseMediaListItem.vue +4 -3
  50. package/src/components/BaseMenuItem.vue +4 -3
  51. package/src/components/BaseNumber.vue +25 -5
  52. package/src/components/BasePagination.vue +4 -3
  53. package/src/components/BaseReadMore.vue +2 -1
  54. package/src/components/BaseSelect.vue +3 -2
  55. package/src/components/BaseSwitch.stories.js +5 -2
  56. package/src/components/BaseSwitch.vue +9 -36
  57. package/src/components/BaseTagAutocomplete.vue +4 -4
  58. package/src/components/BaseTagAutocompleteFetch.vue +3 -2
  59. package/src/composables/mediaQuery.ts +2 -2
  60. package/src/i18n/index.ts +60 -0
  61. package/src/index.ts +11 -11
  62. package/src/stores/dialogs.ts +3 -3
  63. package/src/stores/i18n.ts +14 -0
  64. package/src/types/index.ts +11 -2
  65. package/src/utils/fileSizeFormat.ts +6 -6
  66. package/src/utils/toHumanList.ts +2 -2
@@ -24,10 +24,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
24
24
  default: boolean;
25
25
  type: BooleanConstructor;
26
26
  };
27
- hasIcon: {
28
- default: boolean;
29
- type: BooleanConstructor;
30
- };
31
27
  checkedIcon: {
32
28
  default: string;
33
29
  type: StringConstructor;
@@ -36,14 +32,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
36
32
  default: string;
37
33
  type: StringConstructor;
38
34
  };
39
- checkedIconColor: {
40
- default: string;
41
- type: StringConstructor;
42
- };
43
- unCheckedIconColor: {
44
- default: string;
45
- type: StringConstructor;
46
- };
47
35
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
48
36
  modelValue: {
49
37
  default: boolean;
@@ -69,10 +57,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
69
57
  default: boolean;
70
58
  type: BooleanConstructor;
71
59
  };
72
- hasIcon: {
73
- default: boolean;
74
- type: BooleanConstructor;
75
- };
76
60
  checkedIcon: {
77
61
  default: string;
78
62
  type: StringConstructor;
@@ -81,14 +65,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
81
65
  default: string;
82
66
  type: StringConstructor;
83
67
  };
84
- checkedIconColor: {
85
- default: string;
86
- type: StringConstructor;
87
- };
88
- unCheckedIconColor: {
89
- default: string;
90
- type: StringConstructor;
91
- };
92
68
  }>> & {
93
69
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
94
70
  }, {
@@ -98,11 +74,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
98
74
  modelValue: string | number | boolean | null | undefined;
99
75
  hasError: boolean;
100
76
  size: "base" | "xs" | "sm" | "lg" | "xl";
101
- hasIcon: boolean;
102
77
  checkedIcon: string;
103
78
  unCheckedIcon: string;
104
- checkedIconColor: string;
105
- unCheckedIconColor: string;
106
79
  }>, {
107
80
  default: (_: {}) => any;
108
81
  }>;
@@ -155,8 +155,8 @@ declare const _default: import("vue").DefineComponent<{
155
155
  }>>, {
156
156
  meta: unknown[] | Record<string, any>;
157
157
  label: string;
158
- toggle: boolean;
159
158
  width: number;
159
+ toggle: boolean;
160
160
  field: string;
161
161
  padding: string;
162
162
  position: "left" | "right" | "center";
@@ -146,6 +146,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
146
146
  filter: (option: NormalizedOption) => boolean;
147
147
  name: string;
148
148
  required: boolean;
149
+ inline: boolean;
149
150
  placeholder: string;
150
151
  disabled: boolean;
151
152
  max: number;
@@ -153,7 +154,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
153
154
  loading: boolean;
154
155
  loadingBottom: boolean;
155
156
  size: "base" | "xs" | "sm";
156
- inline: boolean;
157
157
  dropdownShow: "focus" | "always";
158
158
  }>, {
159
159
  empty: (_: {
@@ -1,2 +1,2 @@
1
- import type { MaybeComputedRef } from '@vueuse/shared';
2
- export declare function useMediaQuery(query: MaybeComputedRef<string>): import("vue").Ref<boolean>;
1
+ import type { MaybeRefOrGetter } from '@vueuse/shared';
2
+ export declare function useMediaQuery(query: MaybeRefOrGetter<string>): import("vue").Ref<boolean>;
@@ -0,0 +1 @@
1
+ export declare function t(key: string, args?: Record<string, any> | undefined): string;
@@ -1,6 +1,5 @@
1
1
  import { AxiosInstance } from 'axios';
2
2
  import { App } from 'vue';
3
- import { I18n } from 'vue-i18n';
4
3
  import { useDialogsStore } from './stores/dialogs';
5
4
  import { useNotificationsStore } from './stores/notifications';
6
5
  import { useSystemAlertStore } from './stores/systemAlerts';
@@ -187,7 +186,6 @@ import { Locales } from './types';
187
186
  import { Country } from './types/Country';
188
187
  import { Region } from './types/Region';
189
188
  export interface Options {
190
- i18n?: I18n<typeof messages, {}, {}, string, true>;
191
189
  http?: AxiosInstance;
192
190
  upload_url?: string;
193
191
  locales?: Locales;
@@ -197,182 +195,6 @@ export interface Options {
197
195
  regions?: Region[];
198
196
  }
199
197
  declare const config: {
200
- i18n: I18n<{
201
- en: {
202
- cancel: string;
203
- cropper: string;
204
- drag_to_reposition: string;
205
- save: string;
206
- sui: {
207
- address: string;
208
- address_1_placeholder: string;
209
- address_2_description: string;
210
- and: string;
211
- apply: string;
212
- apply_filters: string;
213
- autocomplete_placeholder: string;
214
- cancel: string;
215
- city: string;
216
- clear: string;
217
- click_or_select_date: string;
218
- click_to_copy: string;
219
- columns: string;
220
- confirm: string;
221
- copied: string;
222
- country: string;
223
- create_new: string;
224
- day: string;
225
- delete: string;
226
- delete_record: string;
227
- delete_record_description: string;
228
- deselect_all: string;
229
- download: string;
230
- drag_to_reposition: string;
231
- drop_or_click_to_upload: string;
232
- edit: string;
233
- error: string;
234
- file_must_be_of_type: string;
235
- filters: string;
236
- go_to_page: string;
237
- invalid_value: string;
238
- just_now: string;
239
- maximum_x_decimal_places: string;
240
- min_x_characters: string;
241
- month: string;
242
- more: string;
243
- next: string;
244
- next_month: string;
245
- none: string;
246
- nothing_found: string;
247
- notifications_empty: string;
248
- of: string;
249
- or: string;
250
- page: string;
251
- pagination_detail_1: string;
252
- pagination_detail_2: string;
253
- postal_code_zip_code: string;
254
- previous: string;
255
- previous_month: string;
256
- read_more: string;
257
- region: string;
258
- remove: string;
259
- remove_file: string;
260
- remove_file_description: string;
261
- save: string;
262
- search: string;
263
- see_all_notifications: string;
264
- select_an_item: string;
265
- select_an_option: string;
266
- success: string;
267
- the_file_size_must_not_exceed_x: string;
268
- the_file_type_is_invalid: string;
269
- type_to_start_your_search: string;
270
- units: {
271
- b: string;
272
- gb: string;
273
- kb: string;
274
- mb: string;
275
- tb: string;
276
- };
277
- up_to_x: string;
278
- upload_failed: string;
279
- whoops: string;
280
- x_ago: string;
281
- x_rows_selected: string;
282
- year: string;
283
- yes_delete: string;
284
- you_can_upload_up_to_n_files: string;
285
- you_cannot_select_more_than_x_items: string;
286
- };
287
- };
288
- fr: {
289
- cancel: string;
290
- cropper: string;
291
- drag_to_reposition: string;
292
- save: string;
293
- sui: {
294
- address: string;
295
- address_1_placeholder: string;
296
- address_2_description: string;
297
- and: string;
298
- apply: string;
299
- apply_filters: string;
300
- autocomplete_placeholder: string;
301
- cancel: string;
302
- city: string;
303
- clear: string;
304
- click_or_select_date: string;
305
- click_to_copy: string;
306
- columns: string;
307
- confirm: string;
308
- copied: string;
309
- country: string;
310
- create_new: string;
311
- day: string;
312
- delete: string;
313
- delete_record: string;
314
- delete_record_description: string;
315
- deselect_all: string;
316
- download: string;
317
- drag_to_reposition: string;
318
- drop_or_click_to_upload: string;
319
- edit: string;
320
- error: string;
321
- file_must_be_of_type: string;
322
- filters: string;
323
- go_to_page: string;
324
- invalid_value: string;
325
- just_now: string;
326
- maximum_x_decimal_places: string;
327
- min_x_characters: string;
328
- month: string;
329
- more: string;
330
- next: string;
331
- next_month: string;
332
- none: string;
333
- nothing_found: string;
334
- notifications_empty: string;
335
- of: string;
336
- or: string;
337
- page: string;
338
- pagination_detail_1: string;
339
- pagination_detail_2: string;
340
- postal_code_zip_code: string;
341
- previous: string;
342
- previous_month: string;
343
- read_more: string;
344
- region: string;
345
- remove: string;
346
- remove_file: string;
347
- remove_file_description: string;
348
- save: string;
349
- search: string;
350
- see_all_notifications: string;
351
- select_an_item: string;
352
- select_an_option: string;
353
- success: string;
354
- the_file_size_must_not_exceed_x: string;
355
- the_file_type_is_invalid: string;
356
- type_to_start_your_search: string;
357
- units: {
358
- b: string;
359
- gb: string;
360
- kb: string;
361
- mb: string;
362
- tb: string;
363
- };
364
- up_to_x: string;
365
- upload_failed: string;
366
- whoops: string;
367
- x_ago: string;
368
- x_rows_selected: string;
369
- year: string;
370
- yes_delete: string;
371
- you_can_upload_up_to_n_files: string;
372
- you_cannot_select_more_than_x_items: string;
373
- };
374
- };
375
- }, {}, {}, string, true>;
376
198
  http: AxiosInstance;
377
199
  locales: Locales;
378
200
  upload_url: string;
@@ -0,0 +1,5 @@
1
+ export declare const useI18nStore: import("pinia").StoreDefinition<"i18n", {
2
+ locale: string;
3
+ }, {}, {
4
+ set(locale: string): void;
5
+ }>;
@@ -50,6 +50,7 @@ export interface ResourceCollection {
50
50
  export interface PaginatedCollection extends PaginationMetadata {
51
51
  data: Collection;
52
52
  }
53
+ export type ActionColors = 'dark' | 'light' | 'danger' | 'success' | 'warning' | 'primary' | 'secondary';
53
54
  export interface MenuItemInterface {
54
55
  label?: string;
55
56
  href?: string;
@@ -57,7 +58,7 @@ export interface MenuItemInterface {
57
58
  action?: () => Promise<void> | void;
58
59
  icon?: string;
59
60
  count?: number;
60
- color?: 'dark' | 'light' | 'danger' | 'success' | 'warning' | 'primary';
61
+ color?: ActionColors;
61
62
  line?: boolean;
62
63
  }
63
64
  export interface ActionItem {
@@ -67,7 +68,7 @@ export interface ActionItem {
67
68
  action?: () => Promise<void> | void;
68
69
  icon?: string;
69
70
  count?: number;
70
- color?: 'dark' | 'light' | 'danger' | 'success' | 'warning' | 'primary';
71
+ color?: ActionColors;
71
72
  disabled?: boolean;
72
73
  meta?: Record<string, any>;
73
74
  actions?: ActionItem[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build-fast": "rimraf dist && vite build",
@@ -10,7 +10,7 @@
10
10
  "storybook": "start-storybook -p 6006",
11
11
  "build-storybook": "build-storybook",
12
12
  "prepack": "npm run build",
13
- "prepare": "husky install",
13
+ "prepare": "husky install && relative-deps",
14
14
  "release": "standard-version",
15
15
  "commit": "cz"
16
16
  },
@@ -20,7 +20,7 @@
20
20
  "@tailwindcss/line-clamp": "^0.4.2",
21
21
  "@tailwindcss/typography": "^0.5.8",
22
22
  "@vueup/vue-quill": "^1.0.0",
23
- "@vueuse/core": "^9.0.0",
23
+ "@vueuse/core": "^10.0.0",
24
24
  "axios": "^0.26.1",
25
25
  "croppie": "^2.6.5",
26
26
  "flatpickr": "^4.6.13",
@@ -35,7 +35,6 @@
35
35
  "sortablejs": "^1.15.0",
36
36
  "tailwindcss": "^3.0.0",
37
37
  "vue": "^3.0.0",
38
- "vue-i18n": "^9.0.0",
39
38
  "vue-router": "^4.0.0"
40
39
  },
41
40
  "dependencies": {
@@ -71,7 +70,7 @@
71
70
  "@vitejs/plugin-vue": "^4.0.0",
72
71
  "@vue/eslint-config-typescript": "^11.0.2",
73
72
  "@vueup/vue-quill": "^1.1.0",
74
- "@vueuse/core": "^9.13.0",
73
+ "@vueuse/core": "^10.0.2",
75
74
  "autoprefixer": "^10.4.13",
76
75
  "axios": "^0.26.1",
77
76
  "babel-loader": "^8.3.0",
@@ -98,6 +97,7 @@
98
97
  "prettier": "^2.8.4",
99
98
  "prettier-plugin-tailwindcss": "^0.2.2",
100
99
  "qs": "^6.11.0",
100
+ "relative-deps": "^1.0.7",
101
101
  "rimraf": "^3.0.2",
102
102
  "rollup-plugin-analyzer": "^4.0.0",
103
103
  "scroll-lock": "^2.1.5",
@@ -134,5 +134,6 @@
134
134
  "commitizen": {
135
135
  "path": "cz-conventional-changelog"
136
136
  }
137
- }
137
+ },
138
+ "relativeDependencies": {}
138
139
  }
@@ -36,6 +36,8 @@ const classes = computed(() => {
36
36
 
37
37
  if (props.action.color == 'primary') {
38
38
  classList.push('btn-primary');
39
+ } else if (props.action.color == 'secondary') {
40
+ classList.push('btn-secondary-outline');
39
41
  } else if (props.action.color == 'danger') {
40
42
  classList.push('btn-danger');
41
43
  } else if (props.action.color == 'warning') {
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <BaseField
3
- :label="$t('sui.address')"
3
+ :label="t('sui.address')"
4
4
  :name="`${namePrefix}address_1`"
5
5
  class="mb-2"
6
6
  required
@@ -8,7 +8,7 @@
8
8
  <BaseInput
9
9
  ref="address1Ref"
10
10
  :model-value="normalizedModelValue.address_1 ?? ''"
11
- :placeholder="$t('sui.address_1_placeholder')"
11
+ :placeholder="t('sui.address_1_placeholder')"
12
12
  class="w-full"
13
13
  prevent-submit
14
14
  name="address_search_field"
@@ -21,7 +21,7 @@
21
21
  <BaseField :name="`${namePrefix}address_2`" class="mb-4">
22
22
  <BaseInput
23
23
  :model-value="normalizedModelValue.address_2 ?? ''"
24
- :placeholder="$t('sui.address_2_description')"
24
+ :placeholder="t('sui.address_2_description')"
25
25
  class="w-full"
26
26
  @update:model-value="update('address_2', $event)"
27
27
  />
@@ -29,7 +29,7 @@
29
29
 
30
30
  <div class="sm:flex sm:space-x-3">
31
31
  <BaseField
32
- :label="$t('sui.city')"
32
+ :label="t('sui.city')"
33
33
  required
34
34
  :name="`${namePrefix}city`"
35
35
  class="mb-4 flex-1"
@@ -41,7 +41,7 @@
41
41
  />
42
42
  </BaseField>
43
43
  <BaseField
44
- :label="$t('sui.postal_code_zip_code')"
44
+ :label="t('sui.postal_code_zip_code')"
45
45
  required
46
46
  :name="`${namePrefix}postal_code`"
47
47
  class="mb-4 flex-1"
@@ -56,7 +56,7 @@
56
56
  <div class="sm:flex sm:space-x-3">
57
57
  <BaseField
58
58
  v-if="!props.hideCountry"
59
- :label="$t('sui.country')"
59
+ :label="t('sui.country')"
60
60
  :name="`${namePrefix}country`"
61
61
  required
62
62
  class="mb-4 flex-1"
@@ -74,7 +74,7 @@
74
74
  </BaseField>
75
75
  <BaseField
76
76
  v-if="!props.hideRegion"
77
- :label="$t('sui.region')"
77
+ :label="t('sui.region')"
78
78
  :name="`${namePrefix}region`"
79
79
  required
80
80
  class="mb-4 flex-1"
@@ -101,6 +101,7 @@ import { Region } from '@/types/Region';
101
101
  import BaseField from './BaseField.vue';
102
102
  import BaseInput from './BaseInput.vue';
103
103
  import BaseSelect from './BaseSelect.vue';
104
+ import { t } from '@/i18n';
104
105
  import { config } from '..';
105
106
 
106
107
  const DEFAULT_COUNTRY = 'ca';
@@ -27,7 +27,7 @@
27
27
  :value="keywords"
28
28
  type="text"
29
29
  :placeholder="
30
- placeholder ? placeholder : $t('sui.autocomplete_placeholder')
30
+ placeholder ? placeholder : t('sui.autocomplete_placeholder')
31
31
  "
32
32
  class="relative w-full pr-9 disabled:cursor-not-allowed disabled:text-slate-300"
33
33
  :class="[
@@ -127,6 +127,7 @@ import { Icon as BaseIcon } from '@iconify/vue';
127
127
  import { useClickOutside } from '@/composables/clickOutside';
128
128
  import BaseAutocompleteDrawer from './BaseAutocompleteDrawer.vue';
129
129
  import { SelectConfiguration } from '@/types';
130
+ import { t } from '@/i18n';
130
131
 
131
132
  const props = defineProps({
132
133
  modelValue: {
@@ -204,8 +205,7 @@ const props = defineProps({
204
205
  },
205
206
  emptyOptionLabel: {
206
207
  default() {
207
- const i18n = useI18n();
208
- return i18n.t('sui.none');
208
+ return t('sui.none');
209
209
  },
210
210
  type: String,
211
211
  },
@@ -10,7 +10,7 @@
10
10
  <div
11
11
  class="flex items-center justify-center px-5 py-10 text-center text-slate-600"
12
12
  >
13
- {{ $t('sui.nothing_found') }}
13
+ {{ t('sui.nothing_found') }}
14
14
  </div>
15
15
  </slot>
16
16
 
@@ -102,6 +102,7 @@ import { isArray, isObject, throttle } from 'lodash';
102
102
  import BaseSkeleton from './BaseSkeleton.vue';
103
103
  import { Icon as BaseIcon } from '@iconify/vue';
104
104
  import BaseSpinnerSmall from '../svg/BaseSpinnerSmall.vue';
105
+ import { t } from '@/i18n';
105
106
 
106
107
  const props = defineProps({
107
108
  selected: {
@@ -41,7 +41,7 @@
41
41
  v-if="firstSearch"
42
42
  class="flex h-[80px] items-center justify-center px-3 text-center text-base leading-tight text-slate-600"
43
43
  >
44
- {{ $t('sui.nothing_found') }}
44
+ {{ t('sui.nothing_found') }}
45
45
  </div>
46
46
  </slot>
47
47
  </template>
@@ -61,6 +61,7 @@ import {
61
61
  } from '@/types';
62
62
  import BaseAutocomplete from './BaseAutocomplete.vue';
63
63
  import { useHasPaginatedData } from '@/composables/paginatedData';
64
+ import { t } from '@/i18n';
64
65
 
65
66
  /**
66
67
  * Behavior notes
@@ -9,13 +9,14 @@
9
9
  {{ length }}/{{ max }}
10
10
  </div>
11
11
  <div v-else-if="min && length < min" class="text-red-600">
12
- {{ $t('sui.min_x_characters', { x: min }) }} ({{ length }}/{{ min }})
12
+ {{ t('sui.min_x_characters', { x: min }) }} ({{ length }}/{{ min }})
13
13
  </div>
14
14
  </div>
15
15
  </template>
16
16
 
17
17
  <script lang="ts" setup>
18
18
  import { trim } from 'lodash';
19
+ import { t } from '@/i18n';
19
20
 
20
21
  const props = defineProps({
21
22
  text: {
@@ -27,10 +27,10 @@
27
27
  class="mr-1 text-green-500"
28
28
  icon="heroicons:check-circle-solid"
29
29
  />
30
- {{ $t('sui.copied') }}
30
+ {{ t('sui.copied') }}
31
31
  </div>
32
32
  <div v-else>
33
- {{ $t('sui.click_to_copy') }}
33
+ {{ t('sui.click_to_copy') }}
34
34
  </div>
35
35
  </div>
36
36
  </div>
@@ -39,6 +39,8 @@
39
39
  </template>
40
40
 
41
41
  <script lang="ts" setup>
42
+ import { t } from '@/i18n';
43
+
42
44
  const tooltipShown = ref(false);
43
45
  const showCopied = ref(false);
44
46
 
@@ -6,7 +6,7 @@ export default {
6
6
  argTypes: {
7
7
  color: {
8
8
  control: { type: 'select' },
9
- options: ['primary', 'danger', 'dark', 'light', 'white'],
9
+ options: ['primary', 'secondary', 'danger', 'dark', 'light', 'white'],
10
10
  },
11
11
  size: {
12
12
  control: { type: 'select' },
@@ -8,6 +8,7 @@
8
8
  </template>
9
9
 
10
10
  <script lang="ts" setup>
11
+ import { ActionColors } from '@/types';
11
12
  import { padStart } from 'lodash';
12
13
  import { PropType } from 'vue';
13
14
 
@@ -26,9 +27,7 @@ const props = defineProps({
26
27
  },
27
28
  color: {
28
29
  default: 'danger',
29
- type: String as PropType<
30
- 'danger' | 'primary' | 'success' | 'warning' | 'dark' | 'light' | 'white'
31
- >,
30
+ type: String as PropType<ActionColors>,
32
31
  },
33
32
  });
34
33
 
@@ -69,6 +68,9 @@ const colorClass = computed((): string => {
69
68
  if (props.color == 'primary') {
70
69
  return 'bg-primary-500 text-white';
71
70
  }
71
+ if (props.color == 'secondary') {
72
+ return 'bg-primary-200 text-primary-800';
73
+ }
72
74
  if (props.color == 'dark') {
73
75
  return 'bg-slate-900 text-white';
74
76
  }
@@ -69,7 +69,7 @@
69
69
  >
70
70
  <BaseIcon icon="ri:drag-move-2-fill" class="mr-1 h-5 w-5" />
71
71
  <span>
72
- {{ $t('drag_to_reposition') }}
72
+ {{ t('drag_to_reposition') }}
73
73
  </span>
74
74
  </div>
75
75
  </div>
@@ -100,6 +100,7 @@ import { cloneDeep, debounce } from 'lodash';
100
100
  import { CropperConfig } from '../types';
101
101
  import { BaseIcon, BaseLoadingCover } from '.';
102
102
  import { presets } from '@/utils/cropper/presets';
103
+ import { t } from '@/i18n';
103
104
 
104
105
  const props = defineProps<{
105
106
  source: string;
@@ -216,8 +217,6 @@ const cropperConfiguration = computed<CroppieOptions>(() => {
216
217
  });
217
218
 
218
219
  function init() {
219
- console.log('init');
220
-
221
220
  if (initializing.value) {
222
221
  return;
223
222
  }
@@ -275,8 +274,6 @@ async function initCropper() {
275
274
  }
276
275
 
277
276
  async function resizeImage(url: string): Promise<string> {
278
- console.log('resizeImage');
279
-
280
277
  await getOriginalDimensions();
281
278
 
282
279
  try {
@@ -21,7 +21,7 @@
21
21
  :disabled="initializing"
22
22
  @click="close()"
23
23
  >
24
- {{ $t('cancel') }}
24
+ {{ t('cancel') }}
25
25
  </button>
26
26
  <BaseButton
27
27
  type="button"
@@ -30,7 +30,7 @@
30
30
  :disabled="initializing"
31
31
  @click="save()"
32
32
  >
33
- {{ $t('save') }}
33
+ {{ t('save') }}
34
34
  </BaseButton>
35
35
  </div>
36
36
  </div>
@@ -46,6 +46,7 @@ import BaseCropper from './BaseCropper.vue';
46
46
  import { BaseCropperConfig } from '@/types';
47
47
  import { debounce } from 'lodash';
48
48
  import { BaseButton } from '.';
49
+ import { t } from '@/i18n';
49
50
 
50
51
  const props = defineProps<{
51
52
  modelValue?: boolean;