@plexui/vue 0.22.0 → 0.23.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.
Files changed (79) hide show
  1. package/dist/es/components/Alert/Alert.js +16 -4
  2. package/dist/es/components/Alert/Alert.js.map +1 -1
  3. package/dist/es/components/ColorPicker/ColorPicker.js +13 -9
  4. package/dist/es/components/ColorPicker/ColorPicker.js.map +1 -1
  5. package/dist/es/components/ColorPicker/ColorWell.js +5 -3
  6. package/dist/es/components/ColorPicker/ColorWell.js.map +1 -1
  7. package/dist/es/components/ColorPicker/shared.js +5 -4
  8. package/dist/es/components/ColorPicker/shared.js.map +1 -1
  9. package/dist/es/components/ContextMenu/ContextMenu.js +9 -9
  10. package/dist/es/components/ContextMenu/ContextMenu.js.map +1 -1
  11. package/dist/es/components/ContextMenu/shared.js +25 -5
  12. package/dist/es/components/ContextMenu/shared.js.map +1 -1
  13. package/dist/es/components/DatePicker/DatePicker.js +3 -3
  14. package/dist/es/components/DatePicker/DatePicker.js.map +1 -1
  15. package/dist/es/components/DatePicker/useCalendarCollisionPadding.js +25 -0
  16. package/dist/es/components/DatePicker/useCalendarCollisionPadding.js.map +1 -0
  17. package/dist/es/components/DateRangePicker/DateRangePicker.js +3 -3
  18. package/dist/es/components/DateRangePicker/DateRangePicker.js.map +1 -1
  19. package/dist/es/components/Dialog/Dialog.js +2 -2
  20. package/dist/es/components/Dialog/Dialog.js.map +1 -1
  21. package/dist/es/components/Input/Input.js +3 -0
  22. package/dist/es/components/Input/Input.js.map +1 -1
  23. package/dist/es/components/Menu/Menu.js +10 -1
  24. package/dist/es/components/Menu/Menu.js.map +1 -1
  25. package/dist/es/components/PhoneLayout/PhoneLayout.js +9 -1
  26. package/dist/es/components/PhoneLayout/PhoneLayout.js.map +1 -1
  27. package/dist/es/components/Popover/Popover.js +2 -2
  28. package/dist/es/components/Popover/Popover.js.map +1 -1
  29. package/dist/es/components/ProgressSteps/ProgressSteps.js +7 -3
  30. package/dist/es/components/ProgressSteps/ProgressSteps.js.map +1 -1
  31. package/dist/es/components/ProgressSteps/index.js.map +1 -1
  32. package/dist/es/components/Select/Select.js +178 -32
  33. package/dist/es/components/Select/Select.js.map +1 -1
  34. package/dist/es/components/SelectControl/SelectControl.js +3 -1
  35. package/dist/es/components/SelectControl/SelectControl.js.map +1 -1
  36. package/dist/es/components/Slider/Slider.js +24 -11
  37. package/dist/es/components/Slider/Slider.js.map +1 -1
  38. package/dist/es/components/Slider/sliderPrimitive.js +5 -2
  39. package/dist/es/components/Slider/sliderPrimitive.js.map +1 -1
  40. package/dist/es/components/Sortable/Sortable.js +1 -1
  41. package/dist/es/components/Sortable/Sortable.js.map +1 -1
  42. package/dist/es/components/StatCard/index.js +4 -1
  43. package/dist/es/components/StatCard/index.js.map +1 -1
  44. package/dist/es/components/{StatCard/StatCard.js → StatsCard/StatsCard.js} +32 -27
  45. package/dist/es/components/StatsCard/StatsCard.js.map +1 -0
  46. package/dist/es/components/StatsCard/index.js +2 -0
  47. package/dist/es/components/StatsCard/index.js.map +1 -0
  48. package/dist/es/components/SwipeActions/SwipeActions.js +32 -5
  49. package/dist/es/components/SwipeActions/SwipeActions.js.map +1 -1
  50. package/dist/es/components/TabBar/TabBar.js +52 -21
  51. package/dist/es/components/TabBar/TabBar.js.map +1 -1
  52. package/dist/es/components/Tabs/Tabs.js +229 -6
  53. package/dist/es/components/Tabs/Tabs.js.map +1 -1
  54. package/dist/es/components/Toolbar/Toolbar.js.map +1 -1
  55. package/dist/es/lib/menuTriggerCover.js +40 -3
  56. package/dist/es/lib/menuTriggerCover.js.map +1 -1
  57. package/dist/types/components/ColorPicker/ColorPicker.d.ts +3 -2
  58. package/dist/types/components/ColorPicker/shared.d.ts +5 -4
  59. package/dist/types/components/ContextMenu/shared.d.ts +28 -6
  60. package/dist/types/components/DatePicker/useCalendarCollisionPadding.d.ts +9 -0
  61. package/dist/types/components/Dialog/Dialog.d.ts +2 -2
  62. package/dist/types/components/PhoneLayout/PhoneLayout.d.ts +5 -0
  63. package/dist/types/components/Popover/Popover.d.ts +5 -5
  64. package/dist/types/components/ProgressSteps/ProgressSteps.d.ts +17 -3
  65. package/dist/types/components/ProgressSteps/index.d.ts +1 -1
  66. package/dist/types/components/Select/Select.d.ts +19 -8
  67. package/dist/types/components/StatCard/index.d.ts +9 -1
  68. package/dist/types/components/{StatCard/StatCard.d.ts → StatsCard/StatsCard.d.ts} +19 -19
  69. package/dist/types/components/StatsCard/index.d.ts +1 -0
  70. package/dist/types/components/SwipeActions/SwipeActions.d.ts +4 -4
  71. package/dist/types/components/TabBar/TabBar.d.ts +34 -0
  72. package/dist/types/components/Tabs/Tabs.d.ts +33 -2
  73. package/dist/types/components/Toolbar/Toolbar.d.ts +1 -1
  74. package/dist/types/lib/menuTriggerCover.d.ts +16 -2
  75. package/package.json +2 -2
  76. package/dist/es/components/DatePicker/useCalendarGutter.js +0 -14
  77. package/dist/es/components/DatePicker/useCalendarGutter.js.map +0 -1
  78. package/dist/es/components/StatCard/StatCard.js.map +0 -1
  79. package/dist/types/components/DatePicker/useCalendarGutter.d.ts +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../src/components/Input/Input.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAmB,MAAM,MAAM,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,EAAsE,MAAM,KAAK,CAAA;AAEhL,OAAO,EAAE,CAAC,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,CAAC,MAAM,kDAAkD,CAA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E,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,eAAe,EAAE,YAAY,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;IACjH,CAAC;CACF,CAAC,CAAA;AAQF,MAAM,CAAC,MAAM,oBAAoB,GAAG,6BAEnC,CAAA","sourcesContent":["import clsx, { type ClassValue } from \"clsx\"\nimport { defineComponent, h, mergeProps, nextTick, onMounted, ref, useId, watch, withDirectives, type ButtonHTMLAttributes, type InputHTMLAttributes, type PropType } from \"vue\"\nimport type { ControlSize, SemanticColor, Sizes, Variants } from \"@plexui/styles/types\"\nimport { X, XCircleFilled } from \"../Icon/index.js\"\nimport { vDefaultValue } from \"../../lib/defaultValue.js\"\nimport { useFieldRowPill } from \"../../lib/fieldRow.js\"\nimport { hasContent } from \"../../lib/slotContent.js\"\nimport s from \"@plexui/styles/components/Input/Input.module.css\"\n\n// Vue port of packages/ui/src/components/Input/Input.tsx.\n// - `class` goes to the container; every other attribute and native listener\n// (`@input`, `@change`, `@focus`, `style`, `placeholder`, ...) goes to the\n// <input>, as React spreads its rest props there.\n// - `value` + `update:value` support `v-model:value`; `default-value` sets the\n// initial value of an uncontrolled input through `vDefaultValue` (server\n// markup, hydration and later changes as in React), so re-renders never\n// reset what the user typed.\n// - `startAdornment` / `endAdornment` are slots. `onClear` stays a function\n// prop (`@clear` in templates) because its presence adds the clear button.\n// - `autoComplete` reaches the <input> as `autocomplete`, and `invalid` also\n// sets `aria-invalid` there unless the caller passes its own, as in React.\n\nconst InputComponent = defineComponent({\n name: \"Input\",\n inheritAttrs: false,\n props: {\n /** Visual style of the input. @default \"outline\" */\n variant: { type: String as PropType<Variants<\"outline\" | \"soft\" | \"ghost\">>, default: \"outline\" },\n /** Controls the size of the input: `3xs` 22px up to `3xl` 48px. @default \"md\" */\n size: { type: String as PropType<ControlSize>, default: \"md\" },\n /** Controls gutter on the edges of the input, defaults to value from `size`. */\n gutterSize: String as PropType<Sizes<\"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\">>,\n /** Disables the input visually and from interactions. @default false */\n disabled: { type: Boolean, default: false },\n /** Makes the input read-only. @default false */\n readOnly: { type: Boolean, default: false },\n /** Native spelling of `readOnly` (`<Input readonly />`). @default false */\n readonly: { type: Boolean, default: false },\n /** Mark the input as invalid. @default false */\n invalid: { type: Boolean, default: false },\n /**\n * Allow autofill extensions to appear in the input.\n * @default true when `type=\"password\"` or `name` is set, otherwise false\n */\n allowAutofillExtensions: { type: Boolean, default: undefined },\n /** Select all contents of the input when mounted, and whenever it turns true. @default false */\n autoSelect: { type: Boolean, default: undefined },\n /** Shows the clear button while the input has a value; called when it is clicked. */\n onClear: Function as PropType<(event: MouseEvent) => void>,\n /** Fully rounded pill shape. @default false, or true at the end of a `Field row` */\n pill: { type: Boolean, default: undefined },\n /** Applies a negative margin using the current gutter to optically align the input with surrounding content. */\n opticallyAlign: String as PropType<\"start\" | \"end\">,\n id: String,\n name: String,\n /** @default \"text\" */\n type: { type: String, default: \"text\" },\n /** Controlled value. Bind `v-model:value` to keep it in sync. */\n value: { type: [String, Number] as PropType<string | number>, default: undefined },\n /** Initial value when uncontrolled. */\n defaultValue: { type: [String, Number] as PropType<string | number>, default: undefined },\n /** Native `autocomplete` of the <input>. */\n autoComplete: String,\n },\n emits: {\n \"update:value\": (value: string) => typeof value === \"string\",\n \"autofill\": () => true,\n },\n setup(props, { attrs, slots, emit, expose }) {\n const inputRef = ref<HTMLInputElement | null>(null)\n // Prevent 1Password from appearing: 1Password won't display if it thinks this field is for searching\n // Allow user to override this for connecting to labels.\n const onePasswordPreventionId = `search-ui-input-${useId()}`\n const pill = useFieldRowPill(() => props.pill)\n const focused = ref(false)\n\n // Redirect clicks on the container and adornments\n const handleMouseDown = (evt: MouseEvent) => {\n const input = inputRef.value\n // Bail out if the target is not an element or the input is not found\n if (!evt.target || !(evt.target instanceof Element) || !input) {\n return\n }\n // Bail out if the target is inside the input\n if (input.contains(evt.target)) {\n return\n }\n // Bail out if the target is a button\n if (evt.target.closest(\"button, [type='button'], [role='button'], [role='menuitem']\")) {\n return\n }\n\n evt.preventDefault()\n // If the input is not focused, focus it\n if (document.activeElement !== input) {\n input.focus()\n }\n\n const { left, top } = input.getBoundingClientRect()\n const { clientX, clientY } = evt\n // \"Before\" the input: top/left\n const isBefore = clientY < top || clientX < left\n // email, number and other types without the selection API throw on setSelectionRange\n const hasSelection = input.selectionStart !== null\n\n // If this is the first click, clear the selection.\n if (evt.detail === 1) {\n if (!hasSelection) return\n if (isBefore) {\n input.setSelectionRange(0, 0)\n } else {\n const length = input.value.length\n input.setSelectionRange(length, length)\n }\n }\n // If this is the second click, select the first or last word\n else if (evt.detail === 2) {\n if (!hasSelection) return\n // Split the input value into words and non-word characters\n const words = input.value.match(/\\w+|[^\\w\\s]/g) || []\n const selectedWord = isBefore ? words.at(0) : words.at(-1)\n if (selectedWord) {\n const wordIndex = isBefore ? input.value.indexOf(selectedWord) : input.value.lastIndexOf(selectedWord)\n input.setSelectionRange(wordIndex, wordIndex + selectedWord.length)\n }\n }\n // If this is the third click or greater, select the entire input\n else {\n input.select()\n }\n }\n\n const selectIfAuto = () => {\n if (props.autoSelect) {\n inputRef.value?.select()\n }\n }\n onMounted(() => {\n selectIfAuto()\n // An enclosing focus scope may focus the input during the same mount.\n // Reconcile after the mount finishes without focusing it a second time.\n void nextTick(() => {\n const input = inputRef.value\n focused.value = !!input && input.ownerDocument.activeElement === input\n })\n })\n watch(() => props.autoSelect, selectIfAuto, { flush: \"post\" })\n\n // The clear button unmounts once the value is gone, so keep focus in the input\n const handleClear = (evt: MouseEvent) => {\n inputRef.value?.focus()\n props.onClear?.(evt)\n }\n\n const handleAnimationStart = (evt: AnimationEvent) => {\n if (evt.animationName === \"native-autofill-in\") {\n emit(\"autofill\")\n }\n }\n\n const handleInput = (evt: Event) => {\n const target = evt.currentTarget as HTMLInputElement\n emit(\"update:value\", target.value)\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 expose({ focus: () => inputRef.value?.focus(), input: inputRef })\n\n return () => {\n const { class: className, ...restAttrs } = attrs\n const { value, defaultValue, disabled } = props\n const readOnly = props.readOnly || props.readonly\n // Default to `true` when type=\"password\" or presence of `name`\n const allowAutofillExtensions = props.allowAutofillExtensions ?? (props.type === \"password\" || !!props.name)\n const startAdornment = slots.startAdornment?.()\n const endAdornment = slots.endAdornment?.()\n const hasStartAdornment = hasContent(startAdornment)\n const hasEndAdornment = hasContent(endAdornment)\n\n // Determine if clear button should be shown\n const hasValue = String((value !== undefined ? value : defaultValue) ?? \"\") !== \"\"\n const showClearButton = !!props.onClear && hasValue && !disabled && !readOnly\n\n return h(\n \"div\",\n {\n \"class\": clsx(s.Container, className as ClassValue),\n \"data-slot\": \"input\",\n \"data-variant\": props.variant,\n \"data-size\": props.size,\n \"data-gutter-size\": props.gutterSize,\n \"data-focused\": focused.value,\n \"data-disabled\": disabled ? \"\" : undefined,\n \"data-readonly\": readOnly ? \"\" : undefined,\n \"data-invalid\": props.invalid ? \"\" : undefined,\n \"data-pill\": pill.value ? \"\" : undefined,\n \"data-optically-align\": props.opticallyAlign,\n \"data-has-start-adornment\": hasStartAdornment ? \"\" : undefined,\n \"data-has-end-adornment\": hasEndAdornment || showClearButton ? \"\" : undefined,\n \"onMousedown\": handleMouseDown,\n },\n [\n hasStartAdornment ? startAdornment : null,\n withDirectives(\n h(\n \"input\",\n mergeProps(restAttrs, {\n \"ref\": inputRef,\n \"id\": props.id || (allowAutofillExtensions ? undefined : onePasswordPreventionId),\n \"class\": s.Input,\n \"type\": props.type,\n // Only when set, so a native `autocomplete` attribute still applies\n ...(props.autoComplete !== undefined ? { autocomplete: props.autoComplete } : {}),\n // Expose the visual invalid state to assistive tech; an explicit aria-invalid wins\n \"aria-invalid\": restAttrs[\"aria-invalid\"] ?? (props.invalid || undefined),\n \"name\": props.name,\n // Controlled: the `value` property follows the prop. Uncontrolled:\n // `vDefaultValue` below sets the initial value, as in React.\n ...(value !== undefined ? { value } : {}),\n \"readonly\": readOnly,\n \"disabled\": disabled,\n \"onInput\": handleInput,\n // Use bubbling focus events for state, independently of a layer\n // capture listener. Caller @focus/@blur still receive their native events.\n \"onFocusin\": () => {\n focused.value = true\n },\n \"onFocusout\": () => {\n focused.value = false\n },\n \"onAnimationstart\": handleAnimationStart,\n // Prevent LastPass and 1Password from appearing\n \"data-lpignore\": allowAutofillExtensions ? undefined : true,\n \"data-1p-ignore\": allowAutofillExtensions ? undefined : true,\n }),\n ),\n [[vDefaultValue, value === undefined ? defaultValue : undefined]],\n ),\n showClearButton\n ? h(\"button\", { \"type\": \"button\", \"aria-label\": \"Clear input\", \"class\": s.Clear, \"onClick\": handleClear }, [\n h(X, { class: s.ClearIcon }),\n h(XCircleFilled, { class: s.ClearPhoneIcon }),\n ])\n : null,\n hasEndAdornment ? endAdornment : null,\n ],\n )\n }\n },\n})\n\ntype InputOwnProps = InstanceType<typeof InputComponent>[\"$props\"]\n\n/** Input props plus the native <input> attributes that fall through to it, as in React. */\nexport type InputProps = InputOwnProps & Omit<InputHTMLAttributes, keyof InputOwnProps>\n\n/** Text input with adornment slots, a clear button and autofill-extension control. */\nexport const Input = InputComponent as typeof InputComponent & { new (): { $props: InputProps } }\n\n/**\n * Canonical inline action button for Input adornments (React\n * `Input.AdornmentButton`): mic toggle, visibility toggle, copy, ... It sizes\n * itself off the parent Input so it matches the built-in clear button.\n */\nconst InputAdornmentButtonComponent = defineComponent({\n name: \"InputAdornmentButton\",\n props: {\n /** @default \"button\" */\n type: { type: String as PropType<\"button\" | \"submit\" | \"reset\">, default: \"button\" },\n /**\n * Semantic color tint for the pressed (`aria-pressed=\"true\"`) state, the\n * same palette Button accepts. Unset keeps the neutral primary-soft tint.\n */\n color: String as PropType<SemanticColor>,\n },\n setup(props, { slots }) {\n return () =>\n h(\"button\", { \"type\": props.type, \"class\": s.AdornmentButton, \"data-color\": props.color }, slots.default?.())\n },\n})\n\ntype InputAdornmentButtonOwnProps = InstanceType<typeof InputAdornmentButtonComponent>[\"$props\"]\n\n/** AdornmentButton props plus the native <button> attributes that fall through to it. */\nexport type InputAdornmentButtonProps = InputAdornmentButtonOwnProps &\n Omit<ButtonHTMLAttributes, keyof InputAdornmentButtonOwnProps>\n\nexport const InputAdornmentButton = InputAdornmentButtonComponent as typeof InputAdornmentButtonComponent & {\n new (): { $props: InputAdornmentButtonProps }\n}\n"]}
