@qualcomm-ui/react 1.23.0 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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/button-group-context.d.ts +2 -5
- package/dist/button/button-group-context.d.ts.map +1 -1
- package/dist/button/button.d.ts +2 -1
- package/dist/button/button.d.ts.map +1 -1
- package/dist/button/icon-button.d.ts +2 -1
- package/dist/button/icon-button.d.ts.map +1 -1
- 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.d.ts +76 -51
- package/dist/menu/index.d.ts.map +1 -1
- package/dist/menu/index.js +2 -3
- package/dist/menu/index.js.map +1 -7
- package/dist/menu/menu-icon-button.d.ts +1 -1
- package/dist/menu/menu-icon-button.d.ts.map +1 -1
- package/dist/menu/menu-split-button.d.ts +40 -0
- package/dist/menu/menu-split-button.d.ts.map +1 -0
- 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/tag/tag.d.ts +33 -6
- package/dist/tag/tag.d.ts.map +1 -1
- 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 +9 -6
- package/dist/button/internal/context-button.d.ts +0 -4
- package/dist/button/internal/context-button.d.ts.map +0 -1
- package/dist/button/internal/context-icon-button.d.ts +0 -4
- package/dist/button/internal/context-icon-button.d.ts.map +0 -1
- package/dist/button/internal/index.d.ts +0 -5
- package/dist/button/internal/index.d.ts.map +0 -1
- package/dist/button/internal/internal-button.d.ts +0 -4
- package/dist/button/internal/internal-button.d.ts.map +0 -1
- package/dist/button/internal/internal-icon-button.d.ts +0 -4
- package/dist/button/internal/internal-icon-button.d.ts.map +0 -1
- package/dist/footer/index.js.map +0 -7
|
@@ -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,Info as c,TriangleAlert as l,X as u}from"lucide-react";import{IconOrNode as d}from"@qualcomm-ui/react/icon";import"react";import{normalizeProps as f}from"@qualcomm-ui/react-core/machine";import{createGuardedContext as p}from"@qualcomm-ui/react-core/context";import{InlineIconButton as m}from"@qualcomm-ui/react/inline-icon-button";import{CoreInlineNotification as h,useInlineNotificationCloseTrigger as g,useInlineNotificationContext as _}from"@qualcomm-ui/react-core/inline-notification";import{ProgressRing as v}from"@qualcomm-ui/react/progress-ring";import{createQdsInlineNotificationApi as y}from"@qualcomm-ui/qds-core/inline-notification";var[b,x]=p({hookName:`useQdsInlineNotificationContext`,providerName:`<QdsInlineNotificationContextProvider>`,strict:!0});function InlineNotificationActionContainer(r){let a=e(3),{children:o,...s}=r,c=_(),l=x(),u=t(c.getActionBindings(),l.getActionBindings(),s),d;return a[0]!==o||a[1]!==u?(d=n(i,{as:`div`,...u,children:o}),a[0]=o,a[1]=u,a[2]=d):d=a[2],d}function InlineNotificationCloseButton(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(g(c),x().getCloseButtonBindings(),s),d;return i[2]!==a||i[3]!==l?(d=n(m,{icon:u,size:`md`,...l,children:a}),i[2]=a,i[3]=l,i[4]=d):d=i[4],d}function InlineNotificationDescription(r){let i=e(5),a=x(),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(h.Description,{...s}),i[3]=s,i[4]=c),c}function InlineNotificationIcon(r){let i=e(3),{icon:a,...s}=r,c=_(),l=x(),u=t(c.getIconBindings(),l.getIconBindings(),s),f=a||S[l.emphasis]||o,p;return i[0]!==u||i[1]!==f?(p=n(d,{icon:f,size:`lg`,...u}),i[0]=u,i[1]=f,i[2]=p):p=i[2],p}var S={danger:o,info:c,loading:n(v,{}),neutral:a,success:s,warning:l};function InlineNotificationLabel(r){let i=e(5),a=x(),o;i[0]!==r||i[1]!==a?(o=t(a.getHeadingBindings(),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(h.Label,{...s}),i[3]=s,i[4]=c),c}function InlineNotificationRoot(r){let i=e(13),a,o,s;if(i[0]!==r){let{children:e,emphasis:n,orientation:c,...l}=r;a=e;let u;i[4]!==n||i[5]!==c?(u=y({emphasis:n,orientation:c},f),i[4]=n,i[5]=c,i[6]=u):u=i[6],o=u,s=t(o.getRootBindings(),l),i[0]=r,i[1]=a,i[2]=o,i[3]=s}else a=i[1],o=i[2],s=i[3];let c=s,l;i[7]!==a||i[8]!==c?(l=n(h.Root,{...c,children:a}),i[7]=a,i[8]=c,i[9]=l):l=i[9];let u;return i[10]!==o||i[11]!==l?(u=n(b,{value:o,children:l}),i[10]=o,i[11]=l,i[12]=u):u=i[12],u}function InlineNotification$1(t){let i=e(34),a,o,s,c,l,u,d,f,p,m,h;i[0]===t?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6],d=i[7],f=i[8],p=i[9],m=i[10],h=i[11]):({action:a,actionProps:o,closeButtonProps:s,description:c,descriptionProps:l,dismissable:u,icon:d,iconProps:f,label:p,labelProps:m,...h}=t,i[0]=t,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l,i[6]=u,i[7]=d,i[8]=f,i[9]=p,i[10]=m,i[11]=h);let g=p||m?.children,_=c||l?.children,v=a||o?.children,y;i[12]!==d||i[13]!==f?(y=n(InlineNotificationIcon,{icon:d,...f}),i[12]=d,i[13]=f,i[14]=y):y=i[14];let b;i[15]!==g||i[16]!==m?(b=g?n(InlineNotificationLabel,{...m,children:g}):null,i[15]=g,i[16]=m,i[17]=b):b=i[17];let x;i[18]!==_||i[19]!==l?(x=_?n(InlineNotificationDescription,{...l,children:_}):null,i[18]=_,i[19]=l,i[20]=x):x=i[20];let S;i[21]!==v||i[22]!==o?(S=v?n(InlineNotificationActionContainer,{...o,children:v}):null,i[21]=v,i[22]=o,i[23]=S):S=i[23];let C;i[24]!==s||i[25]!==u?(C=u?n(InlineNotificationCloseButton,{...s}):null,i[24]=s,i[25]=u,i[26]=C):C=i[26];let w;return i[27]!==h||i[28]!==y||i[29]!==b||i[30]!==x||i[31]!==S||i[32]!==C?(w=r(InlineNotificationRoot,{...h,children:[y,b,x,S,C]}),i[27]=h,i[28]=y,i[29]=b,i[30]=x,i[31]=S,i[32]=C,i[33]=w):w=i[33],w}var C=InlineNotification$1;C.ActionContainer=InlineNotificationActionContainer,C.CloseButton=InlineNotificationCloseButton,C.Description=InlineNotificationDescription,C.Icon=InlineNotificationIcon,C.Label=InlineNotificationLabel,C.Root=InlineNotificationRoot;export{C as InlineNotification,b as QdsInlineNotificationContextProvider,x as useQdsInlineNotificationContext};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/inline-notification/inline-notification.tsx", "../../src/inline-notification/inline-notification-action-container.tsx", "../../src/inline-notification/qds-inline-notification-context.ts", "../../src/inline-notification/inline-notification-close-button.tsx", "../../src/inline-notification/inline-notification-description.tsx", "../../src/inline-notification/inline-notification-icon.tsx", "../../src/inline-notification/inline-notification-label.tsx", "../../src/inline-notification/inline-notification-root.tsx", "../../src/inline-notification/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { InlineNotificationActionContainer } from \"./inline-notification-action-container\";\nimport { InlineNotificationCloseButton } from \"./inline-notification-close-button\";\nimport { InlineNotificationDescription } from \"./inline-notification-description\";\nimport { InlineNotificationIcon } from \"./inline-notification-icon\";\nimport { InlineNotificationLabel } from \"./inline-notification-label\";\nimport { InlineNotificationRoot } from \"./inline-notification-root\";\nexport function InlineNotification({\n action,\n actionProps,\n closeButtonProps,\n description,\n descriptionProps,\n dismissable,\n icon,\n iconProps,\n label,\n labelProps,\n ...props\n}) {\n const headingContent = label || labelProps?.children;\n const descriptionContent = description || descriptionProps?.children;\n const actionContent = action || actionProps?.children;\n return /* @__PURE__ */jsxs(InlineNotificationRoot, {\n ...props,\n children: [/* @__PURE__ */jsx(InlineNotificationIcon, {\n icon,\n ...iconProps\n }), headingContent ? /* @__PURE__ */jsx(InlineNotificationLabel, {\n ...labelProps,\n children: headingContent\n }) : null, descriptionContent ? /* @__PURE__ */jsx(InlineNotificationDescription, {\n ...descriptionProps,\n children: descriptionContent\n }) : null, actionContent ? /* @__PURE__ */jsx(InlineNotificationActionContainer, {\n ...actionProps,\n children: actionContent\n }) : null, dismissable ? /* @__PURE__ */jsx(InlineNotificationCloseButton, {\n ...closeButtonProps\n }) : null]\n });\n}", "import { jsx } from \"react/jsx-runtime\";\nimport { useInlineNotificationContext } from \"@qualcomm-ui/react-core/inline-notification\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsInlineNotificationContext } from \"./qds-inline-notification-context\";\nexport function InlineNotificationActionContainer(t0) {\n const {\n children,\n ...props\n } = t0;\n const context = useInlineNotificationContext();\n const qdsContext = useQdsInlineNotificationContext();\n const mergedProps = mergeProps(context.getActionBindings(), qdsContext.getActionBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n });\n}", "import { createGuardedContext } from \"@qualcomm-ui/react-core/context\";\nexport const [QdsInlineNotificationContextProvider, useQdsInlineNotificationContext] = createGuardedContext({\n hookName: \"useQdsInlineNotificationContext\",\n providerName: \"<QdsInlineNotificationContextProvider>\",\n strict: true\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 { useInlineNotificationCloseTrigger } from \"@qualcomm-ui/react-core/inline-notification\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsInlineNotificationContext } from \"./qds-inline-notification-context\";\nexport function InlineNotificationCloseButton(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 buttonProps = useInlineNotificationCloseTrigger(t1);\n const qdsContext = useQdsInlineNotificationContext();\n const mergedProps = mergeProps(buttonProps, qdsContext.getCloseButtonBindings(), props);\n return jsx(InlineIconButton, {\n icon: X,\n size: \"md\",\n ...mergedProps,\n children\n });\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { CoreInlineNotification } from \"@qualcomm-ui/react-core/inline-notification\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsInlineNotificationContext } from \"./qds-inline-notification-context\";\nexport function InlineNotificationDescription(props) {\n const $ = _c(3);\n const qdsContext = useQdsInlineNotificationContext();\n let t0;\n if ($[0] !== props || $[1] !== qdsContext) {\n const mergedProps = mergeProps(qdsContext.getDescriptionBindings(), props);\n t0 = jsx(CoreInlineNotification.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, Info, TriangleAlert } from \"lucide-react\";\nimport { IconOrNode } from \"@qualcomm-ui/react/icon\";\nimport { ProgressRing } from \"@qualcomm-ui/react/progress-ring\";\nimport { useInlineNotificationContext } from \"@qualcomm-ui/react-core/inline-notification\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsInlineNotificationContext } from \"./qds-inline-notification-context\";\nexport function InlineNotificationIcon(t0) {\n const {\n icon: iconProp,\n ...props\n } = t0;\n const context = useInlineNotificationContext();\n const qdsContext = useQdsInlineNotificationContext();\n const mergedProps = mergeProps(context.getIconBindings(), 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: Info,\n loading: /* @__PURE__ */jsx(ProgressRing, {}),\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 { CoreInlineNotification } from \"@qualcomm-ui/react-core/inline-notification\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsInlineNotificationContext } from \"./qds-inline-notification-context\";\nexport function InlineNotificationLabel(props) {\n const $ = _c(3);\n const qdsContext = useQdsInlineNotificationContext();\n let t0;\n if ($[0] !== props || $[1] !== qdsContext) {\n const mergedProps = mergeProps(qdsContext.getHeadingBindings(), props);\n t0 = jsx(CoreInlineNotification.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 { createQdsInlineNotificationApi } from \"@qualcomm-ui/qds-core/inline-notification\";\nimport { CoreInlineNotification } from \"@qualcomm-ui/react-core/inline-notification\";\nimport { normalizeProps } from \"@qualcomm-ui/react-core/machine\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { QdsInlineNotificationContextProvider } from \"./qds-inline-notification-context\";\nexport function InlineNotificationRoot(t0) {\n const $ = _c(5);\n let t1;\n if ($[0] !== t0) {\n const {\n children,\n emphasis,\n orientation,\n ...props\n } = t0;\n let t2;\n if ($[2] !== emphasis || $[3] !== orientation) {\n t2 = createQdsInlineNotificationApi({\n emphasis,\n orientation\n }, normalizeProps);\n $[2] = emphasis;\n $[3] = orientation;\n $[4] = t2;\n } else {\n t2 = $[4];\n }\n const qdsContext = t2;\n const mergedProps = mergeProps(qdsContext.getRootBindings(), props);\n t1 = jsx(QdsInlineNotificationContextProvider, {\n value: qdsContext,\n children: jsx(CoreInlineNotification.Root, {\n ...mergedProps,\n children\n })\n });\n $[0] = t0;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n return t1;\n}", "import { InlineNotification as SimpleInlineNotification } from \"./inline-notification\";\nimport { InlineNotificationActionContainer } from \"./inline-notification-action-container\";\nimport { InlineNotificationCloseButton } from \"./inline-notification-close-button\";\nimport { InlineNotificationDescription } from \"./inline-notification-description\";\nimport { InlineNotificationIcon } from \"./inline-notification-icon\";\nimport { InlineNotificationLabel } from \"./inline-notification-label\";\nimport { InlineNotificationRoot } from \"./inline-notification-root\";\nexport * from \"./qds-inline-notification-context\";\nexport const InlineNotification = SimpleInlineNotification;\nInlineNotification.ActionContainer = InlineNotificationActionContainer;\nInlineNotification.CloseButton = InlineNotificationCloseButton;\nInlineNotification.Description = InlineNotificationDescription;\nInlineNotification.Icon = InlineNotificationIcon;\nInlineNotification.Label = InlineNotificationLabel;\nInlineNotification.Root = InlineNotificationRoot;"],
|
|
5
|
-
"mappings": ";AAAA,OAAS,OAAAA,KAAK,SAAY,oBCA1B,OAAS,QAAW,oBACpB,OAAS,iCAAoC,8CAC7C,OAAS,uBAA0B,iCACnC,OAAS,eAAkB,iCCH3B,OAAS,yBAA4B,kCAC9B,GAAM,CAAC,qCAAsC,+BAA+B,EAAI,qBAAqB,CAC1G,SAAU,kCACV,aAAc,yCACd,OAAQ,EACV,CAAC,EDAM,SAAS,kCAAkC,GAAI,CACpD,GAAM,CACJ,SACA,GAAG,KACL,EAAI,GACE,QAAU,6BAA6B,EACvC,WAAa,gCAAgC,EAC7C,YAAc,WAAW,QAAQ,kBAAkB,EAAG,WAAW,kBAAkB,EAAG,KAAK,EACjG,OAAO,IAAI,mBAAoB,CAC7B,GAAI,MACJ,GAAG,YACH,QACF,CAAC,CACH,CElBA,OAAS,K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InlineNotificationContext", "mergeProps", "useInlineNotificationContext", "mergeProps", "jsx", "_c", "jsx", "CoreInlineNotification", "mergeProps", "_c", "mergeProps", "jsx", "CoreInlineNotification", "_c", "jsx", "CoreInlineNotification", "mergeProps", "_c", "mergeProps", "jsx", "CoreInlineNotification", "jsx", "InlineNotification"]
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"index.js","names":["QdsNotificationApi","createGuardedContext","QdsInlineNotificationContextProvider","useQdsInlineNotificationContext","hookName","providerName","strict","ReactElement","ReactNode","useInlineNotificationContext","ElementRenderProp","PolymorphicElement","mergeProps","useQdsInlineNotificationContext","InlineNotificationActionContainerProps","children","InlineNotificationActionContainer","t0","$","_c","props","context","qdsContext","mergedProps","getActionBindings","t1","ReactElement","ReactNode","X","InlineIconButton","useInlineNotificationCloseTrigger","ElementRenderProp","IdProp","mergeProps","useQdsInlineNotificationContext","InlineNotificationCloseButtonProps","children","InlineNotificationCloseButton","t0","$","_c","id","props","t1","buttonProps","qdsContext","mergedProps","getCloseButtonBindings","t2","ReactElement","ReactNode","CoreInlineNotification","ElementRenderProp","IdProp","mergeProps","useQdsInlineNotificationContext","InlineNotificationDescriptionProps","children","InlineNotificationDescription","props","$","_c","qdsContext","t0","getDescriptionBindings","mergedProps","t1","ReactElement","BellRing","CircleAlert","CircleCheck","Info","TriangleAlert","QdsNotificationEmphasis","IconOrNode","ProgressRing","useInlineNotificationContext","LucideIconOrNode","ElementRenderProp","mergeProps","useQdsInlineNotificationContext","InlineNotificationIconProps","icon","InlineNotificationIcon","t0","$","_c","iconProp","props","context","qdsContext","mergedProps","getIconBindings","t1","icons","emphasis","t2","Record","danger","info","loading","neutral","success","warning","ReactElement","ReactNode","CoreInlineNotification","ElementRenderProp","IdProp","mergeProps","useQdsInlineNotificationContext","InlineNotificationLabelProps","children","InlineNotificationLabel","props","$","_c","qdsContext","t0","getHeadingBindings","mergedProps","t1","ReactElement","useMemo","createQdsInlineNotificationApi","QdsNotificationApiProps","CoreInlineNotification","CoreInlineNotificationRootProps","normalizeProps","mergeProps","QdsInlineNotificationContextProvider","InlineNotificationRootProps","InlineNotificationRoot","t0","$","_c","children","qdsContext","t1","t2","emphasis","orientation","props","t3","getRootBindings","mergedProps","ReactElement","ReactNode","LucideIconOrNode","InlineNotificationActionContainer","InlineNotificationActionContainerProps","InlineNotificationCloseButton","InlineNotificationCloseButtonProps","InlineNotificationDescription","InlineNotificationDescriptionProps","InlineNotificationIcon","InlineNotificationIconProps","InlineNotificationLabel","InlineNotificationLabelProps","InlineNotificationRoot","InlineNotificationRootProps","InlineNotificationProps","Omit","action","actionProps","children","closeButtonProps","description","descriptionProps","dismissable","icon","iconProps","label","labelProps","InlineNotification","t0","$","_c","props","headingContent","descriptionContent","actionContent","t1","t2","t3","t4","t5","t6","InlineNotification","SimpleInlineNotification","InlineNotificationActionContainer","InlineNotificationActionContainerProps","InlineNotificationCloseButton","InlineNotificationCloseButtonProps","InlineNotificationDescription","InlineNotificationDescriptionProps","InlineNotificationIcon","InlineNotificationIconProps","InlineNotificationLabel","InlineNotificationLabelProps","InlineNotificationRoot","InlineNotificationRootProps","InlineNotificationComponent","ActionContainer","CloseButton","Description","Icon","Label","Root"],"sources":["../../src/inline-notification/qds-inline-notification-context.ts","../../src/inline-notification/inline-notification-action-container.tsx","../../src/inline-notification/inline-notification-close-button.tsx","../../src/inline-notification/inline-notification-description.tsx","../../src/inline-notification/inline-notification-icon.tsx","../../src/inline-notification/inline-notification-label.tsx","../../src/inline-notification/inline-notification-root.tsx","../../src/inline-notification/inline-notification.tsx","../../src/inline-notification/index.ts"],"sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {QdsNotificationApi} from \"@qualcomm-ui/qds-core/inline-notification\"\nimport {createGuardedContext} from \"@qualcomm-ui/react-core/context\"\n\nexport const [\n QdsInlineNotificationContextProvider,\n useQdsInlineNotificationContext,\n] = createGuardedContext<QdsNotificationApi>({\n hookName: \"useQdsInlineNotificationContext\",\n providerName: \"<QdsInlineNotificationContextProvider>\",\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 {useInlineNotificationContext} from \"@qualcomm-ui/react-core/inline-notification\"\nimport {\n type ElementRenderProp,\n PolymorphicElement,\n} from \"@qualcomm-ui/react-core/system\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {useQdsInlineNotificationContext} from \"./qds-inline-notification-context\"\n\nexport interface InlineNotificationActionContainerProps 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 * A container for the notification's primary action button. Renders a `<div>`\n * element by default.\n */\nexport function InlineNotificationActionContainer({\n children,\n ...props\n}: InlineNotificationActionContainerProps): ReactElement {\n const context = useInlineNotificationContext()\n const qdsContext = useQdsInlineNotificationContext()\n\n const mergedProps = mergeProps(\n context.getActionBindings(),\n qdsContext.getActionBindings(),\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 {X} from \"lucide-react\"\n\nimport {InlineIconButton} from \"@qualcomm-ui/react/inline-icon-button\"\nimport {useInlineNotificationCloseTrigger} from \"@qualcomm-ui/react-core/inline-notification\"\nimport type {ElementRenderProp, IdProp} from \"@qualcomm-ui/react-core/system\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {useQdsInlineNotificationContext} from \"./qds-inline-notification-context\"\n\nexport interface InlineNotificationCloseButtonProps\n extends IdProp, ElementRenderProp<\"button\"> {\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 * Closes the notification when clicked. Renders a `<button>` element by default.\n */\nexport function InlineNotificationCloseButton({\n children,\n id,\n ...props\n}: InlineNotificationCloseButtonProps): ReactElement {\n const buttonProps = useInlineNotificationCloseTrigger({id})\n const qdsContext = useQdsInlineNotificationContext()\n\n const mergedProps = mergeProps(\n buttonProps,\n qdsContext.getCloseButtonBindings(),\n props,\n )\n\n return (\n <InlineIconButton icon={X} size=\"md\" {...mergedProps}>\n {children}\n </InlineIconButton>\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 {CoreInlineNotification} from \"@qualcomm-ui/react-core/inline-notification\"\nimport type {ElementRenderProp, IdProp} from \"@qualcomm-ui/react-core/system\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {useQdsInlineNotificationContext} from \"./qds-inline-notification-context\"\n\nexport interface InlineNotificationDescriptionProps\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 * A paragraph with additional information about the notification. Renders a `<div>`\n * element by default.\n */\nexport function InlineNotificationDescription(\n props: InlineNotificationDescriptionProps,\n): ReactElement {\n const qdsContext = useQdsInlineNotificationContext()\n const mergedProps = mergeProps(qdsContext.getDescriptionBindings(), props)\n\n return <CoreInlineNotification.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 {\n BellRing,\n CircleAlert,\n CircleCheck,\n Info,\n TriangleAlert,\n} 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 {useInlineNotificationContext} from \"@qualcomm-ui/react-core/inline-notification\"\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 {useQdsInlineNotificationContext} from \"./qds-inline-notification-context\"\n\nexport interface InlineNotificationIconProps 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\n/**\n * An icon that indicates the notification's status. Renders a `<span>` element by\n * default.\n */\nexport function InlineNotificationIcon({\n icon: iconProp,\n ...props\n}: InlineNotificationIconProps): ReactElement {\n const context = useInlineNotificationContext()\n const qdsContext = useQdsInlineNotificationContext()\n\n const mergedProps = mergeProps(\n context.getIconBindings(),\n qdsContext.getIconBindings(),\n props,\n )\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: Info,\n loading: <ProgressRing />,\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, ReactNode} from \"react\"\n\nimport {CoreInlineNotification} from \"@qualcomm-ui/react-core/inline-notification\"\nimport type {ElementRenderProp, IdProp} from \"@qualcomm-ui/react-core/system\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {useQdsInlineNotificationContext} from \"./qds-inline-notification-context\"\n\nexport interface InlineNotificationLabelProps\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 * A heading that labels the notification. Renders a `<div>` element by default.\n */\nexport function InlineNotificationLabel(\n props: InlineNotificationLabelProps,\n): ReactElement {\n const qdsContext = useQdsInlineNotificationContext()\n const mergedProps = mergeProps(qdsContext.getHeadingBindings(), props)\n\n return <CoreInlineNotification.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 {\n createQdsInlineNotificationApi,\n type QdsNotificationApiProps,\n} from \"@qualcomm-ui/qds-core/inline-notification\"\nimport {\n CoreInlineNotification,\n type CoreInlineNotificationRootProps,\n} from \"@qualcomm-ui/react-core/inline-notification\"\nimport {normalizeProps} from \"@qualcomm-ui/react-core/machine\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {QdsInlineNotificationContextProvider} from \"./qds-inline-notification-context\"\n\nexport interface InlineNotificationRootProps\n extends CoreInlineNotificationRootProps, QdsNotificationApiProps {}\n\n/**\n * Groups all parts of the notification. Renders a `<div>` element by default.\n */\nexport function InlineNotificationRoot({\n children,\n emphasis,\n orientation,\n ...props\n}: InlineNotificationRootProps): ReactElement {\n const qdsContext = useMemo(\n () =>\n createQdsInlineNotificationApi(\n {\n emphasis,\n orientation,\n },\n normalizeProps,\n ),\n [emphasis, orientation],\n )\n\n const mergedProps = mergeProps(qdsContext.getRootBindings(), props)\n\n return (\n <QdsInlineNotificationContextProvider value={qdsContext}>\n <CoreInlineNotification.Root {...mergedProps}>\n {children}\n </CoreInlineNotification.Root>\n </QdsInlineNotificationContextProvider>\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 {LucideIconOrNode} from \"@qualcomm-ui/react-core/lucide\"\n\nimport {\n InlineNotificationActionContainer,\n type InlineNotificationActionContainerProps,\n} from \"./inline-notification-action-container\"\nimport {\n InlineNotificationCloseButton,\n type InlineNotificationCloseButtonProps,\n} from \"./inline-notification-close-button\"\nimport {\n InlineNotificationDescription,\n type InlineNotificationDescriptionProps,\n} from \"./inline-notification-description\"\nimport {\n InlineNotificationIcon,\n type InlineNotificationIconProps,\n} from \"./inline-notification-icon\"\nimport {\n InlineNotificationLabel,\n type InlineNotificationLabelProps,\n} from \"./inline-notification-label\"\nimport {\n InlineNotificationRoot,\n type InlineNotificationRootProps,\n} from \"./inline-notification-root\"\n\nexport interface InlineNotificationProps extends Omit<\n InlineNotificationRootProps,\n \"children\"\n> {\n /**\n * The component used for the content of the action element.\n */\n action?: ReactNode\n\n /**\n * Props applied to the action container element.\n * @inheritDoc\n */\n actionProps?: InlineNotificationActionContainerProps\n\n /**\n * The simple InlineNotification doesn't support children.\n */\n children?: never\n\n /**\n * Props applied to the close button element.\n * @inheritDoc\n */\n closeButtonProps?: InlineNotificationCloseButtonProps\n\n /**\n * Optional description text for the notification.\n */\n description?: ReactNode\n\n /**\n * Props applied to the description element.\n * @inheritDoc\n */\n descriptionProps?: InlineNotificationDescriptionProps\n\n /**\n * When `true`, renders a close button that dismisses the notification on click.\n *\n * @default false\n */\n dismissable?: boolean\n\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 /**\n * Props applied to the icon element.\n * @inheritDoc\n */\n iconProps?: InlineNotificationIconProps\n\n /**\n * Optional heading text for the notification.\n */\n label?: ReactNode\n\n /**\n * Props applied to the label element.\n * @inheritDoc\n */\n labelProps?: InlineNotificationLabelProps\n}\n\nexport function InlineNotification({\n action,\n actionProps,\n closeButtonProps,\n description,\n descriptionProps,\n dismissable,\n icon,\n iconProps,\n label,\n labelProps,\n ...props\n}: InlineNotificationProps): ReactElement {\n const headingContent = label || labelProps?.children\n const descriptionContent = description || descriptionProps?.children\n const actionContent = action || actionProps?.children\n\n return (\n <InlineNotificationRoot {...props}>\n <InlineNotificationIcon icon={icon} {...iconProps} />\n\n {headingContent ? (\n <InlineNotificationLabel {...labelProps}>\n {headingContent}\n </InlineNotificationLabel>\n ) : null}\n\n {descriptionContent ? (\n <InlineNotificationDescription {...descriptionProps}>\n {descriptionContent}\n </InlineNotificationDescription>\n ) : null}\n\n {actionContent ? (\n <InlineNotificationActionContainer {...actionProps}>\n {actionContent}\n </InlineNotificationActionContainer>\n ) : null}\n\n {dismissable ? (\n <InlineNotificationCloseButton {...closeButtonProps} />\n ) : null}\n </InlineNotificationRoot>\n )\n}\n","import {InlineNotification as SimpleInlineNotification} from \"./inline-notification\"\nimport {\n InlineNotificationActionContainer,\n type InlineNotificationActionContainerProps,\n} from \"./inline-notification-action-container\"\nimport {\n InlineNotificationCloseButton,\n type InlineNotificationCloseButtonProps,\n} from \"./inline-notification-close-button\"\nimport {\n InlineNotificationDescription,\n type InlineNotificationDescriptionProps,\n} from \"./inline-notification-description\"\nimport {\n InlineNotificationIcon,\n type InlineNotificationIconProps,\n} from \"./inline-notification-icon\"\nimport {\n InlineNotificationLabel,\n type InlineNotificationLabelProps,\n} from \"./inline-notification-label\"\nimport {\n InlineNotificationRoot,\n type InlineNotificationRootProps,\n} from \"./inline-notification-root\"\n\nexport * from \"./qds-inline-notification-context\"\n\nexport type {\n InlineNotificationActionContainerProps,\n InlineNotificationCloseButtonProps,\n InlineNotificationDescriptionProps,\n InlineNotificationIconProps,\n InlineNotificationLabelProps,\n InlineNotificationRootProps,\n}\n\ntype InlineNotificationComponent = typeof SimpleInlineNotification & {\n /**\n * A container for the notification's primary action button. Renders a `<div>`\n * element by default.\n */\n ActionContainer: typeof InlineNotificationActionContainer\n /**\n * Closes the notification when clicked. Renders a `<button>` element by default.\n */\n CloseButton: typeof InlineNotificationCloseButton\n /**\n * A paragraph with additional information about the notification. Renders a\n * `<div>` element by default.\n */\n Description: typeof InlineNotificationDescription\n /**\n * An icon that indicates the notification's status. Renders a `<span>` element by\n * default.\n */\n Icon: typeof InlineNotificationIcon\n /**\n * A heading that labels the notification. Renders an `<div>` element by default.\n */\n Label: typeof InlineNotificationLabel\n /**\n * Groups all parts of the notification. Renders a `<div>` element by default.\n */\n Root: typeof InlineNotificationRoot\n}\n\nexport const InlineNotification: InlineNotificationComponent =\n SimpleInlineNotification as InlineNotificationComponent\n\nInlineNotification.ActionContainer = InlineNotificationActionContainer\nInlineNotification.CloseButton = InlineNotificationCloseButton\nInlineNotification.Description = InlineNotificationDescription\nInlineNotification.Icon = InlineNotificationIcon\nInlineNotification.Label = InlineNotificationLabel\nInlineNotification.Root = InlineNotificationRoot\n"],"mappings":"s6BAMA,GAAa,CACXE,EACAC,GACEF,EAAyC,CAC3CG,SAAU,kCACVC,aAAc,yCACdC,OAAQ,GACT,CAAC,CCYF,SAAOU,kCAAAC,EAAA,CAAA,IAAAC,EAAAC,EAAA,EAAA,CAA2C,CAAAJ,WAAA,GAAAK,GAAAH,EAIhDI,EAAgBZ,GAA8B,CAC9Ca,EAAmBT,GAAiC,CAEpDU,EAAoBX,EAClBS,EAAOG,mBAAoB,CAC3BF,EAAUE,mBAAoB,CAC9BJ,EACD,CAAAK,EAKsB,OALtBP,EAAA,KAAAH,GAAAG,EAAA,KAAAK,GAGCE,EAAA,EAAC,EAAD,CAAuB,GAAA,MAAK,GAAKF,EAC9BR,WACkB,CAAA,CAAAG,EAAA,GAAAH,EAAAG,EAAA,GAAAK,EAAAL,EAAA,GAAAO,GAAAA,EAAAP,EAAA,GAFrBO,ECdJ,SAAOY,8BAAAC,EAAA,CAAA,IAAAC,EAAAC,EAAA,EAAA,CAAuC,CAAAJ,WAAAK,KAAA,GAAAC,GAAAJ,EAITK,EAAAJ,EAAA,KAAAE,EACuBE,EAAAJ,EAAA,IAAJI,EAAA,CAAAF,KAAI,CAAAF,EAAA,GAAAE,EAAAF,EAAA,GAAAI,GAG1D,IAAAG,EAAoBb,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,GAAAV,EAAA,IAAAE,EAAAF,EAAA,IAAAM,EAAAN,EAAA,IAAAO,EAAAP,EAAA,IAAAQ,EAAAR,EAAA,IAAAS,EAAAT,EAAA,IAAAU,EAAAV,EAAA,IAAAW,GAAAA,EAAAX,EAAA,IAxBzBW,ECnDJ,IAAaC,EACXC,qBAEFD,EAAmBe,gBAAkBb,kCACrCF,EAAmBgB,YAAcZ,8BACjCJ,EAAmBiB,YAAcX,8BACjCN,EAAmBkB,KAAOV,uBAC1BR,EAAmBmB,MAAQT,wBAC3BV,EAAmBoB,KAAOR"}
|
package/dist/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{Asterisk as a,CircleAlert as o}from"lucide-react";import{Icon as s,IconOrNode as c}from"@qualcomm-ui/react/icon";import{normalizeProps as l}from"@qualcomm-ui/react-core/machine";import{createGuardedContext as u}from"@qualcomm-ui/react-core/context";import{createQdsInputApi as d,inputClasses as f}from"@qualcomm-ui/qds-core/input";var[p,m]=u({hookName:`useQdsInputContext`,providerName:`<QdsInputContextProvider>`,strict:!0});function InputEndIcon(r){let a=e(5),{icon:o,...s}=r,l=t(m().getEndIconBindings(),s),u;a[0]===o?u=a[1]:(u=n(c,{icon:o,skipWrapper:!0}),a[0]=o,a[1]=u);let d;return a[2]!==l||a[3]!==u?(d=n(i,{as:`div`,...l,children:u}),a[2]=l,a[3]=u,a[4]=d):d=a[4],d}function InputErrorIndicator(r){let i=e(5),a=m(),s;i[0]!==a||i[1]!==r?(s=t(a.getErrorIndicatorBindings(),r,{icon:r.icon||o}),i[0]=a,i[1]=r,i[2]=s):s=i[2];let l=s,u;return i[3]===l?u=i[4]:(u=n(c,{...l}),i[3]=l,i[4]=u),u}function InputErrorText(a){let o=e(6),{children:s,icon:l,...u}=a,d=t(m(!1)?.getErrorTextBindings(),u),f;o[0]===l?f=o[1]:(f=l?n(c,{icon:l}):null,o[0]=l,o[1]=f);let p;return o[2]!==s||o[3]!==d||o[4]!==f?(p=r(i,{as:`div`,...d,children:[f,s]}),o[2]=s,o[3]=d,o[4]=f,o[5]=p):p=o[5],p}function InputHint(r){let a=e(3),{children:o,...s}=r,c=t(m(!1)?.getHintBindings(),s),l;return a[0]!==o||a[1]!==c?(l=n(i,{as:`div`,...c,children:o}),a[0]=o,a[1]=c,a[2]=l):l=a[2],l}var h=d({size:`md`},l);function InputLabel(o){let c=e(6),{children:l,required:u,...d}=o,p=t((m(!1)??h).getLabelBindings(),d),g;c[0]===u?g=c[1]:(g=u?n(s,{className:f.requiredIndicator,icon:a,size:`xs`}):null,c[0]=u,c[1]=g);let _;return c[2]!==l||c[3]!==p||c[4]!==g?(_=r(i,{as:`label`,...p,children:[l,g]}),c[2]=l,c[3]=p,c[4]=g,c[5]=_):_=c[5],_}function InputStartIcon(r){let a=e(5),{icon:o,...s}=r,l=t(m().getStartIconBindings(),s),u;a[0]===o?u=a[1]:(u=n(c,{icon:o,skipWrapper:!0}),a[0]=o,a[1]=u);let d;return a[2]!==l||a[3]!==u?(d=n(i,{as:`div`,...l,children:u}),a[2]=l,a[3]=u,a[4]=d):d=a[4],d}export{InputEndIcon,InputErrorIndicator,InputErrorText,InputHint,InputLabel,InputStartIcon,p as QdsInputContextProvider,m as useQdsInputContext};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
package/dist/input/index.js.map
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/input/input-end-icon.tsx", "../../src/input/qds-input-context.ts", "../../src/input/input-error-indicator.tsx", "../../src/input/input-error-text.tsx", "../../src/input/input-hint.tsx", "../../src/input/input-label.tsx", "../../src/input/input-start-icon.tsx"],
|
|
4
|
-
"sourcesContent": ["import { jsx } from \"react/jsx-runtime\";\nimport { IconOrNode } from \"@qualcomm-ui/react/icon\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsInputContext } from \"./qds-input-context\";\nexport function InputEndIcon(t0) {\n const {\n icon,\n ...props\n } = t0;\n const context = useQdsInputContext();\n const mergedProps = mergeProps(context.getEndIconBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children: jsx(IconOrNode, {\n icon,\n skipWrapper: true\n })\n });\n}", "import { createGuardedContext } from \"@qualcomm-ui/react-core/context\";\nexport const [QdsInputContextProvider, useQdsInputContext] = createGuardedContext({\n hookName: \"useQdsInputContext\",\n providerName: \"<QdsInputContextProvider>\",\n strict: true\n});", "import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { CircleAlert } from \"lucide-react\";\nimport { IconOrNode } from \"@qualcomm-ui/react/icon\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsInputContext } from \"./qds-input-context\";\nexport function InputErrorIndicator(props) {\n const $ = _c(3);\n const context = useQdsInputContext();\n let t0;\n if ($[0] !== context || $[1] !== props) {\n const mergedProps = mergeProps(context.getErrorIndicatorBindings(), props, {\n icon: props.icon || CircleAlert\n });\n t0 = jsx(IconOrNode, {\n ...mergedProps\n });\n $[0] = context;\n $[1] = props;\n $[2] = t0;\n } else {\n t0 = $[2];\n }\n return t0;\n}", "import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { IconOrNode } from \"@qualcomm-ui/react/icon\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsInputContext } from \"./qds-input-context\";\nexport function InputErrorText(t0) {\n const {\n children,\n icon,\n ...props\n } = t0;\n const qdsContext = useQdsInputContext(false);\n const mergedProps = mergeProps(qdsContext?.getErrorTextBindings(), props);\n return jsxs(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children: [icon ? jsx(IconOrNode, {\n icon\n }) : null, children]\n });\n}", "import { jsx } from \"react/jsx-runtime\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsInputContext } from \"./qds-input-context\";\nexport function InputHint(t0) {\n const {\n children,\n ...props\n } = t0;\n const qdsContext = useQdsInputContext(false);\n const mergedProps = mergeProps(qdsContext?.getHintBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n });\n}", "import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { Asterisk } from \"lucide-react\";\nimport { createQdsInputApi, inputClasses } from \"@qualcomm-ui/qds-core/input\";\nimport { Icon } from \"@qualcomm-ui/react/icon\";\nimport { normalizeProps } from \"@qualcomm-ui/react-core/machine\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsInputContext } from \"./qds-input-context\";\nconst defaultQdsApi = createQdsInputApi({\n size: \"md\"\n}, normalizeProps);\nexport function InputLabel(t0) {\n const {\n children,\n required,\n ...props\n } = t0;\n const qdsContext = useQdsInputContext(false);\n const mergedProps = mergeProps((qdsContext ?? defaultQdsApi).getLabelBindings(), props);\n return jsxs(PolymorphicElement, {\n as: \"label\",\n ...mergedProps,\n children: [children, required ? jsx(Icon, {\n className: inputClasses.requiredIndicator,\n icon: Asterisk,\n size: \"xs\"\n }) : null]\n });\n}", "import { jsx } from \"react/jsx-runtime\";\nimport { IconOrNode } from \"@qualcomm-ui/react/icon\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { useQdsInputContext } from \"./qds-input-context\";\nexport function InputStartIcon(t0) {\n const {\n icon,\n ...props\n } = t0;\n const context = useQdsInputContext();\n const mergedProps = mergeProps(context.getStartIconBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children: jsx(IconOrNode, {\n icon,\n skipWrapper: true\n })\n });\n}"],
|
|
5
|
-
"mappings": ";AAAA,OAAS,QAAW,oBACpB,OAAS,eAAkB,0BAC3B,OAAS,uBAA0B,iCACnC,OAAS,eAAkB,iCCH3B,OAAS,yBAA4B,kCAC9B,GAAM,CAAC,wBAAyB,kBAAkB,EAAI,qBAAqB,CAChF,SAAU,qBACV,aAAc,4BACd,OAAQ,EACV,CAAC,EDAM,SAAS,aAAa,GAAI,CAC/B,GAAM,CACJ,KACA,GAAG,KACL,EAAI,GACE,QAAU,mBAAmB,EAC7B,YAAc,WAAW,QAAQ,mBAAmB,EAAG,KAAK,EAClE,OAAO,IAAI,mBAAoB,CAC7B,GAAI,MACJ,GAAG,YACH,SAAU,IAAI,WAAY,CACxB,KACA,YAAa,EACf,CAAC,CACH,CAAC,CACH,CEpBA,OAAS,KAAK,OAAU,yBACxB,OAAS,OAAAA,SAAW,oBACpB,OAAS,gBAAmB,eAC5B,OAAS,cAAAC,gBAAkB,0BAC3B,OAAS,cAAAC,gBAAkB,iCAEpB,SAAS,oBAAoB,MAAO,CACzC,IAAM,EAAI,GAAG,CAAC,EACR,QAAU,mBAAmB,EAC/B,GACJ,GAAI,EAAE,CAAC,IAAM,SAAW,EAAE,CAAC,IAAM,MAAO,CACtC,IAAM,YAAcC,YAAW,QAAQ,0BAA0B,EAAG,MAAO,CACzE,KAAM,MAAM,MAAQ,WACtB,CAAC,EACD,GAAKC,KAAIC,YAAY,CACnB,GAAG,WACL,CAAC,EACD,EAAE,CAAC,EAAI,QACP,EAAE,CAAC,EAAI,MACP,EAAE,CAAC,EAAI,EACT,MACE,GAAK,EAAE,CAAC,EAEV,OAAO,EACT,CCxBA,OAAS,OAAAC,KAAK,SAAY,oBAC1B,OAAS,cAAAC,gBAAkB,0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C,SAAW,oBACpB,OAAS,cAAAC,gBAAkB,0BAC3B,OAAS,sBAAAC,wBAA0B,iCACnC,OAAS,cAAAC,gBAAkB,iCAEpB,SAAS,eAAe,GAAI,CACjC,GAAM,CACJ,KACA,GAAG,KACL,EAAI,GACE,QAAU,mBAAmB,EAC7B,YAAcC,YAAW,QAAQ,qBAAqB,EAAG,KAAK,EACpE,OAAOC,KAAIC,oBAAoB,CAC7B,GAAI,MACJ,GAAG,YACH,SAAUD,KAAIE,YAAY,CACxB,KACA,YAAa,EACf,CAAC,CACH,CAAC,CACH",
|
|
6
|
-
"names": ["jsx", "IconOrNode", "mergeProps", "mergeProps", "jsx", "IconOrNode", "jsx", "IconOrNode", "PolymorphicElement", "mergeProps", "mergeProps", "PolymorphicElement", "jsx", "IconOrNode", "jsx", "PolymorphicElement", "mergeProps", "mergeProps", "jsx", "PolymorphicElement", "jsx", "jsxs", "PolymorphicElement", "mergeProps", "mergeProps", "jsxs", "PolymorphicElement", "jsx", "jsx", "IconOrNode", "PolymorphicElement", "mergeProps", "mergeProps", "jsx", "PolymorphicElement", "IconOrNode"]
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"index.js","names":["QdsInputApi","QdsInputApiProps","createGuardedContext","LucideIconOrElement","QdsReactInputApiProps","QdsReactInputApi","QdsInputContextProvider","useQdsInputContext","hookName","providerName","strict","ReactElement","IconOrNode","LucideIconOrElement","ElementRenderProp","PolymorphicElement","mergeProps","useQdsInputContext","InputEndIconProps","icon","InputEndIcon","t0","$","_c","props","context","mergedProps","getEndIconBindings","t1","t2","ReactElement","CircleAlert","IconOrNode","LucideIconOrElement","ElementRenderProp","mergeProps","useQdsInputContext","InputErrorIndicatorProps","icon","InputErrorIndicator","props","$","_c","context","t0","getErrorIndicatorBindings","mergedProps","t1","ReactElement","IconOrNode","LucideIconOrElement","ElementRenderProp","PolymorphicElement","mergeProps","useQdsInputContext","InputErrorTextProps","icon","InputErrorText","t0","$","_c","children","props","qdsContext","mergedProps","getErrorTextBindings","t1","t2","ReactElement","ReactNode","ElementRenderProp","PolymorphicElement","mergeProps","useQdsInputContext","InputHintProps","children","InputHint","t0","$","_c","props","qdsContext","mergedProps","getHintBindings","t1","ReactElement","ReactNode","Asterisk","createQdsInputApi","inputClasses","Icon","normalizeProps","ElementRenderProp","PolymorphicElement","mergeProps","useQdsInputContext","InputLabelProps","children","required","defaultQdsApi","size","InputLabel","t0","$","_c","props","qdsContext","mergedProps","getLabelBindings","t1","requiredIndicator","t2","ReactElement","IconOrNode","LucideIconOrElement","ElementRenderProp","PolymorphicElement","mergeProps","useQdsInputContext","InputStartIconProps","icon","InputStartIcon","t0","$","_c","props","context","mergedProps","getStartIconBindings","t1","t2"],"sources":["../../src/input/qds-input-context.ts","../../src/input/input-end-icon.tsx","../../src/input/input-error-indicator.tsx","../../src/input/input-error-text.tsx","../../src/input/input-hint.tsx","../../src/input/input-label.tsx","../../src/input/input-start-icon.tsx"],"sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport type {QdsInputApi, QdsInputApiProps} from \"@qualcomm-ui/qds-core/input\"\nimport {createGuardedContext} from \"@qualcomm-ui/react-core/context\"\nimport type {LucideIconOrElement} from \"@qualcomm-ui/react-core/lucide\"\n\nexport interface QdsReactInputApiProps extends QdsInputApiProps<LucideIconOrElement> {}\n\nexport interface QdsReactInputApi extends QdsInputApi<LucideIconOrElement> {}\n\nexport const [QdsInputContextProvider, useQdsInputContext] =\n createGuardedContext<QdsReactInputApi>({\n hookName: \"useQdsInputContext\",\n providerName: \"<QdsInputContextProvider>\",\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 {IconOrNode} from \"@qualcomm-ui/react/icon\"\nimport type {LucideIconOrElement} from \"@qualcomm-ui/react-core/lucide\"\nimport {\n type ElementRenderProp,\n PolymorphicElement,\n} from \"@qualcomm-ui/react-core/system\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {useQdsInputContext} from \"./qds-input-context\"\n\nexport interface InputEndIconProps extends ElementRenderProp<\"div\"> {\n /**\n * lucide-react icon or ReactNode.\n */\n icon: LucideIconOrElement\n}\n\n/**\n * An icon placed at the end of the input.\n */\nexport function InputEndIcon({\n icon,\n ...props\n}: InputEndIconProps): ReactElement {\n const context = useQdsInputContext()\n\n const mergedProps = mergeProps(context.getEndIconBindings(), props)\n\n return (\n <PolymorphicElement as=\"div\" {...mergedProps}>\n <IconOrNode icon={icon} skipWrapper />\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} from \"react\"\n\nimport {CircleAlert} from \"lucide-react\"\n\nimport {IconOrNode} from \"@qualcomm-ui/react/icon\"\nimport type {LucideIconOrElement} 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 {useQdsInputContext} from \"./qds-input-context\"\n\nexport interface InputErrorIndicatorProps extends ElementRenderProp<\"span\"> {\n /**\n * lucide-react icon or ReactNode.\n *\n * @default CircleAlert\n */\n icon?: LucideIconOrElement\n}\n\n/**\n * An error icon displayed if the control fails validation. Renders a `<span>`\n * element by default.\n */\nexport function InputErrorIndicator(\n props: InputErrorIndicatorProps,\n): ReactElement {\n const context = useQdsInputContext()\n\n const mergedProps = mergeProps(context.getErrorIndicatorBindings(), props, {\n icon: props.icon || CircleAlert,\n })\n\n return <IconOrNode {...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 {IconOrNode} from \"@qualcomm-ui/react/icon\"\nimport type {LucideIconOrElement} from \"@qualcomm-ui/react-core/lucide\"\nimport {\n type ElementRenderProp,\n PolymorphicElement,\n} from \"@qualcomm-ui/react-core/system\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {useQdsInputContext} from \"./qds-input-context\"\n\nexport interface InputErrorTextProps extends ElementRenderProp<\"div\"> {\n /**\n * An icon to display next to the error text.\n */\n icon?: LucideIconOrElement\n}\n\n/**\n * Error text displayed if the control fails validation. Renders a `<div>`\n * element by default.\n */\nexport function InputErrorText({\n children,\n icon,\n ...props\n}: InputErrorTextProps): ReactElement {\n const qdsContext = useQdsInputContext(false)\n\n const mergedProps = mergeProps(qdsContext?.getErrorTextBindings(), props)\n\n return (\n <PolymorphicElement as=\"div\" {...mergedProps}>\n {icon ? <IconOrNode icon={icon} /> : null}\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 {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {useQdsInputContext} from \"./qds-input-context\"\n\nexport interface InputHintProps 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 * A help message displayed below the input. Renders a `<div>` element by default.\n */\nexport function InputHint({children, ...props}: InputHintProps): ReactElement {\n const qdsContext = useQdsInputContext(false)\n const mergedProps = mergeProps(qdsContext?.getHintBindings(), props)\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 {Asterisk} from \"lucide-react\"\n\nimport {createQdsInputApi, inputClasses} from \"@qualcomm-ui/qds-core/input\"\nimport {Icon} from \"@qualcomm-ui/react/icon\"\nimport {normalizeProps} from \"@qualcomm-ui/react-core/machine\"\nimport {\n type ElementRenderProp,\n PolymorphicElement,\n} from \"@qualcomm-ui/react-core/system\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {useQdsInputContext} from \"./qds-input-context\"\n\nexport interface InputLabelProps extends ElementRenderProp<any> {\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 * Whether the input is required. When true, the field will show a required\n * indicator.\n */\n required?: boolean | undefined\n}\n\nconst defaultQdsApi = createQdsInputApi({size: \"md\"}, normalizeProps)\n\n/**\n * An accessible label that is automatically associated with the input field.\n * Renders a `<label>` element by default.\n */\nexport function InputLabel({\n children,\n required,\n ...props\n}: InputLabelProps): ReactElement {\n const qdsContext = useQdsInputContext(false)\n\n const mergedProps = mergeProps(\n (qdsContext ?? defaultQdsApi).getLabelBindings(),\n props,\n )\n\n return (\n <PolymorphicElement as=\"label\" {...mergedProps}>\n {children}\n {required ? (\n <Icon\n className={inputClasses.requiredIndicator}\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} from \"react\"\n\nimport {IconOrNode} from \"@qualcomm-ui/react/icon\"\nimport type {LucideIconOrElement} from \"@qualcomm-ui/react-core/lucide\"\nimport {\n type ElementRenderProp,\n PolymorphicElement,\n} from \"@qualcomm-ui/react-core/system\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nimport {useQdsInputContext} from \"./qds-input-context\"\n\nexport interface InputStartIconProps extends ElementRenderProp<\"div\"> {\n /**\n * lucide-react icon.\n */\n icon: LucideIconOrElement\n}\n\n/**\n * An icon placed at the start of the input.\n */\nexport function InputStartIcon({\n icon,\n ...props\n}: InputStartIconProps): ReactElement {\n const context = useQdsInputContext()\n\n const mergedProps = mergeProps(context.getStartIconBindings(), props)\n\n return (\n <PolymorphicElement as=\"div\" {...mergedProps}>\n <IconOrNode icon={icon} skipWrapper />\n </PolymorphicElement>\n )\n}\n"],"mappings":"6jBAWA,GAAa,CAACM,EAAyBC,GACrCL,EAAuC,CACrCM,SAAU,qBACVC,aAAc,4BACdC,OAAQ,GACT,CAAC,CCSJ,SAAOU,aAAAC,EAAA,CAAA,IAAAC,EAAAC,EAAA,EAAA,CAAsB,CAAAJ,OAAA,GAAAK,GAAAH,EAM3BK,EAAoBV,EAFJC,GAAoB,CAEEU,oBAAqB,CAAEH,EAAM,CAAAI,EAAAN,EAAA,KAAAH,EAIzBS,EAAAN,EAAA,IAAtCM,EAAA,EAAC,EAAD,CAAkBT,OAAM,YAAA,GAAc,CAAA,CAAAG,EAAA,GAAAH,EAAAG,EAAA,GAAAM,GAAA,IAAAC,EACnB,OADmBP,EAAA,KAAAI,GAAAJ,EAAA,KAAAM,GADxCC,EAAA,EAAC,EAAD,CAAuB,GAAA,MAAK,GAAKH,WAC/BE,EACmB,CAAA,CAAAN,EAAA,GAAAI,EAAAJ,EAAA,GAAAM,EAAAN,EAAA,GAAAO,GAAAA,EAAAP,EAAA,GAFrBO,ECPJ,SAAOU,oBAAAC,EAAA,CAAA,IAAAC,EAAAC,EAAA,EAAA,CAGLC,EAAgBP,GAAoB,CAAAQ,EAAAH,EAAA,KAAAE,GAAAF,EAAA,KAAAD,GAEhBI,EAAAT,EAAWQ,EAAOE,2BAA4B,CAAEL,EAAO,CAAAF,KACnEE,EAAKF,MAALP,EACP,CAAC,CAAAU,EAAA,GAAAE,EAAAF,EAAA,GAAAD,EAAAC,EAAA,GAAAG,GAAAA,EAAAH,EAAA,GAFF,IAAAK,EAAoBF,EAElBG,EAEoC,OAFpCN,EAAA,KAAAK,EAEoCC,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time";import{mergeProps as t}from"@qualcomm-ui/utils/merge-props";import{jsx as n}from"react/jsx-runtime";import{PolymorphicElement as r}from"@qualcomm-ui/react-core/system";import{normalizeProps as i}from"@qualcomm-ui/react-core/machine";import{getQdsKbdBindings as a}from"@qualcomm-ui/qds-core/kbd";function Kbd(o){let s=e(6),c,l;if(s[0]!==o){let{children:e,...n}=o;c=e,l=t(a(i),n),s[0]=o,s[1]=c,s[2]=l}else c=s[1],l=s[2];let u=l,d;return s[3]!==c||s[4]!==u?(d=n(r,{as:`div`,...u,children:c}),s[3]=c,s[4]=u,s[5]=d):d=s[5],d}export{Kbd};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
package/dist/kbd/index.js.map
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/kbd/kbd.tsx"],
|
|
4
|
-
"sourcesContent": ["import { jsx } from \"react/jsx-runtime\";\nimport { getQdsKbdBindings } from \"@qualcomm-ui/qds-core/kbd\";\nimport { normalizeProps } from \"@qualcomm-ui/react-core/machine\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function Kbd({\n children,\n ...props\n}) {\n const mergedProps = mergeProps(getQdsKbdBindings(normalizeProps), props);\n return /* @__PURE__ */jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n });\n}"],
|
|
5
|
-
"mappings": ";AAAA,OAAS,QAAW,oBACpB,OAAS,sBAAyB,4BAClC,OAAS,mBAAsB,kCAC/B,OAAS,uBAA0B,iCACnC,OAAS,eAAkB,iCACpB,SAAS,IAAI,CAClB,SACA,GAAG,KACL,EAAG,CACD,IAAM,YAAc,WAAW,kBAAkB,cAAc,EAAG,KAAK,EACvE,OAAsB,IAAI,mBAAoB,CAC5C,GAAI,MACJ,GAAG,YACH,QACF,CAAC,CACH",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ReactElement","getQdsKbdBindings","normalizeProps","ElementRenderProp","PolymorphicElement","mergeProps","KbdProps","Kbd","t0","$","_c","children","t1","t2","props","mergedProps"],"sources":["../../src/kbd/kbd.tsx"],"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 {getQdsKbdBindings} from \"@qualcomm-ui/qds-core/kbd\"\nimport {normalizeProps} from \"@qualcomm-ui/react-core/machine\"\nimport {\n type ElementRenderProp,\n PolymorphicElement,\n} from \"@qualcomm-ui/react-core/system\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nexport interface KbdProps extends ElementRenderProp<\"div\"> {}\n\nexport function Kbd({children, ...props}: KbdProps): ReactElement {\n const mergedProps = mergeProps(getQdsKbdBindings(normalizeProps), props)\n\n return (\n <PolymorphicElement as=\"div\" {...mergedProps}>\n {children}\n </PolymorphicElement>\n )\n}\n"],"mappings":"gWAeA,SAAOO,IAAAC,EAAA,CAAA,IAAAC,EAAAC,EAAA,EAAA,CAAAC,EAAAC,EAAA,GAAAH,EAAA,KAAAD,EAAA,CAAa,GAAA,CAAAG,SAAAE,EAAA,GAAAC,GAAAN,EAAAG,EAAAE,EACED,EAAAP,EAAWJ,EAAkBC,EAAe,CAAEY,EAAM,CAAAL,EAAA,GAAAD,EAAAC,EAAA,GAAAE,EAAAF,EAAA,GAAAG,OAAAD,EAAAF,EAAA,GAAAG,EAAAH,EAAA,GAAxE,IAAAM,EAAoBH,EAAoDC,EAKjD,OALiDJ,EAAA,KAAAE,GAAAF,EAAA,KAAAM,GAGtEF,EAAA,EAAC,EAAD,CAAuB,GAAA,MAAK,GAAKE,EAC9BJ,WACkB,CAAA,CAAAF,EAAA,GAAAE,EAAAF,EAAA,GAAAM,EAAAN,EAAA,GAAAI,GAAAA,EAAAJ,EAAA,GAFrBI"}
|
package/dist/link/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{IconOrNode as a}from"@qualcomm-ui/react/icon";import{normalizeProps as o}from"@qualcomm-ui/react-core/machine";import{createQdsLinkApi as s}from"@qualcomm-ui/qds-core/link";function Link(c){let l=e(14),u,d,f,p,m,h;if(l[0]!==c){let{children:e,dir:r,disabled:g,emphasis:_,endIcon:v,inheritFontSize:y,size:b,startIcon:x,...S}=c,C=s({dir:r,disabled:g,emphasis:_,inheritFontSize:y,size:b},o),w=t(C.getRootBindings(),S);u=i,d=`a`,f=w,p=x?n(a,{icon:x,...C.getStartIconBindings()}):null,m=e,h=v?n(a,{icon:v,...C.getEndIconBindings()}):null,l[0]=c,l[1]=u,l[2]=d,l[3]=f,l[4]=p,l[5]=m,l[6]=h}else u=l[1],d=l[2],f=l[3],p=l[4],m=l[5],h=l[6];let g;return l[7]!==u||l[8]!==d||l[9]!==f||l[10]!==p||l[11]!==m||l[12]!==h?(g=r(u,{as:d,...f,children:[p,m,h]}),l[7]=u,l[8]=d,l[9]=f,l[10]=p,l[11]=m,l[12]=h,l[13]=g):g=l[13],g}export{Link};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
package/dist/link/index.js.map
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/link/link.tsx"],
|
|
4
|
-
"sourcesContent": ["import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { createQdsLinkApi } from \"@qualcomm-ui/qds-core/link\";\nimport { IconOrNode } from \"@qualcomm-ui/react/icon\";\nimport { normalizeProps } from \"@qualcomm-ui/react-core/machine\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nexport function Link({\n children,\n dir,\n disabled,\n emphasis,\n endIcon,\n inheritFontSize,\n size,\n startIcon,\n ...props\n}) {\n const api = createQdsLinkApi({\n dir,\n disabled,\n emphasis,\n inheritFontSize,\n size\n }, normalizeProps);\n const mergedProps = mergeProps(api.getRootBindings(), props);\n return /* @__PURE__ */jsxs(PolymorphicElement, {\n as: \"a\",\n ...mergedProps,\n children: [startIcon ? /* @__PURE__ */jsx(IconOrNode, {\n icon: startIcon,\n ...api.getStartIconBindings()\n }) : null, children, endIcon ? /* @__PURE__ */jsx(IconOrNode, {\n icon: endIcon,\n ...api.getEndIconBindings()\n }) : null]\n });\n}"],
|
|
5
|
-
"mappings": ";AAAA,OAAS,IAAK,SAAY,oBAC1B,OAAS,qBAAwB,6BACjC,OAAS,eAAkB,0BAC3B,OAAS,mBAAsB,kCAC/B,OAAS,uBAA0B,iCACnC,OAAS,eAAkB,iCACpB,SAAS,KAAK,CACnB,SACA,IACA,SACA,SACA,QACA,gBACA,KACA,UACA,GAAG,KACL,EAAG,CACD,IAAM,IAAM,iBAAiB,CAC3B,IACA,SACA,SACA,gBACA,IACF,EAAG,cAAc,EACX,YAAc,WAAW,IAAI,gBAAgB,EAAG,KAAK,EAC3D,OAAsB,KAAK,mBAAoB,CAC7C,GAAI,IACJ,GAAG,YACH,SAAU,CAAC,UAA2B,IAAI,WAAY,CACpD,KAAM,UACN,GAAG,IAAI,qBAAqB,CAC9B,CAAC,EAAI,KAAM,SAAU,QAAyB,IAAI,WAAY,CAC5D,KAAM,QACN,GAAG,IAAI,mBAAmB,CAC5B,CAAC,EAAI,IAAI,CACX,CAAC,CACH",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ReactElement","ReactNode","createQdsLinkApi","QdsLinkApiProps","IconOrNode","LucideIconOrElement","normalizeProps","ElementRenderProp","PolymorphicElement","Explicit","mergeProps","LinkProps","Omit","children","endIcon","startIcon","Link","t0","$","_c","T0","t1","t2","t3","t4","t5","dir","disabled","emphasis","inheritFontSize","size","props","api","mergedProps","getRootBindings","getStartIconBindings","getEndIconBindings","t6"],"sources":["../../src/link/link.tsx"],"sourcesContent":["// 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 createQdsLinkApi,\n type QdsLinkApiProps,\n} from \"@qualcomm-ui/qds-core/link\"\nimport {IconOrNode} from \"@qualcomm-ui/react/icon\"\nimport type {LucideIconOrElement} from \"@qualcomm-ui/react-core/lucide\"\nimport {normalizeProps} from \"@qualcomm-ui/react-core/machine\"\nimport {\n type ElementRenderProp,\n PolymorphicElement,\n} from \"@qualcomm-ui/react-core/system\"\nimport type {Explicit} from \"@qualcomm-ui/utils/guard\"\nimport {mergeProps} from \"@qualcomm-ui/utils/merge-props\"\n\nexport interface LinkProps\n extends QdsLinkApiProps, Omit<ElementRenderProp<\"a\">, \"dir\"> {\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 * Icon positioned after the text content. If supplied as a\n * `LucideIcon`, the size will automatically match the {@link size} prop.\n * Supply as a `ReactElement` for additional customization.\n */\n endIcon?: LucideIconOrElement\n\n /**\n * Icon positioned before the text content. If supplied as a `LucideIcon`,\n * the size will automatically match the {@link size} prop. Supply as a\n * `ReactElement` for additional customization.\n */\n startIcon?: LucideIconOrElement\n}\n\n/**\n * A link to another page or resource. Renders an `<a>` element by default.\n */\nexport function Link({\n children,\n dir,\n disabled,\n emphasis,\n endIcon,\n inheritFontSize,\n size,\n startIcon,\n ...props\n}: LinkProps): ReactElement {\n const api = createQdsLinkApi(\n {\n dir,\n disabled,\n emphasis,\n inheritFontSize,\n size,\n } satisfies Explicit<QdsLinkApiProps>,\n normalizeProps,\n )\n const mergedProps = mergeProps(api.getRootBindings(), props)\n\n return (\n <PolymorphicElement as=\"a\" {...mergedProps}>\n {startIcon ? (\n <IconOrNode icon={startIcon} {...api.getStartIconBindings()} />\n ) : null}\n {children}\n {endIcon ? (\n <IconOrNode icon={endIcon} {...api.getEndIconBindings()} />\n ) : null}\n </PolymorphicElement>\n )\n}\n"],"mappings":"+ZA4CA,SAAOgB,KAAAC,EAAA,CAAA,IAAAC,EAAAC,EAAA,GAAA,CAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAA,GAAAP,EAAA,KAAAD,EAAA,CAAc,GAAA,CAAAJ,WAAAa,MAAAC,WAAAC,WAAAd,UAAAe,kBAAAC,OAAAf,YAAA,GAAAgB,GAAAd,EAWnBe,EAAY9B,EACV,CAAAwB,MAAAC,WAAAC,WAAAC,kBAAAC,OAMC,CACDxB,EACD,CACD2B,EAAoBvB,EAAWsB,EAAGE,iBAAkB,CAAEH,EAAM,CAGzDX,EAAAZ,EAAsBa,EAAA,IAAQY,EAAAA,EAC5BV,EAAAR,EACC,EAAC,EAAD,CAAkBA,KAAAA,EAAS,GAAMiB,EAAGG,sBAAuB,CACrD,CAAA,CAFP,KAGAtB,EAAAA,EACAY,EAAAX,EACC,EAAC,EAAD,CAAkBA,KAAAA,EAAO,GAAMkB,EAAGI,oBAAqB,CACjD,CAAA,CAFP,KAEOlB,EAAA,GAAAD,EAAAC,EAAA,GAAAE,EAAAF,EAAA,GAAAG,EAAAH,EAAA,GAAAI,EAAAJ,EAAA,GAAAK,EAAAL,EAAA,GAAAM,EAAAN,EAAA,GAAAO,OAAAL,EAAAF,EAAA,GAAAG,EAAAH,EAAA,GAAAI,EAAAJ,EAAA,GAAAK,EAAAL,EAAA,GAAAM,EAAAN,EAAA,GAAAO,EAAAP,EAAA,GAAA,IAAAmB,EACW,OADXnB,EAAA,KAAAE,GAAAF,EAAA,KAAAG,GAAAH,EAAA,KAAAI,GAAAJ,EAAA,MAAAK,GAAAL,EAAA,MAAAM,GAAAN,EAAA,MAAAO,GAPVY,EAAA,EAAC,EAAD,CAAuB,GAAAhB,EAAG,GAAKY,WAA/B,CACGV,EAGAV,EACAY,EAGkB,GAAAP,EAAA,GAAAE,EAAAF,EAAA,GAAAG,EAAAH,EAAA,GAAAI,EAAAJ,EAAA,IAAAK,EAAAL,EAAA,IAAAM,EAAAN,EAAA,IAAAO,EAAAP,EAAA,IAAAmB,GAAAA,EAAAnB,EAAA,IARrBmB"}
|
package/dist/menu/index.d.ts
CHANGED
|
@@ -1,54 +1,79 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
1
|
+
import type { FunctionComponent } from "react";
|
|
2
|
+
import { type MenuButtonProps } from "./menu-button";
|
|
3
|
+
import { type MenuCheckboxItemProps } from "./menu-checkbox-item";
|
|
4
|
+
import { type MenuCheckboxItemControlProps } from "./menu-checkbox-item-control";
|
|
5
|
+
import { type MenuContentProps } from "./menu-content";
|
|
6
|
+
import { type MenuContextTriggerProps } from "./menu-context-trigger";
|
|
7
|
+
import { type MenuIconButtonProps } from "./menu-icon-button";
|
|
8
|
+
import { type MenuInlineIconButtonProps } from "./menu-inline-icon-button";
|
|
9
|
+
import { type MenuItemProps } from "./menu-item";
|
|
10
|
+
import { type MenuItemAccessoryProps } from "./menu-item-accessory";
|
|
11
|
+
import { type MenuItemCommandProps } from "./menu-item-command";
|
|
12
|
+
import { type MenuItemDescriptionProps } from "./menu-item-description";
|
|
13
|
+
import { type MenuItemGroupProps } from "./menu-item-group";
|
|
14
|
+
import { type MenuItemGroupLabelProps } from "./menu-item-group-label";
|
|
15
|
+
import { type MenuItemIndicatorProps } from "./menu-item-indicator";
|
|
16
|
+
import { type MenuItemLabelProps } from "./menu-item-label";
|
|
17
|
+
import { type MenuItemStartIconProps } from "./menu-item-start-icon";
|
|
18
|
+
import { type MenuPositionerProps } from "./menu-positioner";
|
|
19
|
+
import { type MenuRadioItemProps } from "./menu-radio-item";
|
|
20
|
+
import { type MenuRadioItemControlProps } from "./menu-radio-item-control";
|
|
21
|
+
import { type MenuRadioItemGroupProps } from "./menu-radio-item-group";
|
|
22
|
+
import { type MenuRootProps } from "./menu-root";
|
|
23
|
+
import { type MenuSeparatorProps } from "./menu-separator";
|
|
24
|
+
import { type MenuSplitButtonProps } from "./menu-split-button";
|
|
25
|
+
import { type MenuTriggerProps } from "./menu-trigger";
|
|
26
|
+
import { type MenuTriggerItemProps } from "./menu-trigger-item";
|
|
25
27
|
export * from "./qds-menu-context";
|
|
26
|
-
export type {
|
|
27
|
-
|
|
28
|
-
Button:
|
|
29
|
-
CheckboxItem:
|
|
30
|
-
CheckboxItemControl:
|
|
31
|
-
Content:
|
|
32
|
-
ContextTrigger:
|
|
33
|
-
IconButton:
|
|
34
|
-
InlineIconButton:
|
|
35
|
-
Item:
|
|
36
|
-
ItemAccessory:
|
|
37
|
-
ItemCommand:
|
|
38
|
-
ItemDescription:
|
|
39
|
-
ItemGroup:
|
|
40
|
-
ItemGroupLabel:
|
|
41
|
-
ItemIndicator:
|
|
42
|
-
ItemLabel:
|
|
43
|
-
ItemStartIcon:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
28
|
+
export type { MenuIconButtonProps, MenuItemCommandProps, MenuInlineIconButtonProps, MenuRadioItemControlProps, MenuRadioItemProps, MenuButtonProps, MenuTriggerItemProps, MenuTriggerProps, MenuItemProps, MenuContentProps, MenuRootProps, MenuItemLabelProps, MenuItemDescriptionProps, MenuItemGroupProps, MenuRadioItemGroupProps, MenuCheckboxItemControlProps, MenuPositionerProps, MenuItemIndicatorProps, MenuItemGroupLabelProps, MenuContextTriggerProps, MenuSeparatorProps, MenuSplitButtonProps, MenuItemAccessoryProps, MenuCheckboxItemProps, MenuItemStartIconProps, };
|
|
29
|
+
interface MenuComponent {
|
|
30
|
+
Button: FunctionComponent<MenuButtonProps>;
|
|
31
|
+
CheckboxItem: FunctionComponent<MenuCheckboxItemProps>;
|
|
32
|
+
CheckboxItemControl: FunctionComponent<MenuCheckboxItemControlProps>;
|
|
33
|
+
Content: FunctionComponent<MenuContentProps>;
|
|
34
|
+
ContextTrigger: FunctionComponent<MenuContextTriggerProps>;
|
|
35
|
+
IconButton: FunctionComponent<MenuIconButtonProps>;
|
|
36
|
+
InlineIconButton: FunctionComponent<MenuInlineIconButtonProps>;
|
|
37
|
+
Item: FunctionComponent<MenuItemProps>;
|
|
38
|
+
ItemAccessory: FunctionComponent<MenuItemAccessoryProps>;
|
|
39
|
+
ItemCommand: FunctionComponent<MenuItemCommandProps>;
|
|
40
|
+
ItemDescription: FunctionComponent<MenuItemDescriptionProps>;
|
|
41
|
+
ItemGroup: FunctionComponent<MenuItemGroupProps>;
|
|
42
|
+
ItemGroupLabel: FunctionComponent<MenuItemGroupLabelProps>;
|
|
43
|
+
ItemIndicator: FunctionComponent<MenuItemIndicatorProps>;
|
|
44
|
+
ItemLabel: FunctionComponent<MenuItemLabelProps>;
|
|
45
|
+
ItemStartIcon: FunctionComponent<MenuItemStartIconProps>;
|
|
46
|
+
/**
|
|
47
|
+
* A container that positions the menu relative to its anchor element. Renders a
|
|
48
|
+
* `<div>` element by default.
|
|
49
|
+
*/
|
|
50
|
+
Positioner: FunctionComponent<MenuPositionerProps>;
|
|
51
|
+
RadioItem: FunctionComponent<MenuRadioItemProps>;
|
|
52
|
+
RadioItemControl: FunctionComponent<MenuRadioItemControlProps>;
|
|
53
|
+
RadioItemGroup: FunctionComponent<MenuRadioItemGroupProps>;
|
|
54
|
+
Root: FunctionComponent<MenuRootProps>;
|
|
55
|
+
Separator: FunctionComponent<MenuSeparatorProps>;
|
|
56
|
+
/**
|
|
57
|
+
* @since 1.24.0
|
|
58
|
+
*/
|
|
59
|
+
SplitButton: FunctionComponent<MenuSplitButtonProps>;
|
|
60
|
+
/**
|
|
61
|
+
* Enhances a child element to open the menu when clicked. Requires a single child
|
|
62
|
+
* element.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```tsx
|
|
66
|
+
* <Menu.Trigger>
|
|
67
|
+
* <button>Open</button>
|
|
68
|
+
* </Menu.Trigger>
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
Trigger: FunctionComponent<MenuTriggerProps>;
|
|
72
|
+
/**
|
|
73
|
+
* A menu item that triggers a submenu on hover or click. Renders a `<button>`
|
|
74
|
+
* element by default.
|
|
75
|
+
*/
|
|
76
|
+
TriggerItem: FunctionComponent<MenuTriggerItemProps>;
|
|
77
|
+
}
|
|
53
78
|
export declare const Menu: MenuComponent;
|
|
54
79
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/menu/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAE5C,OAAO,EAAa,KAAK,eAAe,EAAC,MAAM,eAAe,CAAA;AAC9D,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,8BAA8B,CAAA;AACrC,O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B,CAAC,CAAA;IACxD,SAAS,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,CAAA;IAChD,aAAa,EAAE,iBAAiB,CAAC,sBAAsB,CAAC,CAAA;IACxD;;;OAGG;IACH,UAAU,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,CAAA;IAClD,SAAS,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,CAAA;IAChD,gBAAgB,EAAE,iBAAiB,CAAC,yBAAyB,CAAC,CAAA;IAC9D,cAAc,EAAE,iBAAiB,CAAC,uBAAuB,CAAC,CAAA;IAC1D,IAAI,EAAE,iBAAiB,CAAC,aAAa,CAAC,CAAA;IACtC,SAAS,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,CAAA;IAChD;;OAEG;IACH,WAAW,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,CAAA;IACpD;;;;;;;;;;OAUG;IACH,OAAO,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAA;IAC5C;;;OAGG;IACH,WAAW,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,CAAA;CACrD;AAED,eAAO,MAAM,IAAI,EAAE,aA6BlB,CAAA"}
|
package/dist/menu/index.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{jsx,jsxs}from"react/jsx-runtime";import{ChevronDown}from"lucide-react";import{Button}from"@qualcomm-ui/react/button";import{Icon}from"@qualcomm-ui/react/icon";import{mergeProps}from"@qualcomm-ui/utils/merge-props";import{createGuardedContext}from"@qualcomm-ui/react-core/context";var[QdsMenuContextProvider,useQdsMenuContext]=createGuardedContext({hookName:"useQdsMenuContext",providerName:"<QdsMenuContextProvider>",strict:!0});function MenuButton(t0){let{children,density,size,...props}=t0,qdsMenuContext=useQdsMenuContext(),resolvedSize=size??qdsMenuContext.size,mergedProps=mergeProps(qdsMenuContext.getButtonBindings(),props);return jsxs(Button,{...mergedProps,density,size:resolvedSize,children:[children,jsx(Icon,{...qdsMenuContext.getIndicatorBindings(),icon:ChevronDown,size:resolvedSize})]})}import{jsx as jsx2}from"react/jsx-runtime";import{splitMenuOptionItemProps}from"@qualcomm-ui/core/menu";import{MenuItemContextProvider,MenuOptionItemContextProvider,useMenuCheckboxItem}from"@qualcomm-ui/react-core/menu";import{PolymorphicElement}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps2}from"@qualcomm-ui/utils/merge-props";function MenuCheckboxItem(t0){let{children,...props}=t0,[optionItemProps,localProps]=splitMenuOptionItemProps({...props,type:"checkbox"}),{bindings,optionItemContextValue}=useMenuCheckboxItem(optionItemProps),qdsContext=useQdsMenuContext(),mergedProps=mergeProps2(bindings,qdsContext.getRadioItemBindings(),localProps);return jsx2(MenuOptionItemContextProvider,{value:optionItemContextValue,children:jsx2(MenuItemContextProvider,{value:optionItemContextValue,children:jsx2(PolymorphicElement,{as:"button",...mergedProps,children})})})}import{jsx as jsx3}from"react/jsx-runtime";import{CheckmarkIcon}from"@qualcomm-ui/react/checkmark";import{useMenuOptionItemControl}from"@qualcomm-ui/react-core/menu";import{PolymorphicElement as PolymorphicElement2}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps3}from"@qualcomm-ui/utils/merge-props";function MenuCheckboxItemControl(t0){let{children:t1,...props}=t0,children=t1===void 0?jsx3(CheckmarkIcon,{indeterminate:!1}):t1,contextProps=useMenuOptionItemControl(),qdsContext=useQdsMenuContext(),mergedProps=mergeProps3(contextProps,qdsContext.getCheckboxItemControlBindings(),props);return jsx3(PolymorphicElement2,{as:"div",...mergedProps,children})}import{c as _c}from"react/compiler-runtime";import{jsx as jsx4}from"react/jsx-runtime";import{useMenuContent}from"@qualcomm-ui/react-core/menu";import{PolymorphicElement as PolymorphicElement3}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps4}from"@qualcomm-ui/utils/merge-props";function MenuContent(t0){let $=_c(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useMenuContent(t1),qdsContext=useQdsMenuContext();if(contextProps===null)return null;let mergedProps=mergeProps4(contextProps,qdsContext.getContentBindings(),props);return jsx4(PolymorphicElement3,{as:"div",...mergedProps,children})}import{c as _c2}from"react/compiler-runtime";import{jsx as jsx5}from"react/jsx-runtime";import{useMenuContextTrigger}from"@qualcomm-ui/react-core/menu";import{PolymorphicElement as PolymorphicElement4}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps5}from"@qualcomm-ui/utils/merge-props";function MenuContextTrigger(t0){let $=_c2(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useMenuContextTrigger(t1),mergedProps=mergeProps5(contextProps,props);return jsx5(PolymorphicElement4,{as:"button",...mergedProps,children})}import{c as _c3}from"react/compiler-runtime";import{jsx as jsx6,jsxs as jsxs2}from"react/jsx-runtime";import"react";import{ChevronDown as ChevronDown2}from"lucide-react";import{createQdsIconButtonApi}from"@qualcomm-ui/qds-core/button";import{Icon as Icon2}from"@qualcomm-ui/react/icon";import{normalizeProps}from"@qualcomm-ui/react-core/machine";import{PolymorphicElement as PolymorphicElement5}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps6}from"@qualcomm-ui/utils/merge-props";function MenuIconButton(t0){let $=_c3(7),{density,disabled,emphasis,icon,shape,size,variant,...props}=t0,qdsMenuContext=useQdsMenuContext(),resolvedSize=size??qdsMenuContext.size,t1;$[0]!==density||$[1]!==disabled||$[2]!==emphasis||$[3]!==resolvedSize||$[4]!==shape||$[5]!==variant?(t1=createQdsIconButtonApi({density,disabled,emphasis,shape,size:resolvedSize,variant},normalizeProps),$[0]=density,$[1]=disabled,$[2]=emphasis,$[3]=resolvedSize,$[4]=shape,$[5]=variant,$[6]=t1):t1=$[6];let api=t1,mergedProps=mergeProps6(api.getRootBindings(),qdsMenuContext.getButtonBindings(),props);return jsxs2(PolymorphicElement5,{as:"button",...mergedProps,children:[icon&&jsx6(Icon2,{icon,...api.getIconBindings()}),jsx6(Icon2,{...qdsMenuContext.getIndicatorBindings(),icon:ChevronDown2,size:resolvedSize})]})}import{jsx as jsx7}from"react/jsx-runtime";import{InlineIconButton}from"@qualcomm-ui/react/inline-icon-button";function MenuInlineIconButton(props){return jsx7(InlineIconButton,{...props})}import{jsx as jsx8}from"react/jsx-runtime";import{splitMenuItemProps}from"@qualcomm-ui/core/menu";import{MenuItemContextProvider as MenuItemContextProvider2,useMenuItem}from"@qualcomm-ui/react-core/menu";import{PolymorphicElement as PolymorphicElement6}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps7}from"@qualcomm-ui/utils/merge-props";function MenuItem(t0){let{children,...props}=t0,[menuItemProps,localProps]=splitMenuItemProps(props),{bindings,itemContextValue}=useMenuItem(menuItemProps),qdsContext=useQdsMenuContext(),mergedProps=mergeProps7(bindings,qdsContext.getItemBindings(),localProps);return jsx8(MenuItemContextProvider2,{value:itemContextValue,children:jsx8(PolymorphicElement6,{as:"button",...mergedProps,children})})}import{jsx as jsx9}from"react/jsx-runtime";import{PolymorphicElement as PolymorphicElement7}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps8}from"@qualcomm-ui/utils/merge-props";function MenuItemAccessory(t0){let{children,...props}=t0,qdsContext=useQdsMenuContext(),mergedProps=mergeProps8(qdsContext.getMenuItemAccessoryBindings(),props);return jsx9(PolymorphicElement7,{as:"div",...mergedProps,children})}import{c as _c4}from"react/compiler-runtime";import{jsx as jsx10}from"react/jsx-runtime";import{PolymorphicElement as PolymorphicElement8}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps9}from"@qualcomm-ui/utils/merge-props";function MenuItemCommand(props){let $=_c4(3),context=useQdsMenuContext(),t0;if($[0]!==context||$[1]!==props){let mergedProps=mergeProps9(context.getItemCommandBindings(),props);t0=jsx10(PolymorphicElement8,{as:"kbd",...mergedProps}),$[0]=context,$[1]=props,$[2]=t0}else t0=$[2];return t0}import{jsx as jsx11}from"react/jsx-runtime";import{PolymorphicElement as PolymorphicElement9}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps10}from"@qualcomm-ui/utils/merge-props";function MenuItemDescription(t0){let{children,...props}=t0,qdsMenuContext=useQdsMenuContext(),mergedProps=mergeProps10(qdsMenuContext.getMenuItemDescriptionBindings(),props);return jsx11(PolymorphicElement9,{as:"div",...mergedProps,children})}import{c as _c5}from"react/compiler-runtime";import{jsx as jsx12}from"react/jsx-runtime";import{MenuItemGroupContextProvider,useMenuItemGroup}from"@qualcomm-ui/react-core/menu";import{PolymorphicElement as PolymorphicElement10}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps11}from"@qualcomm-ui/utils/merge-props";function MenuItemGroup(t0){let $=_c5(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let{bindings,itemGroupContextValue}=useMenuItemGroup(t1),qdsContext=useQdsMenuContext(),mergedProps=mergeProps11(bindings,qdsContext.getItemGroupBindings(),props);return jsx12(MenuItemGroupContextProvider,{value:itemGroupContextValue,children:jsx12(PolymorphicElement10,{as:"div",...mergedProps,children})})}import{jsx as jsx13}from"react/jsx-runtime";import{useMenuItemGroupLabel}from"@qualcomm-ui/react-core/menu";import{PolymorphicElement as PolymorphicElement11}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps12}from"@qualcomm-ui/utils/merge-props";function MenuItemGroupLabel(t0){let{children,...props}=t0,bindings=useMenuItemGroupLabel(),qdsContext=useQdsMenuContext(),mergedProps=mergeProps12(bindings,qdsContext.getItemGroupLabelBindings(),props);return jsx13(PolymorphicElement11,{as:"div",...mergedProps,children})}import{jsx as jsx14,jsxs as jsxs3}from"react/jsx-runtime";import{Check}from"lucide-react";import{Icon as Icon3}from"@qualcomm-ui/react/icon";import{useMenuItemIndicator}from"@qualcomm-ui/react-core/menu";import{PolymorphicElement as PolymorphicElement12}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps13}from"@qualcomm-ui/utils/merge-props";function MenuItemIndicator(t0){let{children,...props}=t0,contextProps=useMenuItemIndicator(),qdsContext=useQdsMenuContext(),mergedProps=mergeProps13(contextProps,qdsContext.getItemIndicatorBindings(),props);return jsxs3(PolymorphicElement12,{as:"div",...mergedProps,children:[children,jsx14(Icon3,{icon:Check})]})}import{jsx as jsx15}from"react/jsx-runtime";import{useMenuItemLabel}from"@qualcomm-ui/react-core/menu";import{PolymorphicElement as PolymorphicElement13}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps14}from"@qualcomm-ui/utils/merge-props";function MenuItemLabel(t0){let{children,...props}=t0,contextProps=useMenuItemLabel(),qdsContext=useQdsMenuContext(),mergedProps=mergeProps14(contextProps,qdsContext.getItemLabelBindings(),props);return jsx15(PolymorphicElement13,{as:"div",...mergedProps,children})}import{c as _c6}from"react/compiler-runtime";import{jsx as jsx16}from"react/jsx-runtime";import{IconOrNode}from"@qualcomm-ui/react/icon";import{mergeProps as mergeProps15}from"@qualcomm-ui/utils/merge-props";function MenuItemStartIcon(props){let $=_c6(3),context=useQdsMenuContext(),t0;if($[0]!==context||$[1]!==props){let mergedProps=mergeProps15(context.getItemStartIconBindings(),{},props);t0=jsx16(IconOrNode,{...mergedProps}),$[0]=context,$[1]=props,$[2]=t0}else t0=$[2];return t0}import{c as _c7}from"react/compiler-runtime";import{jsx as jsx17}from"react/jsx-runtime";import{useMenuPositioner}from"@qualcomm-ui/react-core/menu";import{PolymorphicElement as PolymorphicElement14}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps16}from"@qualcomm-ui/utils/merge-props";function MenuPositioner(t0){let $=_c7(2),{children,id,...props}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let contextProps=useMenuPositioner(t1);if(!contextProps)return null;let mergedProps=mergeProps16(contextProps,props);return jsx17(PolymorphicElement14,{as:"div",...mergedProps,children})}import{jsx as jsx18}from"react/jsx-runtime";import{splitMenuItemProps as splitMenuItemProps2}from"@qualcomm-ui/core/menu";import{MenuItemContextProvider as MenuItemContextProvider3,MenuOptionItemContextProvider as MenuOptionItemContextProvider2,useMenuRadioItem}from"@qualcomm-ui/react-core/menu";import{PolymorphicElement as PolymorphicElement15}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps17}from"@qualcomm-ui/utils/merge-props";function MenuRadioItem(t0){let{children,...props}=t0,[radioItemProps,localProps]=splitMenuItemProps2(props),{bindings,optionItemContextValue}=useMenuRadioItem(radioItemProps),qdsContext=useQdsMenuContext(),mergedProps=mergeProps17(bindings,qdsContext.getRadioItemBindings(),localProps);return jsx18(MenuOptionItemContextProvider2,{value:optionItemContextValue,children:jsx18(MenuItemContextProvider3,{value:optionItemContextValue,children:jsx18(PolymorphicElement15,{as:"button",...mergedProps,children})})})}import{jsx as jsx19}from"react/jsx-runtime";import{useMenuOptionItemControl as useMenuOptionItemControl2}from"@qualcomm-ui/react-core/menu";import{PolymorphicElement as PolymorphicElement16}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps18}from"@qualcomm-ui/utils/merge-props";function MenuRadioItemControl(t0){let{children,...props}=t0,contextProps=useMenuOptionItemControl2(),qdsContext=useQdsMenuContext(),mergedProps=mergeProps18(contextProps,qdsContext.getRadioItemControlBindings(),props);return jsx19(PolymorphicElement16,{as:"div",...mergedProps,children})}import{c as _c8}from"react/compiler-runtime";import{jsx as jsx20}from"react/jsx-runtime";import{MenuRadioItemGroupContextProvider,useMenuRadioItemGroup}from"@qualcomm-ui/react-core/menu";import{PolymorphicElement as PolymorphicElement17}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps19}from"@qualcomm-ui/utils/merge-props";function MenuRadioItemGroup(t0){let $=_c8(4),{children,id,onValueChange,value,...props}=t0,t1;$[0]!==id||$[1]!==onValueChange||$[2]!==value?(t1={id,onValueChange,value},$[0]=id,$[1]=onValueChange,$[2]=value,$[3]=t1):t1=$[3];let{bindings,itemGroupContextValue}=useMenuRadioItemGroup(t1),qdsContext=useQdsMenuContext(),mergedProps=mergeProps19(bindings,qdsContext.getItemGroupBindings(),props);return jsx20(MenuRadioItemGroupContextProvider,{value:itemGroupContextValue,children:jsx20(PolymorphicElement17,{as:"div",...mergedProps,children})})}import{c as _c9}from"react/compiler-runtime";import{jsx as jsx21}from"react/jsx-runtime";import"react";import{splitPresenceProps}from"@qualcomm-ui/core/presence";import{createQdsMenuApi}from"@qualcomm-ui/qds-core/menu";import{normalizeProps as normalizeProps2}from"@qualcomm-ui/react-core/machine";import{MenuContextProvider,MenuMachineContextProvider,MenuTriggerContextProvider,useMenu}from"@qualcomm-ui/react-core/menu";import{PresenceContextProvider,usePresence}from"@qualcomm-ui/react-core/presence";import{mergeProps as mergeProps20}from"@qualcomm-ui/utils/merge-props";function MenuRoot(t0){let $=_c9(9),{children,size,...props}=t0,[presenceProps,menuProps]=splitPresenceProps(props),{api,machine,triggerItemContext}=useMenu(menuProps),presenceApi=usePresence(mergeProps20({present:api.open},presenceProps)),qdsContext=useQdsMenuContext(!1),finalSize=size??qdsContext?.size,t1;$[0]!==finalSize?(t1=createQdsMenuApi({size:finalSize},normalizeProps2),$[0]=finalSize,$[1]=t1):t1=$[1];let qdsContextValue=t1,t2;return $[2]!==api||$[3]!==children||$[4]!==machine||$[5]!==presenceApi||$[6]!==qdsContextValue||$[7]!==triggerItemContext?(t2=jsx21(MenuTriggerContextProvider,{value:triggerItemContext,children:jsx21(MenuMachineContextProvider,{value:machine,children:jsx21(MenuContextProvider,{value:api,children:jsx21(PresenceContextProvider,{value:presenceApi,children:jsx21(QdsMenuContextProvider,{value:qdsContextValue,children})})})})}),$[2]=api,$[3]=children,$[4]=machine,$[5]=presenceApi,$[6]=qdsContextValue,$[7]=triggerItemContext,$[8]=t2):t2=$[8],t2}import{jsx as jsx22}from"react/jsx-runtime";import{useMenuSeparator}from"@qualcomm-ui/react-core/menu";import{PolymorphicElement as PolymorphicElement18}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps21}from"@qualcomm-ui/utils/merge-props";function MenuSeparator(t0){let{children,...props}=t0,contextProps=useMenuSeparator(),qdsContext=useQdsMenuContext(),mergedProps=mergeProps21(contextProps,qdsContext.getSeparatorBindings(),props);return jsx22(PolymorphicElement18,{as:"hr",...mergedProps,children})}import{c as _c10}from"react/compiler-runtime";import{useMenuTrigger}from"@qualcomm-ui/react-core/menu";import{bindingRenderProp}from"@qualcomm-ui/react-core/system";function MenuTrigger(t0){let $=_c10(5),{children,id}=t0,t1;$[0]!==id?(t1={id},$[0]=id,$[1]=t1):t1=$[1];let menuTriggerBindings=useMenuTrigger(t1),t2;return $[2]!==children||$[3]!==menuTriggerBindings?(t2=bindingRenderProp(children,menuTriggerBindings),$[2]=children,$[3]=menuTriggerBindings,$[4]=t2):t2=$[4],t2}import{jsx as jsx23,jsxs as jsxs4}from"react/jsx-runtime";import{ChevronRight}from"lucide-react";import{splitMenuItemProps as splitMenuItemProps3}from"@qualcomm-ui/core/menu";import{IconOrNode as IconOrNode2}from"@qualcomm-ui/react/icon";import{MenuItemContextProvider as MenuItemContextProvider4,useMenuTriggerItem}from"@qualcomm-ui/react-core/menu";import{PolymorphicElement as PolymorphicElement19}from"@qualcomm-ui/react-core/system";import{mergeProps as mergeProps22}from"@qualcomm-ui/utils/merge-props";function MenuTriggerItem(t0){let{children,icon:t1,id,...props}=t0,icon=t1===void 0?ChevronRight:t1,[menuItemProps,localProps]=splitMenuItemProps3(props),context=useMenuTriggerItem({id,...menuItemProps}),qdsContext=useQdsMenuContext(),mergedProps=mergeProps22(context.bindings??{},qdsContext.getItemBindings(),localProps);return jsx23(MenuItemContextProvider4,{value:context.itemContextValue,children:jsxs4(PolymorphicElement19,{as:"button",...mergedProps,children:[children,jsx23("div",{...qdsContext.getTriggerItemIndicatorBindings(),children:jsx23(IconOrNode2,{icon})})]})})}var Menu={Button:MenuButton,CheckboxItem:MenuCheckboxItem,CheckboxItemControl:MenuCheckboxItemControl,Content:MenuContent,ContextTrigger:MenuContextTrigger,IconButton:MenuIconButton,InlineIconButton:MenuInlineIconButton,Item:MenuItem,ItemAccessory:MenuItemAccessory,ItemCommand:MenuItemCommand,ItemDescription:MenuItemDescription,ItemGroup:MenuItemGroup,ItemGroupLabel:MenuItemGroupLabel,ItemIndicator:MenuItemIndicator,ItemLabel:MenuItemLabel,ItemStartIcon:MenuItemStartIcon,Positioner:MenuPositioner,RadioItem:MenuRadioItem,RadioItemControl:MenuRadioItemControl,RadioItemGroup:MenuRadioItemGroup,Root:MenuRoot,Separator:MenuSeparator,Trigger:MenuTrigger,TriggerItem:MenuTriggerItem};export{Menu,QdsMenuContextProvider,useQdsMenuContext};
|
|
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{Check as o,ChevronDown as s,ChevronRight as c}from"lucide-react";import{Icon as l,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,useButtonGroupContext as m}from"@qualcomm-ui/react/button";import{createQdsIconButtonApi as h,resolveButtonPropsWithGroup as g}from"@qualcomm-ui/qds-core/button";import{CheckmarkIcon as _}from"@qualcomm-ui/react/checkmark";import{InlineIconButton as v}from"@qualcomm-ui/react/inline-icon-button";import{MenuContextProvider as y,MenuItemContextProvider as b,MenuItemGroupContextProvider as x,MenuMachineContextProvider as S,MenuOptionItemContextProvider as C,MenuRadioItemGroupContextProvider as w,MenuTriggerContextProvider as T,useMenu as E,useMenuCheckboxItem as D,useMenuContent as O,useMenuContextTrigger as k,useMenuItem as A,useMenuItemGroup as j,useMenuItemGroupLabel as M,useMenuItemIndicator as N,useMenuItemLabel as P,useMenuOptionItemControl as F,useMenuPositioner as I,useMenuRadioItem as L,useMenuRadioItemGroup as R,useMenuSeparator as z,useMenuTrigger as B,useMenuTriggerItem as V}from"@qualcomm-ui/react-core/menu";import{splitMenuItemProps as H,splitMenuOptionItemProps as U}from"@qualcomm-ui/core/menu";import{splitPresenceProps as W}from"@qualcomm-ui/core/presence";import{createQdsMenuApi as G,getQdsSplitButtonBindings as K}from"@qualcomm-ui/qds-core/menu";import{PresenceContextProvider as q,usePresence as J}from"@qualcomm-ui/react-core/presence";var[Y,X]=f({hookName:`useQdsMenuContext`,providerName:`<QdsMenuContextProvider>`,strict:!0});function MenuButton(i){let a=e(11),{children:o,density:c,size:u,...d}=i,f=X(),m=u??f.size,h=t(f.getButtonBindings(),d),g;a[0]===f?g=a[1]:(g=f.getIndicatorBindings(),a[0]=f,a[1]=g);let _;a[2]!==m||a[3]!==g?(_=n(l,{...g,icon:s,size:m}),a[2]=m,a[3]=g,a[4]=_):_=a[4];let v;return a[5]!==o||a[6]!==c||a[7]!==h||a[8]!==m||a[9]!==_?(v=r(p,{...h,density:c,size:m,children:[o,_]}),a[5]=o,a[6]=c,a[7]=h,a[8]=m,a[9]=_,a[10]=v):v=a[10],v}function MenuCheckboxItem(r){let a=e(9),{children:o,...s}=r,[c,l]=U({...s,type:`checkbox`}),{bindings:u,optionItemContextValue:d}=D(c),f=t(u,X().getRadioItemBindings(),l),p;a[0]!==o||a[1]!==f?(p=n(i,{as:`button`,...f,children:o}),a[0]=o,a[1]=f,a[2]=p):p=a[2];let m;a[3]!==d||a[4]!==p?(m=n(b,{value:d,children:p}),a[3]=d,a[4]=p,a[5]=m):m=a[5];let h;return a[6]!==d||a[7]!==m?(h=n(C,{value:d,children:m}),a[6]=d,a[7]=m,a[8]=h):h=a[8],h}function MenuCheckboxItemControl({children:e=n(_,{indeterminate:!1}),...r}){return n(i,{as:`div`,...t(F(),X().getCheckboxItemControlBindings(),r),children:e})}function MenuContent(r){let a=e(5),{children:o,id:s,...c}=r,l;a[0]===s?l=a[1]:(l={id:s},a[0]=s,a[1]=l);let u=O(l),d=X();if(u===null)return null;let f=t(u,d.getContentBindings(),c),p;return a[2]!==o||a[3]!==f?(p=n(i,{as:`div`,...f,children:o}),a[2]=o,a[3]=f,a[4]=p):p=a[4],p}function MenuContextTrigger(r){let a=e(5),{children:o,id:s,...c}=r,l;a[0]===s?l=a[1]:(l={id:s},a[0]=s,a[1]=l);let u=t(k(l),c),d;return a[2]!==o||a[3]!==u?(d=n(i,{as:`button`,...u,children:o}),a[2]=o,a[3]=u,a[4]=d):d=a[4],d}function MenuIconButton(a){let o=e(26),{density:c,disabled:u,emphasis:f,icon:p,shape:_,size:v,variant:y,...b}=a,x=X(),S=m(),C=v??x.size,w;o[0]!==c||o[1]!==u||o[2]!==f||o[3]!==S||o[4]!==C||o[5]!==y?(w=g(S,{density:c,disabled:u,emphasis:f,size:C,variant:y}),o[0]=c,o[1]=u,o[2]=f,o[3]=S,o[4]=C,o[5]=y,o[6]=w):w=o[6];let{density:T,disabled:E,emphasis:D,size:O,variant:k}=w,A;o[7]!==T||o[8]!==E||o[9]!==D||o[10]!==O||o[11]!==k||o[12]!==_?(A=h({density:T,disabled:E,emphasis:D,shape:_,size:O,variant:k},d),o[7]=T,o[8]=E,o[9]=D,o[10]=O,o[11]=k,o[12]=_,o[13]=A):A=o[13];let j=A,M=t(j.getRootBindings(),x.getButtonBindings(),b),N;o[14]!==j||o[15]!==p?(N=p&&n(l,{icon:p,...j.getIconBindings()}),o[14]=j,o[15]=p,o[16]=N):N=o[16];let P;o[17]===x?P=o[18]:(P=x.getIndicatorBindings(),o[17]=x,o[18]=P);let F;o[19]!==O||o[20]!==P?(F=n(l,{...P,icon:s,size:O}),o[19]=O,o[20]=P,o[21]=F):F=o[21];let I;return o[22]!==M||o[23]!==N||o[24]!==F?(I=r(i,{as:`button`,...M,children:[N,F]}),o[22]=M,o[23]=N,o[24]=F,o[25]=I):I=o[25],I}function MenuInlineIconButton(t){let r=e(2),i;return r[0]===t?i=r[1]:(i=n(v,{...t}),r[0]=t,r[1]=i),i}function MenuItem(r){let a=e(6),{children:o,...s}=r,[c,l]=H(s),{bindings:u,itemContextValue:d}=A(c),f=t(u,X().getItemBindings(),l),p;a[0]!==o||a[1]!==f?(p=n(i,{as:`button`,...f,children:o}),a[0]=o,a[1]=f,a[2]=p):p=a[2];let m;return a[3]!==d||a[4]!==p?(m=n(b,{value:d,children:p}),a[3]=d,a[4]=p,a[5]=m):m=a[5],m}function MenuItemAccessory(r){let a=e(3),{children:o,...s}=r,c=t(X().getMenuItemAccessoryBindings(),s),l;return a[0]!==o||a[1]!==c?(l=n(i,{as:`div`,...c,children:o}),a[0]=o,a[1]=c,a[2]=l):l=a[2],l}function MenuItemCommand(r){let a=e(5),o=X(),s;a[0]!==o||a[1]!==r?(s=t(o.getItemCommandBindings(),r),a[0]=o,a[1]=r,a[2]=s):s=a[2];let c=s,l;return a[3]===c?l=a[4]:(l=n(i,{as:`kbd`,...c}),a[3]=c,a[4]=l),l}function MenuItemDescription(r){let a=e(3),{children:o,...s}=r,c=t(X().getMenuItemDescriptionBindings(),s),l;return a[0]!==o||a[1]!==c?(l=n(i,{as:`div`,...c,children:o}),a[0]=o,a[1]=c,a[2]=l):l=a[2],l}function MenuItemGroup(r){let a=e(8),{children:o,id:s,...c}=r,l;a[0]===s?l=a[1]:(l={id:s},a[0]=s,a[1]=l);let{bindings:u,itemGroupContextValue:d}=j(l),f=t(u,X().getItemGroupBindings(),c),p;a[2]!==o||a[3]!==f?(p=n(i,{as:`div`,...f,children:o}),a[2]=o,a[3]=f,a[4]=p):p=a[4];let m;return a[5]!==d||a[6]!==p?(m=n(x,{value:d,children:p}),a[5]=d,a[6]=p,a[7]=m):m=a[7],m}function MenuItemGroupLabel(r){let a=e(3),{children:o,...s}=r,c=t(M(),X().getItemGroupLabelBindings(),s),l;return a[0]!==o||a[1]!==c?(l=n(i,{as:`div`,...c,children:o}),a[0]=o,a[1]=c,a[2]=l):l=a[2],l}function MenuItemIndicator(a){let s=e(4),{children:c,...u}=a,d=t(N(),X().getItemIndicatorBindings(),u),f;s[0]===Symbol.for(`react.memo_cache_sentinel`)?(f=n(l,{icon:o}),s[0]=f):f=s[0];let p;return s[1]!==c||s[2]!==d?(p=r(i,{as:`div`,...d,children:[c,f]}),s[1]=c,s[2]=d,s[3]=p):p=s[3],p}function MenuItemLabel(r){let a=e(3),{children:o,...s}=r,c=t(P(),X().getItemLabelBindings(),s),l;return a[0]!==o||a[1]!==c?(l=n(i,{as:`div`,...c,children:o}),a[0]=o,a[1]=c,a[2]=l):l=a[2],l}function MenuItemStartIcon(r){let i=e(5),a=X(),o;i[0]!==a||i[1]!==r?(o=t(a.getItemStartIconBindings(),{},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 MenuPositioner(r){let a=e(5),{children:o,id:s,...c}=r,l;a[0]===s?l=a[1]:(l={id:s},a[0]=s,a[1]=l);let u=I(l);if(!u)return null;let d=t(u,c),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 MenuRadioItem(r){let a=e(9),{children:o,...s}=r,[c,l]=H(s),{bindings:u,optionItemContextValue:d}=L(c),f=t(u,X().getRadioItemBindings(),l),p;a[0]!==o||a[1]!==f?(p=n(i,{as:`button`,...f,children:o}),a[0]=o,a[1]=f,a[2]=p):p=a[2];let m;a[3]!==d||a[4]!==p?(m=n(b,{value:d,children:p}),a[3]=d,a[4]=p,a[5]=m):m=a[5];let h;return a[6]!==d||a[7]!==m?(h=n(C,{value:d,children:m}),a[6]=d,a[7]=m,a[8]=h):h=a[8],h}function MenuRadioItemControl(r){let a=e(3),{children:o,...s}=r,c=t(F(),X().getRadioItemControlBindings(),s),l;return a[0]!==o||a[1]!==c?(l=n(i,{as:`div`,...c,children:o}),a[0]=o,a[1]=c,a[2]=l):l=a[2],l}function MenuRadioItemGroup(r){let a=e(10),{children:o,id:s,onValueChange:c,value:l,...u}=r,d;a[0]!==s||a[1]!==c||a[2]!==l?(d={id:s,onValueChange:c,value:l},a[0]=s,a[1]=c,a[2]=l,a[3]=d):d=a[3];let{bindings:f,itemGroupContextValue:p}=R(d),m=t(f,X().getItemGroupBindings(),u),h;a[4]!==o||a[5]!==m?(h=n(i,{as:`div`,...m,children:o}),a[4]=o,a[5]=m,a[6]=h):h=a[6];let g;return a[7]!==p||a[8]!==h?(g=n(w,{value:p,children:h}),a[7]=p,a[8]=h,a[9]=g):g=a[9],g}function MenuRoot(r){let i=e(17),{children:a,size:o,...s}=r,[c,l]=W(s),{api:u,machine:f,triggerItemContext:p}=E(l),m=J(t({present:u.open},c)),h=X(!1),g=o??h?.size,_;i[0]===g?_=i[1]:(_=G({size:g},d),i[0]=g,i[1]=_);let v=_,b;i[2]!==a||i[3]!==v?(b=n(Y,{value:v,children:a}),i[2]=a,i[3]=v,i[4]=b):b=i[4];let x;i[5]!==m||i[6]!==b?(x=n(q,{value:m,children:b}),i[5]=m,i[6]=b,i[7]=x):x=i[7];let C;i[8]!==u||i[9]!==x?(C=n(y,{value:u,children:x}),i[8]=u,i[9]=x,i[10]=C):C=i[10];let w;i[11]!==f||i[12]!==C?(w=n(S,{value:f,children:C}),i[11]=f,i[12]=C,i[13]=w):w=i[13];let D;return i[14]!==w||i[15]!==p?(D=n(T,{value:p,children:w}),i[14]=w,i[15]=p,i[16]=D):D=i[16],D}function MenuSeparator(r){let a=e(3),{children:o,...s}=r,c=t(z(),X().getSeparatorBindings(),s),l;return a[0]!==o||a[1]!==c?(l=n(i,{as:`hr`,...c,children:o}),a[0]=o,a[1]=c,a[2]=l):l=a[2],l}function MenuTrigger(t){let n=e(5),{children:r,id:i}=t,o;n[0]===i?o=n[1]:(o={id:i},n[0]=i,n[1]=o);let s=B(o),c;return n[2]!==r||n[3]!==s?(c=a(r,s),n[2]=r,n[3]=s,n[4]=c):c=n[4],c}function MenuSplitButton(a){let o=e(23),s,c,l,u,f,m,h,g;if(o[0]!==a){let{actionProps:e,"aria-label":n,"aria-labelledby":r,children:i,density:p,disabled:_,emphasis:v,endIcon:y,onClick:b,size:x,startIcon:S,triggerProps:C,variant:w,...T}=a;s=e,l=i,u=y,f=b,m=S,g=C,c={density:p,disabled:_,emphasis:v,size:x,variant:w},h=t(K({"aria-label":n,"aria-labelledby":r,...c},d),T),o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=f,o[6]=m,o[7]=h,o[8]=g}else s=o[1],c=o[2],l=o[3],u=o[4],f=o[5],m=o[6],h=o[7],g=o[8];let _=h,v=u??s?.endIcon,y=f??s?.onClick,b=m??s?.startIcon,x;o[9]!==s||o[10]!==c||o[11]!==l||o[12]!==v||o[13]!==y||o[14]!==b?(x=n(p,{...c,...s,endIcon:v,onClick:y,startIcon:b,children:l}),o[9]=s,o[10]=c,o[11]=l,o[12]=v,o[13]=y,o[14]=b,o[15]=x):x=o[15];let S;o[16]!==c||o[17]!==g?(S=n(MenuTrigger,{children:n(MenuIconButton,{"aria-label":`More options`,...c,...g})}),o[16]=c,o[17]=g,o[18]=S):S=o[18];let C;return o[19]!==_||o[20]!==x||o[21]!==S?(C=r(i,{as:`div`,..._,children:[x,S]}),o[19]=_,o[20]=x,o[21]=S,o[22]=C):C=o[22],C}function MenuTriggerItem(a){let o=e(14),{children:s,icon:l,id:d,...f}=a,p=l===void 0?c:l,[m,h]=H(f),g=V({id:d,...m}),_=X(),v=t(g.bindings??{},_.getItemBindings(),h),y=g.itemContextValue,x;o[0]===_?x=o[1]:(x=_.getTriggerItemIndicatorBindings(),o[0]=_,o[1]=x);let S;o[2]===p?S=o[3]:(S=n(u,{icon:p}),o[2]=p,o[3]=S);let C;o[4]!==x||o[5]!==S?(C=n(`div`,{...x,children:S}),o[4]=x,o[5]=S,o[6]=C):C=o[6];let w;o[7]!==s||o[8]!==v||o[9]!==C?(w=r(i,{as:`button`,...v,children:[s,C]}),o[7]=s,o[8]=v,o[9]=C,o[10]=w):w=o[10];let T;return o[11]!==g.itemContextValue||o[12]!==w?(T=n(b,{value:y,children:w}),o[11]=g.itemContextValue,o[12]=w,o[13]=T):T=o[13],T}var Z={Button:MenuButton,CheckboxItem:MenuCheckboxItem,CheckboxItemControl:MenuCheckboxItemControl,Content:MenuContent,ContextTrigger:MenuContextTrigger,IconButton:MenuIconButton,InlineIconButton:MenuInlineIconButton,Item:MenuItem,ItemAccessory:MenuItemAccessory,ItemCommand:MenuItemCommand,ItemDescription:MenuItemDescription,ItemGroup:MenuItemGroup,ItemGroupLabel:MenuItemGroupLabel,ItemIndicator:MenuItemIndicator,ItemLabel:MenuItemLabel,ItemStartIcon:MenuItemStartIcon,Positioner:MenuPositioner,RadioItem:MenuRadioItem,RadioItemControl:MenuRadioItemControl,RadioItemGroup:MenuRadioItemGroup,Root:MenuRoot,Separator:MenuSeparator,SplitButton:MenuSplitButton,Trigger:MenuTrigger,TriggerItem:MenuTriggerItem};export{Z as Menu,Y as QdsMenuContextProvider,X as useQdsMenuContext};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|