@sikka/hawa 0.26.28 → 0.26.29
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/tooltip/index.js +1 -0
- package/dist/tooltip/index.js.map +1 -0
- package/dist/tooltip/index.mjs +1 -0
- package/dist/tooltip/index.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/Chip-H5BnuDdx.d.ts +0 -36
- package/dist/Chip-hr2gRBJ-.d.mts +0 -36
- package/dist/DropdownMenu-EUL-D3I3.d.mts +0 -95
- package/dist/DropdownMenu-SPisqCzV.d.ts +0 -95
- package/dist/Radio-K1WGpnGA.d.ts +0 -75
- package/dist/Radio-hsrLKNxE.d.mts +0 -75
- package/dist/Toast-VBd4UvlM.d.mts +0 -26
- package/dist/Toast-pOd4uGZz.d.ts +0 -26
- package/dist/accordion/index.d.mts +0 -51
- package/dist/accordion/index.d.ts +0 -51
- package/dist/accordion/index.js +0 -271
- package/dist/accordion/index.mjs +0 -227
- package/dist/alert/index.d.mts +0 -29
- package/dist/alert/index.d.ts +0 -29
- package/dist/alert/index.js +0 -442
- package/dist/alert/index.mjs +0 -402
- package/dist/appLayout/index.d.mts +0 -126
- package/dist/appLayout/index.d.ts +0 -126
- package/dist/appLayout/index.js +0 -1326
- package/dist/appLayout/index.mjs +0 -1286
- package/dist/appMenubar/index.d.mts +0 -33
- package/dist/appMenubar/index.d.ts +0 -33
- package/dist/appMenubar/index.js +0 -281
- package/dist/appMenubar/index.mjs +0 -224
- package/dist/appStores/index.d.mts +0 -8
- package/dist/appStores/index.d.ts +0 -8
- package/dist/appStores/index.js +0 -75
- package/dist/appStores/index.mjs +0 -38
- package/dist/appTabs/index.d.mts +0 -18
- package/dist/appTabs/index.d.ts +0 -18
- package/dist/appTabs/index.js +0 -92
- package/dist/appTabs/index.mjs +0 -50
- package/dist/appTopbar/index.d.mts +0 -44
- package/dist/appTopbar/index.d.ts +0 -44
- package/dist/appTopbar/index.js +0 -483
- package/dist/appTopbar/index.mjs +0 -441
- package/dist/avatar/index.d.mts +0 -16
- package/dist/avatar/index.d.ts +0 -16
- package/dist/avatar/index.js +0 -162
- package/dist/avatar/index.mjs +0 -122
- package/dist/backToTop/index.d.mts +0 -15
- package/dist/backToTop/index.d.ts +0 -15
- package/dist/backToTop/index.js +0 -398
- package/dist/backToTop/index.mjs +0 -358
- package/dist/badge/index.d.mts +0 -13
- package/dist/badge/index.d.ts +0 -13
- package/dist/badge/index.js +0 -127
- package/dist/badge/index.mjs +0 -84
- package/dist/blocks/auth/index.d.mts +0 -202
- package/dist/blocks/auth/index.d.ts +0 -202
- package/dist/blocks/auth/index.js +0 -4197
- package/dist/blocks/auth/index.mjs +0 -3389
- package/dist/blocks/feedback/index.d.mts +0 -74
- package/dist/blocks/feedback/index.d.ts +0 -74
- package/dist/blocks/feedback/index.js +0 -1544
- package/dist/blocks/feedback/index.mjs +0 -558
- package/dist/blocks/index.d.mts +0 -480
- package/dist/blocks/index.d.ts +0 -480
- package/dist/blocks/index.js +0 -6700
- package/dist/blocks/index.mjs +0 -2550
- package/dist/blocks/misc/index.d.mts +0 -90
- package/dist/blocks/misc/index.d.ts +0 -90
- package/dist/blocks/misc/index.js +0 -1186
- package/dist/blocks/misc/index.mjs +0 -387
- package/dist/blocks/pricing/index.d.mts +0 -93
- package/dist/blocks/pricing/index.d.ts +0 -93
- package/dist/blocks/pricing/index.js +0 -1528
- package/dist/blocks/pricing/index.mjs +0 -677
- package/dist/breadcrumb/index.d.mts +0 -14
- package/dist/breadcrumb/index.d.ts +0 -14
- package/dist/breadcrumb/index.js +0 -63
- package/dist/breadcrumb/index.mjs +0 -26
- package/dist/button/index.d.mts +0 -16
- package/dist/button/index.d.ts +0 -16
- package/dist/button/index.js +0 -301
- package/dist/button/index.mjs +0 -260
- package/dist/card/index.d.mts +0 -17
- package/dist/card/index.d.ts +0 -17
- package/dist/card/index.js +0 -139
- package/dist/card/index.mjs +0 -92
- package/dist/carousel/index.d.mts +0 -15
- package/dist/carousel/index.d.ts +0 -15
- package/dist/carousel/index.js +0 -193
- package/dist/carousel/index.mjs +0 -151
- package/dist/checkbox/index.d.mts +0 -20
- package/dist/checkbox/index.d.ts +0 -20
- package/dist/checkbox/index.js +0 -184
- package/dist/checkbox/index.mjs +0 -142
- package/dist/chip/index.d.mts +0 -36
- package/dist/chip/index.d.ts +0 -36
- package/dist/chip/index.js +0 -129
- package/dist/chip/index.mjs +0 -87
- package/dist/chunk-2R7F2GL7.mjs +0 -82
- package/dist/chunk-4EGKGSGY.mjs +0 -129
- package/dist/chunk-5YXZXYLH.mjs +0 -67
- package/dist/chunk-65TG6EVD.mjs +0 -264
- package/dist/chunk-D22AALLE.mjs +0 -22
- package/dist/chunk-D36MPDGE.mjs +0 -476
- package/dist/chunk-F3DQJHTG.mjs +0 -3113
- package/dist/chunk-FQ6WVEHW.mjs +0 -151
- package/dist/chunk-GVJYACGA.mjs +0 -189
- package/dist/chunk-JNUGOUYJ.mjs +0 -154
- package/dist/chunk-KMCIHW76.mjs +0 -150
- package/dist/chunk-MQUAGP7K.mjs +0 -1098
- package/dist/chunk-NMS5LCSQ.mjs +0 -195
- package/dist/chunk-OY66MBXP.mjs +0 -163
- package/dist/chunk-R4HAAT6R.mjs +0 -131
- package/dist/chunk-SJ2Z6ZOG.mjs +0 -442
- package/dist/chunk-TGZRVRLP.mjs +0 -107
- package/dist/chunk-TWNGV3RE.mjs +0 -10
- package/dist/chunk-WUHNPHD5.mjs +0 -0
- package/dist/chunk-ZFXKCRJC.mjs +0 -11
- package/dist/chunk-ZS3FB3PO.mjs +0 -12
- package/dist/codeBlock/index.d.mts +0 -24
- package/dist/codeBlock/index.d.ts +0 -24
- package/dist/codeBlock/index.js +0 -517
- package/dist/codeBlock/index.mjs +0 -432
- package/dist/collapsible/index.d.mts +0 -8
- package/dist/collapsible/index.d.ts +0 -8
- package/dist/collapsible/index.js +0 -49
- package/dist/collapsible/index.mjs +0 -12
- package/dist/colorPicker/index.d.mts +0 -34
- package/dist/colorPicker/index.d.ts +0 -34
- package/dist/colorPicker/index.js +0 -276
- package/dist/colorPicker/index.mjs +0 -170
- package/dist/combobox/index.d.mts +0 -41
- package/dist/combobox/index.d.ts +0 -41
- package/dist/combobox/index.js +0 -749
- package/dist/combobox/index.mjs +0 -295
- package/dist/command/index.d.mts +0 -48
- package/dist/command/index.d.ts +0 -48
- package/dist/command/index.js +0 -485
- package/dist/command/index.mjs +0 -22
- package/dist/commonTypes-2IGtJ5cq.d.mts +0 -3
- package/dist/commonTypes-2IGtJ5cq.d.ts +0 -3
- package/dist/commonTypes-2k6FnHw5.d.mts +0 -4
- package/dist/commonTypes-2k6FnHw5.d.ts +0 -4
- package/dist/commonTypes-3k5cNB1s.d.mts +0 -4
- package/dist/commonTypes-3k5cNB1s.d.ts +0 -4
- package/dist/commonTypes-CKtkuNFH.d.mts +0 -11
- package/dist/commonTypes-CKtkuNFH.d.ts +0 -11
- package/dist/commonTypes-GhKAraJw.d.mts +0 -4
- package/dist/commonTypes-GhKAraJw.d.ts +0 -4
- package/dist/commonTypes-MxCJyrHv.d.mts +0 -8
- package/dist/commonTypes-MxCJyrHv.d.ts +0 -8
- package/dist/commonTypes-PBumfOBg.d.mts +0 -3
- package/dist/commonTypes-PBumfOBg.d.ts +0 -3
- package/dist/commonTypes-WPhcN3Vr.d.mts +0 -5
- package/dist/commonTypes-WPhcN3Vr.d.ts +0 -5
- package/dist/commonTypes-_11epZYh.d.mts +0 -4
- package/dist/commonTypes-_11epZYh.d.ts +0 -4
- package/dist/commonTypes-ko_NGEoT.d.mts +0 -3
- package/dist/commonTypes-ko_NGEoT.d.ts +0 -3
- package/dist/copyrights/index.d.mts +0 -17
- package/dist/copyrights/index.d.ts +0 -17
- package/dist/copyrights/index.js +0 -45
- package/dist/copyrights/index.mjs +0 -8
- package/dist/count/index.d.mts +0 -11
- package/dist/count/index.d.ts +0 -11
- package/dist/count/index.js +0 -45
- package/dist/count/index.mjs +0 -8
- package/dist/dataTable/index.d.mts +0 -41
- package/dist/dataTable/index.d.ts +0 -41
- package/dist/dataTable/index.js +0 -1313
- package/dist/dataTable/index.mjs +0 -1281
- package/dist/destroyableCard/index.d.mts +0 -12
- package/dist/destroyableCard/index.d.ts +0 -12
- package/dist/destroyableCard/index.js +0 -203
- package/dist/destroyableCard/index.mjs +0 -163
- package/dist/dialog/index.d.mts +0 -57
- package/dist/dialog/index.d.ts +0 -57
- package/dist/dialog/index.js +0 -368
- package/dist/dialog/index.mjs +0 -314
- package/dist/docsLayout/index.d.mts +0 -37
- package/dist/docsLayout/index.d.ts +0 -37
- package/dist/docsLayout/index.js +0 -927
- package/dist/docsLayout/index.mjs +0 -887
- package/dist/docsSidebar/index.d.mts +0 -11
- package/dist/docsSidebar/index.d.ts +0 -11
- package/dist/docsSidebar/index.js +0 -111
- package/dist/docsSidebar/index.mjs +0 -69
- package/dist/dropdownMenu/index.d.mts +0 -96
- package/dist/dropdownMenu/index.d.ts +0 -96
- package/dist/dropdownMenu/index.js +0 -420
- package/dist/dropdownMenu/index.mjs +0 -362
- package/dist/elements/index.d.mts +0 -788
- package/dist/elements/index.d.ts +0 -788
- package/dist/elements/index.js +0 -7835
- package/dist/elements/index.mjs +0 -3418
- package/dist/fileDropzone/index.d.mts +0 -37
- package/dist/fileDropzone/index.d.ts +0 -37
- package/dist/fileDropzone/index.js +0 -665
- package/dist/fileDropzone/index.mjs +0 -625
- package/dist/fileUploader/index.d.mts +0 -5
- package/dist/fileUploader/index.d.ts +0 -5
- package/dist/fileUploader/index.js +0 -62
- package/dist/fileUploader/index.mjs +0 -25
- package/dist/glow/index.d.mts +0 -16
- package/dist/glow/index.d.ts +0 -16
- package/dist/glow/index.js +0 -155
- package/dist/glow/index.mjs +0 -117
- package/dist/hooks/index.d.mts +0 -108
- package/dist/hooks/index.d.ts +0 -108
- package/dist/hooks/index.js +0 -459
- package/dist/hooks/index.mjs +0 -255
- package/dist/index.d.mts +0 -1932
- package/dist/index.d.ts +0 -1932
- package/dist/index.js +0 -12126
- package/dist/index.mjs +0 -11911
- package/dist/input/index.d.mts +0 -43
- package/dist/input/index.d.ts +0 -43
- package/dist/input/index.js +0 -293
- package/dist/input/index.mjs +0 -158
- package/dist/interfaceSettings/index.d.mts +0 -18
- package/dist/interfaceSettings/index.d.ts +0 -18
- package/dist/interfaceSettings/index.js +0 -420
- package/dist/interfaceSettings/index.mjs +0 -283
- package/dist/label/index.d.mts +0 -13
- package/dist/label/index.d.ts +0 -13
- package/dist/label/index.js +0 -142
- package/dist/label/index.mjs +0 -102
- package/dist/layout/index.d.mts +0 -256
- package/dist/layout/index.d.ts +0 -256
- package/dist/layout/index.js +0 -2627
- package/dist/layout/index.mjs +0 -1393
- package/dist/loading/index.d.mts +0 -15
- package/dist/loading/index.d.ts +0 -15
- package/dist/loading/index.js +0 -225
- package/dist/loading/index.mjs +0 -183
- package/dist/logos/index.d.mts +0 -27
- package/dist/logos/index.d.ts +0 -27
- package/dist/logos/index.js +0 -244
- package/dist/logos/index.mjs +0 -207
- package/dist/navbar/index.d.mts +0 -17
- package/dist/navbar/index.d.ts +0 -17
- package/dist/navbar/index.js +0 -166
- package/dist/navbar/index.mjs +0 -126
- package/dist/navigationMenu/index.d.mts +0 -39
- package/dist/navigationMenu/index.d.ts +0 -39
- package/dist/navigationMenu/index.js +0 -221
- package/dist/navigationMenu/index.mjs +0 -169
- package/dist/pagination/index.d.mts +0 -11
- package/dist/pagination/index.d.ts +0 -11
- package/dist/pagination/index.js +0 -160
- package/dist/pagination/index.mjs +0 -118
- package/dist/passwordInput/index.d.mts +0 -13
- package/dist/passwordInput/index.d.ts +0 -13
- package/dist/passwordInput/index.js +0 -577
- package/dist/passwordInput/index.mjs +0 -534
- package/dist/phoneInput/index.d.mts +0 -23
- package/dist/phoneInput/index.d.ts +0 -23
- package/dist/phoneInput/index.js +0 -2085
- package/dist/phoneInput/index.mjs +0 -2045
- package/dist/pinInput/index.d.mts +0 -20
- package/dist/pinInput/index.d.ts +0 -20
- package/dist/pinInput/index.js +0 -131
- package/dist/pinInput/index.mjs +0 -89
- package/dist/popover/index.d.mts +0 -23
- package/dist/popover/index.d.ts +0 -23
- package/dist/popover/index.js +0 -112
- package/dist/popover/index.mjs +0 -68
- package/dist/progress/index.d.mts +0 -6
- package/dist/progress/index.d.ts +0 -6
- package/dist/progress/index.js +0 -71
- package/dist/progress/index.mjs +0 -29
- package/dist/progressCircle/index.d.mts +0 -16
- package/dist/progressCircle/index.d.ts +0 -16
- package/dist/progressCircle/index.js +0 -159
- package/dist/progressCircle/index.mjs +0 -117
- package/dist/radio/index.d.mts +0 -39
- package/dist/radio/index.d.ts +0 -39
- package/dist/radio/index.js +0 -331
- package/dist/radio/index.mjs +0 -291
- package/dist/scrollArea/index.d.mts +0 -10
- package/dist/scrollArea/index.d.ts +0 -10
- package/dist/scrollArea/index.js +0 -90
- package/dist/scrollArea/index.mjs +0 -47
- package/dist/scrollIndicator/index.d.mts +0 -9
- package/dist/scrollIndicator/index.d.ts +0 -9
- package/dist/scrollIndicator/index.js +0 -80
- package/dist/scrollIndicator/index.mjs +0 -43
- package/dist/select/index.d.mts +0 -50
- package/dist/select/index.d.ts +0 -50
- package/dist/select/index.js +0 -325
- package/dist/select/index.mjs +0 -285
- package/dist/separator/index.d.mts +0 -10
- package/dist/separator/index.d.ts +0 -10
- package/dist/separator/index.js +0 -66
- package/dist/separator/index.mjs +0 -24
- package/dist/sheet/index.d.mts +0 -30
- package/dist/sheet/index.d.ts +0 -30
- package/dist/sheet/index.js +0 -201
- package/dist/sheet/index.mjs +0 -150
- package/dist/sidebar/index.d.mts +0 -48
- package/dist/sidebar/index.d.ts +0 -48
- package/dist/sidebar/index.js +0 -341
- package/dist/sidebar/index.mjs +0 -298
- package/dist/signature/index.d.mts +0 -27
- package/dist/signature/index.d.ts +0 -27
- package/dist/signature/index.js +0 -261
- package/dist/signature/index.mjs +0 -219
- package/dist/simpleTable/index.d.mts +0 -30
- package/dist/simpleTable/index.d.ts +0 -30
- package/dist/simpleTable/index.js +0 -253
- package/dist/simpleTable/index.mjs +0 -217
- package/dist/skeleton/index.d.mts +0 -10
- package/dist/skeleton/index.d.ts +0 -10
- package/dist/skeleton/index.js +0 -75
- package/dist/skeleton/index.mjs +0 -33
- package/dist/slider/index.d.mts +0 -6
- package/dist/slider/index.d.ts +0 -6
- package/dist/slider/index.js +0 -66
- package/dist/slider/index.mjs +0 -24
- package/dist/sortButton/index.d.mts +0 -10
- package/dist/sortButton/index.d.ts +0 -10
- package/dist/sortButton/index.js +0 -336
- package/dist/sortButton/index.mjs +0 -42
- package/dist/splitButton/index.d.mts +0 -52
- package/dist/splitButton/index.d.ts +0 -52
- package/dist/splitButton/index.js +0 -692
- package/dist/splitButton/index.mjs +0 -400
- package/dist/stats/index.d.mts +0 -19
- package/dist/stats/index.d.ts +0 -19
- package/dist/stats/index.js +0 -191
- package/dist/stats/index.mjs +0 -154
- package/dist/stopPropagationWrapper/index.d.mts +0 -5
- package/dist/stopPropagationWrapper/index.d.ts +0 -5
- package/dist/stopPropagationWrapper/index.js +0 -48
- package/dist/stopPropagationWrapper/index.mjs +0 -11
- package/dist/switch/index.d.mts +0 -12
- package/dist/switch/index.d.ts +0 -12
- package/dist/switch/index.js +0 -125
- package/dist/switch/index.mjs +0 -83
- package/dist/table/index.d.mts +0 -21
- package/dist/table/index.d.ts +0 -21
- package/dist/table/index.js +0 -172
- package/dist/table/index.mjs +0 -123
- package/dist/tabs/index.d.mts +0 -33
- package/dist/tabs/index.d.ts +0 -33
- package/dist/tabs/index.js +0 -200
- package/dist/tabs/index.mjs +0 -157
- package/dist/textTypes-559CaoOV.d.mts +0 -88
- package/dist/textTypes-559CaoOV.d.ts +0 -88
- package/dist/textarea/index.d.mts +0 -27
- package/dist/textarea/index.d.ts +0 -27
- package/dist/textarea/index.js +0 -229
- package/dist/textarea/index.mjs +0 -189
- package/dist/toast/index.d.mts +0 -26
- package/dist/toast/index.d.ts +0 -26
- package/dist/toast/index.js +0 -197
- package/dist/toast/index.mjs +0 -19
- package/dist/toaster/index.d.mts +0 -9
- package/dist/toaster/index.d.ts +0 -9
- package/dist/toaster/index.js +0 -353
- package/dist/toaster/index.mjs +0 -184
- package/dist/types/index.d.mts +0 -115
- package/dist/types/index.d.ts +0 -115
- package/dist/types/index.js +0 -18
- package/dist/types/index.mjs +0 -0
package/dist/select/index.d.ts
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import { FC } from 'react';
|
3
|
-
import { P as PositionType } from '../commonTypes-GhKAraJw.js';
|
4
|
-
|
5
|
-
type LabelProps = {
|
6
|
-
hint?: React.ReactNode;
|
7
|
-
hintSide?: PositionType;
|
8
|
-
htmlFor?: string;
|
9
|
-
required?: boolean;
|
10
|
-
};
|
11
|
-
|
12
|
-
type SelectOptionProps = {
|
13
|
-
value: any;
|
14
|
-
label: any;
|
15
|
-
};
|
16
|
-
type SelectTypes = {
|
17
|
-
label?: string;
|
18
|
-
hideHelperText?: boolean;
|
19
|
-
options?: SelectOptionProps[];
|
20
|
-
labelKey?: string;
|
21
|
-
isCreatable?: boolean;
|
22
|
-
isClearable?: boolean;
|
23
|
-
isMulti?: boolean;
|
24
|
-
isSearchable?: boolean;
|
25
|
-
controlClassNames?: string;
|
26
|
-
containerClassNames?: string;
|
27
|
-
onChange?: any;
|
28
|
-
helperText?: string;
|
29
|
-
onInputChange?: any;
|
30
|
-
native?: any;
|
31
|
-
width?: "full" | "small" | "fit";
|
32
|
-
value?: any;
|
33
|
-
children?: any;
|
34
|
-
getOptionLabel?: any;
|
35
|
-
disabled?: boolean;
|
36
|
-
defaultValue?: any;
|
37
|
-
handleCreateOption?: () => void;
|
38
|
-
placeholder?: string;
|
39
|
-
hideIndicator?: boolean;
|
40
|
-
phoneCode?: boolean;
|
41
|
-
isLoading?: any;
|
42
|
-
labelProps?: LabelProps;
|
43
|
-
texts?: {
|
44
|
-
noOptions?: string;
|
45
|
-
createLabel?: string;
|
46
|
-
};
|
47
|
-
};
|
48
|
-
declare const Select: FC<SelectTypes>;
|
49
|
-
|
50
|
-
export { Select, type SelectOptionProps };
|
package/dist/select/index.js
DELETED
@@ -1,325 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __create = Object.create;
|
3
|
-
var __defProp = Object.defineProperty;
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
-
var __export = (target, all) => {
|
9
|
-
for (var name in all)
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
11
|
-
};
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
14
|
-
for (let key of __getOwnPropNames(from))
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
|
-
}
|
18
|
-
return to;
|
19
|
-
};
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
26
|
-
mod
|
27
|
-
));
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
|
30
|
-
// elements/select/index.ts
|
31
|
-
var select_exports = {};
|
32
|
-
__export(select_exports, {
|
33
|
-
Select: () => Select
|
34
|
-
});
|
35
|
-
module.exports = __toCommonJS(select_exports);
|
36
|
-
|
37
|
-
// elements/select/Select.tsx
|
38
|
-
var import_react3 = __toESM(require("react"));
|
39
|
-
var import_react_select = __toESM(require("react-select"));
|
40
|
-
var import_creatable = __toESM(require("react-select/creatable"));
|
41
|
-
var import_clsx2 = __toESM(require("clsx"));
|
42
|
-
|
43
|
-
// util/index.ts
|
44
|
-
var import_clsx = require("clsx");
|
45
|
-
var import_tailwind_merge = require("tailwind-merge");
|
46
|
-
function cn(...inputs) {
|
47
|
-
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
48
|
-
}
|
49
|
-
|
50
|
-
// elements/label/Label.tsx
|
51
|
-
var React2 = __toESM(require("react"));
|
52
|
-
|
53
|
-
// elements/tooltip/Tooltip.tsx
|
54
|
-
var import_react = __toESM(require("react"));
|
55
|
-
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
56
|
-
var TooltipContent = import_react.default.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ import_react.default.createElement(
|
57
|
-
TooltipPrimitive.Content,
|
58
|
-
{
|
59
|
-
ref,
|
60
|
-
sideOffset,
|
61
|
-
className: cn(
|
62
|
-
"hawa-z-50 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-text-popover-foreground hawa-shadow-md hawa-animate-in hawa-fade-in-0 hawa-zoom-in-95 data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=closed]:hawa-zoom-out-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
|
63
|
-
className
|
64
|
-
),
|
65
|
-
...props
|
66
|
-
}
|
67
|
-
));
|
68
|
-
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
69
|
-
var TooltipArrow = import_react.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ import_react.default.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
70
|
-
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
71
|
-
var Tooltip = ({
|
72
|
-
side,
|
73
|
-
open,
|
74
|
-
content,
|
75
|
-
children,
|
76
|
-
defaultOpen,
|
77
|
-
onOpenChange,
|
78
|
-
triggerProps,
|
79
|
-
contentProps,
|
80
|
-
providerProps,
|
81
|
-
delayDuration = 300,
|
82
|
-
...props
|
83
|
-
}) => {
|
84
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
85
|
-
TooltipPrimitive.TooltipProvider,
|
86
|
-
{
|
87
|
-
delayDuration,
|
88
|
-
...providerProps
|
89
|
-
},
|
90
|
-
/* @__PURE__ */ import_react.default.createElement(
|
91
|
-
TooltipPrimitive.Root,
|
92
|
-
{
|
93
|
-
open,
|
94
|
-
defaultOpen,
|
95
|
-
onOpenChange,
|
96
|
-
...props
|
97
|
-
},
|
98
|
-
/* @__PURE__ */ import_react.default.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
99
|
-
/* @__PURE__ */ import_react.default.createElement(TooltipContent, { side, align: "center", ...contentProps }, content)
|
100
|
-
)
|
101
|
-
);
|
102
|
-
};
|
103
|
-
|
104
|
-
// elements/label/Label.tsx
|
105
|
-
var Label = React2.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React2.createElement(
|
106
|
-
"label",
|
107
|
-
{
|
108
|
-
ref,
|
109
|
-
className: cn(
|
110
|
-
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
111
|
-
className
|
112
|
-
),
|
113
|
-
...props
|
114
|
-
},
|
115
|
-
children,
|
116
|
-
required && /* @__PURE__ */ React2.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
117
|
-
), hint && /* @__PURE__ */ React2.createElement(
|
118
|
-
Tooltip,
|
119
|
-
{
|
120
|
-
content: hint,
|
121
|
-
side: hintSide,
|
122
|
-
triggerProps: {
|
123
|
-
tabIndex: -1,
|
124
|
-
onClick: (event) => event.preventDefault()
|
125
|
-
}
|
126
|
-
},
|
127
|
-
/* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement(
|
128
|
-
"svg",
|
129
|
-
{
|
130
|
-
xmlns: "http://www.w3.org/2000/svg",
|
131
|
-
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
132
|
-
viewBox: "0 0 24 24",
|
133
|
-
fill: "none",
|
134
|
-
stroke: "currentColor",
|
135
|
-
strokeWidth: "2",
|
136
|
-
strokeLinecap: "round",
|
137
|
-
strokeLinejoin: "round"
|
138
|
-
},
|
139
|
-
/* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
140
|
-
/* @__PURE__ */ React2.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
141
|
-
/* @__PURE__ */ React2.createElement("path", { d: "M12 17h.01" })
|
142
|
-
))
|
143
|
-
)));
|
144
|
-
Label.displayName = "Label";
|
145
|
-
|
146
|
-
// elements/skeleton/Skeleton.tsx
|
147
|
-
var import_react2 = __toESM(require("react"));
|
148
|
-
function Skeleton({
|
149
|
-
className,
|
150
|
-
content,
|
151
|
-
animation = "pulse",
|
152
|
-
...props
|
153
|
-
}) {
|
154
|
-
const animationStyles = {
|
155
|
-
none: "hawa-rounded hawa-bg-muted",
|
156
|
-
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
157
|
-
shimmer: "hawa-space-y-5 hawa-rounded hawa-bg-muted hawa-p-4 hawa-relative before:hawa-absolute before:hawa-inset-0 before:hawa--translate-x-full before:hawa-animate-[shimmer_2s_infinite] before:hawa-bg-gradient-to-r before:hawa-from-transparent before:hawa-via-gray-300/40 dark:before:hawa-via-white/10 before:hawa-to-transparent hawa-isolate hawa-overflow-hidden before:hawa-border-t before:hawa-border-rose-100/10"
|
158
|
-
};
|
159
|
-
return /* @__PURE__ */ import_react2.default.createElement(
|
160
|
-
"div",
|
161
|
-
{
|
162
|
-
className: cn(
|
163
|
-
animationStyles[animation],
|
164
|
-
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
165
|
-
className
|
166
|
-
),
|
167
|
-
...props
|
168
|
-
},
|
169
|
-
content && content
|
170
|
-
);
|
171
|
-
}
|
172
|
-
|
173
|
-
// elements/select/Select.tsx
|
174
|
-
var Select = ({
|
175
|
-
labelProps,
|
176
|
-
labelKey = "label",
|
177
|
-
...props
|
178
|
-
}) => {
|
179
|
-
const NoOption = () => {
|
180
|
-
var _a, _b;
|
181
|
-
return /* @__PURE__ */ import_react3.default.createElement("div", null, (_b = (_a = props.texts) == null ? void 0 : _a.noOptions) != null ? _b : "No Items Found");
|
182
|
-
};
|
183
|
-
const Control = ({ children, innerProps, innerRef }) => {
|
184
|
-
return /* @__PURE__ */ import_react3.default.createElement(
|
185
|
-
"div",
|
186
|
-
{
|
187
|
-
ref: innerRef,
|
188
|
-
className: (0, import_clsx2.default)(
|
189
|
-
"hawa-flex hawa-w-full hawa-rounded hawa-border hawa-bg-background hawa-p-2 hawa-text-sm hawa-text-gray-900 focus:hawa-border-blue-500 focus:hawa-ring-blue-500 dark:focus:hawa-ring-blue-500"
|
190
|
-
),
|
191
|
-
...innerProps
|
192
|
-
},
|
193
|
-
children
|
194
|
-
);
|
195
|
-
};
|
196
|
-
const Option = ({ children, innerProps, innerRef }) => {
|
197
|
-
return /* @__PURE__ */ import_react3.default.createElement(
|
198
|
-
"div",
|
199
|
-
{
|
200
|
-
ref: innerRef,
|
201
|
-
className: cn(
|
202
|
-
"hawa-flex hawa-cursor-pointer hawa-select-none hawa-flex-row hawa-items-center hawa-justify-between hawa-rounded-inner hawa-p-1 hawa-px-2 hawa-transition-all hover:hawa-bg-primary hover:hawa-text-primary-foreground"
|
203
|
-
),
|
204
|
-
...innerProps
|
205
|
-
},
|
206
|
-
children
|
207
|
-
);
|
208
|
-
};
|
209
|
-
const Menu = ({
|
210
|
-
cx,
|
211
|
-
children,
|
212
|
-
getStyles,
|
213
|
-
innerProps,
|
214
|
-
innerRef,
|
215
|
-
...menuProps
|
216
|
-
}) => {
|
217
|
-
const menuOpen = menuProps.selectProps.menuIsOpen;
|
218
|
-
return /* @__PURE__ */ import_react3.default.createElement(
|
219
|
-
"div",
|
220
|
-
{
|
221
|
-
className: cn(
|
222
|
-
"dark:dark-shadow hawa-absolute hawa-z-10 -hawa-mx-1 hawa-mt-1 hawa-flex hawa-flex-col hawa-justify-start hawa-rounded hawa-border hawa-bg-background hawa-shadow-md",
|
223
|
-
props.phoneCode ? "hawa-p-1.5" : "hawa-w-full hawa-p-1.5",
|
224
|
-
menuOpen && "hawa-animate-in hawa-fade-in-0 hawa-zoom-in-95 "
|
225
|
-
),
|
226
|
-
ref: innerRef,
|
227
|
-
...innerProps
|
228
|
-
},
|
229
|
-
children
|
230
|
-
);
|
231
|
-
};
|
232
|
-
return /* @__PURE__ */ import_react3.default.createElement(
|
233
|
-
"div",
|
234
|
-
{
|
235
|
-
className: cn(
|
236
|
-
"hawa-flex hawa-flex-col hawa-gap-2",
|
237
|
-
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
238
|
-
)
|
239
|
-
},
|
240
|
-
props.label && /* @__PURE__ */ import_react3.default.createElement(Label, { ...labelProps }, props.label),
|
241
|
-
props.isLoading ? /* @__PURE__ */ import_react3.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
|
242
|
-
// TODO: enable keyboard to go to the next item in the list
|
243
|
-
/* @__PURE__ */ import_react3.default.createElement(
|
244
|
-
import_react_select.default,
|
245
|
-
{
|
246
|
-
noOptionsMessage: NoOption,
|
247
|
-
classNames: {
|
248
|
-
control: () => cn(
|
249
|
-
props.phoneCode && "hawa-rounded-r-none",
|
250
|
-
props.controlClassNames
|
251
|
-
),
|
252
|
-
container: () => cn(
|
253
|
-
"hawa-rounded",
|
254
|
-
props.phoneCode && "hawa-w-fit hawa-min-w-[65px] hawa-text-right hawa-w-[100px] hawa-p-0 hawa-rounded-r-none hawa-h-[40px] ",
|
255
|
-
"hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-0 hawa-px-1 hawa-text-sm",
|
256
|
-
props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer"
|
257
|
-
),
|
258
|
-
placeholder: () => "hawa-text-muted-foreground hawa-cursor-pointer hawa-px-1",
|
259
|
-
valueContainer: () => "hawa-text-foreground hawa-px-1 ",
|
260
|
-
singleValue: () => "hawa-text-foreground",
|
261
|
-
indicatorsContainer: () => cn(
|
262
|
-
"hawa-cursor-pointer hawa-text-muted-foreground",
|
263
|
-
props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
|
264
|
-
)
|
265
|
-
},
|
266
|
-
unstyled: true,
|
267
|
-
autoFocus: true,
|
268
|
-
components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : { Option, Menu },
|
269
|
-
onChange: (newValue, action) => props.onChange(newValue, action),
|
270
|
-
options: props.options,
|
271
|
-
getOptionLabel: props.getOptionLabel,
|
272
|
-
defaultValue: props.defaultValue,
|
273
|
-
placeholder: props.placeholder,
|
274
|
-
isDisabled: props.disabled,
|
275
|
-
isClearable: props.isClearable,
|
276
|
-
isMulti: props.isMulti,
|
277
|
-
isSearchable: props.isSearchable
|
278
|
-
}
|
279
|
-
)
|
280
|
-
) : /* @__PURE__ */ import_react3.default.createElement(
|
281
|
-
import_creatable.default,
|
282
|
-
{
|
283
|
-
formatCreateLabel: (inputValue) => {
|
284
|
-
var _a, _b;
|
285
|
-
return `${(_b = (_a = props.texts) == null ? void 0 : _a.createLabel) != null ? _b : "Create"} "${inputValue}"`;
|
286
|
-
},
|
287
|
-
classNames: {
|
288
|
-
container: () => cn(
|
289
|
-
"hawa-rounded",
|
290
|
-
props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer"
|
291
|
-
),
|
292
|
-
placeholder: () => "hawa-px-2 hawa-text-muted-foreground",
|
293
|
-
input: () => "hawa-text-primary hawa-px-2",
|
294
|
-
valueContainer: () => "hawa-text-white dark:hawa-text-muted-foreground",
|
295
|
-
singleValue: () => "hawa-text-black dark:hawa-text-white hawa-px-2",
|
296
|
-
indicatorsContainer: () => " hawa-px-2 hawa-cursor-pointer hawa-text-muted-foreground"
|
297
|
-
},
|
298
|
-
unstyled: true,
|
299
|
-
options: props.options,
|
300
|
-
isClearable: props.isClearable,
|
301
|
-
isMulti: props.isMulti,
|
302
|
-
isSearchable: props.isSearchable,
|
303
|
-
placeholder: props.placeholder,
|
304
|
-
onCreateOption: props.handleCreateOption,
|
305
|
-
onChange: (newValue, action) => props.onChange(newValue, action),
|
306
|
-
components: { Control, Option, Menu },
|
307
|
-
onInputChange: (newValue, action) => props.onInputChange(newValue, action)
|
308
|
-
}
|
309
|
-
),
|
310
|
-
!props.hideHelperText && /* @__PURE__ */ import_react3.default.createElement(
|
311
|
-
"p",
|
312
|
-
{
|
313
|
-
className: cn(
|
314
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
315
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
316
|
-
)
|
317
|
-
},
|
318
|
-
props.helperText
|
319
|
-
)
|
320
|
-
);
|
321
|
-
};
|
322
|
-
// Annotate the CommonJS export names for ESM import in node:
|
323
|
-
0 && (module.exports = {
|
324
|
-
Select
|
325
|
-
});
|
package/dist/select/index.mjs
DELETED
@@ -1,285 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
cn
|
3
|
-
} from "../chunk-TWNGV3RE.mjs";
|
4
|
-
|
5
|
-
// elements/select/Select.tsx
|
6
|
-
import React4 from "react";
|
7
|
-
import ReactSelect from "react-select";
|
8
|
-
import CreatableSelect from "react-select/creatable";
|
9
|
-
import clsx from "clsx";
|
10
|
-
|
11
|
-
// elements/label/Label.tsx
|
12
|
-
import * as React2 from "react";
|
13
|
-
|
14
|
-
// elements/tooltip/Tooltip.tsx
|
15
|
-
import React from "react";
|
16
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
17
|
-
var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
18
|
-
TooltipPrimitive.Content,
|
19
|
-
{
|
20
|
-
ref,
|
21
|
-
sideOffset,
|
22
|
-
className: cn(
|
23
|
-
"hawa-z-50 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-text-popover-foreground hawa-shadow-md hawa-animate-in hawa-fade-in-0 hawa-zoom-in-95 data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=closed]:hawa-zoom-out-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
|
24
|
-
className
|
25
|
-
),
|
26
|
-
...props
|
27
|
-
}
|
28
|
-
));
|
29
|
-
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
30
|
-
var TooltipArrow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
31
|
-
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
32
|
-
var Tooltip = ({
|
33
|
-
side,
|
34
|
-
open,
|
35
|
-
content,
|
36
|
-
children,
|
37
|
-
defaultOpen,
|
38
|
-
onOpenChange,
|
39
|
-
triggerProps,
|
40
|
-
contentProps,
|
41
|
-
providerProps,
|
42
|
-
delayDuration = 300,
|
43
|
-
...props
|
44
|
-
}) => {
|
45
|
-
return /* @__PURE__ */ React.createElement(
|
46
|
-
TooltipPrimitive.TooltipProvider,
|
47
|
-
{
|
48
|
-
delayDuration,
|
49
|
-
...providerProps
|
50
|
-
},
|
51
|
-
/* @__PURE__ */ React.createElement(
|
52
|
-
TooltipPrimitive.Root,
|
53
|
-
{
|
54
|
-
open,
|
55
|
-
defaultOpen,
|
56
|
-
onOpenChange,
|
57
|
-
...props
|
58
|
-
},
|
59
|
-
/* @__PURE__ */ React.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
60
|
-
/* @__PURE__ */ React.createElement(TooltipContent, { side, align: "center", ...contentProps }, content)
|
61
|
-
)
|
62
|
-
);
|
63
|
-
};
|
64
|
-
|
65
|
-
// elements/label/Label.tsx
|
66
|
-
var Label = React2.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React2.createElement(
|
67
|
-
"label",
|
68
|
-
{
|
69
|
-
ref,
|
70
|
-
className: cn(
|
71
|
-
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
72
|
-
className
|
73
|
-
),
|
74
|
-
...props
|
75
|
-
},
|
76
|
-
children,
|
77
|
-
required && /* @__PURE__ */ React2.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
78
|
-
), hint && /* @__PURE__ */ React2.createElement(
|
79
|
-
Tooltip,
|
80
|
-
{
|
81
|
-
content: hint,
|
82
|
-
side: hintSide,
|
83
|
-
triggerProps: {
|
84
|
-
tabIndex: -1,
|
85
|
-
onClick: (event) => event.preventDefault()
|
86
|
-
}
|
87
|
-
},
|
88
|
-
/* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement(
|
89
|
-
"svg",
|
90
|
-
{
|
91
|
-
xmlns: "http://www.w3.org/2000/svg",
|
92
|
-
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
93
|
-
viewBox: "0 0 24 24",
|
94
|
-
fill: "none",
|
95
|
-
stroke: "currentColor",
|
96
|
-
strokeWidth: "2",
|
97
|
-
strokeLinecap: "round",
|
98
|
-
strokeLinejoin: "round"
|
99
|
-
},
|
100
|
-
/* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
101
|
-
/* @__PURE__ */ React2.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
102
|
-
/* @__PURE__ */ React2.createElement("path", { d: "M12 17h.01" })
|
103
|
-
))
|
104
|
-
)));
|
105
|
-
Label.displayName = "Label";
|
106
|
-
|
107
|
-
// elements/skeleton/Skeleton.tsx
|
108
|
-
import React3 from "react";
|
109
|
-
function Skeleton({
|
110
|
-
className,
|
111
|
-
content,
|
112
|
-
animation = "pulse",
|
113
|
-
...props
|
114
|
-
}) {
|
115
|
-
const animationStyles = {
|
116
|
-
none: "hawa-rounded hawa-bg-muted",
|
117
|
-
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
118
|
-
shimmer: "hawa-space-y-5 hawa-rounded hawa-bg-muted hawa-p-4 hawa-relative before:hawa-absolute before:hawa-inset-0 before:hawa--translate-x-full before:hawa-animate-[shimmer_2s_infinite] before:hawa-bg-gradient-to-r before:hawa-from-transparent before:hawa-via-gray-300/40 dark:before:hawa-via-white/10 before:hawa-to-transparent hawa-isolate hawa-overflow-hidden before:hawa-border-t before:hawa-border-rose-100/10"
|
119
|
-
};
|
120
|
-
return /* @__PURE__ */ React3.createElement(
|
121
|
-
"div",
|
122
|
-
{
|
123
|
-
className: cn(
|
124
|
-
animationStyles[animation],
|
125
|
-
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
126
|
-
className
|
127
|
-
),
|
128
|
-
...props
|
129
|
-
},
|
130
|
-
content && content
|
131
|
-
);
|
132
|
-
}
|
133
|
-
|
134
|
-
// elements/select/Select.tsx
|
135
|
-
var Select = ({
|
136
|
-
labelProps,
|
137
|
-
labelKey = "label",
|
138
|
-
...props
|
139
|
-
}) => {
|
140
|
-
const NoOption = () => {
|
141
|
-
var _a, _b;
|
142
|
-
return /* @__PURE__ */ React4.createElement("div", null, (_b = (_a = props.texts) == null ? void 0 : _a.noOptions) != null ? _b : "No Items Found");
|
143
|
-
};
|
144
|
-
const Control = ({ children, innerProps, innerRef }) => {
|
145
|
-
return /* @__PURE__ */ React4.createElement(
|
146
|
-
"div",
|
147
|
-
{
|
148
|
-
ref: innerRef,
|
149
|
-
className: clsx(
|
150
|
-
"hawa-flex hawa-w-full hawa-rounded hawa-border hawa-bg-background hawa-p-2 hawa-text-sm hawa-text-gray-900 focus:hawa-border-blue-500 focus:hawa-ring-blue-500 dark:focus:hawa-ring-blue-500"
|
151
|
-
),
|
152
|
-
...innerProps
|
153
|
-
},
|
154
|
-
children
|
155
|
-
);
|
156
|
-
};
|
157
|
-
const Option = ({ children, innerProps, innerRef }) => {
|
158
|
-
return /* @__PURE__ */ React4.createElement(
|
159
|
-
"div",
|
160
|
-
{
|
161
|
-
ref: innerRef,
|
162
|
-
className: cn(
|
163
|
-
"hawa-flex hawa-cursor-pointer hawa-select-none hawa-flex-row hawa-items-center hawa-justify-between hawa-rounded-inner hawa-p-1 hawa-px-2 hawa-transition-all hover:hawa-bg-primary hover:hawa-text-primary-foreground"
|
164
|
-
),
|
165
|
-
...innerProps
|
166
|
-
},
|
167
|
-
children
|
168
|
-
);
|
169
|
-
};
|
170
|
-
const Menu = ({
|
171
|
-
cx,
|
172
|
-
children,
|
173
|
-
getStyles,
|
174
|
-
innerProps,
|
175
|
-
innerRef,
|
176
|
-
...menuProps
|
177
|
-
}) => {
|
178
|
-
const menuOpen = menuProps.selectProps.menuIsOpen;
|
179
|
-
return /* @__PURE__ */ React4.createElement(
|
180
|
-
"div",
|
181
|
-
{
|
182
|
-
className: cn(
|
183
|
-
"dark:dark-shadow hawa-absolute hawa-z-10 -hawa-mx-1 hawa-mt-1 hawa-flex hawa-flex-col hawa-justify-start hawa-rounded hawa-border hawa-bg-background hawa-shadow-md",
|
184
|
-
props.phoneCode ? "hawa-p-1.5" : "hawa-w-full hawa-p-1.5",
|
185
|
-
menuOpen && "hawa-animate-in hawa-fade-in-0 hawa-zoom-in-95 "
|
186
|
-
),
|
187
|
-
ref: innerRef,
|
188
|
-
...innerProps
|
189
|
-
},
|
190
|
-
children
|
191
|
-
);
|
192
|
-
};
|
193
|
-
return /* @__PURE__ */ React4.createElement(
|
194
|
-
"div",
|
195
|
-
{
|
196
|
-
className: cn(
|
197
|
-
"hawa-flex hawa-flex-col hawa-gap-2",
|
198
|
-
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
199
|
-
)
|
200
|
-
},
|
201
|
-
props.label && /* @__PURE__ */ React4.createElement(Label, { ...labelProps }, props.label),
|
202
|
-
props.isLoading ? /* @__PURE__ */ React4.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
|
203
|
-
// TODO: enable keyboard to go to the next item in the list
|
204
|
-
/* @__PURE__ */ React4.createElement(
|
205
|
-
ReactSelect,
|
206
|
-
{
|
207
|
-
noOptionsMessage: NoOption,
|
208
|
-
classNames: {
|
209
|
-
control: () => cn(
|
210
|
-
props.phoneCode && "hawa-rounded-r-none",
|
211
|
-
props.controlClassNames
|
212
|
-
),
|
213
|
-
container: () => cn(
|
214
|
-
"hawa-rounded",
|
215
|
-
props.phoneCode && "hawa-w-fit hawa-min-w-[65px] hawa-text-right hawa-w-[100px] hawa-p-0 hawa-rounded-r-none hawa-h-[40px] ",
|
216
|
-
"hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-0 hawa-px-1 hawa-text-sm",
|
217
|
-
props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer"
|
218
|
-
),
|
219
|
-
placeholder: () => "hawa-text-muted-foreground hawa-cursor-pointer hawa-px-1",
|
220
|
-
valueContainer: () => "hawa-text-foreground hawa-px-1 ",
|
221
|
-
singleValue: () => "hawa-text-foreground",
|
222
|
-
indicatorsContainer: () => cn(
|
223
|
-
"hawa-cursor-pointer hawa-text-muted-foreground",
|
224
|
-
props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
|
225
|
-
)
|
226
|
-
},
|
227
|
-
unstyled: true,
|
228
|
-
autoFocus: true,
|
229
|
-
components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : { Option, Menu },
|
230
|
-
onChange: (newValue, action) => props.onChange(newValue, action),
|
231
|
-
options: props.options,
|
232
|
-
getOptionLabel: props.getOptionLabel,
|
233
|
-
defaultValue: props.defaultValue,
|
234
|
-
placeholder: props.placeholder,
|
235
|
-
isDisabled: props.disabled,
|
236
|
-
isClearable: props.isClearable,
|
237
|
-
isMulti: props.isMulti,
|
238
|
-
isSearchable: props.isSearchable
|
239
|
-
}
|
240
|
-
)
|
241
|
-
) : /* @__PURE__ */ React4.createElement(
|
242
|
-
CreatableSelect,
|
243
|
-
{
|
244
|
-
formatCreateLabel: (inputValue) => {
|
245
|
-
var _a, _b;
|
246
|
-
return `${(_b = (_a = props.texts) == null ? void 0 : _a.createLabel) != null ? _b : "Create"} "${inputValue}"`;
|
247
|
-
},
|
248
|
-
classNames: {
|
249
|
-
container: () => cn(
|
250
|
-
"hawa-rounded",
|
251
|
-
props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer"
|
252
|
-
),
|
253
|
-
placeholder: () => "hawa-px-2 hawa-text-muted-foreground",
|
254
|
-
input: () => "hawa-text-primary hawa-px-2",
|
255
|
-
valueContainer: () => "hawa-text-white dark:hawa-text-muted-foreground",
|
256
|
-
singleValue: () => "hawa-text-black dark:hawa-text-white hawa-px-2",
|
257
|
-
indicatorsContainer: () => " hawa-px-2 hawa-cursor-pointer hawa-text-muted-foreground"
|
258
|
-
},
|
259
|
-
unstyled: true,
|
260
|
-
options: props.options,
|
261
|
-
isClearable: props.isClearable,
|
262
|
-
isMulti: props.isMulti,
|
263
|
-
isSearchable: props.isSearchable,
|
264
|
-
placeholder: props.placeholder,
|
265
|
-
onCreateOption: props.handleCreateOption,
|
266
|
-
onChange: (newValue, action) => props.onChange(newValue, action),
|
267
|
-
components: { Control, Option, Menu },
|
268
|
-
onInputChange: (newValue, action) => props.onInputChange(newValue, action)
|
269
|
-
}
|
270
|
-
),
|
271
|
-
!props.hideHelperText && /* @__PURE__ */ React4.createElement(
|
272
|
-
"p",
|
273
|
-
{
|
274
|
-
className: cn(
|
275
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
276
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
277
|
-
)
|
278
|
-
},
|
279
|
-
props.helperText
|
280
|
-
)
|
281
|
-
);
|
282
|
-
};
|
283
|
-
export {
|
284
|
-
Select
|
285
|
-
};
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import { O as OrientationType } from '../commonTypes-3k5cNB1s.mjs';
|
3
|
-
|
4
|
-
type SeparatorProps = {
|
5
|
-
className?: string;
|
6
|
-
orientation?: OrientationType;
|
7
|
-
};
|
8
|
-
declare const Separator: React.FC<SeparatorProps>;
|
9
|
-
|
10
|
-
export { Separator };
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import { O as OrientationType } from '../commonTypes-3k5cNB1s.js';
|
3
|
-
|
4
|
-
type SeparatorProps = {
|
5
|
-
className?: string;
|
6
|
-
orientation?: OrientationType;
|
7
|
-
};
|
8
|
-
declare const Separator: React.FC<SeparatorProps>;
|
9
|
-
|
10
|
-
export { Separator };
|