@tedi-design-system/react 18.0.0-rc.1 → 18.0.0-rc.10
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/_virtual/index.cjs10.js +1 -1
- package/_virtual/index.cjs11.js +1 -1
- package/_virtual/index.cjs12.js +1 -1
- package/_virtual/index.cjs13.js +1 -1
- package/_virtual/index.cjs5.js +1 -1
- package/_virtual/index.cjs6.js +1 -1
- package/_virtual/index.cjs7.js +1 -1
- package/_virtual/index.cjs8.js +1 -1
- package/_virtual/index.cjs9.js +1 -1
- package/_virtual/index.es10.js +1 -1
- package/_virtual/index.es11.js +1 -1
- package/_virtual/index.es12.js +1 -1
- package/_virtual/index.es13.js +2 -4
- package/_virtual/index.es14.js +2 -2
- package/_virtual/index.es5.js +4 -2
- package/_virtual/index.es6.js +1 -1
- package/_virtual/index.es7.js +1 -1
- package/_virtual/index.es8.js +1 -1
- package/_virtual/index.es9.js +1 -1
- package/bundle-stats.html +1 -1
- package/external/@floating-ui/core/dist/floating-ui.core.cjs.js +1 -1
- package/external/@floating-ui/core/dist/floating-ui.core.es.js +275 -271
- package/external/@floating-ui/dom/dist/floating-ui.dom.cjs.js +1 -1
- package/external/@floating-ui/dom/dist/floating-ui.dom.es.js +189 -188
- package/external/@floating-ui/react/dist/floating-ui.react.cjs.js +1 -1
- package/external/@floating-ui/react/dist/floating-ui.react.es.js +1419 -1538
- package/external/@floating-ui/react/dist/floating-ui.react.utils.cjs.js +1 -1
- package/external/@floating-ui/react/dist/floating-ui.react.utils.es.js +348 -81
- package/external/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.js +1 -1
- package/external/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js +113 -93
- package/external/@floating-ui/utils/dist/floating-ui.utils.cjs.js +1 -1
- package/external/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.js +1 -1
- package/external/@floating-ui/utils/dist/floating-ui.utils.dom.es.js +97 -97
- package/external/@floating-ui/utils/dist/floating-ui.utils.es.js +66 -68
- package/external/@mui/system/colorManipulator.cjs.js +1 -1
- package/external/@mui/system/colorManipulator.es.js +2 -2
- package/external/@mui/system/createStyled.cjs.js +1 -1
- package/external/@mui/system/createStyled.es.js +6 -6
- package/external/@mui/system/useThemeWithoutDefault.cjs.js +1 -1
- package/external/@mui/system/useThemeWithoutDefault.es.js +1 -1
- package/external/lodash-es/_baseUnset.cjs.js +1 -1
- package/external/lodash-es/_baseUnset.es.js +12 -19
- package/external/react-is/index.cjs.js +1 -1
- package/external/react-is/index.es.js +1 -1
- package/external/tabbable/dist/index.esm.cjs.js +1 -1
- package/external/tabbable/dist/index.esm.es.js +72 -63
- package/external/toposort/index.cjs.js +1 -1
- package/external/toposort/index.es.js +1 -1
- package/index.css +1 -1
- package/package.json +4 -4
- package/src/community/components/form/pickers/calendar/calendar.d.ts +6 -0
- package/src/community/components/form/pickers/datepicker/datepicker.d.ts +6 -0
- package/src/community/components/form/pickers/datetimepicker/datetimepicker.d.ts +6 -0
- package/src/community/components/form/pickers/timepicker/timepicker.d.ts +6 -0
- package/src/community/components/modal/modal-closer.d.ts +6 -0
- package/src/community/components/modal/modal-provider.d.ts +6 -0
- package/src/community/components/modal/modal-trigger.d.ts +6 -0
- package/src/community/components/modal/modal.d.ts +6 -0
- package/src/tedi/components/buttons/button-group/button-group.cjs.js +1 -1
- package/src/tedi/components/buttons/button-group/button-group.es.js +4 -4
- package/src/tedi/components/buttons/collapse/collapse.cjs.js +1 -1
- package/src/tedi/components/buttons/collapse/collapse.d.ts +23 -0
- package/src/tedi/components/buttons/collapse/collapse.es.js +62 -59
- package/src/tedi/components/buttons/collapse/collapse.module.scss.cjs.js +1 -1
- package/src/tedi/components/buttons/collapse/collapse.module.scss.es.js +2 -1
- package/src/tedi/components/content/calendar/calendar-grid.cjs.js +1 -1
- package/src/tedi/components/content/calendar/calendar-grid.es.js +7 -6
- package/src/tedi/components/content/calendar/calendar.cjs.js +1 -1
- package/src/tedi/components/content/calendar/calendar.d.ts +9 -1
- package/src/tedi/components/content/calendar/calendar.es.js +72 -71
- package/src/tedi/components/content/calendar/calendar.module.scss.cjs.js +1 -1
- package/src/tedi/components/content/calendar/calendar.module.scss.es.js +3 -2
- package/src/tedi/components/content/calendar/components/calendar-header/calendar-header.cjs.js +1 -1
- package/src/tedi/components/content/calendar/components/calendar-header/calendar-header.es.js +99 -79
- package/src/tedi/components/content/table/index.d.ts +6 -0
- package/src/tedi/components/content/table/table-columns-menu/table-columns-menu.cjs.js +1 -0
- package/src/tedi/components/content/table/table-columns-menu/table-columns-menu.d.ts +15 -0
- package/src/tedi/components/content/table/table-columns-menu/table-columns-menu.es.js +37 -0
- package/src/tedi/components/content/table/table-context.cjs.js +1 -0
- package/src/tedi/components/content/table/table-context.d.ts +3 -0
- package/src/tedi/components/content/table/table-context.es.js +11 -0
- package/src/tedi/components/content/table/table-header-button/table-header-button.cjs.js +1 -0
- package/src/tedi/components/content/table/table-header-button/table-header-button.d.ts +51 -0
- package/src/tedi/components/content/table/table-header-button/table-header-button.es.js +42 -0
- package/src/tedi/components/content/table/table-header-button/table-header-button.module.scss.cjs.js +1 -0
- package/src/tedi/components/content/table/table-header-button/table-header-button.module.scss.es.js +7 -0
- package/src/tedi/components/content/table/table-toolbar/table-toolbar.cjs.js +1 -0
- package/src/tedi/components/content/table/table-toolbar/table-toolbar.d.ts +21 -0
- package/src/tedi/components/content/table/table-toolbar/table-toolbar.es.js +9 -0
- package/src/tedi/components/content/table/table.cjs.js +1 -0
- package/src/tedi/components/content/table/table.d.ts +519 -0
- package/src/tedi/components/content/table/table.es.js +856 -0
- package/src/tedi/components/content/table/table.module.scss.cjs.js +1 -0
- package/src/tedi/components/content/table/table.module.scss.es.js +54 -0
- package/src/tedi/components/content/table/use-table-persistence.cjs.js +1 -0
- package/src/tedi/components/content/table/use-table-persistence.d.ts +13 -0
- package/src/tedi/components/content/table/use-table-persistence.es.js +53 -0
- package/src/tedi/components/filter/filter/filter-group-context.cjs.js +1 -0
- package/src/tedi/components/filter/filter/filter-group-context.d.ts +8 -0
- package/src/tedi/components/filter/filter/filter-group-context.es.js +5 -0
- package/src/tedi/components/filter/filter/filter-group.cjs.js +1 -0
- package/src/tedi/components/filter/filter/filter-group.d.ts +94 -0
- package/src/tedi/components/filter/filter/filter-group.es.js +64 -0
- package/src/tedi/components/filter/filter/filter.cjs.js +1 -0
- package/src/tedi/components/filter/filter/filter.d.ts +98 -0
- package/src/tedi/components/filter/filter/filter.es.js +236 -0
- package/src/tedi/components/filter/filter/filter.module.scss.cjs.js +1 -0
- package/src/tedi/components/filter/filter/filter.module.scss.es.js +21 -0
- package/src/tedi/components/filter/filter/index.d.ts +3 -0
- package/src/tedi/components/form/date-field/date-field-helpers.cjs.js +1 -0
- package/src/tedi/components/form/date-field/date-field-helpers.d.ts +66 -0
- package/src/tedi/components/form/date-field/date-field-helpers.es.js +28 -0
- package/src/tedi/components/form/date-field/date-field.cjs.js +1 -1
- package/src/tedi/components/form/date-field/date-field.d.ts +22 -0
- package/src/tedi/components/form/date-field/date-field.es.js +248 -212
- package/src/tedi/components/form/date-time-field/date-time-field.cjs.js +1 -0
- package/src/tedi/components/form/date-time-field/date-time-field.d.ts +207 -0
- package/src/tedi/components/form/date-time-field/date-time-field.es.js +376 -0
- package/src/tedi/components/form/date-time-field/date-time-field.module.scss.cjs.js +1 -0
- package/src/tedi/components/form/date-time-field/date-time-field.module.scss.es.js +30 -0
- package/src/tedi/components/form/search/search.cjs.js +1 -1
- package/src/tedi/components/form/search/search.es.js +22 -20
- package/src/tedi/components/form/time-field/time-field.cjs.js +1 -1
- package/src/tedi/components/form/time-field/time-field.d.ts +9 -0
- package/src/tedi/components/form/time-field/time-field.es.js +80 -78
- package/src/tedi/components/layout/mobile-nav/components/mobile-nav-toggle/mobile-nav-toggle.cjs.js +1 -0
- package/src/tedi/components/layout/mobile-nav/components/mobile-nav-toggle/mobile-nav-toggle.d.ts +52 -0
- package/src/tedi/components/layout/mobile-nav/components/mobile-nav-toggle/mobile-nav-toggle.es.js +68 -0
- package/src/tedi/components/layout/mobile-nav/components/mobile-nav-toggle/mobile-nav-toggle.module.scss.cjs.js +1 -0
- package/src/tedi/components/layout/mobile-nav/components/mobile-nav-toggle/mobile-nav-toggle.module.scss.es.js +9 -0
- package/src/tedi/components/layout/mobile-nav/index.d.ts +2 -0
- package/src/tedi/components/layout/mobile-nav/mobile-nav.cjs.js +1 -0
- package/src/tedi/components/layout/mobile-nav/mobile-nav.d.ts +20 -0
- package/src/tedi/components/layout/{sidenav/components/sidenav-mobile/sidenav-mobile.es.js → mobile-nav/mobile-nav.es.js} +21 -20
- package/src/tedi/components/layout/sidenav/index.d.ts +2 -2
- package/src/tedi/components/layout/sidenav/sidenav.cjs.js +1 -1
- package/src/tedi/components/layout/sidenav/sidenav.d.ts +2 -11
- package/src/tedi/components/layout/sidenav/sidenav.es.js +27 -27
- package/src/tedi/components/layout/top-nav/components/top-nav-group/top-nav-group.cjs.js +1 -0
- package/src/tedi/components/layout/top-nav/components/top-nav-group/top-nav-group.d.ts +34 -0
- package/src/tedi/components/layout/top-nav/components/top-nav-group/top-nav-group.es.js +33 -0
- package/src/tedi/components/layout/top-nav/components/top-nav-item/top-nav-item.cjs.js +1 -0
- package/src/tedi/components/layout/top-nav/components/top-nav-item/top-nav-item.d.ts +66 -0
- package/src/tedi/components/layout/top-nav/components/top-nav-item/top-nav-item.es.js +101 -0
- package/src/tedi/components/layout/top-nav/components/top-nav-separator/top-nav-separator.cjs.js +1 -0
- package/src/tedi/components/layout/top-nav/components/top-nav-separator/top-nav-separator.d.ts +11 -0
- package/src/tedi/components/layout/top-nav/components/top-nav-separator/top-nav-separator.es.js +9 -0
- package/src/tedi/components/layout/top-nav/components/top-nav-subitem/top-nav-subitem.cjs.js +1 -0
- package/src/tedi/components/layout/top-nav/components/top-nav-subitem/top-nav-subitem.d.ts +28 -0
- package/src/tedi/components/layout/top-nav/components/top-nav-subitem/top-nav-subitem.es.js +30 -0
- package/src/tedi/components/layout/top-nav/index.d.ts +5 -0
- package/src/tedi/components/layout/top-nav/top-nav-context.cjs.js +1 -0
- package/src/tedi/components/layout/top-nav/top-nav-context.d.ts +11 -0
- package/src/tedi/components/layout/top-nav/top-nav-context.es.js +6 -0
- package/src/tedi/components/layout/top-nav/top-nav.cjs.js +1 -0
- package/src/tedi/components/layout/top-nav/top-nav.d.ts +91 -0
- package/src/tedi/components/layout/top-nav/top-nav.es.js +171 -0
- package/src/tedi/components/layout/top-nav/top-nav.module.scss.cjs.js +1 -0
- package/src/tedi/components/layout/top-nav/top-nav.module.scss.es.js +28 -0
- package/src/tedi/components/navigation/pagination/index.d.ts +1 -0
- package/src/tedi/components/navigation/pagination/pagination-mobile-modal/pagination-mobile-modal.cjs.js +1 -0
- package/src/tedi/components/navigation/pagination/pagination-mobile-modal/pagination-mobile-modal.d.ts +36 -0
- package/src/tedi/components/navigation/pagination/pagination-mobile-modal/pagination-mobile-modal.es.js +65 -0
- package/src/tedi/components/navigation/pagination/pagination-mobile-modal/pagination-mobile-modal.module.scss.cjs.js +1 -0
- package/src/tedi/components/navigation/pagination/pagination-mobile-modal/pagination-mobile-modal.module.scss.es.js +13 -0
- package/src/tedi/components/navigation/pagination/pagination.cjs.js +1 -1
- package/src/tedi/components/navigation/pagination/pagination.d.ts +115 -13
- package/src/tedi/components/navigation/pagination/pagination.es.js +244 -96
- package/src/tedi/components/navigation/pagination/pagination.module.scss.cjs.js +1 -1
- package/src/tedi/components/navigation/pagination/pagination.module.scss.es.js +18 -1
- package/src/tedi/components/notifications/alert/alert.cjs.js +1 -1
- package/src/tedi/components/notifications/alert/alert.d.ts +14 -1
- package/src/tedi/components/notifications/alert/alert.es.js +45 -42
- package/src/tedi/components/notifications/alert/alert.module.scss.cjs.js +1 -1
- package/src/tedi/components/notifications/alert/alert.module.scss.es.js +2 -1
- package/src/tedi/components/overlays/dropdown/dropdown.es.js +0 -3
- package/src/tedi/components/overlays/modal/index.d.ts +8 -0
- package/src/tedi/components/overlays/modal/modal-body/modal-body.cjs.js +1 -0
- package/src/tedi/components/overlays/modal/modal-body/modal-body.d.ts +22 -0
- package/src/tedi/components/overlays/modal/modal-body/modal-body.es.js +21 -0
- package/src/tedi/components/overlays/modal/modal-closer/modal-closer.cjs.js +1 -0
- package/src/tedi/components/overlays/modal/modal-closer/modal-closer.d.ts +15 -0
- package/src/tedi/components/overlays/modal/modal-closer/modal-closer.es.js +16 -0
- package/src/tedi/components/overlays/modal/modal-content/modal-content.cjs.js +1 -0
- package/src/tedi/components/overlays/modal/modal-content/modal-content.d.ts +108 -0
- package/src/tedi/components/overlays/modal/modal-content/modal-content.es.js +81 -0
- package/src/tedi/components/overlays/modal/modal-context.cjs.js +1 -0
- package/src/tedi/components/overlays/modal/modal-context.d.ts +59 -0
- package/src/tedi/components/overlays/modal/modal-context.es.js +15 -0
- package/src/tedi/components/overlays/modal/modal-footer/modal-footer.cjs.js +1 -0
- package/src/tedi/components/overlays/modal/modal-footer/modal-footer.d.ts +22 -0
- package/src/tedi/components/overlays/modal/modal-footer/modal-footer.es.js +25 -0
- package/src/tedi/components/overlays/modal/modal-header/modal-header.cjs.js +1 -0
- package/src/tedi/components/overlays/modal/modal-header/modal-header.d.ts +58 -0
- package/src/tedi/components/overlays/modal/modal-header/modal-header.es.js +25 -0
- package/src/tedi/components/overlays/modal/modal-trigger/modal-trigger.cjs.js +1 -0
- package/src/tedi/components/overlays/modal/modal-trigger/modal-trigger.d.ts +13 -0
- package/src/tedi/components/overlays/modal/modal-trigger/modal-trigger.es.js +14 -0
- package/src/tedi/components/overlays/modal/modal.cjs.js +1 -0
- package/src/tedi/components/overlays/modal/modal.d.ts +68 -0
- package/src/tedi/components/overlays/modal/modal.es.js +76 -0
- package/src/tedi/components/overlays/modal/modal.module.scss.cjs.js +1 -0
- package/src/tedi/components/overlays/modal/modal.module.scss.es.js +37 -0
- package/src/tedi/components/overlays/overlay/overlay-content.cjs.js +1 -1
- package/src/tedi/components/overlays/overlay/overlay-content.es.js +35 -32
- package/src/tedi/components/overlays/tooltip/tooltip.cjs.js +1 -1
- package/src/tedi/components/overlays/tooltip/tooltip.es.js +14 -6
- package/src/tedi/helpers/hooks/use-breakpoint.cjs.js +1 -1
- package/src/tedi/helpers/hooks/use-breakpoint.d.ts +7 -0
- package/src/tedi/helpers/hooks/use-breakpoint.es.js +22 -14
- package/src/tedi/helpers/hooks/use-sidenav-state.d.ts +1 -1
- package/src/tedi/index.d.ts +6 -0
- package/src/tedi/providers/label-provider/labels-map.cjs.js +1 -1
- package/src/tedi/providers/label-provider/labels-map.d.ts +174 -6
- package/src/tedi/providers/label-provider/labels-map.es.js +234 -57
- package/tedi.cjs.js +1 -1
- package/tedi.es.js +257 -202
- package/src/tedi/components/layout/sidenav/components/sidenav-mobile/sidenav-mobile.cjs.js +0 -1
- package/src/tedi/components/layout/sidenav/components/sidenav-mobile/sidenav-mobile.d.ts +0 -14
- package/src/tedi/components/layout/sidenav/components/sidenav-toggle/sidenav-toggle.cjs.js +0 -1
- package/src/tedi/components/layout/sidenav/components/sidenav-toggle/sidenav-toggle.d.ts +0 -31
- package/src/tedi/components/layout/sidenav/components/sidenav-toggle/sidenav-toggle.es.js +0 -48
- package/src/tedi/components/layout/sidenav/components/sidenav-toggle/sidenav-toggle.module.scss.cjs.js +0 -1
- package/src/tedi/components/layout/sidenav/components/sidenav-toggle/sidenav-toggle.module.scss.es.js +0 -8
|
@@ -1,132 +1,280 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { Icon as
|
|
5
|
-
import { Text as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { Select as
|
|
1
|
+
import { jsxs as c, jsx as i, Fragment as re } from "react/jsx-runtime";
|
|
2
|
+
import x from "../../../../../external/classnames/index.es.js";
|
|
3
|
+
import { forwardRef as Be, useMemo as f, useState as I, useEffect as E, useCallback as le, useId as Te, useRef as A } from "react";
|
|
4
|
+
import { Icon as V } from "../../base/icon/icon.es.js";
|
|
5
|
+
import { Text as se } from "../../base/typography/text/text.es.js";
|
|
6
|
+
import { Button as H } from "../../buttons/button/button.es.js";
|
|
7
|
+
import { Select as Ie } from "../../form/select/select.es.js";
|
|
8
8
|
import a from "./pagination.module.scss.es.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
9
|
+
import { PaginationMobileModal as oe } from "./pagination-mobile-modal/pagination-mobile-modal.es.js";
|
|
10
|
+
import { usePagination as Ee } from "./use-pagination.es.js";
|
|
11
|
+
import { useBreakpoint as Ve, isBreakpointBelow as He } from "../../../helpers/hooks/use-breakpoint.es.js";
|
|
12
|
+
import { useBreakpointProps as je } from "../../../helpers/hooks/use-breakpoint-props.es.js";
|
|
13
|
+
import { useLabels as Ke } from "../../../providers/label-provider/use-labels.es.js";
|
|
14
|
+
const de = ["xs", "sm", "md", "lg", "xl", "xxl"], j = (p, N) => p === void 0 || p === !1 ? !1 : p === !0 ? !0 : N ? de.indexOf(N) < de.indexOf(p) : !1, De = Be((p, N) => {
|
|
15
|
+
var ae;
|
|
12
16
|
const {
|
|
13
|
-
pageCount:
|
|
14
|
-
page:
|
|
15
|
-
defaultPage:
|
|
16
|
-
onPageChange:
|
|
17
|
-
totalItems:
|
|
18
|
-
pageSize:
|
|
19
|
-
pageSizeOptions:
|
|
20
|
-
onPageSizeChange:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
pageCount: r,
|
|
18
|
+
page: _,
|
|
19
|
+
defaultPage: pe = 1,
|
|
20
|
+
onPageChange: z,
|
|
21
|
+
totalItems: K,
|
|
22
|
+
pageSize: g,
|
|
23
|
+
pageSizeOptions: h,
|
|
24
|
+
onPageSizeChange: u,
|
|
25
|
+
labels: D,
|
|
26
|
+
hideResults: ce = !1,
|
|
27
|
+
hidePageSize: ge = !1,
|
|
28
|
+
hidePager: ue = !1,
|
|
29
|
+
className: be
|
|
30
|
+
} = p, { getCurrentBreakpointProps: me } = je(p.defaultServerBreakpoint), {
|
|
31
|
+
boundaryCount: fe = 1,
|
|
32
|
+
siblingCount: _e = 1,
|
|
33
|
+
background: F = "white",
|
|
34
|
+
borders: he = "top",
|
|
35
|
+
showPrevNextButtons: U = !1,
|
|
36
|
+
showEdgeNavLabels: M = !1,
|
|
37
|
+
previousIcon: ve = "arrow_back",
|
|
38
|
+
nextIcon: Se = "arrow_forward",
|
|
39
|
+
arrowVariant: Ne = "default"
|
|
40
|
+
} = me(p), { getLabel: s } = Ke(), y = Ve(), v = He(y, "md"), t = f(
|
|
26
41
|
() => ({
|
|
27
|
-
ariaLabel:
|
|
28
|
-
previous:
|
|
29
|
-
next:
|
|
30
|
-
pageAriaLabel: (e) =>
|
|
31
|
-
currentPageAriaLabel: (e) =>
|
|
32
|
-
results: (e) =>
|
|
33
|
-
pageSize:
|
|
34
|
-
|
|
42
|
+
ariaLabel: s("pagination.title"),
|
|
43
|
+
previous: s("pagination.prev-page"),
|
|
44
|
+
next: s("pagination.next-page"),
|
|
45
|
+
pageAriaLabel: (e) => s("pagination.page", e, !1),
|
|
46
|
+
currentPageAriaLabel: (e) => s("pagination.page", e, !0),
|
|
47
|
+
results: (e) => s("pagination.results", e),
|
|
48
|
+
pageSize: s("pagination.page-size"),
|
|
49
|
+
pageStatus: (e, n) => s("pagination.page-status", e, n),
|
|
50
|
+
...D
|
|
35
51
|
}),
|
|
36
|
-
[
|
|
37
|
-
), [
|
|
52
|
+
[s, D]
|
|
53
|
+
), [L, R] = I(pe), ze = _ ?? L, o = r > 0 ? Math.max(1, Math.min(r, ze)) : 1;
|
|
54
|
+
E(() => {
|
|
55
|
+
_ === void 0 && (r > 0 && L > r ? R(r) : L < 1 && R(1));
|
|
56
|
+
}, [_, r, L]);
|
|
57
|
+
const P = Ee({ page: o, pageCount: r, boundaryCount: fe, siblingCount: _e }), O = le(
|
|
38
58
|
(e) => {
|
|
39
|
-
e ===
|
|
59
|
+
e !== null && (e === o || e < 1 || e > r || (_ === void 0 && R(e), z == null || z(e)));
|
|
40
60
|
},
|
|
41
|
-
[
|
|
42
|
-
),
|
|
43
|
-
() => Array.isArray(
|
|
44
|
-
value: String(e)
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
61
|
+
[o, z, _, r]
|
|
62
|
+
), ye = Te(), S = f(
|
|
63
|
+
() => Array.isArray(h) ? h.map(
|
|
64
|
+
(e) => typeof e == "number" ? { value: e, label: String(e) } : e
|
|
65
|
+
) : [],
|
|
66
|
+
[h]
|
|
67
|
+
), w = f(
|
|
68
|
+
() => S.map((e) => ({ value: String(e.value), label: e.label })),
|
|
69
|
+
[S]
|
|
70
|
+
), $ = f(() => g === void 0 ? w[0] ?? null : w.find((e) => e.value === String(g)) ?? null, [g, w]), Le = le(
|
|
49
71
|
(e) => {
|
|
50
|
-
const
|
|
51
|
-
|
|
72
|
+
const n = Array.isArray(e) ? e[0] : e;
|
|
73
|
+
n && "value" in n && (u == null || u(Number(n.value)));
|
|
52
74
|
},
|
|
53
|
-
[
|
|
54
|
-
),
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
75
|
+
[u]
|
|
76
|
+
), Pe = $ ? Number($.value) : g ?? 0, q = ((ae = S.find((e) => e.value === g)) == null ? void 0 : ae.label) ?? (g !== void 0 ? String(g) : ""), Oe = f(
|
|
77
|
+
() => Array.from({ length: r }, (e, n) => {
|
|
78
|
+
const l = n + 1;
|
|
79
|
+
return {
|
|
80
|
+
value: l,
|
|
81
|
+
label: String(l),
|
|
82
|
+
ariaLabel: l === o ? t.currentPageAriaLabel(l) : t.pageAriaLabel(l)
|
|
83
|
+
};
|
|
84
|
+
}),
|
|
85
|
+
[r, o, t]
|
|
86
|
+
), we = f(
|
|
87
|
+
() => S.map((e) => ({
|
|
88
|
+
value: e.value,
|
|
89
|
+
label: e.label,
|
|
90
|
+
ariaLabel: `${t.pageSize} ${e.label}`
|
|
91
|
+
})),
|
|
92
|
+
[S, t]
|
|
93
|
+
), ke = j(ce, y), Ce = j(ge, y), xe = j(ue, y), G = !ke && K !== void 0, B = !Ce && Array.isArray(h) && h.length > 0, T = !xe && r > 1, Ae = x(
|
|
94
|
+
a["tedi-pagination"],
|
|
95
|
+
a[`tedi-pagination--bg-${F}`],
|
|
96
|
+
F !== "transparent" && a[`tedi-pagination--borders-${he}`],
|
|
97
|
+
{
|
|
98
|
+
[a["tedi-pagination--no-pager"]]: !T,
|
|
99
|
+
[a["tedi-pagination--no-results"]]: !G,
|
|
100
|
+
[a["tedi-pagination--no-page-size"]]: !B
|
|
101
|
+
},
|
|
102
|
+
be
|
|
103
|
+
), [b, J] = I(!1), Q = A(null), W = A(b);
|
|
104
|
+
E(() => {
|
|
105
|
+
var e;
|
|
106
|
+
W.current && !b && ((e = Q.current) == null || e.focus()), W.current = b;
|
|
107
|
+
}, [b]);
|
|
108
|
+
const [m, X] = I(!1), Y = A(null), Z = A(m);
|
|
109
|
+
E(() => {
|
|
110
|
+
var e;
|
|
111
|
+
Z.current && !m && ((e = Y.current) == null || e.focus()), Z.current = m;
|
|
112
|
+
}, [m]);
|
|
113
|
+
const Me = r > 1 ? t.pageStatus(o, r) : "", Re = `${`${o} / ${r}`}, ${t.ariaLabel}`, k = P[0], C = P[P.length - 1], $e = P.slice(1, -1), ee = (e, n, l, d) => {
|
|
114
|
+
const ie = a[`tedi-pagination__button--nav-${e}`];
|
|
115
|
+
if (Ne === "primary")
|
|
116
|
+
return /* @__PURE__ */ i(
|
|
117
|
+
H,
|
|
118
|
+
{
|
|
119
|
+
type: "button",
|
|
120
|
+
visualType: "primary",
|
|
121
|
+
size: "small",
|
|
122
|
+
iconLeft: e === "previous" ? l : void 0,
|
|
123
|
+
iconRight: e === "next" ? l : void 0,
|
|
124
|
+
className: ie,
|
|
125
|
+
disabled: n == null ? void 0 : n.disabled,
|
|
126
|
+
onClick: () => O((n == null ? void 0 : n.page) ?? null),
|
|
127
|
+
children: d
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
const ne = /* @__PURE__ */ i(V, { name: l, size: 18, color: "inherit" }), te = /* @__PURE__ */ i("span", { className: a["tedi-pagination__nav-label"], children: d });
|
|
131
|
+
return /* @__PURE__ */ i(
|
|
132
|
+
H,
|
|
133
|
+
{
|
|
134
|
+
className: x(a["tedi-pagination__button"], a["tedi-pagination__button--nav"], ie, {
|
|
135
|
+
[a["tedi-pagination__button--nav-link"]]: M
|
|
136
|
+
}),
|
|
137
|
+
"aria-label": d,
|
|
138
|
+
disabled: n == null ? void 0 : n.disabled,
|
|
139
|
+
onClick: () => O((n == null ? void 0 : n.page) ?? null),
|
|
140
|
+
visualType: "neutral",
|
|
141
|
+
size: "small",
|
|
142
|
+
icon: M ? void 0 : l,
|
|
143
|
+
children: M && (e === "previous" ? /* @__PURE__ */ c(re, { children: [
|
|
144
|
+
ne,
|
|
145
|
+
te
|
|
146
|
+
] }) : /* @__PURE__ */ c(re, { children: [
|
|
147
|
+
te,
|
|
148
|
+
ne
|
|
149
|
+
] }))
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
};
|
|
153
|
+
return /* @__PURE__ */ c("div", { ref: N, className: Ae, "data-name": "tedi-pagination", children: [
|
|
154
|
+
/* @__PURE__ */ i("span", { className: a["tedi-pagination__status"], role: "status", "aria-live": "polite", "aria-atomic": "true", children: Me }),
|
|
155
|
+
/* @__PURE__ */ i("div", { className: a["tedi-pagination__slot-start"], children: G && /* @__PURE__ */ i(se, { className: a["tedi-pagination__results"], color: "secondary", modifiers: "small", children: t.results(K) }) }),
|
|
156
|
+
/* @__PURE__ */ i("div", { className: a["tedi-pagination__slot-center"], children: T && /* @__PURE__ */ c("nav", { "aria-label": t.ariaLabel, className: a["tedi-pagination__nav"], children: [
|
|
157
|
+
!U && (k != null && k.disabled) ? null : ee("previous", k, ve, t.previous),
|
|
158
|
+
!v && /* @__PURE__ */ i("ul", { className: a["tedi-pagination__list"], children: $e.map((e, n) => {
|
|
159
|
+
const l = `slot-${n}`;
|
|
160
|
+
if (e.type === "ellipsis")
|
|
161
|
+
return /* @__PURE__ */ i(
|
|
162
|
+
"li",
|
|
163
|
+
{
|
|
164
|
+
className: x(a["tedi-pagination__item"], a["tedi-pagination__item--ellipsis"]),
|
|
165
|
+
"aria-hidden": "true",
|
|
166
|
+
children: "…"
|
|
167
|
+
},
|
|
168
|
+
l
|
|
169
|
+
);
|
|
170
|
+
const d = e.page;
|
|
71
171
|
return /* @__PURE__ */ i("li", { className: a["tedi-pagination__item"], children: /* @__PURE__ */ i(
|
|
72
|
-
|
|
172
|
+
H,
|
|
73
173
|
{
|
|
74
174
|
type: "button",
|
|
75
|
-
className:
|
|
76
|
-
|
|
77
|
-
|
|
175
|
+
className: x(a["tedi-pagination__button"], {
|
|
176
|
+
[a["tedi-pagination__button--selected"]]: e.selected
|
|
177
|
+
}),
|
|
178
|
+
"aria-label": e.selected ? t.currentPageAriaLabel(d) : t.pageAriaLabel(d),
|
|
179
|
+
"aria-current": e.selected ? "page" : void 0,
|
|
180
|
+
onClick: () => O(d),
|
|
78
181
|
noStyle: !0,
|
|
79
|
-
children: /* @__PURE__ */ i(
|
|
182
|
+
children: /* @__PURE__ */ i("span", { className: a["tedi-pagination__button-label"], children: d }, d)
|
|
80
183
|
}
|
|
81
|
-
) },
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
z,
|
|
184
|
+
) }, l);
|
|
185
|
+
}) }),
|
|
186
|
+
v && /* @__PURE__ */ c(
|
|
187
|
+
"button",
|
|
86
188
|
{
|
|
189
|
+
ref: Q,
|
|
87
190
|
type: "button",
|
|
88
|
-
className:
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
"aria-label":
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
191
|
+
className: a["tedi-pagination__mobile-trigger"],
|
|
192
|
+
"aria-haspopup": "dialog",
|
|
193
|
+
"aria-expanded": b,
|
|
194
|
+
"aria-label": Re,
|
|
195
|
+
onClick: () => J(!0),
|
|
196
|
+
children: [
|
|
197
|
+
/* @__PURE__ */ c("span", { className: a["tedi-pagination__mobile-trigger-label"], "aria-hidden": "true", children: [
|
|
198
|
+
/* @__PURE__ */ i("strong", { children: o }),
|
|
199
|
+
/* @__PURE__ */ i("span", { children: "/" }),
|
|
200
|
+
/* @__PURE__ */ i("span", { children: r })
|
|
201
|
+
] }),
|
|
202
|
+
/* @__PURE__ */ i(V, { name: "arrow_drop_down", size: 24, color: "inherit" })
|
|
203
|
+
]
|
|
96
204
|
}
|
|
97
|
-
)
|
|
98
|
-
|
|
99
|
-
|
|
205
|
+
),
|
|
206
|
+
!U && (C != null && C.disabled) ? null : ee("next", C, Se, t.next)
|
|
207
|
+
] }) }),
|
|
208
|
+
/* @__PURE__ */ i("div", { className: a["tedi-pagination__slot-end"], children: B && /* @__PURE__ */ c("div", { className: a["tedi-pagination__page-size"], children: [
|
|
100
209
|
/* @__PURE__ */ i(
|
|
101
|
-
|
|
210
|
+
se,
|
|
102
211
|
{
|
|
103
212
|
className: a["tedi-pagination__page-size-label"],
|
|
104
213
|
color: "secondary",
|
|
105
214
|
modifiers: "small",
|
|
106
215
|
element: "span",
|
|
107
|
-
children:
|
|
216
|
+
children: t.pageSize
|
|
108
217
|
}
|
|
109
218
|
),
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
-
|
|
219
|
+
v ? /* @__PURE__ */ c(
|
|
220
|
+
"button",
|
|
112
221
|
{
|
|
113
|
-
|
|
222
|
+
ref: Y,
|
|
223
|
+
type: "button",
|
|
224
|
+
className: a["tedi-pagination__mobile-trigger"],
|
|
225
|
+
"aria-haspopup": "dialog",
|
|
226
|
+
"aria-expanded": m,
|
|
227
|
+
"aria-label": `${t.pageSize} ${q}`,
|
|
228
|
+
onClick: () => X(!0),
|
|
229
|
+
children: [
|
|
230
|
+
/* @__PURE__ */ i("span", { className: a["tedi-pagination__mobile-trigger-label"], "aria-hidden": "true", children: q }),
|
|
231
|
+
/* @__PURE__ */ i(V, { name: "arrow_drop_down", size: 24, color: "inherit" })
|
|
232
|
+
]
|
|
233
|
+
}
|
|
234
|
+
) : /* @__PURE__ */ i(
|
|
235
|
+
Ie,
|
|
236
|
+
{
|
|
237
|
+
id: `tedi-pagination-page-size-${ye}`,
|
|
114
238
|
className: a["tedi-pagination__select"],
|
|
115
|
-
label:
|
|
239
|
+
label: t.pageSize,
|
|
116
240
|
hideLabel: !0,
|
|
117
241
|
size: "small",
|
|
118
|
-
options:
|
|
119
|
-
value:
|
|
120
|
-
onChange:
|
|
242
|
+
options: w,
|
|
243
|
+
value: $,
|
|
244
|
+
onChange: Le,
|
|
121
245
|
isSearchable: !1,
|
|
122
246
|
isClearable: !1
|
|
123
247
|
}
|
|
124
248
|
)
|
|
125
|
-
] }) })
|
|
249
|
+
] }) }),
|
|
250
|
+
v && T && /* @__PURE__ */ i(
|
|
251
|
+
oe,
|
|
252
|
+
{
|
|
253
|
+
open: b,
|
|
254
|
+
onOpenChange: J,
|
|
255
|
+
options: Oe,
|
|
256
|
+
selectedValue: o,
|
|
257
|
+
onSelect: O,
|
|
258
|
+
ariaLabel: t.ariaLabel,
|
|
259
|
+
ariaCurrent: "page"
|
|
260
|
+
}
|
|
261
|
+
),
|
|
262
|
+
v && B && /* @__PURE__ */ i(
|
|
263
|
+
oe,
|
|
264
|
+
{
|
|
265
|
+
open: m,
|
|
266
|
+
onOpenChange: X,
|
|
267
|
+
options: we,
|
|
268
|
+
selectedValue: Pe,
|
|
269
|
+
onSelect: (e) => u == null ? void 0 : u(e),
|
|
270
|
+
ariaLabel: t.pageSize,
|
|
271
|
+
title: t.pageSize
|
|
272
|
+
}
|
|
273
|
+
)
|
|
126
274
|
] });
|
|
127
275
|
});
|
|
128
|
-
|
|
276
|
+
De.displayName = "Pagination";
|
|
129
277
|
export {
|
|
130
|
-
|
|
131
|
-
|
|
278
|
+
De as Pagination,
|
|
279
|
+
De as default
|
|
132
280
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i={"tedi-pagination":"tedi-pagination-96c6fc62","tedi-pagination__slot-start":"tedi-pagination__slot-start-846e7900","tedi-pagination__slot-center":"tedi-pagination__slot-center-e489623b","tedi-pagination__slot-end":"tedi-pagination__slot-end-3f4f5848","tedi-pagination__results":"tedi-pagination__results-29d9108c","tedi-pagination__nav":"tedi-pagination__nav-5f414114","tedi-pagination__list":"tedi-pagination__list-03467ce1","tedi-pagination__item":"tedi-pagination__item-46985c58","tedi-pagination__item--ellipsis":"tedi-pagination__item--ellipsis-85f798f5","tedi-pagination__button":"tedi-pagination__button-d06c27d4","tedi-pagination__button--selected":"tedi-pagination__button--selected-cb151c7f","tedi-pagination__button--nav":"tedi-pagination__button--nav-2f74eea2","tedi-pagination__page-size":"tedi-pagination__page-size-d1fa6f9d","tedi-pagination__page-size-label":"tedi-pagination__page-size-label-3dc2d141","tedi-pagination__select":"tedi-pagination__select-435e167e"};exports.default=i;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i={"tedi-pagination":"tedi-pagination-96c6fc62","tedi-pagination--no-pager":"tedi-pagination--no-pager-d61e7fcb","tedi-pagination--bg-white":"tedi-pagination--bg-white-44075d0a","tedi-pagination--borders-top":"tedi-pagination--borders-top-5855a53b","tedi-pagination--borders-bottom":"tedi-pagination--borders-bottom-ea0efc4e","tedi-pagination--borders-both":"tedi-pagination--borders-both-720d1b66","tedi-pagination--bg-transparent":"tedi-pagination--bg-transparent-f7d24de5","tedi-pagination--no-results":"tedi-pagination--no-results-c803e6d7","tedi-pagination__slot-start":"tedi-pagination__slot-start-846e7900","tedi-pagination__slot-center":"tedi-pagination__slot-center-e489623b","tedi-pagination--no-page-size":"tedi-pagination--no-page-size-899b0ae0","tedi-pagination__slot-end":"tedi-pagination__slot-end-3f4f5848","tedi-pagination__status":"tedi-pagination__status-c9307f8c","tedi-pagination__results":"tedi-pagination__results-29d9108c","tedi-pagination__nav":"tedi-pagination__nav-5f414114","tedi-pagination__list":"tedi-pagination__list-03467ce1","tedi-pagination__item":"tedi-pagination__item-46985c58","tedi-pagination__item--ellipsis":"tedi-pagination__item--ellipsis-85f798f5","tedi-pagination__button":"tedi-pagination__button-d06c27d4","tedi-pagination__button--selected":"tedi-pagination__button--selected-cb151c7f","tedi-pagination__button--nav":"tedi-pagination__button--nav-2f74eea2","tedi-pagination__button--nav-link":"tedi-pagination__button--nav-link-878004e1","tedi-pagination__nav-label":"tedi-pagination__nav-label-6ab0736b","tedi-pagination__button--nav-previous":"tedi-pagination__button--nav-previous-1e74ca69","tedi-pagination__button--nav-next":"tedi-pagination__button--nav-next-80e53bed","tedi-pagination__mobile-trigger":"tedi-pagination__mobile-trigger-bb1271ab","tedi-pagination__mobile-trigger-label":"tedi-pagination__mobile-trigger-label-0b2aaebb","tedi-pagination__page-size":"tedi-pagination__page-size-d1fa6f9d","tedi-pagination__page-size-label":"tedi-pagination__page-size-label-3dc2d141","tedi-pagination__select":"tedi-pagination__select-435e167e","tedi-pagination__button-label":"tedi-pagination__button-label-e70ad8bf","tedi-pagination-label-in":"tedi-pagination-label-in-d1e2074e"};exports.default=i;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
const i = {
|
|
2
2
|
"tedi-pagination": "tedi-pagination-96c6fc62",
|
|
3
|
+
"tedi-pagination--no-pager": "tedi-pagination--no-pager-d61e7fcb",
|
|
4
|
+
"tedi-pagination--bg-white": "tedi-pagination--bg-white-44075d0a",
|
|
5
|
+
"tedi-pagination--borders-top": "tedi-pagination--borders-top-5855a53b",
|
|
6
|
+
"tedi-pagination--borders-bottom": "tedi-pagination--borders-bottom-ea0efc4e",
|
|
7
|
+
"tedi-pagination--borders-both": "tedi-pagination--borders-both-720d1b66",
|
|
8
|
+
"tedi-pagination--bg-transparent": "tedi-pagination--bg-transparent-f7d24de5",
|
|
9
|
+
"tedi-pagination--no-results": "tedi-pagination--no-results-c803e6d7",
|
|
3
10
|
"tedi-pagination__slot-start": "tedi-pagination__slot-start-846e7900",
|
|
4
11
|
"tedi-pagination__slot-center": "tedi-pagination__slot-center-e489623b",
|
|
12
|
+
"tedi-pagination--no-page-size": "tedi-pagination--no-page-size-899b0ae0",
|
|
5
13
|
"tedi-pagination__slot-end": "tedi-pagination__slot-end-3f4f5848",
|
|
14
|
+
"tedi-pagination__status": "tedi-pagination__status-c9307f8c",
|
|
6
15
|
"tedi-pagination__results": "tedi-pagination__results-29d9108c",
|
|
7
16
|
"tedi-pagination__nav": "tedi-pagination__nav-5f414114",
|
|
8
17
|
"tedi-pagination__list": "tedi-pagination__list-03467ce1",
|
|
@@ -11,9 +20,17 @@ const i = {
|
|
|
11
20
|
"tedi-pagination__button": "tedi-pagination__button-d06c27d4",
|
|
12
21
|
"tedi-pagination__button--selected": "tedi-pagination__button--selected-cb151c7f",
|
|
13
22
|
"tedi-pagination__button--nav": "tedi-pagination__button--nav-2f74eea2",
|
|
23
|
+
"tedi-pagination__button--nav-link": "tedi-pagination__button--nav-link-878004e1",
|
|
24
|
+
"tedi-pagination__nav-label": "tedi-pagination__nav-label-6ab0736b",
|
|
25
|
+
"tedi-pagination__button--nav-previous": "tedi-pagination__button--nav-previous-1e74ca69",
|
|
26
|
+
"tedi-pagination__button--nav-next": "tedi-pagination__button--nav-next-80e53bed",
|
|
27
|
+
"tedi-pagination__mobile-trigger": "tedi-pagination__mobile-trigger-bb1271ab",
|
|
28
|
+
"tedi-pagination__mobile-trigger-label": "tedi-pagination__mobile-trigger-label-0b2aaebb",
|
|
14
29
|
"tedi-pagination__page-size": "tedi-pagination__page-size-d1fa6f9d",
|
|
15
30
|
"tedi-pagination__page-size-label": "tedi-pagination__page-size-label-3dc2d141",
|
|
16
|
-
"tedi-pagination__select": "tedi-pagination__select-435e167e"
|
|
31
|
+
"tedi-pagination__select": "tedi-pagination__select-435e167e",
|
|
32
|
+
"tedi-pagination__button-label": "tedi-pagination__button-label-e70ad8bf",
|
|
33
|
+
"tedi-pagination-label-in": "tedi-pagination-label-in-d1e2074e"
|
|
17
34
|
};
|
|
18
35
|
export {
|
|
19
36
|
i as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),N=require("../../../../../external/classnames/index.cjs.js"),S=require("react"),M=require("../../base/icon/icon.cjs.js"),P=require("../../base/typography/heading/heading.cjs.js"),k=require("../../buttons/closing-button/closing-button.cjs.js"),t=require("./alert.module.scss.cjs.js"),y=require("../../../helpers/hooks/use-is-mounted.cjs.js"),z=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),$=require("../../layout/vertical-spacing/vertical-spacing.cjs.js"),A=require("../../layout/grid/row.cjs.js"),n=require("../../layout/grid/col.cjs.js"),o=c=>{const{getCurrentBreakpointProps:h}=z.useBreakpointProps(c.defaultServerBreakpoint),{children:i,role:s="alert",title:r,className:m,type:d="info",icon:u,onClose:f,action:a,isGlobal:j=!1,noSideBorders:x=!1,titleElement:q="h3",size:v="default",..._}=h(c),B=N.default(t.default["tedi-alert"],t.default[`tedi-alert--${d}`],t.default[`tedi-alert--size-${v}`],{[t.default["tedi-alert--global"]]:j,[t.default["tedi-alert--no-side-borders"]]:x,[t.default["tedi-alert--has-action"]]:!!a},m),b=y.useIsMounted(),I=l=>{const g={size:18},C=typeof l=="string"?{...g,name:l}:{...g,...l};return e.jsx(M.Icon,{...C,className:t.default["tedi-alert__icon"]})},w=s==="alert"?"assertive":s==="status"?"polite":"off",p=S.useId();return b?e.jsx("div",{role:s,"data-name":"alert","aria-label":`${d} alert`,"aria-live":w,"aria-labelledby":r?p:void 0,..._,className:B,children:e.jsxs($.VerticalSpacing,{size:.25,children:[e.jsxs(A.Row,{gutterX:2,alignItems:r?"center":"start",children:[e.jsxs(n.Col,{grow:1,className:t.default["tedi-alert__content"],children:[u&&I(u),e.jsx("div",{className:"tedi-alert__content-wrapper",children:r?e.jsx(P.Heading,{element:q,id:p,modifiers:["h5"],children:r}):i})]}),a?e.jsx(n.Col,{width:"auto",children:a}):f&&e.jsx(n.Col,{width:"auto",children:e.jsx(k.ClosingButton,{onClick:f,iconSize:18})})]}),r&&i&&e.jsx("div",{className:"tedi-alert__content-wrapper",children:i})]})}):null};o.displayName="Alert";exports.Alert=o;exports.default=o;
|
|
@@ -54,8 +54,18 @@ export interface AlertProps extends BreakpointSupport<AlertBreakpointProps> {
|
|
|
54
54
|
* Callback function triggered when the close button is clicked.
|
|
55
55
|
* Adding this handler renders a close button in the alert.
|
|
56
56
|
* Useful for dismissible alerts.
|
|
57
|
+
*
|
|
58
|
+
* Ignored when `action` is also set — the consumer's slot wins, and is
|
|
59
|
+
* responsible for any close affordance it wants to expose.
|
|
57
60
|
*/
|
|
58
61
|
onClose?: () => void;
|
|
62
|
+
/**
|
|
63
|
+
* Custom content for the right-side slot of the alert (e.g. a CTA button,
|
|
64
|
+
* a link, or a small icon stack). Replaces the default close button when
|
|
65
|
+
* provided. Use this instead of squeezing buttons into `children` so the
|
|
66
|
+
* layout slot is reserved and aligned consistently.
|
|
67
|
+
*/
|
|
68
|
+
action?: React.ReactNode;
|
|
59
69
|
/**
|
|
60
70
|
* The ARIA role of the alert, informing screen readers about the alert's purpose.
|
|
61
71
|
* Options:
|
|
@@ -80,5 +90,8 @@ export interface AlertProps extends BreakpointSupport<AlertBreakpointProps> {
|
|
|
80
90
|
*/
|
|
81
91
|
titleElement?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
82
92
|
}
|
|
83
|
-
export declare const Alert:
|
|
93
|
+
export declare const Alert: {
|
|
94
|
+
(props: AlertProps): JSX.Element | null;
|
|
95
|
+
displayName: string;
|
|
96
|
+
};
|
|
84
97
|
export default Alert;
|
|
@@ -1,66 +1,69 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import k from "../../../../../external/classnames/index.es.js";
|
|
3
|
-
import
|
|
4
|
-
import { Icon as
|
|
5
|
-
import { Heading as
|
|
6
|
-
import { ClosingButton as
|
|
3
|
+
import P from "react";
|
|
4
|
+
import { Icon as S } from "../../base/icon/icon.es.js";
|
|
5
|
+
import { Heading as x } from "../../base/typography/heading/heading.es.js";
|
|
6
|
+
import { ClosingButton as M } from "../../buttons/closing-button/closing-button.es.js";
|
|
7
7
|
import t from "./alert.module.scss.es.js";
|
|
8
|
-
import { useIsMounted as
|
|
9
|
-
import { useBreakpointProps as
|
|
10
|
-
import { VerticalSpacing as
|
|
8
|
+
import { useIsMounted as $ } from "../../../helpers/hooks/use-is-mounted.es.js";
|
|
9
|
+
import { useBreakpointProps as j } from "../../../helpers/hooks/use-breakpoint-props.es.js";
|
|
10
|
+
import { VerticalSpacing as A } from "../../layout/vertical-spacing/vertical-spacing.es.js";
|
|
11
11
|
import { Row as E } from "../../layout/grid/row.es.js";
|
|
12
|
-
import { Col as
|
|
13
|
-
const
|
|
14
|
-
const { getCurrentBreakpointProps:
|
|
12
|
+
import { Col as n } from "../../layout/grid/col.es.js";
|
|
13
|
+
const R = (d) => {
|
|
14
|
+
const { getCurrentBreakpointProps: h } = j(d.defaultServerBreakpoint), {
|
|
15
15
|
children: o,
|
|
16
16
|
role: i = "alert",
|
|
17
17
|
title: r,
|
|
18
|
-
className:
|
|
19
|
-
type:
|
|
20
|
-
icon:
|
|
21
|
-
onClose:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
className: g,
|
|
19
|
+
type: c = "info",
|
|
20
|
+
icon: m,
|
|
21
|
+
onClose: p,
|
|
22
|
+
action: a,
|
|
23
|
+
isGlobal: _ = !1,
|
|
24
|
+
noSideBorders: v = !1,
|
|
25
|
+
titleElement: N = "h3",
|
|
26
|
+
size: B = "default",
|
|
27
|
+
...I
|
|
28
|
+
} = h(d), b = k(
|
|
28
29
|
t["tedi-alert"],
|
|
29
|
-
t[`tedi-alert--${
|
|
30
|
-
t[`tedi-alert--size-${
|
|
30
|
+
t[`tedi-alert--${c}`],
|
|
31
|
+
t[`tedi-alert--size-${B}`],
|
|
31
32
|
{
|
|
32
|
-
[t["tedi-alert--global"]]:
|
|
33
|
-
[t["tedi-alert--no-side-borders"]]:
|
|
33
|
+
[t["tedi-alert--global"]]: _,
|
|
34
|
+
[t["tedi-alert--no-side-borders"]]: v,
|
|
35
|
+
[t["tedi-alert--has-action"]]: !!a
|
|
34
36
|
},
|
|
35
|
-
|
|
36
|
-
),
|
|
37
|
-
const
|
|
38
|
-
return /* @__PURE__ */ e(
|
|
39
|
-
}, z = i === "alert" ? "assertive" : i === "status" ? "polite" : "off",
|
|
40
|
-
return
|
|
37
|
+
g
|
|
38
|
+
), w = $(), y = (l) => {
|
|
39
|
+
const u = { size: 18 }, C = typeof l == "string" ? { ...u, name: l } : { ...u, ...l };
|
|
40
|
+
return /* @__PURE__ */ e(S, { ...C, className: t["tedi-alert__icon"] });
|
|
41
|
+
}, z = i === "alert" ? "assertive" : i === "status" ? "polite" : "off", f = P.useId();
|
|
42
|
+
return w ? /* @__PURE__ */ e(
|
|
41
43
|
"div",
|
|
42
44
|
{
|
|
43
45
|
role: i,
|
|
44
46
|
"data-name": "alert",
|
|
45
|
-
"aria-label": `${
|
|
47
|
+
"aria-label": `${c} alert`,
|
|
46
48
|
"aria-live": z,
|
|
47
|
-
"aria-labelledby": r ?
|
|
48
|
-
...
|
|
49
|
+
"aria-labelledby": r ? f : void 0,
|
|
50
|
+
...I,
|
|
49
51
|
className: b,
|
|
50
|
-
children: /* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
|
|
54
|
-
/* @__PURE__ */ e("div", { className: "tedi-alert__content-wrapper", children: r ? /* @__PURE__ */ e(
|
|
52
|
+
children: /* @__PURE__ */ s(A, { size: 0.25, children: [
|
|
53
|
+
/* @__PURE__ */ s(E, { gutterX: 2, alignItems: r ? "center" : "start", children: [
|
|
54
|
+
/* @__PURE__ */ s(n, { grow: 1, className: t["tedi-alert__content"], children: [
|
|
55
|
+
m && y(m),
|
|
56
|
+
/* @__PURE__ */ e("div", { className: "tedi-alert__content-wrapper", children: r ? /* @__PURE__ */ e(x, { element: N, id: f, modifiers: ["h5"], children: r }) : o })
|
|
55
57
|
] }),
|
|
56
|
-
|
|
58
|
+
a ? /* @__PURE__ */ e(n, { width: "auto", children: a }) : p && /* @__PURE__ */ e(n, { width: "auto", children: /* @__PURE__ */ e(M, { onClick: p, iconSize: 18 }) })
|
|
57
59
|
] }),
|
|
58
60
|
r && o && /* @__PURE__ */ e("div", { className: "tedi-alert__content-wrapper", children: o })
|
|
59
61
|
] })
|
|
60
62
|
}
|
|
61
63
|
) : null;
|
|
62
64
|
};
|
|
65
|
+
R.displayName = "Alert";
|
|
63
66
|
export {
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
R as Alert,
|
|
68
|
+
R as default
|
|
66
69
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"tedi-alert":"tedi-alert-8ca3e7b9","tedi-alert__content":"tedi-alert__content-d480ed20","tedi-alert__icon":"tedi-alert__icon-f9ab1feb","tedi-alert--size-default":"tedi-alert--size-default-6a9ebe2c","tedi-alert--size-small":"tedi-alert--size-small-4c763cad","tedi-alert--info":"tedi-alert--info-bcd40044","tedi-alert--success":"tedi-alert--success-e6d21f49","tedi-alert--warning":"tedi-alert--warning-88456526","tedi-alert--danger":"tedi-alert--danger-b9a2aa60","tedi-alert--global":"tedi-alert--global-14ff86d0","tedi-alert--no-side-borders":"tedi-alert--no-side-borders-a15a1df0"};exports.default=e;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"tedi-alert":"tedi-alert-8ca3e7b9","tedi-alert__content":"tedi-alert__content-d480ed20","tedi-alert__icon":"tedi-alert__icon-f9ab1feb","tedi-alert--size-default":"tedi-alert--size-default-6a9ebe2c","tedi-alert--size-small":"tedi-alert--size-small-4c763cad","tedi-alert--info":"tedi-alert--info-bcd40044","tedi-alert--success":"tedi-alert--success-e6d21f49","tedi-alert--warning":"tedi-alert--warning-88456526","tedi-alert--danger":"tedi-alert--danger-b9a2aa60","tedi-alert--global":"tedi-alert--global-14ff86d0","tedi-alert--no-side-borders":"tedi-alert--no-side-borders-a15a1df0","tedi-alert--has-action":"tedi-alert--has-action-0140d06a"};exports.default=e;
|
|
@@ -9,7 +9,8 @@ const e = {
|
|
|
9
9
|
"tedi-alert--warning": "tedi-alert--warning-88456526",
|
|
10
10
|
"tedi-alert--danger": "tedi-alert--danger-b9a2aa60",
|
|
11
11
|
"tedi-alert--global": "tedi-alert--global-14ff86d0",
|
|
12
|
-
"tedi-alert--no-side-borders": "tedi-alert--no-side-borders-a15a1df0"
|
|
12
|
+
"tedi-alert--no-side-borders": "tedi-alert--no-side-borders-a15a1df0",
|
|
13
|
+
"tedi-alert--has-action": "tedi-alert--has-action-0140d06a"
|
|
13
14
|
};
|
|
14
15
|
export {
|
|
15
16
|
e as default
|
|
@@ -52,9 +52,6 @@ const ce = 4, l = (p) => {
|
|
|
52
52
|
activeIndex: a,
|
|
53
53
|
onNavigate: m,
|
|
54
54
|
loop: !0,
|
|
55
|
-
// When the caller passes `defaultActiveIndex`, treat that item as the
|
|
56
|
-
// current selection and force focus to land on it when the dropdown
|
|
57
|
-
// opens — regardless of whether it was opened via click or keyboard.
|
|
58
55
|
selectedIndex: o ?? null,
|
|
59
56
|
focusItemOnOpen: o !== null ? !0 : "auto"
|
|
60
57
|
})
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './modal';
|
|
2
|
+
export * from './modal-trigger/modal-trigger';
|
|
3
|
+
export * from './modal-content/modal-content';
|
|
4
|
+
export * from './modal-header/modal-header';
|
|
5
|
+
export * from './modal-body/modal-body';
|
|
6
|
+
export * from './modal-footer/modal-footer';
|
|
7
|
+
export * from './modal-closer/modal-closer';
|
|
8
|
+
export * from './modal-context';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),s=require("../../../../../../external/classnames/index.cjs.js"),d=require("../modal.module.scss.cjs.js"),e=({children:o,noScroll:l=!1,className:a})=>t.jsx("div",{className:s.default(d.default["tedi-modal__body"],{[d.default["tedi-modal__body--scroll-page"]]:l},a),children:o});e.displayName="Modal.Body";exports.ModalBody=e;exports.default=e;
|