tide-design-system 2.0.53 → 2.1.0

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 (60) hide show
  1. package/.storybook/main.ts +3 -3
  2. package/.storybook/preview.ts +0 -4
  3. package/dist/css/dynamic-utilities.css +0 -1
  4. package/dist/css/realm/aero.css +31 -37
  5. package/dist/css/realm/atv.css +21 -41
  6. package/dist/css/realm/boatmart.css +20 -40
  7. package/dist/css/realm/cycle.css +19 -39
  8. package/dist/css/realm/equipment.css +31 -37
  9. package/dist/css/realm/pwc.css +31 -37
  10. package/dist/css/realm/rv.css +20 -39
  11. package/dist/css/realm/snow.css +31 -37
  12. package/dist/css/realm/truck.css +31 -37
  13. package/dist/css/variables.css +18 -0
  14. package/dist/style.css +1 -1
  15. package/dist/tide-design-system.cjs +2 -2
  16. package/dist/tide-design-system.esm.d.ts +224 -213
  17. package/dist/tide-design-system.esm.js +567 -614
  18. package/dist/utilities/storybook.ts +4 -3
  19. package/index.ts +4 -4
  20. package/package.json +1 -1
  21. package/src/assets/css/dynamic-utilities.css +0 -1
  22. package/src/assets/css/realm/aero.css +31 -37
  23. package/src/assets/css/realm/atv.css +21 -41
  24. package/src/assets/css/realm/boatmart.css +20 -40
  25. package/src/assets/css/realm/cycle.css +19 -39
  26. package/src/assets/css/realm/equipment.css +31 -37
  27. package/src/assets/css/realm/pwc.css +31 -37
  28. package/src/assets/css/realm/rv.css +20 -39
  29. package/src/assets/css/realm/snow.css +31 -37
  30. package/src/assets/css/realm/truck.css +31 -37
  31. package/src/assets/css/variables.css +18 -0
  32. package/src/components/TideAccordionItem.vue +27 -56
  33. package/src/components/TideAlert.vue +15 -15
  34. package/src/components/TideBreadCrumbs.vue +6 -7
  35. package/src/components/{TideTabs.vue → TideButtonSegmented.vue} +9 -15
  36. package/src/components/TideCarousel.vue +1 -1
  37. package/src/components/TideModal.vue +3 -3
  38. package/src/components/TidePagination.vue +4 -4
  39. package/src/components/{TideToggle.vue → TideSwitch.vue} +18 -26
  40. package/src/stories/TideAccordionItem.stories.ts +37 -12
  41. package/src/stories/TideBackgroundImage.stories.ts +2 -6
  42. package/src/stories/TideButton.stories.ts +5 -5
  43. package/src/stories/TideButtonIcon.stories.ts +5 -5
  44. package/src/stories/TideButtonPagination.stories.ts +5 -5
  45. package/src/stories/{TideTabs.stories.ts → TideButtonSegmented.stories.ts} +18 -21
  46. package/src/stories/TideCard.stories.ts +5 -5
  47. package/src/stories/TideCarousel.stories.ts +11 -24
  48. package/src/stories/TideChipFilter.stories.ts +14 -4
  49. package/src/stories/TideChipInput.stories.ts +14 -3
  50. package/src/stories/TideInputCheckbox.stories.ts +5 -5
  51. package/src/stories/TideInputRadio.stories.ts +18 -5
  52. package/src/stories/TideInputSelect.stories.ts +5 -5
  53. package/src/stories/TideInputText.stories.ts +4 -7
  54. package/src/stories/TideInputTextarea.stories.ts +2 -2
  55. package/src/stories/TideLink.stories.ts +4 -2
  56. package/src/stories/TideModal.stories.ts +6 -4
  57. package/src/stories/TidePagination.stories.ts +9 -10
  58. package/src/stories/{TideToggle.stories.ts → TideSwitch.stories.ts} +15 -15
  59. package/src/types/Styles.ts +0 -1
  60. package/src/utilities/storybook.ts +4 -3
@@ -1,43 +1,37 @@
1
1
  /* Snowmobile Trader Realm Colors */
