@wow-two-beta/fe 0.0.47 → 0.0.49

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.
@@ -32,7 +32,8 @@ export interface ToggleGroupProps<T extends string = string> extends /* @vue-ign
32
32
  * - `segmented` — iOS-style connected pill row on a muted track; the active
33
33
  * segment lifts to a `background` surface. Forces `isAttached`.
34
34
  * - `pill` — individually-separated rounded pills (each item its own detached
35
- * chip). Forces detached (never attaches).
35
+ * chip). Forces detached (never attaches). Mark a label with `data-toggle-label`
36
+ * to show it beside the pressed icon or on hover and keyboard focus.
36
37
  */
37
38
  readonly variant?: ToggleGroupVariant;
38
39
  /**
@@ -90,7 +90,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
90
90
  // Segmented skeleton: every segment lifts like the active one, so its label bar reads against the muted track.
91
91
  isSegmented.value && skeleton.isSkeleton.value && "[&>*]:bg-background!",
92
92
  // Pill: fully-rounded detached chips (gap already applied via the non-attached branch above).
93
- isPill.value && "[&>*]:rounded-full!",
93
+ isPill.value && [
94
+ "[&>*]:rounded-full!",
95
+ // Only pills that opt in with a label marker change. On touch, their labels stay inline.
96
+ "[@media(hover:hover)]:[&>[data-pressed=false]:has([data-toggle-label])]:relative",
97
+ "[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:pointer-events-none",
98
+ "[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:invisible",
99
+ "[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:absolute",
100
+ "[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:start-0",
101
+ "[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:top-full",
102
+ "[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:z-10",
103
+ "[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:mt-1",
104
+ "[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:whitespace-nowrap",
105
+ "[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:rounded-md",
106
+ "[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:bg-popover",
107
+ "[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:px-2",
108
+ "[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:py-1",
109
+ "[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:text-popover-foreground",
110
+ "[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:shadow-md",
111
+ "[@media(hover:hover)]:[&>[data-pressed=false]:is(:hover,:focus-visible)_[data-toggle-label]]:visible"
112
+ ],
94
113
  // Equal-width tiles: every item shares the row/column extent (icon category strip).
95
114
  props.equalWidth && "[&>*]:flex-1 [&>*]:basis-0",
96
115
  attrs.class
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleGroup.vue.js","sources":["../../../../src/presentation/forms/toggleGroup/ToggleGroup.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { HTMLAttributes } from 'vue';\nimport type { Orientation } from '../../../foundation/styles';\nimport type { ToggleGroupVariant, ToggleItemRole, ToggleMode } from './ToggleGroup.variants';\n\n/**\n * Props for the group, generic over the value type `T`.\n *\n * `T` defaults to `string`, so untyped usage keeps the historical `string | null`\n * shape. Pass a string-literal union or string enum\n * (`<ToggleGroup<GradientType> …>`) to have `modelValue` / `@update:modelValue` emit\n * that narrowed type instead — no cast needed at the call site.\n *\n * Divergence from the React original: there, `type` discriminated a `SingleProps<T>`\n * / `MultiProps` union, so single mode saw `T | null` and multi mode `readonly\n * string[]`. Vue's prop compiler flattens a union type into one merged prop set, so\n * `modelValue` / `defaultValue` carry both shapes and the mode still decides which is\n * live at runtime.\n */\nexport interface ToggleGroupProps<T extends string = string> extends /* @vue-ignore */ Omit<\n HTMLAttributes,\n 'defaultValue' | 'onChange'\n> {\n /** The selection cardinality — `Single` for at-most-one, `Multi` for any number. */\n readonly type?: ToggleMode;\n\n /** The controlled value — `T | null` in single mode, a string array in multi mode. */\n readonly modelValue?: T | null | ReadonlyArray<string>;\n\n /** The uncontrolled initial value. Ignored once `modelValue` is set. */\n readonly defaultValue?: T | null | ReadonlyArray<string>;\n\n /** The layout axis of the button row/column. @default Orientation.Horizontal */\n readonly orientation?: Orientation;\n\n /** The attached state — collapses inner radii into a connected row/column. @default true */\n readonly isAttached?: boolean;\n\n /**\n * The visual style.\n * - `default` — standard button row/column (borders + attached radii).\n * - `segmented` — iOS-style connected pill row on a muted track; the active\n * segment lifts to a `background` surface. Forces `isAttached`.\n * - `pill` — individually-separated rounded pills (each item its own detached\n * chip). Forces detached (never attaches).\n */\n readonly variant?: ToggleGroupVariant;\n\n /**\n * The ARIA role wiring.\n * - `group` (default) — `role=\"group\"` of independent toggle buttons.\n * - `tab` — opt into tablist semantics: root renders `role=\"tablist\"` and each\n * item `role=\"tab\"` + `aria-selected`. Pairs naturally with single-select.\n * @default ToggleItemRole.Group\n */\n readonly itemRole?: ToggleItemRole;\n\n /**\n * The equal-width state — lays items out as equal-width tiles (each `flex-1 basis-0`)\n * for an icon category strip where every cell should share the row width. Additive;\n * the default keeps intrinsic item widths.\n * @default false\n */\n readonly equalWidth?: boolean;\n /** Keeps every segment's box and draws their labels as bars, inert; defaults to the nearest `DataRegion`. */\n readonly isSkeleton?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends string = string\">\nimport { useNativeFormReset } from '../UseNativeFormReset';\nimport { computed, provide, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, Orientation as OrientationValue } from '../../../foundation/styles';\nimport { useControlled } from '../../../foundation/state';\nimport { provideSkeletonState, useSkeletonState } from '../../feedback/skeletonState/SkeletonStateContext';\nimport { ToggleGroupKey } from './ToggleGroupContext';\nimport {\n ToggleGroupVariant as ToggleGroupVariantValue,\n ToggleItemRole as ToggleItemRoleValue,\n ToggleMode as ToggleModeValue,\n} from './ToggleGroup.variants';\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\n/** Renders a row of toggle buttons sharing one selection — at most one active, or any number. */\ndefineOptions({ name: 'ToggleGroup', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToggleGroupProps<T>>(), {\n orientation: OrientationValue.Horizontal,\n isAttached: true,\n variant: ToggleGroupVariantValue.Default,\n itemRole: ToggleItemRoleValue.Group,\n equalWidth: false,\n type: undefined,\n modelValue: undefined,\n defaultValue: undefined,\n isSkeleton: undefined,\n});\n\n/* One flag switches every segment: each keeps its box and draws its label as a bar. */\nconst skeleton = useSkeletonState(() => props.isSkeleton);\nprovideSkeletonState(skeleton);\n\nconst emit = defineEmits<{\n /** Fires when the reader changes the selection — `T | null` in single mode, the array in multi mode. */\n 'update:modelValue': [value: T | null | ReadonlyArray<string>];\n}>();\n\ndefineSlots<{\n /** The `ToggleInput` children whose selection this group coordinates. */\n default(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\nconst mode = computed(() => (props.type === ToggleModeValue.Multi ? ToggleModeValue.Multi : ToggleModeValue.Single));\nconst isSegmented = computed(() => props.variant === ToggleGroupVariantValue.Segmented);\nconst isPill = computed(() => props.variant === ToggleGroupVariantValue.Pill);\nconst isTablist = computed(() => props.itemRole === ToggleItemRoleValue.Tab);\nconst isHorizontal = computed(() => props.orientation === OrientationValue.Horizontal);\n// Segmented is inherently an attached pill row — the muted track only reads as one control when its\n// segments touch. Pill is the inverse — always detached chips, never attached.\nconst attached = computed(() => (isPill.value ? false : isSegmented.value || props.isAttached));\n\nconst singleCtl = useControlled<string | null>({\n controlled: () =>\n mode.value === ToggleModeValue.Single ? (props.modelValue as string | null | undefined) : undefined,\n default: props.type !== ToggleModeValue.Multi ? ((props.defaultValue as string | null | undefined) ?? null) : null,\n onChange: (next) => {\n if (mode.value === ToggleModeValue.Single) emit('update:modelValue', next as T | null);\n },\n});\nconst { value: singleValue, setValue: setSingleValue } = singleCtl;\n\nconst multiCtl = useControlled<ReadonlyArray<string>>({\n controlled: () =>\n mode.value === ToggleModeValue.Multi ? (props.modelValue as ReadonlyArray<string> | undefined) : undefined,\n default:\n props.type === ToggleModeValue.Multi ? ((props.defaultValue as ReadonlyArray<string> | undefined) ?? []) : [],\n onChange: (next) => {\n if (mode.value === ToggleModeValue.Multi) emit('update:modelValue', next);\n },\n});\nconst { value: multiValue, setValue: setMultiValue } = multiCtl;\n\nfunction isPressed(childValue: string | undefined): boolean {\n if (childValue === undefined) return false;\n return mode.value === ToggleModeValue.Single\n ? singleValue.value === childValue\n : multiValue.value.includes(childValue);\n}\n\nfunction togglePressed(childValue: string | undefined): void {\n if (childValue === undefined) return;\n if (mode.value === ToggleModeValue.Single) {\n setSingleValue(singleValue.value === childValue ? null : childValue);\n } else {\n setMultiValue(\n multiValue.value.includes(childValue)\n ? multiValue.value.filter((entry) => entry !== childValue)\n : [...multiValue.value, childValue],\n );\n }\n}\n\n/* Each `ToggleInput` child reads its own slice off this — the provide/inject replacement for the\n original's `Children.map` + `cloneElement`. `itemRole` is a live getter, not a snapshot. */\nprovide(ToggleGroupKey, {\n isPressed,\n toggle: togglePressed,\n get itemRole() {\n return props.itemRole;\n },\n});\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'inline-flex',\n isHorizontal.value ? 'flex-row' : 'flex-col',\n attached.value\n ? isHorizontal.value\n ? '[&>*]:rounded-none [&>*:first-child]:rounded-l-md [&>*:last-child]:rounded-r-md [&>*:not(:first-child)]:-ml-px'\n : '[&>*]:rounded-none [&>*:first-child]:rounded-t-md [&>*:last-child]:rounded-b-md [&>*:not(:first-child)]:-mt-px'\n : 'gap-2',\n // Segmented: muted track + reset segment chrome; active segment lifts to a `background` surface.\n isSegmented.value && [\n 'rounded-md bg-muted p-1',\n '[&>*]:rounded-md! [&>*]:!ml-0 [&>*]:border-transparent! [&>*]:bg-transparent!',\n '[&>*[data-pressed=true]]:bg-background! [&>*[data-pressed=true]]:text-foreground! [&>*[data-pressed=true]]:shadow-sm',\n ],\n // Segmented skeleton: every segment lifts like the active one, so its label bar reads against the muted track.\n isSegmented.value && skeleton.isSkeleton.value && '[&>*]:bg-background!',\n // Pill: fully-rounded detached chips (gap already applied via the non-attached branch above).\n isPill.value && '[&>*]:rounded-full!',\n // Equal-width tiles: every item shares the row/column extent (icon category strip).\n props.equalWidth && '[&>*]:flex-1 [&>*]:basis-0',\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<HTMLDivElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n\nconst formResetAnchor = useTemplateRef<HTMLInputElement>('formResetAnchor');\nconst formResetRevision = useNativeFormReset(formResetAnchor, () => {\n if (props.type === ToggleModeValue.Multi) multiCtl.reset();\n else singleCtl.reset();\n});\n</script>\n\n<template>\n <!-- Coordinates a row/column of ToggleInput children — `type=\"single\" | \"multi\"`. -->\n <div\n :key=\"formResetRevision\"\n ref=\"root\"\n :role=\"isTablist ? 'tablist' : 'group'\"\n :aria-orientation=\"isTablist ? orientation : undefined\"\n :data-orientation=\"orientation\"\n :data-skeleton=\"skeleton.isSkeleton.value || undefined\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n >\n <slot />\n <input\n ref=\"formResetAnchor\"\n type=\"hidden\"\n :form=\"typeof $attrs.form === 'string' ? $attrs.form : undefined\"\n aria-hidden=\"true\"\n />\n </div>\n</template>\n"],"names":["ToggleModeValue","ToggleGroupVariantValue","ToggleItemRoleValue","OrientationValue","_openBlock","_createElementBlock","_mergeProps","_unref","_renderSlot","_createElementVNode","$attrs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAwFA,UAAM,QAAQ;AAad,UAAM,WAAW,iBAAiB,MAAM,MAAM,UAAU;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,IACjB,CAAC;;AAKC,aAAAI,UAAA,GAAAC,mBAiBM,OAjBNC,WAiBM;AAAA,QAhBH,KAAKC,MAAA,iBAAA;AAAA,iBACF;AAAA,QAAJ,KAAI;AAAA,QACH,MAAM,UAAA,QAAS,YAAA;AAAA,QACf,oBAAkB,UAAA,QAAY,QAAA,cAAc;AAAA,QAC5C,oBAAkB,QAAA;AAAA,QAClB,iBAAeA,MAAA,QAAA,EAAS,WAAW,SAAS;AAAA,QAC5C,OAAO,UAAA;AAAA,MAAA,GACA,iBAAA,KAAgB,GAAA;AAAA,QAExBC,WAAQ,KAAA,QAAA,SAAA;AAAA,QACRC,mBAKE,SAAA;AAAA,mBAJI;AAAA,UAAJ,KAAI;AAAA,UACJ,MAAK;AAAA,UACJ,MAAI,OAASC,YAAO,oBAAoBA,KAAAA,OAAO,OAAO;AAAA,UACvD,eAAY;AAAA,QAAA;;;;;"}
1
+ {"version":3,"file":"ToggleGroup.vue.js","sources":["../../../../src/presentation/forms/toggleGroup/ToggleGroup.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { HTMLAttributes } from 'vue';\nimport type { Orientation } from '../../../foundation/styles';\nimport type { ToggleGroupVariant, ToggleItemRole, ToggleMode } from './ToggleGroup.variants';\n\n/**\n * Props for the group, generic over the value type `T`.\n *\n * `T` defaults to `string`, so untyped usage keeps the historical `string | null`\n * shape. Pass a string-literal union or string enum\n * (`<ToggleGroup<GradientType> …>`) to have `modelValue` / `@update:modelValue` emit\n * that narrowed type instead — no cast needed at the call site.\n *\n * Divergence from the React original: there, `type` discriminated a `SingleProps<T>`\n * / `MultiProps` union, so single mode saw `T | null` and multi mode `readonly\n * string[]`. Vue's prop compiler flattens a union type into one merged prop set, so\n * `modelValue` / `defaultValue` carry both shapes and the mode still decides which is\n * live at runtime.\n */\nexport interface ToggleGroupProps<T extends string = string> extends /* @vue-ignore */ Omit<\n HTMLAttributes,\n 'defaultValue' | 'onChange'\n> {\n /** The selection cardinality — `Single` for at-most-one, `Multi` for any number. */\n readonly type?: ToggleMode;\n\n /** The controlled value — `T | null` in single mode, a string array in multi mode. */\n readonly modelValue?: T | null | ReadonlyArray<string>;\n\n /** The uncontrolled initial value. Ignored once `modelValue` is set. */\n readonly defaultValue?: T | null | ReadonlyArray<string>;\n\n /** The layout axis of the button row/column. @default Orientation.Horizontal */\n readonly orientation?: Orientation;\n\n /** The attached state — collapses inner radii into a connected row/column. @default true */\n readonly isAttached?: boolean;\n\n /**\n * The visual style.\n * - `default` — standard button row/column (borders + attached radii).\n * - `segmented` — iOS-style connected pill row on a muted track; the active\n * segment lifts to a `background` surface. Forces `isAttached`.\n * - `pill` — individually-separated rounded pills (each item its own detached\n * chip). Forces detached (never attaches). Mark a label with `data-toggle-label`\n * to show it beside the pressed icon or on hover and keyboard focus.\n */\n readonly variant?: ToggleGroupVariant;\n\n /**\n * The ARIA role wiring.\n * - `group` (default) — `role=\"group\"` of independent toggle buttons.\n * - `tab` — opt into tablist semantics: root renders `role=\"tablist\"` and each\n * item `role=\"tab\"` + `aria-selected`. Pairs naturally with single-select.\n * @default ToggleItemRole.Group\n */\n readonly itemRole?: ToggleItemRole;\n\n /**\n * The equal-width state — lays items out as equal-width tiles (each `flex-1 basis-0`)\n * for an icon category strip where every cell should share the row width. Additive;\n * the default keeps intrinsic item widths.\n * @default false\n */\n readonly equalWidth?: boolean;\n /** Keeps every segment's box and draws their labels as bars, inert; defaults to the nearest `DataRegion`. */\n readonly isSkeleton?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends string = string\">\nimport { useNativeFormReset } from '../UseNativeFormReset';\nimport { computed, provide, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, Orientation as OrientationValue } from '../../../foundation/styles';\nimport { useControlled } from '../../../foundation/state';\nimport { provideSkeletonState, useSkeletonState } from '../../feedback/skeletonState/SkeletonStateContext';\nimport { ToggleGroupKey } from './ToggleGroupContext';\nimport {\n ToggleGroupVariant as ToggleGroupVariantValue,\n ToggleItemRole as ToggleItemRoleValue,\n ToggleMode as ToggleModeValue,\n} from './ToggleGroup.variants';\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\n/** Renders a row of toggle buttons sharing one selection — at most one active, or any number. */\ndefineOptions({ name: 'ToggleGroup', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToggleGroupProps<T>>(), {\n orientation: OrientationValue.Horizontal,\n isAttached: true,\n variant: ToggleGroupVariantValue.Default,\n itemRole: ToggleItemRoleValue.Group,\n equalWidth: false,\n type: undefined,\n modelValue: undefined,\n defaultValue: undefined,\n isSkeleton: undefined,\n});\n\n/* One flag switches every segment: each keeps its box and draws its label as a bar. */\nconst skeleton = useSkeletonState(() => props.isSkeleton);\nprovideSkeletonState(skeleton);\n\nconst emit = defineEmits<{\n /** Fires when the reader changes the selection — `T | null` in single mode, the array in multi mode. */\n 'update:modelValue': [value: T | null | ReadonlyArray<string>];\n}>();\n\ndefineSlots<{\n /** The `ToggleInput` children whose selection this group coordinates. */\n default(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\nconst mode = computed(() => (props.type === ToggleModeValue.Multi ? ToggleModeValue.Multi : ToggleModeValue.Single));\nconst isSegmented = computed(() => props.variant === ToggleGroupVariantValue.Segmented);\nconst isPill = computed(() => props.variant === ToggleGroupVariantValue.Pill);\nconst isTablist = computed(() => props.itemRole === ToggleItemRoleValue.Tab);\nconst isHorizontal = computed(() => props.orientation === OrientationValue.Horizontal);\n// Segmented is inherently an attached pill row — the muted track only reads as one control when its\n// segments touch. Pill is the inverse — always detached chips, never attached.\nconst attached = computed(() => (isPill.value ? false : isSegmented.value || props.isAttached));\n\nconst singleCtl = useControlled<string | null>({\n controlled: () =>\n mode.value === ToggleModeValue.Single ? (props.modelValue as string | null | undefined) : undefined,\n default: props.type !== ToggleModeValue.Multi ? ((props.defaultValue as string | null | undefined) ?? null) : null,\n onChange: (next) => {\n if (mode.value === ToggleModeValue.Single) emit('update:modelValue', next as T | null);\n },\n});\nconst { value: singleValue, setValue: setSingleValue } = singleCtl;\n\nconst multiCtl = useControlled<ReadonlyArray<string>>({\n controlled: () =>\n mode.value === ToggleModeValue.Multi ? (props.modelValue as ReadonlyArray<string> | undefined) : undefined,\n default:\n props.type === ToggleModeValue.Multi ? ((props.defaultValue as ReadonlyArray<string> | undefined) ?? []) : [],\n onChange: (next) => {\n if (mode.value === ToggleModeValue.Multi) emit('update:modelValue', next);\n },\n});\nconst { value: multiValue, setValue: setMultiValue } = multiCtl;\n\nfunction isPressed(childValue: string | undefined): boolean {\n if (childValue === undefined) return false;\n return mode.value === ToggleModeValue.Single\n ? singleValue.value === childValue\n : multiValue.value.includes(childValue);\n}\n\nfunction togglePressed(childValue: string | undefined): void {\n if (childValue === undefined) return;\n if (mode.value === ToggleModeValue.Single) {\n setSingleValue(singleValue.value === childValue ? null : childValue);\n } else {\n setMultiValue(\n multiValue.value.includes(childValue)\n ? multiValue.value.filter((entry) => entry !== childValue)\n : [...multiValue.value, childValue],\n );\n }\n}\n\n/* Each `ToggleInput` child reads its own slice off this — the provide/inject replacement for the\n original's `Children.map` + `cloneElement`. `itemRole` is a live getter, not a snapshot. */\nprovide(ToggleGroupKey, {\n isPressed,\n toggle: togglePressed,\n get itemRole() {\n return props.itemRole;\n },\n});\n\nconst OwnedAttributes: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'inline-flex',\n isHorizontal.value ? 'flex-row' : 'flex-col',\n attached.value\n ? isHorizontal.value\n ? '[&>*]:rounded-none [&>*:first-child]:rounded-l-md [&>*:last-child]:rounded-r-md [&>*:not(:first-child)]:-ml-px'\n : '[&>*]:rounded-none [&>*:first-child]:rounded-t-md [&>*:last-child]:rounded-b-md [&>*:not(:first-child)]:-mt-px'\n : 'gap-2',\n // Segmented: muted track + reset segment chrome; active segment lifts to a `background` surface.\n isSegmented.value && [\n 'rounded-md bg-muted p-1',\n '[&>*]:rounded-md! [&>*]:!ml-0 [&>*]:border-transparent! [&>*]:bg-transparent!',\n '[&>*[data-pressed=true]]:bg-background! [&>*[data-pressed=true]]:text-foreground! [&>*[data-pressed=true]]:shadow-sm',\n ],\n // Segmented skeleton: every segment lifts like the active one, so its label bar reads against the muted track.\n isSegmented.value && skeleton.isSkeleton.value && '[&>*]:bg-background!',\n // Pill: fully-rounded detached chips (gap already applied via the non-attached branch above).\n isPill.value && [\n '[&>*]:rounded-full!',\n // Only pills that opt in with a label marker change. On touch, their labels stay inline.\n '[@media(hover:hover)]:[&>[data-pressed=false]:has([data-toggle-label])]:relative',\n '[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:pointer-events-none',\n '[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:invisible',\n '[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:absolute',\n '[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:start-0',\n '[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:top-full',\n '[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:z-10',\n '[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:mt-1',\n '[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:whitespace-nowrap',\n '[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:rounded-md',\n '[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:bg-popover',\n '[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:px-2',\n '[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:py-1',\n '[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:text-popover-foreground',\n '[@media(hover:hover)]:[&>[data-pressed=false]_[data-toggle-label]]:shadow-md',\n '[@media(hover:hover)]:[&>[data-pressed=false]:is(:hover,:focus-visible)_[data-toggle-label]]:visible',\n ],\n // Equal-width tiles: every item shares the row/column extent (icon category strip).\n props.equalWidth && '[&>*]:flex-1 [&>*]:basis-0',\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<HTMLDivElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n\nconst formResetAnchor = useTemplateRef<HTMLInputElement>('formResetAnchor');\nconst formResetRevision = useNativeFormReset(formResetAnchor, () => {\n if (props.type === ToggleModeValue.Multi) multiCtl.reset();\n else singleCtl.reset();\n});\n</script>\n\n<template>\n <!-- Coordinates a row/column of ToggleInput children — `type=\"single\" | \"multi\"`. -->\n <div\n :key=\"formResetRevision\"\n ref=\"root\"\n :role=\"isTablist ? 'tablist' : 'group'\"\n :aria-orientation=\"isTablist ? orientation : undefined\"\n :data-orientation=\"orientation\"\n :data-skeleton=\"skeleton.isSkeleton.value || undefined\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n >\n <slot />\n <input\n ref=\"formResetAnchor\"\n type=\"hidden\"\n :form=\"typeof $attrs.form === 'string' ? $attrs.form : undefined\"\n aria-hidden=\"true\"\n />\n </div>\n</template>\n"],"names":["ToggleModeValue","ToggleGroupVariantValue","ToggleItemRoleValue","OrientationValue","_openBlock","_createElementBlock","_mergeProps","_unref","_renderSlot","_createElementVNode","$attrs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAyFA,UAAM,QAAQ;AAad,UAAM,WAAW,iBAAiB,MAAM,MAAM,UAAU;AACxD,yBAAqB,QAAQ;AAE7B,UAAM,OAAO;AAUb,UAAM,QAAQ,SAAA;AAEd,UAAM,OAAO,SAAS,MAAO,MAAM,SAASA,WAAgB,QAAQA,WAAgB,QAAQA,WAAgB,MAAO;AACnH,UAAM,cAAc,SAAS,MAAM,MAAM,YAAYC,mBAAwB,SAAS;AACtF,UAAM,SAAS,SAAS,MAAM,MAAM,YAAY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M,OAjBNC,WAiBM;AAAA,QAhBH,KAAKC,MAAA,iBAAA;AAAA,iBACF;AAAA,QAAJ,KAAI;AAAA,QACH,MAAM,UAAA,QAAS,YAAA;AAAA,QACf,oBAAkB,UAAA,QAAY,QAAA,cAAc;AAAA,QAC5C,oBAAkB,QAAA;AAAA,QAClB,iBAAeA,MAAA,QAAA,EAAS,WAAW,SAAS;AAAA,QAC5C,OAAO,UAAA;AAAA,MAAA,GACA,iBAAA,KAAgB,GAAA;AAAA,QAExBC,WAAQ,KAAA,QAAA,SAAA;AAAA,QACRC,mBAKE,SAAA;AAAA,mBAJI;AAAA,UAAJ,KAAI;AAAA,UACJ,MAAK;AAAA,UACJ,MAAI,OAASC,YAAO,oBAAoBA,KAAAA,OAAO,OAAO;AAAA,UACvD,eAAY;AAAA,QAAA;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Navbar.vue.js","sources":["../../../../src/presentation/layout/navbar/Navbar.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { HTMLAttributes } from 'vue';\nimport type { SurfaceTone } from '../../../foundation/styles';\nimport type { ContainerLayoutProps } from '../containerLayout';\nimport type { NavbarElement, NavbarHeight, NavbarOrientation, NavbarVariant } from './Navbar.variants';\n\nexport interface NavbarProps {\n /**\n * The element: `header` (a banner landmark) or `div` (none). Default: `div` inside an `AppShellHeader`, which is\n * already the banner, and `header` elsewhere.\n */\n readonly as?: NavbarElement;\n /** Native attributes forwarded to the inner `ContainerLayout`; its `class` is merged last. */\n readonly containerAttrs?: HTMLAttributes;\n /** Convenience class for the inner `ContainerLayout`, merged after `containerAttrs.class`. */\n readonly containerClass?: HTMLAttributes['class'];\n /** The max-width of the inner centered `ContainerLayout`. Passthrough to `ContainerLayout.size`. Default `lg`. */\n readonly containerSize?: ContainerLayoutProps['size'];\n /** The band height. Default `md`. */\n readonly height?: NavbarHeight;\n /** The sticky pinning of the bar to the top of the scroll container. Default `false` (non-sticky). */\n readonly isSticky?: boolean;\n /** @deprecated Use `isSticky`; this alias is removed next release. */\n readonly sticky?: boolean;\n /**\n * The tinted background tone for the band — applies the shadow-less `subtle`\n * surface treatment. Omit for a transparent bar (relies on `hasBorder` / page bg).\n */\n readonly tone?: SurfaceTone;\n /** The bottom border under the bar. Default `true`. */\n readonly hasBorder?: boolean;\n /** @deprecated Use `hasBorder`; this alias is removed next release. */\n readonly bordered?: boolean;\n /** Which way the bar runs: a full-width top bar or a full-height side rail. Default `horizontal`. */\n readonly orientation?: NavbarOrientation;\n /** The surface: `solid`, `glass` or `transparent`. A `tone` overrides it. Default `solid`. */\n readonly variant?: NavbarVariant;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, inject, provide, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport { cn, surfaceVariants } from '../../../foundation/styles';\nimport ContainerLayout from '../containerLayout/ContainerLayout.vue';\nimport {\n NavbarElement as Element,\n NavbarOrientation as Orientation,\n NavbarSurfaceClass,\n navbarVariants,\n} from './Navbar.variants';\nimport { bannerHostKey, navbarContextKey } from './NavbarContext';\n\n/**\n * Renders a lightweight header band (`<header>`) with `start` / `center` / `end` slots\n * laid out in a row inside a centered `ContainerLayout`. The everyday \"navbar +\n * centered content\" need that `AppShell` (a 5-slot dashboard grid w/ sidebar)\n * overshoots. Non-sticky by default; pass `isSticky` to pin it.\n *\n * Inside an `AppShellHeader` it renders a plain row filling the bar: the host is the banner and owns the band's\n * height, border and surface, so the bar adds none of its own unless the props ask for them.\n */\ndefineOptions({ name: 'Navbar', inheritAttrs: false });\n\n/** React's `start` / `center` / `end` / `children` ReactNode props are content regions — slots in Vue. */\ndefineSlots<{\n /** The leading slot — laid out at the start of the row (brand / logo / nav links). */\n start?(): unknown;\n /** The centre slot — laid out in the middle of the row (search / primary nav). */\n center?(): unknown;\n /** The trailing slot — laid out at the end of the row (actions / avatar / CTA). */\n end?(): unknown;\n /**\n * The raw row content — replaces the `start` / `center` / `end` slot layout when\n * provided. Use for fully custom bars.\n */\n default?(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<NavbarProps>(), {\n as: undefined,\n isSticky: undefined,\n sticky: undefined,\n hasBorder: undefined,\n bordered: undefined,\n orientation: Orientation.Horizontal,\n variant: undefined,\n});\n\nconst isVertical = computed(() => props.orientation === Orientation.Vertical);\n\n/** True inside a host that already is the banner — `AppShellHeader`. */\nconst isHosted = inject(bannerHostKey, false);\n\nconst tag = computed<Element>(() => props.as ?? (isHosted ? Element.Div : Element.Header));\n\nprovide(navbarContextKey, { orientation: computed(() => props.orientation) });\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst el = useTemplateRef<HTMLElement>('el');\n\nconst classes = computed(() =>\n cn(\n navbarVariants({\n orientation: props.orientation,\n sticky: props.isSticky ?? props.sticky ?? false,\n height: props.height,\n }),\n /* A hosted bar fills the host's row at the host's height. */\n isHosted && 'min-w-0 flex-1 self-stretch',\n isHosted && props.height === undefined && 'h-auto',\n (props.hasBorder ?? props.bordered ?? !isHosted) &&\n (isVertical.value ? 'border-e border-border' : 'border-b border-border'),\n props.tone\n ? surfaceVariants({ variant: 'subtle', tone: props.tone, radius: 'none' })\n : NavbarSurfaceClass[props.variant ?? (isHosted ? 'transparent' : 'solid')],\n attrs.class as string | undefined,\n ),\n);\n\n/** Push `end` to the trailing edge when there's no centre slot to absorb the slack. */\nconst endClasses = computed(() => cn('flex min-w-0 items-center gap-3', !slots.center && 'ml-auto'));\n\n/** Inner-container classes with consumer spacing taking precedence. */\nconst containerClasses = computed(() =>\n cn('flex h-full items-center gap-3', props.containerAttrs?.class as string | undefined, props.containerClass),\n);\n\n/** Rail classes: a column from the brand at the top to the account at the foot, consumer spacing last. */\nconst railClasses = computed(() =>\n cn(\n 'flex h-full min-h-0 flex-col items-stretch gap-3 p-3',\n props.containerAttrs?.class as string | undefined,\n props.containerClass,\n ),\n);\n\n/** Inner-container attributes except `class`, which is merged through `cn`. */\nconst containerRest = computed(() => {\n const { class: _class, ...others } = props.containerAttrs ?? {};\n return others;\n});\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <component :is=\"tag\" v-if=\"isVertical\" ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <div v-bind=\"containerRest\" :class=\"railClasses\">\n <slot v-if=\"$slots.default\" />\n <template v-else>\n <div v-if=\"$slots.start\" class=\"flex min-w-0 shrink-0 items-center gap-3\">\n <slot name=\"start\" />\n </div>\n <div v-if=\"$slots.center\" class=\"flex min-h-0 flex-1 flex-col gap-1 overflow-y-auto\">\n <slot name=\"center\" />\n </div>\n <div v-if=\"$slots.end\" class=\"mt-auto flex min-w-0 shrink-0 items-center gap-3\">\n <slot name=\"end\" />\n </div>\n </template>\n </div>\n </component>\n <component :is=\"tag\" v-else ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <ContainerLayout v-bind=\"containerRest\" :size=\"props.containerSize\" :class=\"containerClasses\">\n <slot v-if=\"$slots.default\" />\n <template v-else>\n <div v-if=\"$slots.start\" class=\"flex min-w-0 items-center gap-3\">\n <slot name=\"start\" />\n </div>\n <div v-if=\"$slots.center\" class=\"flex min-w-0 flex-1 items-center justify-center gap-3\">\n <slot name=\"center\" />\n </div>\n <div v-if=\"$slots.end\" :class=\"endClasses\">\n <slot name=\"end\" />\n </div>\n </template>\n </ContainerLayout>\n </component>\n</template>\n"],"names":["Orientation","Element","_createBlock","_resolveDynamicComponent","_mergeProps","_createElementVNode","$slots","_renderSlot","_createElementBlock","_Fragment","_openBlock","_createVNode","ContainerLayout"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EA,UAAM,QAAQ;AAUd,UAAM,aAAa,SAAS,MAAM,MAAM,gBAAgBA,kBAAY,QAAQ;AAG5E,UAAM,WAAW,OAAO,eAAe,KAAK;AAE5C,UAAM,MAAM,SAAkB,MAAM,MAAM,OAAO,WAAWC,cAAQ,MAAMA,cAAQ,OAA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;AAAA,kBADJD,WAAsB,KAAA,QAAA,QAAA;AAAA,gBAAA;gBAEbD,KAAAA,OAAO,oBAAlBE,mBAEM,OAAA;AAAA;kBAFkB,sBAAO,WAAA,KAAU;AAAA,gBAAA;kBACvCD,WAAmB,KAAA,QAAA,KAAA;AAAA,gBAAA;;;;;;;;;;;"}
1
+ {"version":3,"file":"Navbar.vue.js","sources":["../../../../src/presentation/layout/navbar/Navbar.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { HTMLAttributes } from 'vue';\nimport type { SurfaceTone } from '../../../foundation/styles';\nimport type { ContainerLayoutProps } from '../containerLayout';\nimport type { NavbarElement, NavbarHeight, NavbarOrientation, NavbarVariant } from './Navbar.variants';\n\nexport interface NavbarProps {\n /**\n * The element: `header` (a banner landmark) or `div` (none). Default: `div` inside an `AppShellHeader`, which is\n * already the banner, and `header` elsewhere.\n */\n readonly as?: NavbarElement;\n /** Native attributes forwarded to the inner `ContainerLayout`; its `class` is merged last. */\n readonly containerAttrs?: HTMLAttributes;\n /** Convenience class for the inner `ContainerLayout`, merged after `containerAttrs.class`. */\n readonly containerClass?: HTMLAttributes['class'];\n /** The max-width of the inner centered `ContainerLayout`. Passthrough to `ContainerLayout.size`. Default `lg`. */\n readonly containerSize?: ContainerLayoutProps['size'];\n /** The band height. Default `md`. */\n readonly height?: NavbarHeight;\n /** The sticky pinning of the bar to the top of the scroll container. Default `false` (non-sticky). */\n readonly isSticky?: boolean;\n /** @deprecated Use `isSticky`; this alias is removed next release. */\n readonly sticky?: boolean;\n /**\n * The tinted background tone for the band — applies the shadow-less `subtle`\n * surface treatment. Omit for a transparent bar (relies on `hasBorder` / page bg).\n */\n readonly tone?: SurfaceTone;\n /** The bottom border under the bar. Default `true`. */\n readonly hasBorder?: boolean;\n /** @deprecated Use `hasBorder`; this alias is removed next release. */\n readonly bordered?: boolean;\n /** Which way the bar runs: a full-width top bar or a full-height side rail. Default `horizontal`. */\n readonly orientation?: NavbarOrientation;\n /** The surface: `solid`, `glass` or `transparent`. A `tone` overrides it. Default `solid`. */\n readonly variant?: NavbarVariant;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, inject, provide, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport { cn, surfaceVariants } from '../../../foundation/styles';\nimport ContainerLayout from '../containerLayout/ContainerLayout.vue';\nimport {\n NavbarElement as Element,\n NavbarOrientation as Orientation,\n NavbarSurfaceClass,\n navbarVariants,\n} from './Navbar.variants';\nimport { bannerHostKey, navbarContextKey } from './NavbarContext';\n\n/**\n * Renders a lightweight header band (`<header>`) with `start` / `center` / `end` slots\n * laid out in a row inside a centered `ContainerLayout`. The everyday \"navbar +\n * centered content\" need that `AppShell` (a 5-slot dashboard grid w/ sidebar)\n * overshoots. Non-sticky by default; pass `isSticky` to pin it.\n *\n * Inside an `AppShellHeader` it renders a plain row filling the bar: the host is the banner and owns the band's\n * height, border and surface, so the bar adds none of its own unless the props ask for them.\n */\ndefineOptions({ name: 'Navbar', inheritAttrs: false });\n\n/** React's `start` / `center` / `end` / `children` ReactNode props are content regions — slots in Vue. */\ndefineSlots<{\n /** The leading slot — laid out at the start of the row (brand / logo / nav links). */\n start?(): unknown;\n /** The centre slot — laid out in the middle of the row (search / primary nav). */\n center?(): unknown;\n /** The trailing slot — laid out at the end of the row (actions / avatar / CTA). */\n end?(): unknown;\n /**\n * The raw row content — replaces the `start` / `center` / `end` slot layout when\n * provided. Use for fully custom bars.\n */\n default?(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<NavbarProps>(), {\n as: undefined,\n isSticky: undefined,\n sticky: undefined,\n hasBorder: undefined,\n bordered: undefined,\n orientation: Orientation.Horizontal,\n variant: undefined,\n});\n\nconst isVertical = computed(() => props.orientation === Orientation.Vertical);\n\n/** True inside a host that already is the banner — `AppShellHeader`. */\nconst isHosted = inject(bannerHostKey, false);\n\nconst tag = computed<Element>(() => props.as ?? (isHosted ? Element.Div : Element.Header));\n\nprovide(navbarContextKey, { orientation: computed(() => props.orientation) });\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst el = useTemplateRef<HTMLElement>('el');\n\nconst classes = computed(() =>\n cn(\n navbarVariants({\n orientation: props.orientation,\n sticky: props.isSticky ?? props.sticky ?? false,\n height: props.height,\n }),\n /* A hosted bar fills the host's row at the host's height. */\n isHosted && 'min-w-0 flex-1 self-stretch',\n isHosted && props.height === undefined && 'h-auto',\n (props.hasBorder ?? props.bordered ?? !isHosted) &&\n (isVertical.value ? 'border-e border-border' : 'border-b border-border'),\n props.tone\n ? surfaceVariants({ variant: 'subtle', tone: props.tone, radius: 'none' })\n : NavbarSurfaceClass[props.variant ?? (isHosted ? 'transparent' : 'solid')],\n attrs.class as string | undefined,\n ),\n);\n\n/** Push `end` to the trailing edge when there's no centre slot to absorb the slack. */\nconst endClasses = computed(() => cn('flex min-w-0 items-center gap-3', !slots.center && 'ml-auto'));\n\n/** Inner-container classes with consumer spacing taking precedence. */\nconst containerClasses = computed(() =>\n cn('flex h-full items-center gap-3', props.containerAttrs?.class as string | undefined, props.containerClass),\n);\n\n/** Rail classes: a column from the brand at the top to the account at the foot, consumer spacing last. */\nconst railClasses = computed(() =>\n cn(\n 'flex h-full min-h-0 flex-col items-stretch gap-3 p-3',\n props.containerAttrs?.class as string | undefined,\n props.containerClass,\n ),\n);\n\n/** Inner-container attributes except `class`, which is merged through `cn`. */\nconst containerRest = computed(() => {\n const { class: _class, ...others } = props.containerAttrs ?? {};\n return others;\n});\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <component :is=\"tag\" v-if=\"isVertical\" ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <div v-bind=\"containerRest\" :class=\"railClasses\">\n <slot v-if=\"$slots.default\" />\n <template v-else>\n <div v-if=\"$slots.start\" class=\"flex min-w-0 shrink-0 items-center gap-3\">\n <slot name=\"start\" />\n </div>\n <div v-if=\"$slots.center\" class=\"flex min-h-0 flex-1 flex-col gap-1 overflow-y-auto\">\n <slot name=\"center\" />\n </div>\n <div v-if=\"$slots.end\" class=\"mt-auto flex min-w-0 shrink-0 items-center gap-3\">\n <slot name=\"end\" />\n </div>\n </template>\n </div>\n </component>\n <component :is=\"tag\" v-else ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <ContainerLayout v-bind=\"containerRest\" :size=\"props.containerSize\" :class=\"containerClasses\">\n <slot v-if=\"$slots.default\" />\n <template v-else>\n <div v-if=\"$slots.start\" class=\"flex min-w-0 items-center gap-3\">\n <slot name=\"start\" />\n </div>\n <div v-if=\"$slots.center\" class=\"flex min-w-0 flex-1 items-center justify-center gap-3\">\n <slot name=\"center\" />\n </div>\n <div v-if=\"$slots.end\" :class=\"endClasses\">\n <slot name=\"end\" />\n </div>\n </template>\n </ContainerLayout>\n </component>\n</template>\n"],"names":["Orientation","Element","_createBlock","_resolveDynamicComponent","_mergeProps","_createElementVNode","$slots","_renderSlot","_createElementBlock","_Fragment","_openBlock","_createVNode","ContainerLayout"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EA,UAAM,QAAQ;AAUd,UAAM,aAAa,SAAS,MAAM,MAAM,gBAAgBA,kBAAY,QAAQ;AAG5E,UAAM,WAAW,OAAO,eAAe,KAAK;AAE5C,UAAM,MAAM,SAAkB,MAAM,MAAM,OAAO,WAAWC,cAAQ,MAAMA,cAAQ,OAAO;AAEzF,YAAQ,kBAAkB,EAAE,aAAa,SAAS,MAAM,MAAM,WAAW,GAAG;AAE5E,UAAM,QAAQ,SAAA;AACd,UAAM,QAAQ,SAAA;AACd,UAAM,KAAK,eAA4B,IAAI;AAE3C,UAAM,UAAU;AAAA,MAAS,MACvB;AAAA,QACE,eAAe;AAAA,UACb,aAAa,MAAM;AAAA,UACnB,QAAQ,MAAM,YAAY,MAAM,UAAU;AAAA,UAC1C,QAAQ,MAAM;AAAA,QAAA,CACf;AAAA;AA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,cATEH,KAAAA,OAAO,SAAlBI,aAAAF,mBAEM,OAFN,YAEM;AAAA,gBADJD,WAAqB,KAAA,QAAA,OAAA;AAAA,cAAA;cAEZD,KAAAA,OAAO,UAAlBI,aAAAF,mBAEM,OAFN,YAEM;AAAA,gBADJD,WAAsB,KAAA,QAAA,QAAA;AAAA,cAAA;cAEbD,KAAAA,OAAO,OAAlBI,aAAAF,mBAEM,OAFN,YAEM;AAAA,gBADJD,WAAmB,KAAA,QAAA,KAAA;AAAA,cAAA;;;;;yCAK3BL,YAeYC,wBAfI,IAAA,KAAG,GAAnBC,WAeY;AAAA;iBAfoB;AAAA,QAAJ,KAAI;AAAA,MAAA,GAAa,KAAA,OAAI,EAAG,OAAO,QAAA,MAAA,CAAO,GAAA;AAAA,yBAChE,MAakB;AAAA,UAblBO,YAakBC,aAblBR,WAakB,cAAA,OAboB;AAAA,YAAG,MAAM,MAAM;AAAA,YAAgB,OAAO,iBAAA;AAAA,UAAA;;cAC9DE,KAAAA,OAAO,UAAnBC,WAA8B,KAAA,QAAA,WAAA,IAAA,QAAA,QAAA,CAAA,kBAC9BC,mBAUWC,UAAA,EAAA,KAAA,KAAA;AAAA,gBATEH,KAAAA,OAAO,SAAlBI,aAAAF,mBAEM,OAFN,YAEM;AAAA,kBADJD,WAAqB,KAAA,QAAA,OAAA;AAAA,gBAAA;gBAEZD,KAAAA,OAAO,UAAlBI,aAAAF,mBAEM,OAFN,YAEM;AAAA,kBADJD,WAAsB,KAAA,QAAA,QAAA;AAAA,gBAAA;gBAEbD,KAAAA,OAAO,oBAAlBE,mBAEM,OAAA;AAAA;kBAFkB,sBAAO,WAAA,KAAU;AAAA,gBAAA;kBACvCD,WAAmB,KAAA,QAAA,KAAA;AAAA,gBAAA;;;;;;;;;;;"}
@@ -1,14 +1,11 @@
1
- import { defineComponent, useSlots, shallowRef, watch, onBeforeUnmount, computed, ref, openBlock, createElementBlock, Fragment, createBlock, resolveDynamicComponent, unref, withCtx, createVNode, createElementVNode, normalizeClass, renderSlot, createTextVNode, toDisplayString, createCommentVNode, cloneVNode } from "vue";
1
+ import { defineComponent, useSlots, shallowRef, watch, onBeforeUnmount, computed, openBlock, createElementBlock, Fragment, createBlock, resolveDynamicComponent, unref, withCtx, createVNode, createElementVNode, renderSlot, createTextVNode, toDisplayString, createCommentVNode, cloneVNode } from "vue";
2
2
  import { AriaAttribute } from "../../../foundation/dom/enums/AriaAttribute.js";
3
3
  import { resolveElement } from "../../../foundation/dom/ResolveElement.js";
4
- import { cn } from "../../../foundation/styles/Cn.js";
5
4
  import { useControlled } from "../../../foundation/state/hooks/UseControlled.js";
6
5
  import { useEscape } from "../../../foundation/shortcuts/hooks/UseEscape.js";
7
6
  import { useId } from "../../../foundation/identifiers/UseId.js";
8
- import { useReducedMotion } from "../../../foundation/device/hooks/UseReducedMotion.js";
9
7
  import _sfc_main$1 from "../../../foundation/primitives/portal/Portal.vue.js";
10
8
  import _sfc_main$2 from "../../../foundation/primitives/anchoredPositioner/AnchoredPositioner.vue.js";
11
- import { Presence } from "../../../foundation/primitives/presence/Presence.js";
12
9
  import { renderableChildren } from "../../../foundation/primitives/slot/Slot.js";
13
10
  const _hoisted_1 = ["id"];
14
11
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -39,51 +36,55 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
39
36
  const tooltipId = useId("tooltip");
40
37
  let openTimer = null;
41
38
  let closeTimer = null;
42
- function clear() {
43
- if (openTimer) clearTimeout(openTimer);
44
- if (closeTimer) clearTimeout(closeTimer);
39
+ const trigger = { pointer: false, focus: false };
40
+ function cancelOpen() {
41
+ if (openTimer !== null) clearTimeout(openTimer);
45
42
  openTimer = null;
43
+ }
44
+ function cancelClose() {
45
+ if (closeTimer !== null) clearTimeout(closeTimer);
46
46
  closeTimer = null;
47
47
  }
48
- function show() {
49
- clear();
50
- if (props.isDisabled) return;
51
- openTimer = setTimeout(() => {
52
- if (!props.isDisabled) setOpen(true);
53
- }, props.openDelay);
48
+ function clearTimers() {
49
+ cancelOpen();
50
+ cancelClose();
54
51
  }
55
- function hide() {
56
- clear();
57
- closeTimer = setTimeout(() => setOpen(false), props.closeDelay);
52
+ function updateTrigger(channel, active) {
53
+ if (props.isDisabled) return;
54
+ trigger[channel] = active;
55
+ if (trigger.pointer || trigger.focus) {
56
+ cancelClose();
57
+ if (open.value || openTimer !== null) return;
58
+ openTimer = setTimeout(() => {
59
+ openTimer = null;
60
+ if (!props.isDisabled) setOpen(true);
61
+ }, props.openDelay);
62
+ return;
63
+ }
64
+ cancelOpen();
65
+ if (!open.value || closeTimer !== null) return;
66
+ closeTimer = setTimeout(() => {
67
+ closeTimer = null;
68
+ setOpen(false);
69
+ }, props.closeDelay);
58
70
  }
59
71
  watch(
60
72
  () => props.isDisabled,
61
73
  (disabled) => {
62
74
  if (!disabled) return;
63
- clear();
75
+ clearTimers();
76
+ trigger.pointer = false;
77
+ trigger.focus = false;
64
78
  setOpen(false);
65
79
  }
66
80
  );
67
- onBeforeUnmount(clear);
81
+ onBeforeUnmount(clearTimers);
68
82
  useEscape(() => {
69
- clear();
83
+ clearTimers();
70
84
  setOpen(false);
71
85
  }, open);
72
- const reducedMotion = useReducedMotion();
73
86
  const hasContent = computed(() => !!props.content || !!slots.content);
74
87
  const visible = computed(() => !props.isDisabled && open.value && hasContent.value);
75
- const mounted = ref(false);
76
- watch(
77
- [visible, reducedMotion],
78
- ([isVisible, isReduced]) => {
79
- if (isVisible) mounted.value = true;
80
- else if (isReduced) mounted.value = false;
81
- },
82
- { immediate: true }
83
- );
84
- function onAnimationEnd() {
85
- if (!visible.value) mounted.value = false;
86
- }
87
88
  function setAnchor(value) {
88
89
  anchor.value = resolveElement(value);
89
90
  }
@@ -96,46 +97,35 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
96
97
  {
97
98
  ref: setAnchor,
98
99
  [AriaAttribute.DescribedBy]: visible.value ? [own, tooltipId].filter(Boolean).join(" ") : own,
99
- onPointerenter: show,
100
- onPointerleave: hide,
101
- onFocus: show,
102
- onBlur: hide
100
+ onPointerenter: () => updateTrigger("pointer", true),
101
+ onPointerleave: () => updateTrigger("pointer", false),
102
+ onFocus: () => updateTrigger("focus", true),
103
+ onBlur: () => updateTrigger("focus", false)
103
104
  },
104
105
  true
105
106
  );
106
107
  }
107
- const contentClasses = cn(
108
- "rounded-md bg-inverse px-2.5 py-1.5 text-xs text-inverse-foreground shadow-md",
109
- "motion-safe:data-[state=open]:animate-(--animate-pop-in)",
110
- "motion-safe:data-[state=closed]:animate-(--animate-pop-out)"
111
- );
112
108
  return (_ctx, _cache) => {
113
109
  return openBlock(), createElementBlock(Fragment, null, [
114
110
  (openBlock(), createBlock(resolveDynamicComponent(renderTrigger()))),
115
- mounted.value ? (openBlock(), createBlock(unref(_sfc_main$1), { key: 0 }, {
111
+ visible.value ? (openBlock(), createBlock(unref(_sfc_main$1), { key: 0 }, {
116
112
  default: withCtx(() => [
117
113
  createVNode(unref(_sfc_main$2), {
118
114
  anchor: anchor.value,
119
115
  placement: props.placement,
120
116
  offset: 6,
121
- class: "z-tooltip",
122
- onAnimationend: onAnimationEnd
117
+ class: "z-tooltip"
123
118
  }, {
124
119
  default: withCtx(() => [
125
- createVNode(unref(Presence), { "is-present": visible.value }, {
126
- default: withCtx(() => [
127
- createElementVNode("div", {
128
- id: unref(tooltipId),
129
- role: "tooltip",
130
- class: normalizeClass(unref(contentClasses))
131
- }, [
132
- renderSlot(_ctx.$slots, "content", {}, () => [
133
- createTextVNode(toDisplayString(props.content), 1)
134
- ])
135
- ], 10, _hoisted_1)
136
- ]),
137
- _: 3
138
- }, 8, ["is-present"])
120
+ createElementVNode("div", {
121
+ id: unref(tooltipId),
122
+ role: "tooltip",
123
+ class: "rounded-md border border-border bg-popover px-2.5 py-1.5 text-xs text-popover-foreground shadow-md"
124
+ }, [
125
+ renderSlot(_ctx.$slots, "content", {}, () => [
126
+ createTextVNode(toDisplayString(props.content), 1)
127
+ ])
128
+ ], 8, _hoisted_1)
139
129
  ]),
140
130
  _: 3
141
131
  }, 8, ["anchor", "placement"])
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.vue.js","sources":["../../../../src/presentation/overlays/tooltip/Tooltip.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { Placement } from '@floating-ui/vue';\n\nexport interface TooltipProps {\n /** The tooltip body. Rich content goes through the `content` slot. */\n readonly content?: string | number;\n\n /** The Floating UI placement. Default `top`. */\n readonly placement?: Placement;\n\n /** The delay before opening on hover, in ms. Default 700. */\n readonly openDelay?: number;\n\n /** The delay before closing on leave, in ms. Default 0. */\n readonly closeDelay?: number;\n\n /** Controlled axes use their canonical Vue model names; each update event requests caller state. */\n readonly open?: boolean;\n\n /** The initial open state when uncontrolled. Default `false`. */\n readonly defaultOpen?: boolean;\n\n /** The disabled mode — suppresses rendering even on hover (e.g. when content is empty). */\n readonly isDisabled?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport {\n cloneVNode,\n computed,\n createCommentVNode,\n onBeforeUnmount,\n ref,\n shallowRef,\n useSlots,\n watch,\n type VNode,\n} from 'vue';\nimport { AriaAttribute, resolveElement } from '../../../foundation/dom';\nimport { cn } from '../../../foundation/styles';\nimport { useControlled } from '../../../foundation/state';\nimport { useEscape } from '../../../foundation/shortcuts';\nimport { useId } from '../../../foundation/identifiers';\nimport { useReducedMotion } from '../../../foundation/device';\nimport { AnchoredPositioner, Portal, Presence, renderableChildren } from '../../../foundation/primitives';\n\n/**\n * Renders a hover- or focus-triggered tooltip into a Portal, positioned by Floating UI.\n *\n * Wraps a single default-slot child as the trigger. Default delays mirror the OS pattern (700ms in, 0 out). Escape\n * dismisses without moving focus (WCAG 1.4.13); the trigger is described by the tooltip via `aria-describedby` while\n * open.\n *\n * `inheritAttrs: false` because the component renders a fragment (trigger + portal) — there is no single root for\n * attrs to land on, exactly as in React.\n */\ndefineOptions({ name: 'Tooltip', inheritAttrs: false });\n\ndefineSlots<{\n /** The single child element — the trigger. Receives the handlers, the ref, and `aria-describedby`. */\n default(): unknown;\n /** The rich override for the `content` prop. */\n content?(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<TooltipProps>(), {\n content: undefined,\n placement: 'top',\n openDelay: 700,\n closeDelay: 0,\n open: undefined,\n defaultOpen: false,\n isDisabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the tooltip shows or hides — the `v-model:open` half. */\n 'update:open': [open: boolean];\n}>();\n\nconst slots = useSlots();\n\n/* `useControlled` returns a handle, not React's tuple, and takes `controlled` as a getter so the\n controlled branch tracks the prop. */\nconst { value: open, setValue: setOpen } = useControlled<boolean>({\n controlled: () => props.open,\n default: props.defaultOpen,\n onChange: (next) => {\n emit('update:open', next);\n },\n});\n\nconst anchor = shallowRef<HTMLElement | null>(null);\nconst tooltipId = useId('tooltip');\n\nlet openTimer: ReturnType<typeof setTimeout> | null = null;\nlet closeTimer: ReturnType<typeof setTimeout> | null = null;\n\nfunction clear(): void {\n if (openTimer) clearTimeout(openTimer);\n if (closeTimer) clearTimeout(closeTimer);\n openTimer = null;\n closeTimer = null;\n}\n\nfunction show(): void {\n clear();\n if (props.isDisabled) return;\n openTimer = setTimeout(() => {\n if (!props.isDisabled) setOpen(true);\n }, props.openDelay);\n}\n\nfunction hide(): void {\n clear();\n closeTimer = setTimeout(() => setOpen(false), props.closeDelay);\n}\n\nwatch(\n () => props.isDisabled,\n (disabled) => {\n if (!disabled) return;\n clear();\n setOpen(false);\n },\n);\n\n/* Clear pending timers on unmount. */\nonBeforeUnmount(clear);\n\n/* WCAG 1.4.13 — Escape dismisses immediately, without moving focus. */\nuseEscape(() => {\n clear();\n setOpen(false);\n}, open);\n\nconst reducedMotion = useReducedMotion();\n\n/**\n * React gated on `!!content`; a Vue consumer can supply the body through the `content` slot\n * instead, so either source counts. An empty tooltip still never opens.\n */\nconst hasContent = computed(() => !!props.content || !!slots.content);\n\nconst visible = computed(() => !props.isDisabled && open.value && hasContent.value);\n\n/* Keep the Portal + positioner mounted while the exit animation plays.\n Becomes true with `visible`; cleared on the body's pop-out `animationend`\n (see `onAnimationEnd` below). With reduced motion no exit animation runs,\n so tear the shell down immediately on close. */\nconst mounted = ref(false);\nwatch(\n [visible, reducedMotion],\n ([isVisible, isReduced]) => {\n if (isVisible) mounted.value = true;\n else if (isReduced) mounted.value = false;\n },\n { immediate: true },\n);\n\nfunction onAnimationEnd(): void {\n if (!visible.value) mounted.value = false;\n}\n\n/** A function ref may receive a component's public instance; the positioner needs the DOM node. */\nfunction setAnchor(value: unknown): void {\n anchor.value = resolveElement(value);\n}\n\n/**\n * React cloned the child element to attach the ref, the handlers and `aria-describedby`.\n * `cloneVNode` is the Vue counterpart and merges through `mergeProps`, so a handler the\n * consumer already put on the trigger is chained rather than replaced — the job React's\n * explicit `trigger.props.onPointerEnter?.(e)` forwarding did.\n *\n * Called from the template, never from a `computed`: a vnode `ref` records the instance rendering\n * at creation as its owner. The scheduler refreshes a dirty computed before the render runs, while\n * no instance renders, and production Vue then throws reading the missing owner's `refs`.\n *\n * The listener keys are all-lowercase after `on` (`onPointerenter`, not `onPointerEnter`):\n * Vue hyphenates the remainder to derive the DOM event name, so the React casing would\n * register `pointer-enter` and never fire.\n */\nfunction renderTrigger(): VNode {\n const child = renderableChildren(slots.default?.())[0];\n if (!child) return createCommentVNode('');\n const own = child.props?.[AriaAttribute.DescribedBy] as string | undefined;\n return cloneVNode(\n child,\n {\n ref: setAnchor,\n [AriaAttribute.DescribedBy]: visible.value ? [own, tooltipId].filter(Boolean).join(' ') : own,\n onPointerenter: show,\n onPointerleave: hide,\n onFocus: show,\n onBlur: hide,\n },\n true,\n );\n}\n\nconst contentClasses = cn(\n 'rounded-md bg-inverse px-2.5 py-1.5 text-xs text-inverse-foreground shadow-md',\n 'motion-safe:data-[state=open]:animate-(--animate-pop-in)',\n 'motion-safe:data-[state=closed]:animate-(--animate-pop-out)',\n);\n</script>\n\n<template>\n <component :is=\"renderTrigger()\" />\n <Portal v-if=\"mounted\">\n <!-- Exit animation bubbles up from the body; once the closed-state pop-out ends, tear down\n the Portal shell. Also covers the reduced-motion path, where no animation runs and\n `Presence` has already unmounted the body.\n z-tooltip (100) sits on this positioned root, as Popover and Menu put their layer on theirs: its\n transform makes the stacking context, so a z-index on the body inside never lifts it above a sticky\n bar (z-sticky, 30) or a modal (z-modal, 70). -->\n <AnchoredPositioner\n :anchor=\"anchor\"\n :placement=\"props.placement\"\n :offset=\"6\"\n class=\"z-tooltip\"\n @animationend=\"onAnimationEnd\"\n >\n <!-- `Presence` clones `data-state` (\"open\" | \"closed\") + its tracking ref onto the body,\n which is what gates the pop-in / pop-out keyframes. Motion sits behind `motion-safe:`\n so reduced-motion users get an instant show/hide. -->\n <Presence :is-present=\"visible\">\n <div :id=\"tooltipId\" role=\"tooltip\" :class=\"contentClasses\">\n <slot name=\"content\">{{ props.content }}</slot>\n </div>\n </Presence>\n </AnchoredPositioner>\n </Portal>\n</template>\n"],"names":["_openBlock","_createBlock","_resolveDynamicComponent","_unref","Portal","_createVNode","AnchoredPositioner","_createElementVNode","_renderSlot","_createTextVNode","_toDisplayString"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEA,UAAM,QAAQ;AAUd,UAAM,OAAO;AAKb,UAAM,QAAQ,SAAA;AAId,UAAM,EAAE,OAAO,MAAM,UAAU,QAAA,IAAY,cAAuB;AAAA,MAChE,YAAY,MAAM,MAAM;AAAA,MACxB,SAAS,MAAM;AAAA,MACf,UAAU,CAAC,SAAS;AAClB,aAAK,eAAe,IAAI;AAAA,MAC1B;AAAA,IAAA,CACD;AAED,UAAM,SAAS,WAA+B,IAAI;AAClD,UAAM,YAAY,MAAM,SAAS;AAEjC,QAAI,YAAkD;AACtD,QAAI,aAAmD;AAEvD,aAAS,QAAc;AACrB,UAAI,wBAAwB,SAAS;AACrC,UAAI,yBAAyB,UAAU;AACvC,kBAAY;AACZ,mBAAa;AAAA,IACf;AAEA,aAAS,OAAa;AACpB,YAAA;AACA,UAAI,MAAM,WAAY;AACtB,k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,QAAQ,CAAC,KAAK,SAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,IAAI;AAAA,UAC1F,gBAAgB;AAAA,UAChB,gBAAgB;AAAA,UAChB,SAAS;AAAA,UACT,QAAQ;AAAA,QAAA;AAAA,QAEV;AAAA,MAAA;AAAA,IAEJ;AAEA,UAAM,iBAAiB;AAAA,MACrB;AAAA,MACA;AAAA,MACA;AAAA,IAAA;;;SAKAA,aAAAC,YAAmCC,wBAAnB,cAAA,CAAa,CAAA;AAAA,QACf,QAAA,sBAAdD,YAuBSE,MAAAC,WAAA,GAAA,EAAA,KAAA,KAAA;AAAA,2BAhBP,MAeqB;AAAA,YAfrBC,YAeqBF,MAAAG,WAAA,GAAA;AAAA,cAdlB,QAAQ,OAAA;AAAA,cACR,WAAW,MAAM;AAAA,cACjB,QAAQ;AAAA,cACT,OAAM;AAAA,cACL,gBAAc;AAAA,YAAA;+BAKf,MAIW;AAAA,gBAJXD,YAIWF,MAAA,QAAA,GAAA,EAJA,cAAY,QAAA,SAAO;AAAA,mCAC5B,MAEM;AAAA,oBAFNI,mBAEM,OAAA;AAAA,sBAFA,IAAIJ,MAAA,SAAA;AAAA,sBAAW,MAAK;AAAA,sBAAW,sBAAOA,MAAA,cAAA,CAAc;AAAA,oBAAA;sBACxDK,WAA+C,4BAA/C,MAA+C;AAAA,wBAAvBC,gBAAAC,gBAAA,MAAM,OAAO,GAAA,CAAA;AAAA,sBAAA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Tooltip.vue.js","sources":["../../../../src/presentation/overlays/tooltip/Tooltip.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { Placement } from '@floating-ui/vue';\n\nexport interface TooltipProps {\n /** The tooltip body. Rich content goes through the `content` slot. */\n readonly content?: string | number;\n\n /** The Floating UI placement. Default `top`. */\n readonly placement?: Placement;\n\n /** The delay before opening on hover, in ms. Default 700. */\n readonly openDelay?: number;\n\n /** The delay before closing on leave, in ms. Default 0. */\n readonly closeDelay?: number;\n\n /** Controlled axes use their canonical Vue model names; each update event requests caller state. */\n readonly open?: boolean;\n\n /** The initial open state when uncontrolled. Default `false`. */\n readonly defaultOpen?: boolean;\n\n /** The disabled mode — suppresses rendering even on hover (e.g. when content is empty). */\n readonly isDisabled?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport {\n cloneVNode,\n computed,\n createCommentVNode,\n onBeforeUnmount,\n shallowRef,\n useSlots,\n watch,\n type VNode,\n} from 'vue';\nimport { AriaAttribute, resolveElement } from '../../../foundation/dom';\nimport { useControlled } from '../../../foundation/state';\nimport { useEscape } from '../../../foundation/shortcuts';\nimport { useId } from '../../../foundation/identifiers';\nimport { AnchoredPositioner, Portal, renderableChildren } from '../../../foundation/primitives';\n\n/**\n * Renders a hover- or focus-triggered tooltip into a Portal, positioned by Floating UI.\n *\n * Wraps a single default-slot child as the trigger. Default delays mirror the OS pattern (700ms in, 0 out). Escape\n * dismisses without moving focus (WCAG 1.4.13); the trigger is described by the tooltip via `aria-describedby` while\n * open.\n *\n * `inheritAttrs: false` because the component renders a fragment (trigger + portal) — there is no single root for\n * attrs to land on, exactly as in React.\n */\ndefineOptions({ name: 'Tooltip', inheritAttrs: false });\n\ndefineSlots<{\n /** The single child element — the trigger. Receives the handlers, the ref, and `aria-describedby`. */\n default(): unknown;\n /** The rich override for the `content` prop. */\n content?(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<TooltipProps>(), {\n content: undefined,\n placement: 'top',\n openDelay: 700,\n closeDelay: 0,\n open: undefined,\n defaultOpen: false,\n isDisabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the tooltip shows or hides — the `v-model:open` half. */\n 'update:open': [open: boolean];\n}>();\n\nconst slots = useSlots();\n\n/* `useControlled` returns a handle, not React's tuple, and takes `controlled` as a getter so the\n controlled branch tracks the prop. */\nconst { value: open, setValue: setOpen } = useControlled<boolean>({\n controlled: () => props.open,\n default: props.defaultOpen,\n onChange: (next) => {\n emit('update:open', next);\n },\n});\n\nconst anchor = shallowRef<HTMLElement | null>(null);\nconst tooltipId = useId('tooltip');\n\nlet openTimer: ReturnType<typeof setTimeout> | null = null;\nlet closeTimer: ReturnType<typeof setTimeout> | null = null;\nconst trigger = { pointer: false, focus: false };\n\nfunction cancelOpen(): void {\n if (openTimer !== null) clearTimeout(openTimer);\n openTimer = null;\n}\n\nfunction cancelClose(): void {\n if (closeTimer !== null) clearTimeout(closeTimer);\n closeTimer = null;\n}\n\nfunction clearTimers(): void {\n cancelOpen();\n cancelClose();\n}\n\nfunction updateTrigger(channel: keyof typeof trigger, active: boolean): void {\n if (props.isDisabled) return;\n trigger[channel] = active;\n if (trigger.pointer || trigger.focus) {\n cancelClose();\n if (open.value || openTimer !== null) return;\n openTimer = setTimeout(() => {\n openTimer = null;\n if (!props.isDisabled) setOpen(true);\n }, props.openDelay);\n return;\n }\n\n cancelOpen();\n if (!open.value || closeTimer !== null) return;\n closeTimer = setTimeout(() => {\n closeTimer = null;\n setOpen(false);\n }, props.closeDelay);\n}\n\nwatch(\n () => props.isDisabled,\n (disabled) => {\n if (!disabled) return;\n clearTimers();\n trigger.pointer = false;\n trigger.focus = false;\n setOpen(false);\n },\n);\n\n/* Clear pending timers on unmount. */\nonBeforeUnmount(clearTimers);\n\n/* WCAG 1.4.13 — Escape dismisses immediately, without moving focus. */\nuseEscape(() => {\n clearTimers();\n setOpen(false);\n}, open);\n\n/**\n * React gated on `!!content`; a Vue consumer can supply the body through the `content` slot\n * instead, so either source counts. An empty tooltip still never opens.\n */\nconst hasContent = computed(() => !!props.content || !!slots.content);\n\nconst visible = computed(() => !props.isDisabled && open.value && hasContent.value);\n\n/** A function ref may receive a component's public instance; the positioner needs the DOM node. */\nfunction setAnchor(value: unknown): void {\n anchor.value = resolveElement(value);\n}\n\n/**\n * React cloned the child element to attach the ref, the handlers and `aria-describedby`.\n * `cloneVNode` is the Vue counterpart and merges through `mergeProps`, so a handler the\n * consumer already put on the trigger is chained rather than replaced — the job React's\n * explicit `trigger.props.onPointerEnter?.(e)` forwarding did.\n *\n * Called from the template, never from a `computed`: a vnode `ref` records the instance rendering\n * at creation as its owner. The scheduler refreshes a dirty computed before the render runs, while\n * no instance renders, and production Vue then throws reading the missing owner's `refs`.\n *\n * The listener keys are all-lowercase after `on` (`onPointerenter`, not `onPointerEnter`):\n * Vue hyphenates the remainder to derive the DOM event name, so the React casing would\n * register `pointer-enter` and never fire.\n */\nfunction renderTrigger(): VNode {\n const child = renderableChildren(slots.default?.())[0];\n if (!child) return createCommentVNode('');\n const own = child.props?.[AriaAttribute.DescribedBy] as string | undefined;\n return cloneVNode(\n child,\n {\n ref: setAnchor,\n [AriaAttribute.DescribedBy]: visible.value ? [own, tooltipId].filter(Boolean).join(' ') : own,\n onPointerenter: () => updateTrigger('pointer', true),\n onPointerleave: () => updateTrigger('pointer', false),\n onFocus: () => updateTrigger('focus', true),\n onBlur: () => updateTrigger('focus', false),\n },\n true,\n );\n}\n</script>\n\n<template>\n <component :is=\"renderTrigger()\" />\n <Portal v-if=\"visible\">\n <!-- Put the layer on the positioned root because its transform creates a stacking context. -->\n <AnchoredPositioner :anchor=\"anchor\" :placement=\"props.placement\" :offset=\"6\" class=\"z-tooltip\">\n <div\n :id=\"tooltipId\"\n role=\"tooltip\"\n class=\"rounded-md border border-border bg-popover px-2.5 py-1.5 text-xs text-popover-foreground shadow-md\"\n >\n <slot name=\"content\">{{ props.content }}</slot>\n </div>\n </AnchoredPositioner>\n </Portal>\n</template>\n"],"names":["_openBlock","_createBlock","_resolveDynamicComponent","_unref","Portal","_createVNode","AnchoredPositioner","_createElementVNode","_renderSlot","_createTextVNode","_toDisplayString"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA+DA,UAAM,QAAQ;AAUd,UAAM,OAAO;AAKb,UAAM,QAAQ,SAAA;AAId,UAAM,EAAE,OAAO,MAAM,UAAU,QAAA,IAAY,cAAuB;AAAA,MAChE,YAAY,MAAM,MAAM;AAAA,MACxB,SAAS,MAAM;AAAA,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CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wow-two-beta/fe",
3
- "version": "0.0.47",
3
+ "version": "0.0.49",
4
4
  "description": "Beta-forever Vue 3 fe sdk for the wow-two ecosystem — components, application adapters and browser capabilities.",
5
5
  "license": "MIT",
6
6
  "repository": {