@coveord/plasma-mantine 47.4.0
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/.eslintrc.js +27 -0
- package/.turbo/turbo-build.log +8 -0
- package/.turbo/turbo-test.log +29 -0
- package/LICENSE +15 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/cjs/__tests__/GlobalSetup.js +17 -0
- package/dist/cjs/__tests__/GlobalSetup.js.map +1 -0
- package/dist/cjs/__tests__/Setup.js +6 -0
- package/dist/cjs/__tests__/Setup.js.map +1 -0
- package/dist/cjs/__tests__/SetupAfterEnv.js +19 -0
- package/dist/cjs/__tests__/SetupAfterEnv.js.map +1 -0
- package/dist/cjs/__tests__/Utils.js +38 -0
- package/dist/cjs/__tests__/Utils.js.map +1 -0
- package/dist/cjs/components/blank-slate/BlankSlate.js +26 -0
- package/dist/cjs/components/blank-slate/BlankSlate.js.map +1 -0
- package/dist/cjs/components/blank-slate/index.js +8 -0
- package/dist/cjs/components/blank-slate/index.js.map +1 -0
- package/dist/cjs/components/code-editor/CodeEditor.example.js +41 -0
- package/dist/cjs/components/code-editor/CodeEditor.example.js.map +1 -0
- package/dist/cjs/components/code-editor/CodeEditor.js +176 -0
- package/dist/cjs/components/code-editor/CodeEditor.js.map +1 -0
- package/dist/cjs/components/code-editor/__mocks__/@monaco-editor/react.js +30 -0
- package/dist/cjs/components/code-editor/__mocks__/@monaco-editor/react.js.map +1 -0
- package/dist/cjs/components/code-editor/index.js +8 -0
- package/dist/cjs/components/code-editor/index.js.map +1 -0
- package/dist/cjs/components/collection/Collection.example.js +64 -0
- package/dist/cjs/components/collection/Collection.example.js.map +1 -0
- package/dist/cjs/components/collection/Collection.js +130 -0
- package/dist/cjs/components/collection/Collection.js.map +1 -0
- package/dist/cjs/components/collection/CollectionItem.js +109 -0
- package/dist/cjs/components/collection/CollectionItem.js.map +1 -0
- package/dist/cjs/components/collection/Colllection.styles.js +24 -0
- package/dist/cjs/components/collection/Colllection.styles.js.map +1 -0
- package/dist/cjs/components/collection/index.js +8 -0
- package/dist/cjs/components/collection/index.js.map +1 -0
- package/dist/cjs/components/date-range-picker/DateRangePickerInlineCalendar.js +102 -0
- package/dist/cjs/components/date-range-picker/DateRangePickerInlineCalendar.js.map +1 -0
- package/dist/cjs/components/date-range-picker/DateRangePickerPopoverCalendar.js +93 -0
- package/dist/cjs/components/date-range-picker/DateRangePickerPopoverCalendar.js.map +1 -0
- package/dist/cjs/components/date-range-picker/DateRangePickerPresetSelect.js +64 -0
- package/dist/cjs/components/date-range-picker/DateRangePickerPresetSelect.js.map +1 -0
- package/dist/cjs/components/date-range-picker/EditableDateRangePicker.js +66 -0
- package/dist/cjs/components/date-range-picker/EditableDateRangePicker.js.map +1 -0
- package/dist/cjs/components/date-range-picker/index.js +9 -0
- package/dist/cjs/components/date-range-picker/index.js.map +1 -0
- package/dist/cjs/components/header/Header.js +78 -0
- package/dist/cjs/components/header/Header.js.map +1 -0
- package/dist/cjs/components/header/index.js +8 -0
- package/dist/cjs/components/header/index.js.map +1 -0
- package/dist/cjs/components/index.js +16 -0
- package/dist/cjs/components/index.js.map +1 -0
- package/dist/cjs/components/inline-confirm/InlineConfirm.js +39 -0
- package/dist/cjs/components/inline-confirm/InlineConfirm.js.map +1 -0
- package/dist/cjs/components/inline-confirm/InlineConfirmButton.js +28 -0
- package/dist/cjs/components/inline-confirm/InlineConfirmButton.js.map +1 -0
- package/dist/cjs/components/inline-confirm/InlineConfirmContext.js +14 -0
- package/dist/cjs/components/inline-confirm/InlineConfirmContext.js.map +1 -0
- package/dist/cjs/components/inline-confirm/InlineConfirmPrompt.js +48 -0
- package/dist/cjs/components/inline-confirm/InlineConfirmPrompt.js.map +1 -0
- package/dist/cjs/components/inline-confirm/index.js +10 -0
- package/dist/cjs/components/inline-confirm/index.js.map +1 -0
- package/dist/cjs/components/inline-confirm/useInlineConfirm.js +21 -0
- package/dist/cjs/components/inline-confirm/useInlineConfirm.js.map +1 -0
- package/dist/cjs/components/modal-wizard/ModalWizard.js +132 -0
- package/dist/cjs/components/modal-wizard/ModalWizard.js.map +1 -0
- package/dist/cjs/components/modal-wizard/ModalWizardStep.js +23 -0
- package/dist/cjs/components/modal-wizard/ModalWizardStep.js.map +1 -0
- package/dist/cjs/components/modal-wizard/index.js +8 -0
- package/dist/cjs/components/modal-wizard/index.js.map +1 -0
- package/dist/cjs/components/sticky-footer/StickyFooter.js +50 -0
- package/dist/cjs/components/sticky-footer/StickyFooter.js.map +1 -0
- package/dist/cjs/components/sticky-footer/index.js +8 -0
- package/dist/cjs/components/sticky-footer/index.js.map +1 -0
- package/dist/cjs/components/table/Table.js +259 -0
- package/dist/cjs/components/table/Table.js.map +1 -0
- package/dist/cjs/components/table/TableActions.js +25 -0
- package/dist/cjs/components/table/TableActions.js.map +1 -0
- package/dist/cjs/components/table/TableCollapsibleColumn.js +33 -0
- package/dist/cjs/components/table/TableCollapsibleColumn.js.map +1 -0
- package/dist/cjs/components/table/TableContext.js +14 -0
- package/dist/cjs/components/table/TableContext.js.map +1 -0
- package/dist/cjs/components/table/TableDateRangePicker.js +84 -0
- package/dist/cjs/components/table/TableDateRangePicker.js.map +1 -0
- package/dist/cjs/components/table/TableFilter.js +53 -0
- package/dist/cjs/components/table/TableFilter.js.map +1 -0
- package/dist/cjs/components/table/TableFooter.js +23 -0
- package/dist/cjs/components/table/TableFooter.js.map +1 -0
- package/dist/cjs/components/table/TableHeader.js +37 -0
- package/dist/cjs/components/table/TableHeader.js.map +1 -0
- package/dist/cjs/components/table/TablePagination.js +47 -0
- package/dist/cjs/components/table/TablePagination.js.map +1 -0
- package/dist/cjs/components/table/TablePerPage.js +52 -0
- package/dist/cjs/components/table/TablePerPage.js.map +1 -0
- package/dist/cjs/components/table/TablePredicate.js +45 -0
- package/dist/cjs/components/table/TablePredicate.js.map +1 -0
- package/dist/cjs/components/table/Th.js +98 -0
- package/dist/cjs/components/table/Th.js.map +1 -0
- package/dist/cjs/components/table/index.js +9 -0
- package/dist/cjs/components/table/index.js.map +1 -0
- package/dist/cjs/components/table/useTable.js +21 -0
- package/dist/cjs/components/table/useTable.js.map +1 -0
- package/dist/cjs/hooks/index.js +9 -0
- package/dist/cjs/hooks/index.js.map +1 -0
- package/dist/cjs/hooks/useControlledList.js +52 -0
- package/dist/cjs/hooks/useControlledList.js.map +1 -0
- package/dist/cjs/hooks/useParentHeight.js +36 -0
- package/dist/cjs/hooks/useParentHeight.js.map +1 -0
- package/dist/cjs/index.js +33 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/theme/PlasmaColors.js +54 -0
- package/dist/cjs/theme/PlasmaColors.js.map +1 -0
- package/dist/cjs/theme/Plasmantine.js +24 -0
- package/dist/cjs/theme/Plasmantine.js.map +1 -0
- package/dist/cjs/theme/Theme.js +223 -0
- package/dist/cjs/theme/Theme.js.map +1 -0
- package/dist/cjs/theme/index.js +8 -0
- package/dist/cjs/theme/index.js.map +1 -0
- package/dist/definitions/__tests__/GlobalSetup.d.ts +3 -0
- package/dist/definitions/__tests__/GlobalSetup.d.ts.map +1 -0
- package/dist/definitions/__tests__/Setup.d.ts +5 -0
- package/dist/definitions/__tests__/Setup.d.ts.map +1 -0
- package/dist/definitions/__tests__/SetupAfterEnv.d.ts +7 -0
- package/dist/definitions/__tests__/SetupAfterEnv.d.ts.map +1 -0
- package/dist/definitions/__tests__/Utils.d.ts +8 -0
- package/dist/definitions/__tests__/Utils.d.ts.map +1 -0
- package/dist/definitions/components/blank-slate/BlankSlate.d.ts +12 -0
- package/dist/definitions/components/blank-slate/BlankSlate.d.ts.map +1 -0
- package/dist/definitions/components/blank-slate/index.d.ts +2 -0
- package/dist/definitions/components/blank-slate/index.d.ts.map +1 -0
- package/dist/definitions/components/code-editor/CodeEditor.d.ts +43 -0
- package/dist/definitions/components/code-editor/CodeEditor.d.ts.map +1 -0
- package/dist/definitions/components/code-editor/CodeEditor.example.d.ts +4 -0
- package/dist/definitions/components/code-editor/CodeEditor.example.d.ts.map +1 -0
- package/dist/definitions/components/code-editor/__mocks__/@monaco-editor/react.d.ts +9 -0
- package/dist/definitions/components/code-editor/__mocks__/@monaco-editor/react.d.ts.map +1 -0
- package/dist/definitions/components/code-editor/index.d.ts +2 -0
- package/dist/definitions/components/code-editor/index.d.ts.map +1 -0
- package/dist/definitions/components/collection/Collection.d.ts +20 -0
- package/dist/definitions/components/collection/Collection.d.ts.map +1 -0
- package/dist/definitions/components/collection/Collection.example.d.ts +4 -0
- package/dist/definitions/components/collection/Collection.example.d.ts.map +1 -0
- package/dist/definitions/components/collection/CollectionItem.d.ts +15 -0
- package/dist/definitions/components/collection/CollectionItem.d.ts.map +1 -0
- package/dist/definitions/components/collection/Colllection.styles.d.ts +9 -0
- package/dist/definitions/components/collection/Colllection.styles.d.ts.map +1 -0
- package/dist/definitions/components/collection/index.d.ts +2 -0
- package/dist/definitions/components/collection/index.d.ts.map +1 -0
- package/dist/definitions/components/date-range-picker/DateRangePickerInlineCalendar.d.ts +37 -0
- package/dist/definitions/components/date-range-picker/DateRangePickerInlineCalendar.d.ts.map +1 -0
- package/dist/definitions/components/date-range-picker/DateRangePickerPopoverCalendar.d.ts +30 -0
- package/dist/definitions/components/date-range-picker/DateRangePickerPopoverCalendar.d.ts.map +1 -0
- package/dist/definitions/components/date-range-picker/DateRangePickerPresetSelect.d.ts +16 -0
- package/dist/definitions/components/date-range-picker/DateRangePickerPresetSelect.d.ts.map +1 -0
- package/dist/definitions/components/date-range-picker/EditableDateRangePicker.d.ts +18 -0
- package/dist/definitions/components/date-range-picker/EditableDateRangePicker.d.ts.map +1 -0
- package/dist/definitions/components/date-range-picker/index.d.ts +3 -0
- package/dist/definitions/components/date-range-picker/index.d.ts.map +1 -0
- package/dist/definitions/components/header/Header.d.ts +12 -0
- package/dist/definitions/components/header/Header.d.ts.map +1 -0
- package/dist/definitions/components/header/index.d.ts +2 -0
- package/dist/definitions/components/header/index.d.ts.map +1 -0
- package/dist/definitions/components/index.d.ts +10 -0
- package/dist/definitions/components/index.d.ts.map +1 -0
- package/dist/definitions/components/inline-confirm/InlineConfirm.d.ts +10 -0
- package/dist/definitions/components/inline-confirm/InlineConfirm.d.ts.map +1 -0
- package/dist/definitions/components/inline-confirm/InlineConfirmButton.d.ts +8 -0
- package/dist/definitions/components/inline-confirm/InlineConfirmButton.d.ts.map +1 -0
- package/dist/definitions/components/inline-confirm/InlineConfirmContext.d.ts +9 -0
- package/dist/definitions/components/inline-confirm/InlineConfirmContext.d.ts.map +1 -0
- package/dist/definitions/components/inline-confirm/InlineConfirmPrompt.d.ts +11 -0
- package/dist/definitions/components/inline-confirm/InlineConfirmPrompt.d.ts.map +1 -0
- package/dist/definitions/components/inline-confirm/index.d.ts +4 -0
- package/dist/definitions/components/inline-confirm/index.d.ts.map +1 -0
- package/dist/definitions/components/inline-confirm/useInlineConfirm.d.ts +6 -0
- package/dist/definitions/components/inline-confirm/useInlineConfirm.d.ts.map +1 -0
- package/dist/definitions/components/modal-wizard/ModalWizard.d.ts +73 -0
- package/dist/definitions/components/modal-wizard/ModalWizard.d.ts.map +1 -0
- package/dist/definitions/components/modal-wizard/ModalWizardStep.d.ts +42 -0
- package/dist/definitions/components/modal-wizard/ModalWizardStep.d.ts.map +1 -0
- package/dist/definitions/components/modal-wizard/index.d.ts +2 -0
- package/dist/definitions/components/modal-wizard/index.d.ts.map +1 -0
- package/dist/definitions/components/sticky-footer/StickyFooter.d.ts +11 -0
- package/dist/definitions/components/sticky-footer/StickyFooter.d.ts.map +1 -0
- package/dist/definitions/components/sticky-footer/index.d.ts +2 -0
- package/dist/definitions/components/sticky-footer/index.d.ts.map +1 -0
- package/dist/definitions/components/table/Table.d.ts +84 -0
- package/dist/definitions/components/table/Table.d.ts.map +1 -0
- package/dist/definitions/components/table/TableActions.d.ts +26 -0
- package/dist/definitions/components/table/TableActions.d.ts.map +1 -0
- package/dist/definitions/components/table/TableCollapsibleColumn.d.ts +6 -0
- package/dist/definitions/components/table/TableCollapsibleColumn.d.ts.map +1 -0
- package/dist/definitions/components/table/TableContext.d.ts +54 -0
- package/dist/definitions/components/table/TableContext.d.ts.map +1 -0
- package/dist/definitions/components/table/TableDateRangePicker.d.ts +20 -0
- package/dist/definitions/components/table/TableDateRangePicker.d.ts.map +1 -0
- package/dist/definitions/components/table/TableFilter.d.ts +12 -0
- package/dist/definitions/components/table/TableFilter.d.ts.map +1 -0
- package/dist/definitions/components/table/TableFooter.d.ts +3 -0
- package/dist/definitions/components/table/TableFooter.d.ts.map +1 -0
- package/dist/definitions/components/table/TableHeader.d.ts +3 -0
- package/dist/definitions/components/table/TableHeader.d.ts.map +1 -0
- package/dist/definitions/components/table/TablePagination.d.ts +10 -0
- package/dist/definitions/components/table/TablePagination.d.ts.map +1 -0
- package/dist/definitions/components/table/TablePerPage.d.ts +20 -0
- package/dist/definitions/components/table/TablePerPage.d.ts.map +1 -0
- package/dist/definitions/components/table/TablePredicate.d.ts +21 -0
- package/dist/definitions/components/table/TablePredicate.d.ts.map +1 -0
- package/dist/definitions/components/table/Th.d.ts +8 -0
- package/dist/definitions/components/table/Th.d.ts.map +1 -0
- package/dist/definitions/components/table/index.d.ts +4 -0
- package/dist/definitions/components/table/index.d.ts.map +1 -0
- package/dist/definitions/components/table/useTable.d.ts +11 -0
- package/dist/definitions/components/table/useTable.d.ts.map +1 -0
- package/dist/definitions/hooks/index.d.ts +3 -0
- package/dist/definitions/hooks/index.d.ts.map +1 -0
- package/dist/definitions/hooks/useControlledList.d.ts +25 -0
- package/dist/definitions/hooks/useControlledList.d.ts.map +1 -0
- package/dist/definitions/hooks/useParentHeight.d.ts +5 -0
- package/dist/definitions/hooks/useParentHeight.d.ts.map +1 -0
- package/dist/definitions/index.d.ts +16 -0
- package/dist/definitions/index.d.ts.map +1 -0
- package/dist/definitions/theme/PlasmaColors.d.ts +14 -0
- package/dist/definitions/theme/PlasmaColors.d.ts.map +1 -0
- package/dist/definitions/theme/Plasmantine.d.ts +3 -0
- package/dist/definitions/theme/Plasmantine.d.ts.map +1 -0
- package/dist/definitions/theme/Theme.d.ts +3 -0
- package/dist/definitions/theme/Theme.d.ts.map +1 -0
- package/dist/definitions/theme/index.d.ts +2 -0
- package/dist/definitions/theme/index.d.ts.map +1 -0
- package/dist/esm/__tests__/GlobalSetup.js +7 -0
- package/dist/esm/__tests__/GlobalSetup.js.map +1 -0
- package/dist/esm/__tests__/Setup.js +5 -0
- package/dist/esm/__tests__/Setup.js.map +1 -0
- package/dist/esm/__tests__/SetupAfterEnv.js +15 -0
- package/dist/esm/__tests__/SetupAfterEnv.js.map +1 -0
- package/dist/esm/__tests__/Utils.js +21 -0
- package/dist/esm/__tests__/Utils.js.map +1 -0
- package/dist/esm/components/blank-slate/BlankSlate.js +16 -0
- package/dist/esm/components/blank-slate/BlankSlate.js.map +1 -0
- package/dist/esm/components/blank-slate/index.js +3 -0
- package/dist/esm/components/blank-slate/index.js.map +1 -0
- package/dist/esm/components/code-editor/CodeEditor.example.js +31 -0
- package/dist/esm/components/code-editor/CodeEditor.example.js.map +1 -0
- package/dist/esm/components/code-editor/CodeEditor.js +165 -0
- package/dist/esm/components/code-editor/CodeEditor.js.map +1 -0
- package/dist/esm/components/code-editor/__mocks__/@monaco-editor/react.js +12 -0
- package/dist/esm/components/code-editor/__mocks__/@monaco-editor/react.js.map +1 -0
- package/dist/esm/components/code-editor/index.js +3 -0
- package/dist/esm/components/code-editor/index.js.map +1 -0
- package/dist/esm/components/collection/Collection.example.js +54 -0
- package/dist/esm/components/collection/Collection.example.js.map +1 -0
- package/dist/esm/components/collection/Collection.js +119 -0
- package/dist/esm/components/collection/Collection.js.map +1 -0
- package/dist/esm/components/collection/CollectionItem.js +98 -0
- package/dist/esm/components/collection/CollectionItem.js.map +1 -0
- package/dist/esm/components/collection/Colllection.styles.js +14 -0
- package/dist/esm/components/collection/Colllection.styles.js.map +1 -0
- package/dist/esm/components/collection/index.js +3 -0
- package/dist/esm/components/collection/index.js.map +1 -0
- package/dist/esm/components/date-range-picker/DateRangePickerInlineCalendar.js +92 -0
- package/dist/esm/components/date-range-picker/DateRangePickerInlineCalendar.js.map +1 -0
- package/dist/esm/components/date-range-picker/DateRangePickerPopoverCalendar.js +83 -0
- package/dist/esm/components/date-range-picker/DateRangePickerPopoverCalendar.js.map +1 -0
- package/dist/esm/components/date-range-picker/DateRangePickerPresetSelect.js +53 -0
- package/dist/esm/components/date-range-picker/DateRangePickerPresetSelect.js.map +1 -0
- package/dist/esm/components/date-range-picker/EditableDateRangePicker.js +56 -0
- package/dist/esm/components/date-range-picker/EditableDateRangePicker.js.map +1 -0
- package/dist/esm/components/date-range-picker/index.js +4 -0
- package/dist/esm/components/date-range-picker/index.js.map +1 -0
- package/dist/esm/components/header/Header.js +68 -0
- package/dist/esm/components/header/Header.js.map +1 -0
- package/dist/esm/components/header/index.js +3 -0
- package/dist/esm/components/header/index.js.map +1 -0
- package/dist/esm/components/index.js +11 -0
- package/dist/esm/components/index.js.map +1 -0
- package/dist/esm/components/inline-confirm/InlineConfirm.js +29 -0
- package/dist/esm/components/inline-confirm/InlineConfirm.js.map +1 -0
- package/dist/esm/components/inline-confirm/InlineConfirmButton.js +18 -0
- package/dist/esm/components/inline-confirm/InlineConfirmButton.js.map +1 -0
- package/dist/esm/components/inline-confirm/InlineConfirmContext.js +4 -0
- package/dist/esm/components/inline-confirm/InlineConfirmContext.js.map +1 -0
- package/dist/esm/components/inline-confirm/InlineConfirmPrompt.js +38 -0
- package/dist/esm/components/inline-confirm/InlineConfirmPrompt.js.map +1 -0
- package/dist/esm/components/inline-confirm/index.js +5 -0
- package/dist/esm/components/inline-confirm/index.js.map +1 -0
- package/dist/esm/components/inline-confirm/useInlineConfirm.js +11 -0
- package/dist/esm/components/inline-confirm/useInlineConfirm.js.map +1 -0
- package/dist/esm/components/modal-wizard/ModalWizard.js +122 -0
- package/dist/esm/components/modal-wizard/ModalWizard.js.map +1 -0
- package/dist/esm/components/modal-wizard/ModalWizardStep.js +14 -0
- package/dist/esm/components/modal-wizard/ModalWizardStep.js.map +1 -0
- package/dist/esm/components/modal-wizard/index.js +3 -0
- package/dist/esm/components/modal-wizard/index.js.map +1 -0
- package/dist/esm/components/sticky-footer/StickyFooter.js +40 -0
- package/dist/esm/components/sticky-footer/StickyFooter.js.map +1 -0
- package/dist/esm/components/sticky-footer/index.js +3 -0
- package/dist/esm/components/sticky-footer/index.js.map +1 -0
- package/dist/esm/components/table/Table.js +248 -0
- package/dist/esm/components/table/Table.js.map +1 -0
- package/dist/esm/components/table/TableActions.js +15 -0
- package/dist/esm/components/table/TableActions.js.map +1 -0
- package/dist/esm/components/table/TableCollapsibleColumn.js +25 -0
- package/dist/esm/components/table/TableCollapsibleColumn.js.map +1 -0
- package/dist/esm/components/table/TableContext.js +4 -0
- package/dist/esm/components/table/TableContext.js.map +1 -0
- package/dist/esm/components/table/TableDateRangePicker.js +73 -0
- package/dist/esm/components/table/TableDateRangePicker.js.map +1 -0
- package/dist/esm/components/table/TableFilter.js +43 -0
- package/dist/esm/components/table/TableFilter.js.map +1 -0
- package/dist/esm/components/table/TableFooter.js +13 -0
- package/dist/esm/components/table/TableFooter.js.map +1 -0
- package/dist/esm/components/table/TableHeader.js +27 -0
- package/dist/esm/components/table/TableHeader.js.map +1 -0
- package/dist/esm/components/table/TablePagination.js +37 -0
- package/dist/esm/components/table/TablePagination.js.map +1 -0
- package/dist/esm/components/table/TablePerPage.js +42 -0
- package/dist/esm/components/table/TablePerPage.js.map +1 -0
- package/dist/esm/components/table/TablePredicate.js +35 -0
- package/dist/esm/components/table/TablePredicate.js.map +1 -0
- package/dist/esm/components/table/Th.js +88 -0
- package/dist/esm/components/table/Th.js.map +1 -0
- package/dist/esm/components/table/index.js +4 -0
- package/dist/esm/components/table/index.js.map +1 -0
- package/dist/esm/components/table/useTable.js +11 -0
- package/dist/esm/components/table/useTable.js.map +1 -0
- package/dist/esm/hooks/index.js +4 -0
- package/dist/esm/hooks/index.js.map +1 -0
- package/dist/esm/hooks/useControlledList.js +44 -0
- package/dist/esm/hooks/useControlledList.js.map +1 -0
- package/dist/esm/hooks/useParentHeight.js +28 -0
- package/dist/esm/hooks/useParentHeight.js.map +1 -0
- package/dist/esm/index.js +10 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/theme/PlasmaColors.js +44 -0
- package/dist/esm/theme/PlasmaColors.js.map +1 -0
- package/dist/esm/theme/Plasmantine.js +14 -0
- package/dist/esm/theme/Plasmantine.js.map +1 -0
- package/dist/esm/theme/Theme.js +213 -0
- package/dist/esm/theme/Theme.js.map +1 -0
- package/dist/esm/theme/index.js +3 -0
- package/dist/esm/theme/index.js.map +1 -0
- package/jest.config.js +26 -0
- package/package.json +85 -0
- package/src/__tests__/GlobalSetup.ts +5 -0
- package/src/__tests__/Setup.ts +4 -0
- package/src/__tests__/SetupAfterEnv.ts +16 -0
- package/src/__tests__/Utils.tsx +15 -0
- package/src/components/blank-slate/BlankSlate.tsx +17 -0
- package/src/components/blank-slate/__tests__/BlankSlate.spec.tsx +11 -0
- package/src/components/blank-slate/index.ts +1 -0
- package/src/components/code-editor/CodeEditor.example.tsx +32 -0
- package/src/components/code-editor/CodeEditor.tsx +187 -0
- package/src/components/code-editor/__mocks__/@monaco-editor/react.tsx +10 -0
- package/src/components/code-editor/__tests__/CodeEditor.spec.tsx +37 -0
- package/src/components/code-editor/index.ts +1 -0
- package/src/components/collection/Collection.example.tsx +37 -0
- package/src/components/collection/Collection.tsx +128 -0
- package/src/components/collection/CollectionItem.tsx +88 -0
- package/src/components/collection/Colllection.styles.ts +13 -0
- package/src/components/collection/__tests__/Collection.spec.tsx +243 -0
- package/src/components/collection/index.ts +1 -0
- package/src/components/date-range-picker/DateRangePickerInlineCalendar.tsx +111 -0
- package/src/components/date-range-picker/DateRangePickerPopoverCalendar.tsx +94 -0
- package/src/components/date-range-picker/DateRangePickerPresetSelect.tsx +62 -0
- package/src/components/date-range-picker/EditableDateRangePicker.tsx +59 -0
- package/src/components/date-range-picker/__tests__/DateRangePickerInlineCalendar.spec.tsx +91 -0
- package/src/components/date-range-picker/__tests__/DateRangePickerPopoverCalendar.spec.tsx +101 -0
- package/src/components/date-range-picker/__tests__/DateRangePickerPresetSelect.spec.tsx +53 -0
- package/src/components/date-range-picker/__tests__/EditableDateRangePicker.spec.tsx +47 -0
- package/src/components/date-range-picker/index.tsx +2 -0
- package/src/components/header/Header.tsx +43 -0
- package/src/components/header/__tests__/Header.spec.tsx +79 -0
- package/src/components/header/index.ts +1 -0
- package/src/components/index.ts +9 -0
- package/src/components/inline-confirm/InlineConfirm.tsx +29 -0
- package/src/components/inline-confirm/InlineConfirmButton.tsx +17 -0
- package/src/components/inline-confirm/InlineConfirmContext.ts +9 -0
- package/src/components/inline-confirm/InlineConfirmPrompt.tsx +48 -0
- package/src/components/inline-confirm/__tests__/InlineConfirm.spec.tsx +94 -0
- package/src/components/inline-confirm/index.ts +3 -0
- package/src/components/inline-confirm/useInlineConfirm.ts +12 -0
- package/src/components/modal-wizard/ModalWizard.tsx +211 -0
- package/src/components/modal-wizard/ModalWizardStep.tsx +53 -0
- package/src/components/modal-wizard/__tests__/ModalWizard.spec.tsx +345 -0
- package/src/components/modal-wizard/index.ts +1 -0
- package/src/components/sticky-footer/StickyFooter.tsx +31 -0
- package/src/components/sticky-footer/__tests__/StickyFooter.spec.tsx +20 -0
- package/src/components/sticky-footer/index.ts +1 -0
- package/src/components/table/Table.tsx +293 -0
- package/src/components/table/TableActions.tsx +36 -0
- package/src/components/table/TableCollapsibleColumn.tsx +26 -0
- package/src/components/table/TableContext.tsx +56 -0
- package/src/components/table/TableDateRangePicker.tsx +71 -0
- package/src/components/table/TableFilter.tsx +44 -0
- package/src/components/table/TableFooter.tsx +8 -0
- package/src/components/table/TableHeader.tsx +21 -0
- package/src/components/table/TablePagination.tsx +41 -0
- package/src/components/table/TablePerPage.tsx +49 -0
- package/src/components/table/TablePredicate.tsx +43 -0
- package/src/components/table/Th.tsx +75 -0
- package/src/components/table/__tests__/Table.spec.tsx +128 -0
- package/src/components/table/__tests__/TableActions.spec.tsx +36 -0
- package/src/components/table/__tests__/TableDateRangePicker.spec.tsx +87 -0
- package/src/components/table/__tests__/TableFilter.spec.tsx +39 -0
- package/src/components/table/__tests__/TablePagination.spec.tsx +50 -0
- package/src/components/table/__tests__/TablePerPage.spec.tsx +81 -0
- package/src/components/table/__tests__/TablePredicate.spec.tsx +120 -0
- package/src/components/table/__tests__/Th.spec.tsx +63 -0
- package/src/components/table/index.ts +3 -0
- package/src/components/table/useTable.tsx +11 -0
- package/src/hooks/__tests__/useControlledList.spec.tsx +41 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useControlledList.ts +53 -0
- package/src/hooks/useParentHeight.ts +25 -0
- package/src/index.ts +23 -0
- package/src/theme/PlasmaColors.ts +44 -0
- package/src/theme/Plasmantine.tsx +10 -0
- package/src/theme/Theme.tsx +161 -0
- package/src/theme/index.ts +1 -0
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +11 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import _object_spread from "@swc/helpers/src/_object_spread.mjs";
|
|
2
|
+
import _object_spread_props from "@swc/helpers/src/_object_spread_props.mjs";
|
|
3
|
+
import _object_without_properties from "@swc/helpers/src/_object_without_properties.mjs";
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
5
|
+
import { QuestionSize24Px } from "@coveord/plasma-react-icons";
|
|
6
|
+
import { Anchor, Breadcrumbs, Divider, Group, Stack, Text, Title, Tooltip } from "@mantine/core";
|
|
7
|
+
export var Header = function(_param) /*#__PURE__*/ {
|
|
8
|
+
var description = _param.description, actions = _param.actions, borderBottom = _param.borderBottom, docLink = _param.docLink, docLinkTooltipLabel = _param.docLinkTooltipLabel, children = _param.children, others = _object_without_properties(_param, [
|
|
9
|
+
"description",
|
|
10
|
+
"actions",
|
|
11
|
+
"borderBottom",
|
|
12
|
+
"docLink",
|
|
13
|
+
"docLinkTooltipLabel",
|
|
14
|
+
"children"
|
|
15
|
+
]);
|
|
16
|
+
return _jsxs(_Fragment, {
|
|
17
|
+
children: [
|
|
18
|
+
/*#__PURE__*/ _jsxs(Group, _object_spread_props(_object_spread({
|
|
19
|
+
position: "apart",
|
|
20
|
+
py: "md",
|
|
21
|
+
px: "xl"
|
|
22
|
+
}, others), {
|
|
23
|
+
children: [
|
|
24
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
25
|
+
spacing: "xs",
|
|
26
|
+
children: [
|
|
27
|
+
/*#__PURE__*/ _jsx(Title, {
|
|
28
|
+
order: 4,
|
|
29
|
+
children: /*#__PURE__*/ _jsxs(Group, {
|
|
30
|
+
spacing: 0,
|
|
31
|
+
children: [
|
|
32
|
+
/*#__PURE__*/ _jsx(Breadcrumbs, {
|
|
33
|
+
children: children
|
|
34
|
+
}),
|
|
35
|
+
docLink ? /*#__PURE__*/ _jsx(Tooltip, {
|
|
36
|
+
label: docLinkTooltipLabel,
|
|
37
|
+
position: "bottom",
|
|
38
|
+
children: /*#__PURE__*/ _jsx(Anchor, {
|
|
39
|
+
href: docLink,
|
|
40
|
+
target: "_blank",
|
|
41
|
+
ml: "xs",
|
|
42
|
+
children: /*#__PURE__*/ _jsx(QuestionSize24Px, {
|
|
43
|
+
height: 24
|
|
44
|
+
})
|
|
45
|
+
})
|
|
46
|
+
}) : null
|
|
47
|
+
]
|
|
48
|
+
})
|
|
49
|
+
}),
|
|
50
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
51
|
+
children: description
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
}),
|
|
55
|
+
/*#__PURE__*/ _jsx(Group, {
|
|
56
|
+
spacing: "xs",
|
|
57
|
+
children: actions
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
})),
|
|
61
|
+
borderBottom ? /*#__PURE__*/ _jsx(Divider, {
|
|
62
|
+
size: "xs"
|
|
63
|
+
}) : null
|
|
64
|
+
]
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
//# sourceMappingURL=Header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/header/Header.tsx"],"sourcesContent":["import {QuestionSize24Px} from '@coveord/plasma-react-icons';\nimport {Anchor, Breadcrumbs, DefaultProps, Divider, Group, Stack, Text, Title, Tooltip} from '@mantine/core';\nimport {FunctionComponent, ReactNode} from 'react';\n\ninterface HeaderProps extends DefaultProps {\n description?: ReactNode;\n actions?: ReactNode;\n borderBottom?: boolean;\n docLink?: string;\n docLinkTooltipLabel?: string;\n}\n\nexport const Header: FunctionComponent<HeaderProps> = ({\n description,\n actions,\n borderBottom,\n docLink,\n docLinkTooltipLabel,\n children,\n ...others\n}) => (\n <>\n <Group position=\"apart\" py=\"md\" px=\"xl\" {...others}>\n <Stack spacing=\"xs\">\n <Title order={4}>\n <Group spacing={0}>\n <Breadcrumbs>{children}</Breadcrumbs>\n {docLink ? (\n <Tooltip label={docLinkTooltipLabel} position=\"bottom\">\n <Anchor href={docLink} target=\"_blank\" ml=\"xs\">\n <QuestionSize24Px height={24} />\n </Anchor>\n </Tooltip>\n ) : null}\n </Group>\n </Title>\n <Text>{description}</Text>\n </Stack>\n <Group spacing=\"xs\">{actions}</Group>\n </Group>\n {borderBottom ? <Divider size=\"xs\" /> : null}\n </>\n);\n"],"names":["QuestionSize24Px","Anchor","Breadcrumbs","Divider","Group","Stack","Text","Title","Tooltip","Header","description","actions","borderBottom","docLink","docLinkTooltipLabel","children","others","position","py","px","spacing","order","label","href","target","ml","height","size"],"mappings":"AAAA;;;;AAAA,SAAQA,gBAAgB,QAAO,6BAA6B,CAAC;AAC7D,SAAQC,MAAM,EAAEC,WAAW,EAAgBC,OAAO,EAAEC,KAAK,EAAEC,KAAK,EAAEC,IAAI,EAAEC,KAAK,EAAEC,OAAO,QAAO,eAAe,CAAC;AAW7G,OAAO,IAAMC,MAAM,GAAmC,+BASlD;QARAC,WAAW,UAAXA,WAAW,EACXC,OAAO,UAAPA,OAAO,EACPC,YAAY,UAAZA,YAAY,EACZC,OAAO,UAAPA,OAAO,EACPC,mBAAmB,UAAnBA,mBAAmB,EACnBC,QAAQ,UAARA,QAAQ,EACLC,MAAM;QANTN,aAAW;QACXC,SAAO;QACPC,cAAY;QACZC,SAAO;QACPC,qBAAmB;QACnBC,UAAQ;;WAGR;;0BACI,MAACX,KAAK;gBAACa,QAAQ,EAAC,OAAO;gBAACC,EAAE,EAAC,IAAI;gBAACC,EAAE,EAAC,IAAI;eAAKH,MAAM;;kCAC9C,MAACX,KAAK;wBAACe,OAAO,EAAC,IAAI;;0CACf,KAACb,KAAK;gCAACc,KAAK,EAAE,CAAC;0CACX,cAAA,MAACjB,KAAK;oCAACgB,OAAO,EAAE,CAAC;;sDACb,KAAClB,WAAW;sDAAEa,QAAQ;0CAAe;wCACpCF,OAAO,iBACJ,KAACL,OAAO;4CAACc,KAAK,EAAER,mBAAmB;4CAAEG,QAAQ,EAAC,QAAQ;sDAClD,cAAA,KAAChB,MAAM;gDAACsB,IAAI,EAAEV,OAAO;gDAAEW,MAAM,EAAC,QAAQ;gDAACC,EAAE,EAAC,IAAI;0DAC1C,cAAA,KAACzB,gBAAgB;oDAAC0B,MAAM,EAAE,EAAE;kDAAI;8CAC3B;0CACH,GACV,IAAI;;kCACJ;8BACJ;0CACR,KAACpB,IAAI;0CAAEI,WAAW;8BAAQ;;sBACtB;kCACR,KAACN,KAAK;wBAACgB,OAAO,EAAC,IAAI;kCAAET,OAAO;sBAAS;;eACjC;YACPC,YAAY,iBAAG,KAACT,OAAO;gBAACwB,IAAI,EAAC,IAAI;cAAG,GAAG,IAAI;;MAC7C;AAAD,CACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/header/index.ts"],"sourcesContent":["export * from './Header';\n"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./blank-slate";
|
|
2
|
+
export * from "./code-editor";
|
|
3
|
+
export * from "./collection";
|
|
4
|
+
export * from "./date-range-picker";
|
|
5
|
+
export * from "./sticky-footer";
|
|
6
|
+
export * from "./header";
|
|
7
|
+
export * from "./inline-confirm";
|
|
8
|
+
export * from "./table";
|
|
9
|
+
export * from "./modal-wizard";
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './blank-slate';\nexport * from './code-editor';\nexport * from './collection';\nexport * from './date-range-picker';\nexport * from './sticky-footer';\nexport * from './header';\nexport * from './inline-confirm';\nexport * from './table';\nexport * from './modal-wizard';\n"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Children, useState } from "react";
|
|
4
|
+
import { InlineConfirmButton } from "./InlineConfirmButton";
|
|
5
|
+
import { InlineConfirmContext } from "./InlineConfirmContext";
|
|
6
|
+
import { InlineConfirmPrompt } from "./InlineConfirmPrompt";
|
|
7
|
+
export var InlineConfirm = function(param) {
|
|
8
|
+
var children = param.children;
|
|
9
|
+
var ref = _sliced_to_array(useState(null), 2), confirmingId = ref[0], setConfirmingId = ref[1];
|
|
10
|
+
var convertedChildren = Children.toArray(children);
|
|
11
|
+
var prompt = convertedChildren.find(function(child) {
|
|
12
|
+
return child.type === InlineConfirmPrompt && child.props.id === confirmingId;
|
|
13
|
+
});
|
|
14
|
+
var clearConfirm = function() {
|
|
15
|
+
return setConfirmingId(null);
|
|
16
|
+
};
|
|
17
|
+
return /*#__PURE__*/ _jsx(InlineConfirmContext.Provider, {
|
|
18
|
+
value: {
|
|
19
|
+
confirmingId: confirmingId,
|
|
20
|
+
setConfirmingId: setConfirmingId,
|
|
21
|
+
clearConfirm: clearConfirm
|
|
22
|
+
},
|
|
23
|
+
children: prompt !== null && prompt !== void 0 ? prompt : children
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
InlineConfirm.Prompt = InlineConfirmPrompt;
|
|
27
|
+
InlineConfirm.Button = InlineConfirmButton;
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=InlineConfirm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/inline-confirm/InlineConfirm.tsx"],"sourcesContent":["import {Children, FunctionComponent, ReactElement, useState} from 'react';\n\nimport {InlineConfirmButton} from './InlineConfirmButton';\nimport {InlineConfirmContext} from './InlineConfirmContext';\nimport {InlineConfirmPrompt} from './InlineConfirmPrompt';\n\ntype InlineConfirmType = FunctionComponent & {\n Prompt: typeof InlineConfirmPrompt;\n Button: typeof InlineConfirmButton;\n};\n\nexport const InlineConfirm: InlineConfirmType = ({children}) => {\n const [confirmingId, setConfirmingId] = useState<string | null>(null);\n\n const convertedChildren = Children.toArray(children) as ReactElement[];\n const prompt = convertedChildren.find(\n (child) => child.type === InlineConfirmPrompt && child.props.id === confirmingId\n );\n const clearConfirm = () => setConfirmingId(null);\n\n return (\n <InlineConfirmContext.Provider value={{confirmingId, setConfirmingId, clearConfirm}}>\n {prompt ?? children}\n </InlineConfirmContext.Provider>\n );\n};\n\nInlineConfirm.Prompt = InlineConfirmPrompt;\nInlineConfirm.Button = InlineConfirmButton;\n"],"names":["Children","useState","InlineConfirmButton","InlineConfirmContext","InlineConfirmPrompt","InlineConfirm","children","confirmingId","setConfirmingId","convertedChildren","toArray","prompt","find","child","type","props","id","clearConfirm","Provider","value","Prompt","Button"],"mappings":"AAAA;;AAAA,SAAQA,QAAQ,EAAmCC,QAAQ,QAAO,OAAO,CAAC;AAE1E,SAAQC,mBAAmB,QAAO,uBAAuB,CAAC;AAC1D,SAAQC,oBAAoB,QAAO,wBAAwB,CAAC;AAC5D,SAAQC,mBAAmB,QAAO,uBAAuB,CAAC;AAO1D,OAAO,IAAMC,aAAa,GAAsB,gBAAgB;QAAdC,QAAQ,SAARA,QAAQ;IACtD,IAAwCL,GAA6B,oBAA7BA,QAAQ,CAAgB,IAAI,CAAC,IAAA,EAA9DM,YAAY,GAAqBN,GAA6B,GAAlD,EAAEO,eAAe,GAAIP,GAA6B,GAAjC,AAAkC;IAEtE,IAAMQ,iBAAiB,GAAGT,QAAQ,CAACU,OAAO,CAACJ,QAAQ,CAAC,AAAkB,AAAC;IACvE,IAAMK,MAAM,GAAGF,iBAAiB,CAACG,IAAI,CACjC,SAACC,KAAK;eAAKA,KAAK,CAACC,IAAI,KAAKV,mBAAmB,IAAIS,KAAK,CAACE,KAAK,CAACC,EAAE,KAAKT,YAAY;KAAA,CACnF,AAAC;IACF,IAAMU,YAAY,GAAG;eAAMT,eAAe,CAAC,IAAI,CAAC;KAAA,AAAC;IAEjD,qBACI,KAACL,oBAAoB,CAACe,QAAQ;QAACC,KAAK,EAAE;YAACZ,YAAY,EAAZA,YAAY;YAAEC,eAAe,EAAfA,eAAe;YAAES,YAAY,EAAZA,YAAY;SAAC;kBAC9EN,MAAM,aAANA,MAAM,cAANA,MAAM,GAAIL,QAAQ;MACS,CAClC;AACN,CAAC,CAAC;AAEFD,aAAa,CAACe,MAAM,GAAGhB,mBAAmB,CAAC;AAC3CC,aAAa,CAACgB,MAAM,GAAGnB,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import _object_spread from "@swc/helpers/src/_object_spread.mjs";
|
|
2
|
+
import _object_spread_props from "@swc/helpers/src/_object_spread_props.mjs";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Button } from "@mantine/core";
|
|
5
|
+
import { useInlineConfirm } from "./useInlineConfirm";
|
|
6
|
+
export var InlineConfirmButton = function(props) {
|
|
7
|
+
var setConfirmingId = useInlineConfirm().setConfirmingId;
|
|
8
|
+
var onClick = function(e) {
|
|
9
|
+
var ref;
|
|
10
|
+
setConfirmingId(props.id);
|
|
11
|
+
(ref = props.onClick) === null || ref === void 0 ? void 0 : ref.call(props, e);
|
|
12
|
+
};
|
|
13
|
+
return /*#__PURE__*/ _jsx(Button, _object_spread_props(_object_spread({}, props), {
|
|
14
|
+
onClick: onClick
|
|
15
|
+
}));
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=InlineConfirmButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/inline-confirm/InlineConfirmButton.tsx"],"sourcesContent":["import {Button, ButtonProps} from '@mantine/core';\nimport {HTMLAttributes, MouseEventHandler} from 'react';\nimport {useInlineConfirm} from './useInlineConfirm';\n\ninterface InlineConfirmButtonProps extends ButtonProps, Omit<HTMLAttributes<HTMLButtonElement>, 'color'> {\n id: string;\n}\n\nexport const InlineConfirmButton = (props: InlineConfirmButtonProps) => {\n const {setConfirmingId} = useInlineConfirm();\n const onClick: MouseEventHandler<HTMLButtonElement> = (e) => {\n setConfirmingId(props.id);\n props.onClick?.(e);\n };\n\n return <Button {...props} onClick={onClick} />;\n};\n"],"names":["Button","useInlineConfirm","InlineConfirmButton","props","setConfirmingId","onClick","e","id"],"mappings":"AAAA;;;AAAA,SAAQA,MAAM,QAAoB,eAAe,CAAC;AAElD,SAAQC,gBAAgB,QAAO,oBAAoB,CAAC;AAMpD,OAAO,IAAMC,mBAAmB,GAAG,SAACC,KAA+B,EAAK;IACpE,IAAM,AAACC,eAAe,GAAIH,gBAAgB,EAAE,CAArCG,eAAe,AAAsB,AAAC;IAC7C,IAAMC,OAAO,GAAyC,SAACC,CAAC,EAAK;YAEzDH,GAAa;QADbC,eAAe,CAACD,KAAK,CAACI,EAAE,CAAC,CAAC;QAC1BJ,CAAAA,GAAa,GAAbA,KAAK,CAACE,OAAO,cAAbF,GAAa,WAAK,GAAlBA,KAAAA,CAAkB,GAAlBA,GAAa,CAAbA,IAAkB,CAAlBA,KAAK,EAAWG,CAAC,CAAC,CAAC;IACvB,CAAC,AAAC;IAEF,qBAAO,KAACN,MAAM,0CAAKG,KAAK;QAAEE,OAAO,EAAEA,OAAO;OAAI,CAAC;AACnD,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/inline-confirm/InlineConfirmContext.ts"],"sourcesContent":["import {createContext} from 'react';\n\ntype InlineConfirmContextType = {\n confirmingId: string;\n setConfirmingId: (id: string) => void;\n clearConfirm: () => void;\n};\n\nexport const InlineConfirmContext = createContext<InlineConfirmContextType | null>(null);\n"],"names":["createContext","InlineConfirmContext"],"mappings":"AAAA,SAAQA,aAAa,QAAO,OAAO,CAAC;AAQpC,OAAO,IAAMC,oBAAoB,GAAGD,aAAa,CAAkC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Group } from "@mantine/core";
|
|
3
|
+
import { useEffect } from "react";
|
|
4
|
+
import { useInlineConfirm } from "./useInlineConfirm";
|
|
5
|
+
export var InlineConfirmPrompt = function(param) {
|
|
6
|
+
var id = param.id, label = param.label, _confirmLabel = param.confirmLabel, confirmLabel = _confirmLabel === void 0 ? "Delete" : _confirmLabel, _cancelLabel = param.cancelLabel, cancelLabel = _cancelLabel === void 0 ? "Cancel" : _cancelLabel, onConfirm = param.onConfirm;
|
|
7
|
+
var ref = useInlineConfirm(), confirmingId = ref.confirmingId, clearConfirm = ref.clearConfirm;
|
|
8
|
+
var onClickConfirm = function() {
|
|
9
|
+
onConfirm();
|
|
10
|
+
clearConfirm();
|
|
11
|
+
};
|
|
12
|
+
useEffect(function() {
|
|
13
|
+
if (confirmingId !== id) {
|
|
14
|
+
clearConfirm();
|
|
15
|
+
}
|
|
16
|
+
}, []);
|
|
17
|
+
if (confirmingId === id) {
|
|
18
|
+
return /*#__PURE__*/ _jsxs(Group, {
|
|
19
|
+
spacing: "xs",
|
|
20
|
+
children: [
|
|
21
|
+
label,
|
|
22
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
23
|
+
onClick: onClickConfirm,
|
|
24
|
+
color: "red",
|
|
25
|
+
children: confirmLabel
|
|
26
|
+
}),
|
|
27
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
28
|
+
onClick: clearConfirm,
|
|
29
|
+
variant: "outline",
|
|
30
|
+
children: cancelLabel
|
|
31
|
+
})
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return null;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=InlineConfirmPrompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/inline-confirm/InlineConfirmPrompt.tsx"],"sourcesContent":["import {Button, Group} from '@mantine/core';\nimport {FunctionComponent, ReactNode, useEffect} from 'react';\n\nimport {useInlineConfirm} from './useInlineConfirm';\n\ninterface InlineConfirmPromptProps {\n id: string;\n label: ReactNode;\n onConfirm: () => void;\n confirmLabel?: ReactNode;\n cancelLabel?: ReactNode;\n}\n\nexport const InlineConfirmPrompt: FunctionComponent<InlineConfirmPromptProps> = ({\n id,\n label,\n confirmLabel = 'Delete',\n cancelLabel = 'Cancel',\n onConfirm,\n}) => {\n const {confirmingId, clearConfirm} = useInlineConfirm();\n\n const onClickConfirm = () => {\n onConfirm();\n clearConfirm();\n };\n\n useEffect(() => {\n if (confirmingId !== id) {\n clearConfirm();\n }\n }, []);\n\n if (confirmingId === id) {\n return (\n <Group spacing=\"xs\">\n {label}\n <Button onClick={onClickConfirm} color=\"red\">\n {confirmLabel}\n </Button>\n <Button onClick={clearConfirm} variant=\"outline\">\n {cancelLabel}\n </Button>\n </Group>\n );\n }\n return null;\n};\n"],"names":["Button","Group","useEffect","useInlineConfirm","InlineConfirmPrompt","id","label","confirmLabel","cancelLabel","onConfirm","confirmingId","clearConfirm","onClickConfirm","spacing","onClick","color","variant"],"mappings":"AAAA;AAAA,SAAQA,MAAM,EAAEC,KAAK,QAAO,eAAe,CAAC;AAC5C,SAAsCC,SAAS,QAAO,OAAO,CAAC;AAE9D,SAAQC,gBAAgB,QAAO,oBAAoB,CAAC;AAUpD,OAAO,IAAMC,mBAAmB,GAAgD,gBAM1E;QALFC,EAAE,SAAFA,EAAE,EACFC,KAAK,SAALA,KAAK,wBACLC,YAAY,EAAZA,YAAY,8BAAG,QAAQ,gBAAA,uBACvBC,WAAW,EAAXA,WAAW,6BAAG,QAAQ,eAAA,EACtBC,SAAS,SAATA,SAAS;IAET,IAAqCN,GAAkB,GAAlBA,gBAAgB,EAAE,EAAhDO,YAAY,GAAkBP,GAAkB,CAAhDO,YAAY,EAAEC,YAAY,GAAIR,GAAkB,CAAlCQ,YAAY,AAAuB;IAExD,IAAMC,cAAc,GAAG,WAAM;QACzBH,SAAS,EAAE,CAAC;QACZE,YAAY,EAAE,CAAC;IACnB,CAAC,AAAC;IAEFT,SAAS,CAAC,WAAM;QACZ,IAAIQ,YAAY,KAAKL,EAAE,EAAE;YACrBM,YAAY,EAAE,CAAC;QACnB,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAID,YAAY,KAAKL,EAAE,EAAE;QACrB,qBACI,MAACJ,KAAK;YAACY,OAAO,EAAC,IAAI;;gBACdP,KAAK;8BACN,KAACN,MAAM;oBAACc,OAAO,EAAEF,cAAc;oBAAEG,KAAK,EAAC,KAAK;8BACvCR,YAAY;kBACR;8BACT,KAACP,MAAM;oBAACc,OAAO,EAAEH,YAAY;oBAAEK,OAAO,EAAC,SAAS;8BAC3CR,WAAW;kBACP;;UACL,CACV;IACN,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/inline-confirm/index.ts"],"sourcesContent":["export * from './InlineConfirm';\nexport * from './useInlineConfirm';\nexport * from './InlineConfirmContext';\n"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { InlineConfirmContext } from "./InlineConfirmContext";
|
|
3
|
+
export var useInlineConfirm = function() {
|
|
4
|
+
var ctx = useContext(InlineConfirmContext);
|
|
5
|
+
if (ctx === null) {
|
|
6
|
+
throw new Error("useConfirm must be used inside of a InlineConfirmContext.Provider");
|
|
7
|
+
}
|
|
8
|
+
return ctx;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=useInlineConfirm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/inline-confirm/useInlineConfirm.ts"],"sourcesContent":["import {useContext} from 'react';\nimport {InlineConfirmContext} from './InlineConfirmContext';\n\nexport const useInlineConfirm = () => {\n const ctx = useContext(InlineConfirmContext);\n\n if (ctx === null) {\n throw new Error('useConfirm must be used inside of a InlineConfirmContext.Provider');\n }\n\n return ctx;\n};\n"],"names":["useContext","InlineConfirmContext","useInlineConfirm","ctx","Error"],"mappings":"AAAA,SAAQA,UAAU,QAAO,OAAO,CAAC;AACjC,SAAQC,oBAAoB,QAAO,wBAAwB,CAAC;AAE5D,OAAO,IAAMC,gBAAgB,GAAG,WAAM;IAClC,IAAMC,GAAG,GAAGH,UAAU,CAACC,oBAAoB,CAAC,AAAC;IAE7C,IAAIE,GAAG,KAAK,IAAI,EAAE;QACd,MAAM,IAAIC,KAAK,CAAC,mEAAmE,CAAC,CAAC;IACzF,CAAC;IAED,OAAOD,GAAG,CAAC;AACf,CAAC,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import _object_spread from "@swc/helpers/src/_object_spread.mjs";
|
|
2
|
+
import _object_spread_props from "@swc/helpers/src/_object_spread_props.mjs";
|
|
3
|
+
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Button, createStyles, Modal, Progress } from "@mantine/core";
|
|
6
|
+
import { Children, useMemo, useState } from "react";
|
|
7
|
+
import { StickyFooter } from "../sticky-footer";
|
|
8
|
+
import { ModalWizardStep } from "./ModalWizardStep";
|
|
9
|
+
import { Header } from "../header";
|
|
10
|
+
var useStyles = createStyles(function() {
|
|
11
|
+
return {
|
|
12
|
+
modal: {
|
|
13
|
+
height: "70%",
|
|
14
|
+
display: "flex",
|
|
15
|
+
flexDirection: "column"
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
export var ModalWizard = function(param) {
|
|
20
|
+
var _cancelButtonLabel = param.cancelButtonLabel, cancelButtonLabel = _cancelButtonLabel === void 0 ? "Cancel" : _cancelButtonLabel, _nextButtonLabel = param.nextButtonLabel, nextButtonLabel = _nextButtonLabel === void 0 ? "Next" : _nextButtonLabel, _previousButtonLabel = param.previousButtonLabel, previousButtonLabel = _previousButtonLabel === void 0 ? "Previous" : _previousButtonLabel, _finishButtonLabel = param.finishButtonLabel, finishButtonLabel = _finishButtonLabel === void 0 ? "Finish" : _finishButtonLabel, onNext = param.onNext, onPrevious = param.onPrevious, onClose = param.onClose, onFinish = param.onFinish, isDirty = param.isDirty, modalProps = param.modalProps, handleDirtyState = param.handleDirtyState, closeButtonLabel = param.closeButtonLabel, children = param.children;
|
|
21
|
+
var ref, ref1;
|
|
22
|
+
var ref2 = _sliced_to_array(useState(0), 2), currentStepIndex = ref2[0], setCurrentStepIndex = ref2[1];
|
|
23
|
+
var modalSteps = Children.toArray(children).filter(function(child) {
|
|
24
|
+
return child.type === ModalWizardStep;
|
|
25
|
+
});
|
|
26
|
+
var numberOfSteps = modalSteps.length;
|
|
27
|
+
var numberOfStepsCountAsProgress = modalSteps.filter(function(step) {
|
|
28
|
+
return step.props.countsAsProgress;
|
|
29
|
+
}).length;
|
|
30
|
+
var isFirstStep = currentStepIndex === 0;
|
|
31
|
+
var isLastStep = currentStepIndex === numberOfSteps - 1;
|
|
32
|
+
var currentStep = modalSteps.filter(function(step, index) {
|
|
33
|
+
return index === currentStepIndex;
|
|
34
|
+
})[0];
|
|
35
|
+
var ref3;
|
|
36
|
+
var isValid = ((ref3 = currentStep === null || currentStep === void 0 ? void 0 : (ref = currentStep.props) === null || ref === void 0 ? void 0 : (ref1 = ref.validateStep) === null || ref1 === void 0 ? void 0 : ref1.call(ref, currentStepIndex, numberOfSteps)) !== null && ref3 !== void 0 ? ref3 : {
|
|
37
|
+
isValid: true
|
|
38
|
+
}).isValid;
|
|
39
|
+
var isModalDirty = isDirty && isDirty();
|
|
40
|
+
var classes = useStyles().classes;
|
|
41
|
+
var closeModalWizard = function() {
|
|
42
|
+
if (isModalDirty && handleDirtyState) {
|
|
43
|
+
handleDirtyState() && (onClose === null || onClose === void 0 ? void 0 : onClose());
|
|
44
|
+
} else {
|
|
45
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var getProgress = function(currStepIndex) {
|
|
49
|
+
var validSteps = modalSteps.filter(function(step, index) {
|
|
50
|
+
return step.props.countsAsProgress && index <= currStepIndex;
|
|
51
|
+
}).length;
|
|
52
|
+
return validSteps / numberOfStepsCountAsProgress * 100;
|
|
53
|
+
};
|
|
54
|
+
var getProgressMemo = useMemo(function() {
|
|
55
|
+
return getProgress(currentStepIndex);
|
|
56
|
+
}, [
|
|
57
|
+
currentStepIndex
|
|
58
|
+
]);
|
|
59
|
+
return /*#__PURE__*/ _jsxs(Modal, _object_spread_props(_object_spread({
|
|
60
|
+
opened: true,
|
|
61
|
+
classNames: {
|
|
62
|
+
modal: classes.modal
|
|
63
|
+
},
|
|
64
|
+
centered: true,
|
|
65
|
+
closeButtonLabel: closeButtonLabel,
|
|
66
|
+
padding: "xl",
|
|
67
|
+
title: /*#__PURE__*/ _jsx(Header, {
|
|
68
|
+
docLink: currentStep.props.docLin,
|
|
69
|
+
description: typeof currentStep.props.description === "function" ? currentStep.props.description(currentStepIndex + 1, numberOfSteps) : currentStep.props.description,
|
|
70
|
+
py: null,
|
|
71
|
+
px: null,
|
|
72
|
+
children: typeof currentStep.props.title === "function" ? currentStep.props.title(currentStepIndex + 1, numberOfSteps) : currentStep.props.title
|
|
73
|
+
}),
|
|
74
|
+
onClose: closeModalWizard
|
|
75
|
+
}, modalProps), {
|
|
76
|
+
children: [
|
|
77
|
+
currentStep.props.showProgressBar && /*#__PURE__*/ _jsx(Progress, {
|
|
78
|
+
value: getProgressMemo
|
|
79
|
+
}),
|
|
80
|
+
currentStep,
|
|
81
|
+
/*#__PURE__*/ _jsxs(StickyFooter, {
|
|
82
|
+
borderTop: true,
|
|
83
|
+
py: null,
|
|
84
|
+
px: null,
|
|
85
|
+
pt: "md",
|
|
86
|
+
children: [
|
|
87
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
88
|
+
name: isFirstStep ? cancelButtonLabel : previousButtonLabel,
|
|
89
|
+
disabled: false,
|
|
90
|
+
size: "md",
|
|
91
|
+
variant: "outline",
|
|
92
|
+
onClick: function() {
|
|
93
|
+
if (isFirstStep) {
|
|
94
|
+
closeModalWizard();
|
|
95
|
+
} else {
|
|
96
|
+
onPrevious === null || onPrevious === void 0 ? void 0 : onPrevious();
|
|
97
|
+
setCurrentStepIndex(currentStepIndex - 1);
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
children: isFirstStep ? cancelButtonLabel : previousButtonLabel
|
|
101
|
+
}),
|
|
102
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
103
|
+
disabled: !isValid,
|
|
104
|
+
size: "md",
|
|
105
|
+
onClick: function() {
|
|
106
|
+
if (isLastStep) {
|
|
107
|
+
onFinish ? onFinish() : onClose();
|
|
108
|
+
} else {
|
|
109
|
+
onNext === null || onNext === void 0 ? void 0 : onNext();
|
|
110
|
+
setCurrentStepIndex(currentStepIndex + 1);
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
children: isLastStep ? finishButtonLabel : nextButtonLabel
|
|
114
|
+
})
|
|
115
|
+
]
|
|
116
|
+
})
|
|
117
|
+
]
|
|
118
|
+
}));
|
|
119
|
+
};
|
|
120
|
+
ModalWizard.Step = ModalWizardStep;
|
|
121
|
+
|
|
122
|
+
//# sourceMappingURL=ModalWizard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/modal-wizard/ModalWizard.tsx"],"sourcesContent":["import {Button, createStyles, Modal, Progress} from '@mantine/core';\nimport {Children, ReactElement, useMemo, useState} from 'react';\nimport {StickyFooter} from '../sticky-footer';\nimport {ModalWizardStep} from './ModalWizardStep';\nimport {Header} from '../header';\n\ninterface ModalWizardProps {\n /**\n * The label of the cancel button\n *\n * @default \"Cancel\"\n */\n cancelButtonLabel?: string;\n\n /**\n * The label of the next button\n *\n * @default \"Next\"\n */\n\n nextButtonLabel?: string;\n /**\n * The label of the previous button\n *\n * @default \"Previous\"\n */\n previousButtonLabel?: string;\n /**\n * The label of the finish button\n *\n * @default \"Finish\"\n */\n\n finishButtonLabel?: string;\n\n /**\n * A callback function that is executed when the user clicks on the next button\n */\n onNext?: () => unknown;\n\n /**\n * A callback function that is executed when the user clicks on the previous button\n */\n onPrevious?: () => unknown;\n\n /**\n * A callback function that is executed when the user clicks on the cancel button\n */\n\n onClose?: () => unknown;\n\n /**\n * A function that is executed when user completes all the steps.\n *\n * @param close A function that closes the modal when called.\n */\n onFinish?: () => unknown;\n\n /**\n * Determine if user interacted with any steps in the modal wizard\n */\n\n isDirty?: () => boolean;\n\n /**\n * A function to confirm close if the state is dirty before closing\n */\n handleDirtyState?: () => boolean;\n\n /**\n * Props to pass to each modal\n */\n modalProps?: any;\n\n /**\n * Label for close button\n */\n closeButtonLabel?: string;\n\n /**\n * Children to display in modal wizard\n * */\n children?: Array<ReturnType<typeof ModalWizardStep>>;\n}\n\nconst useStyles = createStyles(() => ({\n modal: {\n height: '70%',\n display: 'flex',\n flexDirection: 'column',\n },\n}));\n\ninterface ModalWizardType {\n <T>(props: ModalWizardProps): ReactElement;\n\n Step: typeof ModalWizardStep;\n}\n\nexport const ModalWizard: ModalWizardType = ({\n cancelButtonLabel = 'Cancel',\n nextButtonLabel = 'Next',\n previousButtonLabel = 'Previous',\n finishButtonLabel = 'Finish',\n onNext,\n onPrevious,\n onClose,\n onFinish,\n isDirty,\n modalProps,\n handleDirtyState,\n closeButtonLabel,\n children,\n}) => {\n const [currentStepIndex, setCurrentStepIndex] = useState(0);\n const modalSteps = (Children.toArray(children) as ReactElement[]).filter((child) => child.type === ModalWizardStep);\n\n const numberOfSteps = modalSteps.length;\n const numberOfStepsCountAsProgress = modalSteps.filter((step) => step.props.countsAsProgress).length;\n const isFirstStep = currentStepIndex === 0;\n const isLastStep = currentStepIndex === numberOfSteps - 1;\n const currentStep = modalSteps.filter((step: ReactElement, index: number) => index === currentStepIndex)[0];\n\n const {isValid} = currentStep?.props?.validateStep?.(currentStepIndex, numberOfSteps) ?? {isValid: true};\n const isModalDirty = isDirty && isDirty();\n\n const {classes} = useStyles();\n\n const closeModalWizard = () => {\n if (isModalDirty && handleDirtyState) {\n handleDirtyState() && onClose?.();\n } else {\n onClose?.();\n }\n };\n\n const getProgress = (currStepIndex: number) => {\n const validSteps = modalSteps.filter(\n (step, index) => step.props.countsAsProgress && index <= currStepIndex\n ).length;\n return (validSteps / numberOfStepsCountAsProgress) * 100;\n };\n\n const getProgressMemo = useMemo(() => getProgress(currentStepIndex), [currentStepIndex]);\n\n return (\n <Modal\n opened\n classNames={{modal: classes.modal}}\n centered\n closeButtonLabel={closeButtonLabel}\n padding=\"xl\"\n title={\n <Header\n docLink={currentStep.props.docLin}\n description={\n typeof currentStep.props.description === 'function'\n ? currentStep.props.description(currentStepIndex + 1, numberOfSteps)\n : currentStep.props.description\n }\n py={null}\n px={null}\n >\n {typeof currentStep.props.title === 'function'\n ? currentStep.props.title(currentStepIndex + 1, numberOfSteps)\n : currentStep.props.title}\n </Header>\n }\n onClose={closeModalWizard}\n {...modalProps}\n >\n {currentStep.props.showProgressBar && <Progress value={getProgressMemo} />}\n {currentStep}\n <StickyFooter borderTop py={null} px={null} pt=\"md\">\n <Button\n name={isFirstStep ? cancelButtonLabel : previousButtonLabel}\n disabled={false}\n size=\"md\"\n variant=\"outline\"\n onClick={() => {\n if (isFirstStep) {\n closeModalWizard();\n } else {\n onPrevious?.();\n setCurrentStepIndex(currentStepIndex - 1);\n }\n }}\n >\n {isFirstStep ? cancelButtonLabel : previousButtonLabel}\n </Button>\n\n <Button\n disabled={!isValid}\n size=\"md\"\n onClick={() => {\n if (isLastStep) {\n onFinish ? onFinish() : onClose();\n } else {\n onNext?.();\n setCurrentStepIndex(currentStepIndex + 1);\n }\n }}\n >\n {isLastStep ? finishButtonLabel : nextButtonLabel}\n </Button>\n </StickyFooter>\n </Modal>\n );\n};\n\nModalWizard.Step = ModalWizardStep;\n"],"names":["Button","createStyles","Modal","Progress","Children","useMemo","useState","StickyFooter","ModalWizardStep","Header","useStyles","modal","height","display","flexDirection","ModalWizard","cancelButtonLabel","nextButtonLabel","previousButtonLabel","finishButtonLabel","onNext","onPrevious","onClose","onFinish","isDirty","modalProps","handleDirtyState","closeButtonLabel","children","currentStep","currentStepIndex","setCurrentStepIndex","modalSteps","toArray","filter","child","type","numberOfSteps","length","numberOfStepsCountAsProgress","step","props","countsAsProgress","isFirstStep","isLastStep","index","isValid","validateStep","isModalDirty","classes","closeModalWizard","getProgress","currStepIndex","validSteps","getProgressMemo","opened","classNames","centered","padding","title","docLink","docLin","description","py","px","showProgressBar","value","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AAGF,eAAe;sBAC5C;;cACE;;OACX,CACV;AACN,CAAC,CAAC;AAEFF,WAAW,CAAC2D,IAAI,GAAGlE,eAAe,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
var ModalWizardStep = function(param) {
|
|
3
|
+
var children = param.children;
|
|
4
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
5
|
+
children: children
|
|
6
|
+
});
|
|
7
|
+
};
|
|
8
|
+
ModalWizardStep.defaultProps = {
|
|
9
|
+
showProgressBar: true,
|
|
10
|
+
countsAsProgress: true
|
|
11
|
+
};
|
|
12
|
+
export { ModalWizardStep };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=ModalWizardStep.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/modal-wizard/ModalWizardStep.tsx"],"sourcesContent":["import {FunctionComponent, ReactElement} from 'react';\n\ntype DependsOnStep<T> = (currentStep: number, numberOfSteps: number) => T;\n\nexport interface ModalWizardStepProps {\n /**\n * The title of the current step. The title can be dependent on the current step if needed\n */\n title?: string | ReactElement | DependsOnStep<string | ReactElement>;\n\n /**\n * The description of the current step. The description can be dependent on the current step if needed\n */\n description?: string | ReactElement | DependsOnStep<string | ReactElement>;\n\n /**\n * A link to the documentation for the current step\n */\n docLink: string;\n\n /**\n * A tooltip label for the docLink\n */\n docLinkTooltipLabel?: string | ReactElement | DependsOnStep<string | ReactElement>;\n\n /**\n * A function to validate the current step, it determines if the next step should be enabled or not.\n */\n validateStep: (currentStep: any, numberOfSteps: any) => {isValid: boolean; messsage?: unknown};\n\n /**\n * Show progress bar at this step\n *\n * @default true\n */\n showProgressBar?: boolean;\n\n /**\n * Does completion of current step count moves the progress bar\n *\n * @default true\n */\n countsAsProgress?: boolean;\n}\n\nconst ModalWizardStep: FunctionComponent<ModalWizardStepProps> = ({children}) => <div>{children}</div>;\n\nModalWizardStep.defaultProps = {\n showProgressBar: true,\n countsAsProgress: true,\n};\n\nexport {ModalWizardStep};\n"],"names":["ModalWizardStep","children","div","defaultProps","showProgressBar","countsAsProgress"],"mappings":"AAAA;AA6CA,IAAMA,eAAe,GAA4C;QAAEC,QAAQ,SAARA,QAAQ;yBAAM,KAACC,KAAG;kBAAED,QAAQ;MAAO;CAAA,AAAC;AAEvGD,eAAe,CAACG,YAAY,GAAG;IAC3BC,eAAe,EAAE,IAAI;IACrBC,gBAAgB,EAAE,IAAI;CACzB,CAAC;AAEF,SAAQL,eAAe,GAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/modal-wizard/index.ts"],"sourcesContent":["export * from './ModalWizard';\n"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import _object_spread from "@swc/helpers/src/_object_spread.mjs";
|
|
2
|
+
import _object_spread_props from "@swc/helpers/src/_object_spread_props.mjs";
|
|
3
|
+
import _object_without_properties from "@swc/helpers/src/_object_without_properties.mjs";
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { createStyles, Divider, Group, Paper } from "@mantine/core";
|
|
6
|
+
var useStyles = createStyles(function() {
|
|
7
|
+
return {
|
|
8
|
+
footer: {
|
|
9
|
+
position: "sticky",
|
|
10
|
+
bottom: 0,
|
|
11
|
+
zIndex: 1,
|
|
12
|
+
maxHeight: "80px"
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
});
|
|
16
|
+
export var StickyFooter = function(_param) {
|
|
17
|
+
var borderTop = _param.borderTop, children = _param.children, others = _object_without_properties(_param, [
|
|
18
|
+
"borderTop",
|
|
19
|
+
"children"
|
|
20
|
+
]);
|
|
21
|
+
var classes = useStyles().classes;
|
|
22
|
+
return /*#__PURE__*/ _jsxs(Paper, {
|
|
23
|
+
className: classes.footer,
|
|
24
|
+
children: [
|
|
25
|
+
borderTop ? /*#__PURE__*/ _jsx(Divider, {
|
|
26
|
+
size: "xs"
|
|
27
|
+
}) : null,
|
|
28
|
+
/*#__PURE__*/ _jsx(Group, _object_spread_props(_object_spread({
|
|
29
|
+
position: "right",
|
|
30
|
+
spacing: "xs",
|
|
31
|
+
py: "md",
|
|
32
|
+
px: "xl"
|
|
33
|
+
}, others), {
|
|
34
|
+
children: children
|
|
35
|
+
}))
|
|
36
|
+
]
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=StickyFooter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/sticky-footer/StickyFooter.tsx"],"sourcesContent":["import {createStyles, DefaultProps, Divider, Group, Paper} from '@mantine/core';\nimport {FunctionComponent} from 'react';\n\ninterface StickyFooterProps extends DefaultProps {\n /**\n * Whether a border is render on top of the footer\n */\n borderTop?: boolean;\n}\n\nconst useStyles = createStyles(() => ({\n footer: {\n position: 'sticky',\n bottom: 0,\n zIndex: 1,\n maxHeight: '80px',\n },\n}));\n\nexport const StickyFooter: FunctionComponent<StickyFooterProps> = ({borderTop, children, ...others}) => {\n const {classes} = useStyles();\n\n return (\n <Paper className={classes.footer}>\n {borderTop ? <Divider size=\"xs\" /> : null}\n <Group position=\"right\" spacing=\"xs\" py=\"md\" px=\"xl\" {...others}>\n {children}\n </Group>\n </Paper>\n );\n};\n"],"names":["createStyles","Divider","Group","Paper","useStyles","footer","position","bottom","zIndex","maxHeight","StickyFooter","borderTop","children","others","classes","className","size","spacing","py","px"],"mappings":"AAAA;;;;AAAA,SAAQA,YAAY,EAAgBC,OAAO,EAAEC,KAAK,EAAEC,KAAK,QAAO,eAAe,CAAC;AAUhF,IAAMC,SAAS,GAAGJ,YAAY,CAAC;WAAO;QAClCK,MAAM,EAAE;YACJC,QAAQ,EAAE,QAAQ;YAClBC,MAAM,EAAE,CAAC;YACTC,MAAM,EAAE,CAAC;YACTC,SAAS,EAAE,MAAM;SACpB;KACJ;CAAC,CAAC,AAAC;AAEJ,OAAO,IAAMC,YAAY,GAAyC,iBAAsC;QAApCC,SAAS,UAATA,SAAS,EAAEC,QAAQ,UAARA,QAAQ,EAAKC,MAAM;QAA9BF,WAAS;QAAEC,UAAQ;;IACnF,IAAM,AAACE,OAAO,GAAIV,SAAS,EAAE,CAAtBU,OAAO,AAAe,AAAC;IAE9B,qBACI,MAACX,KAAK;QAACY,SAAS,EAAED,OAAO,CAACT,MAAM;;YAC3BM,SAAS,iBAAG,KAACV,OAAO;gBAACe,IAAI,EAAC,IAAI;cAAG,GAAG,IAAI;0BACzC,KAACd,KAAK;gBAACI,QAAQ,EAAC,OAAO;gBAACW,OAAO,EAAC,IAAI;gBAACC,EAAE,EAAC,IAAI;gBAACC,EAAE,EAAC,IAAI;eAAKN,MAAM;0BAC1DD,QAAQ;eACL;;MACJ,CACV;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/sticky-footer/index.ts"],"sourcesContent":["export * from './StickyFooter';\n"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|