@noya-app/noya-designsystem 0.1.5 → 0.1.7
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/.turbo/turbo-build.log +9 -9
- package/CHANGELOG.md +19 -0
- package/dist/index.d.mts +10 -7
- package/dist/index.d.ts +10 -7
- package/dist/index.js +31 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/components/Button.tsx +14 -5
- package/src/components/DraggableMenuButton.tsx +21 -15
- package/src/components/InspectorPrimitives.tsx +1 -0
- package/src/components/ListView.tsx +10 -5
- package/src/components/RadioGroup.tsx +41 -40
- package/src/components/Select.tsx +1 -1
- package/src/theme/dark.ts +3 -0
package/dist/index.mjs
CHANGED
|
@@ -137,17 +137,17 @@ var ButtonElement = styled4.button(({ theme, active, disabled, variant, size: si
|
|
|
137
137
|
paddingBottom: "12px",
|
|
138
138
|
paddingLeft: "16px"
|
|
139
139
|
},
|
|
140
|
-
background: active ? theme.colors.primary : variant === "none" || variant === "thin" ? "transparent" : theme.colors.inputBackground,
|
|
140
|
+
background: active ? theme.colors.primary : variant === "primaryGradient" ? `linear-gradient(90deg, ${theme.colors.primary}, ${theme.colors.primaryLight})` : variant === "none" || variant === "thin" ? "transparent" : theme.colors.inputBackground,
|
|
141
141
|
color: active ? "white" : theme.colors.text,
|
|
142
142
|
opacity: disabled ? 0.25 : 1,
|
|
143
143
|
"&:focus": {
|
|
144
144
|
boxShadow: `0 0 0 1px ${theme.colors.sidebar.background}, 0 0 0 3px ${theme.colors.primary}`
|
|
145
145
|
},
|
|
146
146
|
"&:hover": {
|
|
147
|
-
background: theme.colors.inputBackgroundLight
|
|
147
|
+
background: variant === "primaryGradient" ? theme.colors.primaryLight : theme.colors.inputBackgroundLight
|
|
148
148
|
},
|
|
149
149
|
"&:active": {
|
|
150
|
-
background: theme.colors.activeBackground
|
|
150
|
+
background: variant === "primaryGradient" ? theme.colors.primary : theme.colors.activeBackground
|
|
151
151
|
},
|
|
152
152
|
...variant === "primary" && {
|
|
153
153
|
background: theme.colors.primary,
|
|
@@ -558,18 +558,22 @@ var style = {
|
|
|
558
558
|
flex: "1 0 0",
|
|
559
559
|
flexDirection: "column"
|
|
560
560
|
};
|
|
561
|
-
var AutoSizer = memo4(function AutoSizer2({
|
|
561
|
+
var AutoSizer = memo4(function AutoSizer2({
|
|
562
|
+
children,
|
|
563
|
+
className
|
|
564
|
+
}) {
|
|
562
565
|
const containerRef = useRef2(null);
|
|
563
566
|
const containerSize = useSize(containerRef);
|
|
564
|
-
return /* @__PURE__ */ React9.createElement("div", { ref: containerRef, style }, containerSize && containerSize.width > 0 && containerSize.height > 0 && children(containerSize));
|
|
567
|
+
return /* @__PURE__ */ React9.createElement("div", { ref: containerRef, style, className }, containerSize && containerSize.width > 0 && containerSize.height > 0 && children(containerSize));
|
|
565
568
|
});
|
|
566
569
|
var SingleDimensionAutoSizer = memo4(function SingleDimensionAutoSizer2({
|
|
567
570
|
children,
|
|
568
|
-
dimension
|
|
571
|
+
dimension,
|
|
572
|
+
className
|
|
569
573
|
}) {
|
|
570
574
|
const containerRef = useRef2(null);
|
|
571
575
|
const containerSize = useSize(containerRef, dimension);
|
|
572
|
-
return /* @__PURE__ */ React9.createElement("div", { ref: containerRef, style }, containerSize && containerSize[dimension] > 0 && children(containerSize[dimension]));
|
|
576
|
+
return /* @__PURE__ */ React9.createElement("div", { ref: containerRef, style, className }, containerSize && containerSize[dimension] > 0 && children(containerSize[dimension]));
|
|
573
577
|
});
|
|
574
578
|
|
|
575
579
|
// ../noya-react-utils/src/components/FileDropTarget.tsx
|
|
@@ -2370,7 +2374,7 @@ var DraggableMenuButton = memo14(function DraggableMenuButton2({
|
|
|
2370
2374
|
event.preventDefault();
|
|
2371
2375
|
}
|
|
2372
2376
|
},
|
|
2373
|
-
/* @__PURE__ */ React23.createElement(
|
|
2377
|
+
items && onSelect ? /* @__PURE__ */ React23.createElement(
|
|
2374
2378
|
DropdownMenu,
|
|
2375
2379
|
{
|
|
2376
2380
|
open,
|
|
@@ -2385,6 +2389,11 @@ var DraggableMenuButton = memo14(function DraggableMenuButton2({
|
|
|
2385
2389
|
color: isVisible || open ? color : "transparent"
|
|
2386
2390
|
}
|
|
2387
2391
|
))
|
|
2392
|
+
) : /* @__PURE__ */ React23.createElement(
|
|
2393
|
+
DragHandleDots2Icon,
|
|
2394
|
+
{
|
|
2395
|
+
color: isVisible || open ? color : "transparent"
|
|
2396
|
+
}
|
|
2388
2397
|
)
|
|
2389
2398
|
);
|
|
2390
2399
|
});
|
|
@@ -3901,7 +3910,8 @@ var ListViewRow = forwardRef10(function ListViewRow2({
|
|
|
3901
3910
|
onContextMenu,
|
|
3902
3911
|
onSelectMenuItem,
|
|
3903
3912
|
onMenuOpenChange,
|
|
3904
|
-
onKeyDown
|
|
3913
|
+
onKeyDown,
|
|
3914
|
+
style: style3
|
|
3905
3915
|
}, forwardedRef) {
|
|
3906
3916
|
depth = Math.max(0, depth);
|
|
3907
3917
|
const {
|
|
@@ -3935,13 +3945,14 @@ var ListViewRow = forwardRef10(function ListViewRow2({
|
|
|
3935
3945
|
},
|
|
3936
3946
|
[onDoubleClick]
|
|
3937
3947
|
);
|
|
3938
|
-
const
|
|
3948
|
+
const mergedStyle = useMemo16(() => {
|
|
3939
3949
|
return isDragging ? {
|
|
3940
3950
|
// TODO: Where do these offsets actually come from?
|
|
3941
3951
|
transform: `translate3d(-36px, -6px, 0)`,
|
|
3942
|
-
width: `calc(100% + 48px)
|
|
3943
|
-
|
|
3944
|
-
|
|
3952
|
+
width: `calc(100% + 48px)`,
|
|
3953
|
+
...style3
|
|
3954
|
+
} : style3;
|
|
3955
|
+
}, [isDragging, style3]);
|
|
3945
3956
|
const renderContent = ({
|
|
3946
3957
|
relativeDropPosition,
|
|
3947
3958
|
...renderProps
|
|
@@ -3969,7 +3980,7 @@ var ListViewRow = forwardRef10(function ListViewRow2({
|
|
|
3969
3980
|
"aria-selected": selected,
|
|
3970
3981
|
divider: !isDragging && divider,
|
|
3971
3982
|
onKeyDown,
|
|
3972
|
-
style:
|
|
3983
|
+
style: mergedStyle,
|
|
3973
3984
|
...renderProps,
|
|
3974
3985
|
...mergeEventHandlers(
|
|
3975
3986
|
{ onPointerDown: renderProps.onPointerDown },
|
|
@@ -4982,6 +4993,7 @@ var StyledRoot = styled29(ToggleGroupPrimitive.Root).withConfig({
|
|
|
4982
4993
|
var StyledItem = styled29(ToggleGroupPrimitive.Item).withConfig({
|
|
4983
4994
|
shouldForwardProp: (prop) => !ignoredProps3.has(prop)
|
|
4984
4995
|
})(({ theme, colorScheme }) => ({
|
|
4996
|
+
...theme.textStyles.small,
|
|
4985
4997
|
position: "relative",
|
|
4986
4998
|
flex: "1 1 0",
|
|
4987
4999
|
appearance: "none",
|
|
@@ -5592,6 +5604,9 @@ var colors2 = produce(colors, (colors3) => {
|
|
|
5592
5604
|
colors3.activeBackground = "rgba(181,178,255,0.08)";
|
|
5593
5605
|
colors3.thumbnailBackground = "#1f1d33";
|
|
5594
5606
|
colors3.thumbnailShadow = "#1f1d3366";
|
|
5607
|
+
colors3.breadcrumb.text = colors3.textMuted;
|
|
5608
|
+
colors3.breadcrumb.textHover = colors3.textSubtle;
|
|
5609
|
+
colors3.breadcrumb.icon = colors3.icon;
|
|
5595
5610
|
});
|
|
5596
5611
|
|
|
5597
5612
|
// src/utils/createSectionedMenu.ts
|
|
@@ -5710,8 +5725,9 @@ var RowLabel = styled33.span(({ theme, textStyle }) => ({
|
|
|
5710
5725
|
color: theme.colors.textSubtle,
|
|
5711
5726
|
fontWeight: "bold"
|
|
5712
5727
|
},
|
|
5713
|
-
lineHeight: "19px"
|
|
5728
|
+
lineHeight: "19px",
|
|
5714
5729
|
// Button height
|
|
5730
|
+
alignItems: "center"
|
|
5715
5731
|
}));
|
|
5716
5732
|
var LabeledRow = memo29(function LabeledRow2({
|
|
5717
5733
|
id,
|