@hopper-ui/styled-system 0.2.5 → 0.2.7
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 +13 -0
- package/README.md +0 -22
- package/dist/StyledSystemProvider.css +34 -34
- package/dist/StyledSystemProvider.d.ts +4 -3
- package/dist/StyledSystemProvider.js +12 -12
- package/dist/{chunk-PMMWXOEJ.js → chunk-4B7SSNXT.js} +29 -16
- package/dist/{chunk-AHDDZ2BQ.js → chunk-B6ZBFYWJ.js} +1 -1
- package/dist/{chunk-RS5A44EK.js → chunk-EAQ7TNQX.js} +2 -2
- package/dist/{chunk-6GS5PMAA.js → chunk-EE6BVAE2.js} +1 -1
- package/dist/{chunk-YWNXC6UL.js → chunk-FTYJQBJC.js} +2 -2
- package/dist/{chunk-AO47VFHO.js → chunk-HK6L6YXX.js} +1 -1
- package/dist/{chunk-R63UWTVG.js → chunk-K7AXEZR6.js} +18 -18
- package/dist/{chunk-XTX4KVWI.js → chunk-KLNF34G6.js} +1 -1
- package/dist/{chunk-STEDL5VQ.js → chunk-M4X2T3D3.js} +1 -1
- package/dist/{chunk-Z33MPMW6.js → chunk-MCUHAIA4.js} +2 -2
- package/dist/{chunk-RPR22E2F.js → chunk-TZBJDLE3.js} +2 -2
- package/dist/color-scheme/ColorSchemeContext.d.ts +1 -1
- package/dist/color-scheme/ColorSchemeContext.js +1 -1
- package/dist/color-scheme/useColorScheme.js +3 -3
- package/dist/color-scheme/useColorSchemeValue.js +1 -1
- package/dist/global-styles/BodyStyleProvider.js +4 -4
- package/dist/html-wrappers/html.css +34 -34
- package/dist/html-wrappers/html.d.ts +1 -1
- package/dist/html-wrappers/html.js +4 -4
- package/dist/html-wrappers/htmlElement.css +34 -34
- package/dist/html-wrappers/htmlElement.d.ts +1 -1
- package/dist/html-wrappers/htmlElement.js +3 -3
- package/dist/index.css +34 -34
- package/dist/index.js +12 -12
- package/dist/responsive/BreakpointContext.d.ts +1 -1
- package/dist/responsive/BreakpointContext.js +1 -1
- package/dist/responsive/BreakpointProvider.d.ts +1 -1
- package/dist/responsive/BreakpointProvider.js +3 -3
- package/dist/responsive/Breakpoints.d.ts +1 -1
- package/dist/responsive/Breakpoints.js +1 -1
- package/dist/responsive/useResponsiveValue.d.ts +1 -1
- package/dist/responsive/useResponsiveValue.js +1 -1
- package/dist/styled-system-props.d.ts +1 -1
- package/dist/styled-system-props.js +1 -1
- package/dist/styled-system-root-css-class.js +2 -2
- package/dist/tokens/TokenProvider.js +3 -3
- package/dist/tokens/generated/dark-semantic-tokens.js +1 -1
- package/dist/tokens/generated/light-semantic-tokens.js +1 -1
- package/dist/tokens/generated/styled-system-to-token-mappings.js +1 -1
- package/dist/tokens/token-mappings.d.ts +1 -1
- package/dist/tokens/token-mappings.js +1 -1
- package/dist/tokens/tokens.d.ts +1 -1
- package/dist/tokens/tokens.js +1 -1
- package/dist/useStyledSystem.css +31 -31
- package/dist/useStyledSystem.js +2 -2
- package/dist/utils/assertion.js +1 -1
- package/dist/utils/useInsertStyleElement.js +1 -1
- package/dist/utils/useIsomorphicInsertionEffect.js +1 -1
- package/dist/utils/useIsomorphicLayoutEffect.js +1 -1
- package/dist/utils/useMediaQuery.js +2 -2
- package/dist/utils/useThemeComputedStyle.js +2 -2
- package/package.json +19 -19
- /package/dist/{chunk-JFESGV6Z.js → chunk-6LX4VMOV.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @hopper-ui/styled-system
|
|
2
2
|
|
|
3
|
+
## 0.2.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7717443: StyledSystemProvider now accepts a ref
|
|
8
|
+
|
|
9
|
+
## 0.2.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 2639596: Updated some dependencies + move some to peer dependency.
|
|
14
|
+
Fixed a warning that was being thrown in the console regarding SSR.
|
|
15
|
+
|
|
3
16
|
## 0.2.5
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -5,28 +5,6 @@ Hopper's styled-system offers a collection of utility functions that add style p
|
|
|
5
5
|
[](../../LICENSE)
|
|
6
6
|
[](https://www.npmjs.com/package/@hopper-ui/styled-system)
|
|
7
7
|
|
|
8
|
-
## Installation
|
|
9
|
-
|
|
10
|
-
Install the following packages:
|
|
11
|
-
|
|
12
|
-
**With pnpm**
|
|
13
|
-
|
|
14
|
-
```shell
|
|
15
|
-
pnpm add @hopper-ui/styled-system
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
**With yarn**
|
|
19
|
-
|
|
20
|
-
```shell
|
|
21
|
-
yarn add -D @hopper-ui/styled-system
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
**With npm**
|
|
25
|
-
|
|
26
|
-
```shell
|
|
27
|
-
npm install -D @hopper-ui/styled-system
|
|
28
|
-
```
|
|
29
|
-
|
|
30
8
|
## Usage
|
|
31
9
|
|
|
32
10
|
View the [user's documentation](https://hopper.workleap.design/).
|
|
@@ -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___Fy6Tx: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___XNCNu: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___O3l3D: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___05AZ-: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___8-kQc: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___pa6EK: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___gUvds: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___AO9Qc: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___X2j6C: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___tf-rE: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___yMjv-: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___ODaPG: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___Jy7SY: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___o2Tff: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___wRzd-: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___pB-VQ: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___EwM-2: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___FPUbN: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___fdtsi: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___GR-22: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___NXrax: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___F33fp: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___svGnp: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___ETSj7: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___THdqO: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___OyAJe: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___0jVPn: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___g2T2W: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___cR-Us: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___5hN2e: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___7KksN: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__html-
|
|
129
|
-
:where(.htmlElement-module__html-
|
|
130
|
-
:where(.htmlElement-module__html-
|
|
128
|
+
:where(.htmlElement-module__html-element___Yzywg),
|
|
129
|
+
:where(.htmlElement-module__html-element___Yzywg::after),
|
|
130
|
+
:where(.htmlElement-module__html-element___Yzywg::before) {
|
|
131
131
|
box-sizing: border-box;
|
|
132
132
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { ColorSchemeOrSystem, ColorScheme } from './color-scheme/ColorSchemeContext.js';
|
|
4
4
|
import { DivProps } from './html-wrappers/html.js';
|
|
@@ -9,6 +9,7 @@ import 'csstype';
|
|
|
9
9
|
import './responsive/useResponsiveValue.js';
|
|
10
10
|
import './responsive/Breakpoints.js';
|
|
11
11
|
import './tokens/token-mappings.js';
|
|
12
|
+
import 'react/jsx-runtime';
|
|
12
13
|
|
|
13
14
|
interface StyledSystemProviderProps extends BreakpointProviderProps, DivProps {
|
|
14
15
|
/** The children of the component */
|
|
@@ -38,6 +39,6 @@ interface StyledSystemProviderProps extends BreakpointProviderProps, DivProps {
|
|
|
38
39
|
* - Managing color scheme (light, dark, auto)
|
|
39
40
|
* - Optionally adding body styles to the document
|
|
40
41
|
*/
|
|
41
|
-
declare
|
|
42
|
+
declare const _StyledSystemProvider: react.ForwardRefExoticComponent<Omit<StyledSystemProviderProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
42
43
|
|
|
43
|
-
export { StyledSystemProvider, StyledSystemProviderProps };
|
|
44
|
+
export { _StyledSystemProvider as StyledSystemProvider, type StyledSystemProviderProps };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export { StyledSystemProvider } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { _StyledSystemProvider as StyledSystemProvider } from './chunk-4B7SSNXT.js';
|
|
2
|
+
import './chunk-FTYJQBJC.js';
|
|
3
3
|
import './chunk-3YM73BQP.js';
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
4
|
+
import './chunk-B6ZBFYWJ.js';
|
|
5
|
+
import './chunk-HK6L6YXX.js';
|
|
6
|
+
import './chunk-TZBJDLE3.js';
|
|
7
|
+
import './chunk-MCUHAIA4.js';
|
|
8
|
+
import './chunk-EE6BVAE2.js';
|
|
9
9
|
import './chunk-A47SIZVA.js';
|
|
10
10
|
import './chunk-ZKEMKHXY.js';
|
|
11
11
|
import './chunk-HAB2KYRH.js';
|
|
12
12
|
import './chunk-RIORU7JO.js';
|
|
13
13
|
import './chunk-YPIK2HRL.js';
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
14
|
+
import './chunk-K7AXEZR6.js';
|
|
15
|
+
import './chunk-EAQ7TNQX.js';
|
|
16
16
|
import './chunk-T2LQYER5.js';
|
|
17
17
|
import './chunk-PCGVOTW3.js';
|
|
18
18
|
import './chunk-SFOVKOPG.js';
|
|
@@ -20,7 +20,7 @@ import './chunk-VBKLISDI.js';
|
|
|
20
20
|
import './chunk-XUHDFZZL.js';
|
|
21
21
|
import './chunk-U5R6ZXH3.js';
|
|
22
22
|
import './chunk-I37Y2R7V.js';
|
|
23
|
-
import './chunk-
|
|
24
|
-
import './chunk-
|
|
23
|
+
import './chunk-KLNF34G6.js';
|
|
24
|
+
import './chunk-M4X2T3D3.js';
|
|
25
25
|
import './chunk-V7X6ANEM.js';
|
|
26
|
-
import './chunk-
|
|
26
|
+
import './chunk-6LX4VMOV.js';
|
|
@@ -1,42 +1,55 @@
|
|
|
1
|
-
import { BodyStyleProvider } from './chunk-
|
|
2
|
-
import { Div } from './chunk-
|
|
3
|
-
import { BreakpointProvider, DefaultUnsupportedMatchMediaBreakpoint } from './chunk-
|
|
4
|
-
import { TokenProvider } from './chunk-
|
|
5
|
-
import { HopperRootCssClass, StyledSystemRootCssClass } from './chunk-
|
|
6
|
-
import { useColorScheme } from './chunk-
|
|
1
|
+
import { BodyStyleProvider } from './chunk-FTYJQBJC.js';
|
|
2
|
+
import { Div } from './chunk-HK6L6YXX.js';
|
|
3
|
+
import { BreakpointProvider, DefaultUnsupportedMatchMediaBreakpoint } from './chunk-MCUHAIA4.js';
|
|
4
|
+
import { TokenProvider } from './chunk-EE6BVAE2.js';
|
|
5
|
+
import { HopperRootCssClass, StyledSystemRootCssClass } from './chunk-K7AXEZR6.js';
|
|
6
|
+
import { useColorScheme } from './chunk-KLNF34G6.js';
|
|
7
7
|
import { ColorSchemeContext } from './chunk-V7X6ANEM.js';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import { useState, useCallback } from 'react';
|
|
10
|
-
import { SSRProvider } from 'react-aria';
|
|
9
|
+
import { forwardRef, useState, useCallback } from 'react';
|
|
11
10
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
var GlobalStyledSystemProviderCssSelector = "hop-StyledSystemProvider";
|
|
13
|
+
var StyledSystemProvider = (props, ref) => {
|
|
14
|
+
const {
|
|
15
|
+
children,
|
|
16
|
+
withBodyStyle = false,
|
|
17
|
+
withCssVariables = true,
|
|
18
|
+
colorScheme = "light",
|
|
19
|
+
defaultColorScheme = "light",
|
|
20
|
+
unsupportedMatchMediaBreakpoint = DefaultUnsupportedMatchMediaBreakpoint,
|
|
21
|
+
className,
|
|
22
|
+
...rest
|
|
23
|
+
} = props;
|
|
14
24
|
const [remoteColorScheme, setRemoteColorScheme] = useState();
|
|
15
25
|
const computedColorScheme = useColorScheme(remoteColorScheme != null ? remoteColorScheme : colorScheme, defaultColorScheme);
|
|
16
26
|
const setColorScheme = useCallback((newColorScheme) => {
|
|
17
27
|
setRemoteColorScheme(newColorScheme);
|
|
18
28
|
}, [setRemoteColorScheme]);
|
|
19
29
|
const classNames = clsx(
|
|
30
|
+
className,
|
|
31
|
+
GlobalStyledSystemProviderCssSelector,
|
|
20
32
|
HopperRootCssClass,
|
|
21
33
|
`${HopperRootCssClass}-${computedColorScheme}`,
|
|
22
34
|
StyledSystemRootCssClass,
|
|
23
|
-
`${StyledSystemRootCssClass}-${computedColorScheme}
|
|
24
|
-
className
|
|
35
|
+
`${StyledSystemRootCssClass}-${computedColorScheme}`
|
|
25
36
|
);
|
|
26
|
-
return /* @__PURE__ */ jsx(
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
27
38
|
ColorSchemeContext.Provider,
|
|
28
39
|
{
|
|
29
40
|
value: {
|
|
30
41
|
colorScheme: computedColorScheme,
|
|
31
42
|
setColorScheme
|
|
32
43
|
},
|
|
33
|
-
children: /* @__PURE__ */ jsx(BreakpointProvider, { unsupportedMatchMediaBreakpoint, children: /* @__PURE__ */ jsxs(Div, { className: classNames, ...rest, children: [
|
|
44
|
+
children: /* @__PURE__ */ jsx(BreakpointProvider, { unsupportedMatchMediaBreakpoint, children: /* @__PURE__ */ jsxs(Div, { ref, className: classNames, ...rest, children: [
|
|
34
45
|
withBodyStyle && /* @__PURE__ */ jsx(BodyStyleProvider, {}),
|
|
35
46
|
withCssVariables && /* @__PURE__ */ jsx(TokenProvider, {}),
|
|
36
47
|
children
|
|
37
48
|
] }) })
|
|
38
49
|
}
|
|
39
|
-
)
|
|
40
|
-
}
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
var _StyledSystemProvider = forwardRef(StyledSystemProvider);
|
|
53
|
+
_StyledSystemProvider.displayName = "StyledSystemProvider";
|
|
41
54
|
|
|
42
|
-
export {
|
|
55
|
+
export { _StyledSystemProvider };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isNil } from './chunk-U5R6ZXH3.js';
|
|
2
|
-
import { __privateAdd, __privateSet, __privateGet } from './chunk-
|
|
2
|
+
import { __privateAdd, __privateSet, __privateGet } from './chunk-6LX4VMOV.js';
|
|
3
3
|
|
|
4
4
|
// src/utils/useThemeComputedStyle.ts
|
|
5
5
|
var _componentRef, _scope;
|
|
@@ -3,11 +3,11 @@ import { parseResponsiveValue } from './chunk-SFOVKOPG.js';
|
|
|
3
3
|
import { useBreakpointContext } from './chunk-VBKLISDI.js';
|
|
4
4
|
import { isNil } from './chunk-U5R6ZXH3.js';
|
|
5
5
|
import { UnsafePrefix } from './chunk-I37Y2R7V.js';
|
|
6
|
-
import { __privateAdd, __publicField, __privateSet, __privateGet } from './chunk-
|
|
6
|
+
import { __privateAdd, __publicField, __privateSet, __privateGet } from './chunk-6LX4VMOV.js';
|
|
7
7
|
import { useMemo } from 'react';
|
|
8
8
|
|
|
9
9
|
// css-module:./UseStyledSystem.module.css#css-module
|
|
10
|
-
var UseStyledSystem_module_default = { "hop-b-hover": "UseStyledSystem-module__hop-b-
|
|
10
|
+
var UseStyledSystem_module_default = { "hop-b-hover": "UseStyledSystem-module__hop-b-hover___Fy6Tx", "hop-bb-hover": "UseStyledSystem-module__hop-bb-hover___XNCNu", "hop-bl-hover": "UseStyledSystem-module__hop-bl-hover___O3l3D", "hop-br-hover": "UseStyledSystem-module__hop-br-hover___05AZ-", "hop-bt-hover": "UseStyledSystem-module__hop-bt-hover___8-kQc", "hop-b-focus": "UseStyledSystem-module__hop-b-focus___pa6EK", "hop-bb-focus": "UseStyledSystem-module__hop-bb-focus___gUvds", "hop-bl-focus": "UseStyledSystem-module__hop-bl-focus___AO9Qc", "hop-br-focus": "UseStyledSystem-module__hop-br-focus___X2j6C", "hop-bt-focus": "UseStyledSystem-module__hop-bt-focus___tf-rE", "hop-b-active": "UseStyledSystem-module__hop-b-active___yMjv-", "hop-bb-active": "UseStyledSystem-module__hop-bb-active___ODaPG", "hop-bl-active": "UseStyledSystem-module__hop-bl-active___Jy7SY", "hop-br-active": "UseStyledSystem-module__hop-br-active___o2Tff", "hop-bt-active": "UseStyledSystem-module__hop-bt-active___wRzd-", "hop-bg-hover": "UseStyledSystem-module__hop-bg-hover___pB-VQ", "hop-bg-focus": "UseStyledSystem-module__hop-bg-focus___EwM-2", "hop-bg-active": "UseStyledSystem-module__hop-bg-active___FPUbN", "hop-bs-hover": "UseStyledSystem-module__hop-bs-hover___fdtsi", "hop-bs-focus": "UseStyledSystem-module__hop-bs-focus___GR-22", "hop-bs-active": "UseStyledSystem-module__hop-bs-active___NXrax", "hop-c-hover": "UseStyledSystem-module__hop-c-hover___F33fp", "hop-c-focus": "UseStyledSystem-module__hop-c-focus___svGnp", "hop-c-active": "UseStyledSystem-module__hop-c-active___ETSj7", "hop-cs-hover": "UseStyledSystem-module__hop-cs-hover___THdqO", "hop-f-hover": "UseStyledSystem-module__hop-f-hover___OyAJe", "hop-f-focus": "UseStyledSystem-module__hop-f-focus___0jVPn", "hop-o-hover": "UseStyledSystem-module__hop-o-hover___g2T2W", "hop-o-focus": "UseStyledSystem-module__hop-o-focus___cR-Us", "hop-o-active": "UseStyledSystem-module__hop-o-active___5hN2e", "hop-ol-focus": "UseStyledSystem-module__hop-ol-focus___7KksN" };
|
|
11
11
|
|
|
12
12
|
// src/useStyledSystem.ts
|
|
13
13
|
function createSystemValueHandler(systemValues) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Tokens } from './chunk-A47SIZVA.js';
|
|
2
2
|
import { useInsertStyleElement } from './chunk-RIORU7JO.js';
|
|
3
|
-
import { StyledSystemRootCssClass } from './chunk-
|
|
3
|
+
import { StyledSystemRootCssClass } from './chunk-K7AXEZR6.js';
|
|
4
4
|
|
|
5
5
|
// src/tokens/TokenProvider.tsx
|
|
6
6
|
function TokenProvider() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useIsomorphicLayoutEffect } from './chunk-3YM73BQP.js';
|
|
2
|
-
import { ThemeComputedStyle } from './chunk-
|
|
2
|
+
import { ThemeComputedStyle } from './chunk-B6ZBFYWJ.js';
|
|
3
3
|
import { useInsertStyleElement } from './chunk-RIORU7JO.js';
|
|
4
|
-
import { StyledSystemRootCssClass } from './chunk-
|
|
4
|
+
import { StyledSystemRootCssClass } from './chunk-K7AXEZR6.js';
|
|
5
5
|
import { isNil } from './chunk-U5R6ZXH3.js';
|
|
6
6
|
import { useColorSchemeContext } from './chunk-V7X6ANEM.js';
|
|
7
7
|
import { useRef, useState } from 'react';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var package_default = {
|
|
3
3
|
name: "@hopper-ui/styled-system",
|
|
4
4
|
author: "Workleap",
|
|
5
|
-
version: "0.2.
|
|
5
|
+
version: "0.2.7",
|
|
6
6
|
description: "The styled-system package.",
|
|
7
7
|
license: "Apache-2.0",
|
|
8
8
|
repository: {
|
|
@@ -44,36 +44,36 @@ var package_default = {
|
|
|
44
44
|
"react-dom": "*"
|
|
45
45
|
},
|
|
46
46
|
dependencies: {
|
|
47
|
-
clsx: "2.
|
|
48
|
-
"react-aria": "3.
|
|
47
|
+
clsx: "^2.1.0",
|
|
48
|
+
"@react-aria/ssr": "^3.9.1"
|
|
49
49
|
},
|
|
50
50
|
devDependencies: {
|
|
51
51
|
"@hopper-ui/tokens": "workspace:*",
|
|
52
|
-
"@swc/core": "1.3.
|
|
52
|
+
"@swc/core": "1.3.106",
|
|
53
53
|
"@swc/helpers": "0.5.3",
|
|
54
|
-
"@swc/jest": "0.2.
|
|
55
|
-
"@testing-library/jest-dom": "6.
|
|
56
|
-
"@testing-library/react": "14.1.
|
|
57
|
-
"@types/jest": "29.5.
|
|
58
|
-
"@types/react
|
|
59
|
-
"@types/react-
|
|
60
|
-
"@types/react": "18.
|
|
54
|
+
"@swc/jest": "0.2.31",
|
|
55
|
+
"@testing-library/jest-dom": "6.3.0",
|
|
56
|
+
"@testing-library/react": "14.1.2",
|
|
57
|
+
"@types/jest": "29.5.11",
|
|
58
|
+
"@types/react": "18.2.48",
|
|
59
|
+
"@types/react-dom": "18.2.18",
|
|
60
|
+
"@types/react-test-renderer": "18.0.7",
|
|
61
61
|
"@workleap/eslint-plugin": "3.0.0",
|
|
62
62
|
"@workleap/swc-configs": "2.1.2",
|
|
63
63
|
"@workleap/tsup-configs": "3.0.1",
|
|
64
64
|
"@workleap/typescript-configs": "3.0.2",
|
|
65
65
|
"identity-obj-proxy": "3.0.0",
|
|
66
|
-
"jest-environment-jsdom": "29.7.0",
|
|
67
66
|
jest: "29.7.0",
|
|
67
|
+
"jest-environment-jsdom": "29.7.0",
|
|
68
|
+
postcss: "8.4.33",
|
|
68
69
|
"postcss-modules": "6.0.0",
|
|
69
|
-
|
|
70
|
+
react: "18.2.0",
|
|
70
71
|
"react-dom": "18.2.0",
|
|
71
72
|
"react-test-renderer": "18.2.0",
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
typescript: "5.2.2"
|
|
73
|
+
"ts-jest": "29.1.2",
|
|
74
|
+
tsup: "8.0.1",
|
|
75
|
+
"type-fest": "4.10.1",
|
|
76
|
+
typescript: "5.3.3"
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
79
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BreakpointContext } from './chunk-VBKLISDI.js';
|
|
2
2
|
import { Breakpoints } from './chunk-XUHDFZZL.js';
|
|
3
|
-
import { supportsMatchMedia } from './chunk-
|
|
3
|
+
import { supportsMatchMedia } from './chunk-M4X2T3D3.js';
|
|
4
4
|
import { useCallback, useState, useEffect } from 'react';
|
|
5
|
-
import { useIsSSR } from 'react-aria';
|
|
5
|
+
import { useIsSSR } from '@react-aria/ssr';
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
8
|
var DefaultUnsupportedMatchMediaBreakpoint = "lg";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useStyledSystem } from './chunk-
|
|
1
|
+
import { useStyledSystem } from './chunk-EAQ7TNQX.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 = { "html-element": "htmlElement-module__html-
|
|
7
|
+
var htmlElement_module_default = { "html-element": "htmlElement-module__html-element___Yzywg" };
|
|
8
8
|
function htmlElement(elementType) {
|
|
9
9
|
return forwardRef((props, ref) => {
|
|
10
10
|
const { className, children, ...rest } = useStyledSystem(props);
|
|
@@ -9,4 +9,4 @@ interface ColorSchemeContextType {
|
|
|
9
9
|
declare const ColorSchemeContext: react.Context<ColorSchemeContextType>;
|
|
10
10
|
declare function useColorSchemeContext(): ColorSchemeContextType;
|
|
11
11
|
|
|
12
|
-
export { ColorScheme, ColorSchemeContext, ColorSchemeContextType, ColorSchemeOrSystem, useColorSchemeContext };
|
|
12
|
+
export { type ColorScheme, ColorSchemeContext, type ColorSchemeContextType, type ColorSchemeOrSystem, useColorSchemeContext };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { ColorSchemeContext, useColorSchemeContext } from '../chunk-V7X6ANEM.js';
|
|
2
|
-
import '../chunk-
|
|
2
|
+
import '../chunk-6LX4VMOV.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { useColorScheme } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { useColorScheme } from '../chunk-KLNF34G6.js';
|
|
2
|
+
import '../chunk-M4X2T3D3.js';
|
|
3
|
+
import '../chunk-6LX4VMOV.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { BodyStyleProvider } from '../chunk-
|
|
1
|
+
export { BodyStyleProvider } from '../chunk-FTYJQBJC.js';
|
|
2
2
|
import '../chunk-3YM73BQP.js';
|
|
3
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-B6ZBFYWJ.js';
|
|
4
4
|
import '../chunk-RIORU7JO.js';
|
|
5
5
|
import '../chunk-YPIK2HRL.js';
|
|
6
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-K7AXEZR6.js';
|
|
7
7
|
import '../chunk-U5R6ZXH3.js';
|
|
8
8
|
import '../chunk-V7X6ANEM.js';
|
|
9
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-6LX4VMOV.js';
|