@panneau/ui 5.0.0-alpha.0 → 5.0.0-alpha.1
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 +21 -4
- package/dist/icon/namedIcons.d.ts +16 -0
- package/dist/icon/namedIcons.d.ts.map +1 -0
- package/dist/icon/namedIcons.js +90 -0
- package/dist/icon/namedIcons.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -15,10 +15,10 @@ import { Button, PanneauRoot, TextInput, bootstrapTheme } from '@panneau/ui';
|
|
|
15
15
|
</PanneauRoot>;
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
| Export | Content
|
|
19
|
-
| --------------------- |
|
|
20
|
-
| `@panneau/ui` | `PanneauRoot`, themes, the primitives, `Icon`, `useToast()`, `usePanneauIntl()` |
|
|
21
|
-
| `@panneau/ui/locales` | Deprecated: the UI messages by locale, `en` and `fr`. Use `@panneau/intl`
|
|
18
|
+
| Export | Content |
|
|
19
|
+
| --------------------- | ------------------------------------------------------------------------------------------------- |
|
|
20
|
+
| `@panneau/ui` | `PanneauRoot`, themes, the primitives, `Icon`, `getNamedIcon()`, `useToast()`, `usePanneauIntl()` |
|
|
21
|
+
| `@panneau/ui/locales` | Deprecated: the UI messages by locale, `en` and `fr`. Use `@panneau/intl` |
|
|
22
22
|
|
|
23
23
|
## Root, tokens and themes
|
|
24
24
|
|
|
@@ -38,6 +38,23 @@ The default theme and the icon set are explained in [decision 0020](../../docs/d
|
|
|
38
38
|
- Labelled controls take `label`, `description` and `errors` (a list of messages: any message makes the control invalid and describes it).
|
|
39
39
|
- They work on phones: larger touch targets on touch screens, dialogs as bottom sheets, scrolling tabs.
|
|
40
40
|
|
|
41
|
+
## Icons
|
|
42
|
+
|
|
43
|
+
Components take icons as components: any Lucide icon (`icon={Pencil}`), or a component with the same props.
|
|
44
|
+
|
|
45
|
+
Definitions name their icons (`"icon": "send"`, a name of [lucide.dev/icons](https://lucide.dev/icons)). `getNamedIcon(name)` turns a name into an icon component that goes wherever an icon component goes:
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
import { Button, getNamedIcon } from '@panneau/ui';
|
|
49
|
+
|
|
50
|
+
<Button icon={getNamedIcon('send')}>Send</Button>;
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
- It loads that one icon the first time it renders, through Lucide's dynamic imports, and renders an empty space of the same size until then. The list of names is loaded on demand too: the whole set is never in the bundle, but bundlers emit one small chunk per icon.
|
|
54
|
+
- It returns the same component for the same name. A name Lucide doesn't have renders nothing, with a warning in the console.
|
|
55
|
+
- `loadNamedIcon(name)` loads an icon ahead of time, and resolves with its component (or `null`).
|
|
56
|
+
- **Vite apps, in development:** add `optimizeDeps: { exclude: ['lucide-react/dynamicIconImports.mjs'] }` to the Vite config. When Vite optimizes it together with `lucide-react`, it splits `lucide-react` into one chunk per icon (about 1,900 requests on every page load). Production builds are not affected.
|
|
57
|
+
|
|
41
58
|
## Messages
|
|
42
59
|
|
|
43
60
|
Strings go through react-intl, with English defaults.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IconComponent } from './Icon';
|
|
2
|
+
/**
|
|
3
|
+
* Loads a Lucide icon by its name (`send`, `calendar-days`: the names of lucide.dev/icons), and
|
|
4
|
+
* resolves with its component, or with `null` for a name Lucide doesn't have. Each icon is its own
|
|
5
|
+
* module, and so is the list of names: neither is in the bundle until a named icon is used.
|
|
6
|
+
*/
|
|
7
|
+
export declare function loadNamedIcon(name: string): Promise<IconComponent | null>;
|
|
8
|
+
/**
|
|
9
|
+
* An icon component for a Lucide icon name, as definitions name them (`"icon": "send"`). It goes
|
|
10
|
+
* wherever an icon component goes (`<Button icon={getNamedIcon('send')}>`), and is the same
|
|
11
|
+
* component for the same name. It loads the icon the first time it renders (`loadNamedIcon()`),
|
|
12
|
+
* and renders an empty space of the same size until then. A name Lucide doesn't have renders
|
|
13
|
+
* nothing.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getNamedIcon(name: string): IconComponent;
|
|
16
|
+
//# sourceMappingURL=namedIcons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namedIcons.d.ts","sourceRoot":"","sources":["../../src/icon/namedIcons.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAwB5C;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAoCzE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAwCxD"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useSyncExternalStore } from "react";
|
|
3
|
+
//#region src/icon/namedIcons.tsx
|
|
4
|
+
var entries = /* @__PURE__ */ new Map();
|
|
5
|
+
var components = /* @__PURE__ */ new Map();
|
|
6
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
7
|
+
var imports = null;
|
|
8
|
+
function subscribe(listener) {
|
|
9
|
+
listeners.add(listener);
|
|
10
|
+
return () => {
|
|
11
|
+
listeners.delete(listener);
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function setEntry(name, entry) {
|
|
15
|
+
entries.set(name, entry);
|
|
16
|
+
listeners.forEach((listener) => listener());
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Loads a Lucide icon by its name (`send`, `calendar-days`: the names of lucide.dev/icons), and
|
|
20
|
+
* resolves with its component, or with `null` for a name Lucide doesn't have. Each icon is its own
|
|
21
|
+
* module, and so is the list of names: neither is in the bundle until a named icon is used.
|
|
22
|
+
*/
|
|
23
|
+
function loadNamedIcon(name) {
|
|
24
|
+
const entry = entries.get(name);
|
|
25
|
+
if (entry?.status === "loaded") return Promise.resolve(entry.icon);
|
|
26
|
+
if (entry?.status === "missing") return Promise.resolve(null);
|
|
27
|
+
if (entry === void 0) setEntry(name, { status: "loading" });
|
|
28
|
+
imports ??= import("lucide-react/dynamicIconImports.mjs").then((module) => module.default);
|
|
29
|
+
return imports.then((all) => {
|
|
30
|
+
const load = Object.hasOwn(all, name) ? all[name] : void 0;
|
|
31
|
+
return load !== void 0 ? load().then((module) => module.default) : null;
|
|
32
|
+
}).then((icon) => {
|
|
33
|
+
if (icon === null) {
|
|
34
|
+
console.warn(`[panneau] Lucide has no icon named "${name}".`);
|
|
35
|
+
setEntry(name, { status: "missing" });
|
|
36
|
+
} else setEntry(name, {
|
|
37
|
+
status: "loaded",
|
|
38
|
+
icon
|
|
39
|
+
});
|
|
40
|
+
return icon;
|
|
41
|
+
}, (error) => {
|
|
42
|
+
entries.delete(name);
|
|
43
|
+
imports = null;
|
|
44
|
+
throw error;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* An icon component for a Lucide icon name, as definitions name them (`"icon": "send"`). It goes
|
|
49
|
+
* wherever an icon component goes (`<Button icon={getNamedIcon('send')}>`), and is the same
|
|
50
|
+
* component for the same name. It loads the icon the first time it renders (`loadNamedIcon()`),
|
|
51
|
+
* and renders an empty space of the same size until then. A name Lucide doesn't have renders
|
|
52
|
+
* nothing.
|
|
53
|
+
*/
|
|
54
|
+
function getNamedIcon(name) {
|
|
55
|
+
const existing = components.get(name);
|
|
56
|
+
if (existing !== void 0) return existing;
|
|
57
|
+
const NamedIcon = ({ size = 24, className, ...props }) => {
|
|
58
|
+
const entry = useSyncExternalStore(subscribe, () => entries.get(name), () => entries.get(name));
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
if (entries.get(name) === void 0) loadNamedIcon(name).catch(() => void 0);
|
|
61
|
+
}, []);
|
|
62
|
+
if (entry?.status === "loaded") {
|
|
63
|
+
const Loaded = entry.icon;
|
|
64
|
+
return /* @__PURE__ */ jsx(Loaded, {
|
|
65
|
+
size,
|
|
66
|
+
className,
|
|
67
|
+
...props
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
if (entry?.status === "missing") return null;
|
|
71
|
+
const { "aria-hidden": hidden, "aria-label": label, role } = props;
|
|
72
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
73
|
+
width: size,
|
|
74
|
+
height: size,
|
|
75
|
+
viewBox: "0 0 24 24",
|
|
76
|
+
className,
|
|
77
|
+
"aria-hidden": hidden,
|
|
78
|
+
"aria-label": label,
|
|
79
|
+
role,
|
|
80
|
+
"data-loading": ""
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
NamedIcon.displayName = `NamedIcon(${name})`;
|
|
84
|
+
components.set(name, NamedIcon);
|
|
85
|
+
return NamedIcon;
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
export { getNamedIcon, loadNamedIcon };
|
|
89
|
+
|
|
90
|
+
//# sourceMappingURL=namedIcons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namedIcons.js","names":[],"sources":["../../src/icon/namedIcons.tsx"],"sourcesContent":["import { useEffect, useSyncExternalStore } from 'react';\n\nimport type { IconComponent } from './Icon';\n\ntype IconImports = Readonly<Record<string, () => Promise<{ default: IconComponent }>>>;\n\ntype Entry =\n { status: 'loading' } | { status: 'loaded'; icon: IconComponent } | { status: 'missing' };\n\nconst entries = new Map<string, Entry>();\nconst components = new Map<string, IconComponent>();\nconst listeners = new Set<() => void>();\nlet imports: Promise<IconImports> | null = null;\n\nfunction subscribe(listener: () => void): () => void {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n}\n\nfunction setEntry(name: string, entry: Entry) {\n entries.set(name, entry);\n listeners.forEach((listener) => listener());\n}\n\n/**\n * Loads a Lucide icon by its name (`send`, `calendar-days`: the names of lucide.dev/icons), and\n * resolves with its component, or with `null` for a name Lucide doesn't have. Each icon is its own\n * module, and so is the list of names: neither is in the bundle until a named icon is used.\n */\nexport function loadNamedIcon(name: string): Promise<IconComponent | null> {\n const entry = entries.get(name);\n if (entry?.status === 'loaded') {\n return Promise.resolve(entry.icon);\n }\n if (entry?.status === 'missing') {\n return Promise.resolve(null);\n }\n if (entry === undefined) {\n setEntry(name, { status: 'loading' });\n }\n imports ??= import('lucide-react/dynamicIconImports.mjs').then(\n (module) => module.default as unknown as IconImports,\n );\n return imports\n .then((all) => {\n const load = Object.hasOwn(all, name) ? all[name] : undefined;\n return load !== undefined ? load().then((module) => module.default) : null;\n })\n .then(\n (icon) => {\n if (icon === null) {\n console.warn(`[panneau] Lucide has no icon named \"${name}\".`);\n setEntry(name, { status: 'missing' });\n } else {\n setEntry(name, { status: 'loaded', icon });\n }\n return icon;\n },\n (error: unknown) => {\n // A chunk that failed to load (offline): the icon is loaded again when it mounts.\n entries.delete(name);\n imports = null;\n throw error;\n },\n );\n}\n\n/**\n * An icon component for a Lucide icon name, as definitions name them (`\"icon\": \"send\"`). It goes\n * wherever an icon component goes (`<Button icon={getNamedIcon('send')}>`), and is the same\n * component for the same name. It loads the icon the first time it renders (`loadNamedIcon()`),\n * and renders an empty space of the same size until then. A name Lucide doesn't have renders\n * nothing.\n */\nexport function getNamedIcon(name: string): IconComponent {\n const existing = components.get(name);\n if (existing !== undefined) {\n return existing;\n }\n const NamedIcon: IconComponent = ({ size = 24, className, ...props }) => {\n const entry = useSyncExternalStore(\n subscribe,\n () => entries.get(name),\n () => entries.get(name),\n );\n useEffect(() => {\n if (entries.get(name) === undefined) {\n loadNamedIcon(name).catch(() => undefined);\n }\n }, []);\n if (entry?.status === 'loaded') {\n const Loaded = entry.icon;\n return <Loaded size={size} className={className} {...props} />;\n }\n if (entry?.status === 'missing') {\n return null;\n }\n const { 'aria-hidden': hidden, 'aria-label': label, role } = props;\n return (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n className={className}\n aria-hidden={hidden}\n aria-label={label}\n role={role}\n data-loading=\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D,MAAM,WAAW,WAAW,IAAI,IAAI;CACpC,IAAI,aAAa,KAAA,GACb,OAAO;CAEX,MAAM,aAA4B,EAAE,OAAO,IAAI,WAAW,GAAG,YAAY;EACrE,MAAM,QAAQ,qBACV,iBACM,QAAQ,IAAI,IAAI,SAChB,QAAQ,IAAI,IAAI,CAC1B;EACA,gBAAgB;GACZ,IAAI,QAAQ,IAAI,IAAI,MAAM,KAAA,GACtB,cAAc,IAAI,CAAC,CAAC,YAAY,KAAA,CAAS;EAEjD,GAAG,CAAA,CAAE;EACL,IAAI,OAAO,WAAW,UAAU;GAC5B,MAAM,SAAS,MAAM;GACrB,OAAO,oBAAC,QAAD;IAAc;IAAiB;IAAW,GAAI;GAAM,CAAA;EAC/D;EACA,IAAI,OAAO,WAAW,WAClB,OAAO;EAEX,MAAM,EAAE,eAAe,QAAQ,cAAc,OAAO,SAAS;EAC7D,OACI,oBAAC,OAAD;GACI,OAAO;GACP,QAAQ;GACR,SAAQ;GACG;GACX,eAAa;GACb,cAAY;GACN;GACN,gBAAa;EAAE,CAAA;CAG3B;CACA,UAAU,cAAc,aAAa,KAAI;CACzC,WAAW,IAAI,MAAM,SAAS;CAC9B,OAAO;AACX"}
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export { Disclosure, type DisclosureProps } from './disclosure/Disclosure';
|
|
|
11
11
|
export { type FieldChromeProps } from './field/FieldParts';
|
|
12
12
|
export { Fieldset, type FieldsetProps } from './field/Fieldset';
|
|
13
13
|
export { Icon, type IconComponent, type IconProps, type IconSize } from './icon/Icon';
|
|
14
|
+
export { getNamedIcon, loadNamedIcon } from './icon/namedIcons';
|
|
14
15
|
export { IconButton, type IconButtonProps } from './icon-button/IconButton';
|
|
15
16
|
export { usePanneauIntl } from './intl/usePanneauIntl';
|
|
16
17
|
export { Menu, MenuItem, type MenuItemProps, type MenuProps, MenuSeparator, MenuTrigger, } from './menu/Menu';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
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AW,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EACH,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,MAAM,EACX,QAAQ,GACX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -16,6 +16,7 @@ import { DatePicker } from "./date-picker/DatePicker.js";
|
|
|
16
16
|
import { Dialog, DialogTrigger } from "./dialog/Dialog.js";
|
|
17
17
|
import { Disclosure } from "./disclosure/Disclosure.js";
|
|
18
18
|
import { Fieldset } from "./field/Fieldset.js";
|
|
19
|
+
import { getNamedIcon, loadNamedIcon } from "./icon/namedIcons.js";
|
|
19
20
|
import { Menu, MenuItem, MenuSeparator, MenuTrigger } from "./menu/Menu.js";
|
|
20
21
|
import { NumberInput } from "./number-input/NumberInput.js";
|
|
21
22
|
import { RadioGroup } from "./radio-group/RadioGroup.js";
|
|
@@ -26,4 +27,4 @@ import { TextArea } from "./text-area/TextArea.js";
|
|
|
26
27
|
import { TextInput } from "./text-input/TextInput.js";
|
|
27
28
|
import { bootstrapTheme } from "./theme/bootstrap.js";
|
|
28
29
|
import { TimeInput } from "./time-input/TimeInput.js";
|
|
29
|
-
export { Alert, Badge, Button, Card, Checkbox, ComboBox, DatePicker, Dialog, DialogTrigger, Disclosure, Fieldset, Icon, IconButton, Menu, MenuItem, MenuSeparator, MenuTrigger, NumberInput, PanneauRoot, Popover, PopoverTrigger, RadioGroup, Select, Spinner, Switch, Tab, TabList, TabPanel, Tabs, TextArea, TextInput, TimeInput, Tooltip, bootstrapTheme, usePanneauIntl, usePortalContainer, useToast };
|
|
30
|
+
export { Alert, Badge, Button, Card, Checkbox, ComboBox, DatePicker, Dialog, DialogTrigger, Disclosure, Fieldset, Icon, IconButton, Menu, MenuItem, MenuSeparator, MenuTrigger, NumberInput, PanneauRoot, Popover, PopoverTrigger, RadioGroup, Select, Spinner, Switch, Tab, TabList, TabPanel, Tabs, TextArea, TextInput, TimeInput, Tooltip, bootstrapTheme, getNamedIcon, loadNamedIcon, usePanneauIntl, usePortalContainer, useToast };
|
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.1",
|
|
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,7 +43,7 @@
|
|
|
43
43
|
"react-intl": "^12.0.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@panneau/intl": "5.0.0-alpha.
|
|
46
|
+
"@panneau/intl": "5.0.0-alpha.1",
|
|
47
47
|
"lucide-react": "^1.57.0"
|
|
48
48
|
}
|
|
49
49
|
}
|