@amateescu/portal-ui-components 0.0.35-beta0 → 0.0.37
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/README.md +113 -0
- package/dist/{Button-DG4uye8X.js → Button-BM72-1G6.js} +107 -106
- package/dist/ButtonBase-D6nf3ymf.js +990 -0
- package/dist/{CircularProgress-DpvktFBW.js → CircularProgress-BlQFR6DW.js} +107 -80
- package/dist/Clear-BauR3cPE.js +8 -0
- package/dist/DefaultPropsProvider-BtPfTrMq.js +3449 -0
- package/dist/UserInfoDropdown-rBF0pwlq.js +23 -0
- package/dist/assets/KpiCard.css +1 -1
- package/dist/assets/PassportConfirmationModal.css +1 -0
- package/dist/assets/PassportErrorModal.css +1 -0
- package/dist/assets/PassportKpiCard.css +1 -0
- package/dist/assets/PassportTabHeader.css +1 -0
- package/dist/assets/index.css +1 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.d.ts +2 -1
- package/dist/components/ConfirmationModal/ConfirmationModal.d.ts.map +1 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.js +10 -2
- package/dist/components/ConfirmationModal/ConfirmationModal.stories.d.ts +1 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.stories.d.ts.map +1 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.types.d.ts +1 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.types.d.ts.map +1 -0
- package/dist/components/DebouncedPassportInput/DebouncedPassportInput.d.ts +3 -0
- package/dist/components/DebouncedPassportInput/DebouncedPassportInput.d.ts.map +1 -0
- package/dist/components/DebouncedPassportInput/DebouncedPassportInput.js +31 -0
- package/dist/components/DebouncedPassportInput/DebouncedPassportInput.stories.d.ts +23 -0
- package/dist/components/DebouncedPassportInput/DebouncedPassportInput.stories.d.ts.map +1 -0
- package/dist/components/DebouncedPassportInput/DebouncedPassportInput.types.d.ts +8 -0
- package/dist/components/DebouncedPassportInput/DebouncedPassportInput.types.d.ts.map +1 -0
- package/dist/components/ErrorModal/ErrorModal.d.ts +2 -1
- package/dist/components/ErrorModal/ErrorModal.d.ts.map +1 -0
- package/dist/components/ErrorModal/ErrorModal.js +11 -5
- package/dist/components/ErrorModal/ErrorModal.stories.d.ts +1 -0
- package/dist/components/ErrorModal/ErrorModal.stories.d.ts.map +1 -0
- package/dist/components/ErrorModal/ErrorModal.types.d.ts +1 -0
- package/dist/components/ErrorModal/ErrorModal.types.d.ts.map +1 -0
- package/dist/components/InfoModal/InfoModal.d.ts +2 -1
- package/dist/components/InfoModal/InfoModal.d.ts.map +1 -0
- package/dist/components/InfoModal/InfoModal.js +15 -3
- package/dist/components/InfoModal/InfoModal.stories.d.ts +1 -0
- package/dist/components/InfoModal/InfoModal.stories.d.ts.map +1 -0
- package/dist/components/InfoModal/InfoModal.types.d.ts +1 -0
- package/dist/components/InfoModal/InfoModal.types.d.ts.map +1 -0
- package/dist/components/KpiCard/KpiCard.d.ts +1 -0
- package/dist/components/KpiCard/KpiCard.d.ts.map +1 -0
- package/dist/components/KpiCard/KpiCard.js +29 -2434
- package/dist/components/KpiCard/KpiCard.stories.d.ts +1 -0
- package/dist/components/KpiCard/KpiCard.stories.d.ts.map +1 -0
- package/dist/components/KpiCard/KpiCard.types.d.ts +1 -0
- package/dist/components/KpiCard/KpiCard.types.d.ts.map +1 -0
- package/dist/components/LoadingAnimation/LoadingAnimation.d.ts +1 -0
- package/dist/components/LoadingAnimation/LoadingAnimation.d.ts.map +1 -0
- package/dist/components/LoadingAnimation/LoadingAnimation.js +66 -6
- package/dist/components/LoadingAnimation/LoadingAnimation.stories.d.ts +1 -0
- package/dist/components/LoadingAnimation/LoadingAnimation.stories.d.ts.map +1 -0
- package/dist/components/Login/Login.d.ts +2 -1
- package/dist/components/Login/Login.d.ts.map +1 -0
- package/dist/components/Login/Login.js +43 -8885
- package/dist/components/Login/Login.stories.d.ts +3 -2
- package/dist/components/Login/Login.stories.d.ts.map +1 -0
- package/dist/components/Login/Login.types.d.ts +1 -0
- package/dist/components/Login/Login.types.d.ts.map +1 -0
- package/dist/components/PassportAutocomplete/PassportAutocomplete.d.ts +3 -0
- package/dist/components/PassportAutocomplete/PassportAutocomplete.d.ts.map +1 -0
- package/dist/components/PassportAutocomplete/PassportAutocomplete.js +41 -0
- package/dist/components/PassportAutocomplete/PassportAutocomplete.stories.d.ts +22 -0
- package/dist/components/PassportAutocomplete/PassportAutocomplete.stories.d.ts.map +1 -0
- package/dist/components/PassportAutocomplete/PassportAutocomplete.types.d.ts +14 -0
- package/dist/components/PassportAutocomplete/PassportAutocomplete.types.d.ts.map +1 -0
- package/dist/components/PassportButton/PassportButton.d.ts +4 -0
- package/dist/components/PassportButton/PassportButton.d.ts.map +1 -0
- package/dist/components/{CustomButton/CustomButton.js → PassportButton/PassportButton.js} +10 -6
- package/dist/components/{CustomButton/CustomButton.stories.d.ts → PassportButton/PassportButton.stories.d.ts} +2 -1
- package/dist/components/PassportButton/PassportButton.stories.d.ts.map +1 -0
- package/dist/components/PassportButton/PassportButton.types.d.ts +9 -0
- package/dist/components/PassportButton/PassportButton.types.d.ts.map +1 -0
- package/dist/components/PassportConfirmationModal/PassportConfirmationModal.d.ts +9 -0
- package/dist/components/PassportConfirmationModal/PassportConfirmationModal.d.ts.map +1 -0
- package/dist/components/PassportConfirmationModal/PassportConfirmationModal.js +108 -0
- package/dist/components/{KpiWrapper/KpiWrapper.stories.d.ts → PassportConfirmationModal/PassportConfirmationModal.stories.d.ts} +5 -8
- package/dist/components/PassportConfirmationModal/PassportConfirmationModal.stories.d.ts.map +1 -0
- package/dist/components/PassportDatePicker/PassportDatePicker.d.ts +3 -0
- package/dist/components/PassportDatePicker/PassportDatePicker.d.ts.map +1 -0
- package/dist/components/PassportDatePicker/PassportDatePicker.js +1514 -0
- package/dist/components/PassportDatePicker/PassportDatePicker.stories.d.ts +25 -0
- package/dist/components/PassportDatePicker/PassportDatePicker.stories.d.ts.map +1 -0
- package/dist/components/PassportDatePicker/PassportDatePicker.types.d.ts +15 -0
- package/dist/components/PassportDatePicker/PassportDatePicker.types.d.ts.map +1 -0
- package/dist/components/PassportDateTimePicker/PassportDateTimePicker.d.ts +3 -0
- package/dist/components/PassportDateTimePicker/PassportDateTimePicker.d.ts.map +1 -0
- package/dist/components/PassportDateTimePicker/PassportDateTimePicker.js +5419 -0
- package/dist/components/PassportDateTimePicker/PassportDateTimePicker.stories.d.ts +30 -0
- package/dist/components/PassportDateTimePicker/PassportDateTimePicker.stories.d.ts.map +1 -0
- package/dist/components/PassportDateTimePicker/PassportDateTimePicker.types.d.ts +16 -0
- package/dist/components/PassportDateTimePicker/PassportDateTimePicker.types.d.ts.map +1 -0
- package/dist/components/PassportDateTimePicker/PassportDateTimePicker.types.js +1 -0
- package/dist/components/PassportDropdown/PassportDropdown.d.ts +3 -0
- package/dist/components/PassportDropdown/PassportDropdown.d.ts.map +1 -0
- package/dist/components/PassportDropdown/PassportDropdown.js +37 -0
- package/dist/components/PassportDropdown/PassportDropdown.stories.d.ts +25 -0
- package/dist/components/PassportDropdown/PassportDropdown.stories.d.ts.map +1 -0
- package/dist/components/PassportDropdown/PassportDropdown.types.d.ts +14 -0
- package/dist/components/PassportDropdown/PassportDropdown.types.d.ts.map +1 -0
- package/dist/components/PassportDropdown/PassportDropdown.types.js +1 -0
- package/dist/components/PassportErrorModal/PassportErrorModal.d.ts +8 -0
- package/dist/components/PassportErrorModal/PassportErrorModal.d.ts.map +1 -0
- package/dist/components/PassportErrorModal/PassportErrorModal.js +68 -0
- package/dist/components/PassportErrorModal/PassportErrorModal.stories.d.ts +19 -0
- package/dist/components/PassportErrorModal/PassportErrorModal.stories.d.ts.map +1 -0
- package/dist/components/PassportFooter/PassportFooter.d.ts +3 -0
- package/dist/components/PassportFooter/PassportFooter.d.ts.map +1 -0
- package/dist/components/PassportFooter/PassportFooter.js +46 -0
- package/dist/components/{CustomFooter/CustomFooter.stories.d.ts → PassportFooter/PassportFooter.stories.d.ts} +1 -0
- package/dist/components/PassportFooter/PassportFooter.stories.d.ts.map +1 -0
- package/dist/components/{CustomFooter/CustomFooter.types.d.ts → PassportFooter/PassportFooter.types.d.ts} +3 -2
- package/dist/components/PassportFooter/PassportFooter.types.d.ts.map +1 -0
- package/dist/components/PassportFooter/PassportFooter.types.js +1 -0
- package/dist/components/PassportInput/PassportInput.d.ts +3 -0
- package/dist/components/PassportInput/PassportInput.d.ts.map +1 -0
- package/dist/components/PassportInput/PassportInput.js +51 -0
- package/dist/components/PassportInput/PassportInput.stories.d.ts +24 -0
- package/dist/components/PassportInput/PassportInput.stories.d.ts.map +1 -0
- package/dist/components/PassportInput/PassportInput.types.d.ts +9 -0
- package/dist/components/PassportInput/PassportInput.types.d.ts.map +1 -0
- package/dist/components/PassportInput/PassportInput.types.js +1 -0
- package/dist/components/PassportKpiCard/PassportKpiCard.d.ts +3 -0
- package/dist/components/PassportKpiCard/PassportKpiCard.d.ts.map +1 -0
- package/dist/components/PassportKpiCard/PassportKpiCard.js +43 -0
- package/dist/components/PassportKpiCard/PassportKpiCard.stories.d.ts +21 -0
- package/dist/components/PassportKpiCard/PassportKpiCard.stories.d.ts.map +1 -0
- package/dist/components/PassportKpiCard/PassportKpiCard.types.d.ts +11 -0
- package/dist/components/PassportKpiCard/PassportKpiCard.types.d.ts.map +1 -0
- package/dist/components/PassportKpiCard/PassportKpiCard.types.js +1 -0
- package/dist/components/PassportKpiWrapper/PassportKpiWrapper.d.ts +3 -0
- package/dist/components/PassportKpiWrapper/PassportKpiWrapper.d.ts.map +1 -0
- package/dist/components/PassportKpiWrapper/PassportKpiWrapper.js +22 -0
- package/dist/components/PassportKpiWrapper/PassportKpiWrapper.stories.d.ts +23 -0
- package/dist/components/PassportKpiWrapper/PassportKpiWrapper.stories.d.ts.map +1 -0
- package/dist/components/{KpiWrapper/KpiWrapper.types.d.ts → PassportKpiWrapper/PassportKpiWrapper.types.d.ts} +2 -1
- package/dist/components/PassportKpiWrapper/PassportKpiWrapper.types.d.ts.map +1 -0
- package/dist/components/PassportKpiWrapper/PassportKpiWrapper.types.js +1 -0
- package/dist/components/PassportMultiSelect/PassportMultiSelect.d.ts +3 -0
- package/dist/components/PassportMultiSelect/PassportMultiSelect.d.ts.map +1 -0
- package/dist/components/PassportMultiSelect/PassportMultiSelect.js +72 -0
- package/dist/components/PassportMultiSelect/PassportMultiSelect.stories.d.ts +24 -0
- package/dist/components/PassportMultiSelect/PassportMultiSelect.stories.d.ts.map +1 -0
- package/dist/components/PassportMultiSelect/PassportMultiSelect.types.d.ts +12 -0
- package/dist/components/PassportMultiSelect/PassportMultiSelect.types.d.ts.map +1 -0
- package/dist/components/PassportMultiSelect/PassportMultiSelect.types.js +1 -0
- package/dist/components/PassportPagination/PassportPagination.d.ts +3 -0
- package/dist/components/PassportPagination/PassportPagination.d.ts.map +1 -0
- package/dist/components/{CustomPagination/CustomPagination.js → PassportPagination/PassportPagination.js} +215 -218
- package/dist/components/{CustomPagination/CustomPagination.stories.d.ts → PassportPagination/PassportPagination.stories.d.ts} +3 -2
- package/dist/components/PassportPagination/PassportPagination.stories.d.ts.map +1 -0
- package/dist/components/{CustomPagination/CustomPagination.types.d.ts → PassportPagination/PassportPagination.types.d.ts} +2 -1
- package/dist/components/PassportPagination/PassportPagination.types.d.ts.map +1 -0
- package/dist/components/PassportPagination/PassportPagination.types.js +1 -0
- package/dist/components/PassportTabHeader/PassportTabHeader.d.ts +7 -0
- package/dist/components/PassportTabHeader/PassportTabHeader.d.ts.map +1 -0
- package/dist/components/PassportTabHeader/PassportTabHeader.js +14 -0
- package/dist/components/PassportTabHeader/PassportTabHeader.stories.d.ts +21 -0
- package/dist/components/PassportTabHeader/PassportTabHeader.stories.d.ts.map +1 -0
- package/dist/components/PassportTextField/PassportTextField.d.ts +3 -0
- package/dist/components/PassportTextField/PassportTextField.d.ts.map +1 -0
- package/dist/components/PassportTextField/PassportTextField.js +23 -0
- package/dist/components/PassportTextField/PassportTextField.stories.d.ts +22 -0
- package/dist/components/PassportTextField/PassportTextField.stories.d.ts.map +1 -0
- package/dist/components/SideMenu/SideMenu.d.ts +1 -0
- package/dist/components/SideMenu/SideMenu.d.ts.map +1 -0
- package/dist/components/SideMenu/SideMenu.js +89 -41
- package/dist/components/SideMenu/SideMenu.stories.d.ts +1 -0
- package/dist/components/SideMenu/SideMenu.stories.d.ts.map +1 -0
- package/dist/components/SideMenu/SideMenu.types.d.ts +1 -0
- package/dist/components/SideMenu/SideMenu.types.d.ts.map +1 -0
- package/dist/components/TotalDataGrid/TotalDataGrid.d.ts +1 -0
- package/dist/components/TotalDataGrid/TotalDataGrid.d.ts.map +1 -0
- package/dist/components/TotalDataGrid/TotalDataGrid.js +3 -3
- package/dist/components/TotalDataGrid/TotalDataGrid.stories.d.ts +1 -0
- package/dist/components/TotalDataGrid/TotalDataGrid.stories.d.ts.map +1 -0
- package/dist/components/TotalDataGrid/TotalDataGrid.types.d.ts +1 -0
- package/dist/components/TotalDataGrid/TotalDataGrid.types.d.ts.map +1 -0
- package/dist/components/UserInfoDropdown/UserInfoDropdown.d.ts +1 -0
- package/dist/components/UserInfoDropdown/UserInfoDropdown.d.ts.map +1 -0
- package/dist/components/UserInfoDropdown/UserInfoDropdown.js +3 -2
- package/dist/components/UserInfoDropdown/UserInfoDropdown.stories.d.ts +1 -0
- package/dist/components/UserInfoDropdown/UserInfoDropdown.stories.d.ts.map +1 -0
- package/dist/components/UserInfoDropdown/UserInfoDropdown.types.d.ts +1 -0
- package/dist/components/UserInfoDropdown/UserInfoDropdown.types.d.ts.map +1 -0
- package/dist/components/index.d.ts +17 -4
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +51 -28
- package/dist/createSimplePaletteValueFilter-Bz8RuRaa.js +23 -0
- package/dist/{createSvgIcon-DNSRtm3a.js → createSvgIcon-B-eIQ7rU.js} +118 -124
- package/dist/extendSxProp-QNe1Nf_s.js +51 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +67 -44
- package/dist/mock.d.ts +1 -0
- package/dist/mock.d.ts.map +1 -0
- package/dist/portal-utils/chunkArray.d.ts +1 -0
- package/dist/portal-utils/chunkArray.d.ts.map +1 -0
- package/dist/portal-utils/cn.d.ts +1 -0
- package/dist/portal-utils/cn.d.ts.map +1 -0
- package/dist/portal-utils/formatters.d.ts +1 -0
- package/dist/portal-utils/formatters.d.ts.map +1 -0
- package/dist/portal-utils/formatters.js +291 -334
- package/dist/portal-utils/index.d.ts +2 -1
- package/dist/portal-utils/index.d.ts.map +1 -0
- package/dist/portal-utils/loggerService.d.ts +1 -0
- package/dist/portal-utils/loggerService.d.ts.map +1 -0
- package/dist/portal-utils/pageCount.d.ts +1 -0
- package/dist/portal-utils/pageCount.d.ts.map +1 -0
- package/dist/types/BusinessDayRange.d.ts +1 -0
- package/dist/types/BusinessDayRange.d.ts.map +1 -0
- package/dist/types/Column.d.ts +1 -0
- package/dist/types/Column.d.ts.map +1 -0
- package/dist/types/CultureStore.d.ts +1 -0
- package/dist/types/CultureStore.d.ts.map +1 -0
- package/dist/types/CustomSvg.d.ts +1 -0
- package/dist/types/CustomSvg.d.ts.map +1 -0
- package/dist/types/LoginRequest.d.ts +1 -0
- package/dist/types/LoginRequest.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/useMobilePicker-hk2kq6ev.js +19662 -0
- package/dist/useSlot-CXnK24LX.js +189 -0
- package/package.json +39 -38
- package/dist/Box-C-zPAMZN.js +0 -102
- package/dist/ButtonBase-DrxMtoTW.js +0 -966
- package/dist/EllipsisOutlined-DfCu6q_b.js +0 -2467
- package/dist/InvencoGVR-qnTq-d6S.js +0 -5
- package/dist/PurePanel-DvQTygSo.js +0 -2209
- package/dist/Skeleton-Bh0A9xju.js +0 -565
- package/dist/UserInfoDropdown-CWTcdnqL.js +0 -3755
- package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
- package/dist/assets/globals.css +0 -1
- package/dist/components/ConfirmationModal/ConfirmationModal.stories.js +0 -36
- package/dist/components/CustomButton/CustomButton.d.ts +0 -3
- package/dist/components/CustomButton/CustomButton.stories.js +0 -42
- package/dist/components/CustomButton/CustomeButton.types.d.ts +0 -8
- package/dist/components/CustomFooter/CustomFooter.d.ts +0 -2
- package/dist/components/CustomFooter/CustomFooter.js +0 -32
- package/dist/components/CustomFooter/CustomFooter.stories.js +0 -40
- package/dist/components/CustomPagination/CustomPagination.d.ts +0 -3
- package/dist/components/CustomPagination/CustomPagination.stories.js +0 -25
- package/dist/components/ErrorModal/ErrorModal.stories.js +0 -33
- package/dist/components/InfoModal/InfoModal.stories.js +0 -33
- package/dist/components/KpiCard/KpiCard.stories.js +0 -26
- package/dist/components/KpiWrapper/KpiWrapper.d.ts +0 -2
- package/dist/components/KpiWrapper/KpiWrapper.js +0 -11
- package/dist/components/KpiWrapper/KpiWrapper.stories.js +0 -56
- package/dist/components/LoadingAnimation/LoadingAnimation.stories.js +0 -14
- package/dist/components/Login/Login.stories.js +0 -24212
- package/dist/components/SideMenu/SideMenu.stories.js +0 -81
- package/dist/components/TotalDataGrid/TotalDataGrid.stories.js +0 -23
- package/dist/components/UserInfoDropdown/UserInfoDropdown.stories.js +0 -36
- package/dist/context-dCWAMvX5.js +0 -7320
- package/dist/createSimplePaletteValueFilter-CwLqlaaZ.js +0 -3457
- package/dist/index-B00P9-H3.js +0 -1681
- package/dist/index-BBBjHj3B.js +0 -411
- package/dist/objectWithoutPropertiesLoose-BTau6TOn.js +0 -33
- package/dist/useSlot-B4sbbhYz.js +0 -188
- /package/dist/assets/{CustomFooter.css → PassportFooter.css} +0 -0
- /package/dist/assets/{KpiWrapper.css → PassportKpiWrapper.css} +0 -0
- /package/dist/components/{CustomButton/CustomeButton.types.js → DebouncedPassportInput/DebouncedPassportInput.types.js} +0 -0
- /package/dist/components/{CustomFooter/CustomFooter.types.js → PassportAutocomplete/PassportAutocomplete.types.js} +0 -0
- /package/dist/components/{CustomPagination/CustomPagination.types.js → PassportButton/PassportButton.types.js} +0 -0
- /package/dist/components/{KpiWrapper/KpiWrapper.types.js → PassportDatePicker/PassportDatePicker.types.js} +0 -0
|
@@ -0,0 +1,990 @@
|
|
|
1
|
+
import * as c from "react";
|
|
2
|
+
import X, { isValidElement as W, cloneElement as G, Children as je } from "react";
|
|
3
|
+
import { P as n, c as C, a as de, u as he, s as oe, g as Be, d as Le } from "./DefaultPropsProvider-BtPfTrMq.js";
|
|
4
|
+
import { jsx as U, jsxs as ke } from "react/jsx-runtime";
|
|
5
|
+
import { keyframes as re } from "@emotion/react";
|
|
6
|
+
import { a as Fe } from "./createSimplePaletteValueFilter-Bz8RuRaa.js";
|
|
7
|
+
const $e = typeof window < "u" ? c.useLayoutEffect : c.useEffect;
|
|
8
|
+
function Z(e) {
|
|
9
|
+
const t = c.useRef(e);
|
|
10
|
+
return $e(() => {
|
|
11
|
+
t.current = e;
|
|
12
|
+
}), c.useRef((...o) => (
|
|
13
|
+
// @ts-expect-error hide `this`
|
|
14
|
+
(0, t.current)(...o)
|
|
15
|
+
)).current;
|
|
16
|
+
}
|
|
17
|
+
function le(...e) {
|
|
18
|
+
const t = c.useRef(void 0), o = c.useCallback((i) => {
|
|
19
|
+
const s = e.map((r) => {
|
|
20
|
+
if (r == null)
|
|
21
|
+
return null;
|
|
22
|
+
if (typeof r == "function") {
|
|
23
|
+
const u = r, l = u(i);
|
|
24
|
+
return typeof l == "function" ? l : () => {
|
|
25
|
+
u(null);
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
return r.current = i, () => {
|
|
29
|
+
r.current = null;
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
return () => {
|
|
33
|
+
s.forEach((r) => r?.());
|
|
34
|
+
};
|
|
35
|
+
}, e);
|
|
36
|
+
return c.useMemo(() => e.every((i) => i == null) ? null : (i) => {
|
|
37
|
+
t.current && (t.current(), t.current = void 0), i != null && (t.current = o(i));
|
|
38
|
+
}, e);
|
|
39
|
+
}
|
|
40
|
+
const Ue = n.oneOfType([n.func, n.object]);
|
|
41
|
+
function _e(e) {
|
|
42
|
+
const {
|
|
43
|
+
prototype: t = {}
|
|
44
|
+
} = e;
|
|
45
|
+
return !!t.isReactComponent;
|
|
46
|
+
}
|
|
47
|
+
function Ae(e, t, o, i, s) {
|
|
48
|
+
const r = e[t], u = s || t;
|
|
49
|
+
if (r == null || // When server-side rendering React doesn't warn either.
|
|
50
|
+
// This is not an accurate check for SSR.
|
|
51
|
+
// This is only in place for emotion compat.
|
|
52
|
+
// TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
|
|
53
|
+
typeof window > "u")
|
|
54
|
+
return null;
|
|
55
|
+
let l;
|
|
56
|
+
return typeof r == "function" && !_e(r) && (l = "Did you accidentally provide a plain function component instead?"), r === c.Fragment && (l = "Did you accidentally provide a React.Fragment instead?"), l !== void 0 ? new Error(`Invalid ${i} \`${u}\` supplied to \`${o}\`. Expected an element type that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
|
|
57
|
+
}
|
|
58
|
+
const ze = Fe(n.elementType, Ae);
|
|
59
|
+
function ce(e) {
|
|
60
|
+
try {
|
|
61
|
+
return e.matches(":focus-visible");
|
|
62
|
+
} catch {
|
|
63
|
+
process.env.NODE_ENV !== "production" && !window.navigator.userAgent.includes("jsdom") && console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.", "Some components rely on this feature to work properly."].join(`
|
|
64
|
+
`));
|
|
65
|
+
}
|
|
66
|
+
return !1;
|
|
67
|
+
}
|
|
68
|
+
const pe = {};
|
|
69
|
+
function me(e, t) {
|
|
70
|
+
const o = c.useRef(pe);
|
|
71
|
+
return o.current === pe && (o.current = e(t)), o;
|
|
72
|
+
}
|
|
73
|
+
class J {
|
|
74
|
+
/** React ref to the ripple instance */
|
|
75
|
+
/** If the ripple component should be mounted */
|
|
76
|
+
/** Promise that resolves when the ripple component is mounted */
|
|
77
|
+
/** If the ripple component has been mounted */
|
|
78
|
+
/** React state hook setter */
|
|
79
|
+
static create() {
|
|
80
|
+
return new J();
|
|
81
|
+
}
|
|
82
|
+
static use() {
|
|
83
|
+
const t = me(J.create).current, [o, i] = c.useState(!1);
|
|
84
|
+
return t.shouldMount = o, t.setShouldMount = i, c.useEffect(t.mountEffect, [o]), t;
|
|
85
|
+
}
|
|
86
|
+
constructor() {
|
|
87
|
+
this.ref = {
|
|
88
|
+
current: null
|
|
89
|
+
}, this.mounted = null, this.didMount = !1, this.shouldMount = !1, this.setShouldMount = null;
|
|
90
|
+
}
|
|
91
|
+
mount() {
|
|
92
|
+
return this.mounted || (this.mounted = Xe(), this.shouldMount = !0, this.setShouldMount(this.shouldMount)), this.mounted;
|
|
93
|
+
}
|
|
94
|
+
mountEffect = () => {
|
|
95
|
+
this.shouldMount && !this.didMount && this.ref.current !== null && (this.didMount = !0, this.mounted.resolve());
|
|
96
|
+
};
|
|
97
|
+
/* Ripple API */
|
|
98
|
+
start(...t) {
|
|
99
|
+
this.mount().then(() => this.ref.current?.start(...t));
|
|
100
|
+
}
|
|
101
|
+
stop(...t) {
|
|
102
|
+
this.mount().then(() => this.ref.current?.stop(...t));
|
|
103
|
+
}
|
|
104
|
+
pulsate(...t) {
|
|
105
|
+
this.mount().then(() => this.ref.current?.pulsate(...t));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function Ye() {
|
|
109
|
+
return J.use();
|
|
110
|
+
}
|
|
111
|
+
function Xe() {
|
|
112
|
+
let e, t;
|
|
113
|
+
const o = new Promise((i, s) => {
|
|
114
|
+
e = i, t = s;
|
|
115
|
+
});
|
|
116
|
+
return o.resolve = e, o.reject = t, o;
|
|
117
|
+
}
|
|
118
|
+
function ee() {
|
|
119
|
+
return ee = Object.assign ? Object.assign.bind() : function(e) {
|
|
120
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
121
|
+
var o = arguments[t];
|
|
122
|
+
for (var i in o) ({}).hasOwnProperty.call(o, i) && (e[i] = o[i]);
|
|
123
|
+
}
|
|
124
|
+
return e;
|
|
125
|
+
}, ee.apply(null, arguments);
|
|
126
|
+
}
|
|
127
|
+
function Ke(e, t) {
|
|
128
|
+
if (e == null) return {};
|
|
129
|
+
var o = {};
|
|
130
|
+
for (var i in e) if ({}.hasOwnProperty.call(e, i)) {
|
|
131
|
+
if (t.indexOf(i) !== -1) continue;
|
|
132
|
+
o[i] = e[i];
|
|
133
|
+
}
|
|
134
|
+
return o;
|
|
135
|
+
}
|
|
136
|
+
function te(e, t) {
|
|
137
|
+
return te = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(o, i) {
|
|
138
|
+
return o.__proto__ = i, o;
|
|
139
|
+
}, te(e, t);
|
|
140
|
+
}
|
|
141
|
+
function qe(e, t) {
|
|
142
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, te(e, t);
|
|
143
|
+
}
|
|
144
|
+
const fe = X.createContext(null);
|
|
145
|
+
function He(e) {
|
|
146
|
+
if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
147
|
+
return e;
|
|
148
|
+
}
|
|
149
|
+
function ie(e, t) {
|
|
150
|
+
var o = function(r) {
|
|
151
|
+
return t && W(r) ? t(r) : r;
|
|
152
|
+
}, i = /* @__PURE__ */ Object.create(null);
|
|
153
|
+
return e && je.map(e, function(s) {
|
|
154
|
+
return s;
|
|
155
|
+
}).forEach(function(s) {
|
|
156
|
+
i[s.key] = o(s);
|
|
157
|
+
}), i;
|
|
158
|
+
}
|
|
159
|
+
function We(e, t) {
|
|
160
|
+
e = e || {}, t = t || {};
|
|
161
|
+
function o(h) {
|
|
162
|
+
return h in t ? t[h] : e[h];
|
|
163
|
+
}
|
|
164
|
+
var i = /* @__PURE__ */ Object.create(null), s = [];
|
|
165
|
+
for (var r in e)
|
|
166
|
+
r in t ? s.length && (i[r] = s, s = []) : s.push(r);
|
|
167
|
+
var u, l = {};
|
|
168
|
+
for (var p in t) {
|
|
169
|
+
if (i[p])
|
|
170
|
+
for (u = 0; u < i[p].length; u++) {
|
|
171
|
+
var f = i[p][u];
|
|
172
|
+
l[i[p][u]] = o(f);
|
|
173
|
+
}
|
|
174
|
+
l[p] = o(p);
|
|
175
|
+
}
|
|
176
|
+
for (u = 0; u < s.length; u++)
|
|
177
|
+
l[s[u]] = o(s[u]);
|
|
178
|
+
return l;
|
|
179
|
+
}
|
|
180
|
+
function B(e, t, o) {
|
|
181
|
+
return o[t] != null ? o[t] : e.props[t];
|
|
182
|
+
}
|
|
183
|
+
function Ge(e, t) {
|
|
184
|
+
return ie(e.children, function(o) {
|
|
185
|
+
return G(o, {
|
|
186
|
+
onExited: t.bind(null, o),
|
|
187
|
+
in: !0,
|
|
188
|
+
appear: B(o, "appear", e),
|
|
189
|
+
enter: B(o, "enter", e),
|
|
190
|
+
exit: B(o, "exit", e)
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
function Ze(e, t, o) {
|
|
195
|
+
var i = ie(e.children), s = We(t, i);
|
|
196
|
+
return Object.keys(s).forEach(function(r) {
|
|
197
|
+
var u = s[r];
|
|
198
|
+
if (W(u)) {
|
|
199
|
+
var l = r in t, p = r in i, f = t[r], h = W(f) && !f.props.in;
|
|
200
|
+
p && (!l || h) ? s[r] = G(u, {
|
|
201
|
+
onExited: o.bind(null, u),
|
|
202
|
+
in: !0,
|
|
203
|
+
exit: B(u, "exit", e),
|
|
204
|
+
enter: B(u, "enter", e)
|
|
205
|
+
}) : !p && l && !h ? s[r] = G(u, {
|
|
206
|
+
in: !1
|
|
207
|
+
}) : p && l && W(f) && (s[r] = G(u, {
|
|
208
|
+
onExited: o.bind(null, u),
|
|
209
|
+
in: f.props.in,
|
|
210
|
+
exit: B(u, "exit", e),
|
|
211
|
+
enter: B(u, "enter", e)
|
|
212
|
+
}));
|
|
213
|
+
}
|
|
214
|
+
}), s;
|
|
215
|
+
}
|
|
216
|
+
var Je = Object.values || function(e) {
|
|
217
|
+
return Object.keys(e).map(function(t) {
|
|
218
|
+
return e[t];
|
|
219
|
+
});
|
|
220
|
+
}, Qe = {
|
|
221
|
+
component: "div",
|
|
222
|
+
childFactory: function(t) {
|
|
223
|
+
return t;
|
|
224
|
+
}
|
|
225
|
+
}, se = /* @__PURE__ */ (function(e) {
|
|
226
|
+
qe(t, e);
|
|
227
|
+
function t(i, s) {
|
|
228
|
+
var r;
|
|
229
|
+
r = e.call(this, i, s) || this;
|
|
230
|
+
var u = r.handleExited.bind(He(r));
|
|
231
|
+
return r.state = {
|
|
232
|
+
contextValue: {
|
|
233
|
+
isMounting: !0
|
|
234
|
+
},
|
|
235
|
+
handleExited: u,
|
|
236
|
+
firstRender: !0
|
|
237
|
+
}, r;
|
|
238
|
+
}
|
|
239
|
+
var o = t.prototype;
|
|
240
|
+
return o.componentDidMount = function() {
|
|
241
|
+
this.mounted = !0, this.setState({
|
|
242
|
+
contextValue: {
|
|
243
|
+
isMounting: !1
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
}, o.componentWillUnmount = function() {
|
|
247
|
+
this.mounted = !1;
|
|
248
|
+
}, t.getDerivedStateFromProps = function(s, r) {
|
|
249
|
+
var u = r.children, l = r.handleExited, p = r.firstRender;
|
|
250
|
+
return {
|
|
251
|
+
children: p ? Ge(s, l) : Ze(s, u, l),
|
|
252
|
+
firstRender: !1
|
|
253
|
+
};
|
|
254
|
+
}, o.handleExited = function(s, r) {
|
|
255
|
+
var u = ie(this.props.children);
|
|
256
|
+
s.key in u || (s.props.onExited && s.props.onExited(r), this.mounted && this.setState(function(l) {
|
|
257
|
+
var p = ee({}, l.children);
|
|
258
|
+
return delete p[s.key], {
|
|
259
|
+
children: p
|
|
260
|
+
};
|
|
261
|
+
}));
|
|
262
|
+
}, o.render = function() {
|
|
263
|
+
var s = this.props, r = s.component, u = s.childFactory, l = Ke(s, ["component", "childFactory"]), p = this.state.contextValue, f = Je(this.state.children).map(u);
|
|
264
|
+
return delete l.appear, delete l.enter, delete l.exit, r === null ? /* @__PURE__ */ X.createElement(fe.Provider, {
|
|
265
|
+
value: p
|
|
266
|
+
}, f) : /* @__PURE__ */ X.createElement(fe.Provider, {
|
|
267
|
+
value: p
|
|
268
|
+
}, /* @__PURE__ */ X.createElement(r, l, f));
|
|
269
|
+
}, t;
|
|
270
|
+
})(X.Component);
|
|
271
|
+
se.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
272
|
+
/**
|
|
273
|
+
* `<TransitionGroup>` renders a `<div>` by default. You can change this
|
|
274
|
+
* behavior by providing a `component` prop.
|
|
275
|
+
* If you use React v16+ and would like to avoid a wrapping `<div>` element
|
|
276
|
+
* you can pass in `component={null}`. This is useful if the wrapping div
|
|
277
|
+
* borks your css styles.
|
|
278
|
+
*/
|
|
279
|
+
component: n.any,
|
|
280
|
+
/**
|
|
281
|
+
* A set of `<Transition>` components, that are toggled `in` and out as they
|
|
282
|
+
* leave. the `<TransitionGroup>` will inject specific transition props, so
|
|
283
|
+
* remember to spread them through if you are wrapping the `<Transition>` as
|
|
284
|
+
* with our `<Fade>` example.
|
|
285
|
+
*
|
|
286
|
+
* While this component is meant for multiple `Transition` or `CSSTransition`
|
|
287
|
+
* children, sometimes you may want to have a single transition child with
|
|
288
|
+
* content that you want to be transitioned out and in when you change it
|
|
289
|
+
* (e.g. routes, images etc.) In that case you can change the `key` prop of
|
|
290
|
+
* the transition child as you change its content, this will cause
|
|
291
|
+
* `TransitionGroup` to transition the child out and back in.
|
|
292
|
+
*/
|
|
293
|
+
children: n.node,
|
|
294
|
+
/**
|
|
295
|
+
* A convenience prop that enables or disables appear animations
|
|
296
|
+
* for all children. Note that specifying this will override any defaults set
|
|
297
|
+
* on individual children Transitions.
|
|
298
|
+
*/
|
|
299
|
+
appear: n.bool,
|
|
300
|
+
/**
|
|
301
|
+
* A convenience prop that enables or disables enter animations
|
|
302
|
+
* for all children. Note that specifying this will override any defaults set
|
|
303
|
+
* on individual children Transitions.
|
|
304
|
+
*/
|
|
305
|
+
enter: n.bool,
|
|
306
|
+
/**
|
|
307
|
+
* A convenience prop that enables or disables exit animations
|
|
308
|
+
* for all children. Note that specifying this will override any defaults set
|
|
309
|
+
* on individual children Transitions.
|
|
310
|
+
*/
|
|
311
|
+
exit: n.bool,
|
|
312
|
+
/**
|
|
313
|
+
* You may need to apply reactive updates to a child as it is exiting.
|
|
314
|
+
* This is generally done by using `cloneElement` however in the case of an exiting
|
|
315
|
+
* child the element has already been removed and not accessible to the consumer.
|
|
316
|
+
*
|
|
317
|
+
* If you do need to update a child as it leaves you can provide a `childFactory`
|
|
318
|
+
* to wrap every child, even the ones that are leaving.
|
|
319
|
+
*
|
|
320
|
+
* @type Function(child: ReactElement) -> ReactElement
|
|
321
|
+
*/
|
|
322
|
+
childFactory: n.func
|
|
323
|
+
} : {};
|
|
324
|
+
se.defaultProps = Qe;
|
|
325
|
+
const et = [];
|
|
326
|
+
function tt(e) {
|
|
327
|
+
c.useEffect(e, et);
|
|
328
|
+
}
|
|
329
|
+
class ue {
|
|
330
|
+
static create() {
|
|
331
|
+
return new ue();
|
|
332
|
+
}
|
|
333
|
+
currentId = null;
|
|
334
|
+
/**
|
|
335
|
+
* Executes `fn` after `delay`, clearing any previously scheduled call.
|
|
336
|
+
*/
|
|
337
|
+
start(t, o) {
|
|
338
|
+
this.clear(), this.currentId = setTimeout(() => {
|
|
339
|
+
this.currentId = null, o();
|
|
340
|
+
}, t);
|
|
341
|
+
}
|
|
342
|
+
clear = () => {
|
|
343
|
+
this.currentId !== null && (clearTimeout(this.currentId), this.currentId = null);
|
|
344
|
+
};
|
|
345
|
+
disposeEffect = () => this.clear;
|
|
346
|
+
}
|
|
347
|
+
function nt() {
|
|
348
|
+
const e = me(ue.create).current;
|
|
349
|
+
return tt(e.disposeEffect), e;
|
|
350
|
+
}
|
|
351
|
+
function be(e) {
|
|
352
|
+
const {
|
|
353
|
+
className: t,
|
|
354
|
+
classes: o,
|
|
355
|
+
pulsate: i = !1,
|
|
356
|
+
rippleX: s,
|
|
357
|
+
rippleY: r,
|
|
358
|
+
rippleSize: u,
|
|
359
|
+
in: l,
|
|
360
|
+
onExited: p,
|
|
361
|
+
timeout: f
|
|
362
|
+
} = e, [h, m] = c.useState(!1), R = C(t, o.ripple, o.rippleVisible, i && o.ripplePulsate), w = {
|
|
363
|
+
width: u,
|
|
364
|
+
height: u,
|
|
365
|
+
top: -(u / 2) + r,
|
|
366
|
+
left: -(u / 2) + s
|
|
367
|
+
}, g = C(o.child, h && o.childLeaving, i && o.childPulsate);
|
|
368
|
+
return !l && !h && m(!0), c.useEffect(() => {
|
|
369
|
+
if (!l && p != null) {
|
|
370
|
+
const V = setTimeout(p, f);
|
|
371
|
+
return () => {
|
|
372
|
+
clearTimeout(V);
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
}, [p, l, f]), /* @__PURE__ */ U("span", {
|
|
376
|
+
className: R,
|
|
377
|
+
style: w,
|
|
378
|
+
children: /* @__PURE__ */ U("span", {
|
|
379
|
+
className: g
|
|
380
|
+
})
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
process.env.NODE_ENV !== "production" && (be.propTypes = {
|
|
384
|
+
/**
|
|
385
|
+
* Override or extend the styles applied to the component.
|
|
386
|
+
*/
|
|
387
|
+
classes: n.object.isRequired,
|
|
388
|
+
className: n.string,
|
|
389
|
+
/**
|
|
390
|
+
* @ignore - injected from TransitionGroup
|
|
391
|
+
*/
|
|
392
|
+
in: n.bool,
|
|
393
|
+
/**
|
|
394
|
+
* @ignore - injected from TransitionGroup
|
|
395
|
+
*/
|
|
396
|
+
onExited: n.func,
|
|
397
|
+
/**
|
|
398
|
+
* If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.
|
|
399
|
+
*/
|
|
400
|
+
pulsate: n.bool,
|
|
401
|
+
/**
|
|
402
|
+
* Diameter of the ripple.
|
|
403
|
+
*/
|
|
404
|
+
rippleSize: n.number,
|
|
405
|
+
/**
|
|
406
|
+
* Horizontal position of the ripple center.
|
|
407
|
+
*/
|
|
408
|
+
rippleX: n.number,
|
|
409
|
+
/**
|
|
410
|
+
* Vertical position of the ripple center.
|
|
411
|
+
*/
|
|
412
|
+
rippleY: n.number,
|
|
413
|
+
/**
|
|
414
|
+
* exit delay
|
|
415
|
+
*/
|
|
416
|
+
timeout: n.number.isRequired
|
|
417
|
+
});
|
|
418
|
+
const y = de("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsate", "child", "childLeaving", "childPulsate"]), ne = 550, ot = 80, rt = re`
|
|
419
|
+
0% {
|
|
420
|
+
transform: scale(0);
|
|
421
|
+
opacity: 0.1;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
100% {
|
|
425
|
+
transform: scale(1);
|
|
426
|
+
opacity: 0.3;
|
|
427
|
+
}
|
|
428
|
+
`, it = re`
|
|
429
|
+
0% {
|
|
430
|
+
opacity: 1;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
100% {
|
|
434
|
+
opacity: 0;
|
|
435
|
+
}
|
|
436
|
+
`, st = re`
|
|
437
|
+
0% {
|
|
438
|
+
transform: scale(1);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
50% {
|
|
442
|
+
transform: scale(0.92);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
100% {
|
|
446
|
+
transform: scale(1);
|
|
447
|
+
}
|
|
448
|
+
`, ut = oe("span", {
|
|
449
|
+
name: "MuiTouchRipple",
|
|
450
|
+
slot: "Root"
|
|
451
|
+
})({
|
|
452
|
+
overflow: "hidden",
|
|
453
|
+
pointerEvents: "none",
|
|
454
|
+
position: "absolute",
|
|
455
|
+
zIndex: 0,
|
|
456
|
+
top: 0,
|
|
457
|
+
right: 0,
|
|
458
|
+
bottom: 0,
|
|
459
|
+
left: 0,
|
|
460
|
+
borderRadius: "inherit"
|
|
461
|
+
}), at = oe(be, {
|
|
462
|
+
name: "MuiTouchRipple",
|
|
463
|
+
slot: "Ripple"
|
|
464
|
+
})`
|
|
465
|
+
opacity: 0;
|
|
466
|
+
position: absolute;
|
|
467
|
+
|
|
468
|
+
&.${y.rippleVisible} {
|
|
469
|
+
opacity: 0.3;
|
|
470
|
+
transform: scale(1);
|
|
471
|
+
animation-name: ${rt};
|
|
472
|
+
animation-duration: ${ne}ms;
|
|
473
|
+
animation-timing-function: ${({
|
|
474
|
+
theme: e
|
|
475
|
+
}) => e.transitions.easing.easeInOut};
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
&.${y.ripplePulsate} {
|
|
479
|
+
animation-duration: ${({
|
|
480
|
+
theme: e
|
|
481
|
+
}) => e.transitions.duration.shorter}ms;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
& .${y.child} {
|
|
485
|
+
opacity: 1;
|
|
486
|
+
display: block;
|
|
487
|
+
width: 100%;
|
|
488
|
+
height: 100%;
|
|
489
|
+
border-radius: 50%;
|
|
490
|
+
background-color: currentColor;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
& .${y.childLeaving} {
|
|
494
|
+
opacity: 0;
|
|
495
|
+
animation-name: ${it};
|
|
496
|
+
animation-duration: ${ne}ms;
|
|
497
|
+
animation-timing-function: ${({
|
|
498
|
+
theme: e
|
|
499
|
+
}) => e.transitions.easing.easeInOut};
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
& .${y.childPulsate} {
|
|
503
|
+
position: absolute;
|
|
504
|
+
/* @noflip */
|
|
505
|
+
left: 0px;
|
|
506
|
+
top: 0;
|
|
507
|
+
animation-name: ${st};
|
|
508
|
+
animation-duration: 2500ms;
|
|
509
|
+
animation-timing-function: ${({
|
|
510
|
+
theme: e
|
|
511
|
+
}) => e.transitions.easing.easeInOut};
|
|
512
|
+
animation-iteration-count: infinite;
|
|
513
|
+
animation-delay: 200ms;
|
|
514
|
+
}
|
|
515
|
+
`, ge = /* @__PURE__ */ c.forwardRef(function(t, o) {
|
|
516
|
+
const i = he({
|
|
517
|
+
props: t,
|
|
518
|
+
name: "MuiTouchRipple"
|
|
519
|
+
}), {
|
|
520
|
+
center: s = !1,
|
|
521
|
+
classes: r = {},
|
|
522
|
+
className: u,
|
|
523
|
+
...l
|
|
524
|
+
} = i, [p, f] = c.useState([]), h = c.useRef(0), m = c.useRef(null);
|
|
525
|
+
c.useEffect(() => {
|
|
526
|
+
m.current && (m.current(), m.current = null);
|
|
527
|
+
}, [p]);
|
|
528
|
+
const R = c.useRef(!1), w = nt(), g = c.useRef(null), V = c.useRef(null), v = c.useCallback((d) => {
|
|
529
|
+
const {
|
|
530
|
+
pulsate: T,
|
|
531
|
+
rippleX: M,
|
|
532
|
+
rippleY: F,
|
|
533
|
+
rippleSize: S,
|
|
534
|
+
cb: _
|
|
535
|
+
} = d;
|
|
536
|
+
f((E) => [...E, /* @__PURE__ */ U(at, {
|
|
537
|
+
classes: {
|
|
538
|
+
ripple: C(r.ripple, y.ripple),
|
|
539
|
+
rippleVisible: C(r.rippleVisible, y.rippleVisible),
|
|
540
|
+
ripplePulsate: C(r.ripplePulsate, y.ripplePulsate),
|
|
541
|
+
child: C(r.child, y.child),
|
|
542
|
+
childLeaving: C(r.childLeaving, y.childLeaving),
|
|
543
|
+
childPulsate: C(r.childPulsate, y.childPulsate)
|
|
544
|
+
},
|
|
545
|
+
timeout: ne,
|
|
546
|
+
pulsate: T,
|
|
547
|
+
rippleX: M,
|
|
548
|
+
rippleY: F,
|
|
549
|
+
rippleSize: S
|
|
550
|
+
}, h.current)]), h.current += 1, m.current = _;
|
|
551
|
+
}, [r]), L = c.useCallback((d = {}, T = {}, M = () => {
|
|
552
|
+
}) => {
|
|
553
|
+
const {
|
|
554
|
+
pulsate: F = !1,
|
|
555
|
+
center: S = s || T.pulsate,
|
|
556
|
+
fakeElement: _ = !1
|
|
557
|
+
// For test purposes
|
|
558
|
+
} = T;
|
|
559
|
+
if (d?.type === "mousedown" && R.current) {
|
|
560
|
+
R.current = !1;
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
d?.type === "touchstart" && (R.current = !0);
|
|
564
|
+
const E = _ ? null : V.current, O = E ? E.getBoundingClientRect() : {
|
|
565
|
+
width: 0,
|
|
566
|
+
height: 0,
|
|
567
|
+
left: 0,
|
|
568
|
+
top: 0
|
|
569
|
+
};
|
|
570
|
+
let N, x, D;
|
|
571
|
+
if (S || d === void 0 || d.clientX === 0 && d.clientY === 0 || !d.clientX && !d.touches)
|
|
572
|
+
N = Math.round(O.width / 2), x = Math.round(O.height / 2);
|
|
573
|
+
else {
|
|
574
|
+
const {
|
|
575
|
+
clientX: A,
|
|
576
|
+
clientY: I
|
|
577
|
+
} = d.touches && d.touches.length > 0 ? d.touches[0] : d;
|
|
578
|
+
N = Math.round(A - O.left), x = Math.round(I - O.top);
|
|
579
|
+
}
|
|
580
|
+
if (S)
|
|
581
|
+
D = Math.sqrt((2 * O.width ** 2 + O.height ** 2) / 3), D % 2 === 0 && (D += 1);
|
|
582
|
+
else {
|
|
583
|
+
const A = Math.max(Math.abs((E ? E.clientWidth : 0) - N), N) * 2 + 2, I = Math.max(Math.abs((E ? E.clientHeight : 0) - x), x) * 2 + 2;
|
|
584
|
+
D = Math.sqrt(A ** 2 + I ** 2);
|
|
585
|
+
}
|
|
586
|
+
d?.touches ? g.current === null && (g.current = () => {
|
|
587
|
+
v({
|
|
588
|
+
pulsate: F,
|
|
589
|
+
rippleX: N,
|
|
590
|
+
rippleY: x,
|
|
591
|
+
rippleSize: D,
|
|
592
|
+
cb: M
|
|
593
|
+
});
|
|
594
|
+
}, w.start(ot, () => {
|
|
595
|
+
g.current && (g.current(), g.current = null);
|
|
596
|
+
})) : v({
|
|
597
|
+
pulsate: F,
|
|
598
|
+
rippleX: N,
|
|
599
|
+
rippleY: x,
|
|
600
|
+
rippleSize: D,
|
|
601
|
+
cb: M
|
|
602
|
+
});
|
|
603
|
+
}, [s, v, w]), K = c.useCallback(() => {
|
|
604
|
+
L({}, {
|
|
605
|
+
pulsate: !0
|
|
606
|
+
});
|
|
607
|
+
}, [L]), k = c.useCallback((d, T) => {
|
|
608
|
+
if (w.clear(), d?.type === "touchend" && g.current) {
|
|
609
|
+
g.current(), g.current = null, w.start(0, () => {
|
|
610
|
+
k(d, T);
|
|
611
|
+
});
|
|
612
|
+
return;
|
|
613
|
+
}
|
|
614
|
+
g.current = null, f((M) => M.length > 0 ? M.slice(1) : M), m.current = T;
|
|
615
|
+
}, [w]);
|
|
616
|
+
return c.useImperativeHandle(o, () => ({
|
|
617
|
+
pulsate: K,
|
|
618
|
+
start: L,
|
|
619
|
+
stop: k
|
|
620
|
+
}), [K, L, k]), /* @__PURE__ */ U(ut, {
|
|
621
|
+
className: C(y.root, r.root, u),
|
|
622
|
+
ref: V,
|
|
623
|
+
...l,
|
|
624
|
+
children: /* @__PURE__ */ U(se, {
|
|
625
|
+
component: null,
|
|
626
|
+
exit: !0,
|
|
627
|
+
children: p
|
|
628
|
+
})
|
|
629
|
+
});
|
|
630
|
+
});
|
|
631
|
+
process.env.NODE_ENV !== "production" && (ge.propTypes = {
|
|
632
|
+
/**
|
|
633
|
+
* If `true`, the ripple starts at the center of the component
|
|
634
|
+
* rather than at the point of interaction.
|
|
635
|
+
*/
|
|
636
|
+
center: n.bool,
|
|
637
|
+
/**
|
|
638
|
+
* Override or extend the styles applied to the component.
|
|
639
|
+
*/
|
|
640
|
+
classes: n.object,
|
|
641
|
+
/**
|
|
642
|
+
* @ignore
|
|
643
|
+
*/
|
|
644
|
+
className: n.string
|
|
645
|
+
});
|
|
646
|
+
function lt(e) {
|
|
647
|
+
return Be("MuiButtonBase", e);
|
|
648
|
+
}
|
|
649
|
+
const ct = de("MuiButtonBase", ["root", "disabled", "focusVisible"]), pt = (e) => {
|
|
650
|
+
const {
|
|
651
|
+
disabled: t,
|
|
652
|
+
focusVisible: o,
|
|
653
|
+
focusVisibleClassName: i,
|
|
654
|
+
classes: s
|
|
655
|
+
} = e, u = Le({
|
|
656
|
+
root: ["root", t && "disabled", o && "focusVisible"]
|
|
657
|
+
}, lt, s);
|
|
658
|
+
return o && i && (u.root += ` ${i}`), u;
|
|
659
|
+
}, ft = oe("button", {
|
|
660
|
+
name: "MuiButtonBase",
|
|
661
|
+
slot: "Root"
|
|
662
|
+
})({
|
|
663
|
+
display: "inline-flex",
|
|
664
|
+
alignItems: "center",
|
|
665
|
+
justifyContent: "center",
|
|
666
|
+
position: "relative",
|
|
667
|
+
boxSizing: "border-box",
|
|
668
|
+
WebkitTapHighlightColor: "transparent",
|
|
669
|
+
backgroundColor: "transparent",
|
|
670
|
+
// Reset default value
|
|
671
|
+
// We disable the focus ring for mouse, touch and keyboard users.
|
|
672
|
+
outline: 0,
|
|
673
|
+
border: 0,
|
|
674
|
+
margin: 0,
|
|
675
|
+
// Remove the margin in Safari
|
|
676
|
+
borderRadius: 0,
|
|
677
|
+
padding: 0,
|
|
678
|
+
// Remove the padding in Firefox
|
|
679
|
+
cursor: "pointer",
|
|
680
|
+
userSelect: "none",
|
|
681
|
+
verticalAlign: "middle",
|
|
682
|
+
MozAppearance: "none",
|
|
683
|
+
// Reset
|
|
684
|
+
WebkitAppearance: "none",
|
|
685
|
+
// Reset
|
|
686
|
+
textDecoration: "none",
|
|
687
|
+
// So we take precedent over the style of a native <a /> element.
|
|
688
|
+
color: "inherit",
|
|
689
|
+
"&::-moz-focus-inner": {
|
|
690
|
+
borderStyle: "none"
|
|
691
|
+
// Remove Firefox dotted outline.
|
|
692
|
+
},
|
|
693
|
+
[`&.${ct.disabled}`]: {
|
|
694
|
+
pointerEvents: "none",
|
|
695
|
+
// Disable link interactions
|
|
696
|
+
cursor: "default"
|
|
697
|
+
},
|
|
698
|
+
"@media print": {
|
|
699
|
+
colorAdjust: "exact"
|
|
700
|
+
}
|
|
701
|
+
}), dt = /* @__PURE__ */ c.forwardRef(function(t, o) {
|
|
702
|
+
const i = he({
|
|
703
|
+
props: t,
|
|
704
|
+
name: "MuiButtonBase"
|
|
705
|
+
}), {
|
|
706
|
+
action: s,
|
|
707
|
+
centerRipple: r = !1,
|
|
708
|
+
children: u,
|
|
709
|
+
className: l,
|
|
710
|
+
component: p = "button",
|
|
711
|
+
disabled: f = !1,
|
|
712
|
+
disableRipple: h = !1,
|
|
713
|
+
disableTouchRipple: m = !1,
|
|
714
|
+
focusRipple: R = !1,
|
|
715
|
+
focusVisibleClassName: w,
|
|
716
|
+
LinkComponent: g = "a",
|
|
717
|
+
onBlur: V,
|
|
718
|
+
onClick: v,
|
|
719
|
+
onContextMenu: L,
|
|
720
|
+
onDragLeave: K,
|
|
721
|
+
onFocus: k,
|
|
722
|
+
onFocusVisible: d,
|
|
723
|
+
onKeyDown: T,
|
|
724
|
+
onKeyUp: M,
|
|
725
|
+
onMouseDown: F,
|
|
726
|
+
onMouseLeave: S,
|
|
727
|
+
onMouseUp: _,
|
|
728
|
+
onTouchEnd: E,
|
|
729
|
+
onTouchMove: O,
|
|
730
|
+
onTouchStart: N,
|
|
731
|
+
tabIndex: x = 0,
|
|
732
|
+
TouchRippleProps: D,
|
|
733
|
+
touchRippleRef: A,
|
|
734
|
+
type: I,
|
|
735
|
+
...$
|
|
736
|
+
} = i, z = c.useRef(null), b = Ye(), ye = le(b.ref, A), [j, q] = c.useState(!1);
|
|
737
|
+
f && j && q(!1), c.useImperativeHandle(s, () => ({
|
|
738
|
+
focusVisible: () => {
|
|
739
|
+
q(!0), z.current.focus();
|
|
740
|
+
}
|
|
741
|
+
}), []);
|
|
742
|
+
const Re = b.shouldMount && !h && !f;
|
|
743
|
+
c.useEffect(() => {
|
|
744
|
+
j && R && !h && b.pulsate();
|
|
745
|
+
}, [h, R, j, b]);
|
|
746
|
+
const Me = P(b, "start", F, m), Te = P(b, "stop", L, m), Ee = P(b, "stop", K, m), Ce = P(b, "stop", _, m), ve = P(b, "stop", (a) => {
|
|
747
|
+
j && a.preventDefault(), S && S(a);
|
|
748
|
+
}, m), xe = P(b, "start", N, m), Pe = P(b, "stop", E, m), we = P(b, "stop", O, m), Oe = P(b, "stop", (a) => {
|
|
749
|
+
ce(a.target) || q(!1), V && V(a);
|
|
750
|
+
}, !1), Ne = Z((a) => {
|
|
751
|
+
z.current || (z.current = a.currentTarget), ce(a.target) && (q(!0), d && d(a)), k && k(a);
|
|
752
|
+
}), Q = () => {
|
|
753
|
+
const a = z.current;
|
|
754
|
+
return p && p !== "button" && !(a.tagName === "A" && a.href);
|
|
755
|
+
}, De = Z((a) => {
|
|
756
|
+
R && !a.repeat && j && a.key === " " && b.stop(a, () => {
|
|
757
|
+
b.start(a);
|
|
758
|
+
}), a.target === a.currentTarget && Q() && a.key === " " && a.preventDefault(), T && T(a), a.target === a.currentTarget && Q() && a.key === "Enter" && !f && (a.preventDefault(), v && v(a));
|
|
759
|
+
}), Ve = Z((a) => {
|
|
760
|
+
R && a.key === " " && j && !a.defaultPrevented && b.stop(a, () => {
|
|
761
|
+
b.pulsate(a);
|
|
762
|
+
}), M && M(a), v && a.target === a.currentTarget && Q() && a.key === " " && !a.defaultPrevented && v(a);
|
|
763
|
+
});
|
|
764
|
+
let H = p;
|
|
765
|
+
H === "button" && ($.href || $.to) && (H = g);
|
|
766
|
+
const Y = {};
|
|
767
|
+
if (H === "button") {
|
|
768
|
+
const a = !!$.formAction;
|
|
769
|
+
Y.type = I === void 0 && !a ? "button" : I, Y.disabled = f;
|
|
770
|
+
} else
|
|
771
|
+
!$.href && !$.to && (Y.role = "button"), f && (Y["aria-disabled"] = f);
|
|
772
|
+
const Se = le(o, z), ae = {
|
|
773
|
+
...i,
|
|
774
|
+
centerRipple: r,
|
|
775
|
+
component: p,
|
|
776
|
+
disabled: f,
|
|
777
|
+
disableRipple: h,
|
|
778
|
+
disableTouchRipple: m,
|
|
779
|
+
focusRipple: R,
|
|
780
|
+
tabIndex: x,
|
|
781
|
+
focusVisible: j
|
|
782
|
+
}, Ie = pt(ae);
|
|
783
|
+
return /* @__PURE__ */ ke(ft, {
|
|
784
|
+
as: H,
|
|
785
|
+
className: C(Ie.root, l),
|
|
786
|
+
ownerState: ae,
|
|
787
|
+
onBlur: Oe,
|
|
788
|
+
onClick: v,
|
|
789
|
+
onContextMenu: Te,
|
|
790
|
+
onFocus: Ne,
|
|
791
|
+
onKeyDown: De,
|
|
792
|
+
onKeyUp: Ve,
|
|
793
|
+
onMouseDown: Me,
|
|
794
|
+
onMouseLeave: ve,
|
|
795
|
+
onMouseUp: Ce,
|
|
796
|
+
onDragLeave: Ee,
|
|
797
|
+
onTouchEnd: Pe,
|
|
798
|
+
onTouchMove: we,
|
|
799
|
+
onTouchStart: xe,
|
|
800
|
+
ref: Se,
|
|
801
|
+
tabIndex: f ? -1 : x,
|
|
802
|
+
type: I,
|
|
803
|
+
...Y,
|
|
804
|
+
...$,
|
|
805
|
+
children: [u, Re ? /* @__PURE__ */ U(ge, {
|
|
806
|
+
ref: ye,
|
|
807
|
+
center: r,
|
|
808
|
+
...D
|
|
809
|
+
}) : null]
|
|
810
|
+
});
|
|
811
|
+
});
|
|
812
|
+
function P(e, t, o, i = !1) {
|
|
813
|
+
return Z((s) => (o && o(s), i || e[t](s), !0));
|
|
814
|
+
}
|
|
815
|
+
process.env.NODE_ENV !== "production" && (dt.propTypes = {
|
|
816
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
817
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
818
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
819
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
820
|
+
/**
|
|
821
|
+
* A ref for imperative actions.
|
|
822
|
+
* It currently only supports `focusVisible()` action.
|
|
823
|
+
*/
|
|
824
|
+
action: Ue,
|
|
825
|
+
/**
|
|
826
|
+
* If `true`, the ripples are centered.
|
|
827
|
+
* They won't start at the cursor interaction position.
|
|
828
|
+
* @default false
|
|
829
|
+
*/
|
|
830
|
+
centerRipple: n.bool,
|
|
831
|
+
/**
|
|
832
|
+
* The content of the component.
|
|
833
|
+
*/
|
|
834
|
+
children: n.node,
|
|
835
|
+
/**
|
|
836
|
+
* Override or extend the styles applied to the component.
|
|
837
|
+
*/
|
|
838
|
+
classes: n.object,
|
|
839
|
+
/**
|
|
840
|
+
* @ignore
|
|
841
|
+
*/
|
|
842
|
+
className: n.string,
|
|
843
|
+
/**
|
|
844
|
+
* The component used for the root node.
|
|
845
|
+
* Either a string to use a HTML element or a component.
|
|
846
|
+
*/
|
|
847
|
+
component: ze,
|
|
848
|
+
/**
|
|
849
|
+
* If `true`, the component is disabled.
|
|
850
|
+
* @default false
|
|
851
|
+
*/
|
|
852
|
+
disabled: n.bool,
|
|
853
|
+
/**
|
|
854
|
+
* If `true`, the ripple effect is disabled.
|
|
855
|
+
*
|
|
856
|
+
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
857
|
+
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
858
|
+
* @default false
|
|
859
|
+
*/
|
|
860
|
+
disableRipple: n.bool,
|
|
861
|
+
/**
|
|
862
|
+
* If `true`, the touch ripple effect is disabled.
|
|
863
|
+
* @default false
|
|
864
|
+
*/
|
|
865
|
+
disableTouchRipple: n.bool,
|
|
866
|
+
/**
|
|
867
|
+
* If `true`, the base button will have a keyboard focus ripple.
|
|
868
|
+
* @default false
|
|
869
|
+
*/
|
|
870
|
+
focusRipple: n.bool,
|
|
871
|
+
/**
|
|
872
|
+
* This prop can help identify which element has keyboard focus.
|
|
873
|
+
* The class name will be applied when the element gains the focus through keyboard interaction.
|
|
874
|
+
* It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
|
|
875
|
+
* The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
|
|
876
|
+
* A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
|
|
877
|
+
* if needed.
|
|
878
|
+
*/
|
|
879
|
+
focusVisibleClassName: n.string,
|
|
880
|
+
/**
|
|
881
|
+
* @ignore
|
|
882
|
+
*/
|
|
883
|
+
formAction: n.oneOfType([n.func, n.string]),
|
|
884
|
+
/**
|
|
885
|
+
* @ignore
|
|
886
|
+
*/
|
|
887
|
+
href: n.any,
|
|
888
|
+
/**
|
|
889
|
+
* The component used to render a link when the `href` prop is provided.
|
|
890
|
+
* @default 'a'
|
|
891
|
+
*/
|
|
892
|
+
LinkComponent: n.elementType,
|
|
893
|
+
/**
|
|
894
|
+
* @ignore
|
|
895
|
+
*/
|
|
896
|
+
onBlur: n.func,
|
|
897
|
+
/**
|
|
898
|
+
* @ignore
|
|
899
|
+
*/
|
|
900
|
+
onClick: n.func,
|
|
901
|
+
/**
|
|
902
|
+
* @ignore
|
|
903
|
+
*/
|
|
904
|
+
onContextMenu: n.func,
|
|
905
|
+
/**
|
|
906
|
+
* @ignore
|
|
907
|
+
*/
|
|
908
|
+
onDragLeave: n.func,
|
|
909
|
+
/**
|
|
910
|
+
* @ignore
|
|
911
|
+
*/
|
|
912
|
+
onFocus: n.func,
|
|
913
|
+
/**
|
|
914
|
+
* Callback fired when the component is focused with a keyboard.
|
|
915
|
+
* We trigger a `onFocus` callback too.
|
|
916
|
+
*/
|
|
917
|
+
onFocusVisible: n.func,
|
|
918
|
+
/**
|
|
919
|
+
* @ignore
|
|
920
|
+
*/
|
|
921
|
+
onKeyDown: n.func,
|
|
922
|
+
/**
|
|
923
|
+
* @ignore
|
|
924
|
+
*/
|
|
925
|
+
onKeyUp: n.func,
|
|
926
|
+
/**
|
|
927
|
+
* @ignore
|
|
928
|
+
*/
|
|
929
|
+
onMouseDown: n.func,
|
|
930
|
+
/**
|
|
931
|
+
* @ignore
|
|
932
|
+
*/
|
|
933
|
+
onMouseLeave: n.func,
|
|
934
|
+
/**
|
|
935
|
+
* @ignore
|
|
936
|
+
*/
|
|
937
|
+
onMouseUp: n.func,
|
|
938
|
+
/**
|
|
939
|
+
* @ignore
|
|
940
|
+
*/
|
|
941
|
+
onTouchEnd: n.func,
|
|
942
|
+
/**
|
|
943
|
+
* @ignore
|
|
944
|
+
*/
|
|
945
|
+
onTouchMove: n.func,
|
|
946
|
+
/**
|
|
947
|
+
* @ignore
|
|
948
|
+
*/
|
|
949
|
+
onTouchStart: n.func,
|
|
950
|
+
/**
|
|
951
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
952
|
+
*/
|
|
953
|
+
sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
|
|
954
|
+
/**
|
|
955
|
+
* @default 0
|
|
956
|
+
*/
|
|
957
|
+
tabIndex: n.number,
|
|
958
|
+
/**
|
|
959
|
+
* Props applied to the `TouchRipple` element.
|
|
960
|
+
*/
|
|
961
|
+
TouchRippleProps: n.object,
|
|
962
|
+
/**
|
|
963
|
+
* A ref that points to the `TouchRipple` element.
|
|
964
|
+
*/
|
|
965
|
+
touchRippleRef: n.oneOfType([n.func, n.shape({
|
|
966
|
+
current: n.shape({
|
|
967
|
+
pulsate: n.func.isRequired,
|
|
968
|
+
start: n.func.isRequired,
|
|
969
|
+
stop: n.func.isRequired
|
|
970
|
+
})
|
|
971
|
+
})]),
|
|
972
|
+
/**
|
|
973
|
+
* @ignore
|
|
974
|
+
*/
|
|
975
|
+
type: n.oneOfType([n.oneOf(["button", "reset", "submit"]), n.string])
|
|
976
|
+
});
|
|
977
|
+
export {
|
|
978
|
+
dt as B,
|
|
979
|
+
fe as T,
|
|
980
|
+
Ke as _,
|
|
981
|
+
ee as a,
|
|
982
|
+
$e as b,
|
|
983
|
+
Z as c,
|
|
984
|
+
qe as d,
|
|
985
|
+
nt as e,
|
|
986
|
+
ze as f,
|
|
987
|
+
se as g,
|
|
988
|
+
Ue as r,
|
|
989
|
+
le as u
|
|
990
|
+
};
|