@hopper-ui/styled-system 1.2.0 → 2.0.0

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 (46) hide show
  1. package/CHANGELOG.md +103 -0
  2. package/dist/StyledSystemProvider.css +34 -34
  3. package/dist/StyledSystemProvider.d.ts +3 -0
  4. package/dist/StyledSystemProvider.js +15 -15
  5. package/dist/{chunk-DRFY5W7M.js → chunk-5GX5VZFT.js} +1 -1
  6. package/dist/{chunk-KLNF34G6.js → chunk-5U5IRAPA.js} +1 -1
  7. package/dist/{chunk-EJR6CH3T.js → chunk-AZ44JR7G.js} +1 -1
  8. package/dist/{chunk-J2UW6IZ5.js → chunk-BA7JHGU6.js} +1 -1
  9. package/dist/{chunk-JKXZGQAL.js → chunk-DVOV55CD.js} +228 -189
  10. package/dist/{chunk-45MYTH4M.js → chunk-EF3UX45A.js} +2 -2
  11. package/dist/{chunk-MCUHAIA4.js → chunk-GXUFWEP5.js} +2 -2
  12. package/dist/{chunk-LCW3QCQQ.js → chunk-GZ3MQOPA.js} +2 -2
  13. package/dist/{chunk-GFXIV6J4.js → chunk-REAV6RA4.js} +21 -19
  14. package/dist/{chunk-TSYETPJT.js → chunk-SSBFBJJN.js} +2 -2
  15. package/dist/{chunk-ZDENFQ6H.js → chunk-VJNKYHHT.js} +2 -2
  16. package/dist/{chunk-RKTVEOXM.js → chunk-XEJOSGGW.js} +6 -6
  17. package/dist/{chunk-KKVEOD5L.js → chunk-Y7GWSHYF.js} +200 -161
  18. package/dist/{chunk-E2EGUGKS.js → chunk-YJKWZYVH.js} +268 -227
  19. package/dist/color-scheme/useColorScheme.js +2 -2
  20. package/dist/global-styles/BodyStyleProvider.js +2 -2
  21. package/dist/html-wrappers/html.css +34 -34
  22. package/dist/html-wrappers/html.js +5 -5
  23. package/dist/html-wrappers/htmlElement.css +34 -34
  24. package/dist/html-wrappers/htmlElement.js +4 -4
  25. package/dist/index.css +34 -34
  26. package/dist/index.js +15 -15
  27. package/dist/responsive/BreakpointProvider.d.ts +5 -0
  28. package/dist/responsive/BreakpointProvider.js +2 -2
  29. package/dist/styledSystemRootCssClass.js +1 -1
  30. package/dist/tokens/TokenProvider.js +5 -5
  31. package/dist/tokens/generated/darkSemanticTokens.d.ts +265 -224
  32. package/dist/tokens/generated/darkSemanticTokens.js +1 -1
  33. package/dist/tokens/generated/lightSemanticTokens.d.ts +226 -187
  34. package/dist/tokens/generated/lightSemanticTokens.js +1 -1
  35. package/dist/tokens/generated/styledSystemToTokenMappings.d.ts +197 -158
  36. package/dist/tokens/generated/styledSystemToTokenMappings.js +1 -1
  37. package/dist/tokens/tokenMappings.d.ts +261 -213
  38. package/dist/tokens/tokenMappings.js +2 -2
  39. package/dist/tokens/tokens.d.ts +501 -421
  40. package/dist/tokens/tokens.js +3 -3
  41. package/dist/useStyledSystem.css +31 -31
  42. package/dist/useStyledSystem.d.ts +1 -1
  43. package/dist/useStyledSystem.js +3 -3
  44. package/dist/utils/useMediaQuery.js +1 -1
  45. package/package.json +22 -20
  46. package/dist/{chunk-M4X2T3D3.js → chunk-T6JS7L6B.js} +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,108 @@
1
1
  # @hopper-ui/styled-system
2
2
 
