tide-design-system 2.0.22 → 2.0.23

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 (216) hide show
  1. package/.eslintrc.cjs +90 -0
  2. package/.storybook/main.ts +60 -0
  3. package/.storybook/preview.ts +252 -0
  4. package/dist/css/grid-layout.css +7 -3
  5. package/dist/tide-design-system.js +45 -39
  6. package/index.ts +122 -0
  7. package/package.json +8 -12
  8. package/src/assets/css/animation.css +14 -0
  9. package/src/assets/css/dynamic-buttons.css +79 -0
  10. package/src/assets/css/dynamic-utilities.css +39 -0
  11. package/src/assets/css/grid-layout.css +71 -0
  12. package/src/assets/css/main.css +5 -0
  13. package/src/assets/css/realm/aero.css +42 -0
  14. package/src/assets/css/realm/atv.css +43 -0
  15. package/src/assets/css/realm/boatmart.css +42 -0
  16. package/src/assets/css/realm/cycle.css +42 -0
  17. package/src/assets/css/realm/equip.css +42 -0
  18. package/src/assets/css/realm/pwc.css +42 -0
  19. package/src/assets/css/realm/rv.css +50 -0
  20. package/src/assets/css/realm/snow.css +42 -0
  21. package/src/assets/css/realm/truck.css +42 -0
  22. package/src/assets/css/reset.css +79 -0
  23. package/src/assets/css/storybook.css +9 -0
  24. package/src/assets/css/utilities.css +1602 -0
  25. package/src/assets/css/variables.css +118 -0
  26. package/src/assets/svg/icons/IconAccountBalance.svg +5 -0
  27. package/src/assets/svg/icons/IconAdd.svg +3 -0
  28. package/src/assets/svg/icons/IconAiDescription.svg +7 -0
  29. package/src/assets/svg/icons/IconAlignSpace.svg +3 -0
  30. package/src/assets/svg/icons/IconApplePay.svg +5 -0
  31. package/src/assets/svg/icons/IconArrowBack.svg +3 -0
  32. package/src/assets/svg/icons/IconArrowForward.svg +3 -0
  33. package/src/assets/svg/icons/IconArrowRight.svg +3 -0
  34. package/src/assets/svg/icons/IconAssignment.svg +5 -0
  35. package/src/assets/svg/icons/IconAwardStar.svg +5 -0
  36. package/src/assets/svg/icons/IconBookmark.svg +5 -0
  37. package/src/assets/svg/icons/IconCalendarMonth.svg +5 -0
  38. package/src/assets/svg/icons/IconCall.svg +5 -0
  39. package/src/assets/svg/icons/IconCheck.svg +3 -0
  40. package/src/assets/svg/icons/IconChevronLeft.svg +3 -0
  41. package/src/assets/svg/icons/IconChevronRight.svg +3 -0
  42. package/src/assets/svg/icons/IconClear.svg +5 -0
  43. package/src/assets/svg/icons/IconClose.svg +3 -0
  44. package/src/assets/svg/icons/IconCycle.svg +5 -0
  45. package/src/assets/svg/icons/IconDelete.svg +5 -0
  46. package/src/assets/svg/icons/IconDiamond.svg +5 -0
  47. package/src/assets/svg/icons/IconDraft.svg +3 -0
  48. package/src/assets/svg/icons/IconEdit.svg +5 -0
  49. package/src/assets/svg/icons/IconError.svg +5 -0
  50. package/src/assets/svg/icons/IconExpandContent.svg +3 -0
  51. package/src/assets/svg/icons/IconExpandLess.svg +3 -0
  52. package/src/assets/svg/icons/IconExpandMore.svg +3 -0
  53. package/src/assets/svg/icons/IconFacebook.svg +5 -0
  54. package/src/assets/svg/icons/IconFavorite.svg +5 -0
  55. package/src/assets/svg/icons/IconFavoriteFilled.svg +5 -0
  56. package/src/assets/svg/icons/IconFormatBold.svg +5 -0
  57. package/src/assets/svg/icons/IconFormatItalic.svg +3 -0
  58. package/src/assets/svg/icons/IconFormatListBulleted.svg +5 -0
  59. package/src/assets/svg/icons/IconForum.svg +5 -0
  60. package/src/assets/svg/icons/IconGavel.svg +5 -0
  61. package/src/assets/svg/icons/IconGoogle.svg +18 -0
  62. package/src/assets/svg/icons/IconGooglePay.svg +5 -0
  63. package/src/assets/svg/icons/IconGrid.svg +3 -0
  64. package/src/assets/svg/icons/IconHeight.svg +3 -0
  65. package/src/assets/svg/icons/IconHelp.svg +5 -0
  66. package/src/assets/svg/icons/IconInfo.svg +5 -0
  67. package/src/assets/svg/icons/IconInsertText.svg +5 -0
  68. package/src/assets/svg/icons/IconInstagram.svg +5 -0
  69. package/src/assets/svg/icons/IconIosShare.svg +5 -0
  70. package/src/assets/svg/icons/IconLayout.svg +5 -0
  71. package/src/assets/svg/icons/IconLinkedIn.svg +5 -0
  72. package/src/assets/svg/icons/IconLocalShipping.svg +5 -0
  73. package/src/assets/svg/icons/IconLock.svg +5 -0
  74. package/src/assets/svg/icons/IconMail.svg +5 -0
  75. package/src/assets/svg/icons/IconMenu.svg +3 -0
  76. package/src/assets/svg/icons/IconMoreHoriz.svg +5 -0
  77. package/src/assets/svg/icons/IconNotifications.svg +5 -0
  78. package/src/assets/svg/icons/IconOpenInNew.svg +5 -0
  79. package/src/assets/svg/icons/IconPalette.svg +5 -0
  80. package/src/assets/svg/icons/IconPaypal.svg +5 -0
  81. package/src/assets/svg/icons/IconPerson.svg +5 -0
  82. package/src/assets/svg/icons/IconPhotoCamera.svg +5 -0
  83. package/src/assets/svg/icons/IconPinterest.svg +5 -0
  84. package/src/assets/svg/icons/IconPlayArrow.svg +3 -0
  85. package/src/assets/svg/icons/IconRemove.svg +3 -0
  86. package/src/assets/svg/icons/IconRoundedCorners.svg +5 -0
  87. package/src/assets/svg/icons/IconRuler.svg +3 -0
  88. package/src/assets/svg/icons/IconSearch.svg +5 -0
  89. package/src/assets/svg/icons/IconSeating.svg +3 -0
  90. package/src/assets/svg/icons/IconSell.svg +5 -0
  91. package/src/assets/svg/icons/IconShare.svg +5 -0
  92. package/src/assets/svg/icons/IconShoppingCart.svg +5 -0
  93. package/src/assets/svg/icons/IconSms.svg +5 -0
  94. package/src/assets/svg/icons/IconStar.svg +5 -0
  95. package/src/assets/svg/icons/IconSwapVert.svg +5 -0
  96. package/src/assets/svg/icons/IconThreeDRotation.svg +18 -0
  97. package/src/assets/svg/icons/IconTrophy.svg +5 -0
  98. package/src/assets/svg/icons/IconTune.svg +5 -0
  99. package/src/assets/svg/icons/IconTwitter.svg +5 -0
  100. package/src/assets/svg/icons/IconVideocam.svg +5 -0
  101. package/src/assets/svg/icons/IconViewInAr.svg +5 -0
  102. package/src/assets/svg/icons/IconVisibility.svg +5 -0
  103. package/src/assets/svg/icons/IconVolumeOff.svg +5 -0
  104. package/src/assets/svg/icons/IconVolumeOn.svg +5 -0
  105. package/src/assets/svg/icons/IconWarning.svg +5 -0
  106. package/src/assets/svg/icons/IconWeight.svg +3 -0
  107. package/src/assets/svg/icons/IconWidth.svg +3 -0
  108. package/src/assets/svg/icons/IconYoutube.svg +5 -0
  109. package/src/components/TideAccordionItem.vue +105 -0
  110. package/src/components/TideAlert.vue +124 -0
  111. package/src/components/TideBackgroundImage.vue +44 -0
  112. package/src/components/TideBadge.vue +30 -0
  113. package/src/components/TideBadgePremium.vue +31 -0
  114. package/src/components/TideBadgeTrustedPartner.vue +38 -0
  115. package/src/components/TideBreadCrumbs.vue +53 -0
  116. package/src/components/TideButton.vue +67 -0
  117. package/src/components/TideButtonIcon.vue +52 -0
  118. package/src/components/TideButtonPagination.vue +71 -0
  119. package/src/components/TideCard.vue +19 -0
  120. package/src/components/TideCarousel.vue +188 -0
  121. package/src/components/TideChipAction.vue +48 -0
  122. package/src/components/TideChipFilter.vue +55 -0
  123. package/src/components/TideChipInput.vue +44 -0
  124. package/src/components/TideColumns.vue +53 -0
  125. package/src/components/TideDivider.vue +24 -0
  126. package/src/components/TideIcon.vue +58 -0
  127. package/src/components/TideImage.vue +44 -0
  128. package/src/components/TideIndicator.vue +57 -0
  129. package/src/components/TideInputCheckbox.vue +145 -0
  130. package/src/components/TideInputRadio.vue +87 -0
  131. package/src/components/TideInputSelect.vue +204 -0
  132. package/src/components/TideInputText.vue +292 -0
  133. package/src/components/TideInputTextarea.vue +196 -0
  134. package/src/components/TideLink.vue +66 -0
  135. package/src/components/TideModal.vue +187 -0
  136. package/src/components/TidePagination.vue +67 -0
  137. package/src/components/TideSeoLinks.vue +58 -0
  138. package/src/components/TideTabs.vue +89 -0
  139. package/src/components/TideToggle.vue +95 -0
  140. package/src/docs/development.md +51 -0
  141. package/src/docs/integration.md +79 -0
  142. package/src/docs/storybook.md +39 -0
  143. package/src/stories/DemoCssUtilities.stories.ts +154 -0
  144. package/src/stories/DemoCssUtilitiesByTextInput.stories.ts +61 -0
  145. package/src/stories/FoundationsBorder.stories.ts +230 -0
  146. package/src/stories/FoundationsGap.stories.ts +180 -0
  147. package/src/stories/FoundationsMargin.stories.ts +155 -0
  148. package/src/stories/FoundationsPadding.stories.ts +108 -0
  149. package/src/stories/FoundationsShadow.stories.ts +84 -0
  150. package/src/stories/FoundationsTypography.stories.ts +172 -0
  151. package/src/stories/Template.stories.ts +71 -0
  152. package/src/stories/TideAccordionItem.stories.ts +68 -0
  153. package/src/stories/TideAlert.stories.ts +58 -0
  154. package/src/stories/TideBackgroundImage.stories.ts +53 -0
  155. package/src/stories/TideBadge.stories.ts +31 -0
  156. package/src/stories/TideBadgePremium.stories.ts +31 -0
  157. package/src/stories/TideBadgeTrustedPartner.stories.ts +33 -0
  158. package/src/stories/TideBreadCrumbs.stories.ts +43 -0
  159. package/src/stories/TideButton.stories.ts +118 -0
  160. package/src/stories/TideButtonIcon.stories.ts +103 -0
  161. package/src/stories/TideButtonPagination.stories.ts +99 -0
  162. package/src/stories/TideCard.stories.ts +38 -0
  163. package/src/stories/TideCarousel.stories.ts +130 -0
  164. package/src/stories/TideChipAction.stories.ts +46 -0
  165. package/src/stories/TideChipFilter.stories.ts +59 -0
  166. package/src/stories/TideChipInput.stories.ts +42 -0
  167. package/src/stories/TideColumns.stories.ts +90 -0
  168. package/src/stories/TideDivider.stories.ts +46 -0
  169. package/src/stories/TideIcon.stories.ts +29 -0
  170. package/src/stories/TideIndicator.stories.ts +31 -0
  171. package/src/stories/TideInputCheckbox.stories.ts +86 -0
  172. package/src/stories/TideInputRadio.stories.ts +71 -0
  173. package/src/stories/TideInputSelect.stories.ts +145 -0
  174. package/src/stories/TideInputText.stories.ts +181 -0
  175. package/src/stories/TideInputTextarea.stories.ts +116 -0
  176. package/src/stories/TideLink.stories.ts +137 -0
  177. package/src/stories/TideModal.stories.ts +122 -0
  178. package/src/stories/TidePagination.stories.ts +83 -0
  179. package/src/stories/TideSeoLinks.stories.ts +67 -0
  180. package/src/stories/TideTabs.stories.ts +100 -0
  181. package/src/stories/TideToggle.stories.ts +69 -0
  182. package/src/stories/Welcome.mdx +17 -0
  183. package/src/types/Alert.ts +8 -0
  184. package/src/types/Badge.ts +21 -0
  185. package/src/types/BreadCrumb.ts +5 -0
  186. package/src/types/Detail.ts +4 -0
  187. package/src/types/Element.ts +13 -0
  188. package/src/types/FacetRange.ts +84 -0
  189. package/src/types/Field.ts +54 -0
  190. package/src/types/Form.ts +58 -0
  191. package/src/types/Formatted.ts +22 -0
  192. package/src/types/Icon.ts +87 -0
  193. package/src/types/Link.ts +5 -0
  194. package/src/types/ListingMedia.ts +43 -0
  195. package/src/types/Orientation.ts +6 -0
  196. package/src/types/Priority.ts +11 -0
  197. package/src/types/Raw.ts +5 -0
  198. package/src/types/Realm.ts +13 -0
  199. package/src/types/RealmConfig.ts +14 -0
  200. package/src/types/Select.ts +10 -0
  201. package/src/types/Size.ts +6 -0
  202. package/src/types/Storybook.ts +219 -0
  203. package/src/types/Styles.ts +590 -0
  204. package/src/types/Tab.ts +5 -0
  205. package/src/types/Target.ts +6 -0
  206. package/src/types/TextInput.ts +16 -0
  207. package/src/types/Validation.ts +24 -0
  208. package/src/utilities/format.ts +184 -0
  209. package/src/utilities/storybook.ts +295 -0
  210. package/src/utilities/validation.ts +197 -0
  211. package/tests/utilities-format.spec.ts +430 -0
  212. package/tsconfig.app.json +14 -0
  213. package/tsconfig.config.json +12 -0
  214. package/tsconfig.json +22 -0
  215. package/tsconfig.vitest.json +10 -0
  216. package/vite.config.ts +43 -0
