@horang-corp/react-system 0.1.1
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/css/conditions.mjs +36 -0
- package/css/css.d.ts +22 -0
- package/css/css.mjs +45 -0
- package/css/cva.d.ts +6 -0
- package/css/cva.mjs +87 -0
- package/css/cx.d.ts +5 -0
- package/css/cx.mjs +15 -0
- package/css/index.d.ts +5 -0
- package/css/index.mjs +4 -0
- package/css/sva.d.ts +4 -0
- package/css/sva.mjs +46 -0
- package/helpers.mjs +328 -0
- package/jsx/aspect-ratio.d.ts +10 -0
- package/jsx/aspect-ratio.mjs +14 -0
- package/jsx/bleed.d.ts +10 -0
- package/jsx/bleed.mjs +14 -0
- package/jsx/box.d.ts +10 -0
- package/jsx/box.mjs +14 -0
- package/jsx/center.d.ts +10 -0
- package/jsx/center.mjs +14 -0
- package/jsx/circle.d.ts +10 -0
- package/jsx/circle.mjs +14 -0
- package/jsx/container.d.ts +10 -0
- package/jsx/container.mjs +14 -0
- package/jsx/cq.d.ts +10 -0
- package/jsx/cq.mjs +14 -0
- package/jsx/create-style-context.d.ts +54 -0
- package/jsx/create-style-context.mjs +118 -0
- package/jsx/divider.d.ts +10 -0
- package/jsx/divider.mjs +14 -0
- package/jsx/factory-helper.mjs +22 -0
- package/jsx/factory.d.ts +3 -0
- package/jsx/factory.mjs +89 -0
- package/jsx/flex.d.ts +10 -0
- package/jsx/flex.mjs +14 -0
- package/jsx/float.d.ts +10 -0
- package/jsx/float.mjs +14 -0
- package/jsx/grid-item.d.ts +10 -0
- package/jsx/grid-item.mjs +14 -0
- package/jsx/grid.d.ts +10 -0
- package/jsx/grid.mjs +14 -0
- package/jsx/hstack.d.ts +10 -0
- package/jsx/hstack.mjs +14 -0
- package/jsx/index.d.ts +25 -0
- package/jsx/index.mjs +23 -0
- package/jsx/is-valid-prop.d.ts +11 -0
- package/jsx/is-valid-prop.mjs +17 -0
- package/jsx/link-overlay.d.ts +10 -0
- package/jsx/link-overlay.mjs +14 -0
- package/jsx/spacer.d.ts +10 -0
- package/jsx/spacer.mjs +14 -0
- package/jsx/square.d.ts +10 -0
- package/jsx/square.mjs +14 -0
- package/jsx/stack.d.ts +10 -0
- package/jsx/stack.mjs +14 -0
- package/jsx/visually-hidden.d.ts +10 -0
- package/jsx/visually-hidden.mjs +14 -0
- package/jsx/vstack.d.ts +10 -0
- package/jsx/vstack.mjs +14 -0
- package/jsx/wrap.d.ts +10 -0
- package/jsx/wrap.mjs +14 -0
- package/package.json +45 -0
- package/patterns/aspect-ratio.d.ts +20 -0
- package/patterns/aspect-ratio.mjs +38 -0
- package/patterns/bleed.d.ts +21 -0
- package/patterns/bleed.mjs +24 -0
- package/patterns/box.d.ts +20 -0
- package/patterns/box.mjs +15 -0
- package/patterns/center.d.ts +20 -0
- package/patterns/center.mjs +21 -0
- package/patterns/circle.d.ts +20 -0
- package/patterns/circle.mjs +25 -0
- package/patterns/container.d.ts +20 -0
- package/patterns/container.mjs +21 -0
- package/patterns/cq.d.ts +21 -0
- package/patterns/cq.mjs +21 -0
- package/patterns/divider.d.ts +22 -0
- package/patterns/divider.mjs +25 -0
- package/patterns/flex.d.ts +26 -0
- package/patterns/flex.mjs +26 -0
- package/patterns/float.d.ts +23 -0
- package/patterns/float.mjs +52 -0
- package/patterns/grid-item.d.ts +25 -0
- package/patterns/grid-item.mjs +25 -0
- package/patterns/grid.d.ts +24 -0
- package/patterns/grid.mjs +27 -0
- package/patterns/hstack.d.ts +21 -0
- package/patterns/hstack.mjs +24 -0
- package/patterns/index.d.ts +21 -0
- package/patterns/index.mjs +20 -0
- package/patterns/link-overlay.d.ts +20 -0
- package/patterns/link-overlay.mjs +24 -0
- package/patterns/spacer.d.ts +20 -0
- package/patterns/spacer.mjs +25 -0
- package/patterns/square.d.ts +20 -0
- package/patterns/square.mjs +24 -0
- package/patterns/stack.d.ts +23 -0
- package/patterns/stack.mjs +24 -0
- package/patterns/visually-hidden.d.ts +20 -0
- package/patterns/visually-hidden.mjs +18 -0
- package/patterns/vstack.d.ts +21 -0
- package/patterns/vstack.mjs +24 -0
- package/patterns/wrap.d.ts +24 -0
- package/patterns/wrap.mjs +25 -0
- package/runtime.d.ts +8 -0
- package/runtime.mjs +87 -0
- package/styles.css +18334 -0
- package/tokens/index.d.ts +9 -0
- package/tokens/index.mjs +2656 -0
- package/tokens/tokens.d.ts +60 -0
- package/types/composition.d.ts +227 -0
- package/types/conditions.d.ts +312 -0
- package/types/csstype.d.ts +22570 -0
- package/types/global.d.ts +20 -0
- package/types/index.d.ts +8 -0
- package/types/jsx.d.ts +69 -0
- package/types/parts.d.ts +8 -0
- package/types/pattern.d.ts +78 -0
- package/types/prop-type.d.ts +256 -0
- package/types/recipe.d.ts +181 -0
- package/types/selectors.d.ts +59 -0
- package/types/static-css.d.ts +56 -0
- package/types/style-props.d.ts +8094 -0
- package/types/system-types.d.ts +151 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue, Nested } from './conditions';
|
|
3
|
+
import type { AtRule, Globals, PropertiesFallback } from './csstype';
|
|
4
|
+
import type { SystemProperties, CssVarProperties } from './style-props';
|
|
5
|
+
|
|
6
|
+
type String = string & {}
|
|
7
|
+
type Number = number & {}
|
|
8
|
+
|
|
9
|
+
export type Pretty<T> = { [K in keyof T]: T[K] } & {}
|
|
10
|
+
|
|
11
|
+
export type DistributiveOmit<T, K extends keyof any> = T extends unknown ? Omit<T, K> : never
|
|
12
|
+
|
|
13
|
+
export type DistributiveUnion<T, U> = {
|
|
14
|
+
[K in keyof T]: K extends keyof U ? U[K] | T[K] : T[K]
|
|
15
|
+
} & DistributiveOmit<U, keyof T>
|
|
16
|
+
|
|
17
|
+
export type Assign<T, U> = {
|
|
18
|
+
[K in keyof T]: K extends keyof U ? U[K] : T[K]
|
|
19
|
+
} & U
|
|
20
|
+
|
|
21
|
+
/* -----------------------------------------------------------------------------
|
|
22
|
+
* Native css properties
|
|
23
|
+
* -----------------------------------------------------------------------------*/
|
|
24
|
+
|
|
25
|
+
type CornerShapeValue = 'round' | 'square' | 'bevel' | 'scoop' | 'notch' | 'squircle' | `superellipse(${number})`
|
|
26
|
+
|
|
27
|
+
export interface ModernCssProperties {
|
|
28
|
+
/**
|
|
29
|
+
* Controls whether the entire element should be draggable instead of its contents.
|
|
30
|
+
*/
|
|
31
|
+
WebkitUserDrag?: Globals | 'auto' | 'element' | 'none'
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Specifies whether an element can be used to drag the entire app window (Electron).
|
|
35
|
+
*/
|
|
36
|
+
WebkitAppRegion?: Globals | 'drag' | 'no-drag'
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Sets the horizontal spacing between table borders.
|
|
40
|
+
*/
|
|
41
|
+
WebkitBorderHorizontalSpacing?: Globals | String | Number
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Sets the vertical spacing between table borders.
|
|
45
|
+
*/
|
|
46
|
+
WebkitBorderVerticalSpacing?: Globals | String | Number
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Controls the display of text content for security purposes (e.g., password fields).
|
|
50
|
+
*/
|
|
51
|
+
WebkitTextSecurity?: Globals | 'none' | 'circle' | 'disc' | 'square'
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Specifies the shape of a box's corners within the area defined by the border-radius property.
|
|
55
|
+
* @experimental
|
|
56
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/corner-shape
|
|
57
|
+
*/
|
|
58
|
+
cornerShape?:
|
|
59
|
+
| Globals
|
|
60
|
+
| CornerShapeValue
|
|
61
|
+
| `${CornerShapeValue} ${CornerShapeValue}`
|
|
62
|
+
| `${CornerShapeValue} ${CornerShapeValue} ${CornerShapeValue}`
|
|
63
|
+
| `${CornerShapeValue} ${CornerShapeValue} ${CornerShapeValue} ${CornerShapeValue}`
|
|
64
|
+
| String
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type CssProperty = keyof PropertiesFallback
|
|
68
|
+
|
|
69
|
+
export interface CssProperties extends PropertiesFallback<String | Number>, CssVarProperties, ModernCssProperties {}
|
|
70
|
+
|
|
71
|
+
export interface CssKeyframes {
|
|
72
|
+
[name: string]: {
|
|
73
|
+
[time: string]: CssProperties
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* -----------------------------------------------------------------------------
|
|
78
|
+
* Conditional css properties
|
|
79
|
+
* -----------------------------------------------------------------------------*/
|
|
80
|
+
|
|
81
|
+
interface GenericProperties {
|
|
82
|
+
[key: string]: ConditionalValue<String | Number | boolean>
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* -----------------------------------------------------------------------------
|
|
86
|
+
* Native css props
|
|
87
|
+
* -----------------------------------------------------------------------------*/
|
|
88
|
+
|
|
89
|
+
export type NestedCssProperties = Nested<CssProperties>
|
|
90
|
+
|
|
91
|
+
export type SystemStyleObject = Omit<Nested<SystemProperties & CssVarProperties>, 'base'>
|
|
92
|
+
|
|
93
|
+
export interface GlobalStyleObject {
|
|
94
|
+
[selector: string]: SystemStyleObject
|
|
95
|
+
}
|
|
96
|
+
export interface ExtendableGlobalStyleObject {
|
|
97
|
+
[selector: string]: SystemStyleObject | undefined
|
|
98
|
+
extend?: GlobalStyleObject | undefined
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* -----------------------------------------------------------------------------
|
|
102
|
+
* Composition (text styles, layer styles)
|
|
103
|
+
* -----------------------------------------------------------------------------*/
|
|
104
|
+
|
|
105
|
+
type FilterStyleObject<P extends string> = {
|
|
106
|
+
[K in P]?: K extends keyof SystemStyleObject ? SystemStyleObject[K] : unknown
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export type CompositionStyleObject<Property extends string> = Nested<FilterStyleObject<Property> & CssVarProperties>
|
|
110
|
+
|
|
111
|
+
/* -----------------------------------------------------------------------------
|
|
112
|
+
* Font face
|
|
113
|
+
* -----------------------------------------------------------------------------*/
|
|
114
|
+
|
|
115
|
+
export type GlobalFontfaceRule = Omit<AtRule.FontFaceFallback, 'src'> & Required<Pick<AtRule.FontFaceFallback, 'src'>>
|
|
116
|
+
|
|
117
|
+
export type FontfaceRule = Omit<GlobalFontfaceRule, 'fontFamily'>
|
|
118
|
+
|
|
119
|
+
export interface GlobalFontface {
|
|
120
|
+
[name: string]: FontfaceRule | FontfaceRule[]
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface ExtendableGlobalFontface {
|
|
124
|
+
[name: string]: FontfaceRule | FontfaceRule[] | GlobalFontface | undefined
|
|
125
|
+
extend?: GlobalFontface | undefined
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* -----------------------------------------------------------------------------
|
|
129
|
+
* Jsx style props
|
|
130
|
+
* -----------------------------------------------------------------------------*/
|
|
131
|
+
interface WithCss {
|
|
132
|
+
css?: SystemStyleObject | SystemStyleObject[]
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export type JsxStyleProps = SystemStyleObject & WithCss
|
|
136
|
+
|
|
137
|
+
export interface PatchedHTMLProps {
|
|
138
|
+
htmlWidth?: string | number
|
|
139
|
+
htmlHeight?: string | number
|
|
140
|
+
htmlTranslate?: 'yes' | 'no' | undefined
|
|
141
|
+
htmlContent?: string
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export type OmittedHTMLProps = 'color' | 'translate' | 'transition' | 'width' | 'height' | 'content'
|
|
145
|
+
|
|
146
|
+
type WithHTMLProps<T> = DistributiveOmit<T, OmittedHTMLProps> & PatchedHTMLProps
|
|
147
|
+
|
|
148
|
+
export type JsxHTMLProps<T extends Record<string, any>, P extends Record<string, any> = {}> = Assign<
|
|
149
|
+
WithHTMLProps<T>,
|
|
150
|
+
P
|
|
151
|
+
>
|