@turnit-ou/shared 0.0.0-stage → 2.18.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/@types/@mui/index.d.ts +125 -0
- package/@types/axios/index.d.ts +7 -0
- package/@types/openapi-client-axios/index.d.ts +5 -0
- package/@types/openapi-typescript/index.d.ts +71 -0
- package/@types/react-final-form-arrays/index.d.ts +75 -0
- package/@types/react-table/index.d.ts +292 -0
- package/components/Alert/AlertTemplate.d.ts +3 -0
- package/components/Alert/AlertTemplate.js +66 -0
- package/components/Alert/index.d.ts +4 -0
- package/components/Alert/index.js +17 -0
- package/components/ConfirmButton.d.ts +15 -0
- package/components/ConfirmButton.js +47 -0
- package/components/Drawer.d.ts +4 -0
- package/components/Drawer.js +24 -0
- package/components/DrawerForm/DrawerFormCardActions.d.ts +5 -0
- package/components/DrawerForm/DrawerFormCardActions.js +21 -0
- package/components/DrawerForm/DrawerFormCloseButton.d.ts +3 -0
- package/components/DrawerForm/DrawerFormCloseButton.js +5 -0
- package/components/DrawerForm/DrawerFormContext.d.ts +7 -0
- package/components/DrawerForm/DrawerFormContext.js +4 -0
- package/components/DrawerForm.d.ts +10 -0
- package/components/DrawerForm.js +84 -0
- package/components/Editor/Editor.d.ts +9 -0
- package/components/Editor/Editor.js +36 -0
- package/components/Editor/Toolbar.d.ts +7 -0
- package/components/Editor/Toolbar.js +31 -0
- package/components/Editor/buttons/FormatLinkButton.d.ts +5 -0
- package/components/Editor/buttons/FormatLinkButton.js +64 -0
- package/components/Editor/buttons/InsertImageButton.d.ts +5 -0
- package/components/Editor/buttons/InsertImageButton.js +59 -0
- package/components/Editor/buttons.d.ts +15 -0
- package/components/Editor/buttons.js +70 -0
- package/components/Editor/createButton.d.ts +28 -0
- package/components/Editor/createButton.js +68 -0
- package/components/Editor/editor.scss +45 -0
- package/components/Ellipsis.d.ts +9 -0
- package/components/Ellipsis.js +22 -0
- package/components/EllipsisText.d.ts +8 -0
- package/components/EllipsisText.js +25 -0
- package/components/EnvironmentBanner.d.ts +8 -0
- package/components/EnvironmentBanner.js +25 -0
- package/components/Header/AccessibilityModal.d.ts +5 -0
- package/components/Header/AccessibilityModal.js +28 -0
- package/components/Header/AllowedBusinessEntityModal.d.ts +9 -0
- package/components/Header/AllowedBusinessEntityModal.js +24 -0
- package/components/Header/LanguageSelect.d.ts +2 -0
- package/components/Header/LanguageSelect.js +80 -0
- package/components/Header/MenuItems.d.ts +9 -0
- package/components/Header/MenuItems.js +55 -0
- package/components/Header/ModuleIcon.d.ts +7 -0
- package/components/Header/ModuleIcon.js +119 -0
- package/components/Header/index.d.ts +44 -0
- package/components/Header/index.js +89 -0
- package/components/Layout/LayoutCol.d.ts +8 -0
- package/components/Layout/LayoutCol.js +26 -0
- package/components/Layout/index.d.ts +32 -0
- package/components/Layout/index.js +56 -0
- package/components/Loadable.d.ts +11 -0
- package/components/Loadable.js +3 -0
- package/components/SearchCard.d.ts +8 -0
- package/components/SearchCard.js +81 -0
- package/components/SearchForm.d.ts +14 -0
- package/components/SearchForm.js +51 -0
- package/components/SearchFormTable.d.ts +8 -0
- package/components/SearchFormTable.js +32 -0
- package/components/SearchResult.d.ts +13 -0
- package/components/SearchResult.js +67 -0
- package/components/Table/TableCaption.d.ts +6 -0
- package/components/Table/TableCaption.js +25 -0
- package/components/Table/TableCell.d.ts +17 -0
- package/components/Table/TableCell.js +45 -0
- package/components/Table/TableCellEditable.d.ts +28 -0
- package/components/Table/TableCellEditable.js +151 -0
- package/components/Table/TableCellEditableAction.d.ts +13 -0
- package/components/Table/TableCellEditableAction.js +70 -0
- package/components/Table/TableCellEditableField.d.ts +17 -0
- package/components/Table/TableCellEditableField.js +1 -0
- package/components/Table/TableCellEditableTimeDuration.d.ts +13 -0
- package/components/Table/TableCellEditableTimeDuration.js +12 -0
- package/components/Table/TableContext.d.ts +11 -0
- package/components/Table/TableContext.js +4 -0
- package/components/Table/TablePagination.d.ts +5 -0
- package/components/Table/TablePagination.js +84 -0
- package/components/Table.d.ts +53 -0
- package/components/Table.js +389 -0
- package/components/Version.d.ts +5 -0
- package/components/Version.js +23 -0
- package/dto/businessEntity.d.ts +15 -0
- package/dto/businessEntity.js +1 -0
- package/dto/classification.d.ts +9 -0
- package/dto/classification.js +1 -0
- package/dto/classifier.d.ts +13 -0
- package/dto/classifier.js +4 -0
- package/dto/common.d.ts +5 -0
- package/dto/common.js +1 -0
- package/dto/fare.d.ts +11 -0
- package/dto/fare.js +1 -0
- package/dto/line-network.d.ts +23 -0
- package/dto/line-network.js +1 -0
- package/dto/option.d.ts +7 -0
- package/dto/option.js +1 -0
- package/dto/pagination.d.ts +10 -0
- package/dto/pagination.js +1 -0
- package/fields/FormCheckbox.d.ts +11 -0
- package/fields/FormCheckbox.js +5 -0
- package/fields/FormCheckboxGroup.d.ts +6 -0
- package/fields/FormCheckboxGroup.js +20 -0
- package/fields/FormController.d.ts +7 -0
- package/fields/FormController.js +16 -0
- package/fields/FormDatepicker.d.ts +8 -0
- package/fields/FormDatepicker.js +7 -0
- package/fields/FormInput.d.ts +8 -0
- package/fields/FormInput.js +4 -0
- package/fields/FormRadioGroup.d.ts +10 -0
- package/fields/FormRadioGroup.js +6 -0
- package/fields/FormSelect.d.ts +11 -0
- package/fields/FormSelect.js +9 -0
- package/fields/FormSwitch.d.ts +11 -0
- package/fields/FormSwitch.js +5 -0
- package/fields/FormTimeZoneSelect.d.ts +4 -0
- package/fields/FormTimeZoneSelect.js +8 -0
- package/fields/index.d.ts +9 -0
- package/fields/index.js +9 -0
- package/form/ArrayField.d.ts +27 -0
- package/form/ArrayField.js +69 -0
- package/form/CheckboxField.d.ts +8 -0
- package/form/CheckboxField.js +14 -0
- package/form/CheckboxGroupField.d.ts +6 -0
- package/form/CheckboxGroupField.js +15 -0
- package/form/ConditionField.d.ts +7 -0
- package/form/ConditionField.js +20 -0
- package/form/ContentField.d.ts +7 -0
- package/form/ContentField.js +15 -0
- package/form/CounterField.d.ts +5 -0
- package/form/CounterField.js +7 -0
- package/form/DateField.d.ts +8 -0
- package/form/DateField.js +52 -0
- package/form/DatesArrayField.d.ts +8 -0
- package/form/DatesArrayField.js +79 -0
- package/form/DependSelectField.d.ts +8 -0
- package/form/DependSelectField.js +12 -0
- package/form/EditorField.d.ts +5 -0
- package/form/EditorField.js +7 -0
- package/form/FileField.d.ts +12 -0
- package/form/FileField.js +9 -0
- package/form/FormField.d.ts +15 -0
- package/form/FormField.js +22 -0
- package/form/ModalFieldArray.d.ts +13 -0
- package/form/ModalFieldArray.js +62 -0
- package/form/PeriodField.d.ts +24 -0
- package/form/PeriodField.js +111 -0
- package/form/RadioGroupField.d.ts +10 -0
- package/form/RadioGroupField.js +21 -0
- package/form/SearchField.d.ts +19 -0
- package/form/SearchField.js +51 -0
- package/form/SelectField.d.ts +8 -0
- package/form/SelectField.js +13 -0
- package/form/SelectOwnerField.d.ts +11 -0
- package/form/SelectOwnerField.js +11 -0
- package/form/StopsSelect/StopSelectWithSearch.d.ts +28 -0
- package/form/StopsSelect/StopSelectWithSearch.js +181 -0
- package/form/StopsSelect/StopsSelect.d.ts +19 -0
- package/form/StopsSelect/StopsSelect.js +65 -0
- package/form/StopsSelect/StopsSelectModal.d.ts +26 -0
- package/form/StopsSelect/StopsSelectModal.js +280 -0
- package/form/StopsSelect/StopsSelectSearchForm.d.ts +22 -0
- package/form/StopsSelect/StopsSelectSearchForm.js +43 -0
- package/form/SwitchField.d.ts +9 -0
- package/form/SwitchField.js +16 -0
- package/form/TextField.d.ts +6 -0
- package/form/TextField.js +21 -0
- package/form/TimeDurationField.d.ts +6 -0
- package/form/TimeDurationField.js +54 -0
- package/form/TimeZoneField.d.ts +6 -0
- package/form/TimeZoneField.js +8 -0
- package/form/ToggleButtonGroupField.d.ts +12 -0
- package/form/ToggleButtonGroupField.js +16 -0
- package/form/hooks/addLazyFieldMetaState.d.ts +3 -0
- package/form/hooks/addLazyFieldMetaState.js +55 -0
- package/form/hooks/getValue.d.ts +3 -0
- package/form/hooks/getValue.js +60 -0
- package/form/hooks/useConstant.d.ts +13 -0
- package/form/hooks/useConstant.js +20 -0
- package/form/hooks/useConstantCallback.d.ts +7 -0
- package/form/hooks/useConstantCallback.js +14 -0
- package/form/hooks/useField.d.ts +3 -0
- package/form/hooks/useField.js +175 -0
- package/form/hooks/useFieldArray.d.ts +6 -0
- package/form/hooks/useFieldArray.js +87 -0
- package/form/hooks/useLatest.d.ts +3 -0
- package/form/hooks/useLatest.js +8 -0
- package/form/hooks/useModalTableSelectedRows.d.ts +12 -0
- package/form/hooks/useModalTableSelectedRows.js +66 -0
- package/form/hooks/useWatch.d.ts +12 -0
- package/form/hooks/useWatch.js +16 -0
- package/form/index.d.ts +45 -0
- package/form/index.js +58 -0
- package/form/mutators/change.d.ts +2 -0
- package/form/mutators/change.js +9 -0
- package/form/validate.d.ts +14 -0
- package/form/validate.js +39 -0
- package/helpers/capitalize.d.ts +1 -0
- package/helpers/capitalize.js +1 -0
- package/helpers/filter.d.ts +4 -0
- package/helpers/filter.js +21 -0
- package/helpers/formSubmit.d.ts +5 -0
- package/helpers/formSubmit.js +21 -0
- package/helpers/index.d.ts +7 -0
- package/helpers/index.js +7 -0
- package/helpers/makeClassificationOptions.d.ts +30 -0
- package/helpers/makeClassificationOptions.js +29 -0
- package/helpers/map.d.ts +1 -0
- package/helpers/map.js +1 -0
- package/helpers/openapi.d.ts +10 -0
- package/helpers/openapi.js +10 -0
- package/helpers/renderRangeError.d.ts +1 -0
- package/helpers/renderRangeError.js +20 -0
- package/helpers/sentry/assertEnvVariable.d.ts +1 -0
- package/helpers/sentry/assertEnvVariable.js +7 -0
- package/helpers/sentry/sentryConfig.d.ts +2 -0
- package/helpers/sentry/sentryConfig.js +18 -0
- package/helpers/serializeErrors.d.ts +2 -0
- package/helpers/serializeErrors.js +13 -0
- package/hooks/index.d.ts +26 -0
- package/hooks/index.js +26 -0
- package/hooks/useAllowedBusinessEntities.d.ts +4 -0
- package/hooks/useAllowedBusinessEntities.js +9 -0
- package/hooks/useBusinessEntitiesByType.d.ts +8 -0
- package/hooks/useBusinessEntitiesByType.js +17 -0
- package/hooks/useChangePassword.d.ts +14 -0
- package/hooks/useChangePassword.js +48 -0
- package/hooks/useClassification.d.ts +9 -0
- package/hooks/useClassification.js +16 -0
- package/hooks/useDraggable.d.ts +5 -0
- package/hooks/useDraggable.js +11 -0
- package/hooks/useEllipsis.d.ts +10 -0
- package/hooks/useEllipsis.js +79 -0
- package/hooks/useFavicon.d.ts +1 -0
- package/hooks/useFavicon.js +13 -0
- package/hooks/useFormTable.d.ts +24 -0
- package/hooks/useFormTable.js +105 -0
- package/hooks/useFormTableControls.d.ts +31 -0
- package/hooks/useFormTableControls.js +34 -0
- package/hooks/useInertBackground.d.ts +20 -0
- package/hooks/useInertBackground.js +57 -0
- package/hooks/useIsMounted.d.ts +2 -0
- package/hooks/useIsMounted.js +11 -0
- package/hooks/useLanguage.d.ts +1 -0
- package/hooks/useLanguage.js +2 -0
- package/hooks/useLoaded.d.ts +1 -0
- package/hooks/useLoaded.js +19 -0
- package/hooks/useLocale.d.ts +1 -0
- package/hooks/useLocale.js +7 -0
- package/hooks/useModal.d.ts +307 -0
- package/hooks/useModal.js +12 -0
- package/hooks/useOptions.d.ts +13 -0
- package/hooks/useOptions.js +24 -0
- package/hooks/usePrevious.d.ts +1 -0
- package/hooks/usePrevious.js +12 -0
- package/hooks/usePrompt.d.ts +8 -0
- package/hooks/usePrompt.js +17 -0
- package/hooks/useRowActive.d.ts +6 -0
- package/hooks/useRowActive.js +104 -0
- package/hooks/useRowEditActions.d.ts +5 -0
- package/hooks/useRowEditActions.js +12 -0
- package/hooks/useRowExpandToggle.d.ts +5 -0
- package/hooks/useRowExpandToggle.js +13 -0
- package/hooks/useRowHidden.d.ts +4 -0
- package/hooks/useRowHidden.js +6 -0
- package/hooks/useRowSelectCheckbox.d.ts +27 -0
- package/hooks/useRowSelectCheckbox.js +48 -0
- package/hooks/useTable.d.ts +4 -0
- package/hooks/useTable.js +38 -0
- package/hooks/useTableRowHighlight.d.ts +4 -0
- package/hooks/useTableRowHighlight.js +16 -0
- package/hooks/useTranslation.d.ts +3 -0
- package/hooks/useTranslation.js +3 -0
- package/hooks/useWeekdayOptions.d.ts +40 -0
- package/hooks/useWeekdayOptions.js +66 -0
- package/i18n/index.d.ts +13 -0
- package/i18n/index.js +82 -0
- package/i18n/resources/de.json +115 -0
- package/i18n/resources/el.json +116 -0
- package/i18n/resources/en-AE.json +115 -0
- package/i18n/resources/en.json +118 -0
- package/i18n/resources/es.json +115 -0
- package/i18n/resources/fr.json +115 -0
- package/i18n/resources/index.d.ts +1295 -0
- package/i18n/resources/index.js +24 -0
- package/i18n/resources/it.json +115 -0
- package/i18n/resources/lt.json +115 -0
- package/i18n/resources/pt.json +115 -0
- package/i18n/resources/sk.json +115 -0
- package/i18n/resources/sv.json +116 -0
- package/i18n/trans/alert.d.ts +8 -0
- package/i18n/trans/alert.js +10 -0
- package/i18n/trans/button.d.ts +24 -0
- package/i18n/trans/button.js +26 -0
- package/i18n/trans/error.d.ts +10 -0
- package/i18n/trans/error.js +12 -0
- package/i18n/trans/field.d.ts +19 -0
- package/i18n/trans/field.js +21 -0
- package/i18n/trans/index.d.ts +13 -0
- package/i18n/trans/index.js +20 -0
- package/i18n/trans/label.d.ts +18 -0
- package/i18n/trans/label.js +20 -0
- package/i18n/trans/option.d.ts +6 -0
- package/i18n/trans/option.js +8 -0
- package/i18n/trans/qty.d.ts +5 -0
- package/i18n/trans/qty.js +7 -0
- package/i18n/trans/table.d.ts +8 -0
- package/i18n/trans/table.js +10 -0
- package/i18n/trans/title.d.ts +6 -0
- package/i18n/trans/title.js +8 -0
- package/i18n/trans/tooltip.d.ts +8 -0
- package/i18n/trans/tooltip.js +10 -0
- package/icons/1-class.svg +4 -0
- package/icons/2-class-calm.svg +5 -0
- package/icons/2-class-crossed.svg +5 -0
- package/icons/2-class.svg +4 -0
- package/icons/3-class.svg +4 -0
- package/icons/4-class.svg +4 -0
- package/icons/ac-crossed.svg +6 -0
- package/icons/ac.svg +9 -0
- package/icons/accessibility.svg +5 -0
- package/icons/add-journey-segment.svg +9 -0
- package/icons/add-person.svg +6 -0
- package/icons/add.svg +4 -0
- package/icons/air-condition.svg +11 -0
- package/icons/airport.svg +4 -0
- package/icons/alert-circle.svg +5 -0
- package/icons/arrow-down.svg +4 -0
- package/icons/arrow-left-circle.svg +5 -0
- package/icons/arrow-left.svg +4 -0
- package/icons/arrow-right.svg +4 -0
- package/icons/arrow-up.svg +4 -0
- package/icons/baby-care.svg +7 -0
- package/icons/bar.svg +6 -0
- package/icons/bed.svg +3 -0
- package/icons/bicycle-crossed.svg +6 -0
- package/icons/bicycle.svg +8 -0
- package/icons/bin.svg +6 -0
- package/icons/break.svg +5 -0
- package/icons/breakfast-1-class.svg +5 -0
- package/icons/breakfast-2-class.svg +5 -0
- package/icons/breakfast.svg +3 -0
- package/icons/bus.svg +7 -0
- package/icons/business-area.svg +6 -0
- package/icons/by-aisle.svg +8 -0
- package/icons/by-window.svg +6 -0
- package/icons/cafe-1-class.svg +5 -0
- package/icons/calendar.svg +6 -0
- package/icons/cancel.svg +5 -0
- package/icons/cargo.svg +4 -0
- package/icons/carriage-bot.svg +6 -0
- package/icons/carriage-mid.svg +4 -0
- package/icons/carriage-top.svg +12 -0
- package/icons/carriage.svg +3 -0
- package/icons/cart.svg +3 -0
- package/icons/cd.svg +4 -0
- package/icons/check-circle.svg +4 -0
- package/icons/check.svg +3 -0
- package/icons/checkbox-checked.svg +4 -0
- package/icons/checkbox-indeterminate.svg +5 -0
- package/icons/checkbox-mark.svg +3 -0
- package/icons/checkbox.svg +3 -0
- package/icons/chevron-down.svg +3 -0
- package/icons/chevron-left.svg +3 -0
- package/icons/chevron-right.svg +3 -0
- package/icons/chevron-up.svg +3 -0
- package/icons/circle.svg +3 -0
- package/icons/clock.svg +5 -0
- package/icons/clone.svg +4 -0
- package/icons/close-bold.svg +4 -0
- package/icons/close.svg +4 -0
- package/icons/coffee-machine-crossed.svg +6 -0
- package/icons/coffee-machine.svg +7 -0
- package/icons/coin.svg +4 -0
- package/icons/comment.svg +3 -0
- package/icons/compartment.svg +6 -0
- package/icons/couchette.svg +6 -0
- package/icons/cube.svg +1 -0
- package/icons/currency.svg +4 -0
- package/icons/deactivate.svg +4 -0
- package/icons/delete.svg +4 -0
- package/icons/dining.svg +7 -0
- package/icons/direction-bottom.svg +4 -0
- package/icons/direction-forward-v.svg +4 -0
- package/icons/direction-forward.svg +4 -0
- package/icons/direction-left.svg +4 -0
- package/icons/direction-reverse-v.svg +4 -0
- package/icons/direction-reverse.svg +4 -0
- package/icons/direction-right.svg +4 -0
- package/icons/direction-top.svg +4 -0
- package/icons/dots.svg +5 -0
- package/icons/download.svg +5 -0
- package/icons/drag-n-drop.svg +3 -0
- package/icons/draggable.svg +5 -0
- package/icons/duplicate.svg +4 -0
- package/icons/dvd.svg +5 -0
- package/icons/edit.svg +3 -0
- package/icons/empty-search.svg +9 -0
- package/icons/empty-state.svg +13 -0
- package/icons/empty.svg +9 -0
- package/icons/empty_search_purple.svg +6 -0
- package/icons/error-circle.svg +4 -0
- package/icons/eu-law.svg +5 -0
- package/icons/external_link.svg +5 -0
- package/icons/family-area.svg +7 -0
- package/icons/file-settings.svg +3 -0
- package/icons/file.svg +11 -0
- package/icons/filter.svg +3 -0
- package/icons/flip.svg +11 -0
- package/icons/food-1-class.svg +5 -0
- package/icons/food-plus.svg +5 -0
- package/icons/food.svg +7 -0
- package/icons/grid-cell.svg +1 -0
- package/icons/grid.svg +6 -0
- package/icons/headphones.svg +5 -0
- package/icons/helping-hand-crossed.svg +12 -0
- package/icons/helping-hand.svg +3 -0
- package/icons/hide.svg +4 -0
- package/icons/home.svg +4 -0
- package/icons/index.json +228 -0
- package/icons/info-circle.svg +5 -0
- package/icons/insurance.svg +6 -0
- package/icons/journey-changeover.svg +5 -0
- package/icons/journey-light.svg +5 -0
- package/icons/journey.svg +5 -0
- package/icons/key.svg +4 -0
- package/icons/language.svg +3 -0
- package/icons/link.svg +4 -0
- package/icons/list.svg +8 -0
- package/icons/locker.svg +8 -0
- package/icons/logout.svg +5 -0
- package/icons/luggage.svg +9 -0
- package/icons/mail.svg +4 -0
- package/icons/meeting-lounge.svg +10 -0
- package/icons/metro.svg +3 -0
- package/icons/middle-seat.svg +7 -0
- package/icons/minus.svg +3 -0
- package/icons/minus24.svg +3 -0
- package/icons/mobile-crossed.svg +7 -0
- package/icons/mobile.svg +6 -0
- package/icons/movingo.svg +3 -0
- package/icons/multimedia.svg +9 -0
- package/icons/near-bicycle.svg +5 -0
- package/icons/near-pet.svg +5 -0
- package/icons/near-wheelchair.svg +8 -0
- package/icons/night-train.svg +4 -0
- package/icons/nonstop.svg +3 -0
- package/icons/occupancy-seat-hover.svg +11 -0
- package/icons/occupancy-seat-selected.svg +11 -0
- package/icons/occupancy-seat.svg +4 -0
- package/icons/oneway.svg +4 -0
- package/icons/pet-crossed.svg +5 -0
- package/icons/pet.svg +7 -0
- package/icons/pic.svg +5 -0
- package/icons/playground.svg +7 -0
- package/icons/plus.svg +4 -0
- package/icons/plus24.svg +4 -0
- package/icons/popup-controls.svg +15 -0
- package/icons/power-socket.svg +6 -0
- package/icons/preview.svg +3 -0
- package/icons/print.svg +5 -0
- package/icons/priority-seat-elderly.svg +6 -0
- package/icons/priority-seat-pregnant.svg +5 -0
- package/icons/profile.svg +4 -0
- package/icons/question.svg +5 -0
- package/icons/radio-filled.svg +4 -0
- package/icons/radio.svg +3 -0
- package/icons/reclining-seat.svg +9 -0
- package/icons/refresh.svg +6 -0
- package/icons/reload.svg +4 -0
- package/icons/remove-circle.svg +3 -0
- package/icons/replace.svg +6 -0
- package/icons/reservation-crossed.svg +4 -0
- package/icons/reservation-mandatory.svg +4 -0
- package/icons/reservation-optional.svg +5 -0
- package/icons/resplus-horizontal.svg +1 -0
- package/icons/resplus.svg +3 -0
- package/icons/restaurant.svg +3 -0
- package/icons/roundtrip.svg +6 -0
- package/icons/save.svg +5 -0
- package/icons/search.svg +4 -0
- package/icons/seat-compartment.svg +8 -0
- package/icons/seat-selected.svg +3 -0
- package/icons/seat.svg +5 -0
- package/icons/sent.svg +34 -0
- package/icons/service-dog.svg +4 -0
- package/icons/settings.svg +4 -0
- package/icons/shift.svg +3 -0
- package/icons/ship.svg +3 -0
- package/icons/show.svg +4 -0
- package/icons/shower.svg +9 -0
- package/icons/silence.svg +6 -0
- package/icons/sink.svg +5 -0
- package/icons/skis.svg +8 -0
- package/icons/sleeper-car-bedding.svg +6 -0
- package/icons/sleeper-car.svg +5 -0
- package/icons/smoking-crossed.svg +6 -0
- package/icons/sort.svg +6 -0
- package/icons/stairs-down.svg +5 -0
- package/icons/stairs-up.svg +5 -0
- package/icons/star-filled.svg +3 -0
- package/icons/star.svg +3 -0
- package/icons/stroller.svg +6 -0
- package/icons/sw-law.svg +5 -0
- package/icons/switch.svg +3 -0
- package/icons/table.svg +6 -0
- package/icons/tag.svg +4 -0
- package/icons/taxi.svg +3 -0
- package/icons/tick.svg +3 -0
- package/icons/ticket-cancel.svg +8 -0
- package/icons/ticket-change.svg +3 -0
- package/icons/ticket-manage.svg +7 -0
- package/icons/ticket-refund.svg +8 -0
- package/icons/ticket-travel-pass.svg +4 -0
- package/icons/ticket.svg +6 -0
- package/icons/tickets.svg +4 -0
- package/icons/train.svg +3 -0
- package/icons/transfer.svg +3 -0
- package/icons/trash.svg +6 -0
- package/icons/triange.svg +17 -0
- package/icons/tv.svg +5 -0
- package/icons/unaccompanied-minor.svg +8 -0
- package/icons/upload.svg +5 -0
- package/icons/usb.svg +9 -0
- package/icons/visibility-off.svg +4 -0
- package/icons/visibility-on.svg +4 -0
- package/icons/voucher.svg +5 -0
- package/icons/wardrobe.svg +4 -0
- package/icons/warning.svg +3 -0
- package/icons/water.svg +5 -0
- package/icons/wc.svg +4 -0
- package/icons/wheelchair-lift-reservation.svg +8 -0
- package/icons/wheelchair-lift.svg +6 -0
- package/icons/wheelchair-ramp.svg +8 -0
- package/icons/wheelchair-space-reservation.svg +13 -0
- package/icons/wheelchair-space.svg +4 -0
- package/icons/wheelchair.svg +5 -0
- package/icons/wifi-crossed.svg +9 -0
- package/icons/wifi.svg +6 -0
- package/index.css +327 -0
- package/index.d.ts +31 -0
- package/index.js +32 -0
- package/mui/Accordion.d.ts +17 -0
- package/mui/Accordion.js +46 -0
- package/mui/Button/index.d.ts +16 -0
- package/mui/Button/index.js +35 -0
- package/mui/Card/CardHeader.d.ts +7 -0
- package/mui/Card/CardHeader.js +43 -0
- package/mui/Card/index.d.ts +4 -0
- package/mui/Card/index.js +4 -0
- package/mui/Checkbox/CheckboxGroup.d.ts +26 -0
- package/mui/Checkbox/CheckboxGroup.js +81 -0
- package/mui/Checkbox/index.d.ts +18 -0
- package/mui/Checkbox/index.js +40 -0
- package/mui/Chip/ChipSecondarySmall.d.ts +10 -0
- package/mui/Chip/ChipSecondarySmall.js +40 -0
- package/mui/CircularProgress/index.d.ts +3 -0
- package/mui/CircularProgress/index.js +36 -0
- package/mui/Collapsible/index.d.ts +9 -0
- package/mui/Collapsible/index.js +66 -0
- package/mui/Counter/index.d.ts +9 -0
- package/mui/Counter/index.js +37 -0
- package/mui/DatePicker/DatePicker.scss +276 -0
- package/mui/DatePicker/DatePickerContext.d.ts +8 -0
- package/mui/DatePicker/DatePickerContext.js +2 -0
- package/mui/DatePicker/DatePickerHeader.d.ts +3 -0
- package/mui/DatePicker/DatePickerHeader.js +63 -0
- package/mui/DatePicker/DatePickerHeaderSelect.d.ts +10 -0
- package/mui/DatePicker/DatePickerHeaderSelect.js +72 -0
- package/mui/DatePicker/DatePickerInput.d.ts +6 -0
- package/mui/DatePicker/DatePickerInput.js +28 -0
- package/mui/DatePicker/TimeInput.d.ts +10 -0
- package/mui/DatePicker/TimeInput.js +63 -0
- package/mui/DatePicker/index.d.ts +52 -0
- package/mui/DatePicker/index.js +187 -0
- package/mui/Dropdown/index.d.ts +22 -0
- package/mui/Dropdown/index.js +90 -0
- package/mui/EditableLabel/index.d.ts +7 -0
- package/mui/EditableLabel/index.js +81 -0
- package/mui/ExternalLink/index.d.ts +8 -0
- package/mui/ExternalLink/index.js +11 -0
- package/mui/FileInput/index.d.ts +27 -0
- package/mui/FileInput/index.js +66 -0
- package/mui/FormControl/index.d.ts +23 -0
- package/mui/FormControl/index.js +36 -0
- package/mui/FormField/index.d.ts +8 -0
- package/mui/FormField/index.js +12 -0
- package/mui/Icon/index.d.ts +21 -0
- package/mui/Icon/index.js +47 -0
- package/mui/Input/index.d.ts +28 -0
- package/mui/Input/index.js +102 -0
- package/mui/Loader/index.d.ts +9 -0
- package/mui/Loader/index.js +47 -0
- package/mui/Modal/index.d.ts +16 -0
- package/mui/Modal/index.js +64 -0
- package/mui/Pagination/index.d.ts +6 -0
- package/mui/Pagination/index.js +23 -0
- package/mui/Paper/index.d.ts +4 -0
- package/mui/Paper/index.js +3 -0
- package/mui/Popper/index.d.ts +13 -0
- package/mui/Popper/index.js +139 -0
- package/mui/RadioGroup/index.d.ts +26 -0
- package/mui/RadioGroup/index.js +41 -0
- package/mui/ReadOnlyField/index.d.ts +8 -0
- package/mui/ReadOnlyField/index.js +35 -0
- package/mui/Select/index.d.ts +47 -0
- package/mui/Select/index.js +164 -0
- package/mui/Stepper/StepIconComponent.d.ts +6 -0
- package/mui/Stepper/StepIconComponent.js +93 -0
- package/mui/Stepper/index.d.ts +6 -0
- package/mui/Stepper/index.js +13 -0
- package/mui/Switch/index.d.ts +3 -0
- package/mui/Switch/index.js +2 -0
- package/mui/Tab/index.d.ts +60 -0
- package/mui/Tab/index.js +12 -0
- package/mui/Tabs/index.d.ts +22 -0
- package/mui/Tabs/index.js +70 -0
- package/mui/TimeDurationLabel/index.d.ts +7 -0
- package/mui/TimeDurationLabel/index.js +13 -0
- package/mui/ToggleButton/index.d.ts +4 -0
- package/mui/ToggleButton/index.js +57 -0
- package/mui/ToggleButtonGroup/index.d.ts +25 -0
- package/mui/ToggleButtonGroup/index.js +61 -0
- package/mui/ToggleList/index.d.ts +11 -0
- package/mui/ToggleList/index.js +54 -0
- package/mui/Tooltip/index.d.ts +11 -0
- package/mui/Tooltip/index.js +36 -0
- package/mui/index.d.ts +36 -0
- package/mui/index.js +36 -0
- package/mui/provider.d.ts +9 -0
- package/mui/provider.js +22 -0
- package/mui/theme.d.ts +17 -0
- package/mui/theme.js +1228 -0
- package/package.json +197 -4
- package/services/api.d.ts +28 -0
- package/services/api.js +141 -0
- package/services/index.d.ts +2 -0
- package/services/index.js +2 -0
- package/services/openapi.d.ts +6 -0
- package/services/openapi.js +112 -0
- package/store/index.d.ts +6 -0
- package/store/index.js +1 -0
- package/store/useClassificationOptions.d.ts +3 -0
- package/store/useClassificationOptions.js +2 -0
- package/types.d.ts +2423 -0
- package/utils/array.d.ts +2 -0
- package/utils/array.js +21 -0
- package/utils/auth.d.ts +2 -0
- package/utils/auth.js +31 -0
- package/utils/color.d.ts +29 -0
- package/utils/color.js +132 -0
- package/utils/date.d.ts +40 -0
- package/utils/date.js +51 -0
- package/utils/filter.d.ts +3 -0
- package/utils/filter.js +11 -0
- package/utils/getScrollbarSize.d.ts +1 -0
- package/utils/getScrollbarSize.js +8 -0
- package/utils/index.d.ts +12 -0
- package/utils/index.js +12 -0
- package/utils/input.d.ts +2 -0
- package/utils/input.js +2 -0
- package/utils/knowledge-owl-script.d.ts +64 -0
- package/utils/knowledge-owl-script.js +226 -0
- package/utils/locales.d.ts +3 -0
- package/utils/locales.js +24 -0
- package/utils/noop.d.ts +1 -0
- package/utils/noop.js +1 -0
- package/utils/percentage.d.ts +6 -0
- package/utils/percentage.js +43 -0
- package/utils/redirect.d.ts +1 -0
- package/utils/redirect.js +6 -0
- package/utils/sort.d.ts +21 -0
- package/utils/sort.js +32 -0
- package/utils/storage.d.ts +2 -0
- package/utils/storage.js +2 -0
- package/utils/timeDuration.d.ts +26 -0
- package/utils/timeDuration.js +78 -0
- package/utils/wallClock.d.ts +17 -0
- package/utils/wallClock.js +178 -0
- package/wrappers/ApiInitializer.d.ts +9 -0
- package/wrappers/ApiInitializer.js +21 -0
- package/wrappers/AuthWrapper.d.ts +6 -0
- package/wrappers/AuthWrapper.js +38 -0
- package/wrappers/AxiosErrorsInterceptorWrapper.d.ts +2 -0
- package/wrappers/AxiosErrorsInterceptorWrapper.js +30 -0
- package/README.md +0 -3
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Tab: import("@emotion/styled").StyledComponent<Pick<{
|
|
3
|
+
children?: null;
|
|
4
|
+
classes?: Partial<import("@mui/material/Tab").TabClasses>;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
disableFocusRipple?: boolean;
|
|
7
|
+
icon?: string | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
8
|
+
iconPosition?: "start" | "top" | "bottom" | "end";
|
|
9
|
+
label?: import("react").ReactNode;
|
|
10
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme>;
|
|
11
|
+
value?: any;
|
|
12
|
+
wrapped?: boolean;
|
|
13
|
+
} & Omit<{
|
|
14
|
+
action?: import("react").Ref<import("@mui/material").ButtonBaseActions>;
|
|
15
|
+
centerRipple?: boolean;
|
|
16
|
+
children?: import("react").ReactNode;
|
|
17
|
+
classes?: Partial<import("@mui/material").ButtonBaseClasses>;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
disableRipple?: boolean;
|
|
20
|
+
disableTouchRipple?: boolean;
|
|
21
|
+
focusRipple?: boolean;
|
|
22
|
+
focusVisibleClassName?: string;
|
|
23
|
+
LinkComponent?: import("react").ElementType<any>;
|
|
24
|
+
onFocusVisible?: import("react").FocusEventHandler<any>;
|
|
25
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme>;
|
|
26
|
+
tabIndex?: number;
|
|
27
|
+
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps>;
|
|
28
|
+
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions>;
|
|
29
|
+
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
30
|
+
ref?: import("react").Ref<HTMLDivElement>;
|
|
31
|
+
}, "value" | "action" | "disabled" | "label" | "tabIndex" | "children" | "icon" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "wrapped" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "iconPosition">, "value" | "action" | "disabled" | "label" | "placeholder" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "ref" | "key" | "icon" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "wrapped" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "iconPosition"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
32
|
+
children?: null;
|
|
33
|
+
classes?: Partial<import("@mui/material/Tab").TabClasses>;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
disableFocusRipple?: boolean;
|
|
36
|
+
icon?: string | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
37
|
+
iconPosition?: "start" | "top" | "bottom" | "end";
|
|
38
|
+
label?: import("react").ReactNode;
|
|
39
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme>;
|
|
40
|
+
value?: any;
|
|
41
|
+
wrapped?: boolean;
|
|
42
|
+
} & Omit<{
|
|
43
|
+
action?: import("react").Ref<import("@mui/material").ButtonBaseActions>;
|
|
44
|
+
centerRipple?: boolean;
|
|
45
|
+
children?: import("react").ReactNode;
|
|
46
|
+
classes?: Partial<import("@mui/material").ButtonBaseClasses>;
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
disableRipple?: boolean;
|
|
49
|
+
disableTouchRipple?: boolean;
|
|
50
|
+
focusRipple?: boolean;
|
|
51
|
+
focusVisibleClassName?: string;
|
|
52
|
+
LinkComponent?: import("react").ElementType<any>;
|
|
53
|
+
onFocusVisible?: import("react").FocusEventHandler<any>;
|
|
54
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme>;
|
|
55
|
+
tabIndex?: number;
|
|
56
|
+
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps>;
|
|
57
|
+
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions>;
|
|
58
|
+
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
59
|
+
ref?: import("react").Ref<HTMLDivElement>;
|
|
60
|
+
}, "value" | "action" | "disabled" | "label" | "tabIndex" | "children" | "icon" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "wrapped" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "iconPosition">, {}, {}>;
|
package/mui/Tab/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import MuiTab from '@mui/material/Tab';
|
|
2
|
+
import { alpha, styled } from '@mui/material/styles';
|
|
3
|
+
export const Tab = styled(MuiTab, {
|
|
4
|
+
name: 'Tab',
|
|
5
|
+
})(({ theme }) => ({
|
|
6
|
+
borderRadius: '4px 4px 0 0',
|
|
7
|
+
flexDirection: 'row',
|
|
8
|
+
'&.Mui-selected': {
|
|
9
|
+
boxShadow: `0px 2px 8px 0px ${alpha(theme.palette.common.black, 0.1)}`,
|
|
10
|
+
backgroundColor: theme.palette.common.white,
|
|
11
|
+
},
|
|
12
|
+
}));
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FC, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { TabsProps as MuiTabsProps } from '@mui/material';
|
|
3
|
+
import { type TabPanelProps as MuiTabPanelProps } from '@mui/lab';
|
|
4
|
+
export interface TabPanelProps extends MuiTabPanelProps {
|
|
5
|
+
value: string;
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
classes?: {
|
|
8
|
+
label?: string;
|
|
9
|
+
root?: string;
|
|
10
|
+
active?: string;
|
|
11
|
+
};
|
|
12
|
+
'data-testid'?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const TabPanel: FC<TabPanelProps>;
|
|
15
|
+
declare type TabPanelElement = ReactElement<TabPanelProps, typeof TabPanel>;
|
|
16
|
+
export interface TabsProps extends MuiTabsProps {
|
|
17
|
+
children: TabPanelElement | Array<TabPanelElement>;
|
|
18
|
+
onTabRemove?: (val: string) => void;
|
|
19
|
+
'data-testid'?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const Tabs: FC<TabsProps>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { useEffect, } from 'react';
|
|
4
|
+
import { useMemo, useState, Children, useCallback } from 'react';
|
|
5
|
+
import { Card, Box, Typography, } from '@mui/material';
|
|
6
|
+
import { Tab } from "../Tab";
|
|
7
|
+
import { TabContext, TabList, TabPanel as MuiTabPanel, useTabContext, } from '@mui/lab';
|
|
8
|
+
import { makeStyles } from '@mui/styles';
|
|
9
|
+
import { Icon } from "../Icon";
|
|
10
|
+
import { alpha } from '@mui/material/styles';
|
|
11
|
+
import { getAccessabilityValue } from "../../utils";
|
|
12
|
+
const useStyles = makeStyles((theme) => ({
|
|
13
|
+
tabsWrapper: {
|
|
14
|
+
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
15
|
+
'& .MuiTabs-indicator': {
|
|
16
|
+
display: 'none',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
tabsAccessibilityWrapper: {
|
|
20
|
+
border: 'none',
|
|
21
|
+
},
|
|
22
|
+
removeIcon: {
|
|
23
|
+
width: 12,
|
|
24
|
+
height: 12,
|
|
25
|
+
marginLeft: 8,
|
|
26
|
+
color: theme.palette.icons.main,
|
|
27
|
+
},
|
|
28
|
+
tabContent: {
|
|
29
|
+
borderRadius: '0 0 4px 4px',
|
|
30
|
+
boxShadow: `0px 2px 8px 0px ${alpha(theme.palette.common.black, 0.1)}`,
|
|
31
|
+
},
|
|
32
|
+
tabContentAccessibilityWrapper: {
|
|
33
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
34
|
+
},
|
|
35
|
+
}));
|
|
36
|
+
export const TabPanel = ({ value, children, className, classes, 'data-testid': testId, ...props }) => {
|
|
37
|
+
const { value: activeTab } = useTabContext();
|
|
38
|
+
return (_jsx(MuiTabPanel, { value: value, classes: {
|
|
39
|
+
...classes,
|
|
40
|
+
root: classNames(className, classes?.root, {
|
|
41
|
+
[classes?.active]: activeTab === value,
|
|
42
|
+
}),
|
|
43
|
+
}, "data-testid": testId ?? 'tab-panel', ...props, children: children }));
|
|
44
|
+
};
|
|
45
|
+
export const Tabs = ({ value, children, onChange, onTabRemove, 'data-testid': testId, ...props }) => {
|
|
46
|
+
const classes = useStyles();
|
|
47
|
+
const accessibility = useMemo(getAccessabilityValue, []);
|
|
48
|
+
const labels = useMemo(() => Children.map(children, ({ props: { value, label, classes } }) => ({
|
|
49
|
+
value,
|
|
50
|
+
label,
|
|
51
|
+
className: classes?.label,
|
|
52
|
+
})), [children]);
|
|
53
|
+
const [activeTab, setActiveTab] = useState(value || labels[0]?.value);
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
value && setActiveTab(value);
|
|
56
|
+
}, [value]);
|
|
57
|
+
const handleChange = (event, newValue) => {
|
|
58
|
+
onChange?.(event, newValue);
|
|
59
|
+
setActiveTab(newValue);
|
|
60
|
+
};
|
|
61
|
+
const getTabRemoveHandler = useCallback((value) => (e) => {
|
|
62
|
+
e.stopPropagation();
|
|
63
|
+
onTabRemove(value);
|
|
64
|
+
}, [onTabRemove]);
|
|
65
|
+
return (_jsx(_Fragment, { children: _jsxs(TabContext, { value: activeTab, children: [_jsx(Box, { className: classNames(classes.tabsWrapper, {
|
|
66
|
+
[classes.tabsAccessibilityWrapper]: accessibility,
|
|
67
|
+
}), children: _jsx(TabList, { onChange: handleChange, "data-testid": `${testId ?? 'tabs'}--tab-list`, ...props, children: labels.map(({ label, value, className }) => (_jsx(Tab, { className: className, label: _jsxs(_Fragment, { children: [_jsx(Typography, { variant: "subtitle", children: label }), onTabRemove && (_jsx(Icon, { name: "close", className: classes.removeIcon, onClick: getTabRemoveHandler(value) }))] }), value: value, "data-testid": `${testId ?? 'tabs'}--tab-list-tab--${value}` }, value))) }) }), _jsx(Card, { className: classNames(classes.tabContent, {
|
|
68
|
+
[classes.tabContentAccessibilityWrapper]: accessibility,
|
|
69
|
+
}), elevation: 0, "data-testid": `${testId ?? 'tabs'}--card`, children: children })] }) }));
|
|
70
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { TimeDuration, TimeDurationExcludedUnits } from "../../utils/timeDuration";
|
|
3
|
+
export interface TimeDurationLabelProps extends TimeDurationExcludedUnits {
|
|
4
|
+
value: TimeDuration | undefined;
|
|
5
|
+
prefixKey?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const TimeDurationLabel: FC<TimeDurationLabelProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { TransField } from "../../i18n/trans/field";
|
|
3
|
+
import { isEmpty } from 'lodash';
|
|
4
|
+
import { Fragment, useMemo } from 'react';
|
|
5
|
+
import { getTimeDurationUnits, TIME_UNIT_CONFIGURATION, } from "../../utils/timeDuration";
|
|
6
|
+
export const TimeDurationLabel = ({ value, prefixKey, excludedUnits, }) => {
|
|
7
|
+
const units = useMemo(() => getTimeDurationUnits(excludedUnits ?? []), [excludedUnits]);
|
|
8
|
+
if (isEmpty(value)) {
|
|
9
|
+
return _jsx("span", { children: "-" });
|
|
10
|
+
}
|
|
11
|
+
const isNumber = (value) => value !== '' && value !== null && Number.isFinite(+value);
|
|
12
|
+
return (_jsx("span", { children: units.map((unit) => isNumber(value?.[unit]) && (_jsxs(Fragment, { children: [value[unit], _jsx(TransField, { i18nKey: TIME_UNIT_CONFIGURATION[unit].i18nKey })] }, `${prefixKey ? `${prefixKey}.` : ''}${unit}`))) }));
|
|
13
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import MuiToggleButton from '@mui/material/ToggleButton';
|
|
3
|
+
import { makeStyles } from '@mui/styles';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
const useStyles = makeStyles((theme) => ({
|
|
6
|
+
root: {
|
|
7
|
+
padding: '5px 16px',
|
|
8
|
+
textTransform: 'none',
|
|
9
|
+
display: 'inline-flex',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
borderRadius: 3,
|
|
12
|
+
'& [class^="Icon-"]': {
|
|
13
|
+
pointerEvents: 'none',
|
|
14
|
+
'& + *': {
|
|
15
|
+
marginLeft: '8px',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
'&.MuiToggleButton-primary': {
|
|
19
|
+
color: theme.palette.primary.main,
|
|
20
|
+
borderColor: theme.palette.primary.main,
|
|
21
|
+
},
|
|
22
|
+
'&.MuiToggleButton-secondary': {
|
|
23
|
+
color: theme.palette.secondary.main,
|
|
24
|
+
borderColor: theme.palette.secondary.main,
|
|
25
|
+
},
|
|
26
|
+
'&:disabled': {
|
|
27
|
+
pointerEvents: 'all',
|
|
28
|
+
cursor: 'not-allowed',
|
|
29
|
+
color: theme.palette.action.disabled,
|
|
30
|
+
borderColor: theme.palette.action.disabled,
|
|
31
|
+
},
|
|
32
|
+
'&.Mui-selected': {
|
|
33
|
+
color: theme.palette.common.white,
|
|
34
|
+
'& .MuiTypography-root': {
|
|
35
|
+
color: theme.palette.common.white,
|
|
36
|
+
},
|
|
37
|
+
'&.MuiToggleButton-primary': {
|
|
38
|
+
background: theme.palette.primary.main,
|
|
39
|
+
},
|
|
40
|
+
'&.MuiToggleButton-secondary': {
|
|
41
|
+
background: theme.palette.secondary.main,
|
|
42
|
+
},
|
|
43
|
+
'&:disabled': {
|
|
44
|
+
background: theme.palette.action.disabled,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
'&:not(.Mui-selected):hover': {
|
|
48
|
+
background: theme.palette.action.selected,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
}), {
|
|
52
|
+
name: 'ToggleButton',
|
|
53
|
+
});
|
|
54
|
+
export const ToggleButton = ({ className, ...props }) => {
|
|
55
|
+
const classes = useStyles();
|
|
56
|
+
return (_jsx(MuiToggleButton, { ...props, className: classNames(classes.root, className) }));
|
|
57
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SelectOption, SelectValue } from "../Select";
|
|
3
|
+
export declare type ToggleButtonGroupOption = Exclude<SelectOption, 'value'> & {
|
|
4
|
+
icon?: string;
|
|
5
|
+
tooltip?: string;
|
|
6
|
+
} & ({
|
|
7
|
+
name?: string;
|
|
8
|
+
value: SelectValue;
|
|
9
|
+
} | {
|
|
10
|
+
name: string;
|
|
11
|
+
value?: SelectValue;
|
|
12
|
+
});
|
|
13
|
+
export interface ToggleButtonGroupProps<T> {
|
|
14
|
+
className?: string;
|
|
15
|
+
options: Array<ToggleButtonGroupOption>;
|
|
16
|
+
value?: T;
|
|
17
|
+
color?: 'primary' | 'secondary';
|
|
18
|
+
onChange?: (value: T) => void;
|
|
19
|
+
multiple?: boolean;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
fullWidth?: boolean;
|
|
22
|
+
selectAllButton?: boolean;
|
|
23
|
+
'data-testid'?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const ToggleButtonGroup: <T>(props: ToggleButtonGroupProps<T>) => JSX.Element;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useMemo } from 'react';
|
|
3
|
+
import { Tooltip } from "../Tooltip";
|
|
4
|
+
import { ToggleButton } from "../ToggleButton";
|
|
5
|
+
import MuiToggleButtonGroup from '@mui/material/ToggleButtonGroup';
|
|
6
|
+
import { Box, Typography } from '@mui/material';
|
|
7
|
+
import { Icon } from "../Icon";
|
|
8
|
+
import get from 'lodash/get';
|
|
9
|
+
import isObject from 'lodash/isObject';
|
|
10
|
+
import { Button } from "../Button";
|
|
11
|
+
import _map from 'lodash/map';
|
|
12
|
+
import { TransButton } from "../../i18n/trans/button";
|
|
13
|
+
export const ToggleButtonGroup = (props) => {
|
|
14
|
+
const { className, options, multiple, value: valueProp, onChange, color = 'primary', disabled, fullWidth, selectAllButton, 'data-testid': testId, } = props;
|
|
15
|
+
// TODO, tmp fix, needs to re-check all placed where is used,
|
|
16
|
+
// made default height 34px in mui theme config
|
|
17
|
+
/*const iconsOnly = useMemo(
|
|
18
|
+
() => options.every(({ icon, label }) => !label && icon),
|
|
19
|
+
[options]
|
|
20
|
+
);*/
|
|
21
|
+
const value = useMemo(() => Array.isArray(valueProp)
|
|
22
|
+
? valueProp
|
|
23
|
+
: isObject(valueProp)
|
|
24
|
+
? valueProp &&
|
|
25
|
+
options
|
|
26
|
+
.map((option) => option.name ?? option.value)
|
|
27
|
+
.filter((option) => Boolean(get(valueProp, option)))
|
|
28
|
+
: valueProp, [options, valueProp]);
|
|
29
|
+
const handleChange = useCallback((event, val) => {
|
|
30
|
+
const name = event.currentTarget.getAttribute('name');
|
|
31
|
+
if (name) {
|
|
32
|
+
onChange?.(options.reduce((acc, option) => ({
|
|
33
|
+
...acc,
|
|
34
|
+
[option.name]: val.includes(option.name),
|
|
35
|
+
}), {}));
|
|
36
|
+
}
|
|
37
|
+
else
|
|
38
|
+
onChange?.(val);
|
|
39
|
+
}, [onChange, options]);
|
|
40
|
+
return (_jsxs(_Fragment, { children: [_jsx(MuiToggleButtonGroup, { className: className, color: color, value: value, exclusive: !multiple, onChange: handleChange, size: "small", sx: {
|
|
41
|
+
// height: iconsOnly ? 28 : 32,
|
|
42
|
+
'& .MuiToggleButton-root': {
|
|
43
|
+
padding: options.length > 5
|
|
44
|
+
? '5px 6px'
|
|
45
|
+
: options.length > 3
|
|
46
|
+
? '5px 11px'
|
|
47
|
+
: '5px 16px',
|
|
48
|
+
},
|
|
49
|
+
}, disabled: disabled, fullWidth: fullWidth, "data-testid": testId ?? 'toggle-button-group', children: options.map((option) => {
|
|
50
|
+
const { name, label, tooltip, icon } = option;
|
|
51
|
+
const optionValue = option.name ?? option.value;
|
|
52
|
+
return (_jsx(ToggleButton, { value: optionValue, ...(name && {
|
|
53
|
+
name,
|
|
54
|
+
selected: Boolean(get(valueProp, optionValue)),
|
|
55
|
+
}), "data-testid": `${testId ?? 'toggle-button-group'}--toggle-button--${optionValue}`, children: _jsx(Tooltip, { content: tooltip, children: _jsxs(Box, { sx: {
|
|
56
|
+
display: 'flex',
|
|
57
|
+
alignItems: 'center',
|
|
58
|
+
justifyContent: 'space-between',
|
|
59
|
+
}, children: [icon && _jsx(Icon, { name: icon }), label && _jsx(Typography, { variant: 'body1', children: label })] }) }) }, optionValue));
|
|
60
|
+
}) }), selectAllButton && multiple && (_jsx(Button, { variant: "text", onClick: (event) => handleChange(event, _map(options, 'value')), sx: { width: 'fit-content', paddingLeft: 0 }, "data-testid": `${testId ?? 'toggle-button-group'}--select-all`, children: _jsx(TransButton, { i18nKey: "selectAll" }) }))] }));
|
|
61
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { Options } from "../../dto/option";
|
|
3
|
+
export interface ToggleListProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
options: Options<string | number | null>;
|
|
6
|
+
initialValue?: string | number | null;
|
|
7
|
+
onChange?: (value: string | number | null) => void;
|
|
8
|
+
showEmptyOption?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const ToggleList: FC<ToggleListProps>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useMemo, useState, useEffect } from 'react';
|
|
3
|
+
import { makeStyles } from '@mui/styles';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import { alpha } from '@mui/material/styles';
|
|
6
|
+
const useStyles = makeStyles((theme) => ({
|
|
7
|
+
root: {
|
|
8
|
+
maxHeight: 130,
|
|
9
|
+
borderRadius: 3,
|
|
10
|
+
background: theme.palette.common.white,
|
|
11
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
12
|
+
overflowX: 'hidden',
|
|
13
|
+
overflowY: 'scroll',
|
|
14
|
+
},
|
|
15
|
+
option: {
|
|
16
|
+
cursor: 'pointer',
|
|
17
|
+
padding: '6px 18px',
|
|
18
|
+
'&:not($disabled):hover': {
|
|
19
|
+
background: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
active: {
|
|
23
|
+
color: theme.palette.common.white,
|
|
24
|
+
background: theme.palette.secondary.main,
|
|
25
|
+
'&$disabled': {
|
|
26
|
+
background: theme.palette.action.disabled,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
disabled: {
|
|
30
|
+
cursor: 'not-allowed',
|
|
31
|
+
},
|
|
32
|
+
}), {
|
|
33
|
+
name: 'ToggleList',
|
|
34
|
+
});
|
|
35
|
+
export const ToggleList = ({ className, options, initialValue, onChange, showEmptyOption, disabled, }) => {
|
|
36
|
+
const classes = useStyles();
|
|
37
|
+
const [currentValue, setValue] = useState(initialValue);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
setValue(initialValue);
|
|
40
|
+
}, [initialValue]);
|
|
41
|
+
const preparedOptions = useMemo(() => {
|
|
42
|
+
if (!showEmptyOption)
|
|
43
|
+
return options;
|
|
44
|
+
return [{ label: '\u2015', value: null }, ...options];
|
|
45
|
+
}, [options, showEmptyOption]);
|
|
46
|
+
const getOnchangeHandler = useCallback((val) => () => {
|
|
47
|
+
setValue(val);
|
|
48
|
+
onChange?.(val);
|
|
49
|
+
}, [onChange]);
|
|
50
|
+
return (_jsx("div", { className: classNames(className, classes.root), children: preparedOptions.map(({ label, value }) => (_jsx("div", { className: classNames(classes.option, {
|
|
51
|
+
[classes.disabled]: disabled,
|
|
52
|
+
[classes.active]: value === currentValue,
|
|
53
|
+
}), onClick: getOnchangeHandler(value), children: label }, value))) }));
|
|
54
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TooltipProps as MuiTooltipProps } from '@mui/material';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
interface TooltipProps extends Omit<MuiTooltipProps, 'title'> {
|
|
4
|
+
content?: MuiTooltipProps['title'] | null;
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
delay?: number | [number, number];
|
|
7
|
+
offset?: number | [number, number];
|
|
8
|
+
}
|
|
9
|
+
export declare const Tooltip: FC<TooltipProps>;
|
|
10
|
+
export declare const TooltipLazy: FC<TooltipProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Fade, Tooltip as MuiTooltip, } from '@mui/material';
|
|
3
|
+
import { useTheme } from '@mui/styles';
|
|
4
|
+
import { useMemo, useState } from 'react';
|
|
5
|
+
export const Tooltip = ({ visible, content, children, theme = 'dark', className, ...props }) => {
|
|
6
|
+
const muiTheme = useTheme();
|
|
7
|
+
const tooltipStyles = useMemo(() => ({
|
|
8
|
+
color: theme === 'dark'
|
|
9
|
+
? muiTheme.palette.common.white
|
|
10
|
+
: muiTheme.palette.secondary.main,
|
|
11
|
+
background: theme === 'dark'
|
|
12
|
+
? muiTheme.palette.grey[900]
|
|
13
|
+
: muiTheme.palette.common.white,
|
|
14
|
+
boxShadow: theme === 'light'
|
|
15
|
+
? '0 0 20px 4px rgb(154 161 177 / 15%), 0 4px 80px -8px rgb(36 40 47 / 25%), 0 4px 4px -2px rgb(91 94 105 / 15%)'
|
|
16
|
+
: undefined,
|
|
17
|
+
}), [muiTheme, theme]);
|
|
18
|
+
const arrowStyles = useMemo(() => ({
|
|
19
|
+
color: theme === 'dark'
|
|
20
|
+
? muiTheme.palette.grey[900]
|
|
21
|
+
: muiTheme.palette.common.white,
|
|
22
|
+
}), [muiTheme, theme]);
|
|
23
|
+
if (!content)
|
|
24
|
+
return children;
|
|
25
|
+
return (_jsx(MuiTooltip, { title: content, arrow: true, ...props, ...(visible && { open: true }), componentsProps: {
|
|
26
|
+
tooltip: {
|
|
27
|
+
className,
|
|
28
|
+
style: tooltipStyles,
|
|
29
|
+
},
|
|
30
|
+
arrow: { style: arrowStyles },
|
|
31
|
+
}, TransitionComponent: Fade, children: children }));
|
|
32
|
+
};
|
|
33
|
+
export const TooltipLazy = ({ children, ...rest }) => {
|
|
34
|
+
const [shouldRenderTooltip, setShouldRenderTooltip] = useState(false);
|
|
35
|
+
return (_jsx("span", { onMouseEnter: () => !shouldRenderTooltip && setShouldRenderTooltip(true), children: shouldRenderTooltip ? (_jsx(Tooltip, { ...rest, disableFocusListener: true, disableTouchListener: true, children: _jsx("span", { children: children }) })) : (children) }));
|
|
36
|
+
};
|
package/mui/index.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ThemeProvider } from "./provider";
|
|
2
|
+
export { ThemeProvider };
|
|
3
|
+
import { theme, type Theme, prepareTheme } from "./theme";
|
|
4
|
+
export { theme, Theme, prepareTheme };
|
|
5
|
+
export * from "./Button";
|
|
6
|
+
export * from "./Accordion";
|
|
7
|
+
export * from "./Card";
|
|
8
|
+
export * from "./Checkbox";
|
|
9
|
+
export * from "./Chip/ChipSecondarySmall";
|
|
10
|
+
export * from "./CircularProgress";
|
|
11
|
+
export * from "./Collapsible";
|
|
12
|
+
export * from "./Counter";
|
|
13
|
+
export * from "./DatePicker";
|
|
14
|
+
export * from "./Dropdown";
|
|
15
|
+
export * from "./EditableLabel";
|
|
16
|
+
export * from "./ExternalLink";
|
|
17
|
+
export * from "./FormControl";
|
|
18
|
+
export * from "./ReadOnlyField";
|
|
19
|
+
export * from "./FileInput";
|
|
20
|
+
export * from "./Icon";
|
|
21
|
+
export * from "./Input";
|
|
22
|
+
export * from "./Loader";
|
|
23
|
+
export * from "./Modal";
|
|
24
|
+
export * from "./Pagination";
|
|
25
|
+
export * from "./Paper";
|
|
26
|
+
export * from "./Popper";
|
|
27
|
+
export * from "./RadioGroup";
|
|
28
|
+
export * from "./Select";
|
|
29
|
+
export * from "./Switch";
|
|
30
|
+
export * from "./TimeDurationLabel";
|
|
31
|
+
export * from "./ToggleButton";
|
|
32
|
+
export * from "./ToggleButtonGroup";
|
|
33
|
+
export * from "./ToggleList";
|
|
34
|
+
export * from "./Tooltip";
|
|
35
|
+
export * from "./Tab";
|
|
36
|
+
export * from "./Tabs";
|
package/mui/index.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ThemeProvider } from "./provider";
|
|
2
|
+
export { ThemeProvider };
|
|
3
|
+
import { theme, prepareTheme } from "./theme";
|
|
4
|
+
export { theme, prepareTheme };
|
|
5
|
+
export * from "./Button";
|
|
6
|
+
export * from "./Accordion";
|
|
7
|
+
export * from "./Card";
|
|
8
|
+
export * from "./Checkbox";
|
|
9
|
+
export * from "./Chip/ChipSecondarySmall";
|
|
10
|
+
export * from "./CircularProgress";
|
|
11
|
+
export * from "./Collapsible";
|
|
12
|
+
export * from "./Counter";
|
|
13
|
+
export * from "./DatePicker";
|
|
14
|
+
export * from "./Dropdown";
|
|
15
|
+
export * from "./EditableLabel";
|
|
16
|
+
export * from "./ExternalLink";
|
|
17
|
+
export * from "./FormControl";
|
|
18
|
+
export * from "./ReadOnlyField";
|
|
19
|
+
export * from "./FileInput";
|
|
20
|
+
export * from "./Icon";
|
|
21
|
+
export * from "./Input";
|
|
22
|
+
export * from "./Loader";
|
|
23
|
+
export * from "./Modal";
|
|
24
|
+
export * from "./Pagination";
|
|
25
|
+
export * from "./Paper";
|
|
26
|
+
export * from "./Popper";
|
|
27
|
+
export * from "./RadioGroup";
|
|
28
|
+
export * from "./Select";
|
|
29
|
+
export * from "./Switch";
|
|
30
|
+
export * from "./TimeDurationLabel";
|
|
31
|
+
export * from "./ToggleButton";
|
|
32
|
+
export * from "./ToggleButtonGroup";
|
|
33
|
+
export * from "./ToggleList";
|
|
34
|
+
export * from "./Tooltip";
|
|
35
|
+
export * from "./Tab";
|
|
36
|
+
export * from "./Tabs";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { Theme } from "./theme";
|
|
3
|
+
export declare const cache: import("@emotion/utils").EmotionCache;
|
|
4
|
+
interface ThemeProps {
|
|
5
|
+
overrideTheme?: Theme;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const ThemeProvider: FC<ThemeProps>;
|
|
9
|
+
export {};
|
package/mui/provider.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { CacheProvider } from '@emotion/react';
|
|
4
|
+
import createCache from '@emotion/cache';
|
|
5
|
+
import { ThemeProvider as MuiThemeProvider } from '@mui/material/styles';
|
|
6
|
+
import CssBaseline from '@mui/material/CssBaseline';
|
|
7
|
+
import { createGenerateClassName, StylesProvider } from '@mui/styles';
|
|
8
|
+
import { accessibilityTheme, theme as defaultTheme } from "./theme";
|
|
9
|
+
import { getAccessabilityValue } from "../utils";
|
|
10
|
+
const cssId = 'fleet';
|
|
11
|
+
export const cache = createCache({
|
|
12
|
+
key: cssId,
|
|
13
|
+
prepend: true,
|
|
14
|
+
});
|
|
15
|
+
const generateClassName = createGenerateClassName({
|
|
16
|
+
disableGlobal: true,
|
|
17
|
+
productionPrefix: cssId,
|
|
18
|
+
});
|
|
19
|
+
export const ThemeProvider = ({ children, overrideTheme }) => {
|
|
20
|
+
const accessibility = useMemo(getAccessabilityValue, []);
|
|
21
|
+
return (_jsx(CacheProvider, { value: cache, children: _jsxs(MuiThemeProvider, { theme: overrideTheme ?? (accessibility ? accessibilityTheme : defaultTheme), children: [_jsx(CssBaseline, {}), _jsx(StylesProvider, { generateClassName: generateClassName, children: children })] }) }));
|
|
22
|
+
};
|
package/mui/theme.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ThemeOptions } from '@mui/material/styles';
|
|
2
|
+
import { BrandColors } from "../utils";
|
|
3
|
+
export declare const createTheme: (theme?: import("@mui/material/styles").Theme, ...overwriteThemes: ThemeOptions[]) => import("@mui/material/styles").Theme;
|
|
4
|
+
export declare const theme: import("@mui/material/styles").Theme;
|
|
5
|
+
export declare type Theme = typeof theme;
|
|
6
|
+
export declare const listBottomBorder: {
|
|
7
|
+
readonly content: "\"\"";
|
|
8
|
+
readonly position: "absolute";
|
|
9
|
+
readonly bottom: 0;
|
|
10
|
+
readonly left: 8;
|
|
11
|
+
readonly width: "calc(100% - 16px)";
|
|
12
|
+
readonly borderBottomColor: `${string} !important`;
|
|
13
|
+
readonly borderBottomStyle: "solid";
|
|
14
|
+
readonly borderBottomWidth: 1;
|
|
15
|
+
};
|
|
16
|
+
export declare const accessibilityTheme: import("@mui/material/styles").Theme;
|
|
17
|
+
export declare function prepareTheme(colorMap: BrandColors): import("@mui/material/styles").Theme;
|