@oliasoft-open-source/react-ui-library 10.0.0-beta-19 → 10.0.0-beta-20

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/README.md CHANGED
@@ -1679,25 +1679,24 @@ The `Select` component is used to render a dropdown menu for selecting options f
1679
1679
 
1680
1680
  ### Props
1681
1681
 
1682
- | Prop | Description | Default Value |
1683
- | -------------------------- | -------------------------------------------------------------------- | ------------- |
1684
- | `name` | The name attribute of the select element. | `''` |
1685
- | `multi` | Determines whether multiple options can be selected. | `false` |
1686
- | `options` | An array of options to be rendered in the dropdown menu. | `[]` |
1687
- | `value` | The currently selected option(s). | - |
1688
- | `native` | Determines whether to use the native HTML `<select>` element. | `false` |
1689
- | `onChange` | A callback function invoked when the selection changes. | `() => {}` |
1690
- | `onCreate` | A callback function invoked when a new option is created. | `() => {}` |
1691
- | `deprecatedEventHandler` | **Deprecated.** Use the standard onChange event shape instead. | `false` |
1692
- | `warning` | Warning message to be displayed. | - |
1693
- | `error` | Error message to be displayed. | - |
1694
- | `checkNonExistentValues` | **Deprecated.** Prefer leaving unset (defaults to true). | `true` |
1695
- | `closeOnOptionActionClick` | **Deprecated.** Always closes on option action click. | `true` |
1696
- | `isInTable` | **Internal.** For Table cell composition only. | `false` |
1697
- | `right` | **Internal.** Right-aligns select text. | `false` |
1698
- | `groupOrder` | **Internal.** For InputGroup composition only. | - |
1699
- | `testId` | A string used to identify the select component for testing purposes. | - |
1700
- | `disabled` | Determines whether the select component is disabled. | `false` |
1682
+ | Prop | Description | Default Value |
1683
+ | -------------------------- | ----------------------------------------------------------------------- | ------------- |
1684
+ | `name` | The name attribute of the select element. | `''` |
1685
+ | `multi` | Determines whether multiple options can be selected. | `false` |
1686
+ | `options` | An array of options to be rendered in the dropdown menu. | `[]` |
1687
+ | `value` | The currently selected option(s). | - |
1688
+ | `native` | Determines whether to use the native HTML `<select>` element. | `false` |
1689
+ | `onChange` | A callback function invoked when the selection changes. | `() => {}` |
1690
+ | `onCreate` | A callback function invoked when a new option is created. | `() => {}` |
1691
+ | `warning` | Warning message to be displayed. | - |
1692
+ | `error` | Error message to be displayed. | - |
1693
+ | `checkNonExistentValues` | Determines whether to check for non-existent values. | `true` |
1694
+ | `closeOnOptionActionClick` | Determines whether to close the select dropdown on option action click. | `true` |
1695
+ | `isInTable` | **Internal.** For Table cell composition only. | `false` |
1696
+ | `right` | Right-aligns select text. | `false` |
1697
+ | `groupOrder` | **Internal.** For InputGroup composition only. | - |
1698
+ | `testId` | A string used to identify the select component for testing purposes. | - |
1699
+ | `disabled` | Determines whether the select component is disabled. | `false` |
1701
1700
 
1702
1701
  The `ISelectSelectedOption` interface represents the structure of an option in the dropdown menu.
1703
1702
 
