@cognite/aura 0.3.2 → 0.3.4

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 (143) hide show
  1. package/DESIGN.md +134 -5
  2. package/README.md +24 -3
  3. package/dist/components/index.d.ts +5 -1
  4. package/dist/components/index.js +59 -327
  5. package/dist/components/ui/core/accordion/accordion.js +79 -114
  6. package/dist/components/ui/core/action-toolbar/action-toolbar.js +108 -176
  7. package/dist/components/ui/core/alert/alert.js +158 -206
  8. package/dist/components/ui/core/avatar/avatar.js +64 -90
  9. package/dist/components/ui/core/badge/badge.js +73 -108
  10. package/dist/components/ui/core/banner/banner.js +146 -215
  11. package/dist/components/ui/core/breadcrumb/breadcrumb.js +105 -200
  12. package/dist/components/ui/core/button/button.js +47 -52
  13. package/dist/components/ui/core/button-group/button-group.js +40 -79
  14. package/dist/components/ui/core/calendar/calendar-header.js +63 -0
  15. package/dist/components/ui/core/calendar/calendar-utils.js +39 -0
  16. package/dist/components/ui/core/calendar/calendar.js +68 -0
  17. package/dist/components/ui/core/calendar/constants.d.ts +1 -0
  18. package/dist/components/ui/core/card/card.js +102 -185
  19. package/dist/components/ui/core/chart/chart.js +116 -206
  20. package/dist/components/ui/core/chart/index.js +2 -8
  21. package/dist/components/ui/core/checkbox/checkbox.js +67 -132
  22. package/dist/components/ui/core/checkbox/checkbox.metadata.js +7 -7
  23. package/dist/components/ui/core/code-block/code-block.d.ts +1 -1
  24. package/dist/components/ui/core/code-block/code-block.js +179 -267
  25. package/dist/components/ui/core/collapsible/collapsible.js +29 -49
  26. package/dist/components/ui/core/combobox/combobox.js +41 -0
  27. package/dist/components/ui/core/command/command.js +85 -150
  28. package/dist/components/ui/core/count/count.js +21 -32
  29. package/dist/components/ui/core/data-grid/data-grid-cell.d.ts +10 -0
  30. package/dist/components/ui/core/data-grid/data-grid-header-row.d.ts +13 -0
  31. package/dist/components/ui/core/data-grid/data-grid-row.d.ts +18 -0
  32. package/dist/components/ui/core/data-grid/data-grid.d.ts +43 -0
  33. package/dist/components/ui/core/data-grid/data-grid.fixtures.d.ts +12 -0
  34. package/dist/components/ui/core/data-grid/data-grid.utils.d.ts +9 -0
  35. package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +60 -72
  36. package/dist/components/ui/core/date-time-pickers/date-picker/types.d.ts +2 -1
  37. package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +36 -51
  38. package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +63 -87
  39. package/dist/components/ui/core/date-time-pickers/date-range-picker/types.d.ts +2 -1
  40. package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js +60 -68
  41. package/dist/components/ui/core/date-time-pickers/date-time-picker/index.d.ts +1 -0
  42. package/dist/components/ui/core/date-time-pickers/date-time-picker/types.d.ts +36 -0
  43. package/dist/components/ui/core/date-time-pickers/date-time-picker/use-date-time-picker.d.ts +3 -0
  44. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +118 -174
  45. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.d.ts +7 -6
  46. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js +104 -145
  47. package/dist/components/ui/core/date-time-pickers/index.d.ts +3 -1
  48. package/dist/components/ui/core/date-time-pickers/index.js +6 -10
  49. package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.d.ts +3 -2
  50. package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js +42 -56
  51. package/dist/components/ui/core/date-time-pickers/shared/constants.d.ts +3 -8
  52. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js +64 -98
  53. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js +38 -67
  54. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js +23 -23
  55. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js +52 -62
  56. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js +18 -18
  57. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +24 -31
  58. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.d.ts +3 -3
  59. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js +24 -33
  60. package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js +4 -7
  61. package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.d.ts +3 -2
  62. package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js +17 -31
  63. package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.d.ts +3 -2
  64. package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.js +40 -40
  65. package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js +33 -50
  66. package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.js +78 -99
  67. package/dist/components/ui/core/date-time-pickers/time-picker/types.d.ts +5 -4
  68. package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.js +41 -63
  69. package/dist/components/ui/core/date-time-pickers/time-range-picker/index.d.ts +1 -0
  70. package/dist/components/ui/core/date-time-pickers/time-range-picker/types.d.ts +40 -0
  71. package/dist/components/ui/core/date-time-pickers/time-range-picker/use-time-range-picker.d.ts +3 -0
  72. package/dist/components/ui/core/date-time-pickers/utils/format-utils.d.ts +1 -0
  73. package/dist/components/ui/core/date-time-pickers/utils/time-utils.d.ts +3 -3
  74. package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +7 -15
  75. package/dist/components/ui/core/dialog/dialog.js +82 -155
  76. package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +2 -2
  77. package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +150 -248
  78. package/dist/components/ui/core/empty-state/empty-state.context.js +5 -8
  79. package/dist/components/ui/core/empty-state/empty-state.js +86 -138
  80. package/dist/components/ui/core/helper-text/helper-text.js +37 -65
  81. package/dist/components/ui/core/hover-card/hover-card.js +54 -80
  82. package/dist/components/ui/core/inline-citation/inline-citation.js +98 -181
  83. package/dist/components/ui/core/input/input.js +12 -27
  84. package/dist/components/ui/core/input-group/input-group.js +76 -173
  85. package/dist/components/ui/core/kbd/kbd.js +20 -36
  86. package/dist/components/ui/core/label/label.js +26 -43
  87. package/dist/components/ui/core/loader/loader.js +80 -117
  88. package/dist/components/ui/core/message/message-response-default-streamdown-controls.js +12 -12
  89. package/dist/components/ui/core/message/message.d.ts +2 -2
  90. package/dist/components/ui/core/message/message.js +316 -542
  91. package/dist/components/ui/core/overflow-list/overflow-list.utils.d.ts +52 -0
  92. package/dist/components/ui/core/pagination/pagination-size-context.js +5 -6
  93. package/dist/components/ui/core/pagination/pagination-teleport.js +86 -106
  94. package/dist/components/ui/core/pagination/pagination-teleport.utils.js +6 -6
  95. package/dist/components/ui/core/pagination/pagination.js +231 -334
  96. package/dist/components/ui/core/popover/popover.js +90 -157
  97. package/dist/components/ui/core/progress/progress.js +36 -61
  98. package/dist/components/ui/core/prompt-input/prompt-input.js +274 -413
  99. package/dist/components/ui/core/radio-group/radio-group.js +58 -113
  100. package/dist/components/ui/core/reasoning/reasoning.js +55 -86
  101. package/dist/components/ui/core/scroll-area/scroll-area.js +41 -71
  102. package/dist/components/ui/core/search/search.js +77 -99
  103. package/dist/components/ui/core/segmented-control/segmented-control.js +110 -167
  104. package/dist/components/ui/core/select/select.js +168 -293
  105. package/dist/components/ui/core/separator/separator.js +13 -23
  106. package/dist/components/ui/core/shimmer/shimmer.d.ts +2 -4
  107. package/dist/components/ui/core/shimmer/shimmer.js +40 -107
  108. package/dist/components/ui/core/skeleton/skeleton.js +13 -18
  109. package/dist/components/ui/core/slider/slider.d.ts +9 -0
  110. package/dist/components/ui/core/slider/slider.js +40 -0
  111. package/dist/components/ui/core/sonner-toast/sonner-toast.js +54 -47
  112. package/dist/components/ui/core/sources/sources.d.ts +5 -1
  113. package/dist/components/ui/core/sources/sources.js +58 -79
  114. package/dist/components/ui/core/switch/switch.js +62 -0
  115. package/dist/components/ui/core/tabs/tabs.js +149 -223
  116. package/dist/components/ui/core/tabs/tabs.utils.js +6 -8
  117. package/dist/components/ui/core/textarea/textarea.js +13 -27
  118. package/dist/components/ui/core/toggle/toggle.js +55 -74
  119. package/dist/components/ui/core/tool/tool.js +127 -163
  120. package/dist/components/ui/core/tooltip/tooltip.js +47 -86
  121. package/dist/components/ui/core/topbar/topbar.js +106 -190
  122. package/dist/eslint/index.js +5 -10
  123. package/dist/eslint/no-overriding-styles.js +178 -237
  124. package/dist/icons/index.d.ts +1 -0
  125. package/dist/icons/index.js +1 -0
  126. package/dist/index.d.ts +1 -1
  127. package/dist/lib/highlight-code.d.ts +9 -0
  128. package/dist/lib/highlight-code.js +42 -0
  129. package/dist/lib/portal-container-context.js +8 -9
  130. package/dist/lib/style-scope.js +6 -6
  131. package/dist/lib/use-controllable-state.js +21 -30
  132. package/dist/lib/utils.d.ts +0 -2
  133. package/dist/lib/utils.js +32 -112
  134. package/dist/styles.css +1 -1
  135. package/dist/styles.source.css +26 -0
  136. package/package.json +42 -8
  137. package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.js +0 -119
  138. package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.js +0 -93
  139. package/dist/components/ui/core/date-time-pickers/shared/constants.js +0 -14
  140. package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.js +0 -52
  141. /package/dist/components/ui/core/{date-time-pickers/shared/calendar-header → calendar}/calendar-header.d.ts +0 -0
  142. /package/dist/components/ui/core/{date-time-pickers/utils → calendar}/calendar-utils.d.ts +0 -0
  143. /package/dist/components/ui/core/{date-time-pickers/shared/calendar → calendar}/calendar.d.ts +0 -0
