@devalok/shilp-sutra 0.8.4 → 0.9.1
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/_chunks/avatar.js +50 -0
- package/dist/_chunks/button.js +95 -0
- package/dist/_chunks/card.js +40 -0
- package/dist/_chunks/checkbox.js +14 -0
- package/dist/_chunks/form.js +27 -0
- package/dist/_chunks/primitives.js +6965 -0
- package/dist/_chunks/sidebar.js +592 -0
- package/dist/_chunks/spinner.js +34 -0
- package/dist/_chunks/tiptap.js +15254 -0
- package/dist/_chunks/tooltip.js +13 -0
- package/dist/_chunks/tree-view.js +304 -0
- package/dist/_chunks/use-calendar.js +990 -0
- package/dist/_chunks/utils.js +15 -0
- package/dist/_chunks/vendor-client.js +1835 -0
- package/dist/_chunks/vendor-utils.js +3995 -0
- package/dist/composed/avatar-group.js +20 -20
- package/dist/composed/command-palette.js +1 -1
- package/dist/composed/confirm-dialog.js +5 -5
- package/dist/composed/content-card.d.ts +1 -1
- package/dist/composed/content-card.js +2 -2
- package/dist/composed/date-picker/index.js +13 -0
- package/dist/composed/empty-state.js +10 -10
- package/dist/composed/error-boundary.js +2 -2
- package/dist/composed/global-loading.js +4 -4
- package/dist/composed/index.js +45 -53
- package/dist/composed/loading-skeleton.js +2 -2
- package/dist/composed/member-picker.js +5 -5
- package/dist/composed/page-header.js +4 -4
- package/dist/composed/page-skeletons.js +1 -1
- package/dist/composed/priority-indicator.js +6 -6
- package/dist/composed/rich-text-editor.js +422 -209
- package/dist/composed/schedule-view.js +1 -1
- package/dist/composed/simple-tooltip.js +6 -6
- package/dist/composed/status-badge.d.ts +1 -1
- package/dist/composed/status-badge.js +2 -2
- package/dist/shell/bottom-navbar.js +1 -1
- package/dist/shell/notification-center.js +2 -2
- package/dist/shell/notification-preferences.js +32 -33
- package/dist/shell/sidebar.js +24 -24
- package/dist/shell/top-bar.js +22 -22
- package/dist/ui/accordion.js +17 -17
- package/dist/ui/alert-dialog.js +29 -29
- package/dist/ui/alert.d.ts +2 -2
- package/dist/ui/alert.js +65 -44
- package/dist/ui/aspect-ratio.js +1 -1
- package/dist/ui/autocomplete.js +11 -11
- package/dist/ui/avatar.d.ts +1 -1
- package/dist/ui/avatar.js +67 -25
- package/dist/ui/badge.d.ts +2 -2
- package/dist/ui/badge.js +115 -91
- package/dist/ui/banner.d.ts +1 -1
- package/dist/ui/banner.js +2 -2
- package/dist/ui/breadcrumb.js +14 -14
- package/dist/ui/button-group.js +30 -15
- package/dist/ui/button.d.ts +2 -2
- package/dist/ui/button.js +114 -71
- package/dist/ui/card.js +66 -22
- package/dist/ui/charts/index.js +1221 -18
- package/dist/ui/checkbox.js +25 -5
- package/dist/ui/chip.d.ts +4 -4
- package/dist/ui/chip.js +2 -2
- package/dist/ui/code.js +1 -1
- package/dist/ui/collapsible.js +5 -5
- package/dist/ui/color-input.js +11 -11
- package/dist/ui/combobox.js +12 -12
- package/dist/ui/container.js +4 -4
- package/dist/ui/context-menu.js +37 -37
- package/dist/ui/data-table-toolbar.js +18 -18
- package/dist/ui/data-table.js +2 -2
- package/dist/ui/dialog.js +33 -33
- package/dist/ui/dropdown-menu.js +60 -60
- package/dist/ui/file-upload.js +1 -1
- package/dist/ui/form.js +36 -15
- package/dist/ui/hover-card.js +7 -7
- package/dist/ui/icon-button.js +9 -9
- package/dist/ui/index.js +523 -325
- package/dist/ui/input-otp.d.ts +2 -2
- package/dist/ui/input-otp.js +14 -14
- package/dist/ui/input.js +56 -28
- package/dist/ui/label.js +18 -4
- package/dist/ui/lib/utils.js +4 -5
- package/dist/ui/link.js +9 -9
- package/dist/ui/menubar.js +81 -81
- package/dist/ui/navigation-menu.js +42 -42
- package/dist/ui/number-input.js +13 -13
- package/dist/ui/pagination.js +5 -5
- package/dist/ui/popover.js +9 -9
- package/dist/ui/progress.d.ts +1 -1
- package/dist/ui/progress.js +15 -15
- package/dist/ui/radio.js +10 -10
- package/dist/ui/search-input.js +5 -5
- package/dist/ui/segmented-control.js +91 -83
- package/dist/ui/select.js +52 -52
- package/dist/ui/separator.js +20 -5
- package/dist/ui/sheet.js +28 -28
- package/dist/ui/sidebar.js +36 -560
- package/dist/ui/skeleton.d.ts +1 -1
- package/dist/ui/skeleton.js +7 -7
- package/dist/ui/slider.js +11 -11
- package/dist/ui/spinner.js +37 -2
- package/dist/ui/stack.js +1 -1
- package/dist/ui/stat-card.js +1 -1
- package/dist/ui/stepper.js +15 -15
- package/dist/ui/switch.js +22 -3
- package/dist/ui/table.js +1 -1
- package/dist/ui/tabs.js +59 -32
- package/dist/ui/text.js +2 -2
- package/dist/ui/textarea.js +7 -7
- package/dist/ui/toast.d.ts +1 -1
- package/dist/ui/toast.js +28 -28
- package/dist/ui/toggle-group.js +11 -11
- package/dist/ui/toggle.js +7 -7
- package/dist/ui/tooltip.js +17 -6
- package/dist/ui/transitions.js +68 -58
- package/dist/ui/tree-view/index.js +7 -0
- package/dist/ui/visually-hidden.js +3 -3
- package/llms-full.txt +1 -1
- package/llms.txt +7 -0
- package/package.json +656 -706
- package/dist/_virtual/client.js +0 -5
- package/dist/_virtual/index.js +0 -5
- package/dist/_virtual/react-dom-client.development.js +0 -5
- package/dist/_virtual/react-dom-client.production.js +0 -5
- package/dist/_virtual/scheduler.development.js +0 -5
- package/dist/_virtual/scheduler.production.js +0 -5
- package/dist/composed/date-picker/calendar-grid.js +0 -194
- package/dist/composed/date-picker/date-picker.js +0 -124
- package/dist/composed/date-picker/date-range-picker.js +0 -167
- package/dist/composed/date-picker/date-time-picker.js +0 -193
- package/dist/composed/date-picker/month-picker.js +0 -53
- package/dist/composed/date-picker/presets.js +0 -84
- package/dist/composed/date-picker/time-picker.js +0 -181
- package/dist/composed/date-picker/use-calendar.js +0 -17
- package/dist/composed/date-picker/year-picker.js +0 -45
- package/dist/composed/extensions/emoji-suggestion.js +0 -119
- package/dist/composed/extensions/file-attachment.js +0 -55
- package/dist/composed/extensions/mention-suggestion.js +0 -79
- package/dist/node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.js +0 -40141
- package/dist/node_modules/.pnpm/@emoji-mart_react@1.1.1_emoji-mart@5.6.0_react@19.2.4/node_modules/@emoji-mart/react/dist/module.js +0 -17
- package/dist/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.js +0 -2958
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.development.js +0 -17062
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.production.js +0 -9790
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/client.js +0 -20
- package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.development.js +0 -237
- package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.production.js +0 -234
- package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/index.js +0 -11
- package/dist/primitives/_internal/number.js +0 -6
- package/dist/primitives/_internal/primitive.js +0 -9
- package/dist/primitives/_internal/react-arrow.js +0 -13
- package/dist/primitives/_internal/react-collection.js +0 -48
- package/dist/primitives/_internal/react-compose-refs.js +0 -29
- package/dist/primitives/_internal/react-context.js +0 -76
- package/dist/primitives/_internal/react-direction.js +0 -10
- package/dist/primitives/_internal/react-dismissable-layer.js +0 -103
- package/dist/primitives/_internal/react-focus-guards.js +0 -17
- package/dist/primitives/_internal/react-focus-scope.js +0 -137
- package/dist/primitives/_internal/react-id.js +0 -14
- package/dist/primitives/_internal/react-popper.js +0 -137
- package/dist/primitives/_internal/react-portal.js +0 -16
- package/dist/primitives/_internal/react-presence.js +0 -71
- package/dist/primitives/_internal/react-primitive.js +0 -36
- package/dist/primitives/_internal/react-use-callback-ref.js +0 -13
- package/dist/primitives/_internal/react-use-controllable-state.js +0 -44
- package/dist/primitives/_internal/react-use-escape-keydown.js +0 -14
- package/dist/primitives/_internal/react-use-is-hydrated.js +0 -15
- package/dist/primitives/_internal/react-use-layout-effect.js +0 -6
- package/dist/primitives/_internal/react-use-previous.js +0 -8
- package/dist/primitives/_internal/react-use-size.js +0 -27
- package/dist/primitives/react-accordion.js +0 -239
- package/dist/primitives/react-alert-dialog.js +0 -127
- package/dist/primitives/react-aspect-ratio.js +0 -43
- package/dist/primitives/react-avatar.js +0 -75
- package/dist/primitives/react-checkbox.js +0 -251
- package/dist/primitives/react-collapsible.js +0 -120
- package/dist/primitives/react-context-menu.js +0 -240
- package/dist/primitives/react-dialog.js +0 -262
- package/dist/primitives/react-dropdown-menu.js +0 -227
- package/dist/primitives/react-hover-card.js +0 -187
- package/dist/primitives/react-label.js +0 -20
- package/dist/primitives/react-menu.js +0 -652
- package/dist/primitives/react-menubar.js +0 -355
- package/dist/primitives/react-navigation-menu.js +0 -607
- package/dist/primitives/react-popover.js +0 -243
- package/dist/primitives/react-progress.js +0 -84
- package/dist/primitives/react-radio-group.js +0 -238
- package/dist/primitives/react-roving-focus.js +0 -183
- package/dist/primitives/react-select.js +0 -862
- package/dist/primitives/react-separator.js +0 -24
- package/dist/primitives/react-slider.js +0 -437
- package/dist/primitives/react-slot.js +0 -70
- package/dist/primitives/react-switch.js +0 -132
- package/dist/primitives/react-tabs.js +0 -163
- package/dist/primitives/react-toast.js +0 -446
- package/dist/primitives/react-toggle-group.js +0 -137
- package/dist/primitives/react-toggle.js +0 -33
- package/dist/primitives/react-tooltip.js +0 -338
- package/dist/primitives/react-visually-hidden.js +0 -32
- package/dist/ui/charts/_internal/animation.js +0 -18
- package/dist/ui/charts/_internal/axes.js +0 -42
- package/dist/ui/charts/_internal/colors.js +0 -21
- package/dist/ui/charts/_internal/grid-lines.js +0 -43
- package/dist/ui/charts/_internal/legend.js +0 -29
- package/dist/ui/charts/_internal/tooltip.js +0 -39
- package/dist/ui/charts/_internal/types.js +0 -10
- package/dist/ui/charts/area-chart.js +0 -245
- package/dist/ui/charts/bar-chart.js +0 -153
- package/dist/ui/charts/chart-container.js +0 -27
- package/dist/ui/charts/gauge-chart.js +0 -72
- package/dist/ui/charts/line-chart.js +0 -163
- package/dist/ui/charts/pie-chart.js +0 -132
- package/dist/ui/charts/radar-chart.js +0 -223
- package/dist/ui/charts/sparkline.js +0 -124
- package/dist/ui/lib/motion.js +0 -32
- package/dist/ui/lib/use-reduced-motion.js +0 -15
- package/dist/ui/lib/use-ripple.js +0 -14
- package/dist/ui/tree-view/tree-item.js +0 -139
- package/dist/ui/tree-view/tree-view.js +0 -140
- package/dist/ui/tree-view/use-tree.js +0 -38
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
import * as s from "react";
|
|
2
|
-
import { composeEventHandlers as p } from "./_internal/primitive.js";
|
|
3
|
-
import { useComposedRefs as _ } from "./_internal/react-compose-refs.js";
|
|
4
|
-
import { createContextScope as V, createContext as q } from "./_internal/react-context.js";
|
|
5
|
-
import { useId as R } from "./_internal/react-id.js";
|
|
6
|
-
import { useControllableState as K } from "./_internal/react-use-controllable-state.js";
|
|
7
|
-
import { DismissableLayer as U } from "./_internal/react-dismissable-layer.js";
|
|
8
|
-
import { FocusScope as Y } from "./_internal/react-focus-scope.js";
|
|
9
|
-
import { Portal as Z } from "./_internal/react-portal.js";
|
|
10
|
-
import { Presence as h } from "./_internal/react-presence.js";
|
|
11
|
-
import { Primitive as m } from "./_internal/react-primitive.js";
|
|
12
|
-
import { useFocusGuards as z } from "./_internal/react-focus-guards.js";
|
|
13
|
-
import { RemoveScroll as J } from "react-remove-scroll";
|
|
14
|
-
import { hideOthers as Q } from "aria-hidden";
|
|
15
|
-
import { createSlot as X } from "./react-slot.js";
|
|
16
|
-
import { jsx as i, jsxs as P, Fragment as O } from "react/jsx-runtime";
|
|
17
|
-
var v = "Dialog", [I, Ne] = V(v), [ee, u] = I(v), x = (e) => {
|
|
18
|
-
const {
|
|
19
|
-
__scopeDialog: t,
|
|
20
|
-
children: n,
|
|
21
|
-
open: a,
|
|
22
|
-
defaultOpen: r,
|
|
23
|
-
onOpenChange: o,
|
|
24
|
-
modal: c = !0
|
|
25
|
-
} = e, l = s.useRef(null), d = s.useRef(null), [g, C] = K({
|
|
26
|
-
prop: a,
|
|
27
|
-
defaultProp: r ?? !1,
|
|
28
|
-
onChange: o,
|
|
29
|
-
caller: v
|
|
30
|
-
});
|
|
31
|
-
return /* @__PURE__ */ i(
|
|
32
|
-
ee,
|
|
33
|
-
{
|
|
34
|
-
scope: t,
|
|
35
|
-
triggerRef: l,
|
|
36
|
-
contentRef: d,
|
|
37
|
-
contentId: R(),
|
|
38
|
-
titleId: R(),
|
|
39
|
-
descriptionId: R(),
|
|
40
|
-
open: g,
|
|
41
|
-
onOpenChange: C,
|
|
42
|
-
onOpenToggle: s.useCallback(() => C((H) => !H), [C]),
|
|
43
|
-
modal: c,
|
|
44
|
-
children: n
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
};
|
|
48
|
-
x.displayName = v;
|
|
49
|
-
var A = "DialogTrigger", T = s.forwardRef(
|
|
50
|
-
(e, t) => {
|
|
51
|
-
const { __scopeDialog: n, ...a } = e, r = u(A, n), o = _(t, r.triggerRef);
|
|
52
|
-
return /* @__PURE__ */ i(
|
|
53
|
-
m.button,
|
|
54
|
-
{
|
|
55
|
-
type: "button",
|
|
56
|
-
"aria-haspopup": "dialog",
|
|
57
|
-
"aria-expanded": r.open,
|
|
58
|
-
"aria-controls": r.contentId,
|
|
59
|
-
"data-state": N(r.open),
|
|
60
|
-
...a,
|
|
61
|
-
ref: o,
|
|
62
|
-
onClick: p(e.onClick, r.onOpenToggle)
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
T.displayName = A;
|
|
68
|
-
var E = "DialogPortal", [oe, b] = I(E, {
|
|
69
|
-
forceMount: void 0
|
|
70
|
-
}), M = (e) => {
|
|
71
|
-
const { __scopeDialog: t, forceMount: n, children: a, container: r } = e, o = u(E, t);
|
|
72
|
-
return /* @__PURE__ */ i(oe, { scope: t, forceMount: n, children: s.Children.map(a, (c) => /* @__PURE__ */ i(h, { present: n || o.open, children: /* @__PURE__ */ i(Z, { asChild: !0, container: r, children: c }) })) });
|
|
73
|
-
};
|
|
74
|
-
M.displayName = E;
|
|
75
|
-
var D = "DialogOverlay", w = s.forwardRef(
|
|
76
|
-
(e, t) => {
|
|
77
|
-
const n = b(D, e.__scopeDialog), { forceMount: a = n.forceMount, ...r } = e, o = u(D, e.__scopeDialog);
|
|
78
|
-
return o.modal ? /* @__PURE__ */ i(h, { present: a || o.open, children: /* @__PURE__ */ i(re, { ...r, ref: t }) }) : null;
|
|
79
|
-
}
|
|
80
|
-
);
|
|
81
|
-
w.displayName = D;
|
|
82
|
-
var te = X("DialogOverlay.RemoveScroll"), re = s.forwardRef(
|
|
83
|
-
(e, t) => {
|
|
84
|
-
const { __scopeDialog: n, ...a } = e, r = u(D, n);
|
|
85
|
-
return (
|
|
86
|
-
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
87
|
-
// ie. when `Overlay` and `Content` are siblings
|
|
88
|
-
/* @__PURE__ */ i(J, { as: te, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
|
|
89
|
-
m.div,
|
|
90
|
-
{
|
|
91
|
-
"data-state": N(r.open),
|
|
92
|
-
...a,
|
|
93
|
-
ref: t,
|
|
94
|
-
style: { pointerEvents: "auto", ...a.style }
|
|
95
|
-
}
|
|
96
|
-
) })
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
), f = "DialogContent", S = s.forwardRef(
|
|
100
|
-
(e, t) => {
|
|
101
|
-
const n = b(f, e.__scopeDialog), { forceMount: a = n.forceMount, ...r } = e, o = u(f, e.__scopeDialog);
|
|
102
|
-
return /* @__PURE__ */ i(h, { present: a || o.open, children: o.modal ? /* @__PURE__ */ i(ne, { ...r, ref: t }) : /* @__PURE__ */ i(ae, { ...r, ref: t }) });
|
|
103
|
-
}
|
|
104
|
-
);
|
|
105
|
-
S.displayName = f;
|
|
106
|
-
var ne = s.forwardRef(
|
|
107
|
-
(e, t) => {
|
|
108
|
-
const n = u(f, e.__scopeDialog), a = s.useRef(null), r = _(t, n.contentRef, a);
|
|
109
|
-
return s.useEffect(() => {
|
|
110
|
-
const o = a.current;
|
|
111
|
-
if (o) return Q(o);
|
|
112
|
-
}, []), /* @__PURE__ */ i(
|
|
113
|
-
F,
|
|
114
|
-
{
|
|
115
|
-
...e,
|
|
116
|
-
ref: r,
|
|
117
|
-
trapFocus: n.open,
|
|
118
|
-
disableOutsidePointerEvents: !0,
|
|
119
|
-
onCloseAutoFocus: p(e.onCloseAutoFocus, (o) => {
|
|
120
|
-
var c;
|
|
121
|
-
o.preventDefault(), (c = n.triggerRef.current) == null || c.focus();
|
|
122
|
-
}),
|
|
123
|
-
onPointerDownOutside: p(e.onPointerDownOutside, (o) => {
|
|
124
|
-
const c = o.detail.originalEvent, l = c.button === 0 && c.ctrlKey === !0;
|
|
125
|
-
(c.button === 2 || l) && o.preventDefault();
|
|
126
|
-
}),
|
|
127
|
-
onFocusOutside: p(
|
|
128
|
-
e.onFocusOutside,
|
|
129
|
-
(o) => o.preventDefault()
|
|
130
|
-
)
|
|
131
|
-
}
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
), ae = s.forwardRef(
|
|
135
|
-
(e, t) => {
|
|
136
|
-
const n = u(f, e.__scopeDialog), a = s.useRef(!1), r = s.useRef(!1);
|
|
137
|
-
return /* @__PURE__ */ i(
|
|
138
|
-
F,
|
|
139
|
-
{
|
|
140
|
-
...e,
|
|
141
|
-
ref: t,
|
|
142
|
-
trapFocus: !1,
|
|
143
|
-
disableOutsidePointerEvents: !1,
|
|
144
|
-
onCloseAutoFocus: (o) => {
|
|
145
|
-
var c, l;
|
|
146
|
-
(c = e.onCloseAutoFocus) == null || c.call(e, o), o.defaultPrevented || (a.current || (l = n.triggerRef.current) == null || l.focus(), o.preventDefault()), a.current = !1, r.current = !1;
|
|
147
|
-
},
|
|
148
|
-
onInteractOutside: (o) => {
|
|
149
|
-
var d, g;
|
|
150
|
-
(d = e.onInteractOutside) == null || d.call(e, o), o.defaultPrevented || (a.current = !0, o.detail.originalEvent.type === "pointerdown" && (r.current = !0));
|
|
151
|
-
const c = o.target;
|
|
152
|
-
((g = n.triggerRef.current) == null ? void 0 : g.contains(c)) && o.preventDefault(), o.detail.originalEvent.type === "focusin" && r.current && o.preventDefault();
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
|
-
), F = s.forwardRef(
|
|
158
|
-
(e, t) => {
|
|
159
|
-
const { __scopeDialog: n, trapFocus: a, onOpenAutoFocus: r, onCloseAutoFocus: o, ...c } = e, l = u(f, n), d = s.useRef(null), g = _(t, d);
|
|
160
|
-
return z(), /* @__PURE__ */ P(O, { children: [
|
|
161
|
-
/* @__PURE__ */ i(
|
|
162
|
-
Y,
|
|
163
|
-
{
|
|
164
|
-
asChild: !0,
|
|
165
|
-
loop: !0,
|
|
166
|
-
trapped: a,
|
|
167
|
-
onMountAutoFocus: r,
|
|
168
|
-
onUnmountAutoFocus: o,
|
|
169
|
-
children: /* @__PURE__ */ i(
|
|
170
|
-
U,
|
|
171
|
-
{
|
|
172
|
-
role: "dialog",
|
|
173
|
-
id: l.contentId,
|
|
174
|
-
"aria-describedby": l.descriptionId,
|
|
175
|
-
"aria-labelledby": l.titleId,
|
|
176
|
-
"data-state": N(l.open),
|
|
177
|
-
...c,
|
|
178
|
-
ref: g,
|
|
179
|
-
onDismiss: () => l.onOpenChange(!1)
|
|
180
|
-
}
|
|
181
|
-
)
|
|
182
|
-
}
|
|
183
|
-
),
|
|
184
|
-
/* @__PURE__ */ P(O, { children: [
|
|
185
|
-
/* @__PURE__ */ i(ie, { titleId: l.titleId }),
|
|
186
|
-
/* @__PURE__ */ i(ce, { contentRef: d, descriptionId: l.descriptionId })
|
|
187
|
-
] })
|
|
188
|
-
] });
|
|
189
|
-
}
|
|
190
|
-
), y = "DialogTitle", W = s.forwardRef(
|
|
191
|
-
(e, t) => {
|
|
192
|
-
const { __scopeDialog: n, ...a } = e, r = u(y, n);
|
|
193
|
-
return /* @__PURE__ */ i(m.h2, { id: r.titleId, ...a, ref: t });
|
|
194
|
-
}
|
|
195
|
-
);
|
|
196
|
-
W.displayName = y;
|
|
197
|
-
var k = "DialogDescription", G = s.forwardRef(
|
|
198
|
-
(e, t) => {
|
|
199
|
-
const { __scopeDialog: n, ...a } = e, r = u(k, n);
|
|
200
|
-
return /* @__PURE__ */ i(m.p, { id: r.descriptionId, ...a, ref: t });
|
|
201
|
-
}
|
|
202
|
-
);
|
|
203
|
-
G.displayName = k;
|
|
204
|
-
var L = "DialogClose", $ = s.forwardRef(
|
|
205
|
-
(e, t) => {
|
|
206
|
-
const { __scopeDialog: n, ...a } = e, r = u(L, n);
|
|
207
|
-
return /* @__PURE__ */ i(
|
|
208
|
-
m.button,
|
|
209
|
-
{
|
|
210
|
-
type: "button",
|
|
211
|
-
...a,
|
|
212
|
-
ref: t,
|
|
213
|
-
onClick: p(e.onClick, () => r.onOpenChange(!1))
|
|
214
|
-
}
|
|
215
|
-
);
|
|
216
|
-
}
|
|
217
|
-
);
|
|
218
|
-
$.displayName = L;
|
|
219
|
-
function N(e) {
|
|
220
|
-
return e ? "open" : "closed";
|
|
221
|
-
}
|
|
222
|
-
var B = "DialogTitleWarning", [Pe, j] = q(B, {
|
|
223
|
-
contentName: f,
|
|
224
|
-
titleName: y,
|
|
225
|
-
docsSlug: "dialog"
|
|
226
|
-
}), ie = ({ titleId: e }) => {
|
|
227
|
-
const t = j(B), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
228
|
-
|
|
229
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
230
|
-
|
|
231
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
|
|
232
|
-
return s.useEffect(() => {
|
|
233
|
-
e && (document.getElementById(e) || console.error(n));
|
|
234
|
-
}, [n, e]), null;
|
|
235
|
-
}, se = "DialogDescriptionWarning", ce = ({ contentRef: e, descriptionId: t }) => {
|
|
236
|
-
const a = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${j(se).contentName}}.`;
|
|
237
|
-
return s.useEffect(() => {
|
|
238
|
-
var o;
|
|
239
|
-
const r = (o = e.current) == null ? void 0 : o.getAttribute("aria-describedby");
|
|
240
|
-
t && r && (document.getElementById(t) || console.warn(a));
|
|
241
|
-
}, [a, e, t]), null;
|
|
242
|
-
}, Oe = x, Ie = T, xe = M, Ae = w, Te = S, be = W, Me = G, we = $;
|
|
243
|
-
export {
|
|
244
|
-
we as Close,
|
|
245
|
-
Te as Content,
|
|
246
|
-
Me as Description,
|
|
247
|
-
x as Dialog,
|
|
248
|
-
$ as DialogClose,
|
|
249
|
-
S as DialogContent,
|
|
250
|
-
G as DialogDescription,
|
|
251
|
-
w as DialogOverlay,
|
|
252
|
-
M as DialogPortal,
|
|
253
|
-
W as DialogTitle,
|
|
254
|
-
T as DialogTrigger,
|
|
255
|
-
Ae as Overlay,
|
|
256
|
-
xe as Portal,
|
|
257
|
-
Oe as Root,
|
|
258
|
-
be as Title,
|
|
259
|
-
Ie as Trigger,
|
|
260
|
-
Pe as WarningProvider,
|
|
261
|
-
Ne as createDialogScope
|
|
262
|
-
};
|
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
import * as u from "react";
|
|
2
|
-
import { composeEventHandlers as m } from "./_internal/primitive.js";
|
|
3
|
-
import { composeRefs as K } from "./_internal/react-compose-refs.js";
|
|
4
|
-
import { createContextScope as U } from "./_internal/react-context.js";
|
|
5
|
-
import { useControllableState as g } from "./_internal/react-use-controllable-state.js";
|
|
6
|
-
import { Primitive as B } from "./_internal/react-primitive.js";
|
|
7
|
-
import { Root as F, Group as H, Portal as W, RadioGroup as $, Sub as j, Anchor as X, createMenuScope as D, CheckboxItem as q, ItemIndicator as z, Content as J, Item as Q, Label as V, RadioItem as Y, Separator as Z, SubContent as oo, SubTrigger as eo, Arrow as ro } from "./react-menu.js";
|
|
8
|
-
import { useId as M } from "./_internal/react-id.js";
|
|
9
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
10
|
-
var f = "DropdownMenu", [no] = U(
|
|
11
|
-
f,
|
|
12
|
-
[D]
|
|
13
|
-
), i = D(), [ao, _] = no(f), h = (o) => {
|
|
14
|
-
const {
|
|
15
|
-
__scopeDropdownMenu: n,
|
|
16
|
-
children: r,
|
|
17
|
-
dir: e,
|
|
18
|
-
open: a,
|
|
19
|
-
defaultOpen: d,
|
|
20
|
-
onOpenChange: c,
|
|
21
|
-
modal: p = !0
|
|
22
|
-
} = o, s = i(n), v = u.useRef(null), [l, w] = g({
|
|
23
|
-
prop: a,
|
|
24
|
-
defaultProp: d ?? !1,
|
|
25
|
-
onChange: c,
|
|
26
|
-
caller: f
|
|
27
|
-
});
|
|
28
|
-
return /* @__PURE__ */ t(
|
|
29
|
-
ao,
|
|
30
|
-
{
|
|
31
|
-
scope: n,
|
|
32
|
-
triggerId: M(),
|
|
33
|
-
triggerRef: v,
|
|
34
|
-
contentId: M(),
|
|
35
|
-
open: l,
|
|
36
|
-
onOpenChange: w,
|
|
37
|
-
onOpenToggle: u.useCallback(() => w((L) => !L), [w]),
|
|
38
|
-
modal: p,
|
|
39
|
-
children: /* @__PURE__ */ t(F, { ...s, open: l, onOpenChange: w, dir: e, modal: p, children: r })
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
};
|
|
43
|
-
h.displayName = f;
|
|
44
|
-
var R = "DropdownMenuTrigger", b = u.forwardRef(
|
|
45
|
-
(o, n) => {
|
|
46
|
-
const { __scopeDropdownMenu: r, disabled: e = !1, ...a } = o, d = _(R, r), c = i(r);
|
|
47
|
-
return /* @__PURE__ */ t(X, { asChild: !0, ...c, children: /* @__PURE__ */ t(
|
|
48
|
-
B.button,
|
|
49
|
-
{
|
|
50
|
-
type: "button",
|
|
51
|
-
id: d.triggerId,
|
|
52
|
-
"aria-haspopup": "menu",
|
|
53
|
-
"aria-expanded": d.open,
|
|
54
|
-
"aria-controls": d.open ? d.contentId : void 0,
|
|
55
|
-
"data-state": d.open ? "open" : "closed",
|
|
56
|
-
"data-disabled": e ? "" : void 0,
|
|
57
|
-
disabled: e,
|
|
58
|
-
...a,
|
|
59
|
-
ref: K(n, d.triggerRef),
|
|
60
|
-
onPointerDown: m(o.onPointerDown, (p) => {
|
|
61
|
-
!e && p.button === 0 && p.ctrlKey === !1 && (d.onOpenToggle(), d.open || p.preventDefault());
|
|
62
|
-
}),
|
|
63
|
-
onKeyDown: m(o.onKeyDown, (p) => {
|
|
64
|
-
e || (["Enter", " "].includes(p.key) && d.onOpenToggle(), p.key === "ArrowDown" && d.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(p.key) && p.preventDefault());
|
|
65
|
-
})
|
|
66
|
-
}
|
|
67
|
-
) });
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
b.displayName = R;
|
|
71
|
-
var to = "DropdownMenuPortal", I = (o) => {
|
|
72
|
-
const { __scopeDropdownMenu: n, ...r } = o, e = i(n);
|
|
73
|
-
return /* @__PURE__ */ t(W, { ...e, ...r });
|
|
74
|
-
};
|
|
75
|
-
I.displayName = to;
|
|
76
|
-
var S = "DropdownMenuContent", C = u.forwardRef(
|
|
77
|
-
(o, n) => {
|
|
78
|
-
const { __scopeDropdownMenu: r, ...e } = o, a = _(S, r), d = i(r), c = u.useRef(!1);
|
|
79
|
-
return /* @__PURE__ */ t(
|
|
80
|
-
J,
|
|
81
|
-
{
|
|
82
|
-
id: a.contentId,
|
|
83
|
-
"aria-labelledby": a.triggerId,
|
|
84
|
-
...d,
|
|
85
|
-
...e,
|
|
86
|
-
ref: n,
|
|
87
|
-
onCloseAutoFocus: m(o.onCloseAutoFocus, (p) => {
|
|
88
|
-
var s;
|
|
89
|
-
c.current || (s = a.triggerRef.current) == null || s.focus(), c.current = !1, p.preventDefault();
|
|
90
|
-
}),
|
|
91
|
-
onInteractOutside: m(o.onInteractOutside, (p) => {
|
|
92
|
-
const s = p.detail.originalEvent, v = s.button === 0 && s.ctrlKey === !0, l = s.button === 2 || v;
|
|
93
|
-
(!a.modal || l) && (c.current = !0);
|
|
94
|
-
}),
|
|
95
|
-
style: {
|
|
96
|
-
...o.style,
|
|
97
|
-
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
98
|
-
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
99
|
-
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
100
|
-
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
101
|
-
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
);
|
|
107
|
-
C.displayName = S;
|
|
108
|
-
var po = "DropdownMenuGroup", N = u.forwardRef(
|
|
109
|
-
(o, n) => {
|
|
110
|
-
const { __scopeDropdownMenu: r, ...e } = o, a = i(r);
|
|
111
|
-
return /* @__PURE__ */ t(H, { ...a, ...e, ref: n });
|
|
112
|
-
}
|
|
113
|
-
);
|
|
114
|
-
N.displayName = po;
|
|
115
|
-
var uo = "DropdownMenuLabel", x = u.forwardRef(
|
|
116
|
-
(o, n) => {
|
|
117
|
-
const { __scopeDropdownMenu: r, ...e } = o, a = i(r);
|
|
118
|
-
return /* @__PURE__ */ t(V, { ...a, ...e, ref: n });
|
|
119
|
-
}
|
|
120
|
-
);
|
|
121
|
-
x.displayName = uo;
|
|
122
|
-
var io = "DropdownMenuItem", A = u.forwardRef(
|
|
123
|
-
(o, n) => {
|
|
124
|
-
const { __scopeDropdownMenu: r, ...e } = o, a = i(r);
|
|
125
|
-
return /* @__PURE__ */ t(Q, { ...a, ...e, ref: n });
|
|
126
|
-
}
|
|
127
|
-
);
|
|
128
|
-
A.displayName = io;
|
|
129
|
-
var so = "DropdownMenuCheckboxItem", P = u.forwardRef((o, n) => {
|
|
130
|
-
const { __scopeDropdownMenu: r, ...e } = o, a = i(r);
|
|
131
|
-
return /* @__PURE__ */ t(q, { ...a, ...e, ref: n });
|
|
132
|
-
});
|
|
133
|
-
P.displayName = so;
|
|
134
|
-
var co = "DropdownMenuRadioGroup", E = u.forwardRef((o, n) => {
|
|
135
|
-
const { __scopeDropdownMenu: r, ...e } = o, a = i(r);
|
|
136
|
-
return /* @__PURE__ */ t($, { ...a, ...e, ref: n });
|
|
137
|
-
});
|
|
138
|
-
E.displayName = co;
|
|
139
|
-
var lo = "DropdownMenuRadioItem", O = u.forwardRef((o, n) => {
|
|
140
|
-
const { __scopeDropdownMenu: r, ...e } = o, a = i(r);
|
|
141
|
-
return /* @__PURE__ */ t(Y, { ...a, ...e, ref: n });
|
|
142
|
-
});
|
|
143
|
-
O.displayName = lo;
|
|
144
|
-
var wo = "DropdownMenuItemIndicator", y = u.forwardRef((o, n) => {
|
|
145
|
-
const { __scopeDropdownMenu: r, ...e } = o, a = i(r);
|
|
146
|
-
return /* @__PURE__ */ t(z, { ...a, ...e, ref: n });
|
|
147
|
-
});
|
|
148
|
-
y.displayName = wo;
|
|
149
|
-
var mo = "DropdownMenuSeparator", T = u.forwardRef((o, n) => {
|
|
150
|
-
const { __scopeDropdownMenu: r, ...e } = o, a = i(r);
|
|
151
|
-
return /* @__PURE__ */ t(Z, { ...a, ...e, ref: n });
|
|
152
|
-
});
|
|
153
|
-
T.displayName = mo;
|
|
154
|
-
var fo = "DropdownMenuArrow", vo = u.forwardRef(
|
|
155
|
-
(o, n) => {
|
|
156
|
-
const { __scopeDropdownMenu: r, ...e } = o, a = i(r);
|
|
157
|
-
return /* @__PURE__ */ t(ro, { ...a, ...e, ref: n });
|
|
158
|
-
}
|
|
159
|
-
);
|
|
160
|
-
vo.displayName = fo;
|
|
161
|
-
var Mo = (o) => {
|
|
162
|
-
const { __scopeDropdownMenu: n, children: r, open: e, onOpenChange: a, defaultOpen: d } = o, c = i(n), [p, s] = g({
|
|
163
|
-
prop: e,
|
|
164
|
-
defaultProp: d ?? !1,
|
|
165
|
-
onChange: a,
|
|
166
|
-
caller: "DropdownMenuSub"
|
|
167
|
-
});
|
|
168
|
-
return /* @__PURE__ */ t(j, { ...c, open: p, onOpenChange: s, children: r });
|
|
169
|
-
}, go = "DropdownMenuSubTrigger", G = u.forwardRef((o, n) => {
|
|
170
|
-
const { __scopeDropdownMenu: r, ...e } = o, a = i(r);
|
|
171
|
-
return /* @__PURE__ */ t(eo, { ...a, ...e, ref: n });
|
|
172
|
-
});
|
|
173
|
-
G.displayName = go;
|
|
174
|
-
var Do = "DropdownMenuSubContent", k = u.forwardRef((o, n) => {
|
|
175
|
-
const { __scopeDropdownMenu: r, ...e } = o, a = i(r);
|
|
176
|
-
return /* @__PURE__ */ t(
|
|
177
|
-
oo,
|
|
178
|
-
{
|
|
179
|
-
...a,
|
|
180
|
-
...e,
|
|
181
|
-
ref: n,
|
|
182
|
-
style: {
|
|
183
|
-
...o.style,
|
|
184
|
-
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
185
|
-
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
186
|
-
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
187
|
-
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
188
|
-
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
);
|
|
192
|
-
});
|
|
193
|
-
k.displayName = Do;
|
|
194
|
-
var xo = h, Ao = b, Po = I, Eo = C, Oo = N, yo = x, To = A, Go = P, ko = E, Lo = O, Ko = y, Uo = T, Bo = Mo, Fo = G, Ho = k;
|
|
195
|
-
export {
|
|
196
|
-
Go as CheckboxItem,
|
|
197
|
-
Eo as Content,
|
|
198
|
-
h as DropdownMenu,
|
|
199
|
-
vo as DropdownMenuArrow,
|
|
200
|
-
P as DropdownMenuCheckboxItem,
|
|
201
|
-
C as DropdownMenuContent,
|
|
202
|
-
N as DropdownMenuGroup,
|
|
203
|
-
A as DropdownMenuItem,
|
|
204
|
-
y as DropdownMenuItemIndicator,
|
|
205
|
-
x as DropdownMenuLabel,
|
|
206
|
-
I as DropdownMenuPortal,
|
|
207
|
-
E as DropdownMenuRadioGroup,
|
|
208
|
-
O as DropdownMenuRadioItem,
|
|
209
|
-
T as DropdownMenuSeparator,
|
|
210
|
-
Mo as DropdownMenuSub,
|
|
211
|
-
k as DropdownMenuSubContent,
|
|
212
|
-
G as DropdownMenuSubTrigger,
|
|
213
|
-
b as DropdownMenuTrigger,
|
|
214
|
-
Oo as Group,
|
|
215
|
-
To as Item,
|
|
216
|
-
Ko as ItemIndicator,
|
|
217
|
-
yo as Label,
|
|
218
|
-
Po as Portal,
|
|
219
|
-
ko as RadioGroup,
|
|
220
|
-
Lo as RadioItem,
|
|
221
|
-
xo as Root,
|
|
222
|
-
Uo as Separator,
|
|
223
|
-
Bo as Sub,
|
|
224
|
-
Ho as SubContent,
|
|
225
|
-
Fo as SubTrigger,
|
|
226
|
-
Ao as Trigger
|
|
227
|
-
};
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import * as n from "react";
|
|
2
|
-
import { composeEventHandlers as d } from "./_internal/primitive.js";
|
|
3
|
-
import { createContextScope as k } from "./_internal/react-context.js";
|
|
4
|
-
import { useControllableState as F } from "./_internal/react-use-controllable-state.js";
|
|
5
|
-
import { useComposedRefs as I } from "./_internal/react-compose-refs.js";
|
|
6
|
-
import { Root as U, Anchor as W, createPopperScope as H, Content as B, Arrow as G } from "./_internal/react-popper.js";
|
|
7
|
-
import { Portal as K } from "./_internal/react-portal.js";
|
|
8
|
-
import { Presence as O } from "./_internal/react-presence.js";
|
|
9
|
-
import { Primitive as j } from "./_internal/react-primitive.js";
|
|
10
|
-
import { DismissableLayer as V } from "./_internal/react-dismissable-layer.js";
|
|
11
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
12
|
-
var x, b = "HoverCard", [_] = k(b, [
|
|
13
|
-
H
|
|
14
|
-
]), E = H(), [$, g] = _(b), y = (e) => {
|
|
15
|
-
const {
|
|
16
|
-
__scopeHoverCard: o,
|
|
17
|
-
children: t,
|
|
18
|
-
open: s,
|
|
19
|
-
defaultOpen: a,
|
|
20
|
-
onOpenChange: c,
|
|
21
|
-
openDelay: f = 700,
|
|
22
|
-
closeDelay: v = 300
|
|
23
|
-
} = e, l = E(o), C = n.useRef(0), u = n.useRef(0), m = n.useRef(!1), p = n.useRef(!1), [h, r] = F({
|
|
24
|
-
prop: s,
|
|
25
|
-
defaultProp: a ?? !1,
|
|
26
|
-
onChange: c,
|
|
27
|
-
caller: b
|
|
28
|
-
}), P = n.useCallback(() => {
|
|
29
|
-
clearTimeout(u.current), C.current = window.setTimeout(() => r(!0), f);
|
|
30
|
-
}, [f, r]), R = n.useCallback(() => {
|
|
31
|
-
clearTimeout(C.current), !m.current && !p.current && (u.current = window.setTimeout(() => r(!1), v));
|
|
32
|
-
}, [v, r]), M = n.useCallback(() => r(!1), [r]);
|
|
33
|
-
return n.useEffect(() => () => {
|
|
34
|
-
clearTimeout(C.current), clearTimeout(u.current);
|
|
35
|
-
}, []), /* @__PURE__ */ i(
|
|
36
|
-
$,
|
|
37
|
-
{
|
|
38
|
-
scope: o,
|
|
39
|
-
open: h,
|
|
40
|
-
onOpenChange: r,
|
|
41
|
-
onOpen: P,
|
|
42
|
-
onClose: R,
|
|
43
|
-
onDismiss: M,
|
|
44
|
-
hasSelectionRef: m,
|
|
45
|
-
isPointerDownOnContentRef: p,
|
|
46
|
-
children: /* @__PURE__ */ i(U, { ...l, children: t })
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
};
|
|
50
|
-
y.displayName = b;
|
|
51
|
-
var N = "HoverCardTrigger", D = n.forwardRef(
|
|
52
|
-
(e, o) => {
|
|
53
|
-
const { __scopeHoverCard: t, ...s } = e, a = g(N, t), c = E(t);
|
|
54
|
-
return /* @__PURE__ */ i(W, { asChild: !0, ...c, children: /* @__PURE__ */ i(
|
|
55
|
-
j.a,
|
|
56
|
-
{
|
|
57
|
-
"data-state": a.open ? "open" : "closed",
|
|
58
|
-
...s,
|
|
59
|
-
ref: o,
|
|
60
|
-
onPointerEnter: d(e.onPointerEnter, w(a.onOpen)),
|
|
61
|
-
onPointerLeave: d(e.onPointerLeave, w(a.onClose)),
|
|
62
|
-
onFocus: d(e.onFocus, a.onOpen),
|
|
63
|
-
onBlur: d(e.onBlur, a.onClose),
|
|
64
|
-
onTouchStart: d(e.onTouchStart, (f) => f.preventDefault())
|
|
65
|
-
}
|
|
66
|
-
) });
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
D.displayName = N;
|
|
70
|
-
var T = "HoverCardPortal", [q, z] = _(T, {
|
|
71
|
-
forceMount: void 0
|
|
72
|
-
}), A = (e) => {
|
|
73
|
-
const { __scopeHoverCard: o, forceMount: t, children: s, container: a } = e, c = g(T, o);
|
|
74
|
-
return /* @__PURE__ */ i(q, { scope: o, forceMount: t, children: /* @__PURE__ */ i(O, { present: t || c.open, children: /* @__PURE__ */ i(K, { asChild: !0, container: a, children: s }) }) });
|
|
75
|
-
};
|
|
76
|
-
A.displayName = T;
|
|
77
|
-
var S = "HoverCardContent", L = n.forwardRef(
|
|
78
|
-
(e, o) => {
|
|
79
|
-
const t = z(S, e.__scopeHoverCard), { forceMount: s = t.forceMount, ...a } = e, c = g(S, e.__scopeHoverCard);
|
|
80
|
-
return /* @__PURE__ */ i(O, { present: s || c.open, children: /* @__PURE__ */ i(
|
|
81
|
-
J,
|
|
82
|
-
{
|
|
83
|
-
"data-state": c.open ? "open" : "closed",
|
|
84
|
-
...a,
|
|
85
|
-
onPointerEnter: d(e.onPointerEnter, w(c.onOpen)),
|
|
86
|
-
onPointerLeave: d(e.onPointerLeave, w(c.onClose)),
|
|
87
|
-
ref: o
|
|
88
|
-
}
|
|
89
|
-
) });
|
|
90
|
-
}
|
|
91
|
-
);
|
|
92
|
-
L.displayName = S;
|
|
93
|
-
var J = n.forwardRef((e, o) => {
|
|
94
|
-
const {
|
|
95
|
-
__scopeHoverCard: t,
|
|
96
|
-
onEscapeKeyDown: s,
|
|
97
|
-
onPointerDownOutside: a,
|
|
98
|
-
onFocusOutside: c,
|
|
99
|
-
onInteractOutside: f,
|
|
100
|
-
...v
|
|
101
|
-
} = e, l = g(S, t), C = E(t), u = n.useRef(null), m = I(o, u), [p, h] = n.useState(!1);
|
|
102
|
-
return n.useEffect(() => {
|
|
103
|
-
if (p) {
|
|
104
|
-
const r = document.body;
|
|
105
|
-
return x = r.style.userSelect || r.style.webkitUserSelect, r.style.userSelect = "none", r.style.webkitUserSelect = "none", () => {
|
|
106
|
-
r.style.userSelect = x, r.style.webkitUserSelect = x;
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
}, [p]), n.useEffect(() => {
|
|
110
|
-
if (u.current) {
|
|
111
|
-
const r = () => {
|
|
112
|
-
h(!1), l.isPointerDownOnContentRef.current = !1, setTimeout(() => {
|
|
113
|
-
var R;
|
|
114
|
-
((R = document.getSelection()) == null ? void 0 : R.toString()) !== "" && (l.hasSelectionRef.current = !0);
|
|
115
|
-
});
|
|
116
|
-
};
|
|
117
|
-
return document.addEventListener("pointerup", r), () => {
|
|
118
|
-
document.removeEventListener("pointerup", r), l.hasSelectionRef.current = !1, l.isPointerDownOnContentRef.current = !1;
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
}, [l.isPointerDownOnContentRef, l.hasSelectionRef]), n.useEffect(() => {
|
|
122
|
-
u.current && Y(u.current).forEach((P) => P.setAttribute("tabindex", "-1"));
|
|
123
|
-
}), /* @__PURE__ */ i(
|
|
124
|
-
V,
|
|
125
|
-
{
|
|
126
|
-
asChild: !0,
|
|
127
|
-
disableOutsidePointerEvents: !1,
|
|
128
|
-
onInteractOutside: f,
|
|
129
|
-
onEscapeKeyDown: s,
|
|
130
|
-
onPointerDownOutside: a,
|
|
131
|
-
onFocusOutside: d(c, (r) => {
|
|
132
|
-
r.preventDefault();
|
|
133
|
-
}),
|
|
134
|
-
onDismiss: l.onDismiss,
|
|
135
|
-
children: /* @__PURE__ */ i(
|
|
136
|
-
B,
|
|
137
|
-
{
|
|
138
|
-
...C,
|
|
139
|
-
...v,
|
|
140
|
-
onPointerDown: d(v.onPointerDown, (r) => {
|
|
141
|
-
r.currentTarget.contains(r.target) && h(!0), l.hasSelectionRef.current = !1, l.isPointerDownOnContentRef.current = !0;
|
|
142
|
-
}),
|
|
143
|
-
ref: m,
|
|
144
|
-
style: {
|
|
145
|
-
...v.style,
|
|
146
|
-
userSelect: p ? "text" : void 0,
|
|
147
|
-
// Safari requires prefix
|
|
148
|
-
WebkitUserSelect: p ? "text" : void 0,
|
|
149
|
-
"--radix-hover-card-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
150
|
-
"--radix-hover-card-content-available-width": "var(--radix-popper-available-width)",
|
|
151
|
-
"--radix-hover-card-content-available-height": "var(--radix-popper-available-height)",
|
|
152
|
-
"--radix-hover-card-trigger-width": "var(--radix-popper-anchor-width)",
|
|
153
|
-
"--radix-hover-card-trigger-height": "var(--radix-popper-anchor-height)"
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
)
|
|
157
|
-
}
|
|
158
|
-
);
|
|
159
|
-
}), Q = "HoverCardArrow", X = n.forwardRef(
|
|
160
|
-
(e, o) => {
|
|
161
|
-
const { __scopeHoverCard: t, ...s } = e, a = E(t);
|
|
162
|
-
return /* @__PURE__ */ i(G, { ...a, ...s, ref: o });
|
|
163
|
-
}
|
|
164
|
-
);
|
|
165
|
-
X.displayName = Q;
|
|
166
|
-
function w(e) {
|
|
167
|
-
return (o) => o.pointerType === "touch" ? void 0 : e();
|
|
168
|
-
}
|
|
169
|
-
function Y(e) {
|
|
170
|
-
const o = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
171
|
-
acceptNode: (s) => s.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP
|
|
172
|
-
});
|
|
173
|
-
for (; t.nextNode(); ) o.push(t.currentNode);
|
|
174
|
-
return o;
|
|
175
|
-
}
|
|
176
|
-
var le = y, de = D, ue = A, pe = L;
|
|
177
|
-
export {
|
|
178
|
-
pe as Content,
|
|
179
|
-
y as HoverCard,
|
|
180
|
-
X as HoverCardArrow,
|
|
181
|
-
L as HoverCardContent,
|
|
182
|
-
A as HoverCardPortal,
|
|
183
|
-
D as HoverCardTrigger,
|
|
184
|
-
ue as Portal,
|
|
185
|
-
le as Root,
|
|
186
|
-
de as Trigger
|
|
187
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as i from "react";
|
|
2
|
-
import { Primitive as f } from "./_internal/react-primitive.js";
|
|
3
|
-
import { jsx as l } from "react/jsx-runtime";
|
|
4
|
-
var m = "Label", r = i.forwardRef((e, o) => /* @__PURE__ */ l(
|
|
5
|
-
f.label,
|
|
6
|
-
{
|
|
7
|
-
...e,
|
|
8
|
-
ref: o,
|
|
9
|
-
onMouseDown: (t) => {
|
|
10
|
-
var a;
|
|
11
|
-
t.target.closest("button, input, select, textarea") || ((a = e.onMouseDown) == null || a.call(e, t), !t.defaultPrevented && t.detail > 1 && t.preventDefault());
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
));
|
|
15
|
-
r.displayName = m;
|
|
16
|
-
var b = r;
|
|
17
|
-
export {
|
|
18
|
-
r as Label,
|
|
19
|
-
b as Root
|
|
20
|
-
};
|