@panneau/ui 5.0.0-alpha.7 → 5.0.0-alpha.9
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.
- package/README.md +17 -0
- package/dist/alert/Alert.d.ts +2 -2
- package/dist/alert/tokens.d.ts +1 -1
- package/dist/badge/Badge.d.ts +1 -1
- package/dist/badge/tokens.d.ts +1 -1
- package/dist/button/Button.d.ts +3 -3
- package/dist/button/tokens.d.ts +1 -1
- package/dist/card/tokens.d.ts +1 -1
- package/dist/checkbox/Checkbox.d.ts +1 -1
- package/dist/checkbox/tokens.d.ts +1 -1
- package/dist/combo-box/ComboBox.d.ts +1 -1
- package/dist/command-palette/CommandPalette.d.ts +1 -1
- package/dist/command-palette/match.d.ts +1 -1
- package/dist/command-palette/tokens.d.ts +1 -1
- package/dist/container/tokens.d.ts +1 -1
- package/dist/date-picker/DatePicker.d.ts +1 -1
- package/dist/date-picker/calendarTokens.d.ts +1 -1
- package/dist/dialog/Dialog.css +5 -0
- package/dist/dialog/Dialog.d.ts.map +1 -1
- package/dist/dialog/Dialog.js +9 -4
- package/dist/dialog/Dialog.js.map +1 -1
- package/dist/dialog/Dialog.module.js +4 -2
- package/dist/dialog/Dialog.module.js.map +1 -1
- package/dist/dialog/tokens.d.ts +1 -1
- package/dist/disclosure/tokens.d.ts +1 -1
- package/dist/divider/tokens.d.ts +1 -1
- package/dist/field/FieldParts.d.ts +1 -1
- package/dist/field/inputTokens.d.ts +1 -1
- package/dist/field/tokens.d.ts +1 -1
- package/dist/grid/Grid.d.ts +1 -1
- package/dist/grid/tokens.d.ts +1 -1
- package/dist/heading/tokens.d.ts +1 -1
- package/dist/icon/lucideIconLoader.d.ts +1 -1
- package/dist/icon/namedIcons.d.ts +1 -1
- package/dist/icon-button/IconButton.d.ts +2 -2
- package/dist/index.d.ts +61 -61
- package/dist/inline/Inline.d.ts +1 -1
- package/dist/inline/tokens.d.ts +1 -1
- package/dist/menu/Menu.d.ts +1 -1
- package/dist/menu/tokens.d.ts +1 -1
- package/dist/named-icons/index.d.ts +1 -1
- package/dist/number-input/NumberInput.d.ts +1 -1
- package/dist/number-input/tokens.d.ts +1 -1
- package/dist/pill-trigger/tokens.d.ts +1 -1
- package/dist/popover/Popover.css +5 -0
- package/dist/popover/Popover.d.ts.map +1 -1
- package/dist/popover/Popover.js +9 -4
- package/dist/popover/Popover.js.map +1 -1
- package/dist/popover/Popover.module.js +4 -2
- package/dist/popover/Popover.module.js.map +1 -1
- package/dist/popover/tokens.d.ts +1 -1
- package/dist/prose/tokens.d.ts +1 -1
- package/dist/radio-group/RadioGroup.d.ts +2 -2
- package/dist/radio-group/tokens.d.ts +1 -1
- package/dist/root/PanneauRoot.d.ts +27 -5
- package/dist/root/PanneauRoot.d.ts.map +1 -1
- package/dist/root/PanneauRoot.js +164 -120
- package/dist/root/PanneauRoot.js.map +1 -1
- package/dist/root/ThemeScope.d.ts +1 -1
- package/dist/root/ThemeScope.d.ts.map +1 -1
- package/dist/root/ThemeScope.js +40 -38
- package/dist/root/ThemeScope.js.map +1 -1
- package/dist/segmented-control/SegmentedControl.d.ts +1 -1
- package/dist/segmented-control/tokens.d.ts +1 -1
- package/dist/select/Select.d.ts +1 -1
- package/dist/select/listBoxTokens.d.ts +1 -1
- package/dist/skeleton/tokens.d.ts +1 -1
- package/dist/slider/Slider.d.ts +1 -1
- package/dist/spinner/tokens.d.ts +1 -1
- package/dist/stack/Stack.d.ts +1 -1
- package/dist/stack/tokens.d.ts +1 -1
- package/dist/switch/Switch.d.ts +1 -1
- package/dist/switch/tokens.d.ts +1 -1
- package/dist/tabs/tokens.d.ts +1 -1
- package/dist/tags-input/TagsInput.d.ts +1 -1
- package/dist/text/Text.d.ts +1 -1
- package/dist/text/tokens.d.ts +1 -1
- package/dist/text-area/TextArea.d.ts +1 -1
- package/dist/text-input/TextInput.d.ts +1 -1
- package/dist/theme/bootstrap.d.ts +2 -2
- package/dist/theme/checkTheme.d.ts +2 -2
- package/dist/theme/cli.d.ts +2 -2
- package/dist/theme/colorVision.d.ts +1 -1
- package/dist/theme/defineTheme.d.ts +5 -5
- package/dist/theme/index.d.ts +12 -12
- package/dist/theme/theme.d.ts +2 -2
- package/dist/theme/toneClass.d.ts +1 -1
- package/dist/theme/tones.d.ts +1 -1
- package/dist/time-input/TimeInput.d.ts +1 -1
- package/dist/toast/Toast.d.ts +1 -1
- package/dist/toast/tokens.d.ts +1 -1
- package/dist/tooltip/tokens.d.ts +1 -1
- package/dist/utils/events.d.ts +4 -0
- package/dist/utils/events.d.ts.map +1 -0
- package/dist/utils/events.js +9 -0
- package/dist/utils/events.js.map +1 -0
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeScope.js","names":["HTMLAttributes","ReactNode","use","useState","ColorScheme","Density","Theme","cx","PortalProvider","ScopeContext","useThemeStyles","styles","ThemeScopeProps","HTMLElement","as","theme","colorScheme","density","children","ThemeScope","t0","$","_c","className","props","t1","t2","Element","undefined","parent","container","setContainer","scope","themeStyles","t3","t4","t5","effective","t6","scheme","t7","t8","t9","t10","t11","Symbol","for","portal","t12","_c","styles"],"sources":["../../src/root/ThemeScope.tsx"],"sourcesContent":["import { type HTMLAttributes, type ReactNode, use, useState } from 'react';\n\nimport type { ColorScheme, Density, Theme } from '../theme/theme';\nimport { cx } from '../utils/cx';\nimport { PortalProvider, ScopeContext, useThemeStyles } from './PanneauRoot';\nimport styles from './PanneauRoot.module.css';\n\nexport interface ThemeScopeProps extends HTMLAttributes<HTMLElement> {\n /** Element to render. Defaults to `div`. */\n as?: 'div' | 'section' | 'aside' | 'nav' | 'header' | 'footer' | 'main' | 'article';\n /** A theme for the subtree, over the theme of the root. */\n theme?: Theme | null;\n /** A color scheme for the subtree. Inherited by default. */\n colorScheme?: ColorScheme;\n /** A density for the subtree. Inherited by default. */\n density?: Density;\n children?: ReactNode;\n}\n\n/**\n * Applies a theme, a color scheme or a density to a subtree, like `data-bs-theme` on any element:\n * a dark sidebar in a light app, a compact table, a preview in another brand's colors. Overlays\n * opened inside it render in its own container, so that they keep its tokens. It must be inside a\n * `PanneauRoot`.\n *\n * What it doesn't set comes from its parent: a scope with only a density keeps the colors of the\n * theme around it.\n */\nexport function ThemeScope({\n as: Element = 'div',\n theme = null,\n colorScheme,\n density,\n className,\n children,\n ...props\n}: ThemeScopeProps) {\n const parent = use(ScopeContext);\n const [container, setContainer] = useState<HTMLDivElement | null>(null);\n const { scope, styles: themeStyles } = useThemeStyles(theme);\n // The effective values are always written, so that the dark and density rules of a theme apply.\n // Only those set here take the default tokens back (`.scheme`, `.density`).\n const effective = {\n colorScheme: colorScheme ?? parent.colorScheme,\n density: density ?? parent.density,\n };\n return (\n <Element\n {...props}\n className={cx(\n 'panneau-theme-scope',\n styles.scope,\n colorScheme !== undefined && styles.scheme,\n density !== undefined && styles.density,\n className,\n )}\n data-color-scheme={effective.colorScheme}\n data-density={effective.density}\n data-panneau-theme={scope}\n >\n {themeStyles}\n <ScopeContext value={effective}>\n <PortalProvider value={container}>{children}</PortalProvider>\n </ScopeContext>\n <div ref={setContainer} className={styles.portal} />\n </Element>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA4BA,SAAOmB,WAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAP;CAAA,IAAAC;CAAA,IAAAO;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAL,EAAA,OAAAD,IAAA;EAAoB,CAAA,CAAAN,IAAAW,IAAAV,OAAAW,IAAAV,aAAAC,SAAAM,WAAAL,UAAA,GAAAM,SAAAJ;EAQTC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAL;EAAAK,EAAA,KAAAJ;EAAAI,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;CAAA,OAAA;EAAAR,WAAAG,EAAA;EAAAE,YAAAF,EAAA;EAAAL,cAAAK,EAAA;EAAAJ,UAAAI,EAAA;EAAAG,QAAAH,EAAA;EAAAI,KAAAJ,EAAA;EAAAK,KAAAL,EAAA;CAAA;CAPV,MAAAM,UAAAF,OAAAG,KAAAA,IAAA,QAAAH;CACJ,MAAAV,QAAAW,OAAAE,KAAAA,IAAA,OAAAF;CAOA,MAAAG,SAAe3B,IAAIO,YAAY;CAC/B,MAAA,CAAAqB,WAAAC,gBAAkC5B,SAAgC,IAAI;CACtE,MAAA,EAAA6B,OAAArB,QAAAsB,gBAAuCvB,eAAeK,
|
|
1
|
+
{"version":3,"file":"ThemeScope.js","names":["HTMLAttributes","ReactNode","use","useState","ColorScheme","Density","Theme","cx","PortalProvider","ScopeContext","useThemeStyles","styles","ThemeScopeProps","HTMLElement","as","theme","colorScheme","density","children","ThemeScope","t0","$","_c","className","props","t1","t2","Element","undefined","parent","container","setContainer","scope","themeStyles","nonce","t3","t4","t5","effective","t6","scheme","t7","t8","t9","t10","t11","Symbol","for","portal","t12","_c","styles"],"sources":["../../src/root/ThemeScope.tsx"],"sourcesContent":["import { type HTMLAttributes, type ReactNode, use, useState } from 'react';\n\nimport type { ColorScheme, Density, Theme } from '../theme/theme';\nimport { cx } from '../utils/cx';\nimport { PortalProvider, ScopeContext, useThemeStyles } from './PanneauRoot';\nimport styles from './PanneauRoot.module.css';\n\nexport interface ThemeScopeProps extends HTMLAttributes<HTMLElement> {\n /** Element to render. Defaults to `div`. */\n as?: 'div' | 'section' | 'aside' | 'nav' | 'header' | 'footer' | 'main' | 'article';\n /** A theme for the subtree, over the theme of the root. */\n theme?: Theme | null;\n /** A color scheme for the subtree. Inherited by default. */\n colorScheme?: ColorScheme;\n /** A density for the subtree. Inherited by default. */\n density?: Density;\n children?: ReactNode;\n}\n\n/**\n * Applies a theme, a color scheme or a density to a subtree, like `data-bs-theme` on any element:\n * a dark sidebar in a light app, a compact table, a preview in another brand's colors. Overlays\n * opened inside it render in its own container, so that they keep its tokens. It must be inside a\n * `PanneauRoot`.\n *\n * What it doesn't set comes from its parent: a scope with only a density keeps the colors of the\n * theme around it.\n */\nexport function ThemeScope({\n as: Element = 'div',\n theme = null,\n colorScheme,\n density,\n className,\n children,\n ...props\n}: ThemeScopeProps) {\n const parent = use(ScopeContext);\n const [container, setContainer] = useState<HTMLDivElement | null>(null);\n const { scope, styles: themeStyles } = useThemeStyles(theme, parent.nonce);\n // The effective values are always written, so that the dark and density rules of a theme apply.\n // Only those set here take the default tokens back (`.scheme`, `.density`).\n const effective = {\n colorScheme: colorScheme ?? parent.colorScheme,\n density: density ?? parent.density,\n nonce: parent.nonce,\n };\n return (\n <Element\n {...props}\n className={cx(\n 'panneau-theme-scope',\n styles.scope,\n colorScheme !== undefined && styles.scheme,\n density !== undefined && styles.density,\n className,\n )}\n data-color-scheme={effective.colorScheme}\n data-density={effective.density}\n data-panneau-theme={scope}\n >\n {themeStyles}\n <ScopeContext value={effective}>\n <PortalProvider value={container}>{children}</PortalProvider>\n </ScopeContext>\n <div ref={setContainer} className={styles.portal} />\n </Element>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA4BA,SAAOmB,WAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAP;CAAA,IAAAC;CAAA,IAAAO;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAL,EAAA,OAAAD,IAAA;EAAoB,CAAA,CAAAN,IAAAW,IAAAV,OAAAW,IAAAV,aAAAC,SAAAM,WAAAL,UAAA,GAAAM,SAAAJ;EAQTC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAL;EAAAK,EAAA,KAAAJ;EAAAI,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;CAAA,OAAA;EAAAR,WAAAG,EAAA;EAAAE,YAAAF,EAAA;EAAAL,cAAAK,EAAA;EAAAJ,UAAAI,EAAA;E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lTokens: import("
|
|
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
|
package/dist/select/Select.d.ts
CHANGED
|
@@ -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("
|
|
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("
|
|
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
|
package/dist/slider/Slider.d.ts
CHANGED
|
@@ -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;
|
package/dist/spinner/tokens.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Tokens of Spinner. */
|
|
2
|
-
export declare const spinnerTokens: import("
|
|
2
|
+
export declare const spinnerTokens: import("../index.js").ComponentTokens<"spinner", "panneau-spinner-border-width">;
|
|
3
3
|
//# sourceMappingURL=tokens.d.ts.map
|
package/dist/stack/Stack.d.ts
CHANGED
|
@@ -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';
|
package/dist/stack/tokens.d.ts
CHANGED
package/dist/switch/Switch.d.ts
CHANGED
|
@@ -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;
|
package/dist/switch/tokens.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Tokens of Switch. */
|
|
2
|
-
export declare const switchTokens: import("
|
|
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
|
package/dist/tabs/tokens.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Tokens of Tabs. */
|
|
2
|
-
export declare const tabsTokens: import("
|
|
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
|
package/dist/text/Text.d.ts
CHANGED
|
@@ -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. */
|
package/dist/text/tokens.d.ts
CHANGED
|
@@ -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';
|
package/dist/theme/cli.d.ts
CHANGED
|
@@ -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.
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -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
|
package/dist/theme/theme.d.ts
CHANGED
|
@@ -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
|
package/dist/theme/tones.d.ts
CHANGED
|
@@ -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
|
}
|
package/dist/toast/Toast.d.ts
CHANGED
package/dist/toast/tokens.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Tokens of Toast. */
|
|
2
|
-
export declare const toastTokens: import("
|
|
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
|
package/dist/tooltip/tokens.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Tokens of Tooltip. */
|
|
2
|
-
export declare const tooltipTokens: import("
|
|
2
|
+
export declare const tooltipTokens: import("../index.js").ComponentTokens<"tooltip", "panneau-tooltip-color" | "panneau-tooltip-radius" | "panneau-tooltip-padding-y" | "panneau-tooltip-padding-x" | "panneau-tooltip-font-size" | "panneau-tooltip-bg">;
|
|
3
3
|
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/utils/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,sFAAsF;AACtF,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAE3D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/utils/events.ts
|
|
2
|
+
/** Stops an event from reaching the components around: for `onSubmit` of overlays. */
|
|
3
|
+
function stopPropagation(event) {
|
|
4
|
+
event.stopPropagation();
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { stopPropagation };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","names":["SyntheticEvent","stopPropagation","event"],"sources":["../../src/utils/events.ts"],"sourcesContent":["import type { SyntheticEvent } from 'react';\n\n/** Stops an event from reaching the components around: for `onSubmit` of overlays. */\nexport function stopPropagation(event: SyntheticEvent): void {\n event.stopPropagation();\n}\n"],"mappings":";;AAGA,SAAgBC,gBAAgBC,OAA6B;CACzDA,MAAMD,gBAAgB;AAC1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/ui",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.9",
|
|
4
4
|
"description": "Design tokens, themes and accessible primitives of Panneau, built on React Aria Components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"panneau-check-theme": "./bin/check-theme.js"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
|
-
"build": "vite build &&
|
|
46
|
+
"build": "vite build && node ../../scripts/declarations.js",
|
|
47
47
|
"typecheck": "tsc --noEmit",
|
|
48
|
-
"api": "
|
|
48
|
+
"api": "node ../../scripts/declarations.js && node ../../scripts/api-report.js"
|
|
49
49
|
},
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
"react-intl": "^12.0.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@panneau/intl": "5.0.0-alpha.
|
|
60
|
+
"@panneau/intl": "5.0.0-alpha.9",
|
|
61
61
|
"lucide-react": "^1.57.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@panneau/protocol": "5.0.0-alpha.
|
|
64
|
+
"@panneau/protocol": "5.0.0-alpha.9"
|
|
65
65
|
}
|
|
66
66
|
}
|