@toolpath/ui 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/dist/index.js +69 -37
- package/package.json +3 -3
- package/src/breadcrumbs/item.tsx +4 -2
- package/src/button/button.tsx +29 -15
- package/src/callout/callout.tsx +1 -1
- package/src/checkbox/checkbox.tsx +2 -2
- package/src/combobox/button.tsx +2 -2
- package/src/combobox/item.tsx +5 -2
- package/src/editable-cell/editable-cell.tsx +15 -3
- package/src/input/input.tsx +3 -2
- package/src/menu/submenu-trigger.tsx +2 -2
- package/src/notification/list.tsx +1 -0
- package/src/pagination/pagination.tsx +2 -2
- package/src/panels/collapsed.tsx +1 -0
- package/src/quantity-input/quantity-input.tsx +2 -2
- package/src/table/group-header.tsx +1 -0
- package/src/table/tree-icon.tsx +5 -2
- package/src/toast/list.tsx +6 -3
package/dist/index.js
CHANGED
|
@@ -323,7 +323,7 @@ var Button = ({
|
|
|
323
323
|
onClick(event);
|
|
324
324
|
}
|
|
325
325
|
};
|
|
326
|
-
const
|
|
326
|
+
const wrap = (inner) => /* @__PURE__ */ jsx10(
|
|
327
327
|
"div",
|
|
328
328
|
{
|
|
329
329
|
className: cn(
|
|
@@ -352,19 +352,21 @@ var Button = ({
|
|
|
352
352
|
},
|
|
353
353
|
className
|
|
354
354
|
),
|
|
355
|
-
children:
|
|
355
|
+
children: inner
|
|
356
356
|
}
|
|
357
357
|
);
|
|
358
|
-
const content = !isLoading ?
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
358
|
+
const content = !isLoading ? wrap(children) : wrap(
|
|
359
|
+
/* @__PURE__ */ jsx10(
|
|
360
|
+
AnimatedEllipsis,
|
|
361
|
+
{
|
|
362
|
+
className: cn({
|
|
363
|
+
"h-2 w-1": size === "sm",
|
|
364
|
+
"h-2 w-1.5": size === "md",
|
|
365
|
+
"h-3 w-2": size === "lg"
|
|
366
|
+
})
|
|
367
|
+
}
|
|
368
|
+
)
|
|
369
|
+
);
|
|
368
370
|
if (asLink) {
|
|
369
371
|
return /* @__PURE__ */ jsx10(
|
|
370
372
|
Link,
|
|
@@ -574,7 +576,7 @@ var CalloutContent = ({ children, className }) => {
|
|
|
574
576
|
"hover:bg-gray-100 dark:hover:bg-zinc-800",
|
|
575
577
|
"transition-colors cursor-pointer"
|
|
576
578
|
),
|
|
577
|
-
children: /* @__PURE__ */ jsx11(XIcon, { className: "size-3.5" })
|
|
579
|
+
children: /* @__PURE__ */ jsx11(XIcon, { weight: "bold", className: "size-3.5" })
|
|
578
580
|
}
|
|
579
581
|
),
|
|
580
582
|
children
|
|
@@ -662,15 +664,15 @@ var Checkbox = ({
|
|
|
662
664
|
),
|
|
663
665
|
...props,
|
|
664
666
|
children: /* @__PURE__ */ jsxs6(BaseCheckbox.Indicator, { className: "flex items-center justify-center text-white", keepMounted: true, children: [
|
|
665
|
-
checked && /* @__PURE__ */ jsx12(CheckIcon, { className: "w-full h-full" }),
|
|
666
|
-
indeterminate && /* @__PURE__ */ jsx12(MinusIcon, { className: "w-full h-full" })
|
|
667
|
+
checked && /* @__PURE__ */ jsx12(CheckIcon, { weight: "bold", className: "w-full h-full" }),
|
|
668
|
+
indeterminate && /* @__PURE__ */ jsx12(MinusIcon, { weight: "bold", className: "w-full h-full" })
|
|
667
669
|
] })
|
|
668
670
|
}
|
|
669
671
|
);
|
|
670
672
|
};
|
|
671
673
|
|
|
672
674
|
// src/combobox/button.tsx
|
|
673
|
-
import {
|
|
675
|
+
import { CaretUpDownIcon } from "@phosphor-icons/react";
|
|
674
676
|
|
|
675
677
|
// src/combobox/combobox-context.tsx
|
|
676
678
|
import { createContext as createContext3, useContext as useContext3, useMemo as useMemo3 } from "react";
|
|
@@ -823,7 +825,7 @@ var Button2 = ({
|
|
|
823
825
|
className: cn("ml-auto", {
|
|
824
826
|
"opacity-0 group-hover:opacity-100 group-data-[popup-open]:opacity-100": variant === "ghost"
|
|
825
827
|
}),
|
|
826
|
-
children: /* @__PURE__ */ jsx17(
|
|
828
|
+
children: /* @__PURE__ */ jsx17(CaretUpDownIcon, { weight: "bold", className: "size-3.5 text-gray-200 dark:text-zinc-400" })
|
|
827
829
|
}
|
|
828
830
|
)
|
|
829
831
|
]
|
|
@@ -993,7 +995,7 @@ import { useEffect, useRef as useRef3, useState as useState4 } from "react";
|
|
|
993
995
|
import {
|
|
994
996
|
Combobox as BaseCombobox9
|
|
995
997
|
} from "@base-ui/react";
|
|
996
|
-
import {
|
|
998
|
+
import { ArrowElbowDownLeftIcon } from "@phosphor-icons/react";
|
|
997
999
|
import { Fragment as Fragment3, jsx as jsx23, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
998
1000
|
var Item = ({ className, children, value, ...props }) => {
|
|
999
1001
|
const { itemToStringLabel } = useCombobox();
|
|
@@ -1031,7 +1033,13 @@ var Item = ({ className, children, value, ...props }) => {
|
|
|
1031
1033
|
...props,
|
|
1032
1034
|
children: [
|
|
1033
1035
|
/* @__PURE__ */ jsx23("div", { ref, className: "flex-1 truncate", children: /* @__PURE__ */ jsx23(Tooltip, { tip, side: "right", sideOffset: 12, delay: 500, children: /* @__PURE__ */ jsx23(Fragment3, { children }) }) }),
|
|
1034
|
-
/* @__PURE__ */ jsx23(
|
|
1036
|
+
/* @__PURE__ */ jsx23(
|
|
1037
|
+
ArrowElbowDownLeftIcon,
|
|
1038
|
+
{
|
|
1039
|
+
weight: "bold",
|
|
1040
|
+
className: "size-4 text-gray-300 dark:text-zinc-400 hidden group-data-[highlighted]:block group-hover:hidden group-data-[highlighted]:group-hover:hidden group-data-[selected]:hidden"
|
|
1041
|
+
}
|
|
1042
|
+
)
|
|
1035
1043
|
]
|
|
1036
1044
|
}
|
|
1037
1045
|
);
|
|
@@ -1342,8 +1350,13 @@ var Dialog2 = Object.assign(Dialog, {
|
|
|
1342
1350
|
});
|
|
1343
1351
|
|
|
1344
1352
|
// src/editable-cell/editable-cell.tsx
|
|
1345
|
-
import {
|
|
1346
|
-
|
|
1353
|
+
import {
|
|
1354
|
+
useCallback as useCallback7,
|
|
1355
|
+
useEffect as useEffect3,
|
|
1356
|
+
useLayoutEffect,
|
|
1357
|
+
useRef as useRef6
|
|
1358
|
+
} from "react";
|
|
1359
|
+
import { ArrowElbowDownLeftIcon as ArrowElbowDownLeftIcon2 } from "@phosphor-icons/react";
|
|
1347
1360
|
|
|
1348
1361
|
// src/input/input.tsx
|
|
1349
1362
|
import {
|
|
@@ -1519,6 +1532,7 @@ var Input2 = ({
|
|
|
1519
1532
|
props?.onBlur?.(event);
|
|
1520
1533
|
};
|
|
1521
1534
|
const iconClassName = cn(
|
|
1535
|
+
"self-center",
|
|
1522
1536
|
{
|
|
1523
1537
|
"text-gray-400 dark:text-zinc-400": (variant === "muted" || variant === "default") && !disabled,
|
|
1524
1538
|
"text-gray-200 dark:text-zinc-400": variant === "secondary" || disabled
|
|
@@ -1533,7 +1547,7 @@ var Input2 = ({
|
|
|
1533
1547
|
"-ml-1 mr-2 w-5": size === "xl"
|
|
1534
1548
|
}
|
|
1535
1549
|
);
|
|
1536
|
-
const iconElement = type === "search" && !IconComponent ? /* @__PURE__ */ jsx35(MagnifyingGlassIcon, { "data-icon": true, className: iconClassName }) : IconComponent ? /* @__PURE__ */ jsx35(IconComponent, { "data-icon": true, className: iconClassName }) : null;
|
|
1550
|
+
const iconElement = type === "search" && !IconComponent ? /* @__PURE__ */ jsx35(MagnifyingGlassIcon, { weight: "bold", "data-icon": true, className: iconClassName }) : IconComponent ? /* @__PURE__ */ jsx35(IconComponent, { "data-icon": true, className: iconClassName }) : null;
|
|
1537
1551
|
let placeholder = props.placeholder;
|
|
1538
1552
|
if (!props.placeholder && type === "search") {
|
|
1539
1553
|
placeholder = "Search";
|
|
@@ -1634,7 +1648,7 @@ var Input2 = ({
|
|
|
1634
1648
|
"transition-opacity group-hover/input:opacity-100 focus:opacity-100",
|
|
1635
1649
|
value ? "opacity-0" : "invisible"
|
|
1636
1650
|
),
|
|
1637
|
-
children: copied ? /* @__PURE__ */ jsx35(CheckIcon2, {}) : /* @__PURE__ */ jsx35(CopyIcon, {})
|
|
1651
|
+
children: copied ? /* @__PURE__ */ jsx35(CheckIcon2, { weight: "bold" }) : /* @__PURE__ */ jsx35(CopyIcon, {})
|
|
1638
1652
|
}
|
|
1639
1653
|
) }) }),
|
|
1640
1654
|
suffix && /* @__PURE__ */ jsx35(
|
|
@@ -1661,6 +1675,7 @@ var Input2 = ({
|
|
|
1661
1675
|
|
|
1662
1676
|
// src/editable-cell/editable-cell.tsx
|
|
1663
1677
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1678
|
+
var ReturnIcon = (props) => /* @__PURE__ */ jsx36(ArrowElbowDownLeftIcon2, { weight: "bold", ...props });
|
|
1664
1679
|
var liveEdit = {
|
|
1665
1680
|
key: null,
|
|
1666
1681
|
value: "",
|
|
@@ -1857,7 +1872,7 @@ var EditableCell = ({
|
|
|
1857
1872
|
name: `editable-${field}-${rowId}`,
|
|
1858
1873
|
id: `editable-${field}-${rowId}`,
|
|
1859
1874
|
size: "md",
|
|
1860
|
-
icon:
|
|
1875
|
+
icon: ReturnIcon,
|
|
1861
1876
|
iconPosition: "right",
|
|
1862
1877
|
inputMode: type === "number" ? "numeric" : void 0,
|
|
1863
1878
|
onBlur: handleBlur,
|
|
@@ -2251,9 +2266,10 @@ var Item2 = ({
|
|
|
2251
2266
|
previous && /* @__PURE__ */ jsx40(
|
|
2252
2267
|
CaretRightIcon,
|
|
2253
2268
|
{
|
|
2269
|
+
weight: "regular",
|
|
2254
2270
|
"data-previous": true,
|
|
2255
2271
|
className: cn(
|
|
2256
|
-
"flex size-
|
|
2272
|
+
"flex size-4 rotate-180 truncate text-gray-300 dark:text-zinc-500",
|
|
2257
2273
|
{
|
|
2258
2274
|
"sm:hidden": breakpoint === "sm",
|
|
2259
2275
|
"md:hidden": breakpoint === "md",
|
|
@@ -2270,8 +2286,9 @@ var Item2 = ({
|
|
|
2270
2286
|
/* @__PURE__ */ jsx40(
|
|
2271
2287
|
CaretRightIcon,
|
|
2272
2288
|
{
|
|
2289
|
+
weight: "regular",
|
|
2273
2290
|
"data-separator": true,
|
|
2274
|
-
className: cn("hidden size-
|
|
2291
|
+
className: cn("hidden size-4 text-gray-300 dark:text-zinc-500", {
|
|
2275
2292
|
"sm:flex": breakpoint === "sm",
|
|
2276
2293
|
"md:flex": breakpoint === "md",
|
|
2277
2294
|
"lg:flex": breakpoint === "lg",
|
|
@@ -2535,7 +2552,7 @@ var SubmenuTrigger = ({ className, children, ...props }) => {
|
|
|
2535
2552
|
...props,
|
|
2536
2553
|
children: [
|
|
2537
2554
|
/* @__PURE__ */ jsx49("div", { className: "flex-1", children }),
|
|
2538
|
-
/* @__PURE__ */ jsx49(CaretRightIcon2, { className: "size-
|
|
2555
|
+
/* @__PURE__ */ jsx49(CaretRightIcon2, { weight: "regular", className: "size-3" })
|
|
2539
2556
|
]
|
|
2540
2557
|
}
|
|
2541
2558
|
);
|
|
@@ -2546,7 +2563,7 @@ var SubmenuTrigger = ({ className, children, ...props }) => {
|
|
|
2546
2563
|
nativeButton: false,
|
|
2547
2564
|
render: (renderProps) => /* @__PURE__ */ jsxs15("div", { ...renderProps, tabIndex: -1, className: submenuTriggerClass, children: [
|
|
2548
2565
|
/* @__PURE__ */ jsx49("div", { className: "flex-1", children: renderProps.children }),
|
|
2549
|
-
/* @__PURE__ */ jsx49(CaretRightIcon2, { className: "size-
|
|
2566
|
+
/* @__PURE__ */ jsx49(CaretRightIcon2, { weight: "regular", className: "size-3" })
|
|
2550
2567
|
] }),
|
|
2551
2568
|
...props,
|
|
2552
2569
|
children
|
|
@@ -2731,6 +2748,7 @@ var List2 = () => {
|
|
|
2731
2748
|
children: /* @__PURE__ */ jsx52(
|
|
2732
2749
|
XIcon2,
|
|
2733
2750
|
{
|
|
2751
|
+
weight: "regular",
|
|
2734
2752
|
className: cn({
|
|
2735
2753
|
"text-gray dark:text-zinc-950": variant === "warning",
|
|
2736
2754
|
"text-white dark:text-zinc-50": variant === "danger" || variant === "success" || variant === "info"
|
|
@@ -2854,7 +2872,7 @@ var QuantityInput = ({
|
|
|
2854
2872
|
"w-9": size === "xl"
|
|
2855
2873
|
}
|
|
2856
2874
|
),
|
|
2857
|
-
children: /* @__PURE__ */ jsx53(MinusIcon2, { className: "size-3.5 text-white dark:text-zinc-100" })
|
|
2875
|
+
children: /* @__PURE__ */ jsx53(MinusIcon2, { weight: "bold", className: "size-3.5 text-white dark:text-zinc-100" })
|
|
2858
2876
|
}
|
|
2859
2877
|
),
|
|
2860
2878
|
/* @__PURE__ */ jsx53(
|
|
@@ -2896,7 +2914,7 @@ var QuantityInput = ({
|
|
|
2896
2914
|
"w-9": size === "xl"
|
|
2897
2915
|
}
|
|
2898
2916
|
),
|
|
2899
|
-
children: /* @__PURE__ */ jsx53(PlusIcon, { className: "size-3.5 text-white dark:text-zinc-100" })
|
|
2917
|
+
children: /* @__PURE__ */ jsx53(PlusIcon, { weight: "bold", className: "size-3.5 text-white dark:text-zinc-100" })
|
|
2900
2918
|
}
|
|
2901
2919
|
)
|
|
2902
2920
|
]
|
|
@@ -4144,6 +4162,7 @@ var GroupHeader = ({
|
|
|
4144
4162
|
/* @__PURE__ */ jsx69(
|
|
4145
4163
|
CaretRightIcon3,
|
|
4146
4164
|
{
|
|
4165
|
+
weight: "bold",
|
|
4147
4166
|
className: cn(
|
|
4148
4167
|
"pointer-events-none fill-current text-gray dark:text-zinc-100 size-3 -rotate-90",
|
|
4149
4168
|
{ "rotate-90": isCollapsed }
|
|
@@ -4273,8 +4292,14 @@ var TreeIcon = ({ item, type = "IconDefault" }) => {
|
|
|
4273
4292
|
children: [
|
|
4274
4293
|
/* @__PURE__ */ jsx70(Indentation, { item, isExpanded }),
|
|
4275
4294
|
type === "IconDefault" && /* @__PURE__ */ jsx70("div", { className: "w-5" }),
|
|
4276
|
-
type === "IconRight" && /* @__PURE__ */ jsx70(CaretRightIcon4, { className: "size-5 text-gray-300 dark:text-zinc-100" }),
|
|
4277
|
-
type === "IconDown" && /* @__PURE__ */ jsx70(
|
|
4295
|
+
type === "IconRight" && /* @__PURE__ */ jsx70(CaretRightIcon4, { weight: "bold", className: "size-5 text-gray-300 dark:text-zinc-100" }),
|
|
4296
|
+
type === "IconDown" && /* @__PURE__ */ jsx70(
|
|
4297
|
+
CaretRightIcon4,
|
|
4298
|
+
{
|
|
4299
|
+
weight: "bold",
|
|
4300
|
+
className: "size-5 text-gray-300 dark:text-zinc-100 rotate-90"
|
|
4301
|
+
}
|
|
4302
|
+
)
|
|
4278
4303
|
]
|
|
4279
4304
|
}
|
|
4280
4305
|
);
|
|
@@ -5394,7 +5419,7 @@ var Toggle2 = Object.assign(Toggle, {
|
|
|
5394
5419
|
|
|
5395
5420
|
// src/toast/list.tsx
|
|
5396
5421
|
import { Toast as Toast2 } from "@base-ui/react";
|
|
5397
|
-
import {
|
|
5422
|
+
import { CircleNotchIcon, XIcon as XIcon3 } from "@phosphor-icons/react";
|
|
5398
5423
|
|
|
5399
5424
|
// src/toast/provider.tsx
|
|
5400
5425
|
import {
|
|
@@ -5476,7 +5501,13 @@ var List4 = () => {
|
|
|
5476
5501
|
children: customContent ? customContent : /* @__PURE__ */ jsxs30(Fragment8, { children: [
|
|
5477
5502
|
/* @__PURE__ */ jsxs30("div", { className: "flex w-full flex-col gap-1 rounded-lg px-2 py-3", children: [
|
|
5478
5503
|
/* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2 px-2", children: [
|
|
5479
|
-
isLoading && /* @__PURE__ */ jsx82(
|
|
5504
|
+
isLoading && /* @__PURE__ */ jsx82(
|
|
5505
|
+
CircleNotchIcon,
|
|
5506
|
+
{
|
|
5507
|
+
weight: "bold",
|
|
5508
|
+
className: "size-4 shrink-0 animate-spin text-gray-300 dark:text-zinc-200"
|
|
5509
|
+
}
|
|
5510
|
+
),
|
|
5480
5511
|
/* @__PURE__ */ jsx82(Toast2.Title, { className: "flex-1 whitespace-pre-line break-words text-sm font-bold text-gray-500 dark:text-zinc-200" })
|
|
5481
5512
|
] }),
|
|
5482
5513
|
/* @__PURE__ */ jsx82(Toast2.Content, { className: "flex flex-col px-2 transition-opacity duration-300 data-[behind]:opacity-0 data-[expanded]:opacity-100", children: /* @__PURE__ */ jsx82(Toast2.Description, { className: "flex-1 whitespace-pre-line break-words text-sm font-medium text-gray-500 dark:text-zinc-200" }) }),
|
|
@@ -5494,7 +5525,7 @@ var List4 = () => {
|
|
|
5494
5525
|
"aria-label": "Close",
|
|
5495
5526
|
nativeButton: true,
|
|
5496
5527
|
render: (renderProps) => {
|
|
5497
|
-
return /* @__PURE__ */ jsx82("div", { className: "absolute right-2 top-2", children: /* @__PURE__ */ jsx82(IconButton, { size: "lg", ...renderProps, children: /* @__PURE__ */ jsx82(XIcon3, { className: "text-gray-300 dark:text-zinc-400" }) }) });
|
|
5528
|
+
return /* @__PURE__ */ jsx82("div", { className: "absolute right-2 top-2", children: /* @__PURE__ */ jsx82(IconButton, { size: "lg", ...renderProps, children: /* @__PURE__ */ jsx82(XIcon3, { weight: "bold", className: "text-gray-300 dark:text-zinc-400" }) }) });
|
|
5498
5529
|
}
|
|
5499
5530
|
}
|
|
5500
5531
|
)
|
|
@@ -5553,6 +5584,7 @@ var Collapsed = ({ onExpand }) => {
|
|
|
5553
5584
|
children: /* @__PURE__ */ jsx83(
|
|
5554
5585
|
DotsSixVerticalIcon,
|
|
5555
5586
|
{
|
|
5587
|
+
weight: "bold",
|
|
5556
5588
|
"data-handle-icon": true,
|
|
5557
5589
|
className: `size-4 text-gray-200 dark:text-zinc-500 group-hover:text-gray-300 dark:group-hover:text-zinc-400 ${isVertical ? "rotate-90" : ""}`
|
|
5558
5590
|
}
|
|
@@ -5840,7 +5872,7 @@ var Pagination = ({ pagination, page, onClick, className }) => {
|
|
|
5840
5872
|
),
|
|
5841
5873
|
onClick: () => onClick(page - 1),
|
|
5842
5874
|
children: [
|
|
5843
|
-
/* @__PURE__ */ jsx88(CaretRightIcon5, { className: "size-
|
|
5875
|
+
/* @__PURE__ */ jsx88(CaretRightIcon5, { weight: "bold", className: "size-4 rotate-180" }),
|
|
5844
5876
|
/* @__PURE__ */ jsx88("span", { className: "sr-only", children: "Previous" })
|
|
5845
5877
|
]
|
|
5846
5878
|
}
|
|
@@ -5881,7 +5913,7 @@ var Pagination = ({ pagination, page, onClick, className }) => {
|
|
|
5881
5913
|
onClick: () => onClick(page + 1),
|
|
5882
5914
|
children: [
|
|
5883
5915
|
/* @__PURE__ */ jsx88("span", { className: "sr-only", children: "Next" }),
|
|
5884
|
-
/* @__PURE__ */ jsx88(CaretRightIcon5, { className: "size-
|
|
5916
|
+
/* @__PURE__ */ jsx88(CaretRightIcon5, { weight: "bold", className: "size-4" })
|
|
5885
5917
|
]
|
|
5886
5918
|
}
|
|
5887
5919
|
)
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toolpath/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Toolpath React and Tailwind UI primitives",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "https://github.com/toolpath/
|
|
8
|
+
"url": "https://github.com/toolpath/ui-packages.git",
|
|
9
9
|
"directory": "packages/ui"
|
|
10
10
|
},
|
|
11
11
|
"homepage": "https://developers.toolpath.com",
|
|
12
12
|
"bugs": {
|
|
13
|
-
"url": "https://github.com/toolpath/
|
|
13
|
+
"url": "https://github.com/toolpath/ui-packages/issues"
|
|
14
14
|
},
|
|
15
15
|
"publishConfig": {
|
|
16
16
|
"access": "public",
|
package/src/breadcrumbs/item.tsx
CHANGED
|
@@ -54,9 +54,10 @@ export const Item = ({
|
|
|
54
54
|
<>
|
|
55
55
|
{previous && (
|
|
56
56
|
<CaretRightIcon
|
|
57
|
+
weight="regular"
|
|
57
58
|
data-previous
|
|
58
59
|
className={cn(
|
|
59
|
-
'flex size-
|
|
60
|
+
'flex size-4 rotate-180 truncate text-gray-300 dark:text-zinc-500',
|
|
60
61
|
{
|
|
61
62
|
'sm:hidden': breakpoint === 'sm',
|
|
62
63
|
'md:hidden': breakpoint === 'md',
|
|
@@ -70,8 +71,9 @@ export const Item = ({
|
|
|
70
71
|
</>
|
|
71
72
|
</Link>
|
|
72
73
|
<CaretRightIcon
|
|
74
|
+
weight="regular"
|
|
73
75
|
data-separator
|
|
74
|
-
className={cn('hidden size-
|
|
76
|
+
className={cn('hidden size-4 text-gray-300 dark:text-zinc-500', {
|
|
75
77
|
'sm:flex': breakpoint === 'sm',
|
|
76
78
|
'md:flex': breakpoint === 'md',
|
|
77
79
|
'lg:flex': breakpoint === 'lg',
|
package/src/button/button.tsx
CHANGED
|
@@ -82,7 +82,23 @@ export const Button = ({
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
/*
|
|
86
|
+
* The inner surface, as an element rather than a component.
|
|
87
|
+
*
|
|
88
|
+
* It used to be `const ContentWrapper = ({children}) => ...` declared here,
|
|
89
|
+
* inside `Button` — which makes it a **new component type on every render**,
|
|
90
|
+
* so React unmounts the whole content subtree and mounts a fresh one each
|
|
91
|
+
* time. That is a real defect and not only a wasted render: a `click` is only
|
|
92
|
+
* dispatched when `mousedown` and `mouseup` land on the same element, and the
|
|
93
|
+
* `<div>` the pointer is actually over was being replaced between the two.
|
|
94
|
+
* Any render occurring mid-press — a hover handler on an ancestor is enough —
|
|
95
|
+
* silently swallowed the click, while the button stayed in the tree, matched
|
|
96
|
+
* by role and name, and reported enabled.
|
|
97
|
+
*
|
|
98
|
+
* It cost two long debugging sessions in the part viewer before the cause was
|
|
99
|
+
* found (F61, F67). Nothing in the types or the tests says so.
|
|
100
|
+
*/
|
|
101
|
+
const wrap = (inner: ReactNode) => (
|
|
86
102
|
<div
|
|
87
103
|
className={cn(
|
|
88
104
|
'whitespace-nowrap rounded px-3 py-1 font-body text-xs font-semibold tracking-normal',
|
|
@@ -118,23 +134,21 @@ export const Button = ({
|
|
|
118
134
|
className,
|
|
119
135
|
)}
|
|
120
136
|
>
|
|
121
|
-
{
|
|
137
|
+
{inner}
|
|
122
138
|
</div>
|
|
123
139
|
)
|
|
124
140
|
|
|
125
|
-
const content = !isLoading
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
</ContentWrapper>
|
|
137
|
-
)
|
|
141
|
+
const content = !isLoading
|
|
142
|
+
? wrap(children)
|
|
143
|
+
: wrap(
|
|
144
|
+
<AnimatedEllipsis
|
|
145
|
+
className={cn({
|
|
146
|
+
'h-2 w-1': size === 'sm',
|
|
147
|
+
'h-2 w-1.5': size === 'md',
|
|
148
|
+
'h-3 w-2': size === 'lg',
|
|
149
|
+
})}
|
|
150
|
+
/>,
|
|
151
|
+
)
|
|
138
152
|
|
|
139
153
|
if (asLink) {
|
|
140
154
|
return (
|
package/src/callout/callout.tsx
CHANGED
|
@@ -172,7 +172,7 @@ const CalloutContent = ({ children, className }: CalloutContentProps) => {
|
|
|
172
172
|
'transition-colors cursor-pointer',
|
|
173
173
|
)}
|
|
174
174
|
>
|
|
175
|
-
<XIcon className="size-3.5" />
|
|
175
|
+
<XIcon weight="bold" className="size-3.5" />
|
|
176
176
|
</Popover.Close>
|
|
177
177
|
{children}
|
|
178
178
|
</Popover.Popup>
|
|
@@ -68,8 +68,8 @@ export const Checkbox = ({
|
|
|
68
68
|
{...props}
|
|
69
69
|
>
|
|
70
70
|
<BaseCheckbox.Indicator className="flex items-center justify-center text-white" keepMounted>
|
|
71
|
-
{checked && <CheckIcon className="w-full h-full" />}
|
|
72
|
-
{indeterminate && <MinusIcon className="w-full h-full" />}
|
|
71
|
+
{checked && <CheckIcon weight="bold" className="w-full h-full" />}
|
|
72
|
+
{indeterminate && <MinusIcon weight="bold" className="w-full h-full" />}
|
|
73
73
|
</BaseCheckbox.Indicator>
|
|
74
74
|
</BaseCheckbox.Root>
|
|
75
75
|
)
|
package/src/combobox/button.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { FC, ReactNode, SVGProps } from 'react'
|
|
2
2
|
import { cn } from '../helpers'
|
|
3
|
-
import {
|
|
3
|
+
import { CaretUpDownIcon } from '@phosphor-icons/react'
|
|
4
4
|
import { useCombobox } from './combobox-context'
|
|
5
5
|
import { Icon } from './icon'
|
|
6
6
|
import { Trigger } from './trigger'
|
|
@@ -92,7 +92,7 @@ export const Button = ({
|
|
|
92
92
|
variant === 'ghost',
|
|
93
93
|
})}
|
|
94
94
|
>
|
|
95
|
-
<
|
|
95
|
+
<CaretUpDownIcon weight="bold" className="size-3.5 text-gray-200 dark:text-zinc-400" />
|
|
96
96
|
</Icon>
|
|
97
97
|
</Trigger>
|
|
98
98
|
)
|
package/src/combobox/item.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from '@base-ui/react'
|
|
6
6
|
import { useCombobox } from './combobox-context'
|
|
7
7
|
import { cn } from '../helpers'
|
|
8
|
-
import {
|
|
8
|
+
import { ArrowElbowDownLeftIcon } from '@phosphor-icons/react'
|
|
9
9
|
import { Tooltip } from '../tooltip/tooltip'
|
|
10
10
|
|
|
11
11
|
export type ComboboxItemProps = BaseComboboxItemProps
|
|
@@ -52,7 +52,10 @@ export const Item = ({ className, children, value, ...props }: ComboboxItemProps
|
|
|
52
52
|
<>{children}</>
|
|
53
53
|
</Tooltip>
|
|
54
54
|
</div>
|
|
55
|
-
<
|
|
55
|
+
<ArrowElbowDownLeftIcon
|
|
56
|
+
weight="bold"
|
|
57
|
+
className="size-4 text-gray-300 dark:text-zinc-400 hidden group-data-[highlighted]:block group-hover:hidden group-data-[highlighted]:group-hover:hidden group-data-[selected]:hidden"
|
|
58
|
+
/>
|
|
56
59
|
</BaseCombobox.Item>
|
|
57
60
|
)
|
|
58
61
|
}
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
FC,
|
|
3
|
+
ReactNode,
|
|
4
|
+
SVGProps,
|
|
5
|
+
useCallback,
|
|
6
|
+
useEffect,
|
|
7
|
+
useLayoutEffect,
|
|
8
|
+
useRef,
|
|
9
|
+
} from 'react'
|
|
2
10
|
import { cn } from '../helpers'
|
|
3
|
-
import {
|
|
11
|
+
import { ArrowElbowDownLeftIcon } from '@phosphor-icons/react'
|
|
4
12
|
import { Input } from '../input'
|
|
5
13
|
|
|
14
|
+
const ReturnIcon = (props: SVGProps<SVGSVGElement>) => (
|
|
15
|
+
<ArrowElbowDownLeftIcon weight="bold" {...props} />
|
|
16
|
+
)
|
|
17
|
+
|
|
6
18
|
export interface EditingCell {
|
|
7
19
|
rowId: string | number
|
|
8
20
|
field: string
|
|
@@ -254,7 +266,7 @@ export const EditableCell: FC<EditableCellProps> = ({
|
|
|
254
266
|
name={`editable-${field}-${rowId}`}
|
|
255
267
|
id={`editable-${field}-${rowId}`}
|
|
256
268
|
size="md"
|
|
257
|
-
icon={
|
|
269
|
+
icon={ReturnIcon}
|
|
258
270
|
iconPosition="right"
|
|
259
271
|
inputMode={type === 'number' ? 'numeric' : undefined}
|
|
260
272
|
onBlur={handleBlur}
|
package/src/input/input.tsx
CHANGED
|
@@ -118,6 +118,7 @@ export const Input = ({
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
const iconClassName = cn(
|
|
121
|
+
'self-center',
|
|
121
122
|
{
|
|
122
123
|
'text-gray-400 dark:text-zinc-400':
|
|
123
124
|
(variant === 'muted' || variant === 'default') && !disabled,
|
|
@@ -138,7 +139,7 @@ export const Input = ({
|
|
|
138
139
|
|
|
139
140
|
const iconElement =
|
|
140
141
|
type === 'search' && !IconComponent ? (
|
|
141
|
-
<MagnifyingGlassIcon data-icon className={iconClassName} />
|
|
142
|
+
<MagnifyingGlassIcon weight="bold" data-icon className={iconClassName} />
|
|
142
143
|
) : IconComponent ? (
|
|
143
144
|
<IconComponent data-icon className={iconClassName} />
|
|
144
145
|
) : null
|
|
@@ -249,7 +250,7 @@ export const Input = ({
|
|
|
249
250
|
value ? 'opacity-0' : 'invisible',
|
|
250
251
|
)}
|
|
251
252
|
>
|
|
252
|
-
{copied ? <CheckIcon /> : <CopyIcon />}
|
|
253
|
+
{copied ? <CheckIcon weight="bold" /> : <CopyIcon />}
|
|
253
254
|
</IconButton>
|
|
254
255
|
</Tooltip>
|
|
255
256
|
</div>
|
|
@@ -26,7 +26,7 @@ export const SubmenuTrigger = ({ className, children, ...props }: MenuSubmenuTri
|
|
|
26
26
|
{...(props as MenuSubmenuTriggerProps)}
|
|
27
27
|
>
|
|
28
28
|
<div className="flex-1">{children}</div>
|
|
29
|
-
<CaretRightIcon className="size-
|
|
29
|
+
<CaretRightIcon weight="regular" className="size-3" />
|
|
30
30
|
</ContextMenu.SubmenuTrigger>
|
|
31
31
|
)
|
|
32
32
|
}
|
|
@@ -37,7 +37,7 @@ export const SubmenuTrigger = ({ className, children, ...props }: MenuSubmenuTri
|
|
|
37
37
|
render={(renderProps) => (
|
|
38
38
|
<div {...renderProps} tabIndex={-1} className={submenuTriggerClass}>
|
|
39
39
|
<div className="flex-1">{renderProps.children}</div>
|
|
40
|
-
<CaretRightIcon className="size-
|
|
40
|
+
<CaretRightIcon weight="regular" className="size-3" />
|
|
41
41
|
</div>
|
|
42
42
|
)}
|
|
43
43
|
{...(props as MenuSubmenuTriggerProps)}
|
|
@@ -60,7 +60,7 @@ export const Pagination: FC<PaginationProps> = ({ pagination, page, onClick, cla
|
|
|
60
60
|
)}
|
|
61
61
|
onClick={() => onClick(page - 1)}
|
|
62
62
|
>
|
|
63
|
-
<CaretRightIcon className="size-
|
|
63
|
+
<CaretRightIcon weight="bold" className="size-4 rotate-180" />
|
|
64
64
|
<span className="sr-only">Previous</span>
|
|
65
65
|
</button>
|
|
66
66
|
<nav className="text-sm text-gray-400 dark:text-zinc-300">
|
|
@@ -129,7 +129,7 @@ export const Pagination: FC<PaginationProps> = ({ pagination, page, onClick, cla
|
|
|
129
129
|
onClick={() => onClick(page + 1)}
|
|
130
130
|
>
|
|
131
131
|
<span className="sr-only">Next</span>
|
|
132
|
-
<CaretRightIcon className="size-
|
|
132
|
+
<CaretRightIcon weight="bold" className="size-4" />
|
|
133
133
|
</button>
|
|
134
134
|
</div>
|
|
135
135
|
)
|
package/src/panels/collapsed.tsx
CHANGED
|
@@ -24,6 +24,7 @@ export const Collapsed: FC<CollapsedProps> = ({ onExpand }) => {
|
|
|
24
24
|
className={`flex h-full relative w-full items-center justify-center group outline-none focus-visible:ring-2 ring-info/75 ring-inset ${isVertical ? 'cursor-row-resize' : 'cursor-col-resize'}`}
|
|
25
25
|
>
|
|
26
26
|
<DotsSixVerticalIcon
|
|
27
|
+
weight="bold"
|
|
27
28
|
data-handle-icon
|
|
28
29
|
className={`size-4 text-gray-200 dark:text-zinc-500 group-hover:text-gray-300 dark:group-hover:text-zinc-400 ${isVertical ? 'rotate-90' : ''}`}
|
|
29
30
|
/>
|
|
@@ -114,7 +114,7 @@ export const QuantityInput = ({
|
|
|
114
114
|
},
|
|
115
115
|
)}
|
|
116
116
|
>
|
|
117
|
-
<MinusIcon className="size-3.5 text-white dark:text-zinc-100" />
|
|
117
|
+
<MinusIcon weight="bold" className="size-3.5 text-white dark:text-zinc-100" />
|
|
118
118
|
</button>
|
|
119
119
|
<input
|
|
120
120
|
ref={ref}
|
|
@@ -151,7 +151,7 @@ export const QuantityInput = ({
|
|
|
151
151
|
},
|
|
152
152
|
)}
|
|
153
153
|
>
|
|
154
|
-
<PlusIcon className="size-3.5 text-white dark:text-zinc-100" />
|
|
154
|
+
<PlusIcon weight="bold" className="size-3.5 text-white dark:text-zinc-100" />
|
|
155
155
|
</button>
|
|
156
156
|
</div>
|
|
157
157
|
)
|
package/src/table/tree-icon.tsx
CHANGED
|
@@ -137,10 +137,13 @@ export const TreeIcon = ({ item, type = 'IconDefault' }: TreeIconProps) => {
|
|
|
137
137
|
<Indentation item={item} isExpanded={isExpanded} />
|
|
138
138
|
{type === 'IconDefault' && <div className="w-5" />}
|
|
139
139
|
{type === 'IconRight' && (
|
|
140
|
-
<CaretRightIcon className="size-5 text-gray-300 dark:text-zinc-100" />
|
|
140
|
+
<CaretRightIcon weight="bold" className="size-5 text-gray-300 dark:text-zinc-100" />
|
|
141
141
|
)}
|
|
142
142
|
{type === 'IconDown' && (
|
|
143
|
-
<CaretRightIcon
|
|
143
|
+
<CaretRightIcon
|
|
144
|
+
weight="bold"
|
|
145
|
+
className="size-5 text-gray-300 dark:text-zinc-100 rotate-90"
|
|
146
|
+
/>
|
|
144
147
|
)}
|
|
145
148
|
</div>
|
|
146
149
|
)
|
package/src/toast/list.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import { Toast } from '@base-ui/react'
|
|
|
3
3
|
import { Button } from '../button'
|
|
4
4
|
import { cn } from '../helpers'
|
|
5
5
|
import { IconButton } from '../icon-button'
|
|
6
|
-
import {
|
|
6
|
+
import { CircleNotchIcon, XIcon } from '@phosphor-icons/react'
|
|
7
7
|
import { useToastManager } from './provider'
|
|
8
8
|
|
|
9
9
|
export interface CustomToastData {
|
|
@@ -86,7 +86,10 @@ export const List = () => {
|
|
|
86
86
|
{/* Title row with optional spinner */}
|
|
87
87
|
<div className="flex items-center gap-2 px-2">
|
|
88
88
|
{isLoading && (
|
|
89
|
-
<
|
|
89
|
+
<CircleNotchIcon
|
|
90
|
+
weight="bold"
|
|
91
|
+
className="size-4 shrink-0 animate-spin text-gray-300 dark:text-zinc-200"
|
|
92
|
+
/>
|
|
90
93
|
)}
|
|
91
94
|
<Toast.Title className="flex-1 whitespace-pre-line break-words text-sm font-bold text-gray-500 dark:text-zinc-200" />
|
|
92
95
|
</div>
|
|
@@ -116,7 +119,7 @@ export const List = () => {
|
|
|
116
119
|
return (
|
|
117
120
|
<div className="absolute right-2 top-2">
|
|
118
121
|
<IconButton size="lg" {...renderProps}>
|
|
119
|
-
<XIcon className="text-gray-300 dark:text-zinc-400" />
|
|
122
|
+
<XIcon weight="bold" className="text-gray-300 dark:text-zinc-400" />
|
|
120
123
|
</IconButton>
|
|
121
124
|
</div>
|
|
122
125
|
)
|