welcome-ui 8.1.1 → 8.2.0-alpha.0
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/{AXB53BZF-BOEe01VW.mjs → AXB53BZF-XKOjjeWO.mjs} +3 -3
- package/dist/Accordion.mjs +30 -23
- package/dist/Alert.mjs +72 -66
- package/dist/AspectRatio.mjs +9 -9
- package/dist/Avatar.mjs +45 -41
- package/dist/{BYC7LY2E-B1IDizRs.mjs → BYC7LY2E-CWSI38FM.mjs} +128 -127
- package/dist/Badge.mjs +25 -25
- package/dist/Box.mjs +5 -5
- package/dist/Breadcrumb.mjs +118 -112
- package/dist/Button.mjs +72 -67
- package/dist/ButtonGroup.mjs +12 -11
- package/dist/Card.mjs +14 -14
- package/dist/Checkbox.mjs +2 -2
- package/dist/ClearButton.mjs +15 -15
- package/dist/CloseButton.mjs +9 -9
- package/dist/{CustomInput-IA_gVoXd.mjs → CustomPopper-DezjKb9n.mjs} +1458 -1442
- package/dist/DatePicker.mjs +63 -62
- package/dist/DateTimePicker.mjs +69 -63
- package/dist/DateTimePickerCommon.mjs +1 -1
- package/dist/Drawer.mjs +171 -159
- package/dist/DropdownMenu.mjs +354 -351
- package/dist/Field.mjs +103 -92
- package/dist/FieldGroup.mjs +12 -9
- package/dist/FileDrop.mjs +316 -295
- package/dist/FileUpload.mjs +83 -69
- package/dist/Files.mjs +41 -41
- package/dist/Flex.mjs +13 -13
- package/dist/Grid.mjs +29 -29
- package/dist/Hint.mjs +12 -12
- package/dist/{ITI7HKP4-EL9KXYBU.mjs → ITI7HKP4-C89kOQb8.mjs} +68 -67
- package/dist/Icon.mjs +25 -25
- package/dist/Icons.mjs +988 -988
- package/dist/IconsFont.mjs +22 -22
- package/dist/InputText.mjs +64 -56
- package/dist/{JC64G2H7-BzklVBKM.mjs → JC64G2H7-afsomHuH.mjs} +47 -46
- package/dist/{KUU7WJ55-CS4NemC6.mjs → KUU7WJ55-CzsjuIMv.mjs} +1 -1
- package/dist/LVA2YJMS-C-kJ1lkr.mjs +873 -0
- package/dist/Label.mjs +37 -35
- package/dist/Link.mjs +32 -28
- package/dist/Loader.mjs +20 -16
- package/dist/Logo.mjs +55 -42
- package/dist/{MTZPJQMC-CMjAwC0N.mjs → MTZPJQMC-TybFZCho.mjs} +2 -2
- package/dist/Modal.mjs +263 -244
- package/dist/{NLEBE274-QOMV1l7e.mjs → NLEBE274-oSxMftGy.mjs} +9 -9
- package/dist/{P2CTZE2T-Cl2w7OLV.mjs → P2CTZE2T-DOT1mNnX.mjs} +49 -48
- package/dist/{P4IRICAX-DezbJY4s.mjs → P4IRICAX-CWSZLTGz.mjs} +3 -3
- package/dist/Pagination.mjs +105 -103
- package/dist/PasswordInput.mjs +35 -34
- package/dist/Picker.mjs +36 -34
- package/dist/Popover.mjs +106 -99
- package/dist/{QYJ6MIDR-Bb0O5xUM.mjs → QYJ6MIDR-DJ-vUdAM.mjs} +31 -30
- package/dist/Radio.mjs +52 -46
- package/dist/RadioGroup.mjs +47 -47
- package/dist/RadioTab.mjs +37 -35
- package/dist/{SYRFVSLH-jn06-eLy.mjs → SYRFVSLH-B6m278Vb.mjs} +11 -10
- package/dist/Search.mjs +147 -135
- package/dist/Select.mjs +348 -330
- package/dist/Shape.mjs +9 -9
- package/dist/Slider.mjs +353 -326
- package/dist/Stack.mjs +24 -23
- package/dist/Swiper.mjs +192 -186
- package/dist/Table.mjs +23 -23
- package/dist/Tabs.mjs +205 -200
- package/dist/Tag.mjs +49 -47
- package/dist/Text.mjs +20 -20
- package/dist/Textarea.mjs +40 -40
- package/dist/TimePicker.mjs +59 -58
- package/dist/Toast.mjs +135 -128
- package/dist/Toggle.mjs +27 -24
- package/dist/Tooltip.mjs +103 -99
- package/dist/UniversalLink.mjs +15 -15
- package/dist/{VEVQD5MH-CuegL0m0.mjs → VEVQD5MH-0w9Y7Ytc.mjs} +3 -3
- package/dist/{VGCJ63VH-BMzoZtCu.mjs → VGCJ63VH-C0UPBY-5.mjs} +39 -38
- package/dist/VariantIcon.mjs +23 -22
- package/dist/WelcomeLoader.mjs +122 -121
- package/dist/WuiProvider.mjs +52 -44
- package/dist/{X5NMLKT6-CvSCix-_.mjs → X5NMLKT6-BJw3xE-K.mjs} +2 -2
- package/dist/{YV4JVR4I-Bh7B7TET.mjs → YV4JVR4I-DPC8mMuG.mjs} +57 -57
- package/dist/hide-focus-rings-root-CCXdysih.mjs +15 -0
- package/dist/{index-5PUh49rV.mjs → index-62h-enZF.mjs} +62 -61
- package/dist/{index-C7zM96J_.mjs → index-BaLGEKs7.mjs} +8 -8
- package/dist/index-CYmF7qCH.mjs +11 -0
- package/dist/index-C_k-m0Rl.mjs +36 -0
- package/dist/index-D8v_VJ9z.mjs +26 -0
- package/dist/{index-BNGGwOCo.mjs → index-DAZ1SYdj.mjs} +7 -7
- package/dist/index-DpkNUfAS.mjs +11 -0
- package/dist/{index-DqBUFsqP.mjs → index-DvzWKxKE.mjs} +7 -7
- package/dist/{index-Bkl89twW.mjs → index-QaLwIvZS.mjs} +8 -8
- package/dist/{index-BQtDgQBH.mjs → index-SQQQ4dEE.mjs} +8 -8
- package/dist/index-i_anpNhw.mjs +66 -0
- package/dist/index-wl3X6EM1.mjs +16 -0
- package/dist/jsx-runtime-B7I4PJ0H.mjs +613 -0
- package/dist/radio-group-C0fUHvam.mjs +52 -0
- package/dist/theme.mjs +805 -805
- package/dist/types/components/Accordion/index.d.ts +1 -1
- package/dist/types/components/Alert/index.d.ts +2 -2
- package/dist/types/components/Alert/styles.d.ts +4 -4
- package/dist/types/components/Alert/theme.d.ts +4 -4
- package/dist/types/components/Avatar/index.d.ts +1 -1
- package/dist/types/components/Avatar/styles.d.ts +4 -4
- package/dist/types/components/Avatar/theme.d.ts +1 -1
- package/dist/types/components/Badge/index.d.ts +2 -2
- package/dist/types/components/Badge/styles.d.ts +2 -2
- package/dist/types/components/Breadcrumb/Item.d.ts +1 -1
- package/dist/types/components/Breadcrumb/index.d.ts +1 -1
- package/dist/types/components/Button/index.d.ts +4 -5
- package/dist/types/components/Button/theme.d.ts +7 -7
- package/dist/types/components/ButtonGroup/index.d.ts +3 -3
- package/dist/types/components/Card/Cover.styles.d.ts +2 -2
- package/dist/types/components/Card/index.d.ts +2 -3
- package/dist/types/components/Checkbox/index.d.ts +2 -2
- package/dist/types/components/ClearButton/index.d.ts +4 -5
- package/dist/types/components/ClearButton/styles.d.ts +2 -2
- package/dist/types/components/CloseButton/styles.d.ts +2 -2
- package/dist/types/components/DatePicker/index.d.ts +3 -3
- package/dist/types/components/DateTimePicker/index.d.ts +2 -2
- package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/CustomInput.d.ts +5 -5
- package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/index.d.ts +2 -2
- package/dist/types/components/DateTimePickerCommon/utils.d.ts +1 -1
- package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +1 -1
- package/dist/types/components/Drawer/AssetDrawer/index.d.ts +1 -1
- package/dist/types/components/Drawer/index.d.ts +8 -8
- package/dist/types/components/Drawer/styles.d.ts +3 -3
- package/dist/types/components/Drawer/theme.d.ts +1 -1
- package/dist/types/components/DropdownMenu/index.d.ts +4 -4
- package/dist/types/components/Field/index.d.ts +8 -8
- package/dist/types/components/Field/styles.d.ts +1 -1
- package/dist/types/components/Field/utils.d.ts +1 -1
- package/dist/types/components/FileDrop/FilePreview.d.ts +2 -2
- package/dist/types/components/FileDrop/Message.d.ts +1 -1
- package/dist/types/components/FileDrop/index.d.ts +16 -16
- package/dist/types/components/FileUpload/index.d.ts +13 -13
- package/dist/types/components/Files/index.d.ts +4 -4
- package/dist/types/components/Files/types.d.ts +1 -1
- package/dist/types/components/Hint/index.d.ts +1 -2
- package/dist/types/components/Icon/index.d.ts +3 -3
- package/dist/types/components/Icon/styles.d.ts +3 -3
- package/dist/types/components/Icon/theme.d.ts +1 -1
- package/dist/types/components/Icons/index.d.ts +2 -2
- package/dist/types/components/IconsFont/index.d.ts +2 -3
- package/dist/types/components/IconsFont/styles.d.ts +1 -1
- package/dist/types/components/InputText/index.d.ts +1 -1
- package/dist/types/components/InputText/styles.d.ts +1 -1
- package/dist/types/components/Label/index.d.ts +2 -3
- package/dist/types/components/Link/index.d.ts +3 -3
- package/dist/types/components/Link/styles.d.ts +2 -2
- package/dist/types/components/Loader/index.d.ts +1 -1
- package/dist/types/components/Loader/styles.d.ts +2 -2
- package/dist/types/components/Loader/theme.d.ts +2 -2
- package/dist/types/components/Logo/Solutions.d.ts +1 -2
- package/dist/types/components/Logo/Symbol.d.ts +1 -2
- package/dist/types/components/Logo/Wui.d.ts +1 -2
- package/dist/types/components/Logo/index.d.ts +5 -5
- package/dist/types/components/Modal/Assets/Backdrop.d.ts +4 -5
- package/dist/types/components/Modal/Assets/Iframe.d.ts +1 -2
- package/dist/types/components/Modal/Assets/index.d.ts +5 -5
- package/dist/types/components/Modal/Assets/styles.d.ts +4 -4
- package/dist/types/components/Modal/Close.d.ts +1 -2
- package/dist/types/components/Modal/Footer.d.ts +1 -1
- package/dist/types/components/Modal/Header.d.ts +2 -2
- package/dist/types/components/Modal/index.d.ts +11 -11
- package/dist/types/components/Modal/styles.d.ts +4 -4
- package/dist/types/components/Modal/theme.d.ts +1 -1
- package/dist/types/components/Pagination/index.d.ts +2 -2
- package/dist/types/components/Pagination/utils.d.ts +1 -1
- package/dist/types/components/Popover/Arrow.d.ts +1 -2
- package/dist/types/components/Popover/Content.d.ts +2 -3
- package/dist/types/components/Popover/Popover.d.ts +4 -5
- package/dist/types/components/Popover/PopoverHover.d.ts +3 -4
- package/dist/types/components/Popover/Trigger.d.ts +1 -1
- package/dist/types/components/Popover/usePopover.d.ts +6 -6
- package/dist/types/components/Radio/index.d.ts +5 -5
- package/dist/types/components/Radio/styles.d.ts +2 -2
- package/dist/types/components/RadioGroup/index.d.ts +2 -2
- package/dist/types/components/RadioTab/index.d.ts +2 -2
- package/dist/types/components/RadioTab/styles.d.ts +9 -9
- package/dist/types/components/Search/index.d.ts +4 -4
- package/dist/types/components/Select/index.d.ts +9 -9
- package/dist/types/components/Select/styles.d.ts +4 -4
- package/dist/types/components/Select/utils.d.ts +4 -4
- package/dist/types/components/Shape/index.d.ts +1 -1
- package/dist/types/components/Shape/styles.d.ts +2 -2
- package/dist/types/components/Slider/Range.d.ts +3 -3
- package/dist/types/components/Slider/index.d.ts +2 -2
- package/dist/types/components/Slider/styles.d.ts +10 -10
- package/dist/types/components/Stack/index.d.ts +1 -1
- package/dist/types/components/Swiper/index.d.ts +16 -17
- package/dist/types/components/Swiper/styles.d.ts +55 -55
- package/dist/types/components/System/index.d.ts +10 -10
- package/dist/types/components/Table/index.d.ts +6 -7
- package/dist/types/components/Table/styles.d.ts +1 -1
- package/dist/types/components/Tabs/ActiveBar.d.ts +5 -5
- package/dist/types/components/Tabs/TabList.d.ts +2 -2
- package/dist/types/components/Tabs/TabPanel.d.ts +2 -2
- package/dist/types/components/Tabs/theme.d.ts +1 -1
- package/dist/types/components/Tag/index.d.ts +2 -3
- package/dist/types/components/Tag/styles.d.ts +1 -1
- package/dist/types/components/Tag/theme.d.ts +2 -2
- package/dist/types/components/Text/index.d.ts +2 -2
- package/dist/types/components/Textarea/index.d.ts +1 -1
- package/dist/types/components/TimePicker/index.d.ts +2 -2
- package/dist/types/components/Toast/Growl.d.ts +1 -1
- package/dist/types/components/Toast/Snackbar.d.ts +1 -1
- package/dist/types/components/Toast/ToastWrapper.d.ts +4 -4
- package/dist/types/components/Toast/index.d.ts +5 -5
- package/dist/types/components/Toast/styles.d.ts +10 -10
- package/dist/types/components/Toast/theme.d.ts +1 -1
- package/dist/types/components/Toast/utils.d.ts +13 -13
- package/dist/types/components/Toggle/index.d.ts +2 -2
- package/dist/types/components/Toggle/theme.d.ts +4 -4
- package/dist/types/components/Tooltip/index.d.ts +3 -3
- package/dist/types/components/VariantIcon/index.d.ts +1 -1
- package/dist/types/components/VariantIcon/styles.d.ts +1 -1
- package/dist/types/components/VariantIcon/theme.d.ts +1 -1
- package/dist/types/theme/colors.d.ts +3 -3
- package/dist/types/theme/dark.d.ts +1 -1
- package/dist/types/theme/defaultFields.d.ts +5 -5
- package/dist/types/theme/fonts.d.ts +5 -5
- package/dist/types/theme/index.d.ts +31 -31
- package/dist/types/theme/screens.d.ts +7 -7
- package/dist/types/theme/space.d.ts +9 -9
- package/dist/types/utils/field-styles.d.ts +2 -2
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/utils/ts-utils.d.ts +1 -1
- package/dist/types/utils/use-copy-text.d.ts +1 -1
- package/dist/types/utils/use-create-portal.d.ts +1 -1
- package/dist/types/utils/wrap-children.d.ts +1 -1
- package/dist/{use-viewport-CfklieD-.mjs → use-viewport-CWpjoHXy.mjs} +2 -2
- package/dist/utils.mjs +13 -13
- package/dist/wrap-children-CzmhoRzd.mjs +13 -0
- package/package.json +3 -27
- package/dist/LVA2YJMS-DDEmK0pp.mjs +0 -1482
- package/dist/hide-focus-rings-root-BNyva1yb.mjs +0 -14
- package/dist/index-B0gDDiFm.mjs +0 -66
- package/dist/index-B22SHR8h.mjs +0 -26
- package/dist/index-CQD9fgf_.mjs +0 -11
- package/dist/index-CmsWSKKs.mjs +0 -11
- package/dist/index-u1oHKa7X.mjs +0 -16
- package/dist/index-wr_b5GSV.mjs +0 -36
- package/dist/radio-group-RFyDp0KD.mjs +0 -51
- package/dist/wrap-children-aq69jtFP.mjs +0 -12
- package/dist/{downshift.esm-D0ns_SQs.mjs → downshift.esm-B7Jil1wW.mjs} +9 -9
package/dist/Select.mjs
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import { D as
|
|
4
|
-
import { g as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
2
|
+
import { j as p } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
|
+
import { D as he } from "./downshift.esm-B7Jil1wW.mjs";
|
|
4
|
+
import { g as ze } from "./_commonjsHelpers-CXJ7dpIk.mjs";
|
|
5
|
+
import Le, { useMemo as Ze, useState as B, useEffect as pe, Fragment as Qe } from "react";
|
|
6
|
+
import { ClearButton as Xe } from "./ClearButton.mjs";
|
|
7
|
+
import { StyledIcon as qe } from "./Icon.mjs";
|
|
8
|
+
import { D as Ge } from "./index-DAZ1SYdj.mjs";
|
|
9
|
+
import { shouldForwardProp as te, forwardRef as Je } from "./System.mjs";
|
|
10
|
+
import { c as et } from "./create-event-rXDe5aCQ.mjs";
|
|
11
|
+
import { d as tt, F as nt } from "./field-styles-CfVLcVQp.mjs";
|
|
12
|
+
import { StyledTag as rt, Tag as ot } from "./Tag.mjs";
|
|
13
|
+
import b, { system as Ce, th as E, css as _ } from "@xstyled/styled-components";
|
|
14
|
+
import { Box as st } from "./Box.mjs";
|
|
15
|
+
import { IconWrapper as it } from "./Field.mjs";
|
|
8
16
|
import { o as G } from "./overflow-ellipsis-DGV5Kgt-.mjs";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import { shouldForwardProp as te, forwardRef as nt } from "./System.mjs";
|
|
13
|
-
import { Box as rt } from "./Box.mjs";
|
|
14
|
-
import { ClearButton as ot } from "./ClearButton.mjs";
|
|
15
|
-
import { D as at } from "./index-BNGGwOCo.mjs";
|
|
16
|
-
var _ = { exports: {} }, ge;
|
|
17
|
-
function it() {
|
|
18
|
-
if (ge) return _.exports;
|
|
17
|
+
var F = { exports: {} }, ge;
|
|
18
|
+
function lt() {
|
|
19
|
+
if (ge) return F.exports;
|
|
19
20
|
ge = 1;
|
|
20
21
|
var e = {
|
|
21
22
|
À: "A",
|
|
@@ -478,18 +479,18 @@ function it() {
|
|
|
478
479
|
ё: "е",
|
|
479
480
|
Ё: "Е"
|
|
480
481
|
}, t = Object.keys(e).join("|"), n = new RegExp(t, "g"), r = new RegExp(t, "");
|
|
481
|
-
function o(
|
|
482
|
-
return e[
|
|
482
|
+
function o(a) {
|
|
483
|
+
return e[a];
|
|
483
484
|
}
|
|
484
|
-
var
|
|
485
|
-
return
|
|
486
|
-
}, u = function(
|
|
487
|
-
return !!
|
|
485
|
+
var s = function(a) {
|
|
486
|
+
return a.replace(n, o);
|
|
487
|
+
}, u = function(a) {
|
|
488
|
+
return !!a.match(r);
|
|
488
489
|
};
|
|
489
|
-
return
|
|
490
|
+
return F.exports = s, F.exports.has = u, F.exports.remove = s, F.exports;
|
|
490
491
|
}
|
|
491
|
-
var
|
|
492
|
-
const
|
|
492
|
+
var at = lt();
|
|
493
|
+
const ct = /* @__PURE__ */ ze(at);
|
|
493
494
|
/**
|
|
494
495
|
* @name match-sorter
|
|
495
496
|
* @license MIT license.
|
|
@@ -505,62 +506,62 @@ const I = {
|
|
|
505
506
|
ACRONYM: 2,
|
|
506
507
|
MATCHES: 1,
|
|
507
508
|
NO_MATCH: 0
|
|
508
|
-
},
|
|
509
|
+
}, ut = (e, t) => String(e.rankedValue).localeCompare(String(t.rankedValue));
|
|
509
510
|
function J(e, t, n) {
|
|
510
511
|
n === void 0 && (n = {});
|
|
511
512
|
const {
|
|
512
513
|
keys: r,
|
|
513
514
|
threshold: o = I.MATCHES,
|
|
514
|
-
baseSort:
|
|
515
|
-
sorter: u = (f) => f.sort((d, i) =>
|
|
516
|
-
} = n,
|
|
517
|
-
return u(
|
|
515
|
+
baseSort: s = ut,
|
|
516
|
+
sorter: u = (f) => f.sort((d, i) => ht(d, i, s))
|
|
517
|
+
} = n, a = e.reduce(c, []);
|
|
518
|
+
return u(a).map((f) => {
|
|
518
519
|
let {
|
|
519
520
|
item: d
|
|
520
521
|
} = f;
|
|
521
522
|
return d;
|
|
522
523
|
});
|
|
523
524
|
function c(f, d, i) {
|
|
524
|
-
const
|
|
525
|
-
rank:
|
|
526
|
-
keyThreshold:
|
|
527
|
-
} =
|
|
528
|
-
return
|
|
529
|
-
...
|
|
525
|
+
const m = dt(d, r, t, n), {
|
|
526
|
+
rank: O,
|
|
527
|
+
keyThreshold: x = o
|
|
528
|
+
} = m;
|
|
529
|
+
return O >= x && f.push({
|
|
530
|
+
...m,
|
|
530
531
|
item: d,
|
|
531
532
|
index: i
|
|
532
533
|
}), f;
|
|
533
534
|
}
|
|
534
535
|
}
|
|
535
536
|
J.rankings = I;
|
|
536
|
-
function
|
|
537
|
+
function dt(e, t, n, r) {
|
|
537
538
|
if (!t) {
|
|
538
|
-
const
|
|
539
|
+
const s = e;
|
|
539
540
|
return {
|
|
540
541
|
// ends up being duplicate of 'item' in matches but consistent
|
|
541
|
-
rankedValue:
|
|
542
|
-
rank: Ie(
|
|
542
|
+
rankedValue: s,
|
|
543
|
+
rank: Ie(s, n, r),
|
|
543
544
|
keyIndex: -1,
|
|
544
545
|
keyThreshold: r.threshold
|
|
545
546
|
};
|
|
546
547
|
}
|
|
547
|
-
return
|
|
548
|
+
return It(e, t).reduce((s, u, a) => {
|
|
548
549
|
let {
|
|
549
550
|
rank: c,
|
|
550
551
|
rankedValue: f,
|
|
551
552
|
keyIndex: d,
|
|
552
553
|
keyThreshold: i
|
|
553
|
-
} =
|
|
554
|
-
itemValue:
|
|
555
|
-
attributes:
|
|
556
|
-
} = u,
|
|
554
|
+
} = s, {
|
|
555
|
+
itemValue: m,
|
|
556
|
+
attributes: O
|
|
557
|
+
} = u, x = Ie(m, n, r), U = f;
|
|
557
558
|
const {
|
|
558
|
-
minRanking:
|
|
559
|
-
maxRanking:
|
|
559
|
+
minRanking: $,
|
|
560
|
+
maxRanking: H,
|
|
560
561
|
threshold: K
|
|
561
|
-
} =
|
|
562
|
-
return
|
|
563
|
-
rankedValue:
|
|
562
|
+
} = O;
|
|
563
|
+
return x < $ && x >= I.MATCHES ? x = $ : x > H && (x = H), x > c && (c = x, d = a, i = K, U = m), {
|
|
564
|
+
rankedValue: U,
|
|
564
565
|
rank: c,
|
|
565
566
|
keyIndex: d,
|
|
566
567
|
keyThreshold: i
|
|
@@ -573,25 +574,25 @@ function ut(e, t, n, r) {
|
|
|
573
574
|
});
|
|
574
575
|
}
|
|
575
576
|
function Ie(e, t, n) {
|
|
576
|
-
return e = Ae(e, n), t = Ae(t, n), t.length > e.length ? I.NO_MATCH : e === t ? I.CASE_SENSITIVE_EQUAL : (e = e.toLowerCase(), t = t.toLowerCase(), e === t ? I.EQUAL : e.startsWith(t) ? I.STARTS_WITH : e.includes(` ${t}`) ? I.WORD_STARTS_WITH : e.includes(t) ? I.CONTAINS : t.length === 1 ? I.NO_MATCH :
|
|
577
|
+
return e = Ae(e, n), t = Ae(t, n), t.length > e.length ? I.NO_MATCH : e === t ? I.CASE_SENSITIVE_EQUAL : (e = e.toLowerCase(), t = t.toLowerCase(), e === t ? I.EQUAL : e.startsWith(t) ? I.STARTS_WITH : e.includes(` ${t}`) ? I.WORD_STARTS_WITH : e.includes(t) ? I.CONTAINS : t.length === 1 ? I.NO_MATCH : ft(e).includes(t) ? I.ACRONYM : mt(e, t));
|
|
577
578
|
}
|
|
578
|
-
function
|
|
579
|
+
function ft(e) {
|
|
579
580
|
let t = "";
|
|
580
581
|
return e.split(" ").forEach((r) => {
|
|
581
|
-
r.split("-").forEach((
|
|
582
|
-
t +=
|
|
582
|
+
r.split("-").forEach((s) => {
|
|
583
|
+
t += s.substr(0, 1);
|
|
583
584
|
});
|
|
584
585
|
}), t;
|
|
585
586
|
}
|
|
586
|
-
function
|
|
587
|
+
function mt(e, t) {
|
|
587
588
|
let n = 0, r = 0;
|
|
588
589
|
function o(c, f, d) {
|
|
589
|
-
for (let i = d,
|
|
590
|
+
for (let i = d, m = f.length; i < m; i++)
|
|
590
591
|
if (f[i] === c)
|
|
591
592
|
return n += 1, i + 1;
|
|
592
593
|
return -1;
|
|
593
594
|
}
|
|
594
|
-
function
|
|
595
|
+
function s(c) {
|
|
595
596
|
const f = 1 / c, d = n / t.length;
|
|
596
597
|
return I.MATCHES + d * f;
|
|
597
598
|
}
|
|
@@ -604,26 +605,26 @@ function ft(e, t) {
|
|
|
604
605
|
if (r = o(d, e, r), !(r > -1))
|
|
605
606
|
return I.NO_MATCH;
|
|
606
607
|
}
|
|
607
|
-
const
|
|
608
|
-
return a
|
|
608
|
+
const a = r - u;
|
|
609
|
+
return s(a);
|
|
609
610
|
}
|
|
610
|
-
function
|
|
611
|
+
function ht(e, t, n) {
|
|
611
612
|
const {
|
|
612
|
-
rank:
|
|
613
|
+
rank: s,
|
|
613
614
|
keyIndex: u
|
|
614
615
|
} = e, {
|
|
615
|
-
rank:
|
|
616
|
+
rank: a,
|
|
616
617
|
keyIndex: c
|
|
617
618
|
} = t;
|
|
618
|
-
return
|
|
619
|
+
return s === a ? u === c ? n(e, t) : u < c ? -1 : 1 : s > a ? -1 : 1;
|
|
619
620
|
}
|
|
620
621
|
function Ae(e, t) {
|
|
621
622
|
let {
|
|
622
623
|
keepDiacritics: n
|
|
623
624
|
} = t;
|
|
624
|
-
return e = `${e}`, n || (e =
|
|
625
|
+
return e = `${e}`, n || (e = ct(e)), e;
|
|
625
626
|
}
|
|
626
|
-
function
|
|
627
|
+
function pt(e, t) {
|
|
627
628
|
typeof t == "object" && (t = t.key);
|
|
628
629
|
let n;
|
|
629
630
|
if (typeof t == "function")
|
|
@@ -634,109 +635,74 @@ function ht(e, t) {
|
|
|
634
635
|
n = e[t];
|
|
635
636
|
else {
|
|
636
637
|
if (t.includes("."))
|
|
637
|
-
return
|
|
638
|
+
return gt(t, e);
|
|
638
639
|
n = null;
|
|
639
640
|
}
|
|
640
641
|
return n == null ? [] : Array.isArray(n) ? n : [String(n)];
|
|
641
642
|
}
|
|
642
|
-
function
|
|
643
|
+
function gt(e, t) {
|
|
643
644
|
const n = e.split(".");
|
|
644
645
|
let r = [t];
|
|
645
|
-
for (let o = 0,
|
|
646
|
+
for (let o = 0, s = n.length; o < s; o++) {
|
|
646
647
|
const u = n[o];
|
|
647
|
-
let
|
|
648
|
+
let a = [];
|
|
648
649
|
for (let c = 0, f = r.length; c < f; c++) {
|
|
649
650
|
const d = r[c];
|
|
650
651
|
if (d != null)
|
|
651
652
|
if (Object.hasOwnProperty.call(d, u)) {
|
|
652
653
|
const i = d[u];
|
|
653
|
-
i != null &&
|
|
654
|
-
} else u === "*" && (
|
|
654
|
+
i != null && a.push(i);
|
|
655
|
+
} else u === "*" && (a = a.concat(d));
|
|
655
656
|
}
|
|
656
|
-
r =
|
|
657
|
+
r = a;
|
|
657
658
|
}
|
|
658
659
|
return Array.isArray(r[0]) ? [].concat(...r) : r;
|
|
659
660
|
}
|
|
660
|
-
function
|
|
661
|
+
function It(e, t) {
|
|
661
662
|
const n = [];
|
|
662
663
|
for (let r = 0, o = t.length; r < o; r++) {
|
|
663
|
-
const
|
|
664
|
-
for (let c = 0, f =
|
|
664
|
+
const s = t[r], u = At(s), a = pt(e, s);
|
|
665
|
+
for (let c = 0, f = a.length; c < f; c++)
|
|
665
666
|
n.push({
|
|
666
|
-
itemValue:
|
|
667
|
+
itemValue: a[c],
|
|
667
668
|
attributes: u
|
|
668
669
|
});
|
|
669
670
|
}
|
|
670
671
|
return n;
|
|
671
672
|
}
|
|
672
|
-
const
|
|
673
|
+
const xe = {
|
|
673
674
|
maxRanking: 1 / 0,
|
|
674
675
|
minRanking: -1 / 0
|
|
675
676
|
};
|
|
676
|
-
function
|
|
677
|
-
return typeof e == "string" ?
|
|
678
|
-
...
|
|
677
|
+
function At(e) {
|
|
678
|
+
return typeof e == "string" ? xe : {
|
|
679
|
+
...xe,
|
|
679
680
|
...e
|
|
680
681
|
};
|
|
681
682
|
}
|
|
682
|
-
const
|
|
683
|
-
|
|
684
|
-
return String(e);
|
|
685
|
-
if (typeof e == "string") {
|
|
686
|
-
const t = e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g);
|
|
687
|
-
return t && t.map((n) => n.toLowerCase()).join("-");
|
|
688
|
-
}
|
|
689
|
-
}, ye = (e) => e ? e.label : ne, At = (e) => e.reduce(
|
|
690
|
-
(t, n) => n.label && t.length > n.label.length ? t : n.label,
|
|
691
|
-
ne
|
|
692
|
-
), Et = (e, t, n) => {
|
|
693
|
-
const r = t.find((o) => e.value === o.value);
|
|
694
|
-
return r && n ? t.filter((o) => e.value !== o.value) : r ? t : [...t, e];
|
|
695
|
-
}, X = (e, t) => !!t.find((n) => n.value === e), ee = (e, t = []) => t.find(
|
|
696
|
-
(r) => r.label === (e.label || e) || r.value === (e.value || e)
|
|
697
|
-
) || { value: xe(e), label: e }, yt = (e, t, n = !1) => {
|
|
698
|
-
const r = n ? t.flatMap((o) => o.options) : t;
|
|
699
|
-
return !e && e !== 0 ? [] : Array.isArray(e) ? e.map((o) => ee(o, r)) : [ee(e, r)];
|
|
700
|
-
}, vt = (e, t) => !!t.find((n) => n.value === e.value), bt = (e, t) => vt(e, t) ? e.value : e.label, ve = (e, t) => {
|
|
701
|
-
if (e)
|
|
702
|
-
return e.map((n) => bt(n, t));
|
|
703
|
-
}, Ct = (e, t) => {
|
|
704
|
-
if (e)
|
|
705
|
-
return e.filter(
|
|
706
|
-
(n) => !t.find((r) => r.value === n.value)
|
|
707
|
-
);
|
|
708
|
-
}, Ot = ({
|
|
709
|
-
inputValue: e,
|
|
710
|
-
isMultiple: t,
|
|
711
|
-
isSearchable: n,
|
|
712
|
-
options: r,
|
|
713
|
-
renderItem: o
|
|
714
|
-
}) => {
|
|
715
|
-
const a = ee(e, r);
|
|
716
|
-
return t ? e : a.label ? n ? a.label : o(a) : ne;
|
|
717
|
-
}, ke = C(Je)``, Se = C(rt).withConfig({ shouldForwardProp: te })(
|
|
718
|
-
({ disabled: e }) => W`
|
|
683
|
+
const Oe = b(it)``, ke = b(st).withConfig({ shouldForwardProp: te })(
|
|
684
|
+
({ disabled: e }) => _`
|
|
719
685
|
position: relative;
|
|
720
|
-
${
|
|
721
|
-
${
|
|
722
|
-
color: ${e ?
|
|
686
|
+
${Ce}
|
|
687
|
+
${Oe} {
|
|
688
|
+
color: ${e ? E("defaultFields.select.disabled.color") : "initial"};
|
|
723
689
|
}
|
|
724
690
|
`
|
|
725
|
-
), xt =
|
|
691
|
+
), xt = b.div`
|
|
726
692
|
position: relative;
|
|
727
|
-
`,
|
|
728
|
-
({ iconPlacement: e, isClearable: t, size: n, transparent: r, variant: o }) =>
|
|
693
|
+
`, ye = b.divBox.withConfig({ shouldForwardProp: te })(
|
|
694
|
+
({ iconPlacement: e, isClearable: t, size: n, transparent: r, variant: o }) => _`
|
|
729
695
|
position: relative;
|
|
730
|
-
${
|
|
696
|
+
${tt({
|
|
697
|
+
iconPlacement: e,
|
|
698
|
+
isClearable: t,
|
|
731
699
|
size: n,
|
|
732
|
-
variant: o,
|
|
733
700
|
transparent: r,
|
|
734
|
-
|
|
735
|
-
iconPlacement: e
|
|
701
|
+
variant: o
|
|
736
702
|
})};
|
|
737
703
|
${G};
|
|
738
704
|
cursor: pointer;
|
|
739
|
-
${
|
|
705
|
+
${Ce}
|
|
740
706
|
line-height: 1em;
|
|
741
707
|
|
|
742
708
|
br {
|
|
@@ -760,16 +726,16 @@ const ne = "", xe = (e) => {
|
|
|
760
726
|
left: 0;
|
|
761
727
|
${G};
|
|
762
728
|
padding: inherit;
|
|
763
|
-
${
|
|
729
|
+
${E("defaultFields.placeholder")}
|
|
764
730
|
}
|
|
765
731
|
&::before {
|
|
766
732
|
height: auto;
|
|
767
733
|
}
|
|
768
734
|
}
|
|
769
735
|
`
|
|
770
|
-
),
|
|
771
|
-
${
|
|
772
|
-
${
|
|
736
|
+
), yt = b.ul`
|
|
737
|
+
${E("defaultFields.select.default")};
|
|
738
|
+
${E("cards.default")};
|
|
773
739
|
position: absolute;
|
|
774
740
|
z-index: 2;
|
|
775
741
|
right: 0;
|
|
@@ -784,22 +750,22 @@ const ne = "", xe = (e) => {
|
|
|
784
750
|
&:hover > * {
|
|
785
751
|
cursor: pointer;
|
|
786
752
|
}
|
|
787
|
-
`,
|
|
788
|
-
({ allowUnselectFromList: e, isDisabled: t, isHighlighted: n, isMultiple: r, isSelected: o }) =>
|
|
753
|
+
`, X = b.li(
|
|
754
|
+
({ allowUnselectFromList: e, isDisabled: t, isHighlighted: n, isMultiple: r, isSelected: o }) => _`
|
|
789
755
|
color: beige-70;
|
|
790
|
-
${n &&
|
|
791
|
-
${o && !r &&
|
|
792
|
-
${o && r && !e &&
|
|
793
|
-
${t &&
|
|
756
|
+
${n && E("defaultFields.select.highlighted")};
|
|
757
|
+
${o && !r && E("defaultFields.select.selected")};
|
|
758
|
+
${o && r && !e && E("defaultFields.select.existing")};
|
|
759
|
+
${t && E("defaultFields.select.disabled")};
|
|
794
760
|
${G};
|
|
795
761
|
padding: md;
|
|
796
762
|
list-style: none;
|
|
797
763
|
text-decoration: none;
|
|
798
764
|
font-size: sm;
|
|
799
|
-
transition: background ${
|
|
765
|
+
transition: background ${E.transition("medium")};
|
|
800
766
|
`
|
|
801
|
-
),
|
|
802
|
-
({ size: e }) =>
|
|
767
|
+
), Et = b.divBox(
|
|
768
|
+
({ size: e }) => _`
|
|
803
769
|
position: absolute;
|
|
804
770
|
padding: 0;
|
|
805
771
|
top: 0;
|
|
@@ -808,8 +774,8 @@ const ne = "", xe = (e) => {
|
|
|
808
774
|
display: flex;
|
|
809
775
|
gap: xs;
|
|
810
776
|
`
|
|
811
|
-
),
|
|
812
|
-
({ isOpen: e }) =>
|
|
777
|
+
), Ee = b.button.withConfig({ shouldForwardProp: te })(
|
|
778
|
+
({ isOpen: e }) => _`
|
|
813
779
|
position: relative;
|
|
814
780
|
height: 100%;
|
|
815
781
|
padding: 0;
|
|
@@ -822,7 +788,7 @@ const ne = "", xe = (e) => {
|
|
|
822
788
|
align-items: center;
|
|
823
789
|
justify-content: center;
|
|
824
790
|
|
|
825
|
-
${
|
|
791
|
+
${qe} {
|
|
826
792
|
transform: ${e ? "rotate3d(0, 0, 1, 180deg)" : "rotate3d(0)"};
|
|
827
793
|
transition: medium;
|
|
828
794
|
}
|
|
@@ -832,14 +798,14 @@ const ne = "", xe = (e) => {
|
|
|
832
798
|
}
|
|
833
799
|
|
|
834
800
|
&:disabled {
|
|
835
|
-
color: ${
|
|
801
|
+
color: ${E("defaultFields.select.disabled.color")};
|
|
836
802
|
}
|
|
837
803
|
`
|
|
838
|
-
),
|
|
804
|
+
), vt = b.divBox`
|
|
839
805
|
margin-top: lg;
|
|
840
806
|
|
|
841
807
|
${/* sc-selector */
|
|
842
|
-
|
|
808
|
+
rt}:not(:last-child) {
|
|
843
809
|
margin-right: sm;
|
|
844
810
|
margin-bottom: sm;
|
|
845
811
|
}
|
|
@@ -848,222 +814,274 @@ et}:not(:last-child) {
|
|
|
848
814
|
display: none;
|
|
849
815
|
}
|
|
850
816
|
`;
|
|
851
|
-
function
|
|
852
|
-
return /* @__PURE__ */
|
|
817
|
+
function bt(e, t) {
|
|
818
|
+
return /* @__PURE__ */ p.jsx(vt, { role: "list", children: e.map((n) => /* @__PURE__ */ p.jsx(ot, { onRemove: () => t(n.value.toString()), role: "listitem", children: n.label }, n.value)) });
|
|
853
819
|
}
|
|
854
|
-
const
|
|
820
|
+
const ne = "", Se = (e) => {
|
|
821
|
+
if (typeof e == "number")
|
|
822
|
+
return String(e);
|
|
823
|
+
if (typeof e == "string") {
|
|
824
|
+
const t = e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g);
|
|
825
|
+
return t && t.map((n) => n.toLowerCase()).join("-");
|
|
826
|
+
}
|
|
827
|
+
}, ve = (e) => e ? e.label : ne, Ct = (e) => e.reduce(
|
|
828
|
+
(t, n) => n.label && t.length > n.label.length ? t : n.label,
|
|
829
|
+
ne
|
|
830
|
+
), Ot = (e, t, n) => {
|
|
831
|
+
const r = t.find((o) => e.value === o.value);
|
|
832
|
+
return r && n ? t.filter((o) => e.value !== o.value) : r ? t : [...t, e];
|
|
833
|
+
}, q = (e, t) => !!t.find((n) => n.value === e), ee = (e, t = []) => t.find(
|
|
834
|
+
(r) => r.label === (e.label || e) || r.value === (e.value || e)
|
|
835
|
+
) || { label: e, value: Se(e) }, kt = (e, t, n = !1) => {
|
|
836
|
+
const r = n ? t.flatMap((o) => o.options) : t;
|
|
837
|
+
return !e && e !== 0 ? [] : Array.isArray(e) ? e.map((o) => ee(o, r)) : [ee(e, r)];
|
|
838
|
+
}, St = (e, t) => !!t.find((n) => n.value === e.value), wt = (e, t) => St(e, t) ? e.value : e.label, be = (e, t) => {
|
|
839
|
+
if (e)
|
|
840
|
+
return e.map((n) => wt(n, t));
|
|
841
|
+
}, jt = (e, t) => {
|
|
842
|
+
if (e)
|
|
843
|
+
return e.filter(
|
|
844
|
+
(n) => !t.find((r) => r.value === n.value)
|
|
845
|
+
);
|
|
846
|
+
}, Tt = ({
|
|
847
|
+
inputValue: e,
|
|
848
|
+
isMultiple: t,
|
|
849
|
+
isSearchable: n,
|
|
850
|
+
options: r,
|
|
851
|
+
renderItem: o
|
|
852
|
+
}) => {
|
|
853
|
+
const s = ee(e, r);
|
|
854
|
+
return t ? e : s.label ? n ? s.label : o(s) : ne;
|
|
855
|
+
}, Vt = he.default || he, Lt = Je(
|
|
855
856
|
({
|
|
856
857
|
allowUnselectFromList: e,
|
|
857
858
|
autoComplete: t = "off",
|
|
858
859
|
autoFocus: n,
|
|
859
860
|
dataTestId: r,
|
|
860
861
|
disableCloseOnSelect: o,
|
|
861
|
-
disabled:
|
|
862
|
+
disabled: s,
|
|
862
863
|
groupsEnabled: u,
|
|
863
|
-
icon:
|
|
864
|
+
icon: a,
|
|
864
865
|
id: c,
|
|
865
866
|
isClearable: f,
|
|
866
867
|
isCreatable: d,
|
|
867
868
|
isMultiple: i,
|
|
868
|
-
isSearchable:
|
|
869
|
-
name:
|
|
870
|
-
onBlur:
|
|
871
|
-
onChange:
|
|
872
|
-
onClick:
|
|
873
|
-
onCreate:
|
|
869
|
+
isSearchable: m,
|
|
870
|
+
name: O,
|
|
871
|
+
onBlur: x,
|
|
872
|
+
onChange: U,
|
|
873
|
+
onClick: $,
|
|
874
|
+
onCreate: H,
|
|
874
875
|
onFocus: K,
|
|
875
876
|
options: A = [],
|
|
876
877
|
placeholder: re = "Choose from…",
|
|
877
878
|
renderCreateItem: we = (w) => `Create "${w}"`,
|
|
878
|
-
renderGroupHeader:
|
|
879
|
-
renderItem: Y =
|
|
880
|
-
renderMultiple:
|
|
881
|
-
size:
|
|
882
|
-
transparent:
|
|
879
|
+
renderGroupHeader: je,
|
|
880
|
+
renderItem: Y = ve,
|
|
881
|
+
renderMultiple: Te = bt,
|
|
882
|
+
size: W = "md",
|
|
883
|
+
transparent: Ve,
|
|
883
884
|
value: oe,
|
|
884
|
-
variant:
|
|
885
|
-
...
|
|
886
|
-
},
|
|
887
|
-
const w =
|
|
888
|
-
() =>
|
|
885
|
+
variant: Re,
|
|
886
|
+
...se
|
|
887
|
+
}, N) => {
|
|
888
|
+
const w = Ze(
|
|
889
|
+
() => kt(oe, A, u),
|
|
889
890
|
[oe, A, u]
|
|
890
|
-
), z = !i && w[0] || null, L = z ? z.label : "", [k, Z] = B(w), [
|
|
891
|
-
|
|
892
|
-
var
|
|
893
|
-
n && ((
|
|
894
|
-
}, [
|
|
895
|
-
Z(w),
|
|
891
|
+
), z = !i && w[0] || null, L = z ? z.label : "", [k, Z] = B(w), [v, D] = B(L), [M, P] = B(A), [S, j] = B(!1);
|
|
892
|
+
m = d || m, pe(() => {
|
|
893
|
+
var l;
|
|
894
|
+
n && ((l = N == null ? void 0 : N.current) == null || l.focus(), m && j(!0));
|
|
895
|
+
}, [m, n, N]), pe(() => {
|
|
896
|
+
Z(w), D(L), P(A);
|
|
896
897
|
}, [L, A, w]);
|
|
897
|
-
const
|
|
898
|
-
if (
|
|
899
|
-
let
|
|
900
|
-
u ?
|
|
898
|
+
const Ue = (l) => {
|
|
899
|
+
if (m && l !== v) {
|
|
900
|
+
let h = [];
|
|
901
|
+
u ? h = J(A, l, {
|
|
901
902
|
// should match on group.label OR group.options.label
|
|
902
|
-
keys: [(g) => g.label, (g) => g.options.map((
|
|
903
|
-
}) :
|
|
903
|
+
keys: [(g) => g.label, (g) => g.options.map((T) => T.label)]
|
|
904
|
+
}) : h = J(A, l, { keys: ["label"] }), D(l), P(h);
|
|
904
905
|
}
|
|
905
|
-
},
|
|
906
|
-
|
|
907
|
-
}, ie = (
|
|
908
|
-
let
|
|
909
|
-
u ?
|
|
910
|
-
|
|
911
|
-
A.flatMap((
|
|
912
|
-
) :
|
|
913
|
-
const g = i ?
|
|
914
|
-
if (
|
|
915
|
-
const
|
|
916
|
-
|
|
906
|
+
}, $e = () => {
|
|
907
|
+
m && !S && j(!0);
|
|
908
|
+
}, ie = (l) => {
|
|
909
|
+
let h = [];
|
|
910
|
+
u ? h = be(
|
|
911
|
+
l,
|
|
912
|
+
A.flatMap((V) => V.options)
|
|
913
|
+
) : h = be(l, A);
|
|
914
|
+
const g = i ? h : h[0], T = et({ name: O, value: i ? l : l[0] });
|
|
915
|
+
if (U && U(g, T), d) {
|
|
916
|
+
const V = jt(l, A);
|
|
917
|
+
V.length && H && H(V[0].label, T);
|
|
917
918
|
}
|
|
918
|
-
},
|
|
919
|
-
let
|
|
920
|
-
!
|
|
921
|
-
},
|
|
922
|
-
const
|
|
923
|
-
Z(
|
|
924
|
-
},
|
|
925
|
-
i &&
|
|
926
|
-
},
|
|
927
|
-
inputValue:
|
|
919
|
+
}, He = (l) => {
|
|
920
|
+
let h, g;
|
|
921
|
+
!l || l != null && l.disabled ? (h = i ? k : [], g = !0) : (h = i ? Ot(l, k, e) : [l], g = i), g && D(""), P(A), Z(h), ie(h), o || j(!1);
|
|
922
|
+
}, Ne = (l) => {
|
|
923
|
+
const h = k.filter((g) => g.value !== l);
|
|
924
|
+
Z(h), ie(h);
|
|
925
|
+
}, De = (l) => {
|
|
926
|
+
i && l.selectedItem ? D("") : m && l.selectedItem && D(l.selectedItem.label), P(A), j(!1);
|
|
927
|
+
}, Fe = Ct(A), le = Tt({
|
|
928
|
+
inputValue: v,
|
|
928
929
|
isMultiple: i,
|
|
929
|
-
isSearchable:
|
|
930
|
+
isSearchable: m,
|
|
930
931
|
options: A,
|
|
931
932
|
renderItem: Y
|
|
932
933
|
});
|
|
933
|
-
return /* @__PURE__ */
|
|
934
|
+
return /* @__PURE__ */ p.jsx(
|
|
934
935
|
Vt,
|
|
935
936
|
{
|
|
936
937
|
id: c,
|
|
937
|
-
inputValue:
|
|
938
|
+
inputValue: m ? le : "",
|
|
938
939
|
isOpen: S,
|
|
939
|
-
itemToString:
|
|
940
|
-
onInputValueChange:
|
|
941
|
-
onOuterClick:
|
|
942
|
-
onSelect:
|
|
943
|
-
selectedItem: z
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
},
|
|
971
|
-
/* @__PURE__ */ m.createElement(at, { size: "sm" })
|
|
972
|
-
), Ke = (U) => {
|
|
973
|
-
H && H(U), T(!S);
|
|
974
|
-
}, Ye = R(ae), ce = p({
|
|
975
|
-
autoComplete: t,
|
|
976
|
-
autoFocus: n,
|
|
977
|
-
"data-spacer": _e || re,
|
|
978
|
-
"data-testid": r,
|
|
979
|
-
disabled: a,
|
|
980
|
-
iconPlacement: l ? "both" : "right",
|
|
981
|
-
id: c,
|
|
982
|
-
name: x,
|
|
983
|
-
onBlur: E,
|
|
984
|
-
onClick: a ? void 0 : Ke,
|
|
985
|
-
onFocus: K,
|
|
986
|
-
onKeyDown: He,
|
|
987
|
-
placeholder: re,
|
|
988
|
-
ref: D,
|
|
989
|
-
size: M,
|
|
990
|
-
tabIndex: 0,
|
|
991
|
-
variant: S ? "focused" : Ue,
|
|
992
|
-
isClearable: f,
|
|
993
|
-
transparent: Re,
|
|
994
|
-
...ae
|
|
995
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
996
|
-
}), ue = qe[M];
|
|
997
|
-
return /* @__PURE__ */ m.createElement(Se, { ...Ye, disabled: a }, /* @__PURE__ */ m.createElement(xt, null, h ? /* @__PURE__ */ m.createElement(be, { as: "input", type: "text", ...ce }) : /* @__PURE__ */ m.createElement(be, { ...ce }, se), l && /* @__PURE__ */ m.createElement(ke, { iconPlacement: "left", size: ue }, m.cloneElement(l, { ...l.props, size: ue })), /* @__PURE__ */ m.createElement(St, { size: M }, je && Pe, Be)), Me && /* @__PURE__ */ m.createElement(kt, { ...V() }, j.reduce(
|
|
998
|
-
(U, y, de) => {
|
|
999
|
-
if (u && "options" in y)
|
|
1000
|
-
U.itemsToRender.push(
|
|
1001
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1002
|
-
// @ts-ignore
|
|
1003
|
-
/* @__PURE__ */ m.createElement(Le, { key: y.label }, Te(y), y.options && y.options.map((O) => {
|
|
1004
|
-
const fe = U.itemIndex++, me = X(O.value, k);
|
|
1005
|
-
return /* @__PURE__ */ m.createElement(
|
|
1006
|
-
q,
|
|
1007
|
-
{
|
|
1008
|
-
allowUnselectFromList: e,
|
|
1009
|
-
isDisabled: O.disabled,
|
|
1010
|
-
isHighlighted: Q === fe,
|
|
1011
|
-
isMultiple: i,
|
|
1012
|
-
key: O.value,
|
|
1013
|
-
...g({
|
|
1014
|
-
index: fe,
|
|
1015
|
-
isSelected: me,
|
|
1016
|
-
item: O
|
|
1017
|
-
})
|
|
1018
|
-
},
|
|
1019
|
-
Y(O, me)
|
|
1020
|
-
);
|
|
1021
|
-
}))
|
|
1022
|
-
);
|
|
1023
|
-
else if ("value" in y) {
|
|
1024
|
-
const O = X(y.value, k);
|
|
1025
|
-
U.itemsToRender.push(
|
|
1026
|
-
/* @__PURE__ */ m.createElement(
|
|
1027
|
-
q,
|
|
1028
|
-
{
|
|
1029
|
-
allowUnselectFromList: e,
|
|
1030
|
-
isDisabled: y.disabled,
|
|
1031
|
-
isHighlighted: Q === de,
|
|
1032
|
-
isMultiple: i,
|
|
1033
|
-
key: y.value,
|
|
1034
|
-
...g({
|
|
1035
|
-
index: de,
|
|
1036
|
-
isSelected: O,
|
|
1037
|
-
item: y
|
|
1038
|
-
})
|
|
1039
|
-
},
|
|
1040
|
-
Y(y, O)
|
|
1041
|
-
)
|
|
1042
|
-
);
|
|
940
|
+
itemToString: ve,
|
|
941
|
+
onInputValueChange: Ue,
|
|
942
|
+
onOuterClick: De,
|
|
943
|
+
onSelect: He,
|
|
944
|
+
selectedItem: z,
|
|
945
|
+
children: ({
|
|
946
|
+
clearSelection: l,
|
|
947
|
+
getInputProps: h,
|
|
948
|
+
getItemProps: g,
|
|
949
|
+
getMenuProps: T,
|
|
950
|
+
getRootProps: V,
|
|
951
|
+
getToggleButtonProps: _e,
|
|
952
|
+
highlightedIndex: Q
|
|
953
|
+
}) => {
|
|
954
|
+
const ae = !!(d && v && !q(v, k)), We = S && (M.length || ae), Me = f && v, Pe = /* @__PURE__ */ p.jsx(Ee, { as: "div", children: /* @__PURE__ */ p.jsx(
|
|
955
|
+
Xe,
|
|
956
|
+
{
|
|
957
|
+
onClick: l
|
|
958
|
+
}
|
|
959
|
+
) }), Be = /* @__PURE__ */ p.jsx(
|
|
960
|
+
Ee,
|
|
961
|
+
{
|
|
962
|
+
"data-testid": r ? `${r}-arrow-icon` : null,
|
|
963
|
+
disabled: s,
|
|
964
|
+
isOpen: S,
|
|
965
|
+
size: W,
|
|
966
|
+
tabIndex: -1,
|
|
967
|
+
..._e({
|
|
968
|
+
onClick: () => j(!S)
|
|
969
|
+
}),
|
|
970
|
+
children: /* @__PURE__ */ p.jsx(Ge, { size: "sm" })
|
|
1043
971
|
}
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
972
|
+
), Ke = (R) => {
|
|
973
|
+
$ && $(R), j(!S);
|
|
974
|
+
}, Ye = V(se), ce = h({
|
|
975
|
+
autoComplete: t,
|
|
976
|
+
autoFocus: n,
|
|
977
|
+
"data-spacer": Fe || re,
|
|
978
|
+
"data-testid": r,
|
|
979
|
+
disabled: s,
|
|
980
|
+
iconPlacement: a ? "both" : "right",
|
|
981
|
+
id: c,
|
|
982
|
+
isClearable: f,
|
|
983
|
+
name: O,
|
|
984
|
+
onBlur: x,
|
|
985
|
+
onClick: s ? void 0 : Ke,
|
|
986
|
+
onFocus: K,
|
|
987
|
+
onKeyDown: $e,
|
|
988
|
+
placeholder: re,
|
|
989
|
+
ref: N,
|
|
990
|
+
size: W,
|
|
991
|
+
tabIndex: 0,
|
|
992
|
+
transparent: Ve,
|
|
993
|
+
variant: S ? "focused" : Re,
|
|
994
|
+
...se
|
|
995
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
996
|
+
}), ue = nt[W];
|
|
997
|
+
return /* @__PURE__ */ p.jsxs(ke, { ...Ye, disabled: s, children: [
|
|
998
|
+
/* @__PURE__ */ p.jsxs(xt, { children: [
|
|
999
|
+
m ? /* @__PURE__ */ p.jsx(ye, { as: "input", type: "text", ...ce }) : /* @__PURE__ */ p.jsx(ye, { ...ce, children: le }),
|
|
1000
|
+
a ? /* @__PURE__ */ p.jsx(Oe, { iconPlacement: "left", size: ue, children: Le.cloneElement(a, { ...a.props, size: ue }) }) : null,
|
|
1001
|
+
/* @__PURE__ */ p.jsxs(Et, { size: W, children: [
|
|
1002
|
+
Me ? Pe : null,
|
|
1003
|
+
Be
|
|
1004
|
+
] })
|
|
1005
|
+
] }),
|
|
1006
|
+
We ? /* @__PURE__ */ p.jsxs(yt, { ...T(), children: [
|
|
1007
|
+
M.reduce(
|
|
1008
|
+
(R, y, de) => {
|
|
1009
|
+
if (u && "options" in y)
|
|
1010
|
+
R.itemsToRender.push(
|
|
1011
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1012
|
+
// @ts-ignore
|
|
1013
|
+
/* @__PURE__ */ p.jsxs(Qe, { children: [
|
|
1014
|
+
je(y),
|
|
1015
|
+
y.options ? y.options.map((C) => {
|
|
1016
|
+
const fe = R.itemIndex++, me = q(C.value, k);
|
|
1017
|
+
return /* @__PURE__ */ p.jsx(
|
|
1018
|
+
X,
|
|
1019
|
+
{
|
|
1020
|
+
allowUnselectFromList: e,
|
|
1021
|
+
isDisabled: C.disabled,
|
|
1022
|
+
isHighlighted: Q === fe,
|
|
1023
|
+
isMultiple: i,
|
|
1024
|
+
...g({
|
|
1025
|
+
index: fe,
|
|
1026
|
+
isSelected: me,
|
|
1027
|
+
item: C
|
|
1028
|
+
}),
|
|
1029
|
+
children: Y(C, me)
|
|
1030
|
+
},
|
|
1031
|
+
C.value
|
|
1032
|
+
);
|
|
1033
|
+
}) : null
|
|
1034
|
+
] }, y.label)
|
|
1035
|
+
);
|
|
1036
|
+
else if ("value" in y) {
|
|
1037
|
+
const C = q(y.value, k);
|
|
1038
|
+
R.itemsToRender.push(
|
|
1039
|
+
/* @__PURE__ */ p.jsx(
|
|
1040
|
+
X,
|
|
1041
|
+
{
|
|
1042
|
+
allowUnselectFromList: e,
|
|
1043
|
+
isDisabled: y.disabled,
|
|
1044
|
+
isHighlighted: Q === de,
|
|
1045
|
+
isMultiple: i,
|
|
1046
|
+
...g({
|
|
1047
|
+
index: de,
|
|
1048
|
+
isSelected: C,
|
|
1049
|
+
item: y
|
|
1050
|
+
}),
|
|
1051
|
+
children: Y(y, C)
|
|
1052
|
+
},
|
|
1053
|
+
y.value
|
|
1054
|
+
)
|
|
1055
|
+
);
|
|
1056
|
+
}
|
|
1057
|
+
return R;
|
|
1058
|
+
},
|
|
1059
|
+
{ itemIndex: 0, itemsToRender: [] }
|
|
1060
|
+
).itemsToRender,
|
|
1061
|
+
ae && v.length ? /* @__PURE__ */ p.jsx(
|
|
1062
|
+
X,
|
|
1063
|
+
{
|
|
1064
|
+
isHighlighted: Q === M.length,
|
|
1065
|
+
...g({
|
|
1066
|
+
index: M.length,
|
|
1067
|
+
item: {
|
|
1068
|
+
label: v,
|
|
1069
|
+
value: Se(v)
|
|
1070
|
+
}
|
|
1071
|
+
}),
|
|
1072
|
+
children: we(v)
|
|
1073
|
+
},
|
|
1074
|
+
"add"
|
|
1075
|
+
) : null
|
|
1076
|
+
] }) : null,
|
|
1077
|
+
i ? Te(k, Ne) : null
|
|
1078
|
+
] });
|
|
1079
|
+
}
|
|
1062
1080
|
}
|
|
1063
1081
|
);
|
|
1064
1082
|
}
|
|
1065
|
-
),
|
|
1083
|
+
), Zt = ke;
|
|
1066
1084
|
export {
|
|
1067
|
-
|
|
1068
|
-
|
|
1085
|
+
Lt as Select,
|
|
1086
|
+
Zt as StyledSelect
|
|
1069
1087
|
};
|