@logicplanes/kaeso-ui 0.7.0 → 0.7.1-rc.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 (161) hide show
  1. package/LICENSE-Apache-2.0.txt +202 -0
  2. package/NOTICE.md +11 -1
  3. package/ai/component-guides.md +36 -2
  4. package/ai/component-registry.json +74 -5
  5. package/ai/component-registry.md +21 -6
  6. package/ai/icons.md +2 -2
  7. package/ai/tokens.md +1 -1
  8. package/dist/chunks/{app-frame-DibcP3SK.js → app-frame-tZReKtCM.js} +3 -3
  9. package/dist/chunks/{app-frame-DibcP3SK.js.map → app-frame-tZReKtCM.js.map} +1 -1
  10. package/dist/chunks/badge-DC-RFkFg.js +27 -0
  11. package/dist/chunks/badge-DC-RFkFg.js.map +1 -0
  12. package/dist/chunks/collapsible-BdwAesRa.js +53 -0
  13. package/dist/chunks/collapsible-BdwAesRa.js.map +1 -0
  14. package/dist/chunks/combobox-BdgWE05R.js +366 -0
  15. package/dist/chunks/combobox-BdgWE05R.js.map +1 -0
  16. package/dist/chunks/command-list-DFd-joEV.js +455 -0
  17. package/dist/chunks/command-list-DFd-joEV.js.map +1 -0
  18. package/dist/chunks/{command-palette-BEIK_hv9.js → command-palette-QsmneiR8.js} +2 -2
  19. package/dist/chunks/{command-palette-BEIK_hv9.js.map → command-palette-QsmneiR8.js.map} +1 -1
  20. package/dist/chunks/{core-B8c9Bty0.js → core-DSGLmc13.js} +19 -18
  21. package/dist/chunks/core-DSGLmc13.js.map +1 -0
  22. package/dist/chunks/{dashboard-Cuv86JNj.js → dashboard-B7ltvQ3f.js} +9 -8
  23. package/dist/chunks/dashboard-B7ltvQ3f.js.map +1 -0
  24. package/dist/chunks/data-table-YrA9Py2c.js +682 -0
  25. package/dist/chunks/data-table-YrA9Py2c.js.map +1 -0
  26. package/dist/chunks/{de-QtAgHLnQ.js → de-K_t_sSKN.js} +4 -1
  27. package/dist/chunks/de-K_t_sSKN.js.map +1 -0
  28. package/dist/chunks/{display-options-DZqFG-ly.js → display-options-Cw7rD12V.js} +2 -2
  29. package/dist/chunks/{display-options-DZqFG-ly.js.map → display-options-Cw7rD12V.js.map} +1 -1
  30. package/dist/chunks/{domain-BqNtp2rQ.js → domain-DLRk0kME.js} +2 -2
  31. package/dist/chunks/{domain-BqNtp2rQ.js.map → domain-DLRk0kME.js.map} +1 -1
  32. package/dist/chunks/figures-D_Tsrwwj.js +22 -0
  33. package/dist/chunks/figures-D_Tsrwwj.js.map +1 -0
  34. package/dist/chunks/{filter-chip-KMkD6acL.js → filter-chip-BMytSUWo.js} +4 -4
  35. package/dist/chunks/{filter-chip-KMkD6acL.js.map → filter-chip-BMytSUWo.js.map} +1 -1
  36. package/dist/chunks/icon-BMsYY158.js +110 -0
  37. package/dist/chunks/icon-BMsYY158.js.map +1 -0
  38. package/dist/chunks/{identity-DCNUQgql.js → identity-DjH8c9Qf.js} +784 -161
  39. package/dist/chunks/identity-DjH8c9Qf.js.map +1 -0
  40. package/dist/chunks/kaeso-P0VRfSI7.js +571 -0
  41. package/dist/chunks/kaeso-P0VRfSI7.js.map +1 -0
  42. package/dist/chunks/{list-Bhtqsv9E.js → list-0pRnkcpL.js} +155 -154
  43. package/dist/chunks/list-0pRnkcpL.js.map +1 -0
  44. package/dist/chunks/menu-BMry4pQ-.js +461 -0
  45. package/dist/chunks/menu-BMry4pQ-.js.map +1 -0
  46. package/dist/chunks/{meter-YuCR1Pjd.js → meter-D2ynBSmy.js} +2 -2
  47. package/dist/chunks/{meter-YuCR1Pjd.js.map → meter-D2ynBSmy.js.map} +1 -1
  48. package/dist/chunks/{nav-sheet-CQfZ7w_q.js → nav-sheet-B0o-icmO.js} +2 -2
  49. package/dist/chunks/{nav-sheet-CQfZ7w_q.js.map → nav-sheet-B0o-icmO.js.map} +1 -1
  50. package/dist/chunks/{page-header-C92GBvns.js → page-header-DiH555lF.js} +2 -2
  51. package/dist/chunks/{page-header-C92GBvns.js.map → page-header-DiH555lF.js.map} +1 -1
  52. package/dist/chunks/{picker-popover-icF27914.js → picker-popover-DAnkZmge.js} +3 -3
  53. package/dist/chunks/{picker-popover-icF27914.js.map → picker-popover-DAnkZmge.js.map} +1 -1
  54. package/dist/chunks/{rights-C44EtmsG.js → rights-C6gfyqsY.js} +3 -3
  55. package/dist/chunks/{rights-C44EtmsG.js.map → rights-C6gfyqsY.js.map} +1 -1
  56. package/dist/chunks/{select-B3eoWXfR.js → select-DQzn7_Fs.js} +2 -2
  57. package/dist/chunks/{select-B3eoWXfR.js.map → select-DQzn7_Fs.js.map} +1 -1
  58. package/dist/chunks/{sidebar-BnIqRDVN.js → sidebar-Bbm__0Nk.js} +2 -2
  59. package/dist/chunks/{sidebar-BnIqRDVN.js.map → sidebar-Bbm__0Nk.js.map} +1 -1
  60. package/dist/chunks/{sidebar-menu-CSElX37g.js → sidebar-menu-CycUvTPc.js} +2 -2
  61. package/dist/chunks/{sidebar-menu-CSElX37g.js.map → sidebar-menu-CycUvTPc.js.map} +1 -1
  62. package/dist/chunks/stat-CtOxD2Jk.js +240 -0
  63. package/dist/chunks/stat-CtOxD2Jk.js.map +1 -0
  64. package/dist/chunks/{styles-CklJ8C7c.js → styles-CN0ovMB2.js} +2 -2
  65. package/dist/chunks/{styles-CklJ8C7c.js.map → styles-CN0ovMB2.js.map} +1 -1
  66. package/dist/chunks/{swap-value-TlZecHRF.js → swap-value-ClhwTe97.js} +2 -2
  67. package/dist/chunks/swap-value-ClhwTe97.js.map +1 -0
  68. package/dist/chunks/{theme-menu-BgltuBqB.js → theme-menu-DmEo4nXz.js} +2 -2
  69. package/dist/chunks/{theme-menu-BgltuBqB.js.map → theme-menu-DmEo4nXz.js.map} +1 -1
  70. package/dist/chunks/{timeseries-h7XdvYTo.js → timeseries-CrpFP8va.js} +4 -4
  71. package/dist/chunks/{timeseries-h7XdvYTo.js.map → timeseries-CrpFP8va.js.map} +1 -1
  72. package/dist/chunks/{tooltip-OySqu0Bq.js → tooltip-DdZgOME7.js} +35 -35
  73. package/dist/chunks/tooltip-DdZgOME7.js.map +1 -0
  74. package/dist/chunks/vendor-marks-DF2Thhge.js +2052 -0
  75. package/dist/chunks/vendor-marks-DF2Thhge.js.map +1 -0
  76. package/dist/chunks/{zh-CN-8ZWE79zI.js → zh-CN-By8VGCbn.js} +4 -1
  77. package/dist/chunks/zh-CN-By8VGCbn.js.map +1 -0
  78. package/dist/components/app-frame.js +1 -1
  79. package/dist/components/badge.js +1 -1
  80. package/dist/components/charts/bar.js +3 -3
  81. package/dist/components/charts/donut.js +2 -2
  82. package/dist/components/charts/heatmap.js +2 -2
  83. package/dist/components/charts/sankey.js +3 -3
  84. package/dist/components/charts/sparkline.js +1 -1
  85. package/dist/components/charts/timeseries.js +1 -1
  86. package/dist/components/charts.js +2 -2
  87. package/dist/components/collapsible.js +1 -1
  88. package/dist/components/combobox.js +1 -1
  89. package/dist/components/command-palette.js +1 -1
  90. package/dist/components/dashboard/legend.js +22 -20
  91. package/dist/components/dashboard/legend.js.map +1 -1
  92. package/dist/components/dashboard/metric-tabs.js +66 -65
  93. package/dist/components/dashboard/metric-tabs.js.map +1 -1
  94. package/dist/components/dashboard/model-card.js +37 -36
  95. package/dist/components/dashboard/model-card.js.map +1 -1
  96. package/dist/components/dashboard/rank-list.js +1 -1
  97. package/dist/components/dashboard/rank-list.js.map +1 -1
  98. package/dist/components/dashboard.js +1 -1
  99. package/dist/components/data-table.js +1 -1
  100. package/dist/components/display-options.js +1 -1
  101. package/dist/components/filter-chip.js +1 -1
  102. package/dist/components/flow-canvas.js +1 -1
  103. package/dist/components/icon.js +1 -1
  104. package/dist/components/kaeso/conversation.js +1 -1
  105. package/dist/components/kaeso/identity.js +1 -1
  106. package/dist/components/kaeso/rights.js +1 -1
  107. package/dist/components/kaeso/usage.js +4 -4
  108. package/dist/components/kaeso.js +7 -7
  109. package/dist/components/list.js +1 -1
  110. package/dist/components/menu.js +2 -2
  111. package/dist/components/meter.js +1 -1
  112. package/dist/components/page-header.js +1 -1
  113. package/dist/components/playground.js +661 -656
  114. package/dist/components/playground.js.map +1 -1
  115. package/dist/components/select.js +1 -1
  116. package/dist/components/sidebar.js +1 -1
  117. package/dist/components/stat.js +1 -1
  118. package/dist/components/theme-menu.js +1 -1
  119. package/dist/i18n-provider.js +1 -1
  120. package/dist/index.js +28 -28
  121. package/dist/styles.css +1 -1
  122. package/dist/types/components/charts/marks.d.ts +0 -1
  123. package/dist/types/components/dashboard/swap-value.d.ts +0 -1
  124. package/dist/types/components/kaeso/docs.d.ts +11 -0
  125. package/dist/types/components/kaeso/identity.d.ts +29 -4
  126. package/dist/types/components/kaeso/index.d.ts +8 -2
  127. package/dist/types/components/kaeso/model-makers.d.ts +545 -0
  128. package/dist/types/components/kaeso/source-badge.d.ts +46 -0
  129. package/dist/types/components/kaeso/vendor-marks.d.ts +2 -0
  130. package/dist/types/components/menu/styles.d.ts +1 -1
  131. package/dist/types/icons/groups.d.ts +1 -1
  132. package/dist/types/icons/vocabulary.d.ts +10 -0
  133. package/dist/types/utils/figures.d.ts +3 -0
  134. package/foundations/typography.md +1 -1
  135. package/package.json +3 -2
  136. package/dist/chunks/badge-C6H9NlNw.js +0 -26
  137. package/dist/chunks/badge-C6H9NlNw.js.map +0 -1
  138. package/dist/chunks/collapsible-BFoDXP0y.js +0 -52
  139. package/dist/chunks/collapsible-BFoDXP0y.js.map +0 -1
  140. package/dist/chunks/combobox-B8GjFlO4.js +0 -365
  141. package/dist/chunks/combobox-B8GjFlO4.js.map +0 -1
  142. package/dist/chunks/command-list-ttU7YLEl.js +0 -454
  143. package/dist/chunks/command-list-ttU7YLEl.js.map +0 -1
  144. package/dist/chunks/core-B8c9Bty0.js.map +0 -1
  145. package/dist/chunks/dashboard-Cuv86JNj.js.map +0 -1
  146. package/dist/chunks/data-table-BMopFMG6.js +0 -641
  147. package/dist/chunks/data-table-BMopFMG6.js.map +0 -1
  148. package/dist/chunks/de-QtAgHLnQ.js.map +0 -1
  149. package/dist/chunks/icon-UqUodbsN.js +0 -108
  150. package/dist/chunks/icon-UqUodbsN.js.map +0 -1
  151. package/dist/chunks/identity-DCNUQgql.js.map +0 -1
  152. package/dist/chunks/kaeso-C-E-8Dxz.js +0 -506
  153. package/dist/chunks/kaeso-C-E-8Dxz.js.map +0 -1
  154. package/dist/chunks/list-Bhtqsv9E.js.map +0 -1
  155. package/dist/chunks/menu-Bl7vzB52.js +0 -460
  156. package/dist/chunks/menu-Bl7vzB52.js.map +0 -1
  157. package/dist/chunks/stat-DuWKmxGr.js +0 -239
  158. package/dist/chunks/stat-DuWKmxGr.js.map +0 -1
  159. package/dist/chunks/swap-value-TlZecHRF.js.map +0 -1
  160. package/dist/chunks/tooltip-OySqu0Bq.js.map +0 -1
  161. package/dist/chunks/zh-CN-8ZWE79zI.js.map +0 -1
