@stack-spot/portal-components 0.0.18 → 1.0.0-dev.1770393008395
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 +27 -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 +102 -0
- package/dist/components/notification/NotificationList.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 +72 -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 +104 -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/GenericPlaceholderCentered.d.ts +7 -0
- package/dist/svg/GenericPlaceholderCentered.d.ts.map +1 -0
- package/dist/svg/GenericPlaceholderCentered.js +4 -0
- package/dist/svg/GenericPlaceholderCentered.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 +13 -0
- package/dist/svg/index.d.ts.map +1 -0
- package/dist/svg/index.js +14 -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 +54 -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 +123 -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 +72 -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 +207 -0
- package/src/components/notification/types.ts +72 -0
- package/src/containers/NotificationsPage.tsx +121 -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 +115 -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/GenericPlaceholderCentered.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 +14 -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,107 @@
|
|
|
1
|
+
import { Blockquote, Box, Flex, IconBox, Text } from '@citric/core'
|
|
2
|
+
import { OneOfColorSchemes } from '@citric/core/dist/theme-types'
|
|
3
|
+
import * as icons from '@citric/icons'
|
|
4
|
+
import { Dictionary, useTranslate } from '@stack-spot/portal-translate'
|
|
5
|
+
import { createElement } from 'react'
|
|
6
|
+
|
|
7
|
+
type IconName = keyof typeof icons
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* BlockquoteMd component that renders a styled blockquote with an icon and text based on the provided props.
|
|
11
|
+
*
|
|
12
|
+
* @param {Object} props - The props for the BlockquoteMd component.
|
|
13
|
+
* @param {any} props.props - The properties passed to the component.
|
|
14
|
+
* @returns {JSX.Element} The BlockquoteMd component.
|
|
15
|
+
*/
|
|
16
|
+
export const BlockquoteMd = ({ props }: { props: any }) => {
|
|
17
|
+
const t = useTranslate(dictionary)
|
|
18
|
+
const arrayNode = props.node
|
|
19
|
+
const blockItem = arrayNode?.children[1]?.children[0]?.value
|
|
20
|
+
const blockStyle = blockquoteAlertStyle(blockItem)
|
|
21
|
+
|
|
22
|
+
if (blockStyle) {
|
|
23
|
+
const childrenBlock = arrayNode?.children[3]?.children[1].children[0].value
|
|
24
|
+
return (
|
|
25
|
+
<Flex sx={{ borderRadius: 'sm', bg: 'light.500', my: 3 }}>
|
|
26
|
+
<Blockquote colorScheme={blockStyle.color}>
|
|
27
|
+
<Box>
|
|
28
|
+
<Flex>
|
|
29
|
+
<IconBox appearance="square" colorIcon={`${blockStyle.color}.400`} sx={{ mr: 4 }}>
|
|
30
|
+
{createElement(icons[blockStyle.icon])}
|
|
31
|
+
</IconBox>
|
|
32
|
+
<Text sx={{ color: `${blockStyle.color}.400` }} weight="medium">
|
|
33
|
+
{t[blockItem as keyof typeof t]}
|
|
34
|
+
</Text>
|
|
35
|
+
</Flex>
|
|
36
|
+
<Box my={3}>
|
|
37
|
+
<Text>{childrenBlock}</Text>
|
|
38
|
+
</Box>
|
|
39
|
+
</Box>
|
|
40
|
+
</Blockquote>
|
|
41
|
+
</Flex>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<Flex sx={{ borderRadius: 'sm', bg: 'light.500', my: 3 }}>
|
|
47
|
+
<Blockquote>
|
|
48
|
+
<Text {...props} />
|
|
49
|
+
</Blockquote>
|
|
50
|
+
</Flex>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Get the style for the blockquote based on the block rule.
|
|
56
|
+
*
|
|
57
|
+
* @param {string} blockRule - The block rule to determine the style.
|
|
58
|
+
* @returns {{ color: OneOfColorSchemes, icon: IconName }} The style object containing color and icon.
|
|
59
|
+
*/
|
|
60
|
+
function blockquoteAlertStyle(blockRule: string) {
|
|
61
|
+
const style: Record<string, { color: OneOfColorSchemes, icon: IconName }> = {
|
|
62
|
+
'[!NOTE]': {
|
|
63
|
+
color: 'inverse',
|
|
64
|
+
icon: 'Document',
|
|
65
|
+
},
|
|
66
|
+
'[!INFO]': {
|
|
67
|
+
color: 'secondary',
|
|
68
|
+
icon: 'InfoCircle',
|
|
69
|
+
},
|
|
70
|
+
'[!IMPORTANT]': {
|
|
71
|
+
color: 'tertiary',
|
|
72
|
+
icon: 'MobileComments',
|
|
73
|
+
},
|
|
74
|
+
'[!TIP]': {
|
|
75
|
+
color: 'success',
|
|
76
|
+
icon: 'Star',
|
|
77
|
+
},
|
|
78
|
+
'[!WARNING]': {
|
|
79
|
+
color: 'warning',
|
|
80
|
+
icon: 'ExclamationTriangle',
|
|
81
|
+
},
|
|
82
|
+
'[!DANGER]': {
|
|
83
|
+
color: 'danger',
|
|
84
|
+
icon: 'Bug',
|
|
85
|
+
},
|
|
86
|
+
}
|
|
87
|
+
return style[blockRule]
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const dictionary = {
|
|
91
|
+
en: {
|
|
92
|
+
'[!NOTE]': 'Note',
|
|
93
|
+
'[!INFO]': 'Info',
|
|
94
|
+
'[!IMPORTANT]': 'Important',
|
|
95
|
+
'[!TIP]': 'Tip',
|
|
96
|
+
'[!WARNING]xw': 'Warning',
|
|
97
|
+
'[!DANGER]': 'Danger',
|
|
98
|
+
},
|
|
99
|
+
pt: {
|
|
100
|
+
'[!NOTE]': 'Nota',
|
|
101
|
+
'[!INFO]': 'Informação',
|
|
102
|
+
'[!IMPORTANT]': 'Importante',
|
|
103
|
+
'[!TIP]': 'Dica',
|
|
104
|
+
'[!WARNING]': 'Atenção',
|
|
105
|
+
'[!DANGER]': 'Risco',
|
|
106
|
+
},
|
|
107
|
+
} satisfies Dictionary
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { Box, Flex, Text } from '@citric/core'
|
|
2
|
+
import { getColor, getRadius } from '@citric/core/dist/utils/theme'
|
|
3
|
+
import { Copy, Refresh } from '@citric/icons'
|
|
4
|
+
import { IconButton } from '@citric/ui'
|
|
5
|
+
import { theme } from '@stack-spot/portal-theme'
|
|
6
|
+
import { useTranslate } from '@stack-spot/portal-translate'
|
|
7
|
+
import SyntaxHighlighter from 'react-syntax-highlighter'
|
|
8
|
+
import styled from 'styled-components'
|
|
9
|
+
|
|
10
|
+
const style = {
|
|
11
|
+
scrollable: {
|
|
12
|
+
minHeight: '64px',
|
|
13
|
+
maxHeight: '232px',
|
|
14
|
+
overflow: 'auto',
|
|
15
|
+
'&::-webkit-scrollbar': {
|
|
16
|
+
width: '4px',
|
|
17
|
+
height: '4px',
|
|
18
|
+
},
|
|
19
|
+
'&::-webkit-scrollbar-track': {
|
|
20
|
+
background: 'light.400',
|
|
21
|
+
borderRadius: '2px',
|
|
22
|
+
},
|
|
23
|
+
'&::-webkit-scrollbar-thumb': {
|
|
24
|
+
background: 'light.700',
|
|
25
|
+
borderRadius: '2px',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const Wrapper = styled(Box)`
|
|
31
|
+
background-color: ${theme.color.gray[900]};
|
|
32
|
+
border-radius: ${({ theme }) => getRadius(theme as any, 'xs')};
|
|
33
|
+
position: relative;
|
|
34
|
+
padding: 8px;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
|
|
37
|
+
> .scrollable-container {
|
|
38
|
+
min-height: 64px;
|
|
39
|
+
max-height: 232px;
|
|
40
|
+
overflow: auto;
|
|
41
|
+
&::-webkit-scrollbar {
|
|
42
|
+
width: 4px;
|
|
43
|
+
height: 4px;
|
|
44
|
+
}
|
|
45
|
+
&::-webkit-scrollbar-track {
|
|
46
|
+
background: ${theme.color.light[400]};
|
|
47
|
+
border-radius: 2px;
|
|
48
|
+
}
|
|
49
|
+
&::-webkit-scrollbar-thumb,
|
|
50
|
+
&::-webkit-scrollbar-thumb:hover {
|
|
51
|
+
background: ${theme.color.light[700]};
|
|
52
|
+
border-radius: 2px;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
pre {
|
|
57
|
+
background-color: transparent;
|
|
58
|
+
font-family: 'Roboto Mono';
|
|
59
|
+
font-size: 14.4px;
|
|
60
|
+
padding: 0;
|
|
61
|
+
margin-top: 0;
|
|
62
|
+
overflow: unset;
|
|
63
|
+
text-shadow: none;
|
|
64
|
+
color: ${theme.color.gray[50]};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.hljs-string {
|
|
68
|
+
color: ${theme.color.teal[300]};
|
|
69
|
+
}
|
|
70
|
+
.hljs-tag {
|
|
71
|
+
color: ${({ theme }) => getColor(theme as any, 'teal')};
|
|
72
|
+
}
|
|
73
|
+
.hljs-attr {
|
|
74
|
+
color: ${theme.color.gray[50]};
|
|
75
|
+
}
|
|
76
|
+
.hljs-number {
|
|
77
|
+
color: ${theme.color.gray[300]};
|
|
78
|
+
}
|
|
79
|
+
.hljs-property {
|
|
80
|
+
color: ${theme.color.gray[50]};
|
|
81
|
+
}
|
|
82
|
+
.hljs-keyword {
|
|
83
|
+
color: ${theme.color.blue[200]};
|
|
84
|
+
}
|
|
85
|
+
.comment {
|
|
86
|
+
color: ${theme.color.gray[400]};
|
|
87
|
+
}
|
|
88
|
+
.hljs-expression {
|
|
89
|
+
color: ${theme.color.orange[400]};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.button-group {
|
|
93
|
+
position: absolute;
|
|
94
|
+
top: 8px;
|
|
95
|
+
right: 24px;
|
|
96
|
+
display: flex;
|
|
97
|
+
|
|
98
|
+
button {
|
|
99
|
+
margin-left: 6px;
|
|
100
|
+
&:focus {
|
|
101
|
+
background-color: ${({ theme }) => getColor(theme as any, 'light.300')};
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
`
|
|
106
|
+
|
|
107
|
+
interface Props {
|
|
108
|
+
language: string,
|
|
109
|
+
data: string,
|
|
110
|
+
onClickRefresh?: () => void,
|
|
111
|
+
height?: string,
|
|
112
|
+
scrollable?: boolean,
|
|
113
|
+
copyButton?: boolean,
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* CodeViewer component that displays code with syntax highlighting based on application theme and optional copy and refresh buttons.
|
|
118
|
+
*
|
|
119
|
+
* @param options the props for rendering the component: {@link Props}.
|
|
120
|
+
*/
|
|
121
|
+
export const CodeViewer = ({ language, data, onClickRefresh, scrollable = true, copyButton }: Props) => {
|
|
122
|
+
const t = useTranslate(codeViewerLocale)
|
|
123
|
+
|
|
124
|
+
return (
|
|
125
|
+
<Wrapper>
|
|
126
|
+
{data ? (
|
|
127
|
+
<>
|
|
128
|
+
<Flex style={scrollable ? style.scrollable : undefined}>
|
|
129
|
+
<SyntaxHighlighter language={language} showLineNumbers useInlineStyles={false}>
|
|
130
|
+
{String(data).replace(/\n$/, '')}
|
|
131
|
+
</SyntaxHighlighter>
|
|
132
|
+
</Flex>
|
|
133
|
+
<div className="button-group">
|
|
134
|
+
{onClickRefresh && (
|
|
135
|
+
<IconButton onClick={onClickRefresh}>
|
|
136
|
+
<Refresh />
|
|
137
|
+
</IconButton>
|
|
138
|
+
)}
|
|
139
|
+
|
|
140
|
+
{copyButton ? (
|
|
141
|
+
<IconButton onClick={() => navigator.clipboard.writeText(data)}>
|
|
142
|
+
<Copy />
|
|
143
|
+
</IconButton>
|
|
144
|
+
) : null}
|
|
145
|
+
</div>
|
|
146
|
+
</>
|
|
147
|
+
) : (
|
|
148
|
+
<Text appearance="body2">{t.noData}</Text>
|
|
149
|
+
)}
|
|
150
|
+
</Wrapper>
|
|
151
|
+
)
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export const codeViewerLocale = {
|
|
155
|
+
en: {
|
|
156
|
+
noData: 'No data available.',
|
|
157
|
+
},
|
|
158
|
+
pt: {
|
|
159
|
+
noData: 'Sem dados disponíveis.',
|
|
160
|
+
},
|
|
161
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { Box, Image, Link, Text } from '@citric/core'
|
|
2
|
+
import { SxProp } from '@citric/core/dist/component-style'
|
|
3
|
+
import { Table, Tbody, Td, Th, Thead, Tr } from '@citric/ui'
|
|
4
|
+
import ReactMarkdown, { Components } from 'react-markdown'
|
|
5
|
+
import rehypeRaw from 'rehype-raw'
|
|
6
|
+
import remarkBreaks from 'remark-breaks'
|
|
7
|
+
import remarkGfm from 'remark-gfm'
|
|
8
|
+
import { BlockquoteMd } from './BlockquoteMd'
|
|
9
|
+
import { CodeViewer } from './CodeViewer'
|
|
10
|
+
import { Video } from './Video'
|
|
11
|
+
|
|
12
|
+
interface MarkdownProps {
|
|
13
|
+
/**
|
|
14
|
+
* The markdown content to be rendered.
|
|
15
|
+
*/
|
|
16
|
+
children: string,
|
|
17
|
+
/**
|
|
18
|
+
* The markdown components to be rendered.
|
|
19
|
+
*/
|
|
20
|
+
components?: Components,
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const styles: Record<string, SxProp | Record<string, SxProp>> = {
|
|
24
|
+
title: {
|
|
25
|
+
mb: 3,
|
|
26
|
+
},
|
|
27
|
+
boxContainer: {
|
|
28
|
+
position: 'relative',
|
|
29
|
+
bg: 'light.300',
|
|
30
|
+
borderRadius: 'sm',
|
|
31
|
+
mb: 10,
|
|
32
|
+
},
|
|
33
|
+
table: {
|
|
34
|
+
borderRadius: 'xs',
|
|
35
|
+
},
|
|
36
|
+
customScroll: {
|
|
37
|
+
height: '232px',
|
|
38
|
+
overflow: 'auto',
|
|
39
|
+
'&::-webkit-scrollbar': {
|
|
40
|
+
width: '2px',
|
|
41
|
+
},
|
|
42
|
+
'&::-webkit-scrollbar-track': {
|
|
43
|
+
background: 'light.400',
|
|
44
|
+
},
|
|
45
|
+
'&::-webkit-scrollbar-thumb': {
|
|
46
|
+
background: 'primary.500',
|
|
47
|
+
},
|
|
48
|
+
'&::-webkit-scrollbar-thumb:hover': {
|
|
49
|
+
background: 'primary.500',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
refreshButton: {
|
|
53
|
+
position: 'absolute',
|
|
54
|
+
top: '8px',
|
|
55
|
+
right: '48px',
|
|
56
|
+
},
|
|
57
|
+
copyButton: {
|
|
58
|
+
position: 'absolute',
|
|
59
|
+
top: '8px',
|
|
60
|
+
right: '16px',
|
|
61
|
+
},
|
|
62
|
+
code: {
|
|
63
|
+
bg: 'blue.900',
|
|
64
|
+
color: 'blue.100',
|
|
65
|
+
px: 1,
|
|
66
|
+
py: 1,
|
|
67
|
+
borderRadius: 'xs',
|
|
68
|
+
},
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Custom components for rendering markdown elements.
|
|
73
|
+
*/
|
|
74
|
+
const component = () => ({
|
|
75
|
+
p: (props: any) => <Text appearance="body2" {...props} />,
|
|
76
|
+
strong: (props: any) => <Text weight="bold" colorScheme="light.700" as="strong" {...props} />,
|
|
77
|
+
h1: (props: any) => <Text as="h1" appearance="h2" gutterBottom {...props} sx={styles.title} />,
|
|
78
|
+
h2: (props: any) => <Text as="h2" appearance="h3" gutterBottom {...props} sx={styles.title} />,
|
|
79
|
+
h3: (props: any) => <Text as="h3" appearance="h4" gutterBottom {...props} sx={styles.title} />,
|
|
80
|
+
h4: (props: any) => <Text as="h4" appearance="h5" gutterBottom {...props} sx={styles.title} />,
|
|
81
|
+
a: (props: any) => <Link colorScheme="primary" {...props} target="_blank" />,
|
|
82
|
+
table: (props: any) => <Table appearance="striped" {...props} sx={styles.table} />,
|
|
83
|
+
thead: (props: any) => <Thead {...props} />,
|
|
84
|
+
tbody: (props: any) => <Tbody {...props} />,
|
|
85
|
+
tr: (props: any) => <Tr {...props} />,
|
|
86
|
+
td: (props: any) => <Td {...props} />,
|
|
87
|
+
th: (props: any) => <Th {...props} />,
|
|
88
|
+
li: (props: any) => <Text as="li" appearance="body2" colorScheme="light.700" {...props} />,
|
|
89
|
+
br: (props: any) => <Box my={5} {...props} />,
|
|
90
|
+
blockquote: (props: any) => <BlockquoteMd {...{ props }} />,
|
|
91
|
+
video: (props: any) => <Video {...props} />,
|
|
92
|
+
img: (props: any) => <Image {...props} />,
|
|
93
|
+
pre(props: any) {
|
|
94
|
+
const propComp = props.children.props
|
|
95
|
+
const match = /language-(\w+)/.exec(propComp.className || '')
|
|
96
|
+
const inferredLanguage = match && match.length > 1 ? match[1] : undefined
|
|
97
|
+
|
|
98
|
+
return (
|
|
99
|
+
<Box sx={{ ...styles.boxContainer }}>
|
|
100
|
+
<CodeViewer language={inferredLanguage} {...propComp} data={propComp.children} />
|
|
101
|
+
</Box>
|
|
102
|
+
)
|
|
103
|
+
},
|
|
104
|
+
code: ({ ...props }: any) =>
|
|
105
|
+
<Text as="code" sx={styles.code} {...props}>
|
|
106
|
+
{props.children}
|
|
107
|
+
</Text>,
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Renders a component that provides markdown content visualization using citric components.
|
|
112
|
+
*
|
|
113
|
+
* @param options the props for rendering the component: {@link MarkdownProps}.
|
|
114
|
+
*/
|
|
115
|
+
const Markdown = ({ children, components }: MarkdownProps) => (
|
|
116
|
+
<ReactMarkdown rehypePlugins={[rehypeRaw]} remarkPlugins={[remarkGfm, remarkBreaks]} components={{ ...component(), ...components }}>
|
|
117
|
+
{children}
|
|
118
|
+
</ReactMarkdown>
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
// eslint-disable-next-line import/no-default-export
|
|
122
|
+
export default Markdown
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IconButton } from '@citric/ui'
|
|
2
|
+
import { ReactNode } from 'react'
|
|
3
|
+
|
|
4
|
+
interface MarkdownButtonProps {
|
|
5
|
+
/**
|
|
6
|
+
* Optional click handler for the button.
|
|
7
|
+
*/
|
|
8
|
+
onClick?: () => void,
|
|
9
|
+
/**
|
|
10
|
+
* The content to be displayed inside the button.
|
|
11
|
+
*/
|
|
12
|
+
children: ReactNode,
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Renders a component that provides an IconButton with custom styles and content.
|
|
17
|
+
*
|
|
18
|
+
* @param options the props for rendering the component: {@link MarkdownButtonProps}.
|
|
19
|
+
*/
|
|
20
|
+
export const MarkdownButton = ({ ...props }: MarkdownButtonProps) => (
|
|
21
|
+
<IconButton sx={{ position: 'absolute', top: '16px', right: '16px' }} onClick={props.onClick}>
|
|
22
|
+
{props.children}
|
|
23
|
+
</IconButton>
|
|
24
|
+
)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Video component that renders an iframe with the given source URL.
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} props - The props for the Video component.
|
|
5
|
+
* @param {string} props.children - The URL to be used as the source of the iframe.
|
|
6
|
+
* @returns {JSX.Element} The rendered iframe element.
|
|
7
|
+
*/
|
|
8
|
+
export const Video = ({ children }: { children: string }) => (
|
|
9
|
+
<iframe
|
|
10
|
+
src={children}
|
|
11
|
+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
|
12
|
+
/>
|
|
13
|
+
)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Skeleton } from '@citric/ui'
|
|
2
|
+
import { Suspense, lazy } from 'react'
|
|
3
|
+
import { Components } from 'react-markdown'
|
|
4
|
+
import { MarkdownButton } from './MarkdownButton'
|
|
5
|
+
|
|
6
|
+
const Markdown = lazy(() => import('./Markdown'))
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
children: string,
|
|
10
|
+
language?: string,
|
|
11
|
+
components?: Components,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const LazyMarkdown = ({ children, components }: Props) => (
|
|
15
|
+
<Suspense fallback={<Skeleton />}>
|
|
16
|
+
<Markdown components={components}>{children}</Markdown>
|
|
17
|
+
</Suspense>
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
export { LazyMarkdown, MarkdownButton }
|
|
21
|
+
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { Box, Flex, Text } from '@citric/core'
|
|
2
|
+
import { AsProp } from '@citric/core/dist/forward-ref-as'
|
|
3
|
+
import { SxProperties } from '@citric/core/dist/sx'
|
|
4
|
+
import { Card, CardContent } from '@citric/ui'
|
|
5
|
+
import { Dictionary, useTranslate } from '@stack-spot/portal-translate'
|
|
6
|
+
import { GenericPlaceholder, GenericPlaceholderCentered } from '../svg'
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
title?: string | React.ReactElement,
|
|
10
|
+
description?: string | React.ReactElement,
|
|
11
|
+
img?: React.ReactElement,
|
|
12
|
+
button?: React.ReactElement | null,
|
|
13
|
+
show?: boolean,
|
|
14
|
+
fullWidth?: boolean,
|
|
15
|
+
sx?: SxProperties,
|
|
16
|
+
sxCard?: SxProperties,
|
|
17
|
+
style?: React.CSSProperties,
|
|
18
|
+
className?: string,
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface PropsCallToAction extends Props {
|
|
22
|
+
subDescription?: string,
|
|
23
|
+
titleAs?: AsProp,
|
|
24
|
+
placeholderImageConfig?: {
|
|
25
|
+
width?: string,
|
|
26
|
+
height?: string,
|
|
27
|
+
style?: React.CSSProperties,
|
|
28
|
+
},
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const Placeholder = ({ title, description, button, img, fullWidth, show = true, sx, style, className }: Props) => {
|
|
32
|
+
if (!show) {
|
|
33
|
+
return null
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<Card sx={{ ...(fullWidth ? { w: '100%' } : {}) }} style={style} className={className}>
|
|
38
|
+
<Flex alignItems="center" justifyContent="center" py={15} sx={{ gap: '20px', ...sx }}>
|
|
39
|
+
<Box sx={{ justifySelf: 'end' }}>{img ?? <GenericPlaceholder />}</Box>
|
|
40
|
+
<Box>
|
|
41
|
+
{title && <Text as="label" appearance="h4" mb="3" pt={5}>
|
|
42
|
+
{title}
|
|
43
|
+
</Text>}
|
|
44
|
+
|
|
45
|
+
<Text mb="3" appearance="body2" colorScheme="light.700">
|
|
46
|
+
{description}
|
|
47
|
+
</Text>
|
|
48
|
+
|
|
49
|
+
{button}
|
|
50
|
+
</Box>
|
|
51
|
+
</Flex>
|
|
52
|
+
</Card>
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const PlaceholderCallToAction = ({
|
|
57
|
+
title,
|
|
58
|
+
description,
|
|
59
|
+
subDescription,
|
|
60
|
+
img,
|
|
61
|
+
button,
|
|
62
|
+
fullWidth,
|
|
63
|
+
show = true,
|
|
64
|
+
sx,
|
|
65
|
+
sxCard,
|
|
66
|
+
style,
|
|
67
|
+
className,
|
|
68
|
+
titleAs,
|
|
69
|
+
placeholderImageConfig,
|
|
70
|
+
}: PropsCallToAction) => {
|
|
71
|
+
if (!show) {
|
|
72
|
+
return null
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<Card sx={{ w: fullWidth ? '100%' : 'auto', bg: 'transparent', ...sxCard }} style={style} className={className}>
|
|
77
|
+
<CardContent
|
|
78
|
+
as={Flex}
|
|
79
|
+
sx={{ justifyContent: 'center', alignItems: 'center', gap: '16px', ...sx }}
|
|
80
|
+
>
|
|
81
|
+
<Box>{img ?? <GenericPlaceholderCentered {...placeholderImageConfig} />}</Box>
|
|
82
|
+
|
|
83
|
+
<Box>
|
|
84
|
+
{title && <Text as={titleAs} appearance="h4" mb="3" aria-live="assertive">
|
|
85
|
+
{title}
|
|
86
|
+
</Text>}
|
|
87
|
+
|
|
88
|
+
<Text mb="3" appearance="body2" colorScheme="light.700">
|
|
89
|
+
{description}
|
|
90
|
+
</Text>
|
|
91
|
+
|
|
92
|
+
<Text mb="3" appearance="body2" colorScheme="light.700">
|
|
93
|
+
{subDescription}
|
|
94
|
+
</Text>
|
|
95
|
+
|
|
96
|
+
{button}
|
|
97
|
+
</Box>
|
|
98
|
+
</CardContent>
|
|
99
|
+
</Card>
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
export const PlaceholderResourceEmptySearch = ({ title, description }: Pick<Props, 'title' | 'description'>) => {
|
|
105
|
+
const t = useTranslate(dictionary)
|
|
106
|
+
|
|
107
|
+
return (
|
|
108
|
+
<PlaceholderCallToAction fullWidth={true}
|
|
109
|
+
title={title || t.title} description={description || t.description}
|
|
110
|
+
/>
|
|
111
|
+
)
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const dictionary = {
|
|
115
|
+
en: {
|
|
116
|
+
title: 'Sorry, your search did not match any results.',
|
|
117
|
+
description: 'Please, refine your search and try again.',
|
|
118
|
+
},
|
|
119
|
+
pt: {
|
|
120
|
+
title: 'Desculpe, sua busca não encontrou nenhum resultado.',
|
|
121
|
+
description: 'Por favor, refine sua busca e tente novamente.',
|
|
122
|
+
},
|
|
123
|
+
} satisfies Dictionary
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { OneOfColorSchemesWithVariants, OneOfPalettesWithVariants } from '@citric/core'
|
|
2
|
+
import { getColor } from '@citric/core/dist/utils/theme'
|
|
3
|
+
import { styled } from 'styled-components'
|
|
4
|
+
|
|
5
|
+
type Color = OneOfColorSchemesWithVariants | OneOfPalettesWithVariants
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
/**
|
|
9
|
+
* By default, the ScrollView scrolls in both directions
|
|
10
|
+
*/
|
|
11
|
+
direction?: 'horizontal' | 'vertical' | 'both',
|
|
12
|
+
/**
|
|
13
|
+
* The color of the track in the scroll bar (background)
|
|
14
|
+
* light.400 by default
|
|
15
|
+
*/
|
|
16
|
+
trackColor?: Color,
|
|
17
|
+
/**
|
|
18
|
+
* The color of the thumb in the scroll bar (foreground)
|
|
19
|
+
* light.700 by default
|
|
20
|
+
*/
|
|
21
|
+
thumbColor?: Color,
|
|
22
|
+
/**
|
|
23
|
+
* `auto` to show the scroll-bar only when the content overflows. `scroll` to always show it.
|
|
24
|
+
* `auto` by default
|
|
25
|
+
*/
|
|
26
|
+
scrollType?: 'auto' | 'scroll',
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function getDirectionStyle({ direction = 'both', scrollType = 'auto' }: Props) {
|
|
30
|
+
const x = direction === 'both' || direction === 'horizontal' ? `overflow-x: ${scrollType};` : ''
|
|
31
|
+
const y = direction === 'both' || direction === 'vertical' ? `overflow-x: ${scrollType};` : ''
|
|
32
|
+
return `${x}${y}`
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Renders a component that provides scrolling.
|
|
37
|
+
*
|
|
38
|
+
* @param options the props for rendering the component: {@link Props}.
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
export const ScrollView = styled.div<Props>`
|
|
42
|
+
${getDirectionStyle}
|
|
43
|
+
&::-webkit-scrollbar {
|
|
44
|
+
width: 4px;
|
|
45
|
+
height: 4px;
|
|
46
|
+
}
|
|
47
|
+
&::-webkit-scrollbar-track {
|
|
48
|
+
background: ${({ theme, trackColor = 'light.400' }) => getColor(theme, trackColor)};
|
|
49
|
+
border-radius: 2px;
|
|
50
|
+
left: 40px;
|
|
51
|
+
}
|
|
52
|
+
&::-webkit-scrollbar-thumb,
|
|
53
|
+
&::-webkit-scrollbar-thumb:hover {
|
|
54
|
+
background: ${({ theme, thumbColor = 'light.700' }) => getColor(theme, thumbColor)};
|
|
55
|
+
border-radius: 2px;
|
|
56
|
+
}
|
|
57
|
+
`
|
|
@@ -0,0 +1,58 @@
|
|
|
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 { MouseEvent } from 'react'
|
|
6
|
+
import { components, GroupBase, MultiValueProps } from 'react-select'
|
|
7
|
+
import { CreatableSelectOptionType } from './types'
|
|
8
|
+
|
|
9
|
+
export const BadgeItem = (props: MultiValueProps<CreatableSelectOptionType, boolean, GroupBase<any>>) => {
|
|
10
|
+
const t = useTranslate(dictionary)
|
|
11
|
+
|
|
12
|
+
const handleClick = <T extends HTMLElement>(event: MouseEvent<T>) => {
|
|
13
|
+
props.removeProps.onClick?.(event as unknown as MouseEvent<HTMLDivElement>)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<components.MultiValue {...props}>
|
|
18
|
+
<Badge
|
|
19
|
+
appearance="square"
|
|
20
|
+
className="badge"
|
|
21
|
+
palette="cyan"
|
|
22
|
+
sx={{ mb: 2,
|
|
23
|
+
'.badge-citric-container:not(:has(> button:first-child))': {
|
|
24
|
+
marginRight: 0,
|
|
25
|
+
},
|
|
26
|
+
} as SxProperties}
|
|
27
|
+
afterElement={
|
|
28
|
+
<components.MultiValueRemove {...props}>
|
|
29
|
+
<IconButton
|
|
30
|
+
type="button"
|
|
31
|
+
aria-label={interpolate(t.ariaLabelRemoveItemButton, props.children)}
|
|
32
|
+
colorIcon="cyan.800"
|
|
33
|
+
appearance="square"
|
|
34
|
+
onClick={(e) => {
|
|
35
|
+
e.stopPropagation()
|
|
36
|
+
handleClick(e)
|
|
37
|
+
}}
|
|
38
|
+
>
|
|
39
|
+
<TimesMini />
|
|
40
|
+
</IconButton>
|
|
41
|
+
</components.MultiValueRemove>
|
|
42
|
+
}
|
|
43
|
+
>
|
|
44
|
+
{props.children}
|
|
45
|
+
</Badge>
|
|
46
|
+
</components.MultiValue>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const dictionary = {
|
|
51
|
+
en: {
|
|
52
|
+
ariaLabelRemoveItemButton: 'Remove item $0',
|
|
53
|
+
},
|
|
54
|
+
pt: {
|
|
55
|
+
ariaLabelRemoveItemButton: 'Remover item $0',
|
|
56
|
+
},
|
|
57
|
+
} satisfies Dictionary
|
|
58
|
+
|