2
2
  :root {
3
3
  /* Realm-specific Tonal Palette: Only to be referenced in the assignment of Color Roles below. */
4
- --tide-color1: #193778;
5
- --tide-color2: #10234C;
6
- --tide-color3: #4F60A7;
7
- --tide-frost: #E3E8F2;
8
-
9
- --tide-gradient: linear-gradient(
10
- to bottom right,
11
- var(--tide-color3) 50%,
12
- var(--tide-color2) 150%
13
- );
14
-
15
- --tide-floating: rgba(255, 255, 255, 0);
4
+ --tide-realm-frost: #E3E8F2;
5
+ --tide-realm-ice: #81C9DF;
6
+ --tide-realm-sapphire-dark: #122754;
7
+ --tide-realm-sapphire: #193778;
8
+ --tide-realm-twilight: #CCC5E7;
16
9
 
17
10
  /* Color Roles: Each realm will assign values to this same series of variables from a combination of the Global and Realm-specific Palettes. */
18
- --tide-primary: var(--tide-color1);
19
- --tide-on-primary: var(--tide-white);
20
-
21
- --tide-secondary: var(--tide-black);
22
- --tide-on-secondary: var(--tide-white);
23
-
24
- --tide-surface: var(--tide-white);
25
- --tide-surface-variant: var(--tide-gray-200);
26
- --tide-surface-brand: var(--tide-color1);
27
- --tide-surface-accent: var(--tide-frost);
28
- --tide-surface-accent-variant: var(--tide-color3);
29
- --tide-surface-gradient: var(--tide-gradient);
30
- --tide-surface-floating: var(--tide-floating);
31
-
32
- --tide-on-surface: var(--tide-black);
33
- --tide-on-surface-variant: var(--tide-gray-800);
34
- --tide-on-surface-brand: var(--tide-color1);
35
-
36
- --tide-on-surface-inverse: var(--tide-white);
37
- --tide-on-surface-inverse-variant: var(--tide-transparent-200);
38
-
39
- --tide-border: var(--tide-gray-400);
40
- --tide-border-low: var(--tide-gray-600);
41
- --tide-border-high: var(--tide-black);
42
- --tide-border-floating: var(--tide-gray-300);
11
+ --tide-primary: var(--tide-realm-sapphire);
12
+ --tide-surface-accent: var(--tide-realm-frost);
13
+ --tide-surface-brand: var(--tide-realm-sapphire-dark);
14
+
15
+ --tide-on-primary: var(--tide-gray-100);
16
+ --tide-on-surface-brand: var(--tide-realm-sapphire);
17
+
18
+ --tide-surface-gradient:
19
+ /* bottom right */
20
+ radial-gradient(
21
+ 57.27% 60.26% at 100% 103.53%,
22
+ color-mix(in srgb, var(--tide-realm-ice) 33%, transparent) 0%,
23
+ color-mix(in srgb, var(--tide-realm-ice) 0%, transparent) 100%
24
+ ),
25
+ /* top */
26
+ radial-gradient(
27
+ 157.36% 151.94% at 19.69% -3.53%,
28
+ color-mix(in srgb, var(--tide-realm-twilight) 42%, transparent) 28.37%,
29
+ color-mix(in srgb, var(--tide-realm-twilight) 0%, transparent) 100%
30
+ ),
31
+ /* bottom left */
32
+ radial-gradient(
33
+ 41.93% 63.48% at -2.12% 103.9%,
34
+ color-mix(in srgb, var(--tide-realm-sapphire) 44%, transparent) 0%,
35
+ color-mix(in srgb, var(--tide-realm-sapphire) 0%, transparent) 100%
36
+ );
43
37
  }
@@ -1,43 +1,37 @@
1
1
  /* Commercial Truck Trader Realm Colors */
