tide-design-system 2.0.32 → 2.0.34

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.
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import { computed, getCurrentInstance, ref, watch } from 'vue';
2
+ import { ref, watch } from 'vue';
3
3
 
4
4
  import TideIcon from '@/components/TideIcon.vue';
5
5
  import { CSS } from '@/types/Styles';
@@ -34,8 +34,6 @@
34
34
  const checked = ref(props.checked || props.indeterminate);
35
35
  const indeterminate = ref(props.indeterminate);
36
36
 
37
- const uniqueId = computed(() => (props.inputId ? props.inputId : `text-input-${getCurrentInstance()?.uid || ''}`));
38
-
39
37
  const handleClick = () => {
40
38
  checked.value = !checked.value;
41
39
  };
@@ -88,7 +86,7 @@
88
86
  :disabled="props.disabled"
89
87
  :name="props.name"
90
88
  ref="input"
91
- :id="uniqueId"
89
+ :id="props.inputId"
92
90
  type="checkbox"
93
91
  />
94
92
 
@@ -118,7 +116,7 @@
118
116
 
119
117
  <label
120
118
  :class="[CSS.DISPLAY.FLEX, CSS.GAP.HALF, disabled ? CSS.CURSOR.NOT_ALLOWED : CSS.CURSOR.POINTER]"
121
- :for="uniqueId"
119
+ :for="props.inputId"
122
120
  @click.prevent="checked = !checked"
123
121
  v-if="label"
124
122
  >
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import { computed, getCurrentInstance, ref, watch } from 'vue';
2
+ import { ref, watch } from 'vue';
3
3
 
4
4
  import { CSS } from '@/types/Styles';
5
5
 
@@ -22,8 +22,6 @@
22
22
 
23
23
  const checked = ref(props.checked);
24
24
 
