tide-design-system 2.2.4 → 2.2.6

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 (83) hide show
  1. package/.storybook/main.ts +3 -1
  2. package/.storybook/preview.ts +4 -3
  3. package/README.md +35 -5
  4. package/dist/css/realm/rv.css +2 -2
  5. package/dist/css/utilities-lg.css +4 -11
  6. package/dist/css/utilities-md.css +4 -11
  7. package/dist/css/utilities-sm.css +4 -11
  8. package/dist/css/utilities-xl.css +300 -307
  9. package/dist/css/utilities.css +4 -11
  10. package/dist/style.css +1 -1
  11. package/dist/tide-design-system.cjs +2 -2
  12. package/dist/tide-design-system.esm.d.ts +23 -6
  13. package/dist/tide-design-system.esm.js +1591 -1592
  14. package/dist/utilities/storybook.ts +12 -0
  15. package/dist/utilities/viewport.ts +2 -1
  16. package/package.json +1 -1
  17. package/src/assets/css/realm/rv.css +2 -2
  18. package/src/assets/css/utilities-lg.css +4 -11
  19. package/src/assets/css/utilities-md.css +4 -11
  20. package/src/assets/css/utilities-sm.css +4 -11
  21. package/src/assets/css/utilities-xl.css +300 -307
  22. package/src/assets/css/utilities.css +4 -11
  23. package/src/components/TideAlert.vue +27 -33
  24. package/src/components/TideButton.vue +1 -1
  25. package/src/components/TideButtonIcon.vue +1 -1
  26. package/src/components/TideButtonPagination.vue +1 -1
  27. package/src/components/TideChipAction.vue +1 -1
  28. package/src/components/TideLink.vue +10 -1
  29. package/src/components/TideModal.vue +1 -1
  30. package/src/components/TideSeoLinks.vue +1 -1
  31. package/src/docs/development.md +125 -18
  32. package/src/docs/figma.md +43 -0
  33. package/src/docs/integration-full.md +80 -0
  34. package/src/docs/integration-partial.md +42 -0
  35. package/src/docs/migration.md +65 -0
  36. package/src/docs/storybook.md +29 -24
  37. package/src/docs/style-guide.md +22 -0
  38. package/src/docs/workflows.md +20 -0
  39. package/src/stories/FoundationsBorder.stories.ts +1 -1
  40. package/src/stories/FoundationsColor.stories.ts +1 -1
  41. package/src/stories/FoundationsGap.stories.ts +1 -1
  42. package/src/stories/FoundationsGrid.stories.ts +1 -1
  43. package/src/stories/FoundationsMargin.stories.ts +1 -1
  44. package/src/stories/FoundationsPadding.stories.ts +1 -1
  45. package/src/stories/FoundationsShadow.stories.ts +1 -1
  46. package/src/stories/FoundationsTransparency.stories.ts +1 -1
  47. package/src/stories/FoundationsTypography.stories.ts +1 -1
  48. package/src/stories/TideAccordionItem.stories.ts +1 -1
  49. package/src/stories/TideAlert.stories.ts +47 -3
  50. package/src/stories/TideBadge.stories.ts +1 -1
  51. package/src/stories/TideBadgeTrustedPartner.stories.ts +1 -1
  52. package/src/stories/TideBadgeVerifiedVehicle.stories.ts +1 -1
  53. package/src/stories/TideBreadCrumbs.stories.ts +1 -1
  54. package/src/stories/TideButton.stories.ts +1 -1
  55. package/src/stories/TideButtonIcon.stories.ts +1 -1
  56. package/src/stories/TideButtonPagination.stories.ts +1 -1
  57. package/src/stories/TideButtonSegmented.stories.ts +1 -1
  58. package/src/stories/TideCard.stories.ts +1 -1
  59. package/src/stories/TideCarousel.stories.ts +1 -1
  60. package/src/stories/TideChipAction.stories.ts +1 -1
  61. package/src/stories/TideChipFilter.stories.ts +1 -1
  62. package/src/stories/TideChipInput.stories.ts +1 -1
  63. package/src/stories/TideColumns.stories.ts +1 -1
  64. package/src/stories/TideDivider.stories.ts +1 -1
  65. package/src/stories/TideIcon.stories.ts +1 -1
  66. package/src/stories/TideImage.stories.ts +1 -1
  67. package/src/stories/TideImageBackground.stories.ts +1 -1
  68. package/src/stories/TideIndicator.stories.ts +1 -1
  69. package/src/stories/TideInputCheckbox.stories.ts +1 -1
  70. package/src/stories/TideInputRadio.stories.ts +1 -1
  71. package/src/stories/TideInputSelect.stories.ts +1 -1
  72. package/src/stories/TideInputText.stories.ts +1 -1
  73. package/src/stories/TideInputTextarea.stories.ts +1 -1
  74. package/src/stories/TideLink.stories.ts +8 -2
  75. package/src/stories/TideModal.stories.ts +1 -1
  76. package/src/stories/TidePagination.stories.ts +1 -1
  77. package/src/stories/TidePopover.stories.ts +1 -1
  78. package/src/stories/TideSeoLinks.stories.ts +1 -1
  79. package/src/stories/TideSwitch.stories.ts +1 -1
  80. package/src/types/Styles.ts +8 -202
  81. package/src/utilities/storybook.ts +12 -0
  82. package/src/utilities/viewport.ts +2 -1
  83. package/src/docs/integration.md +0 -79
