@kjun-ui/react 0.21.0 → 0.23.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/README.md +19 -5
- package/dist/index.cjs +8795 -3753
- package/dist/index.js +9349 -4284
- package/dist/styles.css +2736 -480
- package/dist/types/packages/react/src/actions.d.cts +21 -16
- package/dist/types/packages/react/src/actions.d.ts +21 -16
- package/dist/types/packages/react/src/app-navigation.d.cts +14 -4
- package/dist/types/packages/react/src/app-navigation.d.ts +14 -4
- package/dist/types/packages/react/src/avatar-group.d.cts +36 -0
- package/dist/types/packages/react/src/avatar-group.d.ts +36 -0
- package/dist/types/packages/react/src/button.d.cts +15 -6
- package/dist/types/packages/react/src/button.d.ts +15 -6
- package/dist/types/packages/react/src/calendar.d.cts +6 -2
- package/dist/types/packages/react/src/calendar.d.ts +6 -2
- package/dist/types/packages/react/src/card.d.cts +10 -3
- package/dist/types/packages/react/src/card.d.ts +10 -3
- package/dist/types/packages/react/src/carousel.d.cts +8 -1
- package/dist/types/packages/react/src/carousel.d.ts +8 -1
- package/dist/types/packages/react/src/choice-controls.d.cts +99 -0
- package/dist/types/packages/react/src/choice-controls.d.ts +99 -0
- package/dist/types/packages/react/src/collapse.d.cts +4 -1
- package/dist/types/packages/react/src/collapse.d.ts +4 -1
- package/dist/types/packages/react/src/color-picker.d.cts +8 -1
- package/dist/types/packages/react/src/color-picker.d.ts +8 -1
- package/dist/types/packages/react/src/combobox.d.cts +18 -5
- package/dist/types/packages/react/src/combobox.d.ts +18 -5
- package/dist/types/packages/react/src/controls.d.cts +7 -74
- package/dist/types/packages/react/src/controls.d.ts +7 -74
- package/dist/types/packages/react/src/data-state.d.cts +19 -6
- package/dist/types/packages/react/src/data-state.d.ts +19 -6
- package/dist/types/packages/react/src/date-picker.d.cts +8 -2
- package/dist/types/packages/react/src/date-picker.d.ts +8 -2
- package/dist/types/packages/react/src/display.d.cts +33 -8
- package/dist/types/packages/react/src/display.d.ts +33 -8
- package/dist/types/packages/react/src/drawer.d.cts +11 -2
- package/dist/types/packages/react/src/drawer.d.ts +11 -2
- package/dist/types/packages/react/src/dropdown.d.cts +21 -6
- package/dist/types/packages/react/src/dropdown.d.ts +21 -6
- package/dist/types/packages/react/src/event-calendar.d.cts +47 -0
- package/dist/types/packages/react/src/event-calendar.d.ts +47 -0
- package/dist/types/packages/react/src/fab.d.cts +2 -0
- package/dist/types/packages/react/src/fab.d.ts +2 -0
- package/dist/types/packages/react/src/file-upload-row.d.cts +23 -0
- package/dist/types/packages/react/src/file-upload-row.d.ts +23 -0
- package/dist/types/packages/react/src/file-upload.d.cts +38 -0
- package/dist/types/packages/react/src/file-upload.d.ts +38 -0
- package/dist/types/packages/react/src/financial-display.d.cts +32 -11
- package/dist/types/packages/react/src/financial-display.d.ts +32 -11
- package/dist/types/packages/react/src/floating-panel.d.cts +6 -2
- package/dist/types/packages/react/src/floating-panel.d.ts +6 -2
- package/dist/types/packages/react/src/index.d.cts +12 -1
- package/dist/types/packages/react/src/index.d.ts +12 -1
- package/dist/types/packages/react/src/input.d.cts +27 -1
- package/dist/types/packages/react/src/input.d.ts +27 -1
- package/dist/types/packages/react/src/kpi-hero.d.cts +2 -0
- package/dist/types/packages/react/src/kpi-hero.d.ts +2 -0
- package/dist/types/packages/react/src/kpi-row.d.cts +5 -0
- package/dist/types/packages/react/src/kpi-row.d.ts +5 -0
- package/dist/types/packages/react/src/layout-primitives.d.cts +71 -139
- package/dist/types/packages/react/src/layout-primitives.d.ts +71 -139
- package/dist/types/packages/react/src/list-context.d.cts +2 -1
- package/dist/types/packages/react/src/list-context.d.ts +2 -1
- package/dist/types/packages/react/src/list.d.cts +49 -12
- package/dist/types/packages/react/src/list.d.ts +49 -12
- package/dist/types/packages/react/src/market-model.d.cts +15 -1
- package/dist/types/packages/react/src/market-model.d.ts +15 -1
- package/dist/types/packages/react/src/market-parts.d.cts +9 -0
- package/dist/types/packages/react/src/market-parts.d.ts +9 -0
- package/dist/types/packages/react/src/market-skeleton.d.cts +7 -1
- package/dist/types/packages/react/src/market-skeleton.d.ts +7 -1
- package/dist/types/packages/react/src/media.d.cts +6 -2
- package/dist/types/packages/react/src/media.d.ts +6 -2
- package/dist/types/packages/react/src/modal.d.cts +11 -2
- package/dist/types/packages/react/src/modal.d.ts +11 -2
- package/dist/types/packages/react/src/navigation.d.cts +34 -5
- package/dist/types/packages/react/src/navigation.d.ts +34 -5
- package/dist/types/packages/react/src/number-display.d.cts +8 -5
- package/dist/types/packages/react/src/number-display.d.ts +8 -5
- package/dist/types/packages/react/src/number-input.d.cts +28 -0
- package/dist/types/packages/react/src/number-input.d.ts +28 -0
- package/dist/types/packages/react/src/popover.d.cts +5 -2
- package/dist/types/packages/react/src/popover.d.ts +5 -2
- package/dist/types/packages/react/src/pressable.d.cts +17 -0
- package/dist/types/packages/react/src/pressable.d.ts +17 -0
- package/dist/types/packages/react/src/quantity-stepper.d.cts +3 -1
- package/dist/types/packages/react/src/quantity-stepper.d.ts +3 -1
- package/dist/types/packages/react/src/range-input.d.cts +15 -3
- package/dist/types/packages/react/src/range-input.d.ts +15 -3
- package/dist/types/packages/react/src/search-input.d.cts +6 -3
- package/dist/types/packages/react/src/search-input.d.ts +6 -3
- package/dist/types/packages/react/src/select-control.d.cts +7 -2
- package/dist/types/packages/react/src/select-control.d.ts +7 -2
- package/dist/types/packages/react/src/side-navigation-layout-spaces.d.cts +31 -0
- package/dist/types/packages/react/src/side-navigation-layout-spaces.d.ts +31 -0
- package/dist/types/packages/react/src/side-navigation-layout.d.cts +63 -0
- package/dist/types/packages/react/src/side-navigation-layout.d.ts +63 -0
- package/dist/types/packages/react/src/side-navigation.d.cts +74 -0
- package/dist/types/packages/react/src/side-navigation.d.ts +74 -0
- package/dist/types/packages/react/src/skeletons.d.cts +18 -3
- package/dist/types/packages/react/src/skeletons.d.ts +18 -3
- package/dist/types/packages/react/src/spinner-glyph.d.cts +8 -0
- package/dist/types/packages/react/src/spinner-glyph.d.ts +8 -0
- package/dist/types/packages/react/src/split-pane.d.cts +20 -5
- package/dist/types/packages/react/src/split-pane.d.ts +20 -5
- package/dist/types/packages/react/src/stacked-bar.d.cts +3 -1
- package/dist/types/packages/react/src/stacked-bar.d.ts +3 -1
- package/dist/types/packages/react/src/steps.d.cts +27 -0
- package/dist/types/packages/react/src/steps.d.ts +27 -0
- package/dist/types/packages/react/src/table-cards.d.cts +4 -12
- package/dist/types/packages/react/src/table-cards.d.ts +4 -12
- package/dist/types/packages/react/src/table-grid.d.cts +3 -7
- package/dist/types/packages/react/src/table-grid.d.ts +3 -7
- package/dist/types/packages/react/src/table-groups.d.cts +5 -0
- package/dist/types/packages/react/src/table-groups.d.ts +5 -0
- package/dist/types/packages/react/src/table-list.d.cts +2 -9
- package/dist/types/packages/react/src/table-list.d.ts +2 -9
- package/dist/types/packages/react/src/table-model.d.cts +6 -2
- package/dist/types/packages/react/src/table-model.d.ts +6 -2
- package/dist/types/packages/react/src/tabs.d.cts +3 -1
- package/dist/types/packages/react/src/tabs.d.ts +3 -1
- package/dist/types/packages/react/src/textarea.d.cts +6 -3
- package/dist/types/packages/react/src/textarea.d.ts +6 -3
- package/dist/types/packages/react/src/tiles.d.cts +18 -0
- package/dist/types/packages/react/src/tiles.d.ts +18 -0
- package/dist/types/packages/react/src/time-picker.d.cts +12 -2
- package/dist/types/packages/react/src/time-picker.d.ts +12 -2
- package/dist/types/packages/react/src/time-wheel.d.cts +18 -0
- package/dist/types/packages/react/src/time-wheel.d.ts +18 -0
- package/dist/types/packages/react/src/use-filter-scroll.d.cts +5 -0
- package/dist/types/packages/react/src/use-filter-scroll.d.ts +5 -0
- package/dist/types/shared/package-runtime/accordion-state.d.cts +2 -0
- package/dist/types/shared/package-runtime/accordion-state.d.ts +2 -0
- package/dist/types/shared/package-runtime/action-size.d.cts +4 -0
- package/dist/types/shared/package-runtime/action-size.d.ts +4 -0
- package/dist/types/shared/package-runtime/alert-actions.d.cts +7 -0
- package/dist/types/shared/package-runtime/alert-actions.d.ts +7 -0
- package/dist/types/shared/package-runtime/alert-exit.d.cts +6 -0
- package/dist/types/shared/package-runtime/alert-exit.d.ts +6 -0
- package/dist/types/shared/package-runtime/alert-live.d.cts +2 -0
- package/dist/types/shared/package-runtime/alert-live.d.ts +2 -0
- package/dist/types/shared/package-runtime/avatar-group.d.cts +18 -0
- package/dist/types/shared/package-runtime/avatar-group.d.ts +18 -0
- package/dist/types/shared/package-runtime/badge-tone.d.cts +8 -2
- package/dist/types/shared/package-runtime/badge-tone.d.ts +8 -2
- package/dist/types/shared/package-runtime/bottom-bar.d.cts +1 -1
- package/dist/types/shared/package-runtime/bottom-bar.d.ts +1 -1
- package/dist/types/shared/package-runtime/bottom-navigation.d.cts +10 -0
- package/dist/types/shared/package-runtime/bottom-navigation.d.ts +10 -0
- package/dist/types/shared/package-runtime/calendar.d.cts +21 -7
- package/dist/types/shared/package-runtime/calendar.d.ts +21 -7
- package/dist/types/shared/package-runtime/card-layout.d.cts +8 -0
- package/dist/types/shared/package-runtime/card-layout.d.ts +8 -0
- package/dist/types/shared/package-runtime/carousel-scroll.d.cts +2 -0
- package/dist/types/shared/package-runtime/carousel-scroll.d.ts +2 -0
- package/dist/types/shared/package-runtime/carousel.d.cts +12 -2
- package/dist/types/shared/package-runtime/carousel.d.ts +12 -2
- package/dist/types/shared/package-runtime/chart-skeleton.d.cts +1 -1
- package/dist/types/shared/package-runtime/chart-skeleton.d.ts +1 -1
- package/dist/types/shared/package-runtime/clipboard.d.cts +6 -0
- package/dist/types/shared/package-runtime/clipboard.d.ts +6 -0
- package/dist/types/shared/package-runtime/combobox-options.d.cts +13 -0
- package/dist/types/shared/package-runtime/combobox-options.d.ts +13 -0
- package/dist/types/shared/package-runtime/combobox.d.cts +3 -1
- package/dist/types/shared/package-runtime/combobox.d.ts +3 -1
- package/dist/types/shared/package-runtime/copy-button.d.cts +11 -0
- package/dist/types/shared/package-runtime/copy-button.d.ts +11 -0
- package/dist/types/shared/package-runtime/data-cells.d.cts +36 -0
- package/dist/types/shared/package-runtime/data-cells.d.ts +36 -0
- package/dist/types/shared/package-runtime/development.d.cts +4 -0
- package/dist/types/shared/package-runtime/development.d.ts +4 -0
- package/dist/types/shared/package-runtime/distribution.d.cts +36 -1
- package/dist/types/shared/package-runtime/distribution.d.ts +36 -1
- package/dist/types/shared/package-runtime/drawer-geometry.d.cts +7 -0
- package/dist/types/shared/package-runtime/drawer-geometry.d.ts +7 -0
- package/dist/types/shared/package-runtime/event-calendar.d.cts +81 -0
- package/dist/types/shared/package-runtime/event-calendar.d.ts +81 -0
- package/dist/types/shared/package-runtime/external-link.d.cts +4 -0
- package/dist/types/shared/package-runtime/external-link.d.ts +4 -0
- package/dist/types/shared/package-runtime/field-group.d.cts +17 -0
- package/dist/types/shared/package-runtime/field-group.d.ts +17 -0
- package/dist/types/shared/package-runtime/file-upload.d.cts +128 -0
- package/dist/types/shared/package-runtime/file-upload.d.ts +128 -0
- package/dist/types/shared/package-runtime/filter-scroll.d.cts +5 -0
- package/dist/types/shared/package-runtime/filter-scroll.d.ts +5 -0
- package/dist/types/shared/package-runtime/filter-value.d.cts +2 -0
- package/dist/types/shared/package-runtime/filter-value.d.ts +2 -0
- package/dist/types/shared/package-runtime/input-field.d.cts +23 -0
- package/dist/types/shared/package-runtime/input-field.d.ts +23 -0
- package/dist/types/shared/package-runtime/input-variant.d.cts +7 -0
- package/dist/types/shared/package-runtime/input-variant.d.ts +7 -0
- package/dist/types/shared/package-runtime/kpi.d.cts +13 -0
- package/dist/types/shared/package-runtime/kpi.d.ts +13 -0
- package/dist/types/shared/package-runtime/layout-primitives.d.cts +115 -6
- package/dist/types/shared/package-runtime/layout-primitives.d.ts +115 -6
- package/dist/types/shared/package-runtime/list-row.d.cts +71 -8
- package/dist/types/shared/package-runtime/list-row.d.ts +71 -8
- package/dist/types/shared/package-runtime/market-layout.d.cts +3 -1
- package/dist/types/shared/package-runtime/market-layout.d.ts +3 -1
- package/dist/types/shared/package-runtime/market-query.d.cts +6 -0
- package/dist/types/shared/package-runtime/market-query.d.ts +6 -0
- package/dist/types/shared/package-runtime/market-table.d.cts +32 -0
- package/dist/types/shared/package-runtime/market-table.d.ts +32 -0
- package/dist/types/shared/package-runtime/menu-button.d.cts +4 -0
- package/dist/types/shared/package-runtime/menu-button.d.ts +4 -0
- package/dist/types/shared/package-runtime/messages/ko.d.cts +77 -1
- package/dist/types/shared/package-runtime/messages/ko.d.ts +77 -1
- package/dist/types/shared/package-runtime/messages-context.d.cts +69 -1
- package/dist/types/shared/package-runtime/messages-context.d.ts +69 -1
- package/dist/types/shared/package-runtime/minimum-loading.d.cts +3 -0
- package/dist/types/shared/package-runtime/minimum-loading.d.ts +3 -0
- package/dist/types/shared/package-runtime/modal-geometry.d.cts +15 -0
- package/dist/types/shared/package-runtime/modal-geometry.d.ts +15 -0
- package/dist/types/shared/package-runtime/navigation.d.cts +9 -2
- package/dist/types/shared/package-runtime/navigation.d.ts +9 -2
- package/dist/types/shared/package-runtime/nested-controls.d.cts +7 -0
- package/dist/types/shared/package-runtime/nested-controls.d.ts +7 -0
- package/dist/types/shared/package-runtime/node-text.d.cts +1 -0
- package/dist/types/shared/package-runtime/node-text.d.ts +1 -0
- package/dist/types/shared/package-runtime/number-input.d.cts +73 -0
- package/dist/types/shared/package-runtime/number-input.d.ts +73 -0
- package/dist/types/shared/package-runtime/options.d.cts +25 -5
- package/dist/types/shared/package-runtime/options.d.ts +25 -5
- package/dist/types/shared/package-runtime/pagination.d.cts +12 -0
- package/dist/types/shared/package-runtime/pagination.d.ts +12 -0
- package/dist/types/shared/package-runtime/press-repeat.d.cts +13 -0
- package/dist/types/shared/package-runtime/press-repeat.d.ts +13 -0
- package/dist/types/shared/package-runtime/progress-circle.d.cts +5 -0
- package/dist/types/shared/package-runtime/progress-circle.d.ts +5 -0
- package/dist/types/shared/package-runtime/progress-marker.d.cts +7 -0
- package/dist/types/shared/package-runtime/progress-marker.d.ts +7 -0
- package/dist/types/shared/package-runtime/progress-tone.d.cts +6 -0
- package/dist/types/shared/package-runtime/progress-tone.d.ts +6 -0
- package/dist/types/shared/package-runtime/select-trigger.d.cts +23 -0
- package/dist/types/shared/package-runtime/select-trigger.d.ts +23 -0
- package/dist/types/shared/package-runtime/sheet-drag.d.cts +24 -0
- package/dist/types/shared/package-runtime/sheet-drag.d.ts +24 -0
- package/dist/types/shared/package-runtime/side-navigation-keys.d.cts +23 -0
- package/dist/types/shared/package-runtime/side-navigation-keys.d.ts +23 -0
- package/dist/types/shared/package-runtime/side-navigation-layout.d.cts +24 -0
- package/dist/types/shared/package-runtime/side-navigation-layout.d.ts +24 -0
- package/dist/types/shared/package-runtime/side-navigation-scroll.d.cts +7 -0
- package/dist/types/shared/package-runtime/side-navigation-scroll.d.ts +7 -0
- package/dist/types/shared/package-runtime/side-navigation.d.cts +277 -0
- package/dist/types/shared/package-runtime/side-navigation.d.ts +277 -0
- package/dist/types/shared/package-runtime/signed-number.d.cts +33 -0
- package/dist/types/shared/package-runtime/signed-number.d.ts +33 -0
- package/dist/types/shared/package-runtime/skeleton-text.d.cts +4 -0
- package/dist/types/shared/package-runtime/skeleton-text.d.ts +4 -0
- package/dist/types/shared/package-runtime/slider-view.d.cts +17 -2
- package/dist/types/shared/package-runtime/slider-view.d.ts +17 -2
- package/dist/types/shared/package-runtime/sparkline.d.cts +8 -4
- package/dist/types/shared/package-runtime/sparkline.d.ts +8 -4
- package/dist/types/shared/package-runtime/spinner-geometry.d.cts +14 -0
- package/dist/types/shared/package-runtime/spinner-geometry.d.ts +14 -0
- package/dist/types/shared/package-runtime/split-pane.d.cts +40 -1
- package/dist/types/shared/package-runtime/split-pane.d.ts +40 -1
- package/dist/types/shared/package-runtime/steps.d.cts +51 -0
- package/dist/types/shared/package-runtime/steps.d.ts +51 -0
- package/dist/types/shared/package-runtime/tab-keyboard.d.cts +6 -0
- package/dist/types/shared/package-runtime/tab-keyboard.d.ts +6 -0
- package/dist/types/shared/package-runtime/table-columns.d.cts +8 -0
- package/dist/types/shared/package-runtime/table-columns.d.ts +8 -0
- package/dist/types/shared/package-runtime/table-model.d.cts +23 -3
- package/dist/types/shared/package-runtime/table-model.d.ts +23 -3
- package/dist/types/shared/package-runtime/table-presentation.d.cts +12 -2
- package/dist/types/shared/package-runtime/table-presentation.d.ts +12 -2
- package/dist/types/shared/package-runtime/table.d.cts +17 -2
- package/dist/types/shared/package-runtime/table.d.ts +17 -2
- package/dist/types/shared/package-runtime/textarea.d.cts +6 -4
- package/dist/types/shared/package-runtime/textarea.d.ts +6 -4
- package/dist/types/shared/package-runtime/tiles-children.d.cts +7 -0
- package/dist/types/shared/package-runtime/tiles-children.d.ts +7 -0
- package/dist/types/shared/package-runtime/tiles.d.cts +18 -0
- package/dist/types/shared/package-runtime/tiles.d.ts +18 -0
- package/dist/types/shared/package-runtime/time-segments.d.cts +24 -0
- package/dist/types/shared/package-runtime/time-segments.d.ts +24 -0
- package/dist/types/shared/package-runtime/time-wheel.d.cts +54 -0
- package/dist/types/shared/package-runtime/time-wheel.d.ts +54 -0
- package/dist/types/shared/package-runtime/trailing-overflow.d.cts +1 -0
- package/dist/types/shared/package-runtime/trailing-overflow.d.ts +1 -0
- package/dist/types/shared/package-runtime/use-color-picker.d.cts +3 -0
- package/dist/types/shared/package-runtime/use-color-picker.d.ts +3 -0
- package/dist/types/shared/package-runtime/use-copy-feedback.d.cts +10 -0
- package/dist/types/shared/package-runtime/use-copy-feedback.d.ts +10 -0
- package/dist/types/shared/package-runtime/use-open-state.d.cts +5 -0
- package/dist/types/shared/package-runtime/use-open-state.d.ts +5 -0
- package/dist/types/shared/package-runtime/use-pending-action.d.cts +6 -0
- package/dist/types/shared/package-runtime/use-pending-action.d.ts +6 -0
- package/dist/types/shared/package-runtime/use-side-navigation-state.d.cts +25 -0
- package/dist/types/shared/package-runtime/use-side-navigation-state.d.ts +25 -0
- package/dist/types/shared/package-runtime/use-slide.d.cts +3 -0
- package/dist/types/shared/package-runtime/use-slide.d.ts +3 -0
- package/package.json +3 -3
- package/dist/types/packages/react/src/compound-control.d.cts +0 -1
- package/dist/types/packages/react/src/compound-control.d.ts +0 -1
- package/dist/types/shared/package-runtime/center-option.d.cts +0 -1
- package/dist/types/shared/package-runtime/center-option.d.ts +0 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { type CardRadius } from "@kjun-ui/tokens";
|
|
2
|
-
import { type MouseEvent, type ReactNode } from "react";
|
|
3
|
-
import { type ListChoiceValue, type ListGroupVariant, type ListSectionVariant, type ListSelectionMode } from "../../../shared/package-runtime/list-row.cjs";
|
|
2
|
+
import { type CSSProperties, type MouseEvent, type ReactNode } from "react";
|
|
3
|
+
import { type ListChoiceValue, type ListGroupVariant, type ListSectionSurface, type ListSectionVariant, type ListSelectionMode } from "../../../shared/package-runtime/list-row.cjs";
|
|
4
4
|
import { type KjunListReorderControls, type KjunListReorderMove } from "./reorder-controls.cjs";
|
|
5
5
|
import { type ListLeadingSize } from "../../../shared/package-runtime/list-leading.cjs";
|
|
6
|
-
export type { ListChoiceValue, ListGroupVariant, ListSectionVariant } from "../../../shared/package-runtime/list-row.cjs";
|
|
6
|
+
export type { ListChoiceValue, ListGroupVariant, ListSectionSurface, ListSectionVariant, ListTrailingPosition } from "../../../shared/package-runtime/list-row.cjs";
|
|
7
7
|
export type { ListLeadingSize } from "../../../shared/package-runtime/list-leading.cjs";
|
|
8
8
|
export type { KjunListReorderControls, KjunListReorderMove } from "./reorder-controls.cjs";
|
|
9
9
|
export interface KjunListRowProps {
|
|
10
|
-
title
|
|
10
|
+
/** The row's title. A node can add a short mark in the title's own place and type, such as a ticker in the tertiary text colour; a screen reader hears its text, and without text give ariaLabel. */
|
|
11
|
+
title: ReactNode;
|
|
11
12
|
description?: string;
|
|
12
13
|
/** Content after the title, centered on its first line, such as a KjunBadge ("New", a count); a screen reader hears it with the title. */
|
|
13
14
|
badge?: ReactNode;
|
|
@@ -23,11 +24,25 @@ export interface KjunListRowProps {
|
|
|
23
24
|
trailing?: ReactNode;
|
|
24
25
|
actions?: ReactNode;
|
|
25
26
|
href?: string;
|
|
27
|
+
/** Where the trailing value sits: "side" (default) is a column beside the whole text; "title" puts it on the title line, so the
|
|
28
|
+
* description and children keep the full text width whatever the value's length (rows with a budget bar line up);
|
|
29
|
+
* "below" gives it its own line under the title across the text width, for long values such as an address. */
|
|
30
|
+
trailingPosition?: "side" | "title" | "below";
|
|
31
|
+
/** Where a link row opens, e.g. "_blank" for a new tab; a new tab gets rel="noopener noreferrer" unless rel is given. */
|
|
32
|
+
target?: string;
|
|
33
|
+
/** The link's rel; by default "noopener noreferrer" for target="_blank". */
|
|
34
|
+
rel?: string;
|
|
26
35
|
disabled?: boolean;
|
|
27
36
|
/** Draws the title in the danger role, for rows such as "Delete account". */
|
|
28
37
|
destructive?: boolean;
|
|
38
|
+
/** The row the list leads to, such as a total or a balance: the title one weight up and the value in the large number
|
|
39
|
+
* type, size and weight only. One or two per section; a details section keeps a little more room above it when it is last. */
|
|
40
|
+
emphasized?: boolean;
|
|
29
41
|
/** Ends the row with a decorative chevron that marks it as navigation. */
|
|
30
42
|
chevron?: boolean;
|
|
43
|
+
/** The item open now, such as the message shown beside its list or the settings page in view: the row takes the
|
|
44
|
+
* selected fill and its link or button aria-current ("page" on a link). Not for switch or choice rows. */
|
|
45
|
+
current?: boolean;
|
|
31
46
|
/** One choice in a single-choice list: true draws a check at the end (in an open section or a multiple-choice list, a filled mark; unchosen rows an empty one). A pressable row given it (true or false) reads as a radio. */
|
|
32
47
|
selected?: boolean;
|
|
33
48
|
/** Makes the whole row a switch: it draws one at the end and toggles on any press. */
|
|
@@ -42,26 +57,44 @@ export interface KjunListRowProps {
|
|
|
42
57
|
ariaLabel?: string;
|
|
43
58
|
/** Display-only content under the description (a budget bar); no buttons or links inside a pressable row. */
|
|
44
59
|
children?: ReactNode;
|
|
60
|
+
/** Makes the row open its own content: the row is a button that reports the next state, and ends with a chevron that turns over when open.
|
|
61
|
+
* Not with href, checked, selected or chevron. */
|
|
62
|
+
expanded?: boolean;
|
|
63
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
64
|
+
/** Shown under the row while expanded, from the line the title starts on. It is outside the button, so it may hold buttons and links. */
|
|
65
|
+
expandedContent?: ReactNode;
|
|
45
66
|
/** Clamps the title (and the description) to this many lines, ending in an ellipsis. */
|
|
46
67
|
titleLines?: number;
|
|
47
68
|
descriptionLines?: number;
|
|
48
69
|
}
|
|
49
|
-
export declare function KjunListRow({ title, description, badge, icon, leadingSize, iconColor, iconBackground, leading, trailing, actions, href, disabled, destructive, chevron, selected: ownSelected, checked, onCheckedChange, busy, value, onClick: ownClick, ariaLabel, children, titleLines, descriptionLines }: KjunListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
export declare function KjunListRow({ title, description, badge, icon, leadingSize, iconColor, iconBackground, leading, trailing, trailingPosition, actions, href, target, rel, disabled, destructive, emphasized, chevron, current, selected: ownSelected, checked, onCheckedChange, busy, value, onClick: ownClick, ariaLabel, children, titleLines, descriptionLines, expanded, onExpandedChange, expandedContent }: KjunListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
50
71
|
export interface KjunListSectionProps {
|
|
51
72
|
title?: string;
|
|
52
73
|
description?: string;
|
|
53
74
|
actions?: ReactNode;
|
|
54
75
|
children?: ReactNode;
|
|
55
76
|
ariaLabel?: string;
|
|
56
|
-
/**
|
|
57
|
-
|
|
58
|
-
/**
|
|
77
|
+
/** A short mark after the title, such as a KjunBadge with the row count; centered on the title's first line and read with the title as the list's name. */
|
|
78
|
+
badge?: ReactNode;
|
|
79
|
+
/** id, class and style of the root section. */
|
|
80
|
+
id?: string;
|
|
81
|
+
className?: string;
|
|
82
|
+
style?: CSSProperties;
|
|
83
|
+
/** Paints the surface background (default true); false lets the page background show through; "muted" paints the muted fill, which sets rows apart inside a white card or modal. */
|
|
84
|
+
surface?: ListSectionSurface;
|
|
85
|
+
/** Runs the section past its container's content edge to the container's edge: inside a KjunCard body by the card's
|
|
86
|
+
* padding, elsewhere by the rows' 16px. Rows, heading and footer take that inset, so their text stays on the content line
|
|
87
|
+
* around the section while row fills and dividers reach the edge. The section is flat (radius does not apply); an open
|
|
88
|
+
* section keeps its own inset. Leave room for the overhang: a parent that clips its overflow cuts it off. */
|
|
89
|
+
bleed?: boolean;
|
|
90
|
+
/** Draws dividers between rows (default true; false in a details section). An open section draws none; giving it true warns in development. */
|
|
59
91
|
divider?: boolean;
|
|
60
|
-
/** "compact" rows keep the 16px inset but are 44 tall (the touch minimum) instead of 56. */
|
|
92
|
+
/** "compact" rows keep the 16px inset but are 44 tall (the touch minimum) instead of 56. A details section keeps its own 32px rows. */
|
|
61
93
|
density?: "default" | "compact";
|
|
62
94
|
/** Rounds the rows into a card on the card radius steps; the title, actions and footer stay outside it (default "none", or the KjunListGroup's). An open section has no card. */
|
|
63
95
|
radius?: CardRadius;
|
|
64
|
-
/** "open" puts the rows on the page with no card or dividers: larger titles, icons on rounded squares, and a filled mark for the chosen row (default "default", or "open" in an open KjunListGroup).
|
|
96
|
+
/** "open" puts the rows on the page with no card or dividers: larger titles, icons on rounded squares, and a filled mark for the chosen row (default "default", or "open" in an open KjunListGroup).
|
|
97
|
+
* "details" is for rows that are read, not pressed ("Payment method / Visa"): 32 tall, no dividers, the label secondary and the value in the text color with the room the label leaves. */
|
|
65
98
|
variant?: ListSectionVariant;
|
|
66
99
|
/** "title" is the 16px heading, "label" the small caption above the rows; by default a title with a description is a heading and one without is a label. */
|
|
67
100
|
titleVariant?: "title" | "label";
|
|
@@ -94,14 +127,18 @@ export interface KjunListSectionProps {
|
|
|
94
127
|
/** Why moving is off, shown under the rows and read with the buttons. */
|
|
95
128
|
reorderDisabledText?: string;
|
|
96
129
|
}
|
|
97
|
-
export declare function KjunListSection({ title, description, actions, children, ariaLabel, surface, divider: dividerProp, density, radius, titleVariant, headingLevel, empty, footer, loading, selectionMode, value, onValueChange, variant, reorderable, order, onOrderChange, onReorder, reorderControls, reorderDisabled, reorderDisabledText }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
130
|
+
export declare function KjunListSection({ title, description, badge, id: rootId, className, style, actions, children, ariaLabel, surface, bleed: bleedProp, divider: dividerProp, density, radius, titleVariant, headingLevel, empty, footer, loading, selectionMode, value, onValueChange, variant, reorderable, order, onOrderChange, onReorder, reorderControls, reorderDisabled, reorderDisabledText }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
98
131
|
export interface KjunListGroupProps {
|
|
132
|
+
/** id, class and style of the root. */
|
|
133
|
+
id?: string;
|
|
134
|
+
className?: string;
|
|
135
|
+
style?: CSSProperties;
|
|
99
136
|
/** "inset" (default) rounds every section and keeps them 24px apart; "flush" keeps square sections 8px apart; "open" puts every section's rows on the page with no card or dividers, 20px apart. */
|
|
100
137
|
variant?: ListGroupVariant;
|
|
101
138
|
children: ReactNode;
|
|
102
139
|
}
|
|
103
140
|
/** Stacks KjunListSections with one spacing and corner rule, so sections never set radius or gaps one by one. */
|
|
104
|
-
export declare function KjunListGroup({ variant, children }: KjunListGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
141
|
+
export declare function KjunListGroup({ variant, children, id, className, style }: KjunListGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
105
142
|
export interface KjunListItemProps {
|
|
106
143
|
children: ReactNode;
|
|
107
144
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { type CardRadius } from "@kjun-ui/tokens";
|
|
2
|
-
import { type MouseEvent, type ReactNode } from "react";
|
|
3
|
-
import { type ListChoiceValue, type ListGroupVariant, type ListSectionVariant, type ListSelectionMode } from "../../../shared/package-runtime/list-row.js";
|
|
2
|
+
import { type CSSProperties, type MouseEvent, type ReactNode } from "react";
|
|
3
|
+
import { type ListChoiceValue, type ListGroupVariant, type ListSectionSurface, type ListSectionVariant, type ListSelectionMode } from "../../../shared/package-runtime/list-row.js";
|
|
4
4
|
import { type KjunListReorderControls, type KjunListReorderMove } from "./reorder-controls.js";
|
|
5
5
|
import { type ListLeadingSize } from "../../../shared/package-runtime/list-leading.js";
|
|
6
|
-
export type { ListChoiceValue, ListGroupVariant, ListSectionVariant } from "../../../shared/package-runtime/list-row.js";
|
|
6
|
+
export type { ListChoiceValue, ListGroupVariant, ListSectionSurface, ListSectionVariant, ListTrailingPosition } from "../../../shared/package-runtime/list-row.js";
|
|
7
7
|
export type { ListLeadingSize } from "../../../shared/package-runtime/list-leading.js";
|
|
8
8
|
export type { KjunListReorderControls, KjunListReorderMove } from "./reorder-controls.js";
|
|
9
9
|
export interface KjunListRowProps {
|
|
10
|
-
title
|
|
10
|
+
/** The row's title. A node can add a short mark in the title's own place and type, such as a ticker in the tertiary text colour; a screen reader hears its text, and without text give ariaLabel. */
|
|
11
|
+
title: ReactNode;
|
|
11
12
|
description?: string;
|
|
12
13
|
/** Content after the title, centered on its first line, such as a KjunBadge ("New", a count); a screen reader hears it with the title. */
|
|
13
14
|
badge?: ReactNode;
|
|
@@ -23,11 +24,25 @@ export interface KjunListRowProps {
|
|
|
23
24
|
trailing?: ReactNode;
|
|
24
25
|
actions?: ReactNode;
|
|
25
26
|
href?: string;
|
|
27
|
+
/** Where the trailing value sits: "side" (default) is a column beside the whole text; "title" puts it on the title line, so the
|
|
28
|
+
* description and children keep the full text width whatever the value's length (rows with a budget bar line up);
|
|
29
|
+
* "below" gives it its own line under the title across the text width, for long values such as an address. */
|
|
30
|
+
trailingPosition?: "side" | "title" | "below";
|
|
31
|
+
/** Where a link row opens, e.g. "_blank" for a new tab; a new tab gets rel="noopener noreferrer" unless rel is given. */
|
|
32
|
+
target?: string;
|
|
33
|
+
/** The link's rel; by default "noopener noreferrer" for target="_blank". */
|
|
34
|
+
rel?: string;
|
|
26
35
|
disabled?: boolean;
|
|
27
36
|
/** Draws the title in the danger role, for rows such as "Delete account". */
|
|
28
37
|
destructive?: boolean;
|
|
38
|
+
/** The row the list leads to, such as a total or a balance: the title one weight up and the value in the large number
|
|
39
|
+
* type, size and weight only. One or two per section; a details section keeps a little more room above it when it is last. */
|
|
40
|
+
emphasized?: boolean;
|
|
29
41
|
/** Ends the row with a decorative chevron that marks it as navigation. */
|
|
30
42
|
chevron?: boolean;
|
|
43
|
+
/** The item open now, such as the message shown beside its list or the settings page in view: the row takes the
|
|
44
|
+
* selected fill and its link or button aria-current ("page" on a link). Not for switch or choice rows. */
|
|
45
|
+
current?: boolean;
|
|
31
46
|
/** One choice in a single-choice list: true draws a check at the end (in an open section or a multiple-choice list, a filled mark; unchosen rows an empty one). A pressable row given it (true or false) reads as a radio. */
|
|
32
47
|
selected?: boolean;
|
|
33
48
|
/** Makes the whole row a switch: it draws one at the end and toggles on any press. */
|
|
@@ -42,26 +57,44 @@ export interface KjunListRowProps {
|
|
|
42
57
|
ariaLabel?: string;
|
|
43
58
|
/** Display-only content under the description (a budget bar); no buttons or links inside a pressable row. */
|
|
44
59
|
children?: ReactNode;
|
|
60
|
+
/** Makes the row open its own content: the row is a button that reports the next state, and ends with a chevron that turns over when open.
|
|
61
|
+
* Not with href, checked, selected or chevron. */
|
|
62
|
+
expanded?: boolean;
|
|
63
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
64
|
+
/** Shown under the row while expanded, from the line the title starts on. It is outside the button, so it may hold buttons and links. */
|
|
65
|
+
expandedContent?: ReactNode;
|
|
45
66
|
/** Clamps the title (and the description) to this many lines, ending in an ellipsis. */
|
|
46
67
|
titleLines?: number;
|
|
47
68
|
descriptionLines?: number;
|
|
48
69
|
}
|
|
49
|
-
export declare function KjunListRow({ title, description, badge, icon, leadingSize, iconColor, iconBackground, leading, trailing, actions, href, disabled, destructive, chevron, selected: ownSelected, checked, onCheckedChange, busy, value, onClick: ownClick, ariaLabel, children, titleLines, descriptionLines }: KjunListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
export declare function KjunListRow({ title, description, badge, icon, leadingSize, iconColor, iconBackground, leading, trailing, trailingPosition, actions, href, target, rel, disabled, destructive, emphasized, chevron, current, selected: ownSelected, checked, onCheckedChange, busy, value, onClick: ownClick, ariaLabel, children, titleLines, descriptionLines, expanded, onExpandedChange, expandedContent }: KjunListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
50
71
|
export interface KjunListSectionProps {
|
|
51
72
|
title?: string;
|
|
52
73
|
description?: string;
|
|
53
74
|
actions?: ReactNode;
|
|
54
75
|
children?: ReactNode;
|
|
55
76
|
ariaLabel?: string;
|
|
56
|
-
/**
|
|
57
|
-
|
|
58
|
-
/**
|
|
77
|
+
/** A short mark after the title, such as a KjunBadge with the row count; centered on the title's first line and read with the title as the list's name. */
|
|
78
|
+
badge?: ReactNode;
|
|
79
|
+
/** id, class and style of the root section. */
|
|
80
|
+
id?: string;
|
|
81
|
+
className?: string;
|
|
82
|
+
style?: CSSProperties;
|
|
83
|
+
/** Paints the surface background (default true); false lets the page background show through; "muted" paints the muted fill, which sets rows apart inside a white card or modal. */
|
|
84
|
+
surface?: ListSectionSurface;
|
|
85
|
+
/** Runs the section past its container's content edge to the container's edge: inside a KjunCard body by the card's
|
|
86
|
+
* padding, elsewhere by the rows' 16px. Rows, heading and footer take that inset, so their text stays on the content line
|
|
87
|
+
* around the section while row fills and dividers reach the edge. The section is flat (radius does not apply); an open
|
|
88
|
+
* section keeps its own inset. Leave room for the overhang: a parent that clips its overflow cuts it off. */
|
|
89
|
+
bleed?: boolean;
|
|
90
|
+
/** Draws dividers between rows (default true; false in a details section). An open section draws none; giving it true warns in development. */
|
|
59
91
|
divider?: boolean;
|
|
60
|
-
/** "compact" rows keep the 16px inset but are 44 tall (the touch minimum) instead of 56. */
|
|
92
|
+
/** "compact" rows keep the 16px inset but are 44 tall (the touch minimum) instead of 56. A details section keeps its own 32px rows. */
|
|
61
93
|
density?: "default" | "compact";
|
|
62
94
|
/** Rounds the rows into a card on the card radius steps; the title, actions and footer stay outside it (default "none", or the KjunListGroup's). An open section has no card. */
|
|
63
95
|
radius?: CardRadius;
|
|
64
|
-
/** "open" puts the rows on the page with no card or dividers: larger titles, icons on rounded squares, and a filled mark for the chosen row (default "default", or "open" in an open KjunListGroup).
|
|
96
|
+
/** "open" puts the rows on the page with no card or dividers: larger titles, icons on rounded squares, and a filled mark for the chosen row (default "default", or "open" in an open KjunListGroup).
|
|
97
|
+
* "details" is for rows that are read, not pressed ("Payment method / Visa"): 32 tall, no dividers, the label secondary and the value in the text color with the room the label leaves. */
|
|
65
98
|
variant?: ListSectionVariant;
|
|
66
99
|
/** "title" is the 16px heading, "label" the small caption above the rows; by default a title with a description is a heading and one without is a label. */
|
|
67
100
|
titleVariant?: "title" | "label";
|
|
@@ -94,14 +127,18 @@ export interface KjunListSectionProps {
|
|
|
94
127
|
/** Why moving is off, shown under the rows and read with the buttons. */
|
|
95
128
|
reorderDisabledText?: string;
|
|
96
129
|
}
|
|
97
|
-
export declare function KjunListSection({ title, description, actions, children, ariaLabel, surface, divider: dividerProp, density, radius, titleVariant, headingLevel, empty, footer, loading, selectionMode, value, onValueChange, variant, reorderable, order, onOrderChange, onReorder, reorderControls, reorderDisabled, reorderDisabledText }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
130
|
+
export declare function KjunListSection({ title, description, badge, id: rootId, className, style, actions, children, ariaLabel, surface, bleed: bleedProp, divider: dividerProp, density, radius, titleVariant, headingLevel, empty, footer, loading, selectionMode, value, onValueChange, variant, reorderable, order, onOrderChange, onReorder, reorderControls, reorderDisabled, reorderDisabledText }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
98
131
|
export interface KjunListGroupProps {
|
|
132
|
+
/** id, class and style of the root. */
|
|
133
|
+
id?: string;
|
|
134
|
+
className?: string;
|
|
135
|
+
style?: CSSProperties;
|
|
99
136
|
/** "inset" (default) rounds every section and keeps them 24px apart; "flush" keeps square sections 8px apart; "open" puts every section's rows on the page with no card or dividers, 20px apart. */
|
|
100
137
|
variant?: ListGroupVariant;
|
|
101
138
|
children: ReactNode;
|
|
102
139
|
}
|
|
103
140
|
/** Stacks KjunListSections with one spacing and corner rule, so sections never set radius or gaps one by one. */
|
|
104
|
-
export declare function KjunListGroup({ variant, children }: KjunListGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
141
|
+
export declare function KjunListGroup({ variant, children, id, className, style }: KjunListGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
105
142
|
export interface KjunListItemProps {
|
|
106
143
|
children: ReactNode;
|
|
107
144
|
}
|
|
@@ -25,6 +25,7 @@ export interface MarketBaseProps<Row extends object> extends QueryDisplayProps {
|
|
|
25
25
|
showFooter?: boolean;
|
|
26
26
|
calculatedAt?: string | null;
|
|
27
27
|
footerNote?: string;
|
|
28
|
+
/** The count in the footer. Default: pagination.total, else the number of rows. */
|
|
28
29
|
totalCount?: number;
|
|
29
30
|
unitLabel?: string;
|
|
30
31
|
formatDate?: (value: string) => string;
|
|
@@ -44,12 +45,15 @@ export interface MarketColumn {
|
|
|
44
45
|
width?: number | string;
|
|
45
46
|
sortable?: boolean;
|
|
46
47
|
defaultSort?: boolean;
|
|
47
|
-
flash
|
|
48
|
+
/** Price columns: true or "text" colours the digits, "background" fills the price for a moment after it moves (KjunPriceCell flash). "price" reads as true; "change" has no effect. */
|
|
49
|
+
flash?: boolean | "text" | "background" | "price" | "change";
|
|
48
50
|
weight?: string;
|
|
49
51
|
/** Sparkline columns: the row field with the reference value (a previous close), drawn as a dotted baseline. */
|
|
50
52
|
baselineKey?: string;
|
|
51
53
|
/** Sparkline columns: every row shares one vertical range, for series on a common scale (such as percent changes). */
|
|
52
54
|
sharedRange?: boolean;
|
|
55
|
+
/** MarketTable: draws this column's cells, while the other columns keep the built-in ones. renderCell wins over it. */
|
|
56
|
+
render?: (row: any, column: MarketColumn) => ReactNode;
|
|
53
57
|
}
|
|
54
58
|
export type MarketFormatter<Row extends object> = (value: unknown, format: string, context: {
|
|
55
59
|
currency: string;
|
|
@@ -57,6 +61,8 @@ export type MarketFormatter<Row extends object> = (value: unknown, format: strin
|
|
|
57
61
|
column?: MarketColumn;
|
|
58
62
|
}) => string;
|
|
59
63
|
export interface KjunMarketSimpleListProps<Row extends object = Record<string, unknown>> extends MarketBaseProps<Row> {
|
|
64
|
+
/** The rowKey value of the row the app has open (a detail or chart beside the list); it takes the selected fill and aria-current, like MarketTable. */
|
|
65
|
+
activeKey?: unknown;
|
|
60
66
|
priceValue: (row: Row) => number | null;
|
|
61
67
|
changeValue: (row: Row) => number | null;
|
|
62
68
|
changeLoading?: (row: Row) => boolean;
|
|
@@ -76,6 +82,12 @@ export interface KjunMarketTableProps<Row extends object = Record<string, unknow
|
|
|
76
82
|
priceFormatter?: (value: number) => string;
|
|
77
83
|
currency?: string;
|
|
78
84
|
embedded?: boolean;
|
|
85
|
+
/** The toggle and identity columns stay in view while the other columns scroll sideways. Default true. */
|
|
86
|
+
stickyIdentity?: boolean;
|
|
87
|
+
/** false drops the lines between rows; the header keeps its line. Default true. */
|
|
88
|
+
divider?: boolean;
|
|
89
|
+
/** The rowKey value of the row the app has open (a detail beside the table); it takes the selected fill and aria-current. */
|
|
90
|
+
activeKey?: unknown;
|
|
79
91
|
formatMetric?: MarketFormatter<Row>;
|
|
80
92
|
renderCell?: (row: Row, column: MarketColumn) => ReactNode;
|
|
81
93
|
/** The row's quote status after the price column's value. */
|
|
@@ -85,6 +97,8 @@ export interface KjunMarketTableProps<Row extends object = Record<string, unknow
|
|
|
85
97
|
onToggleFavorite?: (row: Row) => void;
|
|
86
98
|
}
|
|
87
99
|
export interface KjunMarketCardsProps<Row extends object = Record<string, unknown>> extends MarketBaseProps<Row>, MarketCardsModelProps {
|
|
100
|
+
/** The rowKey value of the row the app has open (a detail or chart beside the list); it takes the selected fill and aria-current, like MarketTable. */
|
|
101
|
+
activeKey?: unknown;
|
|
88
102
|
columns: MarketColumn[];
|
|
89
103
|
sortOrder?: "asc" | "desc";
|
|
90
104
|
currency?: string;
|
|
@@ -25,6 +25,7 @@ export interface MarketBaseProps<Row extends object> extends QueryDisplayProps {
|
|
|
25
25
|
showFooter?: boolean;
|
|
26
26
|
calculatedAt?: string | null;
|
|
27
27
|
footerNote?: string;
|
|
28
|
+
/** The count in the footer. Default: pagination.total, else the number of rows. */
|
|
28
29
|
totalCount?: number;
|
|
29
30
|
unitLabel?: string;
|
|
30
31
|
formatDate?: (value: string) => string;
|
|
@@ -44,12 +45,15 @@ export interface MarketColumn {
|
|
|
44
45
|
width?: number | string;
|
|
45
46
|
sortable?: boolean;
|
|
46
47
|
defaultSort?: boolean;
|
|
47
|
-
flash
|
|
48
|
+
/** Price columns: true or "text" colours the digits, "background" fills the price for a moment after it moves (KjunPriceCell flash). "price" reads as true; "change" has no effect. */
|
|
49
|
+
flash?: boolean | "text" | "background" | "price" | "change";
|
|
48
50
|
weight?: string;
|
|
49
51
|
/** Sparkline columns: the row field with the reference value (a previous close), drawn as a dotted baseline. */
|
|
50
52
|
baselineKey?: string;
|
|
51
53
|
/** Sparkline columns: every row shares one vertical range, for series on a common scale (such as percent changes). */
|
|
52
54
|
sharedRange?: boolean;
|
|
55
|
+
/** MarketTable: draws this column's cells, while the other columns keep the built-in ones. renderCell wins over it. */
|
|
56
|
+
render?: (row: any, column: MarketColumn) => ReactNode;
|
|
53
57
|
}
|
|
54
58
|
export type MarketFormatter<Row extends object> = (value: unknown, format: string, context: {
|
|
55
59
|
currency: string;
|
|
@@ -57,6 +61,8 @@ export type MarketFormatter<Row extends object> = (value: unknown, format: strin
|
|
|
57
61
|
column?: MarketColumn;
|
|
58
62
|
}) => string;
|
|
59
63
|
export interface KjunMarketSimpleListProps<Row extends object = Record<string, unknown>> extends MarketBaseProps<Row> {
|
|
64
|
+
/** The rowKey value of the row the app has open (a detail or chart beside the list); it takes the selected fill and aria-current, like MarketTable. */
|
|
65
|
+
activeKey?: unknown;
|
|
60
66
|
priceValue: (row: Row) => number | null;
|
|
61
67
|
changeValue: (row: Row) => number | null;
|
|
62
68
|
changeLoading?: (row: Row) => boolean;
|
|
@@ -76,6 +82,12 @@ export interface KjunMarketTableProps<Row extends object = Record<string, unknow
|
|
|
76
82
|
priceFormatter?: (value: number) => string;
|
|
77
83
|
currency?: string;
|
|
78
84
|
embedded?: boolean;
|
|
85
|
+
/** The toggle and identity columns stay in view while the other columns scroll sideways. Default true. */
|
|
86
|
+
stickyIdentity?: boolean;
|
|
87
|
+
/** false drops the lines between rows; the header keeps its line. Default true. */
|
|
88
|
+
divider?: boolean;
|
|
89
|
+
/** The rowKey value of the row the app has open (a detail beside the table); it takes the selected fill and aria-current. */
|
|
90
|
+
activeKey?: unknown;
|
|
79
91
|
formatMetric?: MarketFormatter<Row>;
|
|
80
92
|
renderCell?: (row: Row, column: MarketColumn) => ReactNode;
|
|
81
93
|
/** The row's quote status after the price column's value. */
|
|
@@ -85,6 +97,8 @@ export interface KjunMarketTableProps<Row extends object = Record<string, unknow
|
|
|
85
97
|
onToggleFavorite?: (row: Row) => void;
|
|
86
98
|
}
|
|
87
99
|
export interface KjunMarketCardsProps<Row extends object = Record<string, unknown>> extends MarketBaseProps<Row>, MarketCardsModelProps {
|
|
100
|
+
/** The rowKey value of the row the app has open (a detail or chart beside the list); it takes the selected fill and aria-current, like MarketTable. */
|
|
101
|
+
activeKey?: unknown;
|
|
88
102
|
columns: MarketColumn[];
|
|
89
103
|
sortOrder?: "asc" | "desc";
|
|
90
104
|
currency?: string;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
1
2
|
import { MarketBaseProps } from "./market-model.cjs";
|
|
2
3
|
export declare function MarketIdentity<Row extends object>({ row, props, }: {
|
|
3
4
|
row: Row;
|
|
4
5
|
props: MarketBaseProps<Row>;
|
|
5
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
/** A list row: a button only when the app listens for clicks (Enter and Space too), with aria-current on the selected row. */
|
|
8
|
+
export declare function MarketRow<Row extends object>({ row, props, selectedKey, compact, children, }: {
|
|
9
|
+
row: Row;
|
|
10
|
+
props: MarketBaseProps<Row>;
|
|
11
|
+
selectedKey?: unknown;
|
|
12
|
+
compact?: boolean;
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
15
|
export declare function MarketFooter<Row extends object>({ props, }: {
|
|
7
16
|
props: MarketBaseProps<Row>;
|
|
8
17
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
1
2
|
import { MarketBaseProps } from "./market-model.js";
|
|
2
3
|
export declare function MarketIdentity<Row extends object>({ row, props, }: {
|
|
3
4
|
row: Row;
|
|
4
5
|
props: MarketBaseProps<Row>;
|
|
5
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
/** A list row: a button only when the app listens for clicks (Enter and Space too), with aria-current on the selected row. */
|
|
8
|
+
export declare function MarketRow<Row extends object>({ row, props, selectedKey, compact, children, }: {
|
|
9
|
+
row: Row;
|
|
10
|
+
props: MarketBaseProps<Row>;
|
|
11
|
+
selectedKey?: unknown;
|
|
12
|
+
compact?: boolean;
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
15
|
export declare function MarketFooter<Row extends object>({ props, }: {
|
|
7
16
|
props: MarketBaseProps<Row>;
|
|
8
17
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
1
2
|
export interface KjunMarketTableSkeletonProps {
|
|
2
3
|
columns?: ({
|
|
3
4
|
key?: string;
|
|
@@ -9,5 +10,10 @@ export interface KjunMarketTableSkeletonProps {
|
|
|
9
10
|
showActions?: boolean;
|
|
10
11
|
alignClass?: (align: unknown) => string;
|
|
11
12
|
widthClass?: (column: unknown) => string;
|
|
13
|
+
/** Announces loading to screen readers (a status); the table itself stays silent. */
|
|
14
|
+
loadingText?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
style?: CSSProperties;
|
|
17
|
+
id?: string;
|
|
12
18
|
}
|
|
13
|
-
export declare function KjunMarketTableSkeleton({ columns, rows, showActions, alignClass, widthClass }: KjunMarketTableSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function KjunMarketTableSkeleton({ columns, rows, showActions, alignClass, widthClass, loadingText, className, style, id }: KjunMarketTableSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
1
2
|
export interface KjunMarketTableSkeletonProps {
|
|
2
3
|
columns?: ({
|
|
3
4
|
key?: string;
|
|
@@ -9,5 +10,10 @@ export interface KjunMarketTableSkeletonProps {
|
|
|
9
10
|
showActions?: boolean;
|
|
10
11
|
alignClass?: (align: unknown) => string;
|
|
11
12
|
widthClass?: (column: unknown) => string;
|
|
13
|
+
/** Announces loading to screen readers (a status); the table itself stays silent. */
|
|
14
|
+
loadingText?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
style?: CSSProperties;
|
|
17
|
+
id?: string;
|
|
12
18
|
}
|
|
13
|
-
export declare function KjunMarketTableSkeleton({ columns, rows, showActions, alignClass, widthClass }: KjunMarketTableSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function KjunMarketTableSkeleton({ columns, rows, showActions, alignClass, widthClass, loadingText, className, style, id }: KjunMarketTableSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactNode } from "react";
|
|
2
|
+
export type KjunImageShape = "square" | "rounded" | "circle";
|
|
2
3
|
export interface KjunImageProps {
|
|
3
4
|
src?: string;
|
|
4
5
|
alt: string;
|
|
5
6
|
decorative?: boolean;
|
|
6
|
-
|
|
7
|
+
/** Width ÷ height; "auto" lets the loaded image set the height (a missing or failed image stays square). */
|
|
8
|
+
aspectRatio?: number | "auto";
|
|
7
9
|
fit?: "cover" | "contain";
|
|
10
|
+
/** square (default), rounded corners, or a circle. */
|
|
11
|
+
shape?: KjunImageShape;
|
|
8
12
|
fallback?: ReactNode;
|
|
9
13
|
lazy?: boolean;
|
|
10
14
|
onLoad?: () => void;
|
|
11
15
|
onError?: () => void;
|
|
12
16
|
}
|
|
13
|
-
export declare function KjunImage({ src, alt, decorative, aspectRatio, fit, fallback, lazy, onLoad, onError }: KjunImageProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function KjunImage({ src, alt, decorative, aspectRatio, fit, shape, fallback, lazy, onLoad, onError }: KjunImageProps): import("react/jsx-runtime").JSX.Element;
|
|
14
18
|
export interface KjunAvatarProps {
|
|
15
19
|
src?: string;
|
|
16
20
|
name?: string;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactNode } from "react";
|
|
2
|
+
export type KjunImageShape = "square" | "rounded" | "circle";
|
|
2
3
|
export interface KjunImageProps {
|
|
3
4
|
src?: string;
|
|
4
5
|
alt: string;
|
|
5
6
|
decorative?: boolean;
|
|
6
|
-
|
|
7
|
+
/** Width ÷ height; "auto" lets the loaded image set the height (a missing or failed image stays square). */
|
|
8
|
+
aspectRatio?: number | "auto";
|
|
7
9
|
fit?: "cover" | "contain";
|
|
10
|
+
/** square (default), rounded corners, or a circle. */
|
|
11
|
+
shape?: KjunImageShape;
|
|
8
12
|
fallback?: ReactNode;
|
|
9
13
|
lazy?: boolean;
|
|
10
14
|
onLoad?: () => void;
|
|
11
15
|
onError?: () => void;
|
|
12
16
|
}
|
|
13
|
-
export declare function KjunImage({ src, alt, decorative, aspectRatio, fit, fallback, lazy, onLoad, onError }: KjunImageProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function KjunImage({ src, alt, decorative, aspectRatio, fit, shape, fallback, lazy, onLoad, onError }: KjunImageProps): import("react/jsx-runtime").JSX.Element;
|
|
14
18
|
export interface KjunAvatarProps {
|
|
15
19
|
src?: string;
|
|
16
20
|
name?: string;
|
|
@@ -8,14 +8,20 @@ export interface KjunFormActionsProps {
|
|
|
8
8
|
showCancel?: boolean;
|
|
9
9
|
showConfirm?: boolean;
|
|
10
10
|
cancelDisabled?: boolean;
|
|
11
|
+
/** The id of a form elsewhere on the page: the confirm button then submits it (Enter in a field submits it too), so a form in a
|
|
12
|
+
* modal body needs no hidden submit button. Handle the save in the form's submit event. */
|
|
13
|
+
form?: string;
|
|
11
14
|
confirmDisabled?: boolean;
|
|
12
15
|
loading?: boolean;
|
|
13
16
|
variant?: Extract<ButtonVariant, "primary" | "danger" | "success">;
|
|
14
17
|
cancelVariant?: "ghost" | "secondary";
|
|
18
|
+
/** The buttons fill the row: true gives each the same width, "primary" makes the confirm button twice as wide as cancel.
|
|
19
|
+
* Stacked rows are full width either way. */
|
|
20
|
+
fill?: boolean | "primary";
|
|
15
21
|
onCancel?: () => void;
|
|
16
22
|
onConfirm?: () => void;
|
|
17
23
|
}
|
|
18
|
-
export declare function KjunFormActions({ size: requested, cancelText, confirmText, showCancel, showConfirm, cancelDisabled, confirmDisabled, loading, variant, cancelVariant, onCancel, onConfirm, }: KjunFormActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function KjunFormActions({ size: requested, cancelText, confirmText, showCancel, showConfirm, cancelDisabled, form, confirmDisabled, loading, variant, cancelVariant, fill, onCancel, onConfirm, }: KjunFormActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
19
25
|
export interface KjunModalProps {
|
|
20
26
|
open: boolean;
|
|
21
27
|
onOpenChange: (open: boolean) => void;
|
|
@@ -35,6 +41,9 @@ export interface KjunModalProps {
|
|
|
35
41
|
showCancelButton?: boolean;
|
|
36
42
|
confirmText?: string;
|
|
37
43
|
cancelText?: string;
|
|
44
|
+
/** The id of a form elsewhere on the page: the confirm button then submits it (Enter in a field submits it too), so a form in a
|
|
45
|
+
* modal body needs no hidden submit button. Handle the save in the form's submit event. */
|
|
46
|
+
form?: string;
|
|
38
47
|
confirmDisabled?: boolean;
|
|
39
48
|
loading?: boolean;
|
|
40
49
|
noPadding?: boolean;
|
|
@@ -50,4 +59,4 @@ export interface KjunModalProps {
|
|
|
50
59
|
/** Read after the exit finishes; a missing target falls back to the opener or parent window. */
|
|
51
60
|
returnFocus?: FocusReturn;
|
|
52
61
|
}
|
|
53
|
-
export declare function KjunModal({ open, onOpenChange, onClose, onAfterClose, onCancel, onConfirm, title, size, closable, closeOnOverlay, closeOnEsc, showHeader, showFooter, showConfirmButton, showCancelButton, confirmText, cancelText, confirmDisabled, loading, noPadding, height, confirmVariant, footerSize, header, footer, children, ariaLabel, ariaDescribedBy, returnFocus, }: KjunModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
62
|
+
export declare function KjunModal({ open, onOpenChange, onClose, onAfterClose, onCancel, onConfirm, title, size, closable, closeOnOverlay, closeOnEsc, showHeader, showFooter, showConfirmButton, showCancelButton, confirmText, cancelText, form, confirmDisabled, loading, noPadding, height, confirmVariant, footerSize, header, footer, children, ariaLabel, ariaDescribedBy, returnFocus, }: KjunModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -8,14 +8,20 @@ export interface KjunFormActionsProps {
|
|
|
8
8
|
showCancel?: boolean;
|
|
9
9
|
showConfirm?: boolean;
|
|
10
10
|
cancelDisabled?: boolean;
|
|
11
|
+
/** The id of a form elsewhere on the page: the confirm button then submits it (Enter in a field submits it too), so a form in a
|
|
12
|
+
* modal body needs no hidden submit button. Handle the save in the form's submit event. */
|
|
13
|
+
form?: string;
|
|
11
14
|
confirmDisabled?: boolean;
|
|
12
15
|
loading?: boolean;
|
|
13
16
|
variant?: Extract<ButtonVariant, "primary" | "danger" | "success">;
|
|
14
17
|
cancelVariant?: "ghost" | "secondary";
|
|
18
|
+
/** The buttons fill the row: true gives each the same width, "primary" makes the confirm button twice as wide as cancel.
|
|
19
|
+
* Stacked rows are full width either way. */
|
|
20
|
+
fill?: boolean | "primary";
|
|
15
21
|
onCancel?: () => void;
|
|
16
22
|
onConfirm?: () => void;
|
|
17
23
|
}
|
|
18
|
-
export declare function KjunFormActions({ size: requested, cancelText, confirmText, showCancel, showConfirm, cancelDisabled, confirmDisabled, loading, variant, cancelVariant, onCancel, onConfirm, }: KjunFormActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function KjunFormActions({ size: requested, cancelText, confirmText, showCancel, showConfirm, cancelDisabled, form, confirmDisabled, loading, variant, cancelVariant, fill, onCancel, onConfirm, }: KjunFormActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
19
25
|
export interface KjunModalProps {
|
|
20
26
|
open: boolean;
|
|
21
27
|
onOpenChange: (open: boolean) => void;
|
|
@@ -35,6 +41,9 @@ export interface KjunModalProps {
|
|
|
35
41
|
showCancelButton?: boolean;
|
|
36
42
|
confirmText?: string;
|
|
37
43
|
cancelText?: string;
|
|
44
|
+
/** The id of a form elsewhere on the page: the confirm button then submits it (Enter in a field submits it too), so a form in a
|
|
45
|
+
* modal body needs no hidden submit button. Handle the save in the form's submit event. */
|
|
46
|
+
form?: string;
|
|
38
47
|
confirmDisabled?: boolean;
|
|
39
48
|
loading?: boolean;
|
|
40
49
|
noPadding?: boolean;
|
|
@@ -50,4 +59,4 @@ export interface KjunModalProps {
|
|
|
50
59
|
/** Read after the exit finishes; a missing target falls back to the opener or parent window. */
|
|
51
60
|
returnFocus?: FocusReturn;
|
|
52
61
|
}
|
|
53
|
-
export declare function KjunModal({ open, onOpenChange, onClose, onAfterClose, onCancel, onConfirm, title, size, closable, closeOnOverlay, closeOnEsc, showHeader, showFooter, showConfirmButton, showCancelButton, confirmText, cancelText, confirmDisabled, loading, noPadding, height, confirmVariant, footerSize, header, footer, children, ariaLabel, ariaDescribedBy, returnFocus, }: KjunModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
62
|
+
export declare function KjunModal({ open, onOpenChange, onClose, onAfterClose, onCancel, onConfirm, title, size, closable, closeOnOverlay, closeOnEsc, showHeader, showFooter, showConfirmButton, showCancelButton, confirmText, cancelText, form, confirmDisabled, loading, noPadding, height, confirmVariant, footerSize, header, footer, children, ariaLabel, ariaDescribedBy, returnFocus, }: KjunModalProps): import("react/jsx-runtime").JSX.Element | null;
|