@hopper-ui/styled-system 2.5.13 → 3.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.
- package/CHANGELOG.md +20 -0
- package/dist/StyledSystemProvider.css +35 -35
- package/dist/StyledSystemProvider.d.ts +6 -6
- package/dist/StyledSystemProvider.js +15 -17
- package/dist/{chunk-54RO57YA.js → chunk-3PUBJ5LJ.js} +25 -13
- package/dist/chunk-6ZFFJVAW.js +17 -0
- package/dist/{chunk-V7X6ANEM.js → chunk-7PR2BAOL.js} +0 -1
- package/dist/{chunk-MSH55T2T.js → chunk-A54ZRFEM.js} +31 -2
- package/dist/{chunk-ILG53YIO.js → chunk-FGXNB7F6.js} +34 -9
- package/dist/{chunk-7TNCJ3OQ.js → chunk-JJKYIWIT.js} +13 -3
- package/dist/{chunk-A54ZF3UN.js → chunk-QZ7W6U3E.js} +2 -2
- package/dist/{chunk-GQ3J3RTR.js → chunk-SVHEHWY4.js} +3 -3
- package/dist/chunk-TKWJ3X2I.js +13 -0
- package/dist/{chunk-JVNXXRWE.js → chunk-VIIWNAIQ.js} +1 -1
- package/dist/{chunk-X5OXC6DN.js → chunk-XG7R6QGE.js} +1 -1
- package/dist/chunk-YQ665QH5.js +6 -0
- package/dist/color-scheme/ColorSchemeContext.js +1 -1
- package/dist/color-scheme/useColorSchemeValue.js +2 -2
- package/dist/global-styles/BodyStyleProvider.js +5 -5
- package/dist/html-wrappers/html.css +35 -35
- package/dist/html-wrappers/html.js +8 -7
- package/dist/html-wrappers/htmlElement.css +35 -35
- package/dist/html-wrappers/htmlElement.js +7 -6
- package/dist/index.css +35 -35
- package/dist/index.d.ts +4 -6
- package/dist/index.js +16 -18
- package/dist/responsive/useResponsiveValue.js +2 -2
- package/dist/styledSystemProps.d.ts +21 -5
- package/dist/styledSystemRootCssClass.d.ts +2 -4
- package/dist/styledSystemRootCssClass.js +2 -1
- package/dist/theme/ThemeContext.d.ts +11 -0
- package/dist/theme/ThemeContext.js +2 -0
- package/dist/theme/generated/sharegate/dark.css +742 -0
- package/dist/theme/generated/sharegate/light.css +1182 -0
- package/dist/theme/generated/sharegate.css +4 -0
- package/dist/theme/generated/workleap/dark.css +742 -0
- package/dist/theme/generated/workleap/light.css +1182 -0
- package/dist/theme/generated/workleap.css +4 -0
- package/dist/tokens/generated/styledSystemConstants.d.ts +6 -0
- package/dist/tokens/generated/styledSystemConstants.js +2 -0
- package/dist/tokens/generated/styledSystemToTokenMappings.d.ts +1182 -1151
- package/dist/tokens/generated/styledSystemToTokenMappings.js +1 -1
- package/dist/tokens/tokenMappings.d.ts +540 -37
- package/dist/tokens/tokenMappings.js +5 -4
- package/dist/useStyledSystem.css +32 -32
- package/dist/useStyledSystem.js +6 -5
- package/package.json +13 -9
- package/dist/chunk-43MQD25Q.js +0 -17
- package/dist/chunk-K5JIMNDM.js +0 -1182
- package/dist/chunk-P6FMQKUS.js +0 -546
- package/dist/chunk-RAWVBWQ4.js +0 -11
- package/dist/chunk-S3G5NPHF.js +0 -32
- package/dist/tokens/TokenProvider.d.ts +0 -20
- package/dist/tokens/TokenProvider.js +0 -9
- package/dist/tokens/generated/darkSemanticTokens.d.ts +0 -548
- package/dist/tokens/generated/darkSemanticTokens.js +0 -2
- package/dist/tokens/generated/lightSemanticTokens.d.ts +0 -1184
- package/dist/tokens/generated/lightSemanticTokens.js +0 -2
- package/dist/tokens/tokens.d.ts +0 -1731
- package/dist/tokens/tokens.js +0 -4
- package/dist/{chunk-SFOVKOPG.js → chunk-FTYK7Z7Q.js} +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @hopper-ui/styled-system
|
|
2
2
|
|
|
3
|
+
## 3.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- cd95303: This update introduces a theming system in Hopper, allowing applications to customize the appearance of Hopper components to match different brands.
|
|
8
|
+
Workleap application's will need to import a new CSS file for the `workleap` theme to ensure proper styling, but no changes are expected to the visual appearance.
|
|
9
|
+
A Sharegate theme as been introduced, but will be updated in future updates, for now it's mostly identical to the `workleap` theme.
|
|
10
|
+
|
|
11
|
+
BREAKING
|
|
12
|
+
- You need to import the css files for the themes you want to support in your application (@hopper-ui/styled-system/theme/workleap.css)
|
|
13
|
+
- The `HopperProvider` component now accepts a `theme` that needs to match the selected theme. The default theme is `workleap` but the CSS file is still required to be imported.
|
|
14
|
+
- For "@hopper-ui/components", the peer dependency for `@hopper-ui/styled-system` has been updated to version 3. Make sure to update it in your project to avoid any compatibility issues.
|
|
15
|
+
- For "@hopper-ui/components", the peer dependency for `@hopper-ui/icons` has been updated to version 3. Make sure to update it in your project to avoid any compatibility issues.
|
|
16
|
+
|
|
17
|
+
## 2.5.14
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- 02f1caa: Fix outline property in the styled system that was not working properly. Also added token values to it and an UNSAFE\_ property
|
|
22
|
+
|
|
3
23
|
## 2.5.13
|
|
4
24
|
|
|
5
25
|
### Patch 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-
|
|
2
|
+
.UseStyledSystem-module__hop-b-hover___7xZev:hover {
|
|
3
3
|
--hop-b-hover: initial;
|
|
4
4
|
border: var(--hop-b-hover) !important;
|
|
5
5
|
}
|
|
6
|
-
.UseStyledSystem-module__hop-bb-
|
|
6
|
+
.UseStyledSystem-module__hop-bb-hover___UOLpW:hover {
|
|
7
7
|
--hop-bb-hover: initial;
|
|
8
8
|
border-bottom: var(--hop-bb-hover) !important;
|
|
9
9
|
}
|
|
10
|
-
.UseStyledSystem-module__hop-bl-
|
|
10
|
+
.UseStyledSystem-module__hop-bl-hover___bJxsW:hover {
|
|
11
11
|
--hop-bl-hover: initial;
|
|
12
12
|
border-left: var(--hop-bl-hover) !important;
|
|
13
13
|
}
|
|
14
|
-
.UseStyledSystem-module__hop-br-
|
|
14
|
+
.UseStyledSystem-module__hop-br-hover___4-NII:hover {
|
|
15
15
|
--hop-br-hover: initial;
|
|
16
16
|
border-right: var(--hop-br-hover) !important;
|
|
17
17
|
}
|
|
18
|
-
.UseStyledSystem-module__hop-bt-
|
|
18
|
+
.UseStyledSystem-module__hop-bt-hover___umFWG:hover {
|
|
19
19
|
--hop-bt-hover: initial;
|
|
20
20
|
border-top: var(--hop-bt-hover) !important;
|
|
21
21
|
}
|
|
22
|
-
.UseStyledSystem-module__hop-b-
|
|
22
|
+
.UseStyledSystem-module__hop-b-focus___THf0W:focus-visible {
|
|
23
23
|
--hop-b-focus: initial;
|
|
24
24
|
border: var(--hop-b-focus) !important;
|
|
25
25
|
}
|
|
26
|
-
.UseStyledSystem-module__hop-bb-
|
|
26
|
+
.UseStyledSystem-module__hop-bb-focus___zSny3:focus-visible {
|
|
27
27
|
--hop-bb-focus: initial;
|
|
28
28
|
border-bottom: var(--hop-bb-focus) !important;
|
|
29
29
|
}
|
|
30
|
-
.UseStyledSystem-module__hop-bl-
|
|
30
|
+
.UseStyledSystem-module__hop-bl-focus___O83-K:focus-visible {
|
|
31
31
|
--hop-bl-focus: initial;
|
|
32
32
|
border-left: var(--hop-bl-focus) !important;
|
|
33
33
|
}
|
|
34
|
-
.UseStyledSystem-module__hop-br-
|
|
34
|
+
.UseStyledSystem-module__hop-br-focus___u7Equ:focus-visible {
|
|
35
35
|
--hop-br-focus: initial;
|
|
36
36
|
border-right: var(--hop-br-focus) !important;
|
|
37
37
|
}
|
|
38
|
-
.UseStyledSystem-module__hop-bt-
|
|
38
|
+
.UseStyledSystem-module__hop-bt-focus___-SJ9v:focus-visible {
|
|
39
39
|
--hop-bt-focus: initial;
|
|
40
40
|
border-top: var(--hop-bt-focus) !important;
|
|
41
41
|
}
|
|
42
|
-
.UseStyledSystem-module__hop-b-
|
|
42
|
+
.UseStyledSystem-module__hop-b-active___GP7Y5:active {
|
|
43
43
|
--hop-b-active: initial;
|
|
44
44
|
border: var(--hop-b-active) !important;
|
|
45
45
|
}
|
|
46
|
-
.UseStyledSystem-module__hop-bb-
|
|
46
|
+
.UseStyledSystem-module__hop-bb-active___ahIPJ:active {
|
|
47
47
|
--hop-bb-active: initial;
|
|
48
48
|
border-bottom: var(--hop-bb-active) !important;
|
|
49
49
|
}
|
|
50
|
-
.UseStyledSystem-module__hop-bl-
|
|
50
|
+
.UseStyledSystem-module__hop-bl-active___HtuEF:active {
|
|
51
51
|
--hop-bl-active: initial;
|
|
52
52
|
border-left: var(--hop-bl-active) !important;
|
|
53
53
|
}
|
|
54
|
-
.UseStyledSystem-module__hop-br-
|
|
54
|
+
.UseStyledSystem-module__hop-br-active___Vh2Ak:active {
|
|
55
55
|
--hop-br-active: initial;
|
|
56
56
|
border-right: var(--hop-br-active) !important;
|
|
57
57
|
}
|
|
58
|
-
.UseStyledSystem-module__hop-bt-
|
|
58
|
+
.UseStyledSystem-module__hop-bt-active___rfnlL:active {
|
|
59
59
|
--hop-bt-active: initial;
|
|
60
60
|
border-top: var(--hop-bt-active) !important;
|
|
61
61
|
}
|
|
62
|
-
.UseStyledSystem-module__hop-bg-
|
|
62
|
+
.UseStyledSystem-module__hop-bg-hover___HTF4U:hover {
|
|
63
63
|
--hop-bg-hover: initial;
|
|
64
64
|
background-color: var(--hop-bg-hover) !important;
|
|
65
65
|
}
|
|
66
|
-
.UseStyledSystem-module__hop-bg-
|
|
66
|
+
.UseStyledSystem-module__hop-bg-focus___FORfp:focus-visible {
|
|
67
67
|
--hop-bg-focus: initial;
|
|
68
68
|
background-color: var(--hop-bg-focus) !important;
|
|
69
69
|
}
|
|
70
|
-
.UseStyledSystem-module__hop-bg-
|
|
70
|
+
.UseStyledSystem-module__hop-bg-active___xIyPR:active {
|
|
71
71
|
--hop-bg-active: initial;
|
|
72
72
|
background-color: var(--hop-bg-active) !important;
|
|
73
73
|
}
|
|
74
|
-
.UseStyledSystem-module__hop-bs-
|
|
74
|
+
.UseStyledSystem-module__hop-bs-hover___WUT6S:hover {
|
|
75
75
|
--hop-bs-hover: initial;
|
|
76
76
|
box-shadow: var(--hop-bs-hover) !important;
|
|
77
77
|
}
|
|
78
|
-
.UseStyledSystem-module__hop-bs-
|
|
78
|
+
.UseStyledSystem-module__hop-bs-focus___Yfp7I:focus-visible {
|
|
79
79
|
--hop-bs-focus: initial;
|
|
80
80
|
box-shadow: var(--hop-bs-focus) !important;
|
|
81
81
|
}
|
|
82
|
-
.UseStyledSystem-module__hop-bs-
|
|
82
|
+
.UseStyledSystem-module__hop-bs-active___8HWqZ:active {
|
|
83
83
|
--hop-bs-active: initial;
|
|
84
84
|
box-shadow: var(--hop-bs-active) !important;
|
|
85
85
|
}
|
|
86
|
-
.UseStyledSystem-module__hop-c-
|
|
86
|
+
.UseStyledSystem-module__hop-c-hover___Q6yVM:hover {
|
|
87
87
|
--hop-c-hover: initial;
|
|
88
88
|
color: var(--hop-c-hover) !important;
|
|
89
89
|
}
|
|
90
|
-
.UseStyledSystem-module__hop-c-
|
|
90
|
+
.UseStyledSystem-module__hop-c-focus___tV1dV:focus-visible {
|
|
91
91
|
--hop-c-focus: initial;
|
|
92
92
|
color: var(--hop-c-focus) !important;
|
|
93
93
|
}
|
|
94
|
-
.UseStyledSystem-module__hop-c-
|
|
94
|
+
.UseStyledSystem-module__hop-c-active___76VaW:active {
|
|
95
95
|
--hop-c-active: initial;
|
|
96
96
|
color: var(--hop-c-active) !important;
|
|
97
97
|
}
|
|
98
|
-
.UseStyledSystem-module__hop-cs-
|
|
98
|
+
.UseStyledSystem-module__hop-cs-hover___1P1O1:hover {
|
|
99
99
|
--hop-cs-hover: initial;
|
|
100
100
|
cursor: var(--hop-cs-hover) !important;
|
|
101
101
|
}
|
|
102
|
-
.UseStyledSystem-module__hop-f-
|
|
102
|
+
.UseStyledSystem-module__hop-f-hover___hMvA7:hover {
|
|
103
103
|
--hop-f-hover: initial;
|
|
104
104
|
fill: var(--hop-f-hover) !important;
|
|
105
105
|
}
|
|
106
|
-
.UseStyledSystem-module__hop-f-
|
|
106
|
+
.UseStyledSystem-module__hop-f-focus___OhS8Z:focus-visible {
|
|
107
107
|
--hop-f-focus: initial;
|
|
108
108
|
fill: var(--hop-f-focus) !important;
|
|
109
109
|
}
|
|
110
|
-
.UseStyledSystem-module__hop-o-
|
|
110
|
+
.UseStyledSystem-module__hop-o-hover___kvpdx:hover {
|
|
111
111
|
--hop-o-hover: initial;
|
|
112
112
|
opacity: var(--hop-o-hover) !important;
|
|
113
113
|
}
|
|
114
|
-
.UseStyledSystem-module__hop-o-
|
|
114
|
+
.UseStyledSystem-module__hop-o-focus___478-D:focus-visible {
|
|
115
115
|
--hop-o-focus: initial;
|
|
116
116
|
opacity: var(--hop-o-focus) !important;
|
|
117
117
|
}
|
|
118
|
-
.UseStyledSystem-module__hop-o-
|
|
118
|
+
.UseStyledSystem-module__hop-o-active___SY6xj:active {
|
|
119
119
|
--hop-o-active: initial;
|
|
120
120
|
opacity: var(--hop-o-active) !important;
|
|
121
121
|
}
|
|
122
|
-
.UseStyledSystem-module__hop-ol-
|
|
122
|
+
.UseStyledSystem-module__hop-ol-focus___rJOno:focus-visible {
|
|
123
123
|
--hop-ol-focus: initial;
|
|
124
|
-
|
|
124
|
+
outline: 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-
|
|
129
|
-
:where(.htmlElement-module__hop-
|
|
130
|
-
:where(.htmlElement-module__hop-
|
|
128
|
+
:where(.htmlElement-module__hop-HtmlElement___Na05F),
|
|
129
|
+
:where(.htmlElement-module__hop-HtmlElement___Na05F::after),
|
|
130
|
+
:where(.htmlElement-module__hop-HtmlElement___Na05F::before) {
|
|
131
131
|
box-sizing: border-box;
|
|
132
132
|
}
|
|
@@ -3,6 +3,7 @@ import { ReactNode } from 'react';
|
|
|
3
3
|
import { ColorSchemeOrSystem, ColorScheme } from './color-scheme/ColorSchemeContext.js';
|
|
4
4
|
import { DivProps } from './html-wrappers/html.js';
|
|
5
5
|
import { BreakpointProviderProps } from './responsive/BreakpointProvider.js';
|
|
6
|
+
import { Theme } from './tokens/generated/styledSystemConstants.js';
|
|
6
7
|
import './styledSystemProps.js';
|
|
7
8
|
import 'csstype';
|
|
8
9
|
import './responsive/useResponsiveValue.js';
|
|
@@ -24,17 +25,16 @@ interface StyledSystemProviderProps extends BreakpointProviderProps, DivProps {
|
|
|
24
25
|
* @default "light"
|
|
25
26
|
*/
|
|
26
27
|
colorScheme?: ColorSchemeOrSystem;
|
|
28
|
+
/**
|
|
29
|
+
* The theme to use.
|
|
30
|
+
* @default "workleap"
|
|
31
|
+
*/
|
|
32
|
+
theme?: Theme;
|
|
27
33
|
/**
|
|
28
34
|
* Default color scheme to use when a user preferred color scheme (system) is not available.
|
|
29
35
|
* @default "light"
|
|
30
36
|
*/
|
|
31
37
|
defaultColorScheme?: ColorScheme;
|
|
32
|
-
/**
|
|
33
|
-
* Determines whether token CSS variables should be added to the document's head
|
|
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
|
|
36
|
-
*/
|
|
37
|
-
withCssVariables?: boolean;
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* StyledSystemProvider is required to be rendered at the root of your application. It is responsible for:
|
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
export { GlobalStyledSystemProviderCssSelector, _StyledSystemProvider as StyledSystemProvider } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-P6FMQKUS.js';
|
|
5
|
-
import './chunk-K5JIMNDM.js';
|
|
6
|
-
import './chunk-GQ3J3RTR.js';
|
|
7
|
-
import './chunk-3YM73BQP.js';
|
|
8
|
-
import './chunk-BSIKCABJ.js';
|
|
1
|
+
export { GlobalStyledSystemProviderCssSelector, _StyledSystemProvider as StyledSystemProvider } from './chunk-3PUBJ5LJ.js';
|
|
2
|
+
import './chunk-TKWJ3X2I.js';
|
|
3
|
+
import './chunk-SVHEHWY4.js';
|
|
9
4
|
import './chunk-RIORU7JO.js';
|
|
10
5
|
import './chunk-YPIK2HRL.js';
|
|
11
|
-
import './chunk-
|
|
12
|
-
import './chunk-
|
|
6
|
+
import './chunk-3YM73BQP.js';
|
|
7
|
+
import './chunk-BSIKCABJ.js';
|
|
8
|
+
import './chunk-VIIWNAIQ.js';
|
|
9
|
+
import './chunk-QZ7W6U3E.js';
|
|
13
10
|
import './chunk-GXUFWEP5.js';
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
16
|
-
import './chunk-
|
|
17
|
-
import './chunk-
|
|
18
|
-
import './chunk-
|
|
11
|
+
import './chunk-6ZFFJVAW.js';
|
|
12
|
+
import './chunk-FGXNB7F6.js';
|
|
13
|
+
import './chunk-JJKYIWIT.js';
|
|
14
|
+
import './chunk-A54ZRFEM.js';
|
|
15
|
+
import './chunk-FTYK7Z7Q.js';
|
|
16
|
+
import './chunk-U5R6ZXH3.js';
|
|
19
17
|
import './chunk-VBKLISDI.js';
|
|
20
18
|
import './chunk-XUHDFZZL.js';
|
|
21
|
-
import './chunk-U5R6ZXH3.js';
|
|
22
19
|
import './chunk-QMDDVBCZ.js';
|
|
20
|
+
import './chunk-YQ665QH5.js';
|
|
23
21
|
import './chunk-5U5IRAPA.js';
|
|
24
22
|
import './chunk-T6JS7L6B.js';
|
|
25
|
-
import './chunk-
|
|
23
|
+
import './chunk-7PR2BAOL.js';
|
|
26
24
|
import './chunk-AQ5VUG5P.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BodyStyleProvider } from './chunk-
|
|
3
|
-
import { Div } from './chunk-
|
|
1
|
+
import { ThemeContext } from './chunk-TKWJ3X2I.js';
|
|
2
|
+
import { BodyStyleProvider } from './chunk-SVHEHWY4.js';
|
|
3
|
+
import { Div } from './chunk-VIIWNAIQ.js';
|
|
4
4
|
import { DefaultUnsupportedMatchMediaBreakpoint, BreakpointProvider } from './chunk-GXUFWEP5.js';
|
|
5
|
-
import { getRootCSSClasses } from './chunk-
|
|
5
|
+
import { getRootCSSClasses } from './chunk-6ZFFJVAW.js';
|
|
6
6
|
import { useColorScheme } from './chunk-5U5IRAPA.js';
|
|
7
|
-
import { ColorSchemeContext } from './chunk-
|
|
7
|
+
import { ColorSchemeContext } from './chunk-7PR2BAOL.js';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import { forwardRef, useState, useCallback } from 'react';
|
|
9
|
+
import { forwardRef, useState, useEffect, useCallback } from 'react';
|
|
10
10
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
11
|
|
|
12
12
|
var GlobalStyledSystemProviderCssSelector = "hop-StyledSystemProvider";
|
|
@@ -14,22 +14,26 @@ var StyledSystemProvider = (props, ref) => {
|
|
|
14
14
|
const {
|
|
15
15
|
children,
|
|
16
16
|
withBodyStyle = false,
|
|
17
|
-
withCssVariables = true,
|
|
18
17
|
colorScheme = "light",
|
|
19
18
|
defaultColorScheme = "light",
|
|
20
19
|
unsupportedMatchMediaBreakpoint = DefaultUnsupportedMatchMediaBreakpoint,
|
|
21
20
|
className,
|
|
21
|
+
theme = "workleap",
|
|
22
22
|
...rest
|
|
23
23
|
} = props;
|
|
24
24
|
const [remoteColorScheme, setRemoteColorScheme] = useState();
|
|
25
|
+
const [internalTheme, setInternalTheme] = useState(theme);
|
|
25
26
|
const computedColorScheme = useColorScheme(remoteColorScheme != null ? remoteColorScheme : colorScheme, defaultColorScheme);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
setInternalTheme(theme);
|
|
29
|
+
}, [theme]);
|
|
26
30
|
const setColorScheme = useCallback((newColorScheme) => {
|
|
27
31
|
setRemoteColorScheme(newColorScheme);
|
|
28
32
|
}, [setRemoteColorScheme]);
|
|
29
33
|
const classNames = clsx(
|
|
30
34
|
className,
|
|
31
35
|
GlobalStyledSystemProviderCssSelector,
|
|
32
|
-
getRootCSSClasses(computedColorScheme)
|
|
36
|
+
getRootCSSClasses(computedColorScheme, internalTheme)
|
|
33
37
|
);
|
|
34
38
|
return /* @__PURE__ */ jsx(
|
|
35
39
|
ColorSchemeContext.Provider,
|
|
@@ -38,11 +42,19 @@ var StyledSystemProvider = (props, ref) => {
|
|
|
38
42
|
colorScheme: computedColorScheme,
|
|
39
43
|
setColorScheme
|
|
40
44
|
},
|
|
41
|
-
children: /* @__PURE__ */ jsx(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
children: /* @__PURE__ */ jsx(
|
|
46
|
+
ThemeContext.Provider,
|
|
47
|
+
{
|
|
48
|
+
value: {
|
|
49
|
+
theme: internalTheme,
|
|
50
|
+
setTheme: setInternalTheme
|
|
51
|
+
},
|
|
52
|
+
children: /* @__PURE__ */ jsx(BreakpointProvider, { unsupportedMatchMediaBreakpoint, children: /* @__PURE__ */ jsxs(Div, { ref, className: classNames, ...rest, children: [
|
|
53
|
+
withBodyStyle && /* @__PURE__ */ jsx(BodyStyleProvider, {}),
|
|
54
|
+
children
|
|
55
|
+
] }) })
|
|
56
|
+
}
|
|
57
|
+
)
|
|
46
58
|
}
|
|
47
59
|
);
|
|
48
60
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { HopperRootCssClass, StyledSystemRootCssClass } from './chunk-YQ665QH5.js';
|
|
2
|
+
|
|
3
|
+
// src/styledSystemRootCssClass.ts
|
|
4
|
+
function getRootCSSClasses(colorScheme, theme) {
|
|
5
|
+
return [
|
|
6
|
+
HopperRootCssClass,
|
|
7
|
+
`${HopperRootCssClass}-${colorScheme}`,
|
|
8
|
+
`${HopperRootCssClass}-${theme}`,
|
|
9
|
+
`${HopperRootCssClass}-${theme}-${colorScheme}`,
|
|
10
|
+
StyledSystemRootCssClass,
|
|
11
|
+
`${StyledSystemRootCssClass}-${colorScheme}`,
|
|
12
|
+
`${StyledSystemRootCssClass}-${theme}`,
|
|
13
|
+
`${StyledSystemRootCssClass}-${theme}-${colorScheme}`
|
|
14
|
+
].join(" ");
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { getRootCSSClasses };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
// src/tokens/generated/styledSystemToTokenMappings.ts
|
|
2
|
-
var HopperVariablePrefix = "--hop";
|
|
3
2
|
var HopperColors = {
|
|
4
3
|
"core_coastal-25": "coastal-25",
|
|
5
4
|
"core_coastal-50": "coastal-50",
|
|
@@ -1125,6 +1124,26 @@ var LineHeight = {
|
|
|
1125
1124
|
"accent-lg": "accent-lg-line-height",
|
|
1126
1125
|
"accent-sm": "accent-sm-line-height"
|
|
1127
1126
|
};
|
|
1127
|
+
var FontOffset = {
|
|
1128
|
+
"heading-3xl-top-offset": "heading-3xl-top-offset",
|
|
1129
|
+
"heading-3xl-bottom-offset": "heading-3xl-bottom-offset",
|
|
1130
|
+
"heading-2xl-top-offset": "heading-2xl-top-offset",
|
|
1131
|
+
"heading-2xl-bottom-offset": "heading-2xl-bottom-offset",
|
|
1132
|
+
"heading-xl-top-offset": "heading-xl-top-offset",
|
|
1133
|
+
"heading-xl-bottom-offset": "heading-xl-bottom-offset",
|
|
1134
|
+
"heading-lg-top-offset": "heading-lg-top-offset",
|
|
1135
|
+
"heading-lg-bottom-offset": "heading-lg-bottom-offset",
|
|
1136
|
+
"heading-md-top-offset": "heading-md-top-offset",
|
|
1137
|
+
"heading-md-bottom-offset": "heading-md-bottom-offset",
|
|
1138
|
+
"heading-sm-top-offset": "heading-sm-top-offset",
|
|
1139
|
+
"heading-sm-bottom-offset": "heading-sm-bottom-offset",
|
|
1140
|
+
"heading-xs-top-offset": "heading-xs-top-offset",
|
|
1141
|
+
"heading-xs-bottom-offset": "heading-xs-bottom-offset",
|
|
1142
|
+
"heading-xs-medium-top-offset": "heading-xs-medium-top-offset",
|
|
1143
|
+
"heading-xs-medium-bottom-offset": "heading-xs-medium-bottom-offset",
|
|
1144
|
+
"overline-top-offset": "overline-top-offset",
|
|
1145
|
+
"overline-bottom-offset": "overline-bottom-offset"
|
|
1146
|
+
};
|
|
1128
1147
|
var Shape = {
|
|
1129
1148
|
"core_0": "border-radius-0",
|
|
1130
1149
|
"core_1": "border-radius-1",
|
|
@@ -1182,5 +1201,15 @@ var SemanticSimpleMarginSpace = {
|
|
|
1182
1201
|
"inline-xl": "space-inline-xl"
|
|
1183
1202
|
};
|
|
1184
1203
|
var SemanticComplexMarginSpace = {};
|
|
1204
|
+
var Motions = {
|
|
1205
|
+
"easing-duration-1": "easing-duration-1",
|
|
1206
|
+
"easing-duration-2": "easing-duration-2",
|
|
1207
|
+
"easing-duration-3": "easing-duration-3",
|
|
1208
|
+
"easing-duration-4": "easing-duration-4",
|
|
1209
|
+
"easing-duration-5": "easing-duration-5",
|
|
1210
|
+
"easing-productive": "easing-productive",
|
|
1211
|
+
"easing-focus": "easing-focus",
|
|
1212
|
+
"easing-expressive": "easing-expressive"
|
|
1213
|
+
};
|
|
1185
1214
|
|
|
1186
|
-
export { BackgroundColors, BorderColors, CoreSpace, DataVizColors, Elevation, FontFamily, FontSize, FontWeight, HopperColors,
|
|
1215
|
+
export { BackgroundColors, BorderColors, CoreSpace, DataVizColors, Elevation, FontFamily, FontOffset, FontSize, FontWeight, HopperColors, IconColors, LineHeight, Motions, SemanticComplexMarginSpace, SemanticComplexPaddingSpace, SemanticSimpleMarginSpace, SemanticSimplePaddingSpace, Shape, TextColors };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { parseResponsiveSystemValue, IconColorMapping, TextColorMapping, BoxShadowMapping, BackgroundColorMapping,
|
|
2
|
-
import { parseResponsiveValue } from './chunk-
|
|
3
|
-
import { useBreakpointContext } from './chunk-VBKLISDI.js';
|
|
1
|
+
import { parseResponsiveSystemValue, IconColorMapping, TextColorMapping, BoxShadowMapping, BackgroundColorMapping, ColorExpressionTypes, DefaultBorderWidthAndStyle, DefaultOutlineWidthAndStyle, SizingMapping, SimpleMarginMapping, SimplePaddingMapping, ComplexPaddingMapping, OutlineMapping, ComplexMarginMapping, LineHeightMapping, FontWeightMapping, FontSizeMapping, FontFamilyMapping, BorderRadiusMapping, BorderMapping } from './chunk-JJKYIWIT.js';
|
|
2
|
+
import { parseResponsiveValue } from './chunk-FTYK7Z7Q.js';
|
|
4
3
|
import { isNil } from './chunk-U5R6ZXH3.js';
|
|
4
|
+
import { useBreakpointContext } from './chunk-VBKLISDI.js';
|
|
5
5
|
import { UnsafePrefix } from './chunk-QMDDVBCZ.js';
|
|
6
6
|
import { __privateAdd, __publicField, __privateSet, __privateGet } from './chunk-AQ5VUG5P.js';
|
|
7
7
|
|
|
8
8
|
// css-module:./UseStyledSystem.module.css#css-module
|
|
9
|
-
var UseStyledSystem_module_default = { "hop-b-hover": "UseStyledSystem-module__hop-b-
|
|
9
|
+
var UseStyledSystem_module_default = { "hop-b-hover": "UseStyledSystem-module__hop-b-hover___7xZev", "hop-bb-hover": "UseStyledSystem-module__hop-bb-hover___UOLpW", "hop-bl-hover": "UseStyledSystem-module__hop-bl-hover___bJxsW", "hop-br-hover": "UseStyledSystem-module__hop-br-hover___4-NII", "hop-bt-hover": "UseStyledSystem-module__hop-bt-hover___umFWG", "hop-b-focus": "UseStyledSystem-module__hop-b-focus___THf0W", "hop-bb-focus": "UseStyledSystem-module__hop-bb-focus___zSny3", "hop-bl-focus": "UseStyledSystem-module__hop-bl-focus___O83-K", "hop-br-focus": "UseStyledSystem-module__hop-br-focus___u7Equ", "hop-bt-focus": "UseStyledSystem-module__hop-bt-focus___-SJ9v", "hop-b-active": "UseStyledSystem-module__hop-b-active___GP7Y5", "hop-bb-active": "UseStyledSystem-module__hop-bb-active___ahIPJ", "hop-bl-active": "UseStyledSystem-module__hop-bl-active___HtuEF", "hop-br-active": "UseStyledSystem-module__hop-br-active___Vh2Ak", "hop-bt-active": "UseStyledSystem-module__hop-bt-active___rfnlL", "hop-bg-hover": "UseStyledSystem-module__hop-bg-hover___HTF4U", "hop-bg-focus": "UseStyledSystem-module__hop-bg-focus___FORfp", "hop-bg-active": "UseStyledSystem-module__hop-bg-active___xIyPR", "hop-bs-hover": "UseStyledSystem-module__hop-bs-hover___WUT6S", "hop-bs-focus": "UseStyledSystem-module__hop-bs-focus___Yfp7I", "hop-bs-active": "UseStyledSystem-module__hop-bs-active___8HWqZ", "hop-c-hover": "UseStyledSystem-module__hop-c-hover___Q6yVM", "hop-c-focus": "UseStyledSystem-module__hop-c-focus___tV1dV", "hop-c-active": "UseStyledSystem-module__hop-c-active___76VaW", "hop-cs-hover": "UseStyledSystem-module__hop-cs-hover___1P1O1", "hop-f-hover": "UseStyledSystem-module__hop-f-hover___hMvA7", "hop-f-focus": "UseStyledSystem-module__hop-f-focus___OhS8Z", "hop-o-hover": "UseStyledSystem-module__hop-o-hover___kvpdx", "hop-o-focus": "UseStyledSystem-module__hop-o-focus___478-D", "hop-o-active": "UseStyledSystem-module__hop-o-active___SY6xj", "hop-ol-focus": "UseStyledSystem-module__hop-ol-focus___rJOno" };
|
|
10
10
|
|
|
11
11
|
// src/useStyledSystem.ts
|
|
12
12
|
function createSystemValueHandler(systemValues) {
|
|
@@ -62,6 +62,18 @@ function createBorderHandler(systemValues) {
|
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
+
function createOutlineHandler(systemValues) {
|
|
66
|
+
return (name, value, context) => {
|
|
67
|
+
const parsedValue = parseResponsiveSystemValue(value, systemValues, context.matchedBreakpoints);
|
|
68
|
+
if (!isNil(parsedValue)) {
|
|
69
|
+
if (typeof parsedValue === "string" && ColorExpressionTypes.some((x) => parsedValue.startsWith(x))) {
|
|
70
|
+
context.addStyleValue(name, `${DefaultOutlineWidthAndStyle} ${parsedValue}`);
|
|
71
|
+
} else {
|
|
72
|
+
context.addStyleValue(name, parsedValue);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
}
|
|
65
77
|
function createBorderPseudoHandler(pseudoClassName, pseudoVariable, systemValues) {
|
|
66
78
|
return (name, value, context) => {
|
|
67
79
|
const parsedValue = parseResponsiveSystemValue(value, systemValues, context.matchedBreakpoints);
|
|
@@ -75,6 +87,19 @@ function createBorderPseudoHandler(pseudoClassName, pseudoVariable, systemValues
|
|
|
75
87
|
}
|
|
76
88
|
};
|
|
77
89
|
}
|
|
90
|
+
function createOutlinePseudoHandler(pseudoClassName, pseudoVariable, systemValues) {
|
|
91
|
+
return (name, value, context) => {
|
|
92
|
+
const parsedValue = parseResponsiveSystemValue(value, systemValues, context.matchedBreakpoints);
|
|
93
|
+
if (!isNil(parsedValue)) {
|
|
94
|
+
context.addClass(pseudoClassName);
|
|
95
|
+
if (typeof parsedValue === "string" && ColorExpressionTypes.some((x) => parsedValue.startsWith(x))) {
|
|
96
|
+
context.addStyleValue(pseudoVariable, `${DefaultBorderWidthAndStyle} ${parsedValue}`);
|
|
97
|
+
} else {
|
|
98
|
+
context.addStyleValue(pseudoVariable, parsedValue);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
}
|
|
78
103
|
var gridColumnSpanHandler = (name, value, context) => {
|
|
79
104
|
const parsedValue = parseResponsiveValue(value, context.matchedBreakpoints);
|
|
80
105
|
if (!isNil(parsedValue)) {
|
|
@@ -212,12 +237,12 @@ var PropsHandlers = {
|
|
|
212
237
|
objectFit: createPassthroughHandler(),
|
|
213
238
|
objectPosition: createPassthroughHandler(),
|
|
214
239
|
opacity: createPassthroughHandler(),
|
|
215
|
-
opacityActive: createPseudoHandler(UseStyledSystem_module_default["hop-o-active"], "hop-o-active"),
|
|
216
|
-
opacityFocus: createPseudoHandler(UseStyledSystem_module_default["hop-o-focus"], "hop-o-focus"),
|
|
217
|
-
opacityHover: createPseudoHandler(UseStyledSystem_module_default["hop-o-hover"], "hop-o-hover"),
|
|
240
|
+
opacityActive: createPseudoHandler(UseStyledSystem_module_default["hop-o-active"], "--hop-o-active"),
|
|
241
|
+
opacityFocus: createPseudoHandler(UseStyledSystem_module_default["hop-o-focus"], "--hop-o-focus"),
|
|
242
|
+
opacityHover: createPseudoHandler(UseStyledSystem_module_default["hop-o-hover"], "--hop-o-hover"),
|
|
218
243
|
order: createPassthroughHandler(),
|
|
219
|
-
outline:
|
|
220
|
-
outlineFocus:
|
|
244
|
+
outline: createOutlineHandler(OutlineMapping),
|
|
245
|
+
outlineFocus: createOutlinePseudoHandler(UseStyledSystem_module_default["hop-ol-focus"], "--hop-ol-focus", OutlineMapping),
|
|
221
246
|
overflow: createPassthroughHandler(),
|
|
222
247
|
overflowX: createPassthroughHandler(),
|
|
223
248
|
overflowY: createPassthroughHandler(),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { parseResponsiveValue } from './chunk-
|
|
1
|
+
import { DataVizColors, HopperColors, BackgroundColors, BorderColors, TextColors, IconColors, Elevation, FontSize, FontWeight, LineHeight, FontFamily, Shape, CoreSpace, SemanticSimplePaddingSpace, SemanticComplexPaddingSpace, SemanticSimpleMarginSpace, SemanticComplexMarginSpace } from './chunk-A54ZRFEM.js';
|
|
2
|
+
import { parseResponsiveValue } from './chunk-FTYK7Z7Q.js';
|
|
3
3
|
import { isNil, isObject } from './chunk-U5R6ZXH3.js';
|
|
4
|
+
import { HopperVariablePrefix } from './chunk-YQ665QH5.js';
|
|
4
5
|
|
|
5
6
|
// src/tokens/tokenMappings.ts
|
|
6
7
|
var ColorExpressionTypes = [
|
|
@@ -11,6 +12,7 @@ var ColorExpressionTypes = [
|
|
|
11
12
|
"hsla"
|
|
12
13
|
];
|
|
13
14
|
var DefaultBorderWidthAndStyle = "1px solid";
|
|
15
|
+
var DefaultOutlineWidthAndStyle = "1px solid";
|
|
14
16
|
function createMapping(mappings, template = createValueTemplate) {
|
|
15
17
|
return Object.entries(mappings).reduce((acc, [key, value]) => {
|
|
16
18
|
acc[key] = template(value);
|
|
@@ -23,6 +25,9 @@ function createValueTemplate(value) {
|
|
|
23
25
|
function createBorderValueTemplate(value) {
|
|
24
26
|
return `${DefaultBorderWidthAndStyle} ${createValueTemplate(value)}`;
|
|
25
27
|
}
|
|
28
|
+
function createOutlineValueTemplate(value) {
|
|
29
|
+
return `${DefaultOutlineWidthAndStyle} ${createValueTemplate(value)}`;
|
|
30
|
+
}
|
|
26
31
|
var ColorMapping = createMapping(HopperColors);
|
|
27
32
|
var DataVizColorMapping = createMapping(DataVizColors);
|
|
28
33
|
var BackgroundColorMapping = {
|
|
@@ -35,6 +40,11 @@ var BorderMapping = {
|
|
|
35
40
|
...createMapping(HopperColors, createBorderValueTemplate),
|
|
36
41
|
...createMapping(DataVizColors, createBorderValueTemplate)
|
|
37
42
|
};
|
|
43
|
+
var OutlineMapping = {
|
|
44
|
+
...createMapping(BorderColors, createOutlineValueTemplate),
|
|
45
|
+
...createMapping(HopperColors, createOutlineValueTemplate),
|
|
46
|
+
...createMapping(DataVizColors, createOutlineValueTemplate)
|
|
47
|
+
};
|
|
38
48
|
var TextColorMapping = {
|
|
39
49
|
...createMapping(TextColors),
|
|
40
50
|
...ColorMapping,
|
|
@@ -137,4 +147,4 @@ function getSizingValue(value) {
|
|
|
137
147
|
return SizingMapping[value] || value;
|
|
138
148
|
}
|
|
139
149
|
|
|
140
|
-
export { BackgroundColorMapping, BorderMapping, BorderRadiusMapping, BoxShadowMapping, ColorExpressionTypes, ColorMapping, ComplexMarginMapping, ComplexPaddingMapping, DataVizColorMapping, DefaultBorderWidthAndStyle, FontFamilyMapping, FontSizeMapping, FontWeightMapping, IconColorMapping, LineHeightMapping, SimpleMarginMapping, SimplePaddingMapping, SizingMapping, SpaceMapping, TextColorMapping, getSizingValue, getSystemValue, parseResponsiveSystemValue };
|
|
150
|
+
export { BackgroundColorMapping, BorderMapping, BorderRadiusMapping, BoxShadowMapping, ColorExpressionTypes, ColorMapping, ComplexMarginMapping, ComplexPaddingMapping, DataVizColorMapping, DefaultBorderWidthAndStyle, DefaultOutlineWidthAndStyle, FontFamilyMapping, FontSizeMapping, FontWeightMapping, IconColorMapping, LineHeightMapping, OutlineMapping, SimpleMarginMapping, SimplePaddingMapping, SizingMapping, SpaceMapping, TextColorMapping, getSizingValue, getSystemValue, parseResponsiveSystemValue };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useStyledSystem } from './chunk-
|
|
1
|
+
import { useStyledSystem } from './chunk-FGXNB7F6.js';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
// css-module:./htmlElement.module.css#css-module
|
|
7
|
-
var htmlElement_module_default = { "hop-HtmlElement": "htmlElement-module__hop-
|
|
7
|
+
var htmlElement_module_default = { "hop-HtmlElement": "htmlElement-module__hop-HtmlElement___Na05F" };
|
|
8
8
|
var GlobalHtmlElementCssSelector = "hop-HtmlElement";
|
|
9
9
|
var GlobalHtmlElementSpecificCssSelector = (elementType) => `${GlobalHtmlElementCssSelector}-${elementType}`;
|
|
10
10
|
function htmlElement(elementType) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { useInsertStyleElement } from './chunk-RIORU7JO.js';
|
|
1
2
|
import { useIsomorphicLayoutEffect } from './chunk-3YM73BQP.js';
|
|
2
3
|
import { ThemeComputedStyle } from './chunk-BSIKCABJ.js';
|
|
3
|
-
import { useInsertStyleElement } from './chunk-RIORU7JO.js';
|
|
4
|
-
import { StyledSystemRootCssClass } from './chunk-43MQD25Q.js';
|
|
5
4
|
import { isNil } from './chunk-U5R6ZXH3.js';
|
|
6
|
-
import {
|
|
5
|
+
import { StyledSystemRootCssClass } from './chunk-YQ665QH5.js';
|
|
6
|
+
import { useColorSchemeContext } from './chunk-7PR2BAOL.js';
|
|
7
7
|
import { useRef, useState } from 'react';
|
|
8
8
|
import { jsx } from 'react/jsx-runtime';
|
|
9
9
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
|
|
3
|
+
// src/theme/ThemeContext.ts
|
|
4
|
+
var ThemeContext = createContext({
|
|
5
|
+
theme: "workleap",
|
|
6
|
+
setTheme: () => {
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
function useThemeContext() {
|
|
10
|
+
return useContext(ThemeContext);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { ThemeContext, useThemeContext };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ColorSchemeContext, useColorSchemeContext } from '../chunk-
|
|
1
|
+
export { ColorSchemeContext, useColorSchemeContext } from '../chunk-7PR2BAOL.js';
|
|
2
2
|
import '../chunk-AQ5VUG5P.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { useColorSchemeValue } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { useColorSchemeValue } from '../chunk-XG7R6QGE.js';
|
|
2
|
+
import '../chunk-7PR2BAOL.js';
|
|
3
3
|
import '../chunk-AQ5VUG5P.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { BodyStyleProvider } from '../chunk-
|
|
2
|
-
import '../chunk-3YM73BQP.js';
|
|
3
|
-
import '../chunk-BSIKCABJ.js';
|
|
1
|
+
export { BodyStyleProvider } from '../chunk-SVHEHWY4.js';
|
|
4
2
|
import '../chunk-RIORU7JO.js';
|
|
5
3
|
import '../chunk-YPIK2HRL.js';
|
|
6
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-3YM73BQP.js';
|
|
5
|
+
import '../chunk-BSIKCABJ.js';
|
|
7
6
|
import '../chunk-U5R6ZXH3.js';
|
|
8
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-YQ665QH5.js';
|
|
8
|
+
import '../chunk-7PR2BAOL.js';
|
|
9
9
|
import '../chunk-AQ5VUG5P.js';
|