@qualcomm-ui/core 1.0.10 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/combobox/combobox.api.d.ts.map +1 -1
  2. package/dist/combobox/index.cjs +1 -1
  3. package/dist/combobox/index.cjs.map +2 -2
  4. package/dist/combobox/index.js +1 -1
  5. package/dist/combobox/index.js.map +2 -2
  6. package/dist/input/input.types.d.ts +1 -0
  7. package/dist/input/input.types.d.ts.map +1 -1
  8. package/dist/number-input/index.cjs +1 -1
  9. package/dist/number-input/index.cjs.map +2 -2
  10. package/dist/number-input/index.js +1 -1
  11. package/dist/number-input/index.js.map +2 -2
  12. package/dist/number-input/number-input.api.d.ts.map +1 -1
  13. package/dist/password-input/index.cjs +1 -1
  14. package/dist/password-input/index.cjs.map +2 -2
  15. package/dist/password-input/index.js +1 -1
  16. package/dist/password-input/index.js.map +2 -2
  17. package/dist/password-input/password-input.api.d.ts.map +1 -1
  18. package/dist/progress/index.cjs +1 -1
  19. package/dist/progress/index.cjs.map +2 -2
  20. package/dist/progress/index.js +1 -1
  21. package/dist/progress/index.js.map +2 -2
  22. package/dist/progress/progress.api.d.ts.map +1 -1
  23. package/dist/progress/progress.types.d.ts +1 -0
  24. package/dist/progress/progress.types.d.ts.map +1 -1
  25. package/dist/select/index.cjs +1 -1
  26. package/dist/select/index.cjs.map +2 -2
  27. package/dist/select/index.js +1 -1
  28. package/dist/select/index.js.map +2 -2
  29. package/dist/select/select.api.d.ts.map +1 -1
  30. package/dist/select/select.types.d.ts +1 -0
  31. package/dist/select/select.types.d.ts.map +1 -1
  32. package/dist/text-input/index.cjs +1 -1
  33. package/dist/text-input/index.cjs.map +2 -2
  34. package/dist/text-input/index.js +1 -1
  35. package/dist/text-input/index.js.map +2 -2
  36. package/dist/text-input/text-input.api.d.ts.map +1 -1
  37. package/dist/tsbuildinfo +1 -1
  38. package/package.json +3 -3
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/text-input/index.ts", "../../src/text-input/text-input.api.ts", "../../src/text-input/internal/text-input.dom.ts", "../../src/text-input/text-input.machine.ts", "../../src/text-input/text-input.props.ts"],
4
- "sourcesContent": ["export * from \"./text-input.api\"\nexport * from \"./text-input.machine\"\nexport * from \"./text-input.props\"\nexport type * from \"./text-input.types\"\n", "// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {isFocusVisible} from \"@qualcomm-ui/dom/focus-visible\"\nimport {\n ariaAttr,\n booleanAriaAttr,\n booleanDataAttr,\n mergeAriaIds,\n} from \"@qualcomm-ui/utils/attributes\"\nimport type {\n IdRegistrationProps,\n Machine,\n PropNormalizer,\n} from \"@qualcomm-ui/utils/machine\"\n\nimport {domIds} from \"./internal\"\nimport type {\n TextInputApi,\n TextInputClearTriggerBindings,\n TextInputErrorIndicatorBindings,\n TextInputErrorTextBindings,\n TextInputHintBindings,\n TextInputInputBindings,\n TextInputInputGroupBindings,\n TextInputLabelBindings,\n TextInputRootBindings,\n TextInputSchema,\n TextInputScopeAttribute,\n} from \"./text-input.types\"\n\nconst commonBindings: TextInputScopeAttribute = {\n \"data-scope\": \"text-input\",\n}\n\nexport function createTextInputApi(\n machine: Machine<TextInputSchema>,\n normalize: PropNormalizer,\n): TextInputApi {\n const {computed, context, prop, scope, send} = machine\n\n const disabled = computed(\"disabled\")\n const readOnly = prop(\"readOnly\")\n const focused = context.get(\"focused\")\n const invalid = prop(\"invalid\")\n const interactive = !(readOnly || disabled)\n\n return {\n disabled,\n focusInput(): void {\n send({type: \"INPUT.FOCUS\"})\n },\n invalid,\n required: prop(\"required\"),\n setValue(value: string) {\n send({type: \"VALUE.SET\", value})\n },\n value: context.get(\"value\"),\n\n // group: prop getters\n getClearTriggerBindings(): TextInputClearTriggerBindings {\n return normalize.button({\n ...commonBindings,\n \"aria-label\": \"Clear input\",\n \"data-disabled\": booleanDataAttr(disabled),\n \"data-part\": \"clear-trigger\",\n dir: prop(\"dir\"),\n disabled,\n onClick: (event) => {\n if (!interactive || event.defaultPrevented) {\n return\n }\n send({type: \"VALUE.SET\", value: \"\"})\n send({type: \"INPUT.FOCUS\"})\n },\n })\n },\n\n getErrorIndicatorBindings(): TextInputErrorIndicatorBindings {\n return normalize.element({\n ...commonBindings,\n \"aria-label\": \"Error\",\n \"data-part\": \"error-indicator\",\n dir: prop(\"dir\"),\n hidden: !prop(\"invalid\"),\n })\n },\n\n getErrorTextBindings(\n props: IdRegistrationProps,\n ): TextInputErrorTextBindings {\n scope.ids.register(\"errorText\", props)\n return normalize.element({\n ...commonBindings,\n \"aria-live\": \"polite\",\n \"data-part\": \"error-text\",\n dir: prop(\"dir\"),\n hidden: !invalid,\n id: domIds.errorText(scope),\n })\n },\n\n getHintBindings(props: IdRegistrationProps): TextInputHintBindings {\n scope.ids.register(\"hint\", props)\n return normalize.element({\n ...commonBindings,\n \"data-disabled\": booleanDataAttr(disabled),\n \"data-part\": \"hint\",\n dir: prop(\"dir\"),\n id: domIds.hint(scope),\n })\n },\n\n getInputBindings(props: IdRegistrationProps): TextInputInputBindings {\n scope.ids.register(\"input\", props)\n return normalize.input({\n ...commonBindings,\n \"aria-describedby\": ariaAttr(domIds.hint(scope)),\n \"aria-invalid\": booleanAriaAttr(invalid),\n \"aria-labelledby\": mergeAriaIds(\n domIds.label(scope),\n invalid ? domIds.errorText(scope) : undefined,\n ),\n autoComplete: \"off\",\n autoCorrect: \"off\",\n \"data-empty\": booleanDataAttr(!context.get(\"value\")),\n \"data-focus\": booleanDataAttr(focused),\n \"data-invalid\": booleanDataAttr(invalid),\n \"data-part\": \"input\",\n \"data-readonly\": booleanDataAttr(readOnly),\n defaultValue: context.get(\"value\"),\n dir: prop(\"dir\"),\n disabled,\n form: prop(\"form\"),\n id: domIds.input(scope),\n name: prop(\"name\"),\n onBlur: () => {\n send({\n focused: false,\n focusVisible: false,\n type: \"FOCUSED.SET\",\n })\n },\n onChange: (event) => {\n send({type: \"VALUE.SET\", value: event.target.value})\n },\n onFocus: () => {\n const focusVisible = isFocusVisible()\n send({focused: true, focusVisible, type: \"FOCUSED.SET\"})\n },\n readOnly,\n required: prop(\"required\"),\n spellCheck: \"false\",\n type: \"text\",\n })\n },\n getInputGroupBindings(): TextInputInputGroupBindings {\n return normalize.element({\n ...commonBindings,\n \"data-disabled\": booleanDataAttr(disabled),\n \"data-focus\": booleanDataAttr(focused),\n \"data-invalid\": booleanDataAttr(invalid),\n \"data-part\": \"input-group\",\n \"data-readonly\": booleanDataAttr(readOnly),\n dir: prop(\"dir\"),\n onClick: (event) => {\n if (event.defaultPrevented || disabled) {\n return\n }\n send({type: \"INPUT.FOCUS\"})\n },\n })\n },\n getLabelBindings(props: IdRegistrationProps): TextInputLabelBindings {\n scope.ids.register(\"label\", props)\n return normalize.label({\n ...commonBindings,\n \"data-disabled\": booleanDataAttr(disabled),\n \"data-focus\": booleanDataAttr(focused),\n \"data-invalid\": booleanDataAttr(invalid),\n \"data-part\": \"label\",\n dir: prop(\"dir\"),\n htmlFor: domIds.input(scope),\n id: domIds.label(scope),\n })\n },\n\n getRootBindings(): TextInputRootBindings {\n return normalize.element({\n ...commonBindings,\n \"data-disabled\": booleanDataAttr(disabled),\n \"data-focus\": booleanDataAttr(focused),\n \"data-invalid\": booleanDataAttr(invalid),\n \"data-part\": \"root\",\n dir: prop(\"dir\"),\n })\n },\n }\n}\n", "// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ScopeDomElements, ScopeDomIds} from \"@qualcomm-ui/utils/machine\"\n\nimport type {TextInputElementIds, TextInputScope} from \"../text-input.types\"\n\nexport const domIds: ScopeDomIds<TextInputElementIds, TextInputScope> = {\n errorText: (scope) => scope.ids.get(\"errorText\"),\n hint: (scope) => scope.ids.get(\"hint\"),\n input: (scope) => scope.ids.get(\"input\"),\n label: (scope) => scope.ids.get(\"label\"),\n}\n\nexport const domEls: ScopeDomElements<\n TextInputElementIds,\n TextInputScope,\n {input: HTMLInputElement | null}\n> = {\n errorText: (scope) => scope.getById(domIds.errorText(scope)),\n hint: (scope) => scope.getById(domIds.hint(scope)),\n input: (scope: TextInputScope) => scope.getById(domIds.input(scope)),\n label: (scope) => scope.getById(domIds.label(scope)),\n}\n", "// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {raf, setElementValue, trackFormControl} from \"@qualcomm-ui/dom/query\"\nimport {createMachine, type MachineConfig} from \"@qualcomm-ui/utils/machine\"\n\nimport {domEls} from \"./internal\"\nimport type {TextInputSchema} from \"./text-input.types\"\n\nexport const textInputMachine: MachineConfig<TextInputSchema> = createMachine({\n actions: {\n focusInputEl({computed, scope}) {\n if (!computed(\"disabled\")) {\n domEls.input(scope)?.focus()\n }\n },\n setFocused({context, event}) {\n if (event.type !== \"FOCUSED.SET\") {\n return\n }\n context.set(\"focused\", event.focused)\n context.set(\"focusVisible\", event.focusVisible)\n },\n setValue: ({context, event}) => {\n if (event.type === \"VALUE.SET\") {\n context.set(\"value\", event.value)\n }\n },\n syncInputValue({context, scope}) {\n const inputEl = domEls.input(scope)\n raf(() => {\n setElementValue(inputEl, context.get(\"value\"))\n })\n },\n },\n computed: {\n disabled: ({context, prop}) =>\n prop(\"disabled\") || context.get(\"fieldsetDisabled\"),\n },\n context: ({bindable, prop}) => {\n return {\n fieldsetDisabled: bindable<boolean>(() => ({defaultValue: false})),\n focused: bindable<boolean>(() => ({\n defaultValue: false,\n onChange: prop(\"onFocusChange\"),\n })),\n focusVisible: bindable<boolean>(() => ({defaultValue: false})),\n value: bindable<string>(() => ({\n defaultValue: prop(\"defaultValue\"),\n onChange: prop(\"onValueChange\"),\n value: prop(\"value\"),\n })),\n }\n },\n effects: {\n trackFormControlState({context, scope}) {\n return trackFormControl(domEls.input(scope), {\n onFieldsetDisabledChange: (disabled) => {\n context.set(\"fieldsetDisabled\", disabled)\n },\n onFormReset: () => {\n context.set(\"value\", context.initial(\"value\") || \"\")\n },\n })\n },\n },\n ids: ({bindableId, ids}) => {\n return {\n errorText: bindableId<string>(ids?.errorText),\n hint: bindableId<string>(ids?.hint),\n input: bindableId<string>(ids?.input),\n label: bindableId<string>(ids?.label),\n }\n },\n initialState: () => \"idle\",\n props({props}) {\n return {\n defaultValue: \"\",\n dir: \"ltr\",\n ...props,\n }\n },\n states: {\n idle: {\n on: {\n \"FOCUSED.SET\": {\n actions: [\"setFocused\"],\n },\n \"INPUT.FOCUS\": {\n actions: [\"focusInputEl\"],\n },\n \"VALUE.SET\": {\n actions: [\"setValue\"],\n },\n },\n },\n },\n watch({action, context, track}) {\n track([() => context.get(\"value\")], () => {\n action([\"syncInputValue\"])\n })\n },\n})\n", "// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {createProps, createSplitProps} from \"@qualcomm-ui/utils/object\"\n\nimport type {TextInputApiProps} from \"./text-input.types\"\n\nconst textInputProps: (keyof TextInputApiProps)[] =\n createProps<TextInputApiProps>()(\n \"defaultValue\",\n \"dir\",\n \"disabled\",\n \"getRootNode\",\n \"form\",\n \"ids\",\n \"invalid\",\n \"name\",\n \"onFocusChange\",\n \"onValueChange\",\n \"readOnly\",\n \"required\",\n \"value\",\n )\n\nexport const splitTextInputProps: <Props extends TextInputApiProps>(\n props: Props,\n) => [TextInputApiProps, Omit<Props, keyof TextInputApiProps>] =\n createSplitProps<TextInputApiProps>(textInputProps)\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,EAAA,wBAAAC,EAAA,qBAAAC,IAAA,eAAAC,EAAAL,GCGA,IAAAM,EAA6B,0CAC7BC,EAKO,yCCFA,IAAMC,EAA2D,CACtE,UAAYC,GAAUA,EAAM,IAAI,IAAI,WAAW,EAC/C,KAAOA,GAAU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CACrD,CACF,CAAC,CACH,CACF,EACA,IAAK,CAAC,CAAC,WAAAM,EAAY,IAAAC,CAAG,KACb,CACL,UAAWD,EAAmBC,GAAK,SAAS,EAC5C,KAAMD,EAAmBC,GAAK,IAAI,EAClC,MAAOD,EAAmBC,GAAK,KAAK,EACpC,MAAOD,EAAmBC,GAAK,KAAK,CACtC,GAEF,aAAc,IAAM,OACpB,MAAM,CAAC,MAAAC,CAAK,EAAG,CACb,MAAO,CACL,aAAc,GACd,IAAK,MACL,GAAGA,CACL,CACF,EACA,OAAQ,CACN,KAAM,CACJ,GAAI,CACF,cAAe,CACb,QAAS,CAAC,YAAY,CACxB,EACA,cAAe,CACb,QAAS,CAAC,cAAc,CAC1B,EACA,YAAa,CACX,QAAS,CAAC,UAAU,CACtB,CACF,CACF,CACF,EACA,MAAM,CAAC,OAAAC,EAAQ,QAAAT,EAAS,MAAAU,CAAK,EAAG,CAC9BA,EAAM,CAAC,IAAMV,EAAQ,IAAI,OAAO,CAAC,EAAG,IAAM,CACxCS,EAAO,CAAC,gBAAgB,CAAC,CAC3B,CAAC,CACH,CACF,CAAC,ECnGD,IAAAE,EAA4C,qCAItCC,KACJ,eAA+B,EAC7B,eACA,MACA,WACA,cACA,OACA,MACA,UACA,OACA,gBACA,gBACA,WACA,WACA,OACF,EAEWC,KAGX,oBAAoCD,CAAc",
4
+ "sourcesContent": ["export * from \"./text-input.api\"\nexport * from \"./text-input.machine\"\nexport * from \"./text-input.props\"\nexport type * from \"./text-input.types\"\n", "// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {isFocusVisible} from \"@qualcomm-ui/dom/focus-visible\"\nimport {\n ariaAttr,\n booleanAriaAttr,\n booleanDataAttr,\n mergeAriaIds,\n} from \"@qualcomm-ui/utils/attributes\"\nimport type {\n IdRegistrationProps,\n Machine,\n PropNormalizer,\n} from \"@qualcomm-ui/utils/machine\"\n\nimport {domIds} from \"./internal\"\nimport type {\n TextInputApi,\n TextInputClearTriggerBindings,\n TextInputErrorIndicatorBindings,\n TextInputErrorTextBindings,\n TextInputHintBindings,\n TextInputInputBindings,\n TextInputInputGroupBindings,\n TextInputLabelBindings,\n TextInputRootBindings,\n TextInputSchema,\n TextInputScopeAttribute,\n} from \"./text-input.types\"\n\nconst commonBindings: TextInputScopeAttribute = {\n \"data-scope\": \"text-input\",\n}\n\nexport function createTextInputApi(\n machine: Machine<TextInputSchema>,\n normalize: PropNormalizer,\n): TextInputApi {\n const {computed, context, prop, scope, send} = machine\n\n const disabled = computed(\"disabled\")\n const readOnly = prop(\"readOnly\")\n const focused = context.get(\"focused\")\n const invalid = prop(\"invalid\")\n const interactive = !(readOnly || disabled)\n\n return {\n disabled,\n focusInput(): void {\n send({type: \"INPUT.FOCUS\"})\n },\n invalid,\n required: prop(\"required\"),\n setValue(value: string) {\n send({type: \"VALUE.SET\", value})\n },\n value: context.get(\"value\"),\n\n // group: prop getters\n getClearTriggerBindings(): TextInputClearTriggerBindings {\n return normalize.button({\n ...commonBindings,\n \"aria-label\": \"Clear input\",\n \"data-disabled\": booleanDataAttr(disabled),\n \"data-part\": \"clear-trigger\",\n dir: prop(\"dir\"),\n disabled,\n onClick: (event) => {\n if (!interactive || event.defaultPrevented) {\n return\n }\n send({type: \"VALUE.SET\", value: \"\"})\n send({type: \"INPUT.FOCUS\"})\n },\n })\n },\n\n getErrorIndicatorBindings(): TextInputErrorIndicatorBindings {\n return normalize.element({\n ...commonBindings,\n \"aria-label\": \"Error\",\n \"data-part\": \"error-indicator\",\n dir: prop(\"dir\"),\n hidden: !prop(\"invalid\"),\n })\n },\n\n getErrorTextBindings(\n props: IdRegistrationProps,\n ): TextInputErrorTextBindings {\n scope.ids.register(\"errorText\", props)\n return normalize.element({\n ...commonBindings,\n \"aria-live\": \"polite\",\n \"data-part\": \"error-text\",\n dir: prop(\"dir\"),\n hidden: !invalid,\n id: domIds.errorText(scope),\n })\n },\n\n getHintBindings(props: IdRegistrationProps): TextInputHintBindings {\n scope.ids.register(\"hint\", props)\n return normalize.element({\n ...commonBindings,\n \"data-disabled\": booleanDataAttr(disabled),\n \"data-part\": \"hint\",\n dir: prop(\"dir\"),\n hidden: !!invalid,\n id: domIds.hint(scope),\n })\n },\n\n getInputBindings(props: IdRegistrationProps): TextInputInputBindings {\n scope.ids.register(\"input\", props)\n return normalize.input({\n ...commonBindings,\n \"aria-describedby\": ariaAttr(domIds.hint(scope)),\n \"aria-invalid\": booleanAriaAttr(invalid),\n \"aria-labelledby\": mergeAriaIds(\n domIds.label(scope),\n invalid ? domIds.errorText(scope) : undefined,\n ),\n autoComplete: \"off\",\n autoCorrect: \"off\",\n \"data-empty\": booleanDataAttr(!context.get(\"value\")),\n \"data-focus\": booleanDataAttr(focused),\n \"data-invalid\": booleanDataAttr(invalid),\n \"data-part\": \"input\",\n \"data-readonly\": booleanDataAttr(readOnly),\n defaultValue: context.get(\"value\"),\n dir: prop(\"dir\"),\n disabled,\n form: prop(\"form\"),\n id: domIds.input(scope),\n name: prop(\"name\"),\n onBlur: () => {\n send({\n focused: false,\n focusVisible: false,\n type: \"FOCUSED.SET\",\n })\n },\n onChange: (event) => {\n send({type: \"VALUE.SET\", value: event.target.value})\n },\n onFocus: () => {\n const focusVisible = isFocusVisible()\n send({focused: true, focusVisible, type: \"FOCUSED.SET\"})\n },\n readOnly,\n required: prop(\"required\"),\n spellCheck: \"false\",\n type: \"text\",\n })\n },\n getInputGroupBindings(): TextInputInputGroupBindings {\n return normalize.element({\n ...commonBindings,\n \"data-disabled\": booleanDataAttr(disabled),\n \"data-focus\": booleanDataAttr(focused),\n \"data-invalid\": booleanDataAttr(invalid),\n \"data-part\": \"input-group\",\n \"data-readonly\": booleanDataAttr(readOnly),\n dir: prop(\"dir\"),\n onClick: (event) => {\n if (event.defaultPrevented || disabled) {\n return\n }\n send({type: \"INPUT.FOCUS\"})\n },\n })\n },\n getLabelBindings(props: IdRegistrationProps): TextInputLabelBindings {\n scope.ids.register(\"label\", props)\n return normalize.label({\n ...commonBindings,\n \"data-disabled\": booleanDataAttr(disabled),\n \"data-focus\": booleanDataAttr(focused),\n \"data-invalid\": booleanDataAttr(invalid),\n \"data-part\": \"label\",\n dir: prop(\"dir\"),\n htmlFor: domIds.input(scope),\n id: domIds.label(scope),\n })\n },\n\n getRootBindings(): TextInputRootBindings {\n return normalize.element({\n ...commonBindings,\n \"data-disabled\": booleanDataAttr(disabled),\n \"data-focus\": booleanDataAttr(focused),\n \"data-invalid\": booleanDataAttr(invalid),\n \"data-part\": \"root\",\n dir: prop(\"dir\"),\n })\n },\n }\n}\n", "// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ScopeDomElements, ScopeDomIds} from \"@qualcomm-ui/utils/machine\"\n\nimport type {TextInputElementIds, TextInputScope} from \"../text-input.types\"\n\nexport const domIds: ScopeDomIds<TextInputElementIds, TextInputScope> = {\n errorText: (scope) => scope.ids.get(\"errorText\"),\n hint: (scope) => scope.ids.get(\"hint\"),\n input: (scope) => scope.ids.get(\"input\"),\n label: (scope) => scope.ids.get(\"label\"),\n}\n\nexport const domEls: ScopeDomElements<\n TextInputElementIds,\n TextInputScope,\n {input: HTMLInputElement | null}\n> = {\n errorText: (scope) => scope.getById(domIds.errorText(scope)),\n hint: (scope) => scope.getById(domIds.hint(scope)),\n input: (scope: TextInputScope) => scope.getById(domIds.input(scope)),\n label: (scope) => scope.getById(domIds.label(scope)),\n}\n", "// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {raf, setElementValue, trackFormControl} from \"@qualcomm-ui/dom/query\"\nimport {createMachine, type MachineConfig} from \"@qualcomm-ui/utils/machine\"\n\nimport {domEls} from \"./internal\"\nimport type {TextInputSchema} from \"./text-input.types\"\n\nexport const textInputMachine: MachineConfig<TextInputSchema> = createMachine({\n actions: {\n focusInputEl({computed, scope}) {\n if (!computed(\"disabled\")) {\n domEls.input(scope)?.focus()\n }\n },\n setFocused({context, event}) {\n if (event.type !== \"FOCUSED.SET\") {\n return\n }\n context.set(\"focused\", event.focused)\n context.set(\"focusVisible\", event.focusVisible)\n },\n setValue: ({context, event}) => {\n if (event.type === \"VALUE.SET\") {\n context.set(\"value\", event.value)\n }\n },\n syncInputValue({context, scope}) {\n const inputEl = domEls.input(scope)\n raf(() => {\n setElementValue(inputEl, context.get(\"value\"))\n })\n },\n },\n computed: {\n disabled: ({context, prop}) =>\n prop(\"disabled\") || context.get(\"fieldsetDisabled\"),\n },\n context: ({bindable, prop}) => {\n return {\n fieldsetDisabled: bindable<boolean>(() => ({defaultValue: false})),\n focused: bindable<boolean>(() => ({\n defaultValue: false,\n onChange: prop(\"onFocusChange\"),\n })),\n focusVisible: bindable<boolean>(() => ({defaultValue: false})),\n value: bindable<string>(() => ({\n defaultValue: prop(\"defaultValue\"),\n onChange: prop(\"onValueChange\"),\n value: prop(\"value\"),\n })),\n }\n },\n effects: {\n trackFormControlState({context, scope}) {\n return trackFormControl(domEls.input(scope), {\n onFieldsetDisabledChange: (disabled) => {\n context.set(\"fieldsetDisabled\", disabled)\n },\n onFormReset: () => {\n context.set(\"value\", context.initial(\"value\") || \"\")\n },\n })\n },\n },\n ids: ({bindableId, ids}) => {\n return {\n errorText: bindableId<string>(ids?.errorText),\n hint: bindableId<string>(ids?.hint),\n input: bindableId<string>(ids?.input),\n label: bindableId<string>(ids?.label),\n }\n },\n initialState: () => \"idle\",\n props({props}) {\n return {\n defaultValue: \"\",\n dir: \"ltr\",\n ...props,\n }\n },\n states: {\n idle: {\n on: {\n \"FOCUSED.SET\": {\n actions: [\"setFocused\"],\n },\n \"INPUT.FOCUS\": {\n actions: [\"focusInputEl\"],\n },\n \"VALUE.SET\": {\n actions: [\"setValue\"],\n },\n },\n },\n },\n watch({action, context, track}) {\n track([() => context.get(\"value\")], () => {\n action([\"syncInputValue\"])\n })\n },\n})\n", "// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {createProps, createSplitProps} from \"@qualcomm-ui/utils/object\"\n\nimport type {TextInputApiProps} from \"./text-input.types\"\n\nconst textInputProps: (keyof TextInputApiProps)[] =\n createProps<TextInputApiProps>()(\n \"defaultValue\",\n \"dir\",\n \"disabled\",\n \"getRootNode\",\n \"form\",\n \"ids\",\n \"invalid\",\n \"name\",\n \"onFocusChange\",\n \"onValueChange\",\n \"readOnly\",\n \"required\",\n \"value\",\n )\n\nexport const splitTextInputProps: <Props extends TextInputApiProps>(\n props: Props,\n) => [TextInputApiProps, Omit<Props, keyof TextInputApiProps>] =\n createSplitProps<TextInputApiProps>(textInputProps)\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,EAAA,wBAAAC,EAAA,qBAAAC,IAAA,eAAAC,EAAAL,GCGA,IAAAM,EAA6B,0CAC7BC,EAKO,yCCFA,IAAMC,EAA2D,CACtE,UAAYC,GAAUA,EAAM,IAAI,IAAI,WAAW,EAC/C,KAAOA,GAAUA,EAAM,IAAI,IAAI,MAAM,EACrC,MAAQA,GAAUA,EAAM,IAAI,IAAI,OAAO,EACvC,MAAQA,GAAUA,EAAM,IAAI,IAAI,OAAO,CACzC,EAEaC,EAIT,CACF,UAAYD,GAAUA,EAAM,QAAQD,EAAO,UAAUC,CAAK,CAAC,EAC3D,KAAOA,GAAUA,EAAM,QAAQD,EAAO,KAAKC,CAAK,CAAC,EACjD,MAAQA,GAA0BA,EAAM,QAAQD,EAAO,MAAMC,CAAK,CAAC,EACnE,MAAQA,GAAUA,EAAM,QAAQD,EAAO,MAAMC,CAAK,CAAC,CACrD,EDQA,IAAME,EAA0C,CAC9C,aAAc,YAChB,EAEO,SAASC,EACdC,EACAC,EACc,CACd,GAAM,CAAC,SAAAC,EAAU,QAAAC,EAAS,KAAAC,EAAM,MAAAC,EAAO,KAAAC,CAAI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A,MAAM,CAAC,OAAAC,EAAQ,QAAAT,EAAS,MAAAU,CAAK,EAAG,CAC9BA,EAAM,CAAC,IAAMV,EAAQ,IAAI,OAAO,CAAC,EAAG,IAAM,CACxCS,EAAO,CAAC,gBAAgB,CAAC,CAC3B,CAAC,CACH,CACF,CAAC,ECnGD,IAAAE,EAA4C,qCAItCC,KACJ,eAA+B,EAC7B,eACA,MACA,WACA,cACA,OACA,MACA,UACA,OACA,gBACA,gBACA,WACA,WACA,OACF,EAEWC,KAGX,oBAAoCD,CAAc",
6
6
  "names": ["text_input_exports", "__export", "createTextInputApi", "splitTextInputProps", "textInputMachine", "__toCommonJS", "import_focus_visible", "import_attributes", "domIds", "scope", "domEls", "commonBindings", "createTextInputApi", "machine", "normalize", "computed", "context", "prop", "scope", "send", "disabled", "readOnly", "focused", "invalid", "interactive", "value", "event", "props", "domIds", "focusVisible", "import_query", "import_machine", "textInputMachine", "computed", "scope", "domEls", "context", "event", "inputEl", "prop", "bindable", "disabled", "bindableId", "ids", "props", "action", "track", "import_object", "textInputProps", "splitTextInputProps"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{isFocusVisible as T}from"@qualcomm-ui/dom/focus-visible";import{ariaAttr as y,booleanAriaAttr as b,booleanDataAttr as i,mergeAriaIds as E}from"@qualcomm-ui/utils/attributes";var a={errorText:t=>t.ids.get("errorText"),hint:t=>t.ids.get("hint"),input:t=>t.ids.get("input"),label:t=>t.ids.get("label")},I={errorText:t=>t.getById(a.errorText(t)),hint:t=>t.getById(a.hint(t)),input:t=>t.getById(a.input(t)),label:t=>t.getById(a.label(t))};var d={"data-scope":"text-input"};function O(t,e){let{computed:l,context:c,prop:r,scope:o,send:p}=t,u=l("disabled"),g=r("readOnly"),f=c.get("focused"),s=r("invalid"),x=!(g||u);return{disabled:u,focusInput(){p({type:"INPUT.FOCUS"})},invalid:s,required:r("required"),setValue(n){p({type:"VALUE.SET",value:n})},value:c.get("value"),getClearTriggerBindings(){return e.button({...d,"aria-label":"Clear input","data-disabled":i(u),"data-part":"clear-trigger",dir:r("dir"),disabled:u,onClick:n=>{!x||n.defaultPrevented||(p({type:"VALUE.SET",value:""}),p({type:"INPUT.FOCUS"}))}})},getErrorIndicatorBindings(){return e.element({...d,"aria-label":"Error","data-part":"error-indicator",dir:r("dir"),hidden:!r("invalid")})},getErrorTextBindings(n){return o.ids.register("errorText",n),e.element({...d,"aria-live":"polite","data-part":"error-text",dir:r("dir"),hidden:!s,id:a.errorText(o)})},getHintBindings(n){return o.ids.register("hint",n),e.element({...d,"data-disabled":i(u),"data-part":"hint",dir:r("dir"),id:a.hint(o)})},getInputBindings(n){return o.ids.register("input",n),e.input({...d,"aria-describedby":y(a.hint(o)),"aria-invalid":b(s),"aria-labelledby":E(a.label(o),s?a.errorText(o):void 0),autoComplete:"off",autoCorrect:"off","data-empty":i(!c.get("value")),"data-focus":i(f),"data-invalid":i(s),"data-part":"input","data-readonly":i(g),defaultValue:c.get("value"),dir:r("dir"),disabled:u,form:r("form"),id:a.input(o),name:r("name"),onBlur:()=>{p({focused:!1,focusVisible:!1,type:"FOCUSED.SET"})},onChange:m=>{p({type:"VALUE.SET",value:m.target.value})},onFocus:()=>{let m=T();p({focused:!0,focusVisible:m,type:"FOCUSED.SET"})},readOnly:g,required:r("required"),spellCheck:"false",type:"text"})},getInputGroupBindings(){return e.element({...d,"data-disabled":i(u),"data-focus":i(f),"data-invalid":i(s),"data-part":"input-group","data-readonly":i(g),dir:r("dir"),onClick:n=>{n.defaultPrevented||u||p({type:"INPUT.FOCUS"})}})},getLabelBindings(n){return o.ids.register("label",n),e.label({...d,"data-disabled":i(u),"data-focus":i(f),"data-invalid":i(s),"data-part":"label",dir:r("dir"),htmlFor:a.input(o),id:a.label(o)})},getRootBindings(){return e.element({...d,"data-disabled":i(u),"data-focus":i(f),"data-invalid":i(s),"data-part":"root",dir:r("dir")})}}}import{raf as h,setElementValue as S,trackFormControl as B}from"@qualcomm-ui/dom/query";import{createMachine as C}from"@qualcomm-ui/utils/machine";var M=C({actions:{focusInputEl({computed:t,scope:e}){t("disabled")||I.input(e)?.focus()},setFocused({context:t,event:e}){e.type==="FOCUSED.SET"&&(t.set("focused",e.focused),t.set("focusVisible",e.focusVisible))},setValue:({context:t,event:e})=>{e.type==="VALUE.SET"&&t.set("value",e.value)},syncInputValue({context:t,scope:e}){let l=I.input(e);h(()=>{S(l,t.get("value"))})}},computed:{disabled:({context:t,prop:e})=>e("disabled")||t.get("fieldsetDisabled")},context:({bindable:t,prop:e})=>({fieldsetDisabled:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1,onChange:e("onFocusChange")})),focusVisible:t(()=>({defaultValue:!1})),value:t(()=>({defaultValue:e("defaultValue"),onChange:e("onValueChange"),value:e("value")}))}),effects:{trackFormControlState({context:t,scope:e}){return B(I.input(e),{onFieldsetDisabledChange:l=>{t.set("fieldsetDisabled",l)},onFormReset:()=>{t.set("value",t.initial("value")||"")}})}},ids:({bindableId:t,ids:e})=>({errorText:t(e?.errorText),hint:t(e?.hint),input:t(e?.input),label:t(e?.label)}),initialState:()=>"idle",props({props:t}){return{defaultValue:"",dir:"ltr",...t}},states:{idle:{on:{"FOCUSED.SET":{actions:["setFocused"]},"INPUT.FOCUS":{actions:["focusInputEl"]},"VALUE.SET":{actions:["setValue"]}}}},watch({action:t,context:e,track:l}){l([()=>e.get("value")],()=>{t(["syncInputValue"])})}});import{createProps as v,createSplitProps as P}from"@qualcomm-ui/utils/object";var V=v()("defaultValue","dir","disabled","getRootNode","form","ids","invalid","name","onFocusChange","onValueChange","readOnly","required","value"),G=P(V);export{O as createTextInputApi,G as splitTextInputProps,M as textInputMachine};
