@qualcomm-ui/react 1.4.3 → 1.5.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/checkbox/checkbox.d.ts +12 -1
- package/dist/checkbox/checkbox.d.ts.map +1 -1
- package/dist/checkbox/index.js +1 -1
- package/dist/checkbox/index.js.map +2 -2
- package/dist/combobox/combobox.d.ts +12 -1
- package/dist/combobox/combobox.d.ts.map +1 -1
- package/dist/combobox/index.js +1 -1
- package/dist/combobox/index.js.map +2 -2
- package/dist/password-input/index.js +1 -1
- package/dist/password-input/index.js.map +2 -2
- package/dist/password-input/password-input.d.ts +12 -1
- package/dist/password-input/password-input.d.ts.map +1 -1
- package/dist/radio/index.js +1 -1
- package/dist/radio/index.js.map +2 -2
- package/dist/radio/radio.d.ts +12 -1
- package/dist/radio/radio.d.ts.map +1 -1
- package/dist/select/index.js +1 -1
- package/dist/select/index.js.map +2 -2
- package/dist/select/select.d.ts +12 -1
- package/dist/select/select.d.ts.map +1 -1
- package/dist/switch/index.js +1 -1
- package/dist/switch/index.js.map +2 -2
- package/dist/switch/switch.d.ts +12 -1
- package/dist/switch/switch.d.ts.map +1 -1
- package/dist/text-input/index.js +1 -1
- package/dist/text-input/index.js.map +2 -2
- package/dist/text-input/text-input.d.ts +12 -1
- package/dist/text-input/text-input.d.ts.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/select/select.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAA;AAGlD,OAAO,EAAS,KAAK,WAAW,EAAC,MAAM,gCAAgC,CAAA;AAGvE,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAgB,KAAK,kBAAkB,EAAC,MAAM,kBAAkB,CAAA;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AE,cAAc,EACjC,SAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,SAAS,EACT,cAAc,EACd,IAAI,EACJ,SAAS,EACT,cAAc,EACd,KAAK,EACL,UAAU,EACV,WAAW,EACX,eAAe,EACf,WAAW,EAAE,eAAe,EAC5B,cAAc,EACd,GAAG,KAAK,EACT,EAAE,WAAW,GAAG,YAAY,CAkE5B"}
|
package/dist/switch/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx as jsx7,jsxs}from"react/jsx-runtime";import{useOptionalContentId}from"@qualcomm-ui/react-core/machine";import{useControlledId as useControlledId2}from"@qualcomm-ui/react-core/state";import{jsx as jsx2}from"react/jsx-runtime";import{useSwitchControl}from"@qualcomm-ui/react-core/switch";import{PolymorphicElement as PolymorphicElement2}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps2}from"@qualcomm-ui/utils/merge-props";import{createGuardedContext}from"@qualcomm-ui/react-core/context";var[QdsSwitchContextProvider,useQdsSwitchContext]=createGuardedContext({hookName:"useQdsSwitchContext",providerName:"<QdsSwitchContextProvider>",strict:!0});import{jsx}from"react/jsx-runtime";import{useSwitchThumb}from"@qualcomm-ui/react-core/switch";import{PolymorphicElement}from"@qualcomm-ui/react-core/system";import{mergeProps}from"@qualcomm-ui/utils/merge-props";function SwitchThumb(t0){let{children,...props}=t0,contextProps=useSwitchThumb(),qdsContext=useQdsSwitchContext(),mergedProps=mergeProps(contextProps,qdsContext.getThumbBindings(),props);return jsx(PolymorphicElement,{as:"span",...mergedProps,children})}function SwitchControl(t0){let{children:t1,...props}=t0,children=t1===void 0?jsx2(SwitchThumb,{}):t1,contextProps=useSwitchControl(),qdsContext=useQdsSwitchContext(),mergedProps=mergeProps2(contextProps,qdsContext.getControlBindings(),props);return jsx2(PolymorphicElement2,{as:"span",...mergedProps,children})}import{c as _c}from"react/compiler-runtime";import{jsx as jsx3}from"react/jsx-runtime";import{AlertCircle}from"lucide-react";import{InputErrorText}from"@qualcomm-ui/react/input";import{useSwitchErrorText}from"@qualcomm-ui/react-core/switch";import{mergeProps as mergeProps3}from"@qualcomm-ui/utils/merge-props";function SwitchErrorText(t0){let $=_c(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useSwitchErrorText(t1),qdsContext=useQdsSwitchContext(),mergedProps=mergeProps3(contextProps,qdsContext.getErrorTextBindings(),props);return jsx3(InputErrorText,{icon:AlertCircle,...mergedProps,children})}import{c as _c2}from"react/compiler-runtime";import{jsx as jsx4}from"react/jsx-runtime";import{useSwitchHiddenInput}from"@qualcomm-ui/react-core/switch";import{mergeProps as mergeProps4}from"@qualcomm-ui/utils/merge-props";function SwitchHiddenInput(t0){let $=_c2(2),{id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useSwitchHiddenInput(t1),qdsContext=useQdsSwitchContext(),mergedProps=mergeProps4(contextProps,qdsContext.getHiddenInputBindings(),props);return jsx4("input",{...mergedProps})}import{c as _c3}from"react/compiler-runtime";import{jsx as jsx5}from"react/jsx-runtime";import{useSwitchLabel}from"@qualcomm-ui/react-core/switch";import{PolymorphicElement as PolymorphicElement3}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps5}from"@qualcomm-ui/utils/merge-props";function SwitchLabel(t0){let $=_c3(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useSwitchLabel(t1),qdsContext=useQdsSwitchContext(),mergedProps=mergeProps5(contextProps,qdsContext.getLabelBindings(),props);return jsx5(PolymorphicElement3,{as:"span",...mergedProps,children})}import{c as _c4}from"react/compiler-runtime";import{jsx as jsx6}from"react/jsx-runtime";import"react";import{splitSwitchProps}from"@qualcomm-ui/core/switch";import{createQdsSwitchApi}from"@qualcomm-ui/qds-core/switch";import{normalizeProps}from"@qualcomm-ui/react-core/machine";import{useControlledId}from"@qualcomm-ui/react-core/state";import{SwitchContextProvider,useSwitch}from"@qualcomm-ui/react-core/switch";import{PolymorphicElement as PolymorphicElement4}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps6}from"@qualcomm-ui/utils/merge-props";function SwitchRoot(t0){let $=_c4(2),{children,id,size,...props}=t0,[switchProps,localProps]=splitSwitchProps(props),context=useSwitch(switchProps),t1;$[0]!==size?(t1=createQdsSwitchApi({size},normalizeProps),$[0]=size,$[1]=t1):t1=$[1];let qdsContext=t1,mergedProps=mergeProps6(context.getRootBindings({id:useControlledId(id)}),qdsContext.getRootBindings(),localProps);return jsx6(SwitchContextProvider,{value:context,children:jsx6(QdsSwitchContextProvider,{value:qdsContext,children:jsx6(PolymorphicElement4,{as:"label",...mergedProps,children})})})}function Switch(t0){let{controlProps,errorText,errorTextProps,hiddenInputProps,label,labelProps,thumbProps,...props}=t0,labelContent=label||labelProps?.children,errorTextContent=errorText||errorTextProps?.children,ids={errorText:useOptionalContentId(errorTextContent,errorTextProps),hiddenInput:useControlledId2(hiddenInputProps?.id),label:useOptionalContentId(labelContent,labelProps),root:useControlledId2(props.id),...props.ids};return jsxs(SwitchRoot,{...props,ids,children:[jsx7(SwitchHiddenInput,{...hiddenInputProps,id:ids.hiddenInput}),jsx7(SwitchControl,{...controlProps,children:jsx7(SwitchThumb,{...thumbProps})}),labelContent?jsx7(SwitchLabel,{...labelProps,id:ids.label,children:labelContent}):null,errorTextContent?jsx7(SwitchErrorText,{...errorTextProps,id:ids.errorText,children:errorTextContent}):null]})}var Switch2=Switch;Switch2.Control=SwitchControl;Switch2.ErrorText=SwitchErrorText;Switch2.HiddenInput=SwitchHiddenInput;Switch2.Label=SwitchLabel;Switch2.Root=SwitchRoot;Switch2.Thumb=SwitchThumb;export{QdsSwitchContextProvider,Switch2 as Switch,useQdsSwitchContext};
|
|
2
|
+
import{jsx as jsx7,jsxs}from"react/jsx-runtime";import{useOptionalContentId}from"@qualcomm-ui/react-core/machine";import{useControlledId as useControlledId2}from"@qualcomm-ui/react-core/state";import{jsx as jsx2}from"react/jsx-runtime";import{useSwitchControl}from"@qualcomm-ui/react-core/switch";import{PolymorphicElement as PolymorphicElement2}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps2}from"@qualcomm-ui/utils/merge-props";import{createGuardedContext}from"@qualcomm-ui/react-core/context";var[QdsSwitchContextProvider,useQdsSwitchContext]=createGuardedContext({hookName:"useQdsSwitchContext",providerName:"<QdsSwitchContextProvider>",strict:!0});import{jsx}from"react/jsx-runtime";import{useSwitchThumb}from"@qualcomm-ui/react-core/switch";import{PolymorphicElement}from"@qualcomm-ui/react-core/system";import{mergeProps}from"@qualcomm-ui/utils/merge-props";function SwitchThumb(t0){let{children,...props}=t0,contextProps=useSwitchThumb(),qdsContext=useQdsSwitchContext(),mergedProps=mergeProps(contextProps,qdsContext.getThumbBindings(),props);return jsx(PolymorphicElement,{as:"span",...mergedProps,children})}function SwitchControl(t0){let{children:t1,...props}=t0,children=t1===void 0?jsx2(SwitchThumb,{}):t1,contextProps=useSwitchControl(),qdsContext=useQdsSwitchContext(),mergedProps=mergeProps2(contextProps,qdsContext.getControlBindings(),props);return jsx2(PolymorphicElement2,{as:"span",...mergedProps,children})}import{c as _c}from"react/compiler-runtime";import{jsx as jsx3}from"react/jsx-runtime";import{AlertCircle}from"lucide-react";import{InputErrorText}from"@qualcomm-ui/react/input";import{useSwitchErrorText}from"@qualcomm-ui/react-core/switch";import{mergeProps as mergeProps3}from"@qualcomm-ui/utils/merge-props";function SwitchErrorText(t0){let $=_c(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useSwitchErrorText(t1),qdsContext=useQdsSwitchContext(),mergedProps=mergeProps3(contextProps,qdsContext.getErrorTextBindings(),props);return jsx3(InputErrorText,{icon:AlertCircle,...mergedProps,children})}import{c as _c2}from"react/compiler-runtime";import{jsx as jsx4}from"react/jsx-runtime";import{useSwitchHiddenInput}from"@qualcomm-ui/react-core/switch";import{mergeProps as mergeProps4}from"@qualcomm-ui/utils/merge-props";function SwitchHiddenInput(t0){let $=_c2(2),{id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useSwitchHiddenInput(t1),qdsContext=useQdsSwitchContext(),mergedProps=mergeProps4(contextProps,qdsContext.getHiddenInputBindings(),props);return jsx4("input",{...mergedProps})}import{c as _c3}from"react/compiler-runtime";import{jsx as jsx5}from"react/jsx-runtime";import{useSwitchLabel}from"@qualcomm-ui/react-core/switch";import{PolymorphicElement as PolymorphicElement3}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps5}from"@qualcomm-ui/utils/merge-props";function SwitchLabel(t0){let $=_c3(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useSwitchLabel(t1),qdsContext=useQdsSwitchContext(),mergedProps=mergeProps5(contextProps,qdsContext.getLabelBindings(),props);return jsx5(PolymorphicElement3,{as:"span",...mergedProps,children})}import{c as _c4}from"react/compiler-runtime";import{jsx as jsx6}from"react/jsx-runtime";import"react";import{splitSwitchProps}from"@qualcomm-ui/core/switch";import{createQdsSwitchApi}from"@qualcomm-ui/qds-core/switch";import{normalizeProps}from"@qualcomm-ui/react-core/machine";import{useControlledId}from"@qualcomm-ui/react-core/state";import{SwitchContextProvider,useSwitch}from"@qualcomm-ui/react-core/switch";import{PolymorphicElement as PolymorphicElement4}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps6}from"@qualcomm-ui/utils/merge-props";function SwitchRoot(t0){let $=_c4(2),{children,id,size,...props}=t0,[switchProps,localProps]=splitSwitchProps(props),context=useSwitch(switchProps),t1;$[0]!==size?(t1=createQdsSwitchApi({size},normalizeProps),$[0]=size,$[1]=t1):t1=$[1];let qdsContext=t1,mergedProps=mergeProps6(context.getRootBindings({id:useControlledId(id)}),qdsContext.getRootBindings(),localProps);return jsx6(SwitchContextProvider,{value:context,children:jsx6(QdsSwitchContextProvider,{value:qdsContext,children:jsx6(PolymorphicElement4,{as:"label",...mergedProps,children})})})}function Switch(t0){let{"aria-label":ariaLabel,"aria-labelledby":ariaLabelledBy,controlProps,errorText,errorTextProps,hiddenInputProps:hiddenInputPropsProp,label,labelProps,thumbProps,...props}=t0,labelContent=label||labelProps?.children,errorTextContent=errorText||errorTextProps?.children,hiddenInputProps={...hiddenInputPropsProp};ariaLabel!==void 0&&(hiddenInputProps["aria-label"]=ariaLabel),ariaLabelledBy!==void 0&&(hiddenInputProps["aria-labelledby"]=ariaLabelledBy);let ids={errorText:useOptionalContentId(errorTextContent,errorTextProps),hiddenInput:useControlledId2(hiddenInputProps?.id),label:useOptionalContentId(labelContent,labelProps),root:useControlledId2(props.id),...props.ids};return jsxs(SwitchRoot,{...props,ids,children:[jsx7(SwitchHiddenInput,{...hiddenInputProps,id:ids.hiddenInput}),jsx7(SwitchControl,{...controlProps,children:jsx7(SwitchThumb,{...thumbProps})}),labelContent?jsx7(SwitchLabel,{...labelProps,id:ids.label,children:labelContent}):null,errorTextContent?jsx7(SwitchErrorText,{...errorTextProps,id:ids.errorText,children:errorTextContent}):null]})}var Switch2=Switch;Switch2.Control=SwitchControl;Switch2.ErrorText=SwitchErrorText;Switch2.HiddenInput=SwitchHiddenInput;Switch2.Label=SwitchLabel;Switch2.Root=SwitchRoot;Switch2.Thumb=SwitchThumb;export{QdsSwitchContextProvider,Switch2 as Switch,useQdsSwitchContext};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/switch/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/switch/switch.tsx", "../../src/switch/switch-control.tsx", "../../src/switch/qds-switch-context.ts", "../../src/switch/switch-thumb.tsx", "../../src/switch/switch-error-text.tsx", "../../src/switch/switch-hidden-input.tsx", "../../src/switch/switch-label.tsx", "../../src/switch/switch-root.tsx", "../../src/switch/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { useOptionalContentId } from \"@qualcomm-ui/react-core/machine\";\nimport { useControlledId } from \"@qualcomm-ui/react-core/state\";\nimport { SwitchControl } from \"./switch-control\";\nimport { SwitchErrorText } from \"./switch-error-text\";\nimport { SwitchHiddenInput } from \"./switch-hidden-input\";\nimport { SwitchLabel } from \"./switch-label\";\nimport { SwitchRoot } from \"./switch-root\";\nimport { SwitchThumb } from \"./switch-thumb\";\nexport function Switch(t0) {\n const {\n controlProps,\n errorText,\n errorTextProps,\n hiddenInputProps,\n label,\n labelProps,\n thumbProps,\n ...props\n } = t0;\n const labelContent = label || labelProps?.children;\n const errorTextContent = errorText || errorTextProps?.children;\n const ids = {\n errorText: useOptionalContentId(errorTextContent, errorTextProps),\n hiddenInput: useControlledId(hiddenInputProps?.id),\n label: useOptionalContentId(labelContent, labelProps),\n root: useControlledId(props.id),\n ...props.ids\n };\n return jsxs(SwitchRoot, {\n ...props,\n ids,\n children: [jsx(SwitchHiddenInput, {\n ...hiddenInputProps,\n id: ids.hiddenInput\n }), jsx(SwitchControl, {\n ...controlProps,\n children: jsx(SwitchThumb, {\n ...thumbProps\n })\n }), labelContent ? jsx(SwitchLabel, {\n ...labelProps,\n id: ids.label,\n children: labelContent\n }) : null, errorTextContent ? jsx(SwitchErrorText, {\n ...errorTextProps,\n id: ids.errorText,\n children: errorTextContent\n }) : null]\n });\n}", "import { jsx } from \"react/jsx-runtime\";\nimport { useSwitchControl } from \"@qualcomm-ui/react-core/switch\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsSwitchContext } from \"./qds-switch-context\";\nimport { SwitchThumb } from \"./switch-thumb\";\nexport function SwitchControl(t0) {\n const {\n children: t1,\n ...props\n } = t0;\n const children = t1 === undefined ? jsx(SwitchThumb, {}) : t1;\n const contextProps = useSwitchControl();\n const qdsContext = useQdsSwitchContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getControlBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"span\",\n ...mergedProps,\n children\n });\n}", "import { createGuardedContext } from \"@qualcomm-ui/react-core/context\";\nexport const [QdsSwitchContextProvider, useQdsSwitchContext] = createGuardedContext({\n hookName: \"useQdsSwitchContext\",\n providerName: \"<QdsSwitchContextProvider>\",\n strict: true\n});", "import { jsx } from \"react/jsx-runtime\";\nimport { useSwitchThumb } from \"@qualcomm-ui/react-core/switch\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsSwitchContext } from \"./qds-switch-context\";\nexport function SwitchThumb(t0) {\n const {\n children,\n ...props\n } = t0;\n const contextProps = useSwitchThumb();\n const qdsContext = useQdsSwitchContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getThumbBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"span\",\n ...mergedProps,\n children\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { AlertCircle } from \"lucide-react\";\nimport { InputErrorText } from \"@qualcomm-ui/react/input\";\nimport { useSwitchErrorText } from \"@qualcomm-ui/react-core/switch\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsSwitchContext } from \"./qds-switch-context\";\nexport function SwitchErrorText(t0) {\n const $ = _c(2);\n const {\n children,\n id,\n ...props\n } = t0;\n let t1;\n if ($[0] !== id) {\n t1 = {\n id\n };\n $[0] = id;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const contextProps = useSwitchErrorText(t1);\n const qdsContext = useQdsSwitchContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getErrorTextBindings(), props);\n return jsx(InputErrorText, {\n icon: AlertCircle,\n ...mergedProps,\n children\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useSwitchHiddenInput } from \"@qualcomm-ui/react-core/switch\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsSwitchContext } from \"./qds-switch-context\";\nexport function SwitchHiddenInput(t0) {\n const $ = _c(2);\n const {\n id,\n ...props\n } = t0;\n let t1;\n if ($[0] !== id) {\n t1 = {\n id\n };\n $[0] = id;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const contextProps = useSwitchHiddenInput(t1);\n const qdsContext = useQdsSwitchContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getHiddenInputBindings(), props);\n return jsx(\"input\", {\n ...mergedProps\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useSwitchLabel } from \"@qualcomm-ui/react-core/switch\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsSwitchContext } from \"./qds-switch-context\";\nexport function SwitchLabel(t0) {\n const $ = _c(2);\n const {\n children,\n id,\n ...props\n } = t0;\n let t1;\n if ($[0] !== id) {\n t1 = {\n id\n };\n $[0] = id;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const contextProps = useSwitchLabel(t1);\n const qdsContext = useQdsSwitchContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getLabelBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"span\",\n ...mergedProps,\n children\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useMemo } from \"react\";\nimport { splitSwitchProps } from \"@qualcomm-ui/core/switch\";\nimport { createQdsSwitchApi } from \"@qualcomm-ui/qds-core/switch\";\nimport { normalizeProps } from \"@qualcomm-ui/react-core/machine\";\nimport { useControlledId } from \"@qualcomm-ui/react-core/state\";\nimport { SwitchContextProvider, useSwitch } from \"@qualcomm-ui/react-core/switch\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { QdsSwitchContextProvider } from \"./qds-switch-context\";\nexport function SwitchRoot(t0) {\n const $ = _c(2);\n const {\n children,\n id,\n size,\n ...props\n } = t0;\n const [switchProps, localProps] = splitSwitchProps(props);\n const context = useSwitch(switchProps);\n let t1;\n if ($[0] !== size) {\n t1 = createQdsSwitchApi({\n size\n }, normalizeProps);\n $[0] = size;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const qdsContext = t1;\n const mergedProps = mergeProps(context.getRootBindings({\n id: useControlledId(id)\n }), qdsContext.getRootBindings(), localProps);\n return jsx(SwitchContextProvider, {\n value: context,\n children: jsx(QdsSwitchContextProvider, {\n value: qdsContext,\n children: jsx(PolymorphicElement, {\n as: \"label\",\n ...mergedProps,\n children\n })\n })\n });\n}", "import { Switch as SimpleSwitch } from \"./switch\";\nimport { SwitchControl } from \"./switch-control\";\nimport { SwitchErrorText } from \"./switch-error-text\";\nimport { SwitchHiddenInput } from \"./switch-hidden-input\";\nimport { SwitchLabel } from \"./switch-label\";\nimport { SwitchRoot } from \"./switch-root\";\nimport { SwitchThumb } from \"./switch-thumb\";\nexport * from \"./qds-switch-context\";\nexport const Switch = SimpleSwitch;\nSwitch.Control = SwitchControl;\nSwitch.ErrorText = SwitchErrorText;\nSwitch.HiddenInput = SwitchHiddenInput;\nSwitch.Label = SwitchLabel;\nSwitch.Root = SwitchRoot;\nSwitch.Thumb = SwitchThumb;"],
|
|
5
|
-
"mappings": ";AAAA,OAAS,OAAAA,KAAK,SAAY,oBAC1B,OAAS,yBAA4B,kCACrC,OAAS,mBAAAC,qBAAuB,gCCFhC,OAAS,OAAAC,SAAW,oBACpB,OAAS,qBAAwB,iCACjC,OAAS,sBAAAC,wBAA0B,iCACnC,OAAS,cAAAC,gBAAkB,iCCH3B,OAAS,yBAA4B,kCAC9B,GAAM,CAAC,yBAA0B,mBAAmB,EAAI,qBAAqB,CAClF,SAAU,sBACV,aAAc,6BAC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,SACA,GACA,KACA,GAAG,KACL,EAAI,GACE,CAAC,YAAa,UAAU,EAAI,iBAAiB,KAAK,EAClD,QAAU,UAAU,WAAW,EACjC,GACA,EAAE,CAAC,IAAM,MACX,GAAK,mBAAmB,CACtB,IACF,EAAG,cAAc,EACjB,EAAE,CAAC,EAAI,KACP,EAAE,CAAC,EAAI,IAEP,GAAK,EAAE,CAAC,EAEV,IAAM,WAAa,GACb,YAAcC,YAAW,QAAQ,gBAAgB,CACrD,GAAI,gBAAgB,EAAE,CACxB,CAAC,EAAG,WAAW,gBAAgB,EAAG,UAAU,EAC5C,OAAOC,KAAI,sBAAuB,CAChC,MAAO,QACP,SAAUA,KAAI,yBAA0B,CACtC,MAAO,WACP,SAAUA,KAAIC,oBAAoB,CAChC,GAAI,QACJ,GAAG,YACH,QACF,CAAC,CACH,CAAC,CACH,CAAC,CACH,CPrCO,SAAS,OAAO,GAAI,CACzB,GAAM,CACJ,aACA,UACA,eACA,
|
|
4
|
+
"sourcesContent": ["import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { useOptionalContentId } from \"@qualcomm-ui/react-core/machine\";\nimport { useControlledId } from \"@qualcomm-ui/react-core/state\";\nimport { SwitchControl } from \"./switch-control\";\nimport { SwitchErrorText } from \"./switch-error-text\";\nimport { SwitchHiddenInput } from \"./switch-hidden-input\";\nimport { SwitchLabel } from \"./switch-label\";\nimport { SwitchRoot } from \"./switch-root\";\nimport { SwitchThumb } from \"./switch-thumb\";\nexport function Switch(t0) {\n const {\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n controlProps,\n errorText,\n errorTextProps,\n hiddenInputProps: hiddenInputPropsProp,\n label,\n labelProps,\n thumbProps,\n ...props\n } = t0;\n const labelContent = label || labelProps?.children;\n const errorTextContent = errorText || errorTextProps?.children;\n const hiddenInputProps = {\n ...hiddenInputPropsProp\n };\n if (ariaLabel !== void 0) {\n hiddenInputProps[\"aria-label\"] = ariaLabel;\n }\n if (ariaLabelledBy !== void 0) {\n hiddenInputProps[\"aria-labelledby\"] = ariaLabelledBy;\n }\n const ids = {\n errorText: useOptionalContentId(errorTextContent, errorTextProps),\n hiddenInput: useControlledId(hiddenInputProps?.id),\n label: useOptionalContentId(labelContent, labelProps),\n root: useControlledId(props.id),\n ...props.ids\n };\n return jsxs(SwitchRoot, {\n ...props,\n ids,\n children: [jsx(SwitchHiddenInput, {\n ...hiddenInputProps,\n id: ids.hiddenInput\n }), jsx(SwitchControl, {\n ...controlProps,\n children: jsx(SwitchThumb, {\n ...thumbProps\n })\n }), labelContent ? jsx(SwitchLabel, {\n ...labelProps,\n id: ids.label,\n children: labelContent\n }) : null, errorTextContent ? jsx(SwitchErrorText, {\n ...errorTextProps,\n id: ids.errorText,\n children: errorTextContent\n }) : null]\n });\n}", "import { jsx } from \"react/jsx-runtime\";\nimport { useSwitchControl } from \"@qualcomm-ui/react-core/switch\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsSwitchContext } from \"./qds-switch-context\";\nimport { SwitchThumb } from \"./switch-thumb\";\nexport function SwitchControl(t0) {\n const {\n children: t1,\n ...props\n } = t0;\n const children = t1 === undefined ? jsx(SwitchThumb, {}) : t1;\n const contextProps = useSwitchControl();\n const qdsContext = useQdsSwitchContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getControlBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"span\",\n ...mergedProps,\n children\n });\n}", "import { createGuardedContext } from \"@qualcomm-ui/react-core/context\";\nexport const [QdsSwitchContextProvider, useQdsSwitchContext] = createGuardedContext({\n hookName: \"useQdsSwitchContext\",\n providerName: \"<QdsSwitchContextProvider>\",\n strict: true\n});", "import { jsx } from \"react/jsx-runtime\";\nimport { useSwitchThumb } from \"@qualcomm-ui/react-core/switch\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsSwitchContext } from \"./qds-switch-context\";\nexport function SwitchThumb(t0) {\n const {\n children,\n ...props\n } = t0;\n const contextProps = useSwitchThumb();\n const qdsContext = useQdsSwitchContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getThumbBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"span\",\n ...mergedProps,\n children\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { AlertCircle } from \"lucide-react\";\nimport { InputErrorText } from \"@qualcomm-ui/react/input\";\nimport { useSwitchErrorText } from \"@qualcomm-ui/react-core/switch\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsSwitchContext } from \"./qds-switch-context\";\nexport function SwitchErrorText(t0) {\n const $ = _c(2);\n const {\n children,\n id,\n ...props\n } = t0;\n let t1;\n if ($[0] !== id) {\n t1 = {\n id\n };\n $[0] = id;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const contextProps = useSwitchErrorText(t1);\n const qdsContext = useQdsSwitchContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getErrorTextBindings(), props);\n return jsx(InputErrorText, {\n icon: AlertCircle,\n ...mergedProps,\n children\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useSwitchHiddenInput } from \"@qualcomm-ui/react-core/switch\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsSwitchContext } from \"./qds-switch-context\";\nexport function SwitchHiddenInput(t0) {\n const $ = _c(2);\n const {\n id,\n ...props\n } = t0;\n let t1;\n if ($[0] !== id) {\n t1 = {\n id\n };\n $[0] = id;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const contextProps = useSwitchHiddenInput(t1);\n const qdsContext = useQdsSwitchContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getHiddenInputBindings(), props);\n return jsx(\"input\", {\n ...mergedProps\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useSwitchLabel } from \"@qualcomm-ui/react-core/switch\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsSwitchContext } from \"./qds-switch-context\";\nexport function SwitchLabel(t0) {\n const $ = _c(2);\n const {\n children,\n id,\n ...props\n } = t0;\n let t1;\n if ($[0] !== id) {\n t1 = {\n id\n };\n $[0] = id;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const contextProps = useSwitchLabel(t1);\n const qdsContext = useQdsSwitchContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getLabelBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"span\",\n ...mergedProps,\n children\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useMemo } from \"react\";\nimport { splitSwitchProps } from \"@qualcomm-ui/core/switch\";\nimport { createQdsSwitchApi } from \"@qualcomm-ui/qds-core/switch\";\nimport { normalizeProps } from \"@qualcomm-ui/react-core/machine\";\nimport { useControlledId } from \"@qualcomm-ui/react-core/state\";\nimport { SwitchContextProvider, useSwitch } from \"@qualcomm-ui/react-core/switch\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { QdsSwitchContextProvider } from \"./qds-switch-context\";\nexport function SwitchRoot(t0) {\n const $ = _c(2);\n const {\n children,\n id,\n size,\n ...props\n } = t0;\n const [switchProps, localProps] = splitSwitchProps(props);\n const context = useSwitch(switchProps);\n let t1;\n if ($[0] !== size) {\n t1 = createQdsSwitchApi({\n size\n }, normalizeProps);\n $[0] = size;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const qdsContext = t1;\n const mergedProps = mergeProps(context.getRootBindings({\n id: useControlledId(id)\n }), qdsContext.getRootBindings(), localProps);\n return jsx(SwitchContextProvider, {\n value: context,\n children: jsx(QdsSwitchContextProvider, {\n value: qdsContext,\n children: jsx(PolymorphicElement, {\n as: \"label\",\n ...mergedProps,\n children\n })\n })\n });\n}", "import { Switch as SimpleSwitch } from \"./switch\";\nimport { SwitchControl } from \"./switch-control\";\nimport { SwitchErrorText } from \"./switch-error-text\";\nimport { SwitchHiddenInput } from \"./switch-hidden-input\";\nimport { SwitchLabel } from \"./switch-label\";\nimport { SwitchRoot } from \"./switch-root\";\nimport { SwitchThumb } from \"./switch-thumb\";\nexport * from \"./qds-switch-context\";\nexport const Switch = SimpleSwitch;\nSwitch.Control = SwitchControl;\nSwitch.ErrorText = SwitchErrorText;\nSwitch.HiddenInput = SwitchHiddenInput;\nSwitch.Label = SwitchLabel;\nSwitch.Root = SwitchRoot;\nSwitch.Thumb = SwitchThumb;"],
|
|
5
|
+
"mappings": ";AAAA,OAAS,OAAAA,KAAK,SAAY,oBAC1B,OAAS,yBAA4B,kCACrC,OAAS,mBAAAC,qBAAuB,gCCFhC,OAAS,OAAAC,SAAW,oBACpB,OAAS,qBAAwB,iCACjC,OAAS,sBAAAC,wBAA0B,iCACnC,OAAS,cAAAC,gBAAkB,iCCH3B,OAAS,yBAA4B,kCAC9B,GAAM,CAAC,yBAA0B,mBAAmB,EAAI,qBAAqB,CAClF,SAAU,sBACV,aAAc,6BACd,OAAQ,EACV,CAAC,ECLD,OAAS,QAAW,oBACpB,OAAS,mBAAsB,iCAC/B,OAAS,uBAA0B,iCACnC,OAAS,eAAkB,iCAEpB,SAAS,YAAY,GAAI,CAC9B,GAAM,CACJ,SACA,GAAG,KACL,EAAI,GACE,aAAe,eAAe,EAC9B,WAAa,oBAAoB,EACjC,YAAc,WAAW,aAAc,WAAW,iBAAiB,EAAG,KAAK,EACjF,OAAO,IAAI,mBAAoB,CAC7B,GAAI,OACJ,GAAG,YACH,QACF,CAAC,CACH,CFZO,SAAS,cAAc,GAAI,CAChC,GAAM,CACJ,SAAU,GACV,GAAG,KACL,EAAI,GACE,SAAW,KAAO,OAAYC,K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AA0B,CACtC,MAAO,WACP,SAAUA,KAAIC,oBAAoB,CAChC,GAAI,QACJ,GAAG,YACH,QACF,CAAC,CACH,CAAC,CACH,CAAC,CACH,CPrCO,SAAS,OAAO,GAAI,CACzB,GAAM,CACJ,aAAc,UACd,kBAAmB,eACnB,aACA,UACA,eACA,iBAAkB,qBAClB,MACA,WACA,WACA,GAAG,KACL,EAAI,GACE,aAAe,OAAS,YAAY,SACpC,iBAAmB,WAAa,gBAAgB,SAChD,iBAAmB,CACvB,GAAG,oBACL,EACI,YAAc,SAChB,iBAAiB,YAAY,EAAI,WAE/B,iBAAmB,SACrB,iBAAiB,iBAAiB,EAAI,gBAExC,IAAM,IAAM,CACV,UAAW,qBAAqB,iBAAkB,cAAc,EAChE,YAAaC,iBAAgB,kBAAkB,EAAE,EACjD,MAAO,qBAAqB,aAAc,UAAU,EACpD,KAAMA,iBAAgB,MAAM,EAAE,EAC9B,GAAG,MAAM,GACX,EACA,OAAO,KAAK,WAAY,CACtB,GAAG,MACH,IACA,SAAU,CAACC,KAAI,kBAAmB,CAChC,GAAG,iBACH,GAAI,IAAI,WACV,CAAC,EAAGA,KAAI,cAAe,CACrB,GAAG,aACH,SAAUA,KAAI,YAAa,CACzB,GAAG,UACL,CAAC,CACH,CAAC,EAAG,aAAeA,KAAI,YAAa,CAClC,GAAG,WACH,GAAI,IAAI,MACR,SAAU,YACZ,CAAC,EAAI,KAAM,iBAAmBA,KAAI,gBAAiB,CACjD,GAAG,eACH,GAAI,IAAI,UACR,SAAU,gBACZ,CAAC,EAAI,IAAI,CACX,CAAC,CACH,CQrDO,IAAMC,QAAS,OACtBA,QAAO,QAAU,cACjBA,QAAO,UAAY,gBACnBA,QAAO,YAAc,kBACrBA,QAAO,MAAQ,YACfA,QAAO,KAAO,WACdA,QAAO,MAAQ",
|
|
6
6
|
"names": ["jsx", "useControlledId", "jsx", "PolymorphicElement", "mergeProps", "jsx", "mergeProps", "PolymorphicElement", "jsx", "mergeProps", "mergeProps", "jsx", "_c", "jsx", "mergeProps", "_c", "mergeProps", "jsx", "_c", "jsx", "PolymorphicElement", "mergeProps", "_c", "mergeProps", "jsx", "PolymorphicElement", "_c", "jsx", "PolymorphicElement", "mergeProps", "_c", "mergeProps", "jsx", "PolymorphicElement", "useControlledId", "jsx", "Switch"]
|
|
7
7
|
}
|
package/dist/switch/switch.d.ts
CHANGED
|
@@ -6,6 +6,17 @@ import { type SwitchLabelProps } from "./switch-label";
|
|
|
6
6
|
import { type SwitchRootProps } from "./switch-root";
|
|
7
7
|
import { type SwitchThumbProps } from "./switch-thumb";
|
|
8
8
|
export interface SwitchProps extends SwitchRootProps {
|
|
9
|
+
/**
|
|
10
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-label aria-label}
|
|
11
|
+
* attribute, forwarded to the hidden input element.
|
|
12
|
+
*/
|
|
13
|
+
"aria-label"?: string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-labelledby aria-labelledby}
|
|
16
|
+
* attribute, forwarded to the hidden input element. If you provide a {@link
|
|
17
|
+
* label}, omit this prop.
|
|
18
|
+
*/
|
|
19
|
+
"aria-labelledby"?: string | undefined;
|
|
9
20
|
/**
|
|
10
21
|
* The simple Switch doesn't support children.
|
|
11
22
|
*/
|
|
@@ -41,5 +52,5 @@ export interface SwitchProps extends SwitchRootProps {
|
|
|
41
52
|
*/
|
|
42
53
|
thumbProps?: SwitchThumbProps;
|
|
43
54
|
}
|
|
44
|
-
export declare function Switch({ controlProps, errorText, errorTextProps, hiddenInputProps, label, labelProps, thumbProps, ...props }: SwitchProps): ReactElement;
|
|
55
|
+
export declare function Switch({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, controlProps, errorText, errorTextProps, hiddenInputProps: hiddenInputPropsProp, label, labelProps, thumbProps, ...props }: SwitchProps): ReactElement;
|
|
45
56
|
//# sourceMappingURL=switch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/switch/switch.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAA;AAKlD,OAAO,EAAgB,KAAK,kBAAkB,EAAC,MAAM,kBAAkB,CAAA;AACvE,OAAO,EAAkB,KAAK,oBAAoB,EAAC,MAAM,qBAAqB,CAAA;AAC9E,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAc,KAAK,gBAAgB,EAAC,MAAM,gBAAgB,CAAA;AACjE,OAAO,EAAa,KAAK,eAAe,EAAC,MAAM,eAAe,CAAA;AAC9D,OAAO,EAAc,KAAK,gBAAgB,EAAC,MAAM,gBAAgB,CAAA;AAEjE,MAAM,WAAW,WAAY,SAAQ,eAAe;IAClD;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAA;IAEhB;;OAEG;IACH,YAAY,CAAC,EAAE,kBAAkB,CAAA;IAEjC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,cAAc,CAAC,EAAE,oBAAoB,CAAA;IAErC;;OAEG;IACH,gBAAgB,CAAC,EAAE,sBAAsB,CAAA;IAEzC;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IAEjB;;OAEG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAA;IAE7B;;OAEG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAA;CAC9B;AAED,wBAAgB,MAAM,CAAC,EACrB,YAAY,EACZ,SAAS,EACT,cAAc,EACd,gBAAgB,
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/switch/switch.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAA;AAKlD,OAAO,EAAgB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jsx as jsx9,jsxs as jsxs2}from"react/jsx-runtime";import{useOptionalContentId}from"@qualcomm-ui/react-core/machine";import{useControlledId}from"@qualcomm-ui/react-core/state";import{c as _c}from"react/compiler-runtime";import{jsx}from"react/jsx-runtime";import{X}from"lucide-react";import{InlineIconButton}from"@qualcomm-ui/react/inline-icon-button";import{useQdsInputContext}from"@qualcomm-ui/react/input";import{useTextInputClearTrigger}from"@qualcomm-ui/react-core/text-input";import{mergeProps}from"@qualcomm-ui/utils/merge-props";function TextInputClearTrigger(props){let $=_c(4),contextProps=useTextInputClearTrigger(),qdsContext=useQdsInputContext(),t0;if($[0]!==contextProps||$[1]!==props||$[2]!==qdsContext){let mergedProps=mergeProps(contextProps,qdsContext.getClearTriggerBindings(),props);t0=jsx(InlineIconButton,{icon:X,size:qdsContext.size,variant:"scale",...mergedProps}),$[0]=contextProps,$[1]=props,$[2]=qdsContext,$[3]=t0}else t0=$[3];return t0}import{c as _c2}from"react/compiler-runtime";import{jsx as jsx2}from"react/jsx-runtime";import{InputErrorIndicator}from"@qualcomm-ui/react/input";import{useTextInputContext}from"@qualcomm-ui/react-core/text-input";import{mergeProps as mergeProps2}from"@qualcomm-ui/utils/merge-props";function TextInputErrorIndicator(props){let $=_c2(3),context=useTextInputContext(),t0;if($[0]!==context||$[1]!==props){let mergedProps=mergeProps2(context.getErrorIndicatorBindings(),props);t0=jsx2(InputErrorIndicator,{...mergedProps}),$[0]=context,$[1]=props,$[2]=t0}else t0=$[2];return t0}import{c as _c3}from"react/compiler-runtime";import{jsx as jsx3}from"react/jsx-runtime";import{InputErrorText}from"@qualcomm-ui/react/input";import{useTextInputErrorText}from"@qualcomm-ui/react-core/text-input";import{mergeProps as mergeProps3}from"@qualcomm-ui/utils/merge-props";function TextInputErrorText(t0){let $=_c3(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useTextInputErrorText(t1),mergedProps=mergeProps3(contextProps,props);return jsx3(InputErrorText,{...mergedProps,children})}import{c as _c4}from"react/compiler-runtime";import{jsx as jsx4}from"react/jsx-runtime";import{InputHint}from"@qualcomm-ui/react/input";import{useTextInputHint}from"@qualcomm-ui/react-core/text-input";import{mergeProps as mergeProps4}from"@qualcomm-ui/utils/merge-props";function TextInputHint(t0){let $=_c4(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useTextInputHint(t1),mergedProps=mergeProps4(contextProps,props);return jsx4(InputHint,{...mergedProps,children})}import{c as _c5}from"react/compiler-runtime";import{jsx as jsx5}from"react/jsx-runtime";import{useQdsInputContext as useQdsInputContext2}from"@qualcomm-ui/react/input";import{useTextInputInput}from"@qualcomm-ui/react-core/text-input";import{mergeProps as mergeProps5}from"@qualcomm-ui/utils/merge-props";function TextInputInput(t0){let $=_c5(2),{id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useTextInputInput(t1),qdsContext=useQdsInputContext2(),mergedProps=mergeProps5(contextProps,qdsContext.getInputBindings(),props);return jsx5("input",{...mergedProps})}import{jsx as jsx6,jsxs}from"react/jsx-runtime";import{InputEndIcon,InputStartIcon,useQdsInputContext as useQdsInputContext3}from"@qualcomm-ui/react/input";import{PolymorphicElement}from"@qualcomm-ui/react-core/system";import{useTextInputInputGroup}from"@qualcomm-ui/react-core/text-input";import{mergeProps as mergeProps6}from"@qualcomm-ui/utils/merge-props";function TextInputInputGroup(t0){let{children,...props}=t0,qdsContext=useQdsInputContext3(),contextProps=useTextInputInputGroup(),mergedProps=mergeProps6(contextProps,qdsContext.getGroupBindings(),props);return jsxs(PolymorphicElement,{as:"div",...mergedProps,children:[qdsContext.startIcon?jsx6(InputStartIcon,{icon:qdsContext.startIcon}):null,children,qdsContext.endIcon?jsx6(InputEndIcon,{icon:qdsContext.endIcon}):null]})}import{c as _c6}from"react/compiler-runtime";import{jsx as jsx7}from"react/jsx-runtime";import{InputLabel}from"@qualcomm-ui/react/input";import{useTextInputContext as useTextInputContext2,useTextInputLabel}from"@qualcomm-ui/react-core/text-input";import{mergeProps as mergeProps7}from"@qualcomm-ui/utils/merge-props";function TextInputLabel(t0){let $=_c6(2),{id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useTextInputLabel(t1),textInputContext=useTextInputContext2(),mergedProps=mergeProps7(contextProps,props);return jsx7(InputLabel,{required:textInputContext.required,...mergedProps})}import{c as _c7}from"react/compiler-runtime";import{jsx as jsx8}from"react/jsx-runtime";import"react";import{splitTextInputProps}from"@qualcomm-ui/core/text-input";import{createQdsInputApi}from"@qualcomm-ui/qds-core/input";import{QdsInputContextProvider}from"@qualcomm-ui/react/input";import{normalizeProps}from"@qualcomm-ui/react-core/machine";import{PolymorphicElement as PolymorphicElement2}from"@qualcomm-ui/react-core/system";import{TextInputContextProvider,useTextInput}from"@qualcomm-ui/react-core/text-input";import{mergeProps as mergeProps8}from"@qualcomm-ui/utils/merge-props";function TextInputRoot(t0){let $=_c7(4),{children,endIcon,size,startIcon,...props}=t0,[textInputProps,localProps]=splitTextInputProps(props),context=useTextInput(textInputProps),t1;$[0]!==endIcon||$[1]!==size||$[2]!==startIcon?(t1=createQdsInputApi({endIcon,size,startIcon},normalizeProps),$[0]=endIcon,$[1]=size,$[2]=startIcon,$[3]=t1):t1=$[3];let qdsContext=t1,mergedProps=mergeProps8(context.getRootBindings(),qdsContext.getRootBindings(),localProps);return jsx8(TextInputContextProvider,{value:context,children:jsx8(QdsInputContextProvider,{value:qdsContext,children:jsx8(PolymorphicElement2,{as:"div",...mergedProps,children})})})}function TextInput(t0){let{clearable:t1,clearTriggerProps,errorIndicatorProps,errorText,errorTextProps,hint,hintProps,inputGroupProps,inputProps,label,labelProps,placeholder,...props}=t0,clearable=t1===void 0?!0:t1,labelContent=label||labelProps?.children,errorTextContent=errorText||errorTextProps?.children,hintContent=hint||hintProps?.children,ids={errorText:useOptionalContentId(errorTextContent,errorTextProps),hint:useOptionalContentId(hintContent,hintProps),input:useControlledId(inputProps?.id),label:useOptionalContentId(labelContent,labelProps),...props.ids};return jsxs2(TextInputRoot,{...props,ids,children:[labelContent?jsx9(TextInputLabel,{...labelProps,id:ids.label,children:labelContent}):null,jsxs2(TextInputInputGroup,{...inputGroupProps,children:[jsx9(TextInputInput,{placeholder,...inputProps,id:ids.input}),clearable?jsx9(TextInputClearTrigger,{...clearTriggerProps}):null,jsx9(TextInputErrorIndicator,{...errorIndicatorProps})]}),hintContent?jsx9(TextInputHint,{...hintProps,id:ids.hint,children:hintContent}):null,errorTextContent?jsx9(TextInputErrorText,{...errorTextProps,id:ids.errorText,children:errorTextContent}):null]})}var TextInput2=TextInput;TextInput2.ClearTrigger=TextInputClearTrigger;TextInput2.ErrorIndicator=TextInputErrorIndicator;TextInput2.ErrorText=TextInputErrorText;TextInput2.Hint=TextInputHint;TextInput2.InputGroup=TextInputInputGroup;TextInput2.Input=TextInputInput;TextInput2.Label=TextInputLabel;TextInput2.Root=TextInputRoot;export{TextInput2 as TextInput};
|
|
2
|
+
import{jsx as jsx9,jsxs as jsxs2}from"react/jsx-runtime";import{useOptionalContentId}from"@qualcomm-ui/react-core/machine";import{useControlledId}from"@qualcomm-ui/react-core/state";import{c as _c}from"react/compiler-runtime";import{jsx}from"react/jsx-runtime";import{X}from"lucide-react";import{InlineIconButton}from"@qualcomm-ui/react/inline-icon-button";import{useQdsInputContext}from"@qualcomm-ui/react/input";import{useTextInputClearTrigger}from"@qualcomm-ui/react-core/text-input";import{mergeProps}from"@qualcomm-ui/utils/merge-props";function TextInputClearTrigger(props){let $=_c(4),contextProps=useTextInputClearTrigger(),qdsContext=useQdsInputContext(),t0;if($[0]!==contextProps||$[1]!==props||$[2]!==qdsContext){let mergedProps=mergeProps(contextProps,qdsContext.getClearTriggerBindings(),props);t0=jsx(InlineIconButton,{icon:X,size:qdsContext.size,variant:"scale",...mergedProps}),$[0]=contextProps,$[1]=props,$[2]=qdsContext,$[3]=t0}else t0=$[3];return t0}import{c as _c2}from"react/compiler-runtime";import{jsx as jsx2}from"react/jsx-runtime";import{InputErrorIndicator}from"@qualcomm-ui/react/input";import{useTextInputContext}from"@qualcomm-ui/react-core/text-input";import{mergeProps as mergeProps2}from"@qualcomm-ui/utils/merge-props";function TextInputErrorIndicator(props){let $=_c2(3),context=useTextInputContext(),t0;if($[0]!==context||$[1]!==props){let mergedProps=mergeProps2(context.getErrorIndicatorBindings(),props);t0=jsx2(InputErrorIndicator,{...mergedProps}),$[0]=context,$[1]=props,$[2]=t0}else t0=$[2];return t0}import{c as _c3}from"react/compiler-runtime";import{jsx as jsx3}from"react/jsx-runtime";import{InputErrorText}from"@qualcomm-ui/react/input";import{useTextInputErrorText}from"@qualcomm-ui/react-core/text-input";import{mergeProps as mergeProps3}from"@qualcomm-ui/utils/merge-props";function TextInputErrorText(t0){let $=_c3(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useTextInputErrorText(t1),mergedProps=mergeProps3(contextProps,props);return jsx3(InputErrorText,{...mergedProps,children})}import{c as _c4}from"react/compiler-runtime";import{jsx as jsx4}from"react/jsx-runtime";import{InputHint}from"@qualcomm-ui/react/input";import{useTextInputHint}from"@qualcomm-ui/react-core/text-input";import{mergeProps as mergeProps4}from"@qualcomm-ui/utils/merge-props";function TextInputHint(t0){let $=_c4(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useTextInputHint(t1),mergedProps=mergeProps4(contextProps,props);return jsx4(InputHint,{...mergedProps,children})}import{c as _c5}from"react/compiler-runtime";import{jsx as jsx5}from"react/jsx-runtime";import{useQdsInputContext as useQdsInputContext2}from"@qualcomm-ui/react/input";import{useTextInputInput}from"@qualcomm-ui/react-core/text-input";import{mergeProps as mergeProps5}from"@qualcomm-ui/utils/merge-props";function TextInputInput(t0){let $=_c5(2),{id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useTextInputInput(t1),qdsContext=useQdsInputContext2(),mergedProps=mergeProps5(contextProps,qdsContext.getInputBindings(),props);return jsx5("input",{...mergedProps})}import{jsx as jsx6,jsxs}from"react/jsx-runtime";import{InputEndIcon,InputStartIcon,useQdsInputContext as useQdsInputContext3}from"@qualcomm-ui/react/input";import{PolymorphicElement}from"@qualcomm-ui/react-core/system";import{useTextInputInputGroup}from"@qualcomm-ui/react-core/text-input";import{mergeProps as mergeProps6}from"@qualcomm-ui/utils/merge-props";function TextInputInputGroup(t0){let{children,...props}=t0,qdsContext=useQdsInputContext3(),contextProps=useTextInputInputGroup(),mergedProps=mergeProps6(contextProps,qdsContext.getGroupBindings(),props);return jsxs(PolymorphicElement,{as:"div",...mergedProps,children:[qdsContext.startIcon?jsx6(InputStartIcon,{icon:qdsContext.startIcon}):null,children,qdsContext.endIcon?jsx6(InputEndIcon,{icon:qdsContext.endIcon}):null]})}import{c as _c6}from"react/compiler-runtime";import{jsx as jsx7}from"react/jsx-runtime";import{InputLabel}from"@qualcomm-ui/react/input";import{useTextInputContext as useTextInputContext2,useTextInputLabel}from"@qualcomm-ui/react-core/text-input";import{mergeProps as mergeProps7}from"@qualcomm-ui/utils/merge-props";function TextInputLabel(t0){let $=_c6(2),{id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useTextInputLabel(t1),textInputContext=useTextInputContext2(),mergedProps=mergeProps7(contextProps,props);return jsx7(InputLabel,{required:textInputContext.required,...mergedProps})}import{c as _c7}from"react/compiler-runtime";import{jsx as jsx8}from"react/jsx-runtime";import"react";import{splitTextInputProps}from"@qualcomm-ui/core/text-input";import{createQdsInputApi}from"@qualcomm-ui/qds-core/input";import{QdsInputContextProvider}from"@qualcomm-ui/react/input";import{normalizeProps}from"@qualcomm-ui/react-core/machine";import{PolymorphicElement as PolymorphicElement2}from"@qualcomm-ui/react-core/system";import{TextInputContextProvider,useTextInput}from"@qualcomm-ui/react-core/text-input";import{mergeProps as mergeProps8}from"@qualcomm-ui/utils/merge-props";function TextInputRoot(t0){let $=_c7(4),{children,endIcon,size,startIcon,...props}=t0,[textInputProps,localProps]=splitTextInputProps(props),context=useTextInput(textInputProps),t1;$[0]!==endIcon||$[1]!==size||$[2]!==startIcon?(t1=createQdsInputApi({endIcon,size,startIcon},normalizeProps),$[0]=endIcon,$[1]=size,$[2]=startIcon,$[3]=t1):t1=$[3];let qdsContext=t1,mergedProps=mergeProps8(context.getRootBindings(),qdsContext.getRootBindings(),localProps);return jsx8(TextInputContextProvider,{value:context,children:jsx8(QdsInputContextProvider,{value:qdsContext,children:jsx8(PolymorphicElement2,{as:"div",...mergedProps,children})})})}function TextInput(t0){let{"aria-label":ariaLabel,"aria-labelledby":ariaLabelledBy,clearable:t1,clearTriggerProps,errorIndicatorProps,errorText,errorTextProps,hint,hintProps,inputGroupProps,inputProps:inputPropsProp,label,labelProps,placeholder,...props}=t0,clearable=t1===void 0?!0:t1,labelContent=label||labelProps?.children,errorTextContent=errorText||errorTextProps?.children,hintContent=hint||hintProps?.children,inputProps={...inputPropsProp};ariaLabel!==void 0&&(inputProps["aria-label"]=ariaLabel),ariaLabelledBy!==void 0&&(inputProps["aria-labelledby"]=ariaLabelledBy);let ids={errorText:useOptionalContentId(errorTextContent,errorTextProps),hint:useOptionalContentId(hintContent,hintProps),input:useControlledId(inputProps?.id),label:useOptionalContentId(labelContent,labelProps),...props.ids};return jsxs2(TextInputRoot,{...props,ids,children:[labelContent?jsx9(TextInputLabel,{...labelProps,id:ids.label,children:labelContent}):null,jsxs2(TextInputInputGroup,{...inputGroupProps,children:[jsx9(TextInputInput,{placeholder,...inputProps,id:ids.input}),clearable?jsx9(TextInputClearTrigger,{...clearTriggerProps}):null,jsx9(TextInputErrorIndicator,{...errorIndicatorProps})]}),hintContent?jsx9(TextInputHint,{...hintProps,id:ids.hint,children:hintContent}):null,errorTextContent?jsx9(TextInputErrorText,{...errorTextProps,id:ids.errorText,children:errorTextContent}):null]})}var TextInput2=TextInput;TextInput2.ClearTrigger=TextInputClearTrigger;TextInput2.ErrorIndicator=TextInputErrorIndicator;TextInput2.ErrorText=TextInputErrorText;TextInput2.Hint=TextInputHint;TextInput2.InputGroup=TextInputInputGroup;TextInput2.Input=TextInputInput;TextInput2.Label=TextInputLabel;TextInput2.Root=TextInputRoot;export{TextInput2 as TextInput};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/text-input/text-input.tsx", "../../src/text-input/text-input-clear-trigger.tsx", "../../src/text-input/text-input-error-indicator.tsx", "../../src/text-input/text-input-error-text.tsx", "../../src/text-input/text-input-hint.tsx", "../../src/text-input/text-input-input.tsx", "../../src/text-input/text-input-input-group.tsx", "../../src/text-input/text-input-label.tsx", "../../src/text-input/text-input-root.tsx", "../../src/text-input/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { useOptionalContentId } from \"@qualcomm-ui/react-core/machine\";\nimport { useControlledId } from \"@qualcomm-ui/react-core/state\";\nimport { TextInputClearTrigger } from \"./text-input-clear-trigger\";\nimport { TextInputErrorIndicator } from \"./text-input-error-indicator\";\nimport { TextInputErrorText } from \"./text-input-error-text\";\nimport { TextInputHint } from \"./text-input-hint\";\nimport { TextInputInput } from \"./text-input-input\";\nimport { TextInputInputGroup } from \"./text-input-input-group\";\nimport { TextInputLabel } from \"./text-input-label\";\nimport { TextInputRoot } from \"./text-input-root\";\nexport function TextInput(t0) {\n const {\n clearable: t1,\n clearTriggerProps,\n errorIndicatorProps,\n errorText,\n errorTextProps,\n hint,\n hintProps,\n inputGroupProps,\n inputProps,\n label,\n labelProps,\n placeholder,\n ...props\n } = t0;\n const clearable = t1 === undefined ? true : t1;\n const labelContent = label || labelProps?.children;\n const errorTextContent = errorText || errorTextProps?.children;\n const hintContent = hint || hintProps?.children;\n const ids = {\n errorText: useOptionalContentId(errorTextContent, errorTextProps),\n hint: useOptionalContentId(hintContent, hintProps),\n input: useControlledId(inputProps?.id),\n label: useOptionalContentId(labelContent, labelProps),\n ...props.ids\n };\n return jsxs(TextInputRoot, {\n ...props,\n ids,\n children: [labelContent ? jsx(TextInputLabel, {\n ...labelProps,\n id: ids.label,\n children: labelContent\n }) : null, jsxs(TextInputInputGroup, {\n ...inputGroupProps,\n children: [jsx(TextInputInput, {\n placeholder,\n ...inputProps,\n id: ids.input\n }), clearable ? jsx(TextInputClearTrigger, {\n ...clearTriggerProps\n }) : null, jsx(TextInputErrorIndicator, {\n ...errorIndicatorProps\n })]\n }), hintContent ? jsx(TextInputHint, {\n ...hintProps,\n id: ids.hint,\n children: hintContent\n }) : null, errorTextContent ? jsx(TextInputErrorText, {\n ...errorTextProps,\n id: ids.errorText,\n children: errorTextContent\n }) : null]\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { X } from \"lucide-react\";\nimport { InlineIconButton } from \"@qualcomm-ui/react/inline-icon-button\";\nimport { useQdsInputContext } from \"@qualcomm-ui/react/input\";\nimport { useTextInputClearTrigger } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputClearTrigger(props) {\n const $ = _c(4);\n const contextProps = useTextInputClearTrigger();\n const qdsContext = useQdsInputContext();\n let t0;\n if ($[0] !== contextProps || $[1] !== props || $[2] !== qdsContext) {\n const mergedProps = mergeProps(contextProps, qdsContext.getClearTriggerBindings(), props);\n t0 = jsx(InlineIconButton, {\n icon: X,\n size: qdsContext.size,\n variant: \"scale\",\n ...mergedProps\n });\n $[0] = contextProps;\n $[1] = props;\n $[2] = qdsContext;\n $[3] = t0;\n } else {\n t0 = $[3];\n }\n return t0;\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { InputErrorIndicator } from \"@qualcomm-ui/react/input\";\nimport { useTextInputContext } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputErrorIndicator(props) {\n const $ = _c(3);\n const context = useTextInputContext();\n let t0;\n if ($[0] !== context || $[1] !== props) {\n const mergedProps = mergeProps(context.getErrorIndicatorBindings(), props);\n t0 = jsx(InputErrorIndicator, {\n ...mergedProps\n });\n $[0] = context;\n $[1] = props;\n $[2] = t0;\n } else {\n t0 = $[2];\n }\n return t0;\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { InputErrorText } from \"@qualcomm-ui/react/input\";\nimport { useTextInputErrorText } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputErrorText(t0) {\n const $ = _c(2);\n const {\n children,\n id,\n ...props\n } = t0;\n let t1;\n if ($[0] !== id) {\n t1 = {\n id\n };\n $[0] = id;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const contextProps = useTextInputErrorText(t1);\n const mergedProps = mergeProps(contextProps, props);\n return jsx(InputErrorText, {\n ...mergedProps,\n children\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { InputHint } from \"@qualcomm-ui/react/input\";\nimport { useTextInputHint } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputHint(t0) {\n const $ = _c(2);\n const {\n children,\n id,\n ...props\n } = t0;\n let t1;\n if ($[0] !== id) {\n t1 = {\n id\n };\n $[0] = id;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const contextProps = useTextInputHint(t1);\n const mergedProps = mergeProps(contextProps, props);\n return jsx(InputHint, {\n ...mergedProps,\n children\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useQdsInputContext } from \"@qualcomm-ui/react/input\";\nimport { useTextInputInput } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputInput(t0) {\n const $ = _c(2);\n const {\n id,\n ...props\n } = t0;\n let t1;\n if ($[0] !== id) {\n t1 = {\n id\n };\n $[0] = id;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const contextProps = useTextInputInput(t1);\n const qdsContext = useQdsInputContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getInputBindings(), props);\n return jsx(\"input\", {\n ...mergedProps\n });\n}", "import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { InputEndIcon, InputStartIcon, useQdsInputContext } from \"@qualcomm-ui/react/input\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { useTextInputInputGroup } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputInputGroup(t0) {\n const {\n children,\n ...props\n } = t0;\n const qdsContext = useQdsInputContext();\n const contextProps = useTextInputInputGroup();\n const mergedProps = mergeProps(contextProps, qdsContext.getGroupBindings(), props);\n return jsxs(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children: [qdsContext.startIcon ? jsx(InputStartIcon, {\n icon: qdsContext.startIcon\n }) : null, children, qdsContext.endIcon ? jsx(InputEndIcon, {\n icon: qdsContext.endIcon\n }) : null]\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { InputLabel } from \"@qualcomm-ui/react/input\";\nimport { useTextInputContext, useTextInputLabel } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputLabel(t0) {\n const $ = _c(2);\n const {\n id,\n ...props\n } = t0;\n let t1;\n if ($[0] !== id) {\n t1 = {\n id\n };\n $[0] = id;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const contextProps = useTextInputLabel(t1);\n const textInputContext = useTextInputContext();\n const mergedProps = mergeProps(contextProps, props);\n return jsx(InputLabel, {\n required: textInputContext.required,\n ...mergedProps\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useMemo } from \"react\";\nimport { splitTextInputProps } from \"@qualcomm-ui/core/text-input\";\nimport { createQdsInputApi } from \"@qualcomm-ui/qds-core/input\";\nimport { QdsInputContextProvider } from \"@qualcomm-ui/react/input\";\nimport { normalizeProps } from \"@qualcomm-ui/react-core/machine\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { TextInputContextProvider, useTextInput } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputRoot(t0) {\n const $ = _c(4);\n const {\n children,\n endIcon,\n size,\n startIcon,\n ...props\n } = t0;\n const [textInputProps, localProps] = splitTextInputProps(props);\n const context = useTextInput(textInputProps);\n let t1;\n if ($[0] !== endIcon || $[1] !== size || $[2] !== startIcon) {\n t1 = createQdsInputApi({\n endIcon,\n size,\n startIcon\n }, normalizeProps);\n $[0] = endIcon;\n $[1] = size;\n $[2] = startIcon;\n $[3] = t1;\n } else {\n t1 = $[3];\n }\n const qdsContext = t1;\n const mergedProps = mergeProps(context.getRootBindings(), qdsContext.getRootBindings(), localProps);\n return jsx(TextInputContextProvider, {\n value: context,\n children: jsx(QdsInputContextProvider, {\n value: qdsContext,\n children: jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n })\n })\n });\n}", "import { TextInput as SimpleTextInput } from \"./text-input\";\nimport { TextInputClearTrigger } from \"./text-input-clear-trigger\";\nimport { TextInputErrorIndicator } from \"./text-input-error-indicator\";\nimport { TextInputErrorText } from \"./text-input-error-text\";\nimport { TextInputHint } from \"./text-input-hint\";\nimport { TextInputInput } from \"./text-input-input\";\nimport { TextInputInputGroup } from \"./text-input-input-group\";\nimport { TextInputLabel } from \"./text-input-label\";\nimport { TextInputRoot } from \"./text-input-root\";\nexport const TextInput = SimpleTextInput;\nTextInput.ClearTrigger = TextInputClearTrigger;\nTextInput.ErrorIndicator = TextInputErrorIndicator;\nTextInput.ErrorText = TextInputErrorText;\nTextInput.Hint = TextInputHint;\nTextInput.InputGroup = TextInputInputGroup;\nTextInput.Input = TextInputInput;\nTextInput.Label = TextInputLabel;\nTextInput.Root = TextInputRoot;"],
|
|
5
|
-
"mappings": ";AAAA,OAAS,OAAAA,KAAK,QAAAC,UAAY,oBAC1B,OAAS,yBAA4B,kCACrC,OAAS,oBAAuB,gCCFhC,OAAS,KAAK,OAAU,yBACxB,OAAS,QAAW,oBACpB,OAAS,MAAS,eAClB,OAAS,qBAAwB,wCACjC,OAAS,uBAA0B,2BACnC,OAAS,6BAAgC,qCACzC,OAAS,eAAkB,iCACpB,SAAS,sBAAsB,MAAO,CAC3C,IAAM,EAAI,GAAG,CAAC,EACR,aAAe,yBAAyB,EACxC,WAAa,mBAAmB,EAClC,GACJ,GAAI,EAAE,CAAC,IAAM,cAAgB,EAAE,CAAC,IAAM,OAAS,EAAE,CAAC,IAAM,WAAY,CAClE,IAAM,YAAc,WAAW,aAAc,WAAW,wBAAwB,EAAG,KAAK,EACxF,GAAK,IAAI,iBAAkB,CACzB,KAAM,EACN,KAAM,WAAW,KACjB,QAAS,QACT,GAAG,WACL,CAAC,EACD,EAAE,CAAC,EAAI,aACP,EAAE,CAAC,EAAI,MACP,EAAE,CAAC,EAAI,WACP,EAAE,CAAC,EAAI,EACT,MACE,GAAK,EAAE,CAAC,EAEV,OAAO,EACT,CC5BA,OAAS,KAAKC,QAAU,yBACxB,OAAS,OAAAC,SAAW,oBACpB,OAAS,wBAA2B,2BACpC,OAAS,wBAA2B,qCACpC,OAAS,cAAAC,gBAAkB,iCACpB,SAAS,wBAAwB,MAAO,CAC7C,IAAM,EAAIF,IAAG,CAAC,EACR,QAAU,oBAAoB,EAChC,GACJ,GAAI,EAAE,CAAC,IAAM,SAAW,EAAE,CA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A,KACA,UACA,gBACA,
|
|
4
|
+
"sourcesContent": ["import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { useOptionalContentId } from \"@qualcomm-ui/react-core/machine\";\nimport { useControlledId } from \"@qualcomm-ui/react-core/state\";\nimport { TextInputClearTrigger } from \"./text-input-clear-trigger\";\nimport { TextInputErrorIndicator } from \"./text-input-error-indicator\";\nimport { TextInputErrorText } from \"./text-input-error-text\";\nimport { TextInputHint } from \"./text-input-hint\";\nimport { TextInputInput } from \"./text-input-input\";\nimport { TextInputInputGroup } from \"./text-input-input-group\";\nimport { TextInputLabel } from \"./text-input-label\";\nimport { TextInputRoot } from \"./text-input-root\";\nexport function TextInput(t0) {\n const {\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n clearable: t1,\n clearTriggerProps,\n errorIndicatorProps,\n errorText,\n errorTextProps,\n hint,\n hintProps,\n inputGroupProps,\n inputProps: inputPropsProp,\n label,\n labelProps,\n placeholder,\n ...props\n } = t0;\n const clearable = t1 === undefined ? true : t1;\n const labelContent = label || labelProps?.children;\n const errorTextContent = errorText || errorTextProps?.children;\n const hintContent = hint || hintProps?.children;\n const inputProps = {\n ...inputPropsProp\n };\n if (ariaLabel !== void 0) {\n inputProps[\"aria-label\"] = ariaLabel;\n }\n if (ariaLabelledBy !== void 0) {\n inputProps[\"aria-labelledby\"] = ariaLabelledBy;\n }\n const ids = {\n errorText: useOptionalContentId(errorTextContent, errorTextProps),\n hint: useOptionalContentId(hintContent, hintProps),\n input: useControlledId(inputProps?.id),\n label: useOptionalContentId(labelContent, labelProps),\n ...props.ids\n };\n return jsxs(TextInputRoot, {\n ...props,\n ids,\n children: [labelContent ? jsx(TextInputLabel, {\n ...labelProps,\n id: ids.label,\n children: labelContent\n }) : null, jsxs(TextInputInputGroup, {\n ...inputGroupProps,\n children: [jsx(TextInputInput, {\n placeholder,\n ...inputProps,\n id: ids.input\n }), clearable ? jsx(TextInputClearTrigger, {\n ...clearTriggerProps\n }) : null, jsx(TextInputErrorIndicator, {\n ...errorIndicatorProps\n })]\n }), hintContent ? jsx(TextInputHint, {\n ...hintProps,\n id: ids.hint,\n children: hintContent\n }) : null, errorTextContent ? jsx(TextInputErrorText, {\n ...errorTextProps,\n id: ids.errorText,\n children: errorTextContent\n }) : null]\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { X } from \"lucide-react\";\nimport { InlineIconButton } from \"@qualcomm-ui/react/inline-icon-button\";\nimport { useQdsInputContext } from \"@qualcomm-ui/react/input\";\nimport { useTextInputClearTrigger } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputClearTrigger(props) {\n const $ = _c(4);\n const contextProps = useTextInputClearTrigger();\n const qdsContext = useQdsInputContext();\n let t0;\n if ($[0] !== contextProps || $[1] !== props || $[2] !== qdsContext) {\n const mergedProps = mergeProps(contextProps, qdsContext.getClearTriggerBindings(), props);\n t0 = jsx(InlineIconButton, {\n icon: X,\n size: qdsContext.size,\n variant: \"scale\",\n ...mergedProps\n });\n $[0] = contextProps;\n $[1] = props;\n $[2] = qdsContext;\n $[3] = t0;\n } else {\n t0 = $[3];\n }\n return t0;\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { InputErrorIndicator } from \"@qualcomm-ui/react/input\";\nimport { useTextInputContext } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputErrorIndicator(props) {\n const $ = _c(3);\n const context = useTextInputContext();\n let t0;\n if ($[0] !== context || $[1] !== props) {\n const mergedProps = mergeProps(context.getErrorIndicatorBindings(), props);\n t0 = jsx(InputErrorIndicator, {\n ...mergedProps\n });\n $[0] = context;\n $[1] = props;\n $[2] = t0;\n } else {\n t0 = $[2];\n }\n return t0;\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { InputErrorText } from \"@qualcomm-ui/react/input\";\nimport { useTextInputErrorText } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputErrorText(t0) {\n const $ = _c(2);\n const {\n children,\n id,\n ...props\n } = t0;\n let t1;\n if ($[0] !== id) {\n t1 = {\n id\n };\n $[0] = id;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const contextProps = useTextInputErrorText(t1);\n const mergedProps = mergeProps(contextProps, props);\n return jsx(InputErrorText, {\n ...mergedProps,\n children\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { InputHint } from \"@qualcomm-ui/react/input\";\nimport { useTextInputHint } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputHint(t0) {\n const $ = _c(2);\n const {\n children,\n id,\n ...props\n } = t0;\n let t1;\n if ($[0] !== id) {\n t1 = {\n id\n };\n $[0] = id;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const contextProps = useTextInputHint(t1);\n const mergedProps = mergeProps(contextProps, props);\n return jsx(InputHint, {\n ...mergedProps,\n children\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useQdsInputContext } from \"@qualcomm-ui/react/input\";\nimport { useTextInputInput } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputInput(t0) {\n const $ = _c(2);\n const {\n id,\n ...props\n } = t0;\n let t1;\n if ($[0] !== id) {\n t1 = {\n id\n };\n $[0] = id;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const contextProps = useTextInputInput(t1);\n const qdsContext = useQdsInputContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getInputBindings(), props);\n return jsx(\"input\", {\n ...mergedProps\n });\n}", "import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { InputEndIcon, InputStartIcon, useQdsInputContext } from \"@qualcomm-ui/react/input\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { useTextInputInputGroup } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputInputGroup(t0) {\n const {\n children,\n ...props\n } = t0;\n const qdsContext = useQdsInputContext();\n const contextProps = useTextInputInputGroup();\n const mergedProps = mergeProps(contextProps, qdsContext.getGroupBindings(), props);\n return jsxs(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children: [qdsContext.startIcon ? jsx(InputStartIcon, {\n icon: qdsContext.startIcon\n }) : null, children, qdsContext.endIcon ? jsx(InputEndIcon, {\n icon: qdsContext.endIcon\n }) : null]\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { InputLabel } from \"@qualcomm-ui/react/input\";\nimport { useTextInputContext, useTextInputLabel } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputLabel(t0) {\n const $ = _c(2);\n const {\n id,\n ...props\n } = t0;\n let t1;\n if ($[0] !== id) {\n t1 = {\n id\n };\n $[0] = id;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const contextProps = useTextInputLabel(t1);\n const textInputContext = useTextInputContext();\n const mergedProps = mergeProps(contextProps, props);\n return jsx(InputLabel, {\n required: textInputContext.required,\n ...mergedProps\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useMemo } from \"react\";\nimport { splitTextInputProps } from \"@qualcomm-ui/core/text-input\";\nimport { createQdsInputApi } from \"@qualcomm-ui/qds-core/input\";\nimport { QdsInputContextProvider } from \"@qualcomm-ui/react/input\";\nimport { normalizeProps } from \"@qualcomm-ui/react-core/machine\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { TextInputContextProvider, useTextInput } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputRoot(t0) {\n const $ = _c(4);\n const {\n children,\n endIcon,\n size,\n startIcon,\n ...props\n } = t0;\n const [textInputProps, localProps] = splitTextInputProps(props);\n const context = useTextInput(textInputProps);\n let t1;\n if ($[0] !== endIcon || $[1] !== size || $[2] !== startIcon) {\n t1 = createQdsInputApi({\n endIcon,\n size,\n startIcon\n }, normalizeProps);\n $[0] = endIcon;\n $[1] = size;\n $[2] = startIcon;\n $[3] = t1;\n } else {\n t1 = $[3];\n }\n const qdsContext = t1;\n const mergedProps = mergeProps(context.getRootBindings(), qdsContext.getRootBindings(), localProps);\n return jsx(TextInputContextProvider, {\n value: context,\n children: jsx(QdsInputContextProvider, {\n value: qdsContext,\n children: jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n })\n })\n });\n}", "import { TextInput as SimpleTextInput } from \"./text-input\";\nimport { TextInputClearTrigger } from \"./text-input-clear-trigger\";\nimport { TextInputErrorIndicator } from \"./text-input-error-indicator\";\nimport { TextInputErrorText } from \"./text-input-error-text\";\nimport { TextInputHint } from \"./text-input-hint\";\nimport { TextInputInput } from \"./text-input-input\";\nimport { TextInputInputGroup } from \"./text-input-input-group\";\nimport { TextInputLabel } from \"./text-input-label\";\nimport { TextInputRoot } from \"./text-input-root\";\nexport const TextInput = SimpleTextInput;\nTextInput.ClearTrigger = TextInputClearTrigger;\nTextInput.ErrorIndicator = TextInputErrorIndicator;\nTextInput.ErrorText = TextInputErrorText;\nTextInput.Hint = TextInputHint;\nTextInput.InputGroup = TextInputInputGroup;\nTextInput.Input = TextInputInput;\nTextInput.Label = TextInputLabel;\nTextInput.Root = TextInputRoot;"],
|
|
5
|
+
"mappings": ";AAAA,OAAS,OAAAA,KAAK,QAAAC,UAAY,oBAC1B,OAAS,yBAA4B,kCACrC,OAAS,oBAAuB,gCCFhC,OAAS,KAAK,OAAU,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S,EACjD,MAAO,gBAAgB,YAAY,EAAE,EACrC,MAAO,qBAAqB,aAAc,UAAU,EACpD,GAAG,MAAM,GACX,EACA,OAAOE,MAAK,cAAe,CACzB,GAAG,MACH,IACA,SAAU,CAAC,aAAeC,KAAI,eAAgB,CAC5C,GAAG,WACH,GAAI,IAAI,MACR,SAAU,YACZ,CAAC,EAAI,KAAMD,MAAK,oBAAqB,CACnC,GAAG,gBACH,SAAU,CAACC,KAAI,eAAgB,CAC7B,YACA,GAAG,WACH,GAAI,IAAI,KACV,CAAC,EAAG,UAAYA,KAAI,sBAAuB,CACzC,GAAG,iBACL,CAAC,EAAI,KAAMA,KAAI,wBAAyB,CACtC,GAAG,mBACL,CAAC,CAAC,CACJ,CAAC,EAAG,YAAcA,KAAI,cAAe,CACnC,GAAG,UACH,GAAI,IAAI,KACR,SAAU,WACZ,CAAC,EAAI,KAAM,iBAAmBA,KAAI,mBAAoB,CACpD,GAAG,eACH,GAAI,IAAI,UACR,SAAU,gBACZ,CAAC,EAAI,IAAI,CACX,CAAC,CACH,CSpEO,IAAMC,WAAY,UACzBA,WAAU,aAAe,sBACzBA,WAAU,eAAiB,wBAC3BA,WAAU,UAAY,mBACtBA,WAAU,KAAO,cACjBA,WAAU,WAAa,oBACvBA,WAAU,MAAQ,eAClBA,WAAU,MAAQ,eAClBA,WAAU,KAAO",
|
|
6
6
|
"names": ["jsx", "jsxs", "_c", "jsx", "mergeProps", "_c", "jsx", "mergeProps", "_c", "jsx", "mergeProps", "_c", "jsx", "useQdsInputContext", "mergeProps", "jsx", "useQdsInputContext", "mergeProps", "_c", "jsx", "useTextInputContext", "mergeProps", "_c", "jsx", "PolymorphicElement", "mergeProps", "jsxs", "jsx", "TextInput"]
|
|
7
7
|
}
|
|
@@ -9,6 +9,17 @@ import { type TextInputInputGroupProps } from "./text-input-input-group";
|
|
|
9
9
|
import { type TextInputLabelProps } from "./text-input-label";
|
|
10
10
|
import { type TextInputRootProps } from "./text-input-root";
|
|
11
11
|
export interface TextInputProps extends TextInputRootProps {
|
|
12
|
+
/**
|
|
13
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-label aria-label}
|
|
14
|
+
* attribute, forwarded to the input element.
|
|
15
|
+
*/
|
|
16
|
+
"aria-label"?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-labelledby aria-labelledby}
|
|
19
|
+
* attribute, forwarded to the input element. If you provide a {@link label},
|
|
20
|
+
* omit this prop.
|
|
21
|
+
*/
|
|
22
|
+
"aria-labelledby"?: string | undefined;
|
|
12
23
|
/**
|
|
13
24
|
* The simple TextInput doesn't support children.
|
|
14
25
|
*/
|
|
@@ -78,5 +89,5 @@ export interface TextInputProps extends TextInputRootProps {
|
|
|
78
89
|
*/
|
|
79
90
|
startIcon?: LucideIconOrElement;
|
|
80
91
|
}
|
|
81
|
-
export declare function TextInput({ clearable, clearTriggerProps, errorIndicatorProps, errorText, errorTextProps, hint, hintProps, inputGroupProps, inputProps, label, labelProps, placeholder, ...props }: TextInputProps): ReactElement;
|
|
92
|
+
export declare function TextInput({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, clearable, clearTriggerProps, errorIndicatorProps, errorText, errorTextProps, hint, hintProps, inputGroupProps, inputProps: inputPropsProp, label, labelProps, placeholder, ...props }: TextInputProps): ReactElement;
|
|
82
93
|
//# sourceMappingURL=text-input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.d.ts","sourceRoot":"","sources":["../../src/text-input/text-input.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAA;AAElD,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gCAAgC,CAAA;AAIvE,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,4BAA4B,CAAA;AACnC,OAAO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