@mittwald/flow-react-components 0.2.0-alpha.785 → 0.2.0-alpha.788
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/CHANGELOG.md +14 -0
- package/dist/assets/doc-properties.json +3562 -2980
- package/dist/css/all.css +1 -1
- package/dist/js/_virtual/_.locale.json@16189d7d260d7331b0e0a1936d5c7c52.mjs +11 -7
- package/dist/js/_virtual/_.locale.json@16189d7d260d7331b0e0a1936d5c7c52.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@162914df08c90e5e10d2f78b03d9d768.mjs +7 -3
- package/dist/js/_virtual/_.locale.json@162914df08c90e5e10d2f78b03d9d768.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@24b745a6ce9353be513d1f98e927d8d3.mjs +15 -11
- package/dist/js/_virtual/_.locale.json@24b745a6ce9353be513d1f98e927d8d3.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@24d7079ce80a619bbdda6dfcc8289f94.mjs +7 -3
- package/dist/js/_virtual/_.locale.json@24d7079ce80a619bbdda6dfcc8289f94.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@3b9d9e153ad753f427f375d1275fbcad.mjs +7 -3
- package/dist/js/_virtual/_.locale.json@3b9d9e153ad753f427f375d1275fbcad.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@3ed2dc50f997451bdd85a713c54e1025.mjs +9 -5
- package/dist/js/_virtual/_.locale.json@3ed2dc50f997451bdd85a713c54e1025.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@4119db69ca94e24d796b8e08482bc927.mjs +13 -9
- package/dist/js/_virtual/_.locale.json@4119db69ca94e24d796b8e08482bc927.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@48bdcfec6dd32df5dc9f6fa222d33240.mjs +7 -3
- package/dist/js/_virtual/_.locale.json@48bdcfec6dd32df5dc9f6fa222d33240.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@51592c7dce2c58889664b6822f25f6d1.mjs +7 -3
- package/dist/js/_virtual/_.locale.json@51592c7dce2c58889664b6822f25f6d1.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@51dcf4944c990e2cbe26472300dae78d.mjs +7 -3
- package/dist/js/_virtual/_.locale.json@51dcf4944c990e2cbe26472300dae78d.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@656bcfe2b7d48c4324cbdf14a4866b19.mjs +17 -13
- package/dist/js/_virtual/_.locale.json@656bcfe2b7d48c4324cbdf14a4866b19.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@6922640321d6c379322b09cbcf0dcdb3.mjs +7 -3
- package/dist/js/_virtual/_.locale.json@6922640321d6c379322b09cbcf0dcdb3.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@72ba2ce40f190df671686fec50c04ddf.mjs +17 -13
- package/dist/js/_virtual/_.locale.json@72ba2ce40f190df671686fec50c04ddf.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@774f50b2495c87d6d13911bcd596e720.mjs +7 -3
- package/dist/js/_virtual/_.locale.json@774f50b2495c87d6d13911bcd596e720.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@849e6f494125ee27df10a461562fa893.mjs +7 -3
- package/dist/js/_virtual/_.locale.json@849e6f494125ee27df10a461562fa893.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@8b26c19d587a90f821a2307c8122f6d1.mjs +13 -9
- package/dist/js/_virtual/_.locale.json@8b26c19d587a90f821a2307c8122f6d1.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@8d5024994f97657f895a4e2a188d2d8a.mjs +53 -49
- package/dist/js/_virtual/_.locale.json@8d5024994f97657f895a4e2a188d2d8a.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@95341064edeb0e38b66d786dbd62955c.mjs +81 -77
- package/dist/js/_virtual/_.locale.json@95341064edeb0e38b66d786dbd62955c.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@bb0db7b5021f874310cbe5b6cc3d9cac.mjs +25 -21
- package/dist/js/_virtual/_.locale.json@bb0db7b5021f874310cbe5b6cc3d9cac.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@bcca9730cf4e50042f33f85088c4be64.mjs +509 -503
- package/dist/js/_virtual/_.locale.json@bcca9730cf4e50042f33f85088c4be64.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@c33938a00f4bfb40e033ada6b54e38f9.mjs +7 -3
- package/dist/js/_virtual/_.locale.json@c33938a00f4bfb40e033ada6b54e38f9.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@d7a4ca29c343fa700bb5aa84d322958b.mjs +9 -5
- package/dist/js/_virtual/_.locale.json@d7a4ca29c343fa700bb5aa84d322958b.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@df0c8534e2e4f7c6c3d4365218df7347.mjs +7 -3
- package/dist/js/_virtual/_.locale.json@df0c8534e2e4f7c6c3d4365218df7347.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@df7be47291f95407e99e7159090958cc.mjs +9 -5
- package/dist/js/_virtual/_.locale.json@df7be47291f95407e99e7159090958cc.mjs.map +1 -1
- package/dist/js/_virtual/_.locale.json@e940efc6da10fdf09417eb079b65a343.mjs +7 -3
- package/dist/js/_virtual/_.locale.json@e940efc6da10fdf09417eb079b65a343.mjs.map +1 -1
- package/dist/js/default.mjs +1 -1
- package/dist/js/flr-universal.mjs +7 -4
- package/dist/js/flr-universal.mjs.map +1 -1
- package/dist/js/packages/components/src/components/AccentBox/AccentBox.mjs +52 -22
- package/dist/js/packages/components/src/components/AccentBox/AccentBox.mjs.map +1 -1
- package/dist/js/packages/components/src/components/AccentBox/AccentBox.module.scss.mjs +13 -5
- package/dist/js/packages/components/src/components/AccentBox/AccentBox.module.scss.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Action/lib/ariaLive.mjs +3 -3
- package/dist/js/packages/components/src/components/Action/lib/ariaLive.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Action/models/getExecutionFunction.mjs +5 -1
- package/dist/js/packages/components/src/components/Action/models/getExecutionFunction.mjs.map +1 -1
- package/dist/js/packages/components/src/components/AlertIcon/AlertIcon.mjs +3 -3
- package/dist/js/packages/components/src/components/AlertIcon/AlertIcon.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Badge/Badge.mjs +3 -3
- package/dist/js/packages/components/src/components/Badge/Badge.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ComboBox/ComboBox.mjs +3 -3
- package/dist/js/packages/components/src/components/ComboBox/ComboBox.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ContextMenu/ContextMenu.mjs +5 -2
- package/dist/js/packages/components/src/components/ContextMenu/ContextMenu.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs +4 -1
- package/dist/js/packages/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.mjs +6 -5
- package/dist/js/packages/components/src/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CopyButton/CopyButton.mjs +3 -3
- package/dist/js/packages/components/src/components/CopyButton/CopyButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CountryOptions/CountryOptions.mjs +21 -13
- package/dist/js/packages/components/src/components/CountryOptions/CountryOptions.mjs.map +1 -1
- package/dist/js/packages/components/src/components/FileCard/components/DeleteButton/DeleteButton.mjs +3 -3
- package/dist/js/packages/components/src/components/FileCard/components/DeleteButton/DeleteButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ImageCropper/ImageCropper.mjs +2 -2
- package/dist/js/packages/components/src/components/ImageCropper/ImageCropper.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Kbd/Kbd.mjs +4 -4
- package/dist/js/packages/components/src/components/Kbd/Kbd.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Label/Label.mjs +3 -3
- package/dist/js/packages/components/src/components/Label/Label.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Link/Link.mjs +3 -1
- package/dist/js/packages/components/src/components/Link/Link.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Link/Link.module.scss.mjs +8 -2
- package/dist/js/packages/components/src/components/Link/Link.module.scss.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Link/components/LinkIcon/LinkIcon.mjs +17 -4
- package/dist/js/packages/components/src/components/Link/components/LinkIcon/LinkIcon.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Footer/components/PaginationInfos/PaginationInfos.mjs +3 -3
- package/dist/js/packages/components/src/components/List/components/Footer/components/PaginationInfos/PaginationInfos.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Footer/components/ShowNextBatchButton/ShowNextBatchButton.mjs +3 -3
- package/dist/js/packages/components/src/components/List/components/Footer/components/ShowNextBatchButton/ShowNextBatchButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/ActiveFilters/ActiveFilters.mjs +7 -8
- package/dist/js/packages/components/src/components/List/components/Header/components/ActiveFilters/ActiveFilters.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/AllFiltersModal.mjs +7 -7
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/AllFiltersModal.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionDateRange.mjs +3 -3
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionDateRange.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionRadioGroup.mjs +3 -3
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionRadioGroup.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/SortingAccordion.mjs +3 -3
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/SortingAccordion.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/ViewModeAccordion.mjs +4 -4
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/ViewModeAccordion.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/DateRangeFilterPopover.mjs +3 -3
- package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/DateRangeFilterPopover.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/FilterContextMenus.mjs +4 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/FilterContextMenus.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/SortingContextMenu/SortingContextMenu.mjs +4 -2
- package/dist/js/packages/components/src/components/List/components/Header/components/SortingContextMenu/SortingContextMenu.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/SortingContextMenu/SortingMenuItem.mjs +4 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/SortingContextMenu/SortingMenuItem.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeContextMenu.mjs +4 -4
- package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeContextMenu.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeMenuItem.mjs +3 -3
- package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeMenuItem.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/lib.mjs +4 -1
- package/dist/js/packages/components/src/components/List/components/Header/lib.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Items/Items.mjs +4 -1
- package/dist/js/packages/components/src/components/List/components/Items/Items.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/AccordionButton.mjs +3 -3
- package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/AccordionButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/OptionsButton/OptionsButton.mjs +3 -3
- package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/OptionsButton/OptionsButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Items/components/Item/hooks/useGridItemProps.mjs +4 -1
- package/dist/js/packages/components/src/components/List/components/Items/components/Item/hooks/useGridItemProps.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.mjs +4 -1
- package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Table/Table.mjs +4 -1
- package/dist/js/packages/components/src/components/List/components/Table/Table.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/hooks/useAriaAnnounceSearchState.mjs +3 -3
- package/dist/js/packages/components/src/components/List/hooks/useAriaAnnounceSearchState.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/views/EmptyView/EmptyView.mjs +4 -4
- package/dist/js/packages/components/src/components/List/views/EmptyView/EmptyView.mjs.map +1 -1
- package/dist/js/packages/components/src/components/MarkdownEditor/components/ModeButton.mjs +5 -2
- package/dist/js/packages/components/src/components/MarkdownEditor/components/ModeButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/MarkdownEditor/components/ToolbarButton.mjs +5 -2
- package/dist/js/packages/components/src/components/MarkdownEditor/components/ToolbarButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Modal/Modal.mjs +5 -2
- package/dist/js/packages/components/src/components/Modal/Modal.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Modal/components/ConfirmUnsavedChangesModal/ConfirmUnsavedChangesModal.mjs +2 -2
- package/dist/js/packages/components/src/components/Modal/components/ConfirmUnsavedChangesModal/ConfirmUnsavedChangesModal.mjs.map +1 -1
- package/dist/js/packages/components/src/components/PasswordCreationField/PasswordCreationField.mjs +5 -3
- package/dist/js/packages/components/src/components/PasswordCreationField/PasswordCreationField.mjs.map +1 -1
- package/dist/js/packages/components/src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.mjs +5 -2
- package/dist/js/packages/components/src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.mjs +5 -2
- package/dist/js/packages/components/src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/PasswordCreationField/components/ValidationResultButton/ValidationResultButton.mjs +5 -2
- package/dist/js/packages/components/src/components/PasswordCreationField/components/ValidationResultButton/ValidationResultButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/PasswordCreationField/components/ValidationResultEntry/ValidationResultEntry.mjs +5 -2
- package/dist/js/packages/components/src/components/PasswordCreationField/components/ValidationResultEntry/ValidationResultEntry.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Rating/components/RatingSegment/RatingSegment.mjs +3 -3
- package/dist/js/packages/components/src/components/Rating/components/RatingSegment/RatingSegment.mjs.map +1 -1
- package/dist/js/packages/components/src/components/SearchField/SearchField.mjs +3 -3
- package/dist/js/packages/components/src/components/SearchField/SearchField.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Slider/Slider.mjs +4 -4
- package/dist/js/packages/components/src/components/Slider/Slider.mjs.map +1 -1
- package/dist/js/packages/components/src/components/TextArea/TextArea.mjs +3 -3
- package/dist/js/packages/components/src/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/js/packages/components/src/components/TextField/TextField.mjs +8 -10
- package/dist/js/packages/components/src/components/TextField/TextField.mjs.map +1 -1
- package/dist/js/packages/components/src/components/TranslationProvider/TranslationProvider.mjs +9 -5
- package/dist/js/packages/components/src/components/TranslationProvider/TranslationProvider.mjs.map +1 -1
- package/dist/js/packages/components/src/components/TranslationProvider/useLocalizedStringFormatter.mjs +54 -0
- package/dist/js/packages/components/src/components/TranslationProvider/useLocalizedStringFormatter.mjs.map +1 -0
- package/dist/js/packages/components/src/components/propTypes/index.mjs +2 -1
- package/dist/js/packages/components/src/components/propTypes/index.mjs.map +1 -1
- package/dist/js/packages/components/src/integrations/react-hook-form/components/Field/Field.mjs +11 -8
- package/dist/js/packages/components/src/integrations/react-hook-form/components/Field/Field.mjs.map +1 -1
- package/dist/js/packages/components/src/integrations/react-hook-form/components/FormAction/FormResetAction.mjs +5 -1
- package/dist/js/packages/components/src/integrations/react-hook-form/components/FormAction/FormResetAction.mjs.map +1 -1
- package/dist/js/packages/components/src/integrations/react-hook-form/components/FormAction/FormSubmitAction.mjs +5 -1
- package/dist/js/packages/components/src/integrations/react-hook-form/components/FormAction/FormSubmitAction.mjs.map +1 -1
- package/dist/js/packages/components/src/integrations/react-hook-form/components/FormContextProvider/useFormSubmitAction.mjs +5 -1
- package/dist/js/packages/components/src/integrations/react-hook-form/components/FormContextProvider/useFormSubmitAction.mjs.map +1 -1
- package/dist/types/components/AccentBox/AccentBox.d.ts +13 -3
- package/dist/types/components/AccentBox/AccentBox.d.ts.map +1 -1
- package/dist/types/components/AccentBox/stories/Default.stories.d.ts +4 -4
- package/dist/types/components/AccentBox/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/components/Badge/Badge.d.ts.map +1 -1
- package/dist/types/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.d.ts.map +1 -1
- package/dist/types/components/CountryOptions/CountryOptions.d.ts +4 -3
- package/dist/types/components/CountryOptions/CountryOptions.d.ts.map +1 -1
- package/dist/types/components/Link/Link.d.ts.map +1 -1
- package/dist/types/components/Link/components/LinkIcon/LinkIcon.d.ts.map +1 -1
- package/dist/types/components/List/components/Header/components/ActiveFilters/ActiveFilters.d.ts.map +1 -1
- package/dist/types/components/List/components/Header/components/AllFiltersModal/ViewModeAccordion.d.ts.map +1 -1
- package/dist/types/components/List/components/Header/components/SortingContextMenu/SortingContextMenu.d.ts.map +1 -1
- package/dist/types/components/List/hooks/useAriaAnnounceSearchState.d.ts.map +1 -1
- package/dist/types/components/MarkdownEditor/components/ModeButton.d.ts.map +1 -1
- package/dist/types/components/MarkdownEditor/components/ToolbarButton.d.ts.map +1 -1
- package/dist/types/components/PasswordCreationField/PasswordCreationField.d.ts.map +1 -1
- package/dist/types/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.d.ts.map +1 -1
- package/dist/types/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.d.ts.map +1 -1
- package/dist/types/components/PasswordCreationField/components/ValidationResultButton/ValidationResultButton.d.ts.map +1 -1
- package/dist/types/components/PasswordCreationField/components/ValidationResultEntry/ValidationResultEntry.d.ts.map +1 -1
- package/dist/types/components/TextField/TextField.d.ts.map +1 -1
- package/dist/types/components/TranslationProvider/TranslationProvider.d.ts +17 -8
- package/dist/types/components/TranslationProvider/TranslationProvider.d.ts.map +1 -1
- package/dist/types/components/TranslationProvider/index.d.ts +3 -3
- package/dist/types/components/TranslationProvider/index.d.ts.map +1 -1
- package/dist/types/components/TranslationProvider/stories/Default.stories.d.ts +2 -2
- package/dist/types/components/TranslationProvider/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/components/TranslationProvider/useLocalizedStringFormatter.d.ts +12 -0
- package/dist/types/components/TranslationProvider/useLocalizedStringFormatter.d.ts.map +1 -0
- package/dist/types/components/TranslationProvider/view.d.ts +8 -0
- package/dist/types/components/TranslationProvider/view.d.ts.map +1 -0
- package/dist/types/components/propTypes/index.d.ts +2 -0
- package/dist/types/components/propTypes/index.d.ts.map +1 -1
- package/dist/types/index/flr-universal.d.ts +1 -1
- package/dist/types/index/flr-universal.d.ts.map +1 -1
- package/dist/types/integrations/react-hook-form/components/Field/Field.d.ts.map +1 -1
- package/dist/types/views/TranslationProviderView.d.ts +5 -0
- package/dist/types/views/TranslationProviderView.d.ts.map +1 -0
- package/package.json +10 -7
- package/dist/js/packages/components/src/components/TranslationProvider/useLocalizedContextStringFormatter.mjs +0 -16
- package/dist/js/packages/components/src/components/TranslationProvider/useLocalizedContextStringFormatter.mjs.map +0 -1
- package/dist/js/packages/components/src/lib/react/components/Translate/Translate.mjs +0 -12
- package/dist/js/packages/components/src/lib/react/components/Translate/Translate.mjs.map +0 -1
- package/dist/types/components/TranslationProvider/useLocalizedContextStringFormatter.d.ts +0 -7
- package/dist/types/components/TranslationProvider/useLocalizedContextStringFormatter.d.ts.map +0 -1
- package/dist/types/lib/react/components/Translate/Translate.d.ts +0 -10
- package/dist/types/lib/react/components/Translate/Translate.d.ts.map +0 -1
- package/dist/types/lib/react/components/Translate/index.d.ts +0 -3
- package/dist/types/lib/react/components/Translate/index.d.ts.map +0 -1
package/dist/js/packages/components/src/components/TranslationProvider/TranslationProvider.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TranslationProvider.mjs","sources":["../../../../../../../src/components/TranslationProvider/TranslationProvider.tsx"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"TranslationProvider.mjs","sources":["../../../../../../../src/components/TranslationProvider/TranslationProvider.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport React, { createContext, useContext } from \"react\";\nimport type {\n LocalizedComponentName,\n TranslationFunction,\n} from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\n\ntype ComponentTranslationDictionary = Record<\n LocalizedComponentName,\n Record<string, string>\n>;\n\nexport interface Translations {\n [locale: string]: ComponentTranslationDictionary | undefined;\n \"de-DE\"?: ComponentTranslationDictionary;\n \"en-US\"?: ComponentTranslationDictionary;\n}\n\nexport interface TranslationContext {\n translations?: Translations;\n translate?: TranslationFunction;\n}\n\nexport type TranslationProviderProps = PropsWithChildren &\n TranslationContext &\n FlowComponentProps<never>;\n\nconst context = createContext<TranslationContext>({});\n\nexport const useTranslationProvider = () => useContext(context);\n\n/** @flr-generate all */\nexport const TranslationProvider = flowComponent(\n \"TranslationProvider\",\n (props) => {\n const { children, translations, translate } = props;\n\n return (\n <context.Provider value={{ translations, translate }}>\n {children}\n </context.Provider>\n );\n },\n);\n\nexport default TranslationProvider;\n"],"names":[],"mappings":";;;;AA6BA,MAAM,OAAA,GAAU,aAAA,CAAkC,EAAE,CAAA;AAE7C,MAAM,sBAAA,GAAyB,MAAM,UAAA,CAAW,OAAO;AAGvD,MAAM,mBAAA,GAAsB,aAAA;AAAA,EACjC,qBAAA;AAAA,EACA,CAAC,KAAA,KAAU;AACT,IAAA,MAAM,EAAE,QAAA,EAAU,YAAA,EAAc,SAAA,EAAU,GAAI,KAAA;AAE9C,IAAA,uBACE,GAAA,CAAC,QAAQ,QAAA,EAAR,EAAiB,OAAO,EAAE,YAAA,EAAc,SAAA,EAAU,EAChD,QAAA,EACH,CAAA;AAAA,EAEJ;AACF;;;;"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import { useTranslationProvider } from './TranslationProvider.mjs';
|
|
4
|
+
import { mergeDeep, mapValues, pick } from 'remeda';
|
|
5
|
+
import { useLocale } from 'react-aria-components';
|
|
6
|
+
import IntlMessageFormat from 'intl-messageformat';
|
|
7
|
+
import { useLocalizedStringDictionary } from '@react-aria/i18n';
|
|
8
|
+
import { useMemo, useCallback } from 'react';
|
|
9
|
+
|
|
10
|
+
const pickComponentTranslations = (componentName, data) => {
|
|
11
|
+
if (!data) {
|
|
12
|
+
return {};
|
|
13
|
+
}
|
|
14
|
+
return mapValues(data, (components) => {
|
|
15
|
+
const picked = pick(components ?? {}, [componentName]);
|
|
16
|
+
return picked[componentName] ?? {};
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const useLocalizedStringFormatter = (strings, componentName) => {
|
|
20
|
+
const { locale } = useLocale();
|
|
21
|
+
const { translations, translate } = useTranslationProvider();
|
|
22
|
+
const mergedStrings = useMemo(
|
|
23
|
+
() => mergeDeep(
|
|
24
|
+
strings,
|
|
25
|
+
pickComponentTranslations(componentName, translations)
|
|
26
|
+
),
|
|
27
|
+
[strings, translations, componentName]
|
|
28
|
+
);
|
|
29
|
+
const dictionary = useLocalizedStringDictionary(mergedStrings, componentName);
|
|
30
|
+
const formatFunction = useCallback(
|
|
31
|
+
(key, variables) => {
|
|
32
|
+
if (translate) {
|
|
33
|
+
const customTranslated = translate(key, variables, {
|
|
34
|
+
component: componentName,
|
|
35
|
+
locale
|
|
36
|
+
});
|
|
37
|
+
if (customTranslated !== void 0) {
|
|
38
|
+
return customTranslated;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const translationString = dictionary.getStringForLocale(key, locale);
|
|
42
|
+
const translationMessage = new IntlMessageFormat(
|
|
43
|
+
translationString,
|
|
44
|
+
locale
|
|
45
|
+
);
|
|
46
|
+
return String(translationMessage.format(variables));
|
|
47
|
+
},
|
|
48
|
+
[translate, locale, componentName, dictionary]
|
|
49
|
+
);
|
|
50
|
+
return useMemo(() => ({ format: formatFunction }), [formatFunction]);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export { useLocalizedStringFormatter };
|
|
54
|
+
//# sourceMappingURL=useLocalizedStringFormatter.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLocalizedStringFormatter.mjs","sources":["../../../../../../../src/components/TranslationProvider/useLocalizedStringFormatter.ts"],"sourcesContent":["import {\n type Translations,\n useTranslationProvider,\n} from \"@/components/TranslationProvider/TranslationProvider\";\nimport { mergeDeep } from \"remeda\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\nimport { mapValues, pick } from \"remeda\";\nimport { useLocale } from \"react-aria-components\";\nimport type {\n Variables,\n LocalizedStrings as LocalizedStringsIntl,\n} from \"@internationalized/string\";\nimport IntlMessageFormat from \"intl-messageformat\";\nimport { useLocalizedStringDictionary } from \"@react-aria/i18n\";\nimport { useCallback, useMemo } from \"react\";\n\nexport type LocalizedStrings = LocalizedStringsIntl<string, string>;\nexport type LocalizedComponentName = FlowComponentName | string;\n\nexport type TranslationFunction = (\n key: string,\n variables: Variables,\n meta: {\n component: string;\n locale: string;\n },\n) => string | undefined;\n\nconst pickComponentTranslations = (\n componentName: LocalizedComponentName,\n data?: Translations,\n) => {\n if (!data) {\n return {};\n }\n\n return mapValues(data, (components) => {\n const picked = pick(components ?? {}, [componentName]);\n return picked[componentName] ?? {};\n });\n};\n\nexport const useLocalizedStringFormatter = (\n strings: LocalizedStrings,\n componentName: LocalizedComponentName,\n) => {\n const { locale } = useLocale();\n const { translations, translate } = useTranslationProvider();\n\n const mergedStrings = useMemo(\n () =>\n mergeDeep(\n strings,\n pickComponentTranslations(componentName, translations),\n ),\n [strings, translations, componentName],\n );\n\n const dictionary = useLocalizedStringDictionary(mergedStrings, componentName);\n const formatFunction = useCallback(\n (key: string, variables?: Variables): string => {\n if (translate) {\n const customTranslated = translate(key, variables, {\n component: componentName,\n locale,\n });\n\n if (customTranslated !== undefined) {\n return customTranslated;\n }\n }\n\n const translationString = dictionary.getStringForLocale(key, locale);\n const translationMessage = new IntlMessageFormat(\n translationString,\n locale,\n );\n\n return String(translationMessage.format(variables));\n },\n [translate, locale, componentName, dictionary],\n );\n\n return useMemo(() => ({ format: formatFunction }), [formatFunction]);\n};\n"],"names":[],"mappings":";;;;;;;AA4BA,MAAM,yBAAA,GAA4B,CAChC,aAAA,EACA,IAAA,KACG;AACH,EAAA,IAAI,CAAC,IAAA,EAAM;AACT,IAAA,OAAO,EAAC;AAAA,EACV;AAEA,EAAA,OAAO,SAAA,CAAU,IAAA,EAAM,CAAC,UAAA,KAAe;AACrC,IAAA,MAAM,SAAS,IAAA,CAAK,UAAA,IAAc,EAAC,EAAG,CAAC,aAAa,CAAC,CAAA;AACrD,IAAA,OAAO,MAAA,CAAO,aAAa,CAAA,IAAK,EAAC;AAAA,EACnC,CAAC,CAAA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ContextSupportingComponentsMap = {
|
|
|
79
79
|
Text: true,
|
|
80
80
|
TextArea: true,
|
|
81
81
|
TextField: true,
|
|
82
|
-
TimeField: true
|
|
82
|
+
TimeField: true,
|
|
83
|
+
TranslationProvider: true
|
|
83
84
|
};
|
|
84
85
|
const propsContextSupportingComponents = Object.keys(
|
|
85
86
|
propsContextSupportingComponentsMap
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../src/components/propTypes/index.ts"],"sourcesContent":["import type { TextProps } from \"@/components/Text\";\nimport type { ButtonProps } from \"@/components/Button\";\nimport type { IconProps } from \"@/components/Icon\";\nimport type { LabelProps } from \"@/components/Label\";\nimport type { ContentProps } from \"@/components/Content\";\nimport type { LayoutCardProps } from \"@/components/LayoutCard\";\nimport type { LinkProps } from \"@/components/Link\";\nimport type { LightBoxProps } from \"@/components/LightBox\";\nimport type { FieldErrorProps } from \"@/components/FieldError\";\nimport type { FieldDescriptionProps } from \"@/components/FieldDescription\";\nimport type { AlertProps } from \"@/components/Alert\";\nimport type { HeadingProps } from \"@/components/Heading\";\nimport type { InitialsProps } from \"@/components/Initials\";\nimport type { ImageProps } from \"@/components/Image\";\nimport type { CopyButtonProps } from \"@/components/CopyButton\";\nimport type { HeaderProps } from \"@/components/Header/\";\nimport type { SwitchProps } from \"@/components/Switch\";\nimport type { AlertBadgeProps } from \"@/components/AlertBadge\";\nimport type { ActionGroupProps } from \"@/components/ActionGroup\";\nimport type { AvatarProps } from \"@/components/Avatar\";\nimport type { ActionProps } from \"@/components/Action\";\nimport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n MenuItemProps,\n} from \"@/components/ContextMenu\";\nimport type { SelectProps } from \"@/components/Select\";\nimport type {\n RadioButtonProps,\n RadioGroupProps,\n RadioProps,\n} from \"@/components/RadioGroup\";\nimport type { TextFieldProps } from \"@/components/TextField\";\nimport type { NumberFieldProps } from \"@/components/NumberField\";\nimport type { TextAreaProps } from \"@/components/TextArea\";\nimport type { CheckboxGroupProps } from \"@/components/CheckboxGroup\";\nimport type { CheckboxProps } from \"@/components/Checkbox\";\nimport type { CheckboxButtonProps } from \"@/components/CheckboxButton\";\nimport type { TabsProps } from \"@/components/Tabs\";\nimport type { ModalProps } from \"@/components/Modal\";\nimport type { SectionProps } from \"@/components/Section\";\nimport type { SliderProps } from \"@/components/Slider\";\nimport type { CounterBadgeProps } from \"@/components/CounterBadge\";\nimport type { FlowComponentName } from \"@/components/propTypes/types\";\nimport type {\n ContextualHelpProps,\n ContextualHelpTriggerProps,\n} from \"@/components/ContextualHelp\";\nimport type { PopoverProps, PopoverTriggerProps } from \"@/components/Popover\";\nimport type { ContextMenuSectionProps } from \"@/components/ContextMenu/components/ContextMenuSection\";\nimport type { ListProps } from \"@/components/List\";\nimport type { PasswordCreationFieldProps } from \"@/components/PasswordCreationField\";\nimport type { SearchFieldProps } from \"@/components/SearchField\";\nimport type { BadgeProps } from \"@/components/Badge\";\nimport type { DatePickerProps } from \"@/components/DatePicker\";\nimport type * as Aria from \"react-aria-components\";\nimport type { DateRangePickerProps } from \"@/components/DateRangePicker\";\nimport type { TimeFieldProps } from \"@/components/TimeField\";\nimport type { AlertIconProps } from \"@/components/AlertIcon\";\nimport type { ListSummaryProps } from \"@/components/List/components/ListSummary/ListSummary\";\nimport type { SegmentedControlProps } from \"@/components/SegmentedControl\";\nimport type { SegmentProps } from \"@/components/SegmentedControl/components/Segment\";\nimport type { FileCardProps } from \"@/components/FileCard\";\nimport type { FileFieldProps } from \"@/components/FileField\";\nimport type { AlignProps } from \"@/components/Align\";\nimport type { CountryOptionsProps } from \"src/components/CountryOptions\";\nimport type { ComboBoxProps } from \"@/components/ComboBox\";\nimport type { OptionProps } from \"@/components/Option\";\nimport type { MessageProps } from \"@/components/Message\";\nimport type { MessageThreadProps } from \"@/components/MessageThread\";\nimport type { FileCardListProps } from \"@/components/FileCardList\";\nimport type { AccentBoxProps } from \"@/components/AccentBox\";\nimport type { ColumnLayoutProps } from \"@/components/ColumnLayout\";\nimport type { MenuTriggerProps } from \"@/components/OverlayTrigger\";\nimport type { ProgressBarProps } from \"@/components/ProgressBar\";\nimport type { FileDropZoneProps } from \"@/components/FileDropZone\";\nimport type { NavigationProps } from \"@/components/Navigation\";\nimport type { NavigationGroupProps } from \"@/components/Navigation/components/NavigationGroup\";\nimport type { AutocompleteProps } from \"@/components/Autocomplete/Autocomplete\";\nimport type { OptionsProps } from \"@/components/Options/Options\";\nimport type { MarkdownEditorProps } from \"@/components/MarkdownEditor\";\nimport type { AlertTextProps } from \"@/components/AlertText\";\nimport type { IllustratedMessageProps } from \"@/components/IllustratedMessage\";\nimport type { RatingProps } from \"@/components/Rating\";\nimport type { CodeEditorProps } from \"@/components/CodeEditor\";\nimport type { KbdProps } from \"@/components/Kbd/Kbd\";\n\nexport * from \"./types\";\n\nexport interface FlowComponentPropsTypes {\n AccentBox: AccentBoxProps;\n Action: ActionProps;\n ActionGroup: ActionGroupProps;\n Alert: AlertProps;\n AlertBadge: AlertBadgeProps;\n AlertIcon: AlertIconProps;\n AlertText: AlertTextProps;\n Align: AlignProps;\n Avatar: AvatarProps;\n Autocomplete: AutocompleteProps;\n Badge: BadgeProps;\n Button: ButtonProps;\n CodeEditor: CodeEditorProps;\n Checkbox: CheckboxProps;\n CheckboxButton: CheckboxButtonProps;\n CheckboxGroup: CheckboxGroupProps;\n ColumnLayout: ColumnLayoutProps;\n ComboBox: ComboBoxProps;\n Content: ContentProps;\n ContextMenu: ContextMenuProps;\n ContextMenuSection: ContextMenuSectionProps;\n ContextMenuTrigger: ContextMenuTriggerProps;\n ContextualHelp: ContextualHelpProps;\n ContextualHelpTrigger: ContextualHelpTriggerProps;\n CopyButton: CopyButtonProps;\n CounterBadge: CounterBadgeProps;\n CountryOptions: CountryOptionsProps;\n DatePicker: DatePickerProps<Aria.DateValue>;\n DateRangePicker: DateRangePickerProps<Aria.DateValue>;\n FieldDescription: FieldDescriptionProps;\n FieldError: FieldErrorProps;\n FileCard: FileCardProps;\n FileCardList: FileCardListProps;\n FileField: FileFieldProps;\n FileDropZone: FileDropZoneProps;\n Header: HeaderProps;\n Heading: HeadingProps;\n Icon: IconProps;\n IllustratedMessage: IllustratedMessageProps;\n Image: ImageProps;\n Initials: InitialsProps;\n Label: LabelProps;\n LayoutCard: LayoutCardProps;\n LightBox: LightBoxProps;\n Link: LinkProps;\n List: ListProps<never>;\n ListSummary: ListSummaryProps;\n MarkdownEditor: MarkdownEditorProps;\n MenuItem: MenuItemProps;\n MenuTrigger: MenuTriggerProps;\n Message: MessageProps;\n MessageThread: MessageThreadProps;\n Modal: ModalProps;\n Navigation: NavigationProps;\n NavigationGroup: NavigationGroupProps;\n NumberField: NumberFieldProps;\n Option: OptionProps;\n Options: OptionsProps;\n Popover: PopoverProps;\n PopoverTrigger: PopoverTriggerProps;\n PasswordCreationField: PasswordCreationFieldProps;\n ProgressBar: ProgressBarProps;\n Radio: RadioProps;\n RadioButton: RadioButtonProps;\n RadioGroup: RadioGroupProps;\n Rating: RatingProps;\n SearchField: SearchFieldProps;\n Section: SectionProps;\n Segment: SegmentProps;\n SegmentedControl: SegmentedControlProps;\n Select: SelectProps;\n Kbd: KbdProps;\n Slider: SliderProps;\n Switch: SwitchProps;\n Tabs: TabsProps;\n TabTitle: TabsProps;\n Text: TextProps;\n TextArea: TextAreaProps;\n TextField: TextFieldProps;\n TimeField: TimeFieldProps;\n}\n\nconst propsContextSupportingComponentsMap: Record<\n keyof FlowComponentPropsTypes,\n true\n> = {\n AccentBox: true,\n Action: true,\n ActionGroup: true,\n Avatar: true,\n Autocomplete: true,\n Alert: true,\n AlertBadge: true,\n AlertIcon: true,\n AlertText: true,\n Align: true,\n Badge: true,\n Button: true,\n CodeEditor: true,\n Checkbox: true,\n CheckboxButton: true,\n CheckboxGroup: true,\n ColumnLayout: true,\n ComboBox: true,\n Content: true,\n ContextMenu: true,\n ContextMenuSection: true,\n ContextMenuTrigger: true,\n ContextualHelp: true,\n ContextualHelpTrigger: true,\n CopyButton: true,\n CounterBadge: true,\n CountryOptions: true,\n DatePicker: true,\n DateRangePicker: true,\n FieldDescription: true,\n FieldError: true,\n FileCard: true,\n FileCardList: true,\n FileField: true,\n FileDropZone: true,\n Header: true,\n Heading: true,\n Icon: true,\n IllustratedMessage: true,\n Image: true,\n Initials: true,\n Kbd: true,\n Label: true,\n LayoutCard: true,\n LightBox: true,\n Link: true,\n List: true,\n ListSummary: true,\n MarkdownEditor: true,\n MenuItem: true,\n MenuTrigger: true,\n Message: true,\n MessageThread: true,\n Modal: true,\n Navigation: true,\n NavigationGroup: true,\n NumberField: true,\n Radio: true,\n Option: true,\n Options: true,\n Popover: true,\n PopoverTrigger: true,\n PasswordCreationField: true,\n ProgressBar: true,\n RadioButton: true,\n RadioGroup: true,\n Rating: true,\n SearchField: true,\n Section: true,\n Segment: true,\n SegmentedControl: true,\n Select: true,\n Slider: true,\n Switch: true,\n Tabs: true,\n TabTitle: true,\n TestComponent: true,\n Text: true,\n TextArea: true,\n TextField: true,\n TimeField: true,\n};\n\nexport const propsContextSupportingComponents = Object.keys(\n propsContextSupportingComponentsMap,\n) as FlowComponentName[];\n"],"names":[],"mappings":"AA4KA,MAAM,mCAAA,GAGF;AAAA,EACF,SAAA,EAAW,IAAA;AAAA,EACX,MAAA,EAAQ,IAAA;AAAA,EACR,WAAA,EAAa,IAAA;AAAA,EACb,MAAA,EAAQ,IAAA;AAAA,EACR,YAAA,EAAc,IAAA;AAAA,EACd,KAAA,EAAO,IAAA;AAAA,EACP,UAAA,EAAY,IAAA;AAAA,EACZ,SAAA,EAAW,IAAA;AAAA,EACX,SAAA,EAAW,IAAA;AAAA,EACX,KAAA,EAAO,IAAA;AAAA,EACP,KAAA,EAAO,IAAA;AAAA,EACP,MAAA,EAAQ,IAAA;AAAA,EACR,UAAA,EAAY,IAAA;AAAA,EACZ,QAAA,EAAU,IAAA;AAAA,EACV,cAAA,EAAgB,IAAA;AAAA,EAChB,aAAA,EAAe,IAAA;AAAA,EACf,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,IAAA;AAAA,EACP,MAAA,EAAQ,IAAA;AAAA,EACR,OAAA,EAAS,IAAA;AAAA,EACT,OAAA,EAAS,IAAA;AAAA,EACT,cAAA,EAAgB,IAAA;AAAA,EAChB,qBAAA,EAAuB,IAAA;AAAA,EACvB,WAAA,EAAa,IAAA;AAAA,EACb,WAAA,EAAa,IAAA;AAAA,EACb,UAAA,EAAY,IAAA;AAAA,EACZ,MAAA,EAAQ,IAAA;AAAA,EACR,WAAA,EAAa,IAAA;AAAA,EACb,OAAA,EAAS,IAAA;AAAA,EACT,OAAA,EAAS,IAAA;AAAA,EACT,gBAAA,EAAkB,IAAA;AAAA,EAClB,MAAA,EAAQ,IAAA;AAAA,EACR,MAAA,EAAQ,IAAA;AAAA,EACR,MAAA,EAAQ,IAAA;AAAA,EACR,IAAA,EAAM,IAAA;AAAA,EACN,QAAA,EAAU,IAAA;AAAA,EACV,aAAA,EAAe,IAAA;AAAA,EACf,IAAA,EAAM,IAAA;AAAA,EACN,QAAA,EAAU,IAAA;AAAA,EACV,SAAA,EAAW,IAAA;AAAA,EACX,SAAA,EAAW;AACb,CAAA;AAEO,MAAM,mCAAmC,MAAA,CAAO,IAAA;AAAA,EACrD;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../../../src/components/propTypes/index.ts"],"sourcesContent":["import type { TextProps } from \"@/components/Text\";\nimport type { ButtonProps } from \"@/components/Button\";\nimport type { IconProps } from \"@/components/Icon\";\nimport type { LabelProps } from \"@/components/Label\";\nimport type { ContentProps } from \"@/components/Content\";\nimport type { LayoutCardProps } from \"@/components/LayoutCard\";\nimport type { LinkProps } from \"@/components/Link\";\nimport type { LightBoxProps } from \"@/components/LightBox\";\nimport type { FieldErrorProps } from \"@/components/FieldError\";\nimport type { FieldDescriptionProps } from \"@/components/FieldDescription\";\nimport type { AlertProps } from \"@/components/Alert\";\nimport type { HeadingProps } from \"@/components/Heading\";\nimport type { InitialsProps } from \"@/components/Initials\";\nimport type { ImageProps } from \"@/components/Image\";\nimport type { CopyButtonProps } from \"@/components/CopyButton\";\nimport type { HeaderProps } from \"@/components/Header/\";\nimport type { SwitchProps } from \"@/components/Switch\";\nimport type { AlertBadgeProps } from \"@/components/AlertBadge\";\nimport type { ActionGroupProps } from \"@/components/ActionGroup\";\nimport type { AvatarProps } from \"@/components/Avatar\";\nimport type { ActionProps } from \"@/components/Action\";\nimport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n MenuItemProps,\n} from \"@/components/ContextMenu\";\nimport type { SelectProps } from \"@/components/Select\";\nimport type {\n RadioButtonProps,\n RadioGroupProps,\n RadioProps,\n} from \"@/components/RadioGroup\";\nimport type { TextFieldProps } from \"@/components/TextField\";\nimport type { NumberFieldProps } from \"@/components/NumberField\";\nimport type { TextAreaProps } from \"@/components/TextArea\";\nimport type { CheckboxGroupProps } from \"@/components/CheckboxGroup\";\nimport type { CheckboxProps } from \"@/components/Checkbox\";\nimport type { CheckboxButtonProps } from \"@/components/CheckboxButton\";\nimport type { TabsProps } from \"@/components/Tabs\";\nimport type { ModalProps } from \"@/components/Modal\";\nimport type { SectionProps } from \"@/components/Section\";\nimport type { SliderProps } from \"@/components/Slider\";\nimport type { CounterBadgeProps } from \"@/components/CounterBadge\";\nimport type { FlowComponentName } from \"@/components/propTypes/types\";\nimport type {\n ContextualHelpProps,\n ContextualHelpTriggerProps,\n} from \"@/components/ContextualHelp\";\nimport type { PopoverProps, PopoverTriggerProps } from \"@/components/Popover\";\nimport type { ContextMenuSectionProps } from \"@/components/ContextMenu/components/ContextMenuSection\";\nimport type { ListProps } from \"@/components/List\";\nimport type { PasswordCreationFieldProps } from \"@/components/PasswordCreationField\";\nimport type { SearchFieldProps } from \"@/components/SearchField\";\nimport type { BadgeProps } from \"@/components/Badge\";\nimport type { DatePickerProps } from \"@/components/DatePicker\";\nimport type * as Aria from \"react-aria-components\";\nimport type { DateRangePickerProps } from \"@/components/DateRangePicker\";\nimport type { TimeFieldProps } from \"@/components/TimeField\";\nimport type { AlertIconProps } from \"@/components/AlertIcon\";\nimport type { ListSummaryProps } from \"@/components/List/components/ListSummary/ListSummary\";\nimport type { SegmentedControlProps } from \"@/components/SegmentedControl\";\nimport type { SegmentProps } from \"@/components/SegmentedControl/components/Segment\";\nimport type { FileCardProps } from \"@/components/FileCard\";\nimport type { FileFieldProps } from \"@/components/FileField\";\nimport type { AlignProps } from \"@/components/Align\";\nimport type { CountryOptionsProps } from \"src/components/CountryOptions\";\nimport type { ComboBoxProps } from \"@/components/ComboBox\";\nimport type { OptionProps } from \"@/components/Option\";\nimport type { MessageProps } from \"@/components/Message\";\nimport type { MessageThreadProps } from \"@/components/MessageThread\";\nimport type { FileCardListProps } from \"@/components/FileCardList\";\nimport type { AccentBoxProps } from \"@/components/AccentBox\";\nimport type { ColumnLayoutProps } from \"@/components/ColumnLayout\";\nimport type { MenuTriggerProps } from \"@/components/OverlayTrigger\";\nimport type { ProgressBarProps } from \"@/components/ProgressBar\";\nimport type { FileDropZoneProps } from \"@/components/FileDropZone\";\nimport type { NavigationProps } from \"@/components/Navigation\";\nimport type { NavigationGroupProps } from \"@/components/Navigation/components/NavigationGroup\";\nimport type { AutocompleteProps } from \"@/components/Autocomplete/Autocomplete\";\nimport type { OptionsProps } from \"@/components/Options/Options\";\nimport type { MarkdownEditorProps } from \"@/components/MarkdownEditor\";\nimport type { AlertTextProps } from \"@/components/AlertText\";\nimport type { IllustratedMessageProps } from \"@/components/IllustratedMessage\";\nimport type { RatingProps } from \"@/components/Rating\";\nimport type { CodeEditorProps } from \"@/components/CodeEditor\";\nimport type { KbdProps } from \"@/components/Kbd/Kbd\";\nimport type { TranslationProviderProps } from \"@/components/TranslationProvider/TranslationProvider\";\n\nexport * from \"./types\";\n\nexport interface FlowComponentPropsTypes {\n AccentBox: AccentBoxProps;\n Action: ActionProps;\n ActionGroup: ActionGroupProps;\n Alert: AlertProps;\n AlertBadge: AlertBadgeProps;\n AlertIcon: AlertIconProps;\n AlertText: AlertTextProps;\n Align: AlignProps;\n Avatar: AvatarProps;\n Autocomplete: AutocompleteProps;\n Badge: BadgeProps;\n Button: ButtonProps;\n CodeEditor: CodeEditorProps;\n Checkbox: CheckboxProps;\n CheckboxButton: CheckboxButtonProps;\n CheckboxGroup: CheckboxGroupProps;\n ColumnLayout: ColumnLayoutProps;\n ComboBox: ComboBoxProps;\n Content: ContentProps;\n ContextMenu: ContextMenuProps;\n ContextMenuSection: ContextMenuSectionProps;\n ContextMenuTrigger: ContextMenuTriggerProps;\n ContextualHelp: ContextualHelpProps;\n ContextualHelpTrigger: ContextualHelpTriggerProps;\n CopyButton: CopyButtonProps;\n CounterBadge: CounterBadgeProps;\n CountryOptions: CountryOptionsProps;\n DatePicker: DatePickerProps<Aria.DateValue>;\n DateRangePicker: DateRangePickerProps<Aria.DateValue>;\n FieldDescription: FieldDescriptionProps;\n FieldError: FieldErrorProps;\n FileCard: FileCardProps;\n FileCardList: FileCardListProps;\n FileField: FileFieldProps;\n FileDropZone: FileDropZoneProps;\n Header: HeaderProps;\n Heading: HeadingProps;\n Icon: IconProps;\n IllustratedMessage: IllustratedMessageProps;\n Image: ImageProps;\n Initials: InitialsProps;\n Label: LabelProps;\n LayoutCard: LayoutCardProps;\n LightBox: LightBoxProps;\n Link: LinkProps;\n List: ListProps<never>;\n ListSummary: ListSummaryProps;\n MarkdownEditor: MarkdownEditorProps;\n MenuItem: MenuItemProps;\n MenuTrigger: MenuTriggerProps;\n Message: MessageProps;\n MessageThread: MessageThreadProps;\n Modal: ModalProps;\n Navigation: NavigationProps;\n NavigationGroup: NavigationGroupProps;\n NumberField: NumberFieldProps;\n Option: OptionProps;\n Options: OptionsProps;\n Popover: PopoverProps;\n PopoverTrigger: PopoverTriggerProps;\n PasswordCreationField: PasswordCreationFieldProps;\n ProgressBar: ProgressBarProps;\n Radio: RadioProps;\n RadioButton: RadioButtonProps;\n RadioGroup: RadioGroupProps;\n Rating: RatingProps;\n SearchField: SearchFieldProps;\n Section: SectionProps;\n Segment: SegmentProps;\n SegmentedControl: SegmentedControlProps;\n Select: SelectProps;\n Kbd: KbdProps;\n Slider: SliderProps;\n Switch: SwitchProps;\n Tabs: TabsProps;\n TabTitle: TabsProps;\n Text: TextProps;\n TextArea: TextAreaProps;\n TextField: TextFieldProps;\n TimeField: TimeFieldProps;\n TranslationProvider: TranslationProviderProps;\n}\n\nconst propsContextSupportingComponentsMap: Record<\n keyof FlowComponentPropsTypes,\n true\n> = {\n AccentBox: true,\n Action: true,\n ActionGroup: true,\n Avatar: true,\n Autocomplete: true,\n Alert: true,\n AlertBadge: true,\n AlertIcon: true,\n AlertText: true,\n Align: true,\n Badge: true,\n Button: true,\n CodeEditor: true,\n Checkbox: true,\n CheckboxButton: true,\n CheckboxGroup: true,\n ColumnLayout: true,\n ComboBox: true,\n Content: true,\n ContextMenu: true,\n ContextMenuSection: true,\n ContextMenuTrigger: true,\n ContextualHelp: true,\n ContextualHelpTrigger: true,\n CopyButton: true,\n CounterBadge: true,\n CountryOptions: true,\n DatePicker: true,\n DateRangePicker: true,\n FieldDescription: true,\n FieldError: true,\n FileCard: true,\n FileCardList: true,\n FileField: true,\n FileDropZone: true,\n Header: true,\n Heading: true,\n Icon: true,\n IllustratedMessage: true,\n Image: true,\n Initials: true,\n Kbd: true,\n Label: true,\n LayoutCard: true,\n LightBox: true,\n Link: true,\n List: true,\n ListSummary: true,\n MarkdownEditor: true,\n MenuItem: true,\n MenuTrigger: true,\n Message: true,\n MessageThread: true,\n Modal: true,\n Navigation: true,\n NavigationGroup: true,\n NumberField: true,\n Radio: true,\n Option: true,\n Options: true,\n Popover: true,\n PopoverTrigger: true,\n PasswordCreationField: true,\n ProgressBar: true,\n RadioButton: true,\n RadioGroup: true,\n Rating: true,\n SearchField: true,\n Section: true,\n Segment: true,\n SegmentedControl: true,\n Select: true,\n Slider: true,\n Switch: true,\n Tabs: true,\n TabTitle: true,\n TestComponent: true,\n Text: true,\n TextArea: true,\n TextField: true,\n TimeField: true,\n TranslationProvider: true,\n};\n\nexport const propsContextSupportingComponents = Object.keys(\n propsContextSupportingComponentsMap,\n) as FlowComponentName[];\n"],"names":[],"mappings":"AA8KA,MAAM,mCAAA,GAGF;AAAA,EACF,SAAA,EAAW,IAAA;AAAA,EACX,MAAA,EAAQ,IAAA;AAAA,EACR,WAAA,EAAa,IAAA;AAAA,EACb,MAAA,EAAQ,IAAA;AAAA,EACR,YAAA,EAAc,IAAA;AAAA,EACd,KAAA,EAAO,IAAA;AAAA,EACP,UAAA,EAAY,IAAA;AAAA,EACZ,SAAA,EAAW,IAAA;AAAA,EACX,SAAA,EAAW,IAAA;AAAA,EACX,KAAA,EAAO,IAAA;AAAA,EACP,KAAA,EAAO,IAAA;AAAA,EACP,MAAA,EAAQ,IAAA;AAAA,EACR,UAAA,EAAY,IAAA;AAAA,EACZ,QAAA,EAAU,IAAA;AAAA,EACV,cAAA,EAAgB,IAAA;AAAA,EAChB,aAAA,EAAe,IAAA;AAAA,EACf,YAAA,EAAc,IAAA;AAAA,EACd,QAAA,EAAU,IAAA;AAAA,EACV,OAAA,EAAS,IAAA;AAAA,EACT,WAAA,EAAa,IAAA;AAAA,EACb,kBAAA,EAAoB,IAAA;AAAA,EACpB,kBAAA,EAAoB,IAAA;AAAA,EACpB,cAAA,EAAgB,IAAA;AAAA,EAChB,qBAAA,EAAuB,IAAA;AAAA,EACvB,UAAA,EAAY,IAAA;AAAA,EACZ,YAAA,EAAc,IAAA;AAAA,EACd,cAAA,EAAgB,IAAA;AAAA,EAChB,UAAA,EAAY,IAAA;AAAA,EACZ,eAAA,EAAiB,IAAA;AAAA,EACjB,gBAAA,EAAkB,IAAA;AAAA,EAClB,UAAA,EAAY,IAAA;AAAA,EACZ,QAAA,EAAU,IAAA;AAAA,EACV,YAAA,EAAc,IAAA;AAAA,EACd,SAAA,EAAW,IAAA;AAAA,EACX,YAAA,EAAc,IAAA;AAAA,EACd,MAAA,EAAQ,IAAA;AAAA,EACR,OAAA,EAAS,IAAA;AAAA,EACT,IAAA,E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,SAAA,EAAW,IAAA;AAAA,EACX,SAAA,EAAW,IAAA;AAAA,EACX,mBAAA,EAAqB;AACvB,CAAA;AAEO,MAAM,mCAAmC,MAAA,CAAO,IAAA;AAAA,EACrD;AACF;;;;"}
|
package/dist/js/packages/components/src/integrations/react-hook-form/components/Field/Field.mjs
CHANGED
|
@@ -7,46 +7,49 @@ import '../../../../lib/propsContext/propsContext.mjs';
|
|
|
7
7
|
import { PropsContextProvider } from '../../../../lib/propsContext/components/PropsContextProvider.mjs';
|
|
8
8
|
import 'react';
|
|
9
9
|
import { useController, useWatch } from 'react-hook-form';
|
|
10
|
-
import { useLocalizedStringFormatter } from '
|
|
10
|
+
import { useLocalizedStringFormatter } from '../../../../components/TranslationProvider/useLocalizedStringFormatter.mjs';
|
|
11
11
|
import locales from '../../../../../../../_virtual/_.locale.json@72ba2ce40f190df671686fec50c04ddf.mjs';
|
|
12
12
|
import FieldErrorView from '../../../../views/FieldErrorView.mjs';
|
|
13
13
|
import { useUpdateFormDefaultValue } from './hooks/useUpdateFormDefaultValue.mjs';
|
|
14
14
|
|
|
15
15
|
function Field(props) {
|
|
16
16
|
const { children, name, defaultValue, ...rest } = props;
|
|
17
|
-
const stringFormatter = useLocalizedStringFormatter(
|
|
17
|
+
const stringFormatter = useLocalizedStringFormatter(
|
|
18
|
+
locales,
|
|
19
|
+
"ReactHookForm.Field"
|
|
20
|
+
);
|
|
18
21
|
const controller = useController({
|
|
19
22
|
...props,
|
|
20
23
|
rules: {
|
|
21
24
|
...props.rules,
|
|
22
25
|
min: typeof rest.rules?.min === "number" ? {
|
|
23
26
|
value: rest.rules.min,
|
|
24
|
-
message: stringFormatter.format("min", {
|
|
27
|
+
message: stringFormatter.format("validation.min", {
|
|
25
28
|
number: rest.rules.min
|
|
26
29
|
})
|
|
27
30
|
} : rest.rules?.min,
|
|
28
31
|
max: typeof rest.rules?.max === "number" ? {
|
|
29
32
|
value: rest.rules.max,
|
|
30
|
-
message: stringFormatter.format("max", {
|
|
33
|
+
message: stringFormatter.format("validation.max", {
|
|
31
34
|
number: rest.rules.max
|
|
32
35
|
})
|
|
33
36
|
} : rest.rules?.max,
|
|
34
|
-
required: typeof rest.rules?.required === "boolean" ? stringFormatter.format("required") : rest.rules?.required,
|
|
37
|
+
required: typeof rest.rules?.required === "boolean" ? stringFormatter.format("validation.required") : rest.rules?.required,
|
|
35
38
|
pattern: rest.rules?.pattern instanceof RegExp ? {
|
|
36
39
|
value: rest.rules.pattern,
|
|
37
|
-
message: stringFormatter.format("pattern", {
|
|
40
|
+
message: stringFormatter.format("validation.pattern", {
|
|
38
41
|
pattern: rest.rules.pattern.source
|
|
39
42
|
})
|
|
40
43
|
} : rest.rules?.pattern,
|
|
41
44
|
minLength: typeof rest.rules?.minLength === "number" ? {
|
|
42
45
|
value: rest.rules.minLength,
|
|
43
|
-
message: stringFormatter.format("minLength", {
|
|
46
|
+
message: stringFormatter.format("validation.minLength", {
|
|
44
47
|
number: rest.rules.minLength
|
|
45
48
|
})
|
|
46
49
|
} : rest.rules?.minLength,
|
|
47
50
|
maxLength: typeof rest.rules?.maxLength === "number" ? {
|
|
48
51
|
value: rest.rules.maxLength,
|
|
49
|
-
message: stringFormatter.format("maxLength", {
|
|
52
|
+
message: stringFormatter.format("validation.maxLength", {
|
|
50
53
|
number: rest.rules.maxLength
|
|
51
54
|
})
|
|
52
55
|
} : rest.rules?.maxLength
|
package/dist/js/packages/components/src/integrations/react-hook-form/components/Field/Field.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.mjs","sources":["../../../../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"sourcesContent":["import { useFormContext } from \"@/integrations/react-hook-form/components/FormContextProvider/FormContextProvider\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport { type PropsWithChildren } from \"react\";\nimport {\n type ControllerProps,\n type FieldValues,\n useController,\n type UseFormReturn,\n useWatch,\n} from \"react-hook-form\";\nimport { useLocalizedStringFormatter } from \"
|
|
1
|
+
{"version":3,"file":"Field.mjs","sources":["../../../../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"sourcesContent":["import { useFormContext } from \"@/integrations/react-hook-form/components/FormContextProvider/FormContextProvider\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport { type PropsWithChildren } from \"react\";\nimport {\n type ControllerProps,\n type FieldValues,\n useController,\n type UseFormReturn,\n useWatch,\n} from \"react-hook-form\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"./locales/*.locale.json\";\nimport FieldErrorView from \"@/views/FieldErrorView\";\nimport { useUpdateFormDefaultValue } from \"@/integrations/react-hook-form/components/Field/hooks/useUpdateFormDefaultValue\";\n\nexport interface FieldProps<T extends FieldValues>\n extends Omit<ControllerProps<T>, \"render\">, PropsWithChildren {}\n\nexport function Field<T extends FieldValues>(props: FieldProps<T>) {\n const { children, name, defaultValue, ...rest } = props;\n\n const stringFormatter = useLocalizedStringFormatter(\n locales,\n \"ReactHookForm.Field\",\n );\n\n const controller = useController({\n ...props,\n rules: {\n ...props.rules,\n min:\n typeof rest.rules?.min === \"number\"\n ? {\n value: rest.rules.min,\n message: stringFormatter.format(\"validation.min\", {\n number: rest.rules.min,\n }),\n }\n : rest.rules?.min,\n max:\n typeof rest.rules?.max === \"number\"\n ? {\n value: rest.rules.max,\n message: stringFormatter.format(\"validation.max\", {\n number: rest.rules.max,\n }),\n }\n : rest.rules?.max,\n required:\n typeof rest.rules?.required === \"boolean\"\n ? stringFormatter.format(\"validation.required\")\n : rest.rules?.required,\n pattern:\n rest.rules?.pattern instanceof RegExp\n ? {\n value: rest.rules.pattern,\n message: stringFormatter.format(\"validation.pattern\", {\n pattern: rest.rules.pattern.source,\n }),\n }\n : rest.rules?.pattern,\n minLength:\n typeof rest.rules?.minLength === \"number\"\n ? {\n value: rest.rules.minLength,\n message: stringFormatter.format(\"validation.minLength\", {\n number: rest.rules.minLength,\n }),\n }\n : rest.rules?.minLength,\n maxLength:\n typeof rest.rules?.maxLength === \"number\"\n ? {\n value: rest.rules.maxLength,\n message: stringFormatter.format(\"validation.maxLength\", {\n number: rest.rules.maxLength,\n }),\n }\n : rest.rules?.maxLength,\n },\n });\n const formContext = useFormContext<T>();\n\n useUpdateFormDefaultValue(props, formContext.form);\n\n /**\n * We don't use controller.field.value here, because it doesn't update when\n * the form value is updated outside of this field (e.g. when setting values\n * with form.setValue or resetting the form), and the Field unmounts in\n * between. This is generally a feature of React Hook Form, but this breaks\n * dynamic forms where fields are conditionally rendered.\n *\n * By using formContext.form.watch(name), we ensure that the field value is\n * always in sync with the form state. See:\n * https://react-hook-form.com/api/usecontroller/controller/\n */\n const value =\n useWatch({\n control: formContext.form.control,\n name,\n }) ?? controller.field.value;\n\n const isFieldInvalid = controller.fieldState.invalid;\n\n const fieldProps = {\n ...controller.field,\n value,\n name,\n form: formContext.id,\n isRequired: !!rest.rules?.required,\n isReadOnly: formContext.isReadOnly,\n validationBehavior: \"aria\" as const,\n defaultValue,\n isInvalid: isFieldInvalid,\n children: dynamic((p) => {\n return (\n <>\n {p.children}\n <FieldErrorView>\n {controller.fieldState.error?.message}\n </FieldErrorView>\n </>\n );\n }),\n };\n\n const propsContext: PropsContext = {\n Autocomplete: {\n SearchField: fieldProps,\n TextField: fieldProps,\n },\n SearchField: fieldProps,\n TextField: fieldProps,\n TextArea: fieldProps,\n MarkdownEditor: fieldProps,\n CodeEditor: fieldProps,\n Checkbox: {\n ...fieldProps,\n isSelected: value,\n },\n CheckboxGroup: {\n ...fieldProps,\n },\n CheckboxButton: {\n ...fieldProps,\n isSelected: value,\n },\n FileField: fieldProps,\n FileDropZone: fieldProps,\n NumberField: fieldProps,\n RadioGroup: fieldProps,\n Switch: {\n ...fieldProps,\n isSelected: value,\n },\n Slider: fieldProps,\n PasswordCreationField: fieldProps,\n DatePicker: fieldProps,\n DateRangePicker: fieldProps,\n TimeField: fieldProps,\n SegmentedControl: fieldProps,\n Select: {\n ...fieldProps,\n selectedKey: value,\n },\n ComboBox: {\n ...fieldProps,\n selectedKey: value,\n },\n Rating: fieldProps,\n };\n\n return (\n <PropsContextProvider\n props={propsContext}\n dependencies={[\n controller.fieldState,\n controller.field,\n value,\n formContext.isReadOnly,\n ]}\n >\n {children}\n </PropsContextProvider>\n );\n}\n\nexport const typedField = <T extends FieldValues>(\n ignoredForm: UseFormReturn<T> | UseFormReturn<T>[\"control\"],\n): typeof Field<T> => Field;\n\nexport default Field;\n"],"names":[],"mappings":";;;;;;;;;;;;AAsBO,SAAS,MAA6B,KAAA,EAAsB;AACjE,EAAA,MAAM,EAAE,QAAA,EAAU,IAAA,EAAM,YAAA,EAAc,GAAG,MAAK,GAAI,KAAA;AAElD,EAAA,MAAM,eAAA,GAAkB,2BAAA;AAAA,IACtB,OAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,MAAM,aAAa,aAAA,CAAc;AAAA,IAC/B,GAAG,KAAA;AAAA,IACH,KAAA,EAAO;AAAA,MACL,GAAG,KAAA,CAAM,KAAA;AAAA,MACT,GAAA,EACE,OAAO,IAAA,CAAK,KAAA,EAAO,QAAQ,QAAA,GACvB;AAAA,QACE,KAAA,EAAO,KAAK,KAAA,CAAM,GAAA;AAAA,QAClB,OAAA,EAAS,eAAA,CAAgB,MAAA,CAAO,gBAAA,EAAkB;AAAA,UAChD,MAAA,EAAQ,KAAK,KAAA,CAAM;AAAA,SACpB;AAAA,OACH,GACA,KAAK,KAAA,EAAO,GAAA;AAAA,MAClB,GAAA,EACE,OAAO,IAAA,CAAK,KAAA,EAAO,QAAQ,QAAA,GACvB;AAAA,QACE,KAAA,EAAO,KAAK,KAAA,CAAM,GAAA;AAAA,QAClB,OAAA,EAAS,eAAA,CAAgB,MAAA,CAAO,gBAAA,EAAkB;AAAA,UAChD,MAAA,EAAQ,KAAK,KAAA,CAAM;AAAA,SACpB;AAAA,OACH,GACA,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A;AAAA,IACX,YAAA,EAAc,UAAA;AAAA,IACd,WAAA,EAAa,UAAA;AAAA,IACb,UAAA,EAAY,UAAA;AAAA,IACZ,MAAA,EAAQ;AAAA,MACN,GAAG,UAAA;AAAA,MACH,UAAA,EAAY;AAAA,KACd;AAAA,IACA,MAAA,EAAQ,UAAA;AAAA,IACR,qBAAA,EAAuB,UAAA;AAAA,IACvB,UAAA,EAAY,UAAA;AAAA,IACZ,eAAA,EAAiB,UAAA;AAAA,IACjB,SAAA,EAAW,UAAA;AAAA,IACX,gBAAA,EAAkB,UAAA;AAAA,IAClB,MAAA,EAAQ;AAAA,MACN,GAAG,UAAA;AAAA,MACH,WAAA,EAAa;AAAA,KACf;AAAA,IACA,QAAA,EAAU;AAAA,MACR,GAAG,UAAA;AAAA,MACH,WAAA,EAAa;AAAA,KACf;AAAA,IACA,MAAA,EAAQ;AAAA,GACV;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,YAAA;AAAA,MACP,YAAA,EAAc;AAAA,QACZ,UAAA,CAAW,UAAA;AAAA,QACX,UAAA,CAAW,KAAA;AAAA,QACX,KAAA;AAAA,QACA,WAAA,CAAY;AAAA,OACd;AAAA,MAEC;AAAA;AAAA,GACH;AAEJ;AAEO,MAAM,UAAA,GAAa,CACxB,WAAA,KACoB;;;;"}
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { Action } from '../../../../components/Action/Action.mjs';
|
|
5
|
-
import '
|
|
5
|
+
import '../../../../components/TranslationProvider/TranslationProvider.mjs';
|
|
6
|
+
import 'remeda';
|
|
7
|
+
import 'react-aria-components';
|
|
8
|
+
import 'intl-messageformat';
|
|
9
|
+
import '@react-aria/i18n';
|
|
6
10
|
import 'react';
|
|
7
11
|
import '@react-aria/live-announcer';
|
|
8
12
|
import { useFormContext } from '../FormContextProvider/FormContextProvider.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormResetAction.mjs","sources":["../../../../../../../../../src/integrations/react-hook-form/components/FormAction/FormResetAction.tsx"],"sourcesContent":["import Action, { type ActionProps } from \"@/components/Action\";\nimport { useFormContext } from \"@/integrations/react-hook-form/components/FormContextProvider\";\nimport { PropsContextProvider, type PropsContext } from \"@/lib/propsContext\";\nimport type { FC, PropsWithChildren } from \"react\";\n\ntype SupportedActionProps = Pick<ActionProps, \"showFeedback\">;\n\nexport const FormResetAction: FC<PropsWithChildren<SupportedActionProps>> = (\n props,\n) => {\n const { children, ...actionProps } = props;\n\n const { form, isReadOnly, id } = useFormContext();\n\n const propsContext: PropsContext = {\n Button: {\n isReadOnly,\n form: id,\n color: \"secondary\",\n variant: \"soft\",\n type: \"button\",\n },\n };\n\n return (\n <Action onAction={() => form.reset()} {...actionProps}>\n <PropsContextProvider\n props={propsContext}\n dependencies={[isReadOnly, id]}\n >\n {children}\n </PropsContextProvider>\n </Action>\n );\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormResetAction.mjs","sources":["../../../../../../../../../src/integrations/react-hook-form/components/FormAction/FormResetAction.tsx"],"sourcesContent":["import Action, { type ActionProps } from \"@/components/Action\";\nimport { useFormContext } from \"@/integrations/react-hook-form/components/FormContextProvider\";\nimport { PropsContextProvider, type PropsContext } from \"@/lib/propsContext\";\nimport type { FC, PropsWithChildren } from \"react\";\n\ntype SupportedActionProps = Pick<ActionProps, \"showFeedback\">;\n\nexport const FormResetAction: FC<PropsWithChildren<SupportedActionProps>> = (\n props,\n) => {\n const { children, ...actionProps } = props;\n\n const { form, isReadOnly, id } = useFormContext();\n\n const propsContext: PropsContext = {\n Button: {\n isReadOnly,\n form: id,\n color: \"secondary\",\n variant: \"soft\",\n type: \"button\",\n },\n };\n\n return (\n <Action onAction={() => form.reset()} {...actionProps}>\n <PropsContextProvider\n props={propsContext}\n dependencies={[isReadOnly, id]}\n >\n {children}\n </PropsContextProvider>\n </Action>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAOO,MAAM,eAAA,GAA+D,CAC1E,KAAA,KACG;AACH,EAAA,MAAM,EAAE,QAAA,EAAU,GAAG,WAAA,EAAY,GAAI,KAAA;AAErC,EAAA,MAAM,EAAE,IAAA,EAAM,UAAA,EAAY,EAAA,KAAO,cAAA,EAAe;AAEhD,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,MAAA,EAAQ;AAAA,MACN,UAAA;AAAA,MACA,IAAA,EAAM,EAAA;AAAA,MACN,KAAA,EAAO,WAAA;AAAA,MACP,OAAA,EAAS,MAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR,GACF;AAEA,EAAA,uBACE,GAAA,CAAC,UAAO,QAAA,EAAU,MAAM,KAAK,KAAA,EAAM,EAAI,GAAG,WAAA,EACxC,QAAA,kBAAA,GAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,YAAA;AAAA,MACP,YAAA,EAAc,CAAC,UAAA,EAAY,EAAE,CAAA;AAAA,MAE5B;AAAA;AAAA,GACH,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { Action } from '../../../../components/Action/Action.mjs';
|
|
5
5
|
import { ActionBatch } from '../../../../components/Action/ActionBatch.mjs';
|
|
6
|
-
import '
|
|
6
|
+
import '../../../../components/TranslationProvider/TranslationProvider.mjs';
|
|
7
|
+
import 'remeda';
|
|
8
|
+
import 'react-aria-components';
|
|
9
|
+
import 'intl-messageformat';
|
|
10
|
+
import '@react-aria/i18n';
|
|
7
11
|
import 'react';
|
|
8
12
|
import '@react-aria/live-announcer';
|
|
9
13
|
import { useFormContext } from '../FormContextProvider/FormContextProvider.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormSubmitAction.mjs","sources":["../../../../../../../../../src/integrations/react-hook-form/components/FormAction/FormSubmitAction.tsx"],"sourcesContent":["import Action, { ActionBatch, type ActionProps } from \"@/components/Action\";\nimport { useFormContext } from \"@/integrations/react-hook-form/components/FormContextProvider\";\nimport { useFormSubmitAction } from \"@/integrations/react-hook-form/components/FormContextProvider/useFormSubmitAction\";\nimport { PropsContextProvider, type PropsContext } from \"@/lib/propsContext\";\nimport type { FC, PropsWithChildren } from \"react\";\n\nconst InnerFormSubmitAction: FC<PropsWithChildren<SupportedActionProps>> = (\n props,\n) => {\n const { children, ...actionProps } = props;\n const { form } = useFormContext();\n const formSubmitAction = useFormSubmitAction(form.formState, actionProps);\n return (\n <Action actionModel={formSubmitAction} {...actionProps}>\n {children}\n </Action>\n );\n};\n\ntype SupportedActionProps = Pick<ActionProps, \"showFeedback\">;\n\nexport const FormSubmitAction: FC<PropsWithChildren<SupportedActionProps>> = (\n props,\n) => {\n const { children, ...actionProps } = props;\n\n const { onAfterSuccessFeedback, isReadOnly, id } = useFormContext();\n\n const propsContext: PropsContext = {\n Button: {\n isReadOnly,\n type: \"submit\",\n form: id,\n },\n };\n\n const innerSubmitAction = (\n <InnerFormSubmitAction {...actionProps}>\n <PropsContextProvider\n props={propsContext}\n dependencies={[isReadOnly, id]}\n >\n {children}\n </PropsContextProvider>\n </InnerFormSubmitAction>\n );\n\n if (onAfterSuccessFeedback) {\n return (\n <Action onAction={onAfterSuccessFeedback}>\n <ActionBatch>{innerSubmitAction}</ActionBatch>\n </Action>\n );\n }\n\n return innerSubmitAction;\n};\n\nexport default FormSubmitAction;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormSubmitAction.mjs","sources":["../../../../../../../../../src/integrations/react-hook-form/components/FormAction/FormSubmitAction.tsx"],"sourcesContent":["import Action, { ActionBatch, type ActionProps } from \"@/components/Action\";\nimport { useFormContext } from \"@/integrations/react-hook-form/components/FormContextProvider\";\nimport { useFormSubmitAction } from \"@/integrations/react-hook-form/components/FormContextProvider/useFormSubmitAction\";\nimport { PropsContextProvider, type PropsContext } from \"@/lib/propsContext\";\nimport type { FC, PropsWithChildren } from \"react\";\n\nconst InnerFormSubmitAction: FC<PropsWithChildren<SupportedActionProps>> = (\n props,\n) => {\n const { children, ...actionProps } = props;\n const { form } = useFormContext();\n const formSubmitAction = useFormSubmitAction(form.formState, actionProps);\n return (\n <Action actionModel={formSubmitAction} {...actionProps}>\n {children}\n </Action>\n );\n};\n\ntype SupportedActionProps = Pick<ActionProps, \"showFeedback\">;\n\nexport const FormSubmitAction: FC<PropsWithChildren<SupportedActionProps>> = (\n props,\n) => {\n const { children, ...actionProps } = props;\n\n const { onAfterSuccessFeedback, isReadOnly, id } = useFormContext();\n\n const propsContext: PropsContext = {\n Button: {\n isReadOnly,\n type: \"submit\",\n form: id,\n },\n };\n\n const innerSubmitAction = (\n <InnerFormSubmitAction {...actionProps}>\n <PropsContextProvider\n props={propsContext}\n dependencies={[isReadOnly, id]}\n >\n {children}\n </PropsContextProvider>\n </InnerFormSubmitAction>\n );\n\n if (onAfterSuccessFeedback) {\n return (\n <Action onAction={onAfterSuccessFeedback}>\n <ActionBatch>{innerSubmitAction}</ActionBatch>\n </Action>\n );\n }\n\n return innerSubmitAction;\n};\n\nexport default FormSubmitAction;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAMA,MAAM,qBAAA,GAAqE,CACzE,KAAA,KACG;AACH,EAAA,MAAM,EAAE,QAAA,EAAU,GAAG,WAAA,EAAY,GAAI,KAAA;AACrC,EAAA,MAAM,EAAE,IAAA,EAAK,GAAI,cAAA,EAAe;AAChC,EAAA,MAAM,gBAAA,GAAmB,mBAAA,CAAoB,IAAA,CAAK,SAAA,EAAW,WAAW,CAAA;AACxE,EAAA,2BACG,MAAA,EAAA,EAAO,WAAA,EAAa,gBAAA,EAAmB,GAAG,aACxC,QAAA,EACH,CAAA;AAEJ,CAAA;AAIO,MAAM,gBAAA,GAAgE,CAC3E,KAAA,KACG;AACH,EAAA,MAAM,EAAE,QAAA,EAAU,GAAG,WAAA,EAAY,GAAI,KAAA;AAErC,EAAA,MAAM,EAAE,sBAAA,EAAwB,UAAA,EAAY,EAAA,KAAO,cAAA,EAAe;AAElE,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,MAAA,EAAQ;AAAA,MACN,UAAA;AAAA,MACA,IAAA,EAAM,QAAA;AAAA,MACN,IAAA,EAAM;AAAA;AACR,GACF;AAEA,EAAA,MAAM,iBAAA,mBACJ,GAAA,CAAC,qBAAA,EAAA,EAAuB,GAAG,WAAA,EACzB,QAAA,kBAAA,GAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,YAAA;AAAA,MACP,YAAA,EAAc,CAAC,UAAA,EAAY,EAAE,CAAA;AAAA,MAE5B;AAAA;AAAA,GACH,EACF,CAAA;AAGF,EAAA,IAAI,sBAAA,EAAwB;AAC1B,IAAA,2BACG,MAAA,EAAA,EAAO,QAAA,EAAU,wBAChB,QAAA,kBAAA,GAAA,CAAC,WAAA,EAAA,EAAa,6BAAkB,CAAA,EAClC,CAAA;AAAA,EAEJ;AAEA,EAAA,OAAO,iBAAA;AACT;;;;"}
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
import '../../../../components/Action/Action.mjs';
|
|
4
4
|
import { AbortActionError } from '../../../../components/Action/AbortActionError.mjs';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
|
-
import '
|
|
6
|
+
import '../../../../components/TranslationProvider/TranslationProvider.mjs';
|
|
7
|
+
import 'remeda';
|
|
8
|
+
import 'react-aria-components';
|
|
9
|
+
import 'intl-messageformat';
|
|
10
|
+
import '@react-aria/i18n';
|
|
7
11
|
import { useRef, useEffect } from 'react';
|
|
8
12
|
import '@react-aria/live-announcer';
|
|
9
13
|
import { ActionModel } from '../../../../components/Action/models/ActionModel.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormSubmitAction.mjs","sources":["../../../../../../../../../src/integrations/react-hook-form/components/FormContextProvider/useFormSubmitAction.ts"],"sourcesContent":["import { AbortActionError, type ActionProps } from \"@/components/Action\";\nimport { ActionModel } from \"@/components/Action/models/ActionModel\";\nimport { useEffect, useRef } from \"react\";\nimport type { FieldValues, FormState } from \"react-hook-form\";\n\nexport const useFormSubmitAction = (\n formState: FormState<FieldValues>,\n actionProps?: ActionProps,\n) => {\n const { isSubmitting, isSubmitSuccessful } = formState;\n\n const submitPromise = useRef<PromiseWithResolvers<void>>(undefined);\n\n const formSubmitAction = ActionModel.useNew({\n ...actionProps,\n onAction: () => {\n submitPromise.current = Promise.withResolvers<void>();\n actionProps?.onAction?.();\n return submitPromise.current.promise;\n },\n });\n\n useEffect(() => {\n if (isSubmitting) {\n if (!formSubmitAction.state.isBusy) {\n /**\n * Manually start execution. This happens if the form submission was\n * triggered by other means than the submit button, e.g. by pressing\n * Enter in a text field.\n */\n formSubmitAction.execute();\n }\n return;\n }\n\n if (isSubmitSuccessful) {\n submitPromise.current?.resolve();\n return;\n }\n\n submitPromise.current?.reject(\n new AbortActionError(\"Form submission failed\"),\n );\n }, [isSubmitting, isSubmitSuccessful, submitPromise]);\n\n return formSubmitAction;\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFormSubmitAction.mjs","sources":["../../../../../../../../../src/integrations/react-hook-form/components/FormContextProvider/useFormSubmitAction.ts"],"sourcesContent":["import { AbortActionError, type ActionProps } from \"@/components/Action\";\nimport { ActionModel } from \"@/components/Action/models/ActionModel\";\nimport { useEffect, useRef } from \"react\";\nimport type { FieldValues, FormState } from \"react-hook-form\";\n\nexport const useFormSubmitAction = (\n formState: FormState<FieldValues>,\n actionProps?: ActionProps,\n) => {\n const { isSubmitting, isSubmitSuccessful } = formState;\n\n const submitPromise = useRef<PromiseWithResolvers<void>>(undefined);\n\n const formSubmitAction = ActionModel.useNew({\n ...actionProps,\n onAction: () => {\n submitPromise.current = Promise.withResolvers<void>();\n actionProps?.onAction?.();\n return submitPromise.current.promise;\n },\n });\n\n useEffect(() => {\n if (isSubmitting) {\n if (!formSubmitAction.state.isBusy) {\n /**\n * Manually start execution. This happens if the form submission was\n * triggered by other means than the submit button, e.g. by pressing\n * Enter in a text field.\n */\n formSubmitAction.execute();\n }\n return;\n }\n\n if (isSubmitSuccessful) {\n submitPromise.current?.resolve();\n return;\n }\n\n submitPromise.current?.reject(\n new AbortActionError(\"Form submission failed\"),\n );\n }, [isSubmitting, isSubmitSuccessful, submitPromise]);\n\n return formSubmitAction;\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAKO,MAAM,mBAAA,GAAsB,CACjC,SAAA,EACA,WAAA,KACG;AACH,EAAA,MAAM,EAAE,YAAA,EAAc,kBAAA,EAAmB,GAAI,SAAA;AAE7C,EAAA,MAAM,aAAA,GAAgB,OAAmC,MAAS,CAAA;AAElE,EAAA,MAAM,gBAAA,GAAmB,YAAY,MAAA,CAAO;AAAA,IAC1C,GAAG,WAAA;AAAA,IACH,UAAU,MAAM;AACd,MAAA,aAAA,CAAc,OAAA,GAAU,QAAQ,aAAA,EAAoB;AACpD,MAAA,WAAA,EAAa,QAAA,IAAW;AACxB,MAAA,OAAO,cAAc,OAAA,CAAQ,OAAA;AAAA,IAC/B;AAAA,GACD,CAAA;AAED,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,YAAA,EAAc;AAChB,MAAA,IAAI,CAAC,gBAAA,CAAiB,KAAA,CAAM,MAAA,EAAQ;AAMlC,QAAA,gBAAA,CAAiB,OAAA,EAAQ;AAAA,MAC3B;AACA,MAAA;AAAA,IACF;AAEA,IAAA,IAAI,kBAAA,EAAoB;AACtB,MAAA,aAAA,CAAc,SAAS,OAAA,EAAQ;AAC/B,MAAA;AAAA,IACF;AAEA,IAAA,aAAA,CAAc,OAAA,EAAS,MAAA;AAAA,MACrB,IAAI,iBAAiB,wBAAwB;AAAA,KAC/C;AAAA,EACF,CAAA,EAAG,CAAC,YAAA,EAAc,kBAAA,EAAoB,aAAa,CAAC,CAAA;AAEpD,EAAA,OAAO,gBAAA;AACT;;;;"}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { PropsWithClassName, PropsWithElementType } from '../../lib/types/props';
|
|
1
|
+
import { CSSProperties, PropsWithChildren } from 'react';
|
|
2
|
+
import { AlphaColor, PropsWithClassName, PropsWithElementType } from '../../lib/types/props';
|
|
3
3
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
4
|
+
declare const accentBoxBackgroundColors: readonly ["neutral", "blue", "violet", "teal", "lilac", "green", "navy", "gradient"];
|
|
5
|
+
type AccentBoxBackgroundColor = (typeof accentBoxBackgroundColors)[number];
|
|
6
|
+
type AccentBoxWithCustomBackgroundColor = AccentBoxBackgroundColor | (string & {});
|
|
4
7
|
export interface AccentBoxProps extends PropsWithChildren, PropsWithElementType<"div" | "section" | "article">, PropsWithClassName, FlowComponentProps {
|
|
5
|
-
color
|
|
8
|
+
/** The background color of the accent box. @default "neutral" */
|
|
9
|
+
backgroundColor?: AccentBoxWithCustomBackgroundColor;
|
|
10
|
+
/** The fcontent color of the accent box. @default "default" */
|
|
11
|
+
color?: "default" | AlphaColor;
|
|
12
|
+
/** The background image of the accent box. */
|
|
13
|
+
backgroundImage?: string;
|
|
14
|
+
/** The aspect ratio of the accent box. */
|
|
15
|
+
aspectRatio?: CSSProperties["aspectRatio"];
|
|
6
16
|
}
|
|
7
17
|
/** @flr-generate all */
|
|
8
18
|
export declare const AccentBox: import('react').FunctionComponent<AccentBoxProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccentBox.d.ts","sourceRoot":"","sources":["../../../../src/components/AccentBox/AccentBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AccentBox.d.ts","sourceRoot":"","sources":["../../../../src/components/AccentBox/AccentBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAG9C,QAAA,MAAM,yBAAyB,sFASrB,CAAC;AAEX,KAAK,wBAAwB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC3E,KAAK,kCAAkC,GACnC,wBAAwB,GACxB,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAalB,MAAM,WAAW,cACf,SACE,iBAAiB,EACjB,oBAAoB,CAAC,KAAK,GAAG,SAAS,GAAG,SAAS,CAAC,EACnD,kBAAkB,EAClB,kBAAkB;IACpB,iEAAiE;IACjE,eAAe,CAAC,EAAE,kCAAkC,CAAC;IACrD,+DAA+D;IAC/D,KAAK,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IAC/B,8CAA8C;IAC9C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;CAC5C;AAED,wBAAwB;AACxB,eAAO,MAAM,SAAS,mGAkDpB,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
|
@@ -4,9 +4,9 @@ declare const meta: Meta<typeof AccentBox>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof AccentBox>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
7
|
+
export declare const CustomColor: Story;
|
|
8
|
+
export declare const BackgroundImage: Story;
|
|
9
|
+
export declare const WithLink: Story;
|
|
10
10
|
export declare const InLayoutCard: Story;
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const InLayoutCardWithLink: Story;
|
|
12
12
|
//# sourceMappingURL=Default.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/AccentBox/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/AccentBox/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAOnD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CA6BhC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAC;AAExC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAiB7B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAWtB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAY1B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAclC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,KAAK,EAAE,U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AAW,CAAC;IACpB,qCAAqC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAwB;AACxB,eAAO,MAAM,KAAK,+FA2EhB,CAAC;AAEH,eAAe,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextualHelpTrigger.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AASvE,MAAM,MAAM,0BAA0B,GAAG,mBAAmB,CAAC;AAE7D,wBAAwB;AACxB,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"ContextualHelpTrigger.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AASvE,MAAM,MAAM,0BAA0B,GAAG,mBAAmB,CAAC;AAE7D,wBAAwB;AACxB,eAAO,MAAM,qBAAqB,wGAgCjC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { ListBoxProps } from 'react-aria-components';
|
|
3
3
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { CountryData } from 'country-codes-list';
|
|
5
|
+
export type Country = CountryData & {
|
|
6
6
|
name: string;
|
|
7
|
-
|
|
7
|
+
code: string;
|
|
8
|
+
};
|
|
8
9
|
export type CountryFilterFn = (country: Country) => boolean;
|
|
9
10
|
export type CountrySortFn = (left: Country, right: Country) => number;
|
|
10
11
|
export interface CountryOptionsProps<T = object> extends PropsWithChildren<Omit<ListBoxProps<T>, "children">>, FlowComponentProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CountryOptions.d.ts","sourceRoot":"","sources":["../../../../src/components/CountryOptions/CountryOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"CountryOptions.d.ts","sourceRoot":"","sources":["../../../../src/components/CountryOptions/CountryOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAG/E,OAAO,EAAO,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE3D,MAAM,MAAM,OAAO,GAAG,WAAW,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC;AAC5D,MAAM,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,KAAK,MAAM,CAAC;AAEtE,MAAM,WAAW,mBAAmB,CAAC,CAAC,GAAG,MAAM,CAC7C,SACE,iBAAiB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,EACpD,kBAAkB;IACpB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAMD,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAyBlD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../../src/components/Link/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,aAAa,EACb,iBAAiB,EAClB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAK9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAIxE,MAAM,WAAW,SACf,SACE,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,GAAG,WAAW,CAAC,CAAC,EAC1E,kBAAkB,CAAC,iBAAiB,CAAC,EACrC,kBAAkB;IACpB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qCAAqC;IACrC,aAAa,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAChE,gDAAgD;IAChD,KAAK,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,UAAU,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACzC,4CAA4C;IAC5C,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;CAGlB;AAED,wBAAwB;AACxB,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../../src/components/Link/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,aAAa,EACb,iBAAiB,EAClB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAK9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAIxE,MAAM,WAAW,SACf,SACE,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,GAAG,WAAW,CAAC,CAAC,EAC1E,kBAAkB,CAAC,iBAAiB,CAAC,EACrC,kBAAkB;IACpB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qCAAqC;IACrC,aAAa,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAChE,gDAAgD;IAChD,KAAK,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,UAAU,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACzC,4CAA4C;IAC5C,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;CAGlB;AAED,wBAAwB;AACxB,eAAO,MAAM,IAAI,iGAkEf,CAAC;AAEH,eAAe,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Link/components/LinkIcon/LinkIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"LinkIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Link/components/LinkIcon/LinkIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAKnD,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,SAAS,CA4BlC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
package/dist/types/components/List/components/Header/components/ActiveFilters/ActiveFilters.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActiveFilters.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/List/components/Header/components/ActiveFilters/ActiveFilters.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ActiveFilters.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/List/components/Header/components/ActiveFilters/ActiveFilters.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAsBhC,eAAO,MAAM,aAAa,EAAE,EA6F1B,CAAC;AAEH,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewModeAccordion.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/List/components/Header/components/AllFiltersModal/ViewModeAccordion.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAWhC,eAAO,MAAM,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"ViewModeAccordion.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/List/components/Header/components/AllFiltersModal/ViewModeAccordion.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAWhC,eAAO,MAAM,iBAAiB,EAAE,EAqB/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortingContextMenu.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/List/components/Header/components/SortingContextMenu/SortingContextMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAgBhC,eAAO,MAAM,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"SortingContextMenu.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/List/components/Header/components/SortingContextMenu/SortingContextMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAgBhC,eAAO,MAAM,kBAAkB,EAAE,EAkDhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAriaAnnounceSearchState.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/hooks/useAriaAnnounceSearchState.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,0BAA0B,QAAO,
|
|
1
|
+
{"version":3,"file":"useAriaAnnounceSearchState.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/hooks/useAriaAnnounceSearchState.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,0BAA0B,QAAO,IAyB7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModeButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/MarkdownEditor/components/ModeButton.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAG/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAGrF,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,WAAW,EAAE,YAAY,CAAC;IACtE,WAAW,EAAE,kBAAkB,CAAC;IAChC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAClD;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"ModeButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/MarkdownEditor/components/ModeButton.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAG/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAGrF,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,WAAW,EAAE,YAAY,CAAC;IACtE,WAAW,EAAE,kBAAkB,CAAC;IAChC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAClD;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAuB1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/MarkdownEditor/components/ToolbarButton.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mDAAmD,CAAC;AACpF,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAI/D,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAC9C,WAAW,EACX,YAAY,GAAG,UAAU,CAC1B;IACC,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ToolbarButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/MarkdownEditor/components/ToolbarButton.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mDAAmD,CAAC;AACpF,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAI/D,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAC9C,WAAW,EACX,YAAY,GAAG,UAAU,CAC1B;IACC,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAqBhD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordCreationField.d.ts","sourceRoot":"","sources":["../../../../src/components/PasswordCreationField/PasswordCreationField.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EAKvB,MAAM,OAAO,CAAC;AAMf,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"PasswordCreationField.d.ts","sourceRoot":"","sources":["../../../../src/components/PasswordCreationField/PasswordCreationField.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EAKvB,MAAM,OAAO,CAAC;AAMf,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAa9C,OAAO,KAAK,EACV,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,4CAA4C,CAAC;AAWpD,MAAM,WAAW,0BACf,SACE,iBAAiB,CACf,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,OAAO,GAAG,cAAc,CAAC,GAC9D,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAAC,CAChE,EACD,kBAAkB,CAAC,gBAAgB,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IAC9E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,wBAAwB,CAAC;CAC7C;AAED,MAAM,WAAW,8BAA+B,SAAQ,IAAI,CAC1D,sBAAsB,EACtB,SAAS,CACV;IACC,OAAO,EAAE,OAAO,GAAG,eAAe,CAAC;IACnC,WAAW,EAAE,oBAAoB,EAAE,CAAC;CACrC;AAED,wBAAwB;AACxB,eAAO,MAAM,qBAAqB,iHAmOjC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordGenerateButton.d.ts","sourceRoot":"","sources":["../../../../../../src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,EAAU,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE5D,UAAU,KAAK;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wBAAwB,CAAC,EAAE,QAAQ,CAAC;CACrC;AAED,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"PasswordGenerateButton.d.ts","sourceRoot":"","sources":["../../../../../../src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,EAAU,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE5D,UAAU,KAAK;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wBAAwB,CAAC,EAAE,QAAQ,CAAC;CACrC;AAED,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,KAAK,CAmB5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TogglePasswordVisibilityButton.d.ts","sourceRoot":"","sources":["../../../../../../src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TogglePasswordVisibilityButton.d.ts","sourceRoot":"","sources":["../../../../../../src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.tsx"],"names":[],"mappings":"AAqDA,eAAe,8BAA8B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationResultButton.d.ts","sourceRoot":"","sources":["../../../../../../src/components/PasswordCreationField/components/ValidationResultButton/ValidationResultButton.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,0DAA0D,CAAC;AAQ/G,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,UAAU,KAAM,SAAQ,kBAAkB;IACxC,sBAAsB,CAAC,EAAE,8BAA8B,CAAC;IACxD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"ValidationResultButton.d.ts","sourceRoot":"","sources":["../../../../../../src/components/PasswordCreationField/components/ValidationResultButton/ValidationResultButton.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,0DAA0D,CAAC;AAQ/G,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,UAAU,KAAM,SAAQ,kBAAkB;IACxC,sBAAsB,CAAC,EAAE,8BAA8B,CAAC;IACxD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,KAAK,CA0C5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationResultEntry.d.ts","sourceRoot":"","sources":["../../../../../../src/components/PasswordCreationField/components/ValidationResultEntry/ValidationResultEntry.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ValidationResultEntry.d.ts","sourceRoot":"","sources":["../../../../../../src/components/PasswordCreationField/components/ValidationResultEntry/ValidationResultEntry.tsx"],"names":[],"mappings":"AA+CA,eAAe,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,KAAK,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAazD,MAAM,WAAW,cACf,SACE,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,EACxD,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,EACpC,kBAAkB,CAAC,gBAAgB,CAAC;IACtC,kFAAkF;IAClF,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAwB;AACxB,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,KAAK,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAazD,MAAM,WAAW,cACf,SACE,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,EACxD,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,EACpC,kBAAkB,CAAC,gBAAgB,CAAC;IACtC,kFAAkF;IAClF,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAwB;AACxB,eAAO,MAAM,SAAS,qGAoGpB,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropsWithChildren, default as React } from 'react';
|
|
2
|
+
import { LocalizedComponentName, TranslationFunction } from './useLocalizedStringFormatter';
|
|
3
|
+
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
4
|
+
type ComponentTranslationDictionary = Record<LocalizedComponentName, Record<string, string>>;
|
|
2
5
|
export interface Translations {
|
|
3
|
-
|
|
4
|
-
"
|
|
6
|
+
[locale: string]: ComponentTranslationDictionary | undefined;
|
|
7
|
+
"de-DE"?: ComponentTranslationDictionary;
|
|
8
|
+
"en-US"?: ComponentTranslationDictionary;
|
|
5
9
|
}
|
|
6
|
-
|
|
7
|
-
translations
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export
|
|
10
|
+
export interface TranslationContext {
|
|
11
|
+
translations?: Translations;
|
|
12
|
+
translate?: TranslationFunction;
|
|
13
|
+
}
|
|
14
|
+
export type TranslationProviderProps = PropsWithChildren & TranslationContext & FlowComponentProps<never>;
|
|
15
|
+
export declare const useTranslationProvider: () => TranslationContext;
|
|
16
|
+
/** @flr-generate all */
|
|
17
|
+
export declare const TranslationProvider: React.FunctionComponent<{
|
|
18
|
+
children?: React.ReactNode | undefined;
|
|
19
|
+
} & TranslationContext & FlowComponentProps<never> & React.RefAttributes<null>>;
|
|
11
20
|
export default TranslationProvider;
|
|
12
21
|
//# sourceMappingURL=TranslationProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TranslationProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/TranslationProvider/TranslationProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"TranslationProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/TranslationProvider/TranslationProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EACV,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,8DAA8D,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,KAAK,8BAA8B,GAAG,MAAM,CAC1C,sBAAsB,EACtB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CACvB,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,CAAC,MAAM,EAAE,MAAM,GAAG,8BAA8B,GAAG,SAAS,CAAC;IAC7D,OAAO,CAAC,EAAE,8BAA8B,CAAC;IACzC,OAAO,CAAC,EAAE,8BAA8B,CAAC;CAC1C;AAED,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC;AAED,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,GACtD,kBAAkB,GAClB,kBAAkB,CAAC,KAAK,CAAC,CAAC;AAI5B,eAAO,MAAM,sBAAsB,0BAA4B,CAAC;AAEhE,wBAAwB;AACxB,eAAO,MAAM,mBAAmB;;+EAW/B,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|