@logicplanes/kaeso-ui 0.1.0 → 0.2.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 (246) hide show
  1. package/AGENTS.md +1 -0
  2. package/LICENSE +1 -1
  3. package/ai/component-guides.md +269 -7
  4. package/ai/component-registry.json +600 -800
  5. package/ai/component-registry.md +200 -141
  6. package/ai/icons.md +2 -2
  7. package/ai/tokens.md +1 -1
  8. package/dist/blocks/delete-resource.js +1 -1
  9. package/dist/blocks/pages.js +3 -3
  10. package/dist/blocks/resource-list.js +2 -2
  11. package/dist/chunks/app-frame-BXh-06HL.js +214 -0
  12. package/dist/chunks/app-frame-BXh-06HL.js.map +1 -0
  13. package/dist/chunks/{banner-BiziJuBZ.js → banner-DxGBPQ7p.js} +2 -2
  14. package/dist/chunks/{banner-BiziJuBZ.js.map → banner-DxGBPQ7p.js.map} +1 -1
  15. package/dist/chunks/{button-BHKAE6ui.js → button-DQvoOxVQ.js} +2 -2
  16. package/dist/chunks/{button-BHKAE6ui.js.map → button-DQvoOxVQ.js.map} +1 -1
  17. package/dist/chunks/{calendar-B5SSTE56.js → calendar-CN3YJi2k.js} +3 -3
  18. package/dist/chunks/{calendar-B5SSTE56.js.map → calendar-CN3YJi2k.js.map} +1 -1
  19. package/dist/chunks/code-BADhvsgC.js +33 -0
  20. package/dist/chunks/code-BADhvsgC.js.map +1 -0
  21. package/dist/chunks/{code-block-BbK6E4Eo.js → code-block-DxtladFW.js} +41 -37
  22. package/dist/chunks/code-block-DxtladFW.js.map +1 -0
  23. package/dist/chunks/{combobox-D8pQk22r.js → combobox-D30Wt11R.js} +4 -4
  24. package/dist/chunks/{combobox-D8pQk22r.js.map → combobox-D30Wt11R.js.map} +1 -1
  25. package/dist/chunks/{copy-button-mAzHjYXq.js → copy-button-DXxn-YYZ.js} +4 -4
  26. package/dist/chunks/{copy-button-mAzHjYXq.js.map → copy-button-DXxn-YYZ.js.map} +1 -1
  27. package/dist/chunks/{core-Bgefcs3z.js → core-K960A4OT.js} +119 -120
  28. package/dist/chunks/core-K960A4OT.js.map +1 -0
  29. package/dist/chunks/{date-popup-Er1oQwtU.js → date-popup-B-6xhb-1.js} +3 -3
  30. package/dist/chunks/{date-popup-Er1oQwtU.js.map → date-popup-B-6xhb-1.js.map} +1 -1
  31. package/dist/chunks/{de-BCg1eRVd.js → de-CTAo4KL7.js} +10 -10
  32. package/dist/chunks/de-CTAo4KL7.js.map +1 -0
  33. package/dist/chunks/dialog-LNKgPEsV.js +319 -0
  34. package/dist/chunks/dialog-LNKgPEsV.js.map +1 -0
  35. package/dist/chunks/{icon-Bha63LaN.js → icon-CBzvyEqC.js} +30 -29
  36. package/dist/chunks/icon-CBzvyEqC.js.map +1 -0
  37. package/dist/chunks/{icon-button-Bw67oKtx.js → icon-button-_x1RUphC.js} +3 -3
  38. package/dist/chunks/{icon-button-Bw67oKtx.js.map → icon-button-_x1RUphC.js.map} +1 -1
  39. package/dist/chunks/{identity-DQinp-Ep.js → identity-BtZC_d_Q.js} +3 -3
  40. package/dist/chunks/{identity-DQinp-Ep.js.map → identity-BtZC_d_Q.js.map} +1 -1
  41. package/dist/chunks/{input-Biakz6GB.js → input-CNTfI6YE.js} +2 -2
  42. package/dist/chunks/{input-Biakz6GB.js.map → input-CNTfI6YE.js.map} +1 -1
  43. package/dist/chunks/{input-group-DQqEPFj_.js → input-group-CYA1MEoZ.js} +2 -2
  44. package/dist/chunks/{input-group-DQqEPFj_.js.map → input-group-CYA1MEoZ.js.map} +1 -1
  45. package/dist/chunks/{iso-field-CznqNVrH.js → iso-field-1qmg7TP8.js} +2 -2
  46. package/dist/chunks/{iso-field-CznqNVrH.js.map → iso-field-1qmg7TP8.js.map} +1 -1
  47. package/dist/chunks/linear-scale-BWKeRqDX.js +37 -0
  48. package/dist/chunks/linear-scale-BWKeRqDX.js.map +1 -0
  49. package/dist/chunks/{link-tTapNTpM.js → link-vz9aV8WX.js} +9 -2
  50. package/dist/chunks/link-vz9aV8WX.js.map +1 -0
  51. package/dist/chunks/{list-CN8pO8lv.js → list-CzaiyNja.js} +119 -111
  52. package/dist/chunks/list-CzaiyNja.js.map +1 -0
  53. package/dist/chunks/{markdown-C-iJsYnd.js → markdown-5NyaHHfN.js} +6 -6
  54. package/dist/chunks/{markdown-C-iJsYnd.js.map → markdown-5NyaHHfN.js.map} +1 -1
  55. package/dist/chunks/{menu-OURWt_hD.js → menu-DyVPwgfF.js} +2 -2
  56. package/dist/chunks/{menu-OURWt_hD.js.map → menu-DyVPwgfF.js.map} +1 -1
  57. package/dist/chunks/nav-sheet-BIErlV74.js +58 -0
  58. package/dist/chunks/nav-sheet-BIErlV74.js.map +1 -0
  59. package/dist/chunks/{logo-VmXYhIJL.js → nav-wordmark-DLkItdvo.js} +12 -93
  60. package/dist/chunks/nav-wordmark-DLkItdvo.js.map +1 -0
  61. package/dist/chunks/observe-resize-DhxhmoyB.js +25 -0
  62. package/dist/chunks/observe-resize-DhxhmoyB.js.map +1 -0
  63. package/dist/chunks/{page-header-BIRswR73.js → page-header-CEPZzhRp.js} +2 -2
  64. package/dist/chunks/{page-header-BIRswR73.js.map → page-header-CEPZzhRp.js.map} +1 -1
  65. package/dist/chunks/{pagination-DYdLm18-.js → pagination-CCMxQ5pH.js} +3 -3
  66. package/dist/chunks/{pagination-DYdLm18-.js.map → pagination-CCMxQ5pH.js.map} +1 -1
  67. package/dist/chunks/{range-popup-AbRzgHtY.js → range-popup-DGOnGGag.js} +4 -4
  68. package/dist/chunks/{range-popup-AbRzgHtY.js.map → range-popup-DGOnGGag.js.map} +1 -1
  69. package/dist/chunks/resize-motion-CMaidkwe.js +101 -0
  70. package/dist/chunks/resize-motion-CMaidkwe.js.map +1 -0
  71. package/dist/chunks/{rights-CXo7zEf6.js → rights-BbiJ0AJB.js} +4 -4
  72. package/dist/chunks/{rights-CXo7zEf6.js.map → rights-BbiJ0AJB.js.map} +1 -1
  73. package/dist/chunks/{section-XStLtXKa.js → section-DzOLLN1p.js} +3 -3
  74. package/dist/chunks/section-DzOLLN1p.js.map +1 -0
  75. package/dist/chunks/{segmented-CDTx2n29.js → segmented-MrinfDL8.js} +36 -35
  76. package/dist/chunks/segmented-MrinfDL8.js.map +1 -0
  77. package/dist/chunks/select-Bc4kRiSG.js +227 -0
  78. package/dist/chunks/select-Bc4kRiSG.js.map +1 -0
  79. package/dist/chunks/{sidebar-C4fL_KMm.js → sidebar-5IA18LuP.js} +180 -183
  80. package/dist/chunks/sidebar-5IA18LuP.js.map +1 -0
  81. package/dist/chunks/{sidebar-menu-sd9vCpDy.js → sidebar-menu-DRWRxcJ3.js} +2 -2
  82. package/dist/chunks/{sidebar-menu-sd9vCpDy.js.map → sidebar-menu-DRWRxcJ3.js.map} +1 -1
  83. package/dist/chunks/{switch-CztLhA8F.js → switch-XMY_CQE-.js} +2 -2
  84. package/dist/chunks/{switch-CztLhA8F.js.map → switch-XMY_CQE-.js.map} +1 -1
  85. package/dist/chunks/{tag-BsmQ1xPj.js → tag-Dg89uYpV.js} +3 -3
  86. package/dist/chunks/{tag-BsmQ1xPj.js.map → tag-Dg89uYpV.js.map} +1 -1
  87. package/dist/chunks/{text-BPglS3vq.js → text--5MKh2G4.js} +3 -3
  88. package/dist/chunks/{text-BPglS3vq.js.map → text--5MKh2G4.js.map} +1 -1
  89. package/dist/chunks/{textarea-Bvk7N2bh.js → textarea-Cj8iR82R.js} +3 -3
  90. package/dist/chunks/{textarea-Bvk7N2bh.js.map → textarea-Cj8iR82R.js.map} +1 -1
  91. package/dist/chunks/theme-provider-DJhORMlc.js +72 -0
  92. package/dist/chunks/theme-provider-DJhORMlc.js.map +1 -0
  93. package/dist/chunks/tooltip-DEbCCsru.js +151 -0
  94. package/dist/chunks/tooltip-DEbCCsru.js.map +1 -0
  95. package/dist/chunks/{tooltip-root-DWhtAtFb.js → tooltip-root-DRd4ciUv.js} +2 -2
  96. package/dist/chunks/{tooltip-root-DWhtAtFb.js.map → tooltip-root-DRd4ciUv.js.map} +1 -1
  97. package/dist/chunks/use-layout-width-CbSDbRb0.js +28 -0
  98. package/dist/chunks/use-layout-width-CbSDbRb0.js.map +1 -0
  99. package/dist/chunks/use-scroll-margin-DfdTc_5D.js +26 -0
  100. package/dist/chunks/use-scroll-margin-DfdTc_5D.js.map +1 -0
  101. package/dist/chunks/use-truncated-CW0hByYt.js +24 -0
  102. package/dist/chunks/use-truncated-CW0hByYt.js.map +1 -0
  103. package/dist/chunks/{virtual-rows-BgMdVelU.js → virtual-rows-BZe49bKi.js} +2 -2
  104. package/dist/chunks/{virtual-rows-BgMdVelU.js.map → virtual-rows-BZe49bKi.js.map} +1 -1
  105. package/dist/chunks/{zh-CN-cPjO1OOo.js → zh-CN-C7GmVswt.js} +15 -15
  106. package/dist/chunks/zh-CN-C7GmVswt.js.map +1 -0
  107. package/dist/components/app-frame.js +3 -1
  108. package/dist/components/banner.js +1 -1
  109. package/dist/components/button-group.js +2 -2
  110. package/dist/components/button.js +1 -1
  111. package/dist/components/calendar.js +1 -1
  112. package/dist/components/charts/bar.js +78 -77
  113. package/dist/components/charts/bar.js.map +1 -1
  114. package/dist/components/charts/donut.js +2 -2
  115. package/dist/components/charts/gauge.js +1 -1
  116. package/dist/components/charts/sankey.js +1 -1
  117. package/dist/components/charts/timeseries.js +75 -75
  118. package/dist/components/charts/timeseries.js.map +1 -1
  119. package/dist/components/charts.js +1 -1
  120. package/dist/components/code-block.js +1 -1
  121. package/dist/components/code.js +1 -1
  122. package/dist/components/combobox.js +1 -1
  123. package/dist/components/command-palette.js +105 -97
  124. package/dist/components/command-palette.js.map +1 -1
  125. package/dist/components/copy-button.js +1 -1
  126. package/dist/components/data-table.js +94 -95
  127. package/dist/components/data-table.js.map +1 -1
  128. package/dist/components/date-picker.js +3 -3
  129. package/dist/components/date-picker.js.map +1 -1
  130. package/dist/components/dialog.js +141 -153
  131. package/dist/components/dialog.js.map +1 -1
  132. package/dist/components/display-options.js +5 -5
  133. package/dist/components/filter-chip.js +1 -1
  134. package/dist/components/flow.js +37 -36
  135. package/dist/components/flow.js.map +1 -1
  136. package/dist/components/icon-button.js +1 -1
  137. package/dist/components/icon.js +1 -1
  138. package/dist/components/input.js +5 -5
  139. package/dist/components/kaeso/conversation.js +2 -2
  140. package/dist/components/kaeso/identity.js +1 -1
  141. package/dist/components/kaeso/moments.js +3 -3
  142. package/dist/components/kaeso/rights.js +1 -1
  143. package/dist/components/kaeso/usage.js +1 -1
  144. package/dist/components/kaeso.js +4 -4
  145. package/dist/components/key-value.js +3 -3
  146. package/dist/components/link.js +1 -1
  147. package/dist/components/list.js +1 -1
  148. package/dist/components/logo.js +101 -1
  149. package/dist/components/logo.js.map +1 -0
  150. package/dist/components/markdown.js +1 -1
  151. package/dist/components/menu.js +1 -1
  152. package/dist/components/page-header.js +1 -1
  153. package/dist/components/pagination.js +1 -1
  154. package/dist/components/playground.js +8 -8
  155. package/dist/components/scroll-area.js +30 -23
  156. package/dist/components/scroll-area.js.map +1 -1
  157. package/dist/components/section.js +1 -1
  158. package/dist/components/segmented.js +1 -1
  159. package/dist/components/select.js +1 -1
  160. package/dist/components/sheet.js +46 -41
  161. package/dist/components/sheet.js.map +1 -1
  162. package/dist/components/sidebar.js +1 -1
  163. package/dist/components/stat.js +75 -76
  164. package/dist/components/stat.js.map +1 -1
  165. package/dist/components/switch.js +1 -1
  166. package/dist/components/tag.js +1 -1
  167. package/dist/components/text.js +1 -1
  168. package/dist/components/theme-image.js +38 -0
  169. package/dist/components/theme-image.js.map +1 -0
  170. package/dist/components/theme-menu.js +3 -3
  171. package/dist/components/theme-select.js +58 -0
  172. package/dist/components/theme-select.js.map +1 -0
  173. package/dist/components/toast.js +91 -92
  174. package/dist/components/toast.js.map +1 -1
  175. package/dist/components/tooltip.js +1 -1
  176. package/dist/i18n-provider.js +1 -1
  177. package/dist/index.js +76 -74
  178. package/dist/kaeso.css +39 -16
  179. package/dist/styles.css +1 -1
  180. package/dist/theme.js +1 -1
  181. package/dist/types/components/app-frame/app-frame.d.ts +2 -10
  182. package/dist/types/components/app-frame/docs.d.ts +1 -0
  183. package/dist/types/components/app-frame/index.d.ts +1 -0
  184. package/dist/types/components/app-frame/nav-sheet.d.ts +11 -0
  185. package/dist/types/components/charts/linear-scale.d.ts +17 -0
  186. package/dist/types/components/code/code.d.ts +16 -0
  187. package/dist/types/components/code/docs.d.ts +1 -0
  188. package/dist/types/components/code-block/code-block.d.ts +2 -0
  189. package/dist/types/components/code-block/docs.d.ts +4 -0
  190. package/dist/types/components/command-palette/command-palette.d.ts +1 -0
  191. package/dist/types/components/command-palette/docs.d.ts +1 -0
  192. package/dist/types/components/dialog/dialog.d.ts +5 -2
  193. package/dist/types/components/dialog/docs.d.ts +10 -0
  194. package/dist/types/components/dialog/index.d.ts +1 -0
  195. package/dist/types/components/dialog/scope.d.ts +9 -0
  196. package/dist/types/components/dialog/step-dialog.d.ts +9 -1
  197. package/dist/types/components/link/link.d.ts +8 -0
  198. package/dist/types/components/logo/nav-wordmark.d.ts +6 -0
  199. package/dist/types/components/scroll-area/scroll-area.d.ts +3 -3
  200. package/dist/types/components/theme-image/docs.d.ts +13 -0
  201. package/dist/types/components/theme-image/index.d.ts +1 -0
  202. package/dist/types/components/theme-image/theme-image.d.ts +23 -0
  203. package/dist/types/components/theme-select/docs.d.ts +10 -0
  204. package/dist/types/components/theme-select/index.d.ts +1 -0
  205. package/dist/types/components/theme-select/theme-select.d.ts +34 -0
  206. package/dist/types/icons/groups.d.ts +1 -1
  207. package/dist/types/icons/vocabulary.d.ts +5 -0
  208. package/dist/types/index.d.ts +2 -0
  209. package/dist/types/theme/theme-provider.d.ts +1 -1
  210. package/dist/types/utils/dialog-scope.d.ts +7 -0
  211. package/dist/types/utils/lazy-module.d.ts +7 -2
  212. package/dist/types/utils/observe-resize.d.ts +1 -0
  213. package/dist/types/utils/resize-motion.d.ts +2 -0
  214. package/foundations/motion.md +1 -0
  215. package/package.json +2 -2
  216. package/dist/chunks/app-frame-BBIMch8X.js +0 -224
  217. package/dist/chunks/app-frame-BBIMch8X.js.map +0 -1
  218. package/dist/chunks/code-DDyOlIFO.js +0 -23
  219. package/dist/chunks/code-DDyOlIFO.js.map +0 -1
  220. package/dist/chunks/code-block-BbK6E4Eo.js.map +0 -1
  221. package/dist/chunks/core-Bgefcs3z.js.map +0 -1
  222. package/dist/chunks/de-BCg1eRVd.js.map +0 -1
  223. package/dist/chunks/dialog-CVqSVk3T.js +0 -283
  224. package/dist/chunks/dialog-CVqSVk3T.js.map +0 -1
  225. package/dist/chunks/icon-Bha63LaN.js.map +0 -1
  226. package/dist/chunks/link-tTapNTpM.js.map +0 -1
  227. package/dist/chunks/list-CN8pO8lv.js.map +0 -1
  228. package/dist/chunks/logo-VmXYhIJL.js.map +0 -1
  229. package/dist/chunks/restore-focus-Cap1Q-R3.js +0 -19
  230. package/dist/chunks/restore-focus-Cap1Q-R3.js.map +0 -1
  231. package/dist/chunks/section-XStLtXKa.js.map +0 -1
  232. package/dist/chunks/segmented-CDTx2n29.js.map +0 -1
  233. package/dist/chunks/select-Ca3HGsN1.js +0 -223
  234. package/dist/chunks/select-Ca3HGsN1.js.map +0 -1
  235. package/dist/chunks/sidebar-C4fL_KMm.js.map +0 -1
  236. package/dist/chunks/theme-provider-mgUaQK7L.js +0 -69
  237. package/dist/chunks/theme-provider-mgUaQK7L.js.map +0 -1
  238. package/dist/chunks/tooltip-CDu00nzg.js +0 -124
  239. package/dist/chunks/tooltip-CDu00nzg.js.map +0 -1
  240. package/dist/chunks/use-layout-width-DZaLOQMT.js +0 -27
  241. package/dist/chunks/use-layout-width-DZaLOQMT.js.map +0 -1
  242. package/dist/chunks/use-scroll-margin-DWcfIXac.js +0 -25
  243. package/dist/chunks/use-scroll-margin-DWcfIXac.js.map +0 -1
  244. package/dist/chunks/use-truncated-DmQoePvG.js +0 -25
  245. package/dist/chunks/use-truncated-DmQoePvG.js.map +0 -1
  246. package/dist/chunks/zh-CN-cPjO1OOo.js.map +0 -1