@@ -0,0 +1,46 @@
1
+ /** The tile is a provider tile, in the same four sizes. */
2
+ export declare const KAESO_SOURCE_BADGE_VARIANTS: {
3
+ readonly size: {
4
+ readonly sm: {
5
+ readonly classes: "size-16 rounded-cell";
6
+ readonly description: "16px, inside table cells";
7
+ };
8
+ readonly md: {
9
+ readonly classes: "size-20 rounded-avatar";
10
+ readonly description: "20px (default)";
11
+ };
12
+ readonly lg: {
13
+ readonly classes: "size-28 rounded-org";
14
+ readonly description: "28px";
15
+ };
16
+ readonly xl: {
17
+ readonly classes: "size-40 rounded-org";
18
+ readonly description: "40px: a source's own page";
19
+ };
20
+ };
21
+ };
22
+ export declare const KAESO_SOURCE_BADGE_DEFAULT_VARIANTS: {
23
+ readonly size: "md";
24
+ };
25
+ /**
26
+ * The marks of the clients and gateways that report to Kaeso as sources, on a 24px grid, drawn
27
+ * in the text colour. OpenRouter's is its provider mark; LiteLLM publishes no vector mark and
28
+ * HTTP is no product, so both show an icon.
29
+ */
30
+ export declare const SOURCE_MARKS: Readonly<Record<string, string>>;
31
+ /** Each kind's product name, which no language translates. */
32
+ export declare const SOURCE_NAMES: Readonly<Record<string, string>>;
33
+ export interface SourceBadgeProps {
34
+ /** The source's kind, such as `claude_code`; a kind without a mark shows the source icon. */
35
+ kind: string;
36
+ /** The name beside the tile, or the tile's accessible name; the kind's product name by default. */
37
+ name?: string | undefined;
38
+ size?: keyof typeof KAESO_SOURCE_BADGE_VARIANTS.size | undefined;
39
+ /** Shows the name beside the tile. */
40
+ withName?: boolean | undefined;
41
+ /** Hides the tile from assistive technology, where the text beside it already names the client. */
42
+ decorative?: boolean | undefined;
43
+ className?: string | undefined;
44
+ }
45
+ /** A source's client as a tile the size of a provider's, with its mark in the text colour, and its name beside it. */
46
+ export declare const SourceBadge: import("react").ForwardRefExoticComponent<SourceBadgeProps & import("react").RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,2 @@
1
+ import type { ProviderMark } from "./provider-marks.js";
2
+ export declare const VENDOR_MARKS: Record<string, ProviderMark>;
@@ -4,4 +4,4 @@ export declare const MENU_ICON = "text-fg-secondary group-data-highlighted/item:
4
4
  export declare const MENU_DANGER = "text-danger-text highlighted:bg-danger-tint active:bg-danger-tint";
