@glasshome/ui 1.41.0 → 1.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/SPEC.md +5 -0
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.js +3 -3
  4. package/dist/lib/anchor-placement.d.ts +34 -0
  5. package/dist/lib/balance-rows.d.ts +10 -4
  6. package/dist/lib/behavior/anchored.d.ts +26 -0
  7. package/dist/lib/behavior/button-root.d.ts +7 -0
  8. package/dist/lib/behavior/collection.d.ts +32 -0
  9. package/dist/lib/behavior/controllable.d.ts +8 -0
  10. package/dist/lib/behavior/dismiss.d.ts +13 -0
  11. package/dist/lib/behavior/focus-scope.d.ts +24 -0
  12. package/dist/lib/behavior/hide-outside.d.ts +7 -0
  13. package/dist/lib/behavior/layer-stack.d.ts +34 -0
  14. package/dist/lib/behavior/menu.d.ts +59 -0
  15. package/dist/lib/behavior/modal-root.d.ts +68 -0
  16. package/dist/lib/behavior/polymorphic.d.ts +6 -0
  17. package/dist/lib/behavior/presence.d.ts +18 -0
  18. package/dist/lib/behavior/range.d.ts +44 -0
  19. package/dist/lib/behavior/solid.d.ts +13 -0
  20. package/dist/lib/color/color.d.ts +41 -0
  21. package/dist/lib/color/index.d.ts +2 -0
  22. package/dist/lib/color/intl.d.ts +40 -0
  23. package/dist/lib/dock-slot-classes.d.ts +2 -0
  24. package/dist/lib/hold.d.ts +1 -1
  25. package/dist/lib/locale.d.ts +3 -0
  26. package/dist/lib/menu-classes.d.ts +2 -0
  27. package/dist/lib/motion-classes.d.ts +5 -2
  28. package/dist/lib/overlay-classes.d.ts +4 -0
  29. package/dist/lib/page-cover.d.ts +8 -0
  30. package/dist/lib/scroll-track.d.ts +3 -2
  31. package/dist/lib/section-tokens.d.ts +1 -1
  32. package/dist/lib/segment-classes.d.ts +2 -0
  33. package/dist/lib/shadow-layer.d.ts +0 -43
  34. package/dist/lib/toggle-set.d.ts +44 -0
  35. package/dist/lib/visually-hidden.d.ts +3 -0
  36. package/dist/solid/accordion.d.ts +35 -11
  37. package/dist/solid/alert-dialog.d.ts +5 -8
  38. package/dist/solid/avatar.d.ts +8 -4
  39. package/dist/solid/bottom-sheet/bottom-sheet.d.ts +2 -2
  40. package/dist/solid/bottom-sheet/constants.d.ts +1 -1
  41. package/dist/solid/button.d.ts +5 -4
  42. package/dist/solid/charts.d.ts +1 -1
  43. package/dist/solid/checkbox.d.ts +14 -4
  44. package/dist/solid/collapsible.d.ts +33 -5
  45. package/dist/solid/color-disc.d.ts +1 -1
  46. package/dist/solid/color-slider.d.ts +1 -1
  47. package/dist/solid/color-wheel.d.ts +1 -1
  48. package/dist/solid/context-menu.d.ts +58 -24
  49. package/dist/solid/dialog-parts.d.ts +53 -16
  50. package/dist/solid/dialog.d.ts +7 -10
  51. package/dist/solid/dropdown-menu.d.ts +55 -24
  52. package/dist/solid/empty.d.ts +1 -1
  53. package/dist/solid/form.d.ts +5 -6
  54. package/dist/solid/hover-card.d.ts +65 -9
  55. package/dist/solid/index.d.ts +5 -2
  56. package/dist/solid/index.js +8671 -14317
  57. package/dist/solid/input-group.d.ts +6 -6
  58. package/dist/solid/item.d.ts +1 -1
  59. package/dist/solid/menu-parts.d.ts +175 -24
  60. package/dist/solid/option-card.d.ts +1 -4
  61. package/dist/solid/picker-row.d.ts +2 -0
  62. package/dist/solid/popover.d.ts +77 -12
  63. package/dist/solid/progress.d.ts +11 -3
  64. package/dist/solid/radio-group.d.ts +31 -6
  65. package/dist/solid/responsive-dialog.d.ts +3 -1
  66. package/dist/solid/scroll-area.d.ts +1 -1
  67. package/dist/solid/section-card.d.ts +2 -3
  68. package/dist/solid/select.d.ts +107 -10
  69. package/dist/solid/selection.d.ts +10 -1
  70. package/dist/solid/sheet.d.ts +6 -9
  71. package/dist/solid/sliding-indicator.d.ts +1 -1
  72. package/dist/solid/sonner.d.ts +1 -1
  73. package/dist/solid/stale-veil.d.ts +7 -0
  74. package/dist/solid/tabs.d.ts +28 -9
  75. package/dist/solid/toggle-group.d.ts +30 -5
  76. package/dist/solid/toggle.d.ts +11 -3
  77. package/dist/solid/tooltip.d.ts +71 -9
  78. package/dist/tokens/index.js +54 -51
  79. package/dist/{utils-CGN4X-2O.js → utils-3Codx-NZ.js} +848 -618
  80. package/package.json +6 -7
  81. package/src/index.ts +1 -0
  82. package/src/lib/anchor-placement.ts +77 -4
  83. package/src/lib/balance-rows.ts +115 -40
  84. package/src/lib/behavior/anchored.ts +106 -0
  85. package/src/lib/behavior/button-root.tsx +103 -0
  86. package/src/lib/behavior/collection.ts +218 -0
  87. package/src/lib/behavior/controllable.ts +22 -0
  88. package/src/lib/behavior/dismiss.ts +185 -0
  89. package/src/lib/behavior/focus-scope.ts +227 -0
  90. package/src/lib/behavior/hide-outside.ts +85 -0
  91. package/src/lib/behavior/layer-stack.ts +150 -0
  92. package/src/lib/behavior/menu.ts +470 -0
  93. package/src/lib/behavior/modal-root.tsx +452 -0
  94. package/src/lib/behavior/polymorphic.tsx +30 -0
  95. package/src/lib/behavior/presence.ts +89 -0
  96. package/src/lib/behavior/range.ts +212 -0
  97. package/src/lib/behavior/solid.ts +30 -0
  98. package/src/lib/clipboard.ts +4 -4
  99. package/src/lib/color/color.ts +746 -0
  100. package/src/lib/color/index.ts +2 -0
  101. package/src/lib/color/intl.ts +60 -0
  102. package/src/lib/dock-slot-classes.ts +3 -0
  103. package/src/lib/hold.ts +1 -1
  104. package/src/lib/locale.ts +62 -0
  105. package/src/lib/menu-classes.ts +3 -0
  106. package/src/lib/motion-classes.ts +33 -8
  107. package/src/lib/overlay-classes.ts +8 -3
  108. package/src/lib/page-cover.ts +47 -0
  109. package/src/lib/scroll-track.ts +11 -6
  110. package/src/lib/section-tokens.ts +1 -1
  111. package/src/lib/segment-classes.ts +3 -0
  112. package/src/lib/shadow-layer.ts +0 -136
  113. package/src/lib/toggle-set.ts +133 -0
  114. package/src/lib/visually-hidden.ts +15 -0
  115. package/src/solid/accordion.tsx +294 -20
  116. package/src/solid/alert-dialog.tsx +36 -85
  117. package/src/solid/area-picker.tsx +5 -3
  118. package/src/solid/avatar.tsx +98 -24
  119. package/src/solid/badge.tsx +5 -5
  120. package/src/solid/bottom-sheet/bottom-sheet.tsx +73 -129
  121. package/src/solid/bottom-sheet/constants.ts +3 -1
  122. package/src/solid/bottom-sheet/drag-controller.ts +11 -0
  123. package/src/solid/breadcrumb.tsx +4 -4
  124. package/src/solid/button-group.tsx +4 -4
  125. package/src/solid/button.tsx +12 -6
  126. package/src/solid/card.tsx +5 -4
  127. package/src/solid/charts.tsx +1 -1
  128. package/src/solid/checkbox.tsx +167 -44
  129. package/src/solid/collapsible.tsx +260 -12
  130. package/src/solid/color-disc.tsx +11 -12
  131. package/src/solid/color-slider.tsx +114 -47
  132. package/src/solid/color-wheel.tsx +137 -39
  133. package/src/solid/context-menu.tsx +287 -86
  134. package/src/solid/dialog-parts.tsx +135 -46
  135. package/src/solid/dialog.tsx +44 -76
  136. package/src/solid/dock-edit.tsx +5 -4
  137. package/src/solid/dock.tsx +6 -5
  138. package/src/solid/dropdown-menu.tsx +252 -107
  139. package/src/solid/empty.tsx +1 -1
  140. package/src/solid/entity-selector.tsx +5 -3
  141. package/src/solid/face-toggle.tsx +43 -18
  142. package/src/solid/form.tsx +9 -9
  143. package/src/solid/glyph-tile.tsx +48 -21
  144. package/src/solid/hover-card.tsx +288 -21
  145. package/src/solid/icon-picker.tsx +2 -1
  146. package/src/solid/image-picker.tsx +6 -5
  147. package/src/solid/index.ts +5 -4
  148. package/src/solid/input-group.tsx +7 -5
  149. package/src/solid/input-otp.tsx +2 -1
  150. package/src/solid/item.tsx +5 -5
  151. package/src/solid/logo.tsx +5 -4
  152. package/src/solid/menu-parts.tsx +619 -145
  153. package/src/solid/option-card.tsx +6 -10
  154. package/src/solid/picker-row.tsx +10 -5
  155. package/src/solid/picker-search.tsx +2 -1
  156. package/src/solid/popover.tsx +424 -71
  157. package/src/solid/preview-tile.tsx +1 -1
  158. package/src/solid/progress.tsx +84 -15
  159. package/src/solid/radio-group.tsx +271 -34
  160. package/src/solid/responsive-dialog.tsx +10 -10
  161. package/src/solid/schema-form.tsx +1 -6
  162. package/src/solid/scroll-area.tsx +1 -1
  163. package/src/solid/section-card.tsx +3 -4
  164. package/src/solid/select.tsx +950 -95
  165. package/src/solid/selection.tsx +142 -66
  166. package/src/solid/sheet.tsx +48 -80
  167. package/src/solid/slider.tsx +115 -65
  168. package/src/solid/sliding-indicator.tsx +1 -1
  169. package/src/solid/sonner.tsx +1 -1
  170. package/src/solid/spotlight.tsx +23 -11
  171. package/src/solid/stale-veil.tsx +20 -0
  172. package/src/solid/switch.tsx +8 -6
  173. package/src/solid/tabs.tsx +377 -52
  174. package/src/solid/term.tsx +3 -4
  175. package/src/solid/toggle-group.tsx +237 -95
  176. package/src/solid/toggle.tsx +43 -9
  177. package/src/solid/tooltip.tsx +285 -26
  178. package/src/styles/globals.css +64 -10
  179. package/src/styles/theme.css +12 -4
  180. package/src/tokens/material.ts +11 -2
  181. package/dist/lib/when-animations-settle.d.ts +0 -4
  182. package/dist/solid/bottom-sheet/focus-trap.d.ts +0 -6
  183. package/dist/solid/bottom-sheet/scroll-lock.d.ts +0 -2
  184. package/dist/solid/bottom-sheet/sheet-motion.d.ts +0 -1
  185. package/src/lib/when-animations-settle.ts +0 -12
  186. package/src/solid/bottom-sheet/focus-trap.ts +0 -63
  187. package/src/solid/bottom-sheet/scroll-lock.ts +0 -66
  188. package/src/solid/bottom-sheet/sheet-motion.ts +0 -4