1
+ {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../src/components/Input/Input.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAmB,MAAM,MAAM,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,EAAsE,MAAM,KAAK,CAAA;AAEhL,OAAO,EAAE,CAAC,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,CAAC,MAAM,kDAAkD,CAAA;AAEhE,0DAA0D;AAC1D,6EAA6E;AAC7E,6EAA6E;AAC7E,oDAAoD;AACpD,+EAA+E;AAC/E,2EAA2E;AAC3E,0EAA0E;AAC1E,+BAA+B;AAC/B,4EAA4E;AAC5E,6EAA6E;AAC7E,6EAA6E;AAC7E,6EAA6E;AAE7E,MAAM,cAAc,GAAG,eAAe,CAAC;IACrC,IAAI,EAAE,OAAO;IACb,YAAY,EAAE,KAAK;IACnB,KAAK,EAAE;QACL,oDAAoD;QACpD,OAAO,EAAE,EAAE,IAAI,EA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EnC,CAAA","sourcesContent":["import clsx, { type ClassValue } from \"clsx\"\nimport { defineComponent, h, mergeProps, nextTick, onMounted, ref, useId, watch, withDirectives, type ButtonHTMLAttributes, type InputHTMLAttributes, type PropType } from \"vue\"\nimport type { ControlSize, SemanticColor, Sizes, Variants } from \"@plexui/styles/types\"\nimport { X, XCircleFilled } from \"../Icon/index.js\"\nimport { vDefaultValue } from \"../../lib/defaultValue.js\"\nimport { useFieldRowPill } from \"../../lib/fieldRow.js\"\nimport { hasContent } from \"../../lib/slotContent.js\"\nimport s from \"@plexui/styles/components/Input/Input.module.css\"\n\n// Vue port of packages/ui/src/components/Input/Input.tsx.\n// - `class` goes to the container; every other attribute and native listener\n// (`@input`, `@change`, `@focus`, `style`, `placeholder`, ...) goes to the\n// <input>, as React spreads its rest props there.\n// - `value` + `update:value` support `v-model:value`; `default-value` sets the\n// initial value of an uncontrolled input through `vDefaultValue` (server\n// markup, hydration and later changes as in React), so re-renders never\n// reset what the user typed.\n// - `startAdornment` / `endAdornment` are slots. `onClear` stays a function\n// prop (`@clear` in templates) because its presence adds the clear button.\n// - `autoComplete` reaches the <input> as `autocomplete`, and `invalid` also\n// sets `aria-invalid` there unless the caller passes its own, as in React.\n\nconst InputComponent = defineComponent({\n name: \"Input\",\n inheritAttrs: false,\n props: {\n /** Visual style of the input. @default \"outline\" */\n variant: { type: String as PropType<Variants<\"outline\" | \"soft\" | \"ghost\">>, default: \"outline\" },\n /** Controls the size of the input: `3xs` 22px up to `3xl` 48px. @default \"md\" */\n size: { type: String as PropType<ControlSize>, default: \"md\" },\n /** Controls gutter on the edges of the input, defaults to value from `size`. */\n gutterSize: String as PropType<Sizes<\"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\">>,\n /** Disables the input visually and from interactions. @default false */\n disabled: { type: Boolean, default: false },\n /** Makes the input read-only. @default false */\n readOnly: { type: Boolean, default: false },\n /** Native spelling of `readOnly` (`<Input readonly />`). @default false */\n readonly: { type: Boolean, default: false },\n /** Mark the input as invalid. @default false */\n invalid: { type: Boolean, default: false },\n /**\n * Allow autofill extensions to appear in the input.\n * @default true when `type=\"password\"` or `name` is set, otherwise false\n */\n allowAutofillExtensions: { type: Boolean, default: undefined },\n /** Select all contents of the input when mounted, and whenever it turns true. @default false */\n autoSelect: { type: Boolean, default: undefined },\n /** Shows the clear button while the input has a value; called when it is clicked. */\n onClear: Function as PropType<(event: MouseEvent) => void>,\n /** Fully rounded pill shape. @default false, or true at the end of a `Field row` */\n pill: { type: Boolean, default: undefined },\n /** Applies a negative margin using the current gutter to optically align the input with surrounding content. */\n opticallyAlign: String as PropType<\"start\" | \"end\">,\n id: String,\n name: String,\n /** @default \"text\" */\n type: { type: String, default: \"text\" },\n /** Controlled value. Bind `v-model:value` to keep it in sync. */\n value: { type: [String, Number] as PropType<string | number>, default: undefined },\n /** Initial value when uncontrolled. */\n defaultValue: { type: [String, Number] as PropType<string | number>, default: undefined },\n /** Native `autocomplete` of the <input>. */\n autoComplete: String,\n },\n emits: {\n \"update:value\": (value: string) => typeof value === \"string\",\n \"autofill\": () => true,\n },\n setup(props, { attrs, slots, emit, expose }) {\n const inputRef = ref<HTMLInputElement | null>(null)\n // Prevent 1Password from appearing: 1Password won't display if it thinks this field is for searching\n // Allow user to override this for connecting to labels.\n const onePasswordPreventionId = `search-ui-input-${useId()}`\n const pill = useFieldRowPill(() => props.pill)\n const focused = ref(false)\n\n // Redirect clicks on the container and adornments\n const handleMouseDown = (evt: MouseEvent) => {\n const input = inputRef.value\n // Bail out if the target is not an element or the input is not found\n if (!evt.target || !(evt.target instanceof Element) || !input) {\n return\n }\n // Bail out if the target is inside the input\n if (input.contains(evt.target)) {\n return\n }\n // Bail out if the target is a button\n if (evt.target.closest(\"button, [type='button'], [role='button'], [role='menuitem']\")) {\n return\n }\n\n evt.preventDefault()\n // If the input is not focused, focus it\n if (document.activeElement !== input) {\n input.focus()\n }\n\n const { left, top } = input.getBoundingClientRect()\n const { clientX, clientY } = evt\n // \"Before\" the input: top/left\n const isBefore = clientY < top || clientX < left\n // email, number and other types without the selection API throw on setSelectionRange\n const hasSelection = input.selectionStart !== null\n\n // If this is the first click, clear the selection.\n if (evt.detail === 1) {\n if (!hasSelection) return\n if (isBefore) {\n input.setSelectionRange(0, 0)\n } else {\n const length = input.value.length\n input.setSelectionRange(length, length)\n }\n }\n // If this is the second click, select the first or last word\n else if (evt.detail === 2) {\n if (!hasSelection) return\n // Split the input value into words and non-word characters\n const words = input.value.match(/\\w+|[^\\w\\s]/g) || []\n const selectedWord = isBefore ? words.at(0) : words.at(-1)\n if (selectedWord) {\n const wordIndex = isBefore ? input.value.indexOf(selectedWord) : input.value.lastIndexOf(selectedWord)\n input.setSelectionRange(wordIndex, wordIndex + selectedWord.length)\n }\n }\n // If this is the third click or greater, select the entire input\n else {\n input.select()\n }\n }\n\n const selectIfAuto = () => {\n if (props.autoSelect) {\n inputRef.value?.select()\n }\n }\n onMounted(() => {\n selectIfAuto()\n // An enclosing focus scope may focus the input during the same mount.\n // Reconcile after the mount finishes without focusing it a second time.\n void nextTick(() => {\n const input = inputRef.value\n focused.value = !!input && input.ownerDocument.activeElement === input\n })\n })\n watch(() => props.autoSelect, selectIfAuto, { flush: \"post\" })\n\n // The clear button unmounts once the value is gone, so keep focus in the input\n const handleClear = (evt: MouseEvent) => {\n inputRef.value?.focus()\n props.onClear?.(evt)\n }\n\n const handleAnimationStart = (evt: AnimationEvent) => {\n if (evt.animationName === \"native-autofill-in\") {\n emit(\"autofill\")\n }\n }\n\n const handleInput = (evt: Event) => {\n const target = evt.currentTarget as HTMLInputElement\n emit(\"update:value\", target.value)\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 expose({ focus: () => inputRef.value?.focus(), input: inputRef })\n\n return () => {\n const { class: className, ...restAttrs } = attrs\n const { value, defaultValue, disabled } = props\n const readOnly = props.readOnly || props.readonly\n // Default to `true` when type=\"password\" or presence of `name`\n const allowAutofillExtensions = props.allowAutofillExtensions ?? (props.type === \"password\" || !!props.name)\n const startAdornment = slots.startAdornment?.()\n const endAdornment = slots.endAdornment?.()\n const hasStartAdornment = hasContent(startAdornment)\n const hasEndAdornment = hasContent(endAdornment)\n\n // Determine if clear button should be shown\n const hasValue = String((value !== undefined ? value : defaultValue) ?? \"\") !== \"\"\n const showClearButton = !!props.onClear && hasValue && !disabled && !readOnly\n\n return h(\n \"div\",\n {\n \"class\": clsx(s.Container, className as ClassValue),\n \"data-slot\": \"input\",\n \"data-variant\": props.variant,\n \"data-size\": props.size,\n \"data-gutter-size\": props.gutterSize,\n \"data-focused\": focused.value,\n \"data-disabled\": disabled ? \"\" : undefined,\n \"data-readonly\": readOnly ? \"\" : undefined,\n \"data-invalid\": props.invalid ? \"\" : undefined,\n \"data-pill\": pill.value ? \"\" : undefined,\n \"data-optically-align\": props.opticallyAlign,\n \"data-has-start-adornment\": hasStartAdornment ? \"\" : undefined,\n \"data-has-end-adornment\": hasEndAdornment || showClearButton ? \"\" : undefined,\n // Only an end adornment, not the clear button: the phone rules place the clear button at the field's end\n // when nothing follows it, a text adornment too (`:last-child` does not see text)\n \"data-end-adornment\": hasEndAdornment ? \"\" : undefined,\n \"onMousedown\": handleMouseDown,\n },\n [\n hasStartAdornment ? startAdornment : null,\n withDirectives(\n h(\n \"input\",\n mergeProps(restAttrs, {\n \"ref\": inputRef,\n \"id\": props.id || (allowAutofillExtensions ? undefined : onePasswordPreventionId),\n \"class\": s.Input,\n \"type\": props.type,\n // Only when set, so a native `autocomplete` attribute still applies\n ...(props.autoComplete !== undefined ? { autocomplete: props.autoComplete } : {}),\n // Expose the visual invalid state to assistive tech; an explicit aria-invalid wins\n \"aria-invalid\": restAttrs[\"aria-invalid\"] ?? (props.invalid || undefined),\n \"name\": props.name,\n // Controlled: the `value` property follows the prop. Uncontrolled:\n // `vDefaultValue` below sets the initial value, as in React.\n ...(value !== undefined ? { value } : {}),\n \"readonly\": readOnly,\n \"disabled\": disabled,\n \"onInput\": handleInput,\n // Use bubbling focus events for state, independently of a layer\n // capture listener. Caller @focus/@blur still receive their native events.\n \"onFocusin\": () => {\n focused.value = true\n },\n \"onFocusout\": () => {\n focused.value = false\n },\n \"onAnimationstart\": handleAnimationStart,\n // Prevent LastPass and 1Password from appearing\n \"data-lpignore\": allowAutofillExtensions ? undefined : true,\n \"data-1p-ignore\": allowAutofillExtensions ? undefined : true,\n }),\n ),\n [[vDefaultValue, value === undefined ? defaultValue : undefined]],\n ),\n showClearButton\n ? h(\"button\", { \"type\": \"button\", \"aria-label\": \"Clear input\", \"class\": s.Clear, \"onClick\": handleClear }, [\n h(X, { class: s.ClearIcon }),\n h(XCircleFilled, { class: s.ClearPhoneIcon }),\n ])\n : null,\n hasEndAdornment ? endAdornment : null,\n ],\n )\n }\n },\n})\n\ntype InputOwnProps = InstanceType<typeof InputComponent>[\"$props\"]\n\n/** Input props plus the native <input> attributes that fall through to it, as in React. */\nexport type InputProps = InputOwnProps & Omit<InputHTMLAttributes, keyof InputOwnProps>\n\n/** Text input with adornment slots, a clear button and autofill-extension control. */\nexport const Input = InputComponent as typeof InputComponent & { new (): { $props: InputProps } }\n\n/**\n * Canonical inline action button for Input adornments (React\n * `Input.AdornmentButton`): mic toggle, visibility toggle, copy, ... It sizes\n * itself off the parent Input so it matches the built-in clear button.\n */\nconst InputAdornmentButtonComponent = defineComponent({\n name: \"InputAdornmentButton\",\n props: {\n /** @default \"button\" */\n type: { type: String as PropType<\"button\" | \"submit\" | \"reset\">, default: \"button\" },\n /**\n * Semantic color tint for the pressed (`aria-pressed=\"true\"`) state, the\n * same palette Button accepts. Unset keeps the neutral primary-soft tint.\n */\n color: String as PropType<SemanticColor>,\n },\n setup(props, { slots }) {\n return () =>\n h(\"button\", { \"type\": props.type, \"class\": s.AdornmentButton, \"data-color\": props.color }, slots.default?.())\n },\n})\n\ntype InputAdornmentButtonOwnProps = InstanceType<typeof InputAdornmentButtonComponent>[\"$props\"]\n\n/** AdornmentButton props plus the native <button> attributes that fall through to it. */\nexport type InputAdornmentButtonProps = InputAdornmentButtonOwnProps &\n Omit<ButtonHTMLAttributes, keyof InputAdornmentButtonOwnProps>\n\nexport const InputAdornmentButton = InputAdornmentButtonComponent as typeof InputAdornmentButtonComponent & {\n new (): { $props: InputAdornmentButtonProps }\n}\n"]}
@@ -16,7 +16,7 @@ import { useFloatingBoundary } from "../../composables/useFloatingBoundary.js";
16
16
  import { PHONE_LAYOUT } from "../PhoneLayout/PhoneLayout.js";