5
5
  export declare const MENU_LABEL = "flex h-28 items-center px-10 text-caption font-medium text-fg-secondary";
6
6
  export declare const MENU_SEPARATOR = "-mx-6 my-6 h-1 shrink-0 bg-line";
7
- export declare const MENU_HINT = "ml-auto flex shrink-0 items-center gap-4 pl-16 text-caption font-medium text-fg-tertiary tabular group-data-highlighted/item:text-fg-secondary forced-colors:text-current";
7
+ export declare const MENU_HINT = "ml-auto flex shrink-0 items-center gap-4 pl-16 text-caption font-medium text-fg-tertiary group-data-highlighted/item:text-fg-secondary forced-colors:text-current";
@@ -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", "agent", "settings", "audit", "instance", "provider", "route", "condition", "split", "gateway", "database", "update", "security", "guardrail", "session", "overview", "chart", "home"];
2
+ readonly "Kaeso objects": readonly ["key", "providerKey", "project", "organization", "model", "playground", "alias", "limit", "budget", "requestLog", "usage", "member", "members", "serviceAccount", "agent", "settings", "audit", "instance", "provider", "route", "condition", "split", "gateway", "source", "api", "database", "update", "security", "guardrail", "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", "attach", "record", "refresh", "retry", "send", "stop", "undo", "redo", "swap", "moveUp", "moveDown", "search", "filter", "displayOptions", "more", "menu", "sort", "switcher", "unfold", "expand", "collapse", "show", "hide", "reveal", "sidebar", "sidePanel", "list", "board", "stack"];
5
5
  readonly Status: readonly ["check", "success", "warning", "error", "info", "minus", "notification"];
@@ -114,6 +114,16 @@ export declare const icons: {
114
114
  }][] | readonly (readonly [string, {
115
115
  readonly [key: string]: string | number;
116
116
  }])[];
