@epam/ai-dial-ui-kit 0.15.0-dev.5 → 0.15.0-dev.50

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 (251) hide show
  1. package/README.md +194 -1
  2. package/dist/CHANGELOG.md +86 -0
  3. package/dist/{DateCellRenderer-BVM-Q8yx.cjs → DateCellRenderer-CZNa4jVJ.cjs} +31 -31
  4. package/dist/DateCellRenderer-X6vXPDIG.cjs +1 -0
  5. package/dist/IconButton-DHOFapLo.cjs +1 -0
  6. package/dist/JsonEditor-Bxui5wJH.cjs +1 -0
  7. package/dist/{MarkdownEditor-C9-ZMRVi.cjs → MarkdownEditor-BKtFs714.cjs} +1 -1
  8. package/dist/MarkdownEditor-Bapd1ycU.cjs +1 -0
  9. package/dist/MarkdownEditorContainer-B5aHwoYF.cjs +1 -0
  10. package/dist/{Switch-CUKClcEz.cjs → Switch-DE6MrcqJ.cjs} +1 -1
  11. package/dist/components/Button/constants.js +9 -8
  12. package/dist/components/Dropdown/Dropdown.js +70 -65
  13. package/dist/components/Dropdown/DropdownSubMenuItem.js +63 -55
  14. package/dist/components/Dropdown/constants.js +16 -14
  15. package/dist/components/DropdownIcon/DropdownIcon.js +43 -32
  16. package/dist/components/FileManager/FileManager.js +373 -372
  17. package/dist/components/FileManager/FileManagerProvider.js +266 -264
  18. package/dist/components/FileManager/hooks/use-grid-context-menu.js +59 -59
  19. package/dist/components/MarkdownEditor/MarkdownEditor.js +23 -21
  20. package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +27 -27
  21. package/dist/components/New/Accordion/Accordion.js +87 -71
  22. package/dist/components/New/AutocompleteTagInput/AutocompleteTagInput.js +207 -0
  23. package/dist/components/New/AutocompleteTagInput/utils.js +11 -0
  24. package/dist/components/New/Avatar/Avatar.js +70 -0
  25. package/dist/components/New/Badge/Badge.js +45 -0
  26. package/dist/components/New/BottomSheet/BottomSheet.js +128 -0
  27. package/dist/components/New/Breadcrumbs/Breadcrumbs.js +159 -0
  28. package/dist/components/New/Breadcrumbs/constants.js +41 -0
  29. package/dist/components/New/Button/Button.js +32 -32
  30. package/dist/components/New/Button/ButtonWrappers.js +103 -37
  31. package/dist/components/New/Button/constants.js +3 -0
  32. package/dist/components/New/Button/utils.js +18 -8
  33. package/dist/components/New/ButtonDropdown/ButtonDropdown.js +26 -16
  34. package/dist/components/New/Calendar/Calendar.js +253 -222
  35. package/dist/components/New/Calendar/constants.js +5 -5
  36. package/dist/components/New/CaptionText/CaptionText.js +18 -15
  37. package/dist/components/New/CardShell/CardShell.js +5 -3
  38. package/dist/components/New/Checkbox/Checkbox.js +67 -56
  39. package/dist/components/New/Checkbox/CheckboxBox.js +5 -3
  40. package/dist/components/New/CloseButton/CloseButton.js +18 -16
  41. package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +39 -34
  42. package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +38 -37
  43. package/dist/components/New/ConfirmationPopup/constants.js +8 -11
  44. package/dist/components/New/Dropdown/Dropdown.js +112 -105
  45. package/dist/components/New/Dropdown/DropdownSubMenuItem.js +17 -17
  46. package/dist/components/New/Dropdown/constants.js +22 -17
  47. package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +20 -18
  48. package/dist/components/New/EntityIdentity/EntityIdentity.js +135 -0
  49. package/dist/components/New/FileDropzone/FileDropzone.js +27 -25
  50. package/dist/components/New/FileIcon/FileIcon.js +55 -0
  51. package/dist/components/New/FileIcon/constants.js +134 -0
  52. package/dist/components/New/FileIcon/icons/FileGlyph.js +150 -0
  53. package/dist/components/New/FileIcon/icons/FolderGlyph.js +50 -0
  54. package/dist/components/New/FileName/FileName.js +78 -0
  55. package/dist/components/New/FilterChips/FilterChips.js +43 -0
  56. package/dist/components/New/FilterChips/constants.js +5 -0
  57. package/dist/components/New/FolderName/FolderName.js +16 -0
  58. package/dist/components/New/FolderPath/FolderPath.js +29 -28
  59. package/dist/components/New/Highlight/Highlight.js +23 -30
  60. package/dist/components/New/IconButton/IconButton.js +30 -28
  61. package/dist/components/New/InfoButton/InfoButton.js +13 -11
  62. package/dist/components/New/InlineSelect/InlineSelect.js +74 -56
  63. package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +41 -39
  64. package/dist/components/New/InteractiveTooltip/constants.js +2 -2
  65. package/dist/components/New/Label/Label.js +13 -8
  66. package/dist/components/New/MarkdownEditor/MarkdownEditor.js +29 -27
  67. package/dist/components/New/MenuItem/MenuItem.js +29 -27
  68. package/dist/components/New/MenuItem/constants.js +9 -8
  69. package/dist/components/New/NoDataContent/NoDataContent.js +21 -19
  70. package/dist/components/New/Notification/Notification.js +33 -29
  71. package/dist/components/New/NumberInput/NumberInput.js +42 -33
  72. package/dist/components/New/PasswordInput/PasswordInput.js +41 -35
  73. package/dist/components/New/Popup/Popup.js +46 -44
  74. package/dist/components/New/Popup/constants.js +3 -3
  75. package/dist/components/New/Radio/Radio.js +75 -64
  76. package/dist/components/New/RadioGroup/RadioGroup.js +76 -65
  77. package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +117 -106
  78. package/dist/components/New/ResizableContainer/ResizableContainer.js +42 -40
  79. package/dist/components/New/SchemaRenderer/SchemaRenderer.js +164 -0
  80. package/dist/components/New/SchemaRenderer/components/SchemaAnyOfEditor.js +65 -0
  81. package/dist/components/New/SchemaRenderer/components/SchemaArrayEditor.js +109 -0
  82. package/dist/components/New/SchemaRenderer/components/SchemaField.js +83 -0
  83. package/dist/components/New/SchemaRenderer/components/SchemaFieldContent.js +72 -0
  84. package/dist/components/New/SchemaRenderer/components/SchemaJsonEditor.js +41 -0
  85. package/dist/components/New/SchemaRenderer/components/SchemaKeyValueEditor.js +250 -0
  86. package/dist/components/New/SchemaRenderer/components/SchemaObjectEditor.js +36 -0
  87. package/dist/components/New/SchemaRenderer/components/SchemaOneOfEditor.js +163 -0
  88. package/dist/components/New/SchemaRenderer/components/SchemaPrimitiveField.js +150 -0
  89. package/dist/components/New/SchemaRenderer/components/SchemaSection.js +135 -0
  90. package/dist/components/New/SchemaRenderer/context.js +17 -0
  91. package/dist/components/New/Search/Search.js +29 -27
  92. package/dist/components/New/SegmentedControl/SegmentedControl.js +29 -23
  93. package/dist/components/New/Select/CollapsedSelectTags.js +127 -0
  94. package/dist/components/New/Select/MultiSelectTags.js +18 -15
  95. package/dist/components/New/Select/Select.js +219 -197
  96. package/dist/components/New/Select/constants.js +23 -20
  97. package/dist/components/New/SharedEntityIndicator/SharedEntityIndicator.js +34 -0
  98. package/dist/components/New/SideDrawer/SideDrawer.js +148 -0
  99. package/dist/components/New/Slider/Slider.js +151 -90
  100. package/dist/components/New/Slider/utils.js +12 -0
  101. package/dist/components/New/Switch/Switch.js +69 -58
  102. package/dist/components/New/Tabs/Tabs.js +125 -61
  103. package/dist/components/New/Tag/Tag.js +42 -40
  104. package/dist/components/New/TagInput/TagInput.js +48 -44
  105. package/dist/components/New/Textarea/Textarea.js +21 -20
  106. package/dist/components/New/ToggleIconButton/ToggleIconButton.js +26 -24
  107. package/dist/components/New/Tooltip/TooltipContent.js +11 -9
  108. package/dist/components/New/Tooltip/constants.js +1 -1
  109. package/dist/components/New/TransferQueue/TransferQueue.js +124 -0
  110. package/dist/components/New/TransferQueue/TransferQueueHeader.js +71 -0
  111. package/dist/components/New/TransferQueue/TransferQueueRow.js +119 -0
  112. package/dist/components/New/TransferQueue/constants.js +24 -0
  113. package/dist/components/New/constants/overlay.js +17 -9
  114. package/dist/components/Popup/constants.js +8 -8
  115. package/dist/components/ProgressBar/ProgressBar.js +45 -33
  116. package/dist/components/SchemaRenderer/SchemaRenderer.js +16 -15
  117. package/dist/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.js +46 -31
  118. package/dist/components/SchemaRenderer/components/SchemaAnyOfEditor.js +2 -2
  119. package/dist/components/SchemaRenderer/components/SchemaArrayEditor.js +1 -1
  120. package/dist/components/SchemaRenderer/components/SchemaField.js +23 -23
  121. package/dist/components/SchemaRenderer/components/SchemaFieldContent.js +19 -19
  122. package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +223 -135
  123. package/dist/components/SchemaRenderer/components/SchemaObjectEditor.js +1 -1
  124. package/dist/components/SchemaRenderer/components/SchemaOneOfEditor.js +13 -13
  125. package/dist/components/SchemaRenderer/components/SchemaPrimitiveField.js +5 -5
  126. package/dist/components/Skeleton/Skeleton.js +25 -19
  127. package/dist/components/Spinner/Spinner.js +7 -5
  128. package/dist/components/Tooltip/TooltipContent.js +11 -11
  129. package/dist/components-manifest.json +1837 -84
  130. package/dist/constants/public-class-names.js +218 -0
  131. package/dist/constants/schema-renderer.js +33 -0
  132. package/dist/dial-ui-kit.cjs +2 -2
  133. package/dist/dial-ui-kit.js +356 -307
  134. package/dist/editors.cjs +1 -1
  135. package/dist/file-manager.cjs +1 -1
  136. package/dist/grid.cjs +1 -1
  137. package/dist/index.css +2 -2
  138. package/dist/lazy-_W6FYhKg.cjs +1 -0
  139. package/dist/merge-classes-BEJXjzkx.cjs +1 -0
  140. package/dist/migration-guides/0.15.0/legacy-theme-variable-fallbacks-removal.md +69 -0
  141. package/dist/migration-guides/0.15.0/slider-redesign.md +110 -0
  142. package/dist/migration-guides/README.md +2 -0
  143. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +419 -399
  144. package/dist/src/components/FileManager/FileManager.d.ts +2 -0
  145. package/dist/src/components/FileManager/FileManagerContext.d.ts +1 -0
  146. package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +2 -1
  147. package/dist/src/components/MarkdownEditor/MarkdownEditor.d.ts +2 -0
  148. package/dist/src/components/MarkdownEditor/MarkdownEditorContainer.d.ts +2 -0
  149. package/dist/src/components/New/Accordion/Accordion.d.ts +6 -1
  150. package/dist/src/components/New/AutocompleteTagInput/AutocompleteTagInput.d.ts +97 -0
  151. package/dist/src/components/New/AutocompleteTagInput/utils.d.ts +17 -0
  152. package/dist/src/components/New/AutocompleteTagInput/utils.spec.d.ts +1 -0
  153. package/dist/src/components/New/Avatar/Avatar.d.ts +55 -0
  154. package/dist/src/components/New/Badge/Badge.d.ts +47 -0
  155. package/dist/src/components/New/BottomSheet/BottomSheet.d.ts +84 -0
  156. package/dist/src/components/New/Breadcrumbs/Breadcrumbs.d.ts +94 -0
  157. package/dist/src/components/New/Breadcrumbs/constants.d.ts +60 -0
  158. package/dist/src/components/New/Button/Button.d.ts +4 -1
  159. package/dist/src/components/New/Button/ButtonWrappers.d.ts +21 -0
  160. package/dist/src/components/New/Button/utils.d.ts +15 -0
  161. package/dist/src/components/New/ButtonDropdown/ButtonDropdown.d.ts +4 -0
  162. package/dist/src/components/New/Calendar/constants.d.ts +1 -1
  163. package/dist/src/components/New/ConfirmationPopup/constants.d.ts +0 -1
  164. package/dist/src/components/New/Dropdown/Dropdown.d.ts +9 -1
  165. package/dist/src/components/New/Dropdown/constants.d.ts +3 -0
  166. package/dist/src/components/New/EntityIdentity/EntityIdentity.d.ts +85 -0
  167. package/dist/src/components/New/FileIcon/FileIcon.d.ts +61 -0
  168. package/dist/src/components/New/FileIcon/constants.d.ts +16 -0
  169. package/dist/src/components/New/FileIcon/icons/FileGlyph.d.ts +18 -0
  170. package/dist/src/components/New/FileIcon/icons/FolderGlyph.d.ts +17 -0
  171. package/dist/src/components/New/FileName/FileName.d.ts +79 -0
  172. package/dist/src/components/New/FilterChips/FilterChips.d.ts +69 -0
  173. package/dist/src/components/New/FilterChips/constants.d.ts +13 -0
  174. package/dist/src/components/New/FolderName/FolderName.d.ts +37 -0
  175. package/dist/src/components/New/InlineSelect/InlineSelect.d.ts +16 -1
  176. package/dist/src/components/New/InteractiveTooltip/constants.d.ts +5 -4
  177. package/dist/src/components/New/MarkdownEditor/MarkdownEditor.d.ts +3 -0
  178. package/dist/src/components/New/Notification/Notification.d.ts +18 -0
  179. package/dist/src/components/New/Popup/constants.d.ts +1 -1
  180. package/dist/src/components/New/SchemaRenderer/SchemaRenderer.d.ts +38 -0
  181. package/dist/src/components/New/SchemaRenderer/components/SchemaAnyOfEditor.d.ts +37 -0
  182. package/dist/src/components/New/SchemaRenderer/components/SchemaArrayEditor.d.ts +35 -0
  183. package/dist/src/components/New/SchemaRenderer/components/SchemaField.d.ts +33 -0
  184. package/dist/src/components/New/SchemaRenderer/components/SchemaFieldContent.d.ts +30 -0
  185. package/dist/src/components/New/SchemaRenderer/components/SchemaJsonEditor.d.ts +29 -0
  186. package/dist/src/components/New/SchemaRenderer/components/SchemaKeyValueEditor.d.ts +37 -0
  187. package/dist/src/components/New/SchemaRenderer/components/SchemaObjectEditor.d.ts +32 -0
  188. package/dist/src/components/New/SchemaRenderer/components/SchemaOneOfEditor.d.ts +39 -0
  189. package/dist/src/components/New/SchemaRenderer/components/SchemaPrimitiveField.d.ts +38 -0
  190. package/dist/src/components/New/SchemaRenderer/components/SchemaSection.d.ts +39 -0
  191. package/dist/src/components/New/SchemaRenderer/context.d.ts +8 -0
  192. package/dist/src/components/New/SchemaRenderer/types.d.ts +76 -0
  193. package/dist/src/components/New/Select/CollapsedSelectTags.d.ts +22 -0
  194. package/dist/src/components/New/Select/MultiSelectTags.d.ts +5 -0
  195. package/dist/src/components/New/Select/Select.d.ts +9 -0
  196. package/dist/src/components/New/Select/constants.d.ts +3 -2
  197. package/dist/src/components/New/SharedEntityIndicator/SharedEntityIndicator.d.ts +35 -0
  198. package/dist/src/components/New/SideDrawer/SideDrawer.d.ts +100 -0
  199. package/dist/src/components/New/Slider/Slider.d.ts +20 -1
  200. package/dist/src/components/New/Slider/utils.d.ts +6 -0
  201. package/dist/src/components/New/Slider/utils.spec.d.ts +1 -0
  202. package/dist/src/components/New/Tabs/Tabs.d.ts +54 -6
  203. package/dist/src/components/New/Tooltip/constants.d.ts +5 -3
  204. package/dist/src/components/New/TransferQueue/TransferQueue.d.ts +139 -0
  205. package/dist/src/components/New/TransferQueue/TransferQueueHeader.d.ts +16 -0
  206. package/dist/src/components/New/TransferQueue/TransferQueueRow.d.ts +10 -0
  207. package/dist/src/components/New/TransferQueue/constants.d.ts +6 -0
  208. package/dist/src/components/New/constants/overlay.d.ts +13 -0
  209. package/dist/src/components/Popup/constants.d.ts +1 -1
  210. package/dist/src/components/SchemaRenderer/types.d.ts +5 -82
  211. package/dist/src/components/SchemaRenderer/utils.d.ts +1 -13
  212. package/dist/src/constants/public-class-names.d.ts +209 -0
  213. package/dist/src/constants/schema-renderer.d.ts +2 -0
  214. package/dist/src/index.d.ts +39 -2
  215. package/dist/src/models/json-schema.d.ts +71 -0
  216. package/dist/src/types/accordion.d.ts +7 -0
  217. package/dist/src/types/avatar.d.ts +7 -0
  218. package/dist/src/types/badge.d.ts +16 -0
  219. package/dist/src/types/breadcrumbs.d.ts +9 -0
  220. package/dist/src/types/button.d.ts +1 -0
  221. package/dist/src/types/entity-type.d.ts +9 -0
  222. package/dist/src/types/json-schema.d.ts +22 -0
  223. package/dist/src/types/transfer-queue.d.ts +10 -0
  224. package/dist/src/utils/__tests__/avatar.spec.d.ts +1 -0
  225. package/dist/src/utils/avatar.d.ts +12 -0
  226. package/dist/src/utils/json-schema.d.ts +23 -0
  227. package/dist/src/utils/sub-menu-floating.d.ts +7 -4
  228. package/dist/types/accordion.js +4 -0
  229. package/dist/types/avatar.js +4 -0
  230. package/dist/types/badge.js +5 -0
  231. package/dist/types/breadcrumbs.js +4 -0
  232. package/dist/types/button.js +3 -3
  233. package/dist/types/entity-type.js +4 -0
  234. package/dist/types/json-schema.js +7 -0
  235. package/dist/types/transfer-queue.js +4 -0
  236. package/dist/use-file-manager-tabs-Bzzwwcgk.cjs +3 -0
  237. package/dist/utils/avatar.js +22 -0
  238. package/dist/{components/SchemaRenderer/utils.js → utils/json-schema.js} +122 -95
  239. package/dist/utils/merge-classes.js +12 -5
  240. package/dist/utils/sub-menu-floating.js +99 -54
  241. package/package.json +4 -9
  242. package/dist/DateCellRenderer-ssp7eaZY.cjs +0 -1
  243. package/dist/IconButton-DWqoaBWf.cjs +0 -1
  244. package/dist/JsonEditor-D2jSlRFi.cjs +0 -1
  245. package/dist/MarkdownEditor-BzEbdj7R.cjs +0 -1
  246. package/dist/MarkdownEditorContainer-BvwJjkiZ.cjs +0 -1
  247. package/dist/components/SchemaRenderer/types.js +0 -27
  248. package/dist/editor-_174x-qy.cjs +0 -1
  249. package/dist/lazy-DM-7dL0Y.cjs +0 -1
  250. package/dist/merge-classes-Dipy1Ih1.cjs +0 -1
  251. package/dist/use-file-manager-tabs-DjdR_mYM.cjs +0 -3
