@flatwork-ui/react 0.1.1 → 0.2.0

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 CHANGED
@@ -48,6 +48,21 @@ export function App() {
48
48
  * The bundle is marked `"use client"`, so it works in Next.js App Router.
49
49
  * Router links: `NavItem` takes `as={Link}`; `Breadcrumb` takes `renderLink`.
50
50
 
51
+ ## Icons
52
+
53
+ Every [Material Symbols](https://fonts.google.com/icons) icon, in the Rounded style the design system uses. The font ships with the stylesheet (no Google requests), and `name` is typed, so your editor autocompletes all 3,945 names:
54
+
55
+ ```tsx
56
+ import { Icon, Button } from "@flatwork-ui/react";
57
+
58
+ <Icon name="settings" />
59
+ <Icon name="star" filled /> // filled = active/selected
60
+ <Icon name="warning" size={24} label="Warning" /> // label = meaningful, announced
61
+ <Button leadingIcon={<Icon name="add" />}>New project</Button>
62
+ ```
63
+
64
+ Search names at fonts.google.com/icons (pick "Material Symbols", "Rounded").
65
+
51
66
  ## Components
52
67
 
53
68
  | Area | Components |
@@ -59,7 +74,7 @@ export function App() {
59
74
  | Navigation | `TopNav`, `Brand`, `SideNav`, `NavItem`, `NavGroupLabel`, `Tabs`, `TabList`, `Tab`, `TabPanel`, `SegmentedControl`, `Breadcrumb`, `Pagination`, `Stepper` |
60
75
  | Menus & overlays | `Menu`, `MenuItem`, `MenuLabel`, `MenuSeparator`, `DropdownMenu`, `Tooltip`, `Popover`, `Dialog`, `Drawer`, `CommandPalette` |
61
76
  | Data | `Card`, `CardHeader`, `CardBody`, `CardFooter`, `StatCard`, `Table`, `SortableHeader`, `List`, `ListItem`, `DescriptionList`, `Accordion`, `AccordionItem`, `CodeBlock`, `Divider`, `Avatar`, `AvatarGroup` |
62
- | Icons | `IconPlus`, `IconSearch`, `IconChevronDown`, … (16px stroke icons from the spec) |
77
+ | Icons | `Icon` — every [Material Symbols](https://fonts.google.com/icons) icon by name |
63
78
 
64
79
  Dialogs and drawers use the native `<dialog>` element, so focus trapping, Esc
65
80
  and focus return come from the browser. The design rules each component
package/dist/index.cjs CHANGED
@@ -50,35 +50,7 @@ __export(index_exports, {
50
50
  Field: () => Field,
51
51
  Fieldset: () => Fieldset,
52
52
  FlatworkRoot: () => FlatworkRoot,
53
- IconArrowRight: () => IconArrowRight,
54
- IconBell: () => IconBell,
55
- IconChart: () => IconChart,
56
- IconCheck: () => IconCheck,
57
- IconCheckCircle: () => IconCheckCircle,
58
- IconChevronDown: () => IconChevronDown,
59
- IconChevronLeft: () => IconChevronLeft,
60
- IconChevronRight: () => IconChevronRight,
61
- IconChevronUp: () => IconChevronUp,
62
- IconCopy: () => IconCopy,
63
- IconDownload: () => IconDownload,
64
- IconError: () => IconError,
65
- IconEye: () => IconEye,
66
- IconFolder: () => IconFolder,
67
- IconGrid: () => IconGrid,
68
- IconHome: () => IconHome,
69
- IconInfo: () => IconInfo,
70
- IconList: () => IconList,
71
- IconLock: () => IconLock,
72
- IconMore: () => IconMore,
73
- IconPencil: () => IconPencil,
74
- IconPlus: () => IconPlus,
75
- IconSearch: () => IconSearch,
76
- IconSettings: () => IconSettings,
77
- IconTrash: () => IconTrash,
78
- IconUpload: () => IconUpload,
79
- IconUser: () => IconUser,
80
- IconWarning: () => IconWarning,
81
- IconX: () => IconX,
53
+ Icon: () => Icon,
82
54
  Input: () => Input,
83
55
  InputGroup: () => InputGroup,
84
56
  Kbd: () => Kbd,
@@ -212,100 +184,19 @@ var import_react3 = require("react");
212
184
 
213
185
  // src/icons.tsx
214
186
  var import_jsx_runtime3 = require("react/jsx-runtime");
215
- function icon(name, paths) {
216
- const Icon = (props) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
217
- "svg",
187
+ function Icon({ name, filled, size, label, className, style, ...props }) {
188
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
189
+ "span",
218
190
  {
219
- "aria-hidden": "true",
220
- viewBox: "0 0 16 16",
221
- width: "16",
222
- height: "16",
223
- fill: "none",
224
- stroke: "currentColor",
225
- strokeWidth: 1.4,
226
- strokeLinecap: "round",
227
- strokeLinejoin: "round",
191
+ className: cx("fw-icon", filled && "is-filled", className),
192
+ style: size ? { fontSize: size, ...style } : style,
193
+ ...label ? { role: "img", "aria-label": label } : { "aria-hidden": true },
194
+ translate: "no",
228
195
  ...props,
229
- children: paths
196
+ children: name
230
197
  }
231
198
  );
232
- Icon.displayName = name;
233
- return Icon;
234
- }
235
- var IconHome = icon("IconHome", /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
236
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M2 6.5 8 2l6 4.5V14H2z" }),
237
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M6.25 14V9.5h3.5V14" })
238
- ] }));
239
- var IconUser = icon("IconUser", /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
240
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "8", cy: "5.5", r: "2.75" }),
241
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M2.75 14c.6-2.6 2.7-4 5.25-4s4.65 1.4 5.25 4" })
242
- ] }));
243
- var IconSettings = icon("IconSettings", /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
244
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "8", cy: "8", r: "2" }),
245
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2M3.4 3.4l1.4 1.4M11.2 11.2l1.4 1.4M3.4 12.6l1.4-1.4M11.2 4.8l1.4-1.4" })
246
- ] }));
247
- var IconPlus = icon("IconPlus", /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8 3v10M3 8h10" }));
248
- var IconDownload = icon("IconDownload", /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8 2.5v8M4.5 7 8 10.5 11.5 7M2.5 13.5h11" }));
249
- var IconUpload = icon("IconUpload", /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8 10.5v-8M4.5 6 8 2.5 11.5 6M2.5 13.5h11" }));
250
- var IconChevronDown = icon("IconChevronDown", /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m4 6 4 4 4-4" }));
251
- var IconChevronUp = icon("IconChevronUp", /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m4 10 4-4 4 4" }));
252
- var IconChevronRight = icon("IconChevronRight", /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m6 3.5 4 4.5-4 4.5" }));
253
- var IconChevronLeft = icon("IconChevronLeft", /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m10 3.5-4 4.5 4 4.5" }));
254
- var IconArrowRight = icon("IconArrowRight", /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M3 8h10M9 4l4 4-4 4" }));
255
- var IconPencil = icon("IconPencil", /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M10.5 2.5 13.5 5.5 5.5 13.5H2.5V10.5z" }));
256
- var IconCopy = icon("IconCopy", /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
257
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "5", y: "5", width: "8.5", height: "8.5", rx: "1.5" }),
258
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M3 10.5V3.5A1 1 0 0 1 4 2.5h6.5" })
259
- ] }));
260
- var IconMore = icon("IconMore", /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
261
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "3.5", cy: "8", r: "1.25" }),
262
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "8", cy: "8", r: "1.25" }),
263
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12.5", cy: "8", r: "1.25" })
264
- ] }));
265
- var IconX = icon("IconX", /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m4 4 8 8M12 4l-8 8" }));
266
- var IconTrash = icon("IconTrash", /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M2.5 4.5h11M6 4.5V3h4v1.5M4 4.5l.7 9h6.6l.7-9" }));
267
- var IconSearch = icon("IconSearch", /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
268
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "7", cy: "7", r: "4.5" }),
269
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m10.5 10.5 3.5 3.5" })
270
- ] }));
271
- var IconEye = icon("IconEye", /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
272
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M1.5 8S3.9 3.5 8 3.5 14.5 8 14.5 8 12.1 12.5 8 12.5 1.5 8 1.5 8z" }),
273
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "8", cy: "8", r: "2" })
274
- ] }));
275
- var IconInfo = icon("IconInfo", /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
276
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "8", cy: "8", r: "6.25" }),
277
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8 7.25v4M8 4.75v.25" })
278
- ] }));
279
- var IconCheckCircle = icon("IconCheckCircle", /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
280
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "8", cy: "8", r: "6.25" }),
281
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m5.5 8.25 1.75 1.75 3.25-3.5" })
282
- ] }));
283
- var IconWarning = icon("IconWarning", /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
284
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8 2 14.5 13.5h-13z" }),
285
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8 6.5v3.25M8 11.5v.25" })
286
- ] }));
287
- var IconError = icon("IconError", /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
288
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "8", cy: "8", r: "6.25" }),
289
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8 4.75v3.75M8 10.75v.5" })
290
- ] }));
291
- var IconFolder = icon("IconFolder", /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M2 4.5h4l1.5 1.5H14V13H2z" }));
292
- var IconBell = icon("IconBell", /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
293
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M4 6.5a4 4 0 0 1 8 0c0 3.5 1.5 4.5 1.5 4.5h-11S4 10 4 6.5z" }),
294
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M6.75 13.5a1.4 1.4 0 0 0 2.5 0" })
295
- ] }));
296
- var IconChart = icon("IconChart", /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M2 13V9M6 13V5M10 13V7M14 13V3" }));
297
- var IconLock = icon("IconLock", /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
298
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "3", y: "7", width: "10", height: "7", rx: "1.5" }),
299
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M5.5 7V5a2.5 2.5 0 0 1 5 0v2" })
300
- ] }));
301
- var IconGrid = icon("IconGrid", /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
302
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "2.5", y: "2.5", width: "4.5", height: "4.5", rx: "1" }),
303
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "9", y: "2.5", width: "4.5", height: "4.5", rx: "1" }),
304
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "2.5", y: "9", width: "4.5", height: "4.5", rx: "1" }),
305
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "9", y: "9", width: "4.5", height: "4.5", rx: "1" })
306
- ] }));
307
- var IconList = icon("IconList", /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M2.5 4h11M2.5 8h11M2.5 12h11" }));
308
- var IconCheck = icon("IconCheck", /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m3 8.5 3 3 7-7" }));
199
+ }
309
200
 
310
201
  // src/Form.tsx
311
202
  var import_jsx_runtime4 = require("react/jsx-runtime");
@@ -358,7 +249,7 @@ var Select = (0, import_react3.forwardRef)(function Select2({ invalid: _invalid,
358
249
  const { invalid, ...field } = useFieldProps({ ...props, invalid: _invalid });
359
250
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "fw-select-wrap", children: [
360
251
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("select", { ref, className: cx("fw-select", invalid && "is-error", className), ...props, ...field, children }),
361
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconChevronDown, {})
252
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "keyboard_arrow_down" })
362
253
  ] });
