@plexui/ui 0.29.0 → 0.31.0

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 (175) hide show
  1. package/dist/es/components/Alert/Alert.js +2 -2
  2. package/dist/es/components/Alert/Alert.js.map +1 -1
  3. package/dist/es/components/Avatar/Avatar.js +3 -1
  4. package/dist/es/components/Avatar/Avatar.js.map +1 -1
  5. package/dist/es/components/ButtonGroup/ButtonGroup.js +1 -1
  6. package/dist/es/components/ButtonGroup/ButtonGroup.js.map +1 -1
  7. package/dist/es/components/ButtonGroup/index.js.map +1 -1
  8. package/dist/es/components/Checkbox/Checkbox.js +1 -3
  9. package/dist/es/components/Checkbox/Checkbox.js.map +1 -1
  10. package/dist/es/components/ColorPicker/ColorPicker.js +227 -0
  11. package/dist/es/components/ColorPicker/ColorPicker.js.map +1 -0
  12. package/dist/es/components/ColorPicker/ColorWell.js +58 -0
  13. package/dist/es/components/ColorPicker/ColorWell.js.map +1 -0
  14. package/dist/es/components/ColorPicker/index.js +3 -0
  15. package/dist/es/components/ColorPicker/index.js.map +1 -0
  16. package/dist/es/components/ColorPicker/shared.js +132 -0
  17. package/dist/es/components/ColorPicker/shared.js.map +1 -0
  18. package/dist/es/components/ContextMenu/ContextMenu.js +164 -0
  19. package/dist/es/components/ContextMenu/ContextMenu.js.map +1 -0
  20. package/dist/es/components/ContextMenu/index.js +2 -0
  21. package/dist/es/components/ContextMenu/index.js.map +1 -0
  22. package/dist/es/components/ContextMenu/shared.js +57 -0
  23. package/dist/es/components/ContextMenu/shared.js.map +1 -0
  24. package/dist/es/components/DatePicker/DatePicker.js +4 -2
  25. package/dist/es/components/DatePicker/DatePicker.js.map +1 -1
  26. package/dist/es/components/DateRangePicker/DateRangePicker.js.map +1 -1
  27. package/dist/es/components/Dialog/Dialog.js +118 -24
  28. package/dist/es/components/Dialog/Dialog.js.map +1 -1
  29. package/dist/es/components/Dialog/dialogSteps.js +85 -0
  30. package/dist/es/components/Dialog/dialogSteps.js.map +1 -0
  31. package/dist/es/components/Dialog/dialogViewport.js +74 -0
  32. package/dist/es/components/Dialog/dialogViewport.js.map +1 -0
  33. package/dist/es/components/Dialog/index.js +1 -1
  34. package/dist/es/components/Dialog/index.js.map +1 -1
  35. package/dist/es/components/Dialog/sheetDrag.js +2 -1
  36. package/dist/es/components/Dialog/sheetDrag.js.map +1 -1
  37. package/dist/es/components/Field/Field.js +3 -3
  38. package/dist/es/components/Field/Field.js.map +1 -1
  39. package/dist/es/components/FieldGroup/FieldGroup.js +4 -2
  40. package/dist/es/components/FieldGroup/FieldGroup.js.map +1 -1
  41. package/dist/es/components/FloatingLabelInput/FloatingLabelInput.js +2 -2
  42. package/dist/es/components/FloatingLabelInput/FloatingLabelInput.js.map +1 -1
  43. package/dist/es/components/Icon/index.js +1 -0
  44. package/dist/es/components/Icon/index.js.map +1 -1
  45. package/dist/es/components/Icon/svg/Eyedropper.js +6 -0
  46. package/dist/es/components/Icon/svg/Eyedropper.js.map +1 -0
  47. package/dist/es/components/IndexBar/IndexBar.js +164 -0
  48. package/dist/es/components/IndexBar/IndexBar.js.map +1 -0
  49. package/dist/es/components/IndexBar/index.js +2 -0
  50. package/dist/es/components/IndexBar/index.js.map +1 -0
  51. package/dist/es/components/Indicator/LoadingIndicator.js.map +1 -1
  52. package/dist/es/components/Input/Input.js +2 -2
  53. package/dist/es/components/Input/Input.js.map +1 -1
  54. package/dist/es/components/MarkdownEditor/MarkdownEditor.js +142 -1
  55. package/dist/es/components/MarkdownEditor/MarkdownEditor.js.map +1 -1
  56. package/dist/es/components/Menu/Menu.js +109 -29
  57. package/dist/es/components/Menu/Menu.js.map +1 -1
  58. package/dist/es/components/Page/Page.js +41 -14
  59. package/dist/es/components/Page/Page.js.map +1 -1
  60. package/dist/es/components/PageControl/PageControl.js +146 -0
  61. package/dist/es/components/PageControl/PageControl.js.map +1 -0
  62. package/dist/es/components/PageControl/index.js +2 -0
  63. package/dist/es/components/PageControl/index.js.map +1 -0
  64. package/dist/es/components/PhoneLayout/PhoneLayout.js +41 -0
  65. package/dist/es/components/PhoneLayout/PhoneLayout.js.map +1 -0
  66. package/dist/es/components/PhoneLayout/index.js +2 -0
  67. package/dist/es/components/PhoneLayout/index.js.map +1 -0
  68. package/dist/es/components/Popover/Popover.js +2 -1
  69. package/dist/es/components/Popover/Popover.js.map +1 -1
  70. package/dist/es/components/Select/Select.js +11 -6
  71. package/dist/es/components/Select/Select.js.map +1 -1
  72. package/dist/es/components/SelectControl/SelectControl.js +1 -1
  73. package/dist/es/components/SelectControl/SelectControl.js.map +1 -1
  74. package/dist/es/components/Sidebar/Sidebar.js +21 -8
  75. package/dist/es/components/Sidebar/Sidebar.js.map +1 -1
  76. package/dist/es/components/Slider/Slider.js +43 -8
  77. package/dist/es/components/Slider/Slider.js.map +1 -1
  78. package/dist/es/components/Stepper/Stepper.js +114 -0
  79. package/dist/es/components/Stepper/Stepper.js.map +1 -0
  80. package/dist/es/components/Stepper/index.js +2 -0
  81. package/dist/es/components/Stepper/index.js.map +1 -0
  82. package/dist/es/components/SwipeActions/SwipeActions.js +321 -0
  83. package/dist/es/components/SwipeActions/SwipeActions.js.map +1 -0
  84. package/dist/es/components/SwipeActions/index.js +2 -0
  85. package/dist/es/components/SwipeActions/index.js.map +1 -0
  86. package/dist/es/components/TabBar/TabBar.js +128 -0
  87. package/dist/es/components/TabBar/TabBar.js.map +1 -0
  88. package/dist/es/components/TabBar/index.js +2 -0
  89. package/dist/es/components/TabBar/index.js.map +1 -0
  90. package/dist/es/components/Tabs/Tabs.js +13 -6
  91. package/dist/es/components/Tabs/Tabs.js.map +1 -1
  92. package/dist/es/components/TagInput/TagInput.js +5 -65
  93. package/dist/es/components/TagInput/TagInput.js.map +1 -1
  94. package/dist/es/components/Textarea/Textarea.js +1 -1
  95. package/dist/es/components/Textarea/Textarea.js.map +1 -1
  96. package/dist/es/components/Tip/Tip.js +106 -0
  97. package/dist/es/components/Tip/Tip.js.map +1 -0
  98. package/dist/es/components/Tip/index.js +2 -0
  99. package/dist/es/components/Tip/index.js.map +1 -0
  100. package/dist/es/components/Toast/ToastRenderer.js +22 -9
  101. package/dist/es/components/Toast/ToastRenderer.js.map +1 -1
  102. package/dist/es/components/Toast/Toaster.js +17 -6
  103. package/dist/es/components/Toast/Toaster.js.map +1 -1
  104. package/dist/es/components/Toast/toastLifecycle.js +113 -1
  105. package/dist/es/components/Toast/toastLifecycle.js.map +1 -1
  106. package/dist/es/components/Toolbar/Toolbar.js +31 -5
  107. package/dist/es/components/Toolbar/Toolbar.js.map +1 -1
  108. package/dist/es/components/Toolbar/index.js.map +1 -1
  109. package/dist/es/hooks/useEscCloseStack.js +10 -3
  110. package/dist/es/hooks/useEscCloseStack.js.map +1 -1
  111. package/dist/es/lib/fieldRow.js +7 -1
  112. package/dist/es/lib/fieldRow.js.map +1 -1
  113. package/dist/es/lib/floatingBoundary.js +3 -1
  114. package/dist/es/lib/floatingBoundary.js.map +1 -1
  115. package/dist/es/lib/helpers.js +21 -0
  116. package/dist/es/lib/helpers.js.map +1 -1
  117. package/dist/es/lib/menuSubmenuPlacement.js +51 -6
  118. package/dist/es/lib/menuSubmenuPlacement.js.map +1 -1
  119. package/dist/es/lib/menuTriggerCover.js +70 -0
  120. package/dist/es/lib/menuTriggerCover.js.map +1 -0
  121. package/dist/es/lib/phoneLayout.js +16 -0
  122. package/dist/es/lib/phoneLayout.js.map +1 -0
  123. package/dist/es/lib/scrollEdges.js +34 -0
  124. package/dist/es/lib/scrollEdges.js.map +1 -0
  125. package/dist/es/lib/toastRegion.js +6 -0
  126. package/dist/es/lib/toastRegion.js.map +1 -0
  127. package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +8 -1
  128. package/dist/types/components/ButtonGroup/index.d.ts +1 -1
  129. package/dist/types/components/ColorPicker/ColorPicker.d.ts +34 -0
  130. package/dist/types/components/ColorPicker/ColorWell.d.ts +32 -0
  131. package/dist/types/components/ColorPicker/index.d.ts +3 -0
  132. package/dist/types/components/ColorPicker/shared.d.ts +69 -0
  133. package/dist/types/components/ContextMenu/ContextMenu.d.ts +78 -0
  134. package/dist/types/components/ContextMenu/index.d.ts +1 -0
  135. package/dist/types/components/ContextMenu/shared.d.ts +51 -0
  136. package/dist/types/components/DatePicker/DatePicker.d.ts +6 -1
  137. package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +1 -0
  138. package/dist/types/components/Dialog/Dialog.d.ts +52 -3
  139. package/dist/types/components/Dialog/dialogSteps.d.ts +10 -0
  140. package/dist/types/components/Dialog/dialogViewport.d.ts +1 -0
  141. package/dist/types/components/Dialog/index.d.ts +1 -1
  142. package/dist/types/components/Field/Field.d.ts +11 -2
  143. package/dist/types/components/FieldGroup/FieldGroup.d.ts +11 -2
  144. package/dist/types/components/Icon/index.d.ts +1 -0
  145. package/dist/types/components/Icon/svg/Eyedropper.d.ts +6 -0
  146. package/dist/types/components/IndexBar/IndexBar.d.ts +35 -0
  147. package/dist/types/components/IndexBar/index.d.ts +1 -0
  148. package/dist/types/components/Indicator/LoadingIndicator.d.ts +1 -1
  149. package/dist/types/components/Menu/Menu.d.ts +79 -10
  150. package/dist/types/components/Page/Page.d.ts +8 -4
  151. package/dist/types/components/PageControl/PageControl.d.ts +52 -0
  152. package/dist/types/components/PageControl/index.d.ts +1 -0
  153. package/dist/types/components/PhoneLayout/PhoneLayout.d.ts +18 -0
  154. package/dist/types/components/PhoneLayout/index.d.ts +1 -0
  155. package/dist/types/components/Select/Select.d.ts +3 -3
  156. package/dist/types/components/Stepper/Stepper.d.ts +56 -0
  157. package/dist/types/components/Stepper/index.d.ts +1 -0
  158. package/dist/types/components/SwipeActions/SwipeActions.d.ts +46 -0
  159. package/dist/types/components/SwipeActions/index.d.ts +1 -0
  160. package/dist/types/components/TabBar/TabBar.d.ts +88 -0
  161. package/dist/types/components/TabBar/index.d.ts +1 -0
  162. package/dist/types/components/Tip/Tip.d.ts +57 -0
  163. package/dist/types/components/Tip/index.d.ts +1 -0
  164. package/dist/types/components/Toast/toastLifecycle.d.ts +34 -0
  165. package/dist/types/components/Toolbar/Toolbar.d.ts +19 -5
  166. package/dist/types/components/Toolbar/index.d.ts +1 -1
  167. package/dist/types/hooks/useEscCloseStack.d.ts +5 -1
  168. package/dist/types/lib/fieldRow.d.ts +6 -0
  169. package/dist/types/lib/helpers.d.ts +6 -0
  170. package/dist/types/lib/menuSubmenuPlacement.d.ts +14 -1
  171. package/dist/types/lib/menuTriggerCover.d.ts +23 -0
  172. package/dist/types/lib/phoneLayout.d.ts +11 -0
  173. package/dist/types/lib/scrollEdges.d.ts +16 -0
  174. package/dist/types/lib/toastRegion.d.ts +5 -0
  175. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"SelectControl.js","sourceRoot":"","sources":["../../../../src/components/SelectControl/SelectControl.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,MAAM,EAAkB,MAAM,OAAO,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,CAAC,MAAM,kEAAkE,CAAA;AAmFhF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,GAAG,EACH,aAAa,EACb,eAAe,EACf,SAAS,EACT,cAAc,EACd,UAAU,EACV,eAAe,GAAG,KAAK,EACvB,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,EAC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,YAElD,KAAC,CAAC,KAAG,GACE,CACV,EACA,OAAO,IAAI,KAAC,gBAAgB,IAAC,SAAS,EAAE,CAAC,CAAC,gBAAgB,GAAI,EAE9D,eAAe,IAAI,KAAC,YAAY,IAAC,QAAQ,EAAE,gBAAgB,GAAI,IAC5D,CACP,IACI,CACR,CAAA;AACH,CAAC,CAAA;AAMD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,QAAQ,EAAqB,EAAE,EAAE;IAC9D,OAAO,QAAQ,KAAK,aAAa,CAAC,CAAC,CAAC,CAClC,KAAC,WAAW,wBAAkB,EAAE,EAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,mBAAmB,CAAC,GAAI,CAC5F,CAAC,CAAC,CAAC,CACF,gBAAM,SAAS,EAAE,CAAC,CAAC,YAAY,iBAAc,MAAM,aACjD,KAAC,QAAQ,wBAAkB,EAAE,EAAC,SAAS,EAAE,CAAC,CAAC,aAAa,GAAI,EAC5D,kCAAsB,EAAE,EAAC,SAAS,EAAE,CAAC,CAAC,mBAAmB,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,iBAAa,MAAM,YAClI,eACE,CAAC,EAAC,0nBAA0nB,EAC5nB,IAAI,EAAC,cAAc,EACnB,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,GAClB,GACE,IACD,CACR,CAAA;AACH,CAAC,CAAA","sourcesContent":["\"use client\"\n\nimport clsx from \"clsx\"\nimport { useRef, type ReactNode } from \"react\"\nimport { mergeRefs } from \"react-merge-refs\"\nimport { handlePressableMouseEnter } from \"../../lib/helpers\"\nimport { isHoverPointer } from \"../../lib/inputMode\"\nimport { isNestedSelectControl } from \"../../lib/selectPress\"\nimport type { ControlSize, Variants } from \"../../types\"\nimport { Button } from \"../Button\"\nimport { ChevronDown, Dropdown, X } from \"../Icon\"\nimport { LoadingIndicator } from \"../Indicator\"\nimport s from \"@plexui/styles/components/SelectControl/SelectControl.module.css\"\n\nexport type DropdownIconType = \"chevronDown\" | \"dropdown\" | \"none\"\n\nexport type SelectControlProps = Omit<React.HTMLAttributes<HTMLSpanElement>, \"onClick\"> & {\n /**\n * Style variant for the Button\n * @default fill\n */\n variant?: Variants<\"soft\" | \"outline\" | \"ghost\">\n /**\n * Determines if the control should be a fully rounded pill shape\n * @default false\n */\n pill?: boolean\n /**\n * Extends the control to 100% of available width.\n * @default true\n */\n block?: boolean\n /**\n * Applies a negative margin using the current gutter to optically align the control\n * with surrounding content.\n */\n opticallyAlign?: \"start\" | \"end\"\n /**\n * Disables the control visually and from interactions\n * @default false\n */\n disabled?: boolean\n /**\n * Visually indicates that the control is in an invalid state\n * @default false\n */\n invalid?: boolean\n /**\n * Indicates that the control is selected. An unselected state will display placeholder styles.\n * @default false\n */\n selected?: boolean\n /**\n * Display a clear action that allows the select to be unset.\n * @default false\n */\n onClearClick?: () => void\n /**\n * Primary handler for when the control is selected with pointer or keyboard events\n */\n onInteract?: () => void\n /**\n * Enter interacts too, as on a combobox button. Off by default, as Enter\n * may be an attempt to submit a form.\n * @default false\n */\n interactOnEnter?: boolean\n /**\n * Determines size of the size and spacing of the control.\n *\n * | 3xs | 2xs | xs | sm | md | lg | xl | 2xl | 3xl |\n * | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- |\n * | `22px` | `24px` | `26px` | `28px` | `32px` | `36px` | `40px` | `44px` | `48px` |\n * @default md\n */\n size?: ControlSize\n /**\n * Displays loading indicator on top of button contents\n * @default false\n */\n loading?: boolean\n /**\n * Icon displayed in the far right of the select trigger\n * @default dropdown\n */\n dropdownIconType?: DropdownIconType\n /** Icon displayed at the start of the control */\n StartIcon?: React.ComponentType<React.SVGProps<SVGSVGElement>>\n /** Custom class applied to the control element */\n className?: string\n /** Content rendered for the control */\n children: ReactNode\n ref?: React.Ref<HTMLSpanElement | null>\n}\n\nexport const SelectControl = ({\n ref,\n onPointerDown,\n onPointerCancel,\n onKeyDown,\n onPointerEnter,\n onInteract,\n interactOnEnter = false,\n invalid,\n disabled,\n children,\n className,\n variant = \"outline\",\n size = \"md\",\n block,\n opticallyAlign,\n pill = false,\n loading,\n onClearClick,\n selected = false,\n StartIcon,\n dropdownIconType = \"dropdown\",\n ...restProps\n}: SelectControlProps) => {\n const controlRef = useRef<HTMLSpanElement>(null)\n const mouseClickHandled = useRef(false)\n // Popover/Menu clone their private click handler into the trigger.\n const triggerProps: React.HTMLAttributes<HTMLSpanElement> = restProps\n const clearable = !!onClearClick\n const showClearAction = clearable && selected && !loading && !disabled\n const hasDropdownIcon = dropdownIconType && dropdownIconType !== \"none\" && !loading\n const hasAnyTertiaryIndicator = showClearAction || loading || hasDropdownIcon\n const isInteractive = !loading && !disabled\n\n // Act like a <button> and fire the click handler on keyboard actions\n const handleKeyDown = (evt: React.KeyboardEvent<HTMLSpanElement>) => {\n // Enter and Space on a nested control (the clear button) activate that\n // control: neither this handler nor a wrapping trigger's may take them\n if (evt.target !== evt.currentTarget && (evt.key === \" \" || evt.key === \"Enter\")) {\n return\n }\n onKeyDown?.(evt)\n if (evt.defaultPrevented || evt.nativeEvent.isComposing || evt.keyCode === 229) return\n switch (evt.key) {\n case \"Enter\":\n case \"ArrowDown\":\n case \"ArrowUp\":\n case \" \":\n // NOTE: \"Enter\" may be an attempt to submit a form\n if (evt.key === \"Enter\" && !interactOnEnter) {\n break\n }\n\n evt.stopPropagation()\n evt.preventDefault()\n\n controlRef.current?.click()\n break\n default:\n break\n }\n }\n\n const handlePointerDown = (evt: React.PointerEvent<HTMLSpanElement>) => {\n mouseClickHandled.current = false\n if (isNestedSelectControl(evt)) return\n onPointerDown?.(evt)\n if (evt.defaultPrevented) {\n mouseClickHandled.current = true\n return\n }\n if (evt.button !== 0) return\n // A touch may become a scroll. Wait for its click, which the browser cancels\n // when scrolling; desktop mouse keeps press-drag-select.\n if (evt.pointerType === \"pen\" || !isHoverPointer(evt)) return\n evt.stopPropagation()\n mouseClickHandled.current = true\n if (onInteract) {\n evt.preventDefault()\n onInteract()\n } else {\n triggerProps.onClick?.(evt)\n }\n }\n\n const handleClick = (evt: React.MouseEvent<HTMLSpanElement>) => {\n const handled = mouseClickHandled.current\n mouseClickHandled.current = false\n if (!isInteractive || evt.defaultPrevented || evt.button !== 0 || isNestedSelectControl(evt)) return\n if (handled && evt.detail !== 0) return\n evt.stopPropagation()\n if (onInteract) onInteract()\n else triggerProps.onClick?.(evt)\n }\n\n return (\n // Intentionally not using <button> and rebuilding the semantics\n <span\n ref={mergeRefs([controlRef, ref])}\n className={clsx(s.SelectControl, className)}\n // Recreate <button> semantics\n role=\"button\"\n tabIndex={disabled ? -1 : 0}\n onPointerEnter={(evt: React.PointerEvent<HTMLAnchorElement>) => {\n handlePressableMouseEnter(evt)\n onPointerEnter?.(evt)\n }}\n onPointerDown={isInteractive ? handlePointerDown : undefined}\n onKeyDown={isInteractive ? handleKeyDown : undefined}\n data-variant={variant}\n data-block={block ? \"\" : undefined}\n data-pill={pill ? \"\" : undefined}\n data-size={size}\n data-optically-align={opticallyAlign}\n aria-busy={loading ? \"true\" : undefined}\n data-selected={selected}\n data-loading={loading ? \"\" : undefined}\n data-invalid={invalid ? \"\" : undefined}\n data-disabled={disabled ? \"\" : undefined}\n aria-disabled={disabled}\n {...restProps}\n onClick={handleClick}\n onPointerCancel={(evt) => {\n mouseClickHandled.current = false\n onPointerCancel?.(evt)\n }}\n >\n {StartIcon && <StartIcon className={s.StartIcon} />}\n <span className={s.TriggerText}>{children}</span>\n {hasAnyTertiaryIndicator && (\n <div className={s.IndicatorWrapper}>\n {showClearAction && (\n <Button\n aria-label=\"Clear current value\"\n className={s.Clear}\n onPointerDown={(evt: React.PointerEvent<HTMLButtonElement>) => {\n // Prevent pointerDown on trigger from being captured\n evt.stopPropagation()\n }}\n onClick={(evt) => {\n evt.stopPropagation()\n evt.preventDefault()\n if (disabled || loading) return\n // The clear button disappears when the value becomes empty.\n controlRef.current?.focus({ preventScroll: true })\n onClearClick()\n }}\n color=\"secondary\"\n variant={hasDropdownIcon ? \"ghost\" : \"solid\"}\n // Mostly custom sizing through variables\n size=\"3xs\"\n uniform\n pill={pill}\n data-only-child={!hasDropdownIcon ? \"\" : undefined}\n >\n <X />\n </Button>\n )}\n {loading && <LoadingIndicator className={s.LoadingIndicator} />}\n {/* Using raw SVG canvases (opposed to fixed icon canvases) led to less pixelation. */}\n {hasDropdownIcon && <DropdownIcon iconType={dropdownIconType} />}\n </div>\n )}\n </span>\n )\n}\n\ntype DropdownIconProps = {\n iconType: Exclude<DropdownIconType, \"none\">\n}\n\nexport const DropdownIcon = ({ iconType }: DropdownIconProps) => {\n return iconType === \"chevronDown\" ? (\n <ChevronDown data-no-autosize=\"\" className={clsx(s.DropdownIcon, s.DropdownIconChevron)} />\n ) : (\n <span className={s.DropdownIcon} aria-hidden=\"true\">\n <Dropdown data-no-autosize=\"\" className={s.DropdownGlyph} />\n <svg data-no-autosize=\"\" className={s.MobileDropdownGlyph} width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" aria-hidden=\"true\">\n <path\n d=\"M9.41074 2.74408C9.73618 2.41864 10.2638 2.41864 10.5893 2.74408L14.7559 6.91074C15.0814 7.23618 15.0814 7.76382 14.7559 8.08926C14.4305 8.41469 13.9028 8.41469 13.5774 8.08926L10 4.51184L6.42259 8.08926C6.09715 8.41469 5.56951 8.41469 5.24408 8.08926C4.91864 7.76382 4.91864 7.23618 5.24408 6.91074L9.41074 2.74408ZM5.24408 11.9107C5.56951 11.5853 6.09715 11.5853 6.42259 11.9107L10 15.4882L13.5774 11.9107C13.9028 11.5853 14.4305 11.5853 14.7559 11.9107C15.0814 12.2362 15.0814 12.7638 14.7559 13.0893L10.5893 17.2559C10.2638 17.5814 9.73618 17.5814 9.41074 17.2559L5.24408 13.0893C4.91864 12.7638 4.91864 12.2362 5.24408 11.9107Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n </span>\n )\n}\n"]}
