jenosize-ui 0.1.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 (182) hide show
  1. package/LICENSE +28 -0
  2. package/README.md +100 -0
  3. package/THIRD-PARTY-NOTICES.md +163 -0
  4. package/dist/Button-Bt7pzM4R.d.ts +82 -0
  5. package/dist/PaymentInput-CKPIPNWH.d.ts +141 -0
  6. package/dist/Select-CVbEQ2Ep.d.ts +118 -0
  7. package/dist/TagInput-CTJYOB4J.d.ts +90 -0
  8. package/dist/avatar.d.ts +161 -0
  9. package/dist/avatar.js +11 -0
  10. package/dist/badge.d.ts +109 -0
  11. package/dist/badge.js +10 -0
  12. package/dist/breadcrumb.d.ts +58 -0
  13. package/dist/breadcrumb.js +7 -0
  14. package/dist/button.d.ts +54 -0
  15. package/dist/button.js +14 -0
  16. package/dist/calendar.d.ts +368 -0
  17. package/dist/calendar.js +21 -0
  18. package/dist/callout.d.ts +70 -0
  19. package/dist/callout.js +16 -0
  20. package/dist/card-nWicloNi.d.ts +80 -0
  21. package/dist/card.d.ts +2 -0
  22. package/dist/card.js +7 -0
  23. package/dist/checkbox.d.ts +133 -0
  24. package/dist/checkbox.js +11 -0
  25. package/dist/chunk-24TO7E32.js +42 -0
  26. package/dist/chunk-3Y5X7B5C.js +146 -0
  27. package/dist/chunk-4OLULPQG.js +202 -0
  28. package/dist/chunk-4P2NBLBW.js +103 -0
  29. package/dist/chunk-52IFGFTL.js +11 -0
  30. package/dist/chunk-5FATN5YD.js +115 -0
  31. package/dist/chunk-5NOBSXJN.js +297 -0
  32. package/dist/chunk-5RAPA22E.js +106 -0
  33. package/dist/chunk-7EUAMHMU.js +16 -0
  34. package/dist/chunk-7EWQKTNQ.js +1336 -0
  35. package/dist/chunk-7HOIZ3UO.js +110 -0
  36. package/dist/chunk-7IU5TMFL.js +452 -0
  37. package/dist/chunk-7JBNLEJ7.js +29 -0
  38. package/dist/chunk-7S2TBALK.js +23 -0
  39. package/dist/chunk-BJUZVYQC.js +188 -0
  40. package/dist/chunk-BVJWBYIG.js +66 -0
  41. package/dist/chunk-CME4DIML.js +65 -0
  42. package/dist/chunk-CYPPEUX5.js +73 -0
  43. package/dist/chunk-D5BTFSL7.js +71 -0
  44. package/dist/chunk-D6TPWNRK.js +387 -0
  45. package/dist/chunk-DJSXIAFH.js +66 -0
  46. package/dist/chunk-DRZCJCBO.js +46 -0
  47. package/dist/chunk-DWKILXHE.js +17 -0
  48. package/dist/chunk-E7ZSWBAK.js +70 -0
  49. package/dist/chunk-EDSK6FEH.js +8 -0
  50. package/dist/chunk-F2K7VJUV.js +114 -0
  51. package/dist/chunk-F6NLE6XJ.js +40 -0
  52. package/dist/chunk-FHHAPGCR.js +32 -0
  53. package/dist/chunk-FXIBGTS5.js +14 -0
  54. package/dist/chunk-GCVA3OIV.js +72 -0
  55. package/dist/chunk-GFOAJVW5.js +336 -0
  56. package/dist/chunk-GRLSUQQE.js +136 -0
  57. package/dist/chunk-GTHJWR3Q.js +77 -0
  58. package/dist/chunk-HMUZE6EK.js +67 -0
  59. package/dist/chunk-I7WU4GTY.js +503 -0
  60. package/dist/chunk-J2BCKBHC.js +151 -0
  61. package/dist/chunk-J36M3KRX.js +1315 -0
  62. package/dist/chunk-J7ZQQFPT.js +113 -0
  63. package/dist/chunk-JP26LPCY.js +234 -0
  64. package/dist/chunk-JTNFJLIY.js +1046 -0
  65. package/dist/chunk-JVJRHBTD.js +50 -0
  66. package/dist/chunk-JYGR44ZC.js +133 -0
  67. package/dist/chunk-KDLPXXD2.js +173 -0
  68. package/dist/chunk-KMSYEE23.js +224 -0
  69. package/dist/chunk-KNYKWUYX.js +52 -0
  70. package/dist/chunk-LME57Z6J.js +138 -0
  71. package/dist/chunk-MFJP5FA7.js +20 -0
  72. package/dist/chunk-MKC5HNA7.js +1692 -0
  73. package/dist/chunk-MQGD2OUF.js +39 -0
  74. package/dist/chunk-MUFHLP4S.js +566 -0
  75. package/dist/chunk-O2LG3PNI.js +74 -0
  76. package/dist/chunk-O4GRKO3I.js +66 -0
  77. package/dist/chunk-OHUFNYGN.js +791 -0
  78. package/dist/chunk-PWKWNDBS.js +243 -0
  79. package/dist/chunk-QA74ITR4.js +103 -0
  80. package/dist/chunk-R6RGJF4L.js +170 -0
  81. package/dist/chunk-S7NNXWIN.js +7 -0
  82. package/dist/chunk-SV56BSUQ.js +162 -0
  83. package/dist/chunk-T7FCG7XV.js +435 -0
  84. package/dist/chunk-THC2ISYP.js +57 -0
  85. package/dist/chunk-VWC72TR3.js +115 -0
  86. package/dist/chunk-W46K56XU.js +216 -0
  87. package/dist/chunk-W5GGOUUI.js +75 -0
  88. package/dist/chunk-WEUJYDCV.js +269 -0
  89. package/dist/chunk-WFY7DKQD.js +279 -0
  90. package/dist/chunk-WZQFC7ZN.js +448 -0
  91. package/dist/chunk-Z3ETJN5G.js +136 -0
  92. package/dist/chunk-ZOOX3TUB.js +192 -0
  93. package/dist/chunk-ZSNJ6UA3.js +42 -0
  94. package/dist/chunk-ZZA2LUTL.js +130 -0
  95. package/dist/chunk-ZZT2E5VT.js +24 -0
  96. package/dist/color-CtSxc1Rh.d.ts +6 -0
  97. package/dist/combobox.d.ts +184 -0
  98. package/dist/combobox.js +21 -0
  99. package/dist/date-input.d.ts +83 -0
  100. package/dist/date-input.js +16 -0
  101. package/dist/date-picker.d.ts +249 -0
  102. package/dist/date-picker.js +29 -0
  103. package/dist/date-utils-7hTFTXNK.d.ts +34 -0
  104. package/dist/date-vMJBKAFK.d.ts +22 -0
  105. package/dist/dialog.d.ts +86 -0
  106. package/dist/dialog.js +15 -0
  107. package/dist/drawer.d.ts +77 -0
  108. package/dist/drawer.js +14 -0
  109. package/dist/dropdown-menu.d.ts +218 -0
  110. package/dist/dropdown-menu.js +10 -0
  111. package/dist/file-trigger.d.ts +42 -0
  112. package/dist/file-trigger.js +3 -0
  113. package/dist/form.d.ts +487 -0
  114. package/dist/form.js +1179 -0
  115. package/dist/header-navigation.d.ts +74 -0
  116. package/dist/header-navigation.js +23 -0
  117. package/dist/icons/app.d.ts +48 -0
  118. package/dist/icons/app.js +282 -0
  119. package/dist/icons/flag.d.ts +817 -0
  120. package/dist/icons/flag.js +58336 -0
  121. package/dist/icons/integration.d.ts +36 -0
  122. package/dist/icons/integration.js +531 -0
  123. package/dist/icons/payment.d.ts +116 -0
  124. package/dist/icons/payment.js +2418 -0
  125. package/dist/icons.d.ts +2013 -0
  126. package/dist/icons.js +2012 -0
  127. package/dist/illustration.d.ts +48 -0
  128. package/dist/illustration.js +4 -0
  129. package/dist/index.d.ts +68 -0
  130. package/dist/index.js +73 -0
  131. package/dist/indicator.d.ts +51 -0
  132. package/dist/indicator.js +7 -0
  133. package/dist/input.d.ts +66 -0
  134. package/dist/input.js +15 -0
  135. package/dist/multi-value-CJb_tnvi.d.ts +8 -0
  136. package/dist/nav-Bla0o_-1.d.ts +98 -0
  137. package/dist/number-input.d.ts +80 -0
  138. package/dist/number-input.js +15 -0
  139. package/dist/options-CPEIgjtd.d.ts +68 -0
  140. package/dist/overflow-Df0h42Oi.d.ts +29 -0
  141. package/dist/pagination.d.ts +77 -0
  142. package/dist/pagination.js +17 -0
  143. package/dist/payment-input.d.ts +7 -0
  144. package/dist/payment-input.js +15 -0
  145. package/dist/popover.d.ts +60 -0
  146. package/dist/popover.js +14 -0
  147. package/dist/progress.d.ts +87 -0
  148. package/dist/progress.js +5 -0
  149. package/dist/radio.d.ts +77 -0
  150. package/dist/radio.js +12 -0
  151. package/dist/select.d.ts +68 -0
  152. package/dist/select.js +24 -0
  153. package/dist/shared-BNXAdgh2.d.ts +9 -0
  154. package/dist/shared-BYXJPnsN.d.ts +11 -0
  155. package/dist/shared-Dc-GgA16.d.ts +42 -0
  156. package/dist/sidebar-navigation.d.ts +129 -0
  157. package/dist/sidebar-navigation.js +15 -0
  158. package/dist/styles.css +2 -0
  159. package/dist/switch.d.ts +23 -0
  160. package/dist/switch.js +7 -0
  161. package/dist/table.d.ts +692 -0
  162. package/dist/table.js +44 -0
  163. package/dist/tabs.d.ts +111 -0
  164. package/dist/tabs.js +8 -0
  165. package/dist/tag-input.d.ts +12 -0
  166. package/dist/tag-input.js +19 -0
  167. package/dist/tag.d.ts +98 -0
  168. package/dist/tag.js +9 -0
  169. package/dist/textarea.d.ts +40 -0
  170. package/dist/textarea.js +12 -0
  171. package/dist/theme-script.d.ts +29 -0
  172. package/dist/theme-script.js +15 -0
  173. package/dist/theme.css +929 -0
  174. package/dist/theme.d.ts +71 -0
  175. package/dist/theme.js +15 -0
  176. package/dist/toast.d.ts +242 -0
  177. package/dist/toast.js +15 -0
  178. package/dist/tooltip.d.ts +70 -0
  179. package/dist/tooltip.js +6 -0
  180. package/dist/tree.d.ts +308 -0
  181. package/dist/tree.js +11 -0
  182. package/package.json +352 -0