363
254
  });
364
255
  function InputGroup({ className, ...props }) {
@@ -457,7 +348,7 @@ function Dropzone({ title, hint, onFiles, onChange, className, ...props }) {
457
348
  if (e.dataTransfer.files.length) onFiles?.(e.dataTransfer.files);
458
349
  },
459
350
  children: [
460
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconUpload, {}),
351
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "upload" }),
461
352
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: title ?? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
462
353
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("strong", { children: "Click to upload" }),
463
354
  " or drag and drop"
@@ -492,13 +383,13 @@ function Fieldset({ legend, className, children, ...props }) {
492
383
  var import_react4 = require("react");
493
384
  var import_jsx_runtime5 = require("react/jsx-runtime");
494
385
  var toneIcon = {
495
- info: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(IconInfo, {}),
496
- success: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(IconCheckCircle, {}),
497
- warning: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(IconWarning, {}),
498
- error: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(IconError, {}),
499
- neutral: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(IconInfo, {})
386
+ info: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { name: "info" }),
387
+ success: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { name: "check_circle" }),
388
+ warning: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { name: "warning" }),
389
+ error: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { name: "error" }),
390
+ neutral: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { name: "info" })
500
391
  };
501
- function Alert({ tone = "info", title, icon: icon2, onDismiss, className, children, ...props }) {
392
+ function Alert({ tone = "info", title, icon, onDismiss, className, children, ...props }) {
502
393
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
503
394
  "div",
504
395
  {
@@ -506,12 +397,12 @@ function Alert({ tone = "info", title, icon: icon2, onDismiss, className, childr
506
397
  className: cx("fw-alert", tone !== "info" && `fw-alert-${tone}`, className),
507
398
  ...props,
508
399
  children: [
509
- icon2 === void 0 ? toneIcon[tone] : icon2,
400
+ icon === void 0 ? toneIcon[tone] : icon,
510
401
  /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "fw-alert-body", children: [
511
402
  title && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "fw-alert-title", children: title }),
512
403
  children && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "fw-alert-text", children })
513
404
  ] }),
