@kimdw-rtk/ui 0.0.23 → 0.0.25
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/Accordion/Accordion.css.js +3 -25
- package/dist/components/Accordion/Accordion.css.ts.vanilla.css +13 -0
- package/dist/components/Accordion/AccordionContent.css.js +3 -22
- package/dist/components/Accordion/AccordionContent.css.ts.vanilla.css +17 -0
- package/dist/components/Accordion/AccordionTrigger.css.js +3 -39
- package/dist/components/Accordion/AccordionTrigger.css.ts.vanilla.css +27 -0
- package/dist/components/Box/Box.css.js +2 -16
- package/dist/components/Box/Box.css.ts.vanilla.css +9 -0
- package/dist/components/Button/Button.css.js +4 -182
- package/dist/components/Button/Button.css.ts.vanilla.css +256 -0
- package/dist/components/Card/Card.css.js +2 -68
- package/dist/components/Card/Card.css.ts.vanilla.css +129 -0
- package/dist/components/Card/CardContent.css.js +1 -7
- package/dist/components/Card/CardContent.css.ts.vanilla.css +7 -0
- package/dist/components/Card/CardInteraction.css.js +1 -9
- package/dist/components/Card/CardInteraction.css.ts.vanilla.css +10 -0
- package/dist/components/Card/CardThumbnail.css.js +1 -6
- package/dist/components/Card/CardThumbnail.css.ts.vanilla.css +7 -0
- package/dist/components/Chip/Chip.css.js +2 -56
- package/dist/components/Chip/Chip.css.ts.vanilla.css +144 -0
- package/dist/components/Dialog/Dialog.css.js +1 -20
- package/dist/components/Dialog/Dialog.css.ts.vanilla.css +17 -0
- package/dist/components/Dialog/DialogContent.css.js +1 -13
- package/dist/components/Dialog/DialogContent.css.ts.vanilla.css +10 -0
- package/dist/components/Dialog/DialogHeader.css.js +2 -24
- package/dist/components/Dialog/DialogHeader.css.ts.vanilla.css +24 -0
- package/dist/components/Navigation/NavigationAside.css.js +1 -7
- package/dist/components/Navigation/NavigationAside.css.ts.vanilla.css +8 -0
- package/dist/components/Navigation/NavigationBar.css.js +3 -32
- package/dist/components/Navigation/NavigationBar.css.ts.vanilla.css +25 -0
- package/dist/components/Navigation/NavigationContainer.css.js +1 -10
- package/dist/components/Navigation/NavigationContainer.css.ts.vanilla.css +8 -0
- package/dist/components/Navigation/NavigationDrawer.css.js +4 -49
- package/dist/components/Navigation/NavigationDrawer.css.ts.vanilla.css +41 -0
- package/dist/components/Navigation/NavigationItem.css.js +2 -35
- package/dist/components/Navigation/NavigationItem.css.ts.vanilla.css +25 -0
- package/dist/components/Navigation/NavigationLogo.css.js +1 -5
- package/dist/components/Navigation/NavigationLogo.css.ts.vanilla.css +6 -0
- package/dist/components/Navigation/NavigationMenu.css.js +1 -20
- package/dist/components/Navigation/NavigationMenu.css.ts.vanilla.css +16 -0
- package/dist/components/Range/Range.css.js +5 -93
- package/dist/components/Range/Range.css.ts.vanilla.css +152 -0
- package/dist/components/ScrollArea/ScrollArea.css.js +5 -33
- package/dist/components/ScrollArea/ScrollArea.css.ts.vanilla.css +32 -0
- package/dist/components/Select/Select.css.js +2 -20
- package/dist/components/Select/Select.css.ts.vanilla.css +15 -0
- package/dist/components/Select/SelectOption.css.js +1 -11
- package/dist/components/Select/SelectOption.css.ts.vanilla.css +11 -0
- package/dist/components/Select/SelectOptionList.css.js +2 -55
- package/dist/components/Select/SelectOptionList.css.ts.vanilla.css +47 -0
- package/dist/components/Select/SelectTrigger.css.js +4 -59
- package/dist/components/Select/SelectTrigger.css.ts.vanilla.css +42 -0
- package/dist/components/Skeleton/Skeleton.css.js +1 -20
- package/dist/components/Skeleton/Skeleton.css.ts.vanilla.css +19 -0
- package/dist/components/Table/Table.css.js +2 -8
- package/dist/components/Table/Table.css.ts.vanilla.css +8 -0
- package/dist/components/Table/TableCell.css.js +1 -33
- package/dist/components/Table/TableCell.css.ts.vanilla.css +29 -0
- package/dist/components/Table/TableHead.css.js +1 -9
- package/dist/components/Table/TableHead.css.ts.vanilla.css +9 -0
- package/dist/components/Table/TableRow.css.js +1 -3
- package/dist/components/Table/TableRow.css.ts.vanilla.css +4 -0
- package/dist/components/Tabs/TabsList.css.js +1 -9
- package/dist/components/Tabs/TabsList.css.ts.vanilla.css +9 -0
- package/dist/components/Tabs/TabsTrigger.css.js +2 -29
- package/dist/components/Tabs/TabsTrigger.css.ts.vanilla.css +24 -0
- package/dist/components/TextField/TextField.css.js +2 -59
- package/dist/components/TextField/TextField.css.ts.vanilla.css +120 -0
- package/dist/components/Toast/Toast.css.js +3 -62
- package/dist/components/Toast/Toast.css.ts.vanilla.css +69 -0
- package/dist/components/Typography/Typography.css.js +2 -15
- package/dist/components/Typography/Typography.css.ts.vanilla.css +11 -0
- package/dist/hooks/useRipple/ripple.css.js +3 -30
- package/dist/hooks/useRipple/ripple.css.ts.vanilla.css +18 -0
- package/dist/hooks/useToast/ToastContainer.css.js +1 -11
- package/dist/hooks/useToast/ToastContainer.css.ts.vanilla.css +9 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_sprinkles@1.6.5_@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0_/node_modules/@vanilla-extract/sprinkles/createRuntimeSprinkles/dist/vanilla-extract-sprinkles-createRuntimeSprinkles.esm.js +8 -0
- package/dist/styles/globalStyle.css.ts.vanilla.css +552 -0
- package/dist/styles/layers.css.js +2 -4
- package/dist/styles/layers.css.ts.vanilla.css +2 -0
- package/dist/styles/overlay.css.js +3 -32
- package/dist/styles/overlay.css.ts.vanilla.css +30 -0
- package/dist/styles/sprinkles.css.js +6 -121
- package/dist/styles/sprinkles.css.ts.vanilla.css +3506 -0
- package/dist/themes/darkTheme.css.js +1 -30
- package/dist/themes/lightTheme.css.js +1 -30
- package/dist/themes/theme.css.js +1 -22
- package/package.json +4 -4
- package/dist/_virtual/cjs.js +0 -5
- package/dist/_virtual/cssesc.js +0 -5
- package/dist/node_modules/.pnpm/@emotion_hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js +0 -55
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/adapter/dist/vanilla-extract-css-adapter.esm.js +0 -51
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/dist/taggedTemplateLiteral-10998315.esm.js +0 -12
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/dist/transformCss-0dba36bf.esm.js +0 -955
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.esm.js +0 -325
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/fileScope/dist/vanilla-extract-css-fileScope.esm.js +0 -20
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/functionSerializer/dist/vanilla-extract-css-functionSerializer.esm.js +0 -11
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/injectStyles/dist/vanilla-extract-css-injectStyles.esm.js +0 -22
- package/dist/node_modules/.pnpm/@vanilla-extract_private@1.0.9/node_modules/@vanilla-extract/private/dist/vanilla-extract-private.esm.js +0 -26
- package/dist/node_modules/.pnpm/@vanilla-extract_recipes@0.5.7_@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0_/node_modules/@vanilla-extract/recipes/dist/vanilla-extract-recipes.esm.js +0 -43
- package/dist/node_modules/.pnpm/@vanilla-extract_sprinkles@1.6.5_@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0_/node_modules/@vanilla-extract/sprinkles/dist/vanilla-extract-sprinkles.esm.js +0 -146
- package/dist/node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/es/parse.js +0 -423
- package/dist/node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/es/types.js +0 -28
- package/dist/node_modules/.pnpm/cssesc@3.0.0/node_modules/cssesc/cssesc.js +0 -119
- package/dist/node_modules/.pnpm/dedent@1.6.0_babel-plugin-macros@3.1.0/node_modules/dedent/dist/dedent.js +0 -68
- package/dist/node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js +0 -142
- package/dist/node_modules/.pnpm/lru-cache@10.4.3/node_modules/lru-cache/dist/esm/index.js +0 -1542
- package/dist/node_modules/.pnpm/media-query-parser@2.0.2/node_modules/media-query-parser/dist/media-query-parser.esm.js +0 -1378
- package/dist/node_modules/.pnpm/modern-ahocorasick@1.1.0/node_modules/modern-ahocorasick/dist/index.js +0 -101
- package/dist/tokens/scale/color.js +0 -602
- package/dist/tokens/semantic/breakpoint.js +0 -4
- package/dist/tokens/semantic/color.js +0 -12
- package/dist/tokens/semantic/spacing.js +0 -11
- package/dist/tokens/semantic/typography.js +0 -34
- package/dist/utils/styleUtils.css.js +0 -64
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
import { injectStyles } from '../injectStyles/dist/vanilla-extract-css-injectStyles.esm.js';
|
|
2
|
-
import { _ as _objectSpread2, d as dudupeAndJoinClassList, t as transformCss } from './transformCss-0dba36bf.esm.js';
|
|
3
|
-
import { appendCss, registerClassName, getIdentOption, registerComposition, markCompositionUsed, setAdapterIfNotSet } from '../adapter/dist/vanilla-extract-css-adapter.esm.js';
|
|
4
|
-
import murmur2 from '../../../../../@emotion_hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js';
|
|
5
|
-
import { getFileScope, getAndIncrementRefCounter, hasFileScope } from '../fileScope/dist/vanilla-extract-css-fileScope.esm.js';
|
|
6
|
-
import { LRUCache } from '../../../../../lru-cache@10.4.3/node_modules/lru-cache/dist/esm/index.js';
|
|
7
|
-
import { walkObject } from '../../../../../@vanilla-extract_private@1.0.9/node_modules/@vanilla-extract/private/dist/vanilla-extract-private.esm.js';
|
|
8
|
-
import cssescExports from '../../../../../../../_virtual/cssesc.js';
|
|
9
|
-
import cjsExports from '../../../../../../../_virtual/cjs.js';
|
|
10
|
-
|
|
11
|
-
var localClassNames = new Set();
|
|
12
|
-
var composedClassLists = [];
|
|
13
|
-
var bufferedCSSObjs = [];
|
|
14
|
-
var browserRuntimeAdapter = {
|
|
15
|
-
appendCss: cssObj => {
|
|
16
|
-
bufferedCSSObjs.push(cssObj);
|
|
17
|
-
},
|
|
18
|
-
registerClassName: className => {
|
|
19
|
-
localClassNames.add(className);
|
|
20
|
-
},
|
|
21
|
-
registerComposition: composition => {
|
|
22
|
-
composedClassLists.push(composition);
|
|
23
|
-
},
|
|
24
|
-
markCompositionUsed: () => {},
|
|
25
|
-
onEndFileScope: fileScope => {
|
|
26
|
-
var css = transformCss({
|
|
27
|
-
localClassNames: Array.from(localClassNames),
|
|
28
|
-
composedClassLists,
|
|
29
|
-
cssObjs: bufferedCSSObjs
|
|
30
|
-
}).join('\n');
|
|
31
|
-
injectStyles({
|
|
32
|
-
fileScope,
|
|
33
|
-
css
|
|
34
|
-
});
|
|
35
|
-
bufferedCSSObjs = [];
|
|
36
|
-
},
|
|
37
|
-
getIdentOption: () => process.env.NODE_ENV === 'production' ? 'short' : 'debug'
|
|
38
|
-
};
|
|
39
|
-
if (typeof window !== 'undefined') {
|
|
40
|
-
setAdapterIfNotSet(browserRuntimeAdapter);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
var getLastSlashBeforeIndex = (path, index) => {
|
|
44
|
-
var pathIndex = index - 1;
|
|
45
|
-
while (pathIndex >= 0) {
|
|
46
|
-
if (path[pathIndex] === '/') {
|
|
47
|
-
return pathIndex;
|
|
48
|
-
}
|
|
49
|
-
pathIndex--;
|
|
50
|
-
}
|
|
51
|
-
return -1;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Assumptions:
|
|
56
|
-
* - The path is always normalized to use posix file separators (/) (see `addFileScope`)
|
|
57
|
-
* - The path is always relative to the project root, i.e. there will never be a leading slash (see `addFileScope`)
|
|
58
|
-
* - As long as `.css` is there, we have a valid `.css.*` file path, because otherwise there wouldn't
|
|
59
|
-
* be a file scope to begin with
|
|
60
|
-
*
|
|
61
|
-
* The LRU cache we use can't cache undefined/null values, so we opt to return an empty string,
|
|
62
|
-
* rather than using a custom Symbol or something similar.
|
|
63
|
-
*/
|
|
64
|
-
var _getDebugFileName = path => {
|
|
65
|
-
var file;
|
|
66
|
-
var lastIndexOfDotCss = path.lastIndexOf('.css');
|
|
67
|
-
if (lastIndexOfDotCss === -1) {
|
|
68
|
-
return '';
|
|
69
|
-
}
|
|
70
|
-
var lastSlashIndex = getLastSlashBeforeIndex(path, lastIndexOfDotCss);
|
|
71
|
-
file = path.slice(lastSlashIndex + 1, lastIndexOfDotCss);
|
|
72
|
-
|
|
73
|
-
// There are no slashes, therefore theres no directory to extract
|
|
74
|
-
if (lastSlashIndex === -1) {
|
|
75
|
-
return file;
|
|
76
|
-
}
|
|
77
|
-
var secondLastSlashIndex = getLastSlashBeforeIndex(path, lastSlashIndex - 1);
|
|
78
|
-
// If secondLastSlashIndex is -1, it means that the path looks like `directory/file.css.ts`,
|
|
79
|
-
// in which case dir will still be sliced starting at 0, which is what we want
|
|
80
|
-
var dir = path.slice(secondLastSlashIndex + 1, lastSlashIndex);
|
|
81
|
-
var debugFileName = file !== 'index' ? file : dir;
|
|
82
|
-
return debugFileName;
|
|
83
|
-
};
|
|
84
|
-
var memoizedGetDebugFileName = () => {
|
|
85
|
-
var cache = new LRUCache({
|
|
86
|
-
max: 500
|
|
87
|
-
});
|
|
88
|
-
return path => {
|
|
89
|
-
var cachedResult = cache.get(path);
|
|
90
|
-
if (cachedResult) {
|
|
91
|
-
return cachedResult;
|
|
92
|
-
}
|
|
93
|
-
var result = _getDebugFileName(path);
|
|
94
|
-
cache.set(path, result);
|
|
95
|
-
return result;
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
var getDebugFileName = memoizedGetDebugFileName();
|
|
99
|
-
|
|
100
|
-
function getDevPrefix(_ref) {
|
|
101
|
-
var {
|
|
102
|
-
debugId,
|
|
103
|
-
debugFileName
|
|
104
|
-
} = _ref;
|
|
105
|
-
var parts = debugId ? [debugId.replace(/\s/g, '_')] : [];
|
|
106
|
-
if (debugFileName) {
|
|
107
|
-
var {
|
|
108
|
-
filePath
|
|
109
|
-
} = getFileScope();
|
|
110
|
-
var _debugFileName = getDebugFileName(filePath);
|
|
111
|
-
|
|
112
|
-
// debugFileName could be an empty string
|
|
113
|
-
if (_debugFileName) {
|
|
114
|
-
parts.unshift(_debugFileName);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return parts.join('_');
|
|
118
|
-
}
|
|
119
|
-
function normalizeIdentifier(identifier) {
|
|
120
|
-
return identifier.match(/^[0-9]/) ? "_".concat(identifier) : identifier;
|
|
121
|
-
}
|
|
122
|
-
function generateIdentifier(arg) {
|
|
123
|
-
var identOption = getIdentOption();
|
|
124
|
-
var {
|
|
125
|
-
debugId,
|
|
126
|
-
debugFileName = true
|
|
127
|
-
} = _objectSpread2(_objectSpread2({}, typeof arg === 'string' ? {
|
|
128
|
-
debugId: arg
|
|
129
|
-
} : null), typeof arg === 'object' ? arg : null);
|
|
130
|
-
|
|
131
|
-
// Convert ref count to base 36 for optimal hash lengths
|
|
132
|
-
var refCount = getAndIncrementRefCounter().toString(36);
|
|
133
|
-
var {
|
|
134
|
-
filePath,
|
|
135
|
-
packageName
|
|
136
|
-
} = getFileScope();
|
|
137
|
-
var fileScopeHash = murmur2(packageName ? "".concat(packageName).concat(filePath) : filePath);
|
|
138
|
-
var identifier = "".concat(fileScopeHash).concat(refCount);
|
|
139
|
-
if (identOption === 'debug') {
|
|
140
|
-
var devPrefix = getDevPrefix({
|
|
141
|
-
debugId,
|
|
142
|
-
debugFileName
|
|
143
|
-
});
|
|
144
|
-
if (devPrefix) {
|
|
145
|
-
identifier = "".concat(devPrefix, "__").concat(identifier);
|
|
146
|
-
}
|
|
147
|
-
return normalizeIdentifier(identifier);
|
|
148
|
-
}
|
|
149
|
-
if (typeof identOption === 'function') {
|
|
150
|
-
identifier = identOption({
|
|
151
|
-
hash: identifier,
|
|
152
|
-
debugId,
|
|
153
|
-
filePath,
|
|
154
|
-
packageName
|
|
155
|
-
});
|
|
156
|
-
if (!identifier.match(/^[A-Z_][0-9A-Z_-]+$/i)) {
|
|
157
|
-
throw new Error("Identifier function returned invalid indentifier: \"".concat(identifier, "\""));
|
|
158
|
-
}
|
|
159
|
-
return identifier;
|
|
160
|
-
}
|
|
161
|
-
return normalizeIdentifier(identifier);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
var buildPropertyRule = _ref => {
|
|
165
|
-
var {
|
|
166
|
-
syntax,
|
|
167
|
-
inherits,
|
|
168
|
-
initialValue
|
|
169
|
-
} = _ref;
|
|
170
|
-
return _objectSpread2({
|
|
171
|
-
syntax: "\"".concat(Array.isArray(syntax) ? syntax.join(' | ') : syntax, "\""),
|
|
172
|
-
inherits: inherits ? 'true' : 'false'
|
|
173
|
-
}, initialValue != null ? {
|
|
174
|
-
initialValue
|
|
175
|
-
} : {});
|
|
176
|
-
};
|
|
177
|
-
function createVar(debugIdOrDeclaration, debugId) {
|
|
178
|
-
var cssVarName = cssescExports(generateIdentifier({
|
|
179
|
-
debugId: typeof debugIdOrDeclaration === 'string' ? debugIdOrDeclaration : debugId,
|
|
180
|
-
debugFileName: false
|
|
181
|
-
}), {
|
|
182
|
-
isIdentifier: true
|
|
183
|
-
});
|
|
184
|
-
if (debugIdOrDeclaration && typeof debugIdOrDeclaration === 'object') {
|
|
185
|
-
appendCss({
|
|
186
|
-
type: 'property',
|
|
187
|
-
name: "--".concat(cssVarName),
|
|
188
|
-
rule: buildPropertyRule(debugIdOrDeclaration)
|
|
189
|
-
}, getFileScope());
|
|
190
|
-
}
|
|
191
|
-
return "var(--".concat(cssVarName, ")");
|
|
192
|
-
}
|
|
193
|
-
function createThemeContract(tokens) {
|
|
194
|
-
return walkObject(tokens, (_value, path) => {
|
|
195
|
-
return createVar(path.join('-'));
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
function composedStyle(rules, debugId) {
|
|
199
|
-
var className = generateIdentifier(debugId);
|
|
200
|
-
registerClassName(className, getFileScope());
|
|
201
|
-
var classList = [];
|
|
202
|
-
var styleRules = [];
|
|
203
|
-
for (var rule of rules) {
|
|
204
|
-
if (typeof rule === 'string') {
|
|
205
|
-
classList.push(rule);
|
|
206
|
-
} else {
|
|
207
|
-
styleRules.push(rule);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
var result = className;
|
|
211
|
-
if (classList.length > 0) {
|
|
212
|
-
result = "".concat(className, " ").concat(dudupeAndJoinClassList(classList));
|
|
213
|
-
registerComposition({
|
|
214
|
-
identifier: className,
|
|
215
|
-
classList: result
|
|
216
|
-
}, getFileScope());
|
|
217
|
-
if (styleRules.length > 0) {
|
|
218
|
-
// If there are styles attached to this composition then it is
|
|
219
|
-
// always used and should never be removed
|
|
220
|
-
markCompositionUsed(className);
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
if (styleRules.length > 0) {
|
|
224
|
-
var _rule = cjsExports.all(styleRules, {
|
|
225
|
-
// Replace arrays rather than merging
|
|
226
|
-
arrayMerge: (_, sourceArray) => sourceArray
|
|
227
|
-
});
|
|
228
|
-
appendCss({
|
|
229
|
-
type: 'local',
|
|
230
|
-
selector: className,
|
|
231
|
-
rule: _rule
|
|
232
|
-
}, getFileScope());
|
|
233
|
-
}
|
|
234
|
-
return result;
|
|
235
|
-
}
|
|
236
|
-
function style(rule, debugId) {
|
|
237
|
-
if (Array.isArray(rule)) {
|
|
238
|
-
return composedStyle(rule, debugId);
|
|
239
|
-
}
|
|
240
|
-
var className = generateIdentifier(debugId);
|
|
241
|
-
registerClassName(className, getFileScope());
|
|
242
|
-
appendCss({
|
|
243
|
-
type: 'local',
|
|
244
|
-
selector: className,
|
|
245
|
-
rule
|
|
246
|
-
}, getFileScope());
|
|
247
|
-
return className;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* @deprecated The same functionality is now provided by the 'style' function when you pass it an array
|
|
252
|
-
*/
|
|
253
|
-
function composeStyles() {
|
|
254
|
-
var compose = hasFileScope() ? composedStyle : dudupeAndJoinClassList;
|
|
255
|
-
for (var _len = arguments.length, classNames = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
256
|
-
classNames[_key] = arguments[_key];
|
|
257
|
-
}
|
|
258
|
-
return compose(classNames);
|
|
259
|
-
}
|
|
260
|
-
function globalStyle(selector, rule) {
|
|
261
|
-
appendCss({
|
|
262
|
-
type: 'global',
|
|
263
|
-
selector,
|
|
264
|
-
rule
|
|
265
|
-
}, getFileScope());
|
|
266
|
-
}
|
|
267
|
-
function keyframes(rule, debugId) {
|
|
268
|
-
var name = cssescExports(generateIdentifier(debugId), {
|
|
269
|
-
isIdentifier: true
|
|
270
|
-
});
|
|
271
|
-
appendCss({
|
|
272
|
-
type: 'keyframes',
|
|
273
|
-
name,
|
|
274
|
-
rule
|
|
275
|
-
}, getFileScope());
|
|
276
|
-
return name;
|
|
277
|
-
}
|
|
278
|
-
function styleVariants() {
|
|
279
|
-
if (typeof (arguments.length <= 1 ? undefined : arguments[1]) === 'function') {
|
|
280
|
-
var _data = arguments.length <= 0 ? undefined : arguments[0];
|
|
281
|
-
var _mapData = arguments.length <= 1 ? undefined : arguments[1];
|
|
282
|
-
var _debugId = arguments.length <= 2 ? undefined : arguments[2];
|
|
283
|
-
var _classMap = {};
|
|
284
|
-
for (var _key2 in _data) {
|
|
285
|
-
_classMap[_key2] = style(_mapData(_data[_key2], _key2), _debugId ? "".concat(_debugId, "_").concat(_key2) : _key2);
|
|
286
|
-
}
|
|
287
|
-
return _classMap;
|
|
288
|
-
}
|
|
289
|
-
var styleMap = arguments.length <= 0 ? undefined : arguments[0];
|
|
290
|
-
var debugId = arguments.length <= 1 ? undefined : arguments[1];
|
|
291
|
-
var classMap = {};
|
|
292
|
-
for (var _key3 in styleMap) {
|
|
293
|
-
classMap[_key3] = style(styleMap[_key3], debugId ? "".concat(debugId, "_").concat(_key3) : _key3);
|
|
294
|
-
}
|
|
295
|
-
return classMap;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
// createContainer is used for local scoping of CSS containers
|
|
299
|
-
// For now it is mostly just an alias of generateIdentifier
|
|
300
|
-
var createContainer = debugId => generateIdentifier(debugId);
|
|
301
|
-
|
|
302
|
-
var defaultLayerOptions = {};
|
|
303
|
-
var merge = (obj1, obj2) => _objectSpread2(_objectSpread2({}, obj1), obj2);
|
|
304
|
-
var getLayerArgs = function getLayerArgs() {
|
|
305
|
-
var options = defaultLayerOptions;
|
|
306
|
-
var debugId = arguments.length <= 0 ? undefined : arguments[0];
|
|
307
|
-
if (typeof (arguments.length <= 0 ? undefined : arguments[0]) === 'object') {
|
|
308
|
-
options = merge(defaultLayerOptions, arguments.length <= 0 ? undefined : arguments[0]);
|
|
309
|
-
debugId = arguments.length <= 1 ? undefined : arguments[1];
|
|
310
|
-
}
|
|
311
|
-
return [options, debugId];
|
|
312
|
-
};
|
|
313
|
-
function globalLayer() {
|
|
314
|
-
var [options, name] = getLayerArgs(...arguments);
|
|
315
|
-
if (options.parent) {
|
|
316
|
-
name = "".concat(options.parent, ".").concat(name);
|
|
317
|
-
}
|
|
318
|
-
appendCss({
|
|
319
|
-
type: 'layer',
|
|
320
|
-
name
|
|
321
|
-
}, getFileScope());
|
|
322
|
-
return name;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
export { composeStyles, createContainer, createThemeContract, createVar, generateIdentifier, globalLayer, globalStyle, keyframes, style, styleVariants };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { _ as _taggedTemplateLiteral } from '../../dist/taggedTemplateLiteral-10998315.esm.js';
|
|
2
|
-
import dedent from '../../../../../../dedent@1.6.0_babel-plugin-macros@3.1.0/node_modules/dedent/dist/dedent.js';
|
|
3
|
-
|
|
4
|
-
var _templateObject;
|
|
5
|
-
var refCounter = 0;
|
|
6
|
-
var fileScopes = [];
|
|
7
|
-
function hasFileScope() {
|
|
8
|
-
return fileScopes.length > 0;
|
|
9
|
-
}
|
|
10
|
-
function getFileScope() {
|
|
11
|
-
if (fileScopes.length === 0) {
|
|
12
|
-
throw new Error(dedent(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n Styles were unable to be assigned to a file. This is generally caused by one of the following:\n\n - You may have created styles outside of a '.css.ts' context\n - You may have incorrect configuration. See https://vanilla-extract.style/documentation/getting-started\n "]))));
|
|
13
|
-
}
|
|
14
|
-
return fileScopes[0];
|
|
15
|
-
}
|
|
16
|
-
function getAndIncrementRefCounter() {
|
|
17
|
-
return refCounter++;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { getAndIncrementRefCounter, getFileScope, hasFileScope };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
function addFunctionSerializer(target, recipe) {
|
|
2
|
-
// TODO: Update to "__function_serializer__" in future.
|
|
3
|
-
// __recipe__ is the backwards compatible name
|
|
4
|
-
Object.defineProperty(target, '__recipe__', {
|
|
5
|
-
value: recipe,
|
|
6
|
-
writable: false
|
|
7
|
-
});
|
|
8
|
-
return target;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export { addFunctionSerializer };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
var stylesheets = {};
|
|
2
|
-
var injectStyles = _ref => {
|
|
3
|
-
var {
|
|
4
|
-
fileScope,
|
|
5
|
-
css
|
|
6
|
-
} = _ref;
|
|
7
|
-
var fileScopeId = fileScope.packageName ? [fileScope.packageName, fileScope.filePath].join('/') : fileScope.filePath;
|
|
8
|
-
var stylesheet = stylesheets[fileScopeId];
|
|
9
|
-
if (!stylesheet) {
|
|
10
|
-
var styleEl = document.createElement('style');
|
|
11
|
-
if (fileScope.packageName) {
|
|
12
|
-
styleEl.setAttribute('data-package', fileScope.packageName);
|
|
13
|
-
}
|
|
14
|
-
styleEl.setAttribute('data-file', fileScope.filePath);
|
|
15
|
-
styleEl.setAttribute('type', 'text/css');
|
|
16
|
-
stylesheet = stylesheets[fileScopeId] = styleEl;
|
|
17
|
-
document.head.appendChild(styleEl);
|
|
18
|
-
}
|
|
19
|
-
stylesheet.innerHTML = css;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export { injectStyles };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
function getVarName(variable) {
|
|
2
|
-
var matches = variable.match(/^var\((.*)\)$/);
|
|
3
|
-
if (matches) {
|
|
4
|
-
return matches[1];
|
|
5
|
-
}
|
|
6
|
-
return variable;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function walkObject(obj, fn) {
|
|
10
|
-
var path = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
11
|
-
var clone = {};
|
|
12
|
-
for (var key in obj) {
|
|
13
|
-
var _value = obj[key];
|
|
14
|
-
var currentPath = [...path, key];
|
|
15
|
-
if (typeof _value === 'string' || typeof _value === 'number' || _value == null) {
|
|
16
|
-
clone[key] = fn(_value, currentPath);
|
|
17
|
-
} else if (typeof _value === 'object' && !Array.isArray(_value)) {
|
|
18
|
-
clone[key] = walkObject(_value, fn, currentPath);
|
|
19
|
-
} else {
|
|
20
|
-
console.warn("Skipping invalid key \"".concat(currentPath.join('.'), "\". Should be a string, number, null or object. Received: \"").concat(Array.isArray(_value) ? 'Array' : typeof _value, "\""));
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return clone;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { getVarName, walkObject };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { addFunctionSerializer } from '../../../../../@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/functionSerializer/dist/vanilla-extract-css-functionSerializer.esm.js';
|
|
2
|
-
import { style, styleVariants } from '../../../../../@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.esm.js';
|
|
3
|
-
import { m as mapValues, c as createRuntimeFn } from './createRuntimeFn-62c9670f.esm.js';
|
|
4
|
-
|
|
5
|
-
function recipe(options, debugId) {
|
|
6
|
-
var {
|
|
7
|
-
variants = {},
|
|
8
|
-
defaultVariants = {},
|
|
9
|
-
compoundVariants = [],
|
|
10
|
-
base
|
|
11
|
-
} = options;
|
|
12
|
-
var defaultClassName;
|
|
13
|
-
if (!base || typeof base === 'string') {
|
|
14
|
-
var baseClassName = style({});
|
|
15
|
-
defaultClassName = base ? "".concat(baseClassName, " ").concat(base) : baseClassName;
|
|
16
|
-
} else {
|
|
17
|
-
defaultClassName = style(base, debugId);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// @ts-expect-error
|
|
21
|
-
var variantClassNames = mapValues(variants, (variantGroup, variantGroupName) => styleVariants(variantGroup, styleRule => typeof styleRule === 'string' ? [styleRule] : styleRule, variantGroupName));
|
|
22
|
-
var compounds = [];
|
|
23
|
-
for (var {
|
|
24
|
-
style: theStyle,
|
|
25
|
-
variants: _variants
|
|
26
|
-
} of compoundVariants) {
|
|
27
|
-
compounds.push([_variants, typeof theStyle === 'string' ? theStyle : style(theStyle, "".concat(debugId, "_compound_").concat(compounds.length))]);
|
|
28
|
-
}
|
|
29
|
-
var config = {
|
|
30
|
-
defaultClassName,
|
|
31
|
-
variantClassNames,
|
|
32
|
-
defaultVariants,
|
|
33
|
-
compoundVariants: compounds
|
|
34
|
-
};
|
|
35
|
-
return addFunctionSerializer(createRuntimeFn(config), {
|
|
36
|
-
importPath: '@vanilla-extract/recipes/createRuntimeFn',
|
|
37
|
-
importName: 'createRuntimeFn',
|
|
38
|
-
// @ts-expect-error
|
|
39
|
-
args: [config]
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export { recipe };
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { style, composeStyles } from '../../../../../@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.esm.js';
|
|
2
|
-
import { addFunctionSerializer } from '../../../../../@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/functionSerializer/dist/vanilla-extract-css-functionSerializer.esm.js';
|
|
3
|
-
import { hasFileScope } from '../../../../../@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/fileScope/dist/vanilla-extract-css-fileScope.esm.js';
|
|
4
|
-
import { c as createSprinkles$1 } from './createSprinkles-74286718.esm.js';
|
|
5
|
-
|
|
6
|
-
// Conditional + Shorthands + ResponsiveArray
|
|
7
|
-
|
|
8
|
-
// Conditional + Shorthands
|
|
9
|
-
|
|
10
|
-
// Conditional + ResponsiveArray
|
|
11
|
-
|
|
12
|
-
// Conditional
|
|
13
|
-
|
|
14
|
-
// Unconditional + Shorthands
|
|
15
|
-
|
|
16
|
-
// Unconditional
|
|
17
|
-
|
|
18
|
-
function defineProperties(options) {
|
|
19
|
-
var styles = 'shorthands' in options ? Object.fromEntries(Object.entries(options.shorthands).map(_ref => {
|
|
20
|
-
var [prop, mappings] = _ref;
|
|
21
|
-
return [prop, {
|
|
22
|
-
mappings
|
|
23
|
-
}];
|
|
24
|
-
})) : {};
|
|
25
|
-
var _loop = function _loop(key) {
|
|
26
|
-
var property = options.properties[key];
|
|
27
|
-
styles[key] = {
|
|
28
|
-
values: {}
|
|
29
|
-
};
|
|
30
|
-
if ('responsiveArray' in options) {
|
|
31
|
-
styles[key].responsiveArray = options.responsiveArray;
|
|
32
|
-
}
|
|
33
|
-
var processValue = (valueName, value) => {
|
|
34
|
-
if ('conditions' in options) {
|
|
35
|
-
styles[key].values[valueName] = {
|
|
36
|
-
conditions: {}
|
|
37
|
-
};
|
|
38
|
-
var defaultConditions = options.defaultCondition ? Array.isArray(options.defaultCondition) ? options.defaultCondition : [options.defaultCondition] : [];
|
|
39
|
-
var defaultClasses = [];
|
|
40
|
-
for (var _conditionName in options.conditions) {
|
|
41
|
-
var styleValue = typeof value === 'object' ? value : {
|
|
42
|
-
[key]: value
|
|
43
|
-
};
|
|
44
|
-
var condition = options.conditions[_conditionName];
|
|
45
|
-
if (condition['@supports']) {
|
|
46
|
-
styleValue = {
|
|
47
|
-
'@supports': {
|
|
48
|
-
[condition['@supports']]: styleValue
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
if (condition['@container']) {
|
|
53
|
-
styleValue = {
|
|
54
|
-
'@container': {
|
|
55
|
-
[condition['@container']]: styleValue
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
if (condition['@media']) {
|
|
60
|
-
styleValue = {
|
|
61
|
-
'@media': {
|
|
62
|
-
[condition['@media']]: styleValue
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
if (condition.selector) {
|
|
67
|
-
styleValue = {
|
|
68
|
-
selectors: {
|
|
69
|
-
[condition.selector]: styleValue
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
if (options['@layer']) {
|
|
74
|
-
styleValue = {
|
|
75
|
-
'@layer': {
|
|
76
|
-
[options['@layer']]: styleValue
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
var className = style(styleValue, "".concat(key, "_").concat(String(valueName), "_").concat(_conditionName));
|
|
81
|
-
styles[key].values[valueName].conditions[_conditionName] = className;
|
|
82
|
-
if (defaultConditions.indexOf(_conditionName) > -1) {
|
|
83
|
-
defaultClasses.push(className);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
if (defaultClasses.length > 0) {
|
|
87
|
-
styles[key].values[valueName].defaultClass = defaultClasses.join(' ');
|
|
88
|
-
}
|
|
89
|
-
} else {
|
|
90
|
-
var _styleValue = typeof value === 'object' ? value : {
|
|
91
|
-
[key]: value
|
|
92
|
-
};
|
|
93
|
-
if (options['@layer']) {
|
|
94
|
-
_styleValue = {
|
|
95
|
-
'@layer': {
|
|
96
|
-
[options['@layer']]: _styleValue
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
styles[key].values[valueName] = {
|
|
101
|
-
defaultClass: style(_styleValue, "".concat(key, "_").concat(String(valueName)))
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
if (Array.isArray(property)) {
|
|
106
|
-
for (var value of property) {
|
|
107
|
-
processValue(value, value);
|
|
108
|
-
}
|
|
109
|
-
} else {
|
|
110
|
-
for (var valueName in property) {
|
|
111
|
-
var _value = property[valueName];
|
|
112
|
-
processValue(valueName, _value);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
for (var key in options.properties) {
|
|
117
|
-
_loop(key);
|
|
118
|
-
}
|
|
119
|
-
var conditions = 'conditions' in options ? {
|
|
120
|
-
defaultCondition: options.defaultCondition,
|
|
121
|
-
conditionNames: Object.keys(options.conditions),
|
|
122
|
-
responsiveArray: options.responsiveArray
|
|
123
|
-
} : undefined;
|
|
124
|
-
return {
|
|
125
|
-
conditions,
|
|
126
|
-
styles
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
var mockComposeStyles = classList => classList;
|
|
130
|
-
function createSprinkles() {
|
|
131
|
-
for (var _len = arguments.length, config = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
132
|
-
config[_key] = arguments[_key];
|
|
133
|
-
}
|
|
134
|
-
// When using Sprinkles with the runtime (e.g. within a jest test)
|
|
135
|
-
// `style` can be called (only for composition) outside of a fileScope.
|
|
136
|
-
// Checking we're within a fileScope ensures this doesn't blow up and is
|
|
137
|
-
// safe as compositions don't make sense at runtime
|
|
138
|
-
var sprinkles = createSprinkles$1(hasFileScope() ? composeStyles : mockComposeStyles)(...config);
|
|
139
|
-
return addFunctionSerializer(sprinkles, {
|
|
140
|
-
importPath: '@vanilla-extract/sprinkles/createRuntimeSprinkles',
|
|
141
|
-
importName: 'createSprinkles',
|
|
142
|
-
args: config
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
export { defineProperties as createAtomicStyles, createSprinkles as createAtomsFn, createSprinkles, defineProperties };
|