@kjun-ui/react 0.21.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 +8405 -3740
- package/dist/index.js +8199 -3512
- package/dist/styles.css +2610 -454
- 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 +6 -2
- package/dist/types/packages/react/src/app-navigation.d.ts +6 -2
- 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.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 +26 -6
- package/dist/types/packages/react/src/display.d.ts +26 -6
- 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 +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 +14 -1
- package/dist/types/packages/react/src/input.d.ts +14 -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 +39 -8
- package/dist/types/packages/react/src/list.d.ts +39 -8
- 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 +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.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 +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 +18 -5
- package/dist/types/packages/react/src/split-pane.d.ts +18 -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 +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/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 +5 -0
- package/dist/types/shared/package-runtime/bottom-navigation.d.ts +5 -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/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 +43 -6
- package/dist/types/shared/package-runtime/list-row.d.ts +43 -6
- 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 +74 -1
- package/dist/types/shared/package-runtime/messages/ko.d.ts +74 -1
- package/dist/types/shared/package-runtime/messages-context.d.cts +66 -1
- package/dist/types/shared/package-runtime/messages-context.d.ts +66 -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/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/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 +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 +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 +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 +11 -2
- package/dist/types/shared/package-runtime/table-presentation.d.ts +11 -2
- package/dist/types/shared/package-runtime/table.d.cts +15 -2
- package/dist/types/shared/package-runtime/table.d.ts +15 -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
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode, Ref } from "react";
|
|
2
|
+
import { type TilesGap, type TilesMaxColumns, type TilesMinItem } from "../../../shared/package-runtime/tiles.cjs";
|
|
3
|
+
export type { TilesGap, TilesMaxColumns, TilesMinItem };
|
|
4
|
+
/** Other div attributes (aria-*, data-*, id, events) pass to the root, as on KjunStack; the root keeps role="list". */
|
|
5
|
+
export interface KjunTilesProps extends Omit<HTMLAttributes<HTMLDivElement>, "role" | "children"> {
|
|
6
|
+
/** Space between cells. auto is compact (16) in a container narrower than 768 and regular (24) from it. */
|
|
7
|
+
gap?: TilesGap;
|
|
8
|
+
/** A cell's narrowest width before a column is dropped: sm 160, md 240, lg 320. */
|
|
9
|
+
minItem?: TilesMinItem;
|
|
10
|
+
/** The most columns in a wide container. */
|
|
11
|
+
maxColumns?: TilesMaxColumns;
|
|
12
|
+
ref?: Ref<HTMLDivElement>;
|
|
13
|
+
/** Each child is one cell; false, null and blank strings add none, and fragments count their children. */
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/** Same-width cards read as a list. Columns and gap follow the container, not the screen. Like KjunStack it is not KJUN
|
|
17
|
+
* markup (data attributes, no kjun- class), so app children keep their own styles. */
|
|
18
|
+
export declare function KjunTiles({ gap, minItem, maxColumns, className, children, ...rest }: KjunTilesProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode, Ref } from "react";
|
|
2
|
+
import { type TilesGap, type TilesMaxColumns, type TilesMinItem } from "../../../shared/package-runtime/tiles.js";
|
|
3
|
+
export type { TilesGap, TilesMaxColumns, TilesMinItem };
|
|
4
|
+
/** Other div attributes (aria-*, data-*, id, events) pass to the root, as on KjunStack; the root keeps role="list". */
|
|
5
|
+
export interface KjunTilesProps extends Omit<HTMLAttributes<HTMLDivElement>, "role" | "children"> {
|
|
6
|
+
/** Space between cells. auto is compact (16) in a container narrower than 768 and regular (24) from it. */
|
|
7
|
+
gap?: TilesGap;
|
|
8
|
+
/** A cell's narrowest width before a column is dropped: sm 160, md 240, lg 320. */
|
|
9
|
+
minItem?: TilesMinItem;
|
|
10
|
+
/** The most columns in a wide container. */
|
|
11
|
+
maxColumns?: TilesMaxColumns;
|
|
12
|
+
ref?: Ref<HTMLDivElement>;
|
|
13
|
+
/** Each child is one cell; false, null and blank strings add none, and fragments count their children. */
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/** Same-width cards read as a list. Columns and gap follow the container, not the screen. Like KjunStack it is not KJUN
|
|
17
|
+
* markup (data attributes, no kjun- class), so app children keep their own styles. */
|
|
18
|
+
export declare function KjunTiles({ gap, minItem, maxColumns, className, children, ...rest }: KjunTilesProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type HourCycle } from "../../../shared/package-runtime/time-segments.cjs";
|
|
2
|
+
import { type TimeLayout, type TimeTrigger } from "../../../shared/package-runtime/time-wheel.cjs";
|
|
2
3
|
import { type TimePrecision, type InputSize } from "@kjun-ui/tokens";
|
|
4
|
+
export type { TimeLayout, TimeTrigger };
|
|
3
5
|
export interface KjunTimePickerProps {
|
|
4
6
|
value: string | null;
|
|
5
7
|
precision?: TimePrecision;
|
|
@@ -12,15 +14,23 @@ export interface KjunTimePickerProps {
|
|
|
12
14
|
clearable?: boolean;
|
|
13
15
|
size?: InputSize;
|
|
14
16
|
ariaLabel?: string;
|
|
15
|
-
/** 24 (default) shows 00–23; 12 adds an AM/PM
|
|
17
|
+
/** 24 (default) shows 00–23; 12 adds an AM/PM column and shows 1–12. The value stays "HH:mm". */
|
|
16
18
|
hourCycle?: HourCycle;
|
|
19
|
+
/** Where the wheel opens: auto (default) takes a popover on a mouse screen and a bottom sheet on a touch screen;
|
|
20
|
+
* inline shows the wheel in place with no field. */
|
|
21
|
+
layout?: TimeLayout;
|
|
22
|
+
/** The field that opens the wheel: segments (typing digits works; the popover default) or a one-line button (the sheet default). */
|
|
23
|
+
trigger?: TimeTrigger;
|
|
17
24
|
/** Shows the time without changing it. */
|
|
18
25
|
readOnly?: boolean;
|
|
19
26
|
/** Submits the value with a form through a hidden input. */
|
|
20
27
|
name?: string;
|
|
28
|
+
/** The first segment's (or the button's) id, for an outside <label for>; defaults to the FormGroup's id. */
|
|
29
|
+
id?: string;
|
|
21
30
|
/** Stretches the field to its container's width (default false: the field hugs the time). */
|
|
22
31
|
block?: boolean;
|
|
32
|
+
/** Each change: a confirmed wheel, a typed or stepped segment, a cleared field, or a stopped inline column. */
|
|
23
33
|
onValueChange?: (value: string | null) => void;
|
|
24
34
|
onChangeCommit?: (value: string | null) => void;
|
|
25
35
|
}
|
|
26
|
-
export declare function KjunTimePicker({ value, precision, min, max, minuteStep, secondStep, disabled, error, clearable, size, ariaLabel, hourCycle, readOnly, name, block, onValueChange, onChangeCommit }: KjunTimePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare function KjunTimePicker({ value, precision, min, max, minuteStep, secondStep, disabled, error, clearable, size, ariaLabel, hourCycle, layout: layoutProp, trigger: triggerProp, readOnly, name, id, block, onValueChange, onChangeCommit }: KjunTimePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type HourCycle } from "../../../shared/package-runtime/time-segments.js";
|
|
2
|
+
import { type TimeLayout, type TimeTrigger } from "../../../shared/package-runtime/time-wheel.js";
|
|
2
3
|
import { type TimePrecision, type InputSize } from "@kjun-ui/tokens";
|
|
4
|
+
export type { TimeLayout, TimeTrigger };
|
|
3
5
|
export interface KjunTimePickerProps {
|
|
4
6
|
value: string | null;
|
|
5
7
|
precision?: TimePrecision;
|
|
@@ -12,15 +14,23 @@ export interface KjunTimePickerProps {
|
|
|
12
14
|
clearable?: boolean;
|
|
13
15
|
size?: InputSize;
|
|
14
16
|
ariaLabel?: string;
|
|
15
|
-
/** 24 (default) shows 00–23; 12 adds an AM/PM
|
|
17
|
+
/** 24 (default) shows 00–23; 12 adds an AM/PM column and shows 1–12. The value stays "HH:mm". */
|
|
16
18
|
hourCycle?: HourCycle;
|
|
19
|
+
/** Where the wheel opens: auto (default) takes a popover on a mouse screen and a bottom sheet on a touch screen;
|
|
20
|
+
* inline shows the wheel in place with no field. */
|
|
21
|
+
layout?: TimeLayout;
|
|
22
|
+
/** The field that opens the wheel: segments (typing digits works; the popover default) or a one-line button (the sheet default). */
|
|
23
|
+
trigger?: TimeTrigger;
|
|
17
24
|
/** Shows the time without changing it. */
|
|
18
25
|
readOnly?: boolean;
|
|
19
26
|
/** Submits the value with a form through a hidden input. */
|
|
20
27
|
name?: string;
|
|
28
|
+
/** The first segment's (or the button's) id, for an outside <label for>; defaults to the FormGroup's id. */
|
|
29
|
+
id?: string;
|
|
21
30
|
/** Stretches the field to its container's width (default false: the field hugs the time). */
|
|
22
31
|
block?: boolean;
|
|
32
|
+
/** Each change: a confirmed wheel, a typed or stepped segment, a cleared field, or a stopped inline column. */
|
|
23
33
|
onValueChange?: (value: string | null) => void;
|
|
24
34
|
onChangeCommit?: (value: string | null) => void;
|
|
25
35
|
}
|
|
26
|
-
export declare function KjunTimePicker({ value, precision, min, max, minuteStep, secondStep, disabled, error, clearable, size, ariaLabel, hourCycle, readOnly, name, block, onValueChange, onChangeCommit }: KjunTimePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare function KjunTimePicker({ value, precision, min, max, minuteStep, secondStep, disabled, error, clearable, size, ariaLabel, hourCycle, layout: layoutProp, trigger: triggerProp, readOnly, name, id, block, onValueChange, onChangeCommit }: KjunTimePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type WheelColumn, type WheelColumnKey } from "../../../shared/package-runtime/time-wheel.cjs";
|
|
2
|
+
export interface TimeWheelProps {
|
|
3
|
+
columns: WheelColumn[];
|
|
4
|
+
label: string;
|
|
5
|
+
labelledBy?: string;
|
|
6
|
+
/** Inline wheels sit on the page: a field fill with a surface band. */
|
|
7
|
+
inline?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
readOnly?: boolean;
|
|
10
|
+
/** The column to focus when the wheel appears. */
|
|
11
|
+
focusColumn?: number | null;
|
|
12
|
+
/** The column the person is on: focused or turned. */
|
|
13
|
+
onFocusColumn?: (index: number) => void;
|
|
14
|
+
onPick: (key: WheelColumnKey, value: number) => void;
|
|
15
|
+
onEnter?: () => void;
|
|
16
|
+
}
|
|
17
|
+
/** The hour, minute (and second, AM/PM) columns over one band that marks the chosen time. */
|
|
18
|
+
export declare function TimeWheel({ columns, label, labelledBy, inline, disabled, readOnly, focusColumn, onFocusColumn, onPick, onEnter }: TimeWheelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type WheelColumn, type WheelColumnKey } from "../../../shared/package-runtime/time-wheel.js";
|
|
2
|
+
export interface TimeWheelProps {
|
|
3
|
+
columns: WheelColumn[];
|
|
4
|
+
label: string;
|
|
5
|
+
labelledBy?: string;
|
|
6
|
+
/** Inline wheels sit on the page: a field fill with a surface band. */
|
|
7
|
+
inline?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
readOnly?: boolean;
|
|
10
|
+
/** The column to focus when the wheel appears. */
|
|
11
|
+
focusColumn?: number | null;
|
|
12
|
+
/** The column the person is on: focused or turned. */
|
|
13
|
+
onFocusColumn?: (index: number) => void;
|
|
14
|
+
onPick: (key: WheelColumnKey, value: number) => void;
|
|
15
|
+
onEnter?: () => void;
|
|
16
|
+
}
|
|
17
|
+
/** The hour, minute (and second, AM/PM) columns over one band that marks the chosen time. */
|
|
18
|
+
export declare function TimeWheel({ columns, label, labelledBy, inline, disabled, readOnly, focusColumn, onFocusColumn, onPick, onEnter }: TimeWheelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scroll mode: fades the row's clipped edges and keeps the selected chip in view. In single mode it follows the value;
|
|
3
|
+
* in multiple mode it reveals only on mount, so turning a chip off does not pull the row elsewhere.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useFilterScroll(scroll: boolean, multiple: boolean, value: unknown): import("react").RefObject<HTMLDivElement | null>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scroll mode: fades the row's clipped edges and keeps the selected chip in view. In single mode it follows the value;
|
|
3
|
+
* in multiple mode it reveals only on mount, so turning a chip off does not pull the row elsewhere.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useFilterScroll(scroll: boolean, multiple: boolean, value: unknown): import("react").RefObject<HTMLDivElement | null>;
|
|
@@ -9,3 +9,5 @@ export declare function unregisterOpened(opened: OpenedItems, id: string): Opene
|
|
|
9
9
|
export declare const trimToSingle: (opened: OpenedItems) => OpenedItems;
|
|
10
10
|
/** Up/Down/Home/End move between the headers of an Accordion, as in the WAI-ARIA accordion pattern. */
|
|
11
11
|
export declare function accordionKeyTarget(key: string, index: number, count: number): number | null;
|
|
12
|
+
/** The open set an Accordion's value or defaultValue names; a single-open Accordion keeps only the last one. */
|
|
13
|
+
export declare function openedFromValue(value: readonly string[] | undefined, multiple: boolean): OpenedItems;
|
|
@@ -9,3 +9,5 @@ export declare function unregisterOpened(opened: OpenedItems, id: string): Opene
|
|
|
9
9
|
export declare const trimToSingle: (opened: OpenedItems) => OpenedItems;
|
|
10
10
|
/** Up/Down/Home/End move between the headers of an Accordion, as in the WAI-ARIA accordion pattern. */
|
|
11
11
|
export declare function accordionKeyTarget(key: string, index: number, count: number): number | null;
|
|
12
|
+
/** The open set an Accordion's value or defaultValue names; a single-open Accordion keeps only the last one. */
|
|
13
|
+
export declare function openedFromValue(value: readonly string[] | undefined, multiple: boolean): OpenedItems;
|
|
@@ -3,3 +3,7 @@ export { alertActionSizes, popoverActionSize } from "./alert-action-size.cjs";
|
|
|
3
3
|
/** A container's default size for buttons that leave `size` unset; an explicit size always wins. */
|
|
4
4
|
export declare const ActionSizeContext: import("react").Context<"xs" | "sm" | "md" | "lg" | "xl" | null>;
|
|
5
5
|
export declare function useActionSize(requested: ButtonSize | undefined, fallback: ButtonSize): ButtonSize;
|
|
6
|
+
/** A container that draws its buttons as pills (a floating action bar); a button's own circle or pill shape is unaffected. */
|
|
7
|
+
export declare const ActionShapeContext: import("react").Context<"pill" | null>;
|
|
8
|
+
/** Whether a button rounds to a pill: by its own shape, or because its container says so. */
|
|
9
|
+
export declare function useActionPill(shape: "default" | "circle" | "pill"): boolean;
|
|
@@ -3,3 +3,7 @@ export { alertActionSizes, popoverActionSize } from "./alert-action-size.js";
|
|
|
3
3
|
/** A container's default size for buttons that leave `size` unset; an explicit size always wins. */
|
|
4
4
|
export declare const ActionSizeContext: import("react").Context<"xs" | "sm" | "md" | "lg" | "xl" | null>;
|
|
5
5
|
export declare function useActionSize(requested: ButtonSize | undefined, fallback: ButtonSize): ButtonSize;
|
|
6
|
+
/** A container that draws its buttons as pills (a floating action bar); a button's own circle or pill shape is unaffected. */
|
|
7
|
+
export declare const ActionShapeContext: import("react").Context<"pill" | null>;
|
|
8
|
+
/** Whether a button rounds to a pill: by its own shape, or because its container says so. */
|
|
9
|
+
export declare function useActionPill(shape: "default" | "circle" | "pill"): boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** True when the actions have wrapped onto their own line under the message. */
|
|
2
|
+
export declare function alertActionsWrapped(content: HTMLElement | null): boolean;
|
|
3
|
+
/** Calls back with the wrapped state now and whenever the content resizes; returns the cleanup. */
|
|
4
|
+
export declare function observeAlertActions(content: HTMLElement | null, change: (wrapped: boolean) => void): () => void;
|
|
5
|
+
/** Native: the actions wrap when the content row cannot hold the message's minimum width, the gap and the actions.
|
|
6
|
+
* Widths only, since React Native Web reports a layout when a box resizes, not when it merely moves. */
|
|
7
|
+
export declare function alertActionsWrap(contentWidth: number | undefined, actionsWidth: number | undefined, gap: number, messageMinWidth: number): boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** True when the actions have wrapped onto their own line under the message. */
|
|
2
|
+
export declare function alertActionsWrapped(content: HTMLElement | null): boolean;
|
|
3
|
+
/** Calls back with the wrapped state now and whenever the content resizes; returns the cleanup. */
|
|
4
|
+
export declare function observeAlertActions(content: HTMLElement | null, change: (wrapped: boolean) => void): () => void;
|
|
5
|
+
/** Native: the actions wrap when the content row cannot hold the message's minimum width, the gap and the actions.
|
|
6
|
+
* Widths only, since React Native Web reports a layout when a box resizes, not when it merely moves. */
|
|
7
|
+
export declare function alertActionsWrap(contentWidth: number | undefined, actionsWidth: number | undefined, gap: number, messageMinWidth: number): boolean;
|
|
@@ -3,3 +3,9 @@
|
|
|
3
3
|
* instead of jumping; `done` runs once it is gone. Reduced motion (or no Web Animations) finishes at once.
|
|
4
4
|
*/
|
|
5
5
|
export declare function collapseAlert(el: HTMLElement | null, reduced: boolean, done: () => void): void;
|
|
6
|
+
/**
|
|
7
|
+
* A dismissed Alert takes its focused close button with it: when focus is inside the alert, it moves to the next
|
|
8
|
+
* tabbable element after it, or the one before when the alert was last, so keyboard users keep their place.
|
|
9
|
+
* Call before the alert turns inert.
|
|
10
|
+
*/
|
|
11
|
+
export declare function keepFocusPastAlert(el: HTMLElement | null): void;
|
|
@@ -3,3 +3,9 @@
|
|
|
3
3
|
* instead of jumping; `done` runs once it is gone. Reduced motion (or no Web Animations) finishes at once.
|
|
4
4
|
*/
|
|
5
5
|
export declare function collapseAlert(el: HTMLElement | null, reduced: boolean, done: () => void): void;
|
|
6
|
+
/**
|
|
7
|
+
* A dismissed Alert takes its focused close button with it: when focus is inside the alert, it moves to the next
|
|
8
|
+
* tabbable element after it, or the one before when the alert was last, so keyboard users keep their place.
|
|
9
|
+
* Call before the alert turns inert.
|
|
10
|
+
*/
|
|
11
|
+
export declare function keepFocusPastAlert(el: HTMLElement | null): void;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export type AlertLive = "assertive" | "polite" | "off";
|
|
2
2
|
/** Alert announcement role: `live` overrides the tone default (danger interrupts, others are polite); off announces nothing. */
|
|
3
3
|
export declare function alertRole(tone: string, live?: AlertLive): "alert" | "status" | undefined;
|
|
4
|
+
/** Android announces changes only in a live region (the role alone is not enough): alert interrupts, status waits, off sets none. */
|
|
5
|
+
export declare function alertLiveRegion(tone: string, live?: AlertLive): "assertive" | "polite" | undefined;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export type AlertLive = "assertive" | "polite" | "off";
|
|
2
2
|
/** Alert announcement role: `live` overrides the tone default (danger interrupts, others are polite); off announces nothing. */
|
|
3
3
|
export declare function alertRole(tone: string, live?: AlertLive): "alert" | "status" | undefined;
|
|
4
|
+
/** Android announces changes only in a live region (the role alone is not enough): alert interrupts, status waits, off sets none. */
|
|
5
|
+
export declare function alertLiveRegion(tone: string, live?: AlertLive): "assertive" | "polite" | undefined;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** The overflow chip stops at this count so its text always fits the circle; the group name keeps the real number. */
|
|
2
|
+
export declare const AVATAR_GROUP_OVERFLOW_CAP = 99;
|
|
3
|
+
export interface AvatarGroupModel {
|
|
4
|
+
visible: number;
|
|
5
|
+
overflow: number;
|
|
6
|
+
overflowText: string;
|
|
7
|
+
totalCount: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* How many avatars a group draws, how many it folds into "+N", and the headcount it is named by.
|
|
11
|
+
* At xs and sm a three-character "+99" does not fit the circle, so the chip drops the "+" and shows "99".
|
|
12
|
+
*/
|
|
13
|
+
export declare function avatarGroupModel({ count, max, total, size }: {
|
|
14
|
+
count: number;
|
|
15
|
+
max?: number;
|
|
16
|
+
total?: number;
|
|
17
|
+
size?: string;
|
|
18
|
+
}): AvatarGroupModel;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** The overflow chip stops at this count so its text always fits the circle; the group name keeps the real number. */
|
|
2
|
+
export declare const AVATAR_GROUP_OVERFLOW_CAP = 99;
|
|
3
|
+
export interface AvatarGroupModel {
|
|
4
|
+
visible: number;
|
|
5
|
+
overflow: number;
|
|
6
|
+
overflowText: string;
|
|
7
|
+
totalCount: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* How many avatars a group draws, how many it folds into "+N", and the headcount it is named by.
|
|
11
|
+
* At xs and sm a three-character "+99" does not fit the circle, so the chip drops the "+" and shows "99".
|
|
12
|
+
*/
|
|
13
|
+
export declare function avatarGroupModel({ count, max, total, size }: {
|
|
14
|
+
count: number;
|
|
15
|
+
max?: number;
|
|
16
|
+
total?: number;
|
|
17
|
+
size?: string;
|
|
18
|
+
}): AvatarGroupModel;
|
|
@@ -26,9 +26,9 @@ export declare function badgeGeometry(size: BadgeSize): {
|
|
|
26
26
|
readonly x: 12;
|
|
27
27
|
readonly y: 4;
|
|
28
28
|
};
|
|
29
|
-
radius: 4 | 10 |
|
|
29
|
+
radius: 4 | 10 | 6 | 8;
|
|
30
30
|
gap: 4 | 6;
|
|
31
|
-
dotSize:
|
|
31
|
+
dotSize: 6 | 8;
|
|
32
32
|
type: {
|
|
33
33
|
fontWeight: 500;
|
|
34
34
|
fontSizePx: 12;
|
|
@@ -55,5 +55,11 @@ export declare function badgeGeometry(size: BadgeSize): {
|
|
|
55
55
|
lineHeightPx: 24;
|
|
56
56
|
letterSpacingEm: 0;
|
|
57
57
|
};
|
|
58
|
+
count: {
|
|
59
|
+
paddingX: 4 | 6;
|
|
60
|
+
radius: 9999;
|
|
61
|
+
minWidth: number;
|
|
62
|
+
};
|
|
63
|
+
standaloneDotSize: 8;
|
|
58
64
|
};
|
|
59
65
|
export {};
|
|
@@ -26,9 +26,9 @@ export declare function badgeGeometry(size: BadgeSize): {
|
|
|
26
26
|
readonly x: 12;
|
|
27
27
|
readonly y: 4;
|
|
28
28
|
};
|
|
29
|
-
radius: 4 | 10 |
|
|
29
|
+
radius: 4 | 10 | 6 | 8;
|
|
30
30
|
gap: 4 | 6;
|
|
31
|
-
dotSize:
|
|
31
|
+
dotSize: 6 | 8;
|
|
32
32
|
type: {
|
|
33
33
|
fontWeight: 500;
|
|
34
34
|
fontSizePx: 12;
|
|
@@ -55,5 +55,11 @@ export declare function badgeGeometry(size: BadgeSize): {
|
|
|
55
55
|
lineHeightPx: 24;
|
|
56
56
|
letterSpacingEm: 0;
|
|
57
57
|
};
|
|
58
|
+
count: {
|
|
59
|
+
paddingX: 4 | 6;
|
|
60
|
+
radius: 9999;
|
|
61
|
+
minWidth: number;
|
|
62
|
+
};
|
|
63
|
+
standaloneDotSize: 8;
|
|
58
64
|
};
|
|
59
65
|
export {};
|
|
@@ -7,7 +7,7 @@ export interface BottomBarStore {
|
|
|
7
7
|
}
|
|
8
8
|
export declare function createBottomBarStore(): BottomBarStore;
|
|
9
9
|
/**
|
|
10
|
-
* Web: writes the bar's height as --_kjun-bottom-bar on the outermost KjunProvider scope while the bar is mounted.
|
|
10
|
+
* Web: writes the bar's height (with its bottom margin) as --_kjun-bottom-bar on the outermost KjunProvider scope while the bar is mounted.
|
|
11
11
|
* A bar the app hides (display: none) measures 0. Returns the cleanup.
|
|
12
12
|
*/
|
|
13
13
|
export declare function trackBottomBar(element: HTMLElement | null): () => void;
|
|
@@ -7,7 +7,7 @@ export interface BottomBarStore {
|
|
|
7
7
|
}
|
|
8
8
|
export declare function createBottomBarStore(): BottomBarStore;
|
|
9
9
|
/**
|
|
10
|
-
* Web: writes the bar's height as --_kjun-bottom-bar on the outermost KjunProvider scope while the bar is mounted.
|
|
10
|
+
* Web: writes the bar's height (with its bottom margin) as --_kjun-bottom-bar on the outermost KjunProvider scope while the bar is mounted.
|
|
11
11
|
* A bar the app hides (display: none) measures 0. Returns the cleanup.
|
|
12
12
|
*/
|
|
13
13
|
export declare function trackBottomBar(element: HTMLElement | null): () => void;
|
|
@@ -23,3 +23,8 @@ export declare function bottomNavigationLayout(items: readonly {
|
|
|
23
23
|
badgeOnIcon: boolean;
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* How far a scrolling bar moves so one item is in view: 0 when it already is, otherwise the shortest move that brings it
|
|
28
|
+
* in (its start first when it is wider than the view). Positions share one axis; a negative result scrolls back.
|
|
29
|
+
*/
|
|
30
|
+
export declare function revealDelta(itemStart: number, itemEnd: number, viewStart: number, viewEnd: number): number;
|
|
@@ -23,3 +23,8 @@ export declare function bottomNavigationLayout(items: readonly {
|
|
|
23
23
|
badgeOnIcon: boolean;
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* How far a scrolling bar moves so one item is in view: 0 when it already is, otherwise the shortest move that brings it
|
|
28
|
+
* in (its start first when it is wider than the view). Positions share one axis; a negative result scrolls back.
|
|
29
|
+
*/
|
|
30
|
+
export declare function revealDelta(itemStart: number, itemEnd: number, viewStart: number, viewEnd: number): number;
|
|
@@ -14,12 +14,20 @@ export interface CalendarDay {
|
|
|
14
14
|
rangeStart: boolean;
|
|
15
15
|
rangeEnd: boolean;
|
|
16
16
|
inRange: boolean;
|
|
17
|
+
/** While a range's end is picked: the day would make the range shorter than minDays or longer than maxDays. */
|
|
18
|
+
limited: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** The length a range may take, counting both ends; either bound may be left out. */
|
|
21
|
+
export interface RangeLimits {
|
|
22
|
+
minDays?: number;
|
|
23
|
+
maxDays?: number;
|
|
17
24
|
}
|
|
18
25
|
export declare function parseDate(iso: string | null | undefined): {
|
|
19
26
|
year: number;
|
|
20
27
|
month: number;
|
|
21
28
|
day: number;
|
|
22
29
|
} | null;
|
|
30
|
+
export declare const weekdayOf: (year: number, month: number, day: number) => number;
|
|
23
31
|
export declare const toIsoDate: (year: number, month: number, day: number) => string;
|
|
24
32
|
export declare function todayIso(now?: Date): string;
|
|
25
33
|
export declare const isBlocked: (iso: string, min?: string, max?: string) => boolean;
|
|
@@ -33,8 +41,8 @@ export declare function addDays(iso: string, days: number): string;
|
|
|
33
41
|
export declare function addMonths(iso: string, months: number): string;
|
|
34
42
|
/** The band a range draws: the committed range, or while only the start is picked, the start to the previewed day. */
|
|
35
43
|
export declare function rangeBand(range: DateRange | undefined, preview?: string): DateRange | null;
|
|
36
|
-
/** Whole weeks covering the month from weekStart (Sunday by default), with the neighbouring months' days marked outside. */
|
|
37
|
-
export declare function calendarDays(year: number, month: number, { value, range, min, max, today, weekStart, unavailable, preview }: {
|
|
44
|
+
/** Whole weeks covering the month from weekStart (Sunday by default), with the neighbouring months' days marked outside; fixedWeeks always gives six. */
|
|
45
|
+
export declare function calendarDays(year: number, month: number, { value, range, min, max, today, weekStart, unavailable, preview, fixedWeeks, limits }: {
|
|
38
46
|
value?: string;
|
|
39
47
|
range?: DateRange;
|
|
40
48
|
min?: string;
|
|
@@ -43,6 +51,8 @@ export declare function calendarDays(year: number, month: number, { value, range
|
|
|
43
51
|
weekStart?: WeekStart;
|
|
44
52
|
unavailable?: DateUnavailable;
|
|
45
53
|
preview?: string;
|
|
54
|
+
fixedWeeks?: boolean;
|
|
55
|
+
limits?: RangeLimits;
|
|
46
56
|
}): CalendarDay[];
|
|
47
57
|
/** Weekday names (given Sunday first) turned to start on weekStart. */
|
|
48
58
|
export declare const orderWeekdays: <T>(names: readonly T[], weekStart?: WeekStart) => T[];
|
|
@@ -54,7 +64,11 @@ export declare function moveDate(iso: string, key: string, shift?: boolean, week
|
|
|
54
64
|
* The next range after picking a day: a fresh pick starts a range, the second pick ends it (in either order).
|
|
55
65
|
* A range may not run across an unavailable day; picking past one starts a new range there.
|
|
56
66
|
*/
|
|
57
|
-
export declare function pickRange(range: DateRange, iso: string, unavailable?: DateUnavailable): DateRange;
|
|
67
|
+
export declare function pickRange(range: DateRange, iso: string, unavailable?: DateUnavailable, limits?: RangeLimits): DateRange;
|
|
68
|
+
/** Days a range covers, counting both ends ("09-08" to "09-14" is 7). */
|
|
69
|
+
export declare function rangeDays(a: string, b: string): number;
|
|
70
|
+
/** Whether ending a range that starts on start at iso breaks minDays or maxDays. */
|
|
71
|
+
export declare function outsideLimits(start: string, iso: string, limits?: RangeLimits): boolean;
|
|
58
72
|
/** A range Apply can commit: both ends, or neither (which clears it). */
|
|
59
73
|
export declare const canApplyRange: (range: DateRange) => boolean;
|
|
60
74
|
/** A range from the app put in order and inside the bounds; a malformed one reads as empty. */
|
|
@@ -72,14 +86,16 @@ export declare const pickYear: (focus: string, year: number) => string;
|
|
|
72
86
|
/** Twelve years around the shown one, aligned to multiples of twelve, for the year view. */
|
|
73
87
|
export declare const yearGrid: (year: number) => number[];
|
|
74
88
|
export declare const yearOutside: (year: number, min?: string, max?: string) => boolean;
|
|
75
|
-
/** What the footer holds: a clear button when clearing is allowed, then Apply for ranges (unless they commit on the second pick) or Today when today can be picked. */
|
|
76
|
-
export declare function calendarFooter({ range, apply, clearable, todayBlocked }: {
|
|
89
|
+
/** What the footer holds: a length note while one applies, else a clear button when clearing is allowed, then Apply for ranges (unless they commit on the second pick) or Today when today can be picked. */
|
|
90
|
+
export declare function calendarFooter({ range, apply, clearable, todayBlocked, note }: {
|
|
77
91
|
range: boolean;
|
|
78
92
|
apply?: boolean;
|
|
79
93
|
clearable: boolean;
|
|
80
94
|
todayBlocked: boolean;
|
|
95
|
+
note?: boolean;
|
|
81
96
|
}): {
|
|
82
97
|
clear: boolean;
|
|
98
|
+
note: boolean;
|
|
83
99
|
action: "today" | "apply" | null;
|
|
84
100
|
shown: boolean;
|
|
85
101
|
};
|
|
@@ -92,8 +108,6 @@ export declare function monthNames(year: number, scope?: KjunMessageScope): {
|
|
|
92
108
|
title: string;
|
|
93
109
|
months: string[];
|
|
94
110
|
};
|
|
95
|
-
/** Five years around the shown one for the month view's year chips, kept inside the bounds. */
|
|
96
|
-
export declare function yearChoices(year: number, min?: string, max?: string): number[];
|
|
97
111
|
/** Range field text: the end drops a repeated year ("2026. 09. 08. – 09. 16."). */
|
|
98
112
|
export declare function formatRange(range: DateRange, format: (iso: string) => string): string;
|
|
99
113
|
/** The spoken range for the field: both ends' day names. */
|
|
@@ -14,12 +14,20 @@ export interface CalendarDay {
|
|
|
14
14
|
rangeStart: boolean;
|
|
15
15
|
rangeEnd: boolean;
|
|
16
16
|
inRange: boolean;
|
|
17
|
+
/** While a range's end is picked: the day would make the range shorter than minDays or longer than maxDays. */
|
|
18
|
+
limited: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** The length a range may take, counting both ends; either bound may be left out. */
|
|
21
|
+
export interface RangeLimits {
|
|
22
|
+
minDays?: number;
|
|
23
|
+
maxDays?: number;
|
|
17
24
|
}
|
|
18
25
|
export declare function parseDate(iso: string | null | undefined): {
|
|
19
26
|
year: number;
|
|
20
27
|
month: number;
|
|
21
28
|
day: number;
|
|
22
29
|
} | null;
|
|
30
|
+
export declare const weekdayOf: (year: number, month: number, day: number) => number;
|
|
23
31
|
export declare const toIsoDate: (year: number, month: number, day: number) => string;
|
|
24
32
|
export declare function todayIso(now?: Date): string;
|
|
25
33
|
export declare const isBlocked: (iso: string, min?: string, max?: string) => boolean;
|
|
@@ -33,8 +41,8 @@ export declare function addDays(iso: string, days: number): string;
|
|
|
33
41
|
export declare function addMonths(iso: string, months: number): string;
|
|
34
42
|
/** The band a range draws: the committed range, or while only the start is picked, the start to the previewed day. */
|
|
35
43
|
export declare function rangeBand(range: DateRange | undefined, preview?: string): DateRange | null;
|
|
36
|
-
/** Whole weeks covering the month from weekStart (Sunday by default), with the neighbouring months' days marked outside. */
|
|
37
|
-
export declare function calendarDays(year: number, month: number, { value, range, min, max, today, weekStart, unavailable, preview }: {
|
|
44
|
+
/** Whole weeks covering the month from weekStart (Sunday by default), with the neighbouring months' days marked outside; fixedWeeks always gives six. */
|
|
45
|
+
export declare function calendarDays(year: number, month: number, { value, range, min, max, today, weekStart, unavailable, preview, fixedWeeks, limits }: {
|
|
38
46
|
value?: string;
|
|
39
47
|
range?: DateRange;
|
|
40
48
|
min?: string;
|
|
@@ -43,6 +51,8 @@ export declare function calendarDays(year: number, month: number, { value, range
|
|
|
43
51
|
weekStart?: WeekStart;
|
|
44
52
|
unavailable?: DateUnavailable;
|
|
45
53
|
preview?: string;
|
|
54
|
+
fixedWeeks?: boolean;
|
|
55
|
+
limits?: RangeLimits;
|
|
46
56
|
}): CalendarDay[];
|
|
47
57
|
/** Weekday names (given Sunday first) turned to start on weekStart. */
|
|
48
58
|
export declare const orderWeekdays: <T>(names: readonly T[], weekStart?: WeekStart) => T[];
|
|
@@ -54,7 +64,11 @@ export declare function moveDate(iso: string, key: string, shift?: boolean, week
|
|
|
54
64
|
* The next range after picking a day: a fresh pick starts a range, the second pick ends it (in either order).
|
|
55
65
|
* A range may not run across an unavailable day; picking past one starts a new range there.
|
|
56
66
|
*/
|
|
57
|
-
export declare function pickRange(range: DateRange, iso: string, unavailable?: DateUnavailable): DateRange;
|
|
67
|
+
export declare function pickRange(range: DateRange, iso: string, unavailable?: DateUnavailable, limits?: RangeLimits): DateRange;
|
|
68
|
+
/** Days a range covers, counting both ends ("09-08" to "09-14" is 7). */
|
|
69
|
+
export declare function rangeDays(a: string, b: string): number;
|
|
70
|
+
/** Whether ending a range that starts on start at iso breaks minDays or maxDays. */
|
|
71
|
+
export declare function outsideLimits(start: string, iso: string, limits?: RangeLimits): boolean;
|
|
58
72
|
/** A range Apply can commit: both ends, or neither (which clears it). */
|
|
59
73
|
export declare const canApplyRange: (range: DateRange) => boolean;
|
|
60
74
|
/** A range from the app put in order and inside the bounds; a malformed one reads as empty. */
|
|
@@ -72,14 +86,16 @@ export declare const pickYear: (focus: string, year: number) => string;
|
|
|
72
86
|
/** Twelve years around the shown one, aligned to multiples of twelve, for the year view. */
|
|
73
87
|
export declare const yearGrid: (year: number) => number[];
|
|
74
88
|
export declare const yearOutside: (year: number, min?: string, max?: string) => boolean;
|
|
75
|
-
/** What the footer holds: a clear button when clearing is allowed, then Apply for ranges (unless they commit on the second pick) or Today when today can be picked. */
|
|
76
|
-
export declare function calendarFooter({ range, apply, clearable, todayBlocked }: {
|
|
89
|
+
/** What the footer holds: a length note while one applies, else a clear button when clearing is allowed, then Apply for ranges (unless they commit on the second pick) or Today when today can be picked. */
|
|
90
|
+
export declare function calendarFooter({ range, apply, clearable, todayBlocked, note }: {
|
|
77
91
|
range: boolean;
|
|
78
92
|
apply?: boolean;
|
|
79
93
|
clearable: boolean;
|
|
80
94
|
todayBlocked: boolean;
|
|
95
|
+
note?: boolean;
|
|
81
96
|
}): {
|
|
82
97
|
clear: boolean;
|
|
98
|
+
note: boolean;
|
|
83
99
|
action: "today" | "apply" | null;
|
|
84
100
|
shown: boolean;
|
|
85
101
|
};
|
|
@@ -92,8 +108,6 @@ export declare function monthNames(year: number, scope?: KjunMessageScope): {
|
|
|
92
108
|
title: string;
|
|
93
109
|
months: string[];
|
|
94
110
|
};
|
|
95
|
-
/** Five years around the shown one for the month view's year chips, kept inside the bounds. */
|
|
96
|
-
export declare function yearChoices(year: number, min?: string, max?: string): number[];
|
|
97
111
|
/** Range field text: the end drops a repeated year ("2026. 09. 08. – 09. 16."). */
|
|
98
112
|
export declare function formatRange(range: DateRange, format: (iso: string) => string): string;
|
|
99
113
|
/** The spoken range for the field: both ends' day names. */
|
|
@@ -15,6 +15,7 @@ export interface CardParts {
|
|
|
15
15
|
/** Layout decisions every platform makes the same way. */
|
|
16
16
|
export declare function cardLayout(parts: CardParts, options: {
|
|
17
17
|
pressable: boolean;
|
|
18
|
+
link?: boolean;
|
|
18
19
|
headingLevel: CardHeadingLevel;
|
|
19
20
|
surface: CardSurface;
|
|
20
21
|
padding: CardPadding;
|
|
@@ -31,4 +32,11 @@ export declare function cardLayout(parts: CardParts, options: {
|
|
|
31
32
|
/** Without a divider the header sits a step closer to the body than to the card edge. */
|
|
32
33
|
headerGap: 0 | 16 | 12 | 8;
|
|
33
34
|
sideMedia: boolean;
|
|
35
|
+
/** A link card with a title and no header actions ends its header with a chevron, so it reads as one before hover or focus. */
|
|
36
|
+
linkMark: boolean;
|
|
37
|
+
/** Header actions without a title share the body's row (actions at the end) instead of a header row of their own;
|
|
38
|
+
* with media or a footer the card keeps its rows. */
|
|
39
|
+
actionsBeside: boolean;
|
|
34
40
|
};
|
|
41
|
+
/** Development only, once: Native on a device does not follow href, so a link card there needs onPress. */
|
|
42
|
+
export declare function warnCardDeviceLink(deviceLink: boolean): void;
|
|
@@ -15,6 +15,7 @@ export interface CardParts {
|
|
|
15
15
|
/** Layout decisions every platform makes the same way. */
|
|
16
16
|
export declare function cardLayout(parts: CardParts, options: {
|
|
17
17
|
pressable: boolean;
|
|
18
|
+
link?: boolean;
|
|
18
19
|
headingLevel: CardHeadingLevel;
|
|
19
20
|
surface: CardSurface;
|
|
20
21
|
padding: CardPadding;
|
|
@@ -31,4 +32,11 @@ export declare function cardLayout(parts: CardParts, options: {
|
|
|
31
32
|
/** Without a divider the header sits a step closer to the body than to the card edge. */
|
|
32
33
|
headerGap: 0 | 16 | 12 | 8;
|
|
33
34
|
sideMedia: boolean;
|
|
35
|
+
/** A link card with a title and no header actions ends its header with a chevron, so it reads as one before hover or focus. */
|
|
36
|
+
linkMark: boolean;
|
|
37
|
+
/** Header actions without a title share the body's row (actions at the end) instead of a header row of their own;
|
|
38
|
+
* with media or a footer the card keeps its rows. */
|
|
39
|
+
actionsBeside: boolean;
|
|
34
40
|
};
|
|
41
|
+
/** Development only, once: Native on a device does not follow href, so a link card there needs onPress. */
|
|
42
|
+
export declare function warnCardDeviceLink(deviceLink: boolean): void;
|
|
@@ -9,6 +9,8 @@ export interface CarouselScrollerOptions {
|
|
|
9
9
|
current: () => number;
|
|
10
10
|
mouseDrag: () => boolean;
|
|
11
11
|
align: () => CarouselSnapAlign;
|
|
12
|
+
/** Each slide at least this wide; as many as fit share the row. undefined leaves widths to slideSize. */
|
|
13
|
+
minSlideWidth: () => number | undefined;
|
|
12
14
|
}
|
|
13
15
|
export interface CarouselScroller {
|
|
14
16
|
scrollTo: (target: number, smooth: boolean) => void;
|
|
@@ -9,6 +9,8 @@ export interface CarouselScrollerOptions {
|
|
|
9
9
|
current: () => number;
|
|
10
10
|
mouseDrag: () => boolean;
|
|
11
11
|
align: () => CarouselSnapAlign;
|
|
12
|
+
/** Each slide at least this wide; as many as fit share the row. undefined leaves widths to slideSize. */
|
|
13
|
+
minSlideWidth: () => number | undefined;
|
|
12
14
|
}
|
|
13
15
|
export interface CarouselScroller {
|
|
14
16
|
scrollTo: (target: number, smooth: boolean) => void;
|