@agility/plenum-ui 2.0.0-rc3 → 2.0.0-rc5

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.js CHANGED
@@ -5142,7 +5142,8 @@ var InputField = (_a) => {
5142
5142
  required,
5143
5143
  clientSideCheck = true,
5144
5144
  placeholder,
5145
- className
5145
+ className,
5146
+ ref
5146
5147
  } = _b, rest = __objRest(_b, [
5147
5148
  "type",
5148
5149
  "id",
@@ -5156,16 +5157,19 @@ var InputField = (_a) => {
5156
5157
  "required",
5157
5158
  "clientSideCheck",
5158
5159
  "placeholder",
5159
- "className"
5160
+ "className",
5161
+ "ref"
5160
5162
  ]);
5161
5163
  return /* @__PURE__ */ React11.createElement(
5162
5164
  "input",
5163
5165
  __spreadValues({}, __spreadValues({
5164
5166
  type,
5165
5167
  id: id2,
5168
+ ref,
5166
5169
  name,
5167
5170
  value,
5168
5171
  onChange: (e) => {
5172
+ console.log(e);
5169
5173
  handleChange(e.target.value);
5170
5174
  },
5171
5175
  autoFocus: isFocused,
@@ -5423,9 +5427,132 @@ var TextArea_default = TextAreaField;
5423
5427
  // stories/molecules/inputs/textArea/index.ts
5424
5428
  var textArea_default = TextArea_default;
5425
5429
 
5426
- // stories/molecules/inputs/toggleSwitch/ToggleSwitch.tsx
5427
- import React15, { useEffect as useEffect3, useState as useState4 } from "react";
5430
+ // stories/molecules/inputs/TextInput/TextInput.tsx
5431
+ import React16, { forwardRef, useEffect as useEffect3, useId as useId2, useRef, useState as useState4 } from "react";
5428
5432
  import { default as cn17 } from "classnames";
5433
+
5434
+ // stories/molecules/inputs/InputCounter/InputCounter.tsx
5435
+ import React15 from "react";
5436
+ var InputCounter = ({ current = 0, limit }) => {
5437
+ return /* @__PURE__ */ React15.createElement("div", { className: "mt-1 text-center text-sm text-gray-500 flex gap-1" }, /* @__PURE__ */ React15.createElement("div", { className: "currentCount" }, current), (limit || 0) > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement("div", null, "/"), /* @__PURE__ */ React15.createElement("div", { className: "limitCount" }, limit)));
5438
+ };
5439
+ var InputCounter_default = InputCounter;
5440
+
5441
+ // stories/molecules/inputs/TextInput/TextInput.tsx
5442
+ var TextInput = (_a, ref) => {
5443
+ var _b = _a, {
5444
+ label,
5445
+ isFocused,
5446
+ isError,
5447
+ id: id2,
5448
+ name,
5449
+ isRequired,
5450
+ type,
5451
+ defaultValue,
5452
+ isDisabled,
5453
+ isReadonly,
5454
+ message,
5455
+ isShowCounter,
5456
+ maxLength,
5457
+ onChange,
5458
+ placeholder,
5459
+ value: externalValue,
5460
+ className
5461
+ } = _b, props = __objRest(_b, [
5462
+ "label",
5463
+ "isFocused",
5464
+ "isError",
5465
+ "id",
5466
+ "name",
5467
+ "isRequired",
5468
+ "type",
5469
+ "defaultValue",
5470
+ "isDisabled",
5471
+ "isReadonly",
5472
+ "message",
5473
+ "isShowCounter",
5474
+ "maxLength",
5475
+ "onChange",
5476
+ "placeholder",
5477
+ "value",
5478
+ "className"
5479
+ ]);
5480
+ const uniqueID = useId2();
5481
+ const [isFocus, setIsFocus] = useState4(Boolean(isFocused));
5482
+ const [value, setValue] = useState4(externalValue || defaultValue || "");
5483
+ const inputRef = useRef(null);
5484
+ useEffect3(() => {
5485
+ if (externalValue !== void 0 && externalValue !== null) {
5486
+ setValue(externalValue);
5487
+ }
5488
+ }, [externalValue]);
5489
+ useEffect3(() => {
5490
+ const input = inputRef.current;
5491
+ if (!input || isFocus === void 0 || isDisabled)
5492
+ return;
5493
+ if (isFocus) {
5494
+ input.focus();
5495
+ } else {
5496
+ input.blur();
5497
+ }
5498
+ }, [isFocus]);
5499
+ useEffect3(() => {
5500
+ const input = inputRef.current;
5501
+ if (!input || defaultValue === void 0 || defaultValue === "")
5502
+ return;
5503
+ }, [defaultValue]);
5504
+ const handleInputFocus = () => setIsFocus(true);
5505
+ const handleInputBlur = () => setIsFocus(false);
5506
+ if (!id2)
5507
+ id2 = `input-${uniqueID}`;
5508
+ if (!name)
5509
+ name = id2;
5510
+ return /* @__PURE__ */ React16.createElement("div", { className: "relative" }, /* @__PURE__ */ React16.createElement(
5511
+ InputLabel_default2,
5512
+ {
5513
+ isPlaceholder: true,
5514
+ label,
5515
+ isRequired,
5516
+ id: id2,
5517
+ isError,
5518
+ isActive: true,
5519
+ isDisabled
5520
+ }
5521
+ ), /* @__PURE__ */ React16.createElement(
5522
+ InputField_default2,
5523
+ __spreadValues({
5524
+ onFocus: handleInputFocus,
5525
+ onBlur: handleInputBlur,
5526
+ handleChange: (v) => setValue(v),
5527
+ ref,
5528
+ type,
5529
+ name,
5530
+ id: id2,
5531
+ className: cn17(
5532
+ "w-full rounded border py-2 px-3 text-sm font-normal leading-5",
5533
+ { "border-gray-300": !isFocus && !isError },
5534
+ {
5535
+ "!border-purple-500 shadow-none outline-purple-500 focus:!ring-purple-500": isFocus && !isError
5536
+ },
5537
+ {
5538
+ "!border-red-500 shadow-none focus:ring-red-500": isError
5539
+ },
5540
+ className
5541
+ ),
5542
+ isDisabled,
5543
+ isReadonly,
5544
+ value,
5545
+ defaultValue,
5546
+ maxLength,
5547
+ placeholder
5548
+ }, props)
5549
+ ), /* @__PURE__ */ React16.createElement("div", { className: "flex flex-row space-x-3" }, /* @__PURE__ */ React16.createElement("div", { className: "grow" }, message && /* @__PURE__ */ React16.createElement("span", { className: cn17("mt-1 block text-sm", isError ? "text-red-500" : "text-gray-500") }, message)), isShowCounter && /* @__PURE__ */ React16.createElement("div", { className: "shrink-0" }, /* @__PURE__ */ React16.createElement(InputCounter_default, { current: Number(value == null ? void 0 : value.length), limit: maxLength }))));
5550
+ };
5551
+ var _TextInput = forwardRef(TextInput);
5552
+
5553
+ // stories/molecules/inputs/toggleSwitch/ToggleSwitch.tsx
5554
+ import React17, { useEffect as useEffect4, useState as useState5 } from "react";
5555
+ import { default as cn18 } from "classnames";
5429
5556
  import { Switch } from "@headlessui/react";
5430
5557
  var ToggleSwitch = ({
5431
5558
  isChecked,
@@ -5437,9 +5564,9 @@ var ToggleSwitch = ({
5437
5564
  variant = "base",
5438
5565
  withIcon
5439
5566
  }) => {
5440
- const [checked, setChecked] = useState4(isChecked);
5441
- useEffect3(() => setChecked(isChecked), [isChecked]);
5442
- return /* @__PURE__ */ React15.createElement(Switch.Group, { as: "div", className: "flex items-center gap-2" }, label && label.xPosition === "left" && /* @__PURE__ */ React15.createElement(Switch.Label, { className: label.className }, label.text), /* @__PURE__ */ React15.createElement(
5567
+ const [checked, setChecked] = useState5(isChecked);
5568
+ useEffect4(() => setChecked(isChecked), [isChecked]);
5569
+ return /* @__PURE__ */ React17.createElement(Switch.Group, { as: "div", className: "flex items-center gap-2" }, label && label.xPosition === "left" && /* @__PURE__ */ React17.createElement(Switch.Label, { className: label.className }, label.text), /* @__PURE__ */ React17.createElement(
5443
5570
  Switch,
5444
5571
  {
5445
5572
  name,
@@ -5449,17 +5576,17 @@ var ToggleSwitch = ({
5449
5576
  onChange(v);
5450
5577
  setChecked(v);
5451
5578
  },
5452
- className: cn17(
5579
+ className: cn18(
5453
5580
  { "w-9 h-4": variant === "short", " h-6 w-11": variant === "base" },
5454
5581
  checked ? "bg-purple-600" : "bg-gray-200",
5455
5582
  "relative inline-flex items-center rounded-full focus-visible:ring-2 focus-visible:ring-purple-600 focus-visible:ring-offset-2 focus-within:ring-2 focus-within:ring-purple-600 focus-within:ring-offset-2 focus:ring-2 focus:ring-purple-600 focus:ring-offset-2 active:ring-2 active:ring-purple-600 active:ring-offset-2"
5456
5583
  )
5457
5584
  },
5458
- /* @__PURE__ */ React15.createElement("span", { className: "sr-only" }, screenReaderLabel),
5459
- /* @__PURE__ */ React15.createElement(
5585
+ /* @__PURE__ */ React17.createElement("span", { className: "sr-only" }, screenReaderLabel),
5586
+ /* @__PURE__ */ React17.createElement(
5460
5587
  "span",
5461
5588
  {
5462
- className: cn17(
5589
+ className: cn18(
5463
5590
  checked ? "translate-x-[22px]" : "translate-x-[2px]",
5464
5591
  {
5465
5592
  "border border-gray-200 translate-x-0": variant === "short",
@@ -5468,9 +5595,9 @@ var ToggleSwitch = ({
5468
5595
  " h-5 w-5 transform rounded-full bg-white transition shadow-sm drop-shadow flex items-center justify-center"
5469
5596
  )
5470
5597
  },
5471
- withIcon && /* @__PURE__ */ React15.createElement(DynamicIcon, __spreadProps(__spreadValues({}, withIcon), { className: "text-gray-400 m-[2px]" }))
5598
+ withIcon && /* @__PURE__ */ React17.createElement(DynamicIcon, __spreadProps(__spreadValues({}, withIcon), { className: "text-gray-400 m-[2px]" }))
5472
5599
  )
5473
- ), label && label.xPosition === "right" && /* @__PURE__ */ React15.createElement(Switch.Label, { className: label.className }, label.text));
5600
+ ), label && label.xPosition === "right" && /* @__PURE__ */ React17.createElement(Switch.Label, { className: label.className }, label.text));
5474
5601
  };
5475
5602
  var ToggleSwitch_default = ToggleSwitch;
5476
5603
 
@@ -5478,8 +5605,8 @@ var ToggleSwitch_default = ToggleSwitch;
5478
5605
  var toggleSwitch_default = ToggleSwitch_default;
5479
5606
 
5480
5607
  // stories/organisms/AnimatedLabelInput/AnimatedLabelInput.tsx
5481
- import React16 from "react";
5482
- import { default as cn18 } from "classnames";
5608
+ import React18 from "react";
5609
+ import { default as cn19 } from "classnames";
5483
5610
  var AnimatedLabelInput = ({
5484
5611
  id: id2,
5485
5612
  label,
@@ -5490,10 +5617,10 @@ var AnimatedLabelInput = ({
5490
5617
  isError,
5491
5618
  containerStyles
5492
5619
  }) => {
5493
- return /* @__PURE__ */ React16.createElement("div", { className: cn18("group relative", containerStyles ? containerStyles : "") }, input && /* @__PURE__ */ React16.createElement(InputField_default2, __spreadValues({ isError }, input)), textarea && /* @__PURE__ */ React16.createElement(TextArea_default, __spreadValues({ isError }, textarea)), /* @__PURE__ */ React16.createElement(
5620
+ return /* @__PURE__ */ React18.createElement("div", { className: cn19("group relative", containerStyles ? containerStyles : "") }, input && /* @__PURE__ */ React18.createElement(InputField_default2, __spreadValues({ isError }, input)), textarea && /* @__PURE__ */ React18.createElement(TextArea_default, __spreadValues({ isError }, textarea)), /* @__PURE__ */ React18.createElement(
5494
5621
  "label",
5495
5622
  {
5496
- className: cn18(
5623
+ className: cn19(
5497
5624
  "absolute left-1 z-10 ml-[.172rem] inline-block bg-white px-1 text-xs transition-all peer-placeholder-shown:top-2 peer-placeholder-shown:text-sm peer-placeholder-shown:text-gray-600",
5498
5625
  "-top-[9px] group-focus-within:!-top-[12px] group-focus-within:!left-1 group-focus-within:!ml-[.172rem] group-focus-within:!text-xs",
5499
5626
  isError && "!text-red-600"
@@ -5501,8 +5628,8 @@ var AnimatedLabelInput = ({
5501
5628
  htmlFor: id2
5502
5629
  },
5503
5630
  label.display,
5504
- required && /* @__PURE__ */ React16.createElement("span", { className: "text-red-600" }, "*")
5505
- ), /* @__PURE__ */ React16.createElement("div", { className: "flex flex-row space-x-3" }, /* @__PURE__ */ React16.createElement("div", { className: "grow transition-all" }, message && /* @__PURE__ */ React16.createElement("span", { className: cn18("mt-1 block text-sm", isError ? "text-red-500" : "text-gray-500") }, message))));
5631
+ required && /* @__PURE__ */ React18.createElement("span", { className: "text-red-600" }, "*")
5632
+ ), /* @__PURE__ */ React18.createElement("div", { className: "flex flex-row space-x-3" }, /* @__PURE__ */ React18.createElement("div", { className: "grow transition-all" }, message && /* @__PURE__ */ React18.createElement("span", { className: cn19("mt-1 block text-sm", isError ? "text-red-500" : "text-gray-500") }, message))));
5506
5633
  };
5507
5634
  var AnimatedLabelInput_default = AnimatedLabelInput;
5508
5635
 
@@ -5510,13 +5637,13 @@ var AnimatedLabelInput_default = AnimatedLabelInput;
5510
5637
  var AnimatedLabelInput_default2 = AnimatedLabelInput_default;
5511
5638
 
5512
5639
  // stories/organisms/ButtonDropdown/ButtonDropdown.tsx
5513
- import React18 from "react";
5514
- import { default as cn20 } from "classnames";
5640
+ import React20 from "react";
5641
+ import { default as cn21 } from "classnames";
5515
5642
 
5516
5643
  // stories/organisms/DropdownComponent/DropdownComponent.tsx
5517
- import React17, { Fragment, useState as useState5 } from "react";
5644
+ import React19, { Fragment, useState as useState6 } from "react";
5518
5645
  import { Transition } from "@headlessui/react";
5519
- import { default as cn19 } from "classnames";
5646
+ import { default as cn20 } from "classnames";
5520
5647
  import {
5521
5648
  useFloating,
5522
5649
  autoUpdate,
@@ -5557,8 +5684,8 @@ var Dropdown = (_a) => {
5557
5684
  "offsetOptions"
5558
5685
  ]);
5559
5686
  var _a2, _b2;
5560
- const [isOpen, setIsOpen] = useState5(false);
5561
- const [activeItem, setActiveItem] = useState5(null);
5687
+ const [isOpen, setIsOpen] = useState6(false);
5688
+ const [activeItem, setActiveItem] = useState6(null);
5562
5689
  const { refs, floatingStyles, context } = useFloating({
5563
5690
  open: isOpen,
5564
5691
  onOpenChange: setIsOpen,
@@ -5589,7 +5716,7 @@ var Dropdown = (_a) => {
5589
5716
  }
5590
5717
  });
5591
5718
  const { groupClassname, buttonClassname, itemsClassname, itemClassname, activeItemClassname } = classNames3;
5592
- return /* @__PURE__ */ React17.createElement(
5719
+ return /* @__PURE__ */ React19.createElement(
5593
5720
  "div",
5594
5721
  __spreadValues({}, __spreadValues({
5595
5722
  className: groupClassname,
@@ -5598,7 +5725,7 @@ var Dropdown = (_a) => {
5598
5725
  "aria-expanded": isOpen,
5599
5726
  "aria-haspopup": "listbox"
5600
5727
  }, props)),
5601
- /* @__PURE__ */ React17.createElement(
5728
+ /* @__PURE__ */ React19.createElement(
5602
5729
  "button",
5603
5730
  __spreadValues({}, __spreadValues({
5604
5731
  ref: refs.setReference,
@@ -5607,9 +5734,9 @@ var Dropdown = (_a) => {
5607
5734
  setIsOpen(!isOpen);
5608
5735
  }
5609
5736
  }, getReferenceProps())),
5610
- CustomDropdownTrigger ? /* @__PURE__ */ React17.createElement("span", { className: "" }, CustomDropdownTrigger) : /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement("span", { className: "pl-1" }, label), /* @__PURE__ */ React17.createElement(DynamicIcon, { icon: "ChevronDownIcon", className: "ml-1 h-5 w-6 " }))
5737
+ CustomDropdownTrigger ? /* @__PURE__ */ React19.createElement("span", { className: "" }, CustomDropdownTrigger) : /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement("span", { className: "pl-1" }, label), /* @__PURE__ */ React19.createElement(DynamicIcon, { icon: "ChevronDownIcon", className: "ml-1 h-5 w-6 " }))
5611
5738
  ),
5612
- isMounted && items.length > 0 && isOpen && /* @__PURE__ */ React17.createElement(FloatingPortal, null, /* @__PURE__ */ React17.createElement(FloatingFocusManager, { context, modal: true }, /* @__PURE__ */ React17.createElement(
5739
+ isMounted && items.length > 0 && isOpen && /* @__PURE__ */ React19.createElement(FloatingPortal, null, /* @__PURE__ */ React19.createElement(FloatingFocusManager, { context, modal: true }, /* @__PURE__ */ React19.createElement(
5613
5740
  Transition,
5614
5741
  {
5615
5742
  as: Fragment,
@@ -5621,7 +5748,7 @@ var Dropdown = (_a) => {
5621
5748
  leaveFrom: "transform opacity-100 scale-100",
5622
5749
  leaveTo: "transform opacity-0 scale-95"
5623
5750
  },
5624
- /* @__PURE__ */ React17.createElement(
5751
+ /* @__PURE__ */ React19.createElement(
5625
5752
  "ul",
5626
5753
  __spreadValues(__spreadProps(__spreadValues({}, __spreadProps(__spreadValues({}, getFloatingProps()), {
5627
5754
  className: itemsClassname,
@@ -5643,7 +5770,7 @@ var Dropdown = (_a) => {
5643
5770
  "aria-labelledby": label
5644
5771
  }), getFloatingProps()),
5645
5772
  items.map((itemStack, idx) => {
5646
- return /* @__PURE__ */ React17.createElement(React17.Fragment, { key: `${idx}-list-${id2}` }, itemStack.map(
5773
+ return /* @__PURE__ */ React19.createElement(React19.Fragment, { key: `${idx}-list-${id2}` }, itemStack.map(
5647
5774
  (_a3) => {
5648
5775
  var _b3 = _a3, {
5649
5776
  onClick,
@@ -5661,7 +5788,7 @@ var Dropdown = (_a) => {
5661
5788
  "iconPosition"
5662
5789
  ]);
5663
5790
  const active = activeItem && activeItem === key;
5664
- const itemClass = cn19(
5791
+ const itemClass = cn20(
5665
5792
  itemClassname,
5666
5793
  "group flex cursor-pointer items-center px-4 py-2 text-sm transition-all",
5667
5794
  {
@@ -5679,7 +5806,7 @@ var Dropdown = (_a) => {
5679
5806
  },
5680
5807
  itemClassname
5681
5808
  );
5682
- return /* @__PURE__ */ React17.createElement("li", { key }, /* @__PURE__ */ React17.createElement(
5809
+ return /* @__PURE__ */ React19.createElement("li", { key }, /* @__PURE__ */ React19.createElement(
5683
5810
  "button",
5684
5811
  __spreadValues({}, __spreadValues({
5685
5812
  onClick: () => {
@@ -5687,23 +5814,23 @@ var Dropdown = (_a) => {
5687
5814
  onClick && onClick();
5688
5815
  },
5689
5816
  key,
5690
- className: cn19(itemClass, "w-full")
5817
+ className: cn20(itemClass, "w-full")
5691
5818
  }, rest)),
5692
- /* @__PURE__ */ React17.createElement("div", { className: "flex items-center gap-x-4" }, icon && (iconPosition === "leading" || iconPosition === void 0) && (typeof icon === "string" ? /* @__PURE__ */ React17.createElement(
5819
+ /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-x-4" }, icon && (iconPosition === "leading" || iconPosition === void 0) && (typeof icon === "string" ? /* @__PURE__ */ React19.createElement(
5693
5820
  DynamicIcon,
5694
5821
  __spreadValues({}, {
5695
5822
  icon,
5696
- className: cn19(
5823
+ className: cn20(
5697
5824
  {
5698
5825
  "text-red-500": isEmphasized
5699
5826
  },
5700
5827
  "opacity-60 group"
5701
5828
  )
5702
5829
  })
5703
- ) : /* @__PURE__ */ React17.createElement(
5830
+ ) : /* @__PURE__ */ React19.createElement(
5704
5831
  DynamicIcon,
5705
5832
  __spreadValues({}, __spreadProps(__spreadValues({}, icon), {
5706
- className: cn19(
5833
+ className: cn20(
5707
5834
  icon.className,
5708
5835
  {
5709
5836
  "text-red-500": isEmphasized
@@ -5711,21 +5838,21 @@ var Dropdown = (_a) => {
5711
5838
  "opacity-60 group"
5712
5839
  )
5713
5840
  }))
5714
- )), /* @__PURE__ */ React17.createElement("div", { className: "whitespace-nowrap" }, label2), icon && iconPosition === "trailing" && (typeof icon === "string" ? /* @__PURE__ */ React17.createElement(
5841
+ )), /* @__PURE__ */ React19.createElement("div", { className: "whitespace-nowrap" }, label2), icon && iconPosition === "trailing" && (typeof icon === "string" ? /* @__PURE__ */ React19.createElement(
5715
5842
  DynamicIcon,
5716
5843
  __spreadValues({}, {
5717
5844
  icon,
5718
- className: cn19(
5845
+ className: cn20(
5719
5846
  {
5720
5847
  "text-red-500": isEmphasized
5721
5848
  },
5722
5849
  "opacity-60 group"
5723
5850
  )
5724
5851
  })
5725
- ) : /* @__PURE__ */ React17.createElement(
5852
+ ) : /* @__PURE__ */ React19.createElement(
5726
5853
  DynamicIcon,
5727
5854
  __spreadValues({}, __spreadProps(__spreadValues({}, icon), {
5728
- className: cn19(
5855
+ className: cn20(
5729
5856
  icon.className,
5730
5857
  {
5731
5858
  "text-red-500": isEmphasized
@@ -5750,39 +5877,39 @@ var DropdownComponent_default2 = DropdownComponent_default;
5750
5877
  // stories/organisms/ButtonDropdown/ButtonDropdown.tsx
5751
5878
  var ButtonDropdown = ({ button, dropDown, placement, offsetOptions }) => {
5752
5879
  const dropDownClasses = __spreadProps(__spreadValues({}, defaultClassNames), {
5753
- groupClassname: cn20(
5880
+ groupClassname: cn21(
5754
5881
  "flex items-center justify-center rounded-l-none border !border-l-0 rounded-r px-2 transition-all hover:!border-l-0",
5755
5882
  button.actionType === "primary" ? "border-purple-600 bg-purple-600 !text-white hover:border-purple-700 hover:bg-purple-700 active:!border-purple-800 active:!bg-purple-800 fill-white" : "",
5756
5883
  button.actionType === "secondary" ? "border-purple-50 bg-purple-50 !text-purple-700 hover:border-purple-100 hover:bg-purple-100 active:!border-purple-300 active:!bg-purple-300 fill-purple-700" : "",
5757
5884
  button.actionType === "alternative" ? "border-gray-300 bg-white !text-gray-700 fill-gray-700 hover:border-gray-300 hover:bg-gray-50 active:bg-gray-100" : ""
5758
5885
  )
5759
5886
  });
5760
- return /* @__PURE__ */ React18.createElement("div", { className: "flex items-stretch focus-within:ring-purple-600 focus-within:ring-2 focus-within:ring-offset-white focus-within:ring-offset-2 rounded-[3px]" }, /* @__PURE__ */ React18.createElement(
5887
+ return /* @__PURE__ */ React20.createElement("div", { className: "flex items-stretch focus-within:ring-purple-600 focus-within:ring-2 focus-within:ring-offset-white focus-within:ring-offset-2 rounded-[3px]" }, /* @__PURE__ */ React20.createElement(
5761
5888
  Button_default2,
5762
5889
  __spreadValues({}, __spreadProps(__spreadValues({}, button), {
5763
- className: cn20(
5890
+ className: cn21(
5764
5891
  button.className,
5765
5892
  "!rounded-r-none !border-r-0 hover:!border-r-0 !focus:ring-transparent !focus-visible:ring-transparent !focus-within:ring-transparent !focus:ring-0 !focus-within:ring-0 !focus-visible:ring-0 !focus:ring-offset-0 !focus-visible:ring-offset-0 !focus-within:ring-offset-0 !ring-0 outline-none focus:outline-none focus-visible:outline-none focus-within:outline-none !ring-offset-0"
5766
5893
  )
5767
5894
  }))
5768
- ), /* @__PURE__ */ React18.createElement(
5895
+ ), /* @__PURE__ */ React20.createElement(
5769
5896
  "div",
5770
5897
  {
5771
- className: cn20(
5898
+ className: cn21(
5772
5899
  "w-[1px] rt",
5773
5900
  button.actionType === "primary" ? "bg-purple-700" : "",
5774
5901
  button.actionType === "secondary" ? "bg-purple-200" : "",
5775
5902
  button.actionType === "alternative" ? "bg-gray-300" : ""
5776
5903
  )
5777
5904
  }
5778
- ), /* @__PURE__ */ React18.createElement(
5905
+ ), /* @__PURE__ */ React20.createElement(
5779
5906
  DropdownComponent_default2,
5780
5907
  __spreadValues({}, __spreadProps(__spreadValues({}, dropDown), {
5781
- CustomDropdownTrigger: /* @__PURE__ */ React18.createElement(
5908
+ CustomDropdownTrigger: /* @__PURE__ */ React20.createElement(
5782
5909
  DynamicIcon,
5783
5910
  __spreadValues({}, {
5784
5911
  icon: "ChevronDownIcon",
5785
- className: cn20("h-5 w-5", {
5912
+ className: cn21("h-5 w-5", {
5786
5913
  "text-white": button.actionType === "primary",
5787
5914
  "text-purple-700": button.actionType === "secondary",
5788
5915
  "text-gray-700": button.actionType === "alternative"
@@ -5799,7 +5926,7 @@ var ButtonDropdown = ({ button, dropDown, placement, offsetOptions }) => {
5799
5926
  },
5800
5927
  placement
5801
5928
  }))
5802
- ), /* @__PURE__ */ React18.createElement("div", { className: "hidden !bg-purple-100 !text-purple-600 transition-all hover:bg-purple-200 focus:bg-purple-300" }));
5929
+ ), /* @__PURE__ */ React20.createElement("div", { className: "hidden !bg-purple-100 !text-purple-600 transition-all hover:bg-purple-200 focus:bg-purple-300" }));
5803
5930
  };
5804
5931
  var ButtonDropdown_default = ButtonDropdown;
5805
5932
 
@@ -5807,8 +5934,8 @@ var ButtonDropdown_default = ButtonDropdown;
5807
5934
  var ButtonDropdown_default2 = ButtonDropdown_default;
5808
5935
 
5809
5936
  // stories/organisms/EmptySectionPlaceholder/EmptySectionPlaceholder.tsx
5810
- import React19 from "react";
5811
- import { default as cn21 } from "classnames";
5937
+ import React21 from "react";
5938
+ import { default as cn22 } from "classnames";
5812
5939
  var EmptySectionPlaceholder = ({
5813
5940
  icon,
5814
5941
  mutedText,
@@ -5817,7 +5944,7 @@ var EmptySectionPlaceholder = ({
5817
5944
  actions,
5818
5945
  isWide
5819
5946
  }) => {
5820
- return /* @__PURE__ */ React19.createElement("div", { className: "flex h-full w-full flex-col items-center justify-center border-2 border-dashed border-gray-300 p-5" }, /* @__PURE__ */ React19.createElement(IconWithShadow_default, __spreadValues({}, icon)), mutedText && /* @__PURE__ */ React19.createElement("p", { className: "my-2 block text-xs text-gray-500" }, mutedText), CallToActionComponent ? CallToActionComponent : /* @__PURE__ */ React19.createElement("p", { className: "mb-2 block text-sm font-medium text-gray-600" }, primaryMessage), actions.length > 0 ? /* @__PURE__ */ React19.createElement("div", { className: cn21("mt-2 flex gap-2", isWide ? "" : "flex-col items-center") }, actions.map((action, index) => /* @__PURE__ */ React19.createElement(Button_default2, __spreadProps(__spreadValues({}, __spreadValues({}, action)), { key: action.label.replaceAll(" ", "-") })))) : /* @__PURE__ */ React19.createElement(React19.Fragment, null));
5947
+ return /* @__PURE__ */ React21.createElement("div", { className: "flex h-full w-full flex-col items-center justify-center border-2 border-dashed border-gray-300 p-5" }, /* @__PURE__ */ React21.createElement(IconWithShadow_default, __spreadValues({}, icon)), mutedText && /* @__PURE__ */ React21.createElement("p", { className: "my-2 block text-xs text-gray-500" }, mutedText), CallToActionComponent ? CallToActionComponent : /* @__PURE__ */ React21.createElement("p", { className: "mb-2 block text-sm font-medium text-gray-600" }, primaryMessage), actions.length > 0 ? /* @__PURE__ */ React21.createElement("div", { className: cn22("mt-2 flex gap-2", isWide ? "" : "flex-col items-center") }, actions.map((action, index) => /* @__PURE__ */ React21.createElement(Button_default2, __spreadProps(__spreadValues({}, __spreadValues({}, action)), { key: action.label.replaceAll(" ", "-") })))) : /* @__PURE__ */ React21.createElement(React21.Fragment, null));
5821
5948
  };
5822
5949
  var EmptySectionPlaceholder_default = EmptySectionPlaceholder;
5823
5950
 
@@ -5825,8 +5952,8 @@ var EmptySectionPlaceholder_default = EmptySectionPlaceholder;
5825
5952
  var EmptySectionPlaceholder_default2 = EmptySectionPlaceholder_default;
5826
5953
 
5827
5954
  // stories/organisms/FormInputWithAddons/FormInputWithAddons.tsx
5828
- import React20, { useLayoutEffect as useLayoutEffect2, useRef, useState as useState6 } from "react";
5829
- import { default as cn22 } from "classnames";
5955
+ import React22, { useLayoutEffect as useLayoutEffect2, useRef as useRef2, useState as useState7 } from "react";
5956
+ import { default as cn23 } from "classnames";
5830
5957
  var FormInputWithAddons = (_a) => {
5831
5958
  var _b = _a, {
5832
5959
  handleChange,
@@ -5875,34 +6002,34 @@ var FormInputWithAddons = (_a) => {
5875
6002
  "customIconClass",
5876
6003
  "type"
5877
6004
  ]);
5878
- const leadLabelRef = useRef(null);
5879
- const trailLabelRef = useRef(null);
5880
- const [leadLabelWidth, setLeadLabelWidth] = useState6(0);
5881
- const [trailLabelWidth, setTrailLabelWidth] = useState6(0);
6005
+ const leadLabelRef = useRef2(null);
6006
+ const trailLabelRef = useRef2(null);
6007
+ const [leadLabelWidth, setLeadLabelWidth] = useState7(0);
6008
+ const [trailLabelWidth, setTrailLabelWidth] = useState7(0);
5882
6009
  useLayoutEffect2(() => {
5883
6010
  var _a2, _b2;
5884
6011
  setLeadLabelWidth(((_a2 = leadLabelRef.current) == null ? void 0 : _a2.clientWidth) || 0);
5885
6012
  setTrailLabelWidth(((_b2 = trailLabelRef.current) == null ? void 0 : _b2.clientWidth) || 0);
5886
6013
  }, []);
5887
- return /* @__PURE__ */ React20.createElement("div", { className: cn22("group flex flex-col", containerClassName) }, !leadLabel && !trailLabel && topLabel && /* @__PURE__ */ React20.createElement("label", { htmlFor: id2, className: cn22("flex items-center text-sm font-medium text-gray-600", labelClass) }, topLabel), description && /* @__PURE__ */ React20.createElement("div", { className: "mb-2 text-sm text-gray-500" }, description), /* @__PURE__ */ React20.createElement("div", { className: "relative flex-grow" }, (leadLabel || leadIcon) && /* @__PURE__ */ React20.createElement(
6014
+ return /* @__PURE__ */ React22.createElement("div", { className: cn23("group flex flex-col", containerClassName) }, !leadLabel && !trailLabel && topLabel && /* @__PURE__ */ React22.createElement("label", { htmlFor: id2, className: cn23("flex items-center text-sm font-medium text-gray-600", labelClass) }, topLabel), description && /* @__PURE__ */ React22.createElement("div", { className: "mb-2 text-sm text-gray-500" }, description), /* @__PURE__ */ React22.createElement("div", { className: "relative flex-grow" }, (leadLabel || leadIcon) && /* @__PURE__ */ React22.createElement(
5888
6015
  "label",
5889
6016
  {
5890
6017
  ref: leadLabelRef,
5891
6018
  htmlFor: id2,
5892
- className: cn22(
6019
+ className: cn23(
5893
6020
  "absolute top-0 bottom-0 left-3 flex items-center justify-center text-sm text-gray-500",
5894
6021
  labelClass
5895
6022
  )
5896
6023
  },
5897
- leadIcon && /* @__PURE__ */ React20.createElement("span", null, /* @__PURE__ */ React20.createElement(
6024
+ leadIcon && /* @__PURE__ */ React22.createElement("span", null, /* @__PURE__ */ React22.createElement(
5898
6025
  DynamicIcon,
5899
6026
  __spreadValues({}, __spreadProps(__spreadValues({}, leadIcon), {
5900
- className: cn22("h-5 w-5 text-gray-400", leadIconClassNames, customIconClass),
6027
+ className: cn23("h-5 w-5 text-gray-400", leadIconClassNames, customIconClass),
5901
6028
  outline: iconOutlined
5902
6029
  }))
5903
6030
  )),
5904
6031
  leadLabel && leadLabel
5905
- ), /* @__PURE__ */ React20.createElement(
6032
+ ), /* @__PURE__ */ React22.createElement(
5906
6033
  InputField_default2,
5907
6034
  __spreadValues({}, __spreadProps(__spreadValues({}, rest), {
5908
6035
  handleChange,
@@ -5922,20 +6049,20 @@ var FormInputWithAddons = (_a) => {
5922
6049
  paddingLeft: `${leadLabelWidth + addonOffset}px`
5923
6050
  }
5924
6051
  }))
5925
- ), (trailLabel || trailIcon) && /* @__PURE__ */ React20.createElement(
6052
+ ), (trailLabel || trailIcon) && /* @__PURE__ */ React22.createElement(
5926
6053
  "label",
5927
6054
  {
5928
6055
  ref: trailLabelRef,
5929
6056
  htmlFor: id2,
5930
- className: cn22(
6057
+ className: cn23(
5931
6058
  "right absolute top-0 bottom-0 right-3 flex items-center justify-center text-sm !text-gray-500 ",
5932
6059
  labelClass
5933
6060
  )
5934
6061
  },
5935
- trailIcon && /* @__PURE__ */ React20.createElement("span", null, /* @__PURE__ */ React20.createElement(
6062
+ trailIcon && /* @__PURE__ */ React22.createElement("span", null, /* @__PURE__ */ React22.createElement(
5936
6063
  DynamicIcon,
5937
6064
  __spreadValues({}, __spreadProps(__spreadValues({}, trailIcon), {
5938
- className: cn22("h-5 w-5 text-gray-400", customIconClass),
6065
+ className: cn23("h-5 w-5 text-gray-400", customIconClass),
5939
6066
  outline: iconOutlined
5940
6067
  }))
5941
6068
  )),