@noya-app/noya-designsystem 0.1.13 → 0.1.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 +13 -0
- package/dist/index.d.mts +11 -5
- package/dist/index.d.ts +11 -5
- package/dist/index.js +301 -244
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +323 -264
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/InputField.tsx +2 -2
- package/src/components/Popover.tsx +25 -24
- package/src/components/Select.tsx +42 -13
- package/src/components/Sortable.tsx +9 -1
- package/src/contexts/DesignSystemConfiguration.tsx +49 -15
- package/src/theme/light.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -43,6 +43,7 @@ __export(src_exports, {
|
|
|
43
43
|
CompletionToken: () => CompletionToken,
|
|
44
44
|
ContextMenu: () => ContextMenu,
|
|
45
45
|
DesignSystemConfigurationProvider: () => DesignSystemConfigurationProvider,
|
|
46
|
+
DesignSystemThemeProvider: () => DesignSystemThemeProvider,
|
|
46
47
|
Dialog: () => Dialog,
|
|
47
48
|
DialogProvider: () => DialogProvider,
|
|
48
49
|
DimensionInput: () => DimensionInput,
|
|
@@ -506,6 +507,7 @@ var import_react35 = __toESM(require("react"));
|
|
|
506
507
|
var import_styled_components16 = __toESM(require("styled-components"));
|
|
507
508
|
|
|
508
509
|
// src/contexts/DesignSystemConfiguration.tsx
|
|
510
|
+
var import_noya_keymap3 = require("@noya-app/noya-keymap");
|
|
509
511
|
var import_react34 = __toESM(require("react"));
|
|
510
512
|
var import_styled_components15 = require("styled-components");
|
|
511
513
|
|
|
@@ -593,6 +595,231 @@ var Toast = ({
|
|
|
593
595
|
};
|
|
594
596
|
var ToastProvider = ({ children }) => /* @__PURE__ */ import_react8.default.createElement(ToastPrimitive.Provider, null, children, /* @__PURE__ */ import_react8.default.createElement(ToastViewport, null));
|
|
595
597
|
|
|
598
|
+
// src/theme/light.ts
|
|
599
|
+
var light_exports = {};
|
|
600
|
+
__export(light_exports, {
|
|
601
|
+
colors: () => colors,
|
|
602
|
+
fonts: () => fonts,
|
|
603
|
+
name: () => name,
|
|
604
|
+
sizes: () => sizes,
|
|
605
|
+
textStyles: () => textStyles
|
|
606
|
+
});
|
|
607
|
+
|
|
608
|
+
// src/mediaQuery.ts
|
|
609
|
+
var size = {
|
|
610
|
+
medium: "800px",
|
|
611
|
+
large: "1280px",
|
|
612
|
+
xlarge: "1550px",
|
|
613
|
+
xxlarge: "1680px"
|
|
614
|
+
};
|
|
615
|
+
var mediaQuery = {
|
|
616
|
+
small: `@media (max-width: ${size.medium})`,
|
|
617
|
+
medium: `@media (max-width: ${size.large}) and (min-width: ${size.medium})`,
|
|
618
|
+
large: `@media (max-width: ${size.xlarge}) and (min-width: ${size.large})`,
|
|
619
|
+
xlarge: `@media (min-width: ${size.xlarge})`
|
|
620
|
+
};
|
|
621
|
+
|
|
622
|
+
// src/theme/light.ts
|
|
623
|
+
var name = "light";
|
|
624
|
+
var colors = {
|
|
625
|
+
logo: {
|
|
626
|
+
fill: "rgb(175,175,175)",
|
|
627
|
+
highlight: "rgb(175,175,175)"
|
|
628
|
+
},
|
|
629
|
+
text: "rgb(38, 48, 83)",
|
|
630
|
+
textMuted: "rgb(85, 85, 85)",
|
|
631
|
+
textSubtle: "rgb(121, 121, 121)",
|
|
632
|
+
textDisabled: "rgb(160, 160, 160)",
|
|
633
|
+
textDecorativeLight: "rgb(168, 185, 212)",
|
|
634
|
+
dividerSubtle: "rgba(0, 0, 0, 0.04)",
|
|
635
|
+
divider: "rgba(0, 0, 0, 0.07)",
|
|
636
|
+
dividerStrong: "rgba(0, 0, 0, 0.09)",
|
|
637
|
+
primary: "rgb(132, 63, 255)",
|
|
638
|
+
primaryLight: "rgb(147, 86, 255)",
|
|
639
|
+
secondary: "rgb(0, 151, 117)",
|
|
640
|
+
secondaryLight: "rgb(0, 160, 129)",
|
|
641
|
+
secondaryBright: "#0ab557",
|
|
642
|
+
warning: "rgb(251, 211, 0)",
|
|
643
|
+
neutralBackground: "rgb(222,223,232)",
|
|
644
|
+
inputBackground: "rgb(240, 240, 242)",
|
|
645
|
+
inputBackgroundLight: "rgb(243, 243, 245)",
|
|
646
|
+
codeBackground: "rgb(250, 250, 250)",
|
|
647
|
+
codeBackgroundLight: "rgb(250, 250, 250)",
|
|
648
|
+
get codeBackgroundDark() {
|
|
649
|
+
return colors.text;
|
|
650
|
+
},
|
|
651
|
+
codeBackgroundDecorativeDark: "#435080",
|
|
652
|
+
selectedBackground: "rgb(242, 245, 250)",
|
|
653
|
+
transparentChecker: "rgba(255,255,255,0.8)",
|
|
654
|
+
activeBackground: "rgba(0,0,0,0.1)",
|
|
655
|
+
scrollbar: "rgba(199,199,199,0.8)",
|
|
656
|
+
placeholderDots: "rgba(0,0,0,0.3)",
|
|
657
|
+
breadcrumb: {
|
|
658
|
+
get text() {
|
|
659
|
+
return colors.textMuted;
|
|
660
|
+
},
|
|
661
|
+
get textHover() {
|
|
662
|
+
return colors.textSubtle;
|
|
663
|
+
},
|
|
664
|
+
get icon() {
|
|
665
|
+
return colors.icon;
|
|
666
|
+
}
|
|
667
|
+
},
|
|
668
|
+
listView: {
|
|
669
|
+
raisedBackground: "rgba(0,0,0,0.03)",
|
|
670
|
+
editingBackground: "#fff"
|
|
671
|
+
},
|
|
672
|
+
canvas: {
|
|
673
|
+
background: "rgb(249,249,249)",
|
|
674
|
+
get selectionStroke() {
|
|
675
|
+
return colors.primary;
|
|
676
|
+
},
|
|
677
|
+
dragHandleStroke: "rgba(180,180,180,0.5)",
|
|
678
|
+
measurement: "rgb(207,92,42)",
|
|
679
|
+
sliceOutline: "rgb(210,210,210)",
|
|
680
|
+
grid: "rgba(0,0,0,0.05)"
|
|
681
|
+
},
|
|
682
|
+
sidebar: {
|
|
683
|
+
background: "rgba(252,252,252,0.85)"
|
|
684
|
+
},
|
|
685
|
+
popover: {
|
|
686
|
+
background: "rgb(252,252,252)",
|
|
687
|
+
divider: "transparent"
|
|
688
|
+
},
|
|
689
|
+
slider: {
|
|
690
|
+
background: "white",
|
|
691
|
+
border: "#BBB"
|
|
692
|
+
},
|
|
693
|
+
radioGroup: {
|
|
694
|
+
background: "white"
|
|
695
|
+
},
|
|
696
|
+
icon: "rgb(139, 139, 139)",
|
|
697
|
+
iconSelected: "rgb(220, 220, 220)",
|
|
698
|
+
mask: "rgb(12,193,67)",
|
|
699
|
+
imageOverlay: "linear-gradient(0deg, rgba(132, 63, 255,0.55), rgba(132, 63, 255,0.55))",
|
|
700
|
+
get dragOutline() {
|
|
701
|
+
return colors.primary;
|
|
702
|
+
},
|
|
703
|
+
selection: "rgb(179,215,254)",
|
|
704
|
+
thumbnailBackground: "#f0efff",
|
|
705
|
+
thumbnailShadow: "#D3CEED66"
|
|
706
|
+
};
|
|
707
|
+
var fonts = {
|
|
708
|
+
normal: "'__Inter_6b0edc', '__Inter_Fallback_6b0edc', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
709
|
+
monospace: "Menlo, Monaco, Consolas, 'Courier New', monospace"
|
|
710
|
+
};
|
|
711
|
+
var typeScale = [3.052, 2.441, 1.953, 1.563, 1.25, 1, 0.85];
|
|
712
|
+
var textStyles = {
|
|
713
|
+
title: {
|
|
714
|
+
fontFamily: fonts.normal,
|
|
715
|
+
fontSize: `${typeScale[0]}rem`,
|
|
716
|
+
fontWeight: "bold",
|
|
717
|
+
lineHeight: "1.4",
|
|
718
|
+
letterSpacing: "-0.05em",
|
|
719
|
+
[mediaQuery.small]: {
|
|
720
|
+
fontSize: "36px"
|
|
721
|
+
}
|
|
722
|
+
},
|
|
723
|
+
subtitle: {
|
|
724
|
+
fontFamily: fonts.normal,
|
|
725
|
+
fontSize: `${typeScale[3]}rem`,
|
|
726
|
+
fontWeight: 500,
|
|
727
|
+
lineHeight: "1.75",
|
|
728
|
+
letterSpacing: "-0.05em",
|
|
729
|
+
[mediaQuery.small]: {
|
|
730
|
+
fontSize: "18px"
|
|
731
|
+
}
|
|
732
|
+
},
|
|
733
|
+
heading1: {
|
|
734
|
+
fontFamily: fonts.normal,
|
|
735
|
+
fontSize: `${typeScale[2]}rem`,
|
|
736
|
+
fontWeight: 500,
|
|
737
|
+
lineHeight: "1.75",
|
|
738
|
+
letterSpacing: "-0.025em"
|
|
739
|
+
},
|
|
740
|
+
heading2: {
|
|
741
|
+
fontFamily: fonts.normal,
|
|
742
|
+
fontSize: `${typeScale[3]}rem`,
|
|
743
|
+
fontWeight: 500,
|
|
744
|
+
lineHeight: "1.75",
|
|
745
|
+
letterSpacing: "-0.025em"
|
|
746
|
+
},
|
|
747
|
+
heading3: {
|
|
748
|
+
fontFamily: fonts.normal,
|
|
749
|
+
fontSize: `${typeScale[4]}rem`,
|
|
750
|
+
fontWeight: 500,
|
|
751
|
+
lineHeight: "1.75",
|
|
752
|
+
letterSpacing: "-0.025em"
|
|
753
|
+
},
|
|
754
|
+
heading4: {
|
|
755
|
+
fontFamily: fonts.normal,
|
|
756
|
+
fontSize: `${typeScale[5]}rem`,
|
|
757
|
+
fontWeight: 500,
|
|
758
|
+
lineHeight: "1.75"
|
|
759
|
+
},
|
|
760
|
+
heading5: {
|
|
761
|
+
fontFamily: fonts.normal,
|
|
762
|
+
fontSize: `${typeScale[6]}rem`,
|
|
763
|
+
fontWeight: 500,
|
|
764
|
+
lineHeight: "1.75"
|
|
765
|
+
},
|
|
766
|
+
body: {
|
|
767
|
+
fontFamily: fonts.normal,
|
|
768
|
+
fontSize: `${typeScale[5]}rem`,
|
|
769
|
+
fontWeight: 400,
|
|
770
|
+
lineHeight: "1.75"
|
|
771
|
+
},
|
|
772
|
+
small: {
|
|
773
|
+
fontFamily: fonts.normal,
|
|
774
|
+
fontSize: `${typeScale[6]}rem`,
|
|
775
|
+
fontWeight: 400,
|
|
776
|
+
lineHeight: "1.4"
|
|
777
|
+
},
|
|
778
|
+
button: {
|
|
779
|
+
fontFamily: fonts.normal,
|
|
780
|
+
fontSize: "0.8rem",
|
|
781
|
+
fontWeight: 500,
|
|
782
|
+
lineHeight: "1.4",
|
|
783
|
+
letterSpacing: "-0.2px"
|
|
784
|
+
},
|
|
785
|
+
code: {
|
|
786
|
+
fontFamily: fonts.monospace,
|
|
787
|
+
fontSize: "90%",
|
|
788
|
+
lineHeight: "1.5"
|
|
789
|
+
},
|
|
790
|
+
label: {
|
|
791
|
+
fontFamily: fonts.normal,
|
|
792
|
+
fontSize: "0.62rem",
|
|
793
|
+
fontWeight: 400,
|
|
794
|
+
lineHeight: "1.4",
|
|
795
|
+
textTransform: "uppercase",
|
|
796
|
+
letterSpacing: "-0.3px"
|
|
797
|
+
}
|
|
798
|
+
};
|
|
799
|
+
var sizes = {
|
|
800
|
+
sidebarWidth: 260,
|
|
801
|
+
toolbar: {
|
|
802
|
+
height: 46,
|
|
803
|
+
itemSeparator: 8
|
|
804
|
+
},
|
|
805
|
+
inspector: {
|
|
806
|
+
horizontalSeparator: 8,
|
|
807
|
+
verticalSeparator: 10
|
|
808
|
+
},
|
|
809
|
+
spacing: {
|
|
810
|
+
nano: 2,
|
|
811
|
+
micro: 4,
|
|
812
|
+
small: 8,
|
|
813
|
+
medium: 16,
|
|
814
|
+
large: 32,
|
|
815
|
+
xlarge: 64,
|
|
816
|
+
xxlarge: 128
|
|
817
|
+
},
|
|
818
|
+
dialog: {
|
|
819
|
+
padding: 16
|
|
820
|
+
}
|
|
821
|
+
};
|
|
822
|
+
|
|
596
823
|
// src/contexts/DialogContext.tsx
|
|
597
824
|
var import_react32 = __toESM(require("react"));
|
|
598
825
|
var import_styled_components14 = __toESM(require("styled-components"));
|
|
@@ -1565,6 +1792,7 @@ function Popover({
|
|
|
1565
1792
|
onFocusOutside,
|
|
1566
1793
|
onPointerDownOutside,
|
|
1567
1794
|
collisionPadding: 8,
|
|
1795
|
+
arrowPadding: 2,
|
|
1568
1796
|
onPointerDown: (event) => {
|
|
1569
1797
|
event.stopPropagation();
|
|
1570
1798
|
},
|
|
@@ -1590,6 +1818,8 @@ var InputFieldContext = (0, import_react31.createContext)({
|
|
|
1590
1818
|
}
|
|
1591
1819
|
});
|
|
1592
1820
|
var LabelContainer = import_styled_components13.default.label(({ theme, labelPosition, hasDropdown, pointerEvents }) => ({
|
|
1821
|
+
...theme.textStyles.label,
|
|
1822
|
+
fontWeight: "bold",
|
|
1593
1823
|
color: theme.colors.textDisabled,
|
|
1594
1824
|
position: "absolute",
|
|
1595
1825
|
top: 0,
|
|
@@ -1599,8 +1829,6 @@ var LabelContainer = import_styled_components13.default.label(({ theme, labelPos
|
|
|
1599
1829
|
display: "flex",
|
|
1600
1830
|
alignItems: "center",
|
|
1601
1831
|
pointerEvents,
|
|
1602
|
-
fontWeight: "bold",
|
|
1603
|
-
fontSize: "60%",
|
|
1604
1832
|
userSelect: "none",
|
|
1605
1833
|
...labelPosition === "start" ? { justifyContent: "flex-start", paddingLeft: "6px" } : {
|
|
1606
1834
|
justifyContent: "flex-end",
|
|
@@ -2162,23 +2390,49 @@ var useCurrentFloatingWindowInternal = () => {
|
|
|
2162
2390
|
};
|
|
2163
2391
|
|
|
2164
2392
|
// src/contexts/DesignSystemConfiguration.tsx
|
|
2165
|
-
var
|
|
2393
|
+
var DesignSystemThemeProvider = (0, import_react34.memo)(
|
|
2394
|
+
function DesignSystemThemeProvider2({
|
|
2395
|
+
children,
|
|
2396
|
+
theme
|
|
2397
|
+
}) {
|
|
2398
|
+
const parentTheme = (0, import_styled_components15.useTheme)();
|
|
2399
|
+
if (theme) {
|
|
2400
|
+
return /* @__PURE__ */ import_react34.default.createElement(import_styled_components15.ThemeProvider, { theme }, children);
|
|
2401
|
+
} else if (parentTheme) {
|
|
2402
|
+
return children;
|
|
2403
|
+
} else {
|
|
2404
|
+
return /* @__PURE__ */ import_react34.default.createElement(import_styled_components15.ThemeProvider, { theme: light_exports }, children);
|
|
2405
|
+
}
|
|
2406
|
+
}
|
|
2407
|
+
);
|
|
2408
|
+
var DesignSystemConfigurationContext = (0, import_react34.createContext)({
|
|
2409
|
+
platform: "key"
|
|
2410
|
+
});
|
|
2166
2411
|
var DesignSystemConfigurationProvider = (0, import_react34.memo)(
|
|
2167
2412
|
function DesignSystemConfigurationProvider2({
|
|
2168
2413
|
children,
|
|
2169
|
-
theme,
|
|
2414
|
+
theme = light_exports,
|
|
2170
2415
|
platform
|
|
2171
2416
|
}) {
|
|
2172
|
-
const
|
|
2417
|
+
const [internalPlatform, setInternalPlatform] = (0, import_react34.useState)(
|
|
2418
|
+
platform ?? "key"
|
|
2419
|
+
);
|
|
2420
|
+
(0, import_react34.useEffect)(() => {
|
|
2421
|
+
if (platform !== void 0)
|
|
2422
|
+
return;
|
|
2423
|
+
if (typeof navigator !== "undefined") {
|
|
2424
|
+
setInternalPlatform((0, import_noya_keymap3.getCurrentPlatform)(navigator));
|
|
2425
|
+
}
|
|
2426
|
+
}, [platform]);
|
|
2427
|
+
const contextValue = (0, import_react34.useMemo)(
|
|
2428
|
+
() => ({ platform: platform ?? internalPlatform }),
|
|
2429
|
+
[platform, internalPlatform]
|
|
2430
|
+
);
|
|
2173
2431
|
return /* @__PURE__ */ import_react34.default.createElement(DesignSystemConfigurationContext.Provider, { value: contextValue }, /* @__PURE__ */ import_react34.default.createElement(import_styled_components15.ThemeProvider, { theme }, /* @__PURE__ */ import_react34.default.createElement(DialogProvider, null, /* @__PURE__ */ import_react34.default.createElement(ToastProvider, null, /* @__PURE__ */ import_react34.default.createElement(FloatingWindowProvider, null, children)))));
|
|
2174
2432
|
}
|
|
2175
2433
|
);
|
|
2176
2434
|
function useDesignSystemConfiguration() {
|
|
2177
|
-
|
|
2178
|
-
if (!value) {
|
|
2179
|
-
throw new Error("Missing DesignSystemConfigurationProvider");
|
|
2180
|
-
}
|
|
2181
|
-
return value;
|
|
2435
|
+
return (0, import_react34.useContext)(DesignSystemConfigurationContext);
|
|
2182
2436
|
}
|
|
2183
2437
|
function useDesignSystemTheme() {
|
|
2184
2438
|
return (0, import_styled_components15.useTheme)();
|
|
@@ -2425,7 +2679,7 @@ var Chip = (0, import_react35.memo)(function Chip2({
|
|
|
2425
2679
|
|
|
2426
2680
|
// src/components/ContextMenu.tsx
|
|
2427
2681
|
var import_noya_icons4 = require("@noya-app/noya-icons");
|
|
2428
|
-
var
|
|
2682
|
+
var import_noya_keymap4 = require("@noya-app/noya-keymap");
|
|
2429
2683
|
var RadixContextMenu = __toESM(require("@radix-ui/react-context-menu"));
|
|
2430
2684
|
var import_react36 = __toESM(require("react"));
|
|
2431
2685
|
var import_styled_components17 = __toESM(require("styled-components"));
|
|
@@ -2507,7 +2761,7 @@ function ContextMenuRoot({
|
|
|
2507
2761
|
() => isNested || shouldBindKeyboardShortcuts === false ? {} : getKeyboardShortcutsForMenuItems(items, onSelect),
|
|
2508
2762
|
[isNested, items, onSelect, shouldBindKeyboardShortcuts]
|
|
2509
2763
|
);
|
|
2510
|
-
(0,
|
|
2764
|
+
(0, import_noya_keymap4.useKeyboardShortcuts)(keymap);
|
|
2511
2765
|
const onPointerDown = (0, import_react36.useCallback)((event) => {
|
|
2512
2766
|
event.preventDefault();
|
|
2513
2767
|
}, []);
|
|
@@ -3583,7 +3837,7 @@ var ScrollArea = (0, import_react45.memo)(function ScrollArea2({ children }) {
|
|
|
3583
3837
|
});
|
|
3584
3838
|
|
|
3585
3839
|
// src/components/GridView.tsx
|
|
3586
|
-
var
|
|
3840
|
+
var sizes2 = {
|
|
3587
3841
|
xxs: {
|
|
3588
3842
|
itemWidth: 36,
|
|
3589
3843
|
itemHeight: 36,
|
|
@@ -3619,9 +3873,9 @@ var Grid2 = import_styled_components24.default.div(({ theme, size: size2, paddin
|
|
|
3619
3873
|
return {
|
|
3620
3874
|
color: theme.colors.text,
|
|
3621
3875
|
display: "grid",
|
|
3622
|
-
gridTemplateColumns: `repeat(auto-fill, minmax(${
|
|
3876
|
+
gridTemplateColumns: `repeat(auto-fill, minmax(${sizes2[size2].itemWidth}px, 1fr))`,
|
|
3623
3877
|
// gridAutoRows: `${sizes[size].itemHeight}px`,
|
|
3624
|
-
gap: `${
|
|
3878
|
+
gap: `${sizes2[size2].gap}px`,
|
|
3625
3879
|
// gridTemplateColumns: `repeat(auto-fill, minmax(
|
|
3626
3880
|
// ${size === 'large' ? '280px' : size === 'small' ? '160px' : '116px'}
|
|
3627
3881
|
// , 1fr))`,
|
|
@@ -4140,6 +4394,10 @@ function SortableRoot({
|
|
|
4140
4394
|
},
|
|
4141
4395
|
[acceptsDrop, axis, keys, onMoveItem, position.x, position.y]
|
|
4142
4396
|
);
|
|
4397
|
+
const [mounted, setMounted] = (0, import_react47.useState)(false);
|
|
4398
|
+
(0, import_react47.useEffect)(() => {
|
|
4399
|
+
setMounted(true);
|
|
4400
|
+
}, []);
|
|
4143
4401
|
return /* @__PURE__ */ import_react47.default.createElement(
|
|
4144
4402
|
SortableItemContext.Provider,
|
|
4145
4403
|
{
|
|
@@ -4164,7 +4422,7 @@ function SortableRoot({
|
|
|
4164
4422
|
onDragEnd: handleDragEnd
|
|
4165
4423
|
},
|
|
4166
4424
|
/* @__PURE__ */ import_react47.default.createElement(import_sortable.SortableContext, { items: keys, strategy: import_sortable.verticalListSortingStrategy }, children),
|
|
4167
|
-
renderOverlay && (0, import_react_dom2.createPortal)(
|
|
4425
|
+
mounted && renderOverlay && (0, import_react_dom2.createPortal)(
|
|
4168
4426
|
/* @__PURE__ */ import_react47.default.createElement(import_core.DragOverlay, { dropAnimation: null }, activeIndex !== void 0 && activeIndex >= 0 && renderOverlay(activeIndex)),
|
|
4169
4427
|
document.body
|
|
4170
4428
|
)
|
|
@@ -5534,6 +5792,14 @@ var createChevronSVGString = (0, import_noya_utils11.memoize)(
|
|
|
5534
5792
|
</svg>
|
|
5535
5793
|
`
|
|
5536
5794
|
);
|
|
5795
|
+
var SelectContainer = import_styled_components32.default.div(
|
|
5796
|
+
({ flex }) => ({
|
|
5797
|
+
flex: flex ?? "1 1 0px",
|
|
5798
|
+
display: "flex",
|
|
5799
|
+
flexDirection: "row",
|
|
5800
|
+
position: "relative"
|
|
5801
|
+
})
|
|
5802
|
+
);
|
|
5537
5803
|
var SelectElement = import_styled_components32.default.select(
|
|
5538
5804
|
({ theme, flex }) => ({
|
|
5539
5805
|
appearance: "none",
|
|
@@ -5565,10 +5831,25 @@ var SelectElement = import_styled_components32.default.select(
|
|
|
5565
5831
|
}
|
|
5566
5832
|
})
|
|
5567
5833
|
);
|
|
5834
|
+
var SelectLabel = import_styled_components32.default.label(({ theme }) => ({
|
|
5835
|
+
...theme.textStyles.label,
|
|
5836
|
+
color: theme.colors.textDisabled,
|
|
5837
|
+
lineHeight: "19px",
|
|
5838
|
+
position: "absolute",
|
|
5839
|
+
inset: "0",
|
|
5840
|
+
fontWeight: "bold",
|
|
5841
|
+
fontSize: "60%",
|
|
5842
|
+
pointerEvents: "none",
|
|
5843
|
+
display: "flex",
|
|
5844
|
+
alignItems: "center",
|
|
5845
|
+
justifyContent: "end",
|
|
5846
|
+
paddingRight: "24px"
|
|
5847
|
+
}));
|
|
5568
5848
|
var Select = (0, import_react55.memo)(function Select2({
|
|
5569
5849
|
id,
|
|
5570
5850
|
flex,
|
|
5571
5851
|
value,
|
|
5852
|
+
label,
|
|
5572
5853
|
...rest
|
|
5573
5854
|
}) {
|
|
5574
5855
|
const options = "options" in rest ? rest.options : void 0;
|
|
@@ -5595,7 +5876,7 @@ var Select = (0, import_react55.memo)(function Select2({
|
|
|
5595
5876
|
}),
|
|
5596
5877
|
[]
|
|
5597
5878
|
);
|
|
5598
|
-
return /* @__PURE__ */ import_react55.default.createElement(SelectContext.Provider, { value: contextValue }, /* @__PURE__ */ import_react55.default.createElement(
|
|
5879
|
+
return /* @__PURE__ */ import_react55.default.createElement(SelectContext.Provider, { value: contextValue }, /* @__PURE__ */ import_react55.default.createElement(SelectContainer, { flex }, /* @__PURE__ */ import_react55.default.createElement(
|
|
5599
5880
|
SelectElement,
|
|
5600
5881
|
{
|
|
5601
5882
|
id,
|
|
@@ -5608,7 +5889,7 @@ var Select = (0, import_react55.memo)(function Select2({
|
|
|
5608
5889
|
onPointerDown: (event) => event.stopPropagation()
|
|
5609
5890
|
},
|
|
5610
5891
|
optionElements
|
|
5611
|
-
));
|
|
5892
|
+
)), label && /* @__PURE__ */ import_react55.default.createElement(SelectLabel, { htmlFor: id }, label));
|
|
5612
5893
|
});
|
|
5613
5894
|
|
|
5614
5895
|
// src/components/Slider.tsx
|
|
@@ -5772,241 +6053,16 @@ function usePlatformModKey() {
|
|
|
5772
6053
|
return platform === "mac" ? "metaKey" : "ctrlKey";
|
|
5773
6054
|
}
|
|
5774
6055
|
|
|
5775
|
-
// src/mediaQuery.ts
|
|
5776
|
-
var size = {
|
|
5777
|
-
medium: "800px",
|
|
5778
|
-
large: "1280px",
|
|
5779
|
-
xlarge: "1550px",
|
|
5780
|
-
xxlarge: "1680px"
|
|
5781
|
-
};
|
|
5782
|
-
var mediaQuery = {
|
|
5783
|
-
small: `@media (max-width: ${size.medium})`,
|
|
5784
|
-
medium: `@media (max-width: ${size.large}) and (min-width: ${size.medium})`,
|
|
5785
|
-
large: `@media (max-width: ${size.xlarge}) and (min-width: ${size.large})`,
|
|
5786
|
-
xlarge: `@media (min-width: ${size.xlarge})`
|
|
5787
|
-
};
|
|
5788
|
-
|
|
5789
6056
|
// src/theme/dark.ts
|
|
5790
6057
|
var dark_exports = {};
|
|
5791
6058
|
__export(dark_exports, {
|
|
5792
6059
|
colors: () => colors2,
|
|
5793
6060
|
fonts: () => fonts,
|
|
5794
6061
|
name: () => name2,
|
|
5795
|
-
sizes: () =>
|
|
6062
|
+
sizes: () => sizes,
|
|
5796
6063
|
textStyles: () => textStyles
|
|
5797
6064
|
});
|
|
5798
6065
|
var import_immer = __toESM(require("immer"));
|
|
5799
|
-
|
|
5800
|
-
// src/theme/light.ts
|
|
5801
|
-
var light_exports = {};
|
|
5802
|
-
__export(light_exports, {
|
|
5803
|
-
colors: () => colors,
|
|
5804
|
-
fonts: () => fonts,
|
|
5805
|
-
name: () => name,
|
|
5806
|
-
sizes: () => sizes2,
|
|
5807
|
-
textStyles: () => textStyles
|
|
5808
|
-
});
|
|
5809
|
-
var name = "light";
|
|
5810
|
-
var colors = {
|
|
5811
|
-
logo: {
|
|
5812
|
-
fill: "rgb(175,175,175)",
|
|
5813
|
-
highlight: "rgb(175,175,175)"
|
|
5814
|
-
},
|
|
5815
|
-
text: "rgb(38, 48, 83)",
|
|
5816
|
-
textMuted: "rgb(85, 85, 85)",
|
|
5817
|
-
textSubtle: "rgb(121, 121, 121)",
|
|
5818
|
-
textDisabled: "rgb(160, 160, 160)",
|
|
5819
|
-
textDecorativeLight: "rgb(168, 185, 212)",
|
|
5820
|
-
dividerSubtle: "rgba(0, 0, 0, 0.04)",
|
|
5821
|
-
divider: "rgba(0, 0, 0, 0.07)",
|
|
5822
|
-
dividerStrong: "rgba(0, 0, 0, 0.09)",
|
|
5823
|
-
primary: "rgb(132, 63, 255)",
|
|
5824
|
-
primaryLight: "rgb(147, 86, 255)",
|
|
5825
|
-
secondary: "rgb(0, 151, 117)",
|
|
5826
|
-
secondaryLight: "rgb(0, 160, 129)",
|
|
5827
|
-
secondaryBright: "#0ab557",
|
|
5828
|
-
warning: "rgb(251, 211, 0)",
|
|
5829
|
-
neutralBackground: "rgb(222,223,232)",
|
|
5830
|
-
inputBackground: "rgb(240, 240, 242)",
|
|
5831
|
-
inputBackgroundLight: "rgb(243, 243, 245)",
|
|
5832
|
-
codeBackground: "rgb(250, 250, 250)",
|
|
5833
|
-
codeBackgroundLight: "rgb(250, 250, 250)",
|
|
5834
|
-
get codeBackgroundDark() {
|
|
5835
|
-
return colors.text;
|
|
5836
|
-
},
|
|
5837
|
-
codeBackgroundDecorativeDark: "#435080",
|
|
5838
|
-
selectedBackground: "rgb(242, 245, 250)",
|
|
5839
|
-
transparentChecker: "rgba(255,255,255,0.8)",
|
|
5840
|
-
activeBackground: "rgba(0,0,0,0.1)",
|
|
5841
|
-
scrollbar: "rgba(199,199,199,0.8)",
|
|
5842
|
-
placeholderDots: "rgba(0,0,0,0.3)",
|
|
5843
|
-
breadcrumb: {
|
|
5844
|
-
get text() {
|
|
5845
|
-
return colors.textMuted;
|
|
5846
|
-
},
|
|
5847
|
-
get textHover() {
|
|
5848
|
-
return colors.textSubtle;
|
|
5849
|
-
},
|
|
5850
|
-
get icon() {
|
|
5851
|
-
return colors.icon;
|
|
5852
|
-
}
|
|
5853
|
-
},
|
|
5854
|
-
listView: {
|
|
5855
|
-
raisedBackground: "rgba(0,0,0,0.03)",
|
|
5856
|
-
editingBackground: "#fff"
|
|
5857
|
-
},
|
|
5858
|
-
canvas: {
|
|
5859
|
-
background: "rgb(249,249,249)",
|
|
5860
|
-
get selectionStroke() {
|
|
5861
|
-
return colors.primary;
|
|
5862
|
-
},
|
|
5863
|
-
dragHandleStroke: "rgba(180,180,180,0.5)",
|
|
5864
|
-
measurement: "rgb(207,92,42)",
|
|
5865
|
-
sliceOutline: "rgb(210,210,210)",
|
|
5866
|
-
grid: "rgba(0,0,0,0.05)"
|
|
5867
|
-
},
|
|
5868
|
-
sidebar: {
|
|
5869
|
-
background: "rgba(252,252,252,0.85)"
|
|
5870
|
-
},
|
|
5871
|
-
popover: {
|
|
5872
|
-
background: "rgb(252,252,252)",
|
|
5873
|
-
divider: "transparent"
|
|
5874
|
-
},
|
|
5875
|
-
slider: {
|
|
5876
|
-
background: "white",
|
|
5877
|
-
border: "#BBB"
|
|
5878
|
-
},
|
|
5879
|
-
radioGroup: {
|
|
5880
|
-
background: "white"
|
|
5881
|
-
},
|
|
5882
|
-
icon: "rgb(139, 139, 139)",
|
|
5883
|
-
iconSelected: "rgb(220, 220, 220)",
|
|
5884
|
-
mask: "rgb(12,193,67)",
|
|
5885
|
-
imageOverlay: "linear-gradient(0deg, rgba(132, 63, 255,0.55), rgba(132, 63, 255,0.55))",
|
|
5886
|
-
get dragOutline() {
|
|
5887
|
-
return colors.primary;
|
|
5888
|
-
},
|
|
5889
|
-
selection: "rgb(179,215,254)",
|
|
5890
|
-
thumbnailBackground: "#f0efff",
|
|
5891
|
-
thumbnailShadow: "#D3CEED66"
|
|
5892
|
-
};
|
|
5893
|
-
var fonts = {
|
|
5894
|
-
normal: "'__Inter_6b0edc', '__Inter_Fallback_6b0edc', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
5895
|
-
monospace: "Menlo, Monaco, Consolas, 'Courier New', monospace"
|
|
5896
|
-
};
|
|
5897
|
-
var typeScale = [3.052, 2.441, 1.953, 1.563, 1.25, 1, 0.85];
|
|
5898
|
-
var textStyles = {
|
|
5899
|
-
title: {
|
|
5900
|
-
fontFamily: fonts.normal,
|
|
5901
|
-
fontSize: `${typeScale[0]}rem`,
|
|
5902
|
-
fontWeight: "bold",
|
|
5903
|
-
lineHeight: "1.4",
|
|
5904
|
-
letterSpacing: "-0.05em",
|
|
5905
|
-
[mediaQuery.small]: {
|
|
5906
|
-
fontSize: "36px"
|
|
5907
|
-
}
|
|
5908
|
-
},
|
|
5909
|
-
subtitle: {
|
|
5910
|
-
fontFamily: fonts.normal,
|
|
5911
|
-
fontSize: `${typeScale[3]}rem`,
|
|
5912
|
-
fontWeight: 500,
|
|
5913
|
-
lineHeight: "1.75",
|
|
5914
|
-
letterSpacing: "-0.05em",
|
|
5915
|
-
[mediaQuery.small]: {
|
|
5916
|
-
fontSize: "18px"
|
|
5917
|
-
}
|
|
5918
|
-
},
|
|
5919
|
-
heading1: {
|
|
5920
|
-
fontFamily: fonts.normal,
|
|
5921
|
-
fontSize: `${typeScale[2]}rem`,
|
|
5922
|
-
fontWeight: 500,
|
|
5923
|
-
lineHeight: "1.75",
|
|
5924
|
-
letterSpacing: "-0.025em"
|
|
5925
|
-
},
|
|
5926
|
-
heading2: {
|
|
5927
|
-
fontFamily: fonts.normal,
|
|
5928
|
-
fontSize: `${typeScale[3]}rem`,
|
|
5929
|
-
fontWeight: 500,
|
|
5930
|
-
lineHeight: "1.75",
|
|
5931
|
-
letterSpacing: "-0.025em"
|
|
5932
|
-
},
|
|
5933
|
-
heading3: {
|
|
5934
|
-
fontFamily: fonts.normal,
|
|
5935
|
-
fontSize: `${typeScale[4]}rem`,
|
|
5936
|
-
fontWeight: 500,
|
|
5937
|
-
lineHeight: "1.75",
|
|
5938
|
-
letterSpacing: "-0.025em"
|
|
5939
|
-
},
|
|
5940
|
-
heading4: {
|
|
5941
|
-
fontFamily: fonts.normal,
|
|
5942
|
-
fontSize: `${typeScale[5]}rem`,
|
|
5943
|
-
fontWeight: 500,
|
|
5944
|
-
lineHeight: "1.75"
|
|
5945
|
-
},
|
|
5946
|
-
heading5: {
|
|
5947
|
-
fontFamily: fonts.normal,
|
|
5948
|
-
fontSize: `${typeScale[6]}rem`,
|
|
5949
|
-
fontWeight: 500,
|
|
5950
|
-
lineHeight: "1.75"
|
|
5951
|
-
},
|
|
5952
|
-
body: {
|
|
5953
|
-
fontFamily: fonts.normal,
|
|
5954
|
-
fontSize: `${typeScale[5]}rem`,
|
|
5955
|
-
fontWeight: 400,
|
|
5956
|
-
lineHeight: "1.75"
|
|
5957
|
-
},
|
|
5958
|
-
small: {
|
|
5959
|
-
fontFamily: fonts.normal,
|
|
5960
|
-
fontSize: `${typeScale[6]}rem`,
|
|
5961
|
-
fontWeight: 400,
|
|
5962
|
-
lineHeight: "1.4"
|
|
5963
|
-
},
|
|
5964
|
-
button: {
|
|
5965
|
-
fontFamily: fonts.normal,
|
|
5966
|
-
fontSize: "0.8rem",
|
|
5967
|
-
fontWeight: 500,
|
|
5968
|
-
lineHeight: "1.4",
|
|
5969
|
-
letterSpacing: "-0.2px"
|
|
5970
|
-
},
|
|
5971
|
-
code: {
|
|
5972
|
-
fontFamily: fonts.monospace,
|
|
5973
|
-
fontSize: "90%",
|
|
5974
|
-
lineHeight: "1.5"
|
|
5975
|
-
},
|
|
5976
|
-
label: {
|
|
5977
|
-
fontFamily: fonts.normal,
|
|
5978
|
-
fontSize: "0.62rem",
|
|
5979
|
-
fontWeight: 400,
|
|
5980
|
-
lineHeight: "1.4",
|
|
5981
|
-
textTransform: "uppercase",
|
|
5982
|
-
letterSpacing: "0.3px"
|
|
5983
|
-
}
|
|
5984
|
-
};
|
|
5985
|
-
var sizes2 = {
|
|
5986
|
-
sidebarWidth: 260,
|
|
5987
|
-
toolbar: {
|
|
5988
|
-
height: 46,
|
|
5989
|
-
itemSeparator: 8
|
|
5990
|
-
},
|
|
5991
|
-
inspector: {
|
|
5992
|
-
horizontalSeparator: 8,
|
|
5993
|
-
verticalSeparator: 10
|
|
5994
|
-
},
|
|
5995
|
-
spacing: {
|
|
5996
|
-
nano: 2,
|
|
5997
|
-
micro: 4,
|
|
5998
|
-
small: 8,
|
|
5999
|
-
medium: 16,
|
|
6000
|
-
large: 32,
|
|
6001
|
-
xlarge: 64,
|
|
6002
|
-
xxlarge: 128
|
|
6003
|
-
},
|
|
6004
|
-
dialog: {
|
|
6005
|
-
padding: 16
|
|
6006
|
-
}
|
|
6007
|
-
};
|
|
6008
|
-
|
|
6009
|
-
// src/theme/dark.ts
|
|
6010
6066
|
var name2 = "dark";
|
|
6011
6067
|
var colors2 = (0, import_immer.default)(colors, (colors3) => {
|
|
6012
6068
|
colors3.logo.fill = "rgb(248,248,250)";
|
|
@@ -6335,6 +6391,7 @@ var DimensionInput = (0, import_react61.memo)(function DimensionInput2({
|
|
|
6335
6391
|
CompletionToken,
|
|
6336
6392
|
ContextMenu,
|
|
6337
6393
|
DesignSystemConfigurationProvider,
|
|
6394
|
+
DesignSystemThemeProvider,
|
|
6338
6395
|
Dialog,
|
|
6339
6396
|
DialogProvider,
|
|
6340
6397
|
DimensionInput,
|