@pollinations/ui 0.1.0-alpha.1 → 0.1.0-alpha.3

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 (88) hide show
  1. package/README.md +137 -36
  2. package/dist/Button-CO3Dpbkj.d.cts +29 -0
  3. package/dist/Button-CO3Dpbkj.d.ts +29 -0
  4. package/dist/Chip-v-ADv6cz.d.cts +18 -0
  5. package/dist/Chip-v-ADv6cz.d.ts +18 -0
  6. package/dist/Dialog-yXzIFrDg.d.cts +63 -0
  7. package/dist/Dialog-yXzIFrDg.d.ts +63 -0
  8. package/dist/app-user-menu/sdk.cjs +631 -235
  9. package/dist/app-user-menu/sdk.cjs.map +1 -1
  10. package/dist/app-user-menu/sdk.d.cts +6 -7
  11. package/dist/app-user-menu/sdk.d.ts +6 -7
  12. package/dist/app-user-menu/sdk.js +639 -236
  13. package/dist/app-user-menu/sdk.js.map +1 -1
  14. package/dist/app.css +6 -122
  15. package/dist/auth/index.cjs +1346 -76
  16. package/dist/auth/index.cjs.map +1 -1
  17. package/dist/auth/index.d.cts +88 -6
  18. package/dist/auth/index.d.ts +88 -6
  19. package/dist/auth/index.js +1343 -75
  20. package/dist/auth/index.js.map +1 -1
  21. package/dist/auth/sdk.cjs +239 -0
  22. package/dist/auth/sdk.cjs.map +1 -0
  23. package/dist/auth/sdk.d.cts +40 -0
  24. package/dist/auth/sdk.d.ts +40 -0
  25. package/dist/auth/sdk.js +208 -0
  26. package/dist/auth/sdk.js.map +1 -0
  27. package/dist/brand/lockup-horizontal-black.png +0 -0
  28. package/dist/brand/lockup-horizontal-black.svg +4 -0
  29. package/dist/brand/lockup-horizontal-white.png +0 -0
  30. package/dist/brand/lockup-horizontal-white.svg +4 -0
  31. package/dist/brand/lockup-horizontal.svg +1 -0
  32. package/dist/brand/lockup-stacked-black.png +0 -0
  33. package/dist/brand/lockup-stacked-black.svg +4 -0
  34. package/dist/brand/lockup-stacked-white.png +0 -0
  35. package/dist/brand/lockup-stacked-white.svg +4 -0
  36. package/dist/brand/lockup-stacked.svg +4 -0
  37. package/dist/brand/mark-black.png +0 -0
  38. package/dist/brand/mark-black.svg +3 -0
  39. package/dist/brand/mark-white.png +0 -0
  40. package/dist/brand/mark-white.svg +3 -0
  41. package/dist/brand/mark.svg +1 -0
  42. package/dist/brand/polli/polli-lockup-horizontal-black.png +0 -0
  43. package/dist/brand/polli/polli-lockup-horizontal-white.png +0 -0
  44. package/dist/brand/polli/polli-lockup-stacked-black.png +0 -0
  45. package/dist/brand/polli/polli-lockup-stacked-white.png +0 -0
  46. package/dist/brand/polli/polli.png +0 -0
  47. package/dist/brand/wordmark-black.png +0 -0
  48. package/dist/brand/wordmark-black.svg +1 -0
  49. package/dist/brand/wordmark-white.png +0 -0
  50. package/dist/brand/wordmark-white.svg +1 -0
  51. package/dist/brand/wordmark.svg +1 -0
  52. package/dist/fonts/geist-pixel-square.woff2 +0 -0
  53. package/dist/gen/index.cjs +395 -214
  54. package/dist/gen/index.cjs.map +1 -1
  55. package/dist/gen/index.d.cts +64 -19
  56. package/dist/gen/index.d.ts +64 -19
  57. package/dist/gen/index.js +391 -212
  58. package/dist/gen/index.js.map +1 -1
  59. package/dist/index.browser.min.js +2 -0
  60. package/dist/index.browser.min.js.map +1 -0
  61. package/dist/index.cjs +3464 -1559
  62. package/dist/index.cjs.map +1 -1
  63. package/dist/index.d.cts +498 -174
  64. package/dist/index.d.ts +498 -174
  65. package/dist/index.js +3518 -1671
  66. package/dist/index.js.map +1 -1
  67. package/dist/licenses/Geist-OFL.txt +93 -0
  68. package/dist/markdown.cjs +821 -0
  69. package/dist/markdown.cjs.map +1 -0
  70. package/dist/markdown.d.cts +16 -0
  71. package/dist/markdown.d.ts +16 -0
  72. package/dist/markdown.js +792 -0
  73. package/dist/markdown.js.map +1 -0
  74. package/dist/styles.css +1 -1
  75. package/dist/theme.css +92 -0
  76. package/dist/wallet/index.cjs +255 -42
  77. package/dist/wallet/index.cjs.map +1 -1
  78. package/dist/wallet/index.d.cts +29 -7
  79. package/dist/wallet/index.d.ts +29 -7
  80. package/dist/wallet/index.js +254 -42
  81. package/dist/wallet/index.js.map +1 -1
  82. package/package.json +106 -89
  83. package/dist/Chip-CQCq34kS.d.cts +0 -20
  84. package/dist/Chip-Cj4xG7Te.d.ts +0 -20
  85. package/dist/assets/logo-wordmark.svg +0 -1
  86. package/dist/assets/logo.svg +0 -4
  87. package/dist/theme-jRPPBmld.d.cts +0 -20
  88. package/dist/theme-jRPPBmld.d.ts +0 -20
