@yoopta/themes-shadcn 6.0.1 → 6.0.2

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 (139) hide show
  1. package/dist/embed/elements/embed/embed-element.d.ts +1 -1
  2. package/dist/embed/elements/embed/embed-element.d.ts.map +1 -1
  3. package/dist/embed/elements/embed/embed-render.d.ts.map +1 -1
  4. package/dist/embed/index.d.ts +1 -1
  5. package/dist/embed.js +2 -2
  6. package/dist/file/elements/file/file-element.d.ts +1 -1
  7. package/dist/file/elements/file/file-element.d.ts.map +1 -1
  8. package/dist/file/index.d.ts +1 -1
  9. package/dist/file.js +2 -2
  10. package/dist/image/elements/image/image-element.d.ts +1 -1
  11. package/dist/image/elements/image/image-element.d.ts.map +1 -1
  12. package/dist/image/elements/image/image-render.d.ts.map +1 -1
  13. package/dist/image/index.d.ts +1 -1
  14. package/dist/image.js +2 -2
  15. package/dist/index.js +1 -1
  16. package/dist/steps/elements/steps-list-item.d.ts.map +1 -1
  17. package/dist/steps.js +1 -1
  18. package/dist/video/elements/video/video-element.d.ts +1 -1
  19. package/dist/video/elements/video/video-element.d.ts.map +1 -1
  20. package/dist/video/elements/video/video-render.d.ts.map +1 -1
  21. package/dist/video/index.d.ts +1 -1
  22. package/dist/video.js +2 -2
  23. package/package.json +13 -13
  24. package/dist/accordion.js.map +0 -1
  25. package/dist/blockquote.js.map +0 -1
  26. package/dist/callout.js.map +0 -1
  27. package/dist/carousel.js.map +0 -1
  28. package/dist/chunks/Combination-3c924518.js +0 -1080
  29. package/dist/chunks/Combination-3c924518.js.map +0 -1
  30. package/dist/chunks/_tslib-514d60fe.js +0 -67
  31. package/dist/chunks/_tslib-514d60fe.js.map +0 -1
  32. package/dist/chunks/arrow-right-5ddace59.js +0 -30
  33. package/dist/chunks/arrow-right-5ddace59.js.map +0 -1
  34. package/dist/chunks/button-27a1fbc2.js +0 -76
  35. package/dist/chunks/button-27a1fbc2.js.map +0 -1
  36. package/dist/chunks/card-12ed876a.js +0 -38
  37. package/dist/chunks/card-12ed876a.js.map +0 -1
  38. package/dist/chunks/check-9acc031a.js +0 -14
  39. package/dist/chunks/check-9acc031a.js.map +0 -1
  40. package/dist/chunks/chevron-down-7424d0c3.js +0 -16
  41. package/dist/chunks/chevron-down-7424d0c3.js.map +0 -1
  42. package/dist/chunks/chevron-up-546faa64.js +0 -14
  43. package/dist/chunks/chevron-up-546faa64.js.map +0 -1
  44. package/dist/chunks/code-5407bf8e.js +0 -17
  45. package/dist/chunks/code-5407bf8e.js.map +0 -1
  46. package/dist/chunks/createLucideIcon-6ba35914.js +0 -56
  47. package/dist/chunks/createLucideIcon-6ba35914.js.map +0 -1
  48. package/dist/chunks/dropdown-menu-9ba446af.js +0 -1250
  49. package/dist/chunks/dropdown-menu-9ba446af.js.map +0 -1
  50. package/dist/chunks/external-link-1bf3c7a2.js +0 -18
  51. package/dist/chunks/external-link-1bf3c7a2.js.map +0 -1
  52. package/dist/chunks/file-text-9e348575.js +0 -23
  53. package/dist/chunks/file-text-9e348575.js.map +0 -1
  54. package/dist/chunks/hover-card-22a4067b.js +0 -258
  55. package/dist/chunks/hover-card-22a4067b.js.map +0 -1
  56. package/dist/chunks/index-0c94b090.js +0 -222
  57. package/dist/chunks/index-0c94b090.js.map +0 -1
  58. package/dist/chunks/index-12e7c5fd.js +0 -155
  59. package/dist/chunks/index-12e7c5fd.js.map +0 -1
  60. package/dist/chunks/index-26994c9d.js +0 -131
  61. package/dist/chunks/index-26994c9d.js.map +0 -1
  62. package/dist/chunks/index-600be8f8.js +0 -190
  63. package/dist/chunks/index-600be8f8.js.map +0 -1
  64. package/dist/chunks/index-7e966ec9.js +0 -16
  65. package/dist/chunks/index-7e966ec9.js.map +0 -1
  66. package/dist/chunks/index-9ac5afe2.js +0 -201
  67. package/dist/chunks/index-9ac5afe2.js.map +0 -1
  68. package/dist/chunks/index-9bb7ddb4.js +0 -104
  69. package/dist/chunks/index-9bb7ddb4.js.map +0 -1
  70. package/dist/chunks/index-ae9b48d5.js +0 -12
  71. package/dist/chunks/index-ae9b48d5.js.map +0 -1
  72. package/dist/chunks/index-b26053ec.js +0 -3805
  73. package/dist/chunks/index-b26053ec.js.map +0 -1
  74. package/dist/chunks/index-b8f2908d.js +0 -40
  75. package/dist/chunks/index-b8f2908d.js.map +0 -1
  76. package/dist/chunks/index-c655a86f.js +0 -7
  77. package/dist/chunks/index-c655a86f.js.map +0 -1
  78. package/dist/chunks/index-d9171717.js +0 -13
  79. package/dist/chunks/index-d9171717.js.map +0 -1
  80. package/dist/chunks/index-e42d0aaf.js +0 -36
  81. package/dist/chunks/index-e42d0aaf.js.map +0 -1
  82. package/dist/chunks/index-ebc47eac.js +0 -2765
  83. package/dist/chunks/index-ebc47eac.js.map +0 -1
  84. package/dist/chunks/index-ffe23855.js +0 -71
  85. package/dist/chunks/index-ffe23855.js.map +0 -1
  86. package/dist/chunks/input-7c5e4260.js +0 -13
  87. package/dist/chunks/input-7c5e4260.js.map +0 -1
  88. package/dist/chunks/label-2a076b3f.js +0 -70
  89. package/dist/chunks/label-2a076b3f.js.map +0 -1
  90. package/dist/chunks/language-select-b35256ab.js +0 -12
  91. package/dist/chunks/language-select-b35256ab.js.map +0 -1
  92. package/dist/chunks/play-c2a06e4e.js +0 -16
  93. package/dist/chunks/play-c2a06e4e.js.map +0 -1
  94. package/dist/chunks/plus-f36f52e8.js +0 -17
  95. package/dist/chunks/plus-f36f52e8.js.map +0 -1
  96. package/dist/chunks/popover-4b5c0941.js +0 -385
  97. package/dist/chunks/popover-4b5c0941.js.map +0 -1
  98. package/dist/chunks/scroll-area-8dc03d8f.js +0 -727
  99. package/dist/chunks/scroll-area-8dc03d8f.js.map +0 -1
  100. package/dist/chunks/select-88f1b66c.js +0 -1281
  101. package/dist/chunks/select-88f1b66c.js.map +0 -1
  102. package/dist/chunks/separator-a6b3e5d2.js +0 -74
  103. package/dist/chunks/separator-a6b3e5d2.js.map +0 -1
  104. package/dist/chunks/settings-2-8e53118c.js +0 -19
  105. package/dist/chunks/settings-2-8e53118c.js.map +0 -1
  106. package/dist/chunks/sparkles-a0316be3.js +0 -26
  107. package/dist/chunks/sparkles-a0316be3.js.map +0 -1
  108. package/dist/chunks/style-inject.es-746bb8ed.js +0 -29
  109. package/dist/chunks/style-inject.es-746bb8ed.js.map +0 -1
  110. package/dist/chunks/tabs-38ee85c4.js +0 -205
  111. package/dist/chunks/tabs-38ee85c4.js.map +0 -1
  112. package/dist/chunks/tooltip-eb8a0f63.js +0 -1671
  113. package/dist/chunks/tooltip-eb8a0f63.js.map +0 -1
  114. package/dist/chunks/trash-2-41ddec45.js +0 -20
  115. package/dist/chunks/trash-2-41ddec45.js.map +0 -1
  116. package/dist/chunks/upload-b987996c.js +0 -44
  117. package/dist/chunks/upload-b987996c.js.map +0 -1
  118. package/dist/chunks/utils-208f599b.js +0 -2500
  119. package/dist/chunks/utils-208f599b.js.map +0 -1
  120. package/dist/chunks/x-f7edc87d.js +0 -17
  121. package/dist/chunks/x-f7edc87d.js.map +0 -1
  122. package/dist/code-group.js.map +0 -1
  123. package/dist/code.js.map +0 -1
  124. package/dist/divider.js.map +0 -1
  125. package/dist/embed.js.map +0 -1
  126. package/dist/emoji.js.map +0 -1
  127. package/dist/file.js.map +0 -1
  128. package/dist/headings.js.map +0 -1
  129. package/dist/image.js.map +0 -1
  130. package/dist/index.js.map +0 -1
  131. package/dist/link.js.map +0 -1
  132. package/dist/lists.js.map +0 -1
  133. package/dist/mention.js.map +0 -1
  134. package/dist/paragraph.js.map +0 -1
  135. package/dist/steps.js.map +0 -1
  136. package/dist/table-of-contents.js.map +0 -1
  137. package/dist/table.js.map +0 -1
  138. package/dist/tabs.js.map +0 -1
  139. package/dist/video.js.map +0 -1