17
17
  import { usePhoneSubmenu } from "../../composables/usePhoneSubmenu.js";
18
18
  import { focusPhoneSubmenuEntry } from "../../lib/menuSubmenuPlacement.js";
19
- import { ignoreReleaseOverTrigger, observeMenuTriggerCover } from "../../lib/menuTriggerCover.js";
19
+ import { ignoreReleaseOverTrigger, markCoveredMenuTrigger, observeMenuTriggerCover } from "../../lib/menuTriggerCover.js";
20
20
  import { completeInitialPhoneSubmenuFocus, deferInitialPhoneSubmenuFocus, delegateInitialPhoneSubmenuFocus } from "../../lib/menuInitialFocus.js";
21
21
  import s from "@plexui/styles/components/Menu/Menu.module.css";
22
22
  // A touch listener lets iOS Safari apply :active, which draws the pressed capsule of a phone row (Menu.module.css).
@@ -399,6 +399,15 @@ const MenuRootContentImpl = defineComponent({
399
399
  return;
400
400
  onCleanup(observeMenuTriggerCover(trigger, (value) => { triggerCover.value = value; }));
401
401
  });
402
+ // A trigger the panel covers whole is hidden while it is open, as iOS turns a bar button into its menu
403
+ watchEffect((onCleanup) => {
404
+ const trigger = internals.trigger.value;
405
+ const content = level.content.value;
406
+ const cover = level.open() && coversTrigger() ? triggerCover.value : null;
407
+ if (!cover || !trigger || !content)
408
+ return;
409
+ onCleanup(markCoveredMenuTrigger(trigger, content));
410
+ });
402
411
  onMounted(() => {
403
412
  level.content.value = document.getElementById(rootContext.contentId);
404
413
  });