@noya-app/noya-designsystem 0.1.37 → 0.1.39
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 +10 -10
- package/CHANGELOG.md +12 -0
- package/dist/index.css +1 -1
- package/dist/index.d.mts +343 -23
- package/dist/index.d.ts +343 -23
- package/dist/index.js +401 -137
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +405 -138
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/Button.tsx +1 -1
- package/src/components/Checkbox.tsx +6 -8
- package/src/components/Chip.tsx +15 -8
- package/src/components/DraggableMenuButton.tsx +3 -2
- package/src/components/FillPreviewBackground.tsx +10 -9
- package/src/components/FloatingWindow.tsx +5 -6
- package/src/components/IconButton.tsx +5 -1
- package/src/components/InputField.tsx +95 -68
- package/src/components/InspectorContainer.tsx +2 -2
- package/src/components/InspectorPrimitives.tsx +19 -9
- package/src/components/Label.tsx +1 -1
- package/src/components/ListView.tsx +19 -32
- package/src/components/RadioGroup.tsx +1 -1
- package/src/components/SelectMenu.tsx +3 -3
- package/src/components/Switch.tsx +1 -1
- package/src/components/Text.tsx +20 -7
- package/src/components/TextArea.tsx +1 -1
- package/src/components/Tooltip.tsx +1 -1
- package/src/components/WorkspaceLayout.tsx +4 -3
- package/src/components/internal/TextInput.tsx +1 -0
- package/src/index.css +12 -2
- package/src/index.tsx +0 -1
- package/src/theme/index.ts +6 -3
- package/src/theme/themeUtils.ts +72 -0
- package/src/utils/tailwind.ts +4 -12
- package/tailwind.config.ts +16 -3
package/dist/index.mjs
CHANGED
|
@@ -1389,12 +1389,12 @@ import React, { memo } from "react";
|
|
|
1389
1389
|
|
|
1390
1390
|
// ../../node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
1391
1391
|
var CLASS_PART_SEPARATOR = "-";
|
|
1392
|
-
var createClassGroupUtils = (
|
|
1393
|
-
const classMap = createClassMap(
|
|
1392
|
+
var createClassGroupUtils = (config2) => {
|
|
1393
|
+
const classMap = createClassMap(config2);
|
|
1394
1394
|
const {
|
|
1395
1395
|
conflictingClassGroups,
|
|
1396
1396
|
conflictingClassGroupModifiers
|
|
1397
|
-
} =
|
|
1397
|
+
} = config2;
|
|
1398
1398
|
const getClassGroupId = (className) => {
|
|
1399
1399
|
const classParts = className.split(CLASS_PART_SEPARATOR);
|
|
1400
1400
|
if (classParts[0] === "" && classParts.length !== 1) {
|
|
@@ -1442,22 +1442,22 @@ var getGroupIdForArbitraryProperty = (className) => {
|
|
|
1442
1442
|
}
|
|
1443
1443
|
}
|
|
1444
1444
|
};
|
|
1445
|
-
var createClassMap = (
|
|
1445
|
+
var createClassMap = (config2) => {
|
|
1446
1446
|
const {
|
|
1447
|
-
theme
|
|
1447
|
+
theme,
|
|
1448
1448
|
prefix
|
|
1449
|
-
} =
|
|
1449
|
+
} = config2;
|
|
1450
1450
|
const classMap = {
|
|
1451
1451
|
nextPart: /* @__PURE__ */ new Map(),
|
|
1452
1452
|
validators: []
|
|
1453
1453
|
};
|
|
1454
|
-
const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(
|
|
1454
|
+
const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config2.classGroups), prefix);
|
|
1455
1455
|
prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {
|
|
1456
|
-
processClassesRecursively(classGroup, classMap, classGroupId,
|
|
1456
|
+
processClassesRecursively(classGroup, classMap, classGroupId, theme);
|
|
1457
1457
|
});
|
|
1458
1458
|
return classMap;
|
|
1459
1459
|
};
|
|
1460
|
-
var processClassesRecursively = (classGroup, classPartObject, classGroupId,
|
|
1460
|
+
var processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
|
|
1461
1461
|
classGroup.forEach((classDefinition) => {
|
|
1462
1462
|
if (typeof classDefinition === "string") {
|
|
1463
1463
|
const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
|
|
@@ -1466,7 +1466,7 @@ var processClassesRecursively = (classGroup, classPartObject, classGroupId, them
|
|
|
1466
1466
|
}
|
|
1467
1467
|
if (typeof classDefinition === "function") {
|
|
1468
1468
|
if (isThemeGetter(classDefinition)) {
|
|
1469
|
-
processClassesRecursively(classDefinition(
|
|
1469
|
+
processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
|
|
1470
1470
|
return;
|
|
1471
1471
|
}
|
|
1472
1472
|
classPartObject.validators.push({
|
|
@@ -1476,7 +1476,7 @@ var processClassesRecursively = (classGroup, classPartObject, classGroupId, them
|
|
|
1476
1476
|
return;
|
|
1477
1477
|
}
|
|
1478
1478
|
Object.entries(classDefinition).forEach(([key, classGroup2]) => {
|
|
1479
|
-
processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId,
|
|
1479
|
+
processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme);
|
|
1480
1480
|
});
|
|
1481
1481
|
});
|
|
1482
1482
|
};
|
|
@@ -1552,11 +1552,11 @@ var createLruCache = (maxCacheSize) => {
|
|
|
1552
1552
|
};
|
|
1553
1553
|
};
|
|
1554
1554
|
var IMPORTANT_MODIFIER = "!";
|
|
1555
|
-
var createParseClassName = (
|
|
1555
|
+
var createParseClassName = (config2) => {
|
|
1556
1556
|
const {
|
|
1557
1557
|
separator,
|
|
1558
1558
|
experimentalParseClassName
|
|
1559
|
-
} =
|
|
1559
|
+
} = config2;
|
|
1560
1560
|
const isSeparatorSingleCharacter = separator.length === 1;
|
|
1561
1561
|
const firstSeparatorCharacter = separator[0];
|
|
1562
1562
|
const separatorLength = separator.length;
|
|
@@ -1621,10 +1621,10 @@ var sortModifiers = (modifiers) => {
|
|
|
1621
1621
|
sortedModifiers.push(...unsortedModifiers.sort());
|
|
1622
1622
|
return sortedModifiers;
|
|
1623
1623
|
};
|
|
1624
|
-
var createConfigUtils = (
|
|
1625
|
-
cache: createLruCache(
|
|
1626
|
-
parseClassName: createParseClassName(
|
|
1627
|
-
...createClassGroupUtils(
|
|
1624
|
+
var createConfigUtils = (config2) => ({
|
|
1625
|
+
cache: createLruCache(config2.cacheSize),
|
|
1626
|
+
parseClassName: createParseClassName(config2),
|
|
1627
|
+
...createClassGroupUtils(config2)
|
|
1628
1628
|
});
|
|
1629
1629
|
var SPLIT_CLASSES_REGEX = /\s+/;
|
|
1630
1630
|
var mergeClassList = (classList, configUtils) => {
|
|
@@ -1711,8 +1711,8 @@ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
|
|
|
1711
1711
|
let cacheSet;
|
|
1712
1712
|
let functionToCall = initTailwindMerge;
|
|
1713
1713
|
function initTailwindMerge(classList) {
|
|
1714
|
-
const
|
|
1715
|
-
configUtils = createConfigUtils(
|
|
1714
|
+
const config2 = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
|
|
1715
|
+
configUtils = createConfigUtils(config2);
|
|
1716
1716
|
cacheGet = configUtils.cache.get;
|
|
1717
1717
|
cacheSet = configUtils.cache.set;
|
|
1718
1718
|
functionToCall = tailwindMerge;
|
|
@@ -1732,7 +1732,7 @@ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
|
|
|
1732
1732
|
};
|
|
1733
1733
|
}
|
|
1734
1734
|
var fromTheme = (key) => {
|
|
1735
|
-
const themeGetter = (
|
|
1735
|
+
const themeGetter = (theme) => theme[key] || [];
|
|
1736
1736
|
themeGetter.isThemeGetter = true;
|
|
1737
1737
|
return themeGetter;
|
|
1738
1738
|
};
|
|
@@ -3849,9 +3849,6 @@ var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
|
3849
3849
|
|
|
3850
3850
|
// src/utils/tailwind.ts
|
|
3851
3851
|
var cn = (...classes) => twMerge(classes.filter(Boolean));
|
|
3852
|
-
function camelCaseToKebabCase(string) {
|
|
3853
|
-
return string.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
3854
|
-
}
|
|
3855
3852
|
|
|
3856
3853
|
// src/components/ActivityIndicator.tsx
|
|
3857
3854
|
var ActivityIndicator = memo(function ActivityIndicator2({
|
|
@@ -3952,6 +3949,30 @@ import React4, { memo as memo2 } from "react";
|
|
|
3952
3949
|
|
|
3953
3950
|
// src/components/Text.tsx
|
|
3954
3951
|
import React3, { forwardRef as forwardRef2 } from "react";
|
|
3952
|
+
|
|
3953
|
+
// src/theme/themeUtils.ts
|
|
3954
|
+
function camelToKebabCase(str) {
|
|
3955
|
+
return str.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
3956
|
+
}
|
|
3957
|
+
function kebabToCamelCase(str) {
|
|
3958
|
+
return str.replace(
|
|
3959
|
+
/-([a-z])/g,
|
|
3960
|
+
(_, letter) => letter.toUpperCase()
|
|
3961
|
+
);
|
|
3962
|
+
}
|
|
3963
|
+
function convertKebabToCamelCase(obj) {
|
|
3964
|
+
if (Array.isArray(obj) || obj instanceof Set || obj instanceof Map) {
|
|
3965
|
+
return obj;
|
|
3966
|
+
}
|
|
3967
|
+
const result = {};
|
|
3968
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
3969
|
+
const camelKey = kebabToCamelCase(key);
|
|
3970
|
+
result[camelKey] = value && typeof value === "object" && !Array.isArray(value) && !(value instanceof Set) && !(value instanceof Map) ? convertKebabToCamelCase(value) : value;
|
|
3971
|
+
}
|
|
3972
|
+
return result;
|
|
3973
|
+
}
|
|
3974
|
+
|
|
3975
|
+
// src/components/Text.tsx
|
|
3955
3976
|
var elements = {
|
|
3956
3977
|
title: "h1",
|
|
3957
3978
|
subtitle: "h1",
|
|
@@ -3998,7 +4019,7 @@ var Text = forwardRef2(function Text2({
|
|
|
3998
4019
|
Component3,
|
|
3999
4020
|
{
|
|
4000
4021
|
ref: forwardedRef,
|
|
4001
|
-
className: `${textStyles[variant]} text-${
|
|
4022
|
+
className: `${textStyles[variant]} text-${camelToKebabCase(String(color)) ?? "text"} ${className ?? ""}`,
|
|
4002
4023
|
style: style5,
|
|
4003
4024
|
tabIndex,
|
|
4004
4025
|
onClick,
|
|
@@ -4049,7 +4070,7 @@ var Tooltip = memo2(function Tooltip2({ children: children2, content }) {
|
|
|
4049
4070
|
align: "center",
|
|
4050
4071
|
sideOffset: 2,
|
|
4051
4072
|
collisionPadding: 8,
|
|
4052
|
-
className: `${textStyles.small} text-text rounded-[3px] py-small px-medium bg-popover-background shadow-[
|
|
4073
|
+
className: `${textStyles.small} text-text rounded-[3px] py-small px-medium bg-popover-background shadow-[0_2px_4px_rgba(0,0,0,0.2)_0_0_12px_rgba(0,0,0,0.1)] border border-solid border-divider-strong`
|
|
4053
4074
|
},
|
|
4054
4075
|
content
|
|
4055
4076
|
))));
|
|
@@ -4094,7 +4115,7 @@ var Button = forwardRef3(function Button2({
|
|
|
4094
4115
|
{
|
|
4095
4116
|
ref: forwardedRef,
|
|
4096
4117
|
id,
|
|
4097
|
-
className: `no-underline leading-[1] relative border-0 outline-none select-none text-left rounded flex items-center justify-center [&>*]:pointer-events-none [-webkit-app-region:no-drag] focus:ring-2 focus:ring-primary focus:
|
|
4118
|
+
className: `no-underline leading-[1] relative border-0 outline-none select-none text-left rounded flex items-center justify-center [&>*]:pointer-events-none [-webkit-app-region:no-drag] focus:ring-2 focus:ring-primary focus:shadow-[0_0_0_1px_var(--popover-background)_inset] ${disabled ? "opacity-25" : ""} ${!className?.includes("flex") ? "flex-none" : ""} ${active ? "bg-primary text-white hover:bg-primary-light active:bg-primary" : variantStyles[variant]} ${sizeStyles[variant === "thin" ? "thin" : variant === "floating" && size3 !== "small" ? "floating" : variant === "none" ? "none" : size3]} ${className ?? ""}`,
|
|
4098
4119
|
style: style5,
|
|
4099
4120
|
tabIndex,
|
|
4100
4121
|
disabled,
|
|
@@ -4124,11 +4145,12 @@ var colorSchemeStyles = {
|
|
|
4124
4145
|
secondary: "text-secondary"
|
|
4125
4146
|
};
|
|
4126
4147
|
var Checkbox = memo3(
|
|
4127
|
-
forwardRef4(function Checkbox2({ className, colorScheme = "secondary", ...props }, ref) {
|
|
4148
|
+
forwardRef4(function Checkbox2({ className, style: style5, colorScheme = "secondary", ...props }, ref) {
|
|
4128
4149
|
return /* @__PURE__ */ React6.createElement(
|
|
4129
4150
|
"div",
|
|
4130
4151
|
{
|
|
4131
|
-
className: `relative inline-flex w-[19px] h-[19px] ${colorSchemeStyles[colorScheme]} ${className ?? ""}
|
|
4152
|
+
className: `relative inline-flex w-[19px] h-[19px] ${colorSchemeStyles[colorScheme]} ${className ?? ""}`,
|
|
4153
|
+
style: style5
|
|
4132
4154
|
},
|
|
4133
4155
|
/* @__PURE__ */ React6.createElement(
|
|
4134
4156
|
"input",
|
|
@@ -4140,6 +4162,7 @@ var Checkbox = memo3(
|
|
|
4140
4162
|
h-full
|
|
4141
4163
|
peer
|
|
4142
4164
|
appearance-none
|
|
4165
|
+
m-0
|
|
4143
4166
|
rounded
|
|
4144
4167
|
bg-input-background
|
|
4145
4168
|
transition-colors
|
|
@@ -4150,11 +4173,8 @@ var Checkbox = memo3(
|
|
|
4150
4173
|
focus:ring-2
|
|
4151
4174
|
focus:ring-primary
|
|
4152
4175
|
focus:ring-offset-1
|
|
4176
|
+
focus:z-interactable
|
|
4153
4177
|
`,
|
|
4154
|
-
style: {
|
|
4155
|
-
width: "27px",
|
|
4156
|
-
...props.style
|
|
4157
|
-
},
|
|
4158
4178
|
...props
|
|
4159
4179
|
}
|
|
4160
4180
|
),
|
|
@@ -4170,10 +4190,9 @@ var Checkbox = memo3(
|
|
|
4170
4190
|
stroke-white
|
|
4171
4191
|
opacity-0
|
|
4172
4192
|
peer-checked:opacity-100
|
|
4193
|
+
z-label
|
|
4194
|
+
stroke-[1.3px]
|
|
4173
4195
|
`,
|
|
4174
|
-
style: {
|
|
4175
|
-
strokeWidth: "1.3"
|
|
4176
|
-
},
|
|
4177
4196
|
viewBox: "0 0 16 16",
|
|
4178
4197
|
fill: "none",
|
|
4179
4198
|
xmlns: "http://www.w3.org/2000/svg"
|
|
@@ -4292,6 +4311,244 @@ function useHover(props = {}) {
|
|
|
4292
4311
|
};
|
|
4293
4312
|
}
|
|
4294
4313
|
|
|
4314
|
+
// tailwind.config.ts
|
|
4315
|
+
var config = {
|
|
4316
|
+
content: ["./src/**/*.{ts,tsx}"],
|
|
4317
|
+
corePlugins: {
|
|
4318
|
+
// disables @tailwind base global styles
|
|
4319
|
+
preflight: false
|
|
4320
|
+
},
|
|
4321
|
+
theme: {
|
|
4322
|
+
extend: {
|
|
4323
|
+
colors: {
|
|
4324
|
+
"logo-fill": "var(--logo-fill)",
|
|
4325
|
+
"logo-highlight": "var(--logo-highlight)",
|
|
4326
|
+
background: "var(--background)",
|
|
4327
|
+
text: "var(--text)",
|
|
4328
|
+
"text-muted": "var(--text-muted)",
|
|
4329
|
+
"text-subtle": "var(--text-subtle)",
|
|
4330
|
+
"text-disabled": "var(--text-disabled)",
|
|
4331
|
+
"text-decorative-light": "var(--text-decorative-light)",
|
|
4332
|
+
"divider-subtle": "var(--divider-subtle)",
|
|
4333
|
+
divider: "var(--divider)",
|
|
4334
|
+
"divider-strong": "var(--divider-strong)",
|
|
4335
|
+
primary: "var(--primary)",
|
|
4336
|
+
"primary-light": "var(--primary-light)",
|
|
4337
|
+
"primary-pastel": "var(--primary-pastel)",
|
|
4338
|
+
secondary: "var(--secondary)",
|
|
4339
|
+
"secondary-light": "var(--secondary-light)",
|
|
4340
|
+
"secondary-pastel": "var(--secondary-pastel)",
|
|
4341
|
+
"secondary-bright": "var(--secondary-bright)",
|
|
4342
|
+
"input-background": "var(--input-background)",
|
|
4343
|
+
"input-background-light": "var(--input-background-light)",
|
|
4344
|
+
"code-background": "var(--code-background)",
|
|
4345
|
+
"code-background-dark": "var(--code-background-dark)",
|
|
4346
|
+
"selected-background": "var(--selected-background)",
|
|
4347
|
+
"breadcrumb-text": "var(--breadcrumb-text)",
|
|
4348
|
+
"breadcrumb-text-hover": "var(--breadcrumb-text-hover)",
|
|
4349
|
+
"breadcrumb-icon": "var(--breadcrumb-icon)",
|
|
4350
|
+
"canvas-background": "var(--canvas-background)",
|
|
4351
|
+
"canvas-grid": "var(--canvas-grid)",
|
|
4352
|
+
"sidebar-background": "var(--sidebar-background)",
|
|
4353
|
+
"sidebar-background-transparent": "var(--sidebar-background-transparent)",
|
|
4354
|
+
"popover-background": "var(--popover-background)",
|
|
4355
|
+
"popover-divider": "var(--popover-divider)",
|
|
4356
|
+
"listview-raised-background": "var(--listview-raised-background)",
|
|
4357
|
+
"listview-editing-background": "var(--listview-editing-background)",
|
|
4358
|
+
"slider-background": "var(--slider-background)",
|
|
4359
|
+
"slider-border": "var(--slider-border)",
|
|
4360
|
+
"radio-group-background": "var(--radio-group-background)",
|
|
4361
|
+
mask: "var(--mask)",
|
|
4362
|
+
"transparent-checker": "var(--transparent-checker)",
|
|
4363
|
+
scrollbar: "var(--scrollbar)",
|
|
4364
|
+
"placeholder-dots": "var(--placeholder-dots)",
|
|
4365
|
+
"drag-outline": "var(--drag-outline)",
|
|
4366
|
+
"active-background": "var(--active-background)",
|
|
4367
|
+
"thumbnail-background": "var(--thumbnail-background)",
|
|
4368
|
+
"thumbnail-shadow": "var(--thumbnail-shadow)",
|
|
4369
|
+
"inline-code-text": "var(--inline-code-text)",
|
|
4370
|
+
"inline-code-background": "var(--inline-code-background)",
|
|
4371
|
+
"text-link": "var(--text-link)",
|
|
4372
|
+
"text-link-focused": "var(--text-link-focused)",
|
|
4373
|
+
icon: "var(--icon)",
|
|
4374
|
+
"icon-selected": "var(--icon-selected)",
|
|
4375
|
+
warning: "var(--warning)",
|
|
4376
|
+
"radio-group-item": "var(--radio-group-item)",
|
|
4377
|
+
dot: "var(--dot)",
|
|
4378
|
+
"row-highlight": "var(--row-highlight)",
|
|
4379
|
+
"table-row-background": "var(--table-row-background)",
|
|
4380
|
+
"chip-primary-bg": "var(--chip-primary-bg)",
|
|
4381
|
+
"chip-secondary-bg": "var(--chip-secondary-bg)",
|
|
4382
|
+
"chip-error-bg": "var(--chip-error-bg)",
|
|
4383
|
+
"chip-default-bg": "var(--chip-default-bg)",
|
|
4384
|
+
"chip-primary-shadow": "var(--chip-primary-shadow)",
|
|
4385
|
+
"chip-secondary-shadow": "var(--chip-secondary-shadow)",
|
|
4386
|
+
"chip-error-shadow": "var(--chip-error-shadow)",
|
|
4387
|
+
"chip-default-shadow": "var(--chip-default-shadow)"
|
|
4388
|
+
},
|
|
4389
|
+
fontFamily: {
|
|
4390
|
+
sans: [
|
|
4391
|
+
"__Inter_6b0edc",
|
|
4392
|
+
"__Inter_Fallback_6b0edc",
|
|
4393
|
+
"-apple-system",
|
|
4394
|
+
"BlinkMacSystemFont",
|
|
4395
|
+
"Helvetica Neue",
|
|
4396
|
+
"Segoe UI",
|
|
4397
|
+
"Roboto",
|
|
4398
|
+
"Helvetica",
|
|
4399
|
+
"Arial",
|
|
4400
|
+
"sans-serif"
|
|
4401
|
+
],
|
|
4402
|
+
mono: ["Menlo", "Monaco", "Consolas", "Courier New", "monospace"]
|
|
4403
|
+
},
|
|
4404
|
+
// Type scale
|
|
4405
|
+
// The last one, 0.85, I just eyeballed
|
|
4406
|
+
// old: typeScale = [3.052, 2.441, 1.953, 1.563, 1.25, 1, 0.85]; // Major third
|
|
4407
|
+
fontSize: {
|
|
4408
|
+
title: [
|
|
4409
|
+
"3.052rem",
|
|
4410
|
+
{
|
|
4411
|
+
lineHeight: "1.4",
|
|
4412
|
+
letterSpacing: "-0.05em"
|
|
4413
|
+
}
|
|
4414
|
+
],
|
|
4415
|
+
subtitle: [
|
|
4416
|
+
"1.563rem",
|
|
4417
|
+
{
|
|
4418
|
+
lineHeight: "1.75",
|
|
4419
|
+
letterSpacing: "-0.05em"
|
|
4420
|
+
}
|
|
4421
|
+
],
|
|
4422
|
+
heading1: [
|
|
4423
|
+
"1.953rem",
|
|
4424
|
+
{
|
|
4425
|
+
lineHeight: "1.6",
|
|
4426
|
+
letterSpacing: "-0.025em"
|
|
4427
|
+
}
|
|
4428
|
+
],
|
|
4429
|
+
heading2: [
|
|
4430
|
+
"1.563rem",
|
|
4431
|
+
{
|
|
4432
|
+
lineHeight: "1.5",
|
|
4433
|
+
letterSpacing: "-0.025em"
|
|
4434
|
+
}
|
|
4435
|
+
],
|
|
4436
|
+
heading3: [
|
|
4437
|
+
"1.25rem",
|
|
4438
|
+
{
|
|
4439
|
+
lineHeight: "1.4",
|
|
4440
|
+
letterSpacing: "-0.025em"
|
|
4441
|
+
}
|
|
4442
|
+
],
|
|
4443
|
+
heading4: [
|
|
4444
|
+
"1rem",
|
|
4445
|
+
{
|
|
4446
|
+
lineHeight: "1.4"
|
|
4447
|
+
}
|
|
4448
|
+
],
|
|
4449
|
+
heading5: [
|
|
4450
|
+
"0.85rem",
|
|
4451
|
+
{
|
|
4452
|
+
lineHeight: "1.4"
|
|
4453
|
+
}
|
|
4454
|
+
],
|
|
4455
|
+
body: [
|
|
4456
|
+
"1",
|
|
4457
|
+
{
|
|
4458
|
+
lineHeight: "1.4"
|
|
4459
|
+
}
|
|
4460
|
+
],
|
|
4461
|
+
small: [
|
|
4462
|
+
"1",
|
|
4463
|
+
{
|
|
4464
|
+
lineHeight: "19px"
|
|
4465
|
+
}
|
|
4466
|
+
],
|
|
4467
|
+
code: [
|
|
4468
|
+
"90%",
|
|
4469
|
+
{
|
|
4470
|
+
lineHeight: "1.5"
|
|
4471
|
+
}
|
|
4472
|
+
],
|
|
4473
|
+
button: [
|
|
4474
|
+
"0.8rem",
|
|
4475
|
+
{
|
|
4476
|
+
lineHeight: "1.4",
|
|
4477
|
+
letterSpacing: "-0.2px"
|
|
4478
|
+
}
|
|
4479
|
+
],
|
|
4480
|
+
label: [
|
|
4481
|
+
"0.62rem",
|
|
4482
|
+
{
|
|
4483
|
+
lineHeight: "19px",
|
|
4484
|
+
letterSpacing: "-0.3px"
|
|
4485
|
+
}
|
|
4486
|
+
]
|
|
4487
|
+
},
|
|
4488
|
+
spacing: {
|
|
4489
|
+
nano: "2px",
|
|
4490
|
+
micro: "4px",
|
|
4491
|
+
small: "8px",
|
|
4492
|
+
medium: "16px",
|
|
4493
|
+
large: "32px",
|
|
4494
|
+
xlarge: "64px",
|
|
4495
|
+
xxlarge: "128px",
|
|
4496
|
+
"inset-top": "var(--inset-top)",
|
|
4497
|
+
"sidebar-width": "var(--sidebar-width)",
|
|
4498
|
+
"toolbar-height": "var(--toolbar-height)",
|
|
4499
|
+
"toolbar-separator": "var(--toolbar-separator)",
|
|
4500
|
+
"inspector-h-separator": "var(--inspector-h-separator)",
|
|
4501
|
+
"inspector-v-separator": "var(--inspector-v-separator)",
|
|
4502
|
+
"dialog-padding": "var(--dialog-padding)"
|
|
4503
|
+
},
|
|
4504
|
+
keyframes: {
|
|
4505
|
+
spin: {
|
|
4506
|
+
"0%": { transform: "rotate(0deg)" },
|
|
4507
|
+
"100%": { transform: "rotate(360deg)" }
|
|
4508
|
+
},
|
|
4509
|
+
shimmer: {
|
|
4510
|
+
"0%": {
|
|
4511
|
+
backgroundPosition: "-200% 0"
|
|
4512
|
+
},
|
|
4513
|
+
"100%": {
|
|
4514
|
+
backgroundPosition: "200% 0"
|
|
4515
|
+
}
|
|
4516
|
+
}
|
|
4517
|
+
},
|
|
4518
|
+
animation: {
|
|
4519
|
+
spin: "spin 1s linear infinite",
|
|
4520
|
+
shimmer: "shimmer 6s infinite linear"
|
|
4521
|
+
},
|
|
4522
|
+
zIndex: {
|
|
4523
|
+
interactable: "var(--interactable-z-index)",
|
|
4524
|
+
label: "var(--label-z-index)"
|
|
4525
|
+
}
|
|
4526
|
+
}
|
|
4527
|
+
},
|
|
4528
|
+
safelist: [
|
|
4529
|
+
"group",
|
|
4530
|
+
"group-hover:flex",
|
|
4531
|
+
"bg-row-highlight",
|
|
4532
|
+
"left-5",
|
|
4533
|
+
"right-6",
|
|
4534
|
+
"m-[0_-24px_0_-20px]",
|
|
4535
|
+
"p-[0_24px_0_20px]",
|
|
4536
|
+
"left-0",
|
|
4537
|
+
"border-divider-strong",
|
|
4538
|
+
"decoration-text-decorative-light",
|
|
4539
|
+
"underline",
|
|
4540
|
+
"-left-2.5",
|
|
4541
|
+
"-mr-2",
|
|
4542
|
+
"border-gray-200",
|
|
4543
|
+
"gap-1.5",
|
|
4544
|
+
"gap-toolbar-separator"
|
|
4545
|
+
]
|
|
4546
|
+
};
|
|
4547
|
+
var tailwind_config_default = config;
|
|
4548
|
+
|
|
4549
|
+
// src/theme/index.ts
|
|
4550
|
+
var cssVars = convertKebabToCamelCase(tailwind_config_default.theme.extend);
|
|
4551
|
+
|
|
4295
4552
|
// src/components/Chip.tsx
|
|
4296
4553
|
function getChipStyles({
|
|
4297
4554
|
$colorScheme,
|
|
@@ -4312,27 +4569,33 @@ function getChipStyles({
|
|
|
4312
4569
|
small: "text-[9px] p-[0px_4px]"
|
|
4313
4570
|
}[$size];
|
|
4314
4571
|
const fontStyles = $monospace ? "font-mono" : "";
|
|
4572
|
+
const shadowStyles = {
|
|
4573
|
+
primary: "shadow-[0_0_0_1px_var(--chip-primary-shadow)_inset]",
|
|
4574
|
+
secondary: "shadow-[0_0_0_1px_var(--chip-secondary-shadow)_inset]",
|
|
4575
|
+
error: "shadow-[0_0_0_1px_var(--chip-error-shadow)_inset]",
|
|
4576
|
+
default: "shadow-[0_0_0_1px_var(--chip-default-shadow)_inset]"
|
|
4577
|
+
};
|
|
4315
4578
|
const variantStyles2 = (() => {
|
|
4316
4579
|
const colors = {
|
|
4317
4580
|
primary: {
|
|
4318
4581
|
text: "text-primary",
|
|
4319
4582
|
bg: "bg-primary-pastel",
|
|
4320
|
-
subtle: "bg-[
|
|
4583
|
+
subtle: "bg-[var(--chip-primary-bg)]"
|
|
4321
4584
|
},
|
|
4322
4585
|
secondary: {
|
|
4323
4586
|
text: "text-secondary",
|
|
4324
4587
|
bg: "bg-secondary-pastel",
|
|
4325
|
-
subtle: "bg-[
|
|
4588
|
+
subtle: "bg-[var(--chip-secondary-bg)]"
|
|
4326
4589
|
},
|
|
4327
4590
|
error: {
|
|
4328
4591
|
text: "text-text",
|
|
4329
4592
|
bg: "bg-[rgb(255,219,219)]",
|
|
4330
|
-
subtle: "bg-[
|
|
4593
|
+
subtle: "bg-[var(--chip-error-bg)]"
|
|
4331
4594
|
},
|
|
4332
4595
|
default: {
|
|
4333
4596
|
text: "text-text",
|
|
4334
4597
|
bg: "bg-input-background",
|
|
4335
|
-
subtle: "bg-[
|
|
4598
|
+
subtle: "bg-[var(--chip-default-bg)]"
|
|
4336
4599
|
}
|
|
4337
4600
|
}[$colorScheme ?? "default"];
|
|
4338
4601
|
if ($variant === "solid") {
|
|
@@ -4341,7 +4604,7 @@ function getChipStyles({
|
|
|
4341
4604
|
if ($variant === "outlined") {
|
|
4342
4605
|
return `
|
|
4343
4606
|
${colors.text} bg-transparent
|
|
4344
|
-
|
|
4607
|
+
${shadowStyles[$colorScheme ?? "default"]}
|
|
4345
4608
|
hover:${colors.subtle} hover:shadow-none
|
|
4346
4609
|
`;
|
|
4347
4610
|
}
|
|
@@ -4394,7 +4657,7 @@ var Chip = memo4(
|
|
|
4394
4657
|
onHoverChange: onHoverDeleteChange
|
|
4395
4658
|
});
|
|
4396
4659
|
const handleClick = !children2 && !deletable && addable ? onAdd : onClick;
|
|
4397
|
-
const color = colorScheme === "primary" ?
|
|
4660
|
+
const color = colorScheme === "primary" ? cssVars.colors.primary : colorScheme === "secondary" ? cssVars.colors.secondary : cssVars.colors.text;
|
|
4398
4661
|
return /* @__PURE__ */ React8.createElement(
|
|
4399
4662
|
"span",
|
|
4400
4663
|
{
|
|
@@ -4519,7 +4782,7 @@ var IconButton = memo5(
|
|
|
4519
4782
|
return /* @__PURE__ */ React11.createElement(Button, { ref: forwardedRef, ...props, variant: "none", contentStyle: style5 }, /* @__PURE__ */ React11.createElement(
|
|
4520
4783
|
Icon,
|
|
4521
4784
|
{
|
|
4522
|
-
color: color ?? (selected ?
|
|
4785
|
+
color: color ?? (selected ? cssVars.colors.iconSelected : cssVars.colors.icon),
|
|
4523
4786
|
...size3 && { width: size3, height: size3 }
|
|
4524
4787
|
}
|
|
4525
4788
|
));
|
|
@@ -4991,6 +5254,7 @@ import React20, {
|
|
|
4991
5254
|
useCallback as useCallback11,
|
|
4992
5255
|
useContext as useContext2,
|
|
4993
5256
|
useEffect as useEffect11,
|
|
5257
|
+
useId,
|
|
4994
5258
|
useLayoutEffect as useLayoutEffect4,
|
|
4995
5259
|
useMemo as useMemo7,
|
|
4996
5260
|
useRef as useRef12,
|
|
@@ -5214,7 +5478,8 @@ var ReadOnlyTextInput = forwardRef10(function ReadOnlyTextInput2({ onKeyDown, on
|
|
|
5214
5478
|
...rest,
|
|
5215
5479
|
value,
|
|
5216
5480
|
onKeyDown,
|
|
5217
|
-
readOnly: true
|
|
5481
|
+
readOnly: true,
|
|
5482
|
+
className: "focus:z-interactable"
|
|
5218
5483
|
}
|
|
5219
5484
|
);
|
|
5220
5485
|
});
|
|
@@ -5452,31 +5717,35 @@ var InputFieldContext = createContext2({
|
|
|
5452
5717
|
onFocusChange: () => {
|
|
5453
5718
|
}
|
|
5454
5719
|
});
|
|
5455
|
-
var LabelContainer = forwardRef11(
|
|
5456
|
-
|
|
5457
|
-
|
|
5720
|
+
var LabelContainer = forwardRef11(function LabelContainer2({
|
|
5721
|
+
labelPosition: $labelPosition,
|
|
5722
|
+
hasDropdown: $hasDropdown,
|
|
5723
|
+
size: $size,
|
|
5724
|
+
className,
|
|
5725
|
+
style: style5,
|
|
5726
|
+
...props
|
|
5727
|
+
}, ref) {
|
|
5728
|
+
const memoizedStyles = useMemo7(
|
|
5729
|
+
() => ({
|
|
5458
5730
|
left: $labelPosition === "start" ? $size === "large" ? "6px" : $size === "medium" ? "2px" : "0px" : "",
|
|
5459
|
-
right: $labelPosition === "end" ? $size === "large" ? "6px" : $size === "medium" ? "2px" : "0px" : ""
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
}
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5731
|
+
right: $labelPosition === "end" ? $size === "large" ? "6px" : $size === "medium" ? "2px" : "0px" : "",
|
|
5732
|
+
...style5
|
|
5733
|
+
}),
|
|
5734
|
+
[$labelPosition, $size, style5]
|
|
5735
|
+
);
|
|
5736
|
+
return /* @__PURE__ */ React20.createElement(
|
|
5737
|
+
"label",
|
|
5738
|
+
{
|
|
5739
|
+
ref,
|
|
5740
|
+
className: `absolute top-0 bottom-0 flex items-center font-sans text-label font-bold uppercase text-text-disabled select-none z-label pointer-events-none ${$labelPosition === "start" ? `justify-start pl-[6px]` : $labelPosition === "end" ? `justify-end ${$hasDropdown ? "pr-[16px]" : "pr-[6px]"}` : ""} ${className ?? ""}`,
|
|
5741
|
+
style: memoizedStyles,
|
|
5742
|
+
...props
|
|
5743
|
+
}
|
|
5744
|
+
);
|
|
5745
|
+
});
|
|
5472
5746
|
var InputFieldLabel = memo9(
|
|
5473
|
-
forwardRef11(function InputFieldLabel2({
|
|
5474
|
-
|
|
5475
|
-
pointerEvents = "none",
|
|
5476
|
-
style: style5,
|
|
5477
|
-
className
|
|
5478
|
-
}, forwardedRef) {
|
|
5479
|
-
const { labelPosition, hasDropdown, setLabelWidth, size: size3 } = useContext2(InputFieldContext);
|
|
5747
|
+
forwardRef11(function InputFieldLabel2(props, forwardedRef) {
|
|
5748
|
+
const { labelPosition, hasDropdown, setLabelWidth, size: size3, id } = useContext2(InputFieldContext);
|
|
5480
5749
|
const ref = useRef12(null);
|
|
5481
5750
|
useLayoutEffect4(() => {
|
|
5482
5751
|
if (!setLabelWidth) return;
|
|
@@ -5487,18 +5756,16 @@ var InputFieldLabel = memo9(
|
|
|
5487
5756
|
return /* @__PURE__ */ React20.createElement(
|
|
5488
5757
|
LabelContainer,
|
|
5489
5758
|
{
|
|
5490
|
-
$size: size3,
|
|
5491
5759
|
ref: (element) => {
|
|
5492
5760
|
ref.current = element;
|
|
5493
5761
|
assignRef(forwardedRef, element);
|
|
5494
5762
|
},
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
}
|
|
5501
|
-
children2
|
|
5763
|
+
size: size3,
|
|
5764
|
+
labelPosition,
|
|
5765
|
+
hasDropdown,
|
|
5766
|
+
htmlFor: id,
|
|
5767
|
+
...props
|
|
5768
|
+
}
|
|
5502
5769
|
);
|
|
5503
5770
|
})
|
|
5504
5771
|
);
|
|
@@ -5603,10 +5870,13 @@ var InputElement = forwardRef11(
|
|
|
5603
5870
|
}, ref) => {
|
|
5604
5871
|
const paddingLeft = ($size === "large" ? 10 : $size === "medium" ? 6 : 4) + ($labelSize && $labelPosition === "start" ? 6 + $labelSize : 0);
|
|
5605
5872
|
const paddingRight = ($size === "large" ? 10 : $size === "medium" ? 6 : 1) + ($labelSize && $labelPosition === "end" ? 6 + $labelSize : 0) + ($hasDropdown ? 11 : 0);
|
|
5606
|
-
const memoizedStyles = useMemo7(
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5873
|
+
const memoizedStyles = useMemo7(
|
|
5874
|
+
() => ({
|
|
5875
|
+
paddingLeft: `${paddingLeft}px`,
|
|
5876
|
+
paddingRight: `${paddingRight}px`
|
|
5877
|
+
}),
|
|
5878
|
+
[paddingLeft, paddingRight]
|
|
5879
|
+
);
|
|
5610
5880
|
return /* @__PURE__ */ React20.createElement(
|
|
5611
5881
|
TextInput_default,
|
|
5612
5882
|
{
|
|
@@ -5614,7 +5884,7 @@ var InputElement = forwardRef11(
|
|
|
5614
5884
|
onSubmit: onSubmit ?? (() => {
|
|
5615
5885
|
}),
|
|
5616
5886
|
ref,
|
|
5617
|
-
className: `flex w-0 flex-[1_1_0px] relative border-0 outline-none min-w-0 self-stretch rounded bg-input-background focus:ring-2 focus:ring-primary
|
|
5887
|
+
className: `flex w-0 flex-[1_1_0px] relative border-0 outline-none min-w-0 self-stretch rounded bg-input-background focus:ring-2 focus:ring-primary placeholder:text-text-disabled ${readOnly ? "text-text-muted" : disabled ? "text-text-disabled" : "text-text"} font-sans font-normal ${$textAlign && `text-${$textAlign}`} ${$size === "small" ? "text-[11px] leading-[19px] py-[1px]" : $size === "large" ? "py-[10px] text-heading5" : $size === "medium" ? "py-1 text-heading5" : $variant === "bare" && "p-1 -m-1"} ${className ?? ""}`,
|
|
5618
5888
|
style: memoizedStyles,
|
|
5619
5889
|
...props
|
|
5620
5890
|
}
|
|
@@ -5629,7 +5899,8 @@ var InputFieldInput = forwardRef11(function InputFieldInput2({ textAlign, varian
|
|
|
5629
5899
|
buttonSize,
|
|
5630
5900
|
size: size3,
|
|
5631
5901
|
onFocusChange,
|
|
5632
|
-
setInputRef
|
|
5902
|
+
setInputRef,
|
|
5903
|
+
id
|
|
5633
5904
|
} = useContext2(InputFieldContext);
|
|
5634
5905
|
const handleFocusChange = useCallback11(
|
|
5635
5906
|
(isFocused) => {
|
|
@@ -5651,6 +5922,7 @@ var InputFieldInput = forwardRef11(function InputFieldInput2({ textAlign, varian
|
|
|
5651
5922
|
$variant: variant,
|
|
5652
5923
|
$textAlign: textAlign,
|
|
5653
5924
|
onFocusChange: handleFocusChange,
|
|
5925
|
+
id,
|
|
5654
5926
|
...rest
|
|
5655
5927
|
}
|
|
5656
5928
|
);
|
|
@@ -5765,6 +6037,7 @@ function InputFieldRoot({
|
|
|
5765
6037
|
className
|
|
5766
6038
|
}) {
|
|
5767
6039
|
const childrenArray = Children.toArray(children2);
|
|
6040
|
+
const randomId = useId();
|
|
5768
6041
|
const hasDropdown = childrenArray.some(
|
|
5769
6042
|
(child) => isValidElement(child) && child.type === InputFieldDropdownMenu
|
|
5770
6043
|
);
|
|
@@ -5799,7 +6072,8 @@ function InputFieldRoot({
|
|
|
5799
6072
|
inputRef,
|
|
5800
6073
|
setInputRef,
|
|
5801
6074
|
setLabelWidth: setMeasuredLabelSize,
|
|
5802
|
-
setButtonWidth: setMeasuredButtonSize
|
|
6075
|
+
setButtonWidth: setMeasuredButtonSize,
|
|
6076
|
+
id: id ?? randomId
|
|
5803
6077
|
}),
|
|
5804
6078
|
[
|
|
5805
6079
|
labelPosition,
|
|
@@ -5810,13 +6084,14 @@ function InputFieldRoot({
|
|
|
5810
6084
|
size3,
|
|
5811
6085
|
isFocused,
|
|
5812
6086
|
handleFocusChange,
|
|
5813
|
-
inputRef
|
|
6087
|
+
inputRef,
|
|
6088
|
+
id,
|
|
6089
|
+
randomId
|
|
5814
6090
|
]
|
|
5815
6091
|
);
|
|
5816
6092
|
const rootElement = /* @__PURE__ */ React20.createElement(
|
|
5817
6093
|
RootContainer,
|
|
5818
6094
|
{
|
|
5819
|
-
id,
|
|
5820
6095
|
$width: width,
|
|
5821
6096
|
$flex: flex,
|
|
5822
6097
|
style: style5,
|
|
@@ -5851,7 +6126,7 @@ var PrimitiveInputField = ({
|
|
|
5851
6126
|
}) => /* @__PURE__ */ React20.createElement(
|
|
5852
6127
|
"input",
|
|
5853
6128
|
{
|
|
5854
|
-
className: `flex w-0 flex-1 relative border-none outline-none min-w-0 self-stretch rounded py-1 px-1.5 bg-input-background select-all pointer-events-[all] focus:ring-2 focus:ring-primary
|
|
6129
|
+
className: `flex w-0 flex-1 relative border-none outline-none min-w-0 self-stretch rounded py-1 px-1.5 bg-input-background select-all pointer-events-[all] focus:ring-2 focus:ring-primary font-sans font-normal text-heading5 placeholder:text-text-disabled focus:z-interactable ${readOnly ? "text-text-muted" : disabled ? "text-text-disabled" : "text-text"} ${className ?? ""}`,
|
|
5855
6130
|
...props
|
|
5856
6131
|
}
|
|
5857
6132
|
);
|
|
@@ -6388,13 +6663,13 @@ var DraggableMenuButton = memo14(function DraggableMenuButton2({
|
|
|
6388
6663
|
/* @__PURE__ */ React27.createElement(Trigger5, null, /* @__PURE__ */ React27.createElement(
|
|
6389
6664
|
DragHandleDots2Icon,
|
|
6390
6665
|
{
|
|
6391
|
-
color: isVisible || open ?
|
|
6666
|
+
color: isVisible || open ? cssVars.colors.icon : "transparent"
|
|
6392
6667
|
}
|
|
6393
6668
|
))
|
|
6394
6669
|
) : /* @__PURE__ */ React27.createElement(
|
|
6395
6670
|
DragHandleDots2Icon,
|
|
6396
6671
|
{
|
|
6397
|
-
color: isVisible || open ?
|
|
6672
|
+
color: isVisible || open ? cssVars.colors.icon : "transparent"
|
|
6398
6673
|
}
|
|
6399
6674
|
)
|
|
6400
6675
|
);
|
|
@@ -6819,7 +7094,9 @@ var dotsHorizontalSvg = (fillColor) => `
|
|
|
6819
7094
|
<path d='M3.625 7.5C3.625 8.12132 3.12132 8.625 2.5 8.625C1.87868 8.625 1.375 8.12132 1.375 7.5C1.375 6.87868 1.87868 6.375 2.5 6.375C3.12132 6.375 3.625 6.87868 3.625 7.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM12.5 8.625C13.1213 8.625 13.625 8.12132 13.625 7.5C13.625 6.87868 13.1213 6.375 12.5 6.375C11.8787 6.375 11.375 6.87868 11.375 7.5C11.375 8.12132 11.8787 8.625 12.5 8.625Z'></path>
|
|
6820
7095
|
</svg>
|
|
6821
7096
|
`;
|
|
6822
|
-
var Background = memo16(function Background2({
|
|
7097
|
+
var Background = memo16(function Background2({
|
|
7098
|
+
background: background2
|
|
7099
|
+
}) {
|
|
6823
7100
|
return /* @__PURE__ */ React29.createElement(
|
|
6824
7101
|
"span",
|
|
6825
7102
|
{
|
|
@@ -6876,17 +7153,12 @@ var GradientPreviewBackground = memo16(function GradientPreviewBackground2({
|
|
|
6876
7153
|
return /* @__PURE__ */ React29.createElement(Background, { background: background2 });
|
|
6877
7154
|
});
|
|
6878
7155
|
var background = `center url("data:image/svg+xml;utf8,${dotsHorizontalSvg(
|
|
6879
|
-
|
|
7156
|
+
cssVars.colors.placeholderDots
|
|
6880
7157
|
)}") no-repeat`;
|
|
6881
7158
|
var FillPreviewBackground = memo16(function FillPreviewBackground2({
|
|
6882
7159
|
value
|
|
6883
7160
|
}) {
|
|
6884
|
-
if (!value) return /* @__PURE__ */ React29.createElement(
|
|
6885
|
-
Background,
|
|
6886
|
-
{
|
|
6887
|
-
background
|
|
6888
|
-
}
|
|
6889
|
-
);
|
|
7161
|
+
if (!value) return /* @__PURE__ */ React29.createElement(Background, { background });
|
|
6890
7162
|
switch (value._class) {
|
|
6891
7163
|
case "color":
|
|
6892
7164
|
return /* @__PURE__ */ React29.createElement(ColorPreviewBackground, { color: value });
|
|
@@ -7158,8 +7430,8 @@ var FloatingWindow = ({
|
|
|
7158
7430
|
left: position.x,
|
|
7159
7431
|
width: size3.width,
|
|
7160
7432
|
height: size3.height,
|
|
7161
|
-
outline: `1px solid
|
|
7162
|
-
backgroundColor:
|
|
7433
|
+
outline: `1px solid ${cssVars.colors.divider}`,
|
|
7434
|
+
backgroundColor: cssVars.colors.canvasBackground
|
|
7163
7435
|
}
|
|
7164
7436
|
},
|
|
7165
7437
|
/* @__PURE__ */ React31.createElement(
|
|
@@ -7167,7 +7439,7 @@ var FloatingWindow = ({
|
|
|
7167
7439
|
{
|
|
7168
7440
|
style: {
|
|
7169
7441
|
...styles2.toolbar,
|
|
7170
|
-
backgroundColor:
|
|
7442
|
+
backgroundColor: cssVars.colors.sidebarBackground
|
|
7171
7443
|
},
|
|
7172
7444
|
onMouseDown: handleMouseDown
|
|
7173
7445
|
},
|
|
@@ -15024,21 +15296,6 @@ function getPositionMargin(marginType) {
|
|
|
15024
15296
|
bottom: marginType === "bottom" || marginType === "vertical" ? 8 : 0
|
|
15025
15297
|
};
|
|
15026
15298
|
}
|
|
15027
|
-
var theme = {
|
|
15028
|
-
colors: {
|
|
15029
|
-
textMuted: "var(--text-muted)",
|
|
15030
|
-
listView: {
|
|
15031
|
-
raisedBackground: "var(--listview-raised-background)"
|
|
15032
|
-
},
|
|
15033
|
-
secondary: "var(--secondary)",
|
|
15034
|
-
primary: "var(--primary)",
|
|
15035
|
-
textDisabled: "var(--text-disabled)",
|
|
15036
|
-
primaryLight: "var(--primary-light)",
|
|
15037
|
-
secondaryLight: "var(--secondary-light)",
|
|
15038
|
-
activeBackground: "var(--active-background)",
|
|
15039
|
-
dividerSubtle: "var(--divider-subtle)"
|
|
15040
|
-
}
|
|
15041
|
-
};
|
|
15042
15299
|
var RowContainer = forwardRef15(
|
|
15043
15300
|
({
|
|
15044
15301
|
className,
|
|
@@ -15056,6 +15313,8 @@ var RowContainer = forwardRef15(
|
|
|
15056
15313
|
$gap,
|
|
15057
15314
|
$backgroundColor,
|
|
15058
15315
|
style: style5,
|
|
15316
|
+
"aria-describedby": _,
|
|
15317
|
+
// Causes hydration warning
|
|
15059
15318
|
...props
|
|
15060
15319
|
}, ref) => {
|
|
15061
15320
|
const margin = getPositionMargin($marginType);
|
|
@@ -15083,19 +15342,19 @@ var RowContainer = forwardRef15(
|
|
|
15083
15342
|
marginBottom: `${margin.bottom}px`
|
|
15084
15343
|
}
|
|
15085
15344
|
},
|
|
15086
|
-
color:
|
|
15345
|
+
color: cssVars.colors.textMuted,
|
|
15087
15346
|
...$isSectionHeader && {
|
|
15088
|
-
backgroundColor:
|
|
15347
|
+
backgroundColor: cssVars.colors.listviewRaisedBackground,
|
|
15089
15348
|
...$sectionHeaderVariant === "label" && {
|
|
15090
|
-
color:
|
|
15349
|
+
color: cssVars.colors.textDisabled
|
|
15091
15350
|
}
|
|
15092
15351
|
},
|
|
15093
15352
|
...$disabled && {
|
|
15094
|
-
color:
|
|
15353
|
+
color: cssVars.colors.textDisabled
|
|
15095
15354
|
},
|
|
15096
15355
|
...$selected && {
|
|
15097
15356
|
color: "white",
|
|
15098
|
-
backgroundColor:
|
|
15357
|
+
backgroundColor: cssVars.colors[$colorScheme]
|
|
15099
15358
|
},
|
|
15100
15359
|
display: "flex",
|
|
15101
15360
|
alignItems: "center",
|
|
@@ -15109,15 +15368,15 @@ var RowContainer = forwardRef15(
|
|
|
15109
15368
|
},
|
|
15110
15369
|
position: "relative",
|
|
15111
15370
|
...$hovered && {
|
|
15112
|
-
boxShadow: `0 0 0 1px ${
|
|
15371
|
+
boxShadow: `0 0 0 1px ${cssVars.colors[$colorScheme]} inset`
|
|
15113
15372
|
},
|
|
15114
15373
|
...$showsActiveState && {
|
|
15115
15374
|
"&:active": {
|
|
15116
|
-
backgroundColor: $selected ? $colorScheme === "secondary" ?
|
|
15375
|
+
backgroundColor: $selected ? $colorScheme === "secondary" ? cssVars.colors.secondaryLight : cssVars.colors.primaryLight : cssVars.colors.activeBackground
|
|
15117
15376
|
}
|
|
15118
15377
|
},
|
|
15119
15378
|
...$divider && {
|
|
15120
|
-
borderBottom: `1px solid ${
|
|
15379
|
+
borderBottom: `1px solid ${cssVars.colors.dividerSubtle}`
|
|
15121
15380
|
},
|
|
15122
15381
|
...$backgroundColor && {
|
|
15123
15382
|
backgroundColor: $backgroundColor,
|
|
@@ -15157,14 +15416,14 @@ var ListViewDragIndicatorElement = forwardRef15(
|
|
|
15157
15416
|
borderRadius: "3px",
|
|
15158
15417
|
...$relativeDropPosition === "inside" ? {
|
|
15159
15418
|
inset: 2,
|
|
15160
|
-
boxShadow: `0 0 0 1px
|
|
15419
|
+
boxShadow: `0 0 0 1px ${cssVars.colors.sidebarBackground}, 0 0 0 3px ${$colorScheme === "secondary" ? cssVars.colors.secondary : cssVars.colors.dragOutline}`
|
|
15161
15420
|
} : {
|
|
15162
15421
|
top: $relativeDropPosition === "above" ? -(3 + $gap / 2) : void 0,
|
|
15163
15422
|
bottom: $relativeDropPosition === "below" ? -(3 + $gap / 2) : void 0,
|
|
15164
15423
|
left: $offsetLeft,
|
|
15165
15424
|
right: 0,
|
|
15166
15425
|
height: 6,
|
|
15167
|
-
backgroundColor: $colorScheme === "secondary" ?
|
|
15426
|
+
backgroundColor: $colorScheme === "secondary" ? cssVars.colors.secondary : cssVars.colors.primary,
|
|
15168
15427
|
border: `2px solid white`,
|
|
15169
15428
|
boxShadow: "0 0 2px rgba(0,0,0,0.5)"
|
|
15170
15429
|
},
|
|
@@ -15998,7 +16257,7 @@ var InspectorContainer = memo24(
|
|
|
15998
16257
|
display: "flex",
|
|
15999
16258
|
flexDirection: "column",
|
|
16000
16259
|
position: "relative",
|
|
16001
|
-
background:
|
|
16260
|
+
background: cssVars.colors.sidebarBackground,
|
|
16002
16261
|
...style5
|
|
16003
16262
|
}
|
|
16004
16263
|
},
|
|
@@ -16016,7 +16275,7 @@ var Label = memo25(
|
|
|
16016
16275
|
"label",
|
|
16017
16276
|
{
|
|
16018
16277
|
ref,
|
|
16019
|
-
className: `font-sans text-label uppercase flex items-center leading-[19px] select-none font-bold text-text-muted ${className ?? ""}`,
|
|
16278
|
+
className: `font-sans text-label uppercase flex items-center leading-[19px] select-none font-bold text-text-muted z-label ${className ?? ""}`,
|
|
16020
16279
|
...props
|
|
16021
16280
|
}
|
|
16022
16281
|
);
|
|
@@ -16178,7 +16437,7 @@ var ToggleGroupItem = forwardRef19(function ToggleGroupItem2({ value, tooltip, c
|
|
|
16178
16437
|
ref: forwardedRef,
|
|
16179
16438
|
value,
|
|
16180
16439
|
disabled,
|
|
16181
|
-
className: `font-sans text-heading5 font-normal relative flex-1 appearance-none border-none bg-none text-radio-group-item p-0 m-0 rounded inline-flex items-center justify-center align-middle focus:outline-none focus:shadow-[0_0_0_1px_var(--sidebar-background),0_0_0_3px_${colorScheme === "secondary" ? "var(--secondary)" : "var(--primary)"}] aria-checked:bg-${colorScheme ? colorScheme : "radio-group-background"} aria-checked:text-${colorScheme ? "radio-group-background" : "text"} aria-checked:shadow-${colorScheme ? "none" : "0_1px_1px_rgba(0,0,0,0.1)"}`
|
|
16440
|
+
className: `font-sans text-heading5 font-normal relative flex-1 appearance-none border-none bg-none text-radio-group-item p-0 m-0 rounded inline-flex items-center justify-center align-middle focus:outline-none focus:shadow-[0_0_0_1px_var(--sidebar-background),0_0_0_3px_${colorScheme === "secondary" ? "var(--secondary)" : "var(--primary)"}] aria-checked:bg-${colorScheme ? colorScheme : "radio-group-background"} aria-checked:text-${colorScheme ? "radio-group-background" : "text"} aria-checked:shadow-${colorScheme ? "none" : "0_1px_1px_rgba(0,0,0,0.1)"} focus:z-interactable`
|
|
16182
16441
|
},
|
|
16183
16442
|
children2
|
|
16184
16443
|
);
|
|
@@ -16233,7 +16492,7 @@ var readOnlyStyle = {
|
|
|
16233
16492
|
justifyContent: "flex-start",
|
|
16234
16493
|
textAlign: "left"
|
|
16235
16494
|
};
|
|
16236
|
-
var labelStyles = `font-sans text-label uppercase text-text-disabled leading-[19px] font-bold text-[60%] pointer-events-none flex items-center mr-1.5`;
|
|
16495
|
+
var labelStyles = `font-sans text-label uppercase text-text-disabled leading-[19px] font-bold text-[60%] pointer-events-none flex items-center mr-1.5 z-label`;
|
|
16237
16496
|
var scrollButtonStyles = `
|
|
16238
16497
|
flex
|
|
16239
16498
|
items-center
|
|
@@ -16267,7 +16526,7 @@ var SelectMenu = memo28(function SelectMenu2({
|
|
|
16267
16526
|
id,
|
|
16268
16527
|
style: style5,
|
|
16269
16528
|
contentStyle: readOnlyStyle,
|
|
16270
|
-
className: `${className ?? ""} flex-1`,
|
|
16529
|
+
className: `${className ?? ""} flex-1 focus:z-interactable`,
|
|
16271
16530
|
disabled
|
|
16272
16531
|
},
|
|
16273
16532
|
icon && /* @__PURE__ */ React64.createElement(React64.Fragment, null, renderIcon(icon), /* @__PURE__ */ React64.createElement(Spacer.Horizontal, { inline: true, size: 6 })),
|
|
@@ -16281,7 +16540,7 @@ var SelectMenu = memo28(function SelectMenu2({
|
|
|
16281
16540
|
{
|
|
16282
16541
|
id,
|
|
16283
16542
|
style: style5,
|
|
16284
|
-
className: `${className ?? "w-full"} flex-1`,
|
|
16543
|
+
className: `${className ?? "w-full"} flex-1 focus:z-interactable`,
|
|
16285
16544
|
disabled
|
|
16286
16545
|
},
|
|
16287
16546
|
icon && /* @__PURE__ */ React64.createElement(React64.Fragment, null, renderIcon(icon), /* @__PURE__ */ React64.createElement(Spacer.Horizontal, { inline: true, size: 6 })),
|
|
@@ -16377,7 +16636,7 @@ var Switch = function Switch2({
|
|
|
16377
16636
|
onCheckedChange: (newValue) => {
|
|
16378
16637
|
onChange(newValue);
|
|
16379
16638
|
},
|
|
16380
|
-
className: `all-unset w-8 h-[19px] bg-active-background rounded-full relative cursor-pointer [webkit-tap-highlight-color:rgba(0,0,0,0)] focus:ring-2 focus:ring-primary focus:ring-offset-[1px] outline-none data-[state=checked]:bg-primary ${colorScheme === "secondary" && "data-[state=checked]:bg-secondary"}`
|
|
16639
|
+
className: `all-unset w-8 h-[19px] bg-active-background rounded-full relative cursor-pointer [webkit-tap-highlight-color:rgba(0,0,0,0)] focus:ring-2 focus:ring-primary focus:ring-offset-[1px] outline-none data-[state=checked]:bg-primary ${colorScheme === "secondary" && "data-[state=checked]:bg-secondary"} focus:z-interactable`
|
|
16381
16640
|
},
|
|
16382
16641
|
/* @__PURE__ */ React66.createElement(SwitchPrimitive.Thumb, { className: "block w-[15px] h-[15px] bg-white rounded-full transition-transform translate-x-[2px] data-[state=checked]:translate-x-[15px]" })
|
|
16383
16642
|
);
|
|
@@ -16416,7 +16675,7 @@ var AutoResizingTextArea = memo29(
|
|
|
16416
16675
|
return /* @__PURE__ */ React67.createElement(
|
|
16417
16676
|
"textarea",
|
|
16418
16677
|
{
|
|
16419
|
-
className: `font-sans text-heading5 font-normal text-text bg-input-background w-0 flex-1 py-1 px-1.5 border-none outline-none h-[100px] rounded-4 resize-none placeholder:text-text-disabled focus:ring-2 focus:ring-primary
|
|
16678
|
+
className: `font-sans text-heading5 font-normal text-text bg-input-background w-0 flex-1 py-1 px-1.5 border-none outline-none h-[100px] rounded-4 resize-none placeholder:text-text-disabled focus:ring-2 focus:ring-primary read-only:text-text-disabled focus:z-interactable ${className ?? ""}`,
|
|
16420
16679
|
ref: handleRef,
|
|
16421
16680
|
...rest,
|
|
16422
16681
|
onChange: handleChange,
|
|
@@ -16713,7 +16972,7 @@ var WorkspaceLayoutWithTheme = forwardRef22(function WorkspaceLayoutWithTheme2({
|
|
|
16713
16972
|
id,
|
|
16714
16973
|
className,
|
|
16715
16974
|
style: {
|
|
16716
|
-
backgroundColor:
|
|
16975
|
+
backgroundColor: cssVars.colors.canvasBackground,
|
|
16717
16976
|
display: "flex",
|
|
16718
16977
|
flexDirection: "row",
|
|
16719
16978
|
...style5
|
|
@@ -16752,7 +17011,7 @@ var WorkspaceLayoutWithTheme = forwardRef22(function WorkspaceLayoutWithTheme2({
|
|
|
16752
17011
|
cursor: "col-resize",
|
|
16753
17012
|
width: "1px",
|
|
16754
17013
|
height: "100%",
|
|
16755
|
-
backgroundColor:
|
|
17014
|
+
backgroundColor: cssVars.colors.divider
|
|
16756
17015
|
}
|
|
16757
17016
|
}
|
|
16758
17017
|
)),
|
|
@@ -16778,7 +17037,7 @@ var WorkspaceLayoutWithTheme = forwardRef22(function WorkspaceLayoutWithTheme2({
|
|
|
16778
17037
|
cursor: "col-resize",
|
|
16779
17038
|
width: "1px",
|
|
16780
17039
|
height: "100%",
|
|
16781
|
-
backgroundColor:
|
|
17040
|
+
backgroundColor: cssVars.colors.divider
|
|
16782
17041
|
}
|
|
16783
17042
|
}
|
|
16784
17043
|
), /* @__PURE__ */ React70.createElement(
|
|
@@ -16922,7 +17181,10 @@ __export(InspectorPrimitives_exports, {
|
|
|
16922
17181
|
Title: () => Title3,
|
|
16923
17182
|
VerticalSeparator: () => VerticalSeparator
|
|
16924
17183
|
});
|
|
16925
|
-
import React72, {
|
|
17184
|
+
import React72, {
|
|
17185
|
+
forwardRef as forwardRef23,
|
|
17186
|
+
memo as memo32
|
|
17187
|
+
} from "react";
|
|
16926
17188
|
var Section2 = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React72.createElement(
|
|
16927
17189
|
"div",
|
|
16928
17190
|
{
|
|
@@ -16961,7 +17223,7 @@ var Checkbox3 = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ R
|
|
|
16961
17223
|
{
|
|
16962
17224
|
ref,
|
|
16963
17225
|
type: "checkbox",
|
|
16964
|
-
className: cn("m-0", className),
|
|
17226
|
+
className: cn("m-0 focus:z-interactable", className),
|
|
16965
17227
|
...props
|
|
16966
17228
|
}
|
|
16967
17229
|
));
|
|
@@ -16975,12 +17237,16 @@ var Text3 = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React
|
|
|
16975
17237
|
));
|
|
16976
17238
|
var VerticalSeparator = () => /* @__PURE__ */ React72.createElement(Spacer.Vertical, { size: "inspector-v-separator" });
|
|
16977
17239
|
var HorizontalSeparator = () => /* @__PURE__ */ React72.createElement(Spacer.Horizontal, { size: "inspector-h-separator" });
|
|
16978
|
-
var RowLabel = forwardRef23(function RowLabel2({
|
|
17240
|
+
var RowLabel = forwardRef23(function RowLabel2({
|
|
17241
|
+
className,
|
|
17242
|
+
$textStyle,
|
|
17243
|
+
...props
|
|
17244
|
+
}, ref) {
|
|
16979
17245
|
return /* @__PURE__ */ React72.createElement(
|
|
16980
|
-
"
|
|
17246
|
+
"label",
|
|
16981
17247
|
{
|
|
16982
17248
|
ref,
|
|
16983
|
-
className: `font-sans text-label uppercase flex items-center leading-[19px] font-bold text-text-subtle ${$textStyle
|
|
17249
|
+
className: `font-sans text-label uppercase flex items-center leading-[19px] font-bold text-text-subtle z-label ${$textStyle ? textStyles[$textStyle] : ""} ${className ?? ""}`,
|
|
16984
17250
|
...props
|
|
16985
17251
|
}
|
|
16986
17252
|
);
|
|
@@ -17065,6 +17331,7 @@ export {
|
|
|
17065
17331
|
WorkspaceLayout,
|
|
17066
17332
|
cn,
|
|
17067
17333
|
createSectionedMenu,
|
|
17334
|
+
cssVars,
|
|
17068
17335
|
fuzzyFilter,
|
|
17069
17336
|
fuzzyScore,
|
|
17070
17337
|
fuzzyTokenize,
|