@editora/ui-react 0.1.6 → 0.1.7
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/AppHeader-49a8d3e0.mjs +98 -0
- package/dist/AppHeader-5c427700.js +33 -0
- package/dist/AppHeader.cjs.js +1 -0
- package/dist/AppHeader.d.ts +3 -0
- package/dist/AppHeader.d.ts.map +1 -0
- package/dist/AppHeader.esm.js +5 -0
- package/dist/Breadcrumb.cjs.js +1 -0
- package/dist/Breadcrumb.d.ts +3 -0
- package/dist/Breadcrumb.d.ts.map +1 -0
- package/dist/Breadcrumb.esm.js +80 -0
- package/dist/Card.cjs.js +34 -0
- package/dist/Card.d.ts +3 -0
- package/dist/Card.d.ts.map +1 -0
- package/dist/Card.esm.js +67 -0
- package/dist/Collapsible.cjs.js +1 -0
- package/dist/Collapsible.d.ts +3 -0
- package/dist/Collapsible.d.ts.map +1 -0
- package/dist/Collapsible.esm.js +113 -0
- package/dist/Combobox.cjs.js +1 -0
- package/dist/Combobox.d.ts +3 -0
- package/dist/Combobox.d.ts.map +1 -0
- package/dist/Combobox.esm.js +118 -0
- package/dist/Command-93c3b761.mjs +62 -0
- package/dist/Command-da77cea8.js +1 -0
- package/dist/Command.cjs.js +1 -0
- package/dist/Command.d.ts +3 -0
- package/dist/Command.d.ts.map +1 -0
- package/dist/Command.esm.js +7 -0
- package/dist/CommandPalette-136d08a9.mjs +68 -0
- package/dist/CommandPalette-e827844c.js +1 -0
- package/dist/CommandPalette.cjs.js +1 -0
- package/dist/CommandPalette.d.ts +3 -0
- package/dist/CommandPalette.d.ts.map +1 -0
- package/dist/CommandPalette.esm.js +7 -0
- package/dist/Drawer.cjs.js +1 -0
- package/dist/Drawer.d.ts +3 -0
- package/dist/Drawer.d.ts.map +1 -0
- package/dist/Drawer.esm.js +124 -0
- package/dist/FloatingToolbar.cjs.js +1 -0
- package/dist/FloatingToolbar.d.ts +3 -0
- package/dist/FloatingToolbar.d.ts.map +1 -0
- package/dist/FloatingToolbar.esm.js +100 -0
- package/dist/Form.cjs.js +1 -0
- package/dist/Form.d.ts +3 -0
- package/dist/Form.d.ts.map +1 -0
- package/dist/Form.esm.js +98 -0
- package/dist/HoverCard.cjs.js +1 -0
- package/dist/HoverCard.d.ts +3 -0
- package/dist/HoverCard.d.ts.map +1 -0
- package/dist/HoverCard.esm.js +61 -0
- package/dist/Input.cjs.js +1 -0
- package/dist/Input.d.ts +3 -0
- package/dist/Input.d.ts.map +1 -0
- package/dist/Input.esm.js +126 -0
- package/dist/Label.cjs.js +1 -0
- package/dist/Label.d.ts +3 -0
- package/dist/Label.d.ts.map +1 -0
- package/dist/Label.esm.js +46 -0
- package/dist/Layout.cjs.js +1 -0
- package/dist/Layout.d.ts +3 -0
- package/dist/Layout.d.ts.map +1 -0
- package/dist/Layout.esm.js +69 -0
- package/dist/Menu-010405cb.js +1 -0
- package/dist/Menu-43e67281.mjs +142 -0
- package/dist/Menu.cjs.js +1 -0
- package/dist/Menu.d.ts +3 -0
- package/dist/Menu.d.ts.map +1 -0
- package/dist/Menu.esm.js +6 -0
- package/dist/Menubar.cjs.js +1 -0
- package/dist/Menubar.d.ts +3 -0
- package/dist/Menubar.d.ts.map +1 -0
- package/dist/Menubar.esm.js +75 -0
- package/dist/Popover.cjs.js +1 -0
- package/dist/Popover.d.ts +3 -0
- package/dist/Popover.d.ts.map +1 -0
- package/dist/Popover.esm.js +68 -0
- package/dist/QuickActions.cjs.js +1 -0
- package/dist/QuickActions.d.ts +3 -0
- package/dist/QuickActions.d.ts.map +1 -0
- package/dist/QuickActions.esm.js +68 -0
- package/dist/Rating.cjs.js +1 -0
- package/dist/Rating.d.ts +2 -0
- package/dist/Rating.d.ts.map +1 -0
- package/dist/Rating.esm.js +81 -0
- package/dist/Select.cjs.js +1 -0
- package/dist/Select.d.ts +3 -0
- package/dist/Select.d.ts.map +1 -0
- package/dist/Select.esm.js +143 -0
- package/dist/SelectionPopup.cjs.js +1 -0
- package/dist/SelectionPopup.d.ts +3 -0
- package/dist/SelectionPopup.d.ts.map +1 -0
- package/dist/SelectionPopup.esm.js +85 -0
- package/dist/Sidebar.cjs.js +105 -0
- package/dist/Sidebar.d.ts +3 -0
- package/dist/Sidebar.d.ts.map +1 -0
- package/dist/Sidebar.esm.js +10161 -0
- package/dist/Switch.cjs.js +1 -0
- package/dist/Switch.d.ts +3 -0
- package/dist/Switch.d.ts.map +1 -0
- package/dist/Switch.esm.js +67 -0
- package/dist/Tabs.cjs.js +1 -0
- package/dist/Tabs.d.ts +3 -0
- package/dist/Tabs.d.ts.map +1 -0
- package/dist/Tabs.esm.js +78 -0
- package/dist/Textarea.cjs.js +1 -0
- package/dist/Textarea.d.ts +3 -0
- package/dist/Textarea.d.ts.map +1 -0
- package/dist/Textarea.esm.js +125 -0
- package/dist/ToggleGroup-4e0917a9.js +1 -0
- package/dist/ToggleGroup-5ef6a876.mjs +118 -0
- package/dist/ToggleGroup.cjs.js +1 -0
- package/dist/ToggleGroup.d.ts +3 -0
- package/dist/ToggleGroup.d.ts.map +1 -0
- package/dist/ToggleGroup.esm.js +5 -0
- package/dist/Tree.cjs.js +1 -0
- package/dist/Tree.d.ts +3 -0
- package/dist/Tree.d.ts.map +1 -0
- package/dist/Tree.esm.js +44 -0
- package/dist/Wizard.cjs.js +1 -0
- package/dist/Wizard.d.ts +3 -0
- package/dist/Wizard.d.ts.map +1 -0
- package/dist/Wizard.esm.js +172 -0
- package/dist/__tests__/RatingDemo.d.ts +4 -0
- package/dist/__tests__/RatingDemo.d.ts.map +1 -0
- package/dist/_internals-b9f3e909.js +1 -0
- package/dist/_internals-f8fb69a8.mjs +23 -0
- package/dist/components/AppHeader.cjs.js +1 -0
- package/dist/components/AppHeader.d.ts +15 -8
- package/dist/components/AppHeader.d.ts.map +1 -1
- package/dist/components/AppHeader.esm.js +5 -0
- package/dist/components/Breadcrumb.cjs.js +1 -0
- package/dist/components/Breadcrumb.d.ts +27 -8
- package/dist/components/Breadcrumb.d.ts.map +1 -1
- package/dist/components/Breadcrumb.esm.js +7 -0
- package/dist/components/Card.cjs.js +1 -0
- package/dist/components/Card.d.ts +21 -13
- package/dist/components/Card.d.ts.map +1 -1
- package/dist/components/Card.esm.js +6 -0
- package/dist/components/Collapsible.cjs.js +1 -0
- package/dist/components/Collapsible.d.ts +29 -5
- package/dist/components/Collapsible.d.ts.map +1 -1
- package/dist/components/Collapsible.esm.js +7 -0
- package/dist/components/Combobox.cjs.js +1 -0
- package/dist/components/Combobox.d.ts +15 -2
- package/dist/components/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox.esm.js +6 -0
- package/dist/components/Command.cjs.js +1 -0
- package/dist/components/Command.d.ts +17 -3
- package/dist/components/Command.d.ts.map +1 -1
- package/dist/components/Command.esm.js +7 -0
- package/dist/components/CommandPalette.cjs.js +1 -0
- package/dist/components/CommandPalette.d.ts +14 -12
- package/dist/components/CommandPalette.d.ts.map +1 -1
- package/dist/components/CommandPalette.esm.js +7 -0
- package/dist/components/DataTable.d.ts +1 -1
- package/dist/components/Drawer.cjs.js +1 -0
- package/dist/components/Drawer.d.ts +19 -10
- package/dist/components/Drawer.d.ts.map +1 -1
- package/dist/components/Drawer.esm.js +6 -0
- package/dist/components/Dropdown.d.ts +45 -29
- package/dist/components/Dropdown.d.ts.map +1 -1
- package/dist/components/FloatingToolbar.cjs.js +1 -0
- package/dist/components/FloatingToolbar.d.ts +7 -275
- package/dist/components/FloatingToolbar.d.ts.map +1 -1
- package/dist/components/FloatingToolbar.esm.js +7 -0
- package/dist/components/Form.cjs.js +1 -0
- package/dist/components/Form.d.ts +13 -30
- package/dist/components/Form.d.ts.map +1 -1
- package/dist/components/Form.esm.js +6 -0
- package/dist/components/HoverCard.cjs.js +1 -0
- package/dist/components/HoverCard.d.ts +8 -3
- package/dist/components/HoverCard.d.ts.map +1 -1
- package/dist/components/HoverCard.esm.js +6 -0
- package/dist/components/Input.cjs.js +1 -0
- package/dist/components/Input.d.ts +10 -3
- package/dist/components/Input.d.ts.map +1 -1
- package/dist/components/Input.esm.js +6 -0
- package/dist/components/Label.cjs.js +1 -0
- package/dist/components/Label.d.ts +6 -1
- package/dist/components/Label.d.ts.map +1 -1
- package/dist/components/Label.esm.js +6 -0
- package/dist/components/Layout.cjs.js +1 -0
- package/dist/components/Layout.d.ts +23 -5
- package/dist/components/Layout.d.ts.map +1 -1
- package/dist/components/Layout.esm.js +6 -0
- package/dist/components/Menu.cjs.js +1 -0
- package/dist/components/Menu.d.ts +46 -12
- package/dist/components/Menu.d.ts.map +1 -1
- package/dist/components/Menu.esm.js +6 -0
- package/dist/components/Menubar.cjs.js +1 -0
- package/dist/components/Menubar.d.ts +11 -266
- package/dist/components/Menubar.d.ts.map +1 -1
- package/dist/components/Menubar.esm.js +6 -0
- package/dist/components/Popover.cjs.js +1 -0
- package/dist/components/Popover.d.ts +6 -1
- package/dist/components/Popover.d.ts.map +1 -1
- package/dist/components/Popover.esm.js +7 -0
- package/dist/components/QuickActions.cjs.js +1 -0
- package/dist/components/QuickActions.d.ts +4 -1
- package/dist/components/QuickActions.d.ts.map +1 -1
- package/dist/components/QuickActions.esm.js +6 -0
- package/dist/components/Rating.cjs.js +1 -0
- package/dist/components/Rating.d.ts +52 -0
- package/dist/components/Rating.d.ts.map +1 -0
- package/dist/components/Rating.esm.js +5 -0
- package/dist/components/Select.cjs.js +1 -0
- package/dist/components/Select.d.ts +16 -1
- package/dist/components/Select.d.ts.map +1 -1
- package/dist/components/Select.esm.js +6 -0
- package/dist/components/SelectionPopup.cjs.js +1 -0
- package/dist/components/SelectionPopup.d.ts +21 -269
- package/dist/components/SelectionPopup.d.ts.map +1 -1
- package/dist/components/SelectionPopup.esm.js +7 -0
- package/dist/components/Sidebar.cjs.js +1 -0
- package/dist/components/Sidebar.d.ts +56 -21
- package/dist/components/Sidebar.d.ts.map +1 -1
- package/dist/components/Sidebar.esm.js +6 -0
- package/dist/components/Switch.cjs.js +1 -0
- package/dist/components/Switch.d.ts +4 -1
- package/dist/components/Switch.d.ts.map +1 -1
- package/dist/components/Switch.esm.js +6 -0
- package/dist/components/Tabs.cjs.js +1 -0
- package/dist/components/Tabs.d.ts +14 -1
- package/dist/components/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs.esm.js +6 -0
- package/dist/components/Textarea.cjs.js +1 -0
- package/dist/components/Textarea.d.ts +8 -1
- package/dist/components/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea.esm.js +6 -0
- package/dist/components/ToggleGroup.cjs.js +1 -0
- package/dist/components/ToggleGroup.d.ts +32 -1
- package/dist/components/ToggleGroup.d.ts.map +1 -1
- package/dist/components/ToggleGroup.esm.js +5 -0
- package/dist/components/Tree.cjs.js +1 -0
- package/dist/components/Tree.d.ts +21 -4
- package/dist/components/Tree.d.ts.map +1 -1
- package/dist/components/Tree.esm.js +5 -0
- package/dist/components/Wizard.cjs.js +1 -0
- package/dist/components/Wizard.d.ts +39 -7
- package/dist/components/Wizard.d.ts.map +1 -1
- package/dist/components/Wizard.esm.js +5 -0
- package/dist/components/index.d.ts +13 -4
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -170
- package/dist/index.d.ts +15 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +3956 -15799
- package/package.json +176 -2
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
import { w as S } from "./_internals-f8fb69a8.mjs";
|
|
3
|
+
const A = typeof window < "u" ? t.useLayoutEffect : t.useEffect, L = t.forwardRef(function({
|
|
4
|
+
children: v,
|
|
5
|
+
open: o,
|
|
6
|
+
placement: n,
|
|
7
|
+
offset: d,
|
|
8
|
+
shift: l,
|
|
9
|
+
flip: s,
|
|
10
|
+
closeOnEscape: f,
|
|
11
|
+
closeOnOutside: a,
|
|
12
|
+
onOpen: p,
|
|
13
|
+
onClose: g,
|
|
14
|
+
onOpenChange: m,
|
|
15
|
+
...R
|
|
16
|
+
}, N) {
|
|
17
|
+
const E = t.useRef(null);
|
|
18
|
+
return t.useImperativeHandle(N, () => E.current), t.useEffect(() => {
|
|
19
|
+
S("ui-popover", "Popover");
|
|
20
|
+
}, []), t.useEffect(() => {
|
|
21
|
+
const e = E.current;
|
|
22
|
+
if (!e)
|
|
23
|
+
return;
|
|
24
|
+
const r = () => p == null ? void 0 : p(), i = () => g == null ? void 0 : g(), u = (P) => {
|
|
25
|
+
const c = P.detail;
|
|
26
|
+
c && (m == null || m(c));
|
|
27
|
+
};
|
|
28
|
+
return e.addEventListener("open", r), e.addEventListener("close", i), e.addEventListener("open-change", u), () => {
|
|
29
|
+
e.removeEventListener("open", r), e.removeEventListener("close", i), e.removeEventListener("open-change", u);
|
|
30
|
+
};
|
|
31
|
+
}, [p, g, m]), A(() => {
|
|
32
|
+
const e = E.current;
|
|
33
|
+
if (!e)
|
|
34
|
+
return;
|
|
35
|
+
const r = (i, u, P = !0) => {
|
|
36
|
+
if (!P)
|
|
37
|
+
return;
|
|
38
|
+
const c = e.getAttribute(i);
|
|
39
|
+
if (u == null) {
|
|
40
|
+
c != null && e.removeAttribute(i);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
c !== u && e.setAttribute(i, u);
|
|
44
|
+
};
|
|
45
|
+
typeof o == "boolean" && r("open", o ? "" : null), r("placement", n ?? null, n !== void 0), r("offset", typeof d == "number" && Number.isFinite(d) ? String(d) : null, d !== void 0), r("shift", l === void 0 ? null : String(l), l !== void 0), r("flip", s === void 0 ? null : String(s), s !== void 0), r("close-on-escape", f === void 0 ? null : String(f), f !== void 0), r("close-on-outside", a === void 0 ? null : String(a), a !== void 0);
|
|
46
|
+
}, [o, n, d, l, s, f, a]), t.createElement("ui-popover", { ref: E, ...R }, v);
|
|
47
|
+
});
|
|
48
|
+
L.displayName = "Popover";
|
|
49
|
+
const b = t.forwardRef(
|
|
50
|
+
function({ children: v, ...o }, n) {
|
|
51
|
+
return t.createElement("span", { ref: n, slot: "trigger", ...o }, v);
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
b.displayName = "Popover.Trigger";
|
|
55
|
+
const w = t.forwardRef(
|
|
56
|
+
function({ children: v, ...o }, n) {
|
|
57
|
+
return t.createElement("div", { ref: n, slot: "content", ...o }, v);
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
w.displayName = "Popover.Content";
|
|
61
|
+
const I = Object.assign(L, {
|
|
62
|
+
Trigger: b,
|
|
63
|
+
Content: w
|
|
64
|
+
});
|
|
65
|
+
export {
|
|
66
|
+
I as Popover,
|
|
67
|
+
I as default
|
|
68
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react"),q=s=>s&&s.__esModule?s:{default:s},k=q(r),I=typeof window<"u"?r.useLayoutEffect:r.useEffect,R=k.default.forwardRef(function({open:f,mode:o,orientation:l,variant:d,floating:L,placement:A,collapsible:Q,label:_,headless:p,onSelect:b,onOpenChange:y,onToggle:E,children:w,...M},j){const v=r.useRef(null);return r.useImperativeHandle(j,()=>v.current),r.useEffect(()=>{const t=v.current;if(!t)return;const e=u=>{const c=u.detail;c&&(b==null||b(c))},i=u=>{var a;const c=(a=u.detail)==null?void 0:a.open;typeof c=="boolean"&&(y==null||y(c))},n=u=>{var a;const c=(a=u.detail)==null?void 0:a.open;typeof c=="boolean"&&(E==null||E(c))};return t.addEventListener("select",e),t.addEventListener("change",i),t.addEventListener("toggle",n),()=>{t.removeEventListener("select",e),t.removeEventListener("change",i),t.removeEventListener("toggle",n)}},[b,y,E]),I(()=>{const t=v.current;if(!t)return;const e=(n,u)=>{const c=t.getAttribute(n);if(u==null){c!=null&&t.removeAttribute(n);return}c!==u&&t.setAttribute(n,u)},i=(n,u)=>{u?e(n,""):e(n,null)};typeof f=="boolean"?i("open",f):e("open",null),e("mode",o&&o!=="bar"?o:null),e("orientation",l&&l!=="horizontal"?l:null),e("variant",d&&d!=="default"?d:null),i("floating",L),e("placement",A&&A!=="bottom-right"?A:null),i("collapsible",Q),e("label",_||null),i("headless",p)},[f,o,l,d,L,A,Q,_,p]),k.default.createElement("ui-quick-actions",{ref:v,...M},w)});R.displayName="QuickActions";const m=k.default.forwardRef(function({children:f,...o},l){return k.default.createElement("button",{ref:l,slot:"action",type:"button",...o},f)});m.displayName="QuickActions.Action";const h=Object.assign(R,{Action:m});exports.QuickActions=h;exports.default=h;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuickActions.d.ts","sourceRoot":"","sources":["../src/QuickActions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAClE,YAAY,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import E, { useRef as _, useImperativeHandle as j, useEffect as m, useLayoutEffect as q } from "react";
|
|
2
|
+
const x = typeof window < "u" ? q : m, p = E.forwardRef(function({
|
|
3
|
+
open: r,
|
|
4
|
+
mode: u,
|
|
5
|
+
orientation: o,
|
|
6
|
+
variant: f,
|
|
7
|
+
floating: v,
|
|
8
|
+
placement: a,
|
|
9
|
+
collapsible: k,
|
|
10
|
+
label: L,
|
|
11
|
+
headless: Q,
|
|
12
|
+
onSelect: d,
|
|
13
|
+
onOpenChange: A,
|
|
14
|
+
onToggle: b,
|
|
15
|
+
children: w,
|
|
16
|
+
...I
|
|
17
|
+
}, N) {
|
|
18
|
+
const y = _(null);
|
|
19
|
+
return j(N, () => y.current), m(() => {
|
|
20
|
+
const t = y.current;
|
|
21
|
+
if (!t)
|
|
22
|
+
return;
|
|
23
|
+
const e = (n) => {
|
|
24
|
+
const c = n.detail;
|
|
25
|
+
c && (d == null || d(c));
|
|
26
|
+
}, s = (n) => {
|
|
27
|
+
var l;
|
|
28
|
+
const c = (l = n.detail) == null ? void 0 : l.open;
|
|
29
|
+
typeof c == "boolean" && (A == null || A(c));
|
|
30
|
+
}, i = (n) => {
|
|
31
|
+
var l;
|
|
32
|
+
const c = (l = n.detail) == null ? void 0 : l.open;
|
|
33
|
+
typeof c == "boolean" && (b == null || b(c));
|
|
34
|
+
};
|
|
35
|
+
return t.addEventListener("select", e), t.addEventListener("change", s), t.addEventListener("toggle", i), () => {
|
|
36
|
+
t.removeEventListener("select", e), t.removeEventListener("change", s), t.removeEventListener("toggle", i);
|
|
37
|
+
};
|
|
38
|
+
}, [d, A, b]), x(() => {
|
|
39
|
+
const t = y.current;
|
|
40
|
+
if (!t)
|
|
41
|
+
return;
|
|
42
|
+
const e = (i, n) => {
|
|
43
|
+
const c = t.getAttribute(i);
|
|
44
|
+
if (n == null) {
|
|
45
|
+
c != null && t.removeAttribute(i);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
c !== n && t.setAttribute(i, n);
|
|
49
|
+
}, s = (i, n) => {
|
|
50
|
+
n ? e(i, "") : e(i, null);
|
|
51
|
+
};
|
|
52
|
+
typeof r == "boolean" ? s("open", r) : e("open", null), e("mode", u && u !== "bar" ? u : null), e("orientation", o && o !== "horizontal" ? o : null), e("variant", f && f !== "default" ? f : null), s("floating", v), e("placement", a && a !== "bottom-right" ? a : null), s("collapsible", k), e("label", L || null), s("headless", Q);
|
|
53
|
+
}, [r, u, o, f, v, a, k, L, Q]), E.createElement("ui-quick-actions", { ref: y, ...I }, w);
|
|
54
|
+
});
|
|
55
|
+
p.displayName = "QuickActions";
|
|
56
|
+
const R = E.forwardRef(
|
|
57
|
+
function({ children: r, ...u }, o) {
|
|
58
|
+
return E.createElement("button", { ref: o, slot: "action", type: "button", ...u }, r);
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
R.displayName = "QuickActions.Action";
|
|
62
|
+
const B = Object.assign(p, {
|
|
63
|
+
Action: R
|
|
64
|
+
});
|
|
65
|
+
export {
|
|
66
|
+
B as QuickActions,
|
|
67
|
+
B as default
|
|
68
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react"),D=i=>i&&i.__esModule?i:{default:i},N=D(r),F=typeof window<"u"?r.useLayoutEffect:r.useEffect,O=N.default.forwardRef(function({value:b,max:E,precision:_,disabled:p,readonly:v,variant:c,size:s,theme:f,tone:m,state:a,animation:P,shape:d,radius:g,ariaLabel:S,ariaLabelledBy:A,ariaDescribedBy:M,label:w,showValue:I,onChange:y,children:T,...k},x){const R=r.useRef(null);return r.useImperativeHandle(x,()=>R.current),r.useEffect(()=>{const e=R.current;if(!e)return;const t=o=>{const l=o.detail;l&&(y==null||y(l))};return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}},[y]),F(()=>{const e=R.current;if(!e)return;const t=(n,u)=>{const H=e.getAttribute(n);if(u==null){H!=null&&e.removeAttribute(n);return}H!==u&&e.setAttribute(n,u)},o=(n,u)=>{u===!0?t(n,""):t(n,null)},l=(n,u)=>{e[n]=u},L=b??0,j=E??5,q=_??1;l("value",L),l("max",j),l("precision",q),l("disabled",!!p),l("readonly",!!v),t("value",String(L)),t("max",String(j)),t("precision",String(q)),o("disabled",p),o("readonly",v),t("variant",c&&c!=="default"?c:null),t("size",s&&s!=="md"?s:null),t("theme",f&&f!=="light"?f:null),t("tone",m||null),t("state",a&&a!=="idle"?a:null),t("animation",P||null),t("shape",d&&d!=="rounded"?d:null),t("aria-label",S||null),t("aria-labelledby",A||null),t("aria-describedby",M||null),t("label",w||null),o("show-value",I),g?(e.style.setProperty("--ui-rating-radius",g),t("radius",g)):(e.style.removeProperty("--ui-rating-radius"),t("radius",null))},[b,E,_,p,v,c,s,f,m,a,P,d,g,S,A,M,w,I]),N.default.createElement("ui-rating",{ref:R,...k},T)});O.displayName="Rating";const G=O;exports.Rating=G;
|
package/dist/Rating.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rating.d.ts","sourceRoot":"","sources":["../src/Rating.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import M, { useRef as G, useImperativeHandle as J, useEffect as N, useLayoutEffect as K } from "react";
|
|
2
|
+
const O = typeof window < "u" ? K : N, j = M.forwardRef(
|
|
3
|
+
function({
|
|
4
|
+
value: p,
|
|
5
|
+
max: m,
|
|
6
|
+
precision: v,
|
|
7
|
+
disabled: g,
|
|
8
|
+
readonly: R,
|
|
9
|
+
variant: i,
|
|
10
|
+
size: o,
|
|
11
|
+
theme: c,
|
|
12
|
+
tone: E,
|
|
13
|
+
state: s,
|
|
14
|
+
animation: b,
|
|
15
|
+
shape: f,
|
|
16
|
+
radius: d,
|
|
17
|
+
ariaLabel: A,
|
|
18
|
+
ariaLabelledBy: P,
|
|
19
|
+
ariaDescribedBy: w,
|
|
20
|
+
label: S,
|
|
21
|
+
showValue: I,
|
|
22
|
+
onChange: a,
|
|
23
|
+
children: k,
|
|
24
|
+
...q
|
|
25
|
+
}, F) {
|
|
26
|
+
const y = G(null);
|
|
27
|
+
return J(F, () => y.current), N(() => {
|
|
28
|
+
const n = y.current;
|
|
29
|
+
if (!n)
|
|
30
|
+
return;
|
|
31
|
+
const t = (u) => {
|
|
32
|
+
const e = u.detail;
|
|
33
|
+
e && (a == null || a(e));
|
|
34
|
+
};
|
|
35
|
+
return n.addEventListener("change", t), () => {
|
|
36
|
+
n.removeEventListener("change", t);
|
|
37
|
+
};
|
|
38
|
+
}, [a]), O(() => {
|
|
39
|
+
const n = y.current;
|
|
40
|
+
if (!n)
|
|
41
|
+
return;
|
|
42
|
+
const t = (l, r) => {
|
|
43
|
+
const H = n.getAttribute(l);
|
|
44
|
+
if (r == null) {
|
|
45
|
+
H != null && n.removeAttribute(l);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
H !== r && n.setAttribute(l, r);
|
|
49
|
+
}, u = (l, r) => {
|
|
50
|
+
r === !0 ? t(l, "") : t(l, null);
|
|
51
|
+
}, e = (l, r) => {
|
|
52
|
+
n[l] = r;
|
|
53
|
+
}, L = p ?? 0, _ = m ?? 5, x = v ?? 1;
|
|
54
|
+
e("value", L), e("max", _), e("precision", x), e("disabled", !!g), e("readonly", !!R), t("value", String(L)), t("max", String(_)), t("precision", String(x)), u("disabled", g), u("readonly", R), t("variant", i && i !== "default" ? i : null), t("size", o && o !== "md" ? o : null), t("theme", c && c !== "light" ? c : null), t("tone", E || null), t("state", s && s !== "idle" ? s : null), t("animation", b || null), t("shape", f && f !== "rounded" ? f : null), t("aria-label", A || null), t("aria-labelledby", P || null), t("aria-describedby", w || null), t("label", S || null), u("show-value", I), d ? (n.style.setProperty("--ui-rating-radius", d), t("radius", d)) : (n.style.removeProperty("--ui-rating-radius"), t("radius", null));
|
|
55
|
+
}, [
|
|
56
|
+
p,
|
|
57
|
+
m,
|
|
58
|
+
v,
|
|
59
|
+
g,
|
|
60
|
+
R,
|
|
61
|
+
i,
|
|
62
|
+
o,
|
|
63
|
+
c,
|
|
64
|
+
E,
|
|
65
|
+
s,
|
|
66
|
+
b,
|
|
67
|
+
f,
|
|
68
|
+
d,
|
|
69
|
+
A,
|
|
70
|
+
P,
|
|
71
|
+
w,
|
|
72
|
+
S,
|
|
73
|
+
I
|
|
74
|
+
]), M.createElement("ui-rating", { ref: y, ...q }, k);
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
j.displayName = "Rating";
|
|
78
|
+
const U = j;
|
|
79
|
+
export {
|
|
80
|
+
U as Rating
|
|
81
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react"),x=c=>c&&c.__esModule?c:{default:c},l=x(a),z=typeof window<"u"?a.useLayoutEffect:a.useEffect,J=l.default.forwardRef(function({children:r,value:t,disabled:u,loading:G,required:H,invalid:M,headless:j,placeholder:O,name:A,label:N,description:_,error:v,size:d,variant:p,tone:S,density:m,shape:E,elevation:b,radius:D,optionBorder:q,showCheck:T,checkPlacement:B,validation:L,onChange:y,onInput:R,onValueChange:g,...$},k){const w=a.useRef(null);return a.useImperativeHandle(k,()=>w.current),a.useEffect(()=>{const n=w.current;if(!n)return;const e=i=>{var s,F;return((s=i.detail)==null?void 0:s.value)??((F=i.target)==null?void 0:F.value)??""},o=i=>{R==null||R(e(i))},f=i=>{const s=e(i);y==null||y(s),g==null||g(s)};return n.addEventListener("input",o),n.addEventListener("change",f),()=>{n.removeEventListener("input",o),n.removeEventListener("change",f)}},[y,R,g]),z(()=>{const n=w.current;if(!n)return;const e=(f,i)=>{const s=n.getAttribute(f);if(i==null){s!=null&&n.removeAttribute(f);return}s!==i&&n.setAttribute(f,i)},o=(f,i)=>{i?n.hasAttribute(f)||n.setAttribute(f,""):n.hasAttribute(f)&&n.removeAttribute(f)};e("value",t!=null?String(t):null),o("disabled",u),o("loading",G),o("required",H),o("headless",j),o("invalid",M),e("placeholder",O||null),e("name",A||null),e("label",N||null),e("description",_||null),e("error",v||null),e("size",d&&d!=="md"&&d!=="2"?d:null),e("variant",p&&p!=="classic"?p:null),e("tone",S&&S!=="default"?S:null),e("density",m&&m!=="default"?m:null),e("shape",E&&E!=="rounded"?E:null),e("elevation",b&&b!=="low"?b:null),e("radius",D?String(D):null),o("option-border",q),o("show-check",T),e("check-placement",T?B||"end":null),e("validation",L&&L!=="none"?L:null)},[t,u,G,H,M,j,O,A,N,_,v,d,p,S,m,E,b,D,q,T,B,L]),l.default.createElement("ui-select",{ref:w,...$},r)});J.displayName="Select";const K=l.default.forwardRef(function(r,t){return l.default.createElement("option",{ref:t,...r})});K.displayName="Select.Option";const P=l.default.forwardRef(function(r,t){return l.default.createElement("optgroup",{ref:t,...r})});P.displayName="Select.OptGroup";const Q=l.default.forwardRef(function({children:r,...t},u){return l.default.createElement("span",{ref:u,slot:"label",...t},r)});Q.displayName="Select.Label";const U=l.default.forwardRef(function({children:r,...t},u){return l.default.createElement("span",{ref:u,slot:"description",...t},r)});U.displayName="Select.Description";const W=l.default.forwardRef(function({children:r,...t},u){return l.default.createElement("span",{ref:u,slot:"error",...t},r)});W.displayName="Select.Error";const X=l.default.forwardRef(function({children:r,...t},u){return l.default.createElement("span",{ref:u,slot:"leading",...t},r)});X.displayName="Select.Leading";const Y=l.default.forwardRef(function({children:r,...t},u){return l.default.createElement("span",{ref:u,slot:"trailing",...t},r)});Y.displayName="Select.Trailing";const Z=Object.assign(J,{Option:K,OptGroup:P,Label:Q,Description:U,Error:W,Leading:X,Trailing:Y});exports.Select=Z;exports.default=Z;
|
package/dist/Select.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Select, default } from './components/Select';
|
|
2
|
+
export type { SelectProps, SelectOptionProps, SelectOptGroupProps, SelectLabelProps, SelectDescriptionProps, SelectErrorProps, SelectLeadingProps, SelectTrailingProps, } from './components/Select';
|
|
3
|
+
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../src/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACtD,YAAY,EACV,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import r, { useRef as k, useImperativeHandle as P, useEffect as F, useLayoutEffect as z } from "react";
|
|
2
|
+
const I = typeof window < "u" ? z : F, J = r.forwardRef(function({
|
|
3
|
+
children: l,
|
|
4
|
+
value: t,
|
|
5
|
+
disabled: c,
|
|
6
|
+
loading: T,
|
|
7
|
+
required: H,
|
|
8
|
+
invalid: _,
|
|
9
|
+
headless: j,
|
|
10
|
+
placeholder: g,
|
|
11
|
+
name: O,
|
|
12
|
+
label: A,
|
|
13
|
+
description: N,
|
|
14
|
+
error: v,
|
|
15
|
+
size: a,
|
|
16
|
+
variant: d,
|
|
17
|
+
tone: p,
|
|
18
|
+
density: S,
|
|
19
|
+
shape: m,
|
|
20
|
+
elevation: E,
|
|
21
|
+
radius: D,
|
|
22
|
+
optionBorder: q,
|
|
23
|
+
showCheck: G,
|
|
24
|
+
checkPlacement: x,
|
|
25
|
+
validation: L,
|
|
26
|
+
onChange: b,
|
|
27
|
+
onInput: y,
|
|
28
|
+
onValueChange: R,
|
|
29
|
+
...Z
|
|
30
|
+
}, $) {
|
|
31
|
+
const w = k(null);
|
|
32
|
+
return P($, () => w.current), F(() => {
|
|
33
|
+
const n = w.current;
|
|
34
|
+
if (!n)
|
|
35
|
+
return;
|
|
36
|
+
const e = (i) => {
|
|
37
|
+
var s, B;
|
|
38
|
+
return ((s = i.detail) == null ? void 0 : s.value) ?? ((B = i.target) == null ? void 0 : B.value) ?? "";
|
|
39
|
+
}, o = (i) => {
|
|
40
|
+
y == null || y(e(i));
|
|
41
|
+
}, u = (i) => {
|
|
42
|
+
const s = e(i);
|
|
43
|
+
b == null || b(s), R == null || R(s);
|
|
44
|
+
};
|
|
45
|
+
return n.addEventListener("input", o), n.addEventListener("change", u), () => {
|
|
46
|
+
n.removeEventListener("input", o), n.removeEventListener("change", u);
|
|
47
|
+
};
|
|
48
|
+
}, [b, y, R]), I(() => {
|
|
49
|
+
const n = w.current;
|
|
50
|
+
if (!n)
|
|
51
|
+
return;
|
|
52
|
+
const e = (u, i) => {
|
|
53
|
+
const s = n.getAttribute(u);
|
|
54
|
+
if (i == null) {
|
|
55
|
+
s != null && n.removeAttribute(u);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
s !== i && n.setAttribute(u, i);
|
|
59
|
+
}, o = (u, i) => {
|
|
60
|
+
i ? n.hasAttribute(u) || n.setAttribute(u, "") : n.hasAttribute(u) && n.removeAttribute(u);
|
|
61
|
+
};
|
|
62
|
+
e("value", t != null ? String(t) : null), o("disabled", c), o("loading", T), o("required", H), o("headless", j), o("invalid", _), e("placeholder", g || null), e("name", O || null), e("label", A || null), e("description", N || null), e("error", v || null), e("size", a && a !== "md" && a !== "2" ? a : null), e("variant", d && d !== "classic" ? d : null), e("tone", p && p !== "default" ? p : null), e("density", S && S !== "default" ? S : null), e("shape", m && m !== "rounded" ? m : null), e("elevation", E && E !== "low" ? E : null), e("radius", D ? String(D) : null), o("option-border", q), o("show-check", G), e("check-placement", G ? x || "end" : null), e("validation", L && L !== "none" ? L : null);
|
|
63
|
+
}, [
|
|
64
|
+
t,
|
|
65
|
+
c,
|
|
66
|
+
T,
|
|
67
|
+
H,
|
|
68
|
+
_,
|
|
69
|
+
j,
|
|
70
|
+
g,
|
|
71
|
+
O,
|
|
72
|
+
A,
|
|
73
|
+
N,
|
|
74
|
+
v,
|
|
75
|
+
a,
|
|
76
|
+
d,
|
|
77
|
+
p,
|
|
78
|
+
S,
|
|
79
|
+
m,
|
|
80
|
+
E,
|
|
81
|
+
D,
|
|
82
|
+
q,
|
|
83
|
+
G,
|
|
84
|
+
x,
|
|
85
|
+
L
|
|
86
|
+
]), r.createElement("ui-select", { ref: w, ...Z }, l);
|
|
87
|
+
});
|
|
88
|
+
J.displayName = "Select";
|
|
89
|
+
const K = r.forwardRef(
|
|
90
|
+
function(l, t) {
|
|
91
|
+
return /* @__PURE__ */ r.createElement("option", { ref: t, ...l });
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
K.displayName = "Select.Option";
|
|
95
|
+
const M = r.forwardRef(
|
|
96
|
+
function(l, t) {
|
|
97
|
+
return /* @__PURE__ */ r.createElement("optgroup", { ref: t, ...l });
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
M.displayName = "Select.OptGroup";
|
|
101
|
+
const Q = r.forwardRef(
|
|
102
|
+
function({ children: l, ...t }, c) {
|
|
103
|
+
return r.createElement("span", { ref: c, slot: "label", ...t }, l);
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
Q.displayName = "Select.Label";
|
|
107
|
+
const U = r.forwardRef(
|
|
108
|
+
function({ children: l, ...t }, c) {
|
|
109
|
+
return r.createElement("span", { ref: c, slot: "description", ...t }, l);
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
U.displayName = "Select.Description";
|
|
113
|
+
const W = r.forwardRef(
|
|
114
|
+
function({ children: l, ...t }, c) {
|
|
115
|
+
return r.createElement("span", { ref: c, slot: "error", ...t }, l);
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
W.displayName = "Select.Error";
|
|
119
|
+
const X = r.forwardRef(
|
|
120
|
+
function({ children: l, ...t }, c) {
|
|
121
|
+
return r.createElement("span", { ref: c, slot: "leading", ...t }, l);
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
X.displayName = "Select.Leading";
|
|
125
|
+
const Y = r.forwardRef(
|
|
126
|
+
function({ children: l, ...t }, c) {
|
|
127
|
+
return r.createElement("span", { ref: c, slot: "trailing", ...t }, l);
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
Y.displayName = "Select.Trailing";
|
|
131
|
+
const h = Object.assign(J, {
|
|
132
|
+
Option: K,
|
|
133
|
+
OptGroup: M,
|
|
134
|
+
Label: Q,
|
|
135
|
+
Description: U,
|
|
136
|
+
Error: W,
|
|
137
|
+
Leading: X,
|
|
138
|
+
Trailing: Y
|
|
139
|
+
});
|
|
140
|
+
export {
|
|
141
|
+
h as Select,
|
|
142
|
+
h as default
|
|
143
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react"),F=require("./_internals-b9f3e909.js"),h=r=>r&&r.__esModule?r:{default:r},c=h(s),B=typeof window<"u"?s.useLayoutEffect:s.useEffect,M=c.default.forwardRef(function(_,w){const{children:A,anchorId:f,open:a,placement:p,offset:d,strategy:v,arrow:g,variant:m,tone:E,radius:R,size:S,closeOnOutside:L,closeOnEscape:I,onOpen:y,onClose:b,onOpenChange:n,...z}=_,P=s.useRef(null);return c.default.useImperativeHandle(w,()=>P.current),s.useEffect(()=>{F.warnIfElementNotRegistered("ui-selection-popup","SelectionPopup")},[]),s.useEffect(()=>{const e=P.current;if(!e)return;const t=()=>{y==null||y(),n==null||n(!0)},u=()=>{b==null||b(),n==null||n(!1)};return e.addEventListener("open",t),e.addEventListener("close",u),()=>{e.removeEventListener("open",t),e.removeEventListener("close",u)}},[y,b,n]),B(()=>{var N,H;const e=P.current;if(!e)return;const t=(o,l)=>{const i=e.getAttribute(o);if(l==null){i!=null&&e.removeAttribute(o);return}i!==l&&e.setAttribute(o,l)},u=(o,l,i=void 0)=>{if(l==null){i!==void 0&&t(o,i?null:"false");return}l?t(o,""):t(o,"false")};t("anchor-id",f??null),t("placement",p&&p!=="top"?p:null),t("offset",typeof d=="number"&&Number.isFinite(d)?String(d):null),t("strategy",v&&v!=="fixed"?v:null),t("variant",m&&m!=="default"?m:null),t("tone",E&&E!=="brand"?E:null),t("radius",R?String(R):null),t("size",S&&S!=="md"?S:null),u("arrow",g),u("close-on-outside",L,!0),u("close-on-escape",I,!0),a&&f?(N=e.openFor)==null||N.call(e,f):a?e.setAttribute("open",""):a===!1?(H=e.close)==null||H.call(e):e.removeAttribute("open")},[a,f,p,d,v,g,m,E,R,S,L,I]),c.default.createElement("ui-selection-popup",{ref:P,...z},A)});M.displayName="SelectionPopup";const j=c.default.forwardRef(function({children:_,...w},A){return c.default.createElement("div",{ref:A,slot:"content",...w},_)});j.displayName="SelectionPopup.Content";const q=Object.assign(M,{Content:j});exports.SelectionPopup=q;exports.default=q;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectionPopup.d.ts","sourceRoot":"","sources":["../src/SelectionPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtE,YAAY,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import l, { useRef as j, useEffect as L, useLayoutEffect as B } from "react";
|
|
2
|
+
import { w as k } from "./_internals-f8fb69a8.mjs";
|
|
3
|
+
const q = typeof window < "u" ? B : L, z = l.forwardRef(function(b, w) {
|
|
4
|
+
const {
|
|
5
|
+
children: P,
|
|
6
|
+
anchorId: u,
|
|
7
|
+
open: c,
|
|
8
|
+
placement: f,
|
|
9
|
+
offset: p,
|
|
10
|
+
strategy: a,
|
|
11
|
+
arrow: R,
|
|
12
|
+
variant: d,
|
|
13
|
+
tone: m,
|
|
14
|
+
radius: A,
|
|
15
|
+
size: v,
|
|
16
|
+
closeOnOutside: g,
|
|
17
|
+
closeOnEscape: I,
|
|
18
|
+
onOpen: E,
|
|
19
|
+
onClose: y,
|
|
20
|
+
onOpenChange: n,
|
|
21
|
+
...h
|
|
22
|
+
} = b, S = j(null);
|
|
23
|
+
return l.useImperativeHandle(w, () => S.current), L(() => {
|
|
24
|
+
k("ui-selection-popup", "SelectionPopup");
|
|
25
|
+
}, []), L(() => {
|
|
26
|
+
const e = S.current;
|
|
27
|
+
if (!e)
|
|
28
|
+
return;
|
|
29
|
+
const t = () => {
|
|
30
|
+
E == null || E(), n == null || n(!0);
|
|
31
|
+
}, r = () => {
|
|
32
|
+
y == null || y(), n == null || n(!1);
|
|
33
|
+
};
|
|
34
|
+
return e.addEventListener("open", t), e.addEventListener("close", r), () => {
|
|
35
|
+
e.removeEventListener("open", t), e.removeEventListener("close", r);
|
|
36
|
+
};
|
|
37
|
+
}, [E, y, n]), q(() => {
|
|
38
|
+
var N, H;
|
|
39
|
+
const e = S.current;
|
|
40
|
+
if (!e)
|
|
41
|
+
return;
|
|
42
|
+
const t = (o, s) => {
|
|
43
|
+
const i = e.getAttribute(o);
|
|
44
|
+
if (s == null) {
|
|
45
|
+
i != null && e.removeAttribute(o);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
i !== s && e.setAttribute(o, s);
|
|
49
|
+
}, r = (o, s, i = void 0) => {
|
|
50
|
+
if (s == null) {
|
|
51
|
+
i !== void 0 && t(o, i ? null : "false");
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
s ? t(o, "") : t(o, "false");
|
|
55
|
+
};
|
|
56
|
+
t("anchor-id", u ?? null), t("placement", f && f !== "top" ? f : null), t("offset", typeof p == "number" && Number.isFinite(p) ? String(p) : null), t("strategy", a && a !== "fixed" ? a : null), t("variant", d && d !== "default" ? d : null), t("tone", m && m !== "brand" ? m : null), t("radius", A ? String(A) : null), t("size", v && v !== "md" ? v : null), r("arrow", R), r("close-on-outside", g, !0), r("close-on-escape", I, !0), c && u ? (N = e.openFor) == null || N.call(e, u) : c ? e.setAttribute("open", "") : c === !1 ? (H = e.close) == null || H.call(e) : e.removeAttribute("open");
|
|
57
|
+
}, [
|
|
58
|
+
c,
|
|
59
|
+
u,
|
|
60
|
+
f,
|
|
61
|
+
p,
|
|
62
|
+
a,
|
|
63
|
+
R,
|
|
64
|
+
d,
|
|
65
|
+
m,
|
|
66
|
+
A,
|
|
67
|
+
v,
|
|
68
|
+
g,
|
|
69
|
+
I
|
|
70
|
+
]), l.createElement("ui-selection-popup", { ref: S, ...h }, P);
|
|
71
|
+
});
|
|
72
|
+
z.displayName = "SelectionPopup";
|
|
73
|
+
const F = l.forwardRef(
|
|
74
|
+
function({ children: b, ...w }, P) {
|
|
75
|
+
return l.createElement("div", { ref: P, slot: "content", ...w }, b);
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
F.displayName = "SelectionPopup.Content";
|
|
79
|
+
const D = Object.assign(z, {
|
|
80
|
+
Content: F
|
|
81
|
+
});
|
|
82
|
+
export {
|
|
83
|
+
D as SelectionPopup,
|
|
84
|
+
D as default
|
|
85
|
+
};
|