@panneau/ui 5.0.0-alpha.29 → 5.0.0-alpha.31

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.
@@ -31,6 +31,7 @@
31
31
 
32
32
  .panneau-card-body {
33
33
  display: flex;
34
+ flex-grow: 1;
34
35
  flex-direction: column;
35
36
  gap: var(--panneau-card-gap, var(--panneau-space-4));
36
37
  padding: var(--panneau-card-padding-y, var(--panneau-space-4))
@@ -1 +1 @@
1
- {"version":3,"file":"Card.module.js","names":[],"sources":["../../src/card/Card.module.css"],"sourcesContent":[".card {\n display: flex;\n flex-direction: column;\n min-width: 0;\n color: var(--panneau-color-text);\n background-color: var(--panneau-card-bg, var(--panneau-color-surface));\n border: var(--panneau-card-border-width, var(--panneau-border-width)) solid\n var(--panneau-card-border-color, var(--panneau-color-border));\n border-radius: var(--panneau-card-radius, var(--panneau-radius-lg));\n box-shadow: var(--panneau-card-shadow, var(--panneau-shadow-sm));\n}\n\n.header {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n gap: var(--panneau-space-2);\n padding: var(--panneau-card-header-padding-y, var(--panneau-space-3))\n var(--panneau-card-padding-x, var(--panneau-space-4));\n border-bottom: var(--panneau-card-border-width, var(--panneau-border-width)) solid\n var(--panneau-card-border-color, var(--panneau-color-border));\n}\n\n.title {\n font-size: var(--panneau-card-title-font-size, var(--panneau-font-size-lg));\n font-weight: var(--panneau-card-title-font-weight, var(--panneau-font-weight-bold));\n line-height: var(--panneau-line-height-tight);\n margin: 0;\n}\n\n.body {\n display: flex;\n flex-direction: column;\n gap: var(--panneau-card-gap, var(--panneau-space-4));\n padding: var(--panneau-card-padding-y, var(--panneau-space-4))\n var(--panneau-card-padding-x, var(--panneau-space-4));\n}\n\n.footer {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-end;\n gap: var(--panneau-space-2);\n padding: var(--panneau-card-header-padding-y, var(--panneau-space-3))\n var(--panneau-card-padding-x, var(--panneau-space-4));\n border-top: var(--panneau-card-border-width, var(--panneau-border-width)) solid\n var(--panneau-card-border-color, var(--panneau-color-border));\n}\n\n@media (max-width: 30rem) {\n .header,\n .body,\n .footer {\n padding-inline: var(--panneau-space-3);\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"Card.module.js","names":[],"sources":["../../src/card/Card.module.css"],"sourcesContent":[".card {\n display: flex;\n flex-direction: column;\n min-width: 0;\n color: var(--panneau-color-text);\n background-color: var(--panneau-card-bg, var(--panneau-color-surface));\n border: var(--panneau-card-border-width, var(--panneau-border-width)) solid\n var(--panneau-card-border-color, var(--panneau-color-border));\n border-radius: var(--panneau-card-radius, var(--panneau-radius-lg));\n box-shadow: var(--panneau-card-shadow, var(--panneau-shadow-sm));\n}\n\n.header {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n gap: var(--panneau-space-2);\n padding: var(--panneau-card-header-padding-y, var(--panneau-space-3))\n var(--panneau-card-padding-x, var(--panneau-space-4));\n border-bottom: var(--panneau-card-border-width, var(--panneau-border-width)) solid\n var(--panneau-card-border-color, var(--panneau-color-border));\n}\n\n.title {\n font-size: var(--panneau-card-title-font-size, var(--panneau-font-size-lg));\n font-weight: var(--panneau-card-title-font-weight, var(--panneau-font-weight-bold));\n line-height: var(--panneau-line-height-tight);\n margin: 0;\n}\n\n.body {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n gap: var(--panneau-card-gap, var(--panneau-space-4));\n padding: var(--panneau-card-padding-y, var(--panneau-space-4))\n var(--panneau-card-padding-x, var(--panneau-space-4));\n}\n\n.footer {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-end;\n gap: var(--panneau-space-2);\n padding: var(--panneau-card-header-padding-y, var(--panneau-space-3))\n var(--panneau-card-padding-x, var(--panneau-space-4));\n border-top: var(--panneau-card-border-width, var(--panneau-border-width)) solid\n var(--panneau-card-border-color, var(--panneau-color-border));\n}\n\n@media (max-width: 30rem) {\n .header,\n .body,\n .footer {\n padding-inline: var(--panneau-space-3);\n }\n}\n"],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { type HTMLAttributes, type ReactNode } from 'react';
1
+ import { type HTMLAttributes, type ReactNode, type Ref } from 'react';
2
2
  import { type NamedIconLoader } from '../icon/namedIcons.js';
3
3
  import { type ColorScheme, type Density, type Theme } from '../theme/theme.js';
4
4
  import { type ToastPlacement } from '../toast/Toast.js';
@@ -49,6 +49,8 @@ export interface PanneauRootProps extends HTMLAttributes<HTMLDivElement> {
49
49
  * (`useToastOffset()`). On a phone, they take the whole width.
50
50
  */
51
51
  toastPlacement?: ToastPlacement;
52
+ /** The root element: the app reads its background for the page (decision 0078). */
53
+ ref?: Ref<HTMLDivElement>;
52
54
  children?: ReactNode;
53
55
  }
54
56
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"PanneauRoot.d.ts","sourceRoot":"","sources":["../../src/root/PanneauRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAgC,MAAM,OAAO,CAAC;AAM1F,OAAO,EAAE,KAAK,eAAe,EAA0B,MAAM,oBAAoB,CAAC;AAElF,OAAO,EACH,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,KAAK,EAGb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,cAAc,EAAiB,MAAM,gBAAgB,CAAC;AAIpE,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACpE;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACrB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACpC;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,QAAQ,CA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/D;AA6BD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,EACxB,KAAY,EACZ,WAAqB,EACrB,OAAgB,EAChB,UAAiB,EACjB,MAAM,EACN,QAAQ,EACR,KAAK,EAAE,UAAU,EACjB,cAAyB,EACzB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACX,EAAE,gBAAgB,+BA6ClB"}
@@ -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","ToastPlacement","ToastProvider","cx","styles","PanneauRootProps","HTMLDivElement","theme","colorScheme","density","iconLoader","locale","messages","Readonly","Record","nonce","toastPlacement","children","PortalContext","Element","undefined","ScopeContext","getPageNonce","document","meta","querySelector","HTMLMetaElement","content","globalThis","__webpack_nonce__","PortalProvider","Provider","useThemeStyles","$","_c","t0","t1","t2","css","scope","fontCss","fonts","replaceAll","t3","t4","href","map","t5","usePortalContainer","PanneauIntlProvider","added","Object","keys","translated","length","t6","t7","PanneauRoot","className","givenNonce","props","pageNonce","intl","container","setContainer","themeStyles","root","t8","t9","t10","t11","t12","t13","t14","Symbol","for","portal","t15","t16","t17","_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 { type ToastPlacement, 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 /**\n * The nonce of the page's Content Security Policy, set on the `<style>` and `<link>` elements of\n * themes and fonts, for a policy without `'unsafe-inline'` in `style-src`. Defaults to the\n * nonce React Aria reads too: that of `<meta property=\"csp-nonce\">`, or `__webpack_nonce__`.\n */\n nonce?: string;\n /**\n * Where toasts show: `bottom` (centered, the default), `bottom-end` or `top-end`. At the bottom,\n * they rise above what sticks to the bottom of the page, such as the footer of a form\n * (`useToastOffset()`). On a phone, they take the whole width.\n */\n toastPlacement?: ToastPlacement;\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/**\n * The color scheme and density in effect, which a `ThemeScope` inherits when it doesn't set them,\n * and the nonce of the styles of themes.\n */\nexport const ScopeContext = createContext<{\n colorScheme: ColorScheme;\n density: Density;\n nonce?: string | undefined;\n}>({\n colorScheme: 'light',\n density: 'auto',\n});\n\n/**\n * The nonce of the page's Content Security Policy, where React Aria reads it: the `nonce` (or\n * `content`) of `<meta property=\"csp-nonce\">` or `<meta name=\"csp-nonce\">`, or\n * `__webpack_nonce__`. `undefined` without one, and on the server.\n */\nexport function getPageNonce(): string | undefined {\n if (typeof document === 'undefined') {\n return undefined;\n }\n const meta = document.querySelector<HTMLMetaElement>(\n 'meta[property=\"csp-nonce\"], meta[name=\"csp-nonce\"]',\n );\n const nonce =\n meta?.nonce ||\n meta?.content ||\n (globalThis as { __webpack_nonce__?: string }).__webpack_nonce__;\n return nonce !== undefined && nonce !== '' ? nonce : undefined;\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(\n theme: Theme | null,\n nonce?: string,\n): { 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\" nonce={nonce}>\n {css.replaceAll('§', scope)}\n </style>\n ) : null}\n {fontCss !== '' ? (\n <style\n href={`panneau-fonts-${hashString(fontCss)}`}\n precedence=\"panneau\"\n nonce={nonce}\n >\n {fontCss}\n </style>\n ) : null}\n {getFontStylesheets(theme?.fonts).map((href) => (\n <link\n key={href}\n rel=\"stylesheet\"\n href={href}\n precedence=\"panneau\"\n nonce={nonce}\n />\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 nonce: givenNonce,\n toastPlacement = 'bottom',\n className,\n children,\n ...props\n}: PanneauRootProps) {\n const [pageNonce] = useState(getPageNonce);\n const nonce = givenNonce ?? pageNonce;\n const intl = use(IntlContext) as IntlShape | null | undefined;\n const [container, setContainer] = useState<HTMLDivElement | null>(null);\n const { scope, styles: themeStyles } = useThemeStyles(theme, nonce);\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, nonce }}>\n <PortalContext value={container}>\n <ToastProvider\n placement={toastPlacement}\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":";;;;;;;;;;;;;;AAsEA,IAAMoC,gBAAgBlC,cAA0CoC,KAAAA,CAAS;;;;;AAMzE,IAAaC,eAAerC,cAIzB;CACCwB,aAAa;CACbC,SAAS;AACb,CAAC;;;;;;AAOD,SAAgBa,eAAmC;CAC/C,IAAI,OAAOC,aAAa,aACpB;CAEJ,MAAMC,OAAOD,SAASE,cAClB,wDACJ;CACA,MAAMV,QACFS,MAAMT,SACNS,MAAMG,WACLC,WAA8CC;CACnD,OAAOd,UAAUK,KAAAA,KAAaL,UAAU,KAAKA,QAAQK,KAAAA;AACzD;;AAGA,IAAaU,iBAAiBZ,cAAca;;;;;;AAO5C,SAAOC,eAAAzB,OAAAQ,OAAA;CAAA,MAAAkB,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAJ,EAAA,OAAAlB,SAAAkB,EAAA,OAAA1B,OAAA;EAIH,MAAA+B,MAAY/B,UAAU,OAAOR,YAAYQ,OAAO,GAAQ,IAA5C;EACZ,MAAAgC,QAAcD,QAAQ,KAAKtC,WAAWsC,GAAe,IAAvClB,KAAAA;EACd,MAAAoB,UAAgB9C,eAAea,OAAKkC,KAAO;EAEvCF,KAAAA;EAGSJ,KAAAI,UAAUnB,KAAAA,IACP,oBAAA,SAAA;GAAa,MAAA,iBAAiBmB;GAAoB,YAAA;GAAiBxB;GAC9DuB,UAAAA,IAAGI,WAAY,KAAKH,KAA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AAuB,IAAA;EAlBxDqB,MAAA,qBAAC,cAAD;GAAsB,QAAArB;GAAtB,UAAA,CACIgB,KAiBAC,GAlBS;;EAmBExC,EAAA,MAAAuC;EAAAvC,EAAA,MAAAuB;EAAAvB,EAAA,MAAA4C;CAAA,OAAAA,MAAA5C,EAAA;CAAA,IAAA6C;CAAA,IAAA7C,EAAA,QAAAzB,eAAAyB,EAAA,QAAAxB,WAAAwB,EAAA,QAAA2B,SAAA3B,EAAA,QAAAM,SAAAN,EAAA,QAAA4C,OAAA5C,EAAA,QAAAsB,MAAAtB,EAAA,QAAAgC,aAAA;EA3BnBa,MAAA,qBAAA,OAAA;GA4BM,GA3BElB;GACO,WAAAL;GACQ/C,qBAAAA;GACLC,gBAAAA;GACM8B,sBAAAA;GALxB,UAAA,CAOK0B,aACDY,GAoBE;;EAAA5C,EAAA,MAAAzB;EAAAyB,EAAA,MAAAxB;EAAAwB,EAAA,MAAA2B;EAAA3B,EAAA,MAAAM;EAAAN,EAAA,MAAA4C;EAAA5C,EAAA,MAAAsB;EAAAtB,EAAA,MAAAgC;EAAAhC,EAAA,MAAA6C;CAAA,OAAAA,MAAA7C,EAAA;CA7BV,MAAAiC,OACIY;CA8BJ,IAAIhB,SAAS,QAAQA,SAAS1C,KAAAA,GAAS;EAAA,IAAA2D;EAAA,IAAA9C,EAAA,QAAAtB,UAAAsB,EAAA,QAAArB,YAAAqB,EAAA,QAAAiC,MAAA;GAE/Ba,MAAA,oBAAC,qBAAD;IAA6BpE;IAAkBC;IAC1CsD,UAAAA;GADe,CAAA;GAEEjC,EAAA,MAAAtB;GAAAsB,EAAA,MAAArB;GAAAqB,EAAA,MAAAiC;GAAAjC,EAAA,MAAA8C;EAAA,OAAAA,MAAA9C,EAAA;EAAA,OAFtB8C;CAEsB;CAE7B,OACMb;AAAI"}
1
+ {"version":3,"file":"PanneauRoot.js","names":["HTMLAttributes","ReactNode","Ref","createContext","use","useState","I18nProvider","IntlContext","IntlProvider","IntlShape","getPanneauMessages","NamedIconLoader","NamedIconLoaderContext","getFontFaceCss","getFontStylesheets","ColorScheme","Density","Theme","getThemeCss","hashString","ToastPlacement","ToastProvider","cx","styles","PanneauRootProps","HTMLDivElement","theme","colorScheme","density","iconLoader","locale","messages","Readonly","Record","nonce","toastPlacement","ref","children","PortalContext","Element","undefined","ScopeContext","getPageNonce","document","meta","querySelector","HTMLMetaElement","content","globalThis","__webpack_nonce__","PortalProvider","Provider","useThemeStyles","$","_c","t0","t1","t2","css","scope","fontCss","fonts","replaceAll","t3","t4","href","map","t5","usePortalContainer","PanneauIntlProvider","added","Object","keys","translated","length","t6","t7","PanneauRoot","className","givenNonce","props","pageNonce","intl","container","setContainer","themeStyles","root","t8","t9","t10","t11","t12","t13","t14","Symbol","for","portal","t15","t16","t17","_c","_Fragment","styles"],"sources":["../../src/root/PanneauRoot.tsx"],"sourcesContent":["import { type HTMLAttributes, type ReactNode, type Ref, 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 { type ToastPlacement, 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 /**\n * The nonce of the page's Content Security Policy, set on the `<style>` and `<link>` elements of\n * themes and fonts, for a policy without `'unsafe-inline'` in `style-src`. Defaults to the\n * nonce React Aria reads too: that of `<meta property=\"csp-nonce\">`, or `__webpack_nonce__`.\n */\n nonce?: string;\n /**\n * Where toasts show: `bottom` (centered, the default), `bottom-end` or `top-end`. At the bottom,\n * they rise above what sticks to the bottom of the page, such as the footer of a form\n * (`useToastOffset()`). On a phone, they take the whole width.\n */\n toastPlacement?: ToastPlacement;\n /** The root element: the app reads its background for the page (decision 0078). */\n ref?: Ref<HTMLDivElement>;\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/**\n * The color scheme and density in effect, which a `ThemeScope` inherits when it doesn't set them,\n * and the nonce of the styles of themes.\n */\nexport const ScopeContext = createContext<{\n colorScheme: ColorScheme;\n density: Density;\n nonce?: string | undefined;\n}>({\n colorScheme: 'light',\n density: 'auto',\n});\n\n/**\n * The nonce of the page's Content Security Policy, where React Aria reads it: the `nonce` (or\n * `content`) of `<meta property=\"csp-nonce\">` or `<meta name=\"csp-nonce\">`, or\n * `__webpack_nonce__`. `undefined` without one, and on the server.\n */\nexport function getPageNonce(): string | undefined {\n if (typeof document === 'undefined') {\n return undefined;\n }\n const meta = document.querySelector<HTMLMetaElement>(\n 'meta[property=\"csp-nonce\"], meta[name=\"csp-nonce\"]',\n );\n const nonce =\n meta?.nonce ||\n meta?.content ||\n (globalThis as { __webpack_nonce__?: string }).__webpack_nonce__;\n return nonce !== undefined && nonce !== '' ? nonce : undefined;\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(\n theme: Theme | null,\n nonce?: string,\n): { 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\" nonce={nonce}>\n {css.replaceAll('§', scope)}\n </style>\n ) : null}\n {fontCss !== '' ? (\n <style\n href={`panneau-fonts-${hashString(fontCss)}`}\n precedence=\"panneau\"\n nonce={nonce}\n >\n {fontCss}\n </style>\n ) : null}\n {getFontStylesheets(theme?.fonts).map((href) => (\n <link\n key={href}\n rel=\"stylesheet\"\n href={href}\n precedence=\"panneau\"\n nonce={nonce}\n />\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 nonce: givenNonce,\n toastPlacement = 'bottom',\n className,\n children,\n ...props\n}: PanneauRootProps) {\n const [pageNonce] = useState(getPageNonce);\n const nonce = givenNonce ?? pageNonce;\n const intl = use(IntlContext) as IntlShape | null | undefined;\n const [container, setContainer] = useState<HTMLDivElement | null>(null);\n const { scope, styles: themeStyles } = useThemeStyles(theme, nonce);\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, nonce }}>\n <PortalContext value={container}>\n <ToastProvider\n placement={toastPlacement}\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} mess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,QAAA2B,SAAA3B,EAAA,QAAAM,SAAAN,EAAA,QAAA4C,OAAA5C,EAAA,QAAAsB,MAAAtB,EAAA,QAAAgC,aAAA;EA3BnBa,MAAA,qBAAA,OAAA;GA4BM,GA3BElB;GACO,WAAAL;GACQhD,qBAAAA;GACLC,gBAAAA;GACM+B,sBAAAA;GALxB,UAAA,CAOK0B,aACDY,GAoBE;;EAAA5C,EAAA,MAAA1B;EAAA0B,EAAA,MAAAzB;EAAAyB,EAAA,MAAA2B;EAAA3B,EAAA,MAAAM;EAAAN,EAAA,MAAA4C;EAAA5C,EAAA,MAAAsB;EAAAtB,EAAA,MAAAgC;EAAAhC,EAAA,MAAA6C;CAAA,OAAAA,MAAA7C,EAAA;CA7BV,MAAAiC,OACIY;CA8BJ,IAAIhB,SAAS,QAAQA,SAAS1C,KAAAA,GAAS;EAAA,IAAA2D;EAAA,IAAA9C,EAAA,QAAAvB,UAAAuB,EAAA,QAAAtB,YAAAsB,EAAA,QAAAiC,MAAA;GAE/Ba,MAAA,oBAAC,qBAAD;IAA6BrE;IAAkBC;IAC1CuD,UAAAA;GADe,CAAA;GAEEjC,EAAA,MAAAvB;GAAAuB,EAAA,MAAAtB;GAAAsB,EAAA,MAAAiC;GAAAjC,EAAA,MAAA8C;EAAA,OAAAA,MAAA9C,EAAA;EAAA,OAFtB8C;CAEsB;CAE7B,OACMb;AAAI"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/ui",
3
- "version": "5.0.0-alpha.29",
3
+ "version": "5.0.0-alpha.31",
4
4
  "description": "Design tokens, themes and accessible primitives of Panneau, built on React Aria Components.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -57,10 +57,10 @@
57
57
  "react-intl": "^12.0.0"
58
58
  },
59
59
  "dependencies": {
60
- "@panneau/intl": "5.0.0-alpha.29",
60
+ "@panneau/intl": "5.0.0-alpha.31",
61
61
  "lucide-react": "^1.57.0"
62
62
  },
63
63
  "devDependencies": {
64
- "@panneau/protocol": "5.0.0-alpha.29"
64
+ "@panneau/protocol": "5.0.0-alpha.31"
65
65
  }
66
66
  }