@sanity-labs/ui-poc 0.0.1-alpha.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/dist/components.css +9 -0
- package/dist/index.d.ts +203 -0
- package/dist/index.js +290 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +8044 -0
- package/dist/utilities.css +8032 -0
- package/package.json +89 -0
- package/src/components/box/Box.tsx +30 -0
- package/src/components/box/box.props.ts +15 -0
- package/src/components/flex/Flex.tsx +31 -0
- package/src/components/flex/flex.props.ts +19 -0
- package/src/components/grid/Grid.tsx +31 -0
- package/src/components/grid/grid.props.ts +19 -0
- package/src/components/index.css +0 -0
- package/src/components/text/Text.tsx +43 -0
- package/src/components/text/text.props.ts +15 -0
- package/src/css/global.css +103 -0
- package/src/css/index.css +6 -0
- package/src/css/utilities/dynamic/flex-child.css +5 -0
- package/src/css/utilities/dynamic/grid-child.css +8 -0
- package/src/css/utilities/dynamic/grid-parent.css +6 -0
- package/src/css/utilities/dynamic/height.css +5 -0
- package/src/css/utilities/dynamic/index.css +7 -0
- package/src/css/utilities/dynamic/line-clamp.css +6 -0
- package/src/css/utilities/dynamic/width.css +5 -0
- package/src/css/utilities/dynamic/z-index.css +3 -0
- package/src/css/utilities/generic/border.css +11 -0
- package/src/css/utilities/generic/display.css +13 -0
- package/src/css/utilities/generic/flex.css +24 -0
- package/src/css/utilities/generic/grid.css +7 -0
- package/src/css/utilities/generic/index.css +10 -0
- package/src/css/utilities/generic/overflow.css +19 -0
- package/src/css/utilities/generic/position.css +7 -0
- package/src/css/utilities/generic/text-align.css +5 -0
- package/src/css/utilities/generic/text-muted.css +2 -0
- package/src/css/utilities/generic/text-trim.css +38 -0
- package/src/css/utilities/generic/tone.css +34 -0
- package/src/css/utilities/tokenized/color.css +223 -0
- package/src/css/utilities/tokenized/container.css +8 -0
- package/src/css/utilities/tokenized/fontFamily.css +2 -0
- package/src/css/utilities/tokenized/fontWeight.css +4 -0
- package/src/css/utilities/tokenized/gap.css +34 -0
- package/src/css/utilities/tokenized/index.css +9 -0
- package/src/css/utilities/tokenized/inset.css +56 -0
- package/src/css/utilities/tokenized/margin.css +92 -0
- package/src/css/utilities/tokenized/padding.css +85 -0
- package/src/css/utilities/tokenized/radius.css +8 -0
- package/src/css/utilities/tokenized/shadow.css +6 -0
- package/src/css/utilities/tokenized/typography.css +31 -0
- package/src/index.css +2 -0
- package/src/index.ts +1 -0
- package/src/props/border.ts +51 -0
- package/src/props/flexChild.ts +29 -0
- package/src/props/flexParent.ts +46 -0
- package/src/props/gap.ts +30 -0
- package/src/props/gridChild.ts +50 -0
- package/src/props/gridParent.ts +44 -0
- package/src/props/height.ts +29 -0
- package/src/props/layout.ts +37 -0
- package/src/props/margin.ts +58 -0
- package/src/props/overflow.ts +30 -0
- package/src/props/padding.ts +58 -0
- package/src/props/position.ts +59 -0
- package/src/props/tone.ts +16 -0
- package/src/props/typography.ts +46 -0
- package/src/props/width.ts +29 -0
- package/src/types/Display.ts +8 -0
- package/src/types/Flex.ts +18 -0
- package/src/types/FontWeight.ts +2 -0
- package/src/types/Grid.ts +2 -0
- package/src/types/Overflow.ts +2 -0
- package/src/types/Position.ts +2 -0
- package/src/types/PropDef.ts +25 -0
- package/src/types/Radius.ts +2 -0
- package/src/types/Responsive.ts +10 -0
- package/src/types/Space.ts +5 -0
- package/src/types/Text.ts +2 -0
- package/src/types/TextAlign.ts +2 -0
- package/src/types/Tone.ts +2 -0
- package/src/utils/getProps.test.ts +103 -0
- package/src/utils/getProps.ts +74 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import {JSX} from 'react/jsx-runtime'
|
|
2
|
+
import {default as React_2} from 'react'
|
|
3
|
+
|
|
4
|
+
declare type BorderProps = {
|
|
5
|
+
/** CSS **border** property */
|
|
6
|
+
border?: Responsive<boolean>
|
|
7
|
+
/** CSS **border-top** property */
|
|
8
|
+
borderTop?: Responsive<boolean>
|
|
9
|
+
/** CSS **border-right** property */
|
|
10
|
+
borderRight?: Responsive<boolean>
|
|
11
|
+
/** CSS **border-bottom** property */
|
|
12
|
+
borderBottom?: Responsive<boolean>
|
|
13
|
+
/** CSS **border-left** property */
|
|
14
|
+
borderLeft?: Responsive<boolean>
|
|
15
|
+
/** CSS **border-radius** property */
|
|
16
|
+
radius?: Responsive<Radius>
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** @public */
|
|
20
|
+
export declare function Box<T extends React_2.ElementType = 'div'>(
|
|
21
|
+
props: BoxProps<T> & Omit<React_2.ComponentPropsWithRef<T>, keyof BoxProps<T>>,
|
|
22
|
+
): JSX.Element
|
|
23
|
+
|
|
24
|
+
/** @public */
|
|
25
|
+
export declare interface BoxProps<T extends React_2.ElementType> extends LayoutProps {
|
|
26
|
+
/** Element to render */
|
|
27
|
+
as?: T
|
|
28
|
+
/** CSS **display** property */
|
|
29
|
+
display?: Responsive<DisplayBlock>
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare const DISPLAY_BLOCK: readonly ['block', 'inline-block', 'none']
|
|
33
|
+
|
|
34
|
+
declare type DisplayBlock = (typeof DISPLAY_BLOCK)[number]
|
|
35
|
+
|
|
36
|
+
declare type FlexChildProps = {
|
|
37
|
+
/** CSS **flex-basis** property */
|
|
38
|
+
flexBasis?: Responsive<string>
|
|
39
|
+
/** CSS **flex-grow** property */
|
|
40
|
+
flexGrow?: Responsive<number>
|
|
41
|
+
/** CSS **flex-shrink** property */
|
|
42
|
+
flexShrink?: Responsive<number>
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare type GridChildProps = {
|
|
46
|
+
/** CSS **grid-column** property */
|
|
47
|
+
gridColumn?: Responsive<string>
|
|
48
|
+
/** CSS **grid-column-start** property */
|
|
49
|
+
gridColumnStart?: Responsive<string>
|
|
50
|
+
/** CSS **grid-column-end** property */
|
|
51
|
+
gridColumnEnd?: Responsive<string>
|
|
52
|
+
/** CSS **grid-row** property */
|
|
53
|
+
gridRow?: Responsive<string>
|
|
54
|
+
/** CSS **grid-row-start** property */
|
|
55
|
+
gridRowStart?: Responsive<string>
|
|
56
|
+
/** CSS **grid-row-end** property */
|
|
57
|
+
gridRowEnd?: Responsive<string>
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
declare type HeightProps = {
|
|
61
|
+
/** CSS **height** property */
|
|
62
|
+
height?: Responsive<string>
|
|
63
|
+
/** CSS **min-height** property */
|
|
64
|
+
minHeight?: Responsive<string>
|
|
65
|
+
/** CSS **max-height** property */
|
|
66
|
+
maxHeight?: Responsive<string>
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
declare interface LayoutProps
|
|
70
|
+
extends
|
|
71
|
+
ToneProps,
|
|
72
|
+
WidthProps,
|
|
73
|
+
HeightProps,
|
|
74
|
+
MarginProps,
|
|
75
|
+
BorderProps,
|
|
76
|
+
PaddingProps,
|
|
77
|
+
PositionProps,
|
|
78
|
+
OverflowProps,
|
|
79
|
+
FlexChildProps,
|
|
80
|
+
GridChildProps {}
|
|
81
|
+
|
|
82
|
+
declare type MarginProps = {
|
|
83
|
+
/** CSS **margin** property */
|
|
84
|
+
margin?: Responsive<SpaceAuto>
|
|
85
|
+
/** CSS **margin-left** and **margin-right** properties */
|
|
86
|
+
marginX?: Responsive<SpaceAuto>
|
|
87
|
+
/** CSS **margin-top** and **margin-bottom** properties */
|
|
88
|
+
marginY?: Responsive<SpaceAuto>
|
|
89
|
+
/** CSS **margin-top** property */
|
|
90
|
+
marginTop?: Responsive<SpaceAuto>
|
|
91
|
+
/** CSS **margin-right** property */
|
|
92
|
+
marginRight?: Responsive<SpaceAuto>
|
|
93
|
+
/** CSS **margin-bottom** property */
|
|
94
|
+
marginBottom?: Responsive<SpaceAuto>
|
|
95
|
+
/** CSS **margin-left** property */
|
|
96
|
+
marginLeft?: Responsive<SpaceAuto>
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
declare const OVERFLOW: string[]
|
|
100
|
+
|
|
101
|
+
declare type Overflow = (typeof OVERFLOW)[number]
|
|
102
|
+
|
|
103
|
+
declare type OverflowProps = {
|
|
104
|
+
/** CSS **overflow** property */
|
|
105
|
+
overflow?: Responsive<Overflow>
|
|
106
|
+
/** CSS **overflow-x** property */
|
|
107
|
+
overflowX?: Responsive<Overflow>
|
|
108
|
+
/** CSS **overflow-y** property */
|
|
109
|
+
overflowY?: Responsive<Overflow>
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
declare interface PaddingProps {
|
|
113
|
+
/** CSS **padding** property */
|
|
114
|
+
padding?: Responsive<Space>
|
|
115
|
+
/** CSS **padding-left** and **padding-right** properties */
|
|
116
|
+
paddingX?: Responsive<Space>
|
|
117
|
+
/** CSS **padding-top** and **padding-bottom** properties */
|
|
118
|
+
paddingY?: Responsive<Space>
|
|
119
|
+
/** CSS **padding-top** property */
|
|
120
|
+
paddingTop?: Responsive<Space>
|
|
121
|
+
/** CSS **padding-right** property */
|
|
122
|
+
paddingRight?: Responsive<Space>
|
|
123
|
+
/** CSS **padding-bottom** property */
|
|
124
|
+
paddingBottom?: Responsive<Space>
|
|
125
|
+
/** CSS **padding-left** property */
|
|
126
|
+
paddingLeft?: Responsive<Space>
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
declare const POSITION: string[]
|
|
130
|
+
|
|
131
|
+
declare type Position = (typeof POSITION)[number]
|
|
132
|
+
|
|
133
|
+
declare type PositionProps = {
|
|
134
|
+
/** CSS **position** property */
|
|
135
|
+
position?: Responsive<Position>
|
|
136
|
+
/** CSS **inset** property */
|
|
137
|
+
inset?: Responsive<SpaceAuto>
|
|
138
|
+
/** CSS **top** property */
|
|
139
|
+
top?: Responsive<SpaceAuto>
|
|
140
|
+
/** CSS **right** property */
|
|
141
|
+
right?: Responsive<SpaceAuto>
|
|
142
|
+
/** CSS **bottom** property */
|
|
143
|
+
bottom?: Responsive<SpaceAuto>
|
|
144
|
+
/** CSS **left** property */
|
|
145
|
+
left?: Responsive<SpaceAuto>
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
declare const RADIUS: (string | number)[]
|
|
149
|
+
|
|
150
|
+
declare type Radius = (typeof RADIUS)[number]
|
|
151
|
+
|
|
152
|
+
declare type Responsive<T> =
|
|
153
|
+
| T
|
|
154
|
+
| []
|
|
155
|
+
| ([T | undefined, ...(T | undefined)[]] & {
|
|
156
|
+
length: 1
|
|
157
|
+
})
|
|
158
|
+
| ([T | undefined, ...(T | undefined)[]] & {
|
|
159
|
+
length: 2
|
|
160
|
+
})
|
|
161
|
+
| ([T | undefined, ...(T | undefined)[]] & {
|
|
162
|
+
length: 3
|
|
163
|
+
})
|
|
164
|
+
| ([T | undefined, ...(T | undefined)[]] & {
|
|
165
|
+
length: 4
|
|
166
|
+
})
|
|
167
|
+
| ([T | undefined, ...(T | undefined)[]] & {
|
|
168
|
+
length: 5
|
|
169
|
+
})
|
|
170
|
+
| ([T | undefined, ...(T | undefined)[]] & {
|
|
171
|
+
length: 6
|
|
172
|
+
})
|
|
173
|
+
| ([T | undefined, ...(T | undefined)[]] & {
|
|
174
|
+
length: 7
|
|
175
|
+
})
|
|
176
|
+
|
|
177
|
+
declare const SPACE: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
178
|
+
|
|
179
|
+
declare type Space = (typeof SPACE)[number]
|
|
180
|
+
|
|
181
|
+
declare const SPACE_AUTO: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'auto']
|
|
182
|
+
|
|
183
|
+
declare type SpaceAuto = (typeof SPACE_AUTO)[number]
|
|
184
|
+
|
|
185
|
+
declare const TONE: string[]
|
|
186
|
+
|
|
187
|
+
declare type Tone = (typeof TONE)[number]
|
|
188
|
+
|
|
189
|
+
declare type ToneProps = {
|
|
190
|
+
/** CSS **background-color** property */
|
|
191
|
+
tone?: Responsive<Tone>
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
declare type WidthProps = {
|
|
195
|
+
/** CSS **width** property */
|
|
196
|
+
width?: Responsive<string>
|
|
197
|
+
/** CSS **min-width** property */
|
|
198
|
+
minWidth?: Responsive<string>
|
|
199
|
+
/** CSS **max-width** property */
|
|
200
|
+
maxWidth?: Responsive<string>
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export {}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
const RADIUS = [0, 1, 2, 3, 4, 5, 6, "full"], borderProps = {
|
|
4
|
+
border: {
|
|
5
|
+
type: "boolean",
|
|
6
|
+
className: "border",
|
|
7
|
+
inverse: "border-none"
|
|
8
|
+
},
|
|
9
|
+
borderTop: {
|
|
10
|
+
type: "boolean",
|
|
11
|
+
className: "border-top",
|
|
12
|
+
inverse: "border-top-none"
|
|
13
|
+
},
|
|
14
|
+
borderRight: {
|
|
15
|
+
type: "boolean",
|
|
16
|
+
className: "border-right",
|
|
17
|
+
inverse: "border-right-none"
|
|
18
|
+
},
|
|
19
|
+
borderBottom: {
|
|
20
|
+
type: "boolean",
|
|
21
|
+
className: "border-bottom",
|
|
22
|
+
inverse: "border-bottom-none"
|
|
23
|
+
},
|
|
24
|
+
borderLeft: {
|
|
25
|
+
type: "boolean",
|
|
26
|
+
className: "border-left",
|
|
27
|
+
inverse: "border-left-none"
|
|
28
|
+
},
|
|
29
|
+
radius: {
|
|
30
|
+
type: "union",
|
|
31
|
+
className: "radius",
|
|
32
|
+
values: RADIUS
|
|
33
|
+
}
|
|
34
|
+
}, flexChildProps = {
|
|
35
|
+
flexBasis: {
|
|
36
|
+
type: "string",
|
|
37
|
+
className: "flex-basis",
|
|
38
|
+
variable: "--flex-basis"
|
|
39
|
+
},
|
|
40
|
+
flexGrow: {
|
|
41
|
+
type: "number",
|
|
42
|
+
className: "flex-grow",
|
|
43
|
+
variable: "--flex-grow"
|
|
44
|
+
},
|
|
45
|
+
flexShrink: {
|
|
46
|
+
type: "number",
|
|
47
|
+
className: "flex-shrink",
|
|
48
|
+
variable: "--flex-shrink"
|
|
49
|
+
}
|
|
50
|
+
}, gridChildProps = {
|
|
51
|
+
gridColumn: {
|
|
52
|
+
type: "string",
|
|
53
|
+
className: "grid-column",
|
|
54
|
+
variable: "--grid-column"
|
|
55
|
+
},
|
|
56
|
+
gridColumnStart: {
|
|
57
|
+
type: "string",
|
|
58
|
+
className: "grid-column-start",
|
|
59
|
+
variable: "--grid-column-start"
|
|
60
|
+
},
|
|
61
|
+
gridColumnEnd: {
|
|
62
|
+
type: "string",
|
|
63
|
+
className: "grid-column-end",
|
|
64
|
+
variable: "--grid-column-end"
|
|
65
|
+
},
|
|
66
|
+
gridRow: {
|
|
67
|
+
type: "string",
|
|
68
|
+
className: "grid-row",
|
|
69
|
+
variable: "--grid-row"
|
|
70
|
+
},
|
|
71
|
+
gridRowStart: {
|
|
72
|
+
type: "string",
|
|
73
|
+
className: "grid-row-start",
|
|
74
|
+
variable: "--grid-row-start"
|
|
75
|
+
},
|
|
76
|
+
gridRowEnd: {
|
|
77
|
+
type: "string",
|
|
78
|
+
className: "grid-row-end",
|
|
79
|
+
variable: "--grid-row-end"
|
|
80
|
+
}
|
|
81
|
+
}, heightProps = {
|
|
82
|
+
height: {
|
|
83
|
+
type: "string",
|
|
84
|
+
className: "height",
|
|
85
|
+
variable: "--height"
|
|
86
|
+
},
|
|
87
|
+
minHeight: {
|
|
88
|
+
type: "string",
|
|
89
|
+
className: "min-height",
|
|
90
|
+
variable: "--min-height"
|
|
91
|
+
},
|
|
92
|
+
maxHeight: {
|
|
93
|
+
type: "string",
|
|
94
|
+
className: "max-height",
|
|
95
|
+
variable: "--max-height"
|
|
96
|
+
}
|
|
97
|
+
}, SPACE = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], SPACE_AUTO = [...SPACE, "auto"], marginProps = {
|
|
98
|
+
margin: {
|
|
99
|
+
type: "union",
|
|
100
|
+
className: "m",
|
|
101
|
+
values: SPACE_AUTO
|
|
102
|
+
},
|
|
103
|
+
marginX: {
|
|
104
|
+
type: "union",
|
|
105
|
+
className: "mx",
|
|
106
|
+
values: SPACE_AUTO
|
|
107
|
+
},
|
|
108
|
+
marginY: {
|
|
109
|
+
type: "union",
|
|
110
|
+
className: "my",
|
|
111
|
+
values: SPACE_AUTO
|
|
112
|
+
},
|
|
113
|
+
marginTop: {
|
|
114
|
+
type: "union",
|
|
115
|
+
className: "mt",
|
|
116
|
+
values: SPACE_AUTO
|
|
117
|
+
},
|
|
118
|
+
marginRight: {
|
|
119
|
+
type: "union",
|
|
120
|
+
className: "mr",
|
|
121
|
+
values: SPACE_AUTO
|
|
122
|
+
},
|
|
123
|
+
marginBottom: {
|
|
124
|
+
type: "union",
|
|
125
|
+
className: "mb",
|
|
126
|
+
values: SPACE_AUTO
|
|
127
|
+
},
|
|
128
|
+
marginLeft: {
|
|
129
|
+
type: "union",
|
|
130
|
+
className: "ml",
|
|
131
|
+
values: SPACE_AUTO
|
|
132
|
+
}
|
|
133
|
+
}, OVERFLOW = ["visible", "hidden", "auto", "scroll", "clip"], overflowProps = {
|
|
134
|
+
overflow: {
|
|
135
|
+
type: "union",
|
|
136
|
+
className: "overflow",
|
|
137
|
+
values: OVERFLOW
|
|
138
|
+
},
|
|
139
|
+
overflowX: {
|
|
140
|
+
type: "union",
|
|
141
|
+
className: "overflow-x",
|
|
142
|
+
values: OVERFLOW
|
|
143
|
+
},
|
|
144
|
+
overflowY: {
|
|
145
|
+
type: "union",
|
|
146
|
+
className: "overflow-y",
|
|
147
|
+
values: OVERFLOW
|
|
148
|
+
}
|
|
149
|
+
}, paddingProps = {
|
|
150
|
+
padding: {
|
|
151
|
+
type: "union",
|
|
152
|
+
className: "p",
|
|
153
|
+
values: SPACE
|
|
154
|
+
},
|
|
155
|
+
paddingX: {
|
|
156
|
+
type: "union",
|
|
157
|
+
className: "px",
|
|
158
|
+
values: SPACE
|
|
159
|
+
},
|
|
160
|
+
paddingY: {
|
|
161
|
+
type: "union",
|
|
162
|
+
className: "py",
|
|
163
|
+
values: SPACE
|
|
164
|
+
},
|
|
165
|
+
paddingTop: {
|
|
166
|
+
type: "union",
|
|
167
|
+
className: "pt",
|
|
168
|
+
values: SPACE
|
|
169
|
+
},
|
|
170
|
+
paddingRight: {
|
|
171
|
+
type: "union",
|
|
172
|
+
className: "pr",
|
|
173
|
+
values: SPACE
|
|
174
|
+
},
|
|
175
|
+
paddingBottom: {
|
|
176
|
+
type: "union",
|
|
177
|
+
className: "pb",
|
|
178
|
+
values: SPACE
|
|
179
|
+
},
|
|
180
|
+
paddingLeft: {
|
|
181
|
+
type: "union",
|
|
182
|
+
className: "pl",
|
|
183
|
+
values: SPACE
|
|
184
|
+
}
|
|
185
|
+
}, POSITION = ["absolute", "fixed", "relative", "static", "sticky"], positionProps = {
|
|
186
|
+
position: {
|
|
187
|
+
type: "union",
|
|
188
|
+
className: "position",
|
|
189
|
+
values: POSITION
|
|
190
|
+
},
|
|
191
|
+
inset: {
|
|
192
|
+
type: "union",
|
|
193
|
+
className: "inset",
|
|
194
|
+
values: SPACE_AUTO
|
|
195
|
+
},
|
|
196
|
+
top: {
|
|
197
|
+
type: "union",
|
|
198
|
+
className: "top",
|
|
199
|
+
values: SPACE_AUTO
|
|
200
|
+
},
|
|
201
|
+
right: {
|
|
202
|
+
type: "union",
|
|
203
|
+
className: "right",
|
|
204
|
+
values: SPACE_AUTO
|
|
205
|
+
},
|
|
206
|
+
bottom: {
|
|
207
|
+
type: "union",
|
|
208
|
+
className: "bottom",
|
|
209
|
+
values: SPACE_AUTO
|
|
210
|
+
},
|
|
211
|
+
left: {
|
|
212
|
+
type: "union",
|
|
213
|
+
className: "left",
|
|
214
|
+
values: SPACE_AUTO
|
|
215
|
+
}
|
|
216
|
+
}, TONE = ["default", "neutral", "primary", "suggest", "positive", "caution", "critical"], toneProps = {
|
|
217
|
+
tone: {
|
|
218
|
+
type: "union",
|
|
219
|
+
className: "tone",
|
|
220
|
+
values: TONE
|
|
221
|
+
}
|
|
222
|
+
}, widthProps = {
|
|
223
|
+
width: {
|
|
224
|
+
type: "string",
|
|
225
|
+
className: "width",
|
|
226
|
+
variable: "--width"
|
|
227
|
+
},
|
|
228
|
+
minWidth: {
|
|
229
|
+
type: "string",
|
|
230
|
+
className: "min-width",
|
|
231
|
+
variable: "--min-width"
|
|
232
|
+
},
|
|
233
|
+
maxWidth: {
|
|
234
|
+
type: "string",
|
|
235
|
+
className: "max-width",
|
|
236
|
+
variable: "--max-width"
|
|
237
|
+
}
|
|
238
|
+
}, layoutProps = {
|
|
239
|
+
...toneProps,
|
|
240
|
+
...widthProps,
|
|
241
|
+
...heightProps,
|
|
242
|
+
...marginProps,
|
|
243
|
+
...borderProps,
|
|
244
|
+
...paddingProps,
|
|
245
|
+
...positionProps,
|
|
246
|
+
...overflowProps,
|
|
247
|
+
...flexChildProps,
|
|
248
|
+
...gridChildProps
|
|
249
|
+
}, DISPLAY_BLOCK = ["block", "inline-block", "none"], PREFIX = "sui", BREAKPOINTS_LENGTH = 7;
|
|
250
|
+
function getProps(allProps, styleProps) {
|
|
251
|
+
let className = allProps?.className || "", style = allProps?.style || {};
|
|
252
|
+
for (const key in allProps)
|
|
253
|
+
if (!(!styleProps?.[key] || !styleProps?.[key].className))
|
|
254
|
+
if (Array.isArray(allProps[key]))
|
|
255
|
+
for (let i = 0, len = Math.min(allProps[key].length, BREAKPOINTS_LENGTH); i < len; i++)
|
|
256
|
+
className = classNames(className, getClassName(allProps[key][i], styleProps[key], i)), style = { ...style, ...getStyle(allProps[key][i], styleProps[key], i) };
|
|
257
|
+
else
|
|
258
|
+
className = classNames(className, getClassName(allProps[key], styleProps[key])), style = { ...style, ...getStyle(allProps[key], styleProps[key]) };
|
|
259
|
+
const propsWithoutStyleProps = {};
|
|
260
|
+
for (const key in allProps)
|
|
261
|
+
(!styleProps?.[key] || !styleProps[key].className) && (propsWithoutStyleProps[key] = allProps[key]);
|
|
262
|
+
return { ...propsWithoutStyleProps, className, style };
|
|
263
|
+
}
|
|
264
|
+
function getClassName(prop, styleProp, bp) {
|
|
265
|
+
return styleProp.type === "union" && styleProp.values?.includes(prop) ? `${PREFIX}-${styleProp.className}${typeof prop == "string" ? `-${prop}` : prop}${bp ? `-bp-${bp}` : ""}` : styleProp.type === "string" || styleProp.type === "number" ? `${PREFIX}-${styleProp.className}${bp ? `-bp-${bp}` : ""}` : styleProp.type === "boolean" ? `${PREFIX}-${prop ? styleProp.className : styleProp.inverse}${bp ? `-bp-${bp}` : ""}` : "";
|
|
266
|
+
}
|
|
267
|
+
function getStyle(prop, styleProp, bp) {
|
|
268
|
+
return styleProp.type === "string" || styleProp.type === "number" ? {
|
|
269
|
+
[`${styleProp.variable}${bp ? `-bp-${bp}` : ""}`]: prop
|
|
270
|
+
} : {};
|
|
271
|
+
}
|
|
272
|
+
const boxProps = {
|
|
273
|
+
as: {
|
|
274
|
+
type: "string"
|
|
275
|
+
},
|
|
276
|
+
display: {
|
|
277
|
+
type: "union",
|
|
278
|
+
className: "display",
|
|
279
|
+
values: DISPLAY_BLOCK
|
|
280
|
+
},
|
|
281
|
+
...layoutProps
|
|
282
|
+
};
|
|
283
|
+
function Box(props) {
|
|
284
|
+
const { as, children, className, style, ...rest } = getProps(props, boxProps);
|
|
285
|
+
return /* @__PURE__ */ jsx(as || "div", { className: classNames("sui-Box", className), style, "data-ui": "Box", ...rest, children });
|
|
286
|
+
}
|
|
287
|
+
export {
|
|
288
|
+
Box
|
|
289
|
+
};
|
|
290
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/types/Radius.ts","../src/props/border.ts","../src/props/flexChild.ts","../src/props/gridChild.ts","../src/props/height.ts","../src/types/Space.ts","../src/props/margin.ts","../src/types/Overflow.ts","../src/props/overflow.ts","../src/props/padding.ts","../src/types/Position.ts","../src/props/position.ts","../src/types/Tone.ts","../src/props/tone.ts","../src/props/width.ts","../src/props/layout.ts","../src/types/Display.ts","../src/utils/getProps.ts","../src/components/box.props.ts","../src/components/Box.tsx"],"sourcesContent":["export const RADIUS = [0, 1, 2, 3, 4, 5, 6, 'full']\nexport type Radius = (typeof RADIUS)[number]\n","import {type StyleProp} from '../types/StyleProp'\nimport {RADIUS, type Radius} from '../types/Radius'\nimport {type Responsive} from '../types/Responsive'\n\nexport type BorderProps = {\n /** CSS **border** property */\n border?: Responsive<boolean>\n /** CSS **border-top** property */\n borderTop?: Responsive<boolean>\n /** CSS **border-right** property */\n borderRight?: Responsive<boolean>\n /** CSS **border-bottom** property */\n borderBottom?: Responsive<boolean>\n /** CSS **border-left** property */\n borderLeft?: Responsive<boolean>\n /** CSS **border-radius** property */\n radius?: Responsive<Radius>\n}\n\nexport const borderProps: Record<string, StyleProp> = {\n border: {\n type: 'boolean',\n className: 'border',\n inverse: 'border-none',\n },\n borderTop: {\n type: 'boolean',\n className: 'border-top',\n inverse: 'border-top-none',\n },\n borderRight: {\n type: 'boolean',\n className: 'border-right',\n inverse: 'border-right-none',\n },\n borderBottom: {\n type: 'boolean',\n className: 'border-bottom',\n inverse: 'border-bottom-none',\n },\n borderLeft: {\n type: 'boolean',\n className: 'border-left',\n inverse: 'border-left-none',\n },\n radius: {\n type: 'union',\n className: 'radius',\n values: RADIUS,\n },\n}\n","import {type StyleProp} from '../types/StyleProp'\nimport {type Responsive} from '../types/Responsive'\n\nexport type FlexChildProps = {\n /** CSS **flex-basis** property */\n flexBasis?: Responsive<string>\n /** CSS **flex-grow** property */\n flexGrow?: Responsive<number>\n /** CSS **flex-shrink** property */\n flexShrink?: Responsive<number>\n}\n\nexport const flexChildProps: Record<string, StyleProp> = {\n flexBasis: {\n type: 'string',\n className: 'flex-basis',\n variable: '--flex-basis',\n },\n flexGrow: {\n type: 'number',\n className: 'flex-grow',\n variable: '--flex-grow',\n },\n flexShrink: {\n type: 'number',\n className: 'flex-shrink',\n variable: '--flex-shrink',\n },\n}\n","import {type StyleProp} from '../types/StyleProp'\nimport {type Responsive} from '../types/Responsive'\n\nexport type GridChildProps = {\n /** CSS **grid-column** property */\n gridColumn?: Responsive<string>\n /** CSS **grid-column-start** property */\n gridColumnStart?: Responsive<string>\n /** CSS **grid-column-end** property */\n gridColumnEnd?: Responsive<string>\n /** CSS **grid-row** property */\n gridRow?: Responsive<string>\n /** CSS **grid-row-start** property */\n gridRowStart?: Responsive<string>\n /** CSS **grid-row-end** property */\n gridRowEnd?: Responsive<string>\n}\n\nexport const gridChildProps: Record<string, StyleProp> = {\n gridColumn: {\n type: 'string',\n className: 'grid-column',\n variable: '--grid-column',\n },\n gridColumnStart: {\n type: 'string',\n className: 'grid-column-start',\n variable: '--grid-column-start',\n },\n gridColumnEnd: {\n type: 'string',\n className: 'grid-column-end',\n variable: '--grid-column-end',\n },\n gridRow: {\n type: 'string',\n className: 'grid-row',\n variable: '--grid-row',\n },\n gridRowStart: {\n type: 'string',\n className: 'grid-row-start',\n variable: '--grid-row-start',\n },\n gridRowEnd: {\n type: 'string',\n className: 'grid-row-end',\n variable: '--grid-row-end',\n },\n}\n","import {type StyleProp} from '../types/StyleProp'\nimport {type Responsive} from '../types/Responsive'\n\nexport type HeightProps = {\n /** CSS **height** property */\n height?: Responsive<string>\n /** CSS **min-height** property */\n minHeight?: Responsive<string>\n /** CSS **max-height** property */\n maxHeight?: Responsive<string>\n}\n\nexport const heightProps: Record<string, StyleProp> = {\n height: {\n type: 'string',\n className: 'height',\n variable: '--height',\n },\n minHeight: {\n type: 'string',\n className: 'min-height',\n variable: '--min-height',\n },\n maxHeight: {\n type: 'string',\n className: 'max-height',\n variable: '--max-height',\n },\n}\n","export const SPACE = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] as const\nexport type Space = (typeof SPACE)[number]\n\nexport const SPACE_AUTO = [...SPACE, 'auto'] as const\nexport type SpaceAuto = (typeof SPACE_AUTO)[number]\n","import {type StyleProp} from '../types/StyleProp'\nimport {type Responsive} from '../types/Responsive'\nimport {SPACE_AUTO, type SpaceAuto} from '../types/Space'\n\nexport type MarginProps = {\n /** CSS **margin** property */\n margin?: Responsive<SpaceAuto>\n /** CSS **margin-left** and **margin-right** properties */\n marginX?: Responsive<SpaceAuto>\n /** CSS **margin-top** and **margin-bottom** properties */\n marginY?: Responsive<SpaceAuto>\n /** CSS **margin-top** property */\n marginTop?: Responsive<SpaceAuto>\n /** CSS **margin-right** property */\n marginRight?: Responsive<SpaceAuto>\n /** CSS **margin-bottom** property */\n marginBottom?: Responsive<SpaceAuto>\n /** CSS **margin-left** property */\n marginLeft?: Responsive<SpaceAuto>\n}\n\nexport const marginProps: Record<string, StyleProp> = {\n margin: {\n type: 'union',\n className: 'm',\n values: SPACE_AUTO,\n },\n marginX: {\n type: 'union',\n className: 'mx',\n values: SPACE_AUTO,\n },\n marginY: {\n type: 'union',\n className: 'my',\n values: SPACE_AUTO,\n },\n marginTop: {\n type: 'union',\n className: 'mt',\n values: SPACE_AUTO,\n },\n marginRight: {\n type: 'union',\n className: 'mr',\n values: SPACE_AUTO,\n },\n marginBottom: {\n type: 'union',\n className: 'mb',\n values: SPACE_AUTO,\n },\n marginLeft: {\n type: 'union',\n className: 'ml',\n values: SPACE_AUTO,\n },\n}\n","export const OVERFLOW = ['visible', 'hidden', 'auto', 'scroll', 'clip']\nexport type Overflow = (typeof OVERFLOW)[number]\n","import {OVERFLOW, type Overflow} from '../types/Overflow'\nimport {type StyleProp} from '../types/StyleProp'\nimport {type Responsive} from '../types/Responsive'\n\nexport type OverflowProps = {\n /** CSS **overflow** property */\n overflow?: Responsive<Overflow>\n /** CSS **overflow-x** property */\n overflowX?: Responsive<Overflow>\n /** CSS **overflow-y** property */\n overflowY?: Responsive<Overflow>\n}\n\nexport const overflowProps: Record<string, StyleProp> = {\n overflow: {\n type: 'union',\n className: 'overflow',\n values: OVERFLOW,\n },\n overflowX: {\n type: 'union',\n className: 'overflow-x',\n values: OVERFLOW,\n },\n overflowY: {\n type: 'union',\n className: 'overflow-y',\n values: OVERFLOW,\n },\n}\n","import {type StyleProp} from '../types/StyleProp'\nimport {type Responsive} from '../types/Responsive'\nimport {SPACE, type Space} from '../types/Space'\n\nexport interface PaddingProps {\n /** CSS **padding** property */\n padding?: Responsive<Space>\n /** CSS **padding-left** and **padding-right** properties */\n paddingX?: Responsive<Space>\n /** CSS **padding-top** and **padding-bottom** properties */\n paddingY?: Responsive<Space>\n /** CSS **padding-top** property */\n paddingTop?: Responsive<Space>\n /** CSS **padding-right** property */\n paddingRight?: Responsive<Space>\n /** CSS **padding-bottom** property */\n paddingBottom?: Responsive<Space>\n /** CSS **padding-left** property */\n paddingLeft?: Responsive<Space>\n}\n\nexport const paddingProps: Record<string, StyleProp> = {\n padding: {\n type: 'union',\n className: 'p',\n values: SPACE,\n },\n paddingX: {\n type: 'union',\n className: 'px',\n values: SPACE,\n },\n paddingY: {\n type: 'union',\n className: 'py',\n values: SPACE,\n },\n paddingTop: {\n type: 'union',\n className: 'pt',\n values: SPACE,\n },\n paddingRight: {\n type: 'union',\n className: 'pr',\n values: SPACE,\n },\n paddingBottom: {\n type: 'union',\n className: 'pb',\n values: SPACE,\n },\n paddingLeft: {\n type: 'union',\n className: 'pl',\n values: SPACE,\n },\n}\n","export const POSITION = ['absolute', 'fixed', 'relative', 'static', 'sticky']\nexport type Position = (typeof POSITION)[number]\n","import {POSITION, type Position} from '../types/Position'\nimport {type StyleProp} from '../types/StyleProp'\nimport {type Responsive} from '../types/Responsive'\nimport {SPACE_AUTO, type SpaceAuto} from '../types/Space'\n\nexport type PositionProps = {\n /** CSS **position** property */\n position?: Responsive<Position>\n /** CSS **inset** property */\n inset?: Responsive<SpaceAuto>\n /** CSS **top** property */\n top?: Responsive<SpaceAuto>\n /** CSS **right** property */\n right?: Responsive<SpaceAuto>\n /** CSS **bottom** property */\n bottom?: Responsive<SpaceAuto>\n /** CSS **left** property */\n left?: Responsive<SpaceAuto>\n}\n\nexport const positionProps: Record<string, StyleProp> = {\n position: {\n type: 'union',\n className: 'position',\n values: POSITION,\n },\n inset: {\n type: 'union',\n className: 'inset',\n values: SPACE_AUTO,\n },\n top: {\n type: 'union',\n className: 'top',\n values: SPACE_AUTO,\n },\n right: {\n type: 'union',\n className: 'right',\n values: SPACE_AUTO,\n },\n bottom: {\n type: 'union',\n className: 'bottom',\n values: SPACE_AUTO,\n },\n left: {\n type: 'union',\n className: 'left',\n values: SPACE_AUTO,\n },\n}\n","export const TONE = ['default', 'neutral', 'primary', 'suggest', 'positive', 'caution', 'critical']\nexport type Tone = (typeof TONE)[number]\n","import {type StyleProp} from '../types/StyleProp'\nimport {type Responsive} from '../types/Responsive'\nimport {TONE, type Tone} from '../types/Tone'\n\nexport type ToneProps = {\n /** CSS **background-color** property */\n tone?: Responsive<Tone>\n}\n\nexport const toneProps: Record<string, StyleProp> = {\n tone: {\n type: 'union',\n className: 'tone',\n values: TONE,\n },\n}\n","import {type StyleProp} from '../types/StyleProp'\nimport {type Responsive} from '../types/Responsive'\n\nexport type WidthProps = {\n /** CSS **width** property */\n width?: Responsive<string>\n /** CSS **min-width** property */\n minWidth?: Responsive<string>\n /** CSS **max-width** property */\n maxWidth?: Responsive<string>\n}\n\nexport const widthProps: Record<string, StyleProp> = {\n width: {\n type: 'string',\n className: 'width',\n variable: '--width',\n },\n minWidth: {\n type: 'string',\n className: 'min-width',\n variable: '--min-width',\n },\n maxWidth: {\n type: 'string',\n className: 'max-width',\n variable: '--max-width',\n },\n}\n","import {type StyleProp} from '../types/StyleProp'\nimport {type BorderProps, borderProps} from './border'\nimport {type FlexChildProps, flexChildProps} from './flexChild'\nimport {type GridChildProps, gridChildProps} from './gridChild'\nimport {type HeightProps, heightProps} from './height'\nimport {type MarginProps, marginProps} from './margin'\nimport {type OverflowProps, overflowProps} from './overflow'\nimport {type PaddingProps, paddingProps} from './padding'\nimport {type PositionProps, positionProps} from './position'\nimport {type ToneProps, toneProps} from './tone'\nimport {type WidthProps, widthProps} from './width'\n\nexport interface LayoutProps\n extends\n ToneProps,\n WidthProps,\n HeightProps,\n MarginProps,\n BorderProps,\n PaddingProps,\n PositionProps,\n OverflowProps,\n FlexChildProps,\n GridChildProps {}\n\nexport const layoutProps: Record<string, StyleProp> = {\n ...toneProps,\n ...widthProps,\n ...heightProps,\n ...marginProps,\n ...borderProps,\n ...paddingProps,\n ...positionProps,\n ...overflowProps,\n ...flexChildProps,\n ...gridChildProps,\n}\n","export const DISPLAY_BLOCK = ['block', 'inline-block', 'none'] as const\nexport type DisplayBlock = (typeof DISPLAY_BLOCK)[number]\n\nexport const DISPLAY_FLEX = ['flex', 'inline-flex', 'none'] as const\nexport type DisplayFlex = (typeof DISPLAY_FLEX)[number]\n\nexport const DISPLAY_GRID = ['grid', 'inline-grid', 'none'] as const\nexport type DisplayGrid = (typeof DISPLAY_GRID)[number]\n","import classNames from 'classnames'\n\nimport {type StyleProp} from '../types/StyleProp'\n\nconst PREFIX = 'sui'\nconst BREAKPOINTS_LENGTH = 7\n\ninterface AllProps {\n className?: string\n style?: React.CSSProperties\n /* eslint-disable-next-line @typescript-eslint/no-explicit-any */\n [key: string]: any\n}\n\nexport function getProps<P extends AllProps, T extends Record<string, StyleProp>>(\n allProps?: P,\n styleProps?: T,\n): AllProps {\n let className = allProps?.className || ''\n let style = allProps?.style || {}\n\n // Iterate through the keys of all props on the component\n for (const key in allProps) {\n // Bypass props that aren't style props\n if (!styleProps?.[key] || !styleProps?.[key].className) {\n continue\n }\n\n // Process style props\n if (Array.isArray(allProps[key])) {\n // Responsive array: generate a class name and style per breakpoint\n for (let i = 0, len = Math.min(allProps[key].length, BREAKPOINTS_LENGTH); i < len; i++) {\n className = classNames(className, getClassName(allProps[key][i], styleProps[key], i))\n style = {...style, ...getStyle(allProps[key][i], styleProps[key], i)}\n }\n } else {\n // Single value: generate one class name and style\n className = classNames(className, getClassName(allProps[key], styleProps[key]))\n style = {...style, ...getStyle(allProps[key], styleProps[key])}\n }\n }\n\n // Return only the props not consumed by style props\n const propsWithoutStyleProps: AllProps = {}\n for (const key in allProps) {\n if (!styleProps?.[key] || !styleProps[key].className) {\n propsWithoutStyleProps[key] = allProps[key]\n }\n }\n\n return {...propsWithoutStyleProps, className, style}\n}\n\n/* eslint-disable-next-line @typescript-eslint/no-explicit-any */\nfunction getClassName(prop: any, styleProp: StyleProp, bp?: number) {\n if (styleProp.type === 'union' && styleProp.values?.includes(prop)) {\n /* Note: This may need updating depending on the final CSS classname formatting */\n return `${PREFIX}-${styleProp.className}${typeof prop === 'string' ? `-${prop}` : prop}${bp ? `-bp-${bp}` : ''}`\n }\n\n if (styleProp.type === 'string' || styleProp.type === 'number') {\n return `${PREFIX}-${styleProp.className}${bp ? `-bp-${bp}` : ''}`\n }\n\n if (styleProp.type === 'boolean') {\n return `${PREFIX}-${prop ? styleProp.className : styleProp.inverse}${bp ? `-bp-${bp}` : ''}`\n }\n\n return ''\n}\n\n/* eslint-disable-next-line @typescript-eslint/no-explicit-any */\nfunction getStyle(prop: any, styleProp: StyleProp, bp?: number) {\n if (styleProp.type === 'string' || styleProp.type === 'number') {\n return {\n [`${styleProp.variable}${bp ? `-bp-${bp}` : ''}`]: prop,\n }\n }\n\n return {}\n}\n","import {layoutProps} from '../props/layout'\nimport {DISPLAY_BLOCK} from '../types/Display'\nimport {type StyleProp} from '../types/StyleProp'\n\nexport const boxProps: Record<string, StyleProp> = {\n as: {\n type: 'string',\n },\n display: {\n type: 'union',\n className: 'display',\n values: DISPLAY_BLOCK,\n },\n ...layoutProps,\n}\n","import classNames from 'classnames'\nimport React from 'react'\n\nimport {type LayoutProps} from '../props/layout'\nimport {type DisplayBlock} from '../types/Display'\nimport {type Responsive} from '../types/Responsive'\nimport {getProps} from '../utils/getProps'\nimport {boxProps} from './box.props'\n\n/** @public */\nexport interface BoxProps<T extends React.ElementType> extends LayoutProps {\n /** Element to render */\n as?: T\n /** CSS **display** property */\n display?: Responsive<DisplayBlock>\n}\n\n/** @public */\nexport function Box<T extends React.ElementType = 'div'>(\n props: BoxProps<T> & Omit<React.ComponentPropsWithRef<T>, keyof BoxProps<T>>,\n) {\n const {as, children, className, style, ...rest} = getProps(props, boxProps)\n const Component = as || 'div'\n\n return (\n <Component className={classNames('sui-Box', className)} style={style} data-ui=\"Box\" {...rest}>\n {children}\n </Component>\n )\n}\n"],"names":[],"mappings":";;AAAO,MAAM,SAAS,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,MAAM,GCmBrC,cAAyC;AAAA,EACpD,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,WAAW;AAAA,IACX,SAAS;AAAA,EAAA;AAAA,EAEX,WAAW;AAAA,IACT,MAAM;AAAA,IACN,WAAW;AAAA,IACX,SAAS;AAAA,EAAA;AAAA,EAEX,aAAa;AAAA,IACX,MAAM;AAAA,IACN,WAAW;AAAA,IACX,SAAS;AAAA,EAAA;AAAA,EAEX,cAAc;AAAA,IACZ,MAAM;AAAA,IACN,WAAW;AAAA,IACX,SAAS;AAAA,EAAA;AAAA,EAEX,YAAY;AAAA,IACV,MAAM;AAAA,IACN,WAAW;AAAA,IACX,SAAS;AAAA,EAAA;AAAA,EAEX,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,WAAW;AAAA,IACX,QAAQ;AAAA,EAAA;AAEZ,GCtCa,iBAA4C;AAAA,EACvD,WAAW;AAAA,IACT,MAAM;AAAA,IACN,WAAW;AAAA,IACX,UAAU;AAAA,EAAA;AAAA,EAEZ,UAAU;AAAA,IACR,MAAM;AAAA,IACN,WAAW;AAAA,IACX,UAAU;AAAA,EAAA;AAAA,EAEZ,YAAY;AAAA,IACV,MAAM;AAAA,IACN,WAAW;AAAA,IACX,UAAU;AAAA,EAAA;AAEd,GCVa,iBAA4C;AAAA,EACvD,YAAY;AAAA,IACV,MAAM;AAAA,IACN,WAAW;AAAA,IACX,UAAU;AAAA,EAAA;AAAA,EAEZ,iBAAiB;AAAA,IACf,MAAM;AAAA,IACN,WAAW;AAAA,IACX,UAAU;AAAA,EAAA;AAAA,EAEZ,eAAe;AAAA,IACb,MAAM;AAAA,IACN,WAAW;AAAA,IACX,UAAU;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