@@ -1,173 +1,76 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as s } from "react";
3
- import { cva as l } from "class-variance-authority";
4
- import { cn as n } from "../../../../lib/utils.js";
5
- import { Button as g } from "../button/button.js";
6
- import { Input as c } from "../input/input.js";
7
- import { Textarea as b } from "../textarea/textarea.js";
8
- const h = s(
9
- ({ className: t, ...o }, r) => /* @__PURE__ */ e(
10
- "div",
11
- {
12
- ref: r,
13
- "data-slot": "input-group",
14
- role: "group",
15
- className: n(
16
- "group/input-group bg-muted-background border border-transparent relative flex w-full items-stretch rounded-lg shadow-none transition-[color,box-shadow,border-color,background-color] outline-none",
17
- "hover:border-border-emphasized",
18
- "h-9 min-w-0 has-[>textarea]:h-auto",
19
- "has-[>[data-align=inline-start]]:[&>input]:pl-2 has-[>[data-align=inline-start]]:[&>input]:rounded-l-none has-[>[data-align=inline-start]]:[&>textarea]:rounded-l-none",
20
- "has-[>[data-align=inline-end]]:[&>input]:rounded-r-none has-[>[data-align=inline-end]]:[&>textarea]:rounded-r-none",
21
- "[&>input]:pr-2 [&>textarea]:pr-2",
22
- "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
23
- "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
24
- "has-[[data-slot=input-group-control]:focus-visible:not(:read-only)]:bg-background has-[[data-slot=input-group-control]:focus-visible:not(:read-only)]:shadow-focus-ring has-[[data-slot=input-group-control]:focus-visible:not(:read-only)]:border-transparent",
25
- "has-[[data-slot=input-group-control][aria-invalid=true]:not(:focus-visible)]:shadow-focus-ring-destructive has-[[data-slot=input-group-control][aria-invalid=true]:not(:focus-visible)]:border-transparent",
26
- "has-[[data-slot=input-group-control]:read-only]:border-transparent has-[[data-slot=input-group-control]:read-only]:shadow-none",
27
- "hover:has-[[data-slot=input-group-control]:read-only]:border-transparent hover:has-[[data-slot=input-group-control]:read-only]:bg-accent-background hover:has-[[data-slot=input-group-control]:read-only]:text-muted-foreground",
28
- t
29
- ),
30
- ...o
31
- }
32
- )
33
- );
34
- h.displayName = "InputGroup";
35
- const u = "[&>svg:not([class*='size-'])]:size-4 [&>svg]:shrink-0 [&>svg]:text-muted-foreground [&>svg]:transition-colors group-hover/input-group:group-has-[[data-slot=input-group-control]:enabled:not(:read-only)]/input-group:[&>svg]:text-foreground group-has-[[data-slot=input-group-control]:enabled:focus-visible:not(:read-only)]/input-group:[&>svg]:text-foreground group-has-[[data-slot=input-group-control]:enabled:not(:placeholder-shown):not(:read-only)]/input-group:[&>svg]:text-foreground group-has-[[data-slot=input-group-control][aria-invalid=true]:enabled:not(:read-only)]/input-group:[&>svg]:text-foreground group-has-[[data-slot=input-group-control]:read-only:enabled]/input-group:[&>svg]:text-muted-foreground group-has-[[data-slot=input-group-control]:disabled]/input-group:[&>svg]:text-disabled-foreground", d = "[&>svg:not([class*='size-'])]:size-4 [&>svg]:shrink-0 [&>svg]:text-muted-foreground [&>svg]:transition-colors", v = l(
36
- "text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-2 text-xs font-normal select-none [&>kbd]:rounded-sm",
37
- {
38
- variants: {
39
- align: {
40
- "inline-start": n(
41
- "order-first min-h-0 rounded-l-lg pl-2",
42
- u
43
- ),
44
- "inline-end": n(
45
- "order-last min-h-0 rounded-r-lg pr-2 has-[>button]:pr-1 has-[kbd]:pr-1 has-[[class*=stepper]]:pr-1",
46
- d
47
- ),
48
- "block-start": n(
49
- "order-first w-full justify-start px-2 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5",
50
- u
51
- ),
52
- "block-end": n(
53
- "order-last w-full justify-start px-2 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5",
54
- d
55
- )
56
- }
57
- },
58
- defaultVariants: {
59
- align: "inline-start"
60
- }
61
- }
62
- ), f = s(({ className: t, align: o = "inline-start", ...r }, i) => /* @__PURE__ */ e(
63
- "div",
64
- {
65
- ref: i,
66
- role: "group",
67
- "data-slot": "input-group-addon",
68
- "data-align": o,
69
- className: n(v({ align: o }), t),
70
- onClick: (a) => {
71
- a.target instanceof HTMLElement && a.target.closest("button") || a.target instanceof Node && !a.currentTarget.contains(a.target) || a.currentTarget.parentElement?.querySelector('[data-slot="input-group-control"]')?.focus();
72
- },
73
- ...r
74
- }
75
- ));
76
- f.displayName = "InputGroupAddon";
77
- const m = l("text-sm shadow-none flex gap-2 items-center", {
78
- variants: {
79
- size: {
80
- xs: "h-6 gap-1 px-2 rounded-sm [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",
81
- sm: "h-7 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5",
82
- "icon-xs": "size-6 rounded-xs p-0 has-[>svg]:p-0",
83
- "icon-sm": "size-7 p-0 has-[>svg]:p-0"
84
- }
85
- },
86
- defaultVariants: {
87
- size: "xs"
88
- }
89
- }), x = s(
90
- ({ className: t, type: o = "button", variant: r = "ghost", size: i = "xs", ...a }, p) => /* @__PURE__ */ e(
91
- g,
92
- {
93
- ref: p,
94
- type: o,
95
- "data-size": i,
96
- variant: r,
97
- className: n(m({ size: i }), t),
98
- ...a
99
- }
100
- )
101
- );
102
- x.displayName = "InputGroupButton";
103
- const y = s(
104
- ({ className: t, ...o }, r) => /* @__PURE__ */ e(
105
- "span",
106
- {
107
- ref: r,
108
- "data-slot": "input-group-text",
109
- className: n(
110
- "text-muted-foreground flex items-center gap-2 text-xs leading-[14px] tracking-[-0.00833em] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:text-muted-foreground",
111
- t
112
- ),
113
- ...o
114
- }
115
- )
116
- );
117
- y.displayName = "InputGroupText";
118
- const k = s(
119
- ({ className: t, ...o }, r) => /* @__PURE__ */ e(
120
- c,
121
- {
122
- ref: r,
123
- "data-slot": "input-group-control",
124
- className: n(
125
- "min-h-0 h-full min-w-0 flex-1 rounded-lg border-0 shadow-none hover:text-muted-foreground",
126
- "tracking-[-0.04em]",
127
- "focus-visible:not(:read-only):bg-background focus-visible:shadow-none focus-visible:border-transparent",
128
- "read-only:focus-visible:bg-muted-background",
129
- "aria-invalid:shadow-none aria-invalid:border-transparent",
130
- "aria-invalid:[&:not(:placeholder-shown)]:border-transparent",
131
- "aria-invalid:focus-visible:not(:read-only):bg-background aria-invalid:focus-visible:shadow-none aria-invalid:focus-visible:border-transparent",
132
- "read-only:aria-invalid:focus-visible:bg-muted-background",
133
- "hover:border-0",
134
- t
135
- ),
136
- ...o
137
- }
138
- )
139
- );
140
- k.displayName = "InputGroupInput";
141
- const w = s(
142
- ({ className: t, ...o }, r) => /* @__PURE__ */ e(
143
- b,
144
- {
145
- ref: r,
146
- "data-slot": "input-group-control",
147
- className: n(
148
- "min-h-0 flex-1 resize-none rounded-lg border-0 bg-transparent py-3 shadow-none",
149
- "tracking-[-0.04em]",
150
- "hover:border-0 hover:bg-transparent hover:text-muted-foreground",
151
- "filled:border-transparent",
152
- "focus-visible:shadow-none focus-visible:border-transparent",
153
- "read-only:focus-visible:bg-muted-background",
154
- "aria-invalid:shadow-none aria-invalid:border-transparent",
155
- "aria-invalid:[&:not(:placeholder-shown)]:border-transparent",
156
- "aria-invalid:focus-visible:not(:read-only):bg-background aria-invalid:focus-visible:shadow-none aria-invalid:focus-visible:border-transparent",
157
- "read-only:aria-invalid:focus-visible:bg-muted-background",
158
- "read-only:text-muted-foreground [&:read-only:not(:placeholder-shown)]:text-muted-foreground",
159
- t
160
- ),
161
- ...o
162
- }
163
- )
164
- );
165
- w.displayName = "InputGroupTextarea";
166
- export {
167
- h as InputGroup,
168
- f as InputGroupAddon,
169
- x as InputGroupButton,
170
- k as InputGroupInput,
171
- y as InputGroupText,
172
- w as InputGroupTextarea
173
- };
1
+ import { cn as e } from "../../../../lib/utils.js";
2
+ import { Button as t } from "../button/button.js";
3
+ import { Input as n } from "../input/input.js";
4
+ import { Textarea as r } from "../textarea/textarea.js";
5
+ import { forwardRef as i } from "react";
6
+ import { jsx as a } from "react/jsx-runtime";
7
+ import { cva as o } from "class-variance-authority";
8
+ //#region libs/aura/src/components/ui/core/input-group/input-group.tsx
9
+ var s = i(({ className: t, ...n }, r) => /* @__PURE__ */ a("div", {
10
+ ref: r,
11
+ "data-slot": "input-group",
12
+ role: "group",
13
+ className: e("group/input-group bg-muted-background border border-transparent relative flex w-full items-stretch rounded-lg shadow-none transition-[color,box-shadow,border-color,background-color] outline-none", "hover:border-border-emphasized", "h-9 min-w-0 has-[>textarea]:h-auto", "has-[>[data-align=inline-start]]:[&>input]:pl-2 has-[>[data-align=inline-start]]:[&>input]:rounded-l-none has-[>[data-align=inline-start]]:[&>textarea]:rounded-l-none", "has-[>[data-align=inline-end]]:[&>input]:rounded-r-none has-[>[data-align=inline-end]]:[&>textarea]:rounded-r-none", "[&>input]:pr-2 [&>textarea]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[[data-slot=input-group-control]:focus-visible:not(:read-only)]:bg-background has-[[data-slot=input-group-control]:focus-visible:not(:read-only)]:shadow-focus-ring has-[[data-slot=input-group-control]:focus-visible:not(:read-only)]:border-transparent", "has-[[data-slot=input-group-control][aria-invalid=true]:not(:focus-visible)]:shadow-focus-ring-destructive has-[[data-slot=input-group-control][aria-invalid=true]:not(:focus-visible)]:border-transparent", "has-[[data-slot=input-group-control]:read-only]:border-transparent has-[[data-slot=input-group-control]:read-only]:shadow-none", "hover:has-[[data-slot=input-group-control]:read-only]:border-transparent hover:has-[[data-slot=input-group-control]:read-only]:bg-accent-background hover:has-[[data-slot=input-group-control]:read-only]:text-muted-foreground", t),
14
+ ...n
15
+ }));
16
+ s.displayName = "InputGroup";
17
+ var c = "[&>svg:not([class*='size-'])]:size-4 [&>svg]:shrink-0 [&>svg]:text-muted-foreground [&>svg]:transition-colors group-hover/input-group:group-has-[[data-slot=input-group-control]:enabled:not(:read-only)]/input-group:[&>svg]:text-foreground group-has-[[data-slot=input-group-control]:enabled:focus-visible:not(:read-only)]/input-group:[&>svg]:text-foreground group-has-[[data-slot=input-group-control]:enabled:not(:placeholder-shown):not(:read-only)]/input-group:[&>svg]:text-foreground group-has-[[data-slot=input-group-control][aria-invalid=true]:enabled:not(:read-only)]/input-group:[&>svg]:text-foreground group-has-[[data-slot=input-group-control]:read-only:enabled]/input-group:[&>svg]:text-muted-foreground group-has-[[data-slot=input-group-control]:disabled]/input-group:[&>svg]:text-disabled-foreground", l = "[&>svg:not([class*='size-'])]:size-4 [&>svg]:shrink-0 [&>svg]:text-muted-foreground [&>svg]:transition-colors", u = o("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-2 text-xs font-normal select-none [&>kbd]:rounded-sm", {
18
+ variants: { align: {
19
+ "inline-start": e("order-first min-h-0 rounded-l-lg pl-2", c),
20
+ "inline-end": e("order-last min-h-0 rounded-r-lg pr-2 has-[>button]:pr-1 has-[kbd]:pr-1 has-[[class*=stepper]]:pr-1", l),
21
+ "block-start": e("order-first w-full justify-start px-2 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5", c),
22
+ "block-end": e("order-last w-full justify-start px-2 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5", l)
23
+ } },
24
+ defaultVariants: { align: "inline-start" }
25
+ }), d = i(({ className: t, align: n = "inline-start", ...r }, i) => /* @__PURE__ */ a("div", {
26
+ ref: i,
27
+ role: "group",
28
+ "data-slot": "input-group-addon",
29
+ "data-align": n,
30
+ className: e(u({ align: n }), t),
31
+ onClick: (e) => {
32
+ e.target instanceof HTMLElement && e.target.closest("button") || e.target instanceof Node && !e.currentTarget.contains(e.target) || e.currentTarget.parentElement?.querySelector("[data-slot=\"input-group-control\"]")?.focus();
33
+ },
34
+ ...r
35
+ }));
36
+ d.displayName = "InputGroupAddon";
37
+ var f = o("text-sm shadow-none flex gap-2 items-center", {
38
+ variants: { size: {
39
+ xs: "h-6 gap-1 px-2 rounded-sm [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",
40
+ sm: "h-7 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5",
41
+ "icon-xs": "size-6 rounded-xs p-0 has-[>svg]:p-0",
42
+ "icon-sm": "size-7 p-0 has-[>svg]:p-0"
43
+ } },
44
+ defaultVariants: { size: "xs" }
45
+ }), p = i(({ className: n, type: r = "button", variant: i = "ghost", size: o = "xs", ...s }, c) => /* @__PURE__ */ a(t, {
46
+ ref: c,
47
+ type: r,
48
+ "data-size": o,
49
+ variant: i,
50
+ className: e(f({ size: o }), n),
51
+ ...s
52
+ }));
53
+ p.displayName = "InputGroupButton";
54
+ var m = i(({ className: t, ...n }, r) => /* @__PURE__ */ a("span", {
55
+ ref: r,
56
+ "data-slot": "input-group-text",
57
+ className: e("text-muted-foreground flex items-center gap-2 text-xs leading-[14px] tracking-[-0.00833em] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:text-muted-foreground", t),
58
+ ...n
59
+ }));
60
+ m.displayName = "InputGroupText";
61
+ var h = i(({ className: t, ...r }, i) => /* @__PURE__ */ a(n, {
62
+ ref: i,
63
+ "data-slot": "input-group-control",
64
+ className: e("min-h-0 h-full min-w-0 flex-1 rounded-lg border-0 shadow-none hover:text-muted-foreground", "tracking-[-0.04em]", "focus-visible:not(:read-only):bg-background focus-visible:shadow-none focus-visible:border-transparent", "read-only:focus-visible:bg-muted-background", "aria-invalid:shadow-none aria-invalid:border-transparent", "aria-invalid:[&:not(:placeholder-shown)]:border-transparent", "aria-invalid:focus-visible:not(:read-only):bg-background aria-invalid:focus-visible:shadow-none aria-invalid:focus-visible:border-transparent", "read-only:aria-invalid:focus-visible:bg-muted-background", "hover:border-0", t),
65
+ ...r
66
+ }));
67
+ h.displayName = "InputGroupInput";
68
+ var g = i(({ className: t, ...n }, i) => /* @__PURE__ */ a(r, {
69
+ ref: i,
70
+ "data-slot": "input-group-control",
71
+ className: e("min-h-0 flex-1 resize-none rounded-lg border-0 bg-transparent py-3 shadow-none", "tracking-[-0.04em]", "hover:border-0 hover:bg-transparent hover:text-muted-foreground", "filled:border-transparent", "focus-visible:shadow-none focus-visible:border-transparent", "read-only:focus-visible:bg-muted-background", "aria-invalid:shadow-none aria-invalid:border-transparent", "aria-invalid:[&:not(:placeholder-shown)]:border-transparent", "aria-invalid:focus-visible:not(:read-only):bg-background aria-invalid:focus-visible:shadow-none aria-invalid:focus-visible:border-transparent", "read-only:aria-invalid:focus-visible:bg-muted-background", "read-only:text-muted-foreground [&:read-only:not(:placeholder-shown)]:text-muted-foreground", t),
72
+ ...n
73
+ }));
74
+ g.displayName = "InputGroupTextarea";
75
+ //#endregion
76
+ export { s as InputGroup, d as InputGroupAddon, p as InputGroupButton, h as InputGroupInput, m as InputGroupText, g as InputGroupTextarea };
@@ -1,36 +1,20 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as n } from "react";
3
- import { cn as d } from "../../../../lib/utils.js";
4
- const i = n(
5
- ({ className: t, ...e }, o) => /* @__PURE__ */ a(
6
- "kbd",
7
- {
8
- ref: o,
9
- "data-slot": "kbd",
10
- className: d(
11
- "bg-muted-background text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-md px-1 font-sans text-xs font-medium leading-4 select-none aria-disabled:bg-disabled-background aria-disabled:text-disabled-foreground aria-disabled:opacity-100",
12
- "[&_svg:not([class*='size-'])]:size-3",
13
- "in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10",
14
- t
15
- ),
16
- ...e
17
- }
18
- )
19
- );
20
- i.displayName = "Kbd";
21
- const r = n(
22
- ({ className: t, ...e }, o) => /* @__PURE__ */ a(
23
- "span",
24
- {
25
- ref: o,
26
- "data-slot": "kbd-group",
27
- className: d("inline-flex items-center gap-1", t),
28
- ...e
29
- }
30
- )
31
- );
32
- r.displayName = "KbdGroup";
33
- export {
34
- i as Kbd,
35
- r as KbdGroup
36
- };
1
+ import { cn as e } from "../../../../lib/utils.js";
2
+ import { forwardRef as t } from "react";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ //#region libs/aura/src/components/ui/core/kbd/kbd.tsx
5
+ var r = t(({ className: t, ...r }, i) => /* @__PURE__ */ n("kbd", {
6
+ ref: i,
7
+ "data-slot": "kbd",
8
+ className: e("bg-muted-background text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-md px-1 font-sans text-xs font-medium leading-4 select-none aria-disabled:bg-disabled-background aria-disabled:text-disabled-foreground aria-disabled:opacity-100", "[&_svg:not([class*='size-'])]:size-3", "in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10", t),
9
+ ...r
10
+ }));
11
+ r.displayName = "Kbd";
12
+ var i = t(({ className: t, ...r }, i) => /* @__PURE__ */ n("span", {
13
+ ref: i,
14
+ "data-slot": "kbd-group",
15
+ className: e("inline-flex items-center gap-1", t),
16
+ ...r
17
+ }));
18
+ i.displayName = "KbdGroup";
19
+ //#endregion
20
+ export { r as Kbd, i as KbdGroup };
@@ -1,43 +1,26 @@
1
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as i } from "react";
3
- import { cn as s } from "../../../../lib/utils.js";
4
- const n = i(
5
- ({ className: t, children: r, required: a = !1, ...d }, l) => /* @__PURE__ */ o(
6
- "label",
7
- {
8
- ref: l,
9
- "data-slot": "label",
10
- className: s(
11
- "flex items-center text-muted-foreground dark:text-muted-foreground text-sm font-medium leading-4.5 pb-2 select-none group-data-[disabled=true]:disabled-foreground group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:cursor-not-allowed group-data-[disabled=true]:opacity-50",
12
- t
13
- ),
14
- ...d,
15
- children: [
16
- r,
17
- a ? /* @__PURE__ */ e(
18
- "span",
19
- {
20
- "data-slot": "label-required-indicator",
21
- className: "inline-block shrink-0 self-start pt-0.5",
22
- children: /* @__PURE__ */ e(
23
- "svg",
24
- {
25
- "aria-hidden": "true",
26
- width: "5",
27
- height: "8",
28
- viewBox: "0 0 5 8",
29
- fill: "currentColor",
30
- xmlns: "http://www.w3.org/2000/svg",
31
- children: /* @__PURE__ */ e("path", { d: "M2.01082 7.19387L2.09648 5.29125L0.491434 6.32372L0 5.46709L1.70424 4.59693L0 3.72678L0.491434 2.87015L2.09648 3.90261L2.01082 2H2.98918L2.90352 3.90261L4.50857 2.87015L5 3.72678L3.29576 4.59693L5 5.46709L4.50857 6.32372L2.90352 5.29125L2.98918 7.19387H2.01082Z" })
32
- }
33
- )
34
- }
35
- ) : null
36
- ]
37
- }
38
- )
39
- );
40
- n.displayName = "Label";
41
- export {
42
- n as Label
43
- };
1
+ import { cn as e } from "../../../../lib/utils.js";
2
+ import { forwardRef as t } from "react";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ //#region libs/aura/src/components/ui/core/label/label.tsx
5
+ var i = t(({ className: t, children: i, required: a = !1, ...o }, s) => /* @__PURE__ */ r("label", {
6
+ ref: s,
7
+ "data-slot": "label",
8
+ className: e("flex items-center text-muted-foreground dark:text-muted-foreground text-sm font-medium leading-4.5 pb-2 select-none group-data-[disabled=true]:disabled-foreground group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:cursor-not-allowed group-data-[disabled=true]:opacity-50", t),
9
+ ...o,
10
+ children: [i, a ? /* @__PURE__ */ n("span", {
11
+ "data-slot": "label-required-indicator",
12
+ className: "inline-block shrink-0 self-start pt-0.5",
13
+ children: /* @__PURE__ */ n("svg", {
14
+ "aria-hidden": "true",
15
+ width: "5",
16
+ height: "8",
17
+ viewBox: "0 0 5 8",
18
+ fill: "currentColor",
19
+ xmlns: "http://www.w3.org/2000/svg",
20
+ children: /* @__PURE__ */ n("path", { d: "M2.01082 7.19387L2.09648 5.29125L0.491434 6.32372L0 5.46709L1.70424 4.59693L0 3.72678L0.491434 2.87015L2.09648 3.90261L2.01082 2H2.98918L2.90352 3.90261L4.50857 2.87015L5 3.72678L3.29576 4.59693L5 5.46709L4.50857 6.32372L2.90352 5.29125L2.98918 7.19387H2.01082Z" })
21
+ })
22
+ }) : null]
23
+ }));
24
+ i.displayName = "Label";
25
+ //#endregion
26
+ export { i as Label };
@@ -1,118 +1,81 @@
1
- import { jsx as a, jsxs as l } from "react/jsx-runtime";
2
- import { forwardRef as h } from "react";
3
- import { cn as s } from "../../../../lib/utils.js";
4
- const n = ({
5
- size: e = 16,
6
- className: r,
7
- strokeClassName: t
8
- }) => /* @__PURE__ */ l(
9
- "svg",
10
- {
11
- "aria-hidden": "true",
12
- focusable: "false",
13
- className: s("overflow-visible", t, r),
14
- height: e,
15
- viewBox: "0 0 167 216",
16
- width: e,
17
- xmlns: "http://www.w3.org/2000/svg",
18
- children: [
19
- /* @__PURE__ */ a(
20
- "rect",
21
- {
22
- className: "aura-loader-rect aura-loader-rect-1",
23
- "data-slot": "loader-rect",
24
- x: "10",
25
- y: "10",
26
- width: "98",
27
- height: "196",
28
- rx: "49",
29
- fill: "transparent",
30
- stroke: "currentColor",
31
- strokeWidth: "20",
32
- strokeLinecap: "round"
33
- }
34
- ),
35
- /* @__PURE__ */ a(
36
- "rect",
37
- {
38
- className: "aura-loader-rect aura-loader-rect-2",
39
- "data-slot": "loader-rect",
40
- x: "59",
41
- y: "10",
42
- width: "98",
43
- height: "196",
44
- rx: "49",
45
- fill: "transparent",
46
- stroke: "currentColor",
47
- strokeWidth: "20",
48
- strokeLinecap: "round"
49
- }
50
- )
51
- ]
52
- }
53
- ), x = (e) => e.variant === "page", g = h((e, r) => {
54
- const t = e.className, i = e.role ?? "status", o = e["aria-label"] ?? "Loading";
55
- if (!x(e)) {
56
- const {
57
- size: u = 16,
58
- variant: b,
59
- className: k,
60
- role: L,
61
- "aria-label": y,
62
- ...f
63
- } = e;
64
- return /* @__PURE__ */ a(
65
- "div",
66
- {
67
- ref: r,
68
- "data-slot": "loader",
69
- role: i,
70
- "aria-label": o,
71
- className: s("inline-flex items-center justify-center", t),
72
- ...f,
73
- children: /* @__PURE__ */ a(n, { size: u, strokeClassName: "text-current" })
74
- }
75
- );
76
- }
77
- const {
78
- variant: N,
79
- className: v,
80
- role: w,
81
- "aria-label": p,
82
- header: d,
83
- description: c,
84
- ...m
85
- } = e;
86
- return /* @__PURE__ */ l(
87
- "div",
88
- {
89
- ref: r,
90
- "data-slot": "loader",
91
- role: i,
92
- "aria-label": o,
93
- className: s(
94
- "text-foreground flex h-[11.5rem] w-80 flex-col items-center justify-center gap-2",
95
- t
96
- ),
97
- ...m,
98
- children: [
99
- /* @__PURE__ */ a(
100
- n,
101
- {
102
- size: 112,
103
- className: "size-28",
104
- strokeClassName: "text-current"
105
- }
106
- ),
107
- /* @__PURE__ */ l("div", { className: "flex w-full flex-col items-center justify-center gap-1 text-center", children: [
108
- /* @__PURE__ */ a("p", { className: "text-lg font-medium leading-6 tracking-tightest text-foreground", children: d }),
109
- c && /* @__PURE__ */ a("p", { className: "w-full text-sm leading-[18px] tracking-tight text-secondary-foreground", children: c })
110
- ] })
111
- ]
112
- }
113
- );
1
+ import { cn as e } from "../../../../lib/utils.js";
2
+ import { forwardRef as t } from "react";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ //#region libs/aura/src/components/ui/core/loader/loader.tsx
5
+ var i = ({ size: t = 16, className: i, strokeClassName: a }) => /* @__PURE__ */ r("svg", {
6
+ "aria-hidden": "true",
7
+ focusable: "false",
8
+ className: e("overflow-visible", a, i),
9
+ height: t,
10
+ viewBox: "0 0 167 216",
11
+ width: t,
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ children: [/* @__PURE__ */ n("rect", {
14
+ className: "aura-loader-rect aura-loader-rect-1",
15
+ "data-slot": "loader-rect",
16
+ x: "10",
17
+ y: "10",
18
+ width: "98",
19
+ height: "196",
20
+ rx: "49",
21
+ fill: "transparent",
22
+ stroke: "currentColor",
23
+ strokeWidth: "20",
24
+ strokeLinecap: "round"
25
+ }), /* @__PURE__ */ n("rect", {
26
+ className: "aura-loader-rect aura-loader-rect-2",
27
+ "data-slot": "loader-rect",
28
+ x: "59",
29
+ y: "10",
30
+ width: "98",
31
+ height: "196",
32
+ rx: "49",
33
+ fill: "transparent",
34
+ stroke: "currentColor",
35
+ strokeWidth: "20",
36
+ strokeLinecap: "round"
37
+ })]
38
+ }), a = (e) => e.variant === "page", o = t((t, o) => {
39
+ let s = t.className, c = t.role ?? "status", l = t["aria-label"] ?? "Loading";
40
+ if (!a(t)) {
41
+ let { size: r = 16, variant: a, className: u, role: d, "aria-label": f, ...p } = t;
42
+ return /* @__PURE__ */ n("div", {
43
+ ref: o,
44
+ "data-slot": "loader",
45
+ role: c,
46
+ "aria-label": l,
47
+ className: e("inline-flex items-center justify-center", s),
48
+ ...p,
49
+ children: /* @__PURE__ */ n(i, {
50
+ size: r,
51
+ strokeClassName: "text-current"
52
+ })
53
+ });
54
+ }
55
+ let { variant: u, className: d, role: f, "aria-label": p, header: m, description: h, ...g } = t;
56
+ return /* @__PURE__ */ r("div", {
57
+ ref: o,
58
+ "data-slot": "loader",
59
+ role: c,
60
+ "aria-label": l,
61
+ className: e("text-foreground flex h-[11.5rem] w-80 flex-col items-center justify-center gap-2", s),
62
+ ...g,
63
+ children: [/* @__PURE__ */ n(i, {
64
+ size: 112,
65
+ className: "size-28",
66
+ strokeClassName: "text-current"
67
+ }), /* @__PURE__ */ r("div", {
68
+ className: "flex w-full flex-col items-center justify-center gap-1 text-center",
69
+ children: [/* @__PURE__ */ n("p", {
70
+ className: "text-lg font-medium leading-6 tracking-tightest text-foreground",
71
+ children: m
72
+ }), h && /* @__PURE__ */ n("p", {
73
+ className: "w-full text-sm leading-[18px] tracking-tight text-secondary-foreground",
74
+ children: h
75
+ })]
76
+ })]
77
+ });
114
78
  });
115
- g.displayName = "Loader";
116
- export {
117
- g as Loader
118
- };
79
+ o.displayName = "Loader";
80
+ //#endregion
81
+ export { o as Loader };
@@ -1,13 +1,13 @@
1
- const e = {
2
- code: !1,
3
- table: !1,
4
- mermaid: {
5
- copy: !0,
6
- download: !0,
7
- fullscreen: !1,
8
- panZoom: !0
9
- }
10
- };
11
- export {
12
- e as MESSAGE_RESPONSE_DEFAULT_STREAMDOWN_CONTROLS
1
+ //#region libs/aura/src/components/ui/core/message/message-response-default-streamdown-controls.ts
2
+ var e = {
3
+ code: !1,
4
+ table: !1,
5
+ mermaid: {
6
+ copy: !0,
7
+ download: !0,
8
+ fullscreen: !1,
9
+ panZoom: !0
10
+ }
13
11
  };
12
+ //#endregion
13
+ export { e as MESSAGE_RESPONSE_DEFAULT_STREAMDOWN_CONTROLS };
@@ -1,4 +1,4 @@
1
- import { ComponentProps, HTMLAttributes, MemoExoticComponent, ReactNode } from 'react';
1
+ import { ComponentProps, HTMLAttributes, ReactNode } from 'react';
2
2
  import { JSX } from 'react/jsx-runtime';
3
3
  import { Streamdown } from 'streamdown';
4
4
  import { FileUIPart, UIMessage } from '../../../../lib/ai/types';
@@ -42,7 +42,7 @@ declare const MessageBranchNext: ({ children, ...props }: MessageBranchNextProps
42
42
  type MessageBranchPageProps = HTMLAttributes<HTMLSpanElement>;
43
43
  declare const MessageBranchPage: ({ className, ...props }: MessageBranchPageProps) => ReactNode;
44
44
  type MessageResponseProps = ComponentProps<typeof Streamdown>;
45
- declare const MessageResponse: MemoExoticComponent<({ className, components, plugins, controls, ...props }: MessageResponseProps) => JSX.Element>;
45
+ declare const MessageResponse: ({ className, components, plugins, controls, ...props }: MessageResponseProps) => JSX.Element;
46
46
  type MessageAttachmentProps = HTMLAttributes<HTMLDivElement> & {
47
47
  data: FileUIPart;
48
48
  className?: string;