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
@@ -17,16 +17,15 @@ const render = (args: any, { updateArgs }: any) => ({
17
17
  components: { TidePagination },
18
18
  methods: {
19
19
  doSomething,
20
- handleEmit: (event: Event, index: number) => {
21
- action(`Current page ${index}`)(event, { 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 performCallback = eval(args.handleEmit);
25
+ const callback = eval(args.handleChange);
27
26
 
28
- if (performCallback) {
29
- performCallback();
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="handleEmit" v-bind="args" />`,
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
- handleEmit: {
50
+ handleChange: {
52
51
  ...change,
53
52
  table: {
54
53
  defaultValue: { summary: 'None' },
55
- type: { summary: '(event: Event, pageIndex: number) => void' },
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
- handleEmit: 'doSomething',
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 TideToggle from '@/components/TideToggle.vue';
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, { updateArgs }: any) => ({
14
- components: { TideToggle },
13
+ const render = (args: any, context: any) => ({
14
+ components: { TideSwitch },
15
15
  methods: {
16
16
  doSomething,
17
- handleEmit: (event: Event, isActive: boolean) => {
18
- updateArgs({ ...args, isActive });
19
- action('TideToggle changed')(event, { isActive });
17
+ handleChange: () => {
18
+ action('TideSwitch changed')();
19
+ context.updateArgs({ ...args, isActive: context.args.isActive !== true });
20
20
 
21
21
  try {
22
- const performCallback = eval(args.handleEmit);
22
+ const callback = eval(args.handleChange);
23
23
 
24
- if (performCallback) {
25
- performCallback();
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: `<TideToggle @change="handleEmit" v-bind="args" />`,
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
- handleEmit: {
44
+ handleChange: {
45
45
  ...change,
46
46
  table: {
47
47
  defaultValue: { summary: 'None' },
48
- type: { summary: '(event: Event, tabIndex: number) => void' },
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
- handleEmit: 'doSomething',
59
+ handleChange: 'doSomething',
60
60
  isActive: undefined,
61
61
  },
62
- component: TideToggle,
62
+ component: TideSwitch,
63
63
  parameters,
64
64
  render,
65
65
  tags: ['autodocs'],
66
- title: 'Basic Components/TideToggle',
66
+ title: 'Basic Components/TideSwitch',
67
67
  };
68
68
 
69
69
  export const Demo = {};
@@ -40,7 +40,6 @@ export const CSS = {
40
40
  SUCCESS: 'tide-bg-success',
41
41
  SURFACE: {
42
42
  ACCENT: 'tide-bg-surface-accent',
43
- ACCENT_VARIANT: 'tide-bg-surface-accent-variant',
44
43
  BRAND: 'tide-bg-surface-brand',
45
44
  DEFAULT: 'tide-bg-surface',
46
45
  ERROR: 'tide-bg-surface-error',
@@ -56,16 +56,17 @@ export const change = {
56
56
  name: 'change',
57
57
  table: {
58
58
  defaultValue: { summary: 'None' },
59
- type: { summary: '(event: Event) => void' },
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: '(event: Event) => void' },
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 `@change="${value}"`;
212
+ return `@${argType.name}="${value}"`;
212
213
  }
213
214
  }
214
215