117
+ readonly source: [string, {
118
+ [key: string]: string | number;
119
+ }][] | readonly (readonly [string, {
120
+ readonly [key: string]: string | number;
121
+ }])[];
122
+ readonly api: [string, {
123
+ [key: string]: string | number;
124
+ }][] | readonly (readonly [string, {
125
+ readonly [key: string]: string | number;
126
+ }])[];
117
127
  readonly database: [string, {
118
128
  [key: string]: string | number;
119
129
  }][] | readonly (readonly [string, {
@@ -0,0 +1,3 @@
1
+ import type { ReactNode } from "react";
2
+ export declare const tabularText: (text: string) => boolean;
3
+ export declare function figures(node: ReactNode): "tabular" | undefined;
@@ -25,7 +25,7 @@ Inter for everything people read: "Request logs, keys and usage for every model
25
25
 
26
26
  ## Numbers
27
27
 
28
- Numbers that align in columns use tabular figures (`tabular`). Money keeps its exact decimal string from the API and is formatted only for display; token counts use thin grouping; durations pick their unit (`840 ms`, `2.4 s`). Use the formatters: `useFormatters()` in components, `@logicplanes/kaeso-ui/format` outside React.
28
+ Numbers that align in columns use tabular figures (`tabular`). Names and versions don't: Inter's tabular figures give a hyphen a figure's width, so `gpt-5-mini` and `1.4.0-rc.2` would read spaced out. Components that take any text (`Badge`, `List` dates, `Stat`, chart labels) decide by themselves. Money keeps its exact decimal string from the API and is formatted only for display; token counts use thin grouping; durations pick their unit (`840 ms`, `2.4 s`). Use the formatters: `useFormatters()` in components, `@logicplanes/kaeso-ui/format` outside React.
29
29
 
30
30
  ## Rules
31
31
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logicplanes/kaeso-ui",
3
- "version": "0.7.0",
3
+ "version": "0.7.1-rc.1",
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",
@@ -71,6 +71,7 @@
71
71
  "dist",
72
72
  "ai",
73
73
  "LICENSE",
74
+ "LICENSE-Apache-2.0.txt",
74
75
  "NOTICE.md",
75
76
  "README.md",
76
77
  "AGENTS.md",
@@ -98,7 +99,7 @@
98
99
  "shiki": "4.6.0",
99
100
  "tailwind-merge": "3.7.0",
100
101
  "uqr": "0.1.3",
101
- "@logicplanes/kaeso-tokens": "0.7.0"
102
+ "@logicplanes/kaeso-tokens": "0.7.1-rc.1"
102
103
  },
103
104
  "devDependencies": {
104
105
  "@hugeicons/core-free-icons": "4.4.0",
@@ -1,26 +0,0 @@
1
- "use client";
2
- import { t as e } from "./cn-CF99d-bD.js";
3
- import { t } from "./truncated-C6K1q8DJ.js";
4
- import { forwardRef as n } from "react";
5
- import { jsx as r } from "react/jsx-runtime";
6
- // src/components/badge/badge.tsx
7
- var i = { tone: {
8
- neutral: { classes: "bg-fill-2 mark-fill text-fg-secondary" },
9
- success: { classes: "bg-success-tint text-success-text" },
10
- warning: { classes: "bg-warning-tint text-warning-text" },
11
- danger: { classes: "bg-danger-tint text-danger-text" },
12
- info: { classes: "bg-info-tint text-info-text" },
13
- outline: { classes: "bg-transparent text-fg-secondary shadow-ring" },
14
- ink: { classes: "bg-ink text-on-ink" }
15
- } }, a = { tone: "neutral" }, o = /* @__PURE__ */ n(function({ tone: n = "neutral", className: a, children: o, ...s }, c) {
16
- return /* @__PURE__ */ r(t, {
17
- ref: c,
18
- className: e("inline-block h-22 max-w-full min-w-0 shrink-0 rounded-code px-8 py-3 align-middle text-caption font-medium tabular", "forced-colors:outline forced-colors:-outline-offset-1", i.tone[n].classes, a),
19
- ...s,
20
- children: o
21
- });
22
- });
23
- process.env.NODE_ENV !== "production" && (o.displayName = "Badge");
24
- export { a as n, i as r, o as t };
25
-
26
- //# sourceMappingURL=badge-C6H9NlNw.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"badge-C6H9NlNw.js","names":["cn","KAESO_BADGE_VARIANTS","KAESO_BADGE_DEFAULT_VARIANTS","Badge","props","TruncatedText","tone","className"],"sources":["../../src/components/badge/badge.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { cn } from \"../../utils/cn.js\";\nimport { TruncatedText } from \"../text/truncated.js\";\n\nexport const KAESO_BADGE_VARIANTS = {\n tone: {\n neutral: { classes: \"bg-fill-2 mark-fill text-fg-secondary\" },\n success: { classes: \"bg-success-tint text-success-text\" },\n warning: { classes: \"bg-warning-tint text-warning-text\" },\n danger: { classes: \"bg-danger-tint text-danger-text\" },\n info: { classes: \"bg-info-tint text-info-text\" },\n outline: { classes: \"bg-transparent text-fg-secondary shadow-ring\" },\n ink: { classes: \"bg-ink text-on-ink\" },\n },\n} as const;\nexport const KAESO_BADGE_DEFAULT_VARIANTS = { tone: \"neutral\" } as const;\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n tone?: keyof typeof KAESO_BADGE_VARIANTS.tone | undefined;\n children: ReactNode;\n}\n\nexport const Badge = /* @__PURE__ */ forwardRef<HTMLSpanElement, BadgeProps>(function Badge({ tone = \"neutral\", className, children, ...props }, ref) {\n return (\n <TruncatedText\n ref={ref}\n className={cn(\n \"inline-block h-22 max-w-full min-w-0 shrink-0 rounded-code px-8 py-3 align-middle text-caption font-medium tabular\",\n \"forced-colors:outline forced-colors:-outline-offset-1\",\n KAESO_BADGE_VARIANTS.tone[tone].classes,\n className,\n )}\n {...props}\n >\n {children}\n </TruncatedText>\n );\n});\nif (process.env.NODE_ENV !== \"production\") Badge.displayName = \"Badge\";\n"],"mappings":";;;;;;AAIA,IAAaC,IAAuB,EAClC,MAAM;CACJ,SAAS,EAAE,SAAS,wCAAwC;CAC5D,SAAS,EAAE,SAAS,oCAAoC;CACxD,SAAS,EAAE,SAAS,oCAAoC;CACxD,QAAQ,EAAE,SAAS,kCAAkC;CACrD,MAAM,EAAE,SAAS,8BAA8B;CAC/C,SAAS,EAAE,SAAS,+CAA+C;CACnE,KAAK,EAAE,SAAS,qBAAqB;AACvC,EACF,GACaC,IAA+B,EAAE,MAAM,UAAU,GAOjDC,IAAwB,kBAAwC,SAAe,EAAE,UAAO,WAAW,cAAW,aAAU,GAAGC,KAAS,GAAK;CACpJ,OACE,kBAACC,GAAD;EACO;EACL,WAAWL,EACT,sHACA,yDACAC,EAAqB,KAAKK,EAAK,CAAC,SAChCC,CACF;EACA,GAAIH;EAEH;CACY,CAAA;AAEnB,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAM,cAAc"}
@@ -1,52 +0,0 @@
1
- "use client";
2
- import { t as e } from "./cn-CF99d-bD.js";
3
- import { n as t, t as n } from "./disclosure-0eeGo16u.js";
4
- import { forwardRef as r } from "react";
5
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
- import { Collapsible as o } from "@base-ui/react/collapsible";
7
- // src/components/collapsible/collapsible.tsx
8
- var s = { state: {
9
- closed: { classes: "" },
10
- open: { classes: "group-data-panel-open/dt:rotate-90" }
11
- } }, c = { state: "closed" }, l = "min-h-40 items-start py-10 text-body font-medium text-fg hover:bg-fill-1 active:bg-fill-2 coarse:min-h-44 coarse:py-12";
12
- function u({ title: e, hint: t }) {
13
- return /* @__PURE__ */ a("span", {
14
- className: "flex min-w-0 flex-1 items-baseline gap-8",
15
- children: [/* @__PURE__ */ i("span", {
16
- className: "min-w-0 flex-1",
17
- children: e
18
- }), t && /* @__PURE__ */ i("span", {
19
- className: "shrink-0 text-small font-regular whitespace-nowrap text-fg-secondary tabular-nums",
20
- children: t
21
- })]
22
- });
23
- }
24
- var d = /* @__PURE__ */ r(function({ title: r, children: s, open: c, defaultOpen: d, onOpenChange: f, hint: p, className: m }, h) {
25
- return /* @__PURE__ */ a(o.Root, {
26
- ref: h,
27
- ...c === void 0 ? {} : { open: c },
28
- ...d === void 0 ? {} : { defaultOpen: d },
29
- ...f ? { onOpenChange: (e) => f(e) } : {},
30
- className: e("flex flex-col", m),
31
- children: [/* @__PURE__ */ a(o.Trigger, {
32
- className: e(n, l),
33
- children: [/* @__PURE__ */ i(u, {
34
- title: r,
35
- hint: p
36
- }), /* @__PURE__ */ i("span", {
37
- className: "flex h-20 shrink-0 items-center",
38
- children: /* @__PURE__ */ i(t, {})
39
- })]
40
- }), /* @__PURE__ */ i(o.Panel, {
41
- className: "collapse-motion",
42
- children: /* @__PURE__ */ i("div", {
43
- className: "px-12 pt-4 pb-12",
44
- children: s
45
- })
46
- })]
47
- });
48
- });
49
- process.env.NODE_ENV !== "production" && (d.displayName = "Collapsible");
50
- export { c as n, s as r, d as t };
51
-
52
- //# sourceMappingURL=collapsible-BFoDXP0y.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"collapsible-BFoDXP0y.js","names":["Collapsible","BaseCollapsible","cn","DisclosureChevron","DISCLOSURE_TRIGGER","KAESO_COLLAPSIBLE_VARIANTS","KAESO_COLLAPSIBLE_DEFAULT_VARIANTS","TRIGGER","DisclosureText","title","hint","Collapsible$1","Collapsible","open","defaultOpen","onOpenChange","o","className"],"sources":["../../src/components/collapsible/collapsible.tsx"],"sourcesContent":["import { forwardRef, type ReactNode } from \"react\";\nimport { Collapsible as BaseCollapsible } from \"@base-ui/react/collapsible\";\nimport { cn } from \"../../utils/cn.js\";\nimport { DISCLOSURE_TRIGGER, DisclosureChevron } from \"./disclosure.js\";\n\nexport const KAESO_COLLAPSIBLE_VARIANTS = {\n state: {\n closed: { classes: \"\" },\n open: { classes: \"group-data-panel-open/dt:rotate-90\" },\n },\n} as const;\nexport const KAESO_COLLAPSIBLE_DEFAULT_VARIANTS = { state: \"closed\" } as const;\n\n// A title that wraps keeps its count and chevron on its first line, so the row hangs from the top, not the middle.\nconst TRIGGER = \"min-h-40 items-start py-10 text-body font-medium text-fg hover:bg-fill-1 active:bg-fill-2 coarse:min-h-44 coarse:py-12\";\n\nfunction DisclosureText({ title, hint }: { title: ReactNode; hint: ReactNode | undefined }) {\n return (\n <span className=\"flex min-w-0 flex-1 items-baseline gap-8\">\n <span className=\"min-w-0 flex-1\">{title}</span>\n {hint && <span className=\"shrink-0 text-small font-regular whitespace-nowrap text-fg-secondary tabular-nums\">{hint}</span>}\n </span>\n );\n}\n\nexport interface CollapsibleProps {\n title: ReactNode;\n children: ReactNode;\n open?: boolean | undefined;\n defaultOpen?: boolean | undefined;\n onOpenChange?: ((open: boolean) => void) | undefined;\n hint?: ReactNode | undefined;\n className?: string | undefined;\n}\n\nexport const Collapsible = /* @__PURE__ */ forwardRef<HTMLDivElement, CollapsibleProps>(function Collapsible(\n { title, children, open, defaultOpen, onOpenChange, hint, className },\n ref,\n) {\n return (\n <BaseCollapsible.Root\n ref={ref}\n {...(open !== undefined ? { open } : {})}\n {...(defaultOpen !== undefined ? { defaultOpen } : {})}\n {...(onOpenChange ? { onOpenChange: (o: boolean) => onOpenChange(o) } : {})}\n className={cn(\"flex flex-col\", className)}\n >\n <BaseCollapsible.Trigger className={cn(DISCLOSURE_TRIGGER, TRIGGER)}>\n <DisclosureText title={title} hint={hint} />\n <span className=\"flex h-20 shrink-0 items-center\">\n <DisclosureChevron />\n </span>\n </BaseCollapsible.Trigger>\n <BaseCollapsible.Panel className=\"collapse-motion\">\n <div className=\"px-12 pt-4 pb-12\">{children}</div>\n </BaseCollapsible.Panel>\n </BaseCollapsible.Root>\n );\n});\nif (process.env.NODE_ENV !== \"production\") Collapsible.displayName = \"Collapsible\";\n"],"mappings":";;;;;;;AAKA,IAAaK,IAA6B,EACxC,OAAO;CACL,QAAQ,EAAE,SAAS,GAAG;CACtB,MAAM,EAAE,SAAS,qCAAqC;AACxD,EACF,GACaC,IAAqC,EAAE,OAAO,SAAS,GAG9DC,IAAU;AAEhB,SAASC,EAAe,EAAE,UAAO,WAA2D;CAC1F,OACE,kBAAC,QAAD;EAAM,WAAU;EAAhB,UAAA,CACE,kBAAC,QAAD;GAAM,WAAU;GAAkB,UAAAC;EAAY,CAAA,GAC7CC,KAAQ,kBAAC,QAAD;GAAM,WAAU;GAAqF,UAAAA;EAAW,CAAA,CACrH;;AAEV;AAYA,IAAaV,IAA8B,kBAA6C,SACtF,EAAE,UAAO,aAAU,SAAM,gBAAa,iBAAc,SAAM,gBAC1D,GACA;CACA,OACE,kBAACC,EAAgB,MAAjB;EACO;EACL,GAAKY,MAAS,KAAA,IAAuB,CAAC,IAAZ,EAAE,QAAK;EACjC,GAAKC,MAAgB,KAAA,IAA8B,CAAC,IAAnB,EAAE,eAAY;EAC/C,GAAKC,IAAe,EAAE,eAAe,MAAeA,EAAaC,CAAC,EAAE,IAAI,CAAC;EACzE,WAAWd,EAAG,iBAAiBe,CAAS;EAL1C,UAAA,CAOE,kBAAChB,EAAgB,SAAjB;GAAyB,WAAWC,EAAGE,GAAoBG,CAAO;GAAlE,UAAA,CACE,kBAACC,GAAD;IAAuB;IAAa;GAAO,CAAA,GAC3C,kBAAC,QAAD;IAAM,WAAU;IACd,UAAA,kBAACL,GAAD,CAAoB,CAAA;GAChB,CAAA,CACiB;EACzB,CAAA,GAAA,kBAACF,EAAgB,OAAjB;GAAuB,WAAU;GAC/B,UAAA,kBAAC,OAAD;IAAK,WAAU;IAAoB;GAAc,CAAA;EAC5B,CAAA,CACH;;AAE1B,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAY,cAAc"}
@@ -1,365 +0,0 @@
1
- "use client";
2
- import { n as e, r as t } from "./portal-context-Z2xSIPsc.js";
3
- import { t as n } from "./cn-CF99d-bD.js";
4
- import { r } from "./dev-CRNODF1J.js";
5
- import { a as i, o as a, s as ee } from "./field-BJoH_7Mc.js";
6
- import { t as o } from "./icon-kQHSzziW.js";
7
- import { n as s, r as c, t as l } from "./sizes-CSjNvon0.js";
8
- import { r as te } from "./tag-o9BCsRkO.js";
9
- import { i as ne, o as re, r as u } from "./styles-CklJ8C7c.js";
10
- import { n as ie, t as ae } from "./use-layout-width-D53VE1kJ.js";
11
- import { a as d } from "./context-B2nNL7Im.js";
12
- import { forwardRef as f, useEffect as p, useMemo as m, useRef as h, useState as g } from "react";
13
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
14
- import { Add01Icon as b, ArrowDown01Icon as x, Cancel01Icon as S, Tick02Icon as C } from "@hugeicons/core-free-icons";
15
- import { Combobox as w } from "@base-ui/react/combobox";
16
- import { Autocomplete as T } from "@base-ui/react/autocomplete";
17
- // src/components/combobox/combobox.tsx
18
- var E = { size: {
19
- sm: { classes: s.size.sm.classes },
20
- md: { classes: s.size.md.classes },
21
- lg: { classes: s.size.lg.classes },
22
- xl: { classes: s.size.xl.classes }
23
- } }, D = { size: "md" }, O = /* @__PURE__ */ f(function({ text: e, query: t }, n) {
24
- let r = t.trim().toLowerCase();
25
- if (!r) return /* @__PURE__ */ v("span", {
26
- ref: n,
27
- children: e
28
- });
29
- let i = e.toLowerCase().indexOf(r);
30
- return i < 0 ? /* @__PURE__ */ v("span", {
31
- ref: n,
32
- className: "text-fg-secondary group-data-disabled/item:text-fg-disabled",
33
- children: e
34
- }) : /* @__PURE__ */ y("span", {
35
- ref: n,
36
- className: "text-fg-secondary group-data-disabled/item:text-fg-disabled",
37
- children: [
38
- e.slice(0, i),
39
- /* @__PURE__ */ v("span", {
40
- className: "text-fg group-data-disabled/item:text-fg-disabled",
41
- children: e.slice(i, i + r.length)
42
- }),
43
- e.slice(i + r.length)
44
- ]
45
- });
46
- });
47
- process.env.NODE_ENV !== "production" && (O.displayName = "Highlight");
48
- var oe = {
49
- sm: "pe-2",
50
- md: "pe-4",
51
- lg: "pe-6",
52
- xl: "pe-10"
53
- }, k = {
54
- sm: {
55
- field: "min-h-32 p-4 pe-32",
56
- row: "h-24",
57
- chevron: "end-2 top-2",
58
- empty: "px-8"
59
- },
60
- md: {
61
- field: "min-h-36 p-4 pe-36",
62
- row: "h-28",
63
- chevron: "end-4 top-4",
64
- empty: "px-12"
65
- },
66
- lg: {
67
- field: "min-h-40 p-6 pe-36",
68
- row: "h-28",
69
- chevron: "end-6 top-6",
70
- empty: "px-12"
71
- },
72
- xl: {
73
- field: "min-h-48 p-8 pe-40 text-body-lg",
74
- row: "h-32",
75
- chevron: "end-10 top-10",
76
- empty: "px-14"
77
- }
78
- }, A = "inline-flex size-28 shrink-0 items-center justify-center rounded-pill text-fg-tertiary transition-control hover:bg-raised-hover hover:text-fg";
79
- function se(e) {
80
- e.key === "Escape" && e.currentTarget.getAttribute("aria-expanded") !== "true" && e.preventBaseUIHandler?.();
81
- }
82
- var j = /* @__PURE__ */ f(function(s, c) {
83
- let { options: l, placeholder: f, size: T = "md", emptyText: D, loading: j, onInputValueChange: M, searchDelay: N = 0, onCreate: P, createLabel: F, disabled: I, invalid: ce, id: L, name: R, label: z, description: B, error: V, optional: le, required: ue, layout: de, className: H, multiple: U, "aria-label": W, "data-force": G } = s;
84
- r("Combobox", H);
85
- let K = d(), fe = i(), pe = a(s), [q, me] = g(""), J = h(null), he = ie(J), [ge, _e] = g(() => s.defaultValue ?? (U ? [] : null)), Y = s.value === void 0 ? ge : s.value, X = (Array.isArray(Y) ? Y : Y == null ? [] : [Y]).join("\0"), ve = h(/* @__PURE__ */ new Map()), Z = m(() => {
86
- let e = new Set(X ? X.split("\0") : []), t = /* @__PURE__ */ new Map();
87
- for (let [n, r] of ve.current) e.has(n) && t.set(n, r);
88
- for (let e of l) t.set(e.value, e);
89
- return ve.current = t, t;
90
- }, [l, X]), { filtered: ye, hidden: be } = m(() => {
91
- let e = q.trim().toLowerCase(), t = e ? l.filter((t) => t.label.toLowerCase().includes(e) || t.value.toLowerCase().includes(e)) : l, n = t.slice(0, 100);
92
- return P && e && !l.some((t) => t.label.toLowerCase() === e) && n.push({
93
- value: `__create__${q}`,
94
- label: q.trim(),
95
- __create: !0
96
- }), {
97
- filtered: n,
98
- hidden: Math.max(0, t.length - 100)
99
- };
100
- }, [
101
- l,
102
- q,
103
- P
104
- ]), Q = h(M);
105
- Q.current = M;
106
- let $ = h(null);
107
- p(() => {
108
- let e = $;
109
- return () => {
110
- e.current && clearTimeout(e.current);
111
- };
112
- }, []);
113
- let xe = (e) => {
114
- if (N <= 0) return Q.current?.(e);
115
- $.current && clearTimeout($.current), $.current = setTimeout(() => {
116
- $.current = null, Q.current?.(e);
117
- }, N);
118
- }, Se = Array.isArray(Y) ? Y.flatMap((e) => Z.get(e) ?? []) : Y == null ? null : Z.get(Y) ?? null, Ce = (e) => {
119
- let t = Array.isArray(e) ? e : null, n = (t ?? [e]).find((e) => e && "__create" in e);
120
- if (n) {
121
- P?.(n.label);
122
- return;
123
- }
124
- let r = U ? (t ?? []).map((e) => e.value) : e?.value ?? null;
125
- s.value === void 0 && _e(r), s.onValueChange?.(r);
126
- }, we = /* @__PURE__ */ v(w.Input, {
127
- ref: c,
128
- placeholder: f,
129
- ...L ? { id: L } : {},
130
- ...pe.controlProps,
131
- ...W ? { "aria-label": W } : {},
132
- ...ce || V ? { "aria-invalid": !0 } : {},
133
- onKeyDown: se,
134
- className: "min-w-0 flex-1 bg-transparent text-fg outline-none placeholder:text-fg-tertiary disabled:cursor-not-allowed disabled:text-fg-disabled"
135
- }), Te = /* @__PURE__ */ y(w.Root, {
136
- items: ye,
137
- filteredItems: ye,
138
- value: Se,
139
- onValueChange: Ce,
140
- onInputValueChange: (e, t) => {
141
- let n = t.reason === "input-change" ? e : "";
142
- n !== q && (me(n), xe(n));
143
- },
144
- autoHighlight: !0,
145
- itemToStringLabel: (e) => e?.label ?? "",
146
- isItemEqualToValue: (e, t) => e?.value === t?.value,
147
- multiple: U === !0,
148
- ...I ? { disabled: I } : {},
149
- ...R ? { name: R } : {},
150
- children: [U ? /* @__PURE__ */ v(w.Chips, {
151
- ref: J,
152
- ...G ? { "data-force": G } : {},
153
- className: n("relative flex w-full flex-wrap items-center gap-4 rounded-field material-field transition-control cursor-text", k[T].field, !(z || B || V) && H),
154
- children: /* @__PURE__ */ v(w.Value, { children: (e) => /* @__PURE__ */ y(_, { children: [
155
- e.map((e) => /* @__PURE__ */ v(w.Chip, {
156
- "aria-label": e.label,
157
- className: "outline-none",
158
- children: /* @__PURE__ */ y(te, {
159
- className: "pe-2",
160
- children: [e.label, /* @__PURE__ */ v(w.ChipRemove, {
161
- "aria-label": K("combobox.remove", "Remove {label}", { label: e.label }),
162
- className: "ms-2 inline-flex size-24 items-center justify-center rounded-pill text-fg-tertiary transition-control hover:bg-fill-2 hover:text-fg",
163
- children: /* @__PURE__ */ v(o, {
164
- icon: S,
165
- size: "xs"
166
- })
167
- })]
168
- })
169
- }, e.value)),
170
- /* @__PURE__ */ v("span", {
171
- className: n("flex min-w-64 flex-1 basis-64 items-center", k[T].row, e.length === 0 ? k[T].empty : "px-8"),
172
- children: we
173
- }),
174
- /* @__PURE__ */ v(w.Trigger, {
175
- "aria-label": K("combobox.showOptions", "Show options"),
176
- className: n(A, "absolute", k[T].chevron),
177
- children: /* @__PURE__ */ v(o, {
178
- icon: x,
179
- size: "sm"
180
- })
181
- })
182
- ] }) })
183
- }) : /* @__PURE__ */ y(w.InputGroup, {
184
- ref: J,
185
- ...G ? { "data-force": G } : {},
186
- className: n("relative flex w-full min-w-0 items-center rounded-pill material-field transition-control cursor-text", E.size[T].classes, oe[T], !(z || B || V) && H),
187
- children: [we, /* @__PURE__ */ v(w.Trigger, {
188
- "aria-label": K("combobox.showOptions", "Show options"),
189
- className: A,
190
- children: /* @__PURE__ */ v(o, {
191
- icon: x,
192
- size: "sm"
193
- })
194
- })]
195
- }), /* @__PURE__ */ v(w.Portal, {
196
- container: t(),
197
- children: /* @__PURE__ */ v(w.Positioner, {
198
- anchor: J,
199
- positionMethod: "fixed",
200
- collisionBoundary: e(),
201
- align: "start",
202
- sideOffset: 6,
203
- collisionPadding: 8,
204
- className: "z-50 outline-none",
205
- children: /* @__PURE__ */ y(w.Popup, {
206
- className: n(re, "relative min-w-anchor overflow-hidden"),
207
- style: ae(he),
208
- children: [
209
- j && /* @__PURE__ */ v("span", {
210
- "aria-hidden": !0,
211
- className: "absolute inset-x-16 top-0 h-2 overflow-hidden rounded-pill show-after-delay reduced:hidden",
212
- children: /* @__PURE__ */ v("span", { className: "block h-full w-1/3 animate-indeterminate rounded-pill bg-fg-tertiary" })
213
- }),
214
- /* @__PURE__ */ v(w.Status, {
215
- className: "sr-only",
216
- children: j ? K("combobox.loadingResults", "Loading results") : ""
217
- }),
218
- /* @__PURE__ */ v(w.Empty, {
219
- className: "flex h-34 items-center px-10 text-body text-fg-secondary empty:hidden",
220
- children: j ? K("combobox.loading", "Loading…") : D ?? (q.trim() ? K("combobox.noMatch", "No matches for “{query}”", { query: q.trim() }) : K("combobox.noResults", "No results"))
221
- }),
222
- /* @__PURE__ */ v(w.List, {
223
- className: "-m-6 flex min-h-0 flex-col overflow-y-auto overscroll-contain p-6 outline-none scrollbar-quiet",
224
- children: (e) => /* @__PURE__ */ v(w.Item, {
225
- value: e,
226
- ...e.disabled ? { disabled: !0 } : {},
227
- className: ne,
228
- children: "__create" in e ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(o, {
229
- icon: b,
230
- size: "sm",
231
- className: u
232
- }), /* @__PURE__ */ v("span", {
233
- className: "min-w-0 flex-1 truncate",
234
- children: F ? F(e.label) : K("combobox.add", "Add “{label}”", { label: e.label })
235
- })] }) : /* @__PURE__ */ y(_, { children: [
236
- e.leading,
237
- e.icon && /* @__PURE__ */ v(o, {
238
- icon: e.icon,
239
- size: "sm",
240
- className: "text-fg-secondary group-data-highlighted/item:text-fg group-data-disabled/item:text-fg-disabled forced-colors:text-current"
241
- }),
242
- /* @__PURE__ */ y("span", {
243
- className: n("flex min-w-0 flex-1 flex-col", e.description && "gap-2 py-8"),
244
- children: [/* @__PURE__ */ v("span", {
245
- className: "truncate",
246
- children: /* @__PURE__ */ v(O, {
247
- text: e.label,
248
- query: q
249
- })
250
- }), e.description && /* @__PURE__ */ v("span", {
251
- className: "text-small font-regular text-fg-secondary",
252
- children: e.description
253
- })]
254
- }),
255
- e.meta && /* @__PURE__ */ v("span", {
256
- className: "shrink-0 text-small font-regular text-fg-tertiary tabular",
257
- children: e.meta
258
- }),
259
- /* @__PURE__ */ v(w.ItemIndicator, {
260
- keepMounted: !0,
261
- className: "flex size-16 shrink-0 items-center justify-center text-fg opacity-0 data-selected:opacity-100",
262
- children: /* @__PURE__ */ v(o, {
263
- icon: C,
264
- size: "sm"
265
- })
266
- })
267
- ] })
268
- }, e.value)
269
- }),
270
- be > 0 && /* @__PURE__ */ v("div", {
271
- className: "flex h-28 shrink-0 items-center px-10 text-caption font-medium text-fg-tertiary",
272
- children: K("combobox.more", "{count, plural, one {# more; type to narrow it down} other {# more; type to narrow them down}}", { count: be })
273
- })
274
- ]
275
- })
276
- })
277
- })]
278
- });
279
- return fe ? Te : ee({
280
- label: z,
281
- description: B,
282
- error: V,
283
- optional: le,
284
- required: ue,
285
- layout: de,
286
- id: pe.wrapId ?? L,
287
- disabled: I,
288
- className: H
289
- }, Te);
290
- });
291
- process.env.NODE_ENV !== "production" && (j.displayName = "Combobox");
292
- var M = { size: E.size }, N = { size: "md" }, P = /* @__PURE__ */ f(function(r, s) {
293
- let { suggestions: te, value: u, defaultValue: d, onValueChange: f, placeholder: p, size: m = "md", disabled: _, id: b, name: x, leadingIcon: S, label: C, description: w, error: E, optional: D, required: oe, layout: k, className: A, "aria-label": j, "data-force": N } = r, P = i(), F = a(r), [I, ce] = g(d ?? ""), L = h(null), R = ie(L), z = u ?? I, B = /* @__PURE__ */ y(T.Root, {
294
- items: te,
295
- ...u === void 0 ? {} : { value: u },
296
- ...d === void 0 ? {} : { defaultValue: d },
297
- onValueChange: (e) => {
298
- ce(e), f?.(e);
299
- },
300
- ..._ ? { disabled: _ } : {},
301
- ...x ? { name: x } : {},
302
- children: [/* @__PURE__ */ y(T.InputGroup, {
303
- ref: L,
304
- ...N ? { "data-force": N } : {},
305
- className: n("relative flex w-full min-w-0 items-center rounded-pill material-field transition-control cursor-text", M.size[m].classes, S && c[m], !(C || w || E) && A),
306
- children: [S && /* @__PURE__ */ v(o, {
307
- icon: S,
308
- size: l[m],
309
- className: "text-fg-tertiary"
310
- }), /* @__PURE__ */ v(T.Input, {
311
- ref: s,
312
- placeholder: p,
313
- ...b ? { id: b } : {},
314
- ...F.controlProps,
315
- ...j ? { "aria-label": j } : {},
316
- onKeyDown: se,
317
- className: "min-w-0 flex-1 bg-transparent text-fg outline-none placeholder:text-fg-tertiary disabled:text-fg-disabled"
318
- })]
319
- }), /* @__PURE__ */ v(T.Portal, {
320
- container: t(),
321
- children: /* @__PURE__ */ v(T.Positioner, {
322
- anchor: L,
323
- positionMethod: "fixed",
324
- collisionBoundary: e(),
325
- align: "start",
326
- sideOffset: 6,
327
- collisionPadding: 8,
328
- className: "z-50 outline-none",
329
- children: /* @__PURE__ */ v(T.Popup, {
330
- className: n(re, "min-w-anchor overflow-hidden data-empty:hidden"),
331
- style: ae(R),
332
- children: /* @__PURE__ */ v(T.List, {
333
- className: "-m-6 flex min-h-0 flex-col overflow-y-auto overscroll-contain p-6 outline-none scrollbar-quiet",
334
- children: (e) => /* @__PURE__ */ v(T.Item, {
335
- value: e,
336
- className: ne,
337
- children: /* @__PURE__ */ v("span", {
338
- className: "truncate",
339
- children: /* @__PURE__ */ v(O, {
340
- text: e,
341
- query: z
342
- })
343
- })
344
- }, e)
345
- })
346
- })
347
- })
348
- })]
349
- });
350
- return P ? B : ee({
351
- label: C,
352
- description: w,
353
- error: E,
354
- optional: D,
355
- required: oe,
356
- layout: k,
357
- id: F.wrapId ?? b,
358
- disabled: _,
359
- className: A
360
- }, B);
361
- });
362
- process.env.NODE_ENV !== "production" && (P.displayName = "Autocomplete");
363
- export { M as a, N as i, j as n, D as o, O as r, E as s, P as t };
364
-
365
- //# sourceMappingURL=combobox-B8GjFlO4.js.map