@cognite/aura 0.2.0 → 0.3.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 (239) hide show
  1. package/DESIGN.md +869 -870
  2. package/README.md +143 -9
  3. package/dist/colors.css +30 -0
  4. package/dist/components/index.d.ts +7 -36
  5. package/dist/components/index.js +319 -350
  6. package/dist/components/ui/core/accordion/accordion.d.ts +7 -7
  7. package/dist/components/ui/core/accordion/accordion.js +49 -47
  8. package/dist/components/ui/core/action-toolbar/action-toolbar.d.ts +41 -0
  9. package/dist/components/ui/core/action-toolbar/action-toolbar.js +176 -0
  10. package/dist/components/ui/core/alert/alert.d.ts +23 -12
  11. package/dist/components/ui/core/alert/alert.js +123 -120
  12. package/dist/components/ui/core/avatar/avatar.d.ts +12 -8
  13. package/dist/components/ui/core/badge/badge.d.ts +11 -8
  14. package/dist/components/ui/core/banner/banner.d.ts +18 -28
  15. package/dist/components/ui/core/breadcrumb/breadcrumb.d.ts +10 -9
  16. package/dist/components/ui/core/breadcrumb/breadcrumb.js +98 -88
  17. package/dist/components/ui/core/button/button.d.ts +8 -5
  18. package/dist/components/ui/core/button/button.js +22 -19
  19. package/dist/components/ui/core/button-group/button-group.d.ts +7 -6
  20. package/dist/components/ui/core/card/card.d.ts +17 -16
  21. package/dist/components/ui/core/chart/chart.d.ts +69 -0
  22. package/dist/components/ui/core/chart/chart.js +215 -0
  23. package/dist/components/ui/core/chart/index.d.ts +2 -0
  24. package/dist/components/ui/core/chart/index.js +8 -0
  25. package/dist/components/ui/core/checkbox/checkbox.d.ts +13 -9
  26. package/dist/components/ui/core/checkbox/checkbox.js +32 -28
  27. package/dist/components/ui/core/code-block/code-block.d.ts +6 -9
  28. package/dist/components/ui/core/code-block/code-block.js +48 -44
  29. package/dist/components/ui/core/collapsible/collapsible.d.ts +5 -3
  30. package/dist/components/ui/core/combobox/combobox.d.ts +2 -2
  31. package/dist/components/ui/core/command/command.d.ts +11 -78
  32. package/dist/components/ui/core/command/command.js +53 -52
  33. package/dist/components/ui/core/count/count.d.ts +7 -6
  34. package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.d.ts +15 -0
  35. package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +84 -0
  36. package/dist/components/ui/core/date-time-pickers/date-picker/index.d.ts +3 -0
  37. package/dist/components/ui/core/date-time-pickers/date-picker/types.d.ts +18 -0
  38. package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.d.ts +3 -0
  39. package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +63 -0
  40. package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.d.ts +15 -0
  41. package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +99 -0
  42. package/dist/components/ui/core/date-time-pickers/date-range-picker/index.d.ts +3 -0
  43. package/dist/components/ui/core/date-time-pickers/date-range-picker/types.d.ts +25 -0
  44. package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.d.ts +4 -0
  45. package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js +82 -0
  46. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.d.ts +17 -0
  47. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +190 -0
  48. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.d.ts +3 -0
  49. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.d.ts +42 -0
  50. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.d.ts +3 -0
  51. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js +161 -0
  52. package/dist/components/ui/core/date-time-pickers/index.d.ts +8 -0
  53. package/dist/components/ui/core/date-time-pickers/index.js +8 -0
  54. package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.d.ts +7 -0
  55. package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js +57 -0
  56. package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.d.ts +13 -0
  57. package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.js +119 -0
  58. package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.d.ts +10 -0
  59. package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.js +93 -0
  60. package/dist/components/ui/core/date-time-pickers/shared/constants.d.ts +20 -0
  61. package/dist/components/ui/core/date-time-pickers/shared/constants.js +14 -0
  62. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.d.ts +19 -0
  63. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js +99 -0
  64. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.d.ts +12 -0
  65. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js +68 -0
  66. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.d.ts +12 -0
  67. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js +40 -0
  68. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.d.ts +29 -0
  69. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js +63 -0
  70. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.d.ts +8 -0
  71. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js +19 -0
  72. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.d.ts +23 -0
  73. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +32 -0
  74. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.d.ts +17 -0
  75. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js +34 -0
  76. package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.d.ts +8 -0
  77. package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js +7 -0
  78. package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.d.ts +13 -0
  79. package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js +31 -0
  80. package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.d.ts +10 -0
  81. package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js +52 -0
  82. package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.d.ts +48 -0
  83. package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.js +52 -0
  84. package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.d.ts +26 -0
  85. package/dist/components/ui/core/date-time-pickers/utils/format-utils.d.ts +37 -0
  86. package/dist/components/ui/core/date-time-pickers/utils/segment-utils.d.ts +34 -0
  87. package/dist/components/ui/core/date-time-pickers/utils/time-utils.d.ts +43 -0
  88. package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +15 -0
  89. package/dist/components/ui/core/date-time-pickers/utils/time-validation.d.ts +23 -0
  90. package/dist/components/ui/core/dialog/dialog.d.ts +10 -10
  91. package/dist/components/ui/core/dialog/dialog.js +12 -3
  92. package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +24 -47
  93. package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +125 -123
  94. package/dist/components/ui/core/empty-state/empty-state.context.d.ts +10 -0
  95. package/dist/components/ui/core/empty-state/empty-state.context.js +8 -0
  96. package/dist/components/ui/core/empty-state/empty-state.d.ts +18 -0
  97. package/dist/components/ui/core/empty-state/empty-state.js +139 -0
  98. package/dist/components/ui/core/helper-text/helper-text.d.ts +7 -5
  99. package/dist/components/ui/core/hover-card/hover-card.d.ts +5 -7
  100. package/dist/components/ui/core/hover-card/hover-card.js +23 -22
  101. package/dist/components/ui/core/inline-citation/inline-citation.d.ts +10 -10
  102. package/dist/components/ui/core/inline-citation/inline-citation.js +57 -49
  103. package/dist/components/ui/core/input/input.d.ts +2 -1
  104. package/dist/components/ui/core/input/input.js +1 -1
  105. package/dist/components/ui/core/input-group/input-group.d.ts +17 -13
  106. package/dist/components/ui/core/input-group/input-group.js +35 -36
  107. package/dist/components/ui/core/kbd/kbd.d.ts +3 -2
  108. package/dist/components/ui/core/label/label.d.ts +3 -2
  109. package/dist/components/ui/core/loader/loader.d.ts +2 -2
  110. package/dist/components/ui/core/message/message.d.ts +18 -17
  111. package/dist/components/ui/core/message/message.js +387 -99
  112. package/dist/components/ui/core/pagination/pagination-size-context.d.ts +5 -0
  113. package/dist/components/ui/core/pagination/pagination-size-context.js +6 -0
  114. package/dist/components/ui/core/pagination/pagination-teleport.d.ts +11 -0
  115. package/dist/components/ui/core/pagination/pagination-teleport.js +108 -0
  116. package/dist/components/ui/core/pagination/pagination-teleport.utils.d.ts +1 -0
  117. package/dist/components/ui/core/pagination/pagination-teleport.utils.js +7 -0
  118. package/dist/components/ui/core/pagination/pagination.d.ts +41 -0
  119. package/dist/components/ui/core/pagination/pagination.js +337 -0
  120. package/dist/components/ui/core/popover/popover.d.ts +12 -16
  121. package/dist/components/ui/core/popover/popover.js +52 -51
  122. package/dist/components/ui/core/progress/progress.d.ts +7 -4
  123. package/dist/components/ui/core/prompt-input/prompt-input.d.ts +36 -103
  124. package/dist/components/ui/core/prompt-input/prompt-input.js +180 -167
  125. package/dist/components/ui/core/radio-group/radio-group.d.ts +12 -8
  126. package/dist/components/ui/core/radio-group/radio-group.js +56 -53
  127. package/dist/components/ui/core/reasoning/reasoning.d.ts +5 -5
  128. package/dist/components/ui/core/scroll-area/scroll-area.d.ts +4 -2
  129. package/dist/components/ui/core/search/search.d.ts +10 -0
  130. package/dist/components/ui/core/search/search.js +99 -0
  131. package/dist/components/ui/core/segmented-control/segmented-control.d.ts +15 -11
  132. package/dist/components/ui/core/segmented-control/segmented-control.js +4 -1
  133. package/dist/components/ui/core/select/select.d.ts +15 -14
  134. package/dist/components/ui/core/select/select.js +135 -108
  135. package/dist/components/ui/core/separator/separator.d.ts +2 -4
  136. package/dist/components/ui/core/separator/separator.js +4 -5
  137. package/dist/components/ui/core/shimmer/shimmer.d.ts +5 -5
  138. package/dist/components/ui/core/shimmer/shimmer.js +91 -52
  139. package/dist/components/ui/core/skeleton/skeleton.d.ts +2 -1
  140. package/dist/components/ui/core/sonner-toast/sonner-toast.d.ts +2 -1
  141. package/dist/components/ui/core/sources/sources.d.ts +3 -3
  142. package/dist/components/ui/core/sources/sources.js +6 -1
  143. package/dist/components/ui/core/switch/switch.d.ts +11 -0
  144. package/dist/components/ui/core/{button/button.metadata.d.ts → switch/switch.metadata.d.ts} +1 -1
  145. package/dist/components/ui/core/tabs/tabs.d.ts +21 -17
  146. package/dist/components/ui/core/tabs/tabs.js +11 -9
  147. package/dist/components/ui/core/textarea/textarea.d.ts +2 -1
  148. package/dist/components/ui/core/textarea/textarea.js +20 -18
  149. package/dist/components/ui/core/toggle/toggle.d.ts +15 -0
  150. package/dist/components/ui/core/toggle/toggle.js +74 -0
  151. package/dist/components/ui/core/tool/tool.d.ts +7 -6
  152. package/dist/components/ui/core/tool/tool.js +47 -43
  153. package/dist/components/ui/core/tooltip/tooltip.d.ts +6 -5
  154. package/dist/components/ui/core/tooltip/tooltip.js +10 -8
  155. package/dist/components/ui/core/topbar/topbar.d.ts +11 -13
  156. package/dist/eslint/index.d.ts +2 -1
  157. package/dist/index.d.ts +1 -1
  158. package/dist/lib/portal-container-context.d.ts +2 -1
  159. package/dist/lib/portal-container-context.js +3 -5
  160. package/dist/lib/utils.d.ts +1 -1
  161. package/dist/lib/utils.js +7 -7
  162. package/dist/styles.css +1 -1
  163. package/dist/styles.source.css +12 -1
  164. package/package.json +217 -14
  165. package/dist/components/ui/core/accordion/accordion.metadata.d.ts +0 -2
  166. package/dist/components/ui/core/accordion/accordion.metadata.js +0 -9
  167. package/dist/components/ui/core/alert/alert.metadata.d.ts +0 -2
  168. package/dist/components/ui/core/alert/alert.metadata.js +0 -9
  169. package/dist/components/ui/core/avatar/avatar.metadata.d.ts +0 -8
  170. package/dist/components/ui/core/avatar/avatar.metadata.js +0 -9
  171. package/dist/components/ui/core/badge/badge.metadata.d.ts +0 -2
  172. package/dist/components/ui/core/badge/badge.metadata.js +0 -8
  173. package/dist/components/ui/core/banner/banner.metadata.d.ts +0 -2
  174. package/dist/components/ui/core/banner/banner.metadata.js +0 -9
  175. package/dist/components/ui/core/breadcrumb/breadcrumb.metadata.d.ts +0 -2
  176. package/dist/components/ui/core/breadcrumb/breadcrumb.metadata.js +0 -9
  177. package/dist/components/ui/core/button/button.metadata.js +0 -9
  178. package/dist/components/ui/core/button-group/button-group.metadata.d.ts +0 -2
  179. package/dist/components/ui/core/button-group/button-group.metadata.js +0 -8
  180. package/dist/components/ui/core/card/card.metadata.d.ts +0 -8
  181. package/dist/components/ui/core/card/card.metadata.js +0 -9
  182. package/dist/components/ui/core/code-block/code-block.metadata.d.ts +0 -2
  183. package/dist/components/ui/core/code-block/code-block.metadata.js +0 -8
  184. package/dist/components/ui/core/collapsible/collapsible.metadata.d.ts +0 -2
  185. package/dist/components/ui/core/collapsible/collapsible.metadata.js +0 -9
  186. package/dist/components/ui/core/combobox/combobox.metadata.d.ts +0 -2
  187. package/dist/components/ui/core/command/command.metadata.d.ts +0 -2
  188. package/dist/components/ui/core/command/command.metadata.js +0 -9
  189. package/dist/components/ui/core/dialog/dialog.metadata.d.ts +0 -2
  190. package/dist/components/ui/core/dialog/dialog.metadata.js +0 -9
  191. package/dist/components/ui/core/dropdown-menu/dropdown-menu.metadata.d.ts +0 -2
  192. package/dist/components/ui/core/dropdown-menu/dropdown-menu.metadata.js +0 -9
  193. package/dist/components/ui/core/helper-text/helper-text.metadata.d.ts +0 -2
  194. package/dist/components/ui/core/helper-text/helper-text.metadata.js +0 -9
  195. package/dist/components/ui/core/hover-card/hover-card.metadata.d.ts +0 -2
  196. package/dist/components/ui/core/hover-card/hover-card.metadata.js +0 -8
  197. package/dist/components/ui/core/inline-citation/inline-citation.metadata.d.ts +0 -2
  198. package/dist/components/ui/core/inline-citation/inline-citation.metadata.js +0 -8
  199. package/dist/components/ui/core/input/input.metadata.d.ts +0 -2
  200. package/dist/components/ui/core/input/input.metadata.js +0 -9
  201. package/dist/components/ui/core/input-group/input-group.metadata.d.ts +0 -2
  202. package/dist/components/ui/core/input-group/input-group.metadata.js +0 -9
  203. package/dist/components/ui/core/kbd/kbd.metadata.d.ts +0 -2
  204. package/dist/components/ui/core/kbd/kbd.metadata.js +0 -9
  205. package/dist/components/ui/core/label/label.metadata.d.ts +0 -2
  206. package/dist/components/ui/core/label/label.metadata.js +0 -9
  207. package/dist/components/ui/core/loader/loader.metadata.d.ts +0 -2
  208. package/dist/components/ui/core/loader/loader.metadata.js +0 -9
  209. package/dist/components/ui/core/message/message.metadata.d.ts +0 -2
  210. package/dist/components/ui/core/popover/popover.metadata.d.ts +0 -2
  211. package/dist/components/ui/core/popover/popover.metadata.js +0 -9
  212. package/dist/components/ui/core/progress/progress.metadata.d.ts +0 -2
  213. package/dist/components/ui/core/progress/progress.metadata.js +0 -9
  214. package/dist/components/ui/core/prompt-input/prompt-input.metadata.d.ts +0 -2
  215. package/dist/components/ui/core/prompt-input/prompt-input.metadata.js +0 -9
  216. package/dist/components/ui/core/radio-group/radio-group.metadata.d.ts +0 -2
  217. package/dist/components/ui/core/radio-group/radio-group.metadata.js +0 -9
  218. package/dist/components/ui/core/reasoning/reasoning.metadata.d.ts +0 -2
  219. package/dist/components/ui/core/reasoning/reasoning.metadata.js +0 -8
  220. package/dist/components/ui/core/scroll-area/scroll-area.metadata.d.ts +0 -2
  221. package/dist/components/ui/core/scroll-area/scroll-area.metadata.js +0 -9
  222. package/dist/components/ui/core/select/select.metadata.d.ts +0 -2
  223. package/dist/components/ui/core/select/select.metadata.js +0 -9
  224. package/dist/components/ui/core/separator/separator.metadata.d.ts +0 -2
  225. package/dist/components/ui/core/separator/separator.metadata.js +0 -8
  226. package/dist/components/ui/core/shimmer/shimmer.metadata.d.ts +0 -2
  227. package/dist/components/ui/core/shimmer/shimmer.metadata.js +0 -9
  228. package/dist/components/ui/core/skeleton/skeleton.metadata.d.ts +0 -2
  229. package/dist/components/ui/core/skeleton/skeleton.metadata.js +0 -9
  230. package/dist/components/ui/core/sonner-toast/sonner-toast.metadata.d.ts +0 -2
  231. package/dist/components/ui/core/sonner-toast/sonner-toast.metadata.js +0 -9
  232. package/dist/components/ui/core/sources/sources.metadata.d.ts +0 -2
  233. package/dist/components/ui/core/textarea/textarea.metadata.d.ts +0 -2
  234. package/dist/components/ui/core/textarea/textarea.metadata.js +0 -9
  235. package/dist/components/ui/core/tool/tool.metadata.d.ts +0 -2
  236. package/dist/components/ui/core/tool/tool.metadata.js +0 -8
  237. package/dist/components/ui/core/tooltip/tooltip.metadata.d.ts +0 -8
  238. package/dist/components/ui/core/tooltip/tooltip.metadata.js +0 -9
  239. package/dist/index.js +0 -342
