@qualcomm-ui/react 1.13.0 → 1.14.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-root.d.ts.map +1 -1
- package/dist/checkbox/index.js +1 -1
- package/dist/checkbox/index.js.map +2 -2
- package/dist/checkbox-group/checkbox-group.d.ts +32 -0
- package/dist/checkbox-group/checkbox-group.d.ts.map +1 -0
- package/dist/checkbox-group/index.d.ts +2 -0
- package/dist/checkbox-group/index.d.ts.map +1 -0
- package/dist/checkbox-group/index.js +3 -0
- package/dist/checkbox-group/index.js.map +7 -0
- package/dist/field-group/field-group-error-text.d.ts +19 -0
- package/dist/field-group/field-group-error-text.d.ts.map +1 -0
- package/dist/field-group/field-group-hint.d.ts +13 -0
- package/dist/field-group/field-group-hint.d.ts.map +1 -0
- package/dist/field-group/field-group-items.d.ts +13 -0
- package/dist/field-group/field-group-items.d.ts.map +1 -0
- package/dist/field-group/field-group-label.d.ts +13 -0
- package/dist/field-group/field-group-label.d.ts.map +1 -0
- package/dist/field-group/field-group-root.d.ts +32 -0
- package/dist/field-group/field-group-root.d.ts.map +1 -0
- package/dist/field-group/index.d.ts +7 -0
- package/dist/field-group/index.d.ts.map +1 -0
- package/dist/field-group/index.js +3 -0
- package/dist/field-group/index.js.map +7 -0
- package/dist/field-group/qds-field-group-context.d.ts +3 -0
- package/dist/field-group/qds-field-group-context.d.ts.map +1 -0
- package/dist/switch/index.js +1 -1
- package/dist/switch/index.js.map +2 -2
- package/dist/switch/switch-root.d.ts.map +1 -1
- package/dist/switch-group/index.d.ts +2 -0
- package/dist/switch-group/index.d.ts.map +1 -0
- package/dist/switch-group/index.js +3 -0
- package/dist/switch-group/index.js.map +7 -0
- package/dist/switch-group/switch-group.d.ts +32 -0
- package/dist/switch-group/switch-group.d.ts.map +1 -0
- package/dist/tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-root.d.ts","sourceRoot":"","sources":["../../src/checkbox/checkbox-root.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,YAAY,EAAE,KAAK,SAAS,EAAU,MAAM,OAAO,CAAA;AAEhE,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,gCAAgC,CAAA;
|
|
1
|
+
{"version":3,"file":"checkbox-root.d.ts","sourceRoot":"","sources":["../../src/checkbox/checkbox-root.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,YAAY,EAAE,KAAK,SAAS,EAAU,MAAM,OAAO,CAAA;AAEhE,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,gCAAgC,CAAA;AAQvC,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,MAAM,EAEZ,MAAM,gCAAgC,CAAA;AAKvC,MAAM,WAAW,iBACf,SAAQ,MAAM,EACZ,gBAAgB,EAChB,mBAAmB,EACnB,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC;IACzC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,EAAE,EACF,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,iBAAiB,GAAG,YAAY,CAwBlC"}
|
package/dist/checkbox/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx as jsx8,jsxs}from"react/jsx-runtime";import{useOptionalContentId}from"@qualcomm-ui/react-core/machine";import{useControlledId as useControlledId2}from"@qualcomm-ui/react-core/state";import{c as _c}from"react/compiler-runtime";import{jsx as jsx2}from"react/jsx-runtime";import{useCheckboxControl}from"@qualcomm-ui/react-core/checkbox";import{PolymorphicElement as PolymorphicElement2}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps2}from"@qualcomm-ui/utils/merge-props";import{jsx}from"react/jsx-runtime";import{CheckmarkIcon}from"@qualcomm-ui/react/checkmark";import{useCheckboxIndicator}from"@qualcomm-ui/react-core/checkbox";import{PolymorphicElement}from"@qualcomm-ui/react-core/system";import{mergeProps}from"@qualcomm-ui/utils/merge-props";import{createGuardedContext}from"@qualcomm-ui/react-core/context";var[QdsCheckboxContextProvider,useQdsCheckboxContext]=createGuardedContext({hookName:"useQdsCheckboxContext",providerName:"<QdsCheckboxContextProvider>",strict:!0});function CheckboxIndicator(t0){let{children,...props}=t0,{contextProps,indeterminate}=useCheckboxIndicator(),qdsContext=useQdsCheckboxContext(),mergedProps=mergeProps(contextProps,qdsContext.getIndicatorBindings(),props);return jsx(PolymorphicElement,{as:"div",...mergedProps,children:children??jsx(CheckmarkIcon,{indeterminate,size:qdsContext.size})})}function CheckboxControl(t0){let $=_c(2),{children:t1,id,...props}=t0,children=t1===void 0?jsx2(CheckboxIndicator,{}):t1,t2;$[0]!==id?(t2={id},$[0]=id,$[1]=t2):t2=$[1];let contextProps=useCheckboxControl(t2),qdsContext=useQdsCheckboxContext(),mergedProps=mergeProps2(contextProps,qdsContext.getControlBindings(),props);return jsx2(PolymorphicElement2,{as:"div",...mergedProps,children})}import{c as _c2}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{useCheckboxErrorText}from"@qualcomm-ui/react-core/checkbox";import{mergeProps as mergeProps3}from"@qualcomm-ui/utils/merge-props";function CheckboxErrorText(t0){let $=_c2(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useCheckboxErrorText(t1),qdsContext=useQdsCheckboxContext(),mergedProps=mergeProps3(contextProps,qdsContext.getErrorTextBindings(),props);return jsx3(InputErrorText,{icon:AlertCircle,...mergedProps,children})}import{c as _c3}from"react/compiler-runtime";import{jsx as jsx4}from"react/jsx-runtime";import{useCheckboxHiddenInput}from"@qualcomm-ui/react-core/checkbox";import{mergeProps as mergeProps4}from"@qualcomm-ui/utils/merge-props";function CheckboxHiddenInput(t0){let $=_c3(2),{id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useCheckboxHiddenInput(t1),qdsContext=useQdsCheckboxContext(),mergedProps=mergeProps4(contextProps,qdsContext.getHiddenInputBindings(),props);return jsx4("input",{...mergedProps})}import{c as _c4}from"react/compiler-runtime";import{jsx as jsx5}from"react/jsx-runtime";import{InputHint}from"@qualcomm-ui/react/input";import{useCheckboxHint}from"@qualcomm-ui/react-core/checkbox";import{mergeProps as mergeProps5}from"@qualcomm-ui/utils/merge-props";function CheckboxHint(t0){let $=_c4(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useCheckboxHint(t1),qdsContext=useQdsCheckboxContext(),mergedProps=mergeProps5(contextProps,qdsContext.getHintBindings(),props);return jsx5(InputHint,{...mergedProps,children})}import{c as _c5}from"react/compiler-runtime";import{jsx as jsx6}from"react/jsx-runtime";import{useCheckboxLabel}from"@qualcomm-ui/react-core/checkbox";import{PolymorphicElement as PolymorphicElement3}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps6}from"@qualcomm-ui/utils/merge-props";function CheckboxLabel(t0){let $=_c5(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useCheckboxLabel(t1),qdsContext=useQdsCheckboxContext(),mergedProps=mergeProps6(contextProps,qdsContext.getLabelBindings(),props);return jsx6(PolymorphicElement3,{as:"span",...mergedProps,children})}import{c as _c6}from"react/compiler-runtime";import{jsx as jsx7}from"react/jsx-runtime";import"react";import{splitCheckboxProps}from"@qualcomm-ui/core/checkbox";import{createQdsCheckboxApi}from"@qualcomm-ui/qds-core/checkbox";import{CheckboxContextProvider,useCheckbox}from"@qualcomm-ui/react-core/checkbox";import{normalizeProps}from"@qualcomm-ui/react-core/machine";import{useControlledId}from"@qualcomm-ui/react-core/state";import{PolymorphicElement as PolymorphicElement4}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps7}from"@qualcomm-ui/utils/merge-props";function CheckboxRoot(t0){let $=_c6(2),{children,id,size,...props}=t0,[checkboxProps,localProps]=splitCheckboxProps(props),context=useCheckbox(checkboxProps),t1;$[0]!==
|
|
2
|
+
import{jsx as jsx8,jsxs}from"react/jsx-runtime";import{useOptionalContentId}from"@qualcomm-ui/react-core/machine";import{useControlledId as useControlledId2}from"@qualcomm-ui/react-core/state";import{c as _c}from"react/compiler-runtime";import{jsx as jsx2}from"react/jsx-runtime";import{useCheckboxControl}from"@qualcomm-ui/react-core/checkbox";import{PolymorphicElement as PolymorphicElement2}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps2}from"@qualcomm-ui/utils/merge-props";import{jsx}from"react/jsx-runtime";import{CheckmarkIcon}from"@qualcomm-ui/react/checkmark";import{useCheckboxIndicator}from"@qualcomm-ui/react-core/checkbox";import{PolymorphicElement}from"@qualcomm-ui/react-core/system";import{mergeProps}from"@qualcomm-ui/utils/merge-props";import{createGuardedContext}from"@qualcomm-ui/react-core/context";var[QdsCheckboxContextProvider,useQdsCheckboxContext]=createGuardedContext({hookName:"useQdsCheckboxContext",providerName:"<QdsCheckboxContextProvider>",strict:!0});function CheckboxIndicator(t0){let{children,...props}=t0,{contextProps,indeterminate}=useCheckboxIndicator(),qdsContext=useQdsCheckboxContext(),mergedProps=mergeProps(contextProps,qdsContext.getIndicatorBindings(),props);return jsx(PolymorphicElement,{as:"div",...mergedProps,children:children??jsx(CheckmarkIcon,{indeterminate,size:qdsContext.size})})}function CheckboxControl(t0){let $=_c(2),{children:t1,id,...props}=t0,children=t1===void 0?jsx2(CheckboxIndicator,{}):t1,t2;$[0]!==id?(t2={id},$[0]=id,$[1]=t2):t2=$[1];let contextProps=useCheckboxControl(t2),qdsContext=useQdsCheckboxContext(),mergedProps=mergeProps2(contextProps,qdsContext.getControlBindings(),props);return jsx2(PolymorphicElement2,{as:"div",...mergedProps,children})}import{c as _c2}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{useCheckboxErrorText}from"@qualcomm-ui/react-core/checkbox";import{mergeProps as mergeProps3}from"@qualcomm-ui/utils/merge-props";function CheckboxErrorText(t0){let $=_c2(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useCheckboxErrorText(t1),qdsContext=useQdsCheckboxContext(),mergedProps=mergeProps3(contextProps,qdsContext.getErrorTextBindings(),props);return jsx3(InputErrorText,{icon:AlertCircle,...mergedProps,children})}import{c as _c3}from"react/compiler-runtime";import{jsx as jsx4}from"react/jsx-runtime";import{useCheckboxHiddenInput}from"@qualcomm-ui/react-core/checkbox";import{mergeProps as mergeProps4}from"@qualcomm-ui/utils/merge-props";function CheckboxHiddenInput(t0){let $=_c3(2),{id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useCheckboxHiddenInput(t1),qdsContext=useQdsCheckboxContext(),mergedProps=mergeProps4(contextProps,qdsContext.getHiddenInputBindings(),props);return jsx4("input",{...mergedProps})}import{c as _c4}from"react/compiler-runtime";import{jsx as jsx5}from"react/jsx-runtime";import{InputHint}from"@qualcomm-ui/react/input";import{useCheckboxHint}from"@qualcomm-ui/react-core/checkbox";import{mergeProps as mergeProps5}from"@qualcomm-ui/utils/merge-props";function CheckboxHint(t0){let $=_c4(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useCheckboxHint(t1),qdsContext=useQdsCheckboxContext(),mergedProps=mergeProps5(contextProps,qdsContext.getHintBindings(),props);return jsx5(InputHint,{...mergedProps,children})}import{c as _c5}from"react/compiler-runtime";import{jsx as jsx6}from"react/jsx-runtime";import{useCheckboxLabel}from"@qualcomm-ui/react-core/checkbox";import{PolymorphicElement as PolymorphicElement3}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps6}from"@qualcomm-ui/utils/merge-props";function CheckboxLabel(t0){let $=_c5(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useCheckboxLabel(t1),qdsContext=useQdsCheckboxContext(),mergedProps=mergeProps6(contextProps,qdsContext.getLabelBindings(),props);return jsx6(PolymorphicElement3,{as:"span",...mergedProps,children})}import{c as _c6}from"react/compiler-runtime";import{jsx as jsx7}from"react/jsx-runtime";import"react";import{splitCheckboxProps}from"@qualcomm-ui/core/checkbox";import{createQdsCheckboxApi}from"@qualcomm-ui/qds-core/checkbox";import{useQdsFieldGroupContext}from"@qualcomm-ui/react/field-group";import{CheckboxContextProvider,useCheckbox}from"@qualcomm-ui/react-core/checkbox";import{normalizeProps}from"@qualcomm-ui/react-core/machine";import{useControlledId}from"@qualcomm-ui/react-core/state";import{PolymorphicElement as PolymorphicElement4}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps7}from"@qualcomm-ui/utils/merge-props";function CheckboxRoot(t0){let $=_c6(2),{children,id,size,...props}=t0,[checkboxProps,localProps]=splitCheckboxProps(props),context=useCheckbox(checkboxProps),groupContext=useQdsFieldGroupContext(),groupSize=size??groupContext?.size,t1;$[0]!==groupSize?(t1=createQdsCheckboxApi({size:groupSize},normalizeProps),$[0]=groupSize,$[1]=t1):t1=$[1];let qdsContext=t1,mergedProps=mergeProps7(context.getRootBindings({id:useControlledId(id)}),qdsContext.getRootBindings(),localProps);return jsx7(QdsCheckboxContextProvider,{value:qdsContext,children:jsx7(CheckboxContextProvider,{value:context,children:jsx7(PolymorphicElement4,{as:"label",...mergedProps,children})})})}function Checkbox(t0){let{"aria-label":ariaLabel,"aria-labelledby":ariaLabelledBy,controlProps,errorText,errorTextProps,hiddenInputProps:hiddenInputPropsProp,hint,hintProps,indicatorProps,label,labelProps,...props}=t0,labelContent=label||labelProps?.children,errorTextContent=errorText||errorTextProps?.children,hintContent=hint||hintProps?.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),hint:useOptionalContentId(hintContent,hintProps),label:useOptionalContentId(labelContent,labelProps),root:useControlledId2(props.id),...props.ids};return jsxs(CheckboxRoot,{...props,id:ids.root,ids,children:[jsx8(CheckboxHiddenInput,{...hiddenInputProps,id:ids.hiddenInput}),jsx8(CheckboxControl,{...controlProps,children:jsx8(CheckboxIndicator,{...indicatorProps})}),labelContent?jsx8(CheckboxLabel,{...labelProps,id:ids.label,children:labelContent}):null,hintContent?jsx8(CheckboxHint,{...hintProps,id:ids.hint,children:hintContent}):null,errorTextContent?jsx8(CheckboxErrorText,{...errorTextProps,id:ids.errorText,children:errorTextContent}):null]})}import{c as _c7}from"react/compiler-runtime";import{useCheckboxContext}from"@qualcomm-ui/react-core/checkbox";import{renderProp}from"@qualcomm-ui/react-core/system";function CheckboxContext(t0){let $=_c7(3),{children}=t0,context=useCheckboxContext(),t1;return $[0]!==children||$[1]!==context?(t1=renderProp(children,context),$[0]=children,$[1]=context,$[2]=t1):t1=$[2],t1}var Checkbox2=Checkbox;Checkbox2.Context=CheckboxContext;Checkbox2.Control=CheckboxControl;Checkbox2.ErrorText=CheckboxErrorText;Checkbox2.HiddenInput=CheckboxHiddenInput;Checkbox2.Hint=CheckboxHint;Checkbox2.Indicator=CheckboxIndicator;Checkbox2.Label=CheckboxLabel;Checkbox2.Root=CheckboxRoot;export{Checkbox2 as Checkbox};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/checkbox/checkbox.tsx", "../../src/checkbox/checkbox-control.tsx", "../../src/checkbox/checkbox-indicator.tsx", "../../src/checkbox/qds-checkbox-context.ts", "../../src/checkbox/checkbox-error-text.tsx", "../../src/checkbox/checkbox-hidden-input.tsx", "../../src/checkbox/checkbox-hint.tsx", "../../src/checkbox/checkbox-label.tsx", "../../src/checkbox/checkbox-root.tsx", "../../src/checkbox/checkbox-context.tsx", "../../src/checkbox/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 { CheckboxControl } from \"./checkbox-control\";\nimport { CheckboxErrorText } from \"./checkbox-error-text\";\nimport { CheckboxHiddenInput } from \"./checkbox-hidden-input\";\nimport { CheckboxHint } from \"./checkbox-hint\";\nimport { CheckboxIndicator } from \"./checkbox-indicator\";\nimport { CheckboxLabel } from \"./checkbox-label\";\nimport { CheckboxRoot } from \"./checkbox-root\";\nexport function Checkbox(t0) {\n const {\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n controlProps,\n errorText,\n errorTextProps,\n hiddenInputProps: hiddenInputPropsProp,\n hint,\n hintProps,\n indicatorProps,\n label,\n labelProps,\n ...props\n } = t0;\n const labelContent = label || labelProps?.children;\n const errorTextContent = errorText || errorTextProps?.children;\n const hintContent = hint || hintProps?.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 hint: useOptionalContentId(hintContent, hintProps),\n label: useOptionalContentId(labelContent, labelProps),\n root: useControlledId(props.id),\n ...props.ids\n };\n return jsxs(CheckboxRoot, {\n ...props,\n id: ids.root,\n ids,\n children: [jsx(CheckboxHiddenInput, {\n ...hiddenInputProps,\n id: ids.hiddenInput\n }), jsx(CheckboxControl, {\n ...controlProps,\n children: jsx(CheckboxIndicator, {\n ...indicatorProps\n })\n }), labelContent ? jsx(CheckboxLabel, {\n ...labelProps,\n id: ids.label,\n children: labelContent\n }) : null, hintContent ? jsx(CheckboxHint, {\n ...hintProps,\n id: ids.hint,\n children: hintContent\n }) : null, errorTextContent ? jsx(CheckboxErrorText, {\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 { useCheckboxControl } from \"@qualcomm-ui/react-core/checkbox\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { CheckboxIndicator } from \"./checkbox-indicator\";\nimport { useQdsCheckboxContext } from \"./qds-checkbox-context\";\nexport function CheckboxControl(t0) {\n const $ = _c(2);\n const {\n children: t1,\n id,\n ...props\n } = t0;\n const children = t1 === undefined ? jsx(CheckboxIndicator, {}) : t1;\n let t2;\n if ($[0] !== id) {\n t2 = {\n id\n };\n $[0] = id;\n $[1] = t2;\n } else {\n t2 = $[1];\n }\n const contextProps = useCheckboxControl(t2);\n const qdsContext = useQdsCheckboxContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getControlBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n });\n}", "import { jsx } from \"react/jsx-runtime\";\nimport { CheckmarkIcon } from \"@qualcomm-ui/react/checkmark\";\nimport { useCheckboxIndicator } from \"@qualcomm-ui/react-core/checkbox\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsCheckboxContext } from \"./qds-checkbox-context\";\nexport function CheckboxIndicator(t0) {\n const {\n children,\n ...props\n } = t0;\n const {\n contextProps,\n indeterminate\n } = useCheckboxIndicator();\n const qdsContext = useQdsCheckboxContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getIndicatorBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children: children ?? jsx(CheckmarkIcon, {\n indeterminate,\n size: qdsContext.size\n })\n });\n}", "import { createGuardedContext } from \"@qualcomm-ui/react-core/context\";\nexport const [QdsCheckboxContextProvider, useQdsCheckboxContext] = createGuardedContext({\n hookName: \"useQdsCheckboxContext\",\n providerName: \"<QdsCheckboxContextProvider>\",\n strict: true\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 { useCheckboxErrorText } from \"@qualcomm-ui/react-core/checkbox\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsCheckboxContext } from \"./qds-checkbox-context\";\nexport function CheckboxErrorText(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 = useCheckboxErrorText(t1);\n const qdsContext = useQdsCheckboxContext();\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 { useCheckboxHiddenInput } from \"@qualcomm-ui/react-core/checkbox\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsCheckboxContext } from \"./qds-checkbox-context\";\nexport function CheckboxHiddenInput(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 = useCheckboxHiddenInput(t1);\n const qdsContext = useQdsCheckboxContext();\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 { InputHint } from \"@qualcomm-ui/react/input\";\nimport { useCheckboxHint } from \"@qualcomm-ui/react-core/checkbox\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsCheckboxContext } from \"./qds-checkbox-context\";\nexport function CheckboxHint(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 = useCheckboxHint(t1);\n const qdsContext = useQdsCheckboxContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getHintBindings(), 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 { useCheckboxLabel } from \"@qualcomm-ui/react-core/checkbox\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsCheckboxContext } from \"./qds-checkbox-context\";\nexport function CheckboxLabel(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 = useCheckboxLabel(t1);\n const qdsContext = useQdsCheckboxContext();\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 { splitCheckboxProps } from \"@qualcomm-ui/core/checkbox\";\nimport { createQdsCheckboxApi } from \"@qualcomm-ui/qds-core/checkbox\";\nimport { CheckboxContextProvider, useCheckbox } from \"@qualcomm-ui/react-core/checkbox\";\nimport { normalizeProps } from \"@qualcomm-ui/react-core/machine\";\nimport { useControlledId } from \"@qualcomm-ui/react-core/state\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { QdsCheckboxContextProvider } from \"./qds-checkbox-context\";\nexport function CheckboxRoot(t0) {\n const $ = _c(2);\n const {\n children,\n id,\n size,\n ...props\n } = t0;\n const [checkboxProps, localProps] = splitCheckboxProps(props);\n const context = useCheckbox(checkboxProps);\n let t1;\n if ($[0] !== size) {\n t1 = createQdsCheckboxApi({\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(QdsCheckboxContextProvider, {\n value: qdsContext,\n children: jsx(CheckboxContextProvider, {\n value: context,\n children: jsx(PolymorphicElement, {\n as: \"label\",\n ...mergedProps,\n children\n })\n })\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { useCheckboxContext } from \"@qualcomm-ui/react-core/checkbox\";\nimport { renderProp } from \"@qualcomm-ui/react-core/system\";\nexport function CheckboxContext(t0) {\n const $ = _c(3);\n const {\n children\n } = t0;\n const context = useCheckboxContext();\n let t1;\n if ($[0] !== children || $[1] !== context) {\n t1 = renderProp(children, context);\n $[0] = children;\n $[1] = context;\n $[2] = t1;\n } else {\n t1 = $[2];\n }\n return t1;\n}", "import { Checkbox as SimpleCheckbox } from \"./checkbox\";\nimport { CheckboxContext } from \"./checkbox-context\";\nimport { CheckboxControl } from \"./checkbox-control\";\nimport { CheckboxErrorText } from \"./checkbox-error-text\";\nimport { CheckboxHiddenInput } from \"./checkbox-hidden-input\";\nimport { CheckboxHint } from \"./checkbox-hint\";\nimport { CheckboxIndicator } from \"./checkbox-indicator\";\nimport { CheckboxLabel } from \"./checkbox-label\";\nimport { CheckboxRoot } from \"./checkbox-root\";\nexport const Checkbox = SimpleCheckbox;\nCheckbox.Context = CheckboxContext;\nCheckbox.Control = CheckboxControl;\nCheckbox.ErrorText = CheckboxErrorText;\nCheckbox.HiddenInput = CheckboxHiddenInput;\nCheckbox.Hint = CheckboxHint;\nCheckbox.Indicator = CheckboxIndicator;\nCheckbox.Label = CheckboxLabel;\nCheckbox.Root = CheckboxRoot;"],
|
|
5
|
-
"mappings": ";AAAA,OAAS,OAAAA,KAAK,SAAY,oBAC1B,OAAS,yBAA4B,kCACrC,OAAS,mBAAAC,qBAAuB,gCCFhC,OAAS,KAAK,OAAU,yBACxB,OAAS,OAAAC,SAAW,oBACpB,OAAS,uBAA0B,mCACnC,OAAS,sBAAAC,wBAA0B,iCACnC,OAAS,cAAAC,gBAAkB,iCCJ3B,OAAS,QAAW,oBACpB,OAAS,kBAAqB,+BAC9B,OAAS,yBAA4B,mCACrC,OAAS,uBAA0B,iCACnC,OAAS,eAAkB,iCCJ3B,OAAS,yBAA4B,kCAC9B,GAAM,CAAC,2BAA4B,qBAAqB,EAAI,qBAAqB,CACtF,SAAU,wBACV,aAAc,+BACd,OAAQ,EACV,CAAC,EDCM,SAAS,kBAAkB,GAAI,CACpC,GAAM,CACJ,SACA,GAAG,KACL,EAAI,GACE,CACJ,aACA,aACF,EAAI,qBAAqB,EACnB,WAAa,sBAAsB,EACnC,YAAc,WAAW,aAAc,WAAW,qBAAqB,EAAG,KAAK,EACrF,OAAO,IAAI,mBAAoB,CAC7B,GAAI,MACJ,GAAG,YACH,SAAU,UAAY,IAAI,cAAe,CACvC,cACA,KAAM,WAAW,IACnB,CAAC,CACH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B,GAAI,OACJ,GAAG,YACH,QACF,CAAC,CACH,CC/BA,OAAS,KAAKC,QAAU,yBACxB,OAAS,OAAAC,SAAW,oBACpB,MAAwB,QACxB,OAAS,uBAA0B,6BACnC,OAAS,yBAA4B,iCACrC,OAAS,wBAAyB,gBAAmB,mCACrD,OAAS,mBAAsB,kCAC/B,OAAS,oBAAuB,gCAChC,OAAS,sBAAAC,wBAA0B,iCACnC,OAAS,cAAAC,gBAAkB,iCAEpB,SAAS,aAAa,GAAI,CAC/B,IAAM,EAAIC,IAAG,CAAC,EACR,CACJ,SACA,GACA,KACA,GAAG,KACL,EAAI,GACE,CAAC,cAAe,UAAU,EAAI,mBAAmB,KAAK,EACtD,QAAU,YAAY,aAAa,
|
|
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 { CheckboxControl } from \"./checkbox-control\";\nimport { CheckboxErrorText } from \"./checkbox-error-text\";\nimport { CheckboxHiddenInput } from \"./checkbox-hidden-input\";\nimport { CheckboxHint } from \"./checkbox-hint\";\nimport { CheckboxIndicator } from \"./checkbox-indicator\";\nimport { CheckboxLabel } from \"./checkbox-label\";\nimport { CheckboxRoot } from \"./checkbox-root\";\nexport function Checkbox(t0) {\n const {\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n controlProps,\n errorText,\n errorTextProps,\n hiddenInputProps: hiddenInputPropsProp,\n hint,\n hintProps,\n indicatorProps,\n label,\n labelProps,\n ...props\n } = t0;\n const labelContent = label || labelProps?.children;\n const errorTextContent = errorText || errorTextProps?.children;\n const hintContent = hint || hintProps?.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 hint: useOptionalContentId(hintContent, hintProps),\n label: useOptionalContentId(labelContent, labelProps),\n root: useControlledId(props.id),\n ...props.ids\n };\n return jsxs(CheckboxRoot, {\n ...props,\n id: ids.root,\n ids,\n children: [jsx(CheckboxHiddenInput, {\n ...hiddenInputProps,\n id: ids.hiddenInput\n }), jsx(CheckboxControl, {\n ...controlProps,\n children: jsx(CheckboxIndicator, {\n ...indicatorProps\n })\n }), labelContent ? jsx(CheckboxLabel, {\n ...labelProps,\n id: ids.label,\n children: labelContent\n }) : null, hintContent ? jsx(CheckboxHint, {\n ...hintProps,\n id: ids.hint,\n children: hintContent\n }) : null, errorTextContent ? jsx(CheckboxErrorText, {\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 { useCheckboxControl } from \"@qualcomm-ui/react-core/checkbox\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { CheckboxIndicator } from \"./checkbox-indicator\";\nimport { useQdsCheckboxContext } from \"./qds-checkbox-context\";\nexport function CheckboxControl(t0) {\n const $ = _c(2);\n const {\n children: t1,\n id,\n ...props\n } = t0;\n const children = t1 === undefined ? jsx(CheckboxIndicator, {}) : t1;\n let t2;\n if ($[0] !== id) {\n t2 = {\n id\n };\n $[0] = id;\n $[1] = t2;\n } else {\n t2 = $[1];\n }\n const contextProps = useCheckboxControl(t2);\n const qdsContext = useQdsCheckboxContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getControlBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n });\n}", "import { jsx } from \"react/jsx-runtime\";\nimport { CheckmarkIcon } from \"@qualcomm-ui/react/checkmark\";\nimport { useCheckboxIndicator } from \"@qualcomm-ui/react-core/checkbox\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsCheckboxContext } from \"./qds-checkbox-context\";\nexport function CheckboxIndicator(t0) {\n const {\n children,\n ...props\n } = t0;\n const {\n contextProps,\n indeterminate\n } = useCheckboxIndicator();\n const qdsContext = useQdsCheckboxContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getIndicatorBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children: children ?? jsx(CheckmarkIcon, {\n indeterminate,\n size: qdsContext.size\n })\n });\n}", "import { createGuardedContext } from \"@qualcomm-ui/react-core/context\";\nexport const [QdsCheckboxContextProvider, useQdsCheckboxContext] = createGuardedContext({\n hookName: \"useQdsCheckboxContext\",\n providerName: \"<QdsCheckboxContextProvider>\",\n strict: true\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 { useCheckboxErrorText } from \"@qualcomm-ui/react-core/checkbox\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsCheckboxContext } from \"./qds-checkbox-context\";\nexport function CheckboxErrorText(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 = useCheckboxErrorText(t1);\n const qdsContext = useQdsCheckboxContext();\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 { useCheckboxHiddenInput } from \"@qualcomm-ui/react-core/checkbox\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsCheckboxContext } from \"./qds-checkbox-context\";\nexport function CheckboxHiddenInput(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 = useCheckboxHiddenInput(t1);\n const qdsContext = useQdsCheckboxContext();\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 { InputHint } from \"@qualcomm-ui/react/input\";\nimport { useCheckboxHint } from \"@qualcomm-ui/react-core/checkbox\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsCheckboxContext } from \"./qds-checkbox-context\";\nexport function CheckboxHint(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 = useCheckboxHint(t1);\n const qdsContext = useQdsCheckboxContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getHintBindings(), 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 { useCheckboxLabel } from \"@qualcomm-ui/react-core/checkbox\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsCheckboxContext } from \"./qds-checkbox-context\";\nexport function CheckboxLabel(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 = useCheckboxLabel(t1);\n const qdsContext = useQdsCheckboxContext();\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 { splitCheckboxProps } from \"@qualcomm-ui/core/checkbox\";\nimport { createQdsCheckboxApi } from \"@qualcomm-ui/qds-core/checkbox\";\nimport { useQdsFieldGroupContext } from \"@qualcomm-ui/react/field-group\";\nimport { CheckboxContextProvider, useCheckbox } from \"@qualcomm-ui/react-core/checkbox\";\nimport { normalizeProps } from \"@qualcomm-ui/react-core/machine\";\nimport { useControlledId } from \"@qualcomm-ui/react-core/state\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { QdsCheckboxContextProvider } from \"./qds-checkbox-context\";\nexport function CheckboxRoot(t0) {\n const $ = _c(2);\n const {\n children,\n id,\n size,\n ...props\n } = t0;\n const [checkboxProps, localProps] = splitCheckboxProps(props);\n const context = useCheckbox(checkboxProps);\n const groupContext = useQdsFieldGroupContext();\n const groupSize = size ?? groupContext?.size;\n let t1;\n if ($[0] !== groupSize) {\n t1 = createQdsCheckboxApi({\n size: groupSize\n }, normalizeProps);\n $[0] = groupSize;\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(QdsCheckboxContextProvider, {\n value: qdsContext,\n children: jsx(CheckboxContextProvider, {\n value: context,\n children: jsx(PolymorphicElement, {\n as: \"label\",\n ...mergedProps,\n children\n })\n })\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { useCheckboxContext } from \"@qualcomm-ui/react-core/checkbox\";\nimport { renderProp } from \"@qualcomm-ui/react-core/system\";\nexport function CheckboxContext(t0) {\n const $ = _c(3);\n const {\n children\n } = t0;\n const context = useCheckboxContext();\n let t1;\n if ($[0] !== children || $[1] !== context) {\n t1 = renderProp(children, context);\n $[0] = children;\n $[1] = context;\n $[2] = t1;\n } else {\n t1 = $[2];\n }\n return t1;\n}", "import { Checkbox as SimpleCheckbox } from \"./checkbox\";\nimport { CheckboxContext } from \"./checkbox-context\";\nimport { CheckboxControl } from \"./checkbox-control\";\nimport { CheckboxErrorText } from \"./checkbox-error-text\";\nimport { CheckboxHiddenInput } from \"./checkbox-hidden-input\";\nimport { CheckboxHint } from \"./checkbox-hint\";\nimport { CheckboxIndicator } from \"./checkbox-indicator\";\nimport { CheckboxLabel } from \"./checkbox-label\";\nimport { CheckboxRoot } from \"./checkbox-root\";\nexport const Checkbox = SimpleCheckbox;\nCheckbox.Context = CheckboxContext;\nCheckbox.Control = CheckboxControl;\nCheckbox.ErrorText = CheckboxErrorText;\nCheckbox.HiddenInput = CheckboxHiddenInput;\nCheckbox.Hint = CheckboxHint;\nCheckbox.Indicator = CheckboxIndicator;\nCheckbox.Label = CheckboxLabel;\nCheckbox.Root = CheckboxRoot;"],
|
|
5
|
+
"mappings": ";AAAA,OAAS,OAAAA,KAAK,SAAY,oBAC1B,OAAS,yBAA4B,kCACrC,OAAS,mBAAAC,qBAAuB,gCCFhC,OAAS,KAAK,OAAU,yBACxB,OAAS,OAAAC,SAAW,oBACpB,OAAS,uBAA0B,mCACnC,OAAS,sBAAAC,wBAA0B,iCACnC,OAAS,cAAAC,gBAAkB,iCCJ3B,OAAS,QAAW,oBACpB,OAAS,kBAAqB,+BAC9B,OAAS,yBAA4B,mCACrC,OAAS,uBAA0B,iCACnC,OAAS,eAAkB,iCCJ3B,OAAS,yBAA4B,kCAC9B,GAAM,CAAC,2BAA4B,qBAAqB,EAAI,qBAAqB,CACtF,SAAU,wBACV,aAAc,+BACd,OAAQ,EACV,CAAC,EDCM,SAAS,kBAAkB,GAAI,CACpC,GAAM,CACJ,SACA,GAAG,KACL,EAAI,GACE,C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AAK,WAAW,SAAU,OAAO,EACjC,EAAE,CAAC,EAAI,SACP,EAAE,CAAC,EAAI,QACP,EAAE,CAAC,EAAI,IAEP,GAAK,EAAE,CAAC,EAEH,EACT,CCVO,IAAMC,UAAW,SACxBA,UAAS,QAAU,gBACnBA,UAAS,QAAU,gBACnBA,UAAS,UAAY,kBACrBA,UAAS,YAAc,oBACvBA,UAAS,KAAO,aAChBA,UAAS,UAAY,kBACrBA,UAAS,MAAQ,cACjBA,UAAS,KAAO",
|
|
6
6
|
"names": ["jsx", "useControlledId", "jsx", "PolymorphicElement", "mergeProps", "jsx", "mergeProps", "PolymorphicElement", "_c", "jsx", "mergeProps", "_c", "mergeProps", "jsx", "_c", "jsx", "mergeProps", "_c", "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", "_c", "Checkbox"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from "react";
|
|
2
|
+
import { FieldGroupErrorText, FieldGroupHint, FieldGroupItems, FieldGroupLabel, FieldGroupRoot, type FieldGroupRootProps } from "@qualcomm-ui/react/field-group";
|
|
3
|
+
export interface CheckboxGroupProps extends FieldGroupRootProps {
|
|
4
|
+
/**
|
|
5
|
+
* React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.
|
|
6
|
+
*/
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Error message displayed when invalid.
|
|
10
|
+
*/
|
|
11
|
+
errorText?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Helper text displayed below items.
|
|
14
|
+
*/
|
|
15
|
+
hint?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Group label text.
|
|
18
|
+
*/
|
|
19
|
+
label?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Groups multiple checkboxes with a label, hint, and error text.
|
|
23
|
+
*/
|
|
24
|
+
export declare function CheckboxGroup({ children, errorText, hint, label, ...props }: CheckboxGroupProps): ReactElement;
|
|
25
|
+
export declare namespace CheckboxGroup {
|
|
26
|
+
var Root: typeof FieldGroupRoot;
|
|
27
|
+
var Label: typeof FieldGroupLabel;
|
|
28
|
+
var Items: typeof FieldGroupItems;
|
|
29
|
+
var Hint: typeof FieldGroupHint;
|
|
30
|
+
var ErrorText: typeof FieldGroupErrorText;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=checkbox-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-group.d.ts","sourceRoot":"","sources":["../../src/checkbox-group/checkbox-group.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAA;AAElD,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,eAAe,EACf,cAAc,EACd,KAAK,mBAAmB,EACzB,MAAM,gCAAgC,CAAA;AAEvC,MAAM,WAAW,kBAAmB,SAAQ,mBAAmB;IAC7D;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAA;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,KAAK,EACL,GAAG,KAAK,EACT,EAAE,kBAAkB,GAAG,YAAY,CAYnC;yBAlBe,aAAa"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/checkbox-group/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,KAAK,kBAAkB,EAAC,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx,jsxs}from"react/jsx-runtime";import{FieldGroupErrorText,FieldGroupHint,FieldGroupItems,FieldGroupLabel,FieldGroupRoot}from"@qualcomm-ui/react/field-group";function CheckboxGroup({children,errorText,hint,label,...props}){let showHint=!!hint&&!props.invalid,showError=!!errorText&&props.invalid;return jsxs(FieldGroupRoot,{...props,children:[label&&jsx(FieldGroupLabel,{children:label}),jsx(FieldGroupItems,{children}),showHint&&jsx(FieldGroupHint,{children:hint}),showError&&jsx(FieldGroupErrorText,{children:errorText})]})}CheckboxGroup.Root=FieldGroupRoot;CheckboxGroup.Label=FieldGroupLabel;CheckboxGroup.Items=FieldGroupItems;CheckboxGroup.Hint=FieldGroupHint;CheckboxGroup.ErrorText=FieldGroupErrorText;export{CheckboxGroup};
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/checkbox-group/checkbox-group.tsx"],
|
|
4
|
+
"sourcesContent": ["import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { FieldGroupErrorText, FieldGroupHint, FieldGroupItems, FieldGroupLabel, FieldGroupRoot } from \"@qualcomm-ui/react/field-group\";\nexport function CheckboxGroup({\n children,\n errorText,\n hint,\n label,\n ...props\n}) {\n const showHint = Boolean(hint) && !props.invalid;\n const showError = Boolean(errorText) && props.invalid;\n return /* @__PURE__ */jsxs(FieldGroupRoot, {\n ...props,\n children: [label && /* @__PURE__ */jsx(FieldGroupLabel, {\n children: label\n }), /* @__PURE__ */jsx(FieldGroupItems, {\n children\n }), showHint && /* @__PURE__ */jsx(FieldGroupHint, {\n children: hint\n }), showError && /* @__PURE__ */jsx(FieldGroupErrorText, {\n children: errorText\n })]\n });\n}\nCheckboxGroup.Root = FieldGroupRoot;\nCheckboxGroup.Label = FieldGroupLabel;\nCheckboxGroup.Items = FieldGroupItems;\nCheckboxGroup.Hint = FieldGroupHint;\nCheckboxGroup.ErrorText = FieldGroupErrorText;"],
|
|
5
|
+
"mappings": ";AAAA,OAAS,IAAK,SAAY,oBAC1B,OAAS,oBAAqB,eAAgB,gBAAiB,gBAAiB,mBAAsB,iCAC/F,SAAS,cAAc,CAC5B,SACA,UACA,KACA,MACA,GAAG,KACL,EAAG,CACD,IAAM,SAAW,EAAQ,MAAS,CAAC,MAAM,QACnC,UAAY,EAAQ,WAAc,MAAM,QAC9C,OAAsB,KAAK,eAAgB,CACzC,GAAG,MACH,SAAU,CAAC,OAAwB,IAAI,gBAAiB,CACtD,SAAU,KACZ,CAAC,EAAkB,IAAI,gBAAiB,CACtC,QACF,CAAC,EAAG,UAA2B,IAAI,eAAgB,CACjD,SAAU,IACZ,CAAC,EAAG,WAA4B,IAAI,oBAAqB,CACvD,SAAU,SACZ,CAAC,CAAC,CACJ,CAAC,CACH,CACA,cAAc,KAAO,eACrB,cAAc,MAAQ,gBACtB,cAAc,MAAQ,gBACtB,cAAc,KAAO,eACrB,cAAc,UAAY",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from "react";
|
|
2
|
+
import type { LucideIconOrElement } from "@qualcomm-ui/react-core/lucide";
|
|
3
|
+
import { type ElementRenderProp } from "@qualcomm-ui/react-core/system";
|
|
4
|
+
export interface FieldGroupErrorTextProps extends ElementRenderProp<"div"> {
|
|
5
|
+
/**
|
|
6
|
+
* React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.
|
|
7
|
+
*/
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* An icon to display next to the error text.
|
|
11
|
+
* @default `<CircleAlert />`
|
|
12
|
+
*/
|
|
13
|
+
icon?: LucideIconOrElement;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Error text for the field group. Renders a `<div>` element by default.
|
|
17
|
+
*/
|
|
18
|
+
export declare function FieldGroupErrorText({ children, icon, ...props }: FieldGroupErrorTextProps): ReactElement;
|
|
19
|
+
//# sourceMappingURL=field-group-error-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-group-error-text.d.ts","sourceRoot":"","sources":["../../src/field-group/field-group-error-text.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAA;AAKlD,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gCAAgC,CAAA;AACvE,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,gCAAgC,CAAA;AAKvC,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB,CAAC,KAAK,CAAC;IACxE;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;IAEpB;;;OAGG;IACH,IAAI,CAAC,EAAE,mBAAmB,CAAA;CAC3B;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,IAAkB,EAClB,GAAG,KAAK,EACT,EAAE,wBAAwB,GAAG,YAAY,CAUzC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from "react";
|
|
2
|
+
import { type ElementRenderProp } from "@qualcomm-ui/react-core/system";
|
|
3
|
+
export interface FieldGroupHintProps extends ElementRenderProp<"div"> {
|
|
4
|
+
/**
|
|
5
|
+
* React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.
|
|
6
|
+
*/
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Hint text for the field group. Renders a `<div>` element by default.
|
|
11
|
+
*/
|
|
12
|
+
export declare function FieldGroupHint({ children, ...props }: FieldGroupHintProps): ReactElement;
|
|
13
|
+
//# sourceMappingURL=field-group-hint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-group-hint.d.ts","sourceRoot":"","sources":["../../src/field-group/field-group-hint.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAA;AAElD,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,gCAAgC,CAAA;AAKvC,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB,CAAC,KAAK,CAAC;IACnE;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,mBAAmB,GAAG,YAAY,CASpC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from "react";
|
|
2
|
+
import { type ElementRenderProp } from "@qualcomm-ui/react-core/system";
|
|
3
|
+
export interface FieldGroupItemsProps extends ElementRenderProp<"div"> {
|
|
4
|
+
/**
|
|
5
|
+
* React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.
|
|
6
|
+
*/
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Container for the field group items. Renders a `<div>` element by default.
|
|
11
|
+
*/
|
|
12
|
+
export declare function FieldGroupItems({ children, ...props }: FieldGroupItemsProps): ReactElement;
|
|
13
|
+
//# sourceMappingURL=field-group-items.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-group-items.d.ts","sourceRoot":"","sources":["../../src/field-group/field-group-items.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAA;AAElD,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,gCAAgC,CAAA;AAKvC,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB,CAAC,KAAK,CAAC;IACpE;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,oBAAoB,GAAG,YAAY,CASrC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from "react";
|
|
2
|
+
import { type ElementRenderProp } from "@qualcomm-ui/react-core/system";
|
|
3
|
+
export interface FieldGroupLabelProps extends ElementRenderProp<"legend"> {
|
|
4
|
+
/**
|
|
5
|
+
* React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.
|
|
6
|
+
*/
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Label for the field group. Renders a `<legend>` element by default.
|
|
11
|
+
*/
|
|
12
|
+
export declare function FieldGroupLabel({ children, ...props }: FieldGroupLabelProps): ReactElement;
|
|
13
|
+
//# sourceMappingURL=field-group-label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-group-label.d.ts","sourceRoot":"","sources":["../../src/field-group/field-group-label.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAA;AAElD,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,gCAAgC,CAAA;AAKvC,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB,CAAC,QAAQ,CAAC;IACvE;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,oBAAoB,GAAG,YAAY,CASrC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ReactElement, type ReactNode } from "react";
|
|
2
|
+
import { type QdsFieldGroupOrientation, type QdsFieldGroupSize } from "@qualcomm-ui/qds-core/field-group";
|
|
3
|
+
import { type ElementRenderProp } from "@qualcomm-ui/react-core/system";
|
|
4
|
+
export interface FieldGroupRootProps extends ElementRenderProp<"fieldset"> {
|
|
5
|
+
/**
|
|
6
|
+
* React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.
|
|
7
|
+
*/
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Adds padding at the start of the items container.
|
|
11
|
+
*/
|
|
12
|
+
indented?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Marks the group as invalid.
|
|
15
|
+
*/
|
|
16
|
+
invalid?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Layout direction for items.
|
|
19
|
+
* @default 'vertical'
|
|
20
|
+
*/
|
|
21
|
+
orientation?: QdsFieldGroupOrientation;
|
|
22
|
+
/**
|
|
23
|
+
* The size of the group items.
|
|
24
|
+
* @default 'md'
|
|
25
|
+
*/
|
|
26
|
+
size?: QdsFieldGroupSize;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Root container for the field group. Renders a `<fieldset>` element by default.
|
|
30
|
+
*/
|
|
31
|
+
export declare function FieldGroupRoot({ children, indented, invalid, orientation, size, ...props }: FieldGroupRootProps): ReactElement;
|
|
32
|
+
//# sourceMappingURL=field-group-root.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-group-root.d.ts","sourceRoot":"","sources":["../../src/field-group/field-group-root.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,YAAY,EAAE,KAAK,SAAS,EAAU,MAAM,OAAO,CAAA;AAEhE,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACvB,MAAM,mCAAmC,CAAA;AAE1C,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,gCAAgC,CAAA;AAKvC,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB,CAAC,UAAU,CAAC;IACxE;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;;OAGG;IACH,WAAW,CAAC,EAAE,wBAAwB,CAAA;IAEtC;;;OAGG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAA;CACzB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,WAAW,EACX,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,mBAAmB,GAAG,YAAY,CAmBpC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { QdsFieldGroupContextProvider, useQdsFieldGroupContext, } from "./qds-field-group-context";
|
|
2
|
+
export { FieldGroupErrorText, type FieldGroupErrorTextProps, } from "./field-group-error-text";
|
|
3
|
+
export { FieldGroupHint, type FieldGroupHintProps } from "./field-group-hint";
|
|
4
|
+
export { FieldGroupItems, type FieldGroupItemsProps } from "./field-group-items";
|
|
5
|
+
export { FieldGroupLabel, type FieldGroupLabelProps } from "./field-group-label";
|
|
6
|
+
export { FieldGroupRoot, type FieldGroupRootProps } from "./field-group-root";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/field-group/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,GACxB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,GAC9B,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAC,cAAc,EAAE,KAAK,mBAAmB,EAAC,MAAM,oBAAoB,CAAA;AAC3E,OAAO,EAAC,eAAe,EAAE,KAAK,oBAAoB,EAAC,MAAM,qBAAqB,CAAA;AAC9E,OAAO,EAAC,eAAe,EAAE,KAAK,oBAAoB,EAAC,MAAM,qBAAqB,CAAA;AAC9E,OAAO,EAAC,cAAc,EAAE,KAAK,mBAAmB,EAAC,MAAM,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{createGuardedContext}from"@qualcomm-ui/react-core/context";var[QdsFieldGroupContextProvider,useQdsFieldGroupContext]=createGuardedContext({hookName:"useQdsFieldGroupContext",providerName:"<QdsFieldGroupContextProvider>",strict:!1});import{jsx,jsxs}from"react/jsx-runtime";import{CircleAlert}from"lucide-react";import{IconOrNode}from"@qualcomm-ui/react/icon";import{PolymorphicElement}from"@qualcomm-ui/react-core/system";import{mergeProps}from"@qualcomm-ui/utils/merge-props";function FieldGroupErrorText(t0){let{children,icon:t1,...props}=t0,icon=t1===void 0?CircleAlert:t1,qdsContext=useQdsFieldGroupContext(),mergedProps=mergeProps(qdsContext.getErrorTextBindings(),props);return jsxs(PolymorphicElement,{as:"div",...mergedProps,children:[jsx(IconOrNode,{icon}),children]})}import{jsx as jsx2}from"react/jsx-runtime";import{PolymorphicElement as PolymorphicElement2}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps2}from"@qualcomm-ui/utils/merge-props";function FieldGroupHint(t0){let{children,...props}=t0,qdsContext=useQdsFieldGroupContext(),mergedProps=mergeProps2(qdsContext.getHintBindings(),props);return jsx2(PolymorphicElement2,{as:"div",...mergedProps,children})}import{jsx as jsx3}from"react/jsx-runtime";import{PolymorphicElement as PolymorphicElement3}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps3}from"@qualcomm-ui/utils/merge-props";function FieldGroupItems(t0){let{children,...props}=t0,qdsContext=useQdsFieldGroupContext(),mergedProps=mergeProps3(qdsContext.getItemsBindings(),props);return jsx3(PolymorphicElement3,{as:"div",...mergedProps,children})}import{jsx as jsx4}from"react/jsx-runtime";import{PolymorphicElement as PolymorphicElement4}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps4}from"@qualcomm-ui/utils/merge-props";function FieldGroupLabel(t0){let{children,...props}=t0,qdsContext=useQdsFieldGroupContext(),mergedProps=mergeProps4(qdsContext.getLabelBindings(),props);return jsx4(PolymorphicElement4,{as:"legend",...mergedProps,children})}import{c as _c}from"react/compiler-runtime";import{jsx as jsx5}from"react/jsx-runtime";import"react";import{createQdsFieldGroupApi}from"@qualcomm-ui/qds-core/field-group";import{normalizeProps}from"@qualcomm-ui/react-core/machine";import{PolymorphicElement as PolymorphicElement5}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps5}from"@qualcomm-ui/utils/merge-props";function FieldGroupRoot(t0){let $=_c(7),t1;if($[0]!==t0){let{children,indented,invalid,orientation,size,...props}=t0,t2;$[2]!==indented||$[3]!==invalid||$[4]!==orientation||$[5]!==size?(t2=createQdsFieldGroupApi({indented,invalid,orientation,size},normalizeProps),$[2]=indented,$[3]=invalid,$[4]=orientation,$[5]=size,$[6]=t2):t2=$[6];let qdsContext=t2,mergedProps=mergeProps5(qdsContext.getRootBindings(),props);t1=jsx5(QdsFieldGroupContextProvider,{value:qdsContext,children:jsx5(PolymorphicElement5,{as:"fieldset",...mergedProps,children})}),$[0]=t0,$[1]=t1}else t1=$[1];return t1}export{FieldGroupErrorText,FieldGroupHint,FieldGroupItems,FieldGroupLabel,FieldGroupRoot,QdsFieldGroupContextProvider,useQdsFieldGroupContext};
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/field-group/qds-field-group-context.ts", "../../src/field-group/field-group-error-text.tsx", "../../src/field-group/field-group-hint.tsx", "../../src/field-group/field-group-items.tsx", "../../src/field-group/field-group-label.tsx", "../../src/field-group/field-group-root.tsx"],
|
|
4
|
+
"sourcesContent": ["import { createGuardedContext } from \"@qualcomm-ui/react-core/context\";\nexport const [QdsFieldGroupContextProvider, useQdsFieldGroupContext] = createGuardedContext({\n hookName: \"useQdsFieldGroupContext\",\n providerName: \"<QdsFieldGroupContextProvider>\",\n strict: false\n});", "import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { CircleAlert } from \"lucide-react\";\nimport { IconOrNode } from \"@qualcomm-ui/react/icon\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsFieldGroupContext } from \"./qds-field-group-context\";\nexport function FieldGroupErrorText(t0) {\n const {\n children,\n icon: t1,\n ...props\n } = t0;\n const icon = t1 === undefined ? CircleAlert : t1;\n const qdsContext = useQdsFieldGroupContext();\n const mergedProps = mergeProps(qdsContext.getErrorTextBindings(), props);\n return jsxs(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children: [jsx(IconOrNode, {\n icon\n }), children]\n });\n}", "import { jsx } from \"react/jsx-runtime\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsFieldGroupContext } from \"./qds-field-group-context\";\nexport function FieldGroupHint(t0) {\n const {\n children,\n ...props\n } = t0;\n const qdsContext = useQdsFieldGroupContext();\n const mergedProps = mergeProps(qdsContext.getHintBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n });\n}", "import { jsx } from \"react/jsx-runtime\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsFieldGroupContext } from \"./qds-field-group-context\";\nexport function FieldGroupItems(t0) {\n const {\n children,\n ...props\n } = t0;\n const qdsContext = useQdsFieldGroupContext();\n const mergedProps = mergeProps(qdsContext.getItemsBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n });\n}", "import { jsx } from \"react/jsx-runtime\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsFieldGroupContext } from \"./qds-field-group-context\";\nexport function FieldGroupLabel(t0) {\n const {\n children,\n ...props\n } = t0;\n const qdsContext = useQdsFieldGroupContext();\n const mergedProps = mergeProps(qdsContext.getLabelBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"legend\",\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 { createQdsFieldGroupApi } from \"@qualcomm-ui/qds-core/field-group\";\nimport { normalizeProps } from \"@qualcomm-ui/react-core/machine\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { QdsFieldGroupContextProvider } from \"./qds-field-group-context\";\nexport function FieldGroupRoot(t0) {\n const $ = _c(7);\n let t1;\n if ($[0] !== t0) {\n const {\n children,\n indented,\n invalid,\n orientation,\n size,\n ...props\n } = t0;\n let t2;\n if ($[2] !== indented || $[3] !== invalid || $[4] !== orientation || $[5] !== size) {\n t2 = createQdsFieldGroupApi({\n indented,\n invalid,\n orientation,\n size\n }, normalizeProps);\n $[2] = indented;\n $[3] = invalid;\n $[4] = orientation;\n $[5] = size;\n $[6] = t2;\n } else {\n t2 = $[6];\n }\n const qdsContext = t2;\n const mergedProps = mergeProps(qdsContext.getRootBindings(), props);\n t1 = jsx(QdsFieldGroupContextProvider, {\n value: qdsContext,\n children: jsx(PolymorphicElement, {\n as: \"fieldset\",\n ...mergedProps,\n children\n })\n });\n $[0] = t0;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n return t1;\n}"],
|
|
5
|
+
"mappings": ";AAAA,OAAS,yBAA4B,kCAC9B,GAAM,CAAC,6BAA8B,uBAAuB,EAAI,qBAAqB,CAC1F,SAAU,0BACV,aAAc,iCACd,OAAQ,EACV,CAAC,ECLD,OAAS,IAAK,SAAY,oBAC1B,OAAS,gBAAmB,eAC5B,OAAS,eAAkB,0BAC3B,OA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yBACxB,OAAS,OAAAC,SAAW,oBACpB,MAAwB,QACxB,OAAS,2BAA8B,oCACvC,OAAS,mBAAsB,kCAC/B,OAAS,sBAAAC,wBAA0B,iCACnC,OAAS,cAAAC,gBAAkB,iCAEpB,SAAS,eAAe,GAAI,CACjC,IAAM,EAAI,GAAG,CAAC,EACV,GACJ,GAAI,EAAE,CAAC,IAAM,GAAI,CACf,GAAM,CACJ,SACA,SACA,QACA,YACA,KACA,GAAG,KACL,EAAI,GACA,GACA,EAAE,CAAC,IAAM,UAAY,EAAE,CAAC,IAAM,SAAW,EAAE,CAAC,IAAM,aAAe,EAAE,CAAC,IAAM,MAC5E,GAAK,uBAAuB,CAC1B,SACA,QACA,YACA,IACF,EAAG,cAAc,EACjB,EAAE,CAAC,EAAI,SACP,EAAE,CAAC,EAAI,QACP,EAAE,CAAC,EAAI,YACP,EAAE,CAAC,EAAI,KACP,EAAE,CAAC,EAAI,IAEP,GAAK,EAAE,CAAC,EAEV,IAAM,WAAa,GACb,YAAcC,YAAW,WAAW,gBAAgB,EAAG,KAAK,EAClE,GAAKC,KAAI,6BAA8B,CACrC,MAAO,WACP,SAAUA,KAAIC,oBAAoB,CAChC,GAAI,WACJ,GAAG,YACH,QACF,CAAC,CACH,CAAC,EACD,EAAE,CAAC,EAAI,GACP,EAAE,CAAC,EAAI,EACT,MACE,GAAK,EAAE,CAAC,EAEV,OAAO,EACT",
|
|
6
|
+
"names": ["jsx", "PolymorphicElement", "mergeProps", "mergeProps", "jsx", "PolymorphicElement", "jsx", "PolymorphicElement", "mergeProps", "mergeProps", "jsx", "PolymorphicElement", "jsx", "PolymorphicElement", "mergeProps", "mergeProps", "jsx", "PolymorphicElement", "jsx", "PolymorphicElement", "mergeProps", "mergeProps", "jsx", "PolymorphicElement"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { QdsFieldGroupApi } from "@qualcomm-ui/qds-core/field-group";
|
|
2
|
+
export declare const QdsFieldGroupContextProvider: import("react").Provider<QdsFieldGroupApi>, useQdsFieldGroupContext: (requireContext?: boolean) => QdsFieldGroupApi;
|
|
3
|
+
//# sourceMappingURL=qds-field-group-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qds-field-group-context.d.ts","sourceRoot":"","sources":["../../src/field-group/qds-field-group-context.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAA;AAGvE,eAAO,MAAO,4BAA4B,8CAAE,uBAAuB,gDAK/D,CAAA"}
|
package/dist/switch/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx as jsx8,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{InputHint}from"@qualcomm-ui/react/input";import{useSwitchHint}from"@qualcomm-ui/react-core/switch";import{mergeProps as mergeProps5}from"@qualcomm-ui/utils/merge-props";function SwitchHint(t0){let $=_c3(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useSwitchHint(t1),qdsContext=useQdsSwitchContext(),mergedProps=mergeProps5(contextProps,qdsContext.getHintBindings(),props);return jsx5(InputHint,{...mergedProps,children})}import{c as _c4}from"react/compiler-runtime";import{jsx as jsx6}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 mergeProps6}from"@qualcomm-ui/utils/merge-props";function SwitchLabel(t0){let $=_c4(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useSwitchLabel(t1),qdsContext=useQdsSwitchContext(),mergedProps=mergeProps6(contextProps,qdsContext.getLabelBindings(),props);return jsx6(PolymorphicElement3,{as:"span",...mergedProps,children})}import{c as _c5}from"react/compiler-runtime";import{jsx as jsx7}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 mergeProps7}from"@qualcomm-ui/utils/merge-props";function SwitchRoot(t0){let $=_c5(2),{children,id,size,...props}=t0,[switchProps,localProps]=splitSwitchProps(props),context=useSwitch(switchProps),t1;$[0]!==
|
|
2
|
+
import{jsx as jsx8,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{InputHint}from"@qualcomm-ui/react/input";import{useSwitchHint}from"@qualcomm-ui/react-core/switch";import{mergeProps as mergeProps5}from"@qualcomm-ui/utils/merge-props";function SwitchHint(t0){let $=_c3(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useSwitchHint(t1),qdsContext=useQdsSwitchContext(),mergedProps=mergeProps5(contextProps,qdsContext.getHintBindings(),props);return jsx5(InputHint,{...mergedProps,children})}import{c as _c4}from"react/compiler-runtime";import{jsx as jsx6}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 mergeProps6}from"@qualcomm-ui/utils/merge-props";function SwitchLabel(t0){let $=_c4(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useSwitchLabel(t1),qdsContext=useQdsSwitchContext(),mergedProps=mergeProps6(contextProps,qdsContext.getLabelBindings(),props);return jsx6(PolymorphicElement3,{as:"span",...mergedProps,children})}import{c as _c5}from"react/compiler-runtime";import{jsx as jsx7}from"react/jsx-runtime";import"react";import{splitSwitchProps}from"@qualcomm-ui/core/switch";import{createQdsSwitchApi}from"@qualcomm-ui/qds-core/switch";import{useQdsFieldGroupContext}from"@qualcomm-ui/react/field-group";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 mergeProps7}from"@qualcomm-ui/utils/merge-props";function SwitchRoot(t0){let $=_c5(2),{children,id,size,...props}=t0,[switchProps,localProps]=splitSwitchProps(props),context=useSwitch(switchProps),groupContext=useQdsFieldGroupContext(),groupSize=size??groupContext?.size,t1;$[0]!==groupSize?(t1=createQdsSwitchApi({size:groupSize},normalizeProps),$[0]=groupSize,$[1]=t1):t1=$[1];let qdsContext=t1,mergedProps=mergeProps7(context.getRootBindings({id:useControlledId(id)}),qdsContext.getRootBindings(),localProps);return jsx7(SwitchContextProvider,{value:context,children:jsx7(QdsSwitchContextProvider,{value:qdsContext,children:jsx7(PolymorphicElement4,{as:"label",...mergedProps,children})})})}function Switch(t0){let{"aria-label":ariaLabel,"aria-labelledby":ariaLabelledBy,controlProps,errorText,errorTextProps,hiddenInputProps:hiddenInputPropsProp,hint,hintProps,label,labelProps,thumbProps,...props}=t0,labelContent=label||labelProps?.children,errorTextContent=errorText||errorTextProps?.children,hintContent=hint||hintProps?.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),hint:useOptionalContentId(hintContent,hintProps),label:useOptionalContentId(labelContent,labelProps),root:useControlledId2(props.id),...props.ids};return jsxs(SwitchRoot,{...props,ids,children:[jsx8(SwitchHiddenInput,{...hiddenInputProps,id:ids.hiddenInput}),jsx8(SwitchControl,{...controlProps,children:jsx8(SwitchThumb,{...thumbProps})}),labelContent?jsx8(SwitchLabel,{...labelProps,id:ids.label,children:labelContent}):null,hintContent?jsx8(SwitchHint,{...hintProps,id:ids.hint,children:hintContent}):null,errorTextContent?jsx8(SwitchErrorText,{...errorTextProps,id:ids.errorText,children:errorTextContent}):null]})}var Switch2=Switch;Switch2.Control=SwitchControl;Switch2.ErrorText=SwitchErrorText;Switch2.HiddenInput=SwitchHiddenInput;Switch2.Hint=SwitchHint;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-hint.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 { SwitchHint } from \"./switch-hint\";\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 hint,\n hintProps,\n label,\n labelProps,\n thumbProps,\n ...props\n } = t0;\n const labelContent = label || labelProps?.children;\n const errorTextContent = errorText || errorTextProps?.children;\n const hintContent = hint || hintProps?.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 hint: useOptionalContentId(hintContent, hintProps),\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, hintContent ? jsx(SwitchHint, {\n ...hintProps,\n id: ids.hint,\n children: hintContent\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 { InputHint } from \"@qualcomm-ui/react/input\";\nimport { useSwitchHint } from \"@qualcomm-ui/react-core/switch\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsSwitchContext } from \"./qds-switch-context\";\nexport function SwitchHint(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 = useSwitchHint(t1);\n const qdsContext = useQdsSwitchContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getHintBindings(), 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 { 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] !==
|
|
5
|
-
"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B,OAAS,OAAAC,SAAW,oBACpB,OAAS,mBAAsB,iCAC/B,OAAS,sBAAAC,wBAA0B,iCACnC,OAAS,cAAAC,gBAAkB,iCAEpB,SAAS,YAAY,GAAI,CAC9B,IAAM,EAAIC,IAAG,CAAC,EACR,CACJ,SACA,GACA,GAAG,KACL,EAAI,GACA,GACA,EAAE,CAAC,IAAM,IACX,GAAK,CACH,EACF,EACA,EAAE,CAAC,EAAI,GACP,EAAE,CAAC,EAAI,IAEP,GAAK,EAAE,CAAC,EAEV,IAAM,aAAe,eAAe,EAAE,EAChC,WAAa,oBAAoB,EACjC,YAAcC,YAAW,aAAc,WAAW,iBAAiB,EAAG,KAAK,EACjF,OAAOC,KAAIC,oBAAoB,CAC7B,GAAI,OACJ,GAAG,YACH,QACF,CAAC,CACH,CC/BA,OAAS,KAAKC,QAAU,yBACxB,OAAS,OAAAC,SAAW,oBACpB,MAAwB,QACxB,OAAS,qBAAwB,2BACjC,OAAS,uBAA0B,+BACnC,OAAS,mBAAsB,kCAC/B,OAAS,oBAAuB,gCAChC,OAAS,sBAAuB,cAAiB,iCACjD,OAAS,sBAAAC,wBAA0B,iCACnC,OAAS,cAAAC,gBAAkB,iCAEpB,SAAS,WAAW,GAAI,CAC7B,IAAM,EAAIC,IAAG,CAAC,EACR,CACJ,SACA,GACA,KACA,GAAG,KACL,EAAI,GACE,CAAC,YAAa,UAAU,EAAI,iBAAiB,KAAK,EAClD,QAAU,UAAU,WAAW,
|
|
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 { SwitchHint } from \"./switch-hint\";\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 hint,\n hintProps,\n label,\n labelProps,\n thumbProps,\n ...props\n } = t0;\n const labelContent = label || labelProps?.children;\n const errorTextContent = errorText || errorTextProps?.children;\n const hintContent = hint || hintProps?.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 hint: useOptionalContentId(hintContent, hintProps),\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, hintContent ? jsx(SwitchHint, {\n ...hintProps,\n id: ids.hint,\n children: hintContent\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 { InputHint } from \"@qualcomm-ui/react/input\";\nimport { useSwitchHint } from \"@qualcomm-ui/react-core/switch\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsSwitchContext } from \"./qds-switch-context\";\nexport function SwitchHint(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 = useSwitchHint(t1);\n const qdsContext = useQdsSwitchContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getHintBindings(), 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 { 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 { useQdsFieldGroupContext } from \"@qualcomm-ui/react/field-group\";\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 const groupContext = useQdsFieldGroupContext();\n const groupSize = size ?? groupContext?.size;\n let t1;\n if ($[0] !== groupSize) {\n t1 = createQdsSwitchApi({\n size: groupSize\n }, normalizeProps);\n $[0] = groupSize;\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 { SwitchHint } from \"./switch-hint\";\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.Hint = SwitchHint;\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,KAAI,YAAa,CAAC,CAAC,EAAI,GACrD,aAAe,iBAAiB,EAChC,WAAa,oBAAoB,EACjC,YAAcC,YAAW,aAAc,WAAW,mBAAmB,EAAG,KAAK,EACnF,OAAO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rB,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,YAAcA,KAAI,WAAY,CACvC,GAAG,UACH,GAAI,IAAI,KACR,SAAU,WACZ,CAAC,EAAI,KAAM,iBAAmBA,KAAI,gBAAiB,CACjD,GAAG,eACH,GAAI,IAAI,UACR,SAAU,gBACZ,CAAC,EAAI,IAAI,CACX,CAAC,CACH,CS7DO,IAAMC,QAAS,OACtBA,QAAO,QAAU,cACjBA,QAAO,UAAY,gBACnBA,QAAO,YAAc,kBACrBA,QAAO,KAAO,WACdA,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", "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
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch-root.d.ts","sourceRoot":"","sources":["../../src/switch/switch-root.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,YAAY,EAAE,KAAK,SAAS,EAAU,MAAM,OAAO,CAAA;AAEhE,OAAO,EAAmB,KAAK,cAAc,EAAC,MAAM,0BAA0B,CAAA;AAC9E,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"switch-root.d.ts","sourceRoot":"","sources":["../../src/switch/switch-root.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,YAAY,EAAE,KAAK,SAAS,EAAU,MAAM,OAAO,CAAA;AAEhE,OAAO,EAAmB,KAAK,cAAc,EAAC,MAAM,0BAA0B,CAAA;AAC9E,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,8BAA8B,CAAA;AAKrC,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,gCAAgC,CAAA;AAKvC,MAAM,WAAW,eACf,SAAQ,cAAc,EACpB,iBAAiB,EACjB,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC;IACzC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,EAAE,EACF,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,eAAe,GAAG,YAAY,CA0BhC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/switch-group/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,KAAK,gBAAgB,EAAC,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx,jsxs}from"react/jsx-runtime";import{FieldGroupErrorText,FieldGroupHint,FieldGroupItems,FieldGroupLabel,FieldGroupRoot}from"@qualcomm-ui/react/field-group";function SwitchGroup({children,errorText,hint,label,...props}){let showHint=!!hint&&!props.invalid,showError=!!errorText&&props.invalid;return jsxs(FieldGroupRoot,{...props,children:[label&&jsx(FieldGroupLabel,{children:label}),jsx(FieldGroupItems,{children}),showHint&&jsx(FieldGroupHint,{children:hint}),showError&&jsx(FieldGroupErrorText,{children:errorText})]})}SwitchGroup.Root=FieldGroupRoot;SwitchGroup.Label=FieldGroupLabel;SwitchGroup.Items=FieldGroupItems;SwitchGroup.Hint=FieldGroupHint;SwitchGroup.ErrorText=FieldGroupErrorText;export{SwitchGroup};
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/switch-group/switch-group.tsx"],
|
|
4
|
+
"sourcesContent": ["import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { FieldGroupErrorText, FieldGroupHint, FieldGroupItems, FieldGroupLabel, FieldGroupRoot } from \"@qualcomm-ui/react/field-group\";\nexport function SwitchGroup({\n children,\n errorText,\n hint,\n label,\n ...props\n}) {\n const showHint = Boolean(hint) && !props.invalid;\n const showError = Boolean(errorText) && props.invalid;\n return /* @__PURE__ */jsxs(FieldGroupRoot, {\n ...props,\n children: [label && /* @__PURE__ */jsx(FieldGroupLabel, {\n children: label\n }), /* @__PURE__ */jsx(FieldGroupItems, {\n children\n }), showHint && /* @__PURE__ */jsx(FieldGroupHint, {\n children: hint\n }), showError && /* @__PURE__ */jsx(FieldGroupErrorText, {\n children: errorText\n })]\n });\n}\nSwitchGroup.Root = FieldGroupRoot;\nSwitchGroup.Label = FieldGroupLabel;\nSwitchGroup.Items = FieldGroupItems;\nSwitchGroup.Hint = FieldGroupHint;\nSwitchGroup.ErrorText = FieldGroupErrorText;"],
|
|
5
|
+
"mappings": ";AAAA,OAAS,IAAK,SAAY,oBAC1B,OAAS,oBAAqB,eAAgB,gBAAiB,gBAAiB,mBAAsB,iCAC/F,SAAS,YAAY,CAC1B,SACA,UACA,KACA,MACA,GAAG,KACL,EAAG,CACD,IAAM,SAAW,EAAQ,MAAS,CAAC,MAAM,QACnC,UAAY,EAAQ,WAAc,MAAM,QAC9C,OAAsB,KAAK,eAAgB,CACzC,GAAG,MACH,SAAU,CAAC,OAAwB,IAAI,gBAAiB,CACtD,SAAU,KACZ,CAAC,EAAkB,IAAI,gBAAiB,CACtC,QACF,CAAC,EAAG,UAA2B,IAAI,eAAgB,CACjD,SAAU,IACZ,CAAC,EAAG,WAA4B,IAAI,oBAAqB,CACvD,SAAU,SACZ,CAAC,CAAC,CACJ,CAAC,CACH,CACA,YAAY,KAAO,eACnB,YAAY,MAAQ,gBACpB,YAAY,MAAQ,gBACpB,YAAY,KAAO,eACnB,YAAY,UAAY",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from "react";
|
|
2
|
+
import { FieldGroupErrorText, FieldGroupHint, FieldGroupItems, FieldGroupLabel, FieldGroupRoot, type FieldGroupRootProps } from "@qualcomm-ui/react/field-group";
|
|
3
|
+
export interface SwitchGroupProps extends FieldGroupRootProps {
|
|
4
|
+
/**
|
|
5
|
+
* React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.
|
|
6
|
+
*/
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Error message displayed when invalid.
|
|
10
|
+
*/
|
|
11
|
+
errorText?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Helper text displayed below items.
|
|
14
|
+
*/
|
|
15
|
+
hint?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Group label text.
|
|
18
|
+
*/
|
|
19
|
+
label?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Groups multiple switches with a label, hint, and error text.
|
|
23
|
+
*/
|
|
24
|
+
export declare function SwitchGroup({ children, errorText, hint, label, ...props }: SwitchGroupProps): ReactElement;
|
|
25
|
+
export declare namespace SwitchGroup {
|
|
26
|
+
var Root: typeof FieldGroupRoot;
|
|
27
|
+
var Label: typeof FieldGroupLabel;
|
|
28
|
+
var Items: typeof FieldGroupItems;
|
|
29
|
+
var Hint: typeof FieldGroupHint;
|
|
30
|
+
var ErrorText: typeof FieldGroupErrorText;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=switch-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch-group.d.ts","sourceRoot":"","sources":["../../src/switch-group/switch-group.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAA;AAElD,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,eAAe,EACf,cAAc,EACd,KAAK,mBAAmB,EACzB,MAAM,gCAAgC,CAAA;AAEvC,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAA;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,KAAK,EACL,GAAG,KAAK,EACT,EAAE,gBAAgB,GAAG,YAAY,CAYjC;yBAlBe,WAAW"}
|