@pautena/react-design-system 0.21.0 → 1.0.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/README.md +11 -0
- package/dist/Autocomplete/Autocomplete.d.ts +99 -0
- package/dist/Autocomplete/Autocomplete.mjs +47 -0
- package/dist/Autocomplete/Autocomplete.mjs.map +1 -0
- package/dist/Autocomplete/index.d.ts +2 -0
- package/dist/{board/board.d.ts → Board/Board.d.ts} +8 -4
- package/dist/Board/Board.mjs +60 -0
- package/dist/Board/Board.mjs.map +1 -0
- package/dist/Board/index.d.ts +2 -0
- package/dist/BootstrapDialog/BootstrapDialog.d.ts +31 -0
- package/dist/BootstrapDialog/BootstrapDialog.mjs +128 -0
- package/dist/BootstrapDialog/BootstrapDialog.mjs.map +1 -0
- package/dist/BootstrapDialog/index.d.ts +2 -0
- package/dist/{bullet/bullet.d.ts → Bullet/Bullet.d.ts} +5 -1
- package/dist/Bullet/Bullet.mjs +24 -0
- package/dist/Bullet/Bullet.mjs.map +1 -0
- package/dist/Bullet/index.d.ts +2 -0
- package/dist/{confirm-dialog/confirm-dialog.d.ts → ConfirmDialog/ConfirmDialog.d.ts} +8 -3
- package/dist/ConfirmDialog/ConfirmDialog.mjs +54 -0
- package/dist/ConfirmDialog/ConfirmDialog.mjs.map +1 -0
- package/dist/ConfirmDialog/index.d.ts +2 -0
- package/dist/Content/Content.d.ts +6 -0
- package/dist/Content/Content.mjs +10 -0
- package/dist/Content/Content.mjs.map +1 -0
- package/dist/Content/Content.types.d.ts +18 -0
- package/dist/Content/index.d.ts +3 -0
- package/dist/ContentPlaceholder/ContentPlaceholder.d.ts +22 -0
- package/dist/ContentPlaceholder/ContentPlaceholder.mjs +26 -0
- package/dist/ContentPlaceholder/ContentPlaceholder.mjs.map +1 -0
- package/dist/ContentPlaceholder/index.d.ts +2 -0
- package/dist/{date-range-calendar/date-range-calendar.d.ts → DateRangeCalendar/DateRangeCalendar.d.ts} +2 -2
- package/dist/DateRangeCalendar/DateRangeCalendar.mjs +79 -0
- package/dist/DateRangeCalendar/DateRangeCalendar.mjs.map +1 -0
- package/dist/DateRangeCalendar/index.d.ts +2 -0
- package/dist/{date-range-picker/date-range-picker.d.ts → DateRangePicker/DateRangePicker.d.ts} +2 -2
- package/dist/DateRangePicker/DateRangePicker.mjs +55 -0
- package/dist/DateRangePicker/DateRangePicker.mjs.map +1 -0
- package/dist/DateRangePicker/index.d.ts +2 -0
- package/dist/Dialog/Dialog.types.d.ts +230 -0
- package/dist/Dialog/UseDialog.mjs +9 -0
- package/dist/Dialog/UseDialog.mjs.map +1 -0
- package/dist/Dialog/index.d.ts +2 -0
- package/dist/Drawerx/Drawer/Drawer.d.ts +10 -0
- package/dist/Drawerx/Drawer/Drawer.mjs +71 -0
- package/dist/Drawerx/Drawer/Drawer.mjs.map +1 -0
- package/dist/{drawerx/drawer/drawer.mock.d.ts → Drawerx/Drawer/Drawer.mock.d.ts} +1 -1
- package/dist/Drawerx/Drawer/index.d.ts +1 -0
- package/dist/{drawerx/drawer.types.d.ts → Drawerx/Drawer.types.d.ts} +119 -3
- package/dist/Drawerx/Drawer.types.mjs +8 -0
- package/dist/Drawerx/Drawer.types.mjs.map +1 -0
- package/dist/{drawerx/drawer-app-bar/drawer-app-bar.d.ts → Drawerx/DrawerAppBar/DrawerAppBar.d.ts} +1 -1
- package/dist/Drawerx/DrawerAppBar/DrawerAppBar.mjs +93 -0
- package/dist/Drawerx/DrawerAppBar/DrawerAppBar.mjs.map +1 -0
- package/dist/Drawerx/DrawerAppBar/index.d.ts +2 -0
- package/dist/Drawerx/DrawerContent/DrawerContent.d.ts +5 -0
- package/dist/Drawerx/DrawerContent/DrawerContent.mjs +35 -0
- package/dist/Drawerx/DrawerContent/DrawerContent.mjs.map +1 -0
- package/dist/Drawerx/DrawerContent/index.d.ts +1 -0
- package/dist/Drawerx/DrawerContext/Drawer.provider.d.ts +45 -0
- package/dist/Drawerx/DrawerContext/Drawer.provider.mjs +54 -0
- package/dist/Drawerx/DrawerContext/Drawer.provider.mjs.map +1 -0
- package/dist/{drawerx/drawer-context/drawer-context.d.ts → Drawerx/DrawerContext/DrawerContext.d.ts} +1 -1
- package/dist/Drawerx/DrawerContext/DrawerContext.mjs +17 -0
- package/dist/Drawerx/DrawerContext/DrawerContext.mjs.map +1 -0
- package/dist/Drawerx/DrawerContext/DrawerMixins.mjs +27 -0
- package/dist/Drawerx/DrawerContext/DrawerMixins.mjs.map +1 -0
- package/dist/Drawerx/DrawerContext/index.d.ts +2 -0
- package/dist/{drawerx/drawer-item/drawer-item.d.ts → Drawerx/DrawerItem/DrawerItem.d.ts} +2 -2
- package/dist/Drawerx/DrawerItem/DrawerItem.mjs +43 -0
- package/dist/Drawerx/DrawerItem/DrawerItem.mjs.map +1 -0
- package/dist/{drawerx/drawer-item/drawer-item-link.d.ts → Drawerx/DrawerItem/DrawerItemLink.d.ts} +1 -1
- package/dist/Drawerx/DrawerItem/DrawerItemLink.mjs +98 -0
- package/dist/Drawerx/DrawerItem/DrawerItemLink.mjs.map +1 -0
- package/dist/{drawerx/drawer-item/drawer-menu-item.d.ts → Drawerx/DrawerItem/DrawerMenuItem.d.ts} +1 -1
- package/dist/Drawerx/DrawerItem/DrawerMenuItem.mjs +115 -0
- package/dist/Drawerx/DrawerItem/DrawerMenuItem.mjs.map +1 -0
- package/dist/Drawerx/DrawerItem/index.d.ts +4 -0
- package/dist/{drawerx/drawer-layout/drawer-layout.d.ts → Drawerx/DrawerLayout/DrawerLayout.d.ts} +4 -4
- package/dist/Drawerx/DrawerLayout/DrawerLayout.mjs +39 -0
- package/dist/Drawerx/DrawerLayout/DrawerLayout.mjs.map +1 -0
- package/dist/Drawerx/DrawerLayout/index.d.ts +2 -0
- package/dist/Drawerx/DrawerMain/DrawerMain.d.ts +3 -0
- package/dist/Drawerx/DrawerMain/DrawerMain.mjs +28 -0
- package/dist/Drawerx/DrawerMain/DrawerMain.mjs.map +1 -0
- package/dist/Drawerx/DrawerMain/index.d.ts +2 -0
- package/dist/{drawerx/drawer-subheader/drawer-subheader.d.ts → Drawerx/DrawerSubheader/DrawerSubheader.d.ts} +1 -1
- package/dist/Drawerx/DrawerSubheader/DrawerSubheader.mjs +22 -0
- package/dist/Drawerx/DrawerSubheader/DrawerSubheader.mjs.map +1 -0
- package/dist/Drawerx/DrawerSubheader/index.d.ts +2 -0
- package/dist/Drawerx/index.d.ts +10 -0
- package/dist/ExpandableAlert/ExpandableAlert.d.ts +45 -0
- package/dist/ExpandableAlert/ExpandableAlert.mjs +60 -0
- package/dist/ExpandableAlert/ExpandableAlert.mjs.map +1 -0
- package/dist/ExpandableAlert/index.d.ts +2 -0
- package/dist/{form-dialog/form-dialog.d.ts → FormDialog/FormDialog.d.ts} +5 -3
- package/dist/FormDialog/FormDialog.mjs +44 -0
- package/dist/FormDialog/FormDialog.mjs.map +1 -0
- package/dist/FormDialog/index.d.ts +2 -0
- package/dist/{group-value-card/group-value-card.d.ts → GroupValueCard/GroupValueCard.d.ts} +3 -2
- package/dist/GroupValueCard/GroupValueCard.mjs +74 -0
- package/dist/GroupValueCard/GroupValueCard.mjs.map +1 -0
- package/dist/GroupValueCard/GroupValueCard.mock.d.ts +2 -0
- package/dist/GroupValueCard/index.d.ts +2 -0
- package/dist/Header/Header.d.ts +40 -0
- package/dist/{header/header.dummy.d.ts → Header/Header.dummy.d.ts} +1 -1
- package/dist/Header/Header.mjs +179 -0
- package/dist/Header/Header.mjs.map +1 -0
- package/dist/Header/Header.types.d.ts +274 -0
- package/dist/Header/header-title.d.ts +34 -0
- package/dist/Header/header-title.mjs +31 -0
- package/dist/Header/header-title.mjs.map +1 -0
- package/dist/Header/index.d.ts +3 -0
- package/dist/{header-layout/header-layout.d.ts → HeaderLayout/HeaderLayout.d.ts} +12 -7
- package/dist/HeaderLayout/HeaderLayout.mjs +54 -0
- package/dist/HeaderLayout/HeaderLayout.mjs.map +1 -0
- package/dist/HeaderLayout/index.d.ts +2 -0
- package/dist/{label/label.d.ts → Label/Label.d.ts} +5 -1
- package/dist/Label/Label.mjs +61 -0
- package/dist/Label/Label.mjs.map +1 -0
- package/dist/Label/index.d.ts +2 -0
- package/dist/ListPanel/ListPanel.context.mjs +8 -0
- package/dist/ListPanel/ListPanel.context.mjs.map +1 -0
- package/dist/{list-panel/list-panel.d.ts → ListPanel/ListPanel.d.ts} +8 -4
- package/dist/ListPanel/ListPanel.mjs +75 -0
- package/dist/ListPanel/ListPanel.mjs.map +1 -0
- package/dist/{list-panel/list-panel.mocks.d.ts → ListPanel/ListPanel.mocks.d.ts} +1 -1
- package/dist/ListPanel/ListPanelPanel.d.ts +17 -0
- package/dist/ListPanel/index.d.ts +3 -0
- package/dist/Markdown/Markdown.mjs +31 -0
- package/dist/Markdown/Markdown.mjs.map +1 -0
- package/dist/Markdown/index.d.ts +1 -0
- package/dist/NotificationCenter/NotificationCenter.context.mjs +15 -0
- package/dist/NotificationCenter/NotificationCenter.context.mjs.map +1 -0
- package/dist/{notification-center/notification-center.hooks.d.ts → NotificationCenter/NotificationCenter.hooks.d.ts} +1 -1
- package/dist/NotificationCenter/NotificationCenter.hooks.mjs +12 -0
- package/dist/NotificationCenter/NotificationCenter.hooks.mjs.map +1 -0
- package/dist/NotificationCenter/NotificationCenter.provider.d.ts +15 -0
- package/dist/NotificationCenter/NotificationCenter.provider.mjs +56 -0
- package/dist/NotificationCenter/NotificationCenter.provider.mjs.map +1 -0
- package/dist/NotificationCenter/index.d.ts +3 -0
- package/dist/Placeholder/Placeholder.d.ts +73 -0
- package/dist/Placeholder/Placeholder.mjs +53 -0
- package/dist/Placeholder/Placeholder.mjs.map +1 -0
- package/dist/{placeholder/placeholder.mock.d.ts → Placeholder/Placeholder.mock.d.ts} +1 -1
- package/dist/Placeholder/index.d.ts +2 -0
- package/dist/{query-container/query-container.d.ts → QueryContainer/QueryContainer.d.ts} +7 -3
- package/dist/QueryContainer/index.d.ts +2 -0
- package/dist/{remote-data-table/remote-data-table.d.ts → RemoteDataTable/RemoteDataTable.d.ts} +4 -3
- package/dist/RemoteDataTable/RemoteDataTable.mjs +57 -0
- package/dist/RemoteDataTable/RemoteDataTable.mjs.map +1 -0
- package/dist/{remote-data-table/remote-data-table.mocks.d.ts → RemoteDataTable/RemoteDataTable.mocks.d.ts} +1 -1
- package/dist/RemoteDataTable/RemoteDataTable.types.d.ts +189 -0
- package/dist/{remote-data-table/remote-data-table-body.d.ts → RemoteDataTable/RemoteDataTableBody.d.ts} +1 -1
- package/dist/RemoteDataTable/RemoteDataTableBody.mjs +87 -0
- package/dist/RemoteDataTable/RemoteDataTableBody.mjs.map +1 -0
- package/dist/{remote-data-table/remote-data-table-pagination.d.ts → RemoteDataTable/RemoteDataTablePagination.d.ts} +1 -1
- package/dist/RemoteDataTable/RemoteDataTablePagination.mjs +33 -0
- package/dist/RemoteDataTable/RemoteDataTablePagination.mjs.map +1 -0
- package/dist/{remote-data-table/remote-data-table-query-builder.d.ts → RemoteDataTable/RemoteDataTableQueryBuilder.d.ts} +1 -1
- package/dist/RemoteDataTable/RemoteDataTableQueryBuilder.mjs +296 -0
- package/dist/RemoteDataTable/RemoteDataTableQueryBuilder.mjs.map +1 -0
- package/dist/RemoteDataTable/index.d.ts +3 -0
- package/dist/{remote-data-table → RemoteDataTable}/query-spec-utils.d.ts +1 -1
- package/dist/RemoteDataTable/query-spec-utils.mjs +74 -0
- package/dist/RemoteDataTable/query-spec-utils.mjs.map +1 -0
- package/dist/{remote-data-table → RemoteDataTable}/use-remote-data-table.d.ts +1 -1
- package/dist/RemoteDataTable/use-remote-data-table.mjs +40 -0
- package/dist/RemoteDataTable/use-remote-data-table.mjs.map +1 -0
- package/dist/Select/Select.d.ts +147 -0
- package/dist/Select/Select.mjs +103 -0
- package/dist/Select/Select.mjs.map +1 -0
- package/dist/Select/index.d.ts +2 -0
- package/dist/{skeleton-card/skeleton-card.d.ts → SkeletonCard/SkeletonCard.d.ts} +2 -1
- package/dist/SkeletonCard/SkeletonCard.mjs +34 -0
- package/dist/SkeletonCard/SkeletonCard.mjs.map +1 -0
- package/dist/SkeletonCard/index.d.ts +2 -0
- package/dist/{skeleton-grid/skeleton-grid.d.ts → SkeletonGrid/SkeletonGrid.d.ts} +2 -1
- package/dist/SkeletonGrid/SkeletonGrid.mjs +13 -0
- package/dist/SkeletonGrid/SkeletonGrid.mjs.map +1 -0
- package/dist/SkeletonGrid/index.d.ts +2 -0
- package/dist/TabCard/TabCard.context.mjs +7 -0
- package/dist/TabCard/TabCard.context.mjs.map +1 -0
- package/dist/TabCard/TabCard.d.ts +43 -0
- package/dist/{tab-card/tab-card.dummy.d.ts → TabCard/TabCard.dummy.d.ts} +1 -1
- package/dist/TabCard/TabCard.mjs +68 -0
- package/dist/TabCard/TabCard.mjs.map +1 -0
- package/dist/TabCard/TabCardPanel.d.ts +22 -0
- package/dist/TabCard/index.d.ts +3 -0
- package/dist/TabPanel/TabPanel.d.ts +18 -0
- package/dist/TabPanel/TabPanel.mjs +22 -0
- package/dist/TabPanel/TabPanel.mjs.map +1 -0
- package/dist/TabPanel/index.d.ts +1 -0
- package/dist/TabProvider/TabProvider.context.mjs +8 -0
- package/dist/TabProvider/TabProvider.context.mjs.map +1 -0
- package/dist/TabProvider/TabProvider.provider.mjs +14 -0
- package/dist/TabProvider/TabProvider.provider.mjs.map +1 -0
- package/dist/TabProvider/index.d.ts +2 -0
- package/dist/TextField/TextField.d.ts +127 -0
- package/dist/TextField/TextField.mjs +115 -0
- package/dist/TextField/TextField.mjs.map +1 -0
- package/dist/TextField/index.d.ts +2 -0
- package/dist/{value-base/value-displays.types.d.ts → ValueBase/ValueDisplays.types.d.ts} +0 -10
- package/dist/ValueBase/ValueDisplays.types.mjs +5 -0
- package/dist/ValueBase/ValueDisplays.types.mjs.map +1 -0
- package/dist/ValueBase/index.d.ts +1 -0
- package/dist/ValueBoolean/ValueBoolean.d.ts +12 -0
- package/dist/ValueBoolean/ValueBoolean.mjs +34 -0
- package/dist/ValueBoolean/ValueBoolean.mjs.map +1 -0
- package/dist/ValueBoolean/index.d.ts +2 -0
- package/dist/ValueCard/ValueCard.d.ts +14 -0
- package/dist/ValueCard/ValueCard.mjs +10 -0
- package/dist/ValueCard/ValueCard.mjs.map +1 -0
- package/dist/ValueCard/index.d.ts +2 -0
- package/dist/{value-content/value-content.d.ts → ValueContent/ValueContent.d.ts} +5 -5
- package/dist/ValueContent/ValueContent.mjs +35 -0
- package/dist/ValueContent/ValueContent.mjs.map +1 -0
- package/dist/ValueContent/index.d.ts +2 -0
- package/dist/ValueDatetime/ValueDatetime.d.ts +15 -0
- package/dist/ValueDatetime/ValueDatetime.mjs +30 -0
- package/dist/ValueDatetime/ValueDatetime.mjs.map +1 -0
- package/dist/ValueDatetime/index.d.ts +2 -0
- package/dist/ValueImage/ValueImage.d.ts +15 -0
- package/dist/ValueImage/ValueImage.mjs +26 -0
- package/dist/ValueImage/ValueImage.mjs.map +1 -0
- package/dist/ValueImage/index.d.ts +2 -0
- package/dist/ValueItem/ValueItem.d.ts +33 -0
- package/dist/ValueItem/ValueItem.mjs +36 -0
- package/dist/ValueItem/ValueItem.mjs.map +1 -0
- package/dist/ValueItem/index.d.ts +2 -0
- package/dist/ValueLabel/ValueLabel.d.ts +22 -0
- package/dist/ValueLabel/ValueLabel.mjs +35 -0
- package/dist/ValueLabel/ValueLabel.mjs.map +1 -0
- package/dist/ValueLabel/index.d.ts +2 -0
- package/dist/ValueRating/ValueRating.d.ts +18 -0
- package/dist/ValueRating/ValueRating.mjs +26 -0
- package/dist/ValueRating/ValueRating.mjs.map +1 -0
- package/dist/ValueRating/index.d.ts +2 -0
- package/dist/ValueText/ValueText.d.ts +12 -0
- package/dist/ValueText/ValueText.mjs +19 -0
- package/dist/ValueText/ValueText.mjs.map +1 -0
- package/dist/ValueText/index.d.ts +2 -0
- package/dist/index.d.ts +73 -48
- package/dist/index.mjs +139 -0
- package/dist/index.mjs.map +1 -0
- package/dist/tests/actions.d.ts +6 -0
- package/dist/tests/actions.mjs +38 -0
- package/dist/tests/actions.mjs.map +1 -0
- package/dist/tests/assertions.d.ts +24 -0
- package/dist/tests/assertions.mjs +39 -0
- package/dist/tests/assertions.mjs.map +1 -0
- package/dist/tests/file-mock.d.ts +2 -0
- package/dist/tests/index.d.ts +2 -0
- package/dist/tests/index.mjs +23 -0
- package/dist/tests/index.mjs.map +1 -0
- package/dist/tests/mocks/markdown.mock.d.ts +1 -0
- package/dist/tests/mocks.d.ts +3 -0
- package/dist/tests/table-placeholder/TablePlaceholder.d.ts +1 -0
- package/dist/tests/table-placeholder/index.d.ts +1 -0
- package/dist/tests/testing-library.d.ts +106 -0
- package/dist/tests/testing-library.mjs +31 -0
- package/dist/tests/testing-library.mjs.map +1 -0
- package/dist/utils/arrays.mjs +9 -0
- package/dist/utils/arrays.mjs.map +1 -0
- package/dist/utils/breakpoints.mjs +33 -0
- package/dist/utils/breakpoints.mjs.map +1 -0
- package/dist/utils/forms.mjs +10 -0
- package/dist/utils/forms.mjs.map +1 -0
- package/dist/utils/theme.mjs +12 -0
- package/dist/utils/theme.mjs.map +1 -0
- package/package.json +45 -36
- package/dist/action/action-header.d.ts +0 -9
- package/dist/action/action.d.ts +0 -61
- package/dist/action/index.d.ts +0 -2
- package/dist/autocomplete/autocomplete.d.ts +0 -39
- package/dist/autocomplete/index.d.ts +0 -1
- package/dist/board/index.d.ts +0 -1
- package/dist/bootstrap-dialog/bootstrap-dialog.d.ts +0 -5
- package/dist/bootstrap-dialog/index.d.ts +0 -1
- package/dist/bullet/index.d.ts +0 -1
- package/dist/center-container/center-container.d.ts +0 -25
- package/dist/center-container/index.d.ts +0 -1
- package/dist/confirm-dialog/index.d.ts +0 -1
- package/dist/content/content.d.ts +0 -5
- package/dist/content/content.types.d.ts +0 -4
- package/dist/content/index.d.ts +0 -2
- package/dist/content-placeholder/content-placeholder.d.ts +0 -18
- package/dist/content-placeholder/index.d.ts +0 -1
- package/dist/date-range-calendar/index.d.ts +0 -1
- package/dist/date-range-picker/index.d.ts +0 -1
- package/dist/dialog/dialog.types.d.ts +0 -99
- package/dist/dialog/index.d.ts +0 -2
- package/dist/drawerx/drawer/drawer.d.ts +0 -7
- package/dist/drawerx/drawer/index.d.ts +0 -1
- package/dist/drawerx/drawer-app-bar/index.d.ts +0 -1
- package/dist/drawerx/drawer-content/drawer-content.d.ts +0 -5
- package/dist/drawerx/drawer-content/index.d.ts +0 -1
- package/dist/drawerx/drawer-context/drawer.provider.d.ts +0 -17
- package/dist/drawerx/drawer-context/index.d.ts +0 -2
- package/dist/drawerx/drawer-item/index.d.ts +0 -3
- package/dist/drawerx/drawer-layout/index.d.ts +0 -1
- package/dist/drawerx/drawer-main/drawer-main.d.ts +0 -3
- package/dist/drawerx/drawer-main/index.d.ts +0 -1
- package/dist/drawerx/drawer-subheader/index.d.ts +0 -1
- package/dist/drawerx/index.d.ts +0 -7
- package/dist/enhanced-remote-table/enhanced-remote-table.d.ts +0 -46
- package/dist/enhanced-remote-table/enhanced-remote-table.mock.d.ts +0 -11
- package/dist/enhanced-remote-table/index.d.ts +0 -1
- package/dist/enhanced-table/enhanced-table-head.d.ts +0 -16
- package/dist/enhanced-table/enhanced-table.d.ts +0 -47
- package/dist/enhanced-table/enhanced-table.mock.d.ts +0 -16
- package/dist/enhanced-table/index.d.ts +0 -2
- package/dist/expandable-alert/expandable-alert.d.ts +0 -14
- package/dist/expandable-alert/index.d.ts +0 -1
- package/dist/form-dialog/index.d.ts +0 -1
- package/dist/generators/generators.mock.d.ts +0 -30
- package/dist/generators/generators.model.d.ts +0 -92
- package/dist/generators/index.d.ts +0 -1
- package/dist/group-value-card/group-value-card.mock.d.ts +0 -4
- package/dist/group-value-card/index.d.ts +0 -1
- package/dist/header/header-title.d.ts +0 -9
- package/dist/header/header.d.ts +0 -6
- package/dist/header/header.types.d.ts +0 -88
- package/dist/header/index.d.ts +0 -3
- package/dist/header-layout/index.d.ts +0 -1
- package/dist/index.cjs.js +0 -281
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.es.js +0 -49140
- package/dist/index.es.js.map +0 -1
- package/dist/label/index.d.ts +0 -1
- package/dist/link-card/index.d.ts +0 -1
- package/dist/link-card/link-card.d.ts +0 -11
- package/dist/list-panel/index.d.ts +0 -2
- package/dist/list-panel/list-panel-panel.d.ts +0 -5
- package/dist/loading-area/index.d.ts +0 -1
- package/dist/loading-area/loading-area.d.ts +0 -4
- package/dist/markdown/index.d.ts +0 -1
- package/dist/model-form/index.d.ts +0 -1
- package/dist/model-form/model-form-field.d.ts +0 -10
- package/dist/model-form/model-form.d.ts +0 -14
- package/dist/notification-center/index.d.ts +0 -3
- package/dist/notification-center/notification-center.provider.d.ts +0 -5
- package/dist/object-details/index.d.ts +0 -1
- package/dist/object-details/object-details.d.ts +0 -11
- package/dist/placeholder/index.d.ts +0 -1
- package/dist/placeholder/placeholder.d.ts +0 -22
- package/dist/query-container/index.d.ts +0 -1
- package/dist/remote-data-table/index.d.ts +0 -2
- package/dist/remote-data-table/remote-data-table.types.d.ts +0 -52
- package/dist/search-input/index.d.ts +0 -1
- package/dist/search-input/search-input.d.ts +0 -60
- package/dist/select/index.d.ts +0 -1
- package/dist/select/select.d.ts +0 -57
- package/dist/skeleton-card/index.d.ts +0 -1
- package/dist/skeleton-grid/index.d.ts +0 -1
- package/dist/tab-card/index.d.ts +0 -2
- package/dist/tab-card/tab-card-panel.d.ts +0 -7
- package/dist/tab-card/tab-card.d.ts +0 -11
- package/dist/tab-panel/index.d.ts +0 -1
- package/dist/tab-panel/tab-panel.d.ts +0 -6
- package/dist/tab-provider/index.d.ts +0 -2
- package/dist/table-list/index.d.ts +0 -1
- package/dist/table-list/table-list.d.ts +0 -21
- package/dist/text-field/index.d.ts +0 -1
- package/dist/text-field/text-field.d.ts +0 -25
- package/dist/value-base/index.d.ts +0 -2
- package/dist/value-base/value-edit.d.ts +0 -23
- package/dist/value-boolean/index.d.ts +0 -1
- package/dist/value-boolean/value-boolean.d.ts +0 -6
- package/dist/value-card/index.d.ts +0 -1
- package/dist/value-card/value-card.d.ts +0 -6
- package/dist/value-content/index.d.ts +0 -1
- package/dist/value-datetime/index.d.ts +0 -1
- package/dist/value-datetime/value-datetime.d.ts +0 -16
- package/dist/value-image/index.d.ts +0 -1
- package/dist/value-image/value-image.d.ts +0 -11
- package/dist/value-item/index.d.ts +0 -1
- package/dist/value-item/value-item.d.ts +0 -16
- package/dist/value-label/index.d.ts +0 -1
- package/dist/value-label/value-label.d.ts +0 -10
- package/dist/value-rating/index.d.ts +0 -1
- package/dist/value-rating/value-rating.d.ts +0 -8
- package/dist/value-text/index.d.ts +0 -1
- package/dist/value-text/value-text.d.ts +0 -6
- /package/dist/{dialog/use-dialog.d.ts → Dialog/UseDialog.d.ts} +0 -0
- /package/dist/{drawerx/drawer-context/drawer-mixins.d.ts → Drawerx/DrawerContext/DrawerMixins.d.ts} +0 -0
- /package/dist/{list-panel/list-panel.context.d.ts → ListPanel/ListPanel.context.d.ts} +0 -0
- /package/dist/{markdown/markdown.d.ts → Markdown/Markdown.d.ts} +0 -0
- /package/dist/{notification-center/notification-center.context.d.ts → NotificationCenter/NotificationCenter.context.d.ts} +0 -0
- /package/dist/{tab-card/tab-card.context.d.ts → TabCard/TabCard.context.d.ts} +0 -0
- /package/dist/{tab-provider/tab-provider.context.d.ts → TabProvider/TabProvider.context.d.ts} +0 -0
- /package/dist/{tab-provider/tab-provider.provider.d.ts → TabProvider/TabProvider.provider.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -6,6 +6,17 @@
|
|
|
6
6
|
|
|
7
7
|
My custom design system on top of [MUI](https://mui.com/material-ui/), with a bunch of components to be able to fast prototype new pages and products
|
|
8
8
|
|
|
9
|
+
## ⚠️ Important Notice
|
|
10
|
+
|
|
11
|
+
**This is a personal design system** built for my own projects and experimentation.
|
|
12
|
+
|
|
13
|
+
- **Breaking changes are expected** and may occur at any time without notice
|
|
14
|
+
- **Not recommended for production use** in external projects
|
|
15
|
+
- **Best used as a reference**: Study the patterns, component structure, and testing approaches to build your own design system
|
|
16
|
+
- API stability is not guaranteed between versions
|
|
17
|
+
|
|
18
|
+
If you choose to use this library, I strongly recommend forking it or using it as inspiration for your own custom design system rather than depending on it directly.
|
|
19
|
+
|
|
9
20
|
## Installation
|
|
10
21
|
|
|
11
22
|
This project is available as an [npm package](https://www.npmjs.com/package/@pautena/react-design-system).
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { AutocompleteProps as MuiAutocompleteProps } from '@mui/material/Autocomplete';
|
|
2
|
+
import { ChipTypeMap } from '@mui/material/Chip';
|
|
3
|
+
import { TextFieldProps } from '@mui/material/TextField';
|
|
4
|
+
import { default as React, JSXElementConstructor } from 'react';
|
|
5
|
+
/**
|
|
6
|
+
* Interface representing the slots for the Autocomplete component.
|
|
7
|
+
*/
|
|
8
|
+
export interface AutocompleteSlots {
|
|
9
|
+
/**
|
|
10
|
+
* Root autocomplete component
|
|
11
|
+
*/
|
|
12
|
+
autocomplete?: JSXElementConstructor<MuiAutocompleteProps<any, any, any, any>>;
|
|
13
|
+
/**
|
|
14
|
+
* Text field component for input rendering
|
|
15
|
+
*/
|
|
16
|
+
textField?: JSXElementConstructor<TextFieldProps>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Interface representing the slot properties for the Autocomplete component.
|
|
20
|
+
*/
|
|
21
|
+
export interface AutocompleteSlotProps {
|
|
22
|
+
/**
|
|
23
|
+
* Props for the autocomplete component (onChange is managed by the component)
|
|
24
|
+
*/
|
|
25
|
+
autocomplete?: Partial<Omit<MuiAutocompleteProps<any, any, any, any>, "onChange" | "renderInput">>;
|
|
26
|
+
/**
|
|
27
|
+
* Props for the text field
|
|
28
|
+
*/
|
|
29
|
+
textField?: Partial<TextFieldProps>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Props for the Autocomplete component.
|
|
33
|
+
*
|
|
34
|
+
* @template T - The type of the options
|
|
35
|
+
* @template Multiple - Whether multiple selection is enabled
|
|
36
|
+
* @template DisableClearable - Whether the clear button is disabled
|
|
37
|
+
* @template FreeSolo - Whether free solo input is allowed
|
|
38
|
+
* @template ChipComponent - The component type for chips (when multiple selection is enabled)
|
|
39
|
+
*/
|
|
40
|
+
export interface AutocompleteProps<T, Multiple extends boolean | undefined, DisableClearable extends boolean | undefined, FreeSolo extends boolean | undefined, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"]> extends Omit<MuiAutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent>, "renderInput" | "onChange" | "color" | "slots" | "slotProps"> {
|
|
41
|
+
/**
|
|
42
|
+
* The label for the autocomplete input.
|
|
43
|
+
*/
|
|
44
|
+
label: string;
|
|
45
|
+
/**
|
|
46
|
+
* Optional helper text to display below the input.
|
|
47
|
+
*/
|
|
48
|
+
helperText?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Optional color for the autocomplete component.
|
|
51
|
+
*/
|
|
52
|
+
color?: string;
|
|
53
|
+
/**
|
|
54
|
+
* If `true`, indicates that data is being fetched.
|
|
55
|
+
*/
|
|
56
|
+
fetching?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Optional callback function that is called when the value changes.
|
|
59
|
+
*/
|
|
60
|
+
onChangeValue?: (value: T) => void;
|
|
61
|
+
/**
|
|
62
|
+
* Optional slots for custom rendering
|
|
63
|
+
*/
|
|
64
|
+
slots?: AutocompleteSlots;
|
|
65
|
+
/**
|
|
66
|
+
* Optional props for the slots
|
|
67
|
+
*/
|
|
68
|
+
slotProps?: AutocompleteSlotProps;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Autocomplete component that wraps the MUI Autocomplete component with additional props.
|
|
72
|
+
*
|
|
73
|
+
* Supports extensive customization through slots and slotProps.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```tsx
|
|
77
|
+
* // Basic usage
|
|
78
|
+
* <Autocomplete
|
|
79
|
+
* label="Country"
|
|
80
|
+
* options={countries}
|
|
81
|
+
* onChangeValue={handleChange}
|
|
82
|
+
* />
|
|
83
|
+
*
|
|
84
|
+
* // With slot customization
|
|
85
|
+
* <Autocomplete
|
|
86
|
+
* label="Country"
|
|
87
|
+
* options={countries}
|
|
88
|
+
* slots={{
|
|
89
|
+
* textField: CustomTextField
|
|
90
|
+
* }}
|
|
91
|
+
* slotProps={{
|
|
92
|
+
* autocomplete: { size: "small" },
|
|
93
|
+
* textField: { variant: "filled" }
|
|
94
|
+
* }}
|
|
95
|
+
* />
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
export declare function Autocomplete<T, Multiple extends boolean | undefined, DisableClearable extends boolean | undefined, FreeSolo extends boolean | undefined, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"]>(props: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent>): import("react/jsx-runtime").JSX.Element;
|
|
99
|
+
export default Autocomplete;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import C from "@mui/material/Autocomplete";
|
|
3
|
+
import { TextField as F } from "../TextField/TextField.mjs";
|
|
4
|
+
function j(i) {
|
|
5
|
+
const {
|
|
6
|
+
label: p,
|
|
7
|
+
loading: t,
|
|
8
|
+
fetching: o,
|
|
9
|
+
options: s,
|
|
10
|
+
helperText: u,
|
|
11
|
+
color: c,
|
|
12
|
+
onChangeValue: m = () => null,
|
|
13
|
+
sx: a,
|
|
14
|
+
slots: e,
|
|
15
|
+
slotProps: l,
|
|
16
|
+
...d
|
|
17
|
+
} = i, x = t || o, f = e?.autocomplete ?? C, g = e?.textField ?? F;
|
|
18
|
+
return /* @__PURE__ */ r(
|
|
19
|
+
f,
|
|
20
|
+
{
|
|
21
|
+
...l?.autocomplete,
|
|
22
|
+
loading: x,
|
|
23
|
+
options: o ? [] : s,
|
|
24
|
+
onChange: (n, h) => m(h),
|
|
25
|
+
...d,
|
|
26
|
+
renderInput: (n) => /* @__PURE__ */ r(
|
|
27
|
+
g,
|
|
28
|
+
{
|
|
29
|
+
...n,
|
|
30
|
+
label: p,
|
|
31
|
+
fullWidth: !0,
|
|
32
|
+
fetching: o,
|
|
33
|
+
loading: t,
|
|
34
|
+
hexColor: c,
|
|
35
|
+
helperText: u,
|
|
36
|
+
...l?.textField
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
sx: a
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
j as Autocomplete,
|
|
45
|
+
j as default
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=Autocomplete.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Autocomplete.mjs","sources":["../../src/Autocomplete/Autocomplete.tsx"],"sourcesContent":["import MuiAutocomplete, {\n type AutocompleteProps as MuiAutocompleteProps,\n} from \"@mui/material/Autocomplete\";\nimport type { ChipTypeMap } from \"@mui/material/Chip\";\nimport type { TextFieldProps } from \"@mui/material/TextField\";\nimport type React from \"react\";\nimport type { JSXElementConstructor } from \"react\";\nimport TextField from \"../TextField\";\n\n/**\n * Interface representing the slots for the Autocomplete component.\n */\nexport interface AutocompleteSlots {\n /**\n * Root autocomplete component\n */\n autocomplete?: JSXElementConstructor<\n MuiAutocompleteProps<any, any, any, any>\n >;\n /**\n * Text field component for input rendering\n */\n textField?: JSXElementConstructor<TextFieldProps>;\n}\n\n/**\n * Interface representing the slot properties for the Autocomplete component.\n */\nexport interface AutocompleteSlotProps {\n /**\n * Props for the autocomplete component (onChange is managed by the component)\n */\n autocomplete?: Partial<\n Omit<MuiAutocompleteProps<any, any, any, any>, \"onChange\" | \"renderInput\">\n >;\n /**\n * Props for the text field\n */\n textField?: Partial<TextFieldProps>;\n}\n\n/**\n * Props for the Autocomplete component.\n *\n * @template T - The type of the options\n * @template Multiple - Whether multiple selection is enabled\n * @template DisableClearable - Whether the clear button is disabled\n * @template FreeSolo - Whether free solo input is allowed\n * @template ChipComponent - The component type for chips (when multiple selection is enabled)\n */\nexport interface AutocompleteProps<\n T,\n Multiple extends boolean | undefined,\n DisableClearable extends boolean | undefined,\n FreeSolo extends boolean | undefined,\n ChipComponent extends React.ElementType = ChipTypeMap[\"defaultComponent\"],\n> extends Omit<\n MuiAutocompleteProps<\n T,\n Multiple,\n DisableClearable,\n FreeSolo,\n ChipComponent\n >,\n \"renderInput\" | \"onChange\" | \"color\" | \"slots\" | \"slotProps\"\n > {\n /**\n * The label for the autocomplete input.\n */\n label: string;\n /**\n * Optional helper text to display below the input.\n */\n helperText?: string;\n /**\n * Optional color for the autocomplete component.\n */\n color?: string;\n /**\n * If `true`, indicates that data is being fetched.\n */\n fetching?: boolean;\n /**\n * Optional callback function that is called when the value changes.\n */\n onChangeValue?: (value: T) => void;\n /**\n * Optional slots for custom rendering\n */\n slots?: AutocompleteSlots;\n /**\n * Optional props for the slots\n */\n slotProps?: AutocompleteSlotProps;\n}\n\n/**\n * Autocomplete component that wraps the MUI Autocomplete component with additional props.\n *\n * Supports extensive customization through slots and slotProps.\n *\n * @example\n * ```tsx\n * // Basic usage\n * <Autocomplete\n * label=\"Country\"\n * options={countries}\n * onChangeValue={handleChange}\n * />\n *\n * // With slot customization\n * <Autocomplete\n * label=\"Country\"\n * options={countries}\n * slots={{\n * textField: CustomTextField\n * }}\n * slotProps={{\n * autocomplete: { size: \"small\" },\n * textField: { variant: \"filled\" }\n * }}\n * />\n * ```\n */\nexport function Autocomplete<\n T,\n Multiple extends boolean | undefined,\n DisableClearable extends boolean | undefined,\n FreeSolo extends boolean | undefined,\n ChipComponent extends React.ElementType = ChipTypeMap[\"defaultComponent\"],\n>(\n props: AutocompleteProps<\n T,\n Multiple,\n DisableClearable,\n FreeSolo,\n ChipComponent\n >,\n) {\n const {\n label,\n loading,\n fetching,\n options,\n helperText,\n color,\n onChangeValue = () => null,\n sx,\n slots,\n slotProps,\n ...rest\n } = props;\n const loadingOrFetching = loading || fetching;\n\n // Slot components with defaults\n const AutocompleteComponent = slots?.autocomplete ?? MuiAutocomplete;\n const TextFieldComponent = slots?.textField ?? TextField;\n\n return (\n <AutocompleteComponent\n {...slotProps?.autocomplete}\n loading={loadingOrFetching}\n options={fetching ? [] : options}\n onChange={(_, value) => onChangeValue(value as T) as any}\n {...(rest as any)}\n renderInput={(params) => (\n <TextFieldComponent\n {...(params as any)}\n label={label}\n fullWidth\n fetching={fetching}\n loading={loading}\n hexColor={color}\n helperText={helperText}\n {...slotProps?.textField}\n />\n )}\n sx={sx}\n />\n );\n}\n\nexport default Autocomplete;\n"],"names":["Autocomplete","props","label","loading","fetching","options","helperText","color","onChangeValue","sx","slots","slotProps","rest","loadingOrFetching","AutocompleteComponent","MuiAutocomplete","TextFieldComponent","TextField","jsx","_","value","params"],"mappings":";;;AA4HO,SAASA,EAOdC,GAOA;AACA,QAAM;AAAA,IACJ,OAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,YAAAC;AAAA,IACA,OAAAC;AAAA,IACA,eAAAC,IAAgB,MAAM;AAAA,IACtB,IAAAC;AAAA,IACA,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDX,GACEY,IAAoBV,KAAWC,GAG/BU,IAAwBJ,GAAO,gBAAgBK,GAC/CC,IAAqBN,GAAO,aAAaO;AAE/C,SACE,gBAAAC;AAAA,IAACJ;AAAA,IAAA;AAAA,MACE,GAAGH,GAAW;AAAA,MACf,SAASE;AAAA,MACT,SAAST,IAAW,CAAA,IAAKC;AAAA,MACzB,UAAU,CAACc,GAAGC,MAAUZ,EAAcY,CAAU;AAAA,MAC/C,GAAIR;AAAA,MACL,aAAa,CAACS,MACZ,gBAAAH;AAAA,QAACF;AAAA,QAAA;AAAA,UACE,GAAIK;AAAA,UACL,OAAAnB;AAAA,UACA,WAAS;AAAA,UACT,UAAAE;AAAA,UACA,SAAAD;AAAA,UACA,UAAUI;AAAA,UACV,YAAAD;AAAA,UACC,GAAGK,GAAW;AAAA,QAAA;AAAA,MAAA;AAAA,MAGnB,IAAAF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { SxProps, Theme } from '@mui/material/styles';
|
|
2
|
-
import { PropsWithChildren } from 'react';
|
|
3
2
|
/**
|
|
4
3
|
* Props for the Board component.
|
|
5
4
|
*/
|
|
6
|
-
export
|
|
5
|
+
export interface BoardProps {
|
|
7
6
|
/**
|
|
8
7
|
* The content to be displayed on the board. It can be a single string or an array of strings.
|
|
9
8
|
*/
|
|
@@ -16,10 +15,15 @@ export type BoardProps = PropsWithChildren<{
|
|
|
16
15
|
* Optional styling properties for the board, using the theme's styling system.
|
|
17
16
|
*/
|
|
18
17
|
sx?: SxProps<Theme>;
|
|
19
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Optional children to render instead of the content
|
|
20
|
+
*/
|
|
21
|
+
children?: React.ReactNode;
|
|
22
|
+
}
|
|
20
23
|
/**
|
|
21
24
|
* Board component that displays content within a styled Paper component.
|
|
22
25
|
* It supports rendering an array of content lines or a single content string.
|
|
23
26
|
* Additionally, it provides a button to copy the content to the clipboard.
|
|
24
27
|
*/
|
|
25
|
-
export declare
|
|
28
|
+
export declare function Board({ content: contentProp, spacing, children, sx, }: BoardProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export default Board;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import f from "@mui/icons-material/ContentCopy";
|
|
3
|
+
import e from "@mui/material/Box";
|
|
4
|
+
import { blueGrey as y } from "@mui/material/colors";
|
|
5
|
+
import x from "@mui/material/IconButton";
|
|
6
|
+
import u from "@mui/material/Paper";
|
|
7
|
+
import { useTheme as b } from "@mui/material/styles";
|
|
8
|
+
import g from "@mui/material/Tooltip";
|
|
9
|
+
import p from "@mui/material/Typography";
|
|
10
|
+
function S({
|
|
11
|
+
content: r,
|
|
12
|
+
spacing: l = 0,
|
|
13
|
+
children: a,
|
|
14
|
+
sx: m
|
|
15
|
+
}) {
|
|
16
|
+
const { spacing: n, typography: c } = b();
|
|
17
|
+
let i, t;
|
|
18
|
+
return Array.isArray(r) ? (t = r.map((s, h) => /* @__PURE__ */ o(p, { sx: { pb: l }, children: s }, h)), i = r.join(`
|
|
19
|
+
`)) : (t = /* @__PURE__ */ o(p, { children: r }), i = r || ""), /* @__PURE__ */ o(
|
|
20
|
+
u,
|
|
21
|
+
{
|
|
22
|
+
sx: {
|
|
23
|
+
position: "relative",
|
|
24
|
+
pl: 2,
|
|
25
|
+
pr: 4,
|
|
26
|
+
py: 1,
|
|
27
|
+
backgroundColor: y[800],
|
|
28
|
+
color: "white",
|
|
29
|
+
...m
|
|
30
|
+
},
|
|
31
|
+
children: /* @__PURE__ */ d(e, { display: "flex", flexDirection: "row", children: [
|
|
32
|
+
/* @__PURE__ */ o(e, { width: 1, children: a || t }),
|
|
33
|
+
/* @__PURE__ */ o(
|
|
34
|
+
e,
|
|
35
|
+
{
|
|
36
|
+
sx: {
|
|
37
|
+
position: "absolute",
|
|
38
|
+
top: n(0.5),
|
|
39
|
+
right: n(0.5)
|
|
40
|
+
},
|
|
41
|
+
children: i && /* @__PURE__ */ o(
|
|
42
|
+
x,
|
|
43
|
+
{
|
|
44
|
+
"aria-label": "copy board content",
|
|
45
|
+
color: "inherit",
|
|
46
|
+
onClick: () => navigator.clipboard.writeText(i),
|
|
47
|
+
children: /* @__PURE__ */ o(g, { title: "Copy", children: /* @__PURE__ */ o(f, { sx: { fontSize: c.pxToRem(18) } }) })
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
] })
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
S as Board,
|
|
58
|
+
S as default
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=Board.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Board.mjs","sources":["../../src/Board/Board.tsx"],"sourcesContent":["import ContentCopyIcon from \"@mui/icons-material/ContentCopy\";\nimport Box from \"@mui/material/Box\";\nimport { blueGrey } from \"@mui/material/colors\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Paper from \"@mui/material/Paper\";\nimport { type SxProps, type Theme, useTheme } from \"@mui/material/styles\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Typography from \"@mui/material/Typography\";\nimport type { ReactNode } from \"react\";\n\n/**\n * Props for the Board component.\n */\nexport interface BoardProps {\n /**\n * The content to be displayed on the board. It can be a single string or an array of strings.\n */\n content: string | string[];\n /**\n * Optional spacing value for the board. It can be one of the values: 0, 1, 2, 3, 4, or 5.\n */\n spacing?: 0 | 1 | 2 | 3 | 4 | 5;\n /**\n * Optional styling properties for the board, using the theme's styling system.\n */\n sx?: SxProps<Theme>;\n /**\n * Optional children to render instead of the content\n */\n children?: React.ReactNode;\n}\n\n/**\n * Board component that displays content within a styled Paper component.\n * It supports rendering an array of content lines or a single content string.\n * Additionally, it provides a button to copy the content to the clipboard.\n */\nexport function Board({\n content: contentProp,\n spacing = 0,\n children,\n sx,\n}: BoardProps) {\n const { spacing: themeSpacing, typography } = useTheme();\n let copyContent: string;\n let content: ReactNode;\n\n if (Array.isArray(contentProp)) {\n content = contentProp.map((line, i) => (\n <Typography key={i} sx={{ pb: spacing }}>\n {line}\n </Typography>\n ));\n copyContent = contentProp.join(\"\\n\");\n } else {\n content = <Typography>{contentProp}</Typography>;\n copyContent = contentProp || \"\";\n }\n\n return (\n <Paper\n sx={{\n position: \"relative\",\n pl: 2,\n pr: 4,\n py: 1,\n backgroundColor: blueGrey[800],\n color: \"white\",\n ...sx,\n }}\n >\n <Box display=\"flex\" flexDirection=\"row\">\n <Box width={1}>{children || content}</Box>\n <Box\n sx={{\n position: \"absolute\",\n top: themeSpacing(0.5),\n right: themeSpacing(0.5),\n }}\n >\n {copyContent && (\n <IconButton\n aria-label=\"copy board content\"\n color=\"inherit\"\n onClick={() => navigator.clipboard.writeText(copyContent)}\n >\n <Tooltip title=\"Copy\">\n <ContentCopyIcon sx={{ fontSize: typography.pxToRem(18) }} />\n </Tooltip>\n </IconButton>\n )}\n </Box>\n </Box>\n </Paper>\n );\n}\n\nexport default Board;\n"],"names":["Board","contentProp","spacing","children","sx","themeSpacing","typography","useTheme","copyContent","content","line","i","jsx","Typography","Paper","blueGrey","jsxs","Box","IconButton","Tooltip","ContentCopyIcon"],"mappings":";;;;;;;;;AAqCO,SAASA,EAAM;AAAA,EACpB,SAASC;AAAA,EACT,SAAAC,IAAU;AAAA,EACV,UAAAC;AAAA,EACA,IAAAC;AACF,GAAe;AACb,QAAM,EAAE,SAASC,GAAc,YAAAC,EAAA,IAAeC,EAAA;AAC9C,MAAIC,GACAC;AAEJ,SAAI,MAAM,QAAQR,CAAW,KAC3BQ,IAAUR,EAAY,IAAI,CAACS,GAAMC,MAC/B,gBAAAC,EAACC,GAAA,EAAmB,IAAI,EAAE,IAAIX,EAAA,GAC3B,UAAAQ,EAAA,GADcC,CAEjB,CACD,GACDH,IAAcP,EAAY,KAAK;AAAA,CAAI,MAEnCQ,IAAU,gBAAAG,EAACC,KAAY,UAAAZ,EAAA,CAAY,GACnCO,IAAcP,KAAe,KAI7B,gBAAAW;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,IAAI;AAAA,QACF,UAAU;AAAA,QACV,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,iBAAiBC,EAAS,GAAG;AAAA,QAC7B,OAAO;AAAA,QACP,GAAGX;AAAA,MAAA;AAAA,MAGL,UAAA,gBAAAY,EAACC,GAAA,EAAI,SAAQ,QAAO,eAAc,OAChC,UAAA;AAAA,QAAA,gBAAAL,EAACK,GAAA,EAAI,OAAO,GAAI,UAAAd,KAAYM,GAAQ;AAAA,QACpC,gBAAAG;AAAA,UAACK;AAAA,UAAA;AAAA,YACC,IAAI;AAAA,cACF,UAAU;AAAA,cACV,KAAKZ,EAAa,GAAG;AAAA,cACrB,OAAOA,EAAa,GAAG;AAAA,YAAA;AAAA,YAGxB,UAAAG,KACC,gBAAAI;AAAA,cAACM;AAAA,cAAA;AAAA,gBACC,cAAW;AAAA,gBACX,OAAM;AAAA,gBACN,SAAS,MAAM,UAAU,UAAU,UAAUV,CAAW;AAAA,gBAExD,UAAA,gBAAAI,EAACO,GAAA,EAAQ,OAAM,QACb,4BAACC,GAAA,EAAgB,IAAI,EAAE,UAAUd,EAAW,QAAQ,EAAE,EAAA,GAAK,EAAA,CAC7D;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAEJ,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BootstrapDialogDialogProps } from '../Dialog/Dialog.types';
|
|
2
|
+
/**
|
|
3
|
+
* A customizable dialog component. Use it as a base to create more dialogs
|
|
4
|
+
*
|
|
5
|
+
* Supports extensive customization through slots and slotProps.
|
|
6
|
+
* Each internal element can be customized or replaced.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* // Basic usage
|
|
11
|
+
* <BootstrapDialog
|
|
12
|
+
* open={true}
|
|
13
|
+
* title="Confirm Action"
|
|
14
|
+
* onClose={handleClose}
|
|
15
|
+
* acceptable
|
|
16
|
+
* cancelable
|
|
17
|
+
* >
|
|
18
|
+
* Are you sure?
|
|
19
|
+
* </BootstrapDialog>
|
|
20
|
+
*
|
|
21
|
+
* // Custom close button
|
|
22
|
+
* <BootstrapDialog
|
|
23
|
+
* title="Settings"
|
|
24
|
+
* slotProps={{
|
|
25
|
+
* closeButton: { color: 'error' }
|
|
26
|
+
* }}
|
|
27
|
+
* />
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare function BootstrapDialog({ open, title, component, componentProps, disabled, disableAccept, disableCancel, actions, children, loading, cancelable, callCloseWhenCancel, acceptable, acceptText, cancelText, onAccept, onCancel, onClose, acceptType, slots, slotProps, }: BootstrapDialogDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export default BootstrapDialog;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { jsxs as e, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import R from "@mui/icons-material/Close";
|
|
3
|
+
import g from "@mui/material/Box";
|
|
4
|
+
import l from "@mui/material/Button";
|
|
5
|
+
import S from "@mui/material/CircularProgress";
|
|
6
|
+
import U from "@mui/material/Dialog";
|
|
7
|
+
import V from "@mui/material/DialogActions";
|
|
8
|
+
import X from "@mui/material/DialogContent";
|
|
9
|
+
import Y from "@mui/material/DialogTitle";
|
|
10
|
+
import Z from "@mui/material/IconButton";
|
|
11
|
+
function an({
|
|
12
|
+
open: d,
|
|
13
|
+
title: u,
|
|
14
|
+
component: B,
|
|
15
|
+
componentProps: f = {},
|
|
16
|
+
disabled: c,
|
|
17
|
+
disableAccept: h,
|
|
18
|
+
disableCancel: D,
|
|
19
|
+
actions: m = [],
|
|
20
|
+
children: x,
|
|
21
|
+
loading: p,
|
|
22
|
+
cancelable: C,
|
|
23
|
+
callCloseWhenCancel: A = !0,
|
|
24
|
+
acceptable: r,
|
|
25
|
+
acceptText: I = "Accept",
|
|
26
|
+
cancelText: y = "Cancel",
|
|
27
|
+
onAccept: T,
|
|
28
|
+
onCancel: k = () => null,
|
|
29
|
+
onClose: a,
|
|
30
|
+
acceptType: W = "button",
|
|
31
|
+
slots: n,
|
|
32
|
+
slotProps: o
|
|
33
|
+
}) {
|
|
34
|
+
const j = m.length > 0 || r || C, v = n?.dialog ?? U, z = n?.dialogTitle ?? Y, L = n?.titleContainer ?? g, b = n?.loadingIndicator ?? S, q = n?.closeButton ?? Z, w = n?.closeIcon ?? R, E = n?.contentWrapper ?? g, F = n?.dialogContent ?? X, G = n?.dialogActions ?? V, H = n?.actionButton ?? l, J = n?.cancelButton ?? l, K = n?.acceptButton ?? l;
|
|
35
|
+
return /* @__PURE__ */ e(v, { open: d, onClose: a, ...o?.dialog, children: [
|
|
36
|
+
/* @__PURE__ */ e(
|
|
37
|
+
z,
|
|
38
|
+
{
|
|
39
|
+
sx: { display: "flex", alignItems: "center" },
|
|
40
|
+
...o?.dialogTitle,
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ e(L, { ...o?.titleContainer, children: [
|
|
43
|
+
u,
|
|
44
|
+
p && !r && /* @__PURE__ */ t(
|
|
45
|
+
b,
|
|
46
|
+
{
|
|
47
|
+
size: 20,
|
|
48
|
+
sx: { ml: 2, color: (i) => i.palette.grey[500] },
|
|
49
|
+
...o?.loadingIndicator
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ t(
|
|
54
|
+
q,
|
|
55
|
+
{
|
|
56
|
+
disabled: c,
|
|
57
|
+
"aria-label": "close",
|
|
58
|
+
onClick: a,
|
|
59
|
+
sx: {
|
|
60
|
+
position: "absolute",
|
|
61
|
+
right: 8,
|
|
62
|
+
top: 8,
|
|
63
|
+
color: (i) => i.palette.grey[500]
|
|
64
|
+
},
|
|
65
|
+
...o?.closeButton,
|
|
66
|
+
children: /* @__PURE__ */ t(w, {})
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ e(
|
|
73
|
+
E,
|
|
74
|
+
{
|
|
75
|
+
component: B,
|
|
76
|
+
...f,
|
|
77
|
+
...o?.contentWrapper,
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ t(F, { dividers: !0, ...o?.dialogContent, children: x }),
|
|
80
|
+
j && /* @__PURE__ */ e(G, { ...o?.dialogActions, children: [
|
|
81
|
+
m.map(
|
|
82
|
+
({ id: i, text: M, type: N = "button", onClick: O, color: Q = "primary" }) => /* @__PURE__ */ t(
|
|
83
|
+
H,
|
|
84
|
+
{
|
|
85
|
+
type: N,
|
|
86
|
+
disabled: c,
|
|
87
|
+
onClick: O,
|
|
88
|
+
color: Q,
|
|
89
|
+
...o?.actionButton,
|
|
90
|
+
children: M
|
|
91
|
+
},
|
|
92
|
+
i
|
|
93
|
+
)
|
|
94
|
+
),
|
|
95
|
+
C && /* @__PURE__ */ t(
|
|
96
|
+
J,
|
|
97
|
+
{
|
|
98
|
+
color: "error",
|
|
99
|
+
disabled: c || D,
|
|
100
|
+
onClick: () => {
|
|
101
|
+
k(), A && a();
|
|
102
|
+
},
|
|
103
|
+
...o?.cancelButton,
|
|
104
|
+
children: y
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
r && /* @__PURE__ */ t(
|
|
108
|
+
K,
|
|
109
|
+
{
|
|
110
|
+
type: W,
|
|
111
|
+
loading: p,
|
|
112
|
+
disabled: c || h,
|
|
113
|
+
onClick: T,
|
|
114
|
+
...o?.acceptButton,
|
|
115
|
+
children: I
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
] })
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
] });
|
|
123
|
+
}
|
|
124
|
+
export {
|
|
125
|
+
an as BootstrapDialog,
|
|
126
|
+
an as default
|
|
127
|
+
};
|
|
128
|
+
//# sourceMappingURL=BootstrapDialog.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BootstrapDialog.mjs","sources":["../../src/BootstrapDialog/BootstrapDialog.tsx"],"sourcesContent":["import CloseIcon from \"@mui/icons-material/Close\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\nimport CircularProgress from \"@mui/material/CircularProgress\";\nimport Dialog from \"@mui/material/Dialog\";\nimport DialogActions from \"@mui/material/DialogActions\";\nimport DialogContent from \"@mui/material/DialogContent\";\nimport DialogTitle from \"@mui/material/DialogTitle\";\nimport IconButton from \"@mui/material/IconButton\";\nimport type { BootstrapDialogDialogProps } from \"../Dialog/Dialog.types\";\n\n/**\n * A customizable dialog component. Use it as a base to create more dialogs\n *\n * Supports extensive customization through slots and slotProps.\n * Each internal element can be customized or replaced.\n *\n * @example\n * ```tsx\n * // Basic usage\n * <BootstrapDialog\n * open={true}\n * title=\"Confirm Action\"\n * onClose={handleClose}\n * acceptable\n * cancelable\n * >\n * Are you sure?\n * </BootstrapDialog>\n *\n * // Custom close button\n * <BootstrapDialog\n * title=\"Settings\"\n * slotProps={{\n * closeButton: { color: 'error' }\n * }}\n * />\n * ```\n */\nexport function BootstrapDialog({\n open,\n title,\n component,\n componentProps = {},\n disabled,\n disableAccept,\n disableCancel,\n actions = [],\n children,\n loading,\n cancelable,\n callCloseWhenCancel = true,\n acceptable,\n acceptText = \"Accept\",\n cancelText = \"Cancel\",\n onAccept,\n onCancel = () => null,\n onClose,\n acceptType = \"button\",\n slots,\n slotProps,\n}: BootstrapDialogDialogProps) {\n const hasActions = actions.length > 0 || acceptable || cancelable;\n\n // Slot components with defaults\n const DialogComponent = slots?.dialog ?? Dialog;\n const DialogTitleComponent = slots?.dialogTitle ?? DialogTitle;\n const TitleContainerComponent = slots?.titleContainer ?? Box;\n const LoadingIndicatorComponent = slots?.loadingIndicator ?? CircularProgress;\n const CloseButtonComponent = slots?.closeButton ?? IconButton;\n const CloseIconComponent = slots?.closeIcon ?? CloseIcon;\n const ContentWrapperComponent = slots?.contentWrapper ?? Box;\n const DialogContentComponent = slots?.dialogContent ?? DialogContent;\n const DialogActionsComponent = slots?.dialogActions ?? DialogActions;\n const ActionButtonComponent = slots?.actionButton ?? Button;\n const CancelButtonComponent = slots?.cancelButton ?? Button;\n const AcceptButtonComponent = slots?.acceptButton ?? Button;\n\n return (\n <DialogComponent open={open} onClose={onClose} {...slotProps?.dialog}>\n <DialogTitleComponent\n sx={{ display: \"flex\", alignItems: \"center\" }}\n {...slotProps?.dialogTitle}\n >\n <TitleContainerComponent {...slotProps?.titleContainer}>\n {title}\n {loading && !acceptable && (\n <LoadingIndicatorComponent\n size={20}\n sx={{ ml: 2, color: (theme) => theme.palette.grey[500] }}\n {...slotProps?.loadingIndicator}\n />\n )}\n </TitleContainerComponent>\n <CloseButtonComponent\n disabled={disabled}\n aria-label=\"close\"\n onClick={onClose}\n sx={{\n position: \"absolute\",\n right: 8,\n top: 8,\n color: (theme) => theme.palette.grey[500],\n }}\n {...slotProps?.closeButton}\n >\n <CloseIconComponent />\n </CloseButtonComponent>\n </DialogTitleComponent>\n <ContentWrapperComponent\n component={component}\n {...componentProps}\n {...slotProps?.contentWrapper}\n >\n <DialogContentComponent dividers {...slotProps?.dialogContent}>\n {children}\n </DialogContentComponent>\n {hasActions && (\n <DialogActionsComponent {...slotProps?.dialogActions}>\n {actions.map(\n ({ id, text, type = \"button\", onClick, color = \"primary\" }) => (\n <ActionButtonComponent\n key={id}\n type={type}\n disabled={disabled}\n onClick={onClick}\n color={color}\n {...slotProps?.actionButton}\n >\n {text}\n </ActionButtonComponent>\n ),\n )}\n {cancelable && (\n <CancelButtonComponent\n color=\"error\"\n disabled={disabled || disableCancel}\n onClick={() => {\n onCancel();\n if (callCloseWhenCancel) {\n onClose();\n }\n }}\n {...slotProps?.cancelButton}\n >\n {cancelText}\n </CancelButtonComponent>\n )}\n\n {acceptable && (\n <AcceptButtonComponent\n type={acceptType}\n loading={loading}\n disabled={disabled || disableAccept}\n onClick={onAccept}\n {...slotProps?.acceptButton}\n >\n {acceptText}\n </AcceptButtonComponent>\n )}\n </DialogActionsComponent>\n )}\n </ContentWrapperComponent>\n </DialogComponent>\n );\n}\n\nexport default BootstrapDialog;\n"],"names":["BootstrapDialog","open","title","component","componentProps","disabled","disableAccept","disableCancel","actions","children","loading","cancelable","callCloseWhenCancel","acceptable","acceptText","cancelText","onAccept","onCancel","onClose","acceptType","slots","slotProps","hasActions","DialogComponent","Dialog","DialogTitleComponent","DialogTitle","TitleContainerComponent","Box","LoadingIndicatorComponent","CircularProgress","CloseButtonComponent","IconButton","CloseIconComponent","CloseIcon","ContentWrapperComponent","DialogContentComponent","DialogContent","DialogActionsComponent","DialogActions","ActionButtonComponent","Button","CancelButtonComponent","AcceptButtonComponent","jsxs","jsx","theme","id","text","type","onClick","color"],"mappings":";;;;;;;;;;AAuCO,SAASA,GAAgB;AAAA,EAC9B,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,gBAAAC,IAAiB,CAAA;AAAA,EACjB,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,SAAAC,IAAU,CAAA;AAAA,EACV,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AAAA,EACA,qBAAAC,IAAsB;AAAA,EACtB,YAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,YAAAC,IAAa;AAAA,EACb,UAAAC;AAAA,EACA,UAAAC,IAAW,MAAM;AAAA,EACjB,SAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,OAAAC;AAAA,EACA,WAAAC;AACF,GAA+B;AAC7B,QAAMC,IAAad,EAAQ,SAAS,KAAKK,KAAcF,GAGjDY,IAAkBH,GAAO,UAAUI,GACnCC,IAAuBL,GAAO,eAAeM,GAC7CC,IAA0BP,GAAO,kBAAkBQ,GACnDC,IAA4BT,GAAO,oBAAoBU,GACvDC,IAAuBX,GAAO,eAAeY,GAC7CC,IAAqBb,GAAO,aAAac,GACzCC,IAA0Bf,GAAO,kBAAkBQ,GACnDQ,IAAyBhB,GAAO,iBAAiBiB,GACjDC,IAAyBlB,GAAO,iBAAiBmB,GACjDC,IAAwBpB,GAAO,gBAAgBqB,GAC/CC,IAAwBtB,GAAO,gBAAgBqB,GAC/CE,IAAwBvB,GAAO,gBAAgBqB;AAErD,2BACGlB,GAAA,EAAgB,MAAAtB,GAAY,SAAAiB,GAAmB,GAAGG,GAAW,QAC5D,UAAA;AAAA,IAAA,gBAAAuB;AAAA,MAACnB;AAAA,MAAA;AAAA,QACC,IAAI,EAAE,SAAS,QAAQ,YAAY,SAAA;AAAA,QAClC,GAAGJ,GAAW;AAAA,QAEf,UAAA;AAAA,UAAA,gBAAAuB,EAACjB,GAAA,EAAyB,GAAGN,GAAW,gBACrC,UAAA;AAAA,YAAAnB;AAAA,YACAQ,KAAW,CAACG,KACX,gBAAAgC;AAAA,cAAChB;AAAA,cAAA;AAAA,gBACC,MAAM;AAAA,gBACN,IAAI,EAAE,IAAI,GAAG,OAAO,CAACiB,MAAUA,EAAM,QAAQ,KAAK,GAAG,EAAA;AAAA,gBACpD,GAAGzB,GAAW;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB,GAEJ;AAAA,UACA,gBAAAwB;AAAA,YAACd;AAAA,YAAA;AAAA,cACC,UAAA1B;AAAA,cACA,cAAW;AAAA,cACX,SAASa;AAAA,cACT,IAAI;AAAA,gBACF,UAAU;AAAA,gBACV,OAAO;AAAA,gBACP,KAAK;AAAA,gBACL,OAAO,CAAC4B,MAAUA,EAAM,QAAQ,KAAK,GAAG;AAAA,cAAA;AAAA,cAEzC,GAAGzB,GAAW;AAAA,cAEf,4BAACY,GAAA,CAAA,CAAmB;AAAA,YAAA;AAAA,UAAA;AAAA,QACtB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEF,gBAAAW;AAAA,MAACT;AAAA,MAAA;AAAA,QACC,WAAAhC;AAAA,QACC,GAAGC;AAAA,QACH,GAAGiB,GAAW;AAAA,QAEf,UAAA;AAAA,UAAA,gBAAAwB,EAACT,KAAuB,UAAQ,IAAE,GAAGf,GAAW,eAC7C,UAAAZ,GACH;AAAA,UACCa,KACC,gBAAAsB,EAACN,GAAA,EAAwB,GAAGjB,GAAW,eACpC,UAAA;AAAA,YAAAb,EAAQ;AAAA,cACP,CAAC,EAAE,IAAAuC,GAAI,MAAAC,GAAM,MAAAC,IAAO,UAAU,SAAAC,GAAS,OAAAC,IAAQ,UAAA,MAC7C,gBAAAN;AAAA,gBAACL;AAAA,gBAAA;AAAA,kBAEC,MAAAS;AAAA,kBACA,UAAA5C;AAAA,kBACA,SAAA6C;AAAA,kBACA,OAAAC;AAAA,kBACC,GAAG9B,GAAW;AAAA,kBAEd,UAAA2B;AAAA,gBAAA;AAAA,gBAPID;AAAA,cAAA;AAAA,YAQP;AAAA,YAGHpC,KACC,gBAAAkC;AAAA,cAACH;AAAA,cAAA;AAAA,gBACC,OAAM;AAAA,gBACN,UAAUrC,KAAYE;AAAA,gBACtB,SAAS,MAAM;AACb,kBAAAU,EAAA,GACIL,KACFM,EAAA;AAAA,gBAEJ;AAAA,gBACC,GAAGG,GAAW;AAAA,gBAEd,UAAAN;AAAA,cAAA;AAAA,YAAA;AAAA,YAIJF,KACC,gBAAAgC;AAAA,cAACF;AAAA,cAAA;AAAA,gBACC,MAAMxB;AAAA,gBACN,SAAAT;AAAA,gBACA,UAAUL,KAAYC;AAAA,gBACtB,SAASU;AAAA,gBACR,GAAGK,GAAW;AAAA,gBAEd,UAAAP;AAAA,cAAA;AAAA,YAAA;AAAA,UACH,EAAA,CAEJ;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAEJ,GACF;AAEJ;"}
|
|
@@ -3,6 +3,9 @@ export type BulletVariant = "primary" | "secondary" | "default" | "info" | "warn
|
|
|
3
3
|
export declare const bulletClasses: {
|
|
4
4
|
root: string;
|
|
5
5
|
};
|
|
6
|
+
/**
|
|
7
|
+
* Props for the Bullet component
|
|
8
|
+
*/
|
|
6
9
|
export interface BulletProps {
|
|
7
10
|
/**
|
|
8
11
|
* Color palette used to draw the component
|
|
@@ -16,4 +19,5 @@ export interface BulletProps {
|
|
|
16
19
|
/**
|
|
17
20
|
* Dot to attract the user attention
|
|
18
21
|
*/
|
|
19
|
-
export declare
|
|
22
|
+
export declare function Bullet({ variant, sx }: BulletProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default Bullet;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import e from "@mui/material/Badge";
|
|
3
|
+
const l = {
|
|
4
|
+
root: "RdsBullet-root"
|
|
5
|
+
};
|
|
6
|
+
function u({ variant: o = "primary", sx: r }) {
|
|
7
|
+
return /* @__PURE__ */ t(
|
|
8
|
+
e,
|
|
9
|
+
{
|
|
10
|
+
color: o,
|
|
11
|
+
variant: "dot",
|
|
12
|
+
className: l.root,
|
|
13
|
+
role: "bullet",
|
|
14
|
+
"aria-describedby": o,
|
|
15
|
+
sx: r
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
u as Bullet,
|
|
21
|
+
l as bulletClasses,
|
|
22
|
+
u as default
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=Bullet.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Bullet.mjs","sources":["../../src/Bullet/Bullet.tsx"],"sourcesContent":["import Badge from \"@mui/material/Badge\";\nimport type { SxProps, Theme } from \"@mui/material/styles\";\n\nexport type BulletVariant =\n | \"primary\"\n | \"secondary\"\n | \"default\"\n | \"info\"\n | \"warning\"\n | \"error\";\n\nexport const bulletClasses = {\n root: \"RdsBullet-root\",\n};\n\n/**\n * Props for the Bullet component\n */\nexport interface BulletProps {\n /**\n * Color palette used to draw the component\n */\n variant?: BulletVariant;\n /**\n * Custom styles\n */\n sx?: SxProps<Theme>;\n}\n\n/**\n * Dot to attract the user attention\n */\nexport function Bullet({ variant = \"primary\", sx }: BulletProps) {\n return (\n <Badge\n color={variant}\n variant=\"dot\"\n className={bulletClasses.root}\n role=\"bullet\"\n aria-describedby={variant}\n sx={sx}\n />\n );\n}\n\nexport default Bullet;\n"],"names":["bulletClasses","Bullet","variant","sx","jsx","Badge"],"mappings":";;AAWO,MAAMA,IAAgB;AAAA,EAC3B,MAAM;AACR;AAmBO,SAASC,EAAO,EAAE,SAAAC,IAAU,WAAW,IAAAC,KAAmB;AAC/D,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAOH;AAAA,MACP,SAAQ;AAAA,MACR,WAAWF,EAAc;AAAA,MACzB,MAAK;AAAA,MACL,oBAAkBE;AAAA,MAClB,IAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import { BootstrapDialogDialogProps } from '../
|
|
1
|
+
import { BootstrapDialogDialogProps } from '../Dialog/Dialog.types';
|
|
2
2
|
type OmitBaseDialogProps = "cancelable" | "acceptable" | "onAccept" | "onCancel" | "onClose" | "actions" | "callCloseWhenCancel" | "component" | "acceptType";
|
|
3
|
+
/**
|
|
4
|
+
* Props for the ConfirmDialog component
|
|
5
|
+
*/
|
|
3
6
|
export interface ConfirmDialogProps extends Omit<BootstrapDialogDialogProps, OmitBaseDialogProps> {
|
|
4
7
|
/**
|
|
5
8
|
* Text to display on the confirm button.
|
|
9
|
+
* @default "Confirm"
|
|
6
10
|
*/
|
|
7
11
|
confirmText?: string;
|
|
8
12
|
/**
|
|
9
13
|
* Text to display on the cancel button.
|
|
14
|
+
* @default "Cancel"
|
|
10
15
|
*/
|
|
11
16
|
cancelText?: string;
|
|
12
17
|
/**
|
|
@@ -27,5 +32,5 @@ export interface ConfirmDialogProps extends Omit<BootstrapDialogDialogProps, Omi
|
|
|
27
32
|
* with customizable title, confirmation and cancellation actions.
|
|
28
33
|
* It optionally requires a passphrase to enable the confirmation action.
|
|
29
34
|
*/
|
|
30
|
-
export declare
|
|
31
|
-
export
|
|
35
|
+
export declare function ConfirmDialog({ open, title, loading, disabled, confirmText, cancelText, passphrase, children, onConfirm, onCancel, }: ConfirmDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export default ConfirmDialog;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsxs as f, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import h from "@mui/material/TextField";
|
|
3
|
+
import { useState as C } from "react";
|
|
4
|
+
import { BootstrapDialog as x } from "../BootstrapDialog/BootstrapDialog.mjs";
|
|
5
|
+
function A({
|
|
6
|
+
open: o,
|
|
7
|
+
title: r,
|
|
8
|
+
loading: t,
|
|
9
|
+
disabled: s,
|
|
10
|
+
confirmText: c = "Confirm",
|
|
11
|
+
cancelText: i = "Cancel",
|
|
12
|
+
passphrase: e,
|
|
13
|
+
children: n,
|
|
14
|
+
onConfirm: u,
|
|
15
|
+
onCancel: a
|
|
16
|
+
}) {
|
|
17
|
+
const [l, m] = C("");
|
|
18
|
+
return /* @__PURE__ */ f(
|
|
19
|
+
x,
|
|
20
|
+
{
|
|
21
|
+
title: r,
|
|
22
|
+
loading: t,
|
|
23
|
+
disabled: t || s,
|
|
24
|
+
disableAccept: !(!e || l === e),
|
|
25
|
+
open: o,
|
|
26
|
+
onClose: a,
|
|
27
|
+
acceptable: !0,
|
|
28
|
+
cancelable: !0,
|
|
29
|
+
callCloseWhenCancel: !1,
|
|
30
|
+
acceptText: c,
|
|
31
|
+
cancelText: i,
|
|
32
|
+
onCancel: a,
|
|
33
|
+
onAccept: u,
|
|
34
|
+
children: [
|
|
35
|
+
n,
|
|
36
|
+
e && /* @__PURE__ */ d(
|
|
37
|
+
h,
|
|
38
|
+
{
|
|
39
|
+
size: "small",
|
|
40
|
+
fullWidth: !0,
|
|
41
|
+
value: l,
|
|
42
|
+
onChange: (p) => m(p.target.value),
|
|
43
|
+
placeholder: e
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
A as ConfirmDialog,
|
|
52
|
+
A as default
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=ConfirmDialog.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmDialog.mjs","sources":["../../src/ConfirmDialog/ConfirmDialog.tsx"],"sourcesContent":["import TextField from \"@mui/material/TextField\";\nimport { useState } from \"react\";\nimport BootstrapDialog from \"../BootstrapDialog\";\nimport type { BootstrapDialogDialogProps } from \"../Dialog/Dialog.types\";\n\ntype OmitBaseDialogProps =\n | \"cancelable\"\n | \"acceptable\"\n | \"onAccept\"\n | \"onCancel\"\n | \"onClose\"\n | \"actions\"\n | \"callCloseWhenCancel\"\n | \"component\"\n | \"acceptType\";\n\n/**\n * Props for the ConfirmDialog component\n */\nexport interface ConfirmDialogProps\n extends Omit<BootstrapDialogDialogProps, OmitBaseDialogProps> {\n /**\n * Text to display on the confirm button.\n * @default \"Confirm\"\n */\n confirmText?: string;\n /**\n * Text to display on the cancel button.\n * @default \"Cancel\"\n */\n cancelText?: string;\n /**\n * Optional passphrase for additional confirmation.\n */\n passphrase?: string;\n /**\n * Callback function to handle cancel action.\n */\n onCancel: () => void;\n /**\n * Callback function to handle confirm action.\n */\n onConfirm: () => void;\n}\n\n/**\n * ConfirmDialog component renders a dialog to ask a user to confirm an action\n * with customizable title, confirmation and cancellation actions.\n * It optionally requires a passphrase to enable the confirmation action.\n */\nexport function ConfirmDialog({\n open,\n title,\n loading,\n disabled,\n confirmText = \"Confirm\",\n cancelText = \"Cancel\",\n passphrase,\n children,\n onConfirm,\n onCancel,\n}: ConfirmDialogProps) {\n const [inputPassphrase, setInputPassphrase] = useState(\"\");\n const validPassphrase = !passphrase || inputPassphrase === passphrase;\n\n return (\n <BootstrapDialog\n title={title}\n loading={loading}\n disabled={loading || disabled}\n disableAccept={!validPassphrase}\n open={open}\n onClose={onCancel}\n acceptable\n cancelable\n callCloseWhenCancel={false}\n acceptText={confirmText}\n cancelText={cancelText}\n onCancel={onCancel}\n onAccept={onConfirm}\n >\n {children}\n {passphrase && (\n <TextField\n size=\"small\"\n fullWidth\n value={inputPassphrase}\n onChange={(e) => setInputPassphrase(e.target.value)}\n placeholder={passphrase}\n />\n )}\n </BootstrapDialog>\n );\n}\n\nexport default ConfirmDialog;\n"],"names":["ConfirmDialog","open","title","loading","disabled","confirmText","cancelText","passphrase","children","onConfirm","onCancel","inputPassphrase","setInputPassphrase","useState","jsxs","BootstrapDialog","jsx","TextField","e"],"mappings":";;;;AAkDO,SAASA,EAAc;AAAA,EAC5B,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,YAAAC,IAAa;AAAA,EACb,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AACF,GAAuB;AACrB,QAAM,CAACC,GAAiBC,CAAkB,IAAIC,EAAS,EAAE;AAGzD,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAb;AAAA,MACA,SAAAC;AAAA,MACA,UAAUA,KAAWC;AAAA,MACrB,eAAe,EAPK,CAACG,KAAcI,MAAoBJ;AAAA,MAQvD,MAAAN;AAAA,MACA,SAASS;AAAA,MACT,YAAU;AAAA,MACV,YAAU;AAAA,MACV,qBAAqB;AAAA,MACrB,YAAYL;AAAA,MACZ,YAAAC;AAAA,MACA,UAAAI;AAAA,MACA,UAAUD;AAAA,MAET,UAAA;AAAA,QAAAD;AAAA,QACAD,KACC,gBAAAS;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,WAAS;AAAA,YACT,OAAON;AAAA,YACP,UAAU,CAACO,MAAMN,EAAmBM,EAAE,OAAO,KAAK;AAAA,YAClD,aAAaX;AAAA,UAAA;AAAA,QAAA;AAAA,MACf;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import t from "@mui/material/Container";
|
|
3
|
+
function m({ children: o }) {
|
|
4
|
+
return /* @__PURE__ */ n(t, { component: "main", sx: { py: 3, flexGrow: 1 }, children: o });
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
m as Content,
|
|
8
|
+
m as default
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=Content.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Content.mjs","sources":["../../src/Content/Content.tsx"],"sourcesContent":["import Container from \"@mui/material/Container\";\nimport type { ContentProps } from \"./Content.types\";\n\n/**\n * A functional component that renders its children inside a main container.\n */\nexport function Content({ children }: ContentProps) {\n return (\n <Container component=\"main\" sx={{ py: 3, flexGrow: 1 }}>\n {children}\n </Container>\n );\n}\n\nexport default Content;\n"],"names":["Content","children","jsx","Container"],"mappings":";;AAMO,SAASA,EAAQ,EAAE,UAAAC,KAA0B;AAClD,SACE,gBAAAC,EAACC,GAAA,EAAU,WAAU,QAAO,IAAI,EAAE,IAAI,GAAG,UAAU,EAAA,GAChD,UAAAF,EAAA,CACH;AAEJ;"}
|