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.
- package/.storybook/main.ts +3 -1
- package/.storybook/preview.ts +4 -3
- package/README.md +35 -5
- package/dist/css/realm/rv.css +2 -2
- package/dist/css/utilities-lg.css +4 -11
- package/dist/css/utilities-md.css +4 -11
- package/dist/css/utilities-sm.css +4 -11
- package/dist/css/utilities-xl.css +300 -307
- package/dist/css/utilities.css +4 -11
- package/dist/style.css +1 -1
- package/dist/tide-design-system.cjs +2 -2
- package/dist/tide-design-system.esm.d.ts +23 -6
- package/dist/tide-design-system.esm.js +1591 -1592
- package/dist/utilities/storybook.ts +12 -0
- package/dist/utilities/viewport.ts +2 -1
- package/package.json +1 -1
- package/src/assets/css/realm/rv.css +2 -2
- package/src/assets/css/utilities-lg.css +4 -11
- package/src/assets/css/utilities-md.css +4 -11
- package/src/assets/css/utilities-sm.css +4 -11
- package/src/assets/css/utilities-xl.css +300 -307
- package/src/assets/css/utilities.css +4 -11
- package/src/components/TideAlert.vue +27 -33
- package/src/components/TideButton.vue +1 -1
- package/src/components/TideButtonIcon.vue +1 -1
- package/src/components/TideButtonPagination.vue +1 -1
- package/src/components/TideChipAction.vue +1 -1
- package/src/components/TideLink.vue +10 -1
- package/src/components/TideModal.vue +1 -1
- package/src/components/TideSeoLinks.vue +1 -1
- package/src/docs/development.md +125 -18
- package/src/docs/figma.md +43 -0
- package/src/docs/integration-full.md +80 -0
- package/src/docs/integration-partial.md +42 -0
- package/src/docs/migration.md +65 -0
- package/src/docs/storybook.md +29 -24
- package/src/docs/style-guide.md +22 -0
- package/src/docs/workflows.md +20 -0
- package/src/stories/FoundationsBorder.stories.ts +1 -1
- package/src/stories/FoundationsColor.stories.ts +1 -1
- package/src/stories/FoundationsGap.stories.ts +1 -1
- package/src/stories/FoundationsGrid.stories.ts +1 -1
- package/src/stories/FoundationsMargin.stories.ts +1 -1
- package/src/stories/FoundationsPadding.stories.ts +1 -1
- package/src/stories/FoundationsShadow.stories.ts +1 -1
- package/src/stories/FoundationsTransparency.stories.ts +1 -1
- package/src/stories/FoundationsTypography.stories.ts +1 -1
- package/src/stories/TideAccordionItem.stories.ts +1 -1
- package/src/stories/TideAlert.stories.ts +47 -3
- package/src/stories/TideBadge.stories.ts +1 -1
- package/src/stories/TideBadgeTrustedPartner.stories.ts +1 -1
- package/src/stories/TideBadgeVerifiedVehicle.stories.ts +1 -1
- package/src/stories/TideBreadCrumbs.stories.ts +1 -1
- package/src/stories/TideButton.stories.ts +1 -1
- package/src/stories/TideButtonIcon.stories.ts +1 -1
- package/src/stories/TideButtonPagination.stories.ts +1 -1
- package/src/stories/TideButtonSegmented.stories.ts +1 -1
- package/src/stories/TideCard.stories.ts +1 -1
- package/src/stories/TideCarousel.stories.ts +1 -1
- package/src/stories/TideChipAction.stories.ts +1 -1
- package/src/stories/TideChipFilter.stories.ts +1 -1
- package/src/stories/TideChipInput.stories.ts +1 -1
- package/src/stories/TideColumns.stories.ts +1 -1
- package/src/stories/TideDivider.stories.ts +1 -1
- package/src/stories/TideIcon.stories.ts +1 -1
- package/src/stories/TideImage.stories.ts +1 -1
- package/src/stories/TideImageBackground.stories.ts +1 -1
- package/src/stories/TideIndicator.stories.ts +1 -1
- package/src/stories/TideInputCheckbox.stories.ts +1 -1
- package/src/stories/TideInputRadio.stories.ts +1 -1
- package/src/stories/TideInputSelect.stories.ts +1 -1
- package/src/stories/TideInputText.stories.ts +1 -1
- package/src/stories/TideInputTextarea.stories.ts +1 -1
- package/src/stories/TideLink.stories.ts +8 -2
- package/src/stories/TideModal.stories.ts +1 -1
- package/src/stories/TidePagination.stories.ts +1 -1
- package/src/stories/TidePopover.stories.ts +1 -1
- package/src/stories/TideSeoLinks.stories.ts +1 -1
- package/src/stories/TideSwitch.stories.ts +1 -1
- package/src/types/Styles.ts +8 -202
- package/src/utilities/storybook.ts +12 -0
- package/src/utilities/viewport.ts +2 -1
- package/src/docs/integration.md +0 -79
package/src/docs/storybook.md
CHANGED
|
@@ -1,26 +1,17 @@
|
|
|
1
1
|
# TIDE Storybook
|
|
2
|
-
|
|
3
|
-
Storybook is a frontend workshop for building, testing, and documenting UI components and styles in isolation.
|
|
2
|
+
[Storybook](https://tide-design-system.netlify.app) is a third-party frontend interface for providing dynamic, integrated documentation for custom UI components and styles in isolation.
|
|
4
3
|
|
|
5
4
|
## Benefits
|
|
5
|
+
The TIDE Storybook was implemented to facilitate collaboration between departments within the Trader Interactive development group:
|
|
6
|
+
- **Product Managers** can reference TIDE utilities and components when writing requirements for new pages and features.
|
|
7
|
+
- **Designers** can interact with TIDE utilities and components in real browser conditions independent from any specific business context.
|
|
8
|
+
- **Developers** can dynamically leverage components without having to become reacquinted with formatting standards, styling structures, or complex prop implementations.
|
|
9
|
+
- **QA Engineers** can compare changes under test to the intended design and behavior of TIDE structures absent the context of a consumer repository.
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
- **Designers** can interact with our components in real browser conditions independent from any specific context in our websites.
|
|
10
|
-
- **Engineers** can leverage our components without having to become reacquinted with formatting standards, styling structures, or complex prop implementations.
|
|
11
|
-
|
|
12
|
-
## TODO
|
|
13
|
-
- based in stories
|
|
14
|
-
- args -> props, etc.
|
|
15
|
-
|
|
16
|
-
## Public
|
|
17
|
-
|
|
18
|
-
The TIDE Storybook UI is currently hosted from Netlify, a free, third-party platform connected to the Trader developer's personal GitHub fork. This is a temporary measure, to be replaced by a permanent solution that integrates the private server deployment process into the `tide-design-system` repository of the `traderinteractive` GitHub account for hosting to users within the Trader VPN.
|
|
19
|
-
|
|
20
|
-
https://tide-design-system.netlify.app
|
|
11
|
+
## Hosting
|
|
12
|
+
TIDE Storybook is currently publicly hosted via Netlify, a free, third-party platform connected to a fork of the TIDE repository. This is a temporary measure, to be replaced by a permanent solution that integrates the private server deployment process directly into the `traderinteractive` GitHub account for hosting to users within the Trader VPN.
|
|
21
13
|
|
|
22
14
|
## Local Setup
|
|
23
|
-
|
|
24
15
|
1. Install dependencies:
|
|
25
16
|
|
|
26
17
|
`npm install`
|
|
@@ -30,10 +21,24 @@ https://tide-design-system.netlify.app
|
|
|
30
21
|
`npm run storybook`
|
|
31
22
|
|
|
32
23
|
## Storybook UI
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
24
|
+
1. **Sidebar** serves as table of contents along the left edge of the screen.
|
|
25
|
+
2. **Toolbar** offers project-level controls across the top of the screen.
|
|
26
|
+
3. **Canvas** contains an interactive demo.
|
|
27
|
+
4. **Code Snippet** displays live-updated markup implementation available to copy.
|
|
28
|
+
5. **Controls** determine the options passed into demo and code snippet.
|
|
29
|
+
6. **Stories** demonstrate all major features of a given structure.
|
|
30
|
+
|
|
31
|
+
## Using Storybook
|
|
32
|
+
### Utilities
|
|
33
|
+
1. Visit the [Storybook](https://tide-design-system.netlify.app) site.
|
|
34
|
+
2. Select the relevant utility from the Sidebar.
|
|
35
|
+
3. Use the Controls table to modify the options to reflect Jira requirements and/or Figma mock.
|
|
36
|
+
4. The Canvas panel is updated dynamically to reflect the options as implemented via the CSS utility classes.
|
|
37
|
+
5. The Code Snippet panel (activated by clicking the "Show code" button) is updated dynamically to demonstrate the correct implementation of the CSS utilities.
|
|
38
|
+
|
|
39
|
+
### Components
|
|
40
|
+
1. Visit the [Storybook](https://tide-design-system.netlify.app) site.
|
|
41
|
+
2. Select the relevant component from the Sidebar.
|
|
42
|
+
3. Use the Controls table to modify the options to reflect Jira requirements and/or Figma mock.
|
|
43
|
+
4. The Canvas panel is updated dynamically to demonstrate an interactive implementation of the correct component variant.
|
|
44
|
+
5. The Code Snippet panel (activated by clicking the "Show code" button) is updated dynamically to demonstrate the correct implementation of the TIDE component.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# TIDE Marketplace Style Guides
|
|
2
|
+
Each redesign realm has an unlinked, yet publicly-accessible Style Guide page that demonstrates the styling and behavior of all major TIDE styles and components in a realm-specific production environment.
|
|
3
|
+
|
|
4
|
+
## Benefits
|
|
5
|
+
The TIDE Marketplace Style Guides were implemented to facilitate collaboration between departments within the Trader Interactive development group:
|
|
6
|
+
- **Product Managers** can quickly review which TIDE structures are already integrated into the `marketplace` repository.
|
|
7
|
+
- **Designers** can quickly verify that TIDE structures accurately reflect the designs.
|
|
8
|
+
- **Developers** can quickly view the standard implementation of any given structure as both source code and distributed code.
|
|
9
|
+
- **QA Engineers** can quickly verify that the design and behavior of TIDE structures have not been unintentionally altered by a dependency upgrade under test.
|
|
10
|
+
|
|
11
|
+
## Links
|
|
12
|
+
- Current redesign realms:
|
|
13
|
+
- [ATV](https://www.atvtrader.com/style-guide)
|
|
14
|
+
- [Boatmart](https://www.boatmart.com/style-guide)
|
|
15
|
+
- [RV](https://www.rvtrader.com/style-guide)
|
|
16
|
+
- Forthcoming redesign realms:
|
|
17
|
+
- [Aero](https://www.aerotrader.com/style-guide)
|
|
18
|
+
- [Cycle](https://www.cycletrader.com/style-guide)
|
|
19
|
+
- [Equipment](https://www.equipmenttrader.com/style-guide)
|
|
20
|
+
- [PWC](https://www.pwctrader.com/style-guide)
|
|
21
|
+
- [Snow](https://www.snowmobiletrader.com/style-guide)
|
|
22
|
+
- [Truck](https://www.commercialtrucktrader.com/style-guide)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# TIDE Collaborative Workflows
|
|
2
|
+
|
|
3
|
+
## TIDE-first development
|
|
4
|
+
|
|
5
|
+
1. Identify a ticket on your product team's Jira backlog that has a dependency on an approved TIDE structure not yet present in the TIDE repository.
|
|
6
|
+
2. Contact the TIDE team via the [#ti-marketplaces-design-system-public](https://cargroup.enterprise.slack.com/archives/C08TEFUUE4X) Slack channel to discuss the dependency and to determine whether a TIDE ticket already exists in Jira or must be created, then mark the dependent ticket as `blocked by` the TIDE ticket via Jira's `Add > Linked work item` feature.
|
|
7
|
+
3. The TIDE team will estimate and prioritize the ticket and pull it into a TIDE sprint accordingly.
|
|
8
|
+
4. Once pulled into a sprint, the TIDE team will develop, peer review, test, and merge a new branch into the TIDE repository, then publish a new version of the `tide-design-system` package to the NPM registry.
|
|
9
|
+
5. The TIDE team will notify the owners of the dependent ticket that the blockage has been removed.
|
|
10
|
+
6. From the consumer repository, manually upgrade the dependency to the latest version of the `tide-design-system` package, then develop, peer review, test, and release the dependent ticket in the consumer repository as normal.
|
|
11
|
+
|
|
12
|
+
## Consumer-first development
|
|
13
|
+
|
|
14
|
+
1. Develop, peer review, test, and release the proposed TIDE structures in a consumer repository as with any other Jira task.
|
|
15
|
+
2. Create a ticket in the [TIDE Jira backlog](https://traderinteractive.atlassian.net/jira/software/c/projects/TIDE/boards/1092/backlog) identifying the relevant structures and requesting that they be migrated/adapted into the TIDE repository.
|
|
16
|
+
3. Post a message in the [#ti-marketplaces-design-system-public](https://cargroup.enterprise.slack.com/archives/C08TEFUUE4X) Slack channel to make the TIDE team aware of the proposal.
|
|
17
|
+
4. The TIDE team will review the proposal.
|
|
18
|
+
1. If accepted, the TIDE team will prioritize the ticket for development and release.
|
|
19
|
+
2. If not accepted, the TIDE team will contact the reporter for additional discussion before closing the Jira ticket as `Won't Do`.
|
|
20
|
+
5. Jira will automatically contact the Reporter of the ticket with relevant updates, including publication.
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { action } from '@storybook/addon-actions';
|
|
2
|
+
|
|
1
3
|
import TideAlert from '@/components/TideAlert.vue';
|
|
2
4
|
import * as STANDARD_ALERT from '@/types/Alert';
|
|
3
5
|
import {
|
|
4
6
|
argTypeBooleanUnrequired,
|
|
5
7
|
dataTrack,
|
|
8
|
+
disabledArgType,
|
|
9
|
+
doSomething,
|
|
6
10
|
formatArgType,
|
|
7
11
|
parameters,
|
|
8
12
|
prependNoneAsUndefined,
|
|
@@ -10,14 +14,31 @@ import {
|
|
|
10
14
|
|
|
11
15
|
const render = (args: any) => ({
|
|
12
16
|
components: { TideAlert },
|
|
17
|
+
methods: {
|
|
18
|
+
doSomething,
|
|
19
|
+
handleClose: () => {
|
|
20
|
+
action('TideAlert closed')({});
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
const callback = eval(args.handleClose);
|
|
24
|
+
|
|
25
|
+
if (callback) {
|
|
26
|
+
callback();
|
|
27
|
+
}
|
|
28
|
+
} catch {
|
|
29
|
+
alert('Please specify a valid handler in the "close" control.');
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
},
|
|
13
33
|
setup: () => ({ args }),
|
|
14
|
-
template: `<TideAlert v-bind="args">{{ args.default }}</TideAlert>`,
|
|
34
|
+
template: `<TideAlert @close="handleClose" v-bind="args">{{ args.default }}</TideAlert>`,
|
|
15
35
|
});
|
|
16
36
|
|
|
17
37
|
const ALERT = prependNoneAsUndefined(STANDARD_ALERT.ALERT);
|
|
18
38
|
|
|
19
39
|
export default {
|
|
20
40
|
argTypes: {
|
|
41
|
+
close: disabledArgType,
|
|
21
42
|
dataTrack,
|
|
22
43
|
default: {
|
|
23
44
|
control: 'text',
|
|
@@ -27,6 +48,17 @@ export default {
|
|
|
27
48
|
type: { summary: 'HTML' },
|
|
28
49
|
},
|
|
29
50
|
},
|
|
51
|
+
handleClose: {
|
|
52
|
+
control: 'text',
|
|
53
|
+
description: 'JS code or function to execute on close event',
|
|
54
|
+
isEmit: true,
|
|
55
|
+
name: 'close',
|
|
56
|
+
table: {
|
|
57
|
+
category: 'Events',
|
|
58
|
+
defaultValue: { summary: 'None' },
|
|
59
|
+
type: { summary: '() => void' },
|
|
60
|
+
},
|
|
61
|
+
},
|
|
30
62
|
heading: {
|
|
31
63
|
control: 'text',
|
|
32
64
|
description: 'Heading text',
|
|
@@ -35,6 +67,10 @@ export default {
|
|
|
35
67
|
type: { summary: 'HTML' },
|
|
36
68
|
},
|
|
37
69
|
},
|
|
70
|
+
isDismissible: {
|
|
71
|
+
...argTypeBooleanUnrequired,
|
|
72
|
+
description: 'Determines whether the Alert can be closed by the user',
|
|
73
|
+
},
|
|
38
74
|
isToast: {
|
|
39
75
|
...argTypeBooleanUnrequired,
|
|
40
76
|
description: 'Determines whether the Alert is an overlay or displaces content',
|
|
@@ -47,12 +83,20 @@ export default {
|
|
|
47
83
|
},
|
|
48
84
|
},
|
|
49
85
|
},
|
|
50
|
-
args: {
|
|
86
|
+
args: {
|
|
87
|
+
dataTrack: '',
|
|
88
|
+
default: '',
|
|
89
|
+
handleClose: 'doSomething',
|
|
90
|
+
heading: 'Heading',
|
|
91
|
+
isDismissible: undefined,
|
|
92
|
+
isToast: undefined,
|
|
93
|
+
type: undefined,
|
|
94
|
+
},
|
|
51
95
|
component: TideAlert,
|
|
52
96
|
parameters,
|
|
53
97
|
render,
|
|
54
98
|
tags: ['autodocs'],
|
|
55
|
-
title: '
|
|
99
|
+
title: 'Components/TideAlert',
|
|
56
100
|
};
|
|
57
101
|
|
|
58
102
|
export const Demo = {};
|
|
@@ -36,6 +36,7 @@ const formatSnippet = (code: string, context: StoryContext) => {
|
|
|
36
36
|
argsWithValues.push(`:icon-trailing="${formatValueAsConstant({ iconTrailing }, argTypes)}"`);
|
|
37
37
|
if (args.isNewTab !== undefined) argsWithValues.push(`:is-new-tab="${args.isNewTab}"`);
|
|
38
38
|
if (args.label !== undefined) argsWithValues.push(`:label="${args.label}"`);
|
|
39
|
+
if (args.subtle !== undefined) argsWithValues.push(`:subtle="${args.subtle}"`);
|
|
39
40
|
if (args.click !== undefined) argsWithValues.push(`@click="${args.click}"`);
|
|
40
41
|
|
|
41
42
|
return `<TideLink ${argsWithValues.join(' ')} />`;
|
|
@@ -117,23 +118,28 @@ export default {
|
|
|
117
118
|
type: { summary: 'string' },
|
|
118
119
|
},
|
|
119
120
|
},
|
|
121
|
+
subtle: {
|
|
122
|
+
...argTypeBooleanUnrequired,
|
|
123
|
+
description: 'Hides the underline until hovered, de-emphasizing the link',
|
|
124
|
+
},
|
|
120
125
|
},
|
|
121
126
|
args: {
|
|
122
127
|
click: 'doSomething',
|
|
123
128
|
dataTrack: '',
|
|
124
129
|
element: undefined,
|
|
125
|
-
href: '
|
|
130
|
+
href: '#',
|
|
126
131
|
iconLeading: undefined,
|
|
127
132
|
iconTrailing: undefined,
|
|
128
133
|
isNewTab: undefined,
|
|
129
134
|
label: 'Demo',
|
|
130
135
|
size: undefined,
|
|
136
|
+
subtle: undefined,
|
|
131
137
|
},
|
|
132
138
|
component: TideLink,
|
|
133
139
|
parameters,
|
|
134
140
|
render,
|
|
135
141
|
tags: ['autodocs'],
|
|
136
|
-
title: '
|
|
142
|
+
title: 'Components/TideLink',
|
|
137
143
|
};
|
|
138
144
|
|
|
139
145
|
export const Demo = {};
|