@sikka/hawa 0.46.4-next → 0.48.0-next

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.
Files changed (55) hide show
  1. package/dist/{Radio-Dyvlywnk.d.mts → Radio-BPHTeDMz.d.mts} +8 -7
  2. package/dist/{Radio-DlPwVCG4.d.ts → Radio-cRcIH8_L.d.ts} +8 -7
  3. package/dist/blocks/auth/index.d.mts +34 -17
  4. package/dist/blocks/auth/index.d.ts +34 -17
  5. package/dist/blocks/auth/index.js +1008 -430
  6. package/dist/blocks/auth/index.mjs +427 -297
  7. package/dist/blocks/feedback/index.d.mts +1 -1
  8. package/dist/blocks/feedback/index.d.ts +1 -1
  9. package/dist/blocks/feedback/index.js +68 -79
  10. package/dist/blocks/feedback/index.mjs +1 -1
  11. package/dist/blocks/index.d.mts +28 -11
  12. package/dist/blocks/index.d.ts +28 -11
  13. package/dist/blocks/index.js +2340 -2233
  14. package/dist/blocks/index.mjs +407 -269
  15. package/dist/blocks/misc/index.d.mts +1 -1
  16. package/dist/blocks/misc/index.d.ts +1 -1
  17. package/dist/blocks/misc/index.js +68 -79
  18. package/dist/blocks/misc/index.mjs +50 -367
  19. package/dist/blocks/pricing/index.d.mts +1 -1
  20. package/dist/blocks/pricing/index.d.ts +1 -1
  21. package/dist/blocks/pricing/index.mjs +1 -1
  22. package/dist/{chunk-6TG2PHZK.mjs → chunk-AWJSHOYU.mjs} +68 -79
  23. package/dist/{chunk-5CTMGPEF.mjs → chunk-GBLWUEYN.mjs} +650 -674
  24. package/dist/chunk-JFWD2ICY.mjs +511 -0
  25. package/dist/elements/index.d.mts +2 -2
  26. package/dist/elements/index.d.ts +2 -2
  27. package/dist/elements/index.js +81 -105
  28. package/dist/elements/index.mjs +1 -1
  29. package/dist/index.css +7 -0
  30. package/dist/index.d.mts +36 -17
  31. package/dist/index.d.ts +36 -17
  32. package/dist/index.js +482 -373
  33. package/dist/index.mjs +487 -373
  34. package/dist/phoneInput/index.d.mts +7 -7
  35. package/dist/phoneInput/index.d.ts +7 -7
  36. package/dist/phoneInput/index.js +78 -85
  37. package/dist/phoneInput/index.js.map +1 -1
  38. package/dist/phoneInput/index.mjs +78 -85
  39. package/dist/phoneInput/index.mjs.map +1 -1
  40. package/dist/pinInput/index.js +3 -20
  41. package/dist/pinInput/index.js.map +1 -1
  42. package/dist/pinInput/index.mjs +3 -20
  43. package/dist/pinInput/index.mjs.map +1 -1
  44. package/dist/select/index.d.mts +1 -0
  45. package/dist/select/index.d.ts +1 -0
  46. package/dist/select/index.js +68 -79
  47. package/dist/select/index.js.map +1 -1
  48. package/dist/select/index.mjs +68 -79
  49. package/dist/select/index.mjs.map +1 -1
  50. package/dist/{textTypes-DXLtO2fL.d.mts → textTypes-CYQYIsFt.d.mts} +1 -0
  51. package/dist/{textTypes-DXLtO2fL.d.ts → textTypes-CYQYIsFt.d.ts} +1 -0
  52. package/dist/types/index.d.mts +1 -0
  53. package/dist/types/index.d.ts +1 -0
  54. package/package.json +1 -1
  55. package/dist/chunk-EOH6A3GR.mjs +0 -183