514
- onDismiss && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Button, { variant: "ghost", size: "sm", iconOnly: true, "aria-label": "Dismiss", onClick: onDismiss, style: { margin: "-6px -6px 0 0", color: "inherit" }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(IconX, {}) })
405
+ onDismiss && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Button, { variant: "ghost", size: "sm", iconOnly: true, "aria-label": "Dismiss", onClick: onDismiss, style: { margin: "-6px -6px 0 0", color: "inherit" }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { name: "close" }) })
515
406
  ]
516
407
  }
517
408
  );
@@ -524,7 +415,7 @@ function Toast({ tone = "success", title, description, actions, onDismiss, class
524
415
  description && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: description }),
525
416
  actions && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "fw-toast-actions", children: actions })
526
417
  ] }),
527
- onDismiss && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Button, { variant: "ghost", size: "sm", iconOnly: true, "aria-label": "Dismiss", onClick: onDismiss, style: { margin: "-6px -8px 0 0" }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(IconX, {}) })
418
+ onDismiss && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Button, { variant: "ghost", size: "sm", iconOnly: true, "aria-label": "Dismiss", onClick: onDismiss, style: { margin: "-6px -8px 0 0" }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { name: "close" }) })
528
419
  ] });
529
420
  }
530
421
  var ToastContext = (0, import_react4.createContext)(null);
