tide-design-system 2.2.2 → 2.2.4
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/preview.ts +0 -1
- package/dist/css/grid-layout.css +10 -49
- package/dist/css/utilities-md.css +0 -1
- package/dist/style.css +1 -1
- package/dist/tide-design-system.cjs +2 -2
- package/dist/tide-design-system.esm.d.ts +8 -30
- package/dist/tide-design-system.esm.js +1105 -1110
- package/package.json +1 -1
- package/src/assets/css/grid-layout.css +10 -49
- package/src/assets/css/utilities-md.css +0 -1
- package/src/components/TideBadge.vue +4 -1
- package/src/components/TideBadgeTrustedPartner.vue +8 -2
- package/src/components/TideBadgeVerifiedVehicle.vue +7 -2
- package/src/components/TideCarousel.vue +90 -55
- package/src/components/TideDivider.vue +16 -9
- package/src/stories/FoundationsGrid.stories.ts +1 -184
- package/src/stories/TideCarousel.stories.ts +51 -9
- package/src/stories/TideDivider.stories.ts +3 -4
- package/src/types/Storybook.ts +0 -32
- package/src/types/Styles.ts +0 -30
|
@@ -10,21 +10,24 @@ const formatSnippet = (code: string, context: StoryContext) => {
|
|
|
10
10
|
const { args } = context;
|
|
11
11
|
|
|
12
12
|
const argsWithValues: string[] = [];
|
|
13
|
+
const hasBleed = args.bleed !== '';
|
|
13
14
|
|
|
15
|
+
if (hasBleed) argsWithValues.push(`bleed="${args.bleed}"`);
|
|
14
16
|
if (args.isHideawayButtons !== undefined) argsWithValues.push(`:is-hideaway-buttons="${args.isHideawayButtons}"`);
|
|
15
17
|
if (args.isTouchscreen !== undefined) argsWithValues.push(`:is-touchscreen="${args.isTouchscreen}"`);
|
|
16
|
-
if (args.subtitle !==
|
|
17
|
-
if (args.title !==
|
|
18
|
+
if (args.subtitle !== '') argsWithValues.push(`subtitle="${args.subtitle}"`);
|
|
19
|
+
if (args.title !== '') argsWithValues.push(`title="${args.title}"`);
|
|
18
20
|
if (args.handleChange) argsWithValues.push(`@change="${args.handleChange}"`);
|
|
19
21
|
|
|
20
|
-
const
|
|
22
|
+
const slotContentMisc = args.misc === '' ? '' : `${tab}<template #misc>${args.misc}</template>${lineBreak}`;
|
|
21
23
|
|
|
22
24
|
return (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
// prettier-ignore
|
|
26
|
+
`<TideCarousel ${argsWithValues.join(' ')}>` + lineBreak +
|
|
27
|
+
slotContentMisc + tab +
|
|
28
|
+
`<li class="tide-shrink-none ${hasBleed ? 'tide-shadow-bottom' : ''}" v-for="(_child, index) in new Array(12)">` + lineBreak + tab + tab +
|
|
29
|
+
args.default + lineBreak + tab +
|
|
30
|
+
`</li>` + lineBreak +
|
|
28
31
|
`</TideCarousel>`
|
|
29
32
|
);
|
|
30
33
|
};
|
|
@@ -58,11 +61,41 @@ const render = (args: any) => ({
|
|
|
58
61
|
},
|
|
59
62
|
},
|
|
60
63
|
setup: () => ({ args }),
|
|
61
|
-
|
|
64
|
+
// prettier-ignore
|
|
65
|
+
template:
|
|
66
|
+
`<TideCarousel
|
|
67
|
+
@change="handleChange"
|
|
68
|
+
class="tide-margin-x-1"
|
|
69
|
+
v-bind="args"
|
|
70
|
+
>
|
|
71
|
+
<template #misc>{{ args.misc }}</template>
|
|
72
|
+
<li
|
|
73
|
+
:class="args.bleed ? 'tide-shadow-bottom' : ''"
|
|
74
|
+
class="tide-shrink-none tide-border-1 tide-border tide-padding-1"
|
|
75
|
+
v-for="(_child, index) in new Array(12)"
|
|
76
|
+
>
|
|
77
|
+
{{ args.default }}
|
|
78
|
+
</li>
|
|
79
|
+
</TideCarousel>`,
|
|
80
|
+
updated() {
|
|
81
|
+
if (args.bleed === '') {
|
|
82
|
+
args.bleed = 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return { args };
|
|
86
|
+
},
|
|
62
87
|
});
|
|
63
88
|
|
|
64
89
|
export default {
|
|
65
90
|
argTypes: {
|
|
91
|
+
bleed: {
|
|
92
|
+
control: 'text',
|
|
93
|
+
description: 'Sets an allowance for visible overflow at component boundaries.',
|
|
94
|
+
table: {
|
|
95
|
+
defaultValue: { summary: 'None' },
|
|
96
|
+
type: { summary: 'number' },
|
|
97
|
+
},
|
|
98
|
+
},
|
|
66
99
|
change: disabledArgType,
|
|
67
100
|
default: {
|
|
68
101
|
control: 'text',
|
|
@@ -87,9 +120,17 @@ export default {
|
|
|
87
120
|
defaultValue: { summary: 'False' },
|
|
88
121
|
},
|
|
89
122
|
},
|
|
123
|
+
isHeadline1: {
|
|
124
|
+
...argTypeBooleanUnrequired,
|
|
125
|
+
description: 'Determines font role used for title display',
|
|
126
|
+
table: {
|
|
127
|
+
defaultValue: { summary: 'False' },
|
|
128
|
+
},
|
|
129
|
+
},
|
|
90
130
|
isHideawayButtons: {
|
|
91
131
|
...argTypeBooleanUnrequired,
|
|
92
132
|
description: 'Determines whether on-page buttons should be hidden until hover',
|
|
133
|
+
if: { arg: 'isFloating', eq: true },
|
|
93
134
|
table: {
|
|
94
135
|
defaultValue: { summary: 'True' },
|
|
95
136
|
},
|
|
@@ -127,6 +168,7 @@ export default {
|
|
|
127
168
|
},
|
|
128
169
|
},
|
|
129
170
|
args: {
|
|
171
|
+
bleed: '',
|
|
130
172
|
default: 'Card',
|
|
131
173
|
handleChange: 'doSomething',
|
|
132
174
|
isFloating: undefined,
|
|
@@ -4,7 +4,6 @@ import { disabledArgType, formatArgType, parameters, prependNoneAsUndefined } fr
|
|
|
4
4
|
|
|
5
5
|
const formatArgs = (args: any) => {
|
|
6
6
|
args.flexDirection = args.orientation === ORIENTATION.VERTICAL ? 'tide-flex-row' : 'tide-flex-column';
|
|
7
|
-
args.divTemplate = `<div class="sb-border-blue-light sb-font-blue-light tide-display-flex tide-axis1-center tide-axis2-center tide-padding-1 tide-width-full" style="min-width: 100px; min-height:100px;" />`;
|
|
8
7
|
|
|
9
8
|
return { args };
|
|
10
9
|
};
|
|
@@ -12,12 +11,12 @@ const formatArgs = (args: any) => {
|
|
|
12
11
|
const render = (args: any) => ({
|
|
13
12
|
components: { TideDivider },
|
|
14
13
|
setup: () => formatArgs(args),
|
|
15
|
-
template: `<div :class="['tide-display-flex', args.flexDirection]">
|
|
16
|
-
<div class="sb-border-blue-light
|
|
14
|
+
template: `<div :class="['tide-display-inline-flex', args.flexDirection]">
|
|
15
|
+
<div class="sb-border-blue-light tide-padding-1">Demo</div>
|
|
17
16
|
|
|
18
17
|
<TideDivider :orientation="args.orientation" />
|
|
19
18
|
|
|
20
|
-
<div class="sb-border-blue-light
|
|
19
|
+
<div class="sb-border-blue-light tide-padding-1">Demo</div>
|
|
21
20
|
</div>`,
|
|
22
21
|
updated: () => formatArgs(args),
|
|
23
22
|
});
|
package/src/types/Storybook.ts
CHANGED
|
@@ -110,38 +110,6 @@ export const GAP = {
|
|
|
110
110
|
'0.25 REM': CSS.GAP.QUARTER,
|
|
111
111
|
};
|
|
112
112
|
|
|
113
|
-
export const GRID_END = {
|
|
114
|
-
'Column 1': CSS.GRID.END.ONE,
|
|
115
|
-
'Column 2': CSS.GRID.END.TWO,
|
|
116
|
-
'Column 3': CSS.GRID.END.THREE,
|
|
117
|
-
'Column 4': CSS.GRID.END.FOUR,
|
|
118
|
-
'Column 5': CSS.GRID.END.FIVE,
|
|
119
|
-
'Column 6': CSS.GRID.END.SIX,
|
|
120
|
-
'Column 7': CSS.GRID.END.SEVEN,
|
|
121
|
-
'Column 8': CSS.GRID.END.EIGHT,
|
|
122
|
-
'Column 9': CSS.GRID.END.NINE,
|
|
123
|
-
'Column 10': CSS.GRID.END.TEN,
|
|
124
|
-
'Column 11': CSS.GRID.END.ELEVEN,
|
|
125
|
-
'Column 12': CSS.GRID.END.TWELVE,
|
|
126
|
-
'Column 13': CSS.GRID.END.THIRTEEN,
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
export const GRID_START = {
|
|
130
|
-
'Column 0': CSS.GRID.START.ZERO,
|
|
131
|
-
'Column 1': CSS.GRID.START.ONE,
|
|
132
|
-
'Column 2': CSS.GRID.START.TWO,
|
|
133
|
-
'Column 3': CSS.GRID.START.THREE,
|
|
134
|
-
'Column 4': CSS.GRID.START.FOUR,
|
|
135
|
-
'Column 5': CSS.GRID.START.FIVE,
|
|
136
|
-
'Column 6': CSS.GRID.START.SIX,
|
|
137
|
-
'Column 7': CSS.GRID.START.SEVEN,
|
|
138
|
-
'Column 8': CSS.GRID.START.EIGHT,
|
|
139
|
-
'Column 9': CSS.GRID.START.NINE,
|
|
140
|
-
'Column 10': CSS.GRID.START.TEN,
|
|
141
|
-
'Column 11': CSS.GRID.START.ELEVEN,
|
|
142
|
-
'Column 12': CSS.GRID.START.TWELVE,
|
|
143
|
-
};
|
|
144
|
-
|
|
145
113
|
export const LINK_SIZE = {
|
|
146
114
|
TWELVE: CSS.FONT.SIZE.TWELVE,
|
|
147
115
|
FOURTEEN: CSS.FONT.SIZE.FOURTEEN,
|
package/src/types/Styles.ts
CHANGED
|
@@ -230,39 +230,9 @@ export const CSS = {
|
|
|
230
230
|
FOUR: 'tide-gap-4',
|
|
231
231
|
},
|
|
232
232
|
GRID: {
|
|
233
|
-
END: {
|
|
234
|
-
ONE: 'tide-end-1',
|
|
235
|
-
TWO: 'tide-end-2',
|
|
236
|
-
THREE: 'tide-end-3',
|
|
237
|
-
FOUR: 'tide-end-4',
|
|
238
|
-
FIVE: 'tide-end-5',
|
|
239
|
-
SIX: 'tide-end-6',
|
|
240
|
-
SEVEN: 'tide-end-7',
|
|
241
|
-
EIGHT: 'tide-end-8',
|
|
242
|
-
NINE: 'tide-end-9',
|
|
243
|
-
TEN: 'tide-end-10',
|
|
244
|
-
ELEVEN: 'tide-end-11',
|
|
245
|
-
TWELVE: 'tide-end-12',
|
|
246
|
-
THIRTEEN: 'tide-end-13',
|
|
247
|
-
},
|
|
248
233
|
FLUID: 'tide-fluid',
|
|
249
234
|
ITEM: 'tide-grid-item',
|
|
250
235
|
LAYOUT: 'tide-grid-layout',
|
|
251
|
-
START: {
|
|
252
|
-
ZERO: 'tide-start-0',
|
|
253
|
-
ONE: 'tide-start-1',
|
|
254
|
-
TWO: 'tide-start-2',
|
|
255
|
-
THREE: 'tide-start-3',
|
|
256
|
-
FOUR: 'tide-start-4',
|
|
257
|
-
FIVE: 'tide-start-5',
|
|
258
|
-
SIX: 'tide-start-6',
|
|
259
|
-
SEVEN: 'tide-start-7',
|
|
260
|
-
EIGHT: 'tide-start-8',
|
|
261
|
-
NINE: 'tide-start-9',
|
|
262
|
-
TEN: 'tide-start-10',
|
|
263
|
-
ELEVEN: 'tide-start-11',
|
|
264
|
-
TWELVE: 'tide-start-12',
|
|
265
|
-
},
|
|
266
236
|
XL: 'tide-grid-xl',
|
|
267
237
|
},
|
|
268
238
|
HEIGHT: {
|