@plexui/vue 0.1.10 → 0.1.12
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/FieldError/FieldError.js +4 -2
- package/dist/es/components/FieldError/FieldError.js.map +1 -1
- package/dist/es/components/FloatingLabelInput/FloatingLabelInput.js +10 -1
- package/dist/es/components/FloatingLabelInput/FloatingLabelInput.js.map +1 -1
- package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.js +10 -1
- package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.js.map +1 -1
- package/dist/es/components/Tabs/Tabs.js +9 -8
- package/dist/es/components/Tabs/Tabs.js.map +1 -1
- package/dist/types/components/FloatingLabelInput/FloatingLabelInput.d.ts +22 -0
- package/dist/types/components/FloatingLabelSelect/FloatingLabelSelect.d.ts +22 -0
- package/package.json +1 -1
|
@@ -15,8 +15,10 @@ export const FieldError = defineComponent({
|
|
|
15
15
|
},
|
|
16
16
|
setup(props, { slots, attrs }) {
|
|
17
17
|
return () => h("div", { class: [s.FieldError, attrs.class], id: props.id, role: "alert" }, [
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
h("div", { class: s.Inner }, [
|
|
19
|
+
props.icon ? h(ExclamationMarkCircle, { class: s.Icon }) : null,
|
|
20
|
+
h("span", null, slots.default?.()),
|
|
21
|
+
]),
|
|
20
22
|
]);
|
|
21
23
|
},
|
|
22
24
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldError.js","sourceRoot":"","sources":["../../../../src/components/FieldError/FieldError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,CAAC,MAAM,4DAA4D,CAAA;AAE1E;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC;IACxC,IAAI,EAAE,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,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;YAC5E,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE;gBAC3B,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI;gBAC/D,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;aACnC,CAAC;SACH,CAAC,CAAA;IACN,CAAC;CACF,CAAC,CAAA","sourcesContent":["import { defineComponent, h } from \"vue\"\nimport { ExclamationMarkCircle } from \"../Icon/index.js\"\nimport s from \"@plexui/styles/components/FieldError/FieldError.module.css\"\n\n/**\n * Port of packages/ui/src/components/FieldError/FieldError.tsx. Like React,\n * only `class` and `id` reach the DOM; other attributes are dropped.\n */\nexport const FieldError = defineComponent({\n name: \"FieldError\",\n inheritAttrs: false,\n props: {\n id: String,\n /** Shows the error icon before the message. @default true */\n icon: { type: Boolean, default: true },\n },\n setup(props, { slots, attrs }) {\n return () =>\n h(\"div\", { class: [s.FieldError, attrs.class], id: props.id, role: \"alert\" }, [\n h(\"div\", { class: s.Inner }, [\n props.icon ? h(ExclamationMarkCircle, { class: s.Icon }) : null,\n h(\"span\", null, slots.default?.()),\n ]),\n ])\n },\n})\n\nexport type FieldErrorProps = InstanceType<typeof FieldError>[\"$props\"]\n"]}
|
|
@@ -54,6 +54,10 @@ const FloatingLabelInputComponent = defineComponent({
|
|
|
54
54
|
multiline: { type: Boolean, default: false },
|
|
55
55
|
/** Number of visible text lines when `multiline` is true */
|
|
56
56
|
rows: { type: Number, default: 2 },
|
|
57
|
+
/** Where the label rests once it floats: on the border, or inside the box with the value under it (always the rounded box). @default "border" */
|
|
58
|
+
labelPlacement: { type: String, default: "border" },
|
|
59
|
+
/** Pill shape. `false` takes the rounded box of the other fields. @default true */
|
|
60
|
+
pill: { type: Boolean, default: true },
|
|
57
61
|
id: String,
|
|
58
62
|
name: String,
|
|
59
63
|
type: { type: String, default: "text" },
|
|
@@ -213,7 +217,12 @@ const FloatingLabelInputComponent = defineComponent({
|
|
|
213
217
|
// `default-value`, as React keeps a textarea's defaultValue
|
|
214
218
|
const { value: _value, ...textareaControlProps } = controlProps;
|
|
215
219
|
const textContent = String(props.value ?? props.defaultValue ?? "");
|
|
216
|
-
|
|
220
|
+
const inside = props.labelPlacement === "inside";
|
|
221
|
+
return h("div", {
|
|
222
|
+
"class": clsx(s.Root, className),
|
|
223
|
+
"data-label-placement": inside ? "inside" : undefined,
|
|
224
|
+
"data-pill": props.pill && !inside ? "" : undefined,
|
|
225
|
+
}, [
|
|
217
226
|
h("div", {
|
|
218
227
|
"class": clsx(s.FieldFootprint, { [s.HasValue]: hasValue.value || !!startAdornment }),
|
|
219
228
|
"data-focused": focused.value ? "" : undefined,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingLabelInput.js","sourceRoot":"","sources":["../../../../src/components/FloatingLabelInput/FloatingLabelInput.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,EAA4D,MAAM,KAAK,CAAA;AACtK,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,CAAC,MAAM,4EAA4E,CAAA;AAE1F,yEAAyE;AACzE,MAAM,aAAa,GAAG,CAAC,QAAiB,EAAE,GAAU,EAAE,EAAE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AAC,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI;gBAC/G,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI;aACxF,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAQF,qGAAqG;AACrG,MAAM,CAAC,MAAM,kBAAkB,GAAG,2BAEjC,CAAA","sourcesContent":["import clsx from \"clsx\"\nimport { defineComponent, h, mergeProps, nextTick, onMounted, ref, useId, watch, withDirectives, type InputHTMLAttributes, type PropType, type VNodeChild } from \"vue\"\nimport { Eye, EyeOff, X } from \"../Icon/index.js\"\nimport { vDefaultValue, vServerText } from \"../../lib/defaultValue.js\"\nimport { hasContent } from \"../../lib/slotContent.js\"\nimport s from \"@plexui/styles/components/FloatingLabelInput/FloatingLabelInput.module.css\"\n\n// A fallthrough listener is a function or, when merged, an array of them\nconst callListeners = (listener: unknown, evt: Event) => {\n for (const fn of Array.isArray(listener) ? listener : [listener]) {\n if (typeof fn === \"function\") fn(evt)\n }\n}\n\n// Attributes that only mean something on <input>; everything else (required,\n// maxlength, placeholder, key and clipboard listeners, aria-*, data-*) also\n// applies to the multiline <textarea>, as in React\nconst INPUT_ONLY_ATTRS = new Set([\n \"accept\", \"alt\", \"capture\", \"checked\", \"height\", \"list\", \"max\", \"min\", \"multiple\",\n \"pattern\", \"size\", \"src\", \"step\", \"width\", \"formaction\", \"formenctype\",\n \"formmethod\", \"formnovalidate\", \"formtarget\",\n])\n\nconst textareaAttrs = (attrs: Record<string, unknown>) =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !INPUT_ONLY_ATTRS.has(key.toLowerCase())))\n\n/**\n * Port of packages/ui/src/components/FloatingLabelInput/FloatingLabelInput.tsx.\n * Attributes other than `class` go to the <input>, or to the `multiline`\n * <textarea> except the input-only ones, as in React. `value` +\n * `update:value` support `v-model:value`.\n */\nconst FloatingLabelInputComponent = defineComponent({\n name: \"FloatingLabelInput\",\n inheritAttrs: false,\n props: {\n /** Label text for the floating label */\n label: { type: String, required: true },\n /** Error message to display below the input */\n errorMessage: String,\n /** Mark the input as invalid. @default false (or true if errorMessage is provided) */\n invalid: { type: Boolean, default: undefined },\n /** Disables the input visually and from interactions */\n disabled: { type: Boolean, default: false },\n /** Makes the input read-only */\n readOnly: { type: Boolean, default: false },\n /** Native spelling of `readOnly` (`<FloatingLabelInput readonly />`) */\n readonly: { type: Boolean, default: false },\n /** Shows the clear button; called when it is clicked */\n onClear: Function as PropType<() => void>,\n /** Allow autofill extensions to appear in the input */\n allowAutofillExtensions: { type: Boolean, default: false },\n /** Helper text below the input (or the `description` slot) */\n description: String,\n /** Built-in reveal toggle. @default true when type=\"password\" and no end adornment */\n revealable: { type: Boolean, default: undefined },\n /** Render as a multi-line textarea instead of a single-line input */\n multiline: { type: Boolean, default: false },\n /** Number of visible text lines when `multiline` is true */\n rows: { type: Number, default: 2 },\n id: String,\n name: String,\n type: { type: String, default: \"text\" },\n value: { type: [String, Number] as PropType<string | number>, default: undefined },\n defaultValue: { type: [String, Number] as PropType<string | number>, default: undefined },\n },\n emits: {\n \"update:value\": (_value: string) => true,\n \"autofill\": () => true,\n \"revealedChange\": (_revealed: boolean) => true,\n },\n setup(props, { attrs, slots, emit, expose }) {\n const inputRef = ref<HTMLInputElement | HTMLTextAreaElement | null>(null)\n const generatedId = useId()\n const focused = ref(false)\n const hasValue = ref(!!(props.value !== undefined ? props.value : props.defaultValue))\n const revealed = ref(false)\n\n // Sync hasValue with controlled value prop\n watch(\n () => props.value,\n (value) => {\n if (value !== undefined) hasValue.value = !!value\n },\n )\n\n const autoResize = () => {\n const el = inputRef.value\n if (!props.multiline || !el) return\n el.style.height = \"auto\"\n el.style.height = `${el.scrollHeight}px`\n }\n // The multiline <textarea> gets its value imperatively, like React DOM: a\n // `value` prop would make Vue mirror it into a `value` attribute, which\n // React never renders (its text content carries the value instead)\n const syncTextareaValue = () => {\n const el = inputRef.value\n if (!props.multiline || !el || props.value === undefined) return\n const value = String(props.value)\n if (el.value !== value) el.value = value\n }\n onMounted(() => {\n // React's initTextarea: the initial text becomes the (dirty) value\n const el = inputRef.value\n if (props.multiline && el && el.textContent) el.value = el.textContent\n autoResize()\n })\n // Also resize when a controlled value or rows changes without a keystroke\n watch(\n [() => props.multiline, () => props.value, () => props.rows],\n () => {\n syncTextareaValue()\n autoResize()\n },\n { flush: \"post\" },\n )\n\n // Handle clicks on the container to focus the input\n const handleContainerMouseDown = (evt: MouseEvent) => {\n const input = inputRef.value\n if (!evt.target || !(evt.target instanceof Element) || !input) {\n return\n }\n if (input.contains(evt.target)) {\n return\n }\n if (evt.target.closest(\"button, [type='button'], [role='button']\")) {\n return\n }\n evt.preventDefault()\n if (document.activeElement !== input) {\n input.focus()\n }\n // email, number and other types without the selection API throw on setSelectionRange\n if (input.selectionStart === null) return\n const length = input.value.length\n input.setSelectionRange(length, length)\n }\n\n // The clear button unmounts once the value is gone, so keep focus in the field\n const handleClear = (evt: MouseEvent) => {\n inputRef.value?.focus()\n ;(props.onClear as ((evt: MouseEvent) => void) | undefined)?.(evt)\n }\n\n const handleInput = (evt: Event) => {\n const target = evt.currentTarget as HTMLInputElement\n hasValue.value = !!target.value\n emit(\"update:value\", target.value)\n autoResize()\n // Like a React controlled input, a `value` the parent does not update\n // is put back (Vue only re-applies `value` when this component renders)\n void nextTick(() => {\n if (props.value === undefined) return\n const value = String(props.value)\n if (target.value !== value) target.value = value\n })\n }\n\n const handleAnimationStart = (evt: AnimationEvent) => {\n // Detect browser autofill\n if (evt.animationName === \"native-autofill-in\") {\n hasValue.value = true\n emit(\"autofill\")\n }\n }\n\n const handleRevealToggle = () => {\n revealed.value = !revealed.value\n emit(\"revealedChange\", revealed.value)\n }\n\n expose({ focus: () => inputRef.value?.focus(), input: inputRef })\n\n return () => {\n const inputId = props.id || `floating-label-input-${generatedId}`\n // Slots that render nothing (a false v-if) count as absent, like a falsy ReactNode\n const descriptionSlot = slots.description?.()\n const description: VNodeChild = hasContent(descriptionSlot) ? descriptionSlot : props.description\n const descriptionId = description ? `${inputId}-description` : undefined\n const errorId = props.errorMessage ? `${inputId}-error` : undefined\n const startAdornmentSlot = slots.startAdornment?.()\n const startAdornment = hasContent(startAdornmentSlot) ? startAdornmentSlot : undefined\n const endAdornmentSlot = slots.endAdornment?.()\n const endAdornment = hasContent(endAdornmentSlot) ? endAdornmentSlot : undefined\n const readOnly = props.readOnly || props.readonly\n // Caller focus/blur listeners run from the shared handlers\n const {\n \"class\": className,\n \"aria-describedby\": ariaDescribedByAttr,\n \"onFocus\": onFocusAttr,\n \"onBlur\": onBlurAttr,\n ...restAttrs\n } = attrs\n\n const invalid = props.invalid ?? !!props.errorMessage\n // Determine if clear button should be shown\n const showClearButton = !!props.onClear && hasValue.value && !props.disabled && !readOnly\n // Built-in password reveal toggle\n const isPassword = props.type === \"password\"\n const revealable = props.revealable ?? (isPassword && !endAdornment)\n const showRevealButton = revealable && !props.disabled\n const effectiveType = isPassword && revealed.value ? \"text\" : props.type\n // Merge aria-describedby with error id\n const ariaDescribedBy = [ariaDescribedByAttr, errorId, descriptionId].filter(Boolean).join(\" \") || undefined\n\n const controlProps = {\n \"ref\": inputRef,\n \"id\": inputId,\n \"name\": props.name,\n // Vue re-applies a present `value` key on every render, so an\n // uncontrolled field must not carry one (it would reset typed text)\n ...(props.value !== undefined ? { value: props.value } : {}),\n \"disabled\": props.disabled,\n \"readonly\": readOnly,\n // An explicit aria-invalid (e.g. from Field) wins over the computed state\n \"aria-invalid\": restAttrs[\"aria-invalid\"] ?? (invalid ? true : undefined),\n \"aria-describedby\": ariaDescribedBy,\n \"onInput\": handleInput,\n \"onFocus\": (evt: FocusEvent) => {\n focused.value = true\n callListeners(onFocusAttr, evt)\n },\n \"onBlur\": (evt: FocusEvent) => {\n focused.value = false\n callListeners(onBlurAttr, evt)\n },\n }\n // Uncontrolled: `vDefaultValue` sets the initial value (server markup,\n // hydration and later changes as in React)\n const initialValue = props.value === undefined ? props.defaultValue : undefined\n // The textarea's text content follows the controlled value, else\n // `default-value`, as React keeps a textarea's defaultValue\n const { value: _value, ...textareaControlProps } = controlProps as typeof controlProps & { value?: unknown }\n const textContent = String(props.value ?? props.defaultValue ?? \"\")\n\n return h(\"div\", { class: clsx(s.Root, className as string | undefined) }, [\n h(\n \"div\",\n {\n \"class\": clsx(s.FieldFootprint, { [s.HasValue!]: hasValue.value || !!startAdornment }),\n \"data-focused\": focused.value ? \"\" : undefined,\n \"data-has-value\": hasValue.value ? \"\" : undefined,\n \"data-invalid\": invalid ? \"\" : undefined,\n \"data-disabled\": props.disabled ? \"\" : undefined,\n \"data-readonly\": readOnly ? \"\" : undefined,\n \"data-multiline\": props.multiline ? \"\" : undefined,\n \"onMousedown\": handleContainerMouseDown,\n },\n [\n h(\"label\", { class: s.TypeableLabel, for: inputId }, [\n h(\"div\", { class: s.LabelPositioner }, [h(\"div\", { class: s.LabelText }, props.label)]),\n ]),\n startAdornment ? h(\"div\", { class: s.StartAdornment }, startAdornment) : null,\n props.multiline\n ? withDirectives(\n h(\n \"textarea\",\n mergeProps(textareaAttrs(restAttrs), {\n ...textareaControlProps,\n rows: props.rows,\n class: s.Textarea,\n textContent,\n }),\n ),\n [[vServerText, textContent]],\n )\n : withDirectives(\n h(\n \"input\",\n mergeProps(restAttrs, {\n ...controlProps,\n \"type\": effectiveType,\n \"class\": s.Input,\n \"onAnimationstart\": handleAnimationStart,\n \"data-lpignore\": props.allowAutofillExtensions ? undefined : true,\n \"data-1p-ignore\": props.allowAutofillExtensions ? undefined : true,\n }),\n ),\n [[vDefaultValue, initialValue]],\n ),\n endAdornment ? h(\"div\", { class: s.EndAdornment }, endAdornment) : null,\n showClearButton\n ? h(\"button\", { \"type\": \"button\", \"aria-label\": \"Clear input\", \"class\": s.ClearButton, \"onClick\": handleClear }, [h(X)])\n : null,\n showRevealButton\n ? h(\n \"button\",\n { \"type\": \"button\", \"aria-label\": revealed.value ? \"Hide\" : \"Show\", \"class\": s.RevealButton, \"onClick\": handleRevealToggle },\n [revealed.value ? h(EyeOff) : h(Eye)],\n )\n : null,\n ],\n ),\n props.errorMessage ? h(\"div\", { id: errorId, class: s.ErrorMessage, role: \"alert\" }, props.errorMessage) : null,\n description ? h(\"div\", { id: descriptionId, class: s.Description }, description) : null,\n ])\n }\n },\n})\n\ntype FloatingLabelInputOwnProps = InstanceType<typeof FloatingLabelInputComponent>[\"$props\"]\n\n/** FloatingLabelInput props plus the native <input> attributes that fall through to it, as in React. */\nexport type FloatingLabelInputProps = FloatingLabelInputOwnProps &\n Omit<InputHTMLAttributes, keyof FloatingLabelInputOwnProps>\n\n/** Text input whose label floats above the value, with optional reveal toggle and multiline mode. */\nexport const FloatingLabelInput = FloatingLabelInputComponent as typeof FloatingLabelInputComponent & {\n new (): { $props: FloatingLabelInputProps }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FloatingLabelInput.js","sourceRoot":"","sources":["../../../../src/components/FloatingLabelInput/FloatingLabelInput.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,EAA4D,MAAM,KAAK,CAAA;AACtK,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,CAAC,MAAM,4EAA4E,C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AC,CAAC,CAAC,CAAC,CAAC,CAAC;wBACxH,CAAC,CAAC,IAAI;oBACR,gBAAgB;wBACd,CAAC,CAAC,CAAC,CACC,QAAQ,EACR,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,YAAY,EAAE,SAAS,EAAE,kBAAkB,EAAE,EAC5H,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CACtC;wBACH,CAAC,CAAC,IAAI;iBACT,CACF;gBACD,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI;gBAC/G,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI;aACxF,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAQF,qGAAqG;AACrG,MAAM,CAAC,MAAM,kBAAkB,GAAG,2BAEjC,CAAA","sourcesContent":["import clsx from \"clsx\"\nimport { defineComponent, h, mergeProps, nextTick, onMounted, ref, useId, watch, withDirectives, type InputHTMLAttributes, type PropType, type VNodeChild } from \"vue\"\nimport { Eye, EyeOff, X } from \"../Icon/index.js\"\nimport { vDefaultValue, vServerText } from \"../../lib/defaultValue.js\"\nimport { hasContent } from \"../../lib/slotContent.js\"\nimport s from \"@plexui/styles/components/FloatingLabelInput/FloatingLabelInput.module.css\"\n\n// A fallthrough listener is a function or, when merged, an array of them\nconst callListeners = (listener: unknown, evt: Event) => {\n for (const fn of Array.isArray(listener) ? listener : [listener]) {\n if (typeof fn === \"function\") fn(evt)\n }\n}\n\n// Attributes that only mean something on <input>; everything else (required,\n// maxlength, placeholder, key and clipboard listeners, aria-*, data-*) also\n// applies to the multiline <textarea>, as in React\nconst INPUT_ONLY_ATTRS = new Set([\n \"accept\", \"alt\", \"capture\", \"checked\", \"height\", \"list\", \"max\", \"min\", \"multiple\",\n \"pattern\", \"size\", \"src\", \"step\", \"width\", \"formaction\", \"formenctype\",\n \"formmethod\", \"formnovalidate\", \"formtarget\",\n])\n\nconst textareaAttrs = (attrs: Record<string, unknown>) =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !INPUT_ONLY_ATTRS.has(key.toLowerCase())))\n\n/**\n * Port of packages/ui/src/components/FloatingLabelInput/FloatingLabelInput.tsx.\n * Attributes other than `class` go to the <input>, or to the `multiline`\n * <textarea> except the input-only ones, as in React. `value` +\n * `update:value` support `v-model:value`.\n */\nconst FloatingLabelInputComponent = defineComponent({\n name: \"FloatingLabelInput\",\n inheritAttrs: false,\n props: {\n /** Label text for the floating label */\n label: { type: String, required: true },\n /** Error message to display below the input */\n errorMessage: String,\n /** Mark the input as invalid. @default false (or true if errorMessage is provided) */\n invalid: { type: Boolean, default: undefined },\n /** Disables the input visually and from interactions */\n disabled: { type: Boolean, default: false },\n /** Makes the input read-only */\n readOnly: { type: Boolean, default: false },\n /** Native spelling of `readOnly` (`<FloatingLabelInput readonly />`) */\n readonly: { type: Boolean, default: false },\n /** Shows the clear button; called when it is clicked */\n onClear: Function as PropType<() => void>,\n /** Allow autofill extensions to appear in the input */\n allowAutofillExtensions: { type: Boolean, default: false },\n /** Helper text below the input (or the `description` slot) */\n description: String,\n /** Built-in reveal toggle. @default true when type=\"password\" and no end adornment */\n revealable: { type: Boolean, default: undefined },\n /** Render as a multi-line textarea instead of a single-line input */\n multiline: { type: Boolean, default: false },\n /** Number of visible text lines when `multiline` is true */\n rows: { type: Number, default: 2 },\n /** Where the label rests once it floats: on the border, or inside the box with the value under it (always the rounded box). @default \"border\" */\n labelPlacement: { type: String as PropType<\"border\" | \"inside\">, default: \"border\" },\n /** Pill shape. `false` takes the rounded box of the other fields. @default true */\n pill: { type: Boolean, default: true },\n id: String,\n name: String,\n type: { type: String, default: \"text\" },\n value: { type: [String, Number] as PropType<string | number>, default: undefined },\n defaultValue: { type: [String, Number] as PropType<string | number>, default: undefined },\n },\n emits: {\n \"update:value\": (_value: string) => true,\n \"autofill\": () => true,\n \"revealedChange\": (_revealed: boolean) => true,\n },\n setup(props, { attrs, slots, emit, expose }) {\n const inputRef = ref<HTMLInputElement | HTMLTextAreaElement | null>(null)\n const generatedId = useId()\n const focused = ref(false)\n const hasValue = ref(!!(props.value !== undefined ? props.value : props.defaultValue))\n const revealed = ref(false)\n\n // Sync hasValue with controlled value prop\n watch(\n () => props.value,\n (value) => {\n if (value !== undefined) hasValue.value = !!value\n },\n )\n\n const autoResize = () => {\n const el = inputRef.value\n if (!props.multiline || !el) return\n el.style.height = \"auto\"\n el.style.height = `${el.scrollHeight}px`\n }\n // The multiline <textarea> gets its value imperatively, like React DOM: a\n // `value` prop would make Vue mirror it into a `value` attribute, which\n // React never renders (its text content carries the value instead)\n const syncTextareaValue = () => {\n const el = inputRef.value\n if (!props.multiline || !el || props.value === undefined) return\n const value = String(props.value)\n if (el.value !== value) el.value = value\n }\n onMounted(() => {\n // React's initTextarea: the initial text becomes the (dirty) value\n const el = inputRef.value\n if (props.multiline && el && el.textContent) el.value = el.textContent\n autoResize()\n })\n // Also resize when a controlled value or rows changes without a keystroke\n watch(\n [() => props.multiline, () => props.value, () => props.rows],\n () => {\n syncTextareaValue()\n autoResize()\n },\n { flush: \"post\" },\n )\n\n // Handle clicks on the container to focus the input\n const handleContainerMouseDown = (evt: MouseEvent) => {\n const input = inputRef.value\n if (!evt.target || !(evt.target instanceof Element) || !input) {\n return\n }\n if (input.contains(evt.target)) {\n return\n }\n if (evt.target.closest(\"button, [type='button'], [role='button']\")) {\n return\n }\n evt.preventDefault()\n if (document.activeElement !== input) {\n input.focus()\n }\n // email, number and other types without the selection API throw on setSelectionRange\n if (input.selectionStart === null) return\n const length = input.value.length\n input.setSelectionRange(length, length)\n }\n\n // The clear button unmounts once the value is gone, so keep focus in the field\n const handleClear = (evt: MouseEvent) => {\n inputRef.value?.focus()\n ;(props.onClear as ((evt: MouseEvent) => void) | undefined)?.(evt)\n }\n\n const handleInput = (evt: Event) => {\n const target = evt.currentTarget as HTMLInputElement\n hasValue.value = !!target.value\n emit(\"update:value\", target.value)\n autoResize()\n // Like a React controlled input, a `value` the parent does not update\n // is put back (Vue only re-applies `value` when this component renders)\n void nextTick(() => {\n if (props.value === undefined) return\n const value = String(props.value)\n if (target.value !== value) target.value = value\n })\n }\n\n const handleAnimationStart = (evt: AnimationEvent) => {\n // Detect browser autofill\n if (evt.animationName === \"native-autofill-in\") {\n hasValue.value = true\n emit(\"autofill\")\n }\n }\n\n const handleRevealToggle = () => {\n revealed.value = !revealed.value\n emit(\"revealedChange\", revealed.value)\n }\n\n expose({ focus: () => inputRef.value?.focus(), input: inputRef })\n\n return () => {\n const inputId = props.id || `floating-label-input-${generatedId}`\n // Slots that render nothing (a false v-if) count as absent, like a falsy ReactNode\n const descriptionSlot = slots.description?.()\n const description: VNodeChild = hasContent(descriptionSlot) ? descriptionSlot : props.description\n const descriptionId = description ? `${inputId}-description` : undefined\n const errorId = props.errorMessage ? `${inputId}-error` : undefined\n const startAdornmentSlot = slots.startAdornment?.()\n const startAdornment = hasContent(startAdornmentSlot) ? startAdornmentSlot : undefined\n const endAdornmentSlot = slots.endAdornment?.()\n const endAdornment = hasContent(endAdornmentSlot) ? endAdornmentSlot : undefined\n const readOnly = props.readOnly || props.readonly\n // Caller focus/blur listeners run from the shared handlers\n const {\n \"class\": className,\n \"aria-describedby\": ariaDescribedByAttr,\n \"onFocus\": onFocusAttr,\n \"onBlur\": onBlurAttr,\n ...restAttrs\n } = attrs\n\n const invalid = props.invalid ?? !!props.errorMessage\n // Determine if clear button should be shown\n const showClearButton = !!props.onClear && hasValue.value && !props.disabled && !readOnly\n // Built-in password reveal toggle\n const isPassword = props.type === \"password\"\n const revealable = props.revealable ?? (isPassword && !endAdornment)\n const showRevealButton = revealable && !props.disabled\n const effectiveType = isPassword && revealed.value ? \"text\" : props.type\n // Merge aria-describedby with error id\n const ariaDescribedBy = [ariaDescribedByAttr, errorId, descriptionId].filter(Boolean).join(\" \") || undefined\n\n const controlProps = {\n \"ref\": inputRef,\n \"id\": inputId,\n \"name\": props.name,\n // Vue re-applies a present `value` key on every render, so an\n // uncontrolled field must not carry one (it would reset typed text)\n ...(props.value !== undefined ? { value: props.value } : {}),\n \"disabled\": props.disabled,\n \"readonly\": readOnly,\n // An explicit aria-invalid (e.g. from Field) wins over the computed state\n \"aria-invalid\": restAttrs[\"aria-invalid\"] ?? (invalid ? true : undefined),\n \"aria-describedby\": ariaDescribedBy,\n \"onInput\": handleInput,\n \"onFocus\": (evt: FocusEvent) => {\n focused.value = true\n callListeners(onFocusAttr, evt)\n },\n \"onBlur\": (evt: FocusEvent) => {\n focused.value = false\n callListeners(onBlurAttr, evt)\n },\n }\n // Uncontrolled: `vDefaultValue` sets the initial value (server markup,\n // hydration and later changes as in React)\n const initialValue = props.value === undefined ? props.defaultValue : undefined\n // The textarea's text content follows the controlled value, else\n // `default-value`, as React keeps a textarea's defaultValue\n const { value: _value, ...textareaControlProps } = controlProps as typeof controlProps & { value?: unknown }\n const textContent = String(props.value ?? props.defaultValue ?? \"\")\n\n const inside = props.labelPlacement === \"inside\"\n\n return h(\"div\", {\n \"class\": clsx(s.Root, className as string | undefined),\n \"data-label-placement\": inside ? \"inside\" : undefined,\n \"data-pill\": props.pill && !inside ? \"\" : undefined,\n }, [\n h(\n \"div\",\n {\n \"class\": clsx(s.FieldFootprint, { [s.HasValue!]: hasValue.value || !!startAdornment }),\n \"data-focused\": focused.value ? \"\" : undefined,\n \"data-has-value\": hasValue.value ? \"\" : undefined,\n \"data-invalid\": invalid ? \"\" : undefined,\n \"data-disabled\": props.disabled ? \"\" : undefined,\n \"data-readonly\": readOnly ? \"\" : undefined,\n \"data-multiline\": props.multiline ? \"\" : undefined,\n \"onMousedown\": handleContainerMouseDown,\n },\n [\n h(\"label\", { class: s.TypeableLabel, for: inputId }, [\n h(\"div\", { class: s.LabelPositioner }, [h(\"div\", { class: s.LabelText }, props.label)]),\n ]),\n startAdornment ? h(\"div\", { class: s.StartAdornment }, startAdornment) : null,\n props.multiline\n ? withDirectives(\n h(\n \"textarea\",\n mergeProps(textareaAttrs(restAttrs), {\n ...textareaControlProps,\n rows: props.rows,\n class: s.Textarea,\n textContent,\n }),\n ),\n [[vServerText, textContent]],\n )\n : withDirectives(\n h(\n \"input\",\n mergeProps(restAttrs, {\n ...controlProps,\n \"type\": effectiveType,\n \"class\": s.Input,\n \"onAnimationstart\": handleAnimationStart,\n \"data-lpignore\": props.allowAutofillExtensions ? undefined : true,\n \"data-1p-ignore\": props.allowAutofillExtensions ? undefined : true,\n }),\n ),\n [[vDefaultValue, initialValue]],\n ),\n endAdornment ? h(\"div\", { class: s.EndAdornment }, endAdornment) : null,\n showClearButton\n ? h(\"button\", { \"type\": \"button\", \"aria-label\": \"Clear input\", \"class\": s.ClearButton, \"onClick\": handleClear }, [h(X)])\n : null,\n showRevealButton\n ? h(\n \"button\",\n { \"type\": \"button\", \"aria-label\": revealed.value ? \"Hide\" : \"Show\", \"class\": s.RevealButton, \"onClick\": handleRevealToggle },\n [revealed.value ? h(EyeOff) : h(Eye)],\n )\n : null,\n ],\n ),\n props.errorMessage ? h(\"div\", { id: errorId, class: s.ErrorMessage, role: \"alert\" }, props.errorMessage) : null,\n description ? h(\"div\", { id: descriptionId, class: s.Description }, description) : null,\n ])\n }\n },\n})\n\ntype FloatingLabelInputOwnProps = InstanceType<typeof FloatingLabelInputComponent>[\"$props\"]\n\n/** FloatingLabelInput props plus the native <input> attributes that fall through to it, as in React. */\nexport type FloatingLabelInputProps = FloatingLabelInputOwnProps &\n Omit<InputHTMLAttributes, keyof FloatingLabelInputOwnProps>\n\n/** Text input whose label floats above the value, with optional reveal toggle and multiline mode. */\nexport const FloatingLabelInput = FloatingLabelInputComponent as typeof FloatingLabelInputComponent & {\n new (): { $props: FloatingLabelInputProps }\n}\n"]}
|
|
@@ -42,6 +42,10 @@ export const FloatingLabelSelect = defineComponent({
|
|
|
42
42
|
onClearClick: Function,
|
|
43
43
|
/** Called on pointer down, ArrowDown, ArrowUp and Space on the field (`@interact`) */
|
|
44
44
|
onInteract: Function,
|
|
45
|
+
/** Where the label rests once it floats: on the border, or inside the box with the value under it (always the rounded box). @default "border" */
|
|
46
|
+
labelPlacement: { type: String, default: "border" },
|
|
47
|
+
/** Pill shape. `false` takes the rounded box of the other fields. @default true */
|
|
48
|
+
pill: { type: Boolean, default: true },
|
|
45
49
|
},
|
|
46
50
|
setup(props, { attrs, slots, expose }) {
|
|
47
51
|
const generatedId = useId();
|
|
@@ -103,7 +107,12 @@ export const FloatingLabelSelect = defineComponent({
|
|
|
103
107
|
const showClearButton = !!props.onClearClick && selected && !disabled;
|
|
104
108
|
const ariaDescribedBy = [ariaDescribedByAttr, errorMessage ? errorId : undefined].filter(Boolean).join(" ") ||
|
|
105
109
|
undefined;
|
|
106
|
-
|
|
110
|
+
const inside = props.labelPlacement === "inside";
|
|
111
|
+
return h("div", {
|
|
112
|
+
"class": clsx(s.Root, className),
|
|
113
|
+
"data-label-placement": inside ? "inside" : undefined,
|
|
114
|
+
"data-pill": props.pill && !inside ? "" : undefined,
|
|
115
|
+
}, [
|
|
107
116
|
h("div", {
|
|
108
117
|
"ref": fieldRef,
|
|
109
118
|
"class": clsx(s.FieldFootprint, { [s.HasValue]: selected }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingLabelSelect.js","sourceRoot":"","sources":["../../../../src/components/FloatingLabelSelect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,EAAE,KAAK,EAAE,CAAC,CAAC,SAAS,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;qBACxF,CAAC;oBACF,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACzE,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,gBAAgB,EAAE,EAAE;wBACtC,eAAe;4BACb,CAAC,CAAC,CAAC,CACC,MAAM,EACN;gCACE,YAAY,EAAE,iBAAiB;gCAC/B,OAAO,EAAE,CAAC,CAAC,KAAK;gCAChB,eAAe,EAAE,sBAAsB;gCACvC,SAAS,EAAE,gBAAgB;gCAC3B,OAAO,EAAE,WAAW;gCACpB,SAAS,EAAE,OAAO;gCAClB,MAAM,EAAE,KAAK;gCACb,SAAS,EAAE,IAAI;gCACf,MAAM,EAAE,IAAI;6BACb,EACD,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAC1B;4BACH,CAAC,CAAC,IAAI;wBACR,CAAC,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,YAAY,EAAE,CAAC;qBACvC,CAAC;iBACH,CACF;gBACD,2EAA2E;gBAC3E,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;aACtG,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA","sourcesContent":["import clsx from \"clsx\"\nimport { defineComponent, h, shallowRef, useId, type PropType } from \"vue\"\nimport { Button } from \"../Button/index.js\"\nimport { Dropdown, X } from \"../Icon/index.js\"\nimport s from \"@plexui/styles/components/FloatingLabelSelect/FloatingLabelSelect.module.css\"\n\ntype Listener = (event: KeyboardEvent) => void\n\nconst callListeners = (listeners: unknown, event: KeyboardEvent) => {\n const list = Array.isArray(listeners) ? listeners : [listeners]\n for (const listener of list) {\n if (typeof listener === \"function\") (listener as Listener)(event)\n }\n}\n\n/**\n * Port of packages/ui/src/components/FloatingLabelSelect/FloatingLabelSelect.tsx.\n * A select trigger shell: `class` goes to the root, every other attribute\n * and listener to the `role=\"button\"` field, spread after the component's\n * own (so, as in React, a consumer `@pointerdown` replaces the built-in\n * one, while a consumer `@keydown` runs before the built-in handling).\n * `onClearClick` (`@clear-click`) and `onInteract` (`@interact`) are function\n * props, as in React: the clear button renders only when the first is set,\n * and without the second, the keys that open the field click it instead, so\n * a wrapping trigger (Select's `#trigger`) opens from the keyboard too.\n * A parent's ref resolves `$el` to the field, as React forwards its ref there.\n */\nexport const FloatingLabelSelect = defineComponent({\n name: \"FloatingLabelSelect\",\n inheritAttrs: false,\n props: {\n /** Label text for the floating label */\n label: { type: String, required: true },\n /** Whether a value is selected: floats the label and shows the default slot. @default false */\n selected: { type: Boolean, default: false },\n /** Error message to display below the field */\n errorMessage: String,\n /** Mark the field as invalid. @default false (or true if errorMessage is provided) */\n invalid: { type: Boolean, default: undefined },\n /** Disables the field visually and from interactions. @default false */\n disabled: { type: Boolean, default: false },\n /** Whether the attached list is open. @default false */\n open: { type: Boolean, default: false },\n /** Shows the clear button (when selected and enabled); called when it is clicked */\n onClearClick: Function as PropType<() => void>,\n /** Called on pointer down, ArrowDown, ArrowUp and Space on the field (`@interact`) */\n onInteract: Function as PropType<() => void>,\n },\n setup(props, { attrs, slots, expose }) {\n const generatedId = useId()\n const errorId = `floating-label-select-${generatedId}-error`\n const fieldRef = shallowRef<HTMLElement | null>(null)\n\n // React forwards its ref to the field: a wrapping trigger returns focus\n // to it and anchors to it, not to the root that also holds the error\n expose(Object.defineProperty({}, \"$el\", { enumerable: true, get: () => fieldRef.value }))\n\n const handlePointerDown = (evt: PointerEvent) => {\n if (evt.button === 2 || props.disabled) return\n evt.preventDefault()\n props.onInteract?.()\n }\n\n const handleKeyDown = (evt: KeyboardEvent) => {\n // Enter and Space on a nested control (the clear button) activate that\n // control: neither this handler nor a wrapping trigger's may take them\n if (evt.target !== evt.currentTarget && (evt.key === \" \" || evt.key === \"Enter\")) return\n callListeners(attrs.onKeydown, evt)\n // A handler that prevented the default (the caller's, or a wrapping\n // MenuTrigger's that opened its menu) cancels the built-in handling\n if (props.disabled || evt.defaultPrevented) return\n\n switch (evt.key) {\n case \"ArrowDown\":\n case \"ArrowUp\":\n case \" \":\n case \"Enter\":\n // Enter activates the field only without onInteract, as it\n // would the button a wrapping trigger usually renders\n if (evt.key === \"Enter\" && props.onInteract) break\n evt.stopPropagation()\n evt.preventDefault()\n if (props.onInteract) {\n props.onInteract()\n } else {\n // A wrapping trigger (Select's `#trigger`, a PopoverTrigger) opens on click\n ;(evt.currentTarget as HTMLElement).click()\n }\n break\n }\n }\n\n const handleClearPointerDown = (evt: PointerEvent) => {\n evt.stopPropagation()\n }\n\n const handleClearClick = (evt: MouseEvent) => {\n evt.stopPropagation()\n evt.preventDefault()\n props.onClearClick?.()\n }\n\n return () => {\n const { selected, disabled, open, errorMessage } = props\n const {\n \"class\": className,\n \"aria-describedby\": ariaDescribedByAttr,\n \"onKeydown\": _onKeydown,\n ...restAttrs\n } = attrs\n\n const invalid = props.invalid ?? !!errorMessage\n\n const showClearButton = !!props.onClearClick && selected && !disabled\n\n const ariaDescribedBy =\n [ariaDescribedByAttr as string | undefined, errorMessage ? errorId : undefined].filter(Boolean).join(\" \") ||\n undefined\n\n return h(\"div\", { class: clsx(s.Root, className as string | undefined) }, [\n h(\n \"div\",\n {\n \"ref\": fieldRef,\n \"class\": clsx(s.FieldFootprint, { [s.HasValue!]: selected }),\n \"role\": \"button\",\n \"tabindex\": disabled ? -1 : 0,\n \"data-open\": open ? \"\" : undefined,\n \"data-invalid\": invalid ? \"\" : undefined,\n \"data-disabled\": disabled ? \"\" : undefined,\n \"aria-expanded\": open,\n \"aria-haspopup\": \"listbox\",\n \"aria-invalid\": invalid ? true : undefined,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-disabled\": disabled || undefined,\n \"onPointerdown\": handlePointerDown,\n \"onKeydown\": handleKeyDown,\n ...restAttrs,\n },\n [\n h(\"div\", { class: s.TypeableLabel }, [\n h(\"div\", { class: s.LabelPositioner }, [h(\"div\", { class: s.LabelText }, props.label)]),\n ]),\n h(\"span\", { class: s.Content }, selected ? slots.default?.() : undefined),\n h(\"div\", { class: s.IndicatorWrapper }, [\n showClearButton\n ? h(\n Button,\n {\n \"aria-label\": \"Clear selection\",\n \"class\": s.Clear,\n \"onPointerdown\": handleClearPointerDown,\n \"onClick\": handleClearClick,\n \"color\": \"secondary\",\n \"variant\": \"ghost\",\n \"size\": \"3xs\",\n \"uniform\": true,\n \"pill\": true,\n },\n { default: () => [h(X)] },\n )\n : null,\n h(Dropdown, { class: s.DropdownIcon }),\n ]),\n ],\n ),\n // Same plain line as FloatingLabelInput, so the two read alike on one form\n errorMessage ? h(\"div\", { id: errorId, class: s.ErrorMessage, role: \"alert\" }, [errorMessage]) : null,\n ])\n }\n },\n})\n\nexport type FloatingLabelSelectProps = InstanceType<typeof FloatingLabelSelect>[\"$props\"]\n"]}
|
|
1
|
+
{"version":3,"file":"FloatingLabelSelect.js","sourceRoot":"","sources":["../../../../src/components/FloatingLabelSelect/FloatingLabelSelect.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,UAAU,EAAE,KAAK,EAAiB,MAAM,KAAK,CAAA;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,C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A;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA","sourcesContent":["import clsx from \"clsx\"\nimport { defineComponent, h, shallowRef, useId, type PropType } from \"vue\"\nimport { Button } from \"../Button/index.js\"\nimport { Dropdown, X } from \"../Icon/index.js\"\nimport s from \"@plexui/styles/components/FloatingLabelSelect/FloatingLabelSelect.module.css\"\n\ntype Listener = (event: KeyboardEvent) => void\n\nconst callListeners = (listeners: unknown, event: KeyboardEvent) => {\n const list = Array.isArray(listeners) ? listeners : [listeners]\n for (const listener of list) {\n if (typeof listener === \"function\") (listener as Listener)(event)\n }\n}\n\n/**\n * Port of packages/ui/src/components/FloatingLabelSelect/FloatingLabelSelect.tsx.\n * A select trigger shell: `class` goes to the root, every other attribute\n * and listener to the `role=\"button\"` field, spread after the component's\n * own (so, as in React, a consumer `@pointerdown` replaces the built-in\n * one, while a consumer `@keydown` runs before the built-in handling).\n * `onClearClick` (`@clear-click`) and `onInteract` (`@interact`) are function\n * props, as in React: the clear button renders only when the first is set,\n * and without the second, the keys that open the field click it instead, so\n * a wrapping trigger (Select's `#trigger`) opens from the keyboard too.\n * A parent's ref resolves `$el` to the field, as React forwards its ref there.\n */\nexport const FloatingLabelSelect = defineComponent({\n name: \"FloatingLabelSelect\",\n inheritAttrs: false,\n props: {\n /** Label text for the floating label */\n label: { type: String, required: true },\n /** Whether a value is selected: floats the label and shows the default slot. @default false */\n selected: { type: Boolean, default: false },\n /** Error message to display below the field */\n errorMessage: String,\n /** Mark the field as invalid. @default false (or true if errorMessage is provided) */\n invalid: { type: Boolean, default: undefined },\n /** Disables the field visually and from interactions. @default false */\n disabled: { type: Boolean, default: false },\n /** Whether the attached list is open. @default false */\n open: { type: Boolean, default: false },\n /** Shows the clear button (when selected and enabled); called when it is clicked */\n onClearClick: Function as PropType<() => void>,\n /** Called on pointer down, ArrowDown, ArrowUp and Space on the field (`@interact`) */\n onInteract: Function as PropType<() => void>,\n /** Where the label rests once it floats: on the border, or inside the box with the value under it (always the rounded box). @default \"border\" */\n labelPlacement: { type: String as PropType<\"border\" | \"inside\">, default: \"border\" },\n /** Pill shape. `false` takes the rounded box of the other fields. @default true */\n pill: { type: Boolean, default: true },\n },\n setup(props, { attrs, slots, expose }) {\n const generatedId = useId()\n const errorId = `floating-label-select-${generatedId}-error`\n const fieldRef = shallowRef<HTMLElement | null>(null)\n\n // React forwards its ref to the field: a wrapping trigger returns focus\n // to it and anchors to it, not to the root that also holds the error\n expose(Object.defineProperty({}, \"$el\", { enumerable: true, get: () => fieldRef.value }))\n\n const handlePointerDown = (evt: PointerEvent) => {\n if (evt.button === 2 || props.disabled) return\n evt.preventDefault()\n props.onInteract?.()\n }\n\n const handleKeyDown = (evt: KeyboardEvent) => {\n // Enter and Space on a nested control (the clear button) activate that\n // control: neither this handler nor a wrapping trigger's may take them\n if (evt.target !== evt.currentTarget && (evt.key === \" \" || evt.key === \"Enter\")) return\n callListeners(attrs.onKeydown, evt)\n // A handler that prevented the default (the caller's, or a wrapping\n // MenuTrigger's that opened its menu) cancels the built-in handling\n if (props.disabled || evt.defaultPrevented) return\n\n switch (evt.key) {\n case \"ArrowDown\":\n case \"ArrowUp\":\n case \" \":\n case \"Enter\":\n // Enter activates the field only without onInteract, as it\n // would the button a wrapping trigger usually renders\n if (evt.key === \"Enter\" && props.onInteract) break\n evt.stopPropagation()\n evt.preventDefault()\n if (props.onInteract) {\n props.onInteract()\n } else {\n // A wrapping trigger (Select's `#trigger`, a PopoverTrigger) opens on click\n ;(evt.currentTarget as HTMLElement).click()\n }\n break\n }\n }\n\n const handleClearPointerDown = (evt: PointerEvent) => {\n evt.stopPropagation()\n }\n\n const handleClearClick = (evt: MouseEvent) => {\n evt.stopPropagation()\n evt.preventDefault()\n props.onClearClick?.()\n }\n\n return () => {\n const { selected, disabled, open, errorMessage } = props\n const {\n \"class\": className,\n \"aria-describedby\": ariaDescribedByAttr,\n \"onKeydown\": _onKeydown,\n ...restAttrs\n } = attrs\n\n const invalid = props.invalid ?? !!errorMessage\n\n const showClearButton = !!props.onClearClick && selected && !disabled\n\n const ariaDescribedBy =\n [ariaDescribedByAttr as string | undefined, errorMessage ? errorId : undefined].filter(Boolean).join(\" \") ||\n undefined\n\n const inside = props.labelPlacement === \"inside\"\n\n return h(\"div\", {\n \"class\": clsx(s.Root, className as string | undefined),\n \"data-label-placement\": inside ? \"inside\" : undefined,\n \"data-pill\": props.pill && !inside ? \"\" : undefined,\n }, [\n h(\n \"div\",\n {\n \"ref\": fieldRef,\n \"class\": clsx(s.FieldFootprint, { [s.HasValue!]: selected }),\n \"role\": \"button\",\n \"tabindex\": disabled ? -1 : 0,\n \"data-open\": open ? \"\" : undefined,\n \"data-invalid\": invalid ? \"\" : undefined,\n \"data-disabled\": disabled ? \"\" : undefined,\n \"aria-expanded\": open,\n \"aria-haspopup\": \"listbox\",\n \"aria-invalid\": invalid ? true : undefined,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-disabled\": disabled || undefined,\n \"onPointerdown\": handlePointerDown,\n \"onKeydown\": handleKeyDown,\n ...restAttrs,\n },\n [\n h(\"div\", { class: s.TypeableLabel }, [\n h(\"div\", { class: s.LabelPositioner }, [h(\"div\", { class: s.LabelText }, props.label)]),\n ]),\n h(\"span\", { class: s.Content }, selected ? slots.default?.() : undefined),\n h(\"div\", { class: s.IndicatorWrapper }, [\n showClearButton\n ? h(\n Button,\n {\n \"aria-label\": \"Clear selection\",\n \"class\": s.Clear,\n \"onPointerdown\": handleClearPointerDown,\n \"onClick\": handleClearClick,\n \"color\": \"secondary\",\n \"variant\": \"ghost\",\n \"size\": \"3xs\",\n \"uniform\": true,\n \"pill\": true,\n },\n { default: () => [h(X)] },\n )\n : null,\n h(Dropdown, { class: s.DropdownIcon }),\n ]),\n ],\n ),\n // Same plain line as FloatingLabelInput, so the two read alike on one form\n errorMessage ? h(\"div\", { id: errorId, class: s.ErrorMessage, role: \"alert\" }, [errorMessage]) : null,\n ])\n }\n },\n})\n\nexport type FloatingLabelSelectProps = InstanceType<typeof FloatingLabelSelect>[\"$props\"]\n"]}
|
|
@@ -272,16 +272,17 @@ const TabsComponent = defineComponent({
|
|
|
272
272
|
});
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
|
+
else if (thumb.style.transition) {
|
|
276
|
+
// Normal update (value change, etc.): the thumb leaves with the label's colour
|
|
277
|
+
applyThumbSizing(isVertical, true);
|
|
278
|
+
}
|
|
275
279
|
else {
|
|
276
|
-
//
|
|
280
|
+
// First measure: apply transition after initial calculation is set
|
|
277
281
|
waitForAnimationFrame(() => {
|
|
278
|
-
applyThumbSizing(isVertical,
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
thumb.style.transition = transitionProperty;
|
|
283
|
-
});
|
|
284
|
-
}
|
|
282
|
+
applyThumbSizing(isVertical, false);
|
|
283
|
+
waitForAnimationFrame(() => {
|
|
284
|
+
thumb.style.transition = transitionProperty;
|
|
285
|
+
});
|
|
285
286
|
});
|
|
286
287
|
}
|
|
287
288
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../../src/components/Tabs/Tabs.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,eAAe,EACf,CAAC,EACD,MAAM,EACN,OAAO,EACP,eAAe,EACf,SAAS,EACT,SAAS,EACT,OAAO,EACP,GAAG,EACH,UAAU,EACV,KAAK,GASN,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE3D,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AACvF,OAAO,aAAa,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM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AC,CAAC,KAAK;gDACP,CAAC,CAAC,CAAE,SAAS,CAAC,YAAY,CAAwB,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;4CAChF,4CAA4C;4CAC5C,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,aAAa,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI;yCACnE;qCACF,CACF,CAAA;gCACH,CAAC,CAAC;6BACL,CAAC;yBACL,CAAC;qBACH;iBACF,CAAC;aACH,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAOF,MAAM,CAAC,MAAM,IAAI,GAAG,UAAmE,CAAA","sourcesContent":["import {\n Comment,\n Fragment,\n Text,\n computed,\n defineComponent,\n h,\n inject,\n isVNode,\n onBeforeUnmount,\n onMounted,\n onUpdated,\n provide,\n ref,\n shallowRef,\n watch,\n type Component,\n type ComputedRef,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n type VNode,\n type VNodeArrayChildren,\n} from \"vue\"\nimport { RovingFocusGroup, RovingFocusItem } from \"reka-ui\"\nimport type { ControlSize, SemanticColors, Sizes, Variants } from \"@plexui/styles/types\"\nimport { handlePressableMouseEnter, waitForAnimationFrame } from \"../../lib/helpers.js\"\nimport ChevronDownMd from \"../Icon/svg/ChevronDownMd.js\"\nimport { LoadingIndicator } from \"../Indicator/index.js\"\nimport { Menu, MenuContent, MenuRadioGroup, MenuRadioItem, MenuTrigger } from \"../Menu/index.js\"\nimport { fitCount, visibleTabCount } from \"./overflow.js\"\nimport s from \"@plexui/styles/components/Tabs/Tabs.module.css\"\n\n// Vue port of packages/ui/src/components/Tabs/Tabs.tsx. Props, defaults,\n// rendered DOM and behaviour match React (checked by the parity tests).\n//\n// React builds on Radix ToggleGroup (type=\"single\"). Reka's ToggleGroupItem\n// renders Toggle semantics (`aria-pressed`, `data-active`, no `role=\"radio\"`)\n// and runs its click toggle before handlers the caller passes, so the\n// single-select part of Radix ToggleGroup/Toggle (about twenty lines) is\n// inlined here, and keyboard focus comes from Reka's RovingFocusGroup and\n// RovingFocusItem, the same roving tabindex Radix ToggleGroup uses.\n\nexport type SizeVariant = \"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"\nexport type TabsVariant = \"segmented\" | \"underline\"\nexport type TabsOrientation = \"horizontal\" | \"vertical\"\n\n/** Content React accepts as a ReactNode, in Vue terms */\ntype TabsContent = string | number | VNode | VNodeArrayChildren\n\n/** Badge configuration for TabsTab: a plain value, or an object with content and styling */\nexport type TabsBadgeProp =\n | string\n | number\n | VNode\n | {\n content: TabsContent\n color?: SemanticColors<\"secondary\" | \"success\" | \"danger\" | \"warning\" | \"info\" | \"discovery\" | \"caution\">\n variant?: Variants<\"soft\" | \"solid\">\n pill?: boolean\n loading?: boolean\n }\n\n/** Icon for TabsTab: a component (e.g. an icon from @plexui/vue), a vnode, or text */\nexport type TabsIconProp = string | VNode | Component\n\ntype TabsContextValue = {\n value: ComputedRef<string>\n disabled: ComputedRef<boolean>\n setValue: (nextValue: string) => void\n}\n\nconst TabsContextKey: InjectionKey<TabsContextValue> = Symbol(\"PlexUITabs\")\n\ntype ExposedRovingFocusGroup = { getItems: () => { ref: HTMLElement }[] }\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// Radix RovingFocusGroup's focusFirst\nconst focusFirst = (candidates: HTMLElement[]) => {\n const previouslyFocused = document.activeElement\n for (const candidate of candidates) {\n if (candidate === previouslyFocused) return\n candidate.focus({ preventScroll: false })\n if (document.activeElement !== previouslyFocused) return\n }\n}\n\nconst callHandlers = (handlers: unknown, event: Event) => {\n for (const handler of Array.isArray(handlers) ? handlers : [handlers]) {\n if (typeof handler === \"function\") handler(event)\n }\n}\n\n// Events a caller's handler called preventDefault() on. React's synthetic\n// event reports that call in `defaultPrevented` even when the native event is\n// not cancelable (focus), for every later handler of the same event.\nconst preventedEvents = new WeakSet<Event>()\n\nconst isPrevented = (event: Event) => event.defaultPrevented || preventedEvents.has(event)\n\nconst callCallerHandlers = (handlers: unknown, event: Event) => {\n if (!handlers) return\n const preventDefault = event.preventDefault\n event.preventDefault = () => {\n preventedEvents.add(event)\n preventDefault.call(event)\n }\n try {\n callHandlers(handlers, event)\n } finally {\n Reflect.deleteProperty(event, \"preventDefault\")\n }\n}\n\n// Internal: the element Tabs and TabsTab render through Reka's\n// RovingFocusGroup and RovingFocusItem with `asChild`. Reka merges its\n// handlers into these attrs and would run them before the caller's. Radix\n// composes them the other way (composeEventHandlers): the caller's handler\n// runs first, and Radix skips its own once the event is default-prevented.\n// So the caller's listeners for the `composed` events arrive separately in\n// `listeners` and are composed that way here.\nconst RovingElement = defineComponent({\n name: \"TabsRovingElement\",\n inheritAttrs: false,\n props: {\n as: { type: String, required: true },\n elementRef: Object as PropType<Ref<HTMLElement | null>>,\n /** Events whose Reka handler Radix composes after the caller's */\n composed: { type: Array as PropType<string[]>, required: true },\n /** The caller's listeners for the `composed` events */\n listeners: { type: Object as PropType<Record<string, unknown>>, default: () => ({}) },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const handlers: Record<string, (event: Event) => void> = {}\n for (const key of props.composed) {\n const caller = props.listeners[key]\n const internal = attrs[key]\n handlers[key] = (event: Event) => {\n callCallerHandlers(caller, event)\n if (!isPrevented(event)) callHandlers(internal, event)\n }\n }\n return h(props.as, { ...attrs, ...handlers, ref: props.elementRef }, slots.default?.())\n }\n },\n})\n\n/** Splits the caller's listeners for `keys` from the other attributes. */\nconst splitListeners = (attrs: Record<string, unknown>, keys: string[]) => {\n const listeners: Record<string, unknown> = {}\n const rest: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(attrs)) {\n if (keys.includes(key)) listeners[key] = value\n else rest[key] = value\n }\n return { listeners, rest }\n}\n\n// Radix RovingFocusGroup composes mousedown, focus and blur; its items\n// mousedown and focus (keydown too, which Reka already leaves to the caller)\nconst GROUP_COMPOSED = [\"onMousedown\", \"onFocus\", \"onBlur\"]\nconst ITEM_COMPOSED = [\"onMousedown\", \"onFocus\"]\n\nconst tabsProps = {\n /** Controlled value for the group. Bind with `v-model:value`; leave unset for an uncontrolled group. */\n value: String,\n /**\n * Visual variant of the tab group\n * - `\"segmented\"`: background container with sliding highlight (default)\n * - `\"underline\"`: no background, animated line indicator under active tab\n * @default \"segmented\"\n */\n variant: { type: String as PropType<TabsVariant>, default: \"segmented\" },\n /** Orientation of the tab layout. @default \"horizontal\" */\n orientation: { type: String as PropType<TabsOrientation>, default: \"horizontal\" },\n /** Controls the size of the tabs, `3xs` (22px) to `3xl` (48px). @default \"md\" */\n size: { type: String as PropType<ControlSize>, default: \"md\" },\n /** Controls gutter on the edges of the tabs, defaults to value from `size`. */\n gutterSize: String as PropType<Sizes<\"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\">>,\n /** Disable the entire group. @default false */\n disabled: { type: Boolean, default: false },\n /** Display the control as a block element with equal width segments. @default false */\n block: { type: Boolean, default: false },\n /** Fully rounded pill shape. Only applies to the `\"segmented\"` variant. @default true */\n pill: { type: Boolean, default: true },\n /**\n * Flush underline style: no tab padding, so the indicator matches the text\n * width, gap spacing and no bottom border. Only applies to the `\"underline\"` variant.\n * @default false\n */\n flush: { type: Boolean, default: false },\n}\n\nconst tabsEmits = {\n /** A new value was selected (`v-model:value`) */\n \"update:value\": (_value: string) => true,\n /** Same payload as `update:value`, named after React's `onChange` */\n \"change\": (_value: string) => true,\n /** Any click on the control, even if a new value was not selected */\n \"click\": (_event: MouseEvent) => true,\n}\n\n// The group itself. `Tabs` renders it as it is, or measures and splits it\n// for `overflow=\"menu\"`\nconst TabsComponent = defineComponent({\n name: \"TabsRoot\",\n inheritAttrs: false,\n props: tabsProps,\n emits: tabsEmits,\n setup(props, { slots, attrs, emit }) {\n const rootRef = ref<HTMLDivElement | null>(null)\n const thumbRef = ref<HTMLDivElement | null>(null)\n const groupRef = ref<ExposedRovingFocusGroup | null>(null)\n let prevSize = props.size\n\n // Radix useControllableState: `value` undefined means uncontrolled, starting empty\n const uncontrolledValue = ref(\"\")\n const currentValue = computed(() => (props.value !== undefined ? props.value : uncontrolledValue.value))\n\n const handleValueChange = (nextValue: string) => {\n // Only trigger onChange when a value exists\n // Disallow toggling off enabled items\n if (nextValue) {\n emit(\"update:value\", nextValue)\n emit(\"change\", nextValue)\n }\n }\n\n const setValue = (nextValue: string) => {\n if (props.value !== undefined) {\n if (nextValue !== props.value) handleValueChange(nextValue)\n } else {\n uncontrolledValue.value = nextValue\n }\n }\n\n // Radix reports uncontrolled changes from an effect, after the click has\n // finished bubbling (so the group's `click` comes first)\n watch(uncontrolledValue, handleValueChange, { flush: \"post\" })\n\n provide(TabsContextKey, {\n value: currentValue,\n disabled: computed(() => props.disabled),\n setValue,\n })\n\n const applyThumbSizing = (isVertical: boolean, attemptScroll: boolean) => {\n const root = rootRef.value\n const thumb = thumbRef.value\n\n if (!root || !thumb) {\n return\n }\n\n // Get selected node\n const activeNode = root.querySelector<HTMLDivElement>('[data-state=\"on\"]')\n\n // Impossible\n if (!activeNode) {\n return\n }\n\n if (isVertical) {\n const rootHeight = root.clientHeight\n let targetHeight = Math.floor(activeNode.clientHeight)\n const targetOffset = activeNode.offsetTop\n\n // Detect subpixel edge case\n if (rootHeight - (targetHeight + targetOffset) < 2) {\n targetHeight = targetHeight - 1\n }\n\n thumb.style.height = `${Math.floor(targetHeight)}px`\n thumb.style.width = \"\"\n thumb.style.transform = `translateY(${targetOffset}px)`\n\n // Scroll into view if needed\n if (root.scrollHeight > rootHeight) {\n const buffer = rootHeight * 0.15\n const scrollTop = root.scrollTop\n const top = activeNode.offsetTop\n const bottom = top + targetHeight\n if (top < scrollTop + buffer || bottom > scrollTop + rootHeight - buffer) {\n if (attemptScroll) {\n activeNode.scrollIntoView({ block: \"center\", inline: \"nearest\", behavior: \"smooth\" })\n }\n }\n }\n } else {\n const rootWidth = root.clientWidth\n let targetWidth = Math.floor(activeNode.clientWidth)\n const targetOffset = activeNode.offsetLeft\n\n // Detect if the thumb is moving too far to the edge of the container.\n // This would most commonly be due to subpixel widths adding up to excessive distance.\n if (rootWidth - (targetWidth + targetOffset) < 2) {\n targetWidth = targetWidth - 1\n }\n\n thumb.style.width = `${Math.floor(targetWidth)}px`\n thumb.style.height = \"\"\n thumb.style.transform = `translateX(${targetOffset}px)`\n\n // If the control is scrollable, ensure the active option is visible\n if (root.scrollWidth > rootWidth) {\n // Only scroll items near the edge, but not the inner 2/3.\n const buffer = rootWidth * 0.15\n const scrollLeft = root.scrollLeft\n const left = activeNode.offsetLeft\n const right = left + targetWidth\n if (left < scrollLeft + buffer || right > scrollLeft + rootWidth - buffer) {\n // Cheap trick to avoid unintentional scroll on mount - transition is set after mounting\n if (attemptScroll) {\n activeNode.scrollIntoView({ block: \"nearest\", inline: \"center\", behavior: \"smooth\" })\n }\n }\n }\n }\n }\n\n // React's useLayoutEffect on [value, size, gutterSize, pill, flush, isVertical].\n // `value` is the prop, so an uncontrolled selection does not move the thumb\n // until the next resize, exactly as in React.\n const syncThumb = () => {\n const root = rootRef.value\n const thumb = thumbRef.value\n\n if (!root || !thumb) {\n return\n }\n\n const isVertical = props.orientation === \"vertical\"\n const transitionProperty = isVertical\n ? \"height 200ms var(--cubic-enter), transform 200ms var(--cubic-enter)\"\n : \"width 200ms var(--cubic-enter), transform 200ms var(--cubic-enter)\"\n\n const sizeChanged = prevSize !== props.size\n prevSize = props.size\n\n if (sizeChanged) {\n // Size changed - disable transition, wait for CSS, then apply sizing\n const currentTransition = thumb.style.transition\n thumb.style.transition = \"\"\n\n waitForAnimationFrame(() => {\n applyThumbSizing(isVertical, false)\n waitForAnimationFrame(() => {\n thumb.style.transition = currentTransition\n })\n })\n } else {\n // Normal update (value change, etc.)\n waitForAnimationFrame(() => {\n applyThumbSizing(isVertical, !!thumb.style.transition)\n\n // Apply transition after initial calculation is set\n if (!thumb.style.transition) {\n waitForAnimationFrame(() => {\n thumb.style.transition = transitionProperty\n })\n }\n })\n }\n }\n\n watch(\n [\n () => props.value,\n () => props.size,\n () => props.gutterSize,\n () => props.pill,\n () => props.flush,\n () => props.orientation === \"vertical\",\n ],\n syncThumb,\n { flush: \"post\" },\n )\n\n let observer: ResizeObserver | undefined\n\n onMounted(() => {\n syncThumb()\n\n // usehooks-ts useResizeObserver: only fires when the content box changed\n const root = rootRef.value\n if (!root || 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\n const thumb = thumbRef.value\n if (!thumb) {\n return\n }\n\n // Perform the size update instantly\n const currentTransition = thumb.style.transition\n thumb.style.transition = \"\"\n applyThumbSizing(props.orientation === \"vertical\", false)\n thumb.style.transition = currentTransition\n })\n observer.observe(root, { box: \"content-box\" })\n })\n\n // Tabs added, removed, reordered or relabelled move the active tab without\n // resizing the group: measure again, instantly, like a resize\n let mutationObserver: MutationObserver | undefined\n onMounted(() => {\n const root = rootRef.value\n if (!root || typeof MutationObserver === \"undefined\") return\n mutationObserver = new MutationObserver(() => {\n const thumb = thumbRef.value\n if (!thumb) return\n const currentTransition = thumb.style.transition\n thumb.style.transition = \"\"\n applyThumbSizing(props.orientation === \"vertical\", false)\n thumb.style.transition = currentTransition\n })\n mutationObserver.observe(root, { childList: true, characterData: true, subtree: true })\n })\n\n onBeforeUnmount(() => {\n observer?.disconnect()\n mutationObserver?.disconnect()\n })\n\n // Radix moves focus into the group onto the selected tab, then the last\n // focused one, then the first. Reka looks for a `data-active` attribute\n // that Radix does not render, so its entry focus is replaced here.\n const handleEntryFocus = (event: Event) => {\n event.preventDefault()\n const items = (groupRef.value?.getItems() ?? []).map((item) => item.ref)\n const activeItem = items.find((item) => item.getAttribute(\"data-state\") === \"on\")\n const currentItem = items.find((item) => item.getAttribute(\"tabindex\") === \"0\")\n focusFirst([activeItem, currentItem, ...items].filter((item): item is HTMLElement => !!item))\n }\n\n return () => {\n const { class: className, dir, ...otherAttrs } = attrs\n const { listeners, rest: restAttrs } = splitListeners(otherAttrs, GROUP_COMPOSED)\n // Only apply pill for segmented variant\n const isPill = props.variant === \"segmented\" && props.pill\n // Only apply flush for underline variant\n const isFlush = props.variant === \"underline\" && props.flush\n\n return h(\n RovingFocusGroup,\n {\n ref: groupRef,\n asChild: true,\n loop: false,\n dir: dir as \"ltr\" | \"rtl\" | undefined,\n onEntryFocus: handleEntryFocus,\n },\n {\n default: () =>\n h(\n RovingElement,\n {\n \"as\": \"div\",\n \"elementRef\": rootRef,\n \"composed\": GROUP_COMPOSED,\n \"listeners\": listeners,\n \"class\": [s.Tabs, className],\n // `dir` comes from RovingFocusGroup (\"ltr\" unless set), like Radix\n // Radix ToggleGroup type=\"single\" (radix-ui 1.8) is a radiogroup\n \"role\": \"radiogroup\",\n \"onClick\": (event: MouseEvent) => emit(\"click\", event),\n \"data-variant\": props.variant,\n \"data-orientation\": props.orientation,\n \"data-block\": props.block ? \"\" : undefined,\n \"data-pill\": isPill ? \"\" : undefined,\n \"data-flush\": isFlush ? \"\" : undefined,\n \"data-size\": props.size,\n \"data-gutter-size\": props.gutterSize,\n ...restAttrs,\n },\n { default: () => [h(\"div\", { class: s.TabsThumb, ref: thumbRef }), slots.default?.()] },\n ),\n },\n )\n }\n },\n})\n\n\nconst useTabsContext = () => {\n const context = inject(TabsContextKey, null)\n\n if (!context) {\n throw new Error(\"`TabsTab` must be used within `Tabs`\")\n }\n\n return context\n}\n\nconst hasContent = (nodes: VNode[] | undefined): nodes is VNode[] =>\n !!nodes?.some((node) => {\n if (!isVNode(node)) return node != null && typeof node !== \"boolean\" && String(node) !== \"\"\n if (node.type === Comment) return false\n if (node.type === Text) return String(node.children ?? \"\") !== \"\"\n if (Array.isArray(node.children) && typeof node.type === \"symbol\") return hasContent(node.children as VNode[])\n return true\n })\n\nconst isBadgeObject = (badge: TabsBadgeProp | undefined): badge is Extract<TabsBadgeProp, { content: unknown }> =>\n badge != null && typeof badge === \"object\" && \"content\" in badge\n\nconst renderIcon = (icon: TabsIconProp | undefined) => {\n if (icon == null || typeof icon === \"string\" || isVNode(icon)) return icon\n return h(icon)\n}\n\nconst TabComponent = defineComponent({\n name: \"TabsTab\",\n inheritAttrs: false,\n props: {\n /** Tab value */\n value: { type: String, required: true },\n /** Icon before the text content: a component, a vnode or text. The `icon` slot takes precedence. */\n icon: [String, Object, Function] as PropType<TabsIconProp>,\n /**\n * Badge after the text content: a plain value, or an object with\n * `content`, `color`, `variant`, `pill` and `loading`. The `badge` slot\n * replaces the content and keeps the object's styling.\n */\n badge: { type: [String, Number, Object] as PropType<TabsBadgeProp>, default: undefined },\n /** Disable the individual tab */\n disabled: { type: Boolean, default: undefined },\n },\n setup(props, { slots, attrs }) {\n const context = useTabsContext()\n\n return () => {\n const disabled = context.disabled.value || !!props.disabled\n const selected = context.value.value\n const pressed = !!selected && selected === props.value\n const { onClick, ...otherAttrs } = attrs\n const { listeners, rest: restAttrs } = splitListeners(otherAttrs, ITEM_COMPOSED)\n\n // Normalize badge prop; the slot replaces its content\n const badgeSlot = slots.badge?.()\n const badgeObject = isBadgeObject(props.badge) ? props.badge : undefined\n const badgeProps = hasContent(badgeSlot)\n ? { ...badgeObject, content: badgeSlot }\n : props.badge != null\n ? (badgeObject ?? { content: props.badge as TabsContent })\n : null\n\n const children = slots.default?.()\n const iconSlot = slots.icon?.()\n\n // Radix Toggle: the caller's click handler runs first and can cancel the toggle\n const handleClick = (event: MouseEvent) => {\n // React does not dispatch mouse handlers on a disabled button\n if (disabled) return\n callHandlers(onClick, event)\n if (event.defaultPrevented) return\n context.setValue(pressed ? \"\" : props.value)\n }\n\n return h(\n RovingFocusItem,\n { asChild: true, focusable: !disabled, active: pressed },\n {\n default: () =>\n h(\n RovingElement,\n {\n \"as\": \"button\",\n \"composed\": ITEM_COMPOSED,\n \"listeners\": listeners,\n // Radix Toggle defaults, then the single-select radio semantics\n \"type\": \"button\",\n \"data-state\": pressed ? \"on\" : \"off\",\n \"data-disabled\": disabled ? \"\" : undefined,\n \"role\": \"radio\",\n \"aria-checked\": pressed,\n // Reka's RovingFocusItem marks the active item; Radix does not\n \"data-active\": undefined,\n // Caller attributes win, as React spreads them after `className`\n \"class\": s.Tab,\n ...restAttrs,\n \"disabled\": disabled,\n \"onPointerenter\": handlePressableMouseEnter,\n \"onClick\": handleClick,\n },\n {\n default: () => [\n h(\"span\", { class: s.TabContent }, [\n hasContent(iconSlot) ? iconSlot : renderIcon(props.icon),\n hasContent(children) ? h(\"span\", null, children) : null,\n badgeProps\n ? h(\n \"span\",\n {\n \"class\": s.TabBadge,\n \"data-color\": badgeProps.color ?? \"secondary\",\n \"data-variant\": badgeProps.variant ?? \"soft\",\n \"data-pill\": badgeProps.pill ? \"\" : undefined,\n },\n badgeProps.loading ? [h(LoadingIndicator)] : [badgeProps.content as VNodeArrayChildren[number]],\n )\n : null,\n ]),\n ],\n },\n ),\n },\n )\n }\n },\n})\n\ntype TabOwnProps = InstanceType<typeof TabComponent>[\"$props\"]\n\n/** TabsTab props; other attributes (`aria-label`, ...) fall through to the button. */\nexport type TabProps = TabOwnProps & { \"aria-label\"?: string }\n\nexport const TabsTab = TabComponent as typeof TabComponent & { new (): { $props: TabProps } }\n\n/** Backward-compat alias of `TabsTab`, like React's `Tabs.Option` */\nexport const TabsOption: typeof TabsTab = TabsTab\n\n// ---------------------------------------------------------------------------\n// overflow=\"menu\" (React's OverflowTabs)\n\n/** Value of the menu button; no real tab has it */\nconst MORE_VALUE = \"__plexui_tabs_more__\"\n\ntype Slots = Record<string, ((...args: unknown[]) => VNodeArrayChildren) | undefined>\n\n/** The TabsTab vnodes of a default slot, through fragments (`v-for`, `<template>`) */\nconst tabVNodes = (nodes: VNodeArrayChildren | undefined): VNode[] =>\n (nodes ?? []).flatMap((node) => {\n if (!isVNode(node)) return []\n if (node.type === Fragment && Array.isArray(node.children)) return tabVNodes(node.children as VNodeArrayChildren)\n return node.type === TabComponent ? [node] : []\n })\n\nconst slotsOf = (node: VNode) => (node.children && typeof node.children === \"object\" && !Array.isArray(node.children) ? (node.children as Slots) : {})\n\n/** A tab's slot content; a vnode's raw slot may return a string or nothing */\nconst slotContent = (node: VNode, name: string): VNodeArrayChildren => {\n const content = slotsOf(node)[name]?.() as VNodeArrayChildren | VNodeArrayChildren[number] | undefined\n if (content == null) return []\n return Array.isArray(content) ? content : [content]\n}\n\nconst labelContent = (node: VNode) => slotContent(node, \"default\")\n\nconst plainText = (node: unknown): string => {\n if (typeof node === \"string\" || typeof node === \"number\") return String(node)\n if (Array.isArray(node)) return node.map(plainText).join(\"\")\n if (isVNode(node)) {\n if (node.type === Comment) return \"\"\n if (typeof node.children === \"string\") return node.children\n if (Array.isArray(node.children)) return plainText(node.children)\n return plainText(labelContent(node))\n }\n return \"\"\n}\n\nconst tabProps = (node: VNode) => (node.props ?? {}) as Record<string, unknown>\n\n/** Slot content that renders something: text, or a vnode other than a comment */\nconst filled = (nodes: VNodeArrayChildren) =>\n plainText(nodes) !== \"\" || nodes.some((node) => isVNode(node) && node.type !== Comment)\n\nconst badgeText = (badge: unknown) => (isBadgeObject(badge as TabsBadgeProp) ? plainText((badge as { content: unknown }).content) : plainText(badge))\n\n/** A tab's icon: the `icon` slot, else the prop */\nconst tabIcon = (node: VNode) => {\n const iconSlot = slotContent(node, \"icon\")\n return filled(iconSlot) ? iconSlot : renderIcon(tabProps(node).icon as TabsIconProp | undefined)\n}\n\n/** A tab's count as text: the `badge` slot, else the prop */\nconst tabCount = (node: VNode) => plainText(slotContent(node, \"badge\")) || badgeText(tabProps(node).badge)\n\n/** A raw vnode prop holds a boolean attribute as written: `<TabsTab disabled>` is \"\" */\nconst tabDisabled = (node: VNode) => {\n const disabled = tabProps(node).disabled\n return disabled != null && disabled !== false\n}\n\n/** A tab's name: its text, else its accessible name, else its value */\nconst tabLabel = (node: VNode) =>\n plainText(labelContent(node)) || (tabProps(node)[\"aria-label\"] as string | undefined) || String(tabProps(node).value)\n\n/** What a tab's width depends on: the strip measures again when it changes */\nconst tabsSignature = (nodes: VNode[]) =>\n nodes\n .map((node) =>\n [\n tabProps(node).value,\n plainText(labelContent(node)),\n tabCount(node),\n tabProps(node).icon != null || slotsOf(node).icon != null,\n ].join(\"\\u0000\"),\n )\n .join(\"\\u0001\")\n\n/**\n * MenuTrigger sets `data-state` (open or closed) on its child, while a tab\n * keeps `on` or `off` in the same attribute and the thumb finds the active tab\n * by it. The menu's value does not reach the tab; its handlers and\n * `aria-haspopup` / `aria-expanded` do.\n */\nconst MoreTab = defineComponent({\n name: \"TabsMoreTab\",\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n return () => {\n const { \"data-state\": _menuState, ...rest } = attrs\n return h(TabComponent, rest as TabProps, slots)\n }\n },\n})\n\nconst TabsPublic = defineComponent({\n name: \"Tabs\",\n inheritAttrs: false,\n props: {\n ...tabsProps,\n /**\n * What happens to tabs that do not fit in one row: the strip scrolls\n * sideways (`scroll`), or they move into a menu at its end (`menu`). The\n * menu button shows the active tab's name when it is a hidden one.\n * Horizontal tabs without `block` only.\n * @default \"scroll\"\n */\n overflow: { type: String as PropType<\"scroll\" | \"menu\">, default: \"scroll\" },\n /** Text of the menu button with `overflow=\"menu\"`. @default \"More\" */\n overflowLabel: { type: String, default: \"More\" },\n },\n emits: tabsEmits,\n setup(props, { slots, attrs, emit }) {\n const hostRef = ref<HTMLDivElement | null>(null)\n // Uncontrolled like the group: `value` unset starts empty\n const uncontrolledValue = ref(\"\")\n const current = computed(() => (props.value !== undefined ? props.value : uncontrolledValue.value))\n const select = (next: string) => {\n if (props.value === undefined) uncontrolledValue.value = next\n emit(\"update:value\", next)\n emit(\"change\", next)\n }\n\n // { count: null } while the measuring pass renders every tab and the\n // menu button; a new object each time, so an unchanged count still renders\n const measured = shallowRef<{ count: number | null }>({ count: null })\n let measuredSignature = \"\"\n let measuredActive = -1\n let lastRender = { measuring: true, signature: \"\", activeIndex: -1, length: 0 }\n let boxWidth = -1\n\n const measure = () => {\n if (!lastRender.measuring) return\n const root = hostRef.value?.firstElementChild\n if (!(root instanceof HTMLElement)) return\n\n const buttons = Array.from(root.querySelectorAll<HTMLElement>(\":scope > button\"))\n if (buttons.length !== lastRender.length + 1) return\n\n const widths = buttons.map((button) => button.getBoundingClientRect().width)\n const moreButton = buttons[buttons.length - 1]\n const moreWidth = widths.pop() ?? 0\n const style = getComputedStyle(root)\n const available =\n root.getBoundingClientRect().width -\n (Number.parseFloat(style.paddingLeft) || 0) -\n (Number.parseFloat(style.paddingRight) || 0)\n const gap = Number.parseFloat(style.columnGap) || 0\n boxWidth = hostRef.value?.parentElement?.clientWidth ?? -1\n measuredSignature = lastRender.signature\n measuredActive = lastRender.activeIndex\n\n if (available <= 0) {\n measured.value = { count: lastRender.length }\n return\n }\n\n const { activeIndex } = lastRender\n const chevron = moreButton?.querySelector(\"svg\")\n const chevronWidth = chevron?.getBoundingClientRect().width ?? 0\n const labelGap = chevron?.parentElement ? Number.parseFloat(getComputedStyle(chevron.parentElement).columnGap) || 0 : 0\n const activeWidth = activeIndex < 0 ? 0 : (widths[activeIndex] ?? 0) + chevronWidth + labelGap\n measured.value = { count: visibleTabCount(widths, moreWidth, activeWidth, activeIndex, gap, available) }\n }\n\n // The width to fit is the container's; reports during a measuring pass\n // are skipped. The menu strip may appear or go after mount, with `overflow`\n let observer: ResizeObserver | undefined\n let observed: HTMLElement | null = null\n const observeBox = () => {\n const box = hostRef.value?.parentElement ?? null\n if (box === observed) return\n observer?.disconnect()\n observer = undefined\n observed = box\n if (!box || typeof ResizeObserver === \"undefined\") return\n observer = new ResizeObserver(() => {\n if (lastRender.measuring) return\n const width = box.clientWidth\n if (width === boxWidth) return\n boxWidth = width\n measured.value = { count: null }\n })\n observer.observe(box)\n }\n onMounted(() => {\n measure()\n observeBox()\n })\n onUpdated(() => {\n measure()\n observeBox()\n })\n onBeforeUnmount(() => observer?.disconnect())\n\n const forward = {\n \"onUpdate:value\": (value: string) => emit(\"update:value\", value),\n \"onChange\": (value: string) => emit(\"change\", value),\n \"onClick\": (event: MouseEvent) => emit(\"click\", event),\n }\n\n return () => {\n const { overflow, overflowLabel, ...rootProps } = props\n if (overflow !== \"menu\" || props.block || props.orientation === \"vertical\") {\n return h(TabsComponent, { ...rootProps, ...attrs, ...forward }, slots)\n }\n\n const items = tabVNodes(slots.default?.() as VNodeArrayChildren | undefined)\n // The strip's own props size the tabs and the menu button too\n const signature = [overflowLabel, props.size, props.variant, props.gutterSize, props.pill, props.flush, tabsSignature(items)].join(\n \"\\u0002\",\n )\n const activeIndex = items.findIndex((item) => tabProps(item).value === current.value)\n const { count } = measured.value\n // New tabs measure again; so does an active tab that moves under the\n // menu button or back out, since the button carries the hidden one's name\n const stale =\n count !== null &&\n (signature !== measuredSignature ||\n (activeIndex !== measuredActive && (measuredActive >= count || activeIndex >= count)))\n const measuring = count === null || stale\n lastRender = { measuring, signature, activeIndex, length: items.length }\n\n const shown = measuring ? items : items.slice(0, count)\n const hidden = measuring ? [] : items.slice(count)\n const hiddenActive = hidden.find((item) => tabProps(item).value === current.value) ?? null\n\n const strip = h(\n TabsComponent,\n {\n ...rootProps,\n ...attrs,\n \"data-overflow\": \"menu\",\n \"value\": hiddenActive ? MORE_VALUE : current.value,\n // Pressing the menu button opens the menu; it is not a tab\n \"onUpdate:value\": (next: string) => {\n if (next !== MORE_VALUE) select(next)\n },\n \"onClick\": forward.onClick,\n },\n {\n default: () => [\n ...shown,\n measuring || hidden.length > 0\n ? h(MenuTrigger, null, {\n default: () =>\n h(MoreTab, { value: MORE_VALUE }, {\n default: () => [\n h(\"span\", { class: s.OverflowLabel }, [hiddenActive ? tabLabel(hiddenActive) : overflowLabel, h(ChevronDownMd)]),\n ],\n }),\n })\n : null,\n ],\n },\n )\n\n return h(\"div\", { ref: hostRef, class: s.OverflowHost }, [\n h(Menu, null, {\n default: () => [\n strip,\n h(MenuContent, { align: \"end\", minWidth: \"auto\" }, {\n default: () =>\n h(MenuRadioGroup, { \"value\": current.value, \"onUpdate:value\": select }, {\n default: () =>\n hidden.map((item) => {\n const itemProps = tabProps(item)\n const count = tabCount(item)\n const label = labelContent(item)\n return h(\n MenuRadioItem,\n {\n key: String(itemProps.value),\n value: String(itemProps.value),\n disabled: props.disabled || tabDisabled(item),\n },\n {\n default: () => [\n tabIcon(item),\n filled(label)\n ? label\n : ((itemProps[\"aria-label\"] as string | undefined) ?? String(itemProps.value)),\n // A tab's count moves into the menu with it\n count !== \"\" ? h(\"span\", { class: s.OverflowBadge }, count) : null,\n ],\n },\n )\n }),\n }),\n }),\n ],\n }),\n ])\n }\n },\n})\n\ntype TabsOwnProps = InstanceType<typeof TabsPublic>[\"$props\"]\n\n/** Tabs props plus the attributes that fall through to the group element, as in React. */\nexport type TabsProps = TabsOwnProps & Omit<HTMLAttributes, keyof TabsOwnProps> & { \"aria-label\"?: string }\n\nexport const Tabs = TabsPublic as typeof TabsPublic & { new (): { $props: TabsProps } }\n"]}
|
|
1
|
+
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../../src/components/Tabs/Tabs.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,eAAe,EACf,CAAC,EACD,MAAM,E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QAAQ,CAAC,IAAI,CAAC,CAAA;oCAC5B,MAAM,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC,CAAA;oCAChC,OAAO,CAAC,CACN,aAAa,EACb;wCACE,GAAG,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC;wCAC5B,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC;wCAC9B,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,WAAW,CAAC,IAAI,CAAC;qCAC9C,EACD;wCACE,OAAO,EAAE,GAAG,EAAE,CAAC;4CACb,OAAO,CAAC,IAAI,CAAC;4CACb,MAAM,CAAC,KAAK,CAAC;gDACX,CAAC,CAAC,KAAK;gDACP,CAAC,CAAC,CAAE,SAAS,CAAC,YAAY,CAAwB,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;4CAChF,4CAA4C;4CAC5C,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,aAAa,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI;yCACnE;qCACF,CACF,CAAA;gCACH,CAAC,CAAC;6BACL,CAAC;yBACL,CAAC;qBACH;iBACF,CAAC;aACH,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAOF,MAAM,CAAC,MAAM,IAAI,GAAG,UAAmE,CAAA","sourcesContent":["import {\n Comment,\n Fragment,\n Text,\n computed,\n defineComponent,\n h,\n inject,\n isVNode,\n onBeforeUnmount,\n onMounted,\n onUpdated,\n provide,\n ref,\n shallowRef,\n watch,\n type Component,\n type ComputedRef,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n type VNode,\n type VNodeArrayChildren,\n} from \"vue\"\nimport { RovingFocusGroup, RovingFocusItem } from \"reka-ui\"\nimport type { ControlSize, SemanticColors, Sizes, Variants } from \"@plexui/styles/types\"\nimport { handlePressableMouseEnter, waitForAnimationFrame } from \"../../lib/helpers.js\"\nimport ChevronDownMd from \"../Icon/svg/ChevronDownMd.js\"\nimport { LoadingIndicator } from \"../Indicator/index.js\"\nimport { Menu, MenuContent, MenuRadioGroup, MenuRadioItem, MenuTrigger } from \"../Menu/index.js\"\nimport { fitCount, visibleTabCount } from \"./overflow.js\"\nimport s from \"@plexui/styles/components/Tabs/Tabs.module.css\"\n\n// Vue port of packages/ui/src/components/Tabs/Tabs.tsx. Props, defaults,\n// rendered DOM and behaviour match React (checked by the parity tests).\n//\n// React builds on Radix ToggleGroup (type=\"single\"). Reka's ToggleGroupItem\n// renders Toggle semantics (`aria-pressed`, `data-active`, no `role=\"radio\"`)\n// and runs its click toggle before handlers the caller passes, so the\n// single-select part of Radix ToggleGroup/Toggle (about twenty lines) is\n// inlined here, and keyboard focus comes from Reka's RovingFocusGroup and\n// RovingFocusItem, the same roving tabindex Radix ToggleGroup uses.\n\nexport type SizeVariant = \"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"\nexport type TabsVariant = \"segmented\" | \"underline\"\nexport type TabsOrientation = \"horizontal\" | \"vertical\"\n\n/** Content React accepts as a ReactNode, in Vue terms */\ntype TabsContent = string | number | VNode | VNodeArrayChildren\n\n/** Badge configuration for TabsTab: a plain value, or an object with content and styling */\nexport type TabsBadgeProp =\n | string\n | number\n | VNode\n | {\n content: TabsContent\n color?: SemanticColors<\"secondary\" | \"success\" | \"danger\" | \"warning\" | \"info\" | \"discovery\" | \"caution\">\n variant?: Variants<\"soft\" | \"solid\">\n pill?: boolean\n loading?: boolean\n }\n\n/** Icon for TabsTab: a component (e.g. an icon from @plexui/vue), a vnode, or text */\nexport type TabsIconProp = string | VNode | Component\n\ntype TabsContextValue = {\n value: ComputedRef<string>\n disabled: ComputedRef<boolean>\n setValue: (nextValue: string) => void\n}\n\nconst TabsContextKey: InjectionKey<TabsContextValue> = Symbol(\"PlexUITabs\")\n\ntype ExposedRovingFocusGroup = { getItems: () => { ref: HTMLElement }[] }\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// Radix RovingFocusGroup's focusFirst\nconst focusFirst = (candidates: HTMLElement[]) => {\n const previouslyFocused = document.activeElement\n for (const candidate of candidates) {\n if (candidate === previouslyFocused) return\n candidate.focus({ preventScroll: false })\n if (document.activeElement !== previouslyFocused) return\n }\n}\n\nconst callHandlers = (handlers: unknown, event: Event) => {\n for (const handler of Array.isArray(handlers) ? handlers : [handlers]) {\n if (typeof handler === \"function\") handler(event)\n }\n}\n\n// Events a caller's handler called preventDefault() on. React's synthetic\n// event reports that call in `defaultPrevented` even when the native event is\n// not cancelable (focus), for every later handler of the same event.\nconst preventedEvents = new WeakSet<Event>()\n\nconst isPrevented = (event: Event) => event.defaultPrevented || preventedEvents.has(event)\n\nconst callCallerHandlers = (handlers: unknown, event: Event) => {\n if (!handlers) return\n const preventDefault = event.preventDefault\n event.preventDefault = () => {\n preventedEvents.add(event)\n preventDefault.call(event)\n }\n try {\n callHandlers(handlers, event)\n } finally {\n Reflect.deleteProperty(event, \"preventDefault\")\n }\n}\n\n// Internal: the element Tabs and TabsTab render through Reka's\n// RovingFocusGroup and RovingFocusItem with `asChild`. Reka merges its\n// handlers into these attrs and would run them before the caller's. Radix\n// composes them the other way (composeEventHandlers): the caller's handler\n// runs first, and Radix skips its own once the event is default-prevented.\n// So the caller's listeners for the `composed` events arrive separately in\n// `listeners` and are composed that way here.\nconst RovingElement = defineComponent({\n name: \"TabsRovingElement\",\n inheritAttrs: false,\n props: {\n as: { type: String, required: true },\n elementRef: Object as PropType<Ref<HTMLElement | null>>,\n /** Events whose Reka handler Radix composes after the caller's */\n composed: { type: Array as PropType<string[]>, required: true },\n /** The caller's listeners for the `composed` events */\n listeners: { type: Object as PropType<Record<string, unknown>>, default: () => ({}) },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const handlers: Record<string, (event: Event) => void> = {}\n for (const key of props.composed) {\n const caller = props.listeners[key]\n const internal = attrs[key]\n handlers[key] = (event: Event) => {\n callCallerHandlers(caller, event)\n if (!isPrevented(event)) callHandlers(internal, event)\n }\n }\n return h(props.as, { ...attrs, ...handlers, ref: props.elementRef }, slots.default?.())\n }\n },\n})\n\n/** Splits the caller's listeners for `keys` from the other attributes. */\nconst splitListeners = (attrs: Record<string, unknown>, keys: string[]) => {\n const listeners: Record<string, unknown> = {}\n const rest: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(attrs)) {\n if (keys.includes(key)) listeners[key] = value\n else rest[key] = value\n }\n return { listeners, rest }\n}\n\n// Radix RovingFocusGroup composes mousedown, focus and blur; its items\n// mousedown and focus (keydown too, which Reka already leaves to the caller)\nconst GROUP_COMPOSED = [\"onMousedown\", \"onFocus\", \"onBlur\"]\nconst ITEM_COMPOSED = [\"onMousedown\", \"onFocus\"]\n\nconst tabsProps = {\n /** Controlled value for the group. Bind with `v-model:value`; leave unset for an uncontrolled group. */\n value: String,\n /**\n * Visual variant of the tab group\n * - `\"segmented\"`: background container with sliding highlight (default)\n * - `\"underline\"`: no background, animated line indicator under active tab\n * @default \"segmented\"\n */\n variant: { type: String as PropType<TabsVariant>, default: \"segmented\" },\n /** Orientation of the tab layout. @default \"horizontal\" */\n orientation: { type: String as PropType<TabsOrientation>, default: \"horizontal\" },\n /** Controls the size of the tabs, `3xs` (22px) to `3xl` (48px). @default \"md\" */\n size: { type: String as PropType<ControlSize>, default: \"md\" },\n /** Controls gutter on the edges of the tabs, defaults to value from `size`. */\n gutterSize: String as PropType<Sizes<\"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\">>,\n /** Disable the entire group. @default false */\n disabled: { type: Boolean, default: false },\n /** Display the control as a block element with equal width segments. @default false */\n block: { type: Boolean, default: false },\n /** Fully rounded pill shape. Only applies to the `\"segmented\"` variant. @default true */\n pill: { type: Boolean, default: true },\n /**\n * Flush underline style: no tab padding, so the indicator matches the text\n * width, gap spacing and no bottom border. Only applies to the `\"underline\"` variant.\n * @default false\n */\n flush: { type: Boolean, default: false },\n}\n\nconst tabsEmits = {\n /** A new value was selected (`v-model:value`) */\n \"update:value\": (_value: string) => true,\n /** Same payload as `update:value`, named after React's `onChange` */\n \"change\": (_value: string) => true,\n /** Any click on the control, even if a new value was not selected */\n \"click\": (_event: MouseEvent) => true,\n}\n\n// The group itself. `Tabs` renders it as it is, or measures and splits it\n// for `overflow=\"menu\"`\nconst TabsComponent = defineComponent({\n name: \"TabsRoot\",\n inheritAttrs: false,\n props: tabsProps,\n emits: tabsEmits,\n setup(props, { slots, attrs, emit }) {\n const rootRef = ref<HTMLDivElement | null>(null)\n const thumbRef = ref<HTMLDivElement | null>(null)\n const groupRef = ref<ExposedRovingFocusGroup | null>(null)\n let prevSize = props.size\n\n // Radix useControllableState: `value` undefined means uncontrolled, starting empty\n const uncontrolledValue = ref(\"\")\n const currentValue = computed(() => (props.value !== undefined ? props.value : uncontrolledValue.value))\n\n const handleValueChange = (nextValue: string) => {\n // Only trigger onChange when a value exists\n // Disallow toggling off enabled items\n if (nextValue) {\n emit(\"update:value\", nextValue)\n emit(\"change\", nextValue)\n }\n }\n\n const setValue = (nextValue: string) => {\n if (props.value !== undefined) {\n if (nextValue !== props.value) handleValueChange(nextValue)\n } else {\n uncontrolledValue.value = nextValue\n }\n }\n\n // Radix reports uncontrolled changes from an effect, after the click has\n // finished bubbling (so the group's `click` comes first)\n watch(uncontrolledValue, handleValueChange, { flush: \"post\" })\n\n provide(TabsContextKey, {\n value: currentValue,\n disabled: computed(() => props.disabled),\n setValue,\n })\n\n const applyThumbSizing = (isVertical: boolean, attemptScroll: boolean) => {\n const root = rootRef.value\n const thumb = thumbRef.value\n\n if (!root || !thumb) {\n return\n }\n\n // Get selected node\n const activeNode = root.querySelector<HTMLDivElement>('[data-state=\"on\"]')\n\n // Impossible\n if (!activeNode) {\n return\n }\n\n if (isVertical) {\n const rootHeight = root.clientHeight\n let targetHeight = Math.floor(activeNode.clientHeight)\n const targetOffset = activeNode.offsetTop\n\n // Detect subpixel edge case\n if (rootHeight - (targetHeight + targetOffset) < 2) {\n targetHeight = targetHeight - 1\n }\n\n thumb.style.height = `${Math.floor(targetHeight)}px`\n thumb.style.width = \"\"\n thumb.style.transform = `translateY(${targetOffset}px)`\n\n // Scroll into view if needed\n if (root.scrollHeight > rootHeight) {\n const buffer = rootHeight * 0.15\n const scrollTop = root.scrollTop\n const top = activeNode.offsetTop\n const bottom = top + targetHeight\n if (top < scrollTop + buffer || bottom > scrollTop + rootHeight - buffer) {\n if (attemptScroll) {\n activeNode.scrollIntoView({ block: \"center\", inline: \"nearest\", behavior: \"smooth\" })\n }\n }\n }\n } else {\n const rootWidth = root.clientWidth\n let targetWidth = Math.floor(activeNode.clientWidth)\n const targetOffset = activeNode.offsetLeft\n\n // Detect if the thumb is moving too far to the edge of the container.\n // This would most commonly be due to subpixel widths adding up to excessive distance.\n if (rootWidth - (targetWidth + targetOffset) < 2) {\n targetWidth = targetWidth - 1\n }\n\n thumb.style.width = `${Math.floor(targetWidth)}px`\n thumb.style.height = \"\"\n thumb.style.transform = `translateX(${targetOffset}px)`\n\n // If the control is scrollable, ensure the active option is visible\n if (root.scrollWidth > rootWidth) {\n // Only scroll items near the edge, but not the inner 2/3.\n const buffer = rootWidth * 0.15\n const scrollLeft = root.scrollLeft\n const left = activeNode.offsetLeft\n const right = left + targetWidth\n if (left < scrollLeft + buffer || right > scrollLeft + rootWidth - buffer) {\n // Cheap trick to avoid unintentional scroll on mount - transition is set after mounting\n if (attemptScroll) {\n activeNode.scrollIntoView({ block: \"nearest\", inline: \"center\", behavior: \"smooth\" })\n }\n }\n }\n }\n }\n\n // React's useLayoutEffect on [value, size, gutterSize, pill, flush, isVertical].\n // `value` is the prop, so an uncontrolled selection does not move the thumb\n // until the next resize, exactly as in React.\n const syncThumb = () => {\n const root = rootRef.value\n const thumb = thumbRef.value\n\n if (!root || !thumb) {\n return\n }\n\n const isVertical = props.orientation === \"vertical\"\n const transitionProperty = isVertical\n ? \"height 200ms var(--cubic-enter), transform 200ms var(--cubic-enter)\"\n : \"width 200ms var(--cubic-enter), transform 200ms var(--cubic-enter)\"\n\n const sizeChanged = prevSize !== props.size\n prevSize = props.size\n\n if (sizeChanged) {\n // Size changed - disable transition, wait for CSS, then apply sizing\n const currentTransition = thumb.style.transition\n thumb.style.transition = \"\"\n\n waitForAnimationFrame(() => {\n applyThumbSizing(isVertical, false)\n waitForAnimationFrame(() => {\n thumb.style.transition = currentTransition\n })\n })\n } else if (thumb.style.transition) {\n // Normal update (value change, etc.): the thumb leaves with the label's colour\n applyThumbSizing(isVertical, true)\n } else {\n // First measure: apply transition after initial calculation is set\n waitForAnimationFrame(() => {\n applyThumbSizing(isVertical, false)\n waitForAnimationFrame(() => {\n thumb.style.transition = transitionProperty\n })\n })\n }\n }\n\n watch(\n [\n () => props.value,\n () => props.size,\n () => props.gutterSize,\n () => props.pill,\n () => props.flush,\n () => props.orientation === \"vertical\",\n ],\n syncThumb,\n { flush: \"post\" },\n )\n\n let observer: ResizeObserver | undefined\n\n onMounted(() => {\n syncThumb()\n\n // usehooks-ts useResizeObserver: only fires when the content box changed\n const root = rootRef.value\n if (!root || 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\n const thumb = thumbRef.value\n if (!thumb) {\n return\n }\n\n // Perform the size update instantly\n const currentTransition = thumb.style.transition\n thumb.style.transition = \"\"\n applyThumbSizing(props.orientation === \"vertical\", false)\n thumb.style.transition = currentTransition\n })\n observer.observe(root, { box: \"content-box\" })\n })\n\n // Tabs added, removed, reordered or relabelled move the active tab without\n // resizing the group: measure again, instantly, like a resize\n let mutationObserver: MutationObserver | undefined\n onMounted(() => {\n const root = rootRef.value\n if (!root || typeof MutationObserver === \"undefined\") return\n mutationObserver = new MutationObserver(() => {\n const thumb = thumbRef.value\n if (!thumb) return\n const currentTransition = thumb.style.transition\n thumb.style.transition = \"\"\n applyThumbSizing(props.orientation === \"vertical\", false)\n thumb.style.transition = currentTransition\n })\n mutationObserver.observe(root, { childList: true, characterData: true, subtree: true })\n })\n\n onBeforeUnmount(() => {\n observer?.disconnect()\n mutationObserver?.disconnect()\n })\n\n // Radix moves focus into the group onto the selected tab, then the last\n // focused one, then the first. Reka looks for a `data-active` attribute\n // that Radix does not render, so its entry focus is replaced here.\n const handleEntryFocus = (event: Event) => {\n event.preventDefault()\n const items = (groupRef.value?.getItems() ?? []).map((item) => item.ref)\n const activeItem = items.find((item) => item.getAttribute(\"data-state\") === \"on\")\n const currentItem = items.find((item) => item.getAttribute(\"tabindex\") === \"0\")\n focusFirst([activeItem, currentItem, ...items].filter((item): item is HTMLElement => !!item))\n }\n\n return () => {\n const { class: className, dir, ...otherAttrs } = attrs\n const { listeners, rest: restAttrs } = splitListeners(otherAttrs, GROUP_COMPOSED)\n // Only apply pill for segmented variant\n const isPill = props.variant === \"segmented\" && props.pill\n // Only apply flush for underline variant\n const isFlush = props.variant === \"underline\" && props.flush\n\n return h(\n RovingFocusGroup,\n {\n ref: groupRef,\n asChild: true,\n loop: false,\n dir: dir as \"ltr\" | \"rtl\" | undefined,\n onEntryFocus: handleEntryFocus,\n },\n {\n default: () =>\n h(\n RovingElement,\n {\n \"as\": \"div\",\n \"elementRef\": rootRef,\n \"composed\": GROUP_COMPOSED,\n \"listeners\": listeners,\n \"class\": [s.Tabs, className],\n // `dir` comes from RovingFocusGroup (\"ltr\" unless set), like Radix\n // Radix ToggleGroup type=\"single\" (radix-ui 1.8) is a radiogroup\n \"role\": \"radiogroup\",\n \"onClick\": (event: MouseEvent) => emit(\"click\", event),\n \"data-variant\": props.variant,\n \"data-orientation\": props.orientation,\n \"data-block\": props.block ? \"\" : undefined,\n \"data-pill\": isPill ? \"\" : undefined,\n \"data-flush\": isFlush ? \"\" : undefined,\n \"data-size\": props.size,\n \"data-gutter-size\": props.gutterSize,\n ...restAttrs,\n },\n { default: () => [h(\"div\", { class: s.TabsThumb, ref: thumbRef }), slots.default?.()] },\n ),\n },\n )\n }\n },\n})\n\n\nconst useTabsContext = () => {\n const context = inject(TabsContextKey, null)\n\n if (!context) {\n throw new Error(\"`TabsTab` must be used within `Tabs`\")\n }\n\n return context\n}\n\nconst hasContent = (nodes: VNode[] | undefined): nodes is VNode[] =>\n !!nodes?.some((node) => {\n if (!isVNode(node)) return node != null && typeof node !== \"boolean\" && String(node) !== \"\"\n if (node.type === Comment) return false\n if (node.type === Text) return String(node.children ?? \"\") !== \"\"\n if (Array.isArray(node.children) && typeof node.type === \"symbol\") return hasContent(node.children as VNode[])\n return true\n })\n\nconst isBadgeObject = (badge: TabsBadgeProp | undefined): badge is Extract<TabsBadgeProp, { content: unknown }> =>\n badge != null && typeof badge === \"object\" && \"content\" in badge\n\nconst renderIcon = (icon: TabsIconProp | undefined) => {\n if (icon == null || typeof icon === \"string\" || isVNode(icon)) return icon\n return h(icon)\n}\n\nconst TabComponent = defineComponent({\n name: \"TabsTab\",\n inheritAttrs: false,\n props: {\n /** Tab value */\n value: { type: String, required: true },\n /** Icon before the text content: a component, a vnode or text. The `icon` slot takes precedence. */\n icon: [String, Object, Function] as PropType<TabsIconProp>,\n /**\n * Badge after the text content: a plain value, or an object with\n * `content`, `color`, `variant`, `pill` and `loading`. The `badge` slot\n * replaces the content and keeps the object's styling.\n */\n badge: { type: [String, Number, Object] as PropType<TabsBadgeProp>, default: undefined },\n /** Disable the individual tab */\n disabled: { type: Boolean, default: undefined },\n },\n setup(props, { slots, attrs }) {\n const context = useTabsContext()\n\n return () => {\n const disabled = context.disabled.value || !!props.disabled\n const selected = context.value.value\n const pressed = !!selected && selected === props.value\n const { onClick, ...otherAttrs } = attrs\n const { listeners, rest: restAttrs } = splitListeners(otherAttrs, ITEM_COMPOSED)\n\n // Normalize badge prop; the slot replaces its content\n const badgeSlot = slots.badge?.()\n const badgeObject = isBadgeObject(props.badge) ? props.badge : undefined\n const badgeProps = hasContent(badgeSlot)\n ? { ...badgeObject, content: badgeSlot }\n : props.badge != null\n ? (badgeObject ?? { content: props.badge as TabsContent })\n : null\n\n const children = slots.default?.()\n const iconSlot = slots.icon?.()\n\n // Radix Toggle: the caller's click handler runs first and can cancel the toggle\n const handleClick = (event: MouseEvent) => {\n // React does not dispatch mouse handlers on a disabled button\n if (disabled) return\n callHandlers(onClick, event)\n if (event.defaultPrevented) return\n context.setValue(pressed ? \"\" : props.value)\n }\n\n return h(\n RovingFocusItem,\n { asChild: true, focusable: !disabled, active: pressed },\n {\n default: () =>\n h(\n RovingElement,\n {\n \"as\": \"button\",\n \"composed\": ITEM_COMPOSED,\n \"listeners\": listeners,\n // Radix Toggle defaults, then the single-select radio semantics\n \"type\": \"button\",\n \"data-state\": pressed ? \"on\" : \"off\",\n \"data-disabled\": disabled ? \"\" : undefined,\n \"role\": \"radio\",\n \"aria-checked\": pressed,\n // Reka's RovingFocusItem marks the active item; Radix does not\n \"data-active\": undefined,\n // Caller attributes win, as React spreads them after `className`\n \"class\": s.Tab,\n ...restAttrs,\n \"disabled\": disabled,\n \"onPointerenter\": handlePressableMouseEnter,\n \"onClick\": handleClick,\n },\n {\n default: () => [\n h(\"span\", { class: s.TabContent }, [\n hasContent(iconSlot) ? iconSlot : renderIcon(props.icon),\n hasContent(children) ? h(\"span\", null, children) : null,\n badgeProps\n ? h(\n \"span\",\n {\n \"class\": s.TabBadge,\n \"data-color\": badgeProps.color ?? \"secondary\",\n \"data-variant\": badgeProps.variant ?? \"soft\",\n \"data-pill\": badgeProps.pill ? \"\" : undefined,\n },\n badgeProps.loading ? [h(LoadingIndicator)] : [badgeProps.content as VNodeArrayChildren[number]],\n )\n : null,\n ]),\n ],\n },\n ),\n },\n )\n }\n },\n})\n\ntype TabOwnProps = InstanceType<typeof TabComponent>[\"$props\"]\n\n/** TabsTab props; other attributes (`aria-label`, ...) fall through to the button. */\nexport type TabProps = TabOwnProps & { \"aria-label\"?: string }\n\nexport const TabsTab = TabComponent as typeof TabComponent & { new (): { $props: TabProps } }\n\n/** Backward-compat alias of `TabsTab`, like React's `Tabs.Option` */\nexport const TabsOption: typeof TabsTab = TabsTab\n\n// ---------------------------------------------------------------------------\n// overflow=\"menu\" (React's OverflowTabs)\n\n/** Value of the menu button; no real tab has it */\nconst MORE_VALUE = \"__plexui_tabs_more__\"\n\ntype Slots = Record<string, ((...args: unknown[]) => VNodeArrayChildren) | undefined>\n\n/** The TabsTab vnodes of a default slot, through fragments (`v-for`, `<template>`) */\nconst tabVNodes = (nodes: VNodeArrayChildren | undefined): VNode[] =>\n (nodes ?? []).flatMap((node) => {\n if (!isVNode(node)) return []\n if (node.type === Fragment && Array.isArray(node.children)) return tabVNodes(node.children as VNodeArrayChildren)\n return node.type === TabComponent ? [node] : []\n })\n\nconst slotsOf = (node: VNode) => (node.children && typeof node.children === \"object\" && !Array.isArray(node.children) ? (node.children as Slots) : {})\n\n/** A tab's slot content; a vnode's raw slot may return a string or nothing */\nconst slotContent = (node: VNode, name: string): VNodeArrayChildren => {\n const content = slotsOf(node)[name]?.() as VNodeArrayChildren | VNodeArrayChildren[number] | undefined\n if (content == null) return []\n return Array.isArray(content) ? content : [content]\n}\n\nconst labelContent = (node: VNode) => slotContent(node, \"default\")\n\nconst plainText = (node: unknown): string => {\n if (typeof node === \"string\" || typeof node === \"number\") return String(node)\n if (Array.isArray(node)) return node.map(plainText).join(\"\")\n if (isVNode(node)) {\n if (node.type === Comment) return \"\"\n if (typeof node.children === \"string\") return node.children\n if (Array.isArray(node.children)) return plainText(node.children)\n return plainText(labelContent(node))\n }\n return \"\"\n}\n\nconst tabProps = (node: VNode) => (node.props ?? {}) as Record<string, unknown>\n\n/** Slot content that renders something: text, or a vnode other than a comment */\nconst filled = (nodes: VNodeArrayChildren) =>\n plainText(nodes) !== \"\" || nodes.some((node) => isVNode(node) && node.type !== Comment)\n\nconst badgeText = (badge: unknown) => (isBadgeObject(badge as TabsBadgeProp) ? plainText((badge as { content: unknown }).content) : plainText(badge))\n\n/** A tab's icon: the `icon` slot, else the prop */\nconst tabIcon = (node: VNode) => {\n const iconSlot = slotContent(node, \"icon\")\n return filled(iconSlot) ? iconSlot : renderIcon(tabProps(node).icon as TabsIconProp | undefined)\n}\n\n/** A tab's count as text: the `badge` slot, else the prop */\nconst tabCount = (node: VNode) => plainText(slotContent(node, \"badge\")) || badgeText(tabProps(node).badge)\n\n/** A raw vnode prop holds a boolean attribute as written: `<TabsTab disabled>` is \"\" */\nconst tabDisabled = (node: VNode) => {\n const disabled = tabProps(node).disabled\n return disabled != null && disabled !== false\n}\n\n/** A tab's name: its text, else its accessible name, else its value */\nconst tabLabel = (node: VNode) =>\n plainText(labelContent(node)) || (tabProps(node)[\"aria-label\"] as string | undefined) || String(tabProps(node).value)\n\n/** What a tab's width depends on: the strip measures again when it changes */\nconst tabsSignature = (nodes: VNode[]) =>\n nodes\n .map((node) =>\n [\n tabProps(node).value,\n plainText(labelContent(node)),\n tabCount(node),\n tabProps(node).icon != null || slotsOf(node).icon != null,\n ].join(\"\\u0000\"),\n )\n .join(\"\\u0001\")\n\n/**\n * MenuTrigger sets `data-state` (open or closed) on its child, while a tab\n * keeps `on` or `off` in the same attribute and the thumb finds the active tab\n * by it. The menu's value does not reach the tab; its handlers and\n * `aria-haspopup` / `aria-expanded` do.\n */\nconst MoreTab = defineComponent({\n name: \"TabsMoreTab\",\n inheritAttrs: false,\n setup(_props, { attrs, slots }) {\n return () => {\n const { \"data-state\": _menuState, ...rest } = attrs\n return h(TabComponent, rest as TabProps, slots)\n }\n },\n})\n\nconst TabsPublic = defineComponent({\n name: \"Tabs\",\n inheritAttrs: false,\n props: {\n ...tabsProps,\n /**\n * What happens to tabs that do not fit in one row: the strip scrolls\n * sideways (`scroll`), or they move into a menu at its end (`menu`). The\n * menu button shows the active tab's name when it is a hidden one.\n * Horizontal tabs without `block` only.\n * @default \"scroll\"\n */\n overflow: { type: String as PropType<\"scroll\" | \"menu\">, default: \"scroll\" },\n /** Text of the menu button with `overflow=\"menu\"`. @default \"More\" */\n overflowLabel: { type: String, default: \"More\" },\n },\n emits: tabsEmits,\n setup(props, { slots, attrs, emit }) {\n const hostRef = ref<HTMLDivElement | null>(null)\n // Uncontrolled like the group: `value` unset starts empty\n const uncontrolledValue = ref(\"\")\n const current = computed(() => (props.value !== undefined ? props.value : uncontrolledValue.value))\n const select = (next: string) => {\n if (props.value === undefined) uncontrolledValue.value = next\n emit(\"update:value\", next)\n emit(\"change\", next)\n }\n\n // { count: null } while the measuring pass renders every tab and the\n // menu button; a new object each time, so an unchanged count still renders\n const measured = shallowRef<{ count: number | null }>({ count: null })\n let measuredSignature = \"\"\n let measuredActive = -1\n let lastRender = { measuring: true, signature: \"\", activeIndex: -1, length: 0 }\n let boxWidth = -1\n\n const measure = () => {\n if (!lastRender.measuring) return\n const root = hostRef.value?.firstElementChild\n if (!(root instanceof HTMLElement)) return\n\n const buttons = Array.from(root.querySelectorAll<HTMLElement>(\":scope > button\"))\n if (buttons.length !== lastRender.length + 1) return\n\n const widths = buttons.map((button) => button.getBoundingClientRect().width)\n const moreButton = buttons[buttons.length - 1]\n const moreWidth = widths.pop() ?? 0\n const style = getComputedStyle(root)\n const available =\n root.getBoundingClientRect().width -\n (Number.parseFloat(style.paddingLeft) || 0) -\n (Number.parseFloat(style.paddingRight) || 0)\n const gap = Number.parseFloat(style.columnGap) || 0\n boxWidth = hostRef.value?.parentElement?.clientWidth ?? -1\n measuredSignature = lastRender.signature\n measuredActive = lastRender.activeIndex\n\n if (available <= 0) {\n measured.value = { count: lastRender.length }\n return\n }\n\n const { activeIndex } = lastRender\n const chevron = moreButton?.querySelector(\"svg\")\n const chevronWidth = chevron?.getBoundingClientRect().width ?? 0\n const labelGap = chevron?.parentElement ? Number.parseFloat(getComputedStyle(chevron.parentElement).columnGap) || 0 : 0\n const activeWidth = activeIndex < 0 ? 0 : (widths[activeIndex] ?? 0) + chevronWidth + labelGap\n measured.value = { count: visibleTabCount(widths, moreWidth, activeWidth, activeIndex, gap, available) }\n }\n\n // The width to fit is the container's; reports during a measuring pass\n // are skipped. The menu strip may appear or go after mount, with `overflow`\n let observer: ResizeObserver | undefined\n let observed: HTMLElement | null = null\n const observeBox = () => {\n const box = hostRef.value?.parentElement ?? null\n if (box === observed) return\n observer?.disconnect()\n observer = undefined\n observed = box\n if (!box || typeof ResizeObserver === \"undefined\") return\n observer = new ResizeObserver(() => {\n if (lastRender.measuring) return\n const width = box.clientWidth\n if (width === boxWidth) return\n boxWidth = width\n measured.value = { count: null }\n })\n observer.observe(box)\n }\n onMounted(() => {\n measure()\n observeBox()\n })\n onUpdated(() => {\n measure()\n observeBox()\n })\n onBeforeUnmount(() => observer?.disconnect())\n\n const forward = {\n \"onUpdate:value\": (value: string) => emit(\"update:value\", value),\n \"onChange\": (value: string) => emit(\"change\", value),\n \"onClick\": (event: MouseEvent) => emit(\"click\", event),\n }\n\n return () => {\n const { overflow, overflowLabel, ...rootProps } = props\n if (overflow !== \"menu\" || props.block || props.orientation === \"vertical\") {\n return h(TabsComponent, { ...rootProps, ...attrs, ...forward }, slots)\n }\n\n const items = tabVNodes(slots.default?.() as VNodeArrayChildren | undefined)\n // The strip's own props size the tabs and the menu button too\n const signature = [overflowLabel, props.size, props.variant, props.gutterSize, props.pill, props.flush, tabsSignature(items)].join(\n \"\\u0002\",\n )\n const activeIndex = items.findIndex((item) => tabProps(item).value === current.value)\n const { count } = measured.value\n // New tabs measure again; so does an active tab that moves under the\n // menu button or back out, since the button carries the hidden one's name\n const stale =\n count !== null &&\n (signature !== measuredSignature ||\n (activeIndex !== measuredActive && (measuredActive >= count || activeIndex >= count)))\n const measuring = count === null || stale\n lastRender = { measuring, signature, activeIndex, length: items.length }\n\n const shown = measuring ? items : items.slice(0, count)\n const hidden = measuring ? [] : items.slice(count)\n const hiddenActive = hidden.find((item) => tabProps(item).value === current.value) ?? null\n\n const strip = h(\n TabsComponent,\n {\n ...rootProps,\n ...attrs,\n \"data-overflow\": \"menu\",\n \"value\": hiddenActive ? MORE_VALUE : current.value,\n // Pressing the menu button opens the menu; it is not a tab\n \"onUpdate:value\": (next: string) => {\n if (next !== MORE_VALUE) select(next)\n },\n \"onClick\": forward.onClick,\n },\n {\n default: () => [\n ...shown,\n measuring || hidden.length > 0\n ? h(MenuTrigger, null, {\n default: () =>\n h(MoreTab, { value: MORE_VALUE }, {\n default: () => [\n h(\"span\", { class: s.OverflowLabel }, [hiddenActive ? tabLabel(hiddenActive) : overflowLabel, h(ChevronDownMd)]),\n ],\n }),\n })\n : null,\n ],\n },\n )\n\n return h(\"div\", { ref: hostRef, class: s.OverflowHost }, [\n h(Menu, null, {\n default: () => [\n strip,\n h(MenuContent, { align: \"end\", minWidth: \"auto\" }, {\n default: () =>\n h(MenuRadioGroup, { \"value\": current.value, \"onUpdate:value\": select }, {\n default: () =>\n hidden.map((item) => {\n const itemProps = tabProps(item)\n const count = tabCount(item)\n const label = labelContent(item)\n return h(\n MenuRadioItem,\n {\n key: String(itemProps.value),\n value: String(itemProps.value),\n disabled: props.disabled || tabDisabled(item),\n },\n {\n default: () => [\n tabIcon(item),\n filled(label)\n ? label\n : ((itemProps[\"aria-label\"] as string | undefined) ?? String(itemProps.value)),\n // A tab's count moves into the menu with it\n count !== \"\" ? h(\"span\", { class: s.OverflowBadge }, count) : null,\n ],\n },\n )\n }),\n }),\n }),\n ],\n }),\n ])\n }\n },\n})\n\ntype TabsOwnProps = InstanceType<typeof TabsPublic>[\"$props\"]\n\n/** Tabs props plus the attributes that fall through to the group element, as in React. */\nexport type TabsProps = TabsOwnProps & Omit<HTMLAttributes, keyof TabsOwnProps> & { \"aria-label\"?: string }\n\nexport const Tabs = TabsPublic as typeof TabsPublic & { new (): { $props: TabsProps } }\n"]}
|
|
@@ -57,6 +57,16 @@ declare const FloatingLabelInputComponent: import("vue").DefineComponent<import(
|
|
|
57
57
|
type: NumberConstructor;
|
|
58
58
|
default: number;
|
|
59
59
|
};
|
|
60
|
+
/** Where the label rests once it floats: on the border, or inside the box with the value under it (always the rounded box). @default "border" */
|
|
61
|
+
labelPlacement: {
|
|
62
|
+
type: PropType<"border" | "inside">;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
/** Pill shape. `false` takes the rounded box of the other fields. @default true */
|
|
66
|
+
pill: {
|
|
67
|
+
type: BooleanConstructor;
|
|
68
|
+
default: boolean;
|
|
69
|
+
};
|
|
60
70
|
id: StringConstructor;
|
|
61
71
|
name: StringConstructor;
|
|
62
72
|
type: {
|
|
@@ -129,6 +139,16 @@ declare const FloatingLabelInputComponent: import("vue").DefineComponent<import(
|
|
|
129
139
|
type: NumberConstructor;
|
|
130
140
|
default: number;
|
|
131
141
|
};
|
|
142
|
+
/** Where the label rests once it floats: on the border, or inside the box with the value under it (always the rounded box). @default "border" */
|
|
143
|
+
labelPlacement: {
|
|
144
|
+
type: PropType<"border" | "inside">;
|
|
145
|
+
default: string;
|
|
146
|
+
};
|
|
147
|
+
/** Pill shape. `false` takes the rounded box of the other fields. @default true */
|
|
148
|
+
pill: {
|
|
149
|
+
type: BooleanConstructor;
|
|
150
|
+
default: boolean;
|
|
151
|
+
};
|
|
132
152
|
id: StringConstructor;
|
|
133
153
|
name: StringConstructor;
|
|
134
154
|
type: {
|
|
@@ -153,12 +173,14 @@ declare const FloatingLabelInputComponent: import("vue").DefineComponent<import(
|
|
|
153
173
|
value: string | number;
|
|
154
174
|
defaultValue: string | number;
|
|
155
175
|
disabled: boolean;
|
|
176
|
+
pill: boolean;
|
|
156
177
|
readOnly: boolean;
|
|
157
178
|
readonly: boolean;
|
|
158
179
|
allowAutofillExtensions: boolean;
|
|
159
180
|
revealable: boolean;
|
|
160
181
|
multiline: boolean;
|
|
161
182
|
rows: number;
|
|
183
|
+
labelPlacement: "inside" | "border";
|
|
162
184
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
163
185
|
type FloatingLabelInputOwnProps = InstanceType<typeof FloatingLabelInputComponent>["$props"];
|
|
164
186
|
/** FloatingLabelInput props plus the native <input> attributes that fall through to it, as in React. */
|
|
@@ -43,6 +43,16 @@ export declare const FloatingLabelSelect: import("vue").DefineComponent<import("
|
|
|
43
43
|
onClearClick: PropType<() => void>;
|
|
44
44
|
/** Called on pointer down, ArrowDown, ArrowUp and Space on the field (`@interact`) */
|
|
45
45
|
onInteract: PropType<() => void>;
|
|
46
|
+
/** Where the label rests once it floats: on the border, or inside the box with the value under it (always the rounded box). @default "border" */
|
|
47
|
+
labelPlacement: {
|
|
48
|
+
type: PropType<"border" | "inside">;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
/** Pill shape. `false` takes the rounded box of the other fields. @default true */
|
|
52
|
+
pill: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
46
56
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
47
57
|
[key: string]: any;
|
|
48
58
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -77,10 +87,22 @@ export declare const FloatingLabelSelect: import("vue").DefineComponent<import("
|
|
|
77
87
|
onClearClick: PropType<() => void>;
|
|
78
88
|
/** Called on pointer down, ArrowDown, ArrowUp and Space on the field (`@interact`) */
|
|
79
89
|
onInteract: PropType<() => void>;
|
|
90
|
+
/** Where the label rests once it floats: on the border, or inside the box with the value under it (always the rounded box). @default "border" */
|
|
91
|
+
labelPlacement: {
|
|
92
|
+
type: PropType<"border" | "inside">;
|
|
93
|
+
default: string;
|
|
94
|
+
};
|
|
95
|
+
/** Pill shape. `false` takes the rounded box of the other fields. @default true */
|
|
96
|
+
pill: {
|
|
97
|
+
type: BooleanConstructor;
|
|
98
|
+
default: boolean;
|
|
99
|
+
};
|
|
80
100
|
}>> & Readonly<{}>, {
|
|
81
101
|
invalid: boolean;
|
|
82
102
|
disabled: boolean;
|
|
83
103
|
open: boolean;
|
|
104
|
+
pill: boolean;
|
|
84
105
|
selected: boolean;
|
|
106
|
+
labelPlacement: "inside" | "border";
|
|
85
107
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
86
108
|
export type FloatingLabelSelectProps = InstanceType<typeof FloatingLabelSelect>["$props"];
|