@vamos-ui/react 0.4.0 → 0.4.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 +4 -0
- package/dist/blocks/block-heading.js +1 -1
- package/dist/blocks/block-link.js +1 -1
- package/dist/blocks/index.d.ts +3 -3
- package/dist/blocks/index.js +3 -3
- package/dist/blocks/labels.d.ts +8 -0
- package/dist/blocks/labels.js +60 -0
- package/dist/blocks/section-header.js +1 -1
- package/dist/blocks/section.js +2 -2
- package/dist/blocks/site/feature-tabs.js +1 -1
- package/dist/blocks/site/footer.d.ts +10 -1
- package/dist/blocks/site/footer.js +28 -4
- package/dist/blocks/site/registry-2.js +3 -1
- package/dist/blocks/site/shared/labels-2.d.ts +8 -0
- package/dist/blocks/site/shared/labels-2.js +808 -0
- package/dist/blocks/site/site-shell.js +3 -3
- package/dist/business/approval-flow.js +2 -2
- package/dist/business/import-wizard.js +1 -1
- package/dist/business/line-items.js +1 -1
- package/dist/business/multi-step-form.js +2 -2
- package/dist/business/permission-matrix.js +1 -1
- package/dist/business/setup-checklist.js +2 -2
- package/dist/business/signer-status.js +1 -1
- package/dist/charts/bar-list.js +1 -1
- package/dist/charts/chart-shell.js +1 -1
- package/dist/charts/donut-chart.js +1 -1
- package/dist/charts/funnel.js +1 -1
- package/dist/charts/gauge.js +2 -2
- package/dist/components/accordion.d.ts +1 -1
- package/dist/components/accordion.js +8 -8
- package/dist/components/activity-timeline.js +6 -6
- package/dist/components/address-field.js +3 -3
- package/dist/components/alert-dialog.d.ts +1 -1
- package/dist/components/alert-dialog.js +8 -8
- package/dist/components/alert.js +2 -2
- package/dist/components/app-shell.js +3 -3
- package/dist/components/aspect-ratio.js +2 -2
- package/dist/components/attachment-list.js +2 -2
- package/dist/components/audit-log.js +1 -1
- package/dist/components/avatar.d.ts +1 -1
- package/dist/components/avatar.js +8 -8
- package/dist/components/backup-codes.js +1 -1
- package/dist/components/badge.js +3 -3
- package/dist/components/breadcrumb.js +10 -9
- package/dist/components/button-group.js +4 -4
- package/dist/components/button.js +4 -4
- package/dist/components/calendar.js +5 -5
- package/dist/components/card.js +8 -8
- package/dist/components/carousel.js +9 -9
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/checkbox.js +6 -6
- package/dist/components/collapsible.d.ts +1 -1
- package/dist/components/collapsible.js +4 -4
- package/dist/components/color-picker.js +3 -3
- package/dist/components/combobox.js +1 -1
- package/dist/components/command.js +9 -9
- package/dist/components/comment-thread.js +3 -3
- package/dist/components/context-menu.d.ts +1 -1
- package/dist/components/context-menu.js +9 -9
- package/dist/components/currency-input.js +1 -1
- package/dist/components/date-picker.js +2 -2
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/description-list.js +2 -2
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/dialog.js +9 -9
- package/dist/components/dropdown-menu.d.ts +1 -1
- package/dist/components/dropdown-menu.js +9 -9
- package/dist/components/editor-layout.js +9 -9
- package/dist/components/empty-state.js +2 -2
- package/dist/components/entity-card.js +1 -1
- package/dist/components/file-upload.js +5 -5
- package/dist/components/formatted-input.js +3 -3
- package/dist/components/hierarchy-chart.js +1 -1
- package/dist/components/hover-card.d.ts +1 -1
- package/dist/components/hover-card.js +3 -3
- package/dist/components/iban-input.js +1 -1
- package/dist/components/id-input.js +3 -3
- package/dist/components/image.js +5 -5
- package/dist/components/input-otp.js +6 -6
- package/dist/components/input.d.ts +1 -1
- package/dist/components/input.js +6 -6
- package/dist/components/item.js +4 -4
- package/dist/components/kbd.js +3 -3
- package/dist/components/list-layout.js +9 -9
- package/dist/components/menubar.d.ts +1 -1
- package/dist/components/menubar.js +12 -12
- package/dist/components/native-select.js +1 -1
- package/dist/components/navigation-menu.d.ts +1 -1
- package/dist/components/navigation-menu.js +12 -11
- package/dist/components/notification-center.js +4 -4
- package/dist/components/page-header.js +3 -3
- package/dist/components/pagination.js +9 -9
- package/dist/components/phone-input.js +1 -1
- package/dist/components/pin-map.js +1 -1
- package/dist/components/placeholder-art.js +1 -1
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.js +7 -7
- package/dist/components/progress.js +3 -3
- package/dist/components/qr-code.js +1 -1
- package/dist/components/radio-group.d.ts +1 -1
- package/dist/components/radio-group.js +4 -4
- package/dist/components/record-detail-layout.js +10 -10
- package/dist/components/record-picker.js +2 -2
- package/dist/components/resizable.js +2 -2
- package/dist/components/scroll-area.d.ts +1 -1
- package/dist/components/scroll-area.js +4 -4
- package/dist/components/select.d.ts +1 -1
- package/dist/components/select.js +10 -10
- package/dist/components/separator.d.ts +1 -1
- package/dist/components/separator.js +3 -3
- package/dist/components/settings-layout.js +6 -6
- package/dist/components/sheet.js +3 -3
- package/dist/components/sidebar.js +12 -11
- package/dist/components/signature-pad.js +1 -1
- package/dist/components/skeleton.js +5 -5
- package/dist/components/sla-timer.js +2 -2
- package/dist/components/slider.d.ts +1 -1
- package/dist/components/slider.js +2 -2
- package/dist/components/slug-input.js +1 -1
- package/dist/components/sparkline.js +1 -1
- package/dist/components/spinner.js +2 -2
- package/dist/components/stat.js +5 -5
- package/dist/components/status-picker.js +2 -2
- package/dist/components/stepper.js +1 -1
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/switch.js +3 -3
- package/dist/components/table.js +10 -10
- package/dist/components/tabs.d.ts +1 -1
- package/dist/components/tabs.js +11 -11
- package/dist/components/tag-input.js +1 -1
- package/dist/components/task-list.js +1 -1
- package/dist/components/time-picker.js +3 -3
- package/dist/components/toggle.d.ts +2 -1
- package/dist/components/toggle.js +7 -6
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +5 -4
- package/dist/components/top-bar.js +4 -4
- package/dist/components/tour.js +1 -1
- package/dist/components/tree-select.js +2 -2
- package/dist/components/tree-view.js +3 -3
- package/dist/components/typography.js +11 -11
- package/dist/components/user-picker.js +2 -2
- package/dist/components/version-history.js +3 -3
- package/dist/data-table/data-table.js +1 -1
- package/dist/data-table/filter-bar.js +2 -2
- package/dist/data-table/index.d.ts +15 -8
- package/dist/data-table/index.js +9 -8
- package/dist/data-table/saved-views.js +1 -1
- package/dist/editor/block-editor.js +1 -1
- package/dist/editor/context.js +1 -1
- package/dist/editor/menus.js +1 -1
- package/dist/fonts/font-picker.js +3 -3
- package/dist/fonts/pairing-picker.js +1 -1
- package/dist/fonts/provider.js +1 -1
- package/dist/index.d.ts +188 -94
- package/dist/index.js +94 -94
- package/dist/lib/data-islands.js +1 -1
- package/dist/lib/field-context.js +1 -1
- package/dist/lib/floating-arrow.js +1 -1
- package/dist/lib/islands.js +1 -1
- package/dist/lib/layer.js +3 -3
- package/dist/lib/locale.js +2 -2
- package/dist/lib/menu.js +2 -2
- package/dist/lib/provider.js +4 -4
- package/dist/lib/theme-scope.js +4 -3
- package/dist/lib/variants.js +2 -2
- package/dist/media/focal-point.js +1 -1
- package/dist/media/gallery.js +1 -1
- package/dist/media/image-cropper.js +1 -1
- package/dist/media/image-field.js +2 -2
- package/dist/media/lightbox.js +4 -3
- package/dist/media/link-preview.js +3 -3
- package/dist/media/media-library.js +3 -3
- package/dist/media/media-picker.js +1 -1
- package/dist/media/media-provider.js +1 -1
- package/dist/media/video-player.js +4 -4
- package/dist/motion/count-up.js +1 -1
- package/dist/motion/motion-scope.js +2 -2
- package/dist/motion/page-transition.js +1 -1
- package/dist/motion/parallax.js +2 -2
- package/dist/motion/pointer.js +3 -3
- package/dist/motion/reveal.js +3 -3
- package/dist/motion/skeleton-swap.js +1 -1
- package/dist/motion/text-reveal.js +1 -1
- package/dist/motion/ticker.js +1 -1
- package/dist/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/dist/scheduler/gantt.js +2 -2
- package/dist/scheduler/resource-calendar.js +2 -2
- package/dist/scheduler/scheduler.js +3 -3
- package/dist/scheduler/time-tracker.js +4 -4
- package/dist/sortable/kanban.js +2 -2
- package/dist/sortable/sortable-list.js +2 -2
- package/dist/sortable/sortable.js +4 -4
- package/package.json +1 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import
|
|
4
|
+
import * as TogglePrimitive from "radix-ui/toggle";
|
|
5
|
+
import * as ToggleGroupPrimitive from "radix-ui/toggle-group";
|
|
5
6
|
import { cva } from "class-variance-authority";
|
|
6
7
|
import { cn } from "../lib/cn.js";
|
|
7
|
-
export const toggleVariants = cva([
|
|
8
|
+
export const toggleVariants = /*#__PURE__*/ cva([
|
|
8
9
|
"relative inline-flex shrink-0 select-none items-center justify-center gap-1.5 whitespace-nowrap font-medium outline-none",
|
|
9
10
|
"transition-[background-color,color,box-shadow,border-color] duration-150 focus-ring [&_svg]:shrink-0",
|
|
10
11
|
"disabled:pointer-events-none disabled:opacity-45",
|
|
@@ -36,7 +37,7 @@ export const toggleVariants = cva([
|
|
|
36
37
|
* <Toggle variant="outline" defaultPressed>Show archived</Toggle>
|
|
37
38
|
* ```
|
|
38
39
|
*/
|
|
39
|
-
export const Toggle = React.forwardRef(function Toggle({ variant = "ghost", size = "md", label, className, children, title, ...props }, ref) {
|
|
40
|
+
export const Toggle = /*#__PURE__*/ React.forwardRef(function Toggle({ variant = "ghost", size = "md", label, className, children, title, ...props }, ref) {
|
|
40
41
|
const iconOnly = Boolean(label) && !hasText(children);
|
|
41
42
|
return (_jsx(TogglePrimitive.Root, { ref: ref, "data-slot": "toggle", "aria-label": props["aria-label"] ?? (iconOnly ? label : undefined), title: title ?? (iconOnly ? label : undefined), className: cn(toggleVariants({ variant, size, iconOnly }), className), ...props, children: children }));
|
|
42
43
|
});
|
|
@@ -50,7 +51,7 @@ function hasText(node) {
|
|
|
50
51
|
});
|
|
51
52
|
return found;
|
|
52
53
|
}
|
|
53
|
-
const ToggleGroupContext = React.createContext({ variant: "outline", size: "md" });
|
|
54
|
+
const ToggleGroupContext = /*#__PURE__*/ React.createContext({ variant: "outline", size: "md" });
|
|
54
55
|
const trackClass = (orientation) => cn("gap-0.5 rounded-ui border border-line bg-selected p-[3px]", orientation === "vertical" ? "flex-col" : "");
|
|
55
56
|
/**
|
|
56
57
|
* A set of toggles with roving focus (one tab stop, arrow keys move): view switches, alignment,
|
|
@@ -64,7 +65,7 @@ const trackClass = (orientation) => cn("gap-0.5 rounded-ui border border-line bg
|
|
|
64
65
|
* </ToggleGroup>
|
|
65
66
|
* ```
|
|
66
67
|
*/
|
|
67
|
-
export const ToggleGroup = React.forwardRef(function ToggleGroup(props, ref) {
|
|
68
|
+
export const ToggleGroup = /*#__PURE__*/ React.forwardRef(function ToggleGroup(props, ref) {
|
|
68
69
|
const { variant = "segmented", size = "md", orientation = "horizontal", block, className, children, ...rest } = props;
|
|
69
70
|
const ctx = React.useMemo(() => ({ variant, size }), [variant, size]);
|
|
70
71
|
const layout = cn("relative isolate items-stretch", block ? "flex w-full [&>*]:flex-1" : "inline-flex w-fit max-w-full", orientation === "vertical" && "flex-col", variant === "segmented" && trackClass(orientation),
|
|
@@ -93,7 +94,7 @@ function SingleToggleGroup({ value, defaultValue, onValueChange, allowEmpty = fa
|
|
|
93
94
|
}, children: children }));
|
|
94
95
|
}
|
|
95
96
|
/** One toggle inside a `ToggleGroup`. */
|
|
96
|
-
export const ToggleGroupItem = React.forwardRef(function ToggleGroupItem({ label, className, children, title, ...props }, ref) {
|
|
97
|
+
export const ToggleGroupItem = /*#__PURE__*/ React.forwardRef(function ToggleGroupItem({ label, className, children, title, ...props }, ref) {
|
|
97
98
|
const { variant, size } = React.useContext(ToggleGroupContext);
|
|
98
99
|
const iconOnly = Boolean(label) && !hasText(children);
|
|
99
100
|
const segmentSize = variant === "segmented"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import * as TooltipPrimitive from "radix-ui/tooltip";
|
|
3
3
|
import { type VariantProps } from "class-variance-authority";
|
|
4
4
|
/** `true` when a `TooltipProvider` is above this point (IconButton switches from `title` to Tooltip). */
|
|
5
5
|
export declare function useHasTooltipProvider(): boolean;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import
|
|
4
|
+
import * as Slot from "radix-ui/slot";
|
|
5
|
+
import * as TooltipPrimitive from "radix-ui/tooltip";
|
|
5
6
|
import { cva } from "class-variance-authority";
|
|
6
7
|
import { cn } from "../lib/cn.js";
|
|
7
8
|
import { usePortalContainer } from "../lib/theme-scope.js";
|
|
@@ -10,7 +11,7 @@ import { KbdGroup } from "./kbd.js";
|
|
|
10
11
|
/* ------------------------------------------------------------------ */
|
|
11
12
|
/* Provider */
|
|
12
13
|
/* ------------------------------------------------------------------ */
|
|
13
|
-
const TooltipProviderContext = React.createContext(false);
|
|
14
|
+
const TooltipProviderContext = /*#__PURE__*/ React.createContext(false);
|
|
14
15
|
/** `true` when a `TooltipProvider` is above this point (IconButton switches from `title` to Tooltip). */
|
|
15
16
|
export function useHasTooltipProvider() {
|
|
16
17
|
return React.useContext(TooltipProviderContext);
|
|
@@ -32,7 +33,7 @@ export function TooltipRoot(props) {
|
|
|
32
33
|
return (_jsx(EnsureProvider, { children: _jsx(TooltipPrimitive.Root, { ...props }) }));
|
|
33
34
|
}
|
|
34
35
|
export const TooltipTrigger = TooltipPrimitive.Trigger;
|
|
35
|
-
export const tooltipContentVariants = cva([
|
|
36
|
+
export const tooltipContentVariants = /*#__PURE__*/ cva([
|
|
36
37
|
"ui-pop z-(--z-tooltip) max-w-[min(18rem,calc(100vw-1.5rem))] select-none rounded-ui-sm px-2 py-1 text-[12.5px] leading-snug font-medium",
|
|
37
38
|
// tooltips never blur — they open and close too often to spend the glass budget on
|
|
38
39
|
"[--blur:0px] backdrop-filter-none",
|
|
@@ -51,7 +52,7 @@ export const tooltipContentVariants = cva([
|
|
|
51
52
|
},
|
|
52
53
|
defaultVariants: { tone: "inverted" },
|
|
53
54
|
});
|
|
54
|
-
export const TooltipContent = React.forwardRef(function TooltipContent({ className, tone, arrow = false, shortcut, sideOffset = 6, collisionPadding = 8, children, ...props }, ref) {
|
|
55
|
+
export const TooltipContent = /*#__PURE__*/ React.forwardRef(function TooltipContent({ className, tone, arrow = false, shortcut, sideOffset = 6, collisionPadding = 8, children, ...props }, ref) {
|
|
55
56
|
const container = usePortalContainer();
|
|
56
57
|
const inverted = (tone ?? "inverted") === "inverted";
|
|
57
58
|
return (_jsx(TooltipPrimitive.Portal, { container: container, children: _jsxs(TooltipPrimitive.Content, { ref: ref, "data-slot": "tooltip-content", "data-tone": tone ?? "inverted", sideOffset: sideOffset, collisionPadding: collisionPadding, className: cn(tooltipContentVariants({ tone }), className), ...props, children: [_jsx("span", { className: "min-w-0", children: children }), shortcut ? (_jsx(KbdGroup, { keys: shortcut, size: "sm", variant: "ghost", className: cn("-me-0.5", inverted && "[&_kbd_kbd]:border-[color-mix(in_srgb,var(--scene)_28%,transparent)] [&_kbd_kbd]:text-[color-mix(in_srgb,var(--scene)_78%,transparent)]") })) : null, arrow ? (_jsx(TooltipPrimitive.Arrow, { asChild: true, width: 10, height: 5, children: _jsx(FloatingArrow, { width: 10, height: 5, fill: inverted ? "var(--fg)" : "var(--popover-nested)", stroke: inverted ? "none" : "var(--popover-border)" }) })) : null] }) }));
|
|
@@ -19,7 +19,7 @@ const topBarLabels = {
|
|
|
19
19
|
* Bridge between the top bar and the App shell (mobile nav button). App shell provides it; outside
|
|
20
20
|
* a shell the menu button needs its own `onClick`.
|
|
21
21
|
*/
|
|
22
|
-
export const TopBarShellContext = React.createContext(null);
|
|
22
|
+
export const TopBarShellContext = /*#__PURE__*/ React.createContext(null);
|
|
23
23
|
/**
|
|
24
24
|
* The sticky bar above the content: mobile menu button, ⌘K search, contextual actions,
|
|
25
25
|
* notifications and the user menu. The same in every app.
|
|
@@ -33,7 +33,7 @@ export const TopBarShellContext = React.createContext(null);
|
|
|
33
33
|
* </TopBar>
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
|
-
export const TopBar = React.forwardRef(function TopBar({ sticky = true, variant = "bar", scrollTarget, className, role, ...props }, ref) {
|
|
36
|
+
export const TopBar = /*#__PURE__*/ React.forwardRef(function TopBar({ sticky = true, variant = "bar", scrollTarget, className, role, ...props }, ref) {
|
|
37
37
|
const [scrolled, setScrolled] = React.useState(false);
|
|
38
38
|
React.useEffect(() => {
|
|
39
39
|
if (typeof window === "undefined")
|
|
@@ -64,7 +64,7 @@ export function TopBarSeparator({ className }) {
|
|
|
64
64
|
return _jsx("span", { "aria-hidden": true, "data-slot": "top-bar-separator", className: cn("mx-1 h-5 w-px shrink-0 bg-line", className) });
|
|
65
65
|
}
|
|
66
66
|
/** Opens the App shell's mobile navigation. Visible only below 768px. */
|
|
67
|
-
export const TopBarMenuButton = React.forwardRef(function TopBarMenuButton({ className, onClick, labels, ...props }, ref) {
|
|
67
|
+
export const TopBarMenuButton = /*#__PURE__*/ React.forwardRef(function TopBarMenuButton({ className, onClick, labels, ...props }, ref) {
|
|
68
68
|
const shell = React.useContext(TopBarShellContext);
|
|
69
69
|
const t = useLabels("topBar", topBarLabels, labels);
|
|
70
70
|
return (_jsx(IconButton, { ref: ref, label: t("menu"), size: "sm", tooltip: false, "aria-expanded": shell ? shell.mobileNavOpen : undefined, "aria-haspopup": "dialog", onClick: (e) => {
|
|
@@ -77,7 +77,7 @@ export const TopBarMenuButton = React.forwardRef(function TopBarMenuButton({ cla
|
|
|
77
77
|
* The ⌘K trigger: a real button that looks like a field. Collapses to an icon button when the bar is
|
|
78
78
|
* narrower than 560px.
|
|
79
79
|
*/
|
|
80
|
-
export const TopBarSearch = React.forwardRef(function TopBarSearch({ placeholder, shortcut = "mod+k", onOpen, onClick, className, labels, ...props }, ref) {
|
|
80
|
+
export const TopBarSearch = /*#__PURE__*/ React.forwardRef(function TopBarSearch({ placeholder, shortcut = "mod+k", onOpen, onClick, className, labels, ...props }, ref) {
|
|
81
81
|
const t = useLabels("topBar", topBarLabels, labels);
|
|
82
82
|
const palette = useCommandPalette();
|
|
83
83
|
const open = (e) => {
|
package/dist/components/tour.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import
|
|
4
|
+
import * as PopoverPrimitive from "radix-ui/popover";
|
|
5
5
|
import { X } from "lucide-react";
|
|
6
6
|
import { cn } from "../lib/cn.js";
|
|
7
7
|
import { useLabels } from "../lib/labels.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import
|
|
4
|
+
import * as PopoverPrimitive from "radix-ui/popover";
|
|
5
5
|
import { ChevronsUpDown, Plus, Search, X } from "lucide-react";
|
|
6
6
|
import { cn } from "../lib/cn.js";
|
|
7
7
|
import { FieldContextReset, useFieldControl } from "../lib/field-context.js";
|
|
@@ -60,7 +60,7 @@ function PathSeparator() {
|
|
|
60
60
|
* <TreeSelect multiple nodes={regions} valueMode="parent" value={territories} onValueChange={setTerritories} />
|
|
61
61
|
* ```
|
|
62
62
|
*/
|
|
63
|
-
export const TreeSelect = React.forwardRef(function TreeSelect(props, ref) {
|
|
63
|
+
export const TreeSelect = /*#__PURE__*/ React.forwardRef(function TreeSelect(props, ref) {
|
|
64
64
|
const { nodes, loadChildren, selectable = "any", showPath = true, defaultExpanded = "selected", onCreate, searchable = true, mode = "popover", height = 288, size = "md", placeholder, searchPlaceholder, labels, className, } = props;
|
|
65
65
|
const multiple = props.multiple === true;
|
|
66
66
|
const t = useLabels("treeSelect", treeSelectLabels, labels);
|
|
@@ -19,7 +19,7 @@ const treeViewLabels = {
|
|
|
19
19
|
noMatches: "No matches for “{query}”",
|
|
20
20
|
results: "{count, plural, =0 {No matches} one {# match} other {# matches}}",
|
|
21
21
|
};
|
|
22
|
-
export const treeRowVariants = cva([
|
|
22
|
+
export const treeRowVariants = /*#__PURE__*/ cva([
|
|
23
23
|
"group/tree-row relative flex w-full min-w-0 cursor-default select-none items-center gap-1.5 rounded-ui-sm pe-1.5 text-start outline-none",
|
|
24
24
|
"transition-colors duration-100",
|
|
25
25
|
"hover:bg-hover focus-visible:bg-hover focus-visible:shadow-[inset_0_0_0_2px_var(--ring)]",
|
|
@@ -57,7 +57,7 @@ export function TreeLabelText({ text, query, locale }) {
|
|
|
57
57
|
* icon, label, badge and hover actions. Used by Tree view and Tree select; render it inside an
|
|
58
58
|
* element carrying `tree.getTreeProps()`.
|
|
59
59
|
*/
|
|
60
|
-
export const TreeViewRow = React.forwardRef(function TreeViewRow({ item, tree, indent = 16, guides = true, size = "md", variant = "default", checkbox, query, label, actions, labels, onRowClick, className, style, onClick, onDoubleClick, ...props }, ref) {
|
|
60
|
+
export const TreeViewRow = /*#__PURE__*/ React.forwardRef(function TreeViewRow({ item, tree, indent = 16, guides = true, size = "md", variant = "default", checkbox, query, label, actions, labels, onRowClick, className, style, onClick, onDoubleClick, ...props }, ref) {
|
|
61
61
|
const t = useLabels("treeView", treeViewLabels, labels);
|
|
62
62
|
const { locale } = useLocale();
|
|
63
63
|
const { node } = item;
|
|
@@ -95,7 +95,7 @@ export const TreeViewRow = React.forwardRef(function TreeViewRow({ item, tree, i
|
|
|
95
95
|
* <TreeView aria-label="Categories" data={categories} selectionMode="checkbox" checkValueMode="leaf" />
|
|
96
96
|
* ```
|
|
97
97
|
*/
|
|
98
|
-
export const TreeView = React.forwardRef(function TreeView({ data, expanded, defaultExpanded, onExpandedChange, selectionMode = "single", selected, defaultSelected, onSelectedChange, cascade, checkValueMode, isSelectable, loadChildren, filter, onAction, renderActions, renderLabel, virtual = false, height, indent = 16, guides = true, variant = "default", size = "md", emptyState, labels, className, style, ...props }, ref) {
|
|
98
|
+
export const TreeView = /*#__PURE__*/ React.forwardRef(function TreeView({ data, expanded, defaultExpanded, onExpandedChange, selectionMode = "single", selected, defaultSelected, onSelectedChange, cascade, checkValueMode, isSelectable, loadChildren, filter, onAction, renderActions, renderLabel, virtual = false, height, indent = 16, guides = true, variant = "default", size = "md", emptyState, labels, className, style, ...props }, ref) {
|
|
99
99
|
const t = useLabels("treeView", treeViewLabels, labels);
|
|
100
100
|
const { locale, dir } = useLocale();
|
|
101
101
|
const checkbox = selectionMode === "checkbox";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import
|
|
3
|
+
import * as Slot from "radix-ui/slot";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
import { cn } from "../lib/cn.js";
|
|
6
6
|
/*
|
|
7
7
|
* Typography — server-compatible. Headings read the data-font axis: --font-heading,
|
|
8
8
|
* --display-weight / --display-tracking / --display-em, and scale with --display-scale.
|
|
9
9
|
*/
|
|
10
|
-
export const headingVariants = cva("text-balance text-fg [overflow-wrap:break-word]", {
|
|
10
|
+
export const headingVariants = /*#__PURE__*/ cva("text-balance text-fg [overflow-wrap:break-word]", {
|
|
11
11
|
variants: {
|
|
12
12
|
size: {
|
|
13
13
|
/** 56px × display-scale (fluid down to 38px on phones). Hero / page title on websites. */
|
|
@@ -35,14 +35,14 @@ const defaultSize = { 1: "xl", 2: "lg", 3: "md", 4: "sm", 5: "sm", 6: "sm" };
|
|
|
35
35
|
* <Heading level={2} size="md">Billing details</Heading>
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
|
-
export const Heading = React.forwardRef(function Heading({ level = 2, size, asChild, className, ...props }, ref) {
|
|
38
|
+
export const Heading = /*#__PURE__*/ React.forwardRef(function Heading({ level = 2, size, asChild, className, ...props }, ref) {
|
|
39
39
|
const Comp = (asChild ? Slot.Root : `h${level}`);
|
|
40
40
|
return _jsx(Comp, { ref: ref, "data-slot": "heading", "data-size": size ?? defaultSize[level], className: cn(headingVariants({ size: size ?? defaultSize[level] }), className), ...props });
|
|
41
41
|
});
|
|
42
42
|
/* ------------------------------------------------------------------ */
|
|
43
43
|
/* Text */
|
|
44
44
|
/* ------------------------------------------------------------------ */
|
|
45
|
-
export const textVariants = cva("", {
|
|
45
|
+
export const textVariants = /*#__PURE__*/ cva("", {
|
|
46
46
|
variants: {
|
|
47
47
|
size: {
|
|
48
48
|
xs: "text-xs leading-[1.45]",
|
|
@@ -78,22 +78,22 @@ export const textVariants = cva("", {
|
|
|
78
78
|
* <Text truncate={2}>{post.excerpt}</Text>
|
|
79
79
|
* ```
|
|
80
80
|
*/
|
|
81
|
-
export const Text = React.forwardRef(function Text({ as = "p", size, tone, weight, truncate, tabular, asChild, className, style, title, children, ...props }, ref) {
|
|
81
|
+
export const Text = /*#__PURE__*/ React.forwardRef(function Text({ as = "p", size, tone, weight, truncate, tabular, asChild, className, style, title, children, ...props }, ref) {
|
|
82
82
|
const Comp = (asChild ? Slot.Root : as);
|
|
83
83
|
const lines = typeof truncate === "number" && truncate > 1 ? truncate : undefined;
|
|
84
84
|
const autoTitle = truncate && title === undefined && (typeof children === "string" || typeof children === "number") ? String(children) : title;
|
|
85
85
|
return (_jsx(Comp, { ref: ref, "data-slot": "text", title: autoTitle, className: cn(textVariants({ size, tone, weight }), as === "p" && !truncate && "text-pretty", (truncate === true || truncate === 1) && "truncate", lines && "overflow-hidden [display:-webkit-box] [-webkit-box-orient:vertical]", tabular && "tabular", className), style: lines ? { ...style, WebkitLineClamp: lines } : style, ...props, children: children }));
|
|
86
86
|
});
|
|
87
87
|
/** The opening paragraph under a page or article title. */
|
|
88
|
-
export const Lead = React.forwardRef(function Lead({ className, ...props }, ref) {
|
|
88
|
+
export const Lead = /*#__PURE__*/ React.forwardRef(function Lead({ className, ...props }, ref) {
|
|
89
89
|
return _jsx("p", { ref: ref, "data-slot": "lead", className: cn("text-pretty text-[length:var(--text-lead)] leading-[1.5] text-fg-muted", className), ...props });
|
|
90
90
|
});
|
|
91
91
|
/** Inline code: `slug`, `npm run build`, a field key. */
|
|
92
|
-
export const Code = React.forwardRef(function Code({ className, ...props }, ref) {
|
|
92
|
+
export const Code = /*#__PURE__*/ React.forwardRef(function Code({ className, ...props }, ref) {
|
|
93
93
|
return (_jsx("code", { ref: ref, "data-slot": "code", className: cn("rounded-[5px] border border-line bg-selected px-[0.36em] py-[0.08em] font-mono text-[0.86em] text-fg [overflow-wrap:anywhere]", className), ...props }));
|
|
94
94
|
});
|
|
95
95
|
/** A pulled quote or testimonial, set in the heading face. */
|
|
96
|
-
export const Blockquote = React.forwardRef(function Blockquote({ attribution, className, children, ...props }, ref) {
|
|
96
|
+
export const Blockquote = /*#__PURE__*/ React.forwardRef(function Blockquote({ attribution, className, children, ...props }, ref) {
|
|
97
97
|
return (_jsxs("figure", { "data-slot": "blockquote", className: cn("grid gap-2.5 border-s-2 border-accent-ink ps-5", className), children: [_jsx("blockquote", { ref: ref, className: "font-display text-[length:calc(22px*var(--display-scale))] leading-[1.4] text-fg [&_em]:[font-style:var(--display-em)]", ...props, children: children }), attribution ? _jsx("figcaption", { className: "text-[13px] text-fg-subtle", children: attribution }) : null] }));
|
|
98
98
|
});
|
|
99
99
|
/**
|
|
@@ -105,7 +105,7 @@ export const Blockquote = React.forwardRef(function Blockquote({ attribution, cl
|
|
|
105
105
|
* <Numeric signOf={-4.2}>−4.2%</Numeric>
|
|
106
106
|
* ```
|
|
107
107
|
*/
|
|
108
|
-
export const Numeric = React.forwardRef(function Numeric({ mono, signOf, className, ...props }, ref) {
|
|
108
|
+
export const Numeric = /*#__PURE__*/ React.forwardRef(function Numeric({ mono, signOf, className, ...props }, ref) {
|
|
109
109
|
return (_jsx("span", { ref: ref, "data-slot": "numeric", className: cn("tabular whitespace-nowrap", mono && "font-mono text-[0.94em]", signOf !== undefined && (signOf < 0 ? "text-danger" : signOf > 0 ? "text-success" : "text-fg-muted"), className), ...props }));
|
|
110
110
|
});
|
|
111
111
|
/**
|
|
@@ -118,11 +118,11 @@ export const Numeric = React.forwardRef(function Numeric({ mono, signOf, classNa
|
|
|
118
118
|
* <Prose size="lg" lang="en"><h2>Opening hours</h2><p>…</p></Prose>
|
|
119
119
|
* ```
|
|
120
120
|
*/
|
|
121
|
-
export const Prose = React.forwardRef(function Prose({ size = "md", html, fullWidth, asChild, className, children, ...props }, ref) {
|
|
121
|
+
export const Prose = /*#__PURE__*/ React.forwardRef(function Prose({ size = "md", html, fullWidth, asChild, className, children, ...props }, ref) {
|
|
122
122
|
const Comp = asChild ? Slot.Root : "div";
|
|
123
123
|
return (_jsx(Comp, { ref: ref, "data-slot": "prose", className: cn("prose-ui", size === "sm" && "prose-ui-sm", size === "lg" && "prose-ui-lg", fullWidth && "max-w-none", className), ...(html !== undefined ? { dangerouslySetInnerHTML: { __html: html } } : { children }), ...props }));
|
|
124
124
|
});
|
|
125
125
|
/** Wraps a wide table inside Prose in a keyboard-scrollable region. */
|
|
126
|
-
export const ProseTable = React.forwardRef(function ProseTable({ label, className, ...props }, ref) {
|
|
126
|
+
export const ProseTable = /*#__PURE__*/ React.forwardRef(function ProseTable({ label, className, ...props }, ref) {
|
|
127
127
|
return _jsx("div", { ref: ref, role: "region", "aria-label": label, tabIndex: 0, "data-slot": "prose-table", className: cn(className), ...props });
|
|
128
128
|
});
|
|
@@ -67,7 +67,7 @@ function Bold({ text, query, locale }) {
|
|
|
67
67
|
* <UserPicker multiple trigger="avatars" source={people} value={assignees} onValueChange={setAssignees} aria-label="Assignees" />
|
|
68
68
|
* ```
|
|
69
69
|
*/
|
|
70
|
-
export const UserPicker = React.forwardRef(function UserPicker(props, ref) {
|
|
70
|
+
export const UserPicker = /*#__PURE__*/ React.forwardRef(function UserPicker(props, ref) {
|
|
71
71
|
const { source, teams, getTeamMembers, currentUserId, trigger = "field", maxAvatars = 3, roleLabel, labels, selectedRecords, ...rest } = props;
|
|
72
72
|
const t = useLabels("userPicker", userPickerLabels, labels);
|
|
73
73
|
const { locale } = useLocale();
|
|
@@ -156,7 +156,7 @@ export const UserPicker = React.forwardRef(function UserPicker(props, ref) {
|
|
|
156
156
|
return _jsx(RecordPicker, { ref: ref, ...shared, source: combined, multiple: false, renderTrigger: renderTrigger });
|
|
157
157
|
});
|
|
158
158
|
/** Avatar stack + "+" — the compact trigger for table cells and record headers. */
|
|
159
|
-
const AvatarsTrigger = React.forwardRef(function AvatarsTrigger({ selected, max, size = "md", className, "aria-label": label, ...props }, ref) {
|
|
159
|
+
const AvatarsTrigger = /*#__PURE__*/ React.forwardRef(function AvatarsTrigger({ selected, max, size = "md", className, "aria-label": label, ...props }, ref) {
|
|
160
160
|
const avatarSize = size === "sm" ? "xs" : size === "lg" ? "md" : "sm";
|
|
161
161
|
return (_jsxs("button", { ref: ref, type: "button", "data-slot": "user-picker-avatars", className: cn("group/avatars inline-flex items-center gap-1 rounded-full p-0.5 pe-1 outline-none transition-colors hover:bg-hover focus-ring disabled:pointer-events-none disabled:opacity-50", className), ...props, children: [label ? _jsx("span", { className: "sr-only", children: label }) : null, selected.length ? (_jsx(AvatarGroup, { max: max, size: avatarSize, "aria-hidden": true, children: selected.map((u) => (_jsx(Avatar, { name: u.name, src: u.avatarUrl }, u.id))) })) : null, _jsx("span", { "aria-hidden": true, className: cn("inline-flex items-center justify-center rounded-full border border-dashed border-field-border-hover text-fg-subtle transition-colors group-hover/avatars:border-fg-subtle group-hover/avatars:text-fg", avatarSize === "xs" ? "size-5 [&_svg]:size-3" : avatarSize === "sm" ? "size-6 [&_svg]:size-3.5" : "size-8 [&_svg]:size-4"), children: _jsx(Plus, {}) })] }));
|
|
162
162
|
});
|
|
@@ -164,7 +164,7 @@ function Segments({ line }) {
|
|
|
164
164
|
* <DiffView before={v11.body} after={v12.body} mode="split" beforeLabel="v11" afterLabel="v12" />
|
|
165
165
|
* ```
|
|
166
166
|
*/
|
|
167
|
-
export const DiffView = React.forwardRef(function DiffView({ before, after, granularity = "word", mode = "unified", context = 3, beforeLabel, afterLabel, lineNumbers = true, toolbar = true, actions, wrap = true, labels, className, ...props }, ref) {
|
|
167
|
+
export const DiffView = /*#__PURE__*/ React.forwardRef(function DiffView({ before, after, granularity = "word", mode = "unified", context = 3, beforeLabel, afterLabel, lineNumbers = true, toolbar = true, actions, wrap = true, labels, className, ...props }, ref) {
|
|
168
168
|
const t = useLabels("versionHistory", versionHistoryLabels, labels);
|
|
169
169
|
const f = useFormat();
|
|
170
170
|
const lines = React.useMemo(() => diffText(before, after, granularity), [before, after, granularity]);
|
|
@@ -275,7 +275,7 @@ function humanize(key) {
|
|
|
275
275
|
* ]} />
|
|
276
276
|
* ```
|
|
277
277
|
*/
|
|
278
|
-
export const FieldDiff = React.forwardRef(function FieldDiff({ before, after, fields, onlyChanges = true, beforeLabel, afterLabel, labels, className, ...props }, ref) {
|
|
278
|
+
export const FieldDiff = /*#__PURE__*/ React.forwardRef(function FieldDiff({ before, after, fields, onlyChanges = true, beforeLabel, afterLabel, labels, className, ...props }, ref) {
|
|
279
279
|
const t = useLabels("versionHistory", versionHistoryLabels, labels);
|
|
280
280
|
const f = useFormat();
|
|
281
281
|
const defs = fields ?? diffRecords(before, after).map((d) => ({ key: d.key, label: humanize(d.key) }));
|
|
@@ -314,7 +314,7 @@ export const FieldDiff = React.forwardRef(function FieldDiff({ before, after, fi
|
|
|
314
314
|
* />
|
|
315
315
|
* ```
|
|
316
316
|
*/
|
|
317
|
-
export const VersionHistory = React.forwardRef(function VersionHistory({ versions, compare, defaultCompare, onCompareChange, loadVersion, fields, onRestore, layout = "page", defaultMode, granularity = "word", context = 3, labels, className, ...props }, ref) {
|
|
317
|
+
export const VersionHistory = /*#__PURE__*/ React.forwardRef(function VersionHistory({ versions, compare, defaultCompare, onCompareChange, loadVersion, fields, onRestore, layout = "page", defaultMode, granularity = "word", context = 3, labels, className, ...props }, ref) {
|
|
318
318
|
const t = useLabels("versionHistory", versionHistoryLabels, labels);
|
|
319
319
|
const f = useFormat();
|
|
320
320
|
const sorted = React.useMemo(() => [...versions].sort((a, b) => b.createdAt.localeCompare(a.createdAt)), [versions]);
|
|
@@ -162,7 +162,7 @@ const features = tableFeatures({
|
|
|
162
162
|
sortedRowModel: createSortedRowModel(),
|
|
163
163
|
paginatedRowModel: createPaginatedRowModel(),
|
|
164
164
|
});
|
|
165
|
-
const DataTableContext = React.createContext(null);
|
|
165
|
+
const DataTableContext = /*#__PURE__*/ React.createContext(null);
|
|
166
166
|
/**
|
|
167
167
|
* The table's state and helpers, for custom layouts and bindings inside `<DataTable>`.
|
|
168
168
|
*
|
|
@@ -394,7 +394,7 @@ const chipSize = {
|
|
|
394
394
|
* One applied filter: `Stage │ is any of │ Proposal, Won │ ×`. Every segment is its own button
|
|
395
395
|
* with a full accessible name; × removes it (Delete / Backspace too).
|
|
396
396
|
*/
|
|
397
|
-
export const FilterChip = React.forwardRef(function FilterChip({ clause, field, onEdit, onRemove, readOnly, disabled, size = "md", labels, optionCache }, ref) {
|
|
397
|
+
export const FilterChip = /*#__PURE__*/ React.forwardRef(function FilterChip({ clause, field, onEdit, onRemove, readOnly, disabled, size = "md", labels, optionCache }, ref) {
|
|
398
398
|
const t = useLabels("filterBar", filterBarLabels, labels);
|
|
399
399
|
const format = useFormat();
|
|
400
400
|
const dl = React.useMemo(() => describeLabelsFrom(t), [t]);
|
|
@@ -421,7 +421,7 @@ export const FilterChip = React.forwardRef(function FilterChip({ clause, field,
|
|
|
421
421
|
* <FilterBar fields={fields} value={filters} onChange={setFilters} resultCount={rows.length} />
|
|
422
422
|
* ```
|
|
423
423
|
*/
|
|
424
|
-
export const FilterBar = React.forwardRef(function FilterBar({ fields, value: valueProp, defaultValue, onChange, q, onQChange, searchPlaceholder, facets, resultCount, maxVisibleChips, layout = "auto", size = "md", disabled, readOnly, me, addRequest, actions, labels, className, ...props }, ref) {
|
|
424
|
+
export const FilterBar = /*#__PURE__*/ React.forwardRef(function FilterBar({ fields, value: valueProp, defaultValue, onChange, q, onQChange, searchPlaceholder, facets, resultCount, maxVisibleChips, layout = "auto", size = "md", disabled, readOnly, me, addRequest, actions, labels, className, ...props }, ref) {
|
|
425
425
|
const t = useLabels("filterBar", filterBarLabels, labels);
|
|
426
426
|
const format = useFormat();
|
|
427
427
|
const dl = React.useMemo(() => describeLabelsFrom(t), [t]);
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
1
|
+
export { ME, clauseId, createListState, defaultOps, emptyColumnsState, emptyFilterGroup, emptySelection, fieldOps, flattenClauses, isClauseComplete, isCursorPage, isFilterGroup, isRowSelected, opTakesNoValue, selectionCount } from "./types.js";
|
|
2
|
+
export type { ColumnsState, CursorPage, DataTableSelection, FieldType, FilterClause, FilterFieldDef, FilterGroup, FilterOp, FilterOption, ListDensity, ListState, ListStateChangeReason, OffsetPage, PageState, RelativeDate, RelativeDatePreset, SavedView, SortClause, ViewState } from "./types.js";
|
|
3
|
+
export { addDays, applyFilters, dayKey, describeFilters, describeValue, filterOpLabels, hasActiveFilters, matchClause, readField, relativeDateLabels, resolveRelativeDate, searchRows, weekStartFor } from "./filter-fns.js";
|
|
4
|
+
export type { DescribeLabels, FilterContext } from "./filter-fns.js";
|
|
5
|
+
export { createHistoryAdapter, createMemoryAdapter, decodeFilters, encodeFilters, listStateToParams, mergeListStateIntoSearch, parseListState, resolveUrlKeys, serializeListState } from "./url-state.js";
|
|
6
|
+
export type { ParseOptions, SerializeOptions, UrlStateAdapter, UrlStateKeys, UrlStateOptions } from "./url-state.js";
|
|
7
|
+
export { applyViewState, resolveInitialView, toViewState, viewStateEqual } from "./view-state.js";
|
|
8
|
+
export { csvDelimiter, downloadCsv, escapeCsvCell, toCsv } from "./csv.js";
|
|
9
|
+
export type { CsvCell, CsvOptions } from "./csv.js";
|
|
10
|
+
export { FilterBar, FilterChip, filterBarLabels } from "./filter-bar.js";
|
|
11
|
+
export type { FilterBarLabels, FilterBarProps, FilterChipProps } from "./filter-bar.js";
|
|
12
|
+
export { SavedViews, savedViewsLabels } from "./saved-views.js";
|
|
13
|
+
export type { SavedViewsLabels, SavedViewsProps, SavedViewsSaveInput } from "./saved-views.js";
|
|
14
|
+
export { DataTable, DataTableBulkBar, DataTableCards, DataTableContent, DataTableExport, DataTableFilterBar, DataTableFooter, DataTableSavedViews, DataTableSearch, DataTableToolbar, DataTableValue, DataTableViewOptions, dataTableLabels, filterFieldsFromColumns, readColumnValue, useDataTable } from "./data-table.js";
|
|
15
|
+
export type { DataTableBulkAction, DataTableCellContext, DataTableCellEditor, DataTableColumn, DataTableContextValue, DataTableExportOptions, DataTableLabels, DataTableProps, DataTableSavedViewsProps, DataTableSearchProps } from "./data-table.js";
|
package/dist/data-table/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// Public API of @vamos-ui/react/data-table — Data Table, Filter bar, Saved views and the shared list-state contract.
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
2
|
+
// Named re-exports on purpose (not `export *`): see scripts/named-exports.mjs.
|
|
3
|
+
export { ME, clauseId, createListState, defaultOps, emptyColumnsState, emptyFilterGroup, emptySelection, fieldOps, flattenClauses, isClauseComplete, isCursorPage, isFilterGroup, isRowSelected, opTakesNoValue, selectionCount } from "./types.js";
|
|
4
|
+
export { addDays, applyFilters, dayKey, describeFilters, describeValue, filterOpLabels, hasActiveFilters, matchClause, readField, relativeDateLabels, resolveRelativeDate, searchRows, weekStartFor } from "./filter-fns.js";
|
|
5
|
+
export { createHistoryAdapter, createMemoryAdapter, decodeFilters, encodeFilters, listStateToParams, mergeListStateIntoSearch, parseListState, resolveUrlKeys, serializeListState } from "./url-state.js";
|
|
6
|
+
export { applyViewState, resolveInitialView, toViewState, viewStateEqual } from "./view-state.js";
|
|
7
|
+
export { csvDelimiter, downloadCsv, escapeCsvCell, toCsv } from "./csv.js";
|
|
8
|
+
export { FilterBar, FilterChip, filterBarLabels } from "./filter-bar.js";
|
|
9
|
+
export { SavedViews, savedViewsLabels } from "./saved-views.js";
|
|
10
|
+
export { DataTable, DataTableBulkBar, DataTableCards, DataTableContent, DataTableExport, DataTableFilterBar, DataTableFooter, DataTableSavedViews, DataTableSearch, DataTableToolbar, DataTableValue, DataTableViewOptions, dataTableLabels, filterFieldsFromColumns, readColumnValue, useDataTable } from "./data-table.js";
|
|
@@ -76,7 +76,7 @@ function defaultShareUrl(id) {
|
|
|
76
76
|
* <SavedViews views={views} {...table.savedViewsBinding(views)} onSave={create} onUpdate={update} />
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
|
-
export const SavedViews = React.forwardRef(function SavedViews({ views, activeId, current, isDirty: dirtyProp, onSelect, onSave, onUpdate, onRename, onDelete, onSetDefault, onReset, getShareUrl = defaultShareUrl, permissions, variant = "auto", showAll = true, maxVisible = 4, sortByName, panelId, size = "md", labels, className, ...props }, ref) {
|
|
79
|
+
export const SavedViews = /*#__PURE__*/ React.forwardRef(function SavedViews({ views, activeId, current, isDirty: dirtyProp, onSelect, onSave, onUpdate, onRename, onDelete, onSetDefault, onReset, getShareUrl = defaultShareUrl, permissions, variant = "auto", showAll = true, maxVisible = 4, sortByName, panelId, size = "md", labels, className, ...props }, ref) {
|
|
80
80
|
const t = useLabels("savedViews", savedViewsLabels, labels);
|
|
81
81
|
const { locale } = useLocale();
|
|
82
82
|
const { ref: measureRef, width } = useContainerWidth();
|
|
@@ -238,7 +238,7 @@ export function BlockEditor(props) {
|
|
|
238
238
|
* The editable canvas. Wears the site theme (`canvasTheme`) and is always `solid`, even inside a
|
|
239
239
|
* glass admin, for long-text readability and scroll performance.
|
|
240
240
|
*/
|
|
241
|
-
export const BlockEditorContent = React.forwardRef(function BlockEditorContent({ className, ...props }, ref) {
|
|
241
|
+
export const BlockEditorContent = /*#__PURE__*/ React.forwardRef(function BlockEditorContent({ className, ...props }, ref) {
|
|
242
242
|
const { editor, variant, lang, editorLabel, a11y, readOnly, size, canvasTheme = {} } = useBlockEditor();
|
|
243
243
|
// ARIA on the contenteditable element (Tiptap owns the node).
|
|
244
244
|
React.useEffect(() => {
|
package/dist/editor/context.js
CHANGED
|
@@ -17,7 +17,7 @@ export function createSlashStore() {
|
|
|
17
17
|
close: { current: null },
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
export const BlockEditorContext = React.createContext(null);
|
|
20
|
+
export const BlockEditorContext = /*#__PURE__*/ React.createContext(null);
|
|
21
21
|
/** The surrounding `BlockEditor` (editor instance, registry, labels…). */
|
|
22
22
|
export function useBlockEditor() {
|
|
23
23
|
const ctx = React.useContext(BlockEditorContext);
|
package/dist/editor/menus.js
CHANGED
|
@@ -43,7 +43,7 @@ function useToolbarKeys(editor) {
|
|
|
43
43
|
items[next].focus();
|
|
44
44
|
}, [editor]);
|
|
45
45
|
}
|
|
46
|
-
const ToolbarButton = React.forwardRef(function ToolbarButton({ label, shortcut, active, first, className, children, ...props }, ref) {
|
|
46
|
+
const ToolbarButton = /*#__PURE__*/ React.forwardRef(function ToolbarButton({ label, shortcut, active, first, className, children, ...props }, ref) {
|
|
47
47
|
return (_jsx(IconButtonTooltip, { label: label, shortcut: shortcut, side: "top", children: _jsx("button", { ref: ref, type: "button", "data-toolbar-item": "", "aria-label": label, "aria-pressed": active === undefined ? undefined : active, tabIndex: first ? 0 : -1,
|
|
48
48
|
// Keep the text selection: never steal focus on pointer down.
|
|
49
49
|
onMouseDown: (e) => e.preventDefault(), className: cn("vui-tb-btn focus-ring", className), ...props, children: children }) }));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Check, ChevronsUpDown, Search } from "lucide-react";
|
|
5
|
-
import
|
|
5
|
+
import * as PopoverPrimitive from "radix-ui/popover";
|
|
6
6
|
import { cn } from "../lib/cn.js";
|
|
7
7
|
import { controlVariants } from "../lib/variants.js";
|
|
8
8
|
import { useControllableState } from "../lib/use-controllable-state.js";
|
|
@@ -73,7 +73,7 @@ function useSeen(root) {
|
|
|
73
73
|
* focus stays in the search field; ↑/↓, PageUp/PageDown, Home/End (with Ctrl) move, Enter selects.
|
|
74
74
|
* Use it inline (settings pages) or through `FontPicker` (popover).
|
|
75
75
|
*/
|
|
76
|
-
export const FontPickerList = React.forwardRef(function FontPickerList({ value: valueProp, defaultValue, onValueChange, fonts = googleFonts, categories, previewText = FONT_PREVIEW_TEXT, loadPreviews = true, specimen = true, autoFocus, listHeight = "18rem", labels, className, ...props }, ref) {
|
|
76
|
+
export const FontPickerList = /*#__PURE__*/ React.forwardRef(function FontPickerList({ value: valueProp, defaultValue, onValueChange, fonts = googleFonts, categories, previewText = FONT_PREVIEW_TEXT, loadPreviews = true, specimen = true, autoFocus, listHeight = "18rem", labels, className, ...props }, ref) {
|
|
77
77
|
const t = useLabels("fontPicker", fontPickerLabels, labels);
|
|
78
78
|
const { locale } = useLocale();
|
|
79
79
|
const uid = React.useId();
|
|
@@ -201,7 +201,7 @@ export const FontPickerList = React.forwardRef(function FontPickerList({ value:
|
|
|
201
201
|
* A select-like trigger that opens the searchable font list in a popover. Closes on selection.
|
|
202
202
|
* Inside a `Field` it picks up the id, description and invalid state.
|
|
203
203
|
*/
|
|
204
|
-
export const FontPicker = React.forwardRef(function FontPicker(rawProps, ref) {
|
|
204
|
+
export const FontPicker = /*#__PURE__*/ React.forwardRef(function FontPicker(rawProps, ref) {
|
|
205
205
|
const props = useFieldControl(rawProps);
|
|
206
206
|
const { open: openProp, defaultOpen, onOpenChange, size = "md", placeholder, disabled, showCategory = true, align = "start", id, name, required, className, contentClassName, value: valueProp, defaultValue, onValueChange, labels, loadPreviews = true, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid, ...listProps } = props;
|
|
207
207
|
delete listProps.readOnly;
|
|
@@ -17,7 +17,7 @@ export const fontPairingPickerLabels = {
|
|
|
17
17
|
* Pick one of the curated pairings. A WAI-ARIA radio group with a roving tab stop:
|
|
18
18
|
* arrow keys move and select, Home/End jump to the ends.
|
|
19
19
|
*/
|
|
20
|
-
export const FontPairingPicker = React.forwardRef(function FontPairingPicker({ value: valueProp, defaultValue, onValueChange, pairings = fontPairings, layout = "grid", showDescription, loadPreviews = true, disabled, labels, className, onKeyDown, ...props }, ref) {
|
|
20
|
+
export const FontPairingPicker = /*#__PURE__*/ React.forwardRef(function FontPairingPicker({ value: valueProp, defaultValue, onValueChange, pairings = fontPairings, layout = "grid", showDescription, loadPreviews = true, disabled, labels, className, onKeyDown, ...props }, ref) {
|
|
21
21
|
const t = useLabels("fontPairingPicker", fontPairingPickerLabels, labels);
|
|
22
22
|
const [value, setValue] = useControllableState({ value: valueProp, defaultValue: defaultValue ?? null, name: "FontPairingPicker" });
|
|
23
23
|
const refs = React.useRef([]);
|
package/dist/fonts/provider.js
CHANGED
|
@@ -5,7 +5,7 @@ import { cn } from "../lib/cn.js";
|
|
|
5
5
|
import { useControllableState, useIsomorphicLayoutEffect } from "../lib/use-controllable-state.js";
|
|
6
6
|
import { applyFontPairing, clearFontPairing, fontPairings, getFontPairing, pairingFamilies, pairingVars } from "./pairings.js";
|
|
7
7
|
import { loadGoogleFonts } from "./loader.js";
|
|
8
|
-
const FontPairingContext = React.createContext(null);
|
|
8
|
+
const FontPairingContext = /*#__PURE__*/ React.createContext(null);
|
|
9
9
|
/** The active pairing and a setter. Outside a `FontProvider` it returns the Editorial preset and a no-op setter. */
|
|
10
10
|
export function useFontPairing() {
|
|
11
11
|
return React.useContext(FontPairingContext) ?? { pairing: fontPairings[0], setPairing: () => { }, pairings: fontPairings };
|