@moldable-ai/ui 0.2.20 → 0.2.21

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 (159) hide show
  1. package/dist/catalog/catalog-coverage.d.ts +15 -0
  2. package/dist/catalog/catalog-coverage.d.ts.map +1 -0
  3. package/dist/catalog/catalog-coverage.js +44 -0
  4. package/dist/catalog/catalog-manifest.d.ts.map +1 -1
  5. package/dist/catalog/catalog-manifest.js +35 -23
  6. package/dist/catalog/catalog-types.d.ts +10 -0
  7. package/dist/catalog/catalog-types.d.ts.map +1 -1
  8. package/dist/catalog/catalog-types.js +6 -0
  9. package/dist/catalog/component-catalog.d.ts.map +1 -1
  10. package/dist/catalog/component-catalog.js +16 -6
  11. package/dist/catalog/core-catalog-exclusions.d.ts +8 -0
  12. package/dist/catalog/core-catalog-exclusions.d.ts.map +1 -0
  13. package/dist/catalog/core-catalog-exclusions.js +151 -0
  14. package/dist/catalog/core-catalog.d.ts +0 -4
  15. package/dist/catalog/core-catalog.d.ts.map +1 -1
  16. package/dist/catalog/core-catalog.js +12 -98
  17. package/dist/catalog/core-collection-stories.d.ts +3 -0
  18. package/dist/catalog/core-collection-stories.d.ts.map +1 -0
  19. package/dist/catalog/core-collection-stories.js +42 -0
  20. package/dist/catalog/core-control-stories.d.ts +3 -0
  21. package/dist/catalog/core-control-stories.d.ts.map +1 -0
  22. package/dist/catalog/core-control-stories.js +94 -0
  23. package/dist/catalog/core-feedback-stories.d.ts +3 -0
  24. package/dist/catalog/core-feedback-stories.d.ts.map +1 -0
  25. package/dist/catalog/core-feedback-stories.js +50 -0
  26. package/dist/catalog/core-foundation-stories.d.ts +3 -0
  27. package/dist/catalog/core-foundation-stories.d.ts.map +1 -0
  28. package/dist/catalog/core-foundation-stories.js +53 -0
  29. package/dist/catalog/core-navigation-stories.d.ts +3 -0
  30. package/dist/catalog/core-navigation-stories.d.ts.map +1 -0
  31. package/dist/catalog/core-navigation-stories.js +25 -0
  32. package/dist/catalog/core-overlay-stories.d.ts +3 -0
  33. package/dist/catalog/core-overlay-stories.d.ts.map +1 -0
  34. package/dist/catalog/core-overlay-stories.js +20 -0
  35. package/dist/catalog/index.d.ts +3 -1
  36. package/dist/catalog/index.d.ts.map +1 -1
  37. package/dist/catalog/index.js +3 -1
  38. package/dist/components/chat/chat-panel.d.ts +0 -1
  39. package/dist/components/chat/chat-panel.d.ts.map +1 -1
  40. package/dist/components/chat/chat-panel.js +7 -11
  41. package/dist/components/ui/alert-dialog.d.ts +7 -3
  42. package/dist/components/ui/alert-dialog.d.ts.map +1 -1
  43. package/dist/components/ui/alert-dialog.js +9 -5
  44. package/dist/components/ui/alert.d.ts +19 -3
  45. package/dist/components/ui/alert.d.ts.map +1 -1
  46. package/dist/components/ui/alert.js +25 -8
  47. package/dist/components/ui/app-frame.d.ts +9 -3
  48. package/dist/components/ui/app-frame.d.ts.map +1 -1
  49. package/dist/components/ui/app-frame.js +45 -6
  50. package/dist/components/ui/collapsible.d.ts +9 -1
  51. package/dist/components/ui/collapsible.d.ts.map +1 -1
  52. package/dist/components/ui/collapsible.js +13 -2
  53. package/dist/components/ui/collection-navigation.d.ts +8 -0
  54. package/dist/components/ui/collection-navigation.d.ts.map +1 -0
  55. package/dist/components/ui/collection-navigation.js +19 -0
  56. package/dist/components/ui/command.d.ts +5 -1
  57. package/dist/components/ui/command.d.ts.map +1 -1
  58. package/dist/components/ui/command.js +13 -1
  59. package/dist/components/ui/confirm-dialog.d.ts +19 -0
  60. package/dist/components/ui/confirm-dialog.d.ts.map +1 -0
  61. package/dist/components/ui/confirm-dialog.js +45 -0
  62. package/dist/components/ui/date-picker.d.ts +24 -0
  63. package/dist/components/ui/date-picker.d.ts.map +1 -0
  64. package/dist/components/ui/date-picker.js +92 -0
  65. package/dist/components/ui/dialog.d.ts +4 -2
  66. package/dist/components/ui/dialog.d.ts.map +1 -1
  67. package/dist/components/ui/dialog.js +8 -5
  68. package/dist/components/ui/empty.d.ts +7 -2
  69. package/dist/components/ui/empty.d.ts.map +1 -1
  70. package/dist/components/ui/empty.js +20 -7
  71. package/dist/components/ui/grid.d.ts.map +1 -1
  72. package/dist/components/ui/grid.js +70 -46
  73. package/dist/components/ui/index.d.ts +4 -0
  74. package/dist/components/ui/index.d.ts.map +1 -1
  75. package/dist/components/ui/index.js +4 -0
  76. package/dist/components/ui/list.d.ts +5 -1
  77. package/dist/components/ui/list.d.ts.map +1 -1
  78. package/dist/components/ui/list.js +27 -16
  79. package/dist/components/ui/material.d.ts +34 -0
  80. package/dist/components/ui/material.d.ts.map +1 -0
  81. package/dist/components/ui/material.js +34 -0
  82. package/dist/components/ui/message-scroller-controller.d.ts +162 -0
  83. package/dist/components/ui/message-scroller-controller.d.ts.map +1 -0
  84. package/dist/components/ui/message-scroller-controller.js +888 -0
  85. package/dist/components/ui/message-scroller-policy.d.ts +74 -0
  86. package/dist/components/ui/message-scroller-policy.d.ts.map +1 -0
  87. package/dist/components/ui/message-scroller-policy.js +129 -0
  88. package/dist/components/ui/message-scroller-primitive.d.ts +55 -0
  89. package/dist/components/ui/message-scroller-primitive.d.ts.map +1 -0
  90. package/dist/components/ui/message-scroller-primitive.js +226 -0
  91. package/dist/components/ui/message-scroller.d.ts +2 -2
  92. package/dist/components/ui/message-scroller.d.ts.map +1 -1
  93. package/dist/components/ui/message-scroller.js +3 -15
  94. package/dist/components/ui/navigation-button-group.d.ts +16 -0
  95. package/dist/components/ui/navigation-button-group.d.ts.map +1 -0
  96. package/dist/components/ui/navigation-button-group.js +9 -0
  97. package/dist/components/ui/popover.d.ts +9 -2
  98. package/dist/components/ui/popover.d.ts.map +1 -1
  99. package/dist/components/ui/popover.js +13 -3
  100. package/dist/components/ui/scroll-area.d.ts +8 -2
  101. package/dist/components/ui/scroll-area.d.ts.map +1 -1
  102. package/dist/components/ui/scroll-area.js +6 -3
  103. package/dist/components/ui/search-field.d.ts.map +1 -1
  104. package/dist/components/ui/segmented-control.d.ts.map +1 -1
  105. package/dist/components/ui/segmented-control.js +6 -5
  106. package/dist/components/ui/sheet.d.ts +4 -2
  107. package/dist/components/ui/sheet.d.ts.map +1 -1
  108. package/dist/components/ui/sheet.js +12 -9
  109. package/dist/components/ui/sonner.d.ts +1 -1
  110. package/dist/components/ui/sonner.d.ts.map +1 -1
  111. package/dist/components/ui/table.d.ts.map +1 -1
  112. package/dist/components/ui/table.js +7 -2
  113. package/dist/components/ui/toggle.d.ts +12 -4
  114. package/dist/components/ui/toggle.d.ts.map +1 -1
  115. package/dist/components/ui/toggle.js +13 -2
  116. package/dist/components/ui/toolbar.d.ts +9 -2
  117. package/dist/components/ui/toolbar.d.ts.map +1 -1
  118. package/dist/components/ui/toolbar.js +23 -4
  119. package/dist/components/ui/tooltip.d.ts +8 -3
  120. package/dist/components/ui/tooltip.d.ts.map +1 -1
  121. package/dist/components/ui/tooltip.js +11 -6
  122. package/dist/lib/frame-lifecycle.d.ts +1 -0
  123. package/dist/lib/frame-lifecycle.d.ts.map +1 -1
  124. package/dist/lib/frame-lifecycle.js +3 -2
  125. package/dist/lib/theme.d.ts.map +1 -1
  126. package/dist/lib/theme.js +2 -1
  127. package/docs/README.md +3 -1
  128. package/docs/adaptive-materials.md +79 -0
  129. package/docs/app-anatomy.md +3 -1
  130. package/docs/component-catalog.md +26 -3
  131. package/docs/design-tokens.md +17 -4
  132. package/docs/foundations.md +5 -3
  133. package/docs/standalone-app-windows.md +8 -0
  134. package/package.json +1 -2
  135. package/src/components/ui/alert-dialog.md +31 -0
  136. package/src/components/ui/alert.md +28 -6
  137. package/src/components/ui/app-frame.md +5 -0
  138. package/src/components/ui/collapsible.md +52 -0
  139. package/src/components/ui/combobox.md +0 -1
  140. package/src/components/ui/command.md +54 -0
  141. package/src/components/ui/date-field.md +1 -1
  142. package/src/components/ui/date-picker.md +55 -0
  143. package/src/components/ui/dialog.md +40 -0
  144. package/src/components/ui/empty.md +8 -3
  145. package/src/components/ui/grid.md +8 -4
  146. package/src/components/ui/icon-button.md +2 -2
  147. package/src/components/ui/list.md +35 -2
  148. package/src/components/ui/material.md +51 -0
  149. package/src/components/ui/navigation-button-group.md +46 -0
  150. package/src/components/ui/popover.md +31 -0
  151. package/src/components/ui/scroll-area.md +11 -7
  152. package/src/components/ui/search-field.md +1 -1
  153. package/src/components/ui/segmented-control.md +2 -5
  154. package/src/components/ui/sheet.md +30 -0
  155. package/src/components/ui/table.md +4 -2
  156. package/src/components/ui/toggle-button.md +48 -0
  157. package/src/components/ui/toolbar.md +5 -0
  158. package/src/components/ui/tooltip.md +31 -0
  159. package/src/styles/index.css +213 -0
