@panneau/ui 5.0.0-alpha.7 → 5.0.0-alpha.8

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 (77) hide show
  1. package/dist/alert/Alert.d.ts +2 -2
  2. package/dist/alert/tokens.d.ts +1 -1
  3. package/dist/badge/Badge.d.ts +1 -1
  4. package/dist/badge/tokens.d.ts +1 -1
  5. package/dist/button/Button.d.ts +3 -3
  6. package/dist/button/tokens.d.ts +1 -1
  7. package/dist/card/tokens.d.ts +1 -1
  8. package/dist/checkbox/Checkbox.d.ts +1 -1
  9. package/dist/checkbox/tokens.d.ts +1 -1
  10. package/dist/combo-box/ComboBox.d.ts +1 -1
  11. package/dist/command-palette/CommandPalette.d.ts +1 -1
  12. package/dist/command-palette/match.d.ts +1 -1
  13. package/dist/command-palette/tokens.d.ts +1 -1
  14. package/dist/container/tokens.d.ts +1 -1
  15. package/dist/date-picker/DatePicker.d.ts +1 -1
  16. package/dist/date-picker/calendarTokens.d.ts +1 -1
  17. package/dist/dialog/tokens.d.ts +1 -1
  18. package/dist/disclosure/tokens.d.ts +1 -1
  19. package/dist/divider/tokens.d.ts +1 -1
  20. package/dist/field/FieldParts.d.ts +1 -1
  21. package/dist/field/inputTokens.d.ts +1 -1
  22. package/dist/field/tokens.d.ts +1 -1
  23. package/dist/grid/Grid.d.ts +1 -1
  24. package/dist/grid/tokens.d.ts +1 -1
  25. package/dist/heading/tokens.d.ts +1 -1
  26. package/dist/icon/lucideIconLoader.d.ts +1 -1
  27. package/dist/icon/namedIcons.d.ts +1 -1
  28. package/dist/icon-button/IconButton.d.ts +2 -2
  29. package/dist/index.d.ts +61 -61
  30. package/dist/inline/Inline.d.ts +1 -1
  31. package/dist/inline/tokens.d.ts +1 -1
  32. package/dist/menu/Menu.d.ts +1 -1
  33. package/dist/menu/tokens.d.ts +1 -1
  34. package/dist/named-icons/index.d.ts +1 -1
  35. package/dist/number-input/NumberInput.d.ts +1 -1
  36. package/dist/number-input/tokens.d.ts +1 -1
  37. package/dist/pill-trigger/tokens.d.ts +1 -1
  38. package/dist/popover/tokens.d.ts +1 -1
  39. package/dist/prose/tokens.d.ts +1 -1
  40. package/dist/radio-group/RadioGroup.d.ts +2 -2
  41. package/dist/radio-group/tokens.d.ts +1 -1
  42. package/dist/root/PanneauRoot.d.ts +9 -3
  43. package/dist/root/PanneauRoot.d.ts.map +1 -1
  44. package/dist/root/PanneauRoot.js +96 -81
  45. package/dist/root/PanneauRoot.js.map +1 -1
  46. package/dist/root/ThemeScope.d.ts +1 -1
  47. package/dist/segmented-control/SegmentedControl.d.ts +1 -1
  48. package/dist/segmented-control/tokens.d.ts +1 -1
  49. package/dist/select/Select.d.ts +1 -1
  50. package/dist/select/listBoxTokens.d.ts +1 -1
  51. package/dist/skeleton/tokens.d.ts +1 -1
  52. package/dist/slider/Slider.d.ts +1 -1
  53. package/dist/spinner/tokens.d.ts +1 -1
  54. package/dist/stack/Stack.d.ts +1 -1
  55. package/dist/stack/tokens.d.ts +1 -1
  56. package/dist/switch/Switch.d.ts +1 -1
  57. package/dist/switch/tokens.d.ts +1 -1
  58. package/dist/tabs/tokens.d.ts +1 -1
  59. package/dist/tags-input/TagsInput.d.ts +1 -1
  60. package/dist/text/Text.d.ts +1 -1
  61. package/dist/text/tokens.d.ts +1 -1
  62. package/dist/text-area/TextArea.d.ts +1 -1
  63. package/dist/text-input/TextInput.d.ts +1 -1
  64. package/dist/theme/bootstrap.d.ts +2 -2
  65. package/dist/theme/checkTheme.d.ts +2 -2
  66. package/dist/theme/cli.d.ts +2 -2
  67. package/dist/theme/colorVision.d.ts +1 -1
  68. package/dist/theme/defineTheme.d.ts +5 -5
  69. package/dist/theme/index.d.ts +12 -12
  70. package/dist/theme/theme.d.ts +2 -2
  71. package/dist/theme/toneClass.d.ts +1 -1
  72. package/dist/theme/tones.d.ts +1 -1
  73. package/dist/time-input/TimeInput.d.ts +1 -1
  74. package/dist/toast/Toast.d.ts +1 -1
  75. package/dist/toast/tokens.d.ts +1 -1
  76. package/dist/tooltip/tokens.d.ts +1 -1
  77. package/package.json +5 -5