@@ -0,0 +1,71 @@
1
+ import * as React from 'react';
2
+ import { b as ButtonSize } from './Button-Bt7pzM4R.js';
3
+ import '@base-ui/react/use-render';
4
+ import './color-CtSxc1Rh.js';
5
+ import './overflow-Df0h42Oi.js';
6
+
7
+ type Theme = "light" | "dark" | "system";
8
+ type ResolvedTheme = "light" | "dark";
9
+ interface ThemeContextValue {
10
+ /** The chosen preference (may be "system"). */
11
+ theme: Theme;
12
+ /** The actually-applied theme ("system" resolved against the OS). */
13
+ resolvedTheme: ResolvedTheme;
14
+ /** What the OS currently prefers. */
15
+ systemTheme: ResolvedTheme;
16
+ /** Set the preference (persisted to localStorage). */
17
+ setTheme: (theme: Theme) => void;
18
+ /** Flip the *resolved* theme to the opposite explicit preference. */
19
+ toggle: () => void;
20
+ }
21
+
22
+ interface ThemeProviderProps {
23
+ /** Initial preference before any stored value is read. @default "system" */
24
+ defaultTheme?: Theme;
25
+ /** localStorage key. Keep in sync with <ThemeScript>. @default "jz-theme" */
26
+ storageKey?: string;
27
+ children?: React.ReactNode;
28
+ }
29
+ declare function ThemeProvider(props: ThemeProviderProps): React.JSX.Element;
30
+
31
+ /** Read the current theme + setters. Must be inside a <ThemeProvider>. */
32
+ declare function useTheme(): ThemeContextValue;
33
+
34
+ interface ThemeScriptOptions {
35
+ /** localStorage key holding the preference. @default "jz-theme" */
36
+ storageKey?: string;
37
+ /** Preference when nothing is stored. @default "system" */
38
+ defaultTheme?: Theme;
39
+ }
40
+ /**
41
+ * A self-contained IIFE that resolves the theme and applies `.dark` +
42
+ * `color-scheme` to <html> BEFORE first paint — eliminating the light/dark flash.
43
+ * Inline it in the document <head> (see <ThemeScript>). No React, no deps.
44
+ */
45
+ declare function buildThemeScript(options?: ThemeScriptOptions): string;
46
+
47
+ interface ThemeScriptProps extends ThemeScriptOptions {
48
+ /** CSP nonce, if your app uses one. */
49
+ nonce?: string;
50
+ }
51
+ /**
52
+ * Hook-free, server-renderable no-flash script. Place it in the document <head>
53
+ * (Next: in the server root layout) and add `suppressHydrationWarning` to <html>,
54
+ * since this script mutates the class/style before React hydrates.
55
+ */
56
+ declare function ThemeScript({ storageKey, defaultTheme, nonce }: ThemeScriptProps): React.JSX.Element;
57
+
58
+ interface ThemeToggleProps {
59
+ /** Button size. @default "sm" */
60
+ size?: ButtonSize;
61
+ /** Layout/spacing only, merged via `cn()`. */
62
+ className?: string;
63
+ }
64
+ /**
65
+ * An Untitled UI icon button that flips light/dark. Renders both icons and swaps
66
+ * them with `dark:` utilities so the correct one shows before hydration (driven
67
+ * by the .dark class the no-flash script sets).
68
+ */
69
+ declare function ThemeToggle({ size, className }: ThemeToggleProps): React.JSX.Element;
70
+
71
+ export { type ResolvedTheme, type Theme, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, ThemeScript, type ThemeScriptOptions, type ThemeScriptProps, ThemeToggle, type ThemeToggleProps, buildThemeScript, useTheme };
package/dist/theme.js ADDED
@@ -0,0 +1,15 @@
1
+ "use client";export { ThemeProvider, ThemeScript, ThemeToggle, buildThemeScript, useTheme } from './chunk-GRLSUQQE.js';
2
+ import './chunk-W46K56XU.js';
3
+ import './chunk-CME4DIML.js';
4
+ import './chunk-MQGD2OUF.js';
5
+ import './chunk-JVJRHBTD.js';
6
+ import './chunk-DWKILXHE.js';
7
+ import './chunk-KNYKWUYX.js';
8
+ import './chunk-52IFGFTL.js';
9
+ import './chunk-24TO7E32.js';
10
+ import './chunk-ZZA2LUTL.js';
11
+ import './chunk-O4GRKO3I.js';
12
+ import './chunk-GCVA3OIV.js';
13
+ import './chunk-ZSNJ6UA3.js';
14
+ //# sourceMappingURL=theme.js.map
15
+ //# sourceMappingURL=theme.js.map
@@ -0,0 +1,242 @@
1
+ import * as React from 'react';
2
+
3
+ /**
4
+ * The five intents. Drives the leading glyph + icon-circle tint, and the live-region priority.
5
+ *
6
+ * `neutral` is the one with no valence — a release note, a mention, an FYI. It exists because the
7
+ * alternative was spelling those as `info`, which is brand-tinted and therefore reads as "we want
8
+ * you to look at this". Not a `loading` type: a pending operation is `duration: Infinity` plus an
9
+ * `addOn` bar, resolved in place by `toast.update`.
10
+ */
11
+ type ToastType = "neutral" | "info" | "success" | "warning" | "error";
12
+ /**
13
+ * Where the single viewport sits. App-wide (a `ToastProvider` prop), never
14
+ * per-toast: notifications must always appear in the same predictable place.
15
+ * The value drives everything positional — which edge the cards anchor to,
16
+ * whether the stack grows down or up, the enter/exit slide, and which way you
17
+ * swipe to dismiss.
18
+ */
19
+ type ToastPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
20
+ /** The `rel` tokens a toast action link may carry. Deliberately the security/crawler-relevant subset
21
+ * — the ones that mean something on an in-app action link — not the whole HTML link-types registry
22
+ * (`stylesheet`, `preload`, … make no sense here). Combine them: `rel={["noopener", "noreferrer"]}`. */
23
+ type LinkRel = "noopener" | "noreferrer" | "nofollow" | "external";
24
+ /**
25
+ * One action on a toast. Give it `onClick` (a button), `href` (a real `<a>`, so middle/⌘-click and
26
+ * the status bar work), or both — `href` navigates while `onClick` still fires, which is the
27
+ * analytics case. Either way the toast dismisses afterwards.
28
+ *
29
+ * A config with **neither** is a dismiss-only row: the label is all it needs, because every action
30
+ * closes the card. That is what UUI's "Later" / "Dismiss" secondary is, and spelling it as an empty
31
+ * handler would be noise.
32
+ *
33
+ * Same shape as `CalloutAction` on purpose — a card that offers next steps looks the same wherever
34
+ * it appears, so the two should not need separate mental models.
35
+ */
36
+ interface ToastActionConfig {
37
+ /** Visible label and accessible name of the action. */
38
+ label: string;
39
+ /** Runs when the action is pressed; the toast is dismissed afterwards. */
40
+ onClick?: () => void;
41
+ /** Renders the action as an anchor pointing here instead of a bare button. */
42
+ href?: string;
43
+ /**
44
+ * A node placed before the label — an icon, usually. Handed straight to the action's own slot, so
45
+ * the caller owns its size AND its a11y semantics (a bare `<svg>` has no accessible name; anything
46
+ * that speaks keeps its voice).
47
+ */
48
+ leading?: React.ReactNode;
49
+ /**
50
+ * How much weight the action carries — and, because a toast is a dense card, how it is DRAWN:
51
+ *
52
+ * - `secondary` (the default) is **text**: brand, semibold, no box. This is the toast action
53
+ * recipe that already shipped, so an existing single action looks identical after the move to
54
+ * `actions`.
55
+ * - `primary` is a real `<Button size="sm">`. Reach for it when the toast is asking for a decision
56
+ * ("Install now"), not merely offering an escape hatch ("Undo").
57
+ *
58
+ * `primary` is the one thing you want pressed; everything else is `secondary`. Two `primary`
59
+ * actions in one card means neither is.
60
+ *
61
+ * @default "secondary"
62
+ */
63
+ variant?: "primary" | "secondary";
64
+ /** Anchor target — only meaningful with `href`. */
65
+ target?: React.HTMLAttributeAnchorTarget;
66
+ /** Anchor `rel`, as named tokens — only meaningful with `href`. A NAMED set rather than a raw
67
+ * string: `rel` has a closed vocabulary, so `"noopenner"` (or `"NoReferrer"`) would have
68
+ * type-checked and done nothing. Space-joined internally, and mirrors the token-array shape of
69
+ * `TagInput.separators` so the library has ONE idiom for "a set of named tokens".
70
+ * Defaults to `["noreferrer"]` for `target="_blank"`. See `docs/type-safety-policy.md`. */
71
+ rel?: readonly LinkRel[];
72
+ }
73
+ /** Options accepted by every `toast.*` enqueue method (`title` is positional). */
74
+ interface ToastOptions {
75
+ /** Optional secondary line under the title. */
76
+ description?: string;
77
+ /**
78
+ * Per-toast auto-dismiss in ms. `Infinity` makes it persistent (dismiss via
79
+ * the X, swipe, or `toast.dismiss`). Falls back to `ToastProvider.duration`.
80
+ *
81
+ * It is also what the **countdown bar** on the card's bottom edge runs for. `Infinity` shows no
82
+ * bar — there is nothing to count down.
83
+ */
84
+ duration?: number;
85
+ /**
86
+ * The action row. Each entry is a label plus a handler and/or an href; pressing any of them
87
+ * dismisses the toast.
88
+ *
89
+ * Unbounded, like `Callout.actions`, and render order is array order — UUI's convention is the
90
+ * secondary first ("Dismiss", then "Changelog"). Two is the shape this is for; a card that needs
91
+ * a third is asking for a decision that belongs in a dialog.
92
+ */
93
+ actions?: readonly ToastActionConfig[];
94
+ /**
95
+ * Replaces the type glyph — an `<Avatar>` for a mention, a product mark, a custom icon.
96
+ *
97
+ * Node-typed, so the caller owns its size AND its a11y semantics, and it is never `aria-hidden`
98
+ * (see `docs/slot-policy.md`). `type` still applies: it drives the live-region priority and, if
99
+ * this is omitted, the tint.
100
+ */
101
+ leading?: React.ReactNode;
102
+ /**
103
+ * A node at the far end of the TITLE row, before the dismiss ✕ — a `<Badge>`, an `<Indicator>`, a
104
+ * count. Same ownership rules as `leading`: node-typed, the caller owns its size and its a11y
105
+ * semantics, never `aria-hidden`.
106
+ *
107
+ * It shares the row with `meta` rather than competing with it: `meta` sits next to the title, this
108
+ * is pushed to the right edge.
109
+ */
110
+ trailing?: React.ReactNode;
111
+ /**
112
+ * A muted status line **next to the title** — a relative timestamp ("2 mins ago"), a channel
113
+ * name. Same role as the `meta` line on `Select`/`Combobox`: supporting text that is not the
114
+ * message.
115
+ *
116
+ * It sits directly after the title rather than pinned to the far edge: pushed right, it read as
117
+ * an unrelated second column, and a wrapping title left it stranded above the text it belongs to.
118
+ * `trailing` is the slot that owns the right edge of that row.
119
+ */
120
+ meta?: string;
121
+ /**
122
+ * Arbitrary content stacked **after the description** — a thumbnail, a `<Progress>` bar for an
123
+ * upload, a chart, a diff.
124
+ *
125
+ * The one open channel on the card, and it exists because the alternative did not scale: an
126
+ * `image` prop and a `progress` prop were the first two of an unbounded series (a video, a chart,
127
+ * a code block…), each arriving with its own name, its own table row and its own doc. One node
128
+ * slot stops that.
129
+ *
130
+ * It does NOT reopen structural freedom: it stacks in one fixed place, in the text column, under
131
+ * the description and above the action row. The card still owns everything around it.
132
+ *
133
+ * **Two things become yours** because the component no longer authors the element:
134
+ * - **Give media an intrinsic size** (`aspect-video`, or width+height). Base UI measures the card
135
+ * ONCE to publish its height, and an `<img>` with no reserved box contributes zero to that
136
+ * measurement — a bare `<img>` clips its own lower half and everything under it, silently.
137
+ * - **Label it.** An `<img>` needs its own `alt`; a `<Progress>` needs its own `aria-label`.
138
+ *
139
+ * A long-running operation also wants `duration: Infinity` — nothing infers that from a node.
140
+ */
141
+ addOn?: React.ReactNode;
142
+ /** Supply your own id for `update`/`dismiss` or to dedupe. */
143
+ id?: string;
144
+ /** Fires when the toast is dismissed (timeout, swipe, action, or close). */
145
+ onClose?: () => void;
146
+ /**
147
+ * Place THIS toast somewhere other than `ToastProvider.position`, the same way
148
+ * `duration` overrides the provider's default. The override gets its own
149
+ * viewport region (own stack geometry, own hover/expand state), mounted on
150
+ * first use — so a toast never has to share a corner it doesn't belong in.
151
+ *
152
+ * Use it for the exception, not the rule: a user learns one place to look, and
153
+ * scattering routine notifications across corners costs them that. Falls back
154
+ * to `ToastProvider.position`.
155
+ */
156
+ position?: ToastPosition;
157
+ }
158
+ /**
159
+ * Options for `toast.update` — also lets you change the `title` and `type`.
160
+ * `position` is deliberately absent: a card lives in one viewport region, so
161
+ * moving it would mean unmounting and re-entering it (losing its timer state and
162
+ * its place in the stack). Dismiss and re-fire instead.
163
+ */
164
+ interface ToastUpdateOptions extends Omit<ToastOptions, "position"> {
165
+ /** Replace the title in place. */
166
+ title?: string;
167
+ /** Switch the type (recolors the icon and re-maps live-region priority). */
168
+ type?: ToastType;
169
+ }
170
+ /** The imperative facade returned as the module-level `toast` singleton. */
171
+ interface ToastFacade {
172
+ (title: string, options?: ToastOptions): string;
173
+ neutral: (title: string, options?: ToastOptions) => string;
174
+ info: (title: string, options?: ToastOptions) => string;
175
+ success: (title: string, options?: ToastOptions) => string;
176
+ warning: (title: string, options?: ToastOptions) => string;
177
+ error: (title: string, options?: ToastOptions) => string;
178
+ update: (id: string, options: ToastUpdateOptions) => void;
179
+ dismiss: (id?: string) => void;
180
+ }
181
+ /** Imperative entry point. `toast(...)` defaults to the `info` type. */
182
+ declare const toast: ToastFacade;
183
+ interface ToastProviderProps {
184
+ /**
185
+ * Default auto-dismiss time (ms) for every toast. Per-toast `duration`
186
+ * overrides this. @default 5000
187
+ */
188
+ duration?: number;
189
+ /**
190
+ * Max toasts rendered at once. With `stacked` (the default) the surplus
191
+ * collapses behind the stack and fans out on hover/focus; unstacked, it is
192
+ * simply not shown until a slot frees up. `limit={1}` is "one at a time".
193
+ * @default 3
194
+ */
195
+ limit?: number;
196
+ /**
197
+ * Which corner/edge the single viewport occupies — app-wide, never per toast.
198
+ * Drives the anchor, whether the stack grows down or up, the enter/exit slide,
199
+ * and the swipe-to-dismiss direction. @default "top-right"
200
+ */
201
+ position?: ToastPosition;
202
+ /**
203
+ * Collapse the visible toasts into an overlapping stack (newest in front,
204
+ * fanning out on hover/focus). Set `false` for a plain vertical list where
205
+ * every visible card is readable at once — pair it with `limit` to bound how
206
+ * many that is. @default true
207
+ */
208
+ stacked?: boolean;
209
+ /**
210
+ * Draw the auto-dismiss countdown — a thin bar on each card's bottom edge that drains over the
211
+ * toast's own `duration`, so a reader can see how long is left rather than being surprised.
212
+ *
213
+ * Derived rather than configured per toast: there is no `countdown` in `ToastOptions`, because the
214
+ * bar is a function of a duration that already exists. A card with `duration: Infinity` shows no
215
+ * bar either way — nothing to count down. It pauses with the timer on hover/focus.
216
+ *
217
+ * App-wide, like `stacked`: it describes how the whole region feels, and two cards disagreeing
218
+ * about it would read as a bug. Set `false` to switch it off everywhere.
219
+ *
220
+ * @default true
221
+ */
222
+ countdown?: boolean;
223
+ /**
224
+ * Layout/offset only (e.g. nudge the viewport inset past a fixed app header),
225
+ * merged onto the viewport via `cn()`. Not for restyling cards. Prefer
226
+ * `position` for the anchor itself.
227
+ */
228
+ className?: string;
229
+ /** Optional content rendered before the viewport. Usually omitted. */
230
+ children?: React.ReactNode;
231
+ }
232
+ /**
233
+ * Configures Base UI's toast machinery and renders the viewport. Mount once; fire
234
+ * toasts from anywhere via the `toast()` facade.
235
+ *
236
+ * Normally that is a single region at `position`. A toast that overrides
237
+ * `position` gets its own region, mounted here on first use — so the common case
238
+ * stays one provider, one viewport, one live region.
239
+ */
240
+ declare function ToastProvider(props: ToastProviderProps): React.JSX.Element;
241
+
242
+ export { type LinkRel, type ToastActionConfig, type ToastFacade, type ToastOptions, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastType, type ToastUpdateOptions, toast };
package/dist/toast.js ADDED
@@ -0,0 +1,15 @@
1
+ "use client";export { ToastProvider, toast } from './chunk-I7WU4GTY.js';
2
+ import './chunk-W46K56XU.js';
3
+ import './chunk-CME4DIML.js';
4
+ import './chunk-MQGD2OUF.js';
5
+ import './chunk-JVJRHBTD.js';
6
+ import './chunk-DWKILXHE.js';
7
+ import './chunk-KNYKWUYX.js';
8
+ import './chunk-52IFGFTL.js';
9
+ import './chunk-24TO7E32.js';
10
+ import './chunk-ZZA2LUTL.js';
11
+ import './chunk-O4GRKO3I.js';
12
+ import './chunk-GCVA3OIV.js';
13
+ import './chunk-ZSNJ6UA3.js';
14
+ //# sourceMappingURL=toast.js.map
15
+ //# sourceMappingURL=toast.js.map
@@ -0,0 +1,70 @@
1
+ import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
2
+ import * as React from 'react';
3
+
4
+ interface TooltipProviderProps {
5
+ /** Grouped open delay (ms) shared by tooltips in this region. @default 300 */
6
+ delay?: number;
7
+ /** Grouped close delay (ms) shared by tooltips in this region. */
8
+ closeDelay?: number;
9
+ /** Window (ms) during which moving to an adjacent trigger opens it instantly. */
10
+ timeout?: number;
11
+ /** Region whose tooltips share the grouped open delay. */
12
+ children?: React.ReactNode;
13
+ }
14
+ declare function TooltipProvider(props: TooltipProviderProps): React.JSX.Element;
15
+ declare namespace TooltipProvider {
16
+ var displayName: string;
17
+ }
18
+ type TooltipSide = "top" | "right" | "bottom" | "left";
19
+ type TooltipAlign = "start" | "center" | "end";
20
+ /** Two steps, no `sm` — see `SIZE` below for why the ladder stops here. */
21
+ type TooltipSize = "md" | "lg";
22
+ interface TooltipProps {
23
+ /** The tooltip message — the primary line. Text-only by convention. */
24
+ content: React.ReactNode;
25
+ /** Optional supporting second line under `content` — the two-line tooltip. Text-only. */
26
+ description?: React.ReactNode;
27
+ /** The element the tooltip attaches to — a **single** focusable React element (button, link, …). */
28
+ children: React.ReactElement;
29
+ /**
30
+ * Box scale. `md` is the compact default every call site gets; `lg` adds 2px of padding on
31
+ * each axis for a tooltip that carries real weight (a long `description`, a primary
32
+ * affordance). Padding only — the text is `text-xs` at both. There is no `sm`.
33
+ * @default "md"
34
+ */
35
+ size?: TooltipSize;
36
+ /** Preferred placement; auto-flips on collision. @default "top" */
37
+ side?: TooltipSide;
38
+ /** Cross-axis alignment against the trigger (with `side` → UUI's 8 placements). @default "center" */
39
+ align?: TooltipAlign;
40
+ /** Render the pointer arrow toward the trigger. @default false */
41
+ showArrow?: boolean;
42
+ /** Boundary the popup must stay inside when avoiding collisions. Defaults to the viewport. */
43
+ collisionBoundary?: Tooltip$1.Positioner.Props["collisionBoundary"];
44
+ /** Extra space (px) kept between the popup and the collision boundary's edge. */
45
+ collisionPadding?: Tooltip$1.Positioner.Props["collisionPadding"];
46
+ /** Per-trigger hover/focus open delay (ms). Defaults to 300 (or the `Tooltip.Provider` group). */
47
+ delay?: number;
48
+ /** Per-trigger close delay (ms) before the tooltip hides after the pointer leaves. */
49
+ closeDelay?: number;
50
+ /** Uncontrolled initial open state. @default false */
51
+ defaultOpen?: boolean;
52
+ /** Controlled open state. */
53
+ open?: boolean;
54
+ /** Fires when the open state changes. */
55
+ onOpenChange?: (open: boolean, event: Event) => void;
56
+ /** When `true`, the tooltip never opens (e.g. a disabled trigger). @default false */
57
+ disabled?: boolean;
58
+ /** Layout/spacing only (e.g. `max-w-*`), merged onto the popup surface. Never restyles it. */
59
+ className?: string;
60
+ }
61
+ declare function Tooltip(props: TooltipProps): React.JSX.Element;
62
+ declare namespace Tooltip {
63
+ var displayName: string;
64
+ }
65
+ /** `<Tooltip content=… >{trigger}</Tooltip>` — plus `Tooltip.Provider` for an app-level grouped delay. */
66
+ declare const TooltipExport: typeof Tooltip & {
67
+ Provider: typeof TooltipProvider;
68
+ };
69
+
70
+ export { TooltipExport as Tooltip, type TooltipAlign, type TooltipProps, type TooltipProviderProps, type TooltipSide, type TooltipSize };
@@ -0,0 +1,6 @@
1
+ "use client";export { TooltipExport as Tooltip } from './chunk-ZZA2LUTL.js';
2
+ import './chunk-O4GRKO3I.js';
3
+ import './chunk-GCVA3OIV.js';
4
+ import './chunk-ZSNJ6UA3.js';
5
+ //# sourceMappingURL=tooltip.js.map
6
+ //# sourceMappingURL=tooltip.js.map