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.
- package/.storybook/main.ts +3 -3
- package/.storybook/preview.ts +0 -4
- package/dist/css/dynamic-utilities.css +0 -1
- package/dist/css/realm/aero.css +31 -37
- package/dist/css/realm/atv.css +21 -41
- package/dist/css/realm/boatmart.css +20 -40
- package/dist/css/realm/cycle.css +19 -39
- package/dist/css/realm/equipment.css +31 -37
- package/dist/css/realm/pwc.css +31 -37
- package/dist/css/realm/rv.css +20 -39
- package/dist/css/realm/snow.css +31 -37
- package/dist/css/realm/truck.css +31 -37
- package/dist/css/variables.css +18 -0
- package/dist/style.css +1 -1
- package/dist/tide-design-system.cjs +2 -2
- package/dist/tide-design-system.esm.d.ts +224 -213
- package/dist/tide-design-system.esm.js +567 -614
- package/dist/utilities/storybook.ts +4 -3
- package/index.ts +4 -4
- package/package.json +1 -1
- package/src/assets/css/dynamic-utilities.css +0 -1
- package/src/assets/css/realm/aero.css +31 -37
- package/src/assets/css/realm/atv.css +21 -41
- package/src/assets/css/realm/boatmart.css +20 -40
- package/src/assets/css/realm/cycle.css +19 -39
- package/src/assets/css/realm/equipment.css +31 -37
- package/src/assets/css/realm/pwc.css +31 -37
- package/src/assets/css/realm/rv.css +20 -39
- package/src/assets/css/realm/snow.css +31 -37
- package/src/assets/css/realm/truck.css +31 -37
- package/src/assets/css/variables.css +18 -0
- package/src/components/TideAccordionItem.vue +27 -56
- package/src/components/TideAlert.vue +15 -15
- package/src/components/TideBreadCrumbs.vue +6 -7
- package/src/components/{TideTabs.vue → TideButtonSegmented.vue} +9 -15
- package/src/components/TideCarousel.vue +1 -1
- package/src/components/TideModal.vue +3 -3
- package/src/components/TidePagination.vue +4 -4
- package/src/components/{TideToggle.vue → TideSwitch.vue} +18 -26
- package/src/stories/TideAccordionItem.stories.ts +37 -12
- package/src/stories/TideBackgroundImage.stories.ts +2 -6
- package/src/stories/TideButton.stories.ts +5 -5
- package/src/stories/TideButtonIcon.stories.ts +5 -5
- package/src/stories/TideButtonPagination.stories.ts +5 -5
- package/src/stories/{TideTabs.stories.ts → TideButtonSegmented.stories.ts} +18 -21
- package/src/stories/TideCard.stories.ts +5 -5
- package/src/stories/TideCarousel.stories.ts +11 -24
- package/src/stories/TideChipFilter.stories.ts +14 -4
- package/src/stories/TideChipInput.stories.ts +14 -3
- package/src/stories/TideInputCheckbox.stories.ts +5 -5
- package/src/stories/TideInputRadio.stories.ts +18 -5
- package/src/stories/TideInputSelect.stories.ts +5 -5
- package/src/stories/TideInputText.stories.ts +4 -7
- package/src/stories/TideInputTextarea.stories.ts +2 -2
- package/src/stories/TideLink.stories.ts +4 -2
- package/src/stories/TideModal.stories.ts +6 -4
- package/src/stories/TidePagination.stories.ts +9 -10
- package/src/stories/{TideToggle.stories.ts → TideSwitch.stories.ts} +15 -15
- package/src/types/Styles.ts +0 -1
- 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-
|
|
5
|
-
--tide-
|
|
6
|
-
--tide-
|
|
7
|
-
--tide-
|
|
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:
|
|
19
|
-
--tide-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
--tide-on-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
--tide-surface-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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:
|
|
5
|
-
--tide-
|
|
6
|
-
--tide-
|
|
7
|
-
--tide-
|
|
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:
|
|
19
|
-
--tide-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
--tide-on-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
--tide-surface-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
isExpanded
|
|
51
|
-
|
|
52
|
-
|
|
9
|
+
type Props = {
|
|
10
|
+
hasBottomDivider?: boolean;
|
|
11
|
+
hasTopDivider?: boolean;
|
|
12
|
+
isExpanded?: boolean;
|
|
13
|
+
isOptional?: boolean;
|
|
14
|
+
label: string;
|
|
53
15
|
};
|
|
54
16
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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="
|
|
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.
|
|
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
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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
|
-
|
|
11
|
-
breadCrumbs:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
7
|
+
activeTab: number;
|
|
10
8
|
tabs: Tab[];
|
|
11
9
|
};
|
|
12
10
|
|
|
13
11
|
const props = withDefaults(defineProps<Props>(), {
|
|
14
|
-
|
|
12
|
+
activeTab: 0,
|
|
15
13
|
});
|
|
16
14
|
|
|
17
15
|
const emit = defineEmits(['change']);
|
|
18
16
|
|
|
19
|
-
const
|
|
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-
|
|
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-
|
|
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="
|
|
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-
|
|
67
|
+
.tide-button-segmented {
|
|
74
68
|
max-width: 23.3rem;
|
|
75
69
|
}
|
|
76
70
|
|
|
77
|
-
.tide-
|
|
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.
|
|
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 = (
|
|
21
|
+
const handleClose = () => {
|
|
22
22
|
isOpen.value = false;
|
|
23
23
|
|
|
24
24
|
updateModalDisplay();
|
|
25
|
-
emit('close'
|
|
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(
|
|
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 = (
|
|
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="
|
|
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="
|
|
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="
|
|
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
|
-
|
|
10
|
-
disabled
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
|
24
|
-
|
|
25
|
-
const handleClick = (event: Event) => {
|
|
19
|
+
const handleClick = () => {
|
|
26
20
|
if (!props.disabled) {
|
|
27
|
-
|
|
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-
|
|
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="
|
|
41
|
+
aria-label="Switch"
|
|
50
42
|
>
|
|
51
43
|
<div
|
|
52
44
|
:class="[
|
|
53
|
-
'tide-
|
|
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-
|
|
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-
|
|
70
|
+
.tide-switch:disabled {
|
|
79
71
|
opacity: 0.32;
|
|
80
72
|
}
|
|
81
73
|
|
|
82
|
-
.tide-
|
|
74
|
+
.tide-switch.active {
|
|
83
75
|
border-color: var(--tide-secondary);
|
|
84
76
|
}
|
|
85
77
|
|
|
86
|
-
.tide-
|
|
78
|
+
.tide-switch.active .tide-switch-indicator {
|
|
87
79
|
left: 36px;
|
|
88
80
|
}
|
|
89
81
|
|
|
90
|
-
.tide-
|
|
82
|
+
.tide-switch-indicator {
|
|
91
83
|
left: 4px;
|
|
92
84
|
transition: var(--tide-animate);
|
|
93
85
|
transition-property: left, border-color, background-color;
|