package/dist/index.d.ts CHANGED
@@ -1400,7 +1400,6 @@ declare interface ISelectCell extends TCommonCell {
1400
1400
  native?: boolean;
1401
1401
  clearable?: boolean;
1402
1402
  searchable?: boolean;
1403
- deprecatedEventHandler?: boolean;
1404
1403
  maxTooltipWidth?: TStringOrNumber;
1405
1404
  autoLayerWidth?: boolean;
1406
1405
  multi?: boolean;
@@ -1413,13 +1412,9 @@ export declare interface ISelectProps {
1413
1412
  value?: any;
1414
1413
  native?: boolean;
1415
1414
  onChange?: TChangeEventHandler;
1416
- /** @deprecated Use the standard onChange event shape instead. */
1417
- deprecatedEventHandler?: boolean;
1418
1415
  warning?: TStringOrNumber | ReactNode;
1419
1416
  error?: TStringOrNumber | ReactNode;
1420
- /** @deprecated Prefer leaving unset (defaults to true). */
1421
1417
  checkNonExistentValues?: boolean;
1422
- /** @deprecated Always closes on option action click. */
1423
1418
  closeOnOptionActionClick?: boolean;
1424
1419
  small?: boolean;
1425
1420
  width?: TStringOrNumber | null;
@@ -1431,7 +1426,7 @@ export declare interface ISelectProps {
1431
1426
  searchable?: boolean;
1432
1427
  maxTooltipWidth?: TStringOrNumber;
1433
1428
  autoLayerWidth?: boolean;
1434
- /* Excluded from this release type: right */
1429
+ right?: boolean;
1435
1430
  /* Excluded from this release type: groupOrder */
1436
1431
  tabIndex?: number;
1437
1432
  testId?: string;
package/dist/index.js CHANGED
@@ -3250,45 +3250,40 @@ var Ro = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), zo =
3250
3250
  hasNonExistentValue: n && s !== void 0 ? Xc(o, s) : !1
3251
3251
  };
3252
3252
  }, Qc = (e) => {
3253
- let { name: t = "", options: n = [], value: r, native: i = !1, onChange: a = yn, deprecatedEventHandler: o = !1, warning: s, error: c, checkNonExistentValues: l = !0, closeOnOptionActionClick: u = !0, testId: d, disabled: f, multi: p, ...m } = e, { multi: h, simpleInputs: g, options: _, selectedOptions: v, hasNonExistentValue: y } = Zc(n, r, l), b = !h, x = i && b;
3254
- i && !b && console.warn("Native select does not support provided props (see stories)");
3255
- let w = "Value no longer available for re-selection", T = y && !f ? s ? /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("div", { children: w }), /* @__PURE__ */ S("div", { children: s })] }) : w : s, E = y && c && !f ? /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("div", { children: w }), /* @__PURE__ */ S("div", { children: c })] }) : c, D = (e, n) => {
3256
- if (o) {
3257
- let e = h ? n.map((e) => g ? e.value : e) : g ? n.value : n;
3258
- e && a(e);
3259
- } else {
3260
- let r = h ? n : n.value;
3261
- a({
3262
- ...e,
3263
- target: {
3264
- name: t,
3265
- value: r,
3266
- label: h ? void 0 : n.label
3267
- }
3268
- });
3269
- }
3253
+ let { name: t = "", options: n = [], value: r, native: i = !1, onChange: a = yn, warning: o, error: s, checkNonExistentValues: c = !0, closeOnOptionActionClick: l = !0, testId: u, disabled: d, multi: f, ...p } = e, { multi: m, options: h, selectedOptions: g, hasNonExistentValue: _ } = Zc(n, r, c), v = !m, y = i && v;
3254
+ i && !v && console.warn("Native select does not support provided props (see stories)");
3255
+ let b = "Value no longer available for re-selection", x = _ && !d ? o ? /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("div", { children: b }), /* @__PURE__ */ S("div", { children: o })] }) : b : o, w = _ && s && !d ? /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("div", { children: b }), /* @__PURE__ */ S("div", { children: s })] }) : s, T = (e, n) => {
3256
+ let r = m ? n : n.value;
3257
+ a({
3258
+ ...e,
3259
+ target: {
3260
+ name: t,
3261
+ value: r,
3262
+ label: m ? void 0 : n.label
3263
+ }
3264
+ });
3270
3265
  };
3271
- return x ? /* @__PURE__ */ S(oc, {
3272
- ...m,
3273
- options: _,
3274
- selectedOption: v,
3275
- onChange: D,
3276
- hasNonExistentValue: y,
3277
- warning: T,
3278
- error: E,
3279
- testId: d,
3280
- disabled: f
3266
+ return y ? /* @__PURE__ */ S(oc, {
3267
+ ...p,
3268
+ options: h,
3269
+ selectedOption: g,
3270
+ onChange: T,
3271
+ hasNonExistentValue: _,
3272
+ warning: x,
3273
+ error: w,
3274
+ testId: u,
3275
+ disabled: d
3281
3276
  }) : /* @__PURE__ */ S(Hc, {
3282
- ...m,
3283
- options: _,
3284
- selectedOptions: v,
3285
- onChange: D,
3286
- multi: h,
3287
- warning: T,
3288
- error: E,
3289
- testId: d,
3290
- disabled: f,
3291
- closeOnOptionActionClick: u
3277
+ ...p,
3278
+ options: h,
3279
+ selectedOptions: g,
3280
+ onChange: T,
3281
+ multi: m,
3282
+ warning: x,
3283
+ error: w,
3284
+ testId: u,
3285
+ disabled: d,
3286
+ closeOnOptionActionClick: l
3292
3287
  });
3293
3288
  }, $c = (e, t) => t || e && e.reduce((e, t) => t != null && t.selected ? Number(t == null ? void 0 : t.value) : e, 10) || 10, el = (e, t) => {
3294
3289
  if (!t || !e) return 10;
@@ -3636,7 +3631,6 @@ var Ro = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), zo =
3636
3631
  native: e.native,
3637
3632
  clearable: e.clearable,
3638
3633
  searchable: e.searchable,
3639
- deprecatedEventHandler: e.deprecatedEventHandler,
3640
3634
  maxTooltipWidth: e.maxTooltipWidth,
3641
3635
  width: "100%",
3642
3636
  autoLayerWidth: e.autoLayerWidth,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "10.0.0-beta-19",
3
+ "version": "10.0.0-beta-20",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
6
6
  "bugs": {