@@ -1,10 +1,9 @@
1
- import { Dialog as DialogPrimitive } from "@kobalte/core/dialog";
2
1
  import type { VariantProps } from "cva";
3
- import { type Component, type ComponentProps, type JSX, type ParentComponent } from "solid-js";
2
+ import { type Component, type JSX, type ParentComponent } from "solid-js";
4
3
  import { buttonVariants } from "../lib/button-variants.js";
5
- import { type ModalDismissProps } from "./dialog-parts.js";
6
- declare const Sheet: ParentComponent<ComponentProps<typeof DialogPrimitive>>;
7
- declare const SheetTrigger: Component<ComponentProps<typeof DialogPrimitive.Trigger>>;
4
+ import { type ModalContentProps, type ModalDismissProps } from "./dialog-parts.js";
5
+ declare const Sheet: ParentComponent<import("./dialog-parts.js").ModalRootSkinProps>;
6
+ declare const SheetTrigger: <T extends import("solid-js").ValidComponent = "button">(props: import("../lib/behavior/modal-root.js").ModalPartProps<T>) => JSX.Element, SheetTitle: <T extends import("solid-js").ValidComponent = "h2">(props: import("../lib/behavior/modal-root.js").ModalPartProps<T>) => JSX.Element, SheetDescription: <T extends import("solid-js").ValidComponent = "p">(props: import("../lib/behavior/modal-root.js").ModalPartProps<T>) => JSX.Element;
8
7
  type SheetCloseProps = ModalDismissProps & Partial<Pick<VariantProps<typeof buttonVariants>, "variant" | "size">>;