2
2
  :root {
3
3
  /* Realm-specific Tonal Palette: Only to be referenced in the assignment of Color Roles below. */
4
- --tide-blue: #005F9E;
5
- --tide-midnight-blue: #172C4B;
6
- --tide-teal: #97D9E3;
7
- --tide-cloud: #DEECF6;
8
-
9
- --tide-gradient: linear-gradient(
10
- to bottom right,
11
- var(--tide-midnight-blue) 50%,
12
- var(--tide-teal) 150%
13
- );
14
-
15
- --tide-floating: rgba(255, 255, 255, 0);
4
+ --tide-realm-baby-blue: #97D1E3;
5
+ --tide-realm-blue: #005F9E;
6
+ --tide-realm-cloud: #DBEDF7;
7
+ --tide-realm-granny-smith: #A6E6A7;
8
+ --tide-realm-midnight-blue: #172C4B;
16
9
 
17
10
  /* Color Roles: Each realm will assign values to this same series of variables from a combination of the Global and Realm-specific Palettes. */
18
- --tide-primary: var(--tide-blue);
19
- --tide-on-primary: var(--tide-white);
20
-
21
- --tide-secondary: var(--tide-black);
22
- --tide-on-secondary: var(--tide-white);
23
-
24
- --tide-surface: var(--tide-white);
25
- --tide-surface-variant: var(--tide-gray-200);
26
- --tide-surface-brand: var(--tide-blue);
27
- --tide-surface-accent: var(--tide-cloud);
28
- --tide-surface-accent-variant: var(--tide-midnight-blue);
29
- --tide-surface-gradient: var(--tide-gradient);
30
- --tide-surface-floating: var(--tide-floating);
31
-
32
- --tide-on-surface: var(--tide-black);
33
- --tide-on-surface-variant: var(--tide-gray-800);
34
- --tide-on-surface-brand: var(--tide-blue);
35
-
36
- --tide-on-surface-inverse: var(--tide-white);
37
- --tide-on-surface-inverse-variant: var(--tide-transparent-200);
38
-
39
- --tide-border: var(--tide-gray-400);
40
- --tide-border-low: var(--tide-gray-600);
41
- --tide-border-high: var(--tide-black);
42
- --tide-border-floating: var(--tide-gray-300);
11
+ --tide-primary: var(--tide-realm-blue);
12
+ --tide-surface-accent: var(--tide-realm-cloud);
13
+ --tide-surface-brand: var(--tide-realm-midnight-blue);
14
+
15
+ --tide-on-primary: var(--tide-gray-100);
16
+ --tide-on-surface-brand: var(--tide-realm-blue);
17
+
18
+ --tide-surface-gradient:
19
+ /* bottom right */
20
+ radial-gradient(
21
+ 57.27% 60.26% at 100% 103.53%,
22
+ color-mix(in srgb, var(--tide-realm-granny-smith) 28%, transparent) 0%,
23
+ color-mix(in srgb, var(--tide-realm-granny-smith) 0%, transparent) 100%
24
+ ),
25
+ /* top */
26
+ radial-gradient(
27
+ 157.36% 151.94% at 19.69% -3.53%,
28
+ color-mix(in srgb, var(--tide-realm-baby-blue) 42%, transparent) 28.37%,
29
+ color-mix(in srgb, var(--tide-realm-baby-blue) 0%, transparent) 100%
30
+ ),
31
+ /* bottom left */
32
+ radial-gradient(
33
+ 41.93% 63.48% at -2.12% 103.9%,
34
+ color-mix(in srgb, var(--tide-realm-blue) 36%, transparent) 0%,
35
+ color-mix(in srgb, var(--tide-realm-blue) 0%, transparent) 100%
36
+ );
43
37
  }
@@ -110,4 +110,22 @@
110
110
  --tide-warning-primary-border: var(--tide-yellow-300);
111
111
  --tide-warning-surface: var(--tide-yellow-100);
112
112
  --tide-warning-border: var(--tide-yellow-200);
113
+
114
+ /* Global color roles (defined in realm tonal palettes in Figma) */
115
+ --tide-secondary: var(--tide-gray-900);
116
+ --tide-on-secondary: var(--tide-gray-100);
117
+
118
+ --tide-surface: var(--tide-gray-100);
119
+ --tide-surface-variant: var(--tide-gray-200);
120
+ --tide-surface-floating: var(--tide-transparent-100);
121
+
122
+ --tide-on-surface: var(--tide-gray-900);
123
+ --tide-on-surface-variant: var(--tide-gray-700);
124
+ --tide-on-surface-inverse: var(--tide-gray-100);
125
+ --tide-on-surface-inverse-variant: var(--tide-transparent-200);
126
+
127
+ --tide-border-low: var(--tide-gray-400);
128
+ --tide-border: var(--tide-gray-600);
129
+ --tide-border-high: var(--tide-gray-900);
130
+ --tide-border-floating: var(--tide-transparent-300);
113
131
  }
