@stack-spot/portal-components 0.0.18 → 1.0.0-dev.1768482754546
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 +670 -0
- package/dist/components/AnimatedHeight.d.ts +58 -0
- package/dist/components/AnimatedHeight.d.ts.map +1 -0
- package/dist/components/AnimatedHeight.js +105 -0
- package/dist/components/AnimatedHeight.js.map +1 -0
- package/dist/components/AsyncContent.d.ts +46 -0
- package/dist/components/AsyncContent.d.ts.map +1 -0
- package/dist/components/AsyncContent.js +34 -0
- package/dist/components/AsyncContent.js.map +1 -0
- package/dist/components/BannerWarning.d.ts +11 -2
- package/dist/components/BannerWarning.d.ts.map +1 -1
- package/dist/components/BannerWarning.js +45 -3
- package/dist/components/BannerWarning.js.map +1 -1
- package/dist/components/Breadcrumb/index.d.ts +7 -9
- package/dist/components/Breadcrumb/index.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.js +7 -6
- package/dist/components/Breadcrumb/index.js.map +1 -1
- package/dist/components/Breadcrumb/styled.d.ts +1 -2
- package/dist/components/Breadcrumb/styled.d.ts.map +1 -1
- package/dist/components/Breadcrumb/styled.js +1 -0
- package/dist/components/Breadcrumb/styled.js.map +1 -1
- package/dist/components/ButtonLoading.d.ts +11 -0
- package/dist/components/ButtonLoading.d.ts.map +1 -0
- package/dist/components/ButtonLoading.js +5 -0
- package/dist/components/ButtonLoading.js.map +1 -0
- package/dist/components/ChatBot.d.ts +5 -0
- package/dist/components/ChatBot.d.ts.map +1 -1
- package/dist/components/ChatBot.js +11 -6
- package/dist/components/ChatBot.js.map +1 -1
- package/dist/components/ContentValidateFilter.d.ts +6 -0
- package/dist/components/ContentValidateFilter.d.ts.map +1 -0
- package/dist/components/ContentValidateFilter.js +8 -0
- package/dist/components/ContentValidateFilter.js.map +1 -0
- package/dist/components/FadingOverflow.d.ts +37 -0
- package/dist/components/FadingOverflow.d.ts.map +1 -0
- package/dist/components/FadingOverflow.js +228 -0
- package/dist/components/FadingOverflow.js.map +1 -0
- package/dist/components/FileTreeView/More.d.ts +23 -0
- package/dist/components/FileTreeView/More.d.ts.map +1 -0
- package/dist/components/FileTreeView/More.js +55 -0
- package/dist/components/FileTreeView/More.js.map +1 -0
- package/dist/components/FileTreeView/index.d.ts +32 -0
- package/dist/components/FileTreeView/index.d.ts.map +1 -0
- package/dist/components/FileTreeView/index.js +91 -0
- package/dist/components/FileTreeView/index.js.map +1 -0
- package/dist/components/InfiniteScroll.d.ts +11 -0
- package/dist/components/InfiniteScroll.d.ts.map +1 -0
- package/dist/components/InfiniteScroll.js +14 -0
- package/dist/components/InfiniteScroll.js.map +1 -0
- package/dist/components/InfoMaintenanceBanner.d.ts +8 -0
- package/dist/components/InfoMaintenanceBanner.d.ts.map +1 -0
- package/dist/components/InfoMaintenanceBanner.js +19 -0
- package/dist/components/InfoMaintenanceBanner.js.map +1 -0
- package/dist/components/LazyMarkdown/BlockquoteMd.d.ts +11 -0
- package/dist/components/LazyMarkdown/BlockquoteMd.d.ts.map +1 -0
- package/dist/components/LazyMarkdown/BlockquoteMd.js +77 -0
- package/dist/components/LazyMarkdown/BlockquoteMd.js.map +1 -0
- package/dist/components/LazyMarkdown/CodeViewer.d.ts +24 -0
- package/dist/components/LazyMarkdown/CodeViewer.d.ts.map +1 -0
- package/dist/components/LazyMarkdown/CodeViewer.js +122 -0
- package/dist/components/LazyMarkdown/CodeViewer.js.map +1 -0
- package/dist/components/LazyMarkdown/Markdown.d.ts +19 -0
- package/dist/components/LazyMarkdown/Markdown.d.ts.map +1 -0
- package/dist/components/LazyMarkdown/Markdown.js +96 -0
- package/dist/components/LazyMarkdown/Markdown.js.map +1 -0
- package/dist/components/LazyMarkdown/MarkdownButton.d.ts +19 -0
- package/dist/components/LazyMarkdown/MarkdownButton.d.ts.map +1 -0
- package/dist/components/LazyMarkdown/MarkdownButton.js +9 -0
- package/dist/components/LazyMarkdown/MarkdownButton.js.map +1 -0
- package/dist/components/LazyMarkdown/Video.d.ts +11 -0
- package/dist/components/LazyMarkdown/Video.d.ts.map +1 -0
- package/dist/components/LazyMarkdown/Video.js +10 -0
- package/dist/components/LazyMarkdown/Video.js.map +1 -0
- package/dist/components/LazyMarkdown/index.d.ts +10 -0
- package/dist/components/LazyMarkdown/index.d.ts.map +1 -0
- package/dist/components/LazyMarkdown/index.js +8 -0
- package/dist/components/LazyMarkdown/index.js.map +1 -0
- package/dist/components/Placeholder.d.ts +28 -0
- package/dist/components/Placeholder.d.ts.map +1 -0
- package/dist/components/Placeholder.js +32 -0
- package/dist/components/Placeholder.js.map +1 -0
- package/dist/components/ScrollView.d.ts +31 -0
- package/dist/components/ScrollView.d.ts.map +1 -0
- package/dist/components/ScrollView.js +30 -0
- package/dist/components/ScrollView.js.map +1 -0
- package/dist/components/Select/BadgeItem.d.ts +4 -0
- package/dist/components/Select/BadgeItem.d.ts.map +1 -0
- package/dist/components/Select/BadgeItem.js +28 -0
- package/dist/components/Select/BadgeItem.js.map +1 -0
- package/dist/components/Select/ClearInput.d.ts +3 -0
- package/dist/components/Select/ClearInput.d.ts.map +1 -0
- package/dist/components/Select/ClearInput.js +18 -0
- package/dist/components/Select/ClearInput.js.map +1 -0
- package/dist/components/Select/CloseItem.d.ts +3 -0
- package/dist/components/Select/CloseItem.d.ts.map +1 -0
- package/dist/components/Select/CloseItem.js +26 -0
- package/dist/components/Select/CloseItem.js.map +1 -0
- package/dist/components/Select/CreatableSelect.d.ts +16 -0
- package/dist/components/Select/CreatableSelect.d.ts.map +1 -0
- package/dist/components/Select/CreatableSelect.js +114 -0
- package/dist/components/Select/CreatableSelect.js.map +1 -0
- package/dist/components/Select/CustomMenu.d.ts +8 -0
- package/dist/components/Select/CustomMenu.d.ts.map +1 -0
- package/dist/components/Select/CustomMenu.js +4 -0
- package/dist/components/Select/CustomMenu.js.map +1 -0
- package/dist/components/Select/LabelItem.d.ts +3 -0
- package/dist/components/Select/LabelItem.d.ts.map +1 -0
- package/dist/components/Select/LabelItem.js +4 -0
- package/dist/components/Select/LabelItem.js.map +1 -0
- package/dist/components/Select/MultiValue.d.ts +3 -0
- package/dist/components/Select/MultiValue.d.ts.map +1 -0
- package/dist/components/Select/MultiValue.js +27 -0
- package/dist/components/Select/MultiValue.js.map +1 -0
- package/dist/components/Select/SelectInfiniteScroll.d.ts +14 -0
- package/dist/components/Select/SelectInfiniteScroll.d.ts.map +1 -0
- package/dist/components/Select/SelectInfiniteScroll.js +31 -0
- package/dist/components/Select/SelectInfiniteScroll.js.map +1 -0
- package/dist/components/Select/SelectSearch.d.ts +11 -0
- package/dist/components/Select/SelectSearch.d.ts.map +1 -0
- package/dist/components/Select/SelectSearch.js +156 -0
- package/dist/components/Select/SelectSearch.js.map +1 -0
- package/dist/components/Select/index.d.ts +6 -0
- package/dist/components/Select/index.d.ts.map +1 -0
- package/dist/components/Select/index.js +6 -0
- package/dist/components/Select/index.js.map +1 -0
- package/dist/components/Select/types.d.ts +7 -0
- package/dist/components/Select/types.d.ts.map +1 -0
- package/dist/components/Select/types.js +2 -0
- package/dist/components/Select/types.js.map +1 -0
- package/dist/components/SelectionList.d.ts +151 -0
- package/dist/components/SelectionList.d.ts.map +1 -0
- package/dist/components/SelectionList.js +180 -0
- package/dist/components/SelectionList.js.map +1 -0
- package/dist/components/StatusCircle.d.ts +24 -0
- package/dist/components/StatusCircle.d.ts.map +1 -0
- package/dist/components/StatusCircle.js +44 -0
- package/dist/components/StatusCircle.js.map +1 -0
- package/dist/components/Stepper/Navigation.d.ts +35 -0
- package/dist/components/Stepper/Navigation.d.ts.map +1 -0
- package/dist/components/Stepper/Navigation.js +41 -0
- package/dist/components/Stepper/Navigation.js.map +1 -0
- package/dist/components/Stepper/Step.d.ts +18 -0
- package/dist/components/Stepper/Step.d.ts.map +1 -0
- package/dist/components/Stepper/Step.js +13 -0
- package/dist/components/Stepper/Step.js.map +1 -0
- package/dist/components/Stepper/Stepper.d.ts +45 -0
- package/dist/components/Stepper/Stepper.d.ts.map +1 -0
- package/dist/components/Stepper/Stepper.js +57 -0
- package/dist/components/Stepper/Stepper.js.map +1 -0
- package/dist/components/Stepper/headers.d.ts +19 -0
- package/dist/components/Stepper/headers.d.ts.map +1 -0
- package/dist/components/Stepper/headers.js +40 -0
- package/dist/components/Stepper/headers.js.map +1 -0
- package/dist/components/Stepper/index.d.ts +4 -0
- package/dist/components/Stepper/index.d.ts.map +1 -0
- package/dist/components/Stepper/index.js +4 -0
- package/dist/components/Stepper/index.js.map +1 -0
- package/dist/components/Table/HeaderItem.d.ts +18 -0
- package/dist/components/Table/HeaderItem.d.ts.map +1 -0
- package/dist/components/Table/HeaderItem.js +14 -0
- package/dist/components/Table/HeaderItem.js.map +1 -0
- package/dist/components/Table/SettingsVerticalMenu.d.ts +14 -0
- package/dist/components/Table/SettingsVerticalMenu.d.ts.map +1 -0
- package/dist/components/Table/SettingsVerticalMenu.js +14 -0
- package/dist/components/Table/SettingsVerticalMenu.js.map +1 -0
- package/dist/components/Table/StyledLinkTable.d.ts +5 -0
- package/dist/components/Table/StyledLinkTable.d.ts.map +1 -0
- package/dist/components/Table/StyledLinkTable.js +13 -0
- package/dist/components/Table/StyledLinkTable.js.map +1 -0
- package/dist/components/Table/TableData.d.ts +37 -0
- package/dist/components/Table/TableData.d.ts.map +1 -0
- package/dist/components/Table/TableData.js +84 -0
- package/dist/components/Table/TableData.js.map +1 -0
- package/dist/components/Table/index.d.ts +3 -0
- package/dist/components/Table/index.d.ts.map +1 -0
- package/dist/components/Table/index.js +3 -0
- package/dist/components/Table/index.js.map +1 -0
- package/dist/components/TimelineSection.d.ts +24 -0
- package/dist/components/TimelineSection.d.ts.map +1 -0
- package/dist/components/TimelineSection.js +37 -0
- package/dist/components/TimelineSection.js.map +1 -0
- package/dist/components/error/ErrorFeedback.d.ts +58 -0
- package/dist/components/error/ErrorFeedback.d.ts.map +1 -0
- package/dist/components/error/ErrorFeedback.js +110 -0
- package/dist/components/error/ErrorFeedback.js.map +1 -0
- package/dist/components/error/NotFound.d.ts +4 -0
- package/dist/components/error/NotFound.d.ts.map +1 -0
- package/dist/components/error/NotFound.js +19 -0
- package/dist/components/error/NotFound.js.map +1 -0
- package/dist/components/error/UnderMaintenance.d.ts +4 -0
- package/dist/components/error/UnderMaintenance.d.ts.map +1 -0
- package/dist/components/error/UnderMaintenance.js +25 -0
- package/dist/components/error/UnderMaintenance.js.map +1 -0
- package/dist/components/error/index.d.ts +4 -0
- package/dist/components/error/index.d.ts.map +1 -0
- package/dist/components/error/index.js +4 -0
- package/dist/components/error/index.js.map +1 -0
- package/dist/components/form/Form/Form.d.ts +15 -0
- package/dist/components/form/Form/Form.d.ts.map +1 -0
- package/dist/components/form/Form/Form.js +48 -0
- package/dist/components/form/Form/Form.js.map +1 -0
- package/dist/components/form/Form/FormGroup.d.ts +37 -0
- package/dist/components/form/Form/FormGroup.d.ts.map +1 -0
- package/dist/components/form/Form/FormGroup.js +72 -0
- package/dist/components/form/Form/FormGroup.js.map +1 -0
- package/dist/components/form/Form/index.d.ts +3 -0
- package/dist/components/form/Form/index.d.ts.map +1 -0
- package/dist/components/form/Form/index.js +3 -0
- package/dist/components/form/Form/index.js.map +1 -0
- package/dist/components/form/SearchInput.d.ts +9 -0
- package/dist/components/form/SearchInput.d.ts.map +1 -0
- package/dist/components/form/SearchInput.js +28 -0
- package/dist/components/form/SearchInput.js.map +1 -0
- package/dist/components/form/Select/CustomSelect.d.ts +81 -0
- package/dist/components/form/Select/CustomSelect.d.ts.map +1 -0
- package/dist/components/form/Select/CustomSelect.js +178 -0
- package/dist/components/form/Select/CustomSelect.js.map +1 -0
- package/dist/components/form/Select/DetailedSelect.d.ts +65 -0
- package/dist/components/form/Select/DetailedSelect.d.ts.map +1 -0
- package/dist/components/form/Select/DetailedSelect.js +80 -0
- package/dist/components/form/Select/DetailedSelect.js.map +1 -0
- package/dist/components/form/Select/Select.d.ts +47 -0
- package/dist/components/form/Select/Select.d.ts.map +1 -0
- package/dist/components/form/Select/Select.js +62 -0
- package/dist/components/form/Select/Select.js.map +1 -0
- package/dist/components/form/Select/index.d.ts +5 -0
- package/dist/components/form/Select/index.d.ts.map +1 -0
- package/dist/components/form/Select/index.js +5 -0
- package/dist/components/form/Select/index.js.map +1 -0
- package/dist/components/form/Select/styled.d.ts +5 -0
- package/dist/components/form/Select/styled.d.ts.map +1 -0
- package/dist/components/form/Select/styled.js +165 -0
- package/dist/components/form/Select/styled.js.map +1 -0
- package/dist/components/form/Select/types.d.ts +103 -0
- package/dist/components/form/Select/types.d.ts.map +1 -0
- package/dist/components/form/Select/types.js +2 -0
- package/dist/components/form/Select/types.js.map +1 -0
- package/dist/components/form/Select/utils.d.ts +3 -0
- package/dist/components/form/Select/utils.d.ts.map +1 -0
- package/dist/components/form/Select/utils.js +20 -0
- package/dist/components/form/Select/utils.js.map +1 -0
- package/dist/components/notification/NotificationComponent.d.ts +31 -0
- package/dist/components/notification/NotificationComponent.d.ts.map +1 -0
- package/dist/components/notification/NotificationComponent.js +176 -0
- package/dist/components/notification/NotificationComponent.js.map +1 -0
- package/dist/components/notification/NotificationItem.d.ts +51 -0
- package/dist/components/notification/NotificationItem.d.ts.map +1 -0
- package/dist/components/notification/NotificationItem.js +165 -0
- package/dist/components/notification/NotificationItem.js.map +1 -0
- package/dist/components/notification/NotificationList.d.ts +47 -0
- package/dist/components/notification/NotificationList.d.ts.map +1 -0
- package/dist/components/notification/NotificationList.js +82 -0
- package/dist/components/notification/NotificationList.js.map +1 -0
- package/dist/components/notification/NotificationPlaceholder.d.ts +13 -0
- package/dist/components/notification/NotificationPlaceholder.d.ts.map +1 -0
- package/dist/components/notification/NotificationPlaceholder.js +34 -0
- package/dist/components/notification/NotificationPlaceholder.js.map +1 -0
- package/dist/components/notification/types.d.ts +60 -0
- package/dist/components/notification/types.d.ts.map +1 -0
- package/dist/components/notification/types.js +7 -0
- package/dist/components/notification/types.js.map +1 -0
- package/dist/containers/NotificationsPage.d.ts +2 -0
- package/dist/containers/NotificationsPage.d.ts.map +1 -0
- package/dist/containers/NotificationsPage.js +71 -0
- package/dist/containers/NotificationsPage.js.map +1 -0
- package/dist/context/anchor.d.ts +27 -0
- package/dist/context/anchor.d.ts.map +1 -0
- package/dist/context/anchor.js +23 -0
- package/dist/context/anchor.js.map +1 -0
- package/dist/context/loading.d.ts +27 -0
- package/dist/context/loading.d.ts.map +1 -0
- package/dist/context/loading.js +24 -0
- package/dist/context/loading.js.map +1 -0
- package/dist/context/notification/LazyNotificationList.d.ts +28 -0
- package/dist/context/notification/LazyNotificationList.d.ts.map +1 -0
- package/dist/context/notification/LazyNotificationList.js +136 -0
- package/dist/context/notification/LazyNotificationList.js.map +1 -0
- package/dist/context/notification/NotificationController.d.ts +25 -0
- package/dist/context/notification/NotificationController.d.ts.map +1 -0
- package/dist/context/notification/NotificationController.js +153 -0
- package/dist/context/notification/NotificationController.js.map +1 -0
- package/dist/context/notification/context.d.ts +8 -0
- package/dist/context/notification/context.d.ts.map +1 -0
- package/dist/context/notification/context.js +12 -0
- package/dist/context/notification/context.js.map +1 -0
- package/dist/context/notification/hooks.d.ts +18 -0
- package/dist/context/notification/hooks.d.ts.map +1 -0
- package/dist/context/notification/hooks.js +92 -0
- package/dist/context/notification/hooks.js.map +1 -0
- package/dist/context/notification/types.d.ts +65 -0
- package/dist/context/notification/types.d.ts.map +1 -0
- package/dist/context/notification/types.js +2 -0
- package/dist/context/notification/types.js.map +1 -0
- package/dist/hooks/date.d.ts +18 -0
- package/dist/hooks/date.d.ts.map +1 -0
- package/dist/hooks/date.js +68 -0
- package/dist/hooks/date.js.map +1 -0
- package/dist/hooks/keyboard.d.ts +64 -0
- package/dist/hooks/keyboard.d.ts.map +1 -0
- package/dist/hooks/keyboard.js +84 -0
- package/dist/hooks/keyboard.js.map +1 -0
- package/dist/hooks/manual-render.d.ts +8 -0
- package/dist/hooks/manual-render.d.ts.map +1 -0
- package/dist/hooks/manual-render.js +10 -0
- package/dist/hooks/manual-render.js.map +1 -0
- package/dist/hooks/service-now.d.ts +32 -1
- package/dist/hooks/service-now.d.ts.map +1 -1
- package/dist/hooks/service-now.js +58 -18
- package/dist/hooks/service-now.js.map +1 -1
- package/dist/hooks/text.d.ts +9 -0
- package/dist/hooks/text.d.ts.map +1 -0
- package/dist/hooks/text.js +24 -0
- package/dist/hooks/text.js.map +1 -0
- package/dist/hooks/title.d.ts +13 -0
- package/dist/hooks/title.d.ts.map +1 -1
- package/dist/hooks/title.js +13 -0
- package/dist/hooks/title.js.map +1 -1
- package/dist/hooks/use-effect-once.d.ts.map +1 -1
- package/dist/hooks/use-effect-once.js.map +1 -1
- package/dist/index.d.ts +14 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -4
- package/dist/index.js.map +1 -1
- package/dist/notifications.d.ts +11 -0
- package/dist/notifications.d.ts.map +1 -0
- package/dist/notifications.js +10 -0
- package/dist/notifications.js.map +1 -0
- package/dist/svg/AI.d.ts +8 -0
- package/dist/svg/AI.d.ts.map +1 -0
- package/dist/svg/AI.js +15 -0
- package/dist/svg/AI.js.map +1 -0
- package/dist/svg/CS.d.ts +8 -0
- package/dist/svg/CS.d.ts.map +1 -0
- package/dist/svg/CS.js +15 -0
- package/dist/svg/CS.js.map +1 -0
- package/dist/svg/EDP.d.ts +8 -0
- package/dist/svg/EDP.d.ts.map +1 -0
- package/dist/svg/EDP.js +15 -0
- package/dist/svg/EDP.js.map +1 -0
- package/dist/svg/Forbidden.d.ts +5 -0
- package/dist/svg/Forbidden.d.ts.map +1 -0
- package/dist/svg/Forbidden.js +4 -0
- package/dist/svg/Forbidden.js.map +1 -0
- package/dist/svg/GenericPlaceholder.d.ts +7 -0
- package/dist/svg/GenericPlaceholder.d.ts.map +1 -0
- package/dist/svg/GenericPlaceholder.js +4 -0
- package/dist/svg/GenericPlaceholder.js.map +1 -0
- package/dist/svg/HUB.d.ts +8 -0
- package/dist/svg/HUB.d.ts.map +1 -0
- package/dist/svg/HUB.js +15 -0
- package/dist/svg/HUB.js.map +1 -0
- package/dist/svg/Logo.d.ts +5 -0
- package/dist/svg/Logo.d.ts.map +1 -0
- package/dist/svg/Logo.js +8 -0
- package/dist/svg/Logo.js.map +1 -0
- package/dist/svg/MiniLogo.d.ts +8 -0
- package/dist/svg/MiniLogo.d.ts.map +1 -0
- package/dist/svg/MiniLogo.js +6 -0
- package/dist/svg/MiniLogo.js.map +1 -0
- package/dist/svg/NotFound.d.ts +5 -0
- package/dist/svg/NotFound.d.ts.map +1 -0
- package/dist/svg/NotFound.js +4 -0
- package/dist/svg/NotFound.js.map +1 -0
- package/dist/svg/ServerError.d.ts +5 -0
- package/dist/svg/ServerError.d.ts.map +1 -0
- package/dist/svg/ServerError.js +4 -0
- package/dist/svg/ServerError.js.map +1 -0
- package/dist/svg/Unauthenticated.d.ts +5 -0
- package/dist/svg/Unauthenticated.d.ts.map +1 -0
- package/dist/svg/Unauthenticated.js +4 -0
- package/dist/svg/Unauthenticated.js.map +1 -0
- package/dist/svg/index.d.ts +12 -0
- package/dist/svg/index.d.ts.map +1 -0
- package/dist/svg/index.js +12 -0
- package/dist/svg/index.js.map +1 -0
- package/dist/utils/accessibility.d.ts +75 -0
- package/dist/utils/accessibility.d.ts.map +1 -0
- package/dist/utils/accessibility.js +123 -0
- package/dist/utils/accessibility.js.map +1 -0
- package/dist/utils/cookie.d.ts +34 -0
- package/dist/utils/cookie.d.ts.map +1 -0
- package/dist/utils/cookie.js +69 -0
- package/dist/utils/cookie.js.map +1 -0
- package/dist/utils/promise.d.ts +2 -0
- package/dist/utils/promise.d.ts.map +1 -0
- package/dist/utils/promise.js +6 -0
- package/dist/utils/promise.js.map +1 -0
- package/dist/utils/read-file.d.ts +2 -0
- package/dist/utils/read-file.d.ts.map +1 -0
- package/dist/utils/read-file.js +14 -0
- package/dist/utils/read-file.js.map +1 -0
- package/package.dev.json +3 -0
- package/package.json +53 -14
- package/package.stg.json +3 -0
- package/readme.md +55 -13
- package/src/components/AnimatedHeight.tsx +174 -0
- package/src/components/AsyncContent.tsx +78 -0
- package/src/components/BannerWarning.tsx +89 -19
- package/src/components/Breadcrumb/index.tsx +15 -13
- package/src/components/Breadcrumb/styled.ts +2 -1
- package/src/components/ButtonLoading.tsx +29 -0
- package/src/components/ChatBot.tsx +12 -7
- package/src/components/ContentValidateFilter.tsx +15 -0
- package/src/components/FadingOverflow.tsx +265 -0
- package/src/components/FileTreeView/More.tsx +114 -0
- package/src/components/FileTreeView/index.tsx +186 -0
- package/src/components/InfiniteScroll.tsx +24 -0
- package/src/components/InfoMaintenanceBanner.tsx +25 -0
- package/src/components/LazyMarkdown/BlockquoteMd.tsx +107 -0
- package/src/components/LazyMarkdown/CodeViewer.tsx +161 -0
- package/src/components/LazyMarkdown/Markdown.tsx +122 -0
- package/src/components/LazyMarkdown/MarkdownButton.tsx +24 -0
- package/src/components/LazyMarkdown/Video.tsx +13 -0
- package/src/components/LazyMarkdown/index.tsx +21 -0
- package/src/components/Placeholder.tsx +124 -0
- package/src/components/ScrollView.tsx +57 -0
- package/src/components/Select/BadgeItem.tsx +58 -0
- package/src/components/Select/ClearInput.tsx +24 -0
- package/src/components/Select/CloseItem.tsx +38 -0
- package/src/components/Select/CreatableSelect.tsx +155 -0
- package/src/components/Select/CustomMenu.tsx +16 -0
- package/src/components/Select/LabelItem.tsx +8 -0
- package/src/components/Select/MultiValue.tsx +49 -0
- package/src/components/Select/SelectInfiniteScroll.tsx +82 -0
- package/src/components/Select/SelectSearch.tsx +195 -0
- package/src/components/Select/index.tsx +7 -0
- package/src/components/Select/types.ts +8 -0
- package/src/components/SelectionList.tsx +427 -0
- package/src/components/StatusCircle.tsx +67 -0
- package/src/components/Stepper/Navigation.tsx +97 -0
- package/src/components/Stepper/Step.tsx +30 -0
- package/src/components/Stepper/Stepper.tsx +113 -0
- package/src/components/Stepper/headers.tsx +64 -0
- package/src/components/Stepper/index.ts +3 -0
- package/src/components/Table/HeaderItem.tsx +52 -0
- package/src/components/Table/SettingsVerticalMenu.tsx +50 -0
- package/src/components/Table/StyledLinkTable.tsx +22 -0
- package/src/components/Table/TableData.tsx +251 -0
- package/src/components/Table/index.tsx +2 -0
- package/src/components/TimelineSection.tsx +66 -0
- package/src/components/error/ErrorFeedback.tsx +217 -0
- package/src/components/error/NotFound.tsx +24 -0
- package/src/components/error/UnderMaintenance.tsx +30 -0
- package/src/components/error/index.ts +4 -0
- package/src/components/form/Form/Form.tsx +101 -0
- package/src/components/form/Form/FormGroup.tsx +221 -0
- package/src/components/form/Form/index.ts +2 -0
- package/src/components/form/SearchInput.tsx +69 -0
- package/src/components/form/Select/CustomSelect.tsx +232 -0
- package/src/components/form/Select/DetailedSelect.tsx +85 -0
- package/src/components/form/Select/Select.tsx +67 -0
- package/src/components/form/Select/index.ts +4 -0
- package/src/components/form/Select/styled.ts +165 -0
- package/src/components/form/Select/types.ts +112 -0
- package/src/components/form/Select/utils.tsx +28 -0
- package/src/components/notification/NotificationComponent.tsx +340 -0
- package/src/components/notification/NotificationItem.tsx +353 -0
- package/src/components/notification/NotificationList.tsx +185 -0
- package/src/components/notification/NotificationPlaceholder.tsx +60 -0
- package/src/components/notification/types.ts +72 -0
- package/src/containers/NotificationsPage.tsx +120 -0
- package/src/context/anchor.tsx +37 -0
- package/src/context/loading.tsx +36 -0
- package/src/context/notification/LazyNotificationList.ts +103 -0
- package/src/context/notification/NotificationController.ts +119 -0
- package/src/context/notification/context.tsx +23 -0
- package/src/context/notification/hooks.ts +98 -0
- package/src/context/notification/types.ts +71 -0
- package/src/hooks/date.ts +68 -0
- package/src/hooks/keyboard.tsx +128 -0
- package/src/hooks/manual-render.tsx +10 -0
- package/src/hooks/service-now.tsx +64 -19
- package/src/hooks/text.tsx +30 -0
- package/src/hooks/title.tsx +13 -0
- package/src/index.ts +14 -6
- package/src/notifications.ts +11 -0
- package/src/svg/AI.tsx +41 -0
- package/src/svg/CS.tsx +48 -0
- package/src/svg/EDP.tsx +31 -0
- package/src/svg/Forbidden.tsx +22 -0
- package/src/svg/GenericPlaceholder.tsx +16 -0
- package/src/svg/HUB.tsx +48 -0
- package/src/svg/Logo.tsx +16 -0
- package/src/svg/MiniLogo.tsx +12 -0
- package/src/svg/NotFound.tsx +16 -0
- package/src/svg/ServerError.tsx +33 -0
- package/src/svg/Unauthenticated.tsx +16 -0
- package/src/svg/index.ts +11 -0
- package/src/utils/accessibility.ts +135 -0
- package/src/utils/cookie.ts +73 -0
- package/src/utils/promise.ts +5 -0
- package/src/utils/read-file.ts +16 -0
- package/tsconfig.json +1 -0
- package/dist/components/Login.d.ts +0 -26
- package/dist/components/Login.d.ts.map +0 -1
- package/dist/components/Login.js +0 -100
- package/dist/components/Login.js.map +0 -1
- package/dist/components/MiniLogo.d.ts +0 -6
- package/dist/components/MiniLogo.d.ts.map +0 -1
- package/dist/components/MiniLogo.js +0 -4
- package/dist/components/MiniLogo.js.map +0 -1
- package/dist/components/tour/StepContainer.d.ts +0 -13
- package/dist/components/tour/StepContainer.d.ts.map +0 -1
- package/dist/components/tour/StepContainer.js +0 -48
- package/dist/components/tour/StepContainer.js.map +0 -1
- package/dist/components/tour/StepNavigation.d.ts +0 -13
- package/dist/components/tour/StepNavigation.d.ts.map +0 -1
- package/dist/components/tour/StepNavigation.js +0 -20
- package/dist/components/tour/StepNavigation.js.map +0 -1
- package/dist/components/tour/StepTitle.d.ts +0 -7
- package/dist/components/tour/StepTitle.d.ts.map +0 -1
- package/dist/components/tour/StepTitle.js +0 -5
- package/dist/components/tour/StepTitle.js.map +0 -1
- package/dist/components/tour/context.d.ts +0 -17
- package/dist/components/tour/context.d.ts.map +0 -1
- package/dist/components/tour/context.js +0 -48
- package/dist/components/tour/context.js.map +0 -1
- package/dist/components/tour/index.d.ts +0 -9
- package/dist/components/tour/index.d.ts.map +0 -1
- package/dist/components/tour/index.js +0 -4
- package/dist/components/tour/index.js.map +0 -1
- package/dist/components/tour/utils.d.ts +0 -13
- package/dist/components/tour/utils.d.ts.map +0 -1
- package/dist/components/tour/utils.js +0 -43
- package/dist/components/tour/utils.js.map +0 -1
- package/src/components/Login.tsx +0 -157
- package/src/components/MiniLogo.tsx +0 -32
- package/src/components/tour/StepContainer.tsx +0 -67
- package/src/components/tour/StepNavigation.tsx +0 -32
- package/src/components/tour/StepTitle.tsx +0 -17
- package/src/components/tour/context.tsx +0 -56
- package/src/components/tour/index.ts +0 -7
- package/src/components/tour/utils.tsx +0 -65
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Times } from '@citric/icons'
|
|
2
|
+
import { IconButton } from '@citric/ui'
|
|
3
|
+
import { Dictionary, useTranslate } from '@stack-spot/portal-translate'
|
|
4
|
+
import { ClearIndicatorProps, components } from 'react-select'
|
|
5
|
+
|
|
6
|
+
export const ClearInput = (props: ClearIndicatorProps<any>) => {
|
|
7
|
+
const t = useTranslate(dictionary)
|
|
8
|
+
return (
|
|
9
|
+
<components.ClearIndicator {...props}>
|
|
10
|
+
<IconButton role="button" type="button" onClick={() => props.clearValue()} aria-label={t.ariaLabelClearInput}>
|
|
11
|
+
<Times />
|
|
12
|
+
</IconButton>
|
|
13
|
+
</components.ClearIndicator>
|
|
14
|
+
)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const dictionary = {
|
|
18
|
+
en: {
|
|
19
|
+
ariaLabelClearInput: 'Clear all field values',
|
|
20
|
+
},
|
|
21
|
+
pt: {
|
|
22
|
+
ariaLabelClearInput: 'Limpar todos valores do campo',
|
|
23
|
+
},
|
|
24
|
+
} satisfies Dictionary
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IconBox } from '@citric/core'
|
|
2
|
+
import { SxProperties } from '@citric/core/dist/sx'
|
|
3
|
+
import { TimesMini } from '@citric/icons'
|
|
4
|
+
import { IconButton } from '@citric/ui'
|
|
5
|
+
import { Dictionary, interpolate, useTranslate } from '@stack-spot/portal-translate'
|
|
6
|
+
import { MultiValueRemoveProps, components } from 'react-select'
|
|
7
|
+
|
|
8
|
+
export const CloseItem = (props: MultiValueRemoveProps<any>) => {
|
|
9
|
+
const t = useTranslate(dictionary)
|
|
10
|
+
return (
|
|
11
|
+
<components.MultiValueRemove {...props}>
|
|
12
|
+
<IconButton
|
|
13
|
+
type="button"
|
|
14
|
+
aria-label={interpolate(t.ariaLabelRemoveItemButton, props.data.value)}
|
|
15
|
+
sx={{
|
|
16
|
+
bg: 'transparent',
|
|
17
|
+
border: 'none',
|
|
18
|
+
px: 0,
|
|
19
|
+
w: 'auto',
|
|
20
|
+
height: 'auto',
|
|
21
|
+
'&:hover, &:focus': { bg: 'transparent' },
|
|
22
|
+
} as SxProperties}>
|
|
23
|
+
<IconBox size="xs" sx={{ px: 0 }}>
|
|
24
|
+
<TimesMini />
|
|
25
|
+
</IconBox>
|
|
26
|
+
</IconButton>
|
|
27
|
+
</components.MultiValueRemove>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const dictionary = {
|
|
32
|
+
en: {
|
|
33
|
+
ariaLabelRemoveItemButton: 'Remove item $0',
|
|
34
|
+
},
|
|
35
|
+
pt: {
|
|
36
|
+
ariaLabelRemoveItemButton: 'Remover item $0',
|
|
37
|
+
},
|
|
38
|
+
} satisfies Dictionary
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { theme } from '@stack-spot/portal-theme'
|
|
2
|
+
import { Dictionary, useTranslate } from '@stack-spot/portal-translate'
|
|
3
|
+
import { FC } from 'react'
|
|
4
|
+
import { CSSObjectWithLabel } from 'react-select'
|
|
5
|
+
import Creatable from 'react-select/creatable'
|
|
6
|
+
import { BadgeItem } from './BadgeItem'
|
|
7
|
+
import { CreatableSelectOptionType, CreatableValueType } from './types'
|
|
8
|
+
import { ClearInput } from './ClearInput'
|
|
9
|
+
|
|
10
|
+
export interface CreatableSelectProps {
|
|
11
|
+
id?: string,
|
|
12
|
+
name?: string,
|
|
13
|
+
disabled?: boolean,
|
|
14
|
+
isLoading?: boolean,
|
|
15
|
+
isMulti?: boolean,
|
|
16
|
+
options?: CreatableSelectOptionType[],
|
|
17
|
+
className?: string,
|
|
18
|
+
value?: string | string[],
|
|
19
|
+
inputValue?: CreatableValueType,
|
|
20
|
+
onChange: (newValue: CreatableValueType) => void,
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const CreatableSelect: FC<CreatableSelectProps> =
|
|
24
|
+
({ disabled, options, inputValue, isMulti, onChange, id, ...props }) => {
|
|
25
|
+
const t = useTranslate(dictionary)
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<Creatable
|
|
29
|
+
placeholder={t.typeYourOption}
|
|
30
|
+
{...props}
|
|
31
|
+
inputId={id}
|
|
32
|
+
isClearable={true}
|
|
33
|
+
isDisabled={disabled}
|
|
34
|
+
value={inputValue}
|
|
35
|
+
options={options}
|
|
36
|
+
isMulti={isMulti}
|
|
37
|
+
onChange={onChange}
|
|
38
|
+
components={{
|
|
39
|
+
MultiValue: BadgeItem,
|
|
40
|
+
MultiValueRemove: () => <></>,
|
|
41
|
+
ClearIndicator: ClearInput,
|
|
42
|
+
}}
|
|
43
|
+
noOptionsMessage={() => (t.typeYourOption)}
|
|
44
|
+
formatCreateLabel={(value) => (value)}
|
|
45
|
+
tabSelectsValue={false}
|
|
46
|
+
styles={{
|
|
47
|
+
control: (base, state) => ({
|
|
48
|
+
...base,
|
|
49
|
+
minHeight: '2.5rem',
|
|
50
|
+
height: 'auto',
|
|
51
|
+
backgroundColor: theme.color.light[300],
|
|
52
|
+
border: `0.063rem solid ${theme.color.light[600]}`,
|
|
53
|
+
borderRadius: '0.25rem',
|
|
54
|
+
fontSize: '0.875rem',
|
|
55
|
+
fontStyle: 'normal',
|
|
56
|
+
fontFeatureSettings: '\'clig\' off, \'liga\' off',
|
|
57
|
+
display: 'flex',
|
|
58
|
+
alignItems: 'center',
|
|
59
|
+
outlineColor: theme.color.light[700],
|
|
60
|
+
|
|
61
|
+
'&:hover': {
|
|
62
|
+
border: `0.063rem solid ${theme.color.light[600]}`,
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
...(state.isFocused || state.menuIsOpen ? {
|
|
66
|
+
borderColor: `${theme.color.primary[500]} !important`,
|
|
67
|
+
outline: `0.063rem solid ${theme.color.primary[500]} !important`,
|
|
68
|
+
} : {}),
|
|
69
|
+
} as CSSObjectWithLabel),
|
|
70
|
+
input: () => ({
|
|
71
|
+
color: theme.color.light.contrastText,
|
|
72
|
+
}),
|
|
73
|
+
placeholder: () => ({
|
|
74
|
+
display: 'none',
|
|
75
|
+
}),
|
|
76
|
+
dropdownIndicator: () => ({
|
|
77
|
+
display: 'none',
|
|
78
|
+
}),
|
|
79
|
+
indicatorSeparator: () => ({
|
|
80
|
+
display: 'none',
|
|
81
|
+
}),
|
|
82
|
+
singleValue: (base) => ({
|
|
83
|
+
...base,
|
|
84
|
+
color: theme.color.light.contrastText,
|
|
85
|
+
} as CSSObjectWithLabel),
|
|
86
|
+
menu: (base) => ({
|
|
87
|
+
...base,
|
|
88
|
+
backgroundColor: theme.color.light[500],
|
|
89
|
+
border: `0.063rem solid ${theme.color.light[400]}`,
|
|
90
|
+
borderRadius: '0.5rem',
|
|
91
|
+
boxShadow: `0 0 0 0.125rem ${theme.color.gray[600]}`,
|
|
92
|
+
color: theme.color.light.contrastText,
|
|
93
|
+
} as CSSObjectWithLabel),
|
|
94
|
+
multiValue: (base) => ({
|
|
95
|
+
...base,
|
|
96
|
+
backgroundColor: 'inherit',
|
|
97
|
+
display: 'flex',
|
|
98
|
+
alignItems: 'center',
|
|
99
|
+
justifyItems: 'center',
|
|
100
|
+
}),
|
|
101
|
+
multiValueRemove: (base) => ({
|
|
102
|
+
...base,
|
|
103
|
+
cursor: 'pointer',
|
|
104
|
+
backgroundColor: 'inherit',
|
|
105
|
+
paddingRight: 0,
|
|
106
|
+
':hover': {
|
|
107
|
+
backgroundColor: 'inherit',
|
|
108
|
+
color: 'inherit',
|
|
109
|
+
},
|
|
110
|
+
}),
|
|
111
|
+
option: (styles, { isDisabled, isFocused, isSelected }) => ({
|
|
112
|
+
...styles,
|
|
113
|
+
backgroundColor: isDisabled
|
|
114
|
+
? undefined
|
|
115
|
+
: isSelected
|
|
116
|
+
? theme.color.light[700]
|
|
117
|
+
: isFocused
|
|
118
|
+
? theme.color.light[600]
|
|
119
|
+
: undefined,
|
|
120
|
+
|
|
121
|
+
color: isSelected ? theme.color.light[300] : theme.color.light.contrastText,
|
|
122
|
+
|
|
123
|
+
cursor: isDisabled ? 'not-allowed' : 'default',
|
|
124
|
+
|
|
125
|
+
':active': {
|
|
126
|
+
...styles[':active'],
|
|
127
|
+
backgroundColor: !isDisabled
|
|
128
|
+
? isSelected
|
|
129
|
+
? theme.color.light.contrastText
|
|
130
|
+
: theme.color.light[600]
|
|
131
|
+
: undefined,
|
|
132
|
+
},
|
|
133
|
+
|
|
134
|
+
':hover': {
|
|
135
|
+
...styles[':hover'],
|
|
136
|
+
backgroundColor: !isDisabled
|
|
137
|
+
? isSelected
|
|
138
|
+
? theme.color.light[700]
|
|
139
|
+
: theme.color.light[600]
|
|
140
|
+
: undefined,
|
|
141
|
+
},
|
|
142
|
+
} as CSSObjectWithLabel),
|
|
143
|
+
}}
|
|
144
|
+
/>
|
|
145
|
+
)
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const dictionary = {
|
|
149
|
+
en: {
|
|
150
|
+
typeYourOption: 'Type your option',
|
|
151
|
+
},
|
|
152
|
+
pt: {
|
|
153
|
+
typeYourOption: 'Insira a sua opção',
|
|
154
|
+
},
|
|
155
|
+
} satisfies Dictionary
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react'
|
|
2
|
+
import { components, GroupBase, MenuProps } from 'react-select'
|
|
3
|
+
|
|
4
|
+
interface CustomMenuProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>>
|
|
5
|
+
extends MenuProps<Option, IsMulti, Group> {
|
|
6
|
+
afterList?: ReactNode,
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const CustomMenu = <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(
|
|
10
|
+
props: CustomMenuProps<Option, IsMulti, Group>,
|
|
11
|
+
) => (
|
|
12
|
+
<components.Menu {...props}>
|
|
13
|
+
{props.children}
|
|
14
|
+
{props.afterList && <>{props.afterList}</>}
|
|
15
|
+
</components.Menu>
|
|
16
|
+
)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { SxProperties } from '@citric/core/dist/sx'
|
|
2
|
+
import { TimesMini } from '@citric/icons'
|
|
3
|
+
import { Badge, IconButton } from '@citric/ui'
|
|
4
|
+
import { Dictionary, interpolate, useTranslate } from '@stack-spot/portal-translate'
|
|
5
|
+
import { MultiValueProps, components } from 'react-select'
|
|
6
|
+
|
|
7
|
+
export const MultiValue = (props: MultiValueProps) => {
|
|
8
|
+
const t = useTranslate(dictionary)
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
<components.MultiValue {...props}>
|
|
12
|
+
<Badge appearance="square" className="badge" palette="cyan" sx={
|
|
13
|
+
{
|
|
14
|
+
mr: 0,
|
|
15
|
+
my: 0,
|
|
16
|
+
'.badge-citric-container:not(:has(> button:first-child))': {
|
|
17
|
+
marginRight: 0,
|
|
18
|
+
},
|
|
19
|
+
} as SxProperties}
|
|
20
|
+
afterElement={
|
|
21
|
+
<components.MultiValueRemove {...props}>
|
|
22
|
+
<IconButton
|
|
23
|
+
type="button"
|
|
24
|
+
aria-label={interpolate(t.ariaLabelRemoveItemButton, props.children)}
|
|
25
|
+
appearance="square"
|
|
26
|
+
colorIcon="cyan.800"
|
|
27
|
+
onClick={(e: React.MouseEvent<HTMLElement, MouseEvent>) => {
|
|
28
|
+
e.stopPropagation()
|
|
29
|
+
props.removeProps?.onClick?.(e as React.MouseEvent<HTMLDivElement, MouseEvent>)
|
|
30
|
+
}}>
|
|
31
|
+
<TimesMini />
|
|
32
|
+
</IconButton>
|
|
33
|
+
</components.MultiValueRemove>
|
|
34
|
+
}>
|
|
35
|
+
{props.children}
|
|
36
|
+
</Badge>
|
|
37
|
+
</components.MultiValue>
|
|
38
|
+
</>
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const dictionary = {
|
|
43
|
+
en: {
|
|
44
|
+
ariaLabelRemoveItemButton: 'Remove item $0',
|
|
45
|
+
},
|
|
46
|
+
pt: {
|
|
47
|
+
ariaLabelRemoveItemButton: 'Remover item $0',
|
|
48
|
+
},
|
|
49
|
+
} satisfies Dictionary
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { IconBox } from '@citric/core'
|
|
2
|
+
import { LoadingCircular } from '@citric/ui'
|
|
3
|
+
import InfiniteScroll from 'react-infinite-scroll-component'
|
|
4
|
+
import { components, GroupBase, MenuListProps } from 'react-select'
|
|
5
|
+
import { SelectSearch, SelectSearchProps } from './SelectSearch'
|
|
6
|
+
|
|
7
|
+
interface CustomMenuListProps {
|
|
8
|
+
loadMore: () => void,
|
|
9
|
+
hasMore: boolean,
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const MenuList = <
|
|
13
|
+
OptionType,
|
|
14
|
+
IsMulti extends boolean = false,
|
|
15
|
+
Group extends GroupBase<OptionType> = GroupBase<OptionType>
|
|
16
|
+
>(props: MenuListProps<OptionType, IsMulti, Group>) => {
|
|
17
|
+
const { children, selectProps } = props
|
|
18
|
+
const { loadMore, hasMore, options, isLoadingMore } = selectProps as typeof selectProps &
|
|
19
|
+
CustomMenuListProps & { isLoadingMore?: boolean }
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<InfiniteScroll
|
|
23
|
+
dataLength={options.length}
|
|
24
|
+
next={loadMore}
|
|
25
|
+
hasMore={hasMore}
|
|
26
|
+
scrollableTarget="list-item"
|
|
27
|
+
scrollThreshold={0.8}
|
|
28
|
+
loader={isLoadingMore ? <IconBox w={12} colorBg="light.300" sx={{ alignItems: 'center', justifyContent: 'center' }}>
|
|
29
|
+
<LoadingCircular />
|
|
30
|
+
</IconBox> : null}
|
|
31
|
+
style={{ overflow: 'hidden' }}
|
|
32
|
+
>
|
|
33
|
+
<components.MenuList {...props} innerProps={{ ...props.innerProps, id: 'list-item' }}>{children}</components.MenuList>
|
|
34
|
+
</InfiniteScroll>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
type Option = { value: string, label: string }
|
|
39
|
+
|
|
40
|
+
export interface SelectInfiniteScrollProps extends SelectSearchProps {
|
|
41
|
+
options: Option[],
|
|
42
|
+
loadMore: () => void,
|
|
43
|
+
hasMore: boolean,
|
|
44
|
+
isLoadingMore?: boolean,
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const SelectInfiniteScroll = ({
|
|
48
|
+
options,
|
|
49
|
+
loadMore,
|
|
50
|
+
hasMore,
|
|
51
|
+
isLoadingMore,
|
|
52
|
+
...props
|
|
53
|
+
}: SelectInfiniteScrollProps) => (
|
|
54
|
+
<SelectSearch
|
|
55
|
+
components={{ MenuList }}
|
|
56
|
+
options={options}
|
|
57
|
+
closeMenuOnSelect={false}
|
|
58
|
+
styles={{
|
|
59
|
+
control: () => ({
|
|
60
|
+
minHeight: '2.5rem',
|
|
61
|
+
height: 'auto',
|
|
62
|
+
}),
|
|
63
|
+
menu: () => ({
|
|
64
|
+
position: 'absolute',
|
|
65
|
+
}),
|
|
66
|
+
menuList: (base) => ({
|
|
67
|
+
...base,
|
|
68
|
+
maxHeight: 300,
|
|
69
|
+
overflowY: 'auto',
|
|
70
|
+
}),
|
|
71
|
+
input: () => ({
|
|
72
|
+
position: 'relative',
|
|
73
|
+
}),
|
|
74
|
+
}}
|
|
75
|
+
// @ts-ignore: Essas props não existem no tipo, mas são acessíveis via selectProps no MenuList
|
|
76
|
+
loadMore={loadMore}
|
|
77
|
+
hasMore={hasMore}
|
|
78
|
+
isLoadingMore={isLoadingMore}
|
|
79
|
+
{...props}
|
|
80
|
+
/>
|
|
81
|
+
)
|
|
82
|
+
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { IconBox } from '@citric/core'
|
|
2
|
+
import { ChevronDown } from '@citric/icons'
|
|
3
|
+
import { theme } from '@stack-spot/portal-theme'
|
|
4
|
+
import { Dictionary, useTranslate } from '@stack-spot/portal-translate'
|
|
5
|
+
import { ComponentProps, ComponentType, RefCallback } from 'react'
|
|
6
|
+
import Select, { components, CSSObjectWithLabel, Props as SelectProps } from 'react-select'
|
|
7
|
+
import { ClearInput } from './ClearInput'
|
|
8
|
+
import { MultiValue } from './MultiValue'
|
|
9
|
+
|
|
10
|
+
export interface SelectSearchProps extends Partial<SelectProps> {
|
|
11
|
+
options: any[],
|
|
12
|
+
components?: Partial<typeof components>,
|
|
13
|
+
disabled?: boolean,
|
|
14
|
+
onChange?: (newValue?: any) => void,
|
|
15
|
+
ref?: RefCallback<any>,
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const EmptyComponent = () => <></>
|
|
19
|
+
|
|
20
|
+
const DropdownIndicator: ComponentType<ComponentProps<typeof components.DropdownIndicator>> = (props) => <IconBox
|
|
21
|
+
aria-hidden="true"
|
|
22
|
+
colorIcon="gray.50"
|
|
23
|
+
sx={{
|
|
24
|
+
cursor: 'pointer',
|
|
25
|
+
width: '10px',
|
|
26
|
+
height: '6px',
|
|
27
|
+
marginRight: '14px',
|
|
28
|
+
transition: 'transform 0.3s ease-in',
|
|
29
|
+
transform: `rotate(${props.selectProps.menuIsOpen ? '180' : '0'}deg)`,
|
|
30
|
+
}}
|
|
31
|
+
>
|
|
32
|
+
<ChevronDown />
|
|
33
|
+
</IconBox>
|
|
34
|
+
|
|
35
|
+
export const SelectSearch = ({
|
|
36
|
+
options,
|
|
37
|
+
components: customComponents = {},
|
|
38
|
+
onChange,
|
|
39
|
+
styles: customStyles = {},
|
|
40
|
+
disabled,
|
|
41
|
+
ref,
|
|
42
|
+
...props
|
|
43
|
+
}: SelectSearchProps) => {
|
|
44
|
+
const t = useTranslate(dictionary)
|
|
45
|
+
return (
|
|
46
|
+
<Select
|
|
47
|
+
options={options}
|
|
48
|
+
onChange={onChange}
|
|
49
|
+
isDisabled={disabled}
|
|
50
|
+
ref={ref}
|
|
51
|
+
noOptionsMessage={() => t.noOptions}
|
|
52
|
+
{...props}
|
|
53
|
+
styles={{
|
|
54
|
+
...customStyles,
|
|
55
|
+
container: (base) => ({
|
|
56
|
+
...base,
|
|
57
|
+
width: '100%',
|
|
58
|
+
}),
|
|
59
|
+
control: (base, state) => ({
|
|
60
|
+
...base,
|
|
61
|
+
height: '2.5rem',
|
|
62
|
+
display: 'flex',
|
|
63
|
+
alignItems: 'center',
|
|
64
|
+
padding: '0px',
|
|
65
|
+
color: theme.color.light.contrastText,
|
|
66
|
+
backgroundColor: theme.color.light[300],
|
|
67
|
+
border: `1px solid ${theme.color.light[600]}`,
|
|
68
|
+
outlineColor: theme.color.light[700],
|
|
69
|
+
'&:hover': {
|
|
70
|
+
border: `0.063rem solid ${theme.color.light[600]}`,
|
|
71
|
+
},
|
|
72
|
+
fontSize: '0.875rem',
|
|
73
|
+
lineHeight: '1.714',
|
|
74
|
+
fontFamily: 'Roboto, sans-serif',
|
|
75
|
+
...(state.isFocused || state.menuIsOpen
|
|
76
|
+
? {
|
|
77
|
+
borderColor: `${theme.color.primary[500]} !important`,
|
|
78
|
+
outline: `0.063rem solid ${theme.color.primary[500]} !important`,
|
|
79
|
+
}
|
|
80
|
+
: {}),
|
|
81
|
+
...(state.isDisabled
|
|
82
|
+
? {
|
|
83
|
+
backgroundColor: theme.color.light[500],
|
|
84
|
+
borderColor: theme.color.light[600],
|
|
85
|
+
cursor: 'not-allowed',
|
|
86
|
+
}
|
|
87
|
+
: {}),
|
|
88
|
+
...customStyles?.control?.(base, state),
|
|
89
|
+
} as CSSObjectWithLabel),
|
|
90
|
+
input: (base, state) => ({
|
|
91
|
+
...base,
|
|
92
|
+
color: theme.color.light.contrastText,
|
|
93
|
+
position: 'fixed',
|
|
94
|
+
...customStyles?.input?.(base, state),
|
|
95
|
+
}),
|
|
96
|
+
menu: (base, state) => ({
|
|
97
|
+
...base,
|
|
98
|
+
marginTop: '0.25rem',
|
|
99
|
+
position: 'relative',
|
|
100
|
+
backgroundColor: theme.color.light[300],
|
|
101
|
+
...customStyles?.menu?.(base, state),
|
|
102
|
+
}),
|
|
103
|
+
option: (base, state) => ({
|
|
104
|
+
...base,
|
|
105
|
+
display: 'flex',
|
|
106
|
+
alignItems: 'center',
|
|
107
|
+
backgroundColor: theme.color.light[300],
|
|
108
|
+
cursor: 'pointer',
|
|
109
|
+
'&:hover': {
|
|
110
|
+
backgroundColor: theme.color.light[500],
|
|
111
|
+
},
|
|
112
|
+
border: '1px solid transparent',
|
|
113
|
+
...(state.isFocused
|
|
114
|
+
? {
|
|
115
|
+
borderColor: `${theme.color.light.contrastText} !important`,
|
|
116
|
+
}
|
|
117
|
+
: {}),
|
|
118
|
+
...customStyles?.option?.(base, state),
|
|
119
|
+
}),
|
|
120
|
+
menuList: (base, state) => ({
|
|
121
|
+
...base,
|
|
122
|
+
padding: 0,
|
|
123
|
+
'&::-webkit-scrollbar': {
|
|
124
|
+
width: '0.125rem',
|
|
125
|
+
height: '.5rem',
|
|
126
|
+
backgroundColor: 'transparent',
|
|
127
|
+
},
|
|
128
|
+
'&::-webkit-scrollbar-track': {
|
|
129
|
+
background: `${theme.color.light[300]}`,
|
|
130
|
+
borderRadius: '2px',
|
|
131
|
+
},
|
|
132
|
+
'&::-webkit-scrollbar-thumb': {
|
|
133
|
+
background: `${theme.color.primary[500]}`,
|
|
134
|
+
borderRadius: '2px',
|
|
135
|
+
},
|
|
136
|
+
'&::-webkit-scrollbar-thumb:hover': {
|
|
137
|
+
background: `${theme.color.light[700]}`,
|
|
138
|
+
borderRadius: '2px',
|
|
139
|
+
},
|
|
140
|
+
'&::-webkit-scrollbar-corner': {
|
|
141
|
+
backgroundColor: 'transparent',
|
|
142
|
+
},
|
|
143
|
+
...customStyles?.menuList?.(base, state),
|
|
144
|
+
}),
|
|
145
|
+
multiValue: (base, state) => ({
|
|
146
|
+
...base,
|
|
147
|
+
background: 'transparent',
|
|
148
|
+
alignItems: 'center',
|
|
149
|
+
margin: 0,
|
|
150
|
+
...customStyles?.multiValue?.(base, state),
|
|
151
|
+
}),
|
|
152
|
+
multiValueLabel: (base, state) => ({
|
|
153
|
+
...base,
|
|
154
|
+
margin: 0,
|
|
155
|
+
...customStyles?.multiValueLabel?.(base, state),
|
|
156
|
+
}),
|
|
157
|
+
multiValueRemove: (base, state) => ({
|
|
158
|
+
...base,
|
|
159
|
+
backgroundColor: 'transparent',
|
|
160
|
+
margin: 0,
|
|
161
|
+
'&:hover': {
|
|
162
|
+
backgroundColor: 'transparent',
|
|
163
|
+
},
|
|
164
|
+
...customStyles?.multiValueRemove?.(base, state),
|
|
165
|
+
}),
|
|
166
|
+
noOptionsMessage: (base, state) => ({
|
|
167
|
+
...base,
|
|
168
|
+
backgroundColor: theme.color.light[300],
|
|
169
|
+
...customStyles?.noOptionsMessage?.(base, state),
|
|
170
|
+
}),
|
|
171
|
+
}}
|
|
172
|
+
components={{
|
|
173
|
+
...components,
|
|
174
|
+
DropdownIndicator,
|
|
175
|
+
IndicatorSeparator: EmptyComponent,
|
|
176
|
+
ClearIndicator: ClearInput,
|
|
177
|
+
MultiValue: MultiValue,
|
|
178
|
+
MultiValueRemove: () => <></>,
|
|
179
|
+
...customComponents,
|
|
180
|
+
}}
|
|
181
|
+
/>
|
|
182
|
+
)
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
const dictionary = {
|
|
189
|
+
en: {
|
|
190
|
+
noOptions: 'No options',
|
|
191
|
+
},
|
|
192
|
+
pt: {
|
|
193
|
+
noOptions: 'Sem opções',
|
|
194
|
+
},
|
|
195
|
+
} satisfies Dictionary
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CreatableSelect } from './CreatableSelect'
|
|
2
|
+
import { CustomMenu } from './CustomMenu'
|
|
3
|
+
import { SelectInfiniteScroll, SelectInfiniteScrollProps } from './SelectInfiniteScroll'
|
|
4
|
+
import { SelectSearch, SelectSearchProps } from './SelectSearch'
|
|
5
|
+
|
|
6
|
+
export { CreatableSelect, CustomMenu, SelectInfiniteScroll, SelectInfiniteScrollProps, SelectSearch, SelectSearchProps }
|
|
7
|
+
|