9
8
  /** Already the outline button; see DialogClose on why `as={Button}` is wrong. */
10
9
  declare const SheetClose: ParentComponent<SheetCloseProps>;
@@ -12,11 +11,11 @@ declare const SHEET_SIDE: {
12
11
  readonly right: "data-[closed]:slide-out-to-right data-[expanded]:slide-in-from-right inset-y-3 right-3 w-3/4 sm:max-w-sm";
13
12
  readonly left: "data-[closed]:slide-out-to-left data-[expanded]:slide-in-from-left inset-y-3 left-3 w-3/4 sm:max-w-sm";
14
13
  readonly top: "data-[closed]:slide-out-to-top data-[expanded]:slide-in-from-top inset-x-3 top-3 [--modal-max-h:85dvh] max-h-[var(--modal-max-h)]";
15
- /** @deprecated a modal from the bottom is `BottomSheet` / `ResponsiveDialog`. */
14
+ /** @deprecated `BottomSheet` or `ResponsiveDialog`; removed in 2.0.0. */
16
15
  readonly bottom: "data-[closed]:slide-out-to-bottom data-[expanded]:slide-in-from-bottom inset-x-3 bottom-3 [--modal-max-h:85dvh] max-h-[var(--modal-max-h)]";
17
16
  };
18
17
  type SheetSide = keyof typeof SHEET_SIDE;
