@kjun-ui/react 0.13.0 → 0.15.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/dist/index.cjs +613 -435
- package/dist/index.js +508 -329
- package/dist/styles.css +73 -1
- package/dist/types/packages/react/src/card.d.cts +8 -2
- package/dist/types/packages/react/src/card.d.ts +8 -2
- package/dist/types/packages/react/src/collapse.d.cts +3 -1
- package/dist/types/packages/react/src/collapse.d.ts +3 -1
- package/dist/types/packages/react/src/combobox.d.cts +6 -2
- package/dist/types/packages/react/src/combobox.d.ts +6 -2
- package/dist/types/packages/react/src/display.d.cts +2 -1
- package/dist/types/packages/react/src/display.d.ts +2 -1
- package/dist/types/packages/react/src/drawer.d.cts +3 -1
- package/dist/types/packages/react/src/drawer.d.ts +3 -1
- package/dist/types/packages/react/src/dropdown.d.cts +4 -2
- package/dist/types/packages/react/src/dropdown.d.ts +4 -2
- package/dist/types/packages/react/src/feedback.d.cts +5 -2
- package/dist/types/packages/react/src/feedback.d.ts +5 -2
- package/dist/types/packages/react/src/floating-panel.d.cts +3 -0
- package/dist/types/packages/react/src/floating-panel.d.ts +3 -0
- package/dist/types/packages/react/src/layout-primitives.d.cts +1 -1
- package/dist/types/packages/react/src/layout-primitives.d.ts +1 -1
- package/dist/types/packages/react/src/list.d.cts +17 -2
- package/dist/types/packages/react/src/list.d.ts +17 -2
- package/dist/types/packages/react/src/media.d.cts +4 -2
- package/dist/types/packages/react/src/media.d.ts +4 -2
- package/dist/types/packages/react/src/modal.d.cts +3 -1
- package/dist/types/packages/react/src/modal.d.ts +3 -1
- package/dist/types/packages/react/src/navigation.d.cts +7 -1
- package/dist/types/packages/react/src/navigation.d.ts +7 -1
- package/dist/types/packages/react/src/select-control.d.cts +4 -1
- package/dist/types/packages/react/src/select-control.d.ts +4 -1
- package/dist/types/shared/package-runtime/layout-primitives.d.cts +1 -1
- package/dist/types/shared/package-runtime/layout-primitives.d.ts +1 -1
- package/dist/types/shared/package-runtime/nested-controls.d.cts +2 -0
- package/dist/types/shared/package-runtime/nested-controls.d.ts +2 -0
- package/dist/types/shared/package-runtime/progress-circle.d.cts +11 -0
- package/dist/types/shared/package-runtime/progress-circle.d.ts +11 -0
- package/dist/types/shared/package-runtime/use-after-close.d.cts +6 -0
- package/dist/types/shared/package-runtime/use-after-close.d.ts +6 -0
- package/package.json +3 -3
package/dist/styles.css
CHANGED
|
@@ -654,6 +654,12 @@
|
|
|
654
654
|
--_kjun-extension-progress-heights-sm: 4px;
|
|
655
655
|
--_kjun-extension-progress-heights-md: 8px;
|
|
656
656
|
--_kjun-extension-progress-heights-lg: 12px;
|
|
657
|
+
--_kjun-extension-progress-circle-sm-size: 24px;
|
|
658
|
+
--_kjun-extension-progress-circle-sm-stroke: 4px;
|
|
659
|
+
--_kjun-extension-progress-circle-md-size: 48px;
|
|
660
|
+
--_kjun-extension-progress-circle-md-stroke: 4px;
|
|
661
|
+
--_kjun-extension-progress-circle-lg-size: 64px;
|
|
662
|
+
--_kjun-extension-progress-circle-lg-stroke: 6px;
|
|
657
663
|
--_kjun-extension-icon-toggle-compact-size: 24px;
|
|
658
664
|
--_kjun-extension-icon-toggle-sizes-xs: 24px;
|
|
659
665
|
--_kjun-extension-icon-toggle-sizes-sm: 24px;
|
|
@@ -2228,8 +2234,50 @@
|
|
|
2228
2234
|
font-weight: var(--_kjun-type-caption-weight);
|
|
2229
2235
|
letter-spacing: var(--_kjun-type-caption-tracking);
|
|
2230
2236
|
}
|
|
2237
|
+
/* Circle progress: circle, then label and subLabel centred below it. */
|
|
2238
|
+
.kjun-progress[data-shape="circle"] {
|
|
2239
|
+
display: inline-flex;
|
|
2240
|
+
flex-direction: column;
|
|
2241
|
+
align-items: center;
|
|
2242
|
+
text-align: center;
|
|
2243
|
+
}
|
|
2244
|
+
.kjun-progress-circle {
|
|
2245
|
+
position: relative;
|
|
2246
|
+
display: flex;
|
|
2247
|
+
align-items: center;
|
|
2248
|
+
justify-content: center;
|
|
2249
|
+
flex-shrink: 0;
|
|
2250
|
+
}
|
|
2251
|
+
.kjun-progress-circle > svg { position: absolute; inset: 0; display: block; }
|
|
2252
|
+
.kjun-progress-circle-track { stroke: var(--_kjun-color-secondary); }
|
|
2253
|
+
.kjun-progress-circle-value { transition: stroke-dashoffset var(--_kjun-motion-progress) var(--_kjun-ease-out); }
|
|
2254
|
+
.kjun-progress-circle-percent {
|
|
2255
|
+
position: relative;
|
|
2256
|
+
font-family: var(--_kjun-font-numeric);
|
|
2257
|
+
font-variant-numeric: tabular-nums;
|
|
2258
|
+
color: var(--_kjun-color-text);
|
|
2259
|
+
font-size: var(--_kjun-type-meta-size);
|
|
2260
|
+
line-height: var(--_kjun-type-meta-line);
|
|
2261
|
+
font-weight: var(--_kjun-type-meta-weight);
|
|
2262
|
+
letter-spacing: var(--_kjun-type-meta-tracking);
|
|
2263
|
+
}
|
|
2264
|
+
.kjun-progress[data-size="lg"] .kjun-progress-circle-percent {
|
|
2265
|
+
font-size: var(--_kjun-type-number-md-size);
|
|
2266
|
+
line-height: var(--_kjun-type-number-md-line);
|
|
2267
|
+
font-weight: var(--_kjun-type-number-md-weight);
|
|
2268
|
+
letter-spacing: var(--_kjun-type-number-md-tracking);
|
|
2269
|
+
}
|
|
2270
|
+
.kjun-progress-circle-label {
|
|
2271
|
+
margin-top: var(--_kjun-geometry-dimension-value8);
|
|
2272
|
+
font-size: var(--_kjun-type-caption-size);
|
|
2273
|
+
color: var(--_kjun-color-text-secondary);
|
|
2274
|
+
line-height: var(--_kjun-type-caption-line);
|
|
2275
|
+
font-weight: var(--_kjun-type-caption-weight);
|
|
2276
|
+
letter-spacing: var(--_kjun-type-caption-tracking);
|
|
2277
|
+
}
|
|
2231
2278
|
@media (prefers-reduced-motion: reduce) {
|
|
2232
2279
|
.kjun-progress-track > div,
|
|
2280
|
+
.kjun-progress-circle-value,
|
|
2233
2281
|
.kjun-card {
|
|
2234
2282
|
transition: none;
|
|
2235
2283
|
}
|
|
@@ -4595,6 +4643,13 @@
|
|
|
4595
4643
|
.kjun-card[data-dividers="false"] > .kjun-card-header + .kjun-card-footer { padding-top: 0; }
|
|
4596
4644
|
.kjun-card[data-dividers="true"] > .kjun-card-header:has(+ .kjun-card-body) { border-bottom: var(--_kjun-border-default-width) solid var(--_kjun-card-border); }
|
|
4597
4645
|
.kjun-card[data-dividers="true"] > .kjun-card-footer:not(:first-child) { border-top: var(--_kjun-border-default-width) solid var(--_kjun-card-border); }
|
|
4646
|
+
/* A pressable card is one button: it lifts on hover, presses in on activation and shows the focus ring. */
|
|
4647
|
+
.kjun-card[data-pressable] { box-shadow: var(--_kjun-card-shadow); cursor: pointer; transition: box-shadow var(--_kjun-motion-control) var(--_kjun-ease-out), transform var(--_kjun-motion-control) var(--_kjun-ease-out); }
|
|
4648
|
+
.kjun-card[data-pressable]:hover:not([aria-disabled="true"]) { box-shadow: var(--_kjun-elevation-floating); }
|
|
4649
|
+
.kjun-card[data-pressable]:active:not([aria-disabled="true"]) { transform: scale(0.99); }
|
|
4650
|
+
.kjun-card[data-pressable]:focus-visible { outline: var(--_kjun-state-focus-width) solid var(--_kjun-color-focus-ring); outline-offset: var(--_kjun-state-focus-offset); }
|
|
4651
|
+
.kjun-card[data-pressable][aria-disabled="true"] { cursor: not-allowed; opacity: var(--_kjun-state-opacity-disabled); }
|
|
4652
|
+
@media (prefers-reduced-motion: reduce) { .kjun-card[data-pressable] { transition: none; } .kjun-card[data-pressable]:active { transform: none; } }
|
|
4598
4653
|
|
|
4599
4654
|
.kjun-toast-stack {
|
|
4600
4655
|
position: fixed;
|
|
@@ -4745,7 +4800,7 @@
|
|
|
4745
4800
|
|
|
4746
4801
|
.kjun-list-section,.kjun-top-navigation,.kjun-bottom-navigation,.kjun-bottom-action-bar{min-width:0;max-width:100%;color:var(--_kjun-color-text);background:var(--_kjun-color-surface)}
|
|
4747
4802
|
.kjun-list-heading{display:flex;align-items:center;justify-content:space-between;gap:var(--_kjun-extension-list-gap);padding:var(--_kjun-extension-list-padding)}.kjun-list-heading h3{font-size:var(--_kjun-type-card-title-size);margin:0;line-height:var(--_kjun-type-card-title-line);font-weight:var(--_kjun-type-card-title-weight);letter-spacing:var(--_kjun-type-card-title-tracking)}.kjun-list-heading p{margin:var(--_kjun-geometry-dimension-value4) 0 0;font-size:var(--_kjun-type-caption-size);color:var(--_kjun-color-text-secondary);overflow-wrap:anywhere;line-height:var(--_kjun-type-caption-line);font-weight:var(--_kjun-type-caption-weight);letter-spacing:var(--_kjun-type-caption-tracking)}
|
|
4748
|
-
.kjun-list{list-style:none;padding:0;margin:0}.kjun-list-row{display:flex;align-items:center;gap:var(--_kjun-extension-list-gap);border-bottom:var(--_kjun-border-default-width) solid var(--_kjun-color-divider);min-width:0}.kjun-list-row:last-child{border-bottom:0}.kjun-list[data-divider=false]>.kjun-list-row{border-bottom:0}.kjun-list[data-density=compact] .kjun-list-main{min-height:var(--_kjun-extension-list-compact-minimum-height);padding-block:var(--_kjun-extension-list-compact-padding-y)}.kjun-list-main{display:flex;align-items:center;gap:var(--_kjun-extension-list-gap);flex:1;min-width:0;min-height:var(--_kjun-extension-list-minimum-height);padding:var(--_kjun-extension-list-padding);text-align:start;color:inherit;text-decoration:none;background:transparent;border:0;font:inherit}.kjun-list-main:is(button,a):hover{background:var(--_kjun-color-hover)}.kjun-list-body{flex:1;min-width:0}.kjun-list-title,.kjun-list-description{display:block;overflow-wrap:anywhere;line-height:1.5}.kjun-list-title{font-size:var(--_kjun-type-label-size);line-height:var(--_kjun-type-label-line);font-weight:var(--_kjun-type-label-weight);letter-spacing:var(--_kjun-type-label-tracking)}.kjun-list-description{font-size:var(--_kjun-type-caption-size);color:var(--_kjun-color-text-secondary);line-height:var(--_kjun-type-caption-line);font-weight:var(--_kjun-type-caption-weight);letter-spacing:var(--_kjun-type-caption-tracking)}.kjun-list-leading{flex-shrink:0}.kjun-list-trailing{overflow-wrap:anywhere;max-width:35%}.kjun-list-actions{display:flex;flex-wrap:wrap;gap:var(--_kjun-extension-list-actions-gap);padding-inline-end:var(--_kjun-extension-list-actions-padding);max-width:45%}
|
|
4803
|
+
.kjun-list{list-style:none;padding:0;margin:0}.kjun-list-row{display:flex;align-items:center;gap:var(--_kjun-extension-list-gap);border-bottom:var(--_kjun-border-default-width) solid var(--_kjun-color-divider);min-width:0}.kjun-list-row:last-child{border-bottom:0}.kjun-list[data-divider=false]>.kjun-list-row{border-bottom:0}.kjun-list[data-density=compact] .kjun-list-main{min-height:var(--_kjun-extension-list-compact-minimum-height);padding-block:var(--_kjun-extension-list-compact-padding-y)}.kjun-list-main{display:flex;align-items:center;gap:var(--_kjun-extension-list-gap);flex:1;min-width:0;min-height:var(--_kjun-extension-list-minimum-height);padding:var(--_kjun-extension-list-padding);text-align:start;color:inherit;text-decoration:none;background:transparent;border:0;font:inherit}.kjun-list-main:is(button,a):hover{background:var(--_kjun-color-hover)}.kjun-list-body{flex:1;min-width:0}.kjun-list-content{display:block;margin-top:var(--_kjun-extension-list-description-gap)}.kjun-list-title,.kjun-list-description{display:block;overflow-wrap:anywhere;line-height:1.5}.kjun-list-title{font-size:var(--_kjun-type-label-size);line-height:var(--_kjun-type-label-line);font-weight:var(--_kjun-type-label-weight);letter-spacing:var(--_kjun-type-label-tracking)}.kjun-list-description{font-size:var(--_kjun-type-caption-size);color:var(--_kjun-color-text-secondary);line-height:var(--_kjun-type-caption-line);font-weight:var(--_kjun-type-caption-weight);letter-spacing:var(--_kjun-type-caption-tracking)}.kjun-list-leading{flex-shrink:0}.kjun-list-trailing{overflow-wrap:anywhere;max-width:35%}.kjun-list-actions{display:flex;flex-wrap:wrap;gap:var(--_kjun-extension-list-actions-gap);padding-inline-end:var(--_kjun-extension-list-actions-padding);max-width:45%}
|
|
4749
4804
|
/* A disabled row disables its actions too, so the row never reads as partly available. */
|
|
4750
4805
|
.kjun-list-actions[data-disabled]{opacity:var(--_kjun-state-opacity-disabled)}
|
|
4751
4806
|
.kjun-navigation-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:var(--_kjun-extension-navigation-actions-gap);min-width:0}
|
|
@@ -4754,6 +4809,8 @@
|
|
|
4754
4809
|
.kjun-avatar .kjun-image-fallback{text-transform:uppercase;font-size:var(--_kjun-type-input-size);line-height:var(--_kjun-type-input-line)}
|
|
4755
4810
|
.kjun-avatar[data-size=sm] .kjun-image-fallback{font-size:var(--_kjun-type-control-size);line-height:var(--_kjun-type-control-line)}
|
|
4756
4811
|
.kjun-avatar[data-size=lg] .kjun-image-fallback{font-size:var(--_kjun-type-section-title-size);line-height:var(--_kjun-type-section-title-line)}.kjun-avatar[data-shape=square]{border-radius:var(--_kjun-geometry-radius-radius8)}
|
|
4812
|
+
/* App colors (color/textColor) arrive as private custom properties; without them the image roles stay. */
|
|
4813
|
+
.kjun-avatar .kjun-image{background:var(--_kjun-avatar-color,var(--_kjun-color-secondary))}.kjun-avatar .kjun-image-fallback{color:var(--_kjun-avatar-text-color,var(--_kjun-color-text-secondary))}
|
|
4757
4814
|
.kjun-chip{--_kjun-chip-remove-icon:var(--_kjun-extension-chip-remove-icon-sizes-md);display:inline-flex;max-width:100%;align-items:center;gap:var(--_kjun-extension-chip-gap);min-height:var(--_kjun-extension-chip-md);padding:var(--_kjun-extension-chip-padding-y) var(--_kjun-extension-chip-padding-x);border-radius:var(--_kjun-extension-chip-radius);background:var(--_kjun-color-secondary);font-size:var(--_kjun-extension-chip-typography-md-font-size-px);line-height:var(--_kjun-extension-chip-typography-md-line-height-px);font-weight:var(--_kjun-extension-chip-typography-md-font-weight);letter-spacing:var(--_kjun-extension-chip-typography-md-letter-spacing-em)}
|
|
4758
4815
|
.kjun-chip>span{overflow-wrap:anywhere;min-width:0}
|
|
4759
4816
|
.kjun-chip[data-size=sm]{--_kjun-chip-remove-icon:var(--_kjun-extension-chip-remove-icon-sizes-sm);min-height:var(--_kjun-extension-chip-sm);font-size:var(--_kjun-extension-chip-typography-sm-font-size-px);line-height:var(--_kjun-extension-chip-typography-sm-line-height-px);font-weight:var(--_kjun-extension-chip-typography-sm-font-weight);letter-spacing:var(--_kjun-extension-chip-typography-sm-letter-spacing-em)}
|
|
@@ -4964,6 +5021,15 @@
|
|
|
4964
5021
|
.kjun-fab:focus-visible{outline:var(--_kjun-state-focus-width) solid var(--_kjun-color-focus-ring);outline-offset:var(--_kjun-state-focus-offset)}
|
|
4965
5022
|
.kjun-fab:disabled{opacity:var(--_kjun-state-opacity-disabled);cursor:not-allowed}
|
|
4966
5023
|
|
|
5024
|
+
/* 0.14.0: plain sections, destructive rows, decorative chevrons and non-row list items share the row inset. */
|
|
5025
|
+
.kjun-list-section[data-surface="false"]{background:transparent}
|
|
5026
|
+
.kjun-list-row[data-destructive] .kjun-list-title{color:var(--_kjun-color-danger)}
|
|
5027
|
+
.kjun-list-chevron{flex-shrink:0;color:var(--_kjun-color-text-tertiary)}
|
|
5028
|
+
.kjun-list-item{padding:var(--_kjun-extension-list-padding);border-bottom:var(--_kjun-border-default-width) solid var(--_kjun-color-divider);min-width:0}
|
|
5029
|
+
.kjun-list-item:last-child{border-bottom:0}
|
|
5030
|
+
.kjun-list[data-divider=false]>.kjun-list-item{border-bottom:0}
|
|
5031
|
+
.kjun-list[data-density=compact]>.kjun-list-item{padding-block:var(--_kjun-extension-list-compact-padding-y)}
|
|
5032
|
+
|
|
4967
5033
|
/* Compound fields share input geometry; buttons retain their own size contract. */
|
|
4968
5034
|
.kjun-quantity,.kjun-time-picker {
|
|
4969
5035
|
--_kjun-compound-height: var(--_kjun-geometry-input-md-height);
|
|
@@ -5160,6 +5226,12 @@
|
|
|
5160
5226
|
.kjun-text.kjun-text[data-tone="secondary"] { color: var(--_kjun-color-text-secondary); }
|
|
5161
5227
|
.kjun-text.kjun-text[data-tone="tertiary"] { color: var(--_kjun-color-text-tertiary); }
|
|
5162
5228
|
.kjun-text.kjun-text[data-tone="disabled"] { color: var(--_kjun-color-text-disabled); }
|
|
5229
|
+
.kjun-text.kjun-text[data-tone="brand"] { color: var(--_kjun-color-brand); }
|
|
5230
|
+
.kjun-text.kjun-text[data-tone="danger"] { color: var(--_kjun-color-danger); }
|
|
5231
|
+
.kjun-text.kjun-text[data-tone="success"] { color: var(--_kjun-color-success); }
|
|
5232
|
+
.kjun-text.kjun-text[data-tone="warning"] { color: var(--_kjun-color-warning); }
|
|
5233
|
+
/* inverse is text on the brand surface. */
|
|
5234
|
+
.kjun-text.kjun-text[data-tone="inverse"] { color: var(--_kjun-color-on-brand); }
|
|
5163
5235
|
.kjun-text[data-align="start"] { text-align: start; }
|
|
5164
5236
|
.kjun-text[data-align="center"] { text-align: center; }
|
|
5165
5237
|
.kjun-text[data-align="end"] { text-align: end; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CardElevation, CardPadding, CardRadius, CardSurface } from "@kjun-ui/tokens";
|
|
2
|
-
import type
|
|
2
|
+
import { type HTMLAttributes, type ReactNode } from "react";
|
|
3
3
|
export interface KjunCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
title?: string;
|
|
5
5
|
subtitle?: string;
|
|
@@ -14,5 +14,11 @@ export interface KjunCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
14
14
|
elevation?: CardElevation;
|
|
15
15
|
border?: boolean;
|
|
16
16
|
dividers?: boolean;
|
|
17
|
+
/** Makes the whole card one button (onClick). Do not put buttons or links inside a pressable card. */
|
|
18
|
+
pressable?: boolean;
|
|
19
|
+
/** Blocks a pressable card and dims it. */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** Button name of a pressable card; defaults to the title. */
|
|
22
|
+
ariaLabel?: string;
|
|
17
23
|
}
|
|
18
|
-
export declare function KjunCard({ title, subtitle, header, headerActions, media, footer, padding, bodyPadding, radius, surface, elevation, border, dividers, children, style, className, ...props }: KjunCardProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function KjunCard({ title, subtitle, header, headerActions, media, footer, padding, bodyPadding, radius, surface, elevation, border, dividers, pressable, disabled, ariaLabel, children, style, className, onClick, onKeyDown, ...props }: KjunCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CardElevation, CardPadding, CardRadius, CardSurface } from "@kjun-ui/tokens";
|
|
2
|
-
import type
|
|
2
|
+
import { type HTMLAttributes, type ReactNode } from "react";
|
|
3
3
|
export interface KjunCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
title?: string;
|
|
5
5
|
subtitle?: string;
|
|
@@ -14,5 +14,11 @@ export interface KjunCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
14
14
|
elevation?: CardElevation;
|
|
15
15
|
border?: boolean;
|
|
16
16
|
dividers?: boolean;
|
|
17
|
+
/** Makes the whole card one button (onClick). Do not put buttons or links inside a pressable card. */
|
|
18
|
+
pressable?: boolean;
|
|
19
|
+
/** Blocks a pressable card and dims it. */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** Button name of a pressable card; defaults to the title. */
|
|
22
|
+
ariaLabel?: string;
|
|
17
23
|
}
|
|
18
|
-
export declare function KjunCard({ title, subtitle, header, headerActions, media, footer, padding, bodyPadding, radius, surface, elevation, border, dividers, children, style, className, ...props }: KjunCardProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function KjunCard({ title, subtitle, header, headerActions, media, footer, padding, bodyPadding, radius, surface, elevation, border, dividers, pressable, disabled, ariaLabel, children, style, className, onClick, onKeyDown, ...props }: KjunCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
|
|
2
|
+
/** keepMounted: once opened, the body stays mounted (inert, hidden from assistive technology) while closed. */
|
|
3
|
+
export declare function Collapse({ open, keepMounted, children }: {
|
|
3
4
|
open: boolean;
|
|
5
|
+
keepMounted?: boolean;
|
|
4
6
|
children: ReactNode;
|
|
5
7
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
|
|
2
|
+
/** keepMounted: once opened, the body stays mounted (inert, hidden from assistive technology) while closed. */
|
|
3
|
+
export declare function Collapse({ open, keepMounted, children }: {
|
|
3
4
|
open: boolean;
|
|
5
|
+
keepMounted?: boolean;
|
|
4
6
|
children: ReactNode;
|
|
5
7
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
|
+
import { type FocusReturn } from "./floating-panel.cjs";
|
|
3
4
|
import { OptionValue, SelectOption } from "./select-options.cjs";
|
|
4
5
|
export interface KjunComboboxProps<T extends SelectOption = SelectOption> {
|
|
5
6
|
value: OptionValue | null;
|
|
@@ -19,8 +20,10 @@ export interface KjunComboboxProps<T extends SelectOption = SelectOption> {
|
|
|
19
20
|
onChange?: (v: OptionValue | null) => void;
|
|
20
21
|
onSearch?: (v: string) => void;
|
|
21
22
|
onClear?: () => void;
|
|
23
|
+
/** Where focus goes after choosing an option or Escape. Closing while typing keeps focus in the input. Web only. */
|
|
24
|
+
returnFocus?: FocusReturn;
|
|
22
25
|
}
|
|
23
|
-
export declare function KjunCombobox<T extends SelectOption = SelectOption>({ value, options, placeholder, ariaLabel, labelKey, valueKey, filterFn, size, disabled, error, clearable, emptyText, renderOption, onValueChange, onChange, onSearch, onClear, }: KjunComboboxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function KjunCombobox<T extends SelectOption = SelectOption>({ value, options, placeholder, ariaLabel, labelKey, valueKey, filterFn, size, disabled, error, clearable, emptyText, renderOption, onValueChange, onChange, onSearch, onClear, returnFocus, }: KjunComboboxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
24
27
|
export interface SearchFieldProps<T extends SelectOption> {
|
|
25
28
|
value: string;
|
|
26
29
|
size: InputSize;
|
|
@@ -44,5 +47,6 @@ export interface SearchFieldProps<T extends SelectOption> {
|
|
|
44
47
|
onSelect: (o: T) => void;
|
|
45
48
|
onClear?: () => void;
|
|
46
49
|
onEnter?: () => void;
|
|
50
|
+
returnFocus?: () => HTMLElement | null;
|
|
47
51
|
}
|
|
48
|
-
export declare function SearchField<T extends SelectOption>({ value, size, placeholder, ariaLabel, disabled, error, clearable, open, onOpenChange, options, labelKey, itemKey, emptyText, loading, failed, errorText, renderOption, onValueChange, onSelect, onClear, onEnter, }: SearchFieldProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export declare function SearchField<T extends SelectOption>({ value, size, placeholder, ariaLabel, disabled, error, clearable, open, onOpenChange, options, labelKey, itemKey, emptyText, loading, failed, errorText, renderOption, onValueChange, onSelect, onClear, onEnter, returnFocus, }: SearchFieldProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
|
+
import { type FocusReturn } from "./floating-panel.js";
|
|
3
4
|
import { OptionValue, SelectOption } from "./select-options.js";
|
|
4
5
|
export interface KjunComboboxProps<T extends SelectOption = SelectOption> {
|
|
5
6
|
value: OptionValue | null;
|
|
@@ -19,8 +20,10 @@ export interface KjunComboboxProps<T extends SelectOption = SelectOption> {
|
|
|
19
20
|
onChange?: (v: OptionValue | null) => void;
|
|
20
21
|
onSearch?: (v: string) => void;
|
|
21
22
|
onClear?: () => void;
|
|
23
|
+
/** Where focus goes after choosing an option or Escape. Closing while typing keeps focus in the input. Web only. */
|
|
24
|
+
returnFocus?: FocusReturn;
|
|
22
25
|
}
|
|
23
|
-
export declare function KjunCombobox<T extends SelectOption = SelectOption>({ value, options, placeholder, ariaLabel, labelKey, valueKey, filterFn, size, disabled, error, clearable, emptyText, renderOption, onValueChange, onChange, onSearch, onClear, }: KjunComboboxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function KjunCombobox<T extends SelectOption = SelectOption>({ value, options, placeholder, ariaLabel, labelKey, valueKey, filterFn, size, disabled, error, clearable, emptyText, renderOption, onValueChange, onChange, onSearch, onClear, returnFocus, }: KjunComboboxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
24
27
|
export interface SearchFieldProps<T extends SelectOption> {
|
|
25
28
|
value: string;
|
|
26
29
|
size: InputSize;
|
|
@@ -44,5 +47,6 @@ export interface SearchFieldProps<T extends SelectOption> {
|
|
|
44
47
|
onSelect: (o: T) => void;
|
|
45
48
|
onClear?: () => void;
|
|
46
49
|
onEnter?: () => void;
|
|
50
|
+
returnFocus?: () => HTMLElement | null;
|
|
47
51
|
}
|
|
48
|
-
export declare function SearchField<T extends SelectOption>({ value, size, placeholder, ariaLabel, disabled, error, clearable, open, onOpenChange, options, labelKey, itemKey, emptyText, loading, failed, errorText, renderOption, onValueChange, onSelect, onClear, onEnter, }: SearchFieldProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export declare function SearchField<T extends SelectOption>({ value, size, placeholder, ariaLabel, disabled, error, clearable, open, onOpenChange, options, labelKey, itemKey, emptyText, loading, failed, errorText, renderOption, onValueChange, onSelect, onClear, onEnter, returnFocus, }: SearchFieldProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -44,8 +44,9 @@ export interface KjunProgressProps {
|
|
|
44
44
|
showLabel?: boolean;
|
|
45
45
|
label?: ReactNode;
|
|
46
46
|
subLabel?: ReactNode;
|
|
47
|
+
shape?: "bar" | "circle";
|
|
47
48
|
}
|
|
48
|
-
export declare function KjunProgress({ value, max, size, variant, showLabel, label, subLabel, }: KjunProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export declare function KjunProgress({ value, max, size, variant, showLabel, label, subLabel, shape, }: KjunProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
49
50
|
export interface KjunSkeletonProps {
|
|
50
51
|
type?: "text" | "avatar" | "card" | "table" | "stat" | "block";
|
|
51
52
|
rows?: number;
|
|
@@ -44,8 +44,9 @@ export interface KjunProgressProps {
|
|
|
44
44
|
showLabel?: boolean;
|
|
45
45
|
label?: ReactNode;
|
|
46
46
|
subLabel?: ReactNode;
|
|
47
|
+
shape?: "bar" | "circle";
|
|
47
48
|
}
|
|
48
|
-
export declare function KjunProgress({ value, max, size, variant, showLabel, label, subLabel, }: KjunProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export declare function KjunProgress({ value, max, size, variant, showLabel, label, subLabel, shape, }: KjunProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
49
50
|
export interface KjunSkeletonProps {
|
|
50
51
|
type?: "text" | "avatar" | "card" | "table" | "stat" | "block";
|
|
51
52
|
rows?: number;
|
|
@@ -13,6 +13,8 @@ export interface KjunDrawerProps {
|
|
|
13
13
|
footer?: ReactNode;
|
|
14
14
|
children: ReactNode;
|
|
15
15
|
onClose?: () => void;
|
|
16
|
+
/** Called once after the close finishes and the layer has left the screen (not when it mounts closed or reopens during the exit). */
|
|
17
|
+
onAfterClose?: () => void;
|
|
16
18
|
ariaLabel?: string;
|
|
17
19
|
/** Top safe area in px, padded inside top and side drawers and kept clear above a bottom sheet. */
|
|
18
20
|
safeAreaTop?: number;
|
|
@@ -21,4 +23,4 @@ export interface KjunDrawerProps {
|
|
|
21
23
|
/** Height limit in px for top and bottom drawers; by default they stop a sheet gap short of the opposite edge. */
|
|
22
24
|
maxHeight?: number;
|
|
23
25
|
}
|
|
24
|
-
export declare function KjunDrawer({ open, onOpenChange, title, position, width, closable, closeOnOverlay, closeOnEsc, noPadding, header, footer, children, onClose, ariaLabel, safeAreaTop, safeAreaBottom, maxHeight, }: KjunDrawerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
26
|
+
export declare function KjunDrawer({ open, onOpenChange, title, position, width, closable, closeOnOverlay, closeOnEsc, noPadding, header, footer, children, onClose, onAfterClose, ariaLabel, safeAreaTop, safeAreaBottom, maxHeight, }: KjunDrawerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -13,6 +13,8 @@ export interface KjunDrawerProps {
|
|
|
13
13
|
footer?: ReactNode;
|
|
14
14
|
children: ReactNode;
|
|
15
15
|
onClose?: () => void;
|
|
16
|
+
/** Called once after the close finishes and the layer has left the screen (not when it mounts closed or reopens during the exit). */
|
|
17
|
+
onAfterClose?: () => void;
|
|
16
18
|
ariaLabel?: string;
|
|
17
19
|
/** Top safe area in px, padded inside top and side drawers and kept clear above a bottom sheet. */
|
|
18
20
|
safeAreaTop?: number;
|
|
@@ -21,4 +23,4 @@ export interface KjunDrawerProps {
|
|
|
21
23
|
/** Height limit in px for top and bottom drawers; by default they stop a sheet gap short of the opposite edge. */
|
|
22
24
|
maxHeight?: number;
|
|
23
25
|
}
|
|
24
|
-
export declare function KjunDrawer({ open, onOpenChange, title, position, width, closable, closeOnOverlay, closeOnEsc, noPadding, header, footer, children, onClose, ariaLabel, safeAreaTop, safeAreaBottom, maxHeight, }: KjunDrawerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
26
|
+
export declare function KjunDrawer({ open, onOpenChange, title, position, width, closable, closeOnOverlay, closeOnEsc, noPadding, header, footer, children, onClose, onAfterClose, ariaLabel, safeAreaTop, safeAreaBottom, maxHeight, }: KjunDrawerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type KjunButtonProps } from "./button.cjs";
|
|
3
|
-
import { type Placement } from "./floating-panel.cjs";
|
|
3
|
+
import { type FocusReturn, type Placement } from "./floating-panel.cjs";
|
|
4
4
|
import { type KjunTooltipProps } from "./popover.cjs";
|
|
5
5
|
export interface KjunDropdownProps {
|
|
6
6
|
disabled?: boolean;
|
|
@@ -12,8 +12,10 @@ export interface KjunDropdownProps {
|
|
|
12
12
|
children: ReactNode;
|
|
13
13
|
onOpen?: () => void;
|
|
14
14
|
onClose?: () => void;
|
|
15
|
+
/** Where focus goes when the menu closes by choosing or Escape, instead of the trigger (e.g. an edited cell). Web only. */
|
|
16
|
+
returnFocus?: FocusReturn;
|
|
15
17
|
}
|
|
16
|
-
export declare function KjunDropdown({ disabled, placement, menuId, triggerId, menuClass, trigger, children, onOpen, onClose, }: KjunDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function KjunDropdown({ disabled, placement, menuId, triggerId, menuClass, trigger, children, onOpen, onClose, returnFocus, }: KjunDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
17
19
|
export interface KjunDropdownItemProps {
|
|
18
20
|
id?: string;
|
|
19
21
|
variant?: "default" | "danger";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type KjunButtonProps } from "./button.js";
|
|
3
|
-
import { type Placement } from "./floating-panel.js";
|
|
3
|
+
import { type FocusReturn, type Placement } from "./floating-panel.js";
|
|
4
4
|
import { type KjunTooltipProps } from "./popover.js";
|
|
5
5
|
export interface KjunDropdownProps {
|
|
6
6
|
disabled?: boolean;
|
|
@@ -12,8 +12,10 @@ export interface KjunDropdownProps {
|
|
|
12
12
|
children: ReactNode;
|
|
13
13
|
onOpen?: () => void;
|
|
14
14
|
onClose?: () => void;
|
|
15
|
+
/** Where focus goes when the menu closes by choosing or Escape, instead of the trigger (e.g. an edited cell). Web only. */
|
|
16
|
+
returnFocus?: FocusReturn;
|
|
15
17
|
}
|
|
16
|
-
export declare function KjunDropdown({ disabled, placement, menuId, triggerId, menuClass, trigger, children, onOpen, onClose, }: KjunDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function KjunDropdown({ disabled, placement, menuId, triggerId, menuClass, trigger, children, onOpen, onClose, returnFocus, }: KjunDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
17
19
|
export interface KjunDropdownItemProps {
|
|
18
20
|
id?: string;
|
|
19
21
|
variant?: "default" | "danger";
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { type KjunFeedback } from "@kjun-ui/tokens";
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
3
|
export declare function useKjunFeedback(): KjunFeedback;
|
|
4
|
-
export declare function KjunFeedbackProvider({ children }: {
|
|
5
|
-
children: ReactNode;
|
|
4
|
+
export declare function KjunFeedbackProvider({ children, controller: controllerProp }: {
|
|
5
|
+
children: ReactNode; /** A feedback API from createKjunFeedback(), for calls outside components. */
|
|
6
|
+
controller?: KjunFeedback;
|
|
6
7
|
}): import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export type { ConfirmOptions, KjunFeedback, PromptOptions, ToastOptions } from "@kjun-ui/tokens";
|
|
9
|
+
/** An app-owned feedback API that plain functions can call; pass it to KjunFeedbackProvider controller. */
|
|
10
|
+
export { createKjunFeedback } from "@kjun-ui/tokens";
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { type KjunFeedback } from "@kjun-ui/tokens";
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
3
|
export declare function useKjunFeedback(): KjunFeedback;
|
|
4
|
-
export declare function KjunFeedbackProvider({ children }: {
|
|
5
|
-
children: ReactNode;
|
|
4
|
+
export declare function KjunFeedbackProvider({ children, controller: controllerProp }: {
|
|
5
|
+
children: ReactNode; /** A feedback API from createKjunFeedback(), for calls outside components. */
|
|
6
|
+
controller?: KjunFeedback;
|
|
6
7
|
}): import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export type { ConfirmOptions, KjunFeedback, PromptOptions, ToastOptions } from "@kjun-ui/tokens";
|
|
9
|
+
/** An app-owned feedback API that plain functions can call; pass it to KjunFeedbackProvider controller. */
|
|
10
|
+
export { createKjunFeedback } from "@kjun-ui/tokens";
|
|
@@ -16,3 +16,6 @@ export declare function FloatingPanel({ open, onOpenChange, triggerRef, children
|
|
|
16
16
|
ownsDismiss?: boolean;
|
|
17
17
|
returnFocus?: () => HTMLElement | null | false | undefined;
|
|
18
18
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
19
|
+
/** A focus target given as an element, a ref or a function read when the panel closes. */
|
|
20
|
+
export type FocusReturn = HTMLElement | RefObject<HTMLElement | null> | (() => HTMLElement | null);
|
|
21
|
+
export declare const resolveFocusReturn: (target: FocusReturn | undefined) => (() => HTMLElement | null) | undefined;
|
|
@@ -16,3 +16,6 @@ export declare function FloatingPanel({ open, onOpenChange, triggerRef, children
|
|
|
16
16
|
ownsDismiss?: boolean;
|
|
17
17
|
returnFocus?: () => HTMLElement | null | false | undefined;
|
|
18
18
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
19
|
+
/** A focus target given as an element, a ref or a function read when the panel closes. */
|
|
20
|
+
export type FocusReturn = HTMLElement | RefObject<HTMLElement | null> | (() => HTMLElement | null);
|
|
21
|
+
export declare const resolveFocusReturn: (target: FocusReturn | undefined) => (() => HTMLElement | null) | undefined;
|
|
@@ -21,7 +21,7 @@ export interface KjunTextProps extends RootAttributes {
|
|
|
21
21
|
export declare function KjunText({ variant, tone, as, align, maxLines, className, style, children, ...rest }: KjunTextProps): import("react").DetailedReactHTMLElement<{
|
|
22
22
|
className: string;
|
|
23
23
|
"data-kjun-content": string;
|
|
24
|
-
"data-tone": "secondary" | "tertiary" | "disabled" | undefined;
|
|
24
|
+
"data-tone": "brand" | "secondary" | "inverse" | "danger" | "success" | "warning" | "tertiary" | "disabled" | undefined;
|
|
25
25
|
"data-align": TextAlign | undefined;
|
|
26
26
|
"data-max-lines": number | undefined;
|
|
27
27
|
style: CSSProperties | undefined;
|
|
@@ -21,7 +21,7 @@ export interface KjunTextProps extends RootAttributes {
|
|
|
21
21
|
export declare function KjunText({ variant, tone, as, align, maxLines, className, style, children, ...rest }: KjunTextProps): import("react").DetailedReactHTMLElement<{
|
|
22
22
|
className: string;
|
|
23
23
|
"data-kjun-content": string;
|
|
24
|
-
"data-tone": "secondary" | "tertiary" | "disabled" | undefined;
|
|
24
|
+
"data-tone": "brand" | "secondary" | "inverse" | "danger" | "success" | "warning" | "tertiary" | "disabled" | undefined;
|
|
25
25
|
"data-align": TextAlign | undefined;
|
|
26
26
|
"data-max-lines": number | undefined;
|
|
27
27
|
style: CSSProperties | undefined;
|
|
@@ -7,18 +7,33 @@ export interface KjunListRowProps {
|
|
|
7
7
|
actions?: ReactNode;
|
|
8
8
|
href?: string;
|
|
9
9
|
disabled?: boolean;
|
|
10
|
+
/** Draws the title in the danger role, for rows such as "Delete account". */
|
|
11
|
+
destructive?: boolean;
|
|
12
|
+
/** Ends the row with a decorative chevron that marks it as navigation. */
|
|
13
|
+
chevron?: boolean;
|
|
10
14
|
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
15
|
+
/** Name of a pressable or link row, e.g. with the amount a screen reader should hear. */
|
|
16
|
+
ariaLabel?: string;
|
|
17
|
+
/** Display-only content under the description (a budget bar); no buttons or links inside a pressable row. */
|
|
18
|
+
children?: ReactNode;
|
|
11
19
|
}
|
|
12
|
-
export declare function KjunListRow({ title, description, leading, trailing, actions, href, disabled, onClick }: KjunListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function KjunListRow({ title, description, leading, trailing, actions, href, disabled, destructive, chevron, onClick, ariaLabel, children }: KjunListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
13
21
|
export interface KjunListSectionProps {
|
|
14
22
|
title?: string;
|
|
15
23
|
description?: string;
|
|
16
24
|
actions?: ReactNode;
|
|
17
25
|
children: ReactNode;
|
|
18
26
|
ariaLabel?: string;
|
|
27
|
+
/** Paints the surface background (default true); false lets the page background show through. */
|
|
28
|
+
surface?: boolean;
|
|
19
29
|
/** Draws dividers between rows (default true). */
|
|
20
30
|
divider?: boolean;
|
|
21
31
|
/** "compact" rows keep the 16px inset but are 44 tall (the touch minimum) instead of 56. */
|
|
22
32
|
density?: "default" | "compact";
|
|
23
33
|
}
|
|
24
|
-
export declare function KjunListSection({ title, description, actions, children, ariaLabel, divider, density }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare function KjunListSection({ title, description, actions, children, ariaLabel, surface, divider, density }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export interface KjunListItemProps {
|
|
36
|
+
children: ReactNode;
|
|
37
|
+
}
|
|
38
|
+
/** Non-row content inside a KjunListSection (a theme switcher, a note) on the rows' inset and dividers. */
|
|
39
|
+
export declare function KjunListItem({ children }: KjunListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,18 +7,33 @@ export interface KjunListRowProps {
|
|
|
7
7
|
actions?: ReactNode;
|
|
8
8
|
href?: string;
|
|
9
9
|
disabled?: boolean;
|
|
10
|
+
/** Draws the title in the danger role, for rows such as "Delete account". */
|
|
11
|
+
destructive?: boolean;
|
|
12
|
+
/** Ends the row with a decorative chevron that marks it as navigation. */
|
|
13
|
+
chevron?: boolean;
|
|
10
14
|
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
15
|
+
/** Name of a pressable or link row, e.g. with the amount a screen reader should hear. */
|
|
16
|
+
ariaLabel?: string;
|
|
17
|
+
/** Display-only content under the description (a budget bar); no buttons or links inside a pressable row. */
|
|
18
|
+
children?: ReactNode;
|
|
11
19
|
}
|
|
12
|
-
export declare function KjunListRow({ title, description, leading, trailing, actions, href, disabled, onClick }: KjunListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function KjunListRow({ title, description, leading, trailing, actions, href, disabled, destructive, chevron, onClick, ariaLabel, children }: KjunListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
13
21
|
export interface KjunListSectionProps {
|
|
14
22
|
title?: string;
|
|
15
23
|
description?: string;
|
|
16
24
|
actions?: ReactNode;
|
|
17
25
|
children: ReactNode;
|
|
18
26
|
ariaLabel?: string;
|
|
27
|
+
/** Paints the surface background (default true); false lets the page background show through. */
|
|
28
|
+
surface?: boolean;
|
|
19
29
|
/** Draws dividers between rows (default true). */
|
|
20
30
|
divider?: boolean;
|
|
21
31
|
/** "compact" rows keep the 16px inset but are 44 tall (the touch minimum) instead of 56. */
|
|
22
32
|
density?: "default" | "compact";
|
|
23
33
|
}
|
|
24
|
-
export declare function KjunListSection({ title, description, actions, children, ariaLabel, divider, density }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare function KjunListSection({ title, description, actions, children, ariaLabel, surface, divider, density }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export interface KjunListItemProps {
|
|
36
|
+
children: ReactNode;
|
|
37
|
+
}
|
|
38
|
+
/** Non-row content inside a KjunListSection (a theme switcher, a note) on the rows' inset and dividers. */
|
|
39
|
+
export declare function KjunListItem({ children }: KjunListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
1
|
+
import { type CSSProperties, type ReactNode } from "react";
|
|
2
2
|
export interface KjunImageProps {
|
|
3
3
|
src?: string;
|
|
4
4
|
alt: string;
|
|
@@ -18,8 +18,10 @@ export interface KjunAvatarProps {
|
|
|
18
18
|
decorative?: boolean;
|
|
19
19
|
size?: "sm" | "md" | "lg";
|
|
20
20
|
shape?: "circle" | "square";
|
|
21
|
+
color?: CSSProperties["color"];
|
|
22
|
+
textColor?: CSSProperties["color"];
|
|
21
23
|
fallback?: ReactNode;
|
|
22
24
|
onLoad?: () => void;
|
|
23
25
|
onError?: () => void;
|
|
24
26
|
}
|
|
25
|
-
export declare function KjunAvatar({ src, name, alt, decorative, size, shape, fallback, onLoad, onError }: KjunAvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare function KjunAvatar({ src, name, alt, decorative, size, shape, color, textColor, fallback, onLoad, onError }: KjunAvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
1
|
+
import { type CSSProperties, type ReactNode } from "react";
|
|
2
2
|
export interface KjunImageProps {
|
|
3
3
|
src?: string;
|
|
4
4
|
alt: string;
|
|
@@ -18,8 +18,10 @@ export interface KjunAvatarProps {
|
|
|
18
18
|
decorative?: boolean;
|
|
19
19
|
size?: "sm" | "md" | "lg";
|
|
20
20
|
shape?: "circle" | "square";
|
|
21
|
+
color?: CSSProperties["color"];
|
|
22
|
+
textColor?: CSSProperties["color"];
|
|
21
23
|
fallback?: ReactNode;
|
|
22
24
|
onLoad?: () => void;
|
|
23
25
|
onError?: () => void;
|
|
24
26
|
}
|
|
25
|
-
export declare function KjunAvatar({ src, name, alt, decorative, size, shape, fallback, onLoad, onError }: KjunAvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare function KjunAvatar({ src, name, alt, decorative, size, shape, color, textColor, fallback, onLoad, onError }: KjunAvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,6 +19,8 @@ export interface KjunModalProps {
|
|
|
19
19
|
open: boolean;
|
|
20
20
|
onOpenChange: (open: boolean) => void;
|
|
21
21
|
onClose?: () => void;
|
|
22
|
+
/** Called once after the close finishes and the layer has left the screen (not when it mounts closed or reopens during the exit). */
|
|
23
|
+
onAfterClose?: () => void;
|
|
22
24
|
onCancel?: () => void;
|
|
23
25
|
onConfirm?: () => void;
|
|
24
26
|
title?: string;
|
|
@@ -43,4 +45,4 @@ export interface KjunModalProps {
|
|
|
43
45
|
children: ReactNode;
|
|
44
46
|
ariaLabel?: string;
|
|
45
47
|
}
|
|
46
|
-
export declare function KjunModal({ open, onOpenChange, onClose, onCancel, onConfirm, title, size, closable, closeOnOverlay, closeOnEsc, showHeader, showFooter, showConfirmButton, showCancelButton, confirmText, cancelText, confirmDisabled, loading, noPadding, height, confirmVariant, footerSize, header, footer, children, ariaLabel, }: KjunModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
48
|
+
export declare function KjunModal({ open, onOpenChange, onClose, onAfterClose, onCancel, onConfirm, title, size, closable, closeOnOverlay, closeOnEsc, showHeader, showFooter, showConfirmButton, showCancelButton, confirmText, cancelText, confirmDisabled, loading, noPadding, height, confirmVariant, footerSize, header, footer, children, ariaLabel, }: KjunModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -19,6 +19,8 @@ export interface KjunModalProps {
|
|
|
19
19
|
open: boolean;
|
|
20
20
|
onOpenChange: (open: boolean) => void;
|
|
21
21
|
onClose?: () => void;
|
|
22
|
+
/** Called once after the close finishes and the layer has left the screen (not when it mounts closed or reopens during the exit). */
|
|
23
|
+
onAfterClose?: () => void;
|
|
22
24
|
onCancel?: () => void;
|
|
23
25
|
onConfirm?: () => void;
|
|
24
26
|
title?: string;
|
|
@@ -43,4 +45,4 @@ export interface KjunModalProps {
|
|
|
43
45
|
children: ReactNode;
|
|
44
46
|
ariaLabel?: string;
|
|
45
47
|
}
|
|
46
|
-
export declare function KjunModal({ open, onOpenChange, onClose, onCancel, onConfirm, title, size, closable, closeOnOverlay, closeOnEsc, showHeader, showFooter, showConfirmButton, showCancelButton, confirmText, cancelText, confirmDisabled, loading, noPadding, height, confirmVariant, footerSize, header, footer, children, ariaLabel, }: KjunModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
48
|
+
export declare function KjunModal({ open, onOpenChange, onClose, onAfterClose, onCancel, onConfirm, title, size, closable, closeOnOverlay, closeOnEsc, showHeader, showFooter, showConfirmButton, showCancelButton, confirmText, cancelText, confirmDisabled, loading, noPadding, height, confirmVariant, footerSize, header, footer, children, ariaLabel, }: KjunModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -38,11 +38,17 @@ export declare function KjunAccordion({ multiple, tone, children, }: KjunAccordi
|
|
|
38
38
|
export interface KjunAccordionItemProps {
|
|
39
39
|
title?: string;
|
|
40
40
|
defaultOpen?: boolean;
|
|
41
|
+
/** Controlled open state. A controlled item follows this value only and stays out of the Accordion's single-open rule. */
|
|
42
|
+
open?: boolean;
|
|
43
|
+
/** Requests a change on a controlled item; reports every change on an uncontrolled one (also when a sibling closes it). */
|
|
44
|
+
onOpenChange?: (open: boolean) => void;
|
|
45
|
+
/** Keeps the body mounted after it first opens, so inputs keep their state while closed. */
|
|
46
|
+
keepMounted?: boolean;
|
|
41
47
|
disabled?: boolean;
|
|
42
48
|
header?: ReactNode;
|
|
43
49
|
children: ReactNode;
|
|
44
50
|
}
|
|
45
|
-
export declare function KjunAccordionItem({ title, defaultOpen, disabled, header, children, }: KjunAccordionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export declare function KjunAccordionItem({ title, defaultOpen, disabled, header, open: openProp, onOpenChange, keepMounted, children, }: KjunAccordionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
46
52
|
export interface BreadcrumbItem {
|
|
47
53
|
label: string;
|
|
48
54
|
to?: string;
|
|
@@ -38,11 +38,17 @@ export declare function KjunAccordion({ multiple, tone, children, }: KjunAccordi
|
|
|
38
38
|
export interface KjunAccordionItemProps {
|
|
39
39
|
title?: string;
|
|
40
40
|
defaultOpen?: boolean;
|
|
41
|
+
/** Controlled open state. A controlled item follows this value only and stays out of the Accordion's single-open rule. */
|
|
42
|
+
open?: boolean;
|
|
43
|
+
/** Requests a change on a controlled item; reports every change on an uncontrolled one (also when a sibling closes it). */
|
|
44
|
+
onOpenChange?: (open: boolean) => void;
|
|
45
|
+
/** Keeps the body mounted after it first opens, so inputs keep their state while closed. */
|
|
46
|
+
keepMounted?: boolean;
|
|
41
47
|
disabled?: boolean;
|
|
42
48
|
header?: ReactNode;
|
|
43
49
|
children: ReactNode;
|
|
44
50
|
}
|
|
45
|
-
export declare function KjunAccordionItem({ title, defaultOpen, disabled, header, children, }: KjunAccordionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export declare function KjunAccordionItem({ title, defaultOpen, disabled, header, open: openProp, onOpenChange, keepMounted, children, }: KjunAccordionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
46
52
|
export interface BreadcrumbItem {
|
|
47
53
|
label: string;
|
|
48
54
|
to?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
|
+
import { type FocusReturn } from "./floating-panel.cjs";
|
|
3
4
|
import { OptionValue, SelectOption } from "./select-options.cjs";
|
|
4
5
|
export interface KjunSelectProps<T extends SelectOption = SelectOption> {
|
|
5
6
|
value: OptionValue | OptionValue[] | null;
|
|
@@ -34,5 +35,7 @@ export interface KjunSelectProps<T extends SelectOption = SelectOption> {
|
|
|
34
35
|
/** Extra option fields searched after the label. */
|
|
35
36
|
searchKeys?: string[];
|
|
36
37
|
onClear?: () => void;
|
|
38
|
+
/** Where focus goes when the menu closes by choosing or Escape, instead of the trigger (e.g. an edited cell). Web only. */
|
|
39
|
+
returnFocus?: FocusReturn;
|
|
37
40
|
}
|
|
38
|
-
export declare function KjunSelect<T extends SelectOption = SelectOption>({ value, options, placeholder, ariaLabel, labelKey, id: triggerId, ariaDescribedBy, valueKey, size, disabled, searchable, open: controlled, loading, searchPlaceholder, optionPageSize, clearable, multiple, error, menuHeader, renderOption, renderSelected, onValueChange, onChange, onOpenChange, onSearch, onClear, filterFn, searchKeys, }: KjunSelectProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare function KjunSelect<T extends SelectOption = SelectOption>({ value, options, placeholder, ariaLabel, labelKey, id: triggerId, ariaDescribedBy, valueKey, size, disabled, searchable, open: controlled, loading, searchPlaceholder, optionPageSize, clearable, multiple, error, menuHeader, renderOption, renderSelected, onValueChange, onChange, onOpenChange, onSearch, onClear, filterFn, searchKeys, returnFocus, }: KjunSelectProps<T>): import("react/jsx-runtime").JSX.Element;
|