@descope/flow-components 2.0.281 → 2.0.283
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 +11 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.esm.js +11 -0
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -339,10 +339,21 @@ ComboBox.defaultProps = {
|
|
|
339
339
|
bordered: true
|
|
340
340
|
};
|
|
341
341
|
|
|
342
|
+
const RadioGroup = React__default.default.forwardRef((props, ref) => React__default.default.createElement("descope-radio-group", { ...props, ref: ref }));
|
|
343
|
+
RadioGroup.defaultProps = {
|
|
344
|
+
// eslint-disable-next-line react/default-props-match-prop-types
|
|
345
|
+
size: 'md',
|
|
346
|
+
// eslint-disable-next-line react/default-props-match-prop-types
|
|
347
|
+
layout: 'horizontal'
|
|
348
|
+
};
|
|
349
|
+
|
|
342
350
|
const SingleSelect = React__default.default.forwardRef(({ variant, data, allowClearValue, ...props }, ref) => {
|
|
343
351
|
if (variant === 'buttonSelectionGroup') {
|
|
344
352
|
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)))));
|
|
345
353
|
}
|
|
354
|
+
if (variant === 'radioGroup') {
|
|
355
|
+
return (React__default.default.createElement(RadioGroup, { ...props, ref: ref }, data?.map(({ label, value }) => (React__default.default.createElement("descope-radio-button", { key: value, value: value }, label)))));
|
|
356
|
+
}
|
|
346
357
|
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)))));
|
|
347
358
|
});
|
|
348
359
|
|
package/dist/index.d.ts
CHANGED
|
@@ -496,9 +496,10 @@ type Item$3 = {
|
|
|
496
496
|
value: string;
|
|
497
497
|
};
|
|
498
498
|
type SingleSelectType = {
|
|
499
|
-
variant?: 'buttonSelectionGroup' | 'combobox';
|
|
499
|
+
variant?: 'buttonSelectionGroup' | 'combobox' | 'radioGroup';
|
|
500
500
|
data?: Item$3[];
|
|
501
501
|
allowClearValue?: boolean;
|
|
502
|
+
layout?: 'horizontal' | 'vertical';
|
|
502
503
|
};
|
|
503
504
|
type Props$b = Omit<React.ComponentProps<typeof ButtonSelectionGroup>, 'allow-deselect'> & SingleSelectType;
|
|
504
505
|
declare const SingleSelect: React.ForwardRefExoticComponent<Omit<Props$b, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
package/dist/index.esm.js
CHANGED
|
@@ -333,10 +333,21 @@ ComboBox.defaultProps = {
|
|
|
333
333
|
bordered: true
|
|
334
334
|
};
|
|
335
335
|
|
|
336
|
+
const RadioGroup = React.forwardRef((props, ref) => React.createElement("descope-radio-group", { ...props, ref: ref }));
|
|
337
|
+
RadioGroup.defaultProps = {
|
|
338
|
+
// eslint-disable-next-line react/default-props-match-prop-types
|
|
339
|
+
size: 'md',
|
|
340
|
+
// eslint-disable-next-line react/default-props-match-prop-types
|
|
341
|
+
layout: 'horizontal'
|
|
342
|
+
};
|
|
343
|
+
|
|
336
344
|
const SingleSelect = React.forwardRef(({ variant, data, allowClearValue, ...props }, ref) => {
|
|
337
345
|
if (variant === 'buttonSelectionGroup') {
|
|
338
346
|
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)))));
|
|
339
347
|
}
|
|
348
|
+
if (variant === 'radioGroup') {
|
|
349
|
+
return (React.createElement(RadioGroup, { ...props, ref: ref }, data?.map(({ label, value }) => (React.createElement("descope-radio-button", { key: value, value: value }, label)))));
|
|
350
|
+
}
|
|
340
351
|
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)))));
|
|
341
352
|
});
|
|
342
353
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@descope/flow-components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.283",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"typescript": "^5.0.0"
|
|
101
101
|
},
|
|
102
102
|
"dependencies": {
|
|
103
|
-
"@descope/web-components-ui": "1.0.
|
|
103
|
+
"@descope/web-components-ui": "1.0.320"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
106
|
"react": ">=17"
|