@plexui/vue 0.1.12 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/RadioGroup/RadioGroup.js +7 -3
- package/dist/es/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/es/components/Sortable/Sortable.js +90 -0
- package/dist/es/components/Sortable/Sortable.js.map +1 -0
- package/dist/es/components/Sortable/index.js +2 -0
- package/dist/es/components/Sortable/index.js.map +1 -0
- package/dist/es/components/TagInput/TagInput.js +3 -0
- package/dist/es/components/TagInput/TagInput.js.map +1 -1
- package/dist/es/components/Textarea/Textarea.js.map +1 -1
- package/dist/es/lib/sortable.js +406 -0
- package/dist/es/lib/sortable.js.map +1 -0
- package/dist/types/components/Sortable/Sortable.d.ts +94 -0
- package/dist/types/components/Sortable/index.d.ts +1 -0
- package/dist/types/components/TagInput/TagInput.d.ts +12 -1
- package/dist/types/components/Textarea/Textarea.d.ts +3 -3
- package/dist/types/lib/sortable.d.ts +9 -0
- package/package.json +1 -1
|
@@ -351,11 +351,13 @@ const RadioGroupItemComponent = defineComponent({
|
|
|
351
351
|
event.preventDefault();
|
|
352
352
|
};
|
|
353
353
|
return () => {
|
|
354
|
-
const { class: className,
|
|
354
|
+
const { "class": className,
|
|
355
|
+
// These name the radio itself: a `Field` around the item labels it through them
|
|
356
|
+
"id": idAttr, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...restAttrs } = attrs;
|
|
355
357
|
const isChecked = checked.value;
|
|
356
358
|
const isDisabled = disabled.value;
|
|
357
359
|
const state = isChecked ? "checked" : "unchecked";
|
|
358
|
-
const itemId = `${props.value}-${id}`;
|
|
360
|
+
const itemId = idAttr ?? `${props.value}-${id}`;
|
|
359
361
|
if (isFormControl.value)
|
|
360
362
|
defaultChecked ??= isChecked;
|
|
361
363
|
else
|
|
@@ -387,7 +389,9 @@ const RadioGroupItemComponent = defineComponent({
|
|
|
387
389
|
"required": props.required ? "" : undefined,
|
|
388
390
|
"id": itemId,
|
|
389
391
|
"class": s.RadioItem,
|
|
390
|
-
"aria-
|
|
392
|
+
"aria-label": ariaLabel,
|
|
393
|
+
"aria-labelledby": ariaLabelledBy,
|
|
394
|
+
"aria-describedby": [descriptionId, ariaDescribedBy].filter(Boolean).join(" ") || undefined,
|
|
391
395
|
// Reka's RovingFocusItem marks the active item; Radix does not
|
|
392
396
|
"data-active": undefined,
|
|
393
397
|
"onClick": handleClick,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../../../../src/components/RadioGroup/RadioGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,EACD,MAAM,EACN,QAAQ,EACR,eAAe,EACf,SAAS,EACT,OAAO,EACP,GAAG,EACH,UAAU,EACV,KAAK,EACL,KAAK,EACL,OAAO,GAMR,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACrE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACxF,OAAO,CAAC,MAAM,4DAA4D,CAAA;AA4B1E,MAAM,oBAAoB,GAAyC,MAAM,CAAC,kBAAkB,CAAC,CAAA;AAE7F,MAAM,oBAAoB,GAAG,GAAG,EAAE;IAChC,MAAM,OAAO,GAAG,MAAM,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAA;IAElD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAA;IAC5E,CAAC;IAED,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAID,MAAM,UAAU,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,CAAC,CAAA;AAEtE,sCAAsC;AACtC,MAAM,UAAU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AC,KAAK,IAAI,QAAQ,CAAC,EAAE,GAAG,SAAS,EAAE,EAAE;gBAC1E,aAAa;oBACX,CAAC,CAAC,0FAA0F;wBAC1F,CAAC,CACC,KAAK,EACL;4BACE,OAAO,EAAE,CAAC,CAAC,cAAc;4BACzB,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;4BAC1C,kBAAkB,EAAE,KAAK,CAAC,WAAW;yBACtC,EACD;4BACE,KAAK;4BACL,CAAC,CACC,MAAM,EACN,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,CAAC,gBAAgB,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,EAClG,WAAW,CACZ;yBACF,CACF;oBACH,CAAC,CAAC,KAAK;aACV,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAaF,MAAM,CAAC,MAAM,cAAc,GAAG,uBAE7B,CAAA;AAED;;;GAGG;AACH,+EAA+E;AAC/E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,UAAU,GAEnB,MAAM,CAAC,MAAM,CACf,mBAA2F,EAC3F,EAAE,IAAI,EAAE,cAAc,EAAE,CACzB,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n h,\n inject,\n nextTick,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n shallowRef,\n useId,\n watch,\n withCtx,\n type ComputedRef,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n} from \"vue\"\nimport { Presence, RovingFocusGroup, RovingFocusItem } from \"reka-ui\"\nimport { bubbleInputStyle, useIsFormControl, useSize } from \"../Checkbox/bubbleInput.js\"\nimport s from \"@plexui/styles/components/RadioGroup/RadioGroup.module.css\"\n\n// Vue port of packages/ui/src/components/RadioGroup/RadioGroup.tsx. Props,\n// defaults, rendered DOM and behaviour match React (checked by the parity\n// tests).\n//\n// React builds on Radix RadioGroup. Reka's RadioGroupItem renders different\n// markup (`aria-label` copied from the label, `required` and `name` on the\n// button, a visually hidden input only when a `name` is set), stops every\n// click and checks an arrow-focused radio a tick later. So the Radix group\n// and radio (state, button attributes, hidden form input, arrow-key\n// selection) are rendered here, and keyboard focus comes from Reka's\n// RovingFocusGroup and RovingFocusItem, the same roving tabindex Radix uses.\n\ntype Direction = \"col\" | \"row\"\n\ntype BubbleInputEffect = { input: Ref<HTMLInputElement | null>; run: () => void }\n\ntype RadioGroupContextValue = {\n disabled: ComputedRef<boolean>\n required: ComputedRef<boolean>\n name: ComputedRef<string | undefined>\n value: ComputedRef<string | null>\n setValue: (value: string) => void\n bubbleInputEffects: Set<BubbleInputEffect>\n runBubbleInputEffects: () => void\n}\n\nconst RadioGroupContextKey: InjectionKey<RadioGroupContextValue> = Symbol(\"PlexUIRadioGroup\")\n\nconst useRadioGroupContext = () => {\n const context = inject(RadioGroupContextKey, null)\n\n if (!context) {\n throw new Error(\"RadioGroup components must be wrapped in <RadioGroup />\")\n }\n\n return context\n}\n\ntype ExposedRovingFocusGroup = { getItems: () => { ref: HTMLElement }[] }\n\nconst ARROW_KEYS = [\"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\"]\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// The caller's listeners the group element composes with Reka's\nconst GROUP_LISTENERS = [\"onMousedown\", \"onMouseup\", \"onFocus\", \"onBlur\", \"onFocusin\", \"onFocusout\"] as const\n\n// Internal: the radiogroup element rendered through Reka's RovingFocusGroup\n// (`asChild`), with Reka's group handlers wired the Radix way:\n// - Radix runs the caller's mousedown handler first and skips its own once\n// the event is default-prevented; Reka merges its own in front.\n// - Radix's group focus and blur handlers are React `onFocus` / `onBlur`,\n// which bubble from the radios: a radio's focus ends a click focus and its\n// blur ends Shift+Tab's \"tabbing back out\" (the group is tabbable again).\n// Reka listens to the group's own native focus and blur only, so its\n// handlers run on `focusin` / `focusout` here.\n// - Reka also ends a click focus on mouseup, which Radix does not.\nconst GroupElement = defineComponent({\n name: \"RadioGroupElement\",\n inheritAttrs: false,\n props: {\n listeners: { type: Object as PropType<Record<string, unknown>>, default: () => ({}) },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { onMousedown, onMouseup: _onMouseup, onFocus, onBlur, ...restAttrs } = attrs\n const caller = props.listeners\n const handlers: Record<string, (event: Event) => void> = {\n onMousedown: (event) => {\n callHandlers(caller.onMousedown, event)\n if (!event.defaultPrevented) callHandlers(onMousedown, event)\n },\n onFocusin: (event) => {\n callHandlers(caller.onFocusin, event)\n callHandlers(onFocus, event)\n },\n onFocusout: (event) => {\n callHandlers(caller.onFocusout, event)\n callHandlers(onBlur, event)\n },\n }\n for (const key of [\"onMouseup\", \"onFocus\", \"onBlur\"] as const) {\n if (caller[key]) handlers[key] = (event) => callHandlers(caller[key], event)\n }\n return h(\"div\", { ...restAttrs, ...handlers }, slots.default?.())\n }\n },\n})\n\nconst RadioGroupComponent = defineComponent({\n name: \"RadioGroup\",\n inheritAttrs: false,\n props: {\n /** Initial selected value when uncontrolled */\n defaultValue: String,\n /** Controlled selected value. Bind with `v-model:value`; leave unset for an uncontrolled group. */\n value: { type: String, default: undefined },\n /** Name submitted with the owning form */\n name: String,\n /** Determines the layout direction of the radio items. @default \"row\" */\n direction: { type: String as PropType<Direction>, default: \"row\" },\n /** Controls whether the entire radio group is disabled. @default false */\n disabled: { type: Boolean, default: false },\n /** Marks the group as required (`aria-required`). @default false */\n required: { type: Boolean, default: false },\n },\n emits: {\n /** The selected value changed (`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 },\n setup(props, { attrs, slots, emit }) {\n const groupRef = ref<ExposedRovingFocusGroup | null>(null)\n\n // Radix useControllableState: controlled while `value` is set\n const uncontrolledValue = ref<string | null>(props.defaultValue ?? null)\n const value = computed(() => (props.value !== undefined ? props.value : uncontrolledValue.value))\n\n const reportChange = (nextValue: string) => {\n emit(\"update:value\", nextValue)\n emit(\"change\", nextValue)\n }\n\n const setValue = (nextValue: string) => {\n if (props.value !== undefined) {\n if (nextValue !== props.value) reportChange(nextValue)\n } else {\n uncontrolledValue.value = nextValue\n }\n }\n\n // Radix reports an uncontrolled change from the group's effect, which\n // React runs after the items' effects (the hidden inputs' clicks)\n watch(\n uncontrolledValue,\n (nextValue) => {\n void nextTick(() => {\n if (nextValue !== null) reportChange(nextValue)\n })\n },\n { flush: \"post\" },\n )\n\n // React runs the items' hidden-input effects in tree order; Vue's post\n // watchers run in the order they were triggered, so the first item's\n // watcher runs them all here, in document order (each is a no-op when\n // nothing changed for it)\n const bubbleInputEffects = new Set<BubbleInputEffect>()\n const runBubbleInputEffects = () => {\n const effects = [...bubbleInputEffects].sort((a, b) => {\n const first = a.input.value\n const second = b.input.value\n if (!first || !second) return 0\n return first.compareDocumentPosition(second) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1\n })\n for (const effect of effects) effect.run()\n }\n\n provide(RadioGroupContextKey, {\n disabled: computed(() => props.disabled),\n required: computed(() => props.required),\n name: computed(() => props.name),\n value,\n setValue,\n bubbleInputEffects,\n runBubbleInputEffects,\n })\n\n // Radix: a reset of the group's form sets the value it first rendered\n const initialValue = value.value\n onMounted(() => {\n const element = (groupRef.value as { $el?: unknown } | null)?.$el\n const form = element instanceof Element ? element.closest(\"form\") : null\n if (!form) return\n const reset = () => {\n if (initialValue !== null) setValue(initialValue)\n }\n form.addEventListener(\"reset\", reset)\n onBeforeUnmount(() => form.removeEventListener(\"reset\", reset))\n })\n\n // Radix moves focus into the group onto the checked radio, 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() ?? [])\n .map((item) => item.ref)\n .filter((item) => !item.hasAttribute(\"data-disabled\"))\n const activeItem = items.find((item) => item.getAttribute(\"data-state\") === \"checked\")\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: Record<string, unknown> = {}\n const restAttrs: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(otherAttrs)) {\n if ((GROUP_LISTENERS as readonly string[]).includes(key)) listeners[key] = value\n else restAttrs[key] = value\n }\n\n return h(\n RovingFocusGroup,\n {\n ref: groupRef,\n asChild: true,\n loop: true,\n dir: dir as \"ltr\" | \"rtl\" | undefined,\n onEntryFocus: handleEntryFocus,\n },\n {\n default: () =>\n h(\n GroupElement,\n {\n // `dir`, `tabindex` and `style=\"outline: none\"` come from RovingFocusGroup, like Radix\n \"listeners\": listeners,\n \"role\": \"radiogroup\",\n \"aria-required\": props.required,\n \"data-disabled\": props.disabled ? \"\" : undefined,\n \"class\": [s.RadioGroup, className],\n \"data-direction\": props.direction,\n ...restAttrs,\n },\n { default: () => slots.default?.() },\n ),\n },\n )\n }\n },\n})\n\n// React's value tracker per hidden input: its `checked` on mount, then the\n// one React last saw in a click that reached its root (also when a handler\n// stopped it from bubbling further). The native setter Radix uses bypasses it.\nconst trackedChecked = new WeakMap<HTMLInputElement, boolean>()\n\nconst useCheckedTracker = (input: Ref<HTMLInputElement | null>) =>\n watch(\n input,\n (el) => {\n if (!el || trackedChecked.has(el)) return\n // React creates the input by setting its `checked` property, so later\n // changes of the `checked` attribute never move its checkedness\n el.checked = el.checked\n trackedChecked.set(el, el.checked)\n },\n { flush: \"sync\" },\n )\n\n/**\n * Radix's RadioBubbleInput effect: sets the hidden radio's `checked` through\n * the native setter (unless `checked` is undefined) and dispatches a bubbling\n * `click`, which the input stops when `stop` is set, so form listeners see\n * the user's radio only. React turns that click into the form's `onChange`\n * when the input's `checked` differs from its value tracker, then refreshes\n * the trackers of the other radios with the same name in the same form;\n * Vue's form listeners are native, so a native `change` follows in those\n * cases.\n */\nconst dispatchBubbleClick = (input: HTMLInputElement, checked: boolean | undefined, stop: boolean) => {\n const setChecked = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, \"checked\")?.set\n if (!setChecked) return\n if (checked !== undefined) setChecked.call(input, checked)\n const click = new Event(\"click\", { bubbles: true })\n if (stop) input.addEventListener(\"click\", (event) => event.stopPropagation(), { once: true })\n input.dispatchEvent(click)\n if (trackedChecked.get(input) === input.checked) return\n trackedChecked.set(input, input.checked)\n input.dispatchEvent(new Event(\"change\", { bubbles: true }))\n\n const name = input.getAttribute(\"name\")\n if (name === null) return\n for (const other of Array.from(input.ownerDocument.querySelectorAll<HTMLInputElement>('input[type=\"radio\"]'))) {\n if (other !== input && other.getAttribute(\"name\") === name && other.form === input.form && trackedChecked.has(other)) {\n trackedChecked.set(other, other.checked)\n }\n }\n}\n\nconst RadioGroupItemComponent = defineComponent({\n name: \"RadioGroupItem\",\n inheritAttrs: false,\n props: {\n /** Value of this option */\n value: { type: String, required: true },\n /** Determines if a given radio item is disabled. @default false */\n disabled: { type: Boolean, default: false },\n /** Sets `required` on this item's radio button (the hidden form input follows the group's) */\n required: { type: Boolean, default: undefined },\n /** Stretches the item to fill the available width. @default false */\n block: { type: Boolean, default: false },\n /** The orientation of the radio indicator relative to the label. @default \"left\" */\n orientation: { type: String as PropType<\"left\" | \"right\">, default: \"left\" },\n /** Optional second line below the option's label, linked via `aria-describedby` (or the `description` slot) */\n description: String,\n },\n setup(props, { attrs, slots }) {\n const context = useRadioGroupContext()\n const id = useId()\n const wrapper = ref<HTMLDivElement | null>(null)\n const button = ref<HTMLButtonElement | null>(null)\n const bubbleInput = ref<HTMLInputElement | null>(null)\n\n const disabled = computed(() => context.disabled.value || props.disabled)\n const checked = computed(() => context.value.value === props.value)\n\n // Radix's Radio: the hidden input renders until the button mounts, then only inside a form\n const isFormControl = useIsFormControl(button, () => undefined)\n const controlSize = useSize(() => (isFormControl.value ? button.value : null))\n useCheckedTracker(bubbleInput)\n\n // Radix RadioGroupItem: an arrow key that moves focus onto a radio checks it\n let isArrowKeyPressed = false\n const handleDocumentKeyDown = (event: KeyboardEvent) => {\n if (ARROW_KEYS.includes(event.key)) isArrowKeyPressed = true\n }\n const handleDocumentKeyUp = () => {\n isArrowKeyPressed = false\n }\n\n onMounted(() => {\n button.value = (wrapper.value?.firstElementChild as HTMLButtonElement | null) ?? null\n document.addEventListener(\"keydown\", handleDocumentKeyDown)\n document.addEventListener(\"keyup\", handleDocumentKeyUp)\n })\n\n onBeforeUnmount(() => {\n document.removeEventListener(\"keydown\", handleDocumentKeyDown)\n document.removeEventListener(\"keyup\", handleDocumentKeyUp)\n })\n\n // Radix's RadioBubbleInput effect: the radio the user clicked reports its\n // click (also when the value did not change); a radio whose `checked`\n // changed otherwise reports it with a click that stops at the input\n type UserClick = { hasConsumerStoppedPropagation: boolean }\n const userClick = shallowRef<UserClick | null>(null)\n let prevChecked = checked.value\n let handledUserClick: UserClick | null = null\n const bubbleInputEffect: BubbleInputEffect = {\n input: bubbleInput,\n run: () => {\n const input = bubbleInput.value\n if (!input) return\n const isChecked = checked.value\n const checkedChanged = prevChecked !== isChecked\n prevChecked = isChecked\n const isNewUserClick = userClick.value !== null && userClick.value !== handledUserClick\n handledUserClick = userClick.value\n if (isNewUserClick) dispatchBubbleClick(input, checkedChanged ? isChecked : undefined, false)\n else if (checkedChanged) dispatchBubbleClick(input, isChecked, true)\n },\n }\n context.bubbleInputEffects.add(bubbleInputEffect)\n onBeforeUnmount(() => context.bubbleInputEffects.delete(bubbleInputEffect))\n watch([bubbleInput, checked, userClick], context.runBubbleInputEffects, { flush: \"post\" })\n\n // Radix's RadioBubbleInput renders `defaultChecked` from its first render\n let defaultChecked: boolean | undefined\n\n const handleClick = (event: MouseEvent) => {\n // React does not dispatch mouse handlers on a disabled button\n if (disabled.value) return\n if (!checked.value) {\n // Plex passes no click handler a consumer could stop\n userClick.value = { hasConsumerStoppedPropagation: false }\n context.setValue(props.value)\n }\n // In a form, the button's click stops here; the hidden input's click\n // bubbles instead (Plex passes no click handler a consumer could stop)\n if (isFormControl.value) event.stopPropagation()\n }\n\n const handleKeyDown = (event: KeyboardEvent) => {\n // According to WAI ARIA, radio groups don't activate items on enter keypress\n if (event.key === \"Enter\") event.preventDefault()\n }\n\n const handleFocus = (event: FocusEvent) => {\n // Roving focus moved here with an arrow key: check this radio by clicking it\n if (isArrowKeyPressed) (event.currentTarget as HTMLButtonElement).click()\n }\n\n // Prevents text selection when double-clicking the label\n const handleLabelMouseDown = (event: MouseEvent) => {\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault()\n }\n\n return () => {\n const { class: className, ...restAttrs } = attrs\n const isChecked = checked.value\n const isDisabled = disabled.value\n const state = isChecked ? \"checked\" : \"unchecked\"\n const itemId = `${props.value}-${id}`\n if (isFormControl.value) defaultChecked ??= isChecked\n else defaultChecked = undefined\n\n // Providing an extra wrapper enables `label` to be inline-flex, avoiding clickable whitespace\n // when radio options are of varied lengths.\n // NOTE: Important that this is `flex` to prevent the `inline-flex` label from extra, unintentional whitespace.\n const description = slots.description ? slots.description() : props.description\n const descriptionId = slots.description || props.description ? `${itemId}-description` : undefined\n const label = h(\n \"label\",\n {\n \"for\": itemId,\n \"class\": [s.RadioLabel, className],\n \"data-disabled\": isDisabled ? \"\" : undefined,\n \"data-block\": props.block ? \"\" : undefined,\n \"data-orientation\": props.orientation,\n \"onMousedown\": handleLabelMouseDown,\n },\n [\n h(\"div\", { class: s.RadioIndicatorWrapper, ref: wrapper }, [\n h(\n RovingFocusItem,\n { asChild: true, focusable: !isDisabled, active: isChecked },\n {\n default: () =>\n h(\n \"button\",\n {\n \"type\": \"button\",\n \"role\": \"radio\",\n \"aria-checked\": isChecked,\n \"data-state\": state,\n \"data-disabled\": isDisabled ? \"\" : undefined,\n \"disabled\": isDisabled,\n \"value\": props.value,\n // radix-ui 1.8: the item's own `required` lands on its button\n \"required\": props.required ? \"\" : undefined,\n \"id\": itemId,\n \"class\": s.RadioItem,\n \"aria-describedby\": descriptionId,\n // Reka's RovingFocusItem marks the active item; Radix does not\n \"data-active\": undefined,\n \"onClick\": handleClick,\n \"onKeydown\": handleKeyDown,\n \"onFocus\": handleFocus,\n },\n [\n h(\n Presence,\n { present: isChecked },\n {\n // Presence calls its slot once during setup; withCtx marks it\n // as a render slot so Vue does not warn about that call\n default: withCtx(() => [\n h(\"span\", {\n \"data-state\": state,\n \"data-disabled\": isDisabled ? \"\" : undefined,\n \"class\": s.RadioIndicator,\n }),\n ]),\n },\n ),\n ],\n ),\n },\n ),\n isFormControl.value\n ? h(\"input\", {\n \"ref\": bubbleInput,\n \"type\": \"radio\",\n \"aria-hidden\": \"true\",\n // React's `defaultChecked`, from the input's first render\n \"^checked\": defaultChecked ? \"\" : undefined,\n \"name\": context.name.value,\n \"^value\": props.value,\n // radix-ui 1.8: the group's `required` reaches every input\n \"required\": context.required.value,\n \"disabled\": isDisabled,\n \"tabindex\": -1,\n \"style\": bubbleInputStyle(controlSize.value, { transform: \"translateX(-100%)\" }),\n })\n : null,\n ]),\n slots.default?.(),\n ],\n )\n\n return h(\"div\", { class: [\"flex\", props.block && \"w-full\"], ...restAttrs }, [\n descriptionId\n ? // The description stays outside the label, so it describes the radio instead of naming it\n h(\n \"div\",\n {\n \"class\": s.RadioItemGroup,\n \"data-block\": props.block ? \"\" : undefined,\n \"data-orientation\": props.orientation,\n },\n [\n label,\n h(\n \"span\",\n { \"id\": descriptionId, \"class\": s.RadioDescription, \"data-disabled\": isDisabled ? \"\" : undefined },\n description,\n ),\n ],\n )\n : label,\n ])\n }\n },\n})\n\ntype RadioGroupOwnProps = InstanceType<typeof RadioGroupComponent>[\"$props\"]\n\n/** RadioGroup props plus the attributes that fall through to the group element, as in React. */\nexport type RadioGroupProps = RadioGroupOwnProps &\n Omit<HTMLAttributes, keyof RadioGroupOwnProps> & { \"aria-label\"?: string }\n\ntype RadioGroupItemOwnProps = InstanceType<typeof RadioGroupItemComponent>[\"$props\"]\n\n/** RadioGroupItem props; `class` lands on the label, other attributes on the wrapper `<div>`. */\nexport type RadioGroupItemProps = RadioGroupItemOwnProps & Omit<HTMLAttributes, keyof RadioGroupItemOwnProps>\n\nexport const RadioGroupItem = RadioGroupItemComponent as typeof RadioGroupItemComponent & {\n new (): { $props: RadioGroupItemProps }\n}\n\n/**\n * Single-choice group of radio items. Flat export `RadioGroupItem` for\n * templates; `RadioGroup.Item` for render functions and SFCs.\n */\n// Typed explicitly so the published declaration refers to the parts instead of\n// expanding them (an expanded component type fails consumers' type checks)\nexport const RadioGroup: typeof RadioGroupComponent & { new (): { $props: RadioGroupProps } } & {\n Item: typeof RadioGroupItem\n} = Object.assign(\n RadioGroupComponent as typeof RadioGroupComponent & { new (): { $props: RadioGroupProps } },\n { Item: RadioGroupItem },\n)\n"]}
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../../../../src/components/RadioGroup/RadioGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,EACD,MAAM,EACN,QAAQ,EACR,eAAe,EACf,SAAS,EACT,OAAO,EACP,GAAG,EACH,UAAU,EACV,KAAK,EACL,KAAK,EACL,OAAO,GAMR,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACrE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACxF,OAAO,CAAC,MAAM,4DAA4D,CAAA;AA4B1E,MAAM,oBAAoB,GAAyC,MAAM,CAAC,kB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ACH,CAAC;CACF,CAAC,CAAA;AAaF,MAAM,CAAC,MAAM,cAAc,GAAG,uBAE7B,CAAA;AAED;;;GAGG;AACH,+EAA+E;AAC/E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,UAAU,GAEnB,MAAM,CAAC,MAAM,CACf,mBAA2F,EAC3F,EAAE,IAAI,EAAE,cAAc,EAAE,CACzB,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n h,\n inject,\n nextTick,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n shallowRef,\n useId,\n watch,\n withCtx,\n type ComputedRef,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n} from \"vue\"\nimport { Presence, RovingFocusGroup, RovingFocusItem } from \"reka-ui\"\nimport { bubbleInputStyle, useIsFormControl, useSize } from \"../Checkbox/bubbleInput.js\"\nimport s from \"@plexui/styles/components/RadioGroup/RadioGroup.module.css\"\n\n// Vue port of packages/ui/src/components/RadioGroup/RadioGroup.tsx. Props,\n// defaults, rendered DOM and behaviour match React (checked by the parity\n// tests).\n//\n// React builds on Radix RadioGroup. Reka's RadioGroupItem renders different\n// markup (`aria-label` copied from the label, `required` and `name` on the\n// button, a visually hidden input only when a `name` is set), stops every\n// click and checks an arrow-focused radio a tick later. So the Radix group\n// and radio (state, button attributes, hidden form input, arrow-key\n// selection) are rendered here, and keyboard focus comes from Reka's\n// RovingFocusGroup and RovingFocusItem, the same roving tabindex Radix uses.\n\ntype Direction = \"col\" | \"row\"\n\ntype BubbleInputEffect = { input: Ref<HTMLInputElement | null>; run: () => void }\n\ntype RadioGroupContextValue = {\n disabled: ComputedRef<boolean>\n required: ComputedRef<boolean>\n name: ComputedRef<string | undefined>\n value: ComputedRef<string | null>\n setValue: (value: string) => void\n bubbleInputEffects: Set<BubbleInputEffect>\n runBubbleInputEffects: () => void\n}\n\nconst RadioGroupContextKey: InjectionKey<RadioGroupContextValue> = Symbol(\"PlexUIRadioGroup\")\n\nconst useRadioGroupContext = () => {\n const context = inject(RadioGroupContextKey, null)\n\n if (!context) {\n throw new Error(\"RadioGroup components must be wrapped in <RadioGroup />\")\n }\n\n return context\n}\n\ntype ExposedRovingFocusGroup = { getItems: () => { ref: HTMLElement }[] }\n\nconst ARROW_KEYS = [\"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\"]\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// The caller's listeners the group element composes with Reka's\nconst GROUP_LISTENERS = [\"onMousedown\", \"onMouseup\", \"onFocus\", \"onBlur\", \"onFocusin\", \"onFocusout\"] as const\n\n// Internal: the radiogroup element rendered through Reka's RovingFocusGroup\n// (`asChild`), with Reka's group handlers wired the Radix way:\n// - Radix runs the caller's mousedown handler first and skips its own once\n// the event is default-prevented; Reka merges its own in front.\n// - Radix's group focus and blur handlers are React `onFocus` / `onBlur`,\n// which bubble from the radios: a radio's focus ends a click focus and its\n// blur ends Shift+Tab's \"tabbing back out\" (the group is tabbable again).\n// Reka listens to the group's own native focus and blur only, so its\n// handlers run on `focusin` / `focusout` here.\n// - Reka also ends a click focus on mouseup, which Radix does not.\nconst GroupElement = defineComponent({\n name: \"RadioGroupElement\",\n inheritAttrs: false,\n props: {\n listeners: { type: Object as PropType<Record<string, unknown>>, default: () => ({}) },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const { onMousedown, onMouseup: _onMouseup, onFocus, onBlur, ...restAttrs } = attrs\n const caller = props.listeners\n const handlers: Record<string, (event: Event) => void> = {\n onMousedown: (event) => {\n callHandlers(caller.onMousedown, event)\n if (!event.defaultPrevented) callHandlers(onMousedown, event)\n },\n onFocusin: (event) => {\n callHandlers(caller.onFocusin, event)\n callHandlers(onFocus, event)\n },\n onFocusout: (event) => {\n callHandlers(caller.onFocusout, event)\n callHandlers(onBlur, event)\n },\n }\n for (const key of [\"onMouseup\", \"onFocus\", \"onBlur\"] as const) {\n if (caller[key]) handlers[key] = (event) => callHandlers(caller[key], event)\n }\n return h(\"div\", { ...restAttrs, ...handlers }, slots.default?.())\n }\n },\n})\n\nconst RadioGroupComponent = defineComponent({\n name: \"RadioGroup\",\n inheritAttrs: false,\n props: {\n /** Initial selected value when uncontrolled */\n defaultValue: String,\n /** Controlled selected value. Bind with `v-model:value`; leave unset for an uncontrolled group. */\n value: { type: String, default: undefined },\n /** Name submitted with the owning form */\n name: String,\n /** Determines the layout direction of the radio items. @default \"row\" */\n direction: { type: String as PropType<Direction>, default: \"row\" },\n /** Controls whether the entire radio group is disabled. @default false */\n disabled: { type: Boolean, default: false },\n /** Marks the group as required (`aria-required`). @default false */\n required: { type: Boolean, default: false },\n },\n emits: {\n /** The selected value changed (`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 },\n setup(props, { attrs, slots, emit }) {\n const groupRef = ref<ExposedRovingFocusGroup | null>(null)\n\n // Radix useControllableState: controlled while `value` is set\n const uncontrolledValue = ref<string | null>(props.defaultValue ?? null)\n const value = computed(() => (props.value !== undefined ? props.value : uncontrolledValue.value))\n\n const reportChange = (nextValue: string) => {\n emit(\"update:value\", nextValue)\n emit(\"change\", nextValue)\n }\n\n const setValue = (nextValue: string) => {\n if (props.value !== undefined) {\n if (nextValue !== props.value) reportChange(nextValue)\n } else {\n uncontrolledValue.value = nextValue\n }\n }\n\n // Radix reports an uncontrolled change from the group's effect, which\n // React runs after the items' effects (the hidden inputs' clicks)\n watch(\n uncontrolledValue,\n (nextValue) => {\n void nextTick(() => {\n if (nextValue !== null) reportChange(nextValue)\n })\n },\n { flush: \"post\" },\n )\n\n // React runs the items' hidden-input effects in tree order; Vue's post\n // watchers run in the order they were triggered, so the first item's\n // watcher runs them all here, in document order (each is a no-op when\n // nothing changed for it)\n const bubbleInputEffects = new Set<BubbleInputEffect>()\n const runBubbleInputEffects = () => {\n const effects = [...bubbleInputEffects].sort((a, b) => {\n const first = a.input.value\n const second = b.input.value\n if (!first || !second) return 0\n return first.compareDocumentPosition(second) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1\n })\n for (const effect of effects) effect.run()\n }\n\n provide(RadioGroupContextKey, {\n disabled: computed(() => props.disabled),\n required: computed(() => props.required),\n name: computed(() => props.name),\n value,\n setValue,\n bubbleInputEffects,\n runBubbleInputEffects,\n })\n\n // Radix: a reset of the group's form sets the value it first rendered\n const initialValue = value.value\n onMounted(() => {\n const element = (groupRef.value as { $el?: unknown } | null)?.$el\n const form = element instanceof Element ? element.closest(\"form\") : null\n if (!form) return\n const reset = () => {\n if (initialValue !== null) setValue(initialValue)\n }\n form.addEventListener(\"reset\", reset)\n onBeforeUnmount(() => form.removeEventListener(\"reset\", reset))\n })\n\n // Radix moves focus into the group onto the checked radio, 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() ?? [])\n .map((item) => item.ref)\n .filter((item) => !item.hasAttribute(\"data-disabled\"))\n const activeItem = items.find((item) => item.getAttribute(\"data-state\") === \"checked\")\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: Record<string, unknown> = {}\n const restAttrs: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(otherAttrs)) {\n if ((GROUP_LISTENERS as readonly string[]).includes(key)) listeners[key] = value\n else restAttrs[key] = value\n }\n\n return h(\n RovingFocusGroup,\n {\n ref: groupRef,\n asChild: true,\n loop: true,\n dir: dir as \"ltr\" | \"rtl\" | undefined,\n onEntryFocus: handleEntryFocus,\n },\n {\n default: () =>\n h(\n GroupElement,\n {\n // `dir`, `tabindex` and `style=\"outline: none\"` come from RovingFocusGroup, like Radix\n \"listeners\": listeners,\n \"role\": \"radiogroup\",\n \"aria-required\": props.required,\n \"data-disabled\": props.disabled ? \"\" : undefined,\n \"class\": [s.RadioGroup, className],\n \"data-direction\": props.direction,\n ...restAttrs,\n },\n { default: () => slots.default?.() },\n ),\n },\n )\n }\n },\n})\n\n// React's value tracker per hidden input: its `checked` on mount, then the\n// one React last saw in a click that reached its root (also when a handler\n// stopped it from bubbling further). The native setter Radix uses bypasses it.\nconst trackedChecked = new WeakMap<HTMLInputElement, boolean>()\n\nconst useCheckedTracker = (input: Ref<HTMLInputElement | null>) =>\n watch(\n input,\n (el) => {\n if (!el || trackedChecked.has(el)) return\n // React creates the input by setting its `checked` property, so later\n // changes of the `checked` attribute never move its checkedness\n el.checked = el.checked\n trackedChecked.set(el, el.checked)\n },\n { flush: \"sync\" },\n )\n\n/**\n * Radix's RadioBubbleInput effect: sets the hidden radio's `checked` through\n * the native setter (unless `checked` is undefined) and dispatches a bubbling\n * `click`, which the input stops when `stop` is set, so form listeners see\n * the user's radio only. React turns that click into the form's `onChange`\n * when the input's `checked` differs from its value tracker, then refreshes\n * the trackers of the other radios with the same name in the same form;\n * Vue's form listeners are native, so a native `change` follows in those\n * cases.\n */\nconst dispatchBubbleClick = (input: HTMLInputElement, checked: boolean | undefined, stop: boolean) => {\n const setChecked = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, \"checked\")?.set\n if (!setChecked) return\n if (checked !== undefined) setChecked.call(input, checked)\n const click = new Event(\"click\", { bubbles: true })\n if (stop) input.addEventListener(\"click\", (event) => event.stopPropagation(), { once: true })\n input.dispatchEvent(click)\n if (trackedChecked.get(input) === input.checked) return\n trackedChecked.set(input, input.checked)\n input.dispatchEvent(new Event(\"change\", { bubbles: true }))\n\n const name = input.getAttribute(\"name\")\n if (name === null) return\n for (const other of Array.from(input.ownerDocument.querySelectorAll<HTMLInputElement>('input[type=\"radio\"]'))) {\n if (other !== input && other.getAttribute(\"name\") === name && other.form === input.form && trackedChecked.has(other)) {\n trackedChecked.set(other, other.checked)\n }\n }\n}\n\nconst RadioGroupItemComponent = defineComponent({\n name: \"RadioGroupItem\",\n inheritAttrs: false,\n props: {\n /** Value of this option */\n value: { type: String, required: true },\n /** Determines if a given radio item is disabled. @default false */\n disabled: { type: Boolean, default: false },\n /** Sets `required` on this item's radio button (the hidden form input follows the group's) */\n required: { type: Boolean, default: undefined },\n /** Stretches the item to fill the available width. @default false */\n block: { type: Boolean, default: false },\n /** The orientation of the radio indicator relative to the label. @default \"left\" */\n orientation: { type: String as PropType<\"left\" | \"right\">, default: \"left\" },\n /** Optional second line below the option's label, linked via `aria-describedby` (or the `description` slot) */\n description: String,\n },\n setup(props, { attrs, slots }) {\n const context = useRadioGroupContext()\n const id = useId()\n const wrapper = ref<HTMLDivElement | null>(null)\n const button = ref<HTMLButtonElement | null>(null)\n const bubbleInput = ref<HTMLInputElement | null>(null)\n\n const disabled = computed(() => context.disabled.value || props.disabled)\n const checked = computed(() => context.value.value === props.value)\n\n // Radix's Radio: the hidden input renders until the button mounts, then only inside a form\n const isFormControl = useIsFormControl(button, () => undefined)\n const controlSize = useSize(() => (isFormControl.value ? button.value : null))\n useCheckedTracker(bubbleInput)\n\n // Radix RadioGroupItem: an arrow key that moves focus onto a radio checks it\n let isArrowKeyPressed = false\n const handleDocumentKeyDown = (event: KeyboardEvent) => {\n if (ARROW_KEYS.includes(event.key)) isArrowKeyPressed = true\n }\n const handleDocumentKeyUp = () => {\n isArrowKeyPressed = false\n }\n\n onMounted(() => {\n button.value = (wrapper.value?.firstElementChild as HTMLButtonElement | null) ?? null\n document.addEventListener(\"keydown\", handleDocumentKeyDown)\n document.addEventListener(\"keyup\", handleDocumentKeyUp)\n })\n\n onBeforeUnmount(() => {\n document.removeEventListener(\"keydown\", handleDocumentKeyDown)\n document.removeEventListener(\"keyup\", handleDocumentKeyUp)\n })\n\n // Radix's RadioBubbleInput effect: the radio the user clicked reports its\n // click (also when the value did not change); a radio whose `checked`\n // changed otherwise reports it with a click that stops at the input\n type UserClick = { hasConsumerStoppedPropagation: boolean }\n const userClick = shallowRef<UserClick | null>(null)\n let prevChecked = checked.value\n let handledUserClick: UserClick | null = null\n const bubbleInputEffect: BubbleInputEffect = {\n input: bubbleInput,\n run: () => {\n const input = bubbleInput.value\n if (!input) return\n const isChecked = checked.value\n const checkedChanged = prevChecked !== isChecked\n prevChecked = isChecked\n const isNewUserClick = userClick.value !== null && userClick.value !== handledUserClick\n handledUserClick = userClick.value\n if (isNewUserClick) dispatchBubbleClick(input, checkedChanged ? isChecked : undefined, false)\n else if (checkedChanged) dispatchBubbleClick(input, isChecked, true)\n },\n }\n context.bubbleInputEffects.add(bubbleInputEffect)\n onBeforeUnmount(() => context.bubbleInputEffects.delete(bubbleInputEffect))\n watch([bubbleInput, checked, userClick], context.runBubbleInputEffects, { flush: \"post\" })\n\n // Radix's RadioBubbleInput renders `defaultChecked` from its first render\n let defaultChecked: boolean | undefined\n\n const handleClick = (event: MouseEvent) => {\n // React does not dispatch mouse handlers on a disabled button\n if (disabled.value) return\n if (!checked.value) {\n // Plex passes no click handler a consumer could stop\n userClick.value = { hasConsumerStoppedPropagation: false }\n context.setValue(props.value)\n }\n // In a form, the button's click stops here; the hidden input's click\n // bubbles instead (Plex passes no click handler a consumer could stop)\n if (isFormControl.value) event.stopPropagation()\n }\n\n const handleKeyDown = (event: KeyboardEvent) => {\n // According to WAI ARIA, radio groups don't activate items on enter keypress\n if (event.key === \"Enter\") event.preventDefault()\n }\n\n const handleFocus = (event: FocusEvent) => {\n // Roving focus moved here with an arrow key: check this radio by clicking it\n if (isArrowKeyPressed) (event.currentTarget as HTMLButtonElement).click()\n }\n\n // Prevents text selection when double-clicking the label\n const handleLabelMouseDown = (event: MouseEvent) => {\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault()\n }\n\n return () => {\n const {\n \"class\": className,\n // These name the radio itself: a `Field` around the item labels it through them\n \"id\": idAttr,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": ariaDescribedBy,\n ...restAttrs\n } = attrs\n const isChecked = checked.value\n const isDisabled = disabled.value\n const state = isChecked ? \"checked\" : \"unchecked\"\n const itemId = (idAttr as string | undefined) ?? `${props.value}-${id}`\n if (isFormControl.value) defaultChecked ??= isChecked\n else defaultChecked = undefined\n\n // Providing an extra wrapper enables `label` to be inline-flex, avoiding clickable whitespace\n // when radio options are of varied lengths.\n // NOTE: Important that this is `flex` to prevent the `inline-flex` label from extra, unintentional whitespace.\n const description = slots.description ? slots.description() : props.description\n const descriptionId = slots.description || props.description ? `${itemId}-description` : undefined\n const label = h(\n \"label\",\n {\n \"for\": itemId,\n \"class\": [s.RadioLabel, className],\n \"data-disabled\": isDisabled ? \"\" : undefined,\n \"data-block\": props.block ? \"\" : undefined,\n \"data-orientation\": props.orientation,\n \"onMousedown\": handleLabelMouseDown,\n },\n [\n h(\"div\", { class: s.RadioIndicatorWrapper, ref: wrapper }, [\n h(\n RovingFocusItem,\n { asChild: true, focusable: !isDisabled, active: isChecked },\n {\n default: () =>\n h(\n \"button\",\n {\n \"type\": \"button\",\n \"role\": \"radio\",\n \"aria-checked\": isChecked,\n \"data-state\": state,\n \"data-disabled\": isDisabled ? \"\" : undefined,\n \"disabled\": isDisabled,\n \"value\": props.value,\n // radix-ui 1.8: the item's own `required` lands on its button\n \"required\": props.required ? \"\" : undefined,\n \"id\": itemId,\n \"class\": s.RadioItem,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": [descriptionId, ariaDescribedBy].filter(Boolean).join(\" \") || undefined,\n // Reka's RovingFocusItem marks the active item; Radix does not\n \"data-active\": undefined,\n \"onClick\": handleClick,\n \"onKeydown\": handleKeyDown,\n \"onFocus\": handleFocus,\n },\n [\n h(\n Presence,\n { present: isChecked },\n {\n // Presence calls its slot once during setup; withCtx marks it\n // as a render slot so Vue does not warn about that call\n default: withCtx(() => [\n h(\"span\", {\n \"data-state\": state,\n \"data-disabled\": isDisabled ? \"\" : undefined,\n \"class\": s.RadioIndicator,\n }),\n ]),\n },\n ),\n ],\n ),\n },\n ),\n isFormControl.value\n ? h(\"input\", {\n \"ref\": bubbleInput,\n \"type\": \"radio\",\n \"aria-hidden\": \"true\",\n // React's `defaultChecked`, from the input's first render\n \"^checked\": defaultChecked ? \"\" : undefined,\n \"name\": context.name.value,\n \"^value\": props.value,\n // radix-ui 1.8: the group's `required` reaches every input\n \"required\": context.required.value,\n \"disabled\": isDisabled,\n \"tabindex\": -1,\n \"style\": bubbleInputStyle(controlSize.value, { transform: \"translateX(-100%)\" }),\n })\n : null,\n ]),\n slots.default?.(),\n ],\n )\n\n return h(\"div\", { class: [\"flex\", props.block && \"w-full\"], ...restAttrs }, [\n descriptionId\n ? // The description stays outside the label, so it describes the radio instead of naming it\n h(\n \"div\",\n {\n \"class\": s.RadioItemGroup,\n \"data-block\": props.block ? \"\" : undefined,\n \"data-orientation\": props.orientation,\n },\n [\n label,\n h(\n \"span\",\n { \"id\": descriptionId, \"class\": s.RadioDescription, \"data-disabled\": isDisabled ? \"\" : undefined },\n description,\n ),\n ],\n )\n : label,\n ])\n }\n },\n})\n\ntype RadioGroupOwnProps = InstanceType<typeof RadioGroupComponent>[\"$props\"]\n\n/** RadioGroup props plus the attributes that fall through to the group element, as in React. */\nexport type RadioGroupProps = RadioGroupOwnProps &\n Omit<HTMLAttributes, keyof RadioGroupOwnProps> & { \"aria-label\"?: string }\n\ntype RadioGroupItemOwnProps = InstanceType<typeof RadioGroupItemComponent>[\"$props\"]\n\n/** RadioGroupItem props; `class` lands on the label, other attributes on the wrapper `<div>`. */\nexport type RadioGroupItemProps = RadioGroupItemOwnProps & Omit<HTMLAttributes, keyof RadioGroupItemOwnProps>\n\nexport const RadioGroupItem = RadioGroupItemComponent as typeof RadioGroupItemComponent & {\n new (): { $props: RadioGroupItemProps }\n}\n\n/**\n * Single-choice group of radio items. Flat export `RadioGroupItem` for\n * templates; `RadioGroup.Item` for render functions and SFCs.\n */\n// Typed explicitly so the published declaration refers to the parts instead of\n// expanding them (an expanded component type fails consumers' type checks)\nexport const RadioGroup: typeof RadioGroupComponent & { new (): { $props: RadioGroupProps } } & {\n Item: typeof RadioGroupItem\n} = Object.assign(\n RadioGroupComponent as typeof RadioGroupComponent & { new (): { $props: RadioGroupProps } },\n { Item: RadioGroupItem },\n)\n"]}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import clsx, {} from "clsx";
|
|
2
|
+
import { defineComponent, h, nextTick, } from "vue";
|
|
3
|
+
import { moveItem, sortableKeyDown, sortablePointerDown } from "../../lib/sortable.js";
|
|
4
|
+
import { GripVertical } from "../Icon/index.js";
|
|
5
|
+
import s from "@plexui/styles/components/Sortable/Sortable.module.css";
|
|
6
|
+
// Vue port of packages/ui/src/components/Sortable/Sortable.tsx.
|
|
7
|
+
//
|
|
8
|
+
// - `value` binds with `v-model:value`; `change` fires with it.
|
|
9
|
+
// - React's `Sortable.Handle` is the flat `SortableHandle` here.
|
|
10
|
+
// - Attributes reach the rendered element, as React's rest props do.
|
|
11
|
+
const preventNativeDrag = (event) => event.preventDefault();
|
|
12
|
+
const SortableComponent = defineComponent({
|
|
13
|
+
name: "Sortable",
|
|
14
|
+
inheritAttrs: false,
|
|
15
|
+
props: {
|
|
16
|
+
/** The list, in the order of the children. Bind with `v-model:value`. */
|
|
17
|
+
value: { type: Array, required: true },
|
|
18
|
+
/** `list` for rows one under another, `grid` for items that stand side by side. @default "list" */
|
|
19
|
+
layout: { type: String, default: "list" },
|
|
20
|
+
/** Element to render, such as `TableBody` for table rows. @default "div" */
|
|
21
|
+
as: { type: [String, Object], default: "div" },
|
|
22
|
+
/** Turns dragging off. @default false */
|
|
23
|
+
disabled: { type: Boolean, default: false },
|
|
24
|
+
/** Shows the grips of `SortableHandle`. A hidden grip still takes the keyboard, and the item drags from anywhere but a control. @default true in a table, otherwise false */
|
|
25
|
+
handles: { type: Boolean, default: undefined },
|
|
26
|
+
},
|
|
27
|
+
emits: {
|
|
28
|
+
"update:value": (_value) => true,
|
|
29
|
+
"change": (_value) => true,
|
|
30
|
+
},
|
|
31
|
+
slots: Object,
|
|
32
|
+
setup(props, { attrs, emit, slots }) {
|
|
33
|
+
const commit = async (from, to) => {
|
|
34
|
+
const next = moveItem(props.value, from, to);
|
|
35
|
+
emit("update:value", next);
|
|
36
|
+
emit("change", next);
|
|
37
|
+
await nextTick();
|
|
38
|
+
};
|
|
39
|
+
const onPointerdown = (event) => {
|
|
40
|
+
if (!props.disabled) {
|
|
41
|
+
sortablePointerDown(event, event.currentTarget, props.layout, commit);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const onKeydown = (event) => {
|
|
45
|
+
if (!props.disabled)
|
|
46
|
+
void sortableKeyDown(event, event.currentTarget, commit);
|
|
47
|
+
};
|
|
48
|
+
return () => {
|
|
49
|
+
const { class: className, ...rest } = attrs;
|
|
50
|
+
const isElement = typeof props.as === "string";
|
|
51
|
+
return h(props.as, {
|
|
52
|
+
...rest,
|
|
53
|
+
"class": clsx(s.Sortable, className),
|
|
54
|
+
"data-sortable": "",
|
|
55
|
+
"data-layout": props.layout,
|
|
56
|
+
"data-disabled": props.disabled ? "" : undefined,
|
|
57
|
+
"data-handles": props.handles?.toString(),
|
|
58
|
+
onPointerdown,
|
|
59
|
+
onKeydown,
|
|
60
|
+
"onDragstart": preventNativeDrag,
|
|
61
|
+
}, isElement ? slots.default?.() : { default: () => slots.default?.() });
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
const SortableHandleComponent = defineComponent({
|
|
66
|
+
name: "SortableHandle",
|
|
67
|
+
inheritAttrs: false,
|
|
68
|
+
props: {
|
|
69
|
+
/** Name of the handle for assistive technology. @default "Reorder" */
|
|
70
|
+
ariaLabel: { type: String, default: "Reorder" },
|
|
71
|
+
},
|
|
72
|
+
slots: Object,
|
|
73
|
+
setup(props, { attrs, slots }) {
|
|
74
|
+
return () => {
|
|
75
|
+
const { class: className, ...rest } = attrs;
|
|
76
|
+
return h("button", {
|
|
77
|
+
...rest,
|
|
78
|
+
"type": "button",
|
|
79
|
+
"class": clsx(s.Handle, className),
|
|
80
|
+
"data-sortable-handle": "",
|
|
81
|
+
"aria-label": props.ariaLabel,
|
|
82
|
+
}, (slots.default ? slots.default() : [h(GripVertical, { "aria-hidden": true })]));
|
|
83
|
+
};
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
/** Reorders its direct children by dragging, from anywhere but a control, or by a `SortableHandle` where grips are shown. */
|
|
87
|
+
export const Sortable = SortableComponent;
|
|
88
|
+
/** The grip of an item. Arrow keys move the item while the handle has focus. */
|
|
89
|
+
export const SortableHandle = SortableHandleComponent;
|
|
90
|
+
//# sourceMappingURL=Sortable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sortable.js","sourceRoot":"","sources":["../../../../src/components/Sortable/Sortable.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAmB,MAAM,MAAM,CAAA;AAC5C,OAAO,EACL,eAAe,EACf,CAAC,EACD,QAAQ,GAMT,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,mBAAmB,EAAuB,MAAM,uBAAuB,CAAA;AAC3G,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,CAAC,MAAM,wDAAwD,CAAA;AAEtE,gEAAgE;AAChE,EAAE;AACF,gEAAgE;AAChE,iEAAiE;AACjE,qEAAqE;AAErE,MAAM,iBAAiB,GAAG,CAAC,KAAY,EAAE,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,CAAA;AAElE,MAAM,iBAAiB,GAAG,eAAe,CAAC;IACxC,IAAI,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EAAE,MAGL;IACF,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE;QAC3B,OAAO,GAAG,EAAE;YACV,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAA;YAC3C,OAAO,CAAC,CACN,QAAQ,EACR;gBACE,GAAG,IAAI;gBACP,MAAM,EAAE,QAAQ;gBAChB,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,SAAuB,CAAC;gBAChD,sBAAsB,EAAE,EAAE;gBAC1B,YAAY,EAAE,KAAK,CAAC,SAAS;aAC9B,EACD,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,CAAuB,CACrG,CAAA;QACH,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAEF,6HAA6H;AAC7H,MAAM,CAAC,MAAM,QAAQ,GAAG,iBAAiB,CAAA;AACzC,gFAAgF;AAChF,MAAM,CAAC,MAAM,cAAc,GAAG,uBAAuB,CAAA","sourcesContent":["import clsx, { type ClassValue } from \"clsx\"\nimport {\n defineComponent,\n h,\n nextTick,\n type Component,\n type PropType,\n type SlotsType,\n type VNodeArrayChildren,\n type VNodeChild,\n} from \"vue\"\nimport { moveItem, sortableKeyDown, sortablePointerDown, type SortableLayout } from \"../../lib/sortable.js\"\nimport { GripVertical } from \"../Icon/index.js\"\nimport s from \"@plexui/styles/components/Sortable/Sortable.module.css\"\n\n// Vue port of packages/ui/src/components/Sortable/Sortable.tsx.\n//\n// - `value` binds with `v-model:value`; `change` fires with it.\n// - React's `Sortable.Handle` is the flat `SortableHandle` here.\n// - Attributes reach the rendered element, as React's rest props do.\n\nconst preventNativeDrag = (event: Event) => event.preventDefault()\n\nconst SortableComponent = defineComponent({\n name: \"Sortable\",\n inheritAttrs: false,\n props: {\n /** The list, in the order of the children. Bind with `v-model:value`. */\n value: { type: Array as PropType<readonly unknown[]>, required: true },\n /** `list` for rows one under another, `grid` for items that stand side by side. @default \"list\" */\n layout: { type: String as PropType<SortableLayout>, default: \"list\" },\n /** Element to render, such as `TableBody` for table rows. @default \"div\" */\n as: { type: [String, Object] as PropType<string | Component>, default: \"div\" },\n /** Turns dragging off. @default false */\n disabled: { type: Boolean, default: false },\n /** Shows the grips of `SortableHandle`. A hidden grip still takes the keyboard, and the item drags from anywhere but a control. @default true in a table, otherwise false */\n handles: { type: Boolean, default: undefined },\n },\n emits: {\n \"update:value\": (_value: unknown[]) => true,\n \"change\": (_value: unknown[]) => true,\n },\n slots: Object as SlotsType<{\n /** The items, one direct child per entry of `value`, keyed by the entry and not by its index */\n default?: () => VNodeChild\n }>,\n setup(props, { attrs, emit, slots }) {\n const commit = async (from: number, to: number) => {\n const next = moveItem(props.value, from, to)\n emit(\"update:value\", next)\n emit(\"change\", next)\n await nextTick()\n }\n\n const onPointerdown = (event: PointerEvent) => {\n if (!props.disabled) {\n sortablePointerDown(event, event.currentTarget as HTMLElement, props.layout, commit)\n }\n }\n\n const onKeydown = (event: KeyboardEvent) => {\n if (!props.disabled) void sortableKeyDown(event, event.currentTarget as HTMLElement, commit)\n }\n\n return () => {\n const { class: className, ...rest } = attrs\n const isElement = typeof props.as === \"string\"\n return h(\n props.as as string,\n {\n ...rest,\n \"class\": clsx(s.Sortable, className as ClassValue),\n \"data-sortable\": \"\",\n \"data-layout\": props.layout,\n \"data-disabled\": props.disabled ? \"\" : undefined,\n \"data-handles\": props.handles?.toString(),\n onPointerdown,\n onKeydown,\n \"onDragstart\": preventNativeDrag,\n },\n isElement ? (slots.default?.() as VNodeArrayChildren) : { default: () => slots.default?.() },\n )\n }\n },\n})\n\nconst SortableHandleComponent = defineComponent({\n name: \"SortableHandle\",\n inheritAttrs: false,\n props: {\n /** Name of the handle for assistive technology. @default \"Reorder\" */\n ariaLabel: { type: String, default: \"Reorder\" },\n },\n slots: Object as SlotsType<{\n /** The grip */\n default?: () => VNodeChild\n }>,\n setup(props, { attrs, slots }) {\n return () => {\n const { class: className, ...rest } = attrs\n return h(\n \"button\",\n {\n ...rest,\n \"type\": \"button\",\n \"class\": clsx(s.Handle, className as ClassValue),\n \"data-sortable-handle\": \"\",\n \"aria-label\": props.ariaLabel,\n },\n (slots.default ? slots.default() : [h(GripVertical, { \"aria-hidden\": true })]) as VNodeArrayChildren,\n )\n }\n },\n})\n\n/** Reorders its direct children by dragging, from anywhere but a control, or by a `SortableHandle` where grips are shown. */\nexport const Sortable = SortableComponent\n/** The grip of an item. Arrow keys move the item while the handle has focus. */\nexport const SortableHandle = SortableHandleComponent\nexport type { SortableLayout }\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Sortable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAuB,MAAM,eAAe,CAAA","sourcesContent":["export { Sortable, SortableHandle, type SortableLayout } from \"./Sortable.js\"\n"]}
|
|
@@ -26,6 +26,8 @@ export const TagInput = defineComponent({
|
|
|
26
26
|
id: String,
|
|
27
27
|
/** Corresponds with Input height when rows=1. @default "xl" */
|
|
28
28
|
size: { type: String, default: "xl" },
|
|
29
|
+
/** Visual style. `ghost` has no frame, for a field that its container already frames. @default "outline" */
|
|
30
|
+
variant: { type: String, default: "outline" },
|
|
29
31
|
/** Placeholder text for the input */
|
|
30
32
|
placeholder: { type: String, default: "" },
|
|
31
33
|
/** Returns whether a value is a valid tag; invalid tags are highlighted. Evaluated on creation only. */
|
|
@@ -345,6 +347,7 @@ export const TagInput = defineComponent({
|
|
|
345
347
|
"onFocusin": handleFocus,
|
|
346
348
|
"onFocusout": handleBlur,
|
|
347
349
|
"data-size": props.size,
|
|
350
|
+
"data-variant": props.variant,
|
|
348
351
|
"data-focused": focused.value ? "" : undefined,
|
|
349
352
|
"data-empty": tags.value.size === 0 ? "" : undefined,
|
|
350
353
|
"data-pill": props.pill ? "" : undefined,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagInput.js","sourceRoot":"","sources":["../../../../src/components/TagInput/TagInput.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,EACD,QAAQ,EACR,eAAe,EACf,SAAS,EACT,GAAG,EACH,UAAU,EACV,KAAK,GAEN,MAAM,KAAK,CAAA;AAEZ,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAA;AACpC,OAAO,CAAC,MAAM,wDAAwD,CAAA;AAOtE,oGAAoG;AACpG,MAAM,yBAAyB,GAAG,EAAE,CAAA;AACpC,mEAAmE;AACnE,MAAM,oBAAoB,GAAG,EAAE,CAAA;AAC/B,MAAM,2BAA2B,GAAG,GAAG,CAAA;AAEvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC;IACtC,IAAI,EAAE,UAAU;IAChB,2EAA2E;IAC3E,wEAAwE;IACxE,YAAY,EAAE,KAAK;IACnB,KAAK,EAAE;QACL,uFAAuF;QACvF,YAAY,EAAE,EAAE,IAAI,EAAE,KAAwB,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE;QACnE,gEAAgE;QAChE,KAAK,EAAE,KAAwB;QAC/B,qDAAqD;QACrD,EAAE,EAAE,MAAM;QACV,+DAA+D;QAC/D,IAAI,EAAE,EAAE,IAAI,EAAE,MAAoE,EAAE,OAAO,EAAE,IAAI,EAAE;QACnG,qCAAqC;QACrC,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1C,wGAAwG;QACxG,SAAS,EAAE,QAAgD;QAC3D,0GAA0G;QAC1G,OAAO,EAAE,MAAM;QACf,2CAA2C;QAC3C,SAAS,EA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AAW;oCACpB,SAAS,EAAE,kBAAkB;oCAC7B,WAAW,EAAE,eAAe,CAAC,KAAK;oCAClC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,KAAK,IAAI,EAAE;oCACzC,QAAQ,EAAE,KAAK,CAAC,QAAQ;iCACzB,CAAC;6BACH,CAAC;yBACH,CAAC;wBACJ,CAAC,CAAC,IAAI;iBACT,CAAC;aACH,CACF;YACD,uDAAuD;YACvD,KAAK,CAAC,OAAO;gBACX,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;gBACpH,CAAC,CAAC,IAAI;SACT,CAAA;IACH,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n h,\n nextTick,\n onBeforeUnmount,\n onMounted,\n ref,\n shallowRef,\n watch,\n type PropType,\n} from \"vue\"\nimport type { Sizes } from \"@plexui/styles/types\"\nimport { toCssVariables } from \"../../lib/helpers.js\"\nimport { X } from \"../Icon/index.js\"\nimport s from \"@plexui/styles/components/TagInput/TagInput.module.css\"\n\nexport type Tag = {\n value: string\n valid: boolean\n}\n\n// How many pixels to reserve on the right of the input as a buffer before wrapping to the next line\nconst INPUT_CURSOR_TOLERANCE_PX = 10\n// The total space reserved on either side of the input for padding\nconst CONTAINER_PADDING_PX = 24\nconst SHAKE_ANIMATION_DURATION_MS = 500\n\n/**\n * Port of packages/ui/src/components/TagInput/TagInput.tsx. Controlled with\n * `value` (`v-model:value`), uncontrolled with `defaultValue`; every change\n * emits `update:value` and `change` with the new tag list.\n */\nexport const TagInput = defineComponent({\n name: \"TagInput\",\n // React's TagInput takes no extra attributes (Field's aria-describedby and\n // aria-invalid are ignored); the render has several roots, so drop them\n inheritAttrs: false,\n props: {\n /** The state of the tag input when it is initially rendered, used when uncontrolled */\n defaultValue: { type: Array as PropType<Tag[]>, default: () => [] },\n /** The value of the tag input, used to control the tag input */\n value: Array as PropType<Tag[]>,\n /** Allows the tag input to be targeted with `for` */\n id: String,\n /** Corresponds with Input height when rows=1. @default \"xl\" */\n size: { type: String as PropType<Sizes<\"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"3xl\">>, default: \"xl\" },\n /** Placeholder text for the input */\n placeholder: { type: String, default: \"\" },\n /** Returns whether a value is a valid tag; invalid tags are highlighted. Evaluated on creation only. */\n validator: Function as PropType<(value: string) => boolean>,\n /** The maximum number of tags allowed before the input is disabled; displays a counter below the input */\n maxTags: Number,\n /** Whether to focus this input on mount */\n autoFocus: { type: Boolean, default: false },\n /** The minimum number of rows for the tag input. @default 1 */\n rows: { type: Number, default: 1 },\n /** Controls what characters will count towards creating a new tag. @default [\",\", \" \"] */\n delimiters: { type: Array as PropType<string[]>, default: () => [\",\", \" \"] },\n /** Disables the tag input visually and from interactions */\n disabled: { type: Boolean, default: undefined },\n /** Fully-rounded container and chips, matching `Input pill` */\n pill: { type: Boolean, default: false },\n },\n emits: {\n \"update:value\": (_tags: Tag[]) => true,\n \"change\": (_tags: Tag[]) => true,\n },\n setup(props, { emit }) {\n // Shallow, like React state: emitted lists hold the caller's tag objects, not proxies\n const internalTags = shallowRef<Tag[]>(props.defaultValue)\n const value = computed(() => props.value ?? internalTags.value)\n const isControlled = computed(() => props.value !== undefined)\n const tags = computed(() => new Map(value.value.map((tag) => [tag.value, tag])))\n\n const currentInput = ref(\"\")\n const focused = ref(props.autoFocus)\n const selectedTag = ref<string | null>(null)\n const duplicateTags = ref(new Set<string>())\n const inputWidth = ref(0)\n\n const inputRef = ref<HTMLInputElement | null>(null)\n const containerRef = ref<HTMLDivElement | null>(null)\n const measureRef = ref<HTMLSpanElement | null>(null)\n\n const showInput = computed(() => !props.maxTags || tags.value.size < props.maxTags)\n const placeholderText = computed(() => (tags.value.size === 0 ? props.placeholder : undefined))\n\n // Handle focusing the correct part of the tag input\n watch(\n [focused, selectedTag, showInput],\n () => {\n if (!focused.value || !containerRef.value) {\n return\n }\n const defaultFocusEl = inputRef.value ?? containerRef.value\n if (selectedTag.value === null) {\n defaultFocusEl.focus()\n } else {\n const selectedTagElement = containerRef.value.querySelector(\n `[data-tag=\"${CSS.escape(selectedTag.value)}\"]`,\n ) as HTMLElement | null\n if (selectedTagElement) {\n selectedTagElement.focus()\n } else {\n defaultFocusEl.focus()\n }\n }\n },\n { flush: \"post\" },\n )\n\n // Position the real input inside the container (see the React source for the reasoning)\n let observer: ResizeObserver | undefined\n const measure = () => {\n observer?.disconnect()\n const container = containerRef.value\n const measureEl = measureRef.value\n if (!container || !measureEl) {\n return\n }\n\n const recompute = () => {\n const containerRect = container.getBoundingClientRect()\n const tagElements = Array.from(container.querySelectorAll(\"[data-tag]\")) as HTMLDivElement[]\n\n // Grab the right edge of the last tag if it exists, otherwise the left edge of the container\n const leftBound =\n tagElements.length > 0\n ? tagElements[tagElements.length - 1]!.getBoundingClientRect().right\n : containerRect.left\n\n measureEl.textContent = currentInput.value || placeholderText.value || \"\"\n\n // By padding the text width, we ensure the input wraps to the next line\n // before we get to the point where we start to overflow\n const textWidth = measureEl.getBoundingClientRect().width + INPUT_CURSOR_TOLERANCE_PX\n const remainingSpace = containerRect.right - leftBound - CONTAINER_PADDING_PX\n\n if (textWidth <= remainingSpace) {\n inputWidth.value = remainingSpace\n } else {\n // We are going to flow to a new line, so recalculate remaining space based on the container size\n inputWidth.value = containerRect.right - containerRect.left - CONTAINER_PADDING_PX\n }\n }\n\n recompute()\n observer = new ResizeObserver(recompute)\n observer.observe(container)\n container.querySelectorAll(\"[data-tag]\").forEach((chip) => observer!.observe(chip))\n }\n onMounted(measure)\n watch([currentInput, placeholderText, tags], measure, { flush: \"post\" })\n\n const setTags = (newTags: Tag[]) => {\n emit(\"update:value\", newTags)\n emit(\"change\", newTags)\n if (!isControlled.value) {\n internalTags.value = newTags\n }\n }\n\n // Adds every value in one update: a paste of \"a,b\" must not compute\n // each addition from the same stale `tags` snapshot.\n const addTags = (tagValues: string[]) => {\n const next = new Map(tags.value)\n let changed = false\n for (const tagValue of tagValues) {\n if (props.maxTags && next.size >= props.maxTags) {\n break\n }\n const trimmed = tagValue.trim()\n if (!trimmed) {\n continue\n }\n if (next.has(trimmed)) {\n duplicateTags.value = new Set(duplicateTags.value).add(trimmed)\n setTimeout(() => {\n const remaining = new Set(duplicateTags.value)\n remaining.delete(trimmed)\n duplicateTags.value = remaining\n }, SHAKE_ANIMATION_DURATION_MS)\n continue\n }\n const validTag = props.validator?.(trimmed) ?? true\n next.set(trimmed, { value: trimmed, valid: validTag })\n changed = true\n }\n if (!changed) {\n return\n }\n setTags(Array.from(next.values()))\n }\n\n const addTag = (tagValue: string) => addTags([tagValue])\n\n const removeTag = (tag: string) => {\n if (props.disabled) {\n return\n }\n const next = new Map(tags.value)\n next.delete(tag)\n setTags(Array.from(next.values()))\n if (selectedTag.value === tag) {\n selectedTag.value = null\n }\n }\n\n const selectPreviousTag = () => {\n if (tags.value.size === 0) {\n return\n }\n const tagList = Array.from(tags.value.keys())\n if (selectedTag.value === null) {\n selectedTag.value = tagList[tagList.length - 1]!\n } else {\n const prevIndex = tagList.indexOf(selectedTag.value)\n selectedTag.value = tagList[Math.max(0, prevIndex - 1)]!\n }\n }\n\n const selectNextTag = () => {\n if (selectedTag.value === null) {\n return\n }\n const tagList = Array.from(tags.value.keys())\n const index = tagList.indexOf(selectedTag.value) + 1\n selectedTag.value = index < tagList.length ? tagList[index]! : null\n }\n\n const isEmptyStartingSelection = () => {\n const input = inputRef.value\n if (!input) {\n return true\n }\n return input.selectionStart === 0 && input.selectionEnd === 0\n }\n\n const handleContainerBlur = () => {\n focused.value = false\n selectedTag.value = null\n // A disabled tag input keeps the pending text instead of committing it\n if (currentInput.value && !props.disabled) {\n addTag(currentInput.value)\n currentInput.value = \"\"\n }\n }\n\n const handleContainerKeyDown = (e: KeyboardEvent) => {\n // A tag can keep focus while the input turns disabled: no selecting or removing then\n if (props.disabled) {\n return\n }\n if (e.key === \"ArrowLeft\" || e.key === \"ArrowUp\") {\n if (isEmptyStartingSelection()) {\n e.preventDefault()\n selectPreviousTag()\n }\n } else if (e.key === \"ArrowRight\" || e.key === \"ArrowDown\") {\n if (selectedTag.value !== null) {\n e.preventDefault()\n selectNextTag()\n }\n } else if (e.key === \"Backspace\") {\n if (selectedTag.value !== null) {\n removeTag(selectedTag.value)\n } else if (isEmptyStartingSelection()) {\n selectPreviousTag()\n }\n }\n }\n\n const handleInputKeyDown = (e: KeyboardEvent) => {\n if (e.key === \"Enter\" || props.delimiters.includes(e.key)) {\n e.preventDefault()\n if (currentInput.value) {\n addTag(currentInput.value)\n currentInput.value = \"\"\n }\n } else if (e.key === \"Tab\") {\n if (currentInput.value) {\n e.preventDefault()\n addTag(currentInput.value)\n currentInput.value = \"\"\n }\n }\n }\n\n const handlePaste = (e: ClipboardEvent) => {\n const text = e.clipboardData?.getData(\"Text\") ?? \"\"\n let parts = [text]\n\n // Split by all delimiters\n for (const delimiter of props.delimiters) {\n const newParts: string[] = []\n for (const segment of parts) {\n newParts.push(...segment.split(delimiter))\n }\n parts = newParts\n }\n\n // Remove empty parts\n parts = parts.filter(Boolean)\n\n if (parts.length > 1) {\n e.preventDefault()\n addTags(parts)\n }\n }\n\n const handleContainerMouseDown = (e: MouseEvent) => {\n // All clicks in the container focus the container\n focused.value = true\n\n // If the click is on a tag pill, the tag's click handler focuses it\n if (e.target && e.target instanceof Element && e.target.closest(\"[data-tag]\")) {\n return\n }\n\n // Since we know we didn't click a tag, clear any selected tag\n selectedTag.value = null\n\n // If this click is outside of the input, prevent it from \"stealing\" focus from the input\n const input = inputRef.value\n if (e.target && e.target instanceof Element && input && !input.contains(e.target)) {\n e.preventDefault()\n\n const { left, right, top, bottom } = input.getBoundingClientRect()\n const { clientX, clientY } = e\n\n // If this is the first click, clear the selection. Otherwise, select the input contents\n if (e.detail === 1) {\n if (clientY < top || clientX < left) {\n // \"Before\" the input: top/left\n input.setSelectionRange(0, 0)\n } else if (clientY > bottom || clientX > right) {\n // \"After\" the input: bottom/right\n const length = input.value.length\n input.setSelectionRange(length, length)\n }\n } else {\n input.select()\n }\n }\n }\n\n const handleFocus = (e: FocusEvent) => {\n // If the focus is on a tag pill, the click handler for the tag handles it\n if (e.target && e.target instanceof Element && e.target.closest(\"[data-tag]\")) {\n return\n }\n focused.value = true\n }\n\n const handleBlur = (e: FocusEvent) => {\n // If there is no related target, don't remove focus (clicks inside the container)\n if (!e.relatedTarget || !(e.relatedTarget instanceof Node)) {\n return\n }\n // Don't clear focus if focus is only moved elsewhere within the container\n if (containerRef.value && containerRef.value.contains(e.relatedTarget)) {\n // If we just tabbed into the input, clear the selected tag\n if (inputRef.value && inputRef.value.contains(e.relatedTarget)) {\n selectedTag.value = null\n }\n return\n }\n handleContainerBlur()\n }\n\n // usehooks-ts' useOnClickOutside: mousedown outside the container\n const handleDocumentMouseDown = (e: MouseEvent) => {\n const container = containerRef.value\n if (!container || !(e.target instanceof Node) || container.contains(e.target)) return\n handleContainerBlur()\n }\n onMounted(() => document.addEventListener(\"mousedown\", handleDocumentMouseDown))\n onBeforeUnmount(() => {\n document.removeEventListener(\"mousedown\", handleDocumentMouseDown)\n observer?.disconnect()\n })\n\n // Focus on mount when requested, like React's initial `focused` state\n onMounted(() => {\n if (focused.value) void nextTick(() => (inputRef.value ?? containerRef.value)?.focus())\n })\n\n return () => [\n h(\n \"div\",\n {\n \"class\": s.Container,\n \"ref\": containerRef,\n \"onKeydown\": handleContainerKeyDown,\n \"onMousedown\": handleContainerMouseDown,\n \"onFocusin\": handleFocus,\n \"onFocusout\": handleBlur,\n \"data-size\": props.size,\n \"data-focused\": focused.value ? \"\" : undefined,\n \"data-empty\": tags.value.size === 0 ? \"\" : undefined,\n \"data-pill\": props.pill ? \"\" : undefined,\n // At maxTags the input is gone, so the container becomes the tab stop;\n // arrow keys and Backspace then select and remove tags from here\n \"tabindex\": showInput.value || props.disabled ? -1 : 0,\n \"style\": toCssVariables({ \"min-rows\": String(props.rows) }),\n \"data-disabled\": props.disabled ? \"\" : undefined,\n },\n [\n h(\"div\", { class: s.TagInput }, [\n ...Array.from(tags.value.values()).map((tag) =>\n h(\n \"div\",\n {\n \"key\": tag.value,\n \"class\": s.Tag,\n \"tabindex\": -1,\n \"onClick\": () => (selectedTag.value = tag.value),\n \"data-tag\": tag.value,\n \"data-invalid\": !tag.valid ? \"\" : undefined,\n \"data-duplicate\": duplicateTags.value.has(tag.value) ? \"\" : undefined,\n },\n [\n h(\"span\", { class: \"overflow-hidden text-ellipsis\", title: tag.value }, [\n h(\"span\", { class: s.TagValue }, tag.value),\n ]),\n h(\n \"div\",\n { \"class\": s.TagRemove, \"onClick\": () => removeTag(tag.value), \"role\": \"button\", \"aria-label\": \"Remove item\" },\n [h(X)],\n ),\n ],\n ),\n ),\n showInput.value\n ? h(\"div\", { class: s.InputContainer }, [\n // Hidden element to measure input width\n h(\"span\", { ref: measureRef, class: s.InputMeasure }),\n h(\"div\", { class: s.InputWrapper }, [\n h(\"input\", {\n id: props.id,\n class: s.Input,\n ref: inputRef,\n value: currentInput.value,\n onInput: (e: Event) => (currentInput.value = (e.target as HTMLInputElement).value),\n onPaste: handlePaste,\n onKeydown: handleInputKeyDown,\n placeholder: placeholderText.value,\n style: { width: `${inputWidth.value}px` },\n disabled: props.disabled,\n }),\n ]),\n ])\n : null,\n ]),\n ],\n ),\n // 0 means no limit, as for the input above: no counter\n props.maxTags\n ? h(\"div\", { class: s.Limit }, [String(tags.value.size), h(\"span\", { class: \"mx-px\" }, \"/\"), String(props.maxTags)])\n : null,\n ]\n },\n})\n\nexport type TagInputProps = InstanceType<typeof TagInput>[\"$props\"]\n"]}
|
|
1
|
+
{"version":3,"file":"TagInput.js","sourceRoot":"","sources":["../../../../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S,EAAE,kBAAkB;oCAC7B,WAAW,EAAE,eAAe,CAAC,KAAK;oCAClC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,KAAK,IAAI,EAAE;oCACzC,QAAQ,EAAE,KAAK,CAAC,QAAQ;iCACzB,CAAC;6BACH,CAAC;yBACH,CAAC;wBACJ,CAAC,CAAC,IAAI;iBACT,CAAC;aACH,CACF;YACD,uDAAuD;YACvD,KAAK,CAAC,OAAO;gBACX,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;gBACpH,CAAC,CAAC,IAAI;SACT,CAAA;IACH,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n computed,\n defineComponent,\n h,\n nextTick,\n onBeforeUnmount,\n onMounted,\n ref,\n shallowRef,\n watch,\n type PropType,\n} from \"vue\"\nimport type { Sizes, Variants } from \"@plexui/styles/types\"\nimport { toCssVariables } from \"../../lib/helpers.js\"\nimport { X } from \"../Icon/index.js\"\nimport s from \"@plexui/styles/components/TagInput/TagInput.module.css\"\n\nexport type Tag = {\n value: string\n valid: boolean\n}\n\n// How many pixels to reserve on the right of the input as a buffer before wrapping to the next line\nconst INPUT_CURSOR_TOLERANCE_PX = 10\n// The total space reserved on either side of the input for padding\nconst CONTAINER_PADDING_PX = 24\nconst SHAKE_ANIMATION_DURATION_MS = 500\n\n/**\n * Port of packages/ui/src/components/TagInput/TagInput.tsx. Controlled with\n * `value` (`v-model:value`), uncontrolled with `defaultValue`; every change\n * emits `update:value` and `change` with the new tag list.\n */\nexport const TagInput = defineComponent({\n name: \"TagInput\",\n // React's TagInput takes no extra attributes (Field's aria-describedby and\n // aria-invalid are ignored); the render has several roots, so drop them\n inheritAttrs: false,\n props: {\n /** The state of the tag input when it is initially rendered, used when uncontrolled */\n defaultValue: { type: Array as PropType<Tag[]>, default: () => [] },\n /** The value of the tag input, used to control the tag input */\n value: Array as PropType<Tag[]>,\n /** Allows the tag input to be targeted with `for` */\n id: String,\n /** Corresponds with Input height when rows=1. @default \"xl\" */\n size: { type: String as PropType<Sizes<\"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"3xl\">>, default: \"xl\" },\n /** Visual style. `ghost` has no frame, for a field that its container already frames. @default \"outline\" */\n variant: { type: String as PropType<Variants<\"outline\" | \"ghost\">>, default: \"outline\" },\n /** Placeholder text for the input */\n placeholder: { type: String, default: \"\" },\n /** Returns whether a value is a valid tag; invalid tags are highlighted. Evaluated on creation only. */\n validator: Function as PropType<(value: string) => boolean>,\n /** The maximum number of tags allowed before the input is disabled; displays a counter below the input */\n maxTags: Number,\n /** Whether to focus this input on mount */\n autoFocus: { type: Boolean, default: false },\n /** The minimum number of rows for the tag input. @default 1 */\n rows: { type: Number, default: 1 },\n /** Controls what characters will count towards creating a new tag. @default [\",\", \" \"] */\n delimiters: { type: Array as PropType<string[]>, default: () => [\",\", \" \"] },\n /** Disables the tag input visually and from interactions */\n disabled: { type: Boolean, default: undefined },\n /** Fully-rounded container and chips, matching `Input pill` */\n pill: { type: Boolean, default: false },\n },\n emits: {\n \"update:value\": (_tags: Tag[]) => true,\n \"change\": (_tags: Tag[]) => true,\n },\n setup(props, { emit }) {\n // Shallow, like React state: emitted lists hold the caller's tag objects, not proxies\n const internalTags = shallowRef<Tag[]>(props.defaultValue)\n const value = computed(() => props.value ?? internalTags.value)\n const isControlled = computed(() => props.value !== undefined)\n const tags = computed(() => new Map(value.value.map((tag) => [tag.value, tag])))\n\n const currentInput = ref(\"\")\n const focused = ref(props.autoFocus)\n const selectedTag = ref<string | null>(null)\n const duplicateTags = ref(new Set<string>())\n const inputWidth = ref(0)\n\n const inputRef = ref<HTMLInputElement | null>(null)\n const containerRef = ref<HTMLDivElement | null>(null)\n const measureRef = ref<HTMLSpanElement | null>(null)\n\n const showInput = computed(() => !props.maxTags || tags.value.size < props.maxTags)\n const placeholderText = computed(() => (tags.value.size === 0 ? props.placeholder : undefined))\n\n // Handle focusing the correct part of the tag input\n watch(\n [focused, selectedTag, showInput],\n () => {\n if (!focused.value || !containerRef.value) {\n return\n }\n const defaultFocusEl = inputRef.value ?? containerRef.value\n if (selectedTag.value === null) {\n defaultFocusEl.focus()\n } else {\n const selectedTagElement = containerRef.value.querySelector(\n `[data-tag=\"${CSS.escape(selectedTag.value)}\"]`,\n ) as HTMLElement | null\n if (selectedTagElement) {\n selectedTagElement.focus()\n } else {\n defaultFocusEl.focus()\n }\n }\n },\n { flush: \"post\" },\n )\n\n // Position the real input inside the container (see the React source for the reasoning)\n let observer: ResizeObserver | undefined\n const measure = () => {\n observer?.disconnect()\n const container = containerRef.value\n const measureEl = measureRef.value\n if (!container || !measureEl) {\n return\n }\n\n const recompute = () => {\n const containerRect = container.getBoundingClientRect()\n const tagElements = Array.from(container.querySelectorAll(\"[data-tag]\")) as HTMLDivElement[]\n\n // Grab the right edge of the last tag if it exists, otherwise the left edge of the container\n const leftBound =\n tagElements.length > 0\n ? tagElements[tagElements.length - 1]!.getBoundingClientRect().right\n : containerRect.left\n\n measureEl.textContent = currentInput.value || placeholderText.value || \"\"\n\n // By padding the text width, we ensure the input wraps to the next line\n // before we get to the point where we start to overflow\n const textWidth = measureEl.getBoundingClientRect().width + INPUT_CURSOR_TOLERANCE_PX\n const remainingSpace = containerRect.right - leftBound - CONTAINER_PADDING_PX\n\n if (textWidth <= remainingSpace) {\n inputWidth.value = remainingSpace\n } else {\n // We are going to flow to a new line, so recalculate remaining space based on the container size\n inputWidth.value = containerRect.right - containerRect.left - CONTAINER_PADDING_PX\n }\n }\n\n recompute()\n observer = new ResizeObserver(recompute)\n observer.observe(container)\n container.querySelectorAll(\"[data-tag]\").forEach((chip) => observer!.observe(chip))\n }\n onMounted(measure)\n watch([currentInput, placeholderText, tags], measure, { flush: \"post\" })\n\n const setTags = (newTags: Tag[]) => {\n emit(\"update:value\", newTags)\n emit(\"change\", newTags)\n if (!isControlled.value) {\n internalTags.value = newTags\n }\n }\n\n // Adds every value in one update: a paste of \"a,b\" must not compute\n // each addition from the same stale `tags` snapshot.\n const addTags = (tagValues: string[]) => {\n const next = new Map(tags.value)\n let changed = false\n for (const tagValue of tagValues) {\n if (props.maxTags && next.size >= props.maxTags) {\n break\n }\n const trimmed = tagValue.trim()\n if (!trimmed) {\n continue\n }\n if (next.has(trimmed)) {\n duplicateTags.value = new Set(duplicateTags.value).add(trimmed)\n setTimeout(() => {\n const remaining = new Set(duplicateTags.value)\n remaining.delete(trimmed)\n duplicateTags.value = remaining\n }, SHAKE_ANIMATION_DURATION_MS)\n continue\n }\n const validTag = props.validator?.(trimmed) ?? true\n next.set(trimmed, { value: trimmed, valid: validTag })\n changed = true\n }\n if (!changed) {\n return\n }\n setTags(Array.from(next.values()))\n }\n\n const addTag = (tagValue: string) => addTags([tagValue])\n\n const removeTag = (tag: string) => {\n if (props.disabled) {\n return\n }\n const next = new Map(tags.value)\n next.delete(tag)\n setTags(Array.from(next.values()))\n if (selectedTag.value === tag) {\n selectedTag.value = null\n }\n }\n\n const selectPreviousTag = () => {\n if (tags.value.size === 0) {\n return\n }\n const tagList = Array.from(tags.value.keys())\n if (selectedTag.value === null) {\n selectedTag.value = tagList[tagList.length - 1]!\n } else {\n const prevIndex = tagList.indexOf(selectedTag.value)\n selectedTag.value = tagList[Math.max(0, prevIndex - 1)]!\n }\n }\n\n const selectNextTag = () => {\n if (selectedTag.value === null) {\n return\n }\n const tagList = Array.from(tags.value.keys())\n const index = tagList.indexOf(selectedTag.value) + 1\n selectedTag.value = index < tagList.length ? tagList[index]! : null\n }\n\n const isEmptyStartingSelection = () => {\n const input = inputRef.value\n if (!input) {\n return true\n }\n return input.selectionStart === 0 && input.selectionEnd === 0\n }\n\n const handleContainerBlur = () => {\n focused.value = false\n selectedTag.value = null\n // A disabled tag input keeps the pending text instead of committing it\n if (currentInput.value && !props.disabled) {\n addTag(currentInput.value)\n currentInput.value = \"\"\n }\n }\n\n const handleContainerKeyDown = (e: KeyboardEvent) => {\n // A tag can keep focus while the input turns disabled: no selecting or removing then\n if (props.disabled) {\n return\n }\n if (e.key === \"ArrowLeft\" || e.key === \"ArrowUp\") {\n if (isEmptyStartingSelection()) {\n e.preventDefault()\n selectPreviousTag()\n }\n } else if (e.key === \"ArrowRight\" || e.key === \"ArrowDown\") {\n if (selectedTag.value !== null) {\n e.preventDefault()\n selectNextTag()\n }\n } else if (e.key === \"Backspace\") {\n if (selectedTag.value !== null) {\n removeTag(selectedTag.value)\n } else if (isEmptyStartingSelection()) {\n selectPreviousTag()\n }\n }\n }\n\n const handleInputKeyDown = (e: KeyboardEvent) => {\n if (e.key === \"Enter\" || props.delimiters.includes(e.key)) {\n e.preventDefault()\n if (currentInput.value) {\n addTag(currentInput.value)\n currentInput.value = \"\"\n }\n } else if (e.key === \"Tab\") {\n if (currentInput.value) {\n e.preventDefault()\n addTag(currentInput.value)\n currentInput.value = \"\"\n }\n }\n }\n\n const handlePaste = (e: ClipboardEvent) => {\n const text = e.clipboardData?.getData(\"Text\") ?? \"\"\n let parts = [text]\n\n // Split by all delimiters\n for (const delimiter of props.delimiters) {\n const newParts: string[] = []\n for (const segment of parts) {\n newParts.push(...segment.split(delimiter))\n }\n parts = newParts\n }\n\n // Remove empty parts\n parts = parts.filter(Boolean)\n\n if (parts.length > 1) {\n e.preventDefault()\n addTags(parts)\n }\n }\n\n const handleContainerMouseDown = (e: MouseEvent) => {\n // All clicks in the container focus the container\n focused.value = true\n\n // If the click is on a tag pill, the tag's click handler focuses it\n if (e.target && e.target instanceof Element && e.target.closest(\"[data-tag]\")) {\n return\n }\n\n // Since we know we didn't click a tag, clear any selected tag\n selectedTag.value = null\n\n // If this click is outside of the input, prevent it from \"stealing\" focus from the input\n const input = inputRef.value\n if (e.target && e.target instanceof Element && input && !input.contains(e.target)) {\n e.preventDefault()\n\n const { left, right, top, bottom } = input.getBoundingClientRect()\n const { clientX, clientY } = e\n\n // If this is the first click, clear the selection. Otherwise, select the input contents\n if (e.detail === 1) {\n if (clientY < top || clientX < left) {\n // \"Before\" the input: top/left\n input.setSelectionRange(0, 0)\n } else if (clientY > bottom || clientX > right) {\n // \"After\" the input: bottom/right\n const length = input.value.length\n input.setSelectionRange(length, length)\n }\n } else {\n input.select()\n }\n }\n }\n\n const handleFocus = (e: FocusEvent) => {\n // If the focus is on a tag pill, the click handler for the tag handles it\n if (e.target && e.target instanceof Element && e.target.closest(\"[data-tag]\")) {\n return\n }\n focused.value = true\n }\n\n const handleBlur = (e: FocusEvent) => {\n // If there is no related target, don't remove focus (clicks inside the container)\n if (!e.relatedTarget || !(e.relatedTarget instanceof Node)) {\n return\n }\n // Don't clear focus if focus is only moved elsewhere within the container\n if (containerRef.value && containerRef.value.contains(e.relatedTarget)) {\n // If we just tabbed into the input, clear the selected tag\n if (inputRef.value && inputRef.value.contains(e.relatedTarget)) {\n selectedTag.value = null\n }\n return\n }\n handleContainerBlur()\n }\n\n // usehooks-ts' useOnClickOutside: mousedown outside the container\n const handleDocumentMouseDown = (e: MouseEvent) => {\n const container = containerRef.value\n if (!container || !(e.target instanceof Node) || container.contains(e.target)) return\n handleContainerBlur()\n }\n onMounted(() => document.addEventListener(\"mousedown\", handleDocumentMouseDown))\n onBeforeUnmount(() => {\n document.removeEventListener(\"mousedown\", handleDocumentMouseDown)\n observer?.disconnect()\n })\n\n // Focus on mount when requested, like React's initial `focused` state\n onMounted(() => {\n if (focused.value) void nextTick(() => (inputRef.value ?? containerRef.value)?.focus())\n })\n\n return () => [\n h(\n \"div\",\n {\n \"class\": s.Container,\n \"ref\": containerRef,\n \"onKeydown\": handleContainerKeyDown,\n \"onMousedown\": handleContainerMouseDown,\n \"onFocusin\": handleFocus,\n \"onFocusout\": handleBlur,\n \"data-size\": props.size,\n \"data-variant\": props.variant,\n \"data-focused\": focused.value ? \"\" : undefined,\n \"data-empty\": tags.value.size === 0 ? \"\" : undefined,\n \"data-pill\": props.pill ? \"\" : undefined,\n // At maxTags the input is gone, so the container becomes the tab stop;\n // arrow keys and Backspace then select and remove tags from here\n \"tabindex\": showInput.value || props.disabled ? -1 : 0,\n \"style\": toCssVariables({ \"min-rows\": String(props.rows) }),\n \"data-disabled\": props.disabled ? \"\" : undefined,\n },\n [\n h(\"div\", { class: s.TagInput }, [\n ...Array.from(tags.value.values()).map((tag) =>\n h(\n \"div\",\n {\n \"key\": tag.value,\n \"class\": s.Tag,\n \"tabindex\": -1,\n \"onClick\": () => (selectedTag.value = tag.value),\n \"data-tag\": tag.value,\n \"data-invalid\": !tag.valid ? \"\" : undefined,\n \"data-duplicate\": duplicateTags.value.has(tag.value) ? \"\" : undefined,\n },\n [\n h(\"span\", { class: \"overflow-hidden text-ellipsis\", title: tag.value }, [\n h(\"span\", { class: s.TagValue }, tag.value),\n ]),\n h(\n \"div\",\n { \"class\": s.TagRemove, \"onClick\": () => removeTag(tag.value), \"role\": \"button\", \"aria-label\": \"Remove item\" },\n [h(X)],\n ),\n ],\n ),\n ),\n showInput.value\n ? h(\"div\", { class: s.InputContainer }, [\n // Hidden element to measure input width\n h(\"span\", { ref: measureRef, class: s.InputMeasure }),\n h(\"div\", { class: s.InputWrapper }, [\n h(\"input\", {\n id: props.id,\n class: s.Input,\n ref: inputRef,\n value: currentInput.value,\n onInput: (e: Event) => (currentInput.value = (e.target as HTMLInputElement).value),\n onPaste: handlePaste,\n onKeydown: handleInputKeyDown,\n placeholder: placeholderText.value,\n style: { width: `${inputWidth.value}px` },\n disabled: props.disabled,\n }),\n ]),\n ])\n : null,\n ]),\n ],\n ),\n // 0 means no limit, as for the input above: no counter\n props.maxTags\n ? h(\"div\", { class: s.Limit }, [String(tags.value.size), h(\"span\", { class: \"mx-px\" }, \"/\"), String(props.maxTags)])\n : null,\n ]\n },\n})\n\nexport type TagInputProps = InstanceType<typeof TagInput>[\"$props\"]\n"]}
|