@@ -567,7 +458,7 @@ function Badge({ tone = "neutral", dot, count, className, children, ...props })
567
458
  function Tag({ onRemove, removeLabel, className, children, ...props }) {
568
459
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: cx("fw-tag", className), ...props, children: [
569
460
  children,
570
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "button", "aria-label": removeLabel ?? (typeof children === "string" ? `Remove ${children}` : "Remove"), onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(IconX, {}) })
461
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "button", "aria-label": removeLabel ?? (typeof children === "string" ? `Remove ${children}` : "Remove"), onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { name: "close" }) })
571
462
  ] });
572
463
  }
573
464
  function Progress({ value, max = 100, tone = "accent", meter, className, ...props }) {
@@ -597,9 +488,9 @@ function Skeleton({ width, height = 12, circle, className, style, ...props }) {
597
488
  }
598
489
  );
599
490
  }
600
- function EmptyState({ icon: icon2, title, description, action, className, ...props }) {
491
+ function EmptyState({ icon, title, description, action, className, ...props }) {
601
492
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: cx("fw-empty", className), ...props, children: [
602
- icon2 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "fw-empty-icon", children: icon2 }),
493
+ icon && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "fw-empty-icon", children: icon }),
603
494
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "fw-t-heading", children: title }),
604
495
  description && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "fw-t-caption", style: { maxWidth: 260 }, children: description }),
605
496
  action && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { marginTop: 8 }, children: action })