@@ -369,17 +369,10 @@
369
369
  .tide-text-transform-none {text-transform: none;}
370
370
  .tide-text-transform-upper {text-transform: uppercase;}
371
371
 
372
- .tide-underline,
373
- .tide-underline:hover,
374
- .tide-underline-hover:hover {
375
- text-decoration: underline;
376
- }
377
-
378
- .tide-underline-none,
379
- .tide-underline-none:hover,
380
- .tide-underline-hover {
381
- text-decoration: none;
382
- }
372
+ .tide-underline {text-decoration: underline;}
373
+ .tide-underline-none {text-decoration: none;}
374
+ .tide-underline-hover:hover {text-decoration: underline;}
375
+ .tide-underline-hover-none:hover {text-decoration: none;}
383
376
 
384
377
  .tide-visible {visibility: visible;}
385
378
  .tide-visible-none {visibility: hidden;}
@@ -1,49 +1,33 @@
1
1
  <script lang="ts" setup>
2
- import { computed } from 'vue';
3
-
4
2
  import TideButtonIcon from '@/components/TideButtonIcon.vue';
5
3
  import TideIcon from '@/components/TideIcon.vue';
6
4
  import { ALERT } from '@/types/Alert';
7
5
  import { ICON } from '@/types/Icon';
8
6
  import { PRIORITY } from '@/types/Priority';
7
+ import { SIZE } from '@/types/Size';
9
8
  import { CSS } from '@/types/Styles';
10
9
 
11
10
  import type { Alert } from '@/types/Alert';
12
- import type { Icon } from '@/types/Icon';
13
11
 
14
12
  type Props = {
15
13
  heading?: string;
14
+ isDismissible?: boolean;
16
15
  isToast?: boolean;
17
16
  type?: Alert;
18
17
  };
19
18
 
19
+ type Emits = {
20
+ (event: 'close'): void;
21
+ };
22
+
20
23
  const props = withDefaults(defineProps<Props>(), {
21
24
  heading: undefined,
25
+ isDismissible: true,
22
26
  isToast: false,
23
27
  type: ALERT.INFO,
24
28
  });
25
29
 
26
- const icon = computed(() => {
27
- let icon: Icon = ICON.INFO;
28
-
29
- switch (props.type) {
30
- case ALERT.ERROR:
31
- icon = ICON.ERROR;
32
- break;
33
- default:
34
- case ALERT.INFO:
35
- icon = ICON.INFO;
36
- break;
37
- case ALERT.SUCCESS:
38
- icon = ICON.CHECK;
39
- break;
40
- case ALERT.WARNING:
41
- icon = ICON.WARNING;
42
- break;
43
- }
44
-
45
- return icon;
46
- });
30
+ const emit = defineEmits<Emits>();
47
31
  </script>
48
32
 
49
33
  <template>
@@ -55,17 +39,21 @@
55
39
  CSS.AXIS2.CENTER,
56
40
  CSS.BORDER.RADIUS.HALF,
57
41
  CSS.PADDING.FULL.ONE,
58
- props.type === ALERT.ERROR && CSS.BG.GLOBAL.SURFACE.ERROR,
59
- props.type === ALERT.INFO && CSS.BG.GLOBAL.SURFACE.INFO,
60
- props.type === ALERT.SUCCESS && CSS.BG.GLOBAL.SURFACE.SUCCESS,
61
- props.type === ALERT.WARNING && CSS.BG.GLOBAL.SURFACE.WARNING,
62
- props.isToast ? CSS.SHADOW.BOTTOM : '',
42
+ !props.isToast && props.type === ALERT.ERROR ? [CSS.BG.GLOBAL.SURFACE.ERROR, CSS.BORDER.COLOR.GLOBAL.ERROR] : '',
43
+ !props.isToast && props.type === ALERT.INFO ? [CSS.BG.GLOBAL.SURFACE.INFO, CSS.BORDER.COLOR.GLOBAL.INFO] : '',
44
+ !props.isToast && props.type === ALERT.SUCCESS
45
+ ? [CSS.BG.GLOBAL.SURFACE.SUCCESS, CSS.BORDER.COLOR.GLOBAL.SUCCESS]
46
+ : '',
47
+ !props.isToast && props.type === ALERT.WARNING
48
+ ? [CSS.BG.GLOBAL.SURFACE.WARNING, CSS.BORDER.COLOR.GLOBAL.WARNING]
49
+ : '',
50
+ props.isToast ? [CSS.BG.SECONDARY, CSS.FONT.COLOR.SECONDARY, CSS.SHADOW.BOTTOM] : CSS.BORDER.LEFT.TWO,
63
51
  ]"
64
52
  >
65
53
  <div
66
54
  :class="[
67
55
  'tide-alert-icon',
