@qualcomm-ui/react 1.22.2 → 1.23.1
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/accordion/index.js +2 -3
- package/dist/accordion/index.js.map +1 -7
- package/dist/action-group/index.js +2 -3
- package/dist/action-group/index.js.map +1 -7
- package/dist/alert-banner/index.js +2 -3
- package/dist/alert-banner/index.js.map +1 -7
- package/dist/avatar/index.js +2 -3
- package/dist/avatar/index.js.map +1 -7
- package/dist/badge/index.js +2 -3
- package/dist/badge/index.js.map +1 -7
- package/dist/breadcrumbs/index.js +2 -3
- package/dist/breadcrumbs/index.js.map +1 -7
- package/dist/button/index.js +2 -3
- package/dist/button/index.js.map +1 -7
- package/dist/card/index.js +2 -3
- package/dist/card/index.js.map +1 -7
- package/dist/checkbox/index.js +2 -3
- package/dist/checkbox/index.js.map +1 -7
- package/dist/checkbox-group/index.js +2 -3
- package/dist/checkbox-group/index.js.map +1 -7
- package/dist/checkmark/index.js +2 -3
- package/dist/checkmark/index.js.map +1 -7
- package/dist/collapsible/index.js +2 -3
- package/dist/collapsible/index.js.map +1 -7
- package/dist/combobox/index.js +2 -3
- package/dist/combobox/index.js.map +1 -7
- package/dist/dialog/index.js +2 -3
- package/dist/dialog/index.js.map +1 -7
- package/dist/divider/index.js +2 -3
- package/dist/divider/index.js.map +1 -7
- package/dist/drawer/index.js +2 -3
- package/dist/drawer/index.js.map +1 -7
- package/dist/field-group/index.js +2 -3
- package/dist/field-group/index.js.map +1 -7
- package/dist/file-input/index.js +2 -3
- package/dist/file-input/index.js.map +1 -7
- package/dist/file-upload/index.js +2 -3
- package/dist/file-upload/index.js.map +1 -7
- package/dist/footer/index.js +1 -2
- package/dist/header-bar/index.js +2 -3
- package/dist/header-bar/index.js.map +1 -7
- package/dist/icon/index.js +2 -3
- package/dist/icon/index.js.map +1 -7
- package/dist/inline-icon-button/index.js +2 -3
- package/dist/inline-icon-button/index.js.map +1 -7
- package/dist/inline-notification/index.js +2 -3
- package/dist/inline-notification/index.js.map +1 -7
- package/dist/input/index.js +2 -3
- package/dist/input/index.js.map +1 -7
- package/dist/kbd/index.js +2 -3
- package/dist/kbd/index.js.map +1 -7
- package/dist/link/index.js +2 -3
- package/dist/link/index.js.map +1 -7
- package/dist/menu/index.js +2 -3
- package/dist/menu/index.js.map +1 -7
- package/dist/menu/menu-button.d.ts +1 -1
- package/dist/menu/menu-button.d.ts.map +1 -1
- package/dist/menu/menu-icon-button.d.ts.map +1 -1
- package/dist/menu/menu-root.d.ts.map +1 -1
- package/dist/number-input/index.js +2 -3
- package/dist/number-input/index.js.map +1 -7
- package/dist/pagination/index.js +2 -3
- package/dist/pagination/index.js.map +1 -7
- package/dist/password-input/index.js +2 -3
- package/dist/password-input/index.js.map +1 -7
- package/dist/popover/index.js +2 -3
- package/dist/popover/index.js.map +1 -7
- package/dist/progress/index.js +2 -3
- package/dist/progress/index.js.map +1 -7
- package/dist/progress-ring/index.js +2 -3
- package/dist/progress-ring/index.js.map +1 -7
- package/dist/qds-theme/index.js +2 -3
- package/dist/qds-theme/index.js.map +1 -7
- package/dist/qui-root/index.js +2 -3
- package/dist/qui-root/index.js.map +1 -7
- package/dist/radio/index.js +2 -3
- package/dist/radio/index.js.map +1 -7
- package/dist/segmented-control/index.js +2 -3
- package/dist/segmented-control/index.js.map +1 -7
- package/dist/select/index.js +2 -3
- package/dist/select/index.js.map +1 -7
- package/dist/side-nav/index.js +2 -3
- package/dist/side-nav/index.js.map +1 -7
- package/dist/slider/index.js +2 -3
- package/dist/slider/index.js.map +1 -7
- package/dist/stepper/index.js +2 -3
- package/dist/stepper/index.js.map +1 -7
- package/dist/stepper/stepper-completed-content.d.ts +2 -1
- package/dist/stepper/stepper-completed-content.d.ts.map +1 -1
- package/dist/switch/index.js +2 -3
- package/dist/switch/index.js.map +1 -7
- package/dist/switch-group/index.js +2 -3
- package/dist/switch-group/index.js.map +1 -7
- package/dist/table/index.js +2 -3
- package/dist/table/index.js.map +1 -7
- package/dist/tabs/index.js +2 -3
- package/dist/tabs/index.js.map +1 -7
- package/dist/tag/index.js +2 -3
- package/dist/tag/index.js.map +1 -7
- package/dist/text-area/index.js +2 -3
- package/dist/text-area/index.js.map +1 -7
- package/dist/text-input/index.js +2 -3
- package/dist/text-input/index.js.map +1 -7
- package/dist/toast/index.js +2 -3
- package/dist/toast/index.js.map +1 -7
- package/dist/tooltip/index.js +2 -3
- package/dist/tooltip/index.js.map +1 -7
- package/dist/tree/index.js +2 -3
- package/dist/tree/index.js.map +1 -7
- package/dist/tsbuildinfo +1 -1
- package/package.json +5 -5
- package/dist/footer/index.js.map +0 -7
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/text-area/text-area.tsx", "../../src/text-area/text-area-counter.tsx", "../../src/text-area/qds-text-area-context.ts", "../../src/text-area/text-area-error-text.tsx", "../../src/text-area/text-area-hint.tsx", "../../src/text-area/text-area-input.tsx", "../../src/text-area/text-area-label.tsx", "../../src/text-area/text-area-root.tsx", "../../src/text-area/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 { TextAreaCounter } from \"./text-area-counter\";\nimport { TextAreaErrorText } from \"./text-area-error-text\";\nimport { TextAreaHint } from \"./text-area-hint\";\nimport { TextAreaInput } from \"./text-area-input\";\nimport { TextAreaLabel } from \"./text-area-label\";\nimport { TextAreaRoot } from \"./text-area-root\";\nexport function TextArea(t0) {\n const {\n counter,\n counterProps,\n errorText,\n errorTextProps,\n hint,\n hintProps,\n inputProps,\n label,\n labelProps,\n maxLength,\n placeholder,\n ...props\n } = t0;\n const labelContent = label || labelProps?.children;\n const errorTextContent = errorText || errorTextProps?.children;\n const hintContent = hint || hintProps?.children;\n const ids = {\n counter: useControlledId(counterProps?.id),\n errorText: useOptionalContentId(errorTextContent, errorTextProps),\n hint: useOptionalContentId(hintContent, hintProps),\n input: useControlledId(inputProps?.id),\n label: useOptionalContentId(labelContent, labelProps),\n ...props.ids\n };\n return jsxs(TextAreaRoot, {\n ...props,\n ids,\n maxLength,\n children: [labelContent ? jsx(TextAreaLabel, {\n ...labelProps,\n id: ids.label,\n children: labelContent\n }) : null, counter ?? maxLength !== void 0 ? jsx(TextAreaCounter, {\n ...counterProps\n }) : null, jsx(TextAreaInput, {\n maxLength,\n placeholder,\n ...inputProps,\n id: ids.input\n }), hintContent ? jsx(TextAreaHint, {\n ...hintProps,\n id: ids.hint,\n children: hintContent\n }) : null, errorTextContent ? jsx(TextAreaErrorText, {\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 { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { useTextAreaContext, useTextAreaCounter } from \"@qualcomm-ui/react-core/text-area\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsTextAreaContext } from \"./qds-text-area-context\";\nfunction defaultDisplay(count, maxLength) {\n return maxLength != null ? `${count}/${maxLength}` : count;\n}\nexport function TextAreaCounter(t0) {\n const $ = _c(2);\n const {\n display: t1,\n id,\n ...props\n } = t0;\n const display = t1 === undefined ? defaultDisplay : 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 = useTextAreaCounter(t2);\n const qdsContext = useQdsTextAreaContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getCounterBindings(), props);\n const {\n maxLength,\n value\n } = useTextAreaContext();\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children: display(value.length, maxLength)\n });\n}", "import { createGuardedContext } from \"@qualcomm-ui/react-core/context\";\nexport const [QdsTextAreaContextProvider, useQdsTextAreaContext] = createGuardedContext({\n hookName: \"useQdsTextAreaContext\",\n providerName: \"<QdsTextAreaContextProvider>\",\n strict: true\n});", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { AlertCircle } from \"lucide-react\";\nimport { IconOrNode } from \"@qualcomm-ui/react/icon\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { useTextAreaErrorText } from \"@qualcomm-ui/react-core/text-area\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsTextAreaContext } from \"./qds-text-area-context\";\nexport function TextAreaErrorText(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 = useTextAreaErrorText(t1);\n const qdsContext = useQdsTextAreaContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getErrorTextBindings(), props);\n return jsxs(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children: [jsx(IconOrNode, {\n icon: AlertCircle\n }), children]\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { useTextAreaHint } from \"@qualcomm-ui/react-core/text-area\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsTextAreaContext } from \"./qds-text-area-context\";\nexport function TextAreaHint(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 = useTextAreaHint(t1);\n const qdsContext = useQdsTextAreaContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getHintBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useTextAreaInput } from \"@qualcomm-ui/react-core/text-area\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsTextAreaContext } from \"./qds-text-area-context\";\nexport function TextAreaInput(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 = useTextAreaInput(t1);\n const qdsContext = useQdsTextAreaContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getInputBindings(), props);\n return jsx(\"textarea\", {\n ...mergedProps\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { Asterisk } from \"lucide-react\";\nimport { Icon } from \"@qualcomm-ui/react/icon\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { useTextAreaContext, useTextAreaLabel } from \"@qualcomm-ui/react-core/text-area\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsTextAreaContext } from \"./qds-text-area-context\";\nexport function TextAreaLabel(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 = useTextAreaLabel(t1);\n const qdsContext = useQdsTextAreaContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getLabelBindings(), props);\n const {\n required\n } = useTextAreaContext();\n return jsxs(PolymorphicElement, {\n as: \"label\",\n ...mergedProps,\n children: [children, required ? jsx(Icon, {\n ...qdsContext.getRequiredIndicatorBindings(),\n icon: Asterisk,\n size: \"xs\"\n }) : null]\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useMemo } from \"react\";\nimport { splitTextAreaProps } from \"@qualcomm-ui/core/text-area\";\nimport { createQdsTextAreaApi } from \"@qualcomm-ui/qds-core/text-area\";\nimport { normalizeProps } from \"@qualcomm-ui/react-core/machine\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { TextAreaContextProvider, useTextArea } from \"@qualcomm-ui/react-core/text-area\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { QdsTextAreaContextProvider } from \"./qds-text-area-context\";\nexport function TextAreaRoot(t0) {\n const $ = _c(2);\n const {\n children,\n size,\n ...props\n } = t0;\n const [textAreaProps, localProps] = splitTextAreaProps(props);\n const context = useTextArea(textAreaProps);\n let t1;\n if ($[0] !== size) {\n t1 = createQdsTextAreaApi({\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(), qdsContext.getRootBindings(), localProps);\n return jsx(TextAreaContextProvider, {\n value: context,\n children: jsx(QdsTextAreaContextProvider, {\n value: qdsContext,\n children: jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n })\n })\n });\n}", "import { TextArea as SimpleTextArea } from \"./text-area\";\nimport { TextAreaCounter } from \"./text-area-counter\";\nimport { TextAreaErrorText } from \"./text-area-error-text\";\nimport { TextAreaHint } from \"./text-area-hint\";\nimport { TextAreaInput } from \"./text-area-input\";\nimport { TextAreaLabel } from \"./text-area-label\";\nimport { TextAreaRoot } from \"./text-area-root\";\nexport const TextArea = SimpleTextArea;\nTextArea.Counter = TextAreaCounter;\nTextArea.ErrorText = TextAreaErrorText;\nTextArea.Hint = TextAreaHint;\nTextArea.Input = TextAreaInput;\nTextArea.Label = TextAreaLabel;\nTextArea.Root = TextAreaRoot;"],
|
|
5
|
-
"mappings": ";AAAA,OAAS,OAAAA,KAAK,QAAAC,UAAY,oBAC1B,OAAS,yBAA4B,kCACrC,OAAS,oBAAuB,gCCFhC,OAAS,KAAK,OAAU,yBACxB,OAAS,QAAW,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,UAAS,KAAO",
|
|
6
|
-
"names": ["jsx", "jsxs", "_c", "jsx", "PolymorphicElement", "mergeProps", "_c", "mergeProps", "PolymorphicElement", "jsx", "_c", "jsx", "PolymorphicElement", "mergeProps", "_c", "mergeProps", "jsx", "PolymorphicElement", "_c", "jsx", "mergeProps", "_c", "mergeProps", "jsx", "_c", "jsx", "jsxs", "PolymorphicElement", "useTextAreaContext", "mergeProps", "_c", "mergeProps", "useTextAreaContext", "jsxs", "PolymorphicElement", "jsx", "_c", "jsx", "PolymorphicElement", "mergeProps", "_c", "mergeProps", "jsx", "PolymorphicElement", "jsxs", "jsx", "TextArea"]
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"index.js","names":["QdsTextAreaApi","createGuardedContext","QdsTextAreaContextProvider","useQdsTextAreaContext","hookName","providerName","strict","ReactElement","ReactNode","ElementRenderProp","PolymorphicElement","useTextAreaContext","useTextAreaCounter","mergeProps","useQdsTextAreaContext","TextAreaCounterProps","display","count","maxLength","defaultDisplay","TextAreaCounter","t0","$","_c","t1","id","props","undefined","t2","contextProps","qdsContext","mergedProps","getCounterBindings","value","t3","length","t4","ReactElement","ReactNode","AlertCircle","IconOrNode","ElementRenderProp","PolymorphicElement","useTextAreaErrorText","mergeProps","useQdsTextAreaContext","TextAreaErrorTextProps","children","TextAreaErrorText","t0","$","_c","id","props","t1","contextProps","qdsContext","mergedProps","getErrorTextBindings","t2","Symbol","for","t3","ReactElement","ReactNode","ElementRenderProp","PolymorphicElement","useTextAreaHint","mergeProps","useQdsTextAreaContext","TextAreaHintProps","children","TextAreaHint","t0","$","_c","id","props","t1","contextProps","qdsContext","mergedProps","getHintBindings","t2","ComponentPropsWithRef","ReactElement","IdProp","useTextAreaInput","mergeProps","useQdsTextAreaContext","TextAreaInputProps","TextAreaInput","t0","$","_c","id","props","t1","contextProps","qdsContext","mergedProps","getInputBindings","t2","ReactElement","ReactNode","Asterisk","Icon","ElementRenderProp","PolymorphicElement","useTextAreaContext","useTextAreaLabel","mergeProps","useQdsTextAreaContext","TextAreaLabelProps","children","TextAreaLabel","t0","$","_c","id","props","t1","contextProps","qdsContext","mergedProps","getLabelBindings","required","t2","getRequiredIndicatorBindings","t3","ReactElement","ReactNode","useMemo","splitTextAreaProps","TextAreaApiProps","createQdsTextAreaApi","QdsTextAreaApiProps","normalizeProps","ElementRenderProp","PolymorphicElement","TextAreaContextProvider","useTextArea","mergeProps","QdsTextAreaContextProvider","TextAreaRootProps","Omit","children","TextAreaRoot","t0","$","_c","size","props","textAreaProps","localProps","context","t1","qdsContext","mergedProps","getRootBindings","t2","t3","t4","ReactElement","ReactNode","useOptionalContentId","useControlledId","TextAreaCounter","TextAreaCounterProps","TextAreaErrorText","TextAreaErrorTextProps","TextAreaHint","TextAreaHintProps","TextAreaInput","TextAreaInputProps","TextAreaLabel","TextAreaLabelProps","TextAreaRoot","TextAreaRootProps","TextAreaProps","children","counter","counterProps","errorText","errorTextProps","hint","hintProps","inputProps","label","labelProps","maxLength","placeholder","TextArea","t0","$","_c","props","labelContent","errorTextContent","hintContent","t1","id","t2","t3","t4","t5","t6","ids","input","t7","t8","undefined","t9","t10","t11","t12","TextArea","SimpleTextArea","TextAreaCounter","TextAreaCounterProps","TextAreaErrorText","TextAreaErrorTextProps","TextAreaHint","TextAreaHintProps","TextAreaInput","TextAreaInputProps","TextAreaLabel","TextAreaLabelProps","TextAreaRoot","TextAreaRootProps","TextAreaComponent","Counter","ErrorText","Hint","Input","Label","Root"],"sources":["../../src/text-area/qds-text-area-context.ts","../../src/text-area/text-area-counter.tsx","../../src/text-area/text-area-error-text.tsx","../../src/text-area/text-area-hint.tsx","../../src/text-area/text-area-input.tsx","../../src/text-area/text-area-label.tsx","../../src/text-area/text-area-root.tsx","../../src/text-area/text-area.tsx","../../src/text-area/index.ts"],"sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {QdsTextAreaApi} from \"@qualcomm-ui/qds-core/text-area\"\nimport {createGuardedContext} from \"@qualcomm-ui/react-core/context\"\n\nexport const [QdsTextAreaContextProvider, useQdsTextAreaContext] =\n createGuardedContext<QdsTextAreaApi>({\n hookName: \"useQdsTextAreaContext\",\n providerName: \"<QdsTextAreaContextProvider>\",\n strict: true,\n })\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement, ReactNode} from \"react\"\n\nimport {\n type ElementRenderProp,\n PolymorphicElement,\n} from \"@qualcomm-ui/react-core/system\"\nimport {\n useTextAreaContext,\n useTextAreaCounter,\n} from \"@qualcomm-ui/react-core/text-area\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {useQdsTextAreaContext} from \"./qds-text-area-context\"\n\nexport interface TextAreaCounterProps extends ElementRenderProp<\"div\"> {\n /**\n * Customize how the counter is displayed. Receives the current character\n * count and optional max length, and returns a React node.\n *\n * @example\n * // Display as \"42 of 100\"\n * display={(count, max) => max ? `${count} of ${max}` : count}\n */\n display?: (count: number, maxLength?: number) => ReactNode\n}\n\nfunction defaultDisplay(count: number, maxLength?: number): ReactNode {\n return maxLength != null ? `${count}/${maxLength}` : count\n}\n\n/**\n * Character counter displayed opposite the textarea label. Renders a `<div>`\n * element by default.\n */\nexport function TextAreaCounter({\n display = defaultDisplay,\n id,\n ...props\n}: TextAreaCounterProps): ReactElement {\n const contextProps = useTextAreaCounter({id})\n const qdsContext = useQdsTextAreaContext()\n\n const mergedProps = mergeProps(\n contextProps,\n qdsContext.getCounterBindings(),\n props,\n )\n\n const {maxLength, value} = useTextAreaContext()\n\n return (\n <PolymorphicElement as=\"div\" {...mergedProps}>\n {display(value.length, maxLength)}\n </PolymorphicElement>\n )\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement, ReactNode} from \"react\"\n\nimport {AlertCircle} from \"lucide-react\"\n\nimport {IconOrNode} from \"@qualcomm-ui/react/icon\"\nimport {\n type ElementRenderProp,\n PolymorphicElement,\n} from \"@qualcomm-ui/react-core/system\"\nimport {useTextAreaErrorText} from \"@qualcomm-ui/react-core/text-area\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {useQdsTextAreaContext} from \"./qds-text-area-context\"\n\nexport interface TextAreaErrorTextProps extends ElementRenderProp<\"div\"> {\n /**\n * React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.\n */\n children?: ReactNode\n}\n\n/**\n * Error message displayed when the textarea is invalid. Renders a `<div>` element by\n * default.\n */\nexport function TextAreaErrorText({\n children,\n id,\n ...props\n}: TextAreaErrorTextProps): ReactElement {\n const contextProps = useTextAreaErrorText({id})\n const qdsContext = useQdsTextAreaContext()\n\n const mergedProps = mergeProps(\n contextProps,\n qdsContext.getErrorTextBindings(),\n props,\n )\n\n return (\n <PolymorphicElement as=\"div\" {...mergedProps}>\n <IconOrNode icon={AlertCircle} />\n {children}\n </PolymorphicElement>\n )\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement, ReactNode} from \"react\"\n\nimport {\n type ElementRenderProp,\n PolymorphicElement,\n} from \"@qualcomm-ui/react-core/system\"\nimport {useTextAreaHint} from \"@qualcomm-ui/react-core/text-area\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {useQdsTextAreaContext} from \"./qds-text-area-context\"\n\nexport interface TextAreaHintProps extends ElementRenderProp<\"div\"> {\n /**\n * React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.\n */\n children?: ReactNode\n}\n\n/**\n * Helper text displayed below the textarea. Renders a `<div>` element by default.\n */\nexport function TextAreaHint({\n children,\n id,\n ...props\n}: TextAreaHintProps): ReactElement {\n const contextProps = useTextAreaHint({id})\n const qdsContext = useQdsTextAreaContext()\n\n const mergedProps = mergeProps(\n contextProps,\n qdsContext.getHintBindings(),\n props,\n )\n\n return (\n <PolymorphicElement as=\"div\" {...mergedProps}>\n {children}\n </PolymorphicElement>\n )\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ComponentPropsWithRef, ReactElement} from \"react\"\n\nimport type {IdProp} from \"@qualcomm-ui/react-core/system\"\nimport {useTextAreaInput} from \"@qualcomm-ui/react-core/text-area\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {useQdsTextAreaContext} from \"./qds-text-area-context\"\n\nexport interface TextAreaInputProps\n extends ComponentPropsWithRef<\"textarea\">, IdProp {}\n\n/**\n * The text area element. Renders a `<textarea>` element.\n */\nexport function TextAreaInput({\n id,\n ...props\n}: TextAreaInputProps): ReactElement {\n const contextProps = useTextAreaInput({id})\n const qdsContext = useQdsTextAreaContext()\n\n const mergedProps = mergeProps(\n contextProps,\n qdsContext.getInputBindings(),\n props,\n )\n\n return <textarea {...mergedProps} />\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement, ReactNode} from \"react\"\n\nimport {Asterisk} from \"lucide-react\"\n\nimport {Icon} from \"@qualcomm-ui/react/icon\"\nimport {\n type ElementRenderProp,\n PolymorphicElement,\n} from \"@qualcomm-ui/react-core/system\"\nimport {\n useTextAreaContext,\n useTextAreaLabel,\n} from \"@qualcomm-ui/react-core/text-area\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {useQdsTextAreaContext} from \"./qds-text-area-context\"\n\nexport interface TextAreaLabelProps extends ElementRenderProp<\"label\"> {\n /**\n * React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.\n */\n children?: ReactNode\n}\n\n/**\n * An accessible label that is automatically associated with the input. Renders a\n * `<label>` element by default.\n */\nexport function TextAreaLabel({\n children,\n id,\n ...props\n}: TextAreaLabelProps): ReactElement {\n const contextProps = useTextAreaLabel({id})\n const qdsContext = useQdsTextAreaContext()\n\n const mergedProps = mergeProps(\n contextProps,\n qdsContext.getLabelBindings(),\n props,\n )\n\n const {required} = useTextAreaContext()\n\n return (\n <PolymorphicElement as=\"label\" {...mergedProps}>\n {children}\n {required ? (\n <Icon\n {...qdsContext.getRequiredIndicatorBindings()}\n icon={Asterisk}\n size=\"xs\"\n />\n ) : null}\n </PolymorphicElement>\n )\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {type ReactElement, type ReactNode, useMemo} from \"react\"\n\nimport {\n splitTextAreaProps,\n type TextAreaApiProps,\n} from \"@qualcomm-ui/core/text-area\"\nimport {\n createQdsTextAreaApi,\n type QdsTextAreaApiProps,\n} from \"@qualcomm-ui/qds-core/text-area\"\nimport {normalizeProps} from \"@qualcomm-ui/react-core/machine\"\nimport {\n type ElementRenderProp,\n PolymorphicElement,\n} from \"@qualcomm-ui/react-core/system\"\nimport {\n TextAreaContextProvider,\n useTextArea,\n} from \"@qualcomm-ui/react-core/text-area\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {QdsTextAreaContextProvider} from \"./qds-text-area-context\"\n\nexport interface TextAreaRootProps\n extends\n TextAreaApiProps,\n QdsTextAreaApiProps,\n Omit<ElementRenderProp<\"div\">, \"dir\" | \"defaultValue\"> {\n /**\n * React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.\n */\n children?: ReactNode\n}\n\n/**\n * Groups all parts of the text-area. Renders a `<div>` element by default.\n */\nexport function TextAreaRoot({\n children,\n size,\n ...props\n}: TextAreaRootProps): ReactElement {\n const [textAreaProps, localProps] = splitTextAreaProps(props)\n const context = useTextArea(textAreaProps)\n\n const qdsContext = useMemo(\n () => createQdsTextAreaApi({size}, normalizeProps),\n [size],\n )\n\n const mergedProps = mergeProps(\n context.getRootBindings(),\n qdsContext.getRootBindings(),\n localProps,\n )\n\n return (\n <TextAreaContextProvider value={context}>\n <QdsTextAreaContextProvider value={qdsContext}>\n <PolymorphicElement as=\"div\" {...mergedProps}>\n {children}\n </PolymorphicElement>\n </QdsTextAreaContextProvider>\n </TextAreaContextProvider>\n )\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement, ReactNode} from \"react\"\n\nimport {useOptionalContentId} from \"@qualcomm-ui/react-core/machine\"\nimport {useControlledId} from \"@qualcomm-ui/react-core/state\"\n\nimport {TextAreaCounter, type TextAreaCounterProps} from \"./text-area-counter\"\nimport {\n TextAreaErrorText,\n type TextAreaErrorTextProps,\n} from \"./text-area-error-text\"\nimport {TextAreaHint, type TextAreaHintProps} from \"./text-area-hint\"\nimport {TextAreaInput, type TextAreaInputProps} from \"./text-area-input\"\nimport {TextAreaLabel, type TextAreaLabelProps} from \"./text-area-label\"\nimport {TextAreaRoot, type TextAreaRootProps} from \"./text-area-root\"\n\nexport interface TextAreaProps extends TextAreaRootProps {\n /**\n * The simple TextArea doesn't support children.\n */\n children?: never\n\n /**\n * Controls whether to display the counter element.\n *\n * - `true`: always show the counter\n * - `false`: never show the counter\n * - `undefined` (default): only show the counter if `maxLength` is set\n */\n counter?: boolean\n\n /**\n * Props applied to the counter element.\n */\n counterProps?: TextAreaCounterProps\n\n /**\n * Optional error that describes the element when {@link invalid} is true.\n */\n errorText?: string\n\n /**\n * Props applied to the error text element.\n */\n errorTextProps?: TextAreaErrorTextProps\n\n /**\n * Optional hint describing the element. This element is automatically\n * associated with the component's textarea element for accessibility.\n */\n hint?: ReactNode\n\n /**\n * Props applied to the hint element.\n */\n hintProps?: TextAreaHintProps\n\n /**\n * Props applied to the textarea element.\n */\n inputProps?: TextAreaInputProps\n\n /**\n * Optional label describing the element. Recommended. This element is\n * automatically associated with the component's input element for\n * accessibility.\n */\n label?: ReactNode\n\n /**\n * Props applied to the label element.\n */\n labelProps?: TextAreaLabelProps\n\n /**\n * HTML {@link https://www.w3schools.com/tags/att_input_maxlength.asp maxlength} attribute,\n * passed to the underlying textarea element.\n */\n maxLength?: number\n\n /**\n * HTML {@link https://www.w3schools.com/tags/att_input_placeholder.asp placeholder} attribute,\n * passed to the underlying textarea element.\n */\n placeholder?: string\n}\n\nexport function TextArea({\n counter,\n counterProps,\n errorText,\n errorTextProps,\n hint,\n hintProps,\n inputProps,\n label,\n labelProps,\n maxLength,\n placeholder,\n ...props\n}: TextAreaProps): ReactElement {\n const labelContent = label || labelProps?.children\n const errorTextContent = errorText || errorTextProps?.children\n const hintContent = hint || hintProps?.children\n\n const ids = {\n counter: useControlledId(counterProps?.id),\n errorText: useOptionalContentId(errorTextContent, errorTextProps),\n hint: useOptionalContentId(hintContent, hintProps),\n input: useControlledId(inputProps?.id),\n label: useOptionalContentId(labelContent, labelProps),\n ...props.ids,\n }\n\n return (\n <TextAreaRoot {...props} ids={ids} maxLength={maxLength}>\n {labelContent ? (\n <TextAreaLabel {...labelProps} id={ids.label}>\n {labelContent}\n </TextAreaLabel>\n ) : null}\n\n {(counter ?? maxLength !== undefined) ? (\n <TextAreaCounter {...counterProps} />\n ) : null}\n\n <TextAreaInput\n maxLength={maxLength}\n placeholder={placeholder}\n {...inputProps}\n id={ids.input}\n />\n\n {hintContent ? (\n <TextAreaHint {...hintProps} id={ids.hint}>\n {hintContent}\n </TextAreaHint>\n ) : null}\n\n {errorTextContent ? (\n <TextAreaErrorText {...errorTextProps} id={ids.errorText}>\n {errorTextContent}\n </TextAreaErrorText>\n ) : null}\n </TextAreaRoot>\n )\n}\n","import {TextArea as SimpleTextArea} from \"./text-area\"\nimport {TextAreaCounter, type TextAreaCounterProps} from \"./text-area-counter\"\nimport {\n TextAreaErrorText,\n type TextAreaErrorTextProps,\n} from \"./text-area-error-text\"\nimport {TextAreaHint, type TextAreaHintProps} from \"./text-area-hint\"\nimport {TextAreaInput, type TextAreaInputProps} from \"./text-area-input\"\nimport {TextAreaLabel, type TextAreaLabelProps} from \"./text-area-label\"\nimport {TextAreaRoot, type TextAreaRootProps} from \"./text-area-root\"\n\nexport type {\n TextAreaRootProps,\n TextAreaLabelProps,\n TextAreaInputProps,\n TextAreaHintProps,\n TextAreaErrorTextProps,\n TextAreaCounterProps,\n}\n\ntype TextAreaComponent = typeof SimpleTextArea & {\n /**\n * Character counter displayed opposite the textarea label. Renders a `<div>`\n * element by default.\n */\n Counter: typeof TextAreaCounter\n /**\n * Error message displayed when the textarea is invalid. Renders a `<div>` element\n * by default.\n */\n ErrorText: typeof TextAreaErrorText\n /**\n * Helper text displayed below the textarea. Renders a `<div>` element by default.\n */\n Hint: typeof TextAreaHint\n /**\n * The text area element. Renders a `<textarea>` element.\n */\n Input: typeof TextAreaInput\n /**\n * An accessible label that is automatically associated with the input. Renders a\n * `<label>` element by default.\n */\n Label: typeof TextAreaLabel\n /**\n * Groups all parts of the text-area. Renders a `<div>` element by default.\n */\n Root: typeof TextAreaRoot\n}\n\nexport const TextArea: TextAreaComponent = SimpleTextArea as TextAreaComponent\n\nTextArea.Counter = TextAreaCounter\nTextArea.ErrorText = TextAreaErrorText\nTextArea.Hint = TextAreaHint\nTextArea.Input = TextAreaInput\nTextArea.Label = TextAreaLabel\nTextArea.Root = TextAreaRoot\n"],"mappings":"m8BAMA,GAAa,CAACE,EAA4BC,GACxCF,EAAqC,CACnCG,SAAU,wBACVC,aAAc,+BACdC,OAAQ,GACT,CAAC,CCkBJ,SAASa,eAAeF,EAAeC,EAA+B,CACpE,OAAOA,GAAa,KAAiCD,EAA1B,GAAGA,EAAK,GAAIC,IAOzC,SAAOE,gBAAAC,EAAA,CAAA,IAAAC,EAAAC,EAAA,EAAA,CAAyB,CAAAP,QAAAQ,EAAAC,KAAA,GAAAC,GAAAL,EAC9BL,EAAAQ,IAAAG,IAAAA,GAAAR,eAAAK,EAAwBI,EAAAN,EAAA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Af,EAAA,MAAAgB,GAAAhB,EAAA,MAAAkB,GA5BVG,EAAA,EAAC,aAAD,CAAa,GAAKnB,EAAYW,MAAgBjB,qBAA9C,CACGmB,EAMAC,EAIDE,EAOCC,EAMAC,EAKY,GAAApB,EAAA,IAAAa,EAAAb,EAAA,IAAAJ,EAAAI,EAAA,IAAAE,EAAAF,EAAA,IAAAmB,EAAAnB,EAAA,IAAAoB,EAAApB,EAAA,IAAAe,EAAAf,EAAA,IAAAgB,EAAAhB,EAAA,IAAAkB,EAAAlB,EAAA,IAAAqB,GAAAA,EAAArB,EAAA,IA7BfqB,ECnEJ,IAAaC,EAA8BC,WAE3CD,EAASe,QAAUb,gBACnBF,EAASgB,UAAYZ,kBACrBJ,EAASiB,KAAOX,aAChBN,EAASkB,MAAQV,cACjBR,EAASmB,MAAQT,cACjBV,EAASoB,KAAOR"}
|
package/dist/text-input/index.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use client;";import{c as e}from"react/compiler-runtime";import{mergeProps as t}from"@qualcomm-ui/utils/merge-props";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{PolymorphicElement as i}from"@qualcomm-ui/react-core/system";import{X as a}from"lucide-react";import"react";import{normalizeProps as o,useOptionalContentId as s}from"@qualcomm-ui/react-core/machine";import{useControlledId as c}from"@qualcomm-ui/react-core/state";import{InputEndIcon as l,InputErrorIndicator as u,InputErrorText as d,InputHint as f,InputLabel as p,InputStartIcon as m,QdsInputContextProvider as h,useQdsInputContext as g}from"@qualcomm-ui/react/input";import{InlineIconButton as _}from"@qualcomm-ui/react/inline-icon-button";import{createQdsInputApi as v}from"@qualcomm-ui/qds-core/input";import{TextInputContextProvider as y,useTextInput as b,useTextInputClearTrigger as x,useTextInputContext as S,useTextInputErrorText as C,useTextInputHint as w,useTextInputInput as T,useTextInputInputGroup as E,useTextInputLabel as D}from"@qualcomm-ui/react-core/text-input";import{splitTextInputProps as O}from"@qualcomm-ui/core/text-input";function TextInputClearTrigger(r){let i=e(7),o=x(),s=g(),c;i[0]!==o||i[1]!==r||i[2]!==s?(c=t(o,s.getClearTriggerBindings(),r),i[0]=o,i[1]=r,i[2]=s,i[3]=c):c=i[3];let l=c,u;return i[4]!==l||i[5]!==s.size?(u=n(_,{icon:a,size:s.size,variant:`scale`,...l}),i[4]=l,i[5]=s.size,i[6]=u):u=i[6],u}function TextInputErrorIndicator(r){let i=e(5),a=S(),o;i[0]!==a||i[1]!==r?(o=t(a.getErrorIndicatorBindings(),r),i[0]=a,i[1]=r,i[2]=o):o=i[2];let s=o,c;return i[3]===s?c=i[4]:(c=n(u,{...s}),i[3]=s,i[4]=c),c}function TextInputErrorText(r){let i=e(5),{children:a,id:o,...s}=r,c;i[0]===o?c=i[1]:(c={id:o},i[0]=o,i[1]=c);let l=t(C(c),s),u;return i[2]!==a||i[3]!==l?(u=n(d,{...l,children:a}),i[2]=a,i[3]=l,i[4]=u):u=i[4],u}function TextInputHint(r){let i=e(5),{children:a,id:o,...s}=r,c;i[0]===o?c=i[1]:(c={id:o},i[0]=o,i[1]=c);let l=t(w(c),s),u;return i[2]!==a||i[3]!==l?(u=n(f,{...l,children:a}),i[2]=a,i[3]=l,i[4]=u):u=i[4],u}function TextInputInput(r){let i=e(4),{id:a,...o}=r,s;i[0]===a?s=i[1]:(s={id:a},i[0]=a,i[1]=s);let c=t(T(s),g().getInputBindings(),o),l;return i[2]===c?l=i[3]:(l=n(`input`,{...c}),i[2]=c,i[3]=l),l}function TextInputInputGroup(a){let o=e(9),{children:s,...c}=a,u=g(),d=t(E(),u.getGroupBindings(),c),f;o[0]===u.startIcon?f=o[1]:(f=u.startIcon?n(m,{icon:u.startIcon}):null,o[0]=u.startIcon,o[1]=f);let p;o[2]===u.endIcon?p=o[3]:(p=u.endIcon?n(l,{icon:u.endIcon}):null,o[2]=u.endIcon,o[3]=p);let h;return o[4]!==s||o[5]!==d||o[6]!==f||o[7]!==p?(h=r(i,{as:`div`,...d,children:[f,s,p]}),o[4]=s,o[5]=d,o[6]=f,o[7]=p,o[8]=h):h=o[8],h}function TextInputLabel(r){let i=e(5),{id:a,...o}=r,s;i[0]===a?s=i[1]:(s={id:a},i[0]=a,i[1]=s);let c=D(s),l=S(),u=t(c,o),d;return i[2]!==u||i[3]!==l.required?(d=n(p,{required:l.required,...u}),i[2]=u,i[3]=l.required,i[4]=d):d=i[4],d}function TextInputRoot(r){let a=e(13),{children:s,endIcon:c,size:l,startIcon:u,...d}=r,[f,p]=O(d),m=b(f),g;a[0]!==c||a[1]!==l||a[2]!==u?(g=v({endIcon:c,size:l,startIcon:u},o),a[0]=c,a[1]=l,a[2]=u,a[3]=g):g=a[3];let _=g,x=t(m.getRootBindings(),_.getRootBindings(),p),S;a[4]!==s||a[5]!==x?(S=n(i,{as:`div`,...x,children:s}),a[4]=s,a[5]=x,a[6]=S):S=a[6];let C;a[7]!==_||a[8]!==S?(C=n(h,{value:_,children:S}),a[7]=_,a[8]=S,a[9]=C):C=a[9];let w;return a[10]!==m||a[11]!==C?(w=n(y,{value:m,children:C}),a[10]=m,a[11]=C,a[12]=w):w=a[12],w}function TextInput$1(t){let i=e(59),a,o,l,u,d,f,p,m,h,g,_,v,y,b,x;i[0]===t?(a=i[1],o=i[2],l=i[3],u=i[4],d=i[5],f=i[6],p=i[7],m=i[8],h=i[9],g=i[10],_=i[11],v=i[12],y=i[13],b=i[14],x=i[15]):({"aria-label":a,"aria-labelledby":o,clearable:x,clearTriggerProps:l,errorIndicatorProps:u,errorText:d,errorTextProps:f,hint:p,hintProps:m,inputGroupProps:h,inputProps:g,label:_,labelProps:v,placeholder:y,...b}=t,i[0]=t,i[1]=a,i[2]=o,i[3]=l,i[4]=u,i[5]=d,i[6]=f,i[7]=p,i[8]=m,i[9]=h,i[10]=g,i[11]=_,i[12]=v,i[13]=y,i[14]=b,i[15]=x);let S=x===void 0?!0:x,C=_||v?.children,w=d||f?.children,T=p||m?.children,E;i[16]!==a||i[17]!==o||i[18]!==g?(E={...g},a!==void 0&&(E[`aria-label`]=a),o!==void 0&&(E[`aria-labelledby`]=o),i[16]=a,i[17]=o,i[18]=g,i[19]=E):E=i[19];let D=s(w,f),O=s(T,m),k=c(E?.id),A=s(C,v),j;i[20]!==b.ids||i[21]!==D||i[22]!==O||i[23]!==k||i[24]!==A?(j={errorText:D,hint:O,input:k,label:A,...b.ids},i[20]=b.ids,i[21]=D,i[22]=O,i[23]=k,i[24]=A,i[25]=j):j=i[25];let M=j,N;i[26]!==M.label||i[27]!==C||i[28]!==v?(N=C?n(TextInputLabel,{...v,id:M.label,children:C}):null,i[26]=M.label,i[27]=C,i[28]=v,i[29]=N):N=i[29];let P;i[30]!==M.input||i[31]!==E||i[32]!==y?(P=n(TextInputInput,{placeholder:y,...E,id:M.input}),i[30]=M.input,i[31]=E,i[32]=y,i[33]=P):P=i[33];let F;i[34]!==l||i[35]!==S?(F=S?n(TextInputClearTrigger,{...l}):null,i[34]=l,i[35]=S,i[36]=F):F=i[36];let I;i[37]===u?I=i[38]:(I=n(TextInputErrorIndicator,{...u}),i[37]=u,i[38]=I);let L;i[39]!==h||i[40]!==I||i[41]!==P||i[42]!==F?(L=r(TextInputInputGroup,{...h,children:[P,F,I]}),i[39]=h,i[40]=I,i[41]=P,i[42]=F,i[43]=L):L=i[43];let R;i[44]!==T||i[45]!==m||i[46]!==M.hint?(R=T?n(TextInputHint,{...m,id:M.hint,children:T}):null,i[44]=T,i[45]=m,i[46]=M.hint,i[47]=R):R=i[47];let z;i[48]!==w||i[49]!==f||i[50]!==M.errorText?(z=w?n(TextInputErrorText,{...f,id:M.errorText,children:w}):null,i[48]=w,i[49]=f,i[50]=M.errorText,i[51]=z):z=i[51];let B;return i[52]!==M||i[53]!==b||i[54]!==L||i[55]!==R||i[56]!==z||i[57]!==N?(B=r(TextInputRoot,{...b,ids:M,children:[N,L,R,z]}),i[52]=M,i[53]=b,i[54]=L,i[55]=R,i[56]=z,i[57]=N,i[58]=B):B=i[58],B}var k=TextInput$1;k.ClearTrigger=TextInputClearTrigger,k.ErrorIndicator=TextInputErrorIndicator,k.ErrorText=TextInputErrorText,k.Hint=TextInputHint,k.InputGroup=TextInputInputGroup,k.Input=TextInputInput,k.Label=TextInputLabel,k.Root=TextInputRoot;export{k as TextInput};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/text-input/text-input.tsx", "../../src/text-input/text-input-clear-trigger.tsx", "../../src/text-input/text-input-error-indicator.tsx", "../../src/text-input/text-input-error-text.tsx", "../../src/text-input/text-input-hint.tsx", "../../src/text-input/text-input-input.tsx", "../../src/text-input/text-input-input-group.tsx", "../../src/text-input/text-input-label.tsx", "../../src/text-input/text-input-root.tsx", "../../src/text-input/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { useOptionalContentId } from \"@qualcomm-ui/react-core/machine\";\nimport { useControlledId } from \"@qualcomm-ui/react-core/state\";\nimport { TextInputClearTrigger } from \"./text-input-clear-trigger\";\nimport { TextInputErrorIndicator } from \"./text-input-error-indicator\";\nimport { TextInputErrorText } from \"./text-input-error-text\";\nimport { TextInputHint } from \"./text-input-hint\";\nimport { TextInputInput } from \"./text-input-input\";\nimport { TextInputInputGroup } from \"./text-input-input-group\";\nimport { TextInputLabel } from \"./text-input-label\";\nimport { TextInputRoot } from \"./text-input-root\";\nexport function TextInput(t0) {\n const {\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n clearable: t1,\n clearTriggerProps,\n errorIndicatorProps,\n errorText,\n errorTextProps,\n hint,\n hintProps,\n inputGroupProps,\n inputProps: inputPropsProp,\n label,\n labelProps,\n placeholder,\n ...props\n } = t0;\n const clearable = t1 === undefined ? true : t1;\n const labelContent = label || labelProps?.children;\n const errorTextContent = errorText || errorTextProps?.children;\n const hintContent = hint || hintProps?.children;\n const inputProps = {\n ...inputPropsProp\n };\n if (ariaLabel !== void 0) {\n inputProps[\"aria-label\"] = ariaLabel;\n }\n if (ariaLabelledBy !== void 0) {\n inputProps[\"aria-labelledby\"] = ariaLabelledBy;\n }\n const ids = {\n errorText: useOptionalContentId(errorTextContent, errorTextProps),\n hint: useOptionalContentId(hintContent, hintProps),\n input: useControlledId(inputProps?.id),\n label: useOptionalContentId(labelContent, labelProps),\n ...props.ids\n };\n return jsxs(TextInputRoot, {\n ...props,\n ids,\n children: [labelContent ? jsx(TextInputLabel, {\n ...labelProps,\n id: ids.label,\n children: labelContent\n }) : null, jsxs(TextInputInputGroup, {\n ...inputGroupProps,\n children: [jsx(TextInputInput, {\n placeholder,\n ...inputProps,\n id: ids.input\n }), clearable ? jsx(TextInputClearTrigger, {\n ...clearTriggerProps\n }) : null, jsx(TextInputErrorIndicator, {\n ...errorIndicatorProps\n })]\n }), hintContent ? jsx(TextInputHint, {\n ...hintProps,\n id: ids.hint,\n children: hintContent\n }) : null, errorTextContent ? jsx(TextInputErrorText, {\n ...errorTextProps,\n id: ids.errorText,\n children: errorTextContent\n }) : null]\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { X } from \"lucide-react\";\nimport { InlineIconButton } from \"@qualcomm-ui/react/inline-icon-button\";\nimport { useQdsInputContext } from \"@qualcomm-ui/react/input\";\nimport { useTextInputClearTrigger } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputClearTrigger(props) {\n const $ = _c(4);\n const contextProps = useTextInputClearTrigger();\n const qdsContext = useQdsInputContext();\n let t0;\n if ($[0] !== contextProps || $[1] !== props || $[2] !== qdsContext) {\n const mergedProps = mergeProps(contextProps, qdsContext.getClearTriggerBindings(), props);\n t0 = jsx(InlineIconButton, {\n icon: X,\n size: qdsContext.size,\n variant: \"scale\",\n ...mergedProps\n });\n $[0] = contextProps;\n $[1] = props;\n $[2] = qdsContext;\n $[3] = t0;\n } else {\n t0 = $[3];\n }\n return t0;\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { InputErrorIndicator } from \"@qualcomm-ui/react/input\";\nimport { useTextInputContext } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputErrorIndicator(props) {\n const $ = _c(3);\n const context = useTextInputContext();\n let t0;\n if ($[0] !== context || $[1] !== props) {\n const mergedProps = mergeProps(context.getErrorIndicatorBindings(), props);\n t0 = jsx(InputErrorIndicator, {\n ...mergedProps\n });\n $[0] = context;\n $[1] = props;\n $[2] = t0;\n } else {\n t0 = $[2];\n }\n return t0;\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { InputErrorText } from \"@qualcomm-ui/react/input\";\nimport { useTextInputErrorText } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputErrorText(t0) {\n const $ = _c(2);\n const {\n children,\n id,\n ...props\n } = t0;\n let t1;\n if ($[0] !== id) {\n t1 = {\n id\n };\n $[0] = id;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const contextProps = useTextInputErrorText(t1);\n const mergedProps = mergeProps(contextProps, props);\n return jsx(InputErrorText, {\n ...mergedProps,\n children\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { InputHint } from \"@qualcomm-ui/react/input\";\nimport { useTextInputHint } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputHint(t0) {\n const $ = _c(2);\n const {\n children,\n id,\n ...props\n } = t0;\n let t1;\n if ($[0] !== id) {\n t1 = {\n id\n };\n $[0] = id;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const contextProps = useTextInputHint(t1);\n const mergedProps = mergeProps(contextProps, props);\n return jsx(InputHint, {\n ...mergedProps,\n children\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useQdsInputContext } from \"@qualcomm-ui/react/input\";\nimport { useTextInputInput } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputInput(t0) {\n const $ = _c(2);\n const {\n id,\n ...props\n } = t0;\n let t1;\n if ($[0] !== id) {\n t1 = {\n id\n };\n $[0] = id;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const contextProps = useTextInputInput(t1);\n const qdsContext = useQdsInputContext();\n const mergedProps = mergeProps(contextProps, qdsContext.getInputBindings(), props);\n return jsx(\"input\", {\n ...mergedProps\n });\n}", "import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { InputEndIcon, InputStartIcon, useQdsInputContext } from \"@qualcomm-ui/react/input\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { useTextInputInputGroup } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputInputGroup(t0) {\n const {\n children,\n ...props\n } = t0;\n const qdsContext = useQdsInputContext();\n const contextProps = useTextInputInputGroup();\n const mergedProps = mergeProps(contextProps, qdsContext.getGroupBindings(), props);\n return jsxs(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children: [qdsContext.startIcon ? jsx(InputStartIcon, {\n icon: qdsContext.startIcon\n }) : null, children, qdsContext.endIcon ? jsx(InputEndIcon, {\n icon: qdsContext.endIcon\n }) : null]\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { InputLabel } from \"@qualcomm-ui/react/input\";\nimport { useTextInputContext, useTextInputLabel } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputLabel(t0) {\n const $ = _c(2);\n const {\n id,\n ...props\n } = t0;\n let t1;\n if ($[0] !== id) {\n t1 = {\n id\n };\n $[0] = id;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const contextProps = useTextInputLabel(t1);\n const textInputContext = useTextInputContext();\n const mergedProps = mergeProps(contextProps, props);\n return jsx(InputLabel, {\n required: textInputContext.required,\n ...mergedProps\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useMemo } from \"react\";\nimport { splitTextInputProps } from \"@qualcomm-ui/core/text-input\";\nimport { createQdsInputApi } from \"@qualcomm-ui/qds-core/input\";\nimport { QdsInputContextProvider } from \"@qualcomm-ui/react/input\";\nimport { normalizeProps } from \"@qualcomm-ui/react-core/machine\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { TextInputContextProvider, useTextInput } from \"@qualcomm-ui/react-core/text-input\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TextInputRoot(t0) {\n const $ = _c(4);\n const {\n children,\n endIcon,\n size,\n startIcon,\n ...props\n } = t0;\n const [textInputProps, localProps] = splitTextInputProps(props);\n const context = useTextInput(textInputProps);\n let t1;\n if ($[0] !== endIcon || $[1] !== size || $[2] !== startIcon) {\n t1 = createQdsInputApi({\n endIcon,\n size,\n startIcon\n }, normalizeProps);\n $[0] = endIcon;\n $[1] = size;\n $[2] = startIcon;\n $[3] = t1;\n } else {\n t1 = $[3];\n }\n const qdsContext = t1;\n const mergedProps = mergeProps(context.getRootBindings(), qdsContext.getRootBindings(), localProps);\n return jsx(TextInputContextProvider, {\n value: context,\n children: jsx(QdsInputContextProvider, {\n value: qdsContext,\n children: jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n })\n })\n });\n}", "import { TextInput as SimpleTextInput } from \"./text-input\";\nimport { TextInputClearTrigger } from \"./text-input-clear-trigger\";\nimport { TextInputErrorIndicator } from \"./text-input-error-indicator\";\nimport { TextInputErrorText } from \"./text-input-error-text\";\nimport { TextInputHint } from \"./text-input-hint\";\nimport { TextInputInput } from \"./text-input-input\";\nimport { TextInputInputGroup } from \"./text-input-input-group\";\nimport { TextInputLabel } from \"./text-input-label\";\nimport { TextInputRoot } from \"./text-input-root\";\nexport const TextInput = SimpleTextInput;\nTextInput.ClearTrigger = TextInputClearTrigger;\nTextInput.ErrorIndicator = TextInputErrorIndicator;\nTextInput.ErrorText = TextInputErrorText;\nTextInput.Hint = TextInputHint;\nTextInput.InputGroup = TextInputInputGroup;\nTextInput.Input = TextInputInput;\nTextInput.Label = TextInputLabel;\nTextInput.Root = TextInputRoot;"],
|
|
5
|
-
"mappings": ";AAAA,OAAS,OAAAA,KAAK,QAAAC,UAAY,oBAC1B,OAAS,yBAA4B,kCACrC,OAAS,oBAAuB,gCCFhC,OAAS,KAAK,OAAU,yBACxB,OAAS,QAAW,oBACpB,OAAS,MAAS,eAClB,OAAS,qBAAwB,wCACjC,OAAS,uBAA0B,2BACnC,OAAS,6BAAgC,qCACzC,OAAS,eAAkB,iCACpB,SAAS,sBAAsB,MAAO,CAC3C,IAAM,EAAI,GAAG,CAAC,EACR,aAAe,yBAAyB,EACxC,WAAa,mBAAmB,EAClC,GACJ,GAAI,EAAE,CAAC,IAAM,cAAgB,EAAE,CAAC,IAAM,OAAS,EAAE,CAAC,IAAM,WAAY,CAClE,IAAM,YAAc,WAAW,aAAc,WAAW,wBAAwB,EAAG,KAAK,EACxF,GAAK,IAAI,iBAAkB,CACzB,KAAM,EACN,KAAM,WAAW,KACjB,QAAS,QACT,GAAG,WACL,CAAC,EACD,EAAE,CAAC,EAAI,aACP,EAAE,CAAC,EAAI,MACP,EAAE,CAAC,EAAI,WACP,EAAE,CAAC,EAAI,EACT,MACE,GAAK,EAAE,CAAC,EAEV,OAAO,EACT,CC5BA,OAAS,KAAKC,QAAU,yBACxB,OAAS,OAAAC,SAAW,oBACpB,OAAS,wBAA2B,2BACpC,OAAS,wBAA2B,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e,sBACzBA,WAAU,eAAiB,wBAC3BA,WAAU,UAAY,mBACtBA,WAAU,KAAO,cACjBA,WAAU,WAAa,oBACvBA,WAAU,MAAQ,eAClBA,WAAU,MAAQ,eAClBA,WAAU,KAAO",
|
|
6
|
-
"names": ["jsx", "jsxs", "_c", "jsx", "mergeProps", "_c", "jsx", "mergeProps", "_c", "jsx", "mergeProps", "_c", "jsx", "useQdsInputContext", "mergeProps", "jsx", "useQdsInputContext", "mergeProps", "_c", "jsx", "useTextInputContext", "mergeProps", "_c", "jsx", "PolymorphicElement", "mergeProps", "jsxs", "jsx", "TextInput"]
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ReactElement","X","InlineIconButton","useQdsInputContext","ElementRenderProp","useTextInputClearTrigger","mergeProps","TextInputClearTriggerProps","TextInputClearTrigger","props","$","_c","contextProps","qdsContext","t0","getClearTriggerBindings","mergedProps","t1","size","ReactElement","InputErrorIndicator","InputErrorIndicatorProps","useTextInputContext","mergeProps","TextInputErrorIndicatorProps","TextInputErrorIndicator","props","$","_c","context","t0","getErrorIndicatorBindings","mergedProps","t1","ReactElement","InputErrorText","InputErrorTextProps","useTextInputErrorText","mergeProps","TextInputErrorTextProps","TextInputErrorText","t0","$","_c","children","id","props","t1","contextProps","mergedProps","t2","ReactElement","InputHint","InputHintProps","useTextInputHint","mergeProps","TextInputHintProps","TextInputHint","t0","$","_c","children","id","props","t1","contextProps","mergedProps","t2","ComponentPropsWithRef","ReactElement","useQdsInputContext","IdProp","useTextInputInput","ComponentDataAttributes","mergeProps","TextInputInputProps","TextInputInput","t0","$","_c","id","props","t1","contextProps","qdsContext","mergedProps","getInputBindings","t2","ReactElement","ReactNode","InputEndIcon","InputStartIcon","useQdsInputContext","ElementRenderProp","PolymorphicElement","useTextInputInputGroup","mergeProps","TextInputInputGroupProps","children","TextInputInputGroup","t0","$","_c","props","qdsContext","contextProps","mergedProps","getGroupBindings","t1","startIcon","t2","endIcon","t3","ReactElement","ReactNode","InputLabel","ElementRenderProp","useTextInputContext","useTextInputLabel","mergeProps","TextInputLabelProps","children","TextInputLabel","t0","$","_c","id","props","t1","contextProps","textInputContext","mergedProps","t2","required","ReactElement","ReactNode","useMemo","splitTextInputProps","TextInputApiProps","createQdsInputApi","QdsInputContextProvider","QdsReactInputApiProps","normalizeProps","ElementRenderProp","PolymorphicElement","TextInputContextProvider","useTextInput","mergeProps","TextInputRootProps","Omit","children","TextInputRoot","t0","$","_c","endIcon","size","startIcon","props","textInputProps","localProps","context","t1","qdsContext","mergedProps","getRootBindings","t2","t3","t4","ReactElement","ReactNode","LucideIconOrElement","useOptionalContentId","useControlledId","TextInputClearTrigger","TextInputClearTriggerProps","TextInputErrorIndicator","TextInputErrorIndicatorProps","TextInputErrorText","TextInputErrorTextProps","TextInputHint","TextInputHintProps","TextInputInput","TextInputInputProps","TextInputInputGroup","TextInputInputGroupProps","TextInputLabel","TextInputLabelProps","TextInputRoot","TextInputRootProps","TextInputProps","children","clearable","clearTriggerProps","endIcon","errorIndicatorProps","errorText","errorTextProps","hint","hintProps","inputGroupProps","inputProps","label","labelProps","placeholder","startIcon","TextInput","t0","$","_c","ariaLabel","ariaLabelledBy","inputPropsProp","props","t1","undefined","labelContent","errorTextContent","hintContent","t2","t3","t4","id","t5","t6","ids","input","t7","t8","t9","t10","t11","t12","t13","t14","TextInput","SimpleTextInput","TextInputProps","TextInputClearTrigger","TextInputClearTriggerProps","TextInputErrorIndicator","TextInputErrorIndicatorProps","TextInputErrorText","TextInputErrorTextProps","TextInputHint","TextInputHintProps","TextInputInput","TextInputInputProps","TextInputInputGroup","TextInputInputGroupProps","TextInputLabel","TextInputLabelProps","TextInputRoot","TextInputRootProps","TextInputComponent","ClearTrigger","ErrorIndicator","ErrorText","Hint","Input","InputGroup","Label","Root"],"sources":["../../src/text-input/text-input-clear-trigger.tsx","../../src/text-input/text-input-error-indicator.tsx","../../src/text-input/text-input-error-text.tsx","../../src/text-input/text-input-hint.tsx","../../src/text-input/text-input-input.tsx","../../src/text-input/text-input-input-group.tsx","../../src/text-input/text-input-label.tsx","../../src/text-input/text-input-root.tsx","../../src/text-input/text-input.tsx","../../src/text-input/index.ts"],"sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement} from \"react\"\n\nimport {X} from \"lucide-react\"\n\nimport {InlineIconButton} from \"@qualcomm-ui/react/inline-icon-button\"\nimport {useQdsInputContext} from \"@qualcomm-ui/react/input\"\nimport type {ElementRenderProp} from \"@qualcomm-ui/react-core/system\"\nimport {useTextInputClearTrigger} from \"@qualcomm-ui/react-core/text-input\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nexport interface TextInputClearTriggerProps extends ElementRenderProp<\"button\"> {}\n\n/**\n * Button that clears the input value. Renders a `<button>` element by default.\n */\nexport function TextInputClearTrigger(\n props: TextInputClearTriggerProps,\n): ReactElement {\n const contextProps = useTextInputClearTrigger()\n const qdsContext = useQdsInputContext()\n const mergedProps = mergeProps(\n contextProps,\n qdsContext.getClearTriggerBindings(),\n props,\n )\n\n return (\n <InlineIconButton\n icon={X}\n size={qdsContext.size}\n variant=\"scale\"\n {...mergedProps}\n />\n )\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement} from \"react\"\n\nimport {\n InputErrorIndicator,\n type InputErrorIndicatorProps,\n} from \"@qualcomm-ui/react/input\"\nimport {useTextInputContext} from \"@qualcomm-ui/react-core/text-input\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nexport interface TextInputErrorIndicatorProps extends InputErrorIndicatorProps {}\n\n/**\n * Visual indicator displayed when the input is invalid. Renders a `<div>` element\n * by default.\n */\nexport function TextInputErrorIndicator(\n props: TextInputErrorIndicatorProps,\n): ReactElement {\n const context = useTextInputContext()\n const mergedProps = mergeProps(context.getErrorIndicatorBindings(), props)\n return <InputErrorIndicator {...mergedProps} />\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement} from \"react\"\n\nimport {\n InputErrorText,\n type InputErrorTextProps,\n} from \"@qualcomm-ui/react/input\"\nimport {useTextInputErrorText} from \"@qualcomm-ui/react-core/text-input\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nexport interface TextInputErrorTextProps extends InputErrorTextProps {}\n\n/**\n * Error message displayed when the input is invalid. Renders a `<div>` element by\n * default.\n */\nexport function TextInputErrorText({\n children,\n id,\n ...props\n}: TextInputErrorTextProps): ReactElement {\n const contextProps = useTextInputErrorText({id})\n\n const mergedProps = mergeProps(contextProps, props)\n\n return <InputErrorText {...mergedProps}>{children}</InputErrorText>\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement} from \"react\"\n\nimport {InputHint, type InputHintProps} from \"@qualcomm-ui/react/input\"\nimport {useTextInputHint} from \"@qualcomm-ui/react-core/text-input\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nexport interface TextInputHintProps extends InputHintProps {}\n\n/**\n * Helper text displayed below the input. Renders a `<div>` element by default.\n */\nexport function TextInputHint({\n children,\n id,\n ...props\n}: TextInputHintProps): ReactElement {\n const contextProps = useTextInputHint({id})\n const mergedProps = mergeProps(contextProps, props)\n\n return <InputHint {...mergedProps}>{children}</InputHint>\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ComponentPropsWithRef, ReactElement} from \"react\"\n\nimport {useQdsInputContext} from \"@qualcomm-ui/react/input\"\nimport type {IdProp} from \"@qualcomm-ui/react-core/system\"\nimport {useTextInputInput} from \"@qualcomm-ui/react-core/text-input\"\nimport type {ComponentDataAttributes} from \"@qualcomm-ui/utils/attributes\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nexport interface TextInputInputProps\n extends ComponentPropsWithRef<\"input\">, ComponentDataAttributes, IdProp {}\n\n/**\n * The text input element. Renders an `<input>` element.\n */\nexport function TextInputInput({\n id,\n ...props\n}: TextInputInputProps): ReactElement {\n const contextProps = useTextInputInput({id})\n\n const qdsContext = useQdsInputContext()\n\n const mergedProps = mergeProps(\n contextProps,\n qdsContext.getInputBindings(),\n props,\n )\n\n return <input {...mergedProps} />\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement, ReactNode} from \"react\"\n\nimport {\n InputEndIcon,\n InputStartIcon,\n useQdsInputContext,\n} from \"@qualcomm-ui/react/input\"\nimport {\n type ElementRenderProp,\n PolymorphicElement,\n} from \"@qualcomm-ui/react-core/system\"\nimport {useTextInputInputGroup} from \"@qualcomm-ui/react-core/text-input\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nexport interface TextInputInputGroupProps extends ElementRenderProp<\"div\"> {\n /**\n * React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.\n */\n children?: ReactNode\n}\n\n/**\n * Container that wraps the input element and optional icons. Renders a `<div>`\n * element by default.\n */\nexport function TextInputInputGroup({\n children,\n ...props\n}: TextInputInputGroupProps): ReactElement {\n const qdsContext = useQdsInputContext()\n const contextProps = useTextInputInputGroup()\n const mergedProps = mergeProps(\n contextProps,\n qdsContext.getGroupBindings(),\n props,\n )\n\n return (\n <PolymorphicElement as=\"div\" {...mergedProps}>\n {qdsContext.startIcon ? (\n <InputStartIcon icon={qdsContext.startIcon} />\n ) : null}\n {children}\n {qdsContext.endIcon ? <InputEndIcon icon={qdsContext.endIcon} /> : null}\n </PolymorphicElement>\n )\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement, ReactNode} from \"react\"\n\nimport {InputLabel} from \"@qualcomm-ui/react/input\"\nimport type {ElementRenderProp} from \"@qualcomm-ui/react-core/system\"\nimport {\n useTextInputContext,\n useTextInputLabel,\n} from \"@qualcomm-ui/react-core/text-input\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nexport interface TextInputLabelProps extends ElementRenderProp<\"label\"> {\n /**\n * React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.\n */\n children?: ReactNode\n}\n\n/**\n * An accessible label that is automatically associated with the input. Renders a\n * `<label>` element by default.\n */\nexport function TextInputLabel({\n id,\n ...props\n}: TextInputLabelProps): ReactElement {\n const contextProps = useTextInputLabel({id})\n const textInputContext = useTextInputContext()\n\n const mergedProps = mergeProps(contextProps, props)\n\n return <InputLabel required={textInputContext.required} {...mergedProps} />\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {type ReactElement, type ReactNode, useMemo} from \"react\"\n\nimport {\n splitTextInputProps,\n type TextInputApiProps,\n} from \"@qualcomm-ui/core/text-input\"\nimport {createQdsInputApi} from \"@qualcomm-ui/qds-core/input\"\nimport {\n QdsInputContextProvider,\n type QdsReactInputApiProps,\n} from \"@qualcomm-ui/react/input\"\nimport {normalizeProps} from \"@qualcomm-ui/react-core/machine\"\nimport {\n type ElementRenderProp,\n PolymorphicElement,\n} from \"@qualcomm-ui/react-core/system\"\nimport {\n TextInputContextProvider,\n useTextInput,\n} from \"@qualcomm-ui/react-core/text-input\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nexport interface TextInputRootProps\n extends\n TextInputApiProps,\n QdsReactInputApiProps,\n Omit<ElementRenderProp<\"div\">, \"dir\" | \"defaultValue\"> {\n /**\n * React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.\n */\n children?: ReactNode\n}\n\n/**\n * Groups all parts of the text input. Renders a `<div>` element by default.\n */\nexport function TextInputRoot({\n children,\n endIcon,\n size,\n startIcon,\n ...props\n}: TextInputRootProps): ReactElement {\n const [textInputProps, localProps] = splitTextInputProps(props)\n const context = useTextInput(textInputProps)\n\n const qdsContext = useMemo(\n () => createQdsInputApi({endIcon, size, startIcon}, normalizeProps),\n [endIcon, size, startIcon],\n )\n\n const mergedProps = mergeProps(\n context.getRootBindings(),\n qdsContext.getRootBindings(),\n localProps,\n )\n\n return (\n <TextInputContextProvider value={context}>\n <QdsInputContextProvider value={qdsContext}>\n <PolymorphicElement as=\"div\" {...mergedProps}>\n {children}\n </PolymorphicElement>\n </QdsInputContextProvider>\n </TextInputContextProvider>\n )\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement, ReactNode} from \"react\"\n\nimport type {LucideIconOrElement} from \"@qualcomm-ui/react-core/lucide\"\nimport {useOptionalContentId} from \"@qualcomm-ui/react-core/machine\"\nimport {useControlledId} from \"@qualcomm-ui/react-core/state\"\n\nimport {\n TextInputClearTrigger,\n type TextInputClearTriggerProps,\n} from \"./text-input-clear-trigger\"\nimport {\n TextInputErrorIndicator,\n type TextInputErrorIndicatorProps,\n} from \"./text-input-error-indicator\"\nimport {\n TextInputErrorText,\n type TextInputErrorTextProps,\n} from \"./text-input-error-text\"\nimport {TextInputHint, type TextInputHintProps} from \"./text-input-hint\"\nimport {TextInputInput, type TextInputInputProps} from \"./text-input-input\"\nimport {\n TextInputInputGroup,\n type TextInputInputGroupProps,\n} from \"./text-input-input-group\"\nimport {TextInputLabel, type TextInputLabelProps} from \"./text-input-label\"\nimport {TextInputRoot, type TextInputRootProps} from \"./text-input-root\"\n\nexport interface TextInputProps extends TextInputRootProps {\n /**\n * {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-label aria-label}\n * attribute, forwarded to the input element.\n */\n \"aria-label\"?: string | undefined\n\n /**\n * {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-labelledby aria-labelledby}\n * attribute, forwarded to the input element. If you provide a {@link label},\n * omit this prop.\n */\n \"aria-labelledby\"?: string | undefined\n\n /**\n * The simple TextInput doesn't support children.\n */\n children?: never\n\n /**\n * When `true`, renders a clear button that resets the input value on click.\n * The button only appears when the input has a value.\n *\n * @default true\n */\n clearable?: boolean\n\n clearTriggerProps?: TextInputClearTriggerProps\n\n /**\n * {@link https://lucide.dev lucide-react} icon, positioned after\n * the input. Can be supplied as a `ReactElement` for additional customization.\n */\n endIcon?: LucideIconOrElement\n\n /**\n * Props applied to the error indicator element.\n */\n errorIndicatorProps?: TextInputErrorIndicatorProps\n\n /**\n * Optional error that describes the element when {@link invalid} is true.\n */\n errorText?: string\n\n /**\n * Props applied to the error text element.\n */\n errorTextProps?: TextInputErrorTextProps\n\n /**\n * Optional hint describing the element. This element is automatically\n * associated with the component's input element for accessibility.\n */\n hint?: ReactNode\n\n /**\n * Props applied to the label element.\n */\n hintProps?: TextInputHintProps\n\n /**\n * Props applied to the input group element.\n *\n * @inheritDoc\n */\n inputGroupProps?: TextInputInputGroupProps\n\n /**\n * Props applied to the input element.\n */\n inputProps?: TextInputInputProps\n\n /**\n * Optional label describing the element. Recommended. This element is\n * automatically associated with the component's input element for\n * accessibility.\n */\n label?: ReactNode\n\n /**\n * Props applied to the label element.\n */\n labelProps?: TextInputLabelProps\n\n /**\n * HTML {@link https://www.w3schools.com/tags/att_input_placeholder.asp placeholder} attribute,\n * passed to the underlying input element.\n */\n placeholder?: string\n\n /**\n * {@link https://lucide.dev lucide-react} icon, positioned before\n * the input. Can be supplied as a `ReactElement` for additional customization.\n */\n startIcon?: LucideIconOrElement\n}\n\nexport function TextInput({\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n clearable = true,\n clearTriggerProps,\n errorIndicatorProps,\n errorText,\n errorTextProps,\n hint,\n hintProps,\n inputGroupProps,\n inputProps: inputPropsProp,\n label,\n labelProps,\n placeholder,\n ...props\n}: TextInputProps): ReactElement {\n const labelContent = label || labelProps?.children\n const errorTextContent = errorText || errorTextProps?.children\n const hintContent = hint || hintProps?.children\n\n const inputProps = {\n ...inputPropsProp,\n }\n\n // prevent undefined labels from overwriting defaults\n if (ariaLabel !== undefined) {\n inputProps[\"aria-label\"] = ariaLabel\n }\n if (ariaLabelledBy !== undefined) {\n inputProps[\"aria-labelledby\"] = ariaLabelledBy\n }\n\n const ids = {\n errorText: useOptionalContentId(errorTextContent, errorTextProps),\n hint: useOptionalContentId(hintContent, hintProps),\n input: useControlledId(inputProps?.id),\n label: useOptionalContentId(labelContent, labelProps),\n ...props.ids,\n }\n\n return (\n <TextInputRoot {...props} ids={ids}>\n {labelContent ? (\n <TextInputLabel {...labelProps} id={ids.label}>\n {labelContent}\n </TextInputLabel>\n ) : null}\n\n <TextInputInputGroup {...inputGroupProps}>\n <TextInputInput\n placeholder={placeholder}\n {...inputProps}\n id={ids.input}\n />\n {clearable ? <TextInputClearTrigger {...clearTriggerProps} /> : null}\n <TextInputErrorIndicator {...errorIndicatorProps} />\n </TextInputInputGroup>\n\n {hintContent ? (\n <TextInputHint {...hintProps} id={ids.hint}>\n {hintContent}\n </TextInputHint>\n ) : null}\n\n {errorTextContent ? (\n <TextInputErrorText {...errorTextProps} id={ids.errorText}>\n {errorTextContent}\n </TextInputErrorText>\n ) : null}\n </TextInputRoot>\n )\n}\n","import {TextInput as SimpleTextInput, type TextInputProps} from \"./text-input\"\nimport {\n TextInputClearTrigger,\n type TextInputClearTriggerProps,\n} from \"./text-input-clear-trigger\"\nimport {\n TextInputErrorIndicator,\n type TextInputErrorIndicatorProps,\n} from \"./text-input-error-indicator\"\nimport {\n TextInputErrorText,\n type TextInputErrorTextProps,\n} from \"./text-input-error-text\"\nimport {TextInputHint, type TextInputHintProps} from \"./text-input-hint\"\nimport {TextInputInput, type TextInputInputProps} from \"./text-input-input\"\nimport {\n TextInputInputGroup,\n type TextInputInputGroupProps,\n} from \"./text-input-input-group\"\nimport {TextInputLabel, type TextInputLabelProps} from \"./text-input-label\"\nimport {TextInputRoot, type TextInputRootProps} from \"./text-input-root\"\n\nexport type {\n TextInputClearTriggerProps,\n TextInputErrorIndicatorProps,\n TextInputErrorTextProps,\n TextInputHintProps,\n TextInputInputGroupProps,\n TextInputInputProps,\n TextInputLabelProps,\n TextInputRootProps,\n TextInputProps,\n}\n\ntype TextInputComponent = typeof SimpleTextInput & {\n /**\n * Button that clears the input value. Renders a `<button>` element by default.\n */\n ClearTrigger: typeof TextInputClearTrigger\n /**\n * Visual indicator displayed when the input is invalid. Renders a `<div>` element\n * by default.\n */\n ErrorIndicator: typeof TextInputErrorIndicator\n /**\n * Error message displayed when the input is invalid. Renders a `<div>` element by\n * default.\n */\n ErrorText: typeof TextInputErrorText\n /**\n * Helper text displayed below the input. Renders a `<div>` element by default.\n */\n Hint: typeof TextInputHint\n /**\n * The text input element. Renders an `<input>` element.\n */\n Input: typeof TextInputInput\n /**\n * Container that wraps the input element and optional icons. Renders a `<div>`\n * element by default.\n */\n InputGroup: typeof TextInputInputGroup\n /**\n * An accessible label that is automatically associated with the input. Renders a\n * `<label>` element by default.\n */\n Label: typeof TextInputLabel\n /**\n * Groups all parts of the text input. Renders a `<div>` element by default.\n */\n Root: typeof TextInputRoot\n}\n\nexport const TextInput: TextInputComponent =\n SimpleTextInput as TextInputComponent\n\nTextInput.ClearTrigger = TextInputClearTrigger\nTextInput.ErrorIndicator = TextInputErrorIndicator\nTextInput.ErrorText = TextInputErrorText\nTextInput.Hint = TextInputHint\nTextInput.InputGroup = TextInputInputGroup\nTextInput.Input = TextInputInput\nTextInput.Label = TextInputLabel\nTextInput.Root = TextInputRoot\n"],"mappings":"gmCAkBA,SAAOQ,sBAAAC,EAAA,CAAA,IAAAC,EAAAC,EAAA,EAAA,CAGLC,EAAqBP,GAA0B,CAC/CQ,EAAmBV,GAAoB,CAAAW,EAAA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CAJP,KAIOT,EAAA,IAAAS,EAAAT,EAAA,IAAAX,EAAAW,EAAA,IAAAiB,EAAA7B,UAAAY,EAAA,IAAAyB,GAAAA,EAAAzB,EAAA,IAAA,IAAA0B,EACM,OADN1B,EAAA,MAAAiB,GAAAjB,EAAA,MAAAK,GAAAL,EAAA,MAAAuB,GAAAvB,EAAA,MAAAwB,GAAAxB,EAAA,MAAAyB,GAAAzB,EAAA,MAAAmB,GA3BVO,EAAA,EAAC,cAAD,CAAc,GAAKrB,EAAYY,eAA/B,CACGE,EAMDI,EAUCC,EAMAC,EAKa,GAAAzB,EAAA,IAAAiB,EAAAjB,EAAA,IAAAK,EAAAL,EAAA,IAAAuB,EAAAvB,EAAA,IAAAwB,EAAAxB,EAAA,IAAAyB,EAAAzB,EAAA,IAAAmB,EAAAnB,EAAA,IAAA0B,GAAAA,EAAA1B,EAAA,IA5BhB0B,ECjGJ,IAAaC,EACXC,YAEFD,EAAUoB,aAAejB,sBACzBH,EAAUqB,eAAiBhB,wBAC3BL,EAAUsB,UAAYf,mBACtBP,EAAUuB,KAAOd,cACjBT,EAAUyB,WAAaZ,oBACvBb,EAAUwB,MAAQb,eAClBX,EAAU0B,MAAQX,eAClBf,EAAU2B,KAAOV"}
|
package/dist/toast/index.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use client;";import{c as e}from"react/compiler-runtime";import{mergeProps as t}from"@qualcomm-ui/utils/merge-props";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{PolymorphicElement as i}from"@qualcomm-ui/react-core/system";import{BellRing as a,CircleAlert as o,CircleCheck as s,TriangleAlert as c,X as l}from"lucide-react";import{IconOrNode as u}from"@qualcomm-ui/react/icon";import"react";import{normalizeProps as d}from"@qualcomm-ui/react-core/machine";import{createGuardedContext as f}from"@qualcomm-ui/react-core/context";import{Button as p}from"@qualcomm-ui/react/button";import{InlineIconButton as m}from"@qualcomm-ui/react/inline-icon-button";import{ProgressRing as h}from"@qualcomm-ui/react/progress-ring";import{CoreToast as g,CoreToaster as _,useToastContext as v}from"@qualcomm-ui/react-core/toast";import{createQdsToastApi as y}from"@qualcomm-ui/qds-core/toast";import{createToastStore as b}from"@qualcomm-ui/core/toast";var[x,S]=f({hookName:`useQdsToastContext`,providerName:`<QdsToastContextProvider>`,strict:!0});function ToastActionButton(r){let a=e(8),{action:o,render:s,...c}=r,l=t(S().getActionBindings(),c),u;a[0]===s?u=a[1]:(u=n(p,{emphasis:`neutral`,render:s,size:`sm`,variant:`outline`}),a[0]=s,a[1]=u);let d;a[2]!==o.label||a[3]!==u?(d=n(i,{as:`button`,render:u,children:o.label}),a[2]=o.label,a[3]=u,a[4]=d):d=a[4];let f;return a[5]!==l||a[6]!==d?(f=n(g.ActionTrigger,{...l,children:d}),a[5]=l,a[6]=d,a[7]=f):f=a[7],f}function ToastCloseButton(r){let i=e(5),{icon:a,...o}=r,s=t(S().getCloseButtonBindings(),o),c=a||l,u;i[0]===c?u=i[1]:(u=n(m,{icon:c,variant:`fixed`}),i[0]=c,i[1]=u);let d;return i[2]!==s||i[3]!==u?(d=n(g.CloseTrigger,{...s,children:u}),i[2]=s,i[3]=u,i[4]=d):d=i[4],d}function ToastDescription(r){let i=e(5),a=S(),o;i[0]!==r||i[1]!==a?(o=t(a.getDescriptionBindings(),r),i[0]=r,i[1]=a,i[2]=o):o=i[2];let s=o,c;return i[3]===s?c=i[4]:(c=n(g.Description,{...s}),i[3]=s,i[4]=c),c}function ToastIcon(r){let i=e(3),{icon:a,...s}=r,c=S(),l=t(c.getIconBindings(),s),d=a||C[c.emphasis]||o,f;return i[0]!==l||i[1]!==d?(f=n(u,{icon:d,size:`lg`,...l}),i[0]=l,i[1]=d,i[2]=f):f=i[2],f}var C={danger:o,info:o,loading:n(h,{size:`xs`}),neutral:a,success:s,warning:c};function ToastLabel(r){let i=e(5),a=S(),o;i[0]!==r||i[1]!==a?(o=t(a.getLabelBindings(),r),i[0]=r,i[1]=a,i[2]=o):o=i[2];let s=o,c;return i[3]===s?c=i[4]:(c=n(g.Label,{...s}),i[3]=s,i[4]=c),c}function ToastRoot(r){let i=e(10),a=v(),o;i[0]===a.type?o=i[1]:(o=y({emphasis:a.type},d),i[0]=a.type,i[1]=o);let s=o,c;i[2]!==r||i[3]!==s?(c=t(s.getRootBindings(),r),i[2]=r,i[3]=s,i[4]=c):c=i[4];let l=c,u;i[5]===l?u=i[6]:(u=n(g.Root,{...l}),i[5]=l,i[6]=u);let f;return i[7]!==s||i[8]!==u?(f=n(x,{value:s,children:u}),i[7]=s,i[8]=u,i[9]=f):f=i[9],f}function createToaster(e){return b(e)}function Toaster(t){let r=e(8),i,a,o;r[0]===t?(i=r[1],a=r[2],o=r[3]):({children:i,toaster:o,...a}=t,r[0]=t,r[1]=i,r[2]=a,r[3]=o);let s=i||DefaultToast,c;return r[4]!==a||r[5]!==s||r[6]!==o?(c=n(_,{toaster:o,...a,children:s}),r[4]=a,r[5]=s,r[6]=o,r[7]=c):c=r[7],c}function DefaultToast(t){let i=e(15),a;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=n(ToastIcon,{}),i[0]=a):a=i[0];let o;i[1]===t.label?o=i[2]:(o=n(ToastLabel,{children:t.label}),i[1]=t.label,i[2]=o);let s;i[3]===t.description?s=i[4]:(s=n(ToastDescription,{children:t.description}),i[3]=t.description,i[4]=s);let c;i[5]===t.action?c=i[6]:(c=t.action?n(ToastActionButton,{action:t.action}):null,i[5]=t.action,i[6]=c);let l;i[7]===t.closable?l=i[8]:(l=t.closable?n(ToastCloseButton,{}):null,i[7]=t.closable,i[8]=l);let u;return i[9]!==o||i[10]!==s||i[11]!==c||i[12]!==l||i[13]!==t.id?(u=r(ToastRoot,{children:[a,o,s,c,l]},t.id),i[9]=o,i[10]=s,i[11]=c,i[12]=l,i[13]=t.id,i[14]=u):u=i[14],u}var w={ActionButton:ToastActionButton,CloseButton:ToastCloseButton,Description:ToastDescription,Icon:ToastIcon,Label:ToastLabel,Root:ToastRoot};export{x as QdsToastContextProvider,w as Toast,Toaster,createToaster,S as useQdsToastContext};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
package/dist/toast/index.js.map
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/toast/toast-action-button.tsx", "../../src/toast/qds-toast-context.tsx", "../../src/toast/toast-close-button.tsx", "../../src/toast/toast-description.tsx", "../../src/toast/toast-icon.tsx", "../../src/toast/toast-label.tsx", "../../src/toast/toast-root.tsx", "../../src/toast/create-toaster.ts", "../../src/toast/toaster.tsx", "../../src/toast/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { jsx } from \"react/jsx-runtime\";\nimport { Button } from \"@qualcomm-ui/react/button\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { CoreToast } from \"@qualcomm-ui/react-core/toast\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsToastContext } from \"./qds-toast-context\";\nexport function ToastActionButton(t0) {\n const {\n action,\n render,\n ...props\n } = t0;\n const qdsContext = useQdsToastContext();\n const mergedProps = mergeProps(qdsContext.getActionBindings(), props);\n return jsx(CoreToast.ActionTrigger, {\n ...mergedProps,\n children: jsx(PolymorphicElement, {\n as: \"button\",\n render: jsx(Button, {\n emphasis: \"neutral\",\n render,\n size: \"sm\",\n variant: \"outline\"\n }),\n children: action.label\n })\n });\n}", "import { createGuardedContext } from \"@qualcomm-ui/react-core/context\";\nexport const [QdsToastContextProvider, useQdsToastContext] = createGuardedContext({\n hookName: \"useQdsToastContext\",\n providerName: \"<QdsToastContextProvider>\",\n strict: true\n});", "import { jsx } from \"react/jsx-runtime\";\nimport { X } from \"lucide-react\";\nimport { InlineIconButton } from \"@qualcomm-ui/react/inline-icon-button\";\nimport { CoreToast } from \"@qualcomm-ui/react-core/toast\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsToastContext } from \"./qds-toast-context\";\nexport function ToastCloseButton(t0) {\n const {\n icon,\n ...props\n } = t0;\n const qdsContext = useQdsToastContext();\n const mergedProps = mergeProps(qdsContext.getCloseButtonBindings(), props);\n return jsx(CoreToast.CloseTrigger, {\n ...mergedProps,\n children: jsx(InlineIconButton, {\n icon: icon || X,\n variant: \"fixed\"\n })\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { CoreToast } from \"@qualcomm-ui/react-core/toast\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsToastContext } from \"./qds-toast-context\";\nexport function ToastDescription(props) {\n const $ = _c(3);\n const qdsContext = useQdsToastContext();\n let t0;\n if ($[0] !== props || $[1] !== qdsContext) {\n const mergedProps = mergeProps(qdsContext.getDescriptionBindings(), props);\n t0 = jsx(CoreToast.Description, {\n ...mergedProps\n });\n $[0] = props;\n $[1] = qdsContext;\n $[2] = t0;\n } else {\n t0 = $[2];\n }\n return t0;\n}", "import { jsx } from \"react/jsx-runtime\";\nimport { BellRing, CircleAlert, CircleCheck, TriangleAlert } from \"lucide-react\";\nimport { IconOrNode } from \"@qualcomm-ui/react/icon\";\nimport { ProgressRing } from \"@qualcomm-ui/react/progress-ring\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsToastContext } from \"./qds-toast-context\";\nexport function ToastIcon(t0) {\n const {\n icon: iconProp,\n ...props\n } = t0;\n const qdsContext = useQdsToastContext();\n const mergedProps = mergeProps(qdsContext.getIconBindings(), props);\n return jsx(IconOrNode, {\n icon: iconProp || icons[qdsContext.emphasis] || CircleAlert,\n size: \"lg\",\n ...mergedProps\n });\n}\nconst icons = {\n danger: CircleAlert,\n info: CircleAlert,\n loading: /* @__PURE__ */jsx(ProgressRing, {\n size: \"xs\"\n }),\n neutral: BellRing,\n success: CircleCheck,\n warning: TriangleAlert\n};", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { CoreToast } from \"@qualcomm-ui/react-core/toast\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsToastContext } from \"./qds-toast-context\";\nexport function ToastLabel(props) {\n const $ = _c(3);\n const qdsContext = useQdsToastContext();\n let t0;\n if ($[0] !== props || $[1] !== qdsContext) {\n const mergedProps = mergeProps(qdsContext.getLabelBindings(), props);\n t0 = jsx(CoreToast.Label, {\n ...mergedProps\n });\n $[0] = props;\n $[1] = qdsContext;\n $[2] = t0;\n } else {\n t0 = $[2];\n }\n return t0;\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useMemo } from \"react\";\nimport { createQdsToastApi } from \"@qualcomm-ui/qds-core/toast\";\nimport { normalizeProps } from \"@qualcomm-ui/react-core/machine\";\nimport { CoreToast, useToastContext } from \"@qualcomm-ui/react-core/toast\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { QdsToastContextProvider } from \"./qds-toast-context\";\nexport function ToastRoot(props) {\n const $ = _c(5);\n const toastContext = useToastContext();\n let t0;\n if ($[0] !== toastContext.type) {\n t0 = createQdsToastApi({\n emphasis: toastContext.type\n }, normalizeProps);\n $[0] = toastContext.type;\n $[1] = t0;\n } else {\n t0 = $[1];\n }\n const qdsApi = t0;\n let t1;\n if ($[2] !== props || $[3] !== qdsApi) {\n const mergedProps = mergeProps(qdsApi.getRootBindings(), props);\n t1 = jsx(QdsToastContextProvider, {\n value: qdsApi,\n children: jsx(CoreToast.Root, {\n ...mergedProps\n })\n });\n $[2] = props;\n $[3] = qdsApi;\n $[4] = t1;\n } else {\n t1 = $[4];\n }\n return t1;\n}", "import { createToastStore } from \"@qualcomm-ui/core/toast\";\nexport function createToaster(options) {\n return createToastStore(options);\n}", "import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { CoreToaster } from \"@qualcomm-ui/react-core/toast\";\nimport { ToastActionButton } from \"./toast-action-button\";\nimport { ToastCloseButton } from \"./toast-close-button\";\nimport { ToastDescription } from \"./toast-description\";\nimport { ToastIcon } from \"./toast-icon\";\nimport { ToastLabel } from \"./toast-label\";\nimport { ToastRoot } from \"./toast-root\";\nexport function Toaster({\n children,\n toaster,\n ...props\n}) {\n return /* @__PURE__ */jsx(CoreToaster, {\n toaster,\n ...props,\n children: children || DefaultToast\n });\n}\nfunction DefaultToast(toast) {\n return /* @__PURE__ */jsxs(ToastRoot, {\n children: [/* @__PURE__ */jsx(ToastIcon, {}), /* @__PURE__ */jsx(ToastLabel, {\n children: toast.label\n }), /* @__PURE__ */jsx(ToastDescription, {\n children: toast.description\n }), toast.action ? /* @__PURE__ */jsx(ToastActionButton, {\n action: toast.action\n }) : null, toast.closable ? /* @__PURE__ */jsx(ToastCloseButton, {}) : null]\n }, toast.id);\n}", "import { ToastActionButton } from \"./toast-action-button\";\nimport { ToastCloseButton } from \"./toast-close-button\";\nimport { ToastDescription } from \"./toast-description\";\nimport { ToastIcon } from \"./toast-icon\";\nimport { ToastLabel } from \"./toast-label\";\nimport { ToastRoot } from \"./toast-root\";\nexport * from \"./create-toaster\";\nexport * from \"./qds-toast-context\";\nexport * from \"./toaster\";\nexport const Toast = {\n ActionButton: ToastActionButton,\n CloseButton: ToastCloseButton,\n Description: ToastDescription,\n Icon: ToastIcon,\n Label: ToastLabel,\n Root: ToastRoot\n};"],
|
|
5
|
-
"mappings": ";AAAA,OAAS,QAAW,oBACpB,OAAS,WAAc,4BACvB,OAAS,uBAA0B,iCACnC,OAAS,cAAiB,gCAC1B,OAAS,eAAkB,iCCJ3B,OAAS,yBAA4B,kCAC9B,GAAM,CAAC,wBAAyB,kBAAkB,EAAI,qBAAqB,CAChF,SAAU,qBACV,aAAc,4BACd,OAAQ,EACV,CAAC,EDCM,SAAS,kBAAkB,GAAI,CACpC,GAAM,CACJ,OACA,OACA,GAAG,KACL,EAAI,GACE,WAAa,mBAAmB,EAChC,YAAc,WAAW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AC,EAAI,IAEP,GAAK,EAAE,CAAC,EAEV,IAAM,OAAS,GACX,GACJ,GAAI,EAAE,CAAC,IAAM,OAAS,EAAE,CAAC,IAAM,OAAQ,CACrC,IAAM,YAAcC,YAAW,OAAO,gBAAgB,EAAG,KAAK,EAC9D,GAAKC,KAAI,wBAAyB,CAChC,MAAO,OACP,SAAUA,KAAIC,WAAU,KAAM,CAC5B,GAAG,WACL,CAAC,CACH,CAAC,EACD,EAAE,CAAC,EAAI,MACP,EAAE,CAAC,EAAI,OACP,EAAE,CAAC,EAAI,EACT,MACE,GAAK,EAAE,CAAC,EAEV,OAAO,EACT,CCtCA,OAAS,qBAAwB,0BAC1B,SAAS,cAAc,QAAS,CACrC,OAAO,iBAAiB,OAAO,CACjC,CCHA,OAAS,OAAAC,KAAK,SAAY,oBAC1B,OAAS,gBAAmB,gCAOrB,SAAS,QAAQ,CACtB,SACA,QACA,GAAG,KACL,EAAG,CACD,OAAsBC,KAAI,YAAa,CACrC,QACA,GAAG,MACH,SAAU,UAAY,YACxB,CAAC,CACH,CACA,SAAS,aAAa,MAAO,CAC3B,OAAsB,KAAK,UAAW,CACpC,SAAU,CAAgBA,KAAI,UAAW,CAAC,CAAC,EAAkBA,KAAI,WAAY,CAC3E,SAAU,MAAM,KAClB,CAAC,EAAkBA,KAAI,iBAAkB,CACvC,SAAU,MAAM,WAClB,CAAC,EAAG,MAAM,OAAwBA,KAAI,kBAAmB,CACvD,OAAQ,MAAM,MAChB,CAAC,EAAI,KAAM,MAAM,SAA0BA,KAAI,iBAAkB,CAAC,CAAC,EAAI,IAAI,CAC7E,EAAG,MAAM,EAAE,CACb,CCpBO,IAAM,MAAQ,CACnB,aAAc,kBACd,YAAa,iBACb,YAAa,iBACb,KAAM,UACN,MAAO,WACP,KAAM,SACR",
|
|
6
|
-
"names": ["jsx", "CoreToast", "mergeProps", "mergeProps", "jsx", "CoreToast", "jsx", "CoreToast", "mergeProps", "mergeProps", "jsx", "CoreToast", "jsx", "mergeProps", "mergeProps", "jsx", "_c", "jsx", "CoreToast", "mergeProps", "_c", "mergeProps", "jsx", "CoreToast", "_c", "jsx", "CoreToast", "mergeProps", "_c", "mergeProps", "jsx", "CoreToast", "jsx", "jsx"]
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"index.js","names":["QdsToastApi","createGuardedContext","QdsToastContextProvider","useQdsToastContext","hookName","providerName","strict","ReactElement","ToastActionOptions","Button","ElementRenderProp","PolymorphicElement","CoreToast","mergeProps","useQdsToastContext","ToastActionButtonProps","action","ToastActionButton","t0","$","_c","render","props","qdsContext","mergedProps","getActionBindings","t1","t2","label","t3","ReactElement","LucideIcon","X","InlineIconButton","CoreToast","CoreToastCloseTriggerProps","mergeProps","useQdsToastContext","ToastCloseButtonProps","Omit","icon","ToastCloseButton","t0","$","_c","props","qdsContext","mergedProps","getCloseButtonBindings","t1","t2","t3","ReactElement","CoreToast","CoreToastDescriptionProps","mergeProps","useQdsToastContext","ToastDescriptionProps","ToastDescription","props","$","_c","qdsContext","t0","getDescriptionBindings","mergedProps","t1","ReactElement","BellRing","CircleAlert","CircleCheck","TriangleAlert","QdsNotificationEmphasis","IconOrNode","ProgressRing","LucideIconOrNode","ElementRenderProp","mergeProps","useQdsToastContext","ToastIconProps","icon","ToastIcon","t0","$","_c","iconProp","props","qdsContext","mergedProps","getIconBindings","t1","icons","emphasis","t2","Record","danger","info","loading","neutral","success","warning","ReactElement","CoreToast","CoreToastLabelProps","mergeProps","useQdsToastContext","ToastLabelProps","ToastLabel","props","$","_c","qdsContext","t0","getLabelBindings","mergedProps","t1","ReactElement","useMemo","createQdsToastApi","normalizeProps","CoreToast","CoreToastRootProps","useToastContext","mergeProps","QdsToastContextProvider","ToastRootProps","ToastRoot","props","$","_c","toastContext","t0","type","emphasis","qdsApi","t1","getRootBindings","mergedProps","t2","t3","ReactElement","createToastStore","ToasterCreateOptions","ToastOptions","ToastStore","ToasterInstance","ToastCreateOptions","createToaster","options","ReactElement","ToastOptions","FunctionRenderProp","CoreToaster","CoreToasterProps","ToasterInstance","ToastActionButton","ToastCloseButton","ToastDescription","ToastIcon","ToastLabel","ToastRoot","ToasterProps","Omit","children","toaster","Toaster","t0","$","_c","props","t1","DefaultToast","t2","toast","Symbol","for","label","description","t3","action","t4","closable","t5","id","ToastActionButton","ToastActionButtonProps","ToastCloseButton","ToastCloseButtonProps","ToastDescription","ToastDescriptionProps","ToastIcon","ToastIconProps","ToastLabel","ToastLabelProps","ToastRoot","ToastRootProps","ToastComponent","ActionButton","CloseButton","Description","Icon","Label","Root","Toast"],"sources":["../../src/toast/qds-toast-context.tsx","../../src/toast/toast-action-button.tsx","../../src/toast/toast-close-button.tsx","../../src/toast/toast-description.tsx","../../src/toast/toast-icon.tsx","../../src/toast/toast-label.tsx","../../src/toast/toast-root.tsx","../../src/toast/create-toaster.ts","../../src/toast/toaster.tsx","../../src/toast/index.ts"],"sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {QdsToastApi} from \"@qualcomm-ui/qds-core/toast\"\nimport {createGuardedContext} from \"@qualcomm-ui/react-core/context\"\n\nexport const [QdsToastContextProvider, useQdsToastContext] =\n createGuardedContext<QdsToastApi>({\n hookName: \"useQdsToastContext\",\n providerName: \"<QdsToastContextProvider>\",\n strict: true,\n })\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement} from \"react\"\n\nimport type {ToastActionOptions} from \"@qualcomm-ui/core/toast\"\nimport {Button} from \"@qualcomm-ui/react/button\"\nimport {\n type ElementRenderProp,\n PolymorphicElement,\n} from \"@qualcomm-ui/react-core/system\"\nimport {CoreToast} from \"@qualcomm-ui/react-core/toast\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {useQdsToastContext} from \"./qds-toast-context\"\n\nexport interface ToastActionButtonProps extends ElementRenderProp<\"button\"> {\n /**\n * The action to perform when the button is clicked.\n */\n action: ToastActionOptions\n}\n\nexport function ToastActionButton({\n action,\n render,\n ...props\n}: ToastActionButtonProps): ReactElement | null {\n const qdsContext = useQdsToastContext()\n const mergedProps = mergeProps(qdsContext.getActionBindings(), props)\n\n return (\n <CoreToast.ActionTrigger {...mergedProps}>\n <PolymorphicElement\n as=\"button\"\n render={\n <Button\n emphasis=\"neutral\"\n render={render}\n size=\"sm\"\n variant=\"outline\"\n />\n }\n >\n {action.label}\n </PolymorphicElement>\n </CoreToast.ActionTrigger>\n )\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement} from \"react\"\n\nimport {type LucideIcon, X} from \"lucide-react\"\n\nimport {InlineIconButton} from \"@qualcomm-ui/react/inline-icon-button\"\nimport {\n CoreToast,\n type CoreToastCloseTriggerProps,\n} from \"@qualcomm-ui/react-core/toast\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {useQdsToastContext} from \"./qds-toast-context\"\n\nexport interface ToastCloseButtonProps extends Omit<\n CoreToastCloseTriggerProps,\n \"children\"\n> {\n /**\n * @default X\n */\n icon?: LucideIcon\n}\n\nexport function ToastCloseButton({\n icon,\n ...props\n}: ToastCloseButtonProps): ReactElement {\n const qdsContext = useQdsToastContext()\n const mergedProps = mergeProps(qdsContext.getCloseButtonBindings(), props)\n\n return (\n <CoreToast.CloseTrigger {...mergedProps}>\n <InlineIconButton icon={icon || X} variant=\"fixed\" />\n </CoreToast.CloseTrigger>\n )\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement} from \"react\"\n\nimport {\n CoreToast,\n type CoreToastDescriptionProps,\n} from \"@qualcomm-ui/react-core/toast\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {useQdsToastContext} from \"./qds-toast-context\"\n\nexport interface ToastDescriptionProps extends CoreToastDescriptionProps {}\n\nexport function ToastDescription(props: ToastDescriptionProps): ReactElement {\n const qdsContext = useQdsToastContext()\n const mergedProps = mergeProps(qdsContext.getDescriptionBindings(), props)\n\n return <CoreToast.Description {...mergedProps} />\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement} from \"react\"\n\nimport {BellRing, CircleAlert, CircleCheck, TriangleAlert} from \"lucide-react\"\n\nimport type {QdsNotificationEmphasis} from \"@qualcomm-ui/qds-core/inline-notification\"\nimport {IconOrNode} from \"@qualcomm-ui/react/icon\"\nimport {ProgressRing} from \"@qualcomm-ui/react/progress-ring\"\nimport type {LucideIconOrNode} from \"@qualcomm-ui/react-core/lucide\"\nimport type {ElementRenderProp} from \"@qualcomm-ui/react-core/system\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {useQdsToastContext} from \"./qds-toast-context\"\n\nexport interface ToastIconProps extends ElementRenderProp<\"span\"> {\n /**\n * Override the icon displayed in the notification. When this prop is omitted,\n * the icon is determined by the {@link emphasis} prop.\n */\n icon?: LucideIconOrNode\n}\n\nexport function ToastIcon({\n icon: iconProp,\n ...props\n}: ToastIconProps): ReactElement {\n const qdsContext = useQdsToastContext()\n\n const mergedProps = mergeProps(qdsContext.getIconBindings(), props)\n\n return (\n <IconOrNode\n icon={iconProp || icons[qdsContext.emphasis] || CircleAlert}\n size=\"lg\"\n {...mergedProps}\n />\n )\n}\n\nconst icons: Record<QdsNotificationEmphasis, LucideIconOrNode> = {\n danger: CircleAlert,\n info: CircleAlert,\n loading: <ProgressRing size=\"xs\" />,\n neutral: BellRing,\n success: CircleCheck,\n warning: TriangleAlert,\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement} from \"react\"\n\nimport {\n CoreToast,\n type CoreToastLabelProps,\n} from \"@qualcomm-ui/react-core/toast\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {useQdsToastContext} from \"./qds-toast-context\"\n\nexport interface ToastLabelProps extends CoreToastLabelProps {}\n\nexport function ToastLabel(props: ToastLabelProps): ReactElement {\n const qdsContext = useQdsToastContext()\n const mergedProps = mergeProps(qdsContext.getLabelBindings(), props)\n\n return <CoreToast.Label {...mergedProps} />\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {type ReactElement, useMemo} from \"react\"\n\nimport {createQdsToastApi} from \"@qualcomm-ui/qds-core/toast\"\nimport {normalizeProps} from \"@qualcomm-ui/react-core/machine\"\nimport {\n CoreToast,\n type CoreToastRootProps,\n useToastContext,\n} from \"@qualcomm-ui/react-core/toast\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {QdsToastContextProvider} from \"./qds-toast-context\"\n\nexport interface ToastRootProps extends CoreToastRootProps {}\n\nexport function ToastRoot(props: ToastRootProps): ReactElement {\n const toastContext = useToastContext()\n const qdsApi = useMemo(\n () => createQdsToastApi({emphasis: toastContext.type}, normalizeProps),\n [toastContext.type],\n )\n\n const mergedProps = mergeProps(qdsApi.getRootBindings(), props)\n\n return (\n <QdsToastContextProvider value={qdsApi}>\n <CoreToast.Root {...mergedProps} />\n </QdsToastContextProvider>\n )\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement} from \"react\"\n\nimport {\n createToastStore,\n type ToasterCreateOptions,\n type ToastOptions,\n type ToastStore,\n} from \"@qualcomm-ui/core/toast\"\n\nexport interface ToasterInstance extends ToastStore<ReactElement | string> {}\n\nexport interface ToastCreateOptions extends ToastOptions<\n ReactElement | string\n> {}\n\nexport function createToaster(options: ToasterCreateOptions): ToasterInstance {\n return createToastStore<ReactElement | string>(options)\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement} from \"react\"\n\nimport type {ToastOptions} from \"@qualcomm-ui/core/toast\"\nimport type {FunctionRenderProp} from \"@qualcomm-ui/react-core/system\"\nimport {CoreToaster, type CoreToasterProps} from \"@qualcomm-ui/react-core/toast\"\n\nimport type {ToasterInstance} from \"./create-toaster\"\nimport {ToastActionButton} from \"./toast-action-button\"\nimport {ToastCloseButton} from \"./toast-close-button\"\nimport {ToastDescription} from \"./toast-description\"\nimport {ToastIcon} from \"./toast-icon\"\nimport {ToastLabel} from \"./toast-label\"\nimport {ToastRoot} from \"./toast-root\"\n\nexport interface ToasterProps extends Omit<CoreToasterProps, \"children\"> {\n /**\n * {@link https://react-next.qui.qualcomm.com/render-props#functionrenderprop Render Prop}\n * that provides the {@link ToastOptions}.\n *\n * @inheritDoc\n */\n children?: FunctionRenderProp<ToastOptions>\n\n /**\n * The {@link ToasterInstance} instance.\n *\n * @inheritDoc\n */\n toaster: ToasterInstance\n}\n\nexport function Toaster({\n children,\n toaster,\n ...props\n}: ToasterProps): ReactElement {\n return (\n <CoreToaster toaster={toaster} {...props}>\n {children || DefaultToast}\n </CoreToaster>\n )\n}\n\nfunction DefaultToast(toast: ToastOptions<ReactElement | string>) {\n return (\n <ToastRoot key={toast.id}>\n <ToastIcon />\n <ToastLabel>{toast.label}</ToastLabel>\n <ToastDescription>{toast.description}</ToastDescription>\n {toast.action ? <ToastActionButton action={toast.action} /> : null}\n {toast.closable ? <ToastCloseButton /> : null}\n </ToastRoot>\n )\n}\n","import {\n ToastActionButton,\n type ToastActionButtonProps,\n} from \"./toast-action-button\"\nimport {\n ToastCloseButton,\n type ToastCloseButtonProps,\n} from \"./toast-close-button\"\nimport {ToastDescription, type ToastDescriptionProps} from \"./toast-description\"\nimport {ToastIcon, type ToastIconProps} from \"./toast-icon\"\nimport {ToastLabel, type ToastLabelProps} from \"./toast-label\"\nimport {ToastRoot, type ToastRootProps} from \"./toast-root\"\n\nexport * from \"./create-toaster\"\nexport * from \"./qds-toast-context\"\nexport * from \"./toaster\"\n\nexport type {\n ToastActionButtonProps,\n ToastCloseButtonProps,\n ToastDescriptionProps,\n ToastIconProps,\n ToastLabelProps,\n ToastRootProps,\n}\n\ntype ToastComponent = {\n ActionButton: typeof ToastActionButton\n CloseButton: typeof ToastCloseButton\n Description: typeof ToastDescription\n Icon: typeof ToastIcon\n Label: typeof ToastLabel\n Root: typeof ToastRoot\n}\n\nexport const Toast: ToastComponent = {\n ActionButton: ToastActionButton,\n CloseButton: ToastCloseButton,\n Description: ToastDescription,\n Icon: ToastIcon,\n Label: ToastLabel,\n Root: ToastRoot,\n}\n"],"mappings":"i7BAMA,GAAa,CAACE,EAAyBC,GACrCF,EAAkC,CAChCG,SAAU,qBACVC,aAAc,4BACdC,OAAQ,GACT,CAAC,CCYJ,SAAOW,kBAAAC,EAAA,CAAA,IAAAC,EAAAC,EAAA,EAAA,CAA2B,CAAAJ,SAAAK,SAAA,GAAAC,GAAAJ,EAMhCM,EAAoBX,EADDC,GAAoB,CACEW,mBAAoB,CAAEH,EAAM,CAAAI,EAAAP,EAAA,KAAAE,EAY3DK,EAAAP,EAAA,IALFO,EAAA,EAAC,EAAD,CACW,SAAA,UACDL,SACH,KAAA,KACG,QAAA,UACR,CAAA,CAAAF,EAAA,GAAAE,EAAAF,EAAA,GAAAO,GAAA,IAAAC,EAAAR,EAAA,KAAAH,EAAAY,OAAAT,EAAA,KAAAO,GARNC,EAAA,EAAC,EAAD,CACK,GAAA,SAED,OAAAD,WAQDV,EAAMY,MACY,CAAA,CAAAT,EAAA,GAAAH,EAAAY,MAAAT,EAAA,GAAAO,EAAAP,EAAA,GAAAQ,GAAAA,EAAAR,EAAA,GAAA,IAAAU,EACG,OADHV,EAAA,KAAAK,GAAAL,EAAA,KAAAQ,GAbvBE,EAAA,EAAA,EAAA,cAAA,CAAA,GAA6BL,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,EAAwB,CACnCN,aAAcb,kBACdc,YAAaZ,iBACba,YAAaX,iBACbY,KAAMV,UACNW,MAAOT,WACPU,KAAMR,UACP"}
|
package/dist/tooltip/index.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use client;";import{c as e}from"react/compiler-runtime";import{mergeProps as t}from"@qualcomm-ui/utils/merge-props";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{PolymorphicElement as i,bindingRenderProp as a}from"@qualcomm-ui/react-core/system";import{Portal as o}from"@qualcomm-ui/react-core/portal";import{tooltipClasses as s}from"@qualcomm-ui/qds-core/tooltip";import{TooltipContextProvider as c,useTooltip as l,useTooltipArrow as u,useTooltipArrowTip as d,useTooltipContent as f,useTooltipPositioner as p,useTooltipTrigger as m}from"@qualcomm-ui/react-core/tooltip";function TooltipArrowTip(r){let a=e(5),o=d(),c;a[0]!==o||a[1]!==r?(c=t(o,{className:s.arrowTip},r),a[0]=o,a[1]=r,a[2]=c):c=a[2];let l=c,u;return a[3]===l?u=a[4]:(u=n(i,{as:`div`,...l}),a[3]=l,a[4]=u),u}function TooltipArrow({children:e=n(TooltipArrowTip,{}),id:r,...a}){return n(i,{as:`div`,...t(u({id:r}),{className:s.arrow},a),children:e})}function TooltipContent(r){let a=e(5),{children:o,id:c,...l}=r,u;a[0]===c?u=a[1]:(u={id:c},a[0]=c,a[1]=u);let d=t(f(u),{className:s.content},l),p;return a[2]!==o||a[3]!==d?(p=n(i,{as:`div`,...d,children:o}),a[2]=o,a[3]=d,a[4]=p):p=a[4],p}function TooltipPositioner(r){let a=e(5),{children:o,id:c,...l}=r,u;a[0]===c?u=a[1]:(u={id:c},a[0]=c,a[1]=u);let d=t(p(u),{className:s.positioner},l),f;return a[2]!==o||a[3]!==d?(f=n(i,{as:`div`,...d,children:o}),a[2]=o,a[3]=d,a[4]=f):f=a[4],f}function TooltipRoot(t){let r=e(6),i,a;r[0]===t?(i=r[1],a=r[2]):({children:i,...a}=t,r[0]=t,r[1]=i,r[2]=a);let o=l(a),s;return r[3]!==i||r[4]!==o?(s=n(c,{value:o,children:i}),r[3]=i,r[4]=o,r[5]=s):s=r[5],s}function TooltipTrigger(n){let r=e(2),{children:i,id:o,...s}=n,c;return r[0]===o?c=r[1]:(c={id:o},r[0]=o,r[1]=c),a(i,t(m(c),s))}function Tooltip$1(t){let i=e(30),a,s,c,l,u,d,f,p,m;i[0]===t?(a=i[1],s=i[2],c=i[3],l=i[4],u=i[5],d=i[6],f=i[7],p=i[8],m=i[9]):({arrowProps:a,arrowTipProps:s,children:c,contentProps:l,hideArrow:u,portalProps:d,positionerProps:f,trigger:m,...p}=t,i[0]=t,i[1]=a,i[2]=s,i[3]=c,i[4]=l,i[5]=u,i[6]=d,i[7]=f,i[8]=p,i[9]=m);let h;i[10]===m?h=i[11]:(h=n(TooltipTrigger,{children:m}),i[10]=m,i[11]=h);let g;i[12]!==a||i[13]!==s||i[14]!==u?(g=u?null:n(TooltipArrow,{...a,children:n(TooltipArrowTip,{...s})}),i[12]=a,i[13]=s,i[14]=u,i[15]=g):g=i[15];let _;i[16]!==c||i[17]!==l||i[18]!==g?(_=r(TooltipContent,{...l,children:[g,c]}),i[16]=c,i[17]=l,i[18]=g,i[19]=_):_=i[19];let v;i[20]!==f||i[21]!==_?(v=n(TooltipPositioner,{...f,children:_}),i[20]=f,i[21]=_,i[22]=v):v=i[22];let y;i[23]!==d||i[24]!==v?(y=n(o,{...d,children:v}),i[23]=d,i[24]=v,i[25]=y):y=i[25];let b;return i[26]!==p||i[27]!==h||i[28]!==y?(b=r(TooltipRoot,{...p,children:[h,y]}),i[26]=p,i[27]=h,i[28]=y,i[29]=b):b=i[29],b}var h=Tooltip$1;h.ArrowTip=TooltipArrowTip,h.Arrow=TooltipArrow,h.Content=TooltipContent,h.Positioner=TooltipPositioner,h.Root=TooltipRoot,h.Trigger=TooltipTrigger;export{h as Tooltip};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/tooltip/tooltip.tsx", "../../src/tooltip/tooltip-arrow.tsx", "../../src/tooltip/tooltip-arrow-tip.tsx", "../../src/tooltip/tooltip-content.tsx", "../../src/tooltip/tooltip-positioner.tsx", "../../src/tooltip/tooltip-root.tsx", "../../src/tooltip/tooltip-trigger.tsx", "../../src/tooltip/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { Portal } from \"@qualcomm-ui/react-core/portal\";\nimport { TooltipArrow } from \"./tooltip-arrow\";\nimport { TooltipArrowTip } from \"./tooltip-arrow-tip\";\nimport { TooltipContent } from \"./tooltip-content\";\nimport { TooltipPositioner } from \"./tooltip-positioner\";\nimport { TooltipRoot } from \"./tooltip-root\";\nimport { TooltipTrigger } from \"./tooltip-trigger\";\nexport function Tooltip({\n arrowProps,\n arrowTipProps,\n children,\n contentProps,\n hideArrow,\n portalProps,\n positionerProps,\n trigger,\n ...props\n}) {\n return /* @__PURE__ */jsxs(TooltipRoot, {\n ...props,\n children: [/* @__PURE__ */jsx(TooltipTrigger, {\n children: trigger\n }), /* @__PURE__ */jsx(Portal, {\n ...portalProps,\n children: /* @__PURE__ */jsx(TooltipPositioner, {\n ...positionerProps,\n children: /* @__PURE__ */jsxs(TooltipContent, {\n ...contentProps,\n children: [hideArrow ? null : /* @__PURE__ */jsx(TooltipArrow, {\n ...arrowProps,\n children: /* @__PURE__ */jsx(TooltipArrowTip, {\n ...arrowTipProps\n })\n }), children]\n })\n })\n })]\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { tooltipClasses } from \"@qualcomm-ui/qds-core/tooltip\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { useTooltipArrow } from \"@qualcomm-ui/react-core/tooltip\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { TooltipArrowTip } from \"./tooltip-arrow-tip\";\nexport function TooltipArrow(t0) {\n const $ = _c(2);\n const {\n children: t1,\n id,\n ...props\n } = t0;\n const children = t1 === undefined ? jsx(TooltipArrowTip, {}) : 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 = useTooltipArrow(t2);\n const mergedProps = mergeProps(contextProps, {\n className: tooltipClasses.arrow\n }, props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { tooltipClasses } from \"@qualcomm-ui/qds-core/tooltip\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { useTooltipArrowTip } from \"@qualcomm-ui/react-core/tooltip\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TooltipArrowTip(props) {\n const $ = _c(3);\n const contextProps = useTooltipArrowTip();\n let t0;\n if ($[0] !== contextProps || $[1] !== props) {\n const mergedProps = mergeProps(contextProps, {\n className: tooltipClasses.arrowTip\n }, props);\n t0 = jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps\n });\n $[0] = contextProps;\n $[1] = props;\n $[2] = t0;\n } else {\n t0 = $[2];\n }\n return t0;\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { tooltipClasses } from \"@qualcomm-ui/qds-core/tooltip\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { useTooltipContent } from \"@qualcomm-ui/react-core/tooltip\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TooltipContent(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 = useTooltipContent(t1);\n const mergedProps = mergeProps(contextProps, {\n className: tooltipClasses.content\n }, props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { tooltipClasses } from \"@qualcomm-ui/qds-core/tooltip\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { useTooltipPositioner } from \"@qualcomm-ui/react-core/tooltip\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TooltipPositioner(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 = useTooltipPositioner(t1);\n const mergedProps = mergeProps(contextProps, {\n className: tooltipClasses.positioner\n }, props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { TooltipContextProvider, useTooltip } from \"@qualcomm-ui/react-core/tooltip\";\nexport function TooltipRoot(t0) {\n const $ = _c(6);\n let children;\n let props;\n if ($[0] !== t0) {\n ({\n children,\n ...props\n } = t0);\n $[0] = t0;\n $[1] = children;\n $[2] = props;\n } else {\n children = $[1];\n props = $[2];\n }\n const t1 = useTooltip(props);\n let t2;\n if ($[3] !== children || $[4] !== t1) {\n t2 = jsx(TooltipContextProvider, {\n value: t1,\n children\n });\n $[3] = children;\n $[4] = t1;\n $[5] = t2;\n } else {\n t2 = $[5];\n }\n return t2;\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { bindingRenderProp } from \"@qualcomm-ui/react-core/system\";\nimport { useTooltipTrigger } from \"@qualcomm-ui/react-core/tooltip\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function TooltipTrigger(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 = useTooltipTrigger(t1);\n const mergedProps = mergeProps(contextProps, props);\n return bindingRenderProp(children, mergedProps);\n}", "import { Tooltip as SimpleTooltip } from \"./tooltip\";\nimport { TooltipArrow } from \"./tooltip-arrow\";\nimport { TooltipArrowTip } from \"./tooltip-arrow-tip\";\nimport { TooltipContent } from \"./tooltip-content\";\nimport { TooltipPositioner } from \"./tooltip-positioner\";\nimport { TooltipRoot } from \"./tooltip-root\";\nimport { TooltipTrigger } from \"./tooltip-trigger\";\nexport const Tooltip = SimpleTooltip;\nTooltip.ArrowTip = TooltipArrowTip;\nTooltip.Arrow = TooltipArrow;\nTooltip.Content = TooltipContent;\nTooltip.Positioner = TooltipPositioner;\nTooltip.Root = TooltipRoot;\nTooltip.Trigger = TooltipTrigger;"],
|
|
5
|
-
"mappings": ";AAAA,OAAS,OAAAA,KAAK,SAAY,oBAC1B,OAAS,WAAc,iCCDvB,OAAS,KAAKC,QAAU,yBACxB,OAAS,OAAAC,SAAW,oBACpB,OAAS,kBAAAC,oBAAsB,gCAC/B,OAAS,sBAAAC,wBAA0B,iCACnC,OAAS,oBAAuB,kCAChC,OAAS,cAAAC,gBAAkB,iCCL3B,OAAS,KAAK,OAAU,yBACxB,OAAS,QAAW,oBACpB,OAAS,mBAAsB,gCAC/B,OAAS,uBAA0B,iCACnC,OAAS,uBAA0B,kCACnC,OAAS,eAAkB,iCACpB,SAAS,gBAAgB,MAAO,CACrC,IAAM,EAAI,GAAG,CAAC,EACR,aAAe,mBAAmB,EACpC,GACJ,GAAI,EAAE,CAAC,IAAM,cAAgB,EAAE,CAAC,IAAM,MAAO,CAC3C,IAAM,YAAc,WAAW,aAAc,CAC3C,UAAW,eAAe,QAC5B,EAAG,KAAK,EACR,GAAK,IAAI,mBAA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GACA,GACA,EAAE,CAAC,IAAM,IACX,GAAK,CACH,EACF,EACA,EAAE,CAAC,EAAI,GACP,EAAE,CAAC,EAAI,IAEP,GAAK,EAAE,CAAC,EAEV,IAAM,aAAe,kBAAkB,EAAE,EACnC,YAAcC,YAAW,aAAc,KAAK,EAClD,OAAO,kBAAkB,SAAU,WAAW,CAChD,CNhBO,SAAS,QAAQ,CACtB,WACA,cACA,SACA,aACA,UACA,YACA,gBACA,QACA,GAAG,KACL,EAAG,CACD,OAAsB,KAAK,YAAa,CACtC,GAAG,MACH,SAAU,CAAgBC,KAAI,eAAgB,CAC5C,SAAU,OACZ,CAAC,EAAkBA,KAAI,OAAQ,CAC7B,GAAG,YACH,SAAyBA,KAAI,kBAAmB,CAC9C,GAAG,gBACH,SAAyB,KAAK,eAAgB,CAC5C,GAAG,aACH,SAAU,CAAC,UAAY,KAAsBA,KAAI,aAAc,CAC7D,GAAG,WACH,SAAyBA,KAAI,gBAAiB,CAC5C,GAAG,aACL,CAAC,CACH,CAAC,EAAG,QAAQ,CACd,CAAC,CACH,CAAC,CACH,CAAC,CAAC,CACJ,CAAC,CACH,COhCO,IAAMC,SAAU,QACvBA,SAAQ,SAAW,gBACnBA,SAAQ,MAAQ,aAChBA,SAAQ,QAAU,eAClBA,SAAQ,WAAa,kBACrBA,SAAQ,KAAO,YACfA,SAAQ,QAAU",
|
|
6
|
-
"names": ["jsx", "_c", "jsx", "tooltipClasses", "PolymorphicElement", "mergeProps", "_c", "jsx", "mergeProps", "tooltipClasses", "PolymorphicElement", "_c", "jsx", "tooltipClasses", "PolymorphicElement", "mergeProps", "_c", "jsx", "tooltipClasses", "PolymorphicElement", "mergeProps", "_c", "jsx", "_c", "mergeProps", "jsx", "Tooltip"]
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ReactElement","tooltipClasses","ElementRenderProp","PolymorphicElement","useTooltipArrowTip","mergeProps","TooltipArrowTipProps","TooltipArrowTip","props","$","_c","contextProps","t0","className","arrowTip","mergedProps","t1","ReactElement","ReactNode","tooltipClasses","ElementRenderProp","PolymorphicElement","useTooltipArrow","mergeProps","TooltipArrowTip","TooltipArrowProps","children","TooltipArrow","id","props","contextProps","mergedProps","className","arrow","ReactElement","ReactNode","tooltipClasses","ElementRenderProp","IdProp","PolymorphicElement","useTooltipContent","mergeProps","TooltipContentProps","children","TooltipContent","t0","$","_c","id","props","t1","contextProps","mergedProps","className","content","t2","ReactElement","ReactNode","tooltipClasses","ElementRenderProp","IdProp","PolymorphicElement","useTooltipPositioner","mergeProps","TooltipPositionerProps","children","TooltipPositioner","t0","$","_c","id","props","t1","contextProps","mergedProps","className","positioner","t2","ReactNode","TooltipApiProps","TooltipContextProvider","useTooltip","TooltipRootProps","children","TooltipRoot","t0","$","_c","props","t1","t2","ReactElement","TooltipTriggerBindings","bindingRenderProp","BindingRenderProp","IdProp","useTooltipTrigger","mergeProps","TooltipTriggerProps","children","TooltipTrigger","t0","$","_c","id","props","t1","contextProps","mergedProps","ReactElement","ReactNode","TooltipTriggerBindings","Portal","PortalProps","BindingRenderProp","TooltipArrow","TooltipArrowProps","TooltipArrowTip","TooltipArrowTipProps","TooltipContent","TooltipContentProps","TooltipPositioner","TooltipPositionerProps","TooltipRoot","TooltipRootProps","TooltipTrigger","TooltipProps","Omit","arrowProps","arrowTipProps","children","contentProps","hideArrow","portalProps","positionerProps","trigger","Tooltip","t0","$","_c","props","t1","t2","t3","t4","t5","t6","Tooltip","SimpleTooltip","TooltipArrow","TooltipArrowProps","TooltipArrowTip","TooltipArrowTipProps","TooltipContent","TooltipContentProps","TooltipPositioner","TooltipPositionerProps","TooltipRoot","TooltipRootProps","TooltipTrigger","TooltipTriggerProps","TooltipComponent","Arrow","ArrowTip","Content","Positioner","Root","Trigger"],"sources":["../../src/tooltip/tooltip-arrow-tip.tsx","../../src/tooltip/tooltip-arrow.tsx","../../src/tooltip/tooltip-content.tsx","../../src/tooltip/tooltip-positioner.tsx","../../src/tooltip/tooltip-root.tsx","../../src/tooltip/tooltip-trigger.tsx","../../src/tooltip/tooltip.tsx","../../src/tooltip/index.ts"],"sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement} from \"react\"\n\nimport {tooltipClasses} from \"@qualcomm-ui/qds-core/tooltip\"\nimport {\n type ElementRenderProp,\n PolymorphicElement,\n} from \"@qualcomm-ui/react-core/system\"\nimport {useTooltipArrowTip} from \"@qualcomm-ui/react-core/tooltip\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nexport interface TooltipArrowTipProps extends ElementRenderProp<\"div\"> {}\n\n/**\n * The arrow tip element. Renders a `<div>` element by default.\n */\nexport function TooltipArrowTip(props: TooltipArrowTipProps): ReactElement {\n const contextProps = useTooltipArrowTip()\n const mergedProps = mergeProps(\n contextProps,\n {className: tooltipClasses.arrowTip},\n props,\n )\n\n return <PolymorphicElement as=\"div\" {...mergedProps} />\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement, ReactNode} from \"react\"\n\nimport {tooltipClasses} from \"@qualcomm-ui/qds-core/tooltip\"\nimport {\n type ElementRenderProp,\n PolymorphicElement,\n} from \"@qualcomm-ui/react-core/system\"\nimport {useTooltipArrow} from \"@qualcomm-ui/react-core/tooltip\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {TooltipArrowTip} from \"./tooltip-arrow-tip\"\n\nexport interface TooltipArrowProps extends ElementRenderProp<\"div\"> {\n /**\n * React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.\n */\n children?: ReactNode\n}\n\n/**\n * The container that positions the arrow. This element renders the\n * `<Tooltip.ArrowTip/>` by default if no children are provided.\n */\nexport function TooltipArrow({\n children = <TooltipArrowTip />,\n id,\n ...props\n}: TooltipArrowProps): ReactElement {\n const contextProps = useTooltipArrow({id})\n const mergedProps = mergeProps(\n contextProps,\n {className: tooltipClasses.arrow},\n props,\n )\n\n return (\n <PolymorphicElement as=\"div\" {...mergedProps}>\n {children}\n </PolymorphicElement>\n )\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement, ReactNode} from \"react\"\n\nimport {tooltipClasses} from \"@qualcomm-ui/qds-core/tooltip\"\nimport {\n type ElementRenderProp,\n type IdProp,\n PolymorphicElement,\n} from \"@qualcomm-ui/react-core/system\"\nimport {useTooltipContent} from \"@qualcomm-ui/react-core/tooltip\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nexport interface TooltipContentProps extends IdProp, ElementRenderProp<\"div\"> {\n /**\n * React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.\n */\n children?: ReactNode\n}\n\n/**\n * The content of the tooltip which is displayed relative to the trigger. Renders a\n * `<div>` element by default.\n */\nexport function TooltipContent({\n children,\n id,\n ...props\n}: TooltipContentProps): ReactElement {\n const contextProps = useTooltipContent({id})\n const mergedProps = mergeProps(\n contextProps,\n {className: tooltipClasses.content},\n props,\n )\n\n return (\n <PolymorphicElement as=\"div\" {...mergedProps}>\n {children}\n </PolymorphicElement>\n )\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement, ReactNode} from \"react\"\n\nimport {tooltipClasses} from \"@qualcomm-ui/qds-core/tooltip\"\nimport {\n type ElementRenderProp,\n type IdProp,\n PolymorphicElement,\n} from \"@qualcomm-ui/react-core/system\"\nimport {useTooltipPositioner} from \"@qualcomm-ui/react-core/tooltip\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nexport interface TooltipPositionerProps\n extends IdProp, ElementRenderProp<\"div\"> {\n /**\n * React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.\n */\n children?: ReactNode\n}\n\n/**\n * The element that positions the tooltip content relative to the trigger. Renders a\n * `<div>` element by default.\n */\nexport function TooltipPositioner({\n children,\n id,\n ...props\n}: TooltipPositionerProps): ReactElement {\n const contextProps = useTooltipPositioner({id})\n const mergedProps = mergeProps(\n contextProps,\n {className: tooltipClasses.positioner},\n props,\n )\n\n return (\n <PolymorphicElement as=\"div\" {...mergedProps}>\n {children}\n </PolymorphicElement>\n )\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactNode} from \"react\"\n\nimport type {TooltipApiProps} from \"@qualcomm-ui/core/tooltip\"\nimport {\n TooltipContextProvider,\n useTooltip,\n} from \"@qualcomm-ui/react-core/tooltip\"\n\nexport interface TooltipRootProps extends TooltipApiProps {\n /**\n * React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.\n */\n children?: ReactNode\n}\n\n/**\n * The main component that wraps the trigger and the content elements. Doesn't\n * render anything by itself.\n */\nexport function TooltipRoot({children, ...props}: TooltipRootProps) {\n return (\n <TooltipContextProvider value={useTooltip(props)}>\n {children}\n </TooltipContextProvider>\n )\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement} from \"react\"\n\nimport type {TooltipTriggerBindings} from \"@qualcomm-ui/core/tooltip\"\nimport {\n bindingRenderProp,\n type BindingRenderProp,\n type IdProp,\n} from \"@qualcomm-ui/react-core/system\"\nimport {useTooltipTrigger} from \"@qualcomm-ui/react-core/tooltip\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nexport interface TooltipTriggerProps extends IdProp {\n /**\n * React children {@link\n * https://react-next.qui.qualcomm.com/render-props#binding-render-prop\n * Render Prop}\n *\n * @inheritDoc\n */\n children: BindingRenderProp<TooltipTriggerBindings>\n}\n\n/**\n * A trigger that opens the tooltip. Doesn't render anything by itself. Applies\n * event handlers and attributes to the child element.\n */\nexport function TooltipTrigger({\n children,\n id,\n ...props\n}: TooltipTriggerProps): ReactElement | null {\n const contextProps = useTooltipTrigger({id})\n\n const mergedProps = mergeProps(contextProps, props)\n\n return bindingRenderProp(children, mergedProps)\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {ReactElement, ReactNode} from \"react\"\n\nimport type {TooltipTriggerBindings} from \"@qualcomm-ui/core/tooltip\"\nimport {Portal, type PortalProps} from \"@qualcomm-ui/react-core/portal\"\nimport type {BindingRenderProp} from \"@qualcomm-ui/react-core/system\"\n\nimport {TooltipArrow, type TooltipArrowProps} from \"./tooltip-arrow\"\nimport {TooltipArrowTip, type TooltipArrowTipProps} from \"./tooltip-arrow-tip\"\nimport {TooltipContent, type TooltipContentProps} from \"./tooltip-content\"\nimport {\n TooltipPositioner,\n type TooltipPositionerProps,\n} from \"./tooltip-positioner\"\nimport {TooltipRoot, type TooltipRootProps} from \"./tooltip-root\"\nimport {TooltipTrigger} from \"./tooltip-trigger\"\n\nexport interface TooltipProps extends Omit<TooltipRootProps, \"children\"> {\n /**\n * Props applied to the arrow element.\n *\n * @inheritDoc\n */\n arrowProps?: TooltipArrowProps\n\n /**\n * Props applied to the arrow tip element.\n *\n * @inheritDoc\n */\n arrowTipProps?: TooltipArrowTipProps\n\n /**\n * The text content of the tooltip.\n */\n children?: ReactNode\n\n /**\n * Props applied to the content element.\n *\n * @inheritDoc\n */\n contentProps?: TooltipContentProps\n\n /**\n * Whether to hide the arrow.\n *\n * @default false\n */\n hideArrow?: boolean\n\n /**\n * Props applied to the portal element.\n *\n * @inheritDoc\n */\n portalProps?: PortalProps\n\n /**\n * Props applied to the positioner element.\n *\n * @inheritDoc\n */\n positionerProps?: TooltipPositionerProps\n\n /**\n * React children render prop. The tooltip trigger event handlers and attributes\n * are applied to this element. It must forward its\n * {@link https://react.dev/blog/2024/12/05/react-19#ref-as-a-prop ref}\n *\n * @inheritDoc\n */\n trigger: BindingRenderProp<TooltipTriggerBindings>\n}\n\nexport function Tooltip({\n arrowProps,\n arrowTipProps,\n children,\n contentProps,\n hideArrow,\n portalProps,\n positionerProps,\n trigger,\n ...props\n}: TooltipProps): ReactElement {\n return (\n <TooltipRoot {...props}>\n <TooltipTrigger>{trigger}</TooltipTrigger>\n <Portal {...portalProps}>\n <TooltipPositioner {...positionerProps}>\n <TooltipContent {...contentProps}>\n {hideArrow ? null : (\n <TooltipArrow {...arrowProps}>\n <TooltipArrowTip {...arrowTipProps} />\n </TooltipArrow>\n )}\n {children}\n </TooltipContent>\n </TooltipPositioner>\n </Portal>\n </TooltipRoot>\n )\n}\n","import {Tooltip as SimpleTooltip} from \"./tooltip\"\nimport {TooltipArrow, type TooltipArrowProps} from \"./tooltip-arrow\"\nimport {TooltipArrowTip, type TooltipArrowTipProps} from \"./tooltip-arrow-tip\"\nimport {TooltipContent, type TooltipContentProps} from \"./tooltip-content\"\nimport {\n TooltipPositioner,\n type TooltipPositionerProps,\n} from \"./tooltip-positioner\"\nimport {TooltipRoot, type TooltipRootProps} from \"./tooltip-root\"\nimport {TooltipTrigger, type TooltipTriggerProps} from \"./tooltip-trigger\"\n\nexport type {\n TooltipArrowTipProps,\n TooltipArrowProps,\n TooltipContentProps,\n TooltipPositionerProps,\n TooltipRootProps,\n TooltipTriggerProps,\n}\n\ntype TooltipComponent = typeof SimpleTooltip & {\n /**\n * The container that positions the arrow. This element renders the\n * `<Tooltip.ArrowTip/>` by default if no children are provided.\n */\n Arrow: typeof TooltipArrow\n /**\n * The arrow tip element. Renders a `<div>` element by default.\n */\n ArrowTip: typeof TooltipArrowTip\n /**\n * The content of the tooltip which is displayed relative to the trigger. Renders a\n * `<div>` element by default.\n */\n Content: typeof TooltipContent\n /**\n * The element that positions the tooltip content relative to the trigger. Renders\n * a `<div>` element by default.\n */\n Positioner: typeof TooltipPositioner\n /**\n * The main component that wraps the trigger and the content elements. Doesn't\n * render anything by itself.\n */\n Root: typeof TooltipRoot\n /**\n * A trigger that opens the tooltip. Doesn't render anything by itself. Applies\n * event handlers and attributes to the child element.\n */\n Trigger: typeof TooltipTrigger\n}\n\nexport const Tooltip: TooltipComponent = SimpleTooltip as TooltipComponent\n\nTooltip.ArrowTip = TooltipArrowTip\nTooltip.Arrow = TooltipArrow\nTooltip.Content = TooltipContent\nTooltip.Positioner = TooltipPositioner\nTooltip.Root = TooltipRoot\nTooltip.Trigger = TooltipTrigger\n"],"mappings":"ukBAkBA,SAAOO,gBAAAC,EAAA,CAAA,IAAAC,EAAAC,EAAA,EAAA,CACLC,EAAqBP,GAAoB,CAAAQ,EAAAH,EAAA,KAAAE,GAAAF,EAAA,KAAAD,GACrBI,EAAAP,EAClBM,EACA,CAAAE,UAAYZ,EAAca,SAAU,CACpCN,EACD,CAAAC,EAAA,GAAAE,EAAAF,EAAA,GAAAD,EAAAC,EAAA,GAAAG,GAAAA,EAAAH,EAAA,GAJD,IAAAM,EAAoBH,EAInBI,EAEsD,OAFtDP,EAAA,KAAAM,EAEsDC,EAAAP,EAAA,IAAhDO,EAAA,EAAC,EAAD,CAAuB,GAAA,MAAK,GAAKD,EAAe,CAAA,CAAAN,EAAA,GAAAM,EAAAN,EAAA,GAAAO,GAAhDA,ECAT,SAAgBW,aAAa,CAC3BD,WAAW,EAAC,gBAAD,EAAmB,CAAA,CAC9BE,KACA,GAAGC,GAC+B,CAQlC,OACE,EAAC,EAAD,CAAoB,GAAG,MAAM,GAPXN,EADCD,EAAgB,CAACM,KAAG,CAAC,CAGxC,CAACI,UAAWb,EAAec,MAAM,CACjCJ,EACD,CAIIH,WACkB,CAAA,CChBzB,SAAOkB,eAAAC,EAAA,CAAA,IAAAC,EAAAC,EAAA,EAAA,CAAwB,CAAAJ,WAAAK,KAAA,GAAAC,GAAAJ,EAITK,EAAAJ,EAAA,KAAAE,EACuBE,EAAAJ,EAAA,IAAJI,EAAA,CAAAF,KA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AQoB,QAAUR"}
|
package/dist/tree/index.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{c as _c}from"react/compiler-runtime";import{jsx}from"react/jsx-runtime";import{Collapsible}from"@qualcomm-ui/react/collapsible";import{useTreeBranch}from"@qualcomm-ui/react-core/tree";import{mergeProps}from"@qualcomm-ui/utils/merge-props";import{createGuardedContext}from"@qualcomm-ui/react-core/context";var[QdsTreeContextProvider,useQdsTreeContext]=createGuardedContext({hookName:"useQdsTreeContext",providerName:"<QdsTreeContextProvider>",strict:!0});function TreeBranch(props){let $=_c(4),qdsContext=useQdsTreeContext(),treeBranchProps=useTreeBranch(),t0;if($[0]!==props||$[1]!==qdsContext||$[2]!==treeBranchProps){let mergedProps=mergeProps(qdsContext.getBranchBindings(),treeBranchProps,props);t0=jsx(Collapsible.Root,{...mergedProps}),$[0]=props,$[1]=qdsContext,$[2]=treeBranchProps,$[3]=t0}else t0=$[3];return t0}import{c as _c2}from"react/compiler-runtime";import{jsx as jsx2}from"react/jsx-runtime";import{Collapsible as Collapsible2}from"@qualcomm-ui/react/collapsible";import{useTreeBranchContent}from"@qualcomm-ui/react-core/tree";import{mergeProps as mergeProps2}from"@qualcomm-ui/utils/merge-props";function TreeBranchContent(props){let $=_c2(4),qdsContext=useQdsTreeContext(),treeBranchContentProps=useTreeBranchContent(),t0;if($[0]!==props||$[1]!==qdsContext||$[2]!==treeBranchContentProps){let mergedProps=mergeProps2(qdsContext.getBranchContentBindings(),treeBranchContentProps,props);t0=jsx2(Collapsible2.Content,{...mergedProps}),$[0]=props,$[1]=qdsContext,$[2]=treeBranchContentProps,$[3]=t0}else t0=$[3];return t0}import{c as _c3}from"react/compiler-runtime";import{jsx as jsx3}from"react/jsx-runtime";import{CoreTree}from"@qualcomm-ui/react-core/tree";import{mergeProps as mergeProps3}from"@qualcomm-ui/utils/merge-props";function TreeBranchIndentGuide(props){let $=_c3(3),qdsContext=useQdsTreeContext(),t0;if($[0]!==props||$[1]!==qdsContext){let mergedProps=mergeProps3(qdsContext.getBranchIndentGuideBindings(),props);t0=jsx3(CoreTree.BranchIndentGuide,{...mergedProps}),$[0]=props,$[1]=qdsContext,$[2]=t0}else t0=$[2];return t0}import{c as _c4}from"react/compiler-runtime";import{jsx as jsx4}from"react/jsx-runtime";import{CoreTree as CoreTree2}from"@qualcomm-ui/react-core/tree";import{mergeProps as mergeProps4}from"@qualcomm-ui/utils/merge-props";function TreeBranchNode(props){let $=_c4(3),qdsContext=useQdsTreeContext(),t0;if($[0]!==props||$[1]!==qdsContext){let mergedProps=mergeProps4(qdsContext.getBranchNodeBindings(),props);t0=jsx4(CoreTree2.BranchNode,{...mergedProps}),$[0]=props,$[1]=qdsContext,$[2]=t0}else t0=$[2];return t0}import{jsx as jsx5}from"react/jsx-runtime";import{ChevronRight}from"lucide-react";import{IconOrNode}from"@qualcomm-ui/react/icon";import{CoreTree as CoreTree3}from"@qualcomm-ui/react-core/tree";import{mergeProps as mergeProps5}from"@qualcomm-ui/utils/merge-props";function TreeBranchTrigger(t0){let{icon:t1,...props}=t0,icon=t1===void 0?ChevronRight:t1,qdsContext=useQdsTreeContext(),mergedProps=mergeProps5(qdsContext.getBranchTriggerBindings(),props);return jsx5(CoreTree3.BranchTrigger,{...mergedProps,children:jsx5(IconOrNode,{icon})})}import{c as _c5}from"react/compiler-runtime";import{renderProp}from"@qualcomm-ui/react-core/system";import{useTreeContext}from"@qualcomm-ui/react-core/tree";function TreeContext(t0){let $=_c5(3),{children}=t0,treeContext=useTreeContext(),t1;return $[0]!==children||$[1]!==treeContext?(t1=renderProp(children,treeContext),$[0]=children,$[1]=treeContext,$[2]=t1):t1=$[2],t1}import{c as _c6}from"react/compiler-runtime";import{jsx as jsx6}from"react/jsx-runtime";import{CoreTree as CoreTree4}from"@qualcomm-ui/react-core/tree";import{mergeProps as mergeProps6}from"@qualcomm-ui/utils/merge-props";function TreeLabel(props){let $=_c6(3),qdsContext=useQdsTreeContext(),t0;if($[0]!==props||$[1]!==qdsContext){let mergedProps=mergeProps6(qdsContext.getLabelBindings(),props);t0=jsx6(CoreTree4.Label,{...mergedProps}),$[0]=props,$[1]=qdsContext,$[2]=t0}else t0=$[2];return t0}import{c as _c7}from"react/compiler-runtime";import{jsx as jsx7}from"react/jsx-runtime";import{CoreTree as CoreTree5}from"@qualcomm-ui/react-core/tree";import{mergeProps as mergeProps7}from"@qualcomm-ui/utils/merge-props";function TreeLeafNode(props){let $=_c7(3),qdsContext=useQdsTreeContext(),t0;if($[0]!==props||$[1]!==qdsContext){let mergedProps=mergeProps7(qdsContext.getLeafNodeBindings(),props);t0=jsx7(CoreTree5.LeafNode,{...mergedProps}),$[0]=props,$[1]=qdsContext,$[2]=t0}else t0=$[2];return t0}import{c as _c8}from"react/compiler-runtime";import{jsx as jsx8}from"react/jsx-runtime";import{InlineIconButton}from"@qualcomm-ui/react/inline-icon-button";import{CoreTree as CoreTree6}from"@qualcomm-ui/react-core/tree";import{mergeProps as mergeProps8}from"@qualcomm-ui/utils/merge-props";function TreeNodeAction(props){let $=_c8(3),qdsContext=useQdsTreeContext(),t0;if($[0]!==props||$[1]!==qdsContext){let mergedProps=mergeProps8(qdsContext.getNodeActionBindings(),props);t0=jsx8(CoreTree6.NodeAction,{render:jsx8(InlineIconButton,{icon:props.icon}),...mergedProps}),$[0]=props,$[1]=qdsContext,$[2]=t0}else t0=$[2];return t0}import{c as _c9}from"react/compiler-runtime";import{jsx as jsx9}from"react/jsx-runtime";import"react";import{createQdsCheckmarkApi}from"@qualcomm-ui/qds-core/checkmark";import{CheckmarkCheckedIcon,CheckmarkIndeterminateIcon}from"@qualcomm-ui/react/checkmark";import{normalizeProps}from"@qualcomm-ui/react-core/machine";import{CoreTree as CoreTree7,useTreeNodeStateContext}from"@qualcomm-ui/react-core/tree";import{mergeProps as mergeProps9}from"@qualcomm-ui/utils/merge-props";function TreeNodeCheckbox(props){let $=_c9(7),nodeState=useTreeNodeStateContext(),t0=nodeState.checked===!0,t1=nodeState.checked==="indeterminate",t2;$[0]!==nodeState.disabled||$[1]!==t0||$[2]!==t1?(t2=createQdsCheckmarkApi({checked:t0,disabled:nodeState.disabled,indeterminate:t1,size:"md"},normalizeProps),$[0]=nodeState.disabled,$[1]=t0,$[2]=t1,$[3]=t2):t2=$[3];let api=t2,t3;if($[4]!==api||$[5]!==props){let mergedProps=mergeProps9(api.getRootBindings(),props);t3=jsx9(CoreTree7.NodeCheckbox,{...mergedProps,checked:props.checked||jsx9(CheckmarkCheckedIcon,{}),indeterminate:props.indeterminate||jsx9(CheckmarkIndeterminateIcon,{})}),$[4]=api,$[5]=props,$[6]=t3}else t3=$[6];return t3}import{c as _c10}from"react/compiler-runtime";import{jsx as jsx10}from"react/jsx-runtime";import{IconOrNode as IconOrNode2}from"@qualcomm-ui/react/icon";import{useTreeContext as useTreeContext2,useTreeNodePropsContext}from"@qualcomm-ui/react-core/tree";import{mergeProps as mergeProps10}from"@qualcomm-ui/utils/merge-props";function TreeNodeIcon(props){let $=_c10(5),treeContext=useTreeContext2(),nodeProps=useTreeNodePropsContext(),qdsTreeContext=useQdsTreeContext(),t0;if($[0]!==nodeProps||$[1]!==props||$[2]!==qdsTreeContext||$[3]!==treeContext){let mergedProps=mergeProps10(treeContext.getNodeIconBindings(nodeProps),qdsTreeContext.getNodeIconBindings(),props);t0=jsx10(IconOrNode2,{...mergedProps}),$[0]=nodeProps,$[1]=props,$[2]=qdsTreeContext,$[3]=treeContext,$[4]=t0}else t0=$[4];return t0}import{c as _c11}from"react/compiler-runtime";import{jsx as jsx11}from"react/jsx-runtime";import{CoreTree as CoreTree8}from"@qualcomm-ui/react-core/tree";import{mergeProps as mergeProps11}from"@qualcomm-ui/utils/merge-props";function TreeNodeIndicator(props){let $=_c11(3),qdsContext=useQdsTreeContext(),t0;if($[0]!==props||$[1]!==qdsContext){let mergedProps=mergeProps11(qdsContext.getNodeIndicatorBindings(),props);t0=jsx11(CoreTree8.NodeIndicator,{...mergedProps}),$[0]=props,$[1]=qdsContext,$[2]=t0}else t0=$[2];return t0}import{c as _c12}from"react/compiler-runtime";import{jsx as jsx12}from"react/jsx-runtime";import"react";import{TreeNodePropsContextProvider,TreeNodeStateContextProvider,useTreeContext as useTreeContext3}from"@qualcomm-ui/react-core/tree";function TreeNodeProvider(t0){let $=_c12(10),{children,indexPath,node}=t0,treeContext=useTreeContext3(),t1;$[0]!==indexPath||$[1]!==node?(t1={indexPath,node},$[0]=indexPath,$[1]=node,$[2]=t1):t1=$[2];let nodeProps=t1,t2;$[3]!==nodeProps||$[4]!==treeContext?(t2=treeContext.getNodeState(nodeProps),$[3]=nodeProps,$[4]=treeContext,$[5]=t2):t2=$[5];let nodeState=t2,t3;return $[6]!==children||$[7]!==nodeProps||$[8]!==nodeState?(t3=jsx12(TreeNodeStateContextProvider,{value:nodeState,children:jsx12(TreeNodePropsContextProvider,{value:nodeProps,children})}),$[6]=children,$[7]=nodeProps,$[8]=nodeState,$[9]=t3):t3=$[9],t3}import{jsx as jsx13}from"react/jsx-runtime";import{CoreTree as CoreTree9}from"@qualcomm-ui/react-core/tree";function TreeNodeText(props){return jsx13(CoreTree9.NodeText,{...props})}import{c as _c13}from"react/compiler-runtime";import{jsx as jsx14,jsxs}from"react/jsx-runtime";import{renderProp as renderProp2}from"@qualcomm-ui/react-core/system";import{useTreeContext as useTreeContext4}from"@qualcomm-ui/react-core/tree";function TreeNodes(props){let $=_c13(13),context=useTreeContext4(),{indentGuideProps,indexPath,node,renderBranch,renderLeaf,showIndentGuide}=props,{collection}=context,t0;$[0]!==collection||$[1]!==node?(t0=collection.getNodeChildren(node),$[0]=collection,$[1]=node,$[2]=t0):t0=$[2];let childNodes=t0,t1;return $[3]!==childNodes.length||$[4]!==collection||$[5]!==indentGuideProps||$[6]!==indexPath||$[7]!==node||$[8]!==props||$[9]!==renderBranch||$[10]!==renderLeaf||$[11]!==showIndentGuide?(t1=jsx14(TreeNodeProvider,{...props,children:childNodes.length?jsxs(TreeBranch,{children:[renderProp2(renderBranch,props),jsxs(TreeBranchContent,{children:[showIndentGuide?jsx14(TreeBranchIndentGuide,{...indentGuideProps}):null,collection.getNodeChildren(node).map((childNode,index)=>jsx14(TreeNodes,{indexPath:[...indexPath,index],node:childNode,renderBranch:props.renderBranch,renderLeaf:props.renderLeaf,showIndentGuide},collection.getNodeValue(childNode)))]})]}):renderProp2(renderLeaf,props)}),$[3]=childNodes.length,$[4]=collection,$[5]=indentGuideProps,$[6]=indexPath,$[7]=node,$[8]=props,$[9]=renderBranch,$[10]=renderLeaf,$[11]=showIndentGuide,$[12]=t1):t1=$[12],t1}import{c as _c14}from"react/compiler-runtime";import{jsx as jsx15}from"react/jsx-runtime";import"react";import{createQdsTreeApi}from"@qualcomm-ui/qds-core/tree";import{normalizeProps as normalizeProps2}from"@qualcomm-ui/react-core/machine";import{CoreTree as CoreTree10}from"@qualcomm-ui/react-core/tree";import{mergeProps as mergeProps12}from"@qualcomm-ui/utils/merge-props";function TreeRoot(t0){let $=_c14(4),t1;if($[0]!==t0){let{size,...props}=t0,t2;$[2]!==size?(t2=createQdsTreeApi({size},normalizeProps2),$[2]=size,$[3]=t2):t2=$[3];let qdsContext=t2,mergedProps=mergeProps12(qdsContext.getRootBindings(),props);t1=jsx15(QdsTreeContextProvider,{value:qdsContext,children:jsx15(CoreTree10.Root,{...mergedProps})}),$[0]=t0,$[1]=t1}else t1=$[1];return t1}var Tree={Branch:TreeBranch,BranchContent:TreeBranchContent,BranchIndentGuide:TreeBranchIndentGuide,BranchNode:TreeBranchNode,BranchTrigger:TreeBranchTrigger,Context:TreeContext,Label:TreeLabel,LeafNode:TreeLeafNode,NodeAction:TreeNodeAction,NodeCheckbox:TreeNodeCheckbox,NodeIcon:TreeNodeIcon,NodeIndicator:TreeNodeIndicator,NodeProvider:TreeNodeProvider,Nodes:TreeNodes,NodeText:TreeNodeText,Root:TreeRoot};export{QdsTreeContextProvider,Tree,useQdsTreeContext};
|
|
3
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use client;";import{c as e}from"react/compiler-runtime";import{Collapsible as t}from"@qualcomm-ui/react/collapsible";import{mergeProps as n}from"@qualcomm-ui/utils/merge-props";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{renderProp as a}from"@qualcomm-ui/react-core/system";import{ChevronRight as o}from"lucide-react";import{IconOrNode as s}from"@qualcomm-ui/react/icon";import"react";import{normalizeProps as c}from"@qualcomm-ui/react-core/machine";import{createGuardedContext as l}from"@qualcomm-ui/react-core/context";import{CheckmarkCheckedIcon as u,CheckmarkIndeterminateIcon as d}from"@qualcomm-ui/react/checkmark";import{createQdsCheckmarkApi as f}from"@qualcomm-ui/qds-core/checkmark";import{InlineIconButton as p}from"@qualcomm-ui/react/inline-icon-button";import{CoreTree as m,TreeNodePropsContextProvider as h,TreeNodeStateContextProvider as g,useTreeBranch as _,useTreeBranchContent as v,useTreeContext as y,useTreeNodePropsContext as b,useTreeNodeStateContext as x}from"@qualcomm-ui/react-core/tree";import{createQdsTreeApi as S}from"@qualcomm-ui/qds-core/tree";var[C,w]=l({hookName:`useQdsTreeContext`,providerName:`<QdsTreeContextProvider>`,strict:!0});function TreeBranch(i){let a=e(6),o=w(),s=_(),c;a[0]!==i||a[1]!==o||a[2]!==s?(c=n(o.getBranchBindings(),s,i),a[0]=i,a[1]=o,a[2]=s,a[3]=c):c=a[3];let l=c,u;return a[4]===l?u=a[5]:(u=r(t.Root,{...l}),a[4]=l,a[5]=u),u}function TreeBranchContent(i){let a=e(6),o=w(),s=v(),c;a[0]!==i||a[1]!==o||a[2]!==s?(c=n(o.getBranchContentBindings(),s,i),a[0]=i,a[1]=o,a[2]=s,a[3]=c):c=a[3];let l=c,u;return a[4]===l?u=a[5]:(u=r(t.Content,{...l}),a[4]=l,a[5]=u),u}function TreeBranchIndentGuide(t){let i=e(5),a=w(),o;i[0]!==t||i[1]!==a?(o=n(a.getBranchIndentGuideBindings(),t),i[0]=t,i[1]=a,i[2]=o):o=i[2];let s=o,c;return i[3]===s?c=i[4]:(c=r(m.BranchIndentGuide,{...s}),i[3]=s,i[4]=c),c}function TreeBranchNode(t){let i=e(5),a=w(),o;i[0]!==t||i[1]!==a?(o=n(a.getBranchNodeBindings(),t),i[0]=t,i[1]=a,i[2]=o):o=i[2];let s=o,c;return i[3]===s?c=i[4]:(c=r(m.BranchNode,{...s}),i[3]=s,i[4]=c),c}function TreeBranchTrigger(t){let i=e(5),{icon:a,...c}=t,l=a===void 0?o:a,u=n(w().getBranchTriggerBindings(),c),d;i[0]===l?d=i[1]:(d=r(s,{icon:l}),i[0]=l,i[1]=d);let f;return i[2]!==u||i[3]!==d?(f=r(m.BranchTrigger,{...u,children:d}),i[2]=u,i[3]=d,i[4]=f):f=i[4],f}function TreeContext(t){let n=e(3),{children:r}=t,i=y(),o;return n[0]!==r||n[1]!==i?(o=a(r,i),n[0]=r,n[1]=i,n[2]=o):o=n[2],o}function TreeLabel(t){let i=e(5),a=w(),o;i[0]!==t||i[1]!==a?(o=n(a.getLabelBindings(),t),i[0]=t,i[1]=a,i[2]=o):o=i[2];let s=o,c;return i[3]===s?c=i[4]:(c=r(m.Label,{...s}),i[3]=s,i[4]=c),c}function TreeLeafNode(t){let i=e(5),a=w(),o;i[0]!==t||i[1]!==a?(o=n(a.getLeafNodeBindings(),t),i[0]=t,i[1]=a,i[2]=o):o=i[2];let s=o,c;return i[3]===s?c=i[4]:(c=r(m.LeafNode,{...s}),i[3]=s,i[4]=c),c}function TreeNodeAction(t){let i=e(8),a=w(),o;i[0]!==t||i[1]!==a?(o=n(a.getNodeActionBindings(),t),i[0]=t,i[1]=a,i[2]=o):o=i[2];let s=o,c;i[3]===t.icon?c=i[4]:(c=r(p,{icon:t.icon}),i[3]=t.icon,i[4]=c);let l;return i[5]!==s||i[6]!==c?(l=r(m.NodeAction,{render:c,...s}),i[5]=s,i[6]=c,i[7]=l):l=i[7],l}function TreeNodeCheckbox(t){let i=e(15),a=x(),o=a.checked===!0,s=a.checked===`indeterminate`,l;i[0]!==a.disabled||i[1]!==o||i[2]!==s?(l=f({checked:o,disabled:a.disabled,indeterminate:s,size:`md`},c),i[0]=a.disabled,i[1]=o,i[2]=s,i[3]=l):l=i[3];let p=l,h;i[4]!==p||i[5]!==t?(h=n(p.getRootBindings(),t),i[4]=p,i[5]=t,i[6]=h):h=i[6];let g=h,_;i[7]===t.checked?_=i[8]:(_=t.checked||r(u,{}),i[7]=t.checked,i[8]=_);let v;i[9]===t.indeterminate?v=i[10]:(v=t.indeterminate||r(d,{}),i[9]=t.indeterminate,i[10]=v);let y;return i[11]!==g||i[12]!==_||i[13]!==v?(y=r(m.NodeCheckbox,{...g,checked:_,indeterminate:v}),i[11]=g,i[12]=_,i[13]=v,i[14]=y):y=i[14],y}function TreeNodeIcon(t){let i=e(7),a=y(),o=b(),c=w(),l;i[0]!==o||i[1]!==t||i[2]!==c||i[3]!==a?(l=n(a.getNodeIconBindings(o),c.getNodeIconBindings(),t),i[0]=o,i[1]=t,i[2]=c,i[3]=a,i[4]=l):l=i[4];let u=l,d;return i[5]===u?d=i[6]:(d=r(s,{...u}),i[5]=u,i[6]=d),d}function TreeNodeIndicator(t){let i=e(5),a=w(),o;i[0]!==t||i[1]!==a?(o=n(a.getNodeIndicatorBindings(),t),i[0]=t,i[1]=a,i[2]=o):o=i[2];let s=o,c;return i[3]===s?c=i[4]:(c=r(m.NodeIndicator,{...s}),i[3]=s,i[4]=c),c}function TreeNodeProvider(t){let n=e(12),{children:i,indexPath:a,node:o}=t,s=y(),c;n[0]!==a||n[1]!==o?(c={indexPath:a,node:o},n[0]=a,n[1]=o,n[2]=c):c=n[2];let l=c,u;n[3]!==l||n[4]!==s?(u=s.getNodeState(l),n[3]=l,n[4]=s,n[5]=u):u=n[5];let d=u,f;n[6]!==i||n[7]!==l?(f=r(h,{value:l,children:i}),n[6]=i,n[7]=l,n[8]=f):f=n[8];let p;return n[9]!==d||n[10]!==f?(p=r(g,{value:d,children:f}),n[9]=d,n[10]=f,n[11]=p):p=n[11],p}function TreeNodeText(t){let n=e(2),i;return n[0]===t?i=n[1]:(i=r(m.NodeText,{...t}),n[0]=t,n[1]=i),i}function TreeNodes(t){let n=e(16),o=y(),{indentGuideProps:s,indexPath:c,node:l,renderBranch:u,renderLeaf:d,showIndentGuide:f}=t,{collection:p}=o,m;n[0]!==p||n[1]!==l?(m=p.getNodeChildren(l),n[0]=p,n[1]=l,n[2]=m):m=n[2];let h=m,g;n[3]!==h.length||n[4]!==p||n[5]!==s||n[6]!==c||n[7]!==l||n[8]!==t||n[9]!==u||n[10]!==d||n[11]!==f?(g=h.length?i(TreeBranch,{children:[a(u,t),i(TreeBranchContent,{children:[f?r(TreeBranchIndentGuide,{...s}):null,p.getNodeChildren(l).map((e,n)=>r(TreeNodes,{indexPath:[...c,n],node:e,renderBranch:t.renderBranch,renderLeaf:t.renderLeaf,showIndentGuide:f},p.getNodeValue(e)))]})]}):a(d,t),n[3]=h.length,n[4]=p,n[5]=s,n[6]=c,n[7]=l,n[8]=t,n[9]=u,n[10]=d,n[11]=f,n[12]=g):g=n[12];let _;return n[13]!==t||n[14]!==g?(_=r(TreeNodeProvider,{...t,children:g}),n[13]=t,n[14]=g,n[15]=_):_=n[15],_}function TreeRoot(t){let i=e(10),a,o;if(i[0]!==t){let{size:e,...r}=t,s;i[3]===e?s=i[4]:(s=S({size:e},c),i[3]=e,i[4]=s),a=s,o=n(a.getRootBindings(),r),i[0]=t,i[1]=a,i[2]=o}else a=i[1],o=i[2];let s=o,l;i[5]===s?l=i[6]:(l=r(m.Root,{...s}),i[5]=s,i[6]=l);let u;return i[7]!==a||i[8]!==l?(u=r(C,{value:a,children:l}),i[7]=a,i[8]=l,i[9]=u):u=i[9],u}var T={Branch:TreeBranch,BranchContent:TreeBranchContent,BranchIndentGuide:TreeBranchIndentGuide,BranchNode:TreeBranchNode,BranchTrigger:TreeBranchTrigger,Context:TreeContext,Label:TreeLabel,LeafNode:TreeLeafNode,NodeAction:TreeNodeAction,NodeCheckbox:TreeNodeCheckbox,NodeIcon:TreeNodeIcon,NodeIndicator:TreeNodeIndicator,NodeProvider:TreeNodeProvider,Nodes:TreeNodes,NodeText:TreeNodeText,Root:TreeRoot};export{C as QdsTreeContextProvider,T as Tree,w as useQdsTreeContext};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|