@@ -1,62 +1,30 @@
1
1
  <script lang="ts" setup>
2
- import { onMounted, ref } from 'vue';
3
-
4
2
  import TideDivider from '@/components/TideDivider.vue';
5
3
  import TideIcon from '@/components/TideIcon.vue';
6
- import TideIndicator from '@/components/TideIndicator.vue';
7
4
  import { ICON } from '@/types/Icon';
8
5
  import { CSS } from '@/types/Styles';
9
6
 
10
- const props = defineProps({
11
- hasBottomDivider: {
12
- default: false,
13
- required: false,
14
- type: Boolean,
15
- },
16
- hasTopDivider: {
17
- default: false,
18
- required: false,
19
- type: Boolean,
20
- },
21
- isActive: {
22
- default: false,
23
- required: false,
24
- type: Boolean,
25
- },
26
- isExpandedInitial: {
27
- default: false,
28
- required: false,
29
- type: Boolean,
30
- },
31
- isOptional: {
32
- default: false,
33
- required: false,
34
- type: Boolean,
35
- },
36
- label: {
37
- default: '',
38
- required: true,
39
- type: String,
40
- },
41
- });
42
-
43
- const isExpanded = ref(props.isExpandedInitial);
44
-
45
- let accordionBody = ref();
7
+ const emit = defineEmits(['toggle']);
46
8
 
