@plexui/vue 0.9.0 → 0.11.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.
- package/dist/es/components/Alert/Alert.js +6 -2
- package/dist/es/components/Alert/Alert.js.map +1 -1
- package/dist/es/components/Avatar/Avatar.js +3 -1
- package/dist/es/components/Avatar/Avatar.js.map +1 -1
- package/dist/es/components/ButtonGroup/ButtonGroup.js +7 -0
- package/dist/es/components/ButtonGroup/ButtonGroup.js.map +1 -1
- package/dist/es/components/ButtonGroup/index.js.map +1 -1
- package/dist/es/components/Checkbox/Checkbox.js +5 -6
- package/dist/es/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/es/components/ColorPicker/ColorPicker.js +476 -0
- package/dist/es/components/ColorPicker/ColorPicker.js.map +1 -0
- package/dist/es/components/ColorPicker/ColorWell.js +186 -0
- package/dist/es/components/ColorPicker/ColorWell.js.map +1 -0
- package/dist/es/components/ColorPicker/index.js +3 -0
- package/dist/es/components/ColorPicker/index.js.map +1 -0
- package/dist/es/components/ColorPicker/shared.js +132 -0
- package/dist/es/components/ColorPicker/shared.js.map +1 -0
- package/dist/es/components/ContextMenu/ContextMenu.js +223 -0
- package/dist/es/components/ContextMenu/ContextMenu.js.map +1 -0
- package/dist/es/components/ContextMenu/index.js +2 -0
- package/dist/es/components/ContextMenu/index.js.map +1 -0
- package/dist/es/components/ContextMenu/shared.js +58 -0
- package/dist/es/components/ContextMenu/shared.js.map +1 -0
- package/dist/es/components/DatePicker/DatePicker.js +19 -3
- package/dist/es/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/es/components/DateRangePicker/DateRangePicker.js +1 -1
- package/dist/es/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/es/components/Dialog/Dialog.js +245 -25
- package/dist/es/components/Dialog/Dialog.js.map +1 -1
- package/dist/es/components/Dialog/dialogSteps.js +85 -0
- package/dist/es/components/Dialog/dialogSteps.js.map +1 -0
- package/dist/es/components/Dialog/dialogViewport.js +74 -0
- package/dist/es/components/Dialog/dialogViewport.js.map +1 -0
- package/dist/es/components/Dialog/index.js +1 -1
- package/dist/es/components/Dialog/index.js.map +1 -1
- package/dist/es/components/Dialog/sheetDrag.js +2 -1
- package/dist/es/components/Dialog/sheetDrag.js.map +1 -1
- package/dist/es/components/Field/Field.js +11 -3
- package/dist/es/components/Field/Field.js.map +1 -1
- package/dist/es/components/FieldGroup/FieldGroup.js +12 -1
- package/dist/es/components/FieldGroup/FieldGroup.js.map +1 -1
- package/dist/es/components/FloatingLabelInput/FloatingLabelInput.js +2 -2
- package/dist/es/components/FloatingLabelInput/FloatingLabelInput.js.map +1 -1
- package/dist/es/components/Icon/index.js +1 -0
- package/dist/es/components/Icon/index.js.map +1 -1
- package/dist/es/components/Icon/svg/Eyedropper.js +10 -0
- package/dist/es/components/Icon/svg/Eyedropper.js.map +1 -0
- package/dist/es/components/IndexBar/IndexBar.js +215 -0
- package/dist/es/components/IndexBar/IndexBar.js.map +1 -0
- package/dist/es/components/IndexBar/index.js +2 -0
- package/dist/es/components/IndexBar/index.js.map +1 -0
- package/dist/es/components/Indicator/LoadingIndicator.js +1 -1
- package/dist/es/components/Indicator/LoadingIndicator.js.map +1 -1
- package/dist/es/components/Input/Input.js +3 -2
- package/dist/es/components/Input/Input.js.map +1 -1
- package/dist/es/components/MarkdownEditor/MarkdownEditor.js +149 -1
- package/dist/es/components/MarkdownEditor/MarkdownEditor.js.map +1 -1
- package/dist/es/components/Menu/Menu.js +206 -33
- package/dist/es/components/Menu/Menu.js.map +1 -1
- package/dist/es/components/Menu/index.js +1 -1
- package/dist/es/components/Menu/index.js.map +1 -1
- package/dist/es/components/Page/Page.js +43 -11
- package/dist/es/components/Page/Page.js.map +1 -1
- package/dist/es/components/PageControl/PageControl.js +210 -0
- package/dist/es/components/PageControl/PageControl.js.map +1 -0
- package/dist/es/components/PageControl/index.js +2 -0
- package/dist/es/components/PageControl/index.js.map +1 -0
- package/dist/es/components/PhoneLayout/PhoneLayout.js +50 -0
- package/dist/es/components/PhoneLayout/PhoneLayout.js.map +1 -0
- package/dist/es/components/PhoneLayout/index.js +2 -0
- package/dist/es/components/PhoneLayout/index.js.map +1 -0
- package/dist/es/components/Popover/Popover.js +5 -1
- package/dist/es/components/Popover/Popover.js.map +1 -1
- package/dist/es/components/Popover/deferredPointerDownOutside.js +59 -4
- package/dist/es/components/Popover/deferredPointerDownOutside.js.map +1 -1
- package/dist/es/components/Select/Select.js +18 -11
- package/dist/es/components/Select/Select.js.map +1 -1
- package/dist/es/components/SelectControl/SelectControl.js +1 -0
- package/dist/es/components/SelectControl/SelectControl.js.map +1 -1
- package/dist/es/components/Sidebar/Sidebar.js +21 -6
- package/dist/es/components/Sidebar/Sidebar.js.map +1 -1
- package/dist/es/components/Slider/Slider.js +44 -9
- package/dist/es/components/Slider/Slider.js.map +1 -1
- package/dist/es/components/Stepper/Stepper.js +195 -0
- package/dist/es/components/Stepper/Stepper.js.map +1 -0
- package/dist/es/components/Stepper/index.js +2 -0
- package/dist/es/components/Stepper/index.js.map +1 -0
- package/dist/es/components/SwipeActions/SwipeActions.js +374 -0
- package/dist/es/components/SwipeActions/SwipeActions.js.map +1 -0
- package/dist/es/components/SwipeActions/index.js +2 -0
- package/dist/es/components/SwipeActions/index.js.map +1 -0
- package/dist/es/components/Switch/Switch.js +3 -1
- package/dist/es/components/Switch/Switch.js.map +1 -1
- package/dist/es/components/TabBar/TabBar.js +205 -0
- package/dist/es/components/TabBar/TabBar.js.map +1 -0
- package/dist/es/components/TabBar/index.js +2 -0
- package/dist/es/components/TabBar/index.js.map +1 -0
- package/dist/es/components/Tabs/Tabs.js +10 -2
- package/dist/es/components/Tabs/Tabs.js.map +1 -1
- package/dist/es/components/TagInput/TagInput.js +3 -46
- package/dist/es/components/TagInput/TagInput.js.map +1 -1
- package/dist/es/components/Textarea/Textarea.js +2 -0
- package/dist/es/components/Textarea/Textarea.js.map +1 -1
- package/dist/es/components/Tip/Tip.js +276 -0
- package/dist/es/components/Tip/Tip.js.map +1 -0
- package/dist/es/components/Tip/index.js +2 -0
- package/dist/es/components/Tip/index.js.map +1 -0
- package/dist/es/components/Toast/ToastRenderer.js +30 -13
- package/dist/es/components/Toast/ToastRenderer.js.map +1 -1
- package/dist/es/components/Toast/Toaster.js +17 -6
- package/dist/es/components/Toast/Toaster.js.map +1 -1
- package/dist/es/components/Toast/toastLifecycle.js +113 -1
- package/dist/es/components/Toast/toastLifecycle.js.map +1 -1
- package/dist/es/components/Toolbar/Toolbar.js +37 -6
- package/dist/es/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/es/components/Toolbar/index.js.map +1 -1
- package/dist/es/components/Tooltip/slot.js +3 -3
- package/dist/es/components/Tooltip/slot.js.map +1 -1
- package/dist/es/composables/useEscCloseStack.js +8 -4
- package/dist/es/composables/useEscCloseStack.js.map +1 -1
- package/dist/es/lib/fieldRow.js +15 -2
- package/dist/es/lib/fieldRow.js.map +1 -1
- package/dist/es/lib/floatingBoundary.js +3 -1
- package/dist/es/lib/floatingBoundary.js.map +1 -1
- package/dist/es/lib/helpers.js +21 -0
- package/dist/es/lib/helpers.js.map +1 -1
- package/dist/es/lib/menuSubmenuPlacement.js +51 -6
- package/dist/es/lib/menuSubmenuPlacement.js.map +1 -1
- package/dist/es/lib/menuTriggerCover.js +70 -0
- package/dist/es/lib/menuTriggerCover.js.map +1 -0
- package/dist/es/lib/phoneLayout.js +16 -0
- package/dist/es/lib/phoneLayout.js.map +1 -0
- package/dist/es/lib/scrollEdges.js +34 -0
- package/dist/es/lib/scrollEdges.js.map +1 -0
- package/dist/es/lib/toastRegion.js +6 -0
- package/dist/es/lib/toastRegion.js.map +1 -0
- package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +13 -0
- package/dist/types/components/ButtonGroup/index.d.ts +1 -1
- package/dist/types/components/ColorPicker/ColorPicker.d.ts +244 -0
- package/dist/types/components/ColorPicker/ColorWell.d.ts +334 -0
- package/dist/types/components/ColorPicker/index.d.ts +3 -0
- package/dist/types/components/ColorPicker/shared.d.ts +69 -0
- package/dist/types/components/ContextMenu/ContextMenu.d.ts +128 -0
- package/dist/types/components/ContextMenu/index.d.ts +1 -0
- package/dist/types/components/ContextMenu/shared.d.ts +51 -0
- package/dist/types/components/DatePicker/DatePicker.d.ts +24 -4
- package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +4 -4
- package/dist/types/components/Dialog/Dialog.d.ts +100 -4
- package/dist/types/components/Dialog/dialogSteps.d.ts +10 -0
- package/dist/types/components/Dialog/dialogViewport.d.ts +1 -0
- package/dist/types/components/Dialog/index.d.ts +1 -1
- package/dist/types/components/Field/Field.d.ts +21 -2
- package/dist/types/components/FieldGroup/FieldGroup.d.ts +18 -1
- package/dist/types/components/Icon/index.d.ts +1 -0
- package/dist/types/components/Icon/svg/Eyedropper.d.ts +3 -0
- package/dist/types/components/IndexBar/IndexBar.d.ts +112 -0
- package/dist/types/components/IndexBar/index.d.ts +1 -0
- package/dist/types/components/Indicator/LoadingIndicator.d.ts +2 -2
- package/dist/types/components/Menu/Menu.d.ts +153 -40
- package/dist/types/components/Menu/index.d.ts +1 -1
- package/dist/types/components/Page/Page.d.ts +13 -5
- package/dist/types/components/PageControl/PageControl.d.ts +216 -0
- package/dist/types/components/PageControl/index.d.ts +1 -0
- package/dist/types/components/PhoneLayout/PhoneLayout.d.ts +21 -0
- package/dist/types/components/PhoneLayout/index.d.ts +1 -0
- package/dist/types/components/Popover/deferredPointerDownOutside.d.ts +1 -1
- package/dist/types/components/Select/Select.d.ts +6 -6
- package/dist/types/components/Stepper/Stepper.d.ts +338 -0
- package/dist/types/components/Stepper/index.d.ts +1 -0
- package/dist/types/components/SwipeActions/SwipeActions.d.ts +135 -0
- package/dist/types/components/SwipeActions/index.d.ts +1 -0
- package/dist/types/components/TabBar/TabBar.d.ts +405 -0
- package/dist/types/components/TabBar/index.d.ts +1 -0
- package/dist/types/components/Tip/Tip.d.ts +146 -0
- package/dist/types/components/Tip/index.d.ts +1 -0
- package/dist/types/components/Toast/toastLifecycle.d.ts +34 -0
- package/dist/types/components/Toolbar/Toolbar.d.ts +26 -9
- package/dist/types/components/Toolbar/index.d.ts +1 -1
- package/dist/types/components/Tooltip/CopyTooltip.d.ts +1 -1
- package/dist/types/composables/useEscCloseStack.d.ts +2 -2
- package/dist/types/lib/fieldRow.d.ts +5 -0
- package/dist/types/lib/helpers.d.ts +6 -0
- package/dist/types/lib/menuSubmenuPlacement.d.ts +14 -1
- package/dist/types/lib/menuTriggerCover.d.ts +23 -0
- package/dist/types/lib/phoneLayout.d.ts +11 -0
- package/dist/types/lib/scrollEdges.d.ts +16 -0
- package/dist/types/lib/toastRegion.d.ts +5 -0
- package/package.json +2 -2
|
@@ -144,6 +144,7 @@ const SelectControlComponent = defineComponent({
|
|
|
144
144
|
"class": clsx(s.SelectControl, className),
|
|
145
145
|
// Recreate <button> semantics
|
|
146
146
|
"role": "button",
|
|
147
|
+
"data-slot": "select-control",
|
|
147
148
|
"tabindex": disabled ? -1 : 0,
|
|
148
149
|
"onPointerenter": (evt) => {
|
|
149
150
|
handlePressableMouseEnter(evt);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectControl.js","sourceRoot":"","sources":["../../../../src/components/SelectControl/SelectControl.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAmB,MAAM,MAAM,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,UAAU,EAAsD,MAAM,KAAK,CAAA;AAExG,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,EAAE,gB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AAM,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE;oBACvJ,CAAC,CAAC,MAAM,EAAE;wBACR,CAAC,EAAE,0nBAA0nB;wBAC7nB,IAAI,EAAE,cAAc;wBACpB,WAAW,EAAE,SAAS;wBACtB,WAAW,EAAE,SAAS;qBACvB,CAAC;iBACH,CAAC;aACH,CAAC,CAAA;IACV,CAAC;CACF,CAAC,CAAA","sourcesContent":["import clsx, { type ClassValue } from \"clsx\"\nimport { defineComponent, h, shallowRef, type Component, type HTMLAttributes, type PropType } from \"vue\"\nimport type { ControlSize, Variants } from \"@plexui/styles/types\"\nimport { handlePressableMouseEnter } from \"../../lib/helpers.js\"\nimport { isHoverPointer } from \"../../lib/inputMode.js\"\nimport { isNestedSelectControl } from \"../../lib/selectPress.js\"\nimport { Button } from \"../Button/index.js\"\nimport { ChevronDown, Dropdown, X } from \"../Icon/index.js\"\nimport { LoadingIndicator } from \"../Indicator/index.js\"\nimport s from \"@plexui/styles/components/SelectControl/SelectControl.module.css\"\n\n// Mouse press-drag-select and touch/assistive click activation mirror React.\n// Nested clear controls keep their own button semantics.\n\nexport type DropdownIconType = \"chevronDown\" | \"dropdown\" | \"none\"\n\ntype Listener = ((...args: never[]) => unknown) | Listener[] | null | undefined\n\n/** Calls a listener attribute, which Vue may hold as an array of handlers. */\nconst callListener = (listener: unknown, ...args: unknown[]) => {\n if (Array.isArray(listener)) {\n for (const handler of listener) callListener(handler, ...args)\n } else if (typeof listener === \"function\") {\n ;(listener as (...params: unknown[]) => unknown)(...args)\n }\n}\n\nconst SelectControlComponent = defineComponent({\n name: \"SelectControl\",\n inheritAttrs: false,\n props: {\n /** Style variant for the control. @default \"outline\" */\n variant: { type: String as PropType<Variants<\"soft\" | \"outline\" | \"ghost\">>, default: \"outline\" },\n /** Determines if the control should be a fully rounded pill shape. @default false */\n pill: { type: Boolean, default: false },\n /** Extends the control to 100% of available width. */\n block: { type: Boolean, default: undefined },\n /** Applies a negative margin using the current gutter to optically align the control with surrounding content. */\n opticallyAlign: String as PropType<\"start\" | \"end\">,\n /** Disables the control visually and from interactions. @default false */\n disabled: { type: Boolean, default: undefined },\n /** Visually indicates that the control is in an invalid state. @default false */\n invalid: { type: Boolean, default: undefined },\n /** Indicates that the control is selected. An unselected state will display placeholder styles. @default false */\n selected: { type: Boolean, default: false },\n /** Displays a clear action that allows the select to be unset; called when it is pressed (`@clear-click`). */\n onClearClick: Function as PropType<() => void>,\n /** Primary handler for when the control is selected with pointer or keyboard events (`@interact`). */\n onInteract: Function as PropType<() => void>,\n /** Enter interacts too, as on a combobox button. Off by default, as Enter may be an attempt to submit a form. @default false */\n interactOnEnter: { type: Boolean, default: false },\n /** Size and spacing of the control: `3xs` 22px up to `3xl` 48px. @default \"md\" */\n size: { type: String as PropType<ControlSize>, default: \"md\" },\n /** Displays a loading indicator in place of the dropdown icon and clear action. @default false */\n loading: { type: Boolean, default: undefined },\n /** Icon displayed in the far right of the control. @default \"dropdown\" */\n dropdownIconType: { type: String as PropType<DropdownIconType>, default: \"dropdown\" },\n /** Icon displayed at the start of the control */\n StartIcon: [Object, Function] as PropType<Component>,\n },\n setup(props, { slots, attrs }) {\n const controlRef = shallowRef<HTMLSpanElement | null>(null)\n let mouseClickHandled = false\n\n // Act like a <button> and fire the click handler on keyboard actions\n const handleKeyDown = (evt: KeyboardEvent) => {\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 callListener(attrs.onKeydown, evt)\n if (evt.defaultPrevented || evt.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\" && !props.interactOnEnter) {\n break\n }\n\n evt.stopPropagation()\n evt.preventDefault()\n\n controlRef.value?.click()\n break\n default:\n break\n }\n }\n\n const handlePointerDown = (evt: PointerEvent) => {\n mouseClickHandled = false\n if (isNestedSelectControl(evt)) return\n callListener(attrs.onPointerdown, evt)\n if (evt.defaultPrevented) {\n mouseClickHandled = true\n return\n }\n if (evt.button !== 0) return\n if (evt.pointerType === \"pen\" || !isHoverPointer(evt)) return\n evt.stopPropagation()\n mouseClickHandled = true\n if (props.onInteract) {\n evt.preventDefault()\n props.onInteract()\n } else {\n callListener(attrs.onClick, evt)\n }\n }\n\n const handleClick = (evt: MouseEvent) => {\n const handled = mouseClickHandled\n mouseClickHandled = false\n if (props.disabled || props.loading || evt.defaultPrevented || evt.button !== 0 || isNestedSelectControl(evt)) return\n if (handled && evt.detail !== 0) return\n evt.stopPropagation()\n if (props.onInteract) props.onInteract()\n else callListener(attrs.onClick, evt)\n }\n\n const handleClearClick = (evt: MouseEvent) => {\n evt.stopPropagation()\n evt.preventDefault()\n if (props.disabled || props.loading) return\n // The clear button disappears when the value becomes empty.\n controlRef.value?.focus({ preventScroll: true })\n props.onClearClick?.()\n }\n\n return () => {\n const {\n class: className,\n onPointerenter,\n ...restAttrs\n } = attrs as Record<string, unknown> & { onPointerenter?: Listener }\n delete restAttrs.onPointerdown\n delete restAttrs.onPointercancel\n delete restAttrs.onKeydown\n delete restAttrs.onClick\n const { disabled, loading, selected, pill, dropdownIconType, StartIcon } = props\n const clearable = !!props.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 // Intentionally not using <button> and rebuilding the semantics\n return h(\n \"span\",\n {\n \"ref\": controlRef,\n \"class\": clsx(s.SelectControl, className as ClassValue),\n // Recreate <button> semantics\n \"role\": \"button\",\n \"tabindex\": disabled ? -1 : 0,\n \"onPointerenter\": (evt: PointerEvent) => {\n handlePressableMouseEnter(evt)\n callListener(onPointerenter, evt)\n },\n \"onPointerdown\": isInteractive ? handlePointerDown : undefined,\n \"onKeydown\": isInteractive ? handleKeyDown : undefined,\n \"data-variant\": props.variant,\n \"data-block\": props.block ? \"\" : undefined,\n \"data-pill\": pill ? \"\" : undefined,\n \"data-size\": props.size,\n \"data-optically-align\": props.opticallyAlign,\n \"aria-busy\": loading ? \"true\" : undefined,\n \"data-selected\": selected,\n \"data-loading\": loading ? \"\" : undefined,\n \"data-invalid\": props.invalid ? \"\" : undefined,\n \"data-disabled\": disabled ? \"\" : undefined,\n \"aria-disabled\": disabled,\n ...restAttrs,\n \"onClick\": handleClick,\n \"onPointercancel\": (evt: PointerEvent) => {\n mouseClickHandled = false\n callListener(attrs.onPointercancel, evt)\n },\n },\n [\n StartIcon ? h(StartIcon, { class: s.StartIcon }) : null,\n h(\"span\", { class: s.TriggerText }, slots.default?.()),\n hasAnyTertiaryIndicator\n ? h(\"div\", { class: s.IndicatorWrapper }, [\n showClearAction\n ? h(\n Button,\n {\n \"aria-label\": \"Clear current value\",\n \"class\": s.Clear,\n // Prevent pointerdown on the trigger from being captured\n \"onPointerdown\": (evt: PointerEvent) => evt.stopPropagation(),\n \"onClick\": handleClearClick,\n \"color\": \"secondary\",\n \"variant\": hasDropdownIcon ? \"ghost\" : \"solid\",\n // Mostly custom sizing through variables\n \"size\": \"3xs\",\n \"uniform\": true,\n \"pill\": pill,\n \"data-only-child\": !hasDropdownIcon ? \"\" : undefined,\n },\n { default: () => [h(X)] },\n )\n : null,\n loading ? h(LoadingIndicator, { class: s.LoadingIndicator }) : null,\n // Using raw SVG canvases (opposed to fixed icon canvases) led to less pixelation.\n hasDropdownIcon ? h(DropdownIcon, { iconType: dropdownIconType }) : null,\n ])\n : null,\n ],\n )\n }\n },\n})\n\ntype SelectControlOwnProps = InstanceType<typeof SelectControlComponent>[\"$props\"]\n\n/** SelectControl props plus the <span> attributes that fall through to it, as in React. */\nexport type SelectControlProps = SelectControlOwnProps & Omit<HTMLAttributes, keyof SelectControlOwnProps>\n\n/**\n * The trigger of a select: placeholder styles, start icon, clear action,\n * loading and dropdown indicators. Pair it with any floating UI (MenuTrigger,\n * PopoverTrigger); the default slot is the control's content.\n */\nexport const SelectControl = SelectControlComponent as typeof SelectControlComponent & {\n new (): { $props: SelectControlProps }\n}\n\nexport const DropdownIcon = defineComponent({\n name: \"DropdownIcon\",\n props: {\n iconType: { type: String as PropType<Exclude<DropdownIconType, \"none\">>, required: true },\n },\n setup(props) {\n return () =>\n props.iconType === \"chevronDown\"\n ? h(ChevronDown, { \"data-no-autosize\": \"\", class: clsx(s.DropdownIcon, s.DropdownIconChevron) })\n : h(\"span\", { class: s.DropdownIcon, \"aria-hidden\": \"true\" }, [\n h(Dropdown, { \"data-no-autosize\": \"\", class: s.DropdownGlyph }),\n h(\"svg\", { \"data-no-autosize\": \"\", class: s.MobileDropdownGlyph, width: \"20\", height: \"20\", viewBox: \"0 0 20 20\", fill: \"none\", \"aria-hidden\": \"true\" }, [\n h(\"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 \"fill-rule\": \"evenodd\",\n \"clip-rule\": \"evenodd\",\n }),\n ]),\n ])\n },\n})\n"]}
|
|
1
|
+
{"version":3,"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Q,KAAK,aAAa;YAC9B,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,mBAAmB,CAAC,EAAE,CAAC;YAChG,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE;gBAC1D,CAAC,CAAC,QAAQ,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,aAAa,EAAE,CAAC;gBAC/D,CAAC,CAAC,KAAK,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,mBAAmB,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE;oBACvJ,CAAC,CAAC,MAAM,EAAE;wBACR,CAAC,EAAE,0nBAA0nB;wBAC7nB,IAAI,EAAE,cAAc;wBACpB,WAAW,EAAE,SAAS;wBACtB,WAAW,EAAE,SAAS;qBACvB,CAAC;iBACH,CAAC;aACH,CAAC,CAAA;IACV,CAAC;CACF,CAAC,CAAA","sourcesContent":["import clsx, { type ClassValue } from \"clsx\"\nimport { defineComponent, h, shallowRef, type Component, type HTMLAttributes, type PropType } from \"vue\"\nimport type { ControlSize, Variants } from \"@plexui/styles/types\"\nimport { handlePressableMouseEnter } from \"../../lib/helpers.js\"\nimport { isHoverPointer } from \"../../lib/inputMode.js\"\nimport { isNestedSelectControl } from \"../../lib/selectPress.js\"\nimport { Button } from \"../Button/index.js\"\nimport { ChevronDown, Dropdown, X } from \"../Icon/index.js\"\nimport { LoadingIndicator } from \"../Indicator/index.js\"\nimport s from \"@plexui/styles/components/SelectControl/SelectControl.module.css\"\n\n// Mouse press-drag-select and touch/assistive click activation mirror React.\n// Nested clear controls keep their own button semantics.\n\nexport type DropdownIconType = \"chevronDown\" | \"dropdown\" | \"none\"\n\ntype Listener = ((...args: never[]) => unknown) | Listener[] | null | undefined\n\n/** Calls a listener attribute, which Vue may hold as an array of handlers. */\nconst callListener = (listener: unknown, ...args: unknown[]) => {\n if (Array.isArray(listener)) {\n for (const handler of listener) callListener(handler, ...args)\n } else if (typeof listener === \"function\") {\n ;(listener as (...params: unknown[]) => unknown)(...args)\n }\n}\n\nconst SelectControlComponent = defineComponent({\n name: \"SelectControl\",\n inheritAttrs: false,\n props: {\n /** Style variant for the control. @default \"outline\" */\n variant: { type: String as PropType<Variants<\"soft\" | \"outline\" | \"ghost\">>, default: \"outline\" },\n /** Determines if the control should be a fully rounded pill shape. @default false */\n pill: { type: Boolean, default: false },\n /** Extends the control to 100% of available width. */\n block: { type: Boolean, default: undefined },\n /** Applies a negative margin using the current gutter to optically align the control with surrounding content. */\n opticallyAlign: String as PropType<\"start\" | \"end\">,\n /** Disables the control visually and from interactions. @default false */\n disabled: { type: Boolean, default: undefined },\n /** Visually indicates that the control is in an invalid state. @default false */\n invalid: { type: Boolean, default: undefined },\n /** Indicates that the control is selected. An unselected state will display placeholder styles. @default false */\n selected: { type: Boolean, default: false },\n /** Displays a clear action that allows the select to be unset; called when it is pressed (`@clear-click`). */\n onClearClick: Function as PropType<() => void>,\n /** Primary handler for when the control is selected with pointer or keyboard events (`@interact`). */\n onInteract: Function as PropType<() => void>,\n /** Enter interacts too, as on a combobox button. Off by default, as Enter may be an attempt to submit a form. @default false */\n interactOnEnter: { type: Boolean, default: false },\n /** Size and spacing of the control: `3xs` 22px up to `3xl` 48px. @default \"md\" */\n size: { type: String as PropType<ControlSize>, default: \"md\" },\n /** Displays a loading indicator in place of the dropdown icon and clear action. @default false */\n loading: { type: Boolean, default: undefined },\n /** Icon displayed in the far right of the control. @default \"dropdown\" */\n dropdownIconType: { type: String as PropType<DropdownIconType>, default: \"dropdown\" },\n /** Icon displayed at the start of the control */\n StartIcon: [Object, Function] as PropType<Component>,\n },\n setup(props, { slots, attrs }) {\n const controlRef = shallowRef<HTMLSpanElement | null>(null)\n let mouseClickHandled = false\n\n // Act like a <button> and fire the click handler on keyboard actions\n const handleKeyDown = (evt: KeyboardEvent) => {\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 callListener(attrs.onKeydown, evt)\n if (evt.defaultPrevented || evt.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\" && !props.interactOnEnter) {\n break\n }\n\n evt.stopPropagation()\n evt.preventDefault()\n\n controlRef.value?.click()\n break\n default:\n break\n }\n }\n\n const handlePointerDown = (evt: PointerEvent) => {\n mouseClickHandled = false\n if (isNestedSelectControl(evt)) return\n callListener(attrs.onPointerdown, evt)\n if (evt.defaultPrevented) {\n mouseClickHandled = true\n return\n }\n if (evt.button !== 0) return\n if (evt.pointerType === \"pen\" || !isHoverPointer(evt)) return\n evt.stopPropagation()\n mouseClickHandled = true\n if (props.onInteract) {\n evt.preventDefault()\n props.onInteract()\n } else {\n callListener(attrs.onClick, evt)\n }\n }\n\n const handleClick = (evt: MouseEvent) => {\n const handled = mouseClickHandled\n mouseClickHandled = false\n if (props.disabled || props.loading || evt.defaultPrevented || evt.button !== 0 || isNestedSelectControl(evt)) return\n if (handled && evt.detail !== 0) return\n evt.stopPropagation()\n if (props.onInteract) props.onInteract()\n else callListener(attrs.onClick, evt)\n }\n\n const handleClearClick = (evt: MouseEvent) => {\n evt.stopPropagation()\n evt.preventDefault()\n if (props.disabled || props.loading) return\n // The clear button disappears when the value becomes empty.\n controlRef.value?.focus({ preventScroll: true })\n props.onClearClick?.()\n }\n\n return () => {\n const {\n class: className,\n onPointerenter,\n ...restAttrs\n } = attrs as Record<string, unknown> & { onPointerenter?: Listener }\n delete restAttrs.onPointerdown\n delete restAttrs.onPointercancel\n delete restAttrs.onKeydown\n delete restAttrs.onClick\n const { disabled, loading, selected, pill, dropdownIconType, StartIcon } = props\n const clearable = !!props.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 // Intentionally not using <button> and rebuilding the semantics\n return h(\n \"span\",\n {\n \"ref\": controlRef,\n \"class\": clsx(s.SelectControl, className as ClassValue),\n // Recreate <button> semantics\n \"role\": \"button\",\n \"data-slot\": \"select-control\",\n \"tabindex\": disabled ? -1 : 0,\n \"onPointerenter\": (evt: PointerEvent) => {\n handlePressableMouseEnter(evt)\n callListener(onPointerenter, evt)\n },\n \"onPointerdown\": isInteractive ? handlePointerDown : undefined,\n \"onKeydown\": isInteractive ? handleKeyDown : undefined,\n \"data-variant\": props.variant,\n \"data-block\": props.block ? \"\" : undefined,\n \"data-pill\": pill ? \"\" : undefined,\n \"data-size\": props.size,\n \"data-optically-align\": props.opticallyAlign,\n \"aria-busy\": loading ? \"true\" : undefined,\n \"data-selected\": selected,\n \"data-loading\": loading ? \"\" : undefined,\n \"data-invalid\": props.invalid ? \"\" : undefined,\n \"data-disabled\": disabled ? \"\" : undefined,\n \"aria-disabled\": disabled,\n ...restAttrs,\n \"onClick\": handleClick,\n \"onPointercancel\": (evt: PointerEvent) => {\n mouseClickHandled = false\n callListener(attrs.onPointercancel, evt)\n },\n },\n [\n StartIcon ? h(StartIcon, { class: s.StartIcon }) : null,\n h(\"span\", { class: s.TriggerText }, slots.default?.()),\n hasAnyTertiaryIndicator\n ? h(\"div\", { class: s.IndicatorWrapper }, [\n showClearAction\n ? h(\n Button,\n {\n \"aria-label\": \"Clear current value\",\n \"class\": s.Clear,\n // Prevent pointerdown on the trigger from being captured\n \"onPointerdown\": (evt: PointerEvent) => evt.stopPropagation(),\n \"onClick\": handleClearClick,\n \"color\": \"secondary\",\n \"variant\": hasDropdownIcon ? \"ghost\" : \"solid\",\n // Mostly custom sizing through variables\n \"size\": \"3xs\",\n \"uniform\": true,\n \"pill\": pill,\n \"data-only-child\": !hasDropdownIcon ? \"\" : undefined,\n },\n { default: () => [h(X)] },\n )\n : null,\n loading ? h(LoadingIndicator, { class: s.LoadingIndicator }) : null,\n // Using raw SVG canvases (opposed to fixed icon canvases) led to less pixelation.\n hasDropdownIcon ? h(DropdownIcon, { iconType: dropdownIconType }) : null,\n ])\n : null,\n ],\n )\n }\n },\n})\n\ntype SelectControlOwnProps = InstanceType<typeof SelectControlComponent>[\"$props\"]\n\n/** SelectControl props plus the <span> attributes that fall through to it, as in React. */\nexport type SelectControlProps = SelectControlOwnProps & Omit<HTMLAttributes, keyof SelectControlOwnProps>\n\n/**\n * The trigger of a select: placeholder styles, start icon, clear action,\n * loading and dropdown indicators. Pair it with any floating UI (MenuTrigger,\n * PopoverTrigger); the default slot is the control's content.\n */\nexport const SelectControl = SelectControlComponent as typeof SelectControlComponent & {\n new (): { $props: SelectControlProps }\n}\n\nexport const DropdownIcon = defineComponent({\n name: \"DropdownIcon\",\n props: {\n iconType: { type: String as PropType<Exclude<DropdownIconType, \"none\">>, required: true },\n },\n setup(props) {\n return () =>\n props.iconType === \"chevronDown\"\n ? h(ChevronDown, { \"data-no-autosize\": \"\", class: clsx(s.DropdownIcon, s.DropdownIconChevron) })\n : h(\"span\", { class: s.DropdownIcon, \"aria-hidden\": \"true\" }, [\n h(Dropdown, { \"data-no-autosize\": \"\", class: s.DropdownGlyph }),\n h(\"svg\", { \"data-no-autosize\": \"\", class: s.MobileDropdownGlyph, width: \"20\", height: \"20\", viewBox: \"0 0 20 20\", fill: \"none\", \"aria-hidden\": \"true\" }, [\n h(\"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 \"fill-rule\": \"evenodd\",\n \"clip-rule\": \"evenodd\",\n }),\n ]),\n ])\n },\n})\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { computed, defineComponent, h, onBeforeUnmount, onMounted, ref, Text, } from "vue";
|
|
1
|
+
import { computed, defineComponent, Fragment, h, inject, onBeforeUnmount, onMounted, provide, ref, Text, } from "vue";
|
|
2
2
|
import { Button } from "../Button/index.js";
|
|
3
|
-
import { ChevronRightMd, Search as SearchIcon, Sidebar as SidebarIcon, X } from "../Icon/index.js";
|
|
3
|
+
import { ChevronRightMd, Disclosure, Search as SearchIcon, Sidebar as SidebarIcon, SidebarMenuMobile, X } from "../Icon/index.js";
|
|
4
4
|
import { Input } from "../Input/index.js";
|
|
5
5
|
import { Tooltip } from "../Tooltip/index.js";
|
|
6
6
|
import { composeEventHandlers, firstElementChild, flattenSlot, mergeSlotProps } from "../Tooltip/slot.js";
|
|
@@ -216,6 +216,10 @@ export const SidebarMenuItem = SidebarMenuItemComponent;
|
|
|
216
216
|
// =============================================
|
|
217
217
|
// Shared by every row of the rail: moving to the next one shows its label at once.
|
|
218
218
|
let railLeftAt = 0;
|
|
219
|
+
// Rows inside the mobile drawer end with a disclosure chevron (see the drawer list in the styles).
|
|
220
|
+
const sidebarDrawerKey = Symbol("SidebarDrawer");
|
|
221
|
+
/** The chevron of a drawer row that leads to another page. */
|
|
222
|
+
const menuDisclosure = () => h("span", { "class": s.MenuDisclosure, "aria-hidden": "true" }, [h(Disclosure)]);
|
|
219
223
|
const SidebarMenuButtonComponent = defineComponent({
|
|
220
224
|
name: "SidebarMenuButton",
|
|
221
225
|
inheritAttrs: false,
|
|
@@ -232,6 +236,7 @@ const SidebarMenuButtonComponent = defineComponent({
|
|
|
232
236
|
},
|
|
233
237
|
setup(props, { attrs, slots }) {
|
|
234
238
|
const sidebar = useSidebar();
|
|
239
|
+
const inDrawer = inject(sidebarDrawerKey, false);
|
|
235
240
|
const openDelay = ref();
|
|
236
241
|
return () => {
|
|
237
242
|
const { className, rest } = cleanAttrs(attrs);
|
|
@@ -251,7 +256,7 @@ const SidebarMenuButtonComponent = defineComponent({
|
|
|
251
256
|
});
|
|
252
257
|
}
|
|
253
258
|
const content = slots.default?.();
|
|
254
|
-
const wrap = (children) => h("span", { class: s.MenuButtonInner }, children);
|
|
259
|
+
const wrap = (children) => h("span", { class: s.MenuButtonInner }, inDrawer ? [children, menuDisclosure()] : children);
|
|
255
260
|
let button;
|
|
256
261
|
if (props.asChild) {
|
|
257
262
|
// With asChild the child element is the button, so the inner wrapper
|
|
@@ -382,6 +387,7 @@ const SidebarMenuSubButtonComponent = defineComponent({
|
|
|
382
387
|
indent: { type: Number, default: 0 },
|
|
383
388
|
},
|
|
384
389
|
setup(props, { attrs, slots }) {
|
|
390
|
+
const inDrawer = inject(sidebarDrawerKey, false);
|
|
385
391
|
return () => {
|
|
386
392
|
const { className, rest } = cleanAttrs(attrs);
|
|
387
393
|
const ownProps = {
|
|
@@ -390,7 +396,15 @@ const SidebarMenuSubButtonComponent = defineComponent({
|
|
|
390
396
|
"class": [s.MenuSubButton, s[`indent${props.indent}`], className],
|
|
391
397
|
...rest,
|
|
392
398
|
};
|
|
393
|
-
|
|
399
|
+
const content = slots.default?.();
|
|
400
|
+
if (!inDrawer)
|
|
401
|
+
return props.asChild ? renderAsChild(content, ownProps) : h("button", ownProps, content);
|
|
402
|
+
// In the drawer the disclosure follows the content, inside the child element with asChild
|
|
403
|
+
if (props.asChild) {
|
|
404
|
+
const child = firstElementChild(content);
|
|
405
|
+
return child ? mergeSlotProps(wrapChildContent(child, (inner) => h(Fragment, null, [inner, menuDisclosure()])), ownProps) : null;
|
|
406
|
+
}
|
|
407
|
+
return h("button", ownProps, [content, menuDisclosure()]);
|
|
394
408
|
};
|
|
395
409
|
},
|
|
396
410
|
});
|
|
@@ -518,8 +532,8 @@ export const SidebarMobileMenuButton = defineComponent({
|
|
|
518
532
|
...others,
|
|
519
533
|
}, [
|
|
520
534
|
h("span", { class: s.MobileMenuIcon }, [
|
|
521
|
-
h(
|
|
522
|
-
h(
|
|
535
|
+
h(SidebarMenuMobile, { "class": s.MobileMenuGlyph, "data-glyph": "menu" }),
|
|
536
|
+
h(X, { "class": s.MobileMenuGlyph, "data-glyph": "close" }),
|
|
523
537
|
]),
|
|
524
538
|
]);
|
|
525
539
|
};
|
|
@@ -537,6 +551,7 @@ const SidebarMobileComponent = defineComponent({
|
|
|
537
551
|
},
|
|
538
552
|
setup(props, { attrs, slots }) {
|
|
539
553
|
const sidebar = useSidebar();
|
|
554
|
+
provide(sidebarDrawerKey, true);
|
|
540
555
|
return () => {
|
|
541
556
|
const { className, rest } = cleanAttrs(attrs);
|
|
542
557
|
const contained = props.contained && s.contained;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.js","sourceRoot":"","sources":["../../../../src/components/Sidebar/Sidebar.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,EACD,eAAe,EACf,SAAS,EACT,GAAG,EACH,IAAI,GAUL,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,IAAI,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B,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAA0B,oBAAoB,EAAE,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n h,\n onBeforeUnmount,\n onMounted,\n ref,\n Text,\n type AnchorHTMLAttributes,\n type ButtonHTMLAttributes,\n type DefineComponent,\n type HTMLAttributes,\n type LiHTMLAttributes,\n type PropType,\n type Slots,\n type VNode,\n type VNodeArrayChildren,\n} from \"vue\"\nimport { Button } from \"../Button/index.js\"\nimport { ChevronRightMd, Search as SearchIcon, Sidebar as SidebarIcon, X } from \"../Icon/index.js\"\nimport { Input, type InputProps } from \"../Input/index.js\"\nimport { Tooltip } from \"../Tooltip/index.js\"\nimport { composeEventHandlers, firstElementChild, flattenSlot, mergeSlotProps } from \"../Tooltip/slot.js\"\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.js\"\n\n// Vue port of packages/ui/src/components/Sidebar/Sidebar.tsx. Exports are\n// flat, as in React's index. Every part renders its React element with the\n// caller's attributes applied after its own (React spreads `...props` last),\n// so a caller's attribute or listener replaces the part's own. `class` is\n// merged. An `@click` on SidebarTrigger or SidebarMobileMenuButton runs before\n// the toggle and cancels it with `preventDefault()`, as `onClick` does in\n// React. `data-toggle` (injected by MDX) is dropped, as React's `cleanProps`\n// does.\n// - `asChild` (SidebarGroupLabel, SidebarMenuButton, SidebarMenuSubButton)\n// merges into the first element of the default slot the way Radix's Slot\n// does. SidebarMenuButton puts its inner `<span>` inside that element,\n// around the element's own content, as React clones it; with no single\n// element child it merges into the inner `<span>` instead.\n// - ReactNode props are slots: SidebarMenuButton `tooltip` (prop or\n// `#tooltip` slot), SidebarTrigger's icon (default slot), SidebarInput's\n// `startAdornment` (slot, Search icon by default).\n// - Parts whose React children are fixed (SidebarMenuChevron,\n// SidebarMenuSkeleton, SidebarMobileMenuButton) ignore the default slot.\n\n// Re-export provider and composable\nexport { SidebarProvider, useSidebar }\nexport type { SidebarCollapsible, SidebarProviderVariant, SidebarSide, SidebarVariant }\n\ntype Attrs = Record<string, unknown>\n\n// Filter out attributes that shouldn't reach the DOM (e.g. injected by MDX)\nconst cleanAttrs = (attrs: Attrs) => {\n const { \"data-toggle\": _, class: className, ...rest } = attrs\n return { className, rest }\n}\n\n// An explicit type keeps the published declaration on Vue's `DefineComponent`\n// alias; an inferred one is expanded there and fails consumers' type checks\n// (`GlobalComponents` against `Record<string, Component>`, TS2344).\ntype Part<A> = DefineComponent & { new (): { $props: A } }\n\n/** A part that renders one element with its class and the caller's attributes. */\nconst part = <A>(name: string, tag: string, className: string | undefined): Part<A> => {\n const component = defineComponent({\n name,\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n return () => {\n const { className: userClass, rest } = cleanAttrs(attrs)\n return h(tag, { ...rest, class: [className, userClass] }, slots.default?.())\n }\n },\n })\n return component as unknown as Part<A>\n}\n\n// =============================================\n// Sidebar Root\n// =============================================\n\nconst SidebarComponent = defineComponent({\n name: \"Sidebar\",\n inheritAttrs: false,\n props: {\n /** The side the sidebar is on. @default \"left\" */\n side: { type: String as PropType<SidebarSide>, default: \"left\" },\n /** The visual variant of the sidebar. @default \"sidebar\" */\n variant: { type: String as PropType<SidebarVariant>, default: \"sidebar\" },\n },\n setup(props, { attrs, slots }) {\n const sidebar = useSidebar()\n\n return () => {\n // Skip rendering sidebar on mobile for offcanvas mode\n if (sidebar.isMobile && sidebar.collapsible === \"offcanvas\") {\n return null\n }\n\n const { className, rest } = cleanAttrs(attrs)\n return h(\n \"aside\",\n { \"data-side\": props.side, \"data-variant\": props.variant, \"class\": [s.Sidebar, className], ...rest },\n slots.default?.(),\n )\n }\n },\n})\n\nexport type SidebarProps = InstanceType<typeof SidebarComponent>[\"$props\"] & HTMLAttributes\n\n/** The sidebar container, an `<aside>`. Renders nothing on mobile in offcanvas mode. */\nexport const Sidebar = SidebarComponent as typeof SidebarComponent & { new (): { $props: SidebarProps } }\n\n// =============================================\n// Sidebar Sections\n// =============================================\n\nexport type SidebarHeaderProps = HTMLAttributes\n\n/** Sticky top area of the sidebar. */\nexport const SidebarHeader = part<SidebarHeaderProps>(\"SidebarHeader\", \"div\", s.Header)\n\nexport type SidebarContentProps = HTMLAttributes\n\n/**\n * Scrollable content area. Sets `data-content-scrollable` on the sidebar\n * while its content overflows.\n */\nexport const SidebarContent = defineComponent({\n name: \"SidebarContent\",\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n const contentEl = ref<HTMLDivElement | null>(null)\n let observer: ResizeObserver | undefined\n\n onMounted(() => {\n const el = contentEl.value\n if (!el) return\n const sidebar = el.parentElement\n if (!sidebar) return\n\n const update = () => {\n const hasOverflow = el.scrollHeight > el.clientHeight\n sidebar.setAttribute(\"data-content-scrollable\", hasOverflow ? \"true\" : \"false\")\n }\n update()\n observer = new ResizeObserver(update)\n observer.observe(el)\n })\n onBeforeUnmount(() => observer?.disconnect())\n\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"div\", { ref: contentEl, class: [s.Content, className], ...rest }, slots.default?.())\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarContentProps>>\n\nexport type SidebarFooterProps = HTMLAttributes\n\n/** Sticky bottom area of the sidebar, with a separator line on top. */\nexport const SidebarFooter = defineComponent({\n name: \"SidebarFooter\",\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"div\", { class: [s.Footer, className], ...rest }, [\n h(\"div\", { class: s.FooterSeparator }),\n slots.default?.(),\n ])\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarFooterProps>>\n\nexport type SidebarRailProps = HTMLAttributes\n\nexport const SidebarRail = part<SidebarRailProps>(\"SidebarRail\", \"div\", s.Rail)\n\n// =============================================\n// Groups\n// =============================================\n\nconst SidebarGroupComponent = defineComponent({\n name: \"SidebarGroup\",\n inheritAttrs: false,\n props: {\n /** Whether the group is open initially. A closed group hides its `SidebarGroupContent`. @default true */\n defaultOpen: { type: Boolean, default: true },\n /** Controlled open state. The group has no toggle of its own: change `open` from your own control. */\n open: { type: Boolean, default: undefined },\n },\n setup(props, { attrs, slots }) {\n // The initial value only, like an uncontrolled input's defaultValue\n const internalOpen = ref(props.defaultOpen)\n\n return () => {\n const open = props.open ?? internalOpen.value\n const { className, rest } = cleanAttrs(attrs)\n return h(\n \"div\",\n { \"data-state\": open ? \"open\" : \"closed\", \"class\": [s.Group, className], ...rest },\n slots.default?.(),\n )\n }\n },\n})\n\nexport type SidebarGroupProps = InstanceType<typeof SidebarGroupComponent>[\"$props\"] & HTMLAttributes\n\n/** Section within the content. `data-state` follows `open` / `defaultOpen`. */\nexport const SidebarGroup = SidebarGroupComponent as typeof SidebarGroupComponent & {\n new (): { $props: SidebarGroupProps }\n}\n\n/** Radix Slot: the first element of the slot, with `slotProps` merged in. */\nconst renderAsChild = (children: VNodeArrayChildren | undefined, slotProps: Attrs) => {\n const child = firstElementChild(children)\n return child ? mergeSlotProps(child, slotProps) : null\n}\n\n/**\n * React's `cloneElement(child, undefined, wrap(child.props.children))`: the\n * same element (key and ref kept) with its content, or its default slot for a\n * component such as RouterLink, passed through `wrap`.\n */\nconst wrapChildContent = (child: VNode, wrap: (content: VNodeArrayChildren | undefined) => VNode): VNode => {\n const content = child.children\n let children: VNodeArrayChildren | Slots\n if (content && typeof content === \"object\" && !Array.isArray(content)) {\n // Drop the compiled-slots flag so the new default slot is always used\n const { _: _compiled, ...slotFns } = content as Slots & { _?: unknown }\n children = { ...slotFns, default: () => [wrap(slotFns.default?.())] }\n } else {\n children = [wrap(typeof content === \"string\" ? [content] : (content ?? undefined))]\n }\n return h(child.type as string, { ...child.props, key: child.key ?? undefined, ref: child.ref as never }, children as never)\n}\n\nconst SidebarGroupLabelComponent = defineComponent({\n name: \"SidebarGroupLabel\",\n inheritAttrs: false,\n props: {\n /** Merges into the slot's first element instead of rendering a `<span>`. @default false */\n asChild: { type: Boolean, default: false },\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: { type: String as PropType<\"sm\" | \"lg\">, default: \"lg\" },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n const ownProps = { \"data-size\": props.size, \"class\": [s.GroupLabel, className], ...rest }\n return props.asChild ? renderAsChild(slots.default?.(), ownProps) : h(\"span\", ownProps, slots.default?.())\n }\n },\n})\n\nexport type SidebarGroupLabelProps = InstanceType<typeof SidebarGroupLabelComponent>[\"$props\"] & HTMLAttributes\n\n/** Section label within a SidebarGroup. */\nexport const SidebarGroupLabel = SidebarGroupLabelComponent as typeof SidebarGroupLabelComponent & {\n new (): { $props: SidebarGroupLabelProps }\n}\n\nexport type SidebarGroupActionProps = HTMLAttributes\n\nexport const SidebarGroupAction = part<SidebarGroupActionProps>(\"SidebarGroupAction\", \"div\", s.GroupAction)\n\nexport type SidebarGroupContentProps = HTMLAttributes\n\nexport const SidebarGroupContent = part<SidebarGroupContentProps>(\"SidebarGroupContent\", \"div\", s.GroupContent)\n\n// =============================================\n// Menu\n// =============================================\n\nexport type SidebarMenuProps = HTMLAttributes\n\n/** Navigation menu, a `<ul>`. */\nexport const SidebarMenu = part<SidebarMenuProps>(\"SidebarMenu\", \"ul\", s.Menu)\n\nconst SidebarMenuItemComponent = defineComponent({\n name: \"SidebarMenuItem\",\n inheritAttrs: false,\n props: {\n /** Marks the item as expanded (`data-expanded`), for chevrons and sub menus. */\n expanded: { type: Boolean, default: undefined },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\n \"li\",\n { \"data-expanded\": props.expanded ? \"true\" : undefined, \"class\": [s.MenuItem, className], ...rest },\n slots.default?.(),\n )\n }\n },\n})\n\nexport type SidebarMenuItemProps = InstanceType<typeof SidebarMenuItemComponent>[\"$props\"] & LiHTMLAttributes\n\n/** Menu item, an `<li>`. */\nexport const SidebarMenuItem = SidebarMenuItemComponent as typeof SidebarMenuItemComponent & {\n new (): { $props: SidebarMenuItemProps }\n}\n\n// =============================================\n// Menu Button\n// =============================================\n\n// Shared by every row of the rail: moving to the next one shows its label at once.\nlet railLeftAt = 0\n\nconst SidebarMenuButtonComponent = defineComponent({\n name: \"SidebarMenuButton\",\n inheritAttrs: false,\n props: {\n /** Whether the button is in an active/highlighted state. @default false */\n isActive: { type: Boolean, default: false },\n /**\n * Optional tooltip to show when the sidebar is collapsed (or the\n * `#tooltip` slot). Hidden on mobile.\n */\n tooltip: String,\n /** Whether to render the button as a custom element via Slot. @default false */\n asChild: { type: Boolean, default: false },\n },\n setup(props, { attrs, slots }) {\n const sidebar = useSidebar()\n const openDelay = ref<number>()\n\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n const hasTooltip = !!(props.tooltip || slots.tooltip)\n const ownProps: Record<string, unknown> = {\n \"data-active\": props.isActive ? \"true\" : \"false\",\n \"aria-current\": props.isActive ? \"page\" : undefined,\n \"class\": [s.MenuButton, className],\n ...rest,\n }\n if (hasTooltip) {\n ownProps.onPointerenter = composeEventHandlers(rest.onPointerenter, () => {\n openDelay.value = Date.now() - railLeftAt < 300 ? 0 : undefined\n })\n ownProps.onPointerleave = composeEventHandlers(rest.onPointerleave, () => {\n railLeftAt = Date.now()\n })\n }\n const content = slots.default?.()\n const wrap = (children: VNodeArrayChildren | undefined) => h(\"span\", { class: s.MenuButtonInner }, children)\n let button: VNode\n if (props.asChild) {\n // With asChild the child element is the button, so the inner wrapper\n // goes inside it. Wrapping the child instead would merge the button\n // attributes onto the wrapper span.\n // A lone text child is wrapped below rather than slotted\n const nodes = flattenSlot(content)\n const child = nodes.length === 1 && nodes[0].type !== Text ? nodes[0] : undefined\n button = mergeSlotProps(child ? wrapChildContent(child, wrap) : wrap(content), ownProps)\n } else {\n button = h(\"button\", ownProps, [wrap(content)])\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 (hasTooltip) {\n const shown = sidebar.state === \"collapsed\" && !sidebar.isMobile\n return h(\n Tooltip,\n { content: shown ? props.tooltip : null, openDelay: openDelay.value, side: \"right\" },\n { default: () => button, ...(slots.tooltip && shown ? { content: slots.tooltip } : {}) },\n )\n }\n\n return button\n }\n },\n})\n\nexport type SidebarMenuButtonProps = InstanceType<typeof SidebarMenuButtonComponent>[\"$props\"] & ButtonHTMLAttributes\n\n/** Menu item button. Shows its `tooltip` when the sidebar is collapsed to icons. */\nexport const SidebarMenuButton = SidebarMenuButtonComponent as typeof SidebarMenuButtonComponent & {\n new (): { $props: SidebarMenuButtonProps }\n}\n\n// =============================================\n// Menu Button Parts\n// =============================================\n\nexport type SidebarMenuButtonIconProps = HTMLAttributes\n\nexport const SidebarMenuButtonIcon = part<SidebarMenuButtonIconProps>(\n \"SidebarMenuButtonIcon\",\n \"span\",\n s.MenuButtonIcon,\n)\n\nconst SidebarMenuButtonLabelComponent = defineComponent({\n name: \"SidebarMenuButtonLabel\",\n inheritAttrs: false,\n props: {\n /** Shorter label rendered next to the full one (`data-short-label`). */\n shortLabel: String,\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return [\n h(\n \"span\",\n { \"data-long-label\": \"true\", \"class\": [s.MenuButtonLabel, className], ...rest },\n slots.default?.(),\n ),\n props.shortLabel\n ? h(\"span\", { \"data-short-label\": \"true\", \"class\": [s.MenuButtonLabel, className] }, props.shortLabel)\n : null,\n ]\n }\n },\n})\n\nexport type SidebarMenuButtonLabelProps = InstanceType<typeof SidebarMenuButtonLabelComponent>[\"$props\"] & HTMLAttributes\n\nexport const SidebarMenuButtonLabel = SidebarMenuButtonLabelComponent as typeof SidebarMenuButtonLabelComponent & {\n new (): { $props: SidebarMenuButtonLabelProps }\n}\n\n// =============================================\n// Menu Chevron (Expand/Collapse Toggle)\n// =============================================\n\nexport type SidebarMenuChevronProps = HTMLAttributes\n\nexport const SidebarMenuChevron = defineComponent({\n name: \"SidebarMenuChevron\",\n inheritAttrs: false,\n setup(_props, { attrs }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"span\", { class: [s.MenuChevron, className], ...rest }, [h(ChevronRightMd)])\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarMenuChevronProps>>\n\n// =============================================\n// Menu Badge & Action\n// =============================================\n\nexport type SidebarMenuBadgeProps = HTMLAttributes\n\nexport const SidebarMenuBadge = part<SidebarMenuBadgeProps>(\"SidebarMenuBadge\", \"span\", s.MenuBadge)\n\nexport type SidebarMenuActionProps = HTMLAttributes\n\nexport const SidebarMenuAction = part<SidebarMenuActionProps>(\"SidebarMenuAction\", \"div\", s.MenuAction)\n\n// =============================================\n// Menu Skeleton\n// =============================================\n\nconst SidebarMenuSkeletonComponent = defineComponent({\n name: \"SidebarMenuSkeleton\",\n inheritAttrs: false,\n props: {\n /** Renders the icon placeholder. @default true */\n showIcon: { type: Boolean, default: true },\n /** Width of the label skeleton (e.g., \"60%\", \"80%\", \"100px\"). @default \"60%\" */\n labelWidth: { type: String, default: \"60%\" },\n },\n setup(props, { attrs }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"div\", { \"data-skeleton\": \"true\", \"class\": [s.MenuSkeleton, className], ...rest }, [\n props.showIcon ? h(\"div\", { class: s.MenuSkeletonIcon }) : null,\n h(\"div\", { class: s.MenuSkeletonLabel, style: { width: props.labelWidth } }),\n ])\n }\n },\n})\n\nexport type SidebarMenuSkeletonProps = InstanceType<typeof SidebarMenuSkeletonComponent>[\"$props\"] & HTMLAttributes\n\nexport const SidebarMenuSkeleton = SidebarMenuSkeletonComponent as typeof SidebarMenuSkeletonComponent & {\n new (): { $props: SidebarMenuSkeletonProps }\n}\n\n// =============================================\n// Submenu\n// =============================================\n\nconst SidebarMenuSubComponent = defineComponent({\n name: \"SidebarMenuSub\",\n inheritAttrs: false,\n props: {\n /** Whether the submenu is expanded. @default true */\n open: { type: Boolean, default: true },\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 * @default false\n */\n hasIcons: { type: Boolean, default: false },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\n \"ul\",\n {\n \"data-state\": props.open ? \"open\" : \"closed\",\n \"data-has-icons\": props.hasIcons ? \"true\" : undefined,\n // Collapsed items are only hidden visually: keep them out of the tab\n // order. \"\" renders `inert=\"\"` (a DOM property in browsers)\n \"inert\": props.open ? undefined : \"\",\n \"class\": [s.MenuSub, className],\n ...rest,\n },\n slots.default?.(),\n )\n }\n },\n})\n\nexport type SidebarMenuSubProps = InstanceType<typeof SidebarMenuSubComponent>[\"$props\"] & HTMLAttributes\n\nexport const SidebarMenuSub = SidebarMenuSubComponent as typeof SidebarMenuSubComponent & {\n new (): { $props: SidebarMenuSubProps }\n}\n\nexport type SidebarMenuSubItemProps = LiHTMLAttributes\n\nexport const SidebarMenuSubItem = part<SidebarMenuSubItemProps>(\"SidebarMenuSubItem\", \"li\", s.MenuSubItem)\n\nconst SidebarMenuSubButtonComponent = defineComponent({\n name: \"SidebarMenuSubButton\",\n inheritAttrs: false,\n props: {\n /** Whether the button is in an active/highlighted state. @default false */\n isActive: { type: Boolean, default: false },\n /** Merges into the slot's first element instead of rendering a `<button>`. @default false */\n asChild: { type: Boolean, default: false },\n /**\n * Indent level for nested items (0-3).\n * Each level adds 12px of left margin.\n * @default 0\n */\n indent: { type: Number as PropType<0 | 1 | 2 | 3>, default: 0 },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n const ownProps = {\n \"data-active\": props.isActive ? \"true\" : \"false\",\n \"aria-current\": props.isActive ? \"page\" : undefined,\n \"class\": [s.MenuSubButton, s[`indent${props.indent}`], className],\n ...rest,\n }\n return props.asChild ? renderAsChild(slots.default?.(), ownProps) : h(\"button\", ownProps, slots.default?.())\n }\n },\n})\n\nexport type SidebarMenuSubButtonProps = InstanceType<typeof SidebarMenuSubButtonComponent>[\"$props\"] & ButtonHTMLAttributes\n\nexport const SidebarMenuSubButton = SidebarMenuSubButtonComponent as typeof SidebarMenuSubButtonComponent & {\n new (): { $props: SidebarMenuSubButtonProps }\n}\n\n// =============================================\n// Separator\n// =============================================\n\nexport type SidebarSeparatorProps = HTMLAttributes\n\nexport const SidebarSeparator = defineComponent({\n name: \"SidebarSeparator\",\n inheritAttrs: false,\n setup(_props, { attrs }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"hr\", { class: [s.Separator, className], ...rest })\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarSeparatorProps>>\n\n// =============================================\n// Card\n// =============================================\n\nconst SidebarCardComponent = defineComponent({\n name: \"SidebarCard\",\n inheritAttrs: false,\n props: {\n /** Visual variant. @default \"default\" */\n variant: { type: String as PropType<\"default\" | \"elevated\">, default: \"default\" },\n /** Shows a dismiss button. @default false */\n dismissible: { type: Boolean, default: false },\n },\n emits: {\n /** The dismiss button was clicked */\n dismiss: (_event: MouseEvent) => true,\n },\n setup(props, { attrs, slots, emit }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"div\", { \"data-variant\": props.variant, \"class\": [s.Card, className], ...rest }, [\n props.dismissible\n ? h(\n Button,\n {\n \"uniform\": true,\n \"size\": \"3xs\",\n \"variant\": \"ghost\",\n \"color\": \"secondary\",\n \"class\": s.CardDismiss,\n \"onClick\": (event: MouseEvent) => emit(\"dismiss\", event),\n \"aria-label\": \"Dismiss\",\n },\n { default: () => h(X) },\n )\n : null,\n slots.default?.(),\n ])\n }\n },\n})\n\nexport type SidebarCardProps = InstanceType<typeof SidebarCardComponent>[\"$props\"] & HTMLAttributes\n\n/** Promotional card for CTAs, upgrades or announcements. */\nexport const SidebarCard = SidebarCardComponent as typeof SidebarCardComponent & {\n new (): { $props: SidebarCardProps }\n}\n\nexport type SidebarCardHeaderProps = HTMLAttributes\n\nexport const SidebarCardHeader = part<SidebarCardHeaderProps>(\"SidebarCardHeader\", \"div\", s.CardHeader)\n\nexport type SidebarCardTitleProps = HTMLAttributes\n\nexport const SidebarCardTitle = part<SidebarCardTitleProps>(\"SidebarCardTitle\", \"div\", s.CardTitle)\n\nexport type SidebarCardTitleLinkProps = AnchorHTMLAttributes\n\nexport const SidebarCardTitleLink = defineComponent({\n name: \"SidebarCardTitleLink\",\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"a\", { class: [s.CardTitleLink, className], ...rest }, [\n slots.default?.(),\n h(ChevronRightMd, { class: s.CardTitleChevron }),\n ])\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarCardTitleLinkProps>>\n\nexport type SidebarCardContentProps = HTMLAttributes\n\nexport const SidebarCardContent = part<SidebarCardContentProps>(\"SidebarCardContent\", \"div\", s.CardContent)\n\nexport type SidebarCardFooterProps = HTMLAttributes\n\nexport const SidebarCardFooter = part<SidebarCardFooterProps>(\"SidebarCardFooter\", \"div\", s.CardFooter)\n\n// =============================================\n// Inset (Main Content Area)\n// =============================================\n\nexport type SidebarInsetProps = HTMLAttributes\n\n/** Main content area next to the sidebar, a `<main>`. */\nexport const SidebarInset = part<SidebarInsetProps>(\"SidebarInset\", \"main\", s.Inset)\n\n// =============================================\n// Layout Container\n// =============================================\n\nexport type SidebarLayoutProps = HTMLAttributes\n\n/** Wrapper for the sidebar and the main content. */\nexport const SidebarLayout = part<SidebarLayoutProps>(\"SidebarLayout\", \"div\", s.SidebarLayout)\n\n// =============================================\n// Trigger (Collapse Button)\n// =============================================\n\nexport type SidebarTriggerProps = ButtonHTMLAttributes\n\n/**\n * Collapse button. The default slot replaces the icon. Renders nothing when\n * `collapsible=\"none\"`.\n */\nexport const SidebarTrigger = defineComponent({\n name: \"SidebarTrigger\",\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n const sidebar = useSidebar()\n\n return () => {\n // Don't render if collapsible=\"none\" (text-only sidebars)\n if (sidebar.collapsible === \"none\") {\n return null\n }\n\n const { className, rest } = cleanAttrs(attrs)\n const { onClick, ...others } = rest\n return h(\n \"button\",\n {\n \"type\": \"button\",\n \"class\": [s.Trigger, className],\n // The caller's listener runs first and can cancel the toggle\n \"onClick\": composeEventHandlers(onClick, () => sidebar.toggleSidebar()),\n \"aria-label\": sidebar.isMobile\n ? \"Open menu\"\n : sidebar.state === \"expanded\"\n ? \"Collapse sidebar\"\n : \"Expand sidebar\",\n ...others,\n },\n [\n h(\"span\", { class: s.TriggerInner }, [\n // One icon for both states: the tooltip, not the icon, says what a press does\n h(\"span\", { class: s.TriggerIcon }, slots.default ? slots.default() : [h(SidebarIcon)]),\n ]),\n ],\n )\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarTriggerProps>>\n\n// =============================================\n// Mobile Menu Button (Hamburger → X)\n// =============================================\n\nexport type SidebarMobileMenuButtonProps = ButtonHTMLAttributes\n\nexport const SidebarMobileMenuButton = defineComponent({\n name: \"SidebarMobileMenuButton\",\n inheritAttrs: false,\n setup(_props, { attrs }) {\n const sidebar = useSidebar()\n\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n const { onClick, ...others } = rest\n return h(\n \"button\",\n {\n \"type\": \"button\",\n \"data-expanded\": sidebar.openMobile ? \"\" : undefined,\n \"class\": [s.MobileMenuButton, className],\n // The caller's listener runs first and can cancel the toggle\n \"onClick\": composeEventHandlers(onClick, () => sidebar.setOpenMobile(!sidebar.openMobile)),\n \"aria-label\": sidebar.openMobile ? \"Close menu\" : \"Open menu\",\n ...others,\n },\n [\n h(\"span\", { class: s.MobileMenuIcon }, [\n h(\"span\", { \"class\": s.MobileMenuLine, \"data-top\": \"true\" }),\n h(\"span\", { class: s.MobileMenuMiddle }, [h(\"span\", { \"class\": s.MobileMenuLine, \"data-bottom\": \"true\" })]),\n ]),\n ],\n )\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarMobileMenuButtonProps>>\n\n// =============================================\n// Mobile Sidebar\n// =============================================\n\nconst SidebarMobileComponent = defineComponent({\n name: \"SidebarMobile\",\n inheritAttrs: false,\n props: {\n /** When true, drawer is positioned absolute instead of fixed (for contained demos) */\n contained: { type: Boolean, default: undefined },\n },\n setup(props, { attrs, slots }) {\n const sidebar = useSidebar()\n\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n const contained = props.contained && s.contained\n return [\n // Backdrop\n h(\"div\", {\n \"class\": [s.MobileBackdrop, contained],\n \"onClick\": () => sidebar.setOpenMobile(false),\n \"aria-hidden\": \"true\",\n }),\n // Drawer\n h(\"div\", { class: [s.MobileSidebar, contained, className], ...rest }, slots.default?.()),\n ]\n }\n },\n})\n\nexport type SidebarMobileProps = InstanceType<typeof SidebarMobileComponent>[\"$props\"] & HTMLAttributes\n\nexport const SidebarMobile = SidebarMobileComponent as typeof SidebarMobileComponent & {\n new (): { $props: SidebarMobileProps }\n}\n\nexport type SidebarMobileHeaderProps = HTMLAttributes\n\nexport const SidebarMobileHeader = part<SidebarMobileHeaderProps>(\"SidebarMobileHeader\", \"div\", s.MobileHeader)\n\nexport type SidebarMobileFooterProps = HTMLAttributes\n\nexport const SidebarMobileFooter = part<SidebarMobileFooterProps>(\"SidebarMobileFooter\", \"div\", s.MobileFooter)\n\n// =============================================\n// Input (Search)\n// =============================================\n\nexport type SidebarInputProps = InputProps\n\n/**\n * Search input: an Input with a Search icon in its `startAdornment` slot.\n * Every attribute, listener and slot goes to the Input (`v-model:value`,\n * `@clear`, ...). A template ref gets the Input's `focus()` and `input`\n * (React forwards its ref to the <input>).\n */\nexport const SidebarInput = defineComponent({\n name: \"SidebarInput\",\n inheritAttrs: false,\n setup(_props, { attrs, slots, expose }) {\n // Input's exposed API\n const inputComponent = ref<{ input: HTMLInputElement | null; focus: () => void } | null>(null)\n\n expose({\n focus: () => inputComponent.value?.focus(),\n input: computed(() => inputComponent.value?.input ?? null),\n })\n\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"div\", { class: s.Input }, [\n h(\n Input,\n { class: className, ...rest, ref: inputComponent },\n { ...slots, startAdornment: slots.startAdornment ?? (() => h(SearchIcon)) },\n ),\n ])\n }\n },\n}) as unknown as typeof Input\n\n// =============================================\n// Footer Links\n// =============================================\n\nexport type SidebarFooterLinksProps = HTMLAttributes\n\nexport const SidebarFooterLinks = part<SidebarFooterLinksProps>(\"SidebarFooterLinks\", \"div\", s.FooterLinks)\n"]}
|
|
1
|
+
{"version":3,"file":"Sidebar.js","sourceRoot":"","sources":["../../../../src/components/Sidebar/Sidebar.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,QAAQ,EACR,CAAC,EACD,MAAM,EACN,eAAe,EACf,SAAS,EACT,OAAO,EACP,GAAG,EACH,IAAI,GAWL,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,IAAI,UAAU,EAAE,OAAO,IAAI,WAAW,EAAE,iBAAiB,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAA;AACjI,OAAO,EAAE,KAAK,EAAmB,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACzG,OAAO,CAAC,MAAM,sDAAsD,CAAA;AACpE,OAAO,EACL,eAAe,EACf,UAAU,GAKX,MAAM,wBAAwB,CAAA;AAE/B,0EAA0E;AAC1E,2EAA2E;AAC3E,6EAA6E;AAC7E,0EAA0E;AAC1E,+EAA+E;AAC/E,0EAA0E;AAC1E,6EAA6E;AAC7E,QAAQ;AACR,2EAA2E;AAC3E,2EAA2E;AAC3E,yEAAyE;AACzE,yEAAyE;AACzE,6DAA6D;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CAAC,CAAA;YAC7C,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE;gBAClC,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,cAAc,EAAE,EAClD,EAAE,GAAG,KAAK,EAAE,cAAc,EAAE,KAAK,CAAC,cAAc,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,CAC5E;aACF,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAA4B,CAAA;AAQ7B,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAA0B,oBAAoB,EAAE,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n Fragment,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n Text,\n type AnchorHTMLAttributes,\n type ButtonHTMLAttributes,\n type DefineComponent,\n type HTMLAttributes,\n type InjectionKey,\n type LiHTMLAttributes,\n type PropType,\n type Slots,\n type VNode,\n type VNodeArrayChildren,\n} from \"vue\"\nimport { Button } from \"../Button/index.js\"\nimport { ChevronRightMd, Disclosure, Search as SearchIcon, Sidebar as SidebarIcon, SidebarMenuMobile, X } from \"../Icon/index.js\"\nimport { Input, type InputProps } from \"../Input/index.js\"\nimport { Tooltip } from \"../Tooltip/index.js\"\nimport { composeEventHandlers, firstElementChild, flattenSlot, mergeSlotProps } from \"../Tooltip/slot.js\"\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.js\"\n\n// Vue port of packages/ui/src/components/Sidebar/Sidebar.tsx. Exports are\n// flat, as in React's index. Every part renders its React element with the\n// caller's attributes applied after its own (React spreads `...props` last),\n// so a caller's attribute or listener replaces the part's own. `class` is\n// merged. An `@click` on SidebarTrigger or SidebarMobileMenuButton runs before\n// the toggle and cancels it with `preventDefault()`, as `onClick` does in\n// React. `data-toggle` (injected by MDX) is dropped, as React's `cleanProps`\n// does.\n// - `asChild` (SidebarGroupLabel, SidebarMenuButton, SidebarMenuSubButton)\n// merges into the first element of the default slot the way Radix's Slot\n// does. SidebarMenuButton puts its inner `<span>` inside that element,\n// around the element's own content, as React clones it; with no single\n// element child it merges into the inner `<span>` instead.\n// - ReactNode props are slots: SidebarMenuButton `tooltip` (prop or\n// `#tooltip` slot), SidebarTrigger's icon (default slot), SidebarInput's\n// `startAdornment` (slot, Search icon by default).\n// - Parts whose React children are fixed (SidebarMenuChevron,\n// SidebarMenuSkeleton, SidebarMobileMenuButton) ignore the default slot.\n\n// Re-export provider and composable\nexport { SidebarProvider, useSidebar }\nexport type { SidebarCollapsible, SidebarProviderVariant, SidebarSide, SidebarVariant }\n\ntype Attrs = Record<string, unknown>\n\n// Filter out attributes that shouldn't reach the DOM (e.g. injected by MDX)\nconst cleanAttrs = (attrs: Attrs) => {\n const { \"data-toggle\": _, class: className, ...rest } = attrs\n return { className, rest }\n}\n\n// An explicit type keeps the published declaration on Vue's `DefineComponent`\n// alias; an inferred one is expanded there and fails consumers' type checks\n// (`GlobalComponents` against `Record<string, Component>`, TS2344).\ntype Part<A> = DefineComponent & { new (): { $props: A } }\n\n/** A part that renders one element with its class and the caller's attributes. */\nconst part = <A>(name: string, tag: string, className: string | undefined): Part<A> => {\n const component = defineComponent({\n name,\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n return () => {\n const { className: userClass, rest } = cleanAttrs(attrs)\n return h(tag, { ...rest, class: [className, userClass] }, slots.default?.())\n }\n },\n })\n return component as unknown as Part<A>\n}\n\n// =============================================\n// Sidebar Root\n// =============================================\n\nconst SidebarComponent = defineComponent({\n name: \"Sidebar\",\n inheritAttrs: false,\n props: {\n /** The side the sidebar is on. @default \"left\" */\n side: { type: String as PropType<SidebarSide>, default: \"left\" },\n /** The visual variant of the sidebar. @default \"sidebar\" */\n variant: { type: String as PropType<SidebarVariant>, default: \"sidebar\" },\n },\n setup(props, { attrs, slots }) {\n const sidebar = useSidebar()\n\n return () => {\n // Skip rendering sidebar on mobile for offcanvas mode\n if (sidebar.isMobile && sidebar.collapsible === \"offcanvas\") {\n return null\n }\n\n const { className, rest } = cleanAttrs(attrs)\n return h(\n \"aside\",\n { \"data-side\": props.side, \"data-variant\": props.variant, \"class\": [s.Sidebar, className], ...rest },\n slots.default?.(),\n )\n }\n },\n})\n\nexport type SidebarProps = InstanceType<typeof SidebarComponent>[\"$props\"] & HTMLAttributes\n\n/** The sidebar container, an `<aside>`. Renders nothing on mobile in offcanvas mode. */\nexport const Sidebar = SidebarComponent as typeof SidebarComponent & { new (): { $props: SidebarProps } }\n\n// =============================================\n// Sidebar Sections\n// =============================================\n\nexport type SidebarHeaderProps = HTMLAttributes\n\n/** Sticky top area of the sidebar. */\nexport const SidebarHeader = part<SidebarHeaderProps>(\"SidebarHeader\", \"div\", s.Header)\n\nexport type SidebarContentProps = HTMLAttributes\n\n/**\n * Scrollable content area. Sets `data-content-scrollable` on the sidebar\n * while its content overflows.\n */\nexport const SidebarContent = defineComponent({\n name: \"SidebarContent\",\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n const contentEl = ref<HTMLDivElement | null>(null)\n let observer: ResizeObserver | undefined\n\n onMounted(() => {\n const el = contentEl.value\n if (!el) return\n const sidebar = el.parentElement\n if (!sidebar) return\n\n const update = () => {\n const hasOverflow = el.scrollHeight > el.clientHeight\n sidebar.setAttribute(\"data-content-scrollable\", hasOverflow ? \"true\" : \"false\")\n }\n update()\n observer = new ResizeObserver(update)\n observer.observe(el)\n })\n onBeforeUnmount(() => observer?.disconnect())\n\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"div\", { ref: contentEl, class: [s.Content, className], ...rest }, slots.default?.())\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarContentProps>>\n\nexport type SidebarFooterProps = HTMLAttributes\n\n/** Sticky bottom area of the sidebar, with a separator line on top. */\nexport const SidebarFooter = defineComponent({\n name: \"SidebarFooter\",\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"div\", { class: [s.Footer, className], ...rest }, [\n h(\"div\", { class: s.FooterSeparator }),\n slots.default?.(),\n ])\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarFooterProps>>\n\nexport type SidebarRailProps = HTMLAttributes\n\nexport const SidebarRail = part<SidebarRailProps>(\"SidebarRail\", \"div\", s.Rail)\n\n// =============================================\n// Groups\n// =============================================\n\nconst SidebarGroupComponent = defineComponent({\n name: \"SidebarGroup\",\n inheritAttrs: false,\n props: {\n /** Whether the group is open initially. A closed group hides its `SidebarGroupContent`. @default true */\n defaultOpen: { type: Boolean, default: true },\n /** Controlled open state. The group has no toggle of its own: change `open` from your own control. */\n open: { type: Boolean, default: undefined },\n },\n setup(props, { attrs, slots }) {\n // The initial value only, like an uncontrolled input's defaultValue\n const internalOpen = ref(props.defaultOpen)\n\n return () => {\n const open = props.open ?? internalOpen.value\n const { className, rest } = cleanAttrs(attrs)\n return h(\n \"div\",\n { \"data-state\": open ? \"open\" : \"closed\", \"class\": [s.Group, className], ...rest },\n slots.default?.(),\n )\n }\n },\n})\n\nexport type SidebarGroupProps = InstanceType<typeof SidebarGroupComponent>[\"$props\"] & HTMLAttributes\n\n/** Section within the content. `data-state` follows `open` / `defaultOpen`. */\nexport const SidebarGroup = SidebarGroupComponent as typeof SidebarGroupComponent & {\n new (): { $props: SidebarGroupProps }\n}\n\n/** Radix Slot: the first element of the slot, with `slotProps` merged in. */\nconst renderAsChild = (children: VNodeArrayChildren | undefined, slotProps: Attrs) => {\n const child = firstElementChild(children)\n return child ? mergeSlotProps(child, slotProps) : null\n}\n\n/**\n * React's `cloneElement(child, undefined, wrap(child.props.children))`: the\n * same element (key and ref kept) with its content, or its default slot for a\n * component such as RouterLink, passed through `wrap`.\n */\nconst wrapChildContent = (child: VNode, wrap: (content: VNodeArrayChildren | undefined) => VNode): VNode => {\n const content = child.children\n let children: VNodeArrayChildren | Slots\n if (content && typeof content === \"object\" && !Array.isArray(content)) {\n // Drop the compiled-slots flag so the new default slot is always used\n const { _: _compiled, ...slotFns } = content as Slots & { _?: unknown }\n children = { ...slotFns, default: () => [wrap(slotFns.default?.())] }\n } else {\n children = [wrap(typeof content === \"string\" ? [content] : (content ?? undefined))]\n }\n return h(child.type as string, { ...child.props, key: child.key ?? undefined, ref: child.ref as never }, children as never)\n}\n\nconst SidebarGroupLabelComponent = defineComponent({\n name: \"SidebarGroupLabel\",\n inheritAttrs: false,\n props: {\n /** Merges into the slot's first element instead of rendering a `<span>`. @default false */\n asChild: { type: Boolean, default: false },\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: { type: String as PropType<\"sm\" | \"lg\">, default: \"lg\" },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n const ownProps = { \"data-size\": props.size, \"class\": [s.GroupLabel, className], ...rest }\n return props.asChild ? renderAsChild(slots.default?.(), ownProps) : h(\"span\", ownProps, slots.default?.())\n }\n },\n})\n\nexport type SidebarGroupLabelProps = InstanceType<typeof SidebarGroupLabelComponent>[\"$props\"] & HTMLAttributes\n\n/** Section label within a SidebarGroup. */\nexport const SidebarGroupLabel = SidebarGroupLabelComponent as typeof SidebarGroupLabelComponent & {\n new (): { $props: SidebarGroupLabelProps }\n}\n\nexport type SidebarGroupActionProps = HTMLAttributes\n\nexport const SidebarGroupAction = part<SidebarGroupActionProps>(\"SidebarGroupAction\", \"div\", s.GroupAction)\n\nexport type SidebarGroupContentProps = HTMLAttributes\n\nexport const SidebarGroupContent = part<SidebarGroupContentProps>(\"SidebarGroupContent\", \"div\", s.GroupContent)\n\n// =============================================\n// Menu\n// =============================================\n\nexport type SidebarMenuProps = HTMLAttributes\n\n/** Navigation menu, a `<ul>`. */\nexport const SidebarMenu = part<SidebarMenuProps>(\"SidebarMenu\", \"ul\", s.Menu)\n\nconst SidebarMenuItemComponent = defineComponent({\n name: \"SidebarMenuItem\",\n inheritAttrs: false,\n props: {\n /** Marks the item as expanded (`data-expanded`), for chevrons and sub menus. */\n expanded: { type: Boolean, default: undefined },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\n \"li\",\n { \"data-expanded\": props.expanded ? \"true\" : undefined, \"class\": [s.MenuItem, className], ...rest },\n slots.default?.(),\n )\n }\n },\n})\n\nexport type SidebarMenuItemProps = InstanceType<typeof SidebarMenuItemComponent>[\"$props\"] & LiHTMLAttributes\n\n/** Menu item, an `<li>`. */\nexport const SidebarMenuItem = SidebarMenuItemComponent as typeof SidebarMenuItemComponent & {\n new (): { $props: SidebarMenuItemProps }\n}\n\n// =============================================\n// Menu Button\n// =============================================\n\n// Shared by every row of the rail: moving to the next one shows its label at once.\nlet railLeftAt = 0\n\n// Rows inside the mobile drawer end with a disclosure chevron (see the drawer list in the styles).\nconst sidebarDrawerKey: InjectionKey<boolean> = Symbol(\"SidebarDrawer\")\n\n/** The chevron of a drawer row that leads to another page. */\nconst menuDisclosure = () => h(\"span\", { \"class\": s.MenuDisclosure, \"aria-hidden\": \"true\" }, [h(Disclosure)])\n\nconst SidebarMenuButtonComponent = defineComponent({\n name: \"SidebarMenuButton\",\n inheritAttrs: false,\n props: {\n /** Whether the button is in an active/highlighted state. @default false */\n isActive: { type: Boolean, default: false },\n /**\n * Optional tooltip to show when the sidebar is collapsed (or the\n * `#tooltip` slot). Hidden on mobile.\n */\n tooltip: String,\n /** Whether to render the button as a custom element via Slot. @default false */\n asChild: { type: Boolean, default: false },\n },\n setup(props, { attrs, slots }) {\n const sidebar = useSidebar()\n const inDrawer = inject(sidebarDrawerKey, false)\n const openDelay = ref<number>()\n\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n const hasTooltip = !!(props.tooltip || slots.tooltip)\n const ownProps: Record<string, unknown> = {\n \"data-active\": props.isActive ? \"true\" : \"false\",\n \"aria-current\": props.isActive ? \"page\" : undefined,\n \"class\": [s.MenuButton, className],\n ...rest,\n }\n if (hasTooltip) {\n ownProps.onPointerenter = composeEventHandlers(rest.onPointerenter, () => {\n openDelay.value = Date.now() - railLeftAt < 300 ? 0 : undefined\n })\n ownProps.onPointerleave = composeEventHandlers(rest.onPointerleave, () => {\n railLeftAt = Date.now()\n })\n }\n const content = slots.default?.()\n const wrap = (children: VNodeArrayChildren | undefined) =>\n h(\"span\", { class: s.MenuButtonInner }, inDrawer ? [children, menuDisclosure()] : children)\n let button: VNode\n if (props.asChild) {\n // With asChild the child element is the button, so the inner wrapper\n // goes inside it. Wrapping the child instead would merge the button\n // attributes onto the wrapper span.\n // A lone text child is wrapped below rather than slotted\n const nodes = flattenSlot(content)\n const child = nodes.length === 1 && nodes[0].type !== Text ? nodes[0] : undefined\n button = mergeSlotProps(child ? wrapChildContent(child, wrap) : wrap(content), ownProps)\n } else {\n button = h(\"button\", ownProps, [wrap(content)])\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 (hasTooltip) {\n const shown = sidebar.state === \"collapsed\" && !sidebar.isMobile\n return h(\n Tooltip,\n { content: shown ? props.tooltip : null, openDelay: openDelay.value, side: \"right\" },\n { default: () => button, ...(slots.tooltip && shown ? { content: slots.tooltip } : {}) },\n )\n }\n\n return button\n }\n },\n})\n\nexport type SidebarMenuButtonProps = InstanceType<typeof SidebarMenuButtonComponent>[\"$props\"] & ButtonHTMLAttributes\n\n/** Menu item button. Shows its `tooltip` when the sidebar is collapsed to icons. */\nexport const SidebarMenuButton = SidebarMenuButtonComponent as typeof SidebarMenuButtonComponent & {\n new (): { $props: SidebarMenuButtonProps }\n}\n\n// =============================================\n// Menu Button Parts\n// =============================================\n\nexport type SidebarMenuButtonIconProps = HTMLAttributes\n\nexport const SidebarMenuButtonIcon = part<SidebarMenuButtonIconProps>(\n \"SidebarMenuButtonIcon\",\n \"span\",\n s.MenuButtonIcon,\n)\n\nconst SidebarMenuButtonLabelComponent = defineComponent({\n name: \"SidebarMenuButtonLabel\",\n inheritAttrs: false,\n props: {\n /** Shorter label rendered next to the full one (`data-short-label`). */\n shortLabel: String,\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return [\n h(\n \"span\",\n { \"data-long-label\": \"true\", \"class\": [s.MenuButtonLabel, className], ...rest },\n slots.default?.(),\n ),\n props.shortLabel\n ? h(\"span\", { \"data-short-label\": \"true\", \"class\": [s.MenuButtonLabel, className] }, props.shortLabel)\n : null,\n ]\n }\n },\n})\n\nexport type SidebarMenuButtonLabelProps = InstanceType<typeof SidebarMenuButtonLabelComponent>[\"$props\"] & HTMLAttributes\n\nexport const SidebarMenuButtonLabel = SidebarMenuButtonLabelComponent as typeof SidebarMenuButtonLabelComponent & {\n new (): { $props: SidebarMenuButtonLabelProps }\n}\n\n// =============================================\n// Menu Chevron (Expand/Collapse Toggle)\n// =============================================\n\nexport type SidebarMenuChevronProps = HTMLAttributes\n\nexport const SidebarMenuChevron = defineComponent({\n name: \"SidebarMenuChevron\",\n inheritAttrs: false,\n setup(_props, { attrs }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"span\", { class: [s.MenuChevron, className], ...rest }, [h(ChevronRightMd)])\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarMenuChevronProps>>\n\n// =============================================\n// Menu Badge & Action\n// =============================================\n\nexport type SidebarMenuBadgeProps = HTMLAttributes\n\nexport const SidebarMenuBadge = part<SidebarMenuBadgeProps>(\"SidebarMenuBadge\", \"span\", s.MenuBadge)\n\nexport type SidebarMenuActionProps = HTMLAttributes\n\nexport const SidebarMenuAction = part<SidebarMenuActionProps>(\"SidebarMenuAction\", \"div\", s.MenuAction)\n\n// =============================================\n// Menu Skeleton\n// =============================================\n\nconst SidebarMenuSkeletonComponent = defineComponent({\n name: \"SidebarMenuSkeleton\",\n inheritAttrs: false,\n props: {\n /** Renders the icon placeholder. @default true */\n showIcon: { type: Boolean, default: true },\n /** Width of the label skeleton (e.g., \"60%\", \"80%\", \"100px\"). @default \"60%\" */\n labelWidth: { type: String, default: \"60%\" },\n },\n setup(props, { attrs }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"div\", { \"data-skeleton\": \"true\", \"class\": [s.MenuSkeleton, className], ...rest }, [\n props.showIcon ? h(\"div\", { class: s.MenuSkeletonIcon }) : null,\n h(\"div\", { class: s.MenuSkeletonLabel, style: { width: props.labelWidth } }),\n ])\n }\n },\n})\n\nexport type SidebarMenuSkeletonProps = InstanceType<typeof SidebarMenuSkeletonComponent>[\"$props\"] & HTMLAttributes\n\nexport const SidebarMenuSkeleton = SidebarMenuSkeletonComponent as typeof SidebarMenuSkeletonComponent & {\n new (): { $props: SidebarMenuSkeletonProps }\n}\n\n// =============================================\n// Submenu\n// =============================================\n\nconst SidebarMenuSubComponent = defineComponent({\n name: \"SidebarMenuSub\",\n inheritAttrs: false,\n props: {\n /** Whether the submenu is expanded. @default true */\n open: { type: Boolean, default: true },\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 * @default false\n */\n hasIcons: { type: Boolean, default: false },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\n \"ul\",\n {\n \"data-state\": props.open ? \"open\" : \"closed\",\n \"data-has-icons\": props.hasIcons ? \"true\" : undefined,\n // Collapsed items are only hidden visually: keep them out of the tab\n // order. \"\" renders `inert=\"\"` (a DOM property in browsers)\n \"inert\": props.open ? undefined : \"\",\n \"class\": [s.MenuSub, className],\n ...rest,\n },\n slots.default?.(),\n )\n }\n },\n})\n\nexport type SidebarMenuSubProps = InstanceType<typeof SidebarMenuSubComponent>[\"$props\"] & HTMLAttributes\n\nexport const SidebarMenuSub = SidebarMenuSubComponent as typeof SidebarMenuSubComponent & {\n new (): { $props: SidebarMenuSubProps }\n}\n\nexport type SidebarMenuSubItemProps = LiHTMLAttributes\n\nexport const SidebarMenuSubItem = part<SidebarMenuSubItemProps>(\"SidebarMenuSubItem\", \"li\", s.MenuSubItem)\n\nconst SidebarMenuSubButtonComponent = defineComponent({\n name: \"SidebarMenuSubButton\",\n inheritAttrs: false,\n props: {\n /** Whether the button is in an active/highlighted state. @default false */\n isActive: { type: Boolean, default: false },\n /** Merges into the slot's first element instead of rendering a `<button>`. @default false */\n asChild: { type: Boolean, default: false },\n /**\n * Indent level for nested items (0-3).\n * Each level adds 12px of left margin.\n * @default 0\n */\n indent: { type: Number as PropType<0 | 1 | 2 | 3>, default: 0 },\n },\n setup(props, { attrs, slots }) {\n const inDrawer = inject(sidebarDrawerKey, false)\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n const ownProps = {\n \"data-active\": props.isActive ? \"true\" : \"false\",\n \"aria-current\": props.isActive ? \"page\" : undefined,\n \"class\": [s.MenuSubButton, s[`indent${props.indent}`], className],\n ...rest,\n }\n const content = slots.default?.()\n if (!inDrawer) return props.asChild ? renderAsChild(content, ownProps) : h(\"button\", ownProps, content)\n // In the drawer the disclosure follows the content, inside the child element with asChild\n if (props.asChild) {\n const child = firstElementChild(content)\n return child ? mergeSlotProps(wrapChildContent(child, (inner) => h(Fragment, null, [inner, menuDisclosure()])), ownProps) : null\n }\n return h(\"button\", ownProps, [content, menuDisclosure()])\n }\n },\n})\n\nexport type SidebarMenuSubButtonProps = InstanceType<typeof SidebarMenuSubButtonComponent>[\"$props\"] & ButtonHTMLAttributes\n\nexport const SidebarMenuSubButton = SidebarMenuSubButtonComponent as typeof SidebarMenuSubButtonComponent & {\n new (): { $props: SidebarMenuSubButtonProps }\n}\n\n// =============================================\n// Separator\n// =============================================\n\nexport type SidebarSeparatorProps = HTMLAttributes\n\nexport const SidebarSeparator = defineComponent({\n name: \"SidebarSeparator\",\n inheritAttrs: false,\n setup(_props, { attrs }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"hr\", { class: [s.Separator, className], ...rest })\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarSeparatorProps>>\n\n// =============================================\n// Card\n// =============================================\n\nconst SidebarCardComponent = defineComponent({\n name: \"SidebarCard\",\n inheritAttrs: false,\n props: {\n /** Visual variant. @default \"default\" */\n variant: { type: String as PropType<\"default\" | \"elevated\">, default: \"default\" },\n /** Shows a dismiss button. @default false */\n dismissible: { type: Boolean, default: false },\n },\n emits: {\n /** The dismiss button was clicked */\n dismiss: (_event: MouseEvent) => true,\n },\n setup(props, { attrs, slots, emit }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"div\", { \"data-variant\": props.variant, \"class\": [s.Card, className], ...rest }, [\n props.dismissible\n ? h(\n Button,\n {\n \"uniform\": true,\n \"size\": \"3xs\",\n \"variant\": \"ghost\",\n \"color\": \"secondary\",\n \"class\": s.CardDismiss,\n \"onClick\": (event: MouseEvent) => emit(\"dismiss\", event),\n \"aria-label\": \"Dismiss\",\n },\n { default: () => h(X) },\n )\n : null,\n slots.default?.(),\n ])\n }\n },\n})\n\nexport type SidebarCardProps = InstanceType<typeof SidebarCardComponent>[\"$props\"] & HTMLAttributes\n\n/** Promotional card for CTAs, upgrades or announcements. */\nexport const SidebarCard = SidebarCardComponent as typeof SidebarCardComponent & {\n new (): { $props: SidebarCardProps }\n}\n\nexport type SidebarCardHeaderProps = HTMLAttributes\n\nexport const SidebarCardHeader = part<SidebarCardHeaderProps>(\"SidebarCardHeader\", \"div\", s.CardHeader)\n\nexport type SidebarCardTitleProps = HTMLAttributes\n\nexport const SidebarCardTitle = part<SidebarCardTitleProps>(\"SidebarCardTitle\", \"div\", s.CardTitle)\n\nexport type SidebarCardTitleLinkProps = AnchorHTMLAttributes\n\nexport const SidebarCardTitleLink = defineComponent({\n name: \"SidebarCardTitleLink\",\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"a\", { class: [s.CardTitleLink, className], ...rest }, [\n slots.default?.(),\n h(ChevronRightMd, { class: s.CardTitleChevron }),\n ])\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarCardTitleLinkProps>>\n\nexport type SidebarCardContentProps = HTMLAttributes\n\nexport const SidebarCardContent = part<SidebarCardContentProps>(\"SidebarCardContent\", \"div\", s.CardContent)\n\nexport type SidebarCardFooterProps = HTMLAttributes\n\nexport const SidebarCardFooter = part<SidebarCardFooterProps>(\"SidebarCardFooter\", \"div\", s.CardFooter)\n\n// =============================================\n// Inset (Main Content Area)\n// =============================================\n\nexport type SidebarInsetProps = HTMLAttributes\n\n/** Main content area next to the sidebar, a `<main>`. */\nexport const SidebarInset = part<SidebarInsetProps>(\"SidebarInset\", \"main\", s.Inset)\n\n// =============================================\n// Layout Container\n// =============================================\n\nexport type SidebarLayoutProps = HTMLAttributes\n\n/** Wrapper for the sidebar and the main content. */\nexport const SidebarLayout = part<SidebarLayoutProps>(\"SidebarLayout\", \"div\", s.SidebarLayout)\n\n// =============================================\n// Trigger (Collapse Button)\n// =============================================\n\nexport type SidebarTriggerProps = ButtonHTMLAttributes\n\n/**\n * Collapse button. The default slot replaces the icon. Renders nothing when\n * `collapsible=\"none\"`.\n */\nexport const SidebarTrigger = defineComponent({\n name: \"SidebarTrigger\",\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n const sidebar = useSidebar()\n\n return () => {\n // Don't render if collapsible=\"none\" (text-only sidebars)\n if (sidebar.collapsible === \"none\") {\n return null\n }\n\n const { className, rest } = cleanAttrs(attrs)\n const { onClick, ...others } = rest\n return h(\n \"button\",\n {\n \"type\": \"button\",\n \"class\": [s.Trigger, className],\n // The caller's listener runs first and can cancel the toggle\n \"onClick\": composeEventHandlers(onClick, () => sidebar.toggleSidebar()),\n \"aria-label\": sidebar.isMobile\n ? \"Open menu\"\n : sidebar.state === \"expanded\"\n ? \"Collapse sidebar\"\n : \"Expand sidebar\",\n ...others,\n },\n [\n h(\"span\", { class: s.TriggerInner }, [\n // One icon for both states: the tooltip, not the icon, says what a press does\n h(\"span\", { class: s.TriggerIcon }, slots.default ? slots.default() : [h(SidebarIcon)]),\n ]),\n ],\n )\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarTriggerProps>>\n\n// =============================================\n// Mobile Menu Button (SidebarMenuMobile icon → X)\n// =============================================\n\nexport type SidebarMobileMenuButtonProps = ButtonHTMLAttributes\n\nexport const SidebarMobileMenuButton = defineComponent({\n name: \"SidebarMobileMenuButton\",\n inheritAttrs: false,\n setup(_props, { attrs }) {\n const sidebar = useSidebar()\n\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n const { onClick, ...others } = rest\n return h(\n \"button\",\n {\n \"type\": \"button\",\n \"data-expanded\": sidebar.openMobile ? \"\" : undefined,\n \"class\": [s.MobileMenuButton, className],\n // The caller's listener runs first and can cancel the toggle\n \"onClick\": composeEventHandlers(onClick, () => sidebar.setOpenMobile(!sidebar.openMobile)),\n \"aria-label\": sidebar.openMobile ? \"Close menu\" : \"Open menu\",\n ...others,\n },\n [\n h(\"span\", { class: s.MobileMenuIcon }, [\n h(SidebarMenuMobile, { \"class\": s.MobileMenuGlyph, \"data-glyph\": \"menu\" }),\n h(X, { \"class\": s.MobileMenuGlyph, \"data-glyph\": \"close\" }),\n ]),\n ],\n )\n }\n },\n}) as unknown as ReturnType<typeof part<SidebarMobileMenuButtonProps>>\n\n// =============================================\n// Mobile Sidebar\n// =============================================\n\nconst SidebarMobileComponent = defineComponent({\n name: \"SidebarMobile\",\n inheritAttrs: false,\n props: {\n /** When true, drawer is positioned absolute instead of fixed (for contained demos) */\n contained: { type: Boolean, default: undefined },\n },\n setup(props, { attrs, slots }) {\n const sidebar = useSidebar()\n provide(sidebarDrawerKey, true)\n\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n const contained = props.contained && s.contained\n return [\n // Backdrop\n h(\"div\", {\n \"class\": [s.MobileBackdrop, contained],\n \"onClick\": () => sidebar.setOpenMobile(false),\n \"aria-hidden\": \"true\",\n }),\n // Drawer\n h(\"div\", { class: [s.MobileSidebar, contained, className], ...rest }, slots.default?.()),\n ]\n }\n },\n})\n\nexport type SidebarMobileProps = InstanceType<typeof SidebarMobileComponent>[\"$props\"] & HTMLAttributes\n\nexport const SidebarMobile = SidebarMobileComponent as typeof SidebarMobileComponent & {\n new (): { $props: SidebarMobileProps }\n}\n\nexport type SidebarMobileHeaderProps = HTMLAttributes\n\nexport const SidebarMobileHeader = part<SidebarMobileHeaderProps>(\"SidebarMobileHeader\", \"div\", s.MobileHeader)\n\nexport type SidebarMobileFooterProps = HTMLAttributes\n\nexport const SidebarMobileFooter = part<SidebarMobileFooterProps>(\"SidebarMobileFooter\", \"div\", s.MobileFooter)\n\n// =============================================\n// Input (Search)\n// =============================================\n\nexport type SidebarInputProps = InputProps\n\n/**\n * Search input: an Input with a Search icon in its `startAdornment` slot.\n * Every attribute, listener and slot goes to the Input (`v-model:value`,\n * `@clear`, ...). A template ref gets the Input's `focus()` and `input`\n * (React forwards its ref to the <input>).\n */\nexport const SidebarInput = defineComponent({\n name: \"SidebarInput\",\n inheritAttrs: false,\n setup(_props, { attrs, slots, expose }) {\n // Input's exposed API\n const inputComponent = ref<{ input: HTMLInputElement | null; focus: () => void } | null>(null)\n\n expose({\n focus: () => inputComponent.value?.focus(),\n input: computed(() => inputComponent.value?.input ?? null),\n })\n\n return () => {\n const { className, rest } = cleanAttrs(attrs)\n return h(\"div\", { class: s.Input }, [\n h(\n Input,\n { class: className, ...rest, ref: inputComponent },\n { ...slots, startAdornment: slots.startAdornment ?? (() => h(SearchIcon)) },\n ),\n ])\n }\n },\n}) as unknown as typeof Input\n\n// =============================================\n// Footer Links\n// =============================================\n\nexport type SidebarFooterLinksProps = HTMLAttributes\n\nexport const SidebarFooterLinks = part<SidebarFooterLinksProps>(\"SidebarFooterLinks\", \"div\", s.FooterLinks)\n"]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Comment, Fragment, computed, defineComponent, h, onBeforeUnmount, onMounted, ref, useId, watch, } from "vue";
|
|
2
|
-
import { useBreakpoint } from "../../composables/useBreakpoints.js";
|
|
3
2
|
import { toCssVariables } from "../../lib/helpers.js";
|
|
4
3
|
import { Button } from "../Button/index.js";
|
|
5
4
|
import { Reload } from "../Icon/index.js";
|
|
@@ -72,6 +71,26 @@ const extractSize = (entry, box, sizeType) => {
|
|
|
72
71
|
};
|
|
73
72
|
// The minimum difference we enforce between marks, in pixels
|
|
74
73
|
const MINIMUM_MARK_SPACING_PX = 16;
|
|
74
|
+
/**
|
|
75
|
+
* A press on the track of a range moves the thumb whose value lies nearest the press, which the slider primitive
|
|
76
|
+
* (a port of Radix) focuses only once that value changes. Focusing it at once lets a phone draw the knob being
|
|
77
|
+
* pressed as the lens of glass (Slider.module.css), even when the press leaves the value as it is. The thumb is
|
|
78
|
+
* the one the primitive moves: the pointer mapped onto min to max across the root (from the right in a
|
|
79
|
+
* right-to-left direction; the port maps left to right), the nearest value, the first on a tie. A press on a
|
|
80
|
+
* thumb itself is left to the primitive, which focuses that thumb.
|
|
81
|
+
*/
|
|
82
|
+
const focusThumbToMove = (event, root, values, min, max, vertical, rtl) => {
|
|
83
|
+
const thumbs = Array.from(root.querySelectorAll('[role="slider"]'));
|
|
84
|
+
if (thumbs.includes(event.target))
|
|
85
|
+
return;
|
|
86
|
+
const rect = root.getBoundingClientRect();
|
|
87
|
+
const ratio = vertical ? (rect.bottom - event.clientY) / rect.height : (rtl ? rect.right - event.clientX : event.clientX - rect.left) / rect.width;
|
|
88
|
+
const pointerValue = min + ratio * (max - min);
|
|
89
|
+
const distances = values.map((value) => Math.abs(value - pointerValue));
|
|
90
|
+
const thumb = thumbs[distances.indexOf(Math.min(...distances))];
|
|
91
|
+
if (thumb && thumb !== document.activeElement)
|
|
92
|
+
thumb.focus({ preventScroll: true, focusVisible: false });
|
|
93
|
+
};
|
|
75
94
|
const SliderMarks = defineComponent({
|
|
76
95
|
name: "SliderMarks",
|
|
77
96
|
props: {
|
|
@@ -156,6 +175,9 @@ const SliderMarks = defineComponent({
|
|
|
156
175
|
// Give our container a height so that we allocate space on the page
|
|
157
176
|
// for the marks and push down other content when we have to wrap
|
|
158
177
|
container.style.height = tallestHeight > 0 ? `${tallestHeight}px` : "";
|
|
178
|
+
// Placed against the slider's width: the marks show, at their own height (Slider.module.css)
|
|
179
|
+
if (width)
|
|
180
|
+
container.dataset.measured = "";
|
|
159
181
|
};
|
|
160
182
|
onMounted(() => {
|
|
161
183
|
layoutMarks();
|
|
@@ -284,7 +306,6 @@ const SliderComponent = defineComponent({
|
|
|
284
306
|
}, { flush: "sync" });
|
|
285
307
|
const isMounted = ref(false);
|
|
286
308
|
// Used to position the input over the thumb
|
|
287
|
-
const isTabletAndUp = useBreakpoint("md");
|
|
288
309
|
const inputRef = ref(null);
|
|
289
310
|
const rootRef = ref(null);
|
|
290
311
|
// We assume that the width of the thumb does not change from render to render
|
|
@@ -467,13 +488,11 @@ const SliderComponent = defineComponent({
|
|
|
467
488
|
const currentInputValue = inputValue.value;
|
|
468
489
|
const isPointerDown = pointerDown.value;
|
|
469
490
|
const mounted = isMounted.value;
|
|
470
|
-
const tabletAndUp = isTabletAndUp.value;
|
|
471
491
|
const { min, max, unit, prefixUnit, trackColor, rangeColor, disabled, orientation, value } = props;
|
|
472
492
|
const range = isRange();
|
|
473
493
|
const isVertical = orientation === "vertical";
|
|
474
494
|
const singleValue = range ? 0 : value;
|
|
475
|
-
|
|
476
|
-
const inputWidth = Math.max(currentInputValue.length, 1) * (tabletAndUp ? 7.8 : 9.5);
|
|
495
|
+
const inputWidth = getValueWidth(currentInputValue);
|
|
477
496
|
const animationDurationMS = range || !mounted || isPointerDown ? 0 : Math.max(Math.abs(percent.value - getPreviousPercent()) * 300, 100);
|
|
478
497
|
const marks = getMarks();
|
|
479
498
|
// Radix value
|
|
@@ -528,7 +547,7 @@ const SliderComponent = defineComponent({
|
|
|
528
547
|
"id": id,
|
|
529
548
|
"class": s.ValueInput,
|
|
530
549
|
"ref": inputRef,
|
|
531
|
-
"style": { width:
|
|
550
|
+
"style": { width: inputWidth },
|
|
532
551
|
"onKeydown": handleKeyDown,
|
|
533
552
|
// React keeps the `value` attribute in sync with a controlled input
|
|
534
553
|
"^value": currentInputValue,
|
|
@@ -560,13 +579,21 @@ const SliderComponent = defineComponent({
|
|
|
560
579
|
// React's onFocus / onBlur bubble from the thumbs
|
|
561
580
|
"onFocusin": (evt) => emit("focus", evt),
|
|
562
581
|
"onFocusout": (evt) => emit("blur", evt),
|
|
563
|
-
"onPointerdown": () => {
|
|
564
|
-
if (
|
|
565
|
-
|
|
582
|
+
"onPointerdown": (event) => {
|
|
583
|
+
if (disabled)
|
|
584
|
+
return;
|
|
585
|
+
pointerDown.value = true;
|
|
586
|
+
if (range)
|
|
587
|
+
focusThumbToMove(event, event.currentTarget, radixValue, props.min, props.max, isVertical, false);
|
|
566
588
|
},
|
|
567
589
|
"onPointerup": () => {
|
|
568
590
|
pointerDown.value = false;
|
|
569
591
|
},
|
|
592
|
+
"onPointercancel": () => {
|
|
593
|
+
pointerDown.value = false;
|
|
594
|
+
},
|
|
595
|
+
"data-pressed": isPointerDown ? "" : undefined,
|
|
596
|
+
"data-range": range ? "" : undefined,
|
|
570
597
|
"style": toCssVariables({
|
|
571
598
|
"slider-duration": `${animationDurationMS}ms`,
|
|
572
599
|
"slider-track-color": trackColor,
|
|
@@ -609,4 +636,12 @@ const SliderComponent = defineComponent({
|
|
|
609
636
|
// Matches the names Radix gives range thumbs on its own
|
|
610
637
|
const rangeThumbName = (index, count) => count === 2 ? (index === 0 ? "Minimum" : "Maximum") : count > 2 ? `Value ${index + 1} of ${count}` : "";
|
|
611
638
|
export const Slider = SliderComponent;
|
|
639
|
+
/**
|
|
640
|
+
* The value field is as wide as its characters at any font size: tabular digits are one `ch` each, and a sign,
|
|
641
|
+
* a decimal point or a separator about half of one, so a right-aligned value sits next to its prefix unit.
|
|
642
|
+
*/
|
|
643
|
+
const getValueWidth = (text) => {
|
|
644
|
+
const digits = text.replace(/[^0-9]/g, "").length;
|
|
645
|
+
return `calc(${Math.max(digits + (text.length - digits) / 2, 1)}ch + 1px)`;
|
|
646
|
+
};
|
|
612
647
|
//# sourceMappingURL=Slider.js.map
|