package/README.md CHANGED
@@ -32,14 +32,62 @@ import { AppUserMenu } from "@pollinations/ui/app-user-menu/sdk";
32
32
  export function App() {
33
33
  return (
34
34
  <PolliProvider appKey="pk_your_publishable_key" permissions={["profile"]}>
35
- <Surface data-theme="amber">
36
- <AppUserMenu dashboardHref="https://enter.pollinations.ai" />
35
+ <Surface>
36
+ <AppUserMenu />
37
37
  </Surface>
38
38
  </PolliProvider>
39
39
  );
40
40
  }
41
41
  ```
42
42
 
43
+ ### CDN / `<script>` Tag
44
+
45
+ The root `@pollinations/ui` entry also ships a browser IIFE bundle for
46
+ no-build pages. It exposes SDK-free primitives and compositions on
47
+ `window.PollinationsUI`. Non-root subpaths such as `@pollinations/ui/auth`,
48
+ `@pollinations/ui/wallet`, `@pollinations/ui/gen`, and
49
+ `@pollinations/ui/app-user-menu/sdk` remain ESM/CJS-only.
50
+
51
+ React 19 no longer ships UMD builds, so load React from an ESM CDN first, set
52
+ the globals expected by the IIFE bundle, then load `@pollinations/ui`:
53
+
54
+ ```html
55
+ <link
56
+ rel="stylesheet"
57
+ href="https://cdn.jsdelivr.net/npm/@pollinations/ui@alpha/styles.css"
58
+ />
59
+ <div id="root"></div>
60
+ <script type="module">
61
+ import React from "https://esm.sh/react@19";
62
+ import * as ReactDOM from "https://esm.sh/react-dom@19";
63
+ import * as ReactDOMClient from "https://esm.sh/react-dom@19/client";
64
+
65
+ window.React = React;
66
+ window.ReactDOM = { ...ReactDOM, ...ReactDOMClient };
67
+
68
+ await new Promise((resolve, reject) => {
69
+ const script = document.createElement("script");
70
+ script.src = "https://cdn.jsdelivr.net/npm/@pollinations/ui@alpha";
71
+ script.onload = resolve;
72
+ script.onerror = reject;
73
+ document.head.appendChild(script);
74
+ });
75
+
76
+ const { Button } = window.PollinationsUI;
77
+
78
+ window.ReactDOM.createRoot(document.getElementById("root")).render(
79
+ React.createElement(Button, null, "Generate"),
80
+ );
81
+ </script>
82
+ ```
83
+
84
+ The browser bundle keeps React and ReactDOM external via those globals, but it
85
+ does bundle the root entry's package dependencies, including Ark UI,
86
+ react-markdown, remark, and rehype.
87
+
88
+ React's guidance on loading React 19 without UMD builds:
89
+ https://react.dev/blog/2024/04/25/react-19-upgrade-guide#umd-builds-removed
90
+
43
91
  For Pollinations apps that use unprefixed Tailwind utilities, import the
44
92
  package-owned app stylesheet instead:
45
93
 
@@ -53,46 +101,96 @@ and generic `polli-ui-root`, `polli-ui-body`, and `polli-ui-shell` classes.
53
101
  Canonical Pollinations source SVGs are exported from the package:
54
102
 
55
103
  ```ts