47
- const toggleIsExpanded = () => {
48
- const element = accordionBody.value as HTMLElement;
49
-
50
- isExpanded.value = !isExpanded.value;
51
-
52
- element.style.gridTemplateRows = isExpanded.value ? '1fr' : '0fr';
9
+ type Props = {
10
+ hasBottomDivider?: boolean;
11
+ hasTopDivider?: boolean;
12
+ isExpanded?: boolean;
13
+ isOptional?: boolean;
14
+ label: string;
53
15
  };
54
16
 
55
- onMounted(() => {
56
- const element = accordionBody.value as HTMLElement;
57
-
58
- element.style.gridTemplateRows = isExpanded.value ? '1fr' : '0fr';
17
+ const props = withDefaults(defineProps<Props>(), {
18
+ hasBottomDivider: false,
19
+ hasTopDivider: false,
20
+ isExpanded: false,
21
+ isOptional: false,
22
+ label: '',
59
23
  });
24
+
25
+ const handleToggleClick = () => {
26
+ emit('toggle');
27
+ };
60
28
  </script>
61
29
 
62
30
  <template>
@@ -65,7 +33,7 @@
65
33
 
66
34
  <div
67
35
  :class="['tide-accordion-head', CSS.DISPLAY.FLEX, CSS.AXIS1.BETWEEN, CSS.PADDING.Y.HALF, CSS.CURSOR.POINTER]"
68
- @click="toggleIsExpanded"
36
+ @click="handleToggleClick"
69
37
  >
70
38
  <div :class="[CSS.DISPLAY.FLEX, CSS.AXIS2.CENTER, CSS.GAP.HALF, CSS.FONT.WEIGHT.SEVEN_HUNDRED]">
71
39
  <span>{{ props.label }}</span>
@@ -76,17 +44,12 @@
76
44
  >
77
45
  (optional)
78
46
  </span>
79
-
80
- <TideIndicator v-if="props.isActive" />
81
47
  </div>
82
48
 
83
49
  <TideIcon :icon="isExpanded ? ICON.EXPAND_LESS : ICON.EXPAND_MORE" />
84
50
  </div>
85
51
 
86
- <div
87
- :class="['tide-accordion-body', CSS.DISPLAY.GRID]"
88
- ref="accordionBody"
89
- >
52
+ <div :class="['tide-accordion-body', props.isExpanded ? 'expanded' : 'collapsed', CSS.DISPLAY.GRID]">
90
53
  <div :class="[CSS.OVERFLOW.Y.HIDDEN]">
91
54
  <div :class="[CSS.MARGIN.Y.ONE, CSS.FONT.WEIGHT.FOUR_HUNDRED, CSS.FONT.COLOR.SURFACE.DEFAULT]">
92
55
  <slot />
@@ -102,4 +65,12 @@
102
65
  .tide-accordion-body {
103
66
  transition: grid-template-rows var(--tide-animate);
104
67
  }
68
+
69
+ .tide-accordion-body.expanded {
70
+ grid-template-rows: 1fr;
71
+ }
72
+
73
+ .tide-accordion-body.collapsed {
74
+ grid-template-rows: 0fr;
75
+ }
105
76
  </style>
@@ -24,7 +24,7 @@
24
24
  });
25
25
 
26
26
  const icon = computed(() => {
27
- let icon: Icon = ICON.VIEW_IN_AR;
27
+ let icon: Icon = ICON.INFO;
28
28
 
29
29
  switch (props.type) {
30
30
  case ALERT.ERROR:
@@ -52,6 +52,7 @@
52
52
  props.type,
53
53
  'tide-alert',
54
54
  CSS.DISPLAY.GRID,
55
+ CSS.AXIS2.CENTER,
55
56
  CSS.BORDER.RADIUS.HALF,
56
57
  CSS.PADDING.FULL.ONE,
57
58
  props.type === ALERT.ERROR && CSS.BG.SURFACE.ERROR,
@@ -61,20 +62,19 @@
61
62
  props.isToast ? CSS.SHADOW.BOTTOM : '',
62
63
  ]"
63
64
  >
64
- <div :class="['tide-alert-icon', CSS.DISPLAY.FLEX, CSS.AXIS2.CENTER]">
65
- <TideIcon
66
- :class="[
67
- props.type,
68
- CSS.BORDER.RADIUS.FULL,
69
- CSS.PADDING.FULL.HALF,
70
- CSS.FONT.COLOR.SURFACE.INVERSE,
71
- props.type === ALERT.ERROR && CSS.BG.ERROR,
72
- props.type === ALERT.INFO && CSS.BG.INFO,
73
- props.type === ALERT.SUCCESS && CSS.BG.SUCCESS,
74
- props.type === ALERT.WARNING && CSS.BG.WARNING,
75
- ]"
76
- :icon="icon"
77
- />
65
+ <div
66
+ :class="[
67
+ 'tide-alert-icon',
68
+ CSS.PADDING.FULL.HALF,
69
+ CSS.BORDER.RADIUS.FULL,
70
+ CSS.FONT.COLOR.SURFACE.INVERSE,
71
+ props.type === ALERT.ERROR && CSS.BG.ERROR,
72
+ props.type === ALERT.INFO && CSS.BG.INFO,
73
+ props.type === ALERT.SUCCESS && CSS.BG.SUCCESS,
74
+ props.type === ALERT.WARNING && CSS.BG.WARNING,
75
+ ]"
76
+ >
77
+ <TideIcon :icon="icon" />
78
78
  </div>
79
79
 
80
80
  <div :class="['tide-alert-heading', CSS.DISPLAY.FLEX, CSS.AXIS2.CENTER]">
@@ -5,14 +5,13 @@
5
5
  import { CSS } from '@/types/Styles';
6
6
 
7
7
  import type { BreadCrumb } from '@/types/BreadCrumb';
8
- import type { PropType } from 'vue';
9
8
 
10
- const props = defineProps({
11
- breadCrumbs: {
12
- default: undefined,
13
- required: true,
14
- type: Object as PropType<BreadCrumb[]>,
15
- },
9
+ type Props = {
10
+ breadCrumbs: BreadCrumb[];
11
+ };
12
+
13
+ const props = withDefaults(defineProps<Props>(), {
14
+ breadCrumbs: undefined,
16
15
  });
17
16
  </script>
18
17
 
@@ -1,34 +1,28 @@
1
1
  <script lang="ts" setup>
2
- import { ref } from 'vue';
3
-
4
2
  import { CSS } from '@/types/Styles';
5
3
 
6
4
  import type { Tab } from '@/types/Tab';
7
5
 
8
6
  type Props = {
9
- activeTabInitial?: number;
7
+ activeTab: number;
10
8
  tabs: Tab[];
11
9
  };
12
10
 
13
11
  const props = withDefaults(defineProps<Props>(), {
14
- activeTabInitial: 0,
12
+ activeTab: 0,
15
13
  });
16
14
 
17
15
  const emit = defineEmits(['change']);
18
16
 
19
- const activeTab = ref(props.activeTabInitial);
20
-
21
- const handleClick = (event: Event, index: number) => {
22
- activeTab.value = index;
23
-
24
- emit('change', event, index);
17
+ const handleClick = (index: number) => {
18
+ emit('change', index);
25
19
  };
26
20
  </script>
27
21
 
28
22
  <template>
29
23
  <div
30
24
  :class="[
31
- 'tide-tabs',
25
+ 'tide-button-segmented',
32
26
  CSS.BG.SURFACE.VARIANT,
33
27
  CSS.DISPLAY.FLEX,
34
28
  CSS.GAP.QUARTER,
@@ -40,7 +34,7 @@
40
34
  >
41
35
  <button
42
36
  :class="[
43
- 'tide-tabs-tab',
37
+ 'tide-button-segmented-tab',
44
38
  index === activeTab
45
39
  ? [CSS.BG.SURFACE.DEFAULT, CSS.FONT.COLOR.SURFACE.DEFAULT, CSS.SHADOW.BOTTOM]
46
40
  : ['inactive', CSS.FONT.COLOR.SURFACE.VARIANT],
@@ -53,7 +47,7 @@
53
47
  ]"
54
48
  :data-track="tab.dataTrack || undefined"
55
49
  :key="tab.label"
56
- @click="(event: Event) => handleClick(event, index)"
50
+ @click="handleClick(index)"
57
51
  v-for="(tab, index) in props.tabs"
58
52
  >
59
53
  <span :class="[CSS.FONT.WEIGHT.SIX_HUNDRED]">
@@ -70,11 +64,11 @@
70
64
  </template>
71
65
 
72
66
  <style scoped>
73
- .tide-tabs {
67
+ .tide-button-segmented {
74
68
  max-width: 23.3rem;
75
69
  }
76
70
 
77
- .tide-tabs-tab {
71
+ .tide-button-segmented-tab {
78
72
  flex: 1;
79
73
  transition: background-color var(--tide-animate);
80
74
  }
@@ -129,7 +129,7 @@
129
129
 
130
130
  <template>
131
131
  <section
132
- :class="['tide-carousel', CSS.POSITION.RELATIVE, CSS.DISPLAY.FLEX, CSS.AXIS2.CENTER, CSS.WIDTH.FULL]"
132
+ :class="['tide-carousel', CSS.POSITION.RELATIVE, CSS.DISPLAY.FLEX, CSS.WIDTH.FULL]"
133
133
  ref="carouselRef"
134
134
  >
135
135
  <div
@@ -18,11 +18,11 @@
18
18
  const isOpen = ref(props.isOpen);
19
19
  const savedScrollPosition = ref<number | null>(null); // TODO: replace body scroll lock with global structure?
20
20
 
21
- const handleClose = (event: Event) => {
21
+ const handleClose = () => {
22
22
  isOpen.value = false;
23
23
 
24
24
  updateModalDisplay();
25
- emit('close', event);
25
+ emit('close');
26
26
  };
27
27
 
28
28
  const updateModalDisplay = () => {
@@ -42,7 +42,7 @@
42
42
  const handleKeyDown = (event: KeyboardEvent) => {
43
43
  if (event.key === 'Escape') {
44
44
  event.stopPropagation();
45
- handleClose(event);
45
+ handleClose();
46
46
  }
47
47
  };
48
48
 
@@ -23,7 +23,7 @@
23
23
 
24
24
  const paginationButtons = computed(() => new Array(props.pageTotal).fill('').map((empty, index) => index + 1));
25
25
 
26
- const handleClick = (event: Event, index: number) => {
26
+ const handleClick = (index: number) => {
27
27
  pageCurrent.value = index;
28
28
 
29
29
  emit('change', event, index);
@@ -38,7 +38,7 @@
38
38
  :disabled="pageCurrent === 1"
39
39
  :icon="ICON.CHEVRON_LEFT"
40
40
  :priority="PRIORITY.QUATERNARY"
41
- @click="(event: Event) => handleClick(event, pageCurrent - 1)"
41
+ @click="handleClick(pageCurrent - 1)"
42
42
  />
43
43
 
44
44
  <ul :class="[CSS.DISPLAY.FLEX, CSS.AXIS2.CENTER, CSS.GAP.QUARTER, CSS.LIST_BULLETS.OFF]">
@@ -50,7 +50,7 @@
50
50
  :disabled="pageCurrent === paginationButton"
51
51
  :label="paginationButton"
52
52
  :priority="PRIORITY.QUATERNARY"
53
- @click="(event: Event) => handleClick(event, paginationButton)"
53
+ @click="handleClick(paginationButton)"
54
54
  />
55
55
  </li>
56
56
  </ul>
@@ -59,7 +59,7 @@
59
59
  :disabled="pageCurrent === paginationButtons[paginationButtons.length - 1]"
60
60
  :icon="ICON.CHEVRON_RIGHT"
61
61
  :priority="PRIORITY.QUATERNARY"
62
- @click="(event: Event) => handleClick(event, pageCurrent + 1)"
62
+ @click="handleClick(pageCurrent + 1)"
63
63
  />
64
64
  </section>
65
65
  </template>
@@ -1,32 +1,24 @@
1
1
  <script lang="ts" setup>
2
- import { ref } from 'vue';
3
-
4
2
  import TideIcon from '@/components/TideIcon.vue';
5
3
  import { ICON } from '@/types/Icon';
6
4
  import { SIZE } from '@/types/Size';
7
5
  import { CSS } from '@/types/Styles';
8
6
 
9
- const props = defineProps({
10
- disabled: {
11
- default: false,
12
- required: false,
13
- type: Boolean,
14
- },
15
- isActive: {
16
- required: true,
17
- type: Boolean,
18
- },
7
+ type Props = {
8
+ disabled?: boolean;
9
+ isActive?: boolean;
10
+ };
11
+
12
+ const props = withDefaults(defineProps<Props>(), {
13
+ disabled: false,
14
+ isActive: false,
19
15
  });
20
16
 
21
17
  const emit = defineEmits(['change']);
22
18
 
23
- const isActive = ref(props.isActive);
24
-
25
- const handleClick = (event: Event) => {
19
+ const handleClick = () => {
26
20
  if (!props.disabled) {
27
- isActive.value = !isActive.value;
28
-
29
- emit('change', event, isActive.value);
21
+ emit('change');
30
22
  }
31
23
  };
32
24
  </script>
@@ -34,7 +26,7 @@
34
26
  <template>
35
27
  <button
36
28
  :class="[
37
- 'tide-toggle',
29
+ 'tide-switch',
38
30
  props.isActive ? 'active' : '',
39
31
  CSS.DISPLAY.FLEX,
40
32
  CSS.AXIS2.CENTER,
@@ -46,11 +38,11 @@
46
38
  ]"
47
39
  :disabled="props.disabled"
48
40
  @click="handleClick"
49
- aria-label="Toggle"
41
+ aria-label="Switch"
50
42
  >
51
43
  <div
52
44
  :class="[
53
- 'tide-toggle-indicator',
45
+ 'tide-switch-indicator',
54
46
  CSS.POSITION.RELATIVE,
55
47
  CSS.DISPLAY.FLEX,
56
48
  CSS.AXIS1.CENTER,
@@ -68,26 +60,26 @@
68
60
  </template>
69
61
 
70
62
  <style scoped>
71
- .tide-toggle {
63
+ .tide-switch {
72
64
  width: 64px;
73
65
  height: 32px;
74
66
  transition: var(--tide-animate);
75
67
  transition-property: background-color;
76
68
  }
77
69
 
78
- .tide-toggle:disabled {
70
+ .tide-switch:disabled {
79
71
  opacity: 0.32;
80
72
  }
81
73
 
82
- .tide-toggle.active {
74
+ .tide-switch.active {
83
75
  border-color: var(--tide-secondary);
84
76
  }
85
77
 
86
- .tide-toggle.active .tide-toggle-indicator {
78
+ .tide-switch.active .tide-switch-indicator {
87
79
  left: 36px;
88
80
  }
89
81
 
90
- .tide-toggle-indicator {
82
+ .tide-switch-indicator {
91
83
  left: 4px;
92
84
  transition: var(--tide-animate);
93
85
  transition-property: left, border-color, background-color;