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
|
@@ -17,16 +17,15 @@ const render = (args: any, { updateArgs }: any) => ({
|
|
|
17
17
|
components: { TidePagination },
|
|
18
18
|
methods: {
|
|
19
19
|
doSomething,
|
|
20
|
-
|
|
21
|
-
action(`Current page ${index}`)(
|
|
22
|
-
|
|
20
|
+
handleChange: (_event: Event, index: number) => {
|
|
21
|
+
action(`Current page ${index}`)(index);
|
|
23
22
|
updateArgs({ ...args, pageCurrent: index });
|
|
24
23
|
|
|
25
24
|
try {
|
|
26
|
-
const
|
|
25
|
+
const callback = eval(args.handleChange);
|
|
27
26
|
|
|
28
|
-
if (
|
|
29
|
-
|
|
27
|
+
if (callback) {
|
|
28
|
+
callback();
|
|
30
29
|
}
|
|
31
30
|
} catch {
|
|
32
31
|
alert('Please specify a valid handler in the "change" control.');
|
|
@@ -34,7 +33,7 @@ const render = (args: any, { updateArgs }: any) => ({
|
|
|
34
33
|
},
|
|
35
34
|
},
|
|
36
35
|
setup: () => ({ args }),
|
|
37
|
-
template: `<TidePagination @change="
|
|
36
|
+
template: `<TidePagination @change="handleChange" v-bind="args" />`,
|
|
38
37
|
});
|
|
39
38
|
|
|
40
39
|
export default {
|
|
@@ -48,11 +47,11 @@ export default {
|
|
|
48
47
|
eq: ELEMENT_TEXT_AS_ICON.BUTTON,
|
|
49
48
|
},
|
|
50
49
|
},
|
|
51
|
-
|
|
50
|
+
handleChange: {
|
|
52
51
|
...change,
|
|
53
52
|
table: {
|
|
54
53
|
defaultValue: { summary: 'None' },
|
|
55
|
-
type: { summary: '(
|
|
54
|
+
type: { summary: '(pageIndex: number) => void' },
|
|
56
55
|
},
|
|
57
56
|
},
|
|
58
57
|
pageCurrent: {
|
|
@@ -69,7 +68,7 @@ export default {
|
|
|
69
68
|
},
|
|
70
69
|
},
|
|
71
70
|
args: {
|
|
72
|
-
|
|
71
|
+
handleChange: 'doSomething',
|
|
73
72
|
pageCurrent: 1,
|
|
74
73
|
pageTotal: 5,
|
|
75
74
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { action } from '@storybook/addon-actions';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import TideSwitch from '@/components/TideSwitch.vue';
|
|
4
4
|
import {
|
|
5
5
|
argTypeBooleanUnrequired,
|
|
6
6
|
change,
|
|
@@ -10,19 +10,19 @@ import {
|
|
|
10
10
|
parameters,
|
|
11
11
|
} from '@/utilities/storybook';
|
|
12
12
|
|
|
13
|
-
const render = (args: any,
|
|
14
|
-
components: {
|
|
13
|
+
const render = (args: any, context: any) => ({
|
|
14
|
+
components: { TideSwitch },
|
|
15
15
|
methods: {
|
|
16
16
|
doSomething,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
handleChange: () => {
|
|
18
|
+
action('TideSwitch changed')();
|
|
19
|
+
context.updateArgs({ ...args, isActive: context.args.isActive !== true });
|
|
20
20
|
|
|
21
21
|
try {
|
|
22
|
-
const
|
|
22
|
+
const callback = eval(args.handleChange);
|
|
23
23
|
|
|
24
|
-
if (
|
|
25
|
-
|
|
24
|
+
if (callback) {
|
|
25
|
+
callback();
|
|
26
26
|
}
|
|
27
27
|
} catch {
|
|
28
28
|
alert('Please specify a valid handler in the "change" control.');
|
|
@@ -30,7 +30,7 @@ const render = (args: any, { updateArgs }: any) => ({
|
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
32
|
setup: () => ({ args }),
|
|
33
|
-
template: `<
|
|
33
|
+
template: `<TideSwitch @change="handleChange" v-bind="args" />`,
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
export default {
|
|
@@ -41,11 +41,11 @@ export default {
|
|
|
41
41
|
...argTypeBooleanUnrequired,
|
|
42
42
|
description: 'Determines clickability',
|
|
43
43
|
},
|
|
44
|
-
|
|
44
|
+
handleChange: {
|
|
45
45
|
...change,
|
|
46
46
|
table: {
|
|
47
47
|
defaultValue: { summary: 'None' },
|
|
48
|
-
type: { summary: '(
|
|
48
|
+
type: { summary: '() => void' },
|
|
49
49
|
},
|
|
50
50
|
},
|
|
51
51
|
isActive: {
|
|
@@ -56,14 +56,14 @@ export default {
|
|
|
56
56
|
args: {
|
|
57
57
|
dataTrack: '',
|
|
58
58
|
disabled: undefined,
|
|
59
|
-
|
|
59
|
+
handleChange: 'doSomething',
|
|
60
60
|
isActive: undefined,
|
|
61
61
|
},
|
|
62
|
-
component:
|
|
62
|
+
component: TideSwitch,
|
|
63
63
|
parameters,
|
|
64
64
|
render,
|
|
65
65
|
tags: ['autodocs'],
|
|
66
|
-
title: 'Basic Components/
|
|
66
|
+
title: 'Basic Components/TideSwitch',
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
export const Demo = {};
|
package/src/types/Styles.ts
CHANGED
|
@@ -56,16 +56,17 @@ export const change = {
|
|
|
56
56
|
name: 'change',
|
|
57
57
|
table: {
|
|
58
58
|
defaultValue: { summary: 'None' },
|
|
59
|
-
type: { summary: '(
|
|
59
|
+
type: { summary: '() => void' },
|
|
60
60
|
},
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
export const click = {
|
|
64
64
|
control: 'text',
|
|
65
65
|
description: 'JS code or function to execute on click event',
|
|
66
|
+
isEmit: true,
|
|
66
67
|
table: {
|
|
67
68
|
defaultValue: { summary: 'None' },
|
|
68
|
-
type: { summary: '(
|
|
69
|
+
type: { summary: '() => void' },
|
|
69
70
|
},
|
|
70
71
|
};
|
|
71
72
|
|
|
@@ -208,7 +209,7 @@ export const formatSnippet = (code: string, context: StoryContext) => {
|
|
|
208
209
|
|
|
209
210
|
if (isEmit) {
|
|
210
211
|
if (value) {
|
|
211
|
-
return
|
|
212
|
+
return `@${argType.name}="${value}"`;
|
|
212
213
|
}
|
|
213
214
|
}
|
|
214
215
|
|