@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,51 @@
|
|
|
1
|
+
import { type ColorSwatchInput } from "./color-picker.cjs";
|
|
2
|
+
/** One pick that may span many changes (a drag, typing in a field). begin remembers the value once; end says whether it moved. */
|
|
3
|
+
export declare function createCommitSession(read: () => string | null): {
|
|
4
|
+
begin(): void;
|
|
5
|
+
end(): boolean;
|
|
6
|
+
};
|
|
7
|
+
/** #RRGGBB of a value. */
|
|
8
|
+
export declare const colorRgb: (value: string) => string;
|
|
9
|
+
/** The AA of a value, FF when it has none. */
|
|
10
|
+
export declare const colorAlphaHex: (value: string | null) => string;
|
|
11
|
+
/** 0–100 opacity as two hex digits. */
|
|
12
|
+
export declare const alphaPercentHex: (percent: number) => string;
|
|
13
|
+
/** What the hex field shows: six digits without #. */
|
|
14
|
+
export declare const hexFieldText: (value: string | null) => string;
|
|
15
|
+
/** What the hex field keeps of typed or pasted text: no #, and at most the 6 digits (8 with alpha) a code holds.
|
|
16
|
+
* The fields' maxLength leaves room for a pasted #, so the extra digit is cut here. */
|
|
17
|
+
export declare const hexFieldClean: (text: string, alpha: boolean) => string;
|
|
18
|
+
/** A change while typing in the hex field: only a complete code (6 digits, or 8 with alpha); 6 digits keep the current opacity. */
|
|
19
|
+
export declare function hexFieldLive(text: string, alpha: boolean, value: string | null): string | null;
|
|
20
|
+
/** Enter or leaving the hex field: the value to keep, or "revert". A short code expands; empty is null only when clearable. */
|
|
21
|
+
export declare function hexFieldCommit(text: string, alpha: boolean, value: string | null, clearable: boolean): string | null | "revert";
|
|
22
|
+
/** A change while typing in the % field: a whole 0–100 on a color. */
|
|
23
|
+
export declare const alphaFieldLive: (text: string, value: string | null) => string | null;
|
|
24
|
+
/** Recent colors fill one swatch row. */
|
|
25
|
+
export declare const recentColorLimit = 8;
|
|
26
|
+
/** The recent row: invalid entries, repeats and colors the swatches already offer left out, at most one row.
|
|
27
|
+
* Only the row hides them; the app's list keeps every color. */
|
|
28
|
+
export declare const recentColorItems: (list: ColorSwatchInput[] | undefined, alpha: boolean, swatches?: {
|
|
29
|
+
value: string;
|
|
30
|
+
}[]) => {
|
|
31
|
+
value: string;
|
|
32
|
+
label: string;
|
|
33
|
+
}[];
|
|
34
|
+
/** The list after the panel closes on a new value: that value first, once, at most one row; null if nothing changes. */
|
|
35
|
+
export declare function nextRecentColors(list: ColorSwatchInput[] | undefined, value: string | null, alpha: boolean): string[] | null;
|
|
36
|
+
/** The browser's EyeDropper (Chromium desktop). Elsewhere the picker draws no eyedropper button. */
|
|
37
|
+
export declare const eyeDropperSupported: () => boolean;
|
|
38
|
+
/** Opens the screen eyedropper; resolves the color as #RRGGBB (the current opacity kept with alpha), or null when cancelled. */
|
|
39
|
+
export declare function pickScreenColor(alpha: boolean, value: string | null): Promise<string | null>;
|
|
40
|
+
/** Screen reader actions of the area: swipe up/down moves saturation; named actions move brightness (Native devices have no arrow keys). */
|
|
41
|
+
export declare function colorAreaActions(m: {
|
|
42
|
+
increaseSaturation: string;
|
|
43
|
+
decreaseSaturation: string;
|
|
44
|
+
increaseBrightness: string;
|
|
45
|
+
decreaseBrightness: string;
|
|
46
|
+
}): {
|
|
47
|
+
name: string;
|
|
48
|
+
label: string;
|
|
49
|
+
}[];
|
|
50
|
+
/** The key an area action stands for, so it moves exactly like the keyboard. */
|
|
51
|
+
export declare const colorAreaActionKey: (name: string) => string | null;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type ColorSwatchInput } from "./color-picker.js";
|
|
2
|
+
/** One pick that may span many changes (a drag, typing in a field). begin remembers the value once; end says whether it moved. */
|
|
3
|
+
export declare function createCommitSession(read: () => string | null): {
|
|
4
|
+
begin(): void;
|
|
5
|
+
end(): boolean;
|
|
6
|
+
};
|
|
7
|
+
/** #RRGGBB of a value. */
|
|
8
|
+
export declare const colorRgb: (value: string) => string;
|
|
9
|
+
/** The AA of a value, FF when it has none. */
|
|
10
|
+
export declare const colorAlphaHex: (value: string | null) => string;
|
|
11
|
+
/** 0–100 opacity as two hex digits. */
|
|
12
|
+
export declare const alphaPercentHex: (percent: number) => string;
|
|
13
|
+
/** What the hex field shows: six digits without #. */
|
|
14
|
+
export declare const hexFieldText: (value: string | null) => string;
|
|
15
|
+
/** What the hex field keeps of typed or pasted text: no #, and at most the 6 digits (8 with alpha) a code holds.
|
|
16
|
+
* The fields' maxLength leaves room for a pasted #, so the extra digit is cut here. */
|
|
17
|
+
export declare const hexFieldClean: (text: string, alpha: boolean) => string;
|
|
18
|
+
/** A change while typing in the hex field: only a complete code (6 digits, or 8 with alpha); 6 digits keep the current opacity. */
|
|
19
|
+
export declare function hexFieldLive(text: string, alpha: boolean, value: string | null): string | null;
|
|
20
|
+
/** Enter or leaving the hex field: the value to keep, or "revert". A short code expands; empty is null only when clearable. */
|
|
21
|
+
export declare function hexFieldCommit(text: string, alpha: boolean, value: string | null, clearable: boolean): string | null | "revert";
|
|
22
|
+
/** A change while typing in the % field: a whole 0–100 on a color. */
|
|
23
|
+
export declare const alphaFieldLive: (text: string, value: string | null) => string | null;
|
|
24
|
+
/** Recent colors fill one swatch row. */
|
|
25
|
+
export declare const recentColorLimit = 8;
|
|
26
|
+
/** The recent row: invalid entries, repeats and colors the swatches already offer left out, at most one row.
|
|
27
|
+
* Only the row hides them; the app's list keeps every color. */
|
|
28
|
+
export declare const recentColorItems: (list: ColorSwatchInput[] | undefined, alpha: boolean, swatches?: {
|
|
29
|
+
value: string;
|
|
30
|
+
}[]) => {
|
|
31
|
+
value: string;
|
|
32
|
+
label: string;
|
|
33
|
+
}[];
|
|
34
|
+
/** The list after the panel closes on a new value: that value first, once, at most one row; null if nothing changes. */
|
|
35
|
+
export declare function nextRecentColors(list: ColorSwatchInput[] | undefined, value: string | null, alpha: boolean): string[] | null;
|
|
36
|
+
/** The browser's EyeDropper (Chromium desktop). Elsewhere the picker draws no eyedropper button. */
|
|
37
|
+
export declare const eyeDropperSupported: () => boolean;
|
|
38
|
+
/** Opens the screen eyedropper; resolves the color as #RRGGBB (the current opacity kept with alpha), or null when cancelled. */
|
|
39
|
+
export declare function pickScreenColor(alpha: boolean, value: string | null): Promise<string | null>;
|
|
40
|
+
/** Screen reader actions of the area: swipe up/down moves saturation; named actions move brightness (Native devices have no arrow keys). */
|
|
41
|
+
export declare function colorAreaActions(m: {
|
|
42
|
+
increaseSaturation: string;
|
|
43
|
+
decreaseSaturation: string;
|
|
44
|
+
increaseBrightness: string;
|
|
45
|
+
decreaseBrightness: string;
|
|
46
|
+
}): {
|
|
47
|
+
name: string;
|
|
48
|
+
label: string;
|
|
49
|
+
}[];
|
|
50
|
+
/** The key an area action stands for, so it moves exactly like the keyboard. */
|
|
51
|
+
export declare const colorAreaActionKey: (name: string) => string | null;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { type Hsv } from "./color.cjs";
|
|
2
|
+
export type PickerState = {
|
|
3
|
+
hsv: Hsv;
|
|
4
|
+
a: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const initialPickerState: PickerState;
|
|
7
|
+
/** Swatches take this many fixed columns (web CSS repeat(8); Native divides the measured width). */
|
|
8
|
+
export declare const colorSwatchColumns = 8;
|
|
9
|
+
/** A thumb never leaves its track: at fraction p its center sits p of the way from half a thumb in to half a thumb before the end.
|
|
10
|
+
* Placed at left p × 100%, the thumb moves back by p of its own size (a CSS translate of -p × 100%, a Native margin). */
|
|
11
|
+
export declare const thumbOffset: (p: number, thumb: number) => number;
|
|
12
|
+
/** The fraction a pointer at `at` picks on a track starting at `start`, `length` long, whose ends lie half a thumb in. */
|
|
13
|
+
export declare function trackFraction(at: number, start: number, length: number, thumb: number): number;
|
|
14
|
+
/** A touch screen: the web panel then follows the trigger width (up to touchMaxWidth) so swatches and tracks grow under a finger. */
|
|
15
|
+
export declare const coarsePointer: () => boolean;
|
|
16
|
+
/** Square swatch size for a row of `width` with `gap` between the fixed columns. */
|
|
17
|
+
export declare const colorSwatchSize: (width: number, gap: number) => number;
|
|
18
|
+
export declare function warnColorPicker(message: string): void;
|
|
19
|
+
export declare function stateToValue(s: PickerState, alpha: boolean): string;
|
|
20
|
+
/** Follows an outside value without losing hue or saturation: a value that the current HSV already draws keeps it, and null keeps the last state. */
|
|
21
|
+
export declare function syncHsv(prev: PickerState, value: string | null, alpha: boolean): PickerState;
|
|
22
|
+
/** Arrows move saturation (left/right) and brightness (up/down) 1%, 10% with Shift; Home/End set saturation, PageUp/PageDown brightness. */
|
|
23
|
+
export declare function colorAreaKey(key: string, shift: boolean, hsv: Hsv): Hsv | null;
|
|
24
|
+
/** One step of a hue (0–360) or alpha (0–100) slider. */
|
|
25
|
+
export declare function channelKey(key: string, shift: boolean, value: number, max: number): number | null;
|
|
26
|
+
/** With alpha on, a 3- or 6-digit code keeps the current opacity (AA) instead of resetting it to 100%. Other text passes through. */
|
|
27
|
+
export declare function hexWithAlpha(text: string, alpha: boolean, currentAlpha: string): string;
|
|
28
|
+
/** The hex field: live only once all 6 (or 8 with alpha) digits are typed, so "3B8" never jumps to #33BB88 mid-typing; commit expands short forms. */
|
|
29
|
+
export declare function hexDraft(text: string, alpha: boolean): {
|
|
30
|
+
live: string | null;
|
|
31
|
+
commit: string | null | "revert";
|
|
32
|
+
};
|
|
33
|
+
export type ColorSwatchInput = string | {
|
|
34
|
+
value: string;
|
|
35
|
+
label?: string;
|
|
36
|
+
};
|
|
37
|
+
/** How many swatches are not hex colors; the picker warns once about them (normalizing runs on every render and stays quiet). */
|
|
38
|
+
export declare function invalidSwatchCount(list: unknown[]): number;
|
|
39
|
+
export declare function normalizeSwatches(list: unknown[], alpha: boolean): {
|
|
40
|
+
value: string;
|
|
41
|
+
label: string;
|
|
42
|
+
}[];
|
|
43
|
+
export declare function initialFocus(o: {
|
|
44
|
+
selectedSwatch: boolean;
|
|
45
|
+
custom: boolean;
|
|
46
|
+
input: boolean;
|
|
47
|
+
}): "swatch" | "area" | "hex" | "first-swatch";
|
|
48
|
+
/** The control the panel focuses when it opens, from the elements each platform registered. */
|
|
49
|
+
export declare function initialFocusTarget<T>(targets: {
|
|
50
|
+
swatches: (T | null)[];
|
|
51
|
+
area: T | null;
|
|
52
|
+
hex: T | null;
|
|
53
|
+
}, o: {
|
|
54
|
+
selected: number;
|
|
55
|
+
custom: boolean;
|
|
56
|
+
input: boolean;
|
|
57
|
+
}): T | null;
|
|
58
|
+
/** The swatch row's items: "no color" first when clearable. */
|
|
59
|
+
export declare const swatchItems: (swatches: {
|
|
60
|
+
value: string;
|
|
61
|
+
label: string;
|
|
62
|
+
}[], clearable: boolean, noneLabel: string) => {
|
|
63
|
+
value: string | null;
|
|
64
|
+
label: string;
|
|
65
|
+
}[];
|
|
66
|
+
/** Which item of swatchItems the value selects, or -1. */
|
|
67
|
+
export declare function selectedSwatchIndex(value: string | null, swatches: {
|
|
68
|
+
value: string;
|
|
69
|
+
}[], clearable: boolean): number;
|
|
70
|
+
/** The name the app gave the value in one of the lists (swatches, recent colors); a label that only repeats the code is no name. */
|
|
71
|
+
export declare function colorName(value: string | null, lists: {
|
|
72
|
+
value: string;
|
|
73
|
+
label: string;
|
|
74
|
+
}[][]): string | undefined;
|
|
75
|
+
/** What the trigger shows and says: the swatch name when it has one, #RRGGBB, the opacity % with alpha, and the spoken value. */
|
|
76
|
+
export declare function pickerSummary(value: string | null, alpha: boolean, m: {
|
|
77
|
+
colorValue: (hex: string, alpha?: number) => string;
|
|
78
|
+
colorNone: string;
|
|
79
|
+
}, name?: string): {
|
|
80
|
+
hex: string;
|
|
81
|
+
percent: number | undefined;
|
|
82
|
+
opacity: number;
|
|
83
|
+
name: string | undefined;
|
|
84
|
+
spoken: string;
|
|
85
|
+
};
|
|
86
|
+
/** Development warnings, each said once per picker. */
|
|
87
|
+
export declare function createPickerWarnings(): (o: {
|
|
88
|
+
raw: unknown;
|
|
89
|
+
alpha: boolean;
|
|
90
|
+
swatches: unknown[] | undefined;
|
|
91
|
+
nothing: boolean;
|
|
92
|
+
}) => void;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { type Hsv } from "./color.js";
|
|
2
|
+
export type PickerState = {
|
|
3
|
+
hsv: Hsv;
|
|
4
|
+
a: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const initialPickerState: PickerState;
|
|
7
|
+
/** Swatches take this many fixed columns (web CSS repeat(8); Native divides the measured width). */
|
|
8
|
+
export declare const colorSwatchColumns = 8;
|
|
9
|
+
/** A thumb never leaves its track: at fraction p its center sits p of the way from half a thumb in to half a thumb before the end.
|
|
10
|
+
* Placed at left p × 100%, the thumb moves back by p of its own size (a CSS translate of -p × 100%, a Native margin). */
|
|
11
|
+
export declare const thumbOffset: (p: number, thumb: number) => number;
|
|
12
|
+
/** The fraction a pointer at `at` picks on a track starting at `start`, `length` long, whose ends lie half a thumb in. */
|
|
13
|
+
export declare function trackFraction(at: number, start: number, length: number, thumb: number): number;
|
|
14
|
+
/** A touch screen: the web panel then follows the trigger width (up to touchMaxWidth) so swatches and tracks grow under a finger. */
|
|
15
|
+
export declare const coarsePointer: () => boolean;
|
|
16
|
+
/** Square swatch size for a row of `width` with `gap` between the fixed columns. */
|
|
17
|
+
export declare const colorSwatchSize: (width: number, gap: number) => number;
|
|
18
|
+
export declare function warnColorPicker(message: string): void;
|
|
19
|
+
export declare function stateToValue(s: PickerState, alpha: boolean): string;
|
|
20
|
+
/** Follows an outside value without losing hue or saturation: a value that the current HSV already draws keeps it, and null keeps the last state. */
|
|
21
|
+
export declare function syncHsv(prev: PickerState, value: string | null, alpha: boolean): PickerState;
|
|
22
|
+
/** Arrows move saturation (left/right) and brightness (up/down) 1%, 10% with Shift; Home/End set saturation, PageUp/PageDown brightness. */
|
|
23
|
+
export declare function colorAreaKey(key: string, shift: boolean, hsv: Hsv): Hsv | null;
|
|
24
|
+
/** One step of a hue (0–360) or alpha (0–100) slider. */
|
|
25
|
+
export declare function channelKey(key: string, shift: boolean, value: number, max: number): number | null;
|
|
26
|
+
/** With alpha on, a 3- or 6-digit code keeps the current opacity (AA) instead of resetting it to 100%. Other text passes through. */
|
|
27
|
+
export declare function hexWithAlpha(text: string, alpha: boolean, currentAlpha: string): string;
|
|
28
|
+
/** The hex field: live only once all 6 (or 8 with alpha) digits are typed, so "3B8" never jumps to #33BB88 mid-typing; commit expands short forms. */
|
|
29
|
+
export declare function hexDraft(text: string, alpha: boolean): {
|
|
30
|
+
live: string | null;
|
|
31
|
+
commit: string | null | "revert";
|
|
32
|
+
};
|
|
33
|
+
export type ColorSwatchInput = string | {
|
|
34
|
+
value: string;
|
|
35
|
+
label?: string;
|
|
36
|
+
};
|
|
37
|
+
/** How many swatches are not hex colors; the picker warns once about them (normalizing runs on every render and stays quiet). */
|
|
38
|
+
export declare function invalidSwatchCount(list: unknown[]): number;
|
|
39
|
+
export declare function normalizeSwatches(list: unknown[], alpha: boolean): {
|
|
40
|
+
value: string;
|
|
41
|
+
label: string;
|
|
42
|
+
}[];
|
|
43
|
+
export declare function initialFocus(o: {
|
|
44
|
+
selectedSwatch: boolean;
|
|
45
|
+
custom: boolean;
|
|
46
|
+
input: boolean;
|
|
47
|
+
}): "swatch" | "area" | "hex" | "first-swatch";
|
|
48
|
+
/** The control the panel focuses when it opens, from the elements each platform registered. */
|
|
49
|
+
export declare function initialFocusTarget<T>(targets: {
|
|
50
|
+
swatches: (T | null)[];
|
|
51
|
+
area: T | null;
|
|
52
|
+
hex: T | null;
|
|
53
|
+
}, o: {
|
|
54
|
+
selected: number;
|
|
55
|
+
custom: boolean;
|
|
56
|
+
input: boolean;
|
|
57
|
+
}): T | null;
|
|
58
|
+
/** The swatch row's items: "no color" first when clearable. */
|
|
59
|
+
export declare const swatchItems: (swatches: {
|
|
60
|
+
value: string;
|
|
61
|
+
label: string;
|
|
62
|
+
}[], clearable: boolean, noneLabel: string) => {
|
|
63
|
+
value: string | null;
|
|
64
|
+
label: string;
|
|
65
|
+
}[];
|
|
66
|
+
/** Which item of swatchItems the value selects, or -1. */
|
|
67
|
+
export declare function selectedSwatchIndex(value: string | null, swatches: {
|
|
68
|
+
value: string;
|
|
69
|
+
}[], clearable: boolean): number;
|
|
70
|
+
/** The name the app gave the value in one of the lists (swatches, recent colors); a label that only repeats the code is no name. */
|
|
71
|
+
export declare function colorName(value: string | null, lists: {
|
|
72
|
+
value: string;
|
|
73
|
+
label: string;
|
|
74
|
+
}[][]): string | undefined;
|
|
75
|
+
/** What the trigger shows and says: the swatch name when it has one, #RRGGBB, the opacity % with alpha, and the spoken value. */
|
|
76
|
+
export declare function pickerSummary(value: string | null, alpha: boolean, m: {
|
|
77
|
+
colorValue: (hex: string, alpha?: number) => string;
|
|
78
|
+
colorNone: string;
|
|
79
|
+
}, name?: string): {
|
|
80
|
+
hex: string;
|
|
81
|
+
percent: number | undefined;
|
|
82
|
+
opacity: number;
|
|
83
|
+
name: string | undefined;
|
|
84
|
+
spoken: string;
|
|
85
|
+
};
|
|
86
|
+
/** Development warnings, each said once per picker. */
|
|
87
|
+
export declare function createPickerWarnings(): (o: {
|
|
88
|
+
raw: unknown;
|
|
89
|
+
alpha: boolean;
|
|
90
|
+
swatches: unknown[] | undefined;
|
|
91
|
+
nothing: boolean;
|
|
92
|
+
}) => void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type Rgba = {
|
|
2
|
+
r: number;
|
|
3
|
+
g: number;
|
|
4
|
+
b: number;
|
|
5
|
+
a: number;
|
|
6
|
+
};
|
|
7
|
+
export type Hsv = {
|
|
8
|
+
h: number;
|
|
9
|
+
s: number;
|
|
10
|
+
v: number;
|
|
11
|
+
};
|
|
12
|
+
/** Reads #RGB, #RGBA, #RRGGBB or #RRGGBBAA, with or without #, in any case. */
|
|
13
|
+
export declare function parseColor(text: string): Rgba | null;
|
|
14
|
+
/** Uppercase #RRGGBB, or #RRGGBBAA when alpha is on. */
|
|
15
|
+
export declare function formatColor(c: Rgba, alpha: boolean): string;
|
|
16
|
+
/** The picker's value form of anything, or null for an invalid or empty value. */
|
|
17
|
+
export declare function normalizeColor(value: unknown, alpha: boolean): string | null;
|
|
18
|
+
export declare function sameColor(a: string | null, b: string | null, alpha: boolean): boolean;
|
|
19
|
+
export declare function rgbToHsv({ r, g, b }: Rgba): Hsv;
|
|
20
|
+
export declare function hsvToRgb({ h, s, v }: Hsv, a?: number): Rgba;
|
|
21
|
+
/** Which ink reads on a color: dark on light colors, light on dark ones (WCAG relative luminance). Mostly transparent colors take dark ink over the light checkerboard. */
|
|
22
|
+
export declare function readableInk(value: string): "light" | "dark";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type Rgba = {
|
|
2
|
+
r: number;
|
|
3
|
+
g: number;
|
|
4
|
+
b: number;
|
|
5
|
+
a: number;
|
|
6
|
+
};
|
|
7
|
+
export type Hsv = {
|
|
8
|
+
h: number;
|
|
9
|
+
s: number;
|
|
10
|
+
v: number;
|
|
11
|
+
};
|
|
12
|
+
/** Reads #RGB, #RGBA, #RRGGBB or #RRGGBBAA, with or without #, in any case. */
|
|
13
|
+
export declare function parseColor(text: string): Rgba | null;
|
|
14
|
+
/** Uppercase #RRGGBB, or #RRGGBBAA when alpha is on. */
|
|
15
|
+
export declare function formatColor(c: Rgba, alpha: boolean): string;
|
|
16
|
+
/** The picker's value form of anything, or null for an invalid or empty value. */
|
|
17
|
+
export declare function normalizeColor(value: unknown, alpha: boolean): string | null;
|
|
18
|
+
export declare function sameColor(a: string | null, b: string | null, alpha: boolean): boolean;
|
|
19
|
+
export declare function rgbToHsv({ r, g, b }: Rgba): Hsv;
|
|
20
|
+
export declare function hsvToRgb({ h, s, v }: Hsv, a?: number): Rgba;
|
|
21
|
+
/** Which ink reads on a color: dark on light colors, light on dark ones (WCAG relative luminance). Mostly transparent colors take dark ink over the light checkerboard. */
|
|
22
|
+
export declare function readableInk(value: string): "light" | "dark";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type SelectOption } from "./options.cjs";
|
|
2
|
+
/**
|
|
3
|
+
* Combobox candidates: every option until the user types after opening, then Select's ranked match
|
|
4
|
+
* (label prefix, label contains, searchKeys contains). A caller's filterFn owns matching and keeps the original order.
|
|
5
|
+
*/
|
|
6
|
+
export declare function comboboxOptions<T extends SelectOption>({ options, query, typed, labelKey, filterFn, searchKeys }: {
|
|
7
|
+
options: T[];
|
|
8
|
+
query: string;
|
|
9
|
+
typed: boolean;
|
|
10
|
+
labelKey: string;
|
|
11
|
+
filterFn?: (option: T, query: string) => boolean;
|
|
12
|
+
searchKeys?: readonly string[];
|
|
13
|
+
}): T[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type SelectOption } from "./options.js";
|
|
2
|
+
/**
|
|
3
|
+
* Combobox candidates: every option until the user types after opening, then Select's ranked match
|
|
4
|
+
* (label prefix, label contains, searchKeys contains). A caller's filterFn owns matching and keeps the original order.
|
|
5
|
+
*/
|
|
6
|
+
export declare function comboboxOptions<T extends SelectOption>({ options, query, typed, labelKey, filterFn, searchKeys }: {
|
|
7
|
+
options: T[];
|
|
8
|
+
query: string;
|
|
9
|
+
typed: boolean;
|
|
10
|
+
labelKey: string;
|
|
11
|
+
filterFn?: (option: T, query: string) => boolean;
|
|
12
|
+
searchKeys?: readonly string[];
|
|
13
|
+
}): T[];
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { type OptionValue, type SelectOption } from "./options.cjs";
|
|
2
|
-
export declare function useComboboxModel<T extends SelectOption>({ value, options, labelKey, valueKey, disabled, filterFn, onValueChange, onChange, onSearch, onClear, }: {
|
|
2
|
+
export declare function useComboboxModel<T extends SelectOption>({ value, options, labelKey, valueKey, disabled, filterFn, searchKeys, onValueChange, onChange, onSearch, onClear, }: {
|
|
3
3
|
value: OptionValue | null;
|
|
4
4
|
options: T[];
|
|
5
5
|
labelKey: string;
|
|
6
6
|
valueKey: string;
|
|
7
7
|
disabled: boolean;
|
|
8
8
|
filterFn?: (option: T, query: string) => boolean;
|
|
9
|
+
searchKeys?: readonly string[];
|
|
9
10
|
onValueChange?: (value: OptionValue | null) => void;
|
|
10
11
|
onChange?: (value: OptionValue | null) => void;
|
|
11
12
|
onSearch?: (value: string) => void;
|
|
@@ -14,6 +15,7 @@ export declare function useComboboxModel<T extends SelectOption>({ value, option
|
|
|
14
15
|
open: boolean;
|
|
15
16
|
displayValue: string;
|
|
16
17
|
options: T[];
|
|
18
|
+
isSelected: (option: T) => boolean;
|
|
17
19
|
changeOpen(next: boolean): void;
|
|
18
20
|
search(next: string, openOnInput: boolean): void;
|
|
19
21
|
select(option: T): void;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { type OptionValue, type SelectOption } from "./options.js";
|
|
2
|
-
export declare function useComboboxModel<T extends SelectOption>({ value, options, labelKey, valueKey, disabled, filterFn, onValueChange, onChange, onSearch, onClear, }: {
|
|
2
|
+
export declare function useComboboxModel<T extends SelectOption>({ value, options, labelKey, valueKey, disabled, filterFn, searchKeys, onValueChange, onChange, onSearch, onClear, }: {
|
|
3
3
|
value: OptionValue | null;
|
|
4
4
|
options: T[];
|
|
5
5
|
labelKey: string;
|
|
6
6
|
valueKey: string;
|
|
7
7
|
disabled: boolean;
|
|
8
8
|
filterFn?: (option: T, query: string) => boolean;
|
|
9
|
+
searchKeys?: readonly string[];
|
|
9
10
|
onValueChange?: (value: OptionValue | null) => void;
|
|
10
11
|
onChange?: (value: OptionValue | null) => void;
|
|
11
12
|
onSearch?: (value: string) => void;
|
|
@@ -14,6 +15,7 @@ export declare function useComboboxModel<T extends SelectOption>({ value, option
|
|
|
14
15
|
open: boolean;
|
|
15
16
|
displayValue: string;
|
|
16
17
|
options: T[];
|
|
18
|
+
isSelected: (option: T) => boolean;
|
|
17
19
|
changeOpen(next: boolean): void;
|
|
18
20
|
search(next: string, openOnInput: boolean): void;
|
|
19
21
|
select(option: T): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type CopyButtonSize = "xs" | "sm" | "md";
|
|
2
|
+
/** CopyButton takes ghost-button geometry for its size: an icon-only control is a square of the button
|
|
3
|
+
* height, a labelled one has the icon-side and label-side insets and the content gap. */
|
|
4
|
+
export declare function copyButtonGeometry(size: CopyButtonSize, labelled: boolean): {
|
|
5
|
+
height: 40 | 24 | 32;
|
|
6
|
+
radius: 10 | 12 | 8;
|
|
7
|
+
gap: 4;
|
|
8
|
+
width: 40 | 24 | 32 | undefined;
|
|
9
|
+
paddingStart: number;
|
|
10
|
+
paddingEnd: number;
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type CopyButtonSize = "xs" | "sm" | "md";
|
|
2
|
+
/** CopyButton takes ghost-button geometry for its size: an icon-only control is a square of the button
|
|
3
|
+
* height, a labelled one has the icon-side and label-side insets and the content gap. */
|
|
4
|
+
export declare function copyButtonGeometry(size: CopyButtonSize, labelled: boolean): {
|
|
5
|
+
height: 40 | 24 | 32;
|
|
6
|
+
radius: 10 | 12 | 8;
|
|
7
|
+
gap: 4;
|
|
8
|
+
width: 40 | 24 | 32 | undefined;
|
|
9
|
+
paddingStart: number;
|
|
10
|
+
paddingEnd: number;
|
|
11
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type HeatCellMode = "diverging" | "sequential" | "price";
|
|
2
|
+
export type HeatCellColor = "brand" | "success" | "danger" | "warning";
|
|
3
|
+
/**
|
|
4
|
+
* How a heatmap cell is filled. `role` is the web colour role (`--_kjun-color-<role>`); Native maps it.
|
|
5
|
+
* Diverging and price cells measure the distance from `center` (the middle of min..max when left out) on one scale,
|
|
6
|
+
* the longer of the two sides, so the same strength means the same size on either side.
|
|
7
|
+
*/
|
|
8
|
+
export declare function heatCell(value: number | null | undefined, min: number, max: number, mode: HeatCellMode, color: HeatCellColor, center?: number | null): {
|
|
9
|
+
missing: true;
|
|
10
|
+
role: null;
|
|
11
|
+
magnitude: number;
|
|
12
|
+
opacity: number;
|
|
13
|
+
} | {
|
|
14
|
+
missing: false;
|
|
15
|
+
role: "price-up" | "price-down" | HeatCellColor;
|
|
16
|
+
magnitude: number;
|
|
17
|
+
opacity: number;
|
|
18
|
+
};
|
|
19
|
+
export type ProgressCellColor = "auto" | "brand" | "success" | "danger" | "warning" | "custom";
|
|
20
|
+
/**
|
|
21
|
+
* The bar's width and fill. `custom` is the app's colour when one applies: customColor with color "custom", or
|
|
22
|
+
* customColor alone (color left on "auto"). color "custom" without a customColor falls back to the auto colour.
|
|
23
|
+
*/
|
|
24
|
+
export declare function progressCellState<C>(value: number, max: number, color: ProgressCellColor, customColor?: C | null): {
|
|
25
|
+
percent: number;
|
|
26
|
+
rounded: number;
|
|
27
|
+
role: "brand" | "danger" | "success" | "warning";
|
|
28
|
+
custom: NonNullable<C> | undefined;
|
|
29
|
+
};
|
|
30
|
+
export type PriceFlash = boolean | "text" | "background";
|
|
31
|
+
/** Which way a price moved, for its flash; null when either side is not a finite number or nothing changed. */
|
|
32
|
+
export declare function priceFlashDirection(previous: number | null | undefined, next: number | null | undefined): "up" | "down" | null;
|
|
33
|
+
/** The flash's kind, or null when it is off. true means the text colour. */
|
|
34
|
+
export declare const priceFlashKind: (flash: PriceFlash | undefined) => "text" | "background" | null;
|
|
35
|
+
/** The web keyframe class for a flash (price-motion.css). */
|
|
36
|
+
export declare const priceFlashClass: (kind: "text" | "background", direction: "up" | "down") => string;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type HeatCellMode = "diverging" | "sequential" | "price";
|
|
2
|
+
export type HeatCellColor = "brand" | "success" | "danger" | "warning";
|
|
3
|
+
/**
|
|
4
|
+
* How a heatmap cell is filled. `role` is the web colour role (`--_kjun-color-<role>`); Native maps it.
|
|
5
|
+
* Diverging and price cells measure the distance from `center` (the middle of min..max when left out) on one scale,
|
|
6
|
+
* the longer of the two sides, so the same strength means the same size on either side.
|
|
7
|
+
*/
|
|
8
|
+
export declare function heatCell(value: number | null | undefined, min: number, max: number, mode: HeatCellMode, color: HeatCellColor, center?: number | null): {
|
|
9
|
+
missing: true;
|
|
10
|
+
role: null;
|
|
11
|
+
magnitude: number;
|
|
12
|
+
opacity: number;
|
|
13
|
+
} | {
|
|
14
|
+
missing: false;
|
|
15
|
+
role: "price-up" | "price-down" | HeatCellColor;
|
|
16
|
+
magnitude: number;
|
|
17
|
+
opacity: number;
|
|
18
|
+
};
|
|
19
|
+
export type ProgressCellColor = "auto" | "brand" | "success" | "danger" | "warning" | "custom";
|
|
20
|
+
/**
|
|
21
|
+
* The bar's width and fill. `custom` is the app's colour when one applies: customColor with color "custom", or
|
|
22
|
+
* customColor alone (color left on "auto"). color "custom" without a customColor falls back to the auto colour.
|
|
23
|
+
*/
|
|
24
|
+
export declare function progressCellState<C>(value: number, max: number, color: ProgressCellColor, customColor?: C | null): {
|
|
25
|
+
percent: number;
|
|
26
|
+
rounded: number;
|
|
27
|
+
role: "brand" | "danger" | "success" | "warning";
|
|
28
|
+
custom: NonNullable<C> | undefined;
|
|
29
|
+
};
|
|
30
|
+
export type PriceFlash = boolean | "text" | "background";
|
|
31
|
+
/** Which way a price moved, for its flash; null when either side is not a finite number or nothing changed. */
|
|
32
|
+
export declare function priceFlashDirection(previous: number | null | undefined, next: number | null | undefined): "up" | "down" | null;
|
|
33
|
+
/** The flash's kind, or null when it is off. true means the text colour. */
|
|
34
|
+
export declare const priceFlashKind: (flash: PriceFlash | undefined) => "text" | "background" | null;
|
|
35
|
+
/** The web keyframe class for a flash (price-motion.css). */
|
|
36
|
+
export declare const priceFlashClass: (kind: "text" | "background", direction: "up" | "down") => string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** True in a development build, where KJUN warns about misuse; bundlers replace NODE_ENV, and without it this is false. */
|
|
2
|
+
export declare function developmentMode(): boolean;
|
|
3
|
+
/** The warning for a FAB with neither a label nor an accessible name, or "" when it has one. */
|
|
4
|
+
export declare function fabNameWarning(label: unknown, ariaLabel: unknown): "" | "[KJUN] KjunFab needs a label or ariaLabel: an icon alone gives the button no name.";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** True in a development build, where KJUN warns about misuse; bundlers replace NODE_ENV, and without it this is false. */
|
|
2
|
+
export declare function developmentMode(): boolean;
|
|
3
|
+
/** The warning for a FAB with neither a label nor an accessible name, or "" when it has one. */
|
|
4
|
+
export declare function fabNameWarning(label: unknown, ariaLabel: unknown): "" | "[KJUN] KjunFab needs a label or ariaLabel: an icon alone gives the button no name.";
|