se-design 1.0.88-dev → 1.0.88
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/assets/icons/cloud-check.svg +4 -0
- package/dist/assets/style.css +1 -1
- package/dist/components/Icon/index.d.ts +5 -0
- package/dist/components/InputWithTags/index.d.ts +4 -1
- package/dist/components/SidebarOverlay/index.d.ts +0 -41
- package/dist/components/Tooltip/index.d.ts +5 -1
- package/dist/index112.js +1 -1
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +2 -2
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +1 -1
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +2 -2
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +1 -1
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +1 -1
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +2 -2
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +1 -1
- package/dist/index119.js.map +1 -1
- package/dist/index120.js +2 -2
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +1 -1
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +1 -1
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +1 -1
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +1 -1
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +2 -2
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +1 -1
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +2 -2
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +2 -2
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +1 -1
- package/dist/index129.js.map +1 -1
- package/dist/index130.js +2 -2
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +2 -2
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +1 -1
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +1 -1
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +1 -1
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +2 -2
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +2 -2
- package/dist/index136.js.map +1 -1
- package/dist/index137.js +2 -2
- package/dist/index137.js.map +1 -1
- package/dist/index138.js +1 -1
- package/dist/index138.js.map +1 -1
- package/dist/index139.js +1 -1
- package/dist/index139.js.map +1 -1
- package/dist/index140.js +1 -1
- package/dist/index140.js.map +1 -1
- package/dist/index141.js +1 -1
- package/dist/index141.js.map +1 -1
- package/dist/index142.js +1 -1
- package/dist/index142.js.map +1 -1
- package/dist/index143.js +1 -1
- package/dist/index143.js.map +1 -1
- package/dist/index144.js +1 -1
- package/dist/index144.js.map +1 -1
- package/dist/index145.js +1 -1
- package/dist/index145.js.map +1 -1
- package/dist/index146.js +2 -2
- package/dist/index146.js.map +1 -1
- package/dist/index147.js +2 -2
- package/dist/index147.js.map +1 -1
- package/dist/index148.js +1 -1
- package/dist/index148.js.map +1 -1
- package/dist/index149.js +1 -1
- package/dist/index149.js.map +1 -1
- package/dist/index150.js +1 -1
- package/dist/index150.js.map +1 -1
- package/dist/index151.js +1 -1
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +1 -1
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +1 -1
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +1 -1
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +2 -2
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +1 -1
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +2 -2
- package/dist/index157.js.map +1 -1
- package/dist/index158.js +2 -2
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +2 -2
- package/dist/index159.js.map +1 -1
- package/dist/index16.js +111 -107
- package/dist/index16.js.map +1 -1
- package/dist/index160.js +2 -2
- package/dist/index160.js.map +1 -1
- package/dist/index161.js +1 -1
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +1 -1
- package/dist/index162.js.map +1 -1
- package/dist/index163.js +1 -1
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +1 -1
- package/dist/index164.js.map +1 -1
- package/dist/index165.js +1 -1
- package/dist/index165.js.map +1 -1
- package/dist/index166.js +1 -1
- package/dist/index166.js.map +1 -1
- package/dist/index167.js +1 -1
- package/dist/index167.js.map +1 -1
- package/dist/index168.js +1 -1
- package/dist/index168.js.map +1 -1
- package/dist/index169.js +1 -1
- package/dist/index169.js.map +1 -1
- package/dist/index170.js +1 -1
- package/dist/index170.js.map +1 -1
- package/dist/index171.js +1 -1
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +1 -1
- package/dist/index172.js.map +1 -1
- package/dist/index173.js +1 -1
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +1 -1
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +1 -1
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +1 -1
- package/dist/index176.js.map +1 -1
- package/dist/index177.js +1 -1
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +1 -1
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +1 -1
- package/dist/index179.js.map +1 -1
- package/dist/index180.js +1 -1
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +1 -1
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +1 -1
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +1 -1
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +1 -1
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +2 -2
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +2 -2
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +1 -1
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +1 -1
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +2 -2
- package/dist/index189.js.map +1 -1
- package/dist/index190.js +2 -2
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +1 -1
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +1 -1
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +1 -1
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +1 -1
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +1 -1
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +1 -1
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +1 -1
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +1 -1
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +1 -1
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +2 -2
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +2 -2
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +2 -2
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +2 -149
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +149 -9
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +8 -5
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +5 -4
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +1 -1
- package/dist/index223.js +8 -0
- package/dist/index223.js.map +1 -0
- package/dist/{index224.js → index225.js} +1 -1
- package/dist/{index224.js.map → index225.js.map} +1 -1
- package/dist/index23.js +16 -16
- package/dist/index23.js.map +1 -1
- package/dist/{index232.js → index233.js} +1 -1
- package/dist/{index232.js.map → index233.js.map} +1 -1
- package/dist/{index235.js → index236.js} +1 -1
- package/dist/{index235.js.map → index236.js.map} +1 -1
- package/dist/index245.js +169 -3
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +7 -0
- package/dist/index246.js.map +1 -0
- package/dist/index248.js +18 -9
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +9 -9
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +2 -1
- package/dist/index25.js.map +1 -1
- package/dist/index250.js +9 -4
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +5 -170
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +170 -11
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +11 -6
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +5 -5
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +5 -37
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +38 -2
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +2 -8
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +7 -326
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +324 -47
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +50 -2
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +2 -76
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +65 -82
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +89 -48
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +51 -7
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +7 -4
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +4 -51
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +52 -2
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +2 -2
- package/dist/index269.js +5 -0
- package/dist/index269.js.map +1 -0
- package/dist/index28.js +88 -149
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +1 -1
- package/dist/index30.js +1 -1
- package/dist/index33.js +1 -1
- package/dist/index35.js +1 -1
- package/dist/index36.js +1 -1
- package/dist/index37.js +61 -37
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +163 -162
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +55 -51
- package/dist/index39.js.map +1 -1
- package/dist/index4.js +66 -61
- package/dist/index4.js.map +1 -1
- package/dist/index40.js +1 -1
- package/dist/index45.js +39 -38
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +52 -51
- package/dist/index46.js.map +1 -1
- package/dist/index49.js +1 -1
- package/dist/index51.js +1 -1
- package/dist/index52.js +1 -1
- package/dist/index53.js +1 -1
- package/dist/index57.js +1 -1
- package/dist/index6.js +305 -299
- package/dist/index6.js.map +1 -1
- package/dist/index61.js +1 -1
- package/dist/index63.js +1 -1
- package/dist/index65.js +1 -1
- package/dist/index7.js +1 -1
- package/dist/index79.js +1 -1
- package/dist/index81.js +9 -7
- package/dist/index81.js.map +1 -1
- package/dist/index9.js +20 -20
- package/dist/index9.js.map +1 -1
- package/package.json +1 -1
- package/dist/index244.js +0 -173
- package/dist/index244.js.map +0 -1
- package/dist/index247.js +0 -22
- package/dist/index247.js.map +0 -1
package/dist/index37.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index37.js","sources":["../src/components/InputWithTags/index.tsx"],"sourcesContent":["import React, { useState, KeyboardEvent, useRef } from \"react\";\nimport './styles.scss';\nimport { Icon } from '../Icon';\n\nexport interface InputWithTagsProps {\n value: string[];\n onChange?: (tags: string[]) => void;\n placeholder?: string;\n className?: string;\n error?: boolean;\n errorMessage?: string;\n label?: string;\n automationId?: string;\n}\n\nexport function InputWithTags({
|
|
1
|
+
{"version":3,"file":"index37.js","sources":["../src/components/InputWithTags/index.tsx"],"sourcesContent":["import React, { useState, KeyboardEvent, useRef } from \"react\";\nimport './styles.scss';\nimport { Icon } from '../Icon';\nimport { getA11yNameAttributes } from '../../utils/a11y';\nimport { useStableId } from '../../utils/useStableId';\n\nexport interface InputWithTagsProps {\n value: string[];\n onChange?: (tags: string[]) => void;\n placeholder?: string;\n className?: string;\n error?: boolean;\n errorMessage?: string;\n label?: string;\n ariaLabel?: string;\n ariaLabelledBy?: string;\n automationId?: string;\n commitOnBlur?: boolean;\n}\n\nexport function InputWithTags({\n value,\n onChange,\n placeholder,\n className,\n error,\n errorMessage,\n label,\n ariaLabel,\n ariaLabelledBy,\n automationId = '',\n commitOnBlur = false\n}: InputWithTagsProps) {\n const [tags, setTags] = useState<string[]>([...value]);\n const [inputValue, setInputValue] = useState('');\n const inputRef = useRef<HTMLInputElement>(null);\n const labelId = useStableId(undefined, 'input-with-tags-label');\n const inputA11yProps = getA11yNameAttributes({\n ariaLabel,\n ariaLabelledBy,\n internalLabelId: label ? labelId : undefined\n });\n\n const removeTag = (indexToRemove: number) => {\n const newTags = tags.filter((_, i) => i !== indexToRemove);\n setTags(newTags);\n onChange?.(newTags);\n };\n\n const commitInput = () => {\n const trimmed = inputValue.trim();\n if (!trimmed) return;\n const newTags = [...tags, trimmed];\n setTags(newTags);\n setInputValue(\"\");\n onChange?.(newTags);\n };\n\n const handleKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter' && inputValue.trim()) {\n e.preventDefault();\n commitInput();\n } else if (e.key === 'Backspace' && inputValue === \"\" && tags.length > 0) {\n removeTag(tags.length - 1);\n }\n };\n\n // When enabled, commit a half-typed tag when focus leaves the input so users\n // don't lose the value by tabbing/clicking away without pressing Enter.\n const handleBlur = () => {\n if (commitOnBlur) commitInput();\n };\n\n return (\n <div className=\"input-with-tags-main-container\" data-automation-id={automationId}>\n {label && <div id={labelId} className=\"label-container\">{label}</div>}\n <div \n className={`input-with-tags-container ${error ? 'input-with-tags-error' : ''} ${className}`} \n onClick={() => inputRef.current?.focus()}\n >\n {tags.map((tag, index) => (\n <span key={index} className=\"tag-in-inputwithtags\" data-automation-id={`input-tag-${index}`}>\n {tag} \n <Icon\n name=\"close\"\n className=\"close-icon-in-inputwithtags\"\n ariaLabel={`Remove tag ${tag}`}\n onClick={() => removeTag(index)}\n shouldStopPropagation\n />\n </span>\n ))}\n <input\n className=\"input-with-tags-input\"\n ref={inputRef}\n type=\"text\"\n value={inputValue}\n onChange={(e) => setInputValue(e.target.value)}\n onKeyDown={handleKeyDown}\n onBlur={handleBlur}\n placeholder={placeholder}\n data-automation-id=\"input-with-tags-input-field\"\n {...inputA11yProps}\n />\n </div>\n {error && <div className=\"error-message\">{errorMessage}</div>}\n </div>\n );\n}"],"names":["InputWithTags","value","onChange","placeholder","className","error","errorMessage","label","ariaLabel","ariaLabelledBy","automationId","commitOnBlur","tags","setTags","useState","inputValue","setInputValue","inputRef","useRef","labelId","useStableId","undefined","inputA11yProps","getA11yNameAttributes","internalLabelId","removeTag","indexToRemove","newTags","filter","_","i","commitInput","trimmed","trim","handleKeyDown","e","key","preventDefault","length","handleBlur","React","createElement","id","onClick","current","focus","map","tag","index","Icon","name","shouldStopPropagation","_extends","ref","type","target","onKeyDown","onBlur"],"mappings":"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"}
|
package/dist/index38.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import o, { forwardRef as
|
|
2
|
-
import { Popover as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import { Checkbox as
|
|
5
|
-
import { Button as
|
|
6
|
-
import { getA11yNameAttributes as
|
|
1
|
+
import o, { forwardRef as Ce, useState as R, useRef as M, useCallback as U, useEffect as W, useImperativeHandle as De } from "react";
|
|
2
|
+
import { Popover as $e } from "./index19.js";
|
|
3
|
+
import { Icon as Te } from "./index6.js";
|
|
4
|
+
import { Checkbox as Ie } from "./index23.js";
|
|
5
|
+
import { Button as ee } from "./index4.js";
|
|
6
|
+
import { getA11yNameAttributes as Oe } from "./index81.js";
|
|
7
7
|
import "./index72.js";
|
|
8
|
-
import { useCombobox as
|
|
9
|
-
import { useStableId as
|
|
10
|
-
import { announce as
|
|
8
|
+
import { useCombobox as Ae } from "./index68.js";
|
|
9
|
+
import { useStableId as te } from "./index206.js";
|
|
10
|
+
import { announce as Re } from "./index75.js";
|
|
11
11
|
/* empty css */
|
|
12
|
-
function
|
|
13
|
-
return
|
|
12
|
+
function d() {
|
|
13
|
+
return d = Object.assign ? Object.assign.bind() : function(v) {
|
|
14
14
|
for (var i = 1; i < arguments.length; i++) {
|
|
15
|
-
var
|
|
16
|
-
for (var k in
|
|
15
|
+
var E = arguments[i];
|
|
16
|
+
for (var k in E) ({}).hasOwnProperty.call(E, k) && (v[k] = E[k]);
|
|
17
17
|
}
|
|
18
|
-
return
|
|
19
|
-
},
|
|
18
|
+
return v;
|
|
19
|
+
}, d.apply(null, arguments);
|
|
20
20
|
}
|
|
21
|
-
const
|
|
22
|
-
value:
|
|
21
|
+
const Ge = /* @__PURE__ */ Ce(({
|
|
22
|
+
value: v,
|
|
23
23
|
onChange: i,
|
|
24
|
-
placeholder:
|
|
24
|
+
placeholder: E = "Type to search or add custom tags...",
|
|
25
25
|
className: k = "",
|
|
26
26
|
options: g = [],
|
|
27
27
|
renderOption: x,
|
|
28
|
-
label:
|
|
29
|
-
ariaLabel:
|
|
30
|
-
ariaLabelledBy:
|
|
31
|
-
ariaDescribedBy:
|
|
32
|
-
automationId:
|
|
28
|
+
label: D,
|
|
29
|
+
ariaLabel: ne,
|
|
30
|
+
ariaLabelledBy: oe,
|
|
31
|
+
ariaDescribedBy: le,
|
|
32
|
+
automationId: c = "",
|
|
33
33
|
noOptionsMessage: L = "No options found",
|
|
34
34
|
allowCustomTags: j = !0,
|
|
35
|
-
disabled:
|
|
35
|
+
disabled: l = !1,
|
|
36
36
|
type: H = "select",
|
|
37
37
|
showInput: z = !0,
|
|
38
38
|
displayTagBy: B = "label",
|
|
39
|
-
isWithPortal:
|
|
40
|
-
},
|
|
39
|
+
isWithPortal: ae = !1
|
|
40
|
+
}, re) => {
|
|
41
41
|
const G = (e) => e.map((t) => {
|
|
42
42
|
const n = g.find((s) => s.value === t);
|
|
43
43
|
return n ? {
|
|
@@ -47,157 +47,157 @@ const Be = /* @__PURE__ */ _e(({
|
|
|
47
47
|
label: t,
|
|
48
48
|
value: t
|
|
49
49
|
};
|
|
50
|
-
}), [
|
|
51
|
-
if (
|
|
52
|
-
const t = [...
|
|
50
|
+
}), [a, f] = R(() => G(v || [])), [r, y] = R(""), [K, se] = R(g), [u, p] = R(!1), ie = M(null), $ = M(null), T = M(!1), S = H === "multi-select-without-cta", m = H === "multi-select" || S, ce = te(c, "dropdown-input-tags-listbox"), q = te(c ? `${c}-label` : void 0, "dropdown-input-tags-label"), I = U((e) => {
|
|
51
|
+
if (l) return;
|
|
52
|
+
const t = [...a];
|
|
53
53
|
t.some((n) => n.value === e.value) || (t.push({
|
|
54
54
|
label: e.label,
|
|
55
55
|
value: e.value
|
|
56
|
-
}),
|
|
57
|
-
}, [
|
|
56
|
+
}), f(t), i?.(t.map((n) => n.value))), y(""), p(!1);
|
|
57
|
+
}, [l, a, i]), V = U((e, t) => {
|
|
58
58
|
let n = [];
|
|
59
|
-
e ? n = [...
|
|
59
|
+
e ? n = [...a, {
|
|
60
60
|
label: t.label,
|
|
61
61
|
value: t.value
|
|
62
|
-
}] : n =
|
|
63
|
-
}, [
|
|
64
|
-
id:
|
|
62
|
+
}] : n = a.filter((s) => s.value !== t.value), f(n), y(""), S && (T.current = !0, i?.(n.map((s) => s.value)));
|
|
63
|
+
}, [a, S, i]), O = "__add_custom_tag__", J = "__no_results__", ue = {
|
|
64
|
+
id: J,
|
|
65
65
|
label: L,
|
|
66
|
-
value:
|
|
66
|
+
value: J,
|
|
67
67
|
__noResults: !0
|
|
68
|
-
},
|
|
69
|
-
if (!
|
|
68
|
+
}, pe = (e) => !!e?.__noResults, Q = U((e) => {
|
|
69
|
+
if (!l) {
|
|
70
70
|
if (e.value === O) {
|
|
71
71
|
const t = r.trim();
|
|
72
72
|
if (!t) return;
|
|
73
|
-
const n = [...
|
|
73
|
+
const n = [...a];
|
|
74
74
|
n.some((s) => s.value === t) || (n.push({
|
|
75
75
|
label: t,
|
|
76
76
|
value: t
|
|
77
|
-
}),
|
|
77
|
+
}), f(n), i?.(n.map((s) => s.value))), y(""), p(!1);
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
80
|
if (m) {
|
|
81
|
-
const t =
|
|
81
|
+
const t = a.some((n) => n.value === e.value);
|
|
82
82
|
V(!t, e);
|
|
83
83
|
} else
|
|
84
|
-
|
|
84
|
+
I(e);
|
|
85
85
|
}
|
|
86
|
-
}, [
|
|
86
|
+
}, [l, m, a, r, i, V, I]), w = K.length > 0 ? K : j && r.trim() ? [{
|
|
87
87
|
id: O,
|
|
88
88
|
label: `Add "${r.trim()}"`,
|
|
89
89
|
value: O
|
|
90
|
-
}] : [],
|
|
91
|
-
containerProps:
|
|
92
|
-
inputProps:
|
|
93
|
-
listboxProps:
|
|
90
|
+
}] : [], X = w.length === 0 && u ? [ue] : w, {
|
|
91
|
+
containerProps: me,
|
|
92
|
+
inputProps: Y,
|
|
93
|
+
listboxProps: de,
|
|
94
94
|
getOptionProps: N,
|
|
95
95
|
highlightedIndex: h,
|
|
96
|
-
setHighlightedIndex:
|
|
97
|
-
isKeyboardFocused:
|
|
98
|
-
} =
|
|
99
|
-
items:
|
|
100
|
-
isOpen:
|
|
101
|
-
onOpenChange:
|
|
102
|
-
onSelect:
|
|
103
|
-
listboxId:
|
|
104
|
-
hasItems:
|
|
96
|
+
setHighlightedIndex: b,
|
|
97
|
+
isKeyboardFocused: Z
|
|
98
|
+
} = Ae({
|
|
99
|
+
items: X,
|
|
100
|
+
isOpen: u,
|
|
101
|
+
onOpenChange: p,
|
|
102
|
+
onSelect: Q,
|
|
103
|
+
listboxId: ce,
|
|
104
|
+
hasItems: X.length > 0,
|
|
105
105
|
keepHighlightOnSelect: m,
|
|
106
106
|
closeOnTab: H !== "multi-select",
|
|
107
|
-
isItemDisabled:
|
|
108
|
-
}), _ = (e) => e ? `highlighted${
|
|
107
|
+
isItemDisabled: pe
|
|
108
|
+
}), _ = (e) => e ? `highlighted${Z ? " keyboard-highlight" : ""}` : "";
|
|
109
109
|
W(() => {
|
|
110
|
-
if (
|
|
111
|
-
|
|
110
|
+
if (T.current) {
|
|
111
|
+
T.current = !1;
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
|
-
|
|
115
|
-
}, [
|
|
114
|
+
f(G(v || []));
|
|
115
|
+
}, [v, g, u]), W(() => {
|
|
116
116
|
const e = g.filter((t) => t.label.toLowerCase().includes(r.toLowerCase()) || t.value.toLowerCase().includes(r.toLowerCase()));
|
|
117
|
-
|
|
117
|
+
se(e);
|
|
118
118
|
}, [r, g]), W(() => {
|
|
119
|
-
|
|
119
|
+
u && w.length === 0 && r.trim() && h === -1 && Re(L, {
|
|
120
120
|
assertiveness: "polite",
|
|
121
121
|
batchId: "dropdown-input-tags-empty-state",
|
|
122
122
|
delay: 300
|
|
123
123
|
});
|
|
124
|
-
}, [
|
|
125
|
-
const
|
|
126
|
-
if (
|
|
127
|
-
const t =
|
|
128
|
-
|
|
129
|
-
},
|
|
130
|
-
if (!
|
|
131
|
-
if (e.key === "Backspace" && r === "" &&
|
|
124
|
+
}, [w.length, u, r, h]);
|
|
125
|
+
const fe = (e) => {
|
|
126
|
+
if (l) return;
|
|
127
|
+
const t = a.filter((n, s) => s !== e);
|
|
128
|
+
f(t), (!m || S || m && !u) && i?.(t.map((n) => n.value));
|
|
129
|
+
}, ge = (e) => {
|
|
130
|
+
if (!l) {
|
|
131
|
+
if (e.key === "Backspace" && r === "" && a.length > 0) {
|
|
132
132
|
e.preventDefault();
|
|
133
|
-
const t =
|
|
134
|
-
|
|
133
|
+
const t = a.slice(0, -1);
|
|
134
|
+
f(t), i?.(t.map((n) => n.value));
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
137
|
if (e.key === "Enter" && r.trim() && K.length === 0 && j) {
|
|
138
138
|
e.preventDefault();
|
|
139
|
-
const t = [...
|
|
139
|
+
const t = [...a];
|
|
140
140
|
t.some((n) => n.value === r.trim()) || (t.push({
|
|
141
141
|
label: r.trim(),
|
|
142
142
|
value: r.trim()
|
|
143
|
-
}),
|
|
143
|
+
}), f(t), i?.(t.map((n) => n.value))), y(""), b(-1), p(!1);
|
|
144
144
|
return;
|
|
145
145
|
}
|
|
146
|
-
|
|
146
|
+
Y.onKeyDown(e);
|
|
147
147
|
}
|
|
148
|
-
}, de = (e) => {
|
|
149
|
-
if (a) return;
|
|
150
|
-
const t = e.target.value;
|
|
151
|
-
y(t), E(-1), t.trim() && !c && u(!0);
|
|
152
|
-
}, ge = () => {
|
|
153
|
-
a || (r.trim() || g.length > 0) && u(!0);
|
|
154
148
|
}, he = (e) => {
|
|
155
|
-
|
|
149
|
+
if (l) return;
|
|
150
|
+
const t = e.target.value;
|
|
151
|
+
y(t), b(-1), t.trim() && !u && p(!0);
|
|
152
|
+
}, ve = () => {
|
|
153
|
+
l || (r.trim() || g.length > 0) && p(!0);
|
|
156
154
|
}, we = (e) => {
|
|
157
|
-
|
|
155
|
+
l || (e.stopPropagation(), $.current?.focus(), !u && (r.trim() || g.length > 0) && p(!0));
|
|
156
|
+
}, be = (e) => {
|
|
157
|
+
if (l) {
|
|
158
158
|
e.preventDefault(), e.stopPropagation();
|
|
159
159
|
return;
|
|
160
160
|
}
|
|
161
161
|
e.target.closest(".input-with-tags-container") && e.stopPropagation();
|
|
162
|
-
},
|
|
163
|
-
|
|
162
|
+
}, Ee = () => {
|
|
163
|
+
l || p(!u);
|
|
164
164
|
};
|
|
165
|
-
|
|
166
|
-
toggleDropdown:
|
|
165
|
+
De(re, () => ({
|
|
166
|
+
toggleDropdown: Ee
|
|
167
167
|
}), []);
|
|
168
|
-
const
|
|
169
|
-
const P =
|
|
170
|
-
return /* @__PURE__ */ o.createElement("div",
|
|
168
|
+
const ke = (e, t, n, s) => {
|
|
169
|
+
const P = a.some((C) => C.value === e.value), A = h === t, F = N(t, P);
|
|
170
|
+
return /* @__PURE__ */ o.createElement("div", d({
|
|
171
171
|
key: e.id
|
|
172
172
|
}, F, {
|
|
173
173
|
className: `dropdown-with-input-tags-option ${_(A)}`,
|
|
174
174
|
onClick: () => !s && n(e),
|
|
175
|
-
onMouseEnter: () =>
|
|
176
|
-
"data-automation-id": `${
|
|
175
|
+
onMouseEnter: () => b(t),
|
|
176
|
+
"data-automation-id": `${c}-option-${e.id}`
|
|
177
177
|
}), /* @__PURE__ */ o.createElement("span", {
|
|
178
178
|
className: "option-label"
|
|
179
179
|
}, e.label), e.value !== e.label && /* @__PURE__ */ o.createElement("span", {
|
|
180
180
|
className: "option-value"
|
|
181
181
|
}, e.value));
|
|
182
|
-
},
|
|
183
|
-
|
|
184
|
-
const e =
|
|
185
|
-
i?.(e),
|
|
186
|
-
},
|
|
187
|
-
|
|
188
|
-
},
|
|
189
|
-
const n =
|
|
190
|
-
return /* @__PURE__ */ o.createElement("div",
|
|
182
|
+
}, ye = () => {
|
|
183
|
+
T.current = !0;
|
|
184
|
+
const e = a.map((t) => t.value);
|
|
185
|
+
i?.(e), p(!1);
|
|
186
|
+
}, Se = () => {
|
|
187
|
+
f([]);
|
|
188
|
+
}, Ne = (e, t) => {
|
|
189
|
+
const n = a.some((A) => A.value === e.value), s = h === t, P = N(t, n);
|
|
190
|
+
return /* @__PURE__ */ o.createElement("div", d({
|
|
191
191
|
key: e.id
|
|
192
192
|
}, P, {
|
|
193
193
|
className: `dropdown-with-input-tags-option dropdown-with-input-tags-multi-select-option ${_(s)}`,
|
|
194
194
|
"aria-checked": n,
|
|
195
195
|
onClick: () => {
|
|
196
|
-
|
|
196
|
+
l || (V(!n, e), $.current?.focus());
|
|
197
197
|
},
|
|
198
|
-
onMouseEnter: () =>
|
|
199
|
-
"data-automation-id": `${
|
|
200
|
-
}), /* @__PURE__ */ o.createElement(
|
|
198
|
+
onMouseEnter: () => b(t),
|
|
199
|
+
"data-automation-id": `${c}-option-${e.id}`
|
|
200
|
+
}), /* @__PURE__ */ o.createElement(Ie, {
|
|
201
201
|
automationId: "checkbox",
|
|
202
202
|
className: "checkbox",
|
|
203
203
|
checked: n,
|
|
@@ -206,112 +206,113 @@ const Be = /* @__PURE__ */ _e(({
|
|
|
206
206
|
label: e.label,
|
|
207
207
|
tabIndex: -1
|
|
208
208
|
}));
|
|
209
|
-
},
|
|
209
|
+
}, _e = () => /* @__PURE__ */ o.createElement("div", {
|
|
210
210
|
className: "dropdown-with-input-tags-ctas-container",
|
|
211
211
|
onKeyDown: (e) => {
|
|
212
212
|
(e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "Home" || e.key === "End") && e.stopPropagation();
|
|
213
213
|
}
|
|
214
|
-
}, /* @__PURE__ */ o.createElement(
|
|
214
|
+
}, /* @__PURE__ */ o.createElement(ee, {
|
|
215
215
|
label: "Clear",
|
|
216
216
|
type: "link",
|
|
217
217
|
size: "sm",
|
|
218
|
-
onClick:
|
|
219
|
-
automationId: `${
|
|
220
|
-
}), /* @__PURE__ */ o.createElement(
|
|
218
|
+
onClick: Se,
|
|
219
|
+
automationId: `${c}-clear-button`
|
|
220
|
+
}), /* @__PURE__ */ o.createElement(ee, {
|
|
221
221
|
label: "Apply",
|
|
222
222
|
type: "primary",
|
|
223
223
|
size: "sm",
|
|
224
|
-
onClick:
|
|
225
|
-
automationId: `${
|
|
224
|
+
onClick: ye,
|
|
225
|
+
automationId: `${c}-apply-button`
|
|
226
226
|
}));
|
|
227
|
-
return /* @__PURE__ */ o.createElement("div",
|
|
228
|
-
className: `dropdown-with-input-tags-wrapper ${k} ${
|
|
229
|
-
"data-automation-id":
|
|
230
|
-
},
|
|
231
|
-
id:
|
|
227
|
+
return /* @__PURE__ */ o.createElement("div", d({
|
|
228
|
+
className: `dropdown-with-input-tags-wrapper ${k} ${l ? "disabled-wrapper" : ""}`,
|
|
229
|
+
"data-automation-id": c
|
|
230
|
+
}, me), D && /* @__PURE__ */ o.createElement("label", {
|
|
231
|
+
id: q,
|
|
232
232
|
className: "dropdown-with-input-tags-label"
|
|
233
|
-
},
|
|
234
|
-
onClick:
|
|
235
|
-
}, /* @__PURE__ */ o.createElement(
|
|
236
|
-
ref:
|
|
233
|
+
}, D), /* @__PURE__ */ o.createElement("div", {
|
|
234
|
+
onClick: be
|
|
235
|
+
}, /* @__PURE__ */ o.createElement($e, {
|
|
236
|
+
ref: ie,
|
|
237
237
|
className: "dropdown-with-input-tags-popover",
|
|
238
238
|
contentWidth: "full",
|
|
239
239
|
position: "bottom-left",
|
|
240
|
-
isPopoverOpen: !
|
|
241
|
-
onPopoverToggle:
|
|
242
|
-
} :
|
|
240
|
+
isPopoverOpen: !l && u,
|
|
241
|
+
onPopoverToggle: l ? () => {
|
|
242
|
+
} : p,
|
|
243
243
|
disableClickToggle: !0,
|
|
244
|
-
isWithPortal:
|
|
244
|
+
isWithPortal: ae,
|
|
245
245
|
renderPopoverContents: ({
|
|
246
246
|
closePopoverCb: e
|
|
247
|
-
}) => /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("div",
|
|
247
|
+
}) => /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("div", d({}, de, {
|
|
248
248
|
className: "dropdown-with-input-tags-content"
|
|
249
249
|
}, m && {
|
|
250
250
|
"aria-multiselectable": "true"
|
|
251
|
-
}),
|
|
251
|
+
}), w.length > 0 ? w.map((t, n) => {
|
|
252
252
|
if (t.value === O) {
|
|
253
|
-
const C = h === n,
|
|
254
|
-
return /* @__PURE__ */ o.createElement("div",
|
|
253
|
+
const C = h === n, Pe = N(n, !1);
|
|
254
|
+
return /* @__PURE__ */ o.createElement("div", d({
|
|
255
255
|
key: t.id
|
|
256
|
-
},
|
|
256
|
+
}, Pe, {
|
|
257
257
|
className: `dropdown-with-input-tags-option dropdown-with-input-tags-custom-option ${_(C)}`,
|
|
258
258
|
onClick: () => {
|
|
259
|
-
|
|
259
|
+
l || (Q(t), e());
|
|
260
260
|
},
|
|
261
|
-
onMouseEnter: () =>
|
|
261
|
+
onMouseEnter: () => b(n)
|
|
262
262
|
}), 'Add "', r.trim(), '"');
|
|
263
263
|
}
|
|
264
264
|
if (m)
|
|
265
|
-
return
|
|
266
|
-
const s =
|
|
265
|
+
return Ne(t, n);
|
|
266
|
+
const s = a.some((C) => C.value === t.value), P = h === n, F = {
|
|
267
267
|
...N(n, s),
|
|
268
|
-
onMouseEnter: () =>
|
|
268
|
+
onMouseEnter: () => b(n),
|
|
269
269
|
className: `dropdown-with-input-tags-option ${_(P)}`
|
|
270
270
|
};
|
|
271
|
-
return x ? x(t, F,
|
|
272
|
-
}) : /* @__PURE__ */ o.createElement("div",
|
|
271
|
+
return x ? x(t, F, I) : ke(t, n, I, l);
|
|
272
|
+
}) : /* @__PURE__ */ o.createElement("div", d({}, N(0, !1), {
|
|
273
273
|
className: `dropdown-with-input-tags-no-options ${_(h === 0)}`
|
|
274
274
|
}), /* @__PURE__ */ o.createElement("div", {
|
|
275
275
|
className: "dropdown-with-input-tags-no-options-text"
|
|
276
|
-
}, L))), m && !S &&
|
|
276
|
+
}, L))), m && !S && _e()),
|
|
277
277
|
renderPopoverSrcElement: () => /* @__PURE__ */ o.createElement("div", {
|
|
278
278
|
className: "dropdown-with-input-tags-input-container"
|
|
279
279
|
}, /* @__PURE__ */ o.createElement("div", {
|
|
280
|
-
className: `input-with-tags-container ${
|
|
281
|
-
onClick:
|
|
280
|
+
className: `input-with-tags-container ${l ? "disabled-input-with-tags-container" : ""} ${Z ? "keyboard-focused" : ""}`,
|
|
281
|
+
onClick: we,
|
|
282
282
|
onKeyDown: (e) => {
|
|
283
|
-
e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey &&
|
|
283
|
+
e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey && $.current?.focus();
|
|
284
284
|
}
|
|
285
|
-
},
|
|
285
|
+
}, a.map((e, t) => /* @__PURE__ */ o.createElement("span", {
|
|
286
286
|
key: t,
|
|
287
287
|
className: "tag-in-inputwithtags"
|
|
288
|
-
}, e[B], !
|
|
288
|
+
}, e[B], !l && /* @__PURE__ */ o.createElement(Te, {
|
|
289
289
|
name: "close",
|
|
290
290
|
className: "close-icon-in-inputwithtags",
|
|
291
291
|
ariaLabel: `Remove tag ${e[B]}`,
|
|
292
|
-
onClick: () =>
|
|
292
|
+
onClick: () => fe(t),
|
|
293
293
|
shouldStopPropagation: !0
|
|
294
|
-
}))), (z || !
|
|
295
|
-
ref:
|
|
296
|
-
},
|
|
294
|
+
}))), (z || !a.length || m) && /* @__PURE__ */ o.createElement("input", d({
|
|
295
|
+
ref: $
|
|
296
|
+
}, Y, {
|
|
297
297
|
type: "text",
|
|
298
298
|
value: r,
|
|
299
|
-
onChange:
|
|
300
|
-
onKeyDown:
|
|
301
|
-
onFocus:
|
|
302
|
-
placeholder:
|
|
303
|
-
className: `input-with-tags-input${!z &&
|
|
304
|
-
disabled:
|
|
305
|
-
},
|
|
306
|
-
ariaLabel:
|
|
307
|
-
ariaLabelledBy:
|
|
308
|
-
|
|
299
|
+
onChange: he,
|
|
300
|
+
onKeyDown: ge,
|
|
301
|
+
onFocus: ve,
|
|
302
|
+
placeholder: a.length === 0 ? E : "",
|
|
303
|
+
className: `input-with-tags-input${!z && a.length > 0 && !r ? " sr-only" : ""}`,
|
|
304
|
+
disabled: l
|
|
305
|
+
}, Oe({
|
|
306
|
+
ariaLabel: ne || (D ? void 0 : "Search and select options"),
|
|
307
|
+
ariaLabelledBy: oe,
|
|
308
|
+
internalLabelId: D ? q : void 0,
|
|
309
|
+
ariaDescribedBy: le
|
|
309
310
|
}))))),
|
|
310
|
-
automationId:
|
|
311
|
-
popoverContentAutomationId: `${
|
|
311
|
+
automationId: c,
|
|
312
|
+
popoverContentAutomationId: `${c}-content`
|
|
312
313
|
})));
|
|
313
314
|
});
|
|
314
315
|
export {
|
|
315
|
-
|
|
316
|
+
Ge as DropdownWithInputTags
|
|
316
317
|
};
|
|
317
318
|
//# sourceMappingURL=index38.js.map
|