56
- import logoUrl from "@pollinations/ui/assets/logo.svg";
57
- import logoWordmarkUrl from "@pollinations/ui/assets/logo-wordmark.svg";
104
+ import markUrl from "@pollinations/ui/brand/mark.svg";
105
+ import lockupUrl from "@pollinations/ui/brand/lockup-horizontal.svg";
58
106
  ```
59
107
 
60
108
  The SVG sources use `currentColor`. Apps control the rendered color by inlining
61
109
  them or using them as masks. Root-level favicon, PWA icon, and SEO files stay
62
110
  app-owned.
63
111
 
112
+ The whole kit derives from two atomic sources — `mark.svg` and `wordmark.svg`
113
+ (both `currentColor`) plus the raster bee `polli/polli.png`. One zero-config
114
+ command rebuilds everything:
115
+
116
+ ```bash
117
+ npm run brand
118
+ ```
119
+
120
+ It refreshes the committed derivatives in `src/brand`, and writes every
121
+ favicon / PWA / apple-touch / maskable / OG / social asset to `brand-out/`
122
+ (gitignored) — copy those into a site's `public/`. Colours are fixed to the two
123
+ brand themes matching enter.pollinations.ai (icons gold on transparent,
124
+ OG/social dark on cream), resolved from `theme-palette.json`. Sizes and padding
125
+ are data in `scripts/brand/presets.js` — `pad` keeps avatars clear of a circular
126
+ mask; add a platform by adding a line.
127
+
64
128
  Wallet colors and utilities are bundled into the main stylesheet
65
129
  (`@pollinations/ui/styles.css`) — no separate import needed.
66
130
 
131
+ ## Dialog layout
132
+
133
+ `Dialog` uses one responsive frame for forms, confirmations, and results:
134
+ full viewport without a border below 640px, contained with rounded corners on
135
+ larger screens. `size` controls desktop width only. Use `DialogHeader`, `DialogBody` (scrolling content), and `DialogFooter`
136
+ for consistent spacing and actions; avoid overriding viewport dimensions
137
+ in consumers. The frame uses Enter’s themed panel color; inset cards use the
138
+ neutral `Surface` default. `AuthModal` uses the same frame for standalone pages.
139
+
140
+ Enter's `ResourceDialog` keeps dashboard forms and confirmations contained on
141
+ mobile too, with viewport margins and scrollable content. Keep that exception
142
+ in the shared dashboard wrapper rather than repeating dimensions in consumers.
143
+
67
144
  ## What's exported
68
145
 
69
146
  - `@pollinations/ui` exports SDK-free design primitives, helpers, and
70
- theme data. These can be used without Pollinations auth.
71
- - `@pollinations/ui/auth` exports SDK-free auth modal pieces:
147
+ compositions. These can be used without Pollinations auth.
148
+ - `@pollinations/ui/auth` exports `PollinationsSignInButton` (official brand
149
+ asset, outlined amber styling, accessible provider label) and `DashboardSignIn`
150
+ (the shared satellite-app sign-in page). Apps supply the sign-in action; these
151
+ components do not issue credentials or choose an authentication method.
152
+ - `@pollinations/ui/auth` also exports SDK-free auth modal pieces:
72
153
  `AuthModal`, `AuthModalHeader`, `AuthModalLoading`, `AuthInfoCard`, and
73
154
  `ErrorBanner`.
155
+ - `@pollinations/ui/auth/sdk` exports identity/session components that read
156
+ from the surrounding `<PolliProvider>`:
157
+ - **null when not logged in (or before data loads):** `UserAvatar`,
158
+ `UserName`, `WhenLoggedIn`.
159
+ - **shown only when logged out:** `LoginButton`, `WhenLoggedOut`.
160
+
161
+ These are intentionally bare wrappers around `useAuth*` hooks. They render
162
+ the data and nothing else — no default copy and no default intent. The app
163
+ composes layout, copy, and color.
74
164
  - `@pollinations/ui/wallet` exports SDK-free wallet-specific display helpers
75
- and recipes: `formatPollen`, `PaidChip`, `TierChip`, `WalletDot`,
165
+ and recipes: `formatPollen`, `PaidChip`, `TierChip`, `WalletKindIcon`,
76
166
  `WalletBalanceCard`, `PAID_BALANCE_CHART_COLOR`, and
77
167
  `TIER_BALANCE_CHART_COLOR`.
78
168
  - `@pollinations/ui/app-user-menu/sdk` exports the SDK-backed app account
79
169
  menu module.
80
- - `@pollinations/ui/gen` exports the generation UI — `ModelSelector`,
81
- category labels, and the model-modality theme mapping.
82
- - `@pollinations/ui/assets/*` exports canonical Pollinations source SVGs:
83
- `logo.svg` and `logo-wordmark.svg`.
170
+ - `@pollinations/ui/gen` exports generation UI modules and modality helpers:
171
+ `ModelSelector`, `ModalityChip`, `ModalityDot`, `ModalityTab`,
172
+ `categoryLabel`, and `getModalityKey`.
173
+ - `@pollinations/ui/markdown` exports `Markdown` and `Prose`, kept off the
174
+ root entry so react-markdown only loads where documents render.
175
+ - `@pollinations/ui/brand/*` exports the canonical brand kit — `mark`,
176
+ `wordmark`, `lockup-horizontal`, `lockup-stacked` (currentColor SVG masters
177
+ plus `-black`/`-white` SVG + PNG), and the `polli/` mascot PNGs.
84
178
  - **Design primitives** — `Button`, `ButtonGroup`, `Chip`, `ChevronIcon`,
85
179
  `Dialog`, `DialogTitle`, `Dropdown`, `DropdownItem`, `Field`, `Heading`,
86
180
  `IconButton`, `InlineLink`, `Input`, `ScrollArea`, `Slider`, `Surface`,
87
181
  `Switch`, `TabButton`, `Table`, `TableBody`, `TableCell`, `TableHead`,
88
182
  `TableHeaderCell`, `TableRow`, `Text`, `Textarea`, `Tooltip`.
89
183
  - **Design compositions** — `Alert`, `CodeBlock`, `Collapsible`,
90
- `CopyButton`, `ExternalLinkButton`, `FileUpload`, `InfoTip`, `LinkCard`,
91
- `Markdown`, `MediaPlaceholder`, `MultiSelect`, `NavItem`, `PeriodPicker`,
92
- `Prose`, `Section`, `StatCard`.
184
+ `CopyButton`, `EditableCombobox`, `EditableComboboxToken`,
185
+ `ExternalLinkButton`, `FieldStack`, `FileUpload`, `InfoTip`, `LinkCard`,
186
+ `MediaPlaceholder`, `MultiSelect`, `NavItem`, `PeriodPicker`, `Section`,
187
+ `StatCard`.
188
+ `FieldStack` supports label, helper, action, error, and opt-in aligned label
189
+ rows for compact forms.
190
+ `EditableCombobox.startContent` renders content inside a wrapping input shell
191
+ and replaces the standalone chevron trigger.
93
192
  - **Helpers** — `cn`, `useScrollLock`, `currentPeriod`,
94
193
  `getPeriodBucketKeys`, `periodBucketKeyToDate`.
95
- - **Theme** — `themes` (runtime array of theme names), `ThemeName` (type).
96
194
 
97
195
  For per-request usage data and other dynamic queries, call the opt-in hooks
98
196
  from `@pollinations/sdk/react` (`useAccountKeyUsage`, `useAccountKey`,
@@ -106,15 +204,19 @@ from `@pollinations/sdk/react` (`useAccountKeyUsage`, `useAccountKey`,
106
204
  such as auth, wallet, app-user-menu, and gen.
107
205
  - Public subpath exports (`@pollinations/ui/auth`,
108
206
  `@pollinations/ui/wallet`, `@pollinations/ui/gen`,
109
- `@pollinations/ui/app-user-menu/sdk`) are built directly from those source
110
- layers.
207
+ `@pollinations/ui/markdown`, `@pollinations/ui/app-user-menu/sdk`) are
208
+ built directly from those source layers.
111
209
 
112
210
  ## Theming
113
211
 
114
- Set `data-theme="amber" | "blue" | "pink" | "coral" | "teal" | "violet" | "emerald"`
115
- on any ancestor (or per-component via the `theme` prop on Button-family
116
- components) to switch the cascade. Theme variables are defined in
117
- `styles.css` — import it once at your app entry.
212
+ Import `@pollinations/ui/styles.css` once at the app entry. The package uses a
213
+ single app accent by default; primitives read the current cascade through
214
+ `--polli-color-*` variables.
215
+
216
+ Use `data-theme="neutral"` on chrome that should carry no accent, such as a
217
+ global rail. Use `data-theme="accent"` inside a neutral subtree to re-assert
218
+ the app accent for controls. Do not use per-component theme props; compose
219
+ layout and state with primitives instead.
118
220
 
119
221
  ## Public design tokens
120
222
 
@@ -125,7 +227,7 @@ count as breaking.
125
227
  Public tokens sit under the `--polli-*` namespace so they do not collide
126
228
  with host app tokens.
127
229
 
128
- **Theme-aware (resolve against the active `data-theme`):**
230
+ **Accent-aware (resolve against the current accent or neutral scope):**
129
231
 
130
232
  | Token | Purpose |
131
233
  | ----------------------------- | --------------------------------------------- |
@@ -159,23 +261,22 @@ Wallet tokens are public (bundled into `@pollinations/ui/styles.css`):
159
261
  | `--polli-color-paid-pale` | Paid-balance wash. |
160
262
  | `--polli-color-paid-soft` | Paid-balance marker. |
161
263
  | `--polli-color-paid-deep` | Paid-balance text. |
162
- | `--polli-color-tier-pale` | Tier-balance wash. |
163
- | `--polli-color-tier-soft` | Tier-balance marker. |
164
- | `--polli-color-tier-deep` | Tier-balance text. |
264
+ | `--polli-color-tier-pale` | Quest Pollen wash. |
265
+ | `--polli-color-tier-soft` | Quest Pollen marker. |
266
+ | `--polli-color-tier-deep` | Quest Pollen text. |
165
267
 
166
268
  **Intent (theme-independent):**
167
269
 
168
- | Token | Purpose |
169
- | --------------------------------- | -------------------------------- |
170
- | `--polli-color-danger-bg-light` | Error surface background. |
171
- | `--polli-color-danger-text` | Error text foreground. |
172
- | `--polli-color-danger-border` | Error border. |
173
- | `--polli-color-success-bg-light` | Success surface background. |
174
- | `--polli-color-success-text` | Success text foreground. |
175
- | `--polli-color-success-border` | Success border. |
176
- | `--polli-color-warning-bg-light` | Warning surface background. |
177
- | `--polli-color-warning-text` | Warning text foreground. |
178
- | `--polli-color-warning-border` | Warning border. |
270
+ | Token | Purpose |
271
+ | ------------------------------------------ | -------------------------------- |
272
+ | `--polli-color-danger-bg-light` | Error surface background. |
273
+ | `--polli-color-danger-text` | Error text foreground. |
274
+ | `--polli-color-danger-border` | Error border. |
275
+ | `--polli-color-success-text` | Success text foreground. |
276
+ | `--polli-color-success-bright` | Filled success background. |
277
+ | `--polli-color-success-text-on-bright` | Text on filled success surfaces. |
278
+ | `--polli-color-warning-bg-light` | Warning surface background. |
279
+ | `--polli-color-warning-text` | Warning text foreground. |
179
280
 
180
281
  **Example:**
181
282
 
@@ -0,0 +1,29 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { PropsWithChildren, ReactNode } from 'react';
3
+
4
+ /** Semantic action roles. Label recipes live on Chip. */
5
+ type ButtonIntent = "danger" | "info" | "neutral" | "brand" | "commit";
6
+ type ButtonAppearance = "pill" | "raised";
7
+ declare const pillSizes: {
8
+ readonly icon: "polli:h-12 polli:w-12 polli:p-0";
9
+ readonly xs: "polli:h-5 polli:px-1.5 polli:py-0 polli:text-[11px] polli:leading-none";
10
+ readonly sm: "polli:min-h-7 polli:px-2 polli:pt-0.5 polli:pb-1";
11
+ readonly md: "polli:min-h-9 polli:px-4 polli:pt-1.5 polli:pb-2";
12
+ readonly lg: "polli:min-h-12 polli:px-6 polli:py-3";
13
+ };
14
+ type BaseButtonProps = {
15
+ icon?: ReactNode;
16
+ /** Optional semantic recipe; omit for the ambient theme button. */
17
+ intent?: ButtonIntent;
18
+ /** `raised` is the stronger website CTA treatment. */
19
+ appearance?: ButtonAppearance;
20
+ size?: keyof typeof pillSizes;
21
+ className?: string;
22
+ disabled?: boolean;
23
+ };
24
+ type ButtonProps<T extends React.ElementType = "button"> = PropsWithChildren<BaseButtonProps> & {
25
+ as?: T;
26
+ } & Omit<React.ComponentPropsWithoutRef<T>, keyof BaseButtonProps | "as">;
27
+ declare function Button<T extends React.ElementType = "button">({ as, children, icon, intent, appearance, size, className, disabled, ...buttonProps }: ButtonProps<T>): react_jsx_runtime.JSX.Element;
28
+
29
+ export { type ButtonProps as B, type ButtonAppearance as a, Button as b };
@@ -0,0 +1,29 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { PropsWithChildren, ReactNode } from 'react';
3
+
4
+ /** Semantic action roles. Label recipes live on Chip. */
5
+ type ButtonIntent = "danger" | "info" | "neutral" | "brand" | "commit";
6
+ type ButtonAppearance = "pill" | "raised";
7
+ declare const pillSizes: {
8
+ readonly icon: "polli:h-12 polli:w-12 polli:p-0";
9
+ readonly xs: "polli:h-5 polli:px-1.5 polli:py-0 polli:text-[11px] polli:leading-none";
10
+ readonly sm: "polli:min-h-7 polli:px-2 polli:pt-0.5 polli:pb-1";
11
+ readonly md: "polli:min-h-9 polli:px-4 polli:pt-1.5 polli:pb-2";
12
+ readonly lg: "polli:min-h-12 polli:px-6 polli:py-3";
13
+ };
14
+ type BaseButtonProps = {
15
+ icon?: ReactNode;
16
+ /** Optional semantic recipe; omit for the ambient theme button. */
17
+ intent?: ButtonIntent;
18
+ /** `raised` is the stronger website CTA treatment. */
19
+ appearance?: ButtonAppearance;
20
+ size?: keyof typeof pillSizes;
21
+ className?: string;
22
+ disabled?: boolean;
23
+ };
24
+ type ButtonProps<T extends React.ElementType = "button"> = PropsWithChildren<BaseButtonProps> & {
25
+ as?: T;
26
+ } & Omit<React.ComponentPropsWithoutRef<T>, keyof BaseButtonProps | "as">;
27
+ declare function Button<T extends React.ElementType = "button">({ as, children, icon, intent, appearance, size, className, disabled, ...buttonProps }: ButtonProps<T>): react_jsx_runtime.JSX.Element;
28
+
29
+ export { type ButtonProps as B, type ButtonAppearance as a, Button as b };
@@ -0,0 +1,18 @@
1
+ import { FC, ComponentPropsWithoutRef } from 'react';
2
+
3
+ /** Semantic chip labels for status and metadata badges. */
4
+ type ChipIntent = "news" | "new" | "free" | "alpha" | "neutral" | "success" | "warning" | "info" | "danger";
5
+ declare const chipSizes: {
6
+ readonly icon: "polli:h-5 polli:w-5 polli:p-0 polli:text-xs";
7
+ readonly sm: "polli:h-5 polli:px-2 polli:text-xs";
8
+ readonly md: "polli:h-6 polli:px-2.5 polli:text-sm";
9
+ readonly lg: "polli:h-7 polli:px-3 polli:text-sm";
10
+ };
11
+ type ChipProps = ComponentPropsWithoutRef<"span"> & {
12
+ /** Semantic intent. */
13
+ intent?: ChipIntent;
14
+ size?: keyof typeof chipSizes;
15
+ };
16
+ declare const Chip: FC<ChipProps>;
17
+
18
+ export { Chip as C, type ChipProps as a };
@@ -0,0 +1,18 @@
1
+ import { FC, ComponentPropsWithoutRef } from 'react';
2
+
3
+ /** Semantic chip labels for status and metadata badges. */
4
+ type ChipIntent = "news" | "new" | "free" | "alpha" | "neutral" | "success" | "warning" | "info" | "danger";
5
+ declare const chipSizes: {
6
+ readonly icon: "polli:h-5 polli:w-5 polli:p-0 polli:text-xs";
7
+ readonly sm: "polli:h-5 polli:px-2 polli:text-xs";
8
+ readonly md: "polli:h-6 polli:px-2.5 polli:text-sm";
9
+ readonly lg: "polli:h-7 polli:px-3 polli:text-sm";
10
+ };
11
+ type ChipProps = ComponentPropsWithoutRef<"span"> & {
12
+ /** Semantic intent. */
13
+ intent?: ChipIntent;
14
+ size?: keyof typeof chipSizes;
15
+ };
16
+ declare const Chip: FC<ChipProps>;
17
+
18
+ export { Chip as C, type ChipProps as a };
@@ -0,0 +1,63 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as react from 'react';
3
+ import { PropsWithChildren, ComponentPropsWithoutRef, ReactNode, FC } from 'react';
4
+ import { Dialog as Dialog$1 } from '@ark-ui/react/dialog';
5
+
6
+ type ScrollAxis = "y" | "x" | "both";
7
+ type ScrollAreaOwnProps = {
8
+ /** Scroll direction. Default `y`. */
9
+ axis?: ScrollAxis;
10
+ /** Use the system scrollbar instead of the custom auto-hiding track. */
11
+ scrollbar?: "subtle" | "native";
12
+ className?: string;
13
+ };
14
+ type ScrollAreaProps = PropsWithChildren<ScrollAreaOwnProps & Omit<ComponentPropsWithoutRef<"div">, keyof ScrollAreaOwnProps>>;
15
+ /** Scroll container with an optional themed, auto-hiding scrollbar. */
16
+ declare const ScrollArea: react.ForwardRefExoticComponent<ScrollAreaOwnProps & Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof ScrollAreaOwnProps> & {
17
+ children?: react.ReactNode | undefined;
18
+ } & react.RefAttributes<HTMLDivElement>>;
19
+
20
+ declare const sizeClasses: {
21
+ readonly sm: "polli:max-w-md";
22
+ readonly md: "polli:max-w-xl";
23
+ readonly lg: "polli:max-w-[800px]";
24
+ readonly xl: "polli:max-w-6xl";
25
+ };
26
+ type DialogProps = {
27
+ open: boolean;
28
+ onOpenChange?: (open: boolean) => void;
29
+ trigger?: ReactNode;
30
+ triggerAsChild?: boolean;
31
+ triggerClassName?: string;
32
+ title?: ReactNode;
33
+ ariaLabel?: string;
34
+ labelledBy?: string;
35
+ size?: keyof typeof sizeClasses;
36
+ showBackdrop?: boolean;
37
+ backdropBlur?: boolean;
38
+ positionerClassName?: string;
39
+ contentClassName?: string;
40
+ children: ReactNode;
41
+ };
42
+ declare const Dialog: FC<DialogProps>;
43
+ declare const DialogTitle: react.ForwardRefExoticComponent<Dialog$1.TitleProps & react.RefAttributes<HTMLHeadingElement>>;
44
+ declare const DialogDescription: react.ForwardRefExoticComponent<Dialog$1.DescriptionProps & react.RefAttributes<HTMLDivElement>>;
45
+ type DialogHeaderProps = Omit<ComponentPropsWithoutRef<"div">, "title"> & {
46
+ title?: ReactNode;
47
+ description?: ReactNode;
48
+ inBody?: boolean;
49
+ titleClassName?: string;
50
+ descriptionClassName?: string;
51
+ };
52
+ declare const DialogHeader: FC<DialogHeaderProps>;
53
+ type DialogFooterProps = ComponentPropsWithoutRef<"div">;
54
+ type DialogBodyProps = ScrollAreaProps & {
55
+ actions?: ReactNode;
56
+ footnote?: ReactNode;
57
+ bodyClassName?: string;
58
+ };
59
+ /** Full-height scroll area with floating actions and an optional bottom link. */
60
+ declare function DialogBody({ children, actions, footnote, bodyClassName, className, ...props }: DialogBodyProps): react_jsx_runtime.JSX.Element;
61
+ declare const DialogFooter: FC<DialogFooterProps>;
62
+
63
+ export { type DialogProps as D, type ScrollAreaProps as S, Dialog as a, DialogBody as b, type DialogBodyProps as c, DialogDescription as d, DialogFooter as e, type DialogFooterProps as f, DialogHeader as g, type DialogHeaderProps as h, DialogTitle as i, ScrollArea as j };
@@ -0,0 +1,63 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as react from 'react';
3
+ import { PropsWithChildren, ComponentPropsWithoutRef, ReactNode, FC } from 'react';
4
+ import { Dialog as Dialog$1 } from '@ark-ui/react/dialog';
5
+
6
+ type ScrollAxis = "y" | "x" | "both";
7
+ type ScrollAreaOwnProps = {
8
+ /** Scroll direction. Default `y`. */
9
+ axis?: ScrollAxis;
10
+ /** Use the system scrollbar instead of the custom auto-hiding track. */
11
+ scrollbar?: "subtle" | "native";
12
+ className?: string;
13
+ };
14
+ type ScrollAreaProps = PropsWithChildren<ScrollAreaOwnProps & Omit<ComponentPropsWithoutRef<"div">, keyof ScrollAreaOwnProps>>;
15
+ /** Scroll container with an optional themed, auto-hiding scrollbar. */
16
+ declare const ScrollArea: react.ForwardRefExoticComponent<ScrollAreaOwnProps & Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof ScrollAreaOwnProps> & {
17
+ children?: react.ReactNode | undefined;
18
+ } & react.RefAttributes<HTMLDivElement>>;
19
+
20
+ declare const sizeClasses: {
21
+ readonly sm: "polli:max-w-md";
22
+ readonly md: "polli:max-w-xl";
23
+ readonly lg: "polli:max-w-[800px]";
24
+ readonly xl: "polli:max-w-6xl";
25
+ };
26
+ type DialogProps = {
27
+ open: boolean;
28
+ onOpenChange?: (open: boolean) => void;
29
+ trigger?: ReactNode;
30
+ triggerAsChild?: boolean;
31
+ triggerClassName?: string;
32
+ title?: ReactNode;
33
+ ariaLabel?: string;
34
+ labelledBy?: string;
35
+ size?: keyof typeof sizeClasses;
36
+ showBackdrop?: boolean;
37
+ backdropBlur?: boolean;
38
+ positionerClassName?: string;
39
+ contentClassName?: string;
40
+ children: ReactNode;
41
+ };
42
+ declare const Dialog: FC<DialogProps>;
43
+ declare const DialogTitle: react.ForwardRefExoticComponent<Dialog$1.TitleProps & react.RefAttributes<HTMLHeadingElement>>;
44
+ declare const DialogDescription: react.ForwardRefExoticComponent<Dialog$1.DescriptionProps & react.RefAttributes<HTMLDivElement>>;
45
+ type DialogHeaderProps = Omit<ComponentPropsWithoutRef<"div">, "title"> & {
46
+ title?: ReactNode;
47
+ description?: ReactNode;
48
+ inBody?: boolean;
49
+ titleClassName?: string;
50
+ descriptionClassName?: string;
51
+ };
52
+ declare const DialogHeader: FC<DialogHeaderProps>;
53
+ type DialogFooterProps = ComponentPropsWithoutRef<"div">;
54
+ type DialogBodyProps = ScrollAreaProps & {
55
+ actions?: ReactNode;
56
+ footnote?: ReactNode;
57
+ bodyClassName?: string;
58
+ };
59
+ /** Full-height scroll area with floating actions and an optional bottom link. */
60
+ declare function DialogBody({ children, actions, footnote, bodyClassName, className, ...props }: DialogBodyProps): react_jsx_runtime.JSX.Element;
61
+ declare const DialogFooter: FC<DialogFooterProps>;
62
+
63
+ export { type DialogProps as D, type ScrollAreaProps as S, Dialog as a, DialogBody as b, type DialogBodyProps as c, DialogDescription as d, DialogFooter as e, type DialogFooterProps as f, DialogHeader as g, type DialogHeaderProps as h, DialogTitle as i, ScrollArea as j };