package/.eslintrc.cjs ADDED
@@ -0,0 +1,90 @@
1
+ /* eslint-env node */
2
+ require('@rushstack/eslint-patch/modern-module-resolution');
3
+
4
+ module.exports = {
5
+ extends: [
6
+ 'plugin:vue/vue3-recommended',
7
+ 'eslint:recommended',
8
+ '@vue/eslint-config-typescript',
9
+ '@vue/eslint-config-prettier',
10
+ 'plugin:storybook/recommended',
11
+ ],
12
+ ignorePatterns: ['storybook-static/'],
13
+ parserOptions: {
14
+ ecmaVersion: 'latest',
15
+ },
16
+ root: true,
17
+ rules: {
18
+ 'prettier/prettier': [
19
+ 'warn',
20
+ {
21
+ bracketLine: false,
22
+ printWidth: 120,
23
+ quoteProps: 'consistent',
24
+ singleAttributePerLine: true,
25
+ singleQuote: true,
26
+ tabWidth: 2,
27
+ vueIndentScriptAndStyle: true,
28
+ },
29
+ ],
30
+ 'quote-props': ['warn', 'consistent-as-needed'],
31
+ 'vue/attributes-order': [
32
+ 'warn',
33
+ {
34
+ alphabetical: true,
35
+ // Replicates ASCII sort order w/ special characters.
36
+ order: [
37
+ [
38
+ 'UNIQUE', // :prop='foo'
39
+ 'ATTR_DYNAMIC', // :class='foo'
40
+ ],
41
+ 'EVENTS', // @click='getFoo'
42
+ [
43
+ 'ATTR_SHORTHAND_BOOL',
44
+ 'ATTR_STATIC',
45
+ 'CONDITIONALS',
46
+ 'CONTENT',
47
+ 'DEFINITION',
48
+ 'GLOBAL',
49
+ 'LIST_RENDERING',
50
+ 'OTHER_DIRECTIVES',
51
+ 'RENDER_MODIFIERS',
52
+ 'SLOT',
53
+ 'TWO_WAY_BINDING',
54
+ ],
55
+ ],
56
+ },
57
+ ],
58
+ 'vue/component-tags-order': [
59
+ 'warn',
60
+ {
61
+ order: ['script', 'template', 'style[scoped]', 'style:not([scoped])'],
62
+ },
63
+ ],
64
+ 'vue/html-self-closing': [
65
+ 'error',
66
+ {
67
+ html: {
68
+ component: 'always',
69
+ normal: 'always',
70
+ void: 'always',
71
+ },
72
+ },
73
+ ],
74
+ 'vue/multiline-html-element-content-newline': [
75
+ 'warn',
76
+ {
77
+ ignores: ['pre', 'textarea'],
78
+ },
79
+ ],
80
+ 'vue/script-indent': [
81
+ 'off', // Disabled bc ESLint and Prettier's indentation rules conflict.
82
+ 2,
83
+ {
84
+ baseIndent: 1,
85
+ switchCase: 1,
86
+ },
87
+ ],
88
+ 'vue/sort-keys': ['warn', 'asc'],
89
+ },
90
+ };
@@ -0,0 +1,60 @@
1
+ import type { StorybookConfig } from '@storybook/vue3-vite';
2
+
3
+ const config: StorybookConfig = {
4
+ addons: [
5
+ '@storybook/addon-a11y',
6
+ '@storybook/addon-essentials',
7
+ ],
8
+ docs: {
9
+ autodocs: 'tag',
10
+ },
11
+ framework: {
12
+ name: '@storybook/vue3-vite',
13
+ options: {},
14
+ },
15
+ stories: [
16
+ '../src/stories/Welcome.mdx',
17
+ // '../src/stories/*.stories.ts',
18
+
19
+ '../src/stories/Demo*.stories.ts',
20
+ '../src/stories/Foundations*.stories.ts',
21
+
22
+ '../src/stories/TideAccordionItem.stories.ts',
23
+ '../src/stories/TideAlert.stories.ts',
24
+ '../src/stories/TideBackgroundImage.stories.ts',
25
+ '../src/stories/TideBadge.stories.ts',
26
+ '../src/stories/TideBadgePremium.stories.ts',
27
+ '../src/stories/TideBadgeTrustedPartner.stories.ts',
28
+ '../src/stories/TideBreadCrumbs.stories.ts',
29
+ '../src/stories/TideButton.stories.ts',
30
+ '../src/stories/TideButtonIcon.stories.ts',
31
+ '../src/stories/TideButtonPagination.stories.ts',
32
+ // '../src/stories/TideCard.stories.ts',
33
+ // '../src/stories/TideCarousel.stories.ts',
34
+ '../src/stories/TideChipAction.stories.ts',
35
+ '../src/stories/TideChipFilter.stories.ts',
36
+ '../src/stories/TideChipInput.stories.ts',
37
+ '../src/stories/TideColumns.stories.ts',
38
+ '../src/stories/TideDivider.stories.ts',
39
+ '../src/stories/TideIcon.stories.ts',
40
+ '../src/stories/TideIndicator.stories.ts',
41
+ // '../src/stories/TideImage.stories.ts',
42
+ '../src/stories/TideInputCheckbox.stories.ts',
43
+ '../src/stories/TideInputRadio.stories.ts',
44
+ '../src/stories/TideInputSelect.stories.ts',
45
+ '../src/stories/TideInputText.stories.ts',
46
+ '../src/stories/TideInputTextarea.stories.ts',
47
+ '../src/stories/TideLink.stories.ts',
48
+ '../src/stories/TideModal.stories.ts',
49
+ // '../src/stories/TidePagination.stories.ts',
50
+ // '../src/stories/TideSeoLinks.stories.ts',
51
+ '../src/stories/TideTabs.stories.ts',
52
+ '../src/stories/TideToggle.stories.ts',
53
+ ],
54
+ viteFinal: async (config, { configType }) => {
55
+ if (config.build) config.build.sourcemap = 'inline'
56
+ return config;
57
+ },
58
+ };
59
+
60
+ export default config;
@@ -0,0 +1,252 @@
1
+ import { useArgs } from '@storybook/preview-api';
2
+
3
+ import type { Preview } from '@storybook/vue3';
4
+
5
+ import '@/assets/css/main.css';
6
+ import '@/assets/css/reset.css';
7
+ import '@/assets/css/storybook.css';
8
+
9
+ import DemoCssUtilities from '../src/stories/DemoCssUtilities.stories';
10
+ import DemoCssUtilitiesByTextInput from '../src/stories/DemoCssUtilitiesByTextInput.stories';
11
+ import FoundationsMargin from '../src/stories/FoundationsMargin.stories';
12
+ import TideCarousel from '../src/stories/TideCarousel.stories';
13
+
14
+ const cssRoot = import.meta.env.PROD ? '/public' : '/src/assets/css/realm';
15
+
16
+ const replaceRealmStyles = (realm: string) => {
17
+ document.getElementById('realmStyles')?.remove();
18
+
19
+ const href = `${cssRoot}/${realm}.css`;
20
+ const realmStyles = document.createElement('link');
21
+
22
+ realmStyles.href = href;
23
+ realmStyles.id = 'realmStyles';
24
+ realmStyles.rel = 'stylesheet';
25
+ document.body.append(realmStyles);
26
+ };
27
+
28
+ const preview: Preview = {
29
+ decorators: [
30
+ (story, context) => {
31
+ const decoratorOptOuts = [
32
+ DemoCssUtilities.title,
33
+ DemoCssUtilitiesByTextInput.title,
34
+ FoundationsMargin.title,
35
+ TideCarousel.title,
36
+ ];
37
+
38
+ const decoratorCss = decoratorOptOuts.includes(context.title) ? '' : 'tide-padding-top-2 tide-padding-x-2';
39
+
40
+ replaceRealmStyles(context.globals.realm);
41
+
42
+ return {
43
+ components: { story },
44
+ template: `<div class="${decoratorCss} tide-padding-bottom-4 ${context.globals.surfaceBg} ${context.globals.surfaceFg}"><story /></div>`
45
+ };
46
+ },
47
+ (story, context) => {
48
+ const [args, updateArgs] = useArgs();
49
+
50
+ return story({ ...context, updateArgs });
51
+ },
52
+ ],
53
+ globalTypes: {
54
+ realm: {
55
+ description: 'Determines Realm context of dynamic CSS utilities',
56
+ defaultValue: 'rv',
57
+ toolbar: {
58
+ dynamicTitle: true,
59
+ items: [
60
+ {
61
+ title: 'Realm: Aero',
62
+ value: 'aero',
63
+ },
64
+ {
65
+ title: 'Realm: ATV',
66
+ value: 'atv',
67
+ },
68
+ {
69
+ title: 'Realm: Boatmart',
70
+ value: 'boatmart',
71
+ },
72
+ {
73
+ title: 'Realm: Cycle',
74
+ value: 'cycle',
75
+ },
76
+ {
77
+ title: 'Realm: Equipment',
78
+ value: 'equip',
79
+ },
80
+ {
81
+ title: 'Realm: PWC',
82
+ value: 'pwc',
83
+ },
84
+ {
85
+ title: 'Realm: RV',
86
+ value: 'rv',
87
+ },
88
+ {
89
+ title: 'Realm: Snow',
90
+ value: 'snow',
91
+ },
92
+ {
93
+ title: 'Realm: Truck',
94
+ value: 'truck',
95
+ },
96
+ ],
97
+ title: 'Realm',
98
+ },
99
+ },
100
+ surfaceBg: {
101
+ description: 'Determines Background context of dynamic CSS utilities',
102
+ defaultValue: 'tide-bg-surface',
103
+ toolbar: {
104
+ dynamicTitle: true,
105
+ items: [
106
+ {
107
+ title: 'Surface: Default',
108
+ value: 'tide-bg-surface',
109
+ },
110
+ {
111
+ title: 'Surface: Variant',
112
+ value: 'tide-bg-surface-variant',
113
+ },
114
+ {
115
+ title: 'Surface: Brand',
116
+ value: 'tide-bg-surface-brand',
117
+ },
118
+ {
119
+ title: 'Surface: Accent',
120
+ value: 'tide-bg-surface-accent',
121
+ },
122
+ {
123
+ title: 'Surface: Accent Variant',
124
+ value: 'tide-bg-surface-accent-variant',
125
+ },
126
+ {
127
+ title: 'Surface: Gradient',
128
+ value: 'tide-bg-surface-gradient',
129
+ },
130
+ {
131
+ title: 'Surface: Floating',
132
+ value: 'tide-bg-surface-floating',
133
+ },
134
+ ],
135
+ title: 'Surface',
136
+ },
137
+ },
138
+ surfaceFg: {
139
+ description: 'Determines Foreground context of dynamic CSS utilities',
140
+ defaultValue: 'tide-on-surface',
141
+ toolbar: {
142
+ dynamicTitle: true,
143
+ items: [
144
+ {
145
+ title: 'On Surface: Default',
146
+ value: 'tide-font-on-surface',
147
+ },
148
+ {
149
+ title: 'On Surface: Variant',
150
+ value: 'tide-font-on-surface-variant',
151
+ },
152
+ {
153
+ title: 'On Surface: Brand',
154
+ value: 'tide-font-on-surface-brand',
155
+ },
156
+ {
157
+ title: 'On Surface: Inverse',
158
+ value: 'tide-font-on-surface-inverse',
159
+ },
160
+ {
161
+ title: 'On Surface: Variant Inverse',
162
+ value: 'tide-font-on-surface-variant-inverse',
163
+ },
164
+ ],
165
+ title: 'On Surface',
166
+ },
167
+ },
168
+ },
169
+ parameters: {
170
+ backgrounds: { disable: true },
171
+ docs: {
172
+ canvas: {
173
+ // sourceState: 'shown',
174
+ withToolbar: false,
175
+ },
176
+ controls: { sort: 'requiredFirst' },
177
+ source: { type: 'dynamic' },
178
+ },
179
+ layout: 'fullscreen',
180
+ options: {
181
+ storySort: {
182
+ order: [
183
+ 'Welcome',
184
+ 'Foundations',
185
+ 'Basic Components',
186
+ 'Proof of Concept', [
187
+ 'CSS Utilities Demo',
188
+ 'CSS Utilities By Text Input',
189
+ ],
190
+ ],
191
+ },
192
+ },
193
+ toolbar: {
194
+ grid: { hidden: true },
195
+ },
196
+ viewport: {
197
+ viewports: {
198
+ extraSmallMin: {
199
+ name: 'Extra Small (iPhone 12/13 Mini)',
200
+ styles: {
201
+ width: '375px',
202
+ height: '812px',
203
+ },
204
+ },
205
+ extraSmallMax: {
206
+ name: 'Extra Small Max',
207
+ styles: {
208
+ width: '767px',
209
+ height: '100%',
210
+ },
211
+ },
212
+ smallMin: {
213
+ name: 'Small Min',
214
+ styles: {
215
+ width: '768px',
216
+ height: '100%',
217
+ },
218
+ },
219
+ smallMax: {
220
+ name: 'Small Max',
221
+ styles: {
222
+ width: '991px',
223
+ height: '100%',
224
+ },
225
+ },
226
+ mediumMin: {
227
+ name: 'Medium Min',
228
+ styles: {
229
+ width: '992px',
230
+ height: '100%',
231
+ },
232
+ },
233
+ mediumMax: {
234
+ name: 'Medium Max',
235
+ styles: {
236
+ width: '1231px',
237
+ height: '100%',
238
+ },
239
+ },
240
+ largeMin: {
241
+ name: 'Large Min',
242
+ styles: {
243
+ width: '1232px',
244
+ height: '100%',
245
+ },
246
+ },
247
+ },
248
+ },
249
+ },
250
+ };
251
+
252
+ export default preview;
@@ -11,12 +11,16 @@
11
11
  --tide-gap-width: var(--tide-spacing-1);
12
12
  --tide-gutter-width: var(--tide-spacing-1);
13
13
  --tide-gutter-width-offset: calc(var(--tide-gutter-width) - var(--tide-gap-width));
14
+ }
14
15
 
15
- @media (min-width: 768px) {
16
- --tide-gutter-width: var(--tide-spacing-2);
16
+ @media (min-width: 768px) {
17
+ .tide-grid-layout {
18
+ --tide-gutter-width: var(--tide-spacing-2);
17
19
  }
20
+ }
18
21
 
19
- @media (min-width: 992px) {
22
+ @media (min-width: 992px) {
23
+ .tide-grid-layout {
20
24
  --tide-gap-width: var(--tide-spacing-2);
21
25
  }
22
26
  }