@noya-app/noya-designsystem 0.0.13 → 0.0.15
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 +24 -0
- package/dist/index.d.mts +65 -44
- package/dist/index.d.ts +65 -44
- package/dist/index.js +71 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +70 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
- package/src/components/Button.tsx +84 -78
- package/src/components/Chip.tsx +74 -73
- package/src/components/Dialog.tsx +51 -26
- package/src/components/GridView.tsx +113 -100
- package/src/components/IconButton.tsx +10 -8
- package/src/components/InputFieldWithCompletions.tsx +3 -0
- package/src/components/InspectorPrimitives.tsx +1 -1
- package/src/components/Switch.tsx +25 -25
- package/src/components/Text.tsx +60 -56
- package/src/theme/dark.ts +33 -31
- package/src/theme/light.ts +76 -64
package/dist/index.js
CHANGED
|
@@ -50,6 +50,7 @@ __export(src_exports, {
|
|
|
50
50
|
DropdownMenu: () => DropdownMenu,
|
|
51
51
|
FillInputField: () => FillInputField,
|
|
52
52
|
FillPreviewBackground: () => FillPreviewBackground,
|
|
53
|
+
FullscreenDialog: () => FullscreenDialog,
|
|
53
54
|
GlobalInputBlurProvider: () => GlobalInputBlurProvider,
|
|
54
55
|
GradientPicker: () => GradientPicker,
|
|
55
56
|
GridView: () => GridView,
|
|
@@ -245,9 +246,9 @@ var ButtonElement = import_styled_components4.default.button(({ theme, active, d
|
|
|
245
246
|
textAlign: "left",
|
|
246
247
|
borderRadius: "4px",
|
|
247
248
|
paddingTop: variant === "none" ? "0px" : "4px",
|
|
248
|
-
paddingRight: variant === "none" ? "0px" : variant === "thin" ? "1px" : "
|
|
249
|
+
paddingRight: variant === "none" ? "0px" : variant === "thin" ? "1px" : "8px",
|
|
249
250
|
paddingBottom: variant === "none" ? "0px" : "4px",
|
|
250
|
-
paddingLeft: variant === "none" ? "0px" : variant === "thin" ? "1px" : "
|
|
251
|
+
paddingLeft: variant === "none" ? "0px" : variant === "thin" ? "1px" : "8px",
|
|
251
252
|
...size2 === "large" && {
|
|
252
253
|
paddingTop: "12px",
|
|
253
254
|
paddingRight: "16px",
|
|
@@ -332,6 +333,8 @@ var ButtonContent = import_styled_components4.default.span(({ theme }) => ({
|
|
|
332
333
|
}));
|
|
333
334
|
var Button = (0, import_react4.forwardRef)(function Button2({
|
|
334
335
|
id,
|
|
336
|
+
className,
|
|
337
|
+
style,
|
|
335
338
|
flex,
|
|
336
339
|
tabIndex,
|
|
337
340
|
tooltip,
|
|
@@ -350,6 +353,8 @@ var Button = (0, import_react4.forwardRef)(function Button2({
|
|
|
350
353
|
{
|
|
351
354
|
ref: forwardedRef,
|
|
352
355
|
id,
|
|
356
|
+
className,
|
|
357
|
+
style,
|
|
353
358
|
flex,
|
|
354
359
|
tabIndex,
|
|
355
360
|
active,
|
|
@@ -570,6 +575,28 @@ var Dialog = (0, import_react7.forwardRef)(function Dialog2({
|
|
|
570
575
|
children
|
|
571
576
|
));
|
|
572
577
|
});
|
|
578
|
+
var FullscreenDialog = (0, import_react7.forwardRef)(function FullscreenDialog2({ style, ...rest }, forwardedRef) {
|
|
579
|
+
return /* @__PURE__ */ import_react7.default.createElement(
|
|
580
|
+
Dialog,
|
|
581
|
+
{
|
|
582
|
+
ref: forwardedRef,
|
|
583
|
+
style: {
|
|
584
|
+
width: "100%",
|
|
585
|
+
height: "100%",
|
|
586
|
+
maxWidth: "100%",
|
|
587
|
+
maxHeight: "100%",
|
|
588
|
+
top: "0",
|
|
589
|
+
left: "0",
|
|
590
|
+
transform: "none",
|
|
591
|
+
display: "flex",
|
|
592
|
+
flexDirection: "column",
|
|
593
|
+
padding: 0,
|
|
594
|
+
...style
|
|
595
|
+
},
|
|
596
|
+
...rest
|
|
597
|
+
}
|
|
598
|
+
);
|
|
599
|
+
});
|
|
573
600
|
|
|
574
601
|
// src/components/InputField.tsx
|
|
575
602
|
var import_noya_icons2 = require("@noya-app/noya-icons");
|
|
@@ -1824,6 +1851,7 @@ var ChipElement = import_styled_components16.default.span(({ theme, colorScheme,
|
|
|
1824
1851
|
display: "inline-flex",
|
|
1825
1852
|
alignItems: "center",
|
|
1826
1853
|
lineHeight: "1.4",
|
|
1854
|
+
whiteSpace: "pre",
|
|
1827
1855
|
...size2 === "medium" ? {
|
|
1828
1856
|
fontSize: "11px",
|
|
1829
1857
|
padding: "4px 8px"
|
|
@@ -2751,10 +2779,20 @@ var sizes = {
|
|
|
2751
2779
|
itemHeight: 170,
|
|
2752
2780
|
gap: 20
|
|
2753
2781
|
},
|
|
2782
|
+
medium: {
|
|
2783
|
+
itemWidth: 220,
|
|
2784
|
+
itemHeight: 220,
|
|
2785
|
+
gap: 16
|
|
2786
|
+
},
|
|
2754
2787
|
large: {
|
|
2755
2788
|
itemWidth: 280,
|
|
2756
2789
|
itemHeight: 280,
|
|
2757
|
-
gap:
|
|
2790
|
+
gap: 24
|
|
2791
|
+
},
|
|
2792
|
+
xl: {
|
|
2793
|
+
itemWidth: 400,
|
|
2794
|
+
itemHeight: 400,
|
|
2795
|
+
gap: 32
|
|
2758
2796
|
}
|
|
2759
2797
|
};
|
|
2760
2798
|
var Grid2 = import_styled_components23.default.div(({ theme, size: size2, padding }) => {
|
|
@@ -2914,7 +2952,8 @@ var GridViewItem = (0, import_react27.forwardRef)(function GridViewItem2({
|
|
|
2914
2952
|
children,
|
|
2915
2953
|
menuItems,
|
|
2916
2954
|
onSelectMenuItem,
|
|
2917
|
-
onContextMenu
|
|
2955
|
+
onContextMenu,
|
|
2956
|
+
style
|
|
2918
2957
|
}, forwardedRef) {
|
|
2919
2958
|
const [hovered, setHovered] = import_react27.default.useState(false);
|
|
2920
2959
|
const { hoverProps } = useHover({
|
|
@@ -2963,7 +3002,8 @@ var GridViewItem = (0, import_react27.forwardRef)(function GridViewItem2({
|
|
|
2963
3002
|
hovered: !disabled && hovered,
|
|
2964
3003
|
onClick: handleClick,
|
|
2965
3004
|
onDoubleClick,
|
|
2966
|
-
onContextMenu
|
|
3005
|
+
onContextMenu,
|
|
3006
|
+
style
|
|
2967
3007
|
},
|
|
2968
3008
|
children
|
|
2969
3009
|
),
|
|
@@ -4072,6 +4112,7 @@ var InputFieldWithCompletions = (0, import_react31.memo)(
|
|
|
4072
4112
|
onBlur,
|
|
4073
4113
|
onDeleteWhenEmpty,
|
|
4074
4114
|
style,
|
|
4115
|
+
className,
|
|
4075
4116
|
children,
|
|
4076
4117
|
hideChildrenWhenFocused = false,
|
|
4077
4118
|
hideMenuWhenEmptyValue = false
|
|
@@ -4273,6 +4314,7 @@ var InputFieldWithCompletions = (0, import_react31.memo)(
|
|
|
4273
4314
|
onFocusCapture: handleFocus,
|
|
4274
4315
|
onKeyDown: handleKeyDown,
|
|
4275
4316
|
style,
|
|
4317
|
+
className,
|
|
4276
4318
|
autoCapitalize: "off",
|
|
4277
4319
|
autoComplete: "off",
|
|
4278
4320
|
autoCorrect: "off",
|
|
@@ -4777,7 +4819,7 @@ var Slider = function Slider2({
|
|
|
4777
4819
|
var SwitchPrimitive = __toESM(require("@radix-ui/react-switch"));
|
|
4778
4820
|
var import_react38 = __toESM(require("react"));
|
|
4779
4821
|
var import_styled_components33 = __toESM(require("styled-components"));
|
|
4780
|
-
var SwitchRoot = (0, import_styled_components33.default)(SwitchPrimitive.Root)(({ theme, variant }) => ({
|
|
4822
|
+
var SwitchRoot = (0, import_styled_components33.default)(SwitchPrimitive.Root)(({ theme, colorScheme: variant }) => ({
|
|
4781
4823
|
all: "unset",
|
|
4782
4824
|
width: 32,
|
|
4783
4825
|
height: 19,
|
|
@@ -4809,12 +4851,12 @@ var SwitchThumb = (0, import_styled_components33.default)(SwitchPrimitive.Thumb)
|
|
|
4809
4851
|
var Switch = function Switch2({
|
|
4810
4852
|
value,
|
|
4811
4853
|
onChange,
|
|
4812
|
-
|
|
4854
|
+
colorScheme = "normal"
|
|
4813
4855
|
}) {
|
|
4814
4856
|
return /* @__PURE__ */ import_react38.default.createElement(
|
|
4815
4857
|
SwitchRoot,
|
|
4816
4858
|
{
|
|
4817
|
-
|
|
4859
|
+
colorScheme,
|
|
4818
4860
|
checked: value,
|
|
4819
4861
|
onCheckedChange: (newValue) => {
|
|
4820
4862
|
onChange(newValue);
|
|
@@ -4908,6 +4950,7 @@ var colors = {
|
|
|
4908
4950
|
textMuted: "rgb(85, 85, 85)",
|
|
4909
4951
|
textSubtle: "rgb(121, 121, 121)",
|
|
4910
4952
|
textDisabled: "rgb(160, 160, 160)",
|
|
4953
|
+
textDecorativeLight: "rgb(168, 185, 212)",
|
|
4911
4954
|
dividerSubtle: "rgba(0, 0, 0, 0.04)",
|
|
4912
4955
|
divider: "rgba(0, 0, 0, 0.07)",
|
|
4913
4956
|
dividerStrong: "rgba(0, 0, 0, 0.09)",
|
|
@@ -4921,6 +4964,11 @@ var colors = {
|
|
|
4921
4964
|
inputBackground: "rgb(240, 240, 242)",
|
|
4922
4965
|
inputBackgroundLight: "rgb(243, 243, 245)",
|
|
4923
4966
|
codeBackground: "rgb(250, 250, 250)",
|
|
4967
|
+
codeBackgroundLight: "rgb(250, 250, 250)",
|
|
4968
|
+
get codeBackgroundDark() {
|
|
4969
|
+
return colors.text;
|
|
4970
|
+
},
|
|
4971
|
+
codeBackgroundDecorativeDark: "#435080",
|
|
4924
4972
|
selectedBackground: "rgb(242, 245, 250)",
|
|
4925
4973
|
transparentChecker: "rgba(255,255,255,0.8)",
|
|
4926
4974
|
activeBackground: "rgba(0,0,0,0.1)",
|
|
@@ -4962,10 +5010,11 @@ var colors = {
|
|
|
4962
5010
|
return colors.primary;
|
|
4963
5011
|
},
|
|
4964
5012
|
selection: "rgb(179,215,254)",
|
|
4965
|
-
thumbnailBackground: "#E1DAFF"
|
|
5013
|
+
thumbnailBackground: "#E1DAFF",
|
|
5014
|
+
thumbnailShadow: "#D3CEED66"
|
|
4966
5015
|
};
|
|
4967
5016
|
var fonts = {
|
|
4968
|
-
normal: "-apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
5017
|
+
normal: "'__Inter_6b0edc', '__Inter_Fallback_6b0edc', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
4969
5018
|
monospace: "Menlo, Monaco, Consolas, 'Courier New', monospace"
|
|
4970
5019
|
};
|
|
4971
5020
|
var typeScale = [3.052, 2.441, 1.953, 1.563, 1.25, 1, 0.85];
|
|
@@ -4975,6 +5024,7 @@ var textStyles = {
|
|
|
4975
5024
|
fontSize: `${typeScale[0]}rem`,
|
|
4976
5025
|
fontWeight: "bold",
|
|
4977
5026
|
lineHeight: "1.4",
|
|
5027
|
+
letterSpacing: "-0.05em",
|
|
4978
5028
|
[mediaQuery.small]: {
|
|
4979
5029
|
fontSize: "36px"
|
|
4980
5030
|
}
|
|
@@ -4984,6 +5034,7 @@ var textStyles = {
|
|
|
4984
5034
|
fontSize: `${typeScale[3]}rem`,
|
|
4985
5035
|
fontWeight: 500,
|
|
4986
5036
|
lineHeight: "1.75",
|
|
5037
|
+
letterSpacing: "-0.05em",
|
|
4987
5038
|
[mediaQuery.small]: {
|
|
4988
5039
|
fontSize: "18px"
|
|
4989
5040
|
}
|
|
@@ -4992,19 +5043,22 @@ var textStyles = {
|
|
|
4992
5043
|
fontFamily: fonts.normal,
|
|
4993
5044
|
fontSize: `${typeScale[2]}rem`,
|
|
4994
5045
|
fontWeight: 500,
|
|
4995
|
-
lineHeight: "1.75"
|
|
5046
|
+
lineHeight: "1.75",
|
|
5047
|
+
letterSpacing: "-0.025em"
|
|
4996
5048
|
},
|
|
4997
5049
|
heading2: {
|
|
4998
5050
|
fontFamily: fonts.normal,
|
|
4999
5051
|
fontSize: `${typeScale[3]}rem`,
|
|
5000
5052
|
fontWeight: 500,
|
|
5001
|
-
lineHeight: "1.75"
|
|
5053
|
+
lineHeight: "1.75",
|
|
5054
|
+
letterSpacing: "-0.025em"
|
|
5002
5055
|
},
|
|
5003
5056
|
heading3: {
|
|
5004
5057
|
fontFamily: fonts.normal,
|
|
5005
5058
|
fontSize: `${typeScale[4]}rem`,
|
|
5006
5059
|
fontWeight: 500,
|
|
5007
|
-
lineHeight: "1.75"
|
|
5060
|
+
lineHeight: "1.75",
|
|
5061
|
+
letterSpacing: "-0.025em"
|
|
5008
5062
|
},
|
|
5009
5063
|
heading4: {
|
|
5010
5064
|
fontFamily: fonts.normal,
|
|
@@ -5100,6 +5154,8 @@ var colors2 = (0, import_immer.default)(colors, (colors3) => {
|
|
|
5100
5154
|
colors3.placeholderDots = "rgba(255,255,255,0.3)";
|
|
5101
5155
|
colors3.dragOutline = "white";
|
|
5102
5156
|
colors3.activeBackground = "rgba(181,178,255,0.08)";
|
|
5157
|
+
colors3.thumbnailBackground = "#1f1d33";
|
|
5158
|
+
colors3.thumbnailShadow = "#1f1d3366";
|
|
5103
5159
|
});
|
|
5104
5160
|
|
|
5105
5161
|
// src/utils/createSectionedMenu.ts
|
|
@@ -5188,7 +5244,7 @@ var Column = import_styled_components34.default.div(({ theme }) => ({
|
|
|
5188
5244
|
flex: "1",
|
|
5189
5245
|
display: "flex",
|
|
5190
5246
|
flexDirection: "column",
|
|
5191
|
-
gap: "
|
|
5247
|
+
gap: "4px"
|
|
5192
5248
|
}));
|
|
5193
5249
|
var Checkbox = import_styled_components34.default.input(({ theme }) => ({
|
|
5194
5250
|
margin: 0
|
|
@@ -5395,6 +5451,7 @@ var DimensionInput = (0, import_react42.memo)(function DimensionInput2({
|
|
|
5395
5451
|
DropdownMenu,
|
|
5396
5452
|
FillInputField,
|
|
5397
5453
|
FillPreviewBackground,
|
|
5454
|
+
FullscreenDialog,
|
|
5398
5455
|
GlobalInputBlurProvider,
|
|
5399
5456
|
GradientPicker,
|
|
5400
5457
|
GridView,
|