@@ -0,0 +1 @@
1
+ "use strict";const t=require("react/jsx-runtime"),g=require("./DateCellRenderer-CZNa4jVJ.cjs"),U=require("@tabler/icons-react"),a=require("react"),h=require("./merge-classes-BEJXjzkx.cjs"),p=require("@floating-ui/react"),ge=require("./icon-DhjrDQ8I.cjs"),ne=require("./icon-CrGVkVpG.cjs"),C=require("./IconButton-DHOFapLo.cjs"),Ct=require("classnames");function gt(e){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(s,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return s.default=e,Object.freeze(s)}const de=gt(a);var he=(e=>(e.Top="top",e.Right="right",e.Bottom="bottom",e.Left="left",e))(he||{});const ht=7,xt=2,bt=500,St="fill-control-inverted",It="z-tooltip max-w-[376px] whitespace-pre-wrap break-words rounded-lg bg-control-inverted px-3 py-2 dial-small-text text-control-inverted shadow-xs",Ze=a.createContext(null),We=()=>{const e=a.useContext(Ze);if(e==null)throw new Error("Tooltip components must be wrapped in <TooltipContainer />");return e},Nt=({initialOpen:e=!1,placement:s=he.Bottom,isTriggerClickable:n=!1,open:r,onOpenChange:i}={})=>{const[u,c]=a.useState(e),m=a.useRef(null),d=r??u,x=i??c,S=p.useFloating({placement:s,open:d,onOpenChange:x,whileElementsMounted:p.autoUpdate,middleware:[p.offset(ht+xt),p.flip({fallbackAxisSideDirection:"start",padding:5}),p.shift({padding:5}),p.arrow({element:m})]}),f=p.useHover(S.context,{move:!1,enabled:r==null,mouseOnly:n,delay:{open:bt,close:0}}),I=p.useFocus(S.context,{enabled:r==null}),E=p.useDismiss(S.context),k=p.useRole(S.context,{role:"tooltip"}),A=p.useInteractions([f,I,E,k]);return a.useEffect(()=>{if(!d)return;const y=S.refs.reference.current;if(!(y instanceof Element))return;const T=new IntersectionObserver(([O])=>{O.isIntersecting||x(!1)},{root:null,threshold:0});return T.observe(y),()=>T.disconnect()},[d,S.refs.reference,x]),a.useMemo(()=>({open:d,setOpen:x,arrowRef:m,...A,...S}),[d,x,A,S])},Le=({children:e,...s})=>{const n=Nt(s);return t.jsx(Ze.Provider,{value:n,children:e})},we=({style:e,...s})=>{const n=We(),r=C.useHasHover(),i=g.useThemeScope(),u=a.useRef(null),c=p.useMergeRefs([n.refs.setFloating,u]);return!n.open||!r?null:t.jsx(p.FloatingPortal,{id:"tooltip-portal",children:t.jsxs("div",{ref:c,"data-placement":n.placement,style:{...n.floatingStyles,...e},...n.getFloatingProps(s),className:Ct(It,i,n.getFloatingProps(s).className,g.DIAL_KIT_CLASS.tooltip),children:[s.children,t.jsx(p.FloatingArrow,{ref:n.arrowRef,context:n.context,className:St})]})})},Re=({children:e,asChild:s=!1,...n})=>{const r=We(),i=s&&a.isValidElement(e),u=i?e.props?.ref:null,c=p.useMergeRefs([r.refs.setReference,...u?[u]:[]]);if(i){const m=e.props;return a.cloneElement(e,r.getReferenceProps({...m,...n,className:h.mergeClasses(m.className,n.className)||void 0,ref:c}))}return t.jsx("span",{ref:c,...r.getReferenceProps(n),className:n.className??"text-start",children:e})},Ke=({hideTooltip:e=!1,tooltip:s,children:n,asChild:r=!1,triggerClassName:i,contentClassName:u,...c})=>{const m=!e&&!!s;return t.jsxs(Le,{...c,children:[t.jsx(Re,{asChild:r,className:i,children:n}),m&&t.jsx(we,{className:u,children:s})]})},Ve={[C.ButtonVariant.Primary]:{[C.ButtonAppearance.Solid]:"dial-kit-primary-solid-button",[C.ButtonAppearance.Ghost]:"dial-kit-primary-ghost-button",[C.ButtonAppearance.Link]:"dial-kit-primary-link-button"},[C.ButtonVariant.Neutral]:{[C.ButtonAppearance.Solid]:"dial-kit-neutral-solid-button",[C.ButtonAppearance.Outlined]:"dial-kit-neutral-outlined-button"},[C.ButtonVariant.Danger]:{[C.ButtonAppearance.Solid]:"dial-kit-danger-solid-button",[C.ButtonAppearance.Ghost]:"dial-kit-danger-ghost-button",[C.ButtonAppearance.Outlined]:"dial-kit-danger-outlined-button"},[C.ButtonVariant.Static]:{[C.ButtonAppearance.Solid]:"dial-kit-static-solid-button"},[C.ButtonVariant.Starter]:{[C.ButtonAppearance.Outlined]:"dial-kit-starter-outlined-button"},[C.ButtonVariant.Success]:{},[C.ButtonVariant.Secondary]:{},[C.ButtonVariant.Tertiary]:{}},vt=e=>{e.preventDefault()},Ue=(e,s,n)=>{const r=s!=null&&!s.hideTooltip&&s.tooltip!=null&&s.tooltip!=="";return e&&r?{disabled:void 0,"aria-disabled":!0,onClick:vt}:{disabled:e,onClick:n}},$e=(e=C.ButtonVariant.Primary,s=C.ButtonAppearance.Solid)=>{const n=Ve[e]?.[s];return n||(console.warn(`Could not find Button styles for variant: ${e} and appearance: ${s}. Using default primary solid button styles.`),Ve[C.ButtonVariant.Primary][C.ButtonAppearance.Solid])},Et={[C.ElementSize.Small]:"size-[24px]",[C.ElementSize.Standard]:"size-[40px] dial-kit-enhanced-target",[C.ElementSize.Large]:"size-[48px] dial-kit-enhanced-target"},xe=({variant:e,appearance:s=C.ButtonAppearance.Solid,size:n=C.ElementSize.Standard,className:r,icon:i,tooltipProps:u,type:c="button",disabled:m,...d})=>{const x=h.mergeClasses("dial-kit-base-icon-button dial-kit-base-button",e&&$e(e,s),Et[n],r),S=t.jsx("button",{...d,...Ue(m,u,d.onClick),type:c,className:x,"aria-label":C.resolveAccessibleName(d["aria-label"],u?.tooltip),children:i});return u?t.jsx(Ke,{asChild:!0,...u,children:S}):S},qe=({caption:e,onClick:s,"aria-label":n})=>{if(!e)return null;const r=h.mergeClasses("text-secondary hover:text-control-accent-hover active:text-control-accent-active","focus-visible:outline focus-visible:outline-focus",g.DIAL_KIT_CLASS.infoButton);return t.jsx(xe,{"aria-label":n,className:r,icon:t.jsx(U.IconInfoCircle,{size:ne.DIAL_ICON_SIZE.SM,stroke:ge.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),onClick:s,size:C.ElementSize.Small,tooltipProps:{tooltip:e}})},De=({label:e,required:s,className:n,containerClassName:r,caption:i,size:u=C.ElementSize.Small,...c})=>e?t.jsxs("span",{className:h.mergeClasses("flex items-center gap-0.5",r,g.DIAL_KIT_CLASS.label),children:[t.jsxs("label",{...c,className:h.mergeClasses("text-secondary flex items-center gap-0.5",u===C.ElementSize.Small?"dial-tiny-semi-text":"dial-small-text",n),children:[typeof e=="string"?t.jsx("span",{className:"min-h-4",children:e}):e,s&&t.jsxs(t.Fragment,{children:[t.jsx("span",{"aria-hidden":"true",className:"text-error dial-tiny-text",children:"*"}),t.jsx("span",{className:"sr-only",children:"(required)"})]})]}),t.jsx(qe,{caption:i})]}):null;var H=(e=>(e.None="none",e.Check="check",e.Tint="tint",e.Checkbox="checkbox",e.Highlight="highlight",e))(H||{});const Ge={size:14,stroke:3,"aria-hidden":!0},je=({isSelected:e=!1,isIndeterminate:s=!1,invalid:n=!1,disabled:r=!1,htmlFor:i,className:u})=>{const c=s||e,m=!!i,d=h.mergeClasses("grid size-[20px] shrink-0 place-items-center rounded border transition-colors duration-200",m&&"dial-kit-minimum-target",m&&"peer-focus-visible:outline peer-focus-visible:outline-focus",r?"border-transparent bg-control-disable-primary text-control-disable-primary":h.mergeClasses(n&&c&&"border-transparent bg-control-error text-control-permanent",n&&!c&&"border-error bg-control-neutral",!n&&c&&"border-transparent bg-control-accent text-control-permanent hover:bg-control-accent-hover",!n&&!c&&"border-default bg-control-neutral hover:border-accent hover:bg-control-accent-alpha-hover"),r?"cursor-not-allowed":m&&"cursor-pointer",u,g.DIAL_KIT_CLASS.checkboxBox),x=s?t.jsx(U.IconMinus,{...Ge}):e&&t.jsx(U.IconCheck,{...Ge});return m?t.jsx("label",{htmlFor:i,className:d,children:x}):t.jsx("span",{"aria-hidden":"true",className:d,children:x})},Me=({id:e,labelProps:s,isSelected:n=!1,isIndeterminate:r=!1,invalid:i=!1,disabled:u,onChange:c,caption:m,className:d,boxClassName:x,...S})=>{const f=a.useId(),I=e??f,E=m?`${I}-caption`:void 0,k=a.useCallback(y=>{c?.(y.target.checked)},[c]),A=a.useCallback(y=>{y&&(y.indeterminate=r)},[r]);return t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsxs("div",{className:h.mergeClasses("flex items-center gap-2",d,g.DIAL_KIT_CLASS.checkbox),children:[t.jsx("input",{...S,ref:A,type:"checkbox",id:I,checked:n,disabled:u,onChange:k,"aria-checked":r?"mixed":n,"aria-invalid":i||void 0,"aria-label":C.resolveAccessibleName(typeof s?.label!="string"?S["aria-label"]:void 0),"aria-describedby":E,className:"peer sr-only"}),t.jsx(je,{htmlFor:I,isSelected:n,isIndeterminate:r,invalid:i,disabled:u,className:x}),s&&t.jsx(De,{size:C.ElementSize.Standard,...s,htmlFor:I,className:h.mergeClasses("py-[1px]",u?"cursor-not-allowed text-control-disable-primary":"cursor-pointer text-primary",s.className)})]}),m&&t.jsx("span",{id:E,className:"dial-tiny-text text-secondary ml-[28px]",children:m})]})},yt=8,Tt=400,_t="z-interactive-tooltip max-w-[320px] rounded-xl bg-layer-0 p-4 dial-small-text text-primary shadow-md",fe=({content:e,placement:s=he.Right,children:n,asChild:r=!1,hideTooltip:i=!1,initialOpen:u=!1,open:c,onOpenChange:m,triggerClassName:d,contentClassName:x})=>{const S=g.useIsMobileScreen(),f=g.useThemeScope(),[I,E]=a.useState(u),k=c??I,A=j=>{m?.(j),c==null&&E(j)},y=p.useFloatingNodeId(),{refs:T,floatingStyles:O,context:w}=p.useFloating({nodeId:y,placement:s,open:k,onOpenChange:A,whileElementsMounted:p.autoUpdate,middleware:[p.offset(yt),p.flip({padding:5}),p.shift({padding:5})]}),$=p.useHover(w,{enabled:c==null,handleClose:p.safePolygon(),delay:{open:Tt,close:0}}),R=p.useFocus(w,{enabled:c==null}),F=p.useDismiss(w),{getReferenceProps:V,getFloatingProps:v}=p.useInteractions([$,R,F]),q=a.useRef(null),Q=p.useMergeRefs(a.useMemo(()=>[T.setFloating,q],[T.setFloating])),X=r&&a.isValidElement(n),G=X?n.props?.ref:null,P=p.useMergeRefs(a.useMemo(()=>[T.setReference,...G?[G]:[]],[T.setReference,G])),L=!i&&!S&&!!e,D=X?a.cloneElement(n,V({...n.props,ref:P,className:h.mergeClasses(n.props.className,d)||void 0})):t.jsx("span",{ref:P,...V(),className:d??"text-start",children:n});return t.jsxs(t.Fragment,{children:[D,k&&L&&t.jsx(p.FloatingPortal,{id:"interactive-tooltip-portal",children:t.jsx(p.FloatingFocusManager,{context:w,modal:!1,initialFocus:-1,returnFocus:!1,order:["reference","content"],children:t.jsx("div",{ref:Q,"data-placement":w.placement,style:O,...v(),className:h.mergeClasses(_t,f,x,g.DIAL_KIT_CLASS.interactiveTooltip),children:e})})})]})},He="rounded-xl bg-layer-raised p-1 shadow-md",Oe="flex flex-col gap-0.5",Xe=h.mergeClasses(He,"w-max"),Ye=h.mergeClasses(Xe,Oe,"py-2"),Je=h.mergeClasses("flex w-full shrink-0 cursor-pointer items-center gap-2 px-3 h-[40px] rounded-lg","dial-small-text text-primary truncate","hover:bg-control-accent-alpha-hover","focus-visible:outline focus-visible:outline-focus"),Qe="bg-control-accent-alpha",kt=h.mergeClasses(Qe,"text-accent"),At=h.mergeClasses("cursor-not-allowed text-control-disable-primary","bg-transparent hover:bg-transparent"),et=4,Lt=h.mergeClasses("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),wt=h.mergeClasses("z-floating focus-visible:outline-none",He),Rt=Xe,Dt=Ye,jt=h.mergeClasses(Oe,"py-1"),Mt="my-1 border-t border-tertiary",J=et,Ht=t.jsx(U.IconChevronRight,{size:ne.DIAL_ICON_SIZE.SM,stroke:ge.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),Be=(e,s)=>({appearance:r,...i})=>t.jsx(xe,{...i,variant:e,appearance:r||s}),tt=(e,s)=>({variant:r,...i})=>t.jsx(xe,{...i,variant:r||s,appearance:e}),Ot=Be(C.ButtonVariant.Primary,C.ButtonAppearance.Solid),Bt=Be(C.ButtonVariant.Neutral,C.ButtonAppearance.Solid),Ft=Be(C.ButtonVariant.Danger,C.ButtonAppearance.Ghost),nt=tt(C.ButtonAppearance.Ghost,C.ButtonVariant.Primary),Vt=tt(C.ButtonAppearance.Solid,C.ButtonVariant.Static),st=({ariaLabel:e="Close",className:s,size:n=C.ElementSize.Small,onClose:r,...i})=>t.jsx(nt,{...i,size:n,"aria-label":e,className:h.mergeClasses(s,g.DIAL_KIT_CLASS.closeButton),onClick:r,icon:t.jsx(U.IconX,{size:n===C.ElementSize.Small?ne.DIAL_ICON_SIZE.SM:ne.DIAL_ICON_SIZE.MD,stroke:ge.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"})}),Gt=e=>{const s=a.useRef(null),[n,r]=a.useState(!1),[i,u]=a.useState(""),c=a.useRef(!1),m=a.useCallback(()=>{const x=s.current;x&&(c.current&&u(x.textContent??""),r(x.scrollWidth>x.clientWidth))},[]),d=a.useCallback(()=>g.scheduleMeasure(m),[m]);return a.useEffect(()=>{const x=s.current;if(x)return g.observeElementSize(x,m)},[m]),a.useEffect(()=>{c.current=typeof e!="string",d()},[e,d]),{ref:s,isTruncated:n,textContent:i,remeasure:d}},be=({text:e,className:s,contentClassName:n,hideTooltip:r=!1,id:i,customTooltipContent:u,...c})=>{const{ref:m,isTruncated:d,textContent:x,remeasure:S}=Gt(e),f=typeof e=="string"?e:x,I=a.useMemo(()=>r||!d?null:u??f,[u,f,r,d]);return t.jsxs(Le,{...c,children:[t.jsx(Re,{asChild:!0,onMouseEnter:S,onFocusCapture:S,children:t.jsx("span",{id:i,ref:m,"aria-label":d&&f?f:void 0,className:h.mergeClasses("block min-w-0 max-w-full flex-1 truncate text-start",s,g.DIAL_KIT_CLASS.ellipsisTooltip),children:e})}),!!I&&t.jsx(we,{className:n,children:I})]})},Pt=t.jsx(U.IconCheck,{size:ne.DIAL_ICON_SIZE.SM,stroke:ge.DIAL_KIT_ICON_STROKE,className:`shrink-0 ${g.DIAL_KIT_CLASS.menuItemCheck}`,"aria-hidden":!0}),pe=({label:e,icon:s,description:n,mark:r=H.None,selected:i=!1,danger:u=!1,trailing:c,rightControl:m,ellipsisLabel:d=!1,labelClassName:x,children:S,className:f,disabled:I=!1,type:E="button",...k})=>{const A=i&&r===H.Highlight,y=i&&(r===H.Checkbox||r===H.Tint),T=h.mergeClasses(u&&"text-error",I&&"text-control-disable-primary"),O=h.mergeClasses(Je,"aria-expanded:bg-control-accent-alpha-hover",A&&kt,y&&Qe,I&&At,u&&"text-error",f,g.DIAL_KIT_CLASS.menuItem),w=t.jsxs("button",{type:E,disabled:I,"data-menu-item-row":m?"":void 0,className:m?"flex h-full min-w-0 flex-1 items-center gap-2 truncate text-start focus-visible:outline-none":O,...k,children:[S??t.jsxs(t.Fragment,{children:[r===H.Checkbox&&t.jsx(je,{isSelected:i,disabled:I}),s&&t.jsx(g.DialIcon,{icon:s,className:T}),d?t.jsx(be,{text:e,className:h.mergeClasses(T,x)}):t.jsx("span",{className:h.mergeClasses("min-w-0 flex-1 truncate text-start",T,x),children:e}),n&&t.jsx("span",{className:h.mergeClasses("shrink-0 text-secondary dial-small-text",I&&"text-control-disable-primary"),children:n}),i&&r===H.Check&&Pt]}),c&&t.jsx("span",{className:h.mergeClasses("ml-auto shrink-0",T),children:c})]});return m?t.jsxs("div",{role:"none",className:h.mergeClasses(O,"has-[[data-menu-item-row]:focus-visible]:outline","has-[[data-menu-item-row]:focus-visible]:outline-focus"),children:[w,m]}):w},Ce=e=>e.mark??(e.selectable?H.Checkbox:H.None),rt=e=>e.selectable?"menuitemcheckbox":Ce(e)===H.Check?"menuitemradio":"menuitem",zt=({item:e,onRootClose:s})=>{const{isOpen:n,nodeId:r,refs:i,floatingStyles:u,context:c,getReferenceProps:m,getFloatingProps:d}=g.useSubMenuFloating(J,"menu",!!e.disabled),x=a.useCallback(f=>I=>{f.disabled||(f.onClick?.({key:f.key,domEvent:I}),f.selectable||s())},[s]),S=t.jsx(pe,{ref:i.setReference,role:"menuitem","aria-haspopup":"menu","aria-expanded":n,"aria-disabled":!!e.disabled,disabled:e.disabled,icon:e.icon,label:e.label,trailing:Ht,className:e.className,...m(),children:e.renderItem?.(e)});return t.jsxs(p.FloatingNode,{id:r,children:[e.interactiveTooltip?t.jsx(fe,{asChild:!0,placement:e.interactiveTooltip.placement,content:e.interactiveTooltip.content,contentClassName:e.interactiveTooltip.contentClassName,children:S}):S,n&&t.jsx(g.SubMenuPanel,{refs:i,floatingStyles:u,context:c,getFloatingProps:d,role:"menu",surfaceClassName:e.renderSubMenu?Rt:Dt,children:e.renderSubMenu?e.renderSubMenu():t.jsxs(t.Fragment,{children:[e.menuHeader&&(typeof e.menuHeader=="function"?e.menuHeader():e.menuHeader),e.children.map(f=>{const I=rt(f),E=t.jsx(pe,{role:I,"aria-checked":I==="menuitem"?void 0:!!f.checked,"aria-current":Ce(f)===H.Highlight&&f.checked?!0:void 0,"aria-disabled":!!f.disabled,disabled:f.disabled,mark:Ce(f),selected:!!f.checked,danger:f.danger,icon:f.icon,label:f.label,className:f.className,rightControl:f.rightControl,onClick:x(f),children:f.renderItem?.(f)});return t.jsx(a.Fragment,{children:f.interactiveTooltip?t.jsx(fe,{asChild:!0,placement:f.interactiveTooltip.placement,content:f.interactiveTooltip.content,contentClassName:f.interactiveTooltip.contentClassName,children:E}):E},f.key)}),e.menuFooter&&(typeof e.menuFooter=="function"?e.menuFooter():e.menuFooter)]})})]})},Zt='[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="option"]',Wt=e=>!e.hasAttribute("disabled")&&e.getAttribute("aria-disabled")!=="true",Kt=["ArrowDown","ArrowUp","Home","End"],Ut=(e,s,n)=>{if(e==="Home")return 0;if(e==="End")return n-1;const r=e==="ArrowDown"?1:-1;return s===-1?r===1?0:n-1:(s+r+n)%n},$t=e=>"clientWidth"in e?e.clientWidth:e.getBoundingClientRect?.()?.width??0,ot=({children:e,items:s,onItemClick:n,menuHeader:r,menuFooter:i,renderOverlay:u,trigger:c=[g.DropdownTrigger.Click],placement:m,disabled:d=!1,open:x,defaultOpen:S=!1,onOpenChange:f,closable:I=!1,onClose:E,className:k,overlayContentClassName:A,separatorClassName:y,listClassName:T,listStyle:O,outsidePressIgnoreRef:w,outsideClosable:$=!0,allowedPlacements:R,anchorToMouse:F=!1,matchReferenceWidth:V=!0,maxDropdownHeight:v,initialFocus:q})=>{const Q=g.useThemeScope(),[X,G]=a.useState(S),P=x!==void 0,L=P?!!x:X,D=a.useRef(null),[j,se]=a.useState(!0),_=a.useCallback((l,o,b)=>{l&&se(b!=="hover"&&b!=="safe-polygon"),P||G(l),f?.(l)},[P,f]),re=a.useId(),Se=m===void 0,oe=p.useFloatingNodeId(),{refs:M,floatingStyles:K,context:z}=p.useFloating({nodeId:oe,placement:m,open:L,onOpenChange:_,whileElementsMounted:p.autoUpdate,middleware:[p.offset({mainAxis:J,crossAxis:0}),Se?p.autoPlacement({alignment:"start",crossAxis:!0,padding:J,allowedPlacements:R}):p.flip({padding:J}),p.shift({padding:J}),p.size({padding:J,apply({availableWidth:l,availableHeight:o,elements:b}){const N=b.floating,B=$t(b.reference);N.style.setProperty("--fui-available-height",`${Math.floor(o)}px`),N.style.setProperty("--reference-width",V?`${Math.round(B)}px`:"0px"),V?N.style.minWidth=`${Math.round(B)}px`:N.style.removeProperty("min-width"),N.style.maxWidth=`${Math.floor(l)}px`;const te=Math.floor(o);N.style.maxHeight=`${v?Math.min(te,v):te}px`}})]}),Y=p.useClick(z,{enabled:c.includes(g.DropdownTrigger.Click)&&!d}),Ie=p.useHover(z,{enabled:c.includes(g.DropdownTrigger.Hover)&&!d,move:!1,restMs:40,handleClose:p.safePolygon(),delay:{open:80,close:80}}),ee=p.useDismiss(z,{bubbles:!0,referencePress:!1,outsidePress:l=>{if(!$)return!1;const o=l.target;return!(w?.current&&o instanceof Node&&w.current.contains(o))}}),ae=p.useRole(z,{role:"menu"}),{getReferenceProps:Ne,getFloatingProps:le}=p.useInteractions([Y,Ie,ee,ae]),Z=a.useCallback((l,o)=>{M.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:l,y:o,top:o,left:l,right:l,bottom:o})})},[M]),ve=a.useCallback(l=>{!c.includes(g.DropdownTrigger.ContextMenu)||d||(l.preventDefault(),F&&(Z(l.clientX,l.clientY),D.current=document.elementFromPoint(l.clientX,l.clientY)),_(!0))},[F,d,_,Z,c]),Ee=a.useCallback(l=>{!F||d||(c.includes(g.DropdownTrigger.ContextMenu)&&L&&_(!1),Z(l.clientX,l.clientY),D.current=document.elementFromPoint(l.clientX,l.clientY))},[F,d,Z,L,c,_]);a.useEffect(()=>{d&&L&&_(!1)},[d,L,_]);const ye=a.useCallback(l=>{if(l.defaultPrevented||!Kt.includes(l.key)||!l.currentTarget.contains(l.target))return;const o=Array.from(l.currentTarget.querySelectorAll(Zt)).filter(Wt);if(o.length===0)return;l.preventDefault();const b=l.currentTarget.ownerDocument.activeElement,N=o.findIndex(B=>B===b);o[Ut(l.key,N,o.length)]?.focus()},[]),ce=a.useCallback(l=>o=>{l.disabled||(l.onClick?.({key:l.key,domEvent:o}),n?.({key:l.key,domEvent:o}),l.selectable||_(!1))},[n,_]),ie=a.useMemo(()=>u?u():s?t.jsxs(t.Fragment,{children:[r&&t.jsx(t.Fragment,{children:typeof r=="function"?r():r}),t.jsx("div",{role:"none",className:h.mergeClasses(jt,A,g.DIAL_KIT_CLASS.dropdownList),"aria-label":"dropdown",children:s.map(l=>{if(l.type===g.DropdownItemType.Divider)return t.jsx("div",{role:"separator",className:h.mergeClasses(Mt,y)},l.key);if(l.type===g.DropdownItemType.PlainText)return t.jsx("div",{className:h.mergeClasses("px-3 py-2 text-secondary dial-caption-text",l.className),children:l.label},l.key);if(l.children?.length)return t.jsx(zt,{item:l,onRootClose:()=>_(!1)},l.key);const o=Ce(l),b=rt(l),N=t.jsx(pe,{role:b,"aria-checked":b==="menuitem"?void 0:!!l.checked,"aria-current":o===H.Highlight&&l.checked?!0:void 0,"aria-disabled":!!l.disabled,disabled:l.disabled,mark:o,selected:!!l.checked,danger:l.danger,icon:l.icon,label:l.label,className:l.className,rightControl:l.rightControl,onClick:ce(l),children:l.renderItem?.(l)});return t.jsx(a.Fragment,{children:l.interactiveTooltip?t.jsx(fe,{asChild:!0,placement:l.interactiveTooltip.placement,content:l.interactiveTooltip.content,contentClassName:l.interactiveTooltip.contentClassName,children:N}):N},l.key)})}),i&&t.jsx(t.Fragment,{children:typeof i=="function"?i():i})]}):null,[ce,s,i,r,u,_,A,y]),Te=Ne({onContextMenu:ve,onMouseDown:Ee});return a.useEffect(()=>{if(!L)return;const l=M.reference.current;let o=null;if(l instanceof Element?o=l:D.current instanceof Element&&(o=D.current),!o)return;const b=new IntersectionObserver(([N])=>{N.isIntersecting||_(!1)},{root:null,threshold:0});return b.observe(o),()=>b.disconnect()},[L,M.reference,_]),t.jsx(p.FloatingTree,{children:t.jsxs(p.FloatingNode,{id:oe,children:[t.jsx("span",{ref:M.setReference,className:h.mergeClasses(Lt,d&&"!cursor-not-allowed opacity-75",k,g.DIAL_KIT_CLASS.dropdown),"aria-haspopup":"menu","aria-expanded":L,"aria-controls":re,...Te,children:e}),L&&t.jsx(p.FloatingPortal,{children:t.jsx(p.FloatingFocusManager,{context:z,modal:!1,initialFocus:q!==void 0?q:j?0:-1,returnFocus:!0,children:t.jsxs("div",{id:re,ref:M.setFloating,style:O?{...O,...K}:K,className:h.mergeClasses(wt,!V&&"w-max","overflow-auto",Q,T),...le({onKeyDown:ye}),children:[I&&t.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:t.jsx(st,{ariaLabel:"Close dropdown",onClose:l=>{E?.(l),_(!1)}})}),ie]})})})]})})},at=e=>de.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},de.createElement("path",{d:"M20.2954 16.7035C20.2954 17.088 20.6029 17.4069 20.9737 17.4069C21.3445 17.4069 21.6519 17.088 21.6519 16.7035C21.6519 16.3189 21.3445 16 20.9737 16C20.6029 16 20.2954 16.3189 20.2954 16.7035Z",fill:"currentColor"}),de.createElement("path",{d:"M11.7041 16.7035C11.7041 17.088 11.3966 17.4069 11.0258 17.4069C10.655 17.4069 10.3476 17.088 10.3476 16.7035C10.3476 16.3189 10.655 16 11.0258 16C11.3966 16 11.7041 16.3189 11.7041 16.7035Z",fill:"currentColor"}),de.createElement("path",{d:"M19.0221 2.40002L19.5525 1.86969C19.4118 1.72904 19.221 1.65002 19.0221 1.65002V2.40002ZM26.5777 9.95558H27.3277C27.3277 9.75667 27.2487 9.5659 27.108 9.42525L26.5777 9.95558ZM5.42212 29.6H4.67212C4.67212 30.0142 5.00791 30.35 5.42212 30.35V29.6ZM8.44434 2.40002V1.65002V2.40002ZM13.8932 19.5173C13.8932 19.9315 14.229 20.2673 14.6432 20.2673C15.0574 20.2673 15.3932 19.9315 15.3932 19.5173H14.6432H13.8932ZM16.6063 19.5173C16.6063 19.9315 16.9421 20.2673 17.3563 20.2673C17.7705 20.2673 18.1063 19.9315 18.1063 19.5173H17.3563H16.6063ZM19.0221 2.40002H18.2721V8.44447H19.0221H19.7721V2.40002H19.0221ZM19.0221 8.44447H18.2721C18.2721 9.04415 18.5103 9.61927 18.9344 10.0433L19.4647 9.51299L19.995 8.98266C19.8523 8.83992 19.7721 8.64633 19.7721 8.44447H19.0221ZM19.4647 9.51299L18.9344 10.0433C19.3584 10.4674 19.9335 10.7056 20.5332 10.7056V9.95558V9.20558C20.3314 9.20558 20.1378 9.12539 19.995 8.98266L19.4647 9.51299ZM20.5332 9.95558V10.7056H26.5777V9.95558V9.20558H20.5332V9.95558ZM5.42212 29.6H6.17212V5.42225H5.42212H4.67212V29.6H5.42212ZM5.42212 5.42225H6.17212C6.17212 4.81962 6.41151 4.24167 6.83764 3.81554L6.30731 3.28521L5.77698 2.75488C5.06955 3.46231 4.67212 4.42179 4.67212 5.42225H5.42212ZM6.30731 3.28521L6.83764 3.81554C7.26376 3.38942 7.84171 3.15002 8.44434 3.15002V2.40002V1.65002C7.44389 1.65002 6.48441 2.04745 5.77698 2.75488L6.30731 3.28521ZM8.44434 2.40002V3.15002H19.0221V2.40002V1.65002H8.44434V2.40002ZM19.0221 2.40002L18.4918 2.93035L26.0473 10.4859L26.5777 9.95558L27.108 9.42525L19.5525 1.86969L19.0221 2.40002ZM26.5777 9.95558H25.8277V26.5778H26.5777H27.3277V9.95558H26.5777ZM26.5777 26.5778H25.8277C25.8277 27.1804 25.5883 27.7584 25.1622 28.1845L25.6925 28.7148L26.2228 29.2452C26.9302 28.5377 27.3277 27.5783 27.3277 26.5778H26.5777ZM25.6925 28.7148L25.1622 28.1845C24.736 28.6106 24.1581 28.85 23.5555 28.85V29.6V30.35C24.5559 30.35 25.5154 29.9526 26.2228 29.2452L25.6925 28.7148ZM23.5555 29.6V28.85H5.42212V29.6V30.35H23.5555V29.6ZM20.9737 16V16.75C20.9388 16.75 20.9181 16.7345 20.9119 16.7281C20.906 16.722 20.9019 16.7133 20.9019 16.7035H21.6519H22.4019C22.4019 15.9307 21.7842 15.25 20.9737 15.25V16ZM21.6519 16.7035H20.9019C20.9019 16.6936 20.906 16.685 20.9119 16.6788C20.9181 16.6724 20.9388 16.6569 20.9737 16.6569V17.4069V18.1569C21.7842 18.1569 22.4019 17.4762 22.4019 16.7035H21.6519ZM20.9737 17.4069V16.6569C21.0086 16.6569 21.0292 16.6724 21.0354 16.6788C21.0414 16.685 21.0454 16.6936 21.0454 16.7035H20.2954H19.5454C19.5454 17.4762 20.1631 18.1569 20.9737 18.1569V17.4069ZM20.2954 16.7035H21.0454C21.0454 16.7133 21.0414 16.722 21.0354 16.7281C21.0292 16.7345 21.0086 16.75 20.9737 16.75V16V15.25C20.1631 15.25 19.5454 15.9307 19.5454 16.7035H20.2954ZM11.0258 16V16.75C10.9909 16.75 10.9703 16.7345 10.9641 16.7281C10.9582 16.722 10.9541 16.7133 10.9541 16.7035H11.7041H12.4541C12.4541 15.9307 11.8364 15.25 11.0258 15.25V16ZM11.7041 16.7035H10.9541C10.9541 16.6936 10.9582 16.685 10.9641 16.6788C10.9703 16.6724 10.9909 16.6569 11.0258 16.6569V17.4069V18.1569C11.8364 18.1569 12.4541 17.4762 12.4541 16.7035H11.7041ZM11.0258 17.4069V16.6569C11.0607 16.6569 11.0814 16.6724 11.0876 16.6788C11.0935 16.685 11.0976 16.6936 11.0976 16.7035H10.3476H9.59757C9.59757 17.4762 10.2153 18.1569 11.0258 18.1569V17.4069ZM10.3476 16.7035H11.0976C11.0976 16.7133 11.0935 16.722 11.0876 16.7281C11.0814 16.7345 11.0607 16.75 11.0258 16.75V16V15.25C10.2153 15.25 9.59757 15.9307 9.59757 16.7035H10.3476ZM14.6432 19.5173H15.3932C15.3932 19.127 15.6889 18.8604 15.9998 18.8604V18.1104V17.3604C14.8094 17.3604 13.8932 18.3506 13.8932 19.5173H14.6432ZM15.9998 18.1104V18.8604C16.3106 18.8604 16.6063 19.127 16.6063 19.5173H17.3563H18.1063C18.1063 18.3506 17.1901 17.3604 15.9998 17.3604V18.1104Z",fill:"currentColor"})),lt=({id:e,name:s,value:n,labelProps:r,isSelected:i=!1,disabled:u,onChange:c,caption:m,className:d,...x})=>{const S=a.useId(),f=e??S,I=m?`${f}-caption`:void 0,E=a.useCallback(k=>{k.target.checked&&c?.(n)},[c,n]);return t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsxs("div",{className:h.mergeClasses("flex items-center gap-2 ",d,g.DIAL_KIT_CLASS.radio),children:[t.jsx("input",{...x,type:"radio",id:f,name:s,value:n,checked:i,disabled:u,onChange:E,"aria-label":C.resolveAccessibleName(typeof r?.label!="string"?x["aria-label"]:void 0),"aria-describedby":I,className:"peer sr-only"}),t.jsx("label",{htmlFor:f,className:h.mergeClasses("group grid size-[20px] shrink-0 place-items-center rounded-full border transition-colors duration-200 hover:bg-control-accent-alpha-hover","dial-kit-minimum-target","peer-focus-visible:outline peer-focus-visible:outline-focus",u?"cursor-not-allowed border-default bg-control-disable-primary":h.mergeClasses("cursor-pointer",i?"border border-accent bg-control-neutral":"border-default bg-control-neutral")),children:i&&t.jsx("span",{className:h.mergeClasses("size-3 rounded-full",u?"bg-control-disable-secondary":"bg-control-accent")})}),r&&t.jsx(De,{size:C.ElementSize.Standard,...r,htmlFor:f,className:h.mergeClasses("py-[1px]",u?"cursor-not-allowed text-control-disable-primary":"cursor-pointer text-primary",r.className)})]}),m&&t.jsx("span",{id:I,className:"dial-tiny-text text-secondary ml-[26px]",children:m})]})},Pe=32,ct=({title:e,description:s,icon:n,live:r=!1,className:i,titleClassName:u,descriptionClassName:c})=>t.jsxs("div",{role:r?"status":void 0,className:h.mergeClasses("flex size-full flex-col items-center justify-center gap-2 text-tertiary",i,g.DIAL_KIT_CLASS.noDataContent),children:[n??t.jsx(at,{width:Pe,height:Pe,"aria-hidden":"true"}),t.jsx("span",{className:h.mergeClasses("dial-tiny-text text-secondary",u),children:e}),s&&t.jsx("span",{className:h.mergeClasses("dial-tiny-text text-secondary",c),children:s})]}),it="dial-kit-grid",qt="dial-kit-grid-with-selection",Xt="dial-kit-grid-without-header-borders",Yt="dial-kit-grid-row-select",Jt="dial-kit-grid-header-select",Qt="dial-kit-grid-selection-visible",en="dial-kit-grid-align-right",Ae=40,_e="0.5px solid var(--stroke-tertiary, #E0E6F0)",me={accentColor:"var(--bg-control-accent, #1D4ED8)",backgroundColor:"var(--bg-layer-raised, #FCFCFC)",oddRowBackgroundColor:"var(--bg-layer-sunken, #EEF1F7)",selectedRowBackgroundColor:"var(--bg-control-accent-alpha, #2764D90F)",rowHoverColor:"var(--bg-control-accent-alpha-hover, #2764D924)",borderColor:"var(--stroke-tertiary, #E0E6F0)",rowBorder:_e,headerRowBorder:_e,headerColumnBorder:_e,chromeBackgroundColor:"var(--bg-layer-base, #F5F7FA)",foregroundColor:"var(--text-primary, #161B2D)",headerTextColor:"var(--text-secondary, #57647A)",browserColorScheme:"light",headerFontSize:14,headerFontWeight:600,fontSize:14,fontFamily:"var(--theme-font, var(--font-inter))",spacing:4,borderRadius:4,wrapperBorderRadius:8};var W=(e=>(e.API="api",e.ROW_DATA_CHANGED="rowDataChanged",e.CHECKBOX_SELECTED="checkboxSelected",e))(W||{});const tn=({params:e,mode:s,label:n,radioName:r,rowId:i,disabled:u})=>{const c=e.node,[m,d]=a.useState(()=>!!c.isSelected());a.useEffect(()=>{const S=()=>d(!!c.isSelected());return S(),c.addEventListener("rowSelected",S),()=>c.removeEventListener("rowSelected",S)},[c]);const x=S=>{u||c.setSelected(S,s===g.GridSelectionMode.SINGLE,W.CHECKBOX_SELECTED)};return s===g.GridSelectionMode.SINGLE?t.jsx(lt,{name:r,value:i,isSelected:m,disabled:u,"aria-label":n,onChange:()=>x(!0)}):t.jsx(Me,{isSelected:m,disabled:u,"aria-label":n,onChange:x})},ze=e=>{let s=0,n=0;return e.forEachNodeAfterFilter(r=>{r.selectable!==!1&&(n++,r.isSelected()&&s++)}),{selected:s,selectable:n}},nn=({api:e,label:s})=>{const[{selected:n,selectable:r},i]=a.useState(()=>ze(e));a.useEffect(()=>{const c=()=>i(ze(e));return c(),e.addEventListener("selectionChanged",c),e.addEventListener("modelUpdated",c),()=>{e.isDestroyed()||(e.removeEventListener("selectionChanged",c),e.removeEventListener("modelUpdated",c))}},[e]);const u=a.useCallback(c=>{if(c){e.selectAll("filtered",W.CHECKBOX_SELECTED);return}e.deselectAll("filtered",W.CHECKBOX_SELECTED)},[e]);return t.jsx(Me,{isSelected:r>0&&n===r,isIndeterminate:n>0&&n<r,disabled:r===0,"aria-label":s,onChange:u})},ut="en-US",dt={year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},ke=40,sn={minWidth:ke,width:ke,maxWidth:ke,resizable:!1,sortable:!1,filter:!1,floatingFilter:!1,suppressMovable:!0,suppressHeaderMenuButton:!0,suppressAutoSize:!0,suppressSizeToFit:!0},mt="dial-kit-grid-selection",rn=150,on=100,an=({columnDefs:e,rowData:s,additionalGridOptions:n,getContextMenuItems:r,className:i,ariaLabel:u="Data grid",wrapCustomCellRenderers:c=!0,disabledRowIds:m,selectedRowIds:d,onSelectionChange:x,onGridApiChange:S,getRowId:f,alternateOddRowColors:I=!1,filterPlaceholder:E="Enter value",emptyStateIcon:k,emptyStateTitle:A="No results found",emptyStateDescription:y="Sorry, we couldn't find any results for your search.",loading:T=!1,wrapperBorder:O=!0,withoutHeaderBorders:w=!1,allowDisabledContextMenu:$=!1,selectionMode:R,selectRowLabel:F,selectAllLabel:V="Select all rows"})=>{g.registerAgGridModulesOnce();const[v,q]=a.useState(),Q=g.useIsMobileScreen(),X=g.useIsTabletScreen(),G=a.useRef(new Set),P=a.useRef(void 0),L=`dial-kit-grid-selection-${a.useId()}`,D=a.useRef({getRowId:f,getContextMenuItems:r,onSelectionChange:x,selectRowLabel:F,wrapCustomCellRenderers:c});D.current={getRowId:f,getContextMenuItems:r,onSelectionChange:x,selectRowLabel:F,wrapCustomCellRenderers:c};const j=a.useCallback(o=>{const b=D.current.getRowId;return b?b(o):String(o.id??JSON.stringify(o))},[]),se=!!r,_=!!c,re=a.useMemo(()=>g.themeBalham.withPart(g.colorSchemeLight).withParams({...me,oddRowBackgroundColor:I?me.oddRowBackgroundColor:me.backgroundColor,wrapperBorder:O}),[I,O]),Se=a.useCallback(o=>{o.api.sizeColumnsToFit()},[]),oe=Q||X||(d?.size??0)>0,M=a.useCallback(o=>!!o&&!!m?.has(j(o)),[m,j]),K=a.useCallback((o,b,N)=>se?t.jsx(ot,{trigger:[g.DropdownTrigger.ContextMenu],items:o.data?D.current.getContextMenuItems?.(o.data)??[]:[],anchorToMouse:!0,matchReferenceWidth:!0,className:h.mergeClasses("size-full",N&&"cursor-not-allowed opacity-75"),disabled:N&&!$,children:t.jsx("span",{className:"block min-w-0 max-w-full flex-1",children:b})}):b,[se,$]),z=a.useCallback(o=>{if(!o.data)return null;const b=M(o.data);return K(o,t.jsx(be,{text:o.value==null?"":String(o.value),className:"max-w-full dial-small-text text-primary",hideTooltip:b}),b)},[M,K]),Y=a.useCallback(o=>o===W.API||o===W.ROW_DATA_CHANGED,[]),Ie=a.useMemo(()=>g.debounceFn(o=>{const N=(o.selectedNodes??[]).map(te=>te.data),B=new Set(N.map(j));G.current=B,P.current=o.source,!Y(o.source)&&D.current.onSelectionChange?.(B,N)},on),[Y,j]),ee=a.useMemo(()=>{if(R)return{...sn,colId:mt,headerName:"",headerClass:Jt,cellClass:Yt,headerComponent:R===g.GridSelectionMode.MULTIPLE?nn:void 0,headerComponentParams:{label:V},cellRenderer:o=>{if(!o.data)return null;const b=j(o.data);return t.jsx(tn,{params:o,mode:R,rowId:b,radioName:L,label:D.current.selectRowLabel?.(o.data)??"Select row",disabled:m?.has(b)})}}},[R,V,j,m,L]),ae=a.useCallback(o=>{if(!o.cellRenderer)return{...o,cellRenderer:z};const b=D.current.wrapCustomCellRenderers;if(!(typeof b=="function"?b(o):!!b))return o;const B=o.cellRenderer;return{...o,cellRenderer:ue=>{const ft=M(ue.data),Fe=typeof B=="function"?B:void 0,pt=Fe?t.jsx(Fe,{...ue}):z(ue);return K(ue,pt,ft)}}},[M,z,K]),Ne=a.useMemo(()=>{const o=_?(e??[]).map(ae):e??[];return ee?[ee,...o]:o},[e,_,ae,ee]),{defaultColDef:le,rowSelection:Z,...ve}=n??{},Ee=a.useMemo(()=>({minWidth:rn,resizable:!0,sortable:!0,floatingFilter:!0,filter:"agTextColumnFilter",filterParams:{filterPlaceholder:E,buttons:["reset"]},comparator:g.baseColumnComparator,...g.omitUndefined(le)}),[E,le]),ye=o=>{o.api.sizeColumnsToFit(),q(o.api),n?.onGridReady?.(o),S?.(o.api)};a.useEffect(()=>{v&&s&&v.setGridOption("rowData",s)},[v,s]);const ce=a.useCallback(()=>t.jsx(ct,{live:!0,title:A,description:y,icon:k??t.jsx(U.IconZoomCancel,{size:100,stroke:.5,"aria-hidden":"true"})}),[A,y,k]),ie=typeof Z=="object"?Z:void 0,Te=a.useMemo(()=>R?{isRowSelectable:o=>!M(o.data),...ie,mode:R===g.GridSelectionMode.SINGLE?"singleRow":"multiRow",checkboxes:!1,headerCheckbox:!1}:Z,[Z,ie,M,R]);a.useEffect(()=>{v&&s&&G.current.size&&G.current.forEach(o=>{const b=v.getRowNode(o);b&&!b.isSelected()&&b.setSelected(!0,!1,W.API)})},[v,s]),a.useEffect(()=>{v&&d&&(v.deselectAll("all",W.API),d.forEach(o=>{const b=v.getRowNode(o);b&&!b.isSelected()&&b.setSelected(!0,!1,W.API)}))},[v,d]);const l=a.useCallback(o=>o.data?j(o.data):"",[j]);return a.useEffect(()=>{const o=Y(P.current);if(v&&d?.size&&o){const b=Array.from(d)[0];if(b){const N=v.getRowNode(b);N&&v.ensureNodeVisible(N)}}},[v,Y,d]),t.jsx("div",{className:h.mergeClasses(it,"size-full",R&&qt,R&&oe&&Qt,w&&Xt,i),role:"region","aria-label":u,"aria-busy":T,children:t.jsx("div",{className:"h-full overflow-x-auto",children:t.jsx(g.AgGridReact,{rowModelType:"clientSide",headerHeight:Ae,rowHeight:Ae,cellSelection:!1,theme:re,autoSizeStrategy:{type:"fitGridWidth"},columnDefs:Ne,defaultColDef:Ee,onGridSizeChanged:Se,onGridReady:ye,loading:T,suppressCellFocus:!0,suppressDragLeaveHidesColumns:!0,noRowsOverlayComponent:ce,rowData:s,rowSelection:Te,onSelectionChanged:Ie,getRowId:l,...ve})})})},ln=({value:e,locale:s=ut,options:n=dt,emptyPlaceholder:r,className:i,hideTooltip:u=!1})=>{const c=g.convertToDate(e),m=a.useMemo(()=>c?new Intl.DateTimeFormat(s,n).format(c):r,[c,r,s,n]),d=c?c.toISOString():void 0;return t.jsx(be,{text:d?t.jsx("time",{dateTime:d,children:m}):t.jsx("span",{children:m}),className:h.mergeClasses("dial-small-text text-primary",i),hideTooltip:u})};exports.Checkbox=Me;exports.CheckboxBox=je;exports.CloseButton=st;exports.DEFAULT_DATE_FORMAT_OPTIONS=dt;exports.DEFAULT_LOCALE=ut;exports.DangerIconButton=Ft;exports.DateCellRenderer=ln;exports.Dropdown=ot;exports.EllipsisTooltip=be;exports.GRID_ALIGN_RIGHT_CLASS=en;exports.GRID_ROOT_CLASS=it;exports.GRID_SELECTION_COLUMN_ID=mt;exports.GRID_THEME_PARAMS=me;exports.GhostIconButton=nt;exports.Grid=an;exports.IconButton=xe;exports.InfoButton=qe;exports.InteractiveTooltip=fe;exports.Label=De;exports.MenuItem=pe;exports.MenuItemMark=H;exports.NeutralIconButton=Bt;exports.NoDataContent=ct;exports.PrimaryIconButton=Ot;exports.ROW_HEIGHT=Ae;exports.Radio=lt;exports.StaticIconButton=Vt;exports.SvgNoData=at;exports.Tooltip=Ke;exports.TooltipContainer=Le;exports.TooltipContent=we;exports.TooltipPlacement=he;exports.TooltipTrigger=Re;exports.getButtonClassNames=$e;exports.getDisabledButtonProps=Ue;exports.overlayGap=et;exports.overlayItemClassName=Je;exports.overlayListClassName=Oe;exports.overlaySubMenuListClassName=Ye;exports.overlaySurfaceClassName=He;
@@ -0,0 +1 @@
1
+ "use strict";const u=require("react/jsx-runtime"),n=require("@floating-ui/react"),c=require("react"),x=require("classnames"),F=require("./merge-classes-BEJXjzkx.cjs");var l=(e=>(e.Primary="primary",e.Neutral="neutral",e.Danger="danger",e.Static="static",e.Starter="starter",e.Success="success",e.Secondary="secondary",e.Tertiary="tertiary",e))(l||{}),r=(e=>(e.Solid="solid",e.Outlined="outlined",e.Ghost="ghost",e.Link="link",e))(r||{});const v={[l.Primary]:{[r.Solid]:"dial-primary-solid-button",[r.Ghost]:"dial-primary-ghost-button",[r.Link]:"dial-primary-link-button"},[l.Neutral]:{[r.Outlined]:"dial-neutral-outlined-button"},[l.Danger]:{[r.Solid]:"dial-danger-solid-button",[r.Ghost]:"dial-danger-ghost-button",[r.Outlined]:"dial-danger-outlined-button"},[l.Success]:{[r.Ghost]:"dial-success-ghost-button"},[l.Secondary]:{[r.Ghost]:"dial-secondary-ghost-button"},[l.Tertiary]:{[r.Ghost]:"dial-tertiary-ghost-button"},[l.Static]:{},[l.Starter]:{}},S=(e=l.Primary,o=r.Solid)=>{const t=v[e]?.[o];return t||(console.warn(`Could not find Button styles for variant: ${e} and appearance: ${o}. Using default primary solid button styles.`),v[l.Primary][r.Solid])};var h=(e=>(e.Small="small",e.Standard="standard",e.Large="large",e))(h||{});const I=7,A=2,C=c.createContext(null),N=()=>{const e=c.useContext(C);if(e==null)throw new Error("Tooltip components must be wrapped in <Tooltip />");return e},q=({initialOpen:e=!1,placement:o="bottom",isTriggerClickable:t=!1,open:s,onOpenChange:a}={})=>{const[i,p]=c.useState(e),g=c.useRef(null),m=s??i,d=a??p,f=n.useFloating({placement:o,open:m,onOpenChange:d,whileElementsMounted:n.autoUpdate,middleware:[n.offset(I+A),n.flip({crossAxis:o.includes("-"),fallbackAxisSideDirection:"start",padding:5}),n.shift({padding:5}),n.arrow({element:g})]}),M=n.useHover(f.context,{move:!1,enabled:s==null,mouseOnly:t,delay:{open:500,close:0}}),k=n.useFocus(f.context,{enabled:s==null}),P=n.useDismiss(f.context),G=n.useRole(f.context,{role:"tooltip"}),b=n.useInteractions([M,k,P,G]);return c.useEffect(()=>{if(!m)return;const y=f.refs.reference.current;if(!(y instanceof Element))return;const w=new IntersectionObserver(([L])=>{L.isIntersecting||d(!1)},{root:null,threshold:0});return w.observe(y),()=>w.disconnect()},[m,f.refs.reference,d]),c.useMemo(()=>({open:m,setOpen:d,arrowRef:g,...b,...f}),[m,d,b,f])},R=({children:e,...o})=>{const t=q(o);return u.jsx(C.Provider,{value:t,children:e})},T="(hover: none)",_=()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(T).matches,D=()=>{const[e,o]=c.useState(()=>!_());return c.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const t=window.matchMedia(T);if(o(!t.matches),typeof t.addEventListener!="function")return;const s=a=>o(!a.matches);return t.addEventListener("change",s),()=>t.removeEventListener("change",s)},[]),e},E=({style:e,...o})=>{const t=N(),s=D(),a=c.useRef(null),i=n.useMergeRefs([t.refs.setFloating,a]);return!t.open||!s?null:u.jsx(n.FloatingPortal,{id:"tooltip-portal",children:u.jsxs("div",{ref:i,style:{...t.floatingStyles,...e},...t.getFloatingProps(o),className:x("z-tooltip whitespace-pre-wrap break-words rounded border border-primary bg-layer-0 px-2 py-1 dial-tiny-text shadow max-w-[300px]",t.getFloatingProps(o).className),children:[o.children,u.jsx(n.FloatingArrow,{ref:t.arrowRef,context:t.context,fill:"currentColor",strokeWidth:1,className:"stroke-primary text-[var(--bg-layer-0,_#000000)]"})]})})},H=({children:e,asChild:o=!1,...t})=>{const s=N(),a=o&&c.isValidElement(e),i=a?e.props?.ref:null,p=n.useMergeRefs([s.refs.setReference,...i?[i]:[]]);return a?c.cloneElement(e,s.getReferenceProps({...e.props,...t,ref:p})):u.jsx("span",{ref:p,...s.getReferenceProps(t),className:t.className??"dial-tooltip-trigger text-start",children:e})},j=({hideTooltip:e,tooltip:o,children:t,triggerClassName:s,contentClassName:a,...i})=>u.jsxs(R,{...i,children:[u.jsx(H,{className:x(s,"truncate"),children:t}),u.jsx(E,{className:x("text-primary",a,"max-w-[300px]",(e||!o)&&"hidden"),children:o})]}),O=(...e)=>e.find(o=>typeof o=="string"&&o.length>0),U=({variant:e,appearance:o=r.Solid,size:t=h.Standard,className:s,icon:a,tooltipProps:i,type:p="button",...g})=>{const m=F.mergeClasses(e&&S(e,o),t===h.Small?"h-[24px] w-[24px]":"h-[40px] w-[40px] dial-kit-enhanced-target","dial-icon-button disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-focus outline-offset-0 disabled:text-controls-secondary-disable",s),d=u.jsx("button",{...g,type:p,className:m,"aria-label":O(g["aria-label"],i?.tooltip),children:a});return i?u.jsx(j,{...i,children:d}):d};exports.ButtonAppearance=r;exports.ButtonVariant=l;exports.DialIconButton=U;exports.DialTooltip=j;exports.DialTooltipContainer=R;exports.DialTooltipContent=E;exports.DialTooltipTrigger=H;exports.ElementSize=h;exports.getButtonClassNames=S;exports.resolveAccessibleName=O;exports.useHasHover=D;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),a=require("./lazy-_W6FYhKg.cjs"),c=require("@monaco-editor/react");function g(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const f=g(c),b={[a.EditorThemes.dark]:{base:"vs-dark",inherit:!1,rules:[{token:"string.key.json",foreground:"#37BABC"},{token:"string.value.json",foreground:"#5C8DEA"},{token:"number",foreground:"#D97C27"},{token:"keyword.json",foreground:"#F4CE46"},{token:"delimiter",foreground:"#EEF1F7"},{token:"delimiter.bracket.json",foreground:"#A972FF"},{token:"delimiter.parenthesis",foreground:"#A972FF"}],colors:{"editor.foreground":"#F76464","editor.background":"#161B2D","editorCursor.foreground":"#EEF1F7","editor.selectionBackground":"#5C8DEA2B","editorLineNumber.foreground":"#242C42","scrollbarSlider.background":"#242C42","scrollbarSlider.hoverBackground":"#242C42","scrollbarSlider.activeBackground":"#242C42"}},[a.EditorThemes.light]:{base:"vs",inherit:!1,rules:[{token:"string.key.json",foreground:"#009D9F"},{token:"string.value.json",foreground:"#2764D9"},{token:"number",foreground:"#B25500"},{token:"keyword.json",foreground:"#3F3D25"},{token:"delimiter",foreground:"#161B2D"},{token:"delimiter.bracket.json",foreground:"#7E39EC"},{token:"delimiter.parenthesis",foreground:"#7E39EC"}],colors:{"editor.foreground":"#AE2F2F","editor.background":"#EEF1F7","editorCursor.foreground":"#161B2D","editor.selectionBackground":"#5C8DEA2B","editorLineNumber.foreground":"#242C42","scrollbarSlider.background":"#242C42","scrollbarSlider.hoverBackground":"#242C42","scrollbarSlider.activeBackground":"#242C42"}}},k=({value:e,onChange:o,onValidateJSON:r,options:t,currentTheme:n,themesConfig:s=b})=>{function d(i){i?.editor?.defineTheme(n,s[n]),i.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,enableSchemaRequest:!1,schemas:[{uri:"http://custom-schema/object-required.json",fileMatch:["*"],schema:{type:"object",description:"Top-level value must be an object",additionalProperties:!0}}]})}const{Editor:l}=f;return u.jsx(l,{beforeMount:d,height:"100%",defaultLanguage:"json",value:e,onChange:o,theme:n,onValidate:r,options:{minimap:{enabled:!1},formatOnType:!0,formatOnPaste:!0,selectOnLineNumbers:!1,automaticLayout:!0,scrollBeyondLastLine:!1,wordWrap:"on",smoothScrolling:!0,overviewRulerLanes:0,scrollbar:{horizontal:"hidden",verticalScrollbarSize:4,verticalSliderSize:4},...t??{}}})};exports.DialJsonEditor=k;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("react"),O=require("@uiw/react-md-editor"),_=require("./lazy-DM-7dL0Y.cjs"),k=require("./merge-classes-Dipy1Ih1.cjs"),o=require("@tabler/icons-react"),p=require("./icon-DhjrDQ8I.cjs"),f=require("./icon-CrGVkVpG.cjs");function E(n){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const c=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(i,r,c.get?c:{enumerable:!0,get:()=>n[r]})}}return i.default=n,Object.freeze(i)}const b=E(O),L=f.DIAL_ICON_SIZE.SM,t={size:L,stroke:p.DIAL_KIT_ICON_STROKE},s=(n,i)=>({...n,icon:i}),M=()=>{const{bold:n,code:i,divider:r,group:c,heading1:a,heading2:d,heading3:u,italic:l,link:m,orderedListCommand:I,quote:x,strikethrough:g,table:h,unorderedListCommand:C}=b;return[s(n,e.jsx(o.IconBold,{...t})),s(l,e.jsx(o.IconItalic,{...t})),s(g,e.jsx(o.IconStrikethrough,{...t})),r,c([a,d,u],{name:"heading",groupName:"heading",icon:e.jsx(o.IconTextSize,{...t}),buttonProps:{"aria-label":"Text style",title:"Text style"}}),r,s(C,e.jsx(o.IconList,{...t})),s(I,e.jsx(o.IconListNumbers,{...t})),r,s(x,e.jsx(o.IconQuote,{...t})),s(m,e.jsx(o.IconLink,{...t})),s(i,e.jsx(o.IconCode,{...t})),r,s(h,e.jsx(o.IconTable,{...t}))]},S=()=>{const{codeEdit:n,codeLive:i,codePreview:r,divider:c,fullscreen:a}=b;return[s(n,e.jsx(o.IconPencil,{...t})),s(i,e.jsx(o.IconLayoutColumns,{...t})),s(r,e.jsx(o.IconEye,{...t})),c,s(a,e.jsx(o.IconMaximize,{...t}))]},T=({value:n,onChange:i,height:r=300,theme:c=_.EditorThemes.light,className:a,placeholder:d,defaultPreview:u="edit",id:l,ariaLabel:m})=>{const I=j.useMemo(()=>M(),[]),x=j.useMemo(()=>S(),[]);return e.jsx("div",{"data-color-mode":c,className:k.mergeClasses("dial-kit-markdown-editor",a),children:e.jsx(O,{value:n,onChange:g=>i?.(g||""),height:r,preview:u,commands:I,extraCommands:x,textareaProps:{placeholder:d,id:l,"aria-label":m}})})};exports.MarkdownEditor=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("react"),O=require("@uiw/react-md-editor"),_=require("./lazy-_W6FYhKg.cjs"),k=require("./merge-classes-BEJXjzkx.cjs"),o=require("@tabler/icons-react"),p=require("./icon-DhjrDQ8I.cjs"),f=require("./icon-CrGVkVpG.cjs");function E(n){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const c=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(i,r,c.get?c:{enumerable:!0,get:()=>n[r]})}}return i.default=n,Object.freeze(i)}const h=E(O),L=f.DIAL_ICON_SIZE.SM,t={size:L,stroke:p.DIAL_KIT_ICON_STROKE},s=(n,i)=>({...n,icon:i}),M=()=>{const{bold:n,code:i,divider:r,group:c,heading1:a,heading2:d,heading3:u,italic:l,link:m,orderedListCommand:I,quote:g,strikethrough:x,table:j,unorderedListCommand:C}=h;return[s(n,e.jsx(o.IconBold,{...t})),s(l,e.jsx(o.IconItalic,{...t})),s(x,e.jsx(o.IconStrikethrough,{...t})),r,c([a,d,u],{name:"heading",groupName:"heading",icon:e.jsx(o.IconTextSize,{...t}),buttonProps:{"aria-label":"Text style",title:"Text style"}}),r,s(C,e.jsx(o.IconList,{...t})),s(I,e.jsx(o.IconListNumbers,{...t})),r,s(g,e.jsx(o.IconQuote,{...t})),s(m,e.jsx(o.IconLink,{...t})),s(i,e.jsx(o.IconCode,{...t})),r,s(j,e.jsx(o.IconTable,{...t}))]},S=()=>{const{codeEdit:n,codeLive:i,codePreview:r,divider:c,fullscreen:a}=h;return[s(n,e.jsx(o.IconPencil,{...t})),s(i,e.jsx(o.IconLayoutColumns,{...t})),s(r,e.jsx(o.IconEye,{...t})),c,s(a,e.jsx(o.IconMaximize,{...t}))]},T=({value:n,onChange:i,height:r=300,theme:c=_.EditorThemes.light,className:a,placeholder:d,defaultPreview:u="edit",id:l,ariaLabel:m,showDragbar:I=!0})=>{const g=b.useMemo(()=>M(),[]),x=b.useMemo(()=>S(),[]);return e.jsx("div",{"data-color-mode":c,className:k.mergeClasses("dial-kit-markdown-editor",a),children:e.jsx(O,{value:n,onChange:j=>i?.(j||""),height:r,preview:u,visibleDragbar:I,commands:g,extraCommands:x,textareaProps:{placeholder:d,id:l,"aria-label":m}})})};exports.MarkdownEditor=T;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("@uiw/react-md-editor"),u=require("./lazy-_W6FYhKg.cjs"),x=require("./merge-classes-BEJXjzkx.cjs"),g=({value:r,onChange:s,height:o=300,preview:i="edit",theme:a=u.EditorThemes.dark,className:n,placeholder:t,showDragbar:d=!0})=>{const l=t!==void 0&&!r;return e.jsxs("div",{"data-color-mode":a,className:x.mergeClasses("relative",n),children:[e.jsx(m,{value:r,onChange:c=>s?.(c||""),height:o,preview:i,visibleDragbar:d}),l&&e.jsx("div",{className:"pointer-events-none absolute left-0 top-8 px-2 dial-small-text text-secondary opacity-40",children:t})]})};exports.DialMarkdownEditor=g;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),m=require("./Switch-DE6MrcqJ.cjs"),N=require("./lazy-_W6FYhKg.cjs"),b=require("./MarkdownEditor-Bapd1ycU.cjs"),g=({value:r,onChangeValue:l,label:i,headerContent:a,switcherLabel:d,height:c=300,theme:u=N.EditorThemes.dark,onValidateJSON:x,preview:j="edit",showDragbar:w=!0})=>{const C=n.useId(),[t,p]=n.useState(!1),[f,S]=n.useState(null);n.useEffect(()=>{t&&typeof window<"u"&&Promise.resolve().then(()=>require("./JsonEditor-Bxui5wJH.cjs")).then(s=>{S(()=>s.DialJsonEditor)})},[t]);const h=n.useCallback(s=>{l?.(s)},[l]),E=n.useCallback(s=>{x?.(s)},[x]),o=!!d;return e.jsx("div",{className:"size-full flex flex-col",children:e.jsx("div",{className:"flex flex-col gap-8",children:e.jsxs("div",{children:[(i||a||o)&&e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[i&&e.jsx(m.DialLabel,{label:i}),e.jsxs("div",{className:"flex items-center gap-2 flex-1 justify-end",children:[a,o&&e.jsx("label",{className:"flex items-center gap-2 cursor-pointer",children:e.jsx(m.DialSwitch,{isOn:t,label:d,switchId:C,onChange:s=>p(s)})})]})]}),o&&t?e.jsx("div",{className:"border border-primary rounded",style:{height:`${c}px`},children:f&&e.jsx(f,{value:r,onChange:h,onValidateJSON:E,currentTheme:u})}):e.jsx(b.DialMarkdownEditor,{value:r,onChange:h,height:c,preview:j,showDragbar:w,theme:u})]})})})};exports.DialMarkdownEditorContainer=g;
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),p=require("./merge-classes-Dipy1Ih1.cjs"),d=require("@tabler/icons-react"),i=require("./IconButton-DWqoaBWf.cjs"),f=require("./icon-CrGVkVpG.cjs"),l=require("classnames"),h=require("react"),y="w-[24px] h-[24px] border border-solid rounded-[6px] border-transparent flex items-center justify-center text-secondary hover:text-controls-accent-primary-hover active:text-controls-accent-primary-active",o=({caption:t,onClick:a})=>{if(!t)return null;const s=e.jsx(i.DialIconButton,{"aria-label":t,className:y,icon:e.jsx(d.IconInfoCircle,{size:f.DIAL_ICON_SIZE.SM}),onClick:a});return t?e.jsx(i.DialTooltip,{tooltip:t,triggerClassName:"flex justify-center items-center",children:s}):s},j=({label:t,required:a,className:s,caption:r,...n})=>t?e.jsxs("label",{...n,className:p.mergeClasses("dial-tiny-text text-secondary flex items-center gap-1",s),children:[typeof t=="string"?e.jsx("span",{className:"min-h-4",children:t}):t,a&&e.jsx("span",{className:"text-accent-primary",children:"*"}),e.jsx(o,{caption:r})]}):null,N=({label:t,switchId:a,isOn:s=!1,disabled:r,onChange:n,caption:c})=>{const x=l("flex shrink-0 w-[36px] h-[18px] cursor-pointer items-center gap-1 rounded-full p-0.5 transition-all duration-200",s?"flex-row-reverse":"flex-row",r?"pointer-events-none":"",r?s?"bg-controls-disable":"bg-layer-4":s?"bg-accent-primary":"bg-layer-4"),m=h.useCallback(u=>{u.stopPropagation(),n?.(!s)},[n,s]);return e.jsxs("div",{className:"flex flex-row items-start",role:"switch",children:[e.jsx("input",{type:"checkbox",onChange:m,id:a,disabled:r,className:"invisible size-0",checked:s}),e.jsx("label",{htmlFor:a,className:x,"aria-describedby":c&&"caption",children:e.jsx("span",{className:l("size-3 rounded-full",r?"bg-controls-disable-accent":"bg-controls-enable-primary")})}),(t||c)&&e.jsxs("div",{className:"flex flex-col gap-1 ml-2",children:[t&&e.jsx("span",{className:l("dial-small-text py-[1px]",r?"text-secondary":"text-primary"),"aria-label":"switch-title",children:t}),c&&e.jsx("span",{id:"caption",className:"dial-tiny-text text-secondary",children:c})]})]})};exports.DialInfoButton=o;exports.DialLabel=j;exports.DialSwitch=N;
1
+ "use strict";const e=require("react/jsx-runtime"),p=require("./merge-classes-BEJXjzkx.cjs"),d=require("@tabler/icons-react"),i=require("./IconButton-DHOFapLo.cjs"),f=require("./icon-CrGVkVpG.cjs"),l=require("classnames"),h=require("react"),y="w-[24px] h-[24px] border border-solid rounded-[6px] border-transparent flex items-center justify-center text-secondary hover:text-controls-accent-primary-hover active:text-controls-accent-primary-active",o=({caption:t,onClick:a})=>{if(!t)return null;const s=e.jsx(i.DialIconButton,{"aria-label":t,className:y,icon:e.jsx(d.IconInfoCircle,{size:f.DIAL_ICON_SIZE.SM}),onClick:a});return t?e.jsx(i.DialTooltip,{tooltip:t,triggerClassName:"flex justify-center items-center",children:s}):s},j=({label:t,required:a,className:s,caption:r,...n})=>t?e.jsxs("label",{...n,className:p.mergeClasses("dial-tiny-text text-secondary flex items-center gap-1",s),children:[typeof t=="string"?e.jsx("span",{className:"min-h-4",children:t}):t,a&&e.jsx("span",{className:"text-accent-primary",children:"*"}),e.jsx(o,{caption:r})]}):null,N=({label:t,switchId:a,isOn:s=!1,disabled:r,onChange:n,caption:c})=>{const x=l("flex shrink-0 w-[36px] h-[18px] cursor-pointer items-center gap-1 rounded-full p-0.5 transition-all duration-200",s?"flex-row-reverse":"flex-row",r?"pointer-events-none":"",r?s?"bg-controls-disable":"bg-layer-4":s?"bg-accent-primary":"bg-layer-4"),m=h.useCallback(u=>{u.stopPropagation(),n?.(!s)},[n,s]);return e.jsxs("div",{className:"flex flex-row items-start",role:"switch",children:[e.jsx("input",{type:"checkbox",onChange:m,id:a,disabled:r,className:"invisible size-0",checked:s}),e.jsx("label",{htmlFor:a,className:x,"aria-describedby":c&&"caption",children:e.jsx("span",{className:l("size-3 rounded-full",r?"bg-controls-disable-accent":"bg-controls-enable-primary")})}),(t||c)&&e.jsxs("div",{className:"flex flex-col gap-1 ml-2",children:[t&&e.jsx("span",{className:l("dial-small-text py-[1px]",r?"text-secondary":"text-primary"),"aria-label":"switch-title",children:t}),c&&e.jsx("span",{id:"caption",className:"dial-tiny-text text-secondary",children:c})]})]})};exports.DialInfoButton=o;exports.DialLabel=j;exports.DialSwitch=N;
@@ -1,28 +1,29 @@
1
- import { ButtonVariant as o, ButtonAppearance as t } from "../../types/button.js";
1
+ import { ButtonVariant as a, ButtonAppearance as t } from "../../types/button.js";
2
2
  const i = {
3
- [o.Primary]: {
3
+ [a.Primary]: {
4
4
  [t.Solid]: "dial-primary-solid-button",
5
5
  [t.Ghost]: "dial-primary-ghost-button",
6
6
  [t.Link]: "dial-primary-link-button"
7
7
  },
8
- [o.Neutral]: {
8
+ [a.Neutral]: {
9
9
  [t.Outlined]: "dial-neutral-outlined-button"
10
10
  },
11
- [o.Danger]: {
11
+ [a.Danger]: {
12
12
  [t.Solid]: "dial-danger-solid-button",
13
13
  [t.Ghost]: "dial-danger-ghost-button",
14
14
  [t.Outlined]: "dial-danger-outlined-button"
15
15
  },
16
- [o.Success]: {
16
+ [a.Success]: {
17
17
  [t.Ghost]: "dial-success-ghost-button"
18
18
  },
19
- [o.Secondary]: {
19
+ [a.Secondary]: {
20
20
  [t.Ghost]: "dial-secondary-ghost-button"
21
21
  },
22
- [o.Tertiary]: {
22
+ [a.Tertiary]: {
23
23
  [t.Ghost]: "dial-tertiary-ghost-button"
24
24
  },
25
- [o.Static]: {}
25
+ [a.Static]: {},
26
+ [a.Starter]: {}
26
27
  };
27
28
  export {
28
29
  i as variantClassMap
@@ -1,17 +1,18 @@
1
1
  import { jsxs as v, Fragment as N, jsx as o } from "react/jsx-runtime";
2
- import { useFloating as ce, autoUpdate as de, offset as fe, autoPlacement as ue, flip as pe, shift as me, size as he, useClick as ye, useHover as xe, useDismiss as ge, useRole as we, useInteractions as be, FloatingPortal as Ce, FloatingFocusManager as ve } from "@floating-ui/react";
2
+ import { useFloating as ce, autoUpdate as de, offset as fe, autoPlacement as ue, flip as pe, shift as me, size as he, useClick as ye, useHover as xe, useDismiss as ge, useRole as we, useInteractions as Ce, FloatingPortal as be, FloatingFocusManager as ve } from "@floating-ui/react";
3
3
  import m from "classnames";
4
4
  import { useState as Ne, useRef as Pe, useCallback as h, useId as ke, useEffect as U, useMemo as De } from "react";
5
- import { DialIcon as Me } from "../Icon/Icon.js";
5
+ import { DialIcon as Ie } from "../Icon/Icon.js";
6
+ import { DIAL_KIT_CLASS as Me } from "../../constants/public-class-names.js";
6
7
  import { DropdownTrigger as y, DropdownItemType as X } from "../../types/dropdown.js";
7
- import { dropdownGap as x, dropdownDividerClassName as Ie, dropdownItemBaseClassName as Ee, dropdownItemDisabledClassName as Fe, dropdownItemDangerClassName as Re, dropdownBaseClassName as Be, dropdownListBaseClassName as $e } from "./constants.js";
8
- import { DialCloseButton as Ae } from "../CloseButton/CloseButton.js";
9
- import { mergeClasses as M } from "../../utils/merge-classes.js";
10
- import { DropdownSubMenuItem as We } from "./DropdownSubMenuItem.js";
11
- const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.()?.width ?? 0, Ke = ({
8
+ import { dropdownGap as x, dropdownDividerClassName as Ee, dropdownItemBaseClassName as Fe, dropdownItemDisabledClassName as Re, dropdownItemDangerClassName as Ae, dropdownBaseClassName as Be, dropdownListBaseClassName as Le } from "./constants.js";
9
+ import { DialCloseButton as Se } from "../CloseButton/CloseButton.js";
10
+ import { mergeClasses as I } from "../../utils/merge-classes.js";
11
+ import { DropdownSubMenuItem as $e } from "./DropdownSubMenuItem.js";
12
+ const We = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.()?.width ?? 0, Je = ({
12
13
  children: c,
13
14
  items: g,
14
- onItemClick: I,
15
+ onItemClick: M,
15
16
  menuHeader: d,
16
17
  menuFooter: f,
17
18
  renderOverlay: P,
@@ -21,51 +22,51 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
21
22
  open: F,
22
23
  defaultOpen: Y = !1,
23
24
  onOpenChange: R,
24
- closable: z = !1,
25
- onClose: G,
26
- className: q,
27
- overlayContentClassName: B,
28
- separatorClassName: $,
29
- listClassName: J,
30
- outsidePressIgnoreRef: A,
31
- outsideClosable: K = !0,
32
- allowedPlacements: Q,
25
+ closable: _ = !1,
26
+ onClose: z,
27
+ className: G,
28
+ overlayContentClassName: A,
29
+ separatorClassName: B,
30
+ listClassName: K,
31
+ outsidePressIgnoreRef: L,
32
+ outsideClosable: T = !0,
33
+ allowedPlacements: q,
33
34
  anchorToMouse: w = !1,
34
35
  matchReferenceWidth: k = !0,
35
- maxDropdownHeight: W
36
+ maxDropdownHeight: S
36
37
  }) => {
37
- const [T, V] = Ne(Y), D = F !== void 0, s = D ? !!F : T, b = Pe(null), n = h(
38
+ const [J, Q] = Ne(Y), D = F !== void 0, s = D ? !!F : J, C = Pe(null), n = h(
38
39
  (e) => {
39
- D || V(e), R?.(e);
40
+ D || Q(e), R?.(e);
40
41
  },
41
42
  [D, R]
42
- ), j = ke(), Z = E === void 0, { refs: a, floatingStyles: _, context: u } = ce({
43
+ ), $ = ke(), V = E === void 0, { refs: a, floatingStyles: Z, context: u } = ce({
43
44
  placement: E,
44
45
  open: s,
45
46
  onOpenChange: n,
46
47
  whileElementsMounted: de,
47
48
  middleware: [
48
49
  fe({ mainAxis: x, crossAxis: 0 }),
49
- Z ? ue({
50
+ V ? ue({
50
51
  alignment: "start",
51
52
  crossAxis: !0,
52
53
  padding: x,
53
- allowedPlacements: Q
54
+ allowedPlacements: q
54
55
  }) : pe({ padding: x }),
55
56
  me({ padding: x }),
56
57
  he({
57
58
  padding: x,
58
59
  apply({ availableWidth: e, availableHeight: t, elements: p }) {
59
- const l = p.floating, O = je(p.reference);
60
+ const l = p.floating, j = We(p.reference);
60
61
  l.style.setProperty(
61
62
  "--fui-available-height",
62
63
  `${Math.floor(t)}px`
63
64
  ), l.style.setProperty(
64
65
  "--reference-width",
65
- k ? `${Math.round(O)}px` : "0px"
66
- ), k ? l.style.minWidth = `${Math.round(O)}px` : l.style.removeProperty("min-width"), l.style.maxWidth = `${Math.floor(e)}px`;
67
- const S = Math.floor(t);
68
- l.style.maxHeight = `${W ? Math.min(S, W) : S}px`;
66
+ k ? `${Math.round(j)}px` : "0px"
67
+ ), k ? l.style.minWidth = `${Math.round(j)}px` : l.style.removeProperty("min-width"), l.style.maxWidth = `${Math.floor(e)}px`;
68
+ const O = Math.floor(t);
69
+ l.style.maxHeight = `${S ? Math.min(O, S) : O}px`;
69
70
  }
70
71
  })
71
72
  ]
@@ -80,16 +81,16 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
80
81
  bubbles: !0,
81
82
  referencePress: !1,
82
83
  outsidePress: (e) => {
83
- if (!K) return !1;
84
+ if (!T) return !1;
84
85
  const t = e.target;
85
- return !(A?.current && t instanceof Node && A.current.contains(t));
86
+ return !(L?.current && t instanceof Node && L.current.contains(t));
86
87
  }
87
- }), ne = we(u, { role: "menu" }), { getReferenceProps: oe, getFloatingProps: re } = be([
88
+ }), ne = we(u, { role: "menu" }), { getReferenceProps: oe, getFloatingProps: re } = Ce([
88
89
  H,
89
90
  ee,
90
91
  te,
91
92
  ne
92
- ]), C = h(
93
+ ]), b = h(
93
94
  (e, t) => {
94
95
  a.setPositionReference({
95
96
  getBoundingClientRect: () => ({
@@ -107,51 +108,55 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
107
108
  [a]
108
109
  ), se = h(
109
110
  (e) => {
110
- !i.includes(y.ContextMenu) || r || (e.preventDefault(), w && (C(e.clientX, e.clientY), b.current = document.elementFromPoint(
111
+ !i.includes(y.ContextMenu) || r || (e.preventDefault(), w && (b(e.clientX, e.clientY), C.current = document.elementFromPoint(
111
112
  e.clientX,
112
113
  e.clientY
113
114
  )), n(!0));
114
115
  },
115
- [w, r, n, C, i]
116
+ [w, r, n, b, i]
116
117
  ), le = h(
117
118
  (e) => {
118
- !w || r || (i.includes(y.ContextMenu) && s && n(!1), C(e.clientX, e.clientY), b.current = document.elementFromPoint(
119
+ !w || r || (i.includes(y.ContextMenu) && s && n(!1), b(e.clientX, e.clientY), C.current = document.elementFromPoint(
119
120
  e.clientX,
120
121
  e.clientY
121
122
  ));
122
123
  },
123
- [w, r, C, s, i, n]
124
+ [w, r, b, s, i, n]
124
125
  );
125
126
  U(() => {
126
127
  r && s && n(!1);
127
128
  }, [r, s, n]);
128
- const L = h(
129
+ const W = h(
129
130
  (e) => (t) => {
130
- e.disabled || (e.onClick?.({ key: e.key, domEvent: t }), I?.({ key: e.key, domEvent: t }), n(!1));
131
+ e.disabled || (e.onClick?.({ key: e.key, domEvent: t }), M?.({ key: e.key, domEvent: t }), n(!1));
131
132
  },
132
- [I, n]
133
+ [M, n]
133
134
  ), ie = De(() => P ? P() : g ? /* @__PURE__ */ v(N, { children: [
134
135
  d && /* @__PURE__ */ o(N, { children: typeof d == "function" ? d() : d }),
135
136
  /* @__PURE__ */ o(
136
137
  "div",
137
138
  {
138
139
  role: "none",
139
- className: M("py-1", B),
140
+ className: I(
141
+ "py-1",
142
+ A,
143
+ Me.dropdownList
144
+ ),
140
145
  "aria-label": "dropdown",
141
146
  children: g.map((e) => e.type === X.Divider ? /* @__PURE__ */ o(
142
147
  "div",
143
148
  {
144
149
  role: "separator",
145
- className: M(
146
- Ie,
147
- $
150
+ className: I(
151
+ Ee,
152
+ B
148
153
  )
149
154
  },
150
155
  e.key
151
156
  ) : e.type === X.PlainText ? /* @__PURE__ */ o(
152
157
  "div",
153
158
  {
154
- className: M(
159
+ className: I(
155
160
  "px-3 py-2 text-secondary dial-caption-text",
156
161
  e.className
157
162
  ),
@@ -159,7 +164,7 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
159
164
  },
160
165
  e.key
161
166
  ) : e.children?.length ? /* @__PURE__ */ o(
162
- We,
167
+ $e,
163
168
  {
164
169
  item: e,
165
170
  onRootClose: () => n(!1)
@@ -172,13 +177,13 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
172
177
  type: "button",
173
178
  "aria-disabled": !!e.disabled,
174
179
  className: m(
175
- Ee,
176
- e.disabled && Fe,
177
- e.danger && Re,
180
+ Fe,
181
+ e.disabled && Re,
182
+ e.danger && Ae,
178
183
  e.className
179
184
  ),
180
185
  disabled: e.disabled,
181
- onClick: L(e),
186
+ onClick: W(e),
182
187
  children: [
183
188
  e.icon && /* @__PURE__ */ o(
184
189
  "span",
@@ -187,7 +192,7 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
187
192
  e.danger && "text-error",
188
193
  e.disabled && "text-secondary"
189
194
  ),
190
- children: /* @__PURE__ */ o(Me, { icon: e.icon })
195
+ children: /* @__PURE__ */ o(Ie, { icon: e.icon })
191
196
  }
192
197
  ),
193
198
  /* @__PURE__ */ o(
@@ -210,14 +215,14 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
210
215
  ),
211
216
  f && /* @__PURE__ */ o(N, { children: typeof f == "function" ? f() : f })
212
217
  ] }) : null, [
213
- L,
218
+ W,
214
219
  g,
215
220
  f,
216
221
  d,
217
222
  P,
218
223
  n,
219
- B,
220
- $
224
+ A,
225
+ B
221
226
  ]), ae = oe({
222
227
  onContextMenu: se,
223
228
  onMouseDown: le
@@ -226,7 +231,7 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
226
231
  if (!s) return;
227
232
  const e = a.reference.current;
228
233
  let t = null;
229
- if (e instanceof Element ? t = e : b.current instanceof Element && (t = b.current), !t) return;
234
+ if (e instanceof Element ? t = e : C.current instanceof Element && (t = C.current), !t) return;
230
235
  const p = new IntersectionObserver(
231
236
  ([l]) => {
232
237
  l.isIntersecting || n(!1);
@@ -242,16 +247,16 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
242
247
  className: m(
243
248
  Be,
244
249
  r && "!cursor-not-allowed opacity-75",
245
- q
250
+ G
246
251
  ),
247
252
  "aria-haspopup": "menu",
248
253
  "aria-expanded": s,
249
- "aria-controls": j,
254
+ "aria-controls": $,
250
255
  ...ae,
251
256
  children: c
252
257
  }
253
258
  ),
254
- s && /* @__PURE__ */ o(Ce, { children: /* @__PURE__ */ o(
259
+ s && /* @__PURE__ */ o(be, { children: /* @__PURE__ */ o(
255
260
  ve,
256
261
  {
257
262
  context: u,
@@ -261,22 +266,22 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
261
266
  children: /* @__PURE__ */ v(
262
267
  "div",
263
268
  {
264
- id: j,
269
+ id: $,
265
270
  ref: a.setFloating,
266
- style: _,
271
+ style: Z,
267
272
  className: m(
268
- $e,
273
+ Le,
269
274
  !k && "w-max",
270
- J
275
+ K
271
276
  ),
272
277
  ...re(),
273
278
  children: [
274
- z && /* @__PURE__ */ o("div", { className: "flex items-center justify-between px-2 pt-2", children: /* @__PURE__ */ o(
275
- Ae,
279
+ _ && /* @__PURE__ */ o("div", { className: "flex items-center justify-between px-2 pt-2", children: /* @__PURE__ */ o(
280
+ Se,
276
281
  {
277
282
  ariaLabel: "Close dropdown",
278
283
  onClose: (e) => {
279
- G?.(e), n(!1);
284
+ z?.(e), n(!1);
280
285
  }
281
286
  }
282
287
  ) }),
@@ -289,5 +294,5 @@ const je = (c) => "clientWidth" in c ? c.clientWidth : c.getBoundingClientRect?.
289
294
  ] });
290
295
  };
291
296
  export {
292
- Ke as DialDropdown
297
+ Je as DialDropdown
293
298
  };