@oliasoft-open-source/react-ui-library 4.13.0 → 4.13.2

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/global.css CHANGED
@@ -1411,17 +1411,17 @@ html[data-theme='dark'] {
1411
1411
  ._actionComponentContainer_1t7vd_14._active_1t7vd_36 {
1412
1412
  color: var(--color-text-primary-active);
1413
1413
  }
1414
- ._wrapper_1f7k2_1 {
1414
+ ._wrapper_8cxhw_1 {
1415
1415
  display: inline-flex;
1416
1416
  max-width: 100%;
1417
1417
  }
1418
- ._layer_1f7k2_5 ._wrapper_1f7k2_1 {
1418
+ ._layer_8cxhw_5 ._wrapper_8cxhw_1 {
1419
1419
  width: 100%;
1420
1420
  }
1421
- ._layerContainer_1f7k2_8 {
1421
+ ._layerContainer_8cxhw_8 {
1422
1422
  z-index: var(--zindex-dropdown);
1423
1423
  }
1424
- ._layer_1f7k2_5 {
1424
+ ._layer_8cxhw_5 {
1425
1425
  border: 1px solid var(--color-border);
1426
1426
  border-radius: var(--border-radius);
1427
1427
  overflow: hidden;
@@ -1434,97 +1434,98 @@ html[data-theme='dark'] {
1434
1434
  overflow-y: auto;
1435
1435
  max-height: 40vh;
1436
1436
  }
1437
- ._layer_1f7k2_5._nested_1f7k2_24 {
1437
+ ._layer_8cxhw_5._nested_8cxhw_24 {
1438
1438
  margin: -1px 2px;
1439
1439
  }
1440
- ._layer_1f7k2_5 ul {
1440
+ ._layer_8cxhw_5 ul {
1441
1441
  margin: 0;
1442
1442
  padding: 0;
1443
1443
  list-style-type: none;
1444
1444
  }
1445
- ._layer_1f7k2_5 ul li {
1445
+ ._layer_8cxhw_5 ul li {
1446
1446
  list-style: none;
1447
1447
  display: block;
1448
1448
  }
1449
- ._fileInput_1f7k2_36 {
1449
+ ._fileInput_8cxhw_36 {
1450
1450
  opacity: 0;
1451
1451
  position: absolute;
1452
1452
  inset: 0;
1453
1453
  }
1454
- ._trigger_1f7k2_41 {
1454
+ ._trigger_8cxhw_41 {
1455
1455
  display: inline-flex;
1456
1456
  align-items: center;
1457
1457
  cursor: pointer;
1458
1458
  max-width: 100%;
1459
1459
  }
1460
- ._layer_1f7k2_5 ._trigger_1f7k2_41 {
1460
+ ._layer_8cxhw_5 ._trigger_8cxhw_41 {
1461
1461
  width: 100%;
1462
1462
  }
1463
- ._middleAlignedInline_1f7k2_50 {
1463
+ ._middleAlignedInline_8cxhw_50 {
1464
1464
  display: flex;
1465
1465
  align-items: center;
1466
1466
  overflow: hidden;
1467
1467
  width: 100%;
1468
1468
  }
1469
- ._heading_1f7k2_56 {
1469
+ ._heading_8cxhw_56 {
1470
1470
  color: var(--color-text-muted);
1471
1471
  letter-spacing: var(--letter-spacing-wide);
1472
1472
  text-transform: uppercase;
1473
1473
  font-weight: bold;
1474
1474
  }
1475
- ._heading_1f7k2_56 ._headingIcon_1f7k2_62 {
1475
+ ._heading_8cxhw_56 ._headingIcon_8cxhw_62 {
1476
1476
  float: right;
1477
1477
  }
1478
- ._heading_1f7k2_56 ._headingIcon_1f7k2_62 svg {
1478
+ ._heading_8cxhw_56 ._headingIcon_8cxhw_62 svg {
1479
1479
  color: var(--color-text-faint);
1480
1480
  }
1481
- ._heading_1f7k2_56 ._headingIcon_1f7k2_62:hover {
1481
+ ._heading_8cxhw_56 ._headingIcon_8cxhw_62:hover {
1482
1482
  cursor: pointer;
1483
1483
  }
1484
- ._heading_1f7k2_56 ._headingIcon_1f7k2_62:hover svg {
1484
+ ._heading_8cxhw_56 ._headingIcon_8cxhw_62:hover svg {
1485
1485
  color: var(--color-text-primary-hover);
1486
1486
  }
1487
- ._option_1f7k2_74 {
1487
+ ._option_8cxhw_74 {
1488
1488
  color: inherit;
1489
1489
  display: block;
1490
1490
  position: relative;
1491
1491
  }
1492
- ._heading_1f7k2_56,
1493
- ._option_1f7k2_74,
1494
- ._layer_1f7k2_5 ._trigger_1f7k2_41 {
1492
+ ._heading_8cxhw_56,
1493
+ ._option_8cxhw_74,
1494
+ ._layer_8cxhw_5 ._trigger_8cxhw_41 {
1495
1495
  padding: var(--padding-input);
1496
1496
  border: 1px solid transparent;
1497
1497
  }
1498
- ._option_1f7k2_74,
1499
- ._layer_1f7k2_5 ._trigger_1f7k2_41 {
1498
+ ._option_8cxhw_74,
1499
+ ._layer_8cxhw_5 ._trigger_8cxhw_41 {
1500
1500
  line-height: var(--line-height);
1501
1501
  display: flex;
1502
1502
  align-items: flex-start;
1503
1503
  }
1504
- ._option_1f7k2_74:hover,
1505
- ._layer_1f7k2_5 ._trigger_1f7k2_41:hover,
1506
- ._option_1f7k2_74._active_1f7k2_93,
1507
- ._layer_1f7k2_5 ._trigger_1f7k2_41._active_1f7k2_93 {
1504
+ ._option_8cxhw_74:hover,
1505
+ ._layer_8cxhw_5 ._trigger_8cxhw_41:hover,
1506
+ ._option_8cxhw_74._active_8cxhw_93,
1507
+ ._layer_8cxhw_5 ._trigger_8cxhw_41._active_8cxhw_93 {
1508
1508
  background-color: var(--color-background-listitem-hover);
1509
1509
  cursor: pointer;
1510
1510
  }
1511
- ._option_1f7k2_74._selected_1f7k2_98 {
1511
+ ._option_8cxhw_74._selected_8cxhw_98,
1512
+ ._layer_8cxhw_5 ._trigger_8cxhw_41._selected_8cxhw_98 {
1512
1513
  background-color: var(--color-background-listitem-active);
1513
1514
  }
1514
- ._layer_1f7k2_5 ._trigger_1f7k2_41 {
1515
+ ._layer_8cxhw_5 ._trigger_8cxhw_41 {
1515
1516
  align-items: center;
1516
1517
  }
1517
- ._optionContent_1f7k2_104 {
1518
+ ._optionContent_8cxhw_105 {
1518
1519
  flex-wrap: wrap;
1519
1520
  margin-right: auto;
1520
1521
  }
1521
- ._inline_1f7k2_108 ._optionContent_1f7k2_104 {
1522
+ ._inline_8cxhw_109 ._optionContent_8cxhw_105 {
1522
1523
  display: flex;
1523
1524
  justify-content: space-between;
1524
1525
  flex-grow: 1;
1525
1526
  }
1526
- ._icon_1f7k2_113,
1527
- ._check_1f7k2_114 {
1527
+ ._icon_8cxhw_114,
1528
+ ._check_8cxhw_115 {
1528
1529
  display: flex;
1529
1530
  flex-shrink: 1;
1530
1531
  width: var(--size-xs);
@@ -1532,83 +1533,83 @@ html[data-theme='dark'] {
1532
1533
  justify-content: center;
1533
1534
  align-items: center;
1534
1535
  }
1535
- ._icon_1f7k2_113 {
1536
+ ._icon_8cxhw_114 {
1536
1537
  margin-right: var(--padding-xs);
1537
1538
  color: var(--color-text-primary);
1538
1539
  font-size: var(--size-xs);
1539
1540
  }
1540
- ._icon_1f7k2_113:empty {
1541
+ ._icon_8cxhw_114:empty {
1541
1542
  display: none;
1542
1543
  }
1543
- ._icon_1f7k2_113 img {
1544
+ ._icon_8cxhw_114 img {
1544
1545
  max-height: 16px;
1545
1546
  max-width: 16px;
1546
1547
  width: auto;
1547
1548
  height: auto;
1548
1549
  }
1549
- ._check_1f7k2_114 {
1550
+ ._check_8cxhw_115 {
1550
1551
  margin-left: var(--padding-xs);
1551
1552
  color: var(--color-text-primary);
1552
1553
  }
1553
- ._text_1f7k2_140 {
1554
+ ._text_8cxhw_141 {
1554
1555
  display: inline-flex;
1555
1556
  align-items: center;
1556
1557
  cursor: pointer;
1557
1558
  }
1558
- ._label_1f7k2_145 {
1559
+ ._label_8cxhw_146 {
1559
1560
  margin-right: auto;
1560
1561
  }
1561
- ._label_1f7k2_145,
1562
- ._heading_1f7k2_56 {
1562
+ ._label_8cxhw_146,
1563
+ ._heading_8cxhw_56 {
1563
1564
  max-width: 100%;
1564
1565
  display: block;
1565
1566
  overflow: hidden;
1566
1567
  text-overflow: ellipsis;
1567
1568
  white-space: nowrap;
1568
1569
  }
1569
- ._description_1f7k2_156 {
1570
+ ._description_8cxhw_157 {
1570
1571
  color: #999;
1571
1572
  display: block;
1572
1573
  }
1573
- ._arrow_1f7k2_160 {
1574
+ ._arrow_8cxhw_161 {
1574
1575
  margin-left: var(--padding-xxs);
1575
1576
  display: flex;
1576
1577
  }
1577
- ._divider_1f7k2_164 {
1578
+ ._divider_8cxhw_165 {
1578
1579
  border: 0;
1579
1580
  border-top: 1px solid var(--color-border);
1580
1581
  }
1581
- ._deprecatedSemanticIcon_1f7k2_168 {
1582
+ ._deprecatedSemanticIcon_8cxhw_169 {
1582
1583
  color: var(--color-text-primary) !important;
1583
1584
  margin: -5px 0 0 !important;
1584
1585
  }
1585
- ._disabled_1f7k2_172 {
1586
+ ._disabled_8cxhw_173 {
1586
1587
  opacity: 0.2;
1587
1588
  pointer-events: none;
1588
1589
  cursor: not-allowed !important;
1589
1590
  }
1590
- ._buttonLabel_1f7k2_177 {
1591
+ ._buttonLabel_8cxhw_178 {
1591
1592
  overflow: hidden;
1592
1593
  text-overflow: ellipsis;
1593
1594
  display: block;
1594
1595
  margin-right: auto;
1595
1596
  }
1596
- ._buttonCaret_1f7k2_183 {
1597
+ ._buttonCaret_8cxhw_184 {
1597
1598
  display: flex;
1598
1599
  margin-left: var(--padding-xxs);
1599
1600
  }
1600
- ._component_1f7k2_187 {
1601
+ ._component_8cxhw_188 {
1601
1602
  display: inline-flex;
1602
1603
  align-items: center;
1603
1604
  justify-content: center;
1604
1605
  cursor: pointer;
1605
1606
  }
1606
- ._right_1f7k2_193 {
1607
+ ._right_8cxhw_194 {
1607
1608
  margin-left: auto;
1608
1609
  display: flex;
1609
1610
  align-items: center;
1610
1611
  }
1611
- ._actions_1f7k2_198 {
1612
+ ._actions_8cxhw_199 {
1612
1613
  margin-left: var(--padding-xs);
1613
1614
  display: flex;
1614
1615
  align-items: center;
package/dist/index.d.ts CHANGED
@@ -134,7 +134,7 @@ export declare interface IAccordionWithDefaultToggleProps {
134
134
  toggleLabel: string;
135
135
  expanded?: boolean;
136
136
  defaultEnabled?: boolean;
137
- onClickDefaultToggle?: (evt: ChangeEvent<HTMLInputElement>) => void;
137
+ onClickDefaultToggle?: TCheckBoxClickHandler;
138
138
  padding?: boolean;
139
139
  children?: ReactNode;
140
140
  }
@@ -241,17 +241,25 @@ declare interface ICheckBoxCell extends TCommonCell {
241
241
  label?: string | null;
242
242
  checked: boolean;
243
243
  type: TCellType;
244
- onChange: TChangeEventHandler;
244
+ onChange: TCheckBoxClickHandler;
245
245
  disabled?: boolean;
246
246
  }
247
247
 
248
+ export declare interface ICheckBoxClickEvent {
249
+ target: {
250
+ name: string;
251
+ checked: boolean;
252
+ value: boolean;
253
+ };
254
+ }
255
+
248
256
  export declare interface ICheckBoxProps {
249
257
  checked?: boolean;
250
258
  isInTable?: boolean;
251
259
  label?: string | null;
252
260
  name?: string;
253
261
  noMargin?: boolean;
254
- onChange: TChangeEventHandler;
262
+ onChange: TCheckBoxClickHandler;
255
263
  tabIndex?: number;
256
264
  disabled?: boolean;
257
265
  small?: boolean;
@@ -751,6 +759,7 @@ export declare interface IMenuProps {
751
759
  error?: any;
752
760
  warning?: any;
753
761
  title?: string;
762
+ selected?: boolean;
754
763
  }
755
764
 
756
765
  declare interface IMenuSection {
@@ -1743,6 +1752,10 @@ export declare type TChangeEventHandler<T extends HTMLElement = HTMLInputElement
1743
1752
  [key: string]: any;
1744
1753
  }[]) => void;
1745
1754
 
1755
+ export declare type TCheckBoxClickHandler = (evt: default_2.MouseEvent<HTMLDivElement, MouseEvent> & {
1756
+ target: ICheckBoxClickEvent['target'];
1757
+ }) => void;
1758
+
1746
1759
  export declare type TColor = 'danger' | 'red' | 'white' | 'success' | 'green' | 'muted';
1747
1760
 
1748
1761
  declare interface TCommonCell {
package/dist/index.js CHANGED
@@ -3888,9 +3888,14 @@ const CheckBox = ({
3888
3888
  if (!isDisabled) {
3889
3889
  const target = evt.target;
3890
3890
  target.name = name2;
3891
- target.value = !checked;
3892
3891
  target.checked = !checked;
3893
- onChange(evt);
3892
+ onChange({
3893
+ ...evt,
3894
+ target: {
3895
+ ...target,
3896
+ value: target.checked
3897
+ }
3898
+ });
3894
3899
  }
3895
3900
  },
3896
3901
  "data-testid": testId,
@@ -4181,34 +4186,34 @@ const styles$M = {
4181
4186
  actionComponentContainer,
4182
4187
  active: active$7
4183
4188
  };
4184
- const wrapper$4 = "_wrapper_1f7k2_1";
4185
- const layer$1 = "_layer_1f7k2_5";
4186
- const layerContainer$1 = "_layerContainer_1f7k2_8";
4187
- const nested = "_nested_1f7k2_24";
4188
- const fileInput$1 = "_fileInput_1f7k2_36";
4189
- const trigger$2 = "_trigger_1f7k2_41";
4190
- const middleAlignedInline = "_middleAlignedInline_1f7k2_50";
4191
- const heading$5 = "_heading_1f7k2_56";
4192
- const headingIcon = "_headingIcon_1f7k2_62";
4193
- const option$1 = "_option_1f7k2_74";
4194
- const active$6 = "_active_1f7k2_93";
4195
- const selected$1 = "_selected_1f7k2_98";
4196
- const optionContent$1 = "_optionContent_1f7k2_104";
4197
- const inline$4 = "_inline_1f7k2_108";
4198
- const icon$4 = "_icon_1f7k2_113";
4199
- const check$1 = "_check_1f7k2_114";
4200
- const text$3 = "_text_1f7k2_140";
4201
- const label$a = "_label_1f7k2_145";
4202
- const description = "_description_1f7k2_156";
4203
- const arrow$1 = "_arrow_1f7k2_160";
4204
- const divider$1 = "_divider_1f7k2_164";
4205
- const deprecatedSemanticIcon = "_deprecatedSemanticIcon_1f7k2_168";
4206
- const disabled$8 = "_disabled_1f7k2_172";
4207
- const buttonLabel = "_buttonLabel_1f7k2_177";
4208
- const buttonCaret = "_buttonCaret_1f7k2_183";
4209
- const component = "_component_1f7k2_187";
4210
- const right$7 = "_right_1f7k2_193";
4211
- const actions$1 = "_actions_1f7k2_198";
4189
+ const wrapper$4 = "_wrapper_8cxhw_1";
4190
+ const layer$1 = "_layer_8cxhw_5";
4191
+ const layerContainer$1 = "_layerContainer_8cxhw_8";
4192
+ const nested = "_nested_8cxhw_24";
4193
+ const fileInput$1 = "_fileInput_8cxhw_36";
4194
+ const trigger$2 = "_trigger_8cxhw_41";
4195
+ const middleAlignedInline = "_middleAlignedInline_8cxhw_50";
4196
+ const heading$5 = "_heading_8cxhw_56";
4197
+ const headingIcon = "_headingIcon_8cxhw_62";
4198
+ const option$1 = "_option_8cxhw_74";
4199
+ const active$6 = "_active_8cxhw_93";
4200
+ const selected$1 = "_selected_8cxhw_98";
4201
+ const optionContent$1 = "_optionContent_8cxhw_105";
4202
+ const inline$4 = "_inline_8cxhw_109";
4203
+ const icon$4 = "_icon_8cxhw_114";
4204
+ const check$1 = "_check_8cxhw_115";
4205
+ const text$3 = "_text_8cxhw_141";
4206
+ const label$a = "_label_8cxhw_146";
4207
+ const description = "_description_8cxhw_157";
4208
+ const arrow$1 = "_arrow_8cxhw_161";
4209
+ const divider$1 = "_divider_8cxhw_165";
4210
+ const deprecatedSemanticIcon = "_deprecatedSemanticIcon_8cxhw_169";
4211
+ const disabled$8 = "_disabled_8cxhw_173";
4212
+ const buttonLabel = "_buttonLabel_8cxhw_178";
4213
+ const buttonCaret = "_buttonCaret_8cxhw_184";
4214
+ const component = "_component_8cxhw_188";
4215
+ const right$7 = "_right_8cxhw_194";
4216
+ const actions$1 = "_actions_8cxhw_199";
4212
4217
  const styles$L = {
4213
4218
  wrapper: wrapper$4,
4214
4219
  layer: layer$1,
@@ -4354,6 +4359,7 @@ const Section$1 = ({
4354
4359
  path,
4355
4360
  maxHeight
4356
4361
  }) => {
4362
+ var _a2, _b;
4357
4363
  const disabledContext = useContext(DisabledContext);
4358
4364
  switch (section2.type) {
4359
4365
  case MenuType.HEADING:
@@ -4391,10 +4397,14 @@ const Section$1 = ({
4391
4397
  }
4392
4398
  );
4393
4399
  case MenuType.MENU:
4400
+ const selected2 = !!((_b = (_a2 = section2 == null ? void 0 : section2.menu) == null ? void 0 : _a2.sections) == null ? void 0 : _b.find(
4401
+ (s) => s.selected
4402
+ ));
4394
4403
  return /* @__PURE__ */ jsx(
4395
4404
  DropDownMenu,
4396
4405
  {
4397
4406
  menu: section2.menu,
4407
+ selected: selected2,
4398
4408
  title: section2.title,
4399
4409
  closeOnOptionClick,
4400
4410
  isNested: true,
@@ -4597,7 +4607,8 @@ const Text$1 = ({
4597
4607
  title: title2,
4598
4608
  carat,
4599
4609
  disabled: disabled2,
4600
- isOpen: isOpen2
4610
+ isOpen: isOpen2,
4611
+ selected: selected2
4601
4612
  }) => {
4602
4613
  let titleText;
4603
4614
  if (title2) {
@@ -4611,7 +4622,8 @@ const Text$1 = ({
4611
4622
  className: cx$2(
4612
4623
  styles$L.trigger,
4613
4624
  disabled2 ? styles$L.disabled : null,
4614
- isOpen2 ? styles$L.active : null
4625
+ isOpen2 ? styles$L.active : null,
4626
+ selected2 ? styles$L.selected : null
4615
4627
  ),
4616
4628
  children: [
4617
4629
  /* @__PURE__ */ jsx("span", { className: styles$L.label, title: titleText, children: label2 }),
@@ -4677,6 +4689,7 @@ const Trigger$1 = React__default.forwardRef(
4677
4689
  warning: warning2,
4678
4690
  tooltip: tooltip2,
4679
4691
  testId,
4692
+ selected: selected2,
4680
4693
  ...restProps
4681
4694
  }, ref2) => {
4682
4695
  const triggerElement = trigger2 === TriggerType.BUTTON || trigger2 === TriggerType.DROP_DOWN_BUTTON ? /* @__PURE__ */ jsx(
@@ -4701,7 +4714,8 @@ const Trigger$1 = React__default.forwardRef(
4701
4714
  title: title2,
4702
4715
  disabled: isDisabled,
4703
4716
  carat: !contextMenu ? isNested ? MenuCarat.RIGHT : MenuCarat.DOWN : void 0,
4704
- isOpen: isOpen2
4717
+ isOpen: isOpen2,
4718
+ selected: selected2
4705
4719
  }
4706
4720
  ) : trigger2 === TriggerType.COMPONENT ? /* @__PURE__ */ jsx(Component, { component: component2, disabled: isDisabled }) : null;
4707
4721
  const wrappedTrigger = !isNested && (badgeTitle || badgeDot) ? /* @__PURE__ */ jsx(Badge, { title: badgeTitle, dot: badgeDot, small: !badgeDot, children: triggerElement }) : triggerElement;
@@ -4856,7 +4870,8 @@ const DropDownMenu = ({
4856
4870
  setOpen: setOpenProp,
4857
4871
  tooltip: tooltip2,
4858
4872
  error: error2,
4859
- warning: warning2
4873
+ warning: warning2,
4874
+ selected: selected2
4860
4875
  }) => {
4861
4876
  const disabledContext = useContext(DisabledContext);
4862
4877
  const {
@@ -4925,7 +4940,8 @@ const DropDownMenu = ({
4925
4940
  tooltip: tooltip2,
4926
4941
  error: error2,
4927
4942
  warning: warning2,
4928
- testId
4943
+ testId,
4944
+ selected: selected2
4929
4945
  }
4930
4946
  ),
4931
4947
  isOpen2 && renderLayer(