@descope/flow-components 2.0.148 → 2.0.150
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/index.cjs.js +4 -8
- package/dist/index.d.ts +9 -6
- package/dist/index.esm.js +4 -8
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -269,15 +269,11 @@ ComboBox.defaultProps = {
|
|
|
269
269
|
bordered: true
|
|
270
270
|
};
|
|
271
271
|
|
|
272
|
-
const SingleSelect = React__default.default.forwardRef(({ variant, data, ...props }, ref) => {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
return (React__default.default.createElement(ButtonSelectionGroup, { ...props, ref: ref }, data?.map(({ label, value }) => (React__default.default.createElement("descope-button-selection-group-item", { key: value, value: value }, label)))));
|
|
276
|
-
case 'combobox':
|
|
277
|
-
return (React__default.default.createElement(ComboBox, { "item-label-path": "data-name", "item-value-path": "data-id", ...props, ref: ref }, data?.map(({ label, value }) => (React__default.default.createElement("span", { "data-name": label, "data-id": value, key: value }, label)))));
|
|
278
|
-
default:
|
|
279
|
-
return null;
|
|
272
|
+
const SingleSelect = React__default.default.forwardRef(({ variant, data, allowClearValue, ...props }, ref) => {
|
|
273
|
+
if (variant === 'buttonSelectionGroup') {
|
|
274
|
+
return (React__default.default.createElement(ButtonSelectionGroup, { ...props, "allow-deselect": allowClearValue, ref: ref }, data?.map(({ label, value }) => (React__default.default.createElement("descope-button-selection-group-item", { key: value, value: value }, label)))));
|
|
280
275
|
}
|
|
276
|
+
return (React__default.default.createElement(ComboBox, { "clear-button-visible": allowClearValue, "item-label-path": "data-name", "item-value-path": "data-id", ...props, ref: ref }, data?.map(({ label, value }) => (React__default.default.createElement("span", { "data-name": label, "data-id": value, key: value }, label)))));
|
|
281
277
|
});
|
|
282
278
|
|
|
283
279
|
exports.Boolean = Boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -390,7 +390,8 @@ declare global {
|
|
|
390
390
|
declare const Recaptcha: React.ForwardRefExoticComponent<Props$2 & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
391
391
|
|
|
392
392
|
type Props$1 = DescopeInputProps & {
|
|
393
|
-
'default-value'
|
|
393
|
+
'default-value'?: string;
|
|
394
|
+
'allow-deselect'?: boolean;
|
|
394
395
|
};
|
|
395
396
|
declare global {
|
|
396
397
|
namespace JSX {
|
|
@@ -404,9 +405,10 @@ declare global {
|
|
|
404
405
|
}
|
|
405
406
|
}
|
|
406
407
|
declare const ButtonSelectionGroup: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & {
|
|
407
|
-
'default-value'
|
|
408
|
+
'default-value'?: string;
|
|
409
|
+
'allow-deselect'?: boolean;
|
|
408
410
|
} & {
|
|
409
|
-
children
|
|
411
|
+
children?: JSX.Element[];
|
|
410
412
|
}, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
411
413
|
|
|
412
414
|
type Item = {
|
|
@@ -414,10 +416,11 @@ type Item = {
|
|
|
414
416
|
value: string;
|
|
415
417
|
};
|
|
416
418
|
type SingleSelectType = {
|
|
417
|
-
variant
|
|
418
|
-
data
|
|
419
|
+
variant?: 'buttonSelectionGroup' | 'combobox';
|
|
420
|
+
data?: Item[];
|
|
421
|
+
allowClearValue?: boolean;
|
|
419
422
|
};
|
|
420
|
-
type Props = React.ComponentProps<typeof ButtonSelectionGroup> & SingleSelectType;
|
|
423
|
+
type Props = Omit<React.ComponentProps<typeof ButtonSelectionGroup>, 'allow-deselect'> & SingleSelectType;
|
|
421
424
|
declare const SingleSelect: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
422
425
|
|
|
423
426
|
export { Boolean, Button, Checkbox, Code, Container, Divider, Image, Input, Link, Loader, Logo, NewPassword, NumberField, Password, Phone, Recaptcha, Select, SingleSelect, Switch, TOTPImage, TOTPLink, Text, TextField, Textarea, UploadFile, _default$b as apple, _default$2 as discord, _default$a as facebook, _default$8 as fingerprint, _default$6 as github, _default$5 as gitlab, _default$4 as google, _default$1 as linkedin, _default$3 as microsoft, _default$7 as passkey, _default$9 as slack, _default as sso };
|
package/dist/index.esm.js
CHANGED
|
@@ -263,15 +263,11 @@ ComboBox.defaultProps = {
|
|
|
263
263
|
bordered: true
|
|
264
264
|
};
|
|
265
265
|
|
|
266
|
-
const SingleSelect = React.forwardRef(({ variant, data, ...props }, ref) => {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
return (React.createElement(ButtonSelectionGroup, { ...props, ref: ref }, data?.map(({ label, value }) => (React.createElement("descope-button-selection-group-item", { key: value, value: value }, label)))));
|
|
270
|
-
case 'combobox':
|
|
271
|
-
return (React.createElement(ComboBox, { "item-label-path": "data-name", "item-value-path": "data-id", ...props, ref: ref }, data?.map(({ label, value }) => (React.createElement("span", { "data-name": label, "data-id": value, key: value }, label)))));
|
|
272
|
-
default:
|
|
273
|
-
return null;
|
|
266
|
+
const SingleSelect = React.forwardRef(({ variant, data, allowClearValue, ...props }, ref) => {
|
|
267
|
+
if (variant === 'buttonSelectionGroup') {
|
|
268
|
+
return (React.createElement(ButtonSelectionGroup, { ...props, "allow-deselect": allowClearValue, ref: ref }, data?.map(({ label, value }) => (React.createElement("descope-button-selection-group-item", { key: value, value: value }, label)))));
|
|
274
269
|
}
|
|
270
|
+
return (React.createElement(ComboBox, { "clear-button-visible": allowClearValue, "item-label-path": "data-name", "item-value-path": "data-id", ...props, ref: ref }, data?.map(({ label, value }) => (React.createElement("span", { "data-name": label, "data-id": value, key: value }, label)))));
|
|
275
271
|
});
|
|
276
272
|
|
|
277
273
|
export { Boolean, Button, Checkbox, Code, Container, Divider, Image, Input, Link, Loader, Logo, NewPassword, NumberField, Password, Phone, Recaptcha, Select, SingleSelect, Switch, TOTPImage, TOTPLink, Text, TextField, Textarea, UploadFile, apple, discord, facebook, fingerprint, github, gitlab, google, linkedin, microsoft, passkey, slack, sso };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@descope/flow-components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.150",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@babel/preset-react": "7.23.3",
|
|
42
42
|
"@babel/preset-typescript": "7.23.3",
|
|
43
43
|
"@rollup/plugin-commonjs": "^25.0.0",
|
|
44
|
-
"@rollup/plugin-node-resolve": "^
|
|
44
|
+
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
45
45
|
"@rollup/plugin-typescript": "^11.0.0",
|
|
46
46
|
"@storybook/addon-actions": "^7.6.3",
|
|
47
47
|
"@storybook/addon-essentials": "^7.6.3",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"typescript": "^5.0.0"
|
|
100
100
|
},
|
|
101
101
|
"dependencies": {
|
|
102
|
-
"@descope/web-components-ui": "1.0.
|
|
102
|
+
"@descope/web-components-ui": "1.0.201",
|
|
103
103
|
"rollup-plugin-dts": "^5.3.0"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|