25
- const uniqueId = computed(() => (props.inputId ? props.inputId : `text-input-${getCurrentInstance()?.uid || ''}`));
26
-
27
25
  watch(
28
26
  () => props.checked,
29
27
  (newValue, oldValue) => {
@@ -39,7 +37,7 @@
39
37
  <input
40
38
  :checked="checked"
41
39
  :class="[CSS.DISPLAY.NONE]"
42
- :id="uniqueId"
40
+ :id="props.inputId"
43
41
  name=""
44
42
  type="radio"
45
43
  value=""
@@ -63,7 +61,7 @@
63
61
 
64
62
  <label
65
63
  :class="CSS.FONT.WEIGHT.FOUR_HUNDRED"
66
- :for="uniqueId"
64
+ :for="props.inputId"
67
65
  >
68
66
  {{ props.label }}
69
67
  </label>
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import { getCurrentInstance, computed, ref, watch } from 'vue';
2
+ import { computed, ref, watch } from 'vue';
3
3
 
4
4
  import type { SelectField } from '@/types/Field';
5
5
  import type { SelectOption, SelectOptionGroup } from '@/types/Select';
@@ -37,8 +37,6 @@
37
37
  const hasMinilabel = computed(() => hasFocus.value || !isEmpty.value);
38
38
  const isEmpty = computed(() => value.value === undefined);
39
39
 
40
- const uniqueId = computed(() => (props.inputId ? props.inputId : `text-input-${getCurrentInstance()?.uid || ''}`));
41
-
42
40
  const expandOptions = () => {
43
41
  const event = new MouseEvent('mousedown');
44
42
  input?.value?.dispatchEvent(event);
@@ -99,7 +97,7 @@
99
97
  !hasError && CSS.FONT.COLOR.SURFACE.VARIANT,
100
98
  CSS.FONT.WEIGHT.FIVE_HUNDRED,
101
99
  ]"
102
- :for="uniqueId"
100
+ :for="props.inputId"
103
101
  v-if="label"
104
102
  >
105
103
  {{ formattedLabel }}
@@ -113,7 +111,7 @@
113
111
  :required="required"
114
112
  @focus="handleFocus"
115
113
  @focusout="handleFocusOut"
116
- :id="uniqueId"
114
+ :id="props.inputId"
117
115
  v-model="value"
118
116
  >
119
117
  <template v-for="optgroup in props.optgroups">
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import { computed, getCurrentInstance, ref, watch } from 'vue';
2
+ import { computed, ref, watch } from 'vue';
3
3
 
4
4
  import type { FormValueTransformer } from '@/types/Form';
5
5
  import type { Icon } from '@/types/Icon';
@@ -71,7 +71,6 @@
71
71
  const type = computed(() =>
72
72
  props.type === TEXT_INPUT_TYPE.PASSWORD && showPassword.value === true ? TEXT_INPUT_TYPE.TEXT : props.type
73
73
  );
74
- const uniqueId = computed(() => (props.inputId ? props.inputId : `text-input-${getCurrentInstance()?.uid || ''}`));
75
74
 
76
75
  const handleClear = () => {
77
76
  value.value = '';
@@ -172,7 +171,7 @@
172
171
  CSS.FONT.WEIGHT.FIVE_HUNDRED,
173
172
  CSS.CURSOR.TEXT,
174
173
  ]"
175
- :for="uniqueId"
174
+ :for="props.inputId"
176
175
  v-if="label"
177
176
  >
178
177
  {{ formattedLabel }}
@@ -193,7 +192,7 @@
193
192
  @focus="handleFocus"
194
193
  @focusout="handleFocusOut"
195
194
  @input="handleInput"
196
- :id="uniqueId"
195
+ :id="props.inputId"
197
196
  v-model="value"
198
197
  />
199
198
  </div>
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import { computed, getCurrentInstance, ref, watch } from 'vue';
2
+ import { computed, ref, watch } from 'vue';
3
3
 
4
4
  import type { ValidationError } from '@/types/Validation';
5
5
 
@@ -47,7 +47,6 @@
47
47
  const hasError = computed(() => (props.required && !value.value) || getFieldHasError(error.value, props.error));
48
48
  const hasMinilabel = computed(() => hasFocus.value || !isEmpty.value);
49
49
  const isEmpty = computed(() => value.value === '');
50
- const uniqueId = computed(() => (props.inputId ? props.inputId : `text-input-${getCurrentInstance()?.uid || ''}`));
51
50
 
52
51
  const handleFocus = () => {
53
52
  hasFocus.value = true;
@@ -101,7 +100,7 @@
101
100
  CSS.FONT.WEIGHT.FIVE_HUNDRED,
102
101
  CSS.CURSOR.TEXT,
103
102
  ]"
104
- :for="uniqueId"
103
+ :for="props.inputId"
105
104
  ref="label"
106
105
  v-if="label"
107
106
  >
@@ -120,7 +119,7 @@
120
119
  @change="handleValidation"
121
120
  @focus="handleFocus"
122
121
  @focusout="handleFocusOut"
123
- :id="uniqueId"
122
+ :id="props.inputId"
124
123
  v-model="value"
125
124
  />
126
125
  </div>
@@ -21,6 +21,7 @@ export const CSS = {
21
21
  },
22
22
  Y: {
23
23
  MIDDLE: 'tide-align-middle',
24
+ INITIAL: 'tide-align-initial',
24
25
  },
25
26
  },
26
27
  AXIS1: {
@@ -37,6 +38,7 @@ export const CSS = {
37
38
  START: 'tide-axis2-start',
38
39
  },
39
40
  BG: {
41
+ INITIAL: 'tide-bg-initial',
40
42
  BLUR: 'tide-bg-blur',
41
43
  ERROR: 'tide-bg-error',
42
44
  INFO: 'tide-bg-info',
@@ -60,6 +62,7 @@ export const CSS = {
60
62
  },
61
63
  BORDER: {
62
64
  COLOR: {
65
+ INITIAL: 'tide-border-color-initial',
63
66
  DEFAULT: 'tide-border',
64
67
  FLOATING: 'tide-border-floating',
65
68
  HIGH: 'tide-border-high',
@@ -67,28 +70,34 @@ export const CSS = {
67
70
  PRIMARY: 'tide-border-primary',
68
71
  },
69
72
  RADIUS: {
73
+ ZERO: 'tide-radius-0',
70
74
  QUARTER: 'tide-radius-1/4',
71
75
  HALF: 'tide-radius-1/2',
72
76
  ONE: 'tide-radius-1',
73
77
  FULL: 'tide-radius-full',
74
78
  },
75
79
  BOTTOM: {
80
+ ZERO: 'tide-border-bottom-0',
76
81
  ONE: 'tide-border-bottom-1',
77
82
  TWO: 'tide-border-bottom-2',
78
83
  },
79
84
  FULL: {
85
+ ZERO: 'tide-border-0',
80
86
  ONE: 'tide-border-1',
81
87
  TWO: 'tide-border-2',
82
88
  },
83
89
  LEFT: {
90
+ ZERO: 'tide-border-left-0',
84
91
  ONE: 'tide-border-left-1',
85
92
  TWO: 'tide-border-left-2',
86
93
  },
87
94
  RIGHT: {
95
+ ZERO: 'tide-border-right-0',
88
96
  ONE: 'tide-border-right-1',
89
97
  TWO: 'tide-border-right-2',
90
98
  },
91
99
  TOP: {
100
+ ZERO: 'tide-border-top-0',
92
101
  ONE: 'tide-border-top-1',
93
102
  TWO: 'tide-border-top-2',
94
103
  },
@@ -98,9 +107,11 @@ export const CSS = {
98
107
  CONTENT_BOX: 'tide-box-content',
99
108
  },
100
109
  BREAK_WORD: {
110
+ OFF: 'tide-break-initial',
101
111
  ON: 'tide-break-word',
102
112
  },
103
113
  COLUMNS: {
114
+ INITIAL: 'tide-columns-initial',
104
115
  ONE: 'tide-columns-1',
105
116
  TWO: 'tide-columns-2',
106
117
  THREE: 'tide-columns-3',
@@ -124,6 +135,7 @@ export const CSS = {
124
135
  },
125
136
  FLEX: {
126
137
  BASIS: {
138
+ AUTO: 'tide-flex-basis-auto',
127
139
  ZERO: 'tide-flex-basis-0',
128
140
  },
129
141
  DIRECTION: {
@@ -170,6 +182,7 @@ export const CSS = {
170
182
  },
171
183
  },
172
184
  GAP: {
185
+ ZERO: 'tide-gap-0',
173
186
  QUARTER: 'tide-gap-1/4',
174
187
  HALF: 'tide-gap-1/2',
175
188
  ONE: 'tide-gap-1',
@@ -212,7 +225,8 @@ export const CSS = {
212
225
  XL: 'tide-grid-xl',
213
226
  },
214
227
  HEIGHT: {
215
- ZERO: 'tide-width-0',
228
+ AUTO: 'tide-height-auto',
229
+ ZERO: 'tide-height-0',
216
230
  FULL: 'tide-height-full',
217
231
  },
218
232
  ISOLATION: {
@@ -223,6 +237,7 @@ export const CSS = {
223
237
  },
224
238
  MARGIN: {
225
239
  BOTTOM: {
240
+ ZERO: 'tide-margin-bottom-0',
226
241
  QUARTER: 'tide-margin-bottom-1/4',
227
242
  HALF: 'tide-margin-bottom-1/2',
228
243
  ONE: 'tide-margin-bottom-1',
@@ -230,6 +245,7 @@ export const CSS = {
230
245
  FOUR: 'tide-margin-bottom-4',
231
246
  },
232
247
  FULL: {
248
+ ZERO: 'tide-margin-0',
233
249
  QUARTER: 'tide-margin-1/4',
234
250
  HALF: 'tide-margin-1/2',
235
251
  ONE: 'tide-margin-1',
@@ -238,6 +254,7 @@ export const CSS = {
238
254
  },
239
255
  LEFT: {
240
256
  AUTO: 'tide-margin-left-auto',
257
+ ZERO: 'tide-margin-left-0',
241
258
  QUARTER: 'tide-margin-left-1/4',
242
259
  HALF: 'tide-margin-left-1/2',
243
260
  ONE: 'tide-margin-left-1',
@@ -246,6 +263,7 @@ export const CSS = {
246
263
  },
247
264
  RIGHT: {
248
265
  AUTO: 'tide-margin-right-auto',
266
+ ZERO: 'tide-margin-right-0',
249
267
  QUARTER: 'tide-margin-right-1/4',
250
268
  HALF: 'tide-margin-right-1/2',
251
269
  ONE: 'tide-margin-right-1',
@@ -253,6 +271,7 @@ export const CSS = {
253
271
  FOUR: 'tide-margin-right-4',
254
272
  },
255
273
  TOP: {
274
+ ZERO: 'tide-margin-top-0',
256
275
  QUARTER: 'tide-margin-top-1/4',
257
276
  HALF: 'tide-margin-top-1/2',
258
277
  ONE: 'tide-margin-top-1',
@@ -261,6 +280,7 @@ export const CSS = {
261
280
  },
262
281
  X: {
263
282
  AUTO: 'tide-margin-x-auto',
283
+ ZERO: 'tide-margin-x-0',
264
284
  QUARTER: 'tide-margin-x-1/4',
265
285
  HALF: 'tide-margin-x-1/2',
266
286
  ONE: 'tide-margin-x-1',
@@ -268,6 +288,7 @@ export const CSS = {
268
288
  FOUR: 'tide-margin-x-4',
269
289
  },
270
290
  Y: {
291
+ ZERO: 'tide-margin-y-0',
271
292
  QUARTER: 'tide-margin-y-1/4',
272
293
  HALF: 'tide-margin-y-1/2',
273
294
  ONE: 'tide-margin-y-1',
@@ -302,6 +323,7 @@ export const CSS = {
302
323
  },
303
324
  PADDING: {
304
325
  BOTTOM: {
326
+ ZERO: 'tide-padding-bottom-0',
305
327
  QUARTER: 'tide-padding-bottom-1/4',
306
328
  HALF: 'tide-padding-bottom-1/2',
307
329
  ONE: 'tide-padding-bottom-1',
@@ -309,6 +331,7 @@ export const CSS = {
309
331
  FOUR: 'tide-padding-bottom-4',
310
332
  },
311
333
  FULL: {
334
+ ZERO: 'tide-padding-0',
312
335
  QUARTER: 'tide-padding-1/4',
313
336
  HALF: 'tide-padding-1/2',
314
337
  ONE: 'tide-padding-1',
@@ -316,6 +339,7 @@ export const CSS = {
316
339
  FOUR: 'tide-padding-4',
317
340
  },
318
341
  LEFT: {
342
+ ZERO: 'tide-padding-left-0',
319
343
  QUARTER: 'tide-padding-left-1/4',
320
344
  HALF: 'tide-padding-left-1/2',
321
345
  ONE: 'tide-padding-left-1',
@@ -323,6 +347,7 @@ export const CSS = {
323
347
  FOUR: 'tide-padding-left-4',
324
348
  },
325
349
  RIGHT: {
350
+ ZERO: 'tide-padding-right-0',
326
351
  QUARTER: 'tide-padding-right-1/4',
327
352
  HALF: 'tide-padding-right-1/2',
328
353
  ONE: 'tide-padding-right-1',
@@ -330,6 +355,7 @@ export const CSS = {
330
355
  FOUR: 'tide-padding-right-4',
331
356
  },
332
357
  TOP: {
358
+ ZERO: 'tide-padding-top-0',
333
359
  QUARTER: 'tide-padding-top-1/4',
334
360
  HALF: 'tide-padding-top-1/2',
335
361
  ONE: 'tide-padding-top-1',
@@ -337,6 +363,7 @@ export const CSS = {
337
363
  FOUR: 'tide-padding-top-4',
338
364
  },
339
365
  X: {
366
+ ZERO: 'tide-padding-x-0',
340
367
  QUARTER: 'tide-padding-x-1/4',
341
368
  HALF: 'tide-padding-x-1/2',
342
369
  ONE: 'tide-padding-x-1',
@@ -344,6 +371,7 @@ export const CSS = {
344
371
  FOUR: 'tide-padding-x-4',
345
372
  },
346
373
  Y: {
374
+ ZERO: 'tide-padding-y-0',
347
375
  QUARTER: 'tide-padding-y-1/4',
348
376
  HALF: 'tide-padding-y-1/2',
349
377
  ONE: 'tide-padding-y-1',
@@ -359,6 +387,7 @@ export const CSS = {
359
387
  ABSOLUTE: 'tide-position-absolute',
360
388
  FIXED: 'tide-position-fixed',
361
389
  RELATIVE: 'tide-position-relative',
390
+ STATIC: 'tide-static',
362
391
  STICKY: 'tide-sticky',
363
392
  },
364
393
  POSITIONING: {
@@ -371,6 +400,7 @@ export const CSS = {
371
400
  OFF: 'tide-scrollbar-none',
372
401
  },
373
402
  SHADOW: {
403
+ INITIAL: 'tide-shadow-initial',
374
404
  BOTTOM: 'tide-shadow-bottom',
375
405
  TOP: 'tide-shadow-top',
376
406
  },
@@ -398,11 +428,13 @@ export const CSS = {
398
428
  OFF: 'tide-whitespace-nowrap',
399
429
  },
400
430
  WIDTH: {
431
+ AUTO: 'tide-width-auto',
401
432
  ZERO: 'tide-width-0',
402
433
  FULL: 'tide-width-full',
403
434
  MAX_FULL: 'tide-max-width-full',
404
435
  },
405
436
  Z_INDEX: {
437
+ INITIAL: 'tide-z-index-initial',
406
438
  ONE: 'tide-z-index-1',
407
439
  },
408
440
  } as const;
@@ -453,38 +485,45 @@ export const cssSortOrder = [
453
485
  CSS.POSITIONING.LEFT,
454
486
  CSS.BOX_SIZING.BORDER_BOX,
455
487
  CSS.BOX_SIZING.CONTENT_BOX,
488
+ CSS.MARGIN.FULL.ZERO,
456
489
  CSS.MARGIN.FULL.ONE,
457
490
  CSS.MARGIN.FULL.HALF,
458
491
  CSS.MARGIN.FULL.QUARTER,
459
492
  CSS.MARGIN.FULL.TWO,
460
493
  CSS.MARGIN.FULL.FOUR,
494
+ CSS.MARGIN.Y.ZERO,
461
495
  CSS.MARGIN.Y.ONE,
462
496
  CSS.MARGIN.Y.HALF,
463
497
  CSS.MARGIN.Y.QUARTER,
464
498
  CSS.MARGIN.Y.TWO,
465
499
  CSS.MARGIN.Y.FOUR,
500
+ CSS.MARGIN.TOP.ZERO,
466
501
  CSS.MARGIN.TOP.ONE,
467
502
  CSS.MARGIN.TOP.HALF,
468
503
  CSS.MARGIN.TOP.QUARTER,
469
504
  CSS.MARGIN.TOP.TWO,
470
505
  CSS.MARGIN.TOP.FOUR,
506
+ CSS.MARGIN.X.ZERO,
471
507
  CSS.MARGIN.X.ONE,
472
508
  CSS.MARGIN.X.HALF,
473
509
  CSS.MARGIN.X.QUARTER,
474
510
  CSS.MARGIN.X.TWO,
475
511
  CSS.MARGIN.X.FOUR,
476
512
  CSS.MARGIN.X.AUTO,
513
+ CSS.MARGIN.RIGHT.ZERO,
477
514
  CSS.MARGIN.RIGHT.ONE,
478
515
  CSS.MARGIN.RIGHT.HALF,
479
516
  CSS.MARGIN.RIGHT.QUARTER,
480
517
  CSS.MARGIN.RIGHT.TWO,
481
518
  CSS.MARGIN.RIGHT.FOUR,
482
519
  CSS.MARGIN.RIGHT.AUTO,
520
+ CSS.MARGIN.BOTTOM.ZERO,
483
521
  CSS.MARGIN.BOTTOM.ONE,
484
522
  CSS.MARGIN.BOTTOM.HALF,
485
523
  CSS.MARGIN.BOTTOM.QUARTER,
486
524
  CSS.MARGIN.BOTTOM.TWO,
487
525
  CSS.MARGIN.BOTTOM.FOUR,
526
+ CSS.MARGIN.LEFT.ZERO,
488
527
  CSS.MARGIN.LEFT.ONE,
489
528
  CSS.MARGIN.LEFT.HALF,
490
529
  CSS.MARGIN.LEFT.QUARTER,
@@ -505,36 +544,43 @@ export const cssSortOrder = [
505
544
  CSS.BORDER.RADIUS.HALF,
506
545
  CSS.BORDER.RADIUS.QUARTER,
507
546
  CSS.BORDER.RADIUS.FULL,
547
+ CSS.PADDING.FULL.ZERO,
508
548
  CSS.PADDING.FULL.ONE,
509
549
  CSS.PADDING.FULL.HALF,
510
550
  CSS.PADDING.FULL.QUARTER,
511
551
  CSS.PADDING.FULL.TWO,
512
552
  CSS.PADDING.FULL.FOUR,
553
+ CSS.PADDING.Y.ZERO,
513
554
  CSS.PADDING.Y.ONE,
514
555
  CSS.PADDING.Y.HALF,
515
556
  CSS.PADDING.Y.QUARTER,
516
557
  CSS.PADDING.Y.TWO,
517
558
  CSS.PADDING.Y.FOUR,
559
+ CSS.PADDING.TOP.ZERO,
518
560
  CSS.PADDING.TOP.ONE,
519
561
  CSS.PADDING.TOP.HALF,
520
562
  CSS.PADDING.TOP.QUARTER,
521
563
  CSS.PADDING.TOP.TWO,
522
564
  CSS.PADDING.TOP.FOUR,
565
+ CSS.PADDING.X.ZERO,
523
566
  CSS.PADDING.X.ONE,
524
567
  CSS.PADDING.X.HALF,
525
568
  CSS.PADDING.X.QUARTER,
526
569
  CSS.PADDING.X.TWO,
527
570
  CSS.PADDING.X.FOUR,
571
+ CSS.PADDING.RIGHT.ZERO,
528
572
  CSS.PADDING.RIGHT.ONE,
529
573
  CSS.PADDING.RIGHT.HALF,
530
574
  CSS.PADDING.RIGHT.QUARTER,
531
575
  CSS.PADDING.RIGHT.TWO,
532
576
  CSS.PADDING.RIGHT.FOUR,
577
+ CSS.PADDING.BOTTOM.ZERO,
533
578
  CSS.PADDING.BOTTOM.ONE,
534
579
  CSS.PADDING.BOTTOM.HALF,
535
580
  CSS.PADDING.BOTTOM.QUARTER,
536
581
  CSS.PADDING.BOTTOM.TWO,
537
582
  CSS.PADDING.BOTTOM.FOUR,
583
+ CSS.PADDING.LEFT.ZERO,
538
584
  CSS.PADDING.LEFT.ONE,
539
585
  CSS.PADDING.LEFT.HALF,
540
586
  CSS.PADDING.LEFT.QUARTER,
File without changes