@noya-app/noya-designsystem 0.1.37 → 0.1.38
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 +6 -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 +396 -128
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +400 -129
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/Button.tsx +1 -1
- package/src/components/Checkbox.tsx +2 -0
- 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,
|
|
@@ -4150,6 +4171,7 @@ var Checkbox = memo3(
|
|
|
4150
4171
|
focus:ring-2
|
|
4151
4172
|
focus:ring-primary
|
|
4152
4173
|
focus:ring-offset-1
|
|
4174
|
+
focus:z-interactable
|
|
4153
4175
|
`,
|
|
4154
4176
|
style: {
|
|
4155
4177
|
width: "27px",
|
|
@@ -4170,6 +4192,7 @@ var Checkbox = memo3(
|
|
|
4170
4192
|
stroke-white
|
|
4171
4193
|
opacity-0
|
|
4172
4194
|
peer-checked:opacity-100
|
|
4195
|
+
z-label
|
|
4173
4196
|
`,
|
|
4174
4197
|
style: {
|
|
4175
4198
|
strokeWidth: "1.3"
|
|
@@ -4292,6 +4315,244 @@ function useHover(props = {}) {
|
|
|
4292
4315
|
};
|
|
4293
4316
|
}
|
|
4294
4317
|
|
|
4318
|
+
// tailwind.config.ts
|
|
4319
|
+
var config = {
|
|
4320
|
+
content: ["./src/**/*.{ts,tsx}"],
|
|
4321
|
+
corePlugins: {
|
|
4322
|
+
// disables @tailwind base global styles
|
|
4323
|
+
preflight: false
|
|
4324
|
+
},
|
|
4325
|
+
theme: {
|
|
4326
|
+
extend: {
|
|
4327
|
+
colors: {
|
|
4328
|
+
"logo-fill": "var(--logo-fill)",
|
|
4329
|
+
"logo-highlight": "var(--logo-highlight)",
|
|
4330
|
+
background: "var(--background)",
|
|
4331
|
+
text: "var(--text)",
|
|
4332
|
+
"text-muted": "var(--text-muted)",
|
|
4333
|
+
"text-subtle": "var(--text-subtle)",
|
|
4334
|
+
"text-disabled": "var(--text-disabled)",
|
|
4335
|
+
"text-decorative-light": "var(--text-decorative-light)",
|
|
4336
|
+
"divider-subtle": "var(--divider-subtle)",
|
|
4337
|
+
divider: "var(--divider)",
|
|
4338
|
+
"divider-strong": "var(--divider-strong)",
|
|
4339
|
+
primary: "var(--primary)",
|
|
4340
|
+
"primary-light": "var(--primary-light)",
|
|
4341
|
+
"primary-pastel": "var(--primary-pastel)",
|
|
4342
|
+
secondary: "var(--secondary)",
|
|
4343
|
+
"secondary-light": "var(--secondary-light)",
|
|
4344
|
+
"secondary-pastel": "var(--secondary-pastel)",
|
|
4345
|
+
"secondary-bright": "var(--secondary-bright)",
|
|
4346
|
+
"input-background": "var(--input-background)",
|
|
4347
|
+
"input-background-light": "var(--input-background-light)",
|
|
4348
|
+
"code-background": "var(--code-background)",
|
|
4349
|
+
"code-background-dark": "var(--code-background-dark)",
|
|
4350
|
+
"selected-background": "var(--selected-background)",
|
|
4351
|
+
"breadcrumb-text": "var(--breadcrumb-text)",
|
|
4352
|
+
"breadcrumb-text-hover": "var(--breadcrumb-text-hover)",
|
|
4353
|
+
"breadcrumb-icon": "var(--breadcrumb-icon)",
|
|
4354
|
+
"canvas-background": "var(--canvas-background)",
|
|
4355
|
+
"canvas-grid": "var(--canvas-grid)",
|
|
4356
|
+
"sidebar-background": "var(--sidebar-background)",
|
|
4357
|
+
"sidebar-background-transparent": "var(--sidebar-background-transparent)",
|
|
4358
|
+
"popover-background": "var(--popover-background)",
|
|
4359
|
+
"popover-divider": "var(--popover-divider)",
|
|
4360
|
+
"listview-raised-background": "var(--listview-raised-background)",
|
|
4361
|
+
"listview-editing-background": "var(--listview-editing-background)",
|
|
4362
|
+
"slider-background": "var(--slider-background)",
|
|
4363
|
+
"slider-border": "var(--slider-border)",
|
|
4364
|
+
"radio-group-background": "var(--radio-group-background)",
|
|
4365
|
+
mask: "var(--mask)",
|
|
4366
|
+
"transparent-checker": "var(--transparent-checker)",
|
|
4367
|
+
scrollbar: "var(--scrollbar)",
|
|
4368
|
+
"placeholder-dots": "var(--placeholder-dots)",
|
|
4369
|
+
"drag-outline": "var(--drag-outline)",
|
|
4370
|
+
"active-background": "var(--active-background)",
|
|
4371
|
+
"thumbnail-background": "var(--thumbnail-background)",
|
|
4372
|
+
"thumbnail-shadow": "var(--thumbnail-shadow)",
|
|
4373
|
+
"inline-code-text": "var(--inline-code-text)",
|
|
4374
|
+
"inline-code-background": "var(--inline-code-background)",
|
|
4375
|
+
"text-link": "var(--text-link)",
|
|
4376
|
+
"text-link-focused": "var(--text-link-focused)",
|
|
4377
|
+
icon: "var(--icon)",
|
|
4378
|
+
"icon-selected": "var(--icon-selected)",
|
|
4379
|
+
warning: "var(--warning)",
|
|
4380
|
+
"radio-group-item": "var(--radio-group-item)",
|
|
4381
|
+
dot: "var(--dot)",
|
|
4382
|
+
"row-highlight": "var(--row-highlight)",
|
|
4383
|
+
"table-row-background": "var(--table-row-background)",
|
|
4384
|
+
"chip-primary-bg": "var(--chip-primary-bg)",
|
|
4385
|
+
"chip-secondary-bg": "var(--chip-secondary-bg)",
|
|
4386
|
+
"chip-error-bg": "var(--chip-error-bg)",
|
|
4387
|
+
"chip-default-bg": "var(--chip-default-bg)",
|
|
4388
|
+
"chip-primary-shadow": "var(--chip-primary-shadow)",
|
|
4389
|
+
"chip-secondary-shadow": "var(--chip-secondary-shadow)",
|
|
4390
|
+
"chip-error-shadow": "var(--chip-error-shadow)",
|
|
4391
|
+
"chip-default-shadow": "var(--chip-default-shadow)"
|
|
4392
|
+
},
|
|
4393
|
+
fontFamily: {
|
|
4394
|
+
sans: [
|
|
4395
|
+
"__Inter_6b0edc",
|
|
4396
|
+
"__Inter_Fallback_6b0edc",
|
|
4397
|
+
"-apple-system",
|
|
4398
|
+
"BlinkMacSystemFont",
|
|
4399
|
+
"Helvetica Neue",
|
|
4400
|
+
"Segoe UI",
|
|
4401
|
+
"Roboto",
|
|
4402
|
+
"Helvetica",
|
|
4403
|
+
"Arial",
|
|
4404
|
+
"sans-serif"
|
|
4405
|
+
],
|
|
4406
|
+
mono: ["Menlo", "Monaco", "Consolas", "Courier New", "monospace"]
|
|
4407
|
+
},
|
|
4408
|
+
// Type scale
|
|
4409
|
+
// The last one, 0.85, I just eyeballed
|
|
4410
|
+
// old: typeScale = [3.052, 2.441, 1.953, 1.563, 1.25, 1, 0.85]; // Major third
|
|
4411
|
+
fontSize: {
|
|
4412
|
+
title: [
|
|
4413
|
+
"3.052rem",
|
|
4414
|
+
{
|
|
4415
|
+
lineHeight: "1.4",
|
|
4416
|
+
letterSpacing: "-0.05em"
|
|
4417
|
+
}
|
|
4418
|
+
],
|
|
4419
|
+
subtitle: [
|
|
4420
|
+
"1.563rem",
|
|
4421
|
+
{
|
|
4422
|
+
lineHeight: "1.75",
|
|
4423
|
+
letterSpacing: "-0.05em"
|
|
4424
|
+
}
|
|
4425
|
+
],
|
|
4426
|
+
heading1: [
|
|
4427
|
+
"1.953rem",
|
|
4428
|
+
{
|
|
4429
|
+
lineHeight: "1.6",
|
|
4430
|
+
letterSpacing: "-0.025em"
|
|
4431
|
+
}
|
|
4432
|
+
],
|
|
4433
|
+
heading2: [
|
|
4434
|
+
"1.563rem",
|
|
4435
|
+
{
|
|
4436
|
+
lineHeight: "1.5",
|
|
4437
|
+
letterSpacing: "-0.025em"
|
|
4438
|
+
}
|
|
4439
|
+
],
|
|
4440
|
+
heading3: [
|
|
4441
|
+
"1.25rem",
|
|
4442
|
+
{
|
|
4443
|
+
lineHeight: "1.4",
|
|
4444
|
+
letterSpacing: "-0.025em"
|
|
4445
|
+
}
|
|
4446
|
+
],
|
|
4447
|
+
heading4: [
|
|
4448
|
+
"1rem",
|
|
4449
|
+
{
|
|
4450
|
+
lineHeight: "1.4"
|
|
4451
|
+
}
|
|
4452
|
+
],
|
|
4453
|
+
heading5: [
|
|
4454
|
+
"0.85rem",
|
|
4455
|
+
{
|
|
4456
|
+
lineHeight: "1.4"
|
|
4457
|
+
}
|
|
4458
|
+
],
|
|
4459
|
+
body: [
|
|
4460
|
+
"1",
|
|
4461
|
+
{
|
|
4462
|
+
lineHeight: "1.4"
|
|
4463
|
+
}
|
|
4464
|
+
],
|
|
4465
|
+
small: [
|
|
4466
|
+
"1",
|
|
4467
|
+
{
|
|
4468
|
+
lineHeight: "19px"
|
|
4469
|
+
}
|
|
4470
|
+
],
|
|
4471
|
+
code: [
|
|
4472
|
+
"90%",
|
|
4473
|
+
{
|
|
4474
|
+
lineHeight: "1.5"
|
|
4475
|
+
}
|
|
4476
|
+
],
|
|
4477
|
+
button: [
|
|
4478
|
+
"0.8rem",
|
|
4479
|
+
{
|
|
4480
|
+
lineHeight: "1.4",
|
|
4481
|
+
letterSpacing: "-0.2px"
|
|
4482
|
+
}
|
|
4483
|
+
],
|
|
4484
|
+
label: [
|
|
4485
|
+
"0.62rem",
|
|
4486
|
+
{
|
|
4487
|
+
lineHeight: "19px",
|
|
4488
|
+
letterSpacing: "-0.3px"
|
|
4489
|
+
}
|
|
4490
|
+
]
|
|
4491
|
+
},
|
|
4492
|
+
spacing: {
|
|
4493
|
+
nano: "2px",
|
|
4494
|
+
micro: "4px",
|
|
4495
|
+
small: "8px",
|
|
4496
|
+
medium: "16px",
|
|
4497
|
+
large: "32px",
|
|
4498
|
+
xlarge: "64px",
|
|
4499
|
+
xxlarge: "128px",
|
|
4500
|
+
"inset-top": "var(--inset-top)",
|
|
4501
|
+
"sidebar-width": "var(--sidebar-width)",
|
|
4502
|
+
"toolbar-height": "var(--toolbar-height)",
|
|
4503
|
+
"toolbar-separator": "var(--toolbar-separator)",
|
|
4504
|
+
"inspector-h-separator": "var(--inspector-h-separator)",
|
|
4505
|
+
"inspector-v-separator": "var(--inspector-v-separator)",
|
|
4506
|
+
"dialog-padding": "var(--dialog-padding)"
|
|
4507
|
+
},
|
|
4508
|
+
keyframes: {
|
|
4509
|
+
spin: {
|
|
4510
|
+
"0%": { transform: "rotate(0deg)" },
|
|
4511
|
+
"100%": { transform: "rotate(360deg)" }
|
|
4512
|
+
},
|
|
4513
|
+
shimmer: {
|
|
4514
|
+
"0%": {
|
|
4515
|
+
backgroundPosition: "-200% 0"
|
|
4516
|
+
},
|
|
4517
|
+
"100%": {
|
|
4518
|
+
backgroundPosition: "200% 0"
|
|
4519
|
+
}
|
|
4520
|
+
}
|
|
4521
|
+
},
|
|
4522
|
+
animation: {
|
|
4523
|
+
spin: "spin 1s linear infinite",
|
|
4524
|
+
shimmer: "shimmer 6s infinite linear"
|
|
4525
|
+
},
|
|
4526
|
+
zIndex: {
|
|
4527
|
+
interactable: "var(--interactable-z-index)",
|
|
4528
|
+
label: "var(--label-z-index)"
|
|
4529
|
+
}
|
|
4530
|
+
}
|
|
4531
|
+
},
|
|
4532
|
+
safelist: [
|
|
4533
|
+
"group",
|
|
4534
|
+
"group-hover:flex",
|
|
4535
|
+
"bg-row-highlight",
|
|
4536
|
+
"left-5",
|
|
4537
|
+
"right-6",
|
|
4538
|
+
"m-[0_-24px_0_-20px]",
|
|
4539
|
+
"p-[0_24px_0_20px]",
|
|
4540
|
+
"left-0",
|
|
4541
|
+
"border-divider-strong",
|
|
4542
|
+
"decoration-text-decorative-light",
|
|
4543
|
+
"underline",
|
|
4544
|
+
"-left-2.5",
|
|
4545
|
+
"-mr-2",
|
|
4546
|
+
"border-gray-200",
|
|
4547
|
+
"gap-1.5",
|
|
4548
|
+
"gap-toolbar-separator"
|
|
4549
|
+
]
|
|
4550
|
+
};
|
|
4551
|
+
var tailwind_config_default = config;
|
|
4552
|
+
|
|
4553
|
+
// src/theme/index.ts
|
|
4554
|
+
var cssVars = convertKebabToCamelCase(tailwind_config_default.theme.extend);
|
|
4555
|
+
|
|
4295
4556
|
// src/components/Chip.tsx
|
|
4296
4557
|
function getChipStyles({
|
|
4297
4558
|
$colorScheme,
|
|
@@ -4312,27 +4573,33 @@ function getChipStyles({
|
|
|
4312
4573
|
small: "text-[9px] p-[0px_4px]"
|
|
4313
4574
|
}[$size];
|
|
4314
4575
|
const fontStyles = $monospace ? "font-mono" : "";
|
|
4576
|
+
const shadowStyles = {
|
|
4577
|
+
primary: "shadow-[0_0_0_1px_var(--chip-primary-shadow)_inset]",
|
|
4578
|
+
secondary: "shadow-[0_0_0_1px_var(--chip-secondary-shadow)_inset]",
|
|
4579
|
+
error: "shadow-[0_0_0_1px_var(--chip-error-shadow)_inset]",
|
|
4580
|
+
default: "shadow-[0_0_0_1px_var(--chip-default-shadow)_inset]"
|
|
4581
|
+
};
|
|
4315
4582
|
const variantStyles2 = (() => {
|
|
4316
4583
|
const colors = {
|
|
4317
4584
|
primary: {
|
|
4318
4585
|
text: "text-primary",
|
|
4319
4586
|
bg: "bg-primary-pastel",
|
|
4320
|
-
subtle: "bg-[
|
|
4587
|
+
subtle: "bg-[var(--chip-primary-bg)]"
|
|
4321
4588
|
},
|
|
4322
4589
|
secondary: {
|
|
4323
4590
|
text: "text-secondary",
|
|
4324
4591
|
bg: "bg-secondary-pastel",
|
|
4325
|
-
subtle: "bg-[
|
|
4592
|
+
subtle: "bg-[var(--chip-secondary-bg)]"
|
|
4326
4593
|
},
|
|
4327
4594
|
error: {
|
|
4328
4595
|
text: "text-text",
|
|
4329
4596
|
bg: "bg-[rgb(255,219,219)]",
|
|
4330
|
-
subtle: "bg-[
|
|
4597
|
+
subtle: "bg-[var(--chip-error-bg)]"
|
|
4331
4598
|
},
|
|
4332
4599
|
default: {
|
|
4333
4600
|
text: "text-text",
|
|
4334
4601
|
bg: "bg-input-background",
|
|
4335
|
-
subtle: "bg-[
|
|
4602
|
+
subtle: "bg-[var(--chip-default-bg)]"
|
|
4336
4603
|
}
|
|
4337
4604
|
}[$colorScheme ?? "default"];
|
|
4338
4605
|
if ($variant === "solid") {
|
|
@@ -4341,7 +4608,7 @@ function getChipStyles({
|
|
|
4341
4608
|
if ($variant === "outlined") {
|
|
4342
4609
|
return `
|
|
4343
4610
|
${colors.text} bg-transparent
|
|
4344
|
-
|
|
4611
|
+
${shadowStyles[$colorScheme ?? "default"]}
|
|
4345
4612
|
hover:${colors.subtle} hover:shadow-none
|
|
4346
4613
|
`;
|
|
4347
4614
|
}
|
|
@@ -4394,7 +4661,7 @@ var Chip = memo4(
|
|
|
4394
4661
|
onHoverChange: onHoverDeleteChange
|
|
4395
4662
|
});
|
|
4396
4663
|
const handleClick = !children2 && !deletable && addable ? onAdd : onClick;
|
|
4397
|
-
const color = colorScheme === "primary" ?
|
|
4664
|
+
const color = colorScheme === "primary" ? cssVars.colors.primary : colorScheme === "secondary" ? cssVars.colors.secondary : cssVars.colors.text;
|
|
4398
4665
|
return /* @__PURE__ */ React8.createElement(
|
|
4399
4666
|
"span",
|
|
4400
4667
|
{
|
|
@@ -4519,7 +4786,7 @@ var IconButton = memo5(
|
|
|
4519
4786
|
return /* @__PURE__ */ React11.createElement(Button, { ref: forwardedRef, ...props, variant: "none", contentStyle: style5 }, /* @__PURE__ */ React11.createElement(
|
|
4520
4787
|
Icon,
|
|
4521
4788
|
{
|
|
4522
|
-
color: color ?? (selected ?
|
|
4789
|
+
color: color ?? (selected ? cssVars.colors.iconSelected : cssVars.colors.icon),
|
|
4523
4790
|
...size3 && { width: size3, height: size3 }
|
|
4524
4791
|
}
|
|
4525
4792
|
));
|
|
@@ -4991,6 +5258,7 @@ import React20, {
|
|
|
4991
5258
|
useCallback as useCallback11,
|
|
4992
5259
|
useContext as useContext2,
|
|
4993
5260
|
useEffect as useEffect11,
|
|
5261
|
+
useId,
|
|
4994
5262
|
useLayoutEffect as useLayoutEffect4,
|
|
4995
5263
|
useMemo as useMemo7,
|
|
4996
5264
|
useRef as useRef12,
|
|
@@ -5214,7 +5482,8 @@ var ReadOnlyTextInput = forwardRef10(function ReadOnlyTextInput2({ onKeyDown, on
|
|
|
5214
5482
|
...rest,
|
|
5215
5483
|
value,
|
|
5216
5484
|
onKeyDown,
|
|
5217
|
-
readOnly: true
|
|
5485
|
+
readOnly: true,
|
|
5486
|
+
className: "focus:z-interactable"
|
|
5218
5487
|
}
|
|
5219
5488
|
);
|
|
5220
5489
|
});
|
|
@@ -5452,31 +5721,35 @@ var InputFieldContext = createContext2({
|
|
|
5452
5721
|
onFocusChange: () => {
|
|
5453
5722
|
}
|
|
5454
5723
|
});
|
|
5455
|
-
var LabelContainer = forwardRef11(
|
|
5456
|
-
|
|
5457
|
-
|
|
5724
|
+
var LabelContainer = forwardRef11(function LabelContainer2({
|
|
5725
|
+
labelPosition: $labelPosition,
|
|
5726
|
+
hasDropdown: $hasDropdown,
|
|
5727
|
+
size: $size,
|
|
5728
|
+
className,
|
|
5729
|
+
style: style5,
|
|
5730
|
+
...props
|
|
5731
|
+
}, ref) {
|
|
5732
|
+
const memoizedStyles = useMemo7(
|
|
5733
|
+
() => ({
|
|
5458
5734
|
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
|
-
|
|
5735
|
+
right: $labelPosition === "end" ? $size === "large" ? "6px" : $size === "medium" ? "2px" : "0px" : "",
|
|
5736
|
+
...style5
|
|
5737
|
+
}),
|
|
5738
|
+
[$labelPosition, $size, style5]
|
|
5739
|
+
);
|
|
5740
|
+
return /* @__PURE__ */ React20.createElement(
|
|
5741
|
+
"label",
|
|
5742
|
+
{
|
|
5743
|
+
ref,
|
|
5744
|
+
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 ?? ""}`,
|
|
5745
|
+
style: memoizedStyles,
|
|
5746
|
+
...props
|
|
5747
|
+
}
|
|
5748
|
+
);
|
|
5749
|
+
});
|
|
5472
5750
|
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);
|
|
5751
|
+
forwardRef11(function InputFieldLabel2(props, forwardedRef) {
|
|
5752
|
+
const { labelPosition, hasDropdown, setLabelWidth, size: size3, id } = useContext2(InputFieldContext);
|
|
5480
5753
|
const ref = useRef12(null);
|
|
5481
5754
|
useLayoutEffect4(() => {
|
|
5482
5755
|
if (!setLabelWidth) return;
|
|
@@ -5487,18 +5760,16 @@ var InputFieldLabel = memo9(
|
|
|
5487
5760
|
return /* @__PURE__ */ React20.createElement(
|
|
5488
5761
|
LabelContainer,
|
|
5489
5762
|
{
|
|
5490
|
-
$size: size3,
|
|
5491
5763
|
ref: (element) => {
|
|
5492
5764
|
ref.current = element;
|
|
5493
5765
|
assignRef(forwardedRef, element);
|
|
5494
5766
|
},
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
}
|
|
5501
|
-
children2
|
|
5767
|
+
size: size3,
|
|
5768
|
+
labelPosition,
|
|
5769
|
+
hasDropdown,
|
|
5770
|
+
htmlFor: id,
|
|
5771
|
+
...props
|
|
5772
|
+
}
|
|
5502
5773
|
);
|
|
5503
5774
|
})
|
|
5504
5775
|
);
|
|
@@ -5603,10 +5874,13 @@ var InputElement = forwardRef11(
|
|
|
5603
5874
|
}, ref) => {
|
|
5604
5875
|
const paddingLeft = ($size === "large" ? 10 : $size === "medium" ? 6 : 4) + ($labelSize && $labelPosition === "start" ? 6 + $labelSize : 0);
|
|
5605
5876
|
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
|
-
|
|
5877
|
+
const memoizedStyles = useMemo7(
|
|
5878
|
+
() => ({
|
|
5879
|
+
paddingLeft: `${paddingLeft}px`,
|
|
5880
|
+
paddingRight: `${paddingRight}px`
|
|
5881
|
+
}),
|
|
5882
|
+
[paddingLeft, paddingRight]
|
|
5883
|
+
);
|
|
5610
5884
|
return /* @__PURE__ */ React20.createElement(
|
|
5611
5885
|
TextInput_default,
|
|
5612
5886
|
{
|
|
@@ -5614,7 +5888,7 @@ var InputElement = forwardRef11(
|
|
|
5614
5888
|
onSubmit: onSubmit ?? (() => {
|
|
5615
5889
|
}),
|
|
5616
5890
|
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
|
|
5891
|
+
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
5892
|
style: memoizedStyles,
|
|
5619
5893
|
...props
|
|
5620
5894
|
}
|
|
@@ -5629,7 +5903,8 @@ var InputFieldInput = forwardRef11(function InputFieldInput2({ textAlign, varian
|
|
|
5629
5903
|
buttonSize,
|
|
5630
5904
|
size: size3,
|
|
5631
5905
|
onFocusChange,
|
|
5632
|
-
setInputRef
|
|
5906
|
+
setInputRef,
|
|
5907
|
+
id
|
|
5633
5908
|
} = useContext2(InputFieldContext);
|
|
5634
5909
|
const handleFocusChange = useCallback11(
|
|
5635
5910
|
(isFocused) => {
|
|
@@ -5651,6 +5926,7 @@ var InputFieldInput = forwardRef11(function InputFieldInput2({ textAlign, varian
|
|
|
5651
5926
|
$variant: variant,
|
|
5652
5927
|
$textAlign: textAlign,
|
|
5653
5928
|
onFocusChange: handleFocusChange,
|
|
5929
|
+
id,
|
|
5654
5930
|
...rest
|
|
5655
5931
|
}
|
|
5656
5932
|
);
|
|
@@ -5765,6 +6041,7 @@ function InputFieldRoot({
|
|
|
5765
6041
|
className
|
|
5766
6042
|
}) {
|
|
5767
6043
|
const childrenArray = Children.toArray(children2);
|
|
6044
|
+
const randomId = useId();
|
|
5768
6045
|
const hasDropdown = childrenArray.some(
|
|
5769
6046
|
(child) => isValidElement(child) && child.type === InputFieldDropdownMenu
|
|
5770
6047
|
);
|
|
@@ -5799,7 +6076,8 @@ function InputFieldRoot({
|
|
|
5799
6076
|
inputRef,
|
|
5800
6077
|
setInputRef,
|
|
5801
6078
|
setLabelWidth: setMeasuredLabelSize,
|
|
5802
|
-
setButtonWidth: setMeasuredButtonSize
|
|
6079
|
+
setButtonWidth: setMeasuredButtonSize,
|
|
6080
|
+
id: id ?? randomId
|
|
5803
6081
|
}),
|
|
5804
6082
|
[
|
|
5805
6083
|
labelPosition,
|
|
@@ -5810,13 +6088,14 @@ function InputFieldRoot({
|
|
|
5810
6088
|
size3,
|
|
5811
6089
|
isFocused,
|
|
5812
6090
|
handleFocusChange,
|
|
5813
|
-
inputRef
|
|
6091
|
+
inputRef,
|
|
6092
|
+
id,
|
|
6093
|
+
randomId
|
|
5814
6094
|
]
|
|
5815
6095
|
);
|
|
5816
6096
|
const rootElement = /* @__PURE__ */ React20.createElement(
|
|
5817
6097
|
RootContainer,
|
|
5818
6098
|
{
|
|
5819
|
-
id,
|
|
5820
6099
|
$width: width,
|
|
5821
6100
|
$flex: flex,
|
|
5822
6101
|
style: style5,
|
|
@@ -5851,7 +6130,7 @@ var PrimitiveInputField = ({
|
|
|
5851
6130
|
}) => /* @__PURE__ */ React20.createElement(
|
|
5852
6131
|
"input",
|
|
5853
6132
|
{
|
|
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
|
|
6133
|
+
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
6134
|
...props
|
|
5856
6135
|
}
|
|
5857
6136
|
);
|
|
@@ -6388,13 +6667,13 @@ var DraggableMenuButton = memo14(function DraggableMenuButton2({
|
|
|
6388
6667
|
/* @__PURE__ */ React27.createElement(Trigger5, null, /* @__PURE__ */ React27.createElement(
|
|
6389
6668
|
DragHandleDots2Icon,
|
|
6390
6669
|
{
|
|
6391
|
-
color: isVisible || open ?
|
|
6670
|
+
color: isVisible || open ? cssVars.colors.icon : "transparent"
|
|
6392
6671
|
}
|
|
6393
6672
|
))
|
|
6394
6673
|
) : /* @__PURE__ */ React27.createElement(
|
|
6395
6674
|
DragHandleDots2Icon,
|
|
6396
6675
|
{
|
|
6397
|
-
color: isVisible || open ?
|
|
6676
|
+
color: isVisible || open ? cssVars.colors.icon : "transparent"
|
|
6398
6677
|
}
|
|
6399
6678
|
)
|
|
6400
6679
|
);
|
|
@@ -6819,7 +7098,9 @@ var dotsHorizontalSvg = (fillColor) => `
|
|
|
6819
7098
|
<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
7099
|
</svg>
|
|
6821
7100
|
`;
|
|
6822
|
-
var Background = memo16(function Background2({
|
|
7101
|
+
var Background = memo16(function Background2({
|
|
7102
|
+
background: background2
|
|
7103
|
+
}) {
|
|
6823
7104
|
return /* @__PURE__ */ React29.createElement(
|
|
6824
7105
|
"span",
|
|
6825
7106
|
{
|
|
@@ -6876,17 +7157,12 @@ var GradientPreviewBackground = memo16(function GradientPreviewBackground2({
|
|
|
6876
7157
|
return /* @__PURE__ */ React29.createElement(Background, { background: background2 });
|
|
6877
7158
|
});
|
|
6878
7159
|
var background = `center url("data:image/svg+xml;utf8,${dotsHorizontalSvg(
|
|
6879
|
-
|
|
7160
|
+
cssVars.colors.placeholderDots
|
|
6880
7161
|
)}") no-repeat`;
|
|
6881
7162
|
var FillPreviewBackground = memo16(function FillPreviewBackground2({
|
|
6882
7163
|
value
|
|
6883
7164
|
}) {
|
|
6884
|
-
if (!value) return /* @__PURE__ */ React29.createElement(
|
|
6885
|
-
Background,
|
|
6886
|
-
{
|
|
6887
|
-
background
|
|
6888
|
-
}
|
|
6889
|
-
);
|
|
7165
|
+
if (!value) return /* @__PURE__ */ React29.createElement(Background, { background });
|
|
6890
7166
|
switch (value._class) {
|
|
6891
7167
|
case "color":
|
|
6892
7168
|
return /* @__PURE__ */ React29.createElement(ColorPreviewBackground, { color: value });
|
|
@@ -7158,8 +7434,8 @@ var FloatingWindow = ({
|
|
|
7158
7434
|
left: position.x,
|
|
7159
7435
|
width: size3.width,
|
|
7160
7436
|
height: size3.height,
|
|
7161
|
-
outline: `1px solid
|
|
7162
|
-
backgroundColor:
|
|
7437
|
+
outline: `1px solid ${cssVars.colors.divider}`,
|
|
7438
|
+
backgroundColor: cssVars.colors.canvasBackground
|
|
7163
7439
|
}
|
|
7164
7440
|
},
|
|
7165
7441
|
/* @__PURE__ */ React31.createElement(
|
|
@@ -7167,7 +7443,7 @@ var FloatingWindow = ({
|
|
|
7167
7443
|
{
|
|
7168
7444
|
style: {
|
|
7169
7445
|
...styles2.toolbar,
|
|
7170
|
-
backgroundColor:
|
|
7446
|
+
backgroundColor: cssVars.colors.sidebarBackground
|
|
7171
7447
|
},
|
|
7172
7448
|
onMouseDown: handleMouseDown
|
|
7173
7449
|
},
|
|
@@ -15024,21 +15300,6 @@ function getPositionMargin(marginType) {
|
|
|
15024
15300
|
bottom: marginType === "bottom" || marginType === "vertical" ? 8 : 0
|
|
15025
15301
|
};
|
|
15026
15302
|
}
|
|
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
15303
|
var RowContainer = forwardRef15(
|
|
15043
15304
|
({
|
|
15044
15305
|
className,
|
|
@@ -15056,6 +15317,8 @@ var RowContainer = forwardRef15(
|
|
|
15056
15317
|
$gap,
|
|
15057
15318
|
$backgroundColor,
|
|
15058
15319
|
style: style5,
|
|
15320
|
+
"aria-describedby": _,
|
|
15321
|
+
// Causes hydration warning
|
|
15059
15322
|
...props
|
|
15060
15323
|
}, ref) => {
|
|
15061
15324
|
const margin = getPositionMargin($marginType);
|
|
@@ -15083,19 +15346,19 @@ var RowContainer = forwardRef15(
|
|
|
15083
15346
|
marginBottom: `${margin.bottom}px`
|
|
15084
15347
|
}
|
|
15085
15348
|
},
|
|
15086
|
-
color:
|
|
15349
|
+
color: cssVars.colors.textMuted,
|
|
15087
15350
|
...$isSectionHeader && {
|
|
15088
|
-
backgroundColor:
|
|
15351
|
+
backgroundColor: cssVars.colors.listviewRaisedBackground,
|
|
15089
15352
|
...$sectionHeaderVariant === "label" && {
|
|
15090
|
-
color:
|
|
15353
|
+
color: cssVars.colors.textDisabled
|
|
15091
15354
|
}
|
|
15092
15355
|
},
|
|
15093
15356
|
...$disabled && {
|
|
15094
|
-
color:
|
|
15357
|
+
color: cssVars.colors.textDisabled
|
|
15095
15358
|
},
|
|
15096
15359
|
...$selected && {
|
|
15097
15360
|
color: "white",
|
|
15098
|
-
backgroundColor:
|
|
15361
|
+
backgroundColor: cssVars.colors[$colorScheme]
|
|
15099
15362
|
},
|
|
15100
15363
|
display: "flex",
|
|
15101
15364
|
alignItems: "center",
|
|
@@ -15109,15 +15372,15 @@ var RowContainer = forwardRef15(
|
|
|
15109
15372
|
},
|
|
15110
15373
|
position: "relative",
|
|
15111
15374
|
...$hovered && {
|
|
15112
|
-
boxShadow: `0 0 0 1px ${
|
|
15375
|
+
boxShadow: `0 0 0 1px ${cssVars.colors[$colorScheme]} inset`
|
|
15113
15376
|
},
|
|
15114
15377
|
...$showsActiveState && {
|
|
15115
15378
|
"&:active": {
|
|
15116
|
-
backgroundColor: $selected ? $colorScheme === "secondary" ?
|
|
15379
|
+
backgroundColor: $selected ? $colorScheme === "secondary" ? cssVars.colors.secondaryLight : cssVars.colors.primaryLight : cssVars.colors.activeBackground
|
|
15117
15380
|
}
|
|
15118
15381
|
},
|
|
15119
15382
|
...$divider && {
|
|
15120
|
-
borderBottom: `1px solid ${
|
|
15383
|
+
borderBottom: `1px solid ${cssVars.colors.dividerSubtle}`
|
|
15121
15384
|
},
|
|
15122
15385
|
...$backgroundColor && {
|
|
15123
15386
|
backgroundColor: $backgroundColor,
|
|
@@ -15157,14 +15420,14 @@ var ListViewDragIndicatorElement = forwardRef15(
|
|
|
15157
15420
|
borderRadius: "3px",
|
|
15158
15421
|
...$relativeDropPosition === "inside" ? {
|
|
15159
15422
|
inset: 2,
|
|
15160
|
-
boxShadow: `0 0 0 1px
|
|
15423
|
+
boxShadow: `0 0 0 1px ${cssVars.colors.sidebarBackground}, 0 0 0 3px ${$colorScheme === "secondary" ? cssVars.colors.secondary : cssVars.colors.dragOutline}`
|
|
15161
15424
|
} : {
|
|
15162
15425
|
top: $relativeDropPosition === "above" ? -(3 + $gap / 2) : void 0,
|
|
15163
15426
|
bottom: $relativeDropPosition === "below" ? -(3 + $gap / 2) : void 0,
|
|
15164
15427
|
left: $offsetLeft,
|
|
15165
15428
|
right: 0,
|
|
15166
15429
|
height: 6,
|
|
15167
|
-
backgroundColor: $colorScheme === "secondary" ?
|
|
15430
|
+
backgroundColor: $colorScheme === "secondary" ? cssVars.colors.secondary : cssVars.colors.primary,
|
|
15168
15431
|
border: `2px solid white`,
|
|
15169
15432
|
boxShadow: "0 0 2px rgba(0,0,0,0.5)"
|
|
15170
15433
|
},
|
|
@@ -15998,7 +16261,7 @@ var InspectorContainer = memo24(
|
|
|
15998
16261
|
display: "flex",
|
|
15999
16262
|
flexDirection: "column",
|
|
16000
16263
|
position: "relative",
|
|
16001
|
-
background:
|
|
16264
|
+
background: cssVars.colors.sidebarBackground,
|
|
16002
16265
|
...style5
|
|
16003
16266
|
}
|
|
16004
16267
|
},
|
|
@@ -16016,7 +16279,7 @@ var Label = memo25(
|
|
|
16016
16279
|
"label",
|
|
16017
16280
|
{
|
|
16018
16281
|
ref,
|
|
16019
|
-
className: `font-sans text-label uppercase flex items-center leading-[19px] select-none font-bold text-text-muted ${className ?? ""}`,
|
|
16282
|
+
className: `font-sans text-label uppercase flex items-center leading-[19px] select-none font-bold text-text-muted z-label ${className ?? ""}`,
|
|
16020
16283
|
...props
|
|
16021
16284
|
}
|
|
16022
16285
|
);
|
|
@@ -16178,7 +16441,7 @@ var ToggleGroupItem = forwardRef19(function ToggleGroupItem2({ value, tooltip, c
|
|
|
16178
16441
|
ref: forwardedRef,
|
|
16179
16442
|
value,
|
|
16180
16443
|
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)"}`
|
|
16444
|
+
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
16445
|
},
|
|
16183
16446
|
children2
|
|
16184
16447
|
);
|
|
@@ -16233,7 +16496,7 @@ var readOnlyStyle = {
|
|
|
16233
16496
|
justifyContent: "flex-start",
|
|
16234
16497
|
textAlign: "left"
|
|
16235
16498
|
};
|
|
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`;
|
|
16499
|
+
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
16500
|
var scrollButtonStyles = `
|
|
16238
16501
|
flex
|
|
16239
16502
|
items-center
|
|
@@ -16267,7 +16530,7 @@ var SelectMenu = memo28(function SelectMenu2({
|
|
|
16267
16530
|
id,
|
|
16268
16531
|
style: style5,
|
|
16269
16532
|
contentStyle: readOnlyStyle,
|
|
16270
|
-
className: `${className ?? ""} flex-1`,
|
|
16533
|
+
className: `${className ?? ""} flex-1 focus:z-interactable`,
|
|
16271
16534
|
disabled
|
|
16272
16535
|
},
|
|
16273
16536
|
icon && /* @__PURE__ */ React64.createElement(React64.Fragment, null, renderIcon(icon), /* @__PURE__ */ React64.createElement(Spacer.Horizontal, { inline: true, size: 6 })),
|
|
@@ -16281,7 +16544,7 @@ var SelectMenu = memo28(function SelectMenu2({
|
|
|
16281
16544
|
{
|
|
16282
16545
|
id,
|
|
16283
16546
|
style: style5,
|
|
16284
|
-
className: `${className ?? "w-full"} flex-1`,
|
|
16547
|
+
className: `${className ?? "w-full"} flex-1 focus:z-interactable`,
|
|
16285
16548
|
disabled
|
|
16286
16549
|
},
|
|
16287
16550
|
icon && /* @__PURE__ */ React64.createElement(React64.Fragment, null, renderIcon(icon), /* @__PURE__ */ React64.createElement(Spacer.Horizontal, { inline: true, size: 6 })),
|
|
@@ -16377,7 +16640,7 @@ var Switch = function Switch2({
|
|
|
16377
16640
|
onCheckedChange: (newValue) => {
|
|
16378
16641
|
onChange(newValue);
|
|
16379
16642
|
},
|
|
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"}`
|
|
16643
|
+
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
16644
|
},
|
|
16382
16645
|
/* @__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
16646
|
);
|
|
@@ -16416,7 +16679,7 @@ var AutoResizingTextArea = memo29(
|
|
|
16416
16679
|
return /* @__PURE__ */ React67.createElement(
|
|
16417
16680
|
"textarea",
|
|
16418
16681
|
{
|
|
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
|
|
16682
|
+
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
16683
|
ref: handleRef,
|
|
16421
16684
|
...rest,
|
|
16422
16685
|
onChange: handleChange,
|
|
@@ -16713,7 +16976,7 @@ var WorkspaceLayoutWithTheme = forwardRef22(function WorkspaceLayoutWithTheme2({
|
|
|
16713
16976
|
id,
|
|
16714
16977
|
className,
|
|
16715
16978
|
style: {
|
|
16716
|
-
backgroundColor:
|
|
16979
|
+
backgroundColor: cssVars.colors.canvasBackground,
|
|
16717
16980
|
display: "flex",
|
|
16718
16981
|
flexDirection: "row",
|
|
16719
16982
|
...style5
|
|
@@ -16752,7 +17015,7 @@ var WorkspaceLayoutWithTheme = forwardRef22(function WorkspaceLayoutWithTheme2({
|
|
|
16752
17015
|
cursor: "col-resize",
|
|
16753
17016
|
width: "1px",
|
|
16754
17017
|
height: "100%",
|
|
16755
|
-
backgroundColor:
|
|
17018
|
+
backgroundColor: cssVars.colors.divider
|
|
16756
17019
|
}
|
|
16757
17020
|
}
|
|
16758
17021
|
)),
|
|
@@ -16778,7 +17041,7 @@ var WorkspaceLayoutWithTheme = forwardRef22(function WorkspaceLayoutWithTheme2({
|
|
|
16778
17041
|
cursor: "col-resize",
|
|
16779
17042
|
width: "1px",
|
|
16780
17043
|
height: "100%",
|
|
16781
|
-
backgroundColor:
|
|
17044
|
+
backgroundColor: cssVars.colors.divider
|
|
16782
17045
|
}
|
|
16783
17046
|
}
|
|
16784
17047
|
), /* @__PURE__ */ React70.createElement(
|
|
@@ -16922,7 +17185,10 @@ __export(InspectorPrimitives_exports, {
|
|
|
16922
17185
|
Title: () => Title3,
|
|
16923
17186
|
VerticalSeparator: () => VerticalSeparator
|
|
16924
17187
|
});
|
|
16925
|
-
import React72, {
|
|
17188
|
+
import React72, {
|
|
17189
|
+
forwardRef as forwardRef23,
|
|
17190
|
+
memo as memo32
|
|
17191
|
+
} from "react";
|
|
16926
17192
|
var Section2 = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React72.createElement(
|
|
16927
17193
|
"div",
|
|
16928
17194
|
{
|
|
@@ -16961,7 +17227,7 @@ var Checkbox3 = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ R
|
|
|
16961
17227
|
{
|
|
16962
17228
|
ref,
|
|
16963
17229
|
type: "checkbox",
|
|
16964
|
-
className: cn("m-0", className),
|
|
17230
|
+
className: cn("m-0 focus:z-interactable", className),
|
|
16965
17231
|
...props
|
|
16966
17232
|
}
|
|
16967
17233
|
));
|
|
@@ -16975,12 +17241,16 @@ var Text3 = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React
|
|
|
16975
17241
|
));
|
|
16976
17242
|
var VerticalSeparator = () => /* @__PURE__ */ React72.createElement(Spacer.Vertical, { size: "inspector-v-separator" });
|
|
16977
17243
|
var HorizontalSeparator = () => /* @__PURE__ */ React72.createElement(Spacer.Horizontal, { size: "inspector-h-separator" });
|
|
16978
|
-
var RowLabel = forwardRef23(function RowLabel2({
|
|
17244
|
+
var RowLabel = forwardRef23(function RowLabel2({
|
|
17245
|
+
className,
|
|
17246
|
+
$textStyle,
|
|
17247
|
+
...props
|
|
17248
|
+
}, ref) {
|
|
16979
17249
|
return /* @__PURE__ */ React72.createElement(
|
|
16980
|
-
"
|
|
17250
|
+
"label",
|
|
16981
17251
|
{
|
|
16982
17252
|
ref,
|
|
16983
|
-
className: `font-sans text-label uppercase flex items-center leading-[19px] font-bold text-text-subtle ${$textStyle
|
|
17253
|
+
className: `font-sans text-label uppercase flex items-center leading-[19px] font-bold text-text-subtle z-label ${$textStyle ? textStyles[$textStyle] : ""} ${className ?? ""}`,
|
|
16984
17254
|
...props
|
|
16985
17255
|
}
|
|
16986
17256
|
);
|
|
@@ -17065,6 +17335,7 @@ export {
|
|
|
17065
17335
|
WorkspaceLayout,
|
|
17066
17336
|
cn,
|
|
17067
17337
|
createSectionedMenu,
|
|
17338
|
+
cssVars,
|
|
17068
17339
|
fuzzyFilter,
|
|
17069
17340
|
fuzzyScore,
|
|
17070
17341
|
fuzzyTokenize,
|