68
- CSS.PADDING.FULL.HALF,
56
+ CSS.PADDING.FULL.QUARTER,
69
57
  CSS.BORDER.RADIUS.FULL,
70
58
  CSS.FONT.COLOR.SURFACE.INVERSE,
71
59
  props.type === ALERT.ERROR && CSS.BG.GLOBAL.PRIMARY.ERROR,
@@ -73,12 +61,16 @@
73
61
  props.type === ALERT.SUCCESS && CSS.BG.GLOBAL.PRIMARY.SUCCESS,
74
62
  props.type === ALERT.WARNING && CSS.BG.GLOBAL.PRIMARY.WARNING,
75
63
  ]"
64
+ v-if="!props.isToast"
76
65
  >
77
- <TideIcon :icon="icon" />
66
+ <TideIcon
67
+ :icon="ICON.INFORMATION"
68
+ :size="SIZE.SMALL"
69
+ />
78
70
  </div>
79
71
 
80
72
  <div :class="['tide-alert-heading', CSS.DISPLAY.FLEX, CSS.AXIS2.CENTER]">
81
- <h2 :class="[CSS.FONT.ROLE.LABEL_1_SEMIBOLD, CSS.FONT.COLOR.SURFACE.DEFAULT]">
73
+ <h2 :class="[CSS.FONT.ROLE.LABEL_1_SEMIBOLD]">
82
74
  {{ props.heading }}
83
75
  </h2>
84
76
  </div>
@@ -87,10 +79,12 @@
87
79
  :class="['tide-alert-close', CSS.AXIS2.CENTER, CSS.FONT.COLOR.SURFACE.DEFAULT]"
88
80
  :icon="ICON.CLOSE"
89
81
  :priority="PRIORITY.QUATERNARY"
82
+ @click="emit('close')"
90
83
  aria-label="Close alert"
84
+ v-if="isDismissible"
91
85
  />
92
86
 
93
- <div :class="['tide-alert-body', CSS.FONT.ROLE.LABEL_1, CSS.FONT.COLOR.SURFACE.VARIANT]">
87
+ <div :class="['tide-alert-body', CSS.FONT.ROLE.LABEL_1, !props.isToast && CSS.FONT.COLOR.SURFACE.VARIANT]">
94
88
  <slot />
95
89
  </div>
96
90
  </div>
@@ -42,7 +42,7 @@
42
42
  'tide-button',
43
43
  props.priority && `tide-button-${props.priority}`,
44
44
  props.element === ELEMENT.LINK ? [CSS.DISPLAY.INLINE_FLEX] : [CSS.DISPLAY.FLEX],
45
- props.element === ELEMENT.LINK ? CSS.UNDERLINE.OFF : '',
45
+ props.element === ELEMENT.LINK ? CSS.UNDERLINE.REST.OFF : '',
46
46
  size === SIZE_BUTTON.SMALL && [CSS.FONT.ROLE.BUTTON_2, CSS.PADDING.X.ONE, CSS.PADDING.Y.HALF],
47
47
  size === SIZE_BUTTON.LARGE && [CSS.FONT.ROLE.BUTTON_1, CSS.PADDING.X.TWO, CSS.PADDING.Y.ONE],
48
48
  CSS.AXIS1.CENTER,
@@ -36,7 +36,7 @@
36
36
  props.element === ELEMENT.LINK ? 'tide-link-as-button-icon' : 'tide-button-icon',
37
37
  props.priority && `tide-button-${props.priority}`,
38
38
  [CSS.DISPLAY.FLEX, CSS.AXIS1.CENTER, CSS.AXIS2.CENTER, CSS.BORDER.RADIUS.FULL, CSS.PADDING.FULL.HALF],
39
- props.element === ELEMENT.LINK ? [CSS.UNDERLINE.OFF] : '',
39
+ props.element === ELEMENT.LINK ? [CSS.UNDERLINE.REST.OFF] : '',
40
40
  ]"
41
41
  :disabled="props.element === ELEMENT.BUTTON && props.disabled"
42
42
  :href="props.element === ELEMENT.LINK && props.href ? props.href : undefined"
@@ -24,7 +24,7 @@
24
24
  :class="[
25
25
  props.element === ELEMENT_TEXT_AS_ICON.LINK ? 'tide-link-as-button-icon' : 'tide-button-icon',
26
26
  [CSS.DISPLAY.INLINE_BLOCK, CSS.BORDER.RADIUS.FULL, CSS.PADDING.FULL.HALF],
27
- props.element === ELEMENT_TEXT_AS_ICON.LINK ? [CSS.UNDERLINE.OFF] : '',
27
+ props.element === ELEMENT_TEXT_AS_ICON.LINK ? [CSS.UNDERLINE.REST.OFF] : '',
28
28
  props.element === ELEMENT_TEXT_AS_ICON.DIV ? [CSS.CURSOR.POINTER] : '',
29
29
  [CSS.FONT.ROLE.HEADLINE_3],
30
30
  ]"
@@ -29,7 +29,7 @@
29
29
  CSS.BG.SURFACE.DEFAULT,
30
30
  CSS.FONT.ROLE.LINK_2,