@@ -1,13 +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 cn } from './utils-208f599b.js';
5
-
6
- const Input = React.forwardRef((_a, ref) => {
7
- var { className, type } = _a, props = __rest(_a, ["className", "type"]);
8
- return (jsx("input", Object.assign({ type: type, className: cn('flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', className), ref: ref }, props)));
9
- });
10
- Input.displayName = 'Input';
11
-
12
- export { Input as I };
13
- //# sourceMappingURL=input-7c5e4260.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input-7c5e4260.js","sources":["../../src/ui/input.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '../utils';\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<'input'>>(\n ({ className, type, ...props }, ref) => (\n <input\n type={type}\n className={cn(\n 'flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n className,\n )}\n ref={ref}\n {...props}\n />\n ),\n);\nInput.displayName = 'Input';\n\nexport { Input };\n"],"names":["_jsx"],"mappings":";;;;;AAIM,MAAA,KAAK,GAAG,KAAK,CAAC,UAAU,CAC5B,CAAC,EAA6B,EAAE,GAAG,KAAI;QAAtC,EAAE,SAAS,EAAE,IAAI,EAAA,GAAA,EAAY,EAAP,KAAK,GAAA,MAAA,CAAA,EAAA,EAA3B,qBAA6B,CAAF,CAAA;IAAY,QACtCA,6BACE,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,EAAE,CACX,yWAAyW,EACzW,SAAS,CACV,EACD,GAAG,EAAE,GAAG,EACJ,EAAA,KAAK,CACT,CAAA,EACH;AAAA,CAAA,EACD;AACF,KAAK,CAAC,WAAW,GAAG,OAAO;;;;"}
@@ -1,70 +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 'react-dom';
5
- import { c as createSlot } from './index-9bb7ddb4.js';
6
- import { c as cva } from './button-27a1fbc2.js';
7
- import { c as cn } from './utils-208f599b.js';
8
-
9
- // src/primitive.tsx
10
- var NODES = [
11
- "a",
12
- "button",
13
- "div",
14
- "form",
15
- "h2",
16
- "h3",
17
- "img",
18
- "input",
19
- "label",
20
- "li",
21
- "nav",
22
- "ol",
23
- "p",
24
- "select",
25
- "span",
26
- "svg",
27
- "ul"
28
- ];
29
- var Primitive = NODES.reduce((primitive, node) => {
30
- const Slot = createSlot(`Primitive.${node}`);
31
- const Node = React.forwardRef((props, forwardedRef) => {
32
- const { asChild, ...primitiveProps } = props;
33
- const Comp = asChild ? Slot : node;
34
- if (typeof window !== "undefined") {
35
- window[Symbol.for("radix-ui")] = true;
36
- }
37
- return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
38
- });
39
- Node.displayName = `Primitive.${node}`;
40
- return { ...primitive, [node]: Node };
41
- }, {});
42
-
43
- var NAME = "Label";
44
- var Label$1 = React.forwardRef((props, forwardedRef) => {
45
- return /* @__PURE__ */ jsx(
46
- Primitive.label,
47
- {
48
- ...props,
49
- ref: forwardedRef,
50
- onMouseDown: (event) => {
51
- const target = event.target;
52
- if (target.closest("button, input, select, textarea")) return;
53
- props.onMouseDown?.(event);
54
- if (!event.defaultPrevented && event.detail > 1) event.preventDefault();
55
- }
56
- }
57
- );
58
- });
59
- Label$1.displayName = NAME;
60
- var Root = Label$1;
61
-
62
- const labelVariants = cva('text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70');
63
- const Label = React.forwardRef((_a, ref) => {
64
- var { className } = _a, props = __rest(_a, ["className"]);
65
- return (jsx(Root, Object.assign({ ref: ref, className: cn(labelVariants(), className) }, props)));
66
- });
67
- Label.displayName = Root.displayName;
68
-
69
- export { Label as L };
70
- //# sourceMappingURL=label-2a076b3f.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"label-2a076b3f.js","sources":["../../../../../node_modules/@radix-ui/react-label/node_modules/@radix-ui/react-primitive/src/primitive.tsx","../../../../../node_modules/@radix-ui/react-label/src/label.tsx","../../src/ui/label.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { createSlot } from '@radix-ui/react-slot';\n\nconst NODES = [\n 'a',\n 'button',\n 'div',\n 'form',\n 'h2',\n 'h3',\n 'img',\n 'input',\n 'label',\n 'li',\n 'nav',\n 'ol',\n 'p',\n 'select',\n 'span',\n 'svg',\n 'ul',\n] as const;\n\ntype Primitives = { [E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E> };\ntype PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {\n asChild?: boolean;\n};\n\ninterface PrimitiveForwardRefComponent<E extends React.ElementType>\n extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {}\n\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/\n\nconst Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props: PrimitivePropsWithRef<typeof node>, forwardedRef: any) => {\n const { asChild, ...primitiveProps } = props;\n const Comp: any = asChild ? Slot : node;\n\n if (typeof window !== 'undefined') {\n (window as any)[Symbol.for('radix-ui')] = true;\n }\n\n return <Comp {...primitiveProps} ref={forwardedRef} />;\n });\n\n Node.displayName = `Primitive.${node}`;\n\n return { ...primitive, [node]: Node };\n}, {} as Primitives);\n\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Flush custom event dispatch\n * https://github.com/radix-ui/primitives/pull/1378\n *\n * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.\n *\n * Internally, React prioritises events in the following order:\n * - discrete\n * - continuous\n * - default\n *\n * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350\n *\n * `discrete` is an important distinction as updates within these events are applied immediately.\n * React however, is not able to infer the priority of custom event types due to how they are detected internally.\n * Because of this, it's possible for updates from custom events to be unexpectedly batched when\n * dispatched by another `discrete` event.\n *\n * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.\n * This utility should be used when dispatching a custom event from within another `discrete` event, this utility\n * is not necessary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.\n * For example:\n *\n * dispatching a known click 👎\n * target.dispatchEvent(new Event(‘click’))\n *\n * dispatching a custom type within a non-discrete event 👎\n * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}\n *\n * dispatching a custom type within a `discrete` event 👍\n * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}\n *\n * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use\n * this utility with them. This is because it's possible for those handlers to be called implicitly during render\n * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.\n */\n\nfunction dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Primitive;\n\nexport {\n Primitive,\n //\n Root,\n //\n dispatchDiscreteCustomEvent,\n};\nexport type { PrimitivePropsWithRef };\n","import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Label\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Label';\n\ntype LabelElement = React.ComponentRef<typeof Primitive.label>;\ntype PrimitiveLabelProps = React.ComponentPropsWithoutRef<typeof Primitive.label>;\ninterface LabelProps extends PrimitiveLabelProps {}\n\nconst Label = React.forwardRef<LabelElement, LabelProps>((props, forwardedRef) => {\n return (\n <Primitive.label\n {...props}\n ref={forwardedRef}\n onMouseDown={(event) => {\n // only prevent text selection if clicking inside the label itself\n const target = event.target as HTMLElement;\n if (target.closest('button, input, select, textarea')) return;\n\n props.onMouseDown?.(event);\n // prevent text selection when double clicking label\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }}\n />\n );\n});\n\nLabel.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Label;\n\nexport {\n Label,\n //\n Root,\n};\nexport type { LabelProps };\n","import * as React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { type VariantProps, cva } from 'class-variance-authority';\n\nimport { cn } from '../utils';\n\nconst labelVariants = cva(\n 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n);\n\ntype LabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n VariantProps<typeof labelVariants>;\n\nconst Label = React.forwardRef<HTMLLabelElement, LabelProps>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n));\n\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n"],"names":["Label","_jsx","LabelPrimitive.Root"],"mappings":";;;;;;;;;AAIA,IAAM,KAAQ,GAAA;AAAA,EACZ,GAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA;AAAA,EACA,MAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,GAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AACF,CAAA,CAAA;AAcA,IAAM,SAAY,GAAA,KAAA,CAAM,MAAO,CAAA,CAAC,WAAW,IAAS,KAAA;AAClD,EAAA,MAAM,IAAO,GAAA,UAAA,CAAW,CAAa,UAAA,EAAA,IAAI,CAAE,CAAA,CAAA,CAAA;AAC3C,EAAA,MAAM,IAAa,GAAA,KAAA,CAAA,UAAA,CAAW,CAAC,KAAA,EAA2C,YAAsB,KAAA;AAC9F,IAAA,MAAM,EAAE,OAAA,EAAS,GAAG,cAAA,EAAmB,GAAA,KAAA,CAAA;AACvC,IAAM,MAAA,IAAA,GAAY,UAAU,IAAO,GAAA,IAAA,CAAA;AAEnC,IAAI,IAAA,OAAO,WAAW,WAAa,EAAA;AACjC,MAAC,MAAe,CAAA,MAAA,CAAO,GAAI,CAAA,UAAU,CAAC,CAAI,GAAA,IAAA,CAAA;AAAA,KAC5C;AAEA,IAAA,uBAAQ,GAAA,CAAA,IAAA,EAAA,EAAM,GAAG,cAAA,EAAgB,KAAK,YAAc,EAAA,CAAA,CAAA;AAAA,GACrD,CAAA,CAAA;AAED,EAAK,IAAA,CAAA,WAAA,GAAc,aAAa,IAAI,CAAA,CAAA,CAAA;AAEpC,EAAA,OAAO,EAAE,GAAG,SAAA,EAAW,CAAC,IAAI,GAAG,IAAK,EAAA,CAAA;AACtC,CAAA,EAAG,EAAgB,CAAA;;AC7CnB,IAAM,IAAO,GAAA,OAAA,CAAA;AAMb,IAAMA,OAAc,GAAA,KAAA,CAAA,UAAA,CAAqC,CAAC,KAAA,EAAO,YAAiB,KAAA;AAChF,EACE,uBAAA,GAAA;AAAA,IAAC,SAAU,CAAA,KAAA;AAAA,IAAV;AAAA,MACE,GAAG,KAAA;AAAA,MACJ,GAAK,EAAA,YAAA;AAAA,MACL,WAAA,EAAa,CAAC,KAAU,KAAA;AAEtB,QAAA,MAAM,SAAS,KAAM,CAAA,MAAA,CAAA;AACrB,QAAI,IAAA,MAAA,CAAO,OAAQ,CAAA,iCAAiC,CAAG,EAAA,OAAA;AAEvD,QAAA,KAAA,CAAM,cAAc,KAAK,CAAA,CAAA;AAEzB,QAAA,IAAI,CAAC,KAAM,CAAA,gBAAA,IAAoB,MAAM,MAAS,GAAA,CAAA,QAAS,cAAe,EAAA,CAAA;AAAA,OACxE;AAAA,KAAA;AAAA,GACF,CAAA;AAEJ,CAAC,CAAA,CAAA;AAEDA,OAAA,CAAM,WAAc,GAAA,IAAA,CAAA;AAIpB,IAAM,IAAO,GAAAA,OAAA;;AC7Bb,MAAM,aAAa,GAAG,GAAG,CACvB,4FAA4F,CAC7F,CAAC;AAKI,MAAA,KAAK,GAAG,KAAK,CAAC,UAAU,CAA+B,CAAC,EAAuB,EAAE,GAAG,KAAI;AAAhC,IAAA,IAAA,EAAE,SAAS,EAAY,GAAA,EAAA,EAAP,KAAK,GAAA,MAAA,CAAA,EAAA,EAArB,aAAuB,CAAF,CAAA;IAAY,QAC7FC,IAACC,IAAmB,EAAC,MAAA,CAAA,MAAA,CAAA,EAAA,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,EAAE,SAAS,CAAC,EAAM,EAAA,KAAK,CAAI,CAAA,EACxF;AAAA,CAAA,EAAE;AAEH,KAAK,CAAC,WAAW,GAAGA,IAAmB,CAAC,WAAW;;;;","x_google_ignoreList":[0,1]}
@@ -1,12 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { useYooptaReadOnly } from '@yoopta/editor';
3
- import { S as Select, a as SelectTrigger, b as SelectValue, c as SelectContent, d as SelectItem } from './select-88f1b66c.js';
4
- import { c as cn } from './utils-208f599b.js';
5
-
6
- const LanguageSelect = ({ value, options, onValueChange, currentLabel, className, style, }) => {
7
- const isReadOnly = useYooptaReadOnly();
8
- return (jsxs(Select, Object.assign({ value: value, onValueChange: onValueChange, disabled: isReadOnly }, { children: [jsx(SelectTrigger, Object.assign({ size: "sm", className: cn('h-7 gap-1.5 text-xs font-mono border-transparent hover:border-current/20', className), style: style, contentEditable: false, onMouseDown: (e) => e.stopPropagation(), onClick: (e) => e.stopPropagation() }, { children: jsx(SelectValue, Object.assign({ placeholder: currentLabel }, { children: currentLabel })) })), jsx(SelectContent, Object.assign({ align: "start", position: "popper", className: "max-h-[200px]", onMouseDown: (e) => e.stopPropagation(), onClick: (e) => e.stopPropagation() }, { children: options.map((option) => (jsx(SelectItem, Object.assign({ value: option.value, className: "text-xs font-mono" }, { children: option.label }), option.value))) }))] })));
9
- };
10
-
11
- export { LanguageSelect as L };
12
- //# sourceMappingURL=language-select-b35256ab.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"language-select-b35256ab.js","sources":["../../src/code/elements/language-select.tsx"],"sourcesContent":["import { useYooptaReadOnly } from '@yoopta/editor';\n\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '../../ui/select';\nimport { cn } from '../../utils';\n\ntype LanguageOption = {\n value: string;\n label: string;\n};\n\ntype LanguageSelectProps = {\n value: string;\n options: readonly LanguageOption[];\n onValueChange: (value: string) => void;\n currentLabel: string;\n className?: string;\n style?: React.CSSProperties;\n};\n\nexport const LanguageSelect = ({\n value,\n options,\n onValueChange,\n currentLabel,\n className,\n style,\n}: LanguageSelectProps) => {\n const isReadOnly = useYooptaReadOnly();\n\n return (\n <Select value={value} onValueChange={onValueChange} disabled={isReadOnly}>\n <SelectTrigger\n size=\"sm\"\n className={cn('h-7 gap-1.5 text-xs font-mono border-transparent hover:border-current/20', className)}\n style={style}\n contentEditable={false}\n onMouseDown={(e) => e.stopPropagation()}\n onClick={(e) => e.stopPropagation()}>\n <SelectValue placeholder={currentLabel}>{currentLabel}</SelectValue>\n </SelectTrigger>\n <SelectContent\n align=\"start\"\n position=\"popper\"\n className=\"max-h-[200px]\"\n onMouseDown={(e) => e.stopPropagation()}\n onClick={(e) => e.stopPropagation()}>\n {options.map((option) => (\n <SelectItem key={option.value} value={option.value} className=\"text-xs font-mono\">\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;AAyBa,MAAA,cAAc,GAAG,CAAC,EAC7B,KAAK,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,SAAS,EACT,KAAK,GACe,KAAI;AACxB,IAAA,MAAM,UAAU,GAAG,iBAAiB,EAAE,CAAC;AAEvC,IAAA,QACEA,IAAA,CAAC,MAAM,EAAA,MAAA,CAAA,MAAA,CAAA,EAAC,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EACtE,EAAA,EAAA,QAAA,EAAA,CAAAC,GAAA,CAAC,aAAa,EAAA,MAAA,CAAA,MAAA,CAAA,EACZ,IAAI,EAAC,IAAI,EACT,SAAS,EAAE,EAAE,CAAC,0EAA0E,EAAE,SAAS,CAAC,EACpG,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,KAAK,EACtB,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,EAAE,EACvC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,EAAE,EACnC,EAAA,EAAA,QAAA,EAAAA,GAAA,CAAC,WAAW,EAAA,MAAA,CAAA,MAAA,CAAA,EAAC,WAAW,EAAE,YAAY,EAAG,EAAA,EAAA,QAAA,EAAA,YAAY,IAAe,EACtD,CAAA,CAAA,EAChBA,GAAC,CAAA,aAAa,EACZ,MAAA,CAAA,MAAA,CAAA,EAAA,KAAK,EAAC,OAAO,EACb,QAAQ,EAAC,QAAQ,EACjB,SAAS,EAAC,eAAe,EACzB,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,EAAE,EACvC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,EAAE,EAClC,EAAA,EAAA,QAAA,EAAA,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,MAClBA,IAAC,UAAU,EAAA,MAAA,CAAA,MAAA,CAAA,EAAoB,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,SAAS,EAAC,mBAAmB,EAAA,EAAA,EAAA,QAAA,EAC9E,MAAM,CAAC,KAAK,EADE,CAAA,EAAA,MAAM,CAAC,KAAK,CAEhB,CACd,CAAC,EACY,CAAA,CAAA,CAAA,EAAA,CAAA,CACT,EACT;AACJ;;;;"}
@@ -1,16 +0,0 @@
1
- import { c as createLucideIcon } from './createLucideIcon-6ba35914.js';
2
-
3
- /**
4
- * @license lucide-react v0.294.0 - ISC
5
- *
6
- * This source code is licensed under the ISC license.
7
- * See the LICENSE file in the root directory of this source tree.
8
- */
9
-
10
-
11
- const Play = createLucideIcon("Play", [
12
- ["polygon", { points: "5 3 19 12 5 21 5 3", key: "191637" }]
13
- ]);
14
-
15
- export { Play as P };
16
- //# sourceMappingURL=play-c2a06e4e.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"play-c2a06e4e.js","sources":["../../../../../node_modules/lucide-react/src/icons/play.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Play\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cG9seWdvbiBwb2ludHM9IjUgMyAxOSAxMiA1IDIxIDUgMyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/play\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Play = createLucideIcon('Play', [\n ['polygon', { points: '5 3 19 12 5 21 5 3', key: '191637' }],\n]);\n\nexport default Play;\n"],"names":[],"mappings":";;;;;;;;;;AAaM,MAAA,IAAA,GAAO,gBAAA,CAAiB,MAAQ,EAAA;AAAA,EACpC,CAAC,SAAW,EAAA,EAAE,MAAA,EAAQ,oBAAsB,EAAA,GAAA,EAAK,UAAU,CAAA;AAC7D,CAAC;;;;","x_google_ignoreList":[0]}
@@ -1,17 +0,0 @@
1
- import { c as createLucideIcon } from './createLucideIcon-6ba35914.js';
2
-
3
- /**
4
- * @license lucide-react v0.294.0 - ISC
5
- *
6
- * This source code is licensed under the ISC license.
7
- * See the LICENSE file in the root directory of this source tree.
8
- */
9
-
10
-
11
- const Plus = createLucideIcon("Plus", [
12
- ["path", { d: "M5 12h14", key: "1ays0h" }],
13
- ["path", { d: "M12 5v14", key: "s699le" }]
14
- ]);
15
-
16
- export { Plus as P };
17
- //# sourceMappingURL=plus-f36f52e8.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plus-f36f52e8.js","sources":["../../../../../node_modules/lucide-react/src/icons/plus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Plus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNSAxMmgxNCIgLz4KICA8cGF0aCBkPSJNMTIgNXYxNCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/plus\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Plus = createLucideIcon('Plus', [\n ['path', { d: 'M5 12h14', key: '1ays0h' }],\n ['path', { d: 'M12 5v14', key: 's699le' }],\n]);\n\nexport default Plus;\n"],"names":[],"mappings":";;;;;;;;;;AAaM,MAAA,IAAA,GAAO,gBAAA,CAAiB,MAAQ,EAAA;AAAA,EACpC,CAAC,MAAQ,EAAA,EAAE,CAAA,EAAG,UAAY,EAAA,GAAA,EAAK,QAAA,EAAU,CAAA;AAAA,EACzC,CAAC,MAAQ,EAAA,EAAE,GAAG,UAAY,EAAA,GAAA,EAAK,UAAU,CAAA;AAC3C,CAAC;;;;","x_google_ignoreList":[0]}
@@ -1,385 +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 } from './index-9ac5afe2.js';
5
- import { c as composeRefs, u as useComposedRefs } from './index-b8f2908d.js';
6
- import { c as createPopperScope, A as Anchor, D as DismissableLayer, C as Content, a as Arrow, P as Portal$1, R as Root2$1 } from './index-ebc47eac.js';
7
- import { h as hideOthers, R as RemoveScroll, u as useFocusGuards, F as FocusScope } from './Combination-3c924518.js';
8
- import { u as useId } from './index-7e966ec9.js';
9
- import { P as Presence } from './index-26994c9d.js';
10
- import { u as useControllableState } from './index-ffe23855.js';
11
- import { c as cn } from './utils-208f599b.js';
12
-
13
- // src/slot.tsx
14
- // @__NO_SIDE_EFFECTS__
15
- function createSlot(ownerName) {
16
- const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
17
- const Slot2 = React.forwardRef((props, forwardedRef) => {
18
- const { children, ...slotProps } = props;
19
- const childrenArray = React.Children.toArray(children);
20
- const slottable = childrenArray.find(isSlottable);
21
- if (slottable) {
22
- const newElement = slottable.props.children;
23
- const newChildren = childrenArray.map((child) => {
24
- if (child === slottable) {
25
- if (React.Children.count(newElement) > 1) return React.Children.only(null);
26
- return React.isValidElement(newElement) ? newElement.props.children : null;
27
- } else {
28
- return child;
29
- }
30
- });
31
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
32
- }
33
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
34
- });
35
- Slot2.displayName = `${ownerName}.Slot`;
36
- return Slot2;
37
- }
38
- // @__NO_SIDE_EFFECTS__
39
- function createSlotClone(ownerName) {
40
- const SlotClone = React.forwardRef((props, forwardedRef) => {
41
- const { children, ...slotProps } = props;
42
- if (React.isValidElement(children)) {
43
- const childrenRef = getElementRef(children);
44
- const props2 = mergeProps(slotProps, children.props);
45
- if (children.type !== React.Fragment) {
46
- props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
47
- }
48
- return React.cloneElement(children, props2);
49
- }
50
- return React.Children.count(children) > 1 ? React.Children.only(null) : null;
51
- });
52
- SlotClone.displayName = `${ownerName}.SlotClone`;
53
- return SlotClone;
54
- }
55
- var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
56
- function isSlottable(child) {
57
- return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
58
- }
59
- function mergeProps(slotProps, childProps) {
60
- const overrideProps = { ...childProps };
61
- for (const propName in childProps) {
62
- const slotPropValue = slotProps[propName];
63
- const childPropValue = childProps[propName];
64
- const isHandler = /^on[A-Z]/.test(propName);
65
- if (isHandler) {
66
- if (slotPropValue && childPropValue) {
67
- overrideProps[propName] = (...args) => {
68
- const result = childPropValue(...args);
69
- slotPropValue(...args);
70
- return result;
71
- };
72
- } else if (slotPropValue) {
73
- overrideProps[propName] = slotPropValue;
74
- }
75
- } else if (propName === "style") {
76
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
77
- } else if (propName === "className") {
78
- overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
79
- }
80
- }
81
- return { ...slotProps, ...overrideProps };
82
- }
83
- function getElementRef(element) {
84
- let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
85
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
86
- if (mayWarn) {
87
- return element.ref;
88
- }
89
- getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
90
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
91
- if (mayWarn) {
92
- return element.props.ref;
93
- }
94
- return element.props.ref || element.ref;
95
- }
96
-
97
- var POPOVER_NAME = "Popover";
98
- var [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [
99
- createPopperScope
100
- ]);
101
- var usePopperScope = createPopperScope();
102
- var [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);
103
- var Popover$1 = (props) => {
104
- const {
105
- __scopePopover,
106
- children,
107
- open: openProp,
108
- defaultOpen,
109
- onOpenChange,
110
- modal = false
111
- } = props;
112
- const popperScope = usePopperScope(__scopePopover);
113
- const triggerRef = React.useRef(null);
114
- const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);
115
- const [open, setOpen] = useControllableState({
116
- prop: openProp,
117
- defaultProp: defaultOpen ?? false,
118
- onChange: onOpenChange,
119
- caller: POPOVER_NAME
120
- });
121
- return /* @__PURE__ */ jsx(Root2$1, { ...popperScope, children: /* @__PURE__ */ jsx(
122
- PopoverProvider,
123
- {
124
- scope: __scopePopover,
125
- contentId: useId(),
126
- triggerRef,
127
- open,
128
- onOpenChange: setOpen,
129
- onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
130
- hasCustomAnchor,
131
- onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),
132
- onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),
133
- modal,
134
- children
135
- }
136
- ) });
137
- };
138
- Popover$1.displayName = POPOVER_NAME;
139
- var ANCHOR_NAME = "PopoverAnchor";
140
- var PopoverAnchor = React.forwardRef(
141
- (props, forwardedRef) => {
142
- const { __scopePopover, ...anchorProps } = props;
143
- const context = usePopoverContext(ANCHOR_NAME, __scopePopover);
144
- const popperScope = usePopperScope(__scopePopover);
145
- const { onCustomAnchorAdd, onCustomAnchorRemove } = context;
146
- React.useEffect(() => {
147
- onCustomAnchorAdd();
148
- return () => onCustomAnchorRemove();
149
- }, [onCustomAnchorAdd, onCustomAnchorRemove]);
150
- return /* @__PURE__ */ jsx(Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
151
- }
152
- );
153
- PopoverAnchor.displayName = ANCHOR_NAME;
154
- var TRIGGER_NAME = "PopoverTrigger";
155
- var PopoverTrigger$1 = React.forwardRef(
156
- (props, forwardedRef) => {
157
- const { __scopePopover, ...triggerProps } = props;
158
- const context = usePopoverContext(TRIGGER_NAME, __scopePopover);
159
- const popperScope = usePopperScope(__scopePopover);
160
- const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
161
- const trigger = /* @__PURE__ */ jsx(
162
- Primitive.button,
163
- {
164
- type: "button",
165
- "aria-haspopup": "dialog",
166
- "aria-expanded": context.open,
167
- "aria-controls": context.contentId,
168
- "data-state": getState(context.open),
169
- ...triggerProps,
170
- ref: composedTriggerRef,
171
- onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
172
- }
173
- );
174
- return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: trigger });
175
- }
176
- );
177
- PopoverTrigger$1.displayName = TRIGGER_NAME;
178
- var PORTAL_NAME = "PopoverPortal";
179
- var [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {
180
- forceMount: void 0
181
- });
182
- var PopoverPortal = (props) => {
183
- const { __scopePopover, forceMount, children, container } = props;
184
- const context = usePopoverContext(PORTAL_NAME, __scopePopover);
185
- return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$1, { asChild: true, container, children }) }) });
186
- };
187
- PopoverPortal.displayName = PORTAL_NAME;
188
- var CONTENT_NAME = "PopoverContent";
189
- var PopoverContent$1 = React.forwardRef(
190
- (props, forwardedRef) => {
191
- const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);
192
- const { forceMount = portalContext.forceMount, ...contentProps } = props;
193
- const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
194
- return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });
195
- }
196
- );
197
- PopoverContent$1.displayName = CONTENT_NAME;
198
- var Slot = createSlot("PopoverContent.RemoveScroll");
199
- var PopoverContentModal = React.forwardRef(
200
- (props, forwardedRef) => {
201
- const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
202
- const contentRef = React.useRef(null);
203
- const composedRefs = useComposedRefs(forwardedRef, contentRef);
204
- const isRightClickOutsideRef = React.useRef(false);
205
- React.useEffect(() => {
206
- const content = contentRef.current;
207
- if (content) return hideOthers(content);
208
- }, []);
209
- return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(
210
- PopoverContentImpl,
211
- {
212
- ...props,
213
- ref: composedRefs,
214
- trapFocus: context.open,
215
- disableOutsidePointerEvents: true,
216
- onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
217
- event.preventDefault();
218
- if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();
219
- }),
220
- onPointerDownOutside: composeEventHandlers(
221
- props.onPointerDownOutside,
222
- (event) => {
223
- const originalEvent = event.detail.originalEvent;
224
- const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
225
- const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
226
- isRightClickOutsideRef.current = isRightClick;
227
- },
228
- { checkForDefaultPrevented: false }
229
- ),
230
- onFocusOutside: composeEventHandlers(
231
- props.onFocusOutside,
232
- (event) => event.preventDefault(),
233
- { checkForDefaultPrevented: false }
234
- )
235
- }
236
- ) });
237
- }
238
- );
239
- var PopoverContentNonModal = React.forwardRef(
240
- (props, forwardedRef) => {
241
- const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
242
- const hasInteractedOutsideRef = React.useRef(false);
243
- const hasPointerDownOutsideRef = React.useRef(false);
244
- return /* @__PURE__ */ jsx(
245
- PopoverContentImpl,
246
- {
247
- ...props,
248
- ref: forwardedRef,
249
- trapFocus: false,
250
- disableOutsidePointerEvents: false,
251
- onCloseAutoFocus: (event) => {
252
- props.onCloseAutoFocus?.(event);
253
- if (!event.defaultPrevented) {
254
- if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
255
- event.preventDefault();
256
- }
257
- hasInteractedOutsideRef.current = false;
258
- hasPointerDownOutsideRef.current = false;
259
- },
260
- onInteractOutside: (event) => {
261
- props.onInteractOutside?.(event);
262
- if (!event.defaultPrevented) {
263
- hasInteractedOutsideRef.current = true;
264
- if (event.detail.originalEvent.type === "pointerdown") {
265
- hasPointerDownOutsideRef.current = true;
266
- }
267
- }
268
- const target = event.target;
269
- const targetIsTrigger = context.triggerRef.current?.contains(target);
270
- if (targetIsTrigger) event.preventDefault();
271
- if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
272
- event.preventDefault();
273
- }
274
- }
275
- }
276
- );
277
- }
278
- );
279
- var PopoverContentImpl = React.forwardRef(
280
- (props, forwardedRef) => {
281
- const {
282
- __scopePopover,
283
- trapFocus,
284
- onOpenAutoFocus,
285
- onCloseAutoFocus,
286
- disableOutsidePointerEvents,
287
- onEscapeKeyDown,
288
- onPointerDownOutside,
289
- onFocusOutside,
290
- onInteractOutside,
291
- ...contentProps
292
- } = props;
293
- const context = usePopoverContext(CONTENT_NAME, __scopePopover);
294
- const popperScope = usePopperScope(__scopePopover);
295
- useFocusGuards();
296
- return /* @__PURE__ */ jsx(
297
- FocusScope,
298
- {
299
- asChild: true,
300
- loop: true,
301
- trapped: trapFocus,
302
- onMountAutoFocus: onOpenAutoFocus,
303
- onUnmountAutoFocus: onCloseAutoFocus,
304
- children: /* @__PURE__ */ jsx(
305
- DismissableLayer,
306
- {
307
- asChild: true,
308
- disableOutsidePointerEvents,
309
- onInteractOutside,
310
- onEscapeKeyDown,
311
- onPointerDownOutside,
312
- onFocusOutside,
313
- onDismiss: () => context.onOpenChange(false),
314
- children: /* @__PURE__ */ jsx(
315
- Content,
316
- {
317
- "data-state": getState(context.open),
318
- role: "dialog",
319
- id: context.contentId,
320
- ...popperScope,
321
- ...contentProps,
322
- ref: forwardedRef,
323
- style: {
324
- ...contentProps.style,
325
- // re-namespace exposed content custom properties
326
- ...{
327
- "--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
328
- "--radix-popover-content-available-width": "var(--radix-popper-available-width)",
329
- "--radix-popover-content-available-height": "var(--radix-popper-available-height)",
330
- "--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
331
- "--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
332
- }
333
- }
334
- }
335
- )
336
- }
337
- )
338
- }
339
- );
340
- }
341
- );
342
- var CLOSE_NAME = "PopoverClose";
343
- var PopoverClose = React.forwardRef(
344
- (props, forwardedRef) => {
345
- const { __scopePopover, ...closeProps } = props;
346
- const context = usePopoverContext(CLOSE_NAME, __scopePopover);
347
- return /* @__PURE__ */ jsx(
348
- Primitive.button,
349
- {
350
- type: "button",
351
- ...closeProps,
352
- ref: forwardedRef,
353
- onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
354
- }
355
- );
356
- }
357
- );
358
- PopoverClose.displayName = CLOSE_NAME;
359
- var ARROW_NAME = "PopoverArrow";
360
- var PopoverArrow = React.forwardRef(
361
- (props, forwardedRef) => {
362
- const { __scopePopover, ...arrowProps } = props;
363
- const popperScope = usePopperScope(__scopePopover);
364
- return /* @__PURE__ */ jsx(Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
365
- }
366
- );
367
- PopoverArrow.displayName = ARROW_NAME;
368
- function getState(open) {
369
- return open ? "open" : "closed";
370
- }
371
- var Root2 = Popover$1;
372
- var Trigger = PopoverTrigger$1;
373
- var Portal = PopoverPortal;
374
- var Content2 = PopoverContent$1;
375
-
376
- const Popover = Root2;
377
- const PopoverTrigger = Trigger;
378
- const PopoverContent = React.forwardRef((_a, ref) => {
379
- var { className, align = 'center', sideOffset = 4 } = _a, props = __rest(_a, ["className", "align", "sideOffset"]);
380
- return (jsx(Portal, { children: jsx(Content2, Object.assign({ ref: ref, align: align, sideOffset: sideOffset, className: cn('z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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', className) }, props)) }));
381
- });
382
- PopoverContent.displayName = Content2.displayName;
383
-
384
- export { Popover as P, PopoverTrigger as a, PopoverContent as b };
385
- //# sourceMappingURL=popover-4b5c0941.js.map