@vokril/ui-solid 0.4.1 → 0.7.0
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/CHANGELOG.md +54 -0
- package/README.md +1 -1
- package/dist/{AttributeGrid-BUyv-hUX.js → AttributeGrid-CX_GJHgz.js} +2 -2
- package/dist/{AttributeGrid-Tk8KJx8e.cjs → AttributeGrid-X7fHuuIb.cjs} +1 -1
- package/dist/CommandPalette-C8JJMY79.cjs +2 -0
- package/dist/CommandPalette-Ds3xf2z7.js +3921 -0
- package/dist/{DateRangePicker-jnZfDhQA.js → DateRangePicker-BSb6F_gs.js} +3 -3
- package/dist/{DateRangePicker-CHrwr34H.cjs → DateRangePicker-DUrJJjO7.cjs} +1 -1
- package/dist/{GuidedTour-Be7OITLu.js → GuidedTour-C0Q_EEvI.js} +495 -491
- package/dist/{GuidedTour-CTHXtWoK.cjs → GuidedTour-CkGOxh2p.cjs} +10 -10
- package/dist/{IconPicker-C_gAGvo0.cjs → IconPicker-D2dZK0n3.cjs} +1 -1
- package/dist/{IconPicker-BxofGXCS.js → IconPicker-Fd2IE2Dm.js} +2 -2
- package/dist/Input-BEnk4FCF.cjs +1 -0
- package/dist/Input-PZ5wRvPx.js +227 -0
- package/dist/{Modal-BmtEt5Yo.js → Modal-CsiV55WW.js} +1 -1
- package/dist/{Modal-BSSY6C3D.cjs → Modal-DpDHzCWT.cjs} +1 -1
- package/dist/{Popover-Cg8LZCYo.js → Popover-C3dFuObM.js} +49 -45
- package/dist/Popover-Dbi7L860.cjs +1 -0
- package/dist/{SearchableSelect-ByCRBEZI.js → SearchableSelect-C6KL7e42.js} +2 -2
- package/dist/{SearchableSelect-9pgcO5JS.cjs → SearchableSelect-zT8XNpmt.cjs} +1 -1
- package/dist/{StatusBarNotificationBell-k_Ol9XDW.js → StatusBarNotificationBell-BMmjdBvj.js} +5 -5
- package/dist/{StatusBarNotificationBell-jmfcQw6Y.cjs → StatusBarNotificationBell-C8nQZh4i.cjs} +1 -1
- package/dist/{Stepper-CrTxBpDL.js → Stepper-B26aF0bA.js} +1 -1
- package/dist/{Stepper-C3dnwwiV.cjs → Stepper-Bl8P6HJx.cjs} +1 -1
- package/dist/Textarea-BUxibzkR.js +42 -0
- package/dist/Textarea-BunKEY68.cjs +1 -0
- package/dist/{ToggleButton-CFvMUndy.cjs → ToggleButton-DuKoI5PE.cjs} +1 -1
- package/dist/{ToggleButton-DBWFnm_R.js → ToggleButton-DwvUV2en.js} +6 -6
- package/dist/base.css +0 -1
- package/dist/{createResizableSidebar-uf_OJsjO.js → createResizableSidebar-B22SKv9b.js} +1 -1
- package/dist/{createResizableSidebar-DVATOkMf.cjs → createResizableSidebar-C3I0HSwo.cjs} +1 -1
- package/dist/desktop/index.cjs +1 -1
- package/dist/desktop/index.js +2 -2
- package/dist/{dialogFocusRestore-DKxaV82N.js → dialogFocusRestore-B4ggeVAM.js} +1 -1
- package/dist/{dialogFocusRestore-BAF8QM6v.cjs → dialogFocusRestore-BcMPrbig.cjs} +1 -1
- package/dist/format-Dih0q9gm.cjs +1 -0
- package/dist/{format-Dd946oS-.js → format-UGlMj0HW.js} +91 -88
- package/dist/forms/formFieldContext.d.cts +15 -0
- package/dist/forms/formFieldContext.d.ts +15 -0
- package/dist/forms/index.cjs +1 -1
- package/dist/forms/index.js +41 -40
- package/dist/grid/index.cjs +1 -1
- package/dist/grid/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +394 -383
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.js +2 -2
- package/dist/navigation/index.cjs +1 -1
- package/dist/navigation/index.js +1 -1
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.d.cts +1 -0
- package/dist/notifications/index.d.ts +1 -0
- package/dist/notifications/index.js +21 -20
- package/dist/overlay/DropdownMenu.d.cts +15 -1
- package/dist/overlay/DropdownMenu.d.ts +15 -1
- package/dist/overlay/index.cjs +1 -1
- package/dist/overlay/index.d.cts +1 -0
- package/dist/overlay/index.d.ts +1 -0
- package/dist/overlay/index.js +131 -122
- package/dist/overlay/menu/MenuParts.d.cts +121 -0
- package/dist/overlay/menu/MenuParts.d.ts +121 -0
- package/dist/overlay/menu/index.d.cts +2 -0
- package/dist/overlay/menu/index.d.ts +2 -0
- package/dist/overlay/menu/menuSurfaceClasses.d.cts +28 -0
- package/dist/overlay/menu/menuSurfaceClasses.d.ts +28 -0
- package/dist/overlay/overlayStack.d.cts +6 -0
- package/dist/overlay/overlayStack.d.ts +6 -0
- package/dist/overlay/popover/PopoverPanel.d.cts +103 -0
- package/dist/overlay/popover/PopoverPanel.d.ts +103 -0
- package/dist/overlay/popover/index.d.cts +2 -0
- package/dist/overlay/popover/index.d.ts +2 -0
- package/dist/overlay/popover/popoverFocusNavigation.d.cts +6 -2
- package/dist/overlay/popover/popoverFocusNavigation.d.ts +6 -2
- package/dist/overlay-stack/index.cjs +1 -1
- package/dist/overlay-stack/index.js +1 -1
- package/dist/overlayStack-DvGdPMdq.js +203 -0
- package/dist/overlayStack-DvKYN7SD.cjs +1 -0
- package/dist/server/{AttributeGrid-D6b2qQS9.js → AttributeGrid-BkWsx39p.js} +2 -2
- package/dist/server/{AttributeGrid-CSidAjfz.cjs → AttributeGrid-PHZKkiBG.cjs} +1 -1
- package/dist/server/CommandPalette-Bfm1R0KC.js +3181 -0
- package/dist/server/CommandPalette-DIgBGmAh.cjs +1 -0
- package/dist/server/{DateRangePicker-BK2Ul2uy.js → DateRangePicker-BOsd_ZH2.js} +3 -3
- package/dist/server/{DateRangePicker-s-I_rNUK.cjs → DateRangePicker-CIKghxMx.cjs} +1 -1
- package/dist/server/{GuidedTour-BW95cjPT.cjs → GuidedTour-B4IK-M3E.cjs} +9 -9
- package/dist/server/{GuidedTour-DW5y5xkJ.js → GuidedTour-BVaym9s9.js} +492 -488
- package/dist/server/{IconPicker-Bw8tZjCl.cjs → IconPicker-Bat7VYeo.cjs} +1 -1
- package/dist/server/{IconPicker-BCUZcq-i.js → IconPicker-Dw4tbosO.js} +2 -2
- package/dist/server/Input-CjvD8w18.cjs +1 -0
- package/dist/server/Input-DaEN2JJd.js +127 -0
- package/dist/server/{Modal-CM54uXRu.js → Modal-Jf89av-C.js} +2 -2
- package/dist/server/{Modal-R86Fb2mX.cjs → Modal-W2cb3Xrx.cjs} +1 -1
- package/dist/server/{Popover-CTnX42Jq.js → Popover-BRU2E-ek.js} +17 -13
- package/dist/server/Popover-C2VwtQyu.cjs +1 -0
- package/dist/server/{SearchableSelect-Cog_rb31.js → SearchableSelect-0dP7bp0a.js} +2 -2
- package/dist/server/{SearchableSelect-fofn1Bjg.cjs → SearchableSelect-nMecJAYS.cjs} +1 -1
- package/dist/server/{StatusBarNotificationBell-BqPU9Shw.js → StatusBarNotificationBell-DLrvONW3.js} +5 -5
- package/dist/server/{StatusBarNotificationBell-BolKvDik.cjs → StatusBarNotificationBell-DufUCZwN.cjs} +1 -1
- package/dist/server/{Stepper-BdOBuNco.js → Stepper-CJIoTXSv.js} +1 -1
- package/dist/server/{Stepper-DqwKOszc.cjs → Stepper-RFkjF_fm.cjs} +1 -1
- package/dist/server/Textarea-BQf2lL59.cjs +1 -0
- package/dist/server/Textarea-BTH48NET.js +37 -0
- package/dist/server/{ToggleButton-B0YuAGY4.js → ToggleButton-BAhucFQT.js} +6 -6
- package/dist/server/{ToggleButton-CbX1kbpI.cjs → ToggleButton-D9IXRIdl.cjs} +1 -1
- package/dist/server/{createResizableSidebar-D28fY_SX.cjs → createResizableSidebar-BymQA2Fs.cjs} +1 -1
- package/dist/server/{createResizableSidebar-BfTFOM7v.js → createResizableSidebar-IcXBM-BE.js} +1 -1
- package/dist/server/desktop/index.cjs +1 -1
- package/dist/server/desktop/index.js +2 -2
- package/dist/server/{dialogFocusRestore-DKxaV82N.js → dialogFocusRestore-B4ggeVAM.js} +1 -1
- package/dist/server/{dialogFocusRestore-BAF8QM6v.cjs → dialogFocusRestore-BcMPrbig.cjs} +1 -1
- package/dist/server/format-CW_FVfq2.js +385 -0
- package/dist/server/format-x-8syaS2.cjs +1 -0
- package/dist/server/forms/index.cjs +1 -1
- package/dist/server/forms/index.js +41 -40
- package/dist/server/grid/index.cjs +1 -1
- package/dist/server/grid/index.js +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +722 -711
- package/dist/server/layout/index.cjs +1 -1
- package/dist/server/layout/index.js +2 -2
- package/dist/server/navigation/index.cjs +1 -1
- package/dist/server/navigation/index.js +1 -1
- package/dist/server/notifications/index.cjs +1 -1
- package/dist/server/notifications/index.js +17 -16
- package/dist/server/overlay/index.cjs +1 -1
- package/dist/server/overlay/index.js +130 -121
- package/dist/server/overlay-stack/index.cjs +1 -1
- package/dist/server/overlay-stack/index.js +1 -1
- package/dist/server/overlayStack-DvGdPMdq.js +203 -0
- package/dist/server/overlayStack-DvKYN7SD.cjs +1 -0
- package/dist/server/{useFloatingDropdown-HD3G-ECb.js → useFloatingDropdown-BN4J092P.js} +1 -1
- package/dist/server/{useFloatingDropdown-vYQiMh6N.cjs → useFloatingDropdown-D9OvEFAp.cjs} +1 -1
- package/dist/solid/forms/Checkbox.jsx +5 -2
- package/dist/solid/forms/Input.jsx +5 -2
- package/dist/solid/forms/Textarea.jsx +5 -2
- package/dist/solid/forms/formFieldContext.js +7 -0
- package/dist/solid/notifications/index.js +1 -0
- package/dist/solid/overlay/DropdownMenu.jsx +48 -26
- package/dist/solid/overlay/DropdownMenu.module.css.js +1 -7
- package/dist/solid/overlay/index.js +1 -0
- package/dist/solid/overlay/menu/MenuParts.jsx +140 -0
- package/dist/solid/overlay/menu/MenuParts.module.css.js +34 -0
- package/dist/solid/overlay/menu/index.js +2 -0
- package/dist/solid/overlay/menu/menuSurfaceClasses.js +16 -0
- package/dist/solid/overlay/overlayStack.js +10 -3
- package/dist/solid/overlay/popover/Popover.jsx +1 -1
- package/dist/solid/overlay/popover/PopoverPanel.jsx +95 -0
- package/dist/solid/overlay/popover/PopoverPanel.module.css.js +22 -0
- package/dist/solid/overlay/popover/index.js +1 -0
- package/dist/solid/overlay/popover/popoverFocusNavigation.js +7 -1
- package/dist/solid/styles/menuSurface.module.css.js +17 -0
- package/dist/style.css +2 -2
- package/dist/theme.css +1 -1
- package/dist/tokens/tokens.css +1 -1
- package/dist/ui.css +1 -1
- package/dist/{useFloatingDropdown-CaQNfmfZ.js → useFloatingDropdown-CfPEYRut.js} +1 -1
- package/dist/{useFloatingDropdown-BKckfuUv.cjs → useFloatingDropdown-DcU7ozDg.cjs} +1 -1
- package/package.json +1 -1
- package/dist/CommandPalette-CIAqAbBE.cjs +0 -2
- package/dist/CommandPalette-l_vmlEnR.js +0 -3371
- package/dist/Input-BqiQPUxA.js +0 -215
- package/dist/Input-BrxV_Xcb.cjs +0 -1
- package/dist/Popover-B8ozGuDX.cjs +0 -1
- package/dist/Textarea-CXFZz3Oe.js +0 -36
- package/dist/Textarea-vl5fZzJa.cjs +0 -1
- package/dist/format-aHRZi12I.cjs +0 -1
- package/dist/overlayStack-BZR1emYS.cjs +0 -1
- package/dist/overlayStack-ND6EQZlX.js +0 -196
- package/dist/server/CommandPalette-9dL9DSG8.js +0 -2704
- package/dist/server/CommandPalette-Q296oZjU.cjs +0 -1
- package/dist/server/Input-Cxwc5CK4.js +0 -115
- package/dist/server/Input-k-IAQ5Wp.cjs +0 -1
- package/dist/server/Popover-BkZ9n6TA.cjs +0 -1
- package/dist/server/Textarea-DAoq3wWf.cjs +0 -1
- package/dist/server/Textarea-D_1mHXTj.js +0 -31
- package/dist/server/format-BWHKiXRe.cjs +0 -1
- package/dist/server/format-BubrMUMq.js +0 -382
- package/dist/server/overlayStack-BZR1emYS.cjs +0 -1
- package/dist/server/overlayStack-ND6EQZlX.js +0 -196
package/dist/Input-BqiQPUxA.js
DELETED
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import { use as w, spread as _, mergeProps as k, memo as m, insert as h, template as C } from "solid-js/web";
|
|
2
|
-
import { splitProps as I, createUniqueId as D, onCleanup as E, createContext as K, useContext as R } from "solid-js";
|
|
3
|
-
import { t as P } from "./tooltipCoordinator-GV0L9lXH.js";
|
|
4
|
-
import { i as T } from "./keys-Bfgdfak_.js";
|
|
5
|
-
const S = "vk_root_1DrgK", $ = "vk_appearancePlain_tlRDR", x = "vk_appearanceRow_z9L2i", O = "vk_appearanceCard_fBEzd", B = "vk_appearanceMedia_dauP0", u = {
|
|
6
|
-
root: S,
|
|
7
|
-
appearancePlain: $,
|
|
8
|
-
appearanceRow: x,
|
|
9
|
-
appearanceCard: O,
|
|
10
|
-
appearanceMedia: B
|
|
11
|
-
};
|
|
12
|
-
var q = /* @__PURE__ */ C("<div role=button>"), M = /* @__PURE__ */ C("<button>");
|
|
13
|
-
const N = {
|
|
14
|
-
plain: u.appearancePlain,
|
|
15
|
-
row: u.appearanceRow,
|
|
16
|
-
card: u.appearanceCard,
|
|
17
|
-
media: u.appearanceMedia
|
|
18
|
-
};
|
|
19
|
-
function ee(f) {
|
|
20
|
-
const [e, a] = I(f, ["appearance", "current", "selected", "type", "as", "disabled", "class", "classList", "children", "tooltip", "tooltipShortcut", "tooltipPlacement", "title", "aria-label", "ref", "onPointerEnter", "onPointerLeave", "onFocusIn", "onFocusOut", "onClick", "onKeyDown"]);
|
|
21
|
-
let t;
|
|
22
|
-
const v = D(), p = () => e.tooltip !== void 0 ? typeof e.tooltip == "function" ? e.tooltip() : e.tooltip : e.title, d = () => {
|
|
23
|
-
if (e["aria-label"] !== void 0)
|
|
24
|
-
return e["aria-label"];
|
|
25
|
-
const r = p();
|
|
26
|
-
if (r) return r;
|
|
27
|
-
}, s = () => {
|
|
28
|
-
const r = p();
|
|
29
|
-
!r || !t || (t.hasAttribute("title") && (t.setAttribute("data-suppressed-title", t.getAttribute("title") ?? ""), t.removeAttribute("title")), P.showTooltip({
|
|
30
|
-
id: v,
|
|
31
|
-
target: t,
|
|
32
|
-
content: r,
|
|
33
|
-
shortcut: e.tooltipShortcut,
|
|
34
|
-
placement: e.tooltipPlacement
|
|
35
|
-
}));
|
|
36
|
-
}, b = () => {
|
|
37
|
-
if (t && t.hasAttribute("data-suppressed-title")) {
|
|
38
|
-
const r = t.getAttribute("data-suppressed-title");
|
|
39
|
-
r && t.setAttribute("title", r), t.removeAttribute("data-suppressed-title");
|
|
40
|
-
}
|
|
41
|
-
}, i = () => {
|
|
42
|
-
b(), t && P.hideTooltip(t);
|
|
43
|
-
}, F = () => {
|
|
44
|
-
t && P.hideTooltip(t);
|
|
45
|
-
};
|
|
46
|
-
E(() => {
|
|
47
|
-
i();
|
|
48
|
-
});
|
|
49
|
-
const A = () => e.appearance ?? "plain", L = () => [u.root, N[A()], e.class].filter((r) => !!r).join(" ");
|
|
50
|
-
if (e.as === "div") {
|
|
51
|
-
const r = a, n = () => !!(e.disabled || r["aria-disabled"] === "true" || r["aria-disabled"] === !0);
|
|
52
|
-
return (() => {
|
|
53
|
-
var c = q();
|
|
54
|
-
return w((o) => {
|
|
55
|
-
t = o, typeof e.ref == "function" && e.ref(o);
|
|
56
|
-
}, c), _(c, k({
|
|
57
|
-
get tabIndex() {
|
|
58
|
-
return m(() => !!n())() ? -1 : r.tabIndex ?? 0;
|
|
59
|
-
}
|
|
60
|
-
}, r, {
|
|
61
|
-
get class() {
|
|
62
|
-
return L();
|
|
63
|
-
},
|
|
64
|
-
get classList() {
|
|
65
|
-
return e.classList;
|
|
66
|
-
},
|
|
67
|
-
get "aria-label"() {
|
|
68
|
-
return d();
|
|
69
|
-
},
|
|
70
|
-
get title() {
|
|
71
|
-
return m(() => e.tooltip !== void 0)() ? void 0 : e.title;
|
|
72
|
-
},
|
|
73
|
-
get "aria-disabled"() {
|
|
74
|
-
return n() ? "true" : void 0;
|
|
75
|
-
},
|
|
76
|
-
get "data-current"() {
|
|
77
|
-
return e.current ? "true" : void 0;
|
|
78
|
-
},
|
|
79
|
-
get "data-selected"() {
|
|
80
|
-
return e.selected ? "true" : void 0;
|
|
81
|
-
},
|
|
82
|
-
onPointerEnter: (o) => {
|
|
83
|
-
s(), typeof e.onPointerEnter == "function" && e.onPointerEnter(o);
|
|
84
|
-
},
|
|
85
|
-
onPointerLeave: (o) => {
|
|
86
|
-
i(), typeof e.onPointerLeave == "function" && e.onPointerLeave(o);
|
|
87
|
-
},
|
|
88
|
-
onFocusIn: (o) => {
|
|
89
|
-
s(), typeof e.onFocusIn == "function" && e.onFocusIn(o);
|
|
90
|
-
},
|
|
91
|
-
onFocusOut: (o) => {
|
|
92
|
-
i(), typeof e.onFocusOut == "function" && e.onFocusOut(o);
|
|
93
|
-
},
|
|
94
|
-
onClick: (o) => {
|
|
95
|
-
if (F(), n()) {
|
|
96
|
-
o.preventDefault(), o.stopPropagation();
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
if (typeof e.onClick == "function")
|
|
100
|
-
e.onClick(o);
|
|
101
|
-
else if (Array.isArray(e.onClick)) {
|
|
102
|
-
const [g, y] = e.onClick;
|
|
103
|
-
g(y, o);
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
onKeyDown: (o) => {
|
|
107
|
-
if (!n()) {
|
|
108
|
-
if (o.target === o.currentTarget && (T(o, "Enter") || o.key === " ") && (o.preventDefault(), o.currentTarget.click()), typeof e.onKeyDown == "function")
|
|
109
|
-
e.onKeyDown(o);
|
|
110
|
-
else if (Array.isArray(e.onKeyDown)) {
|
|
111
|
-
const [g, y] = e.onKeyDown;
|
|
112
|
-
g(y, o);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}), !1, !0), h(c, () => e.children), c;
|
|
117
|
-
})();
|
|
118
|
-
}
|
|
119
|
-
return (() => {
|
|
120
|
-
var r = M();
|
|
121
|
-
return w((n) => {
|
|
122
|
-
t = n, typeof e.ref == "function" && e.ref(n);
|
|
123
|
-
}, r), _(r, k(a, {
|
|
124
|
-
get type() {
|
|
125
|
-
return e.type ?? "button";
|
|
126
|
-
},
|
|
127
|
-
get disabled() {
|
|
128
|
-
return e.disabled;
|
|
129
|
-
},
|
|
130
|
-
get class() {
|
|
131
|
-
return L();
|
|
132
|
-
},
|
|
133
|
-
get classList() {
|
|
134
|
-
return e.classList;
|
|
135
|
-
},
|
|
136
|
-
get "aria-label"() {
|
|
137
|
-
return d();
|
|
138
|
-
},
|
|
139
|
-
get title() {
|
|
140
|
-
return m(() => e.tooltip !== void 0)() ? void 0 : e.title;
|
|
141
|
-
},
|
|
142
|
-
get "data-current"() {
|
|
143
|
-
return e.current ? "true" : void 0;
|
|
144
|
-
},
|
|
145
|
-
get "data-selected"() {
|
|
146
|
-
return e.selected ? "true" : void 0;
|
|
147
|
-
},
|
|
148
|
-
get onKeyDown() {
|
|
149
|
-
return e.onKeyDown;
|
|
150
|
-
},
|
|
151
|
-
onPointerEnter: (n) => {
|
|
152
|
-
s(), typeof e.onPointerEnter == "function" && e.onPointerEnter(n);
|
|
153
|
-
},
|
|
154
|
-
onPointerLeave: (n) => {
|
|
155
|
-
i(), typeof e.onPointerLeave == "function" && e.onPointerLeave(n);
|
|
156
|
-
},
|
|
157
|
-
onFocusIn: (n) => {
|
|
158
|
-
s(), typeof e.onFocusIn == "function" && e.onFocusIn(n);
|
|
159
|
-
},
|
|
160
|
-
onFocusOut: (n) => {
|
|
161
|
-
i(), typeof e.onFocusOut == "function" && e.onFocusOut(n);
|
|
162
|
-
},
|
|
163
|
-
onClick: (n) => {
|
|
164
|
-
if (F(), typeof e.onClick == "function")
|
|
165
|
-
e.onClick(n);
|
|
166
|
-
else if (Array.isArray(e.onClick)) {
|
|
167
|
-
const [c, o] = e.onClick;
|
|
168
|
-
c(o, n);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}), !1, !0), h(r, () => e.children), r;
|
|
172
|
-
})();
|
|
173
|
-
}
|
|
174
|
-
const z = K(), te = z.Provider;
|
|
175
|
-
function Q() {
|
|
176
|
-
return R(z);
|
|
177
|
-
}
|
|
178
|
-
const j = "vk_input_eLMd0 vk_inputChrome_VIaGv", U = "vk_sizeSm_xI-Y5", G = "vk_sizeLg_QXUwr", J = "vk_mono_oJb--", V = "vk_borderless_QhnQ0", l = {
|
|
179
|
-
input: j,
|
|
180
|
-
sizeSm: U,
|
|
181
|
-
sizeLg: G,
|
|
182
|
-
mono: J,
|
|
183
|
-
borderless: V
|
|
184
|
-
};
|
|
185
|
-
var X = /* @__PURE__ */ C("<input>");
|
|
186
|
-
const oe = (f) => {
|
|
187
|
-
const [e, a] = I(f, ["size", "mono", "borderless", "class"]), t = Q(), v = () => a["aria-describedby"] ?? (t == null ? void 0 : t.describedBy()), p = () => {
|
|
188
|
-
var i;
|
|
189
|
-
return a["aria-invalid"] ?? ((i = t == null ? void 0 : t.hasError) != null && i.call(t) ? "true" : void 0);
|
|
190
|
-
}, d = () => a["aria-required"] ?? (t != null && t.required ? "true" : void 0), s = () => e.size === "sm" ? l.sizeSm : e.size === "lg" ? l.sizeLg : "", b = () => [l.input, s(), e.mono ? l.mono : "", e.borderless ? l.borderless : "", e.class ?? ""].filter(Boolean).join(" ");
|
|
191
|
-
return (() => {
|
|
192
|
-
var i = X();
|
|
193
|
-
return _(i, k({
|
|
194
|
-
get class() {
|
|
195
|
-
return b();
|
|
196
|
-
}
|
|
197
|
-
}, a, {
|
|
198
|
-
get "aria-describedby"() {
|
|
199
|
-
return v();
|
|
200
|
-
},
|
|
201
|
-
get "aria-invalid"() {
|
|
202
|
-
return p();
|
|
203
|
-
},
|
|
204
|
-
get "aria-required"() {
|
|
205
|
-
return d();
|
|
206
|
-
}
|
|
207
|
-
}), !1, !1), i;
|
|
208
|
-
})();
|
|
209
|
-
};
|
|
210
|
-
export {
|
|
211
|
-
te as F,
|
|
212
|
-
oe as I,
|
|
213
|
-
ee as P,
|
|
214
|
-
Q as u
|
|
215
|
-
};
|
package/dist/Input-BrxV_Xcb.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("solid-js/web"),u=require("solid-js"),_=require("./tooltipCoordinator-y5YP3tsJ.cjs"),h=require("./keys-BeeC5_RZ.cjs"),A="vk_root_1DrgK",I="vk_appearancePlain_tlRDR",z="vk_appearanceRow_z9L2i",D="vk_appearanceCard_fBEzd",E="vk_appearanceMedia_dauP0",d={root:A,appearancePlain:I,appearanceRow:z,appearanceCard:D,appearanceMedia:E};var K=i.template("<div role=button>"),R=i.template("<button>");const S={plain:d.appearancePlain,row:d.appearanceRow,card:d.appearanceCard,media:d.appearanceMedia};function T(b){const[e,s]=u.splitProps(b,["appearance","current","selected","type","as","disabled","class","classList","children","tooltip","tooltipShortcut","tooltipPlacement","title","aria-label","ref","onPointerEnter","onPointerLeave","onFocusIn","onFocusOut","onClick","onKeyDown"]);let t;const g=u.createUniqueId(),f=()=>e.tooltip!==void 0?typeof e.tooltip=="function"?e.tooltip():e.tooltip:e.title,v=()=>{if(e["aria-label"]!==void 0)return e["aria-label"];const r=f();if(r)return r},c=()=>{const r=f();!r||!t||(t.hasAttribute("title")&&(t.setAttribute("data-suppressed-title",t.getAttribute("title")??""),t.removeAttribute("title")),_.tooltipCoordinator.showTooltip({id:g,target:t,content:r,shortcut:e.tooltipShortcut,placement:e.tooltipPlacement}))},m=()=>{if(t&&t.hasAttribute("data-suppressed-title")){const r=t.getAttribute("data-suppressed-title");r&&t.setAttribute("title",r),t.removeAttribute("data-suppressed-title")}},a=()=>{m(),t&&_.tooltipCoordinator.hideTooltip(t)},C=()=>{t&&_.tooltipCoordinator.hideTooltip(t)};u.onCleanup(()=>{a()});const w=()=>e.appearance??"plain",k=()=>[d.root,S[w()],e.class].filter(r=>!!r).join(" ");if(e.as==="div"){const r=s,n=()=>!!(e.disabled||r["aria-disabled"]==="true"||r["aria-disabled"]===!0);return(()=>{var l=K();return i.use(o=>{t=o,typeof e.ref=="function"&&e.ref(o)},l),i.spread(l,i.mergeProps({get tabIndex(){return i.memo(()=>!!n())()?-1:r.tabIndex??0}},r,{get class(){return k()},get classList(){return e.classList},get"aria-label"(){return v()},get title(){return i.memo(()=>e.tooltip!==void 0)()?void 0:e.title},get"aria-disabled"(){return n()?"true":void 0},get"data-current"(){return e.current?"true":void 0},get"data-selected"(){return e.selected?"true":void 0},onPointerEnter:o=>{c(),typeof e.onPointerEnter=="function"&&e.onPointerEnter(o)},onPointerLeave:o=>{a(),typeof e.onPointerLeave=="function"&&e.onPointerLeave(o)},onFocusIn:o=>{c(),typeof e.onFocusIn=="function"&&e.onFocusIn(o)},onFocusOut:o=>{a(),typeof e.onFocusOut=="function"&&e.onFocusOut(o)},onClick:o=>{if(C(),n()){o.preventDefault(),o.stopPropagation();return}if(typeof e.onClick=="function")e.onClick(o);else if(Array.isArray(e.onClick)){const[y,P]=e.onClick;y(P,o)}},onKeyDown:o=>{if(!n()){if(o.target===o.currentTarget&&(h.isKey(o,"Enter")||o.key===" ")&&(o.preventDefault(),o.currentTarget.click()),typeof e.onKeyDown=="function")e.onKeyDown(o);else if(Array.isArray(e.onKeyDown)){const[y,P]=e.onKeyDown;y(P,o)}}}}),!1,!0),i.insert(l,()=>e.children),l})()}return(()=>{var r=R();return i.use(n=>{t=n,typeof e.ref=="function"&&e.ref(n)},r),i.spread(r,i.mergeProps(s,{get type(){return e.type??"button"},get disabled(){return e.disabled},get class(){return k()},get classList(){return e.classList},get"aria-label"(){return v()},get title(){return i.memo(()=>e.tooltip!==void 0)()?void 0:e.title},get"data-current"(){return e.current?"true":void 0},get"data-selected"(){return e.selected?"true":void 0},get onKeyDown(){return e.onKeyDown},onPointerEnter:n=>{c(),typeof e.onPointerEnter=="function"&&e.onPointerEnter(n)},onPointerLeave:n=>{a(),typeof e.onPointerLeave=="function"&&e.onPointerLeave(n)},onFocusIn:n=>{c(),typeof e.onFocusIn=="function"&&e.onFocusIn(n)},onFocusOut:n=>{a(),typeof e.onFocusOut=="function"&&e.onFocusOut(n)},onClick:n=>{if(C(),typeof e.onClick=="function")e.onClick(n);else if(Array.isArray(e.onClick)){const[l,o]=e.onClick;l(o,n)}}}),!1,!0),i.insert(r,()=>e.children),r})()}const F=u.createContext(),q=F.Provider;function L(){return u.useContext(F)}const $="vk_input_eLMd0 vk_inputChrome_VIaGv",O="vk_sizeSm_xI-Y5",x="vk_sizeLg_QXUwr",B="vk_mono_oJb--",M="vk_borderless_QhnQ0",p={input:$,sizeSm:O,sizeLg:x,mono:B,borderless:M};var N=i.template("<input>");const Q=b=>{const[e,s]=u.splitProps(b,["size","mono","borderless","class"]),t=L(),g=()=>s["aria-describedby"]??(t==null?void 0:t.describedBy()),f=()=>{var a;return s["aria-invalid"]??((a=t==null?void 0:t.hasError)!=null&&a.call(t)?"true":void 0)},v=()=>s["aria-required"]??(t!=null&&t.required?"true":void 0),c=()=>e.size==="sm"?p.sizeSm:e.size==="lg"?p.sizeLg:"",m=()=>[p.input,c(),e.mono?p.mono:"",e.borderless?p.borderless:"",e.class??""].filter(Boolean).join(" ");return(()=>{var a=N();return i.spread(a,i.mergeProps({get class(){return m()}},s,{get"aria-describedby"(){return g()},get"aria-invalid"(){return f()},get"aria-required"(){return v()}}),!1,!1),a})()};exports.FormFieldAriaProvider=q;exports.Input=Q;exports.PressableSurface=T;exports.useFormFieldAria=L;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("solid-js/web"),f=require("solid-js"),k=require("./ownerWindow-BCmJFMbR.cjs"),O=require("./anchoredLayout-Dstwa5OH.cjs"),H=require("./overlayStack-BZR1emYS.cjs"),p=require("./OverlayScrollArea-BSlaXG1h.cjs"),T=require("./keys-BeeC5_RZ.cjs"),b='[role="menuitem"]:not([disabled])',x='[role="option"]:not([aria-disabled="true"])',_=new Set(["ArrowDown","ArrowUp","Home","End"]);function C(e){return _.has(e)}function P(e,h,g){if(e===0)return-1;switch(g){case"ArrowDown":return h<0?0:(h+1)%e;case"ArrowUp":return h<0?e-1:(h-1+e)%e;case"Home":return 0;case"End":return e-1;default:return h}}const q="vk_popover_dzAQl vk_surface_3ZOnl",I="vk_scrollArea_cBiT4",L={popover:q,scrollArea:I};var N=s.template("<div>");function M(e){const[h,g]=f.createSignal(null),[S,A]=f.createSignal(null);let i;const y=()=>typeof e.open=="function"?e.open():e.open,w=()=>{const o=e.anchor();return(o?k.ownerWindow(o):null)??e.ownerWindow??null},W=H.useOverlayRegistration(()=>y()&&h()!==null,"popover",{type:"popover",element:()=>S(),document:()=>{var o;return(o=w())==null?void 0:o.document}}),E=()=>{const o=e.anchor(),c=w();if(!o||c===null)return;const n=o.getBoundingClientRect(),t=i==null?void 0:i.querySelector('[data-overlay-scroll-viewport], [class*="viewport"]'),d=t?t.scrollHeight+Math.max(0,i.offsetHeight-t.offsetHeight):0,v=t?t.scrollWidth+Math.max(0,i.offsetWidth-t.offsetWidth):0,{left:r,top:l,anchorWidth:a,maxHeight:m}=O.computePopoverPosition({anchor:{left:n.left,right:n.right,top:n.top,bottom:n.bottom,width:n.width},panelWidth:i?Math.max(i.offsetWidth,i.scrollWidth,v):0,panelHeight:i?Math.max(i.offsetHeight,i.scrollHeight,d):0,viewportWidth:c.innerWidth,viewportHeight:c.innerHeight,placement:e.placement??"bottom-start",gap:e.gap??4}),u=h();u&&u.x===r&&u.y===l&&u.w===a&&u.maxHeight===m||g({x:r,y:l,w:a,maxHeight:m})};return f.createEffect(()=>{if(!y()){g(null),A(null),i=void 0;return}const o=w(),c=e.anchor();if(o===null||!c)return;E();const n=O.requestOwnerAnimationFrame(c,()=>{E();const r=e.role;if(r==="menu"||r==="listbox"){const l=r==="menu"?b:x,a=i;if(a){const m=a.querySelector(l);(m??a).focus({preventScroll:!1}),m==null||m.scrollIntoView({block:"nearest"})}}}),t=r=>{var a;const l=r.target;l&&(i!=null&&i.contains(l)||(a=e.anchor())!=null&&a.contains(l)||l instanceof Element&&l.closest('[role="listbox"], [role="menu"]')||e.onClose())},d=r=>{!T.isKey(r,"Escape")||!W.isTopmost()||(r.stopPropagation(),r.stopImmediatePropagation(),e.onClose())},v=()=>E();o.addEventListener("mousedown",t,!0),o.addEventListener("keydown",d,!0),o.addEventListener("resize",v),o.addEventListener("scroll",v,!0),f.onCleanup(()=>{n(),o.removeEventListener("mousedown",t,!0),o.removeEventListener("keydown",d,!0),o.removeEventListener("resize",v),o.removeEventListener("scroll",v,!0)})}),f.createEffect(()=>{const o=S(),c=w();if(!o||!y()||c===null)return;const n=c.ResizeObserver;if(!n)return;const t=new n(()=>{E()});t.observe(o),f.onCleanup(()=>{t.disconnect()})}),s.createComponent(f.Show,{get when(){return s.memo(()=>!!(y()&&h()))()?w():null},children:o=>s.createComponent(f.Show,{get when(){return h()},children:c=>s.createComponent(s.Portal,{get mount(){return o().document.body},get children(){var n=N();return n.$$keydown=t=>{const d=e.role;if(d!=="menu"&&d!=="listbox"||!C(t.key))return;t.preventDefault();const v=d==="menu"?b:x,r=i;if(!r)return;const l=Array.from(r.querySelectorAll(v)),a=l.indexOf(r.ownerDocument.activeElement),m=P(l.length,a,t.key);if(m>=0){const u=l[m];u==null||u.focus({preventScroll:!1}),u==null||u.scrollIntoView({block:"nearest"})}},s.use(t=>{i=t,A(t)},n),s.insert(n,s.createComponent(f.Show,{get when(){return e.scrollable},get fallback(){return e.children},get children(){return s.createComponent(p.OverlayScrollArea,{get rootClass(){return L.scrollArea},get children(){return e.children}})}})),s.effect(t=>{var d=e.role??"dialog",v=e.ariaLabel,r=e.role==="menu"||e.role==="listbox"?-1:void 0,l=`${L.popover} ${e.class??""}`,a={left:`${c().x}px`,top:`${c().y}px`,"max-height":`${c().maxHeight}px`,...e.matchAnchorWidth?{"min-width":`${c().w}px`}:{}};return d!==t.e&&s.setAttribute(n,"role",t.e=d),v!==t.t&&s.setAttribute(n,"aria-label",t.t=v),r!==t.a&&s.setAttribute(n,"tabindex",t.a=r),l!==t.o&&s.className(n,t.o=l),t.i=s.style(n,a,t.i),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),n}})})})}s.delegateEvents(["keydown"]);exports.LISTBOX_OPTION_SELECTOR=x;exports.MENU_ITEM_SELECTOR=b;exports.Popover=M;exports.isPopoverNavigationKey=C;exports.resolvePopoverFocusForKey=P;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { spread as m, mergeProps as l, template as u } from "solid-js/web";
|
|
2
|
-
import { splitProps as b } from "solid-js";
|
|
3
|
-
import { u as v } from "./Input-BqiQPUxA.js";
|
|
4
|
-
const p = "vk_textarea_2r9I1 vk_inputChrome_VIaGv", _ = "vk_mono_SfM4F", x = "vk_borderless_VcyoM", t = {
|
|
5
|
-
textarea: p,
|
|
6
|
-
mono: _,
|
|
7
|
-
borderless: x
|
|
8
|
-
};
|
|
9
|
-
var y = /* @__PURE__ */ u("<textarea>");
|
|
10
|
-
const B = (a) => {
|
|
11
|
-
const [s, o] = b(a, ["mono", "borderless", "class"]), r = v(), n = () => o["aria-describedby"] ?? (r == null ? void 0 : r.describedBy()), c = () => {
|
|
12
|
-
var e;
|
|
13
|
-
return o["aria-invalid"] ?? ((e = r == null ? void 0 : r.hasError) != null && e.call(r) ? "true" : void 0);
|
|
14
|
-
}, d = () => o["aria-required"] ?? (r != null && r.required ? "true" : void 0), i = () => [t.textarea, s.mono ? t.mono : "", s.borderless ? t.borderless : "", s.class ?? ""].filter(Boolean).join(" ");
|
|
15
|
-
return (() => {
|
|
16
|
-
var e = y();
|
|
17
|
-
return m(e, l({
|
|
18
|
-
get class() {
|
|
19
|
-
return i();
|
|
20
|
-
}
|
|
21
|
-
}, o, {
|
|
22
|
-
get "aria-describedby"() {
|
|
23
|
-
return n();
|
|
24
|
-
},
|
|
25
|
-
get "aria-invalid"() {
|
|
26
|
-
return c();
|
|
27
|
-
},
|
|
28
|
-
get "aria-required"() {
|
|
29
|
-
return d();
|
|
30
|
-
}
|
|
31
|
-
}), !1, !1), e;
|
|
32
|
-
})();
|
|
33
|
-
};
|
|
34
|
-
export {
|
|
35
|
-
B as T
|
|
36
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const a=require("solid-js/web"),l=require("solid-js"),b=require("./Input-BrxV_Xcb.cjs"),m="vk_textarea_2r9I1 vk_inputChrome_VIaGv",v="vk_mono_SfM4F",_="vk_borderless_VcyoM",o={textarea:m,mono:v,borderless:_};var p=a.template("<textarea>");const q=n=>{const[t,s]=l.splitProps(n,["mono","borderless","class"]),e=b.useFormFieldAria(),c=()=>s["aria-describedby"]??(e==null?void 0:e.describedBy()),i=()=>{var r;return s["aria-invalid"]??((r=e==null?void 0:e.hasError)!=null&&r.call(e)?"true":void 0)},d=()=>s["aria-required"]??(e!=null&&e.required?"true":void 0),u=()=>[o.textarea,t.mono?o.mono:"",t.borderless?o.borderless:"",t.class??""].filter(Boolean).join(" ");return(()=>{var r=p();return a.spread(r,a.mergeProps({get class(){return u()}},s,{get"aria-describedby"(){return c()},get"aria-invalid"(){return i()},get"aria-required"(){return d()}}),!1,!1),r})()};exports.Textarea=q;
|
package/dist/format-aHRZi12I.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("solid-js/web"),K=require("./Input-BrxV_Xcb.cjs"),u=require("solid-js"),P=require("./dialogFocusRestore-BAF8QM6v.cjs"),I=require("./windowRegistry-CGvOBUsw.cjs"),j=require("./Kbd-BDZklpw9.cjs"),_=require("./tooltipCoordinator-y5YP3tsJ.cjs"),G=require("./keys-BeeC5_RZ.cjs"),J=require("./prefersReducedMotion-BQp-Q4UR.cjs"),M=require("./Modal-BSSY6C3D.cjs"),Q="vk_root_w-T1s",Z="vk_disabled_kl1Jx",ee="vk_box_mOCAD",te="vk_checked_YZgPy",oe="vk_control_748Lw",ie="vk_input_Ysj9i",ne="vk_indicator_lYKVu",re="vk_label_jB-PM",p={root:Q,disabled:Z,box:ee,checked:te,control:oe,input:ie,indicator:ne,label:re};function W(e,r,l,c,a,...h){const v=[];e&&v.push(e),c&&r&&v.push(r),a&&l&&v.push(l);for(const o of h)o!==void 0&&o!==""&&v.push(o);return v.join(" ")}var le=t.template("<span>"),ae=t.template("<label><span><input type=checkbox><span aria-hidden=true><span>");function se(e){const r=K.useFormFieldAria();return(()=>{var l=ae(),c=l.firstChild,a=c.firstChild,h=a.nextSibling,v=h.firstChild;return a.addEventListener("change",o=>{const m=o.currentTarget;e.onChange(m.checked),m.indeterminate=!!e.indeterminate}),t.use(o=>u.createRenderEffect(()=>{o.indeterminate=!!e.indeterminate}),a),t.insert(l,t.createComponent(u.Show,{get when(){return e.children!==void 0},get children(){var o=le();return t.insert(o,()=>e.children),t.effect(()=>t.className(o,p.label)),o}}),null),t.effect(o=>{var m=W(p.root,p.checked,p.disabled,e.checked||!!e.indeterminate,!!e.disabled,e.class),d=p.control,w=e.id,f=`${p.input} ${e.inputClass??""}`,O=e.disabled,y=r==null?void 0:r.describedBy(),g=e.ariaLabel,S=e.ariaLabelledBy,C=`${p.box} ${e.boxClass??""}`,T=p.indicator;return m!==o.e&&t.className(l,o.e=m),d!==o.t&&t.className(c,o.t=d),w!==o.a&&t.setAttribute(a,"id",o.a=w),f!==o.o&&t.className(a,o.o=f),O!==o.i&&(a.disabled=o.i=O),y!==o.n&&t.setAttribute(a,"aria-describedby",o.n=y),g!==o.s&&t.setAttribute(a,"aria-label",o.s=g),S!==o.h&&t.setAttribute(a,"aria-labelledby",o.h=S),C!==o.r&&t.className(h,o.r=C),T!==o.d&&t.className(v,o.d=T),o},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0}),t.effect(()=>a.checked=e.checked),l})()}const ce="vk_trigger_--BjF",de="vk_tooltip_eJQhN",ue="vk_hostTooltip_vLrNc",he="vk_tooltipInner_AyPkl",k={trigger:ce,tooltip:de,hostTooltip:ue,tooltipInner:he},Y=12,R=16,E=8,H=620;function N(e){const r=e.tooltipWidth??H,l=e.tooltipWidth===void 0?e.viewportWidth:e.viewportWidth-E,c=Math.min(e.pointerX+Y,l-r),a=Math.max(E,c),h=e.pointerY+R,v=e.tooltipHeight??0,o=e.viewportHeight===void 0?h:Math.max(E,e.viewportHeight-v-E),m=e.aboveY===void 0?h:e.aboveY-v-R,d=e.viewportHeight!==void 0&&h>o?Math.max(E,Math.min(m,o)):Math.max(E,Math.min(h,o));return{left:a,top:d}}var ve=t.template("<span>"),me=t.template("<div><span>"),fe=t.template("<div role=tooltip>");const ge=1e3,Te=180;function be(e){const r=u.createUniqueId(),[l,c]=u.createSignal(!1),[a,h]=u.createSignal({x:0,y:0}),[v,o]=u.createSignal(),[m,d]=u.createSignal({width:0,height:0}),[w,f]=u.createSignal(!1);let O,y,g,S;const C=()=>I.getWindow(g),T=()=>{O!==void 0&&(C().clearTimeout(O),O=void 0)},L=()=>{y!==void 0&&(C().clearTimeout(y),y=void 0)},x=()=>{L(),y=C().setTimeout(()=>{c(!1),_.tooltipCoordinator.recordTooltipHidden()},Te)},$=i=>{if(!e.content)return;L();const n=i.clientX,s=i.clientY;T(),_.tooltipCoordinator.activeTooltip()&&_.tooltipCoordinator.hideTooltip();const b=_.tooltipCoordinator.isWarm()?0:e.delayMs??ge;O=C().setTimeout(()=>{h({x:n,y:s}),o(s),c(!0),_.tooltipCoordinator.recordTooltipShown()},b)},q=i=>{l()||h({x:i.clientX,y:i.clientY})},B=()=>{T(),l()&&x()},X=()=>{L()},U=()=>{x()},V=()=>{if(!e.content)return;L(),T(),_.tooltipCoordinator.activeTooltip()&&_.tooltipCoordinator.hideTooltip();const i=g==null?void 0:g.getBoundingClientRect();i&&(h({x:i.left,y:i.bottom}),o(i.top)),c(!0),_.tooltipCoordinator.recordTooltipShown()},z=()=>{T(),l()&&x()};return u.createEffect(()=>{_.tooltipCoordinator.activeTooltip()&&l()&&(c(!1),T())}),u.createEffect(()=>{if(!l())return;const i=()=>{c(!1)},n=b=>{G.isKey(b,"Escape")&&(b.stopPropagation(),b.stopImmediatePropagation(),T(),c(!1),_.tooltipCoordinator.dismissAll())},s=I.getWindow(g);s.addEventListener("scroll",i,!0),s.addEventListener("resize",i),s.addEventListener("keydown",n,!0),u.onCleanup(()=>{s.removeEventListener("scroll",i,!0),s.removeEventListener("resize",i),s.removeEventListener("keydown",n,!0)})}),u.onCleanup(()=>{T(),L()}),[(()=>{var i=ve();return i.$$focusout=z,i.$$focusin=V,i.addEventListener("mouseleave",B),i.$$mousemove=q,i.addEventListener("mouseenter",$),t.use(n=>{g=n;const s=n.querySelector('button, a[href], input, select, textarea, [tabindex]:not([tabindex="-1"])');f(s!==null)},i),t.insert(i,()=>e.children),t.effect(n=>{var s=k.trigger,b=w()?void 0:0,F=l()?r:void 0;return s!==n.e&&t.className(i,n.e=s),b!==n.t&&t.setAttribute(i,"tabindex",n.t=b),F!==n.a&&t.setAttribute(i,"aria-describedby",n.a=F),n},{e:void 0,t:void 0,a:void 0}),i})(),t.createComponent(u.Show,{get when(){return t.memo(()=>!!l())()&&e.content},get children(){return t.createComponent(P.OverlayPortal,{type:"tooltip",get mount(){return I.getWindow(g).document.body},element:()=>S,idPrefix:"hover-tooltip",get children(){var i=fe();return i.addEventListener("mouseleave",U),i.addEventListener("mouseenter",X),t.use(n=>{S=n;const s=n.getBoundingClientRect();d({width:s.width,height:s.height})},i),t.setAttribute(i,"id",r),t.insert(i,t.createComponent(u.Show,{get when(){return e.shortcut},get fallback(){return e.content},get children(){var n=me(),s=n.firstChild;return t.insert(s,()=>e.content),t.insert(n,t.createComponent(j.Kbd,{size:"xs",get shortcut(){return e.shortcut}}),null),t.effect(()=>t.className(n,k.tooltipInner)),n}})),t.effect(n=>{var s=k.tooltip,b=(()=>{const F=v(),D=N({pointerX:a().x,pointerY:a().y,viewportWidth:C().innerWidth,viewportHeight:C().innerHeight,tooltipWidth:m().width,tooltipHeight:m().height,...F!==void 0?{aboveY:F}:{}});return{top:`${D.top}px`,left:`${D.left}px`}})();return s!==n.e&&t.className(i,n.e=s),n.t=t.style(i,b,n.t),n},{e:void 0,t:void 0}),i}})}})]}t.delegateEvents(["mousemove","focusin","focusout"]);function _e(e){let r=null,l=null,c=null,a=null;const h=()=>{var d;a!==null&&((d=e.ownerDocument().defaultView)==null||d.cancelAnimationFrame(a),a=null)},v=()=>{h(),c==null||c(),c=null},o=d=>{r=d,l??(l=e.ownerDocument().activeElement)};u.createEffect(u.on(()=>e.open(),(d,w)=>{if(d){r!==null&&c===null&&(c=J.neutralizeBackground(r)),h();const f=e.ownerDocument().defaultView;r!==null&&f!==null&&(a=f.requestAnimationFrame(()=>{a=null,e.open()&&(r==null||r.focus())}));return}w===!0&&(v(),P.restoreFocusTo(l),l=null,r=null)}));const m=d=>{var f;const w=M.resolveDialogShellKeyIntent(d.key,{confirmOnEnter:!1});if(w==="dismiss"){if(((f=e.dismissDisabled)==null?void 0:f.call(e))===!0)return;d.stopPropagation(),e.onDismiss();return}w==="trap"&&r!==null&&M.trapTabFocusWithin(r,d)};return u.onCleanup(()=>{v(),P.restoreFocusTo(l),l=null,r=null}),{captureDialog:o,handleKeyDown:m}}function A(){try{return new Intl.DateTimeFormat().resolvedOptions().locale}catch{return"en-US"}}function we(e,r){return e.toLocaleDateString(A(),r)}function Ce(e,r){return e.toLocaleString(A(),r)}exports.Checkbox=se;exports.HoverTooltip=be;exports.TOOLTIP_CURSOR_OFFSET_X=Y;exports.TOOLTIP_CURSOR_OFFSET_Y=R;exports.TOOLTIP_MAX_FOOTPRINT_X=H;exports.TOOLTIP_VIEWPORT_MARGIN=E;exports.buildSelectionItemClass=W;exports.computeTooltipPointerPosition=N;exports.createDialogShellFocus=_e;exports.formatDate=we;exports.formatDateTime=Ce;exports.styles=k;exports.systemFormatLocale=A;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const f=require("solid-js"),$=new Set(["modal","menu","popover","tooltip"]),c=new Map;function O(t){var e,o,n;return((o=(e=t.element)==null?void 0:e.call(t))==null?void 0:o.ownerDocument)??((n=t.document)==null?void 0:n.call(t))}const[q,J]=f.createSignal(0);function I(){J(t=>t+1)}function w(){return q()}const D=new Set,R=new Set;let M=0;function E(){M++;for(const t of Array.from(D))t()}function _(){M=Math.max(0,M-1);for(const t of Array.from(R))t()}function j(t,e){return D.add(t),R.add(e),M>0&&t(),()=>{D.delete(t),R.delete(e)}}function k(t){var u;w();const e=t==null?void 0:t.getBoundingClientRect(),o=[];let n=!1,r=!1,a=!1,i=!1;for(const v of y()){const g=c.get(v);if(!g)continue;const l=g.type;l==="toast"&&(a=!0),l==="tooltip"&&(i=!0);const h=(u=g.element)==null?void 0:u.call(g),b=O(g);if(t&&b&&b!==t.ownerDocument)continue;const x=!!(h!=null&&h.isConnected);let B,S=!1,m;if(l==="modal")n=!0,S=!0,m="modal overlay active";else if(h&&x&&e){const s=h.getBoundingClientRect();B={x:Math.round(s.x),y:Math.round(s.y),width:Math.round(s.width),height:Math.round(s.height)},s.width>0&&s.height>0&&e.left<s.right&&e.right>s.left&&e.top<s.bottom&&e.bottom>s.top&&(S=!0,l==="tooltip"||l==="toast"?m=`nonmodal ${l} intersecting viewport; browser remains live`:(r=!0,m=`${l} overlapping view`))}o.push({id:v,type:l,modal:l==="modal",connected:x,bounds:B,overlapsBrowser:S,reason:m})}const d=t?p().some(v=>v(t)):p().some(v=>v());return d&&(n=!0),{modalOccluded:n,menuOccluded:r,toastActive:a,tooltipActive:i,overlays:o,customConditionActive:d}}function F(t){if(w(),t&&p().some(e=>e(t)))return!0;for(const e of y()){const o=c.get(e);if(!o||o.type!=="modal")continue;const n=O(o);if(!(t&&n&&n!==t.ownerDocument))return!0}return!1}function G(t){for(const e of y()){const o=c.get(e);if(!o||!$.has(o.type))continue;const n=O(o);if(n===void 0||n===t)return!0}return!1}function H(t){var o,n;let e=t;for(let r=(o=c.get(e))==null?void 0:o.parent;r!==void 0;r=(n=c.get(e))==null?void 0:n.parent)e=r.id;return e}function K(t){const e=c.get(t);if(!e||!y().has(t))return!1;const o=O(e),n=[...y()];for(let r=n.length-1;r>=0;r--){const a=n[r],i=c.get(a);if(!i||!$.has(i.type))continue;const d=O(i);if(!(o&&d&&d!==o))return H(a)===t}return!1}function N(t){var o;w();const e=t.getBoundingClientRect();for(const n of y()){const r=c.get(n);if(!r)continue;const a=r.type;if(a==="tooltip"||a==="toast")continue;const i=(o=r.element)==null?void 0:o.call(r),d=O(r);if(d&&d!==t.ownerDocument||i!=null&&i.contains(t))continue;if(a==="modal")return!0;if(!(i!=null&&i.isConnected))continue;const u=i.getBoundingClientRect();if(u.width>0&&u.height>0&&e.left<u.right&&e.right>u.left&&e.top<u.bottom&&e.bottom>u.top)return!0}return p().some(n=>n(t))}let P=0;const[y,z]=f.createSignal(new Set),[p,L]=f.createSignal([]),C=new Set;function T(t,e){return c.set(t,e),z(o=>{if(o.has(t))return o;const n=new Set(o);return n.add(t),n}),e.element&&e.type!=="modal"&&(C.has(t)||(C.add(t),E())),I(),t}function A(t){c.delete(t),z(e=>{if(!e.has(t))return e;const o=new Set(e);return o.delete(t),o}),C.has(t)&&(C.delete(t),_()),I()}function Q(t){return L(e=>[...e,t]),()=>{L(e=>e.filter(o=>o!==t))}}const U=f.createMemo(()=>y().size),V=f.createMemo(()=>{if(y().size>0)return!0;for(const t of p())if(t())return!0;return!1});function W(t,e,o){const n=`${e}_${++P}_${Math.random().toString(36).slice(2,7)}`,r=f.createMemo(t);return f.createComputed(()=>{r()&&(T(n,o),f.onCleanup(()=>{A(n)}))}),f.onCleanup(()=>{A(n)}),{id:n,isTopmost:()=>K(n)}}exports.getOverlayDiagnostics=k;exports.hasOpenLayerIn=G;exports.isAnyOverlayOpen=V;exports.isModalOccluded=F;exports.isOverlayOverlapping=N;exports.notifyOverlayChanged=I;exports.notifyOverlayMotionEnd=_;exports.notifyOverlayMotionStart=E;exports.onOverlayMotion=j;exports.overlayDepth=U;exports.readOverlayMutationRevision=w;exports.registerOverlayClose=A;exports.registerOverlayCondition=Q;exports.registerOverlayOpen=T;exports.useOverlayRegistration=W;
|
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
import { createMemo as D, createComputed as T, onCleanup as B, createSignal as R } from "solid-js";
|
|
2
|
-
const E = /* @__PURE__ */ new Set([
|
|
3
|
-
"modal",
|
|
4
|
-
"menu",
|
|
5
|
-
"popover",
|
|
6
|
-
"tooltip"
|
|
7
|
-
]), c = /* @__PURE__ */ new Map();
|
|
8
|
-
function h(t) {
|
|
9
|
-
var o, e, n;
|
|
10
|
-
return ((e = (o = t.element) == null ? void 0 : o.call(t)) == null ? void 0 : e.ownerDocument) ?? ((n = t.document) == null ? void 0 : n.call(t));
|
|
11
|
-
}
|
|
12
|
-
const [j, k] = R(0);
|
|
13
|
-
function _() {
|
|
14
|
-
k((t) => t + 1);
|
|
15
|
-
}
|
|
16
|
-
function b() {
|
|
17
|
-
return j();
|
|
18
|
-
}
|
|
19
|
-
const M = /* @__PURE__ */ new Set(), S = /* @__PURE__ */ new Set();
|
|
20
|
-
let O = 0;
|
|
21
|
-
function q() {
|
|
22
|
-
O++;
|
|
23
|
-
for (const t of Array.from(M))
|
|
24
|
-
t();
|
|
25
|
-
}
|
|
26
|
-
function F() {
|
|
27
|
-
O = Math.max(0, O - 1);
|
|
28
|
-
for (const t of Array.from(S))
|
|
29
|
-
t();
|
|
30
|
-
}
|
|
31
|
-
function P(t, o) {
|
|
32
|
-
return M.add(t), S.add(o), O > 0 && t(), () => {
|
|
33
|
-
M.delete(t), S.delete(o);
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
function Q(t) {
|
|
37
|
-
var u;
|
|
38
|
-
b();
|
|
39
|
-
const o = t == null ? void 0 : t.getBoundingClientRect(), e = [];
|
|
40
|
-
let n = !1, r = !1, a = !1, i = !1;
|
|
41
|
-
for (const y of d()) {
|
|
42
|
-
const g = c.get(y);
|
|
43
|
-
if (!g) continue;
|
|
44
|
-
const f = g.type;
|
|
45
|
-
f === "toast" && (a = !0), f === "tooltip" && (i = !0);
|
|
46
|
-
const v = (u = g.element) == null ? void 0 : u.call(g), x = h(g);
|
|
47
|
-
if (t && x && x !== t.ownerDocument) continue;
|
|
48
|
-
const A = !!(v != null && v.isConnected);
|
|
49
|
-
let I, C = !1, p;
|
|
50
|
-
if (f === "modal")
|
|
51
|
-
n = !0, C = !0, p = "modal overlay active";
|
|
52
|
-
else if (v && A && o) {
|
|
53
|
-
const s = v.getBoundingClientRect();
|
|
54
|
-
I = {
|
|
55
|
-
x: Math.round(s.x),
|
|
56
|
-
y: Math.round(s.y),
|
|
57
|
-
width: Math.round(s.width),
|
|
58
|
-
height: Math.round(s.height)
|
|
59
|
-
}, s.width > 0 && s.height > 0 && o.left < s.right && o.right > s.left && o.top < s.bottom && o.bottom > s.top && (C = !0, f === "tooltip" || f === "toast" ? p = `nonmodal ${f} intersecting viewport; browser remains live` : (r = !0, p = `${f} overlapping view`));
|
|
60
|
-
}
|
|
61
|
-
e.push({
|
|
62
|
-
id: y,
|
|
63
|
-
type: f,
|
|
64
|
-
modal: f === "modal",
|
|
65
|
-
connected: A,
|
|
66
|
-
bounds: I,
|
|
67
|
-
overlapsBrowser: C,
|
|
68
|
-
reason: p
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
const l = t ? m().some((y) => y(t)) : m().some((y) => y());
|
|
72
|
-
return l && (n = !0), {
|
|
73
|
-
modalOccluded: n,
|
|
74
|
-
menuOccluded: r,
|
|
75
|
-
toastActive: a,
|
|
76
|
-
tooltipActive: i,
|
|
77
|
-
overlays: e,
|
|
78
|
-
customConditionActive: l
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
function U(t) {
|
|
82
|
-
if (b(), t && m().some((o) => o(t)))
|
|
83
|
-
return !0;
|
|
84
|
-
for (const o of d()) {
|
|
85
|
-
const e = c.get(o);
|
|
86
|
-
if (!e || e.type !== "modal") continue;
|
|
87
|
-
const n = h(e);
|
|
88
|
-
if (!(t && n && n !== t.ownerDocument))
|
|
89
|
-
return !0;
|
|
90
|
-
}
|
|
91
|
-
return !1;
|
|
92
|
-
}
|
|
93
|
-
function V(t) {
|
|
94
|
-
for (const o of d()) {
|
|
95
|
-
const e = c.get(o);
|
|
96
|
-
if (!e || !E.has(e.type)) continue;
|
|
97
|
-
const n = h(e);
|
|
98
|
-
if (n === void 0 || n === t) return !0;
|
|
99
|
-
}
|
|
100
|
-
return !1;
|
|
101
|
-
}
|
|
102
|
-
function G(t) {
|
|
103
|
-
var e, n;
|
|
104
|
-
let o = t;
|
|
105
|
-
for (let r = (e = c.get(o)) == null ? void 0 : e.parent; r !== void 0; r = (n = c.get(o)) == null ? void 0 : n.parent)
|
|
106
|
-
o = r.id;
|
|
107
|
-
return o;
|
|
108
|
-
}
|
|
109
|
-
function H(t) {
|
|
110
|
-
const o = c.get(t);
|
|
111
|
-
if (!o || !d().has(t)) return !1;
|
|
112
|
-
const e = h(o), n = [...d()];
|
|
113
|
-
for (let r = n.length - 1; r >= 0; r--) {
|
|
114
|
-
const a = n[r], i = c.get(a);
|
|
115
|
-
if (!i || !E.has(i.type)) continue;
|
|
116
|
-
const l = h(i);
|
|
117
|
-
if (!(e && l && l !== e))
|
|
118
|
-
return G(a) === t;
|
|
119
|
-
}
|
|
120
|
-
return !1;
|
|
121
|
-
}
|
|
122
|
-
function W(t) {
|
|
123
|
-
var e;
|
|
124
|
-
b();
|
|
125
|
-
const o = t.getBoundingClientRect();
|
|
126
|
-
for (const n of d()) {
|
|
127
|
-
const r = c.get(n);
|
|
128
|
-
if (!r) continue;
|
|
129
|
-
const a = r.type;
|
|
130
|
-
if (a === "tooltip" || a === "toast") continue;
|
|
131
|
-
const i = (e = r.element) == null ? void 0 : e.call(r), l = h(r);
|
|
132
|
-
if (l && l !== t.ownerDocument || i != null && i.contains(t)) continue;
|
|
133
|
-
if (a === "modal") return !0;
|
|
134
|
-
if (!(i != null && i.isConnected)) continue;
|
|
135
|
-
const u = i.getBoundingClientRect();
|
|
136
|
-
if (u.width > 0 && u.height > 0 && o.left < u.right && o.right > u.left && o.top < u.bottom && o.bottom > u.top)
|
|
137
|
-
return !0;
|
|
138
|
-
}
|
|
139
|
-
return m().some((n) => n(t));
|
|
140
|
-
}
|
|
141
|
-
let J = 0;
|
|
142
|
-
const [d, z] = R(/* @__PURE__ */ new Set()), [m, L] = R([]), w = /* @__PURE__ */ new Set();
|
|
143
|
-
function K(t, o) {
|
|
144
|
-
return c.set(t, o), z((e) => {
|
|
145
|
-
if (e.has(t)) return e;
|
|
146
|
-
const n = new Set(e);
|
|
147
|
-
return n.add(t), n;
|
|
148
|
-
}), o.element && o.type !== "modal" && (w.has(t) || (w.add(t), q())), _(), t;
|
|
149
|
-
}
|
|
150
|
-
function $(t) {
|
|
151
|
-
c.delete(t), z((o) => {
|
|
152
|
-
if (!o.has(t)) return o;
|
|
153
|
-
const e = new Set(o);
|
|
154
|
-
return e.delete(t), e;
|
|
155
|
-
}), w.has(t) && (w.delete(t), F()), _();
|
|
156
|
-
}
|
|
157
|
-
function X(t) {
|
|
158
|
-
return L((o) => [...o, t]), () => {
|
|
159
|
-
L((o) => o.filter((e) => e !== t));
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
const Y = D(
|
|
163
|
-
() => d().size
|
|
164
|
-
), Z = D(() => {
|
|
165
|
-
if (d().size > 0) return !0;
|
|
166
|
-
for (const t of m())
|
|
167
|
-
if (t()) return !0;
|
|
168
|
-
return !1;
|
|
169
|
-
});
|
|
170
|
-
function tt(t, o, e) {
|
|
171
|
-
const n = `${o}_${++J}_${Math.random().toString(36).slice(2, 7)}`, r = D(t);
|
|
172
|
-
return T(() => {
|
|
173
|
-
r() && (K(n, e), B(() => {
|
|
174
|
-
$(n);
|
|
175
|
-
}));
|
|
176
|
-
}), B(() => {
|
|
177
|
-
$(n);
|
|
178
|
-
}), { id: n, isTopmost: () => H(n) };
|
|
179
|
-
}
|
|
180
|
-
export {
|
|
181
|
-
U as a,
|
|
182
|
-
W as b,
|
|
183
|
-
F as c,
|
|
184
|
-
q as d,
|
|
185
|
-
Y as e,
|
|
186
|
-
$ as f,
|
|
187
|
-
Q as g,
|
|
188
|
-
V as h,
|
|
189
|
-
Z as i,
|
|
190
|
-
X as j,
|
|
191
|
-
K as k,
|
|
192
|
-
_ as n,
|
|
193
|
-
P as o,
|
|
194
|
-
b as r,
|
|
195
|
-
tt as u
|
|
196
|
-
};
|