31
31
  CSS.FONT.COLOR.SURFACE.DEFAULT,
32
- CSS.UNDERLINE.OFF,
32
+ CSS.UNDERLINE.REST.OFF,
33
33
  ]"
34
34
  :href="props.href"
35
35
  :target="props.isNewTab ? TARGET.BLANK : TARGET.SELF"
@@ -14,6 +14,7 @@
14
14
  iconTrailing?: Icon;
15
15
  isNewTab?: boolean;
16
16
  label: string;
17
+ subtle?: boolean;
17
18
  };
18
19
 
19
20
  const props = withDefaults(defineProps<Props>(), {
@@ -23,12 +24,20 @@
23
24
  iconTrailing: undefined,
24
25
  isNewTab: false,
25
26
  label: undefined,
27
+ subtle: false,
26
28
  });
27
29
  </script>
28
30
 
29
31
  <template>
30
32
  <component
31
- :class="['tide-link', CSS.DISPLAY.INLINE, CSS.UNDERLINE.ON, CSS.ALIGN.X.LEFT]"
33
+ :class="[
34
+ 'tide-link',
35
+ CSS.DISPLAY.INLINE,
36
+ CSS.ALIGN.X.LEFT,
37
+ subtle
38
+ ? [CSS.FONT.WEIGHT.FOUR_HUNDRED, CSS.UNDERLINE.REST.OFF, CSS.UNDERLINE.HOVER.ON]
39
+ : [CSS.FONT.WEIGHT.FIVE_HUNDRED, CSS.UNDERLINE.REST.ON, CSS.UNDERLINE.HOVER.OFF],
40
+ ]"
32
41
  :href="props.href"
33
42
  :target="props.isNewTab ? TARGET.BLANK : TARGET.SELF"
34
43
  :is="props.element === ELEMENT.LINK ? ELEMENT.LINK : ELEMENT.BUTTON"
@@ -76,7 +76,7 @@
76
76
  :class="['tide-modal', CSS.BG.INITIAL, CSS.HEIGHT.FULL, CSS.WIDTH.FULL, CSS.OVERFLOW.XY.HIDDEN]"
77
77
  ref="modalDialog"
78
78
  :style="{ '--modal-width': props.width }"
79
- @click.self="emit('close')"
79
+ @click.self="triggerNativeDialogClose"
80
80
  @close="emit('close')"
81
81
  >
82
82
  <div
@@ -27,7 +27,7 @@
27
27
  v-for="link in props.links"
28
28
  >
29
29
  <a
30
- :class="[CSS.UNDERLINE.OFF]"
30
+ :class="[CSS.UNDERLINE.REST.OFF]"
31
31
  :href="link.url"
32
32
  :target="link.isNewTab ? TARGET.BLANK : TARGET.SELF"
33
33
  >
@@ -1,7 +1,6 @@
1
1
  # TIDE Development
2
2
 
3
- ## Local Integration
4
- Run a local instance of `tide-design-system` in parallel with a local consumer project to preview changes prior to publishing a revision to the NPM Registrty.
3
+ ## Setup
5
4
 
6
5
  1. Clone repository:
7
6
 
@@ -17,35 +16,143 @@ Run a local instance of `tide-design-system` in parallel with a local consumer p
17
16
 
18
17
  `npm build`
19
18
 
20
- 4. From TIDE directory, create local package alias:
21
-
22
- `npm link`
23
-
24
- 5. From consumer directory. leverage local package alias:
25
-
26
- `npm link tide-design-system`
27
-
28
19
  ## Scripts
29
20
  - `npm run build`: Generate package.
30
21
  - `npm run build-storybook`: Generate Storybook UI.
31
22
  - `npm run coverage`: Display unit test statistics.
32
- - `npm run lint`: Display ESLint issues.
23
+ - `npm run lint`: Detect ESLint issues.
33
24
  - `npm run lint:fix`: Autofix ESLint issues where available.
25
+ - `npm run precommit`: Run all linting, type-checking, and testing commands.
34
26
  - `npm run preview`: Serve Storybook UI in production mode.
35
27
  - `npm run storybook`: Serve Storybook UI in development mode.
36
28
  - `npm run test`: Run unit test suite.
37
29
  - `npm run type-check`: Detect TypeScript errors.
38
30
 
