@descope/flow-components 2.0.147 → 2.0.148

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 CHANGED
@@ -269,12 +269,12 @@ ComboBox.defaultProps = {
269
269
  bordered: true
270
270
  };
271
271
 
272
- const SingleSelect = React__default.default.forwardRef(({ type, data, ...props }, ref) => {
273
- switch (type) {
274
- case 'button-selection-group':
275
- return (React__default.default.createElement(ButtonSelectionGroup, { ...props, ref: ref }, data.map(({ label, value }) => (React__default.default.createElement("descope-button-selection-group-item", { value: value }, label)))));
272
+ const SingleSelect = React__default.default.forwardRef(({ variant, data, ...props }, ref) => {
273
+ switch (variant) {
274
+ case 'buttonSelectionGroup':
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
276
  case 'combobox':
277
- return (React__default.default.createElement(ComboBox, { "item-label-path": "data-name", "item-value-path": "id", ...props, ref: ref }, data.map(({ label, value }) => (React__default.default.createElement("span", { "data-name": label, "data-id": value }, label)))));
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
278
  default:
279
279
  return null;
280
280
  }
package/dist/index.d.ts CHANGED
@@ -396,7 +396,7 @@ declare global {
396
396
  namespace JSX {
397
397
  interface IntrinsicElements {
398
398
  'descope-button-selection-group': Props$1;
399
- 'descope-button-selection-group-item': {
399
+ 'descope-button-selection-group-item': JSX.IntrinsicElements['span'] & {
400
400
  value: string;
401
401
  children: string;
402
402
  };
@@ -414,7 +414,7 @@ type Item = {
414
414
  value: string;
415
415
  };
416
416
  type SingleSelectType = {
417
- type: 'button-selection-group' | 'combobox';
417
+ variant: 'buttonSelectionGroup' | 'combobox';
418
418
  data: Item[];
419
419
  };
420
420
  type Props = React.ComponentProps<typeof ButtonSelectionGroup> & SingleSelectType;
package/dist/index.esm.js CHANGED
@@ -263,12 +263,12 @@ ComboBox.defaultProps = {
263
263
  bordered: true
264
264
  };
265
265
 
266
- const SingleSelect = React.forwardRef(({ type, data, ...props }, ref) => {
267
- switch (type) {
268
- case 'button-selection-group':
269
- return (React.createElement(ButtonSelectionGroup, { ...props, ref: ref }, data.map(({ label, value }) => (React.createElement("descope-button-selection-group-item", { value: value }, label)))));
266
+ const SingleSelect = React.forwardRef(({ variant, data, ...props }, ref) => {
267
+ switch (variant) {
268
+ case 'buttonSelectionGroup':
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
270
  case 'combobox':
271
- return (React.createElement(ComboBox, { "item-label-path": "data-name", "item-value-path": "id", ...props, ref: ref }, data.map(({ label, value }) => (React.createElement("span", { "data-name": label, "data-id": value }, label)))));
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
272
  default:
273
273
  return null;
274
274
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@descope/flow-components",
3
- "version": "2.0.147",
3
+ "version": "2.0.148",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
9
- "storybook": "start-storybook -p 6006",
10
- "build-storybook": "build-storybook",
9
+ "storybook": "storybook dev -p 6006",
10
+ "build-storybook": "storybook build",
11
11
  "build": "rollup -c",
12
12
  "test": "exit 0",
13
13
  "_test": "jest -- need to fix the tests",
@@ -43,15 +43,14 @@
43
43
  "@rollup/plugin-commonjs": "^25.0.0",
44
44
  "@rollup/plugin-node-resolve": "^13.1.1",
45
45
  "@rollup/plugin-typescript": "^11.0.0",
46
- "@storybook/addon-actions": "^7.0.0",
47
- "@storybook/addon-essentials": "^7.0.0",
48
- "@storybook/addon-interactions": "^7.0.0",
49
- "@storybook/addon-links": "^7.0.0",
46
+ "@storybook/addon-actions": "^7.6.3",
47
+ "@storybook/addon-essentials": "^7.6.3",
48
+ "@storybook/addon-interactions": "^7.6.3",
49
+ "@storybook/addon-links": "^7.6.3",
50
50
  "@storybook/addon-postcss": "^2.0.0",
51
- "@storybook/builder-webpack5": "^7.0.0",
52
- "@storybook/manager-webpack5": "^6.5.9",
53
- "@storybook/react": "^7.0.0",
54
- "@storybook/testing-library": "^0.2.0",
51
+ "@storybook/react": "^7.6.3",
52
+ "@storybook/react-webpack5": "^7.6.3",
53
+ "@storybook/testing-library": "^0.2.2",
55
54
  "@testing-library/jest-dom": "^6.0.0",
56
55
  "@testing-library/react": "14.1.0",
57
56
  "@testing-library/user-event": "14.5.1",
@@ -93,13 +92,14 @@
93
92
  "rollup-plugin-auto-external": "^2.0.0",
94
93
  "rollup-plugin-copy": "^3.4.0",
95
94
  "rollup-plugin-delete": "^2.0.0",
95
+ "storybook": "^7.6.3",
96
96
  "storybook-addon-themes": "^6.1.0",
97
97
  "ts-jest": "^29.0.0",
98
98
  "ts-node": "10.9.1",
99
99
  "typescript": "^5.0.0"
100
100
  },
101
101
  "dependencies": {
102
- "@descope/web-components-ui": "1.0.196",
102
+ "@descope/web-components-ui": "1.0.200",
103
103
  "rollup-plugin-dts": "^5.3.0"
104
104
  },
105
105
  "peerDependencies": {