@nlabs/gothamui 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/MIGRATION.md +36 -0
- package/README.md +768 -0
- package/docs/assets/gothamui-app-architecture.svg +159 -0
- package/docs/assets/gothamui-logo.png +0 -0
- package/docs/assets/gothamui-logo.svg +42 -0
- package/docs/render-performance.md +34 -0
- package/lib/actions/GothamActions.d.ts +42 -0
- package/lib/actions/GothamActions.js +67 -0
- package/lib/actions/MarkdownActions.d.ts +4 -0
- package/lib/actions/MarkdownActions.js +48 -0
- package/lib/app.d.ts +1 -0
- package/lib/app.js +198 -0
- package/lib/components/Alert/Alert.d.ts +8 -0
- package/lib/components/Alert/Alert.js +24 -0
- package/lib/components/Alert/Alert.stories.js +59 -0
- package/lib/components/AuthRoute/AuthRoute.d.ts +3 -0
- package/lib/components/AuthRoute/AuthRoute.js +21 -0
- package/lib/components/AuthRoute/AuthRoute.stories.js +45 -0
- package/lib/components/AutocompleteField/AutocompleteField.d.ts +24 -0
- package/lib/components/AutocompleteField/AutocompleteField.js +148 -0
- package/lib/components/AutocompleteField/AutocompleteField.stories.js +62 -0
- package/lib/components/Avatar/Avatar.d.ts +29 -0
- package/lib/components/Avatar/Avatar.js +154 -0
- package/lib/components/Avatar/Avatar.stories.js +105 -0
- package/lib/components/Badge/Badge.d.ts +9 -0
- package/lib/components/Badge/Badge.js +22 -0
- package/lib/components/Badge/Badge.stories.js +53 -0
- package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +19 -0
- package/lib/components/Breadcrumbs/Breadcrumbs.js +74 -0
- package/lib/components/Breadcrumbs/Breadcrumbs.stories.js +95 -0
- package/lib/components/Button/Button.d.ts +25 -0
- package/lib/components/Button/Button.js +157 -0
- package/lib/components/Button/Button.stories.js +119 -0
- package/lib/components/Card/Card.d.ts +8 -0
- package/lib/components/Card/Card.js +39 -0
- package/lib/components/Card/Card.stories.js +60 -0
- package/lib/components/CategoryGrid/CategoryGrid.d.ts +15 -0
- package/lib/components/CategoryGrid/CategoryGrid.js +42 -0
- package/lib/components/CategoryGrid/CategoryGrid.stories.js +35 -0
- package/lib/components/Chat/AudioMessage/AudioMessage.css +1 -0
- package/lib/components/Chat/AudioMessage/AudioMessage.d.ts +3 -0
- package/lib/components/Chat/AudioMessage/AudioMessage.js +28 -0
- package/lib/components/Chat/Avatar/Avatar.css +1 -0
- package/lib/components/Chat/Avatar/Avatar.d.ts +3 -0
- package/lib/components/Chat/Avatar/Avatar.js +72 -0
- package/lib/components/Chat/Button/Button.css +1 -0
- package/lib/components/Chat/Button/Button.d.ts +3 -0
- package/lib/components/Chat/Button/Button.js +37 -0
- package/lib/components/Chat/Chat.stories.js +688 -0
- package/lib/components/Chat/ChatItem/ChatItem.css +1 -0
- package/lib/components/Chat/ChatItem/ChatItem.d.ts +3 -0
- package/lib/components/Chat/ChatItem/ChatItem.js +183 -0
- package/lib/components/Chat/ChatList/ChatList.css +1 -0
- package/lib/components/Chat/ChatList/ChatList.d.ts +3 -0
- package/lib/components/Chat/ChatList/ChatList.js +84 -0
- package/lib/components/Chat/Circle/Circle.d.ts +3 -0
- package/lib/components/Chat/Circle/Circle.js +27 -0
- package/lib/components/Chat/Dropdown/Dropdown.css +1 -0
- package/lib/components/Chat/Dropdown/Dropdown.d.ts +3 -0
- package/lib/components/Chat/Dropdown/Dropdown.js +66 -0
- package/lib/components/Chat/FileMessage/FileMessage.css +1 -0
- package/lib/components/Chat/FileMessage/FileMessage.d.ts +3 -0
- package/lib/components/Chat/FileMessage/FileMessage.js +77 -0
- package/lib/components/Chat/Input/Input.css +1 -0
- package/lib/components/Chat/Input/Input.d.ts +3 -0
- package/lib/components/Chat/Input/Input.js +108 -0
- package/lib/components/Chat/LocationMessage/LocationMessage.css +1 -0
- package/lib/components/Chat/LocationMessage/LocationMessage.d.ts +3 -0
- package/lib/components/Chat/LocationMessage/LocationMessage.js +36 -0
- package/lib/components/Chat/MeetingItem/MeetingItem.css +1 -0
- package/lib/components/Chat/MeetingItem/MeetingItem.d.ts +3 -0
- package/lib/components/Chat/MeetingItem/MeetingItem.js +106 -0
- package/lib/components/Chat/MeetingLink/MeetingLink.css +1 -0
- package/lib/components/Chat/MeetingLink/MeetingLink.d.ts +3 -0
- package/lib/components/Chat/MeetingLink/MeetingLink.js +26 -0
- package/lib/components/Chat/MeetingList/MeetingList.css +1 -0
- package/lib/components/Chat/MeetingList/MeetingList.d.ts +3 -0
- package/lib/components/Chat/MeetingList/MeetingList.js +52 -0
- package/lib/components/Chat/MeetingMessage/MeetingMessage.css +1 -0
- package/lib/components/Chat/MeetingMessage/MeetingMessage.d.ts +3 -0
- package/lib/components/Chat/MeetingMessage/MeetingMessage.js +227 -0
- package/lib/components/Chat/MessageBox/MessageBox.css +1 -0
- package/lib/components/Chat/MessageBox/MessageBox.d.ts +3 -0
- package/lib/components/Chat/MessageBox/MessageBox.js +263 -0
- package/lib/components/Chat/MessageList/MessageList.css +1 -0
- package/lib/components/Chat/MessageList/MessageList.d.ts +2 -0
- package/lib/components/Chat/MessageList/MessageList.js +196 -0
- package/lib/components/Chat/Navbar/Navbar.css +1 -0
- package/lib/components/Chat/Navbar/Navbar.d.ts +3 -0
- package/lib/components/Chat/Navbar/Navbar.js +21 -0
- package/lib/components/Chat/PhotoMessage/PhotoMessage.css +1 -0
- package/lib/components/Chat/PhotoMessage/PhotoMessage.d.ts +3 -0
- package/lib/components/Chat/PhotoMessage/PhotoMessage.js +73 -0
- package/lib/components/Chat/Popup/Popup.css +1 -0
- package/lib/components/Chat/Popup/Popup.d.ts +3 -0
- package/lib/components/Chat/Popup/Popup.js +45 -0
- package/lib/components/Chat/README.md +50 -0
- package/lib/components/Chat/ReplyMessage/ReplyMessage.css +1 -0
- package/lib/components/Chat/ReplyMessage/ReplyMessage.d.ts +3 -0
- package/lib/components/Chat/ReplyMessage/ReplyMessage.js +42 -0
- package/lib/components/Chat/SideBar/SideBar.css +1 -0
- package/lib/components/Chat/SideBar/SideBar.d.ts +3 -0
- package/lib/components/Chat/SideBar/SideBar.js +21 -0
- package/lib/components/Chat/SpotifyMessage/SpotifyMessage.css +1 -0
- package/lib/components/Chat/SpotifyMessage/SpotifyMessage.d.ts +3 -0
- package/lib/components/Chat/SpotifyMessage/SpotifyMessage.js +28 -0
- package/lib/components/Chat/SystemMessage/SystemMessage.css +1 -0
- package/lib/components/Chat/SystemMessage/SystemMessage.d.ts +3 -0
- package/lib/components/Chat/SystemMessage/SystemMessage.js +14 -0
- package/lib/components/Chat/VideoMessage/VideoMessage.css +1 -0
- package/lib/components/Chat/VideoMessage/VideoMessage.d.ts +3 -0
- package/lib/components/Chat/VideoMessage/VideoMessage.js +88 -0
- package/lib/components/Chat/assets/img/leftArrow.svg +6 -0
- package/lib/components/Chat/assets/img/rightArrow.svg +6 -0
- package/lib/components/Chat/index.d.ts +25 -0
- package/lib/components/Chat/index.js +27 -0
- package/lib/components/Chat/type.d.js +52 -0
- package/lib/components/Chat/utils/formatRelativeDate.d.ts +4 -0
- package/lib/components/Chat/utils/formatRelativeDate.js +110 -0
- package/lib/components/Checkbox/Checkbox.d.ts +15 -0
- package/lib/components/Checkbox/Checkbox.js +106 -0
- package/lib/components/Checkbox/Checkbox.stories.js +51 -0
- package/lib/components/ComponentUtils/renderWithAsChild.d.ts +9 -0
- package/lib/components/ComponentUtils/renderWithAsChild.js +27 -0
- package/lib/components/Container/Container.d.ts +7 -0
- package/lib/components/Container/Container.js +16 -0
- package/lib/components/Container/Container.stories.js +36 -0
- package/lib/components/DateField/DateField.d.ts +22 -0
- package/lib/components/DateField/DateField.js +145 -0
- package/lib/components/DateField/DateField.stories.js +125 -0
- package/lib/components/DateField/DatePicker.d.ts +9 -0
- package/lib/components/DateField/DatePicker.js +205 -0
- package/lib/components/DateField/DatePicker.stories.js +33 -0
- package/lib/components/DescriptionList/DescriptionList.d.ts +4 -0
- package/lib/components/DescriptionList/DescriptionList.js +19 -0
- package/lib/components/DescriptionList/DescriptionList.stories.js +34 -0
- package/lib/components/Dialog/Dialog.d.ts +25 -0
- package/lib/components/Dialog/Dialog.js +66 -0
- package/lib/components/Dialog/Dialog.stories.js +88 -0
- package/lib/components/DropUpload/DropUpload.d.ts +37 -0
- package/lib/components/DropUpload/DropUpload.js +323 -0
- package/lib/components/DropUpload/DropUpload.stories.js +48 -0
- package/lib/components/Empty/Empty.d.ts +11 -0
- package/lib/components/Empty/Empty.js +39 -0
- package/lib/components/Empty/Empty.stories.js +52 -0
- package/lib/components/EmptyState/EmptyState.d.ts +15 -0
- package/lib/components/EmptyState/EmptyState.js +44 -0
- package/lib/components/EmptyState/EmptyState.stories.js +36 -0
- package/lib/components/ErrorMessage/ErrorMessage.d.ts +7 -0
- package/lib/components/ErrorMessage/ErrorMessage.js +20 -0
- package/lib/components/ErrorMessage/ErrorMessage.stories.js +25 -0
- package/lib/components/FaqSection/FaqSection.d.ts +14 -0
- package/lib/components/FaqSection/FaqSection.js +37 -0
- package/lib/components/FaqSection/FaqSection.stories.js +31 -0
- package/lib/components/Fieldset/Fieldset.d.ts +21 -0
- package/lib/components/Fieldset/Fieldset.js +39 -0
- package/lib/components/Fieldset/Fieldset.stories.js +42 -0
- package/lib/components/Footer/Footer.d.ts +26 -0
- package/lib/components/Footer/Footer.js +119 -0
- package/lib/components/Footer/Footer.stories.js +184 -0
- package/lib/components/Form/Form.d.ts +42 -0
- package/lib/components/Form/Form.js +198 -0
- package/lib/components/Form/Form.stories.js +65 -0
- package/lib/components/Form/FormContext.d.ts +35 -0
- package/lib/components/Form/FormContext.js +71 -0
- package/lib/components/GothamRoute/GothamRoute.d.ts +0 -0
- package/lib/components/GothamRoute/GothamRoute.js +56 -0
- package/lib/components/GothamRouter/GothamRouter.d.ts +0 -0
- package/lib/components/GothamRouter/GothamRouter.js +52 -0
- package/lib/components/Heading/Heading.d.ts +7 -0
- package/lib/components/Heading/Heading.js +20 -0
- package/lib/components/Heading/Heading.stories.js +51 -0
- package/lib/components/IncentiveGrid/IncentiveGrid.d.ts +15 -0
- package/lib/components/IncentiveGrid/IncentiveGrid.js +34 -0
- package/lib/components/IncentiveGrid/IncentiveGrid.stories.js +41 -0
- package/lib/components/InputField/InputField.d.ts +25 -0
- package/lib/components/InputField/InputField.js +68 -0
- package/lib/components/InputField/InputField.stories.js +58 -0
- package/lib/components/Item/Item.d.ts +25 -0
- package/lib/components/Item/Item.js +79 -0
- package/lib/components/Item/Item.stories.js +94 -0
- package/lib/components/Kbd/Kbd.d.ts +2 -0
- package/lib/components/Kbd/Kbd.js +9 -0
- package/lib/components/Kbd/Kbd.stories.js +24 -0
- package/lib/components/Label/Label.d.ts +11 -0
- package/lib/components/Label/Label.js +23 -0
- package/lib/components/Label/Label.stories.js +38 -0
- package/lib/components/Link/Link.d.ts +7 -0
- package/lib/components/Link/Link.js +13 -0
- package/lib/components/Link/Link.stories.js +28 -0
- package/lib/components/ListContainer/ListContainer.d.ts +8 -0
- package/lib/components/ListContainer/ListContainer.js +14 -0
- package/lib/components/ListContainer/ListContainer.stories.js +45 -0
- package/lib/components/Loader/Loader.d.ts +9 -0
- package/lib/components/Loader/Loader.js +36 -0
- package/lib/components/Loader/Loader.stories.js +94 -0
- package/lib/components/LogoCloud/LogoCloud.d.ts +15 -0
- package/lib/components/LogoCloud/LogoCloud.js +43 -0
- package/lib/components/LogoCloud/LogoCloud.stories.js +28 -0
- package/lib/components/Markdown/Markdown.d.ts +8 -0
- package/lib/components/Markdown/Markdown.js +64 -0
- package/lib/components/Markdown/Markdown.stories.js +34 -0
- package/lib/components/MediaLightbox/MediaLightbox.d.ts +22 -0
- package/lib/components/MediaLightbox/MediaLightbox.js +80 -0
- package/lib/components/MediaObject/MediaObject.d.ts +8 -0
- package/lib/components/MediaObject/MediaObject.js +37 -0
- package/lib/components/MediaObject/MediaObject.stories.js +28 -0
- package/lib/components/Navbar/Navbar.d.ts +43 -0
- package/lib/components/Navbar/Navbar.js +213 -0
- package/lib/components/Navbar/Navbar.stories.js +235 -0
- package/lib/components/NotFound/NotFound.d.ts +34 -0
- package/lib/components/NotFound/NotFound.js +351 -0
- package/lib/components/NotFound/NotFound.stories.js +80 -0
- package/lib/components/Notify/Notify.d.ts +18 -0
- package/lib/components/Notify/Notify.js +178 -0
- package/lib/components/Notify/Notify.stories.js +148 -0
- package/lib/components/Notify/NotifyExample.d.ts +1 -0
- package/lib/components/Notify/NotifyExample.js +174 -0
- package/lib/components/Notify/README.md +103 -0
- package/lib/components/Pagination/Pagination.d.ts +18 -0
- package/lib/components/Pagination/Pagination.js +225 -0
- package/lib/components/Pagination/Pagination.stories.js +69 -0
- package/lib/components/PasswordStrengthMeter/PasswordStrengthMeter.d.ts +12 -0
- package/lib/components/PasswordStrengthMeter/PasswordStrengthMeter.js +88 -0
- package/lib/components/PasswordStrengthMeter/PasswordStrengthMeter.stories.js +16 -0
- package/lib/components/PaymentMethodPanel/PaymentMethodPanel.d.ts +18 -0
- package/lib/components/PaymentMethodPanel/PaymentMethodPanel.js +113 -0
- package/lib/components/PaymentMethodPanel/PaymentMethodPanel.stories.js +88 -0
- package/lib/components/Pricing/Pricing.d.ts +78 -0
- package/lib/components/Pricing/Pricing.js +764 -0
- package/lib/components/Pricing/Pricing.stories.js +146 -0
- package/lib/components/ProductGrid/ProductGrid.d.ts +23 -0
- package/lib/components/ProductGrid/ProductGrid.js +79 -0
- package/lib/components/ProductGrid/ProductGrid.stories.js +50 -0
- package/lib/components/ProgressSteps/ProgressSteps.d.ts +13 -0
- package/lib/components/ProgressSteps/ProgressSteps.js +51 -0
- package/lib/components/ProgressSteps/ProgressSteps.stories.js +35 -0
- package/lib/components/RadioField/RadioField.d.ts +16 -0
- package/lib/components/RadioField/RadioField.js +63 -0
- package/lib/components/RadioField/RadioField.stories.js +140 -0
- package/lib/components/ReviewList/ReviewList.d.ts +15 -0
- package/lib/components/ReviewList/ReviewList.js +51 -0
- package/lib/components/ReviewList/ReviewList.stories.js +29 -0
- package/lib/components/SectionHeader/SectionHeader.d.ts +9 -0
- package/lib/components/SectionHeader/SectionHeader.js +36 -0
- package/lib/components/SectionHeader/SectionHeader.stories.js +35 -0
- package/lib/components/SelectField/SelectField.d.ts +18 -0
- package/lib/components/SelectField/SelectField.js +145 -0
- package/lib/components/SelectField/SelectField.stories.js +155 -0
- package/lib/components/SelectField/SelectOption.d.ts +13 -0
- package/lib/components/SelectField/SelectOption.js +40 -0
- package/lib/components/SelectField/SelectOption.stories.js +40 -0
- package/lib/components/Separator/Separator.d.ts +6 -0
- package/lib/components/Separator/Separator.js +13 -0
- package/lib/components/Separator/Separator.stories.js +70 -0
- package/lib/components/Skeleton/Skeleton.d.ts +2 -0
- package/lib/components/Skeleton/Skeleton.js +9 -0
- package/lib/components/Skeleton/Skeleton.stories.js +24 -0
- package/lib/components/Svg/Svg.d.ts +9 -0
- package/lib/components/Svg/Svg.js +25 -0
- package/lib/components/Svg/Svg.stories.js +34 -0
- package/lib/components/Switch/Switch.d.ts +12 -0
- package/lib/components/Switch/Switch.js +54 -0
- package/lib/components/Switch/Switch.stories.js +61 -0
- package/lib/components/Table/Table.d.ts +18 -0
- package/lib/components/Table/Table.js +99 -0
- package/lib/components/Table/Table.stories.js +79 -0
- package/lib/components/Tabs/Tabs.d.ts +17 -0
- package/lib/components/Tabs/Tabs.js +85 -0
- package/lib/components/Tabs/Tabs.stories.js +45 -0
- package/lib/components/Text/Text.d.ts +5 -0
- package/lib/components/Text/Text.js +24 -0
- package/lib/components/Text/Text.stories.js +35 -0
- package/lib/components/TextField/TextField.d.ts +31 -0
- package/lib/components/TextField/TextField.js +91 -0
- package/lib/components/TextField/TextField.stories.js +158 -0
- package/lib/components/Textarea/Textarea.d.ts +5 -0
- package/lib/components/Textarea/Textarea.js +10 -0
- package/lib/components/Textarea/Textarea.stories.js +32 -0
- package/lib/components/index.d.ts +60 -0
- package/lib/components/index.js +62 -0
- package/lib/config/appConfig.d.ts +5 -0
- package/lib/config/appConfig.js +20 -0
- package/lib/constants/AuthConstants.d.ts +8 -0
- package/lib/constants/AuthConstants.js +9 -0
- package/lib/constants/GothamConstants.d.ts +24 -0
- package/lib/constants/GothamConstants.js +25 -0
- package/lib/constants/MarkdownConstants.d.ts +8 -0
- package/lib/constants/MarkdownConstants.js +9 -0
- package/lib/constants/MessageConstants.d.ts +10 -0
- package/lib/constants/MessageConstants.js +11 -0
- package/lib/docs/analytics.md +231 -0
- package/lib/docs/api-reference.md +364 -0
- package/lib/docs/comparison.md +83 -0
- package/lib/docs/containers.md +11 -0
- package/lib/docs/gettingStarted.md +338 -0
- package/lib/docs/payments.md +79 -0
- package/lib/editor/CodeEditor.d.ts +11 -0
- package/lib/editor/CodeEditor.js +15 -0
- package/lib/editor/CodeEditor.stories.js +24 -0
- package/lib/editor/index.d.ts +1 -0
- package/lib/editor/index.js +3 -0
- package/lib/errors/UserError.d.ts +8 -0
- package/lib/errors/UserError.js +12 -0
- package/lib/examples/OptimizedFormExample.d.ts +1 -0
- package/lib/examples/OptimizedFormExample.js +130 -0
- package/lib/form/index.d.ts +11 -0
- package/lib/form/index.js +13 -0
- package/lib/hooks/useIsMobile.d.ts +1 -0
- package/lib/hooks/useIsMobile.js +12 -0
- package/lib/i18n/index.d.ts +8 -0
- package/lib/i18n/index.js +7 -0
- package/lib/icons/Dual Ring-1s-100px.svg +1 -0
- package/lib/icons/gotham-logo.svg +17 -0
- package/lib/icons/gotham.svg +8 -0
- package/lib/icons/index.d.ts +5 -0
- package/lib/icons/index.js +6 -0
- package/lib/icons/pencil.svg +6 -0
- package/lib/img/arkhamjs-logo.png +0 -0
- package/lib/img/logo.png +0 -0
- package/lib/index.d.ts +25 -0
- package/lib/index.js +25 -0
- package/lib/router/index.d.ts +5 -0
- package/lib/router/index.js +6 -0
- package/lib/stores/GothamAppStore.d.ts +35 -0
- package/lib/stores/GothamAppStore.js +70 -0
- package/lib/stories/Button.d.ts +28 -0
- package/lib/stories/Button.js +22 -0
- package/lib/stories/Header.d.ts +12 -0
- package/lib/stories/Header.js +78 -0
- package/lib/stories/Page.d.ts +3 -0
- package/lib/stories/Page.js +108 -0
- package/lib/stories/assets/accessibility.png +0 -0
- package/lib/stories/assets/accessibility.svg +5 -0
- package/lib/stories/assets/addon-library.png +0 -0
- package/lib/stories/assets/assets.png +0 -0
- package/lib/stories/assets/context.png +0 -0
- package/lib/stories/assets/discord.svg +15 -0
- package/lib/stories/assets/docs.png +0 -0
- package/lib/stories/assets/figma-plugin.png +0 -0
- package/lib/stories/assets/github.svg +3 -0
- package/lib/stories/assets/share.png +0 -0
- package/lib/stories/assets/styling.png +0 -0
- package/lib/stories/assets/testing.png +0 -0
- package/lib/stories/assets/theming.png +0 -0
- package/lib/stories/assets/tutorials.svg +12 -0
- package/lib/stories/assets/youtube.svg +4 -0
- package/lib/stories/button.css +1 -0
- package/lib/stories/header.css +1 -0
- package/lib/stories/page.css +1 -0
- package/lib/styles/chat.css +1 -0
- package/lib/styles/index.css +2 -0
- package/lib/styles/tailwind.css +1 -0
- package/lib/types/assets.d.js +2 -0
- package/lib/types/gotham.d.ts +12 -0
- package/lib/types/gotham.js +3 -0
- package/lib/types/vitest-globals.d.js +3 -0
- package/lib/utils/GothamContext.d.ts +14 -0
- package/lib/utils/GothamContext.js +14 -0
- package/lib/utils/awsRum.d.ts +23 -0
- package/lib/utils/awsRum.js +50 -0
- package/lib/utils/colorUtils.d.ts +20 -0
- package/lib/utils/colorUtils.js +499 -0
- package/lib/utils/contentUtils.d.ts +2 -0
- package/lib/utils/contentUtils.js +18 -0
- package/lib/utils/i18nUtil.d.ts +1 -0
- package/lib/utils/i18nUtil.js +7 -0
- package/lib/utils/imageUtils.d.ts +5 -0
- package/lib/utils/imageUtils.js +48 -0
- package/lib/utils/interactionAnalytics.d.ts +10 -0
- package/lib/utils/interactionAnalytics.js +142 -0
- package/lib/utils/navEventQueue.d.ts +6 -0
- package/lib/utils/navEventQueue.js +50 -0
- package/lib/utils/refUtils.d.ts +2 -0
- package/lib/utils/refUtils.js +11 -0
- package/lib/utils/routeUtils.d.ts +12 -0
- package/lib/utils/routeUtils.js +109 -0
- package/lib/utils/sizeUtils.d.ts +5 -0
- package/lib/utils/sizeUtils.js +6 -0
- package/lib/utils/storyInteractions.d.ts +6 -0
- package/lib/utils/storyInteractions.js +45 -0
- package/lib/utils/storyUtils.d.ts +1 -0
- package/lib/utils/storyUtils.js +11 -0
- package/lib/utils/testUtils.d.ts +3 -0
- package/lib/utils/testUtils.js +56 -0
- package/lib/utils/timer.d.ts +21 -0
- package/lib/utils/timer.js +38 -0
- package/lib/utils/useBreakpoint.d.ts +6 -0
- package/lib/utils/useBreakpoint.js +56 -0
- package/lib/utils/viewPerformance.d.ts +34 -0
- package/lib/utils/viewPerformance.js +103 -0
- package/lib/utils/viewUtils.d.ts +9 -0
- package/lib/utils/viewUtils.js +44 -0
- package/lib/views/AuthSignInView/AuthSignInView.d.ts +20 -0
- package/lib/views/AuthSignInView/AuthSignInView.js +107 -0
- package/lib/views/AuthSignInView/AuthSignInView.stories.js +29 -0
- package/lib/views/AuthSignUpView/AuthSignUpView.d.ts +21 -0
- package/lib/views/AuthSignUpView/AuthSignUpView.js +146 -0
- package/lib/views/AuthSignUpView/AuthSignUpView.stories.js +30 -0
- package/lib/views/AuthView/AuthView.d.ts +16 -0
- package/lib/views/AuthView/AuthView.js +60 -0
- package/lib/views/AuthView/AuthView.stories.js +34 -0
- package/lib/views/DefaultView/DefaultView.d.ts +5 -0
- package/lib/views/DefaultView/DefaultView.js +134 -0
- package/lib/views/Gotham/Gotham.d.ts +44 -0
- package/lib/views/Gotham/Gotham.js +24 -0
- package/lib/views/Gotham/Gotham.stories.js +31 -0
- package/lib/views/Gotham/GothamListeners.d.ts +0 -0
- package/lib/views/Gotham/GothamListeners.js +2 -0
- package/lib/views/Gotham/GothamProvider.d.ts +43 -0
- package/lib/views/Gotham/GothamProvider.js +217 -0
- package/lib/views/Gotham/GothamRoot.d.ts +6 -0
- package/lib/views/Gotham/GothamRoot.js +69 -0
- package/lib/views/HomeView/HomeView.d.ts +10 -0
- package/lib/views/HomeView/HomeView.js +134 -0
- package/lib/views/LoaderView/LoaderView.d.ts +8 -0
- package/lib/views/LoaderView/LoaderView.js +30 -0
- package/lib/views/MenuView/MenuView.d.ts +13 -0
- package/lib/views/MenuView/MenuView.js +305 -0
- package/lib/views/NotFoundView/NotFoundView.d.ts +2 -0
- package/lib/views/NotFoundView/NotFoundView.js +12 -0
- package/lib/views/index.d.ts +11 -0
- package/lib/views/index.js +13 -0
- package/package.json +202 -0
- package/styles/tailwind.css +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "./index.css";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RouteProps } from 'react-router';
|
|
2
|
+
export type GothamRouteData = RouteProps & {
|
|
3
|
+
readonly analytics?: {
|
|
4
|
+
readonly route?: string;
|
|
5
|
+
readonly title?: string;
|
|
6
|
+
readonly viewId: string;
|
|
7
|
+
};
|
|
8
|
+
readonly authenticate?: boolean;
|
|
9
|
+
readonly props?: any;
|
|
10
|
+
readonly children?: any;
|
|
11
|
+
readonly index?: boolean;
|
|
12
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { };
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9uaXRyb2c3L0RldmVsb3BtZW50L2dvdGhhbWpzL3NyYy90eXBlcy9nb3RoYW0udHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUge1JvdXRlUHJvcHN9IGZyb20gJ3JlYWN0LXJvdXRlcic7XG5cbmV4cG9ydCB0eXBlIEdvdGhhbVJvdXRlRGF0YSA9IFJvdXRlUHJvcHMgJiB7XG4gIHJlYWRvbmx5IGFuYWx5dGljcz86IHtcbiAgICByZWFkb25seSByb3V0ZT86IHN0cmluZztcbiAgICByZWFkb25seSB0aXRsZT86IHN0cmluZztcbiAgICByZWFkb25seSB2aWV3SWQ6IHN0cmluZztcbiAgfTtcbiAgcmVhZG9ubHkgYXV0aGVudGljYXRlPzogYm9vbGVhbjtcbiAgLy8gcmVhZG9ubHkgY29tcG9uZW50PzogYW55O1xuICAvLyByZWFkb25seSBjb250YWluZXI/OiAnZGVmYXVsdCcgfCAnbWVudSc7XG4gIC8vIHJlYWRvbmx5IGV4YWN0PzogYm9vbGVhbjtcbiAgLy8gcmVhZG9ubHkgaXNBdXRoPzogKCkgPT4gYm9vbGVhbjtcbiAgLy8gcmVhZG9ubHkgbG9jYXRpb24/OiBMb2NhdGlvbjtcbiAgLy8gcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgLy8gcmVhZG9ubHkgcGF0aD86IHN0cmluZztcblxuICByZWFkb25seSBwcm9wcz86IGFueTtcblxuICByZWFkb25seSBjaGlsZHJlbj86IGFueSA7IC8vIEdvdGhhbVJvdXRlRGF0YVtdO1xuICByZWFkb25seSBpbmRleD86IGJvb2xlYW47XG4gIC8vIHJlYWRvbmx5IHNlbnNpdGl2ZT86IGJvb2xlYW47XG4gIC8vIHJlYWRvbmx5IHN0cmljdD86IGJvb2xlYW47XG4gIC8vIHJlYWRvbmx5IHRpdGxlPzogc3RyaW5nO1xuICAvLyByZWFkb25seSB2aWV3PzogJ2NvbmZpcm0nIHwgJ2RlZmF1bHQnfCAnaG9tZScgfCAnbWFya2Rvd24nIHwgJ21lbnUnIHwgJ3NpZ25JbicgfCAnbm90Zm91bmQnO1xufTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxXQXVCRSJ9
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9uaXRyb2c3L0RldmVsb3BtZW50L2dvdGhhbWpzL3NyYy90eXBlcy92aXRlc3QtZ2xvYmFscy5kLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAnQHRlc3RpbmctbGlicmFyeS9qZXN0LWRvbSc7XG5cbmRlY2xhcmUgZ2xvYmFsIHtcbiAgY29uc3Qgdmk6IHR5cGVvZiBpbXBvcnQoJ3ZpdGVzdCcpWyd2aXRlc3QnXTtcbiAgY29uc3Qgdml0ZXN0OiB0eXBlb2YgaW1wb3J0KCd2aXRlc3QnKVsndml0ZXN0J107XG59XG5cbmV4cG9ydCB7fTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLDRCQUE0QiJ9
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2018-Present, Nitrogen Labs, Inc.
|
|
3
|
+
* Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
|
|
4
|
+
*/
|
|
5
|
+
import { type FluxFramework } from '@nlabs/arkhamjs';
|
|
6
|
+
import type { AwsRum } from './awsRum.js';
|
|
7
|
+
export interface GothamContextProps {
|
|
8
|
+
readonly awsRum?: AwsRum;
|
|
9
|
+
readonly children?: React.ReactNode;
|
|
10
|
+
readonly Flux: FluxFramework;
|
|
11
|
+
readonly isAuth?: () => boolean;
|
|
12
|
+
readonly session?: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
export declare const GothamContext: import("react").Context<GothamContextProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2018-Present, Nitrogen Labs, Inc.
|
|
3
|
+
* Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
|
|
4
|
+
*/ import { Flux } from '@nlabs/arkhamjs';
|
|
5
|
+
import { createContext } from 'react';
|
|
6
|
+
const initialContext = {
|
|
7
|
+
Flux,
|
|
8
|
+
awsRum: undefined,
|
|
9
|
+
isAuth: ()=>true,
|
|
10
|
+
session: {}
|
|
11
|
+
};
|
|
12
|
+
export const GothamContext = /*#__PURE__*/ createContext(initialContext);
|
|
13
|
+
|
|
14
|
+
//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udGV4dChpbml0aWFsQ29udGV4dCk7XG4iXSwibmFtZXMiOlsiRmx1eCIsImNyZWF0ZUNvbnRleHQiLCJpbml0aWFsQ29udGV4dCIsImF3c1J1bSIsInVuZGVmaW5lZCIsImlzQXV0aCIsInNlc3Npb24iLCJHb3RoYW1Db250ZXh0Il0sIm1hcHBpbmdzIjoiQUFBQTs7O0NBR0MsR0FDRCxTQUFRQSxJQUFJLFFBQTJCLGtCQUFrQjtBQUN6RCxTQUFRQyxhQUFhLFFBQU8sUUFBUTtBQVlwQyxNQUFNQyxpQkFBcUM7SUFBQ0Y7SUFBTUcsUUFBUUM7SUFBV0MsUUFBUSxJQUFNO0lBQU1DLFNBQVMsQ0FBQztBQUFDO0FBRXBHLE9BQU8sTUFBTUMsOEJBQWdCTixjQUFjQyxnQkFBZ0IifQ==
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type AwsRumEventType = 'change' | 'click' | 'edit' | 'page_view' | 'submit' | (string & {});
|
|
2
|
+
export interface AwsRumTrackEvent {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly path?: string;
|
|
5
|
+
readonly properties?: Record<string, boolean | number | string>;
|
|
6
|
+
readonly type: AwsRumEventType;
|
|
7
|
+
}
|
|
8
|
+
export interface AwsRum {
|
|
9
|
+
readonly track: (event: AwsRumTrackEvent) => void;
|
|
10
|
+
}
|
|
11
|
+
export interface AwsRumDebugOptions {
|
|
12
|
+
readonly enabled?: boolean;
|
|
13
|
+
readonly logger?: (message: string, event: AwsRumTrackEvent) => void;
|
|
14
|
+
readonly target?: AwsRum;
|
|
15
|
+
}
|
|
16
|
+
export declare const GOTHAM_ANALYTICS_EVENT = "nlabs:gotham:analytics";
|
|
17
|
+
/**
|
|
18
|
+
* Emits analytics onto Gotham's browser channel. Metropolis subscribes to this
|
|
19
|
+
* channel automatically, which keeps the two packages independently usable.
|
|
20
|
+
*/
|
|
21
|
+
export declare const createAwsRumBrowserClient: () => AwsRum;
|
|
22
|
+
export declare const createAwsRumDebugClient: ({ enabled, logger, target }?: AwsRumDebugOptions) => AwsRum;
|
|
23
|
+
export declare const useAwsRum: () => AwsRum | undefined;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026-Present, Nitrogen Labs, Inc.
|
|
3
|
+
* Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
|
|
4
|
+
*/ import { useContext } from 'react';
|
|
5
|
+
import { GothamContext } from './GothamContext.js';
|
|
6
|
+
export const GOTHAM_ANALYTICS_EVENT = 'nlabs:gotham:analytics';
|
|
7
|
+
const copyEvent = (event)=>({
|
|
8
|
+
name: event.name,
|
|
9
|
+
...event.path ? {
|
|
10
|
+
path: event.path
|
|
11
|
+
} : {},
|
|
12
|
+
...event.properties ? {
|
|
13
|
+
properties: {
|
|
14
|
+
...event.properties
|
|
15
|
+
}
|
|
16
|
+
} : {},
|
|
17
|
+
type: event.type
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* Emits analytics onto Gotham's browser channel. Metropolis subscribes to this
|
|
21
|
+
* channel automatically, which keeps the two packages independently usable.
|
|
22
|
+
*/ export const createAwsRumBrowserClient = ()=>({
|
|
23
|
+
track: (event)=>{
|
|
24
|
+
if (typeof globalThis.window === 'undefined' || typeof globalThis.CustomEvent !== 'function') {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const detail = copyEvent(event);
|
|
28
|
+
globalThis.queueMicrotask(()=>{
|
|
29
|
+
globalThis.window.dispatchEvent(new CustomEvent(GOTHAM_ANALYTICS_EVENT, {
|
|
30
|
+
detail
|
|
31
|
+
}));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
// Debug clients opt into console output so local event payloads can be inspected.
|
|
36
|
+
const defaultLogger = (message, event)=>{
|
|
37
|
+
// eslint-disable-next-line no-console
|
|
38
|
+
console.debug(`${message} ${JSON.stringify(event)}`, event);
|
|
39
|
+
};
|
|
40
|
+
export const createAwsRumDebugClient = ({ enabled = true, logger = defaultLogger, target } = {})=>({
|
|
41
|
+
track: (event)=>{
|
|
42
|
+
if (enabled) {
|
|
43
|
+
logger('[GothamUI] awsRum.track', event);
|
|
44
|
+
}
|
|
45
|
+
target?.track(event);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
export const useAwsRum = ()=>useContext(GothamContext).awsRum;
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9uaXRyb2c3L0RldmVsb3BtZW50L2dvdGhhbWpzL3NyYy91dGlscy9hd3NSdW0udHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIDIwMjYtUHJlc2VudCwgTml0cm9nZW4gTGFicywgSW5jLlxuICogQ29weXJpZ2h0cyBsaWNlbnNlZCB1bmRlciB0aGUgTUlUIExpY2Vuc2UuIFNlZSB0aGUgYWNjb21wYW55aW5nIExJQ0VOU0UgZmlsZSBmb3IgdGVybXMuXG4gKi9cbmltcG9ydCB7dXNlQ29udGV4dH0gZnJvbSAncmVhY3QnO1xuXG5pbXBvcnQge0dvdGhhbUNvbnRleHR9IGZyb20gJy4vR290aGFtQ29udGV4dC5qcyc7XG5cbmV4cG9ydCB0eXBlIEF3c1J1bUV2ZW50VHlwZSA9ICdjaGFuZ2UnIHwgJ2NsaWNrJyB8ICdlZGl0JyB8ICdwYWdlX3ZpZXcnIHwgJ3N1Ym1pdCcgfCAoc3RyaW5nICYge30pO1xuXG5leHBvcnQgaW50ZXJmYWNlIEF3c1J1bVRyYWNrRXZlbnQge1xuICByZWFkb25seSBuYW1lOiBzdHJpbmc7XG4gIHJlYWRvbmx5IHBhdGg/OiBzdHJpbmc7XG4gIHJlYWRvbmx5IHByb3BlcnRpZXM/OiBSZWNvcmQ8c3RyaW5nLCBib29sZWFuIHwgbnVtYmVyIHwgc3RyaW5nPjtcbiAgcmVhZ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FDRixDQUFBLEVBQUc7QUFFSCxPQUFPLE1BQU11QixZQUFZLElBQTBCM0IsV0FBV0MsZUFBZTJCLE1BQU0sQ0FBQyJ9
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2018-Present, Nitrogen Labs, Inc.
|
|
3
|
+
* Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
|
|
4
|
+
*/
|
|
5
|
+
export type GothamColor = 'primary' | 'secondary' | 'tertiary' | 'link' | 'neutral' | 'white' | 'black' | 'error' | 'warning' | 'success' | 'info' | 'transparent';
|
|
6
|
+
export declare const colorLuminance: (hexValue: string, luminance?: number) => string;
|
|
7
|
+
export declare const gothamColors: readonly ['primary', 'secondary', 'tertiary', 'link', 'neutral', 'black', 'white', 'error', 'warning', 'success', 'info'];
|
|
8
|
+
export interface StyleClassOptions {
|
|
9
|
+
readonly hasError?: boolean;
|
|
10
|
+
readonly hasFocus?: boolean;
|
|
11
|
+
readonly hasHover?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const getTextClasses: (color: GothamColor, options?: StyleClassOptions) => string;
|
|
14
|
+
export declare const getPlaceholderClasses: (color: GothamColor, options?: StyleClassOptions) => string;
|
|
15
|
+
export declare const getErrorClasses: (errorColor: GothamColor) => "text-error dark:text-error-dark" | "text-info dark:text-info-dark" | "text-success dark:text-success-dark" | "text-warning dark:text-warning-dark";
|
|
16
|
+
export declare const getBorderClasses: (color: GothamColor, options?: StyleClassOptions) => string;
|
|
17
|
+
export declare const getOutlineClasses: (color: GothamColor, options?: StyleClassOptions) => string;
|
|
18
|
+
export declare const getCheckedClasses: (color: GothamColor) => string;
|
|
19
|
+
export declare const getBackgroundClasses: (color: GothamColor, options?: StyleClassOptions) => string;
|
|
20
|
+
export declare const getBackgroundViewClasses: (color: GothamColor, options?: StyleClassOptions) => string;
|