@shipfox/react-ui 0.14.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/avatar/avatar.js +1 -1
- package/dist/components/button-group/button-group.d.ts +17 -0
- package/dist/components/button-group/button-group.js +74 -0
- package/dist/components/button-group/button-group.stories.js +644 -0
- package/dist/components/button-group/index.d.ts +2 -0
- package/dist/components/button-group/index.js +3 -0
- package/dist/components/code-block/code-block-footer.js +4 -2
- package/dist/components/command/command.d.ts +28 -0
- package/dist/components/command/command.js +190 -0
- package/dist/components/command/command.stories.js +228 -0
- package/dist/components/command/index.d.ts +2 -0
- package/dist/components/command/index.js +3 -0
- package/dist/components/dashboard/components/animated-logo.d.ts +4 -0
- package/dist/components/dashboard/components/animated-logo.js +23 -0
- 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/complete-setup-button.d.ts +4 -0
- package/dist/components/dashboard/components/complete-setup-button.js +28 -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-menu.d.ts +2 -0
- package/dist/components/dashboard/components/mobile-menu.js +65 -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 +25 -0
- package/dist/components/dashboard/components/organization-selector.js +115 -0
- package/dist/components/dashboard/components/sidebar.d.ts +24 -0
- package/dist/components/dashboard/components/sidebar.js +218 -0
- package/dist/components/dashboard/components/top-menu.d.ts +5 -0
- package/dist/components/dashboard/components/top-menu.js +31 -0
- package/dist/components/dashboard/components/topbar-button.d.ts +7 -0
- package/dist/components/dashboard/components/topbar-button.js +18 -0
- package/dist/components/dashboard/components/topbar.d.ts +4 -0
- package/dist/components/dashboard/components/topbar.js +62 -0
- package/dist/components/dashboard/components/user-profile.d.ts +2 -0
- package/dist/components/dashboard/components/user-profile.js +146 -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 +28 -0
- package/dist/components/dashboard/dashboard.js +110 -0
- package/dist/components/dashboard/dashboard.stories.js +23 -0
- 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 +26 -0
- package/dist/components/dashboard/index.js +24 -0
- 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/form/form.stories.js +6 -1
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.js +8 -0
- package/dist/components/kbd/index.d.ts +2 -0
- package/dist/components/kbd/index.js +3 -0
- package/dist/components/kbd/kbd.d.ts +7 -0
- package/dist/components/kbd/kbd.js +18 -0
- package/dist/components/kbd/kbd.stories.js +119 -0
- package/dist/components/modal/modal.js +3 -3
- package/dist/components/search/index.d.ts +7 -0
- package/dist/components/search/index.js +8 -0
- package/dist/components/search/search-context.d.ts +11 -0
- package/dist/components/search/search-context.js +56 -0
- package/dist/components/search/search-inline.d.ts +9 -0
- package/dist/components/search/search-inline.js +85 -0
- package/dist/components/search/search-modal.d.ts +25 -0
- package/dist/components/search/search-modal.js +168 -0
- package/dist/components/search/search-trigger.d.ts +9 -0
- package/dist/components/search/search-trigger.js +37 -0
- package/dist/components/search/search-variants.d.ts +14 -0
- package/dist/components/search/search-variants.js +90 -0
- package/dist/components/search/search.d.ts +11 -0
- package/dist/components/search/search.js +35 -0
- package/dist/components/search/search.stories.js +630 -0
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/index.js +3 -0
- package/dist/components/select/select.d.ts +27 -0
- package/dist/components/select/select.js +154 -0
- package/dist/components/select/select.stories.js +393 -0
- 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/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/index.js +3 -0
- package/dist/components/skeleton/skeleton.d.ts +5 -0
- package/dist/components/skeleton/skeleton.js +11 -0
- package/dist/components/skeleton/skeleton.stories.js +345 -0
- package/dist/components/table/data-table.d.ts +83 -0
- package/dist/components/table/data-table.js +164 -0
- package/dist/components/table/index.d.ts +6 -0
- package/dist/components/table/index.js +6 -0
- package/dist/components/table/table-column-header.d.ts +79 -0
- package/dist/components/table/table-column-header.js +99 -0
- package/dist/components/table/table-pagination.d.ts +53 -0
- package/dist/components/table/table-pagination.js +139 -0
- package/dist/components/table/table.d.ts +11 -0
- package/dist/components/table/table.js +64 -0
- package/dist/components/table/table.stories.columns.d.ts +24 -0
- package/dist/components/table/table.stories.columns.js +310 -0
- package/dist/components/table/table.stories.components.d.ts +14 -0
- package/dist/components/table/table.stories.components.js +107 -0
- package/dist/components/table/table.stories.data.d.ts +54 -0
- package/dist/components/table/table.stories.data.js +122 -0
- package/dist/components/table/table.stories.js +302 -0
- package/dist/styles.css +1 -1
- package/package.json +14 -5
- package/.storybook/main.ts +0 -35
- package/.storybook/preview.tsx +0 -59
- 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 -104
- 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/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/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/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/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/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/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 -970
- 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/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 -190
- 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/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/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 -500
- 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 -29
- 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/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/shiny-text/index.ts +0 -1
- package/src/components/shiny-text/shiny-text.tsx +0 -21
- 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
|
@@ -3,15 +3,17 @@ import { Slot } from '@radix-ui/react-slot';
|
|
|
3
3
|
import { Icon } from '../../components/icon/icon.js';
|
|
4
4
|
import { ShinyText } from '../../components/shiny-text/index.js';
|
|
5
5
|
import { Text } from '../../components/typography/index.js';
|
|
6
|
+
import { useResolvedTheme } from '../../hooks/useResolvedTheme.js';
|
|
6
7
|
import { ShipfoxLoader } from 'shipfox-loader-react';
|
|
7
8
|
import { cn } from '../../utils/cn.js';
|
|
8
9
|
export function CodeBlockFooter({ className, asChild = false, state = 'running', message, description, icon, children, ...props }) {
|
|
9
10
|
const Comp = asChild ? Slot : 'div';
|
|
11
|
+
const resolvedTheme = useResolvedTheme();
|
|
10
12
|
const defaultIcon = icon ?? (state === 'running' ? /*#__PURE__*/ _jsx(ShipfoxLoader, {
|
|
11
13
|
size: 20,
|
|
12
14
|
animation: "circular",
|
|
13
|
-
color:
|
|
14
|
-
background:
|
|
15
|
+
color: resolvedTheme === 'dark' ? 'white' : 'orange',
|
|
16
|
+
background: resolvedTheme === 'dark' ? 'dark' : 'light'
|
|
15
17
|
}) : /*#__PURE__*/ _jsx(Icon, {
|
|
16
18
|
name: "checkCircleSolid",
|
|
17
19
|
className: "size-20 text-foreground-neutral-base",
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Command as CommandPrimitive } from 'cmdk';
|
|
3
|
+
import { type ComponentProps } from 'react';
|
|
4
|
+
import { Kbd } from '../kbd';
|
|
5
|
+
declare const commandTriggerVariants: (props?: ({
|
|
6
|
+
variant?: "base" | "component" | null | undefined;
|
|
7
|
+
size?: "base" | "small" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
+
type CommandTriggerProps = ComponentProps<'button'> & VariantProps<typeof commandTriggerVariants> & {
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
};
|
|
12
|
+
declare const CommandTrigger: import("react").ForwardRefExoticComponent<Omit<CommandTriggerProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
declare function Command({ className, ...props }: ComponentProps<typeof CommandPrimitive>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function CommandDialog({ children, ...props }: ComponentProps<typeof CommandPrimitive.Dialog>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
type CommandInputProps = ComponentProps<typeof CommandPrimitive.Input> & {
|
|
16
|
+
showClearButton?: boolean;
|
|
17
|
+
onClear?: () => void;
|
|
18
|
+
};
|
|
19
|
+
declare function CommandInput({ className, value, onValueChange, onClear, showClearButton, ...props }: CommandInputProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function CommandList({ className, ...props }: ComponentProps<typeof CommandPrimitive.List>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function CommandEmpty({ className, ...props }: ComponentProps<typeof CommandPrimitive.Empty>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function CommandGroup({ className, ...props }: ComponentProps<typeof CommandPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function CommandSeparator({ className, ...props }: ComponentProps<typeof CommandPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
declare function CommandItem({ className, ...props }: ComponentProps<typeof CommandPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare function CommandShortcut({ className, children, ...props }: ComponentProps<typeof Kbd>): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export { Command, CommandTrigger, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandSeparator, CommandShortcut, commandTriggerVariants, };
|
|
27
|
+
export type { CommandTriggerProps, CommandInputProps };
|
|
28
|
+
//# sourceMappingURL=command.d.ts.map
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from 'class-variance-authority';
|
|
3
|
+
import { Command as CommandPrimitive } from 'cmdk';
|
|
4
|
+
import { forwardRef, useCallback, useState } from 'react';
|
|
5
|
+
import { cn } from '../../utils/cn.js';
|
|
6
|
+
import { Icon } from '../icon/index.js';
|
|
7
|
+
import { Kbd } from '../kbd/index.js';
|
|
8
|
+
const commandTriggerVariants = cva([
|
|
9
|
+
'flex items-center justify-between gap-8',
|
|
10
|
+
'w-full rounded-6 px-8 text-sm leading-20',
|
|
11
|
+
'bg-background-field-base text-foreground-neutral-base',
|
|
12
|
+
'shadow-button-neutral transition-[color,box-shadow] outline-none',
|
|
13
|
+
'hover:bg-background-field-hover cursor-pointer',
|
|
14
|
+
'focus-visible:shadow-border-interactive-with-active',
|
|
15
|
+
'disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-background-neutral-disabled disabled:shadow-none disabled:text-foreground-neutral-disabled'
|
|
16
|
+
], {
|
|
17
|
+
variants: {
|
|
18
|
+
variant: {
|
|
19
|
+
base: 'bg-background-field-base',
|
|
20
|
+
component: 'bg-background-field-component'
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
small: 'h-28 py-4',
|
|
24
|
+
base: 'h-32 py-6'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
variant: 'base',
|
|
29
|
+
size: 'base'
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
const CommandTrigger = /*#__PURE__*/ forwardRef(({ className, variant, size, placeholder, children, ...props }, ref)=>{
|
|
33
|
+
const hasValue = Boolean(children);
|
|
34
|
+
return /*#__PURE__*/ _jsxs("button", {
|
|
35
|
+
ref: ref,
|
|
36
|
+
type: "button",
|
|
37
|
+
"data-slot": "command-trigger",
|
|
38
|
+
"data-placeholder": !hasValue || undefined,
|
|
39
|
+
className: cn(commandTriggerVariants({
|
|
40
|
+
variant,
|
|
41
|
+
size
|
|
42
|
+
}), 'data-placeholder:text-foreground-neutral-muted', className),
|
|
43
|
+
...props,
|
|
44
|
+
children: [
|
|
45
|
+
/*#__PURE__*/ _jsx("span", {
|
|
46
|
+
className: "flex-1 text-left truncate",
|
|
47
|
+
children: hasValue ? children : placeholder
|
|
48
|
+
}),
|
|
49
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
50
|
+
name: "arrowDownSLine",
|
|
51
|
+
className: "size-16 text-foreground-neutral-muted shrink-0"
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
CommandTrigger.displayName = 'CommandTrigger';
|
|
57
|
+
function Command({ className, ...props }) {
|
|
58
|
+
return /*#__PURE__*/ _jsx(CommandPrimitive, {
|
|
59
|
+
"data-slot": "command",
|
|
60
|
+
className: cn('flex h-full w-full flex-col overflow-hidden rounded-10', 'bg-background-neutral-overlay text-foreground-neutral-base', className),
|
|
61
|
+
...props
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function CommandDialog({ children, ...props }) {
|
|
65
|
+
return /*#__PURE__*/ _jsxs(CommandPrimitive.Dialog, {
|
|
66
|
+
"data-slot": "command-dialog",
|
|
67
|
+
...props,
|
|
68
|
+
children: [
|
|
69
|
+
/*#__PURE__*/ _jsx("div", {
|
|
70
|
+
className: "fixed inset-0 z-50 bg-background-neutral-overlay/80 backdrop-blur-sm"
|
|
71
|
+
}),
|
|
72
|
+
/*#__PURE__*/ _jsx("div", {
|
|
73
|
+
className: "fixed left-1/2 top-1/2 z-50 w-full max-w-600 -translate-x-1/2 -translate-y-1/2 p-16",
|
|
74
|
+
children: /*#__PURE__*/ _jsx(Command, {
|
|
75
|
+
className: "shadow-tooltip",
|
|
76
|
+
children: children
|
|
77
|
+
})
|
|
78
|
+
})
|
|
79
|
+
]
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function CommandInput({ className, value, onValueChange, onClear, showClearButton = true, ...props }) {
|
|
83
|
+
const [internalValue, setInternalValue] = useState('');
|
|
84
|
+
const isControlled = value !== undefined;
|
|
85
|
+
const inputValue = isControlled ? value : internalValue;
|
|
86
|
+
const hasValue = Boolean(inputValue);
|
|
87
|
+
const handleValueChange = useCallback((newValue)=>{
|
|
88
|
+
if (!isControlled) {
|
|
89
|
+
setInternalValue(newValue);
|
|
90
|
+
}
|
|
91
|
+
onValueChange?.(newValue);
|
|
92
|
+
}, [
|
|
93
|
+
isControlled,
|
|
94
|
+
onValueChange
|
|
95
|
+
]);
|
|
96
|
+
const handleClear = useCallback(()=>{
|
|
97
|
+
if (!isControlled) {
|
|
98
|
+
setInternalValue('');
|
|
99
|
+
}
|
|
100
|
+
onValueChange?.('');
|
|
101
|
+
onClear?.();
|
|
102
|
+
}, [
|
|
103
|
+
isControlled,
|
|
104
|
+
onValueChange,
|
|
105
|
+
onClear
|
|
106
|
+
]);
|
|
107
|
+
const handleKeyDown = useCallback((e)=>{
|
|
108
|
+
if (e.key === 'Escape' && hasValue) {
|
|
109
|
+
e.preventDefault();
|
|
110
|
+
e.stopPropagation();
|
|
111
|
+
handleClear();
|
|
112
|
+
}
|
|
113
|
+
}, [
|
|
114
|
+
hasValue,
|
|
115
|
+
handleClear
|
|
116
|
+
]);
|
|
117
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
118
|
+
className: "flex items-center gap-8 border-b border-border-neutral-strong p-8",
|
|
119
|
+
children: [
|
|
120
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
121
|
+
name: "searchLine",
|
|
122
|
+
className: "size-16 shrink-0 text-foreground-neutral-muted"
|
|
123
|
+
}),
|
|
124
|
+
/*#__PURE__*/ _jsx(CommandPrimitive.Input, {
|
|
125
|
+
"data-slot": "command-input",
|
|
126
|
+
value: inputValue,
|
|
127
|
+
onValueChange: handleValueChange,
|
|
128
|
+
onKeyDown: handleKeyDown,
|
|
129
|
+
className: cn('flex-1 bg-transparent text-sm leading-20 outline-none', 'placeholder:text-foreground-neutral-muted', 'disabled:cursor-not-allowed disabled:text-foreground-neutral-disabled', className),
|
|
130
|
+
...props
|
|
131
|
+
}),
|
|
132
|
+
showClearButton && hasValue && /*#__PURE__*/ _jsx("button", {
|
|
133
|
+
type: "button",
|
|
134
|
+
onClick: handleClear,
|
|
135
|
+
className: cn('shrink-0 cursor-pointer rounded-4 p-2', 'text-foreground-neutral-muted hover:text-foreground-neutral-subtle transition-colors'),
|
|
136
|
+
"aria-label": "Clear search",
|
|
137
|
+
children: /*#__PURE__*/ _jsx(Icon, {
|
|
138
|
+
name: "closeLine",
|
|
139
|
+
className: "size-16"
|
|
140
|
+
})
|
|
141
|
+
})
|
|
142
|
+
]
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
function CommandList({ className, ...props }) {
|
|
146
|
+
return /*#__PURE__*/ _jsx(CommandPrimitive.List, {
|
|
147
|
+
"data-slot": "command-list",
|
|
148
|
+
className: cn('max-h-300 overflow-y-auto overflow-x-hidden p-4 scrollbar', className),
|
|
149
|
+
...props
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
function CommandEmpty({ className, ...props }) {
|
|
153
|
+
return /*#__PURE__*/ _jsx(CommandPrimitive.Empty, {
|
|
154
|
+
"data-slot": "command-empty",
|
|
155
|
+
className: cn('py-24 text-center text-sm text-foreground-neutral-muted', className),
|
|
156
|
+
...props
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
function CommandGroup({ className, ...props }) {
|
|
160
|
+
return /*#__PURE__*/ _jsx(CommandPrimitive.Group, {
|
|
161
|
+
"data-slot": "command-group",
|
|
162
|
+
className: cn('overflow-hidden', '[&_[cmdk-group-heading]]:px-8 [&_[cmdk-group-heading]]:py-4', '[&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:leading-20', '[&_[cmdk-group-heading]]:text-foreground-neutral-subtle', '[&_[cmdk-group-heading]]:select-none', className),
|
|
163
|
+
...props
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
function CommandSeparator({ className, ...props }) {
|
|
167
|
+
return /*#__PURE__*/ _jsx(CommandPrimitive.Separator, {
|
|
168
|
+
"data-slot": "command-separator",
|
|
169
|
+
className: cn('relative -mx-4 my-4 h-px', 'bg-border-neutral-menu-top', 'after:absolute after:inset-x-0 after:top-px after:h-px', 'after:bg-border-neutral-menu-bottom', className),
|
|
170
|
+
...props
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
function CommandItem({ className, ...props }) {
|
|
174
|
+
return /*#__PURE__*/ _jsx(CommandPrimitive.Item, {
|
|
175
|
+
"data-slot": "command-item",
|
|
176
|
+
className: cn('relative flex cursor-pointer select-none items-center gap-8 rounded-6 px-8 py-6', 'text-sm leading-20 text-foreground-neutral-subtle outline-none transition-colors', 'aria-selected:bg-background-components-hover aria-selected:text-foreground-neutral-base', 'data-[disabled=true]:pointer-events-none data-[disabled=true]:text-foreground-neutral-disabled', className),
|
|
177
|
+
...props
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
function CommandShortcut({ className, children, ...props }) {
|
|
181
|
+
return /*#__PURE__*/ _jsx(Kbd, {
|
|
182
|
+
"data-slot": "command-shortcut",
|
|
183
|
+
className: cn('ml-auto', className),
|
|
184
|
+
...props,
|
|
185
|
+
children: children
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
export { Command, CommandTrigger, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandSeparator, CommandShortcut, commandTriggerVariants };
|
|
189
|
+
|
|
190
|
+
//# sourceMappingURL=command.js.map
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Icon } from '../icon/index.js';
|
|
4
|
+
import { Popover, PopoverContent, PopoverTrigger } from '../popover/index.js';
|
|
5
|
+
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CommandTrigger } from './command.js';
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Components/Command',
|
|
8
|
+
component: Command,
|
|
9
|
+
tags: [
|
|
10
|
+
'autodocs'
|
|
11
|
+
]
|
|
12
|
+
};
|
|
13
|
+
export default meta;
|
|
14
|
+
export const Default = {
|
|
15
|
+
render: ()=>/*#__PURE__*/ _jsxs(Command, {
|
|
16
|
+
className: "rounded-10 shadow-tooltip max-w-400",
|
|
17
|
+
children: [
|
|
18
|
+
/*#__PURE__*/ _jsx(CommandInput, {
|
|
19
|
+
placeholder: "Type a command or search..."
|
|
20
|
+
}),
|
|
21
|
+
/*#__PURE__*/ _jsxs(CommandList, {
|
|
22
|
+
children: [
|
|
23
|
+
/*#__PURE__*/ _jsx(CommandEmpty, {
|
|
24
|
+
children: "No results found."
|
|
25
|
+
}),
|
|
26
|
+
/*#__PURE__*/ _jsxs(CommandGroup, {
|
|
27
|
+
heading: "Suggestions",
|
|
28
|
+
children: [
|
|
29
|
+
/*#__PURE__*/ _jsxs(CommandItem, {
|
|
30
|
+
children: [
|
|
31
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
32
|
+
name: "calendar2Line",
|
|
33
|
+
className: "size-16 mr-8"
|
|
34
|
+
}),
|
|
35
|
+
/*#__PURE__*/ _jsx("span", {
|
|
36
|
+
children: "Calendar"
|
|
37
|
+
})
|
|
38
|
+
]
|
|
39
|
+
}),
|
|
40
|
+
/*#__PURE__*/ _jsxs(CommandItem, {
|
|
41
|
+
children: [
|
|
42
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
43
|
+
name: "emotion2Line",
|
|
44
|
+
className: "size-16 mr-8"
|
|
45
|
+
}),
|
|
46
|
+
/*#__PURE__*/ _jsx("span", {
|
|
47
|
+
children: "Search Emoji"
|
|
48
|
+
})
|
|
49
|
+
]
|
|
50
|
+
}),
|
|
51
|
+
/*#__PURE__*/ _jsxs(CommandItem, {
|
|
52
|
+
children: [
|
|
53
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
54
|
+
name: "calculatorLine",
|
|
55
|
+
className: "size-16 mr-8"
|
|
56
|
+
}),
|
|
57
|
+
/*#__PURE__*/ _jsx("span", {
|
|
58
|
+
children: "Calculator"
|
|
59
|
+
})
|
|
60
|
+
]
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
}),
|
|
64
|
+
/*#__PURE__*/ _jsx(CommandSeparator, {}),
|
|
65
|
+
/*#__PURE__*/ _jsxs(CommandGroup, {
|
|
66
|
+
heading: "Settings",
|
|
67
|
+
children: [
|
|
68
|
+
/*#__PURE__*/ _jsxs(CommandItem, {
|
|
69
|
+
children: [
|
|
70
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
71
|
+
name: "user3Line",
|
|
72
|
+
className: "size-16 mr-8"
|
|
73
|
+
}),
|
|
74
|
+
/*#__PURE__*/ _jsx("span", {
|
|
75
|
+
children: "Profile"
|
|
76
|
+
}),
|
|
77
|
+
/*#__PURE__*/ _jsx(CommandShortcut, {
|
|
78
|
+
children: "⌘P"
|
|
79
|
+
})
|
|
80
|
+
]
|
|
81
|
+
}),
|
|
82
|
+
/*#__PURE__*/ _jsxs(CommandItem, {
|
|
83
|
+
children: [
|
|
84
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
85
|
+
name: "mailLine",
|
|
86
|
+
className: "size-16 mr-8"
|
|
87
|
+
}),
|
|
88
|
+
/*#__PURE__*/ _jsx("span", {
|
|
89
|
+
children: "Mail"
|
|
90
|
+
}),
|
|
91
|
+
/*#__PURE__*/ _jsx(CommandShortcut, {
|
|
92
|
+
children: "⌘M"
|
|
93
|
+
})
|
|
94
|
+
]
|
|
95
|
+
}),
|
|
96
|
+
/*#__PURE__*/ _jsxs(CommandItem, {
|
|
97
|
+
children: [
|
|
98
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
99
|
+
name: "settings3Line",
|
|
100
|
+
className: "size-16 mr-8"
|
|
101
|
+
}),
|
|
102
|
+
/*#__PURE__*/ _jsx("span", {
|
|
103
|
+
children: "Settings"
|
|
104
|
+
}),
|
|
105
|
+
/*#__PURE__*/ _jsx(CommandShortcut, {
|
|
106
|
+
children: "⌘S"
|
|
107
|
+
})
|
|
108
|
+
]
|
|
109
|
+
})
|
|
110
|
+
]
|
|
111
|
+
})
|
|
112
|
+
]
|
|
113
|
+
})
|
|
114
|
+
]
|
|
115
|
+
})
|
|
116
|
+
};
|
|
117
|
+
export const Combobox = {
|
|
118
|
+
render: ()=>{
|
|
119
|
+
const frameworks = [
|
|
120
|
+
{
|
|
121
|
+
value: 'next.js',
|
|
122
|
+
label: 'Next.js',
|
|
123
|
+
icon: 'reactjsLine'
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
value: 'sveltekit',
|
|
127
|
+
label: 'SvelteKit',
|
|
128
|
+
icon: 'svelteLine'
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
value: 'nuxt.js',
|
|
132
|
+
label: 'Nuxt.js',
|
|
133
|
+
icon: 'vuejsLine'
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
value: 'remix',
|
|
137
|
+
label: 'Remix',
|
|
138
|
+
icon: 'reactjsLine'
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
value: 'astro',
|
|
142
|
+
label: 'Astro',
|
|
143
|
+
icon: 'rocketLine'
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
value: 'vue',
|
|
147
|
+
label: 'Vue',
|
|
148
|
+
icon: 'vuejsLine'
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
value: 'react',
|
|
152
|
+
label: 'React',
|
|
153
|
+
icon: 'reactjsLine'
|
|
154
|
+
}
|
|
155
|
+
];
|
|
156
|
+
function ComboboxDemo() {
|
|
157
|
+
const [open, setOpen] = useState(false);
|
|
158
|
+
const [value, setValue] = useState('');
|
|
159
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
160
|
+
className: "flex flex-col gap-16",
|
|
161
|
+
children: [
|
|
162
|
+
/*#__PURE__*/ _jsxs(Popover, {
|
|
163
|
+
open: open,
|
|
164
|
+
onOpenChange: setOpen,
|
|
165
|
+
children: [
|
|
166
|
+
/*#__PURE__*/ _jsx(PopoverTrigger, {
|
|
167
|
+
asChild: true,
|
|
168
|
+
children: /*#__PURE__*/ _jsx(CommandTrigger, {
|
|
169
|
+
className: "w-280",
|
|
170
|
+
placeholder: "Select framework...",
|
|
171
|
+
children: value ? frameworks.find((framework)=>framework.value === value)?.label : null
|
|
172
|
+
})
|
|
173
|
+
}),
|
|
174
|
+
/*#__PURE__*/ _jsx(PopoverContent, {
|
|
175
|
+
className: "w-280 p-0",
|
|
176
|
+
align: "start",
|
|
177
|
+
children: /*#__PURE__*/ _jsxs(Command, {
|
|
178
|
+
children: [
|
|
179
|
+
/*#__PURE__*/ _jsx(CommandInput, {
|
|
180
|
+
placeholder: "Search framework..."
|
|
181
|
+
}),
|
|
182
|
+
/*#__PURE__*/ _jsxs(CommandList, {
|
|
183
|
+
children: [
|
|
184
|
+
/*#__PURE__*/ _jsx(CommandEmpty, {
|
|
185
|
+
children: "No framework found."
|
|
186
|
+
}),
|
|
187
|
+
/*#__PURE__*/ _jsx(CommandGroup, {
|
|
188
|
+
children: frameworks.map((framework)=>/*#__PURE__*/ _jsxs(CommandItem, {
|
|
189
|
+
value: framework.value,
|
|
190
|
+
onSelect: (currentValue)=>{
|
|
191
|
+
setValue(currentValue === value ? '' : currentValue);
|
|
192
|
+
setOpen(false);
|
|
193
|
+
},
|
|
194
|
+
children: [
|
|
195
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
196
|
+
name: "check",
|
|
197
|
+
className: `size-16 mr-8 ${value === framework.value ? 'opacity-100' : 'opacity-0'}`
|
|
198
|
+
}),
|
|
199
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
200
|
+
name: framework.icon,
|
|
201
|
+
className: "size-16 mr-8"
|
|
202
|
+
}),
|
|
203
|
+
framework.label
|
|
204
|
+
]
|
|
205
|
+
}, framework.value))
|
|
206
|
+
})
|
|
207
|
+
]
|
|
208
|
+
})
|
|
209
|
+
]
|
|
210
|
+
})
|
|
211
|
+
})
|
|
212
|
+
]
|
|
213
|
+
}),
|
|
214
|
+
value && /*#__PURE__*/ _jsxs("p", {
|
|
215
|
+
className: "text-sm text-foreground-neutral-muted",
|
|
216
|
+
children: [
|
|
217
|
+
"Selected: ",
|
|
218
|
+
frameworks.find((f)=>f.value === value)?.label
|
|
219
|
+
]
|
|
220
|
+
})
|
|
221
|
+
]
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
return /*#__PURE__*/ _jsx(ComboboxDemo, {});
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
//# sourceMappingURL=command.stories.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Icon } from '../../../components/icon/index.js';
|
|
3
|
+
import { motion } from 'framer-motion';
|
|
4
|
+
const LOGO_HEIGHT = 48;
|
|
5
|
+
export function AnimatedLogo({ scrollProgress }) {
|
|
6
|
+
const isVisible = scrollProgress > 0;
|
|
7
|
+
if (!isVisible) return null;
|
|
8
|
+
const easedProgress = 1 - (1 - scrollProgress) ** 3;
|
|
9
|
+
return /*#__PURE__*/ _jsx(motion.div, {
|
|
10
|
+
className: "fixed top-0 left-0 z-50 flex items-center justify-center shrink-0 w-48 h-48 bg-background-neutral-base",
|
|
11
|
+
style: {
|
|
12
|
+
opacity: easedProgress,
|
|
13
|
+
transform: `translateY(${-LOGO_HEIGHT + easedProgress * LOGO_HEIGHT}px)`
|
|
14
|
+
},
|
|
15
|
+
initial: false,
|
|
16
|
+
children: /*#__PURE__*/ _jsx(Icon, {
|
|
17
|
+
name: "shipfox",
|
|
18
|
+
className: "size-20 text-foreground-neutral-subtle"
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=animated-logo.js.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import { type BarProps, BarChart as RechartsBarChart } from 'recharts';
|
|
3
|
+
import { type ChartColor } from './colors';
|
|
4
|
+
export type RechartsBarChartProps = ComponentProps<typeof RechartsBarChart>;
|
|
5
|
+
export interface BarChartBar extends Omit<BarProps, 'dataKey'> {
|
|
6
|
+
dataKey: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
color?: ChartColor;
|
|
9
|
+
}
|
|
10
|
+
export interface BarChartProps {
|
|
11
|
+
data: RechartsBarChartProps['data'];
|
|
12
|
+
bars: BarChartBar[];
|
|
13
|
+
syncId?: RechartsBarChartProps['syncId'];
|
|
14
|
+
height?: number;
|
|
15
|
+
xAxis?: {
|
|
16
|
+
dataKey?: string;
|
|
17
|
+
tickFormatter?: (value: string) => string;
|
|
18
|
+
hide?: boolean;
|
|
19
|
+
interval?: number | 'preserveStart' | 'preserveEnd' | 'preserveStartEnd';
|
|
20
|
+
};
|
|
21
|
+
yAxis?: {
|
|
22
|
+
domain?: [number, number];
|
|
23
|
+
ticks?: number[];
|
|
24
|
+
hide?: boolean;
|
|
25
|
+
};
|
|
26
|
+
grid?: {
|
|
27
|
+
vertical?: boolean;
|
|
28
|
+
horizontal?: boolean;
|
|
29
|
+
};
|
|
30
|
+
tooltip?: {
|
|
31
|
+
labelFormatter?: (label: string) => string;
|
|
32
|
+
};
|
|
33
|
+
className?: string;
|
|
34
|
+
title?: string;
|
|
35
|
+
barRadius?: [number, number, number, number];
|
|
36
|
+
maxBarSize?: number;
|
|
37
|
+
}
|
|
38
|
+
export declare function BarChart({ data, bars, height, xAxis, yAxis, grid, tooltip, className, title, barRadius, maxBarSize, }: BarChartProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
//# sourceMappingURL=bar-chart.d.ts.map
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Bar, CartesianGrid, BarChart as RechartsBarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
|
|
4
|
+
import { cn } from '../../../../utils/cn.js';
|
|
5
|
+
import { ChartTooltipContent } from './chart-tooltip.js';
|
|
6
|
+
import { chartColors, chartColorsList } from './colors.js';
|
|
7
|
+
export function BarChart({ data, bars, height = 200, xAxis, yAxis, grid, tooltip, className, title, barRadius = [
|
|
8
|
+
2,
|
|
9
|
+
2,
|
|
10
|
+
0,
|
|
11
|
+
0
|
|
12
|
+
], maxBarSize = 8 }) {
|
|
13
|
+
const [hoveredDataKey, setHoveredDataKey] = useState(undefined);
|
|
14
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
15
|
+
className: cn('p-12 rounded-8 bg-background-neutral-base border border-border-neutral-base', className),
|
|
16
|
+
children: [
|
|
17
|
+
title && /*#__PURE__*/ _jsx("p", {
|
|
18
|
+
className: "text-sm font-medium text-foreground-neutral-base mb-12",
|
|
19
|
+
children: title
|
|
20
|
+
}),
|
|
21
|
+
/*#__PURE__*/ _jsx("div", {
|
|
22
|
+
style: {
|
|
23
|
+
height
|
|
24
|
+
},
|
|
25
|
+
children: /*#__PURE__*/ _jsx(ResponsiveContainer, {
|
|
26
|
+
width: "100%",
|
|
27
|
+
height: "100%",
|
|
28
|
+
children: /*#__PURE__*/ _jsxs(RechartsBarChart, {
|
|
29
|
+
data: data,
|
|
30
|
+
margin: {
|
|
31
|
+
top: 8,
|
|
32
|
+
right: 8,
|
|
33
|
+
left: -20,
|
|
34
|
+
bottom: 0
|
|
35
|
+
},
|
|
36
|
+
children: [
|
|
37
|
+
!xAxis?.hide && /*#__PURE__*/ _jsx(XAxis, {
|
|
38
|
+
dataKey: xAxis?.dataKey ?? 'label',
|
|
39
|
+
axisLine: false,
|
|
40
|
+
tickLine: false,
|
|
41
|
+
tick: {
|
|
42
|
+
fill: 'var(--foreground-neutral-muted)',
|
|
43
|
+
fontSize: 12
|
|
44
|
+
},
|
|
45
|
+
tickFormatter: xAxis?.tickFormatter,
|
|
46
|
+
interval: xAxis?.interval ?? 'preserveStartEnd'
|
|
47
|
+
}),
|
|
48
|
+
!yAxis?.hide && /*#__PURE__*/ _jsx(YAxis, {
|
|
49
|
+
axisLine: false,
|
|
50
|
+
tickLine: false,
|
|
51
|
+
tick: {
|
|
52
|
+
fill: 'var(--foreground-neutral-muted)',
|
|
53
|
+
fontSize: 12
|
|
54
|
+
},
|
|
55
|
+
domain: yAxis?.domain,
|
|
56
|
+
ticks: yAxis?.ticks
|
|
57
|
+
}),
|
|
58
|
+
/*#__PURE__*/ _jsx(CartesianGrid, {
|
|
59
|
+
strokeDasharray: "3 3",
|
|
60
|
+
stroke: "var(--border-neutral-base)",
|
|
61
|
+
vertical: grid?.vertical ?? false,
|
|
62
|
+
horizontal: grid?.horizontal ?? true
|
|
63
|
+
}),
|
|
64
|
+
/*#__PURE__*/ _jsx(Tooltip, {
|
|
65
|
+
cursor: {
|
|
66
|
+
fill: 'var(--background-neutral-hover)'
|
|
67
|
+
},
|
|
68
|
+
content: (props)=>{
|
|
69
|
+
if (!props.active) return null;
|
|
70
|
+
return /*#__PURE__*/ _jsx(ChartTooltipContent, {
|
|
71
|
+
active: props.active,
|
|
72
|
+
label: props.label,
|
|
73
|
+
payload: props.payload,
|
|
74
|
+
hoveredDataKey: hoveredDataKey,
|
|
75
|
+
labelFormatter: tooltip?.labelFormatter
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}),
|
|
79
|
+
bars.map((bar, index)=>{
|
|
80
|
+
const defaultColor = bar.color ? chartColors[bar.color] : chartColorsList[index % chartColorsList.length];
|
|
81
|
+
const fillOpacity = hoveredDataKey ? hoveredDataKey === bar.dataKey ? 1 : 0.25 : 1;
|
|
82
|
+
const { dataKey, name, ...restBar } = bar;
|
|
83
|
+
return /*#__PURE__*/ _jsx(Bar, {
|
|
84
|
+
dataKey: dataKey,
|
|
85
|
+
name: name ?? dataKey,
|
|
86
|
+
fill: defaultColor,
|
|
87
|
+
fillOpacity: fillOpacity,
|
|
88
|
+
radius: barRadius,
|
|
89
|
+
maxBarSize: maxBarSize,
|
|
90
|
+
onMouseEnter: ()=>setHoveredDataKey(dataKey),
|
|
91
|
+
onMouseLeave: ()=>setHoveredDataKey(undefined),
|
|
92
|
+
isAnimationActive: false,
|
|
93
|
+
...restBar
|
|
94
|
+
}, dataKey);
|
|
95
|
+
})
|
|
96
|
+
]
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
})
|
|
100
|
+
]
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
//# sourceMappingURL=bar-chart.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ChartTooltipContentProps {
|
|
2
|
+
active?: boolean;
|
|
3
|
+
label?: string | number;
|
|
4
|
+
payload?: ReadonlyArray<{
|
|
5
|
+
name?: string;
|
|
6
|
+
value?: string | number;
|
|
7
|
+
dataKey?: string | number;
|
|
8
|
+
color?: string;
|
|
9
|
+
}>;
|
|
10
|
+
hoveredDataKey?: string;
|
|
11
|
+
labelFormatter?: (label: string) => string;
|
|
12
|
+
}
|
|
13
|
+
export declare function ChartTooltipContent({ active, label, payload, hoveredDataKey, labelFormatter, }: ChartTooltipContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
//# sourceMappingURL=chart-tooltip.d.ts.map
|