@rarui/styles 2.4.0 → 2.5.0-rc.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/dist/index.css +1 -1
- package/dist/packages/exhibition/avatar/rarui-avatar.types.d.ts +1 -1
- package/dist/packages/exhibition/divider/index.d.ts +8 -8
- package/dist/packages/exhibition/icon/index.d.ts +18 -18
- package/dist/packages/exhibition/text/index.d.ts +18 -18
- package/dist/packages/exhibition/title/index.d.ts +18 -18
- package/dist/packages/layout/box/index.d.ts +319 -319
- package/dist/packages/layout/sidebar/index.d.ts +2 -2
- package/dist/packages/surface/card/index.d.ts +33 -33
- package/package.json +6 -5
- package/dist/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.cjs.d.d.ts +0 -168
- package/dist/node_modules/@vanilla-extract/dynamic/dist/vanilla-extract-dynamic.esm.js +0 -1
- package/dist/node_modules/@vanilla-extract/private/dist/vanilla-extract-private.esm.js +0 -1
- package/dist/node_modules/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js +0 -1
- package/dist/node_modules/@vanilla-extract/recipes/dist/vanilla-extract-recipes.cjs.d.d.ts +0 -28
- package/dist/node_modules/csstype/index.d.d.ts +0 -11245
- package/dist/node_modules/rainbow-sprinkles/dist/createRuntimeFn-891c4670.esm.js +0 -1
- package/dist/node_modules/rainbow-sprinkles/dist/declarations/src/createRuntimeFn.d.d.ts +0 -7
- package/dist/node_modules/rainbow-sprinkles/dist/declarations/src/css.d.d.ts +0 -6075
- package/dist/node_modules/rainbow-sprinkles/dist/declarations/src/types.d.d.ts +0 -137
|
@@ -79,11 +79,11 @@ declare const sidebar: {
|
|
|
79
79
|
};
|
|
80
80
|
padding: {
|
|
81
81
|
values: {
|
|
82
|
-
|
|
82
|
+
none: {
|
|
83
83
|
default: string;
|
|
84
84
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
85
85
|
};
|
|
86
|
-
|
|
86
|
+
medium: {
|
|
87
87
|
default: string;
|
|
88
88
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
89
89
|
};
|
|
@@ -18,135 +18,135 @@ declare const card: {
|
|
|
18
18
|
config: {
|
|
19
19
|
backgroundColor: {
|
|
20
20
|
values: {
|
|
21
|
-
|
|
21
|
+
overlay: {
|
|
22
22
|
default: string;
|
|
23
23
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
background: {
|
|
26
26
|
default: string;
|
|
27
27
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
transparent: {
|
|
30
30
|
default: string;
|
|
31
31
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
brand: {
|
|
34
34
|
default: string;
|
|
35
35
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
36
36
|
};
|
|
37
|
-
"
|
|
37
|
+
"brand-hover": {
|
|
38
38
|
default: string;
|
|
39
39
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
40
40
|
};
|
|
41
|
-
"
|
|
41
|
+
"brand-press": {
|
|
42
42
|
default: string;
|
|
43
43
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
44
44
|
};
|
|
45
|
-
"
|
|
45
|
+
"brand-subdued": {
|
|
46
46
|
default: string;
|
|
47
47
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
48
48
|
};
|
|
49
|
-
|
|
49
|
+
disabled: {
|
|
50
50
|
default: string;
|
|
51
51
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
52
52
|
};
|
|
53
|
-
|
|
53
|
+
error: {
|
|
54
54
|
default: string;
|
|
55
55
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
56
56
|
};
|
|
57
|
-
"
|
|
57
|
+
"error-hover": {
|
|
58
58
|
default: string;
|
|
59
59
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
60
60
|
};
|
|
61
|
-
"
|
|
61
|
+
"error-press": {
|
|
62
62
|
default: string;
|
|
63
63
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
64
64
|
};
|
|
65
|
-
"
|
|
65
|
+
"error-subdued": {
|
|
66
66
|
default: string;
|
|
67
67
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
68
68
|
};
|
|
69
|
-
|
|
69
|
+
hover: {
|
|
70
70
|
default: string;
|
|
71
71
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
72
72
|
};
|
|
73
|
-
|
|
73
|
+
info: {
|
|
74
74
|
default: string;
|
|
75
75
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
76
76
|
};
|
|
77
|
-
"
|
|
77
|
+
"info-hover": {
|
|
78
78
|
default: string;
|
|
79
79
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
80
80
|
};
|
|
81
|
-
"
|
|
81
|
+
"info-press": {
|
|
82
82
|
default: string;
|
|
83
83
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
84
84
|
};
|
|
85
|
-
"
|
|
85
|
+
"info-subdued": {
|
|
86
86
|
default: string;
|
|
87
87
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
88
88
|
};
|
|
89
|
-
|
|
89
|
+
invert: {
|
|
90
90
|
default: string;
|
|
91
91
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
92
92
|
};
|
|
93
|
-
"
|
|
93
|
+
"invert-disabled": {
|
|
94
94
|
default: string;
|
|
95
95
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
96
96
|
};
|
|
97
|
-
|
|
97
|
+
"invert-hover": {
|
|
98
98
|
default: string;
|
|
99
99
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
100
100
|
};
|
|
101
|
-
|
|
101
|
+
"invert-press": {
|
|
102
102
|
default: string;
|
|
103
103
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
104
104
|
};
|
|
105
|
-
|
|
105
|
+
"invert-secondary": {
|
|
106
106
|
default: string;
|
|
107
107
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
108
108
|
};
|
|
109
|
-
|
|
109
|
+
press: {
|
|
110
110
|
default: string;
|
|
111
111
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
112
112
|
};
|
|
113
|
-
|
|
113
|
+
primary: {
|
|
114
114
|
default: string;
|
|
115
115
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
116
116
|
};
|
|
117
|
-
|
|
117
|
+
secondary: {
|
|
118
118
|
default: string;
|
|
119
119
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
120
120
|
};
|
|
121
|
-
|
|
121
|
+
success: {
|
|
122
122
|
default: string;
|
|
123
123
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
124
124
|
};
|
|
125
|
-
|
|
125
|
+
"success-hover": {
|
|
126
126
|
default: string;
|
|
127
127
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
128
128
|
};
|
|
129
|
-
press: {
|
|
129
|
+
"success-press": {
|
|
130
130
|
default: string;
|
|
131
131
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
132
132
|
};
|
|
133
|
-
|
|
133
|
+
"success-subdued": {
|
|
134
134
|
default: string;
|
|
135
135
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
136
136
|
};
|
|
137
|
-
|
|
137
|
+
warning: {
|
|
138
138
|
default: string;
|
|
139
139
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
140
140
|
};
|
|
141
|
-
|
|
141
|
+
"warning-hover": {
|
|
142
142
|
default: string;
|
|
143
143
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
144
144
|
};
|
|
145
|
-
warning: {
|
|
145
|
+
"warning-press": {
|
|
146
146
|
default: string;
|
|
147
147
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
148
148
|
};
|
|
149
|
-
|
|
149
|
+
"warning-subdued": {
|
|
150
150
|
default: string;
|
|
151
151
|
conditions: Record<"xs" | "xl" | "md" | "lg", string>;
|
|
152
152
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rarui/styles",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0-rc.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"url": "https://git.rarolabs.com.br/frontend/rarui/issues"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@rarui/rollup": "
|
|
39
|
-
"@rarui/tokens": "
|
|
38
|
+
"@rarui/rollup": "^1.0.0",
|
|
39
|
+
"@rarui/tokens": "^4.0.4",
|
|
40
40
|
"@types/jest": "^29.5.12",
|
|
41
41
|
"@vanilla-extract/dynamic": "^2.1.1",
|
|
42
42
|
"@vanilla-extract/jest-transform": "^1.1.9",
|
|
@@ -44,5 +44,6 @@
|
|
|
44
44
|
"@vanilla-extract/sprinkles": "^1.6.2",
|
|
45
45
|
"jest": "^29.7.0",
|
|
46
46
|
"ts-jest": "^29.2.5"
|
|
47
|
-
}
|
|
48
|
-
|
|
47
|
+
},
|
|
48
|
+
"stableVersion": "2.4.0"
|
|
49
|
+
}
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import { Properties } from '../../../csstype/index.d.js';
|
|
2
|
-
|
|
3
|
-
type CSSVarFunction = `var(--${string})` | `var(--${string}, ${string | number})`;
|
|
4
|
-
|
|
5
|
-
declare const simplePseudoMap: {
|
|
6
|
-
readonly ':-moz-any-link': true;
|
|
7
|
-
readonly ':-moz-full-screen': true;
|
|
8
|
-
readonly ':-moz-placeholder': true;
|
|
9
|
-
readonly ':-moz-read-only': true;
|
|
10
|
-
readonly ':-moz-read-write': true;
|
|
11
|
-
readonly ':-ms-fullscreen': true;
|
|
12
|
-
readonly ':-ms-input-placeholder': true;
|
|
13
|
-
readonly ':-webkit-any-link': true;
|
|
14
|
-
readonly ':-webkit-full-screen': true;
|
|
15
|
-
readonly '::-moz-color-swatch': true;
|
|
16
|
-
readonly '::-moz-list-bullet': true;
|
|
17
|
-
readonly '::-moz-list-number': true;
|
|
18
|
-
readonly '::-moz-page-sequence': true;
|
|
19
|
-
readonly '::-moz-page': true;
|
|
20
|
-
readonly '::-moz-placeholder': true;
|
|
21
|
-
readonly '::-moz-progress-bar': true;
|
|
22
|
-
readonly '::-moz-range-progress': true;
|
|
23
|
-
readonly '::-moz-range-thumb': true;
|
|
24
|
-
readonly '::-moz-range-track': true;
|
|
25
|
-
readonly '::-moz-scrolled-page-sequence': true;
|
|
26
|
-
readonly '::-moz-selection': true;
|
|
27
|
-
readonly '::-ms-backdrop': true;
|
|
28
|
-
readonly '::-ms-browse': true;
|
|
29
|
-
readonly '::-ms-check': true;
|
|
30
|
-
readonly '::-ms-clear': true;
|
|
31
|
-
readonly '::-ms-fill-lower': true;
|
|
32
|
-
readonly '::-ms-fill-upper': true;
|
|
33
|
-
readonly '::-ms-fill': true;
|
|
34
|
-
readonly '::-ms-reveal': true;
|
|
35
|
-
readonly '::-ms-thumb': true;
|
|
36
|
-
readonly '::-ms-ticks-after': true;
|
|
37
|
-
readonly '::-ms-ticks-before': true;
|
|
38
|
-
readonly '::-ms-tooltip': true;
|
|
39
|
-
readonly '::-ms-track': true;
|
|
40
|
-
readonly '::-ms-value': true;
|
|
41
|
-
readonly '::-webkit-backdrop': true;
|
|
42
|
-
readonly '::-webkit-inner-spin-button': true;
|
|
43
|
-
readonly '::-webkit-input-placeholder': true;
|
|
44
|
-
readonly '::-webkit-meter-bar': true;
|
|
45
|
-
readonly '::-webkit-meter-even-less-good-value': true;
|
|
46
|
-
readonly '::-webkit-meter-inner-element': true;
|
|
47
|
-
readonly '::-webkit-meter-optimum-value': true;
|
|
48
|
-
readonly '::-webkit-meter-suboptimum-value': true;
|
|
49
|
-
readonly '::-webkit-outer-spin-button': true;
|
|
50
|
-
readonly '::-webkit-progress-bar': true;
|
|
51
|
-
readonly '::-webkit-progress-inner-element': true;
|
|
52
|
-
readonly '::-webkit-progress-inner-value': true;
|
|
53
|
-
readonly '::-webkit-progress-value': true;
|
|
54
|
-
readonly '::-webkit-resizer': true;
|
|
55
|
-
readonly '::-webkit-scrollbar-button': true;
|
|
56
|
-
readonly '::-webkit-scrollbar-corner': true;
|
|
57
|
-
readonly '::-webkit-scrollbar-thumb': true;
|
|
58
|
-
readonly '::-webkit-scrollbar-track-piece': true;
|
|
59
|
-
readonly '::-webkit-scrollbar-track': true;
|
|
60
|
-
readonly '::-webkit-scrollbar': true;
|
|
61
|
-
readonly '::-webkit-search-cancel-button': true;
|
|
62
|
-
readonly '::-webkit-search-results-button': true;
|
|
63
|
-
readonly '::-webkit-slider-runnable-track': true;
|
|
64
|
-
readonly '::-webkit-slider-thumb': true;
|
|
65
|
-
readonly '::after': true;
|
|
66
|
-
readonly '::backdrop': true;
|
|
67
|
-
readonly '::before': true;
|
|
68
|
-
readonly '::cue': true;
|
|
69
|
-
readonly '::file-selector-button': true;
|
|
70
|
-
readonly '::first-letter': true;
|
|
71
|
-
readonly '::first-line': true;
|
|
72
|
-
readonly '::grammar-error': true;
|
|
73
|
-
readonly '::marker': true;
|
|
74
|
-
readonly '::placeholder': true;
|
|
75
|
-
readonly '::selection': true;
|
|
76
|
-
readonly '::spelling-error': true;
|
|
77
|
-
readonly '::target-text': true;
|
|
78
|
-
readonly '::view-transition-group': true;
|
|
79
|
-
readonly '::view-transition-image-pair': true;
|
|
80
|
-
readonly '::view-transition-new': true;
|
|
81
|
-
readonly '::view-transition-old': true;
|
|
82
|
-
readonly '::view-transition': true;
|
|
83
|
-
readonly ':active': true;
|
|
84
|
-
readonly ':after': true;
|
|
85
|
-
readonly ':any-link': true;
|
|
86
|
-
readonly ':before': true;
|
|
87
|
-
readonly ':blank': true;
|
|
88
|
-
readonly ':checked': true;
|
|
89
|
-
readonly ':default': true;
|
|
90
|
-
readonly ':defined': true;
|
|
91
|
-
readonly ':disabled': true;
|
|
92
|
-
readonly ':empty': true;
|
|
93
|
-
readonly ':enabled': true;
|
|
94
|
-
readonly ':first-child': true;
|
|
95
|
-
readonly ':first-letter': true;
|
|
96
|
-
readonly ':first-line': true;
|
|
97
|
-
readonly ':first-of-type': true;
|
|
98
|
-
readonly ':first': true;
|
|
99
|
-
readonly ':focus-visible': true;
|
|
100
|
-
readonly ':focus-within': true;
|
|
101
|
-
readonly ':focus': true;
|
|
102
|
-
readonly ':fullscreen': true;
|
|
103
|
-
readonly ':hover': true;
|
|
104
|
-
readonly ':in-range': true;
|
|
105
|
-
readonly ':indeterminate': true;
|
|
106
|
-
readonly ':invalid': true;
|
|
107
|
-
readonly ':last-child': true;
|
|
108
|
-
readonly ':last-of-type': true;
|
|
109
|
-
readonly ':left': true;
|
|
110
|
-
readonly ':link': true;
|
|
111
|
-
readonly ':only-child': true;
|
|
112
|
-
readonly ':only-of-type': true;
|
|
113
|
-
readonly ':optional': true;
|
|
114
|
-
readonly ':out-of-range': true;
|
|
115
|
-
readonly ':placeholder-shown': true;
|
|
116
|
-
readonly ':read-only': true;
|
|
117
|
-
readonly ':read-write': true;
|
|
118
|
-
readonly ':required': true;
|
|
119
|
-
readonly ':right': true;
|
|
120
|
-
readonly ':root': true;
|
|
121
|
-
readonly ':scope': true;
|
|
122
|
-
readonly ':target': true;
|
|
123
|
-
readonly ':valid': true;
|
|
124
|
-
readonly ':visited': true;
|
|
125
|
-
};
|
|
126
|
-
type SimplePseudos = keyof typeof simplePseudoMap;
|
|
127
|
-
|
|
128
|
-
interface ContainerProperties {
|
|
129
|
-
container?: string;
|
|
130
|
-
containerType?: 'size' | 'inline-size' | (string & {});
|
|
131
|
-
containerName?: string;
|
|
132
|
-
}
|
|
133
|
-
type CSSTypeProperties = Properties<number | (string & {})> & ContainerProperties;
|
|
134
|
-
type CSSProperties = {
|
|
135
|
-
[Property in keyof CSSTypeProperties]: CSSTypeProperties[Property] | CSSVarFunction | Array<CSSVarFunction | CSSTypeProperties[Property]>;
|
|
136
|
-
};
|
|
137
|
-
type CSSPropertiesWithVars = CSSProperties & {
|
|
138
|
-
vars?: {
|
|
139
|
-
[key: string]: string;
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
type PseudoProperties = {
|
|
143
|
-
[key in SimplePseudos]?: CSSPropertiesWithVars;
|
|
144
|
-
};
|
|
145
|
-
type CSSPropertiesAndPseudos = CSSPropertiesWithVars & PseudoProperties;
|
|
146
|
-
type Query<Key extends string, StyleType> = {
|
|
147
|
-
[key in Key]?: {
|
|
148
|
-
[query: string]: Omit<StyleType, Key>;
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
|
-
type MediaQueries<StyleType> = Query<'@media', StyleType>;
|
|
152
|
-
type FeatureQueries<StyleType> = Query<'@supports', StyleType>;
|
|
153
|
-
type ContainerQueries<StyleType> = Query<'@container', StyleType>;
|
|
154
|
-
type Layers<StyleType> = Query<'@layer', StyleType>;
|
|
155
|
-
interface AllQueries<StyleType> extends MediaQueries<StyleType & AllQueries<StyleType>>, FeatureQueries<StyleType & AllQueries<StyleType>>, ContainerQueries<StyleType & AllQueries<StyleType>>, Layers<StyleType & AllQueries<StyleType>> {
|
|
156
|
-
}
|
|
157
|
-
type WithQueries<StyleType> = StyleType & AllQueries<StyleType>;
|
|
158
|
-
interface SelectorMap {
|
|
159
|
-
[selector: string]: CSSPropertiesWithVars & WithQueries<CSSPropertiesWithVars>;
|
|
160
|
-
}
|
|
161
|
-
interface StyleWithSelectors extends CSSPropertiesAndPseudos {
|
|
162
|
-
selectors?: SelectorMap;
|
|
163
|
-
}
|
|
164
|
-
type StyleRule = StyleWithSelectors & WithQueries<StyleWithSelectors>;
|
|
165
|
-
type ClassNames = string | Array<ClassNames>;
|
|
166
|
-
type ComplexStyleRule = StyleRule | Array<StyleRule | ClassNames>;
|
|
167
|
-
|
|
168
|
-
export type { CSSProperties, ComplexStyleRule, StyleRule };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{getVarName as t}from"../../private/dist/vanilla-extract-private.esm.js";function r(r,e){var i={},n=r;for(var a in n){var o=n[a];null!=o&&(i[t(a)]=o)}return Object.defineProperty(i,"toString",{value:function(){return Object.keys(this).map((t=>"".concat(t,":").concat(this[t]))).join(";")},writable:!1}),i}export{r as assignInlineVars};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function r(r){var t=r.match(/^var\((.*)\)$/);return t?t[1]:r}export{r as getVarName};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function r(r){var e=function(r,e){if("object"!=typeof r||!r)return r;var t=r[Symbol.toPrimitive];if(void 0!==t){var a=t.call(r,e);if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"==typeof e?e:String(e)}function e(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,a)}return t}function t(t){for(var a=1;a<arguments.length;a++){var n=null!=arguments[a]?arguments[a]:{};a%2?e(Object(n),!0).forEach((function(e){var a,i,o;a=t,i=e,o=n[e],(i=r(i))in a?Object.defineProperty(a,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}function a(r,e){var t={};for(var a in r)t[a]=e(r[a],a);return t}var n=(r,e,t)=>{for(var a of Object.keys(r)){var n;if(r[a]!==(null!==(n=e[a])&&void 0!==n?n:t[a]))return!1}return!0},i=r=>{var e=e=>{var a=r.defaultClassName,i=t(t({},r.defaultVariants),e);for(var o in i){var s,u=null!==(s=i[o])&&void 0!==s?s:r.defaultVariants[o];if(null!=u){var f=u;"boolean"==typeof f&&(f=!0===f?"true":"false");var l=r.variantClassNames[o][f];l&&(a+=" "+l)}}for(var[c,v]of r.compoundVariants)n(c,i,r.defaultVariants)&&(a+=" "+v);return a};return e.variants=()=>Object.keys(r.variantClassNames),e.classNames={get base(){return r.defaultClassName.split(" ")[0]},get variants(){return a(r.variantClassNames,(r=>a(r,(r=>r.split(" ")[0]))))}},e};export{i as c,a as m};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ComplexStyleRule } from '../../css/dist/vanilla-extract-css.cjs.d.js';
|
|
2
|
-
|
|
3
|
-
type Resolve<T> = {
|
|
4
|
-
[Key in keyof T]: T[Key];
|
|
5
|
-
} & {};
|
|
6
|
-
type RecipeStyleRule = ComplexStyleRule | string;
|
|
7
|
-
type VariantDefinitions = Record<string, RecipeStyleRule>;
|
|
8
|
-
type BooleanMap<T> = T extends 'true' | 'false' ? boolean : T;
|
|
9
|
-
type VariantGroups = Record<string, VariantDefinitions>;
|
|
10
|
-
type VariantSelection<Variants extends VariantGroups> = {
|
|
11
|
-
[VariantGroup in keyof Variants]?: BooleanMap<keyof Variants[VariantGroup]>;
|
|
12
|
-
};
|
|
13
|
-
type VariantsClassNames<Variants extends VariantGroups> = {
|
|
14
|
-
[P in keyof Variants]: {
|
|
15
|
-
[PP in keyof Variants[P]]: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
type RecipeClassNames<Variants extends VariantGroups> = {
|
|
19
|
-
base: string;
|
|
20
|
-
variants: VariantsClassNames<Variants>;
|
|
21
|
-
};
|
|
22
|
-
type RuntimeFn<Variants extends VariantGroups> = ((options?: Resolve<VariantSelection<Variants>>) => string) & {
|
|
23
|
-
variants: () => (keyof Variants)[];
|
|
24
|
-
classNames: RecipeClassNames<Variants>;
|
|
25
|
-
};
|
|
26
|
-
type RecipeVariants<RecipeFn extends RuntimeFn<VariantGroups>> = Resolve<Parameters<RecipeFn>[0]>;
|
|
27
|
-
|
|
28
|
-
export type { RecipeVariants, RuntimeFn };
|