@yoopta/themes-shadcn 6.0.0-beta.14 → 6.0.0-beta.15

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.
Files changed (109) hide show
  1. package/dist/table/components/row-controls.d.ts.map +1 -1
  2. package/package.json +2 -2
  3. package/dist/accordion.js.map +0 -1
  4. package/dist/blockquote.js.map +0 -1
  5. package/dist/callout.js.map +0 -1
  6. package/dist/carousel.js.map +0 -1
  7. package/dist/chunks/Combination-2202c874.js +0 -1080
  8. package/dist/chunks/Combination-2202c874.js.map +0 -1
  9. package/dist/chunks/_tslib-514d60fe.js +0 -67
  10. package/dist/chunks/_tslib-514d60fe.js.map +0 -1
  11. package/dist/chunks/arrow-right-cc37c75c.js +0 -30
  12. package/dist/chunks/arrow-right-cc37c75c.js.map +0 -1
  13. package/dist/chunks/button-f9af7cb3.js +0 -76
  14. package/dist/chunks/button-f9af7cb3.js.map +0 -1
  15. package/dist/chunks/card-29720641.js +0 -38
  16. package/dist/chunks/card-29720641.js.map +0 -1
  17. package/dist/chunks/check-530fff0e.js +0 -14
  18. package/dist/chunks/check-530fff0e.js.map +0 -1
  19. package/dist/chunks/chevron-down-544d1acd.js +0 -16
  20. package/dist/chunks/chevron-down-544d1acd.js.map +0 -1
  21. package/dist/chunks/chevron-up-053cba03.js +0 -14
  22. package/dist/chunks/chevron-up-053cba03.js.map +0 -1
  23. package/dist/chunks/code-2ff9cc0c.js +0 -17
  24. package/dist/chunks/code-2ff9cc0c.js.map +0 -1
  25. package/dist/chunks/createLucideIcon-02eb7854.js +0 -95
  26. package/dist/chunks/createLucideIcon-02eb7854.js.map +0 -1
  27. package/dist/chunks/dropdown-menu-ac777fdc.js +0 -1165
  28. package/dist/chunks/dropdown-menu-ac777fdc.js.map +0 -1
  29. package/dist/chunks/external-link-43895ded.js +0 -18
  30. package/dist/chunks/external-link-43895ded.js.map +0 -1
  31. package/dist/chunks/file-text-99674d8d.js +0 -20
  32. package/dist/chunks/file-text-99674d8d.js.map +0 -1
  33. package/dist/chunks/hover-card-134f053d.js +0 -257
  34. package/dist/chunks/hover-card-134f053d.js.map +0 -1
  35. package/dist/chunks/index-056b596e.js +0 -16
  36. package/dist/chunks/index-056b596e.js.map +0 -1
  37. package/dist/chunks/index-35823769.js +0 -222
  38. package/dist/chunks/index-35823769.js.map +0 -1
  39. package/dist/chunks/index-41c4abc4.js +0 -3805
  40. package/dist/chunks/index-41c4abc4.js.map +0 -1
  41. package/dist/chunks/index-454935af.js +0 -71
  42. package/dist/chunks/index-454935af.js.map +0 -1
  43. package/dist/chunks/index-ae9b48d5.js +0 -12
  44. package/dist/chunks/index-ae9b48d5.js.map +0 -1
  45. package/dist/chunks/index-b8a83ba5.js +0 -335
  46. package/dist/chunks/index-b8a83ba5.js.map +0 -1
  47. package/dist/chunks/index-b8f2908d.js +0 -40
  48. package/dist/chunks/index-b8f2908d.js.map +0 -1
  49. package/dist/chunks/index-c655a86f.js +0 -7
  50. package/dist/chunks/index-c655a86f.js.map +0 -1
  51. package/dist/chunks/index-c90e54a4.js +0 -190
  52. package/dist/chunks/index-c90e54a4.js.map +0 -1
  53. package/dist/chunks/index-cf5f0d71.js +0 -2907
  54. package/dist/chunks/index-cf5f0d71.js.map +0 -1
  55. package/dist/chunks/index-d9171717.js +0 -13
  56. package/dist/chunks/index-d9171717.js.map +0 -1
  57. package/dist/chunks/index-dd0fd848.js +0 -70
  58. package/dist/chunks/index-dd0fd848.js.map +0 -1
  59. package/dist/chunks/input-5608c2c9.js +0 -13
  60. package/dist/chunks/input-5608c2c9.js.map +0 -1
  61. package/dist/chunks/label-c9152e49.js +0 -168
  62. package/dist/chunks/label-c9152e49.js.map +0 -1
  63. package/dist/chunks/language-select-bdc50f20.js +0 -44
  64. package/dist/chunks/language-select-bdc50f20.js.map +0 -1
  65. package/dist/chunks/play-1a34ad05.js +0 -16
  66. package/dist/chunks/play-1a34ad05.js.map +0 -1
  67. package/dist/chunks/plus-fcea2532.js +0 -17
  68. package/dist/chunks/plus-fcea2532.js.map +0 -1
  69. package/dist/chunks/popover-ef29b0ac.js +0 -300
  70. package/dist/chunks/popover-ef29b0ac.js.map +0 -1
  71. package/dist/chunks/scroll-area-17d8c584.js +0 -726
  72. package/dist/chunks/scroll-area-17d8c584.js.map +0 -1
  73. package/dist/chunks/select-98610101.js +0 -1213
  74. package/dist/chunks/select-98610101.js.map +0 -1
  75. package/dist/chunks/separator-9e6aa45b.js +0 -172
  76. package/dist/chunks/separator-9e6aa45b.js.map +0 -1
  77. package/dist/chunks/sparkles-8922a4af.js +0 -26
  78. package/dist/chunks/sparkles-8922a4af.js.map +0 -1
  79. package/dist/chunks/style-inject.es-746bb8ed.js +0 -29
  80. package/dist/chunks/style-inject.es-746bb8ed.js.map +0 -1
  81. package/dist/chunks/tabs-9cfbd3cc.js +0 -204
  82. package/dist/chunks/tabs-9cfbd3cc.js.map +0 -1
  83. package/dist/chunks/tooltip-f1e02ae0.js +0 -800
  84. package/dist/chunks/tooltip-f1e02ae0.js.map +0 -1
  85. package/dist/chunks/trash-2-be728dd2.js +0 -20
  86. package/dist/chunks/trash-2-be728dd2.js.map +0 -1
  87. package/dist/chunks/upload-0f56ec3e.js +0 -44
  88. package/dist/chunks/upload-0f56ec3e.js.map +0 -1
  89. package/dist/chunks/utils-131071a4.js +0 -2500
  90. package/dist/chunks/utils-131071a4.js.map +0 -1
  91. package/dist/chunks/x-2f6cf742.js +0 -17
  92. package/dist/chunks/x-2f6cf742.js.map +0 -1
  93. package/dist/code-group.js.map +0 -1
  94. package/dist/code.js.map +0 -1
  95. package/dist/divider.js.map +0 -1
  96. package/dist/embed.js.map +0 -1
  97. package/dist/file.js.map +0 -1
  98. package/dist/headings.js.map +0 -1
  99. package/dist/image.js.map +0 -1
  100. package/dist/index.js.map +0 -1
  101. package/dist/link.js.map +0 -1
  102. package/dist/lists.js.map +0 -1
  103. package/dist/mention.js.map +0 -1
  104. package/dist/paragraph.js.map +0 -1
  105. package/dist/steps.js.map +0 -1
  106. package/dist/table-of-contents.js.map +0 -1
  107. package/dist/table.js.map +0 -1
  108. package/dist/tabs.js.map +0 -1
  109. package/dist/video.js.map +0 -1
