@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/dist/index.mjs CHANGED
@@ -128,9 +128,9 @@ var ButtonElement = styled4.button(({ theme, active, disabled, variant, size: si
128
128
  textAlign: "left",
129
129
  borderRadius: "4px",
130
130
  paddingTop: variant === "none" ? "0px" : "4px",
131
- paddingRight: variant === "none" ? "0px" : variant === "thin" ? "1px" : "6px",
131
+ paddingRight: variant === "none" ? "0px" : variant === "thin" ? "1px" : "8px",
132
132
  paddingBottom: variant === "none" ? "0px" : "4px",
133
- paddingLeft: variant === "none" ? "0px" : variant === "thin" ? "1px" : "6px",
133
+ paddingLeft: variant === "none" ? "0px" : variant === "thin" ? "1px" : "8px",
134
134
  ...size2 === "large" && {
135
135
  paddingTop: "12px",
136
136
  paddingRight: "16px",
@@ -215,6 +215,8 @@ var ButtonContent = styled4.span(({ theme }) => ({
215
215
  }));
216
216
  var Button = forwardRef(function Button2({
217
217
  id,
218
+ className,
219
+ style,
218
220
  flex,
219
221
  tabIndex,
220
222
  tooltip,
@@ -233,6 +235,8 @@ var Button = forwardRef(function Button2({
233
235
  {
234
236
  ref: forwardedRef,
235
237
  id,
238
+ className,
239
+ style,
236
240
  flex,
237
241
  tabIndex,
238
242
  active,
@@ -473,6 +477,28 @@ var Dialog = forwardRef3(function Dialog2({
473
477
  children
474
478
  ));
475
479
  });
480
+ var FullscreenDialog = forwardRef3(function FullscreenDialog2({ style, ...rest }, forwardedRef) {
481
+ return /* @__PURE__ */ React7.createElement(
482
+ Dialog,
483
+ {
484
+ ref: forwardedRef,
485
+ style: {
486
+ width: "100%",
487
+ height: "100%",
488
+ maxWidth: "100%",
489
+ maxHeight: "100%",
490
+ top: "0",
491
+ left: "0",
492
+ transform: "none",
493
+ display: "flex",
494
+ flexDirection: "column",
495
+ padding: 0,
496
+ ...style
497
+ },
498
+ ...rest
499
+ }
500
+ );
501
+ });
476
502
 
477
503
  // src/components/InputField.tsx
478
504
  import { CaretDownIcon } from "@noya-app/noya-icons";
@@ -1754,6 +1780,7 @@ var ChipElement = styled14.span(({ theme, colorScheme, size: size2, variant, mon
1754
1780
  display: "inline-flex",
1755
1781
  alignItems: "center",
1756
1782
  lineHeight: "1.4",
1783
+ whiteSpace: "pre",
1757
1784
  ...size2 === "medium" ? {
1758
1785
  fontSize: "11px",
1759
1786
  padding: "4px 8px"
@@ -2710,10 +2737,20 @@ var sizes = {
2710
2737
  itemHeight: 170,
2711
2738
  gap: 20
2712
2739
  },
2740
+ medium: {
2741
+ itemWidth: 220,
2742
+ itemHeight: 220,
2743
+ gap: 16
2744
+ },
2713
2745
  large: {
2714
2746
  itemWidth: 280,
2715
2747
  itemHeight: 280,
2716
- gap: 20
2748
+ gap: 24
2749
+ },
2750
+ xl: {
2751
+ itemWidth: 400,
2752
+ itemHeight: 400,
2753
+ gap: 32
2717
2754
  }
2718
2755
  };
2719
2756
  var Grid2 = styled21.div(({ theme, size: size2, padding }) => {
@@ -2873,7 +2910,8 @@ var GridViewItem = forwardRef9(function GridViewItem2({
2873
2910
  children,
2874
2911
  menuItems,
2875
2912
  onSelectMenuItem,
2876
- onContextMenu
2913
+ onContextMenu,
2914
+ style
2877
2915
  }, forwardedRef) {
2878
2916
  const [hovered, setHovered] = React25.useState(false);
2879
2917
  const { hoverProps } = useHover({
@@ -2922,7 +2960,8 @@ var GridViewItem = forwardRef9(function GridViewItem2({
2922
2960
  hovered: !disabled && hovered,
2923
2961
  onClick: handleClick,
2924
2962
  onDoubleClick,
2925
- onContextMenu
2963
+ onContextMenu,
2964
+ style
2926
2965
  },
2927
2966
  children
2928
2967
  ),
@@ -4071,6 +4110,7 @@ var InputFieldWithCompletions = memo20(
4071
4110
  onBlur,
4072
4111
  onDeleteWhenEmpty,
4073
4112
  style,
4113
+ className,
4074
4114
  children,
4075
4115
  hideChildrenWhenFocused = false,
4076
4116
  hideMenuWhenEmptyValue = false
@@ -4272,6 +4312,7 @@ var InputFieldWithCompletions = memo20(
4272
4312
  onFocusCapture: handleFocus,
4273
4313
  onKeyDown: handleKeyDown,
4274
4314
  style,
4315
+ className,
4275
4316
  autoCapitalize: "off",
4276
4317
  autoComplete: "off",
4277
4318
  autoCorrect: "off",
@@ -4800,7 +4841,7 @@ var Slider = function Slider2({
4800
4841
  import * as SwitchPrimitive from "@radix-ui/react-switch";
4801
4842
  import React36 from "react";
4802
4843
  import styled31 from "styled-components";
4803
- var SwitchRoot = styled31(SwitchPrimitive.Root)(({ theme, variant }) => ({
4844
+ var SwitchRoot = styled31(SwitchPrimitive.Root)(({ theme, colorScheme: variant }) => ({
4804
4845
  all: "unset",
4805
4846
  width: 32,
4806
4847
  height: 19,
@@ -4832,12 +4873,12 @@ var SwitchThumb = styled31(SwitchPrimitive.Thumb)({
4832
4873
  var Switch = function Switch2({
4833
4874
  value,
4834
4875
  onChange,
4835
- variant = "normal"
4876
+ colorScheme = "normal"
4836
4877
  }) {
4837
4878
  return /* @__PURE__ */ React36.createElement(
4838
4879
  SwitchRoot,
4839
4880
  {
4840
- variant,
4881
+ colorScheme,
4841
4882
  checked: value,
4842
4883
  onCheckedChange: (newValue) => {
4843
4884
  onChange(newValue);
@@ -4936,6 +4977,7 @@ var colors = {
4936
4977
  textMuted: "rgb(85, 85, 85)",
4937
4978
  textSubtle: "rgb(121, 121, 121)",
4938
4979
  textDisabled: "rgb(160, 160, 160)",
4980
+ textDecorativeLight: "rgb(168, 185, 212)",
4939
4981
  dividerSubtle: "rgba(0, 0, 0, 0.04)",
4940
4982
  divider: "rgba(0, 0, 0, 0.07)",
4941
4983
  dividerStrong: "rgba(0, 0, 0, 0.09)",
@@ -4949,6 +4991,11 @@ var colors = {
4949
4991
  inputBackground: "rgb(240, 240, 242)",
4950
4992
  inputBackgroundLight: "rgb(243, 243, 245)",
4951
4993
  codeBackground: "rgb(250, 250, 250)",
4994
+ codeBackgroundLight: "rgb(250, 250, 250)",
4995
+ get codeBackgroundDark() {
4996
+ return colors.text;
4997
+ },
4998
+ codeBackgroundDecorativeDark: "#435080",
4952
4999
  selectedBackground: "rgb(242, 245, 250)",
4953
5000
  transparentChecker: "rgba(255,255,255,0.8)",
4954
5001
  activeBackground: "rgba(0,0,0,0.1)",
@@ -4990,10 +5037,11 @@ var colors = {
4990
5037
  return colors.primary;
4991
5038
  },
4992
5039
  selection: "rgb(179,215,254)",
4993
- thumbnailBackground: "#E1DAFF"
5040
+ thumbnailBackground: "#E1DAFF",
5041
+ thumbnailShadow: "#D3CEED66"
4994
5042
  };
4995
5043
  var fonts = {
4996
- normal: "-apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
5044
+ normal: "'__Inter_6b0edc', '__Inter_Fallback_6b0edc', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
4997
5045
  monospace: "Menlo, Monaco, Consolas, 'Courier New', monospace"
4998
5046
  };
4999
5047
  var typeScale = [3.052, 2.441, 1.953, 1.563, 1.25, 1, 0.85];
@@ -5003,6 +5051,7 @@ var textStyles = {
5003
5051
  fontSize: `${typeScale[0]}rem`,
5004
5052
  fontWeight: "bold",
5005
5053
  lineHeight: "1.4",
5054
+ letterSpacing: "-0.05em",
5006
5055
  [mediaQuery.small]: {
5007
5056
  fontSize: "36px"
5008
5057
  }
@@ -5012,6 +5061,7 @@ var textStyles = {
5012
5061
  fontSize: `${typeScale[3]}rem`,
5013
5062
  fontWeight: 500,
5014
5063
  lineHeight: "1.75",
5064
+ letterSpacing: "-0.05em",
5015
5065
  [mediaQuery.small]: {
5016
5066
  fontSize: "18px"
5017
5067
  }
@@ -5020,19 +5070,22 @@ var textStyles = {
5020
5070
  fontFamily: fonts.normal,
5021
5071
  fontSize: `${typeScale[2]}rem`,
5022
5072
  fontWeight: 500,
5023
- lineHeight: "1.75"
5073
+ lineHeight: "1.75",
5074
+ letterSpacing: "-0.025em"
5024
5075
  },
5025
5076
  heading2: {
5026
5077
  fontFamily: fonts.normal,
5027
5078
  fontSize: `${typeScale[3]}rem`,
5028
5079
  fontWeight: 500,
5029
- lineHeight: "1.75"
5080
+ lineHeight: "1.75",
5081
+ letterSpacing: "-0.025em"
5030
5082
  },
5031
5083
  heading3: {
5032
5084
  fontFamily: fonts.normal,
5033
5085
  fontSize: `${typeScale[4]}rem`,
5034
5086
  fontWeight: 500,
5035
- lineHeight: "1.75"
5087
+ lineHeight: "1.75",
5088
+ letterSpacing: "-0.025em"
5036
5089
  },
5037
5090
  heading4: {
5038
5091
  fontFamily: fonts.normal,
@@ -5128,6 +5181,8 @@ var colors2 = produce(colors, (colors3) => {
5128
5181
  colors3.placeholderDots = "rgba(255,255,255,0.3)";
5129
5182
  colors3.dragOutline = "white";
5130
5183
  colors3.activeBackground = "rgba(181,178,255,0.08)";
5184
+ colors3.thumbnailBackground = "#1f1d33";
5185
+ colors3.thumbnailShadow = "#1f1d3366";
5131
5186
  });
5132
5187
 
5133
5188
  // src/utils/createSectionedMenu.ts
@@ -5216,7 +5271,7 @@ var Column = styled32.div(({ theme }) => ({
5216
5271
  flex: "1",
5217
5272
  display: "flex",
5218
5273
  flexDirection: "column",
5219
- gap: "2px"
5274
+ gap: "4px"
5220
5275
  }));
5221
5276
  var Checkbox = styled32.input(({ theme }) => ({
5222
5277
  margin: 0
@@ -5422,6 +5477,7 @@ export {
5422
5477
  DropdownMenu,
5423
5478
  FillInputField,
5424
5479
  FillPreviewBackground,
5480
+ FullscreenDialog,
5425
5481
  GlobalInputBlurProvider,
5426
5482
  GradientPicker,
5427
5483
  GridView,