@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,9 +1,9 @@
|
|
|
1
1
|
import { type ButtonSize } from "@kjun-ui/tokens";
|
|
2
|
-
import { type CSSProperties, type ReactNode } from "react";
|
|
2
|
+
import { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type CSSProperties, type MouseEvent, type HTMLAttributes, type ReactNode } from "react";
|
|
3
3
|
import { type KjunButtonProps } from "./button.cjs";
|
|
4
4
|
import { type KjunTooltipProps } from "./popover.cjs";
|
|
5
5
|
import { type ScrollFadeDirection } from "../../../shared/package-runtime/scroll-fade.cjs";
|
|
6
|
-
export interface KjunIconToggleProps {
|
|
6
|
+
export interface KjunIconToggleProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" | "disabled" | "children" | "color"> {
|
|
7
7
|
active?: boolean;
|
|
8
8
|
activeIcon: string;
|
|
9
9
|
inactiveIcon?: string;
|
|
@@ -14,15 +14,16 @@ export interface KjunIconToggleProps {
|
|
|
14
14
|
size?: ButtonSize;
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
loading?: boolean;
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
/** Accessible name; aria-label or aria-labelledby may be used instead. */
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
/** Defaults to the accessible label text, like RefreshButton; an empty string disables the hint. */
|
|
19
20
|
tooltip?: string;
|
|
20
21
|
tooltipPlacement?: KjunTooltipProps["placement"];
|
|
21
22
|
tooltipDelay?: number;
|
|
22
23
|
onToggle?: () => void;
|
|
23
24
|
}
|
|
24
|
-
export declare function KjunIconToggle({ active, activeIcon, inactiveIcon, activeColorClass, inactiveColorClass, activeColor, inactiveColor, size, disabled, loading, ariaLabel, tooltip, tooltipPlacement, tooltipDelay, onToggle, }: KjunIconToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export interface KjunCopyButtonProps {
|
|
25
|
+
export declare function KjunIconToggle({ active, activeIcon, inactiveIcon, activeColorClass, inactiveColorClass, activeColor, inactiveColor, size, disabled, loading, ariaLabel, tooltip, tooltipPlacement, tooltipDelay, onToggle, className, style, onClick, onFocus, onPointerEnter, ...rest }: KjunIconToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export interface KjunCopyButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" | "value" | "disabled" | "children"> {
|
|
26
27
|
value: string;
|
|
27
28
|
ariaLabel?: string;
|
|
28
29
|
text?: string;
|
|
@@ -34,8 +35,8 @@ export interface KjunCopyButtonProps {
|
|
|
34
35
|
onCopied?: (value: string) => void;
|
|
35
36
|
onCopyError?: (error: unknown) => void;
|
|
36
37
|
}
|
|
37
|
-
export declare function KjunCopyButton({ value, ariaLabel, text, successText, inline, size, disabled, copyText, onCopied, onCopyError, }: KjunCopyButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
-
export interface KjunRefreshButtonProps extends Omit<KjunButtonProps, "onClick" | "children"> {
|
|
38
|
+
export declare function KjunCopyButton({ value, ariaLabel, text, successText, inline, size, disabled, copyText, onCopied, onCopyError, className, style, onClick, ...rest }: KjunCopyButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export interface KjunRefreshButtonProps extends Omit<KjunButtonProps, "onClick" | "children" | "prefix" | "suffix"> {
|
|
39
40
|
targetName?: string;
|
|
40
41
|
mode?: "icon" | "text";
|
|
41
42
|
text?: string;
|
|
@@ -43,18 +44,22 @@ export interface KjunRefreshButtonProps extends Omit<KjunButtonProps, "onClick"
|
|
|
43
44
|
tooltip?: string;
|
|
44
45
|
tooltipPlacement?: KjunTooltipProps["placement"];
|
|
45
46
|
tooltipDelay?: number;
|
|
46
|
-
|
|
47
|
+
/** A returned promise shows loading until it settles; loading stays the app's to set otherwise. */
|
|
48
|
+
onRefresh?: () => void | Promise<unknown>;
|
|
47
49
|
}
|
|
48
|
-
export declare function KjunRefreshButton({ targetName, mode, text, size, variant, ariaLabel, title, tooltip, tooltipPlacement, tooltipDelay, spinOnLoading, onRefresh, ...props }: KjunRefreshButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
49
|
-
export
|
|
50
|
-
export interface KjunExternalLinkProps {
|
|
50
|
+
export declare function KjunRefreshButton({ targetName, mode, text, size, variant, ariaLabel, title, tooltip, tooltipPlacement, tooltipDelay, spinOnLoading, loading, onRefresh, ...props }: KjunRefreshButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export interface KjunExternalLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "href" | "target" | "rel" | "type" | "children" | "onClick" | "onChange" | "autoFocus"> {
|
|
51
52
|
href?: string;
|
|
52
53
|
mode?: "icon" | "text";
|
|
54
|
+
/** The icon link's name (default "External link"); a text link shows it when it has no children. */
|
|
53
55
|
label?: string;
|
|
54
56
|
children?: ReactNode;
|
|
57
|
+
/** Called when the link is opened (e.g. for analytics); the click does not reach the parent. */
|
|
58
|
+
onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;
|
|
55
59
|
}
|
|
56
|
-
|
|
57
|
-
export
|
|
60
|
+
/** Opens only http(s) URLs in a new window; anything else renders as plain text. */
|
|
61
|
+
export declare function KjunExternalLink({ href, mode, label, children, onClick, className, ...rest }: KjunExternalLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
export interface KjunScrollFadeProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "className" | "style" | "onChange" | "autoFocus"> {
|
|
58
63
|
children?: ReactNode;
|
|
59
64
|
/** Which way the content scrolls; vertical needs a height (style or class) to scroll within. */
|
|
60
65
|
direction?: ScrollFadeDirection;
|
|
@@ -63,5 +68,5 @@ export interface KjunScrollFadeProps {
|
|
|
63
68
|
className?: string;
|
|
64
69
|
style?: CSSProperties;
|
|
65
70
|
}
|
|
66
|
-
/** Fades whichever edge along `direction` still has content to scroll to. */
|
|
67
|
-
export declare
|
|
71
|
+
/** Fades whichever edge along `direction` still has content to scroll to. The ref is the scrolling element. */
|
|
72
|
+
export declare const KjunScrollFade: import("react").ForwardRefExoticComponent<KjunScrollFadeProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type ButtonSize } from "@kjun-ui/tokens";
|
|
2
|
-
import { type CSSProperties, type ReactNode } from "react";
|
|
2
|
+
import { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type CSSProperties, type MouseEvent, type HTMLAttributes, type ReactNode } from "react";
|
|
3
3
|
import { type KjunButtonProps } from "./button.js";
|
|
4
4
|
import { type KjunTooltipProps } from "./popover.js";
|
|
5
5
|
import { type ScrollFadeDirection } from "../../../shared/package-runtime/scroll-fade.js";
|
|
6
|
-
export interface KjunIconToggleProps {
|
|
6
|
+
export interface KjunIconToggleProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" | "disabled" | "children" | "color"> {
|
|
7
7
|
active?: boolean;
|
|
8
8
|
activeIcon: string;
|
|
9
9
|
inactiveIcon?: string;
|
|
@@ -14,15 +14,16 @@ export interface KjunIconToggleProps {
|
|
|
14
14
|
size?: ButtonSize;
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
loading?: boolean;
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
/** Accessible name; aria-label or aria-labelledby may be used instead. */
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
/** Defaults to the accessible label text, like RefreshButton; an empty string disables the hint. */
|
|
19
20
|
tooltip?: string;
|
|
20
21
|
tooltipPlacement?: KjunTooltipProps["placement"];
|
|
21
22
|
tooltipDelay?: number;
|
|
22
23
|
onToggle?: () => void;
|
|
23
24
|
}
|
|
24
|
-
export declare function KjunIconToggle({ active, activeIcon, inactiveIcon, activeColorClass, inactiveColorClass, activeColor, inactiveColor, size, disabled, loading, ariaLabel, tooltip, tooltipPlacement, tooltipDelay, onToggle, }: KjunIconToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export interface KjunCopyButtonProps {
|
|
25
|
+
export declare function KjunIconToggle({ active, activeIcon, inactiveIcon, activeColorClass, inactiveColorClass, activeColor, inactiveColor, size, disabled, loading, ariaLabel, tooltip, tooltipPlacement, tooltipDelay, onToggle, className, style, onClick, onFocus, onPointerEnter, ...rest }: KjunIconToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export interface KjunCopyButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" | "value" | "disabled" | "children"> {
|
|
26
27
|
value: string;
|
|
27
28
|
ariaLabel?: string;
|
|
28
29
|
text?: string;
|
|
@@ -34,8 +35,8 @@ export interface KjunCopyButtonProps {
|
|
|
34
35
|
onCopied?: (value: string) => void;
|
|
35
36
|
onCopyError?: (error: unknown) => void;
|
|
36
37
|
}
|
|
37
|
-
export declare function KjunCopyButton({ value, ariaLabel, text, successText, inline, size, disabled, copyText, onCopied, onCopyError, }: KjunCopyButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
-
export interface KjunRefreshButtonProps extends Omit<KjunButtonProps, "onClick" | "children"> {
|
|
38
|
+
export declare function KjunCopyButton({ value, ariaLabel, text, successText, inline, size, disabled, copyText, onCopied, onCopyError, className, style, onClick, ...rest }: KjunCopyButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export interface KjunRefreshButtonProps extends Omit<KjunButtonProps, "onClick" | "children" | "prefix" | "suffix"> {
|
|
39
40
|
targetName?: string;
|
|
40
41
|
mode?: "icon" | "text";
|
|
41
42
|
text?: string;
|
|
@@ -43,18 +44,22 @@ export interface KjunRefreshButtonProps extends Omit<KjunButtonProps, "onClick"
|
|
|
43
44
|
tooltip?: string;
|
|
44
45
|
tooltipPlacement?: KjunTooltipProps["placement"];
|
|
45
46
|
tooltipDelay?: number;
|
|
46
|
-
|
|
47
|
+
/** A returned promise shows loading until it settles; loading stays the app's to set otherwise. */
|
|
48
|
+
onRefresh?: () => void | Promise<unknown>;
|
|
47
49
|
}
|
|
48
|
-
export declare function KjunRefreshButton({ targetName, mode, text, size, variant, ariaLabel, title, tooltip, tooltipPlacement, tooltipDelay, spinOnLoading, onRefresh, ...props }: KjunRefreshButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
49
|
-
export
|
|
50
|
-
export interface KjunExternalLinkProps {
|
|
50
|
+
export declare function KjunRefreshButton({ targetName, mode, text, size, variant, ariaLabel, title, tooltip, tooltipPlacement, tooltipDelay, spinOnLoading, loading, onRefresh, ...props }: KjunRefreshButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export interface KjunExternalLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "href" | "target" | "rel" | "type" | "children" | "onClick" | "onChange" | "autoFocus"> {
|
|
51
52
|
href?: string;
|
|
52
53
|
mode?: "icon" | "text";
|
|
54
|
+
/** The icon link's name (default "External link"); a text link shows it when it has no children. */
|
|
53
55
|
label?: string;
|
|
54
56
|
children?: ReactNode;
|
|
57
|
+
/** Called when the link is opened (e.g. for analytics); the click does not reach the parent. */
|
|
58
|
+
onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;
|
|
55
59
|
}
|
|
56
|
-
|
|
57
|
-
export
|
|
60
|
+
/** Opens only http(s) URLs in a new window; anything else renders as plain text. */
|
|
61
|
+
export declare function KjunExternalLink({ href, mode, label, children, onClick, className, ...rest }: KjunExternalLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
export interface KjunScrollFadeProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "className" | "style" | "onChange" | "autoFocus"> {
|
|
58
63
|
children?: ReactNode;
|
|
59
64
|
/** Which way the content scrolls; vertical needs a height (style or class) to scroll within. */
|
|
60
65
|
direction?: ScrollFadeDirection;
|
|
@@ -63,5 +68,5 @@ export interface KjunScrollFadeProps {
|
|
|
63
68
|
className?: string;
|
|
64
69
|
style?: CSSProperties;
|
|
65
70
|
}
|
|
66
|
-
/** Fades whichever edge along `direction` still has content to scroll to. */
|
|
67
|
-
export declare
|
|
71
|
+
/** Fades whichever edge along `direction` still has content to scroll to. The ref is the scrolling element. */
|
|
72
|
+
export declare const KjunScrollFade: import("react").ForwardRefExoticComponent<KjunScrollFadeProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -34,14 +34,16 @@ export interface KjunBottomNavigationProps {
|
|
|
34
34
|
onNavigate?: Navigate;
|
|
35
35
|
/** The current destination was pressed again, e.g. to scroll its page back to the top. */
|
|
36
36
|
onReselect?: Navigate;
|
|
37
|
-
/** Paints the surface (default true): a square bar with a
|
|
37
|
+
/** Paints the surface (default true): a square bar with a hairline shadow along its top edge; false lets the page background show through, so the bar does not read as a separate band. */
|
|
38
38
|
surface?: boolean;
|
|
39
39
|
/** "auto" (default) draws outline icons and fills the selected one; "filled" or "outline" keeps one style for every destination, the selection then carried by colour (and stroke weight). */
|
|
40
40
|
iconStyle?: NavigationIconStyle;
|
|
41
41
|
/** Shows each label under its icon (default true); false draws icons alone on a lower bar, each label staying the destination's accessible name. Destinations without icons always show their labels. */
|
|
42
42
|
showLabels?: boolean;
|
|
43
|
+
/** Pins the bar to the viewport's bottom edge while the page scrolls (default false). It keeps its own room at the end of the page flow, so the last content is never under it and nothing is measured; give it the page's end, under a parent with overflow visible. */
|
|
44
|
+
sticky?: boolean;
|
|
43
45
|
}
|
|
44
|
-
export declare function KjunBottomNavigation({ items, value, ariaLabel, safeArea, keyboardVisible, hideOnKeyboard, onNavigate, onReselect, surface, iconStyle, showLabels }: KjunBottomNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
46
|
+
export declare function KjunBottomNavigation({ items, value, ariaLabel, safeArea, keyboardVisible, hideOnKeyboard, onNavigate, onReselect, surface, iconStyle, showLabels, sticky }: KjunBottomNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
45
47
|
export interface KjunFloatingNavigationProps {
|
|
46
48
|
items: NavigationDestination[];
|
|
47
49
|
value: string;
|
|
@@ -53,9 +55,11 @@ export interface KjunFloatingNavigationProps {
|
|
|
53
55
|
onNavigate?: Navigate;
|
|
54
56
|
/** The current destination was pressed again, e.g. to scroll its page back to the top. */
|
|
55
57
|
onReselect?: Navigate;
|
|
58
|
+
/** Pins the bar to the viewport's bottom edge while the page scrolls (default false). It keeps its own room at the end of the page flow, so the last content is never under it and nothing is measured; give it the page's end, under a parent with overflow visible. */
|
|
59
|
+
sticky?: boolean;
|
|
56
60
|
}
|
|
57
61
|
/** A capsule detached from the screen edge. Destinations with an icon show only the icon; the label stays their accessible name. */
|
|
58
|
-
export declare function KjunFloatingNavigation({ items, value, ariaLabel, safeArea, keyboardVisible, hideOnKeyboard, onNavigate, onReselect }: KjunFloatingNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
62
|
+
export declare function KjunFloatingNavigation({ items, value, ariaLabel, safeArea, keyboardVisible, hideOnKeyboard, onNavigate, onReselect, sticky }: KjunFloatingNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
59
63
|
export interface KjunBottomActionBarProps {
|
|
60
64
|
description?: string;
|
|
61
65
|
children: ReactNode;
|
|
@@ -65,5 +69,11 @@ export interface KjunBottomActionBarProps {
|
|
|
65
69
|
hideOnKeyboard?: boolean;
|
|
66
70
|
/** Paints the surface background (default true); false lets the page background show through, so the bar does not read as a separate band. */
|
|
67
71
|
surface?: boolean;
|
|
72
|
+
/** "floating" is a capsule detached from the screen edge, like KjunFloatingNavigation: the description and the actions sit on one line and unsized buttons in it are lg pills. */
|
|
73
|
+
variant?: "docked" | "floating";
|
|
74
|
+
/** Names the bar as a region (landmark) that screen readers can jump to, e.g. "Order summary". */
|
|
75
|
+
ariaLabel?: string;
|
|
76
|
+
/** Pins the bar to the viewport's bottom edge while the page scrolls (default false). It keeps its own room at the end of the page flow, so the last content is never under it and nothing is measured; give it the page's end, under a parent with overflow visible. */
|
|
77
|
+
sticky?: boolean;
|
|
68
78
|
}
|
|
69
|
-
export declare function KjunBottomActionBar({ description, children, safeArea, keyboardVisible, hideOnKeyboard, surface }: KjunBottomActionBarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
79
|
+
export declare function KjunBottomActionBar({ description, children, safeArea, keyboardVisible, hideOnKeyboard, surface, variant, ariaLabel, sticky }: KjunBottomActionBarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -34,14 +34,16 @@ export interface KjunBottomNavigationProps {
|
|
|
34
34
|
onNavigate?: Navigate;
|
|
35
35
|
/** The current destination was pressed again, e.g. to scroll its page back to the top. */
|
|
36
36
|
onReselect?: Navigate;
|
|
37
|
-
/** Paints the surface (default true): a square bar with a
|
|
37
|
+
/** Paints the surface (default true): a square bar with a hairline shadow along its top edge; false lets the page background show through, so the bar does not read as a separate band. */
|
|
38
38
|
surface?: boolean;
|
|
39
39
|
/** "auto" (default) draws outline icons and fills the selected one; "filled" or "outline" keeps one style for every destination, the selection then carried by colour (and stroke weight). */
|
|
40
40
|
iconStyle?: NavigationIconStyle;
|
|
41
41
|
/** Shows each label under its icon (default true); false draws icons alone on a lower bar, each label staying the destination's accessible name. Destinations without icons always show their labels. */
|
|
42
42
|
showLabels?: boolean;
|
|
43
|
+
/** Pins the bar to the viewport's bottom edge while the page scrolls (default false). It keeps its own room at the end of the page flow, so the last content is never under it and nothing is measured; give it the page's end, under a parent with overflow visible. */
|
|
44
|
+
sticky?: boolean;
|
|
43
45
|
}
|
|
44
|
-
export declare function KjunBottomNavigation({ items, value, ariaLabel, safeArea, keyboardVisible, hideOnKeyboard, onNavigate, onReselect, surface, iconStyle, showLabels }: KjunBottomNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
46
|
+
export declare function KjunBottomNavigation({ items, value, ariaLabel, safeArea, keyboardVisible, hideOnKeyboard, onNavigate, onReselect, surface, iconStyle, showLabels, sticky }: KjunBottomNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
45
47
|
export interface KjunFloatingNavigationProps {
|
|
46
48
|
items: NavigationDestination[];
|
|
47
49
|
value: string;
|
|
@@ -53,9 +55,11 @@ export interface KjunFloatingNavigationProps {
|
|
|
53
55
|
onNavigate?: Navigate;
|
|
54
56
|
/** The current destination was pressed again, e.g. to scroll its page back to the top. */
|
|
55
57
|
onReselect?: Navigate;
|
|
58
|
+
/** Pins the bar to the viewport's bottom edge while the page scrolls (default false). It keeps its own room at the end of the page flow, so the last content is never under it and nothing is measured; give it the page's end, under a parent with overflow visible. */
|
|
59
|
+
sticky?: boolean;
|
|
56
60
|
}
|
|
57
61
|
/** A capsule detached from the screen edge. Destinations with an icon show only the icon; the label stays their accessible name. */
|
|
58
|
-
export declare function KjunFloatingNavigation({ items, value, ariaLabel, safeArea, keyboardVisible, hideOnKeyboard, onNavigate, onReselect }: KjunFloatingNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
62
|
+
export declare function KjunFloatingNavigation({ items, value, ariaLabel, safeArea, keyboardVisible, hideOnKeyboard, onNavigate, onReselect, sticky }: KjunFloatingNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
59
63
|
export interface KjunBottomActionBarProps {
|
|
60
64
|
description?: string;
|
|
61
65
|
children: ReactNode;
|
|
@@ -65,5 +69,11 @@ export interface KjunBottomActionBarProps {
|
|
|
65
69
|
hideOnKeyboard?: boolean;
|
|
66
70
|
/** Paints the surface background (default true); false lets the page background show through, so the bar does not read as a separate band. */
|
|
67
71
|
surface?: boolean;
|
|
72
|
+
/** "floating" is a capsule detached from the screen edge, like KjunFloatingNavigation: the description and the actions sit on one line and unsized buttons in it are lg pills. */
|
|
73
|
+
variant?: "docked" | "floating";
|
|
74
|
+
/** Names the bar as a region (landmark) that screen readers can jump to, e.g. "Order summary". */
|
|
75
|
+
ariaLabel?: string;
|
|
76
|
+
/** Pins the bar to the viewport's bottom edge while the page scrolls (default false). It keeps its own room at the end of the page flow, so the last content is never under it and nothing is measured; give it the page's end, under a parent with overflow visible. */
|
|
77
|
+
sticky?: boolean;
|
|
68
78
|
}
|
|
69
|
-
export declare function KjunBottomActionBar({ description, children, safeArea, keyboardVisible, hideOnKeyboard, surface }: KjunBottomActionBarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
79
|
+
export declare function KjunBottomActionBar({ description, children, safeArea, keyboardVisible, hideOnKeyboard, surface, variant, ariaLabel, sticky }: KjunBottomActionBarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type CSSProperties, type MouseEvent } from "react";
|
|
2
|
+
import { type KjunAvatarProps } from "./media.cjs";
|
|
3
|
+
/** One person in a group: the KjunAvatar props the group does not decide, plus a stable key. */
|
|
4
|
+
export type KjunAvatarGroupItem = Omit<KjunAvatarProps, "size" | "shape" | "decorative" | "alt"> & {
|
|
5
|
+
key: string;
|
|
6
|
+
};
|
|
7
|
+
export interface KjunAvatarGroupProps {
|
|
8
|
+
/** The people shown, front first. */
|
|
9
|
+
items: KjunAvatarGroupItem[];
|
|
10
|
+
/** Most avatars drawn (default 4); the rest fold into a "+N" chip that is not counted here. */
|
|
11
|
+
max?: number;
|
|
12
|
+
/** The whole headcount when the server sends only a few avatars (default items.length). */
|
|
13
|
+
total?: number;
|
|
14
|
+
size?: KjunAvatarProps["size"];
|
|
15
|
+
/** Circles overlap; squares sit apart with no ring. */
|
|
16
|
+
shape?: KjunAvatarProps["shape"];
|
|
17
|
+
/** The one name the group is read by, e.g. "참여자 128명"; defaults to the headcount. */
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
/** The colour behind the group, for the ring that cuts each circle out of its neighbour (default the surface colour). */
|
|
20
|
+
ringColor?: CSSProperties["color"];
|
|
21
|
+
/** Makes the whole group one button (onClick), for example to open the full list. */
|
|
22
|
+
pressable?: boolean;
|
|
23
|
+
/** Blocks a pressable group and dims it. */
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
26
|
+
className?: string;
|
|
27
|
+
style?: CSSProperties;
|
|
28
|
+
id?: string;
|
|
29
|
+
/** Points at text that says more about the group, e.g. who is still invited. */
|
|
30
|
+
"aria-describedby"?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Overlapping avatars with a "+N" chip, read as one name. Each avatar is wrapped so the group owns overlap, order and ring.
|
|
34
|
+
* The ref reaches the root: the button when pressable, else the div.
|
|
35
|
+
*/
|
|
36
|
+
export declare const KjunAvatarGroup: import("react").ForwardRefExoticComponent<KjunAvatarGroupProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type CSSProperties, type MouseEvent } from "react";
|
|
2
|
+
import { type KjunAvatarProps } from "./media.js";
|
|
3
|
+
/** One person in a group: the KjunAvatar props the group does not decide, plus a stable key. */
|
|
4
|
+
export type KjunAvatarGroupItem = Omit<KjunAvatarProps, "size" | "shape" | "decorative" | "alt"> & {
|
|
5
|
+
key: string;
|
|
6
|
+
};
|
|
7
|
+
export interface KjunAvatarGroupProps {
|
|
8
|
+
/** The people shown, front first. */
|
|
9
|
+
items: KjunAvatarGroupItem[];
|
|
10
|
+
/** Most avatars drawn (default 4); the rest fold into a "+N" chip that is not counted here. */
|
|
11
|
+
max?: number;
|
|
12
|
+
/** The whole headcount when the server sends only a few avatars (default items.length). */
|
|
13
|
+
total?: number;
|
|
14
|
+
size?: KjunAvatarProps["size"];
|
|
15
|
+
/** Circles overlap; squares sit apart with no ring. */
|
|
16
|
+
shape?: KjunAvatarProps["shape"];
|
|
17
|
+
/** The one name the group is read by, e.g. "참여자 128명"; defaults to the headcount. */
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
/** The colour behind the group, for the ring that cuts each circle out of its neighbour (default the surface colour). */
|
|
20
|
+
ringColor?: CSSProperties["color"];
|
|
21
|
+
/** Makes the whole group one button (onClick), for example to open the full list. */
|
|
22
|
+
pressable?: boolean;
|
|
23
|
+
/** Blocks a pressable group and dims it. */
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
26
|
+
className?: string;
|
|
27
|
+
style?: CSSProperties;
|
|
28
|
+
id?: string;
|
|
29
|
+
/** Points at text that says more about the group, e.g. who is still invited. */
|
|
30
|
+
"aria-describedby"?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Overlapping avatars with a "+N" chip, read as one name. Each avatar is wrapped so the group owns overlap, order and ring.
|
|
34
|
+
* The ref reaches the root: the button when pressable, else the div.
|
|
35
|
+
*/
|
|
36
|
+
export declare const KjunAvatarGroup: import("react").ForwardRefExoticComponent<KjunAvatarGroupProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -1,24 +1,33 @@
|
|
|
1
1
|
import { type ButtonSize, type ButtonVariant } from "@kjun-ui/tokens";
|
|
2
|
-
import {
|
|
2
|
+
import { useMinimumLoading } from "../../../shared/package-runtime/minimum-loading.cjs";
|
|
3
|
+
import { type ButtonHTMLAttributes, type ReactNode, type SVGProps } from "react";
|
|
4
|
+
export { useMinimumLoading };
|
|
3
5
|
export interface KjunIconProps extends SVGProps<SVGSVGElement> {
|
|
4
6
|
name: string;
|
|
5
7
|
size?: number | string;
|
|
6
8
|
spin?: boolean;
|
|
7
9
|
filled?: boolean;
|
|
10
|
+
/** Names an icon that carries meaning on its own; screen readers then read it as an image. Without it the icon is decorative and hidden. */
|
|
11
|
+
ariaLabel?: string;
|
|
8
12
|
}
|
|
9
|
-
export declare function KjunIcon({ name, size, spin, filled, className, ...props }: KjunIconProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export
|
|
11
|
-
export interface KjunButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> {
|
|
13
|
+
export declare function KjunIcon({ name, size, spin, filled, ariaLabel, className, ...props }: KjunIconProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export interface KjunButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size" | "prefix"> {
|
|
12
15
|
variant?: ButtonVariant;
|
|
13
16
|
size?: ButtonSize;
|
|
14
|
-
/** "circle" makes
|
|
15
|
-
|
|
17
|
+
/** "circle" makes a button round: as wide as its height with a full radius. It takes an icon alone or a short label alone
|
|
18
|
+
* (one or two characters, such as a day number); a label with an icon keeps its width. "pill" rounds a button with a label
|
|
19
|
+
* fully and keeps its width, for a button inside a rounded bar. */
|
|
20
|
+
shape?: "default" | "circle" | "pill";
|
|
16
21
|
loading?: boolean;
|
|
17
22
|
block?: boolean;
|
|
18
23
|
/** Long labels wrap: the size's height becomes a minimum and the button grows instead of overflowing. */
|
|
19
24
|
wrap?: boolean;
|
|
20
25
|
prefixIcon?: string;
|
|
21
26
|
suffixIcon?: string;
|
|
27
|
+
/** A node in the icon's place (a brand logo, a small avatar), fitted to the size's icon box. Wins over prefixIcon. */
|
|
28
|
+
prefix?: ReactNode;
|
|
29
|
+
/** A node in the suffix icon's place, fitted to the size's icon box. Wins over suffixIcon. */
|
|
30
|
+
suffix?: ReactNode;
|
|
22
31
|
prefixIconFilled?: boolean;
|
|
23
32
|
suffixIconFilled?: boolean;
|
|
24
33
|
ariaLabel?: string;
|
|
@@ -1,24 +1,33 @@
|
|
|
1
1
|
import { type ButtonSize, type ButtonVariant } from "@kjun-ui/tokens";
|
|
2
|
-
import {
|
|
2
|
+
import { useMinimumLoading } from "../../../shared/package-runtime/minimum-loading.js";
|
|
3
|
+
import { type ButtonHTMLAttributes, type ReactNode, type SVGProps } from "react";
|
|
4
|
+
export { useMinimumLoading };
|
|
3
5
|
export interface KjunIconProps extends SVGProps<SVGSVGElement> {
|
|
4
6
|
name: string;
|
|
5
7
|
size?: number | string;
|
|
6
8
|
spin?: boolean;
|
|
7
9
|
filled?: boolean;
|
|
10
|
+
/** Names an icon that carries meaning on its own; screen readers then read it as an image. Without it the icon is decorative and hidden. */
|
|
11
|
+
ariaLabel?: string;
|
|
8
12
|
}
|
|
9
|
-
export declare function KjunIcon({ name, size, spin, filled, className, ...props }: KjunIconProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export
|
|
11
|
-
export interface KjunButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> {
|
|
13
|
+
export declare function KjunIcon({ name, size, spin, filled, ariaLabel, className, ...props }: KjunIconProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export interface KjunButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size" | "prefix"> {
|
|
12
15
|
variant?: ButtonVariant;
|
|
13
16
|
size?: ButtonSize;
|
|
14
|
-
/** "circle" makes
|
|
15
|
-
|
|
17
|
+
/** "circle" makes a button round: as wide as its height with a full radius. It takes an icon alone or a short label alone
|
|
18
|
+
* (one or two characters, such as a day number); a label with an icon keeps its width. "pill" rounds a button with a label
|
|
19
|
+
* fully and keeps its width, for a button inside a rounded bar. */
|
|
20
|
+
shape?: "default" | "circle" | "pill";
|
|
16
21
|
loading?: boolean;
|
|
17
22
|
block?: boolean;
|
|
18
23
|
/** Long labels wrap: the size's height becomes a minimum and the button grows instead of overflowing. */
|
|
19
24
|
wrap?: boolean;
|
|
20
25
|
prefixIcon?: string;
|
|
21
26
|
suffixIcon?: string;
|
|
27
|
+
/** A node in the icon's place (a brand logo, a small avatar), fitted to the size's icon box. Wins over prefixIcon. */
|
|
28
|
+
prefix?: ReactNode;
|
|
29
|
+
/** A node in the suffix icon's place, fitted to the size's icon box. Wins over suffixIcon. */
|
|
30
|
+
suffix?: ReactNode;
|
|
22
31
|
prefixIconFilled?: boolean;
|
|
23
32
|
suffixIconFilled?: boolean;
|
|
24
33
|
ariaLabel?: string;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { type DateRange, type DateUnavailable, type WeekStart } from "../../../shared/package-runtime/calendar.cjs";
|
|
1
|
+
import { type DateRange, type DateUnavailable, type RangeLimits, type WeekStart } from "../../../shared/package-runtime/calendar.cjs";
|
|
2
2
|
export interface CalendarOptions {
|
|
3
3
|
/** The first column of the week: 0 Sunday (default), 1 Monday. */
|
|
4
4
|
weekStart?: WeekStart;
|
|
5
5
|
/** Paints Sundays with the danger role, as Korean calendars do (default true). */
|
|
6
6
|
markSunday?: boolean;
|
|
7
|
+
/** Paints Saturdays with the info role (default true). */
|
|
8
|
+
markSaturday?: boolean;
|
|
7
9
|
/** Days that cannot be picked inside the bounds, such as holidays; a range cannot run across one. */
|
|
8
10
|
isDateUnavailable?: DateUnavailable;
|
|
9
11
|
}
|
|
@@ -20,6 +22,8 @@ export interface CalendarViewProps extends CalendarOptions {
|
|
|
20
22
|
/** Range mode: ready-made ranges shown as chips above the days. */
|
|
21
23
|
presets?: readonly DateRangePreset[];
|
|
22
24
|
onPreset?: (range: DateRange) => void;
|
|
25
|
+
/** Range mode: the shortest and longest range while the end is picked. */
|
|
26
|
+
limits?: RangeLimits;
|
|
23
27
|
}
|
|
24
28
|
/** A named range offered as a chip, such as "최근 7일". */
|
|
25
29
|
export interface DateRangePreset {
|
|
@@ -27,4 +31,4 @@ export interface DateRangePreset {
|
|
|
27
31
|
value: DateRange;
|
|
28
32
|
}
|
|
29
33
|
/** KJUN's calendar: a day grid with keyboard movement, and month and year views opened from the heading. */
|
|
30
|
-
export declare function CalendarView({ value, range, min, max, clearable, weekStart, markSunday, isDateUnavailable, onSelect, onClear, onApply, presets, onPreset }: CalendarViewProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare function CalendarView({ value, range, min, max, clearable, weekStart, markSunday, markSaturday, isDateUnavailable, onSelect, onClear, onApply, presets, onPreset, limits }: CalendarViewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { type DateRange, type DateUnavailable, type WeekStart } from "../../../shared/package-runtime/calendar.js";
|
|
1
|
+
import { type DateRange, type DateUnavailable, type RangeLimits, type WeekStart } from "../../../shared/package-runtime/calendar.js";
|
|
2
2
|
export interface CalendarOptions {
|
|
3
3
|
/** The first column of the week: 0 Sunday (default), 1 Monday. */
|
|
4
4
|
weekStart?: WeekStart;
|
|
5
5
|
/** Paints Sundays with the danger role, as Korean calendars do (default true). */
|
|
6
6
|
markSunday?: boolean;
|
|
7
|
+
/** Paints Saturdays with the info role (default true). */
|
|
8
|
+
markSaturday?: boolean;
|
|
7
9
|
/** Days that cannot be picked inside the bounds, such as holidays; a range cannot run across one. */
|
|
8
10
|
isDateUnavailable?: DateUnavailable;
|
|
9
11
|
}
|
|
@@ -20,6 +22,8 @@ export interface CalendarViewProps extends CalendarOptions {
|
|
|
20
22
|
/** Range mode: ready-made ranges shown as chips above the days. */
|
|
21
23
|
presets?: readonly DateRangePreset[];
|
|
22
24
|
onPreset?: (range: DateRange) => void;
|
|
25
|
+
/** Range mode: the shortest and longest range while the end is picked. */
|
|
26
|
+
limits?: RangeLimits;
|
|
23
27
|
}
|
|
24
28
|
/** A named range offered as a chip, such as "최근 7일". */
|
|
25
29
|
export interface DateRangePreset {
|
|
@@ -27,4 +31,4 @@ export interface DateRangePreset {
|
|
|
27
31
|
value: DateRange;
|
|
28
32
|
}
|
|
29
33
|
/** KJUN's calendar: a day grid with keyboard movement, and month and year views opened from the heading. */
|
|
30
|
-
export declare function CalendarView({ value, range, min, max, clearable, weekStart, markSunday, isDateUnavailable, onSelect, onClear, onApply, presets, onPreset }: CalendarViewProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare function CalendarView({ value, range, min, max, clearable, weekStart, markSunday, markSaturday, isDateUnavailable, onSelect, onClear, onApply, presets, onPreset, limits }: CalendarViewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -22,13 +22,20 @@ export interface KjunCardProps extends Omit<HTMLAttributes<HTMLDivElement>, "tit
|
|
|
22
22
|
dividers?: boolean;
|
|
23
23
|
/** Makes the whole card one button (onClick). Do not put buttons or links inside a pressable card. */
|
|
24
24
|
pressable?: boolean;
|
|
25
|
-
/**
|
|
25
|
+
/** Makes the whole card one link (an a element), such as a card that opens a page. Like pressable, no buttons or links inside.
|
|
26
|
+
* A router can take onClick: call event.preventDefault() and navigate. */
|
|
27
|
+
href?: string;
|
|
28
|
+
/** Where a link card opens, e.g. "_blank"; a new tab gets rel="noopener noreferrer" unless rel is given. */
|
|
29
|
+
target?: string;
|
|
30
|
+
/** The link's rel; by default "noopener noreferrer" for target="_blank". */
|
|
31
|
+
rel?: string;
|
|
32
|
+
/** Blocks a pressable or link card and dims it. */
|
|
26
33
|
disabled?: boolean;
|
|
27
|
-
/**
|
|
34
|
+
/** Name of a pressable or link card; defaults to a text title. */
|
|
28
35
|
ariaLabel?: string;
|
|
29
36
|
/** Title level in the page outline (h2–h6, default 3); false keeps plain text. A pressable card's title is never a heading. */
|
|
30
37
|
headingLevel?: CardHeadingLevel;
|
|
31
38
|
/** Where the footer places its content: start (default) or end, such as confirm and cancel actions. */
|
|
32
39
|
footerAlign?: "start" | "end";
|
|
33
40
|
}
|
|
34
|
-
export declare function KjunCard({ title, subtitle, header, headerActions, media, mediaPosition, mediaAspect, footer, padding, bodyPadding, radius, surface, elevation, border, dividers, pressable, disabled, ariaLabel, headingLevel, footerAlign, children, style, className, onClick, onKeyDown, onKeyUp, ...props }: KjunCardProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare function KjunCard({ title, subtitle, header, headerActions, media, mediaPosition, mediaAspect, footer, padding, bodyPadding, radius, surface, elevation, border, dividers, pressable, href, target, rel, disabled, ariaLabel, headingLevel, footerAlign, children, style, className, onClick, onKeyDown, onKeyUp, ...props }: KjunCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -22,13 +22,20 @@ export interface KjunCardProps extends Omit<HTMLAttributes<HTMLDivElement>, "tit
|
|
|
22
22
|
dividers?: boolean;
|
|
23
23
|
/** Makes the whole card one button (onClick). Do not put buttons or links inside a pressable card. */
|
|
24
24
|
pressable?: boolean;
|
|
25
|
-
/**
|
|
25
|
+
/** Makes the whole card one link (an a element), such as a card that opens a page. Like pressable, no buttons or links inside.
|
|
26
|
+
* A router can take onClick: call event.preventDefault() and navigate. */
|
|
27
|
+
href?: string;
|
|
28
|
+
/** Where a link card opens, e.g. "_blank"; a new tab gets rel="noopener noreferrer" unless rel is given. */
|
|
29
|
+
target?: string;
|
|
30
|
+
/** The link's rel; by default "noopener noreferrer" for target="_blank". */
|
|
31
|
+
rel?: string;
|
|
32
|
+
/** Blocks a pressable or link card and dims it. */
|
|
26
33
|
disabled?: boolean;
|
|
27
|
-
/**
|
|
34
|
+
/** Name of a pressable or link card; defaults to a text title. */
|
|
28
35
|
ariaLabel?: string;
|
|
29
36
|
/** Title level in the page outline (h2–h6, default 3); false keeps plain text. A pressable card's title is never a heading. */
|
|
30
37
|
headingLevel?: CardHeadingLevel;
|
|
31
38
|
/** Where the footer places its content: start (default) or end, such as confirm and cancel actions. */
|
|
32
39
|
footerAlign?: "start" | "end";
|
|
33
40
|
}
|
|
34
|
-
export declare function KjunCard({ title, subtitle, header, headerActions, media, mediaPosition, mediaAspect, footer, padding, bodyPadding, radius, surface, elevation, border, dividers, pressable, disabled, ariaLabel, headingLevel, footerAlign, children, style, className, onClick, onKeyDown, onKeyUp, ...props }: KjunCardProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare function KjunCard({ title, subtitle, header, headerActions, media, mediaPosition, mediaAspect, footer, padding, bodyPadding, radius, surface, elevation, border, dividers, pressable, href, target, rel, disabled, ariaLabel, headingLevel, footerAlign, children, style, className, onClick, onKeyDown, onKeyUp, ...props }: KjunCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,10 +7,17 @@ export interface KjunCarouselProps {
|
|
|
7
7
|
title?: string;
|
|
8
8
|
/** The title's heading level (default h2). */
|
|
9
9
|
titleAs?: CarouselTitleTag;
|
|
10
|
+
/** An action at the end of the title row, before the previous and next buttons, e.g. a "전체 보기" link button. */
|
|
11
|
+
action?: ReactNode;
|
|
10
12
|
/** Each direct child is one slide. */
|
|
11
13
|
children?: ReactNode;
|
|
12
14
|
/** full: as wide as the carousel; peek: the next slide shows at the edge; auto: each slide keeps its own width. */
|
|
13
15
|
slideSize?: CarouselSlideSize;
|
|
16
|
+
/**
|
|
17
|
+
* Each slide at least this many pixels wide: as many as fit share the row (never fewer than one), so no slide is cut at
|
|
18
|
+
* the edge. Takes the place of slideSize.
|
|
19
|
+
*/
|
|
20
|
+
minSlideWidth?: number;
|
|
14
21
|
gap?: CarouselGap;
|
|
15
22
|
/** Controlled current slide; pair with onIndexChange. */
|
|
16
23
|
index?: number;
|
|
@@ -36,4 +43,4 @@ export interface KjunCarouselProps {
|
|
|
36
43
|
id?: string;
|
|
37
44
|
}
|
|
38
45
|
/** A row of slides moved by swipe, drag, keyboard, buttons or dots. It never moves on its own. */
|
|
39
|
-
export declare function KjunCarousel({ ariaLabel, title, titleAs: Title, children, slideSize, gap, index, defaultIndex, onIndexChange, indicators, controls, mouseDrag, snapAlign, bleed, indicatorPlacement, className, style, id }: KjunCarouselProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export declare function KjunCarousel({ ariaLabel, title, titleAs: Title, action, children, slideSize, minSlideWidth, gap, index, defaultIndex, onIndexChange, indicators, controls, mouseDrag, snapAlign, bleed, indicatorPlacement, className, style, id }: KjunCarouselProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,10 +7,17 @@ export interface KjunCarouselProps {
|
|
|
7
7
|
title?: string;
|
|
8
8
|
/** The title's heading level (default h2). */
|
|
9
9
|
titleAs?: CarouselTitleTag;
|
|
10
|
+
/** An action at the end of the title row, before the previous and next buttons, e.g. a "전체 보기" link button. */
|
|
11
|
+
action?: ReactNode;
|
|
10
12
|
/** Each direct child is one slide. */
|
|
11
13
|
children?: ReactNode;
|
|
12
14
|
/** full: as wide as the carousel; peek: the next slide shows at the edge; auto: each slide keeps its own width. */
|
|
13
15
|
slideSize?: CarouselSlideSize;
|
|
16
|
+
/**
|
|
17
|
+
* Each slide at least this many pixels wide: as many as fit share the row (never fewer than one), so no slide is cut at
|
|
18
|
+
* the edge. Takes the place of slideSize.
|
|
19
|
+
*/
|
|
20
|
+
minSlideWidth?: number;
|
|
14
21
|
gap?: CarouselGap;
|
|
15
22
|
/** Controlled current slide; pair with onIndexChange. */
|
|
16
23
|
index?: number;
|
|
@@ -36,4 +43,4 @@ export interface KjunCarouselProps {
|
|
|
36
43
|
id?: string;
|
|
37
44
|
}
|
|
38
45
|
/** A row of slides moved by swipe, drag, keyboard, buttons or dots. It never moves on its own. */
|
|
39
|
-
export declare function KjunCarousel({ ariaLabel, title, titleAs: Title, children, slideSize, gap, index, defaultIndex, onIndexChange, indicators, controls, mouseDrag, snapAlign, bleed, indicatorPlacement, className, style, id }: KjunCarouselProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export declare function KjunCarousel({ ariaLabel, title, titleAs: Title, action, children, slideSize, minSlideWidth, gap, index, defaultIndex, onIndexChange, indicators, controls, mouseDrag, snapAlign, bleed, indicatorPlacement, className, style, id }: KjunCarouselProps): import("react/jsx-runtime").JSX.Element;
|