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

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
@@ -5371,74 +5371,114 @@ var Select_default = Select;
5371
5371
  var select_default = Select_default;
5372
5372
 
5373
5373
  // stories/molecules/inputs/textArea/TextArea.tsx
5374
+ import React16, { useEffect as useEffect3, useId as useId2, useState as useState4 } from "react";
5374
5375
  import { default as cn16 } from "classnames";
5375
- var TextAreaField = (_a) => {
5376
+
5377
+ // stories/molecules/inputs/InputCounter/InputCounter.tsx
5378
+ import React15 from "react";
5379
+ var InputCounter = ({ current = 0, limit }) => {
5380
+ 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)));
5381
+ };
5382
+ var InputCounter_default = InputCounter;
5383
+
5384
+ // stories/molecules/inputs/textArea/TextArea.tsx
5385
+ var Textarea = (_a) => {
5376
5386
  var _b = _a, {
5377
5387
  id: id2,
5378
5388
  name,
5379
- value,
5380
- isFocused,
5389
+ label,
5381
5390
  isError,
5382
- isReadonly,
5391
+ isRequired,
5383
5392
  isDisabled,
5384
- handleChange,
5385
- required,
5393
+ defaultValue,
5394
+ message,
5395
+ isShowCounter,
5396
+ maxLength,
5397
+ rows = 12,
5398
+ cols = 48,
5399
+ onChange,
5400
+ value: externalValue,
5386
5401
  placeholder,
5387
- className
5402
+ className,
5403
+ ref
5388
5404
  } = _b, rest = __objRest(_b, [
5389
5405
  "id",
5390
5406
  "name",
5391
- "value",
5392
- "isFocused",
5407
+ "label",
5393
5408
  "isError",
5394
- "isReadonly",
5409
+ "isRequired",
5395
5410
  "isDisabled",
5396
- "handleChange",
5397
- "required",
5411
+ "defaultValue",
5412
+ "message",
5413
+ "isShowCounter",
5414
+ "maxLength",
5415
+ "rows",
5416
+ "cols",
5417
+ "onChange",
5418
+ "value",
5398
5419
  "placeholder",
5399
- "className"
5420
+ "className",
5421
+ "ref"
5400
5422
  ]);
5401
- return /* @__PURE__ */ React.createElement(
5402
- "textarea",
5403
- __spreadValues({}, __spreadValues({
5423
+ const uniqueID = useId2();
5424
+ const [value, setValue] = useState4(externalValue || defaultValue || "");
5425
+ const handleOnchange = (e) => {
5426
+ const targetValue = e.currentTarget.value;
5427
+ typeof onChange === "function" && onChange(targetValue);
5428
+ setValue(targetValue);
5429
+ };
5430
+ const discriptionStyles = cn16("text-sm mt-1 block", { "text-gray-500": !isError }, { "text-red-500": isError });
5431
+ useEffect3(() => {
5432
+ if (externalValue !== void 0 && externalValue !== null) {
5433
+ setValue(externalValue);
5434
+ }
5435
+ }, [externalValue]);
5436
+ if (!id2)
5437
+ id2 = `ta-${uniqueID}`;
5438
+ return /* @__PURE__ */ React16.createElement("div", null, label && /* @__PURE__ */ React16.createElement(
5439
+ InputLabel_default2,
5440
+ {
5441
+ isPlaceholder: true,
5442
+ isActive: true,
5443
+ label,
5444
+ isRequired,
5404
5445
  id: id2,
5446
+ isError,
5447
+ isDisabled
5448
+ }
5449
+ ), /* @__PURE__ */ React16.createElement("div", null, /* @__PURE__ */ React16.createElement(
5450
+ "textarea",
5451
+ __spreadValues({
5452
+ ref,
5453
+ maxLength,
5454
+ onChange: handleOnchange,
5455
+ rows,
5405
5456
  name,
5406
- value,
5407
- onChange: (e) => {
5408
- handleChange(e.target.value);
5409
- },
5410
- autoFocus: isFocused,
5411
- readOnly: isReadonly,
5412
- disabled: isDisabled,
5413
- required,
5414
- placeholder: placeholder || " ",
5415
- "aria-invalid": isError,
5416
- "aria-disabled": isDisabled,
5457
+ id: id2,
5458
+ cols,
5417
5459
  className: cn16(
5418
- "peer w-full resize-y auto-resize rounded border border-gray-300 py-2 px-3 pt-2 text-sm font-normal leading-5 outline-offset-0 ring-offset-0 focus:border-purple-600 focus:ring-purple-600",
5419
- isError ? "border-red-600 text-red-600" : "",
5460
+ "block w-full rounded focus:border-purple-500 focus:ring-purple-500 sm:text-sm",
5461
+ { "border-gray-300 ": !isError },
5462
+ {
5463
+ "border-red-500 outline-red-500 focus:ring-red-500": isError
5464
+ },
5420
5465
  className
5421
- )
5422
- }, rest))
5423
- );
5466
+ ),
5467
+ disabled: isDisabled,
5468
+ defaultValue,
5469
+ value,
5470
+ placeholder
5471
+ }, rest)
5472
+ )), /* @__PURE__ */ React16.createElement("div", { className: "flex flex-row space-x-3" }, /* @__PURE__ */ React16.createElement("div", { className: "grow" }, message && /* @__PURE__ */ React16.createElement("span", { className: discriptionStyles }, message)), isShowCounter && /* @__PURE__ */ React16.createElement("div", { className: "shrink-0" }, /* @__PURE__ */ React16.createElement(InputCounter_default, { current: Number(value == null ? void 0 : value.length), limit: maxLength }))));
5424
5473
  };
