@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.
- package/dist/{Radio-Dyvlywnk.d.mts → Radio-BPHTeDMz.d.mts} +8 -7
- package/dist/{Radio-DlPwVCG4.d.ts → Radio-cRcIH8_L.d.ts} +8 -7
- package/dist/blocks/auth/index.d.mts +34 -17
- package/dist/blocks/auth/index.d.ts +34 -17
- package/dist/blocks/auth/index.js +1008 -430
- package/dist/blocks/auth/index.mjs +427 -297
- package/dist/blocks/feedback/index.d.mts +1 -1
- package/dist/blocks/feedback/index.d.ts +1 -1
- package/dist/blocks/feedback/index.js +68 -79
- package/dist/blocks/feedback/index.mjs +1 -1
- package/dist/blocks/index.d.mts +28 -11
- package/dist/blocks/index.d.ts +28 -11
- package/dist/blocks/index.js +2340 -2233
- package/dist/blocks/index.mjs +407 -269
- package/dist/blocks/misc/index.d.mts +1 -1
- package/dist/blocks/misc/index.d.ts +1 -1
- package/dist/blocks/misc/index.js +68 -79
- package/dist/blocks/misc/index.mjs +50 -367
- package/dist/blocks/pricing/index.d.mts +1 -1
- package/dist/blocks/pricing/index.d.ts +1 -1
- package/dist/blocks/pricing/index.mjs +1 -1
- package/dist/{chunk-6TG2PHZK.mjs → chunk-AWJSHOYU.mjs} +68 -79
- package/dist/{chunk-5CTMGPEF.mjs → chunk-GBLWUEYN.mjs} +650 -674
- package/dist/chunk-JFWD2ICY.mjs +511 -0
- package/dist/elements/index.d.mts +2 -2
- package/dist/elements/index.d.ts +2 -2
- package/dist/elements/index.js +81 -105
- package/dist/elements/index.mjs +1 -1
- package/dist/index.css +7 -0
- package/dist/index.d.mts +36 -17
- package/dist/index.d.ts +36 -17
- package/dist/index.js +482 -373
- package/dist/index.mjs +487 -373
- package/dist/phoneInput/index.d.mts +7 -7
- package/dist/phoneInput/index.d.ts +7 -7
- package/dist/phoneInput/index.js +78 -85
- package/dist/phoneInput/index.js.map +1 -1
- package/dist/phoneInput/index.mjs +78 -85
- package/dist/phoneInput/index.mjs.map +1 -1
- package/dist/pinInput/index.js +3 -20
- package/dist/pinInput/index.js.map +1 -1
- package/dist/pinInput/index.mjs +3 -20
- package/dist/pinInput/index.mjs.map +1 -1
- package/dist/select/index.d.mts +1 -0
- package/dist/select/index.d.ts +1 -0
- package/dist/select/index.js +68 -79
- package/dist/select/index.js.map +1 -1
- package/dist/select/index.mjs +68 -79
- package/dist/select/index.mjs.map +1 -1
- package/dist/{textTypes-DXLtO2fL.d.mts → textTypes-CYQYIsFt.d.mts} +1 -0
- package/dist/{textTypes-DXLtO2fL.d.ts → textTypes-CYQYIsFt.d.ts} +1 -0
- package/dist/types/index.d.mts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
- 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
|
-
|
95
|
-
|
96
|
-
|
97
|
-
{
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
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
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
className
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
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
|
{
|