1
+ {"version":3,"file":"SelectControl.js","sourceRoot":"","sources":["../../../../src/components/SelectControl/SelectControl.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,MAAM,EAAkB,MAAM,OAAO,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,CAAC,MAAM,kEAAkE,CAAA;AAmFhF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,GAAG,EACH,aAAa,EACb,eAAe,EACf,SAAS,EACT,cAAc,EACd,UAAU,EACV,eAAe,GAAG,KAAK,EACvB,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,IAAI,EACX,KAAK,EACL,cAAc,EACd,IAAI,GAAG,KAAK,EACZ,OAAO,EACP,YAAY,EACZ,QAAQ,GAAG,KAAK,EAChB,SAAS,EACT,gBAAgB,GAAG,UAAU,EAC7B,GAAG,SAAS,EACO,EAAE,EAAE;IACvB,MAAM,UAAU,GAAG,MAAM,CAAkB,IAAI,CAAC,CAAA;IAChD,MAAM,iBAAiB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IACvC,mEAAmE;IACnE,MAAM,YAAY,GAA0C,SAAS,CAAA;IACrE,MA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AkB,EAAE,EAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,mBAAmB,CAAC,GAAI,CAC5F,CAAC,CAAC,CAAC,CACF,gBAAM,SAAS,EAAE,CAAC,CAAC,YAAY,iBAAc,MAAM,aACjD,KAAC,QAAQ,wBAAkB,EAAE,EAAC,SAAS,EAAE,CAAC,CAAC,aAAa,GAAI,EAC5D,kCAAsB,EAAE,EAAC,SAAS,EAAE,CAAC,CAAC,mBAAmB,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,iBAAa,MAAM,YAClI,eACE,CAAC,EAAC,0nBAA0nB,EAC5nB,IAAI,EAAC,cAAc,EACnB,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,GAClB,GACE,IACD,CACR,CAAA;AACH,CAAC,CAAA","sourcesContent":["\"use client\"\n\nimport clsx from \"clsx\"\nimport { useRef, type ReactNode } from \"react\"\nimport { mergeRefs } from \"react-merge-refs\"\nimport { handlePressableMouseEnter } from \"../../lib/helpers\"\nimport { isHoverPointer } from \"../../lib/inputMode\"\nimport { isNestedSelectControl } from \"../../lib/selectPress\"\nimport type { ControlSize, Variants } from \"../../types\"\nimport { Button } from \"../Button\"\nimport { ChevronDown, Dropdown, X } from \"../Icon\"\nimport { LoadingIndicator } from \"../Indicator\"\nimport s from \"@plexui/styles/components/SelectControl/SelectControl.module.css\"\n\nexport type DropdownIconType = \"chevronDown\" | \"dropdown\" | \"none\"\n\nexport type SelectControlProps = Omit<React.HTMLAttributes<HTMLSpanElement>, \"onClick\"> & {\n /**\n * Style variant for the Button\n * @default fill\n */\n variant?: Variants<\"soft\" | \"outline\" | \"ghost\">\n /**\n * Determines if the control should be a fully rounded pill shape\n * @default false\n */\n pill?: boolean\n /**\n * Extends the control to 100% of available width.\n * @default true\n */\n block?: boolean\n /**\n * Applies a negative margin using the current gutter to optically align the control\n * with surrounding content.\n */\n opticallyAlign?: \"start\" | \"end\"\n /**\n * Disables the control visually and from interactions\n * @default false\n */\n disabled?: boolean\n /**\n * Visually indicates that the control is in an invalid state\n * @default false\n */\n invalid?: boolean\n /**\n * Indicates that the control is selected. An unselected state will display placeholder styles.\n * @default false\n */\n selected?: boolean\n /**\n * Display a clear action that allows the select to be unset.\n * @default false\n */\n onClearClick?: () => void\n /**\n * Primary handler for when the control is selected with pointer or keyboard events\n */\n onInteract?: () => void\n /**\n * Enter interacts too, as on a combobox button. Off by default, as Enter\n * may be an attempt to submit a form.\n * @default false\n */\n interactOnEnter?: boolean\n /**\n * Determines size of the size and spacing of the control.\n *\n * | 3xs | 2xs | xs | sm | md | lg | xl | 2xl | 3xl |\n * | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- |\n * | `22px` | `24px` | `26px` | `28px` | `32px` | `36px` | `40px` | `44px` | `48px` |\n * @default md\n */\n size?: ControlSize\n /**\n * Displays loading indicator on top of button contents\n * @default false\n */\n loading?: boolean\n /**\n * Icon displayed in the far right of the select trigger\n * @default dropdown\n */\n dropdownIconType?: DropdownIconType\n /** Icon displayed at the start of the control */\n StartIcon?: React.ComponentType<React.SVGProps<SVGSVGElement>>\n /** Custom class applied to the control element */\n className?: string\n /** Content rendered for the control */\n children: ReactNode\n ref?: React.Ref<HTMLSpanElement | null>\n}\n\nexport const SelectControl = ({\n ref,\n onPointerDown,\n onPointerCancel,\n onKeyDown,\n onPointerEnter,\n onInteract,\n interactOnEnter = false,\n invalid,\n disabled,\n children,\n className,\n variant = \"outline\",\n size = \"md\",\n block,\n opticallyAlign,\n pill = false,\n loading,\n onClearClick,\n selected = false,\n StartIcon,\n dropdownIconType = \"dropdown\",\n ...restProps\n}: SelectControlProps) => {\n const controlRef = useRef<HTMLSpanElement>(null)\n const mouseClickHandled = useRef(false)\n // Popover/Menu clone their private click handler into the trigger.\n const triggerProps: React.HTMLAttributes<HTMLSpanElement> = restProps\n const clearable = !!onClearClick\n const showClearAction = clearable && selected && !loading && !disabled\n const hasDropdownIcon = dropdownIconType && dropdownIconType !== \"none\" && !loading\n const hasAnyTertiaryIndicator = showClearAction || loading || hasDropdownIcon\n const isInteractive = !loading && !disabled\n\n // Act like a <button> and fire the click handler on keyboard actions\n const handleKeyDown = (evt: React.KeyboardEvent<HTMLSpanElement>) => {\n // Enter and Space on a nested control (the clear button) activate that\n // control: neither this handler nor a wrapping trigger's may take them\n if (evt.target !== evt.currentTarget && (evt.key === \" \" || evt.key === \"Enter\")) {\n return\n }\n onKeyDown?.(evt)\n if (evt.defaultPrevented || evt.nativeEvent.isComposing || evt.keyCode === 229) return\n switch (evt.key) {\n case \"Enter\":\n case \"ArrowDown\":\n case \"ArrowUp\":\n case \" \":\n // NOTE: \"Enter\" may be an attempt to submit a form\n if (evt.key === \"Enter\" && !interactOnEnter) {\n break\n }\n\n evt.stopPropagation()\n evt.preventDefault()\n\n controlRef.current?.click()\n break\n default:\n break\n }\n }\n\n const handlePointerDown = (evt: React.PointerEvent<HTMLSpanElement>) => {\n mouseClickHandled.current = false\n if (isNestedSelectControl(evt)) return\n onPointerDown?.(evt)\n if (evt.defaultPrevented) {\n mouseClickHandled.current = true\n return\n }\n if (evt.button !== 0) return\n // A touch may become a scroll. Wait for its click, which the browser cancels\n // when scrolling; desktop mouse keeps press-drag-select.\n if (evt.pointerType === \"pen\" || !isHoverPointer(evt)) return\n evt.stopPropagation()\n mouseClickHandled.current = true\n if (onInteract) {\n evt.preventDefault()\n onInteract()\n } else {\n triggerProps.onClick?.(evt)\n }\n }\n\n const handleClick = (evt: React.MouseEvent<HTMLSpanElement>) => {\n const handled = mouseClickHandled.current\n mouseClickHandled.current = false\n if (!isInteractive || evt.defaultPrevented || evt.button !== 0 || isNestedSelectControl(evt)) return\n if (handled && evt.detail !== 0) return\n evt.stopPropagation()\n if (onInteract) onInteract()\n else triggerProps.onClick?.(evt)\n }\n\n return (\n // Intentionally not using <button> and rebuilding the semantics\n <span\n ref={mergeRefs([controlRef, ref])}\n className={clsx(s.SelectControl, className)}\n // Recreate <button> semantics\n role=\"button\"\n data-slot=\"select-control\"\n tabIndex={disabled ? -1 : 0}\n onPointerEnter={(evt: React.PointerEvent<HTMLAnchorElement>) => {\n handlePressableMouseEnter(evt)\n onPointerEnter?.(evt)\n }}\n onPointerDown={isInteractive ? handlePointerDown : undefined}\n onKeyDown={isInteractive ? handleKeyDown : undefined}\n data-variant={variant}\n data-block={block ? \"\" : undefined}\n data-pill={pill ? \"\" : undefined}\n data-size={size}\n data-optically-align={opticallyAlign}\n aria-busy={loading ? \"true\" : undefined}\n data-selected={selected}\n data-loading={loading ? \"\" : undefined}\n data-invalid={invalid ? \"\" : undefined}\n data-disabled={disabled ? \"\" : undefined}\n aria-disabled={disabled}\n {...restProps}\n onClick={handleClick}\n onPointerCancel={(evt) => {\n mouseClickHandled.current = false\n onPointerCancel?.(evt)\n }}\n >\n {StartIcon && <StartIcon className={s.StartIcon} />}\n <span className={s.TriggerText}>{children}</span>\n {hasAnyTertiaryIndicator && (\n <div className={s.IndicatorWrapper}>\n {showClearAction && (\n <Button\n aria-label=\"Clear current value\"\n className={s.Clear}\n onPointerDown={(evt: React.PointerEvent<HTMLButtonElement>) => {\n // Prevent pointerDown on trigger from being captured\n evt.stopPropagation()\n }}\n onClick={(evt) => {\n evt.stopPropagation()\n evt.preventDefault()\n if (disabled || loading) return\n // The clear button disappears when the value becomes empty.\n controlRef.current?.focus({ preventScroll: true })\n onClearClick()\n }}\n color=\"secondary\"\n variant={hasDropdownIcon ? \"ghost\" : \"solid\"}\n // Mostly custom sizing through variables\n size=\"3xs\"\n uniform\n pill={pill}\n data-only-child={!hasDropdownIcon ? \"\" : undefined}\n >\n <X />\n </Button>\n )}\n {loading && <LoadingIndicator className={s.LoadingIndicator} />}\n {/* Using raw SVG canvases (opposed to fixed icon canvases) led to less pixelation. */}\n {hasDropdownIcon && <DropdownIcon iconType={dropdownIconType} />}\n </div>\n )}\n </span>\n )\n}\n\ntype DropdownIconProps = {\n iconType: Exclude<DropdownIconType, \"none\">\n}\n\nexport const DropdownIcon = ({ iconType }: DropdownIconProps) => {\n return iconType === \"chevronDown\" ? (\n <ChevronDown data-no-autosize=\"\" className={clsx(s.DropdownIcon, s.DropdownIconChevron)} />\n ) : (\n <span className={s.DropdownIcon} aria-hidden=\"true\">\n <Dropdown data-no-autosize=\"\" className={s.DropdownGlyph} />\n <svg data-no-autosize=\"\" className={s.MobileDropdownGlyph} width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" aria-hidden=\"true\">\n <path\n d=\"M9.41074 2.74408C9.73618 2.41864 10.2638 2.41864 10.5893 2.74408L14.7559 6.91074C15.0814 7.23618 15.0814 7.76382 14.7559 8.08926C14.4305 8.41469 13.9028 8.41469 13.5774 8.08926L10 4.51184L6.42259 8.08926C6.09715 8.41469 5.56951 8.41469 5.24408 8.08926C4.91864 7.76382 4.91864 7.23618 5.24408 6.91074L9.41074 2.74408ZM5.24408 11.9107C5.56951 11.5853 6.09715 11.5853 6.42259 11.9107L10 15.4882L13.5774 11.9107C13.9028 11.5853 14.4305 11.5853 14.7559 11.9107C15.0814 12.2362 15.0814 12.7638 14.7559 13.0893L10.5893 17.2559C10.2638 17.5814 9.73618 17.5814 9.41074 17.2559L5.24408 13.0893C4.91864 12.7638 4.91864 12.2362 5.24408 11.9107Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n </span>\n )\n}\n"]}
@@ -59,16 +59,16 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
59
59
  * - Returns null when collapsible="none"
60
60
  *
61
61
  * SidebarMobileMenuButton
62
- * - Hamburger → X animated icon button for mobile
62
+ * - Mobile menu button: the SidebarMenuMobile icon turns into X
63
63
  *
64
64
  * SidebarInput
65
65
  * - shortcut?: string (keyboard shortcut display)
66
66
  */
67
67
  import clsx from "clsx";
68
68
  import { Slot } from "radix-ui";
69
- import { cloneElement, forwardRef, isValidElement, useCallback, useLayoutEffect, useState, } from "react";
69
+ import { cloneElement, createContext, forwardRef, isValidElement, useCallback, useContext, useLayoutEffect, useState, } from "react";
70
70
  import { Button } from "../Button/index.js";
71
- import { ChevronRightMd, Search as SearchIcon, Sidebar as SidebarIcon, X } from "../Icon/index.js";
71
+ import { ChevronRightMd, Disclosure, Search as SearchIcon, Sidebar as SidebarIcon, SidebarMenuMobile, X } from "../Icon/index.js";
72
72
  import { Input } from "../Input/index.js";
73
73
  import { Tooltip } from "../Tooltip/index.js";
74
74
  import s from "@plexui/styles/components/Sidebar/Sidebar.module.css";
@@ -80,6 +80,10 @@ const cleanProps = (props) => {
80
80
  };
81
81
  // Re-export provider and hook
82
82
  export { SidebarProvider, useSidebar };
83
+ // Rows inside the mobile drawer end with a disclosure chevron (see the drawer list in the styles).
84
+ const SidebarDrawerContext = createContext(false);
85
+ /** The chevron of a drawer row that leads to another page. */
86
+ const MenuDisclosure = () => (_jsx("span", { className: s.MenuDisclosure, "aria-hidden": "true", children: _jsx(Disclosure, {}) }));
83
87
  export const Sidebar = forwardRef(({ side = "left", variant = "sidebar", className, children, ...props }, ref) => {
84
88
  const { collapsible, isMobile } = useSidebar();
85
89
  // Skip rendering sidebar on mobile for offcanvas mode
@@ -146,12 +150,14 @@ SidebarMenuItem.displayName = "SidebarMenuItem";
146
150
  let railLeftAt = 0;
147
151
  export const SidebarMenuButton = forwardRef(({ isActive = false, tooltip, asChild = false, className, children, onPointerEnter, onPointerLeave, ...props }, ref) => {
148
152
  const { state, isMobile } = useSidebar();
153
+ const inDrawer = useContext(SidebarDrawerContext);
149
154
  const [openDelay, setOpenDelay] = useState();
150
155
  const Comp = asChild ? Slot.Root : "button";
156
+ const disclosure = inDrawer ? _jsx(MenuDisclosure, {}) : null;
151
157
  // With asChild the child element is the button, so the inner wrapper
152
158
  // goes inside it. Wrapping the child instead would make Slot merge the
153
159
  // button props onto the wrapper span.
154
- const content = asChild && isValidElement(children) ? (cloneElement(children, undefined, _jsx("span", { className: s.MenuButtonInner, children: children.props.children }))) : (_jsx("span", { className: s.MenuButtonInner, children: children }));
160
+ const content = asChild && isValidElement(children) ? (cloneElement(children, undefined, _jsxs("span", { className: s.MenuButtonInner, children: [children.props.children, disclosure] }))) : (_jsxs("span", { className: s.MenuButtonInner, children: [children, disclosure] }));
155
161
  const button = (_jsx(Comp, { ref: ref, "data-active": isActive ? "true" : "false", "aria-current": isActive ? "page" : undefined, className: clsx(s.MenuButton, className), onPointerEnter: (event) => {
156
162
  onPointerEnter?.(event);
157
163
  if (tooltip)
@@ -187,9 +193,16 @@ export const SidebarMenuSub = forwardRef(({ open = true, hasIcons = false, class
187
193
  SidebarMenuSub.displayName = "SidebarMenuSub";
188
194
  export const SidebarMenuSubItem = forwardRef(({ className, ...props }, ref) => (_jsx("li", { ref: ref, className: clsx(s.MenuSubItem, className), ...cleanProps(props) })));
189
195
  SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
190
- export const SidebarMenuSubButton = forwardRef(({ isActive = false, asChild = false, indent = 0, className, ...props }, ref) => {
196
+ export const SidebarMenuSubButton = forwardRef(({ isActive = false, asChild = false, indent = 0, className, children, ...props }, ref) => {
197
+ const inDrawer = useContext(SidebarDrawerContext);
191
198
  const Comp = asChild ? Slot.Root : "button";
192
- return (_jsx(Comp, { ref: ref, "data-active": isActive ? "true" : "false", "aria-current": isActive ? "page" : undefined, className: clsx(s.MenuSubButton, s[`indent${indent}`], className), ...cleanProps(props) }));
199
+ // In the drawer the disclosure follows the content, inside the child element with asChild
200
+ const content = !inDrawer
201
+ ? children
202
+ : asChild && isValidElement(children)
203
+ ? cloneElement(children, undefined, _jsxs(_Fragment, { children: [children.props.children, _jsx(MenuDisclosure, {})] }))
204
+ : _jsxs(_Fragment, { children: [children, _jsx(MenuDisclosure, {})] });
205
+ return (_jsx(Comp, { ref: ref, "data-active": isActive ? "true" : "false", "aria-current": isActive ? "page" : undefined, className: clsx(s.MenuSubButton, s[`indent${indent}`], className), ...cleanProps(props), children: content }));
193
206
  });
194
207
  SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
195
208
  export const SidebarSeparator = forwardRef(({ className, ...props }, ref) => (_jsx("hr", { ref: ref, className: clsx(s.Separator, className), ...cleanProps(props) })));
@@ -233,12 +246,12 @@ export const SidebarMobileMenuButton = forwardRef(({ className, onClick, ...prop
233
246
  onClick?.(event);
234
247
  if (!event.defaultPrevented)
235
248
  setOpenMobile(!openMobile);
236
- }, "aria-label": openMobile ? "Close menu" : "Open menu", ...cleanProps(props), children: _jsxs("span", { className: s.MobileMenuIcon, children: [_jsx("span", { className: s.MobileMenuLine, "data-top": true }), _jsx("span", { className: s.MobileMenuMiddle, children: _jsx("span", { className: s.MobileMenuLine, "data-bottom": true }) })] }) }));
249
+ }, "aria-label": openMobile ? "Close menu" : "Open menu", ...cleanProps(props), children: _jsxs("span", { className: s.MobileMenuIcon, children: [_jsx(SidebarMenuMobile, { className: s.MobileMenuGlyph, "data-glyph": "menu" }), _jsx(X, { className: s.MobileMenuGlyph, "data-glyph": "close" })] }) }));
237
250
  });
238
251
  SidebarMobileMenuButton.displayName = "SidebarMobileMenuButton";
239
252
  export const SidebarMobile = forwardRef(({ className, children, contained, ...props }, ref) => {
240
253
  const { setOpenMobile } = useSidebar();
241
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: clsx(s.MobileBackdrop, contained && s.contained), onClick: () => setOpenMobile(false), "aria-hidden": "true" }), _jsx("div", { ref: ref, className: clsx(s.MobileSidebar, contained && s.contained, className), ...cleanProps(props), children: children })] }));
254
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: clsx(s.MobileBackdrop, contained && s.contained), onClick: () => setOpenMobile(false), "aria-hidden": "true" }), _jsx("div", { ref: ref, className: clsx(s.MobileSidebar, contained && s.contained, className), ...cleanProps(props), children: _jsx(SidebarDrawerContext.Provider, { value: true, children: children }) })] }));
242
255
  });
