@oliasoft-open-source/react-ui-library 10.3.1-beta-2 → 10.4.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/index.d.ts CHANGED
@@ -1758,6 +1758,7 @@ export declare interface ITabsProps {
1758
1758
  onChange?: TTabsChangeEventHandler;
1759
1759
  padding?: boolean;
1760
1760
  margin?: boolean;
1761
+ small?: boolean;
1761
1762
  testId?: string;
1762
1763
  /** Default router link component for tab options with `to`. */
1763
1764
  linkComponent?: ElementType_2;
@@ -2194,7 +2195,7 @@ export declare const Table: (props: ITableProps) => JSX.Element;
2194
2195
 
2195
2196
  export declare const TableImportExport: ({ config, smartUploadConfig, testId }: ITableImportExportProps) => JSX.Element;
2196
2197
 
2197
- export declare const Tabs: ({ name, options: rawOptions, value: rawValue, onChange, padding, margin, testId, linkComponent, }: ITabsProps) => JSX.Element | null;
2198
+ export declare const Tabs: ({ name, options: rawOptions, value: rawValue, onChange, padding, margin, small, testId, linkComponent, }: ITabsProps) => JSX.Element | null;
2198
2199
 
2199
2200
  export declare type TAlign = 'left' | 'right' | 'center';
2200
2201
 
package/dist/index.js CHANGED
@@ -7475,70 +7475,71 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
7475
7475
  title: n == null ? void 0 : n.toString(),
7476
7476
  children: e
7477
7477
  }) : /* @__PURE__ */ S(x, { children: e }), ep = {
7478
- tabs: "_tabs_vkne2_1",
7479
- padding: "_padding_vkne2_7",
7480
- margin: "_margin_vkne2_11",
7481
- contentPadding: "_contentPadding_vkne2_14",
7482
- item: "_item_vkne2_17",
7483
- left: "_left_vkne2_64",
7484
- right: "_right_vkne2_64",
7485
- selectionIndicator: "_selectionIndicator_vkne2_67"
7486
- }, tp = ({ name: e = void 0, options: t = null, value: n = void 0, onChange: r = bn, padding: i = !1, margin: a = !0, testId: o, linkComponent: s }) => {
7487
- let c = u(W), { simpleInputs: l, options: d, selectedOptions: f } = Xc(t, n), p = mn(f) ? void 0 : l ? f : f.value, m = (e) => {
7478
+ tabs: "_tabs_1olt8_1",
7479
+ padding: "_padding_1olt8_7",
7480
+ margin: "_margin_1olt8_11",
7481
+ contentPadding: "_contentPadding_1olt8_14",
7482
+ item: "_item_1olt8_17",
7483
+ small: "_small_1olt8_35",
7484
+ left: "_left_1olt8_67",
7485
+ right: "_right_1olt8_67",
7486
+ selectionIndicator: "_selectionIndicator_1olt8_70"
7487
+ }, tp = ({ name: e = void 0, options: t = null, value: n = void 0, onChange: r = bn, padding: i = !1, margin: a = !0, small: o = !1, testId: s, linkComponent: c }) => {
7488
+ let l = u(W), { simpleInputs: d, options: f, selectedOptions: p } = Xc(t, n), m = mn(p) ? void 0 : d ? p : p.value, h = (e) => {
7488
7489
  var t;
7489
- return (t = e.component) == null ? s : t;
7490
- }, h = (e) => !!(e.to && m(e)), g = (t) => {
7490
+ return (t = e.component) == null ? c : t;
7491
+ }, g = (e) => !!(e.to && h(e)), _ = (t) => {
7491
7492
  var n;
7492
- let i = (n = d == null ? void 0 : d.findIndex((e) => e.value === t)) == null ? -1 : n;
7493
+ let i = (n = f == null ? void 0 : f.findIndex((e) => e.value === t)) == null ? -1 : n;
7493
7494
  if (i === -1) return;
7494
- let a = d[i];
7495
- a.disabled || c || r({ target: {
7495
+ let a = f[i];
7496
+ a.disabled || l || r({ target: {
7496
7497
  name: e == null ? "" : e,
7497
7498
  value: a.value,
7498
7499
  label: String(a.label)
7499
7500
  } });
7500
- }, _ = (e) => {
7501
- let t = d == null ? void 0 : d.find((t) => h(t) && t.to === e);
7502
- t && g(t.value);
7503
- }, v = (e, t) => {
7504
- e.metaKey || e.ctrlKey || e.altKey || e.shiftKey || g(t);
7505
- }, y = d.filter((e) => !e.hidden || e.value === p), x = d.some(h), w = (e) => {
7506
- let { label: t, url: n, to: r, disabled: i, value: a, right: o, invalid: s, badge: l, testId: u } = e, d = h(e), f = m(e), p = d ? r : n;
7501
+ }, v = (e) => {
7502
+ let t = f == null ? void 0 : f.find((t) => g(t) && t.to === e);
7503
+ t && _(t.value);
7504
+ }, y = (e, t) => {
7505
+ e.metaKey || e.ctrlKey || e.altKey || e.shiftKey || _(t);
7506
+ }, x = f.filter((e) => !e.hidden || e.value === m), w = f.some(g), T = (e) => {
7507
+ let { label: t, url: n, to: r, disabled: i, value: a, right: s, invalid: c, badge: u, testId: d } = e, f = g(e), p = h(e), m = f ? r : n;
7507
7508
  return /* @__PURE__ */ C(yi, {
7508
7509
  id: a,
7509
- ...p ? { href: p } : {},
7510
+ ...m ? { href: m } : {},
7510
7511
  shouldSelectOnPressUp: !0,
7511
- isDisabled: i || c,
7512
- className: b(ep.item, o ? ep.right : ep.left),
7513
- "data-testid": u,
7514
- render: d && f ? (e) => "href" in e ? /* @__PURE__ */ S(f, {
7512
+ isDisabled: i || l,
7513
+ className: b(ep.item, s ? ep.right : ep.left, o ? ep.small : ""),
7514
+ "data-testid": d,
7515
+ render: f && p ? (e) => "href" in e ? /* @__PURE__ */ S(p, {
7515
7516
  ...e,
7516
7517
  to: r,
7517
7518
  onClick: (t) => {
7518
7519
  var n;
7519
- (n = e.onClick) == null || n.call(e, t), v(t, a);
7520
+ (n = e.onClick) == null || n.call(e, t), y(t, a);
7520
7521
  }
7521
7522
  }) : /* @__PURE__ */ S("div", { ...e }) : void 0,
7522
7523
  children: [/* @__PURE__ */ S($f, {
7523
7524
  label: t,
7524
- invalid: s,
7525
- badge: l
7525
+ invalid: c,
7526
+ badge: u
7526
7527
  }), /* @__PURE__ */ S(vi, { className: ep.selectionIndicator })]
7527
7528
  }, a);
7528
7529
  };
7529
- if (d) {
7530
+ if (f) {
7530
7531
  let t = /* @__PURE__ */ S(xi, {
7531
- selectedKey: p,
7532
- onSelectionChange: g,
7533
- "data-testid": o,
7532
+ selectedKey: m,
7533
+ onSelectionChange: _,
7534
+ "data-testid": s,
7534
7535
  children: /* @__PURE__ */ S(bi, {
7535
7536
  "aria-label": e == null ? "Tabs" : e,
7536
7537
  className: b(ep.tabs, i ? ep.padding : "", a ? ep.margin : ""),
7537
- children: y.map(w)
7538
+ children: x.map(T)
7538
7539
  })
7539
7540
  });
7540
- return x ? /* @__PURE__ */ S(Yt, {
7541
- navigate: _,
7541
+ return w ? /* @__PURE__ */ S(Yt, {
7542
+ navigate: v,
7542
7543
  children: t
7543
7544
  }) : t;
7544
7545
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "10.3.1-beta-2",
3
+ "version": "10.4.0",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
6
6
  "bugs": {