@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
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Icon } from '../../../components/icon/index.js';
|
|
3
|
+
import { Search, SearchContent, SearchEmpty, SearchFooter, SearchGroup, SearchInput, SearchItem, SearchList, SearchSeparator, SearchTrigger } from '../../../components/search/index.js';
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { cn } from '../../../utils/cn.js';
|
|
6
|
+
export function ToolbarSearch({ placeholder = 'Try: job name, status, pipeline...', shortcutKey = 'meta+k', onSelect, className }) {
|
|
7
|
+
const [open, setOpen] = useState(false);
|
|
8
|
+
const handleSelect = (value)=>{
|
|
9
|
+
onSelect?.(value);
|
|
10
|
+
setOpen(false);
|
|
11
|
+
};
|
|
12
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
13
|
+
className: "flex-1",
|
|
14
|
+
children: /*#__PURE__*/ _jsxs(Search, {
|
|
15
|
+
open: open,
|
|
16
|
+
onOpenChange: setOpen,
|
|
17
|
+
shortcutKey: shortcutKey,
|
|
18
|
+
children: [
|
|
19
|
+
/*#__PURE__*/ _jsx(SearchTrigger, {
|
|
20
|
+
placeholder: placeholder,
|
|
21
|
+
size: "small",
|
|
22
|
+
variant: "primary",
|
|
23
|
+
className: cn('w-full', className)
|
|
24
|
+
}),
|
|
25
|
+
/*#__PURE__*/ _jsxs(SearchContent, {
|
|
26
|
+
"aria-describedby": undefined,
|
|
27
|
+
children: [
|
|
28
|
+
/*#__PURE__*/ _jsx(SearchInput, {
|
|
29
|
+
placeholder: "Search for anything..."
|
|
30
|
+
}),
|
|
31
|
+
/*#__PURE__*/ _jsxs(SearchList, {
|
|
32
|
+
children: [
|
|
33
|
+
/*#__PURE__*/ _jsx(SearchEmpty, {
|
|
34
|
+
children: "No results found."
|
|
35
|
+
}),
|
|
36
|
+
/*#__PURE__*/ _jsxs(SearchGroup, {
|
|
37
|
+
heading: "Recent",
|
|
38
|
+
children: [
|
|
39
|
+
/*#__PURE__*/ _jsx(SearchItem, {
|
|
40
|
+
icon: /*#__PURE__*/ _jsx(Icon, {
|
|
41
|
+
name: "gitBranchLine",
|
|
42
|
+
className: "size-16 text-foreground-neutral-subtle"
|
|
43
|
+
}),
|
|
44
|
+
description: "CI Pipeline",
|
|
45
|
+
onSelect: ()=>handleSelect('feat/data-processing'),
|
|
46
|
+
children: "feat/data-processing"
|
|
47
|
+
}),
|
|
48
|
+
/*#__PURE__*/ _jsx(SearchItem, {
|
|
49
|
+
icon: /*#__PURE__*/ _jsx(Icon, {
|
|
50
|
+
name: "gitBranchLine",
|
|
51
|
+
className: "size-16 text-foreground-neutral-subtle"
|
|
52
|
+
}),
|
|
53
|
+
description: "CI Pipeline",
|
|
54
|
+
onSelect: ()=>handleSelect('feat/pagination-polling'),
|
|
55
|
+
children: "feat/pagination-polling"
|
|
56
|
+
})
|
|
57
|
+
]
|
|
58
|
+
}),
|
|
59
|
+
/*#__PURE__*/ _jsx(SearchSeparator, {}),
|
|
60
|
+
/*#__PURE__*/ _jsxs(SearchGroup, {
|
|
61
|
+
heading: "Jobs",
|
|
62
|
+
children: [
|
|
63
|
+
/*#__PURE__*/ _jsx(SearchItem, {
|
|
64
|
+
icon: /*#__PURE__*/ _jsx(Icon, {
|
|
65
|
+
name: "settings3Line",
|
|
66
|
+
className: "size-16 text-foreground-neutral-subtle"
|
|
67
|
+
}),
|
|
68
|
+
description: "Running",
|
|
69
|
+
onSelect: ()=>handleSelect('build-docker-image'),
|
|
70
|
+
children: "build-docker-image"
|
|
71
|
+
}),
|
|
72
|
+
/*#__PURE__*/ _jsx(SearchItem, {
|
|
73
|
+
icon: /*#__PURE__*/ _jsx(Icon, {
|
|
74
|
+
name: "settings3Line",
|
|
75
|
+
className: "size-16 text-foreground-neutral-subtle"
|
|
76
|
+
}),
|
|
77
|
+
description: "Completed",
|
|
78
|
+
onSelect: ()=>handleSelect('run-tests'),
|
|
79
|
+
children: "run-tests"
|
|
80
|
+
})
|
|
81
|
+
]
|
|
82
|
+
}),
|
|
83
|
+
/*#__PURE__*/ _jsx(SearchSeparator, {}),
|
|
84
|
+
/*#__PURE__*/ _jsxs(SearchGroup, {
|
|
85
|
+
heading: "Status",
|
|
86
|
+
children: [
|
|
87
|
+
/*#__PURE__*/ _jsx(SearchItem, {
|
|
88
|
+
icon: /*#__PURE__*/ _jsx(Icon, {
|
|
89
|
+
name: "checkboxCircleLine",
|
|
90
|
+
className: "size-16 text-foreground-success-base"
|
|
91
|
+
}),
|
|
92
|
+
onSelect: ()=>handleSelect('status:success'),
|
|
93
|
+
children: "Success"
|
|
94
|
+
}),
|
|
95
|
+
/*#__PURE__*/ _jsx(SearchItem, {
|
|
96
|
+
icon: /*#__PURE__*/ _jsx(Icon, {
|
|
97
|
+
name: "errorWarningLine",
|
|
98
|
+
className: "size-16 text-foreground-danger-base"
|
|
99
|
+
}),
|
|
100
|
+
onSelect: ()=>handleSelect('status:failed'),
|
|
101
|
+
children: "Failed"
|
|
102
|
+
}),
|
|
103
|
+
/*#__PURE__*/ _jsx(SearchItem, {
|
|
104
|
+
icon: /*#__PURE__*/ _jsx(Icon, {
|
|
105
|
+
name: "loopRightLine",
|
|
106
|
+
className: "size-16 text-foreground-warning-base"
|
|
107
|
+
}),
|
|
108
|
+
onSelect: ()=>handleSelect('status:running'),
|
|
109
|
+
children: "Running"
|
|
110
|
+
})
|
|
111
|
+
]
|
|
112
|
+
})
|
|
113
|
+
]
|
|
114
|
+
}),
|
|
115
|
+
/*#__PURE__*/ _jsx(SearchFooter, {})
|
|
116
|
+
]
|
|
117
|
+
})
|
|
118
|
+
]
|
|
119
|
+
})
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
//# sourceMappingURL=toolbar-search.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ViewColumn {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
visible: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface ViewDropdownProps {
|
|
7
|
+
columns?: ViewColumn[];
|
|
8
|
+
onColumnsChange?: (columns: ViewColumn[]) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function ViewDropdown({ columns: controlledColumns, onColumnsChange }: ViewDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=view-dropdown.d.ts.map
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from '../../../components/button/index.js';
|
|
3
|
+
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from '../../../components/dropdown-menu/index.js';
|
|
4
|
+
import { Icon } from '../../../components/icon/index.js';
|
|
5
|
+
import { useState } from 'react';
|
|
6
|
+
const defaultColumns = [
|
|
7
|
+
{
|
|
8
|
+
id: 'total',
|
|
9
|
+
label: 'Total',
|
|
10
|
+
visible: true
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: 'success',
|
|
14
|
+
label: 'Success',
|
|
15
|
+
visible: true
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: 'failed',
|
|
19
|
+
label: 'Failed',
|
|
20
|
+
visible: true
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: 'neutral',
|
|
24
|
+
label: 'Neutral',
|
|
25
|
+
visible: true
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 'flaked',
|
|
29
|
+
label: 'Flaked',
|
|
30
|
+
visible: true
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: 'failure-rate',
|
|
34
|
+
label: 'Failure rate',
|
|
35
|
+
visible: true
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 'flake-rate',
|
|
39
|
+
label: 'Flake rate',
|
|
40
|
+
visible: true
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 'repository',
|
|
44
|
+
label: 'Repository',
|
|
45
|
+
visible: false
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: 'branch',
|
|
49
|
+
label: 'Branch',
|
|
50
|
+
visible: false
|
|
51
|
+
}
|
|
52
|
+
];
|
|
53
|
+
export function ViewDropdown({ columns: controlledColumns, onColumnsChange }) {
|
|
54
|
+
const [internalColumns, setInternalColumns] = useState(defaultColumns);
|
|
55
|
+
const columns = controlledColumns ?? internalColumns;
|
|
56
|
+
const handleColumnChange = (columnId, visible)=>{
|
|
57
|
+
const updatedColumns = columns.map((col)=>col.id === columnId ? {
|
|
58
|
+
...col,
|
|
59
|
+
visible
|
|
60
|
+
} : col);
|
|
61
|
+
if (onColumnsChange) {
|
|
62
|
+
onColumnsChange(updatedColumns);
|
|
63
|
+
} else {
|
|
64
|
+
setInternalColumns(updatedColumns);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
return /*#__PURE__*/ _jsxs(DropdownMenu, {
|
|
68
|
+
children: [
|
|
69
|
+
/*#__PURE__*/ _jsx(DropdownMenuTrigger, {
|
|
70
|
+
asChild: true,
|
|
71
|
+
children: /*#__PURE__*/ _jsxs(Button, {
|
|
72
|
+
variant: "secondary",
|
|
73
|
+
size: "sm",
|
|
74
|
+
"aria-label": "Customize columns",
|
|
75
|
+
children: [
|
|
76
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
77
|
+
name: "stackedView",
|
|
78
|
+
className: "size-16 text-foreground-neutral-subtle block md:hidden"
|
|
79
|
+
}),
|
|
80
|
+
/*#__PURE__*/ _jsxs("span", {
|
|
81
|
+
className: "hidden md:inline-flex items-center gap-6",
|
|
82
|
+
children: [
|
|
83
|
+
"View ",
|
|
84
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
85
|
+
name: "stackedView",
|
|
86
|
+
className: "size-16 text-foreground-neutral-subtle"
|
|
87
|
+
})
|
|
88
|
+
]
|
|
89
|
+
})
|
|
90
|
+
]
|
|
91
|
+
})
|
|
92
|
+
}),
|
|
93
|
+
/*#__PURE__*/ _jsxs(DropdownMenuContent, {
|
|
94
|
+
align: "end",
|
|
95
|
+
className: "w-180",
|
|
96
|
+
children: [
|
|
97
|
+
/*#__PURE__*/ _jsx(DropdownMenuLabel, {
|
|
98
|
+
children: "Custom display"
|
|
99
|
+
}),
|
|
100
|
+
/*#__PURE__*/ _jsx(DropdownMenuSeparator, {}),
|
|
101
|
+
columns.map((column)=>/*#__PURE__*/ _jsx(DropdownMenuCheckboxItem, {
|
|
102
|
+
checked: column.visible,
|
|
103
|
+
onCheckedChange: (visible)=>handleColumnChange(column.id, visible),
|
|
104
|
+
closeOnSelect: false,
|
|
105
|
+
children: column.label
|
|
106
|
+
}, column.id))
|
|
107
|
+
]
|
|
108
|
+
})
|
|
109
|
+
]
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
//# sourceMappingURL=view-dropdown.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { argosScreenshot } from '@argos-ci/storybook/vitest';
|
|
2
3
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
3
4
|
import { Button } from '../../components/button/index.js';
|
|
4
5
|
import { Checkbox, CheckboxLabel, CheckboxLinks } from '../../components/checkbox/index.js';
|
|
@@ -89,7 +90,11 @@ function BasicFormExample() {
|
|
|
89
90
|
});
|
|
90
91
|
}
|
|
91
92
|
export const Basic = {
|
|
92
|
-
render: ()=>/*#__PURE__*/ _jsx(BasicFormExample, {})
|
|
93
|
+
render: ()=>/*#__PURE__*/ _jsx(BasicFormExample, {}),
|
|
94
|
+
play: async (context)=>{
|
|
95
|
+
await new Promise((resolve)=>setTimeout(resolve, 100));
|
|
96
|
+
await argosScreenshot(context, 'Form Basic');
|
|
97
|
+
}
|
|
93
98
|
};
|
|
94
99
|
const componentsFormSchema = z.object({
|
|
95
100
|
example: z.string().min(1, 'This field is required'),
|
|
@@ -2,9 +2,11 @@ export * from './alert';
|
|
|
2
2
|
export * from './avatar';
|
|
3
3
|
export * from './badge';
|
|
4
4
|
export * from './button';
|
|
5
|
+
export * from './button-group';
|
|
5
6
|
export * from './calendar';
|
|
6
7
|
export * from './checkbox';
|
|
7
8
|
export * from './code-block';
|
|
9
|
+
export * from './command';
|
|
8
10
|
export * from './confetti';
|
|
9
11
|
export * from './date-picker';
|
|
10
12
|
export * from './date-time-range-picker';
|
|
@@ -16,11 +18,17 @@ export * from './icon';
|
|
|
16
18
|
export * from './inline-tips';
|
|
17
19
|
export * from './input';
|
|
18
20
|
export * from './item';
|
|
21
|
+
export * from './kbd';
|
|
19
22
|
export * from './label';
|
|
20
23
|
export * from './modal';
|
|
21
24
|
export * from './moving-border';
|
|
22
25
|
export * from './popover';
|
|
26
|
+
export * from './search';
|
|
27
|
+
export * from './select';
|
|
28
|
+
export * from './sheet';
|
|
23
29
|
export * from './shiny-text';
|
|
30
|
+
export * from './skeleton';
|
|
31
|
+
export * from './table';
|
|
24
32
|
export * from './tabs';
|
|
25
33
|
export * from './textarea';
|
|
26
34
|
export * from './theme';
|
package/dist/components/index.js
CHANGED
|
@@ -2,9 +2,11 @@ export * from './alert/index.js';
|
|
|
2
2
|
export * from './avatar/index.js';
|
|
3
3
|
export * from './badge/index.js';
|
|
4
4
|
export * from './button/index.js';
|
|
5
|
+
export * from './button-group/index.js';
|
|
5
6
|
export * from './calendar/index.js';
|
|
6
7
|
export * from './checkbox/index.js';
|
|
7
8
|
export * from './code-block/index.js';
|
|
9
|
+
export * from './command/index.js';
|
|
8
10
|
export * from './confetti/index.js';
|
|
9
11
|
export * from './date-picker/index.js';
|
|
10
12
|
export * from './date-time-range-picker/index.js';
|
|
@@ -16,11 +18,17 @@ export * from './icon/index.js';
|
|
|
16
18
|
export * from './inline-tips/index.js';
|
|
17
19
|
export * from './input/index.js';
|
|
18
20
|
export * from './item/index.js';
|
|
21
|
+
export * from './kbd/index.js';
|
|
19
22
|
export * from './label/index.js';
|
|
20
23
|
export * from './modal/index.js';
|
|
21
24
|
export * from './moving-border/index.js';
|
|
22
25
|
export * from './popover/index.js';
|
|
26
|
+
export * from './search/index.js';
|
|
27
|
+
export * from './select/index.js';
|
|
28
|
+
export * from './sheet/index.js';
|
|
23
29
|
export * from './shiny-text/index.js';
|
|
30
|
+
export * from './skeleton/index.js';
|
|
31
|
+
export * from './table/index.js';
|
|
24
32
|
export * from './tabs/index.js';
|
|
25
33
|
export * from './textarea/index.js';
|
|
26
34
|
export * from './theme/index.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
type KbdProps = ComponentProps<'kbd'>;
|
|
3
|
+
export declare function Kbd({ className, ...props }: KbdProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
type KbdGroupProps = ComponentProps<'div'>;
|
|
5
|
+
export declare function KbdGroup({ className, ...props }: KbdGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=kbd.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '../../utils/cn.js';
|
|
3
|
+
export function Kbd({ className, ...props }) {
|
|
4
|
+
return /*#__PURE__*/ _jsx("kbd", {
|
|
5
|
+
"data-slot": "kbd",
|
|
6
|
+
className: cn('pointer-events-none inline-flex h-20 w-fit min-w-20 items-center justify-center gap-1 rounded-4 px-4 font-display text-xs font-medium select-none', 'bg-background-components-base text-foreground-neutral-subtle border border-border-neutral-base shadow-button-neutral', '[&_svg:not([class*="size-"])]:size-12', 'in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10', className),
|
|
7
|
+
...props
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
export function KbdGroup({ className, ...props }) {
|
|
11
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
12
|
+
"data-slot": "kbd-group",
|
|
13
|
+
className: cn('inline-flex items-center gap-4', className),
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=kbd.js.map
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Kbd, KbdGroup } from './kbd.js';
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Components/Kbd',
|
|
5
|
+
component: Kbd,
|
|
6
|
+
tags: [
|
|
7
|
+
'autodocs'
|
|
8
|
+
]
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
export const Default = {
|
|
12
|
+
render: ()=>/*#__PURE__*/ _jsxs("div", {
|
|
13
|
+
className: "flex flex-wrap gap-8",
|
|
14
|
+
children: [
|
|
15
|
+
/*#__PURE__*/ _jsx(Kbd, {
|
|
16
|
+
children: "Ctrl"
|
|
17
|
+
}),
|
|
18
|
+
/*#__PURE__*/ _jsx(Kbd, {
|
|
19
|
+
children: "Alt"
|
|
20
|
+
}),
|
|
21
|
+
/*#__PURE__*/ _jsx(Kbd, {
|
|
22
|
+
children: "Shift"
|
|
23
|
+
}),
|
|
24
|
+
/*#__PURE__*/ _jsx(Kbd, {
|
|
25
|
+
children: "⌘"
|
|
26
|
+
}),
|
|
27
|
+
/*#__PURE__*/ _jsx(Kbd, {
|
|
28
|
+
children: "⌥"
|
|
29
|
+
}),
|
|
30
|
+
/*#__PURE__*/ _jsx(Kbd, {
|
|
31
|
+
children: "⇧"
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
})
|
|
35
|
+
};
|
|
36
|
+
export const KeyCombination = {
|
|
37
|
+
render: ()=>/*#__PURE__*/ _jsxs("div", {
|
|
38
|
+
className: "flex flex-wrap items-center gap-12",
|
|
39
|
+
children: [
|
|
40
|
+
/*#__PURE__*/ _jsx(Kbd, {
|
|
41
|
+
children: "⌘K"
|
|
42
|
+
}),
|
|
43
|
+
/*#__PURE__*/ _jsxs(KbdGroup, {
|
|
44
|
+
children: [
|
|
45
|
+
/*#__PURE__*/ _jsx(Kbd, {
|
|
46
|
+
children: "Ctrl"
|
|
47
|
+
}),
|
|
48
|
+
/*#__PURE__*/ _jsx(Kbd, {
|
|
49
|
+
children: "Shift"
|
|
50
|
+
}),
|
|
51
|
+
/*#__PURE__*/ _jsx(Kbd, {
|
|
52
|
+
children: "P"
|
|
53
|
+
})
|
|
54
|
+
]
|
|
55
|
+
}),
|
|
56
|
+
/*#__PURE__*/ _jsxs(KbdGroup, {
|
|
57
|
+
children: [
|
|
58
|
+
/*#__PURE__*/ _jsx(Kbd, {
|
|
59
|
+
children: "Alt"
|
|
60
|
+
}),
|
|
61
|
+
/*#__PURE__*/ _jsx(Kbd, {
|
|
62
|
+
children: "Enter"
|
|
63
|
+
})
|
|
64
|
+
]
|
|
65
|
+
})
|
|
66
|
+
]
|
|
67
|
+
})
|
|
68
|
+
};
|
|
69
|
+
export const InMenu = {
|
|
70
|
+
render: ()=>/*#__PURE__*/ _jsx("div", {
|
|
71
|
+
className: "max-w-400 rounded-10 border border-border-neutral-base p-8",
|
|
72
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
73
|
+
className: "flex flex-col gap-4",
|
|
74
|
+
children: [
|
|
75
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
76
|
+
className: "flex items-center justify-between p-8 rounded-6 hover:bg-background-components-hover transition-colors",
|
|
77
|
+
children: [
|
|
78
|
+
/*#__PURE__*/ _jsx("span", {
|
|
79
|
+
className: "text-sm text-foreground-neutral-subtle",
|
|
80
|
+
children: "Copy"
|
|
81
|
+
}),
|
|
82
|
+
/*#__PURE__*/ _jsx(Kbd, {
|
|
83
|
+
children: "⌘C"
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
}),
|
|
87
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
88
|
+
className: "flex items-center justify-between p-8 rounded-6 hover:bg-background-components-hover transition-colors",
|
|
89
|
+
children: [
|
|
90
|
+
/*#__PURE__*/ _jsx("span", {
|
|
91
|
+
className: "text-sm text-foreground-neutral-subtle",
|
|
92
|
+
children: "Paste"
|
|
93
|
+
}),
|
|
94
|
+
/*#__PURE__*/ _jsx(Kbd, {
|
|
95
|
+
children: "⌘V"
|
|
96
|
+
})
|
|
97
|
+
]
|
|
98
|
+
}),
|
|
99
|
+
/*#__PURE__*/ _jsx("div", {
|
|
100
|
+
className: "h-px bg-border-neutral-base my-4"
|
|
101
|
+
}),
|
|
102
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
103
|
+
className: "flex items-center justify-between p-8 rounded-6 hover:bg-background-components-hover transition-colors",
|
|
104
|
+
children: [
|
|
105
|
+
/*#__PURE__*/ _jsx("span", {
|
|
106
|
+
className: "text-sm text-foreground-neutral-subtle",
|
|
107
|
+
children: "Command Palette"
|
|
108
|
+
}),
|
|
109
|
+
/*#__PURE__*/ _jsx(Kbd, {
|
|
110
|
+
children: "⌘K"
|
|
111
|
+
})
|
|
112
|
+
]
|
|
113
|
+
})
|
|
114
|
+
]
|
|
115
|
+
})
|
|
116
|
+
})
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
//# sourceMappingURL=kbd.stories.js.map
|
|
@@ -3,6 +3,7 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
4
|
import { Button } from '../../components/button/index.js';
|
|
5
5
|
import { Icon } from '../../components/icon/index.js';
|
|
6
|
+
import { Kbd } from '../../components/kbd/index.js';
|
|
6
7
|
import { Text } from '../../components/typography/index.js';
|
|
7
8
|
import { motion } from 'framer-motion';
|
|
8
9
|
import { useMediaQuery } from '../../hooks/useMediaQuery.js';
|
|
@@ -180,9 +181,8 @@ function ModalHeader({ className, title, showEscIndicator = true, showClose = tr
|
|
|
180
181
|
/*#__PURE__*/ _jsxs("div", {
|
|
181
182
|
className: "flex items-center gap-8",
|
|
182
183
|
children: [
|
|
183
|
-
isDesktop && showEscIndicator && /*#__PURE__*/ _jsx(
|
|
184
|
-
|
|
185
|
-
children: "esc"
|
|
184
|
+
isDesktop && showEscIndicator && /*#__PURE__*/ _jsx(Kbd, {
|
|
185
|
+
children: "Esc"
|
|
186
186
|
}),
|
|
187
187
|
showClose && /*#__PURE__*/ _jsx(ModalClose, {
|
|
188
188
|
asChild: true,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Search, type SearchProps } from './search';
|
|
2
|
+
export { useSearchContext } from './search-context';
|
|
3
|
+
export { SearchInline, type SearchInlineProps } from './search-inline';
|
|
4
|
+
export { SearchContent, type SearchContentProps, SearchEmpty, type SearchEmptyProps, SearchFooter, type SearchFooterProps, SearchGroup, type SearchGroupProps, SearchInput, type SearchInputProps, SearchItem, type SearchItemProps, SearchList, type SearchListProps, SearchSeparator, type SearchSeparatorProps, } from './search-modal';
|
|
5
|
+
export { SearchTrigger, type SearchTriggerProps } from './search-trigger';
|
|
6
|
+
export { searchDefaultTransition, searchInputVariants, searchTriggerVariants, } from './search-variants';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { Search } from './search.js';
|
|
2
|
+
export { useSearchContext } from './search-context.js';
|
|
3
|
+
export { SearchInline } from './search-inline.js';
|
|
4
|
+
export { SearchContent, SearchEmpty, SearchFooter, SearchGroup, SearchInput, SearchItem, SearchList, SearchSeparator } from './search-modal.js';
|
|
5
|
+
export { SearchTrigger } from './search-trigger.js';
|
|
6
|
+
export { searchDefaultTransition, searchInputVariants, searchTriggerVariants } from './search-variants.js';
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type SearchContextValue = {
|
|
2
|
+
open: boolean;
|
|
3
|
+
setOpen: (open: boolean) => void;
|
|
4
|
+
searchValue: string;
|
|
5
|
+
setSearchValue: (value: string) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const SearchContext: import("react").Context<SearchContextValue | null>;
|
|
8
|
+
export declare function useSearchContext(): SearchContextValue;
|
|
9
|
+
export declare function useControllableState<T>(controlledValue: T | undefined, defaultValue: T, onChange?: (value: T) => void): [T, (value: T) => void];
|
|
10
|
+
export declare function useKeyboardShortcut(shortcutKey: string | undefined, onTrigger: () => void): void;
|
|
11
|
+
//# sourceMappingURL=search-context.d.ts.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { createContext, useCallback, useContext, useEffect, useState } from 'react';
|
|
2
|
+
import { SHORTCUT_KEY_REGEX } from './search-variants.js';
|
|
3
|
+
export const SearchContext = /*#__PURE__*/ createContext(null);
|
|
4
|
+
export function useSearchContext() {
|
|
5
|
+
const context = useContext(SearchContext);
|
|
6
|
+
if (!context) {
|
|
7
|
+
throw new Error('Search components must be used within a Search component');
|
|
8
|
+
}
|
|
9
|
+
return context;
|
|
10
|
+
}
|
|
11
|
+
export function useControllableState(controlledValue, defaultValue, onChange) {
|
|
12
|
+
const [internalValue, setInternalValue] = useState(defaultValue);
|
|
13
|
+
const isControlled = controlledValue !== undefined;
|
|
14
|
+
const value = isControlled ? controlledValue : internalValue;
|
|
15
|
+
const setValue = useCallback((newValue)=>{
|
|
16
|
+
if (!isControlled) {
|
|
17
|
+
setInternalValue(newValue);
|
|
18
|
+
}
|
|
19
|
+
onChange?.(newValue);
|
|
20
|
+
}, [
|
|
21
|
+
isControlled,
|
|
22
|
+
onChange
|
|
23
|
+
]);
|
|
24
|
+
return [
|
|
25
|
+
value,
|
|
26
|
+
setValue
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
export function useKeyboardShortcut(shortcutKey, onTrigger) {
|
|
30
|
+
useEffect(()=>{
|
|
31
|
+
if (!shortcutKey) return;
|
|
32
|
+
const handleKeyDown = (e)=>{
|
|
33
|
+
const key = shortcutKey.toLowerCase();
|
|
34
|
+
const isMetaKey = key.startsWith('meta+') || key.startsWith('cmd+') || key.startsWith('⌘');
|
|
35
|
+
const isCtrlKey = key.startsWith('ctrl+');
|
|
36
|
+
const targetKey = key.replace(SHORTCUT_KEY_REGEX, '');
|
|
37
|
+
const shouldTrigger = isMetaKey && e.metaKey && e.key.toLowerCase() === targetKey || isCtrlKey && e.ctrlKey && e.key.toLowerCase() === targetKey || !isMetaKey && !isCtrlKey && e.key.toLowerCase() === targetKey && !e.metaKey && !e.ctrlKey;
|
|
38
|
+
if (!shouldTrigger) return;
|
|
39
|
+
if (!isMetaKey && !isCtrlKey) {
|
|
40
|
+
const target = e.target;
|
|
41
|
+
if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
e.preventDefault();
|
|
46
|
+
onTrigger();
|
|
47
|
+
};
|
|
48
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
49
|
+
return ()=>document.removeEventListener('keydown', handleKeyDown);
|
|
50
|
+
}, [
|
|
51
|
+
shortcutKey,
|
|
52
|
+
onTrigger
|
|
53
|
+
]);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=search-context.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
import { searchInputVariants } from './search-variants';
|
|
4
|
+
export type SearchInlineProps = Omit<ComponentProps<'input'>, 'size'> & VariantProps<typeof searchInputVariants> & {
|
|
5
|
+
showClearButton?: boolean;
|
|
6
|
+
onClear?: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare function SearchInline({ className, variant, size, radius, value, onChange, onClear, showClearButton, ...props }: SearchInlineProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=search-inline.d.ts.map
|