@kjun-ui/react 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/index.cjs +633 -256
  2. package/dist/index.js +741 -363
  3. package/dist/styles.css +140 -40
  4. package/dist/types/packages/react/src/app-navigation.d.cts +9 -3
  5. package/dist/types/packages/react/src/app-navigation.d.ts +9 -3
  6. package/dist/types/packages/react/src/button.d.cts +2 -1
  7. package/dist/types/packages/react/src/button.d.ts +2 -1
  8. package/dist/types/packages/react/src/display.d.cts +9 -4
  9. package/dist/types/packages/react/src/display.d.ts +9 -4
  10. package/dist/types/packages/react/src/dropdown.d.cts +2 -1
  11. package/dist/types/packages/react/src/dropdown.d.ts +2 -1
  12. package/dist/types/packages/react/src/input.d.cts +14 -1
  13. package/dist/types/packages/react/src/input.d.ts +14 -1
  14. package/dist/types/packages/react/src/list.d.cts +12 -6
  15. package/dist/types/packages/react/src/list.d.ts +12 -6
  16. package/dist/types/packages/react/src/market-model.d.cts +2 -0
  17. package/dist/types/packages/react/src/market-model.d.ts +2 -0
  18. package/dist/types/packages/react/src/number-input.d.cts +1 -1
  19. package/dist/types/packages/react/src/number-input.d.ts +1 -1
  20. package/dist/types/packages/react/src/side-navigation-layout-spaces.d.cts +31 -0
  21. package/dist/types/packages/react/src/side-navigation-layout-spaces.d.ts +31 -0
  22. package/dist/types/packages/react/src/side-navigation-layout.d.cts +17 -1
  23. package/dist/types/packages/react/src/side-navigation-layout.d.ts +17 -1
  24. package/dist/types/packages/react/src/split-pane.d.cts +3 -1
  25. package/dist/types/packages/react/src/split-pane.d.ts +3 -1
  26. package/dist/types/packages/react/src/steps.d.cts +3 -2
  27. package/dist/types/packages/react/src/steps.d.ts +3 -2
  28. package/dist/types/packages/react/src/table-grid.d.cts +1 -1
  29. package/dist/types/packages/react/src/table-grid.d.ts +1 -1
  30. package/dist/types/shared/package-runtime/bottom-navigation.d.cts +5 -0
  31. package/dist/types/shared/package-runtime/bottom-navigation.d.ts +5 -0
  32. package/dist/types/shared/package-runtime/field-group.d.cts +17 -0
  33. package/dist/types/shared/package-runtime/field-group.d.ts +17 -0
  34. package/dist/types/shared/package-runtime/list-row.d.cts +28 -2
  35. package/dist/types/shared/package-runtime/list-row.d.ts +28 -2
  36. package/dist/types/shared/package-runtime/menu-button.d.cts +2 -2
  37. package/dist/types/shared/package-runtime/menu-button.d.ts +2 -2
  38. package/dist/types/shared/package-runtime/messages/ko.d.cts +3 -0
  39. package/dist/types/shared/package-runtime/messages/ko.d.ts +3 -0
  40. package/dist/types/shared/package-runtime/messages-context.d.cts +3 -0
  41. package/dist/types/shared/package-runtime/messages-context.d.ts +3 -0
  42. package/dist/types/shared/package-runtime/node-text.d.cts +1 -0
  43. package/dist/types/shared/package-runtime/node-text.d.ts +1 -0
  44. package/dist/types/shared/package-runtime/number-input.d.cts +10 -0
  45. package/dist/types/shared/package-runtime/number-input.d.ts +10 -0
  46. package/dist/types/shared/package-runtime/progress-tone.d.cts +6 -0
  47. package/dist/types/shared/package-runtime/progress-tone.d.ts +6 -0
  48. package/dist/types/shared/package-runtime/side-navigation-layout.d.cts +24 -0
  49. package/dist/types/shared/package-runtime/side-navigation-layout.d.ts +24 -0
  50. package/dist/types/shared/package-runtime/steps.d.cts +18 -4
  51. package/dist/types/shared/package-runtime/steps.d.ts +18 -4
  52. package/dist/types/shared/package-runtime/table-presentation.d.cts +1 -0
  53. package/dist/types/shared/package-runtime/table-presentation.d.ts +1 -0
  54. package/dist/types/shared/package-runtime/table.d.cts +2 -0
  55. package/dist/types/shared/package-runtime/table.d.ts +2 -0
  56. package/package.json +3 -3