39
- ## Publication (TIDE Task Force devs only)
40
- 1. Test via local integration (see above)
41
- 2. Increment version
31
+ ## Workflow
32
+
33
+ 1. Develop the indicated TIDE structures in the TIDE repository as normal.
34
+ - `src/components/TideSample.vue`
35
+ - `src/types/Sample.ts`
36
+ - `src/utilities/sample.ts`
37
+ 2. Thoroughly test the solution:
38
+ 1. Via Storybook (Required):
39
+ 1. Develop the relevant Storybook story:
40
+
41
+ - `src/stories/TideSample.stories.ts`
42
+ 2. Serve the Storybook interface locally:
43
+
44
+ `npm run storybook`
45
+
46
+ 3. Thoroughly test all arg selections both in isolation and in combination and verify that both the Canvas and the Code Snippet accurately reflect the correct implementation.
47
+ 2. Via Sandbox App
48
+
49
+ Apart from locally serving the TIDE Storybook interface, you can also develop a local, temporary proof-of-concept that instantiates the structure under development, then serve the project locally to verify.
50
+
51
+ 1. Open the top-level Sandbox App component:
52
+
53
+ `src/contexts/sandbox/AppSandbox.vue`
54
+ 2. Explicitly import the local structures (unlike importing from external dependency):
55
+
56
+ `import TideSample from '@/components/TideSample.vue';`
57
+ 3. Instantiate the structures:
58
+
59
+ `<TideSample />`
60
+ 4. Serve the Sandbox App locally:
61
+
62
+ `npm run dev`
63
+ 3. Via NPM Link
64
+ 1. From the local instance of TIDE repository, create local package alias:
65
+
66
+ `npm link`
67
+ 2. From the local instance of the consumer repository, leverage local package alias:
68
+
69
+ `npm link tide-design-system`
70
+ 3. Run the local instance of `tide-design-system`.
71
+ 4. Run the local instance of the consumer repository.
72
+ 5. Visit the local instance of the consumer repository in the browser as normal. All structures imported from the `tide-design-system` dependency will now reflect the local instance.
73
+ 4. Via Unit Tests (Strongly encouraged).
74
+ 1. Develop relevant unit tests:
75
+ - `tests/tide-sample.spec.ts`
76
+ - `tests/utilities-sample.spec.ts`
77
+ 2. Run all unit tests:
78
+
79
+ `npm run test`
80
+
81
+ 1. Verify that all tests passed.
82
+ 2. Verify that no tests were skipped.
83
+ 3. Verify that there were no errors.
84
+ 3. Check test coverage:
85
+
86
+ `npm run coverage`
87
+ 3. Open a GitHub pull request from the ticket branch to the `main` branch of the TIDE repository.
88
+ 1. All TIDE repository pull requests require one approval from a TIDE repository admin.
89
+ 2. Once approved, a TIDE repository admin will merge the pull request, assign it a milestone, and update the status of the relevant Jira ticket to `Merged`, then reassign it to themselves pending publication.
90
+
91
+ ## Publication (TIDE Tech Lead only)
92
+ 1. Test via local integration (see above).
93
+ 2. Determine new version via custom semantic versioning rules:
94
+
95
+ 1. `#` Redesign/rebranding release (RESTRICTED)
96
+ 2. `#.#` Non-backward compatible bugfix or feature
97
+ 3. `#.#.#` Backward compatible bugfix or feature
98
+
99
+ - Numerical pattern will be used for configuration: `#.#.#`
100
+ - Alphanumeric pattern will be used for naming: `v#.#.#`
101
+ 3. Check out the current commit from the trunk:
42
102
 
43
- \# Non-backward compatible release
103
+ `git checkout upstream/main`
44
104
 
45
- #.# Backward compatible feature
105
+ 4. Create a new local branch based on the alphanumeric version:
46
106
 
