@plexui/vue 0.24.3 → 0.26.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/Dialog/Dialog.js +3 -3
- package/dist/es/components/Dialog/Dialog.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/MinusLg.js +10 -0
- package/dist/es/components/Icon/svg/MinusLg.js.map +1 -0
- package/dist/es/components/Page/Page.js +77 -17
- package/dist/es/components/Page/Page.js.map +1 -1
- package/dist/es/components/Slider/Slider.js +34 -8
- package/dist/es/components/Slider/Slider.js.map +1 -1
- package/dist/es/components/TabBar/TabBar.js +3 -3
- package/dist/es/components/TabBar/TabBar.js.map +1 -1
- package/dist/es/components/Tabs/Tabs.js +26 -0
- package/dist/es/components/Tabs/Tabs.js.map +1 -1
- package/dist/es/components/Tabs/segments.js +92 -0
- package/dist/es/components/Tabs/segments.js.map +1 -0
- package/dist/es/components/Toolbar/Toolbar.js +184 -20
- package/dist/es/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/es/components/Toolbar/index.js +1 -1
- package/dist/es/components/Toolbar/index.js.map +1 -1
- package/dist/types/components/Dialog/Dialog.d.ts +5 -5
- package/dist/types/components/Icon/index.d.ts +1 -0
- package/dist/types/components/Icon/svg/MinusLg.d.ts +3 -0
- package/dist/types/components/Page/Page.d.ts +5 -5
- package/dist/types/components/TabBar/TabBar.d.ts +11 -11
- package/dist/types/components/Tabs/segments.d.ts +19 -0
- package/dist/types/components/Toolbar/Toolbar.d.ts +39 -9
- package/dist/types/components/Toolbar/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Page.js","sourceRoot":"","sources":["../../../../src/components/Page/Page.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,CAAC,EACD,MAAM,EACN,UAAU,EACV,SAAS,EACT,eAAe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,GAAG,EAAE;YACb,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAA;YAC5B,IAAI,CAAC,MAAM;gBAAE,OAAM;YACnB,MAAM,MAAM,GAAG,GAAG,EAAE,GAAG,YAAY,CAAC,KAAK,GAAG,MAAM,CAAC,YAAY,CAAA,CAAC,CAAC,CAAA;YACjE,MAAM,EAAE,CAAA;YACR,IAAI,OAAO,cAAc,KAAK,WAAW;gBAAE,OAAM;YACjD,QAAQ,GAAG,IAAI,cAAc,CAAC,MAAM,CAAC,CAAA;YACrC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC,CAAA;QACjD,CAAC,CAAC,CAAA;QACF,eAAe,CAAC,GAAG,EAAE,GAAG,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC,YAAY,CAAC,KAAK,GAAG,CAAC,CAAA,CAAC,CAAC,CAAC,CAAA;QACzE,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,iBAAiB,EAAE,KAAK,CAAC,UAAU,EAAE,oBAAoB,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,EAAE;YACzJ,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,aAAa,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;SACxD,CAAC,CAAA;IACJ,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n defineComponent,\n h,\n inject,\n mergeProps,\n onMounted,\n onBeforeUnmount,\n provide,\n ref,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n} from \"vue\"\nimport { provideFloatingBoundaryScope, useFloatingBoundaryRegistration } from \"../../composables/useFloatingBoundary.js\"\nimport { TOOLBAR_HOST, type BarBackground, type ToolbarPlacement } from \"../Toolbar/Toolbar.js\"\nimport { observeScrollEdges } from \"../../lib/scrollEdges.js\"\nimport s from \"@plexui/styles/components/Page/Page.module.css\"\n\n// Vue port of packages/ui/src/components/Page/Page.tsx. Exports are flat\n// (`PageHeader` for `Page.Header`, ...). As in React, caller attributes are\n// applied after the page's own (`class` is merged), so they win.\n\n/** How a phone bar of the page meets the content scrolled under it; see `BarBackground`. */\nexport type PageBarBackground = BarBackground\n\nexport type PageWidth = \"full\" | \"wide\" | \"column\"\n\ntype PageContext = {\n /** Content has scrolled under the header. */\n scrolled: Ref<boolean>\n /** Content continues under the footer. */\n contentBelow: Ref<boolean>\n footerHeight: Ref<number>\n headerHeight: Ref<number | undefined>\n /** Writes the content's scroll offset to the page as `--page-scroll-y`, which a large Toolbar title follows. */\n setScrollY: (scrollY: number) => void\n /** Tells the bars that follow the scroll, such as a minimizing TabBar, the content's scroll offset. */\n notifyScroll: (scrollY: number) => void\n}\nconst PAGE_CONTEXT: InjectionKey<PageContext> = Symbol(\"Page\")\n\nfunction injectPageContext(part: string): PageContext {\n const scrolled = inject(PAGE_CONTEXT, null)\n if (!scrolled) {\n throw new Error(`${part} must be used within Page`)\n }\n return scrolled\n}\n\nconst PageComponent = defineComponent({\n name: \"Page\",\n props: {\n /**\n * Width of the column that header and content share: `\"full\"` (edge to\n * edge, for tables), `\"wide\"` (1280px, centred, for overviews) or `\"column\"`\n * (768px, centred, for settings and forms). Set `--page-width` on the page\n * for any other width.\n * @default \"full\"\n */\n width: { type: String as PropType<PageWidth>, default: \"full\" },\n /** Mobile canvas and grouped-field palette. @default \"plain\" */\n surface: { type: String as PropType<\"plain\" | \"grouped\">, default: \"plain\" },\n },\n setup(props, { slots }) {\n const boundary = provideFloatingBoundaryScope()\n let root: HTMLElement | null = null\n const setRoot = (node: unknown) => {\n root = node instanceof HTMLElement ? node : null\n boundary.setRoot(node)\n }\n // Written straight to the element: a scroll frame must not render the page again.\n const setScrollY = (scrollY: number) => root?.style.setProperty(\"--page-scroll-y\", String(Math.max(0, scrollY)))\n const scrollListeners = new Set<(scrollTop: number) => void>()\n const notifyScroll = (scrollY: number) => scrollListeners.forEach((listener) => listener(scrollY))\n const subscribeScroll = (listener: (scrollTop: number) => void) => {\n scrollListeners.add(listener)\n return () => { scrollListeners.delete(listener) }\n }\n const context = { scrolled: ref(false), contentBelow: ref(false), footerHeight: ref(0), headerHeight: ref<number>(), setScrollY, notifyScroll }\n provide(PAGE_CONTEXT, context)\n // A phone Toolbar replaces the header and footer bars; it reports its own heights.\n const toolbarTop = ref<number>()\n const toolbarBottom = ref<number>()\n provide(TOOLBAR_HOST, {\n kind: \"page\",\n scrolled: context.scrolled,\n contentBelow: context.contentBelow,\n subscribeScroll,\n setHeight: (placement: ToolbarPlacement, height: number | undefined) => { (placement === \"top\" ? toolbarTop : toolbarBottom).value = height },\n })\n return () => h(\"div\", { \"ref\": setRoot, \"class\": s.Page, \"data-width\": props.width, \"data-surface\": props.surface,\n style: {\n \"--page-footer-height\": `${context.footerHeight.value}px`,\n ...(context.headerHeight.value !== undefined ? { \"--page-header-height\": `${context.headerHeight.value}px` } : {}),\n ...(toolbarTop.value !== undefined ? { \"--page-toolbar-height\": `${toolbarTop.value}px` } : {}),\n ...(toolbarBottom.value !== undefined ? { \"--page-toolbar-bottom-height\": `${toolbarBottom.value}px` } : {}),\n } }, slots.default?.())\n },\n})\n\n/** Props of `Page`. */\nexport type PageProps = { width?: PageWidth; surface?: \"plain\" | \"grouped\" } & HTMLAttributes\n\nexport const Page = PageComponent as typeof PageComponent & { new (): { $props: PageProps } }\n\n/** The band above the content, one column with it (React `Page.Header`). */\nexport const PageHeader = defineComponent({\n name: \"PageHeader\",\n props: {\n /**\n * Shows a divider once the content has scrolled under the header: on a\n * desktop layout, and on a phone with a `\"hard\"` or `\"glass\"` background.\n * Turn it off when the content already draws a line of\n * its own at that place.\n * @default true\n */\n divider: { type: Boolean, default: true },\n /** How the bar meets the content scrolled under it on a phone. @default \"glass\" */\n background: { type: String as PropType<PageBarBackground>, default: \"glass\" },\n },\n setup(props, { slots }) {\n const { scrolled, headerHeight } = injectPageContext(\"PageHeader\")\n const element = ref<HTMLElement | null>(null)\n let observer: ResizeObserver | undefined\n onMounted(() => {\n const header = element.value\n if (!header) return\n const update = () => { headerHeight.value = header.offsetHeight }\n update()\n observer = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(update) : undefined\n observer?.observe(header, { box: \"border-box\" })\n })\n onBeforeUnmount(() => { observer?.disconnect(); headerHeight.value = undefined })\n\n return () =>\n h(\"div\", { \"ref\": element, \"class\": s.Header, \"data-background\": props.background, \"data-scrolled\": scrolled.value ? \"\" : undefined, \"data-divider\": props.divider ? \"\" : undefined }, [\n h(\"div\", { class: s.Head }, slots.default?.()),\n ])\n },\n})\n\nfunction part(name: string, tag: string, className: string) {\n return defineComponent({\n name,\n setup(_, { slots }) {\n return () => h(tag, { class: className }, slots.default?.())\n },\n })\n}\n\n/** The row of the title and the actions (React `Page.Bar`). */\nexport const PageBar = defineComponent({\n name: \"PageBar\",\n setup(_, { slots }) {\n const element = ref<HTMLElement | null>(null)\n let observer: ResizeObserver | undefined\n let children: MutationObserver | undefined\n onMounted(() => {\n const bar = element.value\n if (!bar) return\n const sides = () => bar.querySelectorAll<HTMLElement>(`:scope > .${s.Leading}, :scope > .${s.Actions}`)\n const update = () => {\n const width = Math.max(44, ...Array.from(sides(), (side) => side.offsetWidth))\n bar.style.setProperty(\"--page-bar-side-width\", `${width}px`)\n }\n observer = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(update) : undefined\n const observeSides = () => { observer?.disconnect(); sides().forEach((side) => observer?.observe(side, { box: \"border-box\" })); update() }\n observeSides()\n children = new MutationObserver(observeSides)\n children.observe(bar, { childList: true })\n })\n onBeforeUnmount(() => { observer?.disconnect(); children?.disconnect() })\n return () => h(\"div\", { ref: element, class: s.Bar }, slots.default?.())\n },\n})\n/** Navigation controls on the leading side (React `Page.Leading`). */\nexport const PageLeading = part(\"PageLeading\", \"div\", s.Leading)\n/** Title with what stands beside it, a subtitle under it on a phone (React `Page.Heading`). */\nexport const PageHeading = part(\"PageHeading\", \"div\", s.Heading)\n/** Page heading, an `<h1>` (React `Page.Title`). */\nexport const PageTitle = part(\"PageTitle\", \"h1\", s.Title)\n/** Status of the page, a flow container for badges and text (React `Page.Subtitle`). */\nexport const PageSubtitle = part(\"PageSubtitle\", \"div\", s.Subtitle)\n/** Buttons on the trailing side of the bar (React `Page.Actions`). */\nexport const PageActions = part(\"PageActions\", \"div\", s.Actions)\n\n/** The part of the page that scrolls (React `Page.Content`). */\nexport const PageContent = defineComponent({\n name: \"PageContent\",\n inheritAttrs: false,\n props: {\n /**\n * The content fills the page and scrolls inside itself, as a table does:\n * the page stops scrolling from 768px up.\n * @default false\n */\n fill: { type: Boolean, default: false },\n },\n setup(props, { attrs, slots }) {\n const { scrolled, contentBelow, setScrollY, notifyScroll } = injectPageContext(\"PageContent\")\n const element = ref<HTMLElement | null>(null)\n let stop: (() => void) | undefined\n onMounted(() => {\n if (!element.value) return\n stop = observeScrollEdges(element.value, (edges) => {\n scrolled.value = edges.scrolled\n contentBelow.value = edges.contentBelow\n })\n })\n onBeforeUnmount(() => { stop?.(); scrolled.value = false; contentBelow.value = false })\n\n const onScroll = (event: Event) => {\n const top = (event.currentTarget as HTMLElement).scrollTop\n setScrollY(top)\n notifyScroll(top)\n }\n\n return () =>\n h(\n \"div\",\n mergeProps(\n { \"ref\": element, \"class\": s.Content, \"data-fill\": props.fill ? \"\" : undefined, onScroll },\n attrs,\n ),\n [h(\"div\", { class: s.Column }, slots.default?.())],\n )\n },\n})\n\n/** Actions that remain below the scrolling content (React `Page.Footer`). */\nexport const PageFooter = defineComponent({\n name: \"PageFooter\",\n props: {\n /** How the bar meets the content scrolled under it on a phone. @default \"soft\" */\n background: { type: String as PropType<PageBarBackground>, default: \"soft\" },\n },\n setup(props, { slots }) {\n const element = ref<HTMLElement | null>(null)\n const { contentBelow, footerHeight } = injectPageContext(\"PageFooter\")\n const boundary = useFloatingBoundaryRegistration()\n const setFooter = (node: unknown) => {\n element.value = node instanceof HTMLElement ? node : null\n boundary?.setFooter(node)\n }\n let observer: ResizeObserver | undefined\n onMounted(() => {\n const footer = element.value\n if (!footer) return\n const update = () => { footerHeight.value = footer.offsetHeight }\n update()\n if (typeof ResizeObserver === \"undefined\") return\n observer = new ResizeObserver(update)\n observer.observe(footer, { box: \"border-box\" })\n })\n onBeforeUnmount(() => { observer?.disconnect(); footerHeight.value = 0 })\n return () => h(\"div\", { ref: setFooter, class: s.Footer, \"data-background\": props.background, \"data-content-below\": contentBelow.value ? \"\" : undefined }, [\n h(\"div\", { class: s.FooterContent }, slots.default?.()),\n ])\n },\n})\n\n/** Props of the Page parts: native attributes of their element. */\nexport type PageSlotProps = HTMLAttributes\n\nexport type PageFooterProps = PageSlotProps & { background?: PageBarBackground }\n"]}
|
|
1
|
+
{"version":3,"file":"Page.js","sourceRoot":"","sources":["../../../../src/components/Page/Page.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,EACD,MAAM,EACN,UAAU,EACV,SAAS,EACT,eAAe,EACf,OAAO,EACP,GAAG,EACH,UAAU,EACV,KAAK,GAKN,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,4BAA4B,EAAE,+BAA+B,EAAE,MAAM,0CAA0C,CAAA;AACxH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAsE,MAAM,uBAAuB,CAAA;AACvI,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,CAAC,MAAM,gDAAgD,CAAA;AA+B9D;;;;;GAKG;AACH,SAAS,eAAe,CAAC,OAAoB,EAAE,IAAiB,EAAE,MAAiD;IACjH,IAAI,IAAI,GAAG,EAAE,CAAA;IACb,MAAM,MAAM,GAAG,GAAG,EAAE;QAClB,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAA;QAChC,MAAM,KAAK,GAAG,IAAI,CAA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AC,CAAC,MAAM,EAAE,iBAAiB,EAAE,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,oBAAoB,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,EAAE;YACxK,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,aAAa,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;SACxD,CAAC,CAAA;IACJ,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n h,\n inject,\n mergeProps,\n onMounted,\n onBeforeUnmount,\n provide,\n ref,\n shallowRef,\n watch,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n} from \"vue\"\nimport { provideFloatingBoundaryScope, useFloatingBoundaryRegistration } from \"../../composables/useFloatingBoundary.js\"\nimport { barBackground, TOOLBAR_HOST, type BarBackground, type BarBackgroundAlias, type ToolbarPlacement } from \"../Toolbar/Toolbar.js\"\nimport { observeScrollEdges } from \"../../lib/scrollEdges.js\"\nimport s from \"@plexui/styles/components/Page/Page.module.css\"\n\n// Vue port of packages/ui/src/components/Page/Page.tsx. Exports are flat\n// (`PageHeader` for `Page.Header`, ...). As in React, caller attributes are\n// applied after the page's own (`class` is merged), so they win.\n\n/** How a phone bar of the page meets the content scrolled under it; see `BarBackground`. `\"solid\"` is the earlier name of `\"hard\"`. */\nexport type PageBarBackground = BarBackground | BarBackgroundAlias\n\nexport type PageWidth = \"full\" | \"wide\" | \"column\"\n\ntype PageContext = {\n /** Content has scrolled under the header. */\n scrolled: Ref<boolean>\n /** Content continues under the footer. */\n contentBelow: Ref<boolean>\n footerHeight: Ref<number>\n headerHeight: Ref<number | undefined>\n /** Tells the bars that follow the scroll, such as a minimizing TabBar or a large title, the content's scroll offset. */\n notifyScroll: (scrollY: number) => void\n /** A large Toolbar title asks for a place at the top of the content, where it scrolls with the content. */\n largeTitle: Ref<boolean>\n setLargeTitleSlot: (slot: unknown) => void\n /** The place of the bar's rows under a large title, which pins them under the bar. */\n largeTitleRowSlot: Ref<HTMLElement | null>\n setLargeTitleRowSlot: (slot: unknown) => void\n /** The rows under a large title are pinned under the bar, and their height, which the bar's background takes in. */\n titleRowsPinned: Ref<boolean>\n titleRowsHeight: Ref<number>\n}\n\n/**\n * Follows the rows of a large title's bar (Toolbar.Row) in the content. They stand under the title and, scrolled up to\n * the bar, stay under its controls (`position: sticky`): they are pinned once the sticky offset moves them off the\n * title's bottom, where they would stand. It reports that and their height, which the bar's background takes in. React's\n * twin.\n */\nfunction followTitleRows(content: HTMLElement, rows: HTMLElement, report: (pinned: boolean, height: number) => void) {\n let last = \"\"\n const update = () => {\n const height = rows.offsetHeight\n const title = rows.previousElementSibling\n const pinned = height > 0 && !!title && rows.getBoundingClientRect().top - title.getBoundingClientRect().bottom > 0.5\n if (`${pinned} ${height}` === last) return\n last = `${pinned} ${height}`\n report(pinned, height)\n }\n update()\n content.addEventListener(\"scroll\", update, { passive: true })\n const observer = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(update) : undefined\n observer?.observe(rows)\n observer?.observe(content)\n // The title changing its height (a subtitle shown or gone) moves the rows with no scroll (Codex #7).\n const title = rows.previousElementSibling\n if (title) observer?.observe(title)\n return () => {\n content.removeEventListener(\"scroll\", update)\n observer?.disconnect()\n report(false, 0)\n }\n}\nconst PAGE_CONTEXT: InjectionKey<PageContext> = Symbol(\"Page\")\n\nfunction injectPageContext(part: string): PageContext {\n const scrolled = inject(PAGE_CONTEXT, null)\n if (!scrolled) {\n throw new Error(`${part} must be used within Page`)\n }\n return scrolled\n}\n\nconst PageComponent = defineComponent({\n name: \"Page\",\n props: {\n /**\n * Width of the column that header and content share: `\"full\"` (edge to\n * edge, for tables), `\"wide\"` (1280px, centred, for overviews) or `\"column\"`\n * (768px, centred, for settings and forms). Set `--page-width` on the page\n * for any other width.\n * @default \"full\"\n */\n width: { type: String as PropType<PageWidth>, default: \"full\" },\n /** Mobile canvas and grouped-field palette. @default \"plain\" */\n surface: { type: String as PropType<\"plain\" | \"grouped\">, default: \"plain\" },\n },\n setup(props, { slots }) {\n const boundary = provideFloatingBoundaryScope()\n const setRoot = (node: unknown) => boundary.setRoot(node)\n const scrollListeners = new Set<(scrollTop: number) => void>()\n const notifyScroll = (scrollY: number) => scrollListeners.forEach((listener) => listener(scrollY))\n const subscribeScroll = (listener: (scrollTop: number) => void) => {\n scrollListeners.add(listener)\n return () => { scrollListeners.delete(listener) }\n }\n // A large Toolbar title lives in the content, where the browser scrolls it with the content and its overscroll;\n // PageContent keeps a place for it at its top while a title asks for one.\n const largeTitleRequests = ref(0)\n const largeTitle = computed(() => largeTitleRequests.value > 0)\n const largeTitleSlot = shallowRef<HTMLElement | null>(null)\n const setLargeTitleSlot = (slot: unknown) => { largeTitleSlot.value = slot instanceof HTMLElement ? slot : null }\n const requestLargeTitleSlot = () => {\n largeTitleRequests.value += 1\n return () => { largeTitleRequests.value -= 1 }\n }\n // The bar's rows under a large title have a place of their own under it, which pins them under the bar once scrolled.\n const largeTitleRowSlot = shallowRef<HTMLElement | null>(null)\n const setLargeTitleRowSlot = (slot: unknown) => { largeTitleRowSlot.value = slot instanceof HTMLElement ? slot : null }\n const titleRowsPinned = ref(false)\n const titleRowsHeight = ref(0)\n const context = {\n scrolled: ref(false), contentBelow: ref(false), footerHeight: ref(0), headerHeight: ref<number>(), notifyScroll, largeTitle,\n setLargeTitleSlot, largeTitleRowSlot, setLargeTitleRowSlot, titleRowsPinned, titleRowsHeight,\n }\n provide(PAGE_CONTEXT, context)\n // A phone Toolbar replaces the header and footer bars; it reports its own heights.\n const toolbarTop = ref<number>()\n const toolbarBottom = ref<number>()\n provide(TOOLBAR_HOST, {\n kind: \"page\",\n scrolled: context.scrolled,\n contentBelow: context.contentBelow,\n subscribeScroll,\n requestLargeTitleSlot,\n largeTitleSlot: computed(() => (largeTitle.value ? largeTitleSlot.value : null)),\n largeTitleRowSlot: computed(() => (largeTitle.value ? largeTitleRowSlot.value : null)),\n rowsPinned: computed(() => largeTitle.value && titleRowsPinned.value),\n setHeight: (placement: ToolbarPlacement, height: number | undefined) => { (placement === \"top\" ? toolbarTop : toolbarBottom).value = height },\n })\n return () => h(\"div\", { \"ref\": setRoot, \"class\": s.Page, \"data-width\": props.width, \"data-surface\": props.surface,\n style: {\n \"--page-footer-height\": `${context.footerHeight.value}px`,\n ...(context.headerHeight.value !== undefined ? { \"--page-header-height\": `${context.headerHeight.value}px` } : {}),\n ...(toolbarTop.value !== undefined ? { \"--page-toolbar-height\": `${toolbarTop.value}px` } : {}),\n ...(toolbarBottom.value !== undefined ? { \"--page-toolbar-bottom-height\": `${toolbarBottom.value}px` } : {}),\n ...(titleRowsHeight.value > 0 ? { \"--page-toolbar-rows-height\": `${titleRowsHeight.value}px` } : {}),\n } }, slots.default?.())\n },\n})\n\n/** Props of `Page`. */\nexport type PageProps = { width?: PageWidth; surface?: \"plain\" | \"grouped\" } & HTMLAttributes\n\nexport const Page = PageComponent as typeof PageComponent & { new (): { $props: PageProps } }\n\n/** The band above the content, one column with it (React `Page.Header`). */\nexport const PageHeader = defineComponent({\n name: \"PageHeader\",\n props: {\n /**\n * Shows a divider once the content has scrolled under the header: on a\n * desktop layout, and on a phone with a `\"hard\"` or `\"glass\"` background.\n * Turn it off when the content already draws a line of\n * its own at that place.\n * @default true\n */\n divider: { type: Boolean, default: true },\n /** How the bar meets the content scrolled under it on a phone. @default \"glass\" */\n background: { type: String as PropType<PageBarBackground>, default: \"glass\" },\n },\n setup(props, { slots }) {\n const { scrolled, headerHeight } = injectPageContext(\"PageHeader\")\n const element = ref<HTMLElement | null>(null)\n let observer: ResizeObserver | undefined\n onMounted(() => {\n const header = element.value\n if (!header) return\n const update = () => { headerHeight.value = header.offsetHeight }\n update()\n observer = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(update) : undefined\n observer?.observe(header, { box: \"border-box\" })\n })\n onBeforeUnmount(() => { observer?.disconnect(); headerHeight.value = undefined })\n\n return () =>\n h(\"div\", { \"ref\": element, \"class\": s.Header, \"data-background\": barBackground(props.background), \"data-scrolled\": scrolled.value ? \"\" : undefined, \"data-divider\": props.divider ? \"\" : undefined }, [\n h(\"div\", { class: s.Head }, slots.default?.()),\n ])\n },\n})\n\nfunction part(name: string, tag: string, className: string) {\n return defineComponent({\n name,\n setup(_, { slots }) {\n return () => h(tag, { class: className }, slots.default?.())\n },\n })\n}\n\n/** The row of the title and the actions (React `Page.Bar`). */\nexport const PageBar = defineComponent({\n name: \"PageBar\",\n setup(_, { slots }) {\n const element = ref<HTMLElement | null>(null)\n let observer: ResizeObserver | undefined\n let children: MutationObserver | undefined\n onMounted(() => {\n const bar = element.value\n if (!bar) return\n const sides = () => bar.querySelectorAll<HTMLElement>(`:scope > .${s.Leading}, :scope > .${s.Actions}`)\n const update = () => {\n const width = Math.max(44, ...Array.from(sides(), (side) => side.offsetWidth))\n bar.style.setProperty(\"--page-bar-side-width\", `${width}px`)\n }\n observer = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(update) : undefined\n const observeSides = () => { observer?.disconnect(); sides().forEach((side) => observer?.observe(side, { box: \"border-box\" })); update() }\n observeSides()\n children = new MutationObserver(observeSides)\n children.observe(bar, { childList: true })\n })\n onBeforeUnmount(() => { observer?.disconnect(); children?.disconnect() })\n return () => h(\"div\", { ref: element, class: s.Bar }, slots.default?.())\n },\n})\n/** Navigation controls on the leading side (React `Page.Leading`). */\nexport const PageLeading = part(\"PageLeading\", \"div\", s.Leading)\n/** Title with what stands beside it, a subtitle under it on a phone (React `Page.Heading`). */\nexport const PageHeading = part(\"PageHeading\", \"div\", s.Heading)\n/** Page heading, an `<h1>` (React `Page.Title`). */\nexport const PageTitle = part(\"PageTitle\", \"h1\", s.Title)\n/** Status of the page, a flow container for badges and text (React `Page.Subtitle`). */\nexport const PageSubtitle = part(\"PageSubtitle\", \"div\", s.Subtitle)\n/** Buttons on the trailing side of the bar (React `Page.Actions`). */\nexport const PageActions = part(\"PageActions\", \"div\", s.Actions)\n\n/** The part of the page that scrolls (React `Page.Content`). */\nexport const PageContent = defineComponent({\n name: \"PageContent\",\n inheritAttrs: false,\n props: {\n /**\n * The content fills the page and scrolls inside itself, as a table does:\n * the page stops scrolling from 768px up.\n * @default false\n */\n fill: { type: Boolean, default: false },\n },\n setup(props, { attrs, slots }) {\n const { scrolled, contentBelow, notifyScroll, largeTitle, setLargeTitleSlot, largeTitleRowSlot, setLargeTitleRowSlot, titleRowsPinned, titleRowsHeight } = injectPageContext(\"PageContent\")\n const element = ref<HTMLElement | null>(null)\n let stop: (() => void) | undefined\n onMounted(() => {\n if (!element.value) return\n stop = observeScrollEdges(element.value, (edges) => {\n scrolled.value = edges.scrolled\n contentBelow.value = edges.contentBelow\n })\n })\n onBeforeUnmount(() => { stop?.(); scrolled.value = false; contentBelow.value = false })\n // The rows of a large title's bar pin under it once scrolled up to it.\n let stopRows: (() => void) | undefined\n watch([element, largeTitleRowSlot], ([content, rows]) => {\n stopRows?.()\n stopRows = content && rows\n ? followTitleRows(content, rows, (pinned, height) => { titleRowsPinned.value = pinned; titleRowsHeight.value = height })\n : undefined\n }, { flush: \"post\" })\n onBeforeUnmount(() => { stopRows?.(); stopRows = undefined })\n\n const onScroll = (event: Event) => {\n notifyScroll((event.currentTarget as HTMLElement).scrollTop)\n }\n\n return () =>\n h(\n \"div\",\n mergeProps(\n { \"ref\": element, \"class\": s.Content, \"data-fill\": props.fill ? \"\" : undefined, onScroll },\n attrs,\n ),\n [h(\"div\", { class: s.Column }, [\n largeTitle.value ? h(\"div\", { ref: setLargeTitleSlot, class: s.LargeTitle }) : null,\n largeTitle.value ? h(\"div\", { ref: setLargeTitleRowSlot, class: s.LargeTitleRows }) : null,\n slots.default?.(),\n ])],\n )\n },\n})\n\n/** Actions that remain below the scrolling content (React `Page.Footer`). */\nexport const PageFooter = defineComponent({\n name: \"PageFooter\",\n props: {\n /** How the bar meets the content scrolled under it on a phone. @default \"soft\" */\n background: { type: String as PropType<PageBarBackground>, default: \"soft\" },\n },\n setup(props, { slots }) {\n const element = ref<HTMLElement | null>(null)\n const { contentBelow, footerHeight } = injectPageContext(\"PageFooter\")\n const boundary = useFloatingBoundaryRegistration()\n const setFooter = (node: unknown) => {\n element.value = node instanceof HTMLElement ? node : null\n boundary?.setFooter(node)\n }\n let observer: ResizeObserver | undefined\n onMounted(() => {\n const footer = element.value\n if (!footer) return\n const update = () => { footerHeight.value = footer.offsetHeight }\n update()\n if (typeof ResizeObserver === \"undefined\") return\n observer = new ResizeObserver(update)\n observer.observe(footer, { box: \"border-box\" })\n })\n onBeforeUnmount(() => { observer?.disconnect(); footerHeight.value = 0 })\n return () => h(\"div\", { ref: setFooter, class: s.Footer, \"data-background\": barBackground(props.background), \"data-content-below\": contentBelow.value ? \"\" : undefined }, [\n h(\"div\", { class: s.FooterContent }, slots.default?.()),\n ])\n },\n})\n\n/** Props of the Page parts: native attributes of their element. */\nexport type PageSlotProps = HTMLAttributes\n\nexport type PageFooterProps = PageSlotProps & { background?: PageBarBackground }\n"]}
|
|
@@ -296,6 +296,18 @@ const SliderComponent = defineComponent({
|
|
|
296
296
|
// Cancel pending input when its owner unmounts.
|
|
297
297
|
onBeforeUnmount(() => debouncedOnChange.cancel());
|
|
298
298
|
const pointerDown = ref(false);
|
|
299
|
+
// A phone's reset is a button of its own beside the value (below)
|
|
300
|
+
const tabletAndUp = useBreakpoint("md");
|
|
301
|
+
// A press ends where the finger lifts, even when something else takes the pointer away (a sheet that a touch
|
|
302
|
+
// drags, a scroll the browser takes over): the slider's own pointerup never comes then, so the window hears the
|
|
303
|
+
// lift and a lost capture ends the press too.
|
|
304
|
+
let releasePress = null;
|
|
305
|
+
const endPress = () => {
|
|
306
|
+
releasePress?.();
|
|
307
|
+
releasePress = null;
|
|
308
|
+
pointerDown.value = false;
|
|
309
|
+
};
|
|
310
|
+
onBeforeUnmount(() => releasePress?.());
|
|
299
311
|
const resetPending = ref(false);
|
|
300
312
|
// Read the controlled owner after a reset request, including a refused request.
|
|
301
313
|
watch([resetPending, () => props.value, isRange], () => {
|
|
@@ -309,7 +321,7 @@ const SliderComponent = defineComponent({
|
|
|
309
321
|
if (!props.disabled)
|
|
310
322
|
return;
|
|
311
323
|
debouncedOnChange.cancel();
|
|
312
|
-
|
|
324
|
+
endPress();
|
|
313
325
|
// A sync watcher runs at each prop as Vue sets them one by one: a disabled range switched to one thumb has
|
|
314
326
|
// range off here while its value is still the array, and the number comes with the next prop
|
|
315
327
|
if (!isRange() && typeof props.value === "number")
|
|
@@ -532,9 +544,14 @@ const SliderComponent = defineComponent({
|
|
|
532
544
|
!range && resetValue !== undefined
|
|
533
545
|
? h(Tooltip, { content: resetTooltip, compact: true }, {
|
|
534
546
|
default: () => h(Button, {
|
|
547
|
+
// A phone draws the reset as the small round gray button of the iOS 27 kit beside the
|
|
548
|
+
// row's value: uniform and soft, touch.css makes it the 28px circle that takes touches
|
|
549
|
+
// 44px around it. A desktop one is the bare glyph that shows on hover.
|
|
535
550
|
"size": "2xs",
|
|
536
|
-
"variant": "ghost",
|
|
551
|
+
"variant": tabletAndUp.value ? "ghost" : "soft",
|
|
537
552
|
"color": "secondary",
|
|
553
|
+
"uniform": !tabletAndUp.value,
|
|
554
|
+
"pill": !tabletAndUp.value,
|
|
538
555
|
"class": s.Reset,
|
|
539
556
|
"aria-label": resetTooltip,
|
|
540
557
|
"disabled": disabled,
|
|
@@ -594,15 +611,24 @@ const SliderComponent = defineComponent({
|
|
|
594
611
|
if (disabled)
|
|
595
612
|
return;
|
|
596
613
|
pointerDown.value = true;
|
|
614
|
+
releasePress?.();
|
|
615
|
+
const { pointerId } = event;
|
|
616
|
+
const end = (lift) => {
|
|
617
|
+
if (lift.pointerId === pointerId)
|
|
618
|
+
endPress();
|
|
619
|
+
};
|
|
620
|
+
window.addEventListener("pointerup", end, true);
|
|
621
|
+
window.addEventListener("pointercancel", end, true);
|
|
622
|
+
releasePress = () => {
|
|
623
|
+
window.removeEventListener("pointerup", end, true);
|
|
624
|
+
window.removeEventListener("pointercancel", end, true);
|
|
625
|
+
};
|
|
597
626
|
if (range)
|
|
598
627
|
focusThumbToMove(event, event.currentTarget, radixValue, props.min, props.max, isVertical, false);
|
|
599
628
|
},
|
|
600
|
-
"onPointerup":
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
"onPointercancel": () => {
|
|
604
|
-
pointerDown.value = false;
|
|
605
|
-
},
|
|
629
|
+
"onPointerup": endPress,
|
|
630
|
+
"onPointercancel": endPress,
|
|
631
|
+
"onLostpointercapture": endPress,
|
|
606
632
|
"data-pressed": isPointerDown ? "" : undefined,
|
|
607
633
|
"data-range": range ? "" : undefined,
|
|
608
634
|
"style": toCssVariables({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","sourceRoot":"","sources":["../../../../src/components/Slider/Slider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,CAAC,EACD,eAAe,EACf,SAAS,EACT,GAAG,EACH,KAAK,EACL,KAAK,GAIN,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACxF,OAAO,CAAC,MAAM,oDAAoD,CAAA;AAmBlE,oCAAoC;AACpC,MAAM,KAAK,GAAG,CAAC,MAAc,EAAE,KAAa,EAAE,KAAa,EAAE,EAAE;IAC7D,IAAI,MAAM,GAAG,MAAM,CAAA;IACnB,IAAI,MAAM,KAAK,MAAM,EAA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EAAE,CAAA;AAwCzG,MAAM,CAAC,MAAM,MAAM,GAAG,eAErB,CAAA;AAED;;;GAGG;AACH,MAAM,aAAa,GAAG,CAAC,IAAY,EAAU,EAAE;IAC7C,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,MAAM,CAAA;IACjD,OAAO,QAAQ,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,WAAW,CAAA;AAC5E,CAAC,CAAA","sourcesContent":["import {\n Comment,\n Fragment,\n computed,\n defineComponent,\n h,\n onBeforeUnmount,\n onMounted,\n ref,\n useId,\n watch,\n type PropType,\n type VNode,\n type VNodeArrayChildren,\n} from \"vue\"\nimport { useBreakpoint } from \"../../composables/useBreakpoints.js\"\nimport { toCssVariables } from \"../../lib/helpers.js\"\nimport { Button } from \"../Button/index.js\"\nimport { Reload } from \"../Icon/index.js\"\nimport { Tooltip } from \"../Tooltip/index.js\"\nimport { SliderRange, SliderRoot, SliderThumb, SliderTrack } from \"./sliderPrimitive.js\"\nimport s from \"@plexui/styles/components/Slider/Slider.module.css\"\n\n// Vue port of packages/ui/src/components/Slider/Slider.tsx. Props, defaults,\n// rendered DOM and behaviour match React (checked by the parity tests).\n// - `value` + `update:value` (also `change`, as React calls it `onChange`)\n// support `v-model:value`; the value is a number, or an array with `range`.\n// - `label` is a prop or the `label` slot (rich content, e.g. a tooltip).\n// - `aria-label` / `aria-labelledby` are the `ariaLabel` / `ariaLabelledby` props.\n// - React's `onFocus` / `onBlur` become the `focus` / `blur` emits: from the\n// value input, and from the thumbs (React's bubbling focus events, so\n// `focusin` / `focusout` on the slider root).\n// - React reads no other props, so other attributes are not passed on.\n// - The slider itself is Radix's, ported in ./sliderPrimitive.ts.\n\nexport type SliderMark = {\n value: number\n label: string\n}\n\n/** lodash `clamp`: NaN stays NaN */\nconst clamp = (number: number, lower: number, upper: number) => {\n let result = number\n if (result === result) {\n result = result <= upper ? result : upper\n result = result >= lower ? result : lower\n }\n return result\n}\n\n/** lodash `round(number, precision)` */\nconst round = (number: number, precision: number) => {\n const digits = Math.min(Math.trunc(precision), 292)\n if (!digits || !Number.isFinite(number)) return Math.round(number)\n let pair = `${number}e`.split(\"e\")\n const value = Math.round(Number(`${pair[0]}e${Number(pair[1]) + digits}`))\n pair = `${value}e`.split(\"e\")\n return Number(`${pair[0]}e${Number(pair[1]) - digits}`)\n}\n\n/** lodash `debounce(func, wait)` with its defaults: trailing call only */\nconst debounce = <T>(func: (value: T) => void, wait: number) => {\n let timer: ReturnType<typeof setTimeout> | undefined\n let lastValue: T\n const debounced = (value: T) => {\n lastValue = value\n if (timer !== undefined) clearTimeout(timer)\n timer = setTimeout(() => {\n timer = undefined\n func(lastValue)\n }, wait)\n }\n debounced.cancel = () => {\n if (timer !== undefined) clearTimeout(timer)\n timer = undefined\n }\n return debounced\n}\n\nconst hasContent = (nodes: VNodeArrayChildren | undefined): boolean =>\n !!nodes?.some((node) => {\n if (node == null || typeof node === \"boolean\") return false\n if (Array.isArray(node)) return hasContent(node)\n if (typeof node !== \"object\") return node !== \"\"\n const vnode = node as VNode\n if (vnode.type === Comment) return false\n if (vnode.type === Fragment) return hasContent(vnode.children as VNodeArrayChildren)\n return true\n })\n\ntype ResizeEntryBox = \"contentBoxSize\" | \"borderBoxSize\" | \"devicePixelContentBoxSize\"\n\n// Same reading as usehooks-ts' useResizeObserver (content-box)\nconst extractSize = (entry: ResizeObserverEntry, box: ResizeEntryBox, sizeType: \"inlineSize\" | \"blockSize\") => {\n const boxSize = entry[box] as ResizeObserverSize[] | ResizeObserverSize | undefined\n if (!boxSize) {\n if (box === \"contentBoxSize\") {\n return entry.contentRect[sizeType === \"inlineSize\" ? \"width\" : \"height\"]\n }\n return undefined\n }\n return Array.isArray(boxSize) ? boxSize[0]![sizeType] : boxSize[sizeType]\n}\n\n// The minimum difference we enforce between marks, in pixels\nconst MINIMUM_MARK_SPACING_PX = 16\n\n/**\n * A press on the track of a range moves the thumb whose value lies nearest the press, which the slider primitive\n * (a port of Radix) focuses only once that value changes. Focusing it at once lets a phone draw the knob being\n * pressed as the lens of glass (Slider.module.css), even when the press leaves the value as it is. The thumb is\n * the one the primitive moves: the pointer mapped onto min to max across the root (from the right in a\n * right-to-left direction; the port maps left to right), the nearest value, the first on a tie. A press on a\n * thumb itself is left to the primitive, which focuses that thumb.\n */\nconst focusThumbToMove = (event: PointerEvent, root: HTMLElement, values: number[], min: number, max: number, vertical: boolean, rtl: boolean) => {\n const thumbs = Array.from(root.querySelectorAll<HTMLElement>('[role=\"slider\"]'))\n if (thumbs.includes(event.target as HTMLElement)) return\n const rect = root.getBoundingClientRect()\n const ratio = vertical ? (rect.bottom - event.clientY) / rect.height : (rtl ? rect.right - event.clientX : event.clientX - rect.left) / rect.width\n const pointerValue = min + ratio * (max - min)\n const distances = values.map((value) => Math.abs(value - pointerValue))\n const thumb = thumbs[distances.indexOf(Math.min(...distances))]\n if (thumb && thumb !== document.activeElement) thumb.focus({ preventScroll: true, focusVisible: false } as FocusOptions)\n}\n\n/** A knob's value from 0 to 1, by which a phone stands the knob on its value as iOS does (Slider.module.css). */\nconst thumbPercentStyle = (value: number, min: number, max: number) => ({\n \"--slider-thumb-percent\": String(max > min ? clamp((value - min) / (max - min), 0, 1) : 0),\n})\n\n/**\n * Where a knob's centre stands at a value (0 to 1), from the start of a track `width` wide. The primitive (Radix)\n * eases the knob over the whole track to keep it inside; on a phone it stands on the value and stops half its\n * width from each end, as iOS (`clamped`, Slider.module.css).\n */\nconst thumbCentre = (percent: number, width: number, thumbHalf: number, clamped: boolean) =>\n clamped ? clamp(percent * width, thumbHalf, width - thumbHalf) : percent * width + thumbHalf * (1 - 2 * percent)\n\nconst SliderMarks = defineComponent({\n name: \"SliderMarks\",\n props: {\n marks: { type: Array as PropType<SliderMark[]>, required: true },\n getThumb: { type: Function as PropType<() => HTMLElement | null>, required: true },\n min: { type: Number, required: true },\n max: { type: Number, required: true },\n },\n setup(props) {\n // We seperate the container and measure divs so that our resize observer\n // does not fire when we adjust the height of the marks container.\n const marksContainerRef = ref<HTMLDivElement | null>(null)\n const measureRef = ref<HTMLDivElement | null>(null)\n\n // We measure the width of the slider within this component so that sliders\n // without marks do not pay a performance penalty.\n const sliderWidth = ref<number | undefined>(undefined)\n // The knob's travel changes at the phone breakpoint (Slider.module.css), also where the width stays\n const tabletAndUp = useBreakpoint(\"md\")\n let observer: ResizeObserver | undefined\n\n // React's useLayoutEffect on [marks, thumbRef, min, max, sliderWidth]\n const layoutMarks = () => {\n const thumb = props.getThumb()\n const container = marksContainerRef.value\n\n // Impossible\n if (!thumb || !container) {\n return\n }\n\n const markElements = Array.from(container.querySelectorAll<HTMLDivElement>(\"[data-mark]\"))\n\n // Its layout width: a pressed knob is scaled into the lens\n const thumbHalfWidth = thumb.offsetWidth / 2\n const clamped = getComputedStyle(thumb).getPropertyValue(\"--slider-thumb-travel\").trim() === \"clamped\"\n\n // Wipe all styles so we can accurately determine the positions of the marks\n markElements.forEach((markEl) => {\n markEl.style.width = \"\"\n markEl.style.display = \"\"\n })\n\n const width = sliderWidth.value\n const { marks, min, max } = props\n\n const positionMarks = () => {\n if (!width) {\n return\n }\n\n markElements.forEach((markEl, index) => {\n const markValue = marks[index]!.value\n const valuePercent = (markValue - min) / (max - min)\n const markWidth = markEl.getBoundingClientRect().width\n const markHalfWidth = markWidth / 2\n\n // Under the knob's centre at the mark's value, accounting for the width of the mark itself\n let left = thumbCentre(valuePercent, width, thumbHalfWidth, clamped) - markHalfWidth\n\n // Clamp to the left and right bounds of the container\n left = Math.max(0, Math.min(left, width - markWidth))\n\n markEl.style.left = `${left}px`\n })\n }\n\n const marksHaveCollisions = () => {\n for (let i = 0; i < markElements.length - 1; i++) {\n const currentRect = markElements[i]!.getBoundingClientRect()\n const nextRect = markElements[i + 1]!.getBoundingClientRect()\n\n if (currentRect.right + MINIMUM_MARK_SPACING_PX > nextRect.left) {\n return true\n }\n }\n return false\n }\n\n positionMarks()\n\n // If we have collisions, try to wrap the content\n if (marksHaveCollisions()) {\n markElements.forEach((markEl) => {\n markEl.style.width = \"min-content\"\n })\n\n positionMarks()\n\n // Hide all marks if we still have collisions\n if (marksHaveCollisions()) {\n markElements.forEach((markEl) => {\n markEl.style.display = \"none\"\n })\n }\n }\n\n const tallestHeight = Math.max(...markElements.map((markEl) => markEl.getBoundingClientRect().height))\n\n // Give our container a height so that we allocate space on the page\n // for the marks and push down other content when we have to wrap\n container.style.height = tallestHeight > 0 ? `${tallestHeight}px` : \"\"\n // Placed against the slider's width: the marks show, at their own height (Slider.module.css)\n if (width) container.dataset.measured = \"\"\n }\n\n onMounted(() => {\n layoutMarks()\n\n // usehooks-ts useResizeObserver: only a changed content box updates the width\n const measure = measureRef.value\n if (!measure || typeof window === \"undefined\" || !(\"ResizeObserver\" in window)) {\n return\n }\n const previousSize: { width?: number; height?: number } = { width: undefined, height: undefined }\n observer = new ResizeObserver(([entry]) => {\n const width = extractSize(entry!, \"contentBoxSize\", \"inlineSize\")\n const height = extractSize(entry!, \"contentBoxSize\", \"blockSize\")\n if (previousSize.width === width && previousSize.height === height) {\n return\n }\n previousSize.width = width\n previousSize.height = height\n sliderWidth.value = width\n })\n observer.observe(measure, { box: \"content-box\" })\n })\n\n onBeforeUnmount(() => {\n observer?.disconnect()\n })\n\n watch([() => props.marks, () => props.min, () => props.max, sliderWidth, tabletAndUp], layoutMarks, { flush: \"post\" })\n\n return () =>\n h(\"div\", { class: s.MarksContainer, ref: marksContainerRef }, [\n h(\n \"div\",\n { ref: measureRef },\n props.marks.map((mark) =>\n h(\"div\", { \"key\": mark.value, \"class\": s.Mark, \"data-mark\": \"true\" }, [\n h(\"span\", { class: s.MarkLabel }, mark.label),\n ]),\n ),\n ),\n ])\n },\n})\n\nconst SliderComponent = defineComponent({\n name: \"Slider\",\n inheritAttrs: false,\n props: {\n /** The minimum value the slider can have */\n min: { type: Number, required: true },\n /** The maximum value the slider can have */\n max: { type: Number, required: true },\n /** The step increment between slider values */\n step: { type: Number, required: true },\n /**\n * The current value: a number, or an array of values (one per thumb)\n * with `range`. Bind with `v-model:value`.\n */\n value: { type: [Number, Array] as PropType<number | number[]>, required: true },\n /** When true, the slider has one thumb per value of the `value` array. @default false */\n range: { type: Boolean, default: false },\n /** Unit to display next to the slider value (e.g., ms, px) */\n unit: String,\n /** Unit to display before the slider value (e.g., $) */\n prefixUnit: String,\n /** Label for the slider; the `label` slot takes rich content */\n label: String,\n /** Accessible name for the slider when there is no visible `label` */\n ariaLabel: String,\n /** Id of an element that names the slider; takes precedence over `label` */\n ariaLabelledby: String,\n /** List of marks to display below the slider track (horizontal only) */\n marks: Array as PropType<SliderMark[]>,\n /** Color of the slider track */\n trackColor: String,\n /** Color of the slider progress along the track */\n rangeColor: String,\n /** Disables the slider and its value input. @default false */\n disabled: { type: Boolean, default: false },\n /** Orientation of the slider. @default \"horizontal\" */\n orientation: { type: String as PropType<\"horizontal\" | \"vertical\">, default: \"horizontal\" },\n /** Value offered as a \"reset to default\" option (single thumb only) */\n resetValue: Number,\n /** Text of the reset button's tooltip (single thumb only). @default \"Reset to default\" */\n resetTooltip: String,\n /** Minimum number of steps between thumbs (range only) */\n minStepsBetweenThumbs: Number,\n },\n emits: {\n /** The value changed (`v-model:value`): a number, or an array with `range` */\n \"update:value\": (_value: number | number[]) => { void _value; return true },\n /** Same payload as `update:value`, named after React's `onChange` */\n \"change\": (_value: number | number[]) => { void _value; return true },\n /** The value input or a thumb gained focus */\n \"focus\": (_event: FocusEvent) => { void _event; return true },\n /** The value input or a thumb lost focus */\n \"blur\": (_event: FocusEvent) => { void _event; return true },\n },\n setup(props, { attrs, slots, emit, expose }) {\n const id = useId()\n const labelId = `${id}-label`\n const isRange = () => props.range === true\n const precision = computed(() => String(props.step).split(\".\")[1]?.length ?? 0)\n\n const reportChange = (value: number | number[]) => {\n emit(\"update:value\", value)\n emit(\"change\", value)\n }\n\n // Single-mode state for editable input\n const inputValue = ref<string>(isRange() ? \"\" : String((props.value as number).toFixed(precision.value)))\n const setInputValueNumber = (nextValue: number) => {\n inputValue.value = nextValue.toFixed(precision.value)\n }\n\n // prevents input from jumping around while the user is typing; an\n // immediate change (a key, blur) cancels the pending typed one\n const debouncedOnChange = debounce((value: number) => {\n if (!props.disabled && !isRange()) reportChange(value)\n }, 250)\n // Cancel pending input when its owner unmounts.\n onBeforeUnmount(() => debouncedOnChange.cancel())\n\n const pointerDown = ref(false)\n const resetPending = ref(false)\n // Read the controlled owner after a reset request, including a refused request.\n watch([resetPending, () => props.value, isRange], () => {\n if (!resetPending.value) return\n resetPending.value = false\n if (!isRange()) setInputValueNumber(props.value as number)\n }, { flush: \"post\" })\n watch([() => props.disabled, isRange, () => props.value, precision], () => {\n if (!props.disabled) return\n debouncedOnChange.cancel()\n pointerDown.value = false\n // A sync watcher runs at each prop as Vue sets them one by one: a disabled range switched to one thumb has\n // range off here while its value is still the array, and the number comes with the next prop\n if (!isRange() && typeof props.value === \"number\") setInputValueNumber(props.value)\n }, { flush: \"sync\" })\n const isMounted = ref(false)\n\n // Used to position the input over the thumb\n const inputRef = ref<HTMLInputElement | null>(null)\n const rootRef = ref<HTMLElement | null>(null)\n // We assume that the width of the thumb does not change from render to render\n let thumbElement: HTMLElement | null = null\n const setRoot = (element: HTMLElement | null) => {\n rootRef.value = element\n }\n const setThumb = (element: HTMLElement | null) => {\n thumbElement = element\n }\n const getThumb = () => thumbElement\n\n expose({ root: rootRef })\n\n // Calculate animation duration based on the distance the thumb needs to move\n // Skip custom animation for range mode: let Radix handle it\n const percent = computed(() => (isRange() ? 0 : ((props.value as number) - props.min) / (props.max - props.min)))\n // Plex's usePrevious: the percent before its latest change (recorded after\n // the render that changed it), the same across renders that keep it\n let lastPercent = percent.value\n let previousPercent = percent.value\n watch(\n percent,\n (next) => {\n previousPercent = lastPercent\n lastPercent = next\n },\n { flush: \"post\" },\n )\n const getPreviousPercent = () => (Object.is(lastPercent, percent.value) ? previousPercent : lastPercent)\n\n // Sort marks for collision detection (again only when a value or label changes, as in React)\n const marksKey = () => JSON.stringify((props.marks ?? []).map(({ value, label }) => [value, label]))\n let sortedMarks: SliderMark[] = []\n let sortedMarksKey: string | undefined\n const getMarks = () => {\n const key = marksKey()\n if (key !== sortedMarksKey) {\n sortedMarks = [...(props.marks ?? [])].sort((a, b) => a.value - b.value)\n sortedMarksKey = key\n }\n return sortedMarks\n }\n\n // Validate marks\n const validateMarks = () => {\n const markValues = new Set<number>()\n for (const mark of getMarks()) {\n if (mark.value < props.min || mark.value > props.max) {\n throw new Error(`Slider mark value ${mark.value} is out of bounds [${props.min}, ${props.max}]`)\n }\n if (markValues.has(mark.value)) {\n throw new Error(\"Slider marks must have unique values\")\n }\n markValues.add(mark.value)\n }\n }\n\n // Update value if out of bounds (single mode only)\n const clampOutOfBounds = () => {\n if (isRange()) return\n const v = props.value as number\n const clamped = clamp(v, props.min, props.max)\n if (clamped !== v) {\n reportChange(clamped)\n setInputValueNumber(clamped)\n }\n }\n\n const syncInputValue = () => {\n if (isRange()) return\n if (inputRef.value !== document.activeElement) {\n setInputValueNumber(props.value as number)\n }\n }\n\n // React's mount effects, in their order\n onMounted(() => {\n isMounted.value = true\n validateMarks()\n clampOutOfBounds()\n syncInputValue()\n })\n watch([marksKey, () => props.min, () => props.max], validateMarks, { flush: \"post\" })\n watch([() => props.min, () => props.max, precision, isRange], clampOutOfBounds, { flush: \"post\" })\n watch([() => props.value, precision, isRange], syncInputValue, { flush: \"post\" })\n\n // Single-mode keyboard handler: a key's change replaces a pending typed one\n const handleKeyDown = (evt: KeyboardEvent) => {\n if (props.disabled || isRange()) return\n const singleValue = props.value as number\n const { min, max, step } = props\n if (evt.key === \"Home\") {\n evt.preventDefault()\n debouncedOnChange.cancel()\n reportChange(min)\n setInputValueNumber(min)\n }\n if (evt.key === \"End\") {\n evt.preventDefault()\n debouncedOnChange.cancel()\n reportChange(max)\n setInputValueNumber(max)\n }\n if (evt.key === \"ArrowUp\") {\n evt.preventDefault()\n const multiplier = evt.shiftKey ? 10 : 1\n const next = clamp(singleValue + step * multiplier, min, max)\n debouncedOnChange.cancel()\n reportChange(next)\n setInputValueNumber(next)\n }\n if (evt.key === \"ArrowDown\") {\n evt.preventDefault()\n const multiplier = evt.shiftKey ? 10 : 1\n const next = clamp(singleValue - step * multiplier, min, max)\n debouncedOnChange.cancel()\n reportChange(next)\n setInputValueNumber(next)\n }\n if (evt.key === \"Enter\" || evt.key === \"Escape\") {\n evt.preventDefault()\n ;(evt.currentTarget as HTMLInputElement).blur()\n }\n }\n\n const handleInputChange = (evt: Event) => {\n if (props.disabled || isRange()) return\n const target = evt.currentTarget as HTMLInputElement\n // Mobile decimal keyboards may use a comma. A minus is valid only below zero.\n const nextValue = target.value.trim().replace(/,/g, \".\").replace(props.min < 0 ? /(?!^-)[^\\d.]/g : /[^\\d.]/g, \"\")\n debouncedOnChange.cancel()\n let parsed = parseFloat(nextValue || \"0\")\n if (Number.isNaN(parsed)) {\n // A lone \"-\" or \".\" is a number still being typed: nothing to report yet\n inputValue.value = nextValue\n if (target.value !== nextValue) target.value = nextValue\n return\n }\n parsed = clamp(parsed, props.min, props.max)\n if (props.step >= 1) {\n parsed = Math.floor(parsed)\n }\n debouncedOnChange(parsed)\n inputValue.value = nextValue\n // A controlled React input shows its state again after the event\n if (target.value !== nextValue) target.value = nextValue\n }\n\n const handleInputBlur = (evt: FocusEvent) => {\n if (isRange()) return\n // Blur commits the typed text, so its pending debounced change is dropped\n debouncedOnChange.cancel()\n if (props.disabled) {\n setInputValueNumber(props.value as number)\n emit(\"blur\", evt)\n return\n }\n let parsed = parseFloat((evt.target as HTMLInputElement).value.trim().replace(/,/g, \".\")) || 0\n if (props.step >= 1) {\n parsed = Math.floor(parsed)\n } else {\n parsed = round(parsed, precision.value)\n }\n parsed = clamp(parsed, props.min, props.max)\n if (parsed !== (props.value as number)) {\n reportChange(parsed)\n }\n setInputValueNumber(parsed)\n emit(\"blur\", evt)\n }\n\n const handleInputFocus = (evt: FocusEvent) => {\n const target = evt.currentTarget as HTMLInputElement\n target.setSelectionRange(0, target.value.length)\n emit(\"focus\", evt)\n }\n\n // Radix value/onChange wiring\n const handleValueChange = (values: number[]) => {\n if (props.disabled) return\n debouncedOnChange.cancel()\n reportChange(isRange() ? values : values[0]!)\n }\n\n return () => {\n // Read every piece of state, as a React render depends on all of them\n const currentInputValue = inputValue.value\n const isPointerDown = pointerDown.value\n const mounted = isMounted.value\n\n const { min, max, unit, prefixUnit, trackColor, rangeColor, disabled, orientation, value } = props\n const range = isRange()\n const isVertical = orientation === \"vertical\"\n const singleValue = range ? 0 : (value as number)\n\n const inputWidth = getValueWidth(currentInputValue)\n\n const animationDurationMS =\n range || !mounted || isPointerDown ? 0 : Math.max(Math.abs(percent.value - getPreviousPercent()) * 300, 100)\n\n const marks = getMarks()\n\n // Radix value\n const radixValue = range ? (value as number[]) : [value as number]\n\n // Single-mode props\n const resetValue = !range ? props.resetValue : undefined\n const resetTooltip = !range ? (props.resetTooltip ?? \"Reset to default\") : undefined\n\n // Range-mode props\n const minStepsBetweenThumbs = range ? props.minStepsBetweenThumbs : undefined\n\n // Show marks only in horizontal orientation\n const showMarks = marks.length > 0 && !isVertical\n\n // Format range display text\n const rangeDisplayText = range\n ? (value as number[]).map((v) => `${prefixUnit ?? \"\"}${v.toFixed(precision.value)}${unit ?? \"\"}`).join(\" – \")\n : \"\"\n\n const labelSlot = slots.label?.()\n const labelContent = hasContent(labelSlot) ? labelSlot : props.label\n // What names the thumbs: an explicit labelledby, else the visible label\n const nameId = props.ariaLabelledby ?? (labelContent ? labelId : undefined)\n const { ariaLabel } = props\n\n return h(\"div\", { \"class\": [s.SliderWrap, attrs.class], \"data-orientation\": orientation }, [\n labelContent\n ? h(\"div\", { class: s.SliderLabel }, [\n // Range mode renders no value input, so the label only names the thumbs\n h(\"label\", { for: range ? undefined : id, id: labelId, class: \"flex-1\" }, labelContent),\n !range && resetValue !== undefined\n ? h(\n Tooltip,\n { content: resetTooltip!, compact: true },\n {\n default: () =>\n h(\n Button,\n {\n \"size\": \"2xs\",\n \"variant\": \"ghost\",\n \"color\": \"secondary\",\n \"class\": s.Reset,\n \"aria-label\": resetTooltip,\n \"disabled\": disabled,\n \"data-hide\": disabled || (resetValue === singleValue && !isPointerDown),\n \"onClick\": () => {\n if (disabled) return\n debouncedOnChange.cancel()\n reportChange(resetValue)\n resetPending.value = true\n },\n },\n { default: () => h(Reload) },\n ),\n },\n )\n : null,\n range\n ? h(\"span\", { class: s.RangeDisplay }, rangeDisplayText)\n : h(\"div\", { class: s.SliderValue, onClick: () => { if (!disabled) inputRef.value?.focus() } }, [\n prefixUnit ? h(\"span\", { class: s.ValueUnit }, prefixUnit) : null,\n h(\"input\", {\n \"id\": id,\n \"class\": s.ValueInput,\n \"ref\": inputRef,\n \"style\": { width: inputWidth },\n \"onKeydown\": handleKeyDown,\n // React keeps the `value` attribute in sync with a controlled input\n \"^value\": currentInputValue,\n \"value\": currentInputValue,\n \"type\": \"text\",\n \"inputmode\": min < 0 ? \"text\" : Number.isInteger(min) && Number.isInteger(max) && Number.isInteger(props.step) ? \"numeric\" : \"decimal\",\n \"onClick\": (e: MouseEvent) => e.stopPropagation(),\n \"onBlur\": handleInputBlur,\n \"onFocus\": handleInputFocus,\n \"onInput\": handleInputChange,\n \"disabled\": disabled,\n }),\n unit ? h(\"span\", { class: s.ValueUnit }, unit) : null,\n ]),\n ])\n : null,\n h(\"div\", { class: s.SliderContainer }, [\n h(\n SliderRoot,\n {\n \"elementRef\": setRoot,\n \"class\": s.Slider,\n \"onValueChange\": handleValueChange,\n \"min\": min,\n \"max\": max,\n \"step\": props.step,\n \"disabled\": disabled,\n \"values\": radixValue,\n \"orientation\": orientation,\n \"minStepsBetweenThumbs\": minStepsBetweenThumbs,\n // React's onFocus / onBlur bubble from the thumbs\n \"onFocusin\": (evt: FocusEvent) => emit(\"focus\", evt),\n \"onFocusout\": (evt: FocusEvent) => emit(\"blur\", evt),\n \"onPointerdown\": (event: PointerEvent) => {\n if (disabled) return\n pointerDown.value = true\n if (range) focusThumbToMove(event, event.currentTarget as HTMLElement, radixValue, props.min, props.max, isVertical, false)\n },\n \"onPointerup\": () => {\n pointerDown.value = false\n },\n \"onPointercancel\": () => {\n pointerDown.value = false\n },\n \"data-pressed\": isPointerDown ? \"\" : undefined,\n \"data-range\": range ? \"\" : undefined,\n \"style\": toCssVariables({\n \"slider-duration\": `${animationDurationMS}ms`,\n \"slider-track-color\": trackColor,\n \"slider-range-color\": rangeColor,\n }),\n },\n {\n default: () => [\n h(SliderTrack, { class: s.Track }, { default: () => h(SliderRange, { class: s.Range }) }),\n ...(range\n ? (value as number[]).map((_, i) =>\n h(SliderThumb, {\n \"key\": i,\n \"id\": `${id}-thumb-${i}`,\n \"class\": s.Thumb,\n \"style\": thumbPercentStyle((value as number[])[i]!, props.min, props.max),\n // The marks measure the first thumb (all thumbs are the same size)\n \"elementRef\": i === 0 ? setThumb : undefined,\n // Name plus the thumb's own Radix name (\"Minimum\" / \"Maximum\"),\n // so the endpoints stay distinguishable\n \"aria-labelledby\": nameId ? `${nameId} ${id}-thumb-${i}` : undefined,\n // Only pass aria-label when set: it replaces the name Radix gives the thumb\n ...(!nameId && ariaLabel\n ? { \"aria-label\": `${ariaLabel} ${rangeThumbName(i, (value as number[]).length)}`.trim() }\n : {}),\n }),\n )\n : [\n h(SliderThumb, {\n \"class\": s.Thumb,\n \"style\": thumbPercentStyle(value as number, props.min, props.max),\n \"elementRef\": setThumb,\n \"aria-labelledby\": nameId,\n ...(!nameId && ariaLabel ? { \"aria-label\": ariaLabel } : {}),\n }),\n ]),\n ],\n },\n ),\n showMarks ? h(SliderMarks, { marks, getThumb, min, max }) : null,\n ]),\n ])\n }\n },\n})\n\n// Matches the names Radix gives range thumbs on its own\nconst rangeThumbName = (index: number, count: number) =>\n count === 2 ? (index === 0 ? \"Minimum\" : \"Maximum\") : count > 2 ? `Value ${index + 1} of ${count}` : \"\"\n\ntype SliderOwnProps = InstanceType<typeof SliderComponent>[\"$props\"]\n\ntype SliderBaseProps = Omit<\n SliderOwnProps,\n \"range\" | \"value\" | \"resetValue\" | \"resetTooltip\" | \"minStepsBetweenThumbs\" | \"onUpdate:value\" | \"onChange\"\n> & { class?: unknown }\n\n// As in React, `range` decides the value's type and the props that apply\ntype SingleSliderProps = SliderBaseProps & {\n /** When false or omitted, the slider has a single thumb */\n range?: false\n /** The current value of the slider (`v-model:value`) */\n value: number\n /** Value offered as a \"reset to default\" option */\n resetValue?: number\n /** Text of the reset button's tooltip. @default \"Reset to default\" */\n resetTooltip?: string\n \"onUpdate:value\"?: (value: number) => void\n onChange?: (value: number) => void\n}\n\ntype RangeSliderProps = SliderBaseProps & {\n /** The slider has one thumb per value */\n range: true\n /** One value per thumb (`v-model:value`) */\n value: number[]\n /** Minimum number of steps between thumbs */\n minStepsBetweenThumbs?: number\n \"onUpdate:value\"?: (value: number[]) => void\n onChange?: (value: number[]) => void\n}\n\nexport type SliderProps = SingleSliderProps | RangeSliderProps\n\n// The component's own `$props` type the value and the callbacks for both\n// modes, so its instance type takes `SliderProps` in their place\ntype SliderInstance = Omit<InstanceType<typeof SliderComponent>, \"$props\"> & { $props: SliderProps }\n\nexport const Slider = SliderComponent as unknown as Omit<typeof SliderComponent, never> & {\n new (): SliderInstance\n}\n\n/**\n * The value field is as wide as its characters at any font size: tabular digits are one `ch` each, and a sign,\n * a decimal point or a separator about half of one, so a right-aligned value sits next to its prefix unit.\n */\nconst getValueWidth = (text: string): string => {\n const digits = text.replace(/[^0-9]/g, \"\").length\n return `calc(${Math.max(digits + (text.length - digits) / 2, 1)}ch + 1px)`\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Slider.js","sourceRoot":"","sources":["../../../../src/components/Slider/Slider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,CAAC,EACD,eAAe,EACf,SAAS,EACT,GAAG,E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IAAI;iBACjE,CAAC;aACH,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAEF,wDAAwD;AACxD,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,KAAa,EAAE,EAAE,CACtD,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,KAAK,GAAG,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;AAwCzG,MAAM,CAAC,MAAM,MAAM,GAAG,eAErB,CAAA;AAED;;;GAGG;AACH,MAAM,aAAa,GAAG,CAAC,IAAY,EAAU,EAAE;IAC7C,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,MAAM,CAAA;IACjD,OAAO,QAAQ,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,WAAW,CAAA;AAC5E,CAAC,CAAA","sourcesContent":["import {\n Comment,\n Fragment,\n computed,\n defineComponent,\n h,\n onBeforeUnmount,\n onMounted,\n ref,\n useId,\n watch,\n type PropType,\n type VNode,\n type VNodeArrayChildren,\n} from \"vue\"\nimport { useBreakpoint } from \"../../composables/useBreakpoints.js\"\nimport { toCssVariables } from \"../../lib/helpers.js\"\nimport { Button } from \"../Button/index.js\"\nimport { Reload } from \"../Icon/index.js\"\nimport { Tooltip } from \"../Tooltip/index.js\"\nimport { SliderRange, SliderRoot, SliderThumb, SliderTrack } from \"./sliderPrimitive.js\"\nimport s from \"@plexui/styles/components/Slider/Slider.module.css\"\n\n// Vue port of packages/ui/src/components/Slider/Slider.tsx. Props, defaults,\n// rendered DOM and behaviour match React (checked by the parity tests).\n// - `value` + `update:value` (also `change`, as React calls it `onChange`)\n// support `v-model:value`; the value is a number, or an array with `range`.\n// - `label` is a prop or the `label` slot (rich content, e.g. a tooltip).\n// - `aria-label` / `aria-labelledby` are the `ariaLabel` / `ariaLabelledby` props.\n// - React's `onFocus` / `onBlur` become the `focus` / `blur` emits: from the\n// value input, and from the thumbs (React's bubbling focus events, so\n// `focusin` / `focusout` on the slider root).\n// - React reads no other props, so other attributes are not passed on.\n// - The slider itself is Radix's, ported in ./sliderPrimitive.ts.\n\nexport type SliderMark = {\n value: number\n label: string\n}\n\n/** lodash `clamp`: NaN stays NaN */\nconst clamp = (number: number, lower: number, upper: number) => {\n let result = number\n if (result === result) {\n result = result <= upper ? result : upper\n result = result >= lower ? result : lower\n }\n return result\n}\n\n/** lodash `round(number, precision)` */\nconst round = (number: number, precision: number) => {\n const digits = Math.min(Math.trunc(precision), 292)\n if (!digits || !Number.isFinite(number)) return Math.round(number)\n let pair = `${number}e`.split(\"e\")\n const value = Math.round(Number(`${pair[0]}e${Number(pair[1]) + digits}`))\n pair = `${value}e`.split(\"e\")\n return Number(`${pair[0]}e${Number(pair[1]) - digits}`)\n}\n\n/** lodash `debounce(func, wait)` with its defaults: trailing call only */\nconst debounce = <T>(func: (value: T) => void, wait: number) => {\n let timer: ReturnType<typeof setTimeout> | undefined\n let lastValue: T\n const debounced = (value: T) => {\n lastValue = value\n if (timer !== undefined) clearTimeout(timer)\n timer = setTimeout(() => {\n timer = undefined\n func(lastValue)\n }, wait)\n }\n debounced.cancel = () => {\n if (timer !== undefined) clearTimeout(timer)\n timer = undefined\n }\n return debounced\n}\n\nconst hasContent = (nodes: VNodeArrayChildren | undefined): boolean =>\n !!nodes?.some((node) => {\n if (node == null || typeof node === \"boolean\") return false\n if (Array.isArray(node)) return hasContent(node)\n if (typeof node !== \"object\") return node !== \"\"\n const vnode = node as VNode\n if (vnode.type === Comment) return false\n if (vnode.type === Fragment) return hasContent(vnode.children as VNodeArrayChildren)\n return true\n })\n\ntype ResizeEntryBox = \"contentBoxSize\" | \"borderBoxSize\" | \"devicePixelContentBoxSize\"\n\n// Same reading as usehooks-ts' useResizeObserver (content-box)\nconst extractSize = (entry: ResizeObserverEntry, box: ResizeEntryBox, sizeType: \"inlineSize\" | \"blockSize\") => {\n const boxSize = entry[box] as ResizeObserverSize[] | ResizeObserverSize | undefined\n if (!boxSize) {\n if (box === \"contentBoxSize\") {\n return entry.contentRect[sizeType === \"inlineSize\" ? \"width\" : \"height\"]\n }\n return undefined\n }\n return Array.isArray(boxSize) ? boxSize[0]![sizeType] : boxSize[sizeType]\n}\n\n// The minimum difference we enforce between marks, in pixels\nconst MINIMUM_MARK_SPACING_PX = 16\n\n/**\n * A press on the track of a range moves the thumb whose value lies nearest the press, which the slider primitive\n * (a port of Radix) focuses only once that value changes. Focusing it at once lets a phone draw the knob being\n * pressed as the lens of glass (Slider.module.css), even when the press leaves the value as it is. The thumb is\n * the one the primitive moves: the pointer mapped onto min to max across the root (from the right in a\n * right-to-left direction; the port maps left to right), the nearest value, the first on a tie. A press on a\n * thumb itself is left to the primitive, which focuses that thumb.\n */\nconst focusThumbToMove = (event: PointerEvent, root: HTMLElement, values: number[], min: number, max: number, vertical: boolean, rtl: boolean) => {\n const thumbs = Array.from(root.querySelectorAll<HTMLElement>('[role=\"slider\"]'))\n if (thumbs.includes(event.target as HTMLElement)) return\n const rect = root.getBoundingClientRect()\n const ratio = vertical ? (rect.bottom - event.clientY) / rect.height : (rtl ? rect.right - event.clientX : event.clientX - rect.left) / rect.width\n const pointerValue = min + ratio * (max - min)\n const distances = values.map((value) => Math.abs(value - pointerValue))\n const thumb = thumbs[distances.indexOf(Math.min(...distances))]\n if (thumb && thumb !== document.activeElement) thumb.focus({ preventScroll: true, focusVisible: false } as FocusOptions)\n}\n\n/** A knob's value from 0 to 1, by which a phone stands the knob on its value as iOS does (Slider.module.css). */\nconst thumbPercentStyle = (value: number, min: number, max: number) => ({\n \"--slider-thumb-percent\": String(max > min ? clamp((value - min) / (max - min), 0, 1) : 0),\n})\n\n/**\n * Where a knob's centre stands at a value (0 to 1), from the start of a track `width` wide. The primitive (Radix)\n * eases the knob over the whole track to keep it inside; on a phone it stands on the value and stops half its\n * width from each end, as iOS (`clamped`, Slider.module.css).\n */\nconst thumbCentre = (percent: number, width: number, thumbHalf: number, clamped: boolean) =>\n clamped ? clamp(percent * width, thumbHalf, width - thumbHalf) : percent * width + thumbHalf * (1 - 2 * percent)\n\nconst SliderMarks = defineComponent({\n name: \"SliderMarks\",\n props: {\n marks: { type: Array as PropType<SliderMark[]>, required: true },\n getThumb: { type: Function as PropType<() => HTMLElement | null>, required: true },\n min: { type: Number, required: true },\n max: { type: Number, required: true },\n },\n setup(props) {\n // We seperate the container and measure divs so that our resize observer\n // does not fire when we adjust the height of the marks container.\n const marksContainerRef = ref<HTMLDivElement | null>(null)\n const measureRef = ref<HTMLDivElement | null>(null)\n\n // We measure the width of the slider within this component so that sliders\n // without marks do not pay a performance penalty.\n const sliderWidth = ref<number | undefined>(undefined)\n // The knob's travel changes at the phone breakpoint (Slider.module.css), also where the width stays\n const tabletAndUp = useBreakpoint(\"md\")\n let observer: ResizeObserver | undefined\n\n // React's useLayoutEffect on [marks, thumbRef, min, max, sliderWidth]\n const layoutMarks = () => {\n const thumb = props.getThumb()\n const container = marksContainerRef.value\n\n // Impossible\n if (!thumb || !container) {\n return\n }\n\n const markElements = Array.from(container.querySelectorAll<HTMLDivElement>(\"[data-mark]\"))\n\n // Its layout width: a pressed knob is scaled into the lens\n const thumbHalfWidth = thumb.offsetWidth / 2\n const clamped = getComputedStyle(thumb).getPropertyValue(\"--slider-thumb-travel\").trim() === \"clamped\"\n\n // Wipe all styles so we can accurately determine the positions of the marks\n markElements.forEach((markEl) => {\n markEl.style.width = \"\"\n markEl.style.display = \"\"\n })\n\n const width = sliderWidth.value\n const { marks, min, max } = props\n\n const positionMarks = () => {\n if (!width) {\n return\n }\n\n markElements.forEach((markEl, index) => {\n const markValue = marks[index]!.value\n const valuePercent = (markValue - min) / (max - min)\n const markWidth = markEl.getBoundingClientRect().width\n const markHalfWidth = markWidth / 2\n\n // Under the knob's centre at the mark's value, accounting for the width of the mark itself\n let left = thumbCentre(valuePercent, width, thumbHalfWidth, clamped) - markHalfWidth\n\n // Clamp to the left and right bounds of the container\n left = Math.max(0, Math.min(left, width - markWidth))\n\n markEl.style.left = `${left}px`\n })\n }\n\n const marksHaveCollisions = () => {\n for (let i = 0; i < markElements.length - 1; i++) {\n const currentRect = markElements[i]!.getBoundingClientRect()\n const nextRect = markElements[i + 1]!.getBoundingClientRect()\n\n if (currentRect.right + MINIMUM_MARK_SPACING_PX > nextRect.left) {\n return true\n }\n }\n return false\n }\n\n positionMarks()\n\n // If we have collisions, try to wrap the content\n if (marksHaveCollisions()) {\n markElements.forEach((markEl) => {\n markEl.style.width = \"min-content\"\n })\n\n positionMarks()\n\n // Hide all marks if we still have collisions\n if (marksHaveCollisions()) {\n markElements.forEach((markEl) => {\n markEl.style.display = \"none\"\n })\n }\n }\n\n const tallestHeight = Math.max(...markElements.map((markEl) => markEl.getBoundingClientRect().height))\n\n // Give our container a height so that we allocate space on the page\n // for the marks and push down other content when we have to wrap\n container.style.height = tallestHeight > 0 ? `${tallestHeight}px` : \"\"\n // Placed against the slider's width: the marks show, at their own height (Slider.module.css)\n if (width) container.dataset.measured = \"\"\n }\n\n onMounted(() => {\n layoutMarks()\n\n // usehooks-ts useResizeObserver: only a changed content box updates the width\n const measure = measureRef.value\n if (!measure || typeof window === \"undefined\" || !(\"ResizeObserver\" in window)) {\n return\n }\n const previousSize: { width?: number; height?: number } = { width: undefined, height: undefined }\n observer = new ResizeObserver(([entry]) => {\n const width = extractSize(entry!, \"contentBoxSize\", \"inlineSize\")\n const height = extractSize(entry!, \"contentBoxSize\", \"blockSize\")\n if (previousSize.width === width && previousSize.height === height) {\n return\n }\n previousSize.width = width\n previousSize.height = height\n sliderWidth.value = width\n })\n observer.observe(measure, { box: \"content-box\" })\n })\n\n onBeforeUnmount(() => {\n observer?.disconnect()\n })\n\n watch([() => props.marks, () => props.min, () => props.max, sliderWidth, tabletAndUp], layoutMarks, { flush: \"post\" })\n\n return () =>\n h(\"div\", { class: s.MarksContainer, ref: marksContainerRef }, [\n h(\n \"div\",\n { ref: measureRef },\n props.marks.map((mark) =>\n h(\"div\", { \"key\": mark.value, \"class\": s.Mark, \"data-mark\": \"true\" }, [\n h(\"span\", { class: s.MarkLabel }, mark.label),\n ]),\n ),\n ),\n ])\n },\n})\n\nconst SliderComponent = defineComponent({\n name: \"Slider\",\n inheritAttrs: false,\n props: {\n /** The minimum value the slider can have */\n min: { type: Number, required: true },\n /** The maximum value the slider can have */\n max: { type: Number, required: true },\n /** The step increment between slider values */\n step: { type: Number, required: true },\n /**\n * The current value: a number, or an array of values (one per thumb)\n * with `range`. Bind with `v-model:value`.\n */\n value: { type: [Number, Array] as PropType<number | number[]>, required: true },\n /** When true, the slider has one thumb per value of the `value` array. @default false */\n range: { type: Boolean, default: false },\n /** Unit to display next to the slider value (e.g., ms, px) */\n unit: String,\n /** Unit to display before the slider value (e.g., $) */\n prefixUnit: String,\n /** Label for the slider; the `label` slot takes rich content */\n label: String,\n /** Accessible name for the slider when there is no visible `label` */\n ariaLabel: String,\n /** Id of an element that names the slider; takes precedence over `label` */\n ariaLabelledby: String,\n /** List of marks to display below the slider track (horizontal only) */\n marks: Array as PropType<SliderMark[]>,\n /** Color of the slider track */\n trackColor: String,\n /** Color of the slider progress along the track */\n rangeColor: String,\n /** Disables the slider and its value input. @default false */\n disabled: { type: Boolean, default: false },\n /** Orientation of the slider. @default \"horizontal\" */\n orientation: { type: String as PropType<\"horizontal\" | \"vertical\">, default: \"horizontal\" },\n /** Value offered as a \"reset to default\" option (single thumb only) */\n resetValue: Number,\n /** Text of the reset button's tooltip (single thumb only). @default \"Reset to default\" */\n resetTooltip: String,\n /** Minimum number of steps between thumbs (range only) */\n minStepsBetweenThumbs: Number,\n },\n emits: {\n /** The value changed (`v-model:value`): a number, or an array with `range` */\n \"update:value\": (_value: number | number[]) => { void _value; return true },\n /** Same payload as `update:value`, named after React's `onChange` */\n \"change\": (_value: number | number[]) => { void _value; return true },\n /** The value input or a thumb gained focus */\n \"focus\": (_event: FocusEvent) => { void _event; return true },\n /** The value input or a thumb lost focus */\n \"blur\": (_event: FocusEvent) => { void _event; return true },\n },\n setup(props, { attrs, slots, emit, expose }) {\n const id = useId()\n const labelId = `${id}-label`\n const isRange = () => props.range === true\n const precision = computed(() => String(props.step).split(\".\")[1]?.length ?? 0)\n\n const reportChange = (value: number | number[]) => {\n emit(\"update:value\", value)\n emit(\"change\", value)\n }\n\n // Single-mode state for editable input\n const inputValue = ref<string>(isRange() ? \"\" : String((props.value as number).toFixed(precision.value)))\n const setInputValueNumber = (nextValue: number) => {\n inputValue.value = nextValue.toFixed(precision.value)\n }\n\n // prevents input from jumping around while the user is typing; an\n // immediate change (a key, blur) cancels the pending typed one\n const debouncedOnChange = debounce((value: number) => {\n if (!props.disabled && !isRange()) reportChange(value)\n }, 250)\n // Cancel pending input when its owner unmounts.\n onBeforeUnmount(() => debouncedOnChange.cancel())\n\n const pointerDown = ref(false)\n // A phone's reset is a button of its own beside the value (below)\n const tabletAndUp = useBreakpoint(\"md\")\n // A press ends where the finger lifts, even when something else takes the pointer away (a sheet that a touch\n // drags, a scroll the browser takes over): the slider's own pointerup never comes then, so the window hears the\n // lift and a lost capture ends the press too.\n let releasePress: (() => void) | null = null\n const endPress = () => {\n releasePress?.()\n releasePress = null\n pointerDown.value = false\n }\n onBeforeUnmount(() => releasePress?.())\n const resetPending = ref(false)\n // Read the controlled owner after a reset request, including a refused request.\n watch([resetPending, () => props.value, isRange], () => {\n if (!resetPending.value) return\n resetPending.value = false\n if (!isRange()) setInputValueNumber(props.value as number)\n }, { flush: \"post\" })\n watch([() => props.disabled, isRange, () => props.value, precision], () => {\n if (!props.disabled) return\n debouncedOnChange.cancel()\n endPress()\n // A sync watcher runs at each prop as Vue sets them one by one: a disabled range switched to one thumb has\n // range off here while its value is still the array, and the number comes with the next prop\n if (!isRange() && typeof props.value === \"number\") setInputValueNumber(props.value)\n }, { flush: \"sync\" })\n const isMounted = ref(false)\n\n // Used to position the input over the thumb\n const inputRef = ref<HTMLInputElement | null>(null)\n const rootRef = ref<HTMLElement | null>(null)\n // We assume that the width of the thumb does not change from render to render\n let thumbElement: HTMLElement | null = null\n const setRoot = (element: HTMLElement | null) => {\n rootRef.value = element\n }\n const setThumb = (element: HTMLElement | null) => {\n thumbElement = element\n }\n const getThumb = () => thumbElement\n\n expose({ root: rootRef })\n\n // Calculate animation duration based on the distance the thumb needs to move\n // Skip custom animation for range mode: let Radix handle it\n const percent = computed(() => (isRange() ? 0 : ((props.value as number) - props.min) / (props.max - props.min)))\n // Plex's usePrevious: the percent before its latest change (recorded after\n // the render that changed it), the same across renders that keep it\n let lastPercent = percent.value\n let previousPercent = percent.value\n watch(\n percent,\n (next) => {\n previousPercent = lastPercent\n lastPercent = next\n },\n { flush: \"post\" },\n )\n const getPreviousPercent = () => (Object.is(lastPercent, percent.value) ? previousPercent : lastPercent)\n\n // Sort marks for collision detection (again only when a value or label changes, as in React)\n const marksKey = () => JSON.stringify((props.marks ?? []).map(({ value, label }) => [value, label]))\n let sortedMarks: SliderMark[] = []\n let sortedMarksKey: string | undefined\n const getMarks = () => {\n const key = marksKey()\n if (key !== sortedMarksKey) {\n sortedMarks = [...(props.marks ?? [])].sort((a, b) => a.value - b.value)\n sortedMarksKey = key\n }\n return sortedMarks\n }\n\n // Validate marks\n const validateMarks = () => {\n const markValues = new Set<number>()\n for (const mark of getMarks()) {\n if (mark.value < props.min || mark.value > props.max) {\n throw new Error(`Slider mark value ${mark.value} is out of bounds [${props.min}, ${props.max}]`)\n }\n if (markValues.has(mark.value)) {\n throw new Error(\"Slider marks must have unique values\")\n }\n markValues.add(mark.value)\n }\n }\n\n // Update value if out of bounds (single mode only)\n const clampOutOfBounds = () => {\n if (isRange()) return\n const v = props.value as number\n const clamped = clamp(v, props.min, props.max)\n if (clamped !== v) {\n reportChange(clamped)\n setInputValueNumber(clamped)\n }\n }\n\n const syncInputValue = () => {\n if (isRange()) return\n if (inputRef.value !== document.activeElement) {\n setInputValueNumber(props.value as number)\n }\n }\n\n // React's mount effects, in their order\n onMounted(() => {\n isMounted.value = true\n validateMarks()\n clampOutOfBounds()\n syncInputValue()\n })\n watch([marksKey, () => props.min, () => props.max], validateMarks, { flush: \"post\" })\n watch([() => props.min, () => props.max, precision, isRange], clampOutOfBounds, { flush: \"post\" })\n watch([() => props.value, precision, isRange], syncInputValue, { flush: \"post\" })\n\n // Single-mode keyboard handler: a key's change replaces a pending typed one\n const handleKeyDown = (evt: KeyboardEvent) => {\n if (props.disabled || isRange()) return\n const singleValue = props.value as number\n const { min, max, step } = props\n if (evt.key === \"Home\") {\n evt.preventDefault()\n debouncedOnChange.cancel()\n reportChange(min)\n setInputValueNumber(min)\n }\n if (evt.key === \"End\") {\n evt.preventDefault()\n debouncedOnChange.cancel()\n reportChange(max)\n setInputValueNumber(max)\n }\n if (evt.key === \"ArrowUp\") {\n evt.preventDefault()\n const multiplier = evt.shiftKey ? 10 : 1\n const next = clamp(singleValue + step * multiplier, min, max)\n debouncedOnChange.cancel()\n reportChange(next)\n setInputValueNumber(next)\n }\n if (evt.key === \"ArrowDown\") {\n evt.preventDefault()\n const multiplier = evt.shiftKey ? 10 : 1\n const next = clamp(singleValue - step * multiplier, min, max)\n debouncedOnChange.cancel()\n reportChange(next)\n setInputValueNumber(next)\n }\n if (evt.key === \"Enter\" || evt.key === \"Escape\") {\n evt.preventDefault()\n ;(evt.currentTarget as HTMLInputElement).blur()\n }\n }\n\n const handleInputChange = (evt: Event) => {\n if (props.disabled || isRange()) return\n const target = evt.currentTarget as HTMLInputElement\n // Mobile decimal keyboards may use a comma. A minus is valid only below zero.\n const nextValue = target.value.trim().replace(/,/g, \".\").replace(props.min < 0 ? /(?!^-)[^\\d.]/g : /[^\\d.]/g, \"\")\n debouncedOnChange.cancel()\n let parsed = parseFloat(nextValue || \"0\")\n if (Number.isNaN(parsed)) {\n // A lone \"-\" or \".\" is a number still being typed: nothing to report yet\n inputValue.value = nextValue\n if (target.value !== nextValue) target.value = nextValue\n return\n }\n parsed = clamp(parsed, props.min, props.max)\n if (props.step >= 1) {\n parsed = Math.floor(parsed)\n }\n debouncedOnChange(parsed)\n inputValue.value = nextValue\n // A controlled React input shows its state again after the event\n if (target.value !== nextValue) target.value = nextValue\n }\n\n const handleInputBlur = (evt: FocusEvent) => {\n if (isRange()) return\n // Blur commits the typed text, so its pending debounced change is dropped\n debouncedOnChange.cancel()\n if (props.disabled) {\n setInputValueNumber(props.value as number)\n emit(\"blur\", evt)\n return\n }\n let parsed = parseFloat((evt.target as HTMLInputElement).value.trim().replace(/,/g, \".\")) || 0\n if (props.step >= 1) {\n parsed = Math.floor(parsed)\n } else {\n parsed = round(parsed, precision.value)\n }\n parsed = clamp(parsed, props.min, props.max)\n if (parsed !== (props.value as number)) {\n reportChange(parsed)\n }\n setInputValueNumber(parsed)\n emit(\"blur\", evt)\n }\n\n const handleInputFocus = (evt: FocusEvent) => {\n const target = evt.currentTarget as HTMLInputElement\n target.setSelectionRange(0, target.value.length)\n emit(\"focus\", evt)\n }\n\n // Radix value/onChange wiring\n const handleValueChange = (values: number[]) => {\n if (props.disabled) return\n debouncedOnChange.cancel()\n reportChange(isRange() ? values : values[0]!)\n }\n\n return () => {\n // Read every piece of state, as a React render depends on all of them\n const currentInputValue = inputValue.value\n const isPointerDown = pointerDown.value\n const mounted = isMounted.value\n\n const { min, max, unit, prefixUnit, trackColor, rangeColor, disabled, orientation, value } = props\n const range = isRange()\n const isVertical = orientation === \"vertical\"\n const singleValue = range ? 0 : (value as number)\n\n const inputWidth = getValueWidth(currentInputValue)\n\n const animationDurationMS =\n range || !mounted || isPointerDown ? 0 : Math.max(Math.abs(percent.value - getPreviousPercent()) * 300, 100)\n\n const marks = getMarks()\n\n // Radix value\n const radixValue = range ? (value as number[]) : [value as number]\n\n // Single-mode props\n const resetValue = !range ? props.resetValue : undefined\n const resetTooltip = !range ? (props.resetTooltip ?? \"Reset to default\") : undefined\n\n // Range-mode props\n const minStepsBetweenThumbs = range ? props.minStepsBetweenThumbs : undefined\n\n // Show marks only in horizontal orientation\n const showMarks = marks.length > 0 && !isVertical\n\n // Format range display text\n const rangeDisplayText = range\n ? (value as number[]).map((v) => `${prefixUnit ?? \"\"}${v.toFixed(precision.value)}${unit ?? \"\"}`).join(\" – \")\n : \"\"\n\n const labelSlot = slots.label?.()\n const labelContent = hasContent(labelSlot) ? labelSlot : props.label\n // What names the thumbs: an explicit labelledby, else the visible label\n const nameId = props.ariaLabelledby ?? (labelContent ? labelId : undefined)\n const { ariaLabel } = props\n\n return h(\"div\", { \"class\": [s.SliderWrap, attrs.class], \"data-orientation\": orientation }, [\n labelContent\n ? h(\"div\", { class: s.SliderLabel }, [\n // Range mode renders no value input, so the label only names the thumbs\n h(\"label\", { for: range ? undefined : id, id: labelId, class: \"flex-1\" }, labelContent),\n !range && resetValue !== undefined\n ? h(\n Tooltip,\n { content: resetTooltip!, compact: true },\n {\n default: () =>\n h(\n Button,\n {\n // A phone draws the reset as the small round gray button of the iOS 27 kit beside the\n // row's value: uniform and soft, touch.css makes it the 28px circle that takes touches\n // 44px around it. A desktop one is the bare glyph that shows on hover.\n \"size\": \"2xs\",\n \"variant\": tabletAndUp.value ? \"ghost\" : \"soft\",\n \"color\": \"secondary\",\n \"uniform\": !tabletAndUp.value,\n \"pill\": !tabletAndUp.value,\n \"class\": s.Reset,\n \"aria-label\": resetTooltip,\n \"disabled\": disabled,\n \"data-hide\": disabled || (resetValue === singleValue && !isPointerDown),\n \"onClick\": () => {\n if (disabled) return\n debouncedOnChange.cancel()\n reportChange(resetValue)\n resetPending.value = true\n },\n },\n { default: () => h(Reload) },\n ),\n },\n )\n : null,\n range\n ? h(\"span\", { class: s.RangeDisplay }, rangeDisplayText)\n : h(\"div\", { class: s.SliderValue, onClick: () => { if (!disabled) inputRef.value?.focus() } }, [\n prefixUnit ? h(\"span\", { class: s.ValueUnit }, prefixUnit) : null,\n h(\"input\", {\n \"id\": id,\n \"class\": s.ValueInput,\n \"ref\": inputRef,\n \"style\": { width: inputWidth },\n \"onKeydown\": handleKeyDown,\n // React keeps the `value` attribute in sync with a controlled input\n \"^value\": currentInputValue,\n \"value\": currentInputValue,\n \"type\": \"text\",\n \"inputmode\": min < 0 ? \"text\" : Number.isInteger(min) && Number.isInteger(max) && Number.isInteger(props.step) ? \"numeric\" : \"decimal\",\n \"onClick\": (e: MouseEvent) => e.stopPropagation(),\n \"onBlur\": handleInputBlur,\n \"onFocus\": handleInputFocus,\n \"onInput\": handleInputChange,\n \"disabled\": disabled,\n }),\n unit ? h(\"span\", { class: s.ValueUnit }, unit) : null,\n ]),\n ])\n : null,\n h(\"div\", { class: s.SliderContainer }, [\n h(\n SliderRoot,\n {\n \"elementRef\": setRoot,\n \"class\": s.Slider,\n \"onValueChange\": handleValueChange,\n \"min\": min,\n \"max\": max,\n \"step\": props.step,\n \"disabled\": disabled,\n \"values\": radixValue,\n \"orientation\": orientation,\n \"minStepsBetweenThumbs\": minStepsBetweenThumbs,\n // React's onFocus / onBlur bubble from the thumbs\n \"onFocusin\": (evt: FocusEvent) => emit(\"focus\", evt),\n \"onFocusout\": (evt: FocusEvent) => emit(\"blur\", evt),\n \"onPointerdown\": (event: PointerEvent) => {\n if (disabled) return\n pointerDown.value = true\n releasePress?.()\n const { pointerId } = event\n const end = (lift: PointerEvent) => {\n if (lift.pointerId === pointerId) endPress()\n }\n window.addEventListener(\"pointerup\", end, true)\n window.addEventListener(\"pointercancel\", end, true)\n releasePress = () => {\n window.removeEventListener(\"pointerup\", end, true)\n window.removeEventListener(\"pointercancel\", end, true)\n }\n if (range) focusThumbToMove(event, event.currentTarget as HTMLElement, radixValue, props.min, props.max, isVertical, false)\n },\n \"onPointerup\": endPress,\n \"onPointercancel\": endPress,\n \"onLostpointercapture\": endPress,\n \"data-pressed\": isPointerDown ? \"\" : undefined,\n \"data-range\": range ? \"\" : undefined,\n \"style\": toCssVariables({\n \"slider-duration\": `${animationDurationMS}ms`,\n \"slider-track-color\": trackColor,\n \"slider-range-color\": rangeColor,\n }),\n },\n {\n default: () => [\n h(SliderTrack, { class: s.Track }, { default: () => h(SliderRange, { class: s.Range }) }),\n ...(range\n ? (value as number[]).map((_, i) =>\n h(SliderThumb, {\n \"key\": i,\n \"id\": `${id}-thumb-${i}`,\n \"class\": s.Thumb,\n \"style\": thumbPercentStyle((value as number[])[i]!, props.min, props.max),\n // The marks measure the first thumb (all thumbs are the same size)\n \"elementRef\": i === 0 ? setThumb : undefined,\n // Name plus the thumb's own Radix name (\"Minimum\" / \"Maximum\"),\n // so the endpoints stay distinguishable\n \"aria-labelledby\": nameId ? `${nameId} ${id}-thumb-${i}` : undefined,\n // Only pass aria-label when set: it replaces the name Radix gives the thumb\n ...(!nameId && ariaLabel\n ? { \"aria-label\": `${ariaLabel} ${rangeThumbName(i, (value as number[]).length)}`.trim() }\n : {}),\n }),\n )\n : [\n h(SliderThumb, {\n \"class\": s.Thumb,\n \"style\": thumbPercentStyle(value as number, props.min, props.max),\n \"elementRef\": setThumb,\n \"aria-labelledby\": nameId,\n ...(!nameId && ariaLabel ? { \"aria-label\": ariaLabel } : {}),\n }),\n ]),\n ],\n },\n ),\n showMarks ? h(SliderMarks, { marks, getThumb, min, max }) : null,\n ]),\n ])\n }\n },\n})\n\n// Matches the names Radix gives range thumbs on its own\nconst rangeThumbName = (index: number, count: number) =>\n count === 2 ? (index === 0 ? \"Minimum\" : \"Maximum\") : count > 2 ? `Value ${index + 1} of ${count}` : \"\"\n\ntype SliderOwnProps = InstanceType<typeof SliderComponent>[\"$props\"]\n\ntype SliderBaseProps = Omit<\n SliderOwnProps,\n \"range\" | \"value\" | \"resetValue\" | \"resetTooltip\" | \"minStepsBetweenThumbs\" | \"onUpdate:value\" | \"onChange\"\n> & { class?: unknown }\n\n// As in React, `range` decides the value's type and the props that apply\ntype SingleSliderProps = SliderBaseProps & {\n /** When false or omitted, the slider has a single thumb */\n range?: false\n /** The current value of the slider (`v-model:value`) */\n value: number\n /** Value offered as a \"reset to default\" option */\n resetValue?: number\n /** Text of the reset button's tooltip. @default \"Reset to default\" */\n resetTooltip?: string\n \"onUpdate:value\"?: (value: number) => void\n onChange?: (value: number) => void\n}\n\ntype RangeSliderProps = SliderBaseProps & {\n /** The slider has one thumb per value */\n range: true\n /** One value per thumb (`v-model:value`) */\n value: number[]\n /** Minimum number of steps between thumbs */\n minStepsBetweenThumbs?: number\n \"onUpdate:value\"?: (value: number[]) => void\n onChange?: (value: number[]) => void\n}\n\nexport type SliderProps = SingleSliderProps | RangeSliderProps\n\n// The component's own `$props` type the value and the callbacks for both\n// modes, so its instance type takes `SliderProps` in their place\ntype SliderInstance = Omit<InstanceType<typeof SliderComponent>, \"$props\"> & { $props: SliderProps }\n\nexport const Slider = SliderComponent as unknown as Omit<typeof SliderComponent, never> & {\n new (): SliderInstance\n}\n\n/**\n * The value field is as wide as its characters at any font size: tabular digits are one `ch` each, and a sign,\n * a decimal point or a separator about half of one, so a right-aligned value sits next to its prefix unit.\n */\nconst getValueWidth = (text: string): string => {\n const digits = text.replace(/[^0-9]/g, \"\").length\n return `calc(${Math.max(digits + (text.length - digits) / 2, 1)}ch + 1px)`\n}\n"]}
|
|
@@ -2,7 +2,7 @@ import { computed, defineComponent, h, inject, onBeforeUnmount, onMounted, provi
|
|
|
2
2
|
import s from "@plexui/styles/components/TabBar/TabBar.module.css";
|
|
3
3
|
import { Search as SearchIcon } from "../Icon/index.js";
|
|
4
4
|
import { hasContent } from "../../lib/slotContent.js";
|
|
5
|
-
import { TOOLBAR_HOST } from "../Toolbar/Toolbar.js";
|
|
5
|
+
import { barBackground, TOOLBAR_HOST } from "../Toolbar/Toolbar.js";
|
|
6
6
|
// Vue port of packages/ui/src/components/TabBar/TabBar.tsx. Exports are flat (`TabBarItem` for `TabBar.Item`);
|
|
7
7
|
// the symbol of an item is its `icon` slot, and React's `accessory` is the bar's `accessory` slot. React's
|
|
8
8
|
// `value` + `onValueChange` become `value` + `update:value` (`v-model:value`), `minimized` + `onMinimizedChange`
|
|
@@ -104,7 +104,7 @@ const TabBarComponent = defineComponent({
|
|
|
104
104
|
minimized: { type: Boolean, default: undefined },
|
|
105
105
|
/** The minimized state when it is initially rendered. @default false */
|
|
106
106
|
defaultMinimized: { type: Boolean, default: false },
|
|
107
|
-
/** How the bar meets the content scrolled under it; see `BarBackground
|
|
107
|
+
/** How the bar meets the content scrolled under it; see `BarBackground` (`"solid"` is the earlier name of `"hard"`). @default "soft" */
|
|
108
108
|
background: { type: String, default: "soft" },
|
|
109
109
|
/** Accessible name of the navigation. @default "Tabs" */
|
|
110
110
|
ariaLabel: { type: String, default: "Tabs" },
|
|
@@ -216,7 +216,7 @@ const TabBarComponent = defineComponent({
|
|
|
216
216
|
"aria-label": props.ariaLabel,
|
|
217
217
|
"class": [s.TabBar, attrs.class],
|
|
218
218
|
"data-host": host?.kind,
|
|
219
|
-
"data-background": props.background,
|
|
219
|
+
"data-background": barBackground(props.background),
|
|
220
220
|
"data-content-below": host?.contentBelow?.value ? "" : undefined,
|
|
221
221
|
"data-minimized": minimized.value ? "" : undefined,
|
|
222
222
|
"data-search": props.search && !props.prominent ? "" : undefined,
|