@warmio/ui 1.3.0 → 1.5.2

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.
@@ -16,16 +16,18 @@ function getTitleSegments(pageTitle, productName) {
16
16
  }
17
17
  function ProductHeaderBreadcrumb({
18
18
  pageTitle,
19
- productName = "Warm"
19
+ productName = "Warm",
20
+ homeHref
20
21
  }) {
21
22
  const titleSegments = getTitleSegments(pageTitle, productName);
23
+ const productNameNode = homeHref ? /* @__PURE__ */ jsx("a", { "data-slot": "product-header-title", href: homeHref, className: "text-foreground", children: productName }) : /* @__PURE__ */ jsx("span", { "data-slot": "product-header-title", className: "text-foreground", children: productName });
22
24
  return /* @__PURE__ */ jsxs(Fragment2, { children: [
23
- /* @__PURE__ */ jsx("span", { className: "text-sm text-foreground", children: productName }),
25
+ productNameNode,
24
26
  titleSegments?.map((segment, index) => {
25
27
  const isLast = index === titleSegments.length - 1;
26
28
  return /* @__PURE__ */ jsxs(Fragment, { children: [
27
29
  /* @__PURE__ */ jsx(ChevronRight, { className: "size-4 text-foreground" }),
28
- isLast ? /* @__PURE__ */ jsx("h1", { "aria-current": "page", children: segment }) : /* @__PURE__ */ jsx("span", { className: "text-sm text-foreground", children: segment })
30
+ isLast ? /* @__PURE__ */ jsx("h1", { "data-slot": "product-header-title", "aria-current": "page", children: segment }) : /* @__PURE__ */ jsx("span", { "data-slot": "product-header-title", className: "text-foreground", children: segment })
29
31
  ] }, `${segment}-${index}`);
30
32
  })
31
33
  ] });
@@ -34,6 +36,8 @@ var ProductHeader = memo(function ProductHeader2({
34
36
  actions,
35
37
  actionsTargetRef,
36
38
  desktopShell = false,
39
+ hideBreadcrumb = false,
40
+ homeHref,
37
41
  leading,
38
42
  pageTitle,
39
43
  productName,
@@ -43,10 +47,11 @@ var ProductHeader = memo(function ProductHeader2({
43
47
  return /* @__PURE__ */ jsxs(
44
48
  "header",
45
49
  {
50
+ "data-slot": "product-header",
46
51
  className: cn(
47
- "sticky top-0 z-20 h-[var(--header-height)] shrink-0 items-center border-b border-border bg-sidebar",
52
+ "sticky top-0 z-20 relative flex h-[var(--header-height)] shrink-0 flex-nowrap items-center overflow-visible",
48
53
  visibility === "always" ? "flex" : visibility === "container" ? "hidden @3xl/main:flex" : "hidden md:flex",
49
- desktopShell && "select-none bg-sidebar/95 supports-[backdrop-filter]:bg-sidebar/85 supports-[backdrop-filter]:backdrop-blur"
54
+ desktopShell && "select-none supports-[backdrop-filter]:backdrop-blur"
50
55
  ),
51
56
  "data-tauri-drag-region": desktopShell ? "deep" : void 0,
52
57
  children: [
@@ -54,10 +59,17 @@ var ProductHeader = memo(function ProductHeader2({
54
59
  "div",
55
60
  {
56
61
  ref: titleTargetRef,
57
- className: "flex min-w-0 items-center gap-2 px-4 [&_h1]:text-sm [&_h1]:text-foreground [&:has(>[data-page-chrome-content])>[data-page-chrome-fallback]]:hidden",
62
+ className: "flex shrink-0 items-center gap-2 whitespace-nowrap px-4 [&:has(>[data-page-chrome-content])>[data-page-chrome-fallback]]:hidden",
58
63
  children: [
59
64
  leading,
60
- /* @__PURE__ */ jsx("div", { "data-page-chrome-fallback": true, className: "contents", children: /* @__PURE__ */ jsx(ProductHeaderBreadcrumb, { pageTitle, productName }) })
65
+ hideBreadcrumb ? null : /* @__PURE__ */ jsx("div", { "data-page-chrome-fallback": true, className: "contents", children: /* @__PURE__ */ jsx(
66
+ ProductHeaderBreadcrumb,
67
+ {
68
+ ...pageTitle !== void 0 ? { pageTitle } : {},
69
+ ...productName !== void 0 ? { productName } : {},
70
+ ...homeHref !== void 0 ? { homeHref } : {}
71
+ }
72
+ ) })
61
73
  ]
62
74
  }
63
75
  ),
@@ -65,7 +77,7 @@ var ProductHeader = memo(function ProductHeader2({
65
77
  "div",
66
78
  {
67
79
  ref: actionsTargetRef,
68
- className: "ml-auto flex items-center gap-2 px-4 [&:has(>[data-page-chrome-content])>[data-page-chrome-fallback]]:hidden",
80
+ className: "ml-auto flex min-w-0 shrink items-center gap-2 overflow-visible px-4 [&:has(>[data-page-chrome-content])>[data-page-chrome-fallback]]:hidden",
69
81
  children: actions ? /* @__PURE__ */ jsx("div", { "data-page-chrome-fallback": true, className: "contents", children: actions }) : null
70
82
  }
71
83
  )
@@ -0,0 +1,133 @@
1
+ // ../ui/src/lib/fluid-overlay.tsx
2
+ import * as React from "react";
3
+ import { useRender } from "@base-ui/react/use-render";
4
+
5
+ // ../ui/src/hooks/use-reduced-motion.ts
6
+ import { useSyncExternalStore } from "react";
7
+ var mediaWindow;
8
+ var mediaQuery;
9
+ function getMediaQuery() {
10
+ const currentWindow = globalThis.window;
11
+ if (!currentWindow?.matchMedia) return void 0;
12
+ if (currentWindow !== mediaWindow) {
13
+ mediaWindow = currentWindow;
14
+ mediaQuery = currentWindow.matchMedia("(prefers-reduced-motion: reduce)");
15
+ }
16
+ return mediaQuery;
17
+ }
18
+ function subscribe(onChange) {
19
+ const query = getMediaQuery();
20
+ query?.addEventListener("change", onChange);
21
+ return () => query?.removeEventListener("change", onChange);
22
+ }
23
+ function getSnapshot() {
24
+ return getMediaQuery()?.matches ?? true;
25
+ }
26
+ function getServerSnapshot() {
27
+ return true;
28
+ }
29
+ function useReducedMotion() {
30
+ return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
31
+ }
32
+
33
+ // ../ui/src/lib/motion.ts
34
+ var MOTION_DURATION_MS = 400;
35
+ var MOTION_DURATION_S = MOTION_DURATION_MS / 1e3;
36
+ var MOTION_ENTRANCE_DURATION_MS = 800;
37
+ var MOTION_ENTRANCE_DURATION_S = MOTION_ENTRANCE_DURATION_MS / 1e3;
38
+ var MOTION_HOVER_DURATION_MS = 100;
39
+ var MOTION_HOVER_DURATION_S = MOTION_HOVER_DURATION_MS / 1e3;
40
+ var FLUID_SPRING = {
41
+ fast: { type: "spring", duration: 0.08, bounce: 0 },
42
+ moderate: { type: "spring", duration: 0.16, bounce: 0 },
43
+ slow: { type: "spring", duration: 0.24, bounce: 0 }
44
+ };
45
+ var FLUID_EASING = "cubic-bezier(0.23, 1, 0.32, 1)";
46
+ var FLUID_EXIT = {
47
+ fast: { duration: 0.06 },
48
+ moderate: { duration: 0.12 },
49
+ slow: { duration: 0.16 }
50
+ };
51
+
52
+ // ../ui/src/lib/fluid-overlay.tsx
53
+ var RESPONSIVE_SHEET_QUERY = "(min-width: 64rem)";
54
+ function resolvePhysicalSide(side, element) {
55
+ if (side === "responsive") {
56
+ return globalThis.matchMedia?.(RESPONSIVE_SHEET_QUERY)?.matches ? "right" : "bottom";
57
+ }
58
+ if (side !== "inline-start" && side !== "inline-end") return side;
59
+ const rtl = getComputedStyle(element).direction === "rtl";
60
+ return side === "inline-start" !== rtl ? "left" : "right";
61
+ }
62
+ function getClosedTransform(motion, side, element) {
63
+ if (motion === "backdrop" || motion === "fade") return void 0;
64
+ if (motion === "menu") return "scaleY(0.96)";
65
+ if (motion === "dialog") return "scale(0.97)";
66
+ if (motion === "ios-dialog") return "translateY(16px)";
67
+ const physicalSide = resolvePhysicalSide(side, element);
68
+ const distance = motion === "sheet" ? "2.5rem" : "4px";
69
+ const negative = motion === "sheet" ? physicalSide === "top" || physicalSide === "left" : physicalSide === "bottom" || physicalSide === "right";
70
+ const axis = physicalSide === "top" || physicalSide === "bottom" ? "Y" : "X";
71
+ const scale = motion === "popover" ? " scale(0.97)" : "";
72
+ return `translate${axis}(${negative ? "-" : ""}${distance})${scale}`;
73
+ }
74
+ function hasNativeAnimation(element) {
75
+ return typeof element.animate === "function";
76
+ }
77
+ function FluidOverlay({
78
+ props,
79
+ state,
80
+ render,
81
+ motion,
82
+ side = "bottom",
83
+ tier
84
+ }) {
85
+ const elementRef = React.useRef(null);
86
+ const reducedMotion = useReducedMotion();
87
+ const open = state.open && state.transitionStatus !== "ending";
88
+ const instant = Boolean(state.instant);
89
+ React.useLayoutEffect(() => {
90
+ const element = elementRef.current;
91
+ if (!element) return;
92
+ const closedTransform = getClosedTransform(motion, side, element);
93
+ const opacity = open ? 1 : 0;
94
+ const settle = () => {
95
+ element.style.opacity = String(opacity);
96
+ if (closedTransform) element.style.transform = open ? "none" : closedTransform;
97
+ };
98
+ if (reducedMotion || instant || !hasNativeAnimation(element) || element.getClientRects().length === 0) {
99
+ settle();
100
+ return;
101
+ }
102
+ const openFrame = closedTransform ? { opacity: 1, transform: "none" } : { opacity: 1 };
103
+ const closedFrame = closedTransform ? { opacity: 0, transform: closedTransform } : { opacity: 0 };
104
+ const animation = element.animate(open ? [closedFrame, openFrame] : [openFrame, closedFrame], {
105
+ duration: (open ? FLUID_SPRING[tier].duration : FLUID_EXIT[tier].duration) * 1e3,
106
+ easing: FLUID_EASING,
107
+ fill: "both"
108
+ });
109
+ const handleFinish = () => {
110
+ settle();
111
+ animation.cancel();
112
+ };
113
+ animation.addEventListener("finish", handleFinish);
114
+ return () => {
115
+ animation.removeEventListener("finish", handleFinish);
116
+ settle();
117
+ animation.cancel();
118
+ };
119
+ }, [instant, motion, open, reducedMotion, side, tier]);
120
+ return useRender({
121
+ defaultTagName: "div",
122
+ ref: elementRef,
123
+ // oxlint-disable-next-line anti-slop/no-runtime-typeof -- Base UI render is documented as an element-or-function union.
124
+ render: typeof render === "function" ? (renderProps) => render(renderProps, state) : render,
125
+ props: { ...props }
126
+ });
127
+ }
128
+
129
+ export {
130
+ useReducedMotion,
131
+ FLUID_SPRING,
132
+ FluidOverlay
133
+ };
@@ -6,34 +6,16 @@ import {
6
6
  import * as React from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  var textClassNameByVariant = {
9
- display: "block text-[1.35rem] font-normal leading-snug tracking-normal [font-family:var(--font-display)] @3xl/main:text-[1.875rem]",
10
- displayCompact: "block text-xl font-normal leading-snug tracking-normal [font-family:var(--font-display)] @3xl/main:text-2xl",
11
- displayHero: "block text-3xl font-bold leading-tight tracking-normal text-foreground sm:text-4xl lg:text-5xl",
12
- metricValue: "block text-2xl",
13
- metricValueLead: "block text-3xl",
14
- metricDisplay: "block text-5xl font-bold leading-none tracking-tight",
15
- overline: "block font-mono text-xs font-bold uppercase tracking-[0.18em]",
16
- micro: "text-xs font-normal leading-snug",
17
- microStrong: "text-xs font-bold leading-snug",
18
- body: "text-sm",
19
- caption: "text-xs",
20
- helper: "text-xs",
21
- sectionTitle: "text-base font-bold leading-normal"
9
+ heading: "",
10
+ metric: "",
11
+ body: "",
12
+ caption: ""
22
13
  };
23
14
  var defaultTextElementByVariant = {
24
- display: "span",
25
- displayCompact: "span",
26
- displayHero: "h1",
27
- metricValue: "span",
28
- metricValueLead: "span",
29
- metricDisplay: "span",
30
- overline: "span",
31
- micro: "span",
32
- microStrong: "span",
15
+ heading: "h3",
16
+ metric: "span",
33
17
  body: "p",
34
- caption: "span",
35
- helper: "small",
36
- sectionTitle: "h3"
18
+ caption: "span"
37
19
  };
38
20
  var textClassNameByTone = {
39
21
  default: "",
@@ -53,7 +35,7 @@ var textClassNameByAlign = {
53
35
  };
54
36
  function Text({
55
37
  as,
56
- variant = "micro",
38
+ variant = "caption",
57
39
  tone = "default",
58
40
  align,
59
41
  numeric = false,
@@ -68,15 +50,16 @@ function Text({
68
50
  return React.createElement(Component, {
69
51
  ...props,
70
52
  "data-animate-number": animateNumber || void 0,
53
+ "data-text-variant": variant,
54
+ "data-text-element": Component,
55
+ "data-mono": mono || void 0,
71
56
  className: cn(
72
57
  textClassNameByVariant[variant],
73
- variant === "sectionTitle" && Component === "h2" && "text-lg leading-snug",
74
58
  textClassNameByTone[tone],
75
59
  align && textClassNameByAlign[align],
76
60
  numeric && "tabular-nums",
77
- mono && "font-mono",
78
61
  truncate && "truncate"
79
- )
62
+ ) || void 0
80
63
  });
81
64
  }
82
65
  Text.displayName = "WarmText";
@@ -86,9 +69,9 @@ function StackedDisplay({
86
69
  presentation = "dashboard",
87
70
  secondLine
88
71
  }) {
89
- const firstLineClassName = presentation === "welcome" ? "block text-muted-foreground font-editorial" : "block text-foreground";
90
- const secondLineClassName = presentation === "welcome" ? "block text-foreground" : "block text-muted-foreground font-editorial";
91
- return /* @__PURE__ */ jsxs(Text, { as: "span", variant: "displayCompact", align, children: [
72
+ const firstLineClassName = presentation === "welcome" ? "block text-muted-foreground" : "block text-foreground";
73
+ const secondLineClassName = presentation === "welcome" ? "block text-foreground" : "block text-muted-foreground";
74
+ return /* @__PURE__ */ jsxs(Text, { as: "h2", variant: "heading", align, children: [
92
75
  /* @__PURE__ */ jsx("span", { className: firstLineClassName, children: firstLine }),
93
76
  /* @__PURE__ */ jsx("span", { className: secondLineClassName, children: secondLine })
94
77
  ] });
@@ -11,7 +11,9 @@ import {
11
11
  DropdownMenuRadioItem,
12
12
  DropdownMenuSeparator,
13
13
  DropdownMenuTrigger
14
- } from "./chunks/chunk-IOUIACNV.js";
14
+ } from "./chunks/chunk-2CO2BZLI.js";
15
+ import "./chunks/chunk-F74Y4WRX.js";
16
+ import "./chunks/chunk-JXSJTIX7.js";
15
17
  import "./chunks/chunk-VIB7OX7D.js";
16
18
  export {
17
19
  DropdownMenu,
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  StackedDisplay,
3
3
  Text
4
- } from "./chunks/chunk-CIYWFBEJ.js";
4
+ } from "./chunks/chunk-OU7YQUU2.js";
5
5
  import {
6
6
  Badge
7
- } from "./chunks/chunk-ICC7GQXS.js";
7
+ } from "./chunks/chunk-3AVFUXCV.js";
8
8
  import {
9
9
  Button,
10
10
  ButtonLink
11
- } from "./chunks/chunk-GKEYV2XW.js";
11
+ } from "./chunks/chunk-GY4XJ6EX.js";
12
12
  import {
13
13
  DropdownMenu,
14
14
  DropdownMenuCheckboxItem,
@@ -21,18 +21,18 @@ import {
21
21
  DropdownMenuRadioItem,
22
22
  DropdownMenuSeparator,
23
23
  DropdownMenuTrigger
24
- } from "./chunks/chunk-IOUIACNV.js";
24
+ } from "./chunks/chunk-2CO2BZLI.js";
25
25
  import {
26
26
  Logo,
27
27
  WarmBrandedLogoLink,
28
28
  WarmBrandedLogoMark,
29
29
  WarmBrandedLogoMarkStatic,
30
30
  WarmLogoIcon
31
- } from "./chunks/chunk-P3AJ2REZ.js";
31
+ } from "./chunks/chunk-B47G2BJV.js";
32
32
  import {
33
33
  ProductHeader,
34
34
  ProductHeaderBreadcrumb
35
- } from "./chunks/chunk-BG6USQSY.js";
35
+ } from "./chunks/chunk-IK5RHPN3.js";
36
36
  import {
37
37
  SheetClose,
38
38
  SheetContent,
@@ -41,7 +41,7 @@ import {
41
41
  SheetHeader,
42
42
  SheetTitle,
43
43
  SheetTrigger
44
- } from "./chunks/chunk-DHZWXYDX.js";
44
+ } from "./chunks/chunk-6V6K5G72.js";
45
45
  import {
46
46
  Sidebar,
47
47
  SidebarAccountTrigger,
@@ -60,10 +60,12 @@ import {
60
60
  SidebarProvider,
61
61
  SidebarTrigger,
62
62
  useSidebar
63
- } from "./chunks/chunk-LHHUTDZR.js";
63
+ } from "./chunks/chunk-HQTC542T.js";
64
+ import "./chunks/chunk-F74Y4WRX.js";
64
65
  import {
65
66
  Sheet
66
- } from "./chunks/chunk-YTDMREDR.js";
67
+ } from "./chunks/chunk-A2NLFM6R.js";
68
+ import "./chunks/chunk-JXSJTIX7.js";
67
69
  import "./chunks/chunk-VIB7OX7D.js";
68
70
  export {
69
71
  Badge,
package/dist/logo.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  WarmBrandedLogoMark,
5
5
  WarmBrandedLogoMarkStatic,
6
6
  WarmLogoIcon
7
- } from "./chunks/chunk-P3AJ2REZ.js";
7
+ } from "./chunks/chunk-B47G2BJV.js";
8
8
  import "./chunks/chunk-VIB7OX7D.js";
9
9
  export {
10
10
  Logo,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ProductHeader,
3
3
  ProductHeaderBreadcrumb
4
- } from "./chunks/chunk-BG6USQSY.js";
4
+ } from "./chunks/chunk-IK5RHPN3.js";
5
5
  import "./chunks/chunk-VIB7OX7D.js";
6
6
  export {
7
7
  ProductHeader,
@@ -1,17 +1,19 @@
1
- import type { ReactNode, Ref } from 'react';
1
+ import type { ReactNode, Ref } from "react";
2
2
 
3
- export type ProductHeaderVisibility = 'always' | 'container' | 'desktop';
3
+ export type ProductHeaderVisibility = "always" | "container" | "desktop";
4
4
 
5
5
  export interface ProductHeaderBreadcrumbProps {
6
- pageTitle?: string;
7
- productName?: string;
6
+ pageTitle?: string | undefined;
7
+ productName?: string | undefined;
8
+ homeHref?: string | undefined;
8
9
  }
9
10
 
10
11
  export interface ProductHeaderProps extends ProductHeaderBreadcrumbProps {
11
- actions?: ReactNode;
12
- actionsTargetRef?: Ref<HTMLDivElement>;
13
- desktopShell?: boolean;
14
- leading?: ReactNode;
15
- titleTargetRef?: Ref<HTMLDivElement>;
16
- visibility?: ProductHeaderVisibility;
12
+ actions?: ReactNode | undefined;
13
+ actionsTargetRef?: Ref<HTMLDivElement> | undefined;
14
+ desktopShell?: boolean | undefined;
15
+ hideBreadcrumb?: boolean | undefined;
16
+ leading?: ReactNode | undefined;
17
+ titleTargetRef?: Ref<HTMLDivElement> | undefined;
18
+ visibility?: ProductHeaderVisibility | undefined;
17
19
  }
package/dist/sheet.js CHANGED
@@ -6,10 +6,11 @@ import {
6
6
  SheetHeader,
7
7
  SheetTitle,
8
8
  SheetTrigger
9
- } from "./chunks/chunk-DHZWXYDX.js";
9
+ } from "./chunks/chunk-6V6K5G72.js";
10
10
  import {
11
11
  Sheet
12
- } from "./chunks/chunk-YTDMREDR.js";
12
+ } from "./chunks/chunk-A2NLFM6R.js";
13
+ import "./chunks/chunk-JXSJTIX7.js";
13
14
  import "./chunks/chunk-VIB7OX7D.js";
14
15
  export {
15
16
  Sheet,
package/dist/sidebar.js CHANGED
@@ -16,8 +16,10 @@ import {
16
16
  SidebarProvider,
17
17
  SidebarTrigger,
18
18
  useSidebar
19
- } from "./chunks/chunk-LHHUTDZR.js";
20
- import "./chunks/chunk-YTDMREDR.js";
19
+ } from "./chunks/chunk-HQTC542T.js";
20
+ import "./chunks/chunk-F74Y4WRX.js";
21
+ import "./chunks/chunk-A2NLFM6R.js";
22
+ import "./chunks/chunk-JXSJTIX7.js";
21
23
  import "./chunks/chunk-VIB7OX7D.js";
22
24
  export {
23
25
  Sidebar,
package/dist/text.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  StackedDisplay,
3
3
  Text
4
- } from "./chunks/chunk-CIYWFBEJ.js";
4
+ } from "./chunks/chunk-OU7YQUU2.js";
5
5
  import "./chunks/chunk-VIB7OX7D.js";
6
6
  export {
7
7
  StackedDisplay,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warmio/ui",
3
- "version": "1.3.0",
3
+ "version": "1.5.2",
4
4
  "description": "Portable, sealed React components for Warm products.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -17,7 +17,8 @@
17
17
  "files": [
18
18
  "dist",
19
19
  "types",
20
- "README.md"
20
+ "README.md",
21
+ "LICENSES"
21
22
  ],
22
23
  "exports": {
23
24
  ".": {
@@ -68,11 +69,12 @@
68
69
  },
69
70
  "peerDependencies": {
70
71
  "@base-ui/react": ">=1.6.0 <2.0.0",
71
- "@warmio/design": "1.5.0",
72
+ "@warmio/design": "1.10.0",
72
73
  "class-variance-authority": "^0.7.1",
73
74
  "clsx": "^2.1.1",
74
75
  "cuelume": "0.1.0",
75
76
  "lucide-react": ">=0.562.0 <2.0.0",
77
+ "motion": "^12.42.2",
76
78
  "react": ">=19.0.0",
77
79
  "react-dom": ">=19.0.0",
78
80
  "tailwind-merge": ">=3.6.0 <4.0.0"
package/types/badge.d.ts CHANGED
@@ -4,19 +4,27 @@ import type { AriaAttributes, ReactNode } from 'react';
4
4
  export type FeedbackTone = 'default' | 'info' | 'success' | 'warning' | 'destructive';
5
5
  export type FeedbackSize = 'sm' | 'default';
6
6
 
7
- export type BadgeProps = {
7
+ export type BadgeToneProps = {
8
8
  tone?: FeedbackTone;
9
9
  size?: FeedbackSize;
10
10
  shape?: 'pill' | 'circle';
11
+ emphasis?: 'subtle' | 'solid';
12
+ };
13
+
14
+ export type BadgeLayoutProps = {
11
15
  surface?: 'default' | 'floating';
12
16
  placement?: 'inline' | 'top-end';
13
- emphasis?: 'subtle' | 'solid';
14
17
  width?: 'auto' | 'metric' | 'compact';
15
18
  truncate?: boolean;
19
+ };
20
+
21
+ export type BadgeContentProps = {
16
22
  children?: ReactNode;
17
23
  numeric?: boolean;
18
24
  id?: string;
19
25
  'aria-label'?: AriaAttributes['aria-label'];
20
26
  };
21
27
 
28
+ export type BadgeProps = BadgeToneProps & BadgeLayoutProps & BadgeContentProps;
29
+
22
30
  export declare function Badge(props: BadgeProps): ReactNode;
package/types/index.d.ts CHANGED
@@ -1,8 +1,113 @@
1
- export * from './badge.js';
2
- export * from './button.js';
3
- export * from './dropdown-menu.js';
4
- export * from './logo.js';
5
- export * from './product-header.js';
6
- export * from './sheet.js';
7
- export * from './sidebar.js';
8
- export * from './text.js';
1
+ export { Badge, type BadgeProps, type FeedbackSize, type FeedbackTone } from './badge.js';
2
+ export {
3
+ Button,
4
+ ButtonLink,
5
+ type ButtonLinkProps,
6
+ type ButtonPresentation,
7
+ type ButtonProps,
8
+ type ButtonSize,
9
+ type ButtonVariant,
10
+ } from './button.js';
11
+ export {
12
+ DropdownMenu,
13
+ DropdownMenuCheckboxItem,
14
+ DropdownMenuContent,
15
+ DropdownMenuGroup,
16
+ DropdownMenuItem,
17
+ DropdownMenuLabel,
18
+ DropdownMenuLinkItem,
19
+ DropdownMenuRadioGroup,
20
+ DropdownMenuRadioItem,
21
+ DropdownMenuSeparator,
22
+ DropdownMenuTrigger,
23
+ type DropdownMenuAlign,
24
+ type DropdownMenuCheckboxItemProps,
25
+ type DropdownMenuContentProps,
26
+ type DropdownMenuContentSize,
27
+ type DropdownMenuContentSpacing,
28
+ type DropdownMenuGroupProps,
29
+ type DropdownMenuItemProps,
30
+ type DropdownMenuItemVariant,
31
+ type DropdownMenuLabelProps,
32
+ type DropdownMenuLinkItemProps,
33
+ type DropdownMenuRadioGroupProps,
34
+ type DropdownMenuRadioItemProps,
35
+ type DropdownMenuSeparatorProps,
36
+ type DropdownMenuSide,
37
+ type DropdownMenuTriggerProps,
38
+ } from './dropdown-menu.js';
39
+ export {
40
+ Logo,
41
+ WarmLogoIcon,
42
+ type LogoProps,
43
+ type WarmLogoIconProps,
44
+ type WarmLogoSize,
45
+ type WarmLogoTone,
46
+ } from './logo.js';
47
+ export {
48
+ ProductHeader,
49
+ ProductHeaderBreadcrumb,
50
+ type ProductHeaderBreadcrumbProps,
51
+ type ProductHeaderProps,
52
+ type ProductHeaderVisibility,
53
+ } from './product-header.js';
54
+ export {
55
+ Sheet,
56
+ SheetClose,
57
+ SheetContent,
58
+ SheetDescription,
59
+ SheetFooter,
60
+ SheetHeader,
61
+ SheetTitle,
62
+ SheetTrigger,
63
+ type SheetCloseProps,
64
+ type SheetContentProps,
65
+ type SheetFooterProps,
66
+ type SheetHeaderProps,
67
+ type SheetTitleProps,
68
+ type SheetTriggerProps,
69
+ } from './sheet.js';
70
+ export {
71
+ Sidebar,
72
+ SidebarAccountTrigger,
73
+ SidebarBrand,
74
+ SidebarContent,
75
+ SidebarFooter,
76
+ SidebarGroup,
77
+ SidebarGroupContent,
78
+ SidebarGroupLabel,
79
+ SidebarHeader,
80
+ SidebarInset,
81
+ SidebarMenu,
82
+ SidebarMenuBadge,
83
+ SidebarMenuButton,
84
+ SidebarMenuItem,
85
+ SidebarProvider,
86
+ useSidebar,
87
+ SidebarTrigger,
88
+ type SidebarAccountTriggerProps,
89
+ type SidebarBrandProps,
90
+ type SidebarContentProps,
91
+ type SidebarContextValue,
92
+ type SidebarFooterProps,
93
+ type SidebarGroupContentProps,
94
+ type SidebarGroupLabelProps,
95
+ type SidebarGroupProps,
96
+ type SidebarHeaderProps,
97
+ type SidebarInsetProps,
98
+ type SidebarMenuBadgeProps,
99
+ type SidebarMenuButtonProps,
100
+ type SidebarMenuItemProps,
101
+ type SidebarMenuProps,
102
+ type SidebarProps,
103
+ type SidebarProviderProps,
104
+ } from './sidebar.js';
105
+ export {
106
+ StackedDisplay,
107
+ Text,
108
+ type StackedDisplayProps,
109
+ type TextAlign,
110
+ type TextProps,
111
+ type TextTone,
112
+ type TextVariant,
113
+ } from './text.js';
@@ -11,6 +11,7 @@ export type SidebarProviderProps = WithoutChrome<ComponentProps<'div'>> & {
11
11
  onOpenChange?: (open: boolean) => void;
12
12
  forceIconAtTablet?: boolean;
13
13
  allowUserCollapse?: boolean;
14
+ expandOnHover?: boolean;
14
15
  presentation?: 'mockup' | 'preview';
15
16
  };
16
17
 
package/types/text.d.ts CHANGED
@@ -7,7 +7,10 @@ export type TextVariant =
7
7
  | 'display'
8
8
  | 'displayCompact'
9
9
  | 'displayHero'
10
+ | 'heading'
10
11
  | 'helper'
12
+ | 'lede'
13
+ | 'metric'
11
14
  | 'micro'
12
15
  | 'microStrong'
13
16
  | 'overline'
@@ -1,10 +0,0 @@
1
- // ../ui/src/warmio/button.tsx
2
- import {
3
- Button,
4
- ButtonLink
5
- } from "@warmio/design/button";
6
-
7
- export {
8
- Button,
9
- ButtonLink
10
- };