243
256
  SidebarMobile.displayName = "SidebarMobile";
244
257
  export const SidebarMobileHeader = forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: clsx(s.MobileHeader, className), ...cleanProps(props) })));
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.js","sourceRoot":"","sources":["../../../../src/components/Sidebar/Sidebar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC/B,OAAO,EACL,YAAY,EACZ,UAAU,EACV,cAAc,EACd,WAAW,EACX,eAAe,EACf,QAAQ,GAIT,MAAM,OAAO,CAAA;AAEd,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,IAAI,UAAU,EAAE,OAAO,IAAI,WAAW,EAAE,CAAC,EAAE,MAAM,SAAS,CAAA;AACzF,OAAO,EAAE,KAAK,EAAmB,MAAM,UAAU,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,CAAC,MAAM,sDAAsD,CAAA;AACpE,OAAO,EACL,eAAe,EACf,UAAU,GAKX,MAAM,qBAAqB,CAAA;AAE5B,wFAAwF;AACxF,MAAM,UAAU,GAAG,CAAmB,KAAQ,EAA0B,EAAE;IACxE,MAAM,EAAE,aAAa,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,KAAwC,CAAA;IAC9E,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,8BAA8B;AAC9B,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,CAAA;AAoBtC,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAC/B,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,OAAO,GAAG,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,K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AAC,KAAK,CAAC,GAAI,CACrF,CACF,CAAA;AACD,mBAAmB,CAAC,WAAW,GAAG,qBAAqB,CAAA;AAIvD,MAAM,CAAC,MAAM,mBAAmB,GAAG,UAAU,CAC3C,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,YAAY,EAAE,SAAS,CAAC,KAAM,UAAU,CAAC,KAAK,CAAC,GAAI,CACrF,CACF,CAAA;AACD,mBAAmB,CAAC,WAAW,GAAG,qBAAqB,CAAA;AAQvD,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CACpC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cAAK,SAAS,EAAE,CAAC,CAAC,KAAK,YACrB,KAAC,KAAK,IACJ,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,KAAC,UAAU,KAAG,KAC1B,UAAU,CAAC,KAAK,CAAC,GACrB,GACE,CACP,CACF,CAAA;AACD,YAAY,CAAC,WAAW,GAAG,cAAc,CAAA;AAQzC,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAC1C,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,SAAS,CAAC,KAAM,UAAU,CAAC,KAAK,CAAC,GAAI,CACpF,CACF,CAAA;AACD,kBAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAA","sourcesContent":["\"use client\"\n\n/**\n * Sidebar Component - Composable navigation sidebar\n *\n * API SPECIFICATION:\n *\n * SidebarProvider\n * - defaultOpen?: boolean (default: true)\n * - open?: boolean (controlled)\n * - onOpenChange?: (open: boolean) => void\n * - collapsible?: \"offcanvas\" | \"icon\" | \"none\" (default: \"offcanvas\")\n *\n * Sidebar\n * - side?: \"left\" | \"right\" (default: \"left\")\n * - variant?: \"sidebar\" | \"docs\" (default: \"sidebar\")\n *\n * SidebarHeader / SidebarContent / SidebarFooter\n * - Standard container props\n *\n * SidebarGroup\n * - defaultOpen?: boolean (default: true)\n * - open?: boolean (controlled)\n *\n * SidebarGroupLabel / SidebarGroupAction / SidebarGroupContent\n * - Standard container props\n *\n * SidebarMenu / SidebarMenuItem\n * - Standard container props\n *\n * SidebarMenuButton\n * - isActive?: boolean (default: false)\n * - size?: \"sm\" | \"md\" | \"lg\" (default: \"md\")\n * - tooltip?: string | ReactNode\n * - asChild?: boolean\n *\n * SidebarMenuAction / SidebarMenuBadge\n * - Standard container props\n *\n * SidebarMenuSkeleton\n * - showIcon?: boolean (default: true)\n *\n * SidebarMenuSub / SidebarMenuSubItem / SidebarMenuSubButton\n * - Same as parent menu components\n *\n * SidebarSeparator\n * - Standard separator props\n *\n * SidebarCard / SidebarCardHeader / SidebarCardContent / SidebarCardFooter\n * - variant?: \"default\" | \"elevated\"\n * - dismissible?: boolean\n * - onDismiss?: () => void\n *\n * SidebarInset\n * - Standard container for main content area\n *\n * SidebarTrigger\n * - Uses Button component internally\n * - Returns null when collapsible=\"none\"\n *\n * SidebarMobileMenuButton\n * - Hamburger → X animated icon button for mobile\n *\n * SidebarInput\n * - shortcut?: string (keyboard shortcut display)\n */\n\nimport clsx from \"clsx\"\nimport { Slot } from \"radix-ui\"\nimport {\n cloneElement,\n forwardRef,\n isValidElement,\n useCallback,\n useLayoutEffect,\n useState,\n type ComponentProps,\n type PointerEvent,\n type ReactNode,\n} from \"react\"\n\nimport { Button } from \"../Button\"\nimport { ChevronRightMd, Search as SearchIcon, Sidebar as SidebarIcon, X } from \"../Icon\"\nimport { Input, type InputProps } from \"../Input\"\nimport { Tooltip } from \"../Tooltip\"\nimport s from \"@plexui/styles/components/Sidebar/Sidebar.module.css\"\nimport {\n SidebarProvider,\n useSidebar,\n type SidebarCollapsible,\n type SidebarSide,\n type SidebarProviderVariant,\n type SidebarVariant,\n} from \"./useSidebarContext\"\n\n// Helper to filter out props that shouldn't be spread to the DOM (e.g. injected by MDX)\nconst cleanProps = <P extends object>(props: P): Omit<P, \"data-toggle\"> => {\n const { \"data-toggle\": _, ...rest } = props as P & { \"data-toggle\"?: unknown }\n return rest\n}\n\n// Re-export provider and hook\nexport { SidebarProvider, useSidebar }\nexport type { SidebarCollapsible, SidebarProviderVariant, SidebarSide, SidebarVariant }\n\n// =============================================\n// Sidebar Root\n// =============================================\n\nexport type SidebarProps = ComponentProps<\"aside\"> & {\n /**\n * The side the sidebar is on.\n * @default \"left\"\n */\n side?: SidebarSide\n /**\n * The visual variant of the sidebar.\n * @default \"sidebar\"\n */\n variant?: SidebarVariant\n}\n\nexport const Sidebar = forwardRef<HTMLElement, SidebarProps>(\n ({ side = \"left\", variant = \"sidebar\", className, children, ...props }, ref) => {\n const { collapsible, isMobile } = useSidebar()\n\n // Skip rendering sidebar on mobile for offcanvas mode\n if (isMobile && collapsible === \"offcanvas\") {\n return null\n }\n\n return (\n <aside\n ref={ref}\n data-side={side}\n data-variant={variant}\n className={clsx(s.Sidebar, className)}\n {...cleanProps(props)}\n >\n {children}\n </aside>\n )\n },\n)\nSidebar.displayName = \"Sidebar\"\n\n// =============================================\n// Sidebar Sections\n// =============================================\n\nexport type SidebarHeaderProps = ComponentProps<\"div\">\n\nexport const SidebarHeader = forwardRef<HTMLDivElement, SidebarHeaderProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.Header, className)} {...cleanProps(props)} />\n ),\n)\nSidebarHeader.displayName = \"SidebarHeader\"\n\nexport type SidebarContentProps = ComponentProps<\"div\">\n\nexport const SidebarContent = forwardRef<HTMLDivElement, SidebarContentProps>(\n ({ className, ...props }, ref) => {\n const [contentEl, setContentEl] = useState<HTMLDivElement | null>(null)\n const setRef = useCallback(\n (el: HTMLDivElement | null) => {\n setContentEl(el)\n if (typeof ref === \"function\") ref(el)\n else if (ref) (ref as { current: HTMLDivElement | null }).current = el\n },\n [ref],\n )\n\n useLayoutEffect(() => {\n if (!contentEl) return\n const sidebar = contentEl.parentElement\n if (!sidebar) return\n\n const update = () => {\n const hasOverflow = contentEl.scrollHeight > contentEl.clientHeight\n sidebar.setAttribute(\"data-content-scrollable\", hasOverflow ? \"true\" : \"false\")\n }\n update()\n const ro = new ResizeObserver(update)\n ro.observe(contentEl)\n return () => ro.disconnect()\n }, [contentEl])\n\n return <div ref={setRef} className={clsx(s.Content, className)} {...cleanProps(props)} />\n },\n)\nSidebarContent.displayName = \"SidebarContent\"\n\nexport type SidebarFooterProps = ComponentProps<\"div\">\n\nexport const SidebarFooter = forwardRef<HTMLDivElement, SidebarFooterProps>(\n ({ className, children, ...props }, ref) => (\n <div ref={ref} className={clsx(s.Footer, className)} {...cleanProps(props)}>\n <div className={s.FooterSeparator} />\n {children}\n </div>\n ),\n)\nSidebarFooter.displayName = \"SidebarFooter\"\n\nexport type SidebarRailProps = ComponentProps<\"div\">\n\nexport const SidebarRail = forwardRef<HTMLDivElement, SidebarRailProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.Rail, className)} {...cleanProps(props)} />\n ),\n)\nSidebarRail.displayName = \"SidebarRail\"\n\n// =============================================\n// Groups\n// =============================================\n\nexport type SidebarGroupProps = ComponentProps<\"div\"> & {\n /**\n * Whether the group is open initially. A closed group hides its `SidebarGroupContent`.\n * @default true\n */\n defaultOpen?: boolean\n /**\n * Controlled open state. The group has no toggle of its own: change `open` from your own control.\n */\n open?: boolean\n}\n\nexport const SidebarGroup = forwardRef<HTMLDivElement, SidebarGroupProps>(\n ({ defaultOpen = true, open: openProp, className, ...props }, ref) => {\n // The initial value only, like an uncontrolled input's defaultValue\n const [initialOpen] = useState(defaultOpen)\n const open = openProp ?? initialOpen\n\n return (\n <div\n ref={ref}\n data-state={open ? \"open\" : \"closed\"}\n className={clsx(s.Group, className)}\n {...cleanProps(props)}\n />\n )\n },\n)\nSidebarGroup.displayName = \"SidebarGroup\"\n\nexport type SidebarGroupLabelProps = ComponentProps<\"span\"> & {\n asChild?: boolean\n /**\n * Size variant for the label.\n * - \"sm\": Compact style for dashboard/settings sidebars\n * - \"lg\": Documentation style with larger text and more spacing\n * @default \"lg\"\n */\n size?: \"sm\" | \"lg\"\n}\n\nexport const SidebarGroupLabel = forwardRef<HTMLSpanElement, SidebarGroupLabelProps>(\n ({ asChild = false, size = \"lg\", className, ...props }, ref) => {\n const Comp = asChild ? Slot.Root : \"span\"\n return (\n <Comp\n ref={ref}\n data-size={size}\n className={clsx(s.GroupLabel, className)}\n {...cleanProps(props)}\n />\n )\n },\n)\nSidebarGroupLabel.displayName = \"SidebarGroupLabel\"\n\nexport type SidebarGroupActionProps = ComponentProps<\"div\">\n\nexport const SidebarGroupAction = forwardRef<HTMLDivElement, SidebarGroupActionProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.GroupAction, className)} {...cleanProps(props)} />\n ),\n)\nSidebarGroupAction.displayName = \"SidebarGroupAction\"\n\nexport type SidebarGroupContentProps = ComponentProps<\"div\">\n\nexport const SidebarGroupContent = forwardRef<HTMLDivElement, SidebarGroupContentProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.GroupContent, className)} {...cleanProps(props)} />\n ),\n)\nSidebarGroupContent.displayName = \"SidebarGroupContent\"\n\n// =============================================\n// Menu\n// =============================================\n\nexport type SidebarMenuProps = ComponentProps<\"ul\">\n\nexport const SidebarMenu = forwardRef<HTMLUListElement, SidebarMenuProps>(\n ({ className, ...props }, ref) => (\n <ul ref={ref} className={clsx(s.Menu, className)} {...cleanProps(props)} />\n ),\n)\nSidebarMenu.displayName = \"SidebarMenu\"\n\nexport type SidebarMenuItemProps = ComponentProps<\"li\"> & {\n expanded?: boolean\n}\n\nexport const SidebarMenuItem = forwardRef<HTMLLIElement, SidebarMenuItemProps>(\n ({ expanded, className, ...props }, ref) => (\n <li\n ref={ref}\n data-expanded={expanded ? \"true\" : undefined}\n className={clsx(s.MenuItem, className)}\n {...cleanProps(props)}\n />\n ),\n)\nSidebarMenuItem.displayName = \"SidebarMenuItem\"\n\n// =============================================\n// Menu Button\n// =============================================\n\nexport type SidebarMenuButtonProps = ComponentProps<\"button\"> & {\n /**\n * Whether the button is in an active/highlighted state.\n * @default false\n */\n isActive?: boolean\n /**\n * Optional tooltip to show when the sidebar is collapsed.\n */\n tooltip?: string | ReactNode\n /**\n * Whether to render the button as a custom element via Slot.\n * @default false\n */\n asChild?: boolean\n}\n\n// Shared by every row of the rail: moving to the next one shows its label at once.\nlet railLeftAt = 0\n\nexport const SidebarMenuButton = forwardRef<HTMLButtonElement, SidebarMenuButtonProps>(\n ({ isActive = false, tooltip, asChild = false, className, children, onPointerEnter, onPointerLeave, ...props }, ref) => {\n const { state, isMobile } = useSidebar()\n const [openDelay, setOpenDelay] = useState<number>()\n const Comp = asChild ? Slot.Root : \"button\"\n // With asChild the child element is the button, so the inner wrapper\n // goes inside it. Wrapping the child instead would make Slot merge the\n // button props onto the wrapper span.\n const content =\n asChild && isValidElement<{ children?: ReactNode }>(children) ? (\n cloneElement(\n children,\n undefined,\n <span className={s.MenuButtonInner}>{children.props.children}</span>,\n )\n ) : (\n <span className={s.MenuButtonInner}>{children}</span>\n )\n\n const button = (\n <Comp\n ref={ref}\n data-active={isActive ? \"true\" : \"false\"}\n aria-current={isActive ? \"page\" : undefined}\n className={clsx(s.MenuButton, className)}\n onPointerEnter={(event: PointerEvent<HTMLButtonElement>) => {\n onPointerEnter?.(event)\n if (tooltip) setOpenDelay(Date.now() - railLeftAt < 300 ? 0 : undefined)\n }}\n onPointerLeave={(event: PointerEvent<HTMLButtonElement>) => {\n onPointerLeave?.(event)\n if (tooltip) railLeftAt = Date.now()\n }}\n {...cleanProps(props)}\n >\n {content}\n </Comp>\n )\n\n // The tooltip shows when collapsed (icon mode) and not on mobile. It wraps\n // the row in every state, so the row stays mounted and its label can fade.\n if (tooltip) {\n return (\n <Tooltip content={state === \"collapsed\" && !isMobile ? tooltip : null} openDelay={openDelay} side=\"right\">\n {button}\n </Tooltip>\n )\n }\n\n return button\n },\n)\nSidebarMenuButton.displayName = \"SidebarMenuButton\"\n\n// =============================================\n// Menu Button Parts\n// =============================================\n\nexport type SidebarMenuButtonIconProps = ComponentProps<\"span\">\n\nexport const SidebarMenuButtonIcon = forwardRef<HTMLSpanElement, SidebarMenuButtonIconProps>(\n ({ className, ...props }, ref) => (\n <span ref={ref} className={clsx(s.MenuButtonIcon, className)} {...cleanProps(props)} />\n ),\n)\nSidebarMenuButtonIcon.displayName = \"SidebarMenuButtonIcon\"\n\nexport type SidebarMenuButtonLabelProps = ComponentProps<\"span\"> & {\n shortLabel?: string\n}\n\nexport const SidebarMenuButtonLabel = forwardRef<HTMLSpanElement, SidebarMenuButtonLabelProps>(\n ({ shortLabel, className, children, ...props }, ref) => (\n <>\n <span\n ref={ref}\n data-long-label=\"true\"\n className={clsx(s.MenuButtonLabel, className)}\n {...cleanProps(props)}\n >\n {children}\n </span>\n {shortLabel && (\n <span data-short-label=\"true\" className={clsx(s.MenuButtonLabel, className)}>\n {shortLabel}\n </span>\n )}\n </>\n ),\n)\nSidebarMenuButtonLabel.displayName = \"SidebarMenuButtonLabel\"\n\n// =============================================\n// Menu Chevron (Expand/Collapse Toggle)\n// =============================================\n\nexport type SidebarMenuChevronProps = ComponentProps<\"span\">\n\nexport const SidebarMenuChevron = forwardRef<HTMLSpanElement, SidebarMenuChevronProps>(\n ({ className, ...props }, ref) => (\n <span ref={ref} className={clsx(s.MenuChevron, className)} {...cleanProps(props)}>\n <ChevronRightMd />\n </span>\n ),\n)\nSidebarMenuChevron.displayName = \"SidebarMenuChevron\"\n\n// =============================================\n// Menu Badge & Action\n// =============================================\n\nexport type SidebarMenuBadgeProps = ComponentProps<\"span\">\n\nexport const SidebarMenuBadge = forwardRef<HTMLSpanElement, SidebarMenuBadgeProps>(\n ({ className, ...props }, ref) => (\n <span ref={ref} className={clsx(s.MenuBadge, className)} {...cleanProps(props)} />\n ),\n)\nSidebarMenuBadge.displayName = \"SidebarMenuBadge\"\n\nexport type SidebarMenuActionProps = ComponentProps<\"div\">\n\nexport const SidebarMenuAction = forwardRef<HTMLDivElement, SidebarMenuActionProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.MenuAction, className)} {...cleanProps(props)} />\n ),\n)\nSidebarMenuAction.displayName = \"SidebarMenuAction\"\n\n// =============================================\n// Menu Skeleton\n// =============================================\n\nexport type SidebarMenuSkeletonProps = ComponentProps<\"div\"> & {\n showIcon?: boolean\n /** Width of the label skeleton (e.g., \"60%\", \"80%\", \"100px\") */\n labelWidth?: string\n}\n\nexport const SidebarMenuSkeleton = forwardRef<HTMLDivElement, SidebarMenuSkeletonProps>(\n ({ showIcon = true, labelWidth = \"60%\", className, ...props }, ref) => (\n <div\n ref={ref}\n data-skeleton\n className={clsx(s.MenuSkeleton, className)}\n {...cleanProps(props)}\n >\n {showIcon && <div className={s.MenuSkeletonIcon} />}\n <div className={s.MenuSkeletonLabel} style={{ width: labelWidth }} />\n </div>\n ),\n)\nSidebarMenuSkeleton.displayName = \"SidebarMenuSkeleton\"\n\n// =============================================\n// Submenu\n// =============================================\n\nexport type SidebarMenuSubProps = ComponentProps<\"ul\"> & {\n open?: boolean\n /**\n * When true, child items align with parent text that has icons.\n * This adjusts the padding so level 2 text aligns with level 1 text.\n */\n hasIcons?: boolean\n}\n\nexport const SidebarMenuSub = forwardRef<HTMLUListElement, SidebarMenuSubProps>(\n ({ open = true, hasIcons = false, className, ...props }, ref) => (\n <ul\n ref={ref}\n data-state={open ? \"open\" : \"closed\"}\n data-has-icons={hasIcons ? \"true\" : undefined}\n // Collapsed items are only hidden visually: keep them out of the tab order\n inert={open ? undefined : true}\n className={clsx(s.MenuSub, className)}\n {...cleanProps(props)}\n />\n ),\n)\nSidebarMenuSub.displayName = \"SidebarMenuSub\"\n\nexport type SidebarMenuSubItemProps = ComponentProps<\"li\">\n\nexport const SidebarMenuSubItem = forwardRef<HTMLLIElement, SidebarMenuSubItemProps>(\n ({ className, ...props }, ref) => (\n <li ref={ref} className={clsx(s.MenuSubItem, className)} {...cleanProps(props)} />\n ),\n)\nSidebarMenuSubItem.displayName = \"SidebarMenuSubItem\"\n\nexport type SidebarMenuSubButtonProps = ComponentProps<\"button\"> & {\n isActive?: boolean\n asChild?: boolean\n /**\n * Indent level for nested items (0-3).\n * Each level adds 12px of left margin.\n * @default 0\n */\n indent?: 0 | 1 | 2 | 3\n}\n\nexport const SidebarMenuSubButton = forwardRef<HTMLButtonElement, SidebarMenuSubButtonProps>(\n ({ isActive = false, asChild = false, indent = 0, className, ...props }, ref) => {\n const Comp = asChild ? Slot.Root : \"button\"\n return (\n <Comp\n ref={ref}\n data-active={isActive ? \"true\" : \"false\"}\n aria-current={isActive ? \"page\" : undefined}\n className={clsx(s.MenuSubButton, s[`indent${indent}`], className)}\n {...cleanProps(props)}\n />\n )\n },\n)\nSidebarMenuSubButton.displayName = \"SidebarMenuSubButton\"\n\n// =============================================\n// Separator\n// =============================================\n\nexport type SidebarSeparatorProps = ComponentProps<\"hr\">\n\nexport const SidebarSeparator = forwardRef<HTMLHRElement, SidebarSeparatorProps>(\n ({ className, ...props }, ref) => (\n <hr ref={ref} className={clsx(s.Separator, className)} {...cleanProps(props)} />\n ),\n)\nSidebarSeparator.displayName = \"SidebarSeparator\"\n\n// =============================================\n// Card\n// =============================================\n\nexport type SidebarCardProps = ComponentProps<\"div\"> & {\n variant?: \"default\" | \"elevated\"\n dismissible?: boolean\n onDismiss?: () => void\n}\n\nexport const SidebarCard = forwardRef<HTMLDivElement, SidebarCardProps>(\n ({ variant = \"default\", dismissible = false, onDismiss, className, children, ...props }, ref) => (\n <div\n ref={ref}\n data-variant={variant}\n className={clsx(s.Card, className)}\n {...cleanProps(props)}\n >\n {dismissible && (\n <Button\n uniform\n size=\"3xs\"\n variant=\"ghost\"\n color=\"secondary\"\n className={s.CardDismiss}\n onClick={onDismiss}\n aria-label=\"Dismiss\"\n >\n <X />\n </Button>\n )}\n {children}\n </div>\n ),\n)\nSidebarCard.displayName = \"SidebarCard\"\n\nexport type SidebarCardHeaderProps = ComponentProps<\"div\">\n\nexport const SidebarCardHeader = forwardRef<HTMLDivElement, SidebarCardHeaderProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.CardHeader, className)} {...cleanProps(props)} />\n ),\n)\nSidebarCardHeader.displayName = \"SidebarCardHeader\"\n\nexport type SidebarCardTitleProps = ComponentProps<\"div\">\n\nexport const SidebarCardTitle = forwardRef<HTMLDivElement, SidebarCardTitleProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.CardTitle, className)} {...cleanProps(props)} />\n ),\n)\nSidebarCardTitle.displayName = \"SidebarCardTitle\"\n\nexport type SidebarCardTitleLinkProps = ComponentProps<\"a\">\n\nexport const SidebarCardTitleLink = forwardRef<HTMLAnchorElement, SidebarCardTitleLinkProps>(\n ({ className, children, ...props }, ref) => (\n <a ref={ref} className={clsx(s.CardTitleLink, className)} {...cleanProps(props)}>\n {children}\n <ChevronRightMd className={s.CardTitleChevron} />\n </a>\n ),\n)\nSidebarCardTitleLink.displayName = \"SidebarCardTitleLink\"\n\nexport type SidebarCardContentProps = ComponentProps<\"div\">\n\nexport const SidebarCardContent = forwardRef<HTMLDivElement, SidebarCardContentProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.CardContent, className)} {...cleanProps(props)} />\n ),\n)\nSidebarCardContent.displayName = \"SidebarCardContent\"\n\nexport type SidebarCardFooterProps = ComponentProps<\"div\">\n\nexport const SidebarCardFooter = forwardRef<HTMLDivElement, SidebarCardFooterProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.CardFooter, className)} {...cleanProps(props)} />\n ),\n)\nSidebarCardFooter.displayName = \"SidebarCardFooter\"\n\n// =============================================\n// Inset (Main Content Area)\n// =============================================\n\nexport type SidebarInsetProps = ComponentProps<\"main\">\n\nexport const SidebarInset = forwardRef<HTMLElement, SidebarInsetProps>(\n ({ className, ...props }, ref) => (\n <main ref={ref} className={clsx(s.Inset, className)} {...cleanProps(props)} />\n ),\n)\nSidebarInset.displayName = \"SidebarInset\"\n\n// =============================================\n// Layout Container\n// =============================================\n\nexport type SidebarLayoutProps = ComponentProps<\"div\">\n\nexport const SidebarLayout = forwardRef<HTMLDivElement, SidebarLayoutProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.SidebarLayout, className)} {...cleanProps(props)} />\n ),\n)\nSidebarLayout.displayName = \"SidebarLayout\"\n\n// =============================================\n// Trigger (Collapse Button)\n// =============================================\n\nexport type SidebarTriggerProps = ComponentProps<\"button\"> & {\n children?: ReactNode\n}\n\nexport const SidebarTrigger = forwardRef<HTMLButtonElement, SidebarTriggerProps>(\n ({ className, children, onClick, ...props }, ref) => {\n const { state, collapsible, isMobile, toggleSidebar } = useSidebar()\n\n // Don't render if collapsible=\"none\" (text-only sidebars)\n if (collapsible === \"none\") {\n return null\n }\n\n // One icon for both states: the tooltip, not the icon, says what a press does\n const defaultIcon = <SidebarIcon />\n\n return (\n <button\n ref={ref}\n type=\"button\"\n className={clsx(s.Trigger, className)}\n onClick={(event) => {\n // The caller's handler runs first and can cancel the toggle\n onClick?.(event)\n if (!event.defaultPrevented) toggleSidebar()\n }}\n aria-label={\n isMobile ? \"Open menu\" : state === \"expanded\" ? \"Collapse sidebar\" : \"Expand sidebar\"\n }\n {...cleanProps(props)}\n >\n <span className={s.TriggerInner}>\n <span className={s.TriggerIcon}>{children ?? defaultIcon}</span>\n </span>\n </button>\n )\n },\n)\nSidebarTrigger.displayName = \"SidebarTrigger\"\n\n// =============================================\n// Mobile Menu Button (Hamburger → X)\n// =============================================\n\nexport type SidebarMobileMenuButtonProps = ComponentProps<\"button\">\n\nexport const SidebarMobileMenuButton = forwardRef<HTMLButtonElement, SidebarMobileMenuButtonProps>(\n ({ className, onClick, ...props }, ref) => {\n const { openMobile, setOpenMobile } = useSidebar()\n\n return (\n <button\n ref={ref}\n type=\"button\"\n data-expanded={openMobile ? \"\" : undefined}\n className={clsx(s.MobileMenuButton, className)}\n onClick={(event) => {\n // The caller's handler runs first and can cancel the toggle\n onClick?.(event)\n if (!event.defaultPrevented) setOpenMobile(!openMobile)\n }}\n aria-label={openMobile ? \"Close menu\" : \"Open menu\"}\n {...cleanProps(props)}\n >\n <span className={s.MobileMenuIcon}>\n <span className={s.MobileMenuLine} data-top />\n <span className={s.MobileMenuMiddle}>\n <span className={s.MobileMenuLine} data-bottom />\n </span>\n </span>\n </button>\n )\n },\n)\nSidebarMobileMenuButton.displayName = \"SidebarMobileMenuButton\"\n\n// =============================================\n// Mobile Sidebar\n// =============================================\n\nexport type SidebarMobileProps = ComponentProps<\"div\"> & {\n /** When true, drawer is positioned absolute instead of fixed (for contained demos) */\n contained?: boolean\n}\n\nexport const SidebarMobile = forwardRef<HTMLDivElement, SidebarMobileProps>(\n ({ className, children, contained, ...props }, ref) => {\n const { setOpenMobile } = useSidebar()\n\n return (\n <>\n {/* Backdrop */}\n <div\n className={clsx(s.MobileBackdrop, contained && s.contained)}\n onClick={() => setOpenMobile(false)}\n aria-hidden=\"true\"\n />\n\n {/* Drawer */}\n <div\n ref={ref}\n className={clsx(s.MobileSidebar, contained && s.contained, className)}\n {...cleanProps(props)}\n >\n {children}\n </div>\n </>\n )\n },\n)\nSidebarMobile.displayName = \"SidebarMobile\"\n\nexport type SidebarMobileHeaderProps = ComponentProps<\"div\">\n\nexport const SidebarMobileHeader = forwardRef<HTMLDivElement, SidebarMobileHeaderProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.MobileHeader, className)} {...cleanProps(props)} />\n ),\n)\nSidebarMobileHeader.displayName = \"SidebarMobileHeader\"\n\nexport type SidebarMobileFooterProps = ComponentProps<\"div\">\n\nexport const SidebarMobileFooter = forwardRef<HTMLDivElement, SidebarMobileFooterProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.MobileFooter, className)} {...cleanProps(props)} />\n ),\n)\nSidebarMobileFooter.displayName = \"SidebarMobileFooter\"\n\n// =============================================\n// Input (Search)\n// =============================================\n\nexport type SidebarInputProps = InputProps\n\nexport const SidebarInput = forwardRef<HTMLInputElement, SidebarInputProps>(\n ({ className, ...props }, ref) => (\n <div className={s.Input}>\n <Input\n ref={ref}\n className={className}\n startAdornment={<SearchIcon />}\n {...cleanProps(props)}\n />\n </div>\n ),\n)\nSidebarInput.displayName = \"SidebarInput\"\n\n// =============================================\n// Footer Links\n// =============================================\n\nexport type SidebarFooterLinksProps = ComponentProps<\"div\">\n\nexport const SidebarFooterLinks = forwardRef<HTMLDivElement, SidebarFooterLinksProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.FooterLinks, className)} {...cleanProps(props)} />\n ),\n)\nSidebarFooterLinks.displayName = \"SidebarFooterLinks\"\n"]}
1
+ {"version":3,"file":"Sidebar.js","sourceRoot":"","sources":["../../../../src/components/Sidebar/Sidebar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC/B,OAAO,EACL,YAAY,EACZ,aAAa,EACb,UAAU,EACV,cAAc,EACd,WAAW,EACX,UAAU,EACV,eAAe,EACf,QAAQ,GAIT,MAAM,OAAO,CAAA;AAEd,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,IAAI,UAAU,EAAE,OAAO,IAAI,WAAW,EAAE,iBAAiB,EAAE,CAAC,EAAE,MAAM,SAAS,CAAA;AACxH,OAAO,EAAE,KAAK,E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GAAI,CACpF,CACF,CAAA;AACD,kBAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAA","sourcesContent":["\"use client\"\n\n/**\n * Sidebar Component - Composable navigation sidebar\n *\n * API SPECIFICATION:\n *\n * SidebarProvider\n * - defaultOpen?: boolean (default: true)\n * - open?: boolean (controlled)\n * - onOpenChange?: (open: boolean) => void\n * - collapsible?: \"offcanvas\" | \"icon\" | \"none\" (default: \"offcanvas\")\n *\n * Sidebar\n * - side?: \"left\" | \"right\" (default: \"left\")\n * - variant?: \"sidebar\" | \"docs\" (default: \"sidebar\")\n *\n * SidebarHeader / SidebarContent / SidebarFooter\n * - Standard container props\n *\n * SidebarGroup\n * - defaultOpen?: boolean (default: true)\n * - open?: boolean (controlled)\n *\n * SidebarGroupLabel / SidebarGroupAction / SidebarGroupContent\n * - Standard container props\n *\n * SidebarMenu / SidebarMenuItem\n * - Standard container props\n *\n * SidebarMenuButton\n * - isActive?: boolean (default: false)\n * - size?: \"sm\" | \"md\" | \"lg\" (default: \"md\")\n * - tooltip?: string | ReactNode\n * - asChild?: boolean\n *\n * SidebarMenuAction / SidebarMenuBadge\n * - Standard container props\n *\n * SidebarMenuSkeleton\n * - showIcon?: boolean (default: true)\n *\n * SidebarMenuSub / SidebarMenuSubItem / SidebarMenuSubButton\n * - Same as parent menu components\n *\n * SidebarSeparator\n * - Standard separator props\n *\n * SidebarCard / SidebarCardHeader / SidebarCardContent / SidebarCardFooter\n * - variant?: \"default\" | \"elevated\"\n * - dismissible?: boolean\n * - onDismiss?: () => void\n *\n * SidebarInset\n * - Standard container for main content area\n *\n * SidebarTrigger\n * - Uses Button component internally\n * - Returns null when collapsible=\"none\"\n *\n * SidebarMobileMenuButton\n * - Mobile menu button: the SidebarMenuMobile icon turns into X\n *\n * SidebarInput\n * - shortcut?: string (keyboard shortcut display)\n */\n\nimport clsx from \"clsx\"\nimport { Slot } from \"radix-ui\"\nimport {\n cloneElement,\n createContext,\n forwardRef,\n isValidElement,\n useCallback,\n useContext,\n useLayoutEffect,\n useState,\n type ComponentProps,\n type PointerEvent,\n type ReactNode,\n} from \"react\"\n\nimport { Button } from \"../Button\"\nimport { ChevronRightMd, Disclosure, Search as SearchIcon, Sidebar as SidebarIcon, SidebarMenuMobile, X } from \"../Icon\"\nimport { Input, type InputProps } from \"../Input\"\nimport { Tooltip } from \"../Tooltip\"\nimport s from \"@plexui/styles/components/Sidebar/Sidebar.module.css\"\nimport {\n SidebarProvider,\n useSidebar,\n type SidebarCollapsible,\n type SidebarSide,\n type SidebarProviderVariant,\n type SidebarVariant,\n} from \"./useSidebarContext\"\n\n// Helper to filter out props that shouldn't be spread to the DOM (e.g. injected by MDX)\nconst cleanProps = <P extends object>(props: P): Omit<P, \"data-toggle\"> => {\n const { \"data-toggle\": _, ...rest } = props as P & { \"data-toggle\"?: unknown }\n return rest\n}\n\n// Re-export provider and hook\nexport { SidebarProvider, useSidebar }\nexport type { SidebarCollapsible, SidebarProviderVariant, SidebarSide, SidebarVariant }\n\n// Rows inside the mobile drawer end with a disclosure chevron (see the drawer list in the styles).\nconst SidebarDrawerContext = createContext(false)\n\n/** The chevron of a drawer row that leads to another page. */\nconst MenuDisclosure = () => (\n <span className={s.MenuDisclosure} aria-hidden=\"true\">\n <Disclosure />\n </span>\n)\n\n// =============================================\n// Sidebar Root\n// =============================================\n\nexport type SidebarProps = ComponentProps<\"aside\"> & {\n /**\n * The side the sidebar is on.\n * @default \"left\"\n */\n side?: SidebarSide\n /**\n * The visual variant of the sidebar.\n * @default \"sidebar\"\n */\n variant?: SidebarVariant\n}\n\nexport const Sidebar = forwardRef<HTMLElement, SidebarProps>(\n ({ side = \"left\", variant = \"sidebar\", className, children, ...props }, ref) => {\n const { collapsible, isMobile } = useSidebar()\n\n // Skip rendering sidebar on mobile for offcanvas mode\n if (isMobile && collapsible === \"offcanvas\") {\n return null\n }\n\n return (\n <aside\n ref={ref}\n data-side={side}\n data-variant={variant}\n className={clsx(s.Sidebar, className)}\n {...cleanProps(props)}\n >\n {children}\n </aside>\n )\n },\n)\nSidebar.displayName = \"Sidebar\"\n\n// =============================================\n// Sidebar Sections\n// =============================================\n\nexport type SidebarHeaderProps = ComponentProps<\"div\">\n\nexport const SidebarHeader = forwardRef<HTMLDivElement, SidebarHeaderProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.Header, className)} {...cleanProps(props)} />\n ),\n)\nSidebarHeader.displayName = \"SidebarHeader\"\n\nexport type SidebarContentProps = ComponentProps<\"div\">\n\nexport const SidebarContent = forwardRef<HTMLDivElement, SidebarContentProps>(\n ({ className, ...props }, ref) => {\n const [contentEl, setContentEl] = useState<HTMLDivElement | null>(null)\n const setRef = useCallback(\n (el: HTMLDivElement | null) => {\n setContentEl(el)\n if (typeof ref === \"function\") ref(el)\n else if (ref) (ref as { current: HTMLDivElement | null }).current = el\n },\n [ref],\n )\n\n useLayoutEffect(() => {\n if (!contentEl) return\n const sidebar = contentEl.parentElement\n if (!sidebar) return\n\n const update = () => {\n const hasOverflow = contentEl.scrollHeight > contentEl.clientHeight\n sidebar.setAttribute(\"data-content-scrollable\", hasOverflow ? \"true\" : \"false\")\n }\n update()\n const ro = new ResizeObserver(update)\n ro.observe(contentEl)\n return () => ro.disconnect()\n }, [contentEl])\n\n return <div ref={setRef} className={clsx(s.Content, className)} {...cleanProps(props)} />\n },\n)\nSidebarContent.displayName = \"SidebarContent\"\n\nexport type SidebarFooterProps = ComponentProps<\"div\">\n\nexport const SidebarFooter = forwardRef<HTMLDivElement, SidebarFooterProps>(\n ({ className, children, ...props }, ref) => (\n <div ref={ref} className={clsx(s.Footer, className)} {...cleanProps(props)}>\n <div className={s.FooterSeparator} />\n {children}\n </div>\n ),\n)\nSidebarFooter.displayName = \"SidebarFooter\"\n\nexport type SidebarRailProps = ComponentProps<\"div\">\n\nexport const SidebarRail = forwardRef<HTMLDivElement, SidebarRailProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.Rail, className)} {...cleanProps(props)} />\n ),\n)\nSidebarRail.displayName = \"SidebarRail\"\n\n// =============================================\n// Groups\n// =============================================\n\nexport type SidebarGroupProps = ComponentProps<\"div\"> & {\n /**\n * Whether the group is open initially. A closed group hides its `SidebarGroupContent`.\n * @default true\n */\n defaultOpen?: boolean\n /**\n * Controlled open state. The group has no toggle of its own: change `open` from your own control.\n */\n open?: boolean\n}\n\nexport const SidebarGroup = forwardRef<HTMLDivElement, SidebarGroupProps>(\n ({ defaultOpen = true, open: openProp, className, ...props }, ref) => {\n // The initial value only, like an uncontrolled input's defaultValue\n const [initialOpen] = useState(defaultOpen)\n const open = openProp ?? initialOpen\n\n return (\n <div\n ref={ref}\n data-state={open ? \"open\" : \"closed\"}\n className={clsx(s.Group, className)}\n {...cleanProps(props)}\n />\n )\n },\n)\nSidebarGroup.displayName = \"SidebarGroup\"\n\nexport type SidebarGroupLabelProps = ComponentProps<\"span\"> & {\n asChild?: boolean\n /**\n * Size variant for the label.\n * - \"sm\": Compact style for dashboard/settings sidebars\n * - \"lg\": Documentation style with larger text and more spacing\n * @default \"lg\"\n */\n size?: \"sm\" | \"lg\"\n}\n\nexport const SidebarGroupLabel = forwardRef<HTMLSpanElement, SidebarGroupLabelProps>(\n ({ asChild = false, size = \"lg\", className, ...props }, ref) => {\n const Comp = asChild ? Slot.Root : \"span\"\n return (\n <Comp\n ref={ref}\n data-size={size}\n className={clsx(s.GroupLabel, className)}\n {...cleanProps(props)}\n />\n )\n },\n)\nSidebarGroupLabel.displayName = \"SidebarGroupLabel\"\n\nexport type SidebarGroupActionProps = ComponentProps<\"div\">\n\nexport const SidebarGroupAction = forwardRef<HTMLDivElement, SidebarGroupActionProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.GroupAction, className)} {...cleanProps(props)} />\n ),\n)\nSidebarGroupAction.displayName = \"SidebarGroupAction\"\n\nexport type SidebarGroupContentProps = ComponentProps<\"div\">\n\nexport const SidebarGroupContent = forwardRef<HTMLDivElement, SidebarGroupContentProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.GroupContent, className)} {...cleanProps(props)} />\n ),\n)\nSidebarGroupContent.displayName = \"SidebarGroupContent\"\n\n// =============================================\n// Menu\n// =============================================\n\nexport type SidebarMenuProps = ComponentProps<\"ul\">\n\nexport const SidebarMenu = forwardRef<HTMLUListElement, SidebarMenuProps>(\n ({ className, ...props }, ref) => (\n <ul ref={ref} className={clsx(s.Menu, className)} {...cleanProps(props)} />\n ),\n)\nSidebarMenu.displayName = \"SidebarMenu\"\n\nexport type SidebarMenuItemProps = ComponentProps<\"li\"> & {\n expanded?: boolean\n}\n\nexport const SidebarMenuItem = forwardRef<HTMLLIElement, SidebarMenuItemProps>(\n ({ expanded, className, ...props }, ref) => (\n <li\n ref={ref}\n data-expanded={expanded ? \"true\" : undefined}\n className={clsx(s.MenuItem, className)}\n {...cleanProps(props)}\n />\n ),\n)\nSidebarMenuItem.displayName = \"SidebarMenuItem\"\n\n// =============================================\n// Menu Button\n// =============================================\n\nexport type SidebarMenuButtonProps = ComponentProps<\"button\"> & {\n /**\n * Whether the button is in an active/highlighted state.\n * @default false\n */\n isActive?: boolean\n /**\n * Optional tooltip to show when the sidebar is collapsed.\n */\n tooltip?: string | ReactNode\n /**\n * Whether to render the button as a custom element via Slot.\n * @default false\n */\n asChild?: boolean\n}\n\n// Shared by every row of the rail: moving to the next one shows its label at once.\nlet railLeftAt = 0\n\nexport const SidebarMenuButton = forwardRef<HTMLButtonElement, SidebarMenuButtonProps>(\n ({ isActive = false, tooltip, asChild = false, className, children, onPointerEnter, onPointerLeave, ...props }, ref) => {\n const { state, isMobile } = useSidebar()\n const inDrawer = useContext(SidebarDrawerContext)\n const [openDelay, setOpenDelay] = useState<number>()\n const Comp = asChild ? Slot.Root : \"button\"\n const disclosure = inDrawer ? <MenuDisclosure /> : null\n // With asChild the child element is the button, so the inner wrapper\n // goes inside it. Wrapping the child instead would make Slot merge the\n // button props onto the wrapper span.\n const content =\n asChild && isValidElement<{ children?: ReactNode }>(children) ? (\n cloneElement(\n children,\n undefined,\n <span className={s.MenuButtonInner}>{children.props.children}{disclosure}</span>,\n )\n ) : (\n <span className={s.MenuButtonInner}>{children}{disclosure}</span>\n )\n\n const button = (\n <Comp\n ref={ref}\n data-active={isActive ? \"true\" : \"false\"}\n aria-current={isActive ? \"page\" : undefined}\n className={clsx(s.MenuButton, className)}\n onPointerEnter={(event: PointerEvent<HTMLButtonElement>) => {\n onPointerEnter?.(event)\n if (tooltip) setOpenDelay(Date.now() - railLeftAt < 300 ? 0 : undefined)\n }}\n onPointerLeave={(event: PointerEvent<HTMLButtonElement>) => {\n onPointerLeave?.(event)\n if (tooltip) railLeftAt = Date.now()\n }}\n {...cleanProps(props)}\n >\n {content}\n </Comp>\n )\n\n // The tooltip shows when collapsed (icon mode) and not on mobile. It wraps\n // the row in every state, so the row stays mounted and its label can fade.\n if (tooltip) {\n return (\n <Tooltip content={state === \"collapsed\" && !isMobile ? tooltip : null} openDelay={openDelay} side=\"right\">\n {button}\n </Tooltip>\n )\n }\n\n return button\n },\n)\nSidebarMenuButton.displayName = \"SidebarMenuButton\"\n\n// =============================================\n// Menu Button Parts\n// =============================================\n\nexport type SidebarMenuButtonIconProps = ComponentProps<\"span\">\n\nexport const SidebarMenuButtonIcon = forwardRef<HTMLSpanElement, SidebarMenuButtonIconProps>(\n ({ className, ...props }, ref) => (\n <span ref={ref} className={clsx(s.MenuButtonIcon, className)} {...cleanProps(props)} />\n ),\n)\nSidebarMenuButtonIcon.displayName = \"SidebarMenuButtonIcon\"\n\nexport type SidebarMenuButtonLabelProps = ComponentProps<\"span\"> & {\n shortLabel?: string\n}\n\nexport const SidebarMenuButtonLabel = forwardRef<HTMLSpanElement, SidebarMenuButtonLabelProps>(\n ({ shortLabel, className, children, ...props }, ref) => (\n <>\n <span\n ref={ref}\n data-long-label=\"true\"\n className={clsx(s.MenuButtonLabel, className)}\n {...cleanProps(props)}\n >\n {children}\n </span>\n {shortLabel && (\n <span data-short-label=\"true\" className={clsx(s.MenuButtonLabel, className)}>\n {shortLabel}\n </span>\n )}\n </>\n ),\n)\nSidebarMenuButtonLabel.displayName = \"SidebarMenuButtonLabel\"\n\n// =============================================\n// Menu Chevron (Expand/Collapse Toggle)\n// =============================================\n\nexport type SidebarMenuChevronProps = ComponentProps<\"span\">\n\nexport const SidebarMenuChevron = forwardRef<HTMLSpanElement, SidebarMenuChevronProps>(\n ({ className, ...props }, ref) => (\n <span ref={ref} className={clsx(s.MenuChevron, className)} {...cleanProps(props)}>\n <ChevronRightMd />\n </span>\n ),\n)\nSidebarMenuChevron.displayName = \"SidebarMenuChevron\"\n\n// =============================================\n// Menu Badge & Action\n// =============================================\n\nexport type SidebarMenuBadgeProps = ComponentProps<\"span\">\n\nexport const SidebarMenuBadge = forwardRef<HTMLSpanElement, SidebarMenuBadgeProps>(\n ({ className, ...props }, ref) => (\n <span ref={ref} className={clsx(s.MenuBadge, className)} {...cleanProps(props)} />\n ),\n)\nSidebarMenuBadge.displayName = \"SidebarMenuBadge\"\n\nexport type SidebarMenuActionProps = ComponentProps<\"div\">\n\nexport const SidebarMenuAction = forwardRef<HTMLDivElement, SidebarMenuActionProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.MenuAction, className)} {...cleanProps(props)} />\n ),\n)\nSidebarMenuAction.displayName = \"SidebarMenuAction\"\n\n// =============================================\n// Menu Skeleton\n// =============================================\n\nexport type SidebarMenuSkeletonProps = ComponentProps<\"div\"> & {\n showIcon?: boolean\n /** Width of the label skeleton (e.g., \"60%\", \"80%\", \"100px\") */\n labelWidth?: string\n}\n\nexport const SidebarMenuSkeleton = forwardRef<HTMLDivElement, SidebarMenuSkeletonProps>(\n ({ showIcon = true, labelWidth = \"60%\", className, ...props }, ref) => (\n <div\n ref={ref}\n data-skeleton\n className={clsx(s.MenuSkeleton, className)}\n {...cleanProps(props)}\n >\n {showIcon && <div className={s.MenuSkeletonIcon} />}\n <div className={s.MenuSkeletonLabel} style={{ width: labelWidth }} />\n </div>\n ),\n)\nSidebarMenuSkeleton.displayName = \"SidebarMenuSkeleton\"\n\n// =============================================\n// Submenu\n// =============================================\n\nexport type SidebarMenuSubProps = ComponentProps<\"ul\"> & {\n open?: boolean\n /**\n * When true, child items align with parent text that has icons.\n * This adjusts the padding so level 2 text aligns with level 1 text.\n */\n hasIcons?: boolean\n}\n\nexport const SidebarMenuSub = forwardRef<HTMLUListElement, SidebarMenuSubProps>(\n ({ open = true, hasIcons = false, className, ...props }, ref) => (\n <ul\n ref={ref}\n data-state={open ? \"open\" : \"closed\"}\n data-has-icons={hasIcons ? \"true\" : undefined}\n // Collapsed items are only hidden visually: keep them out of the tab order\n inert={open ? undefined : true}\n className={clsx(s.MenuSub, className)}\n {...cleanProps(props)}\n />\n ),\n)\nSidebarMenuSub.displayName = \"SidebarMenuSub\"\n\nexport type SidebarMenuSubItemProps = ComponentProps<\"li\">\n\nexport const SidebarMenuSubItem = forwardRef<HTMLLIElement, SidebarMenuSubItemProps>(\n ({ className, ...props }, ref) => (\n <li ref={ref} className={clsx(s.MenuSubItem, className)} {...cleanProps(props)} />\n ),\n)\nSidebarMenuSubItem.displayName = \"SidebarMenuSubItem\"\n\nexport type SidebarMenuSubButtonProps = ComponentProps<\"button\"> & {\n isActive?: boolean\n asChild?: boolean\n /**\n * Indent level for nested items (0-3).\n * Each level adds 12px of left margin.\n * @default 0\n */\n indent?: 0 | 1 | 2 | 3\n}\n\nexport const SidebarMenuSubButton = forwardRef<HTMLButtonElement, SidebarMenuSubButtonProps>(\n ({ isActive = false, asChild = false, indent = 0, className, children, ...props }, ref) => {\n const inDrawer = useContext(SidebarDrawerContext)\n const Comp = asChild ? Slot.Root : \"button\"\n // In the drawer the disclosure follows the content, inside the child element with asChild\n const content = !inDrawer\n ? children\n : asChild && isValidElement<{ children?: ReactNode }>(children)\n ? cloneElement(children, undefined, <>{children.props.children}<MenuDisclosure /></>)\n : <>{children}<MenuDisclosure /></>\n return (\n <Comp\n ref={ref}\n data-active={isActive ? \"true\" : \"false\"}\n aria-current={isActive ? \"page\" : undefined}\n className={clsx(s.MenuSubButton, s[`indent${indent}`], className)}\n {...cleanProps(props)}\n >\n {content}\n </Comp>\n )\n },\n)\nSidebarMenuSubButton.displayName = \"SidebarMenuSubButton\"\n\n// =============================================\n// Separator\n// =============================================\n\nexport type SidebarSeparatorProps = ComponentProps<\"hr\">\n\nexport const SidebarSeparator = forwardRef<HTMLHRElement, SidebarSeparatorProps>(\n ({ className, ...props }, ref) => (\n <hr ref={ref} className={clsx(s.Separator, className)} {...cleanProps(props)} />\n ),\n)\nSidebarSeparator.displayName = \"SidebarSeparator\"\n\n// =============================================\n// Card\n// =============================================\n\nexport type SidebarCardProps = ComponentProps<\"div\"> & {\n variant?: \"default\" | \"elevated\"\n dismissible?: boolean\n onDismiss?: () => void\n}\n\nexport const SidebarCard = forwardRef<HTMLDivElement, SidebarCardProps>(\n ({ variant = \"default\", dismissible = false, onDismiss, className, children, ...props }, ref) => (\n <div\n ref={ref}\n data-variant={variant}\n className={clsx(s.Card, className)}\n {...cleanProps(props)}\n >\n {dismissible && (\n <Button\n uniform\n size=\"3xs\"\n variant=\"ghost\"\n color=\"secondary\"\n className={s.CardDismiss}\n onClick={onDismiss}\n aria-label=\"Dismiss\"\n >\n <X />\n </Button>\n )}\n {children}\n </div>\n ),\n)\nSidebarCard.displayName = \"SidebarCard\"\n\nexport type SidebarCardHeaderProps = ComponentProps<\"div\">\n\nexport const SidebarCardHeader = forwardRef<HTMLDivElement, SidebarCardHeaderProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.CardHeader, className)} {...cleanProps(props)} />\n ),\n)\nSidebarCardHeader.displayName = \"SidebarCardHeader\"\n\nexport type SidebarCardTitleProps = ComponentProps<\"div\">\n\nexport const SidebarCardTitle = forwardRef<HTMLDivElement, SidebarCardTitleProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.CardTitle, className)} {...cleanProps(props)} />\n ),\n)\nSidebarCardTitle.displayName = \"SidebarCardTitle\"\n\nexport type SidebarCardTitleLinkProps = ComponentProps<\"a\">\n\nexport const SidebarCardTitleLink = forwardRef<HTMLAnchorElement, SidebarCardTitleLinkProps>(\n ({ className, children, ...props }, ref) => (\n <a ref={ref} className={clsx(s.CardTitleLink, className)} {...cleanProps(props)}>\n {children}\n <ChevronRightMd className={s.CardTitleChevron} />\n </a>\n ),\n)\nSidebarCardTitleLink.displayName = \"SidebarCardTitleLink\"\n\nexport type SidebarCardContentProps = ComponentProps<\"div\">\n\nexport const SidebarCardContent = forwardRef<HTMLDivElement, SidebarCardContentProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.CardContent, className)} {...cleanProps(props)} />\n ),\n)\nSidebarCardContent.displayName = \"SidebarCardContent\"\n\nexport type SidebarCardFooterProps = ComponentProps<\"div\">\n\nexport const SidebarCardFooter = forwardRef<HTMLDivElement, SidebarCardFooterProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.CardFooter, className)} {...cleanProps(props)} />\n ),\n)\nSidebarCardFooter.displayName = \"SidebarCardFooter\"\n\n// =============================================\n// Inset (Main Content Area)\n// =============================================\n\nexport type SidebarInsetProps = ComponentProps<\"main\">\n\nexport const SidebarInset = forwardRef<HTMLElement, SidebarInsetProps>(\n ({ className, ...props }, ref) => (\n <main ref={ref} className={clsx(s.Inset, className)} {...cleanProps(props)} />\n ),\n)\nSidebarInset.displayName = \"SidebarInset\"\n\n// =============================================\n// Layout Container\n// =============================================\n\nexport type SidebarLayoutProps = ComponentProps<\"div\">\n\nexport const SidebarLayout = forwardRef<HTMLDivElement, SidebarLayoutProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.SidebarLayout, className)} {...cleanProps(props)} />\n ),\n)\nSidebarLayout.displayName = \"SidebarLayout\"\n\n// =============================================\n// Trigger (Collapse Button)\n// =============================================\n\nexport type SidebarTriggerProps = ComponentProps<\"button\"> & {\n children?: ReactNode\n}\n\nexport const SidebarTrigger = forwardRef<HTMLButtonElement, SidebarTriggerProps>(\n ({ className, children, onClick, ...props }, ref) => {\n const { state, collapsible, isMobile, toggleSidebar } = useSidebar()\n\n // Don't render if collapsible=\"none\" (text-only sidebars)\n if (collapsible === \"none\") {\n return null\n }\n\n // One icon for both states: the tooltip, not the icon, says what a press does\n const defaultIcon = <SidebarIcon />\n\n return (\n <button\n ref={ref}\n type=\"button\"\n className={clsx(s.Trigger, className)}\n onClick={(event) => {\n // The caller's handler runs first and can cancel the toggle\n onClick?.(event)\n if (!event.defaultPrevented) toggleSidebar()\n }}\n aria-label={\n isMobile ? \"Open menu\" : state === \"expanded\" ? \"Collapse sidebar\" : \"Expand sidebar\"\n }\n {...cleanProps(props)}\n >\n <span className={s.TriggerInner}>\n <span className={s.TriggerIcon}>{children ?? defaultIcon}</span>\n </span>\n </button>\n )\n },\n)\nSidebarTrigger.displayName = \"SidebarTrigger\"\n\n// =============================================\n// Mobile Menu Button (SidebarMenuMobile icon → X)\n// =============================================\n\nexport type SidebarMobileMenuButtonProps = ComponentProps<\"button\">\n\nexport const SidebarMobileMenuButton = forwardRef<HTMLButtonElement, SidebarMobileMenuButtonProps>(\n ({ className, onClick, ...props }, ref) => {\n const { openMobile, setOpenMobile } = useSidebar()\n\n return (\n <button\n ref={ref}\n type=\"button\"\n data-expanded={openMobile ? \"\" : undefined}\n className={clsx(s.MobileMenuButton, className)}\n onClick={(event) => {\n // The caller's handler runs first and can cancel the toggle\n onClick?.(event)\n if (!event.defaultPrevented) setOpenMobile(!openMobile)\n }}\n aria-label={openMobile ? \"Close menu\" : \"Open menu\"}\n {...cleanProps(props)}\n >\n <span className={s.MobileMenuIcon}>\n <SidebarMenuMobile className={s.MobileMenuGlyph} data-glyph=\"menu\" />\n <X className={s.MobileMenuGlyph} data-glyph=\"close\" />\n </span>\n </button>\n )\n },\n)\nSidebarMobileMenuButton.displayName = \"SidebarMobileMenuButton\"\n\n// =============================================\n// Mobile Sidebar\n// =============================================\n\nexport type SidebarMobileProps = ComponentProps<\"div\"> & {\n /** When true, drawer is positioned absolute instead of fixed (for contained demos) */\n contained?: boolean\n}\n\nexport const SidebarMobile = forwardRef<HTMLDivElement, SidebarMobileProps>(\n ({ className, children, contained, ...props }, ref) => {\n const { setOpenMobile } = useSidebar()\n\n return (\n <>\n {/* Backdrop */}\n <div\n className={clsx(s.MobileBackdrop, contained && s.contained)}\n onClick={() => setOpenMobile(false)}\n aria-hidden=\"true\"\n />\n\n {/* Drawer */}\n <div\n ref={ref}\n className={clsx(s.MobileSidebar, contained && s.contained, className)}\n {...cleanProps(props)}\n >\n <SidebarDrawerContext.Provider value>{children}</SidebarDrawerContext.Provider>\n </div>\n </>\n )\n },\n)\nSidebarMobile.displayName = \"SidebarMobile\"\n\nexport type SidebarMobileHeaderProps = ComponentProps<\"div\">\n\nexport const SidebarMobileHeader = forwardRef<HTMLDivElement, SidebarMobileHeaderProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.MobileHeader, className)} {...cleanProps(props)} />\n ),\n)\nSidebarMobileHeader.displayName = \"SidebarMobileHeader\"\n\nexport type SidebarMobileFooterProps = ComponentProps<\"div\">\n\nexport const SidebarMobileFooter = forwardRef<HTMLDivElement, SidebarMobileFooterProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.MobileFooter, className)} {...cleanProps(props)} />\n ),\n)\nSidebarMobileFooter.displayName = \"SidebarMobileFooter\"\n\n// =============================================\n// Input (Search)\n// =============================================\n\nexport type SidebarInputProps = InputProps\n\nexport const SidebarInput = forwardRef<HTMLInputElement, SidebarInputProps>(\n ({ className, ...props }, ref) => (\n <div className={s.Input}>\n <Input\n ref={ref}\n className={className}\n startAdornment={<SearchIcon />}\n {...cleanProps(props)}\n />\n </div>\n ),\n)\nSidebarInput.displayName = \"SidebarInput\"\n\n// =============================================\n// Footer Links\n// =============================================\n\nexport type SidebarFooterLinksProps = ComponentProps<\"div\">\n\nexport const SidebarFooterLinks = forwardRef<HTMLDivElement, SidebarFooterLinksProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={clsx(s.FooterLinks, className)} {...cleanProps(props)} />\n ),\n)\nSidebarFooterLinks.displayName = \"SidebarFooterLinks\"\n"]}
@@ -3,10 +3,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import clsx from "clsx";
4
4
  import clamp from "lodash/clamp.js";
5
5
  import round from "lodash/round.js";
6
- import { Slider as RadixSlider } from "radix-ui";
6
+ import { Direction, Slider as RadixSlider } from "radix-ui";
7
7
  import { memo, useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, } from "react";
8
8
  import { useDebounceCallback, useResizeObserver } from "usehooks-ts";
9
- import { useBreakpoint } from "../../hooks/useBreakpoints.js";
10
9
  import { useIsMounted } from "../../hooks/useIsMounted.js";
11
10
  import { useLatestValue } from "../../hooks/useLatestValue.js";
12
11
  import { usePrevious } from "../../hooks/usePrevious.js";
@@ -16,10 +15,32 @@ import { Button } from "../Button/index.js";
16
15
  import { Reload } from "../Icon/index.js";
17
16
  import { Tooltip } from "../Tooltip/index.js";
18
17
  import s from "@plexui/styles/components/Slider/Slider.module.css";
18
+ /**
19
+ * A press on the track of a range moves the thumb whose value lies nearest the press, which Radix focuses only
20
+ * once that value changes. Focusing it at once lets a phone draw the knob being pressed as the lens of glass
21
+ * (Slider.module.css), even when the press leaves the value as it is. The thumb is the one Radix moves: the
22
+ * pointer mapped onto min to max across the root (from the right in a right-to-left direction, which Radix
23
+ * takes from a DirectionProvider), the nearest value, the first on a tie. A press on a thumb itself is left
24
+ * to Radix, which focuses that thumb.
25
+ */
26
+ const focusThumbToMove = (event, root, values, min, max, vertical, rtl) => {
27
+ const thumbs = Array.from(root.querySelectorAll('[role="slider"]'));
28
+ if (thumbs.includes(event.target))
29
+ return;
30
+ const rect = root.getBoundingClientRect();
31
+ const ratio = vertical ? (rect.bottom - event.clientY) / rect.height : (rtl ? rect.right - event.clientX : event.clientX - rect.left) / rect.width;
32
+ const pointerValue = min + ratio * (max - min);
33
+ const distances = values.map((value) => Math.abs(value - pointerValue));
34
+ const thumb = thumbs[distances.indexOf(Math.min(...distances))];
35
+ if (thumb && thumb !== document.activeElement)
36
+ thumb.focus({ preventScroll: true, focusVisible: false });
37
+ };
19
38
  export const Slider = memo((props) => {
20
39
  const { className, onChange, min, max, step, disabled, value, onBlur, onFocus, unit, prefixUnit, label, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, marks: propMarks = [], trackColor, rangeColor, orientation = "horizontal", ref: forwardedRef, } = props;
21
40
  const isRange = props.range === true;
22
41
  const isVertical = orientation === "vertical";
42
+ // The direction Radix slides in: no `dir` is passed, so it is the one of a DirectionProvider, else left to right.
43
+ const direction = Direction.useDirection();
23
44
  const id = useId();
24
45
  const labelId = `${id}-label`;
25
46
  // What names the thumbs: an explicit labelledby, else the visible label
@@ -60,10 +81,8 @@ export const Slider = memo((props) => {
60
81
  }, [disabled, isRange, singleValue, setInputValueNumber, debouncedOnChange]);
61
82
  const isMounted = useIsMounted();
62
83
  // Used to position the input over the thumb
63
- const isTabletAndUp = useBreakpoint("md");
64
84
  const inputRef = useRef(null);
65
- // The input width is based on the number of characters in the input / font size
66
- const inputWidth = Math.max(inputValue.length, 1) * (isTabletAndUp ? 7.8 : 9.5);
85
+ const inputWidth = getValueWidth(inputValue);
67
86
  // Calculate animation duration based on the distance the thumb needs to move
68
87
  // Skip custom animation for range mode — let Radix handle it
69
88
  const percent = isRange ? 0 : (value - min) / (max - min);
@@ -229,11 +248,16 @@ export const Slider = memo((props) => {
229
248
  singleOnChange?.(resetValue);
230
249
  setResetPending(true);
231
250
  }, children: _jsx(Reload, {}) }) })), isRange ? (_jsx("span", { className: s.RangeDisplay, children: rangeDisplayText })) : (_jsxs("div", { className: s.SliderValue, onClick: () => { if (!disabled)
232
- inputRef.current?.focus(); }, children: [prefixUnit && _jsx("span", { className: s.ValueUnit, children: prefixUnit }), _jsx("input", { id: id, className: s.ValueInput, ref: inputRef, style: { width: `${Math.ceil(inputWidth)}px` }, onKeyDown: handleKeyDown, value: inputValue, type: "text", inputMode: min < 0 ? "text" : Number.isInteger(min) && Number.isInteger(max) && Number.isInteger(step) ? "numeric" : "decimal", onClick: (e) => e.stopPropagation(), onBlur: handleInputBlur, onFocus: (e) => {
251
+ inputRef.current?.focus(); }, children: [prefixUnit && _jsx("span", { className: s.ValueUnit, children: prefixUnit }), _jsx("input", { id: id, className: s.ValueInput, ref: inputRef, style: { width: inputWidth }, onKeyDown: handleKeyDown, value: inputValue, type: "text", inputMode: min < 0 ? "text" : Number.isInteger(min) && Number.isInteger(max) && Number.isInteger(step) ? "numeric" : "decimal", onClick: (e) => e.stopPropagation(), onBlur: handleInputBlur, onFocus: (e) => {
233
252
  e.currentTarget.setSelectionRange(0, e.currentTarget.value.length);
234
253
  onFocus?.(e);
235
- }, onChange: handleInputChange, disabled: disabled }), unit && _jsx("span", { className: s.ValueUnit, children: unit })] }))] })), _jsxs("div", { className: s.SliderContainer, children: [_jsxs(RadixSlider.Root, { ref: forwardedRef, className: s.Slider, onValueChange: handleValueChange, min: min, max: max, step: step, disabled: disabled, value: radixValue, orientation: orientation, minStepsBetweenThumbs: minStepsBetweenThumbs, onBlur: onBlur, onFocus: onFocus, onPointerDown: () => { if (!disabled)
236
- setPointerDown(true); }, onPointerUp: () => setPointerDown(false), style: toCssVariables({
254
+ }, onChange: handleInputChange, disabled: disabled }), unit && _jsx("span", { className: s.ValueUnit, children: unit })] }))] })), _jsxs("div", { className: s.SliderContainer, children: [_jsxs(RadixSlider.Root, { ref: forwardedRef, className: s.Slider, onValueChange: handleValueChange, min: min, max: max, step: step, disabled: disabled, value: radixValue, orientation: orientation, minStepsBetweenThumbs: minStepsBetweenThumbs, onBlur: onBlur, onFocus: onFocus, onPointerDown: (event) => {
255
+ if (disabled)
256
+ return;
257
+ setPointerDown(true);
258
+ if (isRange)
259
+ focusThumbToMove(event.nativeEvent, event.currentTarget, radixValue, min, max, isVertical, direction === "rtl");
260
+ }, onPointerUp: () => setPointerDown(false), onPointerCancel: () => setPointerDown(false), "data-pressed": pointerDown ? "" : undefined, "data-range": isRange ? "" : undefined, style: toCssVariables({
237
261
  "slider-duration": `${animationDurationMS}ms`,
238
262
  "slider-track-color": trackColor,
239
263
  "slider-range-color": rangeColor,
@@ -321,8 +345,19 @@ const SliderMarks = memo(({ marks, thumbRef, min, max }) => {
321
345
  // Give our container a height so that we allocate space on the page
322
346
  // for the marks and push down other content when we have to wrap
323
347
  marksContainerRef.current.style.height = tallestHeight > 0 ? `${tallestHeight}px` : "";
348
+ // Placed against the slider's width: the marks show, at their own height (Slider.module.css)
349
+ if (sliderWidth)
350
+ marksContainerRef.current.dataset.measured = "";
324
351
  }, [marks, thumbRef, marksContainerRef, min, max, sliderWidth]);
325
352
  return (_jsx("div", { className: s.MarksContainer, ref: marksContainerRef, children: _jsx("div", { ref: measureRef, children: marks.map((mark) => (_jsx("div", { className: s.Mark, "data-mark": true, children: _jsx("span", { className: s.MarkLabel, children: mark.label }) }, mark.value))) }) }));
326
353
  });
327
354
  SliderMarks.displayName = "SliderMarks";
355
+ /**
356
+ * The value field is as wide as its characters at any font size: tabular digits are one `ch` each, and a sign,
357
+ * a decimal point or a separator about half of one, so a right-aligned value sits next to its prefix unit.
358
+ */
359
+ const getValueWidth = (text) => {
360
+ const digits = text.replace(/[^0-9]/g, "").length;
361
+ return `calc(${Math.max(digits + (text.length - digits) / 2, 1)}ch + 1px)`;
362
+ };
328
363
  //# sourceMappingURL=Slider.js.map