@@ -1,257 +0,0 @@
1
- import { _ as __rest } from './_tslib-514d60fe.js';
2
- import { jsx } from 'react/jsx-runtime';
3
- import * as React from 'react';
4
- import { c as createContextScope, P as Primitive, a as composeEventHandlers, b as Presence } from './index-b8a83ba5.js';
5
- import { u as useControllableState } from './index-454935af.js';
6
- import { u as useComposedRefs } from './index-b8f2908d.js';
7
- import { c as createPopperScope, A as Anchor, D as DismissableLayer, C as Content, b as Arrow, R as Root2$1, P as Portal$1 } from './index-cf5f0d71.js';
8
- import { c as cn } from './utils-131071a4.js';
9
-
10
- var originalBodyUserSelect;
11
- var HOVERCARD_NAME = "HoverCard";
12
- var [createHoverCardContext, createHoverCardScope] = createContextScope(HOVERCARD_NAME, [
13
- createPopperScope
14
- ]);
15
- var usePopperScope = createPopperScope();
16
- var [HoverCardProvider, useHoverCardContext] = createHoverCardContext(HOVERCARD_NAME);
17
- var HoverCard$1 = (props) => {
18
- const {
19
- __scopeHoverCard,
20
- children,
21
- open: openProp,
22
- defaultOpen,
23
- onOpenChange,
24
- openDelay = 700,
25
- closeDelay = 300
26
- } = props;
27
- const popperScope = usePopperScope(__scopeHoverCard);
28
- const openTimerRef = React.useRef(0);
29
- const closeTimerRef = React.useRef(0);
30
- const hasSelectionRef = React.useRef(false);
31
- const isPointerDownOnContentRef = React.useRef(false);
32
- const [open, setOpen] = useControllableState({
33
- prop: openProp,
34
- defaultProp: defaultOpen ?? false,
35
- onChange: onOpenChange,
36
- caller: HOVERCARD_NAME
37
- });
38
- const handleOpen = React.useCallback(() => {
39
- clearTimeout(closeTimerRef.current);
40
- openTimerRef.current = window.setTimeout(() => setOpen(true), openDelay);
41
- }, [openDelay, setOpen]);
42
- const handleClose = React.useCallback(() => {
43
- clearTimeout(openTimerRef.current);
44
- if (!hasSelectionRef.current && !isPointerDownOnContentRef.current) {
45
- closeTimerRef.current = window.setTimeout(() => setOpen(false), closeDelay);
46
- }
47
- }, [closeDelay, setOpen]);
48
- const handleDismiss = React.useCallback(() => setOpen(false), [setOpen]);
49
- React.useEffect(() => {
50
- return () => {
51
- clearTimeout(openTimerRef.current);
52
- clearTimeout(closeTimerRef.current);
53
- };
54
- }, []);
55
- return /* @__PURE__ */ jsx(
56
- HoverCardProvider,
57
- {
58
- scope: __scopeHoverCard,
59
- open,
60
- onOpenChange: setOpen,
61
- onOpen: handleOpen,
62
- onClose: handleClose,
63
- onDismiss: handleDismiss,
64
- hasSelectionRef,
65
- isPointerDownOnContentRef,
66
- children: /* @__PURE__ */ jsx(Root2$1, { ...popperScope, children })
67
- }
68
- );
69
- };
70
- HoverCard$1.displayName = HOVERCARD_NAME;
71
- var TRIGGER_NAME = "HoverCardTrigger";
72
- var HoverCardTrigger$1 = React.forwardRef(
73
- (props, forwardedRef) => {
74
- const { __scopeHoverCard, ...triggerProps } = props;
75
- const context = useHoverCardContext(TRIGGER_NAME, __scopeHoverCard);
76
- const popperScope = usePopperScope(__scopeHoverCard);
77
- return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
78
- Primitive.a,
79
- {
80
- "data-state": context.open ? "open" : "closed",
81
- ...triggerProps,
82
- ref: forwardedRef,
83
- onPointerEnter: composeEventHandlers(props.onPointerEnter, excludeTouch(context.onOpen)),
84
- onPointerLeave: composeEventHandlers(props.onPointerLeave, excludeTouch(context.onClose)),
85
- onFocus: composeEventHandlers(props.onFocus, context.onOpen),
86
- onBlur: composeEventHandlers(props.onBlur, context.onClose),
87
- onTouchStart: composeEventHandlers(props.onTouchStart, (event) => event.preventDefault())
88
- }
89
- ) });
90
- }
91
- );
92
- HoverCardTrigger$1.displayName = TRIGGER_NAME;
93
- var PORTAL_NAME = "HoverCardPortal";
94
- var [PortalProvider, usePortalContext] = createHoverCardContext(PORTAL_NAME, {
95
- forceMount: void 0
96
- });
97
- var HoverCardPortal = (props) => {
98
- const { __scopeHoverCard, forceMount, children, container } = props;
99
- const context = useHoverCardContext(PORTAL_NAME, __scopeHoverCard);
100
- return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeHoverCard, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$1, { asChild: true, container, children }) }) });
101
- };
102
- HoverCardPortal.displayName = PORTAL_NAME;
103
- var CONTENT_NAME = "HoverCardContent";
104
- var HoverCardContent$1 = React.forwardRef(
105
- (props, forwardedRef) => {
106
- const portalContext = usePortalContext(CONTENT_NAME, props.__scopeHoverCard);
107
- const { forceMount = portalContext.forceMount, ...contentProps } = props;
108
- const context = useHoverCardContext(CONTENT_NAME, props.__scopeHoverCard);
109
- return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(
110
- HoverCardContentImpl,
111
- {
112
- "data-state": context.open ? "open" : "closed",
113
- ...contentProps,
114
- onPointerEnter: composeEventHandlers(props.onPointerEnter, excludeTouch(context.onOpen)),
115
- onPointerLeave: composeEventHandlers(props.onPointerLeave, excludeTouch(context.onClose)),
116
- ref: forwardedRef
117
- }
118
- ) });
119
- }
120
- );
121
- HoverCardContent$1.displayName = CONTENT_NAME;
122
- var HoverCardContentImpl = React.forwardRef((props, forwardedRef) => {
123
- const {
124
- __scopeHoverCard,
125
- onEscapeKeyDown,
126
- onPointerDownOutside,
127
- onFocusOutside,
128
- onInteractOutside,
129
- ...contentProps
130
- } = props;
131
- const context = useHoverCardContext(CONTENT_NAME, __scopeHoverCard);
132
- const popperScope = usePopperScope(__scopeHoverCard);
133
- const ref = React.useRef(null);
134
- const composedRefs = useComposedRefs(forwardedRef, ref);
135
- const [containSelection, setContainSelection] = React.useState(false);
136
- React.useEffect(() => {
137
- if (containSelection) {
138
- const body = document.body;
139
- originalBodyUserSelect = body.style.userSelect || body.style.webkitUserSelect;
140
- body.style.userSelect = "none";
141
- body.style.webkitUserSelect = "none";
142
- return () => {
143
- body.style.userSelect = originalBodyUserSelect;
144
- body.style.webkitUserSelect = originalBodyUserSelect;
145
- };
146
- }
147
- }, [containSelection]);
148
- React.useEffect(() => {
149
- if (ref.current) {
150
- const handlePointerUp = () => {
151
- setContainSelection(false);
152
- context.isPointerDownOnContentRef.current = false;
153
- setTimeout(() => {
154
- const hasSelection = document.getSelection()?.toString() !== "";
155
- if (hasSelection) context.hasSelectionRef.current = true;
156
- });
157
- };
158
- document.addEventListener("pointerup", handlePointerUp);
159
- return () => {
160
- document.removeEventListener("pointerup", handlePointerUp);
161
- context.hasSelectionRef.current = false;
162
- context.isPointerDownOnContentRef.current = false;
163
- };
164
- }
165
- }, [context.isPointerDownOnContentRef, context.hasSelectionRef]);
166
- React.useEffect(() => {
167
- if (ref.current) {
168
- const tabbables = getTabbableNodes(ref.current);
169
- tabbables.forEach((tabbable) => tabbable.setAttribute("tabindex", "-1"));
170
- }
171
- });
172
- return /* @__PURE__ */ jsx(
173
- DismissableLayer,
174
- {
175
- asChild: true,
176
- disableOutsidePointerEvents: false,
177
- onInteractOutside,
178
- onEscapeKeyDown,
179
- onPointerDownOutside,
180
- onFocusOutside: composeEventHandlers(onFocusOutside, (event) => {
181
- event.preventDefault();
182
- }),
183
- onDismiss: context.onDismiss,
184
- children: /* @__PURE__ */ jsx(
185
- Content,
186
- {
187
- ...popperScope,
188
- ...contentProps,
189
- onPointerDown: composeEventHandlers(contentProps.onPointerDown, (event) => {
190
- if (event.currentTarget.contains(event.target)) {
191
- setContainSelection(true);
192
- }
193
- context.hasSelectionRef.current = false;
194
- context.isPointerDownOnContentRef.current = true;
195
- }),
196
- ref: composedRefs,
197
- style: {
198
- ...contentProps.style,
199
- userSelect: containSelection ? "text" : void 0,
200
- // Safari requires prefix
201
- WebkitUserSelect: containSelection ? "text" : void 0,
202
- // re-namespace exposed content custom properties
203
- ...{
204
- "--radix-hover-card-content-transform-origin": "var(--radix-popper-transform-origin)",
205
- "--radix-hover-card-content-available-width": "var(--radix-popper-available-width)",
206
- "--radix-hover-card-content-available-height": "var(--radix-popper-available-height)",
207
- "--radix-hover-card-trigger-width": "var(--radix-popper-anchor-width)",
208
- "--radix-hover-card-trigger-height": "var(--radix-popper-anchor-height)"
209
- }
210
- }
211
- }
212
- )
213
- }
214
- );
215
- });
216
- var ARROW_NAME = "HoverCardArrow";
217
- var HoverCardArrow = React.forwardRef(
218
- (props, forwardedRef) => {
219
- const { __scopeHoverCard, ...arrowProps } = props;
220
- const popperScope = usePopperScope(__scopeHoverCard);
221
- return /* @__PURE__ */ jsx(Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
222
- }
223
- );
224
- HoverCardArrow.displayName = ARROW_NAME;
225
- function excludeTouch(eventHandler) {
226
- return (event) => event.pointerType === "touch" ? void 0 : eventHandler();
227
- }
228
- function getTabbableNodes(container) {
229
- const nodes = [];
230
- const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
231
- acceptNode: (node) => {
232
- return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
233
- }
234
- });
235
- while (walker.nextNode()) nodes.push(walker.currentNode);
236
- return nodes;
237
- }
238
- var Root2 = HoverCard$1;
239
- var Trigger = HoverCardTrigger$1;
240
- var Portal = HoverCardPortal;
241
- var Content2 = HoverCardContent$1;
242
-
243
- const HoverCard = (_a) => {
244
- var props = __rest(_a, []);
245
- return (jsx(Root2, Object.assign({ "data-slot": "hover-card" }, props)));
246
- };
247
- const HoverCardTrigger = (_a) => {
248
- var props = __rest(_a, []);
249
- return (jsx(Trigger, Object.assign({ "data-slot": "hover-card-trigger" }, props)));
250
- };
251
- const HoverCardContent = (_a) => {
252
- var { className, align = 'center', sideOffset = 4 } = _a, props = __rest(_a, ["className", "align", "sideOffset"]);
253
- return (jsx(Portal, Object.assign({ "data-slot": "hover-card-portal" }, { children: jsx(Content2, Object.assign({ "data-slot": "hover-card-content", align: align, sideOffset: sideOffset, className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden', className) }, props)) })));
254
- };
255
-
256
- export { HoverCard as H, HoverCardTrigger as a, HoverCardContent as b };
257
- //# sourceMappingURL=hover-card-134f053d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hover-card-134f053d.js","sources":["../../../../../node_modules/@radix-ui/react-hover-card/src/hover-card.tsx","../../src/ui/hover-card.tsx"],"sourcesContent":["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * HoverCard\n * -----------------------------------------------------------------------------------------------*/\n\nlet originalBodyUserSelect: string;\n\nconst HOVERCARD_NAME = 'HoverCard';\n\ntype ScopedProps<P> = P & { __scopeHoverCard?: Scope };\nconst [createHoverCardContext, createHoverCardScope] = createContextScope(HOVERCARD_NAME, [\n createPopperScope,\n]);\nconst usePopperScope = createPopperScope();\n\ntype HoverCardContextValue = {\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpen(): void;\n onClose(): void;\n onDismiss(): void;\n hasSelectionRef: React.MutableRefObject<boolean>;\n isPointerDownOnContentRef: React.MutableRefObject<boolean>;\n};\n\nconst [HoverCardProvider, useHoverCardContext] =\n createHoverCardContext<HoverCardContextValue>(HOVERCARD_NAME);\n\ninterface HoverCardProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n openDelay?: number;\n closeDelay?: number;\n}\n\nconst HoverCard: React.FC<HoverCardProps> = (props: ScopedProps<HoverCardProps>) => {\n const {\n __scopeHoverCard,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n openDelay = 700,\n closeDelay = 300,\n } = props;\n const popperScope = usePopperScope(__scopeHoverCard);\n const openTimerRef = React.useRef(0);\n const closeTimerRef = React.useRef(0);\n const hasSelectionRef = React.useRef(false);\n const isPointerDownOnContentRef = React.useRef(false);\n\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: HOVERCARD_NAME,\n });\n\n const handleOpen = React.useCallback(() => {\n clearTimeout(closeTimerRef.current);\n openTimerRef.current = window.setTimeout(() => setOpen(true), openDelay);\n }, [openDelay, setOpen]);\n\n const handleClose = React.useCallback(() => {\n clearTimeout(openTimerRef.current);\n if (!hasSelectionRef.current && !isPointerDownOnContentRef.current) {\n closeTimerRef.current = window.setTimeout(() => setOpen(false), closeDelay);\n }\n }, [closeDelay, setOpen]);\n\n const handleDismiss = React.useCallback(() => setOpen(false), [setOpen]);\n\n // cleanup any queued state updates on unmount\n React.useEffect(() => {\n return () => {\n clearTimeout(openTimerRef.current);\n clearTimeout(closeTimerRef.current);\n };\n }, []);\n\n return (\n <HoverCardProvider\n scope={__scopeHoverCard}\n open={open}\n onOpenChange={setOpen}\n onOpen={handleOpen}\n onClose={handleClose}\n onDismiss={handleDismiss}\n hasSelectionRef={hasSelectionRef}\n isPointerDownOnContentRef={isPointerDownOnContentRef}\n >\n <PopperPrimitive.Root {...popperScope}>{children}</PopperPrimitive.Root>\n </HoverCardProvider>\n );\n};\n\nHoverCard.displayName = HOVERCARD_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * HoverCardTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'HoverCardTrigger';\n\ntype HoverCardTriggerElement = React.ComponentRef<typeof Primitive.a>;\ntype PrimitiveLinkProps = React.ComponentPropsWithoutRef<typeof Primitive.a>;\ninterface HoverCardTriggerProps extends PrimitiveLinkProps {}\n\nconst HoverCardTrigger = React.forwardRef<HoverCardTriggerElement, HoverCardTriggerProps>(\n (props: ScopedProps<HoverCardTriggerProps>, forwardedRef) => {\n const { __scopeHoverCard, ...triggerProps } = props;\n const context = useHoverCardContext(TRIGGER_NAME, __scopeHoverCard);\n const popperScope = usePopperScope(__scopeHoverCard);\n return (\n <PopperPrimitive.Anchor asChild {...popperScope}>\n <Primitive.a\n data-state={context.open ? 'open' : 'closed'}\n {...triggerProps}\n ref={forwardedRef}\n onPointerEnter={composeEventHandlers(props.onPointerEnter, excludeTouch(context.onOpen))}\n onPointerLeave={composeEventHandlers(props.onPointerLeave, excludeTouch(context.onClose))}\n onFocus={composeEventHandlers(props.onFocus, context.onOpen)}\n onBlur={composeEventHandlers(props.onBlur, context.onClose)}\n // prevent focus event on touch devices\n onTouchStart={composeEventHandlers(props.onTouchStart, (event) => event.preventDefault())}\n />\n </PopperPrimitive.Anchor>\n );\n }\n);\n\nHoverCardTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * HoverCardPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'HoverCardPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createHoverCardContext<PortalContextValue>(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef<typeof PortalPrimitive>;\ninterface HoverCardPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst HoverCardPortal: React.FC<HoverCardPortalProps> = (\n props: ScopedProps<HoverCardPortalProps>\n) => {\n const { __scopeHoverCard, forceMount, children, container } = props;\n const context = useHoverCardContext(PORTAL_NAME, __scopeHoverCard);\n return (\n <PortalProvider scope={__scopeHoverCard} forceMount={forceMount}>\n <Presence present={forceMount || context.open}>\n <PortalPrimitive asChild container={container}>\n {children}\n </PortalPrimitive>\n </Presence>\n </PortalProvider>\n );\n};\n\nHoverCardPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * HoverCardContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'HoverCardContent';\n\ntype HoverCardContentElement = HoverCardContentImplElement;\ninterface HoverCardContentProps extends HoverCardContentImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst HoverCardContent = React.forwardRef<HoverCardContentElement, HoverCardContentProps>(\n (props: ScopedProps<HoverCardContentProps>, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeHoverCard);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useHoverCardContext(CONTENT_NAME, props.__scopeHoverCard);\n return (\n <Presence present={forceMount || context.open}>\n <HoverCardContentImpl\n data-state={context.open ? 'open' : 'closed'}\n {...contentProps}\n onPointerEnter={composeEventHandlers(props.onPointerEnter, excludeTouch(context.onOpen))}\n onPointerLeave={composeEventHandlers(props.onPointerLeave, excludeTouch(context.onClose))}\n ref={forwardedRef}\n />\n </Presence>\n );\n }\n);\n\nHoverCardContent.displayName = CONTENT_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype HoverCardContentImplElement = React.ComponentRef<typeof PopperPrimitive.Content>;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;\ntype PopperContentProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;\ninterface HoverCardContentImplProps extends Omit<PopperContentProps, 'onPlaced'> {\n /**\n * Event handler called when the escape key is down.\n * Can be prevented.\n */\n onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];\n /**\n * Event handler called when the a `pointerdown` event happens outside of the `HoverCard`.\n * Can be prevented.\n */\n onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];\n /**\n * Event handler called when the focus moves outside of the `HoverCard`.\n * Can be prevented.\n */\n onFocusOutside?: DismissableLayerProps['onFocusOutside'];\n /**\n * Event handler called when an interaction happens outside the `HoverCard`.\n * Specifically, when a `pointerdown` event happens outside or focus moves outside of it.\n * Can be prevented.\n */\n onInteractOutside?: DismissableLayerProps['onInteractOutside'];\n}\n\nconst HoverCardContentImpl = React.forwardRef<\n HoverCardContentImplElement,\n HoverCardContentImplProps\n>((props: ScopedProps<HoverCardContentImplProps>, forwardedRef) => {\n const {\n __scopeHoverCard,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = useHoverCardContext(CONTENT_NAME, __scopeHoverCard);\n const popperScope = usePopperScope(__scopeHoverCard);\n const ref = React.useRef<HoverCardContentImplElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [containSelection, setContainSelection] = React.useState(false);\n\n React.useEffect(() => {\n if (containSelection) {\n const body = document.body;\n\n // Safari requires prefix\n originalBodyUserSelect = body.style.userSelect || body.style.webkitUserSelect;\n\n body.style.userSelect = 'none';\n body.style.webkitUserSelect = 'none';\n return () => {\n body.style.userSelect = originalBodyUserSelect;\n body.style.webkitUserSelect = originalBodyUserSelect;\n };\n }\n }, [containSelection]);\n\n React.useEffect(() => {\n if (ref.current) {\n const handlePointerUp = () => {\n setContainSelection(false);\n context.isPointerDownOnContentRef.current = false;\n\n // Delay a frame to ensure we always access the latest selection\n setTimeout(() => {\n const hasSelection = document.getSelection()?.toString() !== '';\n if (hasSelection) context.hasSelectionRef.current = true;\n });\n };\n\n document.addEventListener('pointerup', handlePointerUp);\n return () => {\n document.removeEventListener('pointerup', handlePointerUp);\n context.hasSelectionRef.current = false;\n context.isPointerDownOnContentRef.current = false;\n };\n }\n }, [context.isPointerDownOnContentRef, context.hasSelectionRef]);\n\n React.useEffect(() => {\n if (ref.current) {\n const tabbables = getTabbableNodes(ref.current);\n tabbables.forEach((tabbable) => tabbable.setAttribute('tabindex', '-1'));\n }\n });\n\n return (\n <DismissableLayer\n asChild\n disableOutsidePointerEvents={false}\n onInteractOutside={onInteractOutside}\n onEscapeKeyDown={onEscapeKeyDown}\n onPointerDownOutside={onPointerDownOutside}\n onFocusOutside={composeEventHandlers(onFocusOutside, (event) => {\n event.preventDefault();\n })}\n onDismiss={context.onDismiss}\n >\n <PopperPrimitive.Content\n {...popperScope}\n {...contentProps}\n onPointerDown={composeEventHandlers(contentProps.onPointerDown, (event) => {\n // Contain selection to current layer\n if (event.currentTarget.contains(event.target as HTMLElement)) {\n setContainSelection(true);\n }\n context.hasSelectionRef.current = false;\n context.isPointerDownOnContentRef.current = true;\n })}\n ref={composedRefs}\n style={{\n ...contentProps.style,\n userSelect: containSelection ? 'text' : undefined,\n // Safari requires prefix\n WebkitUserSelect: containSelection ? 'text' : undefined,\n // re-namespace exposed content custom properties\n ...{\n '--radix-hover-card-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-hover-card-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-hover-card-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-hover-card-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-hover-card-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n </DismissableLayer>\n );\n});\n\n/* -------------------------------------------------------------------------------------------------\n * HoverCardArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'HoverCardArrow';\n\ntype HoverCardArrowElement = React.ComponentRef<typeof PopperPrimitive.Arrow>;\ntype PopperArrowProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;\ninterface HoverCardArrowProps extends PopperArrowProps {}\n\nconst HoverCardArrow = React.forwardRef<HoverCardArrowElement, HoverCardArrowProps>(\n (props: ScopedProps<HoverCardArrowProps>, forwardedRef) => {\n const { __scopeHoverCard, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeHoverCard);\n return <PopperPrimitive.Arrow {...popperScope} {...arrowProps} ref={forwardedRef} />;\n }\n);\n\nHoverCardArrow.displayName = ARROW_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction excludeTouch<E>(eventHandler: () => void) {\n return (event: React.PointerEvent<E>) =>\n event.pointerType === 'touch' ? undefined : eventHandler();\n}\n\n/**\n * Returns a list of nodes that can be in the tab sequence.\n * @see: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\n */\nfunction getTabbableNodes(container: HTMLElement) {\n const nodes: HTMLElement[] = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node: any) => {\n // `.tabIndex` is not the same as the `tabindex` attribute. It works on the\n // runtime's understanding of tabbability, so this automatically accounts\n // for any kind of element that could be tabbed to.\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n },\n });\n while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement);\n return nodes;\n}\n\nconst Root = HoverCard;\nconst Trigger = HoverCardTrigger;\nconst Portal = HoverCardPortal;\nconst Content = HoverCardContent;\nconst Arrow = HoverCardArrow;\n\nexport {\n createHoverCardScope,\n //\n HoverCard,\n HoverCardTrigger,\n HoverCardPortal,\n HoverCardContent,\n HoverCardArrow,\n //\n Root,\n Trigger,\n Portal,\n Content,\n Arrow,\n};\nexport type {\n HoverCardProps,\n HoverCardTriggerProps,\n HoverCardPortalProps,\n HoverCardContentProps,\n HoverCardArrowProps,\n};\n","import type { ComponentProps } from 'react';\nimport * as HoverCardPrimitive from '@radix-ui/react-hover-card';\n\nimport { cn } from '../utils';\n\nconst HoverCard = ({ ...props }: ComponentProps<typeof HoverCardPrimitive.Root>) => (\n <HoverCardPrimitive.Root data-slot=\"hover-card\" {...props} />\n);\n\nconst HoverCardTrigger = ({\n ...props\n}: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) => (\n <HoverCardPrimitive.Trigger data-slot=\"hover-card-trigger\" {...props} />\n);\n\nconst HoverCardContent = ({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof HoverCardPrimitive.Content>) => (\n <HoverCardPrimitive.Portal data-slot=\"hover-card-portal\">\n <HoverCardPrimitive.Content\n data-slot=\"hover-card-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n className,\n )}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n);\n\nexport { HoverCard, HoverCardTrigger, HoverCardContent };\n"],"names":["HoverCard","PopperPrimitive.Root","HoverCardTrigger","PopperPrimitive.Anchor","PortalPrimitive","HoverCardContent","PopperPrimitive.Content","PopperPrimitive.Arrow","Root","Content","_jsx","HoverCardPrimitive.Root","HoverCardPrimitive.Trigger","HoverCardPrimitive.Portal","HoverCardPrimitive.Content"],"mappings":";;;;;;;;;AAkBA,IAAI,sBAAA,CAAA;AAEJ,IAAM,cAAiB,GAAA,WAAA,CAAA;AAGvB,IAAM,CAAC,sBAAA,EAAwB,oBAAoB,CAAA,GAAI,mBAAmB,cAAgB,EAAA;AAAA,EACxF,iBAAA;AACF,CAAC,CAAA,CAAA;AACD,IAAM,iBAAiB,iBAA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A;IAAuD,QAClFK,GAAC,CAAAC,KAAuB,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,WAAA,EAAA,YAAY,EAAK,EAAA,KAAK,CAAI,CAAA,EAC9D;EAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,EAEgC,KAAI;QADzD,KAAK,GAAA,MAAA,CAAA,EAAA,EADgB,EAEzB,CADS,CAAA;IACqD,QAC7DD,GAAC,CAAAE,OAA0B,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,WAAA,EAAA,oBAAoB,EAAK,EAAA,KAAK,CAAI,CAAA,EACzE;EAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,EAKgC,KAAI;AALpC,IAAA,IAAA,EACxB,SAAS,EACT,KAAK,GAAG,QAAQ,EAChB,UAAU,GAAG,CAAC,EAE0C,GAAA,EAAA,EADrD,KAAK,GAAA,MAAA,CAAA,EAAA,EAJgB,oCAKzB,CADS,CAAA;AACqD,IAAA,QAC7DF,GAAC,CAAAG,MAAyB,+BAAW,mBAAmB,EAAA,EAAA,EAAA,QAAA,EACtDH,GAAC,CAAAI,QAA0B,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,WAAA,EACf,oBAAoB,EAC9B,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CACX,meAAme,EACne,SAAS,CACV,EACG,EAAA,KAAK,CACT,CAAA,EAAA,CAAA,CACwB,EAC7B;;;;;","x_google_ignoreList":[0]}
@@ -1,16 +0,0 @@
1
- import * as React from 'react';
2
- import { u as useLayoutEffect2 } from './index-b8a83ba5.js';
3
-
4
- // packages/react/id/src/id.tsx
5
- var useReactId = React[" useId ".trim().toString()] || (() => void 0);
6
- var count = 0;
7
- function useId(deterministicId) {
8
- const [id, setId] = React.useState(useReactId());
9
- useLayoutEffect2(() => {
10
- if (!deterministicId) setId((reactId) => reactId ?? String(count++));
11
- }, [deterministicId]);
12
- return deterministicId || (id ? `radix-${id}` : "");
13
- }
14
-
15
- export { useId as u };
16
- //# sourceMappingURL=index-056b596e.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-056b596e.js","sources":["../../../../../node_modules/@radix-ui/react-id/src/id.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\n\n// We spaces with `.trim().toString()` to prevent bundlers from trying to `import { useId } from 'react';`\nconst useReactId = (React as any)[' useId '.trim().toString()] || (() => undefined);\nlet count = 0;\n\nfunction useId(deterministicId?: string): string {\n const [id, setId] = React.useState<string | undefined>(useReactId());\n // React versions older than 18 will have client-side ids only.\n useLayoutEffect(() => {\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId]);\n return deterministicId || (id ? `radix-${id}` : '');\n}\n\nexport { useId };\n"],"names":["useLayoutEffect"],"mappings":";;;;AAIA,IAAM,UAAA,GAAc,MAAc,SAAU,CAAA,IAAA,GAAO,QAAS,EAAC,MAAM,MAAM,KAAA,CAAA,CAAA,CAAA;AACzE,IAAI,KAAQ,GAAA,CAAA,CAAA;AAEZ,SAAS,MAAM,eAAkC,EAAA;AAC/C,EAAA,MAAM,CAAC,EAAI,EAAA,KAAK,CAAU,GAAA,KAAA,CAAA,QAAA,CAA6B,YAAY,CAAA,CAAA;AAEnE,EAAAA,gBAAA,CAAgB,MAAM;AACpB,IAAI,IAAA,CAAC,iBAAuB,KAAA,CAAA,CAAC,YAAY,OAAW,IAAA,MAAA,CAAO,OAAO,CAAC,CAAA,CAAA;AAAA,GACrE,EAAG,CAAC,eAAe,CAAC,CAAA,CAAA;AACpB,EAAA,OAAO,eAAoB,KAAA,EAAA,GAAK,CAAS,MAAA,EAAA,EAAE,CAAK,CAAA,GAAA,EAAA,CAAA,CAAA;AAClD;;;;","x_google_ignoreList":[0]}
@@ -1,222 +0,0 @@
1
- import * as React from 'react';
2
- import { c as createContextScope, P as Primitive, a as composeEventHandlers } from './index-b8a83ba5.js';
3
- import { c as createCollection } from './index-dd0fd848.js';
4
- import { u as useComposedRefs } from './index-b8f2908d.js';
5
- import { u as useId } from './index-056b596e.js';
6
- import { u as useCallbackRef } from './index-d9171717.js';
7
- import { u as useControllableState } from './index-454935af.js';
8
- import { u as useDirection } from './index-ae9b48d5.js';
9
- import { jsx } from 'react/jsx-runtime';
10
-
11
- var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
12
- var EVENT_OPTIONS = { bubbles: false, cancelable: true };
13
- var GROUP_NAME = "RovingFocusGroup";
14
- var [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);
15
- var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
16
- GROUP_NAME,
17
- [createCollectionScope]
18
- );
19
- var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);
20
- var RovingFocusGroup = React.forwardRef(
21
- (props, forwardedRef) => {
22
- return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
23
- }
24
- );
25
- RovingFocusGroup.displayName = GROUP_NAME;
26
- var RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {
27
- const {
28
- __scopeRovingFocusGroup,
29
- orientation,
30
- loop = false,
31
- dir,
32
- currentTabStopId: currentTabStopIdProp,
33
- defaultCurrentTabStopId,
34
- onCurrentTabStopIdChange,
35
- onEntryFocus,
36
- preventScrollOnEntryFocus = false,
37
- ...groupProps
38
- } = props;
39
- const ref = React.useRef(null);
40
- const composedRefs = useComposedRefs(forwardedRef, ref);
41
- const direction = useDirection(dir);
42
- const [currentTabStopId, setCurrentTabStopId] = useControllableState({
43
- prop: currentTabStopIdProp,
44
- defaultProp: defaultCurrentTabStopId ?? null,
45
- onChange: onCurrentTabStopIdChange,
46
- caller: GROUP_NAME
47
- });
48
- const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);
49
- const handleEntryFocus = useCallbackRef(onEntryFocus);
50
- const getItems = useCollection(__scopeRovingFocusGroup);
51
- const isClickFocusRef = React.useRef(false);
52
- const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);
53
- React.useEffect(() => {
54
- const node = ref.current;
55
- if (node) {
56
- node.addEventListener(ENTRY_FOCUS, handleEntryFocus);
57
- return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
58
- }
59
- }, [handleEntryFocus]);
60
- return /* @__PURE__ */ jsx(
61
- RovingFocusProvider,
62
- {
63
- scope: __scopeRovingFocusGroup,
64
- orientation,
65
- dir: direction,
66
- loop,
67
- currentTabStopId,
68
- onItemFocus: React.useCallback(
69
- (tabStopId) => setCurrentTabStopId(tabStopId),
70
- [setCurrentTabStopId]
71
- ),
72
- onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),
73
- onFocusableItemAdd: React.useCallback(
74
- () => setFocusableItemsCount((prevCount) => prevCount + 1),
75
- []
76
- ),
77
- onFocusableItemRemove: React.useCallback(
78
- () => setFocusableItemsCount((prevCount) => prevCount - 1),
79
- []
80
- ),
81
- children: /* @__PURE__ */ jsx(
82
- Primitive.div,
83
- {
84
- tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
85
- "data-orientation": orientation,
86
- ...groupProps,
87
- ref: composedRefs,
88
- style: { outline: "none", ...props.style },
89
- onMouseDown: composeEventHandlers(props.onMouseDown, () => {
90
- isClickFocusRef.current = true;
91
- }),
92
- onFocus: composeEventHandlers(props.onFocus, (event) => {
93
- const isKeyboardFocus = !isClickFocusRef.current;
94
- if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
95
- const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
96
- event.currentTarget.dispatchEvent(entryFocusEvent);
97
- if (!entryFocusEvent.defaultPrevented) {
98
- const items = getItems().filter((item) => item.focusable);
99
- const activeItem = items.find((item) => item.active);
100
- const currentItem = items.find((item) => item.id === currentTabStopId);
101
- const candidateItems = [activeItem, currentItem, ...items].filter(
102
- Boolean
103
- );
104
- const candidateNodes = candidateItems.map((item) => item.ref.current);
105
- focusFirst(candidateNodes, preventScrollOnEntryFocus);
106
- }
107
- }
108
- isClickFocusRef.current = false;
109
- }),
110
- onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))
111
- }
112
- )
113
- }
114
- );
115
- });
116
- var ITEM_NAME = "RovingFocusGroupItem";
117
- var RovingFocusGroupItem = React.forwardRef(
118
- (props, forwardedRef) => {
119
- const {
120
- __scopeRovingFocusGroup,
121
- focusable = true,
122
- active = false,
123
- tabStopId,
124
- children,
125
- ...itemProps
126
- } = props;
127
- const autoId = useId();
128
- const id = tabStopId || autoId;
129
- const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);
130
- const isCurrentTabStop = context.currentTabStopId === id;
131
- const getItems = useCollection(__scopeRovingFocusGroup);
132
- const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;
133
- React.useEffect(() => {
134
- if (focusable) {
135
- onFocusableItemAdd();
136
- return () => onFocusableItemRemove();
137
- }
138
- }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
139
- return /* @__PURE__ */ jsx(
140
- Collection.ItemSlot,
141
- {
142
- scope: __scopeRovingFocusGroup,
143
- id,
144
- focusable,
145
- active,
146
- children: /* @__PURE__ */ jsx(
147
- Primitive.span,
148
- {
149
- tabIndex: isCurrentTabStop ? 0 : -1,
150
- "data-orientation": context.orientation,
151
- ...itemProps,
152
- ref: forwardedRef,
153
- onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
154
- if (!focusable) event.preventDefault();
155
- else context.onItemFocus(id);
156
- }),
157
- onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),
158
- onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
159
- if (event.key === "Tab" && event.shiftKey) {
160
- context.onItemShiftTab();
161
- return;
162
- }
163
- if (event.target !== event.currentTarget) return;
164
- const focusIntent = getFocusIntent(event, context.orientation, context.dir);
165
- if (focusIntent !== void 0) {
166
- if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;
167
- event.preventDefault();
168
- const items = getItems().filter((item) => item.focusable);
169
- let candidateNodes = items.map((item) => item.ref.current);
170
- if (focusIntent === "last") candidateNodes.reverse();
171
- else if (focusIntent === "prev" || focusIntent === "next") {
172
- if (focusIntent === "prev") candidateNodes.reverse();
173
- const currentIndex = candidateNodes.indexOf(event.currentTarget);
174
- candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
175
- }
176
- setTimeout(() => focusFirst(candidateNodes));
177
- }
178
- }),
179
- children: typeof children === "function" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children
180
- }
181
- )
182
- }
183
- );
184
- }
185
- );
186
- RovingFocusGroupItem.displayName = ITEM_NAME;
187
- var MAP_KEY_TO_FOCUS_INTENT = {
188
- ArrowLeft: "prev",
189
- ArrowUp: "prev",
190
- ArrowRight: "next",
191
- ArrowDown: "next",
192
- PageUp: "first",
193
- Home: "first",
194
- PageDown: "last",
195
- End: "last"
196
- };
197
- function getDirectionAwareKey(key, dir) {
198
- if (dir !== "rtl") return key;
199
- return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
200
- }
201
- function getFocusIntent(event, orientation, dir) {
202
- const key = getDirectionAwareKey(event.key, dir);
203
- if (orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key)) return void 0;
204
- if (orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key)) return void 0;
205
- return MAP_KEY_TO_FOCUS_INTENT[key];
206
- }
207
- function focusFirst(candidates, preventScroll = false) {
208
- const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
209
- for (const candidate of candidates) {
210
- if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
211
- candidate.focus({ preventScroll });
212
- if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
213
- }
214
- }
215
- function wrapArray(array, startIndex) {
216
- return array.map((_, index) => array[(startIndex + index) % array.length]);
217
- }
218
- var Root = RovingFocusGroup;
219
- var Item = RovingFocusGroupItem;
220
-
221
- export { Item as I, Root as R, createRovingFocusGroupScope as c };
222
- //# sourceMappingURL=index-35823769.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-35823769.js","sources":["../../../../../node_modules/@radix-ui/react-roving-focus/src/roving-focus-group.tsx"],"sourcesContent":["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useDirection } from '@radix-ui/react-direction';\n\nimport type { Scope } from '@radix-ui/react-context';\n\nconst ENTRY_FOCUS = 'rovingFocusGroup.onEntryFocus';\nconst EVENT_OPTIONS = { bubbles: false, cancelable: true };\n\n/* -------------------------------------------------------------------------------------------------\n * RovingFocusGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'RovingFocusGroup';\n\ntype ItemData = { id: string; focusable: boolean; active: boolean };\nconst [Collection, useCollection, createCollectionScope] = createCollection<\n HTMLSpanElement,\n ItemData\n>(GROUP_NAME);\n\ntype ScopedProps<P> = P & { __scopeRovingFocusGroup?: Scope };\nconst [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\n\ntype Orientation = React.AriaAttributes['aria-orientation'];\ntype Direction = 'ltr' | 'rtl';\n\ninterface RovingFocusGroupOptions {\n /**\n * The orientation of the group.\n * Mainly so arrow navigation is done accordingly (left & right vs. up & down)\n */\n orientation?: Orientation;\n /**\n * The direction of navigation between items.\n */\n dir?: Direction;\n /**\n * Whether keyboard navigation should loop around\n * @defaultValue false\n */\n loop?: boolean;\n}\n\ntype RovingContextValue = RovingFocusGroupOptions & {\n currentTabStopId: string | null;\n onItemFocus(tabStopId: string): void;\n onItemShiftTab(): void;\n onFocusableItemAdd(): void;\n onFocusableItemRemove(): void;\n};\n\nconst [RovingFocusProvider, useRovingFocusContext] =\n createRovingFocusGroupContext<RovingContextValue>(GROUP_NAME);\n\ntype RovingFocusGroupElement = RovingFocusGroupImplElement;\ninterface RovingFocusGroupProps extends RovingFocusGroupImplProps {}\n\nconst RovingFocusGroup = React.forwardRef<RovingFocusGroupElement, RovingFocusGroupProps>(\n (props: ScopedProps<RovingFocusGroupProps>, forwardedRef) => {\n return (\n <Collection.Provider scope={props.__scopeRovingFocusGroup}>\n <Collection.Slot scope={props.__scopeRovingFocusGroup}>\n <RovingFocusGroupImpl {...props} ref={forwardedRef} />\n </Collection.Slot>\n </Collection.Provider>\n );\n }\n);\n\nRovingFocusGroup.displayName = GROUP_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype RovingFocusGroupImplElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface RovingFocusGroupImplProps\n extends Omit<PrimitiveDivProps, 'dir'>,\n RovingFocusGroupOptions {\n currentTabStopId?: string | null;\n defaultCurrentTabStopId?: string;\n onCurrentTabStopIdChange?: (tabStopId: string | null) => void;\n onEntryFocus?: (event: Event) => void;\n preventScrollOnEntryFocus?: boolean;\n}\n\nconst RovingFocusGroupImpl = React.forwardRef<\n RovingFocusGroupImplElement,\n RovingFocusGroupImplProps\n>((props: ScopedProps<RovingFocusGroupImplProps>, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef<RovingFocusGroupImplElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME,\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n\n return (\n <RovingFocusProvider\n scope={__scopeRovingFocusGroup}\n orientation={orientation}\n dir={direction}\n loop={loop}\n currentTabStopId={currentTabStopId}\n onItemFocus={React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n )}\n onItemShiftTab={React.useCallback(() => setIsTabbingBackOut(true), [])}\n onFocusableItemAdd={React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n )}\n onFocusableItemRemove={React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n )}\n >\n <Primitive.div\n tabIndex={isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0}\n data-orientation={orientation}\n {...groupProps}\n ref={composedRefs}\n style={{ outline: 'none', ...props.style }}\n onMouseDown={composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n })}\n onFocus={composeEventHandlers(props.onFocus, (event) => {\n // We normally wouldn't need this check, because we already check\n // that the focus is on the current target and not bubbling to it.\n // We do this because Safari doesn't focus buttons when clicked, and\n // instead, the wrapper will get focused and not through a bubbling event.\n const isKeyboardFocus = !isClickFocusRef.current;\n\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n ) as typeof items;\n const candidateNodes = candidateItems.map((item) => item.ref.current!);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n\n isClickFocusRef.current = false;\n })}\n onBlur={composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))}\n />\n </RovingFocusProvider>\n );\n});\n\n/* -------------------------------------------------------------------------------------------------\n * RovingFocusGroupItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'RovingFocusGroupItem';\n\ntype RovingFocusItemElement = React.ComponentRef<typeof Primitive.span>;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;\ninterface RovingFocusItemProps extends Omit<PrimitiveSpanProps, 'children'> {\n tabStopId?: string;\n focusable?: boolean;\n active?: boolean;\n children?:\n | React.ReactNode\n | ((props: { hasTabStop: boolean; isCurrentTabStop: boolean }) => React.ReactNode);\n}\n\nconst RovingFocusGroupItem = React.forwardRef<RovingFocusItemElement, RovingFocusItemProps>(\n (props: ScopedProps<RovingFocusItemProps>, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n\n return (\n <Collection.ItemSlot\n scope={__scopeRovingFocusGroup}\n id={id}\n focusable={focusable}\n active={active}\n >\n <Primitive.span\n tabIndex={isCurrentTabStop ? 0 : -1}\n data-orientation={context.orientation}\n {...itemProps}\n ref={forwardedRef}\n onMouseDown={composeEventHandlers(props.onMouseDown, (event) => {\n // We prevent focusing non-focusable items on `mousedown`.\n // Even though the item has tabIndex={-1}, that only means take it out of the tab order.\n if (!focusable) event.preventDefault();\n // Safari doesn't focus a button when clicked so we run our logic on mousedown also\n else context.onItemFocus(id);\n })}\n onFocus={composeEventHandlers(props.onFocus, () => context.onItemFocus(id))}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === 'Tab' && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n\n if (event.target !== event.currentTarget) return;\n\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n\n if (focusIntent !== undefined) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current!);\n\n if (focusIntent === 'last') candidateNodes.reverse();\n else if (focusIntent === 'prev' || focusIntent === 'next') {\n if (focusIntent === 'prev') candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop\n ? wrapArray(candidateNodes, currentIndex + 1)\n : candidateNodes.slice(currentIndex + 1);\n }\n\n /**\n * Imperative focus during keydown is risky so we prevent React's batching updates\n * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332\n */\n setTimeout(() => focusFirst(candidateNodes));\n }\n })}\n >\n {typeof children === 'function'\n ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null })\n : children}\n </Primitive.span>\n </Collection.ItemSlot>\n );\n }\n);\n\nRovingFocusGroupItem.displayName = ITEM_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\n// prettier-ignore\nconst MAP_KEY_TO_FOCUS_INTENT: Record<string, FocusIntent> = {\n ArrowLeft: 'prev', ArrowUp: 'prev',\n ArrowRight: 'next', ArrowDown: 'next',\n PageUp: 'first', Home: 'first',\n PageDown: 'last', End: 'last',\n};\n\nfunction getDirectionAwareKey(key: string, dir?: Direction) {\n if (dir !== 'rtl') return key;\n return key === 'ArrowLeft' ? 'ArrowRight' : key === 'ArrowRight' ? 'ArrowLeft' : key;\n}\n\ntype FocusIntent = 'first' | 'last' | 'prev' | 'next';\n\nfunction getFocusIntent(event: React.KeyboardEvent, orientation?: Orientation, dir?: Direction) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === 'vertical' && ['ArrowLeft', 'ArrowRight'].includes(key)) return undefined;\n if (orientation === 'horizontal' && ['ArrowUp', 'ArrowDown'].includes(key)) return undefined;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\n\nfunction focusFirst(candidates: HTMLElement[], preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n // if focus is already where we want to go, we don't want to keep going through the candidates\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\n\n/**\n * Wraps an array around itself at a given start index\n * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`\n */\nfunction wrapArray<T>(array: T[], startIndex: number) {\n return array.map<T>((_, index) => array[(startIndex + index) % array.length]!);\n}\n\nconst Root = RovingFocusGroup;\nconst Item = RovingFocusGroupItem;\n\nexport {\n createRovingFocusGroupScope,\n //\n RovingFocusGroup,\n RovingFocusGroupItem,\n //\n Root,\n Item,\n};\nexport type { RovingFocusGroupProps, RovingFocusItemProps };\n"],"names":[],"mappings":";;;;;;;;;;AAaA,IAAM,WAAc,GAAA,+BAAA,CAAA;AAC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