3
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - c5c6b30: ## @hopper-ui/tokens
8
+
9
+ **Added**
10
+
11
+ | Token |
12
+ | ------------------------------------- |
13
+ | danger-text-selected |
14
+ | danger-border-selected |
15
+ | danger-icon-selected |
16
+ | danger-icon-weak-hover |
17
+ | danger-icon-weak-press |
18
+ | danger-surface-selected |
19
+ | danger-surface-weak-hover |
20
+ | danger-surface-weak-press |
21
+ | danger-text-weak-hover |
22
+ | danger-text-weak-press |
23
+ | decorative-option5-surface-weak-hover |
24
+ | neutral-surface-weak-selected |
25
+ | neutral-surface-weakest-selected |
26
+ | neutral-border-selected |
27
+ | neutral-icon-selected |
28
+ | neutral-icon-strong-hover |
29
+ | neutral-icon-weak-press |
30
+ | neutral-surface-selected |
31
+ | neutral-text-weak-hover |
32
+ | neutral-text-weak-press |
33
+ | primary-border-selected |
34
+ | primary-icon-selected |
35
+ | primary-surface-selected |
36
+ | primary-surface-strong-selected |
37
+ | primary-surface-weak-hover |
38
+ | primary-surface-weak-press |
39
+ | primary-text-selected |
40
+ | upsell-border-selected |
41
+ | upsell-icon-selected |
42
+ | upsell-icon-hover |
43
+ | upsell-icon-weak-hover |
44
+ | upsell-icon-weak-press |
45
+ | upsell-surface-selected |
46
+ | upsell-surface-weak-hover |
47
+ | upsell-surface-weak-press |
48
+ | upsell-text-selected |
49
+ | upsell-text-weak |
50
+ | upsell-text-weak-hover |
51
+ | upsell-text-weak-press |
52
+
53
+ **Renamed**
54
+
55
+ Use this as a reference to fix all breaking changes.
56
+
57
+ | Old Token name | New Token name |
58
+ | ----------------------------- | ---------------------------- |
59
+ | danger-border-active | danger-border-press |
60
+ | danger-icon-active | danger-icon-press |
61
+ | danger-text-active | danger-text-press |
62
+ | danger-surface-active | danger-surface-press |
63
+ | neutral-border-active | neutral-border-press |
64
+ | neutral-icon-active | neutral-icon-press |
65
+ | neutral-surface-active | neutral-surface-press |
66
+ | neutral-surface-weak-active | neutral-surface-weak-press |
67
+ | neutral-text-active | neutral-text-press |
68
+ | primary-border-active | primary-border-press |
69
+ | primary-icon-active | primary-icon-press |
70
+ | primary-surface-active | primary-surface-press |
71
+ | primary-text-active | primary-text-press |
72
+ | primary-surface-strong-active | primary-surface-strong-press |
73
+ | upsell-border-active | upsell-border-press |
74
+ | upsell-icon-active | upsell-icon-press |
75
+ | upsell-surface-active | upsell-surface-press |
76
+ | upsell-text-active | upsell-text-press |
77
+
78
+ **Updated**
79
+
80
+ | Token |
81
+ | ---------------------------- |
82
+ | danger-surface-hover |
83
+ | danger-surface-strong |
84
+ | danger-surface-strong-hover |
85
+ | danger-text-weak |
86
+ | status-progress-text |
87
+ | status-progress-icon |
88
+ | primary-surface-strong-hover |
89
+ | primary-text |
90
+ | primary-surface-hover |
91
+ | upsell-surface-hover |
92
+ | upsell-surface-weak |
93
+ | upsell-text |
94
+ | upsell-icon |
95
+ | upsell-text-hover |
96
+
97
+ ## @hopper-ui/components
98
+
99
+ - Added a press state to Links
100
+ - Added a press state to Buttons
101
+ - Added a press state to Checkbbox
102
+ - Added a press state to Switch
103
+ - Added a press state to Radio
104
+ - Added numerous tests to test Pressed States of components
105
+
3
106
  ## 1.2.0