@@ -618,12 +509,12 @@ function MenuLabel({ className, ...props }) {
618
509
  function MenuSeparator({ className, ...props }) {
619
510
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("li", { role: "separator", className: cx("fw-menu-sep", className), ...props });
620
511
  }
621
- function MenuItem({ icon: icon2, shortcut, danger, selected, disabled, as = "button", className, children, ...props }) {
512
+ function MenuItem({ icon, shortcut, danger, selected, disabled, as = "button", className, children, ...props }) {
622
513
  const classes = cx("fw-menu-item", danger && "is-danger", selected && "is-selected", className);
623
514
  const inner = /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
624
- icon2,
515
+ icon,
625
516
  children,
626
- shortcut ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "fw-end", children: shortcut }) : selected ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IconCheck, { style: { marginLeft: "auto", color: "var(--fw-accent)" } }) : null
517
+ shortcut ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "fw-end", children: shortcut }) : selected ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { name: "check", style: { marginLeft: "auto", color: "var(--fw-accent)" } }) : null
627
518
  ] });
628
519
  if (as === "li") {
629
520
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("li", { className: classes, "aria-disabled": disabled || void 0, ...props, children: inner });
@@ -771,7 +662,7 @@ function DialogHead({ titleId, title, subtitle, onClose, hideClose, divided }) {
771
662
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h3", { className: "fw-dialog-title", id: titleId, children: title }),
772
663
  subtitle && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "fw-card-sub", children: subtitle })
773
664
  ] }),
774
- !hideClose && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Button, { variant: "ghost", size: "sm", iconOnly: true, "aria-label": "Close", onClick: onClose, style: { margin: "-6px -10px 0 0" }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconX, {}) })
665
+ !hideClose && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Button, { variant: "ghost", size: "sm", iconOnly: true, "aria-label": "Close", onClick: onClose, style: { margin: "-6px -10px 0 0" }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { name: "close" }) })
775
666
  ] });
776
667
  }
777
668
  function Dialog({ open, onClose, title, subtitle, footer, alert, hideClose, className, children, ...props }) {
@@ -835,7 +726,7 @@ function CommandPalette({ open, onClose, commands, placeholder = "Search command
835
726
  let lastGroup;
836
727
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("dialog", { ...modal, "aria-label": "Command palette", className: "fw-command", children: open && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
837
728
  /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "fw-command-input", children: [
838
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconSearch, {}),
729
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { name: "search" }),
839
730
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
840
731
  "input",
841
732
  {
@@ -934,10 +825,10 @@ function SideNav({ className, ...props }) {
934
825
  function NavGroupLabel({ className, ...props }) {
935
826
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: cx("fw-group-label", className), ...props });
936
827
  }
937
- function NavItem({ icon: icon2, badge, current, as, className, children, ...props }) {
828
+ function NavItem({ icon, badge, current, as, className, children, ...props }) {
938
829
  const Tag2 = as ?? "a";
939
830
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Tag2, { className: cx("fw-nav-item", className), "aria-current": current ? "page" : void 0, ...props, children: [
940
- icon2,
831
+ icon,
941
832
  children,
942
833
  badge
943
834
  ] });
@@ -1017,7 +908,7 @@ function Breadcrumb({ items, renderLink, className, ...props }) {
1017
908
  const last = i === items.length - 1;
1018
909
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react7.Fragment, { children: [
1019
910
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("li", { children: last ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "aria-current": "page", children: c.label }) : renderLink ? renderLink(c) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("a", { href: c.href, children: c.label }) }),
1020
- !last && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("li", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(IconChevronRight, { className: "fw-sep" }) })
911
+ !last && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("li", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: "chevron_right", className: "fw-sep" }) })
1021
912
  ] }, i);
1022
913
  }) }) });
1023
914
  }
@@ -1033,7 +924,7 @@ function pageRange(page, count) {
1033
924
  }
1034
925
  function Pagination({ page, count, onPageChange, className, ...props }) {
1035
926
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("nav", { "aria-label": "Pagination", className, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("ul", { className: "fw-pagination", children: [
1036
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { className: "fw-page", type: "button", "aria-label": "Previous page", disabled: page <= 1, onClick: () => onPageChange(page - 1), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(IconChevronLeft, {}) }) }),
927
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { className: "fw-page", type: "button", "aria-label": "Previous page", disabled: page <= 1, onClick: () => onPageChange(page - 1), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: "chevron_left" }) }) }),
1037
928
  pageRange(page, count).map(
1038
929
  (p, i) => p === "gap" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "fw-page", "aria-hidden": "true", style: { cursor: "default" }, children: "\u2026" }) }, `gap-${i}`) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1039
