@jcsoftdev/ui 0.5.0 → 0.6.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/CHANGELOG.md +337 -0
- package/README.md +25 -3
- package/bin/ui-theme.mjs +40 -6
- package/dist/ai/code-block/code-block.js +1 -1
- package/dist/atoms/big-date/big-date.js +2 -2
- package/dist/atoms/button/button.d.ts +6 -1
- package/dist/atoms/button/button.js +2 -2
- package/dist/atoms/chip/chip.d.ts +5 -0
- package/dist/atoms/chip/chip.js +3 -3
- package/dist/atoms/icon-button/icon-button.js +1 -1
- package/dist/atoms/internal/hit-area.d.ts +5 -4
- package/dist/atoms/internal/hit-area.js +1 -1
- package/dist/atoms/progress/index.d.ts +1 -1
- package/dist/atoms/progress/index.js +4 -1
- package/dist/atoms/progress/progress.d.ts +6 -1
- package/dist/atoms/progress/progress.js +19 -1
- package/dist/atoms/radio-group/radio-group.js +1 -1
- package/dist/atoms/status-pill/status-pill.d.ts +16 -5
- package/dist/atoms/status-pill/status-pill.js +43 -18
- package/dist/brand/logo-forge.js +1 -1
- package/dist/charts/candlestick-chart/candlestick-chart.js +2 -2
- package/dist/charts/chart-grid/chart-grid.js +2 -2
- package/dist/charts/chord-chart/chord-chart.js +1 -1
- package/dist/charts/core/axes.js +2 -2
- package/dist/charts/core/cartesian/annotations.js +2 -2
- package/dist/charts/core/cartesian/marks.js +1 -1
- package/dist/charts/core/distribution/marks.js +1 -1
- package/dist/charts/core/distribution/xy-points.js +1 -1
- package/dist/charts/core/export-menu.js +1 -1
- package/dist/charts/funnel-chart/funnel-chart.js +1 -1
- package/dist/charts/gantt-chart/gantt-chart.js +4 -4
- package/dist/charts/gantt-chart/gantt-marks.js +3 -3
- package/dist/charts/index.d.ts +2 -0
- package/dist/charts/index.js +2 -0
- package/dist/charts/maps/geo/map-data-table.js +1 -1
- package/dist/charts/polar-area-chart/polar-area-chart.js +1 -1
- package/dist/charts/radar-chart/radar-chart.js +1 -1
- package/dist/charts/stock-chart/stock-chart.js +1 -1
- package/dist/charts/stock-chart/stock-drawing-layer.js +3 -3
- package/dist/charts/stock-chart/stock-plot.js +2 -2
- package/dist/containers/chat-thread/chat-thread.d.ts +98 -0
- package/dist/containers/chat-thread/chat-thread.js +219 -0
- package/dist/containers/chat-thread/format.d.ts +20 -0
- package/dist/containers/chat-thread/format.js +50 -0
- package/dist/containers/chat-thread/index.d.ts +1 -0
- package/dist/containers/chat-thread/index.js +8 -0
- package/dist/containers/cols/cols.d.ts +1 -1
- package/dist/containers/cols/cols.js +7 -0
- package/dist/containers/comment/comment.js +1 -1
- package/dist/containers/context-rail/context-rail.d.ts +62 -0
- package/dist/containers/context-rail/context-rail.js +175 -0
- package/dist/containers/context-rail/index.d.ts +1 -0
- package/dist/containers/context-rail/index.js +6 -0
- package/dist/containers/dashboard/dashboard.d.ts +40 -0
- package/dist/containers/dashboard/dashboard.js +84 -0
- package/dist/containers/dashboard/index.d.ts +1 -0
- package/dist/containers/dashboard/index.js +14 -0
- package/dist/containers/data-grid/data-grid.demos.js +4 -4
- package/dist/containers/data-grid/data-grid.js +6 -6
- package/dist/containers/data-grid/filter-builder-editor.js +2 -2
- package/dist/containers/data-grid/grid-toolbar.js +1 -1
- package/dist/containers/data-grid/spreadsheet.demos.d.ts +1 -1
- package/dist/containers/data-grid/spreadsheet.demos.js +1 -1
- package/dist/containers/detail-header/detail-header.d.ts +24 -0
- package/dist/containers/detail-header/detail-header.js +32 -0
- package/dist/containers/detail-header/index.d.ts +1 -0
- package/dist/containers/detail-header/index.js +6 -0
- package/dist/containers/facts/facts.js +1 -1
- package/dist/containers/filter-bar/filter-bar.d.ts +58 -0
- package/dist/containers/filter-bar/filter-bar.js +123 -0
- package/dist/containers/filter-bar/index.d.ts +1 -0
- package/dist/containers/filter-bar/index.js +6 -0
- package/dist/containers/hbars/hbars.js +2 -2
- package/dist/containers/index.d.ts +9 -0
- package/dist/containers/index.js +9 -0
- package/dist/containers/kanban/kanban.d.ts +23 -2
- package/dist/containers/kanban/kanban.js +101 -21
- package/dist/containers/kanban/model.d.ts +12 -0
- package/dist/containers/kanban/model.js +8 -0
- package/dist/containers/kpi/kpi.js +1 -1
- package/dist/containers/kpi-group/kpi-group.d.ts +6 -1
- package/dist/containers/kpi-group/kpi-group.js +6 -2
- package/dist/containers/list-detail/index.d.ts +1 -1
- package/dist/containers/list-detail/index.js +4 -0
- package/dist/containers/list-detail/list-detail.d.ts +51 -3
- package/dist/containers/list-detail/list-detail.js +109 -15
- package/dist/containers/page/page.d.ts +17 -4
- package/dist/containers/page/page.js +33 -4
- package/dist/containers/page-header/back.d.ts +10 -0
- package/dist/containers/page-header/back.js +28 -0
- package/dist/containers/page-header/index.d.ts +1 -0
- package/dist/containers/page-header/index.js +1 -0
- package/dist/containers/page-header/page-header.d.ts +19 -2
- package/dist/containers/page-header/page-header.js +26 -2
- package/dist/containers/pagination/cursor-pagination.d.ts +28 -0
- package/dist/containers/pagination/cursor-pagination.js +48 -0
- package/dist/containers/pagination/index.d.ts +3 -0
- package/dist/containers/pagination/index.js +10 -0
- package/dist/containers/pagination/pagination.d.ts +52 -0
- package/dist/containers/pagination/pagination.js +216 -0
- package/dist/containers/pagination/range.d.ts +29 -0
- package/dist/containers/pagination/range.js +42 -0
- package/dist/containers/pagination/use-pagination.d.ts +18 -0
- package/dist/containers/pagination/use-pagination.js +22 -0
- package/dist/containers/responsive-list/responsive-list.d.ts +28 -2
- package/dist/containers/responsive-list/responsive-list.js +134 -25
- package/dist/containers/row-actions/index.d.ts +1 -0
- package/dist/containers/row-actions/index.js +4 -0
- package/dist/containers/row-actions/row-actions.d.ts +26 -0
- package/dist/containers/row-actions/row-actions.js +78 -0
- package/dist/containers/selectable-card/index.d.ts +1 -0
- package/dist/containers/selectable-card/index.js +6 -0
- package/dist/containers/selectable-card/selectable-card.d.ts +26 -0
- package/dist/containers/selectable-card/selectable-card.js +57 -0
- package/dist/containers/settings-layout/settings-layout.d.ts +24 -7
- package/dist/containers/settings-layout/settings-layout.js +63 -8
- package/dist/containers/shortcuts/shortcuts.js +1 -1
- package/dist/containers/table/cell-padding.d.ts +2 -0
- package/dist/containers/table/cell-padding.js +4 -0
- package/dist/containers/table/index.d.ts +1 -0
- package/dist/containers/table/index.js +8 -0
- package/dist/containers/table/sort.d.ts +14 -0
- package/dist/containers/table/sort.js +11 -0
- package/dist/containers/table/table-parts.d.ts +24 -0
- package/dist/containers/table/table-parts.js +52 -0
- package/dist/containers/table/table.d.ts +37 -3
- package/dist/containers/table/table.js +120 -19
- package/dist/containers/table-columns-menu/index.d.ts +1 -0
- package/dist/containers/table-columns-menu/index.js +6 -0
- package/dist/containers/table-columns-menu/table-columns-menu.d.ts +14 -0
- package/dist/containers/table-columns-menu/table-columns-menu.js +46 -0
- package/dist/dashboards/layout.d.ts +1 -27
- package/dist/dashboards/layout.js +8 -40
- package/dist/forms/chip-group/chip-group.d.ts +5 -0
- package/dist/forms/chip-group/chip-group.js +3 -1
- package/dist/forms/combobox/combobox.js +1 -1
- package/dist/forms/copy-field/copy-field.js +1 -1
- package/dist/forms/date-picker/date-picker.d.ts +3 -1
- package/dist/forms/date-picker/date-picker.js +4 -2
- package/dist/forms/date-picker/date-time-picker.d.ts +8 -2
- package/dist/forms/date-picker/date-time-picker.js +13 -2
- package/dist/forms/field/field.d.ts +9 -2
- package/dist/forms/field/field.js +18 -4
- package/dist/forms/fieldset/fieldset.d.ts +11 -0
- package/dist/forms/fieldset/fieldset.js +12 -0
- package/dist/forms/fieldset/index.d.ts +1 -0
- package/dist/forms/fieldset/index.js +4 -0
- package/dist/forms/form-footer/form-footer.d.ts +26 -0
- package/dist/forms/form-footer/form-footer.js +44 -0
- package/dist/forms/form-footer/index.d.ts +1 -0
- package/dist/forms/form-footer/index.js +4 -0
- package/dist/forms/form-grid/form-grid.d.ts +21 -4
- package/dist/forms/form-grid/form-grid.js +20 -3
- package/dist/forms/form-grid/index.d.ts +1 -1
- package/dist/forms/form-grid/index.js +6 -2
- package/dist/forms/form-section/form-section.d.ts +12 -0
- package/dist/forms/form-section/form-section.js +30 -0
- package/dist/forms/form-section/index.d.ts +1 -0
- package/dist/forms/form-section/index.js +4 -0
- package/dist/forms/index.d.ts +3 -0
- package/dist/forms/index.js +3 -0
- package/dist/forms/input/input.d.ts +6 -2
- package/dist/forms/input/input.js +4 -1
- package/dist/forms/internal/listbox-items.d.ts +1 -1
- package/dist/forms/internal/listbox-items.js +3 -2
- package/dist/forms/native-select/native-select.js +1 -1
- package/dist/forms/select/index.d.ts +1 -1
- package/dist/forms/select/select.d.ts +5 -2
- package/dist/forms/select/select.js +7 -2
- package/dist/forms/select-menu/select-menu.js +1 -1
- package/dist/forms/time-input/time-input.d.ts +4 -2
- package/dist/forms/time-input/time-input.js +3 -1
- package/dist/i18n/strings.d.ts +86 -0
- package/dist/i18n/strings.js +46 -0
- package/dist/motion/count-up.d.ts +20 -0
- package/dist/motion/count-up.js +59 -0
- package/dist/motion/cross-fade.d.ts +21 -0
- package/dist/motion/cross-fade.js +86 -0
- package/dist/motion/index.d.ts +5 -0
- package/dist/motion/index.js +14 -0
- package/dist/motion/model.d.ts +15 -0
- package/dist/motion/model.js +68 -0
- package/dist/motion/motion-styles.d.ts +1 -0
- package/dist/motion/motion-styles.js +35 -0
- package/dist/motion/reveal.d.ts +37 -0
- package/dist/motion/reveal.js +69 -0
- package/dist/motion/use-enter-phase.d.ts +11 -0
- package/dist/motion/use-enter-phase.js +40 -0
- package/dist/motion/use-highlight-row.d.ts +22 -0
- package/dist/motion/use-highlight-row.js +38 -0
- package/dist/navigation/tabs/tabs.js +1 -1
- package/dist/navigation/wizard/wizard.d.ts +4 -1
- package/dist/navigation/wizard/wizard.js +3 -0
- package/dist/overlays/alert-dialog/alert-dialog.js +8 -1
- package/dist/overlays/context-menu/context-menu.js +3 -1
- package/dist/overlays/dialog/dialog.js +10 -2
- package/dist/overlays/drawer/drawer.d.ts +18 -4
- package/dist/overlays/drawer/drawer.js +53 -4
- package/dist/overlays/drawer/index.d.ts +1 -1
- package/dist/overlays/dropdown-menu/dropdown-menu.d.ts +1 -1
- package/dist/overlays/dropdown-menu/dropdown-menu.js +5 -4
- package/dist/overlays/hover-card/hover-card.js +2 -0
- package/dist/overlays/popover/popover.js +2 -0
- package/dist/overlays/toaster/index.d.ts +1 -1
- package/dist/overlays/toaster/toaster.d.ts +28 -2
- package/dist/overlays/toaster/toaster.js +73 -29
- package/dist/overlays/tooltip/tooltip.js +2 -0
- package/dist/primitives/use-presence.js +9 -0
- package/dist/shell/app-shell/app-shell.d.ts +8 -1
- package/dist/shell/app-shell/app-shell.js +50 -3
- package/dist/shell/index.d.ts +1 -0
- package/dist/shell/index.js +1 -0
- package/dist/shell/sidebar/sidebar.d.ts +17 -1
- package/dist/shell/sidebar/sidebar.js +126 -76
- package/dist/shell/topbar/topbar.d.ts +4 -2
- package/dist/shell/topbar/topbar.js +2 -0
- package/dist/showcase/operations-bento.js +2 -2
- package/dist/states/empty-state/empty-state.d.ts +10 -3
- package/dist/states/empty-state/empty-state.js +46 -5
- package/dist/states/error-state/error-state.js +1 -1
- package/dist/states/skeleton/skeleton.js +1 -1
- package/dist/utils/class-tokens.generated.js +4 -6
- package/dist/utils/list-navigation.d.ts +14 -0
- package/dist/utils/list-navigation.js +44 -0
- package/dist/utils/overlay-motion.d.ts +12 -0
- package/dist/utils/overlay-motion.js +14 -0
- package/dist/utils/use-container-width.d.ts +6 -0
- package/dist/utils/use-container-width.js +19 -0
- package/package.json +2 -2
- package/scripts/build-theme.mjs +46 -5
- package/src/ai/code-block/code-block.tsx +1 -1
- package/src/atoms/big-date/big-date.tsx +2 -2
- package/src/atoms/button/button.tsx +8 -3
- package/src/atoms/chip/chip.tsx +8 -3
- package/src/atoms/icon-button/icon-button.tsx +1 -1
- package/src/atoms/internal/hit-area.ts +5 -4
- package/src/atoms/progress/index.ts +8 -1
- package/src/atoms/progress/progress.tsx +30 -1
- package/src/atoms/radio-group/radio-group.tsx +1 -1
- package/src/atoms/status-pill/status-pill.tsx +59 -18
- package/src/brand/logo-forge.tsx +1 -1
- package/src/charts/candlestick-chart/candlestick-chart.tsx +2 -2
- package/src/charts/chart-grid/chart-grid.tsx +2 -2
- package/src/charts/chord-chart/chord-chart.tsx +1 -1
- package/src/charts/core/axes.tsx +2 -2
- package/src/charts/core/cartesian/annotations.tsx +2 -2
- package/src/charts/core/cartesian/marks.tsx +1 -1
- package/src/charts/core/distribution/marks.tsx +1 -1
- package/src/charts/core/distribution/xy-points.tsx +1 -1
- package/src/charts/core/export-menu.tsx +1 -1
- package/src/charts/funnel-chart/funnel-chart.tsx +1 -1
- package/src/charts/gantt-chart/gantt-chart.tsx +4 -4
- package/src/charts/gantt-chart/gantt-marks.tsx +3 -3
- package/src/charts/index.ts +2 -0
- package/src/charts/maps/geo/map-data-table.tsx +1 -1
- package/src/charts/polar-area-chart/polar-area-chart.tsx +1 -1
- package/src/charts/radar-chart/radar-chart.tsx +1 -1
- package/src/charts/stock-chart/stock-chart.tsx +1 -1
- package/src/charts/stock-chart/stock-drawing-layer.tsx +3 -3
- package/src/charts/stock-chart/stock-plot.tsx +2 -2
- package/src/containers/chat-thread/chat-thread.tsx +331 -0
- package/src/containers/chat-thread/format.ts +67 -0
- package/src/containers/chat-thread/index.ts +12 -0
- package/src/containers/cols/cols.tsx +13 -1
- package/src/containers/comment/comment.tsx +1 -1
- package/src/containers/context-rail/context-rail.tsx +229 -0
- package/src/containers/context-rail/index.ts +7 -0
- package/src/containers/dashboard/dashboard.tsx +142 -0
- package/src/containers/dashboard/index.ts +12 -0
- package/src/containers/data-grid/data-grid.demos.tsx +4 -4
- package/src/containers/data-grid/data-grid.tsx +6 -6
- package/src/containers/data-grid/filter-builder-editor.tsx +2 -2
- package/src/containers/data-grid/grid-toolbar.tsx +1 -1
- package/src/containers/data-grid/spreadsheet.demos.tsx +1 -1
- package/src/containers/detail-header/detail-header.tsx +64 -0
- package/src/containers/detail-header/index.ts +5 -0
- package/src/containers/facts/facts.tsx +1 -1
- package/src/containers/filter-bar/filter-bar.tsx +201 -0
- package/src/containers/filter-bar/index.ts +7 -0
- package/src/containers/hbars/hbars.tsx +2 -2
- package/src/containers/index.ts +9 -0
- package/src/containers/kanban/kanban.tsx +146 -39
- package/src/containers/kanban/model.ts +20 -0
- package/src/containers/kpi/kpi.tsx +1 -1
- package/src/containers/kpi-group/kpi-group.tsx +17 -2
- package/src/containers/list-detail/index.ts +5 -0
- package/src/containers/list-detail/list-detail.tsx +157 -9
- package/src/containers/page/page.tsx +61 -7
- package/src/containers/page-header/back.tsx +42 -0
- package/src/containers/page-header/index.ts +1 -0
- package/src/containers/page-header/page-header.tsx +49 -3
- package/src/containers/pagination/cursor-pagination.tsx +79 -0
- package/src/containers/pagination/index.ts +7 -0
- package/src/containers/pagination/pagination.tsx +266 -0
- package/src/containers/pagination/range.ts +68 -0
- package/src/containers/pagination/use-pagination.ts +44 -0
- package/src/containers/responsive-list/responsive-list.tsx +183 -46
- package/src/containers/row-actions/index.ts +1 -0
- package/src/containers/row-actions/row-actions.tsx +114 -0
- package/src/containers/selectable-card/index.ts +5 -0
- package/src/containers/selectable-card/selectable-card.tsx +84 -0
- package/src/containers/settings-layout/settings-layout.tsx +104 -13
- package/src/containers/shortcuts/shortcuts.tsx +1 -1
- package/src/containers/table/cell-padding.ts +2 -0
- package/src/containers/table/index.ts +6 -0
- package/src/containers/table/sort.ts +23 -0
- package/src/containers/table/table-parts.tsx +81 -0
- package/src/containers/table/table.tsx +212 -45
- package/src/containers/table-columns-menu/index.ts +5 -0
- package/src/containers/table-columns-menu/table-columns-menu.tsx +68 -0
- package/src/dashboards/layout.tsx +8 -75
- package/src/forms/chip-group/chip-group.tsx +8 -1
- package/src/forms/combobox/combobox.tsx +1 -1
- package/src/forms/copy-field/copy-field.tsx +1 -1
- package/src/forms/date-picker/date-picker.tsx +7 -2
- package/src/forms/date-picker/date-time-picker.tsx +28 -2
- package/src/forms/field/field.tsx +30 -3
- package/src/forms/fieldset/fieldset.tsx +22 -0
- package/src/forms/fieldset/index.ts +1 -0
- package/src/forms/form-footer/form-footer.tsx +74 -0
- package/src/forms/form-footer/index.ts +1 -0
- package/src/forms/form-grid/form-grid.tsx +42 -5
- package/src/forms/form-grid/index.ts +8 -1
- package/src/forms/form-section/form-section.tsx +41 -0
- package/src/forms/form-section/index.ts +1 -0
- package/src/forms/index.ts +3 -0
- package/src/forms/input/input.tsx +10 -3
- package/src/forms/internal/listbox-items.tsx +3 -4
- package/src/forms/native-select/native-select.tsx +1 -1
- package/src/forms/select/index.ts +1 -1
- package/src/forms/select/select.tsx +14 -3
- package/src/forms/select-menu/select-menu.tsx +1 -1
- package/src/forms/time-input/time-input.tsx +6 -2
- package/src/i18n/strings.ts +86 -0
- package/src/motion/count-up.tsx +83 -0
- package/src/motion/cross-fade.tsx +139 -0
- package/src/motion/index.ts +5 -0
- package/src/motion/model.ts +86 -0
- package/src/motion/motion-styles.tsx +47 -0
- package/src/motion/reveal.tsx +115 -0
- package/src/motion/use-enter-phase.ts +50 -0
- package/src/motion/use-highlight-row.ts +63 -0
- package/src/navigation/tabs/tabs.tsx +1 -1
- package/src/navigation/wizard/wizard.tsx +6 -1
- package/src/overlays/alert-dialog/alert-dialog.tsx +5 -1
- package/src/overlays/context-menu/context-menu.tsx +3 -2
- package/src/overlays/dialog/dialog.tsx +7 -2
- package/src/overlays/drawer/drawer.tsx +68 -6
- package/src/overlays/drawer/index.ts +1 -0
- package/src/overlays/dropdown-menu/dropdown-menu.tsx +5 -4
- package/src/overlays/hover-card/hover-card.tsx +2 -0
- package/src/overlays/popover/popover.tsx +2 -0
- package/src/overlays/toaster/index.ts +2 -0
- package/src/overlays/toaster/toaster.tsx +113 -17
- package/src/overlays/tooltip/tooltip.tsx +2 -0
- package/src/primitives/use-presence.ts +13 -0
- package/src/shell/app-shell/app-shell.tsx +54 -2
- package/src/shell/index.ts +1 -0
- package/src/shell/sidebar/sidebar.tsx +154 -75
- package/src/shell/topbar/topbar.tsx +8 -0
- package/src/showcase/operations-bento.tsx +2 -2
- package/src/states/empty-state/empty-state.tsx +52 -9
- package/src/states/error-state/error-state.tsx +1 -1
- package/src/states/skeleton/skeleton.tsx +1 -1
- package/src/utils/class-tokens.generated.ts +4 -6
- package/src/utils/list-navigation.ts +63 -0
- package/src/utils/overlay-motion.ts +33 -0
- package/src/utils/use-container-width.ts +24 -0
- package/styles/Theme.kt +15 -18
- package/styles/tailwind.css +29 -28
- package/styles/theme.css +29 -28
- package/styles/tokens.css +46 -0
- package/tokens/default.json +51 -29
|
@@ -1,47 +1,88 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import type { ComponentPropsWithRef } from "react";
|
|
3
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
4
4
|
import type { ClassNames } from "../../utils/class-names.js";
|
|
5
5
|
import { cn } from "../../utils/cn.js";
|
|
6
6
|
import { Led, type LedStatus } from "../led/index.js";
|
|
7
7
|
|
|
8
|
-
export type StatusPillPart = "root" | "dot" | "label";
|
|
8
|
+
export type StatusPillPart = "root" | "icon" | "dot" | "label";
|
|
9
9
|
|
|
10
10
|
export interface StatusPillProps
|
|
11
11
|
extends Omit<ComponentPropsWithRef<"button">, "children" | "onSelect"> {
|
|
12
12
|
status: LedStatus;
|
|
13
13
|
label: string;
|
|
14
|
-
/**
|
|
14
|
+
/** Decorative leading icon, hidden from screen readers; the label still names the status. */
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
/** Shows the status dot. Defaults to `true` without an `icon` and `false` with one, where the icon carries the look; the label still names the status either way. */
|
|
17
|
+
dot?: boolean;
|
|
18
|
+
/** Hides the visible label when the surrounding container is narrower than 700 px (the status stays announced). Defaults to `false`: the label is always visible. */
|
|
19
|
+
collapseLabel?: boolean;
|
|
20
|
+
/** Makes the pill a button. Without it, and without `onClick`, the pill is a plain `span`. */
|
|
15
21
|
onSelect?: () => void;
|
|
22
|
+
/**
|
|
23
|
+
* Forces the element: `true` renders a button even without a handler, `false` a `span` even
|
|
24
|
+
* with one. Omitted, the pill is a button only when `onSelect` or `onClick` is given.
|
|
25
|
+
*/
|
|
26
|
+
interactive?: boolean;
|
|
16
27
|
/** Per-part classes merged with `cn`; consumer classes win. `className` still targets the root and is merged last. */
|
|
17
28
|
classNames?: ClassNames<StatusPillPart>;
|
|
18
29
|
}
|
|
19
30
|
|
|
20
|
-
/** Pill showing a status LED and its label; the label
|
|
31
|
+
/** Pill showing a status LED and its label; `collapseLabel` hides the label when the surrounding container is narrow. */
|
|
21
32
|
export function StatusPill({
|
|
22
33
|
status,
|
|
23
34
|
label,
|
|
35
|
+
icon,
|
|
36
|
+
dot,
|
|
37
|
+
collapseLabel = false,
|
|
24
38
|
onSelect,
|
|
39
|
+
interactive,
|
|
25
40
|
className,
|
|
26
41
|
classNames,
|
|
27
42
|
...props
|
|
28
43
|
}: StatusPillProps) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
44
|
+
const isButton = interactive ?? (onSelect !== undefined || props.onClick !== undefined);
|
|
45
|
+
const showDot = dot ?? icon == null;
|
|
46
|
+
const rootClass = cn(
|
|
47
|
+
"flex h-control-sm shrink-0 items-center gap-1.5 whitespace-nowrap rounded-badge border-divider bg-surface-control px-2.5 font-semibold text-fs-120 text-ink-2",
|
|
48
|
+
isButton && "hover:enabled:border-line-strong disabled:cursor-default",
|
|
49
|
+
classNames?.root,
|
|
50
|
+
className,
|
|
51
|
+
);
|
|
52
|
+
const content = (
|
|
53
|
+
<>
|
|
54
|
+
{icon ? (
|
|
55
|
+
<span
|
|
56
|
+
aria-hidden="true"
|
|
57
|
+
className={cn("inline-flex shrink-0 [&_svg]:size-3.5", classNames?.icon)}
|
|
58
|
+
>
|
|
59
|
+
{icon}
|
|
60
|
+
</span>
|
|
61
|
+
) : null}
|
|
62
|
+
<Led
|
|
63
|
+
status={status}
|
|
64
|
+
label={label}
|
|
65
|
+
classNames={{ dot: cn(!showDot && "hidden", classNames?.dot) }}
|
|
66
|
+
/>
|
|
67
|
+
<span
|
|
68
|
+
aria-hidden="true"
|
|
69
|
+
className={cn(collapseLabel && "@max-[700px]:hidden", classNames?.label)}
|
|
70
|
+
>
|
|
43
71
|
{label}
|
|
44
72
|
</span>
|
|
73
|
+
</>
|
|
74
|
+
);
|
|
75
|
+
if (!isButton) {
|
|
76
|
+
const { ref, type: _type, disabled: _disabled, onClick: _onClick, ...rest } = props;
|
|
77
|
+
return (
|
|
78
|
+
<span {...(rest as ComponentPropsWithRef<"span">)} ref={ref as never} className={rootClass}>
|
|
79
|
+
{content}
|
|
80
|
+
</span>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
return (
|
|
84
|
+
<button type="button" onClick={onSelect} {...props} className={rootClass}>
|
|
85
|
+
{content}
|
|
45
86
|
</button>
|
|
46
87
|
);
|
|
47
88
|
}
|
package/src/brand/logo-forge.tsx
CHANGED
|
@@ -153,7 +153,7 @@ function Field({
|
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
const choiceBase =
|
|
156
|
-
"inline-flex h-control-sm cursor-pointer items-center justify-center gap-1.5 whitespace-nowrap rounded-chip px-3 font-semibold text-fs-
|
|
156
|
+
"inline-flex h-control-sm cursor-pointer items-center justify-center gap-1.5 whitespace-nowrap rounded-chip px-3 font-semibold text-fs-120 pressable focus-visible:focus-ring";
|
|
157
157
|
|
|
158
158
|
function choiceClass(on: boolean) {
|
|
159
159
|
return cn(
|
|
@@ -416,7 +416,7 @@ function CandlePlot({
|
|
|
416
416
|
y={4}
|
|
417
417
|
dy="0.34em"
|
|
418
418
|
textAnchor="end"
|
|
419
|
-
className="fill-ink-3 font-medium text-fs-
|
|
419
|
+
className="fill-ink-3 font-medium text-fs-110 tabular-nums"
|
|
420
420
|
>
|
|
421
421
|
{vfmt(maxVolume)}
|
|
422
422
|
</text>
|
|
@@ -499,7 +499,7 @@ function CandlePlot({
|
|
|
499
499
|
y={0}
|
|
500
500
|
dy="0.34em"
|
|
501
501
|
textAnchor="middle"
|
|
502
|
-
className="font-bold text-fs-
|
|
502
|
+
className="font-bold text-fs-110 tabular-nums"
|
|
503
503
|
style={{ fill: "var(--surface)" }}
|
|
504
504
|
>
|
|
505
505
|
{fmt(last.close)}
|
|
@@ -163,12 +163,12 @@ export function ChartGrid({
|
|
|
163
163
|
<header className="flex min-w-0 items-baseline justify-between gap-2">
|
|
164
164
|
<h3
|
|
165
165
|
id={headingId}
|
|
166
|
-
className="m-0 truncate font-bold text-fs-
|
|
166
|
+
className="m-0 truncate font-bold text-fs-120 text-ink-2 leading-tight"
|
|
167
167
|
>
|
|
168
168
|
{panel.title}
|
|
169
169
|
</h3>
|
|
170
170
|
{panel.subtitle ? (
|
|
171
|
-
<span className="shrink-0 font-semibold text-fs-
|
|
171
|
+
<span className="shrink-0 font-semibold text-fs-120 text-ink-3 tabular-nums">
|
|
172
172
|
{panel.subtitle}
|
|
173
173
|
</span>
|
|
174
174
|
) : null}
|
|
@@ -479,7 +479,7 @@ function ChordPlot({
|
|
|
479
479
|
x={at.x}
|
|
480
480
|
y={at.y + (cos > 0.4 ? -2 : cos < -0.4 ? 10 : 4)}
|
|
481
481
|
textAnchor={sin > 0.25 ? "start" : sin < -0.25 ? "end" : "middle"}
|
|
482
|
-
className="pointer-events-none select-none fill-ink-2 font-semibold text-fs-
|
|
482
|
+
className="pointer-events-none select-none fill-ink-2 font-semibold text-fs-120"
|
|
483
483
|
style={{ opacity: dim ? 0.4 : 1, transition: "opacity 150ms" }}
|
|
484
484
|
>
|
|
485
485
|
{groups[group.index]?.name}
|
package/src/charts/core/axes.tsx
CHANGED
|
@@ -120,7 +120,7 @@ export const AxisLeft = memo(function AxisLeft({ ticks, offset, title, color }:
|
|
|
120
120
|
x={-10}
|
|
121
121
|
y={-16}
|
|
122
122
|
textAnchor="end"
|
|
123
|
-
className="fill-ink-3 font-bold text-fs-
|
|
123
|
+
className="fill-ink-3 font-bold text-fs-110"
|
|
124
124
|
style={color ? { fill: color } : undefined}
|
|
125
125
|
>
|
|
126
126
|
{title}
|
|
@@ -152,7 +152,7 @@ export const AxisRight = memo(function AxisRight({ ticks, offset, title, color }
|
|
|
152
152
|
x={10}
|
|
153
153
|
y={-16}
|
|
154
154
|
textAnchor="start"
|
|
155
|
-
className="fill-ink-3 font-bold text-fs-
|
|
155
|
+
className="fill-ink-3 font-bold text-fs-110"
|
|
156
156
|
style={color ? { fill: color } : undefined}
|
|
157
157
|
>
|
|
158
158
|
{title}
|
|
@@ -36,7 +36,7 @@ function Pill({
|
|
|
36
36
|
y={y}
|
|
37
37
|
dy="0.35em"
|
|
38
38
|
textAnchor="middle"
|
|
39
|
-
className="font-bold text-fs-
|
|
39
|
+
className="font-bold text-fs-110"
|
|
40
40
|
style={{ fill: ink }}
|
|
41
41
|
>
|
|
42
42
|
{text}
|
|
@@ -111,7 +111,7 @@ export const AnnotationLayer = memo(function AnnotationLayer({
|
|
|
111
111
|
<text
|
|
112
112
|
x={(horizontal ? 0 : note.from) + 6}
|
|
113
113
|
y={(horizontal ? note.from : 0) + 13}
|
|
114
|
-
className="font-bold text-fs-
|
|
114
|
+
className="font-bold text-fs-110"
|
|
115
115
|
style={{ fill: ink }}
|
|
116
116
|
>
|
|
117
117
|
{note.label}
|
|
@@ -146,7 +146,7 @@ export const DataLabels = memo(function DataLabels({ geometry, dimmed }: DataLab
|
|
|
146
146
|
strokeWidth={label.inside ? 0 : 3}
|
|
147
147
|
strokeLinejoin="round"
|
|
148
148
|
className={cn(
|
|
149
|
-
"font-bold text-fs-
|
|
149
|
+
"font-bold text-fs-110 tabular-nums",
|
|
150
150
|
label.inside ? "fill-surface" : "fill-ink-2 stroke-surface",
|
|
151
151
|
)}
|
|
152
152
|
>
|
|
@@ -7,7 +7,7 @@ import type { DistributionLabels } from "./labels.js";
|
|
|
7
7
|
import type { CategoryLayout, XYLayout } from "./layout.js";
|
|
8
8
|
import type { BoxStats } from "./stats.js";
|
|
9
9
|
|
|
10
|
-
const TITLE = "fill-ink-3 font-bold text-fs-
|
|
10
|
+
const TITLE = "fill-ink-3 font-bold text-fs-110";
|
|
11
11
|
|
|
12
12
|
/** Gridlines along the value axis plus both axes of a `categoryLayout`. */
|
|
13
13
|
export const CategoryAxes = memo(function CategoryAxes({
|
|
@@ -980,7 +980,7 @@ function XYPointPlot({
|
|
|
980
980
|
x={Math.min(trend.x2, innerWidth) - 4}
|
|
981
981
|
y={trend.y2 - 8}
|
|
982
982
|
textAnchor="end"
|
|
983
|
-
className="font-bold text-fs-
|
|
983
|
+
className="font-bold text-fs-110 tabular-nums"
|
|
984
984
|
style={{ fill: trend.series.color }}
|
|
985
985
|
>
|
|
986
986
|
{`R² ${formatNumber(trend.fit.r2, { maximumFractionDigits: 2 })}`}
|
|
@@ -58,7 +58,7 @@ export function ExportMenu({
|
|
|
58
58
|
type="button"
|
|
59
59
|
aria-label={`${texts.export} ${texts[kind]}`}
|
|
60
60
|
onClick={() => run(kind)}
|
|
61
|
-
className="cursor-pointer rounded-button px-2 py-1 font-semibold text-fs-
|
|
61
|
+
className="cursor-pointer rounded-button px-2 py-1 font-semibold text-fs-120 text-ink-3 outline-none hover:bg-surface hover:text-ink focus-visible:outline-2 focus-visible:outline-accent-ink"
|
|
62
62
|
>
|
|
63
63
|
{texts[kind]}
|
|
64
64
|
</button>
|
|
@@ -443,7 +443,7 @@ function FunnelPlot({
|
|
|
443
443
|
x={x}
|
|
444
444
|
y={y + 4}
|
|
445
445
|
textAnchor="middle"
|
|
446
|
-
className={cn("fill-ink-2 font-bold text-fs-
|
|
446
|
+
className={cn("fill-ink-2 font-bold text-fs-110 tabular-nums")}
|
|
447
447
|
>
|
|
448
448
|
{formatPercent(conversion, { decimals: 0 })}
|
|
449
449
|
</text>
|
|
@@ -983,7 +983,7 @@ function GanttBody({
|
|
|
983
983
|
aria-label={texts.zoomLevels[level]}
|
|
984
984
|
onClick={() => onZoom(level)}
|
|
985
985
|
className={cn(
|
|
986
|
-
"cursor-pointer rounded-button px-2 py-1 font-semibold text-fs-
|
|
986
|
+
"cursor-pointer rounded-button px-2 py-1 font-semibold text-fs-120 outline-none focus-visible:outline-2 focus-visible:outline-accent-ink @md/chart:px-3",
|
|
987
987
|
zoom === level ? "bg-surface text-ink shadow-xs" : "text-ink-3 hover:text-ink",
|
|
988
988
|
)}
|
|
989
989
|
>
|
|
@@ -997,7 +997,7 @@ function GanttBody({
|
|
|
997
997
|
))}
|
|
998
998
|
</fieldset>
|
|
999
999
|
{critical || baselines ? (
|
|
1000
|
-
<ul className="m-0 hidden min-w-0 list-none items-center gap-3 p-0 text-fs-
|
|
1000
|
+
<ul className="m-0 hidden min-w-0 list-none items-center gap-3 p-0 text-fs-120 text-ink-3 @xl/chart:flex">
|
|
1001
1001
|
{critical ? (
|
|
1002
1002
|
<li className="flex items-center gap-1.5 whitespace-nowrap">
|
|
1003
1003
|
<span
|
|
@@ -1077,7 +1077,7 @@ function GanttBody({
|
|
|
1077
1077
|
<button
|
|
1078
1078
|
type="button"
|
|
1079
1079
|
onClick={() => scrollToTime(todayTime, true)}
|
|
1080
|
-
className="shrink-0 cursor-pointer rounded-button border-divider bg-surface-control px-3 py-1 font-semibold text-fs-
|
|
1080
|
+
className="shrink-0 cursor-pointer rounded-button border-divider bg-surface-control px-3 py-1 font-semibold text-fs-120 text-ink-2 outline-none hover:bg-surface-2 focus-visible:outline-2 focus-visible:outline-accent-ink"
|
|
1081
1081
|
>
|
|
1082
1082
|
{texts.today}
|
|
1083
1083
|
</button>
|
|
@@ -1235,7 +1235,7 @@ function GanttBody({
|
|
|
1235
1235
|
<span
|
|
1236
1236
|
key={column}
|
|
1237
1237
|
aria-hidden="true"
|
|
1238
|
-
className="shrink-0 truncate pr-3 text-right text-fs-
|
|
1238
|
+
className="shrink-0 truncate pr-3 text-right text-fs-120 text-ink-3 tabular-nums"
|
|
1239
1239
|
style={{ width: COLUMN_WIDTH[column] }}
|
|
1240
1240
|
>
|
|
1241
1241
|
{column === "start"
|
|
@@ -118,7 +118,7 @@ export const TimelineHeader = memo(function TimelineHeader({
|
|
|
118
118
|
x={x}
|
|
119
119
|
y={HEADER_ROW / 2}
|
|
120
120
|
dy="0.34em"
|
|
121
|
-
className="fill-ink-2 font-semibold text-fs-
|
|
121
|
+
className="fill-ink-2 font-semibold text-fs-120"
|
|
122
122
|
>
|
|
123
123
|
{cell.label}
|
|
124
124
|
</text>
|
|
@@ -150,7 +150,7 @@ export const TimelineHeader = memo(function TimelineHeader({
|
|
|
150
150
|
y={HEADER_ROW + HEADER_ROW / 2}
|
|
151
151
|
dy="0.34em"
|
|
152
152
|
textAnchor="middle"
|
|
153
|
-
className="fill-ink-3 font-medium text-fs-
|
|
153
|
+
className="fill-ink-3 font-medium text-fs-110 tabular-nums"
|
|
154
154
|
>
|
|
155
155
|
{cell.label}
|
|
156
156
|
</text>
|
|
@@ -698,7 +698,7 @@ export const AnnotationLayer = memo(function AnnotationLayer({
|
|
|
698
698
|
x={item.x0 + 10}
|
|
699
699
|
y={y + 7.5}
|
|
700
700
|
dy="0.34em"
|
|
701
|
-
className="fill-ink font-semibold text-fs-
|
|
701
|
+
className="fill-ink font-semibold text-fs-110"
|
|
702
702
|
>
|
|
703
703
|
{item.label}
|
|
704
704
|
</text>
|
package/src/charts/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from "./beeswarm-chart/index.js";
|
|
|
4
4
|
export * from "./box-plot/index.js";
|
|
5
5
|
export * from "./bubble-chart/index.js";
|
|
6
6
|
export * from "./bubble-map/index.js";
|
|
7
|
+
export * from "./bullet-chart/index.js";
|
|
7
8
|
export * from "./candlestick-chart/index.js";
|
|
8
9
|
export * from "./chart-grid/index.js";
|
|
9
10
|
export * from "./chord-chart/index.js";
|
|
@@ -25,6 +26,7 @@ export * from "./histogram/index.js";
|
|
|
25
26
|
export * from "./icicle-chart/index.js";
|
|
26
27
|
export * from "./isotype-rows/index.js";
|
|
27
28
|
export * from "./line-chart/index.js";
|
|
29
|
+
export * from "./lollipop-chart/index.js";
|
|
28
30
|
export * from "./maps/index.js";
|
|
29
31
|
export * from "./parliament-chart/index.js";
|
|
30
32
|
export * from "./pictogram-chart/index.js";
|
|
@@ -82,7 +82,7 @@ export function MapDataTable({
|
|
|
82
82
|
);
|
|
83
83
|
return (
|
|
84
84
|
<div className="@container/table overflow-auto rounded-event border-divider" style={{ height }}>
|
|
85
|
-
<table className="w-full border-collapse text-fs-
|
|
85
|
+
<table className="w-full border-collapse text-fs-120">
|
|
86
86
|
<caption className="sr-only">{caption}</caption>
|
|
87
87
|
<thead>
|
|
88
88
|
<tr className="border-b-divider">
|
|
@@ -434,7 +434,7 @@ function RosePlot({
|
|
|
434
434
|
x={cx + 4}
|
|
435
435
|
y={cy - ring.r - 3}
|
|
436
436
|
{...DECORATIVE}
|
|
437
|
-
className="pointer-events-none fill-ink-3 text-fs-
|
|
437
|
+
className="pointer-events-none fill-ink-3 text-fs-100 tabular-nums"
|
|
438
438
|
style={{ paintOrder: "stroke", stroke: "var(--surface)", strokeWidth: 3 }}
|
|
439
439
|
>
|
|
440
440
|
{axisFormat(ring.value)}
|
|
@@ -444,7 +444,7 @@ export function StockChart({
|
|
|
444
444
|
setRange(rangeWindow(dates, preset));
|
|
445
445
|
}}
|
|
446
446
|
className={cn(
|
|
447
|
-
"cursor-pointer rounded-button px-2 py-1 font-semibold text-fs-
|
|
447
|
+
"cursor-pointer rounded-button px-2 py-1 font-semibold text-fs-120 tabular-nums outline-none focus-visible:outline-2 focus-visible:outline-accent-ink @md/chart:px-2.5",
|
|
448
448
|
activePreset?.id === preset.id
|
|
449
449
|
? "bg-surface text-ink shadow-xs"
|
|
450
450
|
: "text-ink-3 hover:text-ink",
|
|
@@ -134,7 +134,7 @@ export function DrawingShape({
|
|
|
134
134
|
<text
|
|
135
135
|
x={6}
|
|
136
136
|
y={py - 5}
|
|
137
|
-
className="font-semibold text-fs-
|
|
137
|
+
className="font-semibold text-fs-110 tabular-nums"
|
|
138
138
|
style={{ fill: COLORS.horizontal }}
|
|
139
139
|
>
|
|
140
140
|
{fmt(drawing.price)}
|
|
@@ -189,7 +189,7 @@ export function DrawingShape({
|
|
|
189
189
|
<text
|
|
190
190
|
x={left + 6}
|
|
191
191
|
y={top + 14}
|
|
192
|
-
className="font-bold text-fs-
|
|
192
|
+
className="font-bold text-fs-110 tabular-nums"
|
|
193
193
|
style={{ fill: COLORS.range }}
|
|
194
194
|
>
|
|
195
195
|
{change > 0 ? "+" : ""}
|
|
@@ -289,7 +289,7 @@ export function MeasureShape({
|
|
|
289
289
|
y={boxY + 11}
|
|
290
290
|
dy="0.34em"
|
|
291
291
|
textAnchor="middle"
|
|
292
|
-
className="font-bold text-fs-
|
|
292
|
+
className="font-bold text-fs-110 tabular-nums"
|
|
293
293
|
style={{ fill: "var(--surface)" }}
|
|
294
294
|
>
|
|
295
295
|
{label}
|
|
@@ -813,7 +813,7 @@ export function StockPlot({
|
|
|
813
813
|
})}
|
|
814
814
|
{lower && oscillator ? (
|
|
815
815
|
<g transform={`translate(0,${lowerTop})`}>
|
|
816
|
-
<text {...DECORATIVE} x={0} y={-7} className="fill-ink-3 font-semibold text-fs-
|
|
816
|
+
<text {...DECORATIVE} x={0} y={-7} className="fill-ink-3 font-semibold text-fs-110">
|
|
817
817
|
{oscillator.name}
|
|
818
818
|
{(() => {
|
|
819
819
|
const index = active ?? view.length - 1;
|
|
@@ -1123,7 +1123,7 @@ function AxisTag({
|
|
|
1123
1123
|
y={0}
|
|
1124
1124
|
dy="0.34em"
|
|
1125
1125
|
textAnchor="middle"
|
|
1126
|
-
className="font-bold text-fs-
|
|
1126
|
+
className="font-bold text-fs-110 tabular-nums"
|
|
1127
1127
|
style={{ fill: "var(--surface)" }}
|
|
1128
1128
|
>
|
|
1129
1129
|
{text}
|