19
- type SheetContentProps = ComponentProps<typeof DialogPrimitive.Content> & {
18
+ type SheetContentProps = ModalContentProps & {
20
19
  /** A modal belongs in `ResponsiveDialog`; this family slides from an edge. */
21
20
  side?: SheetSide;
22
21
  above?: JSX.Element;
@@ -27,6 +26,4 @@ declare const SheetContent: ParentComponent<SheetContentProps>;
27
26
  declare const SheetHeader: Component<import("./dialog-parts.js").ModalHeaderProps>, SheetBody: Component<JSX.HTMLAttributes<HTMLDivElement> & {
28
27
  as?: import("solid-js").ValidComponent;
29
28
  }>, SheetFooter: Component<JSX.HTMLAttributes<HTMLDivElement>>;
30
- declare const SheetTitle: Component<ComponentProps<typeof DialogPrimitive.Title>>;
31
- declare const SheetDescription: Component<ComponentProps<typeof DialogPrimitive.Description>>;
32
29
  export { Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, };
@@ -30,6 +30,6 @@ interface SlidingIndicatorProps extends ComponentProps<"div"> {
30
30
  wrapped?: boolean;
31
31
  children: JSX.Element;
32
32
  }
33
- /** @deprecated Use `SelectionScope` with a `SelectionHighlight` in each item; removed in 2.0. */
33
+ /** @deprecated `SelectionScope` with a `SelectionHighlight` in each item; removed in 2.0.0. */
34
34
  export declare function SlidingIndicator(props: SlidingIndicatorProps): JSX.Element;
35
35
  export {};
@@ -25,7 +25,7 @@ declare const toast: ((message: ToastMessage, data?: ExternalToast) => string |
25
25
  warning: (message: ToastMessage, data?: ExternalToast) => string | number;
26
26
  info: (message: ToastMessage, data?: ExternalToast) => string | number;
27
27
  message: (message: ToastMessage, data?: ExternalToast) => string | number;
28
- /** @deprecated Use `toast.promise`, which ends the loading toast when the promise settles. Removed in 2.0.0. */
28
+ /** @deprecated `toast.promise`; removed in 2.0.0. */
29
29
  loading: (message: ToastMessage, data?: ExternalToast) => string | number;
30
30
  custom: (jsx: (id: number | string) => JSX.Element, data?: ExternalToast) => string | number;
31
31
  dismiss: (id?: number | string) => string | number | undefined;
@@ -0,0 +1,7 @@
1
+ import { type Component } from "solid-js";
2
+ /** Fills its positioned parent; no z-index, so it paints over earlier siblings: render it last. */
3
+ declare const StaleVeil: Component<{
4
+ shown: boolean;
5
+ class?: string;
6
+ }>;
7
+ export { StaleVeil };
@@ -1,19 +1,38 @@
1
- import { Tabs as TabsPrimitive } from "@kobalte/core/tabs";
2
- import { type Component, type ComponentProps } from "solid-js";
1
+ import { type Component, type ComponentProps, type ValidComponent } from "solid-js";
3
2
  /** `split`: the root is `display: contents`, so a host (a modal panel) lays the
4
3
  * list and the content out in its own regions while the tab state still spans
5
4
  * them. */
6
5
  type TabsLayout = "stack" | "split";
7
- type TabsProps = ComponentProps<typeof TabsPrimitive> & {
6
+ type Orientation = "horizontal" | "vertical";
7
+ type TabsProps = Omit<ComponentProps<"div">, "onChange"> & {
8
+ as?: ValidComponent;
8
9
  layout?: TabsLayout;
10
+ value?: string;
11
+ defaultValue?: string;
12
+ onChange?: (value: string) => void;
13
+ orientation?: Orientation;
14
+ activationMode?: "automatic" | "manual";
15
+ disabled?: boolean;
9
16
  };
10
17
  declare const Tabs: Component<TabsProps>;
11
- declare const TabsList: Component<ComponentProps<typeof TabsPrimitive.List>>;
12
- /** `icon` stacks a glyph over the word, so a tab row reads apart from the toggle groups under it.
13
- * `inline` sets the glyph beside the word instead, for a row that stands alone. */
14
- declare const TabsTrigger: Component<ComponentProps<typeof TabsPrimitive.Trigger> & {
18
+ type TabsListProps = ComponentProps<"div"> & {
19
+ as?: ValidComponent;
20
+ };
21
+ declare const TabsList: Component<TabsListProps>;
22
+ type TabsTriggerProps = ComponentProps<"button"> & {
23
+ as?: ValidComponent;
24
+ value: string;
25
+ disabled?: boolean;
15
26
  icon?: string;
16
27
  inline?: boolean;
17
- }>;
18
- declare const TabsContent: Component<ComponentProps<typeof TabsPrimitive.Content>>;
28
+ };
29
+ /** `icon` stacks a glyph over the word, so a tab row reads apart from the toggle groups under it.
30
+ * `inline` sets the glyph beside the word instead, for a row that stands alone. */
31
+ declare const TabsTrigger: Component<TabsTriggerProps>;
32
+ type TabsContentProps = ComponentProps<"div"> & {
33
+ as?: ValidComponent;
34
+ value: string;
35
+ forceMount?: boolean;
36
+ };
37
+ declare const TabsContent: Component<TabsContentProps>;
19
38
  export { Tabs, TabsContent, TabsList, TabsTrigger };
@@ -1,12 +1,37 @@
1
- import { ToggleGroup as ToggleGroupPrimitive } from "@kobalte/core/toggle-group";
2
1
  import type { VariantProps } from "cva";
3
- import { type Component, type ComponentProps, type ParentComponent } from "solid-js";
2
+ import { type Accessor, type Component, type ComponentProps, type JSX, type ParentComponent, type ValidComponent } from "solid-js";
4
3
  import { toggleVariants } from "./toggle.js";
5
- declare const ToggleGroup: ParentComponent<ComponentProps<typeof ToggleGroupPrimitive> & VariantProps<typeof toggleVariants> & {
4
+ type Orientation = "horizontal" | "vertical";
5
+ type SingleSelection = {
6
+ multiple?: false;
7
+ value?: string | null;
8
+ defaultValue?: string | null;
9
+ onChange?: (value: string | null) => void;
10
+ };
11
+ type MultipleSelection = {
12
+ multiple: true;
13
+ value?: string[];
14
+ defaultValue?: string[];
15
+ onChange?: (value: string[]) => void;
16
+ };
17
+ type ToggleGroupProps = Omit<ComponentProps<"div">, "onChange"> & VariantProps<typeof toggleVariants> & (SingleSelection | MultipleSelection) & {
18
+ as?: ValidComponent;
19
+ orientation?: Orientation;
20
+ disabled?: boolean;
6
21
  /** CSS colour for the selected segment's glass. Default `var(--material-accent)`. */
7
22
  tone?: string;
8
23
  /** One row that scrolls sideways when it outgrows its container, instead of wrapping. */
9
24
  scroll?: boolean;
10
- }>;
11
- declare const ToggleGroupItem: Component<ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>>;
25
+ };
26
+ declare const ToggleGroup: ParentComponent<ToggleGroupProps>;
27
+ type ToggleGroupItemState = {
28
+ pressed: Accessor<boolean>;
29
+ };
30
+ type ToggleGroupItemProps = Omit<ComponentProps<"button">, "children"> & VariantProps<typeof toggleVariants> & {
31
+ as?: ValidComponent;
32
+ value: string;
33
+ disabled?: boolean;
34
+ children?: JSX.Element | ((state: ToggleGroupItemState) => JSX.Element);
35
+ };
36
+ declare const ToggleGroupItem: Component<ToggleGroupItemProps>;
12
37
  export { ToggleGroup, ToggleGroupItem };
@@ -1,6 +1,6 @@
1
- import { ToggleButton as ToggleButtonPrimitive } from "@kobalte/core/toggle-button";
2
1
  import { type VariantProps } from "cva";
3
- import { type Component, type ComponentProps } from "solid-js";
2
+ import { type Accessor, type JSX } from "solid-js";
3
+ import { type ButtonRootProps } from "../lib/behavior/button-root.js";
4
4
  declare const toggleVariants: import("cva").CVAComponent<Omit<{
5
5
  base: string;
6
6
  variants: {
@@ -45,5 +45,13 @@ declare const toggleVariants: import("cva").CVAComponent<Omit<{
45
45
  lg: string;
46
46
  };
47
47
  }>;
48
- declare const Toggle: Component<ComponentProps<typeof ToggleButtonPrimitive> & VariantProps<typeof toggleVariants>>;
48
+ type ToggleProps = Omit<ButtonRootProps<"button">, "children" | "onChange"> & VariantProps<typeof toggleVariants> & {
49
+ pressed?: boolean;
50
+ defaultPressed?: boolean;
51
+ onChange?: (pressed: boolean) => void;
52
+ children?: JSX.Element | ((state: {
53
+ pressed: Accessor<boolean>;
54
+ }) => JSX.Element);
55
+ };
56
+ declare function Toggle(props: ToggleProps): JSX.Element;
49
57
  export { Toggle, toggleVariants };
@@ -1,11 +1,73 @@
1
- import { Tooltip as TooltipPrimitive } from "@kobalte/core/tooltip";
2
- import { type Component, type ComponentProps } from "solid-js";
3
- declare const Tooltip: Component<import("@kobalte/core/tooltip").TooltipRootProps> & typeof import("@kobalte/core/tooltip").Root & {
4
- Arrow: typeof import("@kobalte/core/popover").Arrow;
5
- Content: typeof import("@kobalte/core/tooltip").Content;
6
- Portal: typeof import("@kobalte/core/tooltip").Portal;
7
- Trigger: typeof import("@kobalte/core/tooltip").Trigger;
1
+ import { type Component, type ComponentProps, type JSX, type ValidComponent } from "solid-js";
2
+ import type { Align, Side } from "../lib/anchor-placement.js";
3
+ type Placement = Side | `${Side}-${Exclude<Align, "center">}`;
4
+ interface TooltipRootProps {
5
+ open?: boolean;
6
+ defaultOpen?: boolean;
7
+ onOpenChange?: (open: boolean) => void;
8
+ placement?: Placement;
9
+ gutter?: number;
10
+ openDelay?: number;
11
+ closeDelay?: number;
12
+ children?: JSX.Element;
13
+ /** @deprecated Ignored; removed in 2.0.0. */
14
+ id?: string;
15
+ /** @deprecated Ignored; removed in 2.0.0. */
16
+ disabled?: boolean;
17
+ /** @deprecated Ignored; removed in 2.0.0. */
18
+ skipDelayDuration?: number;
19
+ /** @deprecated Ignored; removed in 2.0.0. */
20
+ triggerOnFocusOnly?: boolean;
21
+ /** @deprecated Ignored; removed in 2.0.0. */
22
+ ignoreSafeArea?: boolean;
23
+ /** @deprecated Ignored; removed in 2.0.0. */
24
+ forceMount?: boolean;
25
+ /** @deprecated Ignored; removed in 2.0.0. */
26
+ getAnchorRect?: (anchor?: HTMLElement) => unknown;
27
+ /** @deprecated Ignored; removed in 2.0.0. */
28
+ shift?: number;
29
+ /** @deprecated Ignored; removed in 2.0.0. */
30
+ flip?: boolean | string;
31
+ /** @deprecated Ignored; removed in 2.0.0. */
32
+ slide?: boolean;
33
+ /** @deprecated Ignored; removed in 2.0.0. */
34
+ overlap?: boolean;
35
+ /** @deprecated Ignored; removed in 2.0.0. */
36
+ sameWidth?: boolean;
37
+ /** @deprecated Ignored; removed in 2.0.0. */
38
+ fitViewport?: boolean;
39
+ /** @deprecated Ignored; removed in 2.0.0. */
40
+ hideWhenDetached?: boolean;
41
+ /** @deprecated Ignored; removed in 2.0.0. */
42
+ detachedPadding?: number;
43
+ /** @deprecated Ignored; removed in 2.0.0. */
44
+ arrowPadding?: number;
45
+ /** @deprecated Ignored; removed in 2.0.0. */
46
+ overflowPadding?: number;
47
+ }
48
+ interface TooltipContentProps extends ComponentProps<"div"> {
49
+ /** @deprecated Ignored; removed in 2.0.0. */
50
+ forceMount?: boolean;
51
+ /** @deprecated Ignored; removed in 2.0.0. */
52
+ onEscapeKeyDown?: (event: Event) => void;
53
+ /** @deprecated Ignored; removed in 2.0.0. */
54
+ onPointerDownOutside?: (event: Event) => void;
55
+ /** @deprecated Ignored; removed in 2.0.0. */
56
+ onFocusOutside?: (event: Event) => void;
57
+ /** @deprecated Ignored; removed in 2.0.0. */
58
+ onInteractOutside?: (event: Event) => void;
59
+ }
60
+ type TooltipTriggerProps<T extends ValidComponent> = {
61
+ as?: T;
62
+ } & Omit<ComponentProps<T>, "as">;
63
+ declare function TooltipTrigger<T extends ValidComponent = "button">(props: TooltipTriggerProps<T>): JSX.Element;
64
+ declare const TooltipContent: Component<TooltipContentProps>;
65
+ declare const Tooltip: Component<TooltipRootProps> & {
66
+ Trigger: typeof TooltipTrigger;
67
+ Content: Component<TooltipContentProps>;
68
+ Portal: Component<{
69
+ children?: JSX.Element;
70
+ }>;
71
+ Arrow: Component;
8
72
  };
9
- declare const TooltipTrigger: typeof import("@kobalte/core/tooltip").Trigger;
10
- declare const TooltipContent: Component<ComponentProps<typeof TooltipPrimitive.Content>>;
11
73
  export { Tooltip, TooltipContent, TooltipTrigger };
@@ -166,10 +166,10 @@ var g = 1, _ = {
166
166
  ..._,
167
167
  inkLift: 1
168
168
  }
169
- }, y = {
169
+ }, ee = {
170
170
  v: 1,
171
171
  preset: "frosted"
172
- }, b = {
172
+ }, y = {
173
173
  blur: [0, 48],
174
174
  clarity: [0, 100],
175
175
  depth: [0, 2],
@@ -189,7 +189,7 @@ var g = 1, _ = {
189
189
  washAngle: [0, 360],
190
190
  relief: [0, 2],
191
191
  fill: [0, .6]
192
- }, x = {
192
+ }, b = {
193
193
  vibrancy: 1,
194
194
  inset: 0,
195
195
  lightFrom: 315,
@@ -205,10 +205,10 @@ var g = 1, _ = {
205
205
  relief: 1,
206
206
  accent: "theme",
207
207
  fill: 0
208
- }, S = 85, C = Object.keys(b);
209
- function w(e) {
208
+ }, x = 85, S = Object.keys(y);
209
+ function C(e) {
210
210
  let { edgeWidth: n, edgeInk: r, edgeAccent: i, inkLift: a, ...o } = v[e.preset], s = {
211
- ...x,
211
+ ...b,
212
212
  ...o,
213
213
  ...e.dials
214
214
  }, c = {
@@ -217,11 +217,11 @@ function w(e) {
217
217
  sheen: s.sheen ?? s.depth,
218
218
  shadow: s.shadow ?? s.depth
219
219
  };
220
- for (let e of C) c[e] = t(c[e], ...b[e]);
220
+ for (let e of S) c[e] = t(c[e], ...y[e]);
221
221
  return c;
222
222
  }
223
- function T(e) {
224
- let { blur: t, clarity: n, depth: r, tint: i, glow: a, ink: o } = w(e);
223
+ function w(e) {
224
+ let { blur: t, clarity: n, depth: r, tint: i, glow: a, ink: o } = C(e);
225
225
  return {
226
226
  blur: t,
227
227
  clarity: n,
@@ -231,15 +231,15 @@ function T(e) {
231
231
  ink: o
232
232
  };
233
233
  }
234
- var E = 315, D = (e) => Math.round(e * 1e4) / 1e4, O = (e, t) => `url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${e}'><filter id='n' x='0' y='0' width='100%' height='100%'>${t}</filter><rect width='${e}' height='${e}' filter='url(%23n)'/></svg>")`, ee = (e) => O(160, `<feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='0' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.7 0 0 0 0 0.7 0 0 0 0 0.7 0 0 0 ${D(e * .3)} 0'/>`), te = {
234
+ var T = 315, E = (e) => Math.round(e * 1e4) / 1e4, D = (e, t) => `url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${e}'><filter id='n' x='0' y='0' width='100%' height='100%'>${t}</filter><rect width='${e}' height='${e}' filter='url(%23n)'/></svg>")`, te = (e) => D(160, `<feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='0' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.7 0 0 0 0 0.7 0 0 0 0 0.7 0 0 0 ${E(e * .3)} 0'/>`), ne = {
235
235
  flat: 1,
236
236
  fade: 3,
237
237
  "two-tone": 1
238
- }, ne = {
238
+ }, O = (e, t, n, r) => `${E(50 + n * e + r * t)}% ${E(50 + n * t - r * e)}%`, re = {
239
239
  top: [0, 0],
240
240
  "top-bottom": [1, 0],
241
241
  around: [0, 1]
242
- }, re = {
242
+ }, ie = {
243
243
  flat: {
244
244
  "--material-control-track": "var(--input)",
245
245
  "--material-control-fill": "var(--material-accent)",
@@ -251,8 +251,8 @@ var E = 315, D = (e) => Math.round(e * 1e4) / 1e4, O = (e, t) => `url("data:imag
251
251
  "--material-control-knob": "var(--material-face)"
252
252
  }
253
253
  };
254
- function ie(e, t, n = "light") {
255
- let r = w(e), i = v[e.preset], a = t === "none" ? 0 : r.blur, o = t === "none" ? Math.max(r.clarity, S) : r.clarity, s = n === "dark" ? r.darkScale : 1, c = (r.lightFrom - E) * Math.PI / 180, [l, u] = ne[r.rim];
254
+ function ae(e, t, n = "light") {
255
+ let r = C(e), i = v[e.preset], a = t === "none" ? 0 : r.blur, o = t === "none" ? Math.max(r.clarity, x) : r.clarity, s = n === "dark" ? r.darkScale : 1, c = (r.lightFrom - T) * Math.PI / 180, l = E(Math.cos(c)), u = E(Math.sin(c)), [d, f] = re[r.rim];
256
256
  return {
257
257
  "--material-blur": `${a}px`,
258
258
  "--material-clarity": `${o}%`,
@@ -265,24 +265,27 @@ function ie(e, t, n = "light") {
265
265
  "--material-ink-level": `${r.ink}`,
266
266
  "--material-ink-lift": `${i.inkLift}`,
267
267
  "--_material-vibrancy": `${r.vibrancy}`,
268
- "--_material-edge": `${D(r.edge * s)}`,
269
- "--_material-sheen": `${D(r.sheen * s)}`,
268
+ "--_material-edge": `${E(r.edge * s)}`,
269
+ "--_material-sheen": `${E(r.sheen * s)}`,
270
270
  "--_material-shadow": `${r.shadow}`,
271
- "--_material-inset": `${D(r.inset * s)}`,
272
- "--_material-light-cos": `${D(Math.cos(c))}`,
273
- "--_material-light-sin": `${D(Math.sin(c))}`,
274
- "--_material-rim-bottom": `${l}`,
275
- "--_material-rim-around": `${u}`,
271
+ "--_material-inset": `${E(r.inset * s)}`,
272
+ "--_material-light-cos": `${l}`,
273
+ "--_material-light-sin": `${u}`,
274
+ "--_material-sheen-at": O(l, u, -28, 42),
275
+ "--_material-shade-at": O(l, u, 32, -50),
276
+ "--_material-relief-at": O(l, u, 0, 12),
277
+ "--_material-rim-bottom": `${d}`,
278
+ "--_material-rim-around": `${f}`,
276
279
  "--_material-glow-out": r.glowAt === "outside" ? "1" : "0",
277
280
  "--_material-glow-in": r.glowAt === "inside" ? "1" : "0",
278
- "--_material-inner-glow": `${D(r.innerGlow * s)}`,
281
+ "--_material-inner-glow": `${E(r.innerGlow * s)}`,
279
282
  "--_material-inner-glow-hue": `${r.innerGlowHue}`,
280
- "--_material-grain": r.grain > 0 ? ee(r.grain) : "none",
281
- "--_material-wash-split": `${te[r.washStyle]}`,
283
+ "--_material-grain": r.grain > 0 ? te(r.grain) : "none",
284
+ "--_material-wash-split": `${ne[r.washStyle]}`,
282
285
  "--_material-wash-angle": `${r.washAngle}deg`,
283
286
  "--_material-two-tone": r.washStyle === "two-tone" ? "1" : "0",
284
287
  "--_material-face-raised": r.face === "raised" ? "1" : "0",
285
- ...re[r.face],
288
+ ...ie[r.face],
286
289
  "--_material-relief": `${r.relief}`,
287
290
  "--material-accent": r.accent === "theme" ? "var(--primary)" : r.accent,
288
291
  "--_material-fill": `${r.fill}`
@@ -636,7 +639,7 @@ var K = 1, q = {
636
639
  cool: "oklch(0.965 0.02 240)",
637
640
  neutral: "oklch(0.97 0 0)",
638
641
  warm: "oklch(0.965 0.025 75)"
639
- }, J = {
642
+ }, oe = {
640
643
  light: {
641
644
  ground: {},
642
645
  card: {
@@ -683,41 +686,41 @@ var K = 1, q = {
683
686
  }
684
687
  }
685
688
  };
686
- function Y(e, n) {
689
+ function J(e, n) {
687
690
  let a = r(e);
688
691
  return a ? i(t(n.lTo ?? a.l + (n.l ?? 0), 0, 1), t(a.c * (n.c ?? 1), 0, n.cMax ?? .4), a.h) : e;
689
692
  }
690
- function X(e, t) {
691
- let n = J[t];
693
+ function Y(e, t) {
694
+ let n = oe[t];
692
695
  return {
693
- background: Y(e.surface, n.ground),
694
- card: Y(e.surface, n.card),
695
- border: Y(e.surface, n.border),
696
- secondary: Y(e.surface, n.secondary),
697
- primary: Y(e.accent, n.primary),
698
- accent: Y(e.accent, n.accent)
696
+ background: J(e.surface, n.ground),
697
+ card: J(e.surface, n.card),
698
+ border: J(e.surface, n.border),
699
+ secondary: J(e.surface, n.secondary),
700
+ primary: J(e.accent, n.primary),
701
+ accent: J(e.accent, n.accent)
699
702
  };
700
703
  }
701
- var ae = [
704
+ var se = [
702
705
  "primary",
703
706
  "ring",
704
707
  "mutedForeground",
705
708
  "destructive"
706
709
  ];
707
- function Z(e) {
710
+ function X(e) {
708
711
  let t = { ...e }, n = new Set(V(t).map((e) => e.text));
709
- for (let e of ae) n.has(e) && (t[e] = G(t, e) ?? t[e]);
712
+ for (let e of se) n.has(e) && (t[e] = G(t, e) ?? t[e]);
710
713
  return t;
711
714
  }
712
- function Q(e) {
713
- let t = X(e, "light"), n = s(t, "light"), r = e.darkLinked ? c(t) : s(X(e, "dark"), "dark");
715
+ function Z(e) {
716
+ let t = Y(e, "light"), n = s(t, "light"), r = e.darkLinked ? c(t) : s(Y(e, "dark"), "dark");
714
717
  return {
715
- light: Z(n),
716
- dark: Z(r)
718
+ light: X(n),
719
+ dark: X(r)
717
720
  };
718
721
  }
719
- function oe(e) {
720
- let t = Q(e);
722
+ function ce(e) {
723
+ let t = Z(e);
721
724
  return {
722
725
  light: {
723
726
  ...t.light,
@@ -729,15 +732,15 @@ function oe(e) {
729
732
  }
730
733
  };
731
734
  }
732
- function se(e, t, n) {
735
+ function le(e, t, n) {
733
736
  return e.set[t][n] === void 0;
734
737
  }
735
- function $(e, t) {
738
+ function Q(e, t) {
736
739
  let n = {};
737
740
  for (let r of Object.keys(t)) t[r] !== e[r] && (n[r] = t[r]);
738
741
  return n;
739
742
  }
740
- function ce(e, t, n) {
743
+ function $(e, t, n) {
741
744
  let r = {
742
745
  v: 1,
743
746
  accent: e.light.primary,
@@ -749,14 +752,14 @@ function ce(e, t, n) {
749
752
  light: {},
750
753
  dark: {}
751
754
  }
752
- }, i = Q(r);
755
+ }, i = Z(r);
753
756
  return {
754
757
  ...r,
755
758
  set: {
756
- light: $(i.light, e.light),
757
- dark: $(i.dark, e.dark)
759
+ light: Q(i.light, e.light),
760
+ dark: Q(i.dark, e.dark)
758
761
  }
759
762
  };
760
763
  }
761
764
  //#endregion
762
- export { k as DEFAULT_THEME_ID, j as FONT_MONO, A as FONT_SANS, y as FROSTED, v as MATERIAL_PRESETS, b as MATERIAL_RANGES, g as MATERIAL_VERSION, B as READABLE_PAIRS, K as RECIPE_VERSION, P as THEME_PRESETS, q as TINT_SURFACES, t as clamp, z as contrastRatio, c as deriveDarkFromLight, u as ensureFullThemeColors, V as findUnreadable, G as fixReadable, F as getAllPresets, I as getPreset, se as isDerived, T as materialDials, w as materialTerms, d as oklchToHex, r as parseOklch, L as parseThemeBlock, ie as resolveMaterial, oe as resolveRecipe, s as resolveThemeColors, ce as seedsFromColors, i as toOklch };
765
+ export { k as DEFAULT_THEME_ID, j as FONT_MONO, A as FONT_SANS, ee as FROSTED, v as MATERIAL_PRESETS, y as MATERIAL_RANGES, g as MATERIAL_VERSION, B as READABLE_PAIRS, K as RECIPE_VERSION, P as THEME_PRESETS, q as TINT_SURFACES, t as clamp, z as contrastRatio, c as deriveDarkFromLight, u as ensureFullThemeColors, V as findUnreadable, G as fixReadable, F as getAllPresets, I as getPreset, le as isDerived, w as materialDials, C as materialTerms, d as oklchToHex, r as parseOklch, L as parseThemeBlock, ae as resolveMaterial, ce as resolveRecipe, s as resolveThemeColors, $ as seedsFromColors, i as toOklch };