@sprawlify/solid 0.0.13 → 0.0.15
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/chunk-C4aQI7lE.jsx +18 -0
- package/dist/chunk-CKcAJnC7.js +18 -0
- package/dist/collapsible-Cg7zPadX.js +129 -0
- package/dist/collapsible-CjuC6xYl.jsx +117 -0
- package/dist/collection-BiyRTWsX.js +219 -0
- package/dist/collection-BlnS2UQy.jsx +219 -0
- package/dist/components/accordion/index.d.ts +69 -0
- package/dist/components/accordion/index.js +183 -0
- package/dist/components/accordion/index.jsx +157 -0
- package/dist/components/angle-slider/index.d.ts +74 -0
- package/dist/components/angle-slider/index.js +155 -0
- package/dist/components/angle-slider/index.jsx +144 -0
- package/dist/components/avatar/index.d.ts +49 -0
- package/dist/components/avatar/index.js +95 -0
- package/dist/components/avatar/index.jsx +88 -0
- package/dist/components/bottom-sheet/index.d.ts +80 -0
- package/dist/components/bottom-sheet/index.js +218 -0
- package/dist/components/bottom-sheet/index.jsx +177 -0
- package/dist/components/carousel/index.d.ts +98 -0
- package/dist/components/carousel/index.js +207 -0
- package/dist/components/carousel/index.jsx +192 -0
- package/dist/components/checkbox/index.d.ts +138 -0
- package/dist/components/checkbox/index.js +265 -0
- package/dist/components/checkbox/index.jsx +247 -0
- package/dist/components/client-only/index.d.ts +10 -0
- package/dist/components/client-only/index.js +24 -0
- package/dist/components/client-only/index.jsx +15 -0
- package/dist/components/clipboard/index.d.ts +72 -0
- package/dist/components/clipboard/index.js +149 -0
- package/dist/components/clipboard/index.jsx +132 -0
- package/dist/components/collapsible/index.d.ts +60 -0
- package/dist/components/collapsible/index.js +8 -0
- package/dist/components/collapsible/index.jsx +8 -0
- package/dist/components/collection/index.d.ts +3 -0
- package/dist/components/collection/index.js +4 -0
- package/dist/components/collection/index.jsx +4 -0
- package/dist/components/field/index.d.ts +201 -0
- package/dist/components/field/index.js +9 -0
- package/dist/components/field/index.jsx +9 -0
- package/dist/components/fieldset/index.d.ts +109 -0
- package/dist/components/fieldset/index.js +8 -0
- package/dist/components/fieldset/index.jsx +8 -0
- package/dist/components/presence/index.d.ts +5 -0
- package/dist/components/presence/index.js +8 -0
- package/dist/components/presence/index.jsx +8 -0
- package/dist/components/select/index.d.ts +134 -0
- package/dist/components/select/index.js +361 -0
- package/dist/components/select/index.jsx +310 -0
- package/dist/compose-refs-CzyOb8yH.jsx +20 -0
- package/dist/compose-refs-vsrTrt13.js +20 -0
- package/dist/create-context-PS2j4mEo.js +29 -0
- package/dist/create-context-h3cXiEld.jsx +29 -0
- package/dist/create-split-props-CQVsvhvg.jsx +41 -0
- package/dist/factory-B6RK6SH4.d.ts +14 -0
- package/dist/factory-CEdj72aS.js +47 -0
- package/dist/field-C_WuoXOj.js +287 -0
- package/dist/field-CphvciGc.jsx +259 -0
- package/dist/fieldset-BG-0ZqWT.jsx +167 -0
- package/dist/fieldset-D1BO0LmU.js +182 -0
- package/dist/index-B0YoIRC4.d.ts +14 -0
- package/dist/index-C3ATynHc.d.ts +23 -0
- package/dist/index-DXheKbqg.d.ts +76 -0
- package/dist/index-NWiNyxpL.d.ts +38 -0
- package/dist/index-vSwYtc2L.d.ts +38 -0
- package/dist/index.d.ts +40 -19
- package/dist/index.js +5 -415
- package/dist/index.jsx +5 -415
- package/dist/presence-Bfjusgm3.js +79 -0
- package/dist/presence-arWh1hVd.jsx +66 -0
- package/dist/providers-CHqGPEsc.jsx +82 -0
- package/dist/providers-CQkAUunr.js +96 -0
- package/dist/render-strategy-COrlrUuR.js +12 -0
- package/dist/render-strategy-CZDG_yDi.jsx +12 -0
- package/dist/render-strategy-CtRkdWei.d.ts +9 -0
- package/dist/run-if-fn-DRWB51JE.jsx +421 -0
- package/dist/run-if-fn-eYlaegHy.js +421 -0
- package/dist/types-bQRbEioA.d.ts +9 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/index.jsx +4 -0
- package/dist/utils-DYer-9SY.js +0 -0
- package/dist/utils-DrvO4Hk3.jsx +0 -0
- package/package.json +62 -2
package/dist/index.js
CHANGED
|
@@ -1,416 +1,6 @@
|
|
|
1
|
-
import { Key } from "
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { createNormalizer } from "@sprawlify/primitives/types";
|
|
1
|
+
import { a as useMachine, i as mergeProps, n as Key, r as normalizeProps } from "./run-if-fn-eYlaegHy.js";
|
|
2
|
+
import { t as createContext } from "./create-context-PS2j4mEo.js";
|
|
3
|
+
import { a as EnvironmentProvider, i as useLocaleContext, n as useCollator, o as useEnvironmentContext, r as LocaleProvider, t as useFilter } from "./providers-CQkAUunr.js";
|
|
4
|
+
import "./utils-DYer-9SY.js";
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
function createBindable(props) {
|
|
9
|
-
const initial = props().value ?? props().defaultValue;
|
|
10
|
-
const eq = props().isEqual ?? Object.is;
|
|
11
|
-
const [value, setValue] = createSignal(initial);
|
|
12
|
-
const controlled = createMemo(() => props().value != void 0);
|
|
13
|
-
const valueRef = { current: value() };
|
|
14
|
-
const prevValue = { current: void 0 };
|
|
15
|
-
createEffect(() => {
|
|
16
|
-
const v = controlled() ? props().value : value();
|
|
17
|
-
prevValue.current = v;
|
|
18
|
-
valueRef.current = v;
|
|
19
|
-
});
|
|
20
|
-
const set = (v) => {
|
|
21
|
-
const prev = prevValue.current;
|
|
22
|
-
const next = isFunction(v) ? v(valueRef.current) : v;
|
|
23
|
-
if (props().debug) console.log(`[bindable > ${props().debug}] setValue`, {
|
|
24
|
-
next,
|
|
25
|
-
prev
|
|
26
|
-
});
|
|
27
|
-
if (!controlled()) setValue(next);
|
|
28
|
-
if (!eq(next, prev)) props().onChange?.(next, prev);
|
|
29
|
-
};
|
|
30
|
-
function get() {
|
|
31
|
-
const v = controlled() ? props().value : value;
|
|
32
|
-
return isFunction(v) ? v() : v;
|
|
33
|
-
}
|
|
34
|
-
return {
|
|
35
|
-
initial,
|
|
36
|
-
ref: valueRef,
|
|
37
|
-
get,
|
|
38
|
-
set,
|
|
39
|
-
invoke(nextValue, prevValue$1) {
|
|
40
|
-
props().onChange?.(nextValue, prevValue$1);
|
|
41
|
-
},
|
|
42
|
-
hash(value$1) {
|
|
43
|
-
return props().hash?.(value$1) ?? String(value$1);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
createBindable.cleanup = (fn) => {
|
|
48
|
-
onCleanup(() => fn());
|
|
49
|
-
};
|
|
50
|
-
createBindable.ref = (defaultValue) => {
|
|
51
|
-
let value = defaultValue;
|
|
52
|
-
return {
|
|
53
|
-
get: () => value,
|
|
54
|
-
set: (next) => {
|
|
55
|
-
value = next;
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
//#endregion
|
|
61
|
-
//#region src/core/refs.ts
|
|
62
|
-
function createRefs(refs) {
|
|
63
|
-
const ref = { current: refs };
|
|
64
|
-
return {
|
|
65
|
-
get(key) {
|
|
66
|
-
return ref.current[key];
|
|
67
|
-
},
|
|
68
|
-
set(key, value) {
|
|
69
|
-
ref.current[key] = value;
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
//#endregion
|
|
75
|
-
//#region src/core/track.ts
|
|
76
|
-
function access$1(v) {
|
|
77
|
-
if (isFunction(v)) return v();
|
|
78
|
-
return v;
|
|
79
|
-
}
|
|
80
|
-
const createTrack = (deps, effect) => {
|
|
81
|
-
let prevDeps = [];
|
|
82
|
-
let isFirstRun = true;
|
|
83
|
-
createEffect(() => {
|
|
84
|
-
if (isFirstRun) {
|
|
85
|
-
prevDeps = deps.map((d) => access$1(d));
|
|
86
|
-
isFirstRun = false;
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
let changed = false;
|
|
90
|
-
for (let i = 0; i < deps.length; i++) if (!isEqual(prevDeps[i], access$1(deps[i]))) {
|
|
91
|
-
changed = true;
|
|
92
|
-
break;
|
|
93
|
-
}
|
|
94
|
-
if (changed) {
|
|
95
|
-
prevDeps = deps.map((d) => access$1(d));
|
|
96
|
-
effect();
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
//#endregion
|
|
102
|
-
//#region src/core/machine.ts
|
|
103
|
-
function useMachine(machine, userProps = {}) {
|
|
104
|
-
const scope = createMemo(() => {
|
|
105
|
-
const { id, ids, getRootNode } = access(userProps);
|
|
106
|
-
return createScope({
|
|
107
|
-
id,
|
|
108
|
-
ids,
|
|
109
|
-
getRootNode
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
const debug = (...args) => {
|
|
113
|
-
if (machine.debug) console.log(...args);
|
|
114
|
-
};
|
|
115
|
-
const prop = createProp(createMemo(() => machine.props?.({
|
|
116
|
-
props: compact(access(userProps)),
|
|
117
|
-
scope: scope()
|
|
118
|
-
}) ?? access(userProps)));
|
|
119
|
-
const context = machine.context?.({
|
|
120
|
-
prop,
|
|
121
|
-
bindable: createBindable,
|
|
122
|
-
get scope() {
|
|
123
|
-
return scope();
|
|
124
|
-
},
|
|
125
|
-
flush,
|
|
126
|
-
getContext() {
|
|
127
|
-
return ctx;
|
|
128
|
-
},
|
|
129
|
-
getComputed() {
|
|
130
|
-
return computed;
|
|
131
|
-
},
|
|
132
|
-
getRefs() {
|
|
133
|
-
return refs;
|
|
134
|
-
},
|
|
135
|
-
getEvent() {
|
|
136
|
-
return getEvent();
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
const ctx = {
|
|
140
|
-
get(key) {
|
|
141
|
-
return context?.[key].get();
|
|
142
|
-
},
|
|
143
|
-
set(key, value) {
|
|
144
|
-
context?.[key].set(value);
|
|
145
|
-
},
|
|
146
|
-
initial(key) {
|
|
147
|
-
return context?.[key].initial;
|
|
148
|
-
},
|
|
149
|
-
hash(key) {
|
|
150
|
-
const current = context?.[key].get();
|
|
151
|
-
return context?.[key].hash(current);
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
|
-
const effects = { current: /* @__PURE__ */ new Map() };
|
|
155
|
-
const transitionRef = { current: null };
|
|
156
|
-
const previousEventRef = { current: null };
|
|
157
|
-
const eventRef = { current: { type: "" } };
|
|
158
|
-
const getEvent = () => mergeProps$2(eventRef.current, {
|
|
159
|
-
current() {
|
|
160
|
-
return eventRef.current;
|
|
161
|
-
},
|
|
162
|
-
previous() {
|
|
163
|
-
return previousEventRef.current;
|
|
164
|
-
}
|
|
165
|
-
});
|
|
166
|
-
const getState = () => mergeProps$2(state, {
|
|
167
|
-
matches(...values) {
|
|
168
|
-
const current = state.get();
|
|
169
|
-
return values.includes(current);
|
|
170
|
-
},
|
|
171
|
-
hasTag(tag) {
|
|
172
|
-
const current = state.get();
|
|
173
|
-
return !!machine.states[current]?.tags?.includes(tag);
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
const refs = createRefs(machine.refs?.({
|
|
177
|
-
prop,
|
|
178
|
-
context: ctx
|
|
179
|
-
}) ?? {});
|
|
180
|
-
const getParams = () => ({
|
|
181
|
-
state: getState(),
|
|
182
|
-
context: ctx,
|
|
183
|
-
event: getEvent(),
|
|
184
|
-
prop,
|
|
185
|
-
send,
|
|
186
|
-
action,
|
|
187
|
-
guard,
|
|
188
|
-
track: createTrack,
|
|
189
|
-
refs,
|
|
190
|
-
computed,
|
|
191
|
-
flush,
|
|
192
|
-
get scope() {
|
|
193
|
-
return scope();
|
|
194
|
-
},
|
|
195
|
-
choose
|
|
196
|
-
});
|
|
197
|
-
const action = (keys) => {
|
|
198
|
-
const strs = isFunction(keys) ? keys(getParams()) : keys;
|
|
199
|
-
if (!strs) return;
|
|
200
|
-
const fns = strs.map((s) => {
|
|
201
|
-
const fn = machine.implementations?.actions?.[s];
|
|
202
|
-
if (!fn) warn(`[zag-js] No implementation found for action "${JSON.stringify(s)}"`);
|
|
203
|
-
return fn;
|
|
204
|
-
});
|
|
205
|
-
for (const fn of fns) fn?.(getParams());
|
|
206
|
-
};
|
|
207
|
-
const guard = (str) => {
|
|
208
|
-
if (isFunction(str)) return str(getParams());
|
|
209
|
-
return machine.implementations?.guards?.[str](getParams());
|
|
210
|
-
};
|
|
211
|
-
const effect = (keys) => {
|
|
212
|
-
const strs = isFunction(keys) ? keys(getParams()) : keys;
|
|
213
|
-
if (!strs) return;
|
|
214
|
-
const fns = strs.map((s) => {
|
|
215
|
-
const fn = machine.implementations?.effects?.[s];
|
|
216
|
-
if (!fn) warn(`[zag-js] No implementation found for effect "${JSON.stringify(s)}"`);
|
|
217
|
-
return fn;
|
|
218
|
-
});
|
|
219
|
-
const cleanups = [];
|
|
220
|
-
for (const fn of fns) {
|
|
221
|
-
const cleanup = fn?.(getParams());
|
|
222
|
-
if (cleanup) cleanups.push(cleanup);
|
|
223
|
-
}
|
|
224
|
-
return () => cleanups.forEach((fn) => fn?.());
|
|
225
|
-
};
|
|
226
|
-
const choose = (transitions) => {
|
|
227
|
-
return toArray(transitions).find((t) => {
|
|
228
|
-
let result = !t.guard;
|
|
229
|
-
if (isString(t.guard)) result = !!guard(t.guard);
|
|
230
|
-
else if (isFunction(t.guard)) result = t.guard(getParams());
|
|
231
|
-
return result;
|
|
232
|
-
});
|
|
233
|
-
};
|
|
234
|
-
const computed = (key) => {
|
|
235
|
-
ensure(machine.computed, () => `[zag-js] No computed object found on machine`);
|
|
236
|
-
const fn = machine.computed[key];
|
|
237
|
-
return fn({
|
|
238
|
-
context: ctx,
|
|
239
|
-
event: eventRef.current,
|
|
240
|
-
prop,
|
|
241
|
-
refs,
|
|
242
|
-
scope: scope(),
|
|
243
|
-
computed
|
|
244
|
-
});
|
|
245
|
-
};
|
|
246
|
-
const state = createBindable(() => ({
|
|
247
|
-
defaultValue: machine.initialState({ prop }),
|
|
248
|
-
onChange(nextState, prevState) {
|
|
249
|
-
if (prevState) {
|
|
250
|
-
effects.current.get(prevState)?.();
|
|
251
|
-
effects.current.delete(prevState);
|
|
252
|
-
}
|
|
253
|
-
if (prevState) action(machine.states[prevState]?.exit);
|
|
254
|
-
action(transitionRef.current?.actions);
|
|
255
|
-
const cleanup = effect(machine.states[nextState]?.effects);
|
|
256
|
-
if (cleanup) effects.current.set(nextState, cleanup);
|
|
257
|
-
if (prevState === INIT_STATE) {
|
|
258
|
-
action(machine.entry);
|
|
259
|
-
const cleanup$1 = effect(machine.effects);
|
|
260
|
-
if (cleanup$1) effects.current.set(INIT_STATE, cleanup$1);
|
|
261
|
-
}
|
|
262
|
-
action(machine.states[nextState]?.entry);
|
|
263
|
-
}
|
|
264
|
-
}));
|
|
265
|
-
let status = MachineStatus.NotStarted;
|
|
266
|
-
onMount(() => {
|
|
267
|
-
const started = status === MachineStatus.Started;
|
|
268
|
-
status = MachineStatus.Started;
|
|
269
|
-
debug(started ? "rehydrating..." : "initializing...");
|
|
270
|
-
state.invoke(state.initial, INIT_STATE);
|
|
271
|
-
});
|
|
272
|
-
onCleanup(() => {
|
|
273
|
-
debug("unmounting...");
|
|
274
|
-
status = MachineStatus.Stopped;
|
|
275
|
-
effects.current.forEach((fn) => fn?.());
|
|
276
|
-
effects.current = /* @__PURE__ */ new Map();
|
|
277
|
-
transitionRef.current = null;
|
|
278
|
-
action(machine.exit);
|
|
279
|
-
});
|
|
280
|
-
const send = (event) => {
|
|
281
|
-
queueMicrotask(() => {
|
|
282
|
-
if (status !== MachineStatus.Started) return;
|
|
283
|
-
previousEventRef.current = eventRef.current;
|
|
284
|
-
eventRef.current = event;
|
|
285
|
-
let currentState = untrack(() => state.get());
|
|
286
|
-
const transition = choose(machine.states[currentState].on?.[event.type] ?? machine.on?.[event.type]);
|
|
287
|
-
if (!transition) return;
|
|
288
|
-
transitionRef.current = transition;
|
|
289
|
-
const target = transition.target ?? currentState;
|
|
290
|
-
debug("transition", event.type, transition.target || currentState, `(${transition.actions})`);
|
|
291
|
-
const changed = target !== currentState;
|
|
292
|
-
if (changed) state.set(target);
|
|
293
|
-
else if (transition.reenter && !changed) state.invoke(currentState, currentState);
|
|
294
|
-
else action(transition.actions);
|
|
295
|
-
});
|
|
296
|
-
};
|
|
297
|
-
machine.watch?.(getParams());
|
|
298
|
-
return {
|
|
299
|
-
state: getState(),
|
|
300
|
-
send,
|
|
301
|
-
context: ctx,
|
|
302
|
-
prop,
|
|
303
|
-
get scope() {
|
|
304
|
-
return scope();
|
|
305
|
-
},
|
|
306
|
-
refs,
|
|
307
|
-
computed,
|
|
308
|
-
event: getEvent(),
|
|
309
|
-
getStatus: () => status
|
|
310
|
-
};
|
|
311
|
-
}
|
|
312
|
-
function flush(fn) {
|
|
313
|
-
fn();
|
|
314
|
-
}
|
|
315
|
-
function access(value) {
|
|
316
|
-
return isFunction(value) ? value() : value;
|
|
317
|
-
}
|
|
318
|
-
function createProp(value) {
|
|
319
|
-
return function get(key) {
|
|
320
|
-
return value()[key];
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
//#endregion
|
|
325
|
-
//#region src/core/merge-props.ts
|
|
326
|
-
function mergeProps(...sources) {
|
|
327
|
-
const target = {};
|
|
328
|
-
for (let i = 0; i < sources.length; i++) {
|
|
329
|
-
let source = sources[i];
|
|
330
|
-
if (typeof source === "function") source = source();
|
|
331
|
-
if (source) {
|
|
332
|
-
const descriptors = Object.getOwnPropertyDescriptors(source);
|
|
333
|
-
for (const key in descriptors) {
|
|
334
|
-
if (key in target) continue;
|
|
335
|
-
Object.defineProperty(target, key, {
|
|
336
|
-
enumerable: true,
|
|
337
|
-
get() {
|
|
338
|
-
let e = {};
|
|
339
|
-
if (key === "style" || key === "class" || key === "className" || key.startsWith("on")) {
|
|
340
|
-
for (let i$1 = 0; i$1 < sources.length; i$1++) {
|
|
341
|
-
let s = sources[i$1];
|
|
342
|
-
if (typeof s === "function") s = s();
|
|
343
|
-
e = mergeProps$1(e, { [key]: (s || {})[key] });
|
|
344
|
-
}
|
|
345
|
-
return e[key];
|
|
346
|
-
}
|
|
347
|
-
for (let i$1 = sources.length - 1; i$1 >= 0; i$1--) {
|
|
348
|
-
let v, s = sources[i$1];
|
|
349
|
-
if (typeof s === "function") s = s();
|
|
350
|
-
v = (s || {})[key];
|
|
351
|
-
if (v !== void 0) return v;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
return target;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
//#endregion
|
|
362
|
-
//#region src/core/normalize-props.ts
|
|
363
|
-
const eventMap = {
|
|
364
|
-
onFocus: "onFocusIn",
|
|
365
|
-
onBlur: "onFocusOut",
|
|
366
|
-
onDoubleClick: "onDblClick",
|
|
367
|
-
onChange: "onInput",
|
|
368
|
-
defaultChecked: "checked",
|
|
369
|
-
defaultValue: "value",
|
|
370
|
-
htmlFor: "for",
|
|
371
|
-
className: "class"
|
|
372
|
-
};
|
|
373
|
-
const format = (v) => v.startsWith("--") ? v : hyphenateStyleName(v);
|
|
374
|
-
function toSolidProp(prop) {
|
|
375
|
-
return prop in eventMap ? eventMap[prop] : prop;
|
|
376
|
-
}
|
|
377
|
-
const normalizeProps = createNormalizer((props) => {
|
|
378
|
-
const normalized = {};
|
|
379
|
-
for (const key in props) {
|
|
380
|
-
const value = props[key];
|
|
381
|
-
if (key === "readOnly" && value === false) continue;
|
|
382
|
-
if (key === "style" && isObject(value)) {
|
|
383
|
-
normalized["style"] = cssify(value);
|
|
384
|
-
continue;
|
|
385
|
-
}
|
|
386
|
-
if (key === "children") {
|
|
387
|
-
if (isString(value)) normalized["textContent"] = value;
|
|
388
|
-
continue;
|
|
389
|
-
}
|
|
390
|
-
normalized[toSolidProp(key)] = value;
|
|
391
|
-
}
|
|
392
|
-
return normalized;
|
|
393
|
-
});
|
|
394
|
-
function cssify(style) {
|
|
395
|
-
let css = {};
|
|
396
|
-
for (const property in style) {
|
|
397
|
-
const value = style[property];
|
|
398
|
-
if (!isString(value) && !isNumber(value)) continue;
|
|
399
|
-
css[format(property)] = value;
|
|
400
|
-
}
|
|
401
|
-
return css;
|
|
402
|
-
}
|
|
403
|
-
const uppercasePattern = /[A-Z]/g;
|
|
404
|
-
const msPattern = /^ms-/;
|
|
405
|
-
function toHyphenLower(match) {
|
|
406
|
-
return "-" + match.toLowerCase();
|
|
407
|
-
}
|
|
408
|
-
const cache = {};
|
|
409
|
-
function hyphenateStyleName(name) {
|
|
410
|
-
if (cache.hasOwnProperty(name)) return cache[name];
|
|
411
|
-
var hName = name.replace(uppercasePattern, toHyphenLower);
|
|
412
|
-
return cache[name] = msPattern.test(hName) ? "-" + hName : hName;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
//#endregion
|
|
416
|
-
export { Key, mergeProps, normalizeProps, useMachine };
|
|
6
|
+
export { EnvironmentProvider, Key, LocaleProvider, createContext, mergeProps, normalizeProps, useCollator, useEnvironmentContext, useFilter, useLocaleContext, useMachine };
|