@@ -2,14 +2,21 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import * as PopoverPrimitive from '@radix-ui/react-popover';
4
4
  import { cn } from '../../lib/utils';
5
+ import { Material } from './material';
5
6
  function Popover({ ...props }) {
6
7
  return _jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
7
8
  }
8
9
  function PopoverTrigger({ ...props }) {
9
10
  return _jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
10
11
  }
11
- function PopoverContent({ className, align = 'center', sideOffset = 4, ...props }) {
12
- return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-popover-content-transform-origin) outline-hidden z-50 w-72 rounded-md border p-4 shadow-md', className), ...props }) }));
12
+ function PopoverPortal({ ...props }) {
13
+ return _jsx(PopoverPrimitive.Portal, { "data-slot": "popover-portal", ...props });
14
+ }
15
+ function PopoverClose({ ...props }) {
16
+ return _jsx(PopoverPrimitive.Close, { "data-slot": "popover-close", ...props });
17
+ }
18
+ function PopoverContent({ className, align = 'center', material = 'regular', sideOffset = 4, size = 'default', ...props }) {
19
+ return (_jsx(PopoverPortal, { children: _jsx(Material, { variant: material, elevation: "overlay", asChild: true, children: _jsx(PopoverPrimitive.Content, { "data-slot": "popover-content", "data-size": size, align: align, sideOffset: sideOffset, className: cn('text-popover-foreground outline-hidden z-50 max-h-[var(--radix-popover-content-available-height)] max-w-[var(--radix-popover-content-available-width)] overflow-y-auto overscroll-contain p-[var(--density-pane-padding)]', 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95', 'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', 'origin-(--radix-popover-content-transform-origin) duration-[var(--motion-duration-normal)]', 'data-[size=content]:w-fit data-[size=default]:w-72 data-[size=lg]:w-96 data-[size=sm]:w-56', className), ...props }) }) }));
13
20
  }
14
21
  function PopoverAnchor({ ...props }) {
15
22
  return _jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
@@ -23,4 +30,7 @@ function PopoverTitle({ className, ...props }) {
23
30
  function PopoverDescription({ className, ...props }) {
24
31
  return (_jsx("p", { "data-slot": "popover-description", className: cn('text-muted-foreground', className), ...props }));
25
32
  }
26
- export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverHeader, PopoverTitle, PopoverDescription, };
33
+ function PopoverArrow({ className, ...props }) {
34
+ return (_jsx(PopoverPrimitive.Arrow, { "data-slot": "popover-arrow", className: cn('fill-surface-overlay', className), ...props }));
35
+ }
36
+ export { Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverContent, PopoverHeader, PopoverDescription, PopoverPortal, PopoverTitle, PopoverTrigger, };
@@ -1,6 +1,12 @@
1
1
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
2
2
  import * as React from 'react';
3
- declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
3
+ type ScrollAreaScrollbars = 'vertical' | 'horizontal' | 'both' | 'none';
4
+ interface ScrollAreaProps extends React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> {
5
+ scrollbars?: ScrollAreaScrollbars;
6
+ safeBottom?: boolean;
7
+ viewportClassName?: string;
8
+ }
9
+ declare const ScrollArea: React.ForwardRefExoticComponent<ScrollAreaProps & React.RefAttributes<HTMLDivElement>>;
4
10
  declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): import("react/jsx-runtime").JSX.Element;
5
- export { ScrollArea, ScrollBar };
11
+ export { ScrollArea, ScrollBar, type ScrollAreaProps, type ScrollAreaScrollbars, };
6
12
  //# sourceMappingURL=scroll-area.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../../src/components/ui/scroll-area.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,QAAA,MAAM,UAAU,+JAqBd,CAAA;AAGF,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,WAAwB,EACxB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,mBAAmB,CAAC,2CAqBtE;AAED,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,CAAA"}
1
+ {"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../../src/components/ui/scroll-area.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,KAAK,oBAAoB,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,GAAG,MAAM,CAAA;AAEvE,UAAU,eACR,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC;IACvE,UAAU,CAAC,EAAE,oBAAoB,CAAA;IACjC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,QAAA,MAAM,UAAU,wFA8Cf,CAAA;AAGD,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,WAAwB,EACxB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,mBAAmB,CAAC,2CAqBtE;AAED,OAAO,EACL,UAAU,EACV,SAAS,EACT,KAAK,eAAe,EACpB,KAAK,oBAAoB,GAC1B,CAAA"}
@@ -3,8 +3,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
4
4
  import * as React from 'react';
5
5
  import { cn } from '../../lib/utils';
6
- const ScrollArea = React.forwardRef(({ className, children, ...props }, ref) => {
7
- return (_jsxs(ScrollAreaPrimitive.Root, { ref: ref, "data-slot": "scroll-area", className: cn('relative', className), ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { "data-slot": "scroll-area-viewport", className: "focus-visible:ring-ring/50 size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px]", children: children }), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] }));
6
+ const ScrollArea = React.forwardRef(({ className, children, safeBottom = false, scrollbars = 'vertical', viewportClassName, ...props }, ref) => {
7
+ const hasVertical = scrollbars === 'vertical' || scrollbars === 'both';
8
+ const hasHorizontal = scrollbars === 'horizontal' || scrollbars === 'both';
9
+ return (_jsxs(ScrollAreaPrimitive.Root, { ref: ref, "data-slot": "scroll-area", "data-scrollbars": scrollbars, className: cn('relative', className), ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { "data-slot": "scroll-area-viewport", "data-safe-bottom": safeBottom || undefined, className: cn('focus-visible:ring-ring/50 size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px]', safeBottom &&
10
+ 'pb-[calc(var(--chat-safe-padding,0px)+var(--density-pane-padding))]', viewportClassName), children: children }), hasVertical ? _jsx(ScrollBar, { orientation: "vertical" }) : null, hasHorizontal ? _jsx(ScrollBar, { orientation: "horizontal" }) : null, hasVertical && hasHorizontal ? (_jsx(ScrollAreaPrimitive.Corner, { "data-slot": "scroll-area-corner" })) : null] }));
8
11
  });
9
12
  ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
10
13
  function ScrollBar({ className, orientation = 'vertical', ...props }) {
@@ -12,4 +15,4 @@ function ScrollBar({ className, orientation = 'vertical', ...props }) {
12
15
  'h-full w-2.5 border-l border-l-transparent', orientation === 'horizontal' &&
13
16
  'h-2.5 flex-col border-t border-t-transparent', className), ...props, children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "bg-border relative flex-1 rounded-full" }) }));
14
17
  }
15
- export { ScrollArea, ScrollBar };
18
+ export { ScrollArea, ScrollBar, };
@@ -1 +1 @@
1
- {"version":3,"file":"search-field.d.ts","sourceRoot":"","sources":["../../../src/components/ui/search-field.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAEjE,QAAA,MAAM,mBAAmB;;;8EAmBxB,CAAA;AAED,UAAU,gBACR,SAAQ,IAAI,CACR,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAC7B,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAC3C,EACD,YAAY,CAAC,OAAO,mBAAmB,CAAC;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,cAAc,EACd,KAAK,EACL,YAAiB,EACjB,QAAQ,EACR,aAAa,EACb,OAAO,EACP,SAAS,EACT,SAAgB,EAChB,UAA2B,EAC3B,OAAe,EACf,OAAmB,EACnB,OAAmB,EACnB,QAAQ,EACR,QAAQ,EACR,GAAG,EACH,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAoGlB;AAED,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,CAAA"}
1
+ {"version":3,"file":"search-field.d.ts","sourceRoot":"","sources":["../../../src/components/ui/search-field.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAEjE,QAAA,MAAM,mBAAmB;;;8EAmBxB,CAAA;AAED,UAAU,gBACR,SAAQ,IAAI,CACR,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAC7B,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAC3C,EACD,YAAY,CAAC,OAAO,mBAAmB,CAAC;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,cAAc,EACd,KAAK,EACL,YAAiB,EACjB,QAAQ,EACR,aAAa,EACb,OAAO,EACP,SAAS,EACT,SAAgB,EAChB,UAA2B,EAC3B,OAAe,EACf,OAAmB,EACnB,OAAmB,EACnB,QAAQ,EACR,QAAQ,EACR,GAAG,EACH,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAmGlB;AAED,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"segmented-control.d.ts","sourceRoot":"","sources":["../../../src/components/ui/segmented-control.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAEjE,QAAA,MAAM,wBAAwB;;;;8EAwB7B,CAAA;AAED,QAAA,MAAM,4BAA4B;;;8EAsBjC,CAAA;AAaD,UAAU,qBACR,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,EAC3D,YAAY,CAAC,OAAO,wBAAwB,CAAC;CAAG;AAEpD,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,OAAiB,EACjB,OAAmB,EACnB,SAAiB,EACjB,WAA0B,EAC1B,GAAG,KAAK,EACT,EAAE,qBAAqB,2CAoBvB;AAED,UAAU,yBACR,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,iBAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,QAAgB,EAChB,GAAG,KAAK,EACT,EAAE,yBAAyB,2CAoB3B;AAED,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,4BAA4B,EAC5B,wBAAwB,GACzB,CAAA"}
1
+ {"version":3,"file":"segmented-control.d.ts","sourceRoot":"","sources":["../../../src/components/ui/segmented-control.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAEjE,QAAA,MAAM,wBAAwB;;;;8EAwB7B,CAAA;AAED,QAAA,MAAM,4BAA4B;;;8EAsBjC,CAAA;AAaD,UAAU,qBACR,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,EAC3D,YAAY,CAAC,OAAO,wBAAwB,CAAC;CAAG;AAEpD,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,OAAiB,EACjB,OAAmB,EACnB,SAAiB,EACjB,WAA0B,EAC1B,GAAG,KAAK,EACT,EAAE,qBAAqB,2CAoBvB;AAED,UAAU,yBACR,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,iBAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,QAAgB,EAChB,GAAG,KAAK,EACT,EAAE,yBAAyB,2CAqB3B;AAED,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,4BAA4B,EAC5B,wBAAwB,GACzB,CAAA"}
@@ -52,10 +52,11 @@ function SegmentedControl({ className, variant = 'muted', density = 'default', f
52
52
  }
53
53
  function SegmentedControlItem({ className, iconOnly = false, ...props }) {
54
54
  const { density, fullWidth } = React.useContext(SegmentedControlContext);
55
- return (_jsx(RadioGroupPrimitive.Item, { "data-slot": "segmented-control-item", "data-density": density, "data-icon-only": iconOnly, className: cn(segmentedControlItemVariants({ density, fullWidth }), iconOnly && {
56
- compact: 'size-6 p-0',
57
- default: 'size-7 p-0',
58
- comfortable: 'size-8 p-0',
59
- }[density], className), ...props }));
55
+ return (_jsx(RadioGroupPrimitive.Item, { "data-slot": "segmented-control-item", "data-density": density, "data-icon-only": iconOnly, className: cn(segmentedControlItemVariants({ density, fullWidth }), iconOnly &&
56
+ {
57
+ compact: 'size-6 p-0',
58
+ default: 'size-7 p-0',
59
+ comfortable: 'size-8 p-0',
60
+ }[density], className), ...props }));
60
61
  }
61
62
  export { SegmentedControl, SegmentedControlItem, segmentedControlItemVariants, segmentedControlVariants, };
@@ -3,13 +3,15 @@ import * as React from 'react';
3
3
  declare function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
4
  declare function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
5
  declare function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
6
- declare function SheetContent({ className, children, side, showCloseButton, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & {
6
+ declare function SheetContent({ className, children, side, size, showCloseButton, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & {
7
7
  side?: 'top' | 'right' | 'bottom' | 'left';
8
+ size?: 'sm' | 'default' | 'lg';
8
9
  showCloseButton?: boolean;
9
10
  }): import("react/jsx-runtime").JSX.Element;
10
11
  declare function SheetHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
12
+ declare function SheetBody({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
11
13
  declare function SheetFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
12
14
  declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
13
15
  declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
14
- export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
16
+ export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetBody, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
15
17
  //# sourceMappingURL=sheet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../../src/components/ui/sheet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,cAAc,MAAM,wBAAwB,CAAA;AAExD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,iBAAS,KAAK,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,2CAE5E;AAED,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,OAAO,CAAC,2CAErD;AAED,iBAAS,UAAU,CAAC,EAClB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,KAAK,CAAC,2CAEnD;AAwBD,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,QAAQ,EACR,IAAc,EACd,eAAsB,EACtB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,OAAO,CAAC,GAAG;IACvD,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IAC1C,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,2CA8BA;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQxE;AAED,iBAAS,WAAW,CAAC,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AI,CAAC,EAAE,IAAI,GAAG,SAAS,GAAG,IAAI,CAAA;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,2CAmCA;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQxE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWtE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWxE;AAED,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,KAAK,CAAC,2CAQnD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,WAAW,CAAC,2CAQzD;AAED,OAAO,EACL,KAAK,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,SAAS,EACT,WAAW,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,GACjB,CAAA"}
@@ -18,18 +18,21 @@ function SheetPortal({ ...props }) {
18
18
  function SheetOverlay({ className, ...props }) {
19
19
  return (_jsx(SheetPrimitive.Overlay, { "data-slot": "sheet-overlay", className: cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50', className), ...props }));
20
20
  }
21
- function SheetContent({ className, children, side = 'right', showCloseButton = true, ...props }) {
22
- return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Content, { "data-slot": "sheet-content", className: cn('bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500', side === 'right' &&
23
- 'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm', side === 'left' &&
24
- 'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm', side === 'top' &&
25
- 'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b', side === 'bottom' &&
26
- 'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t', className), ...props, children: [children, showCloseButton && (_jsxs(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary rounded-xs focus:outline-hidden absolute right-4 top-4 opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none", children: [_jsx(XIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
21
+ function SheetContent({ className, children, side = 'right', size = 'default', showCloseButton = true, ...props }) {
22
+ return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Content, { "data-slot": "sheet-content", "data-side": side, "data-size": size, className: cn('bg-background data-[state=open]:animate-in data-[state=closed]:animate-out border-separator shadow-overlay fixed z-50 flex min-h-0 flex-col gap-4 overflow-hidden outline-none transition ease-[var(--motion-ease-standard)] data-[state=closed]:duration-[var(--motion-duration-normal)] data-[state=open]:duration-[var(--motion-duration-slow)]', side === 'right' &&
23
+ 'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right bottom-[max(var(--window-content-inset-bottom),var(--chat-safe-padding))] right-[var(--window-content-inset-inline-end)] top-[var(--window-content-inset-top)] w-[min(90vw,28rem)] border-l data-[size=default]:max-w-sm data-[size=lg]:max-w-lg data-[size=sm]:max-w-xs', side === 'left' &&
24
+ 'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left bottom-[max(var(--window-content-inset-bottom),var(--chat-safe-padding))] left-[var(--window-content-inset-inline-start)] top-[var(--window-content-inset-top)] w-[min(90vw,28rem)] border-r data-[size=default]:max-w-sm data-[size=lg]:max-w-lg data-[size=sm]:max-w-xs', side === 'top' &&
25
+ 'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top left-[var(--window-content-inset-inline-start)] right-[var(--window-content-inset-inline-end)] top-[var(--window-content-inset-top)] max-h-[min(80dvh,calc(100dvh-var(--window-content-inset-top)-max(var(--window-content-inset-bottom),var(--chat-safe-padding))))] border-b', side === 'bottom' &&
26
+ 'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom bottom-[max(var(--window-content-inset-bottom),var(--chat-safe-padding))] left-[var(--window-content-inset-inline-start)] right-[var(--window-content-inset-inline-end)] max-h-[min(80dvh,calc(100dvh-var(--window-content-inset-top)-max(var(--window-content-inset-bottom),var(--chat-safe-padding))))] border-t', className), ...props, children: [children, showCloseButton && (_jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", "aria-label": "Close", className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary rounded-control focus:outline-hidden absolute right-4 top-4 inline-flex size-7 cursor-pointer items-center justify-center opacity-70 transition-opacity duration-[var(--motion-duration-fast)] hover:opacity-100 focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:cursor-not-allowed", children: _jsx(XIcon, { "aria-hidden": "true", className: "size-4" }) }))] })] }));
27
27
  }
28
28
  function SheetHeader({ className, ...props }) {
29
- return (_jsx("div", { "data-slot": "sheet-header", className: cn('flex flex-col gap-1.5 p-4', className), ...props }));
29
+ return (_jsx("div", { "data-slot": "sheet-header", className: cn('flex shrink-0 flex-col gap-1.5 p-4 pr-12', className), ...props }));
30
+ }
31
+ function SheetBody({ className, ...props }) {
32
+ return (_jsx("div", { "data-slot": "sheet-body", className: cn('min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 [scrollbar-gutter:stable]', className), ...props }));
30
33
  }
31
34
  function SheetFooter({ className, ...props }) {
32
- return (_jsx("div", { "data-slot": "sheet-footer", className: cn('mt-auto flex flex-col gap-2 p-4', className), ...props }));
35
+ return (_jsx("div", { "data-slot": "sheet-footer", className: cn('mt-auto flex shrink-0 flex-col gap-2 p-4 sm:flex-row sm:flex-wrap sm:justify-end', className), ...props }));
33
36
  }
34
37
  function SheetTitle({ className, ...props }) {
35
38
  return (_jsx(SheetPrimitive.Title, { "data-slot": "sheet-title", className: cn('text-foreground font-semibold', className), ...props }));
@@ -37,4 +40,4 @@ function SheetTitle({ className, ...props }) {
37
40
  function SheetDescription({ className, ...props }) {
38
41
  return (_jsx(SheetPrimitive.Description, { "data-slot": "sheet-description", className: cn('text-muted-foreground text-sm', className), ...props }));
39
42
  }
40
- export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
43
+ export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetBody, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
@@ -1,4 +1,4 @@
1
- import { toast, type ExternalToast, type ToasterProps } from 'sonner';
1
+ import { type ExternalToast, type ToasterProps, toast } from 'sonner';
2
2
  export type ToastOptions = ExternalToast;
3
3
  declare const Toaster: ({ style, ...props }: ToasterProps) => import("react/jsx-runtime").JSX.Element;
4
4
  export { Toaster, toast };
@@ -1 +1 @@
1
- {"version":3,"file":"sonner.d.ts","sourceRoot":"","sources":["../../../src/components/ui/sonner.tsx"],"names":[],"mappings":"AAWA,OAAO,EAEL,KAAK,EACL,KAAK,aAAa,EAClB,KAAK,YAAY,EAClB,MAAM,QAAQ,CAAA;AAEf,MAAM,MAAM,YAAY,GAAG,aAAa,CAAA;AAExC,QAAA,MAAM,OAAO,GAAI,qBAAqB,YAAY,4CA0BjD,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAA"}
1
+ {"version":3,"file":"sonner.d.ts","sourceRoot":"","sources":["../../../src/components/ui/sonner.tsx"],"names":[],"mappings":"AAWA,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,YAAY,EACjB,KAAK,EACN,MAAM,QAAQ,CAAA;AAEf,MAAM,MAAM,YAAY,GAAG,aAAa,CAAA;AAExC,QAAA,MAAM,OAAO,GAAI,qBAAqB,YAAY,4CA0BjD,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/components/ui/table.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,CAAA;AAIhE,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC;IAC/D,OAAO,CAAC,EAAE,YAAY,CAAA;CACvB;AAED,iBAAS,KAAK,CAAC,EACb,OAAmB,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,UAAU,2CAgBZ;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,2CAQ1E;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,2CAQxE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,2CAW1E;AAED,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,eAAe,CAAC;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iBAAiB,CAAC,EAAE,CAAC,QAAQ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QxE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,2CAW1E;AAED,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,eAAe,CAAC;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAA;CAChD;AAED,iBAAS,QAAQ,CAAC,EAChB,QAAQ,EACR,QAAgB,EAChB,iBAAiB,EACjB,OAAO,EACP,SAAS,EACT,SAAS,EACT,GAAG,KAAK,EACT,EAAE,aAAa,2CA+Cf;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,2CAgBrE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,2CAgBrE;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,2CAQjC;AAED,OAAO,EACL,KAAK,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,GACb,CAAA"}
@@ -2,6 +2,7 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import * as React from 'react';
4
4
  import { cn } from '../../lib/utils';
5
+ import { isInteractiveDescendant } from './collection-navigation';
5
6
  const TableDensityContext = React.createContext('default');
6
7
  function Table({ density = 'default', className, ...props }) {
7
8
  return (_jsx(TableDensityContext.Provider, { value: density, children: _jsx("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: _jsx("table", { "data-slot": "table", "data-density": density, className: cn('w-full caption-bottom text-sm', className), ...props }) }) }));
@@ -22,14 +23,18 @@ function TableRow({ selected, disabled = false, onSelectionChange, onClick, onKe
22
23
  onSelectionChange?.(!selected);
23
24
  };
24
25
  return (_jsx("tr", { "data-slot": "table-row", "data-state": selected ? 'selected' : undefined, "data-disabled": disabled ? '' : undefined, "aria-selected": selectable ? Boolean(selected) : undefined, "aria-disabled": disabled || undefined, tabIndex: selectable && !disabled ? 0 : undefined, className: cn('hover:bg-muted/50 data-[state=selected]:bg-accent data-[state=selected]:text-accent-foreground border-b transition-colors', selectable &&
25
- 'cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-inset', disabled && 'pointer-events-none cursor-not-allowed opacity-50', className), onClick: (event) => {
26
+ 'focus-visible:ring-ring/50 cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-inset', disabled && 'pointer-events-none cursor-not-allowed opacity-50', className), onClick: (event) => {
26
27
  onClick?.(event);
27
- if (!event.defaultPrevented && selectable)
28
+ if (!event.defaultPrevented &&
29
+ selectable &&
30
+ !isInteractiveDescendant(event.target, event.currentTarget)) {
28
31
  select();
32
+ }
29
33
  }, onKeyDown: (event) => {
30
34
  onKeyDown?.(event);
31
35
  if (!event.defaultPrevented &&
32
36
  selectable &&
37
+ !isInteractiveDescendant(event.target, event.currentTarget) &&
33
38
  (event.key === 'Enter' || event.key === ' ')) {
34
39
  event.preventDefault();
35
40
  select();
@@ -2,9 +2,17 @@ import * as TogglePrimitive from '@radix-ui/react-toggle';
2
2
  import * as React from 'react';
3
3
  import { type VariantProps } from 'class-variance-authority';
4
4
  declare const toggleVariants: (props?: ({
5
- variant?: "default" | "outline" | null | undefined;
6
- size?: "default" | "sm" | "lg" | null | undefined;
5
+ variant?: "default" | "outline" | "filled" | null | undefined;
6
+ size?: "default" | "xs" | "sm" | "lg" | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
- declare function Toggle({ className, variant, size, ...props }: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): import("react/jsx-runtime").JSX.Element;
9
- export { Toggle, toggleVariants };
8
+ type ToggleProps = React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>;
9
+ declare function Toggle({ className, variant, size, ...props }: ToggleProps): import("react/jsx-runtime").JSX.Element;
10
+ type ToggleButtonProps = ToggleProps & ({
11
+ iconOnly: true;
12
+ 'aria-label': string;
13
+ } | {
14
+ iconOnly?: false;
15
+ });
16
+ declare function ToggleButton({ className, iconOnly, size, ...props }: ToggleButtonProps): import("react/jsx-runtime").JSX.Element;
17
+ export { Toggle, ToggleButton, toggleVariants, type ToggleButtonProps, type ToggleProps, };
10
18
  //# sourceMappingURL=toggle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../src/components/ui/toggle.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAEjE,QAAA,MAAM,cAAc;;;8EAoBnB,CAAA;AAED,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAO,EACP,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,GAClD,YAAY,CAAC,OAAO,cAAc,CAAC,2CAQpC;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
1
+ {"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../src/components/ui/toggle.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAEjE,QAAA,MAAM,cAAc;;;8EAsBnB,CAAA;AAED,KAAK,WAAW,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,GAClE,YAAY,CAAC,OAAO,cAAc,CAAC,CAAA;AAErC,iBAAS,MAAM,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,2CAQlE;AAED,KAAK,iBAAiB,GAAG,WAAW,GAClC,CACI;IACE,QAAQ,EAAE,IAAI,CAAA;IACd,YAAY,EAAE,MAAM,CAAA;CACrB,GACD;IACE,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB,CACJ,CAAA;AASH,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,QAAgB,EAChB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,iBAAiB,2CAanB;AAED,OAAO,EACL,MAAM,EACN,YAAY,EACZ,cAAc,EACd,KAAK,iBAAiB,EACtB,KAAK,WAAW,GACjB,CAAA"}
@@ -3,13 +3,15 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import * as TogglePrimitive from '@radix-ui/react-toggle';
4
4
  import { cn } from '../../lib/utils';
5
5
  import { cva } from 'class-variance-authority';
6
- const toggleVariants = cva("inline-flex cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap", {
6
+ const toggleVariants = cva("inline-flex cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-control-hover disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=on]:bg-control-selected data-[state=on]:text-control-selected-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[background-color,color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap", {
7
7
  variants: {
8
8
  variant: {
9
9
  default: 'bg-transparent',
10
10
  outline: 'border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground',
11
+ filled: 'bg-muted/70 text-foreground shadow-xs',
11
12
  },
12
13
  size: {
14
+ xs: 'h-6 min-w-6 gap-1 px-1.5 text-xs [&_svg:not([class*="size-"])]:size-3',
13
15
  default: 'h-9 px-2 min-w-9',
14
16
  sm: 'h-8 px-1.5 min-w-8',
15
17
  lg: 'h-10 px-2.5 min-w-10',
@@ -23,4 +25,13 @@ const toggleVariants = cva("inline-flex cursor-pointer items-center justify-cent
23
25
  function Toggle({ className, variant, size, ...props }) {
24
26
  return (_jsx(TogglePrimitive.Root, { "data-slot": "toggle", className: cn(toggleVariants({ variant, size, className })), ...props }));
25
27
  }
26
- export { Toggle, toggleVariants };
28
+ const iconOnlySizeClasses = {
29
+ xs: 'size-6 min-w-6 p-0',
30
+ sm: 'size-8 min-w-8 p-0',
31
+ default: 'size-9 min-w-9 p-0',
32
+ lg: 'size-10 min-w-10 p-0',
33
+ };
34
+ function ToggleButton({ className, iconOnly = false, size = 'default', ...props }) {
35
+ return (_jsx(Toggle, { "data-slot": "toggle-button", "data-icon-only": iconOnly || undefined, size: size, className: cn(iconOnly && iconOnlySizeClasses[size ?? 'default'], className), ...props }));
36
+ }
37
+ export { Toggle, ToggleButton, toggleVariants, };
@@ -1,15 +1,22 @@
1
1
  import * as React from 'react';
2
+ import type { MaterialVariant } from './material';
2
3
  import { Separator } from './separator';
3
4
  import { Text } from './text';
4
5
  import { type VariantProps } from 'class-variance-authority';
5
6
  declare const toolbarVariants: (props?: ({
6
7
  variant?: "default" | "plain" | "panel" | null | undefined;
8
+ material?: "regular" | "clear" | "none" | null | undefined;
7
9
  density?: "default" | "compact" | "comfortable" | null | undefined;
8
- position?: "bottom" | "top" | "static" | null | undefined;
10
+ position?: "static" | "top" | "bottom" | null | undefined;
9
11
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
12
  export interface ToolbarProps extends React.ComponentProps<'header'>, VariantProps<typeof toolbarVariants> {
13
+ /**
14
+ * Defaults to regular material for the default toolbar and no material for
15
+ * plain or panel variants.
16
+ */
17
+ material?: MaterialVariant | 'none';
11
18
  }
12
- declare function Toolbar({ variant, density, position, className, ...props }: ToolbarProps): import("react/jsx-runtime").JSX.Element;
19
+ declare function Toolbar({ variant, density, position, material, className, ...props }: ToolbarProps): import("react/jsx-runtime").JSX.Element;
13
20
  declare function ToolbarGroup({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
14
21
  declare function ToolbarContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
15
22
  declare function ToolbarTitle({ className, ...props }: React.ComponentProps<typeof Text>): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/toolbar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAEjE,QAAA,MAAM,eAAe;;;;8EA2BpB,CAAA;AAED,MAAM,WAAW,YACf,SAAQ,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EACpC,YAAY,CAAC,OAAO,eAAe,CAAC;CAAG;AAE3C,iBAAS,OAAO,CAAC,EACf,OAAO,EACP,OAA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;;8EAsCpB,CAAA;AAED,MAAM,WAAW,YACf,SAAQ,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EACpC,YAAY,CAAC,OAAO,eAAe,CAAC;IACtC;;;OAGG;IACH,QAAQ,CAAC,EAAE,eAAe,GAAG,MAAM,CAAA;CACpC;AAED,iBAAS,OAAO,CAAC,EACf,OAAO,EACP,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,YAAY,2CAyBd;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQzE;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ3E;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,2CAWnC;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,2CAYnC;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ3E;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,2CASxC;AAED,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,eAAe,GAChB,CAAA"}
@@ -7,9 +7,14 @@ import { cva } from 'class-variance-authority';
7
7
  const toolbarVariants = cva('z-20 flex w-full shrink-0 items-center gap-2 px-3', {
8
8
  variants: {
9
9
  variant: {
10
- default: 'border-border/70 bg-background/90 supports-[backdrop-filter]:bg-background/75 border-b backdrop-blur-xl',
10
+ default: 'border-border/70 border-b',
11
11
  plain: 'bg-transparent',
12
- panel: 'border-border/60 bg-muted/35 border-b',
12
+ panel: 'border-border/60 border-b',
13
+ },
14
+ material: {
15
+ regular: 'moldable-material',
16
+ clear: 'moldable-material',
17
+ none: '',
13
18
  },
14
19
  density: {
15
20
  compact: 'min-h-8 py-1',
@@ -22,14 +27,28 @@ const toolbarVariants = cva('z-20 flex w-full shrink-0 items-center gap-2 px-3',
22
27
  bottom: 'sticky bottom-0 border-t border-b-0',
23
28
  },
24
29
  },
30
+ compoundVariants: [
31
+ {
32
+ variant: 'panel',
33
+ material: 'none',
34
+ className: 'bg-muted/35',
35
+ },
36
+ ],
25
37
  defaultVariants: {
26
38
  variant: 'default',
27
39
  density: 'compact',
28
40
  position: 'static',
29
41
  },
30
42
  });
31
- function Toolbar({ variant, density, position, className, ...props }) {
32
- return (_jsx("header", { "data-slot": "toolbar", "data-density": density ?? 'compact', "data-position": position ?? 'static', "data-variant": variant ?? 'default', className: cn(toolbarVariants({ variant, density, position }), className), ...props }));
43
+ function Toolbar({ variant, density, position, material, className, ...props }) {
44
+ const resolvedVariant = variant ?? 'default';
45
+ const resolvedMaterial = material ?? (resolvedVariant === 'default' ? 'regular' : 'none');
46
+ return (_jsx("header", { "data-slot": "toolbar", "data-density": density ?? 'compact', "data-position": position ?? 'static', "data-variant": resolvedVariant, "data-material": resolvedMaterial === 'none' ? undefined : resolvedMaterial, "data-material-elevation": resolvedMaterial === 'none' ? undefined : 'none', className: cn(toolbarVariants({
47
+ variant: resolvedVariant,
48
+ material: resolvedMaterial,
49
+ density,
50
+ position,
51
+ }), className), ...props }));
33
52
  }
34
53
  function ToolbarGroup({ className, ...props }) {
35
54
  return (_jsx("div", { "data-slot": "toolbar-group", className: cn('flex min-w-0 items-center gap-1.5', className), ...props }));
@@ -1,8 +1,13 @@
1
1
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
2
2
  import * as React from 'react';
3
- declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
3
+ import { KbdGroup } from './kbd';
4
+ import { type MaterialVariant } from './material';
5
+ declare function TooltipProvider({ delayDuration, skipDelayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
4
6
  declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
5
7
  declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
- declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
7
- export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
8
+ declare function TooltipContent({ className, material, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content> & {
9
+ material?: MaterialVariant;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ declare function TooltipShortcut({ className, ...props }: React.ComponentProps<typeof KbdGroup>): import("react/jsx-runtime").JSX.Element;
12
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipShortcut, TooltipTrigger, };
8
13
  //# sourceMappingURL=tooltip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/ui/tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAC3D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,iBAAS,eAAe,CAAC,EACvB,aAAiB,EACjB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,2CAQxD;AAED,iBAAS,OAAO,CAAC,EACf,GAAG,KAAK,EACT,EAA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;IACzD,QAAQ,CAAC,EAAE,eAAe,CAAA;CAC3B,2CAqBA;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,2CAQvC;AAED,OAAO,EACL,OAAO,EACP,cAAc,EACd,eAAe,EACf,eAAe,EACf,cAAc,GACf,CAAA"}
@@ -2,16 +2,21 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
4
4
  import { cn } from '../../lib/utils';
5
- function TooltipProvider({ delayDuration = 0, ...props }) {
6
- return (_jsx(TooltipPrimitive.Provider, { "data-slot": "tooltip-provider", delayDuration: delayDuration, ...props }));
5
+ import { KbdGroup } from './kbd';
6
+ import { Material } from './material';
7
+ function TooltipProvider({ delayDuration = 500, skipDelayDuration = 300, ...props }) {
8
+ return (_jsx(TooltipPrimitive.Provider, { "data-slot": "tooltip-provider", delayDuration: delayDuration, skipDelayDuration: skipDelayDuration, ...props }));
7
9
  }
8
10
  function Tooltip({ ...props }) {
9
- return (_jsx(TooltipProvider, { children: _jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) }));
11
+ return _jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props });
10
12
  }
11
13
  function TooltipTrigger({ ...props }) {
12
14
  return _jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
13
15
  }
14
- function TooltipContent({ className, sideOffset = 0, children, ...props }) {
15
- return (_jsx(TooltipPrimitive.Portal, { children: _jsxs(TooltipPrimitive.Content, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn('bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-tooltip-content-transform-origin) z-50 w-fit text-balance rounded-md px-3 py-1.5 text-xs', className), ...props, children: [children, _jsx(TooltipPrimitive.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })] }) }));
16
+ function TooltipContent({ className, material = 'regular', sideOffset = 0, children, ...props }) {
17
+ return (_jsx(TooltipPrimitive.Portal, { children: _jsx(Material, { variant: material, elevation: "overlay", asChild: true, children: _jsxs(TooltipPrimitive.Content, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn('text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95', 'data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1', 'origin-(--radix-tooltip-content-transform-origin) z-50 flex w-fit max-w-80 items-center text-balance px-2.5 py-1.5 text-xs duration-[var(--motion-duration-fast)]', className), ...props, children: [children, _jsx(TooltipPrimitive.Arrow, { className: "fill-surface-overlay z-50" })] }) }) }));
16
18
  }
17
- export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
19
+ function TooltipShortcut({ className, ...props }) {
20
+ return (_jsx(KbdGroup, { "data-slot": "tooltip-shortcut", className: cn('ml-2 text-[0.625rem] opacity-70', className), ...props }));
21
+ }
22
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipShortcut, TooltipTrigger, };
@@ -8,6 +8,7 @@ export interface MoldableHostContextMessage {
8
8
  type: 'moldable:host-context';
9
9
  version: 1;
10
10
  displayMode: 'embedded' | 'window';
11
+ titlebar?: 'host' | 'app';
11
12
  platform?: 'macos' | 'windows' | 'linux' | 'unknown';
12
13
  windowId?: string;
13
14
  safeInsets?: {
@@ -1 +1 @@
1
- {"version":3,"file":"frame-lifecycle.d.ts","sourceRoot":"","sources":["../../src/lib/frame-lifecycle.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AE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,uBAAuB,CAAA;IAC7B,OAAO,EAAE,CAAC,CAAA;IACV,WAAW,EAAE,UAAU,GAAG,QAAQ,CAAA;IAClC,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE;QACX,GAAG,CAAC,EAAE,OAAO,CAAA;QACb,WAAW,CAAC,EAAE,OAAO,CAAA;QACrB,SAAS,CAAC,EAAE,OAAO,CAAA;QACnB,MAAM,CAAC,EAAE,OAAO,CAAA;QAChB,cAAc,CAAC,EAAE,OAAO,CAAA;QACxB,uBAAuB,CAAC,EAAE,OAAO,CAAA;QACjC,qBAAqB,CAAC,EAAE,OAAO,CAAA;QAC/B,YAAY,CAAC,EAAE,OAAO,CAAA;KACvB,CAAA;IACD,IAAI,CAAC,EAAE;QACL,YAAY,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,WAAW,CAAA;QAC7D,WAAW,CAAC,EAAE,OAAO,CAAA;KACtB,CAAA;CACF;AAwBD,wBAAgB,4BAA4B,CAAC,WAAW,EAAE,OAAO,GAAG,OAAO,CAa1E;AAwID,wBAAgB,6BAA6B,IAAI,IAAI,CAcpD"}
@@ -28,6 +28,7 @@ function applyMoldableChatState(message) {
28
28
  function applyMoldableHostContext(message) {
29
29
  const root = document.documentElement;
30
30
  root.dataset.moldableDisplayMode = message.displayMode;
31
+ root.dataset.moldableWindowTitlebar = message.titlebar ?? 'host';
31
32
  if (message.platform)
32
33
  root.dataset.moldablePlatform = message.platform;
33
34
  if (message.windowId)
@@ -55,6 +56,7 @@ function installHostStateLifecycle() {
55
56
  const root = document.documentElement;
56
57
  root.dataset.moldableDisplayMode =
57
58
  window.parent === window ? 'window' : 'embedded';
59
+ root.dataset.moldableWindowTitlebar = 'host';
58
60
  // Standalone windows do not reserve space for the desktop chat dock.
59
61
  if (window.parent === window) {
60
62
  applyMoldableChatSafePadding(0);
@@ -75,8 +77,7 @@ function installHostStateLifecycle() {
75
77
  else if (event.data.type === 'moldable:host-context') {
76
78
  const message = event.data;
77
79
  if (message.version === 1 &&
78
- (message.displayMode === 'embedded' ||
79
- message.displayMode === 'window')) {
80
+ (message.displayMode === 'embedded' || message.displayMode === 'window')) {
80
81
  applyMoldableHostContext(message);
81
82
  }
82
83
  }
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/lib/theme.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AAEd,MAAM,MAAM,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAA;AAC/C,KAAK,aAAa,GAAG,OAAO,GAAG,MAAM,CAAA;AAErC,UAAU,iBAAiB;IACzB,KAAK,EAAE,KAAK,CAAA;IACZ,aAAa,EAAE,aAAa,CAAA;IAC5B,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CACjC;AA6CD,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CA0ClE;AAED,wBAAgB,QAAQ,sBAMvB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,kYAYvB,CAAA"}
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/lib/theme.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AAGd,MAAM,MAAM,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAA;AAC/C,KAAK,aAAa,GAAG,OAAO,GAAG,MAAM,CAAA;AAErC,UAAU,iBAAiB;IACzB,KAAK,EAAE,KAAK,CAAA;IACZ,aAAa,EAAE,aAAa,CAAA;IAC5B,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CACjC;AA6CD,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CA0ClE;AAED,wBAAgB,QAAQ,sBAMvB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,kYAYvB,CAAA"}
package/dist/lib/theme.js CHANGED
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { createContext, useCallback, useContext, useEffect, useState, } from 'react';
4
+ import { TooltipProvider } from '../components/ui/tooltip';
4
5
  const ThemeContext = createContext(null);
5
6
  const STORAGE_KEY = 'moldable-theme';
6
7
  function getSystemTheme() {
@@ -69,7 +70,7 @@ export function ThemeProvider({ children }) {
69
70
  mediaQuery.addEventListener('change', handleChange);
70
71
  return () => mediaQuery.removeEventListener('change', handleChange);
71
72
  }, [theme]);
72
- return (_jsx(ThemeContext.Provider, { value: { theme, resolvedTheme, setTheme }, children: children }));
73
+ return (_jsx(ThemeContext.Provider, { value: { theme, resolvedTheme, setTheme }, children: _jsx(TooltipProvider, { children: children }) }));
73
74
  }
74
75
  export function useTheme() {
75
76
  const context = useContext(ThemeContext);
package/docs/README.md CHANGED
@@ -8,6 +8,7 @@ feels at home on macOS without imitating private platform implementation.
8
8
 
9
9
  - [Foundations](./foundations.md)
10
10
  - [Design tokens](./design-tokens.md)
11
+ - [Adaptive materials](./adaptive-materials.md)
11
12
  - [App anatomy](./app-anatomy.md)
12
13
  - [Standalone app windows](./standalone-app-windows.md)
13
14
  - [Component catalog](./component-catalog.md)
@@ -34,4 +35,5 @@ changed view.
34
35
  7. Design loading, empty, error, disabled, and permission states with the main
35
36
  view, not afterward.
36
37
  8. Review component work in the catalog across theme, density, width, and
37
- interaction states.
38
+ interaction states. Material-bearing components also cover reduced
39
+ transparency, increased contrast, and reduced motion.