ixia-ui-react 1.4.0 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +6 -6
- package/dist/index.js +95 -88
- package/dist/index.js.map +1 -1
- package/package.json +8 -2
package/dist/index.d.ts
CHANGED
|
@@ -113,7 +113,7 @@ declare const Alert: typeof Alert$1 & {
|
|
|
113
113
|
//#endregion
|
|
114
114
|
//#region src/components/button/button.types.d.ts
|
|
115
115
|
declare const buttonVariants: (props?: ({
|
|
116
|
-
size?: "extraSmall" | "
|
|
116
|
+
size?: "extraSmall" | "large" | "medium" | "small" | null | undefined;
|
|
117
117
|
tone?: "accent" | "brand" | "error" | "info" | "neutral" | "success" | "warning" | null | undefined;
|
|
118
118
|
variant?: "elevated" | "fill" | "ghost" | "link" | "outline" | "soft" | null | undefined;
|
|
119
119
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -307,14 +307,14 @@ declare const Avatar: typeof Avatar$2 & {
|
|
|
307
307
|
//#endregion
|
|
308
308
|
//#region src/components/badge/badge.types.d.ts
|
|
309
309
|
declare const badgeVariants: (props?: ({
|
|
310
|
-
size?: "
|
|
310
|
+
size?: "large" | "medium" | "small" | null | undefined;
|
|
311
311
|
tone?: "accent" | "brand" | "error" | "info" | "neutral" | "success" | "warning" | null | undefined;
|
|
312
312
|
variant?: "fill" | "outline" | "soft" | null | undefined;
|
|
313
313
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
314
314
|
type BadgeProps = ComponentProps<'div'> & VariantProps<typeof badgeVariants>;
|
|
315
315
|
//#endregion
|
|
316
316
|
//#region src/components/badge/badge.d.ts
|
|
317
|
-
export declare function Badge({ className, size, tone, variant, ref, ...props }: BadgeProps): import("react").JSX.Element;
|
|
317
|
+
export declare function Badge({ className, size, tone, variant, ref, children, ...props }: BadgeProps): import("react").JSX.Element;
|
|
318
318
|
//#endregion
|
|
319
319
|
//#region src/components/bento-box/bento-box.types.d.ts
|
|
320
320
|
declare const bentoBoxVariants: (props?: ({
|
|
@@ -392,12 +392,12 @@ declare const Breadcrumb: typeof Breadcrumb$1 & {
|
|
|
392
392
|
};
|
|
393
393
|
//#endregion
|
|
394
394
|
//#region src/components/button/button.d.ts
|
|
395
|
-
export declare function Button({ tone, variant, size, className, ...props }: ButtonProps): import("react").JSX.Element;
|
|
395
|
+
export declare function Button({ tone, variant, size, className, children, ...props }: ButtonProps): import("react").JSX.Element;
|
|
396
396
|
//#endregion
|
|
397
397
|
//#region src/components/button-group/button-group.types.d.ts
|
|
398
398
|
declare const buttonGroupVariants: (props?: ({
|
|
399
399
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
400
|
-
size?: "extraSmall" | "
|
|
400
|
+
size?: "extraSmall" | "large" | "medium" | "small" | null | undefined;
|
|
401
401
|
tone?: "accent" | "brand" | "error" | "info" | "neutral" | "success" | "warning" | null | undefined;
|
|
402
402
|
variant?: "elevated" | "fill" | "ghost" | "outline" | "soft" | null | undefined;
|
|
403
403
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -1458,7 +1458,7 @@ export declare function TextArea({ variant, className, ref, ...props }: TextArea
|
|
|
1458
1458
|
//#endregion
|
|
1459
1459
|
//#region src/components/toggle/toggle.types.d.ts
|
|
1460
1460
|
declare const toggleVariants: (props?: ({
|
|
1461
|
-
size?: "
|
|
1461
|
+
size?: "large" | "medium" | "small" | null | undefined;
|
|
1462
1462
|
tone?: "accent" | "brand" | "error" | "info" | "neutral" | "success" | "warning" | null | undefined;
|
|
1463
1463
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
1464
1464
|
type ToggleProps = Omit<React.ComponentProps<typeof Toggle$1>, 'children'> & VariantProps<typeof toggleVariants> & {
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { cva } from "class-variance-authority";
|
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { ArrowsDownUpIcon, CaretDownIcon, CaretLeftIcon, CaretLineLeftIcon, CaretLineRightIcon, CaretRightIcon, CaretUpDownIcon, CaretUpIcon, CheckCircleIcon, CheckIcon, CircleNotchIcon, CopyIcon, DotsThreeIcon, DownloadIcon, EyeClosedIcon, EyeIcon, FileArrowUpIcon, FolderIcon, FolderOpenIcon, FolderSimpleIcon, FunnelIcon, FunnelSimpleIcon, InfoIcon, LockSimpleIcon, LockSimpleOpenIcon, MagnifyingGlassIcon, MinusIcon, PercentIcon, PlusIcon, SortAscendingIcon, SortDescendingIcon, TrashIcon, UploadIcon, WarningCircleIcon, WarningIcon, XCircleIcon, XIcon } from "@phosphor-icons/react";
|
|
7
7
|
import { AlertDialog as AlertDialog$1, Button as Button$1, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, Drawer as Drawer$1, Meter as Meter$1, NavigationMenu as NavigationMenu$1, OTPField, PreviewCard as PreviewCard$1, Radio as Radio$1, RadioGroup as RadioGroup$1, Slider as Slider$1 } from "@base-ui/react";
|
|
8
|
-
import React, { Children, createContext, createElement, isValidElement, useContext, useEffect, useId, useRef, useState } from "react";
|
|
8
|
+
import React, { Children, Fragment as Fragment$1, createContext, createElement, isValidElement, useContext, useEffect, useId, useRef, useState } from "react";
|
|
9
9
|
import { Autocomplete as Autocomplete$1 } from "@base-ui/react/autocomplete";
|
|
10
10
|
import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
|
|
11
11
|
import { DayButton, DayPicker, getDefaultClassNames, isDateRange, labelDayButton } from "@daypicker/react";
|
|
@@ -175,7 +175,7 @@ function AccordionSubtitle({ className, ref, ...props }) {
|
|
|
175
175
|
function AccordionTitle({ className, ref, ...props }) {
|
|
176
176
|
return /* @__PURE__ */ jsx("div", {
|
|
177
177
|
"data-slot": "accordion-title",
|
|
178
|
-
className: cn("text-left
|
|
178
|
+
className: cn("text-left font-heading text-base font-bold transition-colors [&:has(~_[data-slot=accordion-subtitle])]:leading-[1.2] [&:not(:has(~_[data-slot=accordion-subtitle]))]:leading-none", className),
|
|
179
179
|
ref,
|
|
180
180
|
...props
|
|
181
181
|
});
|
|
@@ -251,7 +251,7 @@ function AlertIcon({ className, ref, ...props }) {
|
|
|
251
251
|
function AlertTitle({ className, ref, ...props }) {
|
|
252
252
|
return /* @__PURE__ */ jsx("div", {
|
|
253
253
|
"data-slot": "alert-title",
|
|
254
|
-
className: cn("flex items-center gap-2xs
|
|
254
|
+
className: cn("flex items-center gap-2xs font-heading text-base font-bold [&:has(~_[data-slot=alert-description])]:leading-[1.2] [&:not(:has(~_[data-slot=alert-description]))]:leading-none", className),
|
|
255
255
|
ref,
|
|
256
256
|
...props
|
|
257
257
|
});
|
|
@@ -270,6 +270,15 @@ function AlertDialog$2({ ...props }) {
|
|
|
270
270
|
return /* @__PURE__ */ jsx(AlertDialog$1.Root, { ...props });
|
|
271
271
|
}
|
|
272
272
|
//#endregion
|
|
273
|
+
//#region src/utils/has-single-element-child.ts
|
|
274
|
+
function hasSingleElementChild(children) {
|
|
275
|
+
const items = Children.toArray(children), [child] = items;
|
|
276
|
+
if (items.length !== 1) return false;
|
|
277
|
+
if (!isValidElement(child)) return false;
|
|
278
|
+
if (child.type === Fragment$1) return hasSingleElementChild(child.props.children);
|
|
279
|
+
return true;
|
|
280
|
+
}
|
|
281
|
+
//#endregion
|
|
273
282
|
//#region src/components/button/button.types.ts
|
|
274
283
|
const buttonVariants = cva("inline-flex cursor-pointer items-center justify-center rounded-full whitespace-nowrap transition-all select-none disabled:pointer-events-none disabled:opacity-50", {
|
|
275
284
|
compoundVariants: [
|
|
@@ -491,14 +500,10 @@ const buttonVariants = cva("inline-flex cursor-pointer items-center justify-cent
|
|
|
491
500
|
},
|
|
492
501
|
variants: {
|
|
493
502
|
size: {
|
|
494
|
-
extraSmall: "h-md gap-3xs px-2xs
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
iconSmall: "size-lg p-[0px] [&>svg]:size-sm",
|
|
499
|
-
large: "h-2xl min-w-2xl gap-xs px-md style-text-default-1 [&>svg]:size-lg",
|
|
500
|
-
medium: "h-xl min-w-xl gap-2xs px-sm style-text-default-0 [&>svg]:size-md",
|
|
501
|
-
small: "h-lg min-w-lg gap-3xs px-xs style-text-default--1 [&>svg]:size-sm"
|
|
503
|
+
extraSmall: "h-md gap-3xs px-2xs font-body text-xs leading-none font-medium [&:where([data-icon-only]:has(>svg:only-child))]:size-md [&:where([data-icon-only]:has(>svg:only-child))]:p-0 [&>svg]:size-xs",
|
|
504
|
+
large: "h-2xl min-w-2xl gap-xs px-md font-body text-lg leading-none font-medium [&:where([data-icon-only]:has(>svg:only-child))]:size-2xl [&:where([data-icon-only]:has(>svg:only-child))]:p-0 [&>svg]:size-lg",
|
|
505
|
+
medium: "h-xl min-w-xl gap-2xs px-sm font-body text-base leading-none font-medium [&:where([data-icon-only]:has(>svg:only-child))]:size-xl [&:where([data-icon-only]:has(>svg:only-child))]:p-0 [&>svg]:size-md",
|
|
506
|
+
small: "h-lg min-w-lg gap-3xs px-xs font-body text-sm leading-none font-medium [&:where([data-icon-only]:has(>svg:only-child))]:size-lg [&:where([data-icon-only]:has(>svg:only-child))]:p-0 [&>svg]:size-sm"
|
|
502
507
|
},
|
|
503
508
|
tone: {
|
|
504
509
|
accent: "",
|
|
@@ -521,8 +526,11 @@ const buttonVariants = cva("inline-flex cursor-pointer items-center justify-cent
|
|
|
521
526
|
});
|
|
522
527
|
//#endregion
|
|
523
528
|
//#region src/components/button/button.tsx
|
|
524
|
-
function Button({ tone, variant, size, className, ...props }) {
|
|
529
|
+
function Button({ tone, variant, size, className, children, ...props }) {
|
|
530
|
+
let iconOnly = void 0;
|
|
531
|
+
if (hasSingleElementChild(children)) iconOnly = "";
|
|
525
532
|
return /* @__PURE__ */ jsx(Button$1, {
|
|
533
|
+
"data-icon-only": iconOnly,
|
|
526
534
|
"data-size": size,
|
|
527
535
|
className: cn(buttonVariants({
|
|
528
536
|
className,
|
|
@@ -530,7 +538,8 @@ function Button({ tone, variant, size, className, ...props }) {
|
|
|
530
538
|
tone,
|
|
531
539
|
variant
|
|
532
540
|
})),
|
|
533
|
-
...props
|
|
541
|
+
...props,
|
|
542
|
+
children
|
|
534
543
|
});
|
|
535
544
|
}
|
|
536
545
|
//#endregion
|
|
@@ -1097,12 +1106,9 @@ const badgeVariants = cva("inline-flex h-md items-center justify-center gap-3xs
|
|
|
1097
1106
|
},
|
|
1098
1107
|
variants: {
|
|
1099
1108
|
size: {
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
large: "h-lg px-xs [&>svg]:size-[1em]",
|
|
1104
|
-
medium: "h-md px-xs [&>svg]:size-[1em]",
|
|
1105
|
-
small: "h-sm px-xs [&>svg]:size-[1em]"
|
|
1109
|
+
large: "h-lg px-xs [&:where([data-icon-only]:has(>svg:only-child))]:size-lg [&:where([data-icon-only]:has(>svg:only-child))]:p-0 [&>svg]:size-[1em] [&[data-icon-only]>svg:only-child]:size-sm",
|
|
1110
|
+
medium: "h-md px-xs [&:where([data-icon-only]:has(>svg:only-child))]:size-md [&:where([data-icon-only]:has(>svg:only-child))]:p-0 [&>svg]:size-[1em] [&[data-icon-only]>svg:only-child]:size-xs",
|
|
1111
|
+
small: "h-sm px-xs [&:where([data-icon-only]:has(>svg:only-child))]:size-sm [&:where([data-icon-only]:has(>svg:only-child))]:p-0 [&>svg]:size-[1em] [&[data-icon-only]>svg:only-child]:size-2xs"
|
|
1106
1112
|
},
|
|
1107
1113
|
tone: {
|
|
1108
1114
|
accent: "",
|
|
@@ -1122,8 +1128,11 @@ const badgeVariants = cva("inline-flex h-md items-center justify-center gap-3xs
|
|
|
1122
1128
|
});
|
|
1123
1129
|
//#endregion
|
|
1124
1130
|
//#region src/components/badge/badge.tsx
|
|
1125
|
-
function Badge({ className, size, tone, variant, ref, ...props }) {
|
|
1131
|
+
function Badge({ className, size, tone, variant, ref, children, ...props }) {
|
|
1132
|
+
let iconOnly = void 0;
|
|
1133
|
+
if (hasSingleElementChild(children)) iconOnly = "";
|
|
1126
1134
|
return /* @__PURE__ */ jsx("div", {
|
|
1135
|
+
"data-icon-only": iconOnly,
|
|
1127
1136
|
className: cn(badgeVariants({
|
|
1128
1137
|
className,
|
|
1129
1138
|
size,
|
|
@@ -1131,7 +1140,8 @@ function Badge({ className, size, tone, variant, ref, ...props }) {
|
|
|
1131
1140
|
variant
|
|
1132
1141
|
})),
|
|
1133
1142
|
ref,
|
|
1134
|
-
...props
|
|
1143
|
+
...props,
|
|
1144
|
+
children
|
|
1135
1145
|
});
|
|
1136
1146
|
}
|
|
1137
1147
|
//#endregion
|
|
@@ -1272,7 +1282,7 @@ function BreadcrumbItem({ className, ref, ...props }) {
|
|
|
1272
1282
|
//#region src/components/breadcrumb/breadcrumb-link.tsx
|
|
1273
1283
|
function BreadcrumbLink({ className, ref, ...props }) {
|
|
1274
1284
|
return /* @__PURE__ */ jsx("div", {
|
|
1275
|
-
className: cn("inline-flex h-lg items-center justify-center gap-3xs rounded-full px-2xs
|
|
1285
|
+
className: cn("inline-flex h-lg items-center justify-center gap-3xs rounded-full px-2xs font-body text-sm leading-none font-medium text-on-surface-variant transition-all hover:cursor-pointer hover:bg-neutral-container active:scale-[0.98] active:bg-neutral-container disabled:opacity-50 [&>svg]:size-sm", className),
|
|
1276
1286
|
ref,
|
|
1277
1287
|
...props
|
|
1278
1288
|
});
|
|
@@ -1487,14 +1497,10 @@ const buttonGroupVariants = cva("inline-flex cursor-pointer items-center justify
|
|
|
1487
1497
|
vertical: "flex-col [&>*+*]:relative [&>*+*]:before:absolute [&>*+*]:before:top-0 [&>*+*]:before:left-1/2 [&>*+*]:before:h-px [&>*+*]:before:w-1/2 [&>*+*]:before:-translate-x-1/2 [&>*+*]:before:content-[\"\"]"
|
|
1488
1498
|
},
|
|
1489
1499
|
size: {
|
|
1490
|
-
extraSmall: "*:
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
iconSmall: "*:size-lg [&>button]:size-lg [&>button]:min-w-0 [&>button]:p-[0px] [&>button>svg]:size-sm",
|
|
1495
|
-
large: "*:style-text-default-1 [&>button]:h-2xl [&>button]:min-w-2xl [&>button]:gap-xs [&>button]:px-md [&>button>svg]:size-lg",
|
|
1496
|
-
medium: "*:style-text-default-0 [&>button]:h-xl [&>button]:min-w-xl [&>button]:gap-2xs [&>button]:px-sm [&>button>svg]:size-md",
|
|
1497
|
-
small: "*:style-text-default--1 [&>button]:h-lg [&>button]:min-w-lg [&>button]:gap-3xs [&>button]:px-xs [&>button>svg]:size-sm"
|
|
1500
|
+
extraSmall: "*:font-body *:text-xs *:leading-none *:font-medium [&>button]:h-md [&>button]:min-w-0 [&>button]:gap-3xs [&>button]:px-2xs [&>button>svg]:size-xs [&>button[data-icon-only]:has(>svg:only-child)]:size-md [&>button[data-icon-only]:has(>svg:only-child)]:p-0",
|
|
1501
|
+
large: "*:font-body *:text-lg *:leading-none *:font-medium [&>button]:h-2xl [&>button]:min-w-2xl [&>button]:gap-xs [&>button]:px-md [&>button>svg]:size-lg [&>button[data-icon-only]:has(>svg:only-child)]:size-2xl [&>button[data-icon-only]:has(>svg:only-child)]:p-0",
|
|
1502
|
+
medium: "*:font-body *:text-base *:leading-none *:font-medium [&>button]:h-xl [&>button]:min-w-xl [&>button]:gap-2xs [&>button]:px-sm [&>button>svg]:size-md [&>button[data-icon-only]:has(>svg:only-child)]:size-xl [&>button[data-icon-only]:has(>svg:only-child)]:p-0",
|
|
1503
|
+
small: "*:font-body *:text-sm *:leading-none *:font-medium [&>button]:h-lg [&>button]:min-w-lg [&>button]:gap-3xs [&>button]:px-xs [&>button>svg]:size-sm [&>button[data-icon-only]:has(>svg:only-child)]:size-lg [&>button[data-icon-only]:has(>svg:only-child)]:p-0"
|
|
1498
1504
|
},
|
|
1499
1505
|
tone: {
|
|
1500
1506
|
accent: "[&>*+*]:before:bg-accent-border",
|
|
@@ -1638,7 +1644,8 @@ function SelectGroupLabel({ className, ref, ...props }) {
|
|
|
1638
1644
|
//#region src/components/select/select-icon.tsx
|
|
1639
1645
|
function SelectIcon({ className, ref, ...props }) {
|
|
1640
1646
|
return /* @__PURE__ */ jsx(Select$1.Icon, {
|
|
1641
|
-
|
|
1647
|
+
"data-slot": "select-icon",
|
|
1648
|
+
className: cn("flex text-on-surface-muted", className),
|
|
1642
1649
|
ref,
|
|
1643
1650
|
...props
|
|
1644
1651
|
});
|
|
@@ -1647,7 +1654,7 @@ function SelectIcon({ className, ref, ...props }) {
|
|
|
1647
1654
|
//#region src/components/select/select-item.tsx
|
|
1648
1655
|
function SelectItem({ className, children, ref, ...props }) {
|
|
1649
1656
|
return /* @__PURE__ */ jsxs(Select$1.Item, {
|
|
1650
|
-
className: cn("group/item grid min-h-lg cursor-default grid-cols-[1fr_0.75rem] items-center gap-xs rounded-lg px-2xs py-3xs transition-colors outline-none select-none group-data-[side=none]:pr-xs hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:bg-neutral-container-high data-highlighted:text-neutral-on-container data-highlighted:before:absolute data-highlighted:before:inset-x-3xs data-highlighted:before:inset-y-[0px] data-highlighted:before:z-[-1] data-highlighted:before:rounded-sm data-selected:bg-neutral-default data-selected:text-neutral-on-default [&_svg]:size-
|
|
1657
|
+
className: cn("group/item grid min-h-lg cursor-default grid-cols-[1fr_0.75rem] items-center gap-xs rounded-lg px-2xs py-3xs transition-colors outline-none select-none group-data-[side=none]:pr-xs hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:bg-neutral-container-high data-highlighted:text-neutral-on-container data-highlighted:before:absolute data-highlighted:before:inset-x-3xs data-highlighted:before:inset-y-[0px] data-highlighted:before:z-[-1] data-highlighted:before:rounded-sm data-selected:bg-neutral-default data-selected:text-neutral-on-default [&_svg]:size-md", className),
|
|
1651
1658
|
ref,
|
|
1652
1659
|
...props,
|
|
1653
1660
|
children: [/* @__PURE__ */ jsx(Select$1.ItemText, {
|
|
@@ -1701,7 +1708,7 @@ function SelectPopup({ className, children, ref, ...props }) {
|
|
|
1701
1708
|
//#region src/components/select/select-title.tsx
|
|
1702
1709
|
function SelectTitle({ className, ref, ...props }) {
|
|
1703
1710
|
return /* @__PURE__ */ jsx("span", {
|
|
1704
|
-
className: cn("flex items-center gap-2xs
|
|
1711
|
+
className: cn("flex items-center gap-2xs font-body text-base leading-none font-medium text-on-surface transition-colors group-data-highlighted/item:text-neutral-on-container group-data-selected/item:text-neutral-on-default", className),
|
|
1705
1712
|
ref,
|
|
1706
1713
|
...props
|
|
1707
1714
|
});
|
|
@@ -1715,9 +1722,9 @@ const selectVariants = cva("flex items-center justify-between outline outline-tr
|
|
|
1715
1722
|
},
|
|
1716
1723
|
variants: {
|
|
1717
1724
|
size: {
|
|
1718
|
-
large: "h-2xl gap-xl rounded-2xl px-md
|
|
1719
|
-
medium: "h-xl gap-lg rounded-xl px-sm
|
|
1720
|
-
small: "h-lg gap-md rounded-lg px-xs
|
|
1725
|
+
large: "h-2xl gap-xl rounded-2xl px-md font-body text-lg leading-none font-medium [&_[data-slot=select-icon]_svg]:size-md [&_[data-value]]:gap-xs [&_svg]:size-lg",
|
|
1726
|
+
medium: "h-xl gap-lg rounded-xl px-sm font-body text-base leading-none font-medium [&_[data-slot=select-icon]_svg]:size-sm [&_[data-value]]:gap-2xs [&_svg]:size-md",
|
|
1727
|
+
small: "h-lg gap-md rounded-lg px-xs font-body text-sm leading-none font-medium [&_[data-slot=select-icon]_svg]:size-xs [&_[data-value]]:gap-3xs [&_svg]:size-sm"
|
|
1721
1728
|
},
|
|
1722
1729
|
variant: {
|
|
1723
1730
|
ghost: "bg-transparent hover:bg-neutral-container",
|
|
@@ -1824,7 +1831,7 @@ function CalendarNextMonthButton({ onClick, disabled, ...props }) {
|
|
|
1824
1831
|
...props,
|
|
1825
1832
|
variant: "ghost",
|
|
1826
1833
|
tone: "neutral",
|
|
1827
|
-
size: "
|
|
1834
|
+
size: "medium",
|
|
1828
1835
|
className: cn("hover:bg-neutral-container-high hover:text-neutral-on-container"),
|
|
1829
1836
|
onClick,
|
|
1830
1837
|
disabled,
|
|
@@ -1836,7 +1843,7 @@ function CalendarPreviousMonthButton({ onClick, disabled, ...props }) {
|
|
|
1836
1843
|
...props,
|
|
1837
1844
|
variant: "ghost",
|
|
1838
1845
|
tone: "neutral",
|
|
1839
|
-
size: "
|
|
1846
|
+
size: "medium",
|
|
1840
1847
|
className: cn("hover:bg-neutral-container-high hover:text-neutral-on-container"),
|
|
1841
1848
|
onClick,
|
|
1842
1849
|
disabled,
|
|
@@ -2375,7 +2382,7 @@ function CodeBlockCopy({ className, children, ref, ...props }) {
|
|
|
2375
2382
|
return /* @__PURE__ */ jsxs(Button, {
|
|
2376
2383
|
"aria-label": "Copy code",
|
|
2377
2384
|
onClick: handleClick,
|
|
2378
|
-
size: "
|
|
2385
|
+
size: "medium",
|
|
2379
2386
|
variant: "ghost",
|
|
2380
2387
|
tone: "neutral",
|
|
2381
2388
|
className: cn("", className),
|
|
@@ -2416,7 +2423,7 @@ function CodeBlockDownload({ className, children, ref, ...props }) {
|
|
|
2416
2423
|
return /* @__PURE__ */ jsxs(Button, {
|
|
2417
2424
|
"aria-label": "Download file",
|
|
2418
2425
|
onClick: handleClick,
|
|
2419
|
-
size: "
|
|
2426
|
+
size: "medium",
|
|
2420
2427
|
variant: "ghost",
|
|
2421
2428
|
tone: "neutral",
|
|
2422
2429
|
className: cn("", className),
|
|
@@ -2439,7 +2446,7 @@ function CodeBlockHeader({ className, ref, ...props }) {
|
|
|
2439
2446
|
function CodeBlockName({ className, children, ref, ...props }) {
|
|
2440
2447
|
const { currentValue } = useCodeBlock();
|
|
2441
2448
|
return /* @__PURE__ */ jsxs("div", {
|
|
2442
|
-
className: cn("flex items-center justify-center gap-2xs px-xs
|
|
2449
|
+
className: cn("flex items-center justify-center gap-2xs px-xs font-heading text-base leading-none font-bold text-on-surface-variant [&>svg]:size-md", className),
|
|
2443
2450
|
ref,
|
|
2444
2451
|
...props,
|
|
2445
2452
|
children: [
|
|
@@ -3838,7 +3845,7 @@ function ComboboxChip({ className, children, ref, ...props }) {
|
|
|
3838
3845
|
onClick: () => innerProps.onClick,
|
|
3839
3846
|
variant: "ghost",
|
|
3840
3847
|
tone: "error",
|
|
3841
|
-
size: "
|
|
3848
|
+
size: "extraSmall",
|
|
3842
3849
|
children: /* @__PURE__ */ jsx(XIcon, {
|
|
3843
3850
|
className: "size-sm",
|
|
3844
3851
|
weight: "bold"
|
|
@@ -3931,7 +3938,7 @@ function ComboboxInput({ inline = false, variant, size = "medium", className, ch
|
|
|
3931
3938
|
render: ({ onClick }) => /* @__PURE__ */ jsx(Button, {
|
|
3932
3939
|
"aria-label": "Clear selection",
|
|
3933
3940
|
onClick,
|
|
3934
|
-
size: "
|
|
3941
|
+
size: "extraSmall",
|
|
3935
3942
|
variant: "ghost",
|
|
3936
3943
|
tone: "error",
|
|
3937
3944
|
children: /* @__PURE__ */ jsx(XIcon, { weight: "bold" })
|
|
@@ -3941,7 +3948,7 @@ function ComboboxInput({ inline = false, variant, size = "medium", className, ch
|
|
|
3941
3948
|
render: ({ onClick }, state) => /* @__PURE__ */ jsx(Button, {
|
|
3942
3949
|
"aria-label": "Open popup",
|
|
3943
3950
|
onClick,
|
|
3944
|
-
size: "
|
|
3951
|
+
size: "extraSmall",
|
|
3945
3952
|
variant: getTriggerVariant(state.open),
|
|
3946
3953
|
tone: "brand",
|
|
3947
3954
|
children: /* @__PURE__ */ jsx(CaretDownIcon, { weight: "bold" })
|
|
@@ -4312,7 +4319,7 @@ function DialogClose({ className, ref, ...props }) {
|
|
|
4312
4319
|
render: /* @__PURE__ */ jsx(Button, {
|
|
4313
4320
|
"aria-label": "Close",
|
|
4314
4321
|
variant: "ghost",
|
|
4315
|
-
size: "
|
|
4322
|
+
size: "extraSmall",
|
|
4316
4323
|
tone: "error",
|
|
4317
4324
|
children: /* @__PURE__ */ jsx(XIcon, { weight: "bold" })
|
|
4318
4325
|
})
|
|
@@ -5324,7 +5331,7 @@ function Input({ fileUploadButtonIcon = defaultFileUploadButtonIcon, fileUploadB
|
|
|
5324
5331
|
]
|
|
5325
5332
|
}), /* @__PURE__ */ jsx(Button, {
|
|
5326
5333
|
"aria-label": clearFilesLabel,
|
|
5327
|
-
size: "
|
|
5334
|
+
size: "medium",
|
|
5328
5335
|
variant: "ghost",
|
|
5329
5336
|
tone: "error",
|
|
5330
5337
|
onClick: clearFiles,
|
|
@@ -5778,12 +5785,9 @@ const toggleVariants = cva("flex items-center justify-center rounded-full text-o
|
|
|
5778
5785
|
},
|
|
5779
5786
|
variants: {
|
|
5780
5787
|
size: {
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
large: "h-xl gap-xs px-sm style-text-default-0 [&>svg]:size-md",
|
|
5785
|
-
medium: "h-lg gap-2xs px-xs style-text-default--1 [&>svg]:size-sm",
|
|
5786
|
-
small: "h-md gap-3xs px-2xs style-text-default--2 [&>svg]:size-xs"
|
|
5788
|
+
large: "h-2xl gap-xs px-sm font-body text-base leading-none font-medium [&:where([data-icon-only]:has(>svg:only-child))]:size-2xl [&:where([data-icon-only]:has(>svg:only-child))]:p-0 [&>svg]:size-lg",
|
|
5789
|
+
medium: "h-xl gap-2xs px-xs font-body text-sm leading-none font-medium [&:where([data-icon-only]:has(>svg:only-child))]:size-xl [&:where([data-icon-only]:has(>svg:only-child))]:p-0 [&>svg]:size-md",
|
|
5790
|
+
small: "h-lg gap-3xs px-2xs font-body text-xs leading-none font-medium [&:where([data-icon-only]:has(>svg:only-child))]:size-lg [&:where([data-icon-only]:has(>svg:only-child))]:p-0 [&>svg]:size-sm"
|
|
5787
5791
|
},
|
|
5788
5792
|
tone: {
|
|
5789
5793
|
accent: "hover:not-disabled:bg-accent-container hover:not-disabled:text-accent-on-container data-pressed:text-accent-default",
|
|
@@ -5798,21 +5802,31 @@ const toggleVariants = cva("flex items-center justify-center rounded-full text-o
|
|
|
5798
5802
|
});
|
|
5799
5803
|
//#endregion
|
|
5800
5804
|
//#region src/components/toggle/toggle.tsx
|
|
5805
|
+
function getContent(children, state) {
|
|
5806
|
+
if (typeof children === "function") return children(state);
|
|
5807
|
+
return children;
|
|
5808
|
+
}
|
|
5801
5809
|
function Toggle({ size, tone, className, children, ref, ...props }) {
|
|
5802
5810
|
const toggleGroupContext = useContext(ToggleGroupContext), effectiveSize = size ?? toggleGroupContext?.size ?? "medium";
|
|
5803
5811
|
return /* @__PURE__ */ jsx(Toggle$2, {
|
|
5804
5812
|
ref,
|
|
5805
5813
|
...props,
|
|
5806
|
-
render: (innerProps, state) =>
|
|
5807
|
-
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5814
|
+
render: (innerProps, state) => {
|
|
5815
|
+
const content = getContent(children, state);
|
|
5816
|
+
let iconOnly = void 0;
|
|
5817
|
+
if (hasSingleElementChild(content)) iconOnly = "";
|
|
5818
|
+
return /* @__PURE__ */ jsx("button", {
|
|
5819
|
+
...innerProps,
|
|
5820
|
+
"data-icon-only": iconOnly,
|
|
5821
|
+
className: cn(toggleVariants({
|
|
5822
|
+
className,
|
|
5823
|
+
size: effectiveSize,
|
|
5824
|
+
tone
|
|
5825
|
+
})),
|
|
5826
|
+
type: "button",
|
|
5827
|
+
children: content
|
|
5828
|
+
});
|
|
5829
|
+
}
|
|
5816
5830
|
});
|
|
5817
5831
|
}
|
|
5818
5832
|
//#endregion
|
|
@@ -6143,7 +6157,7 @@ const InputOTP = Object.assign(InputOTP$1, {
|
|
|
6143
6157
|
//#region src/components/kbd/kbd.tsx
|
|
6144
6158
|
function Kbd$1({ className, ref, ...props }) {
|
|
6145
6159
|
return /* @__PURE__ */ jsx("div", {
|
|
6146
|
-
className: cn("inline-flex h-md items-center justify-center rounded-full bg-neutral-container-high px-2xs align-middle style-text-default--
|
|
6160
|
+
className: cn("inline-flex h-md items-center justify-center rounded-full bg-neutral-container-high px-2xs align-middle style-text-default--2 whitespace-nowrap text-neutral-on-container select-none has-[svg]:size-md has-[svg]:p-0 [&>svg]:size-sm", className),
|
|
6147
6161
|
ref,
|
|
6148
6162
|
...props
|
|
6149
6163
|
});
|
|
@@ -6418,7 +6432,7 @@ function LayerTree({ onDNDStart: onDragStart, onDNDEnd: onDragEnd, className, ch
|
|
|
6418
6432
|
className: cn("relative rounded-md border border-neutral-border bg-neutral-container px-xs py-3xs opacity-80 shadow-md transition-opacity"),
|
|
6419
6433
|
children: [table.getRow(String(source.id)).renderValue("name") ?? source.id, /* @__PURE__ */ jsx(Badge, {
|
|
6420
6434
|
className: "absolute -top-xs -right-xs",
|
|
6421
|
-
size: "
|
|
6435
|
+
size: "small",
|
|
6422
6436
|
tone: "neutral",
|
|
6423
6437
|
children: table.getRow(String(source.id))?.subRows.length + PARENT_ROW_COUNT
|
|
6424
6438
|
})]
|
|
@@ -6512,7 +6526,7 @@ function LayerTreeExpandAll({ className, ref, ...props }) {
|
|
|
6512
6526
|
selector: (state) => state.expanded,
|
|
6513
6527
|
children: () => /* @__PURE__ */ jsxs(Button, {
|
|
6514
6528
|
"aria-label": "Expand or collapse all layers",
|
|
6515
|
-
size: "
|
|
6529
|
+
size: "medium",
|
|
6516
6530
|
tone: "neutral",
|
|
6517
6531
|
variant: "ghost",
|
|
6518
6532
|
onClick: handleClick,
|
|
@@ -6565,7 +6579,7 @@ function LayerTreeLockedAll({ className, children, ref, ...props }) {
|
|
|
6565
6579
|
const isLocked = allRows.some((leafRow) => leafRow.getIsLocked());
|
|
6566
6580
|
return /* @__PURE__ */ jsxs(Button, {
|
|
6567
6581
|
"aria-label": "Toggle all layers lock",
|
|
6568
|
-
size: "
|
|
6582
|
+
size: "small",
|
|
6569
6583
|
tone: "neutral",
|
|
6570
6584
|
variant: "ghost",
|
|
6571
6585
|
onClick: () => handleClick(isLocked),
|
|
@@ -6595,7 +6609,7 @@ function LayerTreeLockedCell({ className, children, ref, ...props }) {
|
|
|
6595
6609
|
const isLocked = rows.every((leafRow) => leafRow.getIsLocked());
|
|
6596
6610
|
return /* @__PURE__ */ jsxs(Button, {
|
|
6597
6611
|
"aria-label": "Toggle layer lock",
|
|
6598
|
-
size: "
|
|
6612
|
+
size: "small",
|
|
6599
6613
|
tone: "neutral",
|
|
6600
6614
|
variant: "ghost",
|
|
6601
6615
|
onClick: () => handleClick(isLocked),
|
|
@@ -6864,7 +6878,7 @@ function LayerTreeSort({ className, children, ref, ...props }) {
|
|
|
6864
6878
|
children: /* @__PURE__ */ jsx(Button, {
|
|
6865
6879
|
"aria-label": "Sort layers",
|
|
6866
6880
|
variant: "ghost",
|
|
6867
|
-
size: "
|
|
6881
|
+
size: "medium",
|
|
6868
6882
|
tone: "neutral",
|
|
6869
6883
|
children: /* @__PURE__ */ jsx(ArrowsDownUpIcon, { weight: "bold" })
|
|
6870
6884
|
})
|
|
@@ -6969,7 +6983,7 @@ function LayerTreeVisibilityAll({ className, children, ref, ...props }) {
|
|
|
6969
6983
|
const isVisible = allRows.some((leafRow) => leafRow.getIsVisible());
|
|
6970
6984
|
return /* @__PURE__ */ jsxs(Button, {
|
|
6971
6985
|
"aria-label": "Toggle all layers visibility",
|
|
6972
|
-
size: "
|
|
6986
|
+
size: "small",
|
|
6973
6987
|
tone: "neutral",
|
|
6974
6988
|
variant: "ghost",
|
|
6975
6989
|
onClick: () => handleClick(isVisible),
|
|
@@ -6999,7 +7013,7 @@ function LayerTreeVisibilityCell({ className, children, ref, ...props }) {
|
|
|
6999
7013
|
const isVisible = rows.some((leafRow) => leafRow.getIsVisible());
|
|
7000
7014
|
return /* @__PURE__ */ jsxs(Button, {
|
|
7001
7015
|
"aria-label": "Toggle layer visibility",
|
|
7002
|
-
size: "
|
|
7016
|
+
size: "small",
|
|
7003
7017
|
tone: "neutral",
|
|
7004
7018
|
variant: "ghost",
|
|
7005
7019
|
onClick: () => handleClick(isVisible),
|
|
@@ -7361,13 +7375,6 @@ function NumberField({ size, variant, children, label, disableInput: disabledInp
|
|
|
7361
7375
|
const [nextValue] = args;
|
|
7362
7376
|
if (typeof value !== "number" && value !== null) setUncontrolledValue(nextValue ?? void 0);
|
|
7363
7377
|
onValueChange?.(...args);
|
|
7364
|
-
}, getButtonSize = () => {
|
|
7365
|
-
switch (size) {
|
|
7366
|
-
case "small": return "iconSmall";
|
|
7367
|
-
case "medium": return "iconMedium";
|
|
7368
|
-
case "large": return "iconLarge";
|
|
7369
|
-
default: return "iconMedium";
|
|
7370
|
-
}
|
|
7371
7378
|
};
|
|
7372
7379
|
return /* @__PURE__ */ jsxs(NumberField$1.Root, {
|
|
7373
7380
|
className: cn(numberFieldVariants({
|
|
@@ -7399,7 +7406,7 @@ function NumberField({ size, variant, children, label, disableInput: disabledInp
|
|
|
7399
7406
|
...stepperProps,
|
|
7400
7407
|
tone: "error",
|
|
7401
7408
|
variant: "ghost",
|
|
7402
|
-
size:
|
|
7409
|
+
size: size ?? "medium",
|
|
7403
7410
|
className: "shrink-0 rounded-r-none",
|
|
7404
7411
|
children: /* @__PURE__ */ jsx(MinusIcon, { weight: "bold" })
|
|
7405
7412
|
}) }),
|
|
@@ -7416,7 +7423,7 @@ function NumberField({ size, variant, children, label, disableInput: disabledInp
|
|
|
7416
7423
|
...stepperProps,
|
|
7417
7424
|
tone: "success",
|
|
7418
7425
|
variant: "ghost",
|
|
7419
|
-
size:
|
|
7426
|
+
size: size ?? "medium",
|
|
7420
7427
|
className: "shrink-0 rounded-l-none",
|
|
7421
7428
|
children: /* @__PURE__ */ jsx(PlusIcon, { weight: "bold" })
|
|
7422
7429
|
}) })
|
|
@@ -8087,7 +8094,7 @@ function SidebarToggle({ className, children, ref, ...props }) {
|
|
|
8087
8094
|
"aria-label": "Toggle sidebar",
|
|
8088
8095
|
className: cn("shrink-0 border-none", className),
|
|
8089
8096
|
ref,
|
|
8090
|
-
size: "
|
|
8097
|
+
size: "medium",
|
|
8091
8098
|
variant: "ghost",
|
|
8092
8099
|
onClick: handleClick,
|
|
8093
8100
|
...props,
|
|
@@ -9302,7 +9309,7 @@ function TableFirstPage({ className, children, ref, ...props }) {
|
|
|
9302
9309
|
ref,
|
|
9303
9310
|
variant: "outline",
|
|
9304
9311
|
tone: "neutral",
|
|
9305
|
-
size: "
|
|
9312
|
+
size: "medium",
|
|
9306
9313
|
...props,
|
|
9307
9314
|
children: [children, /* @__PURE__ */ jsx(CaretLineLeftIcon, { weight: "bold" })]
|
|
9308
9315
|
});
|
|
@@ -9394,7 +9401,7 @@ function TableLastPage({ className, children, ref, ...props }) {
|
|
|
9394
9401
|
ref,
|
|
9395
9402
|
variant: "outline",
|
|
9396
9403
|
tone: "neutral",
|
|
9397
|
-
size: "
|
|
9404
|
+
size: "medium",
|
|
9398
9405
|
...props,
|
|
9399
9406
|
children: [children, /* @__PURE__ */ jsx(CaretLineRightIcon, { weight: "bold" })]
|
|
9400
9407
|
});
|
|
@@ -9434,7 +9441,7 @@ function TableNextPage({ className, children, ref, ...props }) {
|
|
|
9434
9441
|
disabled: !table.getCanNextPage(),
|
|
9435
9442
|
onClick: handleClick,
|
|
9436
9443
|
ref,
|
|
9437
|
-
size: "
|
|
9444
|
+
size: "medium",
|
|
9438
9445
|
variant: "outline",
|
|
9439
9446
|
tone: "neutral",
|
|
9440
9447
|
...props,
|
|
@@ -9516,7 +9523,7 @@ function TablePaging({ min = DEFAULT_VISIBLE_START_PAGES, max = DEFAULT_VISIBLE_
|
|
|
9516
9523
|
totalPages > min + max && /* @__PURE__ */ jsxs(Menu, { children: [/* @__PURE__ */ jsx(MenuTrigger, { children: /* @__PURE__ */ jsx(Button, {
|
|
9517
9524
|
"aria-label": "Show more pages",
|
|
9518
9525
|
tone: "neutral",
|
|
9519
|
-
size: "
|
|
9526
|
+
size: "medium",
|
|
9520
9527
|
variant: "outline",
|
|
9521
9528
|
className: "shrink-0",
|
|
9522
9529
|
children: /* @__PURE__ */ jsx(DotsThreeIcon, { weight: "bold" })
|
|
@@ -9573,7 +9580,7 @@ function TablePreviousPage({ className, children, ref, ...props }) {
|
|
|
9573
9580
|
ref,
|
|
9574
9581
|
variant: "outline",
|
|
9575
9582
|
tone: "neutral",
|
|
9576
|
-
size: "
|
|
9583
|
+
size: "medium",
|
|
9577
9584
|
...props,
|
|
9578
9585
|
children: [children, /* @__PURE__ */ jsx(CaretLeftIcon, { weight: "bold" })]
|
|
9579
9586
|
});
|
|
@@ -10102,17 +10109,17 @@ const Toast = Object.assign(ToastProvider, {
|
|
|
10102
10109
|
const toggleGroupVariants = cva("group flex w-fit items-center justify-center gap-3xs rounded-full", {
|
|
10103
10110
|
compoundVariants: [
|
|
10104
10111
|
{
|
|
10105
|
-
className: "
|
|
10112
|
+
className: "p-3xs",
|
|
10106
10113
|
size: "small",
|
|
10107
10114
|
variant: "default"
|
|
10108
10115
|
},
|
|
10109
10116
|
{
|
|
10110
|
-
className: "
|
|
10117
|
+
className: "p-2xs",
|
|
10111
10118
|
size: "medium",
|
|
10112
10119
|
variant: "default"
|
|
10113
10120
|
},
|
|
10114
10121
|
{
|
|
10115
|
-
className: "
|
|
10122
|
+
className: "p-2xs",
|
|
10116
10123
|
size: "large",
|
|
10117
10124
|
variant: "default"
|
|
10118
10125
|
}
|