@lt-three/love3 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -40
- package/dist/native/analytics/animation.d.ts +1 -1
- package/dist/native/analytics/animation.js +1 -1
- package/dist/native/analytics/chart.types.d.ts +3 -3
- package/dist/native/analytics/metric-card.d.ts +3 -3
- package/dist/native/analytics/metric-card.js +3 -3
- package/dist/native/analytics/multi-line-chart.d.ts +9 -8
- package/dist/native/analytics/multi-line-chart.js +14 -13
- package/dist/native/analytics/pie-chart.d.ts +7 -7
- package/dist/native/analytics/pie-chart.js +8 -8
- package/dist/native/analytics/single-number.d.ts +4 -4
- package/dist/native/analytics/single-number.js +2 -2
- package/dist/native/atom/avatar.d.ts +6 -6
- package/dist/native/atom/avatar.js +2 -2
- package/dist/native/atom/badge.d.ts +5 -5
- package/dist/native/atom/button.d.ts +12 -12
- package/dist/native/atom/button.js +8 -8
- package/dist/native/atom/checkbox.d.ts +4 -4
- package/dist/native/atom/checkbox.js +2 -2
- package/dist/native/atom/colored-value.d.ts +4 -4
- package/dist/native/atom/colored-value.js +4 -4
- package/dist/native/atom/image.d.ts +7 -7
- package/dist/native/atom/image.js +2 -2
- package/dist/native/atom/label.d.ts +5 -5
- package/dist/native/atom/label.js +2 -2
- package/dist/native/atom/link.d.ts +5 -5
- package/dist/native/atom/link.js +5 -5
- package/dist/native/atom/readout.d.ts +7 -7
- package/dist/native/atom/readout.js +3 -3
- package/dist/native/atom/search-input.d.ts +2 -2
- package/dist/native/atom/search-input.js +2 -2
- package/dist/native/atom/select.d.ts +14 -14
- package/dist/native/atom/select.js +8 -8
- package/dist/native/atom/separator.d.ts +2 -3
- package/dist/native/atom/separator.js +2 -3
- package/dist/native/atom/skeleton.d.ts +3 -3
- package/dist/native/atom/skeleton.js +3 -3
- package/dist/native/atom/slider.d.ts +6 -6
- package/dist/native/atom/slider.js +3 -3
- package/dist/native/atom/spinner.d.ts +4 -4
- package/dist/native/atom/spinner.js +2 -2
- package/dist/native/atom/switch.d.ts +4 -4
- package/dist/native/atom/switch.js +3 -3
- package/dist/native/atom/symbol.d.ts +7 -7
- package/dist/native/atom/symbol.js +7 -7
- package/dist/native/atom/symbol.types.d.ts +8 -8
- package/dist/native/atom/symbol.types.js +7 -7
- package/dist/native/atom/text-field.d.ts +15 -15
- package/dist/native/atom/text-field.js +5 -5
- package/dist/native/atom/theme-toggle.d.ts +7 -7
- package/dist/native/atom/theme-toggle.js +4 -4
- package/dist/native/atom/timezone-select.d.ts +5 -5
- package/dist/native/atom/timezone-select.js +4 -4
- package/dist/native/atom/typography.d.ts +2 -2
- package/dist/native/atom/typography.js +2 -2
- package/dist/native/base/button.d.ts +13 -13
- package/dist/native/base/button.js +4 -4
- package/dist/native/base/form.d.ts +15 -15
- package/dist/native/base/form.js +11 -11
- package/dist/native/base/glass-card.d.ts +3 -3
- package/dist/native/base/glass-card.js +3 -3
- package/dist/native/base/input.d.ts +8 -8
- package/dist/native/base/input.js +7 -7
- package/dist/native/base/sheet.d.ts +27 -27
- package/dist/native/base/sheet.js +15 -15
- package/dist/native/form/checkbox.d.ts +3 -3
- package/dist/native/form/checkbox.js +2 -2
- package/dist/native/form/date-picker.d.ts +9 -9
- package/dist/native/form/date-picker.js +9 -9
- package/dist/native/form/form.d.ts +5 -6
- package/dist/native/form/form.js +4 -5
- package/dist/native/form/radio-group.d.ts +5 -5
- package/dist/native/form/radio-group.js +4 -4
- package/dist/native/form/select.d.ts +2 -2
- package/dist/native/form/select.js +2 -2
- package/dist/native/form/slider.d.ts +2 -2
- package/dist/native/form/slider.js +2 -2
- package/dist/native/form/switch.d.ts +2 -2
- package/dist/native/form/switch.js +2 -2
- package/dist/native/form/text-area.d.ts +2 -2
- package/dist/native/form/text-area.js +1 -1
- package/dist/native/form/text-input.d.ts +5 -5
- package/dist/native/form/text-input.js +8 -8
- package/dist/native/layout/accordion.d.ts +5 -5
- package/dist/native/layout/accordion.js +2 -2
- package/dist/native/layout/card.d.ts +8 -8
- package/dist/native/layout/card.js +3 -3
- package/dist/native/layout/description.d.ts +2 -2
- package/dist/native/layout/description.js +2 -2
- package/dist/native/layout/error.d.ts +5 -5
- package/dist/native/layout/error.js +2 -2
- package/dist/native/layout/information.d.ts +4 -4
- package/dist/native/layout/information.js +3 -3
- package/dist/native/layout/locked.d.ts +15 -15
- package/dist/native/layout/locked.js +7 -7
- package/dist/native/layout/modal.d.ts +8 -8
- package/dist/native/layout/modal.js +5 -5
- package/dist/native/layout/not-found.d.ts +4 -4
- package/dist/native/layout/not-found.js +3 -3
- package/dist/native/layout/page-frame.d.ts +8 -8
- package/dist/native/layout/page-frame.js +3 -3
- package/dist/native/layout/panel.d.ts +5 -5
- package/dist/native/layout/panel.js +5 -5
- package/dist/native/layout/reorderable-list.d.ts +14 -14
- package/dist/native/layout/reorderable-list.js +10 -10
- package/dist/native/layout/sheet.d.ts +10 -10
- package/dist/native/layout/sheet.js +4 -4
- package/dist/native/layout/simple-dialog.d.ts +3 -3
- package/dist/native/layout/simple-dialog.js +2 -2
- package/dist/native/layout/simple-table.d.ts +18 -18
- package/dist/native/layout/simple-table.js +1 -1
- package/dist/native/layout/tab-bar.d.ts +10 -10
- package/dist/native/layout/tab-bar.js +4 -4
- package/dist/native/layout/tabs.d.ts +6 -6
- package/dist/native/layout/tabs.js +4 -4
- package/dist/native/layout/tuning-panel.d.ts +10 -10
- package/dist/native/layout/tuning-panel.js +15 -15
- package/dist/native/lib/autocomplete.d.ts +1 -1
- package/dist/native/lib/autocomplete.js +1 -1
- package/dist/native/lib/breakpoints.d.ts +3 -3
- package/dist/native/lib/breakpoints.js +3 -3
- package/dist/native/lib/chart-palette.d.ts +2 -2
- package/dist/native/lib/chart-palette.js +2 -2
- package/dist/native/lib/confirm.d.ts +15 -16
- package/dist/native/lib/confirm.js +9 -10
- package/dist/native/lib/control.d.ts +9 -9
- package/dist/native/lib/external-store.d.ts +4 -5
- package/dist/native/lib/keyboard.d.ts +7 -7
- package/dist/native/lib/keyboard.js +7 -7
- package/dist/native/lib/labels.d.ts +6 -6
- package/dist/native/lib/labels.js +6 -6
- package/dist/native/lib/loading.d.ts +3 -3
- package/dist/native/lib/loading.js +3 -3
- package/dist/native/lib/network.d.ts +5 -6
- package/dist/native/lib/network.js +5 -6
- package/dist/native/lib/scheme.d.ts +7 -7
- package/dist/native/lib/scheme.js +3 -3
- package/dist/native/lib/snackbar.d.ts +12 -13
- package/dist/native/lib/snackbar.js +7 -8
- package/dist/native/lib/theme.d.ts +15 -15
- package/dist/native/lib/theme.js +15 -15
- package/dist/native/lib/timezone.d.ts +13 -13
- package/dist/native/lib/timezone.js +13 -13
- package/dist/native/lib/token-color.d.ts +1 -1
- package/dist/native/lib/token-color.js +1 -1
- package/dist/native/lib/tuning-context.d.ts +2 -2
- package/dist/native/lib/tuning.d.ts +10 -10
- package/dist/native/lib/tuning.js +8 -8
- package/dist/native/lib/typography.d.ts +3 -3
- package/dist/native/lib/typography.js +3 -3
- package/dist/native/lib/utils.d.ts +3 -3
- package/dist/native/lib/utils.js +3 -3
- package/dist/native/once/confirm.d.ts +2 -2
- package/dist/native/once/confirm.js +2 -2
- package/dist/native/once/error-boundary.d.ts +3 -3
- package/dist/native/once/error-boundary.js +2 -2
- package/dist/native/once/loading-lock.d.ts +3 -3
- package/dist/native/once/loading-lock.js +3 -3
- package/dist/native/once/offline-banner.d.ts +6 -6
- package/dist/native/once/offline-banner.js +5 -5
- package/dist/native/once/snackbar.d.ts +7 -7
- package/dist/native/once/snackbar.js +5 -5
- package/dist/native/styles.css +21 -21
- package/dist/shared/analytics.d.ts +23 -23
- package/dist/shared/button.d.ts +1 -1
- package/dist/shared/form.d.ts +7 -7
- package/dist/shared/form.js +2 -2
- package/dist/tokens/contrast-pairs.d.ts +9 -9
- package/dist/tokens/contrast-pairs.js +10 -10
- package/dist/tokens/index.d.ts +1 -1
- package/dist/tokens/index.js +1 -1
- package/dist/tokens/styles.gen.css +87 -87
- package/dist/tokens/tokens.gen.d.ts +2 -2
- package/dist/tokens/tokens.gen.js +2 -2
- package/dist/tuning/catalog.d.ts +8 -8
- package/dist/tuning/catalog.js +9 -9
- package/dist/tuning/color.d.ts +4 -4
- package/dist/tuning/color.js +5 -5
- package/dist/tuning/css.d.ts +13 -13
- package/dist/tuning/css.js +17 -17
- package/dist/tuning/model.d.ts +11 -11
- package/dist/tuning/model.js +11 -11
- package/dist/tuning/native.d.ts +18 -18
- package/dist/tuning/native.js +18 -18
- package/dist/tuning/schema.d.ts +15 -15
- package/dist/tuning/schema.js +22 -22
- package/dist/tuning/types.d.ts +25 -25
- package/dist/tuning/types.js +6 -6
- package/dist/web/analytics/line-chart.d.ts +6 -6
- package/dist/web/analytics/line-chart.js +3 -3
- package/dist/web/analytics/metric-card.d.ts +6 -6
- package/dist/web/analytics/metric-card.js +5 -5
- package/dist/web/analytics/multi-line-chart.d.ts +23 -23
- package/dist/web/analytics/multi-line-chart.js +33 -33
- package/dist/web/atom/avatar.d.ts +1 -1
- package/dist/web/atom/checkbox.d.ts +6 -6
- package/dist/web/atom/checkbox.js +2 -2
- package/dist/web/atom/colored-value.d.ts +4 -4
- package/dist/web/atom/colored-value.js +4 -4
- package/dist/web/atom/help.d.ts +1 -1
- package/dist/web/atom/segmented-control.d.ts +13 -14
- package/dist/web/atom/segmented-control.js +6 -7
- package/dist/web/atom/select.d.ts +7 -7
- package/dist/web/atom/select.js +5 -5
- package/dist/web/atom/slider.d.ts +3 -3
- package/dist/web/atom/slider.js +2 -2
- package/dist/web/atom/switch.d.ts +3 -3
- package/dist/web/atom/text-area.d.ts +9 -8
- package/dist/web/atom/text-area.js +9 -8
- package/dist/web/atom/text-field.d.ts +5 -4
- package/dist/web/atom/text-field.js +5 -4
- package/dist/web/atom/toggle-chip.d.ts +6 -6
- package/dist/web/atom/toggle-chip.js +4 -4
- package/dist/web/atom/tooltip.d.ts +6 -6
- package/dist/web/atom/tooltip.js +2 -2
- package/dist/web/base/accordion.js +1 -1
- package/dist/web/base/breadcrumb.d.ts +1 -1
- package/dist/web/base/breadcrumb.js +1 -1
- package/dist/web/base/card.d.ts +3 -3
- package/dist/web/base/card.js +2 -2
- package/dist/web/base/dialog.d.ts +1 -1
- package/dist/web/base/dialog.js +1 -1
- package/dist/web/base/form.d.ts +7 -7
- package/dist/web/base/form.js +5 -5
- package/dist/web/base/pagination.d.ts +5 -5
- package/dist/web/base/pagination.js +1 -1
- package/dist/web/base/sheet.d.ts +1 -1
- package/dist/web/base/sheet.js +1 -1
- package/dist/web/base/slider.d.ts +1 -1
- package/dist/web/base/sonner.d.ts +2 -2
- package/dist/web/base/sonner.js +2 -2
- package/dist/web/base/spinner.js +1 -1
- package/dist/web/form/checkbox.d.ts +8 -8
- package/dist/web/form/checkbox.js +3 -3
- package/dist/web/form/radio-group.js +3 -3
- package/dist/web/form/select.js +1 -1
- package/dist/web/form/slider.d.ts +3 -3
- package/dist/web/form/slider.js +3 -3
- package/dist/web/form/switch.d.ts +3 -3
- package/dist/web/form/switch.js +4 -4
- package/dist/web/form/text-area.js +1 -1
- package/dist/web/form/text-input.d.ts +1 -1
- package/dist/web/form/text-input.js +1 -1
- package/dist/web/layout/accordion.d.ts +5 -5
- package/dist/web/layout/accordion.js +2 -2
- package/dist/web/layout/alert-modal.d.ts +11 -11
- package/dist/web/layout/alert-modal.js +7 -7
- package/dist/web/layout/card.d.ts +1 -1
- package/dist/web/layout/information.d.ts +9 -9
- package/dist/web/layout/information.js +7 -7
- package/dist/web/layout/modal.d.ts +1 -1
- package/dist/web/layout/page-frame.d.ts +14 -14
- package/dist/web/layout/page-frame.js +7 -7
- package/dist/web/layout/scroll-area.d.ts +1 -1
- package/dist/web/layout/sheet.d.ts +4 -4
- package/dist/web/layout/simple-table.d.ts +18 -18
- package/dist/web/layout/simple-table.js +2 -2
- package/dist/web/layout/tabs.d.ts +4 -4
- package/dist/web/layout/titled-modal.d.ts +10 -11
- package/dist/web/layout/titled-modal.js +7 -8
- package/dist/web/lib/css-vars.d.ts +6 -6
- package/dist/web/lib/css-vars.js +5 -5
- package/dist/web/lib/dialog.d.ts +4 -4
- package/dist/web/lib/labels.d.ts +8 -8
- package/dist/web/lib/labels.js +8 -8
- package/dist/web/lib/modal-open-focus.d.ts +7 -7
- package/dist/web/lib/modal-open-focus.js +9 -9
- package/dist/web/lib/restore-focus.d.ts +4 -4
- package/dist/web/lib/restore-focus.js +4 -4
- package/dist/web/styles.css +33 -33
- package/package.json +2 -2
|
@@ -3,20 +3,20 @@ import { ReactNode } from "react";
|
|
|
3
3
|
//#region src/web/atom/toggle-chip.d.ts
|
|
4
4
|
export type ToggleChipProps = {
|
|
5
5
|
children: ReactNode;
|
|
6
|
-
/**
|
|
6
|
+
/** Whether it is selected. When selected, `variant` becomes `default` (indigo fill). */
|
|
7
7
|
pressed: boolean;
|
|
8
8
|
onPressedChange: (pressed: boolean) => void;
|
|
9
|
-
/**
|
|
9
|
+
/** Look when not selected (default `outline`). */
|
|
10
10
|
inactiveVariant?: BadgeVariants;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
className?: string;
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* A Badge that toggles selection when pressed. Used for filter tags and multi-selecting accounts.
|
|
16
16
|
*
|
|
17
|
-
* `<button>`
|
|
18
|
-
*
|
|
19
|
-
* design system
|
|
17
|
+
* Wrapping a `Badge` in a `<button>` by hand makes it easy to forget `type="button"`
|
|
18
|
+
* or miss `aria-pressed`. How the pressed state looks (indigo fill) is also something
|
|
19
|
+
* the design system should decide, so it is gathered into a single component.
|
|
20
20
|
*/
|
|
21
21
|
export declare function ToggleChip({ children, pressed, onPressedChange, inactiveVariant, disabled, className }: ToggleChipProps): import("react").JSX.Element;
|
|
22
22
|
//#endregion
|
|
@@ -4,11 +4,11 @@ import { jsx } from "react/jsx-runtime";
|
|
|
4
4
|
|
|
5
5
|
//#region src/web/atom/toggle-chip.tsx
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* A Badge that toggles selection when pressed. Used for filter tags and multi-selecting accounts.
|
|
8
8
|
*
|
|
9
|
-
* `<button>`
|
|
10
|
-
*
|
|
11
|
-
* design system
|
|
9
|
+
* Wrapping a `Badge` in a `<button>` by hand makes it easy to forget `type="button"`
|
|
10
|
+
* or miss `aria-pressed`. How the pressed state looks (indigo fill) is also something
|
|
11
|
+
* the design system should decide, so it is gathered into a single component.
|
|
12
12
|
*/
|
|
13
13
|
function ToggleChip({ children, pressed, onPressedChange, inactiveVariant = "outline", disabled, className }) {
|
|
14
14
|
return /* @__PURE__ */ jsx("button", {
|
|
@@ -2,21 +2,21 @@ import React from "react";
|
|
|
2
2
|
//#region src/web/atom/tooltip.d.ts
|
|
3
3
|
type Props = {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* The tooltip body. When falsy, no tooltip is attached and the children are rendered as is.
|
|
6
|
+
* This makes it easy to enable conditionally, e.g. "show the reason only when the button is disabled".
|
|
7
7
|
*/
|
|
8
8
|
content?: React.ReactNode;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
* `<button disabled
|
|
10
|
+
* The element that is the target of hover and focus. A disabled element is wrapped in a focusable span.
|
|
11
|
+
* Even if you pass `<button disabled>`, the body appears on hover and on keyboard focus.
|
|
12
12
|
*/
|
|
13
13
|
children: React.ReactNode;
|
|
14
14
|
side?: "top" | "right" | "bottom" | "left";
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
|
-
* shadcn
|
|
17
|
+
* A light component wrapping shadcn's Tooltip. It is meant for "showing the reason when the trigger is disabled (cannot be pressed)".
|
|
18
18
|
*
|
|
19
|
-
* content
|
|
19
|
+
* When content is empty, no tooltip is attached and the children are rendered as is.
|
|
20
20
|
*/
|
|
21
21
|
export declare function Tooltip({ content, children, side }: Props): React.JSX.Element;
|
|
22
22
|
//#endregion
|
package/dist/web/atom/tooltip.js
CHANGED
|
@@ -3,9 +3,9 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
|
|
4
4
|
//#region src/web/atom/tooltip.tsx
|
|
5
5
|
/**
|
|
6
|
-
* shadcn
|
|
6
|
+
* A light component wrapping shadcn's Tooltip. It is meant for "showing the reason when the trigger is disabled (cannot be pressed)".
|
|
7
7
|
*
|
|
8
|
-
* content
|
|
8
|
+
* When content is empty, no tooltip is attached and the children are rendered as is.
|
|
9
9
|
*/
|
|
10
10
|
function Tooltip({ content, children, side }) {
|
|
11
11
|
if (!content) return /* @__PURE__ */ jsx(Fragment, { children });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { ChevronDownIcon } from "lucide-react";
|
|
4
3
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
4
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
5
5
|
|
|
6
6
|
//#region src/web/base/accordion.tsx
|
|
7
7
|
function Accordion({ ...props }) {
|
|
@@ -9,7 +9,7 @@ declare function BreadcrumbLink({ asChild, className, ...props }: React$1.Compon
|
|
|
9
9
|
declare function BreadcrumbPage({ className, ...props }: React$1.ComponentProps<"span">): React$1.JSX.Element;
|
|
10
10
|
declare function BreadcrumbSeparator({ children, className, ...props }: React$1.ComponentProps<"li">): React$1.JSX.Element;
|
|
11
11
|
declare function BreadcrumbEllipsis({ className, moreLabel, ...props }: React$1.ComponentProps<"span"> & {
|
|
12
|
-
/**
|
|
12
|
+
/** Accessible name of the omitted levels */
|
|
13
13
|
moreLabel?: string;
|
|
14
14
|
}): React$1.JSX.Element;
|
|
15
15
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BREADCRUMB_LABEL, MORE_LEVELS_LABEL } from "../lib/labels.js";
|
|
2
1
|
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { BREADCRUMB_LABEL, MORE_LEVELS_LABEL } from "../lib/labels.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
package/dist/web/base/card.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import * as React$1 from "react";
|
|
|
2
2
|
//#region src/web/base/card.d.ts
|
|
3
3
|
declare function Card({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
4
4
|
declare function CardHeader({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
5
|
-
/**
|
|
5
|
+
/** Heading level (`<h2>` to `<h6>`). There is one h1 per page, so a card title cannot choose it. */
|
|
6
6
|
export type CardHeadingLevel = 2 | 3 | 4 | 5 | 6;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* The title of a card. Defaults to a `<div>` (not part of the heading hierarchy). Passing `headingLevel` makes it `<h2>` to `<h6>` and puts it in the heading hierarchy
|
|
9
|
+
* (it looks the same; the default margin and size of headings are cancelled).
|
|
10
10
|
*/
|
|
11
11
|
declare function CardTitle({ className, headingLevel, ...props }: React$1.ComponentProps<"div"> & {
|
|
12
12
|
headingLevel?: CardHeadingLevel;
|
package/dist/web/base/card.js
CHANGED
|
@@ -24,8 +24,8 @@ const HEADINGS = {
|
|
|
24
24
|
6: "h6"
|
|
25
25
|
};
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
27
|
+
* The title of a card. Defaults to a `<div>` (not part of the heading hierarchy). Passing `headingLevel` makes it `<h2>` to `<h6>` and puts it in the heading hierarchy
|
|
28
|
+
* (it looks the same; the default margin and size of headings are cancelled).
|
|
29
29
|
*/
|
|
30
30
|
function CardTitle({ className, headingLevel, ...props }) {
|
|
31
31
|
const classes = cn("text-base font-semibold leading-tight tracking-tight", className);
|
|
@@ -8,7 +8,7 @@ declare function DialogClose({ ...props }: React$1.ComponentProps<typeof DialogP
|
|
|
8
8
|
declare function DialogOverlay({ className, ...props }: React$1.ComponentProps<typeof DialogPrimitive.Overlay>): React$1.JSX.Element;
|
|
9
9
|
declare function DialogContent({ className, children, showCloseButton, closeLabel, onClose, onOpenAutoFocus, onCloseAutoFocus, ...props }: React$1.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
10
10
|
showCloseButton?: boolean;
|
|
11
|
-
/**
|
|
11
|
+
/** Accessible name of the close button */
|
|
12
12
|
closeLabel?: string;
|
|
13
13
|
onClose?: () => void;
|
|
14
14
|
}): React$1.JSX.Element;
|
package/dist/web/base/dialog.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CLOSE_LABEL } from "../lib/labels.js";
|
|
2
1
|
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { CLOSE_LABEL } from "../lib/labels.js";
|
|
3
3
|
import { useRestoreFocus } from "../lib/restore-focus.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { XIcon } from "lucide-react";
|
package/dist/web/base/form.d.ts
CHANGED
|
@@ -12,26 +12,26 @@ declare const useFormField: () => {
|
|
|
12
12
|
};
|
|
13
13
|
declare function FormItem({ className, errors, ...props }: React$1.ComponentProps<"div"> & {
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* Errors for use outside a field (TanStack Form). Used for the input's `aria-invalid` and `aria-describedby`,
|
|
16
|
+
* the label's `data-error`, and the display of `FormMessage`. Not needed inside a field (it reads the field's errors).
|
|
17
17
|
*/
|
|
18
18
|
errors?: readonly unknown[];
|
|
19
19
|
}): React$1.JSX.Element;
|
|
20
20
|
declare function FormLabel({ required, helpText, helpLabel, className, ...props }: {
|
|
21
21
|
required?: boolean;
|
|
22
22
|
helpText?: React$1.ReactNode;
|
|
23
|
-
/**
|
|
23
|
+
/** Accessible name of the help trigger */
|
|
24
24
|
helpLabel?: string;
|
|
25
25
|
} & React$1.ComponentProps<typeof LabelPrimitive.Root>): React$1.JSX.Element;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
27
|
+
* Passes id, aria-describedby and aria-invalid to the input.
|
|
28
|
+
* The default id is `formItemId`, which the label's `htmlFor` points at. **When one field has several controls** (the options of a radio, etc.),
|
|
29
|
+
* the same id would repeat, so the second and later controls pass `id` to tell them apart (aria-describedby and aria-invalid are applied to every control).
|
|
30
30
|
*/
|
|
31
31
|
declare function FormControl({ className: _className, id, ...props }: React$1.ComponentProps<typeof Slot>): React$1.JSX.Element;
|
|
32
32
|
declare function FormDescription({ className, ...props }: React$1.ComponentProps<"p">): React$1.JSX.Element;
|
|
33
33
|
declare function FormMessage({ className, errors: overriddenErrors, ...props }: React$1.ComponentProps<"p"> & {
|
|
34
|
-
/**
|
|
34
|
+
/** An error shown only in this message. It does not affect the input's aria-invalid (that comes from FormItem's errors) */
|
|
35
35
|
errors?: readonly unknown[];
|
|
36
36
|
}): React$1.JSX.Element | null;
|
|
37
37
|
//#endregion
|
package/dist/web/base/form.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useOptionalFieldContext } from "../../shared/form.js";
|
|
2
|
-
import { HELP_LABEL } from "../lib/labels.js";
|
|
3
2
|
import { cn } from "../lib/utils.js";
|
|
4
|
-
import {
|
|
3
|
+
import { HELP_LABEL } from "../lib/labels.js";
|
|
5
4
|
import { Field, FieldDescription, FieldError, FieldLabel } from "./field.js";
|
|
5
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.js";
|
|
6
6
|
import * as React$1 from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { CircleQuestionMark } from "lucide-react";
|
|
@@ -69,9 +69,9 @@ function FormLabel({ required, helpText, helpLabel = HELP_LABEL, className, ...p
|
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
72
|
+
* Passes id, aria-describedby and aria-invalid to the input.
|
|
73
|
+
* The default id is `formItemId`, which the label's `htmlFor` points at. **When one field has several controls** (the options of a radio, etc.),
|
|
74
|
+
* the same id would repeat, so the second and later controls pass `id` to tell them apart (aria-describedby and aria-invalid are applied to every control).
|
|
75
75
|
*/
|
|
76
76
|
function FormControl({ className: _className, id, ...props }) {
|
|
77
77
|
const { errors, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
@@ -9,8 +9,8 @@ type PaginationLinkCommonProps = {
|
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
} & Pick<React$1.ComponentProps<typeof Button>, "size">;
|
|
11
11
|
/**
|
|
12
|
-
* `href
|
|
13
|
-
* href
|
|
12
|
+
* A link (`<a>`) when there is an `href`, **a button (`<button type="button">`) when there is not**. Screens that change pages through client state
|
|
13
|
+
* have no href, and an `<a>` left as it is can be neither focused nor operated by keyboard (an `<a>` without href is not a link).
|
|
14
14
|
*/
|
|
15
15
|
type PaginationLinkProps = PaginationLinkCommonProps & (({
|
|
16
16
|
href: string;
|
|
@@ -19,15 +19,15 @@ type PaginationLinkProps = PaginationLinkCommonProps & (({
|
|
|
19
19
|
} & Omit<React$1.ComponentProps<"button">, "type">));
|
|
20
20
|
declare function PaginationLink(props: PaginationLinkProps): React$1.JSX.Element;
|
|
21
21
|
declare function PaginationPrevious({ className, previousLabel, ...props }: React$1.ComponentProps<typeof PaginationLink> & {
|
|
22
|
-
/**
|
|
22
|
+
/** Accessible name (it is shown as an icon only, so the name is given here) */
|
|
23
23
|
previousLabel?: string;
|
|
24
24
|
}): React$1.JSX.Element;
|
|
25
25
|
declare function PaginationNext({ className, nextLabel, ...props }: React$1.ComponentProps<typeof PaginationLink> & {
|
|
26
|
-
/**
|
|
26
|
+
/** Accessible name (it is shown as an icon only, so the name is given here) */
|
|
27
27
|
nextLabel?: string;
|
|
28
28
|
}): React$1.JSX.Element;
|
|
29
29
|
declare function PaginationEllipsis({ className, moreLabel, ...props }: React$1.ComponentProps<"span"> & {
|
|
30
|
-
/**
|
|
30
|
+
/** Accessible name of the omitted pages */
|
|
31
31
|
moreLabel?: string;
|
|
32
32
|
}): React$1.JSX.Element;
|
|
33
33
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MORE_PAGES_LABEL, NEXT_PAGE_LABEL, PAGINATION_LABEL, PREVIOUS_PAGE_LABEL } from "../lib/labels.js";
|
|
2
1
|
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { MORE_PAGES_LABEL, NEXT_PAGE_LABEL, PAGINATION_LABEL, PREVIOUS_PAGE_LABEL } from "../lib/labels.js";
|
|
3
3
|
import { buttonVariants } from "./button.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
|
package/dist/web/base/sheet.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ declare function SheetClose({ ...props }: React$1.ComponentProps<typeof SheetPri
|
|
|
7
7
|
declare function SheetContent({ className, children, side, showCloseButton, closeLabel, onClose, onOpenAutoFocus, onCloseAutoFocus, ...props }: React$1.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
8
8
|
side?: "top" | "right" | "bottom" | "left";
|
|
9
9
|
showCloseButton?: boolean;
|
|
10
|
-
/**
|
|
10
|
+
/** Accessible name of the close button */
|
|
11
11
|
closeLabel?: string;
|
|
12
12
|
onClose?: () => void;
|
|
13
13
|
}): React$1.JSX.Element;
|
package/dist/web/base/sheet.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CLOSE_LABEL } from "../lib/labels.js";
|
|
2
1
|
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { CLOSE_LABEL } from "../lib/labels.js";
|
|
3
3
|
import { useRestoreFocus } from "../lib/restore-focus.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { XIcon } from "lucide-react";
|
|
@@ -2,7 +2,7 @@ import * as React$1 from "react";
|
|
|
2
2
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
3
3
|
//#region src/web/base/slider.d.ts
|
|
4
4
|
declare function Slider({ className, defaultValue, value, min, max, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, thumbLabels, ...props }: React$1.ComponentProps<typeof SliderPrimitive.Root> & {
|
|
5
|
-
/**
|
|
5
|
+
/** Accessible name per thumb (when you want to tell the thumbs of a range apart). If absent, `aria-label` is applied to all thumbs */
|
|
6
6
|
thumbLabels?: readonly string[];
|
|
7
7
|
}): React$1.JSX.Element;
|
|
8
8
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ToasterProps } from "sonner";
|
|
2
2
|
//#region src/web/base/sonner.d.ts
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* love3
|
|
4
|
+
* Where notifications are rendered. The theme is passed with `theme` (defaults to following the OS).
|
|
5
|
+
* love3 holds no app state (such as where the theme is stored), so the theme is not read here.
|
|
6
6
|
*/
|
|
7
7
|
declare const Toaster: ({ ...props }: ToasterProps) => import("react").JSX.Element;
|
|
8
8
|
//#endregion
|
package/dist/web/base/sonner.js
CHANGED
|
@@ -4,8 +4,8 @@ import { Toaster as Toaster$1 } from "sonner";
|
|
|
4
4
|
|
|
5
5
|
//#region src/web/base/sonner.tsx
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
* love3
|
|
7
|
+
* Where notifications are rendered. The theme is passed with `theme` (defaults to following the OS).
|
|
8
|
+
* love3 holds no app state (such as where the theme is stored), so the theme is not read here.
|
|
9
9
|
*/
|
|
10
10
|
const Toaster = ({ ...props }) => {
|
|
11
11
|
return /* @__PURE__ */ jsx(Toaster$1, {
|
package/dist/web/base/spinner.js
CHANGED
|
@@ -4,10 +4,10 @@ import "../lib/form.js";
|
|
|
4
4
|
import React, { ComponentProps } from "react";
|
|
5
5
|
//#region src/web/form/checkbox.d.ts
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
* - `checkboxLabel`:
|
|
9
|
-
* - `label`:
|
|
10
|
-
* - `aria-label` / `aria-labelledby`:
|
|
7
|
+
* The name of the checkbox. One of the following is required (so a checkbox never has no name).
|
|
8
|
+
* - `checkboxLabel`: text shown on the right (clicking it toggles)
|
|
9
|
+
* - `label`: the field label shown above (for a standalone checkbox with no text on the right; the label becomes the name)
|
|
10
|
+
* - `aria-label` / `aria-labelledby`: when there is no visible label (selecting a table row, etc.)
|
|
11
11
|
*/
|
|
12
12
|
type CheckboxNameProps = {
|
|
13
13
|
checkboxLabel: React.ReactNode;
|
|
@@ -22,13 +22,13 @@ type CheckboxNameProps = {
|
|
|
22
22
|
"aria-labelledby": string;
|
|
23
23
|
};
|
|
24
24
|
export type CheckboxProps = BaseInputProps<boolean> & Omit<ComponentProps<typeof Checkbox$1>, "checked" | "onCheckedChange" | "value" | "onChange"> & {
|
|
25
|
-
/**
|
|
25
|
+
/** Vertical alignment of the checkbox and the label */
|
|
26
26
|
align?: "center" | "start";
|
|
27
27
|
} & CheckboxNameProps;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
* - `value` / `onValueChange`
|
|
31
|
-
* -
|
|
29
|
+
* A Checkbox that supports both form and controlled use.
|
|
30
|
+
* - Passing `value` / `onValueChange` selects controlled mode (it uses `atom/checkbox` inside)
|
|
31
|
+
* - When omitted, it takes the value from the field context
|
|
32
32
|
*/
|
|
33
33
|
export declare function Checkbox(props: CheckboxProps): React.JSX.Element;
|
|
34
34
|
//#endregion
|
|
@@ -8,9 +8,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
|
|
9
9
|
//#region src/web/form/checkbox.tsx
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
* - `value` / `onValueChange`
|
|
13
|
-
* -
|
|
11
|
+
* A Checkbox that supports both form and controlled use.
|
|
12
|
+
* - Passing `value` / `onValueChange` selects controlled mode (it uses `atom/checkbox` inside)
|
|
13
|
+
* - When omitted, it takes the value from the field context
|
|
14
14
|
*/
|
|
15
15
|
function Checkbox(props) {
|
|
16
16
|
if (props.value !== void 0 && props.onValueChange !== void 0) return /* @__PURE__ */ jsx(ControlledCheckbox, {
|
|
@@ -23,9 +23,9 @@ function RadioGroup({ label, description, required, helpText, ...rest }) {
|
|
|
23
23
|
] });
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
26
|
+
* The container of the options. It is drawn inside FormItem (the same context as the label), so it can read the label's id.
|
|
27
|
+
* The group itself holds `formItemId` (the target of the label's `htmlFor`) and takes its name from the label through `aria-labelledby`.
|
|
28
|
+
* The input of each option passes its own id to FormControl (one field has several controls, so reusing formItemId would duplicate it).
|
|
29
29
|
*/
|
|
30
30
|
function RadioGroupBody({ hasLabel, options, disabled, debounce, className, full, type = "list" }) {
|
|
31
31
|
const [value, setValue] = useFieldValue({ debounce });
|
package/dist/web/form/select.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFieldValue } from "../../shared/form.js";
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
|
-
import { Select as Select$1, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectTrigger, SelectValue } from "../base/select.js";
|
|
4
3
|
import { FormControl, FormDescription, FormItem, FormLabel, FormMessage } from "../base/form.js";
|
|
4
|
+
import { Select as Select$1, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectTrigger, SelectValue } from "../base/select.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/web/form/select.tsx
|
|
@@ -3,7 +3,7 @@ import "../lib/form.js";
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
//#region src/web/form/slider.d.ts
|
|
5
5
|
/**
|
|
6
|
-
* Slider
|
|
6
|
+
* The field type for Slider allows both a single value (`number`) and a range (`number[]`) (which one is decided by the field's value).
|
|
7
7
|
*/
|
|
8
8
|
export type SliderProps = FieldInputProps & {
|
|
9
9
|
min?: number;
|
|
@@ -12,8 +12,8 @@ export type SliderProps = FieldInputProps & {
|
|
|
12
12
|
formattedValue?: React.ReactNode;
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
|
-
* TanStack Form
|
|
16
|
-
*
|
|
15
|
+
* The Slider with TanStack Form integration. The value comes from the field context.
|
|
16
|
+
* If you need a controlled one, use `atom/slider`.
|
|
17
17
|
*/
|
|
18
18
|
export declare function Slider(props: SliderProps): React.JSX.Element;
|
|
19
19
|
//#endregion
|
package/dist/web/form/slider.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useFieldValue } from "../../shared/form.js";
|
|
2
|
-
import { Slider as Slider$1 } from "../atom/slider.js";
|
|
3
2
|
import { FormControl, FormDescription, FormItem, FormMessage } from "../base/form.js";
|
|
3
|
+
import { Slider as Slider$1 } from "../atom/slider.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/web/form/slider.tsx
|
|
7
7
|
/**
|
|
8
|
-
* TanStack Form
|
|
9
|
-
*
|
|
8
|
+
* The Slider with TanStack Form integration. The value comes from the field context.
|
|
9
|
+
* If you need a controlled one, use `atom/slider`.
|
|
10
10
|
*/
|
|
11
11
|
function Slider(props) {
|
|
12
12
|
const { label, required, description, helpText, min, max, step, debounce, disabled, className, wrapperClassName, formattedValue } = props;
|
|
@@ -3,9 +3,9 @@ import "../lib/form.js";
|
|
|
3
3
|
//#region src/web/form/switch.d.ts
|
|
4
4
|
export type SwitchProps = BaseInputProps<boolean>;
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
* - `value` / `onValueChange`
|
|
8
|
-
* -
|
|
6
|
+
* A Switch that supports both form and controlled use.
|
|
7
|
+
* - Passing `value` / `onValueChange` selects controlled mode (it does not read the field context, so it works outside a field)
|
|
8
|
+
* - When omitted, it takes the value from the field context
|
|
9
9
|
*/
|
|
10
10
|
export declare function Switch(props: SwitchProps): import("react").JSX.Element;
|
|
11
11
|
//#endregion
|
package/dist/web/form/switch.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useFieldValue } from "../../shared/form.js";
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
|
-
import { Switch as Switch$1 } from "../base/switch.js";
|
|
4
3
|
import { FormControl, FormDescription, FormItem, FormLabel, FormMessage } from "../base/form.js";
|
|
4
|
+
import { Switch as Switch$1 } from "../base/switch.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/web/form/switch.tsx
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* - `value` / `onValueChange`
|
|
11
|
-
* -
|
|
9
|
+
* A Switch that supports both form and controlled use.
|
|
10
|
+
* - Passing `value` / `onValueChange` selects controlled mode (it does not read the field context, so it works outside a field)
|
|
11
|
+
* - When omitted, it takes the value from the field context
|
|
12
12
|
*/
|
|
13
13
|
function Switch(props) {
|
|
14
14
|
if (props.value !== void 0 && props.onValueChange !== void 0) return /* @__PURE__ */ jsx(Layout, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFieldValue } from "../../shared/form.js";
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
|
-
import { Textarea as Textarea$1 } from "../base/textarea.js";
|
|
4
3
|
import { FormControl, FormDescription, FormItem, FormLabel, FormMessage } from "../base/form.js";
|
|
4
|
+
import { Textarea as Textarea$1 } from "../base/textarea.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/web/form/text-area.tsx
|
|
@@ -3,7 +3,7 @@ import "../lib/form.js";
|
|
|
3
3
|
//#region src/web/form/text-input.d.ts
|
|
4
4
|
export type TextInputProps = {
|
|
5
5
|
type?: "text" | "email" | "password" | "tel" | "url" | "number";
|
|
6
|
-
/**
|
|
6
|
+
/** Hint for the browser's autofill (`email`, `current-password`, `one-time-code` and so on; a value of the HTML `autocomplete` attribute). */
|
|
7
7
|
autoComplete?: string;
|
|
8
8
|
} & FieldInputProps;
|
|
9
9
|
export declare function TextInput({ label, required, description, debounce, className, wrapperClassName, type, helpText, ...remain }: TextInputProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFieldValue } from "../../shared/form.js";
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
|
-
import { Input } from "../base/input.js";
|
|
4
3
|
import { FormControl, FormDescription, FormItem, FormLabel, FormMessage } from "../base/form.js";
|
|
4
|
+
import { Input } from "../base/input.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/web/form/text-input.tsx
|
|
@@ -2,24 +2,24 @@ import { Accordion as Accordion$1 } from "../base/accordion.js";
|
|
|
2
2
|
import { ComponentProps, ReactNode } from "react";
|
|
3
3
|
//#region src/web/layout/accordion.d.ts
|
|
4
4
|
export type AccordionEntry = {
|
|
5
|
-
/**
|
|
5
|
+
/** A stable ID used for the Radix item's value. */
|
|
6
6
|
value: string;
|
|
7
7
|
trigger: ReactNode;
|
|
8
8
|
content: ReactNode;
|
|
9
9
|
};
|
|
10
10
|
type RootProps = ComponentProps<typeof Accordion$1>;
|
|
11
|
-
/** Radix
|
|
11
|
+
/** A distributive Omit, to keep Radix's single / multiple discriminated union. */
|
|
12
12
|
type DistributedOmit<T, K extends keyof never> = T extends unknown ? Omit<T, K> : never;
|
|
13
13
|
export type AccordionProps = DistributedOmit<RootProps, "children"> & {
|
|
14
14
|
items: AccordionEntry[];
|
|
15
|
-
/**
|
|
15
|
+
/** Extra class attached to the outside of each item. */
|
|
16
16
|
itemClassName?: string;
|
|
17
17
|
triggerClassName?: string;
|
|
18
18
|
contentClassName?: string;
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
21
|
+
* A data-driven Accordion wrapping the shadcn primitives.
|
|
22
|
+
* Callers do not have to assemble Item / Trigger / Content themselves.
|
|
23
23
|
*/
|
|
24
24
|
export declare function Accordion({ items, itemClassName, triggerClassName, contentClassName, className, ...rest }: AccordionProps): import("react").JSX.Element;
|
|
25
25
|
//#endregion
|
|
@@ -4,8 +4,8 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
|
|
5
5
|
//#region src/web/layout/accordion.tsx
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* A data-driven Accordion wrapping the shadcn primitives.
|
|
8
|
+
* Callers do not have to assemble Item / Trigger / Content themselves.
|
|
9
9
|
*/
|
|
10
10
|
function Accordion({ items, itemClassName, triggerClassName, contentClassName, className, ...rest }) {
|
|
11
11
|
return /* @__PURE__ */ jsx(Accordion$1, {
|
|
@@ -5,7 +5,7 @@ export type AlertModalAction = {
|
|
|
5
5
|
label: string;
|
|
6
6
|
onClick: () => void;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* When omitted: "the last action is the primary action (indigo fill; for danger, the destructive-solid fill), and the others are border only (outline)".
|
|
9
9
|
*/
|
|
10
10
|
emphasis?: "primary" | "secondary";
|
|
11
11
|
disabled?: boolean;
|
|
@@ -14,27 +14,27 @@ export type AlertModalAction = {
|
|
|
14
14
|
type AlertModalProps = {
|
|
15
15
|
open: boolean;
|
|
16
16
|
onOpenChange: (open: boolean) => void;
|
|
17
|
-
/** `danger`
|
|
17
|
+
/** `danger` is a confirmation of an action that cannot be undone. A state-error icon is added to the left of the heading, and the primary action gets the destructive-solid fill (the heading text colour stays normal). */
|
|
18
18
|
tone?: AlertModalTone;
|
|
19
19
|
title: React$1.ReactNode;
|
|
20
20
|
description?: React$1.ReactNode;
|
|
21
|
-
/**
|
|
21
|
+
/** Laid out right-aligned, in order from the left. Usually [cancel, primary action]. */
|
|
22
22
|
actions: AlertModalAction[];
|
|
23
|
-
/** false
|
|
23
|
+
/** When false, a scrim click or Esc does not close it (to make the user choose one of the actions). */
|
|
24
24
|
dismissible?: boolean;
|
|
25
25
|
"data-testid"?: string;
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* A small modal for confirmation (it has no ×).
|
|
29
29
|
*
|
|
30
|
-
*
|
|
31
|
-
* `danger
|
|
32
|
-
*
|
|
30
|
+
* Overlay surface, p-5, width 400 (fitted to the viewport). A heading (16/24 semibold) and body text (13/20, muted), with right-aligned actions (gap-2, the default Button size).
|
|
31
|
+
* With `danger`, a small state-error icon is added to the left of the heading and the primary action gets the destructive-solid fill.
|
|
32
|
+
* No border and no ring (it floats on the shadow alone, like `DialogContent`). The caller holds the open state (controlled only).
|
|
33
33
|
*
|
|
34
|
-
*
|
|
34
|
+
* While shown it carries `data-modal-open`, so floating persistent UI can be hidden with CSS.
|
|
35
35
|
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
36
|
+
* The initial focus on open goes to the first action only when it was opened by keyboard, and otherwise to the modal body
|
|
37
|
+
* (so that no ring appears on the first button when opened with the mouse; `useModalOpenAutoFocus`).
|
|
38
38
|
*/
|
|
39
39
|
export declare function AlertModal({ open, onOpenChange, tone, title, description, actions, dismissible, "data-testid": testId }: AlertModalProps): React$1.JSX.Element;
|
|
40
40
|
//#endregion
|