@@ -105,8 +105,8 @@ function usePortalContainer() {
105
105
  * missing.
106
106
  */
107
107
  function PanneauIntlProvider(t0) {
108
- const $ = c(11);
109
- const { locale: t1, children } = t0;
108
+ const $ = c(14);
109
+ const { locale: t1, messages: added, children } = t0;
110
110
  const locale = t1 === void 0 ? "en" : t1;
111
111
  let t2;
112
112
  if ($[0] !== locale) {
@@ -131,19 +131,29 @@ function PanneauIntlProvider(t0) {
131
131
  $[6] = t5;
132
132
  } else t5 = $[6];
133
133
  let t6;
134
- if ($[7] !== children || $[8] !== t4 || $[9] !== t5) {
135
- t6 = /* @__PURE__ */ jsx(IntlProvider, {
134
+ if ($[7] !== added || $[8] !== t5) {
135
+ t6 = {
136
+ ...t5,
137
+ ...added
138
+ };
139
+ $[7] = added;
140
+ $[8] = t5;
141
+ $[9] = t6;
142
+ } else t6 = $[9];
143
+ let t7;
144
+ if ($[10] !== children || $[11] !== t4 || $[12] !== t6) {
145
+ t7 = /* @__PURE__ */ jsx(IntlProvider, {
136
146
  locale: t4,
137
147
  defaultLocale: "en",
138
- messages: t5,
148
+ messages: t6,
139
149
  children
140
150
  });
141
- $[7] = children;
142
- $[8] = t4;
143
- $[9] = t5;
144
- $[10] = t6;
145
- } else t6 = $[10];
146
- return t6;
151
+ $[10] = children;
152
+ $[11] = t4;
153
+ $[12] = t6;
154
+ $[13] = t7;
155
+ } else t7 = $[13];
156
+ return t7;
147
157
  }
148
158
  /**
149
159
  * The root of every Panneau interface. It scopes the base stylesheet and the design tokens to its
@@ -153,35 +163,38 @@ function PanneauIntlProvider(t0) {
153
163
  * with Panneau's messages in its `locale`.
154
164
  */
155
165
  function PanneauRoot(t0) {
156
- const $ = c(45);
166
+ const $ = c(47);
157
167
  let children;
158
168
  let className;
159
169
  let locale;
170
+ let messages;
160
171
  let props;
161
172
  let t1;
162
173
  let t2;
163
174
  let t3;
164
175
  let t4;
165
176
  if ($[0] !== t0) {
166
- ({theme: t1, colorScheme: t2, density: t3, iconLoader: t4, locale, className, children, ...props} = t0);
177
+ ({theme: t1, colorScheme: t2, density: t3, iconLoader: t4, locale, messages, className, children, ...props} = t0);
167
178
  $[0] = t0;
168
179
  $[1] = children;
169
180
  $[2] = className;
170
181
  $[3] = locale;
171
- $[4] = props;
172
- $[5] = t1;
173
- $[6] = t2;
174
- $[7] = t3;
175
- $[8] = t4;
182
+ $[4] = messages;
183
+ $[5] = props;
184
+ $[6] = t1;
185
+ $[7] = t2;
186
+ $[8] = t3;
187
+ $[9] = t4;
176
188
  } else {
177
189
  children = $[1];
178
190
  className = $[2];
179
191
  locale = $[3];
180
- props = $[4];
181
- t1 = $[5];
182
- t2 = $[6];
183
- t3 = $[7];
184
- t4 = $[8];
192
+ messages = $[4];
193
+ props = $[5];
194
+ t1 = $[6];
195
+ t2 = $[7];
196
+ t3 = $[8];
197
+ t4 = $[9];
185
198
  }
186
199
  const theme = t1 === void 0 ? null : t1;
187
200
  const colorScheme = t2 === void 0 ? "light" : t2;
@@ -191,95 +204,95 @@ function PanneauRoot(t0) {
191
204
  const [container, setContainer] = useState(null);
192
205
  const { scope, styles: themeStyles } = useThemeStyles(theme);
193
206
  let t5;
194
- if ($[9] !== className) {
207
+ if ($[10] !== className) {
195
208
  t5 = cx("panneau-root", PanneauRoot_module_default.root, PanneauRoot_module_default.container, className);
196
- $[9] = className;
197
- $[10] = t5;
198
- } else t5 = $[10];
209
+ $[10] = className;
210
+ $[11] = t5;
211
+ } else t5 = $[11];
199
212
  const t6 = locale ?? intl?.locale;
200
213
  let t7;
201
- if ($[11] !== colorScheme || $[12] !== density) {
214
+ if ($[12] !== colorScheme || $[13] !== density) {
202
215
  t7 = {
203
216
  colorScheme,
204
217
  density
205
218
  };
206
- $[11] = colorScheme;
207
- $[12] = density;
208
- $[13] = t7;
209
- } else t7 = $[13];
219
+ $[12] = colorScheme;
220
+ $[13] = density;
221
+ $[14] = t7;
222
+ } else t7 = $[14];
210
223
  let t8;
211
- if ($[14] !== colorScheme || $[15] !== density || $[16] !== scope) {
224
+ if ($[15] !== colorScheme || $[16] !== density || $[17] !== scope) {
212
225
  t8 = {
213
226
  "data-color-scheme": colorScheme,
214
227
  "data-density": density,
215
228
  "data-panneau-theme": scope
216
229
  };
217
- $[14] = colorScheme;
218
- $[15] = density;
219
- $[16] = scope;
220
- $[17] = t8;
221
- } else t8 = $[17];
230
+ $[15] = colorScheme;
231
+ $[16] = density;
232
+ $[17] = scope;
233
+ $[18] = t8;
234
+ } else t8 = $[18];
222
235
  let t9;
223
- if ($[18] !== children || $[19] !== t8) {
236
+ if ($[19] !== children || $[20] !== t8) {
224
237
  t9 = /* @__PURE__ */ jsx(ToastProvider, {
225
238
  regionClassName: PanneauRoot_module_default.root,
226
239
  regionProps: t8,
227
240
  children
228
241
  });
229
- $[18] = children;
230
- $[19] = t8;
231
- $[20] = t9;
232
- } else t9 = $[20];
242
+ $[19] = children;
243
+ $[20] = t8;
244
+ $[21] = t9;
245
+ } else t9 = $[21];
233
246
  let t10;
234
- if ($[21] !== container || $[22] !== t9) {
247
+ if ($[22] !== container || $[23] !== t9) {
235
248
  t10 = /* @__PURE__ */ jsx(PortalContext, {
236
249
  value: container,
237
250
  children: t9
238
251
  });
239
- $[21] = container;
240
- $[22] = t9;
241
- $[23] = t10;
242
- } else t10 = $[23];
252
+ $[22] = container;
253
+ $[23] = t9;
254
+ $[24] = t10;
255
+ } else t10 = $[24];
243
256
  let t11;
244
- if ($[24] !== t10 || $[25] !== t7) {
257
+ if ($[25] !== t10 || $[26] !== t7) {
245
258
  t11 = /* @__PURE__ */ jsx(ScopeContext, {
246
259
  value: t7,
247
260
  children: t10
248
261
  });
249
- $[24] = t10;
250
- $[25] = t7;
251
- $[26] = t11;
252
- } else t11 = $[26];
262
+ $[25] = t10;
263
+ $[26] = t7;
264
+ $[27] = t11;
265
+ } else t11 = $[27];
253
266
  let t12;
254
- if ($[27] !== iconLoader || $[28] !== t11) {
267
+ if ($[28] !== iconLoader || $[29] !== t11) {
255
268
  t12 = /* @__PURE__ */ jsx(NamedIconLoaderContext, {
256
269
  value: iconLoader,
257
270
  children: t11
258
271
  });
259
- $[27] = iconLoader;
260
- $[28] = t11;
261
- $[29] = t12;
262
- } else t12 = $[29];
272
+ $[28] = iconLoader;
273
+ $[29] = t11;
274
+ $[30] = t12;
275
+ } else t12 = $[30];
263
276
  let t13;
264
- if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
277
+ if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
265
278
  t13 = /* @__PURE__ */ jsx("div", {
266
279
  ref: setContainer,
267
280
  className: PanneauRoot_module_default.portal
268
281
  });
269
- $[30] = t13;
270
- } else t13 = $[30];
282
+ $[31] = t13;
283
+ } else t13 = $[31];
271
284
  let t14;
272
- if ($[31] !== t12 || $[32] !== t6) {
285
+ if ($[32] !== t12 || $[33] !== t6) {
273
286
  t14 = /* @__PURE__ */ jsxs(I18nProvider, {
274
287
  locale: t6,
275
288
  children: [t12, t13]
276
289
  });
277
- $[31] = t12;
278
- $[32] = t6;
279
- $[33] = t14;
280
- } else t14 = $[33];
290
+ $[32] = t12;
291
+ $[33] = t6;
292
+ $[34] = t14;
293
+ } else t14 = $[34];
281
294
  let t15;
282
- if ($[34] !== colorScheme || $[35] !== density || $[36] !== props || $[37] !== scope || $[38] !== t14 || $[39] !== t5 || $[40] !== themeStyles) {
295
+ if ($[35] !== colorScheme || $[36] !== density || $[37] !== props || $[38] !== scope || $[39] !== t14 || $[40] !== t5 || $[41] !== themeStyles) {
283
296
  t15 = /* @__PURE__ */ jsxs("div", {
284
297
  ...props,
285
298
  className: t5,
@@ -288,27 +301,29 @@ function PanneauRoot(t0) {
288
301
  "data-panneau-theme": scope,
289
302
  children: [themeStyles, t14]
290
303
  });
291
- $[34] = colorScheme;
292
- $[35] = density;
293
- $[36] = props;
294
- $[37] = scope;
295
- $[38] = t14;
296
- $[39] = t5;
297
- $[40] = themeStyles;
298
- $[41] = t15;
299
- } else t15 = $[41];
304
+ $[35] = colorScheme;
305
+ $[36] = density;
306
+ $[37] = props;
307
+ $[38] = scope;
308
+ $[39] = t14;
309
+ $[40] = t5;
310
+ $[41] = themeStyles;
311
+ $[42] = t15;
312
+ } else t15 = $[42];
300
313
  const root = t15;
301
314
  if (intl === null || intl === void 0) {
302
315
  let t16;
303
- if ($[42] !== locale || $[43] !== root) {
316
+ if ($[43] !== locale || $[44] !== messages || $[45] !== root) {
304
317
  t16 = /* @__PURE__ */ jsx(PanneauIntlProvider, {
305
318
  locale,
319
+ messages,
306
320
  children: root
307
321
  });
308
- $[42] = locale;
309
- $[43] = root;
310
- $[44] = t16;
311
- } else t16 = $[44];
322
+ $[43] = locale;
323
+ $[44] = messages;
324
+ $[45] = root;
325
+ $[46] = t16;
326
+ } else t16 = $[46];
312
327
  return t16;
313
328
  }
314
329
  return root;
@@ -1 +1 @@
1
- {"version":3,"file":"PanneauRoot.js","names":["HTMLAttributes","ReactNode","createContext","use","useState","I18nProvider","IntlContext","IntlProvider","IntlShape","getPanneauMessages","NamedIconLoader","NamedIconLoaderContext","getFontFaceCss","getFontStylesheets","ColorScheme","Density","Theme","getThemeCss","hashString","ToastProvider","cx","styles","PanneauRootProps","HTMLDivElement","theme","colorScheme","density","iconLoader","locale","children","PortalContext","Element","undefined","ScopeContext","PortalProvider","Provider","useThemeStyles","$","_c","t0","t1","t2","css","scope","fontCss","fonts","replaceAll","t3","map","_temp","t4","t5","href","usePortalContainer","PanneauIntlProvider","messages","Object","keys","translated","length","t6","PanneauRoot","className","props","intl","container","setContainer","themeStyles","root","t7","t8","t9","t10","t11","t12","t13","Symbol","for","portal","t14","t15","t16","_c","_Fragment","styles"],"sources":["../../src/root/PanneauRoot.tsx"],"sourcesContent":["import { type HTMLAttributes, type ReactNode, createContext, use, useState } from 'react';\nimport { I18nProvider } from 'react-aria-components';\nimport { IntlContext, IntlProvider, type IntlShape } from 'react-intl';\n\nimport { getPanneauMessages } from '@panneau/intl';\n\nimport { type NamedIconLoader, NamedIconLoaderContext } from '../icon/namedIcons';\nimport { getFontFaceCss, getFontStylesheets } from '../theme/fonts';\nimport {\n type ColorScheme,\n type Density,\n type Theme,\n getThemeCss,\n hashString,\n} from '../theme/theme';\nimport { ToastProvider } from '../toast/Toast';\nimport { cx } from '../utils/cx';\nimport styles from './PanneauRoot.module.css';\n\nexport interface PanneauRootProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Tokens, tones, variants and fonts that override the default theme: `bootstrapTheme`, or a\n * project's own (`defineTheme()`).\n */\n theme?: Theme | null;\n /** Defaults to `light`. `auto` follows the system setting. */\n colorScheme?: ColorScheme;\n /**\n * How much room controls and rows take: `compact`, `comfortable` or `touch`. Defaults to\n * `auto`: `touch` on touch screens, `comfortable` otherwise.\n */\n density?: Density;\n /**\n * Loads the icons that definitions name (`\"icon\": \"send\"`), for `getNamedIcon()`: pass\n * `lucideIconLoader` from `@panneau/ui/named-icons`, or a loader of only the icons the app\n * uses. Without it, named icons render an empty space.\n */\n iconLoader?: NamedIconLoader | null;\n /**\n * Locale of dates and numbers in React Aria components. Defaults to the react-intl locale, or\n * to the browser's without an `IntlProvider`.\n *\n * Without an `IntlProvider` above it, the root provides one, with the messages of every Panneau\n * package in this locale (English without a locale, or for a locale Panneau doesn't translate).\n * An app with its own `IntlProvider` adds them with `withPanneauMessages()` from\n * `@panneau/intl`.\n */\n locale?: string;\n children?: ReactNode;\n}\n\n/** `undefined` outside of a root, `null` while the root's container isn't mounted yet. */\nconst PortalContext = createContext<Element | null | undefined>(undefined);\n\n/** The color scheme and density in effect, which a `ThemeScope` inherits when it doesn't set them. */\nexport const ScopeContext = createContext<{ colorScheme: ColorScheme; density: Density }>({\n colorScheme: 'light',\n density: 'auto',\n});\n\n/** Gives overlays a container: that of a root, or of a scope. */\nexport const PortalProvider = PortalContext.Provider;\n\n/**\n * The `<style>` and `<link>` elements of a theme: its CSS, scoped to `data-panneau-theme`, and its\n * fonts. React hoists them to the head and adds each once, however many roots or scopes use it.\n * Returns the scope of the theme too, for `data-panneau-theme`.\n */\nexport function useThemeStyles(theme: Theme | null): { scope?: string; styles: ReactNode } {\n const css = theme !== null ? getThemeCss(theme, '§') : '';\n const scope = css !== '' ? hashString(css) : undefined;\n const fontCss = getFontFaceCss(theme?.fonts);\n return {\n scope,\n styles: (\n <>\n {scope !== undefined ? (\n <style href={`panneau-theme-${scope}`} precedence=\"panneau\">\n {css.replaceAll('§', scope)}\n </style>\n ) : null}\n {fontCss !== '' ? (\n <style href={`panneau-fonts-${hashString(fontCss)}`} precedence=\"panneau\">\n {fontCss}\n </style>\n ) : null}\n {getFontStylesheets(theme?.fonts).map((href) => (\n <link key={href} rel=\"stylesheet\" href={href} precedence=\"panneau\" />\n ))}\n </>\n ),\n };\n}\n\n/**\n * The element overlays render into: the closest `PanneauRoot`'s or `ThemeScope`'s, or `undefined` for the body\n * without a root. It is `null` during the first render of a root: overlays wait for it, since\n * React Aria hides everything outside of a modal from assistive technologies when it opens.\n */\nexport function usePortalContainer(): Element | null | undefined {\n return use(PortalContext);\n}\n\n/**\n * An `IntlProvider` with Panneau's messages in a locale, for a root without one above it. A locale\n * Panneau doesn't translate gets English, so that react-intl doesn't report every message as\n * missing.\n */\nfunction PanneauIntlProvider({\n locale = 'en',\n children,\n}: {\n locale?: string;\n children: ReactNode;\n}) {\n const messages = getPanneauMessages(locale);\n const translated = Object.keys(messages).length > 0;\n return (\n <IntlProvider\n locale={translated ? locale : 'en'}\n defaultLocale=\"en\"\n messages={translated ? messages : getPanneauMessages('en')}\n >\n {children}\n </IntlProvider>\n );\n}\n\n/**\n * The root of every Panneau interface. It scopes the base stylesheet and the design tokens to its\n * element (no global CSS), applies a theme and a color scheme, and hosts overlays and toasts so\n * that they get the tokens too. Panneau components must render inside one. A project can override\n * any token with its own class on the root. Without an `IntlProvider` above it, it provides one\n * with Panneau's messages in its `locale`.\n */\nexport function PanneauRoot({\n theme = null,\n colorScheme = 'light',\n density = 'auto',\n iconLoader = null,\n locale,\n className,\n children,\n ...props\n}: PanneauRootProps) {\n const intl = use(IntlContext) as IntlShape | null | undefined;\n const [container, setContainer] = useState<HTMLDivElement | null>(null);\n const { scope, styles: themeStyles } = useThemeStyles(theme);\n const root = (\n <div\n {...props}\n className={cx('panneau-root', styles.root, styles.container, className)}\n data-color-scheme={colorScheme}\n data-density={density}\n data-panneau-theme={scope}\n >\n {themeStyles}\n <I18nProvider locale={locale ?? intl?.locale}>\n <NamedIconLoaderContext value={iconLoader}>\n <ScopeContext value={{ colorScheme, density }}>\n <PortalContext value={container}>\n <ToastProvider\n regionClassName={styles.root}\n regionProps={{\n 'data-color-scheme': colorScheme,\n 'data-density': density,\n 'data-panneau-theme': scope,\n }}\n >\n {children}\n </ToastProvider>\n </PortalContext>\n </ScopeContext>\n </NamedIconLoaderContext>\n <div ref={setContainer} className={styles.portal} />\n </I18nProvider>\n </div>\n );\n if (intl === null || intl === undefined) {\n return <PanneauIntlProvider locale={locale}>{root}</PanneauIntlProvider>;\n }\n return root;\n}\n"],"mappings":";;;;;;;;;;;;;;AAoDA,IAAM8B,gBAAgB5B,cAA0C8B,KAAAA,CAAS;;AAGzE,IAAaC,eAAe/B,cAA8D;CACtFuB,aAAa;CACbC,SAAS;AACb,CAAC;;AAGD,IAAaQ,iBAAiBJ,cAAcK;;;;;;AAO5C,SAAOC,eAAAZ,OAAA;CAAA,MAAAa,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAJ,EAAA,OAAAb,OAAA;EACH,MAAAkB,MAAYlB,UAAU,OAAOP,YAAYO,OAAO,GAAQ,IAA5C;EACZ,MAAAmB,QAAcD,QAAQ,KAAKxB,WAAWwB,GAAe,IAAvCV,KAAAA;EACd,MAAAY,UAAgBhC,eAAeY,OAAKqB,KAAO;EAEvCF,KAAAA;EAGSJ,KAAAI,UAAUX,KAAAA,IACP,oBAAA,SAAA;GAAa,MAAA,iBAAi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C,qBAAD;IAA6BrD;IAASwC,UAAAA;GAAlB,CAAA;GAA6C/B,EAAA,MAAAT;GAAAS,EAAA,MAAA+B;GAAA/B,EAAA,MAAA4C;EAAA,OAAAA,MAAA5C,EAAA;EAAA,OAAjE4C;CAAiE;CAC3E,OACMb;AAAI"}
1
+ {"version":3,"file":"PanneauRoot.js","names":["HTMLAttributes","ReactNode","createContext","use","useState","I18nProvider","IntlContext","IntlProvider","IntlShape","getPanneauMessages","NamedIconLoader","NamedIconLoaderContext","getFontFaceCss","getFontStylesheets","ColorScheme","Density","Theme","getThemeCss","hashString","ToastProvider","cx","styles","PanneauRootProps","HTMLDivElement","theme","colorScheme","density","iconLoader","locale","messages","Readonly","Record","children","PortalContext","Element","undefined","ScopeContext","PortalProvider","Provider","useThemeStyles","$","_c","t0","t1","t2","css","scope","fontCss","fonts","replaceAll","t3","map","_temp","t4","t5","href","usePortalContainer","PanneauIntlProvider","added","Object","keys","translated","length","t6","t7","PanneauRoot","className","props","intl","container","setContainer","themeStyles","root","t8","t9","t10","t11","t12","t13","Symbol","for","portal","t14","t15","t16","_c","_Fragment","styles"],"sources":["../../src/root/PanneauRoot.tsx"],"sourcesContent":["import { type HTMLAttributes, type ReactNode, createContext, use, useState } from 'react';\nimport { I18nProvider } from 'react-aria-components';\nimport { IntlContext, IntlProvider, type IntlShape } from 'react-intl';\n\nimport { getPanneauMessages } from '@panneau/intl';\n\nimport { type NamedIconLoader, NamedIconLoaderContext } from '../icon/namedIcons';\nimport { getFontFaceCss, getFontStylesheets } from '../theme/fonts';\nimport {\n type ColorScheme,\n type Density,\n type Theme,\n getThemeCss,\n hashString,\n} from '../theme/theme';\nimport { ToastProvider } from '../toast/Toast';\nimport { cx } from '../utils/cx';\nimport styles from './PanneauRoot.module.css';\n\nexport interface PanneauRootProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Tokens, tones, variants and fonts that override the default theme: `bootstrapTheme`, or a\n * project's own (`defineTheme()`).\n */\n theme?: Theme | null;\n /** Defaults to `light`. `auto` follows the system setting. */\n colorScheme?: ColorScheme;\n /**\n * How much room controls and rows take: `compact`, `comfortable` or `touch`. Defaults to\n * `auto`: `touch` on touch screens, `comfortable` otherwise.\n */\n density?: Density;\n /**\n * Loads the icons that definitions name (`\"icon\": \"send\"`), for `getNamedIcon()`: pass\n * `lucideIconLoader` from `@panneau/ui/named-icons`, or a loader of only the icons the app\n * uses. Without it, named icons render an empty space.\n */\n iconLoader?: NamedIconLoader | null;\n /**\n * Locale of dates and numbers in React Aria components. Defaults to the react-intl locale, or\n * to the browser's without an `IntlProvider`.\n *\n * Without an `IntlProvider` above it, the root provides one, with the messages of every Panneau\n * package in this locale (English without a locale, or for a locale Panneau doesn't translate).\n * An app with its own `IntlProvider` adds them with `withPanneauMessages()` from\n * `@panneau/intl`.\n */\n locale?: string;\n /**\n * Messages added to Panneau's, by id, when the root provides the `IntlProvider`: those of\n * plugins (`loadMessages()` of `@panneau/core`). An app with its own `IntlProvider` adds them\n * to its own.\n */\n messages?: Readonly<Record<string, string>> | null;\n children?: ReactNode;\n}\n\n/** `undefined` outside of a root, `null` while the root's container isn't mounted yet. */\nconst PortalContext = createContext<Element | null | undefined>(undefined);\n\n/** The color scheme and density in effect, which a `ThemeScope` inherits when it doesn't set them. */\nexport const ScopeContext = createContext<{ colorScheme: ColorScheme; density: Density }>({\n colorScheme: 'light',\n density: 'auto',\n});\n\n/** Gives overlays a container: that of a root, or of a scope. */\nexport const PortalProvider = PortalContext.Provider;\n\n/**\n * The `<style>` and `<link>` elements of a theme: its CSS, scoped to `data-panneau-theme`, and its\n * fonts. React hoists them to the head and adds each once, however many roots or scopes use it.\n * Returns the scope of the theme too, for `data-panneau-theme`.\n */\nexport function useThemeStyles(theme: Theme | null): { scope?: string; styles: ReactNode } {\n const css = theme !== null ? getThemeCss(theme, '§') : '';\n const scope = css !== '' ? hashString(css) : undefined;\n const fontCss = getFontFaceCss(theme?.fonts);\n return {\n scope,\n styles: (\n <>\n {scope !== undefined ? (\n <style href={`panneau-theme-${scope}`} precedence=\"panneau\">\n {css.replaceAll('§', scope)}\n </style>\n ) : null}\n {fontCss !== '' ? (\n <style href={`panneau-fonts-${hashString(fontCss)}`} precedence=\"panneau\">\n {fontCss}\n </style>\n ) : null}\n {getFontStylesheets(theme?.fonts).map((href) => (\n <link key={href} rel=\"stylesheet\" href={href} precedence=\"panneau\" />\n ))}\n </>\n ),\n };\n}\n\n/**\n * The element overlays render into: the closest `PanneauRoot`'s or `ThemeScope`'s, or `undefined` for the body\n * without a root. It is `null` during the first render of a root: overlays wait for it, since\n * React Aria hides everything outside of a modal from assistive technologies when it opens.\n */\nexport function usePortalContainer(): Element | null | undefined {\n return use(PortalContext);\n}\n\n/**\n * An `IntlProvider` with Panneau's messages in a locale, for a root without one above it. A locale\n * Panneau doesn't translate gets English, so that react-intl doesn't report every message as\n * missing.\n */\nfunction PanneauIntlProvider({\n locale = 'en',\n messages: added,\n children,\n}: {\n locale?: string;\n messages?: Readonly<Record<string, string>> | null;\n children: ReactNode;\n}) {\n const messages = getPanneauMessages(locale);\n const translated = Object.keys(messages).length > 0;\n return (\n <IntlProvider\n locale={translated ? locale : 'en'}\n defaultLocale=\"en\"\n messages={{ ...(translated ? messages : getPanneauMessages('en')), ...added }}\n >\n {children}\n </IntlProvider>\n );\n}\n\n/**\n * The root of every Panneau interface. It scopes the base stylesheet and the design tokens to its\n * element (no global CSS), applies a theme and a color scheme, and hosts overlays and toasts so\n * that they get the tokens too. Panneau components must render inside one. A project can override\n * any token with its own class on the root. Without an `IntlProvider` above it, it provides one\n * with Panneau's messages in its `locale`.\n */\nexport function PanneauRoot({\n theme = null,\n colorScheme = 'light',\n density = 'auto',\n iconLoader = null,\n locale,\n messages,\n className,\n children,\n ...props\n}: PanneauRootProps) {\n const intl = use(IntlContext) as IntlShape | null | undefined;\n const [container, setContainer] = useState<HTMLDivElement | null>(null);\n const { scope, styles: themeStyles } = useThemeStyles(theme);\n const root = (\n <div\n {...props}\n className={cx('panneau-root', styles.root, styles.container, className)}\n data-color-scheme={colorScheme}\n data-density={density}\n data-panneau-theme={scope}\n >\n {themeStyles}\n <I18nProvider locale={locale ?? intl?.locale}>\n <NamedIconLoaderContext value={iconLoader}>\n <ScopeContext value={{ colorScheme, density }}>\n <PortalContext value={container}>\n <ToastProvider\n regionClassName={styles.root}\n regionProps={{\n 'data-color-scheme': colorScheme,\n 'data-density': density,\n 'data-panneau-theme': scope,\n }}\n >\n {children}\n </ToastProvider>\n </PortalContext>\n </ScopeContext>\n </NamedIconLoaderContext>\n <div ref={setContainer} className={styles.portal} />\n </I18nProvider>\n </div>\n );\n if (intl === null || intl === undefined) {\n return (\n <PanneauIntlProvider locale={locale} messages={messages}>\n {root}\n </PanneauIntlProvider>\n );\n }\n return root;\n}\n"],"mappings":";;;;;;;;;;;;;;AA0DA,IAAMiC,gBAAgB/B,cAA0CiC,KAAAA,CAAS;;AAGzE,IAAaC,eAAelC,cAA8D;CACtFuB,aAAa;CACbC,SAAS;AACb,CAAC;;AAGD,IAAaW,iBAAiBJ,cAAcK;;;;;;AAO5C,SAAOC,eAAAf,OAAA;CAAA,MAAAgB,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAJ,EAAA,OAAAhB,OAAA;EACH,MAAAqB,MAAYrB,UAAU,OAAOP,YAAYO,OAAO,GAAQ,IAA5C;EACZ,MAAAsB,QAAcD,QAAQ,KAAK3B,WAAW2B,GAAe,IAAvCV,KAAAA;EACd,MAAAY,UAAgBnC,eAAeY,OAAKwB,KAAO;EAEvCF,KAAAA;EAGSJ,KAAAI,UAAUX,KAAAA,IACP,oBAAA,SAAA;GAAa,MAAA,iBAAiBW;GAAoB,YAAA;GAC7CD,UAAAA,IAAGI,WAAY,KAAKH,KAAK;EACtB,CAAA,IAHX;EAKAH,KAAAI,YAAY,KACT,oBAAA,SAAA;GAAa,MAAA,iBAAiB7B,WAAW6B,OAAO;GAAgB,YAAA;GAC3DA,UAA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AQA,SAASjC,KAAAA,GAAS;EAAA,IAAAiD;EAAA,IAAA5C,EAAA,QAAAZ,UAAAY,EAAA,QAAAX,YAAAW,EAAA,QAAAgC,MAAA;GAE/BY,MAAA,oBAAC,qBAAD;IAA6BxD;IAAkBC;IAC1C2C,UAAAA;GADe,CAAA;GAEEhC,EAAA,MAAAZ;GAAAY,EAAA,MAAAX;GAAAW,EAAA,MAAAgC;GAAAhC,EAAA,MAAA4C;EAAA,OAAAA,MAAA5C,EAAA;EAAA,OAFtB4C;CAEsB;CAE7B,OACMZ;AAAI"}
@@ -1,5 +1,5 @@
1
1
  import { type HTMLAttributes, type ReactNode } from 'react';
2
- import type { ColorScheme, Density, Theme } from '../theme/theme';
2
+ import type { ColorScheme, Density, Theme } from '../theme/theme.js';
3
3
  export interface ThemeScopeProps extends HTMLAttributes<HTMLElement> {
4
4
  /** Element to render. Defaults to `div`. */
5
5
  as?: 'div' | 'section' | 'aside' | 'nav' | 'header' | 'footer' | 'main' | 'article';
@@ -1,5 +1,5 @@
1
1
  import { type ReactNode } from 'react';
2
- import { type IconComponent } from '../icon/Icon';
2
+ import { type IconComponent } from '../icon/Icon.js';
3
3
  /** One choice of a segmented control. */
4
4
  export interface SegmentedControlOption {
5
5
  value: string;
@@ -1,3 +1,3 @@
1
1
  /** Tokens of SegmentedControl. */
2
- export declare const segmentedControlTokens: import("..").ComponentTokens<"segmented-control", "panneau-segmented-control-radius" | "panneau-segmented-control-padding" | "panneau-segmented-control-bg" | "panneau-segmented-control-border-color" | "panneau-segmented-control-segment-padding-x" | "panneau-segmented-control-segment-font-weight" | "panneau-segmented-control-segment-color" | "panneau-segmented-control-segment-color-selected" | "panneau-segmented-control-segment-bg-selected" | "panneau-segmented-control-segment-shadow-selected">;
2
+ export declare const segmentedControlTokens: import("../index.js").ComponentTokens<"segmented-control", "panneau-segmented-control-radius" | "panneau-segmented-control-padding" | "panneau-segmented-control-bg" | "panneau-segmented-control-border-color" | "panneau-segmented-control-segment-padding-x" | "panneau-segmented-control-segment-font-weight" | "panneau-segmented-control-segment-color" | "panneau-segmented-control-segment-color-selected" | "panneau-segmented-control-segment-bg-selected" | "panneau-segmented-control-segment-shadow-selected">;
3
3
  //# sourceMappingURL=tokens.d.ts.map
@@ -1,4 +1,4 @@
1
- import { type FieldChromeProps } from '../field/FieldParts';
1
+ import { type FieldChromeProps } from '../field/FieldParts.js';
2
2
  /** The value of an option. */
3
3
  export type OptionValue = string | number | boolean;
4
4
  /** A choice of a select, a radio group or a combo box. Same shape as the protocol's `Option`. */
@@ -1,3 +1,3 @@
1
1
  /** Tokens of the options of `Select`, `ComboBox` and `Menu`. */
2
- export declare const listBoxTokens: import("..").ComponentTokens<"list-box", "panneau-list-box-padding" | "panneau-list-box-item-radius" | "panneau-list-box-item-padding-y" | "panneau-list-box-item-padding-y-described" | "panneau-list-box-item-padding-x" | "panneau-list-box-item-bg-hover">;
2
+ export declare const listBoxTokens: import("../index.js").ComponentTokens<"list-box", "panneau-list-box-padding" | "panneau-list-box-item-radius" | "panneau-list-box-item-padding-y" | "panneau-list-box-item-padding-y-described" | "panneau-list-box-item-padding-x" | "panneau-list-box-item-bg-hover">;
3
3
  //# sourceMappingURL=listBoxTokens.d.ts.map
@@ -1,3 +1,3 @@
1
1
  /** Tokens of Skeleton. */
2
- export declare const skeletonTokens: import("..").ComponentTokens<"skeleton", "panneau-skeleton-color" | "panneau-skeleton-radius" | "panneau-skeleton-duration">;
2
+ export declare const skeletonTokens: import("../index.js").ComponentTokens<"skeleton", "panneau-skeleton-color" | "panneau-skeleton-radius" | "panneau-skeleton-duration">;
3
3
  //# sourceMappingURL=tokens.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import { type SliderProps as AriaSliderProps } from 'react-aria-components';
3
- import { type FieldChromeProps } from '../field/FieldParts';
3
+ import { type FieldChromeProps } from '../field/FieldParts.js';
4
4
  export interface SliderProps extends Omit<AriaSliderProps<number>, 'className' | 'style' | 'children' | 'value' | 'defaultValue' | 'onChange'>, FieldChromeProps {
5
5
  /** The number, or `null` until the slider is moved: the thumb then rests at the start. */
6
6
  value?: number | null;
@@ -1,3 +1,3 @@
1
1
  /** Tokens of Spinner. */
2
- export declare const spinnerTokens: import("..").ComponentTokens<"spinner", "panneau-spinner-border-width">;
2
+ export declare const spinnerTokens: import("../index.js").ComponentTokens<"spinner", "panneau-spinner-border-width">;
3
3
  //# sourceMappingURL=tokens.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import type { HTMLAttributes } from 'react';
2
- import { type Justification, type Responsive, type Space } from '../layout/responsive';
2
+ import { type Justification, type Responsive, type Space } from '../layout/responsive.js';
3
3
  export interface StackProps extends HTMLAttributes<HTMLElement> {
4
4
  /** Element to render. Defaults to `div`. */
5
5
  as?: 'div' | 'section' | 'article' | 'aside' | 'header' | 'footer' | 'nav' | 'main' | 'ul' | 'ol' | 'form';
@@ -1,3 +1,3 @@
1
1
  /** Tokens of Stack. */
2
- export declare const stackTokens: import("..").ComponentTokens<"stack", "panneau-stack-gap">;
2
+ export declare const stackTokens: import("../index.js").ComponentTokens<"stack", "panneau-stack-gap">;
3
3
  //# sourceMappingURL=tokens.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import { type SwitchProps as AriaSwitchProps } from 'react-aria-components';
3
- import { type ChoiceChromeProps } from '../checkbox/ChoiceChrome';
3
+ import { type ChoiceChromeProps } from '../checkbox/ChoiceChrome.js';
4
4
  export interface SwitchProps extends Omit<AriaSwitchProps, 'className' | 'style' | 'children'>, ChoiceChromeProps {
5
5
  /** Label, next to the switch. */
6
6
  children?: ReactNode;
@@ -1,3 +1,3 @@
1
1
  /** Tokens of Switch. */
2
- export declare const switchTokens: import("..").ComponentTokens<"switch", "panneau-switch-height" | "panneau-switch-width" | "panneau-switch-radius" | "panneau-switch-checked-bg" | "panneau-switch-track-bg" | "panneau-switch-thumb-size" | "panneau-switch-thumb-bg" | "panneau-switch-checked-thumb-bg">;
2
+ export declare const switchTokens: import("../index.js").ComponentTokens<"switch", "panneau-switch-height" | "panneau-switch-width" | "panneau-switch-radius" | "panneau-switch-checked-bg" | "panneau-switch-track-bg" | "panneau-switch-thumb-size" | "panneau-switch-thumb-bg" | "panneau-switch-checked-thumb-bg">;
3
3
  //# sourceMappingURL=tokens.d.ts.map
@@ -1,3 +1,3 @@
1
1
  /** Tokens of Tabs. */
2
- export declare const tabsTokens: import("..").ComponentTokens<"tabs", "panneau-tabs-gap" | "panneau-tabs-border-color" | "panneau-tabs-tab-padding-x" | "panneau-tabs-tab-font-weight" | "panneau-tabs-tab-color" | "panneau-tabs-indicator-height" | "panneau-tabs-tab-color-selected" | "panneau-tabs-indicator-color">;
2
+ export declare const tabsTokens: import("../index.js").ComponentTokens<"tabs", "panneau-tabs-gap" | "panneau-tabs-border-color" | "panneau-tabs-tab-padding-x" | "panneau-tabs-tab-font-weight" | "panneau-tabs-tab-color" | "panneau-tabs-indicator-height" | "panneau-tabs-tab-color-selected" | "panneau-tabs-indicator-color">;
3
3
  //# sourceMappingURL=tokens.d.ts.map
@@ -1,4 +1,4 @@
1
- import { type FieldChromeProps } from '../field/FieldParts';
1
+ import { type FieldChromeProps } from '../field/FieldParts.js';
2
2
  /** A suggested tag: its value, and the label shown for it. */
3
3
  export interface TagSuggestion {
4
4
  value: string;
@@ -1,5 +1,5 @@
1
1
  import type { HTMLAttributes } from 'react';
2
- import type { Tone } from '../theme/tones';
2
+ import type { Tone } from '../theme/tones.js';
3
3
  /** A size of the font scale of the theme. */
4
4
  export type TextSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
5
5
  /** A font role of the theme. */
@@ -1,3 +1,3 @@
1
1
  /** Tokens of Text. */
2
- export declare const textTokens: import("..").ComponentTokens<"text", "panneau-text-muted-color">;
2
+ export declare const textTokens: import("../index.js").ComponentTokens<"text", "panneau-text-muted-color">;
3
3
  //# sourceMappingURL=tokens.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { type TextFieldProps as AriaTextFieldProps } from 'react-aria-components';
2
- import { type FieldChromeProps } from '../field/FieldParts';
2
+ import { type FieldChromeProps } from '../field/FieldParts.js';
3
3
  export interface TextAreaProps extends Omit<AriaTextFieldProps, 'className' | 'style' | 'children' | 'isInvalid' | 'validate'>, FieldChromeProps {
4
4
  placeholder?: string;
5
5
  /** Visible lines of text. Defaults to 4. */
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import { type TextFieldProps as AriaTextFieldProps } from 'react-aria-components';
3
- import { type FieldChromeProps } from '../field/FieldParts';
3
+ import { type FieldChromeProps } from '../field/FieldParts.js';
4
4
  export interface TextInputProps extends Omit<AriaTextFieldProps, 'className' | 'style' | 'children' | 'isInvalid' | 'validate' | 'type'>, FieldChromeProps {
5
5
  type?: 'text' | 'email' | 'url' | 'tel' | 'password' | 'search';
6
6
  placeholder?: string;
@@ -1,5 +1,5 @@
1
- import type { Theme } from './theme';
2
- import type { ToneValues } from './tones';
1
+ import type { Theme } from './theme.js';
2
+ import type { ToneValues } from './tones.js';
3
3
  /**
4
4
  * A tone from one of Bootstrap's theme colors, read from its CSS variables (`--bs-<color>`,
5
5
  * `-text-emphasis`, `-bg-subtle`, `-border-subtle`), so that a site's custom colors carry over:
@@ -1,5 +1,5 @@
1
- import { type ColorDifferenceCheck } from './colorVision';
2
- import { type Theme } from './theme';
1
+ import { type ColorDifferenceCheck } from './colorVision.js';
2
+ import { type Theme } from './theme.js';
3
3
  /** A pair of colors that a theme must keep readable. */
4
4
  export interface ThemeContrastCheck {
5
5
  scheme: 'light' | 'dark';
@@ -1,5 +1,5 @@
1
- import { type ThemeReport } from './checkTheme';
2
- import type { Theme } from './theme';
1
+ import { type ThemeReport } from './checkTheme.js';
2
+ import type { Theme } from './theme.js';
3
3
  /** Loads a module from its URL: `import()`, replaced in tests. */
4
4
  export type ModuleImporter = (url: string) => Promise<Record<string, unknown>>;
5
5
  /** Reads a theme from a JSON file or from an export of a module. */
@@ -1,4 +1,4 @@
1
- import { type Rgb } from './color';
1
+ import { type Rgb } from './color.js';
2
2
  /** A color vision deficiency, at full severity: red-blind, green-blind or blue-blind. */
3
3
  export type ColorVisionDeficiency = 'protanopia' | 'deuteranopia' | 'tritanopia';
4
4
  /** A color as a person with a color vision deficiency sees it. */
@@ -1,8 +1,8 @@
1
- import { type ComponentTokenName } from './components';
2
- import type { ThemeFont } from './fonts';
3
- import { type SemanticTokenName } from './semanticTokens';
4
- import type { Density, Theme } from './theme';
5
- import type { ToneInput } from './tones';
1
+ import { type ComponentTokenName } from './components.js';
2
+ import type { ThemeFont } from './fonts.js';
3
+ import { type SemanticTokenName } from './semanticTokens.js';
4
+ import type { Density, Theme } from './theme.js';
5
+ import type { ToneInput } from './tones.js';
6
6
  /**
7
7
  * Tokens that a project adds, such as those of its own components: declare them here so that
8
8
  * `defineTheme()` accepts them.
@@ -1,13 +1,13 @@
1
- export { bootstrapTheme, bootstrapTone } from './bootstrap';
2
- export { CHART_CATEGORICAL_COUNT, CHART_SEQUENTIAL_COUNT, chartColors } from './chartColors';
3
- export { type ThemeContrastCheck, type ThemeReport, checkTheme } from './checkTheme';
4
- export { type ColorDifferenceCheck, type ColorVisionDeficiency, checkColorDifferences, } from './colorVision';
5
- export { type Rgb } from './color';
6
- export { type ComponentTokens, defineComponentTokens } from './componentTokens';
7
- export { type ComponentTokenName, componentTokens } from './components';
8
- export { type PaletteTokenName, type PanneauTokens, type ThemeDefinition, type ThemeTokens, type TokenName, defineTheme, findUnknownTokens, mergeThemes, } from './defineTheme';
9
- export { type ThemeFont, type ThemeFontFace, type ThemeFontStylesheet } from './fonts';
10
- export { SEMANTIC_TOKENS, type SemanticTokenName } from './semanticTokens';
11
- export { type ColorScheme, type Density, type Theme } from './theme';
12
- export { BUILT_IN_TONES, type PanneauTones, type Tone, type ToneInput, type ToneSurfaces, type ToneValues, deriveTone, toneClassName, } from './tones';
1
+ export { bootstrapTheme, bootstrapTone } from './bootstrap.js';
2
+ export { CHART_CATEGORICAL_COUNT, CHART_SEQUENTIAL_COUNT, chartColors } from './chartColors.js';
3
+ export { type ThemeContrastCheck, type ThemeReport, checkTheme } from './checkTheme.js';
4
+ export { type ColorDifferenceCheck, type ColorVisionDeficiency, checkColorDifferences, } from './colorVision.js';
5
+ export { type Rgb } from './color.js';
6
+ export { type ComponentTokens, defineComponentTokens } from './componentTokens.js';
7
+ export { type ComponentTokenName, componentTokens } from './components.js';
8
+ export { type PaletteTokenName, type PanneauTokens, type ThemeDefinition, type ThemeTokens, type TokenName, defineTheme, findUnknownTokens, mergeThemes, } from './defineTheme.js';
9
+ export { type ThemeFont, type ThemeFontFace, type ThemeFontStylesheet } from './fonts.js';
10
+ export { SEMANTIC_TOKENS, type SemanticTokenName } from './semanticTokens.js';
11
+ export { type ColorScheme, type Density, type Theme } from './theme.js';
12
+ export { BUILT_IN_TONES, type PanneauTones, type Tone, type ToneInput, type ToneSurfaces, type ToneValues, deriveTone, toneClassName, } from './tones.js';
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- import type { ThemeFont } from './fonts';
2
- import { type ToneInput, type ToneSurfaces } from './tones';
1
+ import type { ThemeFont } from './fonts.js';
2
+ import { type ToneInput, type ToneSurfaces } from './tones.js';
3
3
  /**
4
4
  * A theme: design tokens, as CSS variables without the leading `--`, with optional overrides for
5
5
  * the dark scheme, raw palette colors, its own tones, and named variants of components (decision
@@ -1,4 +1,4 @@
1
- import { type Tone } from './tones';
1
+ import { type Tone } from './tones.js';
2
2
  /**
3
3
  * The class of a tone, `panneau-tone-<tone>`. The built-in tones come from `Tone.module.css`, whose
4
4
  * classes get the same stable names, so using it includes their CSS; a theme's own tones get their
@@ -1,4 +1,4 @@
1
- import { type Rgb } from './color';
1
+ import { type Rgb } from './color.js';
2
2
  /**
3
3
  * The tones that components accept (`tone="success"`), like Bootstrap's `$theme-colors`. A theme
4
4
  * adds its own; declare them here so that `tone="signal"` type-checks:
@@ -1,5 +1,5 @@
1
1
  import { type TimeFieldProps, type TimeValue } from 'react-aria-components';
2
- import { type FieldChromeProps } from '../field/FieldParts';
2
+ import { type FieldChromeProps } from '../field/FieldParts.js';
3
3
  export interface TimeInputProps extends Omit<TimeFieldProps<TimeValue>, 'className' | 'style' | 'children' | 'isInvalid' | 'validate'>, FieldChromeProps {
4
4
  controlClassName?: string;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { type ReactNode } from 'react';
2
- import type { Tone } from '../theme/tones';
2
+ import type { Tone } from '../theme/tones.js';
3
3
  /** @deprecated Use `Tone`. */
4
4
  export type ToastTone = Tone;
5
5
  /** What a toast says. */
@@ -1,3 +1,3 @@
1
1
  /** Tokens of Toast. */
2
- export declare const toastTokens: import("..").ComponentTokens<"toast", "panneau-toast-width" | "panneau-toast-radius" | "panneau-toast-bg" | "panneau-toast-border-color" | "panneau-toast-shadow" | "panneau-toast-tone-width">;
2
+ export declare const toastTokens: import("../index.js").ComponentTokens<"toast", "panneau-toast-width" | "panneau-toast-radius" | "panneau-toast-bg" | "panneau-toast-border-color" | "panneau-toast-shadow" | "panneau-toast-tone-width">;
3
3
  //# sourceMappingURL=tokens.d.ts.map