@sikka/hawa 0.1.105 → 0.1.107

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.mts CHANGED
@@ -120,6 +120,8 @@ type SelectTypes = {
120
120
  children?: any;
121
121
  getOptionLabel?: any;
122
122
  disabled?: boolean;
123
+ defaultValue?: any;
124
+ isLoading?: any;
123
125
  };
124
126
  declare const HawaSelect: FC<SelectTypes>;
125
127
 
package/dist/index.d.ts CHANGED
@@ -120,6 +120,8 @@ type SelectTypes = {
120
120
  children?: any;
121
121
  getOptionLabel?: any;
122
122
  disabled?: boolean;
123
+ defaultValue?: any;
124
+ isLoading?: any;
123
125
  };
124
126
  declare const HawaSelect: FC<SelectTypes>;
125
127
 
package/dist/index.js CHANGED
@@ -636,7 +636,7 @@ var Menu = function(_param) {
636
636
  "innerRef"
637
637
  ]);
638
638
  return /* @__PURE__ */ React6.default.createElement("div", _object_spread({
639
- className: "absolute z-10 mt-2 flex w-full flex-col justify-start rounded border bg-background p-1 px-1.5",
639
+ className: "absolute z-10 mt-2 flex w-full flex-col justify-start rounded border bg-background p-1.5",
640
640
  ref: innerRef
641
641
  }, innerProps), children);
642
642
  };
@@ -657,10 +657,14 @@ var Option = function(_param) /* @__PURE__ */ {
657
657
  var HawaSelect = function(props) {
658
658
  return /* @__PURE__ */ React6.default.createElement("div", {
659
659
  className: " flex w-full flex-col gap-2"
660
- }, props.label && /* @__PURE__ */ React6.default.createElement(Label, null, props.label), !props.isCreatable && /* @__PURE__ */ React6.default.createElement(_reactselect2.default, {
660
+ }, props.label && /* @__PURE__ */ React6.default.createElement(Label, null, props.label), props.isLoading ? /* @__PURE__ */ React6.default.createElement(Skeleton, {
661
+ className: "h-[38px] w-full"
662
+ }) : !props.isCreatable ? /* @__PURE__ */ React6.default.createElement(_reactselect2.default, {
661
663
  classNames: {
662
664
  // control: () => "bg-blue-500 w-full",
663
- // container: () => "bg-red-500 w-full",
665
+ container: function() {
666
+ return cn("rounded", props.disabled ? "cursor-not-allowed" : "cursor-pointer");
667
+ },
664
668
  placeholder: function() {
665
669
  return "px-2 text-muted-foreground";
666
670
  },
@@ -680,6 +684,7 @@ var HawaSelect = function(props) {
680
684
  unstyled: true,
681
685
  isDisabled: props.disabled,
682
686
  options: props.options,
687
+ defaultValue: props.defaultValue,
683
688
  isClearable: props.isClearable,
684
689
  isMulti: props.isMulti,
685
690
  isSearchable: props.isSearchable,
@@ -693,7 +698,7 @@ var HawaSelect = function(props) {
693
698
  Menu: Menu
694
699
  },
695
700
  getOptionLabel: props.getOptionLabel
696
- }), props.isCreatable && /* @__PURE__ */ React6.default.createElement(_creatable2.default, {
701
+ }) : /* @__PURE__ */ React6.default.createElement(_creatable2.default, {
697
702
  styles: {
698
703
  input: function(base) {
699
704
  return _object_spread_props(_object_spread({}, base), {