@tedi-design-system/react 18.0.0-rc.2 → 18.0.0-rc.20
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.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/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/accordion/accordion-item/accordion-item.d.ts +3 -0
- package/src/community/components/accordion/accordion-item-content/accordion-item-content.d.ts +3 -0
- package/src/community/components/accordion/accordion-item-header/accordion-item-header.d.ts +3 -0
- package/src/community/components/accordion/accordion.d.ts +3 -0
- 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/layout/footer/footer.d.ts +6 -0
- package/src/community/components/map-components/carousel/carousel.d.ts +10 -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/community/components/placeholder/placeholder.d.ts +5 -0
- package/src/community/components/stepper/step.d.ts +6 -0
- package/src/community/components/stepper/stepper-nav.d.ts +6 -0
- package/src/community/components/stepper/stepper.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/card-button/card-button.cjs.js +1 -0
- package/src/tedi/components/buttons/card-button/card-button.d.ts +17 -0
- package/src/tedi/components/buttons/card-button/card-button.es.js +26 -0
- package/src/tedi/components/buttons/card-button/card-button.module.scss.cjs.js +1 -0
- package/src/tedi/components/buttons/card-button/card-button.module.scss.es.js +6 -0
- package/src/tedi/components/buttons/card-button/index.d.ts +1 -0
- package/src/tedi/components/buttons/collapse/collapse.cjs.js +1 -1
- package/src/tedi/components/buttons/collapse/collapse.d.ts +15 -0
- package/src/tedi/components/buttons/collapse/collapse.es.js +58 -56
- package/src/tedi/components/buttons/collapse-button/collapse-button.cjs.js +1 -0
- package/src/tedi/components/buttons/collapse-button/collapse-button.d.ts +61 -0
- package/src/tedi/components/buttons/collapse-button/collapse-button.es.js +68 -0
- package/src/tedi/components/buttons/collapse-button/collapse-button.module.scss.cjs.js +1 -0
- package/src/tedi/components/buttons/collapse-button/collapse-button.module.scss.es.js +17 -0
- package/src/tedi/components/content/accordion/accordion-context.cjs.js +1 -0
- package/src/tedi/components/content/accordion/accordion-context.d.ts +27 -0
- package/src/tedi/components/content/accordion/accordion-context.es.js +6 -0
- package/src/tedi/components/content/accordion/accordion-item/accordion-item-context.cjs.js +1 -0
- package/src/tedi/components/content/accordion/accordion-item/accordion-item-context.d.ts +24 -0
- package/src/tedi/components/content/accordion/accordion-item/accordion-item-context.es.js +11 -0
- package/src/tedi/components/content/accordion/accordion-item/accordion-item.cjs.js +1 -0
- package/src/tedi/components/content/accordion/accordion-item/accordion-item.d.ts +76 -0
- package/src/tedi/components/content/accordion/accordion-item/accordion-item.es.js +70 -0
- package/src/tedi/components/content/accordion/accordion-item-content/accordion-item-content.cjs.js +1 -0
- package/src/tedi/components/content/accordion/accordion-item-content/accordion-item-content.d.ts +16 -0
- package/src/tedi/components/content/accordion/accordion-item-content/accordion-item-content.es.js +31 -0
- package/src/tedi/components/content/accordion/accordion-item-header/accordion-item-header.cjs.js +1 -0
- package/src/tedi/components/content/accordion/accordion-item-header/accordion-item-header.d.ts +134 -0
- package/src/tedi/components/content/accordion/accordion-item-header/accordion-item-header.es.js +127 -0
- package/src/tedi/components/content/accordion/accordion.cjs.js +1 -0
- package/src/tedi/components/content/accordion/accordion.d.ts +61 -0
- package/src/tedi/components/content/accordion/accordion.es.js +52 -0
- package/src/tedi/components/content/accordion/accordion.module.scss.cjs.js +1 -0
- package/src/tedi/components/content/accordion/accordion.module.scss.es.js +32 -0
- package/src/tedi/components/content/accordion/index.d.ts +6 -0
- 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/carousel/carousel-context.cjs.js +1 -0
- package/src/tedi/components/content/carousel/carousel-context.d.ts +7 -0
- package/src/tedi/components/content/carousel/carousel-context.es.js +11 -0
- package/src/tedi/components/content/carousel/carousel-utils.cjs.js +1 -0
- package/src/tedi/components/content/carousel/carousel-utils.d.ts +26 -0
- package/src/tedi/components/content/carousel/carousel-utils.es.js +14 -0
- package/src/tedi/components/content/carousel/carousel.cjs.js +1 -0
- package/src/tedi/components/content/carousel/carousel.d.ts +20 -0
- package/src/tedi/components/content/carousel/carousel.es.js +27 -0
- package/src/tedi/components/content/carousel/carousel.module.scss.cjs.js +1 -0
- package/src/tedi/components/content/carousel/carousel.module.scss.es.js +18 -0
- package/src/tedi/components/content/carousel/components/carousel-content/carousel-content.cjs.js +1 -0
- package/src/tedi/components/content/carousel/components/carousel-content/carousel-content.d.ts +53 -0
- package/src/tedi/components/content/carousel/components/carousel-content/carousel-content.es.js +103 -0
- package/src/tedi/components/content/carousel/components/carousel-footer/carousel-footer.cjs.js +1 -0
- package/src/tedi/components/content/carousel/components/carousel-footer/carousel-footer.d.ts +17 -0
- package/src/tedi/components/content/carousel/components/carousel-footer/carousel-footer.es.js +10 -0
- package/src/tedi/components/content/carousel/components/carousel-header/carousel-header.cjs.js +1 -0
- package/src/tedi/components/content/carousel/components/carousel-header/carousel-header.d.ts +17 -0
- package/src/tedi/components/content/carousel/components/carousel-header/carousel-header.es.js +10 -0
- package/src/tedi/components/content/carousel/components/carousel-indicators/carousel-indicators.cjs.js +1 -0
- package/src/tedi/components/content/carousel/components/carousel-indicators/carousel-indicators.d.ts +20 -0
- package/src/tedi/components/content/carousel/components/carousel-indicators/carousel-indicators.es.js +38 -0
- package/src/tedi/components/content/carousel/components/carousel-navigation/carousel-navigation.cjs.js +1 -0
- package/src/tedi/components/content/carousel/components/carousel-navigation/carousel-navigation.d.ts +43 -0
- package/src/tedi/components/content/carousel/components/carousel-navigation/carousel-navigation.es.js +48 -0
- package/src/tedi/components/content/carousel/index.d.ts +7 -0
- package/src/tedi/components/content/carousel/use-carousel.cjs.js +1 -0
- package/src/tedi/components/content/carousel/use-carousel.d.ts +56 -0
- package/src/tedi/components/content/carousel/use-carousel.es.js +228 -0
- 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/input-group/components/input/input.cjs.js +1 -1
- package/src/tedi/components/form/input-group/components/input/input.es.js +14 -13
- package/src/tedi/components/form/input-group/components/prefix/prefix.cjs.js +1 -1
- package/src/tedi/components/form/input-group/components/prefix/prefix.es.js +16 -16
- package/src/tedi/components/form/input-group/components/suffix/suffix.cjs.js +1 -1
- package/src/tedi/components/form/input-group/components/suffix/suffix.es.js +12 -12
- package/src/tedi/components/form/input-group/input-group.cjs.js +1 -1
- package/src/tedi/components/form/input-group/input-group.d.ts +13 -0
- package/src/tedi/components/form/input-group/input-group.es.js +47 -45
- package/src/tedi/components/form/input-group/input-group.module.scss.cjs.js +1 -1
- package/src/tedi/components/form/input-group/input-group.module.scss.es.js +2 -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/select/components/select-multi-option.cjs.js +1 -1
- package/src/tedi/components/form/select/components/select-multi-option.es.js +43 -51
- package/src/tedi/components/form/select/components/select-single-option.cjs.js +1 -1
- package/src/tedi/components/form/select/components/select-single-option.es.js +21 -27
- package/src/tedi/components/form/select/select.module.scss.cjs.js +1 -1
- package/src/tedi/components/form/select/select.module.scss.es.js +0 -1
- package/src/tedi/components/form/textfield/textfield.d.ts +14 -0
- package/src/tedi/components/form/time-field/time-field-helpers.cjs.js +1 -1
- package/src/tedi/components/form/time-field/time-field-helpers.d.ts +1 -1
- package/src/tedi/components/form/time-field/time-field-helpers.es.js +1 -1
- package/src/tedi/components/form/time-field/time-field.cjs.js +1 -1
- package/src/tedi/components/form/time-field/time-field.d.ts +32 -1
- package/src/tedi/components/form/time-field/time-field.es.js +129 -95
- package/src/tedi/components/form/time-field/time-picker-modal/time-picker-modal.cjs.js +1 -0
- package/src/tedi/components/form/time-field/time-picker-modal/time-picker-modal.d.ts +30 -0
- package/src/tedi/components/form/time-field/time-picker-modal/time-picker-modal.es.js +59 -0
- package/src/tedi/components/form/time-field/time-picker-modal/time-picker-modal.module.scss.cjs.js +1 -0
- package/src/tedi/components/form/time-field/time-picker-modal/time-picker-modal.module.scss.es.js +10 -0
- package/src/tedi/components/form/time-picker/components/time-grid/time-grid.cjs.js +1 -1
- package/src/tedi/components/form/time-picker/components/time-grid/time-grid.d.ts +5 -1
- package/src/tedi/components/form/time-picker/components/time-grid/time-grid.es.js +47 -64
- package/src/tedi/components/form/time-picker/components/time-wheel/time-wheel.cjs.js +1 -1
- package/src/tedi/components/form/time-picker/components/time-wheel/time-wheel.es.js +1 -1
- package/src/tedi/components/form/time-picker/time-picker.module.scss.cjs.js +1 -1
- package/src/tedi/components/form/time-picker/time-picker.module.scss.es.js +1 -2
- package/src/tedi/components/layout/footer/footer-body/footer-body.cjs.js +1 -0
- package/src/tedi/components/layout/footer/footer-body/footer-body.d.ts +30 -0
- package/src/tedi/components/layout/footer/footer-body/footer-body.es.js +28 -0
- package/src/tedi/components/layout/footer/footer-bottom/footer-bottom.cjs.js +1 -0
- package/src/tedi/components/layout/footer/footer-bottom/footer-bottom.d.ts +23 -0
- package/src/tedi/components/layout/footer/footer-bottom/footer-bottom.es.js +25 -0
- package/src/tedi/components/layout/footer/footer-context.cjs.js +1 -0
- package/src/tedi/components/layout/footer/footer-context.d.ts +23 -0
- package/src/tedi/components/layout/footer/footer-context.es.js +7 -0
- package/src/tedi/components/layout/footer/footer-section/footer-section.cjs.js +1 -0
- package/src/tedi/components/layout/footer/footer-section/footer-section.d.ts +48 -0
- package/src/tedi/components/layout/footer/footer-section/footer-section.es.js +65 -0
- package/src/tedi/components/layout/footer/footer-side/footer-side.cjs.js +1 -0
- package/src/tedi/components/layout/footer/footer-side/footer-side.d.ts +36 -0
- package/src/tedi/components/layout/footer/footer-side/footer-side.es.js +34 -0
- package/src/tedi/components/layout/footer/footer.cjs.js +1 -0
- package/src/tedi/components/layout/footer/footer.d.ts +56 -0
- package/src/tedi/components/layout/footer/footer.es.js +64 -0
- package/src/tedi/components/layout/footer/footer.module.scss.cjs.js +1 -0
- package/src/tedi/components/layout/footer/footer.module.scss.es.js +31 -0
- package/src/tedi/components/layout/footer/index.d.ts +5 -0
- 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/loaders/progress-bar/index.d.ts +1 -0
- package/src/tedi/components/loaders/progress-bar/progress-bar.cjs.js +1 -0
- package/src/tedi/components/loaders/progress-bar/progress-bar.d.ts +65 -0
- package/src/tedi/components/loaders/progress-bar/progress-bar.es.js +75 -0
- package/src/tedi/components/loaders/progress-bar/progress-bar.module.scss.cjs.js +1 -0
- package/src/tedi/components/loaders/progress-bar/progress-bar.module.scss.es.js +17 -0
- package/src/tedi/components/misc/option-content/option-content.cjs.js +1 -0
- package/src/tedi/components/misc/option-content/option-content.d.ts +71 -0
- package/src/tedi/components/misc/option-content/option-content.es.js +92 -0
- package/src/tedi/components/misc/option-content/option-content.module.scss.cjs.js +1 -0
- package/src/tedi/components/misc/option-content/option-content.module.scss.es.js +21 -0
- package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper-context.cjs.js +1 -0
- package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper-context.d.ts +2 -0
- package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper-context.es.js +5 -0
- package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper-item.cjs.js +1 -0
- package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper-item.d.ts +45 -0
- package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper-item.es.js +50 -0
- package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper.cjs.js +1 -0
- package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper.d.ts +36 -0
- package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper.es.js +38 -0
- package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper.module.scss.cjs.js +1 -0
- package/src/tedi/components/navigation/horizontal-stepper/horizontal-stepper.module.scss.es.js +24 -0
- package/src/tedi/components/navigation/horizontal-stepper/index.d.ts +2 -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-item/dropdown-item.cjs.js +1 -1
- package/src/tedi/components/overlays/dropdown/dropdown-item/dropdown-item.d.ts +9 -2
- package/src/tedi/components/overlays/dropdown/dropdown-item/dropdown-item.es.js +42 -39
- package/src/tedi/components/overlays/dropdown/dropdown.d.ts +1 -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 +14 -0
- package/src/tedi/providers/label-provider/labels-map.cjs.js +1 -1
- package/src/tedi/providers/label-provider/labels-map.d.ts +237 -6
- package/src/tedi/providers/label-provider/labels-map.es.js +299 -59
- package/tedi.cjs.js +1 -1
- package/tedi.es.js +332 -224
- 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
|
@@ -63,5 +63,12 @@ export type DropdownItemProps = {
|
|
|
63
63
|
*/
|
|
64
64
|
isParent?: boolean;
|
|
65
65
|
className?: string;
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
/**
|
|
67
|
+
* ARIA role for the item. Defaults to `menuitem`; override to convey selection
|
|
68
|
+
* semantics (e.g. `menuitemcheckbox` / `menuitemradio` / `option`) and pair it
|
|
69
|
+
* with the matching `aria-checked` / `aria-selected`.
|
|
70
|
+
* @default menuitem
|
|
71
|
+
*/
|
|
72
|
+
role?: React.AriaRole;
|
|
73
|
+
} & React.AriaAttributes;
|
|
74
|
+
export declare const DropdownItem: ({ children, onClick, disabled, active, index, indent, asChild, closeOnSelect, isParent, className, role, ...aria }: DropdownItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,67 +1,70 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { useDropdownContext as
|
|
1
|
+
import { jsx as T } from "react/jsx-runtime";
|
|
2
|
+
import j from "../../../../../../external/classnames/index.es.js";
|
|
3
|
+
import { useDropdownContext as E } from "../dropdown-context.es.js";
|
|
4
4
|
import r from "./dropdown-item.module.scss.es.js";
|
|
5
|
-
const
|
|
6
|
-
children:
|
|
5
|
+
const l = ({
|
|
6
|
+
children: y,
|
|
7
7
|
onClick: t,
|
|
8
|
-
disabled:
|
|
9
|
-
active:
|
|
8
|
+
disabled: n,
|
|
9
|
+
active: _,
|
|
10
10
|
index: d,
|
|
11
11
|
indent: i,
|
|
12
12
|
asChild: o = !1,
|
|
13
13
|
closeOnSelect: s = !0,
|
|
14
|
-
isParent:
|
|
15
|
-
className:
|
|
14
|
+
isParent: w = !1,
|
|
15
|
+
className: c,
|
|
16
|
+
role: m,
|
|
17
|
+
...v
|
|
16
18
|
}) => {
|
|
17
|
-
const { getItemProps:
|
|
19
|
+
const { getItemProps: b, listItemsRef: x, setOpen: f, activeIndex: D, divided: I, variant: u } = E(), g = o ? "div" : "button", P = (e) => typeof e != "number" || e <= 0 ? {} : {
|
|
18
20
|
"--dropdown-indent-level": e,
|
|
19
21
|
"--dropdown-indent": `${e}rem`
|
|
20
|
-
},
|
|
21
|
-
if (
|
|
22
|
-
const
|
|
22
|
+
}, q = (e) => {
|
|
23
|
+
if (n) return;
|
|
24
|
+
const p = e.currentTarget.querySelector(
|
|
23
25
|
'input[type="checkbox"], input[type="radio"]'
|
|
24
26
|
);
|
|
25
|
-
if (
|
|
26
|
-
|
|
27
|
+
if (p) {
|
|
28
|
+
p.click();
|
|
27
29
|
return;
|
|
28
30
|
}
|
|
29
|
-
o ? t == null || t(e) : (t == null || t(e), s &&
|
|
30
|
-
},
|
|
31
|
-
if (!
|
|
31
|
+
o ? t == null || t(e) : (t == null || t(e), s && f(!1));
|
|
32
|
+
}, K = (e) => {
|
|
33
|
+
if (!n && (e.key === "Enter" || e.key === " ")) {
|
|
32
34
|
e.preventDefault();
|
|
33
|
-
const
|
|
35
|
+
const p = e.currentTarget.querySelector(
|
|
34
36
|
'input[type="checkbox"], input[type="radio"]'
|
|
35
37
|
);
|
|
36
|
-
|
|
38
|
+
p ? p.click() : t == null || t(e), !o && s && f(!1);
|
|
37
39
|
}
|
|
38
|
-
},
|
|
40
|
+
}, a = {
|
|
39
41
|
ref(e) {
|
|
40
|
-
typeof d == "number" && (
|
|
42
|
+
typeof d == "number" && (x.current[d] = e);
|
|
41
43
|
},
|
|
42
|
-
tabIndex:
|
|
43
|
-
className:
|
|
44
|
+
tabIndex: D === d ? 0 : -1,
|
|
45
|
+
className: j(
|
|
44
46
|
r["tedi-dropdown__item"],
|
|
45
47
|
{
|
|
46
|
-
[r["tedi-dropdown__item--active"]]:
|
|
47
|
-
[r["tedi-dropdown__item--disabled"]]:
|
|
48
|
-
[r["tedi-dropdown__item--divided"]]:
|
|
48
|
+
[r["tedi-dropdown__item--active"]]: _,
|
|
49
|
+
[r["tedi-dropdown__item--disabled"]]: n,
|
|
50
|
+
[r["tedi-dropdown__item--divided"]]: I,
|
|
49
51
|
[r["tedi-dropdown__item--indent"]]: i,
|
|
50
|
-
[r["tedi-dropdown__item--tree-item"]]:
|
|
51
|
-
[r["tedi-dropdown__item--tree-parent"]]:
|
|
52
|
+
[r["tedi-dropdown__item--tree-item"]]: u === "tree" && i,
|
|
53
|
+
[r["tedi-dropdown__item--tree-parent"]]: u === "tree" && w
|
|
52
54
|
},
|
|
53
|
-
|
|
55
|
+
c
|
|
54
56
|
),
|
|
55
|
-
style:
|
|
56
|
-
onClick:
|
|
57
|
-
onKeyDown:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
style: P(i),
|
|
58
|
+
onClick: q,
|
|
59
|
+
onKeyDown: K,
|
|
60
|
+
...v
|
|
61
|
+
}, N = o && s === !1 ? { ...a, role: m } : b({
|
|
62
|
+
role: m ?? "menuitem",
|
|
63
|
+
disabled: o ? void 0 : n,
|
|
64
|
+
...a
|
|
62
65
|
});
|
|
63
|
-
return /* @__PURE__ */
|
|
66
|
+
return /* @__PURE__ */ T(g, { ...N, children: y });
|
|
64
67
|
};
|
|
65
68
|
export {
|
|
66
|
-
|
|
69
|
+
l as DropdownItem
|
|
67
70
|
};
|
|
@@ -78,7 +78,7 @@ export declare const Dropdown: {
|
|
|
78
78
|
Content: ({ children }: {
|
|
79
79
|
children: React.ReactNode;
|
|
80
80
|
}) => null;
|
|
81
|
-
Item: ({ children, onClick, disabled, active, index, indent, asChild, closeOnSelect, isParent, className, }: import('./dropdown-item/dropdown-item').DropdownItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
Item: ({ children, onClick, disabled, active, index, indent, asChild, closeOnSelect, isParent, className, role, ...aria }: import('./dropdown-item/dropdown-item').DropdownItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
82
82
|
Separator: () => import("react/jsx-runtime").JSX.Element;
|
|
83
83
|
};
|
|
84
84
|
export {};
|
|
@@ -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;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface ModalBodyProps {
|
|
3
|
+
/**
|
|
4
|
+
* Body content.
|
|
5
|
+
*/
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Disable the body's internal scroll. Use when the modal is wrapped in
|
|
9
|
+
* `<Modal.Content scrollBehavior="page">` and overflow is handled by the page.
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
|
+
noScroll?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Additional class name.
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const ModalBody: {
|
|
19
|
+
({ children, noScroll, className }: ModalBodyProps): JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
export default ModalBody;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import m from "../../../../../../external/classnames/index.es.js";
|
|
3
|
+
import o from "../modal.module.scss.es.js";
|
|
4
|
+
const e = ({ children: a, noScroll: d = !1, className: s }) => /* @__PURE__ */ l(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
className: m(
|
|
8
|
+
o["tedi-modal__body"],
|
|
9
|
+
{
|
|
10
|
+
[o["tedi-modal__body--scroll-page"]]: d
|
|
11
|
+
},
|
|
12
|
+
s
|
|
13
|
+
),
|
|
14
|
+
children: a
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
e.displayName = "Modal.Body";
|
|
18
|
+
export {
|
|
19
|
+
e as ModalBody,
|
|
20
|
+
e as default
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react"),r=require("../modal-context.cjs.js"),e=({children:o})=>{const{onOpenChange:n}=r.useModalContext();return a.cloneElement(o,{onClick:s=>{var l,t;(t=(l=o.props).onClick)==null||t.call(l,s),n(!1)}})};e.displayName="Modal.Closer";exports.ModalCloser=e;exports.default=e;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MouseEvent, ReactElement } from 'react';
|
|
2
|
+
export interface ModalCloserProps {
|
|
3
|
+
/**
|
|
4
|
+
* Element that closes the modal when clicked. The element is cloned and receives
|
|
5
|
+
* a wrapped `onClick` that calls the original handler first, then closes the modal.
|
|
6
|
+
*/
|
|
7
|
+
children: ReactElement<{
|
|
8
|
+
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
export declare const ModalCloser: {
|
|
12
|
+
({ children }: ModalCloserProps): JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
export default ModalCloser;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { cloneElement as a } from "react";
|
|
2
|
+
import { useModalContext as r } from "../modal-context.es.js";
|
|
3
|
+
const s = ({ children: o }) => {
|
|
4
|
+
const { onOpenChange: n } = r();
|
|
5
|
+
return a(o, {
|
|
6
|
+
onClick: (t) => {
|
|
7
|
+
var e, l;
|
|
8
|
+
(l = (e = o.props).onClick) == null || l.call(e, t), n(!1);
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
s.displayName = "Modal.Closer";
|
|
13
|
+
export {
|
|
14
|
+
s as ModalCloser,
|
|
15
|
+
s as default
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),d=require("../../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),f=require("../../../../../../external/classnames/index.cjs.js"),e=require("../modal.module.scss.cjs.js"),N=require("../modal-context.cjs.js"),O=require("../../../../helpers/hooks/use-breakpoint-props.cjs.js"),W=require("../../../../providers/label-provider/use-labels.cjs.js"),H=["xs","sm","md","lg","xl"],T=l=>H.includes(l),r=l=>{const{getCurrentBreakpointProps:m}=O.useBreakpointProps(l.defaultServerBreakpoint),{width:t="md",maxWidth:s,position:_="center",fullscreen:o=!1}=m(l),{children:v,size:y="default",scrollBehavior:b="content",trapFocus:n=!0,returnFocus:g=!0,showOverlay:x=!0,lockScroll:h=!0,visuallyHiddenDismiss:C=!1,initialFocus:P,className:F}=l,{getLabel:p}=W.useLabels(),{open:q,floating:B,getFloatingProps:M,context:S,labelId:j,descriptionId:k}=N.useModalContext();if(!q)return null;const c=l["aria-labelledby"]??(j||void 0),L=l["aria-describedby"]??(k||void 0),w=c?void 0:l["aria-label"],u=T(t),i={};u||(i.width=t),s&&(i.maxWidth=s);const D=o===!0?e.default["tedi-modal__container--fullscreen"]:o==="edge"?e.default["tedi-modal__container--fullscreen-edge"]:void 0,I=o==="edge"?e.default["tedi-modal__overlay--fullscreen-edge"]:void 0;return a.jsx(d.FloatingPortal,{children:a.jsx(d.FloatingOverlay,{lockScroll:h,className:f.default(e.default["tedi-modal__overlay"],e.default[`tedi-modal__overlay--position-${_}`],I,{[e.default["tedi-modal__overlay--no-overlay"]]:!x,[e.default["tedi-modal__overlay--scroll-page"]]:b==="page"}),children:a.jsx(d.FloatingFocusManager,{context:S,modal:n,returnFocus:g,initialFocus:P,visuallyHiddenDismiss:C?p("modal.close"):void 0,children:a.jsx("div",{...M({ref:B,"aria-labelledby":c,"aria-describedby":L,"aria-label":w,"aria-modal":n,style:i,className:f.default(e.default["tedi-modal__container"],u&&e.default[`tedi-modal__container--${t}`],e.default[`tedi-modal--${y}`],D,F)}),children:v})})})})};r.displayName="Modal.Content";exports.ModalContent=r;exports.default=r;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { FloatingFocusManager } from '@floating-ui/react';
|
|
2
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
import { BreakpointSupport } from '../../../../helpers';
|
|
4
|
+
export type ModalWidthPreset = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
export type ModalWidth = ModalWidthPreset | (string & Record<never, never>);
|
|
6
|
+
export type ModalSize = 'default' | 'small';
|
|
7
|
+
export type ModalPosition = 'center' | 'top' | 'right' | 'left' | 'bottom';
|
|
8
|
+
export type ModalScrollBehavior = 'content' | 'page';
|
|
9
|
+
export type ModalFullscreen = boolean | 'edge';
|
|
10
|
+
type ModalContentBreakpointProps = {
|
|
11
|
+
/**
|
|
12
|
+
* Modal width — a Figma-aligned preset (`xs`–`xl`) or any CSS length.
|
|
13
|
+
* Use `maxWidth` when you only need to cap the width instead of set it.
|
|
14
|
+
* @default md
|
|
15
|
+
*/
|
|
16
|
+
width?: ModalWidth;
|
|
17
|
+
/**
|
|
18
|
+
* Hard cap on width. Lightweight alternative to a custom `width`.
|
|
19
|
+
* @default calc(100vw - 16px * 2)
|
|
20
|
+
*/
|
|
21
|
+
maxWidth?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Placement on the viewport.
|
|
24
|
+
* @default center
|
|
25
|
+
*/
|
|
26
|
+
position?: ModalPosition;
|
|
27
|
+
/**
|
|
28
|
+
* Fullscreen behaviour:
|
|
29
|
+
* - `false` — content-sized modal inside the 16px backdrop padding.
|
|
30
|
+
* - `true` — modal fills the overlay; 16px backdrop stays visible.
|
|
31
|
+
* - `'edge'` — edge-to-edge; overlay padding removed, no border/radius.
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
fullscreen?: ModalFullscreen;
|
|
35
|
+
};
|
|
36
|
+
export interface ModalContentProps extends BreakpointSupport<ModalContentBreakpointProps> {
|
|
37
|
+
/**
|
|
38
|
+
* `<Modal.Header>`, `<Modal.Body>`, `<Modal.Footer>` and any other content.
|
|
39
|
+
*/
|
|
40
|
+
children: ReactNode;
|
|
41
|
+
/**
|
|
42
|
+
* Size density — controls header/body/footer padding.
|
|
43
|
+
* @default default
|
|
44
|
+
*/
|
|
45
|
+
size?: ModalSize;
|
|
46
|
+
/**
|
|
47
|
+
* Where overflow scrolls. `'content'` keeps the modal frame fixed and scrolls the body;
|
|
48
|
+
* `'page'` lets the modal grow with content and scrolls the overlay around it.
|
|
49
|
+
* @default content
|
|
50
|
+
*/
|
|
51
|
+
scrollBehavior?: ModalScrollBehavior;
|
|
52
|
+
/**
|
|
53
|
+
* Trap focus inside the modal while open.
|
|
54
|
+
* @default true
|
|
55
|
+
*/
|
|
56
|
+
trapFocus?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Restore focus to the trigger after closing.
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
61
|
+
returnFocus?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Render the dimmed backdrop. `false` keeps portal + focus management but no overlay.
|
|
64
|
+
* @default true
|
|
65
|
+
*/
|
|
66
|
+
showOverlay?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Lock background scroll while open.
|
|
69
|
+
* @default true
|
|
70
|
+
*/
|
|
71
|
+
lockScroll?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Render visually-hidden dismiss buttons at the start and end of the dialog
|
|
74
|
+
* so touch screen-readers can escape without an Escape key.
|
|
75
|
+
* @default false
|
|
76
|
+
*/
|
|
77
|
+
visuallyHiddenDismiss?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Override the dialog's labelling element. Only needed when the label lives
|
|
80
|
+
* outside `<Modal.Header>` — the header wires this automatically.
|
|
81
|
+
*/
|
|
82
|
+
'aria-labelledby'?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Override the dialog's describing element. Only needed when the description
|
|
85
|
+
* lives outside `<Modal.Header>` — the header wires this automatically.
|
|
86
|
+
*/
|
|
87
|
+
'aria-describedby'?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Plain-text accessible name. Use when there's no visible title (icon-only
|
|
90
|
+
* confirmation, etc.). Ignored when `aria-labelledby` is set.
|
|
91
|
+
*/
|
|
92
|
+
'aria-label'?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Element to focus on open. Tabbable index (`0` = first tabbable, `-1` = dialog
|
|
95
|
+
* container) or a ref. Override the default to focus a "Cancel" button on
|
|
96
|
+
* destructive prompts, or the first input on form-heavy modals.
|
|
97
|
+
*/
|
|
98
|
+
initialFocus?: ComponentProps<typeof FloatingFocusManager>['initialFocus'];
|
|
99
|
+
/**
|
|
100
|
+
* Additional class name on the modal container.
|
|
101
|
+
*/
|
|
102
|
+
className?: string;
|
|
103
|
+
}
|
|
104
|
+
export declare const ModalContent: {
|
|
105
|
+
(props: ModalContentProps): JSX.Element | null;
|
|
106
|
+
displayName: string;
|
|
107
|
+
};
|
|
108
|
+
export default ModalContent;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { FloatingPortal as M, FloatingOverlay as W, FloatingFocusManager as H } from "../../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
|
|
3
|
+
import c from "../../../../../../external/classnames/index.es.js";
|
|
4
|
+
import e from "../modal.module.scss.es.js";
|
|
5
|
+
import { useModalContext as O } from "../modal-context.es.js";
|
|
6
|
+
import { useBreakpointProps as $ } from "../../../../helpers/hooks/use-breakpoint-props.es.js";
|
|
7
|
+
import { useLabels as E } from "../../../../providers/label-provider/use-labels.es.js";
|
|
8
|
+
const T = ["xs", "sm", "md", "lg", "xl"], j = (l) => T.includes(l), z = (l) => {
|
|
9
|
+
const { getCurrentBreakpointProps: m } = $(l.defaultServerBreakpoint), {
|
|
10
|
+
width: o = "md",
|
|
11
|
+
maxWidth: r,
|
|
12
|
+
position: u = "center",
|
|
13
|
+
fullscreen: t = !1
|
|
14
|
+
} = m(l), {
|
|
15
|
+
children: f,
|
|
16
|
+
size: y = "default",
|
|
17
|
+
scrollBehavior: v = "content",
|
|
18
|
+
trapFocus: s = !0,
|
|
19
|
+
returnFocus: _ = !0,
|
|
20
|
+
showOverlay: b = !0,
|
|
21
|
+
lockScroll: g = !0,
|
|
22
|
+
visuallyHiddenDismiss: h = !1,
|
|
23
|
+
initialFocus: p,
|
|
24
|
+
className: x
|
|
25
|
+
} = l, { getLabel: F } = E(), { open: C, floating: P, getFloatingProps: B, context: N, labelId: S, descriptionId: k } = O();
|
|
26
|
+
if (!C) return null;
|
|
27
|
+
const d = l["aria-labelledby"] ?? (S || void 0), w = l["aria-describedby"] ?? (k || void 0), D = d ? void 0 : l["aria-label"], n = j(o), i = {};
|
|
28
|
+
n || (i.width = o), r && (i.maxWidth = r);
|
|
29
|
+
const I = t === !0 ? e["tedi-modal__container--fullscreen"] : t === "edge" ? e["tedi-modal__container--fullscreen-edge"] : void 0, L = t === "edge" ? e["tedi-modal__overlay--fullscreen-edge"] : void 0;
|
|
30
|
+
return /* @__PURE__ */ a(M, { children: /* @__PURE__ */ a(
|
|
31
|
+
W,
|
|
32
|
+
{
|
|
33
|
+
lockScroll: g,
|
|
34
|
+
className: c(
|
|
35
|
+
e["tedi-modal__overlay"],
|
|
36
|
+
e[`tedi-modal__overlay--position-${u}`],
|
|
37
|
+
L,
|
|
38
|
+
{
|
|
39
|
+
[e["tedi-modal__overlay--no-overlay"]]: !b,
|
|
40
|
+
[e["tedi-modal__overlay--scroll-page"]]: v === "page"
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
children: /* @__PURE__ */ a(
|
|
44
|
+
H,
|
|
45
|
+
{
|
|
46
|
+
context: N,
|
|
47
|
+
modal: s,
|
|
48
|
+
returnFocus: _,
|
|
49
|
+
initialFocus: p,
|
|
50
|
+
visuallyHiddenDismiss: h ? F("modal.close") : void 0,
|
|
51
|
+
children: /* @__PURE__ */ a(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
...B({
|
|
55
|
+
ref: P,
|
|
56
|
+
"aria-labelledby": d,
|
|
57
|
+
"aria-describedby": w,
|
|
58
|
+
"aria-label": D,
|
|
59
|
+
"aria-modal": s,
|
|
60
|
+
style: i,
|
|
61
|
+
className: c(
|
|
62
|
+
e["tedi-modal__container"],
|
|
63
|
+
n && e[`tedi-modal__container--${o}`],
|
|
64
|
+
e[`tedi-modal--${y}`],
|
|
65
|
+
I,
|
|
66
|
+
x
|
|
67
|
+
)
|
|
68
|
+
}),
|
|
69
|
+
children: f
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
) });
|
|
76
|
+
};
|
|
77
|
+
z.displayName = "Modal.Content";
|
|
78
|
+
export {
|
|
79
|
+
z as ModalContent,
|
|
80
|
+
z as default
|
|
81
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),o=t.createContext(null),n=()=>{const e=t.useContext(o);if(!e)throw new Error("Modal subcomponents must be rendered inside <Modal>.");return e},l=()=>{const{open:e,onOpenChange:r,labelId:s,descriptionId:d}=n();return{open:e,onOpenChange:r,labelId:s,descriptionId:d}};exports.ModalContext=o;exports.useModal=l;exports.useModalContext=n;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { FloatingContext, ReferenceType } from '@floating-ui/react';
|
|
2
|
+
export interface ModalContextValue {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
reference: (node: ReferenceType | null) => void;
|
|
6
|
+
floating: (node: HTMLElement | null) => void;
|
|
7
|
+
getReferenceProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
|
|
8
|
+
getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
|
|
9
|
+
context: FloatingContext<ReferenceType>;
|
|
10
|
+
labelId: string;
|
|
11
|
+
descriptionId: string;
|
|
12
|
+
setHasTitle: (hasTitle: boolean) => void;
|
|
13
|
+
setHasDescription: (hasDescription: boolean) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const ModalContext: import('react').Context<ModalContextValue | null>;
|
|
16
|
+
export declare const useModalContext: () => ModalContextValue;
|
|
17
|
+
/**
|
|
18
|
+
* Public Modal context — the safe subset consumers can read from inside a `<Modal>`.
|
|
19
|
+
* Use this when you bypass `<Modal.Header>` and render your own title / description
|
|
20
|
+
* markup, or when you need to close the modal programmatically from deeply nested code.
|
|
21
|
+
*
|
|
22
|
+
* The floating-ui plumbing (`reference`, `floating`, `getReferenceProps`, …) is
|
|
23
|
+
* intentionally hidden — touching it from outside the Modal package leads to subtle
|
|
24
|
+
* focus/dismissal bugs.
|
|
25
|
+
*
|
|
26
|
+
* @example Custom header with manual `aria-labelledby` wiring
|
|
27
|
+
* ```tsx
|
|
28
|
+
* function CustomHeader({ title }: { title: string }) {
|
|
29
|
+
* const { labelId, onOpenChange } = useModal();
|
|
30
|
+
* return (
|
|
31
|
+
* <Modal.Header>
|
|
32
|
+
* <h2 id={labelId}>{title}</h2>
|
|
33
|
+
* <ClosingButton onClick={() => onOpenChange(false)} />
|
|
34
|
+
* </Modal.Header>
|
|
35
|
+
* );
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @example Close the modal from a footer action
|
|
40
|
+
* ```tsx
|
|
41
|
+
* function ConfirmButton() {
|
|
42
|
+
* const { onOpenChange } = useModal();
|
|
43
|
+
* return <Button onClick={() => onOpenChange(false)}>Confirm</Button>;
|
|
44
|
+
* }
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @throws if called outside a `<Modal>` subtree.
|
|
48
|
+
*/
|
|
49
|
+
export interface UseModalReturn {
|
|
50
|
+
/** Whether the modal is currently open. */
|
|
51
|
+
open: boolean;
|
|
52
|
+
/** Programmatically open or close the modal. Equivalent to clicking the trigger / closer. */
|
|
53
|
+
onOpenChange: (open: boolean) => void;
|
|
54
|
+
/** ID assigned to the title element, intended for `aria-labelledby`. Empty when no title is registered. */
|
|
55
|
+
labelId: string;
|
|
56
|
+
/** ID assigned to the description element, intended for `aria-describedby`. Empty when no description is registered. */
|
|
57
|
+
descriptionId: string;
|
|
58
|
+
}
|
|
59
|
+
export declare const useModal: () => UseModalReturn;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createContext as r, useContext as s } from "react";
|
|
2
|
+
const d = r(null), c = () => {
|
|
3
|
+
const e = s(d);
|
|
4
|
+
if (!e)
|
|
5
|
+
throw new Error("Modal subcomponents must be rendered inside <Modal>.");
|
|
6
|
+
return e;
|
|
7
|
+
}, a = () => {
|
|
8
|
+
const { open: e, onOpenChange: o, labelId: t, descriptionId: n } = c();
|
|
9
|
+
return { open: e, onOpenChange: o, labelId: t, descriptionId: n };
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
d as ModalContext,
|
|
13
|
+
a as useModal,
|
|
14
|
+
c as useModalContext
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),a=require("../../../../../../external/classnames/index.cjs.js"),e=require("../modal.module.scss.cjs.js"),d=({children:i,left:t,className:s})=>{const l=!!t;return o.jsxs("div",{className:a.default(e.default["tedi-modal__footer"],e.default[l?"tedi-modal__footer--split":"tedi-modal__footer--end"],s),children:[l&&o.jsx("div",{className:e.default["tedi-modal__footer-side"],children:t}),o.jsx("div",{className:a.default(e.default["tedi-modal__footer-side"],e.default["tedi-modal__footer-side--right"]),children:i})]})};d.displayName="Modal.Footer";exports.ModalFooter=d;exports.default=d;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface ModalFooterProps {
|
|
3
|
+
/**
|
|
4
|
+
* Content placed on the right side of the footer (the primary actions).
|
|
5
|
+
* If `left` is omitted, the footer simply right-aligns these children.
|
|
6
|
+
*/
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Content placed on the left side of the footer. When set, the footer splits into
|
|
10
|
+
* `left` + `right` halves — matches Figma's "Buttons left and right" variant.
|
|
11
|
+
*/
|
|
12
|
+
left?: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Additional class name.
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const ModalFooter: {
|
|
19
|
+
({ children, left, className }: ModalFooterProps): JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
export default ModalFooter;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import s from "../../../../../../external/classnames/index.es.js";
|
|
3
|
+
import o from "../modal.module.scss.es.js";
|
|
4
|
+
const l = ({ children: i, left: e, className: a }) => {
|
|
5
|
+
const d = !!e;
|
|
6
|
+
return /* @__PURE__ */ r(
|
|
7
|
+
"div",
|
|
8
|
+
{
|
|
9
|
+
className: s(
|
|
10
|
+
o["tedi-modal__footer"],
|
|
11
|
+
o[d ? "tedi-modal__footer--split" : "tedi-modal__footer--end"],
|
|
12
|
+
a
|
|
13
|
+
),
|
|
14
|
+
children: [
|
|
15
|
+
d && /* @__PURE__ */ t("div", { className: o["tedi-modal__footer-side"], children: e }),
|
|
16
|
+
/* @__PURE__ */ t("div", { className: s(o["tedi-modal__footer-side"], o["tedi-modal__footer-side--right"]), children: i })
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
l.displayName = "Modal.Footer";
|
|
22
|
+
export {
|
|
23
|
+
l as ModalFooter,
|
|
24
|
+
l as default
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),g=require("../../../../../../external/classnames/index.cjs.js"),r=require("react"),j=require("../../../base/typography/heading/heading.cjs.js"),p=require("../../../base/typography/text/text.cjs.js"),q=require("../../../buttons/closing-button/closing-button.cjs.js"),a=require("../modal.module.scss.cjs.js"),B=require("../modal-context.cjs.js"),n=i=>{const{title:s,description:o,closeButton:c=!0,closeButtonProps:u,children:t,className:m}=i,{onOpenChange:f,labelId:h,descriptionId:x,setHasTitle:l,setHasDescription:d}=B.useModalContext();r.useEffect(()=>(l(!!s||!!t),()=>l(!1)),[s,t,l]),r.useEffect(()=>(d(!!o||!!t),()=>d(!1)),[o,t,d]);const _=()=>f(!1);return e.jsx("div",{className:g.default(a.default["tedi-modal__header"],m),children:t??e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:a.default["tedi-modal__header-row"],children:[s&&e.jsx(j.Heading,{element:"h3",modifiers:"h3",id:h,className:a.default["tedi-modal__header-title"],children:s}),c&&e.jsx(q.ClosingButton,{size:"default",...u,onClick:_})]}),o&&e.jsx(p.Text,{id:x,className:a.default["tedi-modal__header-description"],children:o})]})})};n.displayName="Modal.Header";exports.ModalHeader=n;exports.default=n;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ClosingButtonProps } from '../../../buttons/closing-button/closing-button';
|
|
3
|
+
export interface ModalHeaderProps {
|
|
4
|
+
/**
|
|
5
|
+
* Title text. Rendered as an `<h3>` and automatically registered as the modal's
|
|
6
|
+
* `aria-labelledby`. Pass `children` instead for full control of the title markup.
|
|
7
|
+
*/
|
|
8
|
+
title?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Description text below the title. Automatically registered as the modal's
|
|
11
|
+
* `aria-describedby`.
|
|
12
|
+
*/
|
|
13
|
+
description?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* Show the closing button.
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
closeButton?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Forwarded to the closing button — use to override size, title, etc.
|
|
21
|
+
*/
|
|
22
|
+
closeButtonProps?: Omit<ClosingButtonProps, 'onClick'>;
|
|
23
|
+
/**
|
|
24
|
+
* Replaces the default title/description layout entirely. When set, `title` and
|
|
25
|
+
* `description` are ignored.
|
|
26
|
+
*
|
|
27
|
+
* Accessibility note: the automatic `aria-labelledby` / `aria-describedby` wiring
|
|
28
|
+
* only fires for the `title` / `description` props. With `children` you need to
|
|
29
|
+
* connect them yourself — call `useModal()` to read `labelId` / `descriptionId`
|
|
30
|
+
* and put them on the right elements:
|
|
31
|
+
*
|
|
32
|
+
* ```tsx
|
|
33
|
+
* function CustomHeader() {
|
|
34
|
+
* const { labelId, descriptionId, onOpenChange } = useModal();
|
|
35
|
+
* return (
|
|
36
|
+
* <Modal.Header>
|
|
37
|
+
* <h2 id={labelId}>Custom title</h2>
|
|
38
|
+
* <p id={descriptionId}>Supporting text</p>
|
|
39
|
+
* <ClosingButton onClick={() => onOpenChange(false)} />
|
|
40
|
+
* </Modal.Header>
|
|
41
|
+
* );
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* Alternatively, set `aria-labelledby` / `aria-describedby` explicitly on
|
|
46
|
+
* `<Modal.Content>` pointing at IDs you control.
|
|
47
|
+
*/
|
|
48
|
+
children?: ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* Additional class name.
|
|
51
|
+
*/
|
|
52
|
+
className?: string;
|
|
53
|
+
}
|
|
54
|
+
export declare const ModalHeader: {
|
|
55
|
+
(props: ModalHeaderProps): JSX.Element;
|
|
56
|
+
displayName: string;
|
|
57
|
+
};
|
|
58
|
+
export default ModalHeader;
|