@qualcomm-ui/react 1.12.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alert-banner/alert-banner.d.ts +5 -25
- package/dist/alert-banner/alert-banner.d.ts.map +1 -1
- package/dist/avatar/avatar-root.d.ts +2 -6
- package/dist/avatar/avatar-root.d.ts.map +1 -1
- package/dist/checkbox/checkbox-root.d.ts.map +1 -1
- package/dist/checkbox/index.js +1 -1
- package/dist/checkbox/index.js.map +2 -2
- package/dist/checkbox-group/checkbox-group.d.ts +32 -0
- package/dist/checkbox-group/checkbox-group.d.ts.map +1 -0
- package/dist/checkbox-group/index.d.ts +2 -0
- package/dist/checkbox-group/index.d.ts.map +1 -0
- package/dist/checkbox-group/index.js +3 -0
- package/dist/checkbox-group/index.js.map +7 -0
- package/dist/field-group/field-group-error-text.d.ts +19 -0
- package/dist/field-group/field-group-error-text.d.ts.map +1 -0
- package/dist/field-group/field-group-hint.d.ts +13 -0
- package/dist/field-group/field-group-hint.d.ts.map +1 -0
- package/dist/field-group/field-group-items.d.ts +13 -0
- package/dist/field-group/field-group-items.d.ts.map +1 -0
- package/dist/field-group/field-group-label.d.ts +13 -0
- package/dist/field-group/field-group-label.d.ts.map +1 -0
- package/dist/field-group/field-group-root.d.ts +32 -0
- package/dist/field-group/field-group-root.d.ts.map +1 -0
- package/dist/field-group/index.d.ts +7 -0
- package/dist/field-group/index.d.ts.map +1 -0
- package/dist/field-group/index.js +3 -0
- package/dist/field-group/index.js.map +7 -0
- package/dist/field-group/qds-field-group-context.d.ts +3 -0
- package/dist/field-group/qds-field-group-context.d.ts.map +1 -0
- package/dist/switch/index.js +1 -1
- package/dist/switch/index.js.map +2 -2
- package/dist/switch/switch-root.d.ts.map +1 -1
- package/dist/switch-group/index.d.ts +2 -0
- package/dist/switch-group/index.d.ts.map +1 -0
- package/dist/switch-group/index.js +3 -0
- package/dist/switch-group/index.js.map +7 -0
- package/dist/switch-group/switch-group.d.ts +32 -0
- package/dist/switch-group/switch-group.d.ts.map +1 -0
- package/dist/tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch-root.d.ts","sourceRoot":"","sources":["../../src/switch/switch-root.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,YAAY,EAAE,KAAK,SAAS,EAAU,MAAM,OAAO,CAAA;AAEhE,OAAO,EAAmB,KAAK,cAAc,EAAC,MAAM,0BAA0B,CAAA;AAC9E,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"switch-root.d.ts","sourceRoot":"","sources":["../../src/switch/switch-root.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,YAAY,EAAE,KAAK,SAAS,EAAU,MAAM,OAAO,CAAA;AAEhE,OAAO,EAAmB,KAAK,cAAc,EAAC,MAAM,0BAA0B,CAAA;AAC9E,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,8BAA8B,CAAA;AAKrC,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,gCAAgC,CAAA;AAKvC,MAAM,WAAW,eACf,SAAQ,cAAc,EACpB,iBAAiB,EACjB,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC;IACzC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,EAAE,EACF,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,eAAe,GAAG,YAAY,CA0BhC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/switch-group/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,KAAK,gBAAgB,EAAC,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx,jsxs}from"react/jsx-runtime";import{FieldGroupErrorText,FieldGroupHint,FieldGroupItems,FieldGroupLabel,FieldGroupRoot}from"@qualcomm-ui/react/field-group";function SwitchGroup({children,errorText,hint,label,...props}){let showHint=!!hint&&!props.invalid,showError=!!errorText&&props.invalid;return jsxs(FieldGroupRoot,{...props,children:[label&&jsx(FieldGroupLabel,{children:label}),jsx(FieldGroupItems,{children}),showHint&&jsx(FieldGroupHint,{children:hint}),showError&&jsx(FieldGroupErrorText,{children:errorText})]})}SwitchGroup.Root=FieldGroupRoot;SwitchGroup.Label=FieldGroupLabel;SwitchGroup.Items=FieldGroupItems;SwitchGroup.Hint=FieldGroupHint;SwitchGroup.ErrorText=FieldGroupErrorText;export{SwitchGroup};
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/switch-group/switch-group.tsx"],
|
|
4
|
+
"sourcesContent": ["import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { FieldGroupErrorText, FieldGroupHint, FieldGroupItems, FieldGroupLabel, FieldGroupRoot } from \"@qualcomm-ui/react/field-group\";\nexport function SwitchGroup({\n children,\n errorText,\n hint,\n label,\n ...props\n}) {\n const showHint = Boolean(hint) && !props.invalid;\n const showError = Boolean(errorText) && props.invalid;\n return /* @__PURE__ */jsxs(FieldGroupRoot, {\n ...props,\n children: [label && /* @__PURE__ */jsx(FieldGroupLabel, {\n children: label\n }), /* @__PURE__ */jsx(FieldGroupItems, {\n children\n }), showHint && /* @__PURE__ */jsx(FieldGroupHint, {\n children: hint\n }), showError && /* @__PURE__ */jsx(FieldGroupErrorText, {\n children: errorText\n })]\n });\n}\nSwitchGroup.Root = FieldGroupRoot;\nSwitchGroup.Label = FieldGroupLabel;\nSwitchGroup.Items = FieldGroupItems;\nSwitchGroup.Hint = FieldGroupHint;\nSwitchGroup.ErrorText = FieldGroupErrorText;"],
|
|
5
|
+
"mappings": ";AAAA,OAAS,IAAK,SAAY,oBAC1B,OAAS,oBAAqB,eAAgB,gBAAiB,gBAAiB,mBAAsB,iCAC/F,SAAS,YAAY,CAC1B,SACA,UACA,KACA,MACA,GAAG,KACL,EAAG,CACD,IAAM,SAAW,EAAQ,MAAS,CAAC,MAAM,QACnC,UAAY,EAAQ,WAAc,MAAM,QAC9C,OAAsB,KAAK,eAAgB,CACzC,GAAG,MACH,SAAU,CAAC,OAAwB,IAAI,gBAAiB,CACtD,SAAU,KACZ,CAAC,EAAkB,IAAI,gBAAiB,CACtC,QACF,CAAC,EAAG,UAA2B,IAAI,eAAgB,CACjD,SAAU,IACZ,CAAC,EAAG,WAA4B,IAAI,oBAAqB,CACvD,SAAU,SACZ,CAAC,CAAC,CACJ,CAAC,CACH,CACA,YAAY,KAAO,eACnB,YAAY,MAAQ,gBACpB,YAAY,MAAQ,gBACpB,YAAY,KAAO,eACnB,YAAY,UAAY",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from "react";
|
|
2
|
+
import { FieldGroupErrorText, FieldGroupHint, FieldGroupItems, FieldGroupLabel, FieldGroupRoot, type FieldGroupRootProps } from "@qualcomm-ui/react/field-group";
|
|
3
|
+
export interface SwitchGroupProps extends FieldGroupRootProps {
|
|
4
|
+
/**
|
|
5
|
+
* React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.
|
|
6
|
+
*/
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Error message displayed when invalid.
|
|
10
|
+
*/
|
|
11
|
+
errorText?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Helper text displayed below items.
|
|
14
|
+
*/
|
|
15
|
+
hint?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Group label text.
|
|
18
|
+
*/
|
|
19
|
+
label?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Groups multiple switches with a label, hint, and error text.
|
|
23
|
+
*/
|
|
24
|
+
export declare function SwitchGroup({ children, errorText, hint, label, ...props }: SwitchGroupProps): ReactElement;
|
|
25
|
+
export declare namespace SwitchGroup {
|
|
26
|
+
var Root: typeof FieldGroupRoot;
|
|
27
|
+
var Label: typeof FieldGroupLabel;
|
|
28
|
+
var Items: typeof FieldGroupItems;
|
|
29
|
+
var Hint: typeof FieldGroupHint;
|
|
30
|
+
var ErrorText: typeof FieldGroupErrorText;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=switch-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch-group.d.ts","sourceRoot":"","sources":["../../src/switch-group/switch-group.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAA;AAElD,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,eAAe,EACf,cAAc,EACd,KAAK,mBAAmB,EACzB,MAAM,gCAAgC,CAAA;AAEvC,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAA;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,KAAK,EACL,GAAG,KAAK,EACT,EAAE,gBAAgB,GAAG,YAAY,CAYjC;yBAlBe,WAAW"}
|