@midas-ds/components 1.0.2
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/Breadcrumbs.css +1 -0
- package/Button-CCevm2s3.js +183 -0
- package/Button.css +1 -0
- package/ButtonGroup.css +1 -0
- package/CHANGELOG.md +76 -0
- package/Card.css +1 -0
- package/Checkbox-CllWDBxF.js +405 -0
- package/Checkbox.css +1 -0
- package/Collection-B3xUVWPF.js +483 -0
- package/ComboBox.css +1 -0
- package/DatePicker.css +1 -0
- package/Dialog-CLTyYwkS.js +1889 -0
- package/DragAndDrop-OTN7La7U.js +42 -0
- package/Dropdown.css +1 -0
- package/FileUpload.css +1 -0
- package/Flex.css +1 -0
- package/Flex.module-CpoxBzQX.js +37 -0
- package/FocusScope-BR0SJ-cZ.js +512 -0
- package/Form-DXLoQL91.js +240 -0
- package/Grid.css +1 -0
- package/Grid.module-Ia0e9Dix.js +36 -0
- package/Group-DPMuN3h8.js +44 -0
- package/Hidden-BQWDvze4.js +37 -0
- package/InfoBanner.css +1 -0
- package/Label-C18A_4Z5.js +69 -0
- package/Layout.css +1 -0
- package/Link-BU1h3K2a.js +77 -0
- package/Link.css +1 -0
- package/LinkButton.css +1 -0
- package/ListBox-D21tdwTs.js +463 -0
- package/ListKeyboardDelegate-DxMjfMsI.js +172 -0
- package/Logo.css +1 -0
- package/Modal.css +1 -0
- package/MultiSelect.css +1 -0
- package/PressResponder-DP8ZDNGy.js +31 -0
- package/README.md +7 -0
- package/RSPContexts-EOiWkKOf.js +11 -0
- package/Radio.css +1 -0
- package/SearchField.css +1 -0
- package/Select.css +1 -0
- package/SelectionManager-D4WtKtey.js +988 -0
- package/Separator-DLUHK9vv.js +48 -0
- package/Spinner.css +1 -0
- package/Table.css +1 -0
- package/Tabs.css +1 -0
- package/Tag-CEd6WWSc.js +725 -0
- package/Tag.css +1 -0
- package/Text-DGLaY3HR.js +17 -0
- package/TextArea.css +1 -0
- package/TextField-C_hq9WeT.js +226 -0
- package/TextField.css +1 -0
- package/TextField.module-Cwq1FAm7.js +141 -0
- package/Toast.css +1 -0
- package/VisuallyHidden-B_XzVvlX.js +39 -0
- package/accordion/Accordion.d.ts +13 -0
- package/accordion/AccordionContent.d.ts +3 -0
- package/accordion/AccordionItem.d.ts +3 -0
- package/accordion/AccordionTagContext.d.ts +3 -0
- package/accordion/AccordionTrigger.d.ts +3 -0
- package/accordion/index.d.ts +5 -0
- package/breadcrumbs/Breadcrumbs.d.ts +9 -0
- package/breadcrumbs/index.d.ts +1 -0
- package/button/Button.d.ts +41 -0
- package/button/ButtonGroup.d.ts +12 -0
- package/button/index.d.ts +2 -0
- package/card/Card.d.ts +34 -0
- package/card/index.d.ts +1 -0
- package/checkbox/Checkbox.d.ts +2 -0
- package/checkbox/CheckboxGroup.d.ts +10 -0
- package/checkbox/index.d.ts +2 -0
- package/chevron-down-Cd1bkzXT.js +13 -0
- package/chevron-right-DBMc9VMi.js +23 -0
- package/clsx-OuTLNxxd.js +16 -0
- package/combobox/ComboBox.d.ts +12 -0
- package/combobox/index.d.ts +1 -0
- package/context-ScOIq_Gu.js +80 -0
- package/createLucideIcon-DeWljiyi.js +79 -0
- package/date-picker/DatePicker.d.ts +14 -0
- package/date-picker/index.d.ts +2 -0
- package/dropdown/Dropdown.d.ts +8 -0
- package/dropdown/index.d.ts +1 -0
- package/file-upload/FileUpload.d.ts +11 -0
- package/file-upload/index.d.ts +1 -0
- package/flex/Flex.d.ts +17 -0
- package/flex/FlexItem.d.ts +15 -0
- package/flex/index.d.ts +2 -0
- package/grid/Grid.d.ts +16 -0
- package/grid/GridItem.d.ts +7 -0
- package/grid/index.d.ts +2 -0
- package/index-CEg5vZQH.js +132 -0
- package/index-CgfokhRq.js +674 -0
- package/index-CorR1LBD.js +3122 -0
- package/index-Dl1Q-tbj.js +26984 -0
- package/index.css +1 -0
- package/index.d.ts +29 -0
- package/index.js +114 -0
- package/index10.js +4 -0
- package/index11.js +5 -0
- package/index12.js +4 -0
- package/index13.js +4 -0
- package/index14.js +4 -0
- package/index15.js +6 -0
- package/index16.js +6 -0
- package/index17.js +6 -0
- package/index18.js +4 -0
- package/index19.js +6 -0
- package/index2.js +8 -0
- package/index20.js +6 -0
- package/index21.js +4 -0
- package/index22.js +5 -0
- package/index23.js +5 -0
- package/index24.js +5 -0
- package/index25.js +6 -0
- package/index26.js +6 -0
- package/index27.js +6 -0
- package/index28.js +4 -0
- package/index29.js +12 -0
- package/index3.js +8 -0
- package/index30.js +20 -0
- package/index31.js +22 -0
- package/index32.js +14 -0
- package/index33.js +11 -0
- package/index34.js +31 -0
- package/index35.js +8 -0
- package/index36.js +9 -0
- package/index37.js +19 -0
- package/index38.js +9 -0
- package/index39.js +9 -0
- package/index4.js +4 -0
- package/index40.js +16 -0
- package/index41.js +16 -0
- package/index42.js +31 -0
- package/index43.js +16 -0
- package/index44.js +6 -0
- package/index45.js +53 -0
- package/index46.js +18 -0
- package/index47.js +27 -0
- package/index48.js +18 -0
- package/index49.js +21 -0
- package/index5.js +5 -0
- package/index50.js +49 -0
- package/index51.js +5 -0
- package/index52.js +25 -0
- package/index53.js +18 -0
- package/index54.js +9 -0
- package/index55.js +25 -0
- package/index56.js +18 -0
- package/index57.js +11 -0
- package/index58.js +12 -0
- package/index59.js +15 -0
- package/index6.js +4 -0
- package/index60.js +9 -0
- package/index61.js +9 -0
- package/index62.js +19 -0
- package/index63.js +22 -0
- package/index64.js +61 -0
- package/index65.js +15 -0
- package/index66.js +11 -0
- package/index67.js +63 -0
- package/index68.js +85 -0
- package/index69.js +74 -0
- package/index7.js +9 -0
- package/index70.js +24 -0
- package/index71.js +69 -0
- package/index72.js +80 -0
- package/index73.js +140 -0
- package/index74.js +70 -0
- package/index75.js +42 -0
- package/index76.js +82 -0
- package/index77.js +71 -0
- package/index78.js +104 -0
- package/index79.js +274 -0
- package/index8.js +4 -0
- package/index80.js +724 -0
- package/index81.js +491 -0
- package/index82.js +317 -0
- package/index83.js +391 -0
- package/index84.js +254 -0
- package/index85.js +1364 -0
- package/index86.js +1009 -0
- package/index87.js +388 -0
- package/index88.js +2105 -0
- package/index89.js +2371 -0
- package/index9.js +5 -0
- package/index90.js +6834 -0
- package/index91.js +17 -0
- package/index92.js +14 -0
- package/index93.js +6 -0
- package/index94.js +9 -0
- package/info-banner/InfoBanner.d.ts +21 -0
- package/info-banner/index.d.ts +1 -0
- package/intlStrings-Cd44R5hT.js +278 -0
- package/layout/Layout.d.ts +51 -0
- package/layout/index.d.ts +1 -0
- package/link/Link.d.ts +13 -0
- package/link/index.d.ts +1 -0
- package/link-button/LinkButton.d.ts +18 -0
- package/link-button/index.d.ts +1 -0
- package/logo/Logo.d.ts +16 -0
- package/logo/index.d.ts +1 -0
- package/modal/Modal.d.ts +13 -0
- package/modal/index.d.ts +1 -0
- package/multi-select/MultiSelect.d.ts +28 -0
- package/multi-select/index.d.ts +1 -0
- package/package.json +29 -0
- package/radio/Radio.d.ts +20 -0
- package/radio/index.d.ts +1 -0
- package/react.esm-D8HpDGKP.js +11060 -0
- package/search-field/SearchField.d.ts +13 -0
- package/search-field/index.d.ts +1 -0
- package/select/Select.d.ts +11 -0
- package/select/index.d.ts +1 -0
- package/spinner/Spinner.d.ts +11 -0
- package/spinner/index.d.ts +1 -0
- package/table/Table.d.ts +12 -0
- package/table/index.d.ts +1 -0
- package/tabs/Tabs.d.ts +12 -0
- package/tabs/index.d.ts +1 -0
- package/tag/Tag.d.ts +11 -0
- package/tag/index.d.ts +1 -0
- package/textarea/TextArea.d.ts +20 -0
- package/textarea/index.d.ts +1 -0
- package/textfield/TextField.d.ts +16 -0
- package/textfield/index.d.ts +3 -0
- package/theme/index.d.ts +138 -0
- package/theme/tokens.d.ts +135 -0
- package/toast/Toast.d.ts +25 -0
- package/toast/index.d.ts +1 -0
- package/tokens-CjXmpXTi.js +160 -0
- package/triangle-alert-1OYl9KWz.js +56 -0
- package/useControlledState-S_TYcV_c.js +45 -0
- package/useDescription-D4_zk_sA.js +32 -0
- package/useFilter-BnJDBCkt.js +35 -0
- package/useFocusRing-D97-G3fT.js +1324 -0
- package/useFocusable-C-N9wcwm.js +56 -0
- package/useGridSelectionCheckbox-i1rsjlC-.js +22 -0
- package/useHasTabbableChild-DeuCnGGv.js +34 -0
- package/useHighlightSelectionDescription-JVx2MW_e.js +552 -0
- package/useListState-DSOTbsL3.js +119 -0
- package/useLocalizedStringFormatter-DVCAZqcL.js +96 -0
- package/useSingleSelectListState-CmX9_L5H.js +34 -0
- package/useUpdateEffect-Dtz-i14F.js +12 -0
- package/x-JK7i-TQC.js +14 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { k as m } from "./useFocusRing-D97-G3fT.js";
|
|
2
|
+
import { useState as w, useRef as x, useEffect as y, useCallback as C } from "react";
|
|
3
|
+
function h(n, a) {
|
|
4
|
+
let { id: l, "aria-label": r, "aria-labelledby": e } = n;
|
|
5
|
+
return l = m(l), e && r ? e = [
|
|
6
|
+
.../* @__PURE__ */ new Set([
|
|
7
|
+
l,
|
|
8
|
+
...e.trim().split(/\s+/)
|
|
9
|
+
])
|
|
10
|
+
].join(" ") : e && (e = e.trim().split(/\s+/).join(" ")), !r && !e && a && (r = a), {
|
|
11
|
+
id: l,
|
|
12
|
+
"aria-label": r,
|
|
13
|
+
"aria-labelledby": e
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function j(n, a, l) {
|
|
17
|
+
let [r, e] = w(n || a), f = x(n !== void 0), t = n !== void 0;
|
|
18
|
+
y(() => {
|
|
19
|
+
let i = f.current;
|
|
20
|
+
i !== t && console.warn(`WARN: A component changed from ${i ? "controlled" : "uncontrolled"} to ${t ? "controlled" : "uncontrolled"}.`), f.current = t;
|
|
21
|
+
}, [
|
|
22
|
+
t
|
|
23
|
+
]);
|
|
24
|
+
let o = t ? n : r, p = C((i, ...d) => {
|
|
25
|
+
let u = (c, ...s) => {
|
|
26
|
+
l && (Object.is(o, c) || l(c, ...s)), t || (o = c);
|
|
27
|
+
};
|
|
28
|
+
typeof i == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), e((s, ...$) => {
|
|
29
|
+
let b = i(t ? o : s, ...$);
|
|
30
|
+
return u(b, ...d), t ? s : b;
|
|
31
|
+
})) : (t || e(i), u(i, ...d));
|
|
32
|
+
}, [
|
|
33
|
+
t,
|
|
34
|
+
o,
|
|
35
|
+
l
|
|
36
|
+
]);
|
|
37
|
+
return [
|
|
38
|
+
o,
|
|
39
|
+
p
|
|
40
|
+
];
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
j as $,
|
|
44
|
+
h as a
|
|
45
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { l as o } from "./useFocusRing-D97-G3fT.js";
|
|
2
|
+
import { useState as l } from "react";
|
|
3
|
+
let $ = 0;
|
|
4
|
+
const d = /* @__PURE__ */ new Map();
|
|
5
|
+
function u(t) {
|
|
6
|
+
let [f, n] = l();
|
|
7
|
+
return o(() => {
|
|
8
|
+
if (!t) return;
|
|
9
|
+
let e = d.get(t);
|
|
10
|
+
if (e)
|
|
11
|
+
n(e.element.id);
|
|
12
|
+
else {
|
|
13
|
+
let r = `react-aria-description-${$++}`;
|
|
14
|
+
n(r);
|
|
15
|
+
let a = document.createElement("div");
|
|
16
|
+
a.id = r, a.style.display = "none", a.textContent = t, document.body.appendChild(a), e = {
|
|
17
|
+
refCount: 0,
|
|
18
|
+
element: a
|
|
19
|
+
}, d.set(t, e);
|
|
20
|
+
}
|
|
21
|
+
return e.refCount++, () => {
|
|
22
|
+
e && --e.refCount === 0 && (e.element.remove(), d.delete(t));
|
|
23
|
+
};
|
|
24
|
+
}, [
|
|
25
|
+
t
|
|
26
|
+
]), {
|
|
27
|
+
"aria-describedby": t ? f : void 0
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
u as $
|
|
32
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { $ as p } from "./ListKeyboardDelegate-DxMjfMsI.js";
|
|
2
|
+
import { useCallback as o, useMemo as $ } from "react";
|
|
3
|
+
function F(h) {
|
|
4
|
+
let l = p({
|
|
5
|
+
usage: "search",
|
|
6
|
+
...h
|
|
7
|
+
}), r = o((a, e) => e.length === 0 ? !0 : (a = a.normalize("NFC"), e = e.normalize("NFC"), l.compare(a.slice(0, e.length), e) === 0), [
|
|
8
|
+
l
|
|
9
|
+
]), c = o((a, e) => e.length === 0 ? !0 : (a = a.normalize("NFC"), e = e.normalize("NFC"), l.compare(a.slice(-e.length), e) === 0), [
|
|
10
|
+
l
|
|
11
|
+
]), f = o((a, e) => {
|
|
12
|
+
if (e.length === 0) return !0;
|
|
13
|
+
a = a.normalize("NFC"), e = e.normalize("NFC");
|
|
14
|
+
let t = 0, m = e.length;
|
|
15
|
+
for (; t + m <= a.length; t++) {
|
|
16
|
+
let n = a.slice(t, t + m);
|
|
17
|
+
if (l.compare(e, n) === 0) return !0;
|
|
18
|
+
}
|
|
19
|
+
return !1;
|
|
20
|
+
}, [
|
|
21
|
+
l
|
|
22
|
+
]);
|
|
23
|
+
return $(() => ({
|
|
24
|
+
startsWith: r,
|
|
25
|
+
endsWith: c,
|
|
26
|
+
contains: f
|
|
27
|
+
}), [
|
|
28
|
+
r,
|
|
29
|
+
c,
|
|
30
|
+
f
|
|
31
|
+
]);
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
F as $
|
|
35
|
+
};
|