47
- #.#.# Backward compatible bugfix
107
+ `git checkout -b v#.#.#`
108
+
109
+ 5. Manually update the `version` property in `package.json` to reflect the numeric version.
110
+ 6. Update `package-lock.json` in parallel:
111
+
112
+ `npm install`
113
+
114
+ 7. Verify that only the 2 files mentioned above have been modified:
115
+
116
+ `git status`
117
+
118
+ 8. Verify that the diffset is correct:
119
+
120
+ `git diff`
121
+
122
+ 9. Verify that all linting, type-checks, and unit tests pass:
123
+
124
+ `npm run precommit`
125
+
126
+ 10. Stage all local changes for commit:
127
+
128
+ `git add .`
129
+
130
+ 11. Commit the staged changes with a message matching the standard release message format:
131
+
132
+ `npm commit -m 'Release v#.#.#'`
133
+
134
+ 12. Push the branch to the `traderinteractive/tide-design-system` repository:
135
+
136
+ `git push upstream v#.#.#`
137
+
138
+ 13. Open a [pull request](https://github.com/traderinteractive/tide-design-system/compare) in GitHub from the release branch to the `main` branch.
139
+ 14. Create a [milestone](https://github.com/traderinteractive/tide-design-system/milestones) in GitHub based on the alphanumeric version.
140
+ 1. Assign milestone to the pull request for the release.
141
+ 2. Assign milestone to all merged pull requests since previous release.
142
+ 15. Merge the pull request.
143
+ 1. Source branch will be removed from Github automatically.
144
+ 16. From local TIDE clone, check out the new commit from the trunk:
145
+
146
+ `npm checkout upstream/main`
147
+
148
+ 17. Deploy to Netlify:
149
+
150
+ `git push origin main`
151
+
152
+ 18. Generate distribution files:
153
+
154
+ `npm build`
48
155
 
49
- 3. Publish (RESTRICTED)
156
+ 19. Publish (RESTRICTED)
50
157
 
51
158
  `npm publish`
@@ -0,0 +1,43 @@
1
+ # TIDE Figma
2
+
3
+ ## Workflow
4
+
5
+ All Jira tickets with frontend changes should adhere to the following process:
6
+
7
+ 1. The designer should make a branch from the current state of the Figma project and make the necessary modifications leveraging the existing tokens and components wherever possible.
8
+ 2. Prior to development, the Figma branch should be reviewed, approved, and merged by the TIDE team in conjunction with the Director of Product Design.
9
+ 3. The "Designer" field of the Jira ticket should indicate the design resource assigned to the task. The designer is an equal contributor to the product triad and should be involved in all conversations about evolving frontend requirements.
10
+ 4. The URL for the relevant portion(s) of the Figma mock should be provided in the Jira ticket description.
11
+
12
+ ## How to read the Figma
13
+
14
+ 1. If correctly implemented, Figma designs should reflect standard tokens and components that correspond to code structures that can be leveraged to implement the design quickly and easily in code.
15
+ 1. [Foundations](https://www.figma.com/design/9oYSAyY2X9mPaUMiobZOPg/Design-System---TIDE-2.0?node-id=3-3118&p=f&m=dev) should correspond to CSS utilities in the TIDE repository.
16
+ 2. [Basic Components](https://www.figma.com/design/9oYSAyY2X9mPaUMiobZOPg/Design-System---TIDE-2.0?node-id=4-3140&p=f&m=dev) should correspond to Vue 3 components in the TIDE repository.
17
+ 3. [Complex Components](https://www.figma.com/design/9oYSAyY2X9mPaUMiobZOPg/Design-System---TIDE-2.0?node-id=8-14&p=f&m=dev) should correspond to Vue 3 components that leverage TIDE components to build custom features within a consumer repository.
18
+ 2. If designs deviate from the documented TIDE standards, the developer should consult with the leadership triad of their product team to maximize consistency and resuability, then resubmit for TIDE review.
19
+
20
+ ## Links
21
+ - [TIDE 1.0](https://www.figma.com/design/PFLodBQswv35AvYNEK0rv1/TIDE-1.0?node-id=401-3973&p=f&m=dev) (deprecated)
22
+ - [TIDE 2.0](https://www.figma.com/design/9oYSAyY2X9mPaUMiobZOPg/Design-System---TIDE-2.0?node-id=0-1&p=f&m=dev)
23
+ - [Interactions](https://www.figma.com/design/O0HapROvypnCHahGDMyoJq/Interactions---TIDE-2.0?node-id=0-1&p=f&m=dev)
24
+ - Realm Libraries (color palette, etc.)
25
+ - [Aero](https://www.figma.com/design/UHmUU8P3FCfREv4SdOWt8L/Aero-Trader-Library---Web?node-id=1-216&p=f&m=dev)
26
+ - [ATV](https://www.figma.com/design/J5uusYhIq1GKrKpaUh4uGC/ATV-Trader-Library---Web?node-id=91-22&m=dev)
27
+ - [Boatmart](https://www.figma.com/design/hZ6xlyXOSJQdUmZ1WOdjUa/Boatmart-Library---Web?node-id=2-9&p=f&m=dev)
28
+ - [Cycle](https://www.figma.com/design/tPHRaoCkP3MS0C6q4K0XuQ/Equipment-Trader-Library---Web?node-id=0-1&p=f&m=dev)
29
+ - [Equipment](https://www.figma.com/design/tPHRaoCkP3MS0C6q4K0XuQ/Equipment-Trader-Library---Web?node-id=0-1&p=f&m=dev)
30
+ - [PWC](https://www.figma.com/design/4BoMdEBqLTAVx0IOWDCpBT/PWC-Trader-Library---Web?node-id=0-1&p=f&m=dev)
31
+ - [RV](https://www.figma.com/design/LSJpTgYLwsXW96ZmUGDVHB/RV-Trader-Library---Web?node-id=2-9&p=f&m=dev)
32
+ - [Snow](https://www.figma.com/design/SxVJ74VAErFuBRHc6e7iTm/Snowmobile-Trader-Library---Web)
33
+ - [Truck](https://www.figma.com/design/kcmuhXLGfFelG7gj3ebQoT/Commercial-Truck-Trader-Library---Web?node-id=0-1&p=f&m=dev)
34
+ - Realm mocks
35
+ - [Aero](https://www.figma.com/files/1343962252732090517/project/251440029/Aero-Trader?fuid=1208507152973260209)
36
+ - [ATV](https://www.figma.com/design/rt84qhxyzEMvLGovmNTZQK/ATV-Trader?node-id=0-1&p=f&m=dev)
37
+ - [Boatmart](https://www.figma.com/design/zwzKQtnJwfQAeUllHAn5jx/Boatmart-Redesign---TIDE-2.0?node-id=0-1&p=f&m=dev)
38
+ - [Cycle](https://www.figma.com/design/x7mySD8gH42Go6hASy2ul9/Cycle-Trader?node-id=0-1&p=f&m=dev)
39
+ - [Equipment](https://www.figma.com/design/McrrkfAtqY1BxKLcAsjBGa/Equipment-Trader?node-id=0-1&p=f&m=dev)
40
+ - [PWC](https://www.figma.com/design/KTxisNAv9E6UbkFXxP8gNx/PWC-PAA?node-id=29-929&p=f&m=dev)
41
+ - [RV](https://www.figma.com/design/MBAdyd0UBIRL75bxvgOBF8/RV-Trader?node-id=0-1&p=f&m=dev)
42
+ - [Snow](https://www.figma.com/design/l6xlDEnyREuK9uCBonwDVY/Snowmobile-Trader-PAA?node-id=25-944&p=f&m=dev)
43
+ - [Truck](https://www.figma.com/design/1daIdHURI0GkMjbEEjdurO/Commercial-Truck-Trader?node-id=0-1&p=f&m=dev)
@@ -0,0 +1,80 @@
1
+ # TIDE Full Integration
2
+ 1. Install dependency from NPM registry:
3
+
4
+ `npm install tide-design-system`
5
+
6
+ 2. Use CSS utilities:
7
+ 1. Import global utilities:
8
+
9
+ `import 'tide-design-system/css';`
10
+
11
+ 2. Import realm-specific utilities (where applicable):
12
+ - `import 'tide-design-system/css/realm/aero';`
13
+ - `import 'tide-design-system/css/realm/atv';`
14
+ - `import 'tide-design-system/css/realm/boatmart';`
15
+ - `import 'tide-design-system/css/realm/cycle';`
16
+ - `import 'tide-design-system/css/realm/equipment';`
17
+ - `import 'tide-design-system/css/realm/pwc';`
18
+ - `import 'tide-design-system/css/realm/snow';`
19
+ - `import 'tide-design-system/css/realm/truck';`
20
+
21
+ 3. Import TypeScript CSS constant:
22
+
23
+ `import { CSS } from 'tide-design-system';`
24
+
25
+ 4. Leverage CSS utilities via TypeScript CSS constant:
26
+
27
+ `<div :class="[CSS.POSITION.ABSOLUTE]" />`
28
+
29
+ 5. Leverage *responsive* CSS utilities via TypeScript constant:
30
+ ```
31
+ <div
32
+ :class=[
33
+ CSS.MARGIN.FULL.QUARTER,
34
+ CSS.withBreakpoint([CSS.MARGIN.FULL.HALF], BREAKPOINT.SM),
35
+ CSS.withBreakpoint([CSS.MARGIN.FULL.ONE], BREAKPOINT.MD),
36
+ CSS.withBreakpoint([CSS.MARGIN.FULL.TWO], BREAKPOINT.LG),
37
+ CSS.withBreakpoint([CSS.MARGIN.FULL.FOUR], BREAKPOINT.XL),
38
+ ]
39
+ />
40
+ ```
41
+
42
+ 3. Use TypeScript types:
43
+ 1. Import:
44
+
45
+ `import type { Priority } from 'tide-design-system';`
46
+
47
+ 2. Leverage:
48
+
49
+ ```
50
+ type Sample = {
51
+ ...
52
+ priority: Priority;
53
+ };
54
+ ```
55
+
56
+ ```
57
+ const setPriority = (priority: Priority) => {...};
58
+ ```
59
+
60
+ 4. Use TypeScript constants:
61
+ 1. Import:
62
+
63
+ `import { PRIORITY } from 'tide-design-system';`
64
+
65
+ 2. Leverage:
66
+
67
+ `<div :priority="PRIORITY.QUATERNARY">Sample</div>`
68
+
69
+ 5. Use Vue 3 components:
70
+ 1. Import:
71
+
72
+ `import { TideButton } from 'tide-design-system';`
73
+
74
+ 2. Leverage:
75
+
76
+ `<TideButton label="Sample" />`
77
+
78
+ 6. Storybook
79
+
80
+ Working implementations of TIDE utilities and components can be dynamically-generated from the publicly-served [Storybook](https://tide-design-system.netlify.app) interface layer of the TIDE repository. See [Using Storybook](./src/docs/storybook.md#using-storybook) for details.
@@ -0,0 +1,42 @@
1
+ # TIDE Partial Integration
2
+ 1. Install dependency from NPM registry:
3
+
4
+ `npm install tide-design-system`
5
+
6
+ 2. Use CSS utilities:
7
+ 1. Import global utilities one of two ways:
8
+ 1. All inclusive:
9
+
10
+ `import 'node_modules/tide-design-system/dist/css/main.css';`
11
+
12
+ 2. Cherry-picked:
13
+ - `import 'node_modules/tide-design-system/dist/css/main.css';`
14
+ - `import 'node_modules/tide-design-system/dist/css/fonts.css';`
15
+ - `import 'node_modules/tide-design-system/dist/css/reset.css';`
16
+ - `import 'node_modules/tide-design-system/dist/css/variables.css';`
17
+ - `import 'node_modules/tide-design-system/dist/css/utilities.css';`
18
+ - `import 'node_modules/tide-design-system/dist/css/utilities-sm.css';`
19
+ - `import 'node_modules/tide-design-system/dist/css/utilities-md.css';`
20
+ - `import 'node_modules/tide-design-system/dist/css/utilities-lg.css';`
21
+ - `import 'node_modules/tide-design-system/dist/css/utilities-xl.css';`
22
+ - `import 'node_modules/tide-design-system/dist/css/dynamic-buttons.css';`
23
+ - `import 'node_modules/tide-design-system/dist/css/dynamic-utilities.css';`
24
+ - `import 'node_modules/tide-design-system/dist/css/grid-layout.css';`
25
+ 2. Import realm-specific utilities (where applicable):
26
+ - `import 'node_modules/tide-design-system/dist/css/realm/aero.css';`
27
+ - `import 'node_modules/tide-design-system/dist/css/realm/atv.css';`
28
+ - `import 'node_modules/tide-design-system/dist/css/realm/boatmart.css';`
29
+ - `import 'node_modules/tide-design-system/dist/css/realm/cycle.css';`
30
+ - `import 'node_modules/tide-design-system/dist/css/realm/equipment.css';`
31
+ - `import 'node_modules/tide-design-system/dist/css/realm/pwc.css';`
32
+ - `import 'node_modules/tide-design-system/dist/css/realm/snow.css';`
33
+ - `import 'node_modules/tide-design-system/dist/css/realm/truck.css';`
34
+
35
+ 3. Leverage CSS utiities:
36
+
37
+ `<div class="tide-position-absolute" />`
38
+
39
+ 4. Leverage responsive CSS utilities:
40
+
41
+ `<div class="tide-position-relative md-tide-position-absolute" />`
42
+ 3. Working implementations of TIDE utilities can be dynamically-generated from the publicly-served [Storybook](https://tide-design-system.netlify.app) interface layer of the TIDE repository. See [Utilities](./src/docs/storybook.md#utilities) under [Using Storybook](./src/docs/storybook.md#using-storybook) for details.
@@ -0,0 +1,65 @@
1
+ # TIDE Migration
2
+ The first implementation of the TIDE Design System was developed directly within the `marketplace` repository in parallel with a comprehensive redesign/rebuild of the entire frontend of the 3-page core site (Homepage, Search Results Page, Vehicle Detail Page). When TIDE matured into TIDE 2.0 and was reinvisioned as an NPM package many months later, it was decided that development would continue on redesign/rebuild without a specific effort to replace the initial implementation to the modernized approach. As such, these migrations are being undertaken piecemeal as developer availability permits.
3
+
4
+ ## Goals
5
+ 1. All frontend structures within the `marketplace` repository that implement TIDE utilities, components, or supporting structures will, over time, be moved, adapted, or recreated in the TIDE repository.
6
+ 2. Structures to be migrated:
7
+ 1. Vue 3 components
8
+ 2. TypeScript types
9
+ 3. JavaScript/TypeScript utilities
10
+ 4. CSS utilities
11
+ 5. Unit tests
12
+
13
+ ## Workflow
14
+ As TIDE structures become available in the TIDE repository, the TIDE team will work to identify redundant structures within the `marketplace` repository, create tickets detailing the work to reimplement these structures, and work with the relevant product teams to determine priority and ownership of these tasks.
15
+
16
+ 1. Update imports:
17
+
18
+ ❌ TIDE 1.0
19
+ ```
20
+ import BasicSample from '@/components-core/BasicSample.vue';
21
+ import { SAMPLE } from '@/types/Sample';
22
+ import { getSample } from '@/utilities/sample';
23
+
24
+ import type { Sample } from '@/types/Sample';
25
+ ```
26
+
27
+ ✅ TIDE 2.0
28
+ ```
29
+ import {
30
+ BasicSample,
31
+ SAMPLE,
32
+ getSample,
33
+ } from 'tide-design-system';
34
+
35
+ import type { Sample } from 'tide-design-system';
36
+ ```
37
+ 2. Update all instances of component(s) under migration:
38
+
39
+ **Note**: TIDE 2.0 props, slots, emits, and other structures may not correspond 1:1 with their TIDE 1.0 counterparts. See [Storybook](https://tide-design-system.netlify.app/) for the proper implementation of a TIDE 2.0 utility or component.
40
+
41
+
42
+ ❌ TIDE 1.0
43
+ `<BasicSample />`
44
+
45
+ ✅ TIDE 2.0
46
+ `<TideSample />`
47
+ 3. Delete orphaned components:
48
+
49
+ `git rm frontend/src/components-core/BasicSample.vue`
50
+
51
+ 4. Delete orphaned types:
52
+
53
+ `git rm frontend/src/types/Sample.ts`
54
+
55
+ 5. Delete orphaned utilities:
56
+
57
+ `git rm frontend/src/utilities/sample.ts`
58
+
59
+ 6. Delete orphaned unit tests:
60
+ - `git rm frontend/tests/components/BasicSample.spec.ts`
61
+ - `git rm frontend/tests/BasicSample.spec.ts`
62
+ - `git rm frontend/tests/utilities-sample.spec.ts`
63
+
64
+ 7. Delete unused [JS constants](https://github.com/traderinteractive/marketplace/blob/qa/frontend/src/types/Styles.ts) (CSS_OLD)
65
+ 8. Delete unused [CSS utilities](https://github.com/traderinteractive/marketplace/blob/qa/frontend/src/assets/css/utilities.css)