4
107
 
5
108
  ### Minor Changes
@@ -1,132 +1,132 @@
1
1
  /* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/styled-system/src/UseStyledSystem.module.css/#css-module-data */
2
- .UseStyledSystem-module__hop-b-hover___Zqeu5:hover {
2
+ .UseStyledSystem-module__hop-b-hover___Plz1Z:hover {
3
3
  --hop-b-hover: initial;
4
4
  border: var(--hop-b-hover) !important;
5
5
  }
6
- .UseStyledSystem-module__hop-bb-hover___a1mz8:hover {
6
+ .UseStyledSystem-module__hop-bb-hover___duyqg:hover {
7
7
  --hop-bb-hover: initial;
8
8
  border-bottom: var(--hop-bb-hover) !important;
9
9
  }
10
- .UseStyledSystem-module__hop-bl-hover___BVwnM:hover {
10
+ .UseStyledSystem-module__hop-bl-hover___SSZt0:hover {
11
11
  --hop-bl-hover: initial;
12
12
  border-left: var(--hop-bl-hover) !important;
13
13
  }
14
- .UseStyledSystem-module__hop-br-hover___hTuCm:hover {
14
+ .UseStyledSystem-module__hop-br-hover___cc-cR:hover {
15
15
  --hop-br-hover: initial;
16
16
  border-right: var(--hop-br-hover) !important;
17
17
  }
18
- .UseStyledSystem-module__hop-bt-hover___adE7m:hover {
18
+ .UseStyledSystem-module__hop-bt-hover___vzXA1:hover {
19
19
  --hop-bt-hover: initial;
20
20
  border-top: var(--hop-bt-hover) !important;
21
21
  }
22
- .UseStyledSystem-module__hop-b-focus___DfUJn:focus-visible {
22
+ .UseStyledSystem-module__hop-b-focus___hVIrm:focus-visible {
23
23
  --hop-b-focus: initial;
24
24
  border: var(--hop-b-focus) !important;
25
25
  }
26
- .UseStyledSystem-module__hop-bb-focus___axUzQ:focus-visible {
26
+ .UseStyledSystem-module__hop-bb-focus___f9mPE:focus-visible {
27
27
  --hop-bb-focus: initial;
28
28
  border-bottom: var(--hop-bb-focus) !important;
29
29
  }
30
- .UseStyledSystem-module__hop-bl-focus___AHFjp:focus-visible {
30
+ .UseStyledSystem-module__hop-bl-focus___xF6Bc:focus-visible {
31
31
  --hop-bl-focus: initial;
32
32
  border-left: var(--hop-bl-focus) !important;
33
33
  }
34
- .UseStyledSystem-module__hop-br-focus___5mdx8:focus-visible {
34
+ .UseStyledSystem-module__hop-br-focus___ptv3o:focus-visible {
35
35
  --hop-br-focus: initial;
36
36
  border-right: var(--hop-br-focus) !important;
37
37
  }
38
- .UseStyledSystem-module__hop-bt-focus___ybiFb:focus-visible {
38
+ .UseStyledSystem-module__hop-bt-focus___MNw8i:focus-visible {
39
39
  --hop-bt-focus: initial;
40
40
  border-top: var(--hop-bt-focus) !important;
41
41
  }
42
- .UseStyledSystem-module__hop-b-active___BU6Oj:active {
42
+ .UseStyledSystem-module__hop-b-active___rWbbY:active {
43
43
  --hop-b-active: initial;
44
44
  border: var(--hop-b-active) !important;
45
45
  }
46
- .UseStyledSystem-module__hop-bb-active___pFoxa:active {
46
+ .UseStyledSystem-module__hop-bb-active___LX6qX:active {
47
47
  --hop-bb-active: initial;
48
48
  border-bottom: var(--hop-bb-active) !important;
49
49
  }
50
- .UseStyledSystem-module__hop-bl-active___ueWsf:active {
50
+ .UseStyledSystem-module__hop-bl-active___VSuvj:active {
51
51
  --hop-bl-active: initial;
52
52
  border-left: var(--hop-bl-active) !important;
53
53
  }
54
- .UseStyledSystem-module__hop-br-active___sBjPX:active {
54
+ .UseStyledSystem-module__hop-br-active___JMM30:active {
55
55
  --hop-br-active: initial;
56
56
  border-right: var(--hop-br-active) !important;
57
57
  }
58
- .UseStyledSystem-module__hop-bt-active___ldKxI:active {
58
+ .UseStyledSystem-module__hop-bt-active___r6-6b:active {
59
59
  --hop-bt-active: initial;
60
60
  border-top: var(--hop-bt-active) !important;
61
61
  }
62
- .UseStyledSystem-module__hop-bg-hover___Gzm9t:hover {
62
+ .UseStyledSystem-module__hop-bg-hover___LcLu5:hover {
63
63
  --hop-bg-hover: initial;
64
64
  background-color: var(--hop-bg-hover) !important;
65
65
  }
66
- .UseStyledSystem-module__hop-bg-focus___jIrSB:focus-visible {
66
+ .UseStyledSystem-module__hop-bg-focus___viVUG:focus-visible {
67
67
  --hop-bg-focus: initial;
68
68
  background-color: var(--hop-bg-focus) !important;
69
69
  }
70
- .UseStyledSystem-module__hop-bg-active___fafHA:active {
70
+ .UseStyledSystem-module__hop-bg-active___e--6L:active {
71
71
  --hop-bg-active: initial;
72
72
  background-color: var(--hop-bg-active) !important;
73
73
  }
74
- .UseStyledSystem-module__hop-bs-hover___Zoiej:hover {
74
+ .UseStyledSystem-module__hop-bs-hover___1YDvX:hover {
75
75
  --hop-bs-hover: initial;
76
76
  box-shadow: var(--hop-bs-hover) !important;
77
77
  }
78
- .UseStyledSystem-module__hop-bs-focus___Ojcth:focus-visible {
78
+ .UseStyledSystem-module__hop-bs-focus___uu9Ac:focus-visible {
79
79
  --hop-bs-focus: initial;
80
80
  box-shadow: var(--hop-bs-focus) !important;
81
81
  }
82
- .UseStyledSystem-module__hop-bs-active___8gnFg:active {
82
+ .UseStyledSystem-module__hop-bs-active___v8uK1:active {
83
83
  --hop-bs-active: initial;
84
84
  box-shadow: var(--hop-bs-active) !important;
85
85
  }
86
- .UseStyledSystem-module__hop-c-hover___Q88Tg:hover {
86
+ .UseStyledSystem-module__hop-c-hover___8yXVl:hover {
87
87
  --hop-c-hover: initial;
88
88
  color: var(--hop-c-hover) !important;
89
89
  }
90
- .UseStyledSystem-module__hop-c-focus___Vyuyv:focus-visible {
90
+ .UseStyledSystem-module__hop-c-focus___YNdjT:focus-visible {
91
91
  --hop-c-focus: initial;
92
92
  color: var(--hop-c-focus) !important;
93
93
  }
94
- .UseStyledSystem-module__hop-c-active___UquV3:active {
94
+ .UseStyledSystem-module__hop-c-active___crOAD:active {
95
95
  --hop-c-active: initial;
96
96
  color: var(--hop-c-active) !important;
97
97
  }
98
- .UseStyledSystem-module__hop-cs-hover___GqEOP:hover {
98
+ .UseStyledSystem-module__hop-cs-hover___MCgaD:hover {
99
99
  --hop-cs-hover: initial;
100
100
  cursor: var(--hop-cs-hover) !important;
101
101
  }
102
- .UseStyledSystem-module__hop-f-hover___7EKmX:hover {
102
+ .UseStyledSystem-module__hop-f-hover___dxKWH:hover {
103
103
  --hop-f-hover: initial;
104
104
  fill: var(--hop-f-hover) !important;
105
105
  }
106
- .UseStyledSystem-module__hop-f-focus___k-Xh5:focus-visible {
106
+ .UseStyledSystem-module__hop-f-focus___y-fcL:focus-visible {
107
107
  --hop-f-focus: initial;
108
108
  fill: var(--hop-f-focus) !important;
109
109
  }
110
- .UseStyledSystem-module__hop-o-hover___bSfTb:hover {
110
+ .UseStyledSystem-module__hop-o-hover___IWVF-:hover {
111
111
  --hop-o-hover: initial;
112
112
  opacity: var(--hop-o-hover) !important;
113
113
  }
114
- .UseStyledSystem-module__hop-o-focus___92q-T:focus-visible {
114
+ .UseStyledSystem-module__hop-o-focus___IaFLw:focus-visible {
115
115
  --hop-o-focus: initial;
116
116
  opacity: var(--hop-o-focus) !important;
117
117
  }
118
- .UseStyledSystem-module__hop-o-active___qojJF:active {
118
+ .UseStyledSystem-module__hop-o-active___caQJi:active {
119
119
  --hop-o-active: initial;
120
120
  opacity: var(--hop-o-active) !important;
121
121
  }
122
- .UseStyledSystem-module__hop-ol-focus___U-dIO:focus-visible {
122
+ .UseStyledSystem-module__hop-ol-focus___ybCdL:focus-visible {
123
123
  --hop-ol-focus: initial;
124
124
  color: var(--hop-ol-focus) !important;
125
125
  }
126
126
 
127
127
  /* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/styled-system/src/html-wrappers/htmlElement.module.css/#css-module-data */
128
- :where(.htmlElement-module__hop-HtmlElement___g-x90),
129
- :where(.htmlElement-module__hop-HtmlElement___g-x90::after),
130
- :where(.htmlElement-module__hop-HtmlElement___g-x90::before) {
128
+ :where(.htmlElement-module__hop-HtmlElement___0OW8N),
129
+ :where(.htmlElement-module__hop-HtmlElement___0OW8N::after),
130
+ :where(.htmlElement-module__hop-HtmlElement___0OW8N::before) {
131
131
  box-sizing: border-box;
132
132
  }
@@ -21,15 +21,18 @@ interface StyledSystemProviderProps extends BreakpointProviderProps, DivProps {
21
21
  withBodyStyle?: boolean;
22
22
  /**
23
23
  * The color scheme to use.
24
+ * @default "light"
24
25
  */
25
26
  colorScheme: ColorSchemeOrSystem;
26
27
  /**
27
28
  * Default color scheme to use when a user preferred color scheme (system) is not available.
29
+ * @default "light"
28
30
  */
29
31
  defaultColorScheme?: ColorScheme;
30
32
  /**
31
33
  * Determines whether token CSS variables should be added to the document's head
32
34
  * By default, it is set to `true`, you should not change it unless you want to manage CSS variables via `.css` files
35
+ * @default true
33
36
  */
34
37
  withCssVariables?: boolean;
35
38
  }
@@ -1,26 +1,26 @@
1
- export { GlobalStyledSystemProviderCssSelector, _StyledSystemProvider as StyledSystemProvider } from './chunk-RKTVEOXM.js';
2
- import './chunk-J2UW6IZ5.js';
1
+ export { GlobalStyledSystemProviderCssSelector, _StyledSystemProvider as StyledSystemProvider } from './chunk-XEJOSGGW.js';
2
+ import './chunk-BA7JHGU6.js';
3
3
  import './chunk-3YM73BQP.js';
4
4
  import './chunk-B6ZBFYWJ.js';
5
- import './chunk-EJR6CH3T.js';
6
- import './chunk-LCW3QCQQ.js';
7
- import './chunk-MCUHAIA4.js';
8
- import './chunk-ZDENFQ6H.js';
9
- import './chunk-45MYTH4M.js';
10
- import './chunk-E2EGUGKS.js';
11
- import './chunk-JKXZGQAL.js';
5
+ import './chunk-AZ44JR7G.js';
6
+ import './chunk-GZ3MQOPA.js';
7
+ import './chunk-GXUFWEP5.js';
8
+ import './chunk-VJNKYHHT.js';
9
+ import './chunk-EF3UX45A.js';
10
+ import './chunk-YJKWZYVH.js';
11
+ import './chunk-DVOV55CD.js';
12
12
  import './chunk-RIORU7JO.js';
13
13
  import './chunk-YPIK2HRL.js';
14
- import './chunk-GFXIV6J4.js';
15
- import './chunk-TSYETPJT.js';
16
- import './chunk-DRFY5W7M.js';
17
- import './chunk-KKVEOD5L.js';
14
+ import './chunk-REAV6RA4.js';
15
+ import './chunk-SSBFBJJN.js';
16
+ import './chunk-5GX5VZFT.js';
17
+ import './chunk-Y7GWSHYF.js';
18
18
  import './chunk-SFOVKOPG.js';
19
19
  import './chunk-VBKLISDI.js';
20
20
  import './chunk-XUHDFZZL.js';
21
21
  import './chunk-U5R6ZXH3.js';
22
22
  import './chunk-QMDDVBCZ.js';
23
- import './chunk-KLNF34G6.js';
24
- import './chunk-M4X2T3D3.js';
23
+ import './chunk-5U5IRAPA.js';
24
+ import './chunk-T6JS7L6B.js';
25
25
  import './chunk-V7X6ANEM.js';
26
26
  import './chunk-6LX4VMOV.js';
@@ -1,4 +1,4 @@
1
- import { HopperVariablePrefix, HopperColors, DataVizColors, BackgroundColors, TextColors, IconColors, Elevation, FontSize, FontWeight, LineHeight, FontFamily, Shape, CoreSpace, SemanticSimplePaddingSpace, SemanticComplexPaddingSpace, SemanticSimpleMarginSpace, SemanticComplexMarginSpace } from './chunk-KKVEOD5L.js';
1
+ import { HopperVariablePrefix, HopperColors, DataVizColors, BackgroundColors, TextColors, IconColors, Elevation, FontSize, FontWeight, LineHeight, FontFamily, Shape, CoreSpace, SemanticSimplePaddingSpace, SemanticComplexPaddingSpace, SemanticSimpleMarginSpace, SemanticComplexMarginSpace } from './chunk-Y7GWSHYF.js';
2
2
  import { parseResponsiveValue } from './chunk-SFOVKOPG.js';
3
3
  import { isNil, isObject } from './chunk-U5R6ZXH3.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { useMediaQuery } from './chunk-M4X2T3D3.js';
1
+ import { useMediaQuery } from './chunk-T6JS7L6B.js';
2
2
 
3
3
  // src/color-scheme/useColorScheme.ts
4
4
  function useColorScheme(colorScheme, defaultColorScheme) {
@@ -1,4 +1,4 @@
1
- import { htmlElement } from './chunk-LCW3QCQQ.js';
1
+ import { htmlElement } from './chunk-GZ3MQOPA.js';
2
2
 
3
3
  // src/html-wrappers/html.ts
4
4
  var Address = htmlElement("address");
@@ -1,7 +1,7 @@
1
1
  import { useIsomorphicLayoutEffect } from './chunk-3YM73BQP.js';
2
2
  import { ThemeComputedStyle } from './chunk-B6ZBFYWJ.js';
3
3
  import { useInsertStyleElement } from './chunk-RIORU7JO.js';
4
- import { StyledSystemRootCssClass } from './chunk-GFXIV6J4.js';
4
+ import { StyledSystemRootCssClass } from './chunk-REAV6RA4.js';
5
5
  import { isNil } from './chunk-U5R6ZXH3.js';
6
6
  import { useColorSchemeContext } from './chunk-V7X6ANEM.js';
7
7
  import { useRef, useState } from 'react';