@underpin/ui 2.2.0 → 2.3.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/lib/icons.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { icon } from "./icon.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
2
3
  import { Alert02Icon, AlertCircleIcon as AlertCircleIcon$1, ArrowDown01Icon, ArrowDown02Icon, ArrowLeft01Icon, ArrowLeftDoubleIcon, ArrowRight01Icon, ArrowRightDoubleIcon, ArrowUp01Icon, ArrowUp02Icon, ArrowUpRight01Icon, Calendar03Icon, Cancel01Icon, CancelCircleIcon as CancelCircleIcon$1, CheckmarkCircle02Icon, ComputerIcon as ComputerIcon$1, Copy01Icon, HelpCircleIcon, InformationCircleIcon, ListFilterIcon, Loading03Icon, Moon02Icon, MoreHorizontalCircle01Icon, PlusSignCircleIcon, Refresh01Icon, Remove01Icon, Search01Icon, Sun03Icon, Tick02Icon, UnfoldMoreIcon } from "@hugeicons/core-free-icons";
3
4
  // src/lib/icons.tsx
4
5
  const AlertIcon = icon(Alert02Icon, "AlertIcon");
@@ -31,6 +32,41 @@ const PlusCircleIcon = icon(PlusSignCircleIcon, "PlusCircleIcon");
31
32
  const RefreshIcon = icon(Refresh01Icon, "RefreshIcon");
32
33
  const SearchIcon = icon(Search01Icon, "SearchIcon");
33
34
  const SunIcon = icon(Sun03Icon, "SunIcon");
34
- export { AlertCircleIcon, AlertIcon, ArrowDownIcon, ArrowUpIcon, ArrowUpRightIcon, CalendarIcon, CancelCircleIcon, CancelIcon, CheckCircleIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpDownIcon, ComputerIcon, CopyIcon, DashIcon, FilterIcon, HelpIcon, InfoIcon, LoadingIcon, MoonIcon, MoreIcon, PlusCircleIcon, RefreshIcon, SearchIcon, SunIcon };
35
+ /**
36
+ * The phone shell's drawer toggle: an outlined panel whose left pane is filled in both states,
37
+ * wide while the drawer is open and narrowed to a bar while it is closed. Hand drawn, since
38
+ * Hugeicons' free set has no panel glyph in this style.
39
+ */
40
+ function SidebarIcon({ open, ...props }) {
41
+ return /* @__PURE__ */ jsxs("svg", {
42
+ viewBox: "0 0 24 24",
43
+ width: "1em",
44
+ height: "1em",
45
+ fill: "none",
46
+ stroke: "currentColor",
47
+ strokeWidth: 1.75,
48
+ strokeLinecap: "round",
49
+ strokeLinejoin: "round",
50
+ "aria-hidden": "true",
51
+ ...props,
52
+ children: [/* @__PURE__ */ jsx("rect", {
53
+ x: "3",
54
+ y: "4",
55
+ width: "18",
56
+ height: "16",
57
+ rx: "4.5"
58
+ }), /* @__PURE__ */ jsx("rect", {
59
+ x: "6.25",
60
+ y: "7.5",
61
+ width: open ? 4 : 1.5,
62
+ height: "9",
63
+ rx: "1.25",
64
+ fill: "currentColor",
65
+ stroke: "none",
66
+ className: "transition-[width] duration-150 ease-out-expo motion-reduce:transition-none"
67
+ })]
68
+ });
69
+ }
70
+ export { AlertCircleIcon, AlertIcon, ArrowDownIcon, ArrowUpIcon, ArrowUpRightIcon, CalendarIcon, CancelCircleIcon, CancelIcon, CheckCircleIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpDownIcon, ComputerIcon, CopyIcon, DashIcon, FilterIcon, HelpIcon, InfoIcon, LoadingIcon, MoonIcon, MoreIcon, PlusCircleIcon, RefreshIcon, SearchIcon, SidebarIcon, SunIcon };
35
71
 
36
72
  //# sourceMappingURL=icons.js.map
