@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
|
@@ -17,6 +17,9 @@ interface DateFieldProps extends CalendarOptions {
|
|
|
17
17
|
id?: string;
|
|
18
18
|
/** Submits the value with a form through a hidden input. */
|
|
19
19
|
name?: string;
|
|
20
|
+
/** Opens and closes the calendar from the app; leave it out to let the field own it. */
|
|
21
|
+
open?: boolean;
|
|
22
|
+
onOpenChange?: (open: boolean) => void;
|
|
20
23
|
}
|
|
21
24
|
export interface KjunDatePickerProps extends DateFieldProps {
|
|
22
25
|
/** YYYY-MM-DD, or an empty string. */
|
|
@@ -24,7 +27,7 @@ export interface KjunDatePickerProps extends DateFieldProps {
|
|
|
24
27
|
onValueChange?: (value: string) => void;
|
|
25
28
|
onChange?: (value: string) => void;
|
|
26
29
|
}
|
|
27
|
-
export declare function KjunDatePicker({ value, placeholder, clearable, min, max, weekStart, markSunday, isDateUnavailable, onValueChange, onChange, ...field }: KjunDatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare function KjunDatePicker({ value, placeholder, clearable, min, max, weekStart, markSunday, markSaturday, isDateUnavailable, onValueChange, onChange, open: controlled, onOpenChange, ...field }: KjunDatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
28
31
|
export interface KjunDateRangePickerProps extends DateFieldProps {
|
|
29
32
|
/** Start and end as YYYY-MM-DD; empty strings while unset. A reversed or out-of-bounds range is shown in order and inside the bounds. */
|
|
30
33
|
value: DateRange;
|
|
@@ -34,7 +37,10 @@ export interface KjunDateRangePickerProps extends DateFieldProps {
|
|
|
34
37
|
presets?: readonly DateRangePreset[];
|
|
35
38
|
/** Commits as soon as the second day is picked, without Apply. */
|
|
36
39
|
autoApply?: boolean;
|
|
40
|
+
/** Shortest and longest range in days, counting both ends; other ends fade while the end is picked and start a new range when pressed. */
|
|
41
|
+
minDays?: number;
|
|
42
|
+
maxDays?: number;
|
|
37
43
|
}
|
|
38
44
|
/** Two dates picked in one calendar: the first pick starts the range, the second ends it, and Apply commits it. */
|
|
39
|
-
export declare function KjunDateRangePicker({ value: given, placeholder, clearable, min, max, weekStart, markSunday, isDateUnavailable, presets, autoApply, onValueChange, onChange, ...field }: KjunDateRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare function KjunDateRangePicker({ value: given, placeholder, clearable, min, max, weekStart, markSunday, markSaturday, isDateUnavailable, presets, autoApply, minDays, maxDays, onValueChange, onChange, open: controlled, onOpenChange, ...field }: KjunDateRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
40
46
|
export type { DateRange, DateRangePreset };
|
|
@@ -15,7 +15,8 @@ export interface KjunBadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
15
15
|
/** What the badge means to a screen reader, e.g. "읽지 않은 알림 3개"; the drawn text is then hidden from it. Give it to a dot-only badge. */
|
|
16
16
|
label?: string;
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
/** Like Chip, the ref reaches the badge's root span. */
|
|
19
|
+
export declare const KjunBadge: import("react").ForwardRefExoticComponent<KjunBadgeProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
19
20
|
export { KjunCard } from "./card.cjs";
|
|
20
21
|
export type { KjunCardProps } from "./card.cjs";
|
|
21
22
|
export interface KjunEmptyProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
@@ -43,15 +44,19 @@ export interface KjunAlertProps {
|
|
|
43
44
|
variant?: SemanticTone;
|
|
44
45
|
size?: "sm" | "md" | "lg";
|
|
45
46
|
title?: ReactNode;
|
|
47
|
+
/** An icon name in place of the tone's icon (its filled form when the icon has one), or false for no icon. */
|
|
48
|
+
icon?: string | false;
|
|
46
49
|
closable?: boolean;
|
|
47
50
|
/** How screen readers announce it: assertive (role alert), polite (status) or off; defaults to alert for danger, status otherwise. */
|
|
48
51
|
live?: AlertLive;
|
|
49
52
|
children?: ReactNode;
|
|
50
|
-
/** Buttons
|
|
53
|
+
/** Buttons for the alert, under the message when it has a title, beside it otherwise (under it when the alert is too narrow for both); unsized KjunButtons follow the alert size. */
|
|
51
54
|
actions?: ReactNode;
|
|
55
|
+
/** Extra class on the alert root, for placement in the page layout; it leaves with the alert when closed. */
|
|
56
|
+
className?: string;
|
|
52
57
|
onClose?: () => void;
|
|
53
58
|
}
|
|
54
|
-
export declare function KjunAlert({ type, variant, size, title, closable, live, children, actions, onClose, }: KjunAlertProps): import("react/jsx-runtime").JSX.Element | null;
|
|
59
|
+
export declare function KjunAlert({ type, variant, size, title, icon, closable, live, children, actions, className, onClose, }: KjunAlertProps): import("react/jsx-runtime").JSX.Element | null;
|
|
55
60
|
export interface KjunProgressProps {
|
|
56
61
|
/** null is missing data; omission keeps the zero default. */
|
|
57
62
|
value?: number | null;
|
|
@@ -61,23 +66,38 @@ export interface KjunProgressProps {
|
|
|
61
66
|
size?: "sm" | "md" | "lg";
|
|
62
67
|
variant?: SemanticTone;
|
|
63
68
|
showLabel?: boolean;
|
|
69
|
+
/** Shown and read in place of the rounded percent while the value is known, e.g. "37.4%" or "3.2 / 8 GB". */
|
|
70
|
+
valueText?: string;
|
|
71
|
+
/** A reference point across the bar on the value's own scale (0 to max), such as today's share of a budget. Bars only; not drawn while indeterminate or missing. */
|
|
72
|
+
marker?: number;
|
|
73
|
+
/** Read by screen readers as the bar's description, e.g. "오늘 기준 53%". Put visible wording in subLabel. */
|
|
74
|
+
markerLabel?: string;
|
|
64
75
|
label?: ReactNode;
|
|
65
76
|
subLabel?: ReactNode;
|
|
66
77
|
shape?: "bar" | "circle";
|
|
67
78
|
}
|
|
68
|
-
export declare function KjunProgress({ value, indeterminate, max, size, variant, showLabel, label, subLabel, shape, }: KjunProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
export declare function KjunProgress({ value, indeterminate, max, size, variant, showLabel, valueText, marker, markerLabel, label, subLabel, shape, }: KjunProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
69
80
|
export interface KjunSkeletonProps {
|
|
70
81
|
/** "line" is one line of text: a bar in the line box of `role`, or of the surrounding text when no role is given. */
|
|
71
82
|
type?: "text" | "line" | "avatar" | "card" | "table" | "stat" | "block";
|
|
72
|
-
/**
|
|
83
|
+
/**
|
|
84
|
+
* Typography role of the text a "line" or "text" skeleton stands in for. Omitted, a line takes the surrounding
|
|
85
|
+
* text's line height and a paragraph the body role.
|
|
86
|
+
*/
|
|
73
87
|
role?: TypographyRole;
|
|
74
88
|
/** Announces loading to screen readers (a status); the skeleton itself stays silent. */
|
|
75
89
|
loadingText?: string;
|
|
90
|
+
/** Lines of a "text" or "card" skeleton, body rows of a "table" one; floored, 0–100. */
|
|
76
91
|
rows?: number;
|
|
92
|
+
/** Columns of a "table" skeleton; floored, 0–100. */
|
|
77
93
|
columns?: number;
|
|
78
94
|
height?: CSSProperties["height"];
|
|
79
95
|
width?: CSSProperties["width"];
|
|
80
96
|
animated?: boolean;
|
|
81
97
|
rounded?: boolean;
|
|
98
|
+
className?: string;
|
|
99
|
+
/** Merged over the root's own width. */
|
|
100
|
+
style?: CSSProperties;
|
|
101
|
+
id?: string;
|
|
82
102
|
}
|
|
83
|
-
export declare function KjunSkeleton({ type, rows, columns, height, width, animated, rounded, role, loadingText, }: KjunSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
103
|
+
export declare function KjunSkeleton({ type, rows, columns, height, width, animated, rounded, role, loadingText, className, style, id, }: KjunSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,7 +15,8 @@ export interface KjunBadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
15
15
|
/** What the badge means to a screen reader, e.g. "읽지 않은 알림 3개"; the drawn text is then hidden from it. Give it to a dot-only badge. */
|
|
16
16
|
label?: string;
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
/** Like Chip, the ref reaches the badge's root span. */
|
|
19
|
+
export declare const KjunBadge: import("react").ForwardRefExoticComponent<KjunBadgeProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
19
20
|
export { KjunCard } from "./card.js";
|
|
20
21
|
export type { KjunCardProps } from "./card.js";
|
|
21
22
|
export interface KjunEmptyProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
@@ -43,15 +44,19 @@ export interface KjunAlertProps {
|
|
|
43
44
|
variant?: SemanticTone;
|
|
44
45
|
size?: "sm" | "md" | "lg";
|
|
45
46
|
title?: ReactNode;
|
|
47
|
+
/** An icon name in place of the tone's icon (its filled form when the icon has one), or false for no icon. */
|
|
48
|
+
icon?: string | false;
|
|
46
49
|
closable?: boolean;
|
|
47
50
|
/** How screen readers announce it: assertive (role alert), polite (status) or off; defaults to alert for danger, status otherwise. */
|
|
48
51
|
live?: AlertLive;
|
|
49
52
|
children?: ReactNode;
|
|
50
|
-
/** Buttons
|
|
53
|
+
/** Buttons for the alert, under the message when it has a title, beside it otherwise (under it when the alert is too narrow for both); unsized KjunButtons follow the alert size. */
|
|
51
54
|
actions?: ReactNode;
|
|
55
|
+
/** Extra class on the alert root, for placement in the page layout; it leaves with the alert when closed. */
|
|
56
|
+
className?: string;
|
|
52
57
|
onClose?: () => void;
|
|
53
58
|
}
|
|
54
|
-
export declare function KjunAlert({ type, variant, size, title, closable, live, children, actions, onClose, }: KjunAlertProps): import("react/jsx-runtime").JSX.Element | null;
|
|
59
|
+
export declare function KjunAlert({ type, variant, size, title, icon, closable, live, children, actions, className, onClose, }: KjunAlertProps): import("react/jsx-runtime").JSX.Element | null;
|
|
55
60
|
export interface KjunProgressProps {
|
|
56
61
|
/** null is missing data; omission keeps the zero default. */
|
|
57
62
|
value?: number | null;
|
|
@@ -61,23 +66,38 @@ export interface KjunProgressProps {
|
|
|
61
66
|
size?: "sm" | "md" | "lg";
|
|
62
67
|
variant?: SemanticTone;
|
|
63
68
|
showLabel?: boolean;
|
|
69
|
+
/** Shown and read in place of the rounded percent while the value is known, e.g. "37.4%" or "3.2 / 8 GB". */
|
|
70
|
+
valueText?: string;
|
|
71
|
+
/** A reference point across the bar on the value's own scale (0 to max), such as today's share of a budget. Bars only; not drawn while indeterminate or missing. */
|
|
72
|
+
marker?: number;
|
|
73
|
+
/** Read by screen readers as the bar's description, e.g. "오늘 기준 53%". Put visible wording in subLabel. */
|
|
74
|
+
markerLabel?: string;
|
|
64
75
|
label?: ReactNode;
|
|
65
76
|
subLabel?: ReactNode;
|
|
66
77
|
shape?: "bar" | "circle";
|
|
67
78
|
}
|
|
68
|
-
export declare function KjunProgress({ value, indeterminate, max, size, variant, showLabel, label, subLabel, shape, }: KjunProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
export declare function KjunProgress({ value, indeterminate, max, size, variant, showLabel, valueText, marker, markerLabel, label, subLabel, shape, }: KjunProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
69
80
|
export interface KjunSkeletonProps {
|
|
70
81
|
/** "line" is one line of text: a bar in the line box of `role`, or of the surrounding text when no role is given. */
|
|
71
82
|
type?: "text" | "line" | "avatar" | "card" | "table" | "stat" | "block";
|
|
72
|
-
/**
|
|
83
|
+
/**
|
|
84
|
+
* Typography role of the text a "line" or "text" skeleton stands in for. Omitted, a line takes the surrounding
|
|
85
|
+
* text's line height and a paragraph the body role.
|
|
86
|
+
*/
|
|
73
87
|
role?: TypographyRole;
|
|
74
88
|
/** Announces loading to screen readers (a status); the skeleton itself stays silent. */
|
|
75
89
|
loadingText?: string;
|
|
90
|
+
/** Lines of a "text" or "card" skeleton, body rows of a "table" one; floored, 0–100. */
|
|
76
91
|
rows?: number;
|
|
92
|
+
/** Columns of a "table" skeleton; floored, 0–100. */
|
|
77
93
|
columns?: number;
|
|
78
94
|
height?: CSSProperties["height"];
|
|
79
95
|
width?: CSSProperties["width"];
|
|
80
96
|
animated?: boolean;
|
|
81
97
|
rounded?: boolean;
|
|
98
|
+
className?: string;
|
|
99
|
+
/** Merged over the root's own width. */
|
|
100
|
+
style?: CSSProperties;
|
|
101
|
+
id?: string;
|
|
82
102
|
}
|
|
83
|
-
export declare function KjunSkeleton({ type, rows, columns, height, width, animated, rounded, role, loadingText, }: KjunSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
103
|
+
export declare function KjunSkeleton({ type, rows, columns, height, width, animated, rounded, role, loadingText, className, style, id, }: KjunSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type FocusReturn } from "./floating-panel.cjs";
|
|
2
3
|
export interface KjunDrawerProps {
|
|
3
4
|
open: boolean;
|
|
4
5
|
onOpenChange: (v: boolean) => void;
|
|
@@ -10,15 +11,23 @@ export interface KjunDrawerProps {
|
|
|
10
11
|
closeOnEsc?: boolean;
|
|
11
12
|
noPadding?: boolean;
|
|
12
13
|
header?: ReactNode;
|
|
14
|
+
/** Secondary actions in the title row, before the close button (such as a reset button). */
|
|
15
|
+
headerActions?: ReactNode;
|
|
13
16
|
footer?: ReactNode;
|
|
14
17
|
children: ReactNode;
|
|
15
18
|
onClose?: () => void;
|
|
16
19
|
/** Called once after the close finishes and the layer has left the screen (not when it mounts closed or reopens during the exit). */
|
|
17
20
|
onAfterClose?: () => void;
|
|
18
21
|
ariaLabel?: string;
|
|
22
|
+
/** Id of the element that describes the drawer, read after its name. */
|
|
23
|
+
ariaDescribedBy?: string;
|
|
24
|
+
/** Read after the exit finishes; a missing target falls back to the opener or parent window. */
|
|
25
|
+
returnFocus?: FocusReturn;
|
|
26
|
+
/** Bottom drawers: a grab handle above the header; dragging the handle or header down closes the drawer. */
|
|
27
|
+
handle?: boolean;
|
|
19
28
|
/** Keeps clear of KjunProvider's safe area (default true): padded inside the panel and kept clear beyond a sheet. */
|
|
20
29
|
safeArea?: boolean;
|
|
21
30
|
/** Height limit in px for top and bottom drawers; by default they stop a sheet gap short of the opposite edge. */
|
|
22
31
|
maxHeight?: number;
|
|
23
32
|
}
|
|
24
|
-
export declare function KjunDrawer({ open, onOpenChange, title, position, width, closable, closeOnOverlay, closeOnEsc, noPadding, header, footer, children, onClose, onAfterClose, ariaLabel, safeArea, maxHeight, }: KjunDrawerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
33
|
+
export declare function KjunDrawer({ open, onOpenChange, title, position, width, closable, closeOnOverlay, closeOnEsc, noPadding, header, headerActions, footer, children, onClose, onAfterClose, ariaLabel, ariaDescribedBy, returnFocus, handle, safeArea, maxHeight, }: KjunDrawerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type FocusReturn } from "./floating-panel.js";
|
|
2
3
|
export interface KjunDrawerProps {
|
|
3
4
|
open: boolean;
|
|
4
5
|
onOpenChange: (v: boolean) => void;
|
|
@@ -10,15 +11,23 @@ export interface KjunDrawerProps {
|
|
|
10
11
|
closeOnEsc?: boolean;
|
|
11
12
|
noPadding?: boolean;
|
|
12
13
|
header?: ReactNode;
|
|
14
|
+
/** Secondary actions in the title row, before the close button (such as a reset button). */
|
|
15
|
+
headerActions?: ReactNode;
|
|
13
16
|
footer?: ReactNode;
|
|
14
17
|
children: ReactNode;
|
|
15
18
|
onClose?: () => void;
|
|
16
19
|
/** Called once after the close finishes and the layer has left the screen (not when it mounts closed or reopens during the exit). */
|
|
17
20
|
onAfterClose?: () => void;
|
|
18
21
|
ariaLabel?: string;
|
|
22
|
+
/** Id of the element that describes the drawer, read after its name. */
|
|
23
|
+
ariaDescribedBy?: string;
|
|
24
|
+
/** Read after the exit finishes; a missing target falls back to the opener or parent window. */
|
|
25
|
+
returnFocus?: FocusReturn;
|
|
26
|
+
/** Bottom drawers: a grab handle above the header; dragging the handle or header down closes the drawer. */
|
|
27
|
+
handle?: boolean;
|
|
19
28
|
/** Keeps clear of KjunProvider's safe area (default true): padded inside the panel and kept clear beyond a sheet. */
|
|
20
29
|
safeArea?: boolean;
|
|
21
30
|
/** Height limit in px for top and bottom drawers; by default they stop a sheet gap short of the opposite edge. */
|
|
22
31
|
maxHeight?: number;
|
|
23
32
|
}
|
|
24
|
-
export declare function KjunDrawer({ open, onOpenChange, title, position, width, closable, closeOnOverlay, closeOnEsc, noPadding, header, footer, children, onClose, onAfterClose, ariaLabel, safeArea, maxHeight, }: KjunDrawerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
33
|
+
export declare function KjunDrawer({ open, onOpenChange, title, position, width, closable, closeOnOverlay, closeOnEsc, noPadding, header, headerActions, footer, children, onClose, onAfterClose, ariaLabel, ariaDescribedBy, returnFocus, handle, safeArea, maxHeight, }: KjunDrawerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -3,6 +3,10 @@ import { type KjunButtonProps } from "./button.cjs";
|
|
|
3
3
|
import { type FocusReturn, type Placement } from "./floating-panel.cjs";
|
|
4
4
|
import { type KjunTooltipProps } from "./popover.cjs";
|
|
5
5
|
export interface KjunDropdownProps {
|
|
6
|
+
/** Controls visibility; omit for internal state. */
|
|
7
|
+
open?: boolean;
|
|
8
|
+
/** Asked to open or close; with `open`, update it to accept. onOpen and onClose report the visibility that follows. */
|
|
9
|
+
onOpenChange?: (open: boolean) => void;
|
|
6
10
|
disabled?: boolean;
|
|
7
11
|
placement?: Extract<Placement, "bottom-start" | "bottom-end" | "top-start" | "top-end">;
|
|
8
12
|
menuId?: string;
|
|
@@ -17,7 +21,7 @@ export interface KjunDropdownProps {
|
|
|
17
21
|
/** Where focus goes when the menu closes by choosing or Escape, instead of the trigger (e.g. an edited cell). Web only. */
|
|
18
22
|
returnFocus?: FocusReturn;
|
|
19
23
|
}
|
|
20
|
-
export declare function KjunDropdown({ disabled, placement, menuId, triggerId, menuClass, density, trigger, children, onOpen, onClose, returnFocus, }: KjunDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function KjunDropdown({ open: openProp, onOpenChange, disabled, placement, menuId, triggerId, menuClass, density, trigger, children, onOpen, onClose, returnFocus, }: KjunDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
21
25
|
export interface KjunDropdownItemProps {
|
|
22
26
|
id?: string;
|
|
23
27
|
variant?: "default" | "danger";
|
|
@@ -34,23 +38,29 @@ export interface KjunDropdownItemProps {
|
|
|
34
38
|
textValue?: string;
|
|
35
39
|
/** Keeps the menu open after choosing, for toggles the user flips several times. */
|
|
36
40
|
keepOpen?: boolean;
|
|
41
|
+
/** Inside a KjunDropdownSection with `value`: the value this single choice stands for. */
|
|
42
|
+
value?: string;
|
|
37
43
|
/** Makes the item a link; the browser follows it. */
|
|
38
44
|
href?: string;
|
|
39
45
|
target?: string;
|
|
40
46
|
children: ReactNode;
|
|
41
47
|
onClick?: () => void;
|
|
42
48
|
}
|
|
43
|
-
export declare function KjunDropdownItem({ id, variant, icon, disabled, selected, checked, description, shortcut, textValue, keepOpen, href, target, children, onClick, }: KjunDropdownItemProps): import("react/jsx-runtime").JSX.Element | null;
|
|
49
|
+
export declare function KjunDropdownItem({ id, variant, icon, disabled, selected, checked, description, shortcut, textValue, keepOpen, value, href, target, children, onClick, }: KjunDropdownItemProps): import("react/jsx-runtime").JSX.Element | null;
|
|
44
50
|
export interface KjunDropdownSectionProps {
|
|
45
51
|
/** Small heading over the group; it names the group for screen readers. */
|
|
46
52
|
title?: string;
|
|
47
53
|
/** Names the group for screen readers when it has no visible title. */
|
|
48
54
|
ariaLabel?: string;
|
|
55
|
+
/** Makes the items with a `value` one single choice: the item whose value matches shows the check. null chooses none. */
|
|
56
|
+
value?: string | null;
|
|
57
|
+
/** Called with the chosen item's value. */
|
|
58
|
+
onValueChange?: (value: string) => void;
|
|
49
59
|
children: ReactNode;
|
|
50
60
|
}
|
|
51
|
-
export declare function KjunDropdownSection({ title, ariaLabel, children }: KjunDropdownSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export declare function KjunDropdownSection({ title, ariaLabel, value, onValueChange, children }: KjunDropdownSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
52
62
|
export interface KjunDropdownSubmenuProps {
|
|
53
|
-
/** Stable key for the submenu; defaults to the label. */
|
|
63
|
+
/** Stable key for the submenu; defaults to the label. Give each submenu its own id when two at one level share a label. */
|
|
54
64
|
id?: string;
|
|
55
65
|
label: string;
|
|
56
66
|
icon?: string;
|
|
@@ -66,10 +76,14 @@ export interface KjunMenuButtonProps extends Omit<KjunDropdownProps, "trigger">
|
|
|
66
76
|
variant?: KjunButtonProps["variant"];
|
|
67
77
|
/** Show a square dots-vertical button; label remains its accessible name. */
|
|
68
78
|
compact?: boolean;
|
|
79
|
+
/** Icon before the label, or in place of dots-vertical when compact or unlabelled. */
|
|
80
|
+
icon?: string;
|
|
81
|
+
/** Show the chevron after a visible label (default true); false where the icon already says it opens a menu. */
|
|
82
|
+
chevron?: boolean;
|
|
69
83
|
loading?: boolean;
|
|
70
84
|
tooltip?: string;
|
|
71
85
|
tooltipPlacement?: KjunTooltipProps["placement"];
|
|
72
86
|
tooltipDelay?: number;
|
|
73
87
|
ariaLabel?: string;
|
|
74
88
|
}
|
|
75
|
-
export declare function KjunMenuButton({ label, size, variant, compact, loading, tooltip, tooltipPlacement, tooltipDelay, ariaLabel, onOpen, onClose, ...props }: KjunMenuButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
89
|
+
export declare function KjunMenuButton({ label, size, variant, compact, icon, chevron, loading, tooltip, tooltipPlacement, tooltipDelay, ariaLabel, onOpen, onClose, ...props }: KjunMenuButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,6 +3,10 @@ import { type KjunButtonProps } from "./button.js";
|
|
|
3
3
|
import { type FocusReturn, type Placement } from "./floating-panel.js";
|
|
4
4
|
import { type KjunTooltipProps } from "./popover.js";
|
|
5
5
|
export interface KjunDropdownProps {
|
|
6
|
+
/** Controls visibility; omit for internal state. */
|
|
7
|
+
open?: boolean;
|
|
8
|
+
/** Asked to open or close; with `open`, update it to accept. onOpen and onClose report the visibility that follows. */
|
|
9
|
+
onOpenChange?: (open: boolean) => void;
|
|
6
10
|
disabled?: boolean;
|
|
7
11
|
placement?: Extract<Placement, "bottom-start" | "bottom-end" | "top-start" | "top-end">;
|
|
8
12
|
menuId?: string;
|
|
@@ -17,7 +21,7 @@ export interface KjunDropdownProps {
|
|
|
17
21
|
/** Where focus goes when the menu closes by choosing or Escape, instead of the trigger (e.g. an edited cell). Web only. */
|
|
18
22
|
returnFocus?: FocusReturn;
|
|
19
23
|
}
|
|
20
|
-
export declare function KjunDropdown({ disabled, placement, menuId, triggerId, menuClass, density, trigger, children, onOpen, onClose, returnFocus, }: KjunDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function KjunDropdown({ open: openProp, onOpenChange, disabled, placement, menuId, triggerId, menuClass, density, trigger, children, onOpen, onClose, returnFocus, }: KjunDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
21
25
|
export interface KjunDropdownItemProps {
|
|
22
26
|
id?: string;
|
|
23
27
|
variant?: "default" | "danger";
|
|
@@ -34,23 +38,29 @@ export interface KjunDropdownItemProps {
|
|
|
34
38
|
textValue?: string;
|
|
35
39
|
/** Keeps the menu open after choosing, for toggles the user flips several times. */
|
|
36
40
|
keepOpen?: boolean;
|
|
41
|
+
/** Inside a KjunDropdownSection with `value`: the value this single choice stands for. */
|
|
42
|
+
value?: string;
|
|
37
43
|
/** Makes the item a link; the browser follows it. */
|
|
38
44
|
href?: string;
|
|
39
45
|
target?: string;
|
|
40
46
|
children: ReactNode;
|
|
41
47
|
onClick?: () => void;
|
|
42
48
|
}
|
|
43
|
-
export declare function KjunDropdownItem({ id, variant, icon, disabled, selected, checked, description, shortcut, textValue, keepOpen, href, target, children, onClick, }: KjunDropdownItemProps): import("react/jsx-runtime").JSX.Element | null;
|
|
49
|
+
export declare function KjunDropdownItem({ id, variant, icon, disabled, selected, checked, description, shortcut, textValue, keepOpen, value, href, target, children, onClick, }: KjunDropdownItemProps): import("react/jsx-runtime").JSX.Element | null;
|
|
44
50
|
export interface KjunDropdownSectionProps {
|
|
45
51
|
/** Small heading over the group; it names the group for screen readers. */
|
|
46
52
|
title?: string;
|
|
47
53
|
/** Names the group for screen readers when it has no visible title. */
|
|
48
54
|
ariaLabel?: string;
|
|
55
|
+
/** Makes the items with a `value` one single choice: the item whose value matches shows the check. null chooses none. */
|
|
56
|
+
value?: string | null;
|
|
57
|
+
/** Called with the chosen item's value. */
|
|
58
|
+
onValueChange?: (value: string) => void;
|
|
49
59
|
children: ReactNode;
|
|
50
60
|
}
|
|
51
|
-
export declare function KjunDropdownSection({ title, ariaLabel, children }: KjunDropdownSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export declare function KjunDropdownSection({ title, ariaLabel, value, onValueChange, children }: KjunDropdownSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
52
62
|
export interface KjunDropdownSubmenuProps {
|
|
53
|
-
/** Stable key for the submenu; defaults to the label. */
|
|
63
|
+
/** Stable key for the submenu; defaults to the label. Give each submenu its own id when two at one level share a label. */
|
|
54
64
|
id?: string;
|
|
55
65
|
label: string;
|
|
56
66
|
icon?: string;
|
|
@@ -66,10 +76,14 @@ export interface KjunMenuButtonProps extends Omit<KjunDropdownProps, "trigger">
|
|
|
66
76
|
variant?: KjunButtonProps["variant"];
|
|
67
77
|
/** Show a square dots-vertical button; label remains its accessible name. */
|
|
68
78
|
compact?: boolean;
|
|
79
|
+
/** Icon before the label, or in place of dots-vertical when compact or unlabelled. */
|
|
80
|
+
icon?: string;
|
|
81
|
+
/** Show the chevron after a visible label (default true); false where the icon already says it opens a menu. */
|
|
82
|
+
chevron?: boolean;
|
|
69
83
|
loading?: boolean;
|
|
70
84
|
tooltip?: string;
|
|
71
85
|
tooltipPlacement?: KjunTooltipProps["placement"];
|
|
72
86
|
tooltipDelay?: number;
|
|
73
87
|
ariaLabel?: string;
|
|
74
88
|
}
|
|
75
|
-
export declare function KjunMenuButton({ label, size, variant, compact, loading, tooltip, tooltipPlacement, tooltipDelay, ariaLabel, onOpen, onClose, ...props }: KjunMenuButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
89
|
+
export declare function KjunMenuButton({ label, size, variant, compact, icon, chevron, loading, tooltip, tooltipPlacement, tooltipDelay, ariaLabel, onOpen, onClose, ...props }: KjunMenuButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type WeekStart } from "../../../shared/package-runtime/calendar.cjs";
|
|
2
|
+
import { type DayMarks, type HolidayTest } from "../../../shared/package-runtime/event-calendar.cjs";
|
|
3
|
+
import { type CSSProperties } from "react";
|
|
4
|
+
export type { DayMarks, DaySpan, HolidayTest } from "../../../shared/package-runtime/event-calendar.cjs";
|
|
5
|
+
export interface KjunEventCalendarProps {
|
|
6
|
+
/** A whole month (default) or one week. */
|
|
7
|
+
view?: "month" | "week";
|
|
8
|
+
/** The month shown, "YYYY-MM" (controlled; this month when missing or malformed). */
|
|
9
|
+
month?: string;
|
|
10
|
+
/** Asked for another month by a swipe, the keyboard or an outside day; without it the month does not change. */
|
|
11
|
+
onMonthChange?: (month: string) => void;
|
|
12
|
+
/** Week view: any day of the week shown, "YYYY-MM-DD" (controlled; this week when missing). */
|
|
13
|
+
week?: string;
|
|
14
|
+
/** Asked for another week with that week's first day; without it the week does not change. */
|
|
15
|
+
onWeekChange?: (week: string) => void;
|
|
16
|
+
/** The picked day, "YYYY-MM-DD"; null picks nothing. Clearing it is up to the app. */
|
|
17
|
+
value?: string | null;
|
|
18
|
+
/** A day was pressed; the app decides whether it becomes the value. */
|
|
19
|
+
onSelect?: (iso: string) => void;
|
|
20
|
+
/** Touch hold, right click or Shift+Enter on a day; without it these are left to the browser. */
|
|
21
|
+
onDayLongPress?: (iso: string) => void;
|
|
22
|
+
/** Describes the long press to screen readers, e.g. "이날 약속 추가". */
|
|
23
|
+
dayLongPressLabel?: string;
|
|
24
|
+
/** What a day shows under its number: the first span, an icon and up to three dots; count is spoken only. */
|
|
25
|
+
marks?: (iso: string) => DayMarks | undefined;
|
|
26
|
+
/** Holidays draw a danger number; a string also names the day for screen readers. */
|
|
27
|
+
isHoliday?: HolidayTest;
|
|
28
|
+
/** Fades the numbers and marks of days before today (default true); span bars keep their colour. */
|
|
29
|
+
dimPast?: boolean;
|
|
30
|
+
/** The first column of the week: 0 Sunday (default), 1 Monday. */
|
|
31
|
+
weekStart?: WeekStart;
|
|
32
|
+
/** Paints Sundays with the danger role (default true). */
|
|
33
|
+
markSunday?: boolean;
|
|
34
|
+
/** Paints Saturdays with the info role (default true). */
|
|
35
|
+
markSaturday?: boolean;
|
|
36
|
+
/** The app's today, "YYYY-MM-DD" (server time, another time zone); the device's today when missing or malformed. */
|
|
37
|
+
today?: string;
|
|
38
|
+
/** The app is still fetching the period's events: day numbers step back to the past fade and the grid is busy. Days stay pressable. */
|
|
39
|
+
loading?: boolean;
|
|
40
|
+
/** A horizontal touch swipe asks for the next or previous month or week (default true). Mouse drags never do. */
|
|
41
|
+
swipeable?: boolean;
|
|
42
|
+
className?: string;
|
|
43
|
+
style?: CSSProperties;
|
|
44
|
+
id?: string;
|
|
45
|
+
}
|
|
46
|
+
/** A month or week of days that show events as dots, an icon and a span bar. It draws no card or heading. */
|
|
47
|
+
export declare function KjunEventCalendar({ view, month, onMonthChange, week, onWeekChange, value, onSelect, onDayLongPress, dayLongPressLabel, marks, isHoliday, dimPast, weekStart, markSunday, markSaturday, swipeable, today: todayProp, loading, className, style, id }: KjunEventCalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type WeekStart } from "../../../shared/package-runtime/calendar.js";
|
|
2
|
+
import { type DayMarks, type HolidayTest } from "../../../shared/package-runtime/event-calendar.js";
|
|
3
|
+
import { type CSSProperties } from "react";
|
|
4
|
+
export type { DayMarks, DaySpan, HolidayTest } from "../../../shared/package-runtime/event-calendar.js";
|
|
5
|
+
export interface KjunEventCalendarProps {
|
|
6
|
+
/** A whole month (default) or one week. */
|
|
7
|
+
view?: "month" | "week";
|
|
8
|
+
/** The month shown, "YYYY-MM" (controlled; this month when missing or malformed). */
|
|
9
|
+
month?: string;
|
|
10
|
+
/** Asked for another month by a swipe, the keyboard or an outside day; without it the month does not change. */
|
|
11
|
+
onMonthChange?: (month: string) => void;
|
|
12
|
+
/** Week view: any day of the week shown, "YYYY-MM-DD" (controlled; this week when missing). */
|
|
13
|
+
week?: string;
|
|
14
|
+
/** Asked for another week with that week's first day; without it the week does not change. */
|
|
15
|
+
onWeekChange?: (week: string) => void;
|
|
16
|
+
/** The picked day, "YYYY-MM-DD"; null picks nothing. Clearing it is up to the app. */
|
|
17
|
+
value?: string | null;
|
|
18
|
+
/** A day was pressed; the app decides whether it becomes the value. */
|
|
19
|
+
onSelect?: (iso: string) => void;
|
|
20
|
+
/** Touch hold, right click or Shift+Enter on a day; without it these are left to the browser. */
|
|
21
|
+
onDayLongPress?: (iso: string) => void;
|
|
22
|
+
/** Describes the long press to screen readers, e.g. "이날 약속 추가". */
|
|
23
|
+
dayLongPressLabel?: string;
|
|
24
|
+
/** What a day shows under its number: the first span, an icon and up to three dots; count is spoken only. */
|
|
25
|
+
marks?: (iso: string) => DayMarks | undefined;
|
|
26
|
+
/** Holidays draw a danger number; a string also names the day for screen readers. */
|
|
27
|
+
isHoliday?: HolidayTest;
|
|
28
|
+
/** Fades the numbers and marks of days before today (default true); span bars keep their colour. */
|
|
29
|
+
dimPast?: boolean;
|
|
30
|
+
/** The first column of the week: 0 Sunday (default), 1 Monday. */
|
|
31
|
+
weekStart?: WeekStart;
|
|
32
|
+
/** Paints Sundays with the danger role (default true). */
|
|
33
|
+
markSunday?: boolean;
|
|
34
|
+
/** Paints Saturdays with the info role (default true). */
|
|
35
|
+
markSaturday?: boolean;
|
|
36
|
+
/** The app's today, "YYYY-MM-DD" (server time, another time zone); the device's today when missing or malformed. */
|
|
37
|
+
today?: string;
|
|
38
|
+
/** The app is still fetching the period's events: day numbers step back to the past fade and the grid is busy. Days stay pressable. */
|
|
39
|
+
loading?: boolean;
|
|
40
|
+
/** A horizontal touch swipe asks for the next or previous month or week (default true). Mouse drags never do. */
|
|
41
|
+
swipeable?: boolean;
|
|
42
|
+
className?: string;
|
|
43
|
+
style?: CSSProperties;
|
|
44
|
+
id?: string;
|
|
45
|
+
}
|
|
46
|
+
/** A month or week of days that show events as dots, an icon and a span bar. It draws no card or heading. */
|
|
47
|
+
export declare function KjunEventCalendar({ view, month, onMonthChange, week, onWeekChange, value, onSelect, onDayLongPress, dayLongPressLabel, marks, isHoliday, dimPast, weekStart, markSunday, markSaturday, swipeable, today: todayProp, loading, className, style, id }: KjunEventCalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,6 +4,8 @@ export interface KjunFabProps extends Omit<ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
4
4
|
icon: string;
|
|
5
5
|
/** Visible text beside the icon; the circle becomes a capsule of the same height. */
|
|
6
6
|
label?: string;
|
|
7
|
+
/** Folds a labelled FAB back into its circle (e.g. while the page scrolls); the label stays its name. */
|
|
8
|
+
collapsed?: boolean;
|
|
7
9
|
/** The accessible name. Required without a label, since the icon alone says nothing. */
|
|
8
10
|
ariaLabel?: string;
|
|
9
11
|
/** "md" (default) is 56, "sm" is 48. Both take a label, loading and every state. */
|
|
@@ -4,6 +4,8 @@ export interface KjunFabProps extends Omit<ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
4
4
|
icon: string;
|
|
5
5
|
/** Visible text beside the icon; the circle becomes a capsule of the same height. */
|
|
6
6
|
label?: string;
|
|
7
|
+
/** Folds a labelled FAB back into its circle (e.g. while the page scrolls); the label stays its name. */
|
|
8
|
+
collapsed?: boolean;
|
|
7
9
|
/** The accessible name. Required without a label, since the icon alone says nothing. */
|
|
8
10
|
ariaLabel?: string;
|
|
9
11
|
/** "md" (default) is 56, "sm" is 48. Both take a label, loading and every state. */
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { KjunMessages } from "../../../shared/package-runtime/messages/index.cjs";
|
|
2
|
+
import { type KjunUploadFile } from "../../../shared/package-runtime/file-upload.cjs";
|
|
3
|
+
export interface FileUploadRowProps {
|
|
4
|
+
file: KjunUploadFile;
|
|
5
|
+
m: KjunMessages;
|
|
6
|
+
intl?: string;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
onRemove?: (id: string) => void;
|
|
9
|
+
onRetry?: (id: string) => void;
|
|
10
|
+
/** Single-file mode: opens the picker to replace this file. */
|
|
11
|
+
onReplace?: () => void;
|
|
12
|
+
}
|
|
13
|
+
/** One file: thumbnail, middle-truncated name, size and status in words, a bar while uploading, then its actions. */
|
|
14
|
+
export declare function FileUploadRow({ file, m, intl, disabled, onRemove, onRetry, onReplace }: FileUploadRowProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export interface FileUploadTileProps {
|
|
16
|
+
file: KjunUploadFile;
|
|
17
|
+
m: KjunMessages;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
onRemove?: (id: string) => void;
|
|
20
|
+
onRetry?: (id: string) => void;
|
|
21
|
+
}
|
|
22
|
+
/** layout="grid": a square tile with the preview, a bar while uploading, a fill and retry when failed, × at the corner. */
|
|
23
|
+
export declare function FileUploadTile({ file, m, disabled, onRemove, onRetry }: FileUploadTileProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { KjunMessages } from "../../../shared/package-runtime/messages/index.js";
|
|
2
|
+
import { type KjunUploadFile } from "../../../shared/package-runtime/file-upload.js";
|
|
3
|
+
export interface FileUploadRowProps {
|
|
4
|
+
file: KjunUploadFile;
|
|
5
|
+
m: KjunMessages;
|
|
6
|
+
intl?: string;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
onRemove?: (id: string) => void;
|
|
9
|
+
onRetry?: (id: string) => void;
|
|
10
|
+
/** Single-file mode: opens the picker to replace this file. */
|
|
11
|
+
onReplace?: () => void;
|
|
12
|
+
}
|
|
13
|
+
/** One file: thumbnail, middle-truncated name, size and status in words, a bar while uploading, then its actions. */
|
|
14
|
+
export declare function FileUploadRow({ file, m, intl, disabled, onRemove, onRetry, onReplace }: FileUploadRowProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export interface FileUploadTileProps {
|
|
16
|
+
file: KjunUploadFile;
|
|
17
|
+
m: KjunMessages;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
onRemove?: (id: string) => void;
|
|
20
|
+
onRetry?: (id: string) => void;
|
|
21
|
+
}
|
|
22
|
+
/** layout="grid": a square tile with the preview, a bar while uploading, a fill and retry when failed, × at the corner. */
|
|
23
|
+
export declare function FileUploadTile({ file, m, disabled, onRemove, onRetry }: FileUploadTileProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type CSSProperties } from "react";
|
|
2
|
+
import { type KjunRejectedFile, type KjunUploadFile, type KjunUploadLayout, type KjunUploadSize, type KjunUploadTrigger } from "../../../shared/package-runtime/file-upload.cjs";
|
|
3
|
+
export type { KjunUploadFile, KjunUploadStatus, KjunRejectedFile, KjunRejectReason, KjunUploadSize, KjunUploadTrigger, KjunUploadLayout, } from "../../../shared/package-runtime/file-upload.cjs";
|
|
4
|
+
export interface KjunFileUploadProps {
|
|
5
|
+
/** The app's files. Empty shows the pick zone; any file folds it into a list with an add row. */
|
|
6
|
+
files?: KjunUploadFile[];
|
|
7
|
+
/** <input accept> rules such as ".pdf,image/*". Also lists the allowed types in the hint. */
|
|
8
|
+
accept?: string;
|
|
9
|
+
/** Largest file in bytes. */
|
|
10
|
+
maxSize?: number;
|
|
11
|
+
maxFiles?: number;
|
|
12
|
+
/** false: one file; a new pick replaces it. */
|
|
13
|
+
multiple?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** Second line of the zone; built from accept, maxSize and maxFiles when left out. */
|
|
16
|
+
hint?: string;
|
|
17
|
+
/** "compact": the empty field is the one-line add row (80px card) instead of the tall zone. */
|
|
18
|
+
size?: KjunUploadSize;
|
|
19
|
+
/** "button": a "Choose files" button at the end of a text line picks instead of a pressable area; drops still land on the card. */
|
|
20
|
+
trigger?: KjunUploadTrigger;
|
|
21
|
+
/** "grid": files show as square tiles (photos) with an add tile, instead of rows. */
|
|
22
|
+
layout?: KjunUploadLayout;
|
|
23
|
+
/** Picks that passed the pre-screen, and the ones that did not. The app adds `accepted` to `files` and uploads them. */
|
|
24
|
+
onSelect: (accepted: File[], rejected: KjunRejectedFile<File>[]) => void;
|
|
25
|
+
/** The × on a row: cancels a waiting or uploading file, removes a finished one. Server-side deletion is the app's call. */
|
|
26
|
+
onRemove?: (id: string) => void;
|
|
27
|
+
/** Retry on a failed row; the head's retry calls it for each failed row. */
|
|
28
|
+
onRetry?: (id: string) => void;
|
|
29
|
+
/** Id of the hidden file input, for an outside <label for>; defaults to the FormGroup's id. */
|
|
30
|
+
id?: string;
|
|
31
|
+
className?: string;
|
|
32
|
+
style?: CSSProperties;
|
|
33
|
+
/** Names the field when no FormGroup label does. */
|
|
34
|
+
ariaLabel?: string;
|
|
35
|
+
/** Extra description ids, merged with the FormGroup's hint and error. */
|
|
36
|
+
ariaDescribedBy?: string;
|
|
37
|
+
}
|
|
38
|
+
export declare function KjunFileUpload({ files, accept, maxSize, maxFiles, multiple, disabled, hint, size, trigger, layout, onSelect, onRemove, onRetry, id, className, style, ariaLabel, ariaDescribedBy, }: KjunFileUploadProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type CSSProperties } from "react";
|
|
2
|
+
import { type KjunRejectedFile, type KjunUploadFile, type KjunUploadLayout, type KjunUploadSize, type KjunUploadTrigger } from "../../../shared/package-runtime/file-upload.js";
|
|
3
|
+
export type { KjunUploadFile, KjunUploadStatus, KjunRejectedFile, KjunRejectReason, KjunUploadSize, KjunUploadTrigger, KjunUploadLayout, } from "../../../shared/package-runtime/file-upload.js";
|
|
4
|
+
export interface KjunFileUploadProps {
|
|
5
|
+
/** The app's files. Empty shows the pick zone; any file folds it into a list with an add row. */
|
|
6
|
+
files?: KjunUploadFile[];
|
|
7
|
+
/** <input accept> rules such as ".pdf,image/*". Also lists the allowed types in the hint. */
|
|
8
|
+
accept?: string;
|
|
9
|
+
/** Largest file in bytes. */
|
|
10
|
+
maxSize?: number;
|
|
11
|
+
maxFiles?: number;
|
|
12
|
+
/** false: one file; a new pick replaces it. */
|
|
13
|
+
multiple?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** Second line of the zone; built from accept, maxSize and maxFiles when left out. */
|
|
16
|
+
hint?: string;
|
|
17
|
+
/** "compact": the empty field is the one-line add row (80px card) instead of the tall zone. */
|
|
18
|
+
size?: KjunUploadSize;
|
|
19
|
+
/** "button": a "Choose files" button at the end of a text line picks instead of a pressable area; drops still land on the card. */
|
|
20
|
+
trigger?: KjunUploadTrigger;
|
|
21
|
+
/** "grid": files show as square tiles (photos) with an add tile, instead of rows. */
|
|
22
|
+
layout?: KjunUploadLayout;
|
|
23
|
+
/** Picks that passed the pre-screen, and the ones that did not. The app adds `accepted` to `files` and uploads them. */
|
|
24
|
+
onSelect: (accepted: File[], rejected: KjunRejectedFile<File>[]) => void;
|
|
25
|
+
/** The × on a row: cancels a waiting or uploading file, removes a finished one. Server-side deletion is the app's call. */
|
|
26
|
+
onRemove?: (id: string) => void;
|
|
27
|
+
/** Retry on a failed row; the head's retry calls it for each failed row. */
|
|
28
|
+
onRetry?: (id: string) => void;
|
|
29
|
+
/** Id of the hidden file input, for an outside <label for>; defaults to the FormGroup's id. */
|
|
30
|
+
id?: string;
|
|
31
|
+
className?: string;
|
|
32
|
+
style?: CSSProperties;
|
|
33
|
+
/** Names the field when no FormGroup label does. */
|
|
34
|
+
ariaLabel?: string;
|
|
35
|
+
/** Extra description ids, merged with the FormGroup's hint and error. */
|
|
36
|
+
ariaDescribedBy?: string;
|
|
37
|
+
}
|
|
38
|
+
export declare function KjunFileUpload({ files, accept, maxSize, maxFiles, multiple, disabled, hint, size, trigger, layout, onSelect, onRemove, onRetry, id, className, style, ariaLabel, ariaDescribedBy, }: KjunFileUploadProps): import("react/jsx-runtime").JSX.Element;
|