@kjun-ui/react 0.21.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -5
- package/dist/index.cjs +8795 -3753
- package/dist/index.js +9349 -4284
- package/dist/styles.css +2736 -480
- package/dist/types/packages/react/src/actions.d.cts +21 -16
- package/dist/types/packages/react/src/actions.d.ts +21 -16
- package/dist/types/packages/react/src/app-navigation.d.cts +14 -4
- package/dist/types/packages/react/src/app-navigation.d.ts +14 -4
- package/dist/types/packages/react/src/avatar-group.d.cts +36 -0
- package/dist/types/packages/react/src/avatar-group.d.ts +36 -0
- package/dist/types/packages/react/src/button.d.cts +15 -6
- package/dist/types/packages/react/src/button.d.ts +15 -6
- package/dist/types/packages/react/src/calendar.d.cts +6 -2
- package/dist/types/packages/react/src/calendar.d.ts +6 -2
- package/dist/types/packages/react/src/card.d.cts +10 -3
- package/dist/types/packages/react/src/card.d.ts +10 -3
- package/dist/types/packages/react/src/carousel.d.cts +8 -1
- package/dist/types/packages/react/src/carousel.d.ts +8 -1
- package/dist/types/packages/react/src/choice-controls.d.cts +99 -0
- package/dist/types/packages/react/src/choice-controls.d.ts +99 -0
- package/dist/types/packages/react/src/collapse.d.cts +4 -1
- package/dist/types/packages/react/src/collapse.d.ts +4 -1
- package/dist/types/packages/react/src/color-picker.d.cts +8 -1
- package/dist/types/packages/react/src/color-picker.d.ts +8 -1
- package/dist/types/packages/react/src/combobox.d.cts +18 -5
- package/dist/types/packages/react/src/combobox.d.ts +18 -5
- package/dist/types/packages/react/src/controls.d.cts +7 -74
- package/dist/types/packages/react/src/controls.d.ts +7 -74
- package/dist/types/packages/react/src/data-state.d.cts +19 -6
- package/dist/types/packages/react/src/data-state.d.ts +19 -6
- package/dist/types/packages/react/src/date-picker.d.cts +8 -2
- package/dist/types/packages/react/src/date-picker.d.ts +8 -2
- package/dist/types/packages/react/src/display.d.cts +33 -8
- package/dist/types/packages/react/src/display.d.ts +33 -8
- package/dist/types/packages/react/src/drawer.d.cts +11 -2
- package/dist/types/packages/react/src/drawer.d.ts +11 -2
- package/dist/types/packages/react/src/dropdown.d.cts +21 -6
- package/dist/types/packages/react/src/dropdown.d.ts +21 -6
- package/dist/types/packages/react/src/event-calendar.d.cts +47 -0
- package/dist/types/packages/react/src/event-calendar.d.ts +47 -0
- package/dist/types/packages/react/src/fab.d.cts +2 -0
- package/dist/types/packages/react/src/fab.d.ts +2 -0
- package/dist/types/packages/react/src/file-upload-row.d.cts +23 -0
- package/dist/types/packages/react/src/file-upload-row.d.ts +23 -0
- package/dist/types/packages/react/src/file-upload.d.cts +38 -0
- package/dist/types/packages/react/src/file-upload.d.ts +38 -0
- package/dist/types/packages/react/src/financial-display.d.cts +32 -11
- package/dist/types/packages/react/src/financial-display.d.ts +32 -11
- package/dist/types/packages/react/src/floating-panel.d.cts +6 -2
- package/dist/types/packages/react/src/floating-panel.d.ts +6 -2
- package/dist/types/packages/react/src/index.d.cts +12 -1
- package/dist/types/packages/react/src/index.d.ts +12 -1
- package/dist/types/packages/react/src/input.d.cts +27 -1
- package/dist/types/packages/react/src/input.d.ts +27 -1
- package/dist/types/packages/react/src/kpi-hero.d.cts +2 -0
- package/dist/types/packages/react/src/kpi-hero.d.ts +2 -0
- package/dist/types/packages/react/src/kpi-row.d.cts +5 -0
- package/dist/types/packages/react/src/kpi-row.d.ts +5 -0
- package/dist/types/packages/react/src/layout-primitives.d.cts +71 -139
- package/dist/types/packages/react/src/layout-primitives.d.ts +71 -139
- package/dist/types/packages/react/src/list-context.d.cts +2 -1
- package/dist/types/packages/react/src/list-context.d.ts +2 -1
- package/dist/types/packages/react/src/list.d.cts +49 -12
- package/dist/types/packages/react/src/list.d.ts +49 -12
- package/dist/types/packages/react/src/market-model.d.cts +15 -1
- package/dist/types/packages/react/src/market-model.d.ts +15 -1
- package/dist/types/packages/react/src/market-parts.d.cts +9 -0
- package/dist/types/packages/react/src/market-parts.d.ts +9 -0
- package/dist/types/packages/react/src/market-skeleton.d.cts +7 -1
- package/dist/types/packages/react/src/market-skeleton.d.ts +7 -1
- package/dist/types/packages/react/src/media.d.cts +6 -2
- package/dist/types/packages/react/src/media.d.ts +6 -2
- package/dist/types/packages/react/src/modal.d.cts +11 -2
- package/dist/types/packages/react/src/modal.d.ts +11 -2
- package/dist/types/packages/react/src/navigation.d.cts +34 -5
- package/dist/types/packages/react/src/navigation.d.ts +34 -5
- package/dist/types/packages/react/src/number-display.d.cts +8 -5
- package/dist/types/packages/react/src/number-display.d.ts +8 -5
- package/dist/types/packages/react/src/number-input.d.cts +28 -0
- package/dist/types/packages/react/src/number-input.d.ts +28 -0
- package/dist/types/packages/react/src/popover.d.cts +5 -2
- package/dist/types/packages/react/src/popover.d.ts +5 -2
- package/dist/types/packages/react/src/pressable.d.cts +17 -0
- package/dist/types/packages/react/src/pressable.d.ts +17 -0
- package/dist/types/packages/react/src/quantity-stepper.d.cts +3 -1
- package/dist/types/packages/react/src/quantity-stepper.d.ts +3 -1
- package/dist/types/packages/react/src/range-input.d.cts +15 -3
- package/dist/types/packages/react/src/range-input.d.ts +15 -3
- package/dist/types/packages/react/src/search-input.d.cts +6 -3
- package/dist/types/packages/react/src/search-input.d.ts +6 -3
- package/dist/types/packages/react/src/select-control.d.cts +7 -2
- package/dist/types/packages/react/src/select-control.d.ts +7 -2
- package/dist/types/packages/react/src/side-navigation-layout-spaces.d.cts +31 -0
- package/dist/types/packages/react/src/side-navigation-layout-spaces.d.ts +31 -0
- package/dist/types/packages/react/src/side-navigation-layout.d.cts +63 -0
- package/dist/types/packages/react/src/side-navigation-layout.d.ts +63 -0
- package/dist/types/packages/react/src/side-navigation.d.cts +74 -0
- package/dist/types/packages/react/src/side-navigation.d.ts +74 -0
- package/dist/types/packages/react/src/skeletons.d.cts +18 -3
- package/dist/types/packages/react/src/skeletons.d.ts +18 -3
- package/dist/types/packages/react/src/spinner-glyph.d.cts +8 -0
- package/dist/types/packages/react/src/spinner-glyph.d.ts +8 -0
- package/dist/types/packages/react/src/split-pane.d.cts +20 -5
- package/dist/types/packages/react/src/split-pane.d.ts +20 -5
- package/dist/types/packages/react/src/stacked-bar.d.cts +3 -1
- package/dist/types/packages/react/src/stacked-bar.d.ts +3 -1
- package/dist/types/packages/react/src/steps.d.cts +27 -0
- package/dist/types/packages/react/src/steps.d.ts +27 -0
- package/dist/types/packages/react/src/table-cards.d.cts +4 -12
- package/dist/types/packages/react/src/table-cards.d.ts +4 -12
- package/dist/types/packages/react/src/table-grid.d.cts +3 -7
- package/dist/types/packages/react/src/table-grid.d.ts +3 -7
- package/dist/types/packages/react/src/table-groups.d.cts +5 -0
- package/dist/types/packages/react/src/table-groups.d.ts +5 -0
- package/dist/types/packages/react/src/table-list.d.cts +2 -9
- package/dist/types/packages/react/src/table-list.d.ts +2 -9
- package/dist/types/packages/react/src/table-model.d.cts +6 -2
- package/dist/types/packages/react/src/table-model.d.ts +6 -2
- package/dist/types/packages/react/src/tabs.d.cts +3 -1
- package/dist/types/packages/react/src/tabs.d.ts +3 -1
- package/dist/types/packages/react/src/textarea.d.cts +6 -3
- package/dist/types/packages/react/src/textarea.d.ts +6 -3
- package/dist/types/packages/react/src/tiles.d.cts +18 -0
- package/dist/types/packages/react/src/tiles.d.ts +18 -0
- package/dist/types/packages/react/src/time-picker.d.cts +12 -2
- package/dist/types/packages/react/src/time-picker.d.ts +12 -2
- package/dist/types/packages/react/src/time-wheel.d.cts +18 -0
- package/dist/types/packages/react/src/time-wheel.d.ts +18 -0
- package/dist/types/packages/react/src/use-filter-scroll.d.cts +5 -0
- package/dist/types/packages/react/src/use-filter-scroll.d.ts +5 -0
- package/dist/types/shared/package-runtime/accordion-state.d.cts +2 -0
- package/dist/types/shared/package-runtime/accordion-state.d.ts +2 -0
- package/dist/types/shared/package-runtime/action-size.d.cts +4 -0
- package/dist/types/shared/package-runtime/action-size.d.ts +4 -0
- package/dist/types/shared/package-runtime/alert-actions.d.cts +7 -0
- package/dist/types/shared/package-runtime/alert-actions.d.ts +7 -0
- package/dist/types/shared/package-runtime/alert-exit.d.cts +6 -0
- package/dist/types/shared/package-runtime/alert-exit.d.ts +6 -0
- package/dist/types/shared/package-runtime/alert-live.d.cts +2 -0
- package/dist/types/shared/package-runtime/alert-live.d.ts +2 -0
- package/dist/types/shared/package-runtime/avatar-group.d.cts +18 -0
- package/dist/types/shared/package-runtime/avatar-group.d.ts +18 -0
- package/dist/types/shared/package-runtime/badge-tone.d.cts +8 -2
- package/dist/types/shared/package-runtime/badge-tone.d.ts +8 -2
- package/dist/types/shared/package-runtime/bottom-bar.d.cts +1 -1
- package/dist/types/shared/package-runtime/bottom-bar.d.ts +1 -1
- package/dist/types/shared/package-runtime/bottom-navigation.d.cts +10 -0
- package/dist/types/shared/package-runtime/bottom-navigation.d.ts +10 -0
- package/dist/types/shared/package-runtime/calendar.d.cts +21 -7
- package/dist/types/shared/package-runtime/calendar.d.ts +21 -7
- package/dist/types/shared/package-runtime/card-layout.d.cts +8 -0
- package/dist/types/shared/package-runtime/card-layout.d.ts +8 -0
- package/dist/types/shared/package-runtime/carousel-scroll.d.cts +2 -0
- package/dist/types/shared/package-runtime/carousel-scroll.d.ts +2 -0
- package/dist/types/shared/package-runtime/carousel.d.cts +12 -2
- package/dist/types/shared/package-runtime/carousel.d.ts +12 -2
- package/dist/types/shared/package-runtime/chart-skeleton.d.cts +1 -1
- package/dist/types/shared/package-runtime/chart-skeleton.d.ts +1 -1
- package/dist/types/shared/package-runtime/clipboard.d.cts +6 -0
- package/dist/types/shared/package-runtime/clipboard.d.ts +6 -0
- package/dist/types/shared/package-runtime/combobox-options.d.cts +13 -0
- package/dist/types/shared/package-runtime/combobox-options.d.ts +13 -0
- package/dist/types/shared/package-runtime/combobox.d.cts +3 -1
- package/dist/types/shared/package-runtime/combobox.d.ts +3 -1
- package/dist/types/shared/package-runtime/copy-button.d.cts +11 -0
- package/dist/types/shared/package-runtime/copy-button.d.ts +11 -0
- package/dist/types/shared/package-runtime/data-cells.d.cts +36 -0
- package/dist/types/shared/package-runtime/data-cells.d.ts +36 -0
- package/dist/types/shared/package-runtime/development.d.cts +4 -0
- package/dist/types/shared/package-runtime/development.d.ts +4 -0
- package/dist/types/shared/package-runtime/distribution.d.cts +36 -1
- package/dist/types/shared/package-runtime/distribution.d.ts +36 -1
- package/dist/types/shared/package-runtime/drawer-geometry.d.cts +7 -0
- package/dist/types/shared/package-runtime/drawer-geometry.d.ts +7 -0
- package/dist/types/shared/package-runtime/event-calendar.d.cts +81 -0
- package/dist/types/shared/package-runtime/event-calendar.d.ts +81 -0
- package/dist/types/shared/package-runtime/external-link.d.cts +4 -0
- package/dist/types/shared/package-runtime/external-link.d.ts +4 -0
- package/dist/types/shared/package-runtime/field-group.d.cts +17 -0
- package/dist/types/shared/package-runtime/field-group.d.ts +17 -0
- package/dist/types/shared/package-runtime/file-upload.d.cts +128 -0
- package/dist/types/shared/package-runtime/file-upload.d.ts +128 -0
- package/dist/types/shared/package-runtime/filter-scroll.d.cts +5 -0
- package/dist/types/shared/package-runtime/filter-scroll.d.ts +5 -0
- package/dist/types/shared/package-runtime/filter-value.d.cts +2 -0
- package/dist/types/shared/package-runtime/filter-value.d.ts +2 -0
- package/dist/types/shared/package-runtime/input-field.d.cts +23 -0
- package/dist/types/shared/package-runtime/input-field.d.ts +23 -0
- package/dist/types/shared/package-runtime/input-variant.d.cts +7 -0
- package/dist/types/shared/package-runtime/input-variant.d.ts +7 -0
- package/dist/types/shared/package-runtime/kpi.d.cts +13 -0
- package/dist/types/shared/package-runtime/kpi.d.ts +13 -0
- package/dist/types/shared/package-runtime/layout-primitives.d.cts +115 -6
- package/dist/types/shared/package-runtime/layout-primitives.d.ts +115 -6
- package/dist/types/shared/package-runtime/list-row.d.cts +71 -8
- package/dist/types/shared/package-runtime/list-row.d.ts +71 -8
- package/dist/types/shared/package-runtime/market-layout.d.cts +3 -1
- package/dist/types/shared/package-runtime/market-layout.d.ts +3 -1
- package/dist/types/shared/package-runtime/market-query.d.cts +6 -0
- package/dist/types/shared/package-runtime/market-query.d.ts +6 -0
- package/dist/types/shared/package-runtime/market-table.d.cts +32 -0
- package/dist/types/shared/package-runtime/market-table.d.ts +32 -0
- package/dist/types/shared/package-runtime/menu-button.d.cts +4 -0
- package/dist/types/shared/package-runtime/menu-button.d.ts +4 -0
- package/dist/types/shared/package-runtime/messages/ko.d.cts +77 -1
- package/dist/types/shared/package-runtime/messages/ko.d.ts +77 -1
- package/dist/types/shared/package-runtime/messages-context.d.cts +69 -1
- package/dist/types/shared/package-runtime/messages-context.d.ts +69 -1
- package/dist/types/shared/package-runtime/minimum-loading.d.cts +3 -0
- package/dist/types/shared/package-runtime/minimum-loading.d.ts +3 -0
- package/dist/types/shared/package-runtime/modal-geometry.d.cts +15 -0
- package/dist/types/shared/package-runtime/modal-geometry.d.ts +15 -0
- package/dist/types/shared/package-runtime/navigation.d.cts +9 -2
- package/dist/types/shared/package-runtime/navigation.d.ts +9 -2
- package/dist/types/shared/package-runtime/nested-controls.d.cts +7 -0
- package/dist/types/shared/package-runtime/nested-controls.d.ts +7 -0
- package/dist/types/shared/package-runtime/node-text.d.cts +1 -0
- package/dist/types/shared/package-runtime/node-text.d.ts +1 -0
- package/dist/types/shared/package-runtime/number-input.d.cts +73 -0
- package/dist/types/shared/package-runtime/number-input.d.ts +73 -0
- package/dist/types/shared/package-runtime/options.d.cts +25 -5
- package/dist/types/shared/package-runtime/options.d.ts +25 -5
- package/dist/types/shared/package-runtime/pagination.d.cts +12 -0
- package/dist/types/shared/package-runtime/pagination.d.ts +12 -0
- package/dist/types/shared/package-runtime/press-repeat.d.cts +13 -0
- package/dist/types/shared/package-runtime/press-repeat.d.ts +13 -0
- package/dist/types/shared/package-runtime/progress-circle.d.cts +5 -0
- package/dist/types/shared/package-runtime/progress-circle.d.ts +5 -0
- package/dist/types/shared/package-runtime/progress-marker.d.cts +7 -0
- package/dist/types/shared/package-runtime/progress-marker.d.ts +7 -0
- package/dist/types/shared/package-runtime/progress-tone.d.cts +6 -0
- package/dist/types/shared/package-runtime/progress-tone.d.ts +6 -0
- package/dist/types/shared/package-runtime/select-trigger.d.cts +23 -0
- package/dist/types/shared/package-runtime/select-trigger.d.ts +23 -0
- package/dist/types/shared/package-runtime/sheet-drag.d.cts +24 -0
- package/dist/types/shared/package-runtime/sheet-drag.d.ts +24 -0
- package/dist/types/shared/package-runtime/side-navigation-keys.d.cts +23 -0
- package/dist/types/shared/package-runtime/side-navigation-keys.d.ts +23 -0
- package/dist/types/shared/package-runtime/side-navigation-layout.d.cts +24 -0
- package/dist/types/shared/package-runtime/side-navigation-layout.d.ts +24 -0
- package/dist/types/shared/package-runtime/side-navigation-scroll.d.cts +7 -0
- package/dist/types/shared/package-runtime/side-navigation-scroll.d.ts +7 -0
- package/dist/types/shared/package-runtime/side-navigation.d.cts +277 -0
- package/dist/types/shared/package-runtime/side-navigation.d.ts +277 -0
- package/dist/types/shared/package-runtime/signed-number.d.cts +33 -0
- package/dist/types/shared/package-runtime/signed-number.d.ts +33 -0
- package/dist/types/shared/package-runtime/skeleton-text.d.cts +4 -0
- package/dist/types/shared/package-runtime/skeleton-text.d.ts +4 -0
- package/dist/types/shared/package-runtime/slider-view.d.cts +17 -2
- package/dist/types/shared/package-runtime/slider-view.d.ts +17 -2
- package/dist/types/shared/package-runtime/sparkline.d.cts +8 -4
- package/dist/types/shared/package-runtime/sparkline.d.ts +8 -4
- package/dist/types/shared/package-runtime/spinner-geometry.d.cts +14 -0
- package/dist/types/shared/package-runtime/spinner-geometry.d.ts +14 -0
- package/dist/types/shared/package-runtime/split-pane.d.cts +40 -1
- package/dist/types/shared/package-runtime/split-pane.d.ts +40 -1
- package/dist/types/shared/package-runtime/steps.d.cts +51 -0
- package/dist/types/shared/package-runtime/steps.d.ts +51 -0
- package/dist/types/shared/package-runtime/tab-keyboard.d.cts +6 -0
- package/dist/types/shared/package-runtime/tab-keyboard.d.ts +6 -0
- package/dist/types/shared/package-runtime/table-columns.d.cts +8 -0
- package/dist/types/shared/package-runtime/table-columns.d.ts +8 -0
- package/dist/types/shared/package-runtime/table-model.d.cts +23 -3
- package/dist/types/shared/package-runtime/table-model.d.ts +23 -3
- package/dist/types/shared/package-runtime/table-presentation.d.cts +12 -2
- package/dist/types/shared/package-runtime/table-presentation.d.ts +12 -2
- package/dist/types/shared/package-runtime/table.d.cts +17 -2
- package/dist/types/shared/package-runtime/table.d.ts +17 -2
- package/dist/types/shared/package-runtime/textarea.d.cts +6 -4
- package/dist/types/shared/package-runtime/textarea.d.ts +6 -4
- package/dist/types/shared/package-runtime/tiles-children.d.cts +7 -0
- package/dist/types/shared/package-runtime/tiles-children.d.ts +7 -0
- package/dist/types/shared/package-runtime/tiles.d.cts +18 -0
- package/dist/types/shared/package-runtime/tiles.d.ts +18 -0
- package/dist/types/shared/package-runtime/time-segments.d.cts +24 -0
- package/dist/types/shared/package-runtime/time-segments.d.ts +24 -0
- package/dist/types/shared/package-runtime/time-wheel.d.cts +54 -0
- package/dist/types/shared/package-runtime/time-wheel.d.ts +54 -0
- package/dist/types/shared/package-runtime/trailing-overflow.d.cts +1 -0
- package/dist/types/shared/package-runtime/trailing-overflow.d.ts +1 -0
- package/dist/types/shared/package-runtime/use-color-picker.d.cts +3 -0
- package/dist/types/shared/package-runtime/use-color-picker.d.ts +3 -0
- package/dist/types/shared/package-runtime/use-copy-feedback.d.cts +10 -0
- package/dist/types/shared/package-runtime/use-copy-feedback.d.ts +10 -0
- package/dist/types/shared/package-runtime/use-open-state.d.cts +5 -0
- package/dist/types/shared/package-runtime/use-open-state.d.ts +5 -0
- package/dist/types/shared/package-runtime/use-pending-action.d.cts +6 -0
- package/dist/types/shared/package-runtime/use-pending-action.d.ts +6 -0
- package/dist/types/shared/package-runtime/use-side-navigation-state.d.cts +25 -0
- package/dist/types/shared/package-runtime/use-side-navigation-state.d.ts +25 -0
- package/dist/types/shared/package-runtime/use-slide.d.cts +3 -0
- package/dist/types/shared/package-runtime/use-slide.d.ts +3 -0
- package/package.json +3 -3
- package/dist/types/packages/react/src/compound-control.d.cts +0 -1
- package/dist/types/packages/react/src/compound-control.d.ts +0 -1
- package/dist/types/shared/package-runtime/center-option.d.cts +0 -1
- package/dist/types/shared/package-runtime/center-option.d.ts +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type BreadcrumbItem } from "../../../shared/package-runtime/breadcrumb.cjs";
|
|
2
|
-
import { type ReactNode } from "react";
|
|
2
|
+
import { type CSSProperties, type MouseEvent, type ReactNode } from "react";
|
|
3
3
|
export * from "./tabs.cjs";
|
|
4
4
|
export interface KjunAccordionProps {
|
|
5
5
|
multiple?: boolean;
|
|
@@ -13,10 +13,19 @@ export interface KjunAccordionProps {
|
|
|
13
13
|
headingLevel?: AccordionHeadingLevel;
|
|
14
14
|
/** Open panels are labelled regions (default true). Turn off for long lists, where many landmarks crowd a screen reader. */
|
|
15
15
|
region?: boolean;
|
|
16
|
+
/** Controlled open items, by each item's value (give the items a value). A single-open Accordion shows the last one. */
|
|
17
|
+
value?: string[];
|
|
18
|
+
/** The items open at first, by value, when value is not given. */
|
|
19
|
+
defaultValue?: string[];
|
|
20
|
+
/** Requests a change when controlled; reports every change otherwise. Items without a value report an internal id. */
|
|
21
|
+
onValueChange?: (value: string[]) => void;
|
|
22
|
+
className?: string;
|
|
23
|
+
style?: CSSProperties;
|
|
24
|
+
id?: string;
|
|
16
25
|
children: ReactNode;
|
|
17
26
|
}
|
|
18
27
|
export type AccordionHeadingLevel = 2 | 3 | 4 | 5 | 6 | false;
|
|
19
|
-
export declare function KjunAccordion({ multiple, tone, divider, separated, headingLevel, region, children, }: KjunAccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function KjunAccordion({ multiple, tone, divider, separated, headingLevel, region, value, defaultValue, onValueChange, className, style, id, children, }: KjunAccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
20
29
|
export interface KjunAccordionItemProps {
|
|
21
30
|
title?: string;
|
|
22
31
|
/** A secondary line under the title (caption, secondary text). */
|
|
@@ -28,6 +37,10 @@ export interface KjunAccordionItemProps {
|
|
|
28
37
|
open?: boolean;
|
|
29
38
|
/** Requests a change on a controlled item; reports every change on an uncontrolled one (also when a sibling closes it). */
|
|
30
39
|
onOpenChange?: (open: boolean) => void;
|
|
40
|
+
/** Called once the item has finished opening, after its height motion: the panel has its full height (e.g. to scroll a result into view). */
|
|
41
|
+
onAfterOpen?: () => void;
|
|
42
|
+
/** Called once the item has finished closing. */
|
|
43
|
+
onAfterClose?: () => void;
|
|
31
44
|
/** Keeps the body mounted after it first opens, so inputs keep their state while closed. */
|
|
32
45
|
keepMounted?: boolean;
|
|
33
46
|
disabled?: boolean;
|
|
@@ -35,18 +48,29 @@ export interface KjunAccordionItemProps {
|
|
|
35
48
|
header?: ReactNode;
|
|
36
49
|
/** The header's accessible name when header is not plain text. */
|
|
37
50
|
ariaLabel?: string;
|
|
51
|
+
/** Names the item in the Accordion's value, defaultValue and onValueChange. */
|
|
52
|
+
value?: string;
|
|
53
|
+
/** Information at the end of the header, before the chevron, such as a status badge, an amount or a count.
|
|
54
|
+
* It is part of the header button, so no buttons or links. */
|
|
55
|
+
trailing?: ReactNode;
|
|
56
|
+
className?: string;
|
|
57
|
+
style?: CSSProperties;
|
|
58
|
+
id?: string;
|
|
38
59
|
children: ReactNode;
|
|
39
60
|
}
|
|
40
|
-
export declare function KjunAccordionItem({ title, description, icon, defaultOpen, disabled, header, ariaLabel, open: openProp, onOpenChange, keepMounted, children, }: KjunAccordionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export declare function KjunAccordionItem({ title, description, icon, defaultOpen, disabled, header, ariaLabel, open: openProp, onOpenChange, onAfterOpen, onAfterClose, keepMounted, value, trailing, className, style, id: rootId, children, }: KjunAccordionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
41
62
|
export type { BreadcrumbItem };
|
|
42
63
|
export interface KjunBreadcrumbProps {
|
|
43
64
|
items: BreadcrumbItem[];
|
|
44
65
|
renderLink?: (item: BreadcrumbItem, children: ReactNode) => ReactNode;
|
|
66
|
+
/** A step with `to` was chosen. Trail links keep their href and pass the click: call event.preventDefault() to route in the app.
|
|
67
|
+
* Steps folded into the "…" menu call it without an event and no longer follow their href, so a router reaches them too. */
|
|
68
|
+
onNavigate?: (item: BreadcrumbItem, event?: MouseEvent<HTMLAnchorElement>) => void;
|
|
45
69
|
ariaLabel?: string;
|
|
46
70
|
/** Folds a long trail: the first step and the last maxItems - 1 stay, and the steps between open from a "…" menu. */
|
|
47
71
|
maxItems?: number;
|
|
48
72
|
}
|
|
49
|
-
export declare function KjunBreadcrumb({ items, renderLink, ariaLabel, maxItems, }: KjunBreadcrumbProps): import("react/jsx-runtime").JSX.Element | null;
|
|
73
|
+
export declare function KjunBreadcrumb({ items, renderLink, onNavigate, ariaLabel, maxItems, }: KjunBreadcrumbProps): import("react/jsx-runtime").JSX.Element | null;
|
|
50
74
|
export interface KjunPaginationProps {
|
|
51
75
|
currentPage?: number;
|
|
52
76
|
page?: number;
|
|
@@ -58,9 +82,14 @@ export interface KjunPaginationProps {
|
|
|
58
82
|
showInfo?: boolean;
|
|
59
83
|
showSizeSelector?: boolean;
|
|
60
84
|
showFirstLast?: boolean;
|
|
85
|
+
/** "auto" switches to the short form below the pagination breakpoint; "full" and "compact" keep one form. */
|
|
86
|
+
layout?: KjunPaginationLayout;
|
|
87
|
+
/** Locks every control, for example while the next page loads. The current page keeps its fill. */
|
|
88
|
+
disabled?: boolean;
|
|
61
89
|
formatter?: (value: number) => string;
|
|
62
90
|
onPageChange?: (page: number) => void;
|
|
63
91
|
onChange?: (page: number) => void;
|
|
64
92
|
onPageSizeChange?: (size: number) => void;
|
|
65
93
|
}
|
|
66
|
-
export
|
|
94
|
+
export type KjunPaginationLayout = "auto" | "full" | "compact";
|
|
95
|
+
export declare function KjunPagination({ currentPage, page, totalPages, totalRows, pageSize, pageSizeOptions, siblingCount, showInfo, showSizeSelector, showFirstLast, layout, disabled, formatter, onPageChange, onChange, onPageSizeChange, }: KjunPaginationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type BreadcrumbItem } from "../../../shared/package-runtime/breadcrumb.js";
|
|
2
|
-
import { type ReactNode } from "react";
|
|
2
|
+
import { type CSSProperties, type MouseEvent, type ReactNode } from "react";
|
|
3
3
|
export * from "./tabs.js";
|
|
4
4
|
export interface KjunAccordionProps {
|
|
5
5
|
multiple?: boolean;
|
|
@@ -13,10 +13,19 @@ export interface KjunAccordionProps {
|
|
|
13
13
|
headingLevel?: AccordionHeadingLevel;
|
|
14
14
|
/** Open panels are labelled regions (default true). Turn off for long lists, where many landmarks crowd a screen reader. */
|
|
15
15
|
region?: boolean;
|
|
16
|
+
/** Controlled open items, by each item's value (give the items a value). A single-open Accordion shows the last one. */
|
|
17
|
+
value?: string[];
|
|
18
|
+
/** The items open at first, by value, when value is not given. */
|
|
19
|
+
defaultValue?: string[];
|
|
20
|
+
/** Requests a change when controlled; reports every change otherwise. Items without a value report an internal id. */
|
|
21
|
+
onValueChange?: (value: string[]) => void;
|
|
22
|
+
className?: string;
|
|
23
|
+
style?: CSSProperties;
|
|
24
|
+
id?: string;
|
|
16
25
|
children: ReactNode;
|
|
17
26
|
}
|
|
18
27
|
export type AccordionHeadingLevel = 2 | 3 | 4 | 5 | 6 | false;
|
|
19
|
-
export declare function KjunAccordion({ multiple, tone, divider, separated, headingLevel, region, children, }: KjunAccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function KjunAccordion({ multiple, tone, divider, separated, headingLevel, region, value, defaultValue, onValueChange, className, style, id, children, }: KjunAccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
20
29
|
export interface KjunAccordionItemProps {
|
|
21
30
|
title?: string;
|
|
22
31
|
/** A secondary line under the title (caption, secondary text). */
|
|
@@ -28,6 +37,10 @@ export interface KjunAccordionItemProps {
|
|
|
28
37
|
open?: boolean;
|
|
29
38
|
/** Requests a change on a controlled item; reports every change on an uncontrolled one (also when a sibling closes it). */
|
|
30
39
|
onOpenChange?: (open: boolean) => void;
|
|
40
|
+
/** Called once the item has finished opening, after its height motion: the panel has its full height (e.g. to scroll a result into view). */
|
|
41
|
+
onAfterOpen?: () => void;
|
|
42
|
+
/** Called once the item has finished closing. */
|
|
43
|
+
onAfterClose?: () => void;
|
|
31
44
|
/** Keeps the body mounted after it first opens, so inputs keep their state while closed. */
|
|
32
45
|
keepMounted?: boolean;
|
|
33
46
|
disabled?: boolean;
|
|
@@ -35,18 +48,29 @@ export interface KjunAccordionItemProps {
|
|
|
35
48
|
header?: ReactNode;
|
|
36
49
|
/** The header's accessible name when header is not plain text. */
|
|
37
50
|
ariaLabel?: string;
|
|
51
|
+
/** Names the item in the Accordion's value, defaultValue and onValueChange. */
|
|
52
|
+
value?: string;
|
|
53
|
+
/** Information at the end of the header, before the chevron, such as a status badge, an amount or a count.
|
|
54
|
+
* It is part of the header button, so no buttons or links. */
|
|
55
|
+
trailing?: ReactNode;
|
|
56
|
+
className?: string;
|
|
57
|
+
style?: CSSProperties;
|
|
58
|
+
id?: string;
|
|
38
59
|
children: ReactNode;
|
|
39
60
|
}
|
|
40
|
-
export declare function KjunAccordionItem({ title, description, icon, defaultOpen, disabled, header, ariaLabel, open: openProp, onOpenChange, keepMounted, children, }: KjunAccordionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export declare function KjunAccordionItem({ title, description, icon, defaultOpen, disabled, header, ariaLabel, open: openProp, onOpenChange, onAfterOpen, onAfterClose, keepMounted, value, trailing, className, style, id: rootId, children, }: KjunAccordionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
41
62
|
export type { BreadcrumbItem };
|
|
42
63
|
export interface KjunBreadcrumbProps {
|
|
43
64
|
items: BreadcrumbItem[];
|
|
44
65
|
renderLink?: (item: BreadcrumbItem, children: ReactNode) => ReactNode;
|
|
66
|
+
/** A step with `to` was chosen. Trail links keep their href and pass the click: call event.preventDefault() to route in the app.
|
|
67
|
+
* Steps folded into the "…" menu call it without an event and no longer follow their href, so a router reaches them too. */
|
|
68
|
+
onNavigate?: (item: BreadcrumbItem, event?: MouseEvent<HTMLAnchorElement>) => void;
|
|
45
69
|
ariaLabel?: string;
|
|
46
70
|
/** Folds a long trail: the first step and the last maxItems - 1 stay, and the steps between open from a "…" menu. */
|
|
47
71
|
maxItems?: number;
|
|
48
72
|
}
|
|
49
|
-
export declare function KjunBreadcrumb({ items, renderLink, ariaLabel, maxItems, }: KjunBreadcrumbProps): import("react/jsx-runtime").JSX.Element | null;
|
|
73
|
+
export declare function KjunBreadcrumb({ items, renderLink, onNavigate, ariaLabel, maxItems, }: KjunBreadcrumbProps): import("react/jsx-runtime").JSX.Element | null;
|
|
50
74
|
export interface KjunPaginationProps {
|
|
51
75
|
currentPage?: number;
|
|
52
76
|
page?: number;
|
|
@@ -58,9 +82,14 @@ export interface KjunPaginationProps {
|
|
|
58
82
|
showInfo?: boolean;
|
|
59
83
|
showSizeSelector?: boolean;
|
|
60
84
|
showFirstLast?: boolean;
|
|
85
|
+
/** "auto" switches to the short form below the pagination breakpoint; "full" and "compact" keep one form. */
|
|
86
|
+
layout?: KjunPaginationLayout;
|
|
87
|
+
/** Locks every control, for example while the next page loads. The current page keeps its fill. */
|
|
88
|
+
disabled?: boolean;
|
|
61
89
|
formatter?: (value: number) => string;
|
|
62
90
|
onPageChange?: (page: number) => void;
|
|
63
91
|
onChange?: (page: number) => void;
|
|
64
92
|
onPageSizeChange?: (size: number) => void;
|
|
65
93
|
}
|
|
66
|
-
export
|
|
94
|
+
export type KjunPaginationLayout = "auto" | "full" | "compact";
|
|
95
|
+
export declare function KjunPagination({ currentPage, page, totalPages, totalRows, pageSize, pageSizeOptions, siblingCount, showInfo, showSizeSelector, showFirstLast, layout, disabled, formatter, onPageChange, onChange, onPageSizeChange, }: KjunPaginationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
+
import { type PriceFlash } from "../../../shared/package-runtime/data-cells.cjs";
|
|
2
3
|
/** A leading sign drawn tight to its digits (see splitNumberSign); other content passes through. */
|
|
3
4
|
export declare function signedText(value: ReactNode): ReactNode;
|
|
4
|
-
export
|
|
5
|
-
export declare const format: (value: number, decimals?: number) => string;
|
|
5
|
+
export { finiteNumber, format } from "../../../shared/package-runtime/signed-number.cjs";
|
|
6
6
|
export declare function useCountUp(value: number | string, animated: boolean, fromPrevious: boolean): string | number;
|
|
7
7
|
export interface KjunAnimatedNumberProps {
|
|
8
8
|
value: number | string;
|
|
@@ -26,14 +26,17 @@ export interface KjunPriceCellProps {
|
|
|
26
26
|
/** The app's status after the price, such as a KjunBadge; KJUN owns only its spacing and alignment.
|
|
27
27
|
* With no price (value null) a status still shows after a dash, for states such as "거래정지"; without one null is loading. */
|
|
28
28
|
status?: ReactNode;
|
|
29
|
+
/** Flash when the value moves: true or "text" colours the digits up or down, "background" fills the cell's pill.
|
|
30
|
+
* Off under reduced motion. */
|
|
31
|
+
flash?: PriceFlash;
|
|
32
|
+
/** @deprecated Use flash. A class the app adds and removes itself. */
|
|
29
33
|
flashClass?: string;
|
|
30
34
|
fromPrevious?: boolean;
|
|
31
35
|
}
|
|
32
|
-
export declare function KjunPriceCell({ value, formatter, stale, status, flashClass, fromPrevious, }: KjunPriceCellProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare function KjunPriceCell({ value, formatter, stale, status, flash, flashClass, fromPrevious, }: KjunPriceCellProps): import("react/jsx-runtime").JSX.Element;
|
|
33
37
|
export interface KjunSignedValueProps {
|
|
34
38
|
value?: number | string | null;
|
|
35
39
|
format?: "number" | "percent";
|
|
36
|
-
isRaw?: boolean;
|
|
37
40
|
decimals?: number;
|
|
38
41
|
prefix?: string;
|
|
39
42
|
suffix?: string;
|
|
@@ -43,4 +46,4 @@ export interface KjunSignedValueProps {
|
|
|
43
46
|
stale?: boolean;
|
|
44
47
|
formatter?: (value: number) => string;
|
|
45
48
|
}
|
|
46
|
-
export declare function KjunSignedValue({ value, format: kind,
|
|
49
|
+
export declare function KjunSignedValue({ value, format: kind, decimals, prefix, suffix, showSign, tone, loading, stale, formatter, }: KjunSignedValueProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
+
import { type PriceFlash } from "../../../shared/package-runtime/data-cells.js";
|
|
2
3
|
/** A leading sign drawn tight to its digits (see splitNumberSign); other content passes through. */
|
|
3
4
|
export declare function signedText(value: ReactNode): ReactNode;
|
|
4
|
-
export
|
|
5
|
-
export declare const format: (value: number, decimals?: number) => string;
|
|
5
|
+
export { finiteNumber, format } from "../../../shared/package-runtime/signed-number.js";
|
|
6
6
|
export declare function useCountUp(value: number | string, animated: boolean, fromPrevious: boolean): string | number;
|
|
7
7
|
export interface KjunAnimatedNumberProps {
|
|
8
8
|
value: number | string;
|
|
@@ -26,14 +26,17 @@ export interface KjunPriceCellProps {
|
|
|
26
26
|
/** The app's status after the price, such as a KjunBadge; KJUN owns only its spacing and alignment.
|
|
27
27
|
* With no price (value null) a status still shows after a dash, for states such as "거래정지"; without one null is loading. */
|
|
28
28
|
status?: ReactNode;
|
|
29
|
+
/** Flash when the value moves: true or "text" colours the digits up or down, "background" fills the cell's pill.
|
|
30
|
+
* Off under reduced motion. */
|
|
31
|
+
flash?: PriceFlash;
|
|
32
|
+
/** @deprecated Use flash. A class the app adds and removes itself. */
|
|
29
33
|
flashClass?: string;
|
|
30
34
|
fromPrevious?: boolean;
|
|
31
35
|
}
|
|
32
|
-
export declare function KjunPriceCell({ value, formatter, stale, status, flashClass, fromPrevious, }: KjunPriceCellProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare function KjunPriceCell({ value, formatter, stale, status, flash, flashClass, fromPrevious, }: KjunPriceCellProps): import("react/jsx-runtime").JSX.Element;
|
|
33
37
|
export interface KjunSignedValueProps {
|
|
34
38
|
value?: number | string | null;
|
|
35
39
|
format?: "number" | "percent";
|
|
36
|
-
isRaw?: boolean;
|
|
37
40
|
decimals?: number;
|
|
38
41
|
prefix?: string;
|
|
39
42
|
suffix?: string;
|
|
@@ -43,4 +46,4 @@ export interface KjunSignedValueProps {
|
|
|
43
46
|
stale?: boolean;
|
|
44
47
|
formatter?: (value: number) => string;
|
|
45
48
|
}
|
|
46
|
-
export declare function KjunSignedValue({ value, format: kind,
|
|
49
|
+
export declare function KjunSignedValue({ value, format: kind, decimals, prefix, suffix, showSign, tone, loading, stale, formatter, }: KjunSignedValueProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from "react";
|
|
2
|
+
import { type InputSize } from "@kjun-ui/tokens";
|
|
3
|
+
import { type NumberInputOptions } from "../../../shared/package-runtime/number-input.cjs";
|
|
4
|
+
export interface KjunNumberInputProps extends NumberInputOptions {
|
|
5
|
+
/** Normalized value without group separators: "", "1250000", "-3.5", "12.50". */
|
|
6
|
+
value: string;
|
|
7
|
+
prefix?: ReactNode;
|
|
8
|
+
suffix?: ReactNode;
|
|
9
|
+
/** Shows "1억 2,003만 5,000 원" under the field for integers of 10,000 or more. */
|
|
10
|
+
readingAid?: boolean;
|
|
11
|
+
align?: "start" | "end";
|
|
12
|
+
size?: InputSize;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
readOnly?: boolean;
|
|
15
|
+
error?: boolean;
|
|
16
|
+
id?: string;
|
|
17
|
+
ariaLabel?: string;
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
/** Submits the normalized value ("1250000", fraction padded) with a surrounding form under this name; not sent while disabled. */
|
|
20
|
+
name?: string;
|
|
21
|
+
/** Every edit, unpadded; also the committed value when committing or cancelling changes it. */
|
|
22
|
+
onValueChange?: (value: string) => void;
|
|
23
|
+
/** Blur or Enter, with the fraction padded to `decimals`. */
|
|
24
|
+
onChangeCommit?: (value: string) => void;
|
|
25
|
+
className?: string;
|
|
26
|
+
style?: CSSProperties;
|
|
27
|
+
}
|
|
28
|
+
export declare function KjunNumberInput({ value, format, decimals, grouping, allowNegative, min, max, step, prefix, suffix, readingAid, align, size, disabled, readOnly, error, id, ariaLabel, placeholder, name, onValueChange, onChangeCommit, className, style, }: KjunNumberInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from "react";
|
|
2
|
+
import { type InputSize } from "@kjun-ui/tokens";
|
|
3
|
+
import { type NumberInputOptions } from "../../../shared/package-runtime/number-input.js";
|
|
4
|
+
export interface KjunNumberInputProps extends NumberInputOptions {
|
|
5
|
+
/** Normalized value without group separators: "", "1250000", "-3.5", "12.50". */
|
|
6
|
+
value: string;
|
|
7
|
+
prefix?: ReactNode;
|
|
8
|
+
suffix?: ReactNode;
|
|
9
|
+
/** Shows "1억 2,003만 5,000 원" under the field for integers of 10,000 or more. */
|
|
10
|
+
readingAid?: boolean;
|
|
11
|
+
align?: "start" | "end";
|
|
12
|
+
size?: InputSize;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
readOnly?: boolean;
|
|
15
|
+
error?: boolean;
|
|
16
|
+
id?: string;
|
|
17
|
+
ariaLabel?: string;
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
/** Submits the normalized value ("1250000", fraction padded) with a surrounding form under this name; not sent while disabled. */
|
|
20
|
+
name?: string;
|
|
21
|
+
/** Every edit, unpadded; also the committed value when committing or cancelling changes it. */
|
|
22
|
+
onValueChange?: (value: string) => void;
|
|
23
|
+
/** Blur or Enter, with the fraction padded to `decimals`. */
|
|
24
|
+
onChangeCommit?: (value: string) => void;
|
|
25
|
+
className?: string;
|
|
26
|
+
style?: CSSProperties;
|
|
27
|
+
}
|
|
28
|
+
export declare function KjunNumberInput({ value, format, decimals, grouping, allowNegative, min, max, step, prefix, suffix, readingAid, align, size, disabled, readOnly, error, id, ariaLabel, placeholder, name, onValueChange, onChangeCommit, className, style, }: KjunNumberInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,6 +19,9 @@ export interface KjunPopoverProps {
|
|
|
19
19
|
/** Fixed header above the body; only the body scrolls and maxHeight covers both. Names the dialog without ariaLabel.
|
|
20
20
|
* A function receives close, for a close button in the header. */
|
|
21
21
|
header?: ReactNode | ((close: () => void) => ReactNode);
|
|
22
|
+
/** Fixed footer below the body (actions such as FormActions); only the body scrolls and fades above it.
|
|
23
|
+
* A function receives close. */
|
|
24
|
+
footer?: ReactNode | ((close: () => void) => ReactNode);
|
|
22
25
|
/** false keeps the page usable: Tab can leave, and an outside press or focus move closes without returning focus. */
|
|
23
26
|
modal?: boolean;
|
|
24
27
|
/** Attach to this screen rectangle (or a function read every frame while open) instead of the trigger. Web only.
|
|
@@ -27,8 +30,8 @@ export interface KjunPopoverProps {
|
|
|
27
30
|
trigger?: ReactNode | ((open: boolean) => ReactNode);
|
|
28
31
|
children: ReactNode | ((close: () => void) => ReactNode);
|
|
29
32
|
}
|
|
30
|
-
export type PopoverPlacement = "top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end";
|
|
31
|
-
export declare function KjunPopover({ noPadding, open: controlled, onOpenChange, manualTrigger, matchTriggerWidth, width, maxHeight, flip, focusOnOpen, ariaLabel, placement, returnFocus, header, modal, anchorRect, trigger, children, }: KjunPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export type PopoverPlacement = "top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end";
|
|
34
|
+
export declare function KjunPopover({ noPadding, open: controlled, onOpenChange, manualTrigger, matchTriggerWidth, width, maxHeight, flip, focusOnOpen, ariaLabel, placement, returnFocus, header, footer, modal, anchorRect, trigger, children, }: KjunPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
32
35
|
export interface KjunTooltipProps {
|
|
33
36
|
content?: string;
|
|
34
37
|
/** A bolder line above content (a file name above its path). Read together with content. */
|
|
@@ -19,6 +19,9 @@ export interface KjunPopoverProps {
|
|
|
19
19
|
/** Fixed header above the body; only the body scrolls and maxHeight covers both. Names the dialog without ariaLabel.
|
|
20
20
|
* A function receives close, for a close button in the header. */
|
|
21
21
|
header?: ReactNode | ((close: () => void) => ReactNode);
|
|
22
|
+
/** Fixed footer below the body (actions such as FormActions); only the body scrolls and fades above it.
|
|
23
|
+
* A function receives close. */
|
|
24
|
+
footer?: ReactNode | ((close: () => void) => ReactNode);
|
|
22
25
|
/** false keeps the page usable: Tab can leave, and an outside press or focus move closes without returning focus. */
|
|
23
26
|
modal?: boolean;
|
|
24
27
|
/** Attach to this screen rectangle (or a function read every frame while open) instead of the trigger. Web only.
|
|
@@ -27,8 +30,8 @@ export interface KjunPopoverProps {
|
|
|
27
30
|
trigger?: ReactNode | ((open: boolean) => ReactNode);
|
|
28
31
|
children: ReactNode | ((close: () => void) => ReactNode);
|
|
29
32
|
}
|
|
30
|
-
export type PopoverPlacement = "top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end";
|
|
31
|
-
export declare function KjunPopover({ noPadding, open: controlled, onOpenChange, manualTrigger, matchTriggerWidth, width, maxHeight, flip, focusOnOpen, ariaLabel, placement, returnFocus, header, modal, anchorRect, trigger, children, }: KjunPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export type PopoverPlacement = "top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end";
|
|
34
|
+
export declare function KjunPopover({ noPadding, open: controlled, onOpenChange, manualTrigger, matchTriggerWidth, width, maxHeight, flip, focusOnOpen, ariaLabel, placement, returnFocus, header, footer, modal, anchorRect, trigger, children, }: KjunPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
32
35
|
export interface KjunTooltipProps {
|
|
33
36
|
content?: string;
|
|
34
37
|
/** A bolder line above content (a file name above its path). Read together with content. */
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type HTMLAttributes } from "react";
|
|
2
|
+
export interface KjunPressableProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "autoFocus"> {
|
|
3
|
+
/** The name read by screen readers; needed when the content has no text of its own. */
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
/** Blocks presses and dims the content. */
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/** "overlay" (default) lays a tint over the content on hover and press, which shows on photos as well as on text; "none" leaves the content to show its own. */
|
|
8
|
+
pressEffect?: "overlay" | "none";
|
|
9
|
+
/** Draws the keyboard focus ring inside the area, for one that reaches the screen edge or sits in a clipping parent. */
|
|
10
|
+
focusRingInset?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* An area that presses, with no shape of its own: for content that is not a button, a card or a list row
|
|
14
|
+
* (a map preview, a photo tile). The app gives the shape through className or style; KJUN supplies the press layer,
|
|
15
|
+
* the focus ring, the button role and the disabled state. Do not put buttons or links inside.
|
|
16
|
+
*/
|
|
17
|
+
export declare const KjunPressable: import("react").ForwardRefExoticComponent<KjunPressableProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type HTMLAttributes } from "react";
|
|
2
|
+
export interface KjunPressableProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "autoFocus"> {
|
|
3
|
+
/** The name read by screen readers; needed when the content has no text of its own. */
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
/** Blocks presses and dims the content. */
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/** "overlay" (default) lays a tint over the content on hover and press, which shows on photos as well as on text; "none" leaves the content to show its own. */
|
|
8
|
+
pressEffect?: "overlay" | "none";
|
|
9
|
+
/** Draws the keyboard focus ring inside the area, for one that reaches the screen edge or sits in a clipping parent. */
|
|
10
|
+
focusRingInset?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* An area that presses, with no shape of its own: for content that is not a button, a card or a list row
|
|
14
|
+
* (a map preview, a photo tile). The app gives the shape through className or style; KJUN supplies the press layer,
|
|
15
|
+
* the focus ring, the button role and the disabled state. Do not put buttons or links inside.
|
|
16
|
+
*/
|
|
17
|
+
export declare const KjunPressable: import("react").ForwardRefExoticComponent<KjunPressableProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -11,8 +11,10 @@ export interface KjunQuantityStepperProps {
|
|
|
11
11
|
block?: boolean;
|
|
12
12
|
id?: string;
|
|
13
13
|
ariaLabel?: string;
|
|
14
|
+
/** Submits the value with a surrounding form under this name (a hidden input); not sent while disabled. */
|
|
15
|
+
name?: string;
|
|
14
16
|
onValueChange?: (value: number) => void;
|
|
15
17
|
onChangeCommit?: (value: number) => void;
|
|
16
18
|
onInvalidInput?: (draft: string) => void;
|
|
17
19
|
}
|
|
18
|
-
export declare function KjunQuantityStepper({ value, min, max, step, precision, disabled, error, size, block, id, ariaLabel, onValueChange, onChangeCommit, onInvalidInput }: KjunQuantityStepperProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function KjunQuantityStepper({ value, min, max, step, precision, disabled, error, size, block, id, ariaLabel, name, onValueChange, onChangeCommit, onInvalidInput }: KjunQuantityStepperProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,8 +11,10 @@ export interface KjunQuantityStepperProps {
|
|
|
11
11
|
block?: boolean;
|
|
12
12
|
id?: string;
|
|
13
13
|
ariaLabel?: string;
|
|
14
|
+
/** Submits the value with a surrounding form under this name (a hidden input); not sent while disabled. */
|
|
15
|
+
name?: string;
|
|
14
16
|
onValueChange?: (value: number) => void;
|
|
15
17
|
onChangeCommit?: (value: number) => void;
|
|
16
18
|
onInvalidInput?: (draft: string) => void;
|
|
17
19
|
}
|
|
18
|
-
export declare function KjunQuantityStepper({ value, min, max, step, precision, disabled, error, size, block, id, ariaLabel, onValueChange, onChangeCommit, onInvalidInput }: KjunQuantityStepperProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function KjunQuantityStepper({ value, min, max, step, precision, disabled, error, size, block, id, ariaLabel, name, onValueChange, onChangeCommit, onInvalidInput }: KjunQuantityStepperProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type SliderMarks, type SliderOrientation } from "../../../shared/package-runtime/slider-view.cjs";
|
|
2
|
-
export type { KjunSliderMark } from "../../../shared/package-runtime/slider-view.cjs";
|
|
1
|
+
import { type SliderMarks, type SliderOrientation, type SliderValueLabel } from "../../../shared/package-runtime/slider-view.cjs";
|
|
2
|
+
export type { KjunSliderMark, SliderValueLabel as KjunSliderValueLabel } from "../../../shared/package-runtime/slider-view.cjs";
|
|
3
|
+
import { type CSSProperties } from "react";
|
|
3
4
|
export interface KjunSliderProps {
|
|
4
5
|
value: number;
|
|
5
6
|
min?: number;
|
|
@@ -19,14 +20,25 @@ export interface KjunSliderProps {
|
|
|
19
20
|
/** vertical: the rail runs bottom (min) to top (max), `length` px long. */
|
|
20
21
|
orientation?: SliderOrientation;
|
|
21
22
|
length?: number;
|
|
23
|
+
/** The value in a bubble on the thumb: "drag" while dragging or keyboard-focused, "always", or "off" (default). Follows formatValue. */
|
|
24
|
+
valueLabel?: SliderValueLabel;
|
|
25
|
+
/** The fill grows from this value instead of min, for two-way values such as -50…50; a tick marks it. Single slider only. */
|
|
26
|
+
fillOrigin?: number;
|
|
27
|
+
/** Submitted with a form through a hidden input; a range submits two values under the name. */
|
|
28
|
+
name?: string;
|
|
29
|
+
id?: string;
|
|
30
|
+
className?: string;
|
|
31
|
+
style?: CSSProperties;
|
|
22
32
|
onValueChange?: (value: number) => void;
|
|
23
33
|
onChangeCommit?: (value: number) => void;
|
|
24
34
|
}
|
|
25
|
-
export interface KjunRangeSliderProps extends Omit<KjunSliderProps, "value" | "onValueChange" | "onChangeCommit"> {
|
|
35
|
+
export interface KjunRangeSliderProps extends Omit<KjunSliderProps, "value" | "fillOrigin" | "onValueChange" | "onChangeCommit"> {
|
|
26
36
|
value: [
|
|
27
37
|
number,
|
|
28
38
|
number
|
|
29
39
|
];
|
|
40
|
+
/** The fewest steps the two thumbs keep between them; 0 (default) lets them meet. */
|
|
41
|
+
minStepsBetweenThumbs?: number;
|
|
30
42
|
thumbLabels?: [
|
|
31
43
|
string,
|
|
32
44
|
string
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type SliderMarks, type SliderOrientation } from "../../../shared/package-runtime/slider-view.js";
|
|
2
|
-
export type { KjunSliderMark } from "../../../shared/package-runtime/slider-view.js";
|
|
1
|
+
import { type SliderMarks, type SliderOrientation, type SliderValueLabel } from "../../../shared/package-runtime/slider-view.js";
|
|
2
|
+
export type { KjunSliderMark, SliderValueLabel as KjunSliderValueLabel } from "../../../shared/package-runtime/slider-view.js";
|
|
3
|
+
import { type CSSProperties } from "react";
|
|
3
4
|
export interface KjunSliderProps {
|
|
4
5
|
value: number;
|
|
5
6
|
min?: number;
|
|
@@ -19,14 +20,25 @@ export interface KjunSliderProps {
|
|
|
19
20
|
/** vertical: the rail runs bottom (min) to top (max), `length` px long. */
|
|
20
21
|
orientation?: SliderOrientation;
|
|
21
22
|
length?: number;
|
|
23
|
+
/** The value in a bubble on the thumb: "drag" while dragging or keyboard-focused, "always", or "off" (default). Follows formatValue. */
|
|
24
|
+
valueLabel?: SliderValueLabel;
|
|
25
|
+
/** The fill grows from this value instead of min, for two-way values such as -50…50; a tick marks it. Single slider only. */
|
|
26
|
+
fillOrigin?: number;
|
|
27
|
+
/** Submitted with a form through a hidden input; a range submits two values under the name. */
|
|
28
|
+
name?: string;
|
|
29
|
+
id?: string;
|
|
30
|
+
className?: string;
|
|
31
|
+
style?: CSSProperties;
|
|
22
32
|
onValueChange?: (value: number) => void;
|
|
23
33
|
onChangeCommit?: (value: number) => void;
|
|
24
34
|
}
|
|
25
|
-
export interface KjunRangeSliderProps extends Omit<KjunSliderProps, "value" | "onValueChange" | "onChangeCommit"> {
|
|
35
|
+
export interface KjunRangeSliderProps extends Omit<KjunSliderProps, "value" | "fillOrigin" | "onValueChange" | "onChangeCommit"> {
|
|
26
36
|
value: [
|
|
27
37
|
number,
|
|
28
38
|
number
|
|
29
39
|
];
|
|
40
|
+
/** The fewest steps the two thumbs keep between them; 0 (default) lets them meet. */
|
|
41
|
+
minStepsBetweenThumbs?: number;
|
|
30
42
|
thumbLabels?: [
|
|
31
43
|
string,
|
|
32
44
|
string
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
|
-
import { type ReactNode } from "react";
|
|
2
|
+
import { type ReactElement, type ReactNode, type RefAttributes } from "react";
|
|
3
3
|
import { type SearchInputModelProps } from "../../../shared/package-runtime/search-input.cjs";
|
|
4
|
+
import { type SearchFieldInputProps } from "./combobox.cjs";
|
|
4
5
|
import { SelectOption } from "./select-options.cjs";
|
|
5
|
-
export interface KjunSearchInputProps<T extends SelectOption = SelectOption> extends SearchInputModelProps<T> {
|
|
6
|
+
export interface KjunSearchInputProps<T extends SelectOption = SelectOption> extends SearchInputModelProps<T>, Pick<SearchFieldInputProps, "id" | "name" | "className" | "style" | "autoFocus" | "autoComplete" | "readOnly" | "required" | "inputMode" | "enterKeyHint" | "onFocus" | "onBlur" | "aria-describedby" | "aria-labelledby"> {
|
|
6
7
|
placeholder?: string;
|
|
7
8
|
ariaLabel?: string;
|
|
8
9
|
error?: boolean;
|
|
9
10
|
clearable?: boolean;
|
|
10
11
|
size?: InputSize;
|
|
12
|
+
/** Plain mode: the search icon turns into a spinner while results load elsewhere on the page (a table, a grid). */
|
|
13
|
+
loading?: boolean;
|
|
11
14
|
itemKey?: string;
|
|
12
15
|
labelField?: string;
|
|
13
16
|
emptyText?: string;
|
|
@@ -18,4 +21,4 @@ export interface KjunSearchInputProps<T extends SelectOption = SelectOption> ext
|
|
|
18
21
|
onEnter?: () => void;
|
|
19
22
|
onClear?: () => void;
|
|
20
23
|
}
|
|
21
|
-
export declare
|
|
24
|
+
export declare const KjunSearchInput: <T extends SelectOption = SelectOption>(props: KjunSearchInputProps<T> & RefAttributes<HTMLInputElement>) => ReactElement;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
|
-
import { type ReactNode } from "react";
|
|
2
|
+
import { type ReactElement, type ReactNode, type RefAttributes } from "react";
|
|
3
3
|
import { type SearchInputModelProps } from "../../../shared/package-runtime/search-input.js";
|
|
4
|
+
import { type SearchFieldInputProps } from "./combobox.js";
|
|
4
5
|
import { SelectOption } from "./select-options.js";
|
|
5
|
-
export interface KjunSearchInputProps<T extends SelectOption = SelectOption> extends SearchInputModelProps<T> {
|
|
6
|
+
export interface KjunSearchInputProps<T extends SelectOption = SelectOption> extends SearchInputModelProps<T>, Pick<SearchFieldInputProps, "id" | "name" | "className" | "style" | "autoFocus" | "autoComplete" | "readOnly" | "required" | "inputMode" | "enterKeyHint" | "onFocus" | "onBlur" | "aria-describedby" | "aria-labelledby"> {
|
|
6
7
|
placeholder?: string;
|
|
7
8
|
ariaLabel?: string;
|
|
8
9
|
error?: boolean;
|
|
9
10
|
clearable?: boolean;
|
|
10
11
|
size?: InputSize;
|
|
12
|
+
/** Plain mode: the search icon turns into a spinner while results load elsewhere on the page (a table, a grid). */
|
|
13
|
+
loading?: boolean;
|
|
11
14
|
itemKey?: string;
|
|
12
15
|
labelField?: string;
|
|
13
16
|
emptyText?: string;
|
|
@@ -18,4 +21,4 @@ export interface KjunSearchInputProps<T extends SelectOption = SelectOption> ext
|
|
|
18
21
|
onEnter?: () => void;
|
|
19
22
|
onClear?: () => void;
|
|
20
23
|
}
|
|
21
|
-
export declare
|
|
24
|
+
export declare const KjunSearchInput: <T extends SelectOption = SelectOption>(props: KjunSearchInputProps<T> & RefAttributes<HTMLInputElement>) => ReactElement;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
|
+
import type { SelectMultipleDisplay } from "../../../shared/package-runtime/options.cjs";
|
|
3
4
|
import { type FocusReturn } from "./floating-panel.cjs";
|
|
4
5
|
import { OptionValue, SelectOption } from "./select-options.cjs";
|
|
5
6
|
export interface KjunSelectProps<T extends SelectOption = SelectOption> {
|
|
6
7
|
value: OptionValue | OptionValue[] | null;
|
|
8
|
+
/** Options, or groups `{ label, options }` that put a title over their options. */
|
|
7
9
|
options?: T[];
|
|
8
10
|
placeholder?: string;
|
|
9
11
|
ariaLabel?: string;
|
|
@@ -24,10 +26,13 @@ export interface KjunSelectProps<T extends SelectOption = SelectOption> {
|
|
|
24
26
|
optionPageSize?: number;
|
|
25
27
|
clearable?: boolean;
|
|
26
28
|
multiple?: boolean;
|
|
29
|
+
/** With multiple: "count" shows "N selected" for two or more, "labels" names them and counts the ones that do not fit. */
|
|
30
|
+
multipleDisplay?: SelectMultipleDisplay;
|
|
27
31
|
error?: boolean;
|
|
28
32
|
menuHeader?: ReactNode;
|
|
29
33
|
renderOption?: (option: T, selected: boolean) => ReactNode;
|
|
30
|
-
|
|
34
|
+
/** `value` lets a value whose option has not loaded yet still show something. */
|
|
35
|
+
renderSelected?: (option: T | undefined, value: OptionValue | OptionValue[] | null) => ReactNode;
|
|
31
36
|
onValueChange?: (v: OptionValue | OptionValue[] | null) => void;
|
|
32
37
|
onChange?: (v: OptionValue | OptionValue[] | null) => void;
|
|
33
38
|
onOpenChange?: (v: boolean) => void;
|
|
@@ -40,4 +45,4 @@ export interface KjunSelectProps<T extends SelectOption = SelectOption> {
|
|
|
40
45
|
/** Where focus goes when the menu closes by choosing or Escape, instead of the trigger (e.g. an edited cell). Web only. */
|
|
41
46
|
returnFocus?: FocusReturn;
|
|
42
47
|
}
|
|
43
|
-
export declare function KjunSelect<T extends SelectOption = SelectOption>({ value, options, placeholder, ariaLabel, labelKey, id: triggerId, ariaDescribedBy, valueKey, size, disabled, readOnly, searchable, open: controlled, loading, searchPlaceholder, optionPageSize, clearable, multiple, error, menuHeader, renderOption, renderSelected, onValueChange, onChange, onOpenChange, onSearch, onClear, filterFn, searchKeys, returnFocus, }: KjunSelectProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export declare function KjunSelect<T extends SelectOption = SelectOption>({ value, options, placeholder, ariaLabel, labelKey, id: triggerId, ariaDescribedBy, valueKey, size, disabled, readOnly, searchable, open: controlled, loading, searchPlaceholder, optionPageSize, clearable, multiple, multipleDisplay, error, menuHeader, renderOption, renderSelected, onValueChange, onChange, onOpenChange, onSearch, onClear, filterFn, searchKeys, returnFocus, }: KjunSelectProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
|
+
import type { SelectMultipleDisplay } from "../../../shared/package-runtime/options.js";
|
|
3
4
|
import { type FocusReturn } from "./floating-panel.js";
|
|
4
5
|
import { OptionValue, SelectOption } from "./select-options.js";
|
|
5
6
|
export interface KjunSelectProps<T extends SelectOption = SelectOption> {
|
|
6
7
|
value: OptionValue | OptionValue[] | null;
|
|
8
|
+
/** Options, or groups `{ label, options }` that put a title over their options. */
|
|
7
9
|
options?: T[];
|
|
8
10
|
placeholder?: string;
|
|
9
11
|
ariaLabel?: string;
|
|
@@ -24,10 +26,13 @@ export interface KjunSelectProps<T extends SelectOption = SelectOption> {
|
|
|
24
26
|
optionPageSize?: number;
|
|
25
27
|
clearable?: boolean;
|
|
26
28
|
multiple?: boolean;
|
|
29
|
+
/** With multiple: "count" shows "N selected" for two or more, "labels" names them and counts the ones that do not fit. */
|
|
30
|
+
multipleDisplay?: SelectMultipleDisplay;
|
|
27
31
|
error?: boolean;
|
|
28
32
|
menuHeader?: ReactNode;
|
|
29
33
|
renderOption?: (option: T, selected: boolean) => ReactNode;
|
|
30
|
-
|
|
34
|
+
/** `value` lets a value whose option has not loaded yet still show something. */
|
|
35
|
+
renderSelected?: (option: T | undefined, value: OptionValue | OptionValue[] | null) => ReactNode;
|
|
31
36
|
onValueChange?: (v: OptionValue | OptionValue[] | null) => void;
|
|
32
37
|
onChange?: (v: OptionValue | OptionValue[] | null) => void;
|
|
33
38
|
onOpenChange?: (v: boolean) => void;
|
|
@@ -40,4 +45,4 @@ export interface KjunSelectProps<T extends SelectOption = SelectOption> {
|
|
|
40
45
|
/** Where focus goes when the menu closes by choosing or Escape, instead of the trigger (e.g. an edited cell). Web only. */
|
|
41
46
|
returnFocus?: FocusReturn;
|
|
42
47
|
}
|
|
43
|
-
export declare function KjunSelect<T extends SelectOption = SelectOption>({ value, options, placeholder, ariaLabel, labelKey, id: triggerId, ariaDescribedBy, valueKey, size, disabled, readOnly, searchable, open: controlled, loading, searchPlaceholder, optionPageSize, clearable, multiple, error, menuHeader, renderOption, renderSelected, onValueChange, onChange, onOpenChange, onSearch, onClear, filterFn, searchKeys, returnFocus, }: KjunSelectProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export declare function KjunSelect<T extends SelectOption = SelectOption>({ value, options, placeholder, ariaLabel, labelKey, id: triggerId, ariaDescribedBy, valueKey, size, disabled, readOnly, searchable, open: controlled, loading, searchPlaceholder, optionPageSize, clearable, multiple, multipleDisplay, error, menuHeader, renderOption, renderSelected, onValueChange, onChange, onOpenChange, onSearch, onClear, filterFn, searchKeys, returnFocus, }: KjunSelectProps<T>): import("react/jsx-runtime").JSX.Element;
|