@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/dist/index.mjs CHANGED
@@ -679,7 +679,8 @@ var textStyles = {
679
679
  fontFamily: fonts.normal,
680
680
  fontSize: `${typeScale[6]}rem`,
681
681
  fontWeight: 400,
682
- lineHeight: "1.4"
682
+ lineHeight: "19px"
683
+ // lineHeight: "1.4",
683
684
  },
684
685
  button: {
685
686
  fontFamily: fonts.normal,
@@ -1977,7 +1978,11 @@ var InputElement = styled12(TextInput_default)(({
1977
1978
  // },
1978
1979
  };
1979
1980
  });
1980
- var InputFieldInput = forwardRef9(function InputFieldInput2(props, forwardedRef) {
1981
+ var InputFieldInput = forwardRef9(function InputFieldInput2({
1982
+ textAlign,
1983
+ variant,
1984
+ ...rest
1985
+ }, forwardedRef) {
1981
1986
  const {
1982
1987
  labelPosition,
1983
1988
  labelSize,
@@ -2005,8 +2010,10 @@ var InputFieldInput = forwardRef9(function InputFieldInput2(props, forwardedRef)
2005
2010
  $hasLabel: hasLabel,
2006
2011
  $hasDropdown: hasDropdown,
2007
2012
  $size: size2,
2013
+ $variant: variant,
2014
+ $textAlign: textAlign,
2008
2015
  onFocusChange: handleFocusChange,
2009
- ...props
2016
+ ...rest
2010
2017
  }
2011
2018
  );
2012
2019
  });
@@ -2531,15 +2538,15 @@ var ChipElement = styled14.span(({ theme, $colorScheme, $size, $variant, $monosp
2531
2538
  userSelect: "none",
2532
2539
  display: "inline-flex",
2533
2540
  alignItems: "center",
2534
- lineHeight: "1.4",
2541
+ // lineHeight: "1.4",
2542
+ lineHeight: "15px",
2535
2543
  whiteSpace: "pre",
2536
2544
  ...$size === "medium" ? {
2537
2545
  fontSize: "11px",
2538
2546
  padding: "4px 8px"
2539
2547
  } : {
2540
2548
  fontSize: "9px",
2541
- padding: "0px 4px",
2542
- lineHeight: "15px"
2549
+ padding: "0px 4px"
2543
2550
  },
2544
2551
  ...$monospace && {
2545
2552
  fontFamily: theme.fonts.monospace
@@ -6343,11 +6350,21 @@ var WorkspaceLayout = forwardRef18(function WorkspaceLayout2({
6343
6350
  onChangeLayoutState,
6344
6351
  leftSidebarInitialSize = 280,
6345
6352
  rightSidebarInitialSize = 400,
6346
- leftSidebarCanResize = false
6353
+ leftSidebarMinSize,
6354
+ rightSidebarMinSize,
6355
+ leftSidebarCanResize = false,
6356
+ id,
6357
+ className,
6358
+ style: style3
6347
6359
  }, forwardedRef) {
6348
6360
  const windowSize = useWindowSize();
6349
- const leftSidebarPercentage = leftSidebarInitialSize / windowSize.width * 100;
6350
- const rightSidebarPercentage = rightSidebarInitialSize / windowSize.width * 100;
6361
+ function getPercentage(size2) {
6362
+ return typeof size2 === "string" ? parseFloat(size2) : size2 / windowSize.width * 100;
6363
+ }
6364
+ const leftSidebarPercentage = getPercentage(leftSidebarInitialSize);
6365
+ const rightSidebarPercentage = getPercentage(rightSidebarInitialSize);
6366
+ const leftSidebarMinPercentage = leftSidebarMinSize !== void 0 ? getPercentage(leftSidebarMinSize) : void 0;
6367
+ const rightSidebarMinPercentage = rightSidebarMinSize !== void 0 ? getPercentage(rightSidebarMinSize) : void 0;
6351
6368
  const panelGroupRef = useRef20(null);
6352
6369
  const leftSidebarRef = useRef20(null);
6353
6370
  const rightSidebarRef = useRef20(null);
@@ -6409,82 +6426,97 @@ var WorkspaceLayout = forwardRef18(function WorkspaceLayout2({
6409
6426
  }
6410
6427
  }
6411
6428
  });
6412
- return /* @__PURE__ */ React47.createElement(Stack.H, { flex: "1" }, /* @__PURE__ */ React47.createElement(
6413
- PanelGroup,
6429
+ const centerPanelPercentage = 100 - (leftPanelContent ? leftSidebarPercentage : 0) - (rightPanelContent ? rightSidebarPercentage : 0);
6430
+ return /* @__PURE__ */ React47.createElement(
6431
+ "div",
6414
6432
  {
6415
- ref: panelGroupRef,
6416
- id: EDITOR_PANEL_GROUP_ID,
6417
- direction: "horizontal",
6418
- autoSaveId: autoSavePrefix ? `${autoSavePrefix}--${EDITOR_PANEL_GROUP_ID}` : void 0,
6419
- style: { flex: "1" }
6420
- },
6421
- hasLeftSidebar && /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(
6422
- Panel,
6423
- {
6424
- id: LEFT_SIDEBAR_ID,
6425
- order: 1,
6426
- ref: leftSidebarRef,
6427
- defaultSize: leftSidebarPercentage,
6428
- minSize: leftSidebarPercentage,
6429
- ...!leftSidebarCanResize && { maxSize: leftSidebarPercentage },
6430
- collapsible: true,
6431
- style: {
6432
- display: "flex",
6433
- flexDirection: "row"
6434
- }
6435
- },
6436
- leftPanelContent
6437
- ), /* @__PURE__ */ React47.createElement(
6438
- PanelResizeHandle,
6439
- {
6440
- style: {
6441
- cursor: "col-resize",
6442
- width: "1px",
6443
- height: "100%",
6444
- backgroundColor: theme.colors.divider
6445
- }
6433
+ id,
6434
+ className,
6435
+ style: {
6436
+ backgroundColor: theme.colors.canvas.background,
6437
+ display: "flex",
6438
+ flexDirection: "row",
6439
+ ...style3
6446
6440
  }
6447
- )),
6441
+ },
6448
6442
  /* @__PURE__ */ React47.createElement(
6449
- Panel,
6443
+ PanelGroup,
6450
6444
  {
6451
- id: CONTENT_AREA_ID,
6452
- order: 2,
6453
- minSize: 10,
6454
- style: {
6455
- display: "flex",
6456
- flexDirection: "row"
6457
- }
6445
+ ref: panelGroupRef,
6446
+ id: EDITOR_PANEL_GROUP_ID,
6447
+ direction: "horizontal",
6448
+ autoSaveId: autoSavePrefix ? `${autoSavePrefix}--${EDITOR_PANEL_GROUP_ID}` : void 0,
6449
+ style: { flex: "1" }
6458
6450
  },
6459
- centerPanelContent
6460
- ),
6461
- hasRightSidebar && /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(
6462
- PanelResizeHandle,
6463
- {
6464
- style: {
6465
- cursor: "col-resize",
6466
- width: "1px",
6467
- height: "100%",
6468
- backgroundColor: theme.colors.divider
6451
+ hasLeftSidebar && /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(
6452
+ Panel,
6453
+ {
6454
+ id: LEFT_SIDEBAR_ID,
6455
+ order: 1,
6456
+ ref: leftSidebarRef,
6457
+ defaultSize: leftSidebarPercentage,
6458
+ minSize: leftSidebarMinPercentage ?? leftSidebarPercentage,
6459
+ ...!leftSidebarCanResize && { maxSize: leftSidebarPercentage },
6460
+ collapsible: true,
6461
+ style: {
6462
+ display: "flex",
6463
+ flexDirection: "row"
6464
+ }
6465
+ },
6466
+ leftPanelContent
6467
+ ), /* @__PURE__ */ React47.createElement(
6468
+ PanelResizeHandle,
6469
+ {
6470
+ style: {
6471
+ cursor: "col-resize",
6472
+ width: "1px",
6473
+ height: "100%",
6474
+ backgroundColor: theme.colors.divider
6475
+ }
6469
6476
  }
6470
- }
6471
- ), /* @__PURE__ */ React47.createElement(
6472
- Panel,
6473
- {
6474
- id: RIGHT_SIDEBAR_ID,
6475
- order: 3,
6476
- ref: rightSidebarRef,
6477
- minSize: rightSidebarPercentage,
6478
- defaultSize: rightSidebarPercentage,
6479
- collapsible: true,
6480
- style: {
6481
- display: "flex",
6482
- flexDirection: "row"
6477
+ )),
6478
+ /* @__PURE__ */ React47.createElement(
6479
+ Panel,
6480
+ {
6481
+ id: CONTENT_AREA_ID,
6482
+ order: 2,
6483
+ defaultSize: centerPanelPercentage,
6484
+ minSize: 10,
6485
+ style: {
6486
+ display: "flex",
6487
+ flexDirection: "row"
6488
+ }
6489
+ },
6490
+ centerPanelContent
6491
+ ),
6492
+ hasRightSidebar && /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(
6493
+ PanelResizeHandle,
6494
+ {
6495
+ style: {
6496
+ cursor: "col-resize",
6497
+ width: "1px",
6498
+ height: "100%",
6499
+ backgroundColor: theme.colors.divider
6500
+ }
6483
6501
  }
6484
- },
6485
- rightPanelContent
6486
- ))
6487
- ));
6502
+ ), /* @__PURE__ */ React47.createElement(
6503
+ Panel,
6504
+ {
6505
+ id: RIGHT_SIDEBAR_ID,
6506
+ order: 3,
6507
+ ref: rightSidebarRef,
6508
+ minSize: rightSidebarMinPercentage ?? rightSidebarPercentage,
6509
+ defaultSize: rightSidebarPercentage,
6510
+ collapsible: true,
6511
+ style: {
6512
+ display: "flex",
6513
+ flexDirection: "row"
6514
+ }
6515
+ },
6516
+ rightPanelContent
6517
+ ))
6518
+ )
6519
+ );
6488
6520
  });
6489
6521
 
6490
6522
  // src/hooks/usePlatform.ts