@uninspired/cookie-banner 0.0.3 → 0.0.4
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/react/index.cjs +396 -119
- package/dist/react/index.js +392 -115
- package/package.json +2 -1
package/dist/react/index.cjs
CHANGED
|
@@ -5,12 +5,12 @@ const ReactDOM = require("react-dom");
|
|
|
5
5
|
function _interopNamespaceDefault(e) {
|
|
6
6
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
7
7
|
if (e) {
|
|
8
|
-
for (const
|
|
9
|
-
if (
|
|
10
|
-
const d = Object.getOwnPropertyDescriptor(e,
|
|
11
|
-
Object.defineProperty(n,
|
|
8
|
+
for (const k in e) {
|
|
9
|
+
if (k !== "default") {
|
|
10
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
11
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: () => e[
|
|
13
|
+
get: () => e[k]
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -20,27 +20,304 @@ function _interopNamespaceDefault(e) {
|
|
|
20
20
|
}
|
|
21
21
|
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
22
22
|
const ReactDOM__namespace = /* @__PURE__ */ _interopNamespaceDefault(ReactDOM);
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
23
|
+
var jsxRuntime = { exports: {} };
|
|
24
|
+
var reactJsxRuntime_production = {};
|
|
25
|
+
var hasRequiredReactJsxRuntime_production;
|
|
26
|
+
function requireReactJsxRuntime_production() {
|
|
27
|
+
if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
|
|
28
|
+
hasRequiredReactJsxRuntime_production = 1;
|
|
29
|
+
var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
30
|
+
function jsxProd(type, config2, maybeKey) {
|
|
31
|
+
var key = null;
|
|
32
|
+
void 0 !== maybeKey && (key = "" + maybeKey);
|
|
33
|
+
void 0 !== config2.key && (key = "" + config2.key);
|
|
34
|
+
if ("key" in config2) {
|
|
35
|
+
maybeKey = {};
|
|
36
|
+
for (var propName in config2)
|
|
37
|
+
"key" !== propName && (maybeKey[propName] = config2[propName]);
|
|
38
|
+
} else maybeKey = config2;
|
|
39
|
+
config2 = maybeKey.ref;
|
|
40
|
+
return {
|
|
41
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
42
|
+
type,
|
|
43
|
+
key,
|
|
44
|
+
ref: void 0 !== config2 ? config2 : null,
|
|
45
|
+
props: maybeKey
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
|
|
49
|
+
reactJsxRuntime_production.jsx = jsxProd;
|
|
50
|
+
reactJsxRuntime_production.jsxs = jsxProd;
|
|
51
|
+
return reactJsxRuntime_production;
|
|
52
|
+
}
|
|
53
|
+
var reactJsxRuntime_development = {};
|
|
54
|
+
var hasRequiredReactJsxRuntime_development;
|
|
55
|
+
function requireReactJsxRuntime_development() {
|
|
56
|
+
if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
|
|
57
|
+
hasRequiredReactJsxRuntime_development = 1;
|
|
58
|
+
"production" !== process.env.NODE_ENV && (function() {
|
|
59
|
+
function getComponentNameFromType(type) {
|
|
60
|
+
if (null == type) return null;
|
|
61
|
+
if ("function" === typeof type)
|
|
62
|
+
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
|
|
63
|
+
if ("string" === typeof type) return type;
|
|
64
|
+
switch (type) {
|
|
65
|
+
case REACT_FRAGMENT_TYPE:
|
|
66
|
+
return "Fragment";
|
|
67
|
+
case REACT_PROFILER_TYPE:
|
|
68
|
+
return "Profiler";
|
|
69
|
+
case REACT_STRICT_MODE_TYPE:
|
|
70
|
+
return "StrictMode";
|
|
71
|
+
case REACT_SUSPENSE_TYPE:
|
|
72
|
+
return "Suspense";
|
|
73
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
74
|
+
return "SuspenseList";
|
|
75
|
+
case REACT_ACTIVITY_TYPE:
|
|
76
|
+
return "Activity";
|
|
77
|
+
}
|
|
78
|
+
if ("object" === typeof type)
|
|
79
|
+
switch ("number" === typeof type.tag && console.error(
|
|
80
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
81
|
+
), type.$$typeof) {
|
|
82
|
+
case REACT_PORTAL_TYPE:
|
|
83
|
+
return "Portal";
|
|
84
|
+
case REACT_CONTEXT_TYPE:
|
|
85
|
+
return type.displayName || "Context";
|
|
86
|
+
case REACT_CONSUMER_TYPE:
|
|
87
|
+
return (type._context.displayName || "Context") + ".Consumer";
|
|
88
|
+
case REACT_FORWARD_REF_TYPE:
|
|
89
|
+
var innerType = type.render;
|
|
90
|
+
type = type.displayName;
|
|
91
|
+
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
|
|
92
|
+
return type;
|
|
93
|
+
case REACT_MEMO_TYPE:
|
|
94
|
+
return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
|
|
95
|
+
case REACT_LAZY_TYPE:
|
|
96
|
+
innerType = type._payload;
|
|
97
|
+
type = type._init;
|
|
98
|
+
try {
|
|
99
|
+
return getComponentNameFromType(type(innerType));
|
|
100
|
+
} catch (x) {
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
function testStringCoercion(value) {
|
|
106
|
+
return "" + value;
|
|
107
|
+
}
|
|
108
|
+
function checkKeyStringCoercion(value) {
|
|
109
|
+
try {
|
|
110
|
+
var JSCompiler_inline_result = false;
|
|
111
|
+
} catch (e) {
|
|
112
|
+
JSCompiler_inline_result = true;
|
|
113
|
+
}
|
|
114
|
+
if (JSCompiler_inline_result) {
|
|
115
|
+
JSCompiler_inline_result = console;
|
|
116
|
+
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
117
|
+
var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
118
|
+
JSCompiler_temp_const.call(
|
|
119
|
+
JSCompiler_inline_result,
|
|
120
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
121
|
+
JSCompiler_inline_result$jscomp$0
|
|
122
|
+
);
|
|
123
|
+
return testStringCoercion(value);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function getTaskName(type) {
|
|
127
|
+
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
128
|
+
if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
|
|
129
|
+
return "<...>";
|
|
130
|
+
try {
|
|
131
|
+
var name = getComponentNameFromType(type);
|
|
132
|
+
return name ? "<" + name + ">" : "<...>";
|
|
133
|
+
} catch (x) {
|
|
134
|
+
return "<...>";
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
function getOwner() {
|
|
138
|
+
var dispatcher = ReactSharedInternals.A;
|
|
139
|
+
return null === dispatcher ? null : dispatcher.getOwner();
|
|
140
|
+
}
|
|
141
|
+
function UnknownOwner() {
|
|
142
|
+
return Error("react-stack-top-frame");
|
|
143
|
+
}
|
|
144
|
+
function hasValidKey(config2) {
|
|
145
|
+
if (hasOwnProperty.call(config2, "key")) {
|
|
146
|
+
var getter = Object.getOwnPropertyDescriptor(config2, "key").get;
|
|
147
|
+
if (getter && getter.isReactWarning) return false;
|
|
148
|
+
}
|
|
149
|
+
return void 0 !== config2.key;
|
|
150
|
+
}
|
|
151
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
152
|
+
function warnAboutAccessingKey() {
|
|
153
|
+
specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
|
|
154
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
155
|
+
displayName
|
|
156
|
+
));
|
|
157
|
+
}
|
|
158
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
159
|
+
Object.defineProperty(props, "key", {
|
|
160
|
+
get: warnAboutAccessingKey,
|
|
161
|
+
configurable: true
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
function elementRefGetterWithDeprecationWarning() {
|
|
165
|
+
var componentName = getComponentNameFromType(this.type);
|
|
166
|
+
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
|
|
167
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
168
|
+
));
|
|
169
|
+
componentName = this.props.ref;
|
|
170
|
+
return void 0 !== componentName ? componentName : null;
|
|
171
|
+
}
|
|
172
|
+
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
173
|
+
var refProp = props.ref;
|
|
174
|
+
type = {
|
|
175
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
176
|
+
type,
|
|
177
|
+
key,
|
|
178
|
+
props,
|
|
179
|
+
_owner: owner
|
|
180
|
+
};
|
|
181
|
+
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
|
|
182
|
+
enumerable: false,
|
|
183
|
+
get: elementRefGetterWithDeprecationWarning
|
|
184
|
+
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
185
|
+
type._store = {};
|
|
186
|
+
Object.defineProperty(type._store, "validated", {
|
|
187
|
+
configurable: false,
|
|
188
|
+
enumerable: false,
|
|
189
|
+
writable: true,
|
|
190
|
+
value: 0
|
|
191
|
+
});
|
|
192
|
+
Object.defineProperty(type, "_debugInfo", {
|
|
193
|
+
configurable: false,
|
|
194
|
+
enumerable: false,
|
|
195
|
+
writable: true,
|
|
196
|
+
value: null
|
|
197
|
+
});
|
|
198
|
+
Object.defineProperty(type, "_debugStack", {
|
|
199
|
+
configurable: false,
|
|
200
|
+
enumerable: false,
|
|
201
|
+
writable: true,
|
|
202
|
+
value: debugStack
|
|
203
|
+
});
|
|
204
|
+
Object.defineProperty(type, "_debugTask", {
|
|
205
|
+
configurable: false,
|
|
206
|
+
enumerable: false,
|
|
207
|
+
writable: true,
|
|
208
|
+
value: debugTask
|
|
209
|
+
});
|
|
210
|
+
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
211
|
+
return type;
|
|
212
|
+
}
|
|
213
|
+
function jsxDEVImpl(type, config2, maybeKey, isStaticChildren, debugStack, debugTask) {
|
|
214
|
+
var children = config2.children;
|
|
215
|
+
if (void 0 !== children)
|
|
216
|
+
if (isStaticChildren)
|
|
217
|
+
if (isArrayImpl(children)) {
|
|
218
|
+
for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)
|
|
219
|
+
validateChildKeys(children[isStaticChildren]);
|
|
220
|
+
Object.freeze && Object.freeze(children);
|
|
221
|
+
} else
|
|
222
|
+
console.error(
|
|
223
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
224
|
+
);
|
|
225
|
+
else validateChildKeys(children);
|
|
226
|
+
if (hasOwnProperty.call(config2, "key")) {
|
|
227
|
+
children = getComponentNameFromType(type);
|
|
228
|
+
var keys = Object.keys(config2).filter(function(k) {
|
|
229
|
+
return "key" !== k;
|
|
230
|
+
});
|
|
231
|
+
isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
232
|
+
didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
233
|
+
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
|
|
234
|
+
isStaticChildren,
|
|
235
|
+
children,
|
|
236
|
+
keys,
|
|
237
|
+
children
|
|
238
|
+
), didWarnAboutKeySpread[children + isStaticChildren] = true);
|
|
239
|
+
}
|
|
240
|
+
children = null;
|
|
241
|
+
void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
|
|
242
|
+
hasValidKey(config2) && (checkKeyStringCoercion(config2.key), children = "" + config2.key);
|
|
243
|
+
if ("key" in config2) {
|
|
244
|
+
maybeKey = {};
|
|
245
|
+
for (var propName in config2)
|
|
246
|
+
"key" !== propName && (maybeKey[propName] = config2[propName]);
|
|
247
|
+
} else maybeKey = config2;
|
|
248
|
+
children && defineKeyPropWarningGetter(
|
|
249
|
+
maybeKey,
|
|
250
|
+
"function" === typeof type ? type.displayName || type.name || "Unknown" : type
|
|
251
|
+
);
|
|
252
|
+
return ReactElement(
|
|
253
|
+
type,
|
|
254
|
+
children,
|
|
255
|
+
maybeKey,
|
|
256
|
+
getOwner(),
|
|
257
|
+
debugStack,
|
|
258
|
+
debugTask
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
function validateChildKeys(node) {
|
|
262
|
+
isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
|
|
263
|
+
}
|
|
264
|
+
function isValidElement(object2) {
|
|
265
|
+
return "object" === typeof object2 && null !== object2 && object2.$$typeof === REACT_ELEMENT_TYPE;
|
|
266
|
+
}
|
|
267
|
+
var React$1 = React, REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), ReactSharedInternals = React$1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
|
|
268
|
+
return null;
|
|
269
|
+
};
|
|
270
|
+
React$1 = {
|
|
271
|
+
react_stack_bottom_frame: function(callStackForError) {
|
|
272
|
+
return callStackForError();
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
var specialPropKeyWarningShown;
|
|
276
|
+
var didWarnAboutElementRef = {};
|
|
277
|
+
var unknownOwnerDebugStack = React$1.react_stack_bottom_frame.bind(
|
|
278
|
+
React$1,
|
|
279
|
+
UnknownOwner
|
|
280
|
+
)();
|
|
281
|
+
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
282
|
+
var didWarnAboutKeySpread = {};
|
|
283
|
+
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
284
|
+
reactJsxRuntime_development.jsx = function(type, config2, maybeKey) {
|
|
285
|
+
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
286
|
+
return jsxDEVImpl(
|
|
287
|
+
type,
|
|
288
|
+
config2,
|
|
289
|
+
maybeKey,
|
|
290
|
+
false,
|
|
291
|
+
trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
|
|
292
|
+
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
293
|
+
);
|
|
294
|
+
};
|
|
295
|
+
reactJsxRuntime_development.jsxs = function(type, config2, maybeKey) {
|
|
296
|
+
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
297
|
+
return jsxDEVImpl(
|
|
298
|
+
type,
|
|
299
|
+
config2,
|
|
300
|
+
maybeKey,
|
|
301
|
+
true,
|
|
302
|
+
trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
|
|
303
|
+
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
304
|
+
);
|
|
305
|
+
};
|
|
306
|
+
})();
|
|
307
|
+
return reactJsxRuntime_development;
|
|
308
|
+
}
|
|
309
|
+
var hasRequiredJsxRuntime;
|
|
310
|
+
function requireJsxRuntime() {
|
|
311
|
+
if (hasRequiredJsxRuntime) return jsxRuntime.exports;
|
|
312
|
+
hasRequiredJsxRuntime = 1;
|
|
313
|
+
if (process.env.NODE_ENV === "production") {
|
|
314
|
+
jsxRuntime.exports = /* @__PURE__ */ requireReactJsxRuntime_production();
|
|
315
|
+
} else {
|
|
316
|
+
jsxRuntime.exports = /* @__PURE__ */ requireReactJsxRuntime_development();
|
|
317
|
+
}
|
|
318
|
+
return jsxRuntime.exports;
|
|
43
319
|
}
|
|
320
|
+
var jsxRuntimeExports = /* @__PURE__ */ requireJsxRuntime();
|
|
44
321
|
function cls(...classes2) {
|
|
45
322
|
return classes2.filter(Boolean).join(" ");
|
|
46
323
|
}
|
|
@@ -58,7 +335,7 @@ const classes$4 = {
|
|
|
58
335
|
ghost
|
|
59
336
|
};
|
|
60
337
|
const Button = ({ variant = "neutral", ...rest }) => {
|
|
61
|
-
return /* @__PURE__ */
|
|
338
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: cls(classes$4.root, classes$4[variant]), ...rest });
|
|
62
339
|
};
|
|
63
340
|
const root$3 = "_root_14l5h_1";
|
|
64
341
|
const muted = "_muted_14l5h_4";
|
|
@@ -84,7 +361,7 @@ const Text = ({
|
|
|
84
361
|
const Component = as ?? "span";
|
|
85
362
|
return (
|
|
86
363
|
// @ts-ignore
|
|
87
|
-
/* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
88
365
|
Component,
|
|
89
366
|
{
|
|
90
367
|
className: cls(
|
|
@@ -158,9 +435,9 @@ function $constructor(name, initializer2, params) {
|
|
|
158
435
|
const proto = _.prototype;
|
|
159
436
|
const keys = Object.keys(proto);
|
|
160
437
|
for (let i = 0; i < keys.length; i++) {
|
|
161
|
-
const
|
|
162
|
-
if (!(
|
|
163
|
-
inst[
|
|
438
|
+
const k = keys[i];
|
|
439
|
+
if (!(k in inst)) {
|
|
440
|
+
inst[k] = proto[k].bind(inst);
|
|
164
441
|
}
|
|
165
442
|
}
|
|
166
443
|
}
|
|
@@ -276,8 +553,8 @@ function normalizeParams(_params) {
|
|
|
276
553
|
return {};
|
|
277
554
|
}
|
|
278
555
|
function optionalKeys(shape) {
|
|
279
|
-
return Object.keys(shape).filter((
|
|
280
|
-
return shape[
|
|
556
|
+
return Object.keys(shape).filter((k) => {
|
|
557
|
+
return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional";
|
|
281
558
|
});
|
|
282
559
|
}
|
|
283
560
|
function aborted(x, startIndex = 0) {
|
|
@@ -560,9 +837,9 @@ function handlePropertyResult(result, final, key, input, isOptionalOut) {
|
|
|
560
837
|
}
|
|
561
838
|
function normalizeDef(def) {
|
|
562
839
|
const keys = Object.keys(def.shape);
|
|
563
|
-
for (const
|
|
564
|
-
if (!def.shape?.[
|
|
565
|
-
throw new Error(`Invalid element at key "${
|
|
840
|
+
for (const k of keys) {
|
|
841
|
+
if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) {
|
|
842
|
+
throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
|
|
566
843
|
}
|
|
567
844
|
}
|
|
568
845
|
const okeys = optionalKeys(def.shape);
|
|
@@ -747,11 +1024,11 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
|
|
|
747
1024
|
const pv = option._zod.propValues;
|
|
748
1025
|
if (!pv || Object.keys(pv).length === 0)
|
|
749
1026
|
throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
|
|
750
|
-
for (const [
|
|
751
|
-
if (!propValues[
|
|
752
|
-
propValues[
|
|
1027
|
+
for (const [k, v] of Object.entries(pv)) {
|
|
1028
|
+
if (!propValues[k])
|
|
1029
|
+
propValues[k] = /* @__PURE__ */ new Set();
|
|
753
1030
|
for (const val of v) {
|
|
754
|
-
propValues[
|
|
1031
|
+
propValues[k].add(val);
|
|
755
1032
|
}
|
|
756
1033
|
}
|
|
757
1034
|
}
|
|
@@ -1109,7 +1386,7 @@ function createContext2(rootComponentName, defaultContext) {
|
|
|
1109
1386
|
const Provider = (props) => {
|
|
1110
1387
|
const { children, ...context } = props;
|
|
1111
1388
|
const value = React__namespace.useMemo(() => context, Object.values(context));
|
|
1112
|
-
return /* @__PURE__ */
|
|
1389
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Context.Provider, { value, children });
|
|
1113
1390
|
};
|
|
1114
1391
|
Provider.displayName = rootComponentName + "Provider";
|
|
1115
1392
|
function useContext2(consumerName) {
|
|
@@ -1130,7 +1407,7 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
1130
1407
|
const { scope, children, ...context } = props;
|
|
1131
1408
|
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
1132
1409
|
const value = React__namespace.useMemo(() => context, Object.values(context));
|
|
1133
|
-
return /* @__PURE__ */
|
|
1410
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Context.Provider, { value, children });
|
|
1134
1411
|
};
|
|
1135
1412
|
Provider.displayName = rootComponentName + "Provider";
|
|
1136
1413
|
function useContext2(consumerName, scope) {
|
|
@@ -1228,9 +1505,9 @@ function createSlot(ownerName) {
|
|
|
1228
1505
|
return child;
|
|
1229
1506
|
}
|
|
1230
1507
|
});
|
|
1231
|
-
return /* @__PURE__ */
|
|
1508
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React__namespace.isValidElement(newElement) ? React__namespace.cloneElement(newElement, void 0, newChildren) : null });
|
|
1232
1509
|
}
|
|
1233
|
-
return /* @__PURE__ */
|
|
1510
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
1234
1511
|
});
|
|
1235
1512
|
Slot2.displayName = `${ownerName}.Slot`;
|
|
1236
1513
|
return Slot2;
|
|
@@ -1304,7 +1581,7 @@ function createCollection(name) {
|
|
|
1304
1581
|
const { scope, children } = props;
|
|
1305
1582
|
const ref = React.useRef(null);
|
|
1306
1583
|
const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;
|
|
1307
|
-
return /* @__PURE__ */
|
|
1584
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
1308
1585
|
};
|
|
1309
1586
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
1310
1587
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
@@ -1314,7 +1591,7 @@ function createCollection(name) {
|
|
|
1314
1591
|
const { scope, children } = props;
|
|
1315
1592
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
1316
1593
|
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
1317
|
-
return /* @__PURE__ */
|
|
1594
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(CollectionSlotImpl, { ref: composedRefs, children });
|
|
1318
1595
|
}
|
|
1319
1596
|
);
|
|
1320
1597
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
@@ -1331,7 +1608,7 @@ function createCollection(name) {
|
|
|
1331
1608
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
1332
1609
|
return () => void context.itemMap.delete(ref);
|
|
1333
1610
|
});
|
|
1334
|
-
return /* @__PURE__ */
|
|
1611
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
1335
1612
|
}
|
|
1336
1613
|
);
|
|
1337
1614
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
@@ -1456,7 +1733,7 @@ var Primitive = NODES.reduce((primitive, node) => {
|
|
|
1456
1733
|
if (typeof window !== "undefined") {
|
|
1457
1734
|
window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
|
|
1458
1735
|
}
|
|
1459
|
-
return /* @__PURE__ */
|
|
1736
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
1460
1737
|
});
|
|
1461
1738
|
Node2.displayName = `Primitive.${node}`;
|
|
1462
1739
|
return { ...primitive, [node]: Node2 };
|
|
@@ -1614,7 +1891,7 @@ var Collapsible = React__namespace.forwardRef(
|
|
|
1614
1891
|
onChange: onOpenChange,
|
|
1615
1892
|
caller: COLLAPSIBLE_NAME
|
|
1616
1893
|
});
|
|
1617
|
-
return /* @__PURE__ */
|
|
1894
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1618
1895
|
CollapsibleProvider,
|
|
1619
1896
|
{
|
|
1620
1897
|
scope: __scopeCollapsible,
|
|
@@ -1622,7 +1899,7 @@ var Collapsible = React__namespace.forwardRef(
|
|
|
1622
1899
|
contentId: useId(),
|
|
1623
1900
|
open: open2,
|
|
1624
1901
|
onOpenToggle: React__namespace.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
1625
|
-
children: /* @__PURE__ */
|
|
1902
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1626
1903
|
Primitive.div,
|
|
1627
1904
|
{
|
|
1628
1905
|
"data-state": getState$3(open2),
|
|
@@ -1641,7 +1918,7 @@ var CollapsibleTrigger = React__namespace.forwardRef(
|
|
|
1641
1918
|
(props, forwardedRef) => {
|
|
1642
1919
|
const { __scopeCollapsible, ...triggerProps } = props;
|
|
1643
1920
|
const context = useCollapsibleContext(TRIGGER_NAME$2, __scopeCollapsible);
|
|
1644
|
-
return /* @__PURE__ */
|
|
1921
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1645
1922
|
Primitive.button,
|
|
1646
1923
|
{
|
|
1647
1924
|
type: "button",
|
|
@@ -1663,7 +1940,7 @@ var CollapsibleContent = React__namespace.forwardRef(
|
|
|
1663
1940
|
(props, forwardedRef) => {
|
|
1664
1941
|
const { forceMount, ...contentProps } = props;
|
|
1665
1942
|
const context = useCollapsibleContext(CONTENT_NAME$2, props.__scopeCollapsible);
|
|
1666
|
-
return /* @__PURE__ */
|
|
1943
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ jsxRuntimeExports.jsx(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) });
|
|
1667
1944
|
}
|
|
1668
1945
|
);
|
|
1669
1946
|
CollapsibleContent.displayName = CONTENT_NAME$2;
|
|
@@ -1703,7 +1980,7 @@ var CollapsibleContentImpl = React__namespace.forwardRef((props, forwardedRef) =
|
|
|
1703
1980
|
setIsPresent(present);
|
|
1704
1981
|
}
|
|
1705
1982
|
}, [context.open, present]);
|
|
1706
|
-
return /* @__PURE__ */
|
|
1983
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1707
1984
|
Primitive.div,
|
|
1708
1985
|
{
|
|
1709
1986
|
"data-state": getState$3(context.open),
|
|
@@ -1745,7 +2022,7 @@ var Accordion = React.forwardRef(
|
|
|
1745
2022
|
const { type, ...accordionProps } = props;
|
|
1746
2023
|
const singleProps = accordionProps;
|
|
1747
2024
|
const multipleProps = accordionProps;
|
|
1748
|
-
return /* @__PURE__ */
|
|
2025
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Collection.Provider, { scope: props.__scopeAccordion, children: type === "multiple" ? /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionImplMultiple, { ...multipleProps, ref: forwardedRef }) : /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionImplSingle, { ...singleProps, ref: forwardedRef }) });
|
|
1749
2026
|
}
|
|
1750
2027
|
);
|
|
1751
2028
|
Accordion.displayName = ACCORDION_NAME;
|
|
@@ -1770,14 +2047,14 @@ var AccordionImplSingle = React.forwardRef(
|
|
|
1770
2047
|
onChange: onValueChange,
|
|
1771
2048
|
caller: ACCORDION_NAME
|
|
1772
2049
|
});
|
|
1773
|
-
return /* @__PURE__ */
|
|
2050
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1774
2051
|
AccordionValueProvider,
|
|
1775
2052
|
{
|
|
1776
2053
|
scope: props.__scopeAccordion,
|
|
1777
2054
|
value: React.useMemo(() => value ? [value] : [], [value]),
|
|
1778
2055
|
onItemOpen: setValue,
|
|
1779
2056
|
onItemClose: React.useCallback(() => collapsible2 && setValue(""), [collapsible2, setValue]),
|
|
1780
|
-
children: /* @__PURE__ */
|
|
2057
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible: collapsible2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionImpl, { ...accordionSingleProps, ref: forwardedRef }) })
|
|
1781
2058
|
}
|
|
1782
2059
|
);
|
|
1783
2060
|
}
|
|
@@ -1804,14 +2081,14 @@ var AccordionImplMultiple = React.forwardRef((props, forwardedRef) => {
|
|
|
1804
2081
|
(itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)),
|
|
1805
2082
|
[setValue]
|
|
1806
2083
|
);
|
|
1807
|
-
return /* @__PURE__ */
|
|
2084
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1808
2085
|
AccordionValueProvider,
|
|
1809
2086
|
{
|
|
1810
2087
|
scope: props.__scopeAccordion,
|
|
1811
2088
|
value,
|
|
1812
2089
|
onItemOpen: handleItemOpen,
|
|
1813
2090
|
onItemClose: handleItemClose,
|
|
1814
|
-
children: /* @__PURE__ */
|
|
2091
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionImpl, { ...accordionMultipleProps, ref: forwardedRef }) })
|
|
1815
2092
|
}
|
|
1816
2093
|
);
|
|
1817
2094
|
});
|
|
@@ -1886,14 +2163,14 @@ var AccordionImpl = React.forwardRef(
|
|
|
1886
2163
|
const clampedIndex = nextIndex % triggerCount;
|
|
1887
2164
|
triggerCollection[clampedIndex].ref.current?.focus();
|
|
1888
2165
|
});
|
|
1889
|
-
return /* @__PURE__ */
|
|
2166
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1890
2167
|
AccordionImplProvider,
|
|
1891
2168
|
{
|
|
1892
2169
|
scope: __scopeAccordion,
|
|
1893
2170
|
disabled,
|
|
1894
2171
|
direction: dir,
|
|
1895
2172
|
orientation,
|
|
1896
|
-
children: /* @__PURE__ */
|
|
2173
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Collection.Slot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1897
2174
|
Primitive.div,
|
|
1898
2175
|
{
|
|
1899
2176
|
...accordionProps,
|
|
@@ -1917,14 +2194,14 @@ var AccordionItem = React.forwardRef(
|
|
|
1917
2194
|
const triggerId = useId();
|
|
1918
2195
|
const open2 = value && valueContext.value.includes(value) || false;
|
|
1919
2196
|
const disabled = accordionContext.disabled || props.disabled;
|
|
1920
|
-
return /* @__PURE__ */
|
|
2197
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1921
2198
|
AccordionItemProvider,
|
|
1922
2199
|
{
|
|
1923
2200
|
scope: __scopeAccordion,
|
|
1924
2201
|
open: open2,
|
|
1925
2202
|
disabled,
|
|
1926
2203
|
triggerId,
|
|
1927
|
-
children: /* @__PURE__ */
|
|
2204
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1928
2205
|
Root$2,
|
|
1929
2206
|
{
|
|
1930
2207
|
"data-orientation": accordionContext.orientation,
|
|
@@ -1954,7 +2231,7 @@ var AccordionHeader = React.forwardRef(
|
|
|
1954
2231
|
const { __scopeAccordion, ...headerProps } = props;
|
|
1955
2232
|
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
|
1956
2233
|
const itemContext = useAccordionItemContext(HEADER_NAME, __scopeAccordion);
|
|
1957
|
-
return /* @__PURE__ */
|
|
2234
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1958
2235
|
Primitive.h3,
|
|
1959
2236
|
{
|
|
1960
2237
|
"data-orientation": accordionContext.orientation,
|
|
@@ -1975,7 +2252,7 @@ var AccordionTrigger = React.forwardRef(
|
|
|
1975
2252
|
const itemContext = useAccordionItemContext(TRIGGER_NAME$1, __scopeAccordion);
|
|
1976
2253
|
const collapsibleContext = useAccordionCollapsibleContext(TRIGGER_NAME$1, __scopeAccordion);
|
|
1977
2254
|
const collapsibleScope = useCollapsibleScope(__scopeAccordion);
|
|
1978
|
-
return /* @__PURE__ */
|
|
2255
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Collection.ItemSlot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1979
2256
|
Trigger,
|
|
1980
2257
|
{
|
|
1981
2258
|
"aria-disabled": itemContext.open && !collapsibleContext.collapsible || void 0,
|
|
@@ -1996,7 +2273,7 @@ var AccordionContent = React.forwardRef(
|
|
|
1996
2273
|
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
|
1997
2274
|
const itemContext = useAccordionItemContext(CONTENT_NAME$1, __scopeAccordion);
|
|
1998
2275
|
const collapsibleScope = useCollapsibleScope(__scopeAccordion);
|
|
1999
|
-
return /* @__PURE__ */
|
|
2276
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2000
2277
|
Content$1,
|
|
2001
2278
|
{
|
|
2002
2279
|
role: "region",
|
|
@@ -2173,8 +2450,8 @@ var Switch$1 = React__namespace.forwardRef(
|
|
|
2173
2450
|
onChange: onCheckedChange,
|
|
2174
2451
|
caller: SWITCH_NAME
|
|
2175
2452
|
});
|
|
2176
|
-
return /* @__PURE__ */
|
|
2177
|
-
/* @__PURE__ */
|
|
2453
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [
|
|
2454
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2178
2455
|
Primitive.button,
|
|
2179
2456
|
{
|
|
2180
2457
|
type: "button",
|
|
@@ -2196,7 +2473,7 @@ var Switch$1 = React__namespace.forwardRef(
|
|
|
2196
2473
|
})
|
|
2197
2474
|
}
|
|
2198
2475
|
),
|
|
2199
|
-
isFormControl && /* @__PURE__ */
|
|
2476
|
+
isFormControl && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2200
2477
|
SwitchBubbleInput,
|
|
2201
2478
|
{
|
|
2202
2479
|
control: button,
|
|
@@ -2219,7 +2496,7 @@ var SwitchThumb = React__namespace.forwardRef(
|
|
|
2219
2496
|
(props, forwardedRef) => {
|
|
2220
2497
|
const { __scopeSwitch, ...thumbProps } = props;
|
|
2221
2498
|
const context = useSwitchContext(THUMB_NAME, __scopeSwitch);
|
|
2222
|
-
return /* @__PURE__ */
|
|
2499
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2223
2500
|
Primitive.span,
|
|
2224
2501
|
{
|
|
2225
2502
|
"data-state": getState$1(context.checked),
|
|
@@ -2259,7 +2536,7 @@ var SwitchBubbleInput = React__namespace.forwardRef(
|
|
|
2259
2536
|
input.dispatchEvent(event);
|
|
2260
2537
|
}
|
|
2261
2538
|
}, [prevChecked, checked, bubbles]);
|
|
2262
|
-
return /* @__PURE__ */
|
|
2539
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2263
2540
|
"input",
|
|
2264
2541
|
{
|
|
2265
2542
|
type: "checkbox",
|
|
@@ -2294,9 +2571,9 @@ const classes = {
|
|
|
2294
2571
|
thumb
|
|
2295
2572
|
};
|
|
2296
2573
|
const Switch = ({ label: label2, id, ...rest }) => {
|
|
2297
|
-
return /* @__PURE__ */
|
|
2298
|
-
label2 && /* @__PURE__ */
|
|
2299
|
-
/* @__PURE__ */
|
|
2574
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes.root, children: [
|
|
2575
|
+
label2 && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { className: classes.label, as: "label", htmlFor: id, children: label2 }),
|
|
2576
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Root$1, { className: classes.switch, ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Thumb, { className: classes.thumb }) })
|
|
2300
2577
|
] });
|
|
2301
2578
|
};
|
|
2302
2579
|
const selectionSchema = /* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ boolean());
|
|
@@ -2398,7 +2675,7 @@ const SelectionProvider = ({
|
|
|
2398
2675
|
const itemKeys = items.map((item) => item.value);
|
|
2399
2676
|
return itemKeys.every((key) => selectedKeys.includes(key));
|
|
2400
2677
|
}, [savedSelection, items]);
|
|
2401
|
-
return /* @__PURE__ */
|
|
2678
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2402
2679
|
SelectionContext.Provider,
|
|
2403
2680
|
{
|
|
2404
2681
|
value: {
|
|
@@ -2445,14 +2722,14 @@ const BannerItem = ({
|
|
|
2445
2722
|
[required, toggleSelection, value]
|
|
2446
2723
|
);
|
|
2447
2724
|
const disabled = React.useMemo(() => required, [required]);
|
|
2448
|
-
return /* @__PURE__ */
|
|
2449
|
-
/* @__PURE__ */
|
|
2450
|
-
/* @__PURE__ */
|
|
2451
|
-
/* @__PURE__ */
|
|
2452
|
-
sublabel && /* @__PURE__ */
|
|
2725
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Item, { value, className: classes$1.root, children: [
|
|
2726
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes$1.header, children: [
|
|
2727
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Trigger2, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes$1.label, children: [
|
|
2728
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Text, { weight: "bold", children: label2 }),
|
|
2729
|
+
sublabel && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { size: "caption", color: "muted", children: sublabel })
|
|
2453
2730
|
] }) }),
|
|
2454
|
-
/* @__PURE__ */
|
|
2455
|
-
/* @__PURE__ */
|
|
2731
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes$1.actions, children: [
|
|
2732
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2456
2733
|
Switch,
|
|
2457
2734
|
{
|
|
2458
2735
|
checked,
|
|
@@ -2460,7 +2737,7 @@ const BannerItem = ({
|
|
|
2460
2737
|
disabled
|
|
2461
2738
|
}
|
|
2462
2739
|
),
|
|
2463
|
-
/* @__PURE__ */
|
|
2740
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Trigger2, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2464
2741
|
ChevronDown,
|
|
2465
2742
|
{
|
|
2466
2743
|
size: 16,
|
|
@@ -2472,7 +2749,7 @@ const BannerItem = ({
|
|
|
2472
2749
|
) })
|
|
2473
2750
|
] })
|
|
2474
2751
|
] }),
|
|
2475
|
-
description2 && /* @__PURE__ */
|
|
2752
|
+
description2 && /* @__PURE__ */ jsxRuntimeExports.jsx(Content2, { className: classes$1.description, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2476
2753
|
Text,
|
|
2477
2754
|
{
|
|
2478
2755
|
size: "caption",
|
|
@@ -2587,7 +2864,7 @@ var DismissableLayer = React__namespace.forwardRef(
|
|
|
2587
2864
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
2588
2865
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
2589
2866
|
}, []);
|
|
2590
|
-
return /* @__PURE__ */
|
|
2867
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2591
2868
|
Primitive.div,
|
|
2592
2869
|
{
|
|
2593
2870
|
...layerProps,
|
|
@@ -2621,7 +2898,7 @@ var DismissableLayerBranch = React__namespace.forwardRef((props, forwardedRef) =
|
|
|
2621
2898
|
};
|
|
2622
2899
|
}
|
|
2623
2900
|
}, [context.branches]);
|
|
2624
|
-
return /* @__PURE__ */
|
|
2901
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Primitive.div, { ...props, ref: composedRefs });
|
|
2625
2902
|
});
|
|
2626
2903
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
2627
2904
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
@@ -2818,7 +3095,7 @@ var FocusScope = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
2818
3095
|
},
|
|
2819
3096
|
[loop, trapped, focusScope.paused]
|
|
2820
3097
|
);
|
|
2821
|
-
return /* @__PURE__ */
|
|
3098
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
2822
3099
|
});
|
|
2823
3100
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
2824
3101
|
function focusFirst(candidates, { select = false } = {}) {
|
|
@@ -2947,7 +3224,7 @@ function __rest(s, e) {
|
|
|
2947
3224
|
return t;
|
|
2948
3225
|
}
|
|
2949
3226
|
function __spreadArray(to, from, pack) {
|
|
2950
|
-
if (pack || arguments.length === 2) for (var i = 0,
|
|
3227
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
2951
3228
|
if (ar || !(i in from)) {
|
|
2952
3229
|
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
2953
3230
|
ar[i] = from[i];
|
|
@@ -3720,7 +3997,7 @@ var Dialog = (props) => {
|
|
|
3720
3997
|
onChange: onOpenChange,
|
|
3721
3998
|
caller: DIALOG_NAME
|
|
3722
3999
|
});
|
|
3723
|
-
return /* @__PURE__ */
|
|
4000
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3724
4001
|
DialogProvider,
|
|
3725
4002
|
{
|
|
3726
4003
|
scope: __scopeDialog,
|
|
@@ -3744,7 +4021,7 @@ var DialogTrigger = React__namespace.forwardRef(
|
|
|
3744
4021
|
const { __scopeDialog, ...triggerProps } = props;
|
|
3745
4022
|
const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
|
|
3746
4023
|
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
3747
|
-
return /* @__PURE__ */
|
|
4024
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3748
4025
|
Primitive.button,
|
|
3749
4026
|
{
|
|
3750
4027
|
type: "button",
|
|
@@ -3770,7 +4047,7 @@ var DialogOverlay = React__namespace.forwardRef(
|
|
|
3770
4047
|
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
|
|
3771
4048
|
const { forceMount = portalContext.forceMount, ...overlayProps } = props;
|
|
3772
4049
|
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
|
3773
|
-
return context.modal ? /* @__PURE__ */
|
|
4050
|
+
return context.modal ? /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
|
3774
4051
|
}
|
|
3775
4052
|
);
|
|
3776
4053
|
DialogOverlay.displayName = OVERLAY_NAME;
|
|
@@ -3782,7 +4059,7 @@ var DialogOverlayImpl = React__namespace.forwardRef(
|
|
|
3782
4059
|
return (
|
|
3783
4060
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
3784
4061
|
// ie. when `Overlay` and `Content` are siblings
|
|
3785
|
-
/* @__PURE__ */
|
|
4062
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ReactRemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3786
4063
|
Primitive.div,
|
|
3787
4064
|
{
|
|
3788
4065
|
"data-state": getState(context.open),
|
|
@@ -3800,7 +4077,7 @@ var DialogContent = React__namespace.forwardRef(
|
|
|
3800
4077
|
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
|
|
3801
4078
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
3802
4079
|
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
3803
|
-
return /* @__PURE__ */
|
|
4080
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsxRuntimeExports.jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsxRuntimeExports.jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
3804
4081
|
}
|
|
3805
4082
|
);
|
|
3806
4083
|
DialogContent.displayName = CONTENT_NAME;
|
|
@@ -3813,7 +4090,7 @@ var DialogContentModal = React__namespace.forwardRef(
|
|
|
3813
4090
|
const content = contentRef.current;
|
|
3814
4091
|
if (content) return hideOthers(content);
|
|
3815
4092
|
}, []);
|
|
3816
|
-
return /* @__PURE__ */
|
|
4093
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3817
4094
|
DialogContentImpl,
|
|
3818
4095
|
{
|
|
3819
4096
|
...props,
|
|
@@ -3843,7 +4120,7 @@ var DialogContentNonModal = React__namespace.forwardRef(
|
|
|
3843
4120
|
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
3844
4121
|
const hasInteractedOutsideRef = React__namespace.useRef(false);
|
|
3845
4122
|
const hasPointerDownOutsideRef = React__namespace.useRef(false);
|
|
3846
|
-
return /* @__PURE__ */
|
|
4123
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3847
4124
|
DialogContentImpl,
|
|
3848
4125
|
{
|
|
3849
4126
|
...props,
|
|
@@ -3885,8 +4162,8 @@ var DialogContentImpl = React__namespace.forwardRef(
|
|
|
3885
4162
|
const contentRef = React__namespace.useRef(null);
|
|
3886
4163
|
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
3887
4164
|
useFocusGuards();
|
|
3888
|
-
return /* @__PURE__ */
|
|
3889
|
-
/* @__PURE__ */
|
|
4165
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
4166
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3890
4167
|
FocusScope,
|
|
3891
4168
|
{
|
|
3892
4169
|
asChild: true,
|
|
@@ -3894,7 +4171,7 @@ var DialogContentImpl = React__namespace.forwardRef(
|
|
|
3894
4171
|
trapped: trapFocus,
|
|
3895
4172
|
onMountAutoFocus: onOpenAutoFocus,
|
|
3896
4173
|
onUnmountAutoFocus: onCloseAutoFocus,
|
|
3897
|
-
children: /* @__PURE__ */
|
|
4174
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3898
4175
|
DismissableLayer,
|
|
3899
4176
|
{
|
|
3900
4177
|
role: "dialog",
|
|
@@ -3909,9 +4186,9 @@ var DialogContentImpl = React__namespace.forwardRef(
|
|
|
3909
4186
|
)
|
|
3910
4187
|
}
|
|
3911
4188
|
),
|
|
3912
|
-
/* @__PURE__ */
|
|
3913
|
-
/* @__PURE__ */
|
|
3914
|
-
/* @__PURE__ */
|
|
4189
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
4190
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TitleWarning, { titleId: context.titleId }),
|
|
4191
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
3915
4192
|
] })
|
|
3916
4193
|
] });
|
|
3917
4194
|
}
|
|
@@ -3921,7 +4198,7 @@ var DialogTitle = React__namespace.forwardRef(
|
|
|
3921
4198
|
(props, forwardedRef) => {
|
|
3922
4199
|
const { __scopeDialog, ...titleProps } = props;
|
|
3923
4200
|
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
3924
|
-
return /* @__PURE__ */
|
|
4201
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
3925
4202
|
}
|
|
3926
4203
|
);
|
|
3927
4204
|
DialogTitle.displayName = TITLE_NAME;
|
|
@@ -3930,7 +4207,7 @@ var DialogDescription = React__namespace.forwardRef(
|
|
|
3930
4207
|
(props, forwardedRef) => {
|
|
3931
4208
|
const { __scopeDialog, ...descriptionProps } = props;
|
|
3932
4209
|
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
3933
|
-
return /* @__PURE__ */
|
|
4210
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
3934
4211
|
}
|
|
3935
4212
|
);
|
|
3936
4213
|
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
@@ -3939,7 +4216,7 @@ var DialogClose = React__namespace.forwardRef(
|
|
|
3939
4216
|
(props, forwardedRef) => {
|
|
3940
4217
|
const { __scopeDialog, ...closeProps } = props;
|
|
3941
4218
|
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
3942
|
-
return /* @__PURE__ */
|
|
4219
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3943
4220
|
Primitive.button,
|
|
3944
4221
|
{
|
|
3945
4222
|
type: "button",
|
|
@@ -4008,26 +4285,26 @@ const BannerContent = ({
|
|
|
4008
4285
|
const { onSave, onDeclineAll, selectionTaken } = useSelection();
|
|
4009
4286
|
const [openItem, setOpenItem] = React.useState(void 0);
|
|
4010
4287
|
const [settingsOpen, setSettingsOpen] = React.useState(defaultSettingsOpen);
|
|
4011
|
-
return /* @__PURE__ */
|
|
4288
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Root, { open: !selectionTaken, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4012
4289
|
Content,
|
|
4013
4290
|
{
|
|
4014
4291
|
className: cls(classes$2.root, noTarget2 ? classes$2.noTarget : ""),
|
|
4015
|
-
children: /* @__PURE__ */
|
|
4292
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
4016
4293
|
Root$2,
|
|
4017
4294
|
{
|
|
4018
4295
|
open: settingsOpen,
|
|
4019
4296
|
onOpenChange: setSettingsOpen,
|
|
4020
4297
|
className: classes$2.collapsible,
|
|
4021
4298
|
children: [
|
|
4022
|
-
/* @__PURE__ */
|
|
4023
|
-
/* @__PURE__ */
|
|
4024
|
-
/* @__PURE__ */
|
|
4025
|
-
/* @__PURE__ */
|
|
4299
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes$2.header, children: [
|
|
4300
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes$2.heading, children: [
|
|
4301
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Title, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { weight: "bold", children: heading2 }) }),
|
|
4302
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Description, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { size: "caption", color: "muted", children: subheading }) })
|
|
4026
4303
|
] }),
|
|
4027
|
-
/* @__PURE__ */
|
|
4304
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { variant: "ghost", children: [
|
|
4028
4305
|
settingsOpen ? hideLabel : selectLabel,
|
|
4029
4306
|
" ",
|
|
4030
|
-
/* @__PURE__ */
|
|
4307
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4031
4308
|
ChevronUp,
|
|
4032
4309
|
{
|
|
4033
4310
|
size: 12,
|
|
@@ -4039,29 +4316,29 @@ const BannerContent = ({
|
|
|
4039
4316
|
)
|
|
4040
4317
|
] }) })
|
|
4041
4318
|
] }),
|
|
4042
|
-
/* @__PURE__ */
|
|
4319
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4043
4320
|
Content$1,
|
|
4044
4321
|
{
|
|
4045
4322
|
className: clx({
|
|
4046
4323
|
[classes$2.settings]: true
|
|
4047
4324
|
}),
|
|
4048
|
-
children: /* @__PURE__ */
|
|
4325
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4049
4326
|
Root2,
|
|
4050
4327
|
{
|
|
4051
4328
|
type: "single",
|
|
4052
4329
|
collapsible: true,
|
|
4053
4330
|
value: openItem,
|
|
4054
4331
|
onValueChange: setOpenItem,
|
|
4055
|
-
children: items.map((item) => /* @__PURE__ */
|
|
4332
|
+
children: items.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(BannerItem, { ...item, openItem }, item.value))
|
|
4056
4333
|
}
|
|
4057
4334
|
)
|
|
4058
4335
|
}
|
|
4059
4336
|
),
|
|
4060
|
-
/* @__PURE__ */
|
|
4061
|
-
/* @__PURE__ */
|
|
4062
|
-
/* @__PURE__ */
|
|
4063
|
-
/* @__PURE__ */
|
|
4064
|
-
/* @__PURE__ */
|
|
4337
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes$2.footer, children: [
|
|
4338
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classes$2.legal, children: privacyPolicy && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { size: "caption", children: /* @__PURE__ */ jsxRuntimeExports.jsx("a", { href: privacyPolicy.url, target: "_blank", children: privacyPolicy.label }) }) }),
|
|
4339
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes$2.actions, children: [
|
|
4340
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Close, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "neutral", onClick: () => onDeclineAll(), children: declineLabel }) }),
|
|
4341
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Close, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "brand", onClick: () => onSave(), children: saveLabel }) })
|
|
4065
4342
|
] })
|
|
4066
4343
|
] })
|
|
4067
4344
|
]
|
|
@@ -4084,6 +4361,6 @@ const Banner = ({
|
|
|
4084
4361
|
})),
|
|
4085
4362
|
[items]
|
|
4086
4363
|
);
|
|
4087
|
-
return /* @__PURE__ */
|
|
4364
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SelectionProvider, { items: selectionItems, localStorageKey, children: /* @__PURE__ */ jsxRuntimeExports.jsx(BannerContent, { items, ...rest }) });
|
|
4088
4365
|
};
|
|
4089
4366
|
exports.Banner = Banner;
|