package/lib/icons.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"icons.js","names":["AlertCircleDef","CancelCircleDef","ComputerDef"],"sources":["../../src/lib/icons.tsx"],"sourcesContent":["import {\n Alert02Icon,\n AlertCircleIcon as AlertCircleDef,\n ArrowDown01Icon,\n ArrowDown02Icon,\n ArrowLeft01Icon,\n ArrowLeftDoubleIcon,\n ArrowRight01Icon,\n ArrowRightDoubleIcon,\n ArrowUp01Icon,\n ArrowUp02Icon,\n ArrowUpRight01Icon,\n Calendar03Icon,\n Cancel01Icon,\n CancelCircleIcon as CancelCircleDef,\n CheckmarkCircle02Icon,\n ListFilterIcon,\n ComputerIcon as ComputerDef,\n Copy01Icon,\n HelpCircleIcon,\n InformationCircleIcon,\n Loading03Icon,\n Moon02Icon,\n MoreHorizontalCircle01Icon,\n PlusSignCircleIcon,\n Refresh01Icon,\n Remove01Icon,\n Search01Icon,\n Sun03Icon,\n Tick02Icon,\n UnfoldMoreIcon,\n} from \"@hugeicons/core-free-icons\"\nimport { icon } from \"./icon\"\n\n// The handful of structural glyphs the package's own components render. This file lives in\n// `lib/` rather than `components/` so the `\"./*\"` wildcard export, which maps into\n// `components/`, never exposes it.\n\nexport const AlertIcon = icon(Alert02Icon, \"AlertIcon\")\nexport const AlertCircleIcon = icon(AlertCircleDef, \"AlertCircleIcon\")\nexport const ArrowDownIcon = icon(ArrowDown02Icon, \"ArrowDownIcon\")\nexport const ArrowUpIcon = icon(ArrowUp02Icon, \"ArrowUpIcon\")\nexport const ArrowUpRightIcon = icon(ArrowUpRight01Icon, \"ArrowUpRightIcon\")\nexport const CalendarIcon = icon(Calendar03Icon, \"CalendarIcon\")\nexport const CancelIcon = icon(Cancel01Icon, \"CancelIcon\")\nexport const CancelCircleIcon = icon(CancelCircleDef, \"CancelCircleIcon\")\nexport const CheckIcon = icon(Tick02Icon, \"CheckIcon\")\nexport const CheckCircleIcon = icon(CheckmarkCircle02Icon, \"CheckCircleIcon\")\nexport const ChevronDownIcon = icon(ArrowDown01Icon, \"ChevronDownIcon\")\nexport const ChevronsLeftIcon = icon(ArrowLeftDoubleIcon, \"ChevronsLeftIcon\")\nexport const ChevronsRightIcon = icon(ArrowRightDoubleIcon, \"ChevronsRightIcon\")\nexport const ChevronLeftIcon = icon(ArrowLeft01Icon, \"ChevronLeftIcon\")\nexport const ChevronRightIcon = icon(ArrowRight01Icon, \"ChevronRightIcon\")\nexport const ChevronUpIcon = icon(ArrowUp01Icon, \"ChevronUpIcon\")\nexport const ChevronsUpDownIcon = icon(UnfoldMoreIcon, \"ChevronsUpDownIcon\")\nexport const ComputerIcon = icon(ComputerDef, \"ComputerIcon\")\nexport const CopyIcon = icon(Copy01Icon, \"CopyIcon\")\nexport const DashIcon = icon(Remove01Icon, \"DashIcon\")\nexport const FilterIcon = icon(ListFilterIcon, \"FilterIcon\")\nexport const HelpIcon = icon(HelpCircleIcon, \"HelpIcon\")\nexport const InfoIcon = icon(InformationCircleIcon, \"InfoIcon\")\nexport const LoadingIcon = icon(Loading03Icon, \"LoadingIcon\")\nexport const MoonIcon = icon(Moon02Icon, \"MoonIcon\")\n// Filled: a hollow dot all but disappears at the size a menu trigger draws it.\nexport const MoreIcon = icon(MoreHorizontalCircle01Icon, \"MoreIcon\", { fill: \"currentColor\" })\nexport const PlusCircleIcon = icon(PlusSignCircleIcon, \"PlusCircleIcon\")\nexport const RefreshIcon = icon(Refresh01Icon, \"RefreshIcon\")\nexport const SearchIcon = icon(Search01Icon, \"SearchIcon\")\nexport const SunIcon = icon(Sun03Icon, \"SunIcon\")\n"],"mappings":";;;AAsCA,MAAa,YAAY,KAAK,aAAa,WAAW;AACtD,MAAa,kBAAkB,KAAKA,mBAAgB,iBAAiB;AACrE,MAAa,gBAAgB,KAAK,iBAAiB,eAAe;AAClE,MAAa,cAAc,KAAK,eAAe,aAAa;AAC5D,MAAa,mBAAmB,KAAK,oBAAoB,kBAAkB;AAC3E,MAAa,eAAe,KAAK,gBAAgB,cAAc;AAC/D,MAAa,aAAa,KAAK,cAAc,YAAY;AACzD,MAAa,mBAAmB,KAAKC,oBAAiB,kBAAkB;AACxE,MAAa,YAAY,KAAK,YAAY,WAAW;AACrD,MAAa,kBAAkB,KAAK,uBAAuB,iBAAiB;AAC5E,MAAa,kBAAkB,KAAK,iBAAiB,iBAAiB;AACtE,MAAa,mBAAmB,KAAK,qBAAqB,kBAAkB;AAC5E,MAAa,oBAAoB,KAAK,sBAAsB,mBAAmB;AAC/E,MAAa,kBAAkB,KAAK,iBAAiB,iBAAiB;AACtE,MAAa,mBAAmB,KAAK,kBAAkB,kBAAkB;AACzE,MAAa,gBAAgB,KAAK,eAAe,eAAe;AAChE,MAAa,qBAAqB,KAAK,gBAAgB,oBAAoB;AAC3E,MAAa,eAAe,KAAKC,gBAAa,cAAc;AAC5D,MAAa,WAAW,KAAK,YAAY,UAAU;AACnD,MAAa,WAAW,KAAK,cAAc,UAAU;AACrD,MAAa,aAAa,KAAK,gBAAgB,YAAY;AAC3D,MAAa,WAAW,KAAK,gBAAgB,UAAU;AACvD,MAAa,WAAW,KAAK,uBAAuB,UAAU;AAC9D,MAAa,cAAc,KAAK,eAAe,aAAa;AAC5D,MAAa,WAAW,KAAK,YAAY,UAAU;AAEnD,MAAa,WAAW,KAAK,4BAA4B,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7F,MAAa,iBAAiB,KAAK,oBAAoB,gBAAgB;AACvE,MAAa,cAAc,KAAK,eAAe,aAAa;AAC5D,MAAa,aAAa,KAAK,cAAc,YAAY;AACzD,MAAa,UAAU,KAAK,WAAW,SAAS"}
1
+ {"version":3,"file":"icons.js","names":["AlertCircleDef","CancelCircleDef","ComputerDef"],"sources":["../../src/lib/icons.tsx"],"sourcesContent":["import {\n Alert02Icon,\n AlertCircleIcon as AlertCircleDef,\n ArrowDown01Icon,\n ArrowDown02Icon,\n ArrowLeft01Icon,\n ArrowLeftDoubleIcon,\n ArrowRight01Icon,\n ArrowRightDoubleIcon,\n ArrowUp01Icon,\n ArrowUp02Icon,\n ArrowUpRight01Icon,\n Calendar03Icon,\n Cancel01Icon,\n CancelCircleIcon as CancelCircleDef,\n CheckmarkCircle02Icon,\n ListFilterIcon,\n ComputerIcon as ComputerDef,\n Copy01Icon,\n HelpCircleIcon,\n InformationCircleIcon,\n Loading03Icon,\n Moon02Icon,\n MoreHorizontalCircle01Icon,\n PlusSignCircleIcon,\n Refresh01Icon,\n Remove01Icon,\n Search01Icon,\n Sun03Icon,\n Tick02Icon,\n UnfoldMoreIcon,\n} from \"@hugeicons/core-free-icons\"\nimport type { ComponentProps } from \"react\"\nimport { icon } from \"./icon\"\n\n// The handful of structural glyphs the package's own components render. This file lives in\n// `lib/` rather than `components/` so the `\"./*\"` wildcard export, which maps into\n// `components/`, never exposes it.\n\nexport const AlertIcon = icon(Alert02Icon, \"AlertIcon\")\nexport const AlertCircleIcon = icon(AlertCircleDef, \"AlertCircleIcon\")\nexport const ArrowDownIcon = icon(ArrowDown02Icon, \"ArrowDownIcon\")\nexport const ArrowUpIcon = icon(ArrowUp02Icon, \"ArrowUpIcon\")\nexport const ArrowUpRightIcon = icon(ArrowUpRight01Icon, \"ArrowUpRightIcon\")\nexport const CalendarIcon = icon(Calendar03Icon, \"CalendarIcon\")\nexport const CancelIcon = icon(Cancel01Icon, \"CancelIcon\")\nexport const CancelCircleIcon = icon(CancelCircleDef, \"CancelCircleIcon\")\nexport const CheckIcon = icon(Tick02Icon, \"CheckIcon\")\nexport const CheckCircleIcon = icon(CheckmarkCircle02Icon, \"CheckCircleIcon\")\nexport const ChevronDownIcon = icon(ArrowDown01Icon, \"ChevronDownIcon\")\nexport const ChevronsLeftIcon = icon(ArrowLeftDoubleIcon, \"ChevronsLeftIcon\")\nexport const ChevronsRightIcon = icon(ArrowRightDoubleIcon, \"ChevronsRightIcon\")\nexport const ChevronLeftIcon = icon(ArrowLeft01Icon, \"ChevronLeftIcon\")\nexport const ChevronRightIcon = icon(ArrowRight01Icon, \"ChevronRightIcon\")\nexport const ChevronUpIcon = icon(ArrowUp01Icon, \"ChevronUpIcon\")\nexport const ChevronsUpDownIcon = icon(UnfoldMoreIcon, \"ChevronsUpDownIcon\")\nexport const ComputerIcon = icon(ComputerDef, \"ComputerIcon\")\nexport const CopyIcon = icon(Copy01Icon, \"CopyIcon\")\nexport const DashIcon = icon(Remove01Icon, \"DashIcon\")\nexport const FilterIcon = icon(ListFilterIcon, \"FilterIcon\")\nexport const HelpIcon = icon(HelpCircleIcon, \"HelpIcon\")\nexport const InfoIcon = icon(InformationCircleIcon, \"InfoIcon\")\nexport const LoadingIcon = icon(Loading03Icon, \"LoadingIcon\")\nexport const MoonIcon = icon(Moon02Icon, \"MoonIcon\")\n// Filled: a hollow dot all but disappears at the size a menu trigger draws it.\nexport const MoreIcon = icon(MoreHorizontalCircle01Icon, \"MoreIcon\", { fill: \"currentColor\" })\nexport const PlusCircleIcon = icon(PlusSignCircleIcon, \"PlusCircleIcon\")\nexport const RefreshIcon = icon(Refresh01Icon, \"RefreshIcon\")\nexport const SearchIcon = icon(Search01Icon, \"SearchIcon\")\nexport const SunIcon = icon(Sun03Icon, \"SunIcon\")\n\ninterface SidebarIconProps extends ComponentProps<\"svg\"> {\n /** Fills the panel's left pane, for the toggle of a drawer that is open. */\n open?: boolean\n}\n\n/**\n * The phone shell's drawer toggle: an outlined panel whose left pane is filled in both states,\n * wide while the drawer is open and narrowed to a bar while it is closed. Hand drawn, since\n * Hugeicons' free set has no panel glyph in this style.\n */\nexport function SidebarIcon({ open, ...props }: SidebarIconProps) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n width=\"1em\"\n height=\"1em\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.75}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n {...props}\n >\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"4.5\" />\n {/* The pane keeps its left edge, its height and its fill in both states, so opening the\n drawer only widens it. `rx` clamps itself to half the width at the narrow end. */}\n <rect\n x=\"6.25\"\n y=\"7.5\"\n width={open ? 4 : 1.5}\n height=\"9\"\n rx=\"1.25\"\n fill=\"currentColor\"\n stroke=\"none\"\n className=\"transition-[width] duration-150 ease-out-expo motion-reduce:transition-none\"\n />\n </svg>\n )\n}\n"],"mappings":";;;;AAuCA,MAAa,YAAY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AAY,EAAE,MAAM,GAAG,SAA2B;CAChE,OACE,qBAAC,OAAD;EACE,SAAQ;EACR,OAAM;EACN,QAAO;EACP,MAAK;EACL,QAAO;EACP,aAAa;EACb,eAAc;EACd,gBAAe;EACf,eAAY;EACZ,GAAI;EAVN,UAAA,CAYE,oBAAC,QAAD;GAAM,GAAE;GAAI,GAAE;GAAI,OAAM;GAAK,QAAO;GAAK,IAAG;EAAO,CAAA,GAGnD,oBAAC,QAAD;GACE,GAAE;GACF,GAAE;GACF,OAAO,OAAO,IAAI;GAClB,QAAO;GACP,IAAG;GACH,MAAK;GACL,QAAO;GACP,WAAU;EACX,CAAA,CACE;;AAET"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@underpin/ui",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "React components on Base UI and Tailwind CSS v4: controls, overlays, forms, charts and the design tokens they share.",
5
5
  "keywords": [
6
6
  "base-ui",
@@ -77,6 +77,10 @@
77
77
  "types": "./lib/data-table-state.d.ts",
78
78
  "default": "./lib/data-table-state.js"
79
79
  },
80
+ "./data-table-search": {
81
+ "types": "./lib/data-table-search.d.ts",
82
+ "default": "./lib/data-table-search.js"
83
+ },
80
84
  "./time-series": {
81
85
  "types": "./lib/time-series.d.ts",
82
86
  "default": "./lib/time-series.js"
@@ -112,18 +116,26 @@
112
116
  "peerDependencies": {
113
117
  "@base-ui/react": ">=1",
114
118
  "@tanstack/react-form": ">=1",
119
+ "@tanstack/react-router": ">=1",
115
120
  "@tanstack/react-table": ">=9",
116
121
  "react": ">=19",
117
122
  "react-dom": ">=19",
118
123
  "tailwindcss": ">=4",
119
- "tailwindcss-animate": ">=1"
124
+ "tailwindcss-animate": ">=1",
125
+ "zod": ">=4"
120
126
  },
121
127
  "peerDependenciesMeta": {
122
128
  "@tanstack/react-form": {
123
129
  "optional": true
124
130
  },
131
+ "@tanstack/react-router": {
132
+ "optional": true
133
+ },
125
134
  "@tanstack/react-table": {
126
135
  "optional": true
136
+ },
137
+ "zod": {
138
+ "optional": true
127
139
  }
128
140
  },
129
141
  "_sideEffects": "The stylesheet is a real side effect: `false` let a bundler tree-shake away a consumer's `import \"@underpin/ui/styles.css\"` and ship an unstyled app."
package/styles.css CHANGED
@@ -381,10 +381,20 @@
381
381
  }
382
382
  }
383
383
 
384
+ /*
385
+ * The page inset, shared by the shell's main content and its phone bar so their edges never
386
+ * drift apart: the full width up to one cap, also as a flex item, whose auto margins would
387
+ * otherwise shrink it to its content. Its own name rather than `container`, because a utility
388
+ * defined twice merges, and this one would override a product's own `container`.
389
+ */
390
+ @utility page-container {
391
+ @apply mx-auto w-full max-w-7xl px-4 md:px-6;
392
+ }
393
+
384
394
  /*
385
395
  * Base helpers the components depend on to render correctly, and the rules every consuming
386
396
  * app shares: the pointer on controls and reduced motion. Kept minimal on purpose; the
387
- * consuming app still supplies its body reset, its page `container` and `@import "tailwindcss"`.
397
+ * consuming app still supplies its body reset and `@import "tailwindcss"`.
388
398
  */
389
399
  @layer base {
390
400
  /* Theme switch: unset follows the OS, `data-theme` forces one. Drives every `light-dark()`. */