@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,168 @@
|
|
|
1
|
+
export interface GaugeZone {
|
|
2
|
+
/** Where the zone ends on the axis; it starts where the previous zone ended (or at min). */
|
|
3
|
+
to: number;
|
|
4
|
+
label?: string;
|
|
5
|
+
/** The app's colour for this zone; without one the zone takes the neutral track colour. */
|
|
6
|
+
color?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface GaugeSegment {
|
|
9
|
+
from: number;
|
|
10
|
+
to: number;
|
|
11
|
+
share: number;
|
|
12
|
+
label?: string;
|
|
13
|
+
color?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface StackedItem {
|
|
16
|
+
key?: string;
|
|
17
|
+
label: string;
|
|
18
|
+
/** null, undefined and non-finite numbers are missing; negative numbers count as zero. */
|
|
19
|
+
value: number | null | undefined;
|
|
20
|
+
/** The app's colour for this part; without one it takes the neutral track colour. */
|
|
21
|
+
color?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface StackedLegendEntry {
|
|
24
|
+
label: string;
|
|
25
|
+
value: string;
|
|
26
|
+
percent: string;
|
|
27
|
+
present: boolean;
|
|
28
|
+
drawn: boolean;
|
|
29
|
+
}
|
|
30
|
+
export type StackedState = "missing" | "empty" | "ready";
|
|
31
|
+
/** Locale grouping with up to two decimals; never prints -0. Formatters are cached per locale. */
|
|
32
|
+
export declare function distributionNumber(value: number, locale?: string): string;
|
|
33
|
+
/** The marker's place as a percentage of the axis; values past an end stay on that end. */
|
|
34
|
+
export declare function gaugePosition(value: number, min: number, max: number): number;
|
|
35
|
+
/**
|
|
36
|
+
* Zones as drawn: ordered by their end, clipped to the axis, each sized by its span. A zone that ends at or before the
|
|
37
|
+
* previous one is dropped, and an axis the zones do not reach ends in an unnamed neutral segment.
|
|
38
|
+
*/
|
|
39
|
+
export declare function gaugeSegments(zones: readonly GaugeZone[], min: number, max: number): GaugeSegment[];
|
|
40
|
+
/** The segment a value falls in: a boundary belongs to the upper zone, and values past an end to the nearest. */
|
|
41
|
+
export declare function gaugeZoneIndex(value: number, segments: readonly GaugeSegment[]): number;
|
|
42
|
+
export interface GaugeBoundary {
|
|
43
|
+
/** The share of the axis (0–1) before the boundary. */
|
|
44
|
+
cut: number;
|
|
45
|
+
/** How many gaps come before the boundary's own. */
|
|
46
|
+
gaps: number;
|
|
47
|
+
}
|
|
48
|
+
/** The zone boundaries on each side of a marker at `position` (0–100): the last at or before it and the first after it. */
|
|
49
|
+
export declare function gaugeNeighbours(position: number, segments: readonly GaugeSegment[]): {
|
|
50
|
+
before?: GaugeBoundary;
|
|
51
|
+
after?: GaugeBoundary;
|
|
52
|
+
};
|
|
53
|
+
export interface GaugeGeometry {
|
|
54
|
+
segmentGap: number;
|
|
55
|
+
markerWidth: number;
|
|
56
|
+
markerRing: number;
|
|
57
|
+
minSliver: number;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The sliver of a zone left between a boundary and the marker's ring, in the axis's own length units: where it starts
|
|
61
|
+
* and how long it is. null unless it is thinner than the minimum, which is when it is covered.
|
|
62
|
+
*/
|
|
63
|
+
export declare function gaugeSliver(width: number, position: number, count: number, boundary: GaugeBoundary | undefined, side: "before" | "after", geometry: GaugeGeometry): {
|
|
64
|
+
start: number;
|
|
65
|
+
size: number;
|
|
66
|
+
} | null;
|
|
67
|
+
/**
|
|
68
|
+
* The gap the track leaves around the marker, in the axis's own length units: the marker and its ring on each side,
|
|
69
|
+
* widened over a sliver too thin to read. The background shows through it, whatever it is.
|
|
70
|
+
*/
|
|
71
|
+
export declare function gaugeHole(width: number, position: number, count: number, near: {
|
|
72
|
+
before?: GaugeBoundary;
|
|
73
|
+
after?: GaugeBoundary;
|
|
74
|
+
}, geometry: GaugeGeometry): {
|
|
75
|
+
start: number;
|
|
76
|
+
end: number;
|
|
77
|
+
};
|
|
78
|
+
export interface GaugePiece {
|
|
79
|
+
start: number;
|
|
80
|
+
size: number;
|
|
81
|
+
first: boolean;
|
|
82
|
+
last: boolean;
|
|
83
|
+
color?: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The zones as drawn pieces for a renderer without masks (Native): each zone's span on a measured axis, less the hole
|
|
87
|
+
* around the marker. `first` and `last` mark the axis's own rounded ends.
|
|
88
|
+
*/
|
|
89
|
+
export declare function gaugePieces(width: number, segments: readonly GaugeSegment[], gap: number, hole?: {
|
|
90
|
+
start: number;
|
|
91
|
+
end: number;
|
|
92
|
+
}): GaugePiece[];
|
|
93
|
+
/** The CSS variables the web axis reads for its marker and hole: the position, the zone count and the neighbouring boundaries. */
|
|
94
|
+
export declare function gaugeAxisVars(position: number, count: number, near: {
|
|
95
|
+
before?: GaugeBoundary;
|
|
96
|
+
after?: GaugeBoundary;
|
|
97
|
+
}): Record<string, string>;
|
|
98
|
+
export declare function gaugeSpoken(label: string | undefined, valueText: string, zoneLabel?: string): string;
|
|
99
|
+
/** missing: nothing to show; empty: real values that add up to nothing; ready: at least one part to draw. */
|
|
100
|
+
export declare function stackedState(items: readonly StackedItem[] | null | undefined): StackedState;
|
|
101
|
+
/**
|
|
102
|
+
* Each item's exact percentage of the whole (0 for a part that is not drawn): the segment lengths. Amounts are scaled
|
|
103
|
+
* by the largest first, so counts too large to add up still share out, and fractions fill the whole bar.
|
|
104
|
+
*/
|
|
105
|
+
export declare function stackedWeights(items: readonly StackedItem[]): number[];
|
|
106
|
+
/**
|
|
107
|
+
* Whole percents that add up to 100 (or are all 0 for an empty total). The leftover points go by largest remainder to
|
|
108
|
+
* the parts that already reach 1%: a part under 1% stays at 0 and reads "<1%", so equal small parts never read differently.
|
|
109
|
+
*/
|
|
110
|
+
export declare function stackedShares(items: readonly StackedItem[]): number[];
|
|
111
|
+
/** One entry per item, in order: the legend's text, and whether the bar draws a segment for it. A drawn part never reads as 0%. */
|
|
112
|
+
export declare function stackedLegend(items: readonly StackedItem[], formatValue: ((value: number) => string) | undefined, locale: string | undefined, missingText: string): StackedLegendEntry[];
|
|
113
|
+
export declare function stackedSpoken(label: string | undefined, legend: readonly StackedLegendEntry[]): string;
|
|
114
|
+
export interface GaugeInput {
|
|
115
|
+
value: number | null | undefined;
|
|
116
|
+
min: number;
|
|
117
|
+
max: number;
|
|
118
|
+
zones: readonly GaugeZone[];
|
|
119
|
+
label?: string;
|
|
120
|
+
ariaLabel?: string;
|
|
121
|
+
formatValue?: (value: number) => string;
|
|
122
|
+
missingText?: string;
|
|
123
|
+
/** The sentence read for a missing value when there is no missingText. */
|
|
124
|
+
noData: string;
|
|
125
|
+
locale?: string;
|
|
126
|
+
}
|
|
127
|
+
/** Everything a gauge draws and says, worked out once for React, Vue and Native. */
|
|
128
|
+
export declare function gaugeModel(input: GaugeInput): {
|
|
129
|
+
segments: GaugeSegment[];
|
|
130
|
+
ready: boolean;
|
|
131
|
+
zone: GaugeSegment | undefined;
|
|
132
|
+
position: number;
|
|
133
|
+
/** The caption's end: the value and the zone it falls in. */
|
|
134
|
+
caption: string;
|
|
135
|
+
/** The zone boundaries beside the marker, for the hole around it; none without a value. */
|
|
136
|
+
near: ReturnType<typeof gaugeNeighbours>;
|
|
137
|
+
/** One image for screen readers: the name, the value and the zone it falls in. */
|
|
138
|
+
spoken: string;
|
|
139
|
+
};
|
|
140
|
+
export interface StackedInput {
|
|
141
|
+
items: readonly StackedItem[] | null | undefined;
|
|
142
|
+
label?: string;
|
|
143
|
+
ariaLabel?: string;
|
|
144
|
+
/** The app's summary at the end of the caption line (a total, a verdict); read after the name. */
|
|
145
|
+
valueText?: string;
|
|
146
|
+
formatValue?: (value: number) => string;
|
|
147
|
+
missingText?: string;
|
|
148
|
+
noData: string;
|
|
149
|
+
locale?: string;
|
|
150
|
+
}
|
|
151
|
+
/** Everything a stacked bar draws and says, worked out once for React, Vue and Native. */
|
|
152
|
+
export declare function stackedModel(input: StackedInput): {
|
|
153
|
+
state: StackedState;
|
|
154
|
+
missing: boolean;
|
|
155
|
+
mark: string;
|
|
156
|
+
/** The caption's end: the missing mark, or else the app's summary. */
|
|
157
|
+
caption: string | undefined;
|
|
158
|
+
/** One per item, in order: its key, its length on the bar (when drawn) and its legend line. */
|
|
159
|
+
parts: {
|
|
160
|
+
item: StackedItem;
|
|
161
|
+
key: string;
|
|
162
|
+
weight: number;
|
|
163
|
+
drawn: boolean;
|
|
164
|
+
text: string;
|
|
165
|
+
}[];
|
|
166
|
+
/** One image for screen readers: the name, then each part with its value and share. */
|
|
167
|
+
spoken: string;
|
|
168
|
+
};
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
export interface GaugeZone {
|
|
2
|
+
/** Where the zone ends on the axis; it starts where the previous zone ended (or at min). */
|
|
3
|
+
to: number;
|
|
4
|
+
label?: string;
|
|
5
|
+
/** The app's colour for this zone; without one the zone takes the neutral track colour. */
|
|
6
|
+
color?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface GaugeSegment {
|
|
9
|
+
from: number;
|
|
10
|
+
to: number;
|
|
11
|
+
share: number;
|
|
12
|
+
label?: string;
|
|
13
|
+
color?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface StackedItem {
|
|
16
|
+
key?: string;
|
|
17
|
+
label: string;
|
|
18
|
+
/** null, undefined and non-finite numbers are missing; negative numbers count as zero. */
|
|
19
|
+
value: number | null | undefined;
|
|
20
|
+
/** The app's colour for this part; without one it takes the neutral track colour. */
|
|
21
|
+
color?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface StackedLegendEntry {
|
|
24
|
+
label: string;
|
|
25
|
+
value: string;
|
|
26
|
+
percent: string;
|
|
27
|
+
present: boolean;
|
|
28
|
+
drawn: boolean;
|
|
29
|
+
}
|
|
30
|
+
export type StackedState = "missing" | "empty" | "ready";
|
|
31
|
+
/** Locale grouping with up to two decimals; never prints -0. Formatters are cached per locale. */
|
|
32
|
+
export declare function distributionNumber(value: number, locale?: string): string;
|
|
33
|
+
/** The marker's place as a percentage of the axis; values past an end stay on that end. */
|
|
34
|
+
export declare function gaugePosition(value: number, min: number, max: number): number;
|
|
35
|
+
/**
|
|
36
|
+
* Zones as drawn: ordered by their end, clipped to the axis, each sized by its span. A zone that ends at or before the
|
|
37
|
+
* previous one is dropped, and an axis the zones do not reach ends in an unnamed neutral segment.
|
|
38
|
+
*/
|
|
39
|
+
export declare function gaugeSegments(zones: readonly GaugeZone[], min: number, max: number): GaugeSegment[];
|
|
40
|
+
/** The segment a value falls in: a boundary belongs to the upper zone, and values past an end to the nearest. */
|
|
41
|
+
export declare function gaugeZoneIndex(value: number, segments: readonly GaugeSegment[]): number;
|
|
42
|
+
export interface GaugeBoundary {
|
|
43
|
+
/** The share of the axis (0–1) before the boundary. */
|
|
44
|
+
cut: number;
|
|
45
|
+
/** How many gaps come before the boundary's own. */
|
|
46
|
+
gaps: number;
|
|
47
|
+
}
|
|
48
|
+
/** The zone boundaries on each side of a marker at `position` (0–100): the last at or before it and the first after it. */
|
|
49
|
+
export declare function gaugeNeighbours(position: number, segments: readonly GaugeSegment[]): {
|
|
50
|
+
before?: GaugeBoundary;
|
|
51
|
+
after?: GaugeBoundary;
|
|
52
|
+
};
|
|
53
|
+
export interface GaugeGeometry {
|
|
54
|
+
segmentGap: number;
|
|
55
|
+
markerWidth: number;
|
|
56
|
+
markerRing: number;
|
|
57
|
+
minSliver: number;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The sliver of a zone left between a boundary and the marker's ring, in the axis's own length units: where it starts
|
|
61
|
+
* and how long it is. null unless it is thinner than the minimum, which is when it is covered.
|
|
62
|
+
*/
|
|
63
|
+
export declare function gaugeSliver(width: number, position: number, count: number, boundary: GaugeBoundary | undefined, side: "before" | "after", geometry: GaugeGeometry): {
|
|
64
|
+
start: number;
|
|
65
|
+
size: number;
|
|
66
|
+
} | null;
|
|
67
|
+
/**
|
|
68
|
+
* The gap the track leaves around the marker, in the axis's own length units: the marker and its ring on each side,
|
|
69
|
+
* widened over a sliver too thin to read. The background shows through it, whatever it is.
|
|
70
|
+
*/
|
|
71
|
+
export declare function gaugeHole(width: number, position: number, count: number, near: {
|
|
72
|
+
before?: GaugeBoundary;
|
|
73
|
+
after?: GaugeBoundary;
|
|
74
|
+
}, geometry: GaugeGeometry): {
|
|
75
|
+
start: number;
|
|
76
|
+
end: number;
|
|
77
|
+
};
|
|
78
|
+
export interface GaugePiece {
|
|
79
|
+
start: number;
|
|
80
|
+
size: number;
|
|
81
|
+
first: boolean;
|
|
82
|
+
last: boolean;
|
|
83
|
+
color?: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The zones as drawn pieces for a renderer without masks (Native): each zone's span on a measured axis, less the hole
|
|
87
|
+
* around the marker. `first` and `last` mark the axis's own rounded ends.
|
|
88
|
+
*/
|
|
89
|
+
export declare function gaugePieces(width: number, segments: readonly GaugeSegment[], gap: number, hole?: {
|
|
90
|
+
start: number;
|
|
91
|
+
end: number;
|
|
92
|
+
}): GaugePiece[];
|
|
93
|
+
/** The CSS variables the web axis reads for its marker and hole: the position, the zone count and the neighbouring boundaries. */
|
|
94
|
+
export declare function gaugeAxisVars(position: number, count: number, near: {
|
|
95
|
+
before?: GaugeBoundary;
|
|
96
|
+
after?: GaugeBoundary;
|
|
97
|
+
}): Record<string, string>;
|
|
98
|
+
export declare function gaugeSpoken(label: string | undefined, valueText: string, zoneLabel?: string): string;
|
|
99
|
+
/** missing: nothing to show; empty: real values that add up to nothing; ready: at least one part to draw. */
|
|
100
|
+
export declare function stackedState(items: readonly StackedItem[] | null | undefined): StackedState;
|
|
101
|
+
/**
|
|
102
|
+
* Each item's exact percentage of the whole (0 for a part that is not drawn): the segment lengths. Amounts are scaled
|
|
103
|
+
* by the largest first, so counts too large to add up still share out, and fractions fill the whole bar.
|
|
104
|
+
*/
|
|
105
|
+
export declare function stackedWeights(items: readonly StackedItem[]): number[];
|
|
106
|
+
/**
|
|
107
|
+
* Whole percents that add up to 100 (or are all 0 for an empty total). The leftover points go by largest remainder to
|
|
108
|
+
* the parts that already reach 1%: a part under 1% stays at 0 and reads "<1%", so equal small parts never read differently.
|
|
109
|
+
*/
|
|
110
|
+
export declare function stackedShares(items: readonly StackedItem[]): number[];
|
|
111
|
+
/** One entry per item, in order: the legend's text, and whether the bar draws a segment for it. A drawn part never reads as 0%. */
|
|
112
|
+
export declare function stackedLegend(items: readonly StackedItem[], formatValue: ((value: number) => string) | undefined, locale: string | undefined, missingText: string): StackedLegendEntry[];
|
|
113
|
+
export declare function stackedSpoken(label: string | undefined, legend: readonly StackedLegendEntry[]): string;
|
|
114
|
+
export interface GaugeInput {
|
|
115
|
+
value: number | null | undefined;
|
|
116
|
+
min: number;
|
|
117
|
+
max: number;
|
|
118
|
+
zones: readonly GaugeZone[];
|
|
119
|
+
label?: string;
|
|
120
|
+
ariaLabel?: string;
|
|
121
|
+
formatValue?: (value: number) => string;
|
|
122
|
+
missingText?: string;
|
|
123
|
+
/** The sentence read for a missing value when there is no missingText. */
|
|
124
|
+
noData: string;
|
|
125
|
+
locale?: string;
|
|
126
|
+
}
|
|
127
|
+
/** Everything a gauge draws and says, worked out once for React, Vue and Native. */
|
|
128
|
+
export declare function gaugeModel(input: GaugeInput): {
|
|
129
|
+
segments: GaugeSegment[];
|
|
130
|
+
ready: boolean;
|
|
131
|
+
zone: GaugeSegment | undefined;
|
|
132
|
+
position: number;
|
|
133
|
+
/** The caption's end: the value and the zone it falls in. */
|
|
134
|
+
caption: string;
|
|
135
|
+
/** The zone boundaries beside the marker, for the hole around it; none without a value. */
|
|
136
|
+
near: ReturnType<typeof gaugeNeighbours>;
|
|
137
|
+
/** One image for screen readers: the name, the value and the zone it falls in. */
|
|
138
|
+
spoken: string;
|
|
139
|
+
};
|
|
140
|
+
export interface StackedInput {
|
|
141
|
+
items: readonly StackedItem[] | null | undefined;
|
|
142
|
+
label?: string;
|
|
143
|
+
ariaLabel?: string;
|
|
144
|
+
/** The app's summary at the end of the caption line (a total, a verdict); read after the name. */
|
|
145
|
+
valueText?: string;
|
|
146
|
+
formatValue?: (value: number) => string;
|
|
147
|
+
missingText?: string;
|
|
148
|
+
noData: string;
|
|
149
|
+
locale?: string;
|
|
150
|
+
}
|
|
151
|
+
/** Everything a stacked bar draws and says, worked out once for React, Vue and Native. */
|
|
152
|
+
export declare function stackedModel(input: StackedInput): {
|
|
153
|
+
state: StackedState;
|
|
154
|
+
missing: boolean;
|
|
155
|
+
mark: string;
|
|
156
|
+
/** The caption's end: the missing mark, or else the app's summary. */
|
|
157
|
+
caption: string | undefined;
|
|
158
|
+
/** One per item, in order: its key, its length on the bar (when drawn) and its legend line. */
|
|
159
|
+
parts: {
|
|
160
|
+
item: StackedItem;
|
|
161
|
+
key: string;
|
|
162
|
+
weight: number;
|
|
163
|
+
drawn: boolean;
|
|
164
|
+
text: string;
|
|
165
|
+
}[];
|
|
166
|
+
/** One image for screen readers: the name, then each part with its value and share. */
|
|
167
|
+
spoken: string;
|
|
168
|
+
};
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/** The web close button: a 32px square with its own radius. Inline, because the button sets its size and radius inline. */
|
|
2
|
+
export declare const drawerCloseStyle: {
|
|
3
|
+
borderRadius: 8;
|
|
4
|
+
width: 32;
|
|
5
|
+
height: 32;
|
|
6
|
+
padding: number;
|
|
7
|
+
};
|
|
1
8
|
export type DrawerPosition = "left" | "right" | "top" | "bottom";
|
|
2
9
|
export interface DrawerFrameInput {
|
|
3
10
|
position: DrawerPosition;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/** The web close button: a 32px square with its own radius. Inline, because the button sets its size and radius inline. */
|
|
2
|
+
export declare const drawerCloseStyle: {
|
|
3
|
+
borderRadius: 8;
|
|
4
|
+
width: 32;
|
|
5
|
+
height: 32;
|
|
6
|
+
padding: number;
|
|
7
|
+
};
|
|
1
8
|
export type DrawerPosition = "left" | "right" | "top" | "bottom";
|
|
2
9
|
export interface DrawerFrameInput {
|
|
3
10
|
position: DrawerPosition;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type EmptySize = "sm" | "md";
|
|
2
|
+
/** KjunEmpty's per-size geometry. The icon stroke is in the 24-unit viewBox, so every size paints iconStroke px. */
|
|
3
|
+
export declare function emptyGeometry(size: EmptySize): {
|
|
4
|
+
iconSize: 24 | 32;
|
|
5
|
+
iconStroke: number;
|
|
6
|
+
iconGap: 16 | 12;
|
|
7
|
+
titleSize: 16 | 14;
|
|
8
|
+
titleLineHeight: 20 | 24;
|
|
9
|
+
paddingY: 24 | 32;
|
|
10
|
+
actionGap: 20 | 16;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Vertical padding, by who owns the space: a list section keeps the empty note one row tall,
|
|
14
|
+
* a data state supplies its own size padding, and only a free-standing empty uses its size.
|
|
15
|
+
*/
|
|
16
|
+
export declare function emptyPaddingY(size: EmptySize, owner: {
|
|
17
|
+
list: false | "default" | "compact";
|
|
18
|
+
state: boolean;
|
|
19
|
+
}): 0 | 12 | 24 | 32;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type EmptySize = "sm" | "md";
|
|
2
|
+
/** KjunEmpty's per-size geometry. The icon stroke is in the 24-unit viewBox, so every size paints iconStroke px. */
|
|
3
|
+
export declare function emptyGeometry(size: EmptySize): {
|
|
4
|
+
iconSize: 24 | 32;
|
|
5
|
+
iconStroke: number;
|
|
6
|
+
iconGap: 16 | 12;
|
|
7
|
+
titleSize: 16 | 14;
|
|
8
|
+
titleLineHeight: 20 | 24;
|
|
9
|
+
paddingY: 24 | 32;
|
|
10
|
+
actionGap: 20 | 16;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Vertical padding, by who owns the space: a list section keeps the empty note one row tall,
|
|
14
|
+
* a data state supplies its own size padding, and only a free-standing empty uses its size.
|
|
15
|
+
*/
|
|
16
|
+
export declare function emptyPaddingY(size: EmptySize, owner: {
|
|
17
|
+
list: false | "default" | "compact";
|
|
18
|
+
state: boolean;
|
|
19
|
+
}): 0 | 12 | 24 | 32;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { CalendarDay, WeekStart } from "./calendar.cjs";
|
|
2
|
+
import type { KjunMessageScope } from "./messages/index.cjs";
|
|
3
|
+
/** A bar over consecutive days; the colour is whatever the app passes. */
|
|
4
|
+
export interface DaySpan<C = string> {
|
|
5
|
+
color: C;
|
|
6
|
+
start: string;
|
|
7
|
+
end: string;
|
|
8
|
+
}
|
|
9
|
+
export interface DayMarks<C = string> {
|
|
10
|
+
spans?: readonly DaySpan<C>[];
|
|
11
|
+
icon?: {
|
|
12
|
+
name: string;
|
|
13
|
+
color: C;
|
|
14
|
+
};
|
|
15
|
+
dots?: readonly C[];
|
|
16
|
+
count?: number;
|
|
17
|
+
}
|
|
18
|
+
/** A holiday rule: true marks the day, a string marks it and names it. */
|
|
19
|
+
export type HolidayTest = (iso: string) => string | boolean;
|
|
20
|
+
/** The app's "YYYY-MM-DD" today (server time, another time zone); missing or malformed reads as the device's today. */
|
|
21
|
+
export declare const resolveToday: (today?: string) => string;
|
|
22
|
+
/** "YYYY-MM"; a malformed value reads as the month of today. */
|
|
23
|
+
export declare const resolveMonth: (month: string | undefined, today?: string) => string;
|
|
24
|
+
/** The first day of the week holding the given day (today's week when malformed). */
|
|
25
|
+
export declare function resolveWeek(week: string | undefined, weekStart?: WeekStart, today?: string): string;
|
|
26
|
+
export declare const stepMonth: (month: string, delta: number) => string;
|
|
27
|
+
/** Seven days from the week's first day; none is outside the month. */
|
|
28
|
+
export declare const weekDays: (weekStartIso: string, today?: string) => CalendarDay[];
|
|
29
|
+
/** Whether a day belongs to the period shown (outside days of a month do not). */
|
|
30
|
+
export declare const withinPeriod: (iso: string, key: string) => boolean;
|
|
31
|
+
/** The days drawn for a period: six fixed weeks for a month, seven days for a week. */
|
|
32
|
+
export declare function periodDays(key: string, today: string, weekStart: WeekStart): CalendarDay[];
|
|
33
|
+
/** The grid's name: the month ("2026년 11월"), or a week's first and last day ("2026년 11월 16일 – 22일"). */
|
|
34
|
+
export declare function periodTitle(key: string, scope?: KjunMessageScope): string;
|
|
35
|
+
/**
|
|
36
|
+
* Helpers for the app's own title row and buttons: the calendar draws neither.
|
|
37
|
+
* key is "YYYY-MM" for a month, or any day "YYYY-MM-DD" of a week.
|
|
38
|
+
*/
|
|
39
|
+
export declare const kjunCalendarPeriod: {
|
|
40
|
+
/** The month ("YYYY-MM") or the week's first day ("YYYY-MM-DD") delta periods away. */
|
|
41
|
+
step(view: "month" | "week", key: string, delta: number, weekStart?: WeekStart): string;
|
|
42
|
+
/** The period's name as the grid reads it: "2026년 11월", or "2026년 11월 29일 – 12월 5일" for a week. locale follows KjunProvider's. */
|
|
43
|
+
title(view: "month" | "week", key: string, options?: {
|
|
44
|
+
locale?: string;
|
|
45
|
+
weekStart?: WeekStart;
|
|
46
|
+
}): string;
|
|
47
|
+
};
|
|
48
|
+
/** What a span draws on one day: null outside it; rounded at the span's ends and at the week's edges (column 0 and 6). */
|
|
49
|
+
export declare function spanSegment(span: DaySpan<unknown>, iso: string, column: number): {
|
|
50
|
+
start: boolean;
|
|
51
|
+
end: boolean;
|
|
52
|
+
} | null;
|
|
53
|
+
export declare const visibleDots: <C>(dots: readonly C[] | undefined) => C[];
|
|
54
|
+
/** The month step of a horizontal swipe: left is next (+1), right is previous (-1). */
|
|
55
|
+
export declare const swipeStep: (dx: number, dy: number) => -1 | 0 | 1;
|
|
56
|
+
/** The colour role of a day's number: holidays and Sundays danger, Saturdays info. */
|
|
57
|
+
export declare function dayTone(weekday: number, { markSunday, markSaturday, holiday }: {
|
|
58
|
+
markSunday: boolean;
|
|
59
|
+
markSaturday: boolean;
|
|
60
|
+
holiday: boolean;
|
|
61
|
+
}): "danger" | "info" | "text";
|
|
62
|
+
export declare function holidayOf(test: HolidayTest | undefined, iso: string, scope?: KjunMessageScope): {
|
|
63
|
+
holiday: boolean;
|
|
64
|
+
name?: string;
|
|
65
|
+
};
|
|
66
|
+
export declare const isPast: (iso: string, today: string) => boolean;
|
|
67
|
+
/** A spoken name for an event day: the date, then "today", the holiday name and the event count when present. */
|
|
68
|
+
export declare function eventDayLabel(iso: string, { holiday, count, today }: {
|
|
69
|
+
holiday?: string;
|
|
70
|
+
count?: number;
|
|
71
|
+
today?: boolean;
|
|
72
|
+
}, scope?: KjunMessageScope): string;
|
|
73
|
+
/** The month slide: the old month leaves, then the newest requested one enters. */
|
|
74
|
+
export interface SlideState {
|
|
75
|
+
shown: string;
|
|
76
|
+
pending: string | null;
|
|
77
|
+
phase: "idle" | "out" | "in";
|
|
78
|
+
direction: -1 | 1;
|
|
79
|
+
}
|
|
80
|
+
export declare function slideStart(state: SlideState, next: string): SlideState;
|
|
81
|
+
export declare function slideNext(state: SlideState): SlideState;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { CalendarDay, WeekStart } from "./calendar.js";
|
|
2
|
+
import type { KjunMessageScope } from "./messages/index.js";
|
|
3
|
+
/** A bar over consecutive days; the colour is whatever the app passes. */
|
|
4
|
+
export interface DaySpan<C = string> {
|
|
5
|
+
color: C;
|
|
6
|
+
start: string;
|
|
7
|
+
end: string;
|
|
8
|
+
}
|
|
9
|
+
export interface DayMarks<C = string> {
|
|
10
|
+
spans?: readonly DaySpan<C>[];
|
|
11
|
+
icon?: {
|
|
12
|
+
name: string;
|
|
13
|
+
color: C;
|
|
14
|
+
};
|
|
15
|
+
dots?: readonly C[];
|
|
16
|
+
count?: number;
|
|
17
|
+
}
|
|
18
|
+
/** A holiday rule: true marks the day, a string marks it and names it. */
|
|
19
|
+
export type HolidayTest = (iso: string) => string | boolean;
|
|
20
|
+
/** The app's "YYYY-MM-DD" today (server time, another time zone); missing or malformed reads as the device's today. */
|
|
21
|
+
export declare const resolveToday: (today?: string) => string;
|
|
22
|
+
/** "YYYY-MM"; a malformed value reads as the month of today. */
|
|
23
|
+
export declare const resolveMonth: (month: string | undefined, today?: string) => string;
|
|
24
|
+
/** The first day of the week holding the given day (today's week when malformed). */
|
|
25
|
+
export declare function resolveWeek(week: string | undefined, weekStart?: WeekStart, today?: string): string;
|
|
26
|
+
export declare const stepMonth: (month: string, delta: number) => string;
|
|
27
|
+
/** Seven days from the week's first day; none is outside the month. */
|
|
28
|
+
export declare const weekDays: (weekStartIso: string, today?: string) => CalendarDay[];
|
|
29
|
+
/** Whether a day belongs to the period shown (outside days of a month do not). */
|
|
30
|
+
export declare const withinPeriod: (iso: string, key: string) => boolean;
|
|
31
|
+
/** The days drawn for a period: six fixed weeks for a month, seven days for a week. */
|
|
32
|
+
export declare function periodDays(key: string, today: string, weekStart: WeekStart): CalendarDay[];
|
|
33
|
+
/** The grid's name: the month ("2026년 11월"), or a week's first and last day ("2026년 11월 16일 – 22일"). */
|
|
34
|
+
export declare function periodTitle(key: string, scope?: KjunMessageScope): string;
|
|
35
|
+
/**
|
|
36
|
+
* Helpers for the app's own title row and buttons: the calendar draws neither.
|
|
37
|
+
* key is "YYYY-MM" for a month, or any day "YYYY-MM-DD" of a week.
|
|
38
|
+
*/
|
|
39
|
+
export declare const kjunCalendarPeriod: {
|
|
40
|
+
/** The month ("YYYY-MM") or the week's first day ("YYYY-MM-DD") delta periods away. */
|
|
41
|
+
step(view: "month" | "week", key: string, delta: number, weekStart?: WeekStart): string;
|
|
42
|
+
/** The period's name as the grid reads it: "2026년 11월", or "2026년 11월 29일 – 12월 5일" for a week. locale follows KjunProvider's. */
|
|
43
|
+
title(view: "month" | "week", key: string, options?: {
|
|
44
|
+
locale?: string;
|
|
45
|
+
weekStart?: WeekStart;
|
|
46
|
+
}): string;
|
|
47
|
+
};
|
|
48
|
+
/** What a span draws on one day: null outside it; rounded at the span's ends and at the week's edges (column 0 and 6). */
|
|
49
|
+
export declare function spanSegment(span: DaySpan<unknown>, iso: string, column: number): {
|
|
50
|
+
start: boolean;
|
|
51
|
+
end: boolean;
|
|
52
|
+
} | null;
|
|
53
|
+
export declare const visibleDots: <C>(dots: readonly C[] | undefined) => C[];
|
|
54
|
+
/** The month step of a horizontal swipe: left is next (+1), right is previous (-1). */
|
|
55
|
+
export declare const swipeStep: (dx: number, dy: number) => -1 | 0 | 1;
|
|
56
|
+
/** The colour role of a day's number: holidays and Sundays danger, Saturdays info. */
|
|
57
|
+
export declare function dayTone(weekday: number, { markSunday, markSaturday, holiday }: {
|
|
58
|
+
markSunday: boolean;
|
|
59
|
+
markSaturday: boolean;
|
|
60
|
+
holiday: boolean;
|
|
61
|
+
}): "danger" | "info" | "text";
|
|
62
|
+
export declare function holidayOf(test: HolidayTest | undefined, iso: string, scope?: KjunMessageScope): {
|
|
63
|
+
holiday: boolean;
|
|
64
|
+
name?: string;
|
|
65
|
+
};
|
|
66
|
+
export declare const isPast: (iso: string, today: string) => boolean;
|
|
67
|
+
/** A spoken name for an event day: the date, then "today", the holiday name and the event count when present. */
|
|
68
|
+
export declare function eventDayLabel(iso: string, { holiday, count, today }: {
|
|
69
|
+
holiday?: string;
|
|
70
|
+
count?: number;
|
|
71
|
+
today?: boolean;
|
|
72
|
+
}, scope?: KjunMessageScope): string;
|
|
73
|
+
/** The month slide: the old month leaves, then the newest requested one enters. */
|
|
74
|
+
export interface SlideState {
|
|
75
|
+
shown: string;
|
|
76
|
+
pending: string | null;
|
|
77
|
+
phase: "idle" | "out" | "in";
|
|
78
|
+
direction: -1 | 1;
|
|
79
|
+
}
|
|
80
|
+
export declare function slideStart(state: SlideState, next: string): SlideState;
|
|
81
|
+
export declare function slideNext(state: SlideState): SlideState;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Only http(s) URLs open; anything else ("javascript:", relative paths, typos) yields "". */
|
|
2
|
+
export declare function safeExternalUrl(href: string): string;
|
|
3
|
+
/** An icon-only link's name: the app's label, or the generic one. A text link is named by its own text. */
|
|
4
|
+
export declare function externalLinkIconName(label: string | undefined, fallback: string): string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Only http(s) URLs open; anything else ("javascript:", relative paths, typos) yields "". */
|
|
2
|
+
export declare function safeExternalUrl(href: string): string;
|
|
3
|
+
/** An icon-only link's name: the app's label, or the generic one. A text link is named by its own text. */
|
|
4
|
+
export declare function externalLinkIconName(label: string | undefined, fallback: string): string;
|