@lanfermann/ui 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.
@@ -2,7 +2,10 @@ import { HeadingProps } from "../heading/heading.js";
2
2
  import { TextProps } from "../text/text.js";
3
3
  import { ComponentProps } from "react";
4
4
  export type PageHeaderProps = ComponentProps<"div"> & {
5
- /** Opens the block with the 2px rule. Every section of a page has one; its opening has none. */
5
+ /**
6
+ * Opens the block with the 2px rule. Every section of a page has one; its opening has none, and
7
+ * neither has a section that a `Seam` opens.
8
+ */
6
9
  rule?: boolean;
7
10
  };
8
11
  /**
@@ -0,0 +1,153 @@
1
+ // src/components/seam/seam-outline.ts
2
+ /** The band above the edge, in px: it covers the last pixels of the part above, so they match. */
3
+ const BAND = 2;
4
+ /** At `--seam-scale: 1`: the edge steps 26px over a 35px run (about 37°), with bends of 24px. */
5
+ const DEPTH = 26;
6
+ const RUN = 35;
7
+ const BEND = 24;
8
+ /** Points per bend: enough that no facet shows at 3x. */
9
+ const STEPS = 8;
10
+ function unit(x, y) {
11
+ const length = Math.hypot(x, y);
12
+ return {
13
+ x: x / length,
14
+ y: y / length
15
+ };
16
+ }
17
+ const left = unit(-1, 0);
18
+ const downLeft = unit(-35, DEPTH);
19
+ const upLeft = unit(-35, -26);
20
+ /**
21
+ * Clockwise from the right end of the edge. The straight parts of the edge stand at `flat` (in px
22
+ * below the band's foot), the middle at `middle`; the slopes join them at ±(--seam-w + RUN).
23
+ */
24
+ const shapes = {
25
+ down: {
26
+ flat: 0,
27
+ corners: [
28
+ {
29
+ side: 1,
30
+ at: {
31
+ x: RUN,
32
+ y: 0
33
+ },
34
+ from: left,
35
+ to: downLeft
36
+ },
37
+ {
38
+ side: 1,
39
+ at: {
40
+ x: 0,
41
+ y: DEPTH
42
+ },
43
+ from: downLeft,
44
+ to: left
45
+ },
46
+ {
47
+ side: -1,
48
+ at: {
49
+ x: 0,
50
+ y: DEPTH
51
+ },
52
+ from: left,
53
+ to: upLeft
54
+ },
55
+ {
56
+ side: -1,
57
+ at: {
58
+ x: -35,
59
+ y: 0
60
+ },
61
+ from: upLeft,
62
+ to: left
63
+ }
64
+ ]
65
+ },
66
+ up: {
67
+ flat: DEPTH,
68
+ corners: [
69
+ {
70
+ side: 1,
71
+ at: {
72
+ x: RUN,
73
+ y: DEPTH
74
+ },
75
+ from: left,
76
+ to: upLeft
77
+ },
78
+ {
79
+ side: 1,
80
+ at: {
81
+ x: 0,
82
+ y: 0
83
+ },
84
+ from: upLeft,
85
+ to: left
86
+ },
87
+ {
88
+ side: -1,
89
+ at: {
90
+ x: 0,
91
+ y: 0
92
+ },
93
+ from: left,
94
+ to: downLeft
95
+ },
96
+ {
97
+ side: -1,
98
+ at: {
99
+ x: -35,
100
+ y: DEPTH
101
+ },
102
+ from: downLeft,
103
+ to: left
104
+ }
105
+ ]
106
+ }
107
+ };
108
+ /** How far a bend reaches from its corner along each line. */
109
+ const reach = BEND * Math.tan(Math.atan2(DEPTH, RUN) / 2);
110
+ const px = (value) => `${Math.round(value * 100) / 100}px`;
111
+ const y = (value) => `calc(${px(BAND)} + ${px(value)} * var(--seam-scale))`;
112
+ function point(side, x, at) {
113
+ return `calc(${side === 1 ? "50% + var(--seam-w)" : "50% - var(--seam-w)"} + ${px(x)} * var(--seam-scale)) ${y(at)}`;
114
+ }
115
+ function bend({ side, at, from, to }) {
116
+ const points = [];
117
+ for (let step = 0; step <= STEPS; step += 1) {
118
+ const s = step / STEPS;
119
+ const before = (1 - s) ** 2 * reach;
120
+ const after = s ** 2 * reach;
121
+ points.push(point(side, at.x - from.x * before + to.x * after, at.y - from.y * before + to.y * after));
122
+ }
123
+ return points;
124
+ }
125
+ function outline({ flat, corners }) {
126
+ const top = `-${px(BAND)}`;
127
+ return `polygon(${[
128
+ `0 ${top}`,
129
+ `100% ${top}`,
130
+ `100% ${y(flat)}`,
131
+ ...corners.flatMap(bend),
132
+ `0 ${y(flat)}`
133
+ ].join(", ")})`;
134
+ }
135
+ /** The polygon per direction (the width and the scale are CSS variables, so one string each). */
136
+ const seamOutline = {
137
+ down: outline(shapes.down),
138
+ up: outline(shapes.up)
139
+ };
140
+ /**
141
+ * Where the strip that holds the outline starts, measured from the seam (the top of the part
142
+ * below): so high that the straight parts of the edge land on the seam itself.
143
+ */
144
+ const seamLift = {
145
+ down: `-2px`,
146
+ up: `calc(-2px - ${DEPTH}px * var(--seam-scale))`
147
+ };
148
+ /**
149
+ * Half the tongue's narrow side as the outline reads it: the width asked for (`--seam-half`), but
150
+ * never so wide that a slope leaves the window or reaches into the page's gutter.
151
+ */
152
+ const seamHalfWidth = `min(var(--seam-half), 50% - ${RUN}px * var(--seam-scale) - var(--seam-gutter))`;
153
+ export { seamHalfWidth, seamLift, seamOutline };
@@ -0,0 +1,23 @@
1
+ import { VariantProps } from "class-variance-authority";
2
+ import { ComponentProps } from "react";
3
+ declare const seamVariants: (props?: ({
4
+ direction?: "down" | "up" | null | undefined;
5
+ above?: "ground" | "well" | "surface" | null | undefined;
6
+ below?: "ground" | "well" | "surface" | null | undefined;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
+ export type SeamProps = Omit<ComponentProps<"div">, "children"> & VariantProps<typeof seamVariants>;
9
+ /**
10
+ * Where one section of a website ends and the next begins, drawn as the edge of two plates: the
11
+ * plate above lies on the part below and throws a short shadow onto it. Across the content column
12
+ * its edge dips down as a tongue (`direction="down"`) or rises as a notch (`"up"`); choose per
13
+ * seam, by what the sections say. Put it between two `Section`s, in place of the rule that would
14
+ * open the second. It takes no room: it is drawn into the padding of the sections around it.
15
+ *
16
+ * Seams go with sections that alternate between the ground and the well (`bg-well` on every other
17
+ * one), so the two plates really differ. Tell the seam both colours: `above` fills the plate's
18
+ * face, `below` what shows in a notch. The page's closing (a `Cta`) needs none: its block closes
19
+ * the page by itself. It is decoration and is hidden from assistive technology: the sections carry
20
+ * the structure.
21
+ */
22
+ export declare function Seam({ direction, above, below, className, style, ...props }: SeamProps): import("react").JSX.Element;
23
+ export {};
@@ -0,0 +1,88 @@
1
+ import { cn } from "../../lib/cn.js";
2
+ import { seamHalfWidth, seamLift, seamOutline } from "./seam-outline.js";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { cva } from "class-variance-authority";
5
+ // src/components/seam/seam.tsx
6
+ const seamVariants = cva([
7
+ "pointer-events-none relative z-1 h-0",
8
+ "[--seam-half:36rem]",
9
+ "[--seam-gutter:1.25rem] [--seam-scale:0.7] sm:[--seam-gutter:2rem] sm:[--seam-scale:1]"
10
+ ], {
11
+ variants: {
12
+ direction: {
13
+ /** The plate above dips into the part below as a tongue. */
14
+ down: "",
15
+ /** The plate above has a notch, and the part below rises into it. */
16
+ up: ""
17
+ },
18
+ /** The colour of the part above: the plate's face. */
19
+ above: {
20
+ ground: "[--seam-face:var(--lf-ground)]",
21
+ well: "[--seam-face:var(--lf-well)]",
22
+ surface: "[--seam-face:var(--lf-surface)]"
23
+ },
24
+ /** The colour of the part below: a notch (`up`) reaches above the seam and shows it there. */
25
+ below: {
26
+ ground: "[--seam-below:var(--lf-ground)]",
27
+ well: "[--seam-below:var(--lf-well)]",
28
+ surface: "[--seam-below:var(--lf-surface)]"
29
+ }
30
+ },
31
+ defaultVariants: {
32
+ direction: "down",
33
+ above: "ground",
34
+ below: "ground"
35
+ }
36
+ });
37
+ const layer = "absolute inset-0";
38
+ const layers = [
39
+ "translate-y-px bg-(--depth-seam-edge) forced-colors:bg-[color:CanvasText]",
40
+ "bg-(--seam-face) bg-[linear-gradient(var(--depth-seam-lo),var(--depth-seam-lo))]",
41
+ "-translate-y-px bg-(--seam-face) forced-colors:bg-[color:Canvas]"
42
+ ];
43
+ /**
44
+ * Where one section of a website ends and the next begins, drawn as the edge of two plates: the
45
+ * plate above lies on the part below and throws a short shadow onto it. Across the content column
46
+ * its edge dips down as a tongue (`direction="down"`) or rises as a notch (`"up"`); choose per
47
+ * seam, by what the sections say. Put it between two `Section`s, in place of the rule that would
48
+ * open the second. It takes no room: it is drawn into the padding of the sections around it.
49
+ *
50
+ * Seams go with sections that alternate between the ground and the well (`bg-well` on every other
51
+ * one), so the two plates really differ. Tell the seam both colours: `above` fills the plate's
52
+ * face, `below` what shows in a notch. The page's closing (a `Cta`) needs none: its block closes
53
+ * the page by itself. It is decoration and is hidden from assistive technology: the sections carry
54
+ * the structure.
55
+ */
56
+ function Seam({ direction, above, below, className, style, ...props }) {
57
+ const way = direction ?? "down";
58
+ const clip = { clipPath: seamOutline[way] };
59
+ return /* @__PURE__ */ jsx("div", {
60
+ "aria-hidden": true,
61
+ "data-slot": "seam",
62
+ "data-direction": way,
63
+ className: cn(seamVariants({
64
+ direction,
65
+ above,
66
+ below
67
+ }), className),
68
+ style: {
69
+ "--seam-w": seamHalfWidth,
70
+ ...style
71
+ },
72
+ ...props,
73
+ children: /* @__PURE__ */ jsxs("div", {
74
+ "data-slot": "seam-strip",
75
+ className: "absolute inset-x-0 h-16 overflow-hidden",
76
+ style: { top: seamLift[way] },
77
+ children: [way === "up" && /* @__PURE__ */ jsx("div", { className: cn(layer, "bg-(--seam-below) forced-colors:bg-[color:Canvas]") }), /* @__PURE__ */ jsx("div", {
78
+ "data-slot": "seam-plate",
79
+ className: cn(layer, "depth-seam"),
80
+ children: layers.map((look) => /* @__PURE__ */ jsx("div", {
81
+ style: clip,
82
+ className: cn(layer, look)
83
+ }, look))
84
+ })]
85
+ })
86
+ });
87
+ }
88
+ export { Seam };
package/dist/index.d.ts CHANGED
@@ -56,6 +56,7 @@ import { Prose } from "./components/prose/prose.js";
56
56
  import { Quote, QuoteProps } from "./components/quote/quote.js";
57
57
  import { Radio, RadioGroup, RadioGroupProps, RadioProps } from "./components/radio/radio.js";
58
58
  import { ReferenceEntry, ReferenceEntryBody, ReferenceEntryHeader, ReferenceEntryMeta, ReferenceEntryName, ReferenceEntryTitle } from "./components/reference-entry/reference-entry.js";
59
+ import { Seam, SeamProps } from "./components/seam/seam.js";
59
60
  import { Section, SectionProps } from "./components/section/section.js";
60
61
  import { Segment, SegmentProps, SegmentedControl, SegmentedControlProps } from "./components/segmented-control/segmented-control.js";
61
62
  import { Select, SelectContent, SelectContentProps, SelectGroup, SelectGroupLabel, SelectItem, SelectItemProps, SelectOption, SelectOptionGroup, SelectProps, SelectSeparator, SelectTrigger, SelectTriggerProps } from "./components/select/select.js";
@@ -76,4 +77,4 @@ import { ToastOptions, ToastTone, Toaster, ToasterProps, toast, toastManager } f
76
77
  import { Tooltip, TooltipContent, TooltipContentProps, TooltipProvider, TooltipTrigger } from "./components/tooltip/tooltip.js";
77
78
  import { cn, mergeClassName } from "./lib/cn.js";
78
79
  import { SpringName, springs, transitions } from "./motion/springs.js";
79
- export { Accordion, AccordionItem, type AccordionItemProps, AccordionPanel, type AccordionPanelProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, AnchorHeading, type AnchorHeadingProps, Avatar, AvatarFallback, AvatarImage, type AvatarProps, Badge, type BadgeProps, BreadcrumbItem, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbPage, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, type ButtonVariants, Calendar, type CalendarProps, Callout, type CalloutProps, type CalloutTone, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroup, CheckboxGroupItems, type CheckboxGroupProps, type CheckboxProps, Code, CodeBlock, CodeBlockLive, type CodeBlockLiveProps, type CodeBlockProps, type CodeLanguage, type CodePiece, type CodeRole, type CodeTab, CodeTabs, type CodeTabsProps, Collapsible, CollapsiblePanel, type CollapsiblePanelProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Combobox, ComboboxCollection, ComboboxContent, type ComboboxContentProps, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, type ComboboxInputProps, ComboboxItem, type ComboboxItemProps, type ComboboxOption, type ComboboxOptionGroup, type ComboboxProps, ComboboxSeparator, Container, type ContainerProps, CopyPill, CopyPillMark, type CopyPillProps, Cta, CtaAction, type CtaActionProps, CtaActions, CtaMessage, type CtaMessageProps, type CtaProps, CtaText, CtaTitle, type CtaTone, DateField, type DateFieldProps, type DateRange, DateRangeField, type DateRangeFieldProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DocsLayout, DocsLayoutAside, DocsLayoutMain, DocsLayoutNav, Drawer, DrawerBody, DrawerClose, DrawerContent, type DrawerContentProps, DrawerDescription, DrawerFooter, DrawerHeader, type DrawerProps, type DrawerSide, DrawerTitle, DrawerTrigger, Field, FieldDescription, FieldError, FieldLabel, Fieldset, FieldsetLegend, Figure, FigureCaption, FigureFrame, Form, type FormProps, Ground, type GroundName, type GroundProps, Heading, type HeadingProps, Icon, type IconProps, type IconSvgElement, Input, InputGroup, InputGroupAddon, InputGroupButton, type InputGroupButtonProps, type InputGroupProps, type InputProps, Kbd, type LineSpec, Link, type LinkProps, type LinkVariants, Logomark, type LogomarkProps, Menu, MenuCheckboxItem, MenuContent, type MenuContentProps, MenuGroup, MenuGroupLabel, MenuItem, MenuLinkItem, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger, Meter, MeterLabel, type MeterProps, MeterTrack, MeterValue, NavigationMenu, NavigationMenuContent, type NavigationMenuEntryVariants, NavigationMenuItem, NavigationMenuLink, NavigationMenuLinkDescription, type NavigationMenuLinkProps, NavigationMenuLinkTitle, NavigationMenuList, type NavigationMenuProps, NavigationMenuTrigger, NumberField, NumberFieldDecrement, NumberFieldIncrement, NumberFieldInput, type NumberFieldProps, PageHeader, PageHeaderActions, PageHeaderLead, type PageHeaderProps, PageHeaderTitle, type PageHeaderTitleProps, Pager, PagerLink, type PagerLinkProps, type PagerProps, Parameter, ParameterList, type ParameterProps, Popover, PopoverClose, PopoverContent, type PopoverContentProps, PopoverDescription, PopoverTitle, PopoverTrigger, Progress, ProgressLabel, type ProgressProps, ProgressTrack, ProgressValue, Prose, Quote, type QuoteProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, ReferenceEntry, ReferenceEntryBody, ReferenceEntryHeader, ReferenceEntryMeta, ReferenceEntryName, ReferenceEntryTitle, Section, type SectionProps, Segment, type SegmentProps, SegmentedControl, type SegmentedControlProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectGroupLabel, SelectItem, type SelectItemProps, type SelectOption, type SelectOptionGroup, type SelectProps, SelectSeparator, SelectTrigger, type SelectTriggerProps, Separator, type SeparatorProps, SideNav, SideNavGroup, type SideNavGroupProps, SideNavLink, type SideNavLinkProps, type SideNavProps, SideNavSubLink, type SideNavSubLinkProps, SiteFooter, SiteFooterBrand, SiteFooterGroup, type SiteFooterGroupProps, SiteFooterLegal, SiteFooterLink, SiteFooterMain, SiteFooterNav, SiteHeader, SiteHeaderActions, SiteHeaderBrand, type SiteHeaderBrandProps, SiteHeaderMenu, SiteHeaderMenuGroup, type SiteHeaderMenuGroupProps, SiteHeaderMenuLink, type SiteHeaderMenuLinkProps, type SiteHeaderMenuProps, type SiteHeaderProps, Slider, SliderControl, type SliderControlProps, SliderLabel, type SliderProps, SliderThumb, type SliderThumbProps, SliderValue, Spinner, type SpinnerProps, type SpringName, Switch, type SwitchProps, Tab, Table, TableBody, TableCaption, TableCell, type TableCellProps, TableFooter, TableHead, type TableHeadProps, TableHeader, TableOfContents, type TableOfContentsProps, type TableProps, TableRow, type TableRowProps, TableSortButton, type TableSortButtonProps, Tabs, TabsList, TabsPanel, TabsPanels, type TabsPanelsProps, type TabsProps, Text, type TextProps, Textarea, type TextareaProps, TimeField, type TimeFieldProps, type ToastOptions, type ToastTone, Toaster, type ToasterProps, type TocItem, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, Wordmark, type WordmarkProps, buttonVariants, cn, containerVariants, linkVariants, mergeClassName, navigationMenuEntryVariants, siteFooterLinkClass, springs, toast, toastManager, transitions, useGround };
80
+ export { Accordion, AccordionItem, type AccordionItemProps, AccordionPanel, type AccordionPanelProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, AnchorHeading, type AnchorHeadingProps, Avatar, AvatarFallback, AvatarImage, type AvatarProps, Badge, type BadgeProps, BreadcrumbItem, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbPage, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, type ButtonVariants, Calendar, type CalendarProps, Callout, type CalloutProps, type CalloutTone, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroup, CheckboxGroupItems, type CheckboxGroupProps, type CheckboxProps, Code, CodeBlock, CodeBlockLive, type CodeBlockLiveProps, type CodeBlockProps, type CodeLanguage, type CodePiece, type CodeRole, type CodeTab, CodeTabs, type CodeTabsProps, Collapsible, CollapsiblePanel, type CollapsiblePanelProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Combobox, ComboboxCollection, ComboboxContent, type ComboboxContentProps, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, type ComboboxInputProps, ComboboxItem, type ComboboxItemProps, type ComboboxOption, type ComboboxOptionGroup, type ComboboxProps, ComboboxSeparator, Container, type ContainerProps, CopyPill, CopyPillMark, type CopyPillProps, Cta, CtaAction, type CtaActionProps, CtaActions, CtaMessage, type CtaMessageProps, type CtaProps, CtaText, CtaTitle, type CtaTone, DateField, type DateFieldProps, type DateRange, DateRangeField, type DateRangeFieldProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DocsLayout, DocsLayoutAside, DocsLayoutMain, DocsLayoutNav, Drawer, DrawerBody, DrawerClose, DrawerContent, type DrawerContentProps, DrawerDescription, DrawerFooter, DrawerHeader, type DrawerProps, type DrawerSide, DrawerTitle, DrawerTrigger, Field, FieldDescription, FieldError, FieldLabel, Fieldset, FieldsetLegend, Figure, FigureCaption, FigureFrame, Form, type FormProps, Ground, type GroundName, type GroundProps, Heading, type HeadingProps, Icon, type IconProps, type IconSvgElement, Input, InputGroup, InputGroupAddon, InputGroupButton, type InputGroupButtonProps, type InputGroupProps, type InputProps, Kbd, type LineSpec, Link, type LinkProps, type LinkVariants, Logomark, type LogomarkProps, Menu, MenuCheckboxItem, MenuContent, type MenuContentProps, MenuGroup, MenuGroupLabel, MenuItem, MenuLinkItem, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger, Meter, MeterLabel, type MeterProps, MeterTrack, MeterValue, NavigationMenu, NavigationMenuContent, type NavigationMenuEntryVariants, NavigationMenuItem, NavigationMenuLink, NavigationMenuLinkDescription, type NavigationMenuLinkProps, NavigationMenuLinkTitle, NavigationMenuList, type NavigationMenuProps, NavigationMenuTrigger, NumberField, NumberFieldDecrement, NumberFieldIncrement, NumberFieldInput, type NumberFieldProps, PageHeader, PageHeaderActions, PageHeaderLead, type PageHeaderProps, PageHeaderTitle, type PageHeaderTitleProps, Pager, PagerLink, type PagerLinkProps, type PagerProps, Parameter, ParameterList, type ParameterProps, Popover, PopoverClose, PopoverContent, type PopoverContentProps, PopoverDescription, PopoverTitle, PopoverTrigger, Progress, ProgressLabel, type ProgressProps, ProgressTrack, ProgressValue, Prose, Quote, type QuoteProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, ReferenceEntry, ReferenceEntryBody, ReferenceEntryHeader, ReferenceEntryMeta, ReferenceEntryName, ReferenceEntryTitle, Seam, type SeamProps, Section, type SectionProps, Segment, type SegmentProps, SegmentedControl, type SegmentedControlProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectGroupLabel, SelectItem, type SelectItemProps, type SelectOption, type SelectOptionGroup, type SelectProps, SelectSeparator, SelectTrigger, type SelectTriggerProps, Separator, type SeparatorProps, SideNav, SideNavGroup, type SideNavGroupProps, SideNavLink, type SideNavLinkProps, type SideNavProps, SideNavSubLink, type SideNavSubLinkProps, SiteFooter, SiteFooterBrand, SiteFooterGroup, type SiteFooterGroupProps, SiteFooterLegal, SiteFooterLink, SiteFooterMain, SiteFooterNav, SiteHeader, SiteHeaderActions, SiteHeaderBrand, type SiteHeaderBrandProps, SiteHeaderMenu, SiteHeaderMenuGroup, type SiteHeaderMenuGroupProps, SiteHeaderMenuLink, type SiteHeaderMenuLinkProps, type SiteHeaderMenuProps, type SiteHeaderProps, Slider, SliderControl, type SliderControlProps, SliderLabel, type SliderProps, SliderThumb, type SliderThumbProps, SliderValue, Spinner, type SpinnerProps, type SpringName, Switch, type SwitchProps, Tab, Table, TableBody, TableCaption, TableCell, type TableCellProps, TableFooter, TableHead, type TableHeadProps, TableHeader, TableOfContents, type TableOfContentsProps, type TableProps, TableRow, type TableRowProps, TableSortButton, type TableSortButtonProps, Tabs, TabsList, TabsPanel, TabsPanels, type TabsPanelsProps, type TabsProps, Text, type TextProps, Textarea, type TextareaProps, TimeField, type TimeFieldProps, type ToastOptions, type ToastTone, Toaster, type ToasterProps, type TocItem, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, Wordmark, type WordmarkProps, buttonVariants, cn, containerVariants, linkVariants, mergeClassName, navigationMenuEntryVariants, siteFooterLinkClass, springs, toast, toastManager, transitions, useGround };
package/dist/index.js CHANGED
@@ -54,6 +54,7 @@ import { Prose } from "./components/prose/prose.js";
54
54
  import { Quote } from "./components/quote/quote.js";
55
55
  import { Radio, RadioGroup } from "./components/radio/radio.js";
56
56
  import { ReferenceEntry, ReferenceEntryBody, ReferenceEntryHeader, ReferenceEntryMeta, ReferenceEntryName, ReferenceEntryTitle } from "./components/reference-entry/reference-entry.js";
57
+ import { Seam } from "./components/seam/seam.js";
57
58
  import { Section } from "./components/section/section.js";
58
59
  import { Segment, SegmentedControl } from "./components/segmented-control/segmented-control.js";
59
60
  import { Select, SelectContent, SelectGroup, SelectGroupLabel, SelectItem, SelectSeparator, SelectTrigger } from "./components/select/select.js";
@@ -74,4 +75,4 @@ import { Toaster, toast, toastManager } from "./components/toast/toast.js";
74
75
  import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./components/tooltip/tooltip.js";
75
76
  import { cn, mergeClassName } from "./lib/cn.js";
76
77
  import { springs, transitions } from "./motion/springs.js";
77
- export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AnchorHeading, Avatar, AvatarFallback, AvatarImage, Badge, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, Breadcrumbs, Button, Calendar, Callout, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroup, CheckboxGroupItems, Code, CodeBlock, CodeBlockLive, CodeTabs, Collapsible, CollapsiblePanel, CollapsibleTrigger, Combobox, ComboboxCollection, ComboboxContent, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxSeparator, Container, CopyPill, CopyPillMark, Cta, CtaAction, CtaActions, CtaMessage, CtaText, CtaTitle, DateField, DateRangeField, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DocsLayout, DocsLayoutAside, DocsLayoutMain, DocsLayoutNav, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, Field, FieldDescription, FieldError, FieldLabel, Fieldset, FieldsetLegend, Figure, FigureCaption, FigureFrame, Form, Ground, Heading, Icon, Input, InputGroup, InputGroupAddon, InputGroupButton, Kbd, Link, Logomark, Menu, MenuCheckboxItem, MenuContent, MenuGroup, MenuGroupLabel, MenuItem, MenuLinkItem, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger, Meter, MeterLabel, MeterTrack, MeterValue, NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuLinkDescription, NavigationMenuLinkTitle, NavigationMenuList, NavigationMenuTrigger, NumberField, NumberFieldDecrement, NumberFieldIncrement, NumberFieldInput, PageHeader, PageHeaderActions, PageHeaderLead, PageHeaderTitle, Pager, PagerLink, Parameter, ParameterList, Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger, Progress, ProgressLabel, ProgressTrack, ProgressValue, Prose, Quote, Radio, RadioGroup, ReferenceEntry, ReferenceEntryBody, ReferenceEntryHeader, ReferenceEntryMeta, ReferenceEntryName, ReferenceEntryTitle, Section, Segment, SegmentedControl, Select, SelectContent, SelectGroup, SelectGroupLabel, SelectItem, SelectSeparator, SelectTrigger, Separator, SideNav, SideNavGroup, SideNavLink, SideNavSubLink, SiteFooter, SiteFooterBrand, SiteFooterGroup, SiteFooterLegal, SiteFooterLink, SiteFooterMain, SiteFooterNav, SiteHeader, SiteHeaderActions, SiteHeaderBrand, SiteHeaderMenu, SiteHeaderMenuGroup, SiteHeaderMenuLink, Slider, SliderControl, SliderLabel, SliderThumb, SliderValue, Spinner, Switch, Tab, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableOfContents, TableRow, TableSortButton, Tabs, TabsList, TabsPanel, TabsPanels, Text, Textarea, TimeField, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Wordmark, buttonVariants, cn, containerVariants, linkVariants, mergeClassName, navigationMenuEntryVariants, siteFooterLinkClass, springs, toast, toastManager, transitions, useGround };
78
+ export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AnchorHeading, Avatar, AvatarFallback, AvatarImage, Badge, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, Breadcrumbs, Button, Calendar, Callout, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroup, CheckboxGroupItems, Code, CodeBlock, CodeBlockLive, CodeTabs, Collapsible, CollapsiblePanel, CollapsibleTrigger, Combobox, ComboboxCollection, ComboboxContent, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxSeparator, Container, CopyPill, CopyPillMark, Cta, CtaAction, CtaActions, CtaMessage, CtaText, CtaTitle, DateField, DateRangeField, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DocsLayout, DocsLayoutAside, DocsLayoutMain, DocsLayoutNav, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, Field, FieldDescription, FieldError, FieldLabel, Fieldset, FieldsetLegend, Figure, FigureCaption, FigureFrame, Form, Ground, Heading, Icon, Input, InputGroup, InputGroupAddon, InputGroupButton, Kbd, Link, Logomark, Menu, MenuCheckboxItem, MenuContent, MenuGroup, MenuGroupLabel, MenuItem, MenuLinkItem, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger, Meter, MeterLabel, MeterTrack, MeterValue, NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuLinkDescription, NavigationMenuLinkTitle, NavigationMenuList, NavigationMenuTrigger, NumberField, NumberFieldDecrement, NumberFieldIncrement, NumberFieldInput, PageHeader, PageHeaderActions, PageHeaderLead, PageHeaderTitle, Pager, PagerLink, Parameter, ParameterList, Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger, Progress, ProgressLabel, ProgressTrack, ProgressValue, Prose, Quote, Radio, RadioGroup, ReferenceEntry, ReferenceEntryBody, ReferenceEntryHeader, ReferenceEntryMeta, ReferenceEntryName, ReferenceEntryTitle, Seam, Section, Segment, SegmentedControl, Select, SelectContent, SelectGroup, SelectGroupLabel, SelectItem, SelectSeparator, SelectTrigger, Separator, SideNav, SideNavGroup, SideNavLink, SideNavSubLink, SiteFooter, SiteFooterBrand, SiteFooterGroup, SiteFooterLegal, SiteFooterLink, SiteFooterMain, SiteFooterNav, SiteHeader, SiteHeaderActions, SiteHeaderBrand, SiteHeaderMenu, SiteHeaderMenuGroup, SiteHeaderMenuLink, Slider, SliderControl, SliderLabel, SliderThumb, SliderValue, Spinner, Switch, Tab, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableOfContents, TableRow, TableSortButton, Tabs, TabsList, TabsPanel, TabsPanels, Text, Textarea, TimeField, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Wordmark, buttonVariants, cn, containerVariants, linkVariants, mergeClassName, navigationMenuEntryVariants, siteFooterLinkClass, springs, toast, toastManager, transitions, useGround };
package/dist/lib/cn.js CHANGED
@@ -22,6 +22,7 @@ const depthNames = [
22
22
  "floating",
23
23
  "overlay",
24
24
  "bar",
25
+ "seam",
25
26
  "none"
26
27
  ];
27
28
  const depthToneNames = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanfermann/ui",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Lanfermann design system components for Next.js + Tailwind CSS v4, built on Base UI.",
5
5
  "license": "MIT",
6
6
  "author": "Justin Lanfermann",
@@ -3,7 +3,8 @@
3
3
  * component follows. The look is "Fase" (see DESIGN.md): glossy faces, 1px edges in the fill's
4
4
  * own hue, a light top edge, short soft shadows.
5
5
  *
6
- * The rule: only what moves casts a shadow.
6
+ * The rule: only what moves casts a shadow. The one exception is the seam, where a website's
7
+ * sections lie on each other as plates (Justin, 2026-11-16).
7
8
  * Panel content and ground flat; rules and lines, no shadow
8
9
  * Fitting what a hand presses depth-raised (+ -hover, depth-pressed)
9
10
  * Plug a fitting seated in a socket depth-plug (a checked box)
@@ -11,6 +12,7 @@
11
12
  * Card one object you act on depth-card
12
13
  * Sheet what floats temporarily depth-floating, depth-overlay
13
14
  * Bar the site's bar over the page depth-bar
15
+ * Seam where two sections of a site meet depth-seam (components/seam)
14
16
  *
15
17
  * One light, from above, tinted: edges and contact shadows come from Ink (19 18 28), ambient
16
18
  * shadows from Ink mixed 30% toward Indigo (42 37 82), never neutral black.
@@ -141,6 +143,12 @@
141
143
  --depth-bar-hi: rgb(255 255 255 / 0.7);
142
144
  --depth-bar-near: rgb(19 18 28 / 0.05);
143
145
  --depth-bar-far: rgb(42 37 82 / 0.1);
146
+
147
+ /* the seam between two sections: a quiet edge, a short shadow from the plate on top */
148
+ --depth-seam-edge: rgb(19 18 28 / 0.1);
149
+ --depth-seam-lo: rgb(19 18 28 / 0.035);
150
+ --depth-seam-contact: rgb(19 18 28 / 0.06);
151
+ --depth-seam-ambient: rgb(42 37 82 / 0.1);
144
152
  }