1
+ import{isFocusVisible as T}from"@qualcomm-ui/dom/focus-visible";import{ariaAttr as y,booleanAriaAttr as b,booleanDataAttr as i,mergeAriaIds as E}from"@qualcomm-ui/utils/attributes";var a={errorText:t=>t.ids.get("errorText"),hint:t=>t.ids.get("hint"),input:t=>t.ids.get("input"),label:t=>t.ids.get("label")},I={errorText:t=>t.getById(a.errorText(t)),hint:t=>t.getById(a.hint(t)),input:t=>t.getById(a.input(t)),label:t=>t.getById(a.label(t))};var s={"data-scope":"text-input"};function O(t,e){let{computed:l,context:c,prop:r,scope:o,send:p}=t,u=l("disabled"),g=r("readOnly"),f=c.get("focused"),d=r("invalid"),x=!(g||u);return{disabled:u,focusInput(){p({type:"INPUT.FOCUS"})},invalid:d,required:r("required"),setValue(n){p({type:"VALUE.SET",value:n})},value:c.get("value"),getClearTriggerBindings(){return e.button({...s,"aria-label":"Clear input","data-disabled":i(u),"data-part":"clear-trigger",dir:r("dir"),disabled:u,onClick:n=>{!x||n.defaultPrevented||(p({type:"VALUE.SET",value:""}),p({type:"INPUT.FOCUS"}))}})},getErrorIndicatorBindings(){return e.element({...s,"aria-label":"Error","data-part":"error-indicator",dir:r("dir"),hidden:!r("invalid")})},getErrorTextBindings(n){return o.ids.register("errorText",n),e.element({...s,"aria-live":"polite","data-part":"error-text",dir:r("dir"),hidden:!d,id:a.errorText(o)})},getHintBindings(n){return o.ids.register("hint",n),e.element({...s,"data-disabled":i(u),"data-part":"hint",dir:r("dir"),hidden:!!d,id:a.hint(o)})},getInputBindings(n){return o.ids.register("input",n),e.input({...s,"aria-describedby":y(a.hint(o)),"aria-invalid":b(d),"aria-labelledby":E(a.label(o),d?a.errorText(o):void 0),autoComplete:"off",autoCorrect:"off","data-empty":i(!c.get("value")),"data-focus":i(f),"data-invalid":i(d),"data-part":"input","data-readonly":i(g),defaultValue:c.get("value"),dir:r("dir"),disabled:u,form:r("form"),id:a.input(o),name:r("name"),onBlur:()=>{p({focused:!1,focusVisible:!1,type:"FOCUSED.SET"})},onChange:m=>{p({type:"VALUE.SET",value:m.target.value})},onFocus:()=>{let m=T();p({focused:!0,focusVisible:m,type:"FOCUSED.SET"})},readOnly:g,required:r("required"),spellCheck:"false",type:"text"})},getInputGroupBindings(){return e.element({...s,"data-disabled":i(u),"data-focus":i(f),"data-invalid":i(d),"data-part":"input-group","data-readonly":i(g),dir:r("dir"),onClick:n=>{n.defaultPrevented||u||p({type:"INPUT.FOCUS"})}})},getLabelBindings(n){return o.ids.register("label",n),e.label({...s,"data-disabled":i(u),"data-focus":i(f),"data-invalid":i(d),"data-part":"label",dir:r("dir"),htmlFor:a.input(o),id:a.label(o)})},getRootBindings(){return e.element({...s,"data-disabled":i(u),"data-focus":i(f),"data-invalid":i(d),"data-part":"root",dir:r("dir")})}}}import{raf as h,setElementValue as S,trackFormControl as B}from"@qualcomm-ui/dom/query";import{createMachine as C}from"@qualcomm-ui/utils/machine";var M=C({actions:{focusInputEl({computed:t,scope:e}){t("disabled")||I.input(e)?.focus()},setFocused({context:t,event:e}){e.type==="FOCUSED.SET"&&(t.set("focused",e.focused),t.set("focusVisible",e.focusVisible))},setValue:({context:t,event:e})=>{e.type==="VALUE.SET"&&t.set("value",e.value)},syncInputValue({context:t,scope:e}){let l=I.input(e);h(()=>{S(l,t.get("value"))})}},computed:{disabled:({context:t,prop:e})=>e("disabled")||t.get("fieldsetDisabled")},context:({bindable:t,prop:e})=>({fieldsetDisabled:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1,onChange:e("onFocusChange")})),focusVisible:t(()=>({defaultValue:!1})),value:t(()=>({defaultValue:e("defaultValue"),onChange:e("onValueChange"),value:e("value")}))}),effects:{trackFormControlState({context:t,scope:e}){return B(I.input(e),{onFieldsetDisabledChange:l=>{t.set("fieldsetDisabled",l)},onFormReset:()=>{t.set("value",t.initial("value")||"")}})}},ids:({bindableId:t,ids:e})=>({errorText:t(e?.errorText),hint:t(e?.hint),input:t(e?.input),label:t(e?.label)}),initialState:()=>"idle",props({props:t}){return{defaultValue:"",dir:"ltr",...t}},states:{idle:{on:{"FOCUSED.SET":{actions:["setFocused"]},"INPUT.FOCUS":{actions:["focusInputEl"]},"VALUE.SET":{actions:["setValue"]}}}},watch({action:t,context:e,track:l}){l([()=>e.get("value")],()=>{t(["syncInputValue"])})}});import{createProps as v,createSplitProps as P}from"@qualcomm-ui/utils/object";var V=v()("defaultValue","dir","disabled","getRootNode","form","ids","invalid","name","onFocusChange","onValueChange","readOnly","required","value"),G=P(V);export{O as createTextInputApi,G as splitTextInputProps,M as textInputMachine};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/text-input/text-input.api.ts", "../../src/text-input/internal/text-input.dom.ts", "../../src/text-input/text-input.machine.ts", "../../src/text-input/text-input.props.ts"],
4
- "sourcesContent": ["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {isFocusVisible} from \"@qualcomm-ui/dom/focus-visible\"\nimport {\n ariaAttr,\n booleanAriaAttr,\n booleanDataAttr,\n mergeAriaIds,\n} from \"@qualcomm-ui/utils/attributes\"\nimport type {\n IdRegistrationProps,\n Machine,\n PropNormalizer,\n} from \"@qualcomm-ui/utils/machine\"\n\nimport {domIds} from \"./internal\"\nimport type {\n TextInputApi,\n TextInputClearTriggerBindings,\n TextInputErrorIndicatorBindings,\n TextInputErrorTextBindings,\n TextInputHintBindings,\n TextInputInputBindings,\n TextInputInputGroupBindings,\n TextInputLabelBindings,\n TextInputRootBindings,\n TextInputSchema,\n TextInputScopeAttribute,\n} from \"./text-input.types\"\n\nconst commonBindings: TextInputScopeAttribute = {\n \"data-scope\": \"text-input\",\n}\n\nexport function createTextInputApi(\n machine: Machine<TextInputSchema>,\n normalize: PropNormalizer,\n): TextInputApi {\n const {computed, context, prop, scope, send} = machine\n\n const disabled = computed(\"disabled\")\n const readOnly = prop(\"readOnly\")\n const focused = context.get(\"focused\")\n const invalid = prop(\"invalid\")\n const interactive = !(readOnly || disabled)\n\n return {\n disabled,\n focusInput(): void {\n send({type: \"INPUT.FOCUS\"})\n },\n invalid,\n required: prop(\"required\"),\n setValue(value: string) {\n send({type: \"VALUE.SET\", value})\n },\n value: context.get(\"value\"),\n\n // group: prop getters\n getClearTriggerBindings(): TextInputClearTriggerBindings {\n return normalize.button({\n ...commonBindings,\n \"aria-label\": \"Clear input\",\n \"data-disabled\": booleanDataAttr(disabled),\n \"data-part\": \"clear-trigger\",\n dir: prop(\"dir\"),\n disabled,\n onClick: (event) => {\n if (!interactive || event.defaultPrevented) {\n return\n }\n send({type: \"VALUE.SET\", value: \"\"})\n send({type: \"INPUT.FOCUS\"})\n },\n })\n },\n\n getErrorIndicatorBindings(): TextInputErrorIndicatorBindings {\n return normalize.element({\n ...commonBindings,\n \"aria-label\": \"Error\",\n \"data-part\": \"error-indicator\",\n dir: prop(\"dir\"),\n hidden: !prop(\"invalid\"),\n })\n },\n\n getErrorTextBindings(\n props: IdRegistrationProps,\n ): TextInputErrorTextBindings {\n scope.ids.register(\"errorText\", props)\n return normalize.element({\n ...commonBindings,\n \"aria-live\": \"polite\",\n \"data-part\": \"error-text\",\n dir: prop(\"dir\"),\n hidden: !invalid,\n id: domIds.errorText(scope),\n })\n },\n\n getHintBindings(props: IdRegistrationProps): TextInputHintBindings {\n scope.ids.register(\"hint\", props)\n return normalize.element({\n ...commonBindings,\n \"data-disabled\": booleanDataAttr(disabled),\n \"data-part\": \"hint\",\n dir: prop(\"dir\"),\n id: domIds.hint(scope),\n })\n },\n\n getInputBindings(props: IdRegistrationProps): TextInputInputBindings {\n scope.ids.register(\"input\", props)\n return normalize.input({\n ...commonBindings,\n \"aria-describedby\": ariaAttr(domIds.hint(scope)),\n \"aria-invalid\": booleanAriaAttr(invalid),\n \"aria-labelledby\": mergeAriaIds(\n domIds.label(scope),\n invalid ? domIds.errorText(scope) : undefined,\n ),\n autoComplete: \"off\",\n autoCorrect: \"off\",\n \"data-empty\": booleanDataAttr(!context.get(\"value\")),\n \"data-focus\": booleanDataAttr(focused),\n \"data-invalid\": booleanDataAttr(invalid),\n \"data-part\": \"input\",\n \"data-readonly\": booleanDataAttr(readOnly),\n defaultValue: context.get(\"value\"),\n dir: prop(\"dir\"),\n disabled,\n form: prop(\"form\"),\n id: domIds.input(scope),\n name: prop(\"name\"),\n onBlur: () => {\n send({\n focused: false,\n focusVisible: false,\n type: \"FOCUSED.SET\",\n })\n },\n onChange: (event) => {\n send({type: \"VALUE.SET\", value: event.target.value})\n },\n onFocus: () => {\n const focusVisible = isFocusVisible()\n send({focused: true, focusVisible, type: \"FOCUSED.SET\"})\n },\n readOnly,\n required: prop(\"required\"),\n spellCheck: \"false\",\n type: \"text\",\n })\n },\n getInputGroupBindings(): TextInputInputGroupBindings {\n return normalize.element({\n ...commonBindings,\n \"data-disabled\": booleanDataAttr(disabled),\n \"data-focus\": booleanDataAttr(focused),\n \"data-invalid\": booleanDataAttr(invalid),\n \"data-part\": \"input-group\",\n \"data-readonly\": booleanDataAttr(readOnly),\n dir: prop(\"dir\"),\n onClick: (event) => {\n if (event.defaultPrevented || disabled) {\n return\n }\n send({type: \"INPUT.FOCUS\"})\n },\n })\n },\n getLabelBindings(props: IdRegistrationProps): TextInputLabelBindings {\n scope.ids.register(\"label\", props)\n return normalize.label({\n ...commonBindings,\n \"data-disabled\": booleanDataAttr(disabled),\n \"data-focus\": booleanDataAttr(focused),\n \"data-invalid\": booleanDataAttr(invalid),\n \"data-part\": \"label\",\n dir: prop(\"dir\"),\n htmlFor: domIds.input(scope),\n id: domIds.label(scope),\n })\n },\n\n getRootBindings(): TextInputRootBindings {\n return normalize.element({\n ...commonBindings,\n \"data-disabled\": booleanDataAttr(disabled),\n \"data-focus\": booleanDataAttr(focused),\n \"data-invalid\": booleanDataAttr(invalid),\n \"data-part\": \"root\",\n dir: prop(\"dir\"),\n })\n },\n }\n}\n", "// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ScopeDomElements, ScopeDomIds} from \"@qualcomm-ui/utils/machine\"\n\nimport type {TextInputElementIds, TextInputScope} from \"../text-input.types\"\n\nexport const domIds: ScopeDomIds<TextInputElementIds, TextInputScope> = {\n errorText: (scope) => scope.ids.get(\"errorText\"),\n hint: (scope) => scope.ids.get(\"hint\"),\n input: (scope) => scope.ids.get(\"input\"),\n label: (scope) => scope.ids.get(\"label\"),\n}\n\nexport const domEls: ScopeDomElements<\n TextInputElementIds,\n TextInputScope,\n {input: HTMLInputElement | null}\n> = {\n errorText: (scope) => scope.getById(domIds.errorText(scope)),\n hint: (scope) => scope.getById(domIds.hint(scope)),\n input: (scope: TextInputScope) => scope.getById(domIds.input(scope)),\n label: (scope) => scope.getById(domIds.label(scope)),\n}\n", "// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {raf, setElementValue, trackFormControl} from \"@qualcomm-ui/dom/query\"\nimport {createMachine, type MachineConfig} from \"@qualcomm-ui/utils/machine\"\n\nimport {domEls} from \"./internal\"\nimport type {TextInputSchema} from \"./text-input.types\"\n\nexport const textInputMachine: MachineConfig<TextInputSchema> = createMachine({\n actions: {\n focusInputEl({computed, scope}) {\n if (!computed(\"disabled\")) {\n domEls.input(scope)?.focus()\n }\n },\n setFocused({context, event}) {\n if (event.type !== \"FOCUSED.SET\") {\n return\n }\n context.set(\"focused\", event.focused)\n context.set(\"focusVisible\", event.focusVisible)\n },\n setValue: ({context, event}) => {\n if (event.type === \"VALUE.SET\") {\n context.set(\"value\", event.value)\n }\n },\n syncInputValue({context, scope}) {\n const inputEl = domEls.input(scope)\n raf(() => {\n setElementValue(inputEl, context.get(\"value\"))\n })\n },\n },\n computed: {\n disabled: ({context, prop}) =>\n prop(\"disabled\") || context.get(\"fieldsetDisabled\"),\n },\n context: ({bindable, prop}) => {\n return {\n fieldsetDisabled: bindable<boolean>(() => ({defaultValue: false})),\n focused: bindable<boolean>(() => ({\n defaultValue: false,\n onChange: prop(\"onFocusChange\"),\n })),\n focusVisible: bindable<boolean>(() => ({defaultValue: false})),\n value: bindable<string>(() => ({\n defaultValue: prop(\"defaultValue\"),\n onChange: prop(\"onValueChange\"),\n value: prop(\"value\"),\n })),\n }\n },\n effects: {\n trackFormControlState({context, scope}) {\n return trackFormControl(domEls.input(scope), {\n onFieldsetDisabledChange: (disabled) => {\n context.set(\"fieldsetDisabled\", disabled)\n },\n onFormReset: () => {\n context.set(\"value\", context.initial(\"value\") || \"\")\n },\n })\n },\n },\n ids: ({bindableId, ids}) => {\n return {\n errorText: bindableId<string>(ids?.errorText),\n hint: bindableId<string>(ids?.hint),\n input: bindableId<string>(ids?.input),\n label: bindableId<string>(ids?.label),\n }\n },\n initialState: () => \"idle\",\n props({props}) {\n return {\n defaultValue: \"\",\n dir: \"ltr\",\n ...props,\n }\n },\n states: {\n idle: {\n on: {\n \"FOCUSED.SET\": {\n actions: [\"setFocused\"],\n },\n \"INPUT.FOCUS\": {\n actions: [\"focusInputEl\"],\n },\n \"VALUE.SET\": {\n actions: [\"setValue\"],\n },\n },\n },\n },\n watch({action, context, track}) {\n track([() => context.get(\"value\")], () => {\n action([\"syncInputValue\"])\n })\n },\n})\n", "// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {createProps, createSplitProps} from \"@qualcomm-ui/utils/object\"\n\nimport type {TextInputApiProps} from \"./text-input.types\"\n\nconst textInputProps: (keyof TextInputApiProps)[] =\n createProps<TextInputApiProps>()(\n \"defaultValue\",\n \"dir\",\n \"disabled\",\n \"getRootNode\",\n \"form\",\n \"ids\",\n \"invalid\",\n \"name\",\n \"onFocusChange\",\n \"onValueChange\",\n \"readOnly\",\n \"required\",\n \"value\",\n )\n\nexport const splitTextInputProps: <Props extends TextInputApiProps>(\n props: Props,\n) => [TextInputApiProps, Omit<Props, keyof TextInputApiProps>] =\n createSplitProps<TextInputApiProps>(textInputProps)\n"],
5
- "mappings": "AAGA,OAAQ,kBAAAA,MAAqB,iCAC7B,OACE,YAAAC,EACA,mBAAAC,EACA,mBAAAC,EACA,gBAAAC,MACK,gCCFA,IAAMC,EAA2D,CACtE,UAAYC,GAAUA,EAAM,IAA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Q,CAC1C,EACA,YAAa,IAAM,CACjBR,EAAQ,IAAI,QAASA,EAAQ,QAAQ,OAAO,GAAK,EAAE,CACrD,CACF,CAAC,CACH,CACF,EACA,IAAK,CAAC,CAAC,WAAAS,EAAY,IAAAC,CAAG,KACb,CACL,UAAWD,EAAmBC,GAAK,SAAS,EAC5C,KAAMD,EAAmBC,GAAK,IAAI,EAClC,MAAOD,EAAmBC,GAAK,KAAK,EACpC,MAAOD,EAAmBC,GAAK,KAAK,CACtC,GAEF,aAAc,IAAM,OACpB,MAAM,CAAC,MAAAC,CAAK,EAAG,CACb,MAAO,CACL,aAAc,GACd,IAAK,MACL,GAAGA,CACL,CACF,EACA,OAAQ,CACN,KAAM,CACJ,GAAI,CACF,cAAe,CACb,QAAS,CAAC,YAAY,CACxB,EACA,cAAe,CACb,QAAS,CAAC,cAAc,CAC1B,EACA,YAAa,CACX,QAAS,CAAC,UAAU,CACtB,CACF,CACF,CACF,EACA,MAAM,CAAC,OAAAC,EAAQ,QAAAZ,EAAS,MAAAa,CAAK,EAAG,CAC9BA,EAAM,CAAC,IAAMb,EAAQ,IAAI,OAAO,CAAC,EAAG,IAAM,CACxCY,EAAO,CAAC,gBAAgB,CAAC,CAC3B,CAAC,CACH,CACF,CAAC,ECnGD,OAAQ,eAAAE,EAAa,oBAAAC,MAAuB,4BAI5C,IAAMC,EACJF,EAA+B,EAC7B,eACA,MACA,WACA,cACA,OACA,MACA,UACA,OACA,gBACA,gBACA,WACA,WACA,OACF,EAEWG,EAGXF,EAAoCC,CAAc",
4
+ "sourcesContent": ["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {isFocusVisible} from \"@qualcomm-ui/dom/focus-visible\"\nimport {\n ariaAttr,\n booleanAriaAttr,\n booleanDataAttr,\n mergeAriaIds,\n} from \"@qualcomm-ui/utils/attributes\"\nimport type {\n IdRegistrationProps,\n Machine,\n PropNormalizer,\n} from \"@qualcomm-ui/utils/machine\"\n\nimport {domIds} from \"./internal\"\nimport type {\n TextInputApi,\n TextInputClearTriggerBindings,\n TextInputErrorIndicatorBindings,\n TextInputErrorTextBindings,\n TextInputHintBindings,\n TextInputInputBindings,\n TextInputInputGroupBindings,\n TextInputLabelBindings,\n TextInputRootBindings,\n TextInputSchema,\n TextInputScopeAttribute,\n} from \"./text-input.types\"\n\nconst commonBindings: TextInputScopeAttribute = {\n \"data-scope\": \"text-input\",\n}\n\nexport function createTextInputApi(\n machine: Machine<TextInputSchema>,\n normalize: PropNormalizer,\n): TextInputApi {\n const {computed, context, prop, scope, send} = machine\n\n const disabled = computed(\"disabled\")\n const readOnly = prop(\"readOnly\")\n const focused = context.get(\"focused\")\n const invalid = prop(\"invalid\")\n const interactive = !(readOnly || disabled)\n\n return {\n disabled,\n focusInput(): void {\n send({type: \"INPUT.FOCUS\"})\n },\n invalid,\n required: prop(\"required\"),\n setValue(value: string) {\n send({type: \"VALUE.SET\", value})\n },\n value: context.get(\"value\"),\n\n // group: prop getters\n getClearTriggerBindings(): TextInputClearTriggerBindings {\n return normalize.button({\n ...commonBindings,\n \"aria-label\": \"Clear input\",\n \"data-disabled\": booleanDataAttr(disabled),\n \"data-part\": \"clear-trigger\",\n dir: prop(\"dir\"),\n disabled,\n onClick: (event) => {\n if (!interactive || event.defaultPrevented) {\n return\n }\n send({type: \"VALUE.SET\", value: \"\"})\n send({type: \"INPUT.FOCUS\"})\n },\n })\n },\n\n getErrorIndicatorBindings(): TextInputErrorIndicatorBindings {\n return normalize.element({\n ...commonBindings,\n \"aria-label\": \"Error\",\n \"data-part\": \"error-indicator\",\n dir: prop(\"dir\"),\n hidden: !prop(\"invalid\"),\n })\n },\n\n getErrorTextBindings(\n props: IdRegistrationProps,\n ): TextInputErrorTextBindings {\n scope.ids.register(\"errorText\", props)\n return normalize.element({\n ...commonBindings,\n \"aria-live\": \"polite\",\n \"data-part\": \"error-text\",\n dir: prop(\"dir\"),\n hidden: !invalid,\n id: domIds.errorText(scope),\n })\n },\n\n getHintBindings(props: IdRegistrationProps): TextInputHintBindings {\n scope.ids.register(\"hint\", props)\n return normalize.element({\n ...commonBindings,\n \"data-disabled\": booleanDataAttr(disabled),\n \"data-part\": \"hint\",\n dir: prop(\"dir\"),\n hidden: !!invalid,\n id: domIds.hint(scope),\n })\n },\n\n getInputBindings(props: IdRegistrationProps): TextInputInputBindings {\n scope.ids.register(\"input\", props)\n return normalize.input({\n ...commonBindings,\n \"aria-describedby\": ariaAttr(domIds.hint(scope)),\n \"aria-invalid\": booleanAriaAttr(invalid),\n \"aria-labelledby\": mergeAriaIds(\n domIds.label(scope),\n invalid ? domIds.errorText(scope) : undefined,\n ),\n autoComplete: \"off\",\n autoCorrect: \"off\",\n \"data-empty\": booleanDataAttr(!context.get(\"value\")),\n \"data-focus\": booleanDataAttr(focused),\n \"data-invalid\": booleanDataAttr(invalid),\n \"data-part\": \"input\",\n \"data-readonly\": booleanDataAttr(readOnly),\n defaultValue: context.get(\"value\"),\n dir: prop(\"dir\"),\n disabled,\n form: prop(\"form\"),\n id: domIds.input(scope),\n name: prop(\"name\"),\n onBlur: () => {\n send({\n focused: false,\n focusVisible: false,\n type: \"FOCUSED.SET\",\n })\n },\n onChange: (event) => {\n send({type: \"VALUE.SET\", value: event.target.value})\n },\n onFocus: () => {\n const focusVisible = isFocusVisible()\n send({focused: true, focusVisible, type: \"FOCUSED.SET\"})\n },\n readOnly,\n required: prop(\"required\"),\n spellCheck: \"false\",\n type: \"text\",\n })\n },\n getInputGroupBindings(): TextInputInputGroupBindings {\n return normalize.element({\n ...commonBindings,\n \"data-disabled\": booleanDataAttr(disabled),\n \"data-focus\": booleanDataAttr(focused),\n \"data-invalid\": booleanDataAttr(invalid),\n \"data-part\": \"input-group\",\n \"data-readonly\": booleanDataAttr(readOnly),\n dir: prop(\"dir\"),\n onClick: (event) => {\n if (event.defaultPrevented || disabled) {\n return\n }\n send({type: \"INPUT.FOCUS\"})\n },\n })\n },\n getLabelBindings(props: IdRegistrationProps): TextInputLabelBindings {\n scope.ids.register(\"label\", props)\n return normalize.label({\n ...commonBindings,\n \"data-disabled\": booleanDataAttr(disabled),\n \"data-focus\": booleanDataAttr(focused),\n \"data-invalid\": booleanDataAttr(invalid),\n \"data-part\": \"label\",\n dir: prop(\"dir\"),\n htmlFor: domIds.input(scope),\n id: domIds.label(scope),\n })\n },\n\n getRootBindings(): TextInputRootBindings {\n return normalize.element({\n ...commonBindings,\n \"data-disabled\": booleanDataAttr(disabled),\n \"data-focus\": booleanDataAttr(focused),\n \"data-invalid\": booleanDataAttr(invalid),\n \"data-part\": \"root\",\n dir: prop(\"dir\"),\n })\n },\n }\n}\n", "// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ScopeDomElements, ScopeDomIds} from \"@qualcomm-ui/utils/machine\"\n\nimport type {TextInputElementIds, TextInputScope} from \"../text-input.types\"\n\nexport const domIds: ScopeDomIds<TextInputElementIds, TextInputScope> = {\n errorText: (scope) => scope.ids.get(\"errorText\"),\n hint: (scope) => scope.ids.get(\"hint\"),\n input: (scope) => scope.ids.get(\"input\"),\n label: (scope) => scope.ids.get(\"label\"),\n}\n\nexport const domEls: ScopeDomElements<\n TextInputElementIds,\n TextInputScope,\n {input: HTMLInputElement | null}\n> = {\n errorText: (scope) => scope.getById(domIds.errorText(scope)),\n hint: (scope) => scope.getById(domIds.hint(scope)),\n input: (scope: TextInputScope) => scope.getById(domIds.input(scope)),\n label: (scope) => scope.getById(domIds.label(scope)),\n}\n", "// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {raf, setElementValue, trackFormControl} from \"@qualcomm-ui/dom/query\"\nimport {createMachine, type MachineConfig} from \"@qualcomm-ui/utils/machine\"\n\nimport {domEls} from \"./internal\"\nimport type {TextInputSchema} from \"./text-input.types\"\n\nexport const textInputMachine: MachineConfig<TextInputSchema> = createMachine({\n actions: {\n focusInputEl({computed, scope}) {\n if (!computed(\"disabled\")) {\n domEls.input(scope)?.focus()\n }\n },\n setFocused({context, event}) {\n if (event.type !== \"FOCUSED.SET\") {\n return\n }\n context.set(\"focused\", event.focused)\n context.set(\"focusVisible\", event.focusVisible)\n },\n setValue: ({context, event}) => {\n if (event.type === \"VALUE.SET\") {\n context.set(\"value\", event.value)\n }\n },\n syncInputValue({context, scope}) {\n const inputEl = domEls.input(scope)\n raf(() => {\n setElementValue(inputEl, context.get(\"value\"))\n })\n },\n },\n computed: {\n disabled: ({context, prop}) =>\n prop(\"disabled\") || context.get(\"fieldsetDisabled\"),\n },\n context: ({bindable, prop}) => {\n return {\n fieldsetDisabled: bindable<boolean>(() => ({defaultValue: false})),\n focused: bindable<boolean>(() => ({\n defaultValue: false,\n onChange: prop(\"onFocusChange\"),\n })),\n focusVisible: bindable<boolean>(() => ({defaultValue: false})),\n value: bindable<string>(() => ({\n defaultValue: prop(\"defaultValue\"),\n onChange: prop(\"onValueChange\"),\n value: prop(\"value\"),\n })),\n }\n },\n effects: {\n trackFormControlState({context, scope}) {\n return trackFormControl(domEls.input(scope), {\n onFieldsetDisabledChange: (disabled) => {\n context.set(\"fieldsetDisabled\", disabled)\n },\n onFormReset: () => {\n context.set(\"value\", context.initial(\"value\") || \"\")\n },\n })\n },\n },\n ids: ({bindableId, ids}) => {\n return {\n errorText: bindableId<string>(ids?.errorText),\n hint: bindableId<string>(ids?.hint),\n input: bindableId<string>(ids?.input),\n label: bindableId<string>(ids?.label),\n }\n },\n initialState: () => \"idle\",\n props({props}) {\n return {\n defaultValue: \"\",\n dir: \"ltr\",\n ...props,\n }\n },\n states: {\n idle: {\n on: {\n \"FOCUSED.SET\": {\n actions: [\"setFocused\"],\n },\n \"INPUT.FOCUS\": {\n actions: [\"focusInputEl\"],\n },\n \"VALUE.SET\": {\n actions: [\"setValue\"],\n },\n },\n },\n },\n watch({action, context, track}) {\n track([() => context.get(\"value\")], () => {\n action([\"syncInputValue\"])\n })\n },\n})\n", "// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {createProps, createSplitProps} from \"@qualcomm-ui/utils/object\"\n\nimport type {TextInputApiProps} from \"./text-input.types\"\n\nconst textInputProps: (keyof TextInputApiProps)[] =\n createProps<TextInputApiProps>()(\n \"defaultValue\",\n \"dir\",\n \"disabled\",\n \"getRootNode\",\n \"form\",\n \"ids\",\n \"invalid\",\n \"name\",\n \"onFocusChange\",\n \"onValueChange\",\n \"readOnly\",\n \"required\",\n \"value\",\n )\n\nexport const splitTextInputProps: <Props extends TextInputApiProps>(\n props: Props,\n) => [TextInputApiProps, Omit<Props, keyof TextInputApiProps>] =\n createSplitProps<TextInputApiProps>(textInputProps)\n"],
5
+ "mappings": "AAGA,OAAQ,kBAAAA,MAAqB,iCAC7B,OACE,YAAAC,EACA,mBAAAC,EACA,mBAAAC,EACA,gBAAAC,MACK,gCCFA,IAAMC,EAA2D,CACtE,UAAYC,GAAUA,EAAM,IAAI,IAAI,WAAW,EAC/C,KAAOA,GAAUA,EAAM,IAAI,IAAI,MAAM,EACrC,MAAQA,GAAUA,EAAM,IAAI,IAAI,OAAO,EACvC,MAAQA,GAAUA,EAAM,IAAI,IAAI,OAAO,CACzC,EAEaC,EAIT,CACF,UAAYD,GAAUA,EAAM,QAAQD,EAAO,UAAUC,CAAK,CAAC,EAC3D,KAAOA,GAAUA,EAAM,QAAQD,EAAO,KAAKC,CAAK,CAAC,EACjD,MAAQA,GAA0BA,EAAM,QAAQD,EAAO,MAAMC,CAAK,CAAC,EACnE,MAAQA,GAAUA,EAAM,QAAQD,EAAO,MAAMC,CAAK,CAAC,CACrD,EDQA,IAAME,EAA0C,CAC9C,aAAc,YAChB,EAEO,SAASC,EACdC,EACAC,EACc,CACd,GAAM,CAAC,SAAAC,EAAU,QAAAC,EAAS,KAAAC,EAAM,MAAAC,EAAO,KAAAC,CAAI,EAA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a,CACX,QAAS,CAAC,UAAU,CACtB,CACF,CACF,CACF,EACA,MAAM,CAAC,OAAAC,EAAQ,QAAAZ,EAAS,MAAAa,CAAK,EAAG,CAC9BA,EAAM,CAAC,IAAMb,EAAQ,IAAI,OAAO,CAAC,EAAG,IAAM,CACxCY,EAAO,CAAC,gBAAgB,CAAC,CAC3B,CAAC,CACH,CACF,CAAC,ECnGD,OAAQ,eAAAE,EAAa,oBAAAC,MAAuB,4BAI5C,IAAMC,EACJF,EAA+B,EAC7B,eACA,MACA,WACA,cACA,OACA,MACA,UACA,OACA,gBACA,gBACA,WACA,WACA,OACF,EAEWG,EAGXF,EAAoCC,CAAc",
6
6
  "names": ["isFocusVisible", "ariaAttr", "booleanAriaAttr", "booleanDataAttr", "mergeAriaIds", "domIds", "scope", "domEls", "commonBindings", "createTextInputApi", "machine", "normalize", "computed", "context", "prop", "scope", "send", "disabled", "readOnly", "focused", "invalid", "interactive", "value", "booleanDataAttr", "event", "props", "domIds", "ariaAttr", "booleanAriaAttr", "mergeAriaIds", "focusVisible", "isFocusVisible", "raf", "setElementValue", "trackFormControl", "createMachine", "textInputMachine", "createMachine", "computed", "scope", "domEls", "context", "event", "inputEl", "raf", "setElementValue", "prop", "bindable", "trackFormControl", "disabled", "bindableId", "ids", "props", "action", "track", "createProps", "createSplitProps", "textInputProps", "splitTextInputProps"]
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"text-input.api.d.ts","sourceRoot":"","sources":["../../src/text-input/text-input.api.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAEV,OAAO,EACP,cAAc,EACf,MAAM,4BAA4B,CAAA;AAGnC,OAAO,KAAK,EACV,YAAY,EASZ,eAAe,EAEhB,MAAM,oBAAoB,CAAA;AAM3B,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,EACjC,SAAS,EAAE,cAAc,GACxB,YAAY,CAgKd"}
1
+ {"version":3,"file":"text-input.api.d.ts","sourceRoot":"","sources":["../../src/text-input/text-input.api.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAEV,OAAO,EACP,cAAc,EACf,MAAM,4BAA4B,CAAA;AAGnC,OAAO,KAAK,EACV,YAAY,EASZ,eAAe,EAEhB,MAAM,oBAAoB,CAAA;AAM3B,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,EACjC,SAAS,EAAE,cAAc,GACxB,YAAY,CAiKd"}