930
  "button",
@@ -1046,14 +937,14 @@ function Pagination({ page, count, onPageChange, className, ...props }) {
1046
937
  }
1047
938
  ) }, p)
1048
939
  ),
1049
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { className: "fw-page", type: "button", "aria-label": "Next page", disabled: page >= count, onClick: () => onPageChange(page + 1), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(IconChevronRight, {}) }) })
940
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { className: "fw-page", type: "button", "aria-label": "Next page", disabled: page >= count, onClick: () => onPageChange(page + 1), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: "chevron_right" }) }) })
1050
941
  ] }) });
1051
942
  }
1052
943
  function Stepper({ steps, current, className, ...props }) {
1053
944
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("ol", { className: cx("fw-stepper", className), ...props, children: steps.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react7.Fragment, { children: [
1054
945
  i > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("li", { className: "fw-step-line", "aria-hidden": "true" }),
1055
946
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("li", { className: cx("fw-step", i < current && "is-done", i === current && "is-active"), "aria-current": i === current ? "step" : void 0, children: [
1056
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "fw-step-n", children: i < current ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(IconCheck, {}) : i + 1 }),
947
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "fw-step-n", children: i < current ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: "check" }) : i + 1 }),
1057
948
  label
1058
949
  ] })
1059
950
  ] }, i)) });
@@ -1104,7 +995,7 @@ function Table({ caption, footer, className, children, ...props }) {
1104
995
  function SortableHeader({ sort = "none", onSort, className, children, ...props }) {
1105
996
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("th", { className: cx("fw-sortable", className), "aria-sort": sort, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { type: "button", onClick: onSort, style: { background: "none", border: 0, padding: 0, font: "inherit", color: "inherit", cursor: "pointer" }, children: [
1106
997
  children,
1107
- sort === "descending" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(IconChevronDown, {}) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(IconChevronUp, { style: sort === "none" ? { opacity: 0.4 } : void 0 })
998
+ sort === "descending" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon, { name: "keyboard_arrow_down" }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon, { name: "keyboard_arrow_up", style: sort === "none" ? { opacity: 0.4 } : void 0 })
1108
999
  ] }) });
1109
1000
  }
1110
1001
  function List({ className, ...props }) {
@@ -1133,7 +1024,7 @@ function AccordionItem({ title, children, ...props }) {
1133
1024
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("details", { ...props, children: [
1134
1025
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("summary", { children: [
1135
1026
  title,
1136
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(IconChevronDown, {})
1027
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon, { name: "keyboard_arrow_down" })
1137
1028
  ] }),
1138
1029
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "fw-acc-body", children })
1139
1030
  ] });
@@ -1187,35 +1078,7 @@ function AvatarGroup({ className, ...props }) {
1187
1078
  Field,
1188
1079
  Fieldset,
1189
1080
  FlatworkRoot,
1190
- IconArrowRight,
1191
- IconBell,
1192
- IconChart,
1193
- IconCheck,
1194
- IconCheckCircle,
1195
- IconChevronDown,
1196
- IconChevronLeft,
1197
- IconChevronRight,
1198
- IconChevronUp,
1199
- IconCopy,
1200
- IconDownload,
1201
- IconError,
1202
- IconEye,
1203
- IconFolder,
1204
- IconGrid,
1205
- IconHome,
1206
- IconInfo,
1207
- IconList,
1208
- IconLock,
1209
- IconMore,
1210
- IconPencil,
1211
- IconPlus,
1212
- IconSearch,
1213
- IconSettings,
1214
- IconTrash,
1215
- IconUpload,
1216
- IconUser,
1217
- IconWarning,
1218
- IconX,
1081
+ Icon,
1219
1082
  Input,
1220
1083
  InputGroup,
1221
1084
  Kbd,