5425
- var TextArea_default = TextAreaField;
5474
+ var TextArea_default = Textarea;
5426
5475
 
5427
5476
  // stories/molecules/inputs/textArea/index.ts
5428
5477
  var textArea_default = TextArea_default;
5429
5478
 
5430
5479
  // stories/molecules/inputs/TextInput/TextInput.tsx
5431
- import React16, { forwardRef, useEffect as useEffect3, useId as useId2, useRef, useState as useState4 } from "react";
5480
+ import React17, { forwardRef as forwardRef2, useEffect as useEffect4, useId as useId3, useRef, useState as useState5 } from "react";
5432
5481
  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
5482
  var TextInput = (_a, ref) => {
5443
5483
  var _b = _a, {
5444
5484
  label,
@@ -5477,16 +5517,16 @@ var TextInput = (_a, ref) => {
5477
5517
  "value",
5478
5518
  "className"
5479
5519
  ]);
5480
- const uniqueID = useId2();
5481
- const [isFocus, setIsFocus] = useState4(Boolean(isFocused));
5482
- const [value, setValue] = useState4(externalValue || defaultValue || "");
5520
+ const uniqueID = useId3();
5521
+ const [isFocus, setIsFocus] = useState5(Boolean(isFocused));
5522
+ const [value, setValue] = useState5(externalValue || defaultValue || "");
5483
5523
  const inputRef = useRef(null);
5484
- useEffect3(() => {
5524
+ useEffect4(() => {
5485
5525
  if (externalValue !== void 0 && externalValue !== null) {
5486
5526
  setValue(externalValue);
5487
5527
  }
5488
5528
  }, [externalValue]);
5489
- useEffect3(() => {
5529
+ useEffect4(() => {
5490
5530
  const input = inputRef.current;
5491
5531
  if (!input || isFocus === void 0 || isDisabled)
5492
5532
  return;
@@ -5496,7 +5536,7 @@ var TextInput = (_a, ref) => {
5496
5536
  input.blur();
5497
5537
  }
5498
5538
  }, [isFocus]);
5499
- useEffect3(() => {
5539
+ useEffect4(() => {
5500
5540
  const input = inputRef.current;
5501
5541
  if (!input || defaultValue === void 0 || defaultValue === "")
5502
5542
  return;
@@ -5507,7 +5547,7 @@ var TextInput = (_a, ref) => {
5507
5547
  id2 = `input-${uniqueID}`;
5508
5548
  if (!name)
5509
5549
  name = id2;
5510
- return /* @__PURE__ */ React16.createElement("div", { className: "relative" }, /* @__PURE__ */ React16.createElement(
5550
+ return /* @__PURE__ */ React17.createElement("div", { className: "relative" }, /* @__PURE__ */ React17.createElement(
5511
5551
  InputLabel_default2,
5512
5552
  {
5513
5553
  isPlaceholder: true,
@@ -5518,7 +5558,7 @@ var TextInput = (_a, ref) => {
5518
5558
  isActive: true,
5519
5559
  isDisabled
5520
5560
  }
5521
- ), /* @__PURE__ */ React16.createElement(
5561
+ ), /* @__PURE__ */ React17.createElement(
5522
5562
  InputField_default2,
5523
5563
  __spreadValues({
5524
5564
  onFocus: handleInputFocus,
@@ -5546,12 +5586,16 @@ var TextInput = (_a, ref) => {
5546
5586
  maxLength,
5547
5587
  placeholder
5548
5588
  }, 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 }))));
5589
+ ), /* @__PURE__ */ React17.createElement("div", { className: "flex flex-row space-x-3" }, /* @__PURE__ */ React17.createElement("div", { className: "grow" }, message && /* @__PURE__ */ React17.createElement("span", { className: cn17("mt-1 block text-sm", isError ? "text-red-500" : "text-gray-500") }, message)), isShowCounter && /* @__PURE__ */ React17.createElement("div", { className: "shrink-0" }, /* @__PURE__ */ React17.createElement(InputCounter_default, { current: Number(value == null ? void 0 : value.length), limit: maxLength }))));
5550
5590
  };
5551
- var _TextInput = forwardRef(TextInput);
5591
+ var _TextInput = forwardRef2(TextInput);
5592
+ var TextInput_default = _TextInput;
5593
+
5594
+ // stories/molecules/inputs/TextInput/index.tsx
5595
+ var TextInput_default2 = TextInput_default;
5552
5596
 
5553
5597
  // stories/molecules/inputs/toggleSwitch/ToggleSwitch.tsx
5554
- import React17, { useEffect as useEffect4, useState as useState5 } from "react";
5598
+ import React18, { useEffect as useEffect5, useState as useState6 } from "react";
5555
5599
  import { default as cn18 } from "classnames";
5556
5600
  import { Switch } from "@headlessui/react";
5557
5601
  var ToggleSwitch = ({
@@ -5564,9 +5608,9 @@ var ToggleSwitch = ({
5564
5608
  variant = "base",
5565
5609
  withIcon
5566
5610
  }) => {
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(
5611
+ const [checked, setChecked] = useState6(isChecked);
5612
+ useEffect5(() => setChecked(isChecked), [isChecked]);
5613
+ return /* @__PURE__ */ React18.createElement(Switch.Group, { as: "div", className: "flex items-center gap-2" }, label && label.xPosition === "left" && /* @__PURE__ */ React18.createElement(Switch.Label, { className: label.className }, label.text), /* @__PURE__ */ React18.createElement(
5570
5614
  Switch,
5571
5615
  {
5572
5616
  name,
@@ -5582,8 +5626,8 @@ var ToggleSwitch = ({
5582
5626
  "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"
5583
5627
  )
5584
5628
  },
5585
- /* @__PURE__ */ React17.createElement("span", { className: "sr-only" }, screenReaderLabel),
5586
- /* @__PURE__ */ React17.createElement(
5629
+ /* @__PURE__ */ React18.createElement("span", { className: "sr-only" }, screenReaderLabel),
5630
+ /* @__PURE__ */ React18.createElement(
5587
5631
  "span",
5588
5632
  {
5589
5633
  className: cn18(
@@ -5595,9 +5639,9 @@ var ToggleSwitch = ({
5595
5639
  " h-5 w-5 transform rounded-full bg-white transition shadow-sm drop-shadow flex items-center justify-center"
5596
5640
  )
5597
5641
  },
5598
- withIcon && /* @__PURE__ */ React17.createElement(DynamicIcon, __spreadProps(__spreadValues({}, withIcon), { className: "text-gray-400 m-[2px]" }))
5642
+ withIcon && /* @__PURE__ */ React18.createElement(DynamicIcon, __spreadProps(__spreadValues({}, withIcon), { className: "text-gray-400 m-[2px]" }))
5599
5643
  )
5600
- ), label && label.xPosition === "right" && /* @__PURE__ */ React17.createElement(Switch.Label, { className: label.className }, label.text));
5644
+ ), label && label.xPosition === "right" && /* @__PURE__ */ React18.createElement(Switch.Label, { className: label.className }, label.text));
5601
5645
  };
5602
5646
  var ToggleSwitch_default = ToggleSwitch;
5603
5647
 
@@ -5605,7 +5649,7 @@ var ToggleSwitch_default = ToggleSwitch;
5605
5649
  var toggleSwitch_default = ToggleSwitch_default;
5606
5650
 
5607
5651
  // stories/organisms/AnimatedLabelInput/AnimatedLabelInput.tsx
5608
- import React18 from "react";
5652
+ import React19 from "react";
5609
5653
  import { default as cn19 } from "classnames";
5610
5654
  var AnimatedLabelInput = ({
5611
5655
  id: id2,
@@ -5617,7 +5661,7 @@ var AnimatedLabelInput = ({
5617
5661
  isError,
5618
5662
  containerStyles
5619
5663
  }) => {
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(
5664
+ return /* @__PURE__ */ React19.createElement("div", { className: cn19("group relative", containerStyles ? containerStyles : "") }, input && /* @__PURE__ */ React19.createElement(InputField_default2, __spreadValues({ isError }, input)), textarea && /* @__PURE__ */ React19.createElement(TextArea_default, __spreadValues({ isError }, textarea)), /* @__PURE__ */ React19.createElement(
5621
5665
  "label",
5622
5666
  {
5623
5667
  className: cn19(
@@ -5628,8 +5672,8 @@ var AnimatedLabelInput = ({
5628
5672
  htmlFor: id2
5629
5673
  },
5630
5674
  label.display,
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))));
5675
+ required && /* @__PURE__ */ React19.createElement("span", { className: "text-red-600" }, "*")
5676
+ ), /* @__PURE__ */ React19.createElement("div", { className: "flex flex-row space-x-3" }, /* @__PURE__ */ React19.createElement("div", { className: "grow transition-all" }, message && /* @__PURE__ */ React19.createElement("span", { className: cn19("mt-1 block text-sm", isError ? "text-red-500" : "text-gray-500") }, message))));
5633
5677
  };
5634
5678
  var AnimatedLabelInput_default = AnimatedLabelInput;
5635
5679
 
@@ -5637,11 +5681,11 @@ var AnimatedLabelInput_default = AnimatedLabelInput;
5637
5681
  var AnimatedLabelInput_default2 = AnimatedLabelInput_default;
5638
5682
 
5639
5683
  // stories/organisms/ButtonDropdown/ButtonDropdown.tsx
5640
- import React20 from "react";
5684
+ import React21 from "react";
5641
5685
  import { default as cn21 } from "classnames";
5642
5686
 
5643
5687
  // stories/organisms/DropdownComponent/DropdownComponent.tsx
5644
- import React19, { Fragment, useState as useState6 } from "react";
5688
+ import React20, { Fragment, useState as useState7 } from "react";
5645
5689
  import { Transition } from "@headlessui/react";
5646
5690
  import { default as cn20 } from "classnames";
5647
5691
  import {
@@ -5684,8 +5728,8 @@ var Dropdown = (_a) => {
5684
5728
  "offsetOptions"
5685
5729
  ]);
5686
5730
  var _a2, _b2;
5687
- const [isOpen, setIsOpen] = useState6(false);
5688
- const [activeItem, setActiveItem] = useState6(null);
5731
+ const [isOpen, setIsOpen] = useState7(false);
5732
+ const [activeItem, setActiveItem] = useState7(null);
5689
5733
  const { refs, floatingStyles, context } = useFloating({
5690
5734
  open: isOpen,
5691
5735
  onOpenChange: setIsOpen,
@@ -5716,7 +5760,7 @@ var Dropdown = (_a) => {
5716
5760
  }
5717
5761
  });
5718
5762
  const { groupClassname, buttonClassname, itemsClassname, itemClassname, activeItemClassname } = classNames3;
5719
- return /* @__PURE__ */ React19.createElement(
5763
+ return /* @__PURE__ */ React20.createElement(
5720
5764
  "div",
5721
5765
  __spreadValues({}, __spreadValues({
5722
5766
  className: groupClassname,
@@ -5725,7 +5769,7 @@ var Dropdown = (_a) => {
5725
5769
  "aria-expanded": isOpen,
5726
5770
  "aria-haspopup": "listbox"
5727
5771
  }, props)),
5728
- /* @__PURE__ */ React19.createElement(
5772
+ /* @__PURE__ */ React20.createElement(
5729
5773
  "button",
5730
5774
  __spreadValues({}, __spreadValues({
5731
5775
  ref: refs.setReference,
@@ -5734,9 +5778,9 @@ var Dropdown = (_a) => {
5734
5778
  setIsOpen(!isOpen);
5735
5779
  }
5736
5780
  }, getReferenceProps())),
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 " }))
5781
+ CustomDropdownTrigger ? /* @__PURE__ */ React20.createElement("span", { className: "" }, CustomDropdownTrigger) : /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement("span", { className: "pl-1" }, label), /* @__PURE__ */ React20.createElement(DynamicIcon, { icon: "ChevronDownIcon", className: "ml-1 h-5 w-6 " }))
5738
5782
  ),
5739
- isMounted && items.length > 0 && isOpen && /* @__PURE__ */ React19.createElement(FloatingPortal, null, /* @__PURE__ */ React19.createElement(FloatingFocusManager, { context, modal: true }, /* @__PURE__ */ React19.createElement(
5783
+ isMounted && items.length > 0 && isOpen && /* @__PURE__ */ React20.createElement(FloatingPortal, null, /* @__PURE__ */ React20.createElement(FloatingFocusManager, { context, modal: true }, /* @__PURE__ */ React20.createElement(
5740
5784
  Transition,
5741
5785
  {
5742
5786
  as: Fragment,
@@ -5748,7 +5792,7 @@ var Dropdown = (_a) => {
5748
5792
  leaveFrom: "transform opacity-100 scale-100",
5749
5793
  leaveTo: "transform opacity-0 scale-95"
5750
5794
  },
5751
- /* @__PURE__ */ React19.createElement(
5795
+ /* @__PURE__ */ React20.createElement(
5752
5796
  "ul",
5753
5797
  __spreadValues(__spreadProps(__spreadValues({}, __spreadProps(__spreadValues({}, getFloatingProps()), {
5754
5798
  className: itemsClassname,
@@ -5770,7 +5814,7 @@ var Dropdown = (_a) => {
5770
5814
  "aria-labelledby": label
5771
5815
  }), getFloatingProps()),
5772
5816
  items.map((itemStack, idx) => {
5773
- return /* @__PURE__ */ React19.createElement(React19.Fragment, { key: `${idx}-list-${id2}` }, itemStack.map(
5817
+ return /* @__PURE__ */ React20.createElement(React20.Fragment, { key: `${idx}-list-${id2}` }, itemStack.map(
5774
5818
  (_a3) => {
5775
5819
  var _b3 = _a3, {
5776
5820
  onClick,
@@ -5806,7 +5850,7 @@ var Dropdown = (_a) => {
5806
5850
  },
5807
5851
  itemClassname
5808
5852
  );
5809
- return /* @__PURE__ */ React19.createElement("li", { key }, /* @__PURE__ */ React19.createElement(
5853
+ return /* @__PURE__ */ React20.createElement("li", { key }, /* @__PURE__ */ React20.createElement(
5810
5854
  "button",
5811
5855
  __spreadValues({}, __spreadValues({
5812
5856
  onClick: () => {
@@ -5816,7 +5860,7 @@ var Dropdown = (_a) => {
5816
5860
  key,
5817
5861
  className: cn20(itemClass, "w-full")
5818
5862
  }, rest)),
5819
- /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-x-4" }, icon && (iconPosition === "leading" || iconPosition === void 0) && (typeof icon === "string" ? /* @__PURE__ */ React19.createElement(
5863
+ /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-x-4" }, icon && (iconPosition === "leading" || iconPosition === void 0) && (typeof icon === "string" ? /* @__PURE__ */ React20.createElement(
5820
5864
  DynamicIcon,
5821
5865
  __spreadValues({}, {
5822
5866
  icon,
@@ -5827,7 +5871,7 @@ var Dropdown = (_a) => {
5827
5871
  "opacity-60 group"
5828
5872
  )
5829
5873
  })
5830
- ) : /* @__PURE__ */ React19.createElement(
5874
+ ) : /* @__PURE__ */ React20.createElement(
5831
5875
  DynamicIcon,
5832
5876
  __spreadValues({}, __spreadProps(__spreadValues({}, icon), {
5833
5877
  className: cn20(
@@ -5838,7 +5882,7 @@ var Dropdown = (_a) => {
5838
5882
  "opacity-60 group"
5839
5883
  )
5840
5884
  }))
5841
- )), /* @__PURE__ */ React19.createElement("div", { className: "whitespace-nowrap" }, label2), icon && iconPosition === "trailing" && (typeof icon === "string" ? /* @__PURE__ */ React19.createElement(
5885
+ )), /* @__PURE__ */ React20.createElement("div", { className: "whitespace-nowrap" }, label2), icon && iconPosition === "trailing" && (typeof icon === "string" ? /* @__PURE__ */ React20.createElement(
5842
5886
  DynamicIcon,
5843
5887
  __spreadValues({}, {
5844
5888
  icon,
@@ -5849,7 +5893,7 @@ var Dropdown = (_a) => {
5849
5893
  "opacity-60 group"
5850
5894
  )
5851
5895
  })
5852
- ) : /* @__PURE__ */ React19.createElement(
5896
+ ) : /* @__PURE__ */ React20.createElement(
5853
5897
  DynamicIcon,
5854
5898
  __spreadValues({}, __spreadProps(__spreadValues({}, icon), {
5855
5899
  className: cn20(
@@ -5884,7 +5928,7 @@ var ButtonDropdown = ({ button, dropDown, placement, offsetOptions }) => {
5884
5928
  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" : ""
5885
5929
  )
5886
5930
  });
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(
5931
+ return /* @__PURE__ */ React21.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__ */ React21.createElement(
5888
5932
  Button_default2,
5889
5933
  __spreadValues({}, __spreadProps(__spreadValues({}, button), {
5890
5934
  className: cn21(
@@ -5892,7 +5936,7 @@ var ButtonDropdown = ({ button, dropDown, placement, offsetOptions }) => {
5892
5936
  "!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"
5893
5937
  )
5894
5938
  }))
5895
- ), /* @__PURE__ */ React20.createElement(
5939
+ ), /* @__PURE__ */ React21.createElement(
5896
5940
  "div",
5897
5941
  {
5898
5942
  className: cn21(
@@ -5902,10 +5946,10 @@ var ButtonDropdown = ({ button, dropDown, placement, offsetOptions }) => {
5902
5946
  button.actionType === "alternative" ? "bg-gray-300" : ""
5903
5947
  )
5904
5948
  }
5905
- ), /* @__PURE__ */ React20.createElement(
5949
+ ), /* @__PURE__ */ React21.createElement(
5906
5950
  DropdownComponent_default2,
5907
5951
  __spreadValues({}, __spreadProps(__spreadValues({}, dropDown), {
5908
- CustomDropdownTrigger: /* @__PURE__ */ React20.createElement(
5952
+ CustomDropdownTrigger: /* @__PURE__ */ React21.createElement(
5909
5953
  DynamicIcon,
5910
5954
  __spreadValues({}, {
5911
5955
  icon: "ChevronDownIcon",
@@ -5926,7 +5970,7 @@ var ButtonDropdown = ({ button, dropDown, placement, offsetOptions }) => {
5926
5970
  },
5927
5971
  placement
5928
5972
  }))
5929
- ), /* @__PURE__ */ React20.createElement("div", { className: "hidden !bg-purple-100 !text-purple-600 transition-all hover:bg-purple-200 focus:bg-purple-300" }));
5973
+ ), /* @__PURE__ */ React21.createElement("div", { className: "hidden !bg-purple-100 !text-purple-600 transition-all hover:bg-purple-200 focus:bg-purple-300" }));
5930
5974
  };
5931
5975
  var ButtonDropdown_default = ButtonDropdown;
5932
5976
 
@@ -5934,7 +5978,7 @@ var ButtonDropdown_default = ButtonDropdown;
5934
5978
  var ButtonDropdown_default2 = ButtonDropdown_default;
5935
5979
 
5936
5980
  // stories/organisms/EmptySectionPlaceholder/EmptySectionPlaceholder.tsx
5937
- import React21 from "react";
5981
+ import React22 from "react";
5938
5982
  import { default as cn22 } from "classnames";
5939
5983
  var EmptySectionPlaceholder = ({
5940
5984
  icon,
@@ -5944,7 +5988,7 @@ var EmptySectionPlaceholder = ({
5944
5988
  actions,
5945
5989
  isWide
5946
5990
  }) => {
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));
5991
+ return /* @__PURE__ */ React22.createElement("div", { className: "flex h-full w-full flex-col items-center justify-center border-2 border-dashed border-gray-300 p-5" }, /* @__PURE__ */ React22.createElement(IconWithShadow_default, __spreadValues({}, icon)), mutedText && /* @__PURE__ */ React22.createElement("p", { className: "my-2 block text-xs text-gray-500" }, mutedText), CallToActionComponent ? CallToActionComponent : /* @__PURE__ */ React22.createElement("p", { className: "mb-2 block text-sm font-medium text-gray-600" }, primaryMessage), actions.length > 0 ? /* @__PURE__ */ React22.createElement("div", { className: cn22("mt-2 flex gap-2", isWide ? "" : "flex-col items-center") }, actions.map((action, index) => /* @__PURE__ */ React22.createElement(Button_default2, __spreadProps(__spreadValues({}, __spreadValues({}, action)), { key: action.label.replaceAll(" ", "-") })))) : /* @__PURE__ */ React22.createElement(React22.Fragment, null));
5948
5992
  };
5949
5993
  var EmptySectionPlaceholder_default = EmptySectionPlaceholder;
5950
5994
 
@@ -5952,7 +5996,7 @@ var EmptySectionPlaceholder_default = EmptySectionPlaceholder;
5952
5996
  var EmptySectionPlaceholder_default2 = EmptySectionPlaceholder_default;
5953
5997
 
5954
5998
  // stories/organisms/FormInputWithAddons/FormInputWithAddons.tsx
5955
- import React22, { useLayoutEffect as useLayoutEffect2, useRef as useRef2, useState as useState7 } from "react";
5999
+ import React23, { useLayoutEffect as useLayoutEffect2, useRef as useRef2, useState as useState8 } from "react";
5956
6000
  import { default as cn23 } from "classnames";
5957
6001
  var FormInputWithAddons = (_a) => {
5958
6002
  var _b = _a, {
@@ -6004,14 +6048,14 @@ var FormInputWithAddons = (_a) => {
6004
6048
  ]);
6005
6049
  const leadLabelRef = useRef2(null);
6006
6050
  const trailLabelRef = useRef2(null);
6007
- const [leadLabelWidth, setLeadLabelWidth] = useState7(0);
6008
- const [trailLabelWidth, setTrailLabelWidth] = useState7(0);
6051
+ const [leadLabelWidth, setLeadLabelWidth] = useState8(0);
6052
+ const [trailLabelWidth, setTrailLabelWidth] = useState8(0);
6009
6053
  useLayoutEffect2(() => {
6010
6054
  var _a2, _b2;
6011
6055
  setLeadLabelWidth(((_a2 = leadLabelRef.current) == null ? void 0 : _a2.clientWidth) || 0);
6012
6056
  setTrailLabelWidth(((_b2 = trailLabelRef.current) == null ? void 0 : _b2.clientWidth) || 0);
6013
6057
  }, []);
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(
6058
+ return /* @__PURE__ */ React23.createElement("div", { className: cn23("group flex flex-col", containerClassName) }, !leadLabel && !trailLabel && topLabel && /* @__PURE__ */ React23.createElement("label", { htmlFor: id2, className: cn23("flex items-center text-sm font-medium text-gray-600", labelClass) }, topLabel), description && /* @__PURE__ */ React23.createElement("div", { className: "mb-2 text-sm text-gray-500" }, description), /* @__PURE__ */ React23.createElement("div", { className: "relative flex-grow" }, (leadLabel || leadIcon) && /* @__PURE__ */ React23.createElement(
6015
6059
  "label",
6016
6060
  {
6017
6061
  ref: leadLabelRef,
@@ -6021,7 +6065,7 @@ var FormInputWithAddons = (_a) => {
6021
6065
  labelClass
6022
6066
  )
6023
6067
  },
6024
- leadIcon && /* @__PURE__ */ React22.createElement("span", null, /* @__PURE__ */ React22.createElement(
6068
+ leadIcon && /* @__PURE__ */ React23.createElement("span", null, /* @__PURE__ */ React23.createElement(
6025
6069
  DynamicIcon,
6026
6070
  __spreadValues({}, __spreadProps(__spreadValues({}, leadIcon), {
6027
6071
  className: cn23("h-5 w-5 text-gray-400", leadIconClassNames, customIconClass),
@@ -6029,7 +6073,7 @@ var FormInputWithAddons = (_a) => {
6029
6073
  }))
6030
6074
  )),
6031
6075
  leadLabel && leadLabel
6032
- ), /* @__PURE__ */ React22.createElement(
6076
+ ), /* @__PURE__ */ React23.createElement(
6033
6077
  InputField_default2,
6034
6078
  __spreadValues({}, __spreadProps(__spreadValues({}, rest), {
6035
6079
  handleChange,
@@ -6049,7 +6093,7 @@ var FormInputWithAddons = (_a) => {
6049
6093
  paddingLeft: `${leadLabelWidth + addonOffset}px`
6050
6094
  }
6051
6095
  }))
6052
- ), (trailLabel || trailIcon) && /* @__PURE__ */ React22.createElement(
6096
+ ), (trailLabel || trailIcon) && /* @__PURE__ */ React23.createElement(
6053
6097
  "label",
6054
6098
  {
6055
6099
  ref: trailLabelRef,
@@ -6059,7 +6103,7 @@ var FormInputWithAddons = (_a) => {
6059
6103
  labelClass
6060
6104
  )
6061
6105
  },
6062
- trailIcon && /* @__PURE__ */ React22.createElement("span", null, /* @__PURE__ */ React22.createElement(
6106
+ trailIcon && /* @__PURE__ */ React23.createElement("span", null, /* @__PURE__ */ React23.createElement(
6063
6107
  DynamicIcon,
6064
6108
  __spreadValues({}, __spreadProps(__spreadValues({}, trailIcon), {
6065
6109
  className: cn23("h-5 w-5 text-gray-400", customIconClass),
@@ -6094,7 +6138,8 @@ export {
6094
6138
  NProgress_default as RadialProgress,
6095
6139
  radio_default as Radio,
6096
6140
  select_default as Select,
6097
- textArea_default as TextAreaField,
6141
+ TextInput_default2 as TextInput,
6142
+ textArea_default as Textarea,
6098
6143
  toggleSwitch_default as ToggleSwitch,
6099
6144
  isFAIcon,
6100
6145
  isHeroIcon,