@lanfermann/ui 0.0.0-stage → 0.1.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/LICENSE +24 -0
- package/README.md +17 -2
- package/TRADEMARK.md +10 -0
- package/brand/app-icon.svg +1 -0
- package/brand/avatar.svg +1 -0
- package/brand/favicon.svg +1 -0
- package/dist/components/accordion/accordion.d.ts +26 -0
- package/dist/components/accordion/accordion.js +78 -0
- package/dist/components/alert/alert.d.ts +19 -0
- package/dist/components/alert/alert.js +68 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +20 -0
- package/dist/components/alert-dialog/alert-dialog.js +75 -0
- package/dist/components/anchor-heading/anchor-heading.d.ts +19 -0
- package/dist/components/anchor-heading/anchor-heading.js +39 -0
- package/dist/components/avatar/avatar.d.ts +14 -0
- package/dist/components/avatar/avatar.js +42 -0
- package/dist/components/badge/badge.d.ts +12 -0
- package/dist/components/badge/badge.js +27 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +23 -0
- package/dist/components/breadcrumbs/breadcrumbs.js +63 -0
- package/dist/components/button/button-variants.d.ts +15 -0
- package/dist/components/button/button-variants.js +76 -0
- package/dist/components/button/button.d.ts +25 -0
- package/dist/components/button/button.js +50 -0
- package/dist/components/calendar/calendar-selection.js +216 -0
- package/dist/components/calendar/calendar.d.ts +44 -0
- package/dist/components/calendar/calendar.js +208 -0
- package/dist/components/callout/callout.d.ts +21 -0
- package/dist/components/callout/callout.js +75 -0
- package/dist/components/card/card.d.ts +16 -0
- package/dist/components/card/card.js +53 -0
- package/dist/components/checkbox/checkbox.d.ts +9 -0
- package/dist/components/checkbox/checkbox.js +33 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts +18 -0
- package/dist/components/checkbox-group/checkbox-group.js +33 -0
- package/dist/components/code/code.d.ts +7 -0
- package/dist/components/code/code.js +16 -0
- package/dist/components/code-block/code-block-frame.js +146 -0
- package/dist/components/code-block/code-block-live.d.ts +45 -0
- package/dist/components/code-block/code-block-live.js +51 -0
- package/dist/components/code-block/code-block.d.ts +36 -0
- package/dist/components/code-block/code-block.js +51 -0
- package/dist/components/code-block/code-copy.d.ts +12 -0
- package/dist/components/code-block/code-copy.js +71 -0
- package/dist/components/code-block/code-lines-view.d.ts +16 -0
- package/dist/components/code-block/code-lines-view.js +48 -0
- package/dist/components/code-block/code-lines.js +17 -0
- package/dist/components/code-block/code-scroll.js +29 -0
- package/dist/components/code-block/code-surface.js +13 -0
- package/dist/components/code-block/code-tabs-frame.js +85 -0
- package/dist/components/code-block/code-tabs-store.js +25 -0
- package/dist/components/code-block/code-tabs.d.ts +28 -0
- package/dist/components/code-block/code-tabs.js +29 -0
- package/dist/components/code-block/highlight.d.ts +34 -0
- package/dist/components/code-block/highlight.js +258 -0
- package/dist/components/code-block/lines.d.ts +5 -0
- package/dist/components/code-block/lines.js +40 -0
- package/dist/components/collapsible/collapsible.d.ts +19 -0
- package/dist/components/collapsible/collapsible.js +54 -0
- package/dist/components/combobox/combobox.d.ts +84 -0
- package/dist/components/combobox/combobox.js +169 -0
- package/dist/components/container/container.d.ts +16 -0
- package/dist/components/container/container.js +30 -0
- package/dist/components/copy-pill/copy-pill.d.ts +52 -0
- package/dist/components/copy-pill/copy-pill.js +232 -0
- package/dist/components/cta/cta.d.ts +109 -0
- package/dist/components/cta/cta.js +375 -0
- package/dist/components/date-field/date-field.d.ts +40 -0
- package/dist/components/date-field/date-field.js +99 -0
- package/dist/components/date-range-field/date-range-field.d.ts +41 -0
- package/dist/components/date-range-field/date-range-field.js +155 -0
- package/dist/components/dialog/dialog.d.ts +29 -0
- package/dist/components/dialog/dialog.js +96 -0
- package/dist/components/docs-layout/docs-layout.d.ts +17 -0
- package/dist/components/docs-layout/docs-layout.js +46 -0
- package/dist/components/drawer/drawer.d.ts +39 -0
- package/dist/components/drawer/drawer.js +181 -0
- package/dist/components/field/field.d.ts +18 -0
- package/dist/components/field/field.js +77 -0
- package/dist/components/fieldset/fieldset.d.ts +8 -0
- package/dist/components/fieldset/fieldset.js +25 -0
- package/dist/components/figure/figure.d.ts +14 -0
- package/dist/components/figure/figure.js +35 -0
- package/dist/components/form/form.d.ts +31 -0
- package/dist/components/form/form.js +55 -0
- package/dist/components/ground/ground.d.ts +20 -0
- package/dist/components/ground/ground.js +31 -0
- package/dist/components/heading/heading.d.ts +16 -0
- package/dist/components/heading/heading.js +36 -0
- package/dist/components/icon/icon.d.ts +22 -0
- package/dist/components/icon/icon.js +24 -0
- package/dist/components/input/input.d.ts +19 -0
- package/dist/components/input/input.js +46 -0
- package/dist/components/input-group/input-group.d.ts +34 -0
- package/dist/components/input-group/input-group.js +61 -0
- package/dist/components/kbd/kbd.d.ts +6 -0
- package/dist/components/kbd/kbd.js +15 -0
- package/dist/components/link/link-variants.d.ts +13 -0
- package/dist/components/link/link-variants.js +27 -0
- package/dist/components/link/link.d.ts +9 -0
- package/dist/components/link/link.js +18 -0
- package/dist/components/logo/logo-paths.js +22 -0
- package/dist/components/logo/logomark.d.ts +19 -0
- package/dist/components/logo/logomark.js +49 -0
- package/dist/components/logo/wordmark.d.ts +35 -0
- package/dist/components/logo/wordmark.js +48 -0
- package/dist/components/menu/menu.d.ts +26 -0
- package/dist/components/menu/menu.js +132 -0
- package/dist/components/meter/meter.d.ts +29 -0
- package/dist/components/meter/meter.js +68 -0
- package/dist/components/navigation-menu/navigation-menu-variants.d.ts +12 -0
- package/dist/components/navigation-menu/navigation-menu-variants.js +18 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +42 -0
- package/dist/components/navigation-menu/navigation-menu.js +128 -0
- package/dist/components/number-field/number-field.d.ts +32 -0
- package/dist/components/number-field/number-field.js +85 -0
- package/dist/components/page-header/page-header.d.ts +27 -0
- package/dist/components/page-header/page-header.js +48 -0
- package/dist/components/pager/pager.d.ts +24 -0
- package/dist/components/pager/pager.js +51 -0
- package/dist/components/parameter-list/parameter-list.d.ts +34 -0
- package/dist/components/parameter-list/parameter-list.js +70 -0
- package/dist/components/popover/popover.d.ts +15 -0
- package/dist/components/popover/popover.js +64 -0
- package/dist/components/progress/progress.d.ts +19 -0
- package/dist/components/progress/progress.js +67 -0
- package/dist/components/prose/prose.d.ts +13 -0
- package/dist/components/prose/prose.js +22 -0
- package/dist/components/quote/quote.d.ts +21 -0
- package/dist/components/quote/quote.js +46 -0
- package/dist/components/radio/radio.d.ts +12 -0
- package/dist/components/radio/radio.js +37 -0
- package/dist/components/reference-entry/reference-entry.d.ts +25 -0
- package/dist/components/reference-entry/reference-entry.js +66 -0
- package/dist/components/section/section.d.ts +13 -0
- package/dist/components/section/section.js +30 -0
- package/dist/components/segmented-control/segmented-control.d.ts +42 -0
- package/dist/components/segmented-control/segmented-control.js +413 -0
- package/dist/components/select/select.d.ts +70 -0
- package/dist/components/select/select.js +189 -0
- package/dist/components/separator/separator.d.ts +12 -0
- package/dist/components/separator/separator.js +29 -0
- package/dist/components/side-nav/side-nav.d.ts +48 -0
- package/dist/components/side-nav/side-nav.js +89 -0
- package/dist/components/site-footer/site-footer-floor.js +48 -0
- package/dist/components/site-footer/site-footer.d.ts +38 -0
- package/dist/components/site-footer/site-footer.js +96 -0
- package/dist/components/site-header/site-header.d.ts +77 -0
- package/dist/components/site-header/site-header.js +214 -0
- package/dist/components/slider/slider.d.ts +42 -0
- package/dist/components/slider/slider.js +279 -0
- package/dist/components/spinner/spinner.d.ts +15 -0
- package/dist/components/spinner/spinner.js +34 -0
- package/dist/components/switch/switch.d.ts +8 -0
- package/dist/components/switch/switch.js +28 -0
- package/dist/components/table/table.d.ts +83 -0
- package/dist/components/table/table.js +123 -0
- package/dist/components/table-of-contents/table-of-contents.d.ts +32 -0
- package/dist/components/table-of-contents/table-of-contents.js +187 -0
- package/dist/components/tabs/tabs.d.ts +28 -0
- package/dist/components/tabs/tabs.js +124 -0
- package/dist/components/text/text.d.ts +16 -0
- package/dist/components/text/text.js +63 -0
- package/dist/components/textarea/textarea.d.ts +19 -0
- package/dist/components/textarea/textarea.js +30 -0
- package/dist/components/time-field/time-field.d.ts +40 -0
- package/dist/components/time-field/time-field.js +123 -0
- package/dist/components/toast/toast.d.ts +55 -0
- package/dist/components/toast/toast.js +129 -0
- package/dist/components/tooltip/tooltip.d.ts +16 -0
- package/dist/components/tooltip/tooltip.js +41 -0
- package/dist/index.d.ts +79 -0
- package/dist/index.js +77 -0
- package/dist/internal/arrow.js +41 -0
- package/dist/internal/disclosure.js +20 -0
- package/dist/internal/field-context.js +21 -0
- package/dist/internal/field.d.ts +23 -0
- package/dist/internal/field.js +49 -0
- package/dist/internal/glyphs.js +84 -0
- package/dist/internal/iso-date.d.ts +2 -0
- package/dist/internal/iso-date.js +268 -0
- package/dist/internal/overlay.js +40 -0
- package/dist/internal/picker-sheet.js +74 -0
- package/dist/internal/popup.js +37 -0
- package/dist/internal/range-shape.js +295 -0
- package/dist/internal/reduced-motion.js +19 -0
- package/dist/internal/scroll-edges.js +45 -0
- package/dist/internal/trough.js +39 -0
- package/dist/internal/typed-input.d.ts +16 -0
- package/dist/internal/typed-input.js +133 -0
- package/dist/lib/cn.d.ts +11 -0
- package/dist/lib/cn.js +98 -0
- package/dist/motion/inertia.js +111 -0
- package/dist/motion/spring-step.js +35 -0
- package/dist/motion/springs.d.ts +78 -0
- package/dist/motion/springs.js +81 -0
- package/package.json +107 -4
- package/src/styles/base.css +93 -0
- package/src/styles/calendar.css +117 -0
- package/src/styles/code.css +252 -0
- package/src/styles/density.css +53 -0
- package/src/styles/depth.css +501 -0
- package/src/styles/grounds.css +191 -0
- package/src/styles/marks.css +50 -0
- package/src/styles/motion.css +55 -0
- package/src/styles/motion.generated.css +101 -0
- package/src/styles/prose.css +252 -0
- package/src/styles/radius.css +20 -0
- package/src/styles/segmented.css +208 -0
- package/src/styles/slider.css +110 -0
- package/src/styles/status.css +108 -0
- package/src/styles/tabs.css +39 -0
- package/src/styles/toast.css +106 -0
- package/src/styles/touch.css +41 -0
- package/src/styles/type.css +54 -0
- package/src/styles.css +38 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { cn } from "../../lib/cn.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
// src/components/text/text.tsx
|
|
5
|
+
const textVariants = cva("", {
|
|
6
|
+
variants: {
|
|
7
|
+
size: {
|
|
8
|
+
/** 12px: legal lines only. */
|
|
9
|
+
xs: "text-xs",
|
|
10
|
+
/** 13.5px: helper text, captions, metadata. */
|
|
11
|
+
sm: "text-sm",
|
|
12
|
+
/** 16px: body. */
|
|
13
|
+
base: "text-base",
|
|
14
|
+
/** 20px: a lead paragraph under a title. */
|
|
15
|
+
lg: "text-lg"
|
|
16
|
+
},
|
|
17
|
+
tone: {
|
|
18
|
+
body: "text-fg-body",
|
|
19
|
+
strong: "text-fg",
|
|
20
|
+
muted: "text-fg-muted",
|
|
21
|
+
danger: "text-danger",
|
|
22
|
+
warning: "text-warning",
|
|
23
|
+
success: "text-success"
|
|
24
|
+
},
|
|
25
|
+
weight: {
|
|
26
|
+
regular: "font-normal",
|
|
27
|
+
medium: "font-medium",
|
|
28
|
+
semibold: "font-semibold"
|
|
29
|
+
},
|
|
30
|
+
/** For strings a machine reads: IBAN, URL, code. */
|
|
31
|
+
mono: {
|
|
32
|
+
true: "font-mono",
|
|
33
|
+
false: ""
|
|
34
|
+
},
|
|
35
|
+
/** For digits that change in place or sit in a numeric column. */
|
|
36
|
+
numeric: {
|
|
37
|
+
true: "tabular-nums",
|
|
38
|
+
false: ""
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
defaultVariants: {
|
|
42
|
+
size: "base",
|
|
43
|
+
tone: "body",
|
|
44
|
+
weight: "regular",
|
|
45
|
+
mono: false,
|
|
46
|
+
numeric: false
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
/** Running text on the type scale. For titles use `Heading`. */
|
|
50
|
+
function Text({ as: Tag = "p", size, tone, weight, mono, numeric, className, ...props }) {
|
|
51
|
+
return /* @__PURE__ */ jsx(Tag, {
|
|
52
|
+
"data-slot": "text",
|
|
53
|
+
className: cn(textVariants({
|
|
54
|
+
size,
|
|
55
|
+
tone,
|
|
56
|
+
weight,
|
|
57
|
+
mono,
|
|
58
|
+
numeric
|
|
59
|
+
}), className),
|
|
60
|
+
...props
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
export { Text };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { Field } from "@base-ui/react/field";
|
|
3
|
+
export type TextareaProps = Omit<ComponentProps<"textarea">, "className" | "defaultValue"> & {
|
|
4
|
+
className?: Field.Control.Props["className"];
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
/** Called with the text on every change. */
|
|
7
|
+
onValueChange?: (value: string) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Grows with its content instead of scrolling, up to about twelve lines. Browsers without
|
|
10
|
+
* `field-sizing` keep the fixed height and the resize handle.
|
|
11
|
+
*/
|
|
12
|
+
autoGrow?: boolean;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A socket for more than one line: a message, a note, a description. Same field as `Input`, with
|
|
16
|
+
* the reading line height. It resizes vertically only. Inside a `Field` it picks up the label,
|
|
17
|
+
* description and validity.
|
|
18
|
+
*/
|
|
19
|
+
export declare function Textarea({ className, rows, autoGrow, onValueChange, ...props }: TextareaProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { mergeClassName } from "../../lib/cn.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Field } from "@base-ui/react/field";
|
|
5
|
+
// src/components/textarea/textarea.tsx
|
|
6
|
+
/**
|
|
7
|
+
* A socket for more than one line: a message, a note, a description. Same field as `Input`, with
|
|
8
|
+
* the reading line height. It resizes vertically only. Inside a `Field` it picks up the label,
|
|
9
|
+
* description and validity.
|
|
10
|
+
*/
|
|
11
|
+
function Textarea({ className, rows = 3, autoGrow = false, onValueChange, ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(Field.Control, {
|
|
13
|
+
"data-slot": "textarea",
|
|
14
|
+
render: /* @__PURE__ */ jsx("textarea", { rows }),
|
|
15
|
+
onValueChange,
|
|
16
|
+
className: mergeClassName([
|
|
17
|
+
"block w-full min-w-0 resize-y rounded-md bg-surface text-control leading-normal text-fg depth-field resize-grip pointer-coarse:text-base",
|
|
18
|
+
"border-r-[3px] border-b-[3px] border-transparent pt-1.5 pr-[calc(var(--field-pad-md)-3px)] pb-[3px] pl-(--field-pad-md) forced-colors:border-[color:Canvas]",
|
|
19
|
+
"min-h-(--control-md)",
|
|
20
|
+
"placeholder:text-fg-muted placeholder:italic",
|
|
21
|
+
"transition-[box-shadow,background-color] spring-snap",
|
|
22
|
+
"focus:depth-field-focus focus:outline-hidden",
|
|
23
|
+
"data-invalid:depth-field-invalid data-invalid:focus:depth-field-invalid",
|
|
24
|
+
"data-disabled:resize-none data-disabled:bg-disabled data-disabled:depth-flat data-disabled:text-on-disabled",
|
|
25
|
+
autoGrow && "field-sizing-content max-h-80 resize-none"
|
|
26
|
+
], className),
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
export { Textarea };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { FieldSize } from "../../internal/field.js";
|
|
2
|
+
import { HourCycle } from "../../internal/iso-date.js";
|
|
3
|
+
import { TypedInputProps } from "../../internal/typed-input.js";
|
|
4
|
+
export type TimeFieldProps = Omit<TypedInputProps, "text" | "onTextChange" | "onCommit" | "formValue" | "problem" | "size" | "min" | "max" | "step"> & {
|
|
5
|
+
/** Classes for the field as a whole, e.g. its width. */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** The time as `"09:30"`, or `""` for none (controlled). */
|
|
8
|
+
value?: string;
|
|
9
|
+
/** The time at first (uncontrolled). */
|
|
10
|
+
defaultValue?: string;
|
|
11
|
+
/** Reports the time as `"09:30"`, `""` when the field is empty or cannot be read. */
|
|
12
|
+
onValueChange?: (value: string) => void;
|
|
13
|
+
/** The earliest and the latest time that can be chosen, as `"08:00"`. */
|
|
14
|
+
min?: string;
|
|
15
|
+
max?: string;
|
|
16
|
+
/** How many minutes lie between the times offered in the list. Any time can still be typed. */
|
|
17
|
+
step?: number;
|
|
18
|
+
/**
|
|
19
|
+
* The clock the time is written and offered on: 24 hours ("16:30", the default) or 12 with AM
|
|
20
|
+
* and PM ("4:30 PM"). Either way both can be typed, and the value stays `"16:30"`.
|
|
21
|
+
*/
|
|
22
|
+
hourCycle?: HourCycle;
|
|
23
|
+
/** Whether the list of times is open at first. */
|
|
24
|
+
defaultOpen?: boolean;
|
|
25
|
+
/** The size of the field, from the density. */
|
|
26
|
+
size?: FieldSize;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* A time of day on its own: "Beginn", "Rückruf ab". For a time on a certain day, use a
|
|
30
|
+
* `DateField` with `time`.
|
|
31
|
+
*
|
|
32
|
+
* It is typed, or picked: a press on the field opens the times of the day, a quarter of an hour
|
|
33
|
+
* apart, and typing narrows them to what the text could become ("9" offers 09:00 to 09:45). Any
|
|
34
|
+
* time can be typed, also one that is not on the list; it is read when the field is left: `9`,
|
|
35
|
+
* `930`, `9:30`, `9.30`, `9 Uhr`, `9 pm` all become a time. On a phone it brings up the digits.
|
|
36
|
+
*
|
|
37
|
+
* `hourCycle={12}` writes and offers the times with AM and PM. The value is `"09:30"` either
|
|
38
|
+
* way: 24 hours, no zone. Inside a `Form`, `name` submits exactly that.
|
|
39
|
+
*/
|
|
40
|
+
export declare function TimeField({ value, defaultValue, onValueChange, min, max, step, hourCycle, defaultOpen, size, className, disabled, readOnly, ...props }: TimeFieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useGround } from "../ground/ground.js";
|
|
3
|
+
import { Icon } from "../icon/icon.js";
|
|
4
|
+
import { InputGroupAddon } from "../input-group/input-group.js";
|
|
5
|
+
import { fieldShell, fieldShellSize, focusFieldControl } from "../../internal/field.js";
|
|
6
|
+
import { FieldShellContext } from "../../internal/field-context.js";
|
|
7
|
+
import { formatTime, parseGermanTime, timeMatches, timesOfDay } from "../../internal/iso-date.js";
|
|
8
|
+
import { listItem, listSheet, popupMotion } from "../../internal/popup.js";
|
|
9
|
+
import { TypedInput, useTypedValue } from "../../internal/typed-input.js";
|
|
10
|
+
import { cn } from "../../lib/cn.js";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { Clock01Icon } from "@hugeicons/core-free-icons";
|
|
13
|
+
import { useRef } from "react";
|
|
14
|
+
import { Autocomplete } from "@base-ui/react/autocomplete";
|
|
15
|
+
// src/components/time-field/time-field.tsx
|
|
16
|
+
/**
|
|
17
|
+
* A time of day on its own: "Beginn", "Rückruf ab". For a time on a certain day, use a
|
|
18
|
+
* `DateField` with `time`.
|
|
19
|
+
*
|
|
20
|
+
* It is typed, or picked: a press on the field opens the times of the day, a quarter of an hour
|
|
21
|
+
* apart, and typing narrows them to what the text could become ("9" offers 09:00 to 09:45). Any
|
|
22
|
+
* time can be typed, also one that is not on the list; it is read when the field is left: `9`,
|
|
23
|
+
* `930`, `9:30`, `9.30`, `9 Uhr`, `9 pm` all become a time. On a phone it brings up the digits.
|
|
24
|
+
*
|
|
25
|
+
* `hourCycle={12}` writes and offers the times with AM and PM. The value is `"09:30"` either
|
|
26
|
+
* way: 24 hours, no zone. Inside a `Form`, `name` submits exactly that.
|
|
27
|
+
*/
|
|
28
|
+
function TimeField({ value, defaultValue, onValueChange, min, max, step = 15, hourCycle = 24, defaultOpen, size = "md", className, disabled, readOnly, ...props }) {
|
|
29
|
+
const ground = useGround();
|
|
30
|
+
const list = useRef(null);
|
|
31
|
+
const written = (time) => formatTime(time, hourCycle);
|
|
32
|
+
const typed = useTypedValue({
|
|
33
|
+
value,
|
|
34
|
+
defaultValue,
|
|
35
|
+
onValueChange,
|
|
36
|
+
show: (time) => formatTime(time, hourCycle),
|
|
37
|
+
read: (text) => {
|
|
38
|
+
const time = parseGermanTime(text);
|
|
39
|
+
if (!time) return { problem: `Bitte geben Sie eine Uhrzeit ein, zum Beispiel ${written("09:30")}.` };
|
|
40
|
+
if ((!min || time >= min) && (!max || time <= max)) return time;
|
|
41
|
+
if (min && max) return { problem: `Bitte wählen Sie eine Uhrzeit zwischen ${written(min)} und ${written(max)}.` };
|
|
42
|
+
return { problem: min ? `Bitte wählen Sie eine Uhrzeit ab ${written(min)}.` : `Bitte wählen Sie eine Uhrzeit bis ${written(max)}.` };
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
return /* @__PURE__ */ jsxs(Autocomplete.Root, {
|
|
46
|
+
items: timesOfDay(step, min, max),
|
|
47
|
+
itemToStringValue: written,
|
|
48
|
+
value: typed.text,
|
|
49
|
+
onValueChange: (text, details) => {
|
|
50
|
+
if (details.reason === "escape-key") return;
|
|
51
|
+
const taken = details.reason === "item-press" ? parseGermanTime(text) : void 0;
|
|
52
|
+
if (taken) typed.set(taken);
|
|
53
|
+
else typed.setText(text);
|
|
54
|
+
},
|
|
55
|
+
filter: (time, query) => query === written(typed.value) || timeMatches(time, query, hourCycle),
|
|
56
|
+
openOnInputClick: true,
|
|
57
|
+
defaultOpen,
|
|
58
|
+
disabled,
|
|
59
|
+
readOnly,
|
|
60
|
+
onOpenChangeComplete: (open) => {
|
|
61
|
+
const box = list.current;
|
|
62
|
+
if (!open || !box) return;
|
|
63
|
+
const from = parseGermanTime(typed.text) || typed.value || "09:00";
|
|
64
|
+
const rows = [...box.querySelectorAll("[data-time]")];
|
|
65
|
+
const row = rows.find((time) => (time.dataset.time ?? "") >= from) ?? rows.at(-1);
|
|
66
|
+
if (!row) return;
|
|
67
|
+
const away = row.getBoundingClientRect().top - box.getBoundingClientRect().top;
|
|
68
|
+
box.scrollTop += away - (box.clientHeight - row.offsetHeight) / 2;
|
|
69
|
+
},
|
|
70
|
+
children: [/* @__PURE__ */ jsx(FieldShellContext, {
|
|
71
|
+
value: true,
|
|
72
|
+
children: /* @__PURE__ */ jsxs(Autocomplete.InputGroup, {
|
|
73
|
+
"data-slot": "time-field",
|
|
74
|
+
"data-size": size,
|
|
75
|
+
className: cn(fieldShell, fieldShellSize[size], className),
|
|
76
|
+
onMouseDown: focusFieldControl,
|
|
77
|
+
children: [/* @__PURE__ */ jsx(Autocomplete.Input, { render: /* @__PURE__ */ jsx(TypedInput, {
|
|
78
|
+
inputMode: "numeric",
|
|
79
|
+
placeholder: `z. B. ${written("09:30")}`,
|
|
80
|
+
text: typed.text,
|
|
81
|
+
onTextChange: typed.setText,
|
|
82
|
+
onCommit: typed.commit,
|
|
83
|
+
formValue: typed.value,
|
|
84
|
+
problem: typed.problem,
|
|
85
|
+
readOnly,
|
|
86
|
+
className: "tabular-nums",
|
|
87
|
+
...props,
|
|
88
|
+
"data-slot": "time-field-input"
|
|
89
|
+
}) }), /* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(Icon, {
|
|
90
|
+
icon: Clock01Icon,
|
|
91
|
+
size: size === "sm" ? 14 : 16
|
|
92
|
+
}) })]
|
|
93
|
+
})
|
|
94
|
+
}), /* @__PURE__ */ jsx(Autocomplete.Portal, { children: /* @__PURE__ */ jsx(Autocomplete.Positioner, {
|
|
95
|
+
"data-slot": "time-field-positioner",
|
|
96
|
+
side: "bottom",
|
|
97
|
+
align: "start",
|
|
98
|
+
sideOffset: 6,
|
|
99
|
+
className: "z-50 outline-none data-empty:hidden",
|
|
100
|
+
children: /* @__PURE__ */ jsx(Autocomplete.Popup, {
|
|
101
|
+
"data-slot": "time-field-list",
|
|
102
|
+
"data-theme": ground,
|
|
103
|
+
className: cn(listSheet, popupMotion, "min-w-(--anchor-width)"),
|
|
104
|
+
children: /* @__PURE__ */ jsx(Autocomplete.List, {
|
|
105
|
+
ref: list,
|
|
106
|
+
"aria-label": "Uhrzeiten",
|
|
107
|
+
className: "max-h-[min(15rem,calc(var(--available-height)-0.5rem))] scroll-py-1 overflow-y-auto overscroll-contain outline-none",
|
|
108
|
+
children: (time) => /* @__PURE__ */ jsxs(Autocomplete.Item, {
|
|
109
|
+
value: time,
|
|
110
|
+
"data-slot": "time-field-option",
|
|
111
|
+
"data-time": time,
|
|
112
|
+
className: cn(listItem, "tabular-nums"),
|
|
113
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
114
|
+
"aria-hidden": true,
|
|
115
|
+
className: cn("mark", time === typed.value ? "mark-on" : "mark-quiet")
|
|
116
|
+
}), written(time)]
|
|
117
|
+
}, time)
|
|
118
|
+
})
|
|
119
|
+
})
|
|
120
|
+
}) })]
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
export { TimeField };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
/** The one stack of the app. `toast()` adds to it from anywhere, also from outside React. */
|
|
3
|
+
export declare const toastManager: import("@base-ui/react").ToastManager<any>;
|
|
4
|
+
export type ToastTone = "neutral" | "info" | "success" | "warning" | "danger";
|
|
5
|
+
export type ToastOptions = {
|
|
6
|
+
/** What happened, as a short sentence ("Angebot gesendet."). */
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
/** One more line, if the title does not say enough. */
|
|
9
|
+
description?: ReactNode;
|
|
10
|
+
/** Adds the status icon. The words still carry the message. */
|
|
11
|
+
tone?: ToastTone;
|
|
12
|
+
/** One action, usually the way back ("Rückgängig"). */
|
|
13
|
+
action?: {
|
|
14
|
+
label: ReactNode;
|
|
15
|
+
onClick: () => void;
|
|
16
|
+
};
|
|
17
|
+
/** Milliseconds until it leaves by itself; 0 keeps it until dismissed. */
|
|
18
|
+
timeout?: number;
|
|
19
|
+
/** Reuse an id to update a toast in place instead of adding one. */
|
|
20
|
+
id?: string;
|
|
21
|
+
};
|
|
22
|
+
declare function show(options: ToastOptions | string): string;
|
|
23
|
+
/**
|
|
24
|
+
* Confirms what just happened, in the system's own voice: `toast("Entwurf gespeichert.")` or
|
|
25
|
+
* `toast({ title, description, tone, action })`. It returns the toast's id.
|
|
26
|
+
*
|
|
27
|
+
* A toast leaves by itself, so it never carries anything a person must read or act on: that
|
|
28
|
+
* belongs on the page (an `Alert`) or in a dialog. Render one `<Toaster />` near the app root.
|
|
29
|
+
*/
|
|
30
|
+
export declare const toast: typeof show & {
|
|
31
|
+
/** Closes one toast, or all of them without an id. */
|
|
32
|
+
dismiss: (id?: string) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Follows a promise through loading, success and error in one toast:
|
|
35
|
+
* `toast.promise(send(), { loading: "Wird gesendet …", success: "Gesendet.", error: "…" })`.
|
|
36
|
+
*/
|
|
37
|
+
promise: <Value, T extends any = any>(promiseValue: Promise<Value>, options: import("@base-ui/react").ToastManagerPromiseOptions<Value, T>) => Promise<Value>;
|
|
38
|
+
};
|
|
39
|
+
export type ToasterProps = {
|
|
40
|
+
/** How many toasts show at once; older ones wait behind. */
|
|
41
|
+
limit?: number;
|
|
42
|
+
/** Milliseconds a toast stays unless it sets its own `timeout`. */
|
|
43
|
+
timeout?: number;
|
|
44
|
+
/** The accessible name of each toast's close button. */
|
|
45
|
+
closeLabel?: string;
|
|
46
|
+
/** The accessible name of the stack, the landmark F6 jumps to. */
|
|
47
|
+
label?: string;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Where toasts appear: bottom right, newest in front, older ones peeking out behind it. Hovering
|
|
51
|
+
* or focusing the stack (F6 jumps to it) spreads it into a list and holds the timers. A toast can
|
|
52
|
+
* be swiped away to the right or downwards.
|
|
53
|
+
*/
|
|
54
|
+
export declare function Toaster({ limit, timeout, closeLabel, label }: ToasterProps): import("react").JSX.Element;
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Button } from "../button/button.js";
|
|
3
|
+
import { Icon } from "../icon/icon.js";
|
|
4
|
+
import { Spinner } from "../spinner/spinner.js";
|
|
5
|
+
import { CloseGlyph } from "../../internal/glyphs.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Alert02Icon, AlertCircleIcon, CheckmarkCircle02Icon, InformationCircleIcon } from "@hugeicons/core-free-icons";
|
|
8
|
+
import { Toast } from "@base-ui/react/toast";
|
|
9
|
+
// src/components/toast/toast.tsx
|
|
10
|
+
/** The one stack of the app. `toast()` adds to it from anywhere, also from outside React. */
|
|
11
|
+
const toastManager = Toast.createToastManager();
|
|
12
|
+
function show(options) {
|
|
13
|
+
const { title, description, tone, action, timeout, id } = typeof options === "string" ? { title: options } : options;
|
|
14
|
+
return toastManager.add({
|
|
15
|
+
id,
|
|
16
|
+
title,
|
|
17
|
+
description,
|
|
18
|
+
type: tone,
|
|
19
|
+
timeout,
|
|
20
|
+
priority: tone === "danger" ? "high" : "low",
|
|
21
|
+
actionProps: action ? {
|
|
22
|
+
children: action.label,
|
|
23
|
+
onClick: action.onClick
|
|
24
|
+
} : void 0
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Confirms what just happened, in the system's own voice: `toast("Entwurf gespeichert.")` or
|
|
29
|
+
* `toast({ title, description, tone, action })`. It returns the toast's id.
|
|
30
|
+
*
|
|
31
|
+
* A toast leaves by itself, so it never carries anything a person must read or act on: that
|
|
32
|
+
* belongs on the page (an `Alert`) or in a dialog. Render one `<Toaster />` near the app root.
|
|
33
|
+
*/
|
|
34
|
+
const toast = Object.assign(show, {
|
|
35
|
+
/** Closes one toast, or all of them without an id. */
|
|
36
|
+
dismiss: (id) => toastManager.close(id),
|
|
37
|
+
/**
|
|
38
|
+
* Follows a promise through loading, success and error in one toast:
|
|
39
|
+
* `toast.promise(send(), { loading: "Wird gesendet …", success: "Gesendet.", error: "…" })`.
|
|
40
|
+
*/
|
|
41
|
+
promise: toastManager.promise
|
|
42
|
+
});
|
|
43
|
+
function ToneIcon({ type }) {
|
|
44
|
+
switch (type) {
|
|
45
|
+
case "loading": return /* @__PURE__ */ jsx(Spinner, { className: "mt-[3px] text-fg-muted" });
|
|
46
|
+
case "success": return /* @__PURE__ */ jsx(Icon, {
|
|
47
|
+
icon: CheckmarkCircle02Icon,
|
|
48
|
+
size: 18,
|
|
49
|
+
className: "mt-0.5 text-success"
|
|
50
|
+
});
|
|
51
|
+
case "warning": return /* @__PURE__ */ jsx(Icon, {
|
|
52
|
+
icon: Alert02Icon,
|
|
53
|
+
size: 18,
|
|
54
|
+
className: "mt-0.5 text-warning"
|
|
55
|
+
});
|
|
56
|
+
case "danger":
|
|
57
|
+
case "error": return /* @__PURE__ */ jsx(Icon, {
|
|
58
|
+
icon: AlertCircleIcon,
|
|
59
|
+
size: 18,
|
|
60
|
+
className: "mt-0.5 text-danger"
|
|
61
|
+
});
|
|
62
|
+
case "info": return /* @__PURE__ */ jsx(Icon, {
|
|
63
|
+
icon: InformationCircleIcon,
|
|
64
|
+
size: 18,
|
|
65
|
+
className: "mt-0.5 text-fg"
|
|
66
|
+
});
|
|
67
|
+
default: return null;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function ToastList({ closeLabel }) {
|
|
71
|
+
const { toasts } = Toast.useToastManager();
|
|
72
|
+
return toasts.map((item) => /* @__PURE__ */ jsx(Toast.Root, {
|
|
73
|
+
toast: item,
|
|
74
|
+
"data-slot": "toast",
|
|
75
|
+
"data-theme": "ink",
|
|
76
|
+
className: "toast-stack rounded-xl bg-sheet text-fg depth-floating focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent",
|
|
77
|
+
children: /* @__PURE__ */ jsxs(Toast.Content, {
|
|
78
|
+
"data-slot": "toast-content",
|
|
79
|
+
className: "flex items-start gap-3 overflow-hidden py-3 pr-2.5 pl-3.5 transition-opacity duration-200 ease-out data-behind:opacity-0 data-expanded:opacity-100",
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ jsx(ToneIcon, { type: item.type }),
|
|
82
|
+
/* @__PURE__ */ jsxs("div", {
|
|
83
|
+
className: "flex min-w-0 flex-1 flex-col gap-0.5 py-px",
|
|
84
|
+
children: [item.title && /* @__PURE__ */ jsx(Toast.Title, {
|
|
85
|
+
"data-slot": "toast-title",
|
|
86
|
+
className: "text-control font-semibold text-fg"
|
|
87
|
+
}), item.description && /* @__PURE__ */ jsx(Toast.Description, {
|
|
88
|
+
"data-slot": "toast-description",
|
|
89
|
+
className: "text-sm text-fg-body"
|
|
90
|
+
})]
|
|
91
|
+
}),
|
|
92
|
+
item.actionProps && /* @__PURE__ */ jsx(Toast.Action, {
|
|
93
|
+
"data-slot": "toast-action",
|
|
94
|
+
render: /* @__PURE__ */ jsx(Button, { size: "sm" })
|
|
95
|
+
}),
|
|
96
|
+
/* @__PURE__ */ jsx(Toast.Close, {
|
|
97
|
+
"data-slot": "toast-close",
|
|
98
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
99
|
+
iconOnly: true,
|
|
100
|
+
size: "sm",
|
|
101
|
+
variant: "quiet",
|
|
102
|
+
"aria-label": closeLabel,
|
|
103
|
+
className: "-mt-0.5 text-fg-muted"
|
|
104
|
+
}),
|
|
105
|
+
children: /* @__PURE__ */ jsx(CloseGlyph, {})
|
|
106
|
+
})
|
|
107
|
+
]
|
|
108
|
+
})
|
|
109
|
+
}, item.id));
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Where toasts appear: bottom right, newest in front, older ones peeking out behind it. Hovering
|
|
113
|
+
* or focusing the stack (F6 jumps to it) spreads it into a list and holds the timers. A toast can
|
|
114
|
+
* be swiped away to the right or downwards.
|
|
115
|
+
*/
|
|
116
|
+
function Toaster({ limit = 3, timeout = 5e3, closeLabel = "Schließen", label = "Benachrichtigungen" }) {
|
|
117
|
+
return /* @__PURE__ */ jsx(Toast.Provider, {
|
|
118
|
+
toastManager,
|
|
119
|
+
limit,
|
|
120
|
+
timeout,
|
|
121
|
+
children: /* @__PURE__ */ jsx(Toast.Portal, { children: /* @__PURE__ */ jsx(Toast.Viewport, {
|
|
122
|
+
"data-slot": "toast-viewport",
|
|
123
|
+
"aria-label": label,
|
|
124
|
+
className: "fixed right-[max(1rem,env(safe-area-inset-right))] bottom-[max(1rem,env(safe-area-inset-bottom))] z-50 w-[calc(100vw-2rem)] sm:right-[max(1.5rem,env(safe-area-inset-right))] sm:bottom-[max(1.5rem,env(safe-area-inset-bottom))] sm:w-90",
|
|
125
|
+
children: /* @__PURE__ */ jsx(ToastList, { closeLabel })
|
|
126
|
+
}) })
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
export { Toaster, toast, toastManager };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
|
|
2
|
+
/**
|
|
3
|
+
* Put one around a toolbar or the app: once a tooltip has shown, its neighbours open at once
|
|
4
|
+
* instead of each waiting out the delay again.
|
|
5
|
+
*/
|
|
6
|
+
export declare const TooltipProvider: import("react").FC<import("@base-ui/react").TooltipProviderProps>;
|
|
7
|
+
/**
|
|
8
|
+
* A label for a control that has none on screen, such as an icon button. Nobody must miss
|
|
9
|
+
* anything by never seeing it: it does not appear on touch devices, and the trigger still needs
|
|
10
|
+
* its own `aria-label`. For an explanation, use a `Popover` or write it on the page.
|
|
11
|
+
*/
|
|
12
|
+
export declare const Tooltip: <Payload>(props: Tooltip$1.Root.Props<Payload>) => React.JSX.Element;
|
|
13
|
+
export declare function TooltipTrigger(props: Tooltip$1.Trigger.Props): import("react").JSX.Element;
|
|
14
|
+
export type TooltipContentProps = Tooltip$1.Popup.Props & Pick<Tooltip$1.Positioner.Props, "side" | "align" | "sideOffset" | "alignOffset">;
|
|
15
|
+
/** The system's own voice: it speaks on Ink, on every ground. A few words, no full stop. */
|
|
16
|
+
export declare function TooltipContent({ className, side, align, sideOffset, alignOffset, ...props }: TooltipContentProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { popupMotion } from "../../internal/popup.js";
|
|
3
|
+
import { mergeClassName } from "../../lib/cn.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
|
|
6
|
+
// src/components/tooltip/tooltip.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Put one around a toolbar or the app: once a tooltip has shown, its neighbours open at once
|
|
9
|
+
* instead of each waiting out the delay again.
|
|
10
|
+
*/
|
|
11
|
+
const TooltipProvider = Tooltip$1.Provider;
|
|
12
|
+
/**
|
|
13
|
+
* A label for a control that has none on screen, such as an icon button. Nobody must miss
|
|
14
|
+
* anything by never seeing it: it does not appear on touch devices, and the trigger still needs
|
|
15
|
+
* its own `aria-label`. For an explanation, use a `Popover` or write it on the page.
|
|
16
|
+
*/
|
|
17
|
+
const Tooltip = Tooltip$1.Root;
|
|
18
|
+
function TooltipTrigger(props) {
|
|
19
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Trigger, {
|
|
20
|
+
"data-slot": "tooltip-trigger",
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/** The system's own voice: it speaks on Ink, on every ground. A few words, no full stop. */
|
|
25
|
+
function TooltipContent({ className, side = "top", align = "center", sideOffset = 6, alignOffset, ...props }) {
|
|
26
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
|
|
27
|
+
"data-slot": "tooltip-positioner",
|
|
28
|
+
side,
|
|
29
|
+
align,
|
|
30
|
+
sideOffset,
|
|
31
|
+
alignOffset,
|
|
32
|
+
className: "z-50",
|
|
33
|
+
children: /* @__PURE__ */ jsx(Tooltip$1.Popup, {
|
|
34
|
+
"data-slot": "tooltip-content",
|
|
35
|
+
"data-theme": "ink",
|
|
36
|
+
className: mergeClassName(["max-w-64 rounded-sm bg-sheet px-2 py-1 text-sm font-medium text-fg depth-floating", popupMotion], className),
|
|
37
|
+
...props
|
|
38
|
+
})
|
|
39
|
+
}) });
|
|
40
|
+
}
|
|
41
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Accordion, AccordionItem, AccordionItemProps, AccordionPanel, AccordionPanelProps, AccordionProps, AccordionTrigger, AccordionTriggerProps } from "./components/accordion/accordion.js";
|
|
2
|
+
import { Alert, AlertDescription, AlertProps, AlertTitle } from "./components/alert/alert.js";
|
|
3
|
+
import { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "./components/alert-dialog/alert-dialog.js";
|
|
4
|
+
import { AnchorHeading, AnchorHeadingProps } from "./components/anchor-heading/anchor-heading.js";
|
|
5
|
+
import { Avatar, AvatarFallback, AvatarImage, AvatarProps } from "./components/avatar/avatar.js";
|
|
6
|
+
import { Badge, BadgeProps } from "./components/badge/badge.js";
|
|
7
|
+
import { BreadcrumbItem, BreadcrumbLink, BreadcrumbLinkProps, BreadcrumbPage, Breadcrumbs, BreadcrumbsProps } from "./components/breadcrumbs/breadcrumbs.js";
|
|
8
|
+
import { Button, ButtonProps } from "./components/button/button.js";
|
|
9
|
+
import { ButtonVariants, buttonVariants } from "./components/button/button-variants.js";
|
|
10
|
+
import { Calendar, CalendarProps, DateRange } from "./components/calendar/calendar.js";
|
|
11
|
+
import { Callout, CalloutProps, CalloutTone } from "./components/callout/callout.js";
|
|
12
|
+
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./components/card/card.js";
|
|
13
|
+
import { Checkbox, CheckboxProps } from "./components/checkbox/checkbox.js";
|
|
14
|
+
import { CheckboxGroup, CheckboxGroupItems, CheckboxGroupProps } from "./components/checkbox-group/checkbox-group.js";
|
|
15
|
+
import { Code } from "./components/code/code.js";
|
|
16
|
+
import { CodeBlock, CodeBlockProps } from "./components/code-block/code-block.js";
|
|
17
|
+
import { CodeBlockLive, CodeBlockLiveProps, CodePiece, CodeRole } from "./components/code-block/code-block-live.js";
|
|
18
|
+
import { CodeTab, CodeTabs, CodeTabsProps } from "./components/code-block/code-tabs.js";
|
|
19
|
+
import { CodeLanguage } from "./components/code-block/highlight.js";
|
|
20
|
+
import { LineSpec } from "./components/code-block/lines.js";
|
|
21
|
+
import { Collapsible, CollapsiblePanel, CollapsiblePanelProps, CollapsibleProps, CollapsibleTrigger, CollapsibleTriggerProps } from "./components/collapsible/collapsible.js";
|
|
22
|
+
import { Combobox, ComboboxCollection, ComboboxContent, ComboboxContentProps, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxInputProps, ComboboxItem, ComboboxItemProps, ComboboxOption, ComboboxOptionGroup, ComboboxProps, ComboboxSeparator } from "./components/combobox/combobox.js";
|
|
23
|
+
import { Container, ContainerProps, containerVariants } from "./components/container/container.js";
|
|
24
|
+
import { CopyPill, CopyPillMark, CopyPillProps } from "./components/copy-pill/copy-pill.js";
|
|
25
|
+
import { Cta, CtaAction, CtaActionProps, CtaActions, CtaMessage, CtaMessageProps, CtaProps, CtaText, CtaTitle, CtaTone } from "./components/cta/cta.js";
|
|
26
|
+
import { DateField, DateFieldProps } from "./components/date-field/date-field.js";
|
|
27
|
+
import { DateRangeField, DateRangeFieldProps } from "./components/date-range-field/date-range-field.js";
|
|
28
|
+
import { Dialog, DialogBody, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "./components/dialog/dialog.js";
|
|
29
|
+
import { DocsLayout, DocsLayoutAside, DocsLayoutMain, DocsLayoutNav } from "./components/docs-layout/docs-layout.js";
|
|
30
|
+
import { Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerContentProps, DrawerDescription, DrawerFooter, DrawerHeader, DrawerProps, DrawerSide, DrawerTitle, DrawerTrigger } from "./components/drawer/drawer.js";
|
|
31
|
+
import { Field, FieldDescription, FieldError, FieldLabel } from "./components/field/field.js";
|
|
32
|
+
import { Fieldset, FieldsetLegend } from "./components/fieldset/fieldset.js";
|
|
33
|
+
import { Figure, FigureCaption, FigureFrame } from "./components/figure/figure.js";
|
|
34
|
+
import { Form, FormProps } from "./components/form/form.js";
|
|
35
|
+
import { Ground, GroundName, GroundProps, useGround } from "./components/ground/ground.js";
|
|
36
|
+
import { Heading, HeadingProps } from "./components/heading/heading.js";
|
|
37
|
+
import { Icon, IconProps, IconSvgElement } from "./components/icon/icon.js";
|
|
38
|
+
import { Input, InputProps } from "./components/input/input.js";
|
|
39
|
+
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupButtonProps, InputGroupProps } from "./components/input-group/input-group.js";
|
|
40
|
+
import { Kbd } from "./components/kbd/kbd.js";
|
|
41
|
+
import { Link, LinkProps } from "./components/link/link.js";
|
|
42
|
+
import { LinkVariants, linkVariants } from "./components/link/link-variants.js";
|
|
43
|
+
import { Logomark, LogomarkProps } from "./components/logo/logomark.js";
|
|
44
|
+
import { Wordmark, WordmarkProps } from "./components/logo/wordmark.js";
|
|
45
|
+
import { Menu, MenuCheckboxItem, MenuContent, MenuContentProps, MenuGroup, MenuGroupLabel, MenuItem, MenuLinkItem, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger } from "./components/menu/menu.js";
|
|
46
|
+
import { Meter, MeterLabel, MeterProps, MeterTrack, MeterValue } from "./components/meter/meter.js";
|
|
47
|
+
import { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuLinkDescription, NavigationMenuLinkProps, NavigationMenuLinkTitle, NavigationMenuList, NavigationMenuProps, NavigationMenuTrigger } from "./components/navigation-menu/navigation-menu.js";
|
|
48
|
+
import { NavigationMenuEntryVariants, navigationMenuEntryVariants } from "./components/navigation-menu/navigation-menu-variants.js";
|
|
49
|
+
import { NumberField, NumberFieldDecrement, NumberFieldIncrement, NumberFieldInput, NumberFieldProps } from "./components/number-field/number-field.js";
|
|
50
|
+
import { PageHeader, PageHeaderActions, PageHeaderLead, PageHeaderProps, PageHeaderTitle, PageHeaderTitleProps } from "./components/page-header/page-header.js";
|
|
51
|
+
import { Pager, PagerLink, PagerLinkProps, PagerProps } from "./components/pager/pager.js";
|
|
52
|
+
import { Parameter, ParameterList, ParameterProps } from "./components/parameter-list/parameter-list.js";
|
|
53
|
+
import { Popover, PopoverClose, PopoverContent, PopoverContentProps, PopoverDescription, PopoverTitle, PopoverTrigger } from "./components/popover/popover.js";
|
|
54
|
+
import { Progress, ProgressLabel, ProgressProps, ProgressTrack, ProgressValue } from "./components/progress/progress.js";
|
|
55
|
+
import { Prose } from "./components/prose/prose.js";
|
|
56
|
+
import { Quote, QuoteProps } from "./components/quote/quote.js";
|
|
57
|
+
import { Radio, RadioGroup, RadioGroupProps, RadioProps } from "./components/radio/radio.js";
|
|
58
|
+
import { ReferenceEntry, ReferenceEntryBody, ReferenceEntryHeader, ReferenceEntryMeta, ReferenceEntryName, ReferenceEntryTitle } from "./components/reference-entry/reference-entry.js";
|
|
59
|
+
import { Section, SectionProps } from "./components/section/section.js";
|
|
60
|
+
import { Segment, SegmentProps, SegmentedControl, SegmentedControlProps } from "./components/segmented-control/segmented-control.js";
|
|
61
|
+
import { Select, SelectContent, SelectContentProps, SelectGroup, SelectGroupLabel, SelectItem, SelectItemProps, SelectOption, SelectOptionGroup, SelectProps, SelectSeparator, SelectTrigger, SelectTriggerProps } from "./components/select/select.js";
|
|
62
|
+
import { Separator, SeparatorProps } from "./components/separator/separator.js";
|
|
63
|
+
import { SideNav, SideNavGroup, SideNavGroupProps, SideNavLink, SideNavLinkProps, SideNavProps, SideNavSubLink, SideNavSubLinkProps } from "./components/side-nav/side-nav.js";
|
|
64
|
+
import { SiteFooter, SiteFooterBrand, SiteFooterGroup, SiteFooterGroupProps, SiteFooterLegal, SiteFooterLink, SiteFooterMain, SiteFooterNav, siteFooterLinkClass } from "./components/site-footer/site-footer.js";
|
|
65
|
+
import { SiteHeader, SiteHeaderActions, SiteHeaderBrand, SiteHeaderBrandProps, SiteHeaderMenu, SiteHeaderMenuGroup, SiteHeaderMenuGroupProps, SiteHeaderMenuLink, SiteHeaderMenuLinkProps, SiteHeaderMenuProps, SiteHeaderProps } from "./components/site-header/site-header.js";
|
|
66
|
+
import { Slider, SliderControl, SliderControlProps, SliderLabel, SliderProps, SliderThumb, SliderThumbProps, SliderValue } from "./components/slider/slider.js";
|
|
67
|
+
import { Spinner, SpinnerProps } from "./components/spinner/spinner.js";
|
|
68
|
+
import { Switch, SwitchProps } from "./components/switch/switch.js";
|
|
69
|
+
import { Table, TableBody, TableCaption, TableCell, TableCellProps, TableFooter, TableHead, TableHeadProps, TableHeader, TableProps, TableRow, TableRowProps, TableSortButton, TableSortButtonProps } from "./components/table/table.js";
|
|
70
|
+
import { TableOfContents, TableOfContentsProps, TocItem } from "./components/table-of-contents/table-of-contents.js";
|
|
71
|
+
import { Tab, Tabs, TabsList, TabsPanel, TabsPanels, TabsPanelsProps, TabsProps } from "./components/tabs/tabs.js";
|
|
72
|
+
import { Text, TextProps } from "./components/text/text.js";
|
|
73
|
+
import { Textarea, TextareaProps } from "./components/textarea/textarea.js";
|
|
74
|
+
import { TimeField, TimeFieldProps } from "./components/time-field/time-field.js";
|
|
75
|
+
import { ToastOptions, ToastTone, Toaster, ToasterProps, toast, toastManager } from "./components/toast/toast.js";
|
|
76
|
+
import { Tooltip, TooltipContent, TooltipContentProps, TooltipProvider, TooltipTrigger } from "./components/tooltip/tooltip.js";
|
|
77
|
+
import { cn, mergeClassName } from "./lib/cn.js";
|
|
78
|
+
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 };
|