@kb.ui/react 0.11.0 → 0.12.1

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 (81) hide show
  1. package/README.md +79 -66
  2. package/dist/components/ConfirmAction/ConfirmAction.d.ts +42 -0
  3. package/dist/components/Dashboard/Dashboard.d.ts +17 -0
  4. package/dist/components/Form/Form.d.ts +19 -0
  5. package/dist/components/FormSection/FormSection.d.ts +26 -0
  6. package/dist/components/Gallery/Gallery.d.ts +26 -0
  7. package/dist/components/PageHeader/PageHeader.d.ts +27 -0
  8. package/dist/components/Panel/Panel.d.ts +3 -1
  9. package/dist/components/Settings/Settings.d.ts +11 -0
  10. package/dist/components/Skeleton/Skeleton.d.ts +8 -6
  11. package/dist/components/Stack/Stack.d.ts +15 -0
  12. package/dist/components/StatsRow/StatsRow.d.ts +33 -0
  13. package/dist/components/SupportingPane/SupportingPane.d.ts +15 -0
  14. package/dist/index.d.ts +10 -0
  15. package/dist/index.js +718 -333
  16. package/dist/index.js.map +1 -1
  17. package/dist/styles.css +1 -1
  18. package/docs/components/Accordion.md +9 -9
  19. package/docs/components/Avatar.md +4 -4
  20. package/docs/components/Badge.md +4 -4
  21. package/docs/components/Button.md +8 -8
  22. package/docs/components/Callout.md +3 -3
  23. package/docs/components/Card.md +4 -4
  24. package/docs/components/Checkbox.md +5 -5
  25. package/docs/components/Code.md +2 -2
  26. package/docs/components/CodeBlock.md +7 -7
  27. package/docs/components/Collection.md +5 -5
  28. package/docs/components/CollectionList.md +6 -6
  29. package/docs/components/CollectionRow.md +11 -11
  30. package/docs/components/Combobox.md +3 -3
  31. package/docs/components/ConfirmAction.md +100 -0
  32. package/docs/components/Container.md +2 -2
  33. package/docs/components/CopyableText.md +9 -9
  34. package/docs/components/Dashboard.md +81 -0
  35. package/docs/components/DescriptionList.md +3 -3
  36. package/docs/components/Dialog.md +7 -7
  37. package/docs/components/Disclosure.md +4 -4
  38. package/docs/components/EmptyState.md +1 -1
  39. package/docs/components/ErrorSummary.md +5 -3
  40. package/docs/components/Fieldset.md +6 -6
  41. package/docs/components/FileInput.md +5 -5
  42. package/docs/components/Form.md +67 -0
  43. package/docs/components/FormActions.md +3 -3
  44. package/docs/components/FormSection.md +57 -0
  45. package/docs/components/Gallery.md +84 -0
  46. package/docs/components/Grid.md +13 -13
  47. package/docs/components/Heading.md +3 -3
  48. package/docs/components/Image.md +3 -3
  49. package/docs/components/Inline.md +3 -3
  50. package/docs/components/Input.md +3 -3
  51. package/docs/components/Link.md +2 -2
  52. package/docs/components/Menu.md +5 -5
  53. package/docs/components/MultiSelect.md +2 -2
  54. package/docs/components/NumberField.md +5 -5
  55. package/docs/components/PageHeader.md +68 -0
  56. package/docs/components/Panel.md +11 -3
  57. package/docs/components/Popover.md +9 -9
  58. package/docs/components/Progress.md +1 -1
  59. package/docs/components/RadioGroup.md +3 -3
  60. package/docs/components/ScrollArea.md +1 -1
  61. package/docs/components/Select.md +2 -2
  62. package/docs/components/Separator.md +3 -3
  63. package/docs/components/Settings.md +57 -0
  64. package/docs/components/Skeleton.md +56 -16
  65. package/docs/components/Spinner.md +9 -4
  66. package/docs/components/Split.md +4 -4
  67. package/docs/components/Stack.md +54 -0
  68. package/docs/components/Stat.md +1 -1
  69. package/docs/components/StatsRow.md +80 -0
  70. package/docs/components/Status.md +7 -6
  71. package/docs/components/SupportingPane.md +59 -0
  72. package/docs/components/Switch.md +5 -5
  73. package/docs/components/Table.md +12 -12
  74. package/docs/components/Tabs.md +10 -10
  75. package/docs/components/Text.md +2 -2
  76. package/docs/components/Textarea.md +4 -4
  77. package/docs/components/Thumbnail.md +7 -7
  78. package/docs/components/Toast.md +9 -9
  79. package/docs/components/Toolbar.md +4 -4
  80. package/docs/components/Tooltip.md +3 -3
  81. package/package.json +1 -1
package/README.md CHANGED
@@ -27,6 +27,9 @@ The React adapter provides the components, styles and CSS variables together. In
27
27
 
28
28
  ## Start here
29
29
 
