@ceed/cds 0.0.186 → 0.0.187-treeshaking.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_commonjsHelpers.js +30 -0
- package/dist/_virtual/bind-all.js +3 -0
- package/dist/_virtual/bind.js +3 -0
- package/dist/_virtual/colorManipulator.js +5 -0
- package/dist/_virtual/colorManipulator2.js +3 -0
- package/dist/_virtual/createStyled.js +7 -0
- package/dist/_virtual/createStyled2.js +3 -0
- package/dist/_virtual/extends.js +3 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index10.js +6 -0
- package/dist/_virtual/index11.js +6 -0
- package/dist/_virtual/index12.js +6 -0
- package/dist/_virtual/index2.js +3 -0
- package/dist/_virtual/index3.js +7 -0
- package/dist/_virtual/index4.js +3 -0
- package/dist/_virtual/index5.js +6 -0
- package/dist/_virtual/index6.js +6 -0
- package/dist/_virtual/index7.js +6 -0
- package/dist/_virtual/index8.js +6 -0
- package/dist/_virtual/index9.js +6 -0
- package/dist/_virtual/interopRequireDefault.js +3 -0
- package/dist/_virtual/objectWithoutPropertiesLoose.js +3 -0
- package/dist/components/Accordions/Accordions.js +43 -0
- package/dist/components/Accordions/index.d.ts +2 -2
- package/dist/components/Autocomplete/Autocomplete.js +196 -0
- package/dist/components/Autocomplete/index.d.ts +2 -2
- package/dist/components/Autocomplete/index.js +5 -0
- package/dist/components/Avatar/Avatar.js +42 -0
- package/dist/components/Avatar/index.d.ts +2 -2
- package/dist/components/Box/Box.js +8 -0
- package/dist/components/Box/index.d.ts +2 -2
- package/dist/components/Box/index.js +5 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +47 -0
- package/dist/components/Breadcrumbs/index.d.ts +2 -2
- package/dist/components/Button/Button.js +20 -0
- package/dist/components/Button/index.d.ts +2 -2
- package/dist/components/Button/index.js +5 -0
- package/dist/components/Calendar/Calendar.d.ts +1 -1
- package/dist/components/Calendar/Calendar.js +333 -0
- package/dist/components/Calendar/hooks/use-calendar-props.d.ts +3 -3
- package/dist/components/Calendar/hooks/use-calendar-props.js +74 -0
- package/dist/components/Calendar/hooks/use-calendar.d.ts +1 -1
- package/dist/components/Calendar/hooks/use-calendar.js +247 -0
- package/dist/components/Calendar/index.d.ts +2 -2
- package/dist/components/Calendar/index.js +5 -0
- package/dist/components/Calendar/utils/index.js +74 -0
- package/dist/components/Card/Card.js +20 -0
- package/dist/components/Card/index.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.js +19 -0
- package/dist/components/Checkbox/index.d.ts +2 -2
- package/dist/components/Checkbox/index.js +5 -0
- package/dist/components/Chip/Chip.js +8 -0
- package/dist/components/Chip/index.d.ts +2 -2
- package/dist/components/Chip/index.js +5 -0
- package/dist/components/Container/Container.js +49 -0
- package/dist/components/Container/index.d.ts +2 -2
- package/dist/components/CurrencyInput/CurrencyInput.js +91 -0
- package/dist/components/CurrencyInput/hooks/use-currency-setting.js +167 -0
- package/dist/components/CurrencyInput/index.d.ts +2 -2
- package/dist/components/CurrencyInput/index.js +5 -0
- package/dist/components/DataTable/DataTable.d.ts +1 -1
- package/dist/components/DataTable/DataTable.js +568 -0
- package/dist/components/DataTable/index.d.ts +2 -2
- package/dist/components/DataTable/types.d.ts +7 -7
- package/dist/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/DatePicker/DatePicker.js +210 -0
- package/dist/components/DatePicker/index.d.ts +2 -2
- package/dist/components/DatePicker/index.js +5 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +213 -0
- package/dist/components/DateRangePicker/index.d.ts +2 -2
- package/dist/components/DialogActions/DialogActions.js +14 -0
- package/dist/components/DialogActions/index.d.ts +2 -2
- package/dist/components/DialogActions/index.js +5 -0
- package/dist/components/DialogContent/DialogContent.js +11 -0
- package/dist/components/DialogContent/index.d.ts +2 -2
- package/dist/components/DialogContent/index.js +5 -0
- package/dist/components/DialogFrame/DialogFrame.d.ts +1 -1
- package/dist/components/DialogFrame/DialogFrame.js +31 -0
- package/dist/components/DialogFrame/index.d.ts +2 -2
- package/dist/components/DialogTitle/DialogTitle.js +11 -0
- package/dist/components/DialogTitle/index.d.ts +2 -2
- package/dist/components/DialogTitle/index.js +5 -0
- package/dist/components/Divider/Divider.js +19 -0
- package/dist/components/Divider/index.d.ts +2 -2
- package/dist/components/Drawer/Drawer.js +40 -0
- package/dist/components/Drawer/index.d.ts +2 -2
- package/dist/components/Dropdown/Dropdown.js +8 -0
- package/dist/components/Dropdown/index.d.ts +2 -2
- package/dist/components/Dropdown/index.js +5 -0
- package/dist/components/FormControl/FormControl.js +15 -0
- package/dist/components/FormControl/index.d.ts +2 -2
- package/dist/components/FormControl/index.js +5 -0
- package/dist/components/FormHelperText/FormHelperText.js +8 -0
- package/dist/components/FormHelperText/index.d.ts +2 -2
- package/dist/components/FormHelperText/index.js +5 -0
- package/dist/components/FormLabel/FormLabel.js +8 -0
- package/dist/components/FormLabel/index.d.ts +2 -2
- package/dist/components/FormLabel/index.js +5 -0
- package/dist/components/Grid/index.d.ts +2 -2
- package/dist/components/IconButton/IconButton.js +20 -0
- package/dist/components/IconButton/index.d.ts +2 -2
- package/dist/components/IconButton/index.js +5 -0
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +60 -0
- package/dist/components/Input/index.d.ts +2 -2
- package/dist/components/Input/index.js +5 -0
- package/dist/components/InsetDrawer/InsetDrawer.js +30 -0
- package/dist/components/InsetDrawer/index.d.ts +2 -2
- package/dist/components/Markdown/Markdown.d.ts +6 -22
- package/dist/components/Markdown/Markdown.js +36 -0
- package/dist/components/Markdown/index.d.ts +2 -2
- package/dist/components/Menu/Menu.js +43 -0
- package/dist/components/Menu/index.d.ts +2 -2
- package/dist/components/Menu/index.js +6 -0
- package/dist/components/MenuButton/MenuButton.js +26 -0
- package/dist/components/Modal/Modal.d.ts +4 -4
- package/dist/components/Modal/Modal.js +43 -0
- package/dist/components/Modal/index.d.ts +2 -2
- package/dist/components/MonthPicker/MonthPicker.d.ts +1 -1
- package/dist/components/MonthPicker/MonthPicker.js +162 -0
- package/dist/components/MonthPicker/index.d.ts +2 -2
- package/dist/components/MonthRangePicker/MonthRangePicker.d.ts +1 -1
- package/dist/components/MonthRangePicker/MonthRangePicker.js +172 -0
- package/dist/components/MonthRangePicker/index.d.ts +2 -2
- package/dist/components/NavigationGroup/NavigationGroup.js +42 -0
- package/dist/components/NavigationGroup/index.d.ts +2 -2
- package/dist/components/NavigationItem/NavigationItem.js +45 -0
- package/dist/components/NavigationItem/index.d.ts +2 -2
- package/dist/components/Navigator/Navigator.js +30 -0
- package/dist/components/Navigator/index.d.ts +2 -2
- package/dist/components/Pagination/Pagination.d.ts +2 -2
- package/dist/components/Pagination/Pagination.js +117 -0
- package/dist/components/Pagination/index.d.ts +2 -2
- package/dist/components/Pagination/index.js +5 -0
- package/dist/components/PercentageInput/PercentageInput.js +85 -0
- package/dist/components/PercentageInput/index.d.ts +2 -2
- package/dist/components/Radio/Radio.js +11 -0
- package/dist/components/Radio/index.d.ts +2 -2
- package/dist/components/RadioList/RadioList.d.ts +1 -1
- package/dist/components/RadioList/RadioList.js +18 -0
- package/dist/components/RadioList/index.d.ts +2 -2
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +56 -0
- package/dist/components/Select/index.d.ts +2 -2
- package/dist/components/Select/index.js +6 -0
- package/dist/components/Sheet/Sheet.js +8 -0
- package/dist/components/Sheet/index.d.ts +2 -2
- package/dist/components/Sheet/index.js +5 -0
- package/dist/components/Stack/index.d.ts +2 -2
- package/dist/components/Stack/index.js +2 -0
- package/dist/components/Stepper/Stepper.js +66 -0
- package/dist/components/Stepper/index.d.ts +2 -2
- package/dist/components/Switch/Switch.js +46 -0
- package/dist/components/Switch/index.d.ts +2 -2
- package/dist/components/Table/Table.js +64 -0
- package/dist/components/Table/index.d.ts +2 -2
- package/dist/components/Tabs/Tabs.js +17 -0
- package/dist/components/Tabs/index.d.ts +2 -2
- package/dist/components/Textarea/Textarea.d.ts +3 -17
- package/dist/components/Textarea/Textarea.js +31 -0
- package/dist/components/Textarea/index.d.ts +2 -2
- package/dist/components/Textarea/index.js +5 -0
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +7 -7
- package/dist/components/ThemeProvider/ThemeProvider.js +240 -0
- package/dist/components/ThemeProvider/index.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.js +19 -0
- package/dist/components/Tooltip/index.d.ts +2 -2
- package/dist/components/Tooltip/index.js +5 -0
- package/dist/components/Typography/Typography.js +19 -0
- package/dist/components/Typography/index.d.ts +2 -2
- package/dist/components/Typography/index.js +5 -0
- package/dist/components/Uploader/Uploader.d.ts +4 -3
- package/dist/components/Uploader/Uploader.js +402 -0
- package/dist/components/Uploader/index.d.ts +2 -2
- package/dist/components/index.d.ts +53 -53
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/element-adapter-native-data-key.js +8 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/external-adapter.js +245 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js +1 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js +1 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js +1 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js +1 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/get-element-from-point-without-honey-pot.js +19 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/honey-pot-data-attribute.js +5 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/is-honey-pot-element.js +7 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/dispatch-consumer-event.js +128 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/lifecycle-manager.js +340 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/usage-ledger.js +33 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-adapter.js +60 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-drop-target.js +312 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-monitor.js +96 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/combine.js +13 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/external/file.js +23 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/once.js +18 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/prevent-unhandled.js +102 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/add-attribute.js +10 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/android.js +3 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/count-events-for-safari.js +123 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-entering-window.js +55 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-from-another-window.js +18 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-leaving-window.js +55 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/detect-broken-drag.js +49 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/get-input.js +16 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-firefox.js +15 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-safari.js +18 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/media-types/text-media-type.js +8 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/arrayLikeToArray.js +7 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/arrayWithHoles.js +5 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/arrayWithoutHoles.js +7 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/defineProperty.js +18 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/iterableToArray.js +5 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/iterableToArrayLimit.js +26 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/nonIterableRest.js +5 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/nonIterableSpread.js +5 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/slicedToArray.js +10 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/toConsumableArray.js +10 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/toPrimitive.js +14 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/toPropertyKey.js +9 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/typeof.js +11 -0
- package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +12 -0
- package/dist/external/@babel/runtime/helpers/esm/extends.js +16 -0
- package/dist/external/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +14 -0
- package/dist/external/@babel/runtime/helpers/extends.js +28 -0
- package/dist/external/@babel/runtime/helpers/interopRequireDefault.js +19 -0
- package/dist/external/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +26 -0
- package/dist/external/@emotion/cache/dist/emotion-cache.esm.js +653 -0
- package/dist/external/@emotion/memoize/dist/emotion-memoize.esm.js +9 -0
- package/dist/external/@emotion/sheet/dist/emotion-sheet.esm.js +154 -0
- package/dist/external/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js +16 -0
- package/dist/external/@mui/icons-material/esm/ArrowUpwardRounded.js +8 -0
- package/dist/external/@mui/icons-material/esm/CalendarToday.js +8 -0
- package/dist/external/@mui/icons-material/esm/Check.js +8 -0
- package/dist/external/@mui/icons-material/esm/ChevronLeft.js +8 -0
- package/dist/external/@mui/icons-material/esm/ChevronRight.js +8 -0
- package/dist/external/@mui/icons-material/esm/ClearRounded.js +8 -0
- package/dist/external/@mui/icons-material/esm/Close.js +8 -0
- package/dist/external/@mui/icons-material/esm/CloudUploadRounded.js +8 -0
- package/dist/external/@mui/icons-material/esm/ExpandMore.js +8 -0
- package/dist/external/@mui/icons-material/esm/Info.js +8 -0
- package/dist/external/@mui/icons-material/esm/UploadFileRounded.js +8 -0
- package/dist/external/@mui/material/SvgIcon/SvgIcon.js +186 -0
- package/dist/external/@mui/material/SvgIcon/svgIconClasses.js +9 -0
- package/dist/external/@mui/material/colors/blue.js +18 -0
- package/dist/external/@mui/material/colors/common.js +6 -0
- package/dist/external/@mui/material/colors/green.js +18 -0
- package/dist/external/@mui/material/colors/grey.js +18 -0
- package/dist/external/@mui/material/colors/lightBlue.js +18 -0
- package/dist/external/@mui/material/colors/orange.js +18 -0
- package/dist/external/@mui/material/colors/purple.js +18 -0
- package/dist/external/@mui/material/colors/red.js +18 -0
- package/dist/external/@mui/material/styles/createMixins.js +19 -0
- package/dist/external/@mui/material/styles/createPalette.js +308 -0
- package/dist/external/@mui/material/styles/createTheme.js +82 -0
- package/dist/external/@mui/material/styles/createTransitions.js +91 -0
- package/dist/external/@mui/material/styles/createTypography.js +93 -0
- package/dist/external/@mui/material/styles/defaultTheme.js +5 -0
- package/dist/external/@mui/material/styles/identifier.js +3 -0
- package/dist/external/@mui/material/styles/rootShouldForwardProp.js +5 -0
- package/dist/external/@mui/material/styles/shadows.js +11 -0
- package/dist/external/@mui/material/styles/slotShouldForwardProp.js +6 -0
- package/dist/external/@mui/material/styles/styled.js +12 -0
- package/dist/external/@mui/material/styles/useThemeProps.js +17 -0
- package/dist/external/@mui/material/styles/zIndex.js +14 -0
- package/dist/external/@mui/material/utils/capitalize.js +5 -0
- package/dist/external/@mui/material/utils/createSvgIcon.js +24 -0
- package/dist/external/@mui/styled-engine/GlobalStyles/GlobalStyles.js +24 -0
- package/dist/external/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.js +37 -0
- package/dist/external/@mui/styled-engine/index.js +38 -0
- package/dist/external/@mui/system/colorManipulator.js +385 -0
- package/dist/external/@mui/system/createStyled.js +270 -0
- package/dist/external/@mui/system/esm/borders.js +51 -0
- package/dist/external/@mui/system/esm/breakpoints.js +66 -0
- package/dist/external/@mui/system/esm/compose.js +26 -0
- package/dist/external/@mui/system/esm/createTheme/applyStyles.js +76 -0
- package/dist/external/@mui/system/esm/createTheme/createBreakpoints.js +82 -0
- package/dist/external/@mui/system/esm/createTheme/createSpacing.js +34 -0
- package/dist/external/@mui/system/esm/createTheme/createTheme.js +45 -0
- package/dist/external/@mui/system/esm/createTheme/index.js +3 -0
- package/dist/external/@mui/system/esm/createTheme/shape.js +5 -0
- package/dist/external/@mui/system/esm/cssGrid.js +86 -0
- package/dist/external/@mui/system/esm/memoize.js +11 -0
- package/dist/external/@mui/system/esm/merge.js +12 -0
- package/dist/external/@mui/system/esm/palette.js +28 -0
- package/dist/external/@mui/system/esm/responsivePropType.js +5 -0
- package/dist/external/@mui/system/esm/sizing.js +67 -0
- package/dist/external/@mui/system/esm/spacing.js +144 -0
- package/dist/external/@mui/system/esm/style.js +77 -0
- package/dist/external/@mui/system/esm/styleFunctionSx/defaultSxConfig.js +293 -0
- package/dist/external/@mui/system/esm/styleFunctionSx/extendSxProp.js +51 -0
- package/dist/external/@mui/system/esm/styleFunctionSx/index.js +3 -0
- package/dist/external/@mui/system/esm/styleFunctionSx/styleFunctionSx.js +129 -0
- package/dist/external/@mui/system/esm/useTheme.js +9 -0
- package/dist/external/@mui/system/esm/useThemeProps/getThemeProps.js +15 -0
- package/dist/external/@mui/system/esm/useThemeProps/useThemeProps.js +22 -0
- package/dist/external/@mui/system/esm/useThemeWithoutDefault.js +12 -0
- package/dist/external/@mui/utils/ClassNameGenerator/ClassNameGenerator.js +18 -0
- package/dist/external/@mui/utils/capitalize/capitalize.js +14 -0
- package/dist/external/@mui/utils/capitalize/index.js +1 -0
- package/dist/external/@mui/utils/clamp/clamp.js +5 -0
- package/dist/external/@mui/utils/clamp/index.js +1 -0
- package/dist/external/@mui/utils/composeClasses/composeClasses.js +23 -0
- package/dist/external/@mui/utils/deepmerge/deepmerge.js +44 -0
- package/dist/external/@mui/utils/deepmerge/index.js +1 -0
- package/dist/external/@mui/utils/formatMuiErrorMessage/formatMuiErrorMessage.js +21 -0
- package/dist/external/@mui/utils/formatMuiErrorMessage/index.js +1 -0
- package/dist/external/@mui/utils/generateUtilityClass/generateUtilityClass.js +22 -0
- package/dist/external/@mui/utils/generateUtilityClasses/generateUtilityClasses.js +11 -0
- package/dist/external/@mui/utils/getDisplayName/getDisplayName.js +49 -0
- package/dist/external/@mui/utils/getDisplayName/index.js +1 -0
- package/dist/external/@mui/utils/resolveProps/resolveProps.js +37 -0
- package/dist/external/bind-event-listener/dist/bind-all.js +54 -0
- package/dist/external/bind-event-listener/dist/bind.js +21 -0
- package/dist/external/bind-event-listener/dist/index.js +21 -0
- package/dist/external/clsx/dist/clsx.js +3 -0
- package/dist/external/object-assign/index.js +99 -0
- package/dist/external/prop-types/checkPropTypes.js +115 -0
- package/dist/external/prop-types/factoryWithThrowingShims.js +74 -0
- package/dist/external/prop-types/factoryWithTypeCheckers.js +625 -0
- package/dist/external/prop-types/index.js +33 -0
- package/dist/external/prop-types/lib/ReactPropTypesSecret.js +21 -0
- package/dist/external/prop-types/lib/has.js +11 -0
- package/dist/external/raf-schd/dist/raf-schd.esm.js +34 -0
- package/dist/external/stylis/src/Enum.js +12 -0
- package/dist/external/stylis/src/Middleware.js +32 -0
- package/dist/external/stylis/src/Parser.js +193 -0
- package/dist/external/stylis/src/Serializer.js +38 -0
- package/dist/external/stylis/src/Tokenizer.js +223 -0
- package/dist/external/stylis/src/Utility.js +117 -0
- package/dist/hooks/use-controlled-state/index.js +23 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +52 -2
- package/dist/libs/rehype-accent/index.js +39 -0
- package/framer/index.js +30 -30
- package/package.json +8 -4
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import React__default, { forwardRef, useRef, useCallback, useState, useEffect, useImperativeHandle } from 'react';
|
|
2
|
+
import { IMaskInput, IMask } from 'react-imask';
|
|
3
|
+
import CalendarTodayIcon from '../../external/@mui/icons-material/esm/CalendarToday.js';
|
|
4
|
+
import { styled, useThemeProps } from '@mui/joy';
|
|
5
|
+
import { Popper, FocusTrap, ClickAwayListener } from '@mui/base';
|
|
6
|
+
import { Input } from '../Input/Input.js';
|
|
7
|
+
import { IconButton } from '../IconButton/IconButton.js';
|
|
8
|
+
import { Sheet } from '../Sheet/Sheet.js';
|
|
9
|
+
import { Calendar } from '../Calendar/Calendar.js';
|
|
10
|
+
import { DialogActions } from '../DialogActions/DialogActions.js';
|
|
11
|
+
import { Button } from '../Button/Button.js';
|
|
12
|
+
import { useControlledState } from '../../hooks/use-controlled-state/index.js';
|
|
13
|
+
|
|
14
|
+
const StyledPopper = styled(Popper, {
|
|
15
|
+
name: "MonthPicker",
|
|
16
|
+
slot: "popper",
|
|
17
|
+
})(({ theme }) => ({
|
|
18
|
+
zIndex: theme.zIndex.tooltip,
|
|
19
|
+
}));
|
|
20
|
+
const CalendarSheet = styled(Sheet, {
|
|
21
|
+
name: "MonthPicker",
|
|
22
|
+
slot: "sheet",
|
|
23
|
+
overridesResolver: (props, styles) => styles.root,
|
|
24
|
+
})(({ theme }) => ({
|
|
25
|
+
width: "264px",
|
|
26
|
+
boxShadow: theme.shadow.md,
|
|
27
|
+
borderRadius: theme.radius.md,
|
|
28
|
+
}));
|
|
29
|
+
const MonthPickerRoot = styled("div", {
|
|
30
|
+
name: "MonthPicker",
|
|
31
|
+
slot: "root",
|
|
32
|
+
overridesResolver: (props, styles) => styles.root,
|
|
33
|
+
})({
|
|
34
|
+
width: "100%",
|
|
35
|
+
});
|
|
36
|
+
const formatValueString = (date, format) => {
|
|
37
|
+
let month = `${date.getMonth() + 1}`;
|
|
38
|
+
const year = date.getFullYear();
|
|
39
|
+
if (Number(month) < 10)
|
|
40
|
+
month = "0" + month;
|
|
41
|
+
return format.replace(/YYYY/g, year.toString()).replace(/MM/g, month);
|
|
42
|
+
};
|
|
43
|
+
const formatToPattern = (format) => {
|
|
44
|
+
return format
|
|
45
|
+
.replace(/YYYY/g, "Y")
|
|
46
|
+
.replace(/MM/g, "M")
|
|
47
|
+
.replace(/[^YM\s]/g, (match) => `${match}\``);
|
|
48
|
+
};
|
|
49
|
+
function parseDate(dateString) {
|
|
50
|
+
let month, year;
|
|
51
|
+
const cleanDateString = dateString.replace(/[^\d]/g, "");
|
|
52
|
+
if (dateString.match(/\d{1,2}.\d{4}/)) {
|
|
53
|
+
// MMYYYY
|
|
54
|
+
month = cleanDateString.slice(0, 2);
|
|
55
|
+
year = cleanDateString.slice(2);
|
|
56
|
+
}
|
|
57
|
+
else if (dateString.match(/\d{4}.\d{1,2}/)) {
|
|
58
|
+
// YYYYMM
|
|
59
|
+
year = cleanDateString.slice(0, 4);
|
|
60
|
+
month = cleanDateString.slice(4);
|
|
61
|
+
}
|
|
62
|
+
const date = new Date(`${year}/${month}`);
|
|
63
|
+
return date;
|
|
64
|
+
}
|
|
65
|
+
const TextMaskAdapter = React__default.forwardRef(function TextMaskAdapter(props, ref) {
|
|
66
|
+
const { onChange, format, ...other } = props;
|
|
67
|
+
return (React__default.createElement(IMaskInput, { ...other, inputRef: ref, onAccept: (value) => onChange({ target: { name: props.name, value } }), mask: Date, pattern: formatToPattern(format), blocks: {
|
|
68
|
+
M: {
|
|
69
|
+
mask: IMask.MaskedRange,
|
|
70
|
+
from: 1,
|
|
71
|
+
to: 12,
|
|
72
|
+
maxLength: 2,
|
|
73
|
+
},
|
|
74
|
+
Y: {
|
|
75
|
+
mask: IMask.MaskedRange,
|
|
76
|
+
from: 1900,
|
|
77
|
+
to: 9999,
|
|
78
|
+
},
|
|
79
|
+
}, format: (date) => formatValueString(date, format), parse: parseDate, autofix: "pad", overwrite: true }));
|
|
80
|
+
});
|
|
81
|
+
const MonthPicker = forwardRef((inProps, ref) => {
|
|
82
|
+
// prop destruction
|
|
83
|
+
const props = useThemeProps({ props: inProps, name: "MonthPicker" });
|
|
84
|
+
const { onChange, disabled, label, error, helperText, minDate, maxDate, disableFuture, disablePast, required,
|
|
85
|
+
// NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
|
|
86
|
+
sx, className, format = "YYYY/MM", size, ...innerProps } = props;
|
|
87
|
+
// lib hooks
|
|
88
|
+
// state, ref, querystring hooks
|
|
89
|
+
const innerRef = useRef(null);
|
|
90
|
+
const [value, setValue] = useControlledState(props.value, props.defaultValue || "", useCallback((value) => onChange?.({ target: { name: props.name, value } }), [props.name, onChange]), { disableStrict: true });
|
|
91
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
92
|
+
// form hooks
|
|
93
|
+
// query hooks
|
|
94
|
+
// calculated values
|
|
95
|
+
const open = Boolean(anchorEl);
|
|
96
|
+
// effects
|
|
97
|
+
useEffect(() => {
|
|
98
|
+
if (!anchorEl) {
|
|
99
|
+
// NOTE: 변경된 값을 blur이벤트 핸들러에서 다룰려면 calendar tooltip이 닫힐 때 blur 이벤트를 발생시켜야 한다.
|
|
100
|
+
innerRef.current?.blur();
|
|
101
|
+
}
|
|
102
|
+
}, [anchorEl, innerRef]);
|
|
103
|
+
useImperativeHandle(ref, () => innerRef.current, [
|
|
104
|
+
innerRef,
|
|
105
|
+
]);
|
|
106
|
+
// handlers
|
|
107
|
+
const handleChange = useCallback((event) => {
|
|
108
|
+
setValue(event.target.value);
|
|
109
|
+
}, [setValue]);
|
|
110
|
+
const handleCalendarToggle = useCallback((event) => {
|
|
111
|
+
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
112
|
+
innerRef.current?.focus();
|
|
113
|
+
}, [anchorEl, setAnchorEl, innerRef]);
|
|
114
|
+
return (React__default.createElement(MonthPickerRoot, null,
|
|
115
|
+
React__default.createElement(FocusTrap, { open: true },
|
|
116
|
+
React__default.createElement(React__default.Fragment, null,
|
|
117
|
+
React__default.createElement(Input, { ...innerProps, color: error ? "danger" : innerProps.color, ref: innerRef, size: size, value: value, onChange: handleChange, placeholder: format, disabled: disabled, required: required, slotProps: {
|
|
118
|
+
input: { component: TextMaskAdapter, ref: innerRef, format },
|
|
119
|
+
}, error: error, className: className, sx: {
|
|
120
|
+
...sx,
|
|
121
|
+
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
122
|
+
fontFamily: "monospace",
|
|
123
|
+
}, endDecorator: React__default.createElement(IconButton, { variant: "plain", onClick: handleCalendarToggle, "aria-label": "Toggle Calendar", "aria-controls": "month-picker-popper", "aria-haspopup": "dialog", "aria-expanded": open },
|
|
124
|
+
React__default.createElement(CalendarTodayIcon, null)), label: label, helperText: helperText }),
|
|
125
|
+
open && (React__default.createElement(ClickAwayListener, { onClickAway: () => setAnchorEl(null) },
|
|
126
|
+
React__default.createElement(StyledPopper, { id: "month-picker-popper", open: true, anchorEl: anchorEl, placement: "bottom-end",
|
|
127
|
+
// NOTE: 값이 변경 되기전 blur 이벤트 방지
|
|
128
|
+
onMouseDown: (e) => e.preventDefault(), modifiers: [
|
|
129
|
+
{
|
|
130
|
+
name: "offset",
|
|
131
|
+
options: {
|
|
132
|
+
offset: [4, 4],
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
], "aria-label": "Calendar Tooltip", "aria-expanded": open },
|
|
136
|
+
React__default.createElement(CalendarSheet, { tabIndex: -1, role: "presentation" },
|
|
137
|
+
React__default.createElement(Calendar, { view: "month", views: ["month"], value: !Number.isNaN(new Date(value).getTime())
|
|
138
|
+
? [new Date(value), undefined]
|
|
139
|
+
: undefined, onChange: ([date]) => {
|
|
140
|
+
handleChange({
|
|
141
|
+
target: {
|
|
142
|
+
name: props.name,
|
|
143
|
+
value: formatValueString(date, format),
|
|
144
|
+
},
|
|
145
|
+
});
|
|
146
|
+
setAnchorEl(null);
|
|
147
|
+
}, minDate: minDate ? new Date(minDate) : undefined, maxDate: maxDate ? new Date(maxDate) : undefined, disableFuture: disableFuture, disablePast: disablePast }),
|
|
148
|
+
React__default.createElement(DialogActions, { sx: {
|
|
149
|
+
p: 1,
|
|
150
|
+
} },
|
|
151
|
+
React__default.createElement(Button, { size: size, variant: "plain", color: "neutral", onClick: () => {
|
|
152
|
+
handleChange({
|
|
153
|
+
target: {
|
|
154
|
+
name: props.name,
|
|
155
|
+
value: "",
|
|
156
|
+
},
|
|
157
|
+
});
|
|
158
|
+
setAnchorEl(null);
|
|
159
|
+
} }, "Clear"))))))))));
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
export { MonthPicker };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MonthPicker } from "./MonthPicker";
|
|
2
|
-
export * from "./MonthPicker";
|
|
1
|
+
import { MonthPicker } from "./MonthPicker.js";
|
|
2
|
+
export * from "./MonthPicker.js";
|
|
3
3
|
export default MonthPicker;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import React__default, { forwardRef, useRef, useCallback, useState, useMemo, useEffect, useImperativeHandle } from 'react';
|
|
2
|
+
import { IMaskInput, IMask } from 'react-imask';
|
|
3
|
+
import CalendarTodayIcon from '../../external/@mui/icons-material/esm/CalendarToday.js';
|
|
4
|
+
import { styled, useThemeProps } from '@mui/joy';
|
|
5
|
+
import { Popper, FocusTrap, ClickAwayListener } from '@mui/base';
|
|
6
|
+
import { Input } from '../Input/Input.js';
|
|
7
|
+
import { IconButton } from '../IconButton/IconButton.js';
|
|
8
|
+
import { Sheet } from '../Sheet/Sheet.js';
|
|
9
|
+
import { Calendar } from '../Calendar/Calendar.js';
|
|
10
|
+
import { DialogActions } from '../DialogActions/DialogActions.js';
|
|
11
|
+
import { Button } from '../Button/Button.js';
|
|
12
|
+
import { useControlledState } from '../../hooks/use-controlled-state/index.js';
|
|
13
|
+
|
|
14
|
+
const StyledPopper = styled(Popper, {
|
|
15
|
+
name: "MonthRangePicker",
|
|
16
|
+
slot: "popper",
|
|
17
|
+
})(({ theme }) => ({
|
|
18
|
+
zIndex: theme.zIndex.tooltip,
|
|
19
|
+
}));
|
|
20
|
+
const CalendarSheet = styled(Sheet, {
|
|
21
|
+
name: "MonthRangePicker",
|
|
22
|
+
slot: "sheet",
|
|
23
|
+
overridesResolver: (props, styles) => styles.root,
|
|
24
|
+
})(({ theme }) => ({
|
|
25
|
+
zIndex: theme.zIndex.tooltip,
|
|
26
|
+
width: "264px",
|
|
27
|
+
boxShadow: theme.shadow.md,
|
|
28
|
+
borderRadius: theme.radius.md,
|
|
29
|
+
}));
|
|
30
|
+
const MonthRangePickerRoot = styled("div", {
|
|
31
|
+
name: "MonthRangePicker",
|
|
32
|
+
slot: "root",
|
|
33
|
+
overridesResolver: (props, styles) => styles.root,
|
|
34
|
+
})({
|
|
35
|
+
width: "100%",
|
|
36
|
+
});
|
|
37
|
+
const formatValueString = ([date1, date2], format) => {
|
|
38
|
+
const getStr = (date) => {
|
|
39
|
+
let month = `${date.getMonth() + 1}`;
|
|
40
|
+
const year = date.getFullYear();
|
|
41
|
+
if (Number(month) < 10)
|
|
42
|
+
month = "0" + month;
|
|
43
|
+
return format.replace(/YYYY/g, year.toString()).replace(/MM/g, month);
|
|
44
|
+
};
|
|
45
|
+
return [getStr(date1), date2 ? getStr(date2) : ""].join(" - ");
|
|
46
|
+
};
|
|
47
|
+
function parseDate(dateString) {
|
|
48
|
+
let month, year;
|
|
49
|
+
const cleanDateString = dateString.replace(/[^\d]/g, "");
|
|
50
|
+
if (dateString.match(/\d{1,2}.\d{4}/)) {
|
|
51
|
+
// MMYYYY
|
|
52
|
+
month = cleanDateString.slice(0, 2);
|
|
53
|
+
year = cleanDateString.slice(2);
|
|
54
|
+
}
|
|
55
|
+
else if (dateString.match(/\d{4}.\d{1,2}/)) {
|
|
56
|
+
// YYYYMM
|
|
57
|
+
year = cleanDateString.slice(0, 4);
|
|
58
|
+
month = cleanDateString.slice(4);
|
|
59
|
+
}
|
|
60
|
+
const date = new Date(`${year}/${month}`);
|
|
61
|
+
return date;
|
|
62
|
+
}
|
|
63
|
+
const parseDates = (str) => {
|
|
64
|
+
const date1 = str.split(" - ")[0] || "";
|
|
65
|
+
const date2 = str.split(" - ")[1] || "";
|
|
66
|
+
return [parseDate(date1), parseDate(date2)];
|
|
67
|
+
};
|
|
68
|
+
const formatToPattern = (format) => {
|
|
69
|
+
return `${format} - ${format}`
|
|
70
|
+
.replace(/YYYY/g, "Y")
|
|
71
|
+
.replace(/MM/g, "m")
|
|
72
|
+
.replace(/[^YMm\s]/g, (match) => `${match}\``);
|
|
73
|
+
};
|
|
74
|
+
const TextMaskAdapter = React__default.forwardRef(function TextMaskAdapter(props, ref) {
|
|
75
|
+
const { onChange, format, ...other } = props;
|
|
76
|
+
return (React__default.createElement(IMaskInput, { ...other, inputRef: ref, onAccept: (value) => onChange({ target: { name: props.name, value } }), mask: Date,
|
|
77
|
+
// other options are optional
|
|
78
|
+
pattern: formatToPattern(format),
|
|
79
|
+
// you can provide your own blocks definitions, default blocks for date mask are:
|
|
80
|
+
blocks: {
|
|
81
|
+
m: {
|
|
82
|
+
mask: IMask.MaskedRange,
|
|
83
|
+
from: 1,
|
|
84
|
+
to: 12,
|
|
85
|
+
maxLength: 2,
|
|
86
|
+
},
|
|
87
|
+
Y: {
|
|
88
|
+
mask: IMask.MaskedRange,
|
|
89
|
+
from: 1900,
|
|
90
|
+
to: 9999,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
// define date -> str convertion
|
|
94
|
+
format: (dates) => formatValueString(dates, format),
|
|
95
|
+
// define str -> date convertion
|
|
96
|
+
parse: parseDates, autofix: "pad", overwrite: true }));
|
|
97
|
+
});
|
|
98
|
+
const MonthRangePicker = forwardRef((inProps, ref) => {
|
|
99
|
+
// prop destruction
|
|
100
|
+
const props = useThemeProps({ props: inProps, name: "MonthRangePicker" });
|
|
101
|
+
const { onChange, disabled, label, error, helperText, minDate, maxDate, disableFuture, disablePast, required,
|
|
102
|
+
// NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
|
|
103
|
+
sx, className, format = "YYYY/MM", size, ...innerProps } = props;
|
|
104
|
+
// lib hooks
|
|
105
|
+
// state, ref, querystring hooks
|
|
106
|
+
const innerRef = useRef(null);
|
|
107
|
+
const [value, setValue] = useControlledState(props.value, props.defaultValue || "", useCallback((value) => onChange?.({ target: { name: props.name, value } }), [props.name, onChange]), { disableStrict: true });
|
|
108
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
109
|
+
// form hooks
|
|
110
|
+
// query hooks
|
|
111
|
+
// calculated values
|
|
112
|
+
const open = Boolean(anchorEl);
|
|
113
|
+
const calendarValue = useMemo(() => (value ? parseDates(value) : undefined), [value]);
|
|
114
|
+
// effects
|
|
115
|
+
useEffect(() => {
|
|
116
|
+
if (!anchorEl) {
|
|
117
|
+
// NOTE: 변경된 값을 blur이벤트 핸들러에서 다룰려면 calendar tooltip이 닫힐 때 blur 이벤트를 발생시켜야 한다.
|
|
118
|
+
innerRef.current?.blur();
|
|
119
|
+
}
|
|
120
|
+
}, [anchorEl, innerRef]);
|
|
121
|
+
useImperativeHandle(ref, () => innerRef.current, [
|
|
122
|
+
innerRef,
|
|
123
|
+
]);
|
|
124
|
+
// handlers
|
|
125
|
+
const handleChange = useCallback((event) => {
|
|
126
|
+
setValue(event.target.value);
|
|
127
|
+
}, [setValue]);
|
|
128
|
+
const handleCalendarToggle = useCallback((event) => {
|
|
129
|
+
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
130
|
+
innerRef.current?.focus();
|
|
131
|
+
}, [anchorEl, setAnchorEl, innerRef]);
|
|
132
|
+
const handleCalendarChange = useCallback(([date1, date2]) => {
|
|
133
|
+
if (!date1 || !date2)
|
|
134
|
+
return;
|
|
135
|
+
setValue(formatValueString([date1, date2], format));
|
|
136
|
+
setAnchorEl(null);
|
|
137
|
+
}, [setValue, setAnchorEl, format]);
|
|
138
|
+
return (React__default.createElement(MonthRangePickerRoot, null,
|
|
139
|
+
React__default.createElement(FocusTrap, { open: true },
|
|
140
|
+
React__default.createElement(React__default.Fragment, null,
|
|
141
|
+
React__default.createElement(Input, { ...innerProps, color: error ? "danger" : innerProps.color, ref: ref, size: size, value: value, onChange: handleChange, disabled: disabled, required: required, placeholder: `${format} - ${format}`, slotProps: {
|
|
142
|
+
input: { component: TextMaskAdapter, ref: innerRef, format },
|
|
143
|
+
}, error: error, className: className, sx: {
|
|
144
|
+
...sx,
|
|
145
|
+
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
146
|
+
fontFamily: "monospace",
|
|
147
|
+
}, endDecorator: React__default.createElement(IconButton, { variant: "plain", onClick: handleCalendarToggle, "aria-label": "Toggle Calendar", "aria-controls": "month-range-picker-popper", "aria-haspopup": "dialog", "aria-expanded": open },
|
|
148
|
+
React__default.createElement(CalendarTodayIcon, null)), label: label, helperText: helperText }),
|
|
149
|
+
open && (React__default.createElement(ClickAwayListener, { onClickAway: () => setAnchorEl(null) },
|
|
150
|
+
React__default.createElement(StyledPopper, { id: "month-range-picker-popper", open: true, anchorEl: anchorEl, placement: "bottom-end",
|
|
151
|
+
// NOTE: 값이 변경 되기전 blur 이벤트 방지
|
|
152
|
+
onMouseDown: (e) => e.preventDefault(), modifiers: [
|
|
153
|
+
{
|
|
154
|
+
name: "offset",
|
|
155
|
+
options: {
|
|
156
|
+
offset: [4, 4],
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
], "aria-label": "Calendar Tooltip", "aria-expanded": open },
|
|
160
|
+
React__default.createElement(CalendarSheet, { tabIndex: -1, role: "presentation" },
|
|
161
|
+
React__default.createElement(Calendar, { view: "month", views: ["month"], rangeSelection: true, defaultValue: calendarValue, onChange: handleCalendarChange, minDate: minDate ? new Date(minDate) : undefined, maxDate: maxDate ? new Date(maxDate) : undefined, disableFuture: disableFuture, disablePast: disablePast }),
|
|
162
|
+
React__default.createElement(DialogActions, { sx: {
|
|
163
|
+
p: 1,
|
|
164
|
+
} },
|
|
165
|
+
React__default.createElement(Button, { size: size, variant: "plain", color: "neutral", onClick: () => {
|
|
166
|
+
setValue("");
|
|
167
|
+
setAnchorEl(null);
|
|
168
|
+
} }, "Clear"))))))))));
|
|
169
|
+
});
|
|
170
|
+
MonthRangePicker.displayName = "MonthRangePicker";
|
|
171
|
+
|
|
172
|
+
export { MonthRangePicker };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MonthRangePicker } from "./MonthRangePicker";
|
|
2
|
-
export * from "./MonthRangePicker";
|
|
1
|
+
import { MonthRangePicker } from "./MonthRangePicker.js";
|
|
2
|
+
export * from "./MonthRangePicker.js";
|
|
3
3
|
export default MonthRangePicker;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { styled, AccordionSummary as AccordionSummary$1, accordionSummaryClasses, AccordionDetails as AccordionDetails$1, Accordion, Stack } from '@mui/joy';
|
|
3
|
+
|
|
4
|
+
const AccordionSummary = styled(AccordionSummary$1, {
|
|
5
|
+
name: "NavigationGroup",
|
|
6
|
+
slot: "Summary",
|
|
7
|
+
shouldForwardProp: (prop) => prop !== "useIcon" && prop !== "level",
|
|
8
|
+
})(({ theme, useIcon, level }) => ({
|
|
9
|
+
[`& .${accordionSummaryClasses.button}`]: {
|
|
10
|
+
padding: theme.spacing(4, 6, 4, (useIcon ? 6 : 8) + (level || 0) * 8),
|
|
11
|
+
[`&.${accordionSummaryClasses.expanded}`]: {
|
|
12
|
+
color: theme.palette.primary.plainColor,
|
|
13
|
+
"--Icon-color": theme.palette.primary.plainColor,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
}));
|
|
17
|
+
const AccordionDetails = styled(AccordionDetails$1, {
|
|
18
|
+
name: "NavigationGroup",
|
|
19
|
+
slot: "Details",
|
|
20
|
+
})(({ theme }) => ({
|
|
21
|
+
"--AccordionDetails-transition": "grid-template-rows 0.2s ease, padding-block 0.2s ease",
|
|
22
|
+
backgroundColor: theme.palette.background.level1,
|
|
23
|
+
}));
|
|
24
|
+
function NavigationGroup(props) {
|
|
25
|
+
// prop destruction
|
|
26
|
+
const { title, children, startDecorator, level, ...rest } = props;
|
|
27
|
+
// lib hooks
|
|
28
|
+
// state, ref, querystring hooks
|
|
29
|
+
// form hooks
|
|
30
|
+
// query hooks
|
|
31
|
+
// calculated values
|
|
32
|
+
// effects
|
|
33
|
+
// handlers
|
|
34
|
+
return (React__default.createElement(Accordion, { ...rest },
|
|
35
|
+
React__default.createElement(AccordionSummary, { useIcon: !!startDecorator, level: level },
|
|
36
|
+
React__default.createElement(Stack, { direction: "row", gap: 4 },
|
|
37
|
+
startDecorator,
|
|
38
|
+
title)),
|
|
39
|
+
React__default.createElement(AccordionDetails, null, children)));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export { NavigationGroup };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { NavigationGroup } from "./NavigationGroup";
|
|
2
|
-
export * from "./NavigationGroup";
|
|
1
|
+
import { NavigationGroup } from "./NavigationGroup.js";
|
|
2
|
+
export * from "./NavigationGroup.js";
|
|
3
3
|
export default NavigationGroup;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { styled, ListItemButton as ListItemButton$1, listItemButtonClasses, ListItem, ListItemDecorator } from '@mui/joy';
|
|
3
|
+
|
|
4
|
+
const ListItemButton = styled(ListItemButton$1, {
|
|
5
|
+
name: "NavigationItem",
|
|
6
|
+
slot: "Button",
|
|
7
|
+
shouldForwardProp: (prop) => prop !== "useIcon" && prop !== "level",
|
|
8
|
+
})(({ theme, useIcon, level }) => ({
|
|
9
|
+
padding: theme.spacing(4, 6, 4, (useIcon ? 6 : 8) + (level || 0) * 8),
|
|
10
|
+
gap: theme.spacing(4),
|
|
11
|
+
fontWeight: 500,
|
|
12
|
+
"&:hover": {
|
|
13
|
+
backgroundColor: theme.palette.neutral.plainHoverBg,
|
|
14
|
+
},
|
|
15
|
+
"&:active": {
|
|
16
|
+
backgroundColor: theme.palette.neutral.plainActiveBg,
|
|
17
|
+
},
|
|
18
|
+
[`&.${listItemButtonClasses.selected}`]: {
|
|
19
|
+
color: theme.palette.primary.plainColor,
|
|
20
|
+
"--Icon-color": theme.palette.primary.plainColor,
|
|
21
|
+
"&:not(:hover):not(:active)": {
|
|
22
|
+
backgroundColor: theme.palette.background.surface,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
}));
|
|
26
|
+
function NavigationItem(props) {
|
|
27
|
+
// prop destruction
|
|
28
|
+
const { children, startDecorator, level, selected, id, onClick, ...rest } = props;
|
|
29
|
+
// lib hooks
|
|
30
|
+
// state, ref, querystring hooks
|
|
31
|
+
// form hooks
|
|
32
|
+
// query hooks
|
|
33
|
+
// calculated values
|
|
34
|
+
// effects
|
|
35
|
+
// handlers
|
|
36
|
+
const handleClick = () => {
|
|
37
|
+
onClick?.(id);
|
|
38
|
+
};
|
|
39
|
+
return (React__default.createElement(ListItem, { ...rest },
|
|
40
|
+
React__default.createElement(ListItemButton, { level: level, useIcon: !!startDecorator, selected: selected, "aria-current": selected, onClick: handleClick },
|
|
41
|
+
startDecorator && React__default.createElement(ListItemDecorator, null, startDecorator),
|
|
42
|
+
children)));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { NavigationItem };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { NavigationItem } from "./NavigationItem";
|
|
2
|
-
export * from "./NavigationItem";
|
|
1
|
+
import { NavigationItem } from "./NavigationItem.js";
|
|
2
|
+
export * from "./NavigationItem.js";
|
|
3
3
|
export default NavigationItem;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { NavigationGroup } from '../NavigationGroup/NavigationGroup.js';
|
|
3
|
+
import { NavigationItem } from '../NavigationItem/NavigationItem.js';
|
|
4
|
+
|
|
5
|
+
function Navigator(props) {
|
|
6
|
+
// prop destruction
|
|
7
|
+
const { items, level = 0, onSelect } = props;
|
|
8
|
+
// lib hooks
|
|
9
|
+
// state, ref, querystring hooks
|
|
10
|
+
// form hooks
|
|
11
|
+
// query hooks
|
|
12
|
+
// calculated values
|
|
13
|
+
// effects
|
|
14
|
+
// handlers
|
|
15
|
+
const handleItemClick = (id) => {
|
|
16
|
+
onSelect?.(id);
|
|
17
|
+
};
|
|
18
|
+
return (React__default.createElement("div", null, items.map((item, index) => {
|
|
19
|
+
if (item.type === "item") {
|
|
20
|
+
return (React__default.createElement(NavigationItem, { key: item.id, id: item.id, startDecorator: item.startDecorator, selected: item.selected, level: level, onClick: handleItemClick }, item.title));
|
|
21
|
+
}
|
|
22
|
+
else if (item.type === "group") {
|
|
23
|
+
return (React__default.createElement(NavigationGroup, { key: index, title: item.title, startDecorator: item.startDecorator, level: level, defaultExpanded: item.expanded }, item.content));
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
})));
|
|
27
|
+
}
|
|
28
|
+
Navigator.displayName = "Navigator";
|
|
29
|
+
|
|
30
|
+
export { Navigator };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Navigator } from
|
|
2
|
-
export * from
|
|
1
|
+
import { Navigator } from "./Navigator.js";
|
|
2
|
+
export * from "./Navigator.js";
|
|
3
3
|
export default Navigator;
|
|
@@ -5,8 +5,8 @@ declare const PaginationRoot: import("@emotion/styled").StyledComponent<Pick<{
|
|
|
5
5
|
spacing?: import("@mui/system").ResponsiveStyleValue<string | number> | undefined;
|
|
6
6
|
divider?: React.ReactNode;
|
|
7
7
|
useFlexGap?: boolean | undefined;
|
|
8
|
-
sx?: import("@mui/joy/styles/types").SxProps | undefined;
|
|
9
|
-
} & import("@mui/joy").StackSlotsAndSlotProps & import("@mui/joy/styles/types").SystemProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
8
|
+
sx?: import("@mui/joy/styles/types/theme.js").SxProps | undefined;
|
|
9
|
+
} & import("@mui/joy").StackSlotsAndSlotProps & import("@mui/joy/styles/types/theme.js").SystemProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
10
10
|
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
11
11
|
}, "children" | "direction" | "sx" | "spacing" | ("p" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "divider" | "useFlexGap" | keyof import("@mui/joy").StackSlotsAndSlotProps>, "style" | "title" | "children" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | "content" | "direction" | "translate" | "ref" | "slot" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "spacing" | ("p" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "divider" | "useFlexGap" | keyof import("@mui/joy").StackSlotsAndSlotProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/joy").Theme>, {}, {}>;
|
|
12
12
|
interface PaginationProps extends React.ComponentProps<typeof PaginationRoot> {
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import React__default, { useCallback, useEffect } from 'react';
|
|
2
|
+
import PreviousIcon from '../../external/@mui/icons-material/esm/ChevronLeft.js';
|
|
3
|
+
import NextIcon from '../../external/@mui/icons-material/esm/ChevronRight.js';
|
|
4
|
+
import { styled, Stack } from '@mui/joy';
|
|
5
|
+
import { Button } from '../Button/Button.js';
|
|
6
|
+
import { IconButton } from '../IconButton/IconButton.js';
|
|
7
|
+
import { useControlledState } from '../../hooks/use-controlled-state/index.js';
|
|
8
|
+
|
|
9
|
+
const PaginationButton = styled(Button, {
|
|
10
|
+
name: "Pagination",
|
|
11
|
+
slot: "button",
|
|
12
|
+
})(({ theme, active, size }) => ({
|
|
13
|
+
"--Button-size": {
|
|
14
|
+
sm: "32px",
|
|
15
|
+
md: "40px",
|
|
16
|
+
lg: "48px",
|
|
17
|
+
}[size],
|
|
18
|
+
width: "var(--Button-size)",
|
|
19
|
+
height: "var(--Button-size)",
|
|
20
|
+
backgroundColor: active
|
|
21
|
+
? theme.vars.palette.primary.softHoverBg
|
|
22
|
+
: "transparent",
|
|
23
|
+
color: active
|
|
24
|
+
? theme.vars.palette.primary.softColor
|
|
25
|
+
: theme.vars.palette.neutral.plainColor,
|
|
26
|
+
"&:hover": {
|
|
27
|
+
color: active
|
|
28
|
+
? theme.vars.palette.primary.softColor
|
|
29
|
+
: theme.vars.palette.neutral.softColor,
|
|
30
|
+
backgroundColor: active
|
|
31
|
+
? theme.vars.palette.primary.softActiveBg
|
|
32
|
+
: theme.vars.palette.neutral.softHoverBg,
|
|
33
|
+
},
|
|
34
|
+
}));
|
|
35
|
+
const PaginationIconButton = styled(IconButton, {
|
|
36
|
+
name: "Pagination",
|
|
37
|
+
slot: "button",
|
|
38
|
+
})(({ theme, size }) => ({
|
|
39
|
+
"--IconButton-size": {
|
|
40
|
+
sm: "32px",
|
|
41
|
+
md: "40px",
|
|
42
|
+
lg: "48px",
|
|
43
|
+
}[size],
|
|
44
|
+
"--Icon-fontSize": "20px",
|
|
45
|
+
width: "var(--IconButton-size)",
|
|
46
|
+
height: "var(--IconButton-size)",
|
|
47
|
+
color: theme.vars.palette.neutral.plainColor,
|
|
48
|
+
"&:hover": {
|
|
49
|
+
color: theme.vars.palette.neutral.softColor,
|
|
50
|
+
backgroundColor: theme.vars.palette.neutral.softHoverBg,
|
|
51
|
+
},
|
|
52
|
+
}));
|
|
53
|
+
const PaginationRoot = styled(Stack, {
|
|
54
|
+
name: "Pagination",
|
|
55
|
+
slot: "root",
|
|
56
|
+
})({});
|
|
57
|
+
const PaginationContainer = styled(Stack, {
|
|
58
|
+
name: "Pagination",
|
|
59
|
+
slot: "container",
|
|
60
|
+
})(({ theme, size }) => ({
|
|
61
|
+
gap: {
|
|
62
|
+
sm: theme.spacing(1),
|
|
63
|
+
md: theme.spacing(1.5),
|
|
64
|
+
lg: theme.spacing(2),
|
|
65
|
+
}[size],
|
|
66
|
+
}));
|
|
67
|
+
function Pagination(props) {
|
|
68
|
+
// prop destruction
|
|
69
|
+
const { paginationModel: _paginationModel, defaultPaginationModel = { page: 1, pageSize: 25 }, onPageChange, rowCount, size = "md", ...innerProps } = props;
|
|
70
|
+
const [paginationModel, setPaginationModel] = useControlledState(_paginationModel, defaultPaginationModel, useCallback((newPage) => {
|
|
71
|
+
onPageChange(newPage.page);
|
|
72
|
+
}, [onPageChange]));
|
|
73
|
+
const handlePageChange = (newPage) => {
|
|
74
|
+
setPaginationModel({ ...paginationModel, page: newPage });
|
|
75
|
+
};
|
|
76
|
+
// lib hooks
|
|
77
|
+
// state, ref, querystring hooks
|
|
78
|
+
// form hooks
|
|
79
|
+
// query hooks
|
|
80
|
+
// calculated values
|
|
81
|
+
const firstPage = 1;
|
|
82
|
+
const lastPage = Math.max(firstPage, Math.ceil(rowCount / paginationModel.pageSize));
|
|
83
|
+
const beforePages = [
|
|
84
|
+
paginationModel.page - 2,
|
|
85
|
+
paginationModel.page - 1,
|
|
86
|
+
].filter((p) => p > 1);
|
|
87
|
+
const afterPages = [
|
|
88
|
+
paginationModel.page + 1,
|
|
89
|
+
paginationModel.page + 2,
|
|
90
|
+
].filter((p) => p <= lastPage - 1);
|
|
91
|
+
const isMoreAfterPages = lastPage > 1 && paginationModel.page < lastPage - 3;
|
|
92
|
+
const isMoreBeforePages = lastPage > 1 && paginationModel.page > 4;
|
|
93
|
+
// Add this effect to handle rowCount changes
|
|
94
|
+
useEffect(() => {
|
|
95
|
+
if (paginationModel.page > lastPage) {
|
|
96
|
+
setPaginationModel({ ...paginationModel, page: lastPage });
|
|
97
|
+
}
|
|
98
|
+
}, [rowCount, paginationModel, lastPage, setPaginationModel]);
|
|
99
|
+
// effects
|
|
100
|
+
// handlers
|
|
101
|
+
return (React__default.createElement(PaginationRoot, { ...innerProps },
|
|
102
|
+
React__default.createElement(PaginationContainer, { direction: "row", size: size, alignItems: "center" },
|
|
103
|
+
React__default.createElement(PaginationIconButton, { size: size, variant: "plain", color: "neutral", onClick: () => handlePageChange(paginationModel.page - 1), disabled: paginationModel.page === firstPage, "aria-label": "Previous page" },
|
|
104
|
+
React__default.createElement(PreviousIcon, null)),
|
|
105
|
+
paginationModel.page !== firstPage && (React__default.createElement(PaginationButton, { size: size, variant: "plain", color: "neutral", onClick: () => handlePageChange(firstPage) }, firstPage)),
|
|
106
|
+
isMoreBeforePages && (React__default.createElement(PaginationButton, { size: size, variant: "plain", color: "neutral", onClick: () => handlePageChange(paginationModel.page - 3), "aria-label": "More previous pages" }, "...")),
|
|
107
|
+
beforePages.map((p) => (React__default.createElement(PaginationButton, { key: p, size: size, variant: "plain", color: "neutral", onClick: () => handlePageChange(p) }, p))),
|
|
108
|
+
React__default.createElement(PaginationButton, { active: true, size: size, "aria-current": "page" }, paginationModel.page),
|
|
109
|
+
afterPages.map((p) => (React__default.createElement(PaginationButton, { key: p, size: size, variant: "plain", color: "neutral", onClick: () => handlePageChange(p) }, p))),
|
|
110
|
+
isMoreAfterPages && (React__default.createElement(PaginationButton, { size: size, variant: "plain", color: "neutral", "aria-label": "More next pages", onClick: () => handlePageChange(paginationModel.page + 3) }, "...")),
|
|
111
|
+
paginationModel.page !== lastPage && (React__default.createElement(PaginationButton, { size: size, variant: "plain", color: "neutral", onClick: () => handlePageChange(lastPage) }, lastPage)),
|
|
112
|
+
React__default.createElement(PaginationIconButton, { size: size, variant: "plain", color: "neutral", onClick: () => handlePageChange(paginationModel.page + 1), disabled: paginationModel.page === lastPage, "aria-label": "Next page" },
|
|
113
|
+
React__default.createElement(NextIcon, null)))));
|
|
114
|
+
}
|
|
115
|
+
Pagination.displayName = "Pagination";
|
|
116
|
+
|
|
117
|
+
export { Pagination };
|