@@ -24,6 +24,8 @@ export interface CodeBlockProps {
24
24
  code?: string | undefined;
25
25
  lang?: CodeLang | undefined;
26
26
  tabs?: CodeTab[] | undefined;
27
+ tab?: string | undefined;
28
+ onTabChange?: ((label: string) => void) | undefined;
27
29
  title?: ReactNode | undefined;
28
30
  lineNumbers?: boolean | undefined;
29
31
  highlightLines?: number[] | undefined;
@@ -9,6 +9,8 @@ export declare const docs: {
9
9
  lang: string;
10
10
  lineNumbers: string;
11
11
  surface: string;
12
+ onTabChange: string;
13
+ tab: string;
12
14
  tabs: string;
13
15
  title: string;
14
16
  wrap: string;
@@ -24,6 +26,8 @@ export declare const docs: {
24
26
  lang: string;
25
27
  lineNumbers: string;
26
28
  surface: string;
29
+ onTabChange: string;
30
+ tab: string;
27
31
  tabs: string;
28
32
  title: string;
29
33
  wrap: string;
@@ -37,6 +37,7 @@ export interface CommandPaletteProps {
37
37
  keyHints?: boolean | undefined;
38
38
  inline?: boolean | undefined;
39
39
  defaultQuery?: string | undefined;
40
+ query?: string | undefined;
40
41
  }
41
42
  export declare function CommandPalette(props: CommandPaletteProps): import("react/jsx-runtime").JSX.Element;
42
43
  export declare namespace CommandPalette {
@@ -12,6 +12,7 @@ export declare const docs: {
12
12
  onQueryChange: string;
13
13
  open: string;
14
14
  placeholder: string;
15
+ query: string;
15
16
  };
16
17
  };
17
18
  };
@@ -25,6 +25,7 @@ export interface DialogProps {
25
25
  trigger?: ReactElement | undefined;
26
26
  title: ReactNode;
27
27
  description?: ReactNode | undefined;
28
+ busy?: boolean | undefined;
28
29
  size?: keyof typeof KAESO_DIALOG_VARIANTS.size | undefined;
29
30
  children?: ReactNode | undefined;
30
31
  footer?: ReactNode | undefined;
@@ -35,7 +36,9 @@ export interface DialogProps {
35
36
  inline?: boolean | undefined;
36
37
  }
37
38
  declare function Close({ children }: {
38
- children: ReactElement;
39
+ children: ReactElement<{
40
+ disabled?: boolean | undefined;
41
+ }>;
39
42
  }): import("react/jsx-runtime").JSX.Element;
40
43
  declare namespace Close {
41
44
  var displayName: string;
@@ -71,7 +74,7 @@ export interface AlertDialogProps {
71
74
  description: ReactNode;
72
75
  confirmLabel: string;
73
76
  cancelLabel?: string | undefined;
74
- onConfirm: () => void | Promise<void>;
77
+ onConfirm: () => void | Promise<unknown>;
75
78
  tone?: keyof typeof KAESO_ALERT_DIALOG_VARIANTS.tone | undefined;
76
79
  confirmText?: string | undefined;
77
80
  loading?: boolean | undefined;
@@ -20,6 +20,7 @@ export declare const docs: {
20
20
  Dialog: {
21
21
  description: string;
22
22
  props: {
23
+ busy: string;
23
24
  children: string;
24
25
  defaultOpen: string;
25
26
  description: string;
@@ -35,9 +36,17 @@ export declare const docs: {
35
36
  trigger: string;
36
37
  };
37
38
  };
39
+ DialogScope: {
40
+ description: string;
41
+ props: {
42
+ children: string;
43
+ open: string;
44
+ };
45
+ };
38
46
  LayerDialog: {
39
47
  description: string;
40
48
  props: {
49
+ busy: string;
41
50
  defaultOpen: string;
42
51
  hideClose: string;
43
52
  inline: string;
@@ -59,6 +68,7 @@ export declare const docs: {
59
68
  onOpenChange: string;
60
69
  onSubmit: string;
61
70
  open: string;
71
+ result: string;
62
72
  size: string;
63
73
  steps: string;
64
74
  submitLabel: string;
@@ -1,2 +1,3 @@
1
1
  export * from "./dialog.js";
2
2
  export * from "./step-dialog.js";
3
+ export * from "./scope.js";
@@ -0,0 +1,9 @@
1
+ import { type ReactNode } from "react";
2
+ export interface DialogScopeProps {
3
+ open: boolean;
4
+ children: ReactNode;
5
+ }
6
+ export declare function DialogScope({ open, children }: DialogScopeProps): import("react/jsx-runtime").JSX.Element | null;
7
+ export declare namespace DialogScope {
8
+ var displayName: string;
9
+ }
@@ -7,6 +7,13 @@ export interface DialogStep {
7
7
  content: ReactNode;
8
8
  blockedReason?: string | undefined;
9
9
  }
10
+ export interface StepDialogResult {
11
+ title: ReactNode;
12
+ description?: ReactNode | undefined;
13
+ content: ReactNode;
14
+ footer: ReactNode;
15
+ size?: keyof typeof KAESO_DIALOG_VARIANTS.size | undefined;
16
+ }
10
17
  export interface StepDialogProps {
11
18
  open?: boolean | undefined;
12
19
  onOpenChange?: ((open: boolean) => void) | undefined;
@@ -19,8 +26,9 @@ export interface StepDialogProps {
19
26
  size?: keyof typeof KAESO_DIALOG_VARIANTS.size | undefined;
20
27
  inline?: boolean | undefined;
21
28
  defaultStep?: number | undefined;
29
+ result?: StepDialogResult | undefined;
22
30
  }
23
- export declare function StepDialog({ open, onOpenChange, title, steps, submitLabel, onSubmit, submitting, tone, size, inline, defaultStep, }: StepDialogProps): import("react/jsx-runtime").JSX.Element;
31
+ export declare function StepDialog({ open, onOpenChange, title, steps, submitLabel, onSubmit, submitting, tone, size, inline, defaultStep, result, }: StepDialogProps): import("react/jsx-runtime").JSX.Element;
24
32
  export declare namespace StepDialog {
25
33
  var displayName: string;
26
34
  }
@@ -13,6 +13,14 @@ export declare const KAESO_LINK_VARIANTS: {
13
13
  readonly classes: "font-medium text-fg no-underline hover:underline hover:decoration-line-strong hover:underline-offset-3";
14
14
  readonly description: "A link on its own line (“Team overview ›”)";
15
15
  };
16
+ readonly heading: {
17
+ readonly classes: "group/heading text-inherit no-underline";
18
+ readonly description: "A heading's link to itself: the heading's own look, with a # beside it on hover and keyboard focus";
19
+ };
20
+ readonly card: {
21
+ readonly classes: "mx-0 flex flex-col gap-4 rounded-well bg-fill-1 px-16 py-12 text-fg no-underline hover:bg-fill-2";
22
+ readonly description: "A page to read next: a filled well with the page's name and one sentence about it";
23
+ };
16
24
  };
17
25
  };
18
26
  export declare const KAESO_LINK_DEFAULT_VARIANTS: {
@@ -0,0 +1,6 @@
1
+ import { type SVGAttributes } from "react";
2
+ export interface NavWordmarkProps extends Omit<SVGAttributes<SVGSVGElement>, "children"> {
3
+ title?: string | undefined;
4
+ decorative?: boolean | undefined;
5
+ }
6
+ export declare const NavWordmark: import("react").ForwardRefExoticComponent<NavWordmarkProps & import("react").RefAttributes<SVGSVGElement>>;
@@ -2,15 +2,15 @@ import { type ReactNode } from "react";
2
2
  export declare const KAESO_SCROLL_AREA_VARIANTS: {
3
3
  readonly orientation: {
4
4
  readonly vertical: {
5
- readonly classes: "scroll-fade-y";
5
+ readonly classes: "scroll-axis-y scroll-fade-y";
6
6
  readonly description: "Scrolls up and down; the content fades at an edge with more to scroll to (default)";
7
7
  };
8
8
  readonly horizontal: {
9
- readonly classes: "scroll-fade-x";
9
+ readonly classes: "scroll-axis-x scroll-fade-x";
10
10
  readonly description: "Scrolls sideways";
11
11
  };
12
12
  readonly both: {
13
- readonly classes: "";
13
+ readonly classes: "scroll-axis-both";
14
14
  readonly description: "Both directions";
15
15
  };
16
16
  };
@@ -0,0 +1,13 @@
1
+ export declare const docs: {
2
+ ThemeImage: {
3
+ description: string;
4
+ props: {
5
+ alt: string;
6
+ "aria-describedby": string;
7
+ dark: string;
8
+ height: string;
9
+ light: string;
10
+ width: string;
11
+ };
12
+ };
13
+ };
@@ -0,0 +1 @@
1
+ export * from "./theme-image.js";
@@ -0,0 +1,23 @@
1
+ export declare const KAESO_THEME_IMAGE_VARIANTS: {
2
+ readonly theme: {
3
+ readonly light: {
4
+ readonly classes: "theme-light-only";
5
+ readonly description: "Shown in the light theme and in print";
6
+ };
7
+ readonly dark: {
8
+ readonly classes: "theme-dark-only";
9
+ readonly description: "Shown in the dark theme";
10
+ };
11
+ };
12
+ };
13
+ export declare const KAESO_THEME_IMAGE_DEFAULT_VARIANTS: {};
14
+ export interface ThemeImageProps {
15
+ light: string;
16
+ dark: string;
17
+ alt: string;
18
+ width?: number | undefined;
19
+ height?: number | undefined;
20
+ className?: string | undefined;
21
+ "aria-describedby"?: string | undefined;
22
+ }
23
+ export declare const ThemeImage: import("react").ForwardRefExoticComponent<ThemeImageProps & import("react").RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,10 @@
1
+ export declare const docs: {
2
+ ThemeSelect: {
3
+ description: string;
4
+ props: {
5
+ appearance: string;
6
+ fullWidth: string;
7
+ size: string;
8
+ };
9
+ };
10
+ };
@@ -0,0 +1 @@
1
+ export * from "./theme-select.js";
@@ -0,0 +1,34 @@
1
+ export declare const KAESO_THEME_SELECT_VARIANTS: {
2
+ readonly appearance: {
3
+ readonly ghost: {
4
+ readonly classes: "";
5
+ readonly description: "A quiet pill for sidebars and toolbars (default)";
6
+ };
7
+ readonly default: {
8
+ readonly classes: "";
9
+ readonly description: "A raised pill with a ring";
10
+ };
11
+ };
12
+ readonly size: {
13
+ readonly sm: {
14
+ readonly classes: "";
15
+ readonly description: "32px (default)";
16
+ };
17
+ readonly md: {
18
+ readonly classes: "";
19
+ readonly description: "36px";
20
+ };
21
+ };
22
+ };
23
+ export declare const KAESO_THEME_SELECT_DEFAULT_VARIANTS: {
24
+ readonly appearance: "ghost";
25
+ readonly size: "sm";
26
+ };
27
+ export interface ThemeSelectProps {
28
+ appearance?: keyof typeof KAESO_THEME_SELECT_VARIANTS.appearance | undefined;
29
+ size?: keyof typeof KAESO_THEME_SELECT_VARIANTS.size | undefined;
30
+ fullWidth?: boolean | undefined;
31
+ className?: string | undefined;
32
+ "data-force"?: string | undefined;
33
+ }
34
+ export declare const ThemeSelect: import("react").ForwardRefExoticComponent<ThemeSelectProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -1,5 +1,5 @@
1
1
  export declare const ICON_GROUPS: {
2
- readonly "Kaeso objects": readonly ["key", "providerKey", "project", "organization", "model", "playground", "alias", "limit", "budget", "requestLog", "usage", "member", "members", "serviceAccount", "settings", "audit", "instance", "provider", "route", "gateway", "database", "security", "session", "overview", "chart", "home"];
2
+ readonly "Kaeso objects": readonly ["key", "providerKey", "project", "organization", "model", "playground", "alias", "limit", "budget", "requestLog", "usage", "member", "members", "serviceAccount", "settings", "audit", "instance", "provider", "route", "gateway", "database", "update", "security", "session", "overview", "chart", "home"];
3
3
  readonly Capabilities: readonly ["tools", "reasoning", "vision", "pdf", "structuredOutput"];
4
4
  readonly Actions: readonly ["signOut", "copy", "externalLink", "openExternal", "add", "close", "edit", "delete", "download", "upload", "refresh", "retry", "search", "filter", "displayOptions", "more", "menu", "sort", "switcher", "expand", "collapse", "show", "hide", "reveal", "sidebar", "sidePanel", "list", "board", "stack"];
5
5
  readonly Status: readonly ["check", "success", "warning", "error", "info", "minus", "notification"];
@@ -104,6 +104,11 @@ export declare const icons: {
104
104
  }][] | readonly (readonly [string, {
105
105
  readonly [key: string]: string | number;
106
106
  }])[];
107
+ readonly update: [string, {
108
+ [key: string]: string | number;
109
+ }][] | readonly (readonly [string, {
110
+ readonly [key: string]: string | number;
111
+ }])[];
107
112
  readonly security: [string, {
108
113
  [key: string]: string | number;
109
114
  }][] | readonly (readonly [string, {
@@ -41,6 +41,8 @@ export * from "./components/skeleton/index.js";
41
41
  export * from "./components/sidebar/index.js";
42
42
  export * from "./components/app-frame/index.js";
43
43
  export * from "./components/theme-menu/index.js";
44
+ export * from "./components/theme-select/index.js";
45
+ export * from "./components/theme-image/index.js";
44
46
  export * from "./components/calendar/index.js";
45
47
  export * from "./components/date-picker/index.js";
46
48
  export * from "./components/filter-chip/index.js";
@@ -3,7 +3,7 @@ export type ThemePreference = "system" | "light" | "dark";
3
3
  export type ResolvedTheme = "light" | "dark";
4
4
  export declare const THEME_STORAGE_KEY = "kaeso:theme";
5
5
  export declare function installFocusModality(): void;
6
- export declare const themeScript = "(function(){var d=document.documentElement;try{var t=localStorage.getItem(\"kaeso:theme\");if(t===\"light\"||t===\"dark\"){d.setAttribute(\"data-theme\",t)}}catch(e){}if(!window.__kModality){window.__kModality=1;document.addEventListener(\"pointerdown\",function(){d.setAttribute(\"data-k-pointer\",\"\")},true);document.addEventListener(\"keydown\",function(e){if(!e.metaKey&&!e.ctrlKey&&!e.altKey){d.removeAttribute(\"data-k-pointer\")}},true)}})();";
6
+ export declare const themeScript: string;
7
7
  interface ThemeContextValue {
8
8
  theme: ThemePreference;
9
9
  resolvedTheme: ResolvedTheme;
@@ -0,0 +1,7 @@
1
+ export interface DialogScopeTracker {
2
+ showing: (id: string) => void;
3
+ hidden: (id: string) => void;
4
+ }
5
+ export declare const DialogScopeContext: import("react").Context<DialogScopeTracker | null>;
6
+ export declare function useScopedDialog(open: boolean | undefined): (open: boolean) => void;
7
+ export declare function useOpenSession(open: boolean): number;
@@ -3,6 +3,11 @@ export interface LazyModule<T> {
3
3
  load: () => Promise<T>;
4
4
  }
5
5
  export declare function lazyModulesSettled(): Promise<void>;
6
- export declare function lazyModule<T>(load: () => Promise<T>): LazyModule<T>;
6
+ export interface LazyModuleOptions<T> {
7
+ base?: (() => string) | undefined;
8
+ reimport?: ((url: string) => Promise<T>) | undefined;
9
+ }
10
+ export declare function lazyModule<T>(load: () => Promise<T>, { base, reimport }?: LazyModuleOptions<T>): LazyModule<T>;
7
11
  export declare function preload<T>(m: LazyModule<T>): void;
8
- export declare function useLazyModule<T>(m: LazyModule<T>, wanted: boolean): T | undefined;
12
+ export declare function useLazyModule<T>(m: LazyModule<T>, wanted: boolean, onFail?: (() => void) | undefined): T | undefined;
13
+ export declare function useLazyModuleRetried<T>(m: LazyModule<T>, wanted: boolean): [T | undefined, () => void];
@@ -0,0 +1 @@
1
+ export declare function observeResize(targets: Iterable<Element>, onResize: (entries: readonly ResizeObserverEntry[]) => void): () => void;
@@ -0,0 +1,2 @@
1
+ export declare function resizeSources(box: Element): Element[];
2
+ export declare function useResizeMotion(box: HTMLElement | null, onSettle?: (() => void) | undefined): void;
@@ -33,6 +33,7 @@ Loading keeps one beat of 800ms on the pulse easing. The spinner is three routes
33
33
  ## Rules
34
34
 
35
35
  - Overlays scale from 0.96 and fade from their trigger; dialogs from 0.98 in the center; sheets slide from their edge.
36
+ - A dialog whose content changes stays centered and grows or shrinks to its new size from the size it has, in `--k-duration-dialog` on the `standard` curve; a sheet from the bottom grows upwards. Keep one dialog open through a task, and change its content, rather than closing one dialog and opening another.
36
37
  - No page-enter animation and no loops but loading's.
37
38
  - Never `transition: all`; only the properties that change.
38
39
  - With reduced motion, transforms are removed and only opacity changes remain.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logicplanes/kaeso-ui",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Kaeso's UI library: React components on Base UI, Tailwind CSS v4 and the Kaeso tokens.",
5
5
  "license": "MIT",
6
6
  "author": "Devin Oldenburg",
@@ -102,7 +102,7 @@
102
102
  "shiki": "4.4.3",
103
103
  "tailwind-merge": "3.7.0",
104
104
  "uqr": "0.1.3",
105
- "@logicplanes/kaeso-tokens": "0.1.0"
105
+ "@logicplanes/kaeso-tokens": "0.2.0"
106
106
  },
107
107
  "devDependencies": {
108
108
  "@hugeicons/core-free-icons": "4.3.5",
@@ -1,224 +0,0 @@
1
- "use client";
2
- import { t as e } from "./cn-CidVUKMm.js";
3
- import { r as t } from "./portal-context-BBbzDKmY.js";
4
- import { t as n } from "./inset-BLMdxX4I.js";
5
- import { i as r } from "./context-BELWW79w.js";
6
- import { a as i } from "./button-BHKAE6ui.js";
7
- import { t as a } from "./icon-button-Bw67oKtx.js";
8
- import { c as o, l as s, s as c, t as l } from "./sidebar-C4fL_KMm.js";
9
- import { createContext as u, forwardRef as d, useContext as f, useEffect as p, useId as m, useRef as h, useState as g } from "react";
10
- import { jsx as _, jsxs as v } from "react/jsx-runtime";
11
- import { SidebarLeftIcon as y } from "@hugeicons/core-free-icons";
12
- import { Dialog as b } from "@base-ui/react/dialog";
13
- //#region src/components/app-frame/app-frame.tsx
14
- var x = { fill: {
15
- screen: { classes: "h-dvh" },
16
- parent: { classes: "h-full" }
17
- } }, S = { fill: "screen" }, C = /* @__PURE__ */ u({
18
- openNav: () => void 0,
19
- embedded: !1
20
- }), w = () => f(C), T = /* @__PURE__ */ d(function({ sidebar: t, children: n, corner: r, fill: i = "screen", brandHref: a, brandLabel: o, className: s }, c) {
21
- let [l, u] = g(!1), d = h(null), f = `k-main-${m().replace(/[^\w-]/g, "")}`, p = i === "screen" ? "main" : "div";
22
- return /* @__PURE__ */ v(C.Provider, {
23
- value: {
24
- openNav: () => u(!0),
25
- embedded: i === "parent"
26
- },
27
- children: [/* @__PURE__ */ v("div", {
28
- ref: c,
29
- className: e("relative isolate flex w-full flex-col overflow-hidden bg-chrome text-fg lg:flex-row", x.fill[i].classes, s),
30
- children: [
31
- /* @__PURE__ */ _(E, { target: f }),
32
- /* @__PURE__ */ _("div", {
33
- className: "hidden h-full lg:flex",
34
- children: t
35
- }),
36
- /* @__PURE__ */ _(D, {
37
- banner: i === "screen",
38
- href: a,
39
- label: o,
40
- open: l,
41
- onOpen: () => u(!0),
42
- toggleRef: d
43
- }),
44
- /* @__PURE__ */ _(p, {
45
- id: f,
46
- className: "relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-panel outline-none safe-area-panel lg:my-8 lg:mr-8 lg:rounded-panel lg:shadow-panel",
47
- children: n
48
- }),
49
- r && /* @__PURE__ */ _("div", {
50
- className: "fixed right-16 bottom-16 z-10 flex items-center gap-8",
51
- children: r
52
- })
53
- ]
54
- }), /* @__PURE__ */ _(A, {
55
- navOpen: l,
56
- setNavOpen: u,
57
- returnFocus: d,
58
- children: t
59
- })]
60
- });
61
- });
62
- process.env.NODE_ENV !== "production" && (T.displayName = "AppFrame");
63
- function E({ target: t }) {
64
- let n = r();
65
- return /* @__PURE__ */ _("a", {
66
- href: `#${t}`,
67
- onClick: (e) => {
68
- let n = document.getElementById(t);
69
- n && (e.preventDefault(), n.setAttribute("tabindex", "-1"), n.addEventListener("blur", () => n.removeAttribute("tabindex"), { once: !0 }), n.focus());
70
- },
71
- className: e(i({ size: "sm" }), "absolute top-8 left-8 z-50 not-focus:sr-only"),
72
- children: n("appFrame.skipToContent", "Skip to content")
73
- });
74
- }
75
- process.env.NODE_ENV !== "production" && (E.displayName = "AppFrame.SkipLink");
76
- function D({ banner: e, href: t, label: n, open: i, onOpen: o, toggleRef: s }) {
77
- let c = e ? "header" : "div", u = r();
78
- return /* @__PURE__ */ _(c, {
79
- "data-phone-bar": "",
80
- className: "shrink-0 bg-panel safe-area-bar lg:hidden",
81
- children: /* @__PURE__ */ v("div", {
82
- className: "mt-8 flex h-52 items-center justify-between pr-20 pl-28",
83
- children: [/* @__PURE__ */ _(l, {
84
- href: t,
85
- label: n
86
- }), /* @__PURE__ */ _(a, {
87
- ref: s,
88
- icon: y,
89
- "aria-label": u("appFrame.openNavigation", "Open navigation"),
90
- "aria-haspopup": "dialog",
91
- "aria-expanded": i,
92
- tooltip: !1,
93
- onClick: o
94
- })]
95
- })
96
- });
97
- }
98
- process.env.NODE_ENV !== "production" && (D.displayName = "AppFrame.PhoneBar");
99
- function O({ open: e, onOpenChange: n, peek: i = !1, returnFocus: a, children: s }) {
100
- let l = h(void 0), u = r();
101
- return p(() => {
102
- if (!e || i || typeof window > "u") return;
103
- let t = window.matchMedia("(min-width: 1024px)"), r = () => t.matches && n(!1);
104
- return r(), t.addEventListener("change", r), () => t.removeEventListener("change", r);
105
- }, [
106
- e,
107
- i,
108
- n
109
- ]), /* @__PURE__ */ _(b.Root, {
110
- open: e,
111
- onOpenChange: (e) => n(e),
112
- modal: !i,
113
- children: /* @__PURE__ */ v(b.Portal, {
114
- container: t(),
115
- children: [/* @__PURE__ */ _(b.Backdrop, { className: "fixed inset-0 z-40 bg-overlay opacity-60 backdrop-motion" }), /* @__PURE__ */ _(b.Popup, {
116
- "aria-label": u("appFrame.navigation", "Navigation"),
117
- "data-side": "left",
118
- initialFocus: !i,
119
- ...a ? { finalFocus: a } : {},
120
- className: "fixed top-0 bottom-0 left-0 z-40 flex overflow-hidden rounded-r-sheet bg-chrome shadow-dialog outline-none safe-area-sheet sheet-motion",
121
- onClick: (e) => {
122
- e.target.closest("a[href]") && n(!1);
123
- },
124
- onPointerEnter: () => clearTimeout(l.current),
125
- onPointerLeave: () => {
126
- i && (l.current = setTimeout(() => n(!1), 160));
127
- },
128
- children: /* @__PURE__ */ _(c.Provider, {
129
- value: !0,
130
- children: /* @__PURE__ */ _(o.Provider, {
131
- value: {
132
- close: () => n(!1),
133
- peek: i
134
- },
135
- children: s
136
- })
137
- })
138
- })]
139
- })
140
- });
141
- }
142
- process.env.NODE_ENV !== "production" && (O.displayName = "NavSheet");
143
- var k = 750;
144
- function A({ navOpen: e, setNavOpen: t, returnFocus: n, children: r }) {
145
- let { peeking: i, setPeeking: a } = s();
146
- return /* @__PURE__ */ _(O, {
147
- open: e || i,
148
- peek: i && !e,
149
- ...e ? { returnFocus: n } : {},
150
- onOpenChange: (e) => {
151
- e || (t(!1), a(!1));
152
- },
153
- children: r
154
- });
155
- }
156
- function j({ className: t }) {
157
- let { openNav: n } = w(), { collapsed: i, setCollapsed: o, setPeeking: c } = s(), l = h(void 0), u = r(), d = () => typeof window < "u" && window.matchMedia("(min-width: 1024px)").matches;
158
- return /* @__PURE__ */ _(a, {
159
- onPointerEnter: () => {
160
- i && d() && (l.current = setTimeout(() => c(!0), 750));
161
- },
162
- onPointerLeave: () => clearTimeout(l.current),
163
- icon: y,
164
- "data-sidebar-expand": "",
165
- "aria-label": i ? u("appFrame.expandSidebar", "Expand sidebar") : u("appFrame.openNavigation", "Open navigation"),
166
- shortcut: i ? ["["] : void 0,
167
- onClick: () => {
168
- clearTimeout(l.current), i && d() ? o(!1) : n();
169
- },
170
- className: e("hidden", i && "lg:inline-flex", t)
171
- });
172
- }
173
- process.env.NODE_ENV !== "production" && (j.displayName = "AppFrame.MenuButton");
174
- var M = { padding: {
175
- none: { classes: "" },
176
- list: { classes: "pt-8 pb-24" },
177
- page: { classes: "px-24 pt-16 pb-48" }
178
- } }, N = { padding: "none" }, P = /* @__PURE__ */ d(function({ className: t, padding: n = "none", ...r }, i) {
179
- return /* @__PURE__ */ _("div", {
180
- ref: i,
181
- className: e("min-h-0 flex-1 overflow-y-auto overscroll-contain scrollbar-quiet", M.padding[n].classes, t),
182
- ...r
183
- });
184
- });
185
- process.env.NODE_ENV !== "production" && (P.displayName = "AppFrame.Body");
186
- var F = /* @__PURE__ */ d(function({ title: t, description: r, actions: i, className: a, children: o, ...s }, c) {
187
- return /* @__PURE__ */ v(P, {
188
- ref: c,
189
- className: "relative",
190
- children: [/* @__PURE__ */ _(j, { className: "absolute top-10 left-12 z-10" }), /* @__PURE__ */ v("div", {
191
- className: e("mx-auto w-full max-w-settings px-24 pt-64 pb-96", a),
192
- ...s,
193
- children: [/* @__PURE__ */ v("header", {
194
- className: "flex flex-col gap-8",
195
- children: [/* @__PURE__ */ v("div", {
196
- className: "flex items-start justify-between gap-16",
197
- children: [/* @__PURE__ */ _("h1", {
198
- className: "min-w-0 text-title-lg font-semibold text-fg text-balance",
199
- children: t
200
- }), i && /* @__PURE__ */ _("div", {
201
- className: "flex h-34 shrink-0 items-center gap-8",
202
- children: i
203
- })]
204
- }), r && /* @__PURE__ */ _("p", {
205
- className: "text-body-lg font-regular text-fg-secondary",
206
- children: r
207
- })]
208
- }), /* @__PURE__ */ _("div", {
209
- className: "mt-8",
210
- children: /* @__PURE__ */ _(n, { children: o })
211
- })]
212
- })]
213
- });
214
- });
215
- process.env.NODE_ENV !== "production" && (F.displayName = "AppFrame.Settings");
216
- var I = /* @__PURE__ */ Object.assign(T, {
217
- MenuButton: j,
218
- Body: P,
219
- Settings: F
220
- });
221
- //#endregion
222
- export { x as a, w as c, S as i, N as n, O as o, M as r, k as s, I as t };
223
-
224
- //# sourceMappingURL=app-frame-BBIMch8X.js.map