@@ -133,27 +133,53 @@ export type ListGroupVariant = "inset" | "flush" | "open";
133
133
  /** "details": rows that are read, not pressed, such as "Payment method / Visa": 32 tall, no dividers by default, the
134
134
  * label in the secondary body type and the value in the text color, given the room the label leaves. */
135
135
  export type ListSectionVariant = "default" | "open" | "details";
136
+ /** A section's fill: true paints the surface, false none, "muted" the muted (secondary) fill that sets rows apart inside a white card or modal. */
137
+ export type ListSectionSurface = boolean | "muted";
138
+ /**
139
+ * How a section's fill draws, the same on every platform: whether it paints at all, whether it is the muted fill, and the
140
+ * web data-surface value (none for the plain surface, "false" for no fill, "muted"). On the muted fill a badge takes the
141
+ * plain surface like inside a tinted card, dividers take the border role and an open row's icon square the surface, so
142
+ * none of them dissolves into the fill.
143
+ */
144
+ export declare function listSectionSurface(surface?: ListSectionSurface): {
145
+ painted: boolean;
146
+ muted: boolean;
147
+ attribute: "false" | "muted" | undefined;
148
+ };
136
149
  /** Where a row's trailing value sits: beside the text, on the title line, or on its own line under the title. */
137
150
  export type ListTrailingPosition = "side" | "title" | "below";
138
151
  /**
139
152
  * How a section draws, the same on every platform: whether it is open (rows on the page with no card or dividers; the
140
153
  * section's variant, or the KjunListGroup's) or details (read-only rows; only its own variant), its card corner (the group's when unset; none when open), whether its title
141
154
  * is the small label (a title without a description, unless titleVariant says otherwise) and whether its rows form a card
142
- * with the heading and footer outside it.
155
+ * with the heading and footer outside it. A bleeding section (not an open one, whose rows keep their own inset) is flat: it
156
+ * runs to its container's edge, so it has no corner and keeps its heading and footer with the rows.
143
157
  */