30
+ - [Components and recipes](https://github.com/KhallilB/kbui/blob/main/docs/guides/components-and-recipes.md): importing package APIs and copying application-owned source.
31
+ - [Browse recipes](https://kbui.kcb.pro/recipes/): live compositions and complete source files.
32
+
30
33
  - [Install and configure kbui](https://github.com/KhallilB/kbui/blob/main/docs/guides/using-kbui.md): package setup, themes, and troubleshooting.
31
34
  - [Browse live components](https://kbui.kcb.pro/components/): interactive states, code, and API tables.
32
35
  - [Accessibility implementation and verification](https://github.com/KhallilB/kbui/blob/main/docs/guides/accessibility.md): requirements, caller responsibilities, manual checks, and evidence limits.
@@ -37,18 +40,18 @@ The React adapter provides the components, styles and CSS variables together. In
37
40
 
38
41
  | Task | Start here |
39
42
  |---|---|
40
- | Run an action or navigate | [Button](docs/components/Button.md) for actions; [Link](docs/components/Link.md) for destinations |
41
- | Collect choices | [Checkbox](docs/components/Checkbox.md) for independent choices; [RadioGroup](docs/components/RadioGroup.md) for one visible choice; [Select](docs/components/Select.md) for a dropdown; [Switch](docs/components/Switch.md) for an immediate setting |
42
- | Collect text, quantities, or files | [Input](docs/components/Input.md), [Textarea](docs/components/Textarea.md), [NumberField](docs/components/NumberField.md), or [FileInput](docs/components/FileInput.md) |
43
- | Reveal details or supporting controls | [Disclosure](docs/components/Disclosure.md), [Accordion](docs/components/Accordion.md), or [Popover](docs/components/Popover.md); [drawer and confirmation patterns](https://github.com/KhallilB/kbui/blob/main/docs/guides/forms-and-overlays.md#drawer-pattern) compose Dialog |
44
- | Arrange a responsive page | [Container](docs/components/Container.md) for the page boundary; [Inline](docs/components/Inline.md) for rows; [Grid](docs/components/Grid.md) for collections; [Split](docs/components/Split.md) for two columns |
45
- | Explain state, waiting, or completion | [Spinner](docs/components/Spinner.md) for indeterminate waits; [Skeleton](docs/components/Skeleton.md) for loading placeholders; [Progress](docs/components/Progress.md) for completion; [EmptyState](docs/components/EmptyState.md) for missing content; [Status](docs/components/Status.md) for changing state; [Toast](docs/components/Toast.md) for transient notifications; [Badge](docs/components/Badge.md) for metadata; [Callout](docs/components/Callout.md) for a fuller message |
46
- | Compare records or scan details | [Table](docs/components/Table.md), [DescriptionList](docs/components/DescriptionList.md), [CollectionList](docs/components/CollectionList.md) and [CollectionRow](docs/components/CollectionRow.md) |
47
- | Build readable content | [Heading](docs/components/Heading.md) and [Text](docs/components/Text.md) |
43
+ | Run an action or navigate | [`Button`](docs/components/Button.md) for actions; [`ConfirmAction`](docs/components/ConfirmAction.md) for destructive actions; [`Link`](docs/components/Link.md) for destinations |
44
+ | Collect choices | [`Checkbox`](docs/components/Checkbox.md) for independent choices; [`RadioGroup`](docs/components/RadioGroup.md) for one visible choice; [`Select`](docs/components/Select.md) for a dropdown; [`Switch`](docs/components/Switch.md) for an immediate setting |
45
+ | Collect text, quantities, or files | [`Input`](docs/components/Input.md), [`Textarea`](docs/components/Textarea.md), [`NumberField`](docs/components/NumberField.md), or [`FileInput`](docs/components/FileInput.md) |
46
+ | Reveal details or supporting controls | [`Disclosure`](docs/components/Disclosure.md), [`Accordion`](docs/components/Accordion.md), or [`Popover`](docs/components/Popover.md); [drawer and confirmation patterns](https://github.com/KhallilB/kbui/blob/main/docs/guides/forms-and-overlays.md#drawer-pattern) compose `Dialog` |
47
+ | Arrange a responsive page | [`Container`](docs/components/Container.md) for the page boundary; [`PageHeader`](docs/components/PageHeader.md) for the title and page actions; [`StatsRow`](docs/components/StatsRow.md) for a row of key metrics; [`Dashboard`](docs/components/Dashboard.md) for an overview page with metrics and panels; [`Inline`](docs/components/Inline.md) for rows; [`Stack`](docs/components/Stack.md) for vertical flow; [`Grid`](docs/components/Grid.md) for collections; [`Split`](docs/components/Split.md) for two columns; [`SupportingPane`](docs/components/SupportingPane.md) for a main task with an aside such as an order summary |
48
+ | Explain state, waiting, or completion | [`Spinner`](docs/components/Spinner.md) for indeterminate waits; [`Skeleton`](docs/components/Skeleton.md) for loading placeholders; [`Progress`](docs/components/Progress.md) for completion; [`EmptyState`](docs/components/EmptyState.md) for missing content; [`Status`](docs/components/Status.md) for changing state; [`Toast`](docs/components/Toast.md) for transient notifications; [`Badge`](docs/components/Badge.md) for metadata; [`Callout`](docs/components/Callout.md) for a fuller message |
49
+ | Compare records or scan details | [`Table`](docs/components/Table.md), [`DescriptionList`](docs/components/DescriptionList.md), [`CollectionList`](docs/components/CollectionList.md) and [`CollectionRow`](docs/components/CollectionRow.md) |
50
+ | Build readable content | [`Heading`](docs/components/Heading.md) and [`Text`](docs/components/Text.md) |
48
51
 
49
52
  Start with the complete Usage example on a component page. Its More examples section links to focused, working Storybook states; Related components explains nearby alternatives. Use the live Docs page for component-specific keyboard, focus, and labeling guidance. Check those contracts with your app’s actual content and flows.
50
53
 
51
- For searchable choices, compare [Combobox](docs/components/Combobox.md) and [MultiSelect](docs/components/MultiSelect.md). For complete forms, start with [Fieldset](docs/components/Fieldset.md), [FormActions](docs/components/FormActions.md), and [ErrorSummary](docs/components/ErrorSummary.md).
54
+ For searchable choices, compare [`Combobox`](docs/components/Combobox.md) and [`MultiSelect`](docs/components/MultiSelect.md). For complete forms, start with [`Form`](docs/components/Form.md) or [`Settings`](docs/components/Settings.md), group fields with [`FormSection`](docs/components/FormSection.md), and recover with [`ErrorSummary`](docs/components/ErrorSummary.md).
52
55
 
53
56
  ## Components
54
57
 
@@ -58,100 +61,110 @@ Choose by task. Each page contains a complete usage example, canonical API detai
58
61
 
59
62
  | Component | Use for |
60
63
  |---|---|
61
- | <a id="avatar"></a>[Avatar](docs/components/Avatar.md) | Recognizable people and organizations with photo/initials fallback. |
62
- | <a id="image"></a>[Image](docs/components/Image.md) | Stable image sizing, crops, containment and failure states. |
63
- | <a id="thumbnail"></a>[Thumbnail](docs/components/Thumbnail.md) | Captioned products, attachments and gallery previews. |
64
+ | <a id="avatar"></a>[`Avatar`](docs/components/Avatar.md) | Recognizable people and organizations with photo/initials fallback. |
65
+ | <a id="image"></a>[`Image`](docs/components/Image.md) | Stable image sizing, crops, containment and failure states. |
66
+ | <a id="thumbnail"></a>[`Thumbnail`](docs/components/Thumbnail.md) | Captioned products, attachments and gallery previews. |
64
67
 
65
- See [Media and identity](../../docs/guides/media-and-identity.md) for responsive sources, retry and gallery recipes. These components are implemented locally and unreleased.
68
+ See [Media and identity](../../docs/guides/media-and-identity.md) for responsive sources and retry, and [`Gallery`](docs/components/Gallery.md) for catalog pages.
66
69
  ### Collections
67
70
 
68
71
  | Component | Use for |
69
72
  |---|---|
70
- | [Collection](docs/components/Collection.md) | Sort, filter, select and paginate records; includes useCollection, Collection.Pagination and Collection.BulkActions. |
73
+ | [`Collection`](docs/components/Collection.md) | Sort, filter, select and paginate records; includes `useCollection`, `Collection.Pagination` and `Collection.BulkActions`. |
71
74
 
72
75
  ### Navigation
73
76
 
74
77
  | Component | Use it to |
75
78
  | --- | --- |
76
- | <a id="tabs"></a>[Tabs](docs/components/Tabs.md) | Switch between peer panels with keyboard navigation. |
79
+ | <a id="tabs"></a>[`Tabs`](docs/components/Tabs.md) | Switch between peer panels with keyboard navigation. |
77
80
 
78
81
  ### Actions
79
82
 
80
83
  | Component | Use for |
81
84
  |---|---|
82
- | <a id="copyabletext"></a>[CopyableText](docs/components/CopyableText.md) | Copy identifiers and references with feedback and recovery. |
83
- | <a id="button"></a>[Button](docs/components/Button.md) | Trigger an action or link to another page. |
84
- | <a id="popover"></a>[Popover](docs/components/Popover.md) | Reveal supporting controls in an anchored popup. |
85
- | <a id="dialog"></a>[Dialog](docs/components/Dialog.md) | Keep a focused task in a dialog while the page waits behind it. |
86
- | <a id="menu"></a>[Menu](docs/components/Menu.md) | Keep related actions in a compact popup menu. |
87
- | <a id="toolbar"></a>[Toolbar](docs/components/Toolbar.md) | Group related actions with arrow-key navigation. |
85
+ | <a id="copyabletext"></a>[`CopyableText`](docs/components/CopyableText.md) | Copy identifiers and references with feedback and recovery. |
86
+ | <a id="button"></a>[`Button`](docs/components/Button.md) | Trigger an action or link to another page. |
87
+ | <a id="popover"></a>[`Popover`](docs/components/Popover.md) | Reveal supporting controls in an anchored popup. |
88
+ | <a id="dialog"></a>[`Dialog`](docs/components/Dialog.md) | Keep a focused task in a dialog while the page waits behind it. |
89
+ | <a id="confirmaction"></a>[`ConfirmAction`](docs/components/ConfirmAction.md) | Put a destructive action behind one confirmation that closes only after success. |
90
+ | <a id="menu"></a>[`Menu`](docs/components/Menu.md) | Keep related actions in a compact popup menu. |
91
+ | <a id="toolbar"></a>[`Toolbar`](docs/components/Toolbar.md) | Group related actions with arrow-key navigation. |
88
92
 
89
93
  ### Forms
90
94
 
91
95
  | Component | Use for |
92
96
  |---|---|
93
- | <a id="checkbox"></a>[Checkbox](docs/components/Checkbox.md) | Let people select options independently, including a mixed selection. |
94
- | <a id="combobox"></a>[Combobox](docs/components/Combobox.md) | Search and choose one or multiple options from a longer list. |
95
- | <a id="errorsummary"></a>[ErrorSummary](docs/components/ErrorSummary.md) | Summarize form validation errors with links that focus each field. |
96
- | <a id="fieldset"></a>[Fieldset](docs/components/Fieldset.md) | Group related fields with a native fieldset, legend, and section help. |
97
- | <a id="fileinput"></a>[FileInput](docs/components/FileInput.md) | Choose files, review the list, and remove individual items. |
98
- | <a id="formactions"></a>[FormActions](docs/components/FormActions.md) | Align submit, reset, and secondary actions at the end of a form. |
99
- | <a id="input"></a>[Input](docs/components/Input.md) | Collect text with a clear label, help text, and error feedback. |
100
- | <a id="multiselect"></a>[MultiSelect](docs/components/MultiSelect.md) | Search a list and keep multiple selections visible as removable chips. |
101
- | <a id="numberfield"></a>[NumberField](docs/components/NumberField.md) | Enter a number by typing or using step buttons. |
102
- | <a id="radiogroup"></a>[RadioGroup](docs/components/RadioGroup.md) | Choose one option from a visible group. |
103
- | <a id="select"></a>[Select](docs/components/Select.md) | Choose one option from a dropdown list. |
104
- | <a id="switch"></a>[Switch](docs/components/Switch.md) | Turn an immediate preference on or off. |
105
- | <a id="textarea"></a>[Textarea](docs/components/Textarea.md) | Collect multiline text with a label, help text, and error feedback. |
97
+ | <a id="checkbox"></a>[`Checkbox`](docs/components/Checkbox.md) | Let people select options independently, including a mixed selection. |
98
+ | <a id="combobox"></a>[`Combobox`](docs/components/Combobox.md) | Search and choose one or multiple options from a longer list. |
99
+ | <a id="errorsummary"></a>[`ErrorSummary`](docs/components/ErrorSummary.md) | Summarize form validation errors with links that focus each field. |
100
+ | <a id="fieldset"></a>[`Fieldset`](docs/components/Fieldset.md) | Group related fields with a native `fieldset`, legend, and section help. |
101
+ | <a id="fileinput"></a>[`FileInput`](docs/components/FileInput.md) | Choose files, review the list, and remove individual items. |
102
+ | <a id="formactions"></a>[`FormActions`](docs/components/FormActions.md) | Align submit, reset, and secondary actions at the end of a form. |
103
+ | <a id="formsection"></a>[`FormSection`](docs/components/FormSection.md) | A headed group of related fields with its error and actions. |
104
+ | <a id="input"></a>[`Input`](docs/components/Input.md) | Collect text with a clear label, help text, and error feedback. |
105
+ | <a id="multiselect"></a>[`MultiSelect`](docs/components/MultiSelect.md) | Search a list and keep multiple selections visible as removable chips. |
106
+ | <a id="numberfield"></a>[`NumberField`](docs/components/NumberField.md) | Enter a number by typing or using step buttons. |
107
+ | <a id="radiogroup"></a>[`RadioGroup`](docs/components/RadioGroup.md) | Choose one option from a visible group. |
108
+ | <a id="select"></a>[`Select`](docs/components/Select.md) | Choose one option from a dropdown list. |
109
+ | <a id="switch"></a>[`Switch`](docs/components/Switch.md) | Turn an immediate preference on or off. |
110
+ | <a id="textarea"></a>[`Textarea`](docs/components/Textarea.md) | Collect multiline text with a label, help text, and error feedback. |
106
111
 
107
112
  ### Feedback
108
113
 
109
114
  | Component | Use for |
110
115
  |---|---|
111
- | <a id="badge"></a>[Badge](docs/components/Badge.md) | Add a short label, category, or piece of metadata. |
112
- | <a id="toast"></a>[Toast](docs/components/Toast.md) | Queue temporary messages with announcements, actions and timed dismissal. |
113
- | <a id="callout"></a>[Callout](docs/components/Callout.md) | Highlight a message and offer a useful next step. |
114
- | <a id="emptystate"></a>[EmptyState](docs/components/EmptyState.md) | Explain why a collection or section is empty and offer the next action. |
115
- | <a id="progress"></a>[Progress](docs/components/Progress.md) | Show how much of a task is complete. |
116
- | <a id="skeleton"></a>[Skeleton](docs/components/Skeleton.md) | Reserve incoming content geometry while a section loads. |
117
- | <a id="spinner"></a>[Spinner](docs/components/Spinner.md) | Indicate an indeterminate wait or busy control. |
118
- | <a id="stat"></a>[Stat](docs/components/Stat.md) | Show a number alongside the label that explains it. |
119
- | <a id="status"></a>[Status](docs/components/Status.md) | Describe a current state with text and an optional icon. |
120
- | <a id="tooltip"></a>[Tooltip](docs/components/Tooltip.md) | Add brief context on hover or keyboard focus. |
116
+ | <a id="badge"></a>[`Badge`](docs/components/Badge.md) | Add a short label, category, or piece of metadata. |
117
+ | <a id="toast"></a>[`Toast`](docs/components/Toast.md) | Queue temporary messages with announcements, actions and timed dismissal. |
118
+ | <a id="callout"></a>[`Callout`](docs/components/Callout.md) | Highlight a message and offer a useful next step. |
119
+ | <a id="emptystate"></a>[`EmptyState`](docs/components/EmptyState.md) | Explain why a collection or section is empty and offer the next action. |
120
+ | <a id="progress"></a>[`Progress`](docs/components/Progress.md) | Show how much of a task is complete. |
121
+ | <a id="skeleton"></a>[`Skeleton`](docs/components/Skeleton.md) | Reserve incoming content geometry while a section loads. |
122
+ | <a id="spinner"></a>[`Spinner`](docs/components/Spinner.md) | Indicate an indeterminate wait or busy control. |
123
+ | <a id="stat"></a>[`Stat`](docs/components/Stat.md) | Show a number alongside the label that explains it. |
124
+ | <a id="status"></a>[`Status`](docs/components/Status.md) | Describe a current state with text and an optional icon. |
125
+ | <a id="tooltip"></a>[`Tooltip`](docs/components/Tooltip.md) | Add brief context on hover or keyboard focus. |
121
126
 
122
127
  ### Layout
123
128
 
124
129
  | Component | Use for |
125
130
  |---|---|
126
- | <a id="accordion"></a>[Accordion](docs/components/Accordion.md) | Group related disclosures under headings. |
127
- | <a id="disclosure"></a>[Disclosure](docs/components/Disclosure.md) | Reveal optional details and controls inline. |
128
- | <a id="card"></a>[Card](docs/components/Card.md) | Group related content, with room for links and actions. |
129
- | <a id="container"></a>[Container](docs/components/Container.md) | Shared page widths and responsive gutters. |
130
- | <a id="grid"></a>[Grid](docs/components/Grid.md) | Arrange content in responsive columns or a single stack. |
131
- | <a id="inline"></a>[Inline](docs/components/Inline.md) | Wrapping rows with shared spacing and alignment. |
132
- | <a id="panel"></a>[Panel](docs/components/Panel.md) | Organize a section with a header, content, and actions. |
133
- | <a id="scrollarea"></a>[ScrollArea](docs/components/ScrollArea.md) | Keep longer content in a scrollable, keyboard-accessible region. |
134
- | <a id="separator"></a>[Separator](docs/components/Separator.md) | Semantic or decorative horizontal and vertical rules. |
135
- | <a id="split"></a>[Split](docs/components/Split.md) | Two columns that stack when their parent narrows. |
131
+ | <a id="accordion"></a>[`Accordion`](docs/components/Accordion.md) | Group related disclosures under headings. |
132
+ | <a id="dashboard"></a>[`Dashboard`](docs/components/Dashboard.md) | An overview page: header, metrics, then primary and secondary panels. |
133
+ | <a id="disclosure"></a>[`Disclosure`](docs/components/Disclosure.md) | Reveal optional details and controls inline. |
134
+ | <a id="card"></a>[`Card`](docs/components/Card.md) | Group related content, with room for links and actions. |
135
+ | <a id="container"></a>[`Container`](docs/components/Container.md) | Shared page widths and responsive gutters. |
136
+ | <a id="form"></a>[`Form`](docs/components/Form.md) | One task with grouped fields, then its one submit action. |
137
+ | <a id="gallery"></a>[`Gallery`](docs/components/Gallery.md) | A page of image-led items, such as a product catalog, in one to four columns. |
138
+ | <a id="grid"></a>[`Grid`](docs/components/Grid.md) | Arrange content in responsive columns or a single stack. |
139
+ | <a id="inline"></a>[`Inline`](docs/components/Inline.md) | Wrapping rows with shared spacing and alignment. |
140
+ | <a id="pageheader"></a>[`PageHeader`](docs/components/PageHeader.md) | Open a screen with its title, context, state badges and page-level actions. |
141
+ | <a id="panel"></a>[`Panel`](docs/components/Panel.md) | Organize a section with a header, content, and actions. |
142
+ | <a id="scrollarea"></a>[`ScrollArea`](docs/components/ScrollArea.md) | Keep longer content in a scrollable, keyboard-accessible region. |
143
+ | <a id="separator"></a>[`Separator`](docs/components/Separator.md) | Semantic or decorative horizontal and vertical rules. |
144
+ | <a id="settings"></a>[`Settings`](docs/components/Settings.md) | Sections of fields and managed lists, each saved on its own. |
145
+ | <a id="split"></a>[`Split`](docs/components/Split.md) | Two columns that stack when their parent narrows. |
146
+ | <a id="stack"></a>[`Stack`](docs/components/Stack.md) | Vertical flow with shared spacing and alignment. |
147
+ | <a id="statsrow"></a>[`StatsRow`](docs/components/StatsRow.md) | Show comparable metrics in a row that fills its region and wraps when narrow. |
148
+ | <a id="supportingpane"></a>[`SupportingPane`](docs/components/SupportingPane.md) | A main column with a named aside that moves below it when narrow. |
136
149
 
137
150
  ### Structured data
138
151
 
139
152
  | Component | Use for |
140
153
  |---|---|
141
- | <a id="table"></a>[Table](docs/components/Table.md) | Compare fields across records with sorting, selection, actions and sticky layouts. |
142
- | <a id="descriptionlist"></a>[DescriptionList](docs/components/DescriptionList.md) | Scan labeled facts with aligned, responsive key/value presentation. |
143
- | <a id="collectionlist"></a>[CollectionList](docs/components/CollectionList.md) | Group unordered or ordered records with shared alignment and spacing. |
144
- | <a id="collectionrow"></a>[CollectionRow](docs/components/CollectionRow.md) | Summarize a record with details, metadata, selection and independent actions. |
154
+ | <a id="table"></a>[`Table`](docs/components/Table.md) | Compare fields across records with sorting, selection, actions and sticky layouts. |
155
+ | <a id="descriptionlist"></a>[`DescriptionList`](docs/components/DescriptionList.md) | Scan labeled facts with aligned, responsive key/value presentation. |
156
+ | <a id="collectionlist"></a>[`CollectionList`](docs/components/CollectionList.md) | Group unordered or ordered records with shared alignment and spacing. |
157
+ | <a id="collectionrow"></a>[`CollectionRow`](docs/components/CollectionRow.md) | Summarize a record with details, metadata, selection and independent actions. |
145
158
 
146
159
  ### Typography
147
160
 
148
161
  | Component | Use for |
149
162
  |---|---|
150
- | <a id="codeblock"></a>[CodeBlock](docs/components/CodeBlock.md) | Explicit source listings with highlighting, line numbers and copy feedback. |
151
- | <a id="code"></a>[Code](docs/components/Code.md) | Literal inline code and syntax-highlighted multiline code blocks. |
152
- | <a id="heading"></a>[Heading](docs/components/Heading.md) | Native heading hierarchy with independent visual sizing. |
153
- | <a id="link"></a>[Link](docs/components/Link.md) | Recognizable navigation with visible keyboard focus. |
154
- | <a id="text"></a>[Text](docs/components/Text.md) | Readable paragraphs, inline text and supporting content. |
163
+ | <a id="codeblock"></a>[`CodeBlock`](docs/components/CodeBlock.md) | Explicit source listings with highlighting, line numbers and copy feedback. |
164
+ | <a id="code"></a>[`Code`](docs/components/Code.md) | Literal inline code and syntax-highlighted multiline code blocks. |
165
+ | <a id="heading"></a>[`Heading`](docs/components/Heading.md) | Native heading hierarchy with independent visual sizing. |
166
+ | <a id="link"></a>[`Link`](docs/components/Link.md) | Recognizable navigation with visible keyboard focus. |
167
+ | <a id="text"></a>[`Text`](docs/components/Text.md) | Readable paragraphs, inline text and supporting content. |
155
168
 
156
169
  ## Composition guides
157
170
 
@@ -169,15 +182,15 @@ Use these when a task spans several components:
169
182
 
170
183
  ## Search composition
171
184
 
172
- Use the [Input search recipe](docs/components/Input.md#search-composition) for a labeled search field with a clear action and focus recovery.
185
+ Use the [`Input` search recipe](docs/components/Input.md#search-composition) for a labeled search field with a clear action and focus recovery.
173
186
 
174
187
  ## Resizable panels
175
188
 
176
- Use the [Panel.Handle reference](docs/components/Panel.md#resizable-panels) for resizable panel groups and their pointer and keyboard behavior.
189
+ Use the [`Panel.Handle` reference](docs/components/Panel.md#resizable-panels) for resizable panel groups and their pointer and keyboard behavior.
177
190
 
178
191
  ## Styling
179
192
 
180
- Every component takes `className` and `style`. Components with inner parts, such as Input, Select and Checkbox, also take `classNames` keyed by part; the props type lists each part. kbui's CSS sits in the `kbui` cascade layer, so your classes win. See [Restyling kbui](https://github.com/KhallilB/kbui/blob/main/docs/guides/restyling.md).
193
+ Every component takes `className` and `style`. Components with inner parts, such as `Input`, `Select` and `Checkbox`, also take `classNames` keyed by part; the props type lists each part. kbui's CSS sits in the `kbui` cascade layer, so your classes win. See [Restyling kbui](https://github.com/KhallilB/kbui/blob/main/docs/guides/restyling.md).
181
194
 
182
195
  ```tsx
183
196
  <Input label="Email" className="w-full" classNames={{ control: "rounded-none" }} />
@@ -0,0 +1,42 @@
1
+ import { type ReactNode } from "react";
2
+ import { type ClassNames } from "../../utils/kb";
3
+ import { type DialogContentProps, type DialogTriggerProps } from "../Dialog/Dialog";
4
+ export type ConfirmActionSlot = "popup" | "backdrop" | "details" | "error";
5
+ /** Destructive action behind a modal confirmation; the trigger only opens it. */
6
+ export type ConfirmActionProps = Omit<DialogTriggerProps, "className" | "title" | "children" | "handle" | "payload"> & {
7
+ /** Trigger text; also the confirm button text unless confirmLabel is set. */
8
+ children: ReactNode;
9
+ /** Plain class string for the trigger. */
10
+ className?: string | undefined;
11
+ /** Dialog heading and accessible name; ask the question the action settles. */
12
+ title: ReactNode;
13
+ /** Consequence of confirming; the dialog's accessible description. */
14
+ description?: ReactNode | undefined;
15
+ /** Further consequence detail, such as what else is removed. */
16
+ details?: ReactNode | undefined;
17
+ /** Runs the action. Throw or reject to keep the dialog open with an error. */
18
+ onConfirm: () => unknown;
19
+ /** Runs once after success, after the dialog has closed; remove the trigger here. */
20
+ onConfirmed?: (() => void) | undefined;
21
+ /** Confirm button text; defaults to the trigger's children. */
22
+ confirmLabel?: ReactNode | undefined;
23
+ /** Confirm button text while the action runs; defaults to confirmLabel. */
24
+ pendingLabel?: ReactNode | undefined;
25
+ /** Cancel button text. */
26
+ cancelLabel?: ReactNode | undefined;
27
+ /** Alert shown after a failure; a function receives the thrown reason. */
28
+ errorMessage?: ReactNode | ((error: unknown) => ReactNode) | undefined;
29
+ /** Controlled visibility. */
30
+ open?: boolean | undefined;
31
+ /** Initial visibility when uncontrolled. */
32
+ defaultOpen?: boolean | undefined;
33
+ /** Receives each requested visibility change, including the close after success. */
34
+ onOpenChange?: ((open: boolean) => void) | undefined;
35
+ /** Focus target after closing; set it when success removes the trigger. */
36
+ finalFocus?: DialogContentProps["finalFocus"] | undefined;
37
+ /** Portal target; defaults to document.body. */
38
+ container?: DialogContentProps["container"] | undefined;
39
+ /** Classes for inner parts, keyed by part. */
40
+ classNames?: ClassNames<ConfirmActionSlot> | undefined;
41
+ };
42
+ export declare function ConfirmAction({ title, description, details, onConfirm, onConfirmed, confirmLabel, pendingLabel, cancelLabel, errorMessage, open, defaultOpen, onOpenChange, finalFocus, container, classNames, className, children, render, ...props }: ConfirmActionProps): import("react").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import type { ComponentProps, ReactNode } from "react";
2
+ import { type ClassNames } from "../../utils/kb";
3
+ export type DashboardPart = "header" | "metrics" | "panels" | "primary" | "secondary";
4
+ export interface DashboardProps extends Omit<ComponentProps<"div">, "children"> {
5
+ /** Page title, freshness and page actions; usually a PageHeader. */
6
+ header?: ReactNode | undefined;
7
+ /** Row of headline metrics below the header. */
8
+ metrics?: ReactNode | undefined;
9
+ /** Main panels; take two thirds beside secondary on wide pages. */
10
+ primary?: ReactNode | undefined;
11
+ /** Supporting panels; move below primary on narrow pages. */
12
+ secondary?: ReactNode | undefined;
13
+ /** Classes for inner regions, keyed by region. */
14
+ classNames?: ClassNames<DashboardPart> | undefined;
15
+ }
16
+ /** Layout intent for an overview page: header, metrics, then primary and secondary panels. */
17
+ export declare const Dashboard: ({ ref, header, metrics, primary, secondary, className, classNames, ...props }: DashboardProps) => import("react").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import type { ComponentProps, ReactNode } from "react";
2
+ import { type ClassNames } from "../../utils/kb";
3
+ import { type FormActionsAlign } from "../FormActions/FormActions";
4
+ export type FormWidth = "sm" | "md" | "full";
5
+ export type FormPart = "header" | "body" | "actions";
6
+ export interface FormProps extends ComponentProps<"form"> {
7
+ /** Title and intro above the fields, such as a heading or PageHeader. */
8
+ header?: ReactNode | undefined;
9
+ /** The task's submit button first, then secondary actions. */
10
+ actions?: ReactNode | undefined;
11
+ /** Alignment of the actions row above the compact width. */
12
+ actionsAlign?: FormActionsAlign | undefined;
13
+ /** Maximum inline size: sm 32rem, md 40rem or full. */
14
+ width?: FormWidth | undefined;
15
+ /** Classes for inner regions, keyed by region. */
16
+ classNames?: ClassNames<FormPart> | undefined;
17
+ }
18
+ /** Layout intent for one task: header, grouped fields, then its actions. */
19
+ export declare const Form: ({ ref, header, actions, actionsAlign, width, className, classNames, children, ...props }: FormProps) => import("react").JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { type ComponentProps, type ReactNode } from "react";
2
+ import { type ClassNames } from "../../utils/kb";
3
+ import { type FormActionsAlign } from "../FormActions/FormActions";
4
+ export type FormSectionLayout = "stack" | "split";
5
+ export type FormSectionHeadingLevel = 2 | 3 | 4 | 5 | 6;
6
+ export type FormSectionPart = "header" | "title" | "description" | "body" | "fields" | "error" | "actions";
7
+ export interface FormSectionProps extends Omit<ComponentProps<"fieldset">, "title"> {
8
+ /** Section heading; also names the group. */
9
+ title: ReactNode;
10
+ /** Heading rank; follow the page hierarchy. */
11
+ headingLevel?: FormSectionHeadingLevel | undefined;
12
+ /** Supporting context for the grouped fields. */
13
+ description?: ReactNode | undefined;
14
+ /** Section-level validation error. */
15
+ error?: ReactNode | undefined;
16
+ /** Buttons for this section, after the fields in Tab order. */
17
+ actions?: ReactNode | undefined;
18
+ /** Alignment of the actions row. */
19
+ actionsAlign?: FormActionsAlign | undefined;
20
+ /** Heading beside or above fields; unset follows the enclosing intent. */
21
+ layout?: FormSectionLayout | undefined;
22
+ /** Classes for inner parts, keyed by part. */
23
+ classNames?: ClassNames<FormSectionPart> | undefined;
24
+ }
25
+ /** Named group of related fields with its heading, error and actions. */
26
+ export declare const FormSection: ({ ref, title, headingLevel, description, error, actions, actionsAlign, layout, disabled, className, classNames, children, "aria-describedby": ariaDescribedBy, "aria-invalid": callerAriaInvalid, ...props }: FormSectionProps) => import("react").JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { type ComponentProps, type ReactNode } from "react";
2
+ import { type ClassNames } from "../../utils/kb";
3
+ export type GalleryPart = "header" | "filters" | "items" | "empty";
4
+ export interface GalleryProps extends ComponentProps<"div"> {
5
+ /** Page title, intro and page actions, usually a PageHeader. */
6
+ header?: ReactNode | undefined;
7
+ /** Search, filter and sort controls; they share a row and wrap. */
8
+ filters?: ReactNode | undefined;
9
+ /** Accessible name for the item list. */
10
+ itemsLabel?: string | undefined;
11
+ /** Shown in place of the list when there are no items. */
12
+ empty?: ReactNode | undefined;
13
+ /** Classes for inner regions, keyed by region. */
14
+ classNames?: ClassNames<GalleryPart> | undefined;
15
+ }
16
+ export interface GalleryItemProps extends ComponentProps<"li"> {
17
+ /** Spans two columns once the list has two; keep featured items first. */
18
+ featured?: boolean | undefined;
19
+ }
20
+ declare function GalleryRoot({ ref, header, filters, itemsLabel, empty, className, classNames, children, ...props }: GalleryProps): import("react").JSX.Element;
21
+ declare function GalleryItem({ featured, className, ...props }: GalleryItemProps): import("react").JSX.Element;
22
+ /** Layout intent for a grid of image-led items, such as a product catalog. */
23
+ export declare const Gallery: typeof GalleryRoot & {
24
+ Item: typeof GalleryItem;
25
+ };
26
+ export {};
@@ -0,0 +1,27 @@
1
+ import type { ComponentProps, ReactNode } from "react";
2
+ import { type ClassNames } from "../../utils/kb";
3
+ export type PageHeaderSize = "sm" | "md" | "lg";
4
+ export type PageHeaderHeadingLevel = 1 | 2 | 3;
5
+ export type PageHeaderProps = Omit<ComponentProps<"div">, "title"> & {
6
+ /** Page title; renders as the screen's main heading. */
7
+ title: ReactNode;
8
+ /** One or two sentences of context below the title. */
9
+ description?: ReactNode | undefined;
10
+ /** Short section or object-type label above the title. */
11
+ eyebrow?: ReactNode | undefined;
12
+ /** Back link or breadcrumb trail above the heading. */
13
+ navigation?: ReactNode | undefined;
14
+ /** Status badges or metadata beside the title, outside its accessible name. */
15
+ meta?: ReactNode | undefined;
16
+ /** Page-level actions; end-aligned, wrapping below the heading when narrow. */
17
+ actions?: ReactNode | undefined;
18
+ /** Document outline rank for the title (`1`–`3`); keep `1` for a screen's own header. */
19
+ headingLevel?: PageHeaderHeadingLevel | undefined;
20
+ /** Title scale: `sm` for dense app shells, `lg` for landing screens. */
21
+ size?: PageHeaderSize | undefined;
22
+ /** Draws a rule below the header to separate it from page content. */
23
+ divider?: boolean | undefined;
24
+ classNames?: ClassNames<"navigation" | "main" | "heading" | "eyebrow" | "headline" | "title" | "meta" | "description" | "actions" | "body"> | undefined;
25
+ };
26
+ /** Opening region of a screen: title, context, status and page-level actions. */
27
+ export declare function PageHeader({ title, description, eyebrow, navigation, meta, actions, headingLevel, size, divider, className, classNames, children, ...rest }: PageHeaderProps): import("react").JSX.Element;
@@ -12,6 +12,8 @@ export type PanelProps = ComponentProps<"section"> & {
12
12
  rail?: PanelRail;
13
13
  /** Padding scale. */
14
14
  density?: PanelDensity;
15
+ /** Solid fill with no theme backdrop filter; for content that redraws often. */
16
+ opaque?: boolean;
15
17
  /** Makes Panel.Body collapse and expand from Panel.Toggle. */
16
18
  collapsible?: boolean;
17
19
  /** Controlled open state; collapsible only. */
@@ -53,7 +55,7 @@ export type PanelHandleProps = Omit<ComponentProps<"div">, "children" | "role">
53
55
  } | {
54
56
  "aria-labelledby": string;
55
57
  });
56
- declare function PanelRoot({ tone, rail, density, collapsible, open, defaultOpen, onOpenChange, className, children, ref, ...props }: PanelProps): import("react").JSX.Element;
58
+ declare function PanelRoot({ tone, rail, density, opaque, collapsible, open, defaultOpen, onOpenChange, className, children, ref, ...props }: PanelProps): import("react").JSX.Element;
57
59
  declare function PanelHeader({ className, ...props }: PanelHeaderProps): import("react").JSX.Element;
58
60
  declare function PanelToolbar({ className, ...props }: PanelToolbarProps): import("react").JSX.Element;
59
61
  declare function PanelBody({ className, ...props }: PanelBodyProps): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import type { ComponentProps, ReactNode } from "react";
2
+ import { type ClassNames } from "../../utils/kb";
3
+ export type SettingsPart = "header" | "sections";
4
+ export interface SettingsProps extends ComponentProps<"div"> {
5
+ /** Page title and intro above the sections. */
6
+ header?: ReactNode | undefined;
7
+ /** Classes for inner regions, keyed by region. */
8
+ classNames?: ClassNames<SettingsPart> | undefined;
9
+ }
10
+ /** Layout intent for sections of fields and managed lists, each saved on its own. */
11
+ export declare const Settings: ({ ref, header, className, classNames, children, ...props }: SettingsProps) => import("react").JSX.Element;
@@ -1,12 +1,12 @@
1
1
  import { type ComponentPropsWithoutRef, type ReactNode } from "react";
2
2
  import { type ClassNames } from "../../utils/kb";
3
- export type SkeletonVariant = "text" | "rect" | "circle" | "pill";
3
+ export type SkeletonVariant = "text" | "rect" | "circle" | "pill" | "auto";
4
4
  export type SkeletonSize = "sm" | "md" | "lg";
5
5
  export type SkeletonAnimation = "shimmer" | "pulse" | "wave" | "none";
6
6
  export type SkeletonTone = "default" | "subtle" | "accent";
7
- export type SkeletonPart = "root" | "line" | "content";
7
+ export type SkeletonPart = "root" | "line" | "content" | "status";
8
8
  export interface SkeletonProps extends ComponentPropsWithoutRef<"div"> {
9
- /** Shape preset for the placeholder geometry. */
9
+ /** Shape preset; `auto` shapes placeholders from kbui children, falling back to `text` without them. */
10
10
  variant?: SkeletonVariant | undefined;
11
11
  /** Size preset controlling line height or avatar diameter. */
12
12
  size?: SkeletonSize | undefined;
@@ -14,17 +14,19 @@ export interface SkeletonProps extends ComponentPropsWithoutRef<"div"> {
14
14
  lines?: number | undefined;
15
15
  /** Enable motion on placeholder shapes; set `false` for static placeholders. */
16
16
  animated?: boolean | undefined;
17
- /** Motion choreography (`shimmer` diagonal sweep, `pulse` breathing opacity, `wave` staggered cascade, or `none`). */
17
+ /** Motion: `shimmer` sweep, `pulse` fade, `wave` staggered fade, or `none`. */
18
18
  animation?: SkeletonAnimation | undefined;
19
- /** Surface color treatment (`default` surface, `subtle` recessed tint, or `accent` warm synthesis tint). */
19
+ /** Surface color: `default`, `subtle` recessed, or `accent` tinted. */
20
20
  tone?: SkeletonTone | undefined;
21
21
  /** Whether content is still loading; when `false`, renders `children` inside `.kb-skeleton-content`. */
22
22
  loading?: boolean | undefined;
23
+ /** Loading status announced by `variant="auto"`. */
24
+ label?: string | undefined;
23
25
  /** Optional explicit inline size (`px` number or CSS length string). */
24
26
  width?: number | string | undefined;
25
27
  /** Optional explicit block size (`px` number or CSS length string). */
26
28
  height?: number | string | undefined;
27
- /** Loaded content revealed when `loading` is `false`. */
29
+ /** Loaded content; `variant="auto"` also renders it inert as the placeholder layout. */
28
30
  children?: ReactNode | undefined;
29
31
  /** Custom class names for internal component slots. */
30
32
  classNames?: ClassNames<SkeletonPart> | undefined;
@@ -0,0 +1,15 @@
1
+ import type { LayoutElementProps, LayoutGap } from "../../utils/layout";
2
+ export type StackElement = "div" | "section" | "article" | "aside" | "ul" | "ol" | "nav" | "form";
3
+ export type StackAlign = "start" | "center" | "end" | "stretch";
4
+ export type StackJustify = "start" | "center" | "end" | "between";
5
+ export type StackProps<T extends StackElement = "div"> = LayoutElementProps<T> & {
6
+ /** Space between stacked items. */
7
+ gap?: LayoutGap;
8
+ /** Inline-axis alignment; stretch fills the stack width. */
9
+ align?: StackAlign;
10
+ /** Block-axis distribution when the stack is taller than its content. */
11
+ justify?: StackJustify;
12
+ };
13
+ export declare function Stack<T extends StackElement = "div">({ as, gap, align, justify, className, ...props }: StackProps<T>): import("react").DetailedReactHTMLElement<Omit<StackProps<T>, "align" | "as" | "className" | "gap" | "justify"> & {
14
+ className: string;
15
+ } & Record<`data-${string}`, string>, HTMLElement>;
@@ -0,0 +1,33 @@
1
+ import type { ComponentProps, ReactNode } from "react";
2
+ import { type ClassNames } from "../../utils/kb";
3
+ export type StatsRowAppearance = "plain" | "outlined";
4
+ export type StatsRowTrend = "up" | "down" | "flat";
5
+ export type StatsRowTone = "positive" | "negative" | "neutral";
6
+ export type StatsRowProps = ComponentProps<"ul"> & {
7
+ /** Plain metrics on the page, or each metric on an outlined card surface. */
8
+ appearance?: StatsRowAppearance | undefined;
9
+ };
10
+ /** A list of comparable metrics that fills its region and wraps when narrow. */
11
+ declare function StatsRowRoot({ appearance, className, ...rest }: StatsRowProps): import("react").JSX.Element;
12
+ export type StatsRowItemProps = Omit<ComponentProps<"li">, "children"> & {
13
+ /** What the value measures, including its period when that changes the meaning. */
14
+ label: ReactNode;
15
+ /** The figure with its unit; figures are tabular. */
16
+ value: ReactNode;
17
+ /** Change since the comparison period; its text must state the direction, such as `+12.8%`. */
18
+ change?: ReactNode | undefined;
19
+ /** Direction glyph beside `change`; decorative, so the change text carries the meaning. */
20
+ trend?: StatsRowTrend | undefined;
21
+ /** Colors `change` by whether it is good or bad news; color alone, so state it in text too. */
22
+ tone?: StatsRowTone | undefined;
23
+ /** Comparison period or freshness, such as `vs. previous month`. */
24
+ context?: ReactNode | undefined;
25
+ /** Optional link to the detail behind the metric. */
26
+ link?: ReactNode | undefined;
27
+ classNames?: ClassNames<"stat" | "label" | "value" | "trend" | "change" | "glyph" | "context" | "link"> | undefined;
28
+ };
29
+ declare function StatsRowItem({ label, value, change, trend, tone, context, link, className, classNames, ...rest }: StatsRowItemProps): import("react").JSX.Element;
30
+ export declare const StatsRow: typeof StatsRowRoot & {
31
+ Item: typeof StatsRowItem;
32
+ };
33
+ export {};
@@ -0,0 +1,15 @@
1
+ import type { ComponentProps, ReactNode } from "react";
2
+ import { type ClassNames } from "../../utils/kb";
3
+ export type SupportingPanePart = "main" | "aside";
4
+ export interface SupportingPaneProps extends ComponentProps<"div"> {
5
+ /** Supporting content, such as an order summary; moves below main at compact size. */
6
+ aside?: ReactNode | undefined;
7
+ /** Accessible name for the aside landmark. */
8
+ asideLabel?: string | undefined;
9
+ /** Id of a visible heading that names the aside; preferred over `asideLabel`. */
10
+ asideLabelledBy?: string | undefined;
11
+ /** Classes for inner regions, keyed by region. */
12
+ classNames?: ClassNames<SupportingPanePart> | undefined;
13
+ }
14
+ /** Layout intent for a main column with a complementary aside beside it, or below it when narrow. */
15
+ export declare const SupportingPane: ({ ref, aside, asideLabel, asideLabelledBy, className, classNames, children, ...props }: SupportingPaneProps) => import("react").JSX.Element;