tide-design-system 2.4.1 → 2.4.3
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/README.md +10 -9
- package/dist/style.css +1 -1
- package/dist/tide-design-system.cjs +2 -2
- package/dist/tide-design-system.esm.d.ts +17 -15
- package/dist/tide-design-system.esm.js +8 -8
- package/{src/docs → docs}/integration-full.md +1 -1
- package/{src/docs → docs}/integration-partial.md +1 -1
- package/docs/token-cheatsheet.md +63 -0
- package/netlify.toml +3 -0
- package/package.json +4 -2
- package/src/components/TideChipAction.vue +1 -1
- package/src/components/TideImageBackground.vue +2 -2
- package/src/components/TideInputCheckboxDeprecated.vue +2 -2
- package/src/components/TideInputRadioDeprecated.vue +3 -2
- package/src/components/TideInputTextDeprecated.vue +3 -2
- package/src/stories/FoundationsTypography.stories.ts +24 -0
- package/src/types/Storybook.ts +10 -0
- package/vite.config.sandbox.ts +29 -0
- /package/{src/docs → docs}/assets/native-input-validation.png +0 -0
- /package/{src/docs → docs}/development.md +0 -0
- /package/{src/docs → docs}/figma.md +0 -0
- /package/{src/docs → docs}/forms.md +0 -0
- /package/{src/docs → docs}/migration.md +0 -0
- /package/{src/docs → docs}/storybook.md +0 -0
- /package/{src/docs → docs}/style-guide.md +0 -0
- /package/{src/docs → docs}/upgrading.md +0 -0
- /package/{src/docs → docs}/workflows.md +0 -0
|
@@ -81,4 +81,4 @@
|
|
|
81
81
|
|
|
82
82
|
6. Storybook
|
|
83
83
|
|
|
84
|
-
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](./
|
|
84
|
+
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](./docs/storybook.md#using-storybook) for details.
|
|
@@ -36,4 +36,4 @@
|
|
|
36
36
|
4. Leverage responsive CSS utilities:
|
|
37
37
|
|
|
38
38
|
`<div class="tide-position-relative md-tide-position-absolute" />`
|
|
39
|
-
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](./
|
|
39
|
+
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](./docs/storybook.md#utilities) under [Using Storybook](./docs/storybook.md#using-storybook) for details.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# TIDE Figma Token Cheatsheet
|
|
2
|
+
|
|
3
|
+
## Terminology
|
|
4
|
+
- [**Figma Token**](https://www.figma.com/design/9oYSAyY2X9mPaUMiobZOPg/Design-System---TIDE-2.0?node-id=0-1&p=f&m=dev): the name that appears in the "Layer properties" section of the right sidebar when inspecting an element of a Figma mock
|
|
5
|
+
- [**JS Constant**](../src/types/Styles.ts): the standard JavaScript structure to use when implementing a TIDE Figma token from within a JS file and/or framework (`.vue`, `.ts`, `.js`)
|
|
6
|
+
- [**CSS Utility**](../src/assets/css/utilities-base.css): the CSS class to use when implementing a TIDE Figma token from **legacy** frameworks (`.html`, `.php`, `.phtml`).
|
|
7
|
+
|
|
8
|
+
## Typography
|
|
9
|
+
|[Figma Token](https://www.figma.com/design/9oYSAyY2X9mPaUMiobZOPg/Design-System---TIDE-2.0?node-id=0-1&p=f&m=dev)|[JS Constant](../src/types/Styles.ts)|[CSS Utility](../src/assets/css/utilities-base.css)|
|
|
10
|
+
|-|-|-|
|
|
11
|
+
|Role/Display/Display 1|`CSS.FONT.ROLE.DISPLAY_1`|`tide-typography-display-1`|
|
|
12
|
+
|Role/Headline/Headline 1|`CSS.FONT.ROLE.HEADLINE_1`|`tide-typography-headline-1`|
|
|
13
|
+
|Role/Headline/Headline 2|`CSS.FONT.ROLE.HEADLINE_2`|`tide-typography-headline-2`|
|
|
14
|
+
|Role/Headline/Headline 3|`CSS.FONT.ROLE.HEADLINE_3`|`tide-typography-headline-3`|
|
|
15
|
+
|Role/Title/Title 1|`CSS.FONT.ROLE.TITLE_1`|`tide-typography-title-1`|
|
|
16
|
+
|Role/Title/Title 2|`CSS.FONT.ROLE.TITLE_2`|`tide-typography-title-2`|
|
|
17
|
+
|Role/Body/Body 1*|`CSS.FONT.ROLE.BODY_1`|`tide-typography-body-1`|
|
|
18
|
+
|Role/Body/Body 2|`CSS.FONT.ROLE.BODY_2`|`tide-typography-body-2`|
|
|
19
|
+
|Role/Label/Label 1|`CSS.FONT.ROLE.LABEL_1`|`tide-typography-label-1`|
|
|
20
|
+
|Role/Label/Label 1 Semibold|`CSS.FONT.ROLE.LABEL_1_SEMIBOLD`|`tide-typography-label-1-semibold`|
|
|
21
|
+
|Role/Label/Label 2|`CSS.FONT.ROLE.LABEL_2`|`tide-typography-label-2`|
|
|
22
|
+
|Role/Label/Label 2 Semibold|`CSS.FONT.ROLE.LABEL_2_SEMIBOLD`|`tide-typography-label-2-semibold`|
|
|
23
|
+
|Role/Label/Label 3|`CSS.FONT.ROLE.LABEL_3`|`tide-typography-label-3`|
|
|
24
|
+
|Role/Link/Link 1|`CSS.FONT.ROLE.LINK_1`|`tide-typography-link-1`|
|
|
25
|
+
|Role/Link/Link 2|`CSS.FONT.ROLE.LINK_2`|`tide-typography-link-2`|
|
|
26
|
+
|Role/Button/Button 1|`CSS.FONT.ROLE.BUTTON_1`|`tide-typography-button-1`|
|
|
27
|
+
|Role/Button/Button 2|`CSS.FONT.ROLE.BUTTON_2`|`tide-typography-button-2`|
|
|
28
|
+
|
|
29
|
+
\* **Body/Body 1** is applied to all site text by default in the [CSS Reset](../src/assets/css/reset.css), so it doesn't need to be specified unless overriding an inherited font role.
|
|
30
|
+
|
|
31
|
+
## Color
|
|
32
|
+
|
|
33
|
+
### Background Color
|
|
34
|
+
|[Figma Token](https://www.figma.com/design/9oYSAyY2X9mPaUMiobZOPg/Design-System---TIDE-2.0?node-id=0-1&p=f&m=dev)|[JS Constant](../src/types/Styles.ts)|[CSS Utility](../src/assets/css/utilities-base.css)
|
|
35
|
+
|-|-|-|
|
|
36
|
+
|Colors/Primary/Primary|`CSS.BG.PRIMARY`|`tide-bg-primary`|
|
|
37
|
+
|Colors/Secondary/Secondary|`CSS.BG.SECONDARY`|`tide-bg-secondary`|
|
|
38
|
+
|Colors/Surface/Surface|`CSS.BG.SURFACE.DEFAULT`|`tide-bg-surface`|
|
|
39
|
+
|Colors/Surface/Surface brand|`CSS.BG.SURFACE.BRAND`|`tide-bg-surface-brand`|
|
|
40
|
+
|Colors/Surface/Surface brand|`CSS.BG.SURFACE.BRAND`|`tide-bg-surface-brand`|
|
|
41
|
+
|Colors/Surface/Surface accent|`CSS.BG.SURFACE.ACCENT`|`tide-bg-surface-accent`|
|
|
42
|
+
|Colors/Surface/Surface variant|`CSS.BG.SURFACE.VARIANT`|`tide-bg-surface-variant`|
|
|
43
|
+
|Colors/Surface/Surface gradient|`CSS.BG.SURFACE.GRADIENT`|`tide-bg-surface-gradient`|
|
|
44
|
+
|Colors/Surface/Surface floating|`CSS.BG.SURFACE.FLOATING`|`tide-bg-surface-floating`|
|
|
45
|
+
|
|
46
|
+
### Border Color
|
|
47
|
+
|[Figma Token](https://www.figma.com/design/9oYSAyY2X9mPaUMiobZOPg/Design-System---TIDE-2.0?node-id=0-1&p=f&m=dev)|[JS Constant](../src/types/Styles.ts)|[CSS Utility](../src/assets/css/utilities-base.css)
|
|
48
|
+
|-|-|-|
|
|
49
|
+
|Colors/Border/Border|`CSS.BORDER.COLOR.DEFAULT`|`tide-border`|
|
|
50
|
+
|Colors/Border/Border low|`CSS.BORDER.COLOR.LOW`|`tide-border-low`|
|
|
51
|
+
|Colors/Border/Border high|`CSS.BORDER.COLOR.HGIH`|`tide-border-high`|
|
|
52
|
+
|Colors/Border/Border floating|`CSS.BORDER.COLOR.FLOATING`|`tide-border-floating`|
|
|
53
|
+
|
|
54
|
+
### Font Color
|
|
55
|
+
|[Figma Token](https://www.figma.com/design/9oYSAyY2X9mPaUMiobZOPg/Design-System---TIDE-2.0?node-id=0-1&p=f&m=dev)|[JS Constant](../src/types/Styles.ts)|[CSS Utility](../src/assets/css/utilities-base.css)
|
|
56
|
+
|-|-|-|
|
|
57
|
+
|Colors/Primary/On primary|`CSS.BG.PRIMARY`|`tide-font-on-primary`|
|
|
58
|
+
|Colors/Secondary/Secondary|`CSS.BG.SECONDARY`|`tide-font-on-secondary`|
|
|
59
|
+
|Colors/Surface/On surface|`CSS.BG.SURFACE.DEFAULT`|`tide-font-on-surface`|
|
|
60
|
+
|Colors/Surface/On surface brand|`CSS.BG.SURFACE.BRAND`|`tide-font-on-surface-brand`|
|
|
61
|
+
|Colors/Surface/On surface inverse|`CSS.BG.SURFACE.INVERSE`|`tide-font-on-surface-inverse`|
|
|
62
|
+
|Colors/Surface/On surface variant|`CSS.BG.SURFACE.VARIANT`|`tide-font-on-surface-variant`|
|
|
63
|
+
|Colors/Surface/On surface variant inverse|`CSS.BG.SURFACE.VARIANT_INVERSE`|`tide-font-on-surface-variant-inverse`|
|
package/netlify.toml
ADDED
package/package.json
CHANGED
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "npm run enforce && npm run build-vite",
|
|
47
|
+
"build-sandbox": "vite build --config vite.config.sandbox.ts",
|
|
47
48
|
"build-storybook": "npm run build-vite && storybook build && cp -r src/assets/ storybook-static/",
|
|
48
49
|
"build-vite": "vite build && cp -r src/assets/css/ dist/css/ && cp -r src/utilities/ dist/utilities/",
|
|
49
50
|
"coverage": "vitest run --coverage",
|
|
@@ -52,7 +53,8 @@
|
|
|
52
53
|
"lint": "eslint . --ext .js,.ts,.vue --ignore-path .gitignore",
|
|
53
54
|
"lint:fix": "eslint . --ext .js,.ts,.vue --ignore-path .gitignore --fix",
|
|
54
55
|
"precommit": "npm run lint:fix && npm run type-check && npm run test",
|
|
55
|
-
"preview": "npm run build-
|
|
56
|
+
"preview-sandbox": "npm run build-sandbox && npx http-server -a localhost dist/",
|
|
57
|
+
"preview-storybook": "npm run build && npx http-server -a localhost storybook-static/",
|
|
56
58
|
"storybook": "storybook dev -p 6006",
|
|
57
59
|
"test": "vitest run",
|
|
58
60
|
"type-check": "vue-tsc --noEmit"
|
|
@@ -61,7 +63,7 @@
|
|
|
61
63
|
"main": "dist/tide-design-system.cjs",
|
|
62
64
|
"module": "dist/tide-design-system.esm.js",
|
|
63
65
|
"types": "dist/tide-design-system.esm.d.ts",
|
|
64
|
-
"version": "2.4.
|
|
66
|
+
"version": "2.4.3",
|
|
65
67
|
"dependencies": {
|
|
66
68
|
"@floating-ui/vue": "^1.1.6"
|
|
67
69
|
}
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
checked?: boolean;
|
|
16
16
|
disabled?: boolean;
|
|
17
17
|
inputId?: string;
|
|
18
|
-
label
|
|
19
|
-
name
|
|
18
|
+
label?: string;
|
|
19
|
+
name?: string;
|
|
20
20
|
number?: number;
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
disabled: false,
|
|
26
26
|
inputId: undefined,
|
|
27
27
|
label: undefined,
|
|
28
|
+
name: undefined,
|
|
28
29
|
number: undefined,
|
|
29
30
|
});
|
|
30
31
|
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
hasClear?: boolean;
|
|
28
28
|
iconLeading?: Icon;
|
|
29
29
|
inputId?: string;
|
|
30
|
-
label
|
|
30
|
+
label?: string;
|
|
31
31
|
maxlength?: number | undefined;
|
|
32
32
|
minlength?: number | undefined;
|
|
33
|
-
name
|
|
33
|
+
name?: string;
|
|
34
34
|
prefix?: string;
|
|
35
35
|
required?: boolean;
|
|
36
36
|
suffix?: string;
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
label: undefined,
|
|
52
52
|
maxlength: undefined,
|
|
53
53
|
minlength: undefined,
|
|
54
|
+
name: undefined,
|
|
54
55
|
prefix: undefined,
|
|
55
56
|
required: false,
|
|
56
57
|
suffix: undefined,
|
|
@@ -4,6 +4,8 @@ import { formatArgType, getConstantsByValues, prependNoneAsEmpty } from '@/utili
|
|
|
4
4
|
import type { StoryContext } from '@storybook/vue3';
|
|
5
5
|
|
|
6
6
|
const TYPOGRAPHY = prependNoneAsEmpty(STYLES.TYPOGRAPHY);
|
|
7
|
+
const TEXT_DECORATION = prependNoneAsEmpty(STYLES.TEXT_DECORATION);
|
|
8
|
+
const TEXT_TRANSFORM = prependNoneAsEmpty(STYLES.TEXT_TRANSFORM);
|
|
7
9
|
|
|
8
10
|
const formatArgs = (args: any) => {
|
|
9
11
|
args.class = formatClassNames(args).join(' ');
|
|
@@ -15,6 +17,8 @@ const formatClassNames = (args: any) => {
|
|
|
15
17
|
const classNames: string[] = [];
|
|
16
18
|
|
|
17
19
|
if (args.type) classNames.push(args.type);
|
|
20
|
+
if (args.textDecoration) classNames.push(args.textDecoration);
|
|
21
|
+
if (args.textTransform) classNames.push(args.textTransform);
|
|
18
22
|
|
|
19
23
|
return classNames;
|
|
20
24
|
};
|
|
@@ -63,6 +67,24 @@ export default {
|
|
|
63
67
|
type: { summary: 'string' },
|
|
64
68
|
},
|
|
65
69
|
},
|
|
70
|
+
textDecoration: {
|
|
71
|
+
...formatArgType({ TEXT_DECORATION }),
|
|
72
|
+
description: 'Applies text decoration styles',
|
|
73
|
+
name: 'Text Decoration',
|
|
74
|
+
table: {
|
|
75
|
+
defaultValue: { summary: 'None' },
|
|
76
|
+
type: { summary: 'CSS.STRIKETHROUGH | CSS.UNDERLINE' },
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
textTransform: {
|
|
80
|
+
...formatArgType({ TEXT_TRANSFORM }),
|
|
81
|
+
description: 'Applies text transformation styles',
|
|
82
|
+
name: 'Text Transform',
|
|
83
|
+
table: {
|
|
84
|
+
defaultValue: { summary: 'None' },
|
|
85
|
+
type: { summary: 'CSS.TEXT_TRANSFORM' },
|
|
86
|
+
},
|
|
87
|
+
},
|
|
66
88
|
type: {
|
|
67
89
|
...formatArgType({ TYPOGRAPHY }),
|
|
68
90
|
description: `Applies font rules`,
|
|
@@ -75,6 +97,8 @@ export default {
|
|
|
75
97
|
},
|
|
76
98
|
args: {
|
|
77
99
|
label: 'Aa',
|
|
100
|
+
textDecoration: TEXT_DECORATION.None,
|
|
101
|
+
textTransform: TEXT_TRANSFORM.None,
|
|
78
102
|
type: TYPOGRAPHY.None,
|
|
79
103
|
},
|
|
80
104
|
parameters,
|
package/src/types/Storybook.ts
CHANGED
|
@@ -217,6 +217,16 @@ export const SHADOW = {
|
|
|
217
217
|
Top: CSS.SHADOW.TOP,
|
|
218
218
|
};
|
|
219
219
|
|
|
220
|
+
export const TEXT_DECORATION = {
|
|
221
|
+
Strikethrough: CSS.STRIKETHROUGH.ON,
|
|
222
|
+
Underline: CSS.UNDERLINE.REST.ON,
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
export const TEXT_TRANSFORM = {
|
|
226
|
+
Lowercase: CSS.TEXT_TRANSFORM.LOWER,
|
|
227
|
+
Uppercase: CSS.TEXT_TRANSFORM.UPPER,
|
|
228
|
+
};
|
|
229
|
+
|
|
220
230
|
export const TRANSPARENT = {
|
|
221
231
|
'100: 90% White': CSS.BG.TRANSPARENT.ONE_HUNDRED,
|
|
222
232
|
'200: 75% White': CSS.BG.TRANSPARENT.TWO_HUNDRED,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import vue from '@vitejs/plugin-vue';
|
|
2
|
+
import { URL, fileURLToPath } from 'node:url';
|
|
3
|
+
import { defineConfig } from 'vite';
|
|
4
|
+
import ViteDts from 'vite-plugin-dts';
|
|
5
|
+
import svgLoader from 'vite-svg-loader';
|
|
6
|
+
|
|
7
|
+
// https://vitejs.dev/config/
|
|
8
|
+
export default defineConfig({
|
|
9
|
+
build: {
|
|
10
|
+
cssCodeSplit: false,
|
|
11
|
+
outDir: 'dist',
|
|
12
|
+
sourcemap: true,
|
|
13
|
+
},
|
|
14
|
+
plugins: [
|
|
15
|
+
vue(),
|
|
16
|
+
svgLoader({
|
|
17
|
+
svgo: false,
|
|
18
|
+
}),
|
|
19
|
+
ViteDts({
|
|
20
|
+
insertTypesEntry: true,
|
|
21
|
+
rollupTypes: true,
|
|
22
|
+
}),
|
|
23
|
+
],
|
|
24
|
+
resolve: {
|
|
25
|
+
alias: {
|
|
26
|
+
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|