@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,85 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useRef, useState } from 'react';
|
|
3
|
+
import { cn } from '../../utils/cn.js';
|
|
4
|
+
import { Icon } from '../icon/index.js';
|
|
5
|
+
import { searchInputVariants } from './search-variants.js';
|
|
6
|
+
export function SearchInline({ className, variant, size, radius, value, onChange, onClear, showClearButton = true, ...props }) {
|
|
7
|
+
const inputRef = useRef(null);
|
|
8
|
+
const [internalValue, setInternalValue] = useState('');
|
|
9
|
+
const isControlled = value !== undefined;
|
|
10
|
+
const inputValue = isControlled ? value : internalValue;
|
|
11
|
+
const hasValue = Boolean(inputValue);
|
|
12
|
+
const isSmall = size === 'small';
|
|
13
|
+
const handleChange = useCallback((e)=>{
|
|
14
|
+
if (!isControlled) {
|
|
15
|
+
setInternalValue(e.target.value);
|
|
16
|
+
}
|
|
17
|
+
onChange?.(e);
|
|
18
|
+
}, [
|
|
19
|
+
isControlled,
|
|
20
|
+
onChange
|
|
21
|
+
]);
|
|
22
|
+
const handleClear = useCallback(()=>{
|
|
23
|
+
if (!isControlled) {
|
|
24
|
+
setInternalValue('');
|
|
25
|
+
}
|
|
26
|
+
if (onChange && inputRef.current) {
|
|
27
|
+
inputRef.current.value = '';
|
|
28
|
+
const syntheticEvent = {
|
|
29
|
+
target: inputRef.current,
|
|
30
|
+
currentTarget: inputRef.current
|
|
31
|
+
};
|
|
32
|
+
onChange(syntheticEvent);
|
|
33
|
+
}
|
|
34
|
+
onClear?.();
|
|
35
|
+
inputRef.current?.focus();
|
|
36
|
+
}, [
|
|
37
|
+
isControlled,
|
|
38
|
+
onChange,
|
|
39
|
+
onClear
|
|
40
|
+
]);
|
|
41
|
+
const handleKeyDown = useCallback((e)=>{
|
|
42
|
+
if (e.key === 'Escape' && hasValue) {
|
|
43
|
+
e.preventDefault();
|
|
44
|
+
handleClear();
|
|
45
|
+
}
|
|
46
|
+
}, [
|
|
47
|
+
hasValue,
|
|
48
|
+
handleClear
|
|
49
|
+
]);
|
|
50
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
51
|
+
"data-slot": "search-inline",
|
|
52
|
+
className: cn(searchInputVariants({
|
|
53
|
+
variant,
|
|
54
|
+
size,
|
|
55
|
+
radius
|
|
56
|
+
}), className),
|
|
57
|
+
children: [
|
|
58
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
59
|
+
name: "searchLine",
|
|
60
|
+
className: cn('shrink-0 text-foreground-neutral-muted', isSmall ? 'size-14' : 'size-16')
|
|
61
|
+
}),
|
|
62
|
+
/*#__PURE__*/ _jsx("input", {
|
|
63
|
+
ref: inputRef,
|
|
64
|
+
type: "text",
|
|
65
|
+
value: inputValue,
|
|
66
|
+
onChange: handleChange,
|
|
67
|
+
onKeyDown: handleKeyDown,
|
|
68
|
+
className: cn('flex-1 bg-transparent outline-none min-w-0', 'text-base md:text-sm', 'text-foreground-neutral-base', 'placeholder:text-foreground-neutral-muted', 'disabled:cursor-not-allowed disabled:text-foreground-neutral-disabled'),
|
|
69
|
+
...props
|
|
70
|
+
}),
|
|
71
|
+
showClearButton && hasValue && /*#__PURE__*/ _jsx("button", {
|
|
72
|
+
type: "button",
|
|
73
|
+
onClick: handleClear,
|
|
74
|
+
className: cn('shrink-0 cursor-pointer rounded-4 p-2 -mx-2', 'text-foreground-neutral-muted hover:text-foreground-neutral-subtle transition-colors'),
|
|
75
|
+
"aria-label": "Clear search",
|
|
76
|
+
children: /*#__PURE__*/ _jsx(Icon, {
|
|
77
|
+
name: "closeLine",
|
|
78
|
+
className: "size-16"
|
|
79
|
+
})
|
|
80
|
+
})
|
|
81
|
+
]
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
//# sourceMappingURL=search-inline.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Command as CommandPrimitive } from 'cmdk';
|
|
2
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
import { type ModalContentProps } from '../modal/modal';
|
|
4
|
+
export type SearchContentProps = {
|
|
5
|
+
breakpoint?: string;
|
|
6
|
+
} & Omit<ModalContentProps, 'open' | 'onOpenChange'>;
|
|
7
|
+
export declare function SearchContent({ breakpoint, className, children, overlayClassName, onEscapeKeyDown, ...props }: SearchContentProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export type SearchInputProps = Omit<ComponentProps<typeof CommandPrimitive.Input>, 'value' | 'onValueChange'>;
|
|
9
|
+
export declare function SearchInput({ className, ...props }: SearchInputProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export type SearchListProps = ComponentProps<typeof CommandPrimitive.List>;
|
|
11
|
+
export declare function SearchList({ className, ...props }: SearchListProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export type SearchEmptyProps = ComponentProps<typeof CommandPrimitive.Empty>;
|
|
13
|
+
export declare function SearchEmpty({ className, ...props }: SearchEmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export type SearchGroupProps = ComponentProps<typeof CommandPrimitive.Group>;
|
|
15
|
+
export declare function SearchGroup({ className, ...props }: SearchGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export type SearchItemProps = ComponentProps<typeof CommandPrimitive.Item> & {
|
|
17
|
+
icon?: ReactNode;
|
|
18
|
+
description?: string;
|
|
19
|
+
};
|
|
20
|
+
export declare function SearchItem({ className, children, icon, description, ...props }: SearchItemProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export type SearchSeparatorProps = ComponentProps<typeof CommandPrimitive.Separator>;
|
|
22
|
+
export declare function SearchSeparator({ className, ...props }: SearchSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export type SearchFooterProps = ComponentProps<'div'>;
|
|
24
|
+
export declare function SearchFooter({ className, ...props }: SearchFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
//# sourceMappingURL=search-modal.d.ts.map
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Command as CommandPrimitive } from 'cmdk';
|
|
3
|
+
import { useCallback } from 'react';
|
|
4
|
+
import { cn } from '../../utils/cn.js';
|
|
5
|
+
import { Icon } from '../icon/index.js';
|
|
6
|
+
import { Kbd } from '../kbd/index.js';
|
|
7
|
+
import { Modal, ModalBody, ModalContent, ModalTitle } from '../modal/modal.js';
|
|
8
|
+
import { useSearchContext } from './search-context.js';
|
|
9
|
+
export function SearchContent({ breakpoint = '(min-width: 768px)', className, children, overlayClassName, onEscapeKeyDown, ...props }) {
|
|
10
|
+
const { open, setOpen, searchValue, setSearchValue } = useSearchContext();
|
|
11
|
+
const handleEscapeKeyDown = useCallback((event)=>{
|
|
12
|
+
if (searchValue) {
|
|
13
|
+
event.preventDefault();
|
|
14
|
+
setSearchValue('');
|
|
15
|
+
} else {
|
|
16
|
+
onEscapeKeyDown?.(event);
|
|
17
|
+
}
|
|
18
|
+
}, [
|
|
19
|
+
searchValue,
|
|
20
|
+
setSearchValue,
|
|
21
|
+
onEscapeKeyDown
|
|
22
|
+
]);
|
|
23
|
+
return /*#__PURE__*/ _jsx(Modal, {
|
|
24
|
+
open: open,
|
|
25
|
+
onOpenChange: setOpen,
|
|
26
|
+
breakpoint: breakpoint,
|
|
27
|
+
children: /*#__PURE__*/ _jsxs(ModalContent, {
|
|
28
|
+
"data-slot": "search-content",
|
|
29
|
+
className: cn('top-[15%]! translate-y-0!', className),
|
|
30
|
+
overlayClassName: cn('backdrop-blur-sm', overlayClassName),
|
|
31
|
+
onEscapeKeyDown: handleEscapeKeyDown,
|
|
32
|
+
...props,
|
|
33
|
+
children: [
|
|
34
|
+
/*#__PURE__*/ _jsx(ModalTitle, {
|
|
35
|
+
className: "sr-only",
|
|
36
|
+
children: "Search"
|
|
37
|
+
}),
|
|
38
|
+
/*#__PURE__*/ _jsx(ModalBody, {
|
|
39
|
+
className: "flex flex-col p-0 min-h-0 overflow-hidden md:overflow-clip",
|
|
40
|
+
children: children
|
|
41
|
+
})
|
|
42
|
+
]
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
export function SearchInput({ className, ...props }) {
|
|
47
|
+
const { open, searchValue, setSearchValue } = useSearchContext();
|
|
48
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
49
|
+
className: "w-full shrink-0 flex items-center gap-8 border-b border-border-neutral-strong px-16 py-12",
|
|
50
|
+
children: [
|
|
51
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
52
|
+
name: "searchLine",
|
|
53
|
+
className: "size-16 shrink-0 text-foreground-neutral-muted"
|
|
54
|
+
}),
|
|
55
|
+
/*#__PURE__*/ _jsx(CommandPrimitive.Input, {
|
|
56
|
+
"data-slot": "search-input",
|
|
57
|
+
autoFocus: open,
|
|
58
|
+
value: searchValue,
|
|
59
|
+
onValueChange: setSearchValue,
|
|
60
|
+
className: cn('flex-1 bg-transparent text-base md:text-sm leading-20 outline-none', 'placeholder:text-foreground-neutral-muted', 'disabled:cursor-not-allowed disabled:text-foreground-neutral-disabled', className),
|
|
61
|
+
...props
|
|
62
|
+
}),
|
|
63
|
+
/*#__PURE__*/ _jsx(Kbd, {
|
|
64
|
+
children: "Esc"
|
|
65
|
+
})
|
|
66
|
+
]
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
export function SearchList({ className, ...props }) {
|
|
70
|
+
return /*#__PURE__*/ _jsx(CommandPrimitive.List, {
|
|
71
|
+
"data-slot": "search-list",
|
|
72
|
+
className: cn('flex-1 min-h-0 w-full overflow-y-auto overflow-x-hidden px-8 py-4 scrollbar', 'md:max-h-400', className),
|
|
73
|
+
...props
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
export function SearchEmpty({ className, ...props }) {
|
|
77
|
+
return /*#__PURE__*/ _jsx(CommandPrimitive.Empty, {
|
|
78
|
+
"data-slot": "search-empty",
|
|
79
|
+
className: cn('py-32 text-center text-sm text-foreground-neutral-muted', className),
|
|
80
|
+
...props
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
export function SearchGroup({ className, ...props }) {
|
|
84
|
+
return /*#__PURE__*/ _jsx(CommandPrimitive.Group, {
|
|
85
|
+
"data-slot": "search-group",
|
|
86
|
+
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),
|
|
87
|
+
...props
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
export function SearchItem({ className, children, icon, description, ...props }) {
|
|
91
|
+
return /*#__PURE__*/ _jsxs(CommandPrimitive.Item, {
|
|
92
|
+
"data-slot": "search-item",
|
|
93
|
+
className: cn('relative flex cursor-pointer select-none items-center gap-12 rounded-8 p-8', '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),
|
|
94
|
+
...props,
|
|
95
|
+
children: [
|
|
96
|
+
icon && /*#__PURE__*/ _jsx("span", {
|
|
97
|
+
className: "shrink-0 text-foreground-neutral-muted",
|
|
98
|
+
children: icon
|
|
99
|
+
}),
|
|
100
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
101
|
+
className: "flex-1 min-w-0",
|
|
102
|
+
children: [
|
|
103
|
+
/*#__PURE__*/ _jsx("div", {
|
|
104
|
+
className: "truncate",
|
|
105
|
+
children: children
|
|
106
|
+
}),
|
|
107
|
+
description && /*#__PURE__*/ _jsx("div", {
|
|
108
|
+
className: "truncate text-xs text-foreground-neutral-muted",
|
|
109
|
+
children: description
|
|
110
|
+
})
|
|
111
|
+
]
|
|
112
|
+
})
|
|
113
|
+
]
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
export function SearchSeparator({ className, ...props }) {
|
|
117
|
+
return /*#__PURE__*/ _jsx(CommandPrimitive.Separator, {
|
|
118
|
+
"data-slot": "search-separator",
|
|
119
|
+
className: cn('my-8 h-px bg-border-neutral-base', className),
|
|
120
|
+
...props
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
export function SearchFooter({ className, ...props }) {
|
|
124
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
125
|
+
"data-slot": "search-footer",
|
|
126
|
+
className: cn('w-full shrink-0 flex items-center justify-end gap-12 px-16 py-12', 'border-t border-border-neutral-strong', 'bg-background-components-base', className),
|
|
127
|
+
...props,
|
|
128
|
+
children: [
|
|
129
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
130
|
+
className: "flex items-center gap-8",
|
|
131
|
+
children: [
|
|
132
|
+
/*#__PURE__*/ _jsx("span", {
|
|
133
|
+
className: "text-xs font-medium text-foreground-neutral-subtle",
|
|
134
|
+
children: "Navigation"
|
|
135
|
+
}),
|
|
136
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
137
|
+
className: "flex items-center gap-4",
|
|
138
|
+
children: [
|
|
139
|
+
/*#__PURE__*/ _jsx(Kbd, {
|
|
140
|
+
children: "↓"
|
|
141
|
+
}),
|
|
142
|
+
/*#__PURE__*/ _jsx(Kbd, {
|
|
143
|
+
children: "↑"
|
|
144
|
+
})
|
|
145
|
+
]
|
|
146
|
+
})
|
|
147
|
+
]
|
|
148
|
+
}),
|
|
149
|
+
/*#__PURE__*/ _jsx("div", {
|
|
150
|
+
className: "h-12 w-px bg-border-neutral-strong"
|
|
151
|
+
}),
|
|
152
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
153
|
+
className: "flex items-center gap-8",
|
|
154
|
+
children: [
|
|
155
|
+
/*#__PURE__*/ _jsx("span", {
|
|
156
|
+
className: "text-xs font-medium text-foreground-neutral-subtle",
|
|
157
|
+
children: "Open result"
|
|
158
|
+
}),
|
|
159
|
+
/*#__PURE__*/ _jsx(Kbd, {
|
|
160
|
+
children: "↵"
|
|
161
|
+
})
|
|
162
|
+
]
|
|
163
|
+
})
|
|
164
|
+
]
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
//# sourceMappingURL=search-modal.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
import { searchTriggerVariants } from './search-variants';
|
|
4
|
+
export type SearchTriggerProps = ComponentProps<'button'> & VariantProps<typeof searchTriggerVariants> & {
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
shortcut?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function SearchTrigger({ className, variant, size, radius, placeholder, shortcut, ...props }: SearchTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=search-trigger.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '../../utils/cn.js';
|
|
3
|
+
import { Icon } from '../icon/index.js';
|
|
4
|
+
import { Kbd } from '../kbd/index.js';
|
|
5
|
+
import { useSearchContext } from './search-context.js';
|
|
6
|
+
import { searchTriggerVariants } from './search-variants.js';
|
|
7
|
+
export function SearchTrigger({ className, variant, size, radius, placeholder = 'Search', shortcut = '⌘K', ...props }) {
|
|
8
|
+
const { setOpen } = useSearchContext();
|
|
9
|
+
const isSmall = size === 'small';
|
|
10
|
+
return /*#__PURE__*/ _jsxs("button", {
|
|
11
|
+
type: "button",
|
|
12
|
+
"data-slot": "search-trigger",
|
|
13
|
+
onClick: ()=>setOpen(true),
|
|
14
|
+
className: cn(searchTriggerVariants({
|
|
15
|
+
variant,
|
|
16
|
+
size,
|
|
17
|
+
radius
|
|
18
|
+
}), className),
|
|
19
|
+
...props,
|
|
20
|
+
children: [
|
|
21
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
22
|
+
name: "searchLine",
|
|
23
|
+
className: cn('shrink-0', isSmall ? 'size-14' : 'size-16')
|
|
24
|
+
}),
|
|
25
|
+
/*#__PURE__*/ _jsx("span", {
|
|
26
|
+
className: "flex-1 text-left truncate",
|
|
27
|
+
children: placeholder
|
|
28
|
+
}),
|
|
29
|
+
/*#__PURE__*/ _jsx(Kbd, {
|
|
30
|
+
className: cn(isSmall && 'h-16 min-w-16 px-4 text-[10px]', radius === 'rounded' && 'rounded-full'),
|
|
31
|
+
children: shortcut
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=search-trigger.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Transition } from 'framer-motion';
|
|
2
|
+
export declare const searchInputVariants: (props?: ({
|
|
3
|
+
variant?: "primary" | "secondary" | null | undefined;
|
|
4
|
+
size?: "base" | "small" | null | undefined;
|
|
5
|
+
radius?: "rounded" | "squared" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export declare const searchTriggerVariants: (props?: ({
|
|
8
|
+
variant?: "primary" | "secondary" | null | undefined;
|
|
9
|
+
size?: "base" | "small" | null | undefined;
|
|
10
|
+
radius?: "rounded" | "squared" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
export declare const searchDefaultTransition: Transition;
|
|
13
|
+
export declare const SHORTCUT_KEY_REGEX: RegExp;
|
|
14
|
+
//# sourceMappingURL=search-variants.d.ts.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
const sharedInputStyles = [
|
|
3
|
+
'inline-flex items-center gap-8',
|
|
4
|
+
'text-sm leading-20',
|
|
5
|
+
'transition-[color,box-shadow,background-color] outline-none'
|
|
6
|
+
];
|
|
7
|
+
const variantStyles = {
|
|
8
|
+
primary: {
|
|
9
|
+
base: [
|
|
10
|
+
'bg-background-field-base',
|
|
11
|
+
'shadow-button-neutral'
|
|
12
|
+
],
|
|
13
|
+
focus: 'focus-within:shadow-border-interactive-with-active',
|
|
14
|
+
hover: 'hover:bg-background-field-hover',
|
|
15
|
+
focusVisible: 'focus-visible:shadow-border-interactive-with-active'
|
|
16
|
+
},
|
|
17
|
+
secondary: {
|
|
18
|
+
base: [
|
|
19
|
+
'bg-background-field-component',
|
|
20
|
+
'border border-border-neutral-strong'
|
|
21
|
+
],
|
|
22
|
+
focus: 'focus-within:shadow-border-interactive-with-active',
|
|
23
|
+
hover: 'hover:bg-background-field-component-hover',
|
|
24
|
+
focusVisible: 'focus-visible:shadow-border-interactive-with-active'
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const sizeStyles = {
|
|
28
|
+
base: 'h-32 px-8 py-6',
|
|
29
|
+
small: 'h-28 px-8 py-4'
|
|
30
|
+
};
|
|
31
|
+
const radiusStyles = {
|
|
32
|
+
rounded: 'rounded-full',
|
|
33
|
+
squared: 'rounded-6'
|
|
34
|
+
};
|
|
35
|
+
export const searchInputVariants = cva(sharedInputStyles, {
|
|
36
|
+
variants: {
|
|
37
|
+
variant: {
|
|
38
|
+
primary: [
|
|
39
|
+
...variantStyles.primary.base,
|
|
40
|
+
variantStyles.primary.focus
|
|
41
|
+
],
|
|
42
|
+
secondary: [
|
|
43
|
+
...variantStyles.secondary.base,
|
|
44
|
+
variantStyles.secondary.focus
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
size: sizeStyles,
|
|
48
|
+
radius: radiusStyles
|
|
49
|
+
},
|
|
50
|
+
defaultVariants: {
|
|
51
|
+
variant: 'primary',
|
|
52
|
+
size: 'base',
|
|
53
|
+
radius: 'squared'
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
export const searchTriggerVariants = cva([
|
|
57
|
+
...sharedInputStyles,
|
|
58
|
+
'cursor-pointer text-foreground-neutral-muted',
|
|
59
|
+
'disabled:pointer-events-none disabled:cursor-not-allowed disabled:text-foreground-neutral-disabled'
|
|
60
|
+
], {
|
|
61
|
+
variants: {
|
|
62
|
+
variant: {
|
|
63
|
+
primary: [
|
|
64
|
+
...variantStyles.primary.base,
|
|
65
|
+
variantStyles.primary.hover,
|
|
66
|
+
variantStyles.primary.focusVisible
|
|
67
|
+
],
|
|
68
|
+
secondary: [
|
|
69
|
+
...variantStyles.secondary.base,
|
|
70
|
+
variantStyles.secondary.hover,
|
|
71
|
+
variantStyles.secondary.focusVisible
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
size: sizeStyles,
|
|
75
|
+
radius: radiusStyles
|
|
76
|
+
},
|
|
77
|
+
defaultVariants: {
|
|
78
|
+
variant: 'primary',
|
|
79
|
+
size: 'base',
|
|
80
|
+
radius: 'squared'
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
export const searchDefaultTransition = {
|
|
84
|
+
type: 'spring',
|
|
85
|
+
stiffness: 400,
|
|
86
|
+
damping: 30
|
|
87
|
+
};
|
|
88
|
+
export const SHORTCUT_KEY_REGEX = /^(meta\+|cmd\+|ctrl\+|⌘\+?)/i;
|
|
89
|
+
|
|
90
|
+
//# sourceMappingURL=search-variants.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type SearchProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
open?: boolean;
|
|
5
|
+
onOpenChange?: (open: boolean) => void;
|
|
6
|
+
defaultOpen?: boolean;
|
|
7
|
+
shortcutKey?: string;
|
|
8
|
+
shouldFilter?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function Search({ children, open: controlledOpen, onOpenChange, defaultOpen, shortcutKey, shouldFilter, }: SearchProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Command as CommandPrimitive } from 'cmdk';
|
|
3
|
+
import { useCallback, useState } from 'react';
|
|
4
|
+
import { SearchContext, useControllableState, useKeyboardShortcut } from './search-context.js';
|
|
5
|
+
export function Search({ children, open: controlledOpen, onOpenChange, defaultOpen = false, shortcutKey, shouldFilter = true }) {
|
|
6
|
+
const [open, setOpen] = useControllableState(controlledOpen, defaultOpen, onOpenChange);
|
|
7
|
+
const [searchValue, setSearchValue] = useState('');
|
|
8
|
+
const handleOpen = useCallback(()=>setOpen(true), [
|
|
9
|
+
setOpen
|
|
10
|
+
]);
|
|
11
|
+
useKeyboardShortcut(shortcutKey, handleOpen);
|
|
12
|
+
const handleSetOpen = useCallback((newOpen)=>{
|
|
13
|
+
if (!newOpen) {
|
|
14
|
+
setSearchValue('');
|
|
15
|
+
}
|
|
16
|
+
setOpen(newOpen);
|
|
17
|
+
}, [
|
|
18
|
+
setOpen
|
|
19
|
+
]);
|
|
20
|
+
return /*#__PURE__*/ _jsx(SearchContext.Provider, {
|
|
21
|
+
value: {
|
|
22
|
+
open,
|
|
23
|
+
setOpen: handleSetOpen,
|
|
24
|
+
searchValue,
|
|
25
|
+
setSearchValue
|
|
26
|
+
},
|
|
27
|
+
children: /*#__PURE__*/ _jsx(CommandPrimitive, {
|
|
28
|
+
"data-slot": "search",
|
|
29
|
+
shouldFilter: shouldFilter,
|
|
30
|
+
children: children
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=search.js.map
|