@@ -1,5 +1,5 @@
1
- import { ComponentProps } from 'react';
2
- import { Accordion as AccordionPrimitive } from '@base-ui/react/accordion';
1
+ import { ForwardRefExoticComponent, RefAttributes, ComponentProps } from 'react';
2
+ import { AccordionItemProps, AccordionPanelProps, AccordionTriggerProps, Accordion as AccordionPrimitive } from '@base-ui/react/accordion';
3
3
  import { Icon } from '@tabler/icons-react';
4
4
  type AccordionCommonProps = Omit<ComponentProps<typeof AccordionPrimitive.Root>, 'multiple' | 'value' | 'defaultValue' | 'onValueChange'>;
5
5
  type AccordionSingleProps = {
@@ -15,10 +15,10 @@ type AccordionMultipleProps = {
15
15
  defaultValue?: string[];
16
16
  onValueChange?: (value: string[]) => void;
17
17
  };
18
- declare const Accordion: import('react').ForwardRefExoticComponent<(Omit<AccordionCommonProps & AccordionSingleProps, "ref"> | Omit<AccordionCommonProps & AccordionMultipleProps, "ref">) & import('react').RefAttributes<HTMLDivElement>>;
19
- declare const AccordionItem: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').AccordionItemProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
20
- declare const AccordionTrigger: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').AccordionTriggerProps & {
18
+ declare const Accordion: ForwardRefExoticComponent<Omit<AccordionCommonProps, 'ref'> & (AccordionSingleProps | AccordionMultipleProps) & RefAttributes<HTMLDivElement>>;
19
+ declare const AccordionItem: ForwardRefExoticComponent<Omit<AccordionItemProps, 'ref'> & RefAttributes<HTMLDivElement>>;
20
+ declare const AccordionTrigger: ForwardRefExoticComponent<Omit<AccordionTriggerProps & {
21
21
  icon?: Icon;
22
- }, "ref"> & import('react').RefAttributes<HTMLElement>>;
23
- declare const AccordionContent: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').AccordionPanelProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
22
+ }, 'ref'> & RefAttributes<HTMLElement>>;
23
+ declare const AccordionContent: ForwardRefExoticComponent<Omit<AccordionPanelProps, 'ref'> & RefAttributes<HTMLDivElement>>;
24
24
  export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -3,63 +3,65 @@ import { forwardRef as d } from "react";