145
153
 
146
154
  .dark,
@@ -213,6 +221,11 @@
213
221
  --depth-bar-hi: rgb(255 255 255 / 0.06);
214
222
  --depth-bar-near: rgb(8 7 12 / 0.4);
215
223
  --depth-bar-far: rgb(8 7 12 / 0.35);
224
+
225
+ --depth-seam-edge: rgb(8 7 12 / 0.7);
226
+ --depth-seam-lo: rgb(8 7 12 / 0.2);
227
+ --depth-seam-contact: rgb(8 7 12 / 0.5);
228
+ --depth-seam-ambient: rgb(8 7 12 / 0.35);
216
229
  }
217
230
 
218
231
  [data-theme="indigo"] {
@@ -288,6 +301,11 @@
288
301
  --depth-bar-hi: rgb(255 255 255 / 0.1);
289
302
  --depth-bar-near: rgb(19 18 28 / 0.14);
290
303
  --depth-bar-far: rgb(19 18 28 / 0.2);
304
+
305
+ --depth-seam-edge: rgb(19 18 28 / 0.28);
306
+ --depth-seam-lo: rgb(19 18 28 / 0.1);
307
+ --depth-seam-contact: rgb(19 18 28 / 0.18);
308
+ --depth-seam-ambient: rgb(19 18 28 / 0.22);
291
309
  }
292
310
 
293
311
  @theme inline {
@@ -459,6 +477,11 @@
459
477
  outline-offset: -1px;
460
478
  }
461
479
  }
480
+ /* The shadow a seam's upper plate throws: a filter, because the plate is a clipped shape. */
481
+ @utility depth-seam {
482
+ filter: drop-shadow(0 1px 1px var(--depth-seam-contact))
483
+ drop-shadow(0 4px 6px var(--depth-seam-ambient));
484
+ }
462
485
  @utility depth-none {
463
486
  @apply shadow-none inset-shadow-none;
464
487
  }