@shipfox/react-ui 0.15.0 → 0.16.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/dist/components/button-group/button-group.stories.js +4 -4
- package/dist/components/dashboard/components/charts/bar-chart.d.ts +39 -0
- package/dist/components/dashboard/components/charts/bar-chart.js +104 -0
- package/dist/components/dashboard/components/charts/chart-tooltip.d.ts +14 -0
- package/dist/components/dashboard/components/charts/chart-tooltip.js +45 -0
- package/dist/components/dashboard/components/charts/colors.d.ts +11 -0
- package/dist/components/dashboard/components/charts/colors.js +17 -0
- package/dist/components/dashboard/components/charts/index.d.ts +5 -0
- package/dist/components/dashboard/components/charts/index.js +6 -0
- package/dist/components/dashboard/components/charts/line-chart.d.ts +37 -0
- package/dist/components/dashboard/components/charts/line-chart.js +128 -0
- package/dist/components/dashboard/components/dashboard-alert.d.ts +8 -0
- package/dist/components/dashboard/components/dashboard-alert.js +24 -0
- package/dist/components/dashboard/components/kpi-card.d.ts +15 -0
- package/dist/components/dashboard/components/kpi-card.js +77 -0
- package/dist/components/dashboard/components/mobile-sidebar.d.ts +19 -0
- package/dist/components/dashboard/components/mobile-sidebar.js +50 -0
- package/dist/components/dashboard/components/organization-selector.d.ts +24 -1
- package/dist/components/dashboard/components/organization-selector.js +93 -70
- package/dist/components/dashboard/components/sidebar.d.ts +24 -0
- package/dist/components/dashboard/components/sidebar.js +218 -0
- package/dist/components/dashboard/context/dashboard-context.d.ts +70 -0
- package/dist/components/dashboard/context/dashboard-context.js +175 -0
- package/dist/components/dashboard/context/index.d.ts +8 -0
- package/dist/components/dashboard/context/index.js +6 -0
- package/dist/components/dashboard/context/types.d.ts +50 -0
- package/dist/components/dashboard/context/types.js +7 -0
- package/dist/components/dashboard/context/utils.d.ts +28 -0
- package/dist/components/dashboard/context/utils.js +53 -0
- package/dist/components/dashboard/dashboard.d.ts +27 -1
- package/dist/components/dashboard/dashboard.js +76 -36
- package/dist/components/dashboard/filters/expression-filter-bar.d.ts +42 -0
- package/dist/components/dashboard/filters/expression-filter-bar.js +80 -0
- package/dist/components/dashboard/filters/index.d.ts +6 -0
- package/dist/components/dashboard/filters/index.js +5 -0
- package/dist/components/dashboard/index.d.ts +25 -1
- package/dist/components/dashboard/index.js +22 -1
- package/dist/components/dashboard/pages/analytics-page.d.ts +20 -0
- package/dist/components/dashboard/pages/analytics-page.js +258 -0
- package/dist/components/dashboard/pages/index.d.ts +6 -0
- package/dist/components/dashboard/pages/index.js +6 -0
- package/dist/components/dashboard/pages/jobs-page.d.ts +20 -0
- package/dist/components/dashboard/pages/jobs-page.js +56 -0
- package/dist/components/dashboard/table/index.d.ts +6 -0
- package/dist/components/dashboard/table/index.js +5 -0
- package/dist/components/dashboard/table/table-wrapper.d.ts +104 -0
- package/dist/components/dashboard/table/table-wrapper.js +93 -0
- package/dist/components/dashboard/toolbar/filter-button.d.ts +12 -0
- package/dist/components/dashboard/toolbar/filter-button.js +124 -0
- package/dist/components/dashboard/toolbar/index.d.ts +13 -0
- package/dist/components/dashboard/toolbar/index.js +10 -0
- package/dist/components/dashboard/toolbar/page-toolbar.d.ts +75 -0
- package/dist/components/dashboard/toolbar/page-toolbar.js +208 -0
- package/dist/components/dashboard/toolbar/toolbar-actions.d.ts +52 -0
- package/dist/components/dashboard/toolbar/toolbar-actions.js +51 -0
- package/dist/components/dashboard/toolbar/toolbar-search.d.ts +21 -0
- package/dist/components/dashboard/toolbar/toolbar-search.js +123 -0
- package/dist/components/dashboard/toolbar/view-dropdown.d.ts +11 -0
- package/dist/components/dashboard/toolbar/view-dropdown.js +113 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/modal/modal.js +3 -3
- package/dist/components/search/search-inline.js +1 -1
- package/dist/components/search/search-modal.js +13 -7
- package/dist/components/select/select.d.ts +3 -1
- package/dist/components/select/select.js +2 -1
- package/dist/components/sheet/index.d.ts +2 -0
- package/dist/components/sheet/index.js +3 -0
- package/dist/components/sheet/sheet.d.ts +33 -0
- package/dist/components/sheet/sheet.js +163 -0
- package/dist/components/sheet/sheet.stories.js +368 -0
- package/dist/components/table/data-table.d.ts +15 -2
- package/dist/components/table/data-table.js +7 -2
- package/dist/styles.css +1 -1
- package/package.json +12 -4
- package/.storybook/main.ts +0 -35
- package/.storybook/preview.tsx +0 -66
- package/.storybook/vitest.setup.ts +0 -4
- package/.turbo/turbo-build.log +0 -19
- package/.turbo/turbo-check.log +0 -6
- package/.turbo/turbo-type.log +0 -5
- package/CHANGELOG.md +0 -114
- package/argos.config.ts +0 -33
- package/dist/build-css-entry.js.map +0 -1
- package/dist/colors.stories.conts.d.ts.map +0 -1
- package/dist/colors.stories.conts.js.map +0 -1
- package/dist/colors.stories.js.map +0 -1
- package/dist/components/alert/alert.d.ts.map +0 -1
- package/dist/components/alert/alert.js.map +0 -1
- package/dist/components/alert/alert.stories.js.map +0 -1
- package/dist/components/alert/index.d.ts.map +0 -1
- package/dist/components/alert/index.js.map +0 -1
- package/dist/components/avatar/avatar-group.d.ts.map +0 -1
- package/dist/components/avatar/avatar-group.js.map +0 -1
- package/dist/components/avatar/avatar.d.ts.map +0 -1
- package/dist/components/avatar/avatar.js.map +0 -1
- package/dist/components/avatar/avatar.stories.js.map +0 -1
- package/dist/components/avatar/index.d.ts.map +0 -1
- package/dist/components/avatar/index.js.map +0 -1
- package/dist/components/badge/badge.d.ts.map +0 -1
- package/dist/components/badge/badge.js.map +0 -1
- package/dist/components/badge/badge.stories.js.map +0 -1
- package/dist/components/badge/icon-badge.d.ts.map +0 -1
- package/dist/components/badge/icon-badge.js.map +0 -1
- package/dist/components/badge/index.d.ts.map +0 -1
- package/dist/components/badge/index.js.map +0 -1
- package/dist/components/badge/status-badge.d.ts.map +0 -1
- package/dist/components/badge/status-badge.js.map +0 -1
- package/dist/components/badge/user-badge.d.ts.map +0 -1
- package/dist/components/badge/user-badge.js.map +0 -1
- package/dist/components/button/button-link.d.ts.map +0 -1
- package/dist/components/button/button-link.js.map +0 -1
- package/dist/components/button/button-link.stories.js.map +0 -1
- package/dist/components/button/button.d.ts.map +0 -1
- package/dist/components/button/button.js.map +0 -1
- package/dist/components/button/button.stories.js.map +0 -1
- package/dist/components/button/icon-button.d.ts.map +0 -1
- package/dist/components/button/icon-button.js.map +0 -1
- package/dist/components/button/icon-button.stories.js.map +0 -1
- package/dist/components/button/index.d.ts.map +0 -1
- package/dist/components/button/index.js.map +0 -1
- package/dist/components/button-group/button-group.d.ts.map +0 -1
- package/dist/components/button-group/button-group.js.map +0 -1
- package/dist/components/button-group/button-group.stories.js.map +0 -1
- package/dist/components/button-group/index.d.ts.map +0 -1
- package/dist/components/button-group/index.js.map +0 -1
- package/dist/components/calendar/calendar.d.ts.map +0 -1
- package/dist/components/calendar/calendar.js.map +0 -1
- package/dist/components/calendar/index.d.ts.map +0 -1
- package/dist/components/calendar/index.js.map +0 -1
- package/dist/components/checkbox/checkbox-label.d.ts.map +0 -1
- package/dist/components/checkbox/checkbox-label.js.map +0 -1
- package/dist/components/checkbox/checkbox-links.d.ts.map +0 -1
- package/dist/components/checkbox/checkbox-links.js.map +0 -1
- package/dist/components/checkbox/checkbox.d.ts.map +0 -1
- package/dist/components/checkbox/checkbox.js.map +0 -1
- package/dist/components/checkbox/checkbox.stories.js.map +0 -1
- package/dist/components/checkbox/index.d.ts.map +0 -1
- package/dist/components/checkbox/index.js.map +0 -1
- package/dist/components/code-block/code-block-footer.d.ts.map +0 -1
- package/dist/components/code-block/code-block-footer.js.map +0 -1
- package/dist/components/code-block/code-block.d.ts.map +0 -1
- package/dist/components/code-block/code-block.js.map +0 -1
- package/dist/components/code-block/code-block.stories.js.map +0 -1
- package/dist/components/code-block/code-content.d.ts.map +0 -1
- package/dist/components/code-block/code-content.js.map +0 -1
- package/dist/components/code-block/code-copy-button.d.ts.map +0 -1
- package/dist/components/code-block/code-copy-button.js.map +0 -1
- package/dist/components/code-block/code-tabs.d.ts.map +0 -1
- package/dist/components/code-block/code-tabs.js.map +0 -1
- package/dist/components/code-block/index.d.ts.map +0 -1
- package/dist/components/code-block/index.js.map +0 -1
- package/dist/components/command/command.d.ts.map +0 -1
- package/dist/components/command/command.js.map +0 -1
- package/dist/components/command/command.stories.js.map +0 -1
- package/dist/components/command/index.d.ts.map +0 -1
- package/dist/components/command/index.js.map +0 -1
- package/dist/components/confetti/confetti.d.ts.map +0 -1
- package/dist/components/confetti/confetti.js.map +0 -1
- package/dist/components/confetti/confetti.stories.js.map +0 -1
- package/dist/components/confetti/index.d.ts.map +0 -1
- package/dist/components/confetti/index.js.map +0 -1
- package/dist/components/dashboard/components/analytics-content.d.ts +0 -2
- package/dist/components/dashboard/components/analytics-content.d.ts.map +0 -1
- package/dist/components/dashboard/components/analytics-content.js +0 -180
- package/dist/components/dashboard/components/analytics-content.js.map +0 -1
- package/dist/components/dashboard/components/animated-logo.d.ts.map +0 -1
- package/dist/components/dashboard/components/animated-logo.js.map +0 -1
- package/dist/components/dashboard/components/complete-setup-button.d.ts.map +0 -1
- package/dist/components/dashboard/components/complete-setup-button.js.map +0 -1
- package/dist/components/dashboard/components/jobs-content.d.ts +0 -2
- package/dist/components/dashboard/components/jobs-content.d.ts.map +0 -1
- package/dist/components/dashboard/components/jobs-content.js +0 -69
- package/dist/components/dashboard/components/jobs-content.js.map +0 -1
- package/dist/components/dashboard/components/mobile-menu.d.ts.map +0 -1
- package/dist/components/dashboard/components/mobile-menu.js.map +0 -1
- package/dist/components/dashboard/components/organization-selector.d.ts.map +0 -1
- package/dist/components/dashboard/components/organization-selector.js.map +0 -1
- package/dist/components/dashboard/components/top-menu.d.ts.map +0 -1
- package/dist/components/dashboard/components/top-menu.js.map +0 -1
- package/dist/components/dashboard/components/topbar-button.d.ts.map +0 -1
- package/dist/components/dashboard/components/topbar-button.js.map +0 -1
- package/dist/components/dashboard/components/topbar.d.ts.map +0 -1
- package/dist/components/dashboard/components/topbar.js.map +0 -1
- package/dist/components/dashboard/components/user-profile.d.ts.map +0 -1
- package/dist/components/dashboard/components/user-profile.js.map +0 -1
- package/dist/components/dashboard/dashboard.d.ts.map +0 -1
- package/dist/components/dashboard/dashboard.js.map +0 -1
- package/dist/components/dashboard/dashboard.stories.js.map +0 -1
- package/dist/components/dashboard/index.d.ts.map +0 -1
- package/dist/components/dashboard/index.js.map +0 -1
- package/dist/components/date-picker/date-picker.d.ts.map +0 -1
- package/dist/components/date-picker/date-picker.js.map +0 -1
- package/dist/components/date-picker/date-picker.stories.js.map +0 -1
- package/dist/components/date-picker/index.d.ts.map +0 -1
- package/dist/components/date-picker/index.js.map +0 -1
- package/dist/components/date-time-range-picker/date-time-range-picker.d.ts.map +0 -1
- package/dist/components/date-time-range-picker/date-time-range-picker.js.map +0 -1
- package/dist/components/date-time-range-picker/index.d.ts.map +0 -1
- package/dist/components/date-time-range-picker/index.js.map +0 -1
- package/dist/components/dot-grid/dot-grid.d.ts.map +0 -1
- package/dist/components/dot-grid/dot-grid.js.map +0 -1
- package/dist/components/dot-grid/index.d.ts.map +0 -1
- package/dist/components/dot-grid/index.js.map +0 -1
- package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +0 -1
- package/dist/components/dropdown-menu/dropdown-menu.js.map +0 -1
- package/dist/components/dropdown-menu/dropdown-menu.stories.js.map +0 -1
- package/dist/components/dropdown-menu/index.d.ts.map +0 -1
- package/dist/components/dropdown-menu/index.js.map +0 -1
- package/dist/components/dynamic-item/dynamic-item.d.ts.map +0 -1
- package/dist/components/dynamic-item/dynamic-item.js.map +0 -1
- package/dist/components/dynamic-item/dynamic-item.stories.js.map +0 -1
- package/dist/components/dynamic-item/index.d.ts.map +0 -1
- package/dist/components/dynamic-item/index.js.map +0 -1
- package/dist/components/form/form.d.ts.map +0 -1
- package/dist/components/form/form.js.map +0 -1
- package/dist/components/form/form.stories.js.map +0 -1
- package/dist/components/form/index.d.ts.map +0 -1
- package/dist/components/form/index.js.map +0 -1
- package/dist/components/icon/custom/badge.d.ts.map +0 -1
- package/dist/components/icon/custom/badge.js.map +0 -1
- package/dist/components/icon/custom/check-circle-solid.d.ts.map +0 -1
- package/dist/components/icon/custom/check-circle-solid.js.map +0 -1
- package/dist/components/icon/custom/circle-dotted-line.d.ts.map +0 -1
- package/dist/components/icon/custom/circle-dotted-line.js.map +0 -1
- package/dist/components/icon/custom/component-fill.d.ts.map +0 -1
- package/dist/components/icon/custom/component-fill.js.map +0 -1
- package/dist/components/icon/custom/component-line.d.ts.map +0 -1
- package/dist/components/icon/custom/component-line.js.map +0 -1
- package/dist/components/icon/custom/ellipse-mini-solid.d.ts.map +0 -1
- package/dist/components/icon/custom/ellipse-mini-solid.js.map +0 -1
- package/dist/components/icon/custom/index.d.ts.map +0 -1
- package/dist/components/icon/custom/index.js.map +0 -1
- package/dist/components/icon/custom/info-tooltip-fill.d.ts.map +0 -1
- package/dist/components/icon/custom/info-tooltip-fill.js.map +0 -1
- package/dist/components/icon/custom/resize.d.ts.map +0 -1
- package/dist/components/icon/custom/resize.js.map +0 -1
- package/dist/components/icon/custom/shipfox-logo.d.ts.map +0 -1
- package/dist/components/icon/custom/shipfox-logo.js.map +0 -1
- package/dist/components/icon/custom/slack-logo.d.ts.map +0 -1
- package/dist/components/icon/custom/slack-logo.js.map +0 -1
- package/dist/components/icon/custom/spinner.d.ts.map +0 -1
- package/dist/components/icon/custom/spinner.js.map +0 -1
- package/dist/components/icon/custom/stripe-logo.d.ts.map +0 -1
- package/dist/components/icon/custom/stripe-logo.js.map +0 -1
- package/dist/components/icon/custom/thunder.d.ts.map +0 -1
- package/dist/components/icon/custom/thunder.js.map +0 -1
- package/dist/components/icon/custom/x-circle-solid.d.ts.map +0 -1
- package/dist/components/icon/custom/x-circle-solid.js.map +0 -1
- package/dist/components/icon/icon.d.ts.map +0 -1
- package/dist/components/icon/icon.js.map +0 -1
- package/dist/components/icon/icon.stories.js.map +0 -1
- package/dist/components/icon/index.d.ts.map +0 -1
- package/dist/components/icon/index.js.map +0 -1
- package/dist/components/icon/remixicon-registry.d.ts.map +0 -1
- package/dist/components/icon/remixicon-registry.js.map +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/inline-tips/index.d.ts.map +0 -1
- package/dist/components/inline-tips/index.js.map +0 -1
- package/dist/components/inline-tips/inline-tips.d.ts.map +0 -1
- package/dist/components/inline-tips/inline-tips.js.map +0 -1
- package/dist/components/inline-tips/inline-tips.stories.js.map +0 -1
- package/dist/components/input/index.d.ts.map +0 -1
- package/dist/components/input/index.js.map +0 -1
- package/dist/components/input/input.d.ts.map +0 -1
- package/dist/components/input/input.js.map +0 -1
- package/dist/components/input/input.stories.js.map +0 -1
- package/dist/components/item/index.d.ts.map +0 -1
- package/dist/components/item/index.js.map +0 -1
- package/dist/components/item/item.d.ts.map +0 -1
- package/dist/components/item/item.js.map +0 -1
- package/dist/components/item/item.stories.js.map +0 -1
- package/dist/components/kbd/index.d.ts.map +0 -1
- package/dist/components/kbd/index.js.map +0 -1
- package/dist/components/kbd/kbd.d.ts.map +0 -1
- package/dist/components/kbd/kbd.js.map +0 -1
- package/dist/components/kbd/kbd.stories.js.map +0 -1
- package/dist/components/label/index.d.ts.map +0 -1
- package/dist/components/label/index.js.map +0 -1
- package/dist/components/label/label.d.ts.map +0 -1
- package/dist/components/label/label.js.map +0 -1
- package/dist/components/label/label.stories.js.map +0 -1
- package/dist/components/modal/index.d.ts.map +0 -1
- package/dist/components/modal/index.js.map +0 -1
- package/dist/components/modal/modal.d.ts.map +0 -1
- package/dist/components/modal/modal.js.map +0 -1
- package/dist/components/modal/modal.stories.js.map +0 -1
- package/dist/components/moving-border/index.d.ts.map +0 -1
- package/dist/components/moving-border/index.js.map +0 -1
- package/dist/components/moving-border/moving-border.d.ts.map +0 -1
- package/dist/components/moving-border/moving-border.js.map +0 -1
- package/dist/components/popover/index.d.ts.map +0 -1
- package/dist/components/popover/index.js.map +0 -1
- package/dist/components/popover/popover.d.ts.map +0 -1
- package/dist/components/popover/popover.js.map +0 -1
- package/dist/components/search/index.d.ts.map +0 -1
- package/dist/components/search/index.js.map +0 -1
- package/dist/components/search/search-context.d.ts.map +0 -1
- package/dist/components/search/search-context.js.map +0 -1
- package/dist/components/search/search-inline.d.ts.map +0 -1
- package/dist/components/search/search-inline.js.map +0 -1
- package/dist/components/search/search-modal.d.ts.map +0 -1
- package/dist/components/search/search-modal.js.map +0 -1
- package/dist/components/search/search-trigger.d.ts.map +0 -1
- package/dist/components/search/search-trigger.js.map +0 -1
- package/dist/components/search/search-variants.d.ts.map +0 -1
- package/dist/components/search/search-variants.js.map +0 -1
- package/dist/components/search/search.d.ts.map +0 -1
- package/dist/components/search/search.js.map +0 -1
- package/dist/components/search/search.stories.js.map +0 -1
- package/dist/components/select/index.d.ts.map +0 -1
- package/dist/components/select/index.js.map +0 -1
- package/dist/components/select/select.d.ts.map +0 -1
- package/dist/components/select/select.js.map +0 -1
- package/dist/components/select/select.stories.js.map +0 -1
- package/dist/components/shiny-text/index.d.ts.map +0 -1
- package/dist/components/shiny-text/index.js.map +0 -1
- package/dist/components/shiny-text/shiny-text.d.ts.map +0 -1
- package/dist/components/shiny-text/shiny-text.js.map +0 -1
- package/dist/components/skeleton/index.d.ts.map +0 -1
- package/dist/components/skeleton/index.js.map +0 -1
- package/dist/components/skeleton/skeleton.d.ts.map +0 -1
- package/dist/components/skeleton/skeleton.js.map +0 -1
- package/dist/components/skeleton/skeleton.stories.js.map +0 -1
- package/dist/components/table/data-table.d.ts.map +0 -1
- package/dist/components/table/data-table.js.map +0 -1
- package/dist/components/table/index.d.ts.map +0 -1
- package/dist/components/table/index.js.map +0 -1
- package/dist/components/table/table-column-header.d.ts.map +0 -1
- package/dist/components/table/table-column-header.js.map +0 -1
- package/dist/components/table/table-pagination.d.ts.map +0 -1
- package/dist/components/table/table-pagination.js.map +0 -1
- package/dist/components/table/table.d.ts.map +0 -1
- package/dist/components/table/table.js.map +0 -1
- package/dist/components/table/table.stories.columns.d.ts.map +0 -1
- package/dist/components/table/table.stories.columns.js.map +0 -1
- package/dist/components/table/table.stories.components.d.ts.map +0 -1
- package/dist/components/table/table.stories.components.js.map +0 -1
- package/dist/components/table/table.stories.data.d.ts.map +0 -1
- package/dist/components/table/table.stories.data.js.map +0 -1
- package/dist/components/table/table.stories.js.map +0 -1
- package/dist/components/tabs/index.d.ts.map +0 -1
- package/dist/components/tabs/index.js.map +0 -1
- package/dist/components/tabs/tabs.d.ts.map +0 -1
- package/dist/components/tabs/tabs.js.map +0 -1
- package/dist/components/tabs/tabs.stories.js.map +0 -1
- package/dist/components/textarea/index.d.ts.map +0 -1
- package/dist/components/textarea/index.js.map +0 -1
- package/dist/components/textarea/textarea.d.ts.map +0 -1
- package/dist/components/textarea/textarea.js.map +0 -1
- package/dist/components/textarea/textarea.stories.js.map +0 -1
- package/dist/components/theme/index.d.ts.map +0 -1
- package/dist/components/theme/index.js.map +0 -1
- package/dist/components/theme/theme-provider.d.ts.map +0 -1
- package/dist/components/theme/theme-provider.js.map +0 -1
- package/dist/components/toast/index.d.ts.map +0 -1
- package/dist/components/toast/index.js.map +0 -1
- package/dist/components/toast/toast-custom.d.ts.map +0 -1
- package/dist/components/toast/toast-custom.js.map +0 -1
- package/dist/components/toast/toast.d.ts.map +0 -1
- package/dist/components/toast/toast.js.map +0 -1
- package/dist/components/toast/toast.stories.js.map +0 -1
- package/dist/components/tooltip/index.d.ts.map +0 -1
- package/dist/components/tooltip/index.js.map +0 -1
- package/dist/components/tooltip/tooltip.d.ts.map +0 -1
- package/dist/components/tooltip/tooltip.js.map +0 -1
- package/dist/components/tooltip/tooltip.stories.js.map +0 -1
- package/dist/components/typography/code.d.ts.map +0 -1
- package/dist/components/typography/code.js.map +0 -1
- package/dist/components/typography/code.stories.js.map +0 -1
- package/dist/components/typography/header.d.ts.map +0 -1
- package/dist/components/typography/header.js.map +0 -1
- package/dist/components/typography/header.stories.js.map +0 -1
- package/dist/components/typography/index.d.ts.map +0 -1
- package/dist/components/typography/index.js.map +0 -1
- package/dist/components/typography/text.d.ts.map +0 -1
- package/dist/components/typography/text.js.map +0 -1
- package/dist/components/typography/text.stories.js.map +0 -1
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/useCopy.d.ts.map +0 -1
- package/dist/hooks/useCopy.js.map +0 -1
- package/dist/hooks/useCopyToClipboard.d.ts.map +0 -1
- package/dist/hooks/useCopyToClipboard.js.map +0 -1
- package/dist/hooks/useMediaQuery.d.ts.map +0 -1
- package/dist/hooks/useMediaQuery.js.map +0 -1
- package/dist/hooks/useResolvedTheme.d.ts.map +0 -1
- package/dist/hooks/useResolvedTheme.js.map +0 -1
- package/dist/hooks/useShikiHighlight.d.ts.map +0 -1
- package/dist/hooks/useShikiHighlight.js.map +0 -1
- package/dist/hooks/useShikiStyleInjection.d.ts.map +0 -1
- package/dist/hooks/useShikiStyleInjection.js.map +0 -1
- package/dist/hooks/useTheme.d.ts.map +0 -1
- package/dist/hooks/useTheme.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/onboarding/sign-in.stories.js.map +0 -1
- package/dist/state/theme.d.ts.map +0 -1
- package/dist/state/theme.js.map +0 -1
- package/dist/utils/avatar.d.ts.map +0 -1
- package/dist/utils/avatar.js.map +0 -1
- package/dist/utils/clipboard.d.ts.map +0 -1
- package/dist/utils/clipboard.js.map +0 -1
- package/dist/utils/cn.d.ts.map +0 -1
- package/dist/utils/cn.js.map +0 -1
- package/dist/utils/date.d.ts.map +0 -1
- package/dist/utils/date.js.map +0 -1
- package/dist/utils/debounce.d.ts.map +0 -1
- package/dist/utils/debounce.js.map +0 -1
- package/dist/utils/format/chart.d.ts.map +0 -1
- package/dist/utils/format/chart.js.map +0 -1
- package/dist/utils/format/date.d.ts.map +0 -1
- package/dist/utils/format/date.js.map +0 -1
- package/dist/utils/format/duration.d.ts.map +0 -1
- package/dist/utils/format/duration.js.map +0 -1
- package/dist/utils/format/index.d.ts.map +0 -1
- package/dist/utils/format/index.js.map +0 -1
- package/dist/utils/format/number.d.ts.map +0 -1
- package/dist/utils/format/number.js.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js.map +0 -1
- package/index.css +0 -1018
- package/src/assets/illustration-1.svg +0 -92
- package/src/assets/illustration-2.svg +0 -14
- package/src/assets/illustration-gradient.svg +0 -7049
- package/src/build-css-entry.ts +0 -3
- package/src/colors.stories.conts.ts +0 -164
- package/src/colors.stories.tsx +0 -66
- package/src/components/alert/alert.stories.tsx +0 -178
- package/src/components/alert/alert.tsx +0 -291
- package/src/components/alert/index.ts +0 -1
- package/src/components/avatar/avatar-group.tsx +0 -186
- package/src/components/avatar/avatar.stories.tsx +0 -179
- package/src/components/avatar/avatar.tsx +0 -219
- package/src/components/avatar/index.ts +0 -2
- package/src/components/badge/badge.stories.tsx +0 -468
- package/src/components/badge/badge.tsx +0 -147
- package/src/components/badge/icon-badge.tsx +0 -43
- package/src/components/badge/index.ts +0 -4
- package/src/components/badge/status-badge.tsx +0 -43
- package/src/components/badge/user-badge.tsx +0 -34
- package/src/components/button/button-link.stories.tsx +0 -86
- package/src/components/button/button-link.tsx +0 -76
- package/src/components/button/button.stories.tsx +0 -138
- package/src/components/button/button.tsx +0 -91
- package/src/components/button/icon-button.stories.tsx +0 -228
- package/src/components/button/icon-button.tsx +0 -95
- package/src/components/button/index.ts +0 -3
- package/src/components/button-group/button-group.stories.tsx +0 -361
- package/src/components/button-group/button-group.tsx +0 -111
- package/src/components/button-group/index.ts +0 -1
- package/src/components/calendar/calendar.tsx +0 -90
- package/src/components/calendar/index.ts +0 -1
- package/src/components/checkbox/checkbox-label.tsx +0 -125
- package/src/components/checkbox/checkbox-links.tsx +0 -92
- package/src/components/checkbox/checkbox.stories.tsx +0 -391
- package/src/components/checkbox/checkbox.tsx +0 -71
- package/src/components/checkbox/index.ts +0 -3
- package/src/components/code-block/code-block-footer.tsx +0 -197
- package/src/components/code-block/code-block.stories.tsx +0 -323
- package/src/components/code-block/code-block.tsx +0 -283
- package/src/components/code-block/code-content.tsx +0 -63
- package/src/components/code-block/code-copy-button.tsx +0 -73
- package/src/components/code-block/code-tabs.tsx +0 -170
- package/src/components/code-block/index.ts +0 -3
- package/src/components/command/command.stories.tsx +0 -133
- package/src/components/command/command.tsx +0 -265
- package/src/components/command/index.ts +0 -1
- package/src/components/confetti/confetti.stories.tsx +0 -38
- package/src/components/confetti/confetti.tsx +0 -140
- package/src/components/confetti/index.ts +0 -1
- package/src/components/dashboard/components/analytics-content.tsx +0 -102
- package/src/components/dashboard/components/animated-logo.tsx +0 -25
- package/src/components/dashboard/components/complete-setup-button.tsx +0 -30
- package/src/components/dashboard/components/jobs-content.tsx +0 -51
- package/src/components/dashboard/components/mobile-menu.tsx +0 -50
- package/src/components/dashboard/components/organization-selector.tsx +0 -51
- package/src/components/dashboard/components/top-menu.tsx +0 -26
- package/src/components/dashboard/components/topbar-button.tsx +0 -27
- package/src/components/dashboard/components/topbar.tsx +0 -40
- package/src/components/dashboard/components/user-profile.tsx +0 -90
- package/src/components/dashboard/dashboard.stories.tsx +0 -25
- package/src/components/dashboard/dashboard.tsx +0 -61
- package/src/components/dashboard/index.ts +0 -1
- package/src/components/date-picker/date-picker.stories.tsx +0 -230
- package/src/components/date-picker/date-picker.tsx +0 -179
- package/src/components/date-picker/index.ts +0 -1
- package/src/components/date-time-range-picker/date-time-range-picker.tsx +0 -211
- package/src/components/date-time-range-picker/index.ts +0 -1
- package/src/components/dot-grid/dot-grid.tsx +0 -325
- package/src/components/dot-grid/index.ts +0 -1
- package/src/components/dropdown-menu/dropdown-menu.stories.tsx +0 -384
- package/src/components/dropdown-menu/dropdown-menu.tsx +0 -416
- package/src/components/dropdown-menu/index.ts +0 -1
- package/src/components/dynamic-item/dynamic-item.stories.tsx +0 -266
- package/src/components/dynamic-item/dynamic-item.tsx +0 -74
- package/src/components/dynamic-item/index.ts +0 -1
- package/src/components/form/form.stories.tsx +0 -505
- package/src/components/form/form.tsx +0 -154
- package/src/components/form/index.ts +0 -1
- package/src/components/icon/custom/badge.tsx +0 -17
- package/src/components/icon/custom/check-circle-solid.tsx +0 -24
- package/src/components/icon/custom/circle-dotted-line.tsx +0 -17
- package/src/components/icon/custom/component-fill.tsx +0 -17
- package/src/components/icon/custom/component-line.tsx +0 -17
- package/src/components/icon/custom/ellipse-mini-solid.tsx +0 -17
- package/src/components/icon/custom/index.ts +0 -14
- package/src/components/icon/custom/info-tooltip-fill.tsx +0 -21
- package/src/components/icon/custom/resize.tsx +0 -17
- package/src/components/icon/custom/shipfox-logo.tsx +0 -20
- package/src/components/icon/custom/slack-logo.tsx +0 -35
- package/src/components/icon/custom/spinner.tsx +0 -144
- package/src/components/icon/custom/stripe-logo.tsx +0 -27
- package/src/components/icon/custom/thunder.tsx +0 -17
- package/src/components/icon/custom/x-circle-solid.tsx +0 -24
- package/src/components/icon/icon.stories.tsx +0 -31
- package/src/components/icon/icon.tsx +0 -90
- package/src/components/icon/index.ts +0 -1
- package/src/components/icon/remixicon-registry.ts +0 -24
- package/src/components/index.ts +0 -36
- package/src/components/inline-tips/index.ts +0 -1
- package/src/components/inline-tips/inline-tips.stories.tsx +0 -131
- package/src/components/inline-tips/inline-tips.tsx +0 -132
- package/src/components/input/index.ts +0 -1
- package/src/components/input/input.stories.tsx +0 -138
- package/src/components/input/input.tsx +0 -43
- package/src/components/item/index.ts +0 -1
- package/src/components/item/item.stories.tsx +0 -159
- package/src/components/item/item.tsx +0 -182
- package/src/components/kbd/index.ts +0 -1
- package/src/components/kbd/kbd.stories.tsx +0 -64
- package/src/components/kbd/kbd.tsx +0 -32
- package/src/components/label/index.ts +0 -1
- package/src/components/label/label.stories.tsx +0 -67
- package/src/components/label/label.tsx +0 -15
- package/src/components/modal/index.ts +0 -1
- package/src/components/modal/modal.stories.tsx +0 -448
- package/src/components/modal/modal.tsx +0 -311
- package/src/components/moving-border/index.ts +0 -1
- package/src/components/moving-border/moving-border.tsx +0 -67
- package/src/components/popover/index.ts +0 -1
- package/src/components/popover/popover.tsx +0 -60
- package/src/components/renovate.json +0 -23
- package/src/components/search/index.ts +0 -28
- package/src/components/search/search-context.tsx +0 -78
- package/src/components/search/search-inline.tsx +0 -107
- package/src/components/search/search-modal.tsx +0 -198
- package/src/components/search/search-trigger.tsx +0 -47
- package/src/components/search/search-variants.ts +0 -88
- package/src/components/search/search.stories.tsx +0 -392
- package/src/components/search/search.tsx +0 -47
- package/src/components/select/index.ts +0 -1
- package/src/components/select/select.stories.tsx +0 -207
- package/src/components/select/select.tsx +0 -220
- package/src/components/shiny-text/index.ts +0 -1
- package/src/components/shiny-text/shiny-text.tsx +0 -21
- package/src/components/skeleton/index.ts +0 -1
- package/src/components/skeleton/skeleton.stories.tsx +0 -178
- package/src/components/skeleton/skeleton.tsx +0 -14
- package/src/components/table/data-table.tsx +0 -254
- package/src/components/table/index.ts +0 -5
- package/src/components/table/table-column-header.tsx +0 -141
- package/src/components/table/table-pagination.tsx +0 -161
- package/src/components/table/table.stories.columns.tsx +0 -198
- package/src/components/table/table.stories.components.tsx +0 -104
- package/src/components/table/table.stories.data.ts +0 -117
- package/src/components/table/table.stories.tsx +0 -256
- package/src/components/table/table.tsx +0 -95
- package/src/components/tabs/index.ts +0 -1
- package/src/components/tabs/tabs.stories.tsx +0 -100
- package/src/components/tabs/tabs.tsx +0 -380
- package/src/components/textarea/index.ts +0 -1
- package/src/components/textarea/textarea.stories.tsx +0 -196
- package/src/components/textarea/textarea.tsx +0 -42
- package/src/components/theme/index.ts +0 -1
- package/src/components/theme/theme-provider.tsx +0 -50
- package/src/components/toast/index.ts +0 -2
- package/src/components/toast/toast-custom.tsx +0 -154
- package/src/components/toast/toast.stories.tsx +0 -369
- package/src/components/toast/toast.tsx +0 -41
- package/src/components/tooltip/index.ts +0 -1
- package/src/components/tooltip/tooltip.stories.tsx +0 -284
- package/src/components/tooltip/tooltip.tsx +0 -121
- package/src/components/typography/code.stories.tsx +0 -36
- package/src/components/typography/code.tsx +0 -38
- package/src/components/typography/header.stories.tsx +0 -27
- package/src/components/typography/header.tsx +0 -41
- package/src/components/typography/index.ts +0 -3
- package/src/components/typography/text.stories.tsx +0 -67
- package/src/components/typography/text.tsx +0 -50
- package/src/hooks/index.ts +0 -6
- package/src/hooks/useCopy.ts +0 -0
- package/src/hooks/useCopyToClipboard.ts +0 -20
- package/src/hooks/useMediaQuery.ts +0 -87
- package/src/hooks/useResolvedTheme.ts +0 -34
- package/src/hooks/useShikiHighlight.ts +0 -140
- package/src/hooks/useShikiStyleInjection.ts +0 -34
- package/src/hooks/useTheme.ts +0 -10
- package/src/index.ts +0 -4
- package/src/onboarding/sign-in.stories.tsx +0 -85
- package/src/state/theme.ts +0 -15
- package/src/utils/avatar.ts +0 -27
- package/src/utils/clipboard.ts +0 -4
- package/src/utils/cn.ts +0 -6
- package/src/utils/date.test.ts +0 -119
- package/src/utils/date.ts +0 -99
- package/src/utils/debounce.ts +0 -15
- package/src/utils/format/chart.ts +0 -16
- package/src/utils/format/date.test.ts +0 -65
- package/src/utils/format/date.ts +0 -75
- package/src/utils/format/duration.test.ts +0 -58
- package/src/utils/format/duration.ts +0 -82
- package/src/utils/format/index.ts +0 -4
- package/src/utils/format/number.test.ts +0 -38
- package/src/utils/format/number.ts +0 -33
- package/src/utils/index.ts +0 -6
- package/test/global.ts +0 -3
- package/test/setup.ts +0 -9
- package/tsconfig.build.json +0 -19
- package/tsconfig.json +0 -11
- package/tsconfig.test.json +0 -12
- package/vercel.json +0 -8
- package/vite.css.config.ts +0 -30
- package/vitest.config.ts +0 -44
package/src/build-css-entry.ts
DELETED
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
export const primitiveColors = {
|
|
2
|
-
neutral: {
|
|
3
|
-
variants: [
|
|
4
|
-
'bg-neutral-0',
|
|
5
|
-
'bg-neutral-50',
|
|
6
|
-
'bg-neutral-100',
|
|
7
|
-
'bg-neutral-200',
|
|
8
|
-
'bg-neutral-300',
|
|
9
|
-
'bg-neutral-400',
|
|
10
|
-
'bg-neutral-500',
|
|
11
|
-
'bg-neutral-600',
|
|
12
|
-
'bg-neutral-700',
|
|
13
|
-
'bg-neutral-800',
|
|
14
|
-
'bg-neutral-900',
|
|
15
|
-
'bg-neutral-950',
|
|
16
|
-
'bg-neutral-1000',
|
|
17
|
-
],
|
|
18
|
-
},
|
|
19
|
-
purple: {
|
|
20
|
-
variants: [
|
|
21
|
-
'bg-purple-50',
|
|
22
|
-
'bg-purple-100',
|
|
23
|
-
'bg-purple-200',
|
|
24
|
-
'bg-purple-300',
|
|
25
|
-
'bg-purple-400',
|
|
26
|
-
'bg-purple-500',
|
|
27
|
-
'bg-purple-600',
|
|
28
|
-
'bg-purple-700',
|
|
29
|
-
'bg-purple-800',
|
|
30
|
-
'bg-purple-900',
|
|
31
|
-
'bg-purple-950',
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
blue: {
|
|
35
|
-
variants: [
|
|
36
|
-
'bg-blue-50',
|
|
37
|
-
'bg-blue-100',
|
|
38
|
-
'bg-blue-200',
|
|
39
|
-
'bg-blue-300',
|
|
40
|
-
'bg-blue-400',
|
|
41
|
-
'bg-blue-500',
|
|
42
|
-
'bg-blue-600',
|
|
43
|
-
'bg-blue-700',
|
|
44
|
-
'bg-blue-800',
|
|
45
|
-
'bg-blue-900',
|
|
46
|
-
'bg-blue-950',
|
|
47
|
-
],
|
|
48
|
-
},
|
|
49
|
-
green: {
|
|
50
|
-
variants: [
|
|
51
|
-
'bg-green-50',
|
|
52
|
-
'bg-green-100',
|
|
53
|
-
'bg-green-200',
|
|
54
|
-
'bg-green-300',
|
|
55
|
-
'bg-green-400',
|
|
56
|
-
'bg-green-500',
|
|
57
|
-
'bg-green-600',
|
|
58
|
-
'bg-green-700',
|
|
59
|
-
'bg-green-800',
|
|
60
|
-
'bg-green-900',
|
|
61
|
-
'bg-green-950',
|
|
62
|
-
],
|
|
63
|
-
},
|
|
64
|
-
primary: {
|
|
65
|
-
variants: [
|
|
66
|
-
'bg-primary-50',
|
|
67
|
-
'bg-primary-100',
|
|
68
|
-
'bg-primary-200',
|
|
69
|
-
'bg-primary-300',
|
|
70
|
-
'bg-primary-400',
|
|
71
|
-
'bg-primary-500',
|
|
72
|
-
'bg-primary-600',
|
|
73
|
-
'bg-primary-700',
|
|
74
|
-
'bg-primary-800',
|
|
75
|
-
'bg-primary-900',
|
|
76
|
-
'bg-primary-950',
|
|
77
|
-
],
|
|
78
|
-
},
|
|
79
|
-
red: {
|
|
80
|
-
variants: [
|
|
81
|
-
'bg-red-50',
|
|
82
|
-
'bg-red-100',
|
|
83
|
-
'bg-red-200',
|
|
84
|
-
'bg-red-300',
|
|
85
|
-
'bg-red-400',
|
|
86
|
-
'bg-red-500',
|
|
87
|
-
'bg-red-600',
|
|
88
|
-
'bg-red-700',
|
|
89
|
-
'bg-red-800',
|
|
90
|
-
'bg-red-900',
|
|
91
|
-
'bg-red-950',
|
|
92
|
-
],
|
|
93
|
-
},
|
|
94
|
-
orange: {
|
|
95
|
-
variants: [
|
|
96
|
-
'bg-orange-50',
|
|
97
|
-
'bg-orange-100',
|
|
98
|
-
'bg-orange-200',
|
|
99
|
-
'bg-orange-300',
|
|
100
|
-
'bg-orange-400',
|
|
101
|
-
'bg-orange-500',
|
|
102
|
-
'bg-orange-600',
|
|
103
|
-
'bg-orange-700',
|
|
104
|
-
'bg-orange-800',
|
|
105
|
-
'bg-orange-900',
|
|
106
|
-
'bg-orange-950',
|
|
107
|
-
],
|
|
108
|
-
},
|
|
109
|
-
accent: {
|
|
110
|
-
variants: [
|
|
111
|
-
'bg-accent-purple',
|
|
112
|
-
'bg-accent-indigo',
|
|
113
|
-
'bg-accent-mint',
|
|
114
|
-
'bg-accent-green',
|
|
115
|
-
'bg-accent-teal',
|
|
116
|
-
'bg-accent-brown',
|
|
117
|
-
'bg-accent-blue',
|
|
118
|
-
'bg-accent-orange',
|
|
119
|
-
'bg-accent-yellow',
|
|
120
|
-
'bg-accent-pink',
|
|
121
|
-
'bg-accent-gray',
|
|
122
|
-
'bg-accent-cyan',
|
|
123
|
-
'bg-accent-red',
|
|
124
|
-
],
|
|
125
|
-
},
|
|
126
|
-
'alpha-white': {
|
|
127
|
-
variants: [
|
|
128
|
-
'bg-alpha-white-0',
|
|
129
|
-
'bg-alpha-white-2',
|
|
130
|
-
'bg-alpha-white-4',
|
|
131
|
-
'bg-alpha-white-6',
|
|
132
|
-
'bg-alpha-white-8',
|
|
133
|
-
'bg-alpha-white-10',
|
|
134
|
-
'bg-alpha-white-12',
|
|
135
|
-
'bg-alpha-white-16',
|
|
136
|
-
'bg-alpha-white-24',
|
|
137
|
-
'bg-alpha-white-40',
|
|
138
|
-
'bg-alpha-white-56',
|
|
139
|
-
'bg-alpha-white-64',
|
|
140
|
-
'bg-alpha-white-72',
|
|
141
|
-
'bg-alpha-white-80',
|
|
142
|
-
'bg-alpha-white-88',
|
|
143
|
-
],
|
|
144
|
-
},
|
|
145
|
-
'alpha-black': {
|
|
146
|
-
variants: [
|
|
147
|
-
'bg-alpha-black-0',
|
|
148
|
-
'bg-alpha-black-2',
|
|
149
|
-
'bg-alpha-black-4',
|
|
150
|
-
'bg-alpha-black-6',
|
|
151
|
-
'bg-alpha-black-8',
|
|
152
|
-
'bg-alpha-black-10',
|
|
153
|
-
'bg-alpha-black-12',
|
|
154
|
-
'bg-alpha-black-16',
|
|
155
|
-
'bg-alpha-black-24',
|
|
156
|
-
'bg-alpha-black-40',
|
|
157
|
-
'bg-alpha-black-56',
|
|
158
|
-
'bg-alpha-black-64',
|
|
159
|
-
'bg-alpha-black-72',
|
|
160
|
-
'bg-alpha-black-80',
|
|
161
|
-
'bg-alpha-black-88',
|
|
162
|
-
],
|
|
163
|
-
},
|
|
164
|
-
} as const;
|
package/src/colors.stories.tsx
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type {Meta, StoryObj} from '@storybook/react';
|
|
2
|
-
import {Code, Header} from 'components/typography';
|
|
3
|
-
import {cn} from 'utils/cn';
|
|
4
|
-
import {primitiveColors} from './colors.stories.conts';
|
|
5
|
-
|
|
6
|
-
const meta: Meta = {
|
|
7
|
-
title: 'Assets/Colors',
|
|
8
|
-
};
|
|
9
|
-
export default meta;
|
|
10
|
-
|
|
11
|
-
type Story = StoryObj;
|
|
12
|
-
|
|
13
|
-
interface ColorItemProps {
|
|
14
|
-
color: string;
|
|
15
|
-
variant: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function ColorItem({variant}: ColorItemProps) {
|
|
19
|
-
const value = variant.split('-').pop();
|
|
20
|
-
return (
|
|
21
|
-
<div className="flex flex-col items-center gap-1">
|
|
22
|
-
<div className={cn('h-24 w-full rounded-6 border border-border', variant)} />
|
|
23
|
-
<Code variant="label" className="text-foreground-neutral-subtle">
|
|
24
|
-
{value}
|
|
25
|
-
</Code>
|
|
26
|
-
</div>
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
interface ColorPaletteProps {
|
|
31
|
-
title: string;
|
|
32
|
-
rootKey: string;
|
|
33
|
-
variants: readonly string[];
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function ColorPalette({title, rootKey, variants}: ColorPaletteProps) {
|
|
37
|
-
return (
|
|
38
|
-
<div className="grid grid-cols-16 gap-8">
|
|
39
|
-
<Code variant="label" className="text-foreground-neutral-subtle">
|
|
40
|
-
{title}
|
|
41
|
-
</Code>
|
|
42
|
-
{variants.map((variant) => (
|
|
43
|
-
<ColorItem key={variant} variant={variant} color={rootKey} />
|
|
44
|
-
))}
|
|
45
|
-
</div>
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export const Palette: Story = {
|
|
50
|
-
render: () => (
|
|
51
|
-
<div className="flex flex-col gap-16">
|
|
52
|
-
<section className="flex flex-col gap-8">
|
|
53
|
-
<Header variant="h2">Primitive Colors</Header>
|
|
54
|
-
|
|
55
|
-
{Object.entries(primitiveColors).map(([color, variants]) => (
|
|
56
|
-
<ColorPalette
|
|
57
|
-
key={color}
|
|
58
|
-
title={color.replace('-', ' ')}
|
|
59
|
-
rootKey={color}
|
|
60
|
-
variants={variants.variants as readonly string[]}
|
|
61
|
-
/>
|
|
62
|
-
))}
|
|
63
|
-
</section>
|
|
64
|
-
</div>
|
|
65
|
-
),
|
|
66
|
-
};
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import {zodResolver} from '@hookform/resolvers/zod';
|
|
2
|
-
import type {Meta, StoryObj} from '@storybook/react';
|
|
3
|
-
import {Button} from 'components/button';
|
|
4
|
-
import {Form, FormControl, FormField, FormItem, FormLabel, FormMessage} from 'components/form';
|
|
5
|
-
import {Input} from 'components/input';
|
|
6
|
-
import {Header} from 'components/typography';
|
|
7
|
-
import {useState} from 'react';
|
|
8
|
-
import {useForm} from 'react-hook-form';
|
|
9
|
-
import {z} from 'zod';
|
|
10
|
-
import {
|
|
11
|
-
Alert,
|
|
12
|
-
AlertAction,
|
|
13
|
-
AlertActions,
|
|
14
|
-
AlertClose,
|
|
15
|
-
AlertContent,
|
|
16
|
-
AlertDescription,
|
|
17
|
-
AlertTitle,
|
|
18
|
-
} from './alert';
|
|
19
|
-
|
|
20
|
-
const meta = {
|
|
21
|
-
title: 'Components/Alert',
|
|
22
|
-
component: Alert,
|
|
23
|
-
tags: ['autodocs'],
|
|
24
|
-
argTypes: {
|
|
25
|
-
variant: {
|
|
26
|
-
control: 'select',
|
|
27
|
-
options: ['default', 'info', 'success', 'warning', 'error'],
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
args: {
|
|
31
|
-
variant: 'default',
|
|
32
|
-
},
|
|
33
|
-
} satisfies Meta<typeof Alert>;
|
|
34
|
-
|
|
35
|
-
export default meta;
|
|
36
|
-
|
|
37
|
-
type Story = StoryObj<typeof meta>;
|
|
38
|
-
|
|
39
|
-
const variants = ['default', 'info', 'success', 'warning', 'error'] as const;
|
|
40
|
-
|
|
41
|
-
export const Default: Story = {
|
|
42
|
-
render: (args) => {
|
|
43
|
-
return (
|
|
44
|
-
<Alert {...args}>
|
|
45
|
-
<AlertContent>
|
|
46
|
-
<AlertTitle>Title</AlertTitle>
|
|
47
|
-
<AlertDescription>Description</AlertDescription>
|
|
48
|
-
<AlertActions>
|
|
49
|
-
<AlertAction>Download</AlertAction>
|
|
50
|
-
<AlertAction>View</AlertAction>
|
|
51
|
-
</AlertActions>
|
|
52
|
-
</AlertContent>
|
|
53
|
-
<AlertClose />
|
|
54
|
-
</Alert>
|
|
55
|
-
);
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
const validationFormSchema = z.object({
|
|
60
|
-
email: z.string().email('Please enter a valid email address'),
|
|
61
|
-
password: z.string().min(8, 'Password must be at least 8 characters'),
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
type ValidationFormValues = z.infer<typeof validationFormSchema>;
|
|
65
|
-
|
|
66
|
-
function ErrorValidationToasterExample() {
|
|
67
|
-
const [showError, setShowError] = useState(false);
|
|
68
|
-
const form = useForm<ValidationFormValues>({
|
|
69
|
-
resolver: zodResolver(validationFormSchema),
|
|
70
|
-
defaultValues: {
|
|
71
|
-
email: '',
|
|
72
|
-
password: '',
|
|
73
|
-
},
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
function onSubmit(data: ValidationFormValues) {
|
|
77
|
-
// biome-ignore lint/suspicious/noConsole: <we need to log the data for the story>
|
|
78
|
-
console.log('Form submitted:', data);
|
|
79
|
-
setShowError(false);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function onError() {
|
|
83
|
-
setShowError(true);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
const errors = form.formState.errors;
|
|
87
|
-
const errorCount = Object.keys(errors).length;
|
|
88
|
-
const errorMessage =
|
|
89
|
-
errorCount > 0
|
|
90
|
-
? `Please fix ${errorCount} error${errorCount > 1 ? 's' : ''} before submitting.`
|
|
91
|
-
: '';
|
|
92
|
-
|
|
93
|
-
return (
|
|
94
|
-
<div className="flex flex-col gap-16 w-full max-w-md">
|
|
95
|
-
{errorCount > 0 && (
|
|
96
|
-
<Alert variant="error" open={showError} autoClose={5000} onOpenChange={setShowError}>
|
|
97
|
-
<AlertContent>
|
|
98
|
-
<AlertTitle>Validation Error</AlertTitle>
|
|
99
|
-
<AlertDescription>{errorMessage}</AlertDescription>
|
|
100
|
-
<AlertActions>
|
|
101
|
-
<AlertAction
|
|
102
|
-
onClick={() => {
|
|
103
|
-
form.clearErrors();
|
|
104
|
-
setShowError(false);
|
|
105
|
-
}}
|
|
106
|
-
>
|
|
107
|
-
Dismiss
|
|
108
|
-
</AlertAction>
|
|
109
|
-
</AlertActions>
|
|
110
|
-
</AlertContent>
|
|
111
|
-
<AlertClose />
|
|
112
|
-
</Alert>
|
|
113
|
-
)}
|
|
114
|
-
<Form {...form}>
|
|
115
|
-
<form onSubmit={form.handleSubmit(onSubmit, onError)} className="space-y-8">
|
|
116
|
-
<FormField
|
|
117
|
-
control={form.control}
|
|
118
|
-
name="email"
|
|
119
|
-
render={({field}) => (
|
|
120
|
-
<FormItem>
|
|
121
|
-
<FormLabel>Email</FormLabel>
|
|
122
|
-
<FormControl>
|
|
123
|
-
<Input type="email" placeholder="email@example.com" {...field} />
|
|
124
|
-
</FormControl>
|
|
125
|
-
<FormMessage />
|
|
126
|
-
</FormItem>
|
|
127
|
-
)}
|
|
128
|
-
/>
|
|
129
|
-
<FormField
|
|
130
|
-
control={form.control}
|
|
131
|
-
name="password"
|
|
132
|
-
render={({field}) => (
|
|
133
|
-
<FormItem>
|
|
134
|
-
<FormLabel>Password</FormLabel>
|
|
135
|
-
<FormControl>
|
|
136
|
-
<Input type="password" placeholder="Enter password" {...field} />
|
|
137
|
-
</FormControl>
|
|
138
|
-
<FormMessage />
|
|
139
|
-
</FormItem>
|
|
140
|
-
)}
|
|
141
|
-
/>
|
|
142
|
-
<Button type="submit">Submit</Button>
|
|
143
|
-
</form>
|
|
144
|
-
</Form>
|
|
145
|
-
</div>
|
|
146
|
-
);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export const WithFormValidation: Story = {
|
|
150
|
-
render: () => <ErrorValidationToasterExample />,
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
export const DesignMock: Story = {
|
|
154
|
-
render: () => {
|
|
155
|
-
return (
|
|
156
|
-
<div className="flex flex-col gap-32 pb-64 pt-32 px-32 bg-background-neutral-base">
|
|
157
|
-
<Header variant="h3" className="text-foreground-neutral-subtle">
|
|
158
|
-
ALERTS
|
|
159
|
-
</Header>
|
|
160
|
-
<div className="flex flex-col gap-16">
|
|
161
|
-
{variants.map((variant) => (
|
|
162
|
-
<Alert key={variant} variant={variant}>
|
|
163
|
-
<AlertContent>
|
|
164
|
-
<AlertTitle>Title</AlertTitle>
|
|
165
|
-
<AlertDescription>Description</AlertDescription>
|
|
166
|
-
<AlertActions>
|
|
167
|
-
<AlertAction>Download</AlertAction>
|
|
168
|
-
<AlertAction>View</AlertAction>
|
|
169
|
-
</AlertActions>
|
|
170
|
-
</AlertContent>
|
|
171
|
-
<AlertClose />
|
|
172
|
-
</Alert>
|
|
173
|
-
))}
|
|
174
|
-
</div>
|
|
175
|
-
</div>
|
|
176
|
-
);
|
|
177
|
-
},
|
|
178
|
-
};
|
|
@@ -1,291 +0,0 @@
|
|
|
1
|
-
import {cva, type VariantProps} from 'class-variance-authority';
|
|
2
|
-
import {Icon} from 'components/icon';
|
|
3
|
-
import {AnimatePresence, motion, type Transition} from 'framer-motion';
|
|
4
|
-
import {
|
|
5
|
-
type ComponentProps,
|
|
6
|
-
createContext,
|
|
7
|
-
type MouseEvent,
|
|
8
|
-
useCallback,
|
|
9
|
-
useContext,
|
|
10
|
-
useEffect,
|
|
11
|
-
useRef,
|
|
12
|
-
useState,
|
|
13
|
-
} from 'react';
|
|
14
|
-
import {cn} from 'utils/cn';
|
|
15
|
-
|
|
16
|
-
const alertVariants = cva(
|
|
17
|
-
'relative w-full rounded-l-4 rounded-r-8 px-16 py-12 text-sm flex gap-12 items-start border',
|
|
18
|
-
{
|
|
19
|
-
variants: {
|
|
20
|
-
variant: {
|
|
21
|
-
default: 'bg-tag-neutral-bg text-foreground-neutral-base border-tag-neutral-border',
|
|
22
|
-
info: 'bg-tag-blue-bg text-foreground-neutral-base border-tag-blue-border',
|
|
23
|
-
success: 'bg-tag-success-bg text-foreground-neutral-base border-tag-success-border',
|
|
24
|
-
warning: 'bg-tag-warning-bg text-foreground-neutral-base border-tag-warning-border',
|
|
25
|
-
error: 'bg-tag-error-bg text-foreground-neutral-base border-tag-error-border',
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
defaultVariants: {
|
|
29
|
-
variant: 'default',
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
const alertLineVariants = cva('w-4 self-stretch rounded-full', {
|
|
35
|
-
variants: {
|
|
36
|
-
variant: {
|
|
37
|
-
default: 'bg-tag-neutral-icon',
|
|
38
|
-
info: 'bg-tag-blue-icon',
|
|
39
|
-
success: 'bg-tag-success-icon',
|
|
40
|
-
warning: 'bg-tag-warning-icon',
|
|
41
|
-
error: 'bg-tag-error-icon',
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
defaultVariants: {
|
|
45
|
-
variant: 'default',
|
|
46
|
-
},
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
const closeIconVariants = cva('w-16 h-16', {
|
|
50
|
-
variants: {
|
|
51
|
-
variant: {
|
|
52
|
-
default: 'text-tag-neutral-icon',
|
|
53
|
-
info: 'text-tag-blue-icon',
|
|
54
|
-
success: 'text-tag-success-icon',
|
|
55
|
-
warning: 'text-tag-warning-icon',
|
|
56
|
-
error: 'text-tag-error-icon',
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
defaultVariants: {
|
|
60
|
-
variant: 'default',
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
const alertDefaultTransition: Transition = {
|
|
65
|
-
duration: 0.2,
|
|
66
|
-
ease: 'easeInOut',
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
type AlertContextValue = {
|
|
70
|
-
isOpen: boolean;
|
|
71
|
-
onClose: () => void;
|
|
72
|
-
variant: VariantProps<typeof alertVariants>['variant'];
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
const AlertContext = createContext<AlertContextValue | null>(null);
|
|
76
|
-
|
|
77
|
-
function useAlertContext() {
|
|
78
|
-
const context = useContext(AlertContext);
|
|
79
|
-
if (!context) {
|
|
80
|
-
throw new Error('Alert components must be used within an Alert component');
|
|
81
|
-
}
|
|
82
|
-
return context;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
type AlertProps = ComponentProps<'div'> &
|
|
86
|
-
VariantProps<typeof alertVariants> & {
|
|
87
|
-
open?: boolean;
|
|
88
|
-
defaultOpen?: boolean;
|
|
89
|
-
onOpenChange?: (open: boolean) => void;
|
|
90
|
-
animated?: boolean;
|
|
91
|
-
transition?: Transition;
|
|
92
|
-
autoClose?: number;
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
function Alert({
|
|
96
|
-
className,
|
|
97
|
-
variant = 'default',
|
|
98
|
-
children,
|
|
99
|
-
open: controlledOpen,
|
|
100
|
-
defaultOpen = true,
|
|
101
|
-
onOpenChange,
|
|
102
|
-
animated = true,
|
|
103
|
-
transition = alertDefaultTransition,
|
|
104
|
-
autoClose,
|
|
105
|
-
...props
|
|
106
|
-
}: AlertProps) {
|
|
107
|
-
const [internalOpen, setInternalOpen] = useState(defaultOpen);
|
|
108
|
-
const isOpen = controlledOpen !== undefined ? controlledOpen : internalOpen;
|
|
109
|
-
|
|
110
|
-
const handleClose = useCallback(() => {
|
|
111
|
-
if (controlledOpen === undefined) {
|
|
112
|
-
setInternalOpen(false);
|
|
113
|
-
}
|
|
114
|
-
onOpenChange?.(false);
|
|
115
|
-
}, [controlledOpen, onOpenChange]);
|
|
116
|
-
|
|
117
|
-
const handleCloseRef = useRef(handleClose);
|
|
118
|
-
useEffect(() => {
|
|
119
|
-
handleCloseRef.current = handleClose;
|
|
120
|
-
}, [handleClose]);
|
|
121
|
-
|
|
122
|
-
useEffect(() => {
|
|
123
|
-
if (autoClose && isOpen && autoClose > 0) {
|
|
124
|
-
const timeoutId = setTimeout(() => {
|
|
125
|
-
handleCloseRef.current();
|
|
126
|
-
}, autoClose);
|
|
127
|
-
|
|
128
|
-
return () => {
|
|
129
|
-
clearTimeout(timeoutId);
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
}, [autoClose, isOpen]);
|
|
133
|
-
|
|
134
|
-
const contextValue: AlertContextValue = {
|
|
135
|
-
isOpen,
|
|
136
|
-
onClose: handleClose,
|
|
137
|
-
variant,
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
if (!animated) {
|
|
141
|
-
if (!isOpen) {
|
|
142
|
-
return null;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
return (
|
|
146
|
-
<AlertContext.Provider value={contextValue}>
|
|
147
|
-
<div className="w-full flex items-start gap-4">
|
|
148
|
-
<div
|
|
149
|
-
data-slot="alert-line"
|
|
150
|
-
className={cn(alertLineVariants({variant}))}
|
|
151
|
-
aria-hidden="true"
|
|
152
|
-
/>
|
|
153
|
-
<div
|
|
154
|
-
data-slot="alert"
|
|
155
|
-
role="alert"
|
|
156
|
-
className={cn(alertVariants({variant}), className)}
|
|
157
|
-
{...props}
|
|
158
|
-
>
|
|
159
|
-
{children}
|
|
160
|
-
</div>
|
|
161
|
-
</div>
|
|
162
|
-
</AlertContext.Provider>
|
|
163
|
-
);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
return (
|
|
167
|
-
<AnimatePresence>
|
|
168
|
-
{isOpen && (
|
|
169
|
-
<motion.div
|
|
170
|
-
key="alert"
|
|
171
|
-
className="w-full flex items-start gap-4"
|
|
172
|
-
initial={{opacity: 0}}
|
|
173
|
-
animate={{opacity: 1}}
|
|
174
|
-
exit={{opacity: 0}}
|
|
175
|
-
transition={transition}
|
|
176
|
-
>
|
|
177
|
-
<AlertContext.Provider value={contextValue}>
|
|
178
|
-
<div
|
|
179
|
-
data-slot="alert-line"
|
|
180
|
-
className={cn(alertLineVariants({variant}))}
|
|
181
|
-
aria-hidden="true"
|
|
182
|
-
/>
|
|
183
|
-
<div
|
|
184
|
-
data-slot="alert"
|
|
185
|
-
role="alert"
|
|
186
|
-
className={cn(alertVariants({variant}), className)}
|
|
187
|
-
{...props}
|
|
188
|
-
>
|
|
189
|
-
{children}
|
|
190
|
-
</div>
|
|
191
|
-
</AlertContext.Provider>
|
|
192
|
-
</motion.div>
|
|
193
|
-
)}
|
|
194
|
-
</AnimatePresence>
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
function AlertContent({className, ...props}: ComponentProps<'div'>) {
|
|
199
|
-
return <div data-slot="alert-content" className={cn('flex-1 min-w-0', className)} {...props} />;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
function AlertTitle({className, ...props}: ComponentProps<'div'>) {
|
|
203
|
-
return (
|
|
204
|
-
<div
|
|
205
|
-
data-slot="alert-title"
|
|
206
|
-
className={cn('font-medium text-sm leading-20 text-foreground-neutral-base mb-4', className)}
|
|
207
|
-
{...props}
|
|
208
|
-
/>
|
|
209
|
-
);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
function AlertDescription({className, ...props}: ComponentProps<'div'>) {
|
|
213
|
-
return (
|
|
214
|
-
<div
|
|
215
|
-
data-slot="alert-description"
|
|
216
|
-
className={cn(
|
|
217
|
-
'text-xs leading-20 text-foreground-neutral-base [&_p]:leading-relaxed',
|
|
218
|
-
className,
|
|
219
|
-
)}
|
|
220
|
-
{...props}
|
|
221
|
-
/>
|
|
222
|
-
);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
function AlertActions({className, ...props}: ComponentProps<'div'>) {
|
|
226
|
-
return (
|
|
227
|
-
<div
|
|
228
|
-
data-slot="alert-actions"
|
|
229
|
-
className={cn('flex items-center gap-8 mt-8', className)}
|
|
230
|
-
{...props}
|
|
231
|
-
/>
|
|
232
|
-
);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
function AlertAction({className, ...props}: ComponentProps<'button'>) {
|
|
236
|
-
return (
|
|
237
|
-
<button
|
|
238
|
-
data-slot="alert-action"
|
|
239
|
-
type="button"
|
|
240
|
-
className={cn(
|
|
241
|
-
'bg-transparent border-none p-0 cursor-pointer text-xs font-medium leading-20 text-foreground-neutral-base hover:text-foreground-neutral-subtle transition-colors duration-150 outline-none focus-visible:ring-2 focus-visible:ring-background-accent-blue-base focus-visible:ring-offset-2',
|
|
242
|
-
className,
|
|
243
|
-
)}
|
|
244
|
-
{...props}
|
|
245
|
-
/>
|
|
246
|
-
);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
function AlertClose({
|
|
250
|
-
className,
|
|
251
|
-
variant: variantProp,
|
|
252
|
-
onClick,
|
|
253
|
-
...props
|
|
254
|
-
}: ComponentProps<'button'> & VariantProps<typeof closeIconVariants>) {
|
|
255
|
-
const {onClose, variant: contextVariant} = useAlertContext();
|
|
256
|
-
const variant = variantProp ?? contextVariant ?? 'default';
|
|
257
|
-
|
|
258
|
-
const handleClick = (e: MouseEvent<HTMLButtonElement>) => {
|
|
259
|
-
onClose();
|
|
260
|
-
onClick?.(e);
|
|
261
|
-
};
|
|
262
|
-
|
|
263
|
-
return (
|
|
264
|
-
<button
|
|
265
|
-
data-slot="alert-close"
|
|
266
|
-
type="button"
|
|
267
|
-
className={cn(
|
|
268
|
-
'absolute cursor-pointer top-12 right-12 rounded-4 p-4 bg-transparent border-none text-foreground-neutral-muted hover:text-foreground-neutral-base hover:bg-background-components-hover transition-colors duration-150 outline-none focus-visible:ring-2 focus-visible:ring-background-accent-blue-base focus-visible:ring-offset-2',
|
|
269
|
-
className,
|
|
270
|
-
)}
|
|
271
|
-
aria-label="Close"
|
|
272
|
-
onClick={handleClick}
|
|
273
|
-
{...props}
|
|
274
|
-
>
|
|
275
|
-
<Icon name="close" className={cn(closeIconVariants({variant}))} />
|
|
276
|
-
</button>
|
|
277
|
-
);
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
export {
|
|
281
|
-
Alert,
|
|
282
|
-
AlertContent,
|
|
283
|
-
AlertTitle,
|
|
284
|
-
AlertDescription,
|
|
285
|
-
AlertActions,
|
|
286
|
-
AlertAction,
|
|
287
|
-
AlertClose,
|
|
288
|
-
alertDefaultTransition,
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
export type {AlertProps};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './alert';
|