@@ -14,6 +14,7 @@ import clsx from "clsx";
14
14
  var Select = ({
15
15
  labelProps,
16
16
  labelKey = "label",
17
+ valueKey = "value",
17
18
  ...props
18
19
  }) => {
19
20
  const NoOption = () => {
@@ -33,13 +34,7 @@ var Select = ({
33
34
  children
34
35
  );
35
36
  };
36
- const Option = ({
37
- children,
38
- innerProps,
39
- innerRef,
40
- isFocused,
41
- isSelected
42
- }) => {
37
+ const Option = ({ children, innerProps, innerRef, isFocused, isSelected }) => {
43
38
  return /* @__PURE__ */ React.createElement(
44
39
  "div",
45
40
  {
@@ -54,14 +49,7 @@ var Select = ({
54
49
  children
55
50
  );
56
51
  };
57
- const Menu = ({
58
- cx,
59
- children,
60
- getStyles,
61
- innerProps,
62
- innerRef,
63
- ...menuProps
64
- }) => {
52
+ const Menu = ({ cx, children, getStyles, innerProps, innerRef, ...menuProps }) => {
65
53
  const menuOpen = menuProps.selectProps.menuIsOpen;
66
54
  return /* @__PURE__ */ React.createElement(
67
55
  "div",
@@ -90,71 +78,72 @@ var Select = ({
90
78
  )
91
79
  },
92
80
  props.label && /* @__PURE__ */ React.createElement(Label, { ...labelProps }, props.label),
93
- props.isLoading ? /* @__PURE__ */ React.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
94
- // TODO: enable keyboard to go to the next item in the list
95
- /* @__PURE__ */ React.createElement(
96
- ReactSelect,
97
- {
98
- noOptionsMessage: NoOption,
99
- classNames: {
100
- control: () => cn(
101
- props.phoneCode && "hawa-rounded-r-none",
102
- props.controlClassNames
103
- ),
104
- container: () => cn(
105
- selectContainerStyles,
106
- props.phoneCode && phoneCodeStyles,
107
- props.isMulti && "hawa-ps-0 "
108
- ),
109
- placeholder: () => cn(
110
- selectPlaceholderStyles,
111
- props.disabled && "hawa-text-muted-foreground"
112
- ),
113
- valueContainer: () => "hawa-text-foreground hawa-px-1 ",
114
- singleValue: () => cn(
115
- props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
116
- ),
117
- indicatorsContainer: () => cn(
118
- selectIndicatorContainerStyles,
119
- props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
120
- props.disabled && "hawa-opacity-30"
121
- )
122
- },
123
- unstyled: true,
124
- autoFocus: false,
125
- components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : {
81
+ props.isLoading ? /* @__PURE__ */ React.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? /* @__PURE__ */ React.createElement(
82
+ ReactSelect,
83
+ {
84
+ noOptionsMessage: NoOption,
85
+ classNames: {
86
+ control: () => cn(props.phoneCode && "hawa-rounded-r-none", props.controlClassNames),
87
+ container: () => cn(
88
+ selectContainerStyles,
89
+ props.phoneCode && phoneCodeStyles,
90
+ props.isMulti && "hawa-ps-0 "
91
+ ),
92
+ placeholder: () => cn(selectPlaceholderStyles, props.disabled && "hawa-text-muted-foreground"),
93
+ valueContainer: () => "hawa-text-foreground hawa-px-1",
94
+ singleValue: () => cn(
95
+ props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
96
+ ),
97
+ indicatorsContainer: () => cn(
98
+ selectIndicatorContainerStyles,
99
+ props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
100
+ props.disabled && "hawa-opacity-30"
101
+ )
102
+ },
103
+ unstyled: true,
104
+ autoFocus: false,
105
+ components: props.hideIndicator ? {
106
+ Option: (optionProps) => /* @__PURE__ */ React.createElement(
126
107
  Option,
127
- Menu,
128
- ValueContainer: (e) => /* @__PURE__ */ React.createElement(
129
- "div",
130
- {
131
- className: cn(
132
- e.className,
133
- "hawa-gap-1 hawa-flex hawa-flex-row hawa-flex-wrap hawa-p-1"
134
- ),
135
- ...e
136
- }
137
- ),
138
- MultiValueContainer: (e) => /* @__PURE__ */ React.createElement(
139
- "div",
140
- {
141
- className: "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row",
142
- ...e
143
- }
144
- )
145
- },
146
- onChange: (newValue, action) => props.onChange(newValue, action),
147
- options: props.options,
148
- getOptionLabel: props.getOptionLabel,
149
- defaultValue: props.defaultValue,
150
- value: props.value,
151
- placeholder: props.placeholder,
152
- isDisabled: props.disabled,
153
- isClearable: props.isClearable,
154
- isMulti: props.isMulti,
155
- isSearchable: props.isSearchable
156
- }
157
- )
108
+ {
109
+ ...optionProps,
110
+ isSelected: optionProps.data[valueKey] === props.value[valueKey]
111
+ }
112
+ ),
113
+ Menu,
114
+ IndicatorsContainer: () => null
115
+ } : {
116
+ Option,
117
+ Menu,
118
+ ValueContainer: (e) => /* @__PURE__ */ React.createElement(
119
+ "div",
120
+ {
121
+ className: cn(
122
+ e.className,
123
+ "hawa-gap-1 hawa-flex hawa-flex-row hawa-flex-wrap hawa-p-2 hawa-w-full hawa-cursor-pointer"
124
+ ),
125
+ ...e
126
+ }
127
+ ),
128
+ MultiValueContainer: (e) => /* @__PURE__ */ React.createElement(
129
+ "div",
130
+ {
131
+ className: "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row",
132
+ ...e
133
+ }
134
+ )
135
+ },
136
+ onChange: (newValue, action) => props.onChange(newValue, action),
137
+ options: props.options,
138
+ getOptionLabel: props.getOptionLabel,
139
+ defaultValue: props.defaultValue,
140
+ value: props.value,
141
+ placeholder: props.placeholder,
142
+ isDisabled: props.disabled,
143
+ isClearable: props.isClearable,
144
+ isMulti: props.isMulti,
145
+ isSearchable: props.isSearchable
146
+ }
158
147
  ) : /* @__PURE__ */ React.createElement(
159
148
  CreatableSelect,
160
149
  {