@kjun-ui/react 0.20.0 → 0.22.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 +11354 -4458
- package/dist/index.js +10951 -4033
- package/dist/styles.css +3948 -738
- 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 -5
- package/dist/types/packages/react/src/app-navigation.d.ts +14 -5
- 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 +14 -6
- package/dist/types/packages/react/src/button.d.ts +14 -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-actions-context.d.cts +2 -0
- package/dist/types/packages/react/src/card-actions-context.d.ts +2 -0
- package/dist/types/packages/react/src/card.d.cts +23 -6
- package/dist/types/packages/react/src/card.d.ts +23 -6
- 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/chip.d.cts +4 -2
- package/dist/types/packages/react/src/chip.d.ts +4 -2
- 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-parts.d.cts +58 -0
- package/dist/types/packages/react/src/color-picker-parts.d.ts +58 -0
- package/dist/types/packages/react/src/color-picker.d.cts +58 -0
- package/dist/types/packages/react/src/color-picker.d.ts +58 -0
- 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 +22 -9
- package/dist/types/packages/react/src/data-state.d.ts +22 -9
- 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 +40 -11
- package/dist/types/packages/react/src/display.d.ts +40 -11
- 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 +19 -5
- package/dist/types/packages/react/src/dropdown.d.ts +19 -5
- 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 +18 -7
- package/dist/types/packages/react/src/fab.d.ts +18 -7
- 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 +16 -1
- package/dist/types/packages/react/src/index.d.ts +16 -1
- package/dist/types/packages/react/src/input.d.cts +14 -1
- package/dist/types/packages/react/src/input.d.ts +14 -1
- package/dist/types/packages/react/src/kpi-hero.d.cts +55 -0
- package/dist/types/packages/react/src/kpi-hero.d.ts +55 -0
- package/dist/types/packages/react/src/kpi-row.d.cts +46 -0
- package/dist/types/packages/react/src/kpi-row.d.ts +46 -0
- package/dist/types/packages/react/src/kpi.d.cts +2 -72
- package/dist/types/packages/react/src/kpi.d.ts +2 -72
- 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 +9 -0
- package/dist/types/packages/react/src/list-context.d.ts +9 -0
- package/dist/types/packages/react/src/list.d.cts +84 -11
- package/dist/types/packages/react/src/list.d.ts +84 -11
- package/dist/types/packages/react/src/market-model.d.cts +13 -1
- package/dist/types/packages/react/src/market-model.d.ts +13 -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 +14 -2
- package/dist/types/packages/react/src/modal.d.ts +14 -2
- package/dist/types/packages/react/src/navigation.d.cts +36 -6
- package/dist/types/packages/react/src/navigation.d.ts +36 -6
- package/dist/types/packages/react/src/number-display.d.cts +10 -5
- package/dist/types/packages/react/src/number-display.d.ts +10 -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/reorder-controls.d.cts +43 -0
- package/dist/types/packages/react/src/reorder-controls.d.ts +43 -0
- 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.d.cts +47 -0
- package/dist/types/packages/react/src/side-navigation-layout.d.ts +47 -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 +19 -3
- package/dist/types/packages/react/src/skeletons.d.ts +19 -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 +43 -0
- package/dist/types/packages/react/src/split-pane.d.ts +43 -0
- package/dist/types/packages/react/src/stacked-bar.d.cts +24 -0
- package/dist/types/packages/react/src/stacked-bar.d.ts +24 -0
- package/dist/types/packages/react/src/steps.d.cts +26 -0
- package/dist/types/packages/react/src/steps.d.ts +26 -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/packages/react/src/zone-gauge.d.cts +28 -0
- package/dist/types/packages/react/src/zone-gauge.d.ts +28 -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-action-size.d.cts +1 -0
- package/dist/types/shared/package-runtime/alert-action-size.d.ts +1 -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 +15 -0
- package/dist/types/shared/package-runtime/bottom-bar.d.ts +15 -0
- package/dist/types/shared/package-runtime/bottom-navigation.d.cts +30 -0
- package/dist/types/shared/package-runtime/bottom-navigation.d.ts +30 -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 +42 -0
- package/dist/types/shared/package-runtime/card-layout.d.ts +42 -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 +2 -2
- package/dist/types/shared/package-runtime/chart-skeleton.d.ts +2 -2
- package/dist/types/shared/package-runtime/chip-size.d.cts +4 -0
- package/dist/types/shared/package-runtime/chip-size.d.ts +4 -0
- 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/color-picker-model.d.cts +51 -0
- package/dist/types/shared/package-runtime/color-picker-model.d.ts +51 -0
- package/dist/types/shared/package-runtime/color-picker.d.cts +92 -0
- package/dist/types/shared/package-runtime/color-picker.d.ts +92 -0
- package/dist/types/shared/package-runtime/color.d.cts +22 -0
- package/dist/types/shared/package-runtime/color.d.ts +22 -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 +168 -0
- package/dist/types/shared/package-runtime/distribution.d.ts +168 -0
- 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/empty-geometry.d.cts +19 -0
- package/dist/types/shared/package-runtime/empty-geometry.d.ts +19 -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/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 +102 -0
- package/dist/types/shared/package-runtime/kpi.d.ts +102 -0
- package/dist/types/shared/package-runtime/layer-state.d.cts +2 -1
- package/dist/types/shared/package-runtime/layer-state.d.ts +2 -1
- 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-leading.d.cts +38 -0
- package/dist/types/shared/package-runtime/list-leading.d.ts +38 -0
- package/dist/types/shared/package-runtime/list-row.d.cts +152 -4
- package/dist/types/shared/package-runtime/list-row.d.ts +152 -4
- package/dist/types/shared/package-runtime/market-layout.d.cts +6 -2
- package/dist/types/shared/package-runtime/market-layout.d.ts +6 -2
- package/dist/types/shared/package-runtime/market-query.d.cts +21 -0
- package/dist/types/shared/package-runtime/market-query.d.ts +21 -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 +101 -1
- package/dist/types/shared/package-runtime/messages/ko.d.ts +101 -1
- package/dist/types/shared/package-runtime/messages-context.d.cts +93 -1
- package/dist/types/shared/package-runtime/messages-context.d.ts +93 -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/number-input.d.cts +63 -0
- package/dist/types/shared/package-runtime/number-input.d.ts +63 -0
- package/dist/types/shared/package-runtime/number-sign.d.cts +9 -0
- package/dist/types/shared/package-runtime/number-sign.d.ts +9 -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/popover-scroll.d.cts +3 -0
- package/dist/types/shared/package-runtime/popover-scroll.d.ts +3 -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/radio-keyboard.d.cts +2 -0
- package/dist/types/shared/package-runtime/radio-keyboard.d.ts +2 -0
- package/dist/types/shared/package-runtime/reorder-session.d.cts +62 -0
- package/dist/types/shared/package-runtime/reorder-session.d.ts +62 -0
- package/dist/types/shared/package-runtime/reorder.d.cts +81 -0
- package/dist/types/shared/package-runtime/reorder.d.ts +81 -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-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 +18 -0
- package/dist/types/shared/package-runtime/skeleton-text.d.ts +18 -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 +85 -0
- package/dist/types/shared/package-runtime/split-pane.d.ts +85 -0
- package/dist/types/shared/package-runtime/steps.d.cts +37 -0
- package/dist/types/shared/package-runtime/steps.d.ts +37 -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 +36 -0
- package/dist/types/shared/package-runtime/table-columns.d.ts +36 -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 +33 -4
- package/dist/types/shared/package-runtime/table-presentation.d.ts +33 -4
- package/dist/types/shared/package-runtime/table.d.cts +44 -2
- package/dist/types/shared/package-runtime/table.d.ts +44 -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 +54 -0
- package/dist/types/shared/package-runtime/use-color-picker.d.ts +54 -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-layer.d.cts +4 -2
- package/dist/types/shared/package-runtime/use-layer.d.ts +4 -2
- 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
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { type NavigationBadge } from "./navigation-badge.js";
|
|
2
|
+
/** A small button at the end of a row or a group title, such as "New" or "More". It does not navigate; the press reaches
|
|
3
|
+
* onAction (Vue: the action event) with the row's key and the action's key. */
|
|
4
|
+
export interface SideNavigationAction {
|
|
5
|
+
key: string;
|
|
6
|
+
icon: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
/** How loud a badge is: "alert" (the default) is the danger pill, "neutral" a quiet grey count for plain totals. */
|
|
10
|
+
export type SideNavigationBadgeTone = "alert" | "neutral";
|
|
11
|
+
/** A destination in the side navigation: the bottom navigation's shape, so one list can feed both. */
|
|
12
|
+
export interface SideNavigationDestination {
|
|
13
|
+
key: string;
|
|
14
|
+
label: string;
|
|
15
|
+
href: string;
|
|
16
|
+
/** Drawn on top-level rows only; a child row starts at its parent's label and draws no icon. */
|
|
17
|
+
icon?: string;
|
|
18
|
+
/** A count or short text; true draws a dot. Numbers over 99 show 99+. 0 and "" draw nothing. */
|
|
19
|
+
badge?: NavigationBadge;
|
|
20
|
+
/** "neutral" draws the badge as a quiet grey count; keep "alert" (the default) for what needs attention. */
|
|
21
|
+
badgeTone?: SideNavigationBadgeTone;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** The name under the icon in a labelled rail (railLabels), which is only 72 wide: about four Korean characters. The
|
|
24
|
+
* full label stays the accessible name and shows as a tooltip there. */
|
|
25
|
+
shortLabel?: string;
|
|
26
|
+
/** Where the link opens on Web, such as "_blank" for a page outside the app. Such a link is left to the browser. */
|
|
27
|
+
target?: string;
|
|
28
|
+
/** Buttons at the end of the row, shown under a pointer or focus (always on touch). Hidden while only icons show. */
|
|
29
|
+
actions?: SideNavigationAction[];
|
|
30
|
+
}
|
|
31
|
+
/** The fields every destination type shares; Native's destination has an optional href. */
|
|
32
|
+
type Destination = {
|
|
33
|
+
key: string;
|
|
34
|
+
label: string;
|
|
35
|
+
icon?: string;
|
|
36
|
+
badge?: NavigationBadge;
|
|
37
|
+
badgeTone?: SideNavigationBadgeTone;
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
shortLabel?: string;
|
|
40
|
+
target?: string;
|
|
41
|
+
actions?: SideNavigationAction[];
|
|
42
|
+
};
|
|
43
|
+
/** What any platform's destination holds, for helpers generic over Web's and Native's. */
|
|
44
|
+
export type SideNavigationAnyDestination = Destination;
|
|
45
|
+
/** A parent under a parent: the second and last level. It opens its destinations in place, one step further in. */
|
|
46
|
+
export interface SideNavigationSubParent<D extends Destination = SideNavigationDestination> {
|
|
47
|
+
key: string;
|
|
48
|
+
label: string;
|
|
49
|
+
disabled?: boolean;
|
|
50
|
+
children: D[];
|
|
51
|
+
}
|
|
52
|
+
/** A parent that opens its destinations under it. Its children may hold one more level of parents. It is a toggle and
|
|
53
|
+
* does not navigate itself. */
|
|
54
|
+
export interface SideNavigationParent<D extends Destination = SideNavigationDestination> {
|
|
55
|
+
key: string;
|
|
56
|
+
label: string;
|
|
57
|
+
icon?: string;
|
|
58
|
+
disabled?: boolean;
|
|
59
|
+
/** The name under the icon in a labelled rail (railLabels). */
|
|
60
|
+
shortLabel?: string;
|
|
61
|
+
children: (D | SideNavigationSubParent<D>)[];
|
|
62
|
+
}
|
|
63
|
+
export type SideNavigationItem<D extends Destination = SideNavigationDestination> = D | SideNavigationParent<D>;
|
|
64
|
+
/** A titled run of items, such as "Documents" or "Admin". */
|
|
65
|
+
export interface SideNavigationGroup<D extends Destination = SideNavigationDestination> {
|
|
66
|
+
title: string;
|
|
67
|
+
items: SideNavigationItem<D>[];
|
|
68
|
+
/** The group's identity in expandedGroups and showAll; the title when absent. */
|
|
69
|
+
key?: string;
|
|
70
|
+
/** The group's mark in a collapsed rail of groups (rail="groups"); its title's first character when absent. */
|
|
71
|
+
icon?: string;
|
|
72
|
+
/** The group's name under its icon in a labelled rail of groups. */
|
|
73
|
+
shortTitle?: string;
|
|
74
|
+
/** Whether this title opens and closes its group. Absent: the navigation's collapsibleGroups. */
|
|
75
|
+
collapsible?: boolean;
|
|
76
|
+
/** Starts open when the navigation keeps the open groups itself. The current page's group always starts open. */
|
|
77
|
+
defaultOpen?: boolean;
|
|
78
|
+
/** Shows only the first rows and a "N more" row for the rest, for lists people grow (projects, channels). The row of the
|
|
79
|
+
* current page always shows. */
|
|
80
|
+
limit?: number;
|
|
81
|
+
/** One button at the end of the title, such as "New project". */
|
|
82
|
+
action?: SideNavigationAction;
|
|
83
|
+
/** A quiet line shown in place of the rows while the group has none, such as "No projects yet", so an empty group does
|
|
84
|
+
* not read as a closed one. */
|
|
85
|
+
empty?: string;
|
|
86
|
+
}
|
|
87
|
+
export type SideNavigationEntry<D extends Destination = SideNavigationDestination> = SideNavigationItem<D> | SideNavigationGroup<D>;
|
|
88
|
+
export interface SideNavigationSection<D extends Destination = SideNavigationDestination> {
|
|
89
|
+
title?: string;
|
|
90
|
+
items: SideNavigationItem<D>[];
|
|
91
|
+
/** Set on a titled section: the group's key (its title when the group has none) and its options. */
|
|
92
|
+
key?: string;
|
|
93
|
+
icon?: string;
|
|
94
|
+
shortTitle?: string;
|
|
95
|
+
collapsible?: boolean;
|
|
96
|
+
defaultOpen?: boolean;
|
|
97
|
+
limit?: number;
|
|
98
|
+
action?: SideNavigationAction;
|
|
99
|
+
empty?: string;
|
|
100
|
+
}
|
|
101
|
+
/** A titled section, as a rail of groups or a toggle reads it. */
|
|
102
|
+
export type SideNavigationTitledSection<D extends Destination = SideNavigationDestination> = SideNavigationSection<D> & {
|
|
103
|
+
key: string;
|
|
104
|
+
title: string;
|
|
105
|
+
};
|
|
106
|
+
/** What a collapsed menu shows one icon for: each top-level item, or each group (loose items keep their own row). */
|
|
107
|
+
export type SideNavigationRail = "items" | "groups";
|
|
108
|
+
/** While collapsed, what pressing a parent or a group does: widen the column with it open, or show its rows in a
|
|
109
|
+
* floating panel beside the icon and keep the column narrow. */
|
|
110
|
+
export type SideNavigationCollapsedParent = "widen" | "flyout";
|
|
111
|
+
/** The width of an open column in KjunSideNavigationLayout. */
|
|
112
|
+
export type SideNavigationWidth = "sm" | "md" | "lg";
|
|
113
|
+
type AnyParent<D extends Destination> = SideNavigationParent<D> | SideNavigationSubParent<D>;
|
|
114
|
+
type Node<D extends Destination> = D | AnyParent<D>;
|
|
115
|
+
export declare const isSideGroup: <D extends Destination>(entry: SideNavigationEntry<D>) => entry is SideNavigationGroup<D>;
|
|
116
|
+
export declare const isSideParent: <T extends {
|
|
117
|
+
key: string;
|
|
118
|
+
}>(item: T) => item is Extract<T, {
|
|
119
|
+
children: unknown[];
|
|
120
|
+
}>;
|
|
121
|
+
export declare const isTitledSection: <D extends Destination>(section: SideNavigationSection<D>) => section is SideNavigationTitledSection<D>;
|
|
122
|
+
/** The entries as sections in order: loose items between groups form untitled sections, each group its own titled one. */
|
|
123
|
+
export declare function sideNavigationSections<D extends Destination>(entries: readonly SideNavigationEntry<D>[]): SideNavigationSection<D>[];
|
|
124
|
+
/** The parents that hold the current destination, at both levels; they start open so the current page is in view. */
|
|
125
|
+
export declare function sideNavigationCurrentParents<D extends Destination>(entries: readonly SideNavigationEntry<D>[], value: string | null | undefined): string[];
|
|
126
|
+
/** The open parents once the current destination's parents are added. The same array when nothing was added, so a
|
|
127
|
+
* component can tell whether to store or report a change. */
|
|
128
|
+
export declare function sideNavigationWithCurrentParents<D extends Destination>(open: readonly string[], entries: readonly SideNavigationEntry<D>[], value: string | null | undefined): readonly string[];
|
|
129
|
+
/** A group's identity in expandedGroups. */
|
|
130
|
+
export declare const sideGroupKey: (group: {
|
|
131
|
+
key?: string;
|
|
132
|
+
title: string;
|
|
133
|
+
}) => string;
|
|
134
|
+
/** Whether a titled section's title opens and closes it: its own collapsible, else the navigation's collapsibleGroups. */
|
|
135
|
+
export declare const sideSectionToggles: <D extends Destination>(section: SideNavigationSection<D>, collapsibleGroups: boolean) => section is SideNavigationTitledSection<D>;
|
|
136
|
+
/** Whether a parent holds the current destination, at either level under it. */
|
|
137
|
+
export declare const sideParentHoldsCurrent: <D extends Destination>(parent: AnyParent<D>, value: string | null | undefined) => boolean;
|
|
138
|
+
/** Whether a run of items holds the current destination, directly or under a parent. */
|
|
139
|
+
export declare const sideItemsHoldCurrent: <D extends Destination>(items: readonly Node<D>[], value: string | null | undefined) => boolean;
|
|
140
|
+
/** The tone of the dot that stands for the badges hidden in a run of items: "alert" when any of them is an alert, else
|
|
141
|
+
* "neutral" when any has a badge, else null. Disabled rows and their badges do not count. */
|
|
142
|
+
export declare function sideItemsBadgeTone<D extends Destination>(items: readonly Node<D>[]): SideNavigationBadgeTone | null;
|
|
143
|
+
/** Whether a run of items has a badge to show while it is hidden behind its group. */
|
|
144
|
+
export declare const sideItemsHaveBadge: <D extends Destination>(items: readonly Node<D>[]) => boolean;
|
|
145
|
+
export declare const sideParentHasBadge: <D extends Destination>(parent: AnyParent<D>) => boolean;
|
|
146
|
+
/** The open groups once the group of the current destination is added. The same array when nothing was added, like
|
|
147
|
+
* sideNavigationWithCurrentParents, so a component can tell whether to store or report a change. */
|
|
148
|
+
export declare function sideNavigationWithCurrentGroups<D extends Destination>(open: readonly string[], entries: readonly SideNavigationEntry<D>[], value: string | null | undefined): readonly string[];
|
|
149
|
+
/** The groups a navigation that keeps its own list starts with: those marked defaultOpen and the current page's group. */
|
|
150
|
+
export declare function sideNavigationInitialGroups<D extends Destination>(entries: readonly SideNavigationEntry<D>[], value: string | null | undefined): string[];
|
|
151
|
+
/** The rows of a collapsed rail of groups, in order: one per titled group, and the loose items between groups as they are. */
|
|
152
|
+
export type SideNavigationRailRow<D extends Destination = SideNavigationDestination> = {
|
|
153
|
+
group: SideNavigationTitledSection<D>;
|
|
154
|
+
} | {
|
|
155
|
+
item: SideNavigationItem<D>;
|
|
156
|
+
};
|
|
157
|
+
export declare function sideNavigationGroupRail<D extends Destination>(entries: readonly SideNavigationEntry<D>[]): SideNavigationRailRow<D>[];
|
|
158
|
+
/** The next list of open parents (or groups, or groups showing all rows) after one is toggled. */
|
|
159
|
+
export declare const toggleSideParent: (open: readonly string[], key: string) => string[];
|
|
160
|
+
/** What a parent row shows: whether its children are on screen, and what it stands for while they are not (a closed
|
|
161
|
+
* parent holding the current page, a dot for a child's badge in that badge's tone). In a flyout the children show beside,
|
|
162
|
+
* not under, it. */
|
|
163
|
+
export declare function sideParentState<D extends Destination>(parent: AnyParent<D>, { open, collapsed, value }: {
|
|
164
|
+
open: readonly string[];
|
|
165
|
+
collapsed: boolean;
|
|
166
|
+
value: string | null | undefined;
|
|
167
|
+
}): {
|
|
168
|
+
shown: boolean;
|
|
169
|
+
within: boolean;
|
|
170
|
+
dot: boolean;
|
|
171
|
+
tone: SideNavigationBadgeTone | null;
|
|
172
|
+
};
|
|
173
|
+
/** What a group toggle shows: the selection's trace and a dot for a badge inside while closed, and how many rows it holds. */
|
|
174
|
+
export declare function sideGroupState<D extends Destination>(section: SideNavigationTitledSection<D>, { openGroups, value }: {
|
|
175
|
+
openGroups: readonly string[];
|
|
176
|
+
value: string | null | undefined;
|
|
177
|
+
}): {
|
|
178
|
+
shown: boolean;
|
|
179
|
+
within: boolean;
|
|
180
|
+
dot: boolean;
|
|
181
|
+
tone: SideNavigationBadgeTone | null;
|
|
182
|
+
count: number;
|
|
183
|
+
};
|
|
184
|
+
/** A rail-of-groups row: always closed, so it stands for everything in its group. */
|
|
185
|
+
export declare function sideRailGroupState<D extends Destination>(section: SideNavigationTitledSection<D>, value: string | null | undefined): {
|
|
186
|
+
within: boolean;
|
|
187
|
+
dot: boolean;
|
|
188
|
+
tone: SideNavigationBadgeTone | null;
|
|
189
|
+
};
|
|
190
|
+
/** The rows a group shows under its limit: the first `limit`, plus any later row that holds the current page, in their
|
|
191
|
+
* places. hidden is how many stay behind the "more" row; 0 when the group has no limit, fits it, or shows all. */
|
|
192
|
+
export declare function sideSectionRows<D extends Destination>(section: SideNavigationSection<D>, { value, showAll }: {
|
|
193
|
+
value: string | null | undefined;
|
|
194
|
+
showAll: readonly string[];
|
|
195
|
+
}): {
|
|
196
|
+
items: SideNavigationItem<D>[];
|
|
197
|
+
hidden: number;
|
|
198
|
+
expandable: boolean;
|
|
199
|
+
expanded: boolean;
|
|
200
|
+
};
|
|
201
|
+
/** The line a titled group shows in place of its rows: its empty text while it has none, else nothing. */
|
|
202
|
+
export declare const sideSectionEmpty: (section: {
|
|
203
|
+
items: readonly unknown[];
|
|
204
|
+
empty?: string;
|
|
205
|
+
}) => string | undefined;
|
|
206
|
+
/** A link that leaves this tab (target="_blank" and the like). The browser opens it; the app is not asked to route. */
|
|
207
|
+
export declare const sideNavigationOpensElsewhere: (destination: {
|
|
208
|
+
target?: string;
|
|
209
|
+
}) => boolean;
|
|
210
|
+
/** A plain primary click: no modifier key and the main button. Modified clicks open a new tab or window, so they are left
|
|
211
|
+
* to the browser. Fields missing from an event (a touch on Native Web) count as plain. */
|
|
212
|
+
export declare function isPlainNavigationClick(event: {
|
|
213
|
+
button?: number;
|
|
214
|
+
metaKey?: boolean;
|
|
215
|
+
ctrlKey?: boolean;
|
|
216
|
+
shiftKey?: boolean;
|
|
217
|
+
altKey?: boolean;
|
|
218
|
+
defaultPrevented?: boolean;
|
|
219
|
+
} | null | undefined): boolean;
|
|
220
|
+
/** The first character of a label: the mark of a row without an icon while the navigation shows icons only. */
|
|
221
|
+
export declare const sideNavigationInitial: (label: string) => string;
|
|
222
|
+
/** The name a row shows: its short name under an icon in a labelled rail, else its label. */
|
|
223
|
+
export declare const sideNavigationShownLabel: (item: {
|
|
224
|
+
label: string;
|
|
225
|
+
shortLabel?: string;
|
|
226
|
+
}, labelled: boolean) => string;
|
|
227
|
+
/** A group's name under its icon in a labelled rail of groups. */
|
|
228
|
+
export declare const sideNavigationShownTitle: (group: {
|
|
229
|
+
title: string;
|
|
230
|
+
shortTitle?: string;
|
|
231
|
+
}, labelled: boolean) => string;
|
|
232
|
+
type Messages = {
|
|
233
|
+
newContent: string;
|
|
234
|
+
newCount: (count: number) => string;
|
|
235
|
+
newWindow: string;
|
|
236
|
+
};
|
|
237
|
+
/** A destination's accessible name: its full label, what its badge says, and that it opens elsewhere. */
|
|
238
|
+
export declare const sideNavigationLinkName: (item: {
|
|
239
|
+
label: string;
|
|
240
|
+
badge?: NavigationBadge;
|
|
241
|
+
target?: string;
|
|
242
|
+
}, m: Messages) => string;
|
|
243
|
+
/** The same name for Web's aria-label, or undefined when the shown text already is the whole name. */
|
|
244
|
+
export declare function sideNavigationLinkLabel(item: {
|
|
245
|
+
label: string;
|
|
246
|
+
shortLabel?: string;
|
|
247
|
+
badge?: NavigationBadge;
|
|
248
|
+
target?: string;
|
|
249
|
+
}, m: Messages, labelled: boolean): string | undefined;
|
|
250
|
+
/** A parent's or group's accessible name: its label, and "new" while a dot stands for a hidden badge. */
|
|
251
|
+
export declare const sideNavigationToggleName: (label: string, dot: boolean, m: {
|
|
252
|
+
newContent: string;
|
|
253
|
+
}) => string;
|
|
254
|
+
/** What an arrow key asks of a row in an open menu: "in" opens a closed parent or group, or moves to its first row;
|
|
255
|
+
* "out" closes an open one, or moves from a row to the parent or group title it sits under. Right to left swaps them. */
|
|
256
|
+
export declare function sideNavigationArrow(key: string, rtl: boolean): "in" | "out" | null;
|
|
257
|
+
/** The flyout open beside a collapsed icon, by kind, so a parent and a group with the same key never share one. */
|
|
258
|
+
export declare const sideFlyoutKey: (kind: "parent" | "group", key: string) => string;
|
|
259
|
+
/** A key as part of an element id: anything outside [A-Za-z0-9_-] becomes its code point, so different keys stay apart. */
|
|
260
|
+
export declare const sideNavigationIdPart: (key: string) => string;
|
|
261
|
+
/** Heading levels a group title can take. */
|
|
262
|
+
export type SideNavigationHeadingLevel = 2 | 3 | 4 | 5 | 6;
|
|
263
|
+
/** A one-time development warning. */
|
|
264
|
+
export declare function warnSideNavigation(message: string): void;
|
|
265
|
+
/** Keys that repeat: two rows or two groups with one key open, close and mark the current page together. */
|
|
266
|
+
export declare function sideNavigationDuplicateKeys<D extends Destination>(entries: readonly SideNavigationEntry<D>[]): string[];
|
|
267
|
+
/** Parents nested deeper than two levels: the third level is not drawn. */
|
|
268
|
+
export declare function sideNavigationTooDeep<D extends Destination>(entries: readonly SideNavigationEntry<D>[]): string[];
|
|
269
|
+
/** Development checks for a navigation's items and the props that read them. */
|
|
270
|
+
export declare function checkSideNavigation<D extends Destination>(entries: readonly SideNavigationEntry<D>[]): void;
|
|
271
|
+
/** A parent or group pressed while collapsed asks to widen; without a handler the press would do nothing visible. */
|
|
272
|
+
export declare const warnNoWiden: () => void;
|
|
273
|
+
/** KjunSideNavigationLayout's railBreakpoint: the collapsed value to ask for when the viewport moves across it, else null.
|
|
274
|
+
* previous is null before the first reading, where only a viewport already below it asks (for the rail). Between
|
|
275
|
+
* crossings the person's own toggle stands. */
|
|
276
|
+
export declare function sideNavigationRailRequest(previous: boolean | null, below: boolean, collapsed: boolean): boolean | null;
|
|
277
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type DeviationLevel } from "@kjun-ui/tokens";
|
|
2
|
+
/** A finite number from a number or numeric string; null for missing, blank or non-numeric input. -0 becomes 0. */
|
|
3
|
+
export declare const finiteNumber: (value: unknown) => number | null;
|
|
4
|
+
export declare const format: (value: number, decimals?: number) => string;
|
|
5
|
+
/**
|
|
6
|
+
* The value as it will be shown: rounded to `decimals`, with -0 folded into 0. Sign and colour follow this,
|
|
7
|
+
* so 0.001 at two decimals reads "0.00" in the neutral colour rather than "+0.00" in the rising one.
|
|
8
|
+
* A custom formatter owns its own rounding, so the raw value is kept.
|
|
9
|
+
*/
|
|
10
|
+
export declare function shownNumber(value: number, decimals: number, formatter?: (value: number) => string): number;
|
|
11
|
+
/** Direction of a shown value: 1 rising, -1 falling, 0 flat. */
|
|
12
|
+
export declare const numberDirection: (value: number) => 0 | 1 | -1;
|
|
13
|
+
export interface SignedValueTextOptions {
|
|
14
|
+
decimals: number;
|
|
15
|
+
percent: boolean;
|
|
16
|
+
prefix: string;
|
|
17
|
+
suffix: string;
|
|
18
|
+
showSign: boolean;
|
|
19
|
+
formatter?: (value: number) => string;
|
|
20
|
+
}
|
|
21
|
+
/** SignedValue's text and direction; "—" and direction 0 when there is no number. */
|
|
22
|
+
export declare function signedValueText(value: unknown, o: SignedValueTextOptions): {
|
|
23
|
+
text: string;
|
|
24
|
+
direction: number;
|
|
25
|
+
missing: boolean;
|
|
26
|
+
};
|
|
27
|
+
/** Deviation's label, direction and fill step from the shown (rounded) value. Null when there is no number. */
|
|
28
|
+
export declare function deviationText(value: unknown, decimals: number, formatter?: (value: number) => string): {
|
|
29
|
+
label: string;
|
|
30
|
+
direction: number;
|
|
31
|
+
level: DeviationLevel;
|
|
32
|
+
abs: number;
|
|
33
|
+
} | null;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type DeviationLevel } from "@kjun-ui/tokens";
|
|
2
|
+
/** A finite number from a number or numeric string; null for missing, blank or non-numeric input. -0 becomes 0. */
|
|
3
|
+
export declare const finiteNumber: (value: unknown) => number | null;
|
|
4
|
+
export declare const format: (value: number, decimals?: number) => string;
|
|
5
|
+
/**
|
|
6
|
+
* The value as it will be shown: rounded to `decimals`, with -0 folded into 0. Sign and colour follow this,
|
|
7
|
+
* so 0.001 at two decimals reads "0.00" in the neutral colour rather than "+0.00" in the rising one.
|
|
8
|
+
* A custom formatter owns its own rounding, so the raw value is kept.
|
|
9
|
+
*/
|
|
10
|
+
export declare function shownNumber(value: number, decimals: number, formatter?: (value: number) => string): number;
|
|
11
|
+
/** Direction of a shown value: 1 rising, -1 falling, 0 flat. */
|
|
12
|
+
export declare const numberDirection: (value: number) => 0 | 1 | -1;
|
|
13
|
+
export interface SignedValueTextOptions {
|
|
14
|
+
decimals: number;
|
|
15
|
+
percent: boolean;
|
|
16
|
+
prefix: string;
|
|
17
|
+
suffix: string;
|
|
18
|
+
showSign: boolean;
|
|
19
|
+
formatter?: (value: number) => string;
|
|
20
|
+
}
|
|
21
|
+
/** SignedValue's text and direction; "—" and direction 0 when there is no number. */
|
|
22
|
+
export declare function signedValueText(value: unknown, o: SignedValueTextOptions): {
|
|
23
|
+
text: string;
|
|
24
|
+
direction: number;
|
|
25
|
+
missing: boolean;
|
|
26
|
+
};
|
|
27
|
+
/** Deviation's label, direction and fill step from the shown (rounded) value. Null when there is no number. */
|
|
28
|
+
export declare function deviationText(value: unknown, decimals: number, formatter?: (value: number) => string): {
|
|
29
|
+
label: string;
|
|
30
|
+
direction: number;
|
|
31
|
+
level: DeviationLevel;
|
|
32
|
+
abs: number;
|
|
33
|
+
} | null;
|
|
@@ -2,6 +2,24 @@ import { type TypographyRole } from "@kjun-ui/tokens";
|
|
|
2
2
|
type Percent = `${number}%`;
|
|
3
3
|
/** A paragraph that does not look like every other one, with a short last line. */
|
|
4
4
|
export declare function skeletonTextWidths(rows: number): Percent[];
|
|
5
|
+
/** Rows drawn for a count that may come from data: floored, never negative, and at most 100. */
|
|
6
|
+
export declare function skeletonCount(value: number): number;
|
|
7
|
+
/** 1…n for a count that may come from data (rows, columns, buttons), bounded like skeletonCount. */
|
|
8
|
+
export declare function skeletonRange(value: number): number[];
|
|
9
|
+
/** Widths of the action bars that stand in for a FormActions row: the last is the primary button. */
|
|
10
|
+
export declare function skeletonActionWidths(count: number, width: number, primaryWidth: number): number[];
|
|
11
|
+
/**
|
|
12
|
+
* Line widths for row `index` of a list skeleton, so neighbouring rows differ like real names do.
|
|
13
|
+
* `wide` is for rows whose label column is narrow (market, compact, notification, the market table's identity).
|
|
14
|
+
*/
|
|
15
|
+
export declare function skeletonRowWidths(index: number, wide?: boolean): {
|
|
16
|
+
title: `${number}%`;
|
|
17
|
+
detail: `${number}%`;
|
|
18
|
+
};
|
|
19
|
+
/** A factor for a fixed-width bar (a value, a label), so a column of them does not read as stripes. */
|
|
20
|
+
export declare function skeletonWidthScale(index: number): number;
|
|
21
|
+
/** Bar width for a cell of the table skeleton; row 0 is the header. The first column reads as names, the rest as values. */
|
|
22
|
+
export declare function skeletonTableWidth(row: number, column: number): Percent;
|
|
5
23
|
/** The web line box of a type role; without a role the line takes the surrounding text's line height. */
|
|
6
24
|
export declare function skeletonLineBox(role?: TypographyRole): string;
|
|
7
25
|
/**
|
|
@@ -2,6 +2,24 @@ import { type TypographyRole } from "@kjun-ui/tokens";
|
|
|
2
2
|
type Percent = `${number}%`;
|
|
3
3
|
/** A paragraph that does not look like every other one, with a short last line. */
|
|
4
4
|
export declare function skeletonTextWidths(rows: number): Percent[];
|
|
5
|
+
/** Rows drawn for a count that may come from data: floored, never negative, and at most 100. */
|
|
6
|
+
export declare function skeletonCount(value: number): number;
|
|
7
|
+
/** 1…n for a count that may come from data (rows, columns, buttons), bounded like skeletonCount. */
|
|
8
|
+
export declare function skeletonRange(value: number): number[];
|
|
9
|
+
/** Widths of the action bars that stand in for a FormActions row: the last is the primary button. */
|
|
10
|
+
export declare function skeletonActionWidths(count: number, width: number, primaryWidth: number): number[];
|
|
11
|
+
/**
|
|
12
|
+
* Line widths for row `index` of a list skeleton, so neighbouring rows differ like real names do.
|
|
13
|
+
* `wide` is for rows whose label column is narrow (market, compact, notification, the market table's identity).
|
|
14
|
+
*/
|
|
15
|
+
export declare function skeletonRowWidths(index: number, wide?: boolean): {
|
|
16
|
+
title: `${number}%`;
|
|
17
|
+
detail: `${number}%`;
|
|
18
|
+
};
|
|
19
|
+
/** A factor for a fixed-width bar (a value, a label), so a column of them does not read as stripes. */
|
|
20
|
+
export declare function skeletonWidthScale(index: number): number;
|
|
21
|
+
/** Bar width for a cell of the table skeleton; row 0 is the header. The first column reads as names, the rest as values. */
|
|
22
|
+
export declare function skeletonTableWidth(row: number, column: number): Percent;
|
|
5
23
|
/** The web line box of a type role; without a role the line takes the surrounding text's line height. */
|
|
6
24
|
export declare function skeletonLineBox(role?: TypographyRole): string;
|
|
7
25
|
/**
|
|
@@ -5,6 +5,8 @@ export interface KjunSliderMark {
|
|
|
5
5
|
}
|
|
6
6
|
export type SliderMarks = boolean | KjunSliderMark[];
|
|
7
7
|
export type SliderOrientation = "horizontal" | "vertical";
|
|
8
|
+
/** When the value shows on the thumb: "drag" while dragging or keyboard-focused, "always", or "off" (the caption only). */
|
|
9
|
+
export type SliderValueLabel = "off" | "drag" | "always";
|
|
8
10
|
/**
|
|
9
11
|
* Without formatValue the value follows the locale's number grouping with as many decimals as min and step use, so
|
|
10
12
|
* 0.5 steps read 1.0 · 1.5 and the text keeps its width while dragging. Formatters are cached per locale and precision.
|
|
@@ -16,12 +18,14 @@ export declare function sliderValueText(values: readonly number[], format: (valu
|
|
|
16
18
|
* marks={true} puts a dot on every step (up to 24 of them); an array places dots, and labels, at the given values.
|
|
17
19
|
* The rail's own ends need no dot, so marks at min and max keep only their labels.
|
|
18
20
|
*/
|
|
19
|
-
export declare function sliderMarks(marks: SliderMarks | undefined, min: number, max: number, step: number, values: readonly number[], layout?: SliderLayout): {
|
|
21
|
+
export declare function sliderMarks(marks: SliderMarks | undefined, min: number, max: number, step: number, values: readonly number[], layout?: SliderLayout, fillOrigin?: number): {
|
|
20
22
|
fraction: number;
|
|
21
23
|
/** Offset from the left (or the top when vertical), like the thumbs. */
|
|
22
24
|
position: number;
|
|
23
25
|
active: boolean;
|
|
24
26
|
dot: boolean;
|
|
27
|
+
/** The fill origin: drawn as a tick across the band instead of a dot. */
|
|
28
|
+
origin: boolean;
|
|
25
29
|
edge: "end" | "start" | undefined;
|
|
26
30
|
value: number;
|
|
27
31
|
/** Drawn beside the rail; leave it out for a dot only. Pressing a label moves the nearer thumb there. */
|
|
@@ -38,7 +42,7 @@ export declare function sliderAxis(fraction: number, { rtl, vertical }?: SliderL
|
|
|
38
42
|
* The fill as leading and trailing offsets (percent of the track, from the left/top and from the right/bottom). null is
|
|
39
43
|
* the rail's own end, half a thumb past the track: a single slider fills from there, a range between its thumbs.
|
|
40
44
|
*/
|
|
41
|
-
export declare function sliderFillBox(fractions: readonly number[], layout?: SliderLayout): {
|
|
45
|
+
export declare function sliderFillBox(fractions: readonly number[], layout?: SliderLayout, originFraction?: number): {
|
|
42
46
|
lead: number | null;
|
|
43
47
|
trail: number | null;
|
|
44
48
|
};
|
|
@@ -53,6 +57,15 @@ export declare function sliderValueAt(offset: number, length: number, min: numbe
|
|
|
53
57
|
}): number;
|
|
54
58
|
/** Where each thumb sits (0–1). Invalid settings keep the app's values in view, clamped to the given range when it has one. */
|
|
55
59
|
export declare function sliderFractions(values: readonly number[], min: number, max: number): number[];
|
|
60
|
+
/** The fill origin as a fraction of the rail, when it lies inside it; else the fill grows from min. */
|
|
61
|
+
export declare function sliderOriginFraction(fillOrigin: number | undefined, min: number, max: number): number | undefined;
|
|
62
|
+
/** The smallest distance range thumbs keep: minStepsBetweenThumbs steps, never negative. */
|
|
63
|
+
export declare function sliderGap(minStepsBetweenThumbs: number | undefined, step: number): number;
|
|
64
|
+
/**
|
|
65
|
+
* A range change that keeps the gap: the thumb that moved stops `gap` short of the other. Values that already break the
|
|
66
|
+
* gap (the app's own) are left as they are until a thumb moves.
|
|
67
|
+
*/
|
|
68
|
+
export declare function sliderKeepGap(previous: readonly number[], next: readonly number[], gap: number): number[];
|
|
56
69
|
/** Overlapping range thumbs: the one that can still move goes on top (the start thumb near the top end, the end thumb elsewhere). */
|
|
57
70
|
export declare function sliderFrontThumb(values: readonly number[], min: number, max: number): 0 | 1 | null;
|
|
58
71
|
/** The thumb a press moves: the nearer one, or with both on one value, the side of the press ("pending" when on the value itself). */
|
|
@@ -68,6 +81,8 @@ export interface SliderSessionOptions {
|
|
|
68
81
|
blocked(): boolean;
|
|
69
82
|
emit(values: number[]): void;
|
|
70
83
|
commit(values: number[]): void;
|
|
84
|
+
/** The distance range thumbs keep (sliderGap). */
|
|
85
|
+
gap?(): number;
|
|
71
86
|
/** Moves keyboard focus to the thumb a press or a direction choice picked. */
|
|
72
87
|
focus?(index: number): void;
|
|
73
88
|
}
|
|
@@ -5,6 +5,8 @@ export interface KjunSliderMark {
|
|
|
5
5
|
}
|
|
6
6
|
export type SliderMarks = boolean | KjunSliderMark[];
|
|
7
7
|
export type SliderOrientation = "horizontal" | "vertical";
|
|
8
|
+
/** When the value shows on the thumb: "drag" while dragging or keyboard-focused, "always", or "off" (the caption only). */
|
|
9
|
+
export type SliderValueLabel = "off" | "drag" | "always";
|
|
8
10
|
/**
|
|
9
11
|
* Without formatValue the value follows the locale's number grouping with as many decimals as min and step use, so
|
|
10
12
|
* 0.5 steps read 1.0 · 1.5 and the text keeps its width while dragging. Formatters are cached per locale and precision.
|
|
@@ -16,12 +18,14 @@ export declare function sliderValueText(values: readonly number[], format: (valu
|
|
|
16
18
|
* marks={true} puts a dot on every step (up to 24 of them); an array places dots, and labels, at the given values.
|
|
17
19
|
* The rail's own ends need no dot, so marks at min and max keep only their labels.
|
|
18
20
|
*/
|
|
19
|
-
export declare function sliderMarks(marks: SliderMarks | undefined, min: number, max: number, step: number, values: readonly number[], layout?: SliderLayout): {
|
|
21
|
+
export declare function sliderMarks(marks: SliderMarks | undefined, min: number, max: number, step: number, values: readonly number[], layout?: SliderLayout, fillOrigin?: number): {
|
|
20
22
|
fraction: number;
|
|
21
23
|
/** Offset from the left (or the top when vertical), like the thumbs. */
|
|
22
24
|
position: number;
|
|
23
25
|
active: boolean;
|
|
24
26
|
dot: boolean;
|
|
27
|
+
/** The fill origin: drawn as a tick across the band instead of a dot. */
|
|
28
|
+
origin: boolean;
|
|
25
29
|
edge: "end" | "start" | undefined;
|
|
26
30
|
value: number;
|
|
27
31
|
/** Drawn beside the rail; leave it out for a dot only. Pressing a label moves the nearer thumb there. */
|
|
@@ -38,7 +42,7 @@ export declare function sliderAxis(fraction: number, { rtl, vertical }?: SliderL
|
|
|
38
42
|
* The fill as leading and trailing offsets (percent of the track, from the left/top and from the right/bottom). null is
|
|
39
43
|
* the rail's own end, half a thumb past the track: a single slider fills from there, a range between its thumbs.
|
|
40
44
|
*/
|
|
41
|
-
export declare function sliderFillBox(fractions: readonly number[], layout?: SliderLayout): {
|
|
45
|
+
export declare function sliderFillBox(fractions: readonly number[], layout?: SliderLayout, originFraction?: number): {
|
|
42
46
|
lead: number | null;
|
|
43
47
|
trail: number | null;
|
|
44
48
|
};
|
|
@@ -53,6 +57,15 @@ export declare function sliderValueAt(offset: number, length: number, min: numbe
|
|
|
53
57
|
}): number;
|
|
54
58
|
/** Where each thumb sits (0–1). Invalid settings keep the app's values in view, clamped to the given range when it has one. */
|
|
55
59
|
export declare function sliderFractions(values: readonly number[], min: number, max: number): number[];
|
|
60
|
+
/** The fill origin as a fraction of the rail, when it lies inside it; else the fill grows from min. */
|
|
61
|
+
export declare function sliderOriginFraction(fillOrigin: number | undefined, min: number, max: number): number | undefined;
|
|
62
|
+
/** The smallest distance range thumbs keep: minStepsBetweenThumbs steps, never negative. */
|
|
63
|
+
export declare function sliderGap(minStepsBetweenThumbs: number | undefined, step: number): number;
|
|
64
|
+
/**
|
|
65
|
+
* A range change that keeps the gap: the thumb that moved stops `gap` short of the other. Values that already break the
|
|
66
|
+
* gap (the app's own) are left as they are until a thumb moves.
|
|
67
|
+
*/
|
|
68
|
+
export declare function sliderKeepGap(previous: readonly number[], next: readonly number[], gap: number): number[];
|
|
56
69
|
/** Overlapping range thumbs: the one that can still move goes on top (the start thumb near the top end, the end thumb elsewhere). */
|
|
57
70
|
export declare function sliderFrontThumb(values: readonly number[], min: number, max: number): 0 | 1 | null;
|
|
58
71
|
/** The thumb a press moves: the nearer one, or with both on one value, the side of the press ("pending" when on the value itself). */
|
|
@@ -68,6 +81,8 @@ export interface SliderSessionOptions {
|
|
|
68
81
|
blocked(): boolean;
|
|
69
82
|
emit(values: number[]): void;
|
|
70
83
|
commit(values: number[]): void;
|
|
84
|
+
/** The distance range thumbs keep (sliderGap). */
|
|
85
|
+
gap?(): number;
|
|
71
86
|
/** Moves keyboard focus to the thumb a press or a direction choice picked. */
|
|
72
87
|
focus?(index: number): void;
|
|
73
88
|
}
|
|
@@ -12,7 +12,7 @@ export interface SparkBar {
|
|
|
12
12
|
export interface SparklineGeometry {
|
|
13
13
|
/** Unbroken runs of finite values; a run of one value is drawn as a dot. */
|
|
14
14
|
segments: SparkPoint[][];
|
|
15
|
-
/** Closed area polygons ("x,y x,y …") under each run of two or more points. */
|
|
15
|
+
/** Closed area polygons ("x,y x,y …") under each run of two or more points; against a baseline, only on the side the series moved to. */
|
|
16
16
|
areas: string[];
|
|
17
17
|
end?: SparkPoint;
|
|
18
18
|
baselineY?: number;
|
|
@@ -35,13 +35,17 @@ export interface SparklineOptions {
|
|
|
35
35
|
max?: number;
|
|
36
36
|
endDot?: boolean;
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
/** A series in time order: null, undefined and non-finite numbers are gaps. */
|
|
39
|
+
export type SparklineData = readonly (number | null | undefined)[];
|
|
40
|
+
export declare function sparklineGeometry(data: SparklineData, options: SparklineOptions): SparklineGeometry;
|
|
40
41
|
export type SparklineTone = "text-tertiary" | "success" | "danger" | "price-up" | "price-down";
|
|
41
42
|
/** The color role for a direction: price up/down, or success/danger for status, and quiet when flat. */
|
|
42
43
|
export declare function sparklineTone(direction: -1 | 0 | 1, semantic?: "price" | "status"): SparklineTone;
|
|
43
44
|
/** The dash pattern for the empty line and the baseline. */
|
|
44
45
|
export declare const sparklineDash: () => string;
|
|
46
|
+
/** The accessible name: the app's description, and the no-data sentence when there is nothing to draw. */
|
|
47
|
+
export declare function sparklineLabel(ariaLabel: string | undefined, empty: boolean, noData: string): string | undefined;
|
|
48
|
+
/** One vertical range for every row of a column, so their sparklines compare on the same scale. */
|
|
45
49
|
export declare function sparklineRange(series: readonly unknown[], baselines?: readonly unknown[]): {
|
|
46
50
|
min?: number;
|
|
47
51
|
max?: number;
|
|
@@ -53,6 +57,6 @@ export interface SparklineColumn {
|
|
|
53
57
|
}
|
|
54
58
|
/** Sparkline props for one market row: its series, its reference value and (optionally) the column's shared range. */
|
|
55
59
|
export declare function sparklineCell<Row extends object>(rows: readonly Row[], row: Row, column: SparklineColumn, read: (row: Row, key: string) => unknown): {
|
|
56
|
-
data:
|
|
60
|
+
data: SparklineData;
|
|
57
61
|
baseline: number | undefined;
|
|
58
62
|
};
|
|
@@ -12,7 +12,7 @@ export interface SparkBar {
|
|
|
12
12
|
export interface SparklineGeometry {
|
|
13
13
|
/** Unbroken runs of finite values; a run of one value is drawn as a dot. */
|
|
14
14
|
segments: SparkPoint[][];
|
|
15
|
-
/** Closed area polygons ("x,y x,y …") under each run of two or more points. */
|
|
15
|
+
/** Closed area polygons ("x,y x,y …") under each run of two or more points; against a baseline, only on the side the series moved to. */
|
|
16
16
|
areas: string[];
|
|
17
17
|
end?: SparkPoint;
|
|
18
18
|
baselineY?: number;
|
|
@@ -35,13 +35,17 @@ export interface SparklineOptions {
|
|
|
35
35
|
max?: number;
|
|
36
36
|
endDot?: boolean;
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
/** A series in time order: null, undefined and non-finite numbers are gaps. */
|
|
39
|
+
export type SparklineData = readonly (number | null | undefined)[];
|
|
40
|
+
export declare function sparklineGeometry(data: SparklineData, options: SparklineOptions): SparklineGeometry;
|
|
40
41
|
export type SparklineTone = "text-tertiary" | "success" | "danger" | "price-up" | "price-down";
|
|
41
42
|
/** The color role for a direction: price up/down, or success/danger for status, and quiet when flat. */
|
|
42
43
|
export declare function sparklineTone(direction: -1 | 0 | 1, semantic?: "price" | "status"): SparklineTone;
|
|
43
44
|
/** The dash pattern for the empty line and the baseline. */
|
|
44
45
|
export declare const sparklineDash: () => string;
|
|
46
|
+
/** The accessible name: the app's description, and the no-data sentence when there is nothing to draw. */
|
|
47
|
+
export declare function sparklineLabel(ariaLabel: string | undefined, empty: boolean, noData: string): string | undefined;
|
|
48
|
+
/** One vertical range for every row of a column, so their sparklines compare on the same scale. */
|
|
45
49
|
export declare function sparklineRange(series: readonly unknown[], baselines?: readonly unknown[]): {
|
|
46
50
|
min?: number;
|
|
47
51
|
max?: number;
|
|
@@ -53,6 +57,6 @@ export interface SparklineColumn {
|
|
|
53
57
|
}
|
|
54
58
|
/** Sparkline props for one market row: its series, its reference value and (optionally) the column's shared range. */
|
|
55
59
|
export declare function sparklineCell<Row extends object>(rows: readonly Row[], row: Row, column: SparklineColumn, read: (row: Row, key: string) => unknown): {
|
|
56
|
-
data:
|
|
60
|
+
data: SparklineData;
|
|
57
61
|
baseline: number | undefined;
|
|
58
62
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { tokens } from "@kjun-ui/tokens";
|
|
2
|
+
export type SpinnerSize = keyof typeof tokens.extensions.spinner.sizes;
|
|
3
|
+
export declare const spinnerCircle: {
|
|
4
|
+
readonly cx: 12;
|
|
5
|
+
readonly cy: 12;
|
|
6
|
+
readonly r: 10;
|
|
7
|
+
};
|
|
8
|
+
export declare const spinnerArc = "M22 12A10 10 0 0 0 12 2";
|
|
9
|
+
/** Stroke in the 24-unit viewBox for a glyph drawn at `size` pixels; `strokePx` overrides the ratio. */
|
|
10
|
+
export declare function spinnerStroke(size: number, strokePx?: number): number;
|
|
11
|
+
/** Stroke for a named spinner size, from the size table. */
|
|
12
|
+
export declare function spinnerSizeStroke(size: SpinnerSize): number;
|
|
13
|
+
/** Large spinners put their text below the ring; the small ones keep it beside. */
|
|
14
|
+
export declare function spinnerStacked(size: SpinnerSize): size is "lg" | "xl";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { tokens } from "@kjun-ui/tokens";
|
|
2
|
+
export type SpinnerSize = keyof typeof tokens.extensions.spinner.sizes;
|
|
3
|
+
export declare const spinnerCircle: {
|
|
4
|
+
readonly cx: 12;
|
|
5
|
+
readonly cy: 12;
|
|
6
|
+
readonly r: 10;
|
|
7
|
+
};
|
|
8
|
+
export declare const spinnerArc = "M22 12A10 10 0 0 0 12 2";
|
|
9
|
+
/** Stroke in the 24-unit viewBox for a glyph drawn at `size` pixels; `strokePx` overrides the ratio. */
|
|
10
|
+
export declare function spinnerStroke(size: number, strokePx?: number): number;
|
|
11
|
+
/** Stroke for a named spinner size, from the size table. */
|
|
12
|
+
export declare function spinnerSizeStroke(size: SpinnerSize): number;
|
|
13
|
+
/** Large spinners put their text below the ring; the small ones keep it beside. */
|
|
14
|
+
export declare function spinnerStacked(size: SpinnerSize): size is "lg" | "xl";
|