3
3
  import { Accordion as r } from "@base-ui/react/accordion";
4
4
  import { IconChevronDown as A } from "@tabler/icons-react";
5
5
  import { cn as u } from "../../../../lib/utils.js";
6
- const C = d((e, t) => {
7
- if (e.type === "multiple") {
6
+ const C = d(
7
+ (e, t) => {
8
+ if (e.type === "multiple") {
9
+ const {
10
+ type: s,
11
+ value: c,
12
+ defaultValue: b,
13
+ onValueChange: m,
14
+ ...x
15
+ } = e;
16
+ return /* @__PURE__ */ o(
17
+ r.Root,
18
+ {
19
+ ref: t,
20
+ "data-slot": "accordion",
21
+ multiple: !0,
22
+ value: c,
23
+ defaultValue: b,
24
+ onValueChange: (y) => {
25
+ if (!m) return;
26
+ const N = y.filter(
27
+ (V) => V != null
28
+ );
29
+ m(N);
30
+ },
31
+ ...x
32
+ }
33
+ );
34
+ }
8
35
  const {
9
- type: s,
10
- value: c,
11
- defaultValue: b,
12
- onValueChange: m,
13
- ...x
14
- } = e;
36
+ type: n,
37
+ collapsible: i = !1,
38
+ value: l,
39
+ defaultValue: a,
40
+ onValueChange: g,
41
+ ...p
42
+ } = e, h = l === void 0 ? void 0 : l === "" ? [] : [l], v = a === void 0 ? void 0 : a === "" ? [] : [a];
15
43
  return /* @__PURE__ */ o(
16
44
  r.Root,
17
45
  {
18
46
  ref: t,
19
47
  "data-slot": "accordion",
20
- multiple: !0,
21
- value: c,
22
- defaultValue: b,
23
- onValueChange: (y) => {
24
- if (!m) return;
25
- const N = y.filter(
26
- (V) => V != null
27
- );
28
- m(N);
48
+ multiple: !1,
49
+ value: h,
50
+ defaultValue: v,
51
+ onValueChange: (s, c) => {
52
+ if (g) {
53
+ if (!i && s.length === 0) {
54
+ c.cancel();
55
+ return;
56
+ }
57
+ g(s[0] ?? "");
58
+ }
29
59
  },
30
- ...x
60
+ ...p
31
61
  }
32
62
  );
33
63
  }
34
- const {
35
- type: n,
36
- collapsible: i = !1,
37
- value: l,
38
- defaultValue: a,
39
- onValueChange: g,
40
- ...p
41
- } = e, h = l === void 0 ? void 0 : l === "" ? [] : [l], v = a === void 0 ? void 0 : a === "" ? [] : [a];
42
- return /* @__PURE__ */ o(
43
- r.Root,
44
- {
45
- ref: t,
46
- "data-slot": "accordion",
47
- multiple: !1,
48
- value: h,
49
- defaultValue: v,
50
- onValueChange: (s, c) => {
51
- if (g) {
52
- if (!i && s.length === 0) {
53
- c.cancel();
54
- return;
55
- }
56
- g(s[0] ?? "");
57
- }
58
- },
59
- ...p
60
- }
61
- );
62
- });
64
+ );
63
65
  C.displayName = "Accordion";
64
66
  const w = d(({ className: e, ...t }, n) => /* @__PURE__ */ o(
65
67
  r.Item,
@@ -0,0 +1,41 @@
1
+ import { ForwardRefExoticComponent, RefAttributes, ComponentProps, ReactNode } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { ClassProp } from 'class-variance-authority/types';
4
+ import { Button } from '../button/button';
5
+ interface ActionToolbarVariantProps {
6
+ width?: 'full' | 'fit' | null;
7
+ }
8
+ declare const actionToolbarVariants: (props?: (ActionToolbarVariantProps & ClassProp) | undefined) => string;
9
+ type ActionToolbarProps = ComponentProps<'div'> & VariantProps<typeof actionToolbarVariants> & {
10
+ selectedCount?: number;
11
+ };
12
+ declare const ActionToolbar: ForwardRefExoticComponent<Omit<ActionToolbarProps, 'ref'> & RefAttributes<HTMLDivElement>>;
13
+ declare const ActionToolbarSelection: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
14
+ type ActionToolbarSelectionSummaryProps = ComponentProps<'div'> & {
15
+ count?: ReactNode;
16
+ label?: ReactNode;
17
+ };
18
+ declare const ActionToolbarSelectionSummary: ForwardRefExoticComponent<Omit<ActionToolbarSelectionSummaryProps, 'ref'> & RefAttributes<HTMLDivElement>>;
19
+ declare const ActionToolbarActions: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
20
+ type ActionToolbarActionProps = Omit<ComponentProps<typeof Button>, 'size'> & ({
21
+ iconOnly: true;
22
+ 'aria-label': string;
23
+ } | {
24
+ iconOnly?: false;
25
+ 'aria-label'?: string;
26
+ });
27
+ declare const ActionToolbarAction: ForwardRefExoticComponent<Omit<ComponentProps<typeof Button>, 'size' | 'ref'> & ({
28
+ iconOnly: true;
29
+ 'aria-label': string;
30
+ } | {
31
+ iconOnly?: false;
32
+ 'aria-label'?: string;
33
+ }) & RefAttributes<HTMLElement>>;
34
+ type ActionToolbarActionClearProps = Omit<ActionToolbarActionProps, 'variant' | 'iconOnly' | 'children'> & {
35
+ icon?: ReactNode;
36
+ label?: ReactNode;
37
+ };
38
+ declare const ActionToolbarActionClear: ForwardRefExoticComponent<Omit<ActionToolbarActionClearProps, 'ref'> & RefAttributes<HTMLElement>>;
39
+ type ActionToolbarPrimaryActionProps = Omit<ActionToolbarActionProps, 'variant' | 'iconOnly'>;
40
+ declare const ActionToolbarPrimaryAction: ForwardRefExoticComponent<Omit<ActionToolbarPrimaryActionProps, 'ref'> & RefAttributes<HTMLElement>>;
41
+ export { ActionToolbar, ActionToolbarAction, ActionToolbarActionClear, ActionToolbarActions, ActionToolbarPrimaryAction, ActionToolbarSelection, ActionToolbarSelectionSummary, };
@@ -0,0 +1,176 @@
1
+ import { jsx as i, jsxs as m } from "react/jsx-runtime";
2
+ import { createContext as b, forwardRef as e, useMemo as A, useContext as x } from "react";
3
+ import { IconX as T } from "@tabler/icons-react";
4
+ import { cva as y } from "class-variance-authority";
5
+ import { cn as s } from "../../../../lib/utils.js";
6
+ import { Button as f } from "../button/button.js";
7
+ import { TooltipProvider as g, Tooltip as h, TooltipTrigger as w, TooltipContent as N } from "../tooltip/tooltip.js";
8
+ const v = y(
9
+ "min-w-[400px] max-w-[1200px] h-14 flex items-center justify-between gap-3 bg-raised-background text-foreground-fixed-light pl-4 pr-3 rounded-xl shadow-default",
10
+ {
11
+ variants: {
12
+ width: {
13
+ full: "w-full",
14
+ fit: "w-fit"
15
+ }
16
+ },
17
+ defaultVariants: {
18
+ width: "full"
19
+ }
20
+ }
21
+ ), p = b({
22
+ selectedCount: void 0
23
+ }), k = e(
24
+ ({ className: t, width: a, role: n = "toolbar", selectedCount: o, ...r }, l) => {
25
+ const c = typeof o == "number" && o === 0, d = A(() => ({ selectedCount: o }), [o]);
26
+ return c ? null : /* @__PURE__ */ i(g, { delayDuration: 0, children: /* @__PURE__ */ i(p.Provider, { value: d, children: /* @__PURE__ */ i(
27
+ "div",
28
+ {
29
+ ref: l,
30
+ "data-slot": "action-toolbar",
31
+ role: n,
32
+ className: s(v({ width: a }), t),
33
+ ...r
34
+ }
35
+ ) }) });
36
+ }
37
+ );
38
+ k.displayName = "ActionToolbar";
39
+ const C = e(
40
+ ({ className: t, role: a = "group", ...n }, o) => /* @__PURE__ */ i(
41
+ "div",
42
+ {
43
+ ref: o,
44
+ "data-slot": "action-toolbar-selection",
45
+ role: a,
46
+ className: s("flex min-w-0 shrink-0 items-center gap-3", t),
47
+ ...n
48
+ }
49
+ )
50
+ );
51
+ C.displayName = "ActionToolbarSelection";
52
+ const S = e(
53
+ ({ className: t, count: a, label: n = "selected", children: o, ...r }, l) => {
54
+ const { selectedCount: c } = x(p), d = a ?? c;
55
+ return /* @__PURE__ */ i(
56
+ "div",
57
+ {
58
+ ref: l,
59
+ "data-slot": "action-toolbar-selection-summary",
60
+ className: s("flex min-w-0", t),
61
+ ...r,
62
+ children: o ?? /* @__PURE__ */ m(
63
+ "span",
64
+ {
65
+ "data-slot": "action-toolbar-selection-label",
66
+ className: "flex min-w-0 items-center gap-0.5 text-sm font-medium leading-4.5 tracking-normal text-foreground-fixed-light",
67
+ children: [
68
+ d == null ? null : /* @__PURE__ */ i("span", { children: d }),
69
+ /* @__PURE__ */ i("span", { className: "truncate", children: n })
70
+ ]
71
+ }
72
+ )
73
+ }
74
+ );
75
+ }
76
+ );
77
+ S.displayName = "ActionToolbarSelectionSummary";
78
+ const O = e(
79
+ ({ className: t, role: a = "group", ...n }, o) => /* @__PURE__ */ i(
80
+ "div",
81
+ {
82
+ ref: o,
83
+ "data-slot": "action-toolbar-actions",
84
+ role: a,
85
+ className: s(
86
+ "flex min-w-0 shrink-0 items-center justify-end gap-1",
87
+ t
88
+ ),
89
+ ...n
90
+ }
91
+ )
92
+ );
93
+ O.displayName = "ActionToolbarActions";
94
+ const u = e(
95
+ ({
96
+ className: t,
97
+ variant: a = "ghostOnDark",
98
+ iconOnly: n = !1,
99
+ "aria-label": o,
100
+ children: r,
101
+ ...l
102
+ }, c) => n && o ? /* @__PURE__ */ m(h, { children: [
103
+ /* @__PURE__ */ i(
104
+ w,
105
+ {
106
+ render: /* @__PURE__ */ i(
107
+ f,
108
+ {
109
+ ref: c,
110
+ "data-slot": "action-toolbar-action",
111
+ variant: a,
112
+ size: "icon",
113
+ "aria-label": o,
114
+ className: t,
115
+ ...l,
116
+ children: r
117
+ }
118
+ )
119
+ }
120
+ ),
121
+ /* @__PURE__ */ i(N, { sideOffset: 18, children: o })
122
+ ] }) : /* @__PURE__ */ i(
123
+ f,
124
+ {
125
+ ref: c,
126
+ "data-slot": "action-toolbar-action",
127
+ variant: a,
128
+ size: n ? "icon" : "default",
129
+ "aria-label": o,
130
+ className: t,
131
+ ...l,
132
+ children: r
133
+ }
134
+ )
135
+ );
136
+ u.displayName = "ActionToolbarAction";
137
+ const j = e(
138
+ ({ icon: t, label: a = "Clear", ...n }, o) => /* @__PURE__ */ m(
139
+ u,
140
+ {
141
+ ref: o,
142
+ "data-slot": "action-toolbar-action-clear",
143
+ variant: "secondaryOnDark",
144
+ iconOnly: !1,
145
+ ...n,
146
+ children: [
147
+ t ?? /* @__PURE__ */ i(T, {}),
148
+ a
149
+ ]
150
+ }
151
+ )
152
+ );
153
+ j.displayName = "ActionToolbarActionClear";
154
+ const D = e(
155
+ ({ className: t, ...a }, n) => /* @__PURE__ */ i(
156
+ u,
157
+ {
158
+ ref: n,
159
+ "data-slot": "action-toolbar-primary-action",
160
+ variant: "defaultOnDark",
161
+ iconOnly: !1,
162
+ className: s("ml-2", t),
163
+ ...a
164
+ }
165
+ )
166
+ );
167
+ D.displayName = "ActionToolbarPrimaryAction";
168
+ export {
169
+ k as ActionToolbar,
170
+ u as ActionToolbarAction,
171
+ j as ActionToolbarActionClear,
172
+ O as ActionToolbarActions,
173
+ D as ActionToolbarPrimaryAction,
174
+ C as ActionToolbarSelection,
175
+ S as ActionToolbarSelectionSummary
176
+ };
@@ -1,20 +1,31 @@
1
- import { ComponentProps, ReactNode } from 'react';
1
+ import { ForwardRefExoticComponent, RefAttributes, ComponentProps, ReactNode } from 'react';
2
2
  import { VariantProps } from 'class-variance-authority';
3
- type AlertVariant = 'default' | 'secondary' | 'warning' | 'error';
4
- declare const alertVariants: (props?: ({
5
- variant?: "default" | "secondary" | "warning" | "error" | null | undefined;
6
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
3
+ import { ClassProp } from 'class-variance-authority/types';
4
+ type AlertVariant = 'default' | 'info' | 'warning' | 'error';
5
+ /** @deprecated Use `'info'` instead. Will be removed in a future major release. */
6
+ type DeprecatedAlertVariant = 'secondary';
7
+ type AlertVariantInput = AlertVariant | DeprecatedAlertVariant;
8
+ type AlertStyle = 'card' | 'strip';
9
+ interface AlertVariantProps {
10
+ variant?: 'default' | 'error' | 'info' | 'warning' | null;
11
+ alertStyle?: 'card' | 'strip' | null;
12
+ }
13
+ declare const alertVariants: (props?: (AlertVariantProps & ClassProp) | undefined) => string;
7
14
  type AlertProps = ComponentProps<'div'> & Omit<VariantProps<typeof alertVariants>, 'variant'> & {
8
- variant?: AlertVariant;
15
+ variant?: AlertVariantInput;
16
+ alertStyle?: AlertStyle;
9
17
  visible?: boolean;
10
18
  defaultVisible?: boolean;
11
19
  onClose?: () => void;
12
20
  icon?: ReactNode;
13
21
  };
14
- declare const Alert: import('react').ForwardRefExoticComponent<Omit<AlertProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
15
- declare const AlertTitle: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
16
- declare const AlertDescription: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
17
- declare const AlertActions: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
18
- declare const AlertButton: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
19
- declare const AlertClose: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
22
+ declare const Alert: ForwardRefExoticComponent<Omit<AlertProps, 'ref'> & RefAttributes<HTMLDivElement>>;
23
+ declare const AlertTitle: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
24
+ declare const AlertDescription: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
25
+ declare const AlertActions: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
26
+ type AlertButtonVariant = 'default' | 'ghost';
27
+ declare const AlertButton: ForwardRefExoticComponent<Omit<ComponentProps<'button'> & {
28
+ variant?: AlertButtonVariant;
29
+ }, 'ref'> & RefAttributes<HTMLButtonElement>>;
30
+ declare const AlertClose: ForwardRefExoticComponent<ComponentProps<'button'> & RefAttributes<HTMLButtonElement>>;
20
31
  export { Alert, AlertTitle, AlertDescription, AlertActions, AlertButton, AlertClose, };