@shipfox/react-ui 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/button-group/button-group.stories.js +4 -4
- package/dist/components/card/card.d.ts +24 -0
- package/dist/components/card/card.js +56 -0
- package/dist/components/card/card.stories.js +216 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/card/index.js +3 -0
- package/dist/components/dashboard/components/charts/bar-chart.d.ts +30 -0
- package/dist/components/dashboard/components/charts/bar-chart.js +150 -0
- package/dist/components/dashboard/components/charts/bar-chart.stories.js +287 -0
- package/dist/components/dashboard/components/charts/chart-tooltip.d.ts +14 -0
- package/dist/components/dashboard/components/charts/chart-tooltip.js +46 -0
- package/dist/components/dashboard/components/charts/colors.d.ts +12 -0
- package/dist/components/dashboard/components/charts/colors.js +20 -0
- package/dist/components/dashboard/components/charts/index.d.ts +6 -0
- package/dist/components/dashboard/components/charts/index.js +7 -0
- package/dist/components/dashboard/components/charts/line-chart.d.ts +28 -0
- package/dist/components/dashboard/components/charts/line-chart.js +152 -0
- package/dist/components/dashboard/components/charts/line-chart.stories.js +257 -0
- package/dist/components/dashboard/components/charts/utils.d.ts +13 -0
- package/dist/components/dashboard/components/charts/utils.js +18 -0
- package/dist/components/dashboard/components/dashboard-alert.d.ts +8 -0
- package/dist/components/dashboard/components/dashboard-alert.js +24 -0
- package/dist/components/dashboard/components/kpi-card.d.ts +15 -0
- package/dist/components/dashboard/components/kpi-card.js +77 -0
- package/dist/components/dashboard/components/mobile-sidebar.d.ts +19 -0
- package/dist/components/dashboard/components/mobile-sidebar.js +50 -0
- package/dist/components/dashboard/components/organization-selector.d.ts +24 -1
- package/dist/components/dashboard/components/organization-selector.js +93 -70
- package/dist/components/dashboard/components/sidebar.d.ts +24 -0
- package/dist/components/dashboard/components/sidebar.js +218 -0
- package/dist/components/dashboard/context/dashboard-context.d.ts +70 -0
- package/dist/components/dashboard/context/dashboard-context.js +175 -0
- package/dist/components/dashboard/context/index.d.ts +8 -0
- package/dist/components/dashboard/context/index.js +6 -0
- package/dist/components/dashboard/context/types.d.ts +50 -0
- package/dist/components/dashboard/context/types.js +7 -0
- package/dist/components/dashboard/context/utils.d.ts +28 -0
- package/dist/components/dashboard/context/utils.js +53 -0
- package/dist/components/dashboard/dashboard.d.ts +27 -1
- package/dist/components/dashboard/dashboard.js +76 -36
- package/dist/components/dashboard/filters/expression-filter-bar.d.ts +42 -0
- package/dist/components/dashboard/filters/expression-filter-bar.js +80 -0
- package/dist/components/dashboard/filters/index.d.ts +6 -0
- package/dist/components/dashboard/filters/index.js +5 -0
- package/dist/components/dashboard/index.d.ts +25 -1
- package/dist/components/dashboard/index.js +22 -1
- package/dist/components/dashboard/pages/analytics-page.d.ts +20 -0
- package/dist/components/dashboard/pages/analytics-page.js +258 -0
- package/dist/components/dashboard/pages/index.d.ts +6 -0
- package/dist/components/dashboard/pages/index.js +6 -0
- package/dist/components/dashboard/pages/jobs-page.d.ts +20 -0
- package/dist/components/dashboard/pages/jobs-page.js +56 -0
- package/dist/components/dashboard/table/index.d.ts +6 -0
- package/dist/components/dashboard/table/index.js +5 -0
- package/dist/components/dashboard/table/table-wrapper.d.ts +104 -0
- package/dist/components/dashboard/table/table-wrapper.js +93 -0
- package/dist/components/dashboard/toolbar/filter-button.d.ts +12 -0
- package/dist/components/dashboard/toolbar/filter-button.js +124 -0
- package/dist/components/dashboard/toolbar/index.d.ts +13 -0
- package/dist/components/dashboard/toolbar/index.js +10 -0
- package/dist/components/dashboard/toolbar/page-toolbar.d.ts +75 -0
- package/dist/components/dashboard/toolbar/page-toolbar.js +208 -0
- package/dist/components/dashboard/toolbar/toolbar-actions.d.ts +52 -0
- package/dist/components/dashboard/toolbar/toolbar-actions.js +51 -0
- package/dist/components/dashboard/toolbar/toolbar-search.d.ts +21 -0
- package/dist/components/dashboard/toolbar/toolbar-search.js +123 -0
- package/dist/components/dashboard/toolbar/view-dropdown.d.ts +11 -0
- package/dist/components/dashboard/toolbar/view-dropdown.js +113 -0
- package/dist/components/empty-state/empty-state.d.ts +10 -0
- package/dist/components/empty-state/empty-state.js +40 -0
- package/dist/components/empty-state/empty-state.stories.js +74 -0
- package/dist/components/empty-state/index.d.ts +2 -0
- package/dist/components/empty-state/index.js +3 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +4 -0
- package/dist/components/modal/modal.js +3 -3
- package/dist/components/search/search-inline.js +1 -1
- package/dist/components/search/search-modal.js +13 -7
- package/dist/components/select/select.d.ts +3 -1
- package/dist/components/select/select.js +2 -1
- package/dist/components/sheet/index.d.ts +2 -0
- package/dist/components/sheet/index.js +3 -0
- package/dist/components/sheet/sheet.d.ts +33 -0
- package/dist/components/sheet/sheet.js +163 -0
- package/dist/components/sheet/sheet.stories.js +368 -0
- package/dist/components/table/data-table.d.ts +19 -2
- package/dist/components/table/data-table.js +89 -72
- package/dist/components/table/table.js +1 -1
- package/dist/components/table/table.stories.components.js +6 -28
- package/dist/styles.css +1 -1
- package/package.json +12 -4
- package/.storybook/main.ts +0 -35
- package/.storybook/preview.tsx +0 -66
- package/.storybook/vitest.setup.ts +0 -4
- package/.turbo/turbo-build.log +0 -19
- package/.turbo/turbo-check.log +0 -6
- package/.turbo/turbo-type.log +0 -5
- package/CHANGELOG.md +0 -114
- package/argos.config.ts +0 -33
- package/dist/build-css-entry.js.map +0 -1
- package/dist/colors.stories.conts.d.ts.map +0 -1
- package/dist/colors.stories.conts.js.map +0 -1
- package/dist/colors.stories.js.map +0 -1
- package/dist/components/alert/alert.d.ts.map +0 -1
- package/dist/components/alert/alert.js.map +0 -1
- package/dist/components/alert/alert.stories.js.map +0 -1
- package/dist/components/alert/index.d.ts.map +0 -1
- package/dist/components/alert/index.js.map +0 -1
- package/dist/components/avatar/avatar-group.d.ts.map +0 -1
- package/dist/components/avatar/avatar-group.js.map +0 -1
- package/dist/components/avatar/avatar.d.ts.map +0 -1
- package/dist/components/avatar/avatar.js.map +0 -1
- package/dist/components/avatar/avatar.stories.js.map +0 -1
- package/dist/components/avatar/index.d.ts.map +0 -1
- package/dist/components/avatar/index.js.map +0 -1
- package/dist/components/badge/badge.d.ts.map +0 -1
- package/dist/components/badge/badge.js.map +0 -1
- package/dist/components/badge/badge.stories.js.map +0 -1
- package/dist/components/badge/icon-badge.d.ts.map +0 -1
- package/dist/components/badge/icon-badge.js.map +0 -1
- package/dist/components/badge/index.d.ts.map +0 -1
- package/dist/components/badge/index.js.map +0 -1
- package/dist/components/badge/status-badge.d.ts.map +0 -1
- package/dist/components/badge/status-badge.js.map +0 -1
- package/dist/components/badge/user-badge.d.ts.map +0 -1
- package/dist/components/badge/user-badge.js.map +0 -1
- package/dist/components/button/button-link.d.ts.map +0 -1
- package/dist/components/button/button-link.js.map +0 -1
- package/dist/components/button/button-link.stories.js.map +0 -1
- package/dist/components/button/button.d.ts.map +0 -1
- package/dist/components/button/button.js.map +0 -1
- package/dist/components/button/button.stories.js.map +0 -1
- package/dist/components/button/icon-button.d.ts.map +0 -1
- package/dist/components/button/icon-button.js.map +0 -1
- package/dist/components/button/icon-button.stories.js.map +0 -1
- package/dist/components/button/index.d.ts.map +0 -1
- package/dist/components/button/index.js.map +0 -1
- package/dist/components/button-group/button-group.d.ts.map +0 -1
- package/dist/components/button-group/button-group.js.map +0 -1
- package/dist/components/button-group/button-group.stories.js.map +0 -1
- package/dist/components/button-group/index.d.ts.map +0 -1
- package/dist/components/button-group/index.js.map +0 -1
- package/dist/components/calendar/calendar.d.ts.map +0 -1
- package/dist/components/calendar/calendar.js.map +0 -1
- package/dist/components/calendar/index.d.ts.map +0 -1
- package/dist/components/calendar/index.js.map +0 -1
- package/dist/components/checkbox/checkbox-label.d.ts.map +0 -1
- package/dist/components/checkbox/checkbox-label.js.map +0 -1
- package/dist/components/checkbox/checkbox-links.d.ts.map +0 -1
- package/dist/components/checkbox/checkbox-links.js.map +0 -1
- package/dist/components/checkbox/checkbox.d.ts.map +0 -1
- package/dist/components/checkbox/checkbox.js.map +0 -1
- package/dist/components/checkbox/checkbox.stories.js.map +0 -1
- package/dist/components/checkbox/index.d.ts.map +0 -1
- package/dist/components/checkbox/index.js.map +0 -1
- package/dist/components/code-block/code-block-footer.d.ts.map +0 -1
- package/dist/components/code-block/code-block-footer.js.map +0 -1
- package/dist/components/code-block/code-block.d.ts.map +0 -1
- package/dist/components/code-block/code-block.js.map +0 -1
- package/dist/components/code-block/code-block.stories.js.map +0 -1
- package/dist/components/code-block/code-content.d.ts.map +0 -1
- package/dist/components/code-block/code-content.js.map +0 -1
- package/dist/components/code-block/code-copy-button.d.ts.map +0 -1
- package/dist/components/code-block/code-copy-button.js.map +0 -1
- package/dist/components/code-block/code-tabs.d.ts.map +0 -1
- package/dist/components/code-block/code-tabs.js.map +0 -1
- package/dist/components/code-block/index.d.ts.map +0 -1
- package/dist/components/code-block/index.js.map +0 -1
- package/dist/components/command/command.d.ts.map +0 -1
- package/dist/components/command/command.js.map +0 -1
- package/dist/components/command/command.stories.js.map +0 -1
- package/dist/components/command/index.d.ts.map +0 -1
- package/dist/components/command/index.js.map +0 -1
- package/dist/components/confetti/confetti.d.ts.map +0 -1
- package/dist/components/confetti/confetti.js.map +0 -1
- package/dist/components/confetti/confetti.stories.js.map +0 -1
- package/dist/components/confetti/index.d.ts.map +0 -1
- package/dist/components/confetti/index.js.map +0 -1
- package/dist/components/dashboard/components/analytics-content.d.ts +0 -2
- package/dist/components/dashboard/components/analytics-content.d.ts.map +0 -1
- package/dist/components/dashboard/components/analytics-content.js +0 -180
- package/dist/components/dashboard/components/analytics-content.js.map +0 -1
- package/dist/components/dashboard/components/animated-logo.d.ts.map +0 -1
- package/dist/components/dashboard/components/animated-logo.js.map +0 -1
- package/dist/components/dashboard/components/complete-setup-button.d.ts.map +0 -1
- package/dist/components/dashboard/components/complete-setup-button.js.map +0 -1
- package/dist/components/dashboard/components/jobs-content.d.ts +0 -2
- package/dist/components/dashboard/components/jobs-content.d.ts.map +0 -1
- package/dist/components/dashboard/components/jobs-content.js +0 -69
- package/dist/components/dashboard/components/jobs-content.js.map +0 -1
- package/dist/components/dashboard/components/mobile-menu.d.ts.map +0 -1
- package/dist/components/dashboard/components/mobile-menu.js.map +0 -1
- package/dist/components/dashboard/components/organization-selector.d.ts.map +0 -1
- package/dist/components/dashboard/components/organization-selector.js.map +0 -1
- package/dist/components/dashboard/components/top-menu.d.ts.map +0 -1
- package/dist/components/dashboard/components/top-menu.js.map +0 -1
- package/dist/components/dashboard/components/topbar-button.d.ts.map +0 -1
- package/dist/components/dashboard/components/topbar-button.js.map +0 -1
- package/dist/components/dashboard/components/topbar.d.ts.map +0 -1
- package/dist/components/dashboard/components/topbar.js.map +0 -1
- package/dist/components/dashboard/components/user-profile.d.ts.map +0 -1
- package/dist/components/dashboard/components/user-profile.js.map +0 -1
- package/dist/components/dashboard/dashboard.d.ts.map +0 -1
- package/dist/components/dashboard/dashboard.js.map +0 -1
- package/dist/components/dashboard/dashboard.stories.js.map +0 -1
- package/dist/components/dashboard/index.d.ts.map +0 -1
- package/dist/components/dashboard/index.js.map +0 -1
- package/dist/components/date-picker/date-picker.d.ts.map +0 -1
- package/dist/components/date-picker/date-picker.js.map +0 -1
- package/dist/components/date-picker/date-picker.stories.js.map +0 -1
- package/dist/components/date-picker/index.d.ts.map +0 -1
- package/dist/components/date-picker/index.js.map +0 -1
- package/dist/components/date-time-range-picker/date-time-range-picker.d.ts.map +0 -1
- package/dist/components/date-time-range-picker/date-time-range-picker.js.map +0 -1
- package/dist/components/date-time-range-picker/index.d.ts.map +0 -1
- package/dist/components/date-time-range-picker/index.js.map +0 -1
- package/dist/components/dot-grid/dot-grid.d.ts.map +0 -1
- package/dist/components/dot-grid/dot-grid.js.map +0 -1
- package/dist/components/dot-grid/index.d.ts.map +0 -1
- package/dist/components/dot-grid/index.js.map +0 -1
- package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +0 -1
- package/dist/components/dropdown-menu/dropdown-menu.js.map +0 -1
- package/dist/components/dropdown-menu/dropdown-menu.stories.js.map +0 -1
- package/dist/components/dropdown-menu/index.d.ts.map +0 -1
- package/dist/components/dropdown-menu/index.js.map +0 -1
- package/dist/components/dynamic-item/dynamic-item.d.ts.map +0 -1
- package/dist/components/dynamic-item/dynamic-item.js.map +0 -1
- package/dist/components/dynamic-item/dynamic-item.stories.js.map +0 -1
- package/dist/components/dynamic-item/index.d.ts.map +0 -1
- package/dist/components/dynamic-item/index.js.map +0 -1
- package/dist/components/form/form.d.ts.map +0 -1
- package/dist/components/form/form.js.map +0 -1
- package/dist/components/form/form.stories.js.map +0 -1
- package/dist/components/form/index.d.ts.map +0 -1
- package/dist/components/form/index.js.map +0 -1
- package/dist/components/icon/custom/badge.d.ts.map +0 -1
- package/dist/components/icon/custom/badge.js.map +0 -1
- package/dist/components/icon/custom/check-circle-solid.d.ts.map +0 -1
- package/dist/components/icon/custom/check-circle-solid.js.map +0 -1
- package/dist/components/icon/custom/circle-dotted-line.d.ts.map +0 -1
- package/dist/components/icon/custom/circle-dotted-line.js.map +0 -1
- package/dist/components/icon/custom/component-fill.d.ts.map +0 -1
- package/dist/components/icon/custom/component-fill.js.map +0 -1
- package/dist/components/icon/custom/component-line.d.ts.map +0 -1
- package/dist/components/icon/custom/component-line.js.map +0 -1
- package/dist/components/icon/custom/ellipse-mini-solid.d.ts.map +0 -1
- package/dist/components/icon/custom/ellipse-mini-solid.js.map +0 -1
- package/dist/components/icon/custom/index.d.ts.map +0 -1
- package/dist/components/icon/custom/index.js.map +0 -1
- package/dist/components/icon/custom/info-tooltip-fill.d.ts.map +0 -1
- package/dist/components/icon/custom/info-tooltip-fill.js.map +0 -1
- package/dist/components/icon/custom/resize.d.ts.map +0 -1
- package/dist/components/icon/custom/resize.js.map +0 -1
- package/dist/components/icon/custom/shipfox-logo.d.ts.map +0 -1
- package/dist/components/icon/custom/shipfox-logo.js.map +0 -1
- package/dist/components/icon/custom/slack-logo.d.ts.map +0 -1
- package/dist/components/icon/custom/slack-logo.js.map +0 -1
- package/dist/components/icon/custom/spinner.d.ts.map +0 -1
- package/dist/components/icon/custom/spinner.js.map +0 -1
- package/dist/components/icon/custom/stripe-logo.d.ts.map +0 -1
- package/dist/components/icon/custom/stripe-logo.js.map +0 -1
- package/dist/components/icon/custom/thunder.d.ts.map +0 -1
- package/dist/components/icon/custom/thunder.js.map +0 -1
- package/dist/components/icon/custom/x-circle-solid.d.ts.map +0 -1
- package/dist/components/icon/custom/x-circle-solid.js.map +0 -1
- package/dist/components/icon/icon.d.ts.map +0 -1
- package/dist/components/icon/icon.js.map +0 -1
- package/dist/components/icon/icon.stories.js.map +0 -1
- package/dist/components/icon/index.d.ts.map +0 -1
- package/dist/components/icon/index.js.map +0 -1
- package/dist/components/icon/remixicon-registry.d.ts.map +0 -1
- package/dist/components/icon/remixicon-registry.js.map +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/inline-tips/index.d.ts.map +0 -1
- package/dist/components/inline-tips/index.js.map +0 -1
- package/dist/components/inline-tips/inline-tips.d.ts.map +0 -1
- package/dist/components/inline-tips/inline-tips.js.map +0 -1
- package/dist/components/inline-tips/inline-tips.stories.js.map +0 -1
- package/dist/components/input/index.d.ts.map +0 -1
- package/dist/components/input/index.js.map +0 -1
- package/dist/components/input/input.d.ts.map +0 -1
- package/dist/components/input/input.js.map +0 -1
- package/dist/components/input/input.stories.js.map +0 -1
- package/dist/components/item/index.d.ts.map +0 -1
- package/dist/components/item/index.js.map +0 -1
- package/dist/components/item/item.d.ts.map +0 -1
- package/dist/components/item/item.js.map +0 -1
- package/dist/components/item/item.stories.js.map +0 -1
- package/dist/components/kbd/index.d.ts.map +0 -1
- package/dist/components/kbd/index.js.map +0 -1
- package/dist/components/kbd/kbd.d.ts.map +0 -1
- package/dist/components/kbd/kbd.js.map +0 -1
- package/dist/components/kbd/kbd.stories.js.map +0 -1
- package/dist/components/label/index.d.ts.map +0 -1
- package/dist/components/label/index.js.map +0 -1
- package/dist/components/label/label.d.ts.map +0 -1
- package/dist/components/label/label.js.map +0 -1
- package/dist/components/label/label.stories.js.map +0 -1
- package/dist/components/modal/index.d.ts.map +0 -1
- package/dist/components/modal/index.js.map +0 -1
- package/dist/components/modal/modal.d.ts.map +0 -1
- package/dist/components/modal/modal.js.map +0 -1
- package/dist/components/modal/modal.stories.js.map +0 -1
- package/dist/components/moving-border/index.d.ts.map +0 -1
- package/dist/components/moving-border/index.js.map +0 -1
- package/dist/components/moving-border/moving-border.d.ts.map +0 -1
- package/dist/components/moving-border/moving-border.js.map +0 -1
- package/dist/components/popover/index.d.ts.map +0 -1
- package/dist/components/popover/index.js.map +0 -1
- package/dist/components/popover/popover.d.ts.map +0 -1
- package/dist/components/popover/popover.js.map +0 -1
- package/dist/components/search/index.d.ts.map +0 -1
- package/dist/components/search/index.js.map +0 -1
- package/dist/components/search/search-context.d.ts.map +0 -1
- package/dist/components/search/search-context.js.map +0 -1
- package/dist/components/search/search-inline.d.ts.map +0 -1
- package/dist/components/search/search-inline.js.map +0 -1
- package/dist/components/search/search-modal.d.ts.map +0 -1
- package/dist/components/search/search-modal.js.map +0 -1
- package/dist/components/search/search-trigger.d.ts.map +0 -1
- package/dist/components/search/search-trigger.js.map +0 -1
- package/dist/components/search/search-variants.d.ts.map +0 -1
- package/dist/components/search/search-variants.js.map +0 -1
- package/dist/components/search/search.d.ts.map +0 -1
- package/dist/components/search/search.js.map +0 -1
- package/dist/components/search/search.stories.js.map +0 -1
- package/dist/components/select/index.d.ts.map +0 -1
- package/dist/components/select/index.js.map +0 -1
- package/dist/components/select/select.d.ts.map +0 -1
- package/dist/components/select/select.js.map +0 -1
- package/dist/components/select/select.stories.js.map +0 -1
- package/dist/components/shiny-text/index.d.ts.map +0 -1
- package/dist/components/shiny-text/index.js.map +0 -1
- package/dist/components/shiny-text/shiny-text.d.ts.map +0 -1
- package/dist/components/shiny-text/shiny-text.js.map +0 -1
- package/dist/components/skeleton/index.d.ts.map +0 -1
- package/dist/components/skeleton/index.js.map +0 -1
- package/dist/components/skeleton/skeleton.d.ts.map +0 -1
- package/dist/components/skeleton/skeleton.js.map +0 -1
- package/dist/components/skeleton/skeleton.stories.js.map +0 -1
- package/dist/components/table/data-table.d.ts.map +0 -1
- package/dist/components/table/data-table.js.map +0 -1
- package/dist/components/table/index.d.ts.map +0 -1
- package/dist/components/table/index.js.map +0 -1
- package/dist/components/table/table-column-header.d.ts.map +0 -1
- package/dist/components/table/table-column-header.js.map +0 -1
- package/dist/components/table/table-pagination.d.ts.map +0 -1
- package/dist/components/table/table-pagination.js.map +0 -1
- package/dist/components/table/table.d.ts.map +0 -1
- package/dist/components/table/table.js.map +0 -1
- package/dist/components/table/table.stories.columns.d.ts.map +0 -1
- package/dist/components/table/table.stories.columns.js.map +0 -1
- package/dist/components/table/table.stories.components.d.ts.map +0 -1
- package/dist/components/table/table.stories.components.js.map +0 -1
- package/dist/components/table/table.stories.data.d.ts.map +0 -1
- package/dist/components/table/table.stories.data.js.map +0 -1
- package/dist/components/table/table.stories.js.map +0 -1
- package/dist/components/tabs/index.d.ts.map +0 -1
- package/dist/components/tabs/index.js.map +0 -1
- package/dist/components/tabs/tabs.d.ts.map +0 -1
- package/dist/components/tabs/tabs.js.map +0 -1
- package/dist/components/tabs/tabs.stories.js.map +0 -1
- package/dist/components/textarea/index.d.ts.map +0 -1
- package/dist/components/textarea/index.js.map +0 -1
- package/dist/components/textarea/textarea.d.ts.map +0 -1
- package/dist/components/textarea/textarea.js.map +0 -1
- package/dist/components/textarea/textarea.stories.js.map +0 -1
- package/dist/components/theme/index.d.ts.map +0 -1
- package/dist/components/theme/index.js.map +0 -1
- package/dist/components/theme/theme-provider.d.ts.map +0 -1
- package/dist/components/theme/theme-provider.js.map +0 -1
- package/dist/components/toast/index.d.ts.map +0 -1
- package/dist/components/toast/index.js.map +0 -1
- package/dist/components/toast/toast-custom.d.ts.map +0 -1
- package/dist/components/toast/toast-custom.js.map +0 -1
- package/dist/components/toast/toast.d.ts.map +0 -1
- package/dist/components/toast/toast.js.map +0 -1
- package/dist/components/toast/toast.stories.js.map +0 -1
- package/dist/components/tooltip/index.d.ts.map +0 -1
- package/dist/components/tooltip/index.js.map +0 -1
- package/dist/components/tooltip/tooltip.d.ts.map +0 -1
- package/dist/components/tooltip/tooltip.js.map +0 -1
- package/dist/components/tooltip/tooltip.stories.js.map +0 -1
- package/dist/components/typography/code.d.ts.map +0 -1
- package/dist/components/typography/code.js.map +0 -1
- package/dist/components/typography/code.stories.js.map +0 -1
- package/dist/components/typography/header.d.ts.map +0 -1
- package/dist/components/typography/header.js.map +0 -1
- package/dist/components/typography/header.stories.js.map +0 -1
- package/dist/components/typography/index.d.ts.map +0 -1
- package/dist/components/typography/index.js.map +0 -1
- package/dist/components/typography/text.d.ts.map +0 -1
- package/dist/components/typography/text.js.map +0 -1
- package/dist/components/typography/text.stories.js.map +0 -1
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/useCopy.d.ts.map +0 -1
- package/dist/hooks/useCopy.js.map +0 -1
- package/dist/hooks/useCopyToClipboard.d.ts.map +0 -1
- package/dist/hooks/useCopyToClipboard.js.map +0 -1
- package/dist/hooks/useMediaQuery.d.ts.map +0 -1
- package/dist/hooks/useMediaQuery.js.map +0 -1
- package/dist/hooks/useResolvedTheme.d.ts.map +0 -1
- package/dist/hooks/useResolvedTheme.js.map +0 -1
- package/dist/hooks/useShikiHighlight.d.ts.map +0 -1
- package/dist/hooks/useShikiHighlight.js.map +0 -1
- package/dist/hooks/useShikiStyleInjection.d.ts.map +0 -1
- package/dist/hooks/useShikiStyleInjection.js.map +0 -1
- package/dist/hooks/useTheme.d.ts.map +0 -1
- package/dist/hooks/useTheme.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/onboarding/sign-in.stories.js.map +0 -1
- package/dist/state/theme.d.ts.map +0 -1
- package/dist/state/theme.js.map +0 -1
- package/dist/utils/avatar.d.ts.map +0 -1
- package/dist/utils/avatar.js.map +0 -1
- package/dist/utils/clipboard.d.ts.map +0 -1
- package/dist/utils/clipboard.js.map +0 -1
- package/dist/utils/cn.d.ts.map +0 -1
- package/dist/utils/cn.js.map +0 -1
- package/dist/utils/date.d.ts.map +0 -1
- package/dist/utils/date.js.map +0 -1
- package/dist/utils/debounce.d.ts.map +0 -1
- package/dist/utils/debounce.js.map +0 -1
- package/dist/utils/format/chart.d.ts.map +0 -1
- package/dist/utils/format/chart.js.map +0 -1
- package/dist/utils/format/date.d.ts.map +0 -1
- package/dist/utils/format/date.js.map +0 -1
- package/dist/utils/format/duration.d.ts.map +0 -1
- package/dist/utils/format/duration.js.map +0 -1
- package/dist/utils/format/index.d.ts.map +0 -1
- package/dist/utils/format/index.js.map +0 -1
- package/dist/utils/format/number.d.ts.map +0 -1
- package/dist/utils/format/number.js.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js.map +0 -1
- package/index.css +0 -1018
- package/src/assets/illustration-1.svg +0 -92
- package/src/assets/illustration-2.svg +0 -14
- package/src/assets/illustration-gradient.svg +0 -7049
- package/src/build-css-entry.ts +0 -3
- package/src/colors.stories.conts.ts +0 -164
- package/src/colors.stories.tsx +0 -66
- package/src/components/alert/alert.stories.tsx +0 -178
- package/src/components/alert/alert.tsx +0 -291
- package/src/components/alert/index.ts +0 -1
- package/src/components/avatar/avatar-group.tsx +0 -186
- package/src/components/avatar/avatar.stories.tsx +0 -179
- package/src/components/avatar/avatar.tsx +0 -219
- package/src/components/avatar/index.ts +0 -2
- package/src/components/badge/badge.stories.tsx +0 -468
- package/src/components/badge/badge.tsx +0 -147
- package/src/components/badge/icon-badge.tsx +0 -43
- package/src/components/badge/index.ts +0 -4
- package/src/components/badge/status-badge.tsx +0 -43
- package/src/components/badge/user-badge.tsx +0 -34
- package/src/components/button/button-link.stories.tsx +0 -86
- package/src/components/button/button-link.tsx +0 -76
- package/src/components/button/button.stories.tsx +0 -138
- package/src/components/button/button.tsx +0 -91
- package/src/components/button/icon-button.stories.tsx +0 -228
- package/src/components/button/icon-button.tsx +0 -95
- package/src/components/button/index.ts +0 -3
- package/src/components/button-group/button-group.stories.tsx +0 -361
- package/src/components/button-group/button-group.tsx +0 -111
- package/src/components/button-group/index.ts +0 -1
- package/src/components/calendar/calendar.tsx +0 -90
- package/src/components/calendar/index.ts +0 -1
- package/src/components/checkbox/checkbox-label.tsx +0 -125
- package/src/components/checkbox/checkbox-links.tsx +0 -92
- package/src/components/checkbox/checkbox.stories.tsx +0 -391
- package/src/components/checkbox/checkbox.tsx +0 -71
- package/src/components/checkbox/index.ts +0 -3
- package/src/components/code-block/code-block-footer.tsx +0 -197
- package/src/components/code-block/code-block.stories.tsx +0 -323
- package/src/components/code-block/code-block.tsx +0 -283
- package/src/components/code-block/code-content.tsx +0 -63
- package/src/components/code-block/code-copy-button.tsx +0 -73
- package/src/components/code-block/code-tabs.tsx +0 -170
- package/src/components/code-block/index.ts +0 -3
- package/src/components/command/command.stories.tsx +0 -133
- package/src/components/command/command.tsx +0 -265
- package/src/components/command/index.ts +0 -1
- package/src/components/confetti/confetti.stories.tsx +0 -38
- package/src/components/confetti/confetti.tsx +0 -140
- package/src/components/confetti/index.ts +0 -1
- package/src/components/dashboard/components/analytics-content.tsx +0 -102
- package/src/components/dashboard/components/animated-logo.tsx +0 -25
- package/src/components/dashboard/components/complete-setup-button.tsx +0 -30
- package/src/components/dashboard/components/jobs-content.tsx +0 -51
- package/src/components/dashboard/components/mobile-menu.tsx +0 -50
- package/src/components/dashboard/components/organization-selector.tsx +0 -51
- package/src/components/dashboard/components/top-menu.tsx +0 -26
- package/src/components/dashboard/components/topbar-button.tsx +0 -27
- package/src/components/dashboard/components/topbar.tsx +0 -40
- package/src/components/dashboard/components/user-profile.tsx +0 -90
- package/src/components/dashboard/dashboard.stories.tsx +0 -25
- package/src/components/dashboard/dashboard.tsx +0 -61
- package/src/components/dashboard/index.ts +0 -1
- package/src/components/date-picker/date-picker.stories.tsx +0 -230
- package/src/components/date-picker/date-picker.tsx +0 -179
- package/src/components/date-picker/index.ts +0 -1
- package/src/components/date-time-range-picker/date-time-range-picker.tsx +0 -211
- package/src/components/date-time-range-picker/index.ts +0 -1
- package/src/components/dot-grid/dot-grid.tsx +0 -325
- package/src/components/dot-grid/index.ts +0 -1
- package/src/components/dropdown-menu/dropdown-menu.stories.tsx +0 -384
- package/src/components/dropdown-menu/dropdown-menu.tsx +0 -416
- package/src/components/dropdown-menu/index.ts +0 -1
- package/src/components/dynamic-item/dynamic-item.stories.tsx +0 -266
- package/src/components/dynamic-item/dynamic-item.tsx +0 -74
- package/src/components/dynamic-item/index.ts +0 -1
- package/src/components/form/form.stories.tsx +0 -505
- package/src/components/form/form.tsx +0 -154
- package/src/components/form/index.ts +0 -1
- package/src/components/icon/custom/badge.tsx +0 -17
- package/src/components/icon/custom/check-circle-solid.tsx +0 -24
- package/src/components/icon/custom/circle-dotted-line.tsx +0 -17
- package/src/components/icon/custom/component-fill.tsx +0 -17
- package/src/components/icon/custom/component-line.tsx +0 -17
- package/src/components/icon/custom/ellipse-mini-solid.tsx +0 -17
- package/src/components/icon/custom/index.ts +0 -14
- package/src/components/icon/custom/info-tooltip-fill.tsx +0 -21
- package/src/components/icon/custom/resize.tsx +0 -17
- package/src/components/icon/custom/shipfox-logo.tsx +0 -20
- package/src/components/icon/custom/slack-logo.tsx +0 -35
- package/src/components/icon/custom/spinner.tsx +0 -144
- package/src/components/icon/custom/stripe-logo.tsx +0 -27
- package/src/components/icon/custom/thunder.tsx +0 -17
- package/src/components/icon/custom/x-circle-solid.tsx +0 -24
- package/src/components/icon/icon.stories.tsx +0 -31
- package/src/components/icon/icon.tsx +0 -90
- package/src/components/icon/index.ts +0 -1
- package/src/components/icon/remixicon-registry.ts +0 -24
- package/src/components/index.ts +0 -36
- package/src/components/inline-tips/index.ts +0 -1
- package/src/components/inline-tips/inline-tips.stories.tsx +0 -131
- package/src/components/inline-tips/inline-tips.tsx +0 -132
- package/src/components/input/index.ts +0 -1
- package/src/components/input/input.stories.tsx +0 -138
- package/src/components/input/input.tsx +0 -43
- package/src/components/item/index.ts +0 -1
- package/src/components/item/item.stories.tsx +0 -159
- package/src/components/item/item.tsx +0 -182
- package/src/components/kbd/index.ts +0 -1
- package/src/components/kbd/kbd.stories.tsx +0 -64
- package/src/components/kbd/kbd.tsx +0 -32
- package/src/components/label/index.ts +0 -1
- package/src/components/label/label.stories.tsx +0 -67
- package/src/components/label/label.tsx +0 -15
- package/src/components/modal/index.ts +0 -1
- package/src/components/modal/modal.stories.tsx +0 -448
- package/src/components/modal/modal.tsx +0 -311
- package/src/components/moving-border/index.ts +0 -1
- package/src/components/moving-border/moving-border.tsx +0 -67
- package/src/components/popover/index.ts +0 -1
- package/src/components/popover/popover.tsx +0 -60
- package/src/components/renovate.json +0 -23
- package/src/components/search/index.ts +0 -28
- package/src/components/search/search-context.tsx +0 -78
- package/src/components/search/search-inline.tsx +0 -107
- package/src/components/search/search-modal.tsx +0 -198
- package/src/components/search/search-trigger.tsx +0 -47
- package/src/components/search/search-variants.ts +0 -88
- package/src/components/search/search.stories.tsx +0 -392
- package/src/components/search/search.tsx +0 -47
- package/src/components/select/index.ts +0 -1
- package/src/components/select/select.stories.tsx +0 -207
- package/src/components/select/select.tsx +0 -220
- package/src/components/shiny-text/index.ts +0 -1
- package/src/components/shiny-text/shiny-text.tsx +0 -21
- package/src/components/skeleton/index.ts +0 -1
- package/src/components/skeleton/skeleton.stories.tsx +0 -178
- package/src/components/skeleton/skeleton.tsx +0 -14
- package/src/components/table/data-table.tsx +0 -254
- package/src/components/table/index.ts +0 -5
- package/src/components/table/table-column-header.tsx +0 -141
- package/src/components/table/table-pagination.tsx +0 -161
- package/src/components/table/table.stories.columns.tsx +0 -198
- package/src/components/table/table.stories.components.tsx +0 -104
- package/src/components/table/table.stories.data.ts +0 -117
- package/src/components/table/table.stories.tsx +0 -256
- package/src/components/table/table.tsx +0 -95
- package/src/components/tabs/index.ts +0 -1
- package/src/components/tabs/tabs.stories.tsx +0 -100
- package/src/components/tabs/tabs.tsx +0 -380
- package/src/components/textarea/index.ts +0 -1
- package/src/components/textarea/textarea.stories.tsx +0 -196
- package/src/components/textarea/textarea.tsx +0 -42
- package/src/components/theme/index.ts +0 -1
- package/src/components/theme/theme-provider.tsx +0 -50
- package/src/components/toast/index.ts +0 -2
- package/src/components/toast/toast-custom.tsx +0 -154
- package/src/components/toast/toast.stories.tsx +0 -369
- package/src/components/toast/toast.tsx +0 -41
- package/src/components/tooltip/index.ts +0 -1
- package/src/components/tooltip/tooltip.stories.tsx +0 -284
- package/src/components/tooltip/tooltip.tsx +0 -121
- package/src/components/typography/code.stories.tsx +0 -36
- package/src/components/typography/code.tsx +0 -38
- package/src/components/typography/header.stories.tsx +0 -27
- package/src/components/typography/header.tsx +0 -41
- package/src/components/typography/index.ts +0 -3
- package/src/components/typography/text.stories.tsx +0 -67
- package/src/components/typography/text.tsx +0 -50
- package/src/hooks/index.ts +0 -6
- package/src/hooks/useCopy.ts +0 -0
- package/src/hooks/useCopyToClipboard.ts +0 -20
- package/src/hooks/useMediaQuery.ts +0 -87
- package/src/hooks/useResolvedTheme.ts +0 -34
- package/src/hooks/useShikiHighlight.ts +0 -140
- package/src/hooks/useShikiStyleInjection.ts +0 -34
- package/src/hooks/useTheme.ts +0 -10
- package/src/index.ts +0 -4
- package/src/onboarding/sign-in.stories.tsx +0 -85
- package/src/state/theme.ts +0 -15
- package/src/utils/avatar.ts +0 -27
- package/src/utils/clipboard.ts +0 -4
- package/src/utils/cn.ts +0 -6
- package/src/utils/date.test.ts +0 -119
- package/src/utils/date.ts +0 -99
- package/src/utils/debounce.ts +0 -15
- package/src/utils/format/chart.ts +0 -16
- package/src/utils/format/date.test.ts +0 -65
- package/src/utils/format/date.ts +0 -75
- package/src/utils/format/duration.test.ts +0 -58
- package/src/utils/format/duration.ts +0 -82
- package/src/utils/format/index.ts +0 -4
- package/src/utils/format/number.test.ts +0 -38
- package/src/utils/format/number.ts +0 -33
- package/src/utils/index.ts +0 -6
- package/test/global.ts +0 -3
- package/test/setup.ts +0 -9
- package/tsconfig.build.json +0 -19
- package/tsconfig.json +0 -11
- package/tsconfig.test.json +0 -12
- package/vercel.json +0 -8
- package/vite.css.config.ts +0 -30
- package/vitest.config.ts +0 -44
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import type {Column} from '@tanstack/react-table';
|
|
2
|
-
import {Icon} from 'components/icon';
|
|
3
|
-
import type {HTMLAttributes} from 'react';
|
|
4
|
-
import {cn} from 'utils/cn';
|
|
5
|
-
import {Button} from '../button';
|
|
6
|
-
import {
|
|
7
|
-
DropdownMenu,
|
|
8
|
-
DropdownMenuContent,
|
|
9
|
-
DropdownMenuItem,
|
|
10
|
-
DropdownMenuTrigger,
|
|
11
|
-
} from '../dropdown-menu';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Props for the {@link TableColumnHeader} component.
|
|
15
|
-
*
|
|
16
|
-
* Defines the properties needed to render a sortable table column header
|
|
17
|
-
* with interactive sorting controls.
|
|
18
|
-
*
|
|
19
|
-
* @typeParam TData - The shape of the row data in the table.
|
|
20
|
-
* @typeParam TValue - The type of the value in this specific column.
|
|
21
|
-
*/
|
|
22
|
-
export interface TableColumnHeaderProps<TData, TValue> extends HTMLAttributes<HTMLDivElement> {
|
|
23
|
-
/**
|
|
24
|
-
* The TanStack Table column instance for this header.
|
|
25
|
-
*
|
|
26
|
-
* This instance provides access to column state and sorting methods.
|
|
27
|
-
* It's typically obtained from the `header.column` property when mapping
|
|
28
|
-
* over header groups in TanStack Table.
|
|
29
|
-
*
|
|
30
|
-
* The column determines:
|
|
31
|
-
* - Whether sorting is enabled (`getCanSort()`)
|
|
32
|
-
* - Current sort direction (`getIsSorted()`)
|
|
33
|
-
* - Methods to toggle sorting (`toggleSorting()`)
|
|
34
|
-
*
|
|
35
|
-
* @see {@link https://tanstack.com/table/latest/docs/api/core/column TanStack Column API}
|
|
36
|
-
*/
|
|
37
|
-
column: Column<TData, TValue>;
|
|
38
|
-
/**
|
|
39
|
-
* The display text for the column header.
|
|
40
|
-
*
|
|
41
|
-
* This is the human-readable label that appears in the table header.
|
|
42
|
-
* For sortable columns, this text appears in a button with sort indicators.
|
|
43
|
-
* For non-sortable columns, it renders as plain text.
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```tsx
|
|
47
|
-
* <TableColumnHeader column={column} title="Customer Name" />
|
|
48
|
-
* <TableColumnHeader column={column} title="Order Date" />
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
title: string;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Renders a table column header with optional sorting functionality.
|
|
56
|
-
*
|
|
57
|
-
* This component automatically adapts based on whether the column supports sorting:
|
|
58
|
-
* - **Sortable columns**: Renders an interactive button with a dropdown menu for
|
|
59
|
-
* ascending/descending sort options and visual indicators for the current sort state
|
|
60
|
-
* - **Non-sortable columns**: Renders plain text without interactive controls
|
|
61
|
-
*
|
|
62
|
-
* The component integrates seamlessly with TanStack Table's sorting system and
|
|
63
|
-
* manages sort state through the provided column instance.
|
|
64
|
-
*
|
|
65
|
-
* @typeParam TData - The shape of the row data in the table.
|
|
66
|
-
* @typeParam TValue - The type of the value in this specific column.
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* ```tsx
|
|
70
|
-
* // In your column definitions:
|
|
71
|
-
* const columns: ColumnDef<User>[] = [
|
|
72
|
-
* {
|
|
73
|
-
* accessorKey: 'name',
|
|
74
|
-
* header: ({ column }) => (
|
|
75
|
-
* <TableColumnHeader column={column} title="Name" />
|
|
76
|
-
* ),
|
|
77
|
-
* enableSorting: true,
|
|
78
|
-
* },
|
|
79
|
-
* {
|
|
80
|
-
* accessorKey: 'email',
|
|
81
|
-
* header: ({ column }) => (
|
|
82
|
-
* <TableColumnHeader column={column} title="Email" />
|
|
83
|
-
* ),
|
|
84
|
-
* enableSorting: false,
|
|
85
|
-
* },
|
|
86
|
-
* ];
|
|
87
|
-
* ```
|
|
88
|
-
*/
|
|
89
|
-
export function TableColumnHeader<TData, TValue>({
|
|
90
|
-
column,
|
|
91
|
-
title,
|
|
92
|
-
className,
|
|
93
|
-
}: TableColumnHeaderProps<TData, TValue>) {
|
|
94
|
-
if (!column.getCanSort()) {
|
|
95
|
-
return <div className={cn('text-xs font-medium', className)}>{title}</div>;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
const isSorted = column.getIsSorted();
|
|
99
|
-
|
|
100
|
-
return (
|
|
101
|
-
<div className={cn('flex items-center space-x-2', className)}>
|
|
102
|
-
<DropdownMenu>
|
|
103
|
-
<DropdownMenuTrigger asChild>
|
|
104
|
-
<Button
|
|
105
|
-
variant="transparent"
|
|
106
|
-
size="xs"
|
|
107
|
-
className="-ml-12 h-32 px-8 data-[state=open]:bg-background-components-hover gap-0"
|
|
108
|
-
>
|
|
109
|
-
<span className="text-xs font-medium text-foreground-neutral-subtle">{title}</span>
|
|
110
|
-
{isSorted === 'desc' ? (
|
|
111
|
-
<Icon
|
|
112
|
-
name="arrowDownLongLine"
|
|
113
|
-
className="ml-2 size-14 text-foreground-neutral-muted"
|
|
114
|
-
/>
|
|
115
|
-
) : isSorted === 'asc' ? (
|
|
116
|
-
<Icon name="arrowUpLongLine" className="ml-2 size-14 text-foreground-neutral-muted" />
|
|
117
|
-
) : (
|
|
118
|
-
<Icon name="arrowUpDownLine" className="ml-4 size-16 text-foreground-neutral-muted" />
|
|
119
|
-
)}
|
|
120
|
-
</Button>
|
|
121
|
-
</DropdownMenuTrigger>
|
|
122
|
-
<DropdownMenuContent align="start" size="sm">
|
|
123
|
-
<DropdownMenuItem
|
|
124
|
-
icon="arrowUpLongLine"
|
|
125
|
-
onClick={() => column.toggleSorting(false)}
|
|
126
|
-
closeOnSelect
|
|
127
|
-
>
|
|
128
|
-
Asc
|
|
129
|
-
</DropdownMenuItem>
|
|
130
|
-
<DropdownMenuItem
|
|
131
|
-
icon="arrowDownLongLine"
|
|
132
|
-
onClick={() => column.toggleSorting(true)}
|
|
133
|
-
closeOnSelect
|
|
134
|
-
>
|
|
135
|
-
Desc
|
|
136
|
-
</DropdownMenuItem>
|
|
137
|
-
</DropdownMenuContent>
|
|
138
|
-
</DropdownMenu>
|
|
139
|
-
</div>
|
|
140
|
-
);
|
|
141
|
-
}
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import type {Table} from '@tanstack/react-table';
|
|
2
|
-
import {Text} from 'components/typography';
|
|
3
|
-
import type {ComponentProps} from 'react';
|
|
4
|
-
import {Button} from '../button';
|
|
5
|
-
import {Icon} from '../icon';
|
|
6
|
-
import {Select, SelectContent, SelectItem, SelectTrigger, SelectValue} from '../select/select';
|
|
7
|
-
import {TableCell, TableFooter, TableRow} from './table';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Props for the {@link TablePagination} component.
|
|
11
|
-
*
|
|
12
|
-
* Provides pagination controls for data tables, including page navigation,
|
|
13
|
-
* page size selection, and row count displays.
|
|
14
|
-
*
|
|
15
|
-
* @typeParam TData - The shape of the row data in the table.
|
|
16
|
-
*/
|
|
17
|
-
interface TablePaginationProps<TData> extends ComponentProps<'tfoot'> {
|
|
18
|
-
/**
|
|
19
|
-
* The TanStack Table instance that manages the table state and behavior.
|
|
20
|
-
*
|
|
21
|
-
* This is typically created using `useReactTable` from `@tanstack/react-table`.
|
|
22
|
-
* The table instance provides access to pagination state, row data, and methods
|
|
23
|
-
* for controlling pagination (e.g., `setPageSize`, `nextPage`, `previousPage`).
|
|
24
|
-
*
|
|
25
|
-
* @see {@link https://tanstack.com/table/latest/docs/api/core/table TanStack Table API}
|
|
26
|
-
*/
|
|
27
|
-
table: Table<TData>;
|
|
28
|
-
/**
|
|
29
|
-
* Array of page size options to display in the page size selector.
|
|
30
|
-
* When provided, a dropdown will be rendered allowing users to change the number of rows per page.
|
|
31
|
-
*
|
|
32
|
-
* @default [10, 20, 50, 100]
|
|
33
|
-
* @example
|
|
34
|
-
* ```tsx
|
|
35
|
-
* <TablePagination table={table} pageSizeOptions={[10, 25, 50]} />
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
pageSizeOptions?: number[];
|
|
39
|
-
/**
|
|
40
|
-
* When `true`, displays the count of selected rows instead of pagination range.
|
|
41
|
-
*
|
|
42
|
-
* - If `true`: Shows "X of Y row(s) selected" where X is the number of selected rows
|
|
43
|
-
* - If `false`: Shows "A — B of C results" where A-B is the current page range
|
|
44
|
-
*
|
|
45
|
-
* This is useful when row selection is enabled and you want to give users feedback
|
|
46
|
-
* on how many rows they have selected.
|
|
47
|
-
*
|
|
48
|
-
* @default false
|
|
49
|
-
* @example
|
|
50
|
-
* ```tsx
|
|
51
|
-
* <TablePagination table={table} showSelectedCount={true} />
|
|
52
|
-
* // Displays: "5 of 100 row(s) selected"
|
|
53
|
-
* ```
|
|
54
|
-
*/
|
|
55
|
-
showSelectedCount?: boolean;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export function TablePagination<TData>({
|
|
59
|
-
table,
|
|
60
|
-
className,
|
|
61
|
-
pageSizeOptions = [10, 20, 50, 100],
|
|
62
|
-
showSelectedCount = false,
|
|
63
|
-
...props
|
|
64
|
-
}: TablePaginationProps<TData>) {
|
|
65
|
-
const currentPage = table.getState().pagination.pageIndex + 1;
|
|
66
|
-
const pageSize = table.getState().pagination.pageSize;
|
|
67
|
-
const totalRows = table.getFilteredRowModel().rows.length;
|
|
68
|
-
const startRow = totalRows === 0 ? 0 : currentPage === 1 ? 1 : (currentPage - 1) * pageSize + 1;
|
|
69
|
-
const endRow = Math.min(currentPage * pageSize, totalRows);
|
|
70
|
-
|
|
71
|
-
return (
|
|
72
|
-
<TableFooter className={className} {...props}>
|
|
73
|
-
<TableRow className="hover:bg-transparent">
|
|
74
|
-
<TableCell
|
|
75
|
-
colSpan={table.getAllColumns().length}
|
|
76
|
-
className="group-hover/row:bg-transparent"
|
|
77
|
-
>
|
|
78
|
-
<div className="flex items-center justify-between gap-16">
|
|
79
|
-
<div className="flex items-center gap-16">
|
|
80
|
-
{showSelectedCount && (
|
|
81
|
-
<Text size="sm" className="text-foreground-neutral-muted">
|
|
82
|
-
{table.getFilteredSelectedRowModel().rows.length} of {totalRows} row(s) selected
|
|
83
|
-
</Text>
|
|
84
|
-
)}
|
|
85
|
-
{!showSelectedCount && (
|
|
86
|
-
<Text size="sm" className="text-foreground-neutral-muted">
|
|
87
|
-
{startRow} — {endRow} of {totalRows} results
|
|
88
|
-
</Text>
|
|
89
|
-
)}
|
|
90
|
-
<div className="flex items-center gap-8">
|
|
91
|
-
<Text size="sm" className="text-foreground-neutral-muted">
|
|
92
|
-
Rows per page
|
|
93
|
-
</Text>
|
|
94
|
-
<Select
|
|
95
|
-
value={String(pageSize)}
|
|
96
|
-
onValueChange={(value) => {
|
|
97
|
-
table.setPageSize(Number(value));
|
|
98
|
-
}}
|
|
99
|
-
>
|
|
100
|
-
<SelectTrigger className="h-28 w-80" size="small">
|
|
101
|
-
<SelectValue />
|
|
102
|
-
</SelectTrigger>
|
|
103
|
-
<SelectContent>
|
|
104
|
-
{pageSizeOptions.map((size) => (
|
|
105
|
-
<SelectItem key={size} value={String(size)}>
|
|
106
|
-
{size}
|
|
107
|
-
</SelectItem>
|
|
108
|
-
))}
|
|
109
|
-
</SelectContent>
|
|
110
|
-
</Select>
|
|
111
|
-
</div>
|
|
112
|
-
</div>
|
|
113
|
-
|
|
114
|
-
<div className="flex items-center">
|
|
115
|
-
<Button
|
|
116
|
-
variant="transparent"
|
|
117
|
-
size="xs"
|
|
118
|
-
onClick={() => table.setPageIndex(0)}
|
|
119
|
-
disabled={!table.getCanPreviousPage()}
|
|
120
|
-
className="h-32 w-32 p-0"
|
|
121
|
-
aria-label="Go to first page"
|
|
122
|
-
>
|
|
123
|
-
<Icon name="arrowLeftDoubleLine" className="size-16" />
|
|
124
|
-
</Button>
|
|
125
|
-
<Button
|
|
126
|
-
variant="transparent"
|
|
127
|
-
size="xs"
|
|
128
|
-
onClick={() => table.previousPage()}
|
|
129
|
-
disabled={!table.getCanPreviousPage()}
|
|
130
|
-
className="h-32 px-12"
|
|
131
|
-
aria-label="Go to previous page"
|
|
132
|
-
>
|
|
133
|
-
Prev
|
|
134
|
-
</Button>
|
|
135
|
-
<Button
|
|
136
|
-
variant="transparent"
|
|
137
|
-
size="xs"
|
|
138
|
-
onClick={() => table.nextPage()}
|
|
139
|
-
disabled={!table.getCanNextPage()}
|
|
140
|
-
className="h-32 px-12"
|
|
141
|
-
aria-label="Go to next page"
|
|
142
|
-
>
|
|
143
|
-
Next
|
|
144
|
-
</Button>
|
|
145
|
-
<Button
|
|
146
|
-
variant="transparent"
|
|
147
|
-
size="xs"
|
|
148
|
-
onClick={() => table.setPageIndex(table.getPageCount() - 1)}
|
|
149
|
-
disabled={!table.getCanNextPage()}
|
|
150
|
-
className="h-32 w-32 p-0"
|
|
151
|
-
aria-label="Go to last page"
|
|
152
|
-
>
|
|
153
|
-
<Icon name="arrowRightDoubleLine" className="size-16" />
|
|
154
|
-
</Button>
|
|
155
|
-
</div>
|
|
156
|
-
</div>
|
|
157
|
-
</TableCell>
|
|
158
|
-
</TableRow>
|
|
159
|
-
</TableFooter>
|
|
160
|
-
);
|
|
161
|
-
}
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Column definitions for Table stories
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import type {ColumnDef} from '@tanstack/react-table';
|
|
6
|
-
import {Badge} from 'components/badge';
|
|
7
|
-
import {Icon} from 'components/icon';
|
|
8
|
-
import type {JobData, SearchJobData, User} from './table.stories.data';
|
|
9
|
-
import {TableColumnHeader} from './table-column-header';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Create column definitions for JobData
|
|
13
|
-
*/
|
|
14
|
-
export const createJobColumns = (): ColumnDef<JobData>[] => [
|
|
15
|
-
{
|
|
16
|
-
accessorKey: 'name',
|
|
17
|
-
header: ({column}) => <TableColumnHeader column={column} title="Name" />,
|
|
18
|
-
cell: ({row}) => (
|
|
19
|
-
<div className="font-medium text-foreground-neutral-base">{row.getValue('name')}</div>
|
|
20
|
-
),
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
accessorKey: 'total',
|
|
24
|
-
header: ({column}) => <TableColumnHeader column={column} title="Total" />,
|
|
25
|
-
cell: ({row}) => (
|
|
26
|
-
<div className="flex items-center gap-6">
|
|
27
|
-
<div className="size-6 rounded-full bg-foreground-neutral-muted" />
|
|
28
|
-
<span className="tabular-nums">{row.getValue('total')}</span>
|
|
29
|
-
</div>
|
|
30
|
-
),
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
accessorKey: 'success',
|
|
34
|
-
header: ({column}) => <TableColumnHeader column={column} title="Success" />,
|
|
35
|
-
cell: ({row}) => (
|
|
36
|
-
<div className="flex items-center gap-6">
|
|
37
|
-
<div className="size-6 rounded-full bg-tag-success-icon" />
|
|
38
|
-
<span className="tabular-nums">{row.getValue('success')}</span>
|
|
39
|
-
</div>
|
|
40
|
-
),
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
accessorKey: 'failed',
|
|
44
|
-
header: ({column}) => <TableColumnHeader column={column} title="Failed" />,
|
|
45
|
-
cell: ({row}) => (
|
|
46
|
-
<div className="flex items-center gap-6">
|
|
47
|
-
<div className="size-6 rounded-full bg-tag-error-icon" />
|
|
48
|
-
<span className="tabular-nums">{row.getValue('failed')}</span>
|
|
49
|
-
</div>
|
|
50
|
-
),
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
accessorKey: 'neutral',
|
|
54
|
-
header: ({column}) => <TableColumnHeader column={column} title="Neutral" />,
|
|
55
|
-
cell: ({row}) => (
|
|
56
|
-
<div className="flex items-center gap-6">
|
|
57
|
-
<div className="size-6 rounded-full bg-foreground-neutral-muted" />
|
|
58
|
-
<span className="tabular-nums">{row.getValue('neutral')}</span>
|
|
59
|
-
</div>
|
|
60
|
-
),
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
accessorKey: 'flaked',
|
|
64
|
-
header: ({column}) => <TableColumnHeader column={column} title="Flaked" />,
|
|
65
|
-
cell: ({row}) => (
|
|
66
|
-
<div className="flex items-center gap-6">
|
|
67
|
-
<div className="size-6 rounded-full bg-tag-warning-icon" />
|
|
68
|
-
<span className="tabular-nums">{row.getValue('flaked')}</span>
|
|
69
|
-
</div>
|
|
70
|
-
),
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
accessorKey: 'failureRate',
|
|
74
|
-
header: ({column}) => <TableColumnHeader column={column} title="Failure rate" />,
|
|
75
|
-
cell: ({row}) => <span className="tabular-nums">{row.getValue('failureRate')}</span>,
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
accessorKey: 'flakeRate',
|
|
79
|
-
header: ({column}) => <TableColumnHeader column={column} title="Flake rate" />,
|
|
80
|
-
cell: ({row}) => <span className="tabular-nums">{row.getValue('flakeRate')}</span>,
|
|
81
|
-
},
|
|
82
|
-
];
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Create column definitions for User data
|
|
86
|
-
*/
|
|
87
|
-
export const createUserColumns = (): ColumnDef<User>[] => [
|
|
88
|
-
{
|
|
89
|
-
accessorKey: 'name',
|
|
90
|
-
header: ({column}) => <TableColumnHeader column={column} title="Name" />,
|
|
91
|
-
cell: ({row}) => (
|
|
92
|
-
<div className="font-medium text-foreground-neutral-base">{row.getValue('name')}</div>
|
|
93
|
-
),
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
accessorKey: 'email',
|
|
97
|
-
header: ({column}) => <TableColumnHeader column={column} title="Email" />,
|
|
98
|
-
cell: ({row}) => <div className="text-foreground-neutral-subtle">{row.getValue('email')}</div>,
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
accessorKey: 'role',
|
|
102
|
-
header: ({column}) => <TableColumnHeader column={column} title="Role" />,
|
|
103
|
-
cell: ({row}) => <Badge variant="neutral">{row.getValue('role')}</Badge>,
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
accessorKey: 'status',
|
|
107
|
-
header: ({column}) => <TableColumnHeader column={column} title="Status" />,
|
|
108
|
-
cell: ({row}) => {
|
|
109
|
-
const status = row.getValue('status') as string;
|
|
110
|
-
return (
|
|
111
|
-
<Badge variant={status === 'active' ? 'success' : 'neutral'}>
|
|
112
|
-
{status.charAt(0).toUpperCase() + status.slice(1)}
|
|
113
|
-
</Badge>
|
|
114
|
-
);
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
];
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Create column definitions for SearchJobData
|
|
121
|
-
*/
|
|
122
|
-
export const createSearchJobColumns = (): ColumnDef<SearchJobData>[] => [
|
|
123
|
-
{
|
|
124
|
-
accessorKey: 'name',
|
|
125
|
-
header: ({column}) => <TableColumnHeader column={column} title="Job Name" />,
|
|
126
|
-
cell: ({row}) => (
|
|
127
|
-
<div className="font-medium text-foreground-neutral-base">{row.getValue('name')}</div>
|
|
128
|
-
),
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
accessorKey: 'repository',
|
|
132
|
-
header: ({column}) => <TableColumnHeader column={column} title="Repository" />,
|
|
133
|
-
cell: ({row}) => (
|
|
134
|
-
<div className="text-foreground-neutral-subtle font-mono text-xs">
|
|
135
|
-
{row.getValue('repository')}
|
|
136
|
-
</div>
|
|
137
|
-
),
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
accessorKey: 'branch',
|
|
141
|
-
header: ({column}) => <TableColumnHeader column={column} title="Branch" />,
|
|
142
|
-
cell: ({row}) => (
|
|
143
|
-
<div className="flex items-center gap-6">
|
|
144
|
-
<Icon name="gitBranchLine" className="size-14 text-foreground-neutral-muted" />
|
|
145
|
-
<span className="font-mono text-xs">{row.getValue('branch')}</span>
|
|
146
|
-
</div>
|
|
147
|
-
),
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
accessorKey: 'total',
|
|
151
|
-
header: ({column}) => <TableColumnHeader column={column} title="Total" />,
|
|
152
|
-
cell: ({row}) => <span className="tabular-nums">{row.getValue('total')}</span>,
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
accessorKey: 'success',
|
|
156
|
-
header: ({column}) => <TableColumnHeader column={column} title="Success" />,
|
|
157
|
-
cell: ({row}) => (
|
|
158
|
-
<div className="flex items-center gap-6">
|
|
159
|
-
<div className="size-6 rounded-full bg-tag-success-icon" />
|
|
160
|
-
<span className="tabular-nums">{row.getValue('success')}</span>
|
|
161
|
-
</div>
|
|
162
|
-
),
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
accessorKey: 'failed',
|
|
166
|
-
header: ({column}) => <TableColumnHeader column={column} title="Failed" />,
|
|
167
|
-
cell: ({row}) => (
|
|
168
|
-
<div className="flex items-center gap-6">
|
|
169
|
-
<div className="size-6 rounded-full bg-tag-error-icon" />
|
|
170
|
-
<span className="tabular-nums">{row.getValue('failed')}</span>
|
|
171
|
-
</div>
|
|
172
|
-
),
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
accessorKey: 'status',
|
|
176
|
-
header: ({column}) => <TableColumnHeader column={column} title="Status" />,
|
|
177
|
-
cell: ({row}) => {
|
|
178
|
-
const status = row.getValue('status') as string;
|
|
179
|
-
const variantMap = {
|
|
180
|
-
active: 'info',
|
|
181
|
-
completed: 'success',
|
|
182
|
-
failed: 'error',
|
|
183
|
-
} as const;
|
|
184
|
-
return (
|
|
185
|
-
<Badge variant={variantMap[status as keyof typeof variantMap]}>
|
|
186
|
-
{status.charAt(0).toUpperCase() + status.slice(1)}
|
|
187
|
-
</Badge>
|
|
188
|
-
);
|
|
189
|
-
},
|
|
190
|
-
},
|
|
191
|
-
];
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Column instances for reuse in stories
|
|
195
|
-
*/
|
|
196
|
-
export const jobColumns = createJobColumns();
|
|
197
|
-
export const userColumns = createUserColumns();
|
|
198
|
-
export const searchJobColumns = createSearchJobColumns();
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared components for Table stories
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import {Icon} from 'components/icon';
|
|
6
|
-
import {useSearchContext} from 'components/search/search-context';
|
|
7
|
-
import {
|
|
8
|
-
SearchEmpty,
|
|
9
|
-
SearchFooter,
|
|
10
|
-
SearchGroup,
|
|
11
|
-
SearchInput,
|
|
12
|
-
SearchItem,
|
|
13
|
-
SearchList,
|
|
14
|
-
} from 'components/search/search-modal';
|
|
15
|
-
import {Text} from 'components/typography';
|
|
16
|
-
import {useMemo} from 'react';
|
|
17
|
-
import {searchJobsData} from './table.stories.data';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Empty state component for job tables
|
|
21
|
-
*/
|
|
22
|
-
export function JobsEmptyState() {
|
|
23
|
-
return (
|
|
24
|
-
<div className="flex flex-col items-center justify-center gap-12 py-48">
|
|
25
|
-
<div className="size-32 rounded-6 bg-transparent border border-border-neutral-strong flex items-center justify-center">
|
|
26
|
-
<Icon
|
|
27
|
-
name="shipfox"
|
|
28
|
-
className="size-16 text-foreground-neutral-subtle"
|
|
29
|
-
color="var(--foreground-neutral-subtle, #a1a1aa)"
|
|
30
|
-
/>
|
|
31
|
-
</div>
|
|
32
|
-
<div className="text-center space-y-4">
|
|
33
|
-
<Text size="sm" className="text-foreground-neutral-base">
|
|
34
|
-
No jobs yet
|
|
35
|
-
</Text>
|
|
36
|
-
<Text size="xs" className="text-foreground-neutral-muted">
|
|
37
|
-
Import past runs or start a runner.
|
|
38
|
-
</Text>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Search modal content component with job filtering
|
|
46
|
-
*/
|
|
47
|
-
export function SearchModalContent({onSelectJob}: {onSelectJob: (jobId: string) => void}) {
|
|
48
|
-
const {searchValue} = useSearchContext();
|
|
49
|
-
|
|
50
|
-
const modalFilteredData = useMemo(() => {
|
|
51
|
-
if (!searchValue) {
|
|
52
|
-
return searchJobsData;
|
|
53
|
-
}
|
|
54
|
-
const query = searchValue.toLowerCase();
|
|
55
|
-
return searchJobsData.filter(
|
|
56
|
-
(job) =>
|
|
57
|
-
job.name.toLowerCase().includes(query) ||
|
|
58
|
-
job.repository.toLowerCase().includes(query) ||
|
|
59
|
-
job.branch.toLowerCase().includes(query),
|
|
60
|
-
);
|
|
61
|
-
}, [searchValue]);
|
|
62
|
-
|
|
63
|
-
return (
|
|
64
|
-
<>
|
|
65
|
-
<SearchInput placeholder="Search by job name, repository, or branch..." />
|
|
66
|
-
<SearchList>
|
|
67
|
-
{modalFilteredData.length === 0 ? (
|
|
68
|
-
<SearchEmpty>
|
|
69
|
-
<JobsEmptyState />
|
|
70
|
-
</SearchEmpty>
|
|
71
|
-
) : (
|
|
72
|
-
<SearchGroup heading={searchValue ? `Results (${modalFilteredData.length})` : 'All Jobs'}>
|
|
73
|
-
{modalFilteredData.map((job) => (
|
|
74
|
-
<SearchItem
|
|
75
|
-
key={job.id}
|
|
76
|
-
value={`${job.id}-${job.name}-${job.repository}-${job.branch}`}
|
|
77
|
-
icon={
|
|
78
|
-
<Icon name="gitBranchLine" className="size-16 text-foreground-neutral-subtle" />
|
|
79
|
-
}
|
|
80
|
-
description={`${job.repository} • ${job.branch}`}
|
|
81
|
-
onSelect={() => onSelectJob(job.id)}
|
|
82
|
-
>
|
|
83
|
-
{job.name}
|
|
84
|
-
</SearchItem>
|
|
85
|
-
))}
|
|
86
|
-
</SearchGroup>
|
|
87
|
-
)}
|
|
88
|
-
</SearchList>
|
|
89
|
-
<SearchFooter>
|
|
90
|
-
<div className="flex items-center justify-between px-8 py-6">
|
|
91
|
-
<Text size="xs" className="text-foreground-neutral-muted">
|
|
92
|
-
Select a job to filter the table
|
|
93
|
-
</Text>
|
|
94
|
-
<div className="flex items-center gap-8">
|
|
95
|
-
<Icon name="cornerDownLeft" className="size-14 text-foreground-neutral-muted" />
|
|
96
|
-
<Text size="xs" className="text-foreground-neutral-muted">
|
|
97
|
-
to select
|
|
98
|
-
</Text>
|
|
99
|
-
</div>
|
|
100
|
-
</div>
|
|
101
|
-
</SearchFooter>
|
|
102
|
-
</>
|
|
103
|
-
);
|
|
104
|
-
}
|