welcome-ui 8.0.0 → 8.0.3
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/AXB53BZF-BOEe01VW.mjs +25 -0
- package/dist/Accordion.mjs +17 -17
- package/dist/Alert.mjs +19 -19
- package/dist/{BYC7LY2E-CVjUW1dr.mjs → BYC7LY2E-B1IDizRs.mjs} +298 -295
- package/dist/Badge.mjs +1 -1
- package/dist/Breadcrumb.mjs +27 -26
- package/dist/Button.mjs +2 -2
- package/dist/Checkbox.mjs +1 -1
- package/dist/{CustomInput-D_13Gd_3.mjs → CustomInput-IA_gVoXd.mjs} +2991 -2859
- package/dist/DatePicker.mjs +4 -4
- package/dist/DateTimePicker.mjs +9 -9
- package/dist/DateTimePickerCommon.mjs +1 -1
- package/dist/Drawer.mjs +7 -7
- package/dist/DropdownMenu.mjs +262 -262
- package/dist/Field.mjs +25 -25
- package/dist/FileDrop.mjs +273 -267
- package/dist/FileUpload.mjs +26 -26
- package/dist/Files.mjs +1 -1
- package/dist/Hint.mjs +1 -1
- package/dist/{ITI7HKP4-BONrZ9Pq.mjs → ITI7HKP4-EL9KXYBU.mjs} +150 -150
- package/dist/Icons.mjs +88 -88
- package/dist/IconsFont.mjs +159 -159
- package/dist/InputText.mjs +1 -1
- package/dist/{JC64G2H7-Dey-8h60.mjs → JC64G2H7-BzklVBKM.mjs} +70 -70
- package/dist/KUU7WJ55-CS4NemC6.mjs +61 -0
- package/dist/{LVA2YJMS-qFC9J-lt.mjs → LVA2YJMS-DDEmK0pp.mjs} +491 -488
- package/dist/Label.mjs +2 -2
- package/dist/Link.mjs +3 -3
- package/dist/MTZPJQMC-CMjAwC0N.mjs +15 -0
- package/dist/Modal.mjs +13 -13
- package/dist/NLEBE274-QOMV1l7e.mjs +84 -0
- package/dist/P2CTZE2T-Cl2w7OLV.mjs +300 -0
- package/dist/P4IRICAX-DezbJY4s.mjs +37 -0
- package/dist/Pagination.mjs +22 -22
- package/dist/Picker.mjs +2 -2
- package/dist/Popover.mjs +2 -2
- package/dist/QYJ6MIDR-Bb0O5xUM.mjs +97 -0
- package/dist/Radio.mjs +18 -18
- package/dist/RadioGroup.mjs +15 -15
- package/dist/RadioTab.mjs +9 -9
- package/dist/{SYRFVSLH-cVmYtx36.mjs → SYRFVSLH-jn06-eLy.mjs} +17 -17
- package/dist/Search.mjs +2 -2
- package/dist/Select.mjs +719 -716
- package/dist/Shape.mjs +1 -1
- package/dist/Slider.mjs +1 -1
- package/dist/Swiper.mjs +284 -278
- package/dist/Tabs.mjs +128 -128
- package/dist/Tag.mjs +16 -16
- package/dist/Text.mjs +1 -1
- package/dist/Textarea.mjs +4 -4
- package/dist/TimePicker.mjs +6 -6
- package/dist/Toast.mjs +69 -69
- package/dist/Toggle.mjs +2 -2
- package/dist/Tooltip.mjs +60 -60
- package/dist/UniversalLink.mjs +8 -8
- package/dist/VEVQD5MH-CuegL0m0.mjs +20 -0
- package/dist/{VGCJ63VH-B39w1tBw.mjs → VGCJ63VH-BMzoZtCu.mjs} +31 -33
- package/dist/VariantIcon.mjs +4 -4
- package/dist/WelcomeLoader.mjs +4862 -9223
- package/dist/X5NMLKT6-CvSCix-_.mjs +25 -0
- package/dist/YV4JVR4I-Bh7B7TET.mjs +344 -0
- package/dist/downshift.esm-D0ns_SQs.mjs +1082 -0
- package/dist/{field-styles-DLIhqG_8.mjs → field-styles-CfVLcVQp.mjs} +1 -1
- package/dist/{index-BDeIsk2X.mjs → index-5PUh49rV.mjs} +56 -56
- package/dist/{index-DEJJvyGk.mjs → index-B0gDDiFm.mjs} +7 -7
- package/dist/{index-CExLVjET.mjs → index-B22SHR8h.mjs} +4 -4
- package/dist/index-BhcLigYU.mjs +77 -0
- package/dist/{index-BJAZgeHL.mjs → index-Bkl89twW.mjs} +4 -4
- package/dist/{index-BYdkhqH4.mjs → index-CBBbX29m.mjs} +3652 -3584
- package/dist/{index-BpRjq7lj.mjs → index-CQD9fgf_.mjs} +3 -3
- package/dist/{index-BRDOakbf.mjs → index-CmsWSKKs.mjs} +5 -5
- package/dist/{index-SbQUT2mU.mjs → index-DgSynio4.mjs} +244 -239
- package/dist/{index-BrfXjmHY.mjs → index-wr_b5GSV.mjs} +6 -6
- package/dist/radio-group-RFyDp0KD.mjs +51 -0
- package/dist/theme.mjs +670 -615
- package/dist/{use-viewport-m3glsbna.mjs → use-viewport-CfklieD-.mjs} +5 -5
- package/dist/utils.mjs +29 -91
- package/package.json +13 -13
- package/dist/AXB53BZF-CGoc4K3d.mjs +0 -25
- package/dist/KUU7WJ55-3sP-w1F1.mjs +0 -61
- package/dist/MTZPJQMC-C0Xe_WK4.mjs +0 -13
- package/dist/NLEBE274-C94QU78N.mjs +0 -84
- package/dist/P2CTZE2T-YPes1GXe.mjs +0 -297
- package/dist/P4IRICAX-DzXqUYe-.mjs +0 -37
- package/dist/QYJ6MIDR-BLLqyXdd.mjs +0 -97
- package/dist/VEVQD5MH-ZMnHV8ZJ.mjs +0 -20
- package/dist/X5NMLKT6-uFSu0Lii.mjs +0 -25
- package/dist/YV4JVR4I-BGfUf3Nu.mjs +0 -341
- package/dist/downshift.esm-CEHW4VDy.mjs +0 -1085
- package/dist/radio-group-CGC6DTFJ.mjs +0 -51
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { u as
|
|
2
|
+
import { useState as n } from "react";
|
|
3
|
+
import { u as o } from "./use-isomorphic-layout-effect-Izr-e2pi.mjs";
|
|
4
4
|
function w() {
|
|
5
|
-
const [
|
|
6
|
-
return
|
|
5
|
+
const [t, e] = n({ height: void 0, width: void 0 });
|
|
6
|
+
return o(() => {
|
|
7
7
|
e({ width: window.innerWidth, height: window.innerHeight });
|
|
8
8
|
function i() {
|
|
9
9
|
e({ width: window.innerWidth, height: window.innerHeight });
|
|
10
10
|
}
|
|
11
11
|
return window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
|
|
12
|
-
}, []),
|
|
12
|
+
}, []), t;
|
|
13
13
|
}
|
|
14
14
|
export {
|
|
15
15
|
w as u
|
package/dist/utils.mjs
CHANGED
|
@@ -1,95 +1,33 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { f as
|
|
3
|
-
import { h as
|
|
4
|
-
import { F as
|
|
5
|
-
import { o as
|
|
6
|
-
import { t as
|
|
7
|
-
import { useState as
|
|
8
|
-
import {
|
|
9
|
-
import { s as
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
r
|
|
19
|
-
|
|
20
|
-
case "INPUT":
|
|
21
|
-
case "TEXTAREA":
|
|
22
|
-
t.blur();
|
|
23
|
-
break;
|
|
24
|
-
default:
|
|
25
|
-
t = null;
|
|
26
|
-
break;
|
|
27
|
-
}
|
|
28
|
-
return e.removeAllRanges(), function() {
|
|
29
|
-
e.type === "Caret" && e.removeAllRanges(), e.rangeCount || r.forEach(function(c) {
|
|
30
|
-
e.addRange(c);
|
|
31
|
-
}), t && t.focus();
|
|
32
|
-
};
|
|
33
|
-
}, v = g, f = {
|
|
34
|
-
"text/plain": "Text",
|
|
35
|
-
"text/html": "Url",
|
|
36
|
-
default: "Text"
|
|
37
|
-
}, b = "Copy to clipboard: #{key}, Enter";
|
|
38
|
-
function C(e) {
|
|
39
|
-
var t = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
|
|
40
|
-
return e.replace(/#{\s*key\s*}/g, t);
|
|
41
|
-
}
|
|
42
|
-
function x(e, t) {
|
|
43
|
-
var r, o, c, n, s, a, i = !1;
|
|
44
|
-
t || (t = {}), r = t.debug || !1;
|
|
45
|
-
try {
|
|
46
|
-
c = v(), n = document.createRange(), s = document.getSelection(), a = document.createElement("span"), a.textContent = e, a.ariaHidden = "true", a.style.all = "unset", a.style.position = "fixed", a.style.top = 0, a.style.clip = "rect(0, 0, 0, 0)", a.style.whiteSpace = "pre", a.style.webkitUserSelect = "text", a.style.MozUserSelect = "text", a.style.msUserSelect = "text", a.style.userSelect = "text", a.addEventListener("copy", function(l) {
|
|
47
|
-
if (l.stopPropagation(), t.format)
|
|
48
|
-
if (l.preventDefault(), typeof l.clipboardData > "u") {
|
|
49
|
-
r && console.warn("unable to use e.clipboardData"), r && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
|
|
50
|
-
var u = f[t.format] || f.default;
|
|
51
|
-
window.clipboardData.setData(u, e);
|
|
52
|
-
} else
|
|
53
|
-
l.clipboardData.clearData(), l.clipboardData.setData(t.format, e);
|
|
54
|
-
t.onCopy && (l.preventDefault(), t.onCopy(l.clipboardData));
|
|
55
|
-
}), document.body.appendChild(a), n.selectNodeContents(a), s.addRange(n);
|
|
56
|
-
var p = document.execCommand("copy");
|
|
57
|
-
if (!p)
|
|
58
|
-
throw new Error("copy command was unsuccessful");
|
|
59
|
-
i = !0;
|
|
60
|
-
} catch (l) {
|
|
61
|
-
r && console.error("unable to copy using execCommand: ", l), r && console.warn("trying IE specific stuff");
|
|
62
|
-
try {
|
|
63
|
-
window.clipboardData.setData(t.format || "text", e), t.onCopy && t.onCopy(window.clipboardData), i = !0;
|
|
64
|
-
} catch (u) {
|
|
65
|
-
r && console.error("unable to copy using clipboardData: ", u), r && console.error("falling back to prompt"), o = C("message" in t ? t.message : b), window.prompt(o, e);
|
|
66
|
-
}
|
|
67
|
-
} finally {
|
|
68
|
-
s && (typeof s.removeRange == "function" ? s.removeRange(n) : s.removeAllRanges()), a && document.body.removeChild(a), c();
|
|
69
|
-
}
|
|
70
|
-
return i;
|
|
71
|
-
}
|
|
72
|
-
var w = x;
|
|
73
|
-
const D = /* @__PURE__ */ y(w);
|
|
74
|
-
function S(e, t) {
|
|
75
|
-
const [r, o] = d();
|
|
76
|
-
return [m(() => {
|
|
77
|
-
let n;
|
|
78
|
-
typeof e == "number" || typeof e == "string" ? n = e.toString() : e.current instanceof HTMLInputElement ? n = e.current.value : e.current instanceof HTMLElement && (n = e.current.textContent);
|
|
79
|
-
const s = D(n);
|
|
80
|
-
o(s), t && setTimeout(o, t);
|
|
81
|
-
}, [e, t]), r];
|
|
2
|
+
import { f as y } from "./format-bytes-gST0dTWd.mjs";
|
|
3
|
+
import { h as C } from "./hex-to-rgba-BIDK-3ab.mjs";
|
|
4
|
+
import { F as S, d as T } from "./field-styles-CfVLcVQp.mjs";
|
|
5
|
+
import { o as h } from "./overflow-ellipsis-DGV5Kgt-.mjs";
|
|
6
|
+
import { t as L } from "./throttle-BDBzFeFj.mjs";
|
|
7
|
+
import { useState as p, useCallback as a } from "react";
|
|
8
|
+
import { c as i } from "./index-BhcLigYU.mjs";
|
|
9
|
+
import { s as g, u as v } from "./use-fork-ref-CUZErtAC.mjs";
|
|
10
|
+
import { u as k } from "./use-isomorphic-layout-effect-Izr-e2pi.mjs";
|
|
11
|
+
import { u as B } from "./use-viewport-CfklieD-.mjs";
|
|
12
|
+
function c(e, r) {
|
|
13
|
+
const [s, t] = p();
|
|
14
|
+
return [a(() => {
|
|
15
|
+
let o;
|
|
16
|
+
typeof e == "number" || typeof e == "string" ? o = e.toString() : e.current instanceof HTMLInputElement ? o = e.current.value : e.current instanceof HTMLElement && (o = e.current.textContent);
|
|
17
|
+
const f = i(o);
|
|
18
|
+
t(f), r && setTimeout(t, r);
|
|
19
|
+
}, [e, r]), s];
|
|
82
20
|
}
|
|
83
21
|
export {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
22
|
+
S as FIELD_ICON_SIZE,
|
|
23
|
+
T as defaultFieldStyles,
|
|
24
|
+
y as formatBytes,
|
|
25
|
+
C as hexToRGBA,
|
|
26
|
+
h as overflowEllipsis,
|
|
27
|
+
g as setRef,
|
|
28
|
+
L as throttle,
|
|
29
|
+
c as useCopyText,
|
|
30
|
+
v as useForkRef,
|
|
31
|
+
k as useIsomorphicLayoutEffect,
|
|
32
|
+
B as useViewportSize
|
|
95
33
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "welcome-ui",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.3",
|
|
4
4
|
"description": "Customizable design system with react • styled-components • styled-system and ariakit.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
"import": "./dist/utils.mjs",
|
|
18
18
|
"require": "./dist/utils.mjs"
|
|
19
19
|
},
|
|
20
|
+
"./*.d.ts": {
|
|
21
|
+
"types": "./*.d.ts"
|
|
22
|
+
},
|
|
20
23
|
"./*": {
|
|
21
24
|
"types": "./dist/types/components/*/index.d.ts",
|
|
22
25
|
"import": "./dist/*.mjs",
|
|
@@ -26,7 +29,7 @@
|
|
|
26
29
|
"scripts": {
|
|
27
30
|
"start": "vite build --watch",
|
|
28
31
|
"build": "vite build",
|
|
29
|
-
"test": "
|
|
32
|
+
"test": "vitest"
|
|
30
33
|
},
|
|
31
34
|
"repository": {
|
|
32
35
|
"type": "git",
|
|
@@ -51,8 +54,8 @@
|
|
|
51
54
|
},
|
|
52
55
|
"dependencies": {
|
|
53
56
|
"@ariakit/react": "0.4.15",
|
|
54
|
-
"@juggle/resize-observer": "^3.4.0",
|
|
55
57
|
"@emotion/is-prop-valid": "^1.3.1",
|
|
58
|
+
"@juggle/resize-observer": "^3.4.0",
|
|
56
59
|
"copy-to-clipboard": "^3.3.3",
|
|
57
60
|
"date-fns": "^4.1.0",
|
|
58
61
|
"downshift": "^7.4.1",
|
|
@@ -68,7 +71,7 @@
|
|
|
68
71
|
},
|
|
69
72
|
"devDependencies": {
|
|
70
73
|
"@babel/cli": "7.25.9",
|
|
71
|
-
"@babel/core": "7.
|
|
74
|
+
"@babel/core": "7.26.10",
|
|
72
75
|
"@babel/eslint-parser": "^7.25.1",
|
|
73
76
|
"@babel/plugin-proposal-class-properties": "7.18.6",
|
|
74
77
|
"@babel/plugin-proposal-optional-chaining": "7.21.0",
|
|
@@ -81,7 +84,6 @@
|
|
|
81
84
|
"@testing-library/jest-dom": "^6.6.3",
|
|
82
85
|
"@testing-library/react": "^16.2.0",
|
|
83
86
|
"@testing-library/user-event": "^14.6.1",
|
|
84
|
-
"@types/jest": "^29.5.13",
|
|
85
87
|
"@types/lodash.capitalize": "^4.2.9",
|
|
86
88
|
"@types/lodash.debounce": "^4.0.6",
|
|
87
89
|
"@types/lodash.range": "^3.2.9",
|
|
@@ -91,24 +93,22 @@
|
|
|
91
93
|
"@types/react-datepicker": "^4.15.0",
|
|
92
94
|
"@types/react-dom": "18.3.1",
|
|
93
95
|
"@xstyled/styled-components": "^4.0.0",
|
|
94
|
-
"babel-jest": "^29.7.0",
|
|
95
96
|
"babel-plugin-annotate-pure-calls": "^0.4.0",
|
|
96
97
|
"babel-plugin-styled-components": "^2.1.4",
|
|
97
98
|
"babel-plugin-transform-async-to-promises": "^0.8.18",
|
|
98
99
|
"babel-preset-vite": "^1.1.3",
|
|
99
|
-
"
|
|
100
|
-
"jest-environment-jsdom": "^29.7.0",
|
|
101
|
-
"jest-styled-components": "7.2.0",
|
|
100
|
+
"jsdom": "^26.0.0",
|
|
102
101
|
"ramda": "^0.30.1",
|
|
103
102
|
"react": "^18.3.1",
|
|
104
103
|
"release-it": "^18.1.2",
|
|
105
104
|
"rollup-preserve-directives": "^1.1.3",
|
|
106
105
|
"styled-components": "^6.1.15",
|
|
107
106
|
"typescript": "^5.6.3",
|
|
108
|
-
"vite": "^
|
|
109
|
-
"vite-plugin-dts": "^4.3
|
|
110
|
-
"vite-plugin-static-copy": "^2.
|
|
111
|
-
"
|
|
107
|
+
"vite": "^6.2.1",
|
|
108
|
+
"vite-plugin-dts": "^4.5.3",
|
|
109
|
+
"vite-plugin-static-copy": "^2.3.0",
|
|
110
|
+
"vitest": "^3.0.8",
|
|
111
|
+
"wttj-config": "3.1.2"
|
|
112
112
|
},
|
|
113
113
|
"peerDependencies": {
|
|
114
114
|
"@xstyled/styled-components": "^4.0.0",
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { u } from "./P4IRICAX-DzXqUYe-.mjs";
|
|
3
|
-
import { a as c } from "./VGCJ63VH-B39w1tBw.mjs";
|
|
4
|
-
import { c as l, _ as p, i as D, g as a, s as m, f as g, h as v } from "./LVA2YJMS-qFC9J-lt.mjs";
|
|
5
|
-
var f = "button", d = l(
|
|
6
|
-
function(r) {
|
|
7
|
-
var s = r, { store: o } = s, e = p(s, ["store"]);
|
|
8
|
-
const i = c();
|
|
9
|
-
o = o || i, D(
|
|
10
|
-
o,
|
|
11
|
-
process.env.NODE_ENV !== "production" && "DialogDisclosure must receive a `store` prop or be wrapped in a DialogProvider component."
|
|
12
|
-
);
|
|
13
|
-
const n = o.useState("contentElement");
|
|
14
|
-
return e = a({
|
|
15
|
-
"aria-haspopup": m(n, "dialog")
|
|
16
|
-
}, e), e = u(a({ store: o }, e)), e;
|
|
17
|
-
}
|
|
18
|
-
), P = g(function(r) {
|
|
19
|
-
const s = d(r);
|
|
20
|
-
return v(f, s);
|
|
21
|
-
});
|
|
22
|
-
export {
|
|
23
|
-
P as D,
|
|
24
|
-
d as u
|
|
25
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { c as F, _ as d, k as p, l as I, a as O, b as N, m as x, n as Y, o as j, q as H, p as _, d as L, e as V, g as T, r as z, f as G, h as J } from "./LVA2YJMS-qFC9J-lt.mjs";
|
|
3
|
-
import { useRef as C, useState as D, useEffect as Q } from "react";
|
|
4
|
-
var W = "button";
|
|
5
|
-
function M(n) {
|
|
6
|
-
if (!n.isTrusted) return !1;
|
|
7
|
-
const t = n.currentTarget;
|
|
8
|
-
return n.key === "Enter" ? p(t) || t.tagName === "SUMMARY" || t.tagName === "A" : n.key === " " ? p(t) || t.tagName === "SUMMARY" || t.tagName === "INPUT" || t.tagName === "SELECT" : !1;
|
|
9
|
-
}
|
|
10
|
-
var X = Symbol("command"), Z = F(
|
|
11
|
-
function(t) {
|
|
12
|
-
var a = t, { clickOnEnter: m = !0, clickOnSpace: o = !0 } = a, r = d(a, ["clickOnEnter", "clickOnSpace"]);
|
|
13
|
-
const c = C(null), [K, R] = D(!1);
|
|
14
|
-
Q(() => {
|
|
15
|
-
c.current && R(p(c.current));
|
|
16
|
-
}, []);
|
|
17
|
-
const [w, k] = D(!1), f = C(!1), y = I(r), [E, U] = O(r, X, !0), g = r.onKeyDown, v = N((e) => {
|
|
18
|
-
g == null || g(e);
|
|
19
|
-
const s = e.currentTarget;
|
|
20
|
-
if (e.defaultPrevented || E || y || !x(e) || Y(s) || s.isContentEditable) return;
|
|
21
|
-
const u = m && e.key === "Enter", i = o && e.key === " ", l = e.key === "Enter" && !m, q = e.key === " " && !o;
|
|
22
|
-
if (l || q) {
|
|
23
|
-
e.preventDefault();
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
if (u || i) {
|
|
27
|
-
const b = M(e);
|
|
28
|
-
if (u) {
|
|
29
|
-
if (!b) {
|
|
30
|
-
e.preventDefault();
|
|
31
|
-
const A = e, B = d(A, ["view"]), S = () => _(s, B);
|
|
32
|
-
j() ? H(s, "keyup", S) : queueMicrotask(S);
|
|
33
|
-
}
|
|
34
|
-
} else i && (f.current = !0, b || (e.preventDefault(), k(!0)));
|
|
35
|
-
}
|
|
36
|
-
}), P = r.onKeyUp, h = N((e) => {
|
|
37
|
-
if (P == null || P(e), e.defaultPrevented || E || y || e.metaKey) return;
|
|
38
|
-
const s = o && e.key === " ";
|
|
39
|
-
if (f.current && s && (f.current = !1, !M(e))) {
|
|
40
|
-
e.preventDefault(), k(!1);
|
|
41
|
-
const u = e.currentTarget, i = e, l = d(i, ["view"]);
|
|
42
|
-
queueMicrotask(() => _(u, l));
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
return r = L(T(T({
|
|
46
|
-
"data-active": w || void 0,
|
|
47
|
-
type: K ? "button" : void 0
|
|
48
|
-
}, U), r), {
|
|
49
|
-
ref: V(c, r.ref),
|
|
50
|
-
onKeyDown: v,
|
|
51
|
-
onKeyUp: h
|
|
52
|
-
}), r = z(r), r;
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
G(function(t) {
|
|
56
|
-
const a = Z(t);
|
|
57
|
-
return J(W, a);
|
|
58
|
-
});
|
|
59
|
-
export {
|
|
60
|
-
Z as u
|
|
61
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { D as e, c as r } from "./VGCJ63VH-B39w1tBw.mjs";
|
|
3
|
-
import { v as t } from "./LVA2YJMS-qFC9J-lt.mjs";
|
|
4
|
-
var o = t(
|
|
5
|
-
[r],
|
|
6
|
-
[e]
|
|
7
|
-
), i = o.useContext, x = o.useProviderContext, P = o.ContextProvider, n = o.ScopedContextProvider;
|
|
8
|
-
export {
|
|
9
|
-
n as P,
|
|
10
|
-
P as a,
|
|
11
|
-
i as b,
|
|
12
|
-
x as u
|
|
13
|
-
};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { C as U, a as A, u as T } from "./P2CTZE2T-YPes1GXe.mjs";
|
|
3
|
-
import { v as j, c as w, w as z, f as D, _ as H, x as M, j as O, l as $, y as q, b as p, d as B, e as G, g as m, z as J, h as K } from "./LVA2YJMS-qFC9J-lt.mjs";
|
|
4
|
-
import { u as L } from "./YV4JVR4I-BGfUf3Nu.mjs";
|
|
5
|
-
import { useRef as Q, useEffect as R } from "react";
|
|
6
|
-
var v = j(
|
|
7
|
-
[A],
|
|
8
|
-
[U]
|
|
9
|
-
), V = v.useContext, re = v.useProviderContext, oe = v.ScopedContextProvider, k = "input";
|
|
10
|
-
function W(d, r) {
|
|
11
|
-
if (r !== void 0)
|
|
12
|
-
return d != null && r != null ? r === d : !!r;
|
|
13
|
-
}
|
|
14
|
-
function X(d, r) {
|
|
15
|
-
return d === "input" && (!r || r === "radio");
|
|
16
|
-
}
|
|
17
|
-
var Y = w(function(r) {
|
|
18
|
-
var s = r, {
|
|
19
|
-
store: n,
|
|
20
|
-
name: c,
|
|
21
|
-
value: i,
|
|
22
|
-
checked: C
|
|
23
|
-
} = s, t = H(s, [
|
|
24
|
-
"store",
|
|
25
|
-
"name",
|
|
26
|
-
"value",
|
|
27
|
-
"checked"
|
|
28
|
-
]);
|
|
29
|
-
const x = V();
|
|
30
|
-
n = n || x;
|
|
31
|
-
const u = M(t.id), f = Q(null), a = L(
|
|
32
|
-
n,
|
|
33
|
-
(e) => C ?? W(i, e == null ? void 0 : e.value)
|
|
34
|
-
);
|
|
35
|
-
R(() => {
|
|
36
|
-
!u || !a || (n == null ? void 0 : n.getState().activeId) === u || n == null || n.setActiveId(u);
|
|
37
|
-
}, [n, a, u]);
|
|
38
|
-
const P = t.onChange, S = O(f, k), o = X(S, t.type), I = $(t), [_, b] = q();
|
|
39
|
-
R(() => {
|
|
40
|
-
const e = f.current;
|
|
41
|
-
e && (o || (a !== void 0 && (e.checked = a), c !== void 0 && (e.name = c), i !== void 0 && (e.value = `${i}`)));
|
|
42
|
-
}, [_, o, a, c, i]);
|
|
43
|
-
const l = p((e) => {
|
|
44
|
-
if (I) {
|
|
45
|
-
e.preventDefault(), e.stopPropagation();
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
(n == null ? void 0 : n.getState().value) !== i && (o || (e.currentTarget.checked = !0, b()), P == null || P(e), !e.defaultPrevented && (n == null || n.setValue(i)));
|
|
49
|
-
}), g = t.onClick, F = p((e) => {
|
|
50
|
-
g == null || g(e), !e.defaultPrevented && (o || l(e));
|
|
51
|
-
}), h = t.onFocus, y = p((e) => {
|
|
52
|
-
if (h == null || h(e), e.defaultPrevented || !o || !n) return;
|
|
53
|
-
const { moves: E, activeId: N } = n.getState();
|
|
54
|
-
E && (u && N !== u || l(e));
|
|
55
|
-
});
|
|
56
|
-
return t = B(m({
|
|
57
|
-
id: u,
|
|
58
|
-
role: o ? void 0 : "radio",
|
|
59
|
-
type: o ? "radio" : void 0,
|
|
60
|
-
"aria-checked": a
|
|
61
|
-
}, t), {
|
|
62
|
-
ref: G(f, t.ref),
|
|
63
|
-
onChange: l,
|
|
64
|
-
onClick: F,
|
|
65
|
-
onFocus: y
|
|
66
|
-
}), t = T(m({
|
|
67
|
-
store: n,
|
|
68
|
-
clickOnEnter: !o
|
|
69
|
-
}, t)), J(m({
|
|
70
|
-
name: o ? c : void 0,
|
|
71
|
-
value: o ? i : void 0,
|
|
72
|
-
checked: a
|
|
73
|
-
}, t));
|
|
74
|
-
}), ie = z(
|
|
75
|
-
D(function(r) {
|
|
76
|
-
const s = Y(r);
|
|
77
|
-
return K(k, s);
|
|
78
|
-
})
|
|
79
|
-
);
|
|
80
|
-
export {
|
|
81
|
-
ie as R,
|
|
82
|
-
oe as a,
|
|
83
|
-
re as u
|
|
84
|
-
};
|