@noya-app/noya-designsystem 0.1.19 → 0.1.21
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 +14 -0
- package/dist/index.d.mts +15 -2
- package/dist/index.d.ts +15 -2
- package/dist/index.js +110 -78
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +110 -78
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/components/Chip.tsx +2 -2
- package/src/components/InputField.tsx +8 -2
- package/src/components/WorkspaceLayout.tsx +58 -11
- package/src/theme/light.ts +2 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
[34mCLI[39m Target: esnext
|
|
6
6
|
[34mCJS[39m Build start
|
|
7
7
|
[34mESM[39m Build start
|
|
8
|
-
[
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
8
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m209.89 KB[39m
|
|
9
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m459.25 KB[39m
|
|
10
|
+
[32mESM[39m ⚡️ Build success in 295ms
|
|
11
|
+
[32mCJS[39m [1mdist/index.js [22m[32m227.68 KB[39m
|
|
12
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m459.13 KB[39m
|
|
13
|
+
[32mCJS[39m ⚡️ Build success in 296ms
|
|
14
14
|
[34mDTS[39m Build start
|
|
15
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m60.
|
|
17
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m60.
|
|
15
|
+
[32mDTS[39m ⚡️ Build success in 12004ms
|
|
16
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m60.59 KB[39m
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m60.59 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @noya-app/noya-designsystem
|
|
2
2
|
|
|
3
|
+
## 0.1.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 57bf0c9: Improve pixel ratio, toolbar, details
|
|
8
|
+
- dd8569c: Fix input styling
|
|
9
|
+
|
|
10
|
+
## 0.1.20
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 7306000: Improve embedded apis
|
|
15
|
+
- 5f3843e: Improve workspace sizing
|
|
16
|
+
|
|
3
17
|
## 0.1.19
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1075,9 +1075,22 @@ interface Props$1 {
|
|
|
1075
1075
|
hasRightSidebar?: boolean;
|
|
1076
1076
|
hasLeftSidebar?: boolean;
|
|
1077
1077
|
onChangeLayoutState?: (layoutState: PanelLayoutState) => void;
|
|
1078
|
-
leftSidebarInitialSize?: number;
|
|
1079
|
-
rightSidebarInitialSize?: number;
|
|
1080
1078
|
leftSidebarCanResize?: boolean;
|
|
1079
|
+
id?: string;
|
|
1080
|
+
className?: string;
|
|
1081
|
+
style?: React__default.CSSProperties;
|
|
1082
|
+
/**
|
|
1083
|
+
* Accepts a number (px) or % string (e.g. "50%").
|
|
1084
|
+
* Use % to avoid flicker server-rendering.
|
|
1085
|
+
*/
|
|
1086
|
+
leftSidebarInitialSize?: number | string;
|
|
1087
|
+
leftSidebarMinSize?: number | string;
|
|
1088
|
+
/**
|
|
1089
|
+
* Accepts a number (px) or % string (e.g. "50%").
|
|
1090
|
+
* Use % to avoid flicker server-rendering.
|
|
1091
|
+
*/
|
|
1092
|
+
rightSidebarInitialSize?: number | string;
|
|
1093
|
+
rightSidebarMinSize?: number | string;
|
|
1081
1094
|
}
|
|
1082
1095
|
type IWorkspaceLayout = {
|
|
1083
1096
|
setLeftSidebarExpanded: (expanded: boolean) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1075,9 +1075,22 @@ interface Props$1 {
|
|
|
1075
1075
|
hasRightSidebar?: boolean;
|
|
1076
1076
|
hasLeftSidebar?: boolean;
|
|
1077
1077
|
onChangeLayoutState?: (layoutState: PanelLayoutState) => void;
|
|
1078
|
-
leftSidebarInitialSize?: number;
|
|
1079
|
-
rightSidebarInitialSize?: number;
|
|
1080
1078
|
leftSidebarCanResize?: boolean;
|
|
1079
|
+
id?: string;
|
|
1080
|
+
className?: string;
|
|
1081
|
+
style?: React__default.CSSProperties;
|
|
1082
|
+
/**
|
|
1083
|
+
* Accepts a number (px) or % string (e.g. "50%").
|
|
1084
|
+
* Use % to avoid flicker server-rendering.
|
|
1085
|
+
*/
|
|
1086
|
+
leftSidebarInitialSize?: number | string;
|
|
1087
|
+
leftSidebarMinSize?: number | string;
|
|
1088
|
+
/**
|
|
1089
|
+
* Accepts a number (px) or % string (e.g. "50%").
|
|
1090
|
+
* Use % to avoid flicker server-rendering.
|
|
1091
|
+
*/
|
|
1092
|
+
rightSidebarInitialSize?: number | string;
|
|
1093
|
+
rightSidebarMinSize?: number | string;
|
|
1081
1094
|
}
|
|
1082
1095
|
type IWorkspaceLayout = {
|
|
1083
1096
|
setLeftSidebarExpanded: (expanded: boolean) => void;
|
package/dist/index.js
CHANGED
|
@@ -788,7 +788,8 @@ var textStyles = {
|
|
|
788
788
|
fontFamily: fonts.normal,
|
|
789
789
|
fontSize: `${typeScale[6]}rem`,
|
|
790
790
|
fontWeight: 400,
|
|
791
|
-
lineHeight: "
|
|
791
|
+
lineHeight: "19px"
|
|
792
|
+
// lineHeight: "1.4",
|
|
792
793
|
},
|
|
793
794
|
button: {
|
|
794
795
|
fontFamily: fonts.normal,
|
|
@@ -2043,7 +2044,11 @@ var InputElement = (0, import_styled_components13.default)(TextInput_default)(({
|
|
|
2043
2044
|
// },
|
|
2044
2045
|
};
|
|
2045
2046
|
});
|
|
2046
|
-
var InputFieldInput = (0, import_react32.forwardRef)(function InputFieldInput2(
|
|
2047
|
+
var InputFieldInput = (0, import_react32.forwardRef)(function InputFieldInput2({
|
|
2048
|
+
textAlign,
|
|
2049
|
+
variant,
|
|
2050
|
+
...rest
|
|
2051
|
+
}, forwardedRef) {
|
|
2047
2052
|
const {
|
|
2048
2053
|
labelPosition,
|
|
2049
2054
|
labelSize,
|
|
@@ -2071,8 +2076,10 @@ var InputFieldInput = (0, import_react32.forwardRef)(function InputFieldInput2(p
|
|
|
2071
2076
|
$hasLabel: hasLabel,
|
|
2072
2077
|
$hasDropdown: hasDropdown,
|
|
2073
2078
|
$size: size2,
|
|
2079
|
+
$variant: variant,
|
|
2080
|
+
$textAlign: textAlign,
|
|
2074
2081
|
onFocusChange: handleFocusChange,
|
|
2075
|
-
...
|
|
2082
|
+
...rest
|
|
2076
2083
|
}
|
|
2077
2084
|
);
|
|
2078
2085
|
});
|
|
@@ -2597,15 +2604,15 @@ var ChipElement = import_styled_components16.default.span(({ theme, $colorScheme
|
|
|
2597
2604
|
userSelect: "none",
|
|
2598
2605
|
display: "inline-flex",
|
|
2599
2606
|
alignItems: "center",
|
|
2600
|
-
lineHeight: "1.4",
|
|
2607
|
+
// lineHeight: "1.4",
|
|
2608
|
+
lineHeight: "15px",
|
|
2601
2609
|
whiteSpace: "pre",
|
|
2602
2610
|
...$size === "medium" ? {
|
|
2603
2611
|
fontSize: "11px",
|
|
2604
2612
|
padding: "4px 8px"
|
|
2605
2613
|
} : {
|
|
2606
2614
|
fontSize: "9px",
|
|
2607
|
-
padding: "0px 4px"
|
|
2608
|
-
lineHeight: "15px"
|
|
2615
|
+
padding: "0px 4px"
|
|
2609
2616
|
},
|
|
2610
2617
|
...$monospace && {
|
|
2611
2618
|
fontFamily: theme.fonts.monospace
|
|
@@ -6305,11 +6312,21 @@ var WorkspaceLayout = (0, import_react63.forwardRef)(function WorkspaceLayout2({
|
|
|
6305
6312
|
onChangeLayoutState,
|
|
6306
6313
|
leftSidebarInitialSize = 280,
|
|
6307
6314
|
rightSidebarInitialSize = 400,
|
|
6308
|
-
|
|
6315
|
+
leftSidebarMinSize,
|
|
6316
|
+
rightSidebarMinSize,
|
|
6317
|
+
leftSidebarCanResize = false,
|
|
6318
|
+
id,
|
|
6319
|
+
className,
|
|
6320
|
+
style: style3
|
|
6309
6321
|
}, forwardedRef) {
|
|
6310
6322
|
const windowSize = useWindowSize();
|
|
6311
|
-
|
|
6312
|
-
|
|
6323
|
+
function getPercentage(size2) {
|
|
6324
|
+
return typeof size2 === "string" ? parseFloat(size2) : size2 / windowSize.width * 100;
|
|
6325
|
+
}
|
|
6326
|
+
const leftSidebarPercentage = getPercentage(leftSidebarInitialSize);
|
|
6327
|
+
const rightSidebarPercentage = getPercentage(rightSidebarInitialSize);
|
|
6328
|
+
const leftSidebarMinPercentage = leftSidebarMinSize !== void 0 ? getPercentage(leftSidebarMinSize) : void 0;
|
|
6329
|
+
const rightSidebarMinPercentage = rightSidebarMinSize !== void 0 ? getPercentage(rightSidebarMinSize) : void 0;
|
|
6313
6330
|
const panelGroupRef = (0, import_react63.useRef)(null);
|
|
6314
6331
|
const leftSidebarRef = (0, import_react63.useRef)(null);
|
|
6315
6332
|
const rightSidebarRef = (0, import_react63.useRef)(null);
|
|
@@ -6371,82 +6388,97 @@ var WorkspaceLayout = (0, import_react63.forwardRef)(function WorkspaceLayout2({
|
|
|
6371
6388
|
}
|
|
6372
6389
|
}
|
|
6373
6390
|
});
|
|
6374
|
-
|
|
6375
|
-
|
|
6391
|
+
const centerPanelPercentage = 100 - (leftPanelContent ? leftSidebarPercentage : 0) - (rightPanelContent ? rightSidebarPercentage : 0);
|
|
6392
|
+
return /* @__PURE__ */ import_react63.default.createElement(
|
|
6393
|
+
"div",
|
|
6376
6394
|
{
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
import_react_resizable_panels.Panel,
|
|
6385
|
-
{
|
|
6386
|
-
id: LEFT_SIDEBAR_ID,
|
|
6387
|
-
order: 1,
|
|
6388
|
-
ref: leftSidebarRef,
|
|
6389
|
-
defaultSize: leftSidebarPercentage,
|
|
6390
|
-
minSize: leftSidebarPercentage,
|
|
6391
|
-
...!leftSidebarCanResize && { maxSize: leftSidebarPercentage },
|
|
6392
|
-
collapsible: true,
|
|
6393
|
-
style: {
|
|
6394
|
-
display: "flex",
|
|
6395
|
-
flexDirection: "row"
|
|
6396
|
-
}
|
|
6397
|
-
},
|
|
6398
|
-
leftPanelContent
|
|
6399
|
-
), /* @__PURE__ */ import_react63.default.createElement(
|
|
6400
|
-
import_react_resizable_panels.PanelResizeHandle,
|
|
6401
|
-
{
|
|
6402
|
-
style: {
|
|
6403
|
-
cursor: "col-resize",
|
|
6404
|
-
width: "1px",
|
|
6405
|
-
height: "100%",
|
|
6406
|
-
backgroundColor: theme.colors.divider
|
|
6407
|
-
}
|
|
6395
|
+
id,
|
|
6396
|
+
className,
|
|
6397
|
+
style: {
|
|
6398
|
+
backgroundColor: theme.colors.canvas.background,
|
|
6399
|
+
display: "flex",
|
|
6400
|
+
flexDirection: "row",
|
|
6401
|
+
...style3
|
|
6408
6402
|
}
|
|
6409
|
-
|
|
6403
|
+
},
|
|
6410
6404
|
/* @__PURE__ */ import_react63.default.createElement(
|
|
6411
|
-
import_react_resizable_panels.
|
|
6405
|
+
import_react_resizable_panels.PanelGroup,
|
|
6412
6406
|
{
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
flexDirection: "row"
|
|
6419
|
-
}
|
|
6407
|
+
ref: panelGroupRef,
|
|
6408
|
+
id: EDITOR_PANEL_GROUP_ID,
|
|
6409
|
+
direction: "horizontal",
|
|
6410
|
+
autoSaveId: autoSavePrefix ? `${autoSavePrefix}--${EDITOR_PANEL_GROUP_ID}` : void 0,
|
|
6411
|
+
style: { flex: "1" }
|
|
6420
6412
|
},
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6413
|
+
hasLeftSidebar && /* @__PURE__ */ import_react63.default.createElement(import_react63.default.Fragment, null, /* @__PURE__ */ import_react63.default.createElement(
|
|
6414
|
+
import_react_resizable_panels.Panel,
|
|
6415
|
+
{
|
|
6416
|
+
id: LEFT_SIDEBAR_ID,
|
|
6417
|
+
order: 1,
|
|
6418
|
+
ref: leftSidebarRef,
|
|
6419
|
+
defaultSize: leftSidebarPercentage,
|
|
6420
|
+
minSize: leftSidebarMinPercentage ?? leftSidebarPercentage,
|
|
6421
|
+
...!leftSidebarCanResize && { maxSize: leftSidebarPercentage },
|
|
6422
|
+
collapsible: true,
|
|
6423
|
+
style: {
|
|
6424
|
+
display: "flex",
|
|
6425
|
+
flexDirection: "row"
|
|
6426
|
+
}
|
|
6427
|
+
},
|
|
6428
|
+
leftPanelContent
|
|
6429
|
+
), /* @__PURE__ */ import_react63.default.createElement(
|
|
6430
|
+
import_react_resizable_panels.PanelResizeHandle,
|
|
6431
|
+
{
|
|
6432
|
+
style: {
|
|
6433
|
+
cursor: "col-resize",
|
|
6434
|
+
width: "1px",
|
|
6435
|
+
height: "100%",
|
|
6436
|
+
backgroundColor: theme.colors.divider
|
|
6437
|
+
}
|
|
6431
6438
|
}
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
|
|
6436
|
-
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6439
|
+
)),
|
|
6440
|
+
/* @__PURE__ */ import_react63.default.createElement(
|
|
6441
|
+
import_react_resizable_panels.Panel,
|
|
6442
|
+
{
|
|
6443
|
+
id: CONTENT_AREA_ID,
|
|
6444
|
+
order: 2,
|
|
6445
|
+
defaultSize: centerPanelPercentage,
|
|
6446
|
+
minSize: 10,
|
|
6447
|
+
style: {
|
|
6448
|
+
display: "flex",
|
|
6449
|
+
flexDirection: "row"
|
|
6450
|
+
}
|
|
6451
|
+
},
|
|
6452
|
+
centerPanelContent
|
|
6453
|
+
),
|
|
6454
|
+
hasRightSidebar && /* @__PURE__ */ import_react63.default.createElement(import_react63.default.Fragment, null, /* @__PURE__ */ import_react63.default.createElement(
|
|
6455
|
+
import_react_resizable_panels.PanelResizeHandle,
|
|
6456
|
+
{
|
|
6457
|
+
style: {
|
|
6458
|
+
cursor: "col-resize",
|
|
6459
|
+
width: "1px",
|
|
6460
|
+
height: "100%",
|
|
6461
|
+
backgroundColor: theme.colors.divider
|
|
6462
|
+
}
|
|
6445
6463
|
}
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
|
|
6464
|
+
), /* @__PURE__ */ import_react63.default.createElement(
|
|
6465
|
+
import_react_resizable_panels.Panel,
|
|
6466
|
+
{
|
|
6467
|
+
id: RIGHT_SIDEBAR_ID,
|
|
6468
|
+
order: 3,
|
|
6469
|
+
ref: rightSidebarRef,
|
|
6470
|
+
minSize: rightSidebarMinPercentage ?? rightSidebarPercentage,
|
|
6471
|
+
defaultSize: rightSidebarPercentage,
|
|
6472
|
+
collapsible: true,
|
|
6473
|
+
style: {
|
|
6474
|
+
display: "flex",
|
|
6475
|
+
flexDirection: "row"
|
|
6476
|
+
}
|
|
6477
|
+
},
|
|
6478
|
+
rightPanelContent
|
|
6479
|
+
))
|
|
6480
|
+
)
|
|
6481
|
+
);
|
|
6450
6482
|
});
|
|
6451
6483
|
|
|
6452
6484
|
// src/hooks/usePlatform.ts
|