144
- export declare function listSectionShape<R extends ListSectionCorner>({ radius, group, variant, title, description, titleVariant }: {
158
+ export declare function listSectionShape<R extends ListSectionCorner>({ radius, group, variant, title, description, titleVariant, bleed: wantsBleed }: {
145
159
  radius?: R;
146
160
  group?: ListGroupVariant | null;
147
161
  variant?: ListSectionVariant;
148
162
  title?: string;
149
163
  description?: string;
150
164
  titleVariant?: "title" | "label";
165
+ bleed?: boolean;
151
166
  }): {
152
167
  open: boolean;
153
168
  details: boolean;
154
169
  corner: "none" | "lg" | R;
155
170
  bare: boolean;
156
171
  outside: boolean;
172
+ bleed: boolean;
173
+ };
174
+ /**
175
+ * How far a bleeding section reaches past its container and the inset its rows, heading and footer take: the container's
176
+ * own inset (a KjunCard body's padding) when it gives one, otherwise the rows' standard inset, so text keeps to the
177
+ * content line around the section while fills and dividers run to the container's edge. Native reads it; the web
178
+ * stylesheet does the same with the card's --_kjun-card-body-padding.
179
+ */
180
+ export declare function listSectionInset(bleed: boolean, containerInset: number | null | undefined, rowInset: number): {
181
+ inset: number;
182
+ margin: number;
157
183
  };
158
184
  /**
159
185
  * Web heading actions: records the tallest action's height on the heading, so any control (not only a KjunButton, which
@@ -1,4 +1,4 @@
1
1
  /** The icon before the label: the app's icon, or dots-vertical when only an icon shows. */
2
- export declare function menuButtonIcon(icon: string | undefined, compact: boolean, label: string | undefined): string | undefined;
2
+ export declare function menuButtonIcon(icon: string | undefined, compact: boolean, label: unknown): string | undefined;
3
3
  /** The chevron after a visible label; it turns up while the menu is open. */
4
- export declare function menuButtonChevron(chevron: boolean, compact: boolean, label: string | undefined, open: boolean): "chevron-up" | "chevron-down" | undefined;
4
+ export declare function menuButtonChevron(chevron: boolean, compact: boolean, label: unknown, open: boolean): "chevron-up" | "chevron-down" | undefined;
@@ -1,4 +1,4 @@
1
1
  /** The icon before the label: the app's icon, or dots-vertical when only an icon shows. */
2
- export declare function menuButtonIcon(icon: string | undefined, compact: boolean, label: string | undefined): string | undefined;
2
+ export declare function menuButtonIcon(icon: string | undefined, compact: boolean, label: unknown): string | undefined;
3
3
  /** The chevron after a visible label; it turns up while the menu is open. */
4
- export declare function menuButtonChevron(chevron: boolean, compact: boolean, label: string | undefined, open: boolean): "chevron-up" | "chevron-down" | undefined;
4
+ export declare function menuButtonChevron(chevron: boolean, compact: boolean, label: unknown, open: boolean): "chevron-up" | "chevron-down" | undefined;
@@ -133,6 +133,9 @@ export declare const kjunMessagesKo: {
133
133
  mainNavigation: string;
134
134
  collapseNavigation: string;
135
135
  expandNavigation: string;
136
+ spacesPanel: string;
137
+ collapseSpacesPanel: string;
138
+ expandSpacesPanel: string;
136
139
  showMoreItems: (count: number) => string;
137
140
  showFewerItems: string;
138
141
  showMoreText: string;
@@ -133,6 +133,9 @@ export declare const kjunMessagesKo: {
133
133
  mainNavigation: string;
134
134
  collapseNavigation: string;
135
135
  expandNavigation: string;
136
+ spacesPanel: string;
137
+ collapseSpacesPanel: string;
138
+ expandSpacesPanel: string;
136
139
  showMoreItems: (count: number) => string;
137
140
  showFewerItems: string;
138
141
  showMoreText: string;
@@ -138,6 +138,9 @@ export declare const useKjunMessages: () => {
138
138
  mainNavigation: string;
139
139
  collapseNavigation: string;
140
140
  expandNavigation: string;
141
+ spacesPanel: string;
142
+ collapseSpacesPanel: string;
143
+ expandSpacesPanel: string;
141
144
  showMoreItems: (count: number) => string;
142
145
  showFewerItems: string;
143
146
  showMoreText: string;
@@ -138,6 +138,9 @@ export declare const useKjunMessages: () => {
138
138
  mainNavigation: string;
139
139
  collapseNavigation: string;
140
140
  expandNavigation: string;
141
+ spacesPanel: string;
142
+ collapseSpacesPanel: string;
143
+ expandSpacesPanel: string;
141
144
  showMoreItems: (count: number) => string;
142
145
  showFewerItems: string;
143
146
  showMoreText: string;
@@ -0,0 +1 @@
1
+ export declare function nodeText(node: unknown): string | undefined;
@@ -0,0 +1 @@
1
+ export declare function nodeText(node: unknown): string | undefined;
@@ -8,6 +8,8 @@ export interface NumberInputOptions {
8
8
  min?: number;
9
9
  max?: number;
10
10
  suffix?: unknown;
11
+ /** Unit the committed value lands on, counted from `min` (or 0); ArrowUp/ArrowDown move by it. */
12
+ step?: number;
11
13
  }
12
14
  export interface ResolvedNumberInput {
13
15
  format: NumberInputFormat;
@@ -18,9 +20,17 @@ export interface ResolvedNumberInput {
18
20
  max?: number;
19
21
  suffix?: string;
20
22
  maxIntegerDigits: number;
23
+ /** A positive step rounded to `decimals`; undefined when not given or when it rounds to 0. */
24
+ step?: number;
21
25
  }
22
26
  /** Preset plus the caller's overrides; decimals are cut to a whole 0-6 so the scaled value stays a safe integer. */
23
27
  export declare function resolveNumberInput(options: NumberInputOptions): ResolvedNumberInput;
28
+ /** A committed value moved to the nearest multiple of step from `min` (or 0); one that cannot be negative goes up a step instead.
29
+ * The range is not enforced: a value past min/max stays past it and shows the range message. No step, or "", returns `raw`. */
30
+ export declare function snapNumber(raw: string, o: ResolvedNumberInput): string;
31
+ /** ArrowUp (1) / ArrowDown (-1): the next multiple of step from `min` (or 0) in that direction, kept within min/max (and 0 when the
32
+ * value cannot be negative). An empty field starts at `min`, or 0 kept within range. Null when there is no step. */
33
+ export declare function stepNumber(raw: string, direction: 1 | -1, o: ResolvedNumberInput): string | null;
24
34
  export interface SanitizeOptions {
25
35
  /** Pasted or dropped text: with no decimals allowed, the fraction is dropped at the first "." ("1,234,000.00" → "1234000") instead of the dots being ignored. */
26
36
  pasted?: boolean;
@@ -8,6 +8,8 @@ export interface NumberInputOptions {
8
8
  min?: number;
9
9
  max?: number;
10
10
  suffix?: unknown;
11
+ /** Unit the committed value lands on, counted from `min` (or 0); ArrowUp/ArrowDown move by it. */
12
+ step?: number;
11
13
  }
12
14
  export interface ResolvedNumberInput {
13
15
  format: NumberInputFormat;
@@ -18,9 +20,17 @@ export interface ResolvedNumberInput {
18
20
  max?: number;
19
21
  suffix?: string;
20
22
  maxIntegerDigits: number;
23
+ /** A positive step rounded to `decimals`; undefined when not given or when it rounds to 0. */
24
+ step?: number;
21
25
  }
22
26
  /** Preset plus the caller's overrides; decimals are cut to a whole 0-6 so the scaled value stays a safe integer. */
23
27
  export declare function resolveNumberInput(options: NumberInputOptions): ResolvedNumberInput;
28
+ /** A committed value moved to the nearest multiple of step from `min` (or 0); one that cannot be negative goes up a step instead.
29
+ * The range is not enforced: a value past min/max stays past it and shows the range message. No step, or "", returns `raw`. */
30
+ export declare function snapNumber(raw: string, o: ResolvedNumberInput): string;
31
+ /** ArrowUp (1) / ArrowDown (-1): the next multiple of step from `min` (or 0) in that direction, kept within min/max (and 0 when the
32
+ * value cannot be negative). An empty field starts at `min`, or 0 kept within range. Null when there is no step. */
33
+ export declare function stepNumber(raw: string, direction: 1 | -1, o: ResolvedNumberInput): string | null;
24
34
  export interface SanitizeOptions {
25
35
  /** Pasted or dropped text: with no decimals allowed, the fraction is dropped at the first "." ("1,234,000.00" → "1234000") instead of the dots being ignored. */
26
36
  pasted?: boolean;
@@ -0,0 +1,6 @@
1
+ /** Progress fill colours: primary takes the brand role, neutral the tertiary text role, other tones their own role. */
2
+ export type ProgressTone = "primary" | "success" | "warning" | "danger" | "info" | "neutral";
3
+ /** The KjunColors key a Native fill reads. */
4
+ export declare function progressColorKey(variant: ProgressTone): "brand" | "textTertiary" | "danger" | "success" | "warning" | "info";
5
+ /** The web role name, read as var(--_kjun-color-<role>). */
6
+ export declare function progressColorRole(variant: ProgressTone): "brand" | "textTertiary" | "danger" | "success" | "warning" | "info" | "text-tertiary";
@@ -0,0 +1,6 @@
1
+ /** Progress fill colours: primary takes the brand role, neutral the tertiary text role, other tones their own role. */
2
+ export type ProgressTone = "primary" | "success" | "warning" | "danger" | "info" | "neutral";
3
+ /** The KjunColors key a Native fill reads. */
4
+ export declare function progressColorKey(variant: ProgressTone): "brand" | "textTertiary" | "danger" | "success" | "warning" | "info";
5
+ /** The web role name, read as var(--_kjun-color-<role>). */
6
+ export declare function progressColorRole(variant: ProgressTone): "brand" | "textTertiary" | "danger" | "success" | "warning" | "info" | "text-tertiary";
@@ -0,0 +1,24 @@
1
+ /** The menu panel beside a spaces rail: a card set into the rail's band, or flat against it with a line before the page. */
2
+ export type SideNavigationPanelSurface = "card" | "flat";
3
+ type SpacesGeometry = {
4
+ paddingX: number;
5
+ iconSize: number;
6
+ spacesRailPaddingX: number;
7
+ spacesPanelWidth: number;
8
+ spacesPanelInset: number;
9
+ };
10
+ /** The rail's cell: an icons-only menu row (padding, icon, padding) with the rail's padding on each side. */
11
+ export declare function spacesRailCellWidth(geometry: Pick<SpacesGeometry, "paddingX" | "iconSize" | "spacesRailPaddingX">): number;
12
+ /** The column's width: the rail's cell, plus the panel (and a card's end inset) while the panel is open. */
13
+ export declare function spacesColumnWidth(geometry: SpacesGeometry, surface: SideNavigationPanelSurface, panelCollapsed: boolean): number;
14
+ /** Where focus goes after the panel opens or closes: to the rail's expand button when the panel closes around the focus
15
+ * or by its own button, to the panel's collapse button when a button opened it, otherwise it stays (null). */
16
+ export declare function spacesFocusAfterChange(nextCollapsed: boolean, focusInPanel: boolean, byButton: boolean): "expand" | "collapse" | null;
17
+ /** The layout props a spaces rail replaces (the rail is the collapsed column, and the panel has one width), named only
18
+ * when the app set them, for a development warning. */
19
+ export declare function spacesIgnoredProps(props: {
20
+ collapsed?: boolean;
21
+ railLabels?: boolean;
22
+ width?: string;
23
+ }): string[];
24
+ export {};
@@ -0,0 +1,24 @@
1
+ /** The menu panel beside a spaces rail: a card set into the rail's band, or flat against it with a line before the page. */
2
+ export type SideNavigationPanelSurface = "card" | "flat";
3
+ type SpacesGeometry = {
4
+ paddingX: number;
5
+ iconSize: number;
6
+ spacesRailPaddingX: number;
7
+ spacesPanelWidth: number;
8
+ spacesPanelInset: number;
9
+ };
10
+ /** The rail's cell: an icons-only menu row (padding, icon, padding) with the rail's padding on each side. */
11
+ export declare function spacesRailCellWidth(geometry: Pick<SpacesGeometry, "paddingX" | "iconSize" | "spacesRailPaddingX">): number;
12
+ /** The column's width: the rail's cell, plus the panel (and a card's end inset) while the panel is open. */
13
+ export declare function spacesColumnWidth(geometry: SpacesGeometry, surface: SideNavigationPanelSurface, panelCollapsed: boolean): number;
14
+ /** Where focus goes after the panel opens or closes: to the rail's expand button when the panel closes around the focus
15
+ * or by its own button, to the panel's collapse button when a button opened it, otherwise it stays (null). */
16
+ export declare function spacesFocusAfterChange(nextCollapsed: boolean, focusInPanel: boolean, byButton: boolean): "expand" | "collapse" | null;
17
+ /** The layout props a spaces rail replaces (the rail is the collapsed column, and the panel has one width), named only
18
+ * when the app set them, for a development warning. */
19
+ export declare function spacesIgnoredProps(props: {
20
+ collapsed?: boolean;
21
+ railLabels?: boolean;
22
+ width?: string;
23
+ }): string[];
24
+ export {};
@@ -9,6 +9,11 @@ export interface KjunStepItem {
9
9
  label: string;
10
10
  description?: string;
11
11
  meta?: string;
12
+ /** This step's own status, over the one `current` gives it: a flow whose steps finish out of order, such as a later step
13
+ * approved while an earlier one is reopened. */
14
+ status?: KjunStepStatus;
15
+ /** The step is not a button even when onStepSelect would make it one (work in progress locks every step). */
16
+ disabled?: boolean;
12
17
  }
13
18
  /** Narrowest column a step gets in the wide layout; mirrors `extensions.steps.minColumn`. */
14
19
  export declare const STEPS_MIN_COLUMN = 80;
@@ -16,11 +21,20 @@ export declare const STEPS_MIN_COLUMN = 80;
16
21
  export declare const STEPS_AUTO_MAX = 10;
17
22
  /** `current` counts finished steps: floored and kept within 0..count (count means all complete). */
18
23
  export declare function clampCurrent(current: number, count: number): number;
19
- export declare function stepStatus(index: number, current: number, currentStatus: KjunStepsCurrentStatus): KjunStepStatus;
20
- export declare function stepsRootStatus(current: number, count: number, currentStatus: KjunStepsCurrentStatus): "current" | "error" | "complete";
24
+ /** Where the flow stands. A given `current` wins (clamped); without it, the first step marked current or error, then the
25
+ * first step not marked complete, and items.length once every step is. */
26
+ export declare function stepsCurrent(items: readonly KjunStepItem[], current?: number): number;
27
+ /** A step's own status wins; otherwise steps before `current` are complete, the one at it current (or error), the rest upcoming. */
28
+ export declare function stepStatus(index: number, current: number, currentStatus: KjunStepsCurrentStatus, item?: KjunStepItem): KjunStepStatus;
29
+ export declare function stepsStatuses(items: readonly KjunStepItem[], current: number, currentStatus: KjunStepsCurrentStatus): KjunStepStatus[];
30
+ /** The whole flow: complete once every step is, error while any step failed, otherwise current. */
31
+ export declare function stepsRootStatus(statuses: readonly KjunStepStatus[]): "current" | "error" | "complete";
32
+ /** The connector between two neighbouring steps takes the reached colour only when both ends are reached, so a line never
33
+ * runs coloured into or out of a step that is still upcoming. */
34
+ export declare function stepLineReached(from: KjunStepStatus | undefined, to: KjunStepStatus | undefined): boolean;
21
35
  export declare function stepsLayout(width: number, count: number): "full" | "compact";
22
- /** A step is a button when someone listens and it is not the step the user is on. */
23
- export declare function stepSelectable(status: KjunStepStatus, selectable?: KjunStepsSelectable): boolean;
36
+ /** A step is a button when someone listens, it is not the step the user is on, and it is not disabled. */
37
+ export declare function stepSelectable(status: KjunStepStatus, selectable?: KjunStepsSelectable, disabled?: boolean): boolean;
24
38
  type StepMessages = Pick<KjunMessages, "stepComplete" | "stepCurrent" | "stepError" | "stepUpcoming" | "stepPosition" | "stepCount">;
25
39
  /** Vertical rows show meta and description under the label; the horizontal row shows the label alone. */
26
40
  export declare function stepDetail(item: KjunStepItem, vertical: boolean): string;
@@ -9,6 +9,11 @@ export interface KjunStepItem {
9
9
  label: string;
10
10
  description?: string;
11
11
  meta?: string;
12
+ /** This step's own status, over the one `current` gives it: a flow whose steps finish out of order, such as a later step
13
+ * approved while an earlier one is reopened. */
14
+ status?: KjunStepStatus;
15
+ /** The step is not a button even when onStepSelect would make it one (work in progress locks every step). */
16
+ disabled?: boolean;
12
17
  }
13
18
  /** Narrowest column a step gets in the wide layout; mirrors `extensions.steps.minColumn`. */
14
19
  export declare const STEPS_MIN_COLUMN = 80;
@@ -16,11 +21,20 @@ export declare const STEPS_MIN_COLUMN = 80;
16
21
  export declare const STEPS_AUTO_MAX = 10;
17
22
  /** `current` counts finished steps: floored and kept within 0..count (count means all complete). */
18
23
  export declare function clampCurrent(current: number, count: number): number;
19
- export declare function stepStatus(index: number, current: number, currentStatus: KjunStepsCurrentStatus): KjunStepStatus;
20
- export declare function stepsRootStatus(current: number, count: number, currentStatus: KjunStepsCurrentStatus): "current" | "error" | "complete";
24
+ /** Where the flow stands. A given `current` wins (clamped); without it, the first step marked current or error, then the
25
+ * first step not marked complete, and items.length once every step is. */
26
+ export declare function stepsCurrent(items: readonly KjunStepItem[], current?: number): number;
27
+ /** A step's own status wins; otherwise steps before `current` are complete, the one at it current (or error), the rest upcoming. */
28
+ export declare function stepStatus(index: number, current: number, currentStatus: KjunStepsCurrentStatus, item?: KjunStepItem): KjunStepStatus;
29
+ export declare function stepsStatuses(items: readonly KjunStepItem[], current: number, currentStatus: KjunStepsCurrentStatus): KjunStepStatus[];
30
+ /** The whole flow: complete once every step is, error while any step failed, otherwise current. */
31
+ export declare function stepsRootStatus(statuses: readonly KjunStepStatus[]): "current" | "error" | "complete";
32
+ /** The connector between two neighbouring steps takes the reached colour only when both ends are reached, so a line never
33
+ * runs coloured into or out of a step that is still upcoming. */
34
+ export declare function stepLineReached(from: KjunStepStatus | undefined, to: KjunStepStatus | undefined): boolean;
21
35
  export declare function stepsLayout(width: number, count: number): "full" | "compact";
22
- /** A step is a button when someone listens and it is not the step the user is on. */
23
- export declare function stepSelectable(status: KjunStepStatus, selectable?: KjunStepsSelectable): boolean;
36
+ /** A step is a button when someone listens, it is not the step the user is on, and it is not disabled. */
37
+ export declare function stepSelectable(status: KjunStepStatus, selectable?: KjunStepsSelectable, disabled?: boolean): boolean;
24
38
  type StepMessages = Pick<KjunMessages, "stepComplete" | "stepCurrent" | "stepError" | "stepUpcoming" | "stepPosition" | "stepCount">;
25
39
  /** Vertical rows show meta and description under the label; the horizontal row shows the label alone. */
26
40
  export declare function stepDetail(item: KjunStepItem, vertical: boolean): string;
@@ -131,6 +131,7 @@ export interface TableGridProps<Row extends object, Height> extends TableRowsPro
131
131
  striped: boolean;
132
132
  hoverable: boolean;
133
133
  edgeInset?: "default" | "none";
134
+ layout?: "auto" | "fixed";
134
135
  }
135
136
  export interface TableToolbarProps<Row extends object> {
136
137
  selectable: boolean;
@@ -131,6 +131,7 @@ export interface TableGridProps<Row extends object, Height> extends TableRowsPro
131
131
  striped: boolean;
132
132
  hoverable: boolean;
133
133
  edgeInset?: "default" | "none";
134
+ layout?: "auto" | "fixed";
134
135
  }
135
136
  export interface TableToolbarProps<Row extends object> {
136
137
  selectable: boolean;
@@ -97,6 +97,8 @@ export interface TableProps<Row extends object = Record<string, unknown>, MaxHei
97
97
  striped?: boolean;
98
98
  /** "none" drops the first column's start padding and the last column's end padding in the grid, so the table lines up with text around it. For tables without row fills. */
99
99
  edgeInset?: "default" | "none";
100
+ /** fixed keeps every column at its given width (table-layout: fixed) instead of letting content widen it, so two tables with the same widths line up; columns without a width share what is left. Native already keeps given widths. */
101
+ layout?: "auto" | "fixed";
100
102
  ariaLabel?: string;
101
103
  responsive?: "card" | "list" | "compact" | "none" | null;
102
104
  mobileColumns?: string[];
@@ -97,6 +97,8 @@ export interface TableProps<Row extends object = Record<string, unknown>, MaxHei
97
97
  striped?: boolean;
98
98
  /** "none" drops the first column's start padding and the last column's end padding in the grid, so the table lines up with text around it. For tables without row fills. */
99
99
  edgeInset?: "default" | "none";
100
+ /** fixed keeps every column at its given width (table-layout: fixed) instead of letting content widen it, so two tables with the same widths line up; columns without a width share what is left. Native already keeps given widths. */
101
+ layout?: "auto" | "fixed";
100
102
  ariaLabel?: string;
101
103
  responsive?: "card" | "list" | "compact" | "none" | null;
102
104
  mobileColumns?: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kjun-ui/react",
3
- "version": "0.22.0",
3
+ "version": "0.23.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://ui.kjun.dev",
6
6
  "repository": {
@@ -41,9 +41,9 @@
41
41
  "./package.json": "./package.json"
42
42
  },
43
43
  "dependencies": {
44
- "@kjun-ui/tokens": "0.22.0",
44
+ "@kjun-ui/tokens": "0.23.0",
45
45
  "react-aria-components": "1.21.1",
46
- "@kjun-ui/icons": "0.22.0"
46
+ "@kjun-ui/icons": "0.23.0"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "react": "^19.2.3",