@noya-app/noya-designsystem 0.1.36 → 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 +12 -0
- package/dist/index.css +1 -1
- package/dist/index.d.mts +358 -33
- package/dist/index.d.ts +358 -33
- package/dist/index.js +1227 -854
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1010 -626
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/Button.tsx +1 -1
- package/src/components/Checkbox.tsx +78 -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 +16 -29
- package/src/components/ListView.tsx +19 -32
- package/src/components/RadioGroup.tsx +1 -1
- package/src/components/SelectMenu.tsx +41 -35
- package/src/components/Switch.tsx +5 -2
- 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 +1 -1
- package/src/theme/index.ts +6 -3
- package/src/theme/themeUtils.ts +72 -0
- package/src/utils/tailwind.ts +4 -12
- package/src/utils/withSeparatorElements.ts +29 -3
- package/tailwind.config.ts +19 -5
- package/tsconfig.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -473,7 +473,7 @@ var require_react_is_development = __commonJS({
|
|
|
473
473
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
474
474
|
var Element2 = REACT_ELEMENT_TYPE;
|
|
475
475
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
476
|
-
var
|
|
476
|
+
var Fragment3 = REACT_FRAGMENT_TYPE;
|
|
477
477
|
var Lazy = REACT_LAZY_TYPE;
|
|
478
478
|
var Memo = REACT_MEMO_TYPE;
|
|
479
479
|
var Portal6 = REACT_PORTAL_TYPE;
|
|
@@ -532,7 +532,7 @@ var require_react_is_development = __commonJS({
|
|
|
532
532
|
exports.ContextProvider = ContextProvider;
|
|
533
533
|
exports.Element = Element2;
|
|
534
534
|
exports.ForwardRef = ForwardRef;
|
|
535
|
-
exports.Fragment =
|
|
535
|
+
exports.Fragment = Fragment3;
|
|
536
536
|
exports.Lazy = Lazy;
|
|
537
537
|
exports.Memo = Memo;
|
|
538
538
|
exports.Portal = Portal6;
|
|
@@ -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,
|
|
@@ -4116,12 +4137,90 @@ var Button = forwardRef3(function Button2({
|
|
|
4116
4137
|
return tooltip ? /* @__PURE__ */ React5.createElement(Tooltip, { content: tooltip }, buttonElement) : buttonElement;
|
|
4117
4138
|
});
|
|
4118
4139
|
|
|
4140
|
+
// src/components/Checkbox.tsx
|
|
4141
|
+
import React6, { forwardRef as forwardRef4, memo as memo3 } from "react";
|
|
4142
|
+
var colorSchemeStyles = {
|
|
4143
|
+
normal: "text-text-subtle",
|
|
4144
|
+
primary: "text-primary",
|
|
4145
|
+
secondary: "text-secondary"
|
|
4146
|
+
};
|
|
4147
|
+
var Checkbox = memo3(
|
|
4148
|
+
forwardRef4(function Checkbox2({ className, colorScheme = "secondary", ...props }, ref) {
|
|
4149
|
+
return /* @__PURE__ */ React6.createElement(
|
|
4150
|
+
"div",
|
|
4151
|
+
{
|
|
4152
|
+
className: `relative inline-flex w-[19px] h-[19px] ${colorSchemeStyles[colorScheme]} ${className ?? ""}`
|
|
4153
|
+
},
|
|
4154
|
+
/* @__PURE__ */ React6.createElement(
|
|
4155
|
+
"input",
|
|
4156
|
+
{
|
|
4157
|
+
ref,
|
|
4158
|
+
type: "checkbox",
|
|
4159
|
+
className: `
|
|
4160
|
+
w-full
|
|
4161
|
+
h-full
|
|
4162
|
+
peer
|
|
4163
|
+
appearance-none
|
|
4164
|
+
rounded
|
|
4165
|
+
bg-input-background
|
|
4166
|
+
transition-colors
|
|
4167
|
+
border
|
|
4168
|
+
border-input-border
|
|
4169
|
+
disabled:opacity-50
|
|
4170
|
+
disabled:cursor-not-allowed
|
|
4171
|
+
focus:ring-2
|
|
4172
|
+
focus:ring-primary
|
|
4173
|
+
focus:ring-offset-1
|
|
4174
|
+
focus:z-interactable
|
|
4175
|
+
`,
|
|
4176
|
+
style: {
|
|
4177
|
+
width: "27px",
|
|
4178
|
+
...props.style
|
|
4179
|
+
},
|
|
4180
|
+
...props
|
|
4181
|
+
}
|
|
4182
|
+
),
|
|
4183
|
+
/* @__PURE__ */ React6.createElement(
|
|
4184
|
+
"svg",
|
|
4185
|
+
{
|
|
4186
|
+
className: `
|
|
4187
|
+
absolute
|
|
4188
|
+
inset-0
|
|
4189
|
+
h-[27px]
|
|
4190
|
+
w-[27px]
|
|
4191
|
+
pointer-events-none
|
|
4192
|
+
stroke-white
|
|
4193
|
+
opacity-0
|
|
4194
|
+
peer-checked:opacity-100
|
|
4195
|
+
z-label
|
|
4196
|
+
`,
|
|
4197
|
+
style: {
|
|
4198
|
+
strokeWidth: "1.3"
|
|
4199
|
+
},
|
|
4200
|
+
viewBox: "0 0 16 16",
|
|
4201
|
+
fill: "none",
|
|
4202
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
4203
|
+
},
|
|
4204
|
+
/* @__PURE__ */ React6.createElement(
|
|
4205
|
+
"path",
|
|
4206
|
+
{
|
|
4207
|
+
d: "M3 6L4.5 7.5L8 4",
|
|
4208
|
+
strokeLinecap: "round",
|
|
4209
|
+
strokeLinejoin: "round",
|
|
4210
|
+
stroke: "currentColor"
|
|
4211
|
+
}
|
|
4212
|
+
)
|
|
4213
|
+
)
|
|
4214
|
+
);
|
|
4215
|
+
})
|
|
4216
|
+
);
|
|
4217
|
+
|
|
4119
4218
|
// src/components/Chip.tsx
|
|
4120
4219
|
import { Cross1Icon, PlusIcon } from "@noya-app/noya-icons";
|
|
4121
|
-
import
|
|
4220
|
+
import React8, { forwardRef as forwardRef5, memo as memo4 } from "react";
|
|
4122
4221
|
|
|
4123
4222
|
// src/hooks/useHover.ts
|
|
4124
|
-
import * as
|
|
4223
|
+
import * as React7 from "react";
|
|
4125
4224
|
var globalIgnoreEmulatedMouseEvents = false;
|
|
4126
4225
|
var hoverCount = 0;
|
|
4127
4226
|
function setGlobalIgnoreEmulatedMouseEvents() {
|
|
@@ -4151,13 +4250,13 @@ function setupGlobalTouchEvents() {
|
|
|
4151
4250
|
}
|
|
4152
4251
|
function useHover(props = {}) {
|
|
4153
4252
|
const { onHoverStart, onHoverChange, onHoverEnd, isDisabled } = props;
|
|
4154
|
-
const [isHovered, setHovered] =
|
|
4155
|
-
const state =
|
|
4253
|
+
const [isHovered, setHovered] = React7.useState(false);
|
|
4254
|
+
const state = React7.useRef({
|
|
4156
4255
|
isHovered: false,
|
|
4157
4256
|
ignoreEmulatedMouseEvents: false
|
|
4158
4257
|
}).current;
|
|
4159
|
-
|
|
4160
|
-
const hoverProps =
|
|
4258
|
+
React7.useEffect(setupGlobalTouchEvents, []);
|
|
4259
|
+
const hoverProps = React7.useMemo(
|
|
4161
4260
|
function getHoverProps() {
|
|
4162
4261
|
function triggerHoverStart(event, pointerType) {
|
|
4163
4262
|
if (isDisabled || pointerType === "touch" || state.isHovered) {
|
|
@@ -4216,6 +4315,244 @@ function useHover(props = {}) {
|
|
|
4216
4315
|
};
|
|
4217
4316
|
}
|
|
4218
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
|
+
|
|
4219
4556
|
// src/components/Chip.tsx
|
|
4220
4557
|
function getChipStyles({
|
|
4221
4558
|
$colorScheme,
|
|
@@ -4236,27 +4573,33 @@ function getChipStyles({
|
|
|
4236
4573
|
small: "text-[9px] p-[0px_4px]"
|
|
4237
4574
|
}[$size];
|
|
4238
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
|
+
};
|
|
4239
4582
|
const variantStyles2 = (() => {
|
|
4240
4583
|
const colors = {
|
|
4241
4584
|
primary: {
|
|
4242
4585
|
text: "text-primary",
|
|
4243
4586
|
bg: "bg-primary-pastel",
|
|
4244
|
-
subtle: "bg-[
|
|
4587
|
+
subtle: "bg-[var(--chip-primary-bg)]"
|
|
4245
4588
|
},
|
|
4246
4589
|
secondary: {
|
|
4247
4590
|
text: "text-secondary",
|
|
4248
4591
|
bg: "bg-secondary-pastel",
|
|
4249
|
-
subtle: "bg-[
|
|
4592
|
+
subtle: "bg-[var(--chip-secondary-bg)]"
|
|
4250
4593
|
},
|
|
4251
4594
|
error: {
|
|
4252
4595
|
text: "text-text",
|
|
4253
4596
|
bg: "bg-[rgb(255,219,219)]",
|
|
4254
|
-
subtle: "bg-[
|
|
4597
|
+
subtle: "bg-[var(--chip-error-bg)]"
|
|
4255
4598
|
},
|
|
4256
4599
|
default: {
|
|
4257
4600
|
text: "text-text",
|
|
4258
4601
|
bg: "bg-input-background",
|
|
4259
|
-
subtle: "bg-[
|
|
4602
|
+
subtle: "bg-[var(--chip-default-bg)]"
|
|
4260
4603
|
}
|
|
4261
4604
|
}[$colorScheme ?? "default"];
|
|
4262
4605
|
if ($variant === "solid") {
|
|
@@ -4265,7 +4608,7 @@ function getChipStyles({
|
|
|
4265
4608
|
if ($variant === "outlined") {
|
|
4266
4609
|
return `
|
|
4267
4610
|
${colors.text} bg-transparent
|
|
4268
|
-
|
|
4611
|
+
${shadowStyles[$colorScheme ?? "default"]}
|
|
4269
4612
|
hover:${colors.subtle} hover:shadow-none
|
|
4270
4613
|
`;
|
|
4271
4614
|
}
|
|
@@ -4295,8 +4638,8 @@ function getIconStyles(size3, isAdd) {
|
|
|
4295
4638
|
scale-60
|
|
4296
4639
|
`;
|
|
4297
4640
|
}
|
|
4298
|
-
var Chip =
|
|
4299
|
-
|
|
4641
|
+
var Chip = memo4(
|
|
4642
|
+
forwardRef5(function Chip2({
|
|
4300
4643
|
colorScheme,
|
|
4301
4644
|
children: children2,
|
|
4302
4645
|
deletable,
|
|
@@ -4318,8 +4661,8 @@ var Chip = memo3(
|
|
|
4318
4661
|
onHoverChange: onHoverDeleteChange
|
|
4319
4662
|
});
|
|
4320
4663
|
const handleClick = !children2 && !deletable && addable ? onAdd : onClick;
|
|
4321
|
-
const color = colorScheme === "primary" ?
|
|
4322
|
-
return /* @__PURE__ */
|
|
4664
|
+
const color = colorScheme === "primary" ? cssVars.colors.primary : colorScheme === "secondary" ? cssVars.colors.secondary : cssVars.colors.text;
|
|
4665
|
+
return /* @__PURE__ */ React8.createElement(
|
|
4323
4666
|
"span",
|
|
4324
4667
|
{
|
|
4325
4668
|
ref: forwardedRef,
|
|
@@ -4338,7 +4681,7 @@ var Chip = memo3(
|
|
|
4338
4681
|
tabIndex,
|
|
4339
4682
|
...rest
|
|
4340
4683
|
},
|
|
4341
|
-
addable && /* @__PURE__ */
|
|
4684
|
+
addable && /* @__PURE__ */ React8.createElement(
|
|
4342
4685
|
PlusIcon,
|
|
4343
4686
|
{
|
|
4344
4687
|
className: getIconStyles(size3, true),
|
|
@@ -4350,7 +4693,7 @@ var Chip = memo3(
|
|
|
4350
4693
|
}
|
|
4351
4694
|
),
|
|
4352
4695
|
children2,
|
|
4353
|
-
deletable && /* @__PURE__ */
|
|
4696
|
+
deletable && /* @__PURE__ */ React8.createElement(
|
|
4354
4697
|
Cross1Icon,
|
|
4355
4698
|
{
|
|
4356
4699
|
className: getIconStyles(size3, false),
|
|
@@ -4370,31 +4713,31 @@ var Chip = memo3(
|
|
|
4370
4713
|
import { CheckIcon as CheckIcon2, ChevronRightIcon as ChevronRightIcon2 } from "@noya-app/noya-icons";
|
|
4371
4714
|
import { useKeyboardShortcuts as useKeyboardShortcuts2 } from "@noya-app/noya-keymap";
|
|
4372
4715
|
import * as RadixContextMenu from "@radix-ui/react-context-menu";
|
|
4373
|
-
import
|
|
4716
|
+
import React25, { memo as memo12, useCallback as useCallback13, useMemo as useMemo11 } from "react";
|
|
4374
4717
|
|
|
4375
4718
|
// src/components/Icons.tsx
|
|
4376
4719
|
import * as Icons from "@noya-app/noya-icons";
|
|
4377
|
-
import
|
|
4720
|
+
import React9 from "react";
|
|
4378
4721
|
function renderIcon(iconName) {
|
|
4379
4722
|
if (typeof iconName === "string") {
|
|
4380
4723
|
const Icon = Icons[iconName];
|
|
4381
|
-
return /* @__PURE__ */
|
|
4724
|
+
return /* @__PURE__ */ React9.createElement(Icon, null);
|
|
4382
4725
|
}
|
|
4383
4726
|
return iconName;
|
|
4384
4727
|
}
|
|
4385
4728
|
|
|
4386
4729
|
// src/components/Spacer.tsx
|
|
4387
|
-
import
|
|
4388
|
-
var SpacerVertical =
|
|
4730
|
+
import React10, { forwardRef as forwardRef6 } from "react";
|
|
4731
|
+
var SpacerVertical = forwardRef6(
|
|
4389
4732
|
({ size: size3, inline, ...props }, ref) => {
|
|
4390
|
-
return /* @__PURE__ */
|
|
4733
|
+
return /* @__PURE__ */ React10.createElement("span", { className: `${inline ? "inline-block" : "block"} ${size3 === void 0 ? "flex flex-1" : ""}`, style: size3 ? {
|
|
4391
4734
|
minHeight: `${size3}px`
|
|
4392
4735
|
} : void 0, ...props, ref });
|
|
4393
4736
|
}
|
|
4394
4737
|
);
|
|
4395
|
-
var SpacerHorizontal =
|
|
4738
|
+
var SpacerHorizontal = forwardRef6(
|
|
4396
4739
|
({ size: size3, inline, ...props }, ref) => {
|
|
4397
|
-
return /* @__PURE__ */
|
|
4740
|
+
return /* @__PURE__ */ React10.createElement("span", { className: `${inline ? "inline-block" : "block"} ${size3 === void 0 ? "flex flex-1" : ""}`, style: size3 ? {
|
|
4398
4741
|
minWidth: `${size3}px`
|
|
4399
4742
|
} : void 0, ...props, ref });
|
|
4400
4743
|
}
|
|
@@ -4407,13 +4750,13 @@ var Spacer;
|
|
|
4407
4750
|
|
|
4408
4751
|
// src/components/internal/Menu.tsx
|
|
4409
4752
|
import { getShortcutDisplayParts } from "@noya-app/noya-keymap";
|
|
4410
|
-
import
|
|
4753
|
+
import React24, { memo as memo11 } from "react";
|
|
4411
4754
|
|
|
4412
4755
|
// src/contexts/DesignSystemConfiguration.tsx
|
|
4413
4756
|
import { getCurrentPlatform } from "@noya-app/noya-keymap";
|
|
4414
|
-
import
|
|
4757
|
+
import React23, {
|
|
4415
4758
|
createContext as createContext5,
|
|
4416
|
-
memo as
|
|
4759
|
+
memo as memo10,
|
|
4417
4760
|
useContext as useContext5,
|
|
4418
4761
|
useEffect as useEffect12,
|
|
4419
4762
|
useMemo as useMemo10,
|
|
@@ -4422,16 +4765,16 @@ import React22, {
|
|
|
4422
4765
|
|
|
4423
4766
|
// src/components/Toast.tsx
|
|
4424
4767
|
import * as ToastPrimitive from "@radix-ui/react-toast";
|
|
4425
|
-
import
|
|
4768
|
+
import React12 from "react";
|
|
4426
4769
|
|
|
4427
4770
|
// src/components/IconButton.tsx
|
|
4428
|
-
import
|
|
4429
|
-
forwardRef as
|
|
4430
|
-
memo as
|
|
4771
|
+
import React11, {
|
|
4772
|
+
forwardRef as forwardRef7,
|
|
4773
|
+
memo as memo5,
|
|
4431
4774
|
useMemo as useMemo2
|
|
4432
4775
|
} from "react";
|
|
4433
|
-
var IconButton =
|
|
4434
|
-
|
|
4776
|
+
var IconButton = memo5(
|
|
4777
|
+
forwardRef7(function IconButton2({ selected, iconName, color, size: size3, contentStyle, ...props }, forwardedRef) {
|
|
4435
4778
|
const Icon = Icons[iconName];
|
|
4436
4779
|
const style5 = useMemo2(() => {
|
|
4437
4780
|
return {
|
|
@@ -4440,10 +4783,10 @@ var IconButton = memo4(
|
|
|
4440
4783
|
...contentStyle
|
|
4441
4784
|
};
|
|
4442
4785
|
}, [contentStyle, size3]);
|
|
4443
|
-
return /* @__PURE__ */
|
|
4786
|
+
return /* @__PURE__ */ React11.createElement(Button, { ref: forwardedRef, ...props, variant: "none", contentStyle: style5 }, /* @__PURE__ */ React11.createElement(
|
|
4444
4787
|
Icon,
|
|
4445
4788
|
{
|
|
4446
|
-
color: color ?? (selected ?
|
|
4789
|
+
color: color ?? (selected ? cssVars.colors.iconSelected : cssVars.colors.icon),
|
|
4447
4790
|
...size3 && { width: size3, height: size3 }
|
|
4448
4791
|
}
|
|
4449
4792
|
));
|
|
@@ -4457,22 +4800,22 @@ var Toast = ({
|
|
|
4457
4800
|
children: children2,
|
|
4458
4801
|
...props
|
|
4459
4802
|
}) => {
|
|
4460
|
-
return /* @__PURE__ */
|
|
4803
|
+
return /* @__PURE__ */ React12.createElement(
|
|
4461
4804
|
ToastPrimitive.Root,
|
|
4462
4805
|
{
|
|
4463
4806
|
className: "px-2 py-2.5 grid grid-cols-[auto_max-content] gap-x-2.5 items-center rounded text-sm bg-popover-background shadow-[0_2px_4px_rgba(0,0,0,0.2),0_0_12px_rgba(0,0,0,0.1)] text-text-muted",
|
|
4464
4807
|
...props
|
|
4465
4808
|
},
|
|
4466
|
-
title && /* @__PURE__ */
|
|
4467
|
-
/* @__PURE__ */
|
|
4468
|
-
children2 && /* @__PURE__ */
|
|
4469
|
-
/* @__PURE__ */
|
|
4809
|
+
title && /* @__PURE__ */ React12.createElement(ToastPrimitive.Title, { className: `mb-[5px] ${textStyles.label} font-bold text-text` }, title),
|
|
4810
|
+
/* @__PURE__ */ React12.createElement(ToastPrimitive.Description, { className: `${textStyles.small} text-text-muted` }, content),
|
|
4811
|
+
children2 && /* @__PURE__ */ React12.createElement(ToastPrimitive.Action, { asChild: true, altText: "" }, children2),
|
|
4812
|
+
/* @__PURE__ */ React12.createElement(ToastPrimitive.Close, { "aria-label": "Close", asChild: true }, /* @__PURE__ */ React12.createElement(IconButton, { iconName: "Cross1Icon" }))
|
|
4470
4813
|
);
|
|
4471
4814
|
};
|
|
4472
|
-
var ToastProvider = ({ children: children2 }) => /* @__PURE__ */
|
|
4815
|
+
var ToastProvider = ({ children: children2 }) => /* @__PURE__ */ React12.createElement(ToastPrimitive.Provider, null, children2, /* @__PURE__ */ React12.createElement(ToastPrimitive.Viewport, { className: "fixed bottom-0 right-0 flex flex-col p-5 g-2.5 min-w-[200px] max-w-[100vw] m-0 list-none z-[2147483647] outline-none" }));
|
|
4473
4816
|
|
|
4474
4817
|
// src/contexts/DialogContext.tsx
|
|
4475
|
-
import
|
|
4818
|
+
import React21, {
|
|
4476
4819
|
createContext as createContext3,
|
|
4477
4820
|
useCallback as useCallback12,
|
|
4478
4821
|
useContext as useContext3,
|
|
@@ -4483,12 +4826,12 @@ import React20, {
|
|
|
4483
4826
|
|
|
4484
4827
|
// src/components/Dialog.tsx
|
|
4485
4828
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
4486
|
-
import
|
|
4487
|
-
forwardRef as
|
|
4829
|
+
import React13, {
|
|
4830
|
+
forwardRef as forwardRef8,
|
|
4488
4831
|
useImperativeHandle,
|
|
4489
4832
|
useRef as useRef2
|
|
4490
4833
|
} from "react";
|
|
4491
|
-
var StyledOverlay =
|
|
4834
|
+
var StyledOverlay = forwardRef8(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
|
4492
4835
|
DialogPrimitive.Overlay,
|
|
4493
4836
|
{
|
|
4494
4837
|
ref,
|
|
@@ -4496,7 +4839,7 @@ var StyledOverlay = forwardRef7(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
4496
4839
|
...props
|
|
4497
4840
|
}
|
|
4498
4841
|
));
|
|
4499
|
-
var StyledContent =
|
|
4842
|
+
var StyledContent = forwardRef8(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
|
4500
4843
|
DialogPrimitive.Content,
|
|
4501
4844
|
{
|
|
4502
4845
|
ref,
|
|
@@ -4511,7 +4854,7 @@ var StyledContent = forwardRef7(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
4511
4854
|
...props
|
|
4512
4855
|
}
|
|
4513
4856
|
));
|
|
4514
|
-
var StyledTitle =
|
|
4857
|
+
var StyledTitle = forwardRef8(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
|
4515
4858
|
DialogPrimitive.Title,
|
|
4516
4859
|
{
|
|
4517
4860
|
ref,
|
|
@@ -4522,7 +4865,7 @@ var StyledTitle = forwardRef7(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
4522
4865
|
...props
|
|
4523
4866
|
}
|
|
4524
4867
|
));
|
|
4525
|
-
var StyledDescription =
|
|
4868
|
+
var StyledDescription = forwardRef8(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
|
4526
4869
|
DialogPrimitive.Description,
|
|
4527
4870
|
{
|
|
4528
4871
|
ref,
|
|
@@ -4533,7 +4876,7 @@ var StyledDescription = forwardRef7(({ className, ...props }, ref) => /* @__PURE
|
|
|
4533
4876
|
...props
|
|
4534
4877
|
}
|
|
4535
4878
|
));
|
|
4536
|
-
var CloseButtonContainer =
|
|
4879
|
+
var CloseButtonContainer = forwardRef8(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
|
4537
4880
|
"div",
|
|
4538
4881
|
{
|
|
4539
4882
|
ref,
|
|
@@ -4541,7 +4884,7 @@ var CloseButtonContainer = forwardRef7(({ className, ...props }, ref) => /* @__P
|
|
|
4541
4884
|
...props
|
|
4542
4885
|
}
|
|
4543
4886
|
));
|
|
4544
|
-
var Dialog =
|
|
4887
|
+
var Dialog = forwardRef8(function Dialog2({
|
|
4545
4888
|
children: children2,
|
|
4546
4889
|
title,
|
|
4547
4890
|
description,
|
|
@@ -4558,7 +4901,7 @@ var Dialog = forwardRef7(function Dialog2({
|
|
|
4558
4901
|
return contentRef.current.contains(element);
|
|
4559
4902
|
}
|
|
4560
4903
|
}));
|
|
4561
|
-
return /* @__PURE__ */
|
|
4904
|
+
return /* @__PURE__ */ React13.createElement(DialogPrimitive.Root, { open, onOpenChange }, /* @__PURE__ */ React13.createElement(StyledOverlay, null), /* @__PURE__ */ React13.createElement(
|
|
4562
4905
|
StyledContent,
|
|
4563
4906
|
{
|
|
4564
4907
|
ref: contentRef,
|
|
@@ -4569,14 +4912,14 @@ var Dialog = forwardRef7(function Dialog2({
|
|
|
4569
4912
|
onInteractOutside: (event) => event.preventDefault()
|
|
4570
4913
|
}
|
|
4571
4914
|
},
|
|
4572
|
-
/* @__PURE__ */
|
|
4573
|
-
title && /* @__PURE__ */
|
|
4574
|
-
description && /* @__PURE__ */
|
|
4915
|
+
/* @__PURE__ */ React13.createElement(CloseButtonContainer, null, /* @__PURE__ */ React13.createElement(DialogPrimitive.Close, { asChild: true }, /* @__PURE__ */ React13.createElement(IconButton, { iconName: "Cross1Icon" }))),
|
|
4916
|
+
title && /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(StyledTitle, null, title), /* @__PURE__ */ React13.createElement(Spacer.Vertical, { size: description ? 10 : 20 })),
|
|
4917
|
+
description && /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(Spacer.Vertical, { size: 10 }), /* @__PURE__ */ React13.createElement(StyledDescription, null, description), /* @__PURE__ */ React13.createElement(Spacer.Vertical, { size: 20 })),
|
|
4575
4918
|
children2
|
|
4576
4919
|
));
|
|
4577
4920
|
});
|
|
4578
|
-
var FullscreenDialog =
|
|
4579
|
-
return /* @__PURE__ */
|
|
4921
|
+
var FullscreenDialog = forwardRef8(function FullscreenDialog2({ style: style5, ...rest }, forwardedRef) {
|
|
4922
|
+
return /* @__PURE__ */ React13.createElement(
|
|
4580
4923
|
Dialog,
|
|
4581
4924
|
{
|
|
4582
4925
|
ref: forwardedRef,
|
|
@@ -4602,13 +4945,13 @@ var FullscreenDialog = forwardRef7(function FullscreenDialog2({ style: style5, .
|
|
|
4602
4945
|
import { CaretDownIcon } from "@noya-app/noya-icons";
|
|
4603
4946
|
|
|
4604
4947
|
// ../noya-react-utils/src/components/AutoSizer.tsx
|
|
4605
|
-
import
|
|
4948
|
+
import React15, { memo as memo6, useRef as useRef3 } from "react";
|
|
4606
4949
|
|
|
4607
4950
|
// ../noya-react-utils/src/hooks/useSize.ts
|
|
4608
|
-
import * as
|
|
4951
|
+
import * as React14 from "react";
|
|
4609
4952
|
function useSize(refToObserve, dimensions = "both") {
|
|
4610
|
-
const [size3, setSize] =
|
|
4611
|
-
|
|
4953
|
+
const [size3, setSize] = React14.useState(void 0);
|
|
4954
|
+
React14.useEffect(() => {
|
|
4612
4955
|
if (refToObserve.current) {
|
|
4613
4956
|
const elementToObserve = refToObserve.current;
|
|
4614
4957
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -4655,26 +4998,26 @@ var style = {
|
|
|
4655
4998
|
flex: "1 0 0",
|
|
4656
4999
|
flexDirection: "column"
|
|
4657
5000
|
};
|
|
4658
|
-
var AutoSizer =
|
|
5001
|
+
var AutoSizer = memo6(function AutoSizer2({
|
|
4659
5002
|
children: children2,
|
|
4660
5003
|
className
|
|
4661
5004
|
}) {
|
|
4662
5005
|
const containerRef = useRef3(null);
|
|
4663
5006
|
const containerSize = useSize(containerRef);
|
|
4664
|
-
return /* @__PURE__ */
|
|
5007
|
+
return /* @__PURE__ */ React15.createElement("div", { ref: containerRef, style, className }, containerSize && containerSize.width > 0 && containerSize.height > 0 && children2(containerSize));
|
|
4665
5008
|
});
|
|
4666
|
-
var SingleDimensionAutoSizer =
|
|
5009
|
+
var SingleDimensionAutoSizer = memo6(function SingleDimensionAutoSizer2({
|
|
4667
5010
|
children: children2,
|
|
4668
5011
|
dimension,
|
|
4669
5012
|
className
|
|
4670
5013
|
}) {
|
|
4671
5014
|
const containerRef = useRef3(null);
|
|
4672
5015
|
const containerSize = useSize(containerRef, dimension);
|
|
4673
|
-
return /* @__PURE__ */
|
|
5016
|
+
return /* @__PURE__ */ React15.createElement("div", { ref: containerRef, style, className }, containerSize && containerSize[dimension] > 0 && children2(containerSize[dimension]));
|
|
4674
5017
|
});
|
|
4675
5018
|
|
|
4676
5019
|
// ../noya-react-utils/src/components/FileDropTarget.tsx
|
|
4677
|
-
import
|
|
5020
|
+
import React16, { memo as memo7, useCallback as useCallback3, useRef as useRef4 } from "react";
|
|
4678
5021
|
|
|
4679
5022
|
// ../noya-react-utils/src/hooks/useFileDropTarget.ts
|
|
4680
5023
|
import { useCallback as useCallback2, useState as useState3 } from "react";
|
|
@@ -4724,7 +5067,7 @@ function useFileDropTarget(ref, dropEvent) {
|
|
|
4724
5067
|
function isSupportedFile(file, supportedFileTypes) {
|
|
4725
5068
|
return supportedFileTypes.includes(file.type) || file.type === "" && file.name.endsWith(".sketch");
|
|
4726
5069
|
}
|
|
4727
|
-
var FileDropTarget =
|
|
5070
|
+
var FileDropTarget = memo7(function FileDropTarget2({
|
|
4728
5071
|
children: children2,
|
|
4729
5072
|
onDropFiles,
|
|
4730
5073
|
supportedFileTypes,
|
|
@@ -4767,7 +5110,7 @@ var FileDropTarget = memo6(function FileDropTarget2({
|
|
|
4767
5110
|
ref,
|
|
4768
5111
|
handleFile
|
|
4769
5112
|
);
|
|
4770
|
-
return /* @__PURE__ */
|
|
5113
|
+
return /* @__PURE__ */ React16.createElement("div", { ref, ...dropTargetProps, ...props }, typeof children2 === "function" ? children2(isDropTargetActive) : children2);
|
|
4771
5114
|
});
|
|
4772
5115
|
|
|
4773
5116
|
// ../noya-react-utils/src/hooks/useDeepArray.ts
|
|
@@ -4906,15 +5249,16 @@ function assignRef(ref, value) {
|
|
|
4906
5249
|
}
|
|
4907
5250
|
|
|
4908
5251
|
// src/components/InputField.tsx
|
|
4909
|
-
import
|
|
5252
|
+
import React20, {
|
|
4910
5253
|
Children,
|
|
4911
5254
|
createContext as createContext2,
|
|
4912
|
-
forwardRef as
|
|
5255
|
+
forwardRef as forwardRef11,
|
|
4913
5256
|
isValidElement,
|
|
4914
|
-
memo as
|
|
5257
|
+
memo as memo9,
|
|
4915
5258
|
useCallback as useCallback11,
|
|
4916
5259
|
useContext as useContext2,
|
|
4917
5260
|
useEffect as useEffect11,
|
|
5261
|
+
useId,
|
|
4918
5262
|
useLayoutEffect as useLayoutEffect4,
|
|
4919
5263
|
useMemo as useMemo7,
|
|
4920
5264
|
useRef as useRef12,
|
|
@@ -4948,13 +5292,13 @@ function handleNudge(e) {
|
|
|
4948
5292
|
import { CheckIcon, ChevronRightIcon } from "@noya-app/noya-icons";
|
|
4949
5293
|
import { useKeyboardShortcuts } from "@noya-app/noya-keymap";
|
|
4950
5294
|
import * as RadixDropdownMenu from "@radix-ui/react-dropdown-menu";
|
|
4951
|
-
import
|
|
4952
|
-
forwardRef as
|
|
4953
|
-
memo as
|
|
5295
|
+
import React17, {
|
|
5296
|
+
forwardRef as forwardRef9,
|
|
5297
|
+
memo as memo8,
|
|
4954
5298
|
useCallback as useCallback9,
|
|
4955
5299
|
useMemo as useMemo6
|
|
4956
5300
|
} from "react";
|
|
4957
|
-
var DropdownMenuItem =
|
|
5301
|
+
var DropdownMenuItem = memo8(function ContextMenuItem({
|
|
4958
5302
|
value,
|
|
4959
5303
|
children: children2,
|
|
4960
5304
|
onSelect,
|
|
@@ -4970,7 +5314,7 @@ var DropdownMenuItem = memo7(function ContextMenuItem({
|
|
|
4970
5314
|
onSelect(value);
|
|
4971
5315
|
}, [onSelect, value]);
|
|
4972
5316
|
if (checked) {
|
|
4973
|
-
return /* @__PURE__ */
|
|
5317
|
+
return /* @__PURE__ */ React17.createElement(
|
|
4974
5318
|
RadixDropdownMenu.CheckboxItem,
|
|
4975
5319
|
{
|
|
4976
5320
|
checked,
|
|
@@ -4978,26 +5322,26 @@ var DropdownMenuItem = memo7(function ContextMenuItem({
|
|
|
4978
5322
|
onSelect: handleSelectItem,
|
|
4979
5323
|
className: styles.itemStyle({ disabled })
|
|
4980
5324
|
},
|
|
4981
|
-
/* @__PURE__ */
|
|
4982
|
-
icon && /* @__PURE__ */
|
|
5325
|
+
/* @__PURE__ */ React17.createElement(RadixDropdownMenu.ItemIndicator, { className: styles.itemIndicatorStyle }, /* @__PURE__ */ React17.createElement(CheckIcon, null)),
|
|
5326
|
+
icon && /* @__PURE__ */ React17.createElement(React17.Fragment, null, renderIcon(icon), /* @__PURE__ */ React17.createElement(Spacer.Horizontal, { size: 8 })),
|
|
4983
5327
|
children2
|
|
4984
5328
|
);
|
|
4985
5329
|
}
|
|
4986
|
-
const element = /* @__PURE__ */
|
|
5330
|
+
const element = /* @__PURE__ */ React17.createElement(
|
|
4987
5331
|
RadixDropdownMenu.Item,
|
|
4988
5332
|
{
|
|
4989
5333
|
disabled,
|
|
4990
5334
|
onSelect: handleSelectItem,
|
|
4991
5335
|
className: styles.itemStyle({ disabled })
|
|
4992
5336
|
},
|
|
4993
|
-
indented && /* @__PURE__ */
|
|
4994
|
-
icon && /* @__PURE__ */
|
|
5337
|
+
indented && /* @__PURE__ */ React17.createElement(Spacer.Horizontal, { size: CHECKBOX_WIDTH - CHECKBOX_RIGHT_INSET }),
|
|
5338
|
+
icon && /* @__PURE__ */ React17.createElement(React17.Fragment, null, renderIcon(icon), /* @__PURE__ */ React17.createElement(Spacer.Horizontal, { size: 8 })),
|
|
4995
5339
|
children2,
|
|
4996
|
-
shortcut && /* @__PURE__ */
|
|
4997
|
-
items && items.length > 0 && /* @__PURE__ */
|
|
5340
|
+
shortcut && /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React17.createElement(Spacer.Horizontal, { size: 24 }), /* @__PURE__ */ React17.createElement(KeyboardShortcut, { shortcut })),
|
|
5341
|
+
items && items.length > 0 && /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React17.createElement(Spacer.Horizontal, { size: 16 }), /* @__PURE__ */ React17.createElement(ChevronRightIcon, null))
|
|
4998
5342
|
);
|
|
4999
5343
|
if (items && items.length > 0) {
|
|
5000
|
-
return /* @__PURE__ */
|
|
5344
|
+
return /* @__PURE__ */ React17.createElement(
|
|
5001
5345
|
DropdownMenuRoot,
|
|
5002
5346
|
{
|
|
5003
5347
|
isNested: true,
|
|
@@ -5011,7 +5355,7 @@ var DropdownMenuItem = memo7(function ContextMenuItem({
|
|
|
5011
5355
|
return element;
|
|
5012
5356
|
}
|
|
5013
5357
|
});
|
|
5014
|
-
var DropdownMenuRoot =
|
|
5358
|
+
var DropdownMenuRoot = forwardRef9(function DropdownMenuRoot2({
|
|
5015
5359
|
items,
|
|
5016
5360
|
children: children2,
|
|
5017
5361
|
onSelect,
|
|
@@ -5039,7 +5383,7 @@ var DropdownMenuRoot = forwardRef8(function DropdownMenuRoot2({
|
|
|
5039
5383
|
const TriggerComponent = isNested ? RadixDropdownMenu.SubTrigger : RadixDropdownMenu.Trigger;
|
|
5040
5384
|
const ContentComponent = isNested ? RadixDropdownMenu.SubContent : RadixDropdownMenu.Content;
|
|
5041
5385
|
const contentStyle = useMemo6(() => ({ zIndex: 1e3 }), []);
|
|
5042
|
-
return /* @__PURE__ */
|
|
5386
|
+
return /* @__PURE__ */ React17.createElement(RootComponent, { onOpenChange, open }, /* @__PURE__ */ React17.createElement(TriggerComponent, { ref: forwardedRef, asChild: true }, children2), /* @__PURE__ */ React17.createElement(RadixDropdownMenu.Portal, null, /* @__PURE__ */ React17.createElement(
|
|
5043
5387
|
ContentComponent,
|
|
5044
5388
|
{
|
|
5045
5389
|
className: styles.contentStyle,
|
|
@@ -5053,13 +5397,13 @@ var DropdownMenuRoot = forwardRef8(function DropdownMenuRoot2({
|
|
|
5053
5397
|
},
|
|
5054
5398
|
items.length === 0 ? emptyState : null,
|
|
5055
5399
|
items.map(
|
|
5056
|
-
(item, index) => item === SEPARATOR_ITEM ? /* @__PURE__ */
|
|
5400
|
+
(item, index) => item === SEPARATOR_ITEM ? /* @__PURE__ */ React17.createElement(
|
|
5057
5401
|
RadixDropdownMenu.Separator,
|
|
5058
5402
|
{
|
|
5059
5403
|
key: index,
|
|
5060
5404
|
className: styles.separatorStyle
|
|
5061
5405
|
}
|
|
5062
|
-
) : /* @__PURE__ */
|
|
5406
|
+
) : /* @__PURE__ */ React17.createElement(
|
|
5063
5407
|
DropdownMenuItem,
|
|
5064
5408
|
{
|
|
5065
5409
|
key: item.value ?? index,
|
|
@@ -5077,12 +5421,12 @@ var DropdownMenuRoot = forwardRef8(function DropdownMenuRoot2({
|
|
|
5077
5421
|
)
|
|
5078
5422
|
)));
|
|
5079
5423
|
});
|
|
5080
|
-
var DropdownMenu =
|
|
5424
|
+
var DropdownMenu = memo8(DropdownMenuRoot);
|
|
5081
5425
|
|
|
5082
5426
|
// src/components/internal/TextInput.tsx
|
|
5083
5427
|
import { composeRefs } from "@radix-ui/react-compose-refs";
|
|
5084
|
-
import
|
|
5085
|
-
forwardRef as
|
|
5428
|
+
import React18, {
|
|
5429
|
+
forwardRef as forwardRef10,
|
|
5086
5430
|
useCallback as useCallback10,
|
|
5087
5431
|
useEffect as useEffect10,
|
|
5088
5432
|
useLayoutEffect as useLayoutEffect3,
|
|
@@ -5130,19 +5474,20 @@ function useGlobalInputBlurTrigger() {
|
|
|
5130
5474
|
}
|
|
5131
5475
|
|
|
5132
5476
|
// src/components/internal/TextInput.tsx
|
|
5133
|
-
var ReadOnlyTextInput =
|
|
5134
|
-
return /* @__PURE__ */
|
|
5477
|
+
var ReadOnlyTextInput = forwardRef10(function ReadOnlyTextInput2({ onKeyDown, onFocusChange, value, ...rest }, forwardedRef) {
|
|
5478
|
+
return /* @__PURE__ */ React18.createElement(
|
|
5135
5479
|
"input",
|
|
5136
5480
|
{
|
|
5137
5481
|
ref: forwardedRef,
|
|
5138
5482
|
...rest,
|
|
5139
5483
|
value,
|
|
5140
5484
|
onKeyDown,
|
|
5141
|
-
readOnly: true
|
|
5485
|
+
readOnly: true,
|
|
5486
|
+
className: "focus:z-interactable"
|
|
5142
5487
|
}
|
|
5143
5488
|
);
|
|
5144
5489
|
});
|
|
5145
|
-
var ControlledTextInput =
|
|
5490
|
+
var ControlledTextInput = forwardRef10(function ControlledTextInput2({
|
|
5146
5491
|
onKeyDown,
|
|
5147
5492
|
value,
|
|
5148
5493
|
onChange,
|
|
@@ -5165,7 +5510,7 @@ var ControlledTextInput = forwardRef9(function ControlledTextInput2({
|
|
|
5165
5510
|
},
|
|
5166
5511
|
[onFocusCapture, onFocusChange]
|
|
5167
5512
|
);
|
|
5168
|
-
return /* @__PURE__ */
|
|
5513
|
+
return /* @__PURE__ */ React18.createElement(
|
|
5169
5514
|
"input",
|
|
5170
5515
|
{
|
|
5171
5516
|
ref: forwardedRef,
|
|
@@ -5181,7 +5526,7 @@ var ControlledTextInput = forwardRef9(function ControlledTextInput2({
|
|
|
5181
5526
|
}
|
|
5182
5527
|
);
|
|
5183
5528
|
});
|
|
5184
|
-
var SubmittableTextInput =
|
|
5529
|
+
var SubmittableTextInput = forwardRef10(function SubmittableTextInput2({
|
|
5185
5530
|
onKeyDown,
|
|
5186
5531
|
value,
|
|
5187
5532
|
onSubmit,
|
|
@@ -5192,7 +5537,7 @@ var SubmittableTextInput = forwardRef9(function SubmittableTextInput2({
|
|
|
5192
5537
|
submitAutomaticallyAfterDelay,
|
|
5193
5538
|
...rest
|
|
5194
5539
|
}, forwardedRef) {
|
|
5195
|
-
const ref =
|
|
5540
|
+
const ref = React18.useRef(null);
|
|
5196
5541
|
const latestValue = useRef11(value);
|
|
5197
5542
|
latestValue.current = value;
|
|
5198
5543
|
const userDidEdit = useRef11(false);
|
|
@@ -5273,7 +5618,7 @@ var SubmittableTextInput = forwardRef9(function SubmittableTextInput2({
|
|
|
5273
5618
|
}
|
|
5274
5619
|
};
|
|
5275
5620
|
}, [internalValue, submitAutomaticallyAfterDelay]);
|
|
5276
|
-
return /* @__PURE__ */
|
|
5621
|
+
return /* @__PURE__ */ React18.createElement(
|
|
5277
5622
|
"input",
|
|
5278
5623
|
{
|
|
5279
5624
|
ref: composeRefs(ref, forwardedRef),
|
|
@@ -5286,7 +5631,7 @@ var SubmittableTextInput = forwardRef9(function SubmittableTextInput2({
|
|
|
5286
5631
|
}
|
|
5287
5632
|
);
|
|
5288
5633
|
});
|
|
5289
|
-
var TextInput_default =
|
|
5634
|
+
var TextInput_default = forwardRef10(function TextInput(props, forwardedRef) {
|
|
5290
5635
|
const commonProps = {
|
|
5291
5636
|
onPointerDown: useCallback10(
|
|
5292
5637
|
(event) => event.stopPropagation(),
|
|
@@ -5305,17 +5650,17 @@ var TextInput_default = forwardRef9(function TextInput(props, forwardedRef) {
|
|
|
5305
5650
|
...props
|
|
5306
5651
|
};
|
|
5307
5652
|
if ("readOnly" in commonProps) {
|
|
5308
|
-
return /* @__PURE__ */
|
|
5653
|
+
return /* @__PURE__ */ React18.createElement(ReadOnlyTextInput, { ref: forwardedRef, ...commonProps, readOnly: true });
|
|
5309
5654
|
} else if ("onChange" in commonProps) {
|
|
5310
|
-
return /* @__PURE__ */
|
|
5655
|
+
return /* @__PURE__ */ React18.createElement(ControlledTextInput, { ref: forwardedRef, ...commonProps });
|
|
5311
5656
|
} else {
|
|
5312
|
-
return /* @__PURE__ */
|
|
5657
|
+
return /* @__PURE__ */ React18.createElement(SubmittableTextInput, { ref: forwardedRef, ...commonProps });
|
|
5313
5658
|
}
|
|
5314
5659
|
});
|
|
5315
5660
|
|
|
5316
5661
|
// src/components/Popover.tsx
|
|
5317
5662
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
5318
|
-
import
|
|
5663
|
+
import React19 from "react";
|
|
5319
5664
|
var closeStyles = {
|
|
5320
5665
|
all: "unset",
|
|
5321
5666
|
fontFamily: "inherit"
|
|
@@ -5337,7 +5682,7 @@ function Popover({
|
|
|
5337
5682
|
onFocusOutside,
|
|
5338
5683
|
onClickClose
|
|
5339
5684
|
}) {
|
|
5340
|
-
return /* @__PURE__ */
|
|
5685
|
+
return /* @__PURE__ */ React19.createElement(PopoverPrimitive.Root, { open, onOpenChange }, /* @__PURE__ */ React19.createElement(PopoverPrimitive.Trigger, { asChild: true }, trigger), /* @__PURE__ */ React19.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React19.createElement(
|
|
5341
5686
|
PopoverPrimitive.Content,
|
|
5342
5687
|
{
|
|
5343
5688
|
className: `rounded font-[14px] bg-popover-background shadow-[0_2px_4px_rgba(0,0,0,0.2),0_0_12px_rgba(0,0,0,0.1)] max-h-[600px] overflow-y-auto text-text-muted z-[1000] ${variant === "large" ? "w-[680px]" : variant === "normal" ? "w-[240px]" : ""}`,
|
|
@@ -5353,14 +5698,14 @@ function Popover({
|
|
|
5353
5698
|
arrowPadding: 2
|
|
5354
5699
|
},
|
|
5355
5700
|
children2,
|
|
5356
|
-
showArrow && /* @__PURE__ */
|
|
5357
|
-
closable && /* @__PURE__ */
|
|
5701
|
+
showArrow && /* @__PURE__ */ React19.createElement(PopoverPrimitive.Arrow, { className: "fill-popover-background" }),
|
|
5702
|
+
closable && /* @__PURE__ */ React19.createElement(
|
|
5358
5703
|
PopoverPrimitive.Close,
|
|
5359
5704
|
{
|
|
5360
5705
|
className: "rounded-full h-[25px] w-[25px] inline-flex items-center justify-center absolute top-[5px] right-[5px]",
|
|
5361
5706
|
style: closeStyles
|
|
5362
5707
|
},
|
|
5363
|
-
/* @__PURE__ */
|
|
5708
|
+
/* @__PURE__ */ React19.createElement(IconButton, { iconName: "Cross2Icon", onClick: onClickClose })
|
|
5364
5709
|
)
|
|
5365
5710
|
)));
|
|
5366
5711
|
}
|
|
@@ -5376,31 +5721,35 @@ var InputFieldContext = createContext2({
|
|
|
5376
5721
|
onFocusChange: () => {
|
|
5377
5722
|
}
|
|
5378
5723
|
});
|
|
5379
|
-
var LabelContainer =
|
|
5380
|
-
|
|
5381
|
-
|
|
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
|
+
() => ({
|
|
5382
5734
|
left: $labelPosition === "start" ? $size === "large" ? "6px" : $size === "medium" ? "2px" : "0px" : "",
|
|
5383
|
-
right: $labelPosition === "end" ? $size === "large" ? "6px" : $size === "medium" ? "2px" : "0px" : ""
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
}
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
className
|
|
5402
|
-
}, forwardedRef) {
|
|
5403
|
-
const { labelPosition, hasDropdown, setLabelWidth, size: size3 } = useContext2(InputFieldContext);
|
|
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
|
+
});
|
|
5750
|
+
var InputFieldLabel = memo9(
|
|
5751
|
+
forwardRef11(function InputFieldLabel2(props, forwardedRef) {
|
|
5752
|
+
const { labelPosition, hasDropdown, setLabelWidth, size: size3, id } = useContext2(InputFieldContext);
|
|
5404
5753
|
const ref = useRef12(null);
|
|
5405
5754
|
useLayoutEffect4(() => {
|
|
5406
5755
|
if (!setLabelWidth) return;
|
|
@@ -5408,25 +5757,23 @@ var InputFieldLabel = memo8(
|
|
|
5408
5757
|
if (!width) return;
|
|
5409
5758
|
setLabelWidth(width);
|
|
5410
5759
|
}, [setLabelWidth]);
|
|
5411
|
-
return /* @__PURE__ */
|
|
5760
|
+
return /* @__PURE__ */ React20.createElement(
|
|
5412
5761
|
LabelContainer,
|
|
5413
5762
|
{
|
|
5414
|
-
$size: size3,
|
|
5415
5763
|
ref: (element) => {
|
|
5416
5764
|
ref.current = element;
|
|
5417
5765
|
assignRef(forwardedRef, element);
|
|
5418
5766
|
},
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
}
|
|
5425
|
-
children2
|
|
5767
|
+
size: size3,
|
|
5768
|
+
labelPosition,
|
|
5769
|
+
hasDropdown,
|
|
5770
|
+
htmlFor: id,
|
|
5771
|
+
...props
|
|
5772
|
+
}
|
|
5426
5773
|
);
|
|
5427
5774
|
})
|
|
5428
5775
|
);
|
|
5429
|
-
var DropdownContainer =
|
|
5776
|
+
var DropdownContainer = forwardRef11(({ className, ...props }, ref) => /* @__PURE__ */ React20.createElement(
|
|
5430
5777
|
"span",
|
|
5431
5778
|
{
|
|
5432
5779
|
ref,
|
|
@@ -5434,7 +5781,7 @@ var DropdownContainer = forwardRef10(({ className, ...props }, ref) => /* @__PUR
|
|
|
5434
5781
|
...props
|
|
5435
5782
|
}
|
|
5436
5783
|
));
|
|
5437
|
-
var InputFieldDropdownMenu =
|
|
5784
|
+
var InputFieldDropdownMenu = memo9(function InputFieldDropdownMenu2({ id, items, onSelect, children: children2 }) {
|
|
5438
5785
|
const { size: size3 } = useContext2(InputFieldContext);
|
|
5439
5786
|
const contentStyle = useMemo7(
|
|
5440
5787
|
() => ({
|
|
@@ -5443,7 +5790,7 @@ var InputFieldDropdownMenu = memo8(function InputFieldDropdownMenu2({ id, items,
|
|
|
5443
5790
|
}),
|
|
5444
5791
|
[size3]
|
|
5445
5792
|
);
|
|
5446
|
-
return /* @__PURE__ */
|
|
5793
|
+
return /* @__PURE__ */ React20.createElement(DropdownContainer, null, /* @__PURE__ */ React20.createElement(DropdownMenu, { items, onSelect }, children2 || /* @__PURE__ */ React20.createElement(
|
|
5447
5794
|
Button,
|
|
5448
5795
|
{
|
|
5449
5796
|
id,
|
|
@@ -5451,10 +5798,10 @@ var InputFieldDropdownMenu = memo8(function InputFieldDropdownMenu2({ id, items,
|
|
|
5451
5798
|
className: "flex flex-1",
|
|
5452
5799
|
contentStyle
|
|
5453
5800
|
},
|
|
5454
|
-
/* @__PURE__ */
|
|
5801
|
+
/* @__PURE__ */ React20.createElement(CaretDownIcon, null)
|
|
5455
5802
|
)));
|
|
5456
5803
|
});
|
|
5457
|
-
var ButtonContainer =
|
|
5804
|
+
var ButtonContainer = forwardRef11(({ $size, className, ...props }, ref) => /* @__PURE__ */ React20.createElement(
|
|
5458
5805
|
"span",
|
|
5459
5806
|
{
|
|
5460
5807
|
ref,
|
|
@@ -5462,8 +5809,8 @@ var ButtonContainer = forwardRef10(({ $size, className, ...props }, ref) => /* @
|
|
|
5462
5809
|
...props
|
|
5463
5810
|
}
|
|
5464
5811
|
));
|
|
5465
|
-
var InputFieldButton =
|
|
5466
|
-
|
|
5812
|
+
var InputFieldButton = memo9(
|
|
5813
|
+
forwardRef11(function InputFieldButton2(props, forwardedRef) {
|
|
5467
5814
|
const { children: children2, onClick, ...rest } = props;
|
|
5468
5815
|
const { size: size3, inputRef, setButtonWidth } = useContext2(InputFieldContext);
|
|
5469
5816
|
const ref = useRef12(null);
|
|
@@ -5491,7 +5838,7 @@ var InputFieldButton = memo8(
|
|
|
5491
5838
|
},
|
|
5492
5839
|
[]
|
|
5493
5840
|
);
|
|
5494
|
-
return /* @__PURE__ */
|
|
5841
|
+
return /* @__PURE__ */ React20.createElement(ButtonContainer, { $size: size3 }, /* @__PURE__ */ React20.createElement(
|
|
5495
5842
|
Button,
|
|
5496
5843
|
{
|
|
5497
5844
|
ref: (element) => {
|
|
@@ -5509,7 +5856,7 @@ var InputFieldButton = memo8(
|
|
|
5509
5856
|
));
|
|
5510
5857
|
})
|
|
5511
5858
|
);
|
|
5512
|
-
var InputElement =
|
|
5859
|
+
var InputElement = forwardRef11(
|
|
5513
5860
|
({
|
|
5514
5861
|
disabled,
|
|
5515
5862
|
readOnly,
|
|
@@ -5527,25 +5874,28 @@ var InputElement = forwardRef10(
|
|
|
5527
5874
|
}, ref) => {
|
|
5528
5875
|
const paddingLeft = ($size === "large" ? 10 : $size === "medium" ? 6 : 4) + ($labelSize && $labelPosition === "start" ? 6 + $labelSize : 0);
|
|
5529
5876
|
const paddingRight = ($size === "large" ? 10 : $size === "medium" ? 6 : 1) + ($labelSize && $labelPosition === "end" ? 6 + $labelSize : 0) + ($hasDropdown ? 11 : 0);
|
|
5530
|
-
const memoizedStyles = useMemo7(
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5877
|
+
const memoizedStyles = useMemo7(
|
|
5878
|
+
() => ({
|
|
5879
|
+
paddingLeft: `${paddingLeft}px`,
|
|
5880
|
+
paddingRight: `${paddingRight}px`
|
|
5881
|
+
}),
|
|
5882
|
+
[paddingLeft, paddingRight]
|
|
5883
|
+
);
|
|
5884
|
+
return /* @__PURE__ */ React20.createElement(
|
|
5535
5885
|
TextInput_default,
|
|
5536
5886
|
{
|
|
5537
5887
|
value: value ?? "",
|
|
5538
5888
|
onSubmit: onSubmit ?? (() => {
|
|
5539
5889
|
}),
|
|
5540
5890
|
ref,
|
|
5541
|
-
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 ?? ""}`,
|
|
5542
5892
|
style: memoizedStyles,
|
|
5543
5893
|
...props
|
|
5544
5894
|
}
|
|
5545
5895
|
);
|
|
5546
5896
|
}
|
|
5547
5897
|
);
|
|
5548
|
-
var InputFieldInput =
|
|
5898
|
+
var InputFieldInput = forwardRef11(function InputFieldInput2({ textAlign, variant, ...rest }, forwardedRef) {
|
|
5549
5899
|
const {
|
|
5550
5900
|
labelPosition,
|
|
5551
5901
|
labelSize,
|
|
@@ -5553,7 +5903,8 @@ var InputFieldInput = forwardRef10(function InputFieldInput2({ textAlign, varian
|
|
|
5553
5903
|
buttonSize,
|
|
5554
5904
|
size: size3,
|
|
5555
5905
|
onFocusChange,
|
|
5556
|
-
setInputRef
|
|
5906
|
+
setInputRef,
|
|
5907
|
+
id
|
|
5557
5908
|
} = useContext2(InputFieldContext);
|
|
5558
5909
|
const handleFocusChange = useCallback11(
|
|
5559
5910
|
(isFocused) => {
|
|
@@ -5564,7 +5915,7 @@ var InputFieldInput = forwardRef10(function InputFieldInput2({ textAlign, varian
|
|
|
5564
5915
|
useLayoutEffect4(() => {
|
|
5565
5916
|
setInputRef?.(forwardedRef);
|
|
5566
5917
|
}, [forwardedRef, setInputRef]);
|
|
5567
|
-
return /* @__PURE__ */
|
|
5918
|
+
return /* @__PURE__ */ React20.createElement(
|
|
5568
5919
|
InputElement,
|
|
5569
5920
|
{
|
|
5570
5921
|
ref: forwardedRef,
|
|
@@ -5575,6 +5926,7 @@ var InputFieldInput = forwardRef10(function InputFieldInput2({ textAlign, varian
|
|
|
5575
5926
|
$variant: variant,
|
|
5576
5927
|
$textAlign: textAlign,
|
|
5577
5928
|
onFocusChange: handleFocusChange,
|
|
5929
|
+
id,
|
|
5578
5930
|
...rest
|
|
5579
5931
|
}
|
|
5580
5932
|
);
|
|
@@ -5587,7 +5939,7 @@ var InputFieldTypeahead = (props) => {
|
|
|
5587
5939
|
size: size3
|
|
5588
5940
|
// onFocusChange,
|
|
5589
5941
|
} = useContext2(InputFieldContext);
|
|
5590
|
-
return /* @__PURE__ */
|
|
5942
|
+
return /* @__PURE__ */ React20.createElement(
|
|
5591
5943
|
InputElement,
|
|
5592
5944
|
{
|
|
5593
5945
|
$labelPosition: labelPosition,
|
|
@@ -5598,8 +5950,8 @@ var InputFieldTypeahead = (props) => {
|
|
|
5598
5950
|
value: "",
|
|
5599
5951
|
className: "absolute inset-0 w-full h-full pointer-events-none bg-transparent shadow-none"
|
|
5600
5952
|
},
|
|
5601
|
-
/* @__PURE__ */
|
|
5602
|
-
/* @__PURE__ */
|
|
5953
|
+
/* @__PURE__ */ React20.createElement("span", { style: { opacity: 0 } }, props.prefix),
|
|
5954
|
+
/* @__PURE__ */ React20.createElement("span", { style: { opacity: 0.5 } }, props.value.slice(props.prefix.length))
|
|
5603
5955
|
);
|
|
5604
5956
|
};
|
|
5605
5957
|
function parseNumber(value) {
|
|
@@ -5655,7 +6007,7 @@ function InputFieldNumberInput(props) {
|
|
|
5655
6007
|
},
|
|
5656
6008
|
[onBlur]
|
|
5657
6009
|
);
|
|
5658
|
-
return /* @__PURE__ */
|
|
6010
|
+
return /* @__PURE__ */ React20.createElement(
|
|
5659
6011
|
InputFieldInput,
|
|
5660
6012
|
{
|
|
5661
6013
|
...rest,
|
|
@@ -5667,7 +6019,7 @@ function InputFieldNumberInput(props) {
|
|
|
5667
6019
|
}
|
|
5668
6020
|
);
|
|
5669
6021
|
}
|
|
5670
|
-
var RootContainer =
|
|
6022
|
+
var RootContainer = forwardRef11(({ $width, $flex, className, ...props }, ref) => /* @__PURE__ */ React20.createElement(
|
|
5671
6023
|
"div",
|
|
5672
6024
|
{
|
|
5673
6025
|
ref,
|
|
@@ -5689,13 +6041,14 @@ function InputFieldRoot({
|
|
|
5689
6041
|
className
|
|
5690
6042
|
}) {
|
|
5691
6043
|
const childrenArray = Children.toArray(children2);
|
|
6044
|
+
const randomId = useId();
|
|
5692
6045
|
const hasDropdown = childrenArray.some(
|
|
5693
6046
|
(child) => isValidElement(child) && child.type === InputFieldDropdownMenu
|
|
5694
6047
|
);
|
|
5695
|
-
const [isFocused, setIsFocused] =
|
|
5696
|
-
const [measuredLabelSize, setMeasuredLabelSize] =
|
|
5697
|
-
const [measuredButtonSize, setMeasuredButtonSize] =
|
|
5698
|
-
const [measuredWidth, setMeasuredWidth] =
|
|
6048
|
+
const [isFocused, setIsFocused] = React20.useState(false);
|
|
6049
|
+
const [measuredLabelSize, setMeasuredLabelSize] = React20.useState();
|
|
6050
|
+
const [measuredButtonSize, setMeasuredButtonSize] = React20.useState();
|
|
6051
|
+
const [measuredWidth, setMeasuredWidth] = React20.useState();
|
|
5699
6052
|
const handleFocusChange = useCallback11(
|
|
5700
6053
|
(isFocused2) => {
|
|
5701
6054
|
setIsFocused(isFocused2);
|
|
@@ -5703,7 +6056,7 @@ function InputFieldRoot({
|
|
|
5703
6056
|
},
|
|
5704
6057
|
[onFocusChange]
|
|
5705
6058
|
);
|
|
5706
|
-
const [inputRef, setInputRef] =
|
|
6059
|
+
const [inputRef, setInputRef] = React20.useState();
|
|
5707
6060
|
useEffect11(() => {
|
|
5708
6061
|
if (inputRef && typeof inputRef !== "function") {
|
|
5709
6062
|
setMeasuredWidth?.(
|
|
@@ -5723,7 +6076,8 @@ function InputFieldRoot({
|
|
|
5723
6076
|
inputRef,
|
|
5724
6077
|
setInputRef,
|
|
5725
6078
|
setLabelWidth: setMeasuredLabelSize,
|
|
5726
|
-
setButtonWidth: setMeasuredButtonSize
|
|
6079
|
+
setButtonWidth: setMeasuredButtonSize,
|
|
6080
|
+
id: id ?? randomId
|
|
5727
6081
|
}),
|
|
5728
6082
|
[
|
|
5729
6083
|
labelPosition,
|
|
@@ -5734,13 +6088,14 @@ function InputFieldRoot({
|
|
|
5734
6088
|
size3,
|
|
5735
6089
|
isFocused,
|
|
5736
6090
|
handleFocusChange,
|
|
5737
|
-
inputRef
|
|
6091
|
+
inputRef,
|
|
6092
|
+
id,
|
|
6093
|
+
randomId
|
|
5738
6094
|
]
|
|
5739
6095
|
);
|
|
5740
|
-
const rootElement = /* @__PURE__ */
|
|
6096
|
+
const rootElement = /* @__PURE__ */ React20.createElement(
|
|
5741
6097
|
RootContainer,
|
|
5742
6098
|
{
|
|
5743
|
-
id,
|
|
5744
6099
|
$width: width,
|
|
5745
6100
|
$flex: flex,
|
|
5746
6101
|
style: style5,
|
|
@@ -5748,7 +6103,7 @@ function InputFieldRoot({
|
|
|
5748
6103
|
},
|
|
5749
6104
|
children2
|
|
5750
6105
|
);
|
|
5751
|
-
return /* @__PURE__ */
|
|
6106
|
+
return /* @__PURE__ */ React20.createElement(InputFieldContext.Provider, { value: contextValue }, renderPopoverContent ? /* @__PURE__ */ React20.createElement(
|
|
5752
6107
|
Popover,
|
|
5753
6108
|
{
|
|
5754
6109
|
open: true,
|
|
@@ -5764,7 +6119,7 @@ function InputFieldRoot({
|
|
|
5764
6119
|
event.stopPropagation();
|
|
5765
6120
|
}
|
|
5766
6121
|
},
|
|
5767
|
-
measuredWidth && /* @__PURE__ */
|
|
6122
|
+
measuredWidth && /* @__PURE__ */ React20.createElement("div", { className: `flex flex-col w-[${measuredWidth}] hidden` }, renderPopoverContent({ width: measuredWidth }))
|
|
5768
6123
|
) : rootElement);
|
|
5769
6124
|
}
|
|
5770
6125
|
var PrimitiveInputField = ({
|
|
@@ -5772,19 +6127,19 @@ var PrimitiveInputField = ({
|
|
|
5772
6127
|
disabled,
|
|
5773
6128
|
className,
|
|
5774
6129
|
...props
|
|
5775
|
-
}) => /* @__PURE__ */
|
|
6130
|
+
}) => /* @__PURE__ */ React20.createElement(
|
|
5776
6131
|
"input",
|
|
5777
6132
|
{
|
|
5778
|
-
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 ?? ""}`,
|
|
5779
6134
|
...props
|
|
5780
6135
|
}
|
|
5781
6136
|
);
|
|
5782
6137
|
var InputField;
|
|
5783
6138
|
((InputField2) => {
|
|
5784
|
-
InputField2.Root =
|
|
5785
|
-
InputField2.Input =
|
|
5786
|
-
InputField2.Typeahead =
|
|
5787
|
-
InputField2.NumberInput =
|
|
6139
|
+
InputField2.Root = memo9(InputFieldRoot);
|
|
6140
|
+
InputField2.Input = memo9(InputFieldInput);
|
|
6141
|
+
InputField2.Typeahead = memo9(InputFieldTypeahead);
|
|
6142
|
+
InputField2.NumberInput = memo9(InputFieldNumberInput);
|
|
5788
6143
|
InputField2.DropdownMenu = InputFieldDropdownMenu;
|
|
5789
6144
|
InputField2.Button = InputFieldButton;
|
|
5790
6145
|
InputField2.Label = InputFieldLabel;
|
|
@@ -5848,7 +6203,7 @@ var DialogProvider = function DialogProvider2({
|
|
|
5848
6203
|
if (!dialogRef.current) return false;
|
|
5849
6204
|
return dialogRef.current.containsElement(element);
|
|
5850
6205
|
}, []);
|
|
5851
|
-
return /* @__PURE__ */
|
|
6206
|
+
return /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(
|
|
5852
6207
|
DialogContext.Provider,
|
|
5853
6208
|
{
|
|
5854
6209
|
value: useMemo8(
|
|
@@ -5857,7 +6212,7 @@ var DialogProvider = function DialogProvider2({
|
|
|
5857
6212
|
)
|
|
5858
6213
|
},
|
|
5859
6214
|
children2
|
|
5860
|
-
), /* @__PURE__ */
|
|
6215
|
+
), /* @__PURE__ */ React21.createElement(
|
|
5861
6216
|
Dialog,
|
|
5862
6217
|
{
|
|
5863
6218
|
ref: dialogRef,
|
|
@@ -5878,7 +6233,7 @@ var DialogProvider = function DialogProvider2({
|
|
|
5878
6233
|
inputRef.current?.setSelectionRange(0, inputRef.current.value.length);
|
|
5879
6234
|
}, [])
|
|
5880
6235
|
},
|
|
5881
|
-
/* @__PURE__ */
|
|
6236
|
+
/* @__PURE__ */ React21.createElement(InputField.Root, null, /* @__PURE__ */ React21.createElement(
|
|
5882
6237
|
InputField.Input,
|
|
5883
6238
|
{
|
|
5884
6239
|
ref: inputRef,
|
|
@@ -5894,8 +6249,8 @@ var DialogProvider = function DialogProvider2({
|
|
|
5894
6249
|
onKeyDown: handleKeyDown
|
|
5895
6250
|
}
|
|
5896
6251
|
)),
|
|
5897
|
-
/* @__PURE__ */
|
|
5898
|
-
/* @__PURE__ */
|
|
6252
|
+
/* @__PURE__ */ React21.createElement(Spacer.Vertical, { size: 20 }),
|
|
6253
|
+
/* @__PURE__ */ React21.createElement("div", { className: "flex-1 flex-row items-center" }, /* @__PURE__ */ React21.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React21.createElement(Button, { onClick: close }, "Cancel"), /* @__PURE__ */ React21.createElement(Spacer.Horizontal, { size: 16 }), /* @__PURE__ */ React21.createElement(Button, { disabled: !contents?.inputValue, onClick: submit }, "Submit"))
|
|
5899
6254
|
));
|
|
5900
6255
|
};
|
|
5901
6256
|
function useDialog() {
|
|
@@ -5914,7 +6269,7 @@ function useDialogContainsElement() {
|
|
|
5914
6269
|
|
|
5915
6270
|
// src/contexts/FloatingWindowContext.tsx
|
|
5916
6271
|
import { uuid } from "@noya-app/noya-utils";
|
|
5917
|
-
import
|
|
6272
|
+
import React22, { createContext as createContext4, useContext as useContext4, useMemo as useMemo9, useState as useState14 } from "react";
|
|
5918
6273
|
import { createPortal } from "react-dom";
|
|
5919
6274
|
var FloatingWindowContext = createContext4(void 0);
|
|
5920
6275
|
var CurrentWindowContext = createContext4(void 0);
|
|
@@ -5927,7 +6282,7 @@ var FloatingWindowProvider = ({
|
|
|
5927
6282
|
const id = uuid();
|
|
5928
6283
|
setWindows((windows2) => ({
|
|
5929
6284
|
...windows2,
|
|
5930
|
-
[id]: /* @__PURE__ */
|
|
6285
|
+
[id]: /* @__PURE__ */ React22.createElement(CurrentWindowContext.Provider, { value: { id } }, element)
|
|
5931
6286
|
}));
|
|
5932
6287
|
return id;
|
|
5933
6288
|
};
|
|
@@ -5939,7 +6294,7 @@ var FloatingWindowProvider = ({
|
|
|
5939
6294
|
};
|
|
5940
6295
|
return { createWindow, closeWindow };
|
|
5941
6296
|
}, []);
|
|
5942
|
-
return /* @__PURE__ */
|
|
6297
|
+
return /* @__PURE__ */ React22.createElement(FloatingWindowContext.Provider, { value: contextValue }, children2, Object.entries(windows).map(
|
|
5943
6298
|
([id, element]) => createPortal(element, document.body, id)
|
|
5944
6299
|
));
|
|
5945
6300
|
};
|
|
@@ -5964,7 +6319,7 @@ var useCurrentFloatingWindowInternal = () => {
|
|
|
5964
6319
|
var DesignSystemConfigurationContext = createContext5({
|
|
5965
6320
|
platform: "key"
|
|
5966
6321
|
});
|
|
5967
|
-
var DesignSystemConfigurationProvider =
|
|
6322
|
+
var DesignSystemConfigurationProvider = memo10(
|
|
5968
6323
|
function DesignSystemConfigurationProvider2({
|
|
5969
6324
|
children: children2,
|
|
5970
6325
|
platform
|
|
@@ -5982,7 +6337,7 @@ var DesignSystemConfigurationProvider = memo9(
|
|
|
5982
6337
|
() => ({ platform: platform ?? internalPlatform }),
|
|
5983
6338
|
[platform, internalPlatform]
|
|
5984
6339
|
);
|
|
5985
|
-
return /* @__PURE__ */
|
|
6340
|
+
return /* @__PURE__ */ React23.createElement(DesignSystemConfigurationContext.Provider, { value: contextValue }, /* @__PURE__ */ React23.createElement(DialogProvider, null, /* @__PURE__ */ React23.createElement(ToastProvider, null, /* @__PURE__ */ React23.createElement(FloatingWindowProvider, null, children2))));
|
|
5986
6341
|
}
|
|
5987
6342
|
);
|
|
5988
6343
|
function useDesignSystemConfiguration() {
|
|
@@ -5990,12 +6345,28 @@ function useDesignSystemConfiguration() {
|
|
|
5990
6345
|
}
|
|
5991
6346
|
|
|
5992
6347
|
// src/utils/withSeparatorElements.ts
|
|
5993
|
-
import {
|
|
6348
|
+
import {
|
|
6349
|
+
Children as Children2,
|
|
6350
|
+
cloneElement,
|
|
6351
|
+
Fragment,
|
|
6352
|
+
isValidElement as isValidElement2
|
|
6353
|
+
} from "react";
|
|
6354
|
+
function flattenChildren(children2, traverseFragments) {
|
|
6355
|
+
return Children2.toArray(children2).flatMap((child) => {
|
|
6356
|
+
if (traverseFragments && isValidElement2(child) && child.type === Fragment) {
|
|
6357
|
+
return flattenChildren(child.props.children, traverseFragments);
|
|
6358
|
+
}
|
|
6359
|
+
return child;
|
|
6360
|
+
});
|
|
6361
|
+
}
|
|
5994
6362
|
function createKey(key) {
|
|
5995
6363
|
return `s-${key}`;
|
|
5996
6364
|
}
|
|
5997
|
-
function withSeparatorElements(elements2, separator) {
|
|
5998
|
-
const childrenArray =
|
|
6365
|
+
function withSeparatorElements(elements2, separator, options) {
|
|
6366
|
+
const childrenArray = flattenChildren(
|
|
6367
|
+
elements2,
|
|
6368
|
+
options?.traverseFragments ?? true
|
|
6369
|
+
);
|
|
5999
6370
|
for (let i = childrenArray.length - 1; i > 0; i--) {
|
|
6000
6371
|
let sep = typeof separator === "function" ? separator() : isValidElement2(separator) ? cloneElement(separator, { key: createKey(i) }) : separator;
|
|
6001
6372
|
if (isValidElement2(sep) && sep.key == null) {
|
|
@@ -6050,13 +6421,13 @@ function getKeyboardShortcutsForMenuItems(menuItems, onSelect) {
|
|
|
6050
6421
|
menuItems.flatMap(getKeyboardShortcuts).map(([key, value]) => [key, () => onSelect(value)])
|
|
6051
6422
|
);
|
|
6052
6423
|
}
|
|
6053
|
-
var ShortcutElement = ({ children: children2, fixedWidth }) => /* @__PURE__ */
|
|
6054
|
-
var KeyboardShortcut =
|
|
6424
|
+
var ShortcutElement = ({ children: children2, fixedWidth }) => /* @__PURE__ */ React24.createElement("kbd", { className: cn(textStyles.small, "text-text-disabled", fixedWidth && "w-[0.9rem] text-center") }, children2);
|
|
6425
|
+
var KeyboardShortcut = memo11(function KeyboardShortcut2({
|
|
6055
6426
|
shortcut
|
|
6056
6427
|
}) {
|
|
6057
6428
|
const platform = useDesignSystemConfiguration().platform;
|
|
6058
6429
|
const { keys, separator } = getShortcutDisplayParts(shortcut, platform);
|
|
6059
|
-
const keyElements = keys.map((key) => /* @__PURE__ */
|
|
6430
|
+
const keyElements = keys.map((key) => /* @__PURE__ */ React24.createElement(
|
|
6060
6431
|
ShortcutElement,
|
|
6061
6432
|
{
|
|
6062
6433
|
key,
|
|
@@ -6064,14 +6435,14 @@ var KeyboardShortcut = memo10(function KeyboardShortcut2({
|
|
|
6064
6435
|
},
|
|
6065
6436
|
key
|
|
6066
6437
|
));
|
|
6067
|
-
return /* @__PURE__ */
|
|
6438
|
+
return /* @__PURE__ */ React24.createElement(React24.Fragment, null, separator ? withSeparatorElements(
|
|
6068
6439
|
keyElements,
|
|
6069
|
-
/* @__PURE__ */
|
|
6440
|
+
/* @__PURE__ */ React24.createElement(ShortcutElement, null, separator)
|
|
6070
6441
|
) : keyElements);
|
|
6071
6442
|
});
|
|
6072
6443
|
|
|
6073
6444
|
// src/components/ContextMenu.tsx
|
|
6074
|
-
var ContextMenuItem2 =
|
|
6445
|
+
var ContextMenuItem2 = memo12(function ContextMenuItem3({
|
|
6075
6446
|
value,
|
|
6076
6447
|
children: children2,
|
|
6077
6448
|
onSelect,
|
|
@@ -6091,7 +6462,7 @@ var ContextMenuItem2 = memo11(function ContextMenuItem3({
|
|
|
6091
6462
|
onSelect(value);
|
|
6092
6463
|
}, [onSelect, value]);
|
|
6093
6464
|
if (checked) {
|
|
6094
|
-
return /* @__PURE__ */
|
|
6465
|
+
return /* @__PURE__ */ React25.createElement(
|
|
6095
6466
|
RadixContextMenu.CheckboxItem,
|
|
6096
6467
|
{
|
|
6097
6468
|
checked,
|
|
@@ -6099,11 +6470,11 @@ var ContextMenuItem2 = memo11(function ContextMenuItem3({
|
|
|
6099
6470
|
onSelect: handleSelectItem,
|
|
6100
6471
|
className: styles.itemStyle({ disabled })
|
|
6101
6472
|
},
|
|
6102
|
-
/* @__PURE__ */
|
|
6473
|
+
/* @__PURE__ */ React25.createElement(RadixContextMenu.ItemIndicator, { className: styles.itemIndicatorStyle }, /* @__PURE__ */ React25.createElement(CheckIcon2, null)),
|
|
6103
6474
|
children2
|
|
6104
6475
|
);
|
|
6105
6476
|
}
|
|
6106
|
-
const element = /* @__PURE__ */
|
|
6477
|
+
const element = /* @__PURE__ */ React25.createElement(
|
|
6107
6478
|
RadixContextMenu.Item,
|
|
6108
6479
|
{
|
|
6109
6480
|
className: styles.itemStyle({ disabled }),
|
|
@@ -6111,14 +6482,14 @@ var ContextMenuItem2 = memo11(function ContextMenuItem3({
|
|
|
6111
6482
|
onSelect: handleSelectItem,
|
|
6112
6483
|
onPointerDown: handlePointerDown
|
|
6113
6484
|
},
|
|
6114
|
-
indented && /* @__PURE__ */
|
|
6115
|
-
icon && /* @__PURE__ */
|
|
6485
|
+
indented && /* @__PURE__ */ React25.createElement(Spacer.Horizontal, { size: CHECKBOX_WIDTH - CHECKBOX_RIGHT_INSET }),
|
|
6486
|
+
icon && /* @__PURE__ */ React25.createElement(React25.Fragment, null, renderIcon(icon), /* @__PURE__ */ React25.createElement(Spacer.Horizontal, { size: 8 })),
|
|
6116
6487
|
children2,
|
|
6117
|
-
shortcut && /* @__PURE__ */
|
|
6118
|
-
items && items.length > 0 && /* @__PURE__ */
|
|
6488
|
+
shortcut && /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React25.createElement(Spacer.Horizontal, { size: 24 }), /* @__PURE__ */ React25.createElement(KeyboardShortcut, { shortcut })),
|
|
6489
|
+
items && items.length > 0 && /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React25.createElement(Spacer.Horizontal, { size: 16 }), /* @__PURE__ */ React25.createElement(ChevronRightIcon2, null))
|
|
6119
6490
|
);
|
|
6120
6491
|
if (items && items.length > 0) {
|
|
6121
|
-
return /* @__PURE__ */
|
|
6492
|
+
return /* @__PURE__ */ React25.createElement(ContextMenuRoot, { isNested: true, items, onSelect }, element);
|
|
6122
6493
|
} else {
|
|
6123
6494
|
return element;
|
|
6124
6495
|
}
|
|
@@ -6145,8 +6516,8 @@ function ContextMenuRoot({
|
|
|
6145
6516
|
const RootComponent = isNested ? RadixContextMenu.Sub : RadixContextMenu.Root;
|
|
6146
6517
|
const TriggerComponent = isNested ? RadixContextMenu.SubTrigger : RadixContextMenu.Trigger;
|
|
6147
6518
|
const ContentComponent = isNested ? RadixContextMenu.SubContent : RadixContextMenu.Content;
|
|
6148
|
-
return /* @__PURE__ */
|
|
6149
|
-
(item, index) => item === SEPARATOR_ITEM ? /* @__PURE__ */
|
|
6519
|
+
return /* @__PURE__ */ React25.createElement(RootComponent, { onOpenChange }, /* @__PURE__ */ React25.createElement(TriggerComponent, { asChild: true, onPointerDown }, children2), /* @__PURE__ */ React25.createElement(RadixContextMenu.Portal, null, /* @__PURE__ */ React25.createElement(ContentComponent, { className: styles.contentStyle }, items.map(
|
|
6520
|
+
(item, index) => item === SEPARATOR_ITEM ? /* @__PURE__ */ React25.createElement(RadixContextMenu.Separator, { key: index, className: styles.separatorStyle }) : /* @__PURE__ */ React25.createElement(
|
|
6150
6521
|
ContextMenuItem2,
|
|
6151
6522
|
{
|
|
6152
6523
|
key: item.value ?? index,
|
|
@@ -6163,18 +6534,18 @@ function ContextMenuRoot({
|
|
|
6163
6534
|
)
|
|
6164
6535
|
))));
|
|
6165
6536
|
}
|
|
6166
|
-
var ContextMenu =
|
|
6537
|
+
var ContextMenu = memo12(ContextMenuRoot);
|
|
6167
6538
|
|
|
6168
6539
|
// src/components/Divider.tsx
|
|
6169
|
-
import
|
|
6170
|
-
var Divider =
|
|
6540
|
+
import React26, { memo as memo13 } from "react";
|
|
6541
|
+
var Divider = memo13(function Divider2({
|
|
6171
6542
|
variant = "normal",
|
|
6172
6543
|
overflow = 0,
|
|
6173
6544
|
className,
|
|
6174
6545
|
style: style5,
|
|
6175
6546
|
...props
|
|
6176
6547
|
}) {
|
|
6177
|
-
return /* @__PURE__ */
|
|
6548
|
+
return /* @__PURE__ */ React26.createElement(
|
|
6178
6549
|
"div",
|
|
6179
6550
|
{
|
|
6180
6551
|
className: `
|
|
@@ -6192,13 +6563,13 @@ var Divider = memo12(function Divider2({
|
|
|
6192
6563
|
}
|
|
6193
6564
|
);
|
|
6194
6565
|
});
|
|
6195
|
-
var DividerVertical =
|
|
6566
|
+
var DividerVertical = memo13(function DividerVertical2({
|
|
6196
6567
|
variant = "normal",
|
|
6197
6568
|
overflow = 0,
|
|
6198
6569
|
className,
|
|
6199
6570
|
...props
|
|
6200
6571
|
}) {
|
|
6201
|
-
return /* @__PURE__ */
|
|
6572
|
+
return /* @__PURE__ */ React26.createElement(
|
|
6202
6573
|
"div",
|
|
6203
6574
|
{
|
|
6204
6575
|
className: `
|
|
@@ -6215,8 +6586,8 @@ var DividerVertical = memo12(function DividerVertical2({
|
|
|
6215
6586
|
|
|
6216
6587
|
// src/components/DraggableMenuButton.tsx
|
|
6217
6588
|
import { DragHandleDots2Icon } from "@noya-app/noya-icons";
|
|
6218
|
-
import
|
|
6219
|
-
var DotButton =
|
|
6589
|
+
import React27, { forwardRef as forwardRef12, memo as memo14, useCallback as useCallback14, useState as useState16 } from "react";
|
|
6590
|
+
var DotButton = forwardRef12(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
6220
6591
|
"div",
|
|
6221
6592
|
{
|
|
6222
6593
|
ref,
|
|
@@ -6224,7 +6595,7 @@ var DotButton = forwardRef11(({ className, ...props }, ref) => /* @__PURE__ */ R
|
|
|
6224
6595
|
...props
|
|
6225
6596
|
}
|
|
6226
6597
|
));
|
|
6227
|
-
var Trigger5 =
|
|
6598
|
+
var Trigger5 = forwardRef12(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
6228
6599
|
"div",
|
|
6229
6600
|
{
|
|
6230
6601
|
ref,
|
|
@@ -6232,7 +6603,7 @@ var Trigger5 = forwardRef11(({ className, ...props }, ref) => /* @__PURE__ */ Re
|
|
|
6232
6603
|
...props
|
|
6233
6604
|
}
|
|
6234
6605
|
));
|
|
6235
|
-
var DraggableMenuButton =
|
|
6606
|
+
var DraggableMenuButton = memo14(function DraggableMenuButton2({
|
|
6236
6607
|
items,
|
|
6237
6608
|
onSelect,
|
|
6238
6609
|
isVisible = true
|
|
@@ -6274,7 +6645,7 @@ var DraggableMenuButton = memo13(function DraggableMenuButton2({
|
|
|
6274
6645
|
},
|
|
6275
6646
|
[setOpen]
|
|
6276
6647
|
);
|
|
6277
|
-
return /* @__PURE__ */
|
|
6648
|
+
return /* @__PURE__ */ React27.createElement(
|
|
6278
6649
|
DotButton,
|
|
6279
6650
|
{
|
|
6280
6651
|
onPointerDownCapture: handlePointerDownCapture,
|
|
@@ -6284,7 +6655,7 @@ var DraggableMenuButton = memo13(function DraggableMenuButton2({
|
|
|
6284
6655
|
event.preventDefault();
|
|
6285
6656
|
}
|
|
6286
6657
|
},
|
|
6287
|
-
items && onSelect ? /* @__PURE__ */
|
|
6658
|
+
items && onSelect ? /* @__PURE__ */ React27.createElement(
|
|
6288
6659
|
DropdownMenu,
|
|
6289
6660
|
{
|
|
6290
6661
|
open,
|
|
@@ -6293,23 +6664,23 @@ var DraggableMenuButton = memo13(function DraggableMenuButton2({
|
|
|
6293
6664
|
onSelect,
|
|
6294
6665
|
shouldBindKeyboardShortcuts: false
|
|
6295
6666
|
},
|
|
6296
|
-
/* @__PURE__ */
|
|
6667
|
+
/* @__PURE__ */ React27.createElement(Trigger5, null, /* @__PURE__ */ React27.createElement(
|
|
6297
6668
|
DragHandleDots2Icon,
|
|
6298
6669
|
{
|
|
6299
|
-
color: isVisible || open ?
|
|
6670
|
+
color: isVisible || open ? cssVars.colors.icon : "transparent"
|
|
6300
6671
|
}
|
|
6301
6672
|
))
|
|
6302
|
-
) : /* @__PURE__ */
|
|
6673
|
+
) : /* @__PURE__ */ React27.createElement(
|
|
6303
6674
|
DragHandleDots2Icon,
|
|
6304
6675
|
{
|
|
6305
|
-
color: isVisible || open ?
|
|
6676
|
+
color: isVisible || open ? cssVars.colors.icon : "transparent"
|
|
6306
6677
|
}
|
|
6307
6678
|
)
|
|
6308
6679
|
);
|
|
6309
6680
|
});
|
|
6310
6681
|
|
|
6311
6682
|
// src/components/FillInputField.tsx
|
|
6312
|
-
import
|
|
6683
|
+
import React30, { forwardRef as forwardRef13, memo as memo17 } from "react";
|
|
6313
6684
|
|
|
6314
6685
|
// ../noya-file-format/src/types.ts
|
|
6315
6686
|
var types_exports = {};
|
|
@@ -6634,19 +7005,19 @@ var ClassValue = /* @__PURE__ */ ((ClassValue2) => {
|
|
|
6634
7005
|
})(ClassValue || {});
|
|
6635
7006
|
|
|
6636
7007
|
// src/components/FillPreviewBackground.tsx
|
|
6637
|
-
import
|
|
7008
|
+
import React29, { memo as memo16, useMemo as useMemo14 } from "react";
|
|
6638
7009
|
|
|
6639
7010
|
// src/contexts/ImageDataContext.tsx
|
|
6640
|
-
import
|
|
7011
|
+
import React28, {
|
|
6641
7012
|
createContext as createContext6,
|
|
6642
|
-
memo as
|
|
7013
|
+
memo as memo15,
|
|
6643
7014
|
useContext as useContext6,
|
|
6644
7015
|
useMemo as useMemo12
|
|
6645
7016
|
} from "react";
|
|
6646
7017
|
var ImageDataContext = createContext6(
|
|
6647
7018
|
void 0
|
|
6648
7019
|
);
|
|
6649
|
-
var ImageDataProvider =
|
|
7020
|
+
var ImageDataProvider = memo15(function ImageDataProvider2({
|
|
6650
7021
|
children: children2,
|
|
6651
7022
|
getImageData
|
|
6652
7023
|
}) {
|
|
@@ -6654,7 +7025,7 @@ var ImageDataProvider = memo14(function ImageDataProvider2({
|
|
|
6654
7025
|
() => ({ getImageData: getImageData ?? (() => void 0) }),
|
|
6655
7026
|
[getImageData]
|
|
6656
7027
|
);
|
|
6657
|
-
return /* @__PURE__ */
|
|
7028
|
+
return /* @__PURE__ */ React28.createElement(ImageDataContext.Provider, { value: contextValue }, children2);
|
|
6658
7029
|
});
|
|
6659
7030
|
function useImageData(ref) {
|
|
6660
7031
|
const value = useContext6(ImageDataContext);
|
|
@@ -6727,8 +7098,10 @@ var dotsHorizontalSvg = (fillColor) => `
|
|
|
6727
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>
|
|
6728
7099
|
</svg>
|
|
6729
7100
|
`;
|
|
6730
|
-
var Background =
|
|
6731
|
-
|
|
7101
|
+
var Background = memo16(function Background2({
|
|
7102
|
+
background: background2
|
|
7103
|
+
}) {
|
|
7104
|
+
return /* @__PURE__ */ React29.createElement(
|
|
6732
7105
|
"span",
|
|
6733
7106
|
{
|
|
6734
7107
|
className: cn(
|
|
@@ -6750,7 +7123,7 @@ function getPatternSizeAndPosition(fillType, tileScale) {
|
|
|
6750
7123
|
return "center / 100% 100%";
|
|
6751
7124
|
}
|
|
6752
7125
|
}
|
|
6753
|
-
var PatternPreviewBackground =
|
|
7126
|
+
var PatternPreviewBackground = memo16(function PatternPreviewBackground2({
|
|
6754
7127
|
fillType,
|
|
6755
7128
|
tileScale,
|
|
6756
7129
|
imageRef
|
|
@@ -6766,43 +7139,38 @@ var PatternPreviewBackground = memo15(function PatternPreviewBackground2({
|
|
|
6766
7139
|
].join(" "),
|
|
6767
7140
|
[fillType, size3, url]
|
|
6768
7141
|
);
|
|
6769
|
-
return /* @__PURE__ */
|
|
7142
|
+
return /* @__PURE__ */ React29.createElement(Background, { background: background2 });
|
|
6770
7143
|
});
|
|
6771
|
-
var ColorPreviewBackground =
|
|
7144
|
+
var ColorPreviewBackground = memo16(function ColorPreviewBackground2({
|
|
6772
7145
|
color
|
|
6773
7146
|
}) {
|
|
6774
7147
|
const background2 = useMemo14(() => sketchColorToRgbaString(color), [color]);
|
|
6775
|
-
return /* @__PURE__ */
|
|
7148
|
+
return /* @__PURE__ */ React29.createElement(Background, { background: background2 });
|
|
6776
7149
|
});
|
|
6777
|
-
var GradientPreviewBackground =
|
|
7150
|
+
var GradientPreviewBackground = memo16(function GradientPreviewBackground2({
|
|
6778
7151
|
gradient
|
|
6779
7152
|
}) {
|
|
6780
7153
|
const background2 = useMemo14(
|
|
6781
7154
|
() => getGradientBackground(gradient.stops, gradient.gradientType, 180),
|
|
6782
7155
|
[gradient.gradientType, gradient.stops]
|
|
6783
7156
|
);
|
|
6784
|
-
return /* @__PURE__ */
|
|
7157
|
+
return /* @__PURE__ */ React29.createElement(Background, { background: background2 });
|
|
6785
7158
|
});
|
|
6786
7159
|
var background = `center url("data:image/svg+xml;utf8,${dotsHorizontalSvg(
|
|
6787
|
-
|
|
7160
|
+
cssVars.colors.placeholderDots
|
|
6788
7161
|
)}") no-repeat`;
|
|
6789
|
-
var FillPreviewBackground =
|
|
7162
|
+
var FillPreviewBackground = memo16(function FillPreviewBackground2({
|
|
6790
7163
|
value
|
|
6791
7164
|
}) {
|
|
6792
|
-
if (!value) return /* @__PURE__ */
|
|
6793
|
-
Background,
|
|
6794
|
-
{
|
|
6795
|
-
background
|
|
6796
|
-
}
|
|
6797
|
-
);
|
|
7165
|
+
if (!value) return /* @__PURE__ */ React29.createElement(Background, { background });
|
|
6798
7166
|
switch (value._class) {
|
|
6799
7167
|
case "color":
|
|
6800
|
-
return /* @__PURE__ */
|
|
7168
|
+
return /* @__PURE__ */ React29.createElement(ColorPreviewBackground, { color: value });
|
|
6801
7169
|
case "gradient":
|
|
6802
|
-
return /* @__PURE__ */
|
|
7170
|
+
return /* @__PURE__ */ React29.createElement(GradientPreviewBackground, { gradient: value });
|
|
6803
7171
|
case "pattern":
|
|
6804
7172
|
if (!value.image) return null;
|
|
6805
|
-
return /* @__PURE__ */
|
|
7173
|
+
return /* @__PURE__ */ React29.createElement(
|
|
6806
7174
|
PatternPreviewBackground,
|
|
6807
7175
|
{
|
|
6808
7176
|
fillType: value.patternFillType,
|
|
@@ -6814,7 +7182,7 @@ var FillPreviewBackground = memo15(function FillPreviewBackground2({
|
|
|
6814
7182
|
});
|
|
6815
7183
|
|
|
6816
7184
|
// src/components/FillInputField.tsx
|
|
6817
|
-
var FillButton =
|
|
7185
|
+
var FillButton = forwardRef13(({ className, ...props }, ref) => /* @__PURE__ */ React30.createElement(
|
|
6818
7186
|
"button",
|
|
6819
7187
|
{
|
|
6820
7188
|
ref,
|
|
@@ -6822,14 +7190,14 @@ var FillButton = forwardRef12(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
6822
7190
|
...props
|
|
6823
7191
|
}
|
|
6824
7192
|
));
|
|
6825
|
-
var FillInputField =
|
|
6826
|
-
|
|
6827
|
-
return /* @__PURE__ */
|
|
7193
|
+
var FillInputField = memo17(
|
|
7194
|
+
forwardRef13(function FillInputField2({ id, value, ...rest }, ref) {
|
|
7195
|
+
return /* @__PURE__ */ React30.createElement(FillButton, { ref, id, ...rest }, /* @__PURE__ */ React30.createElement(FillPreviewBackground, { value }));
|
|
6828
7196
|
})
|
|
6829
7197
|
);
|
|
6830
7198
|
|
|
6831
7199
|
// src/components/FloatingWindow.tsx
|
|
6832
|
-
import
|
|
7200
|
+
import React31, { useCallback as useCallback15, useRef as useRef14, useState as useState17 } from "react";
|
|
6833
7201
|
var styles2 = {
|
|
6834
7202
|
noSelect: {
|
|
6835
7203
|
userSelect: "none",
|
|
@@ -6922,7 +7290,7 @@ function defaultRenderToolbar({
|
|
|
6922
7290
|
toolbarContent,
|
|
6923
7291
|
onClose
|
|
6924
7292
|
}) {
|
|
6925
|
-
return /* @__PURE__ */
|
|
7293
|
+
return /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement(Small, { className: "flex-1 font-medium text-text" }, title), toolbarContent, /* @__PURE__ */ React31.createElement(
|
|
6926
7294
|
IconButton,
|
|
6927
7295
|
{
|
|
6928
7296
|
iconName: "Cross3Icon",
|
|
@@ -7042,7 +7410,7 @@ var FloatingWindow = ({
|
|
|
7042
7410
|
setResizeDirection(null);
|
|
7043
7411
|
toggleGlobalTextSelection(false);
|
|
7044
7412
|
}, []);
|
|
7045
|
-
|
|
7413
|
+
React31.useEffect(() => {
|
|
7046
7414
|
document.addEventListener("mousemove", handleMouseMove);
|
|
7047
7415
|
document.addEventListener("mouseup", handleMouseUp);
|
|
7048
7416
|
return () => {
|
|
@@ -7056,7 +7424,7 @@ var FloatingWindow = ({
|
|
|
7056
7424
|
if (onClose) onClose();
|
|
7057
7425
|
floatingWindowManager.closeWindow(currentFloatingWindow.id);
|
|
7058
7426
|
}, [currentFloatingWindow.id, floatingWindowManager, onClose]);
|
|
7059
|
-
return /* @__PURE__ */
|
|
7427
|
+
return /* @__PURE__ */ React31.createElement(
|
|
7060
7428
|
"div",
|
|
7061
7429
|
{
|
|
7062
7430
|
ref: wrapperRef,
|
|
@@ -7066,24 +7434,24 @@ var FloatingWindow = ({
|
|
|
7066
7434
|
left: position.x,
|
|
7067
7435
|
width: size3.width,
|
|
7068
7436
|
height: size3.height,
|
|
7069
|
-
outline: `1px solid
|
|
7070
|
-
backgroundColor:
|
|
7437
|
+
outline: `1px solid ${cssVars.colors.divider}`,
|
|
7438
|
+
backgroundColor: cssVars.colors.canvasBackground
|
|
7071
7439
|
}
|
|
7072
7440
|
},
|
|
7073
|
-
/* @__PURE__ */
|
|
7441
|
+
/* @__PURE__ */ React31.createElement(
|
|
7074
7442
|
"div",
|
|
7075
7443
|
{
|
|
7076
7444
|
style: {
|
|
7077
7445
|
...styles2.toolbar,
|
|
7078
|
-
backgroundColor:
|
|
7446
|
+
backgroundColor: cssVars.colors.sidebarBackground
|
|
7079
7447
|
},
|
|
7080
7448
|
onMouseDown: handleMouseDown
|
|
7081
7449
|
},
|
|
7082
7450
|
renderToolbar({ title, toolbarContent, onClose: handleClose })
|
|
7083
7451
|
),
|
|
7084
|
-
/* @__PURE__ */
|
|
7085
|
-
/* @__PURE__ */
|
|
7086
|
-
Object.entries(resizeHandlePositions).map(([direction, style5]) => /* @__PURE__ */
|
|
7452
|
+
/* @__PURE__ */ React31.createElement(Divider, null),
|
|
7453
|
+
/* @__PURE__ */ React31.createElement("div", { style: styles2.content }, children2),
|
|
7454
|
+
Object.entries(resizeHandlePositions).map(([direction, style5]) => /* @__PURE__ */ React31.createElement(
|
|
7087
7455
|
"div",
|
|
7088
7456
|
{
|
|
7089
7457
|
key: direction,
|
|
@@ -7105,8 +7473,8 @@ import {
|
|
|
7105
7473
|
hsvaToRgba,
|
|
7106
7474
|
rgbaToHsva as rgbaToHsva2
|
|
7107
7475
|
} from "@noya-app/noya-colorpicker";
|
|
7108
|
-
import
|
|
7109
|
-
var GradientPicker =
|
|
7476
|
+
import React32, { memo as memo18, useCallback as useCallback16, useMemo as useMemo15 } from "react";
|
|
7477
|
+
var GradientPicker = memo18(function GradientPicker2({
|
|
7110
7478
|
value,
|
|
7111
7479
|
selectedStop,
|
|
7112
7480
|
onChangeColor,
|
|
@@ -7140,14 +7508,14 @@ var GradientPicker = memo17(function GradientPicker2({
|
|
|
7140
7508
|
},
|
|
7141
7509
|
[onAdd]
|
|
7142
7510
|
);
|
|
7143
|
-
return /* @__PURE__ */
|
|
7511
|
+
return /* @__PURE__ */ React32.createElement(
|
|
7144
7512
|
NoyaColorPicker,
|
|
7145
7513
|
{
|
|
7146
7514
|
onChange: handleChangeColor,
|
|
7147
7515
|
colorModel,
|
|
7148
7516
|
color: rgbaColor
|
|
7149
7517
|
},
|
|
7150
|
-
/* @__PURE__ */
|
|
7518
|
+
/* @__PURE__ */ React32.createElement(
|
|
7151
7519
|
Gradient,
|
|
7152
7520
|
{
|
|
7153
7521
|
gradients: value,
|
|
@@ -7158,20 +7526,20 @@ var GradientPicker = memo17(function GradientPicker2({
|
|
|
7158
7526
|
onDelete
|
|
7159
7527
|
}
|
|
7160
7528
|
),
|
|
7161
|
-
/* @__PURE__ */
|
|
7162
|
-
/* @__PURE__ */
|
|
7163
|
-
/* @__PURE__ */
|
|
7164
|
-
/* @__PURE__ */
|
|
7165
|
-
/* @__PURE__ */
|
|
7166
|
-
/* @__PURE__ */
|
|
7529
|
+
/* @__PURE__ */ React32.createElement(Spacer.Vertical, { size: 10 }),
|
|
7530
|
+
/* @__PURE__ */ React32.createElement(Saturation, null),
|
|
7531
|
+
/* @__PURE__ */ React32.createElement(Spacer.Vertical, { size: 12 }),
|
|
7532
|
+
/* @__PURE__ */ React32.createElement(Hue, null),
|
|
7533
|
+
/* @__PURE__ */ React32.createElement(Spacer.Vertical, { size: 5 }),
|
|
7534
|
+
/* @__PURE__ */ React32.createElement(Alpha, null)
|
|
7167
7535
|
);
|
|
7168
7536
|
});
|
|
7169
7537
|
|
|
7170
7538
|
// src/components/GridView.tsx
|
|
7171
|
-
import
|
|
7539
|
+
import React34, {
|
|
7172
7540
|
createContext as createContext7,
|
|
7173
|
-
forwardRef as
|
|
7174
|
-
memo as
|
|
7541
|
+
forwardRef as forwardRef14,
|
|
7542
|
+
memo as memo20,
|
|
7175
7543
|
useCallback as useCallback18,
|
|
7176
7544
|
useContext as useContext7,
|
|
7177
7545
|
useMemo as useMemo16
|
|
@@ -7179,10 +7547,10 @@ import React33, {
|
|
|
7179
7547
|
|
|
7180
7548
|
// src/components/ScrollArea.tsx
|
|
7181
7549
|
import * as RadixScrollArea from "@radix-ui/react-scroll-area";
|
|
7182
|
-
import
|
|
7183
|
-
var ScrollArea =
|
|
7550
|
+
import React33, { memo as memo19, useCallback as useCallback17, useState as useState18 } from "react";
|
|
7551
|
+
var ScrollArea = memo19(function ScrollArea2({ children: children2 }) {
|
|
7184
7552
|
const [scrollElementRef, setScrollElementRef] = useState18(null);
|
|
7185
|
-
return /* @__PURE__ */
|
|
7553
|
+
return /* @__PURE__ */ React33.createElement("div", { className: "flex-1 min-h-0" }, /* @__PURE__ */ React33.createElement(RadixScrollArea.Root, { style: { width: "100%", height: "100%" } }, /* @__PURE__ */ React33.createElement(
|
|
7186
7554
|
RadixScrollArea.Viewport,
|
|
7187
7555
|
{
|
|
7188
7556
|
className: "w-full h-full [&>div]:block",
|
|
@@ -7192,13 +7560,13 @@ var ScrollArea = memo18(function ScrollArea2({ children: children2 }) {
|
|
|
7192
7560
|
)
|
|
7193
7561
|
},
|
|
7194
7562
|
typeof children2 === "function" ? scrollElementRef ? children2(scrollElementRef) : null : children2
|
|
7195
|
-
), /* @__PURE__ */
|
|
7563
|
+
), /* @__PURE__ */ React33.createElement(
|
|
7196
7564
|
RadixScrollArea.Scrollbar,
|
|
7197
7565
|
{
|
|
7198
7566
|
orientation: "vertical",
|
|
7199
7567
|
className: "scroll-component flex p-[3px] data-[orientation=vertical]:w-[10px]"
|
|
7200
7568
|
},
|
|
7201
|
-
/* @__PURE__ */
|
|
7569
|
+
/* @__PURE__ */ React33.createElement(RadixScrollArea.Thumb, { className: "scroll-component flex-1 rounded-[10px] bg-scrollbar" })
|
|
7202
7570
|
)));
|
|
7203
7571
|
});
|
|
7204
7572
|
|
|
@@ -7236,7 +7604,7 @@ var sizes = {
|
|
|
7236
7604
|
}
|
|
7237
7605
|
};
|
|
7238
7606
|
var ItemTitle = ({ showBackground, children: children2 }) => {
|
|
7239
|
-
return /* @__PURE__ */
|
|
7607
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7240
7608
|
"span",
|
|
7241
7609
|
{
|
|
7242
7610
|
className: `font-sans text-heading5 leading-[1] text-text font-medium select-none whitespace-pre overflow-hidden text-ellipsis ${showBackground && "bg-sidebar-background border border-dividerSubtle rounded-[2px] backdrop-blur-[4px] p-[2px_4px]"}`
|
|
@@ -7245,7 +7613,7 @@ var ItemTitle = ({ showBackground, children: children2 }) => {
|
|
|
7245
7613
|
);
|
|
7246
7614
|
};
|
|
7247
7615
|
var ItemDescription = ({ showBackground, children: children2 }) => {
|
|
7248
|
-
return /* @__PURE__ */
|
|
7616
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7249
7617
|
"span",
|
|
7250
7618
|
{
|
|
7251
7619
|
className: `font-sans text-heading5 font-normal leading-[1] text-[0.7rem] text-text-muted select-none whitespace-pre overflow-hidden text-ellipsis ${showBackground && "bg-sidebar-background border border-dividerSubtle rounded-[2px] backdrop-blur-[4px] p-[2px_4px]"}`
|
|
@@ -7254,7 +7622,7 @@ var ItemDescription = ({ showBackground, children: children2 }) => {
|
|
|
7254
7622
|
);
|
|
7255
7623
|
};
|
|
7256
7624
|
var SectionTitle = ({ last = false, children: children2 }) => {
|
|
7257
|
-
return /* @__PURE__ */
|
|
7625
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7258
7626
|
"span",
|
|
7259
7627
|
{
|
|
7260
7628
|
className: `font-sans text-heading3 font-medium user-select-none whitespace-pre overflow-hidden text-ellipsis ${last ? "text-text" : "text-text-muted"}`
|
|
@@ -7262,7 +7630,7 @@ var SectionTitle = ({ last = false, children: children2 }) => {
|
|
|
7262
7630
|
children2
|
|
7263
7631
|
);
|
|
7264
7632
|
};
|
|
7265
|
-
var GridViewItem =
|
|
7633
|
+
var GridViewItem = forwardRef14(function GridViewItem2({
|
|
7266
7634
|
id,
|
|
7267
7635
|
title,
|
|
7268
7636
|
subtitle,
|
|
@@ -7278,7 +7646,7 @@ var GridViewItem = forwardRef13(function GridViewItem2({
|
|
|
7278
7646
|
onContextMenu,
|
|
7279
7647
|
style: style5
|
|
7280
7648
|
}, forwardedRef) {
|
|
7281
|
-
const [hovered, setHovered] =
|
|
7649
|
+
const [hovered, setHovered] = React34.useState(false);
|
|
7282
7650
|
const { hoverProps } = useHover({
|
|
7283
7651
|
onHoverChange: (isHovering) => {
|
|
7284
7652
|
onHoverChange?.(isHovering);
|
|
@@ -7307,7 +7675,7 @@ var GridViewItem = forwardRef13(function GridViewItem2({
|
|
|
7307
7675
|
},
|
|
7308
7676
|
[onPress]
|
|
7309
7677
|
);
|
|
7310
|
-
let element = /* @__PURE__ */
|
|
7678
|
+
let element = /* @__PURE__ */ React34.createElement(
|
|
7311
7679
|
"div",
|
|
7312
7680
|
{
|
|
7313
7681
|
className: "flex flex-col relative focus:shadow-[0px_0px_0px_1px_var(--sidebar-background),_0px_0px_0px_3px_var(--primary)] focus:outline-none",
|
|
@@ -7317,7 +7685,7 @@ var GridViewItem = forwardRef13(function GridViewItem2({
|
|
|
7317
7685
|
tabIndex: disabled ? void 0 : 0,
|
|
7318
7686
|
onKeyDown: handleKeyDown
|
|
7319
7687
|
},
|
|
7320
|
-
/* @__PURE__ */
|
|
7688
|
+
/* @__PURE__ */ React34.createElement(
|
|
7321
7689
|
"div",
|
|
7322
7690
|
{
|
|
7323
7691
|
className: cn(
|
|
@@ -7334,18 +7702,18 @@ var GridViewItem = forwardRef13(function GridViewItem2({
|
|
|
7334
7702
|
},
|
|
7335
7703
|
children2
|
|
7336
7704
|
),
|
|
7337
|
-
textPosition === "below" && /* @__PURE__ */
|
|
7338
|
-
textPosition === "overlay" && hovered && (title || subtitle) && /* @__PURE__ */
|
|
7339
|
-
loading && /* @__PURE__ */
|
|
7705
|
+
textPosition === "below" && /* @__PURE__ */ React34.createElement(React34.Fragment, null, /* @__PURE__ */ React34.createElement(Spacer.Vertical, { size: 8 }), /* @__PURE__ */ React34.createElement(ItemTitle, null, title || " "), /* @__PURE__ */ React34.createElement(ItemDescription, null, subtitle || " ")),
|
|
7706
|
+
textPosition === "overlay" && hovered && (title || subtitle) && /* @__PURE__ */ React34.createElement("div", { className: "absolute inset-0 flex flex-col justify-end items-start p-1 pointer-events-none truncate g-0.5" }, title && /* @__PURE__ */ React34.createElement(ItemTitle, { showBackground: true }, title), subtitle && /* @__PURE__ */ React34.createElement(ItemDescription, { showBackground: true }, subtitle)),
|
|
7707
|
+
loading && /* @__PURE__ */ React34.createElement("div", { className: "flex flex-col justify-start items-end p-1 pointer-events-none animate-shimmer absolute inset-0 bg-gradient-to-r from-white/0 via-[rgb(226,232,240)]/50 to-white/0 bg-length:200%_100%]" }, /* @__PURE__ */ React34.createElement(ActivityIndicator, { opacity: 0.5, size: 13 }))
|
|
7340
7708
|
);
|
|
7341
7709
|
if (menuItems && onSelectMenuItem) {
|
|
7342
|
-
element = /* @__PURE__ */
|
|
7710
|
+
element = /* @__PURE__ */ React34.createElement(ContextMenu, { items: menuItems, onSelect: onSelectMenuItem }, element);
|
|
7343
7711
|
}
|
|
7344
7712
|
if (textPosition === "toolip") {
|
|
7345
|
-
element = /* @__PURE__ */
|
|
7713
|
+
element = /* @__PURE__ */ React34.createElement(
|
|
7346
7714
|
Tooltip,
|
|
7347
7715
|
{
|
|
7348
|
-
content: /* @__PURE__ */
|
|
7716
|
+
content: /* @__PURE__ */ React34.createElement("div", { className: "flex flex-col gap-0.5" }, /* @__PURE__ */ React34.createElement(ItemTitle, null, title), /* @__PURE__ */ React34.createElement(ItemDescription, null, subtitle))
|
|
7349
7717
|
},
|
|
7350
7718
|
element
|
|
7351
7719
|
);
|
|
@@ -7384,7 +7752,7 @@ function GridViewRoot({
|
|
|
7384
7752
|
}),
|
|
7385
7753
|
[bordered, disabled, size3, textPosition]
|
|
7386
7754
|
);
|
|
7387
|
-
return /* @__PURE__ */
|
|
7755
|
+
return /* @__PURE__ */ React34.createElement(GridViewContext.Provider, { value: contextValue }, /* @__PURE__ */ React34.createElement("div", { onClick: handleClick, className: `flex flex-col ${scrollable ? "flex-1" : "flex-[0_0_auto]"}` }, scrollable ? /* @__PURE__ */ React34.createElement(ScrollArea, null, children2) : children2));
|
|
7388
7756
|
}
|
|
7389
7757
|
function GridViewSection({
|
|
7390
7758
|
children: children2,
|
|
@@ -7392,28 +7760,28 @@ function GridViewSection({
|
|
|
7392
7760
|
}) {
|
|
7393
7761
|
const { size: size3 } = useContext7(GridViewContext);
|
|
7394
7762
|
const gapStyle = { gap: `${sizes[size3].gap}px` };
|
|
7395
|
-
return /* @__PURE__ */
|
|
7763
|
+
return /* @__PURE__ */ React34.createElement("div", { className: cn(className, "text-text grid", `grid-cols-[auto-fill,_minmax(${sizes[size3].itemWidth}px,_1fr)]`), style: gapStyle }, children2);
|
|
7396
7764
|
}
|
|
7397
7765
|
function GridViewSectionHeader({ title }) {
|
|
7398
7766
|
const grouped = title.split("/");
|
|
7399
|
-
return /* @__PURE__ */
|
|
7400
|
-
grouped.map((title2, index) => /* @__PURE__ */
|
|
7401
|
-
/* @__PURE__ */
|
|
7767
|
+
return /* @__PURE__ */ React34.createElement("div", { className: "px-5" }, /* @__PURE__ */ React34.createElement(Spacer.Vertical, { size: 24 }), withSeparatorElements(
|
|
7768
|
+
grouped.map((title2, index) => /* @__PURE__ */ React34.createElement(SectionTitle, { last: index === grouped.length - 1 }, title2)),
|
|
7769
|
+
/* @__PURE__ */ React34.createElement(SectionTitle, null, " / ")
|
|
7402
7770
|
));
|
|
7403
7771
|
}
|
|
7404
7772
|
var GridView;
|
|
7405
7773
|
((GridView2) => {
|
|
7406
|
-
GridView2.Root =
|
|
7407
|
-
GridView2.Item =
|
|
7408
|
-
GridView2.Section =
|
|
7409
|
-
GridView2.SectionHeader =
|
|
7774
|
+
GridView2.Root = memo20(GridViewRoot);
|
|
7775
|
+
GridView2.Item = memo20(GridViewItem);
|
|
7776
|
+
GridView2.Section = memo20(GridViewSection);
|
|
7777
|
+
GridView2.SectionHeader = memo20(GridViewSectionHeader);
|
|
7410
7778
|
})(GridView || (GridView = {}));
|
|
7411
7779
|
|
|
7412
7780
|
// src/components/InputFieldWithCompletions.tsx
|
|
7413
7781
|
import { chunkBy, partition } from "@noya-app/noya-utils";
|
|
7414
|
-
import
|
|
7415
|
-
forwardRef as
|
|
7416
|
-
memo as
|
|
7782
|
+
import React58, {
|
|
7783
|
+
forwardRef as forwardRef16,
|
|
7784
|
+
memo as memo23,
|
|
7417
7785
|
useCallback as useCallback21,
|
|
7418
7786
|
useEffect as useEffect14,
|
|
7419
7787
|
useImperativeHandle as useImperativeHandle3,
|
|
@@ -7496,12 +7864,12 @@ function mergeRanges(ranges) {
|
|
|
7496
7864
|
// src/components/ListView.tsx
|
|
7497
7865
|
import { range } from "@noya-app/noya-utils";
|
|
7498
7866
|
import { composeRefs as composeRefs2 } from "@radix-ui/react-compose-refs";
|
|
7499
|
-
import
|
|
7867
|
+
import React57, {
|
|
7500
7868
|
Children as Children4,
|
|
7501
7869
|
createContext as createContext9,
|
|
7502
|
-
forwardRef as
|
|
7870
|
+
forwardRef as forwardRef15,
|
|
7503
7871
|
isValidElement as isValidElement3,
|
|
7504
|
-
memo as
|
|
7872
|
+
memo as memo22,
|
|
7505
7873
|
useCallback as useCallback20,
|
|
7506
7874
|
useContext as useContext9,
|
|
7507
7875
|
useImperativeHandle as useImperativeHandle2,
|
|
@@ -7518,7 +7886,7 @@ var import_getPrototypeOf2 = __toESM(require_getPrototypeOf());
|
|
|
7518
7886
|
var import_assertThisInitialized2 = __toESM(require_assertThisInitialized());
|
|
7519
7887
|
var import_inherits2 = __toESM(require_inherits());
|
|
7520
7888
|
var import_defineProperty4 = __toESM(require_defineProperty());
|
|
7521
|
-
import * as
|
|
7889
|
+
import * as React37 from "react";
|
|
7522
7890
|
|
|
7523
7891
|
// ../../node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js
|
|
7524
7892
|
function componentWillMount() {
|
|
@@ -7615,7 +7983,7 @@ var import_getPrototypeOf = __toESM(require_getPrototypeOf());
|
|
|
7615
7983
|
var import_assertThisInitialized = __toESM(require_assertThisInitialized());
|
|
7616
7984
|
var import_inherits = __toESM(require_inherits());
|
|
7617
7985
|
var import_defineProperty3 = __toESM(require_defineProperty());
|
|
7618
|
-
import * as
|
|
7986
|
+
import * as React36 from "react";
|
|
7619
7987
|
|
|
7620
7988
|
// ../../node_modules/clsx/dist/clsx.m.js
|
|
7621
7989
|
function r(e) {
|
|
@@ -7654,7 +8022,7 @@ var import_createClass = __toESM(require_createClass());
|
|
|
7654
8022
|
var import_defineProperty = __toESM(require_defineProperty());
|
|
7655
8023
|
|
|
7656
8024
|
// ../../node_modules/react-virtualized/dist/es/Grid/types.js
|
|
7657
|
-
import * as
|
|
8025
|
+
import * as React35 from "react";
|
|
7658
8026
|
var import_prop_types = __toESM(require_prop_types());
|
|
7659
8027
|
var bpfrpt_proptype_CellPosition = process.env.NODE_ENV === "production" ? null : {
|
|
7660
8028
|
"columnIndex": import_prop_types.default.number.isRequired,
|
|
@@ -8814,7 +9182,7 @@ var Grid = (_temp = _class = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
8814
9182
|
gridStyle.overflowY = totalRowsHeight + horizontalScrollBarSize <= height ? "hidden" : "auto";
|
|
8815
9183
|
var childrenToDisplay = this._childrenToDisplay;
|
|
8816
9184
|
var showNoContentRenderer = childrenToDisplay.length === 0 && height > 0 && width > 0;
|
|
8817
|
-
return
|
|
9185
|
+
return React36.createElement("div", (0, import_extends.default)({
|
|
8818
9186
|
ref: this._setScrollingContainerRef
|
|
8819
9187
|
}, containerProps, {
|
|
8820
9188
|
"aria-label": this.props["aria-label"],
|
|
@@ -8825,7 +9193,7 @@ var Grid = (_temp = _class = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
8825
9193
|
role,
|
|
8826
9194
|
style: _objectSpread({}, gridStyle, {}, style5),
|
|
8827
9195
|
tabIndex
|
|
8828
|
-
}), childrenToDisplay.length > 0 &&
|
|
9196
|
+
}), childrenToDisplay.length > 0 && React36.createElement("div", {
|
|
8829
9197
|
className: "ReactVirtualized__Grid__innerScrollContainer",
|
|
8830
9198
|
role: containerRole,
|
|
8831
9199
|
style: _objectSpread({
|
|
@@ -9283,7 +9651,7 @@ var Grid = (_temp = _class = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
9283
9651
|
}
|
|
9284
9652
|
}]);
|
|
9285
9653
|
return Grid2;
|
|
9286
|
-
}(
|
|
9654
|
+
}(React36.PureComponent), (0, import_defineProperty3.default)(_class, "propTypes", process.env.NODE_ENV === "production" ? null : {
|
|
9287
9655
|
"aria-label": import_prop_types3.default.string.isRequired,
|
|
9288
9656
|
"aria-readonly": import_prop_types3.default.bool,
|
|
9289
9657
|
/**
|
|
@@ -9589,7 +9957,7 @@ var ArrowKeyStepper = (_temp2 = _class2 = /* @__PURE__ */ function(_React$PureCo
|
|
|
9589
9957
|
value: function render() {
|
|
9590
9958
|
var _this$props2 = this.props, className = _this$props2.className, children2 = _this$props2.children;
|
|
9591
9959
|
var _this$_getScrollState3 = this._getScrollState(), scrollToColumn = _this$_getScrollState3.scrollToColumn, scrollToRow = _this$_getScrollState3.scrollToRow;
|
|
9592
|
-
return
|
|
9960
|
+
return React37.createElement("div", {
|
|
9593
9961
|
className,
|
|
9594
9962
|
onKeyDown: this._onKeyDown
|
|
9595
9963
|
}, children2({
|
|
@@ -9641,7 +10009,7 @@ var ArrowKeyStepper = (_temp2 = _class2 = /* @__PURE__ */ function(_React$PureCo
|
|
|
9641
10009
|
}
|
|
9642
10010
|
}]);
|
|
9643
10011
|
return ArrowKeyStepper2;
|
|
9644
|
-
}(
|
|
10012
|
+
}(React37.PureComponent), (0, import_defineProperty4.default)(_class2, "propTypes", process.env.NODE_ENV === "production" ? null : {
|
|
9645
10013
|
"children": import_prop_types5.default.func.isRequired,
|
|
9646
10014
|
"className": import_prop_types5.default.string,
|
|
9647
10015
|
"columnCount": import_prop_types5.default.number.isRequired,
|
|
@@ -9670,7 +10038,7 @@ var import_getPrototypeOf3 = __toESM(require_getPrototypeOf());
|
|
|
9670
10038
|
var import_assertThisInitialized3 = __toESM(require_assertThisInitialized());
|
|
9671
10039
|
var import_inherits3 = __toESM(require_inherits());
|
|
9672
10040
|
var import_defineProperty5 = __toESM(require_defineProperty());
|
|
9673
|
-
import * as
|
|
10041
|
+
import * as React38 from "react";
|
|
9674
10042
|
|
|
9675
10043
|
// ../../node_modules/react-virtualized/dist/es/vendor/detectElementResize.js
|
|
9676
10044
|
function createDetectElementResize(nonce, hostWindow) {
|
|
@@ -9949,7 +10317,7 @@ var AutoSizer3 = (_temp3 = _class3 = /* @__PURE__ */ function(_React$Component)
|
|
|
9949
10317
|
outerStyle.width = 0;
|
|
9950
10318
|
childParams.width = width;
|
|
9951
10319
|
}
|
|
9952
|
-
return
|
|
10320
|
+
return React38.createElement("div", {
|
|
9953
10321
|
className,
|
|
9954
10322
|
ref: this._setRef,
|
|
9955
10323
|
style: _objectSpread3({}, outerStyle, {}, style5)
|
|
@@ -9957,7 +10325,7 @@ var AutoSizer3 = (_temp3 = _class3 = /* @__PURE__ */ function(_React$Component)
|
|
|
9957
10325
|
}
|
|
9958
10326
|
}]);
|
|
9959
10327
|
return AutoSizer4;
|
|
9960
|
-
}(
|
|
10328
|
+
}(React38.Component), (0, import_defineProperty5.default)(_class3, "propTypes", process.env.NODE_ENV === "production" ? null : {
|
|
9961
10329
|
/** Function responsible for rendering children.*/
|
|
9962
10330
|
"children": import_prop_types6.default.func.isRequired,
|
|
9963
10331
|
/** Optional custom CSS class name to attach to root AutoSizer element. */
|
|
@@ -9993,7 +10361,7 @@ var import_getPrototypeOf4 = __toESM(require_getPrototypeOf());
|
|
|
9993
10361
|
var import_assertThisInitialized4 = __toESM(require_assertThisInitialized());
|
|
9994
10362
|
var import_inherits4 = __toESM(require_inherits());
|
|
9995
10363
|
var import_defineProperty6 = __toESM(require_defineProperty());
|
|
9996
|
-
import * as
|
|
10364
|
+
import * as React39 from "react";
|
|
9997
10365
|
import { findDOMNode } from "react-dom";
|
|
9998
10366
|
|
|
9999
10367
|
// ../../node_modules/react-virtualized/dist/es/CellMeasurer/types.js
|
|
@@ -10115,7 +10483,7 @@ var CellMeasurer = (_temp4 = _class4 = /* @__PURE__ */ function(_React$PureCompo
|
|
|
10115
10483
|
}
|
|
10116
10484
|
}]);
|
|
10117
10485
|
return CellMeasurer2;
|
|
10118
|
-
}(
|
|
10486
|
+
}(React39.PureComponent), (0, import_defineProperty6.default)(_class4, "propTypes", process.env.NODE_ENV === "production" ? null : {
|
|
10119
10487
|
"cache": function cache() {
|
|
10120
10488
|
return (typeof bpfrpt_proptype_CellMeasureCache === "function" ? bpfrpt_proptype_CellMeasureCache.isRequired ? bpfrpt_proptype_CellMeasureCache.isRequired : bpfrpt_proptype_CellMeasureCache : import_prop_types8.default.shape(bpfrpt_proptype_CellMeasureCache).isRequired).apply(this, arguments);
|
|
10121
10489
|
},
|
|
@@ -10148,7 +10516,7 @@ var import_assertThisInitialized6 = __toESM(require_assertThisInitialized());
|
|
|
10148
10516
|
var import_inherits6 = __toESM(require_inherits());
|
|
10149
10517
|
var import_defineProperty9 = __toESM(require_defineProperty());
|
|
10150
10518
|
var import_prop_types11 = __toESM(require_prop_types());
|
|
10151
|
-
import * as
|
|
10519
|
+
import * as React41 from "react";
|
|
10152
10520
|
|
|
10153
10521
|
// ../../node_modules/react-virtualized/dist/es/Collection/CollectionView.js
|
|
10154
10522
|
var import_classCallCheck8 = __toESM(require_classCallCheck());
|
|
@@ -10159,7 +10527,7 @@ var import_assertThisInitialized5 = __toESM(require_assertThisInitialized());
|
|
|
10159
10527
|
var import_inherits5 = __toESM(require_inherits());
|
|
10160
10528
|
var import_defineProperty8 = __toESM(require_defineProperty());
|
|
10161
10529
|
var import_prop_types9 = __toESM(require_prop_types());
|
|
10162
|
-
import * as
|
|
10530
|
+
import * as React40 from "react";
|
|
10163
10531
|
function ownKeys4(object, enumerableOnly) {
|
|
10164
10532
|
var keys = Object.keys(object);
|
|
10165
10533
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -10379,7 +10747,7 @@ var CollectionView = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
10379
10747
|
var horizontalScrollBarSize = totalWidth > width ? this._scrollbarSize : 0;
|
|
10380
10748
|
collectionStyle.overflowX = totalWidth + verticalScrollBarSize <= width ? "hidden" : "auto";
|
|
10381
10749
|
collectionStyle.overflowY = totalHeight + horizontalScrollBarSize <= height ? "hidden" : "auto";
|
|
10382
|
-
return
|
|
10750
|
+
return React40.createElement("div", {
|
|
10383
10751
|
ref: this._setScrollingContainerRef,
|
|
10384
10752
|
"aria-label": this.props["aria-label"],
|
|
10385
10753
|
className: clsx_m_default("ReactVirtualized__Collection", className),
|
|
@@ -10388,7 +10756,7 @@ var CollectionView = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
10388
10756
|
role: "grid",
|
|
10389
10757
|
style: _objectSpread4({}, collectionStyle, {}, style5),
|
|
10390
10758
|
tabIndex: 0
|
|
10391
|
-
}, cellCount > 0 &&
|
|
10759
|
+
}, cellCount > 0 && React40.createElement("div", {
|
|
10392
10760
|
className: "ReactVirtualized__Collection__innerScrollContainer",
|
|
10393
10761
|
style: {
|
|
10394
10762
|
height: totalHeight,
|
|
@@ -10483,7 +10851,7 @@ var CollectionView = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
10483
10851
|
}
|
|
10484
10852
|
}]);
|
|
10485
10853
|
return CollectionView2;
|
|
10486
|
-
}(
|
|
10854
|
+
}(React40.PureComponent);
|
|
10487
10855
|
(0, import_defineProperty8.default)(CollectionView, "defaultProps", {
|
|
10488
10856
|
"aria-label": "grid",
|
|
10489
10857
|
horizontalOverscanSize: 0,
|
|
@@ -10826,7 +11194,7 @@ var Collection = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
10826
11194
|
key: "render",
|
|
10827
11195
|
value: function render() {
|
|
10828
11196
|
var props = (0, import_extends2.default)({}, this.props);
|
|
10829
|
-
return
|
|
11197
|
+
return React41.createElement(CollectionView_default, (0, import_extends2.default)({
|
|
10830
11198
|
cellLayoutManager: this,
|
|
10831
11199
|
isScrollingChange: this._isScrollingChange,
|
|
10832
11200
|
ref: this._setCollectionViewRef
|
|
@@ -10934,7 +11302,7 @@ var Collection = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
10934
11302
|
}
|
|
10935
11303
|
}]);
|
|
10936
11304
|
return Collection2;
|
|
10937
|
-
}(
|
|
11305
|
+
}(React41.PureComponent);
|
|
10938
11306
|
(0, import_defineProperty9.default)(Collection, "defaultProps", {
|
|
10939
11307
|
"aria-label": "grid",
|
|
10940
11308
|
cellGroupRenderer: defaultCellGroupRenderer
|
|
@@ -11008,7 +11376,7 @@ var import_getPrototypeOf7 = __toESM(require_getPrototypeOf());
|
|
|
11008
11376
|
var import_assertThisInitialized7 = __toESM(require_assertThisInitialized());
|
|
11009
11377
|
var import_inherits7 = __toESM(require_inherits());
|
|
11010
11378
|
var import_prop_types12 = __toESM(require_prop_types());
|
|
11011
|
-
import * as
|
|
11379
|
+
import * as React42 from "react";
|
|
11012
11380
|
var ColumnSizer = /* @__PURE__ */ function(_React$PureComponent) {
|
|
11013
11381
|
(0, import_inherits7.default)(ColumnSizer2, _React$PureComponent);
|
|
11014
11382
|
function ColumnSizer2(props, context) {
|
|
@@ -11061,7 +11429,7 @@ var ColumnSizer = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
11061
11429
|
}
|
|
11062
11430
|
}]);
|
|
11063
11431
|
return ColumnSizer2;
|
|
11064
|
-
}(
|
|
11432
|
+
}(React42.PureComponent);
|
|
11065
11433
|
ColumnSizer.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
11066
11434
|
/**
|
|
11067
11435
|
* Function responsible for rendering a virtualized Grid.
|
|
@@ -11093,7 +11461,7 @@ var import_assertThisInitialized8 = __toESM(require_assertThisInitialized());
|
|
|
11093
11461
|
var import_inherits8 = __toESM(require_inherits());
|
|
11094
11462
|
var import_defineProperty10 = __toESM(require_defineProperty());
|
|
11095
11463
|
var import_prop_types13 = __toESM(require_prop_types());
|
|
11096
|
-
import * as
|
|
11464
|
+
import * as React43 from "react";
|
|
11097
11465
|
var InfiniteLoader = /* @__PURE__ */ function(_React$PureComponent) {
|
|
11098
11466
|
(0, import_inherits8.default)(InfiniteLoader2, _React$PureComponent);
|
|
11099
11467
|
function InfiniteLoader2(props, context) {
|
|
@@ -11185,7 +11553,7 @@ var InfiniteLoader = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
11185
11553
|
}
|
|
11186
11554
|
}]);
|
|
11187
11555
|
return InfiniteLoader2;
|
|
11188
|
-
}(
|
|
11556
|
+
}(React43.PureComponent);
|
|
11189
11557
|
(0, import_defineProperty10.default)(InfiniteLoader, "defaultProps", {
|
|
11190
11558
|
minimumBatchSize: 10,
|
|
11191
11559
|
rowCount: 0,
|
|
@@ -11306,11 +11674,11 @@ var import_getPrototypeOf9 = __toESM(require_getPrototypeOf());
|
|
|
11306
11674
|
var import_assertThisInitialized9 = __toESM(require_assertThisInitialized());
|
|
11307
11675
|
var import_inherits9 = __toESM(require_inherits());
|
|
11308
11676
|
var import_defineProperty11 = __toESM(require_defineProperty());
|
|
11309
|
-
import * as
|
|
11677
|
+
import * as React45 from "react";
|
|
11310
11678
|
|
|
11311
11679
|
// ../../node_modules/react-virtualized/dist/es/List/types.js
|
|
11312
11680
|
var import_prop_types14 = __toESM(require_prop_types());
|
|
11313
|
-
import * as
|
|
11681
|
+
import * as React44 from "react";
|
|
11314
11682
|
var bpfrpt_proptype_RowRendererParams = process.env.NODE_ENV === "production" ? null : {
|
|
11315
11683
|
"index": import_prop_types14.default.number.isRequired,
|
|
11316
11684
|
"isScrolling": import_prop_types14.default.bool.isRequired,
|
|
@@ -11481,7 +11849,7 @@ var List = (_temp5 = _class5 = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
11481
11849
|
value: function render() {
|
|
11482
11850
|
var _this$props = this.props, className = _this$props.className, noRowsRenderer4 = _this$props.noRowsRenderer, scrollToIndex = _this$props.scrollToIndex, width = _this$props.width;
|
|
11483
11851
|
var classNames = clsx_m_default("ReactVirtualized__List", className);
|
|
11484
|
-
return
|
|
11852
|
+
return React45.createElement(Grid_default, (0, import_extends3.default)({}, this.props, {
|
|
11485
11853
|
autoContainerWidth: true,
|
|
11486
11854
|
cellRenderer: this._cellRenderer,
|
|
11487
11855
|
className: classNames,
|
|
@@ -11496,7 +11864,7 @@ var List = (_temp5 = _class5 = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
11496
11864
|
}
|
|
11497
11865
|
}]);
|
|
11498
11866
|
return List2;
|
|
11499
|
-
}(
|
|
11867
|
+
}(React45.PureComponent), (0, import_defineProperty11.default)(_class5, "propTypes", process.env.NODE_ENV === "production" ? null : {
|
|
11500
11868
|
"aria-label": import_prop_types15.default.string,
|
|
11501
11869
|
/**
|
|
11502
11870
|
* Removes fixed height from the scrollingContainer so that the total height
|
|
@@ -11582,7 +11950,7 @@ var import_getPrototypeOf10 = __toESM(require_getPrototypeOf());
|
|
|
11582
11950
|
var import_assertThisInitialized10 = __toESM(require_assertThisInitialized());
|
|
11583
11951
|
var import_inherits10 = __toESM(require_inherits());
|
|
11584
11952
|
var import_defineProperty13 = __toESM(require_defineProperty());
|
|
11585
|
-
import * as
|
|
11953
|
+
import * as React46 from "react";
|
|
11586
11954
|
|
|
11587
11955
|
// ../../node_modules/react-virtualized/dist/es/Masonry/PositionCache.js
|
|
11588
11956
|
var import_slicedToArray = __toESM(require_slicedToArray());
|
|
@@ -12357,7 +12725,7 @@ var Masonry = (_temp6 = _class6 = /* @__PURE__ */ function(_React$PureComponent)
|
|
|
12357
12725
|
}
|
|
12358
12726
|
this._startIndex = startIndex;
|
|
12359
12727
|
this._stopIndex = stopIndex;
|
|
12360
|
-
return
|
|
12728
|
+
return React46.createElement("div", {
|
|
12361
12729
|
ref: this._setScrollingContainerRef,
|
|
12362
12730
|
"aria-label": this.props["aria-label"],
|
|
12363
12731
|
className: clsx_m_default("ReactVirtualized__Masonry", className),
|
|
@@ -12376,7 +12744,7 @@ var Masonry = (_temp6 = _class6 = /* @__PURE__ */ function(_React$PureComponent)
|
|
|
12376
12744
|
willChange: "transform"
|
|
12377
12745
|
}, style5),
|
|
12378
12746
|
tabIndex
|
|
12379
|
-
},
|
|
12747
|
+
}, React46.createElement("div", {
|
|
12380
12748
|
className: "ReactVirtualized__Masonry__innerScrollContainer",
|
|
12381
12749
|
style: {
|
|
12382
12750
|
width: "100%",
|
|
@@ -12466,7 +12834,7 @@ var Masonry = (_temp6 = _class6 = /* @__PURE__ */ function(_React$PureComponent)
|
|
|
12466
12834
|
}
|
|
12467
12835
|
}]);
|
|
12468
12836
|
return Masonry2;
|
|
12469
|
-
}(
|
|
12837
|
+
}(React46.PureComponent), (0, import_defineProperty13.default)(_class6, "propTypes", process.env.NODE_ENV === "production" ? null : {
|
|
12470
12838
|
"autoHeight": import_prop_types16.default.bool.isRequired,
|
|
12471
12839
|
"cellCount": import_prop_types16.default.number.isRequired,
|
|
12472
12840
|
"cellMeasurerCache": function cellMeasurerCache() {
|
|
@@ -12540,7 +12908,7 @@ var import_assertThisInitialized11 = __toESM(require_assertThisInitialized());
|
|
|
12540
12908
|
var import_inherits11 = __toESM(require_inherits());
|
|
12541
12909
|
var import_defineProperty15 = __toESM(require_defineProperty());
|
|
12542
12910
|
var import_prop_types17 = __toESM(require_prop_types());
|
|
12543
|
-
import * as
|
|
12911
|
+
import * as React47 from "react";
|
|
12544
12912
|
|
|
12545
12913
|
// ../../node_modules/react-virtualized/dist/es/MultiGrid/CellMeasurerCacheDecorator.js
|
|
12546
12914
|
var import_classCallCheck17 = __toESM(require_classCallCheck());
|
|
@@ -12683,7 +13051,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
12683
13051
|
var rowIndex = _ref.rowIndex, rest = (0, import_objectWithoutProperties2.default)(_ref, ["rowIndex"]);
|
|
12684
13052
|
var _this$props = _this.props, cellRenderer3 = _this$props.cellRenderer, fixedRowCount = _this$props.fixedRowCount, rowCount = _this$props.rowCount;
|
|
12685
13053
|
if (rowIndex === rowCount - fixedRowCount) {
|
|
12686
|
-
return
|
|
13054
|
+
return React47.createElement("div", {
|
|
12687
13055
|
key: rest.key,
|
|
12688
13056
|
style: _objectSpread6({}, rest.style, {
|
|
12689
13057
|
height: SCROLLBAR_SIZE_BUFFER
|
|
@@ -12709,7 +13077,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
12709
13077
|
var columnIndex = _ref3.columnIndex, rest = (0, import_objectWithoutProperties2.default)(_ref3, ["columnIndex"]);
|
|
12710
13078
|
var _this$props3 = _this.props, cellRenderer3 = _this$props3.cellRenderer, columnCount = _this$props3.columnCount, fixedColumnCount = _this$props3.fixedColumnCount;
|
|
12711
13079
|
if (columnIndex === columnCount - fixedColumnCount) {
|
|
12712
|
-
return
|
|
13080
|
+
return React47.createElement("div", {
|
|
12713
13081
|
key: rest.key,
|
|
12714
13082
|
style: _objectSpread6({}, rest.style, {
|
|
12715
13083
|
width: SCROLLBAR_SIZE_BUFFER
|
|
@@ -12898,14 +13266,14 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
12898
13266
|
return null;
|
|
12899
13267
|
}
|
|
12900
13268
|
var _this$state4 = this.state, scrollLeft = _this$state4.scrollLeft, scrollTop = _this$state4.scrollTop;
|
|
12901
|
-
return
|
|
13269
|
+
return React47.createElement("div", {
|
|
12902
13270
|
style: this._containerOuterStyle
|
|
12903
|
-
},
|
|
13271
|
+
}, React47.createElement("div", {
|
|
12904
13272
|
style: this._containerTopStyle
|
|
12905
13273
|
}, this._renderTopLeftGrid(rest), this._renderTopRightGrid(_objectSpread6({}, rest, {
|
|
12906
13274
|
onScroll: onScroll7,
|
|
12907
13275
|
scrollLeft
|
|
12908
|
-
}))),
|
|
13276
|
+
}))), React47.createElement("div", {
|
|
12909
13277
|
style: this._containerBottomStyle
|
|
12910
13278
|
}, this._renderBottomLeftGrid(_objectSpread6({}, rest, {
|
|
12911
13279
|
onScroll: onScroll7,
|
|
@@ -13087,7 +13455,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13087
13455
|
return null;
|
|
13088
13456
|
}
|
|
13089
13457
|
var additionalRowCount = showVerticalScrollbar ? 1 : 0, height = this._getBottomGridHeight(props), width = this._getLeftGridWidth(props), scrollbarSize2 = this.state.showVerticalScrollbar ? this.state.scrollbarSize : 0, gridWidth = hideBottomLeftGridScrollbar ? width + scrollbarSize2 : width;
|
|
13090
|
-
var bottomLeftGrid =
|
|
13458
|
+
var bottomLeftGrid = React47.createElement(Grid_default, (0, import_extends4.default)({}, props, {
|
|
13091
13459
|
cellRenderer: this._cellRendererBottomLeftGrid,
|
|
13092
13460
|
className: this.props.classNameBottomLeftGrid,
|
|
13093
13461
|
columnCount: fixedColumnCount,
|
|
@@ -13102,7 +13470,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13102
13470
|
width: gridWidth
|
|
13103
13471
|
}));
|
|
13104
13472
|
if (hideBottomLeftGridScrollbar) {
|
|
13105
|
-
return
|
|
13473
|
+
return React47.createElement("div", {
|
|
13106
13474
|
className: "BottomLeftGrid_ScrollWrapper",
|
|
13107
13475
|
style: _objectSpread6({}, this._bottomLeftGridStyle, {
|
|
13108
13476
|
height,
|
|
@@ -13117,7 +13485,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13117
13485
|
key: "_renderBottomRightGrid",
|
|
13118
13486
|
value: function _renderBottomRightGrid(props) {
|
|
13119
13487
|
var columnCount = props.columnCount, fixedColumnCount = props.fixedColumnCount, fixedRowCount = props.fixedRowCount, rowCount = props.rowCount, scrollToColumn = props.scrollToColumn, scrollToRow = props.scrollToRow;
|
|
13120
|
-
return
|
|
13488
|
+
return React47.createElement(Grid_default, (0, import_extends4.default)({}, props, {
|
|
13121
13489
|
cellRenderer: this._cellRendererBottomRightGrid,
|
|
13122
13490
|
className: this.props.classNameBottomRightGrid,
|
|
13123
13491
|
columnCount: Math.max(0, columnCount - fixedColumnCount),
|
|
@@ -13142,7 +13510,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13142
13510
|
if (!fixedColumnCount || !fixedRowCount) {
|
|
13143
13511
|
return null;
|
|
13144
13512
|
}
|
|
13145
|
-
return
|
|
13513
|
+
return React47.createElement(Grid_default, (0, import_extends4.default)({}, props, {
|
|
13146
13514
|
className: this.props.classNameTopLeftGrid,
|
|
13147
13515
|
columnCount: fixedColumnCount,
|
|
13148
13516
|
height: this._getTopGridHeight(props),
|
|
@@ -13169,7 +13537,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13169
13537
|
left: 0
|
|
13170
13538
|
});
|
|
13171
13539
|
}
|
|
13172
|
-
var topRightGrid =
|
|
13540
|
+
var topRightGrid = React47.createElement(Grid_default, (0, import_extends4.default)({}, props, {
|
|
13173
13541
|
cellRenderer: this._cellRendererTopRightGrid,
|
|
13174
13542
|
className: this.props.classNameTopRightGrid,
|
|
13175
13543
|
columnCount: Math.max(0, columnCount - fixedColumnCount) + additionalColumnCount,
|
|
@@ -13185,7 +13553,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13185
13553
|
width
|
|
13186
13554
|
}));
|
|
13187
13555
|
if (hideTopRightGridScrollbar) {
|
|
13188
|
-
return
|
|
13556
|
+
return React47.createElement("div", {
|
|
13189
13557
|
className: "TopRightGrid_ScrollWrapper",
|
|
13190
13558
|
style: _objectSpread6({}, this._topRightGridStyle, {
|
|
13191
13559
|
height,
|
|
@@ -13209,7 +13577,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13209
13577
|
}
|
|
13210
13578
|
}]);
|
|
13211
13579
|
return MultiGrid2;
|
|
13212
|
-
}(
|
|
13580
|
+
}(React47.PureComponent);
|
|
13213
13581
|
(0, import_defineProperty15.default)(MultiGrid, "defaultProps", {
|
|
13214
13582
|
classNameBottomLeftGrid: "",
|
|
13215
13583
|
classNameBottomRightGrid: "",
|
|
@@ -13257,7 +13625,7 @@ var import_getPrototypeOf12 = __toESM(require_getPrototypeOf());
|
|
|
13257
13625
|
var import_assertThisInitialized12 = __toESM(require_assertThisInitialized());
|
|
13258
13626
|
var import_inherits12 = __toESM(require_inherits());
|
|
13259
13627
|
var import_prop_types18 = __toESM(require_prop_types());
|
|
13260
|
-
import * as
|
|
13628
|
+
import * as React48 from "react";
|
|
13261
13629
|
var ScrollSync = /* @__PURE__ */ function(_React$PureComponent) {
|
|
13262
13630
|
(0, import_inherits12.default)(ScrollSync2, _React$PureComponent);
|
|
13263
13631
|
function ScrollSync2(props, context) {
|
|
@@ -13305,7 +13673,7 @@ var ScrollSync = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13305
13673
|
}
|
|
13306
13674
|
}]);
|
|
13307
13675
|
return ScrollSync2;
|
|
13308
|
-
}(
|
|
13676
|
+
}(React48.PureComponent);
|
|
13309
13677
|
ScrollSync.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
13310
13678
|
/**
|
|
13311
13679
|
* Function responsible for rendering 2 or more virtualized components.
|
|
@@ -13405,11 +13773,11 @@ function defaultCellRenderer(_ref) {
|
|
|
13405
13773
|
}
|
|
13406
13774
|
|
|
13407
13775
|
// ../../node_modules/react-virtualized/dist/es/Table/defaultHeaderRowRenderer.js
|
|
13408
|
-
import * as
|
|
13776
|
+
import * as React49 from "react";
|
|
13409
13777
|
var import_prop_types20 = __toESM(require_prop_types());
|
|
13410
13778
|
function defaultHeaderRowRenderer(_ref) {
|
|
13411
13779
|
var className = _ref.className, columns = _ref.columns, style5 = _ref.style;
|
|
13412
|
-
return
|
|
13780
|
+
return React49.createElement("div", {
|
|
13413
13781
|
className,
|
|
13414
13782
|
role: "row",
|
|
13415
13783
|
style: style5
|
|
@@ -13418,11 +13786,11 @@ function defaultHeaderRowRenderer(_ref) {
|
|
|
13418
13786
|
defaultHeaderRowRenderer.propTypes = process.env.NODE_ENV === "production" ? null : bpfrpt_proptype_HeaderRowRendererParams === import_prop_types20.default.any ? {} : bpfrpt_proptype_HeaderRowRendererParams;
|
|
13419
13787
|
|
|
13420
13788
|
// ../../node_modules/react-virtualized/dist/es/Table/defaultHeaderRenderer.js
|
|
13421
|
-
import * as
|
|
13789
|
+
import * as React51 from "react";
|
|
13422
13790
|
|
|
13423
13791
|
// ../../node_modules/react-virtualized/dist/es/Table/SortIndicator.js
|
|
13424
13792
|
var import_prop_types21 = __toESM(require_prop_types());
|
|
13425
|
-
import * as
|
|
13793
|
+
import * as React50 from "react";
|
|
13426
13794
|
|
|
13427
13795
|
// ../../node_modules/react-virtualized/dist/es/Table/SortDirection.js
|
|
13428
13796
|
var SortDirection = {
|
|
@@ -13446,16 +13814,16 @@ function SortIndicator(_ref) {
|
|
|
13446
13814
|
"ReactVirtualized__Table__sortableHeaderIcon--ASC": sortDirection === SortDirection_default.ASC,
|
|
13447
13815
|
"ReactVirtualized__Table__sortableHeaderIcon--DESC": sortDirection === SortDirection_default.DESC
|
|
13448
13816
|
});
|
|
13449
|
-
return
|
|
13817
|
+
return React50.createElement("svg", {
|
|
13450
13818
|
className: classNames,
|
|
13451
13819
|
width: 18,
|
|
13452
13820
|
height: 18,
|
|
13453
13821
|
viewBox: "0 0 24 24"
|
|
13454
|
-
}, sortDirection === SortDirection_default.ASC ?
|
|
13822
|
+
}, sortDirection === SortDirection_default.ASC ? React50.createElement("path", {
|
|
13455
13823
|
d: "M7 14l5-5 5 5z"
|
|
13456
|
-
}) :
|
|
13824
|
+
}) : React50.createElement("path", {
|
|
13457
13825
|
d: "M7 10l5 5 5-5z"
|
|
13458
|
-
}),
|
|
13826
|
+
}), React50.createElement("path", {
|
|
13459
13827
|
d: "M0 0h24v24H0z",
|
|
13460
13828
|
fill: "none"
|
|
13461
13829
|
}));
|
|
@@ -13469,13 +13837,13 @@ var import_prop_types22 = __toESM(require_prop_types());
|
|
|
13469
13837
|
function defaultHeaderRenderer(_ref) {
|
|
13470
13838
|
var dataKey = _ref.dataKey, label = _ref.label, sortBy = _ref.sortBy, sortDirection = _ref.sortDirection;
|
|
13471
13839
|
var showSortIndicator = sortBy === dataKey;
|
|
13472
|
-
var children2 = [
|
|
13840
|
+
var children2 = [React51.createElement("span", {
|
|
13473
13841
|
className: "ReactVirtualized__Table__headerTruncatedText",
|
|
13474
13842
|
key: "label",
|
|
13475
13843
|
title: typeof label === "string" ? label : null
|
|
13476
13844
|
}, label)];
|
|
13477
13845
|
if (showSortIndicator) {
|
|
13478
|
-
children2.push(
|
|
13846
|
+
children2.push(React51.createElement(SortIndicator, {
|
|
13479
13847
|
key: "SortIndicator",
|
|
13480
13848
|
sortDirection
|
|
13481
13849
|
}));
|
|
@@ -13486,7 +13854,7 @@ defaultHeaderRenderer.propTypes = process.env.NODE_ENV === "production" ? null :
|
|
|
13486
13854
|
|
|
13487
13855
|
// ../../node_modules/react-virtualized/dist/es/Table/defaultRowRenderer.js
|
|
13488
13856
|
var import_extends5 = __toESM(require_extends());
|
|
13489
|
-
import * as
|
|
13857
|
+
import * as React52 from "react";
|
|
13490
13858
|
var import_prop_types23 = __toESM(require_prop_types());
|
|
13491
13859
|
function defaultRowRenderer(_ref) {
|
|
13492
13860
|
var className = _ref.className, columns = _ref.columns, index = _ref.index, key = _ref.key, onRowClick = _ref.onRowClick, onRowDoubleClick = _ref.onRowDoubleClick, onRowMouseOut = _ref.onRowMouseOut, onRowMouseOver = _ref.onRowMouseOver, onRowRightClick = _ref.onRowRightClick, rowData4 = _ref.rowData, style5 = _ref.style;
|
|
@@ -13542,7 +13910,7 @@ function defaultRowRenderer(_ref) {
|
|
|
13542
13910
|
};
|
|
13543
13911
|
}
|
|
13544
13912
|
}
|
|
13545
|
-
return
|
|
13913
|
+
return React52.createElement("div", (0, import_extends5.default)({}, a11yProps, {
|
|
13546
13914
|
className,
|
|
13547
13915
|
key,
|
|
13548
13916
|
role: "row",
|
|
@@ -13558,7 +13926,7 @@ var import_getPrototypeOf13 = __toESM(require_getPrototypeOf());
|
|
|
13558
13926
|
var import_inherits13 = __toESM(require_inherits());
|
|
13559
13927
|
var import_defineProperty16 = __toESM(require_defineProperty());
|
|
13560
13928
|
var import_prop_types24 = __toESM(require_prop_types());
|
|
13561
|
-
import * as
|
|
13929
|
+
import * as React53 from "react";
|
|
13562
13930
|
var Column = /* @__PURE__ */ function(_React$Component) {
|
|
13563
13931
|
(0, import_inherits13.default)(Column3, _React$Component);
|
|
13564
13932
|
function Column3() {
|
|
@@ -13566,7 +13934,7 @@ var Column = /* @__PURE__ */ function(_React$Component) {
|
|
|
13566
13934
|
return (0, import_possibleConstructorReturn13.default)(this, (0, import_getPrototypeOf13.default)(Column3).apply(this, arguments));
|
|
13567
13935
|
}
|
|
13568
13936
|
return Column3;
|
|
13569
|
-
}(
|
|
13937
|
+
}(React53.Component);
|
|
13570
13938
|
(0, import_defineProperty16.default)(Column, "defaultProps", {
|
|
13571
13939
|
cellDataGetter: defaultCellDataGetter,
|
|
13572
13940
|
cellRenderer: defaultCellRenderer,
|
|
@@ -13636,7 +14004,7 @@ var import_assertThisInitialized13 = __toESM(require_assertThisInitialized());
|
|
|
13636
14004
|
var import_inherits14 = __toESM(require_inherits());
|
|
13637
14005
|
var import_defineProperty17 = __toESM(require_defineProperty());
|
|
13638
14006
|
var import_prop_types25 = __toESM(require_prop_types());
|
|
13639
|
-
import * as
|
|
14007
|
+
import * as React54 from "react";
|
|
13640
14008
|
import { findDOMNode as findDOMNode2 } from "react-dom";
|
|
13641
14009
|
function ownKeys7(object, enumerableOnly) {
|
|
13642
14010
|
var keys = Object.keys(object);
|
|
@@ -13804,16 +14172,16 @@ var Table = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13804
14172
|
index: -1
|
|
13805
14173
|
}) : rowStyle;
|
|
13806
14174
|
this._cachedColumnStyles = [];
|
|
13807
|
-
|
|
14175
|
+
React54.Children.toArray(children2).forEach(function(column, index) {
|
|
13808
14176
|
var flexStyles = _this2._getFlexStyleForColumn(column, column.props.style);
|
|
13809
14177
|
_this2._cachedColumnStyles[index] = _objectSpread7({
|
|
13810
14178
|
overflow: "hidden"
|
|
13811
14179
|
}, flexStyles);
|
|
13812
14180
|
});
|
|
13813
|
-
return
|
|
14181
|
+
return React54.createElement("div", {
|
|
13814
14182
|
"aria-label": this.props["aria-label"],
|
|
13815
14183
|
"aria-labelledby": this.props["aria-labelledby"],
|
|
13816
|
-
"aria-colcount":
|
|
14184
|
+
"aria-colcount": React54.Children.toArray(children2).length,
|
|
13817
14185
|
"aria-rowcount": this.props.rowCount,
|
|
13818
14186
|
className: clsx_m_default("ReactVirtualized__Table", className),
|
|
13819
14187
|
id,
|
|
@@ -13828,7 +14196,7 @@ var Table = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13828
14196
|
paddingRight: scrollbarWidth,
|
|
13829
14197
|
width
|
|
13830
14198
|
}, rowStyleObject)
|
|
13831
|
-
}),
|
|
14199
|
+
}), React54.createElement(Grid_default, (0, import_extends6.default)({}, this.props, {
|
|
13832
14200
|
"aria-readonly": null,
|
|
13833
14201
|
autoContainerWidth: true,
|
|
13834
14202
|
className: clsx_m_default("ReactVirtualized__Table__Grid", gridClassName),
|
|
@@ -13879,7 +14247,7 @@ var Table = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13879
14247
|
};
|
|
13880
14248
|
var style5 = this._cachedColumnStyles[columnIndex];
|
|
13881
14249
|
var title = typeof renderedCell === "string" ? renderedCell : null;
|
|
13882
|
-
return
|
|
14250
|
+
return React54.createElement("div", {
|
|
13883
14251
|
"aria-colindex": columnIndex + 1,
|
|
13884
14252
|
"aria-describedby": id,
|
|
13885
14253
|
className: clsx_m_default("ReactVirtualized__Table__rowColumn", className),
|
|
@@ -13940,7 +14308,7 @@ var Table = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13940
14308
|
if (sortBy === dataKey) {
|
|
13941
14309
|
headerAriaSort = sortDirection === SortDirection_default.ASC ? "ascending" : "descending";
|
|
13942
14310
|
}
|
|
13943
|
-
return
|
|
14311
|
+
return React54.createElement("div", {
|
|
13944
14312
|
"aria-label": headerAriaLabel,
|
|
13945
14313
|
"aria-sort": headerAriaSort,
|
|
13946
14314
|
className: classNames,
|
|
@@ -13969,7 +14337,7 @@ var Table = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13969
14337
|
var rowData4 = rowGetter({
|
|
13970
14338
|
index
|
|
13971
14339
|
});
|
|
13972
|
-
var columns =
|
|
14340
|
+
var columns = React54.Children.toArray(children2).map(function(column, columnIndex) {
|
|
13973
14341
|
return _this3._createColumn({
|
|
13974
14342
|
column,
|
|
13975
14343
|
columnIndex,
|
|
@@ -14027,7 +14395,7 @@ var Table = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
14027
14395
|
value: function _getHeaderColumns() {
|
|
14028
14396
|
var _this4 = this;
|
|
14029
14397
|
var _this$props4 = this.props, children2 = _this$props4.children, disableHeader = _this$props4.disableHeader;
|
|
14030
|
-
var items = disableHeader ? [] :
|
|
14398
|
+
var items = disableHeader ? [] : React54.Children.toArray(children2);
|
|
14031
14399
|
return items.map(function(column, index) {
|
|
14032
14400
|
return _this4._createHeader({
|
|
14033
14401
|
column,
|
|
@@ -14081,7 +14449,7 @@ var Table = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
14081
14449
|
}
|
|
14082
14450
|
}]);
|
|
14083
14451
|
return Table2;
|
|
14084
|
-
}(
|
|
14452
|
+
}(React54.PureComponent);
|
|
14085
14453
|
(0, import_defineProperty17.default)(Table, "defaultProps", {
|
|
14086
14454
|
disableHeader: false,
|
|
14087
14455
|
estimatedRowSize: 30,
|
|
@@ -14117,7 +14485,7 @@ Table.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
14117
14485
|
autoHeight: import_prop_types25.default.bool,
|
|
14118
14486
|
/** One or more Columns describing the data displayed in this row */
|
|
14119
14487
|
children: function children(props) {
|
|
14120
|
-
var children2 =
|
|
14488
|
+
var children2 = React54.Children.toArray(props.children);
|
|
14121
14489
|
for (var i = 0; i < children2.length; i++) {
|
|
14122
14490
|
var childType = children2[i].type;
|
|
14123
14491
|
if (childType !== Column && !(childType.prototype instanceof Column)) {
|
|
@@ -14284,7 +14652,7 @@ var import_getPrototypeOf15 = __toESM(require_getPrototypeOf());
|
|
|
14284
14652
|
var import_assertThisInitialized14 = __toESM(require_assertThisInitialized());
|
|
14285
14653
|
var import_inherits15 = __toESM(require_inherits());
|
|
14286
14654
|
var import_defineProperty18 = __toESM(require_defineProperty());
|
|
14287
|
-
import * as
|
|
14655
|
+
import * as React55 from "react";
|
|
14288
14656
|
import * as ReactDOM from "react-dom";
|
|
14289
14657
|
|
|
14290
14658
|
// ../../node_modules/react-virtualized/dist/es/WindowScroller/utils/onScroll.js
|
|
@@ -14604,7 +14972,7 @@ var WindowScroller = (_temp7 = _class7 = /* @__PURE__ */ function(_React$PureCom
|
|
|
14604
14972
|
}
|
|
14605
14973
|
}]);
|
|
14606
14974
|
return WindowScroller2;
|
|
14607
|
-
}(
|
|
14975
|
+
}(React55.PureComponent), (0, import_defineProperty18.default)(_class7, "propTypes", process.env.NODE_ENV === "production" ? null : {
|
|
14608
14976
|
/**
|
|
14609
14977
|
* Function responsible for rendering children.
|
|
14610
14978
|
* This function should implement the following signature:
|
|
@@ -14679,9 +15047,9 @@ import {
|
|
|
14679
15047
|
useSortable,
|
|
14680
15048
|
verticalListSortingStrategy
|
|
14681
15049
|
} from "@dnd-kit/sortable";
|
|
14682
|
-
import
|
|
15050
|
+
import React56, {
|
|
14683
15051
|
createContext as createContext8,
|
|
14684
|
-
memo as
|
|
15052
|
+
memo as memo21,
|
|
14685
15053
|
useCallback as useCallback19,
|
|
14686
15054
|
useContext as useContext8,
|
|
14687
15055
|
useEffect as useEffect13,
|
|
@@ -14819,7 +15187,7 @@ function SortableRoot({
|
|
|
14819
15187
|
useEffect13(() => {
|
|
14820
15188
|
setMounted(true);
|
|
14821
15189
|
}, []);
|
|
14822
|
-
return /* @__PURE__ */
|
|
15190
|
+
return /* @__PURE__ */ React56.createElement(
|
|
14823
15191
|
SortableItemContext.Provider,
|
|
14824
15192
|
{
|
|
14825
15193
|
value: useMemo17(
|
|
@@ -14833,7 +15201,7 @@ function SortableRoot({
|
|
|
14833
15201
|
[acceptsDrop, axis, keys, position, setActivatorEvent]
|
|
14834
15202
|
)
|
|
14835
15203
|
},
|
|
14836
|
-
/* @__PURE__ */
|
|
15204
|
+
/* @__PURE__ */ React56.createElement(
|
|
14837
15205
|
DndContext,
|
|
14838
15206
|
{
|
|
14839
15207
|
sensors,
|
|
@@ -14842,9 +15210,9 @@ function SortableRoot({
|
|
|
14842
15210
|
onDragMove: handleDragMove,
|
|
14843
15211
|
onDragEnd: handleDragEnd
|
|
14844
15212
|
},
|
|
14845
|
-
/* @__PURE__ */
|
|
15213
|
+
/* @__PURE__ */ React56.createElement(SortableContext, { items: keys, strategy: verticalListSortingStrategy }, children2),
|
|
14846
15214
|
mounted && renderOverlay && createPortal2(
|
|
14847
|
-
/* @__PURE__ */
|
|
15215
|
+
/* @__PURE__ */ React56.createElement(DragOverlay, { dropAnimation: null }, activeIndex !== void 0 && activeIndex >= 0 && renderOverlay(activeIndex)),
|
|
14848
15216
|
document.body
|
|
14849
15217
|
)
|
|
14850
15218
|
)
|
|
@@ -14852,8 +15220,8 @@ function SortableRoot({
|
|
|
14852
15220
|
}
|
|
14853
15221
|
var Sortable;
|
|
14854
15222
|
((Sortable2) => {
|
|
14855
|
-
Sortable2.Item =
|
|
14856
|
-
Sortable2.Root =
|
|
15223
|
+
Sortable2.Item = memo21(SortableItem);
|
|
15224
|
+
Sortable2.Root = memo21(SortableRoot);
|
|
14857
15225
|
})(Sortable || (Sortable = {}));
|
|
14858
15226
|
|
|
14859
15227
|
// src/components/ListView.tsx
|
|
@@ -14881,7 +15249,7 @@ var ListViewRowTitle = ({
|
|
|
14881
15249
|
className,
|
|
14882
15250
|
children: children2,
|
|
14883
15251
|
...props
|
|
14884
|
-
}) => /* @__PURE__ */
|
|
15252
|
+
}) => /* @__PURE__ */ React57.createElement(
|
|
14885
15253
|
"span",
|
|
14886
15254
|
{
|
|
14887
15255
|
className: `flex-1 overflow-hidden text-ellipsis whitespace-pre ${className ?? ""}`,
|
|
@@ -14889,8 +15257,8 @@ var ListViewRowTitle = ({
|
|
|
14889
15257
|
},
|
|
14890
15258
|
children2
|
|
14891
15259
|
);
|
|
14892
|
-
var ListViewEditableRowTitleElement =
|
|
14893
|
-
({ className, ...props }, forwardedRef) => /* @__PURE__ */
|
|
15260
|
+
var ListViewEditableRowTitleElement = forwardRef15(
|
|
15261
|
+
({ className, ...props }, forwardedRef) => /* @__PURE__ */ React57.createElement(
|
|
14894
15262
|
InputField.Input,
|
|
14895
15263
|
{
|
|
14896
15264
|
ref: forwardedRef,
|
|
@@ -14914,7 +15282,7 @@ function ListViewEditableRowTitle({
|
|
|
14914
15282
|
element.select();
|
|
14915
15283
|
}, 0);
|
|
14916
15284
|
}, [autoFocus]);
|
|
14917
|
-
return /* @__PURE__ */
|
|
15285
|
+
return /* @__PURE__ */ React57.createElement(
|
|
14918
15286
|
ListViewEditableRowTitleElement,
|
|
14919
15287
|
{
|
|
14920
15288
|
ref: inputRef,
|
|
@@ -14932,22 +15300,7 @@ function getPositionMargin(marginType) {
|
|
|
14932
15300
|
bottom: marginType === "bottom" || marginType === "vertical" ? 8 : 0
|
|
14933
15301
|
};
|
|
14934
15302
|
}
|
|
14935
|
-
var
|
|
14936
|
-
colors: {
|
|
14937
|
-
textMuted: "var(--text-muted)",
|
|
14938
|
-
listView: {
|
|
14939
|
-
raisedBackground: "var(--listview-raised-background)"
|
|
14940
|
-
},
|
|
14941
|
-
secondary: "var(--secondary)",
|
|
14942
|
-
primary: "var(--primary)",
|
|
14943
|
-
textDisabled: "var(--text-disabled)",
|
|
14944
|
-
primaryLight: "var(--primary-light)",
|
|
14945
|
-
secondaryLight: "var(--secondary-light)",
|
|
14946
|
-
activeBackground: "var(--active-background)",
|
|
14947
|
-
dividerSubtle: "var(--divider-subtle)"
|
|
14948
|
-
}
|
|
14949
|
-
};
|
|
14950
|
-
var RowContainer = forwardRef14(
|
|
15303
|
+
var RowContainer = forwardRef15(
|
|
14951
15304
|
({
|
|
14952
15305
|
className,
|
|
14953
15306
|
$marginType,
|
|
@@ -14964,10 +15317,12 @@ var RowContainer = forwardRef14(
|
|
|
14964
15317
|
$gap,
|
|
14965
15318
|
$backgroundColor,
|
|
14966
15319
|
style: style5,
|
|
15320
|
+
"aria-describedby": _,
|
|
15321
|
+
// Causes hydration warning
|
|
14967
15322
|
...props
|
|
14968
15323
|
}, ref) => {
|
|
14969
15324
|
const margin = getPositionMargin($marginType);
|
|
14970
|
-
return /* @__PURE__ */
|
|
15325
|
+
return /* @__PURE__ */ React57.createElement(
|
|
14971
15326
|
"div",
|
|
14972
15327
|
{
|
|
14973
15328
|
ref,
|
|
@@ -14991,19 +15346,19 @@ var RowContainer = forwardRef14(
|
|
|
14991
15346
|
marginBottom: `${margin.bottom}px`
|
|
14992
15347
|
}
|
|
14993
15348
|
},
|
|
14994
|
-
color:
|
|
15349
|
+
color: cssVars.colors.textMuted,
|
|
14995
15350
|
...$isSectionHeader && {
|
|
14996
|
-
backgroundColor:
|
|
15351
|
+
backgroundColor: cssVars.colors.listviewRaisedBackground,
|
|
14997
15352
|
...$sectionHeaderVariant === "label" && {
|
|
14998
|
-
color:
|
|
15353
|
+
color: cssVars.colors.textDisabled
|
|
14999
15354
|
}
|
|
15000
15355
|
},
|
|
15001
15356
|
...$disabled && {
|
|
15002
|
-
color:
|
|
15357
|
+
color: cssVars.colors.textDisabled
|
|
15003
15358
|
},
|
|
15004
15359
|
...$selected && {
|
|
15005
15360
|
color: "white",
|
|
15006
|
-
backgroundColor:
|
|
15361
|
+
backgroundColor: cssVars.colors[$colorScheme]
|
|
15007
15362
|
},
|
|
15008
15363
|
display: "flex",
|
|
15009
15364
|
alignItems: "center",
|
|
@@ -15017,15 +15372,15 @@ var RowContainer = forwardRef14(
|
|
|
15017
15372
|
},
|
|
15018
15373
|
position: "relative",
|
|
15019
15374
|
...$hovered && {
|
|
15020
|
-
boxShadow: `0 0 0 1px ${
|
|
15375
|
+
boxShadow: `0 0 0 1px ${cssVars.colors[$colorScheme]} inset`
|
|
15021
15376
|
},
|
|
15022
15377
|
...$showsActiveState && {
|
|
15023
15378
|
"&:active": {
|
|
15024
|
-
backgroundColor: $selected ? $colorScheme === "secondary" ?
|
|
15379
|
+
backgroundColor: $selected ? $colorScheme === "secondary" ? cssVars.colors.secondaryLight : cssVars.colors.primaryLight : cssVars.colors.activeBackground
|
|
15025
15380
|
}
|
|
15026
15381
|
},
|
|
15027
15382
|
...$divider && {
|
|
15028
|
-
borderBottom: `1px solid ${
|
|
15383
|
+
borderBottom: `1px solid ${cssVars.colors.dividerSubtle}`
|
|
15029
15384
|
},
|
|
15030
15385
|
...$backgroundColor && {
|
|
15031
15386
|
backgroundColor: $backgroundColor,
|
|
@@ -15043,7 +15398,7 @@ var RowContainer = forwardRef14(
|
|
|
15043
15398
|
);
|
|
15044
15399
|
}
|
|
15045
15400
|
);
|
|
15046
|
-
var ListViewDragIndicatorElement =
|
|
15401
|
+
var ListViewDragIndicatorElement = forwardRef15(
|
|
15047
15402
|
({
|
|
15048
15403
|
className,
|
|
15049
15404
|
$relativeDropPosition,
|
|
@@ -15053,7 +15408,7 @@ var ListViewDragIndicatorElement = forwardRef14(
|
|
|
15053
15408
|
style: style5,
|
|
15054
15409
|
...props
|
|
15055
15410
|
}, ref) => {
|
|
15056
|
-
return /* @__PURE__ */
|
|
15411
|
+
return /* @__PURE__ */ React57.createElement(
|
|
15057
15412
|
"div",
|
|
15058
15413
|
{
|
|
15059
15414
|
ref,
|
|
@@ -15065,14 +15420,14 @@ var ListViewDragIndicatorElement = forwardRef14(
|
|
|
15065
15420
|
borderRadius: "3px",
|
|
15066
15421
|
...$relativeDropPosition === "inside" ? {
|
|
15067
15422
|
inset: 2,
|
|
15068
|
-
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}`
|
|
15069
15424
|
} : {
|
|
15070
15425
|
top: $relativeDropPosition === "above" ? -(3 + $gap / 2) : void 0,
|
|
15071
15426
|
bottom: $relativeDropPosition === "below" ? -(3 + $gap / 2) : void 0,
|
|
15072
15427
|
left: $offsetLeft,
|
|
15073
15428
|
right: 0,
|
|
15074
15429
|
height: 6,
|
|
15075
|
-
backgroundColor: $colorScheme === "secondary" ?
|
|
15430
|
+
backgroundColor: $colorScheme === "secondary" ? cssVars.colors.secondary : cssVars.colors.primary,
|
|
15076
15431
|
border: `2px solid white`,
|
|
15077
15432
|
boxShadow: "0 0 2px rgba(0,0,0,0.5)"
|
|
15078
15433
|
},
|
|
@@ -15082,7 +15437,7 @@ var ListViewDragIndicatorElement = forwardRef14(
|
|
|
15082
15437
|
);
|
|
15083
15438
|
}
|
|
15084
15439
|
);
|
|
15085
|
-
var ListViewRow =
|
|
15440
|
+
var ListViewRow = forwardRef15(function ListViewRow2({
|
|
15086
15441
|
id,
|
|
15087
15442
|
tabIndex = 0,
|
|
15088
15443
|
gap,
|
|
@@ -15150,7 +15505,7 @@ var ListViewRow = forwardRef14(function ListViewRow2({
|
|
|
15150
15505
|
...renderProps
|
|
15151
15506
|
}, ref) => {
|
|
15152
15507
|
const Component3 = RowContainer;
|
|
15153
|
-
const element = /* @__PURE__ */
|
|
15508
|
+
const element = /* @__PURE__ */ React57.createElement(
|
|
15154
15509
|
Component3,
|
|
15155
15510
|
{
|
|
15156
15511
|
ref,
|
|
@@ -15182,7 +15537,7 @@ var ListViewRow = forwardRef14(function ListViewRow2({
|
|
|
15182
15537
|
tabIndex,
|
|
15183
15538
|
className
|
|
15184
15539
|
},
|
|
15185
|
-
relativeDropPosition && /* @__PURE__ */
|
|
15540
|
+
relativeDropPosition && /* @__PURE__ */ React57.createElement(
|
|
15186
15541
|
ListViewDragIndicatorElement,
|
|
15187
15542
|
{
|
|
15188
15543
|
$colorScheme: colorScheme,
|
|
@@ -15196,11 +15551,11 @@ var ListViewRow = forwardRef14(function ListViewRow2({
|
|
|
15196
15551
|
}) : dragIndicatorStyle
|
|
15197
15552
|
}
|
|
15198
15553
|
),
|
|
15199
|
-
depth > 0 && /* @__PURE__ */
|
|
15554
|
+
depth > 0 && /* @__PURE__ */ React57.createElement(Spacer.Horizontal, { size: depth * indentation }),
|
|
15200
15555
|
children2
|
|
15201
15556
|
);
|
|
15202
15557
|
if (menuItems && onSelectMenuItem) {
|
|
15203
|
-
return /* @__PURE__ */
|
|
15558
|
+
return /* @__PURE__ */ React57.createElement(
|
|
15204
15559
|
ContextMenu,
|
|
15205
15560
|
{
|
|
15206
15561
|
items: menuItems,
|
|
@@ -15213,7 +15568,7 @@ var ListViewRow = forwardRef14(function ListViewRow2({
|
|
|
15213
15568
|
return element;
|
|
15214
15569
|
};
|
|
15215
15570
|
if (sortable && id) {
|
|
15216
|
-
return /* @__PURE__ */
|
|
15571
|
+
return /* @__PURE__ */ React57.createElement(Sortable.Item, { id, disabled: overrideSortable === false }, ({ ref: sortableRef, ...sortableProps }) => renderContent(
|
|
15217
15572
|
sortableProps,
|
|
15218
15573
|
composeRefs2(sortableRef, forwardedRef)
|
|
15219
15574
|
));
|
|
@@ -15224,14 +15579,14 @@ var RenderItemContext = createContext9(
|
|
|
15224
15579
|
() => null
|
|
15225
15580
|
);
|
|
15226
15581
|
RenderItemContext.displayName = "RenderItemContext";
|
|
15227
|
-
var VirtualizedListRow =
|
|
15582
|
+
var VirtualizedListRow = memo22(function VirtualizedListRow2({
|
|
15228
15583
|
index,
|
|
15229
15584
|
style: style5
|
|
15230
15585
|
}) {
|
|
15231
15586
|
const renderItem = useContext9(RenderItemContext);
|
|
15232
|
-
return /* @__PURE__ */
|
|
15587
|
+
return /* @__PURE__ */ React57.createElement("div", { key: index, style: style5 }, renderItem(index));
|
|
15233
15588
|
});
|
|
15234
|
-
var VirtualizedListInner =
|
|
15589
|
+
var VirtualizedListInner = forwardRef15(function VirtualizedListInner2({
|
|
15235
15590
|
size: size3,
|
|
15236
15591
|
scrollElement,
|
|
15237
15592
|
items,
|
|
@@ -15260,7 +15615,7 @@ var VirtualizedListInner = forwardRef14(function VirtualizedListInner2({
|
|
|
15260
15615
|
}),
|
|
15261
15616
|
[]
|
|
15262
15617
|
);
|
|
15263
|
-
return /* @__PURE__ */
|
|
15618
|
+
return /* @__PURE__ */ React57.createElement(RenderItemContext.Provider, { value: renderItem }, /* @__PURE__ */ React57.createElement(
|
|
15264
15619
|
WindowScroller,
|
|
15265
15620
|
{
|
|
15266
15621
|
scrollElement,
|
|
@@ -15271,7 +15626,7 @@ var VirtualizedListInner = forwardRef14(function VirtualizedListInner2({
|
|
|
15271
15626
|
registerChild,
|
|
15272
15627
|
onChildScroll,
|
|
15273
15628
|
scrollTop
|
|
15274
|
-
}) => /* @__PURE__ */
|
|
15629
|
+
}) => /* @__PURE__ */ React57.createElement("div", { ref: registerChild }, /* @__PURE__ */ React57.createElement(
|
|
15275
15630
|
VariableSizeList,
|
|
15276
15631
|
{
|
|
15277
15632
|
ref: listRef,
|
|
@@ -15301,10 +15656,10 @@ var VirtualizedListInner = forwardRef14(function VirtualizedListInner2({
|
|
|
15301
15656
|
)
|
|
15302
15657
|
));
|
|
15303
15658
|
});
|
|
15304
|
-
var VirtualizedList =
|
|
15659
|
+
var VirtualizedList = memo22(
|
|
15305
15660
|
VirtualizedListInner
|
|
15306
15661
|
);
|
|
15307
|
-
var ListViewRootInner =
|
|
15662
|
+
var ListViewRootInner = forwardRef15(function ListViewRootInner2({
|
|
15308
15663
|
id,
|
|
15309
15664
|
className,
|
|
15310
15665
|
style: style5,
|
|
@@ -15423,7 +15778,7 @@ var ListViewRootInner = forwardRef14(function ListViewRootInner2({
|
|
|
15423
15778
|
[indentation]
|
|
15424
15779
|
);
|
|
15425
15780
|
const renderOverlay = useCallback20(
|
|
15426
|
-
(index) => /* @__PURE__ */
|
|
15781
|
+
(index) => /* @__PURE__ */ React57.createElement("div", { style: { opacity: 0.25 } }, /* @__PURE__ */ React57.createElement(ListViewDraggingContext.Provider, { value: draggingContextOverlayValue }, renderItem(data[index], index, { isDragging: true }))),
|
|
15427
15782
|
[draggingContextOverlayValue, renderItem, data]
|
|
15428
15783
|
);
|
|
15429
15784
|
const renderWrappedChild = useCallback20(
|
|
@@ -15431,12 +15786,12 @@ var ListViewRootInner = forwardRef14(function ListViewRootInner2({
|
|
|
15431
15786
|
const contextValue = getItemContextValue(index);
|
|
15432
15787
|
const current = renderChild(index);
|
|
15433
15788
|
if (!contextValue || !isValidElement3(current)) return null;
|
|
15434
|
-
return /* @__PURE__ */
|
|
15789
|
+
return /* @__PURE__ */ React57.createElement(ListRowContext.Provider, { key: current.key, value: contextValue }, current);
|
|
15435
15790
|
},
|
|
15436
15791
|
[getItemContextValue, renderChild]
|
|
15437
15792
|
);
|
|
15438
15793
|
const ids = useMemo18(() => data.map(keyExtractor), [keyExtractor, data]);
|
|
15439
|
-
const withSortable = (children2) => sortable ? /* @__PURE__ */
|
|
15794
|
+
const withSortable = (children2) => sortable ? /* @__PURE__ */ React57.createElement(
|
|
15440
15795
|
Sortable.Root,
|
|
15441
15796
|
{
|
|
15442
15797
|
onMoveItem,
|
|
@@ -15446,7 +15801,7 @@ var ListViewRootInner = forwardRef14(function ListViewRootInner2({
|
|
|
15446
15801
|
},
|
|
15447
15802
|
children2
|
|
15448
15803
|
) : children2;
|
|
15449
|
-
const withScrollable = (children2) => scrollable ? /* @__PURE__ */
|
|
15804
|
+
const withScrollable = (children2) => scrollable ? /* @__PURE__ */ React57.createElement(ScrollArea, null, children2) : children2(null);
|
|
15450
15805
|
const getItemHeight = useCallback20(
|
|
15451
15806
|
(index) => {
|
|
15452
15807
|
const child = getItemContextValue(index);
|
|
@@ -15462,7 +15817,7 @@ var ListViewRootInner = forwardRef14(function ListViewRootInner2({
|
|
|
15462
15817
|
);
|
|
15463
15818
|
const draggingContextValue = useMemo18(() => ({ indentation }), [indentation]);
|
|
15464
15819
|
const gapStyle = useMemo18(() => ({ gap: `${gap}px` }), [gap]);
|
|
15465
|
-
return /* @__PURE__ */
|
|
15820
|
+
return /* @__PURE__ */ React57.createElement(ListViewDraggingContext.Provider, { value: draggingContextValue }, /* @__PURE__ */ React57.createElement(
|
|
15466
15821
|
"div",
|
|
15467
15822
|
{
|
|
15468
15823
|
id,
|
|
@@ -15474,7 +15829,7 @@ var ListViewRootInner = forwardRef14(function ListViewRootInner2({
|
|
|
15474
15829
|
},
|
|
15475
15830
|
withScrollable(
|
|
15476
15831
|
(scrollElementRef) => withSortable(
|
|
15477
|
-
virtualized ? /* @__PURE__ */
|
|
15832
|
+
virtualized ? /* @__PURE__ */ React57.createElement(
|
|
15478
15833
|
VirtualizedList,
|
|
15479
15834
|
{
|
|
15480
15835
|
ref: forwardedRef,
|
|
@@ -15490,15 +15845,15 @@ var ListViewRootInner = forwardRef14(function ListViewRootInner2({
|
|
|
15490
15845
|
)
|
|
15491
15846
|
));
|
|
15492
15847
|
});
|
|
15493
|
-
var ListViewRoot =
|
|
15494
|
-
var ChildrenListViewInner =
|
|
15848
|
+
var ListViewRoot = memo22(ListViewRootInner);
|
|
15849
|
+
var ChildrenListViewInner = forwardRef15(function ChildrenListViewInner2({ children: children2, ...rest }, forwardedRef) {
|
|
15495
15850
|
const items = useMemo18(
|
|
15496
15851
|
() => Children4.toArray(children2).flatMap(
|
|
15497
15852
|
(child) => isValidElement3(child) ? [child] : []
|
|
15498
15853
|
),
|
|
15499
15854
|
[children2]
|
|
15500
15855
|
);
|
|
15501
|
-
return /* @__PURE__ */
|
|
15856
|
+
return /* @__PURE__ */ React57.createElement(
|
|
15502
15857
|
ListViewRoot,
|
|
15503
15858
|
{
|
|
15504
15859
|
ref: forwardedRef,
|
|
@@ -15512,20 +15867,20 @@ var ChildrenListViewInner = forwardRef14(function ChildrenListViewInner2({ child
|
|
|
15512
15867
|
}
|
|
15513
15868
|
);
|
|
15514
15869
|
});
|
|
15515
|
-
var ChildrenListView =
|
|
15516
|
-
var SimpleListViewInner =
|
|
15870
|
+
var ChildrenListView = memo22(ChildrenListViewInner);
|
|
15871
|
+
var SimpleListViewInner = forwardRef15(function SimpleListViewInner2(props, forwardedRef) {
|
|
15517
15872
|
if ("children" in props) {
|
|
15518
|
-
return /* @__PURE__ */
|
|
15873
|
+
return /* @__PURE__ */ React57.createElement(ChildrenListView, { ref: forwardedRef, ...props });
|
|
15519
15874
|
} else {
|
|
15520
|
-
return /* @__PURE__ */
|
|
15875
|
+
return /* @__PURE__ */ React57.createElement(ListViewRoot, { ref: forwardedRef, ...props });
|
|
15521
15876
|
}
|
|
15522
15877
|
});
|
|
15523
|
-
var SimpleListView =
|
|
15878
|
+
var SimpleListView = memo22(SimpleListViewInner);
|
|
15524
15879
|
var ListView;
|
|
15525
15880
|
((ListView2) => {
|
|
15526
|
-
ListView2.RowTitle =
|
|
15527
|
-
ListView2.EditableRowTitle =
|
|
15528
|
-
ListView2.Row =
|
|
15881
|
+
ListView2.RowTitle = memo22(ListViewRowTitle);
|
|
15882
|
+
ListView2.EditableRowTitle = memo22(ListViewEditableRowTitle);
|
|
15883
|
+
ListView2.Row = memo22(ListViewRow);
|
|
15529
15884
|
ListView2.Root = SimpleListView;
|
|
15530
15885
|
ListView2.RowContext = ListRowContext;
|
|
15531
15886
|
ListView2.DragIndicator = ListViewDragIndicatorElement;
|
|
@@ -15562,15 +15917,15 @@ function filterWithGroupedSections(items, query) {
|
|
|
15562
15917
|
return [...headers, ...newItems];
|
|
15563
15918
|
});
|
|
15564
15919
|
}
|
|
15565
|
-
var CompletionMenu =
|
|
15566
|
-
|
|
15920
|
+
var CompletionMenu = memo23(
|
|
15921
|
+
forwardRef16(function CompletionMenu2({
|
|
15567
15922
|
items,
|
|
15568
15923
|
selectedIndex,
|
|
15569
15924
|
onSelectItem,
|
|
15570
15925
|
onHoverIndex,
|
|
15571
15926
|
listSize
|
|
15572
15927
|
}, forwardedRef) {
|
|
15573
|
-
return /* @__PURE__ */
|
|
15928
|
+
return /* @__PURE__ */ React58.createElement(
|
|
15574
15929
|
ListView.Root,
|
|
15575
15930
|
{
|
|
15576
15931
|
ref: forwardedRef,
|
|
@@ -15582,13 +15937,13 @@ var CompletionMenu = memo22(
|
|
|
15582
15937
|
sectionHeaderVariant: "label",
|
|
15583
15938
|
renderItem: (item, i) => {
|
|
15584
15939
|
if (item.type === "sectionHeader") {
|
|
15585
|
-
return /* @__PURE__ */
|
|
15940
|
+
return /* @__PURE__ */ React58.createElement(ListView.Row, { key: item.id, isSectionHeader: true }, item.name);
|
|
15586
15941
|
}
|
|
15587
15942
|
const tokens = fuzzyTokenize({
|
|
15588
15943
|
item: item.name,
|
|
15589
15944
|
itemScore: item
|
|
15590
15945
|
});
|
|
15591
|
-
return /* @__PURE__ */
|
|
15946
|
+
return /* @__PURE__ */ React58.createElement(
|
|
15592
15947
|
ListView.Row,
|
|
15593
15948
|
{
|
|
15594
15949
|
key: item.id,
|
|
@@ -15600,7 +15955,7 @@ var CompletionMenu = memo22(
|
|
|
15600
15955
|
}
|
|
15601
15956
|
}
|
|
15602
15957
|
},
|
|
15603
|
-
tokens.map((token, j) => /* @__PURE__ */
|
|
15958
|
+
tokens.map((token, j) => /* @__PURE__ */ React58.createElement(
|
|
15604
15959
|
"span",
|
|
15605
15960
|
{
|
|
15606
15961
|
key: j,
|
|
@@ -15608,15 +15963,15 @@ var CompletionMenu = memo22(
|
|
|
15608
15963
|
},
|
|
15609
15964
|
token.text
|
|
15610
15965
|
)),
|
|
15611
|
-
item.icon && /* @__PURE__ */
|
|
15966
|
+
item.icon && /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement(Spacer.Horizontal, null), item.icon)
|
|
15612
15967
|
);
|
|
15613
15968
|
}
|
|
15614
15969
|
}
|
|
15615
15970
|
);
|
|
15616
15971
|
})
|
|
15617
15972
|
);
|
|
15618
|
-
var InputFieldWithCompletions =
|
|
15619
|
-
|
|
15973
|
+
var InputFieldWithCompletions = memo23(
|
|
15974
|
+
forwardRef16(function InputFieldWithCompletions2({
|
|
15620
15975
|
loading,
|
|
15621
15976
|
initialValue = "",
|
|
15622
15977
|
placeholder,
|
|
@@ -15676,7 +16031,7 @@ var InputFieldWithCompletions = memo22(
|
|
|
15676
16031
|
updateState({ filter: initialValue });
|
|
15677
16032
|
}, [initialValue, updateState]);
|
|
15678
16033
|
const { filter, selectedIndex } = state;
|
|
15679
|
-
const listRef =
|
|
16034
|
+
const listRef = React58.useRef(null);
|
|
15680
16035
|
const filteredItems = useMemo19(
|
|
15681
16036
|
() => filterWithGroupedSections(items, filter),
|
|
15682
16037
|
[items, filter]
|
|
@@ -15811,13 +16166,13 @@ var InputFieldWithCompletions = memo22(
|
|
|
15811
16166
|
ref.current?.setSelectionRange(0, ref.current.value.length);
|
|
15812
16167
|
}
|
|
15813
16168
|
}));
|
|
15814
|
-
return /* @__PURE__ */
|
|
16169
|
+
return /* @__PURE__ */ React58.createElement(
|
|
15815
16170
|
InputField.Root,
|
|
15816
16171
|
{
|
|
15817
16172
|
size: size3,
|
|
15818
16173
|
renderPopoverContent: ({ width }) => {
|
|
15819
16174
|
const listSize = { width, height };
|
|
15820
|
-
return /* @__PURE__ */
|
|
16175
|
+
return /* @__PURE__ */ React58.createElement(
|
|
15821
16176
|
"div",
|
|
15822
16177
|
{
|
|
15823
16178
|
className: `flex flex-col ${!filter && hideMenuWhenEmptyValue ? "none" : "flex"}`,
|
|
@@ -15825,7 +16180,7 @@ var InputFieldWithCompletions = memo22(
|
|
|
15825
16180
|
flex: `0 0 ${height}px`
|
|
15826
16181
|
}
|
|
15827
16182
|
},
|
|
15828
|
-
filteredItems.length > 0 ? /* @__PURE__ */
|
|
16183
|
+
filteredItems.length > 0 ? /* @__PURE__ */ React58.createElement(
|
|
15829
16184
|
CompletionMenu,
|
|
15830
16185
|
{
|
|
15831
16186
|
ref: listRef,
|
|
@@ -15835,11 +16190,11 @@ var InputFieldWithCompletions = memo22(
|
|
|
15835
16190
|
onHoverIndex: handleIndexChange,
|
|
15836
16191
|
listSize
|
|
15837
16192
|
}
|
|
15838
|
-
) : /* @__PURE__ */
|
|
16193
|
+
) : /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col h-[100px] p-5 items-center justify-center" }, /* @__PURE__ */ React58.createElement(Small, { className: "text-text-disabled" }, loading ? "Loading" : "No results"))
|
|
15839
16194
|
);
|
|
15840
16195
|
}
|
|
15841
16196
|
},
|
|
15842
|
-
/* @__PURE__ */
|
|
16197
|
+
/* @__PURE__ */ React58.createElement(
|
|
15843
16198
|
InputField.Input,
|
|
15844
16199
|
{
|
|
15845
16200
|
ref,
|
|
@@ -15863,9 +16218,9 @@ var InputFieldWithCompletions = memo22(
|
|
|
15863
16218
|
"aria-controls": "component-listbox"
|
|
15864
16219
|
}
|
|
15865
16220
|
),
|
|
15866
|
-
filter && typeaheadValue && typeaheadValue.toLowerCase().startsWith(filter.toLowerCase()) && /* @__PURE__ */
|
|
16221
|
+
filter && typeaheadValue && typeaheadValue.toLowerCase().startsWith(filter.toLowerCase()) && /* @__PURE__ */ React58.createElement(InputField.Typeahead, { value: typeaheadValue, prefix: filter }),
|
|
15867
16222
|
(!isFocused || !hideChildrenWhenFocused) && children2,
|
|
15868
|
-
loading && isFocused && /* @__PURE__ */
|
|
16223
|
+
loading && isFocused && /* @__PURE__ */ React58.createElement(InputField.Label, null, /* @__PURE__ */ React58.createElement(ActivityIndicator, null))
|
|
15869
16224
|
);
|
|
15870
16225
|
})
|
|
15871
16226
|
);
|
|
@@ -15885,9 +16240,9 @@ function getNextIndex(items, currentIndex, direction, isDisabled) {
|
|
|
15885
16240
|
}
|
|
15886
16241
|
|
|
15887
16242
|
// src/components/InspectorContainer.tsx
|
|
15888
|
-
import
|
|
15889
|
-
var InspectorContainer =
|
|
15890
|
-
|
|
16243
|
+
import React59, { forwardRef as forwardRef17, memo as memo24 } from "react";
|
|
16244
|
+
var InspectorContainer = memo24(
|
|
16245
|
+
forwardRef17(function InspectorContainer2({
|
|
15891
16246
|
header,
|
|
15892
16247
|
children: children2,
|
|
15893
16248
|
fallback,
|
|
@@ -15896,7 +16251,7 @@ var InspectorContainer = memo23(
|
|
|
15896
16251
|
className,
|
|
15897
16252
|
style: style5
|
|
15898
16253
|
}, forwardedRef) {
|
|
15899
|
-
return /* @__PURE__ */
|
|
16254
|
+
return /* @__PURE__ */ React59.createElement(
|
|
15900
16255
|
"div",
|
|
15901
16256
|
{
|
|
15902
16257
|
ref: forwardedRef,
|
|
@@ -15906,44 +16261,49 @@ var InspectorContainer = memo23(
|
|
|
15906
16261
|
display: "flex",
|
|
15907
16262
|
flexDirection: "column",
|
|
15908
16263
|
position: "relative",
|
|
15909
|
-
background:
|
|
16264
|
+
background: cssVars.colors.sidebarBackground,
|
|
15910
16265
|
...style5
|
|
15911
16266
|
}
|
|
15912
16267
|
},
|
|
15913
16268
|
header,
|
|
15914
|
-
children2 ? /* @__PURE__ */
|
|
16269
|
+
children2 ? /* @__PURE__ */ React59.createElement(ScrollArea, null, /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col relative" }, showDividers ? withSeparatorElements(children2, /* @__PURE__ */ React59.createElement(Divider, null)) : children2)) : fallback ? /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col relative h-full" }, fallback) : null
|
|
15915
16270
|
);
|
|
15916
16271
|
})
|
|
15917
16272
|
);
|
|
15918
16273
|
|
|
15919
16274
|
// src/components/Label.tsx
|
|
15920
|
-
import
|
|
15921
|
-
|
|
15922
|
-
|
|
15923
|
-
|
|
15924
|
-
|
|
15925
|
-
|
|
15926
|
-
|
|
15927
|
-
|
|
16275
|
+
import React60, { forwardRef as forwardRef18, memo as memo25 } from "react";
|
|
16276
|
+
var Label = memo25(
|
|
16277
|
+
forwardRef18(function Label2({ className, ...props }, ref) {
|
|
16278
|
+
return /* @__PURE__ */ React60.createElement(
|
|
16279
|
+
"label",
|
|
16280
|
+
{
|
|
16281
|
+
ref,
|
|
16282
|
+
className: `font-sans text-label uppercase flex items-center leading-[19px] select-none font-bold text-text-muted z-label ${className ?? ""}`,
|
|
16283
|
+
...props
|
|
16284
|
+
}
|
|
16285
|
+
);
|
|
16286
|
+
})
|
|
16287
|
+
);
|
|
15928
16288
|
|
|
15929
16289
|
// src/components/LabeledElementView.tsx
|
|
15930
16290
|
import * as kiwi from "kiwi.js";
|
|
15931
|
-
import
|
|
16291
|
+
import React61, {
|
|
15932
16292
|
Children as Children5,
|
|
15933
16293
|
createRef,
|
|
15934
|
-
Fragment,
|
|
16294
|
+
Fragment as Fragment2,
|
|
15935
16295
|
isValidElement as isValidElement4,
|
|
15936
|
-
memo as
|
|
16296
|
+
memo as memo26,
|
|
15937
16297
|
useLayoutEffect as useLayoutEffect8,
|
|
15938
16298
|
useMemo as useMemo20,
|
|
15939
16299
|
useRef as useRef18
|
|
15940
16300
|
} from "react";
|
|
15941
|
-
var LabeledElementView =
|
|
16301
|
+
var LabeledElementView = memo26(function LabeledElementView2({
|
|
15942
16302
|
children: children2,
|
|
15943
16303
|
renderLabel
|
|
15944
16304
|
}) {
|
|
15945
16305
|
const elementIds = Children5.toArray(children2).flatMap(
|
|
15946
|
-
(child) => isValidElement4(child) && child.type ===
|
|
16306
|
+
(child) => isValidElement4(child) && child.type === Fragment2 ? child.props.children : [child]
|
|
15947
16307
|
).map(
|
|
15948
16308
|
(child) => isValidElement4(child) && "id" in child.props ? child.props.id : null
|
|
15949
16309
|
).filter((id) => !!id);
|
|
@@ -15955,7 +16315,7 @@ var LabeledElementView = memo25(function LabeledElementView2({
|
|
|
15955
16315
|
);
|
|
15956
16316
|
}, [serializedIds]);
|
|
15957
16317
|
const labelElements = useMemo20(() => {
|
|
15958
|
-
return serializedIds.split(",").map((id, index) => /* @__PURE__ */
|
|
16318
|
+
return serializedIds.split(",").map((id, index) => /* @__PURE__ */ React61.createElement(
|
|
15959
16319
|
"span",
|
|
15960
16320
|
{
|
|
15961
16321
|
key: id,
|
|
@@ -16030,13 +16390,13 @@ var LabeledElementView = memo25(function LabeledElementView2({
|
|
|
16030
16390
|
`${Math.max(...heights)}px`
|
|
16031
16391
|
);
|
|
16032
16392
|
}, [refs, labelElements]);
|
|
16033
|
-
return /* @__PURE__ */
|
|
16393
|
+
return /* @__PURE__ */ React61.createElement("div", { className: "flex flex-1 flex-col relative", ref: containerRef }, /* @__PURE__ */ React61.createElement("div", { className: "flex flex-1 items-center" }, children2), /* @__PURE__ */ React61.createElement("div", { className: "relative overflow-hidden select-none" }, labelElements));
|
|
16034
16394
|
});
|
|
16035
16395
|
|
|
16036
16396
|
// src/components/Progress.tsx
|
|
16037
16397
|
import { clamp } from "@noya-app/noya-utils";
|
|
16038
16398
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
16039
|
-
import
|
|
16399
|
+
import React62, { useMemo as useMemo21 } from "react";
|
|
16040
16400
|
function Progress({
|
|
16041
16401
|
value,
|
|
16042
16402
|
variant = "normal",
|
|
@@ -16046,14 +16406,14 @@ function Progress({
|
|
|
16046
16406
|
const transformStyles = useMemo21(() => ({
|
|
16047
16407
|
transform: `translateX(-${100 - clampedValue}%)`
|
|
16048
16408
|
}), [clampedValue]);
|
|
16049
|
-
return /* @__PURE__ */
|
|
16409
|
+
return /* @__PURE__ */ React62.createElement(
|
|
16050
16410
|
ProgressPrimitive.Root,
|
|
16051
16411
|
{
|
|
16052
16412
|
className: `relative hidden bg-input-background h-[5px] ${className ?? ""}`,
|
|
16053
16413
|
style: { transform: "translateZ(0)" },
|
|
16054
16414
|
value: clampedValue
|
|
16055
16415
|
},
|
|
16056
|
-
/* @__PURE__ */
|
|
16416
|
+
/* @__PURE__ */ React62.createElement(
|
|
16057
16417
|
ProgressPrimitive.Indicator,
|
|
16058
16418
|
{
|
|
16059
16419
|
className: cn(variant === "primary" ? "bg-primary" : variant === "secondary" ? "bg-secondary" : variant === "warning" ? "bg-warning" : "bg-text", "transition-[transform_660ms_cubic-bezier(0.65,0,0.35,1)", "w-full h-full"),
|
|
@@ -16065,27 +16425,27 @@ function Progress({
|
|
|
16065
16425
|
|
|
16066
16426
|
// src/components/RadioGroup.tsx
|
|
16067
16427
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
16068
|
-
import
|
|
16428
|
+
import React63, {
|
|
16069
16429
|
createContext as createContext10,
|
|
16070
|
-
forwardRef as
|
|
16071
|
-
memo as
|
|
16430
|
+
forwardRef as forwardRef19,
|
|
16431
|
+
memo as memo27,
|
|
16072
16432
|
useCallback as useCallback22,
|
|
16073
16433
|
useContext as useContext10,
|
|
16074
16434
|
useMemo as useMemo22
|
|
16075
16435
|
} from "react";
|
|
16076
|
-
var ToggleGroupItem =
|
|
16436
|
+
var ToggleGroupItem = forwardRef19(function ToggleGroupItem2({ value, tooltip, children: children2, disabled = false }, forwardedRef) {
|
|
16077
16437
|
const { colorScheme } = useContext10(RadioGroupContext);
|
|
16078
|
-
const itemElement = /* @__PURE__ */
|
|
16438
|
+
const itemElement = /* @__PURE__ */ React63.createElement(
|
|
16079
16439
|
ToggleGroupPrimitive.Item,
|
|
16080
16440
|
{
|
|
16081
16441
|
ref: forwardedRef,
|
|
16082
16442
|
value,
|
|
16083
16443
|
disabled,
|
|
16084
|
-
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`
|
|
16085
16445
|
},
|
|
16086
16446
|
children2
|
|
16087
16447
|
);
|
|
16088
|
-
return tooltip ? /* @__PURE__ */
|
|
16448
|
+
return tooltip ? /* @__PURE__ */ React63.createElement(Tooltip, { content: tooltip }, itemElement) : itemElement;
|
|
16089
16449
|
});
|
|
16090
16450
|
var RadioGroupContext = createContext10({
|
|
16091
16451
|
colorScheme: "primary"
|
|
@@ -16106,7 +16466,7 @@ function ToggleGroupRoot({
|
|
|
16106
16466
|
},
|
|
16107
16467
|
[allowEmpty, onValueChange]
|
|
16108
16468
|
);
|
|
16109
|
-
return /* @__PURE__ */
|
|
16469
|
+
return /* @__PURE__ */ React63.createElement(RadioGroupContext.Provider, { value: contextValue }, /* @__PURE__ */ React63.createElement(
|
|
16110
16470
|
ToggleGroupPrimitive.Root,
|
|
16111
16471
|
{
|
|
16112
16472
|
id,
|
|
@@ -16120,23 +16480,33 @@ function ToggleGroupRoot({
|
|
|
16120
16480
|
}
|
|
16121
16481
|
var RadioGroup;
|
|
16122
16482
|
((RadioGroup2) => {
|
|
16123
|
-
RadioGroup2.Root =
|
|
16124
|
-
RadioGroup2.Item =
|
|
16483
|
+
RadioGroup2.Root = memo27(ToggleGroupRoot);
|
|
16484
|
+
RadioGroup2.Item = memo27(ToggleGroupItem);
|
|
16125
16485
|
})(RadioGroup || (RadioGroup = {}));
|
|
16126
16486
|
|
|
16127
16487
|
// src/components/SelectMenu.tsx
|
|
16128
|
-
import {
|
|
16488
|
+
import {
|
|
16489
|
+
ChevronDownIcon,
|
|
16490
|
+
ChevronUpIcon,
|
|
16491
|
+
DropdownChevronIcon
|
|
16492
|
+
} from "@noya-app/noya-icons";
|
|
16129
16493
|
import * as Select from "@radix-ui/react-select";
|
|
16130
|
-
import
|
|
16494
|
+
import React64, { memo as memo28, useMemo as useMemo23 } from "react";
|
|
16131
16495
|
var readOnlyStyle = {
|
|
16132
16496
|
justifyContent: "flex-start",
|
|
16133
16497
|
textAlign: "left"
|
|
16134
16498
|
};
|
|
16135
|
-
var
|
|
16136
|
-
|
|
16137
|
-
|
|
16138
|
-
|
|
16139
|
-
|
|
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`;
|
|
16500
|
+
var scrollButtonStyles = `
|
|
16501
|
+
flex
|
|
16502
|
+
items-center
|
|
16503
|
+
justify-center
|
|
16504
|
+
h-[25px]
|
|
16505
|
+
cursor-default
|
|
16506
|
+
text-text-muted
|
|
16507
|
+
hover:text-text
|
|
16508
|
+
`;
|
|
16509
|
+
var SelectMenu = memo28(function SelectMenu2({
|
|
16140
16510
|
id,
|
|
16141
16511
|
style: style5,
|
|
16142
16512
|
className,
|
|
@@ -16154,68 +16524,71 @@ var SelectMenu = memo27(function SelectMenu2({
|
|
|
16154
16524
|
);
|
|
16155
16525
|
const icon = selectedItem?.icon;
|
|
16156
16526
|
const readOnlyButton = useMemo23(
|
|
16157
|
-
() => /* @__PURE__ */
|
|
16527
|
+
() => /* @__PURE__ */ React64.createElement(
|
|
16158
16528
|
Button,
|
|
16159
16529
|
{
|
|
16160
16530
|
id,
|
|
16161
16531
|
style: style5,
|
|
16162
16532
|
contentStyle: readOnlyStyle,
|
|
16163
|
-
className: `${className ?? ""} flex-1`,
|
|
16533
|
+
className: `${className ?? ""} flex-1 focus:z-interactable`,
|
|
16164
16534
|
disabled
|
|
16165
16535
|
},
|
|
16166
|
-
icon && /* @__PURE__ */
|
|
16167
|
-
/* @__PURE__ */
|
|
16536
|
+
icon && /* @__PURE__ */ React64.createElement(React64.Fragment, null, renderIcon(icon), /* @__PURE__ */ React64.createElement(Spacer.Horizontal, { inline: true, size: 6 })),
|
|
16537
|
+
/* @__PURE__ */ React64.createElement("span", { className: "flex flex-1" }, selectedItem?.title ?? value)
|
|
16168
16538
|
),
|
|
16169
16539
|
[icon, id, style5, className, disabled, value, selectedItem]
|
|
16170
16540
|
);
|
|
16171
16541
|
const trigger = useMemo23(
|
|
16172
|
-
() => /* @__PURE__ */
|
|
16542
|
+
() => /* @__PURE__ */ React64.createElement(Select.SelectTrigger, { asChild: true }, /* @__PURE__ */ React64.createElement(
|
|
16173
16543
|
Button,
|
|
16174
16544
|
{
|
|
16175
16545
|
id,
|
|
16176
|
-
style:
|
|
16177
|
-
className: `${className ?? "w-full"} flex-1`,
|
|
16546
|
+
style: style5,
|
|
16547
|
+
className: `${className ?? "w-full"} flex-1 focus:z-interactable`,
|
|
16178
16548
|
disabled
|
|
16179
16549
|
},
|
|
16180
|
-
icon && /* @__PURE__ */
|
|
16181
|
-
/* @__PURE__ */
|
|
16182
|
-
/* @__PURE__ */
|
|
16183
|
-
/* @__PURE__ */
|
|
16550
|
+
icon && /* @__PURE__ */ React64.createElement(React64.Fragment, null, renderIcon(icon), /* @__PURE__ */ React64.createElement(Spacer.Horizontal, { inline: true, size: 6 })),
|
|
16551
|
+
/* @__PURE__ */ React64.createElement("span", { className: "flex flex-1 mr-1.5" }, /* @__PURE__ */ React64.createElement(Select.Value, { placeholder })),
|
|
16552
|
+
label && /* @__PURE__ */ React64.createElement("span", { className: labelStyles }, label),
|
|
16553
|
+
/* @__PURE__ */ React64.createElement(DropdownChevronIcon, null)
|
|
16184
16554
|
)),
|
|
16185
|
-
[
|
|
16555
|
+
[id, style5, className, disabled, icon, placeholder, label]
|
|
16186
16556
|
);
|
|
16187
16557
|
if (readOnly) {
|
|
16188
|
-
return label ? /* @__PURE__ */
|
|
16189
|
-
"label",
|
|
16190
|
-
{
|
|
16191
|
-
className: labelStyles,
|
|
16192
|
-
htmlFor: id
|
|
16193
|
-
},
|
|
16194
|
-
label
|
|
16195
|
-
)) : readOnlyButton;
|
|
16558
|
+
return label ? /* @__PURE__ */ React64.createElement("div", { className: "flex flex-col relative" }, readOnlyButton, /* @__PURE__ */ React64.createElement("label", { className: labelStyles, htmlFor: id }, label)) : readOnlyButton;
|
|
16196
16559
|
}
|
|
16197
|
-
return /* @__PURE__ */
|
|
16560
|
+
return /* @__PURE__ */ React64.createElement(Select.Root, { value, onValueChange: onSelect, open }, trigger, /* @__PURE__ */ React64.createElement(Select.Portal, null, /* @__PURE__ */ React64.createElement(Select.Content, { className: styles.contentStyle }, /* @__PURE__ */ React64.createElement(Select.ScrollUpButton, { className: scrollButtonStyles }, /* @__PURE__ */ React64.createElement(ChevronUpIcon, null)), /* @__PURE__ */ React64.createElement(Select.Viewport, null, menuItems.map((menuItem) => {
|
|
16198
16561
|
if (typeof menuItem === "string") {
|
|
16199
|
-
return /* @__PURE__ */
|
|
16562
|
+
return /* @__PURE__ */ React64.createElement(Select.Separator, { className: styles.separatorStyle });
|
|
16200
16563
|
}
|
|
16201
16564
|
const value2 = menuItem.value ?? "";
|
|
16202
|
-
return /* @__PURE__ */
|
|
16203
|
-
})))));
|
|
16565
|
+
return /* @__PURE__ */ React64.createElement(SelectItem, { key: value2, value: value2, icon: menuItem.icon }, menuItem.title ?? value2);
|
|
16566
|
+
})), /* @__PURE__ */ React64.createElement(Select.ScrollDownButton, { className: scrollButtonStyles }, /* @__PURE__ */ React64.createElement(ChevronDownIcon, null)))));
|
|
16204
16567
|
});
|
|
16205
|
-
var SelectItem =
|
|
16568
|
+
var SelectItem = React64.forwardRef(
|
|
16206
16569
|
({
|
|
16207
16570
|
children: children2,
|
|
16208
16571
|
icon,
|
|
16209
16572
|
disabled,
|
|
16210
16573
|
...props
|
|
16211
16574
|
}, forwardedRef) => {
|
|
16212
|
-
return /* @__PURE__ */
|
|
16575
|
+
return /* @__PURE__ */ React64.createElement(
|
|
16576
|
+
Select.Item,
|
|
16577
|
+
{
|
|
16578
|
+
className: styles.itemStyle({ disabled }),
|
|
16579
|
+
disabled,
|
|
16580
|
+
...props,
|
|
16581
|
+
ref: forwardedRef
|
|
16582
|
+
},
|
|
16583
|
+
icon && /* @__PURE__ */ React64.createElement(React64.Fragment, null, renderIcon(icon), /* @__PURE__ */ React64.createElement(Spacer.Horizontal, { size: 8 })),
|
|
16584
|
+
/* @__PURE__ */ React64.createElement(Select.ItemText, null, children2)
|
|
16585
|
+
);
|
|
16213
16586
|
}
|
|
16214
16587
|
);
|
|
16215
16588
|
|
|
16216
16589
|
// src/components/Slider.tsx
|
|
16217
16590
|
import * as RadixSlider from "@radix-ui/react-slider";
|
|
16218
|
-
import
|
|
16591
|
+
import React65, { useCallback as useCallback23, useMemo as useMemo24 } from "react";
|
|
16219
16592
|
var Slider = function Slider2({
|
|
16220
16593
|
id,
|
|
16221
16594
|
value,
|
|
@@ -16233,7 +16606,7 @@ var Slider = function Slider2({
|
|
|
16233
16606
|
},
|
|
16234
16607
|
[onValueChange]
|
|
16235
16608
|
);
|
|
16236
|
-
return /* @__PURE__ */
|
|
16609
|
+
return /* @__PURE__ */ React65.createElement(
|
|
16237
16610
|
RadixSlider.Root,
|
|
16238
16611
|
{
|
|
16239
16612
|
min,
|
|
@@ -16243,36 +16616,38 @@ var Slider = function Slider2({
|
|
|
16243
16616
|
onValueChange: handleValueChange,
|
|
16244
16617
|
className: "flex-1 flex relative items-center select-none touch-none h-4"
|
|
16245
16618
|
},
|
|
16246
|
-
/* @__PURE__ */
|
|
16247
|
-
/* @__PURE__ */
|
|
16619
|
+
/* @__PURE__ */ React65.createElement(RadixSlider.Track, { className: "bg-divider relative flex-grow h-[2px]" }, /* @__PURE__ */ React65.createElement(RadixSlider.Range, { className: "absolute bg-primary rounded-full h-full" })),
|
|
16620
|
+
/* @__PURE__ */ React65.createElement(RadixSlider.Thumb, { className: "block w-3 h-3 bg-slider-background border border-solid border-slider-border rounded-[20px] focus:outline-none" })
|
|
16248
16621
|
);
|
|
16249
16622
|
};
|
|
16250
16623
|
|
|
16251
16624
|
// src/components/Switch.tsx
|
|
16252
16625
|
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
16253
|
-
import
|
|
16626
|
+
import React66 from "react";
|
|
16254
16627
|
var Switch = function Switch2({
|
|
16628
|
+
id,
|
|
16255
16629
|
value,
|
|
16256
16630
|
onChange,
|
|
16257
16631
|
colorScheme = "normal",
|
|
16258
16632
|
disabled
|
|
16259
16633
|
}) {
|
|
16260
|
-
return /* @__PURE__ */
|
|
16634
|
+
return /* @__PURE__ */ React66.createElement(
|
|
16261
16635
|
SwitchPrimitive.Root,
|
|
16262
16636
|
{
|
|
16637
|
+
id,
|
|
16263
16638
|
checked: value,
|
|
16264
16639
|
disabled,
|
|
16265
16640
|
onCheckedChange: (newValue) => {
|
|
16266
16641
|
onChange(newValue);
|
|
16267
16642
|
},
|
|
16268
|
-
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:
|
|
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`
|
|
16269
16644
|
},
|
|
16270
|
-
/* @__PURE__ */
|
|
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]" })
|
|
16271
16646
|
);
|
|
16272
16647
|
};
|
|
16273
16648
|
|
|
16274
16649
|
// src/components/TextArea.tsx
|
|
16275
|
-
import
|
|
16650
|
+
import React67, { forwardRef as forwardRef20, memo as memo29, useCallback as useCallback24, useEffect as useEffect15, useRef as useRef19 } from "react";
|
|
16276
16651
|
var useAutoResize = (value) => {
|
|
16277
16652
|
const textareaRef = useRef19(null);
|
|
16278
16653
|
useEffect15(() => {
|
|
@@ -16282,8 +16657,8 @@ var useAutoResize = (value) => {
|
|
|
16282
16657
|
}, [value]);
|
|
16283
16658
|
return textareaRef;
|
|
16284
16659
|
};
|
|
16285
|
-
var AutoResizingTextArea =
|
|
16286
|
-
|
|
16660
|
+
var AutoResizingTextArea = memo29(
|
|
16661
|
+
forwardRef20(function AutoResizingTextArea2({
|
|
16287
16662
|
value,
|
|
16288
16663
|
onChangeText,
|
|
16289
16664
|
className,
|
|
@@ -16301,10 +16676,10 @@ var AutoResizingTextArea = memo28(
|
|
|
16301
16676
|
},
|
|
16302
16677
|
[ref, forwardedRef]
|
|
16303
16678
|
);
|
|
16304
|
-
return /* @__PURE__ */
|
|
16679
|
+
return /* @__PURE__ */ React67.createElement(
|
|
16305
16680
|
"textarea",
|
|
16306
16681
|
{
|
|
16307
|
-
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 ?? ""}`,
|
|
16308
16683
|
ref: handleRef,
|
|
16309
16684
|
...rest,
|
|
16310
16685
|
onChange: handleChange,
|
|
@@ -16315,13 +16690,13 @@ var AutoResizingTextArea = memo28(
|
|
|
16315
16690
|
);
|
|
16316
16691
|
|
|
16317
16692
|
// src/components/TreeView.tsx
|
|
16318
|
-
import
|
|
16319
|
-
forwardRef as
|
|
16320
|
-
memo as
|
|
16693
|
+
import React68, {
|
|
16694
|
+
forwardRef as forwardRef21,
|
|
16695
|
+
memo as memo30,
|
|
16321
16696
|
useCallback as useCallback25,
|
|
16322
16697
|
useContext as useContext11
|
|
16323
16698
|
} from "react";
|
|
16324
|
-
var TreeRow =
|
|
16699
|
+
var TreeRow = forwardRef21(function TreeRow2({
|
|
16325
16700
|
icon,
|
|
16326
16701
|
expanded,
|
|
16327
16702
|
onClickChevron,
|
|
@@ -16336,27 +16711,27 @@ var TreeRow = forwardRef19(function TreeRow2({
|
|
|
16336
16711
|
},
|
|
16337
16712
|
[onClickChevron]
|
|
16338
16713
|
);
|
|
16339
|
-
return /* @__PURE__ */
|
|
16714
|
+
return /* @__PURE__ */ React68.createElement(ListView.Row, { ref: forwardedRef, ...rest }, expandable && /* @__PURE__ */ React68.createElement(React68.Fragment, null, expanded === void 0 ? /* @__PURE__ */ React68.createElement(Spacer.Horizontal, { size: 19 }) : /* @__PURE__ */ React68.createElement(
|
|
16340
16715
|
IconButton,
|
|
16341
16716
|
{
|
|
16342
16717
|
iconName: expanded ? "ChevronDownIcon2" : "ChevronRightIcon2",
|
|
16343
16718
|
onClick: handleClickChevron,
|
|
16344
16719
|
selected: rest.selected
|
|
16345
16720
|
}
|
|
16346
|
-
), /* @__PURE__ */
|
|
16721
|
+
), /* @__PURE__ */ React68.createElement(Spacer.Horizontal, { size: 6 })), icon && /* @__PURE__ */ React68.createElement(React68.Fragment, null, renderIcon(icon), /* @__PURE__ */ React68.createElement(Spacer.Horizontal, { size: 10 })), children2);
|
|
16347
16722
|
});
|
|
16348
16723
|
var TreeView;
|
|
16349
16724
|
((TreeView2) => {
|
|
16350
16725
|
TreeView2.Root = ListView.Root;
|
|
16351
16726
|
TreeView2.RowTitle = ListView.RowTitle;
|
|
16352
16727
|
TreeView2.EditableRowTitle = ListView.EditableRowTitle;
|
|
16353
|
-
TreeView2.Row =
|
|
16728
|
+
TreeView2.Row = memo30(TreeRow);
|
|
16354
16729
|
})(TreeView || (TreeView = {}));
|
|
16355
16730
|
|
|
16356
16731
|
// src/components/WorkspaceLayout.tsx
|
|
16357
16732
|
import { useKeyboardShortcuts as useKeyboardShortcuts3 } from "@noya-app/noya-keymap";
|
|
16358
|
-
import
|
|
16359
|
-
forwardRef as
|
|
16733
|
+
import React70, {
|
|
16734
|
+
forwardRef as forwardRef22,
|
|
16360
16735
|
useCallback as useCallback26,
|
|
16361
16736
|
useImperativeHandle as useImperativeHandle4,
|
|
16362
16737
|
useRef as useRef21,
|
|
@@ -16501,7 +16876,7 @@ function usePreservePanelSize(panelGroupRef, setPanelLayoutState) {
|
|
|
16501
16876
|
}
|
|
16502
16877
|
|
|
16503
16878
|
// src/components/WorkspaceLayout.tsx
|
|
16504
|
-
var WorkspaceLayoutWithTheme =
|
|
16879
|
+
var WorkspaceLayoutWithTheme = forwardRef22(function WorkspaceLayoutWithTheme2({
|
|
16505
16880
|
autoSavePrefix,
|
|
16506
16881
|
leftSidebarContent: leftPanelContent,
|
|
16507
16882
|
children: centerPanelContent,
|
|
@@ -16595,19 +16970,19 @@ var WorkspaceLayoutWithTheme = forwardRef20(function WorkspaceLayoutWithTheme2({
|
|
|
16595
16970
|
}
|
|
16596
16971
|
});
|
|
16597
16972
|
const centerPanelPercentage = 100 - (leftPanelContent ? leftSidebarPercentage : 0) - (rightPanelContent ? rightSidebarPercentage : 0);
|
|
16598
|
-
return /* @__PURE__ */
|
|
16973
|
+
return /* @__PURE__ */ React70.createElement(
|
|
16599
16974
|
"div",
|
|
16600
16975
|
{
|
|
16601
16976
|
id,
|
|
16602
16977
|
className,
|
|
16603
16978
|
style: {
|
|
16604
|
-
backgroundColor:
|
|
16979
|
+
backgroundColor: cssVars.colors.canvasBackground,
|
|
16605
16980
|
display: "flex",
|
|
16606
16981
|
flexDirection: "row",
|
|
16607
16982
|
...style5
|
|
16608
16983
|
}
|
|
16609
16984
|
},
|
|
16610
|
-
/* @__PURE__ */
|
|
16985
|
+
/* @__PURE__ */ React70.createElement(
|
|
16611
16986
|
PanelGroup,
|
|
16612
16987
|
{
|
|
16613
16988
|
ref: panelGroupRef,
|
|
@@ -16616,7 +16991,7 @@ var WorkspaceLayoutWithTheme = forwardRef20(function WorkspaceLayoutWithTheme2({
|
|
|
16616
16991
|
autoSaveId: autoSavePrefix ? `${autoSavePrefix}--${EDITOR_PANEL_GROUP_ID}` : void 0,
|
|
16617
16992
|
style: { flex: "1" }
|
|
16618
16993
|
},
|
|
16619
|
-
hasLeftSidebar && /* @__PURE__ */
|
|
16994
|
+
hasLeftSidebar && /* @__PURE__ */ React70.createElement(React70.Fragment, null, /* @__PURE__ */ React70.createElement(
|
|
16620
16995
|
Panel,
|
|
16621
16996
|
{
|
|
16622
16997
|
id: LEFT_SIDEBAR_ID,
|
|
@@ -16633,18 +17008,18 @@ var WorkspaceLayoutWithTheme = forwardRef20(function WorkspaceLayoutWithTheme2({
|
|
|
16633
17008
|
}
|
|
16634
17009
|
},
|
|
16635
17010
|
internalLayoutState?.leftSidebarCollapsed ? null : leftPanelContent
|
|
16636
|
-
), /* @__PURE__ */
|
|
17011
|
+
), /* @__PURE__ */ React70.createElement(
|
|
16637
17012
|
PanelResizeHandle,
|
|
16638
17013
|
{
|
|
16639
17014
|
style: {
|
|
16640
17015
|
cursor: "col-resize",
|
|
16641
17016
|
width: "1px",
|
|
16642
17017
|
height: "100%",
|
|
16643
|
-
backgroundColor:
|
|
17018
|
+
backgroundColor: cssVars.colors.divider
|
|
16644
17019
|
}
|
|
16645
17020
|
}
|
|
16646
17021
|
)),
|
|
16647
|
-
/* @__PURE__ */
|
|
17022
|
+
/* @__PURE__ */ React70.createElement(
|
|
16648
17023
|
Panel,
|
|
16649
17024
|
{
|
|
16650
17025
|
id: CONTENT_AREA_ID,
|
|
@@ -16659,17 +17034,17 @@ var WorkspaceLayoutWithTheme = forwardRef20(function WorkspaceLayoutWithTheme2({
|
|
|
16659
17034
|
},
|
|
16660
17035
|
centerPanelContent
|
|
16661
17036
|
),
|
|
16662
|
-
hasRightSidebar && /* @__PURE__ */
|
|
17037
|
+
hasRightSidebar && /* @__PURE__ */ React70.createElement(React70.Fragment, null, /* @__PURE__ */ React70.createElement(
|
|
16663
17038
|
PanelResizeHandle,
|
|
16664
17039
|
{
|
|
16665
17040
|
style: {
|
|
16666
17041
|
cursor: "col-resize",
|
|
16667
17042
|
width: "1px",
|
|
16668
17043
|
height: "100%",
|
|
16669
|
-
backgroundColor:
|
|
17044
|
+
backgroundColor: cssVars.colors.divider
|
|
16670
17045
|
}
|
|
16671
17046
|
}
|
|
16672
|
-
), /* @__PURE__ */
|
|
17047
|
+
), /* @__PURE__ */ React70.createElement(
|
|
16673
17048
|
Panel,
|
|
16674
17049
|
{
|
|
16675
17050
|
id: RIGHT_SIDEBAR_ID,
|
|
@@ -16689,8 +17064,8 @@ var WorkspaceLayoutWithTheme = forwardRef20(function WorkspaceLayoutWithTheme2({
|
|
|
16689
17064
|
)
|
|
16690
17065
|
);
|
|
16691
17066
|
});
|
|
16692
|
-
var WorkspaceLayout =
|
|
16693
|
-
return /* @__PURE__ */
|
|
17067
|
+
var WorkspaceLayout = forwardRef22(function WorkspaceLayout2(props, forwardedRef) {
|
|
17068
|
+
return /* @__PURE__ */ React70.createElement(WorkspaceLayoutWithTheme, { ...props, ref: forwardedRef });
|
|
16694
17069
|
});
|
|
16695
17070
|
|
|
16696
17071
|
// src/hooks/usePlatform.ts
|
|
@@ -16761,11 +17136,11 @@ var SUPPORTED_CANVAS_UPLOAD_TYPES = [
|
|
|
16761
17136
|
|
|
16762
17137
|
// src/components/DimensionInput.tsx
|
|
16763
17138
|
import { round } from "@noya-app/noya-utils";
|
|
16764
|
-
import
|
|
17139
|
+
import React71, { memo as memo31, useCallback as useCallback27 } from "react";
|
|
16765
17140
|
function getNewValue(value, mode, delta) {
|
|
16766
17141
|
return delta === void 0 ? value : mode === "replace" ? delta : value + delta;
|
|
16767
17142
|
}
|
|
16768
|
-
var DimensionInput =
|
|
17143
|
+
var DimensionInput = memo31(function DimensionInput2({
|
|
16769
17144
|
id,
|
|
16770
17145
|
value,
|
|
16771
17146
|
onSetValue,
|
|
@@ -16783,7 +17158,7 @@ var DimensionInput = memo30(function DimensionInput2({
|
|
|
16783
17158
|
(value2) => onSetValue(value2, "replace"),
|
|
16784
17159
|
[onSetValue]
|
|
16785
17160
|
);
|
|
16786
|
-
return /* @__PURE__ */
|
|
17161
|
+
return /* @__PURE__ */ React71.createElement(InputField.Root, { id, width: size3 }, /* @__PURE__ */ React71.createElement(
|
|
16787
17162
|
InputField.NumberInput,
|
|
16788
17163
|
{
|
|
16789
17164
|
value: value === void 0 ? value : round(value, 2),
|
|
@@ -16792,13 +17167,13 @@ var DimensionInput = memo30(function DimensionInput2({
|
|
|
16792
17167
|
disabled,
|
|
16793
17168
|
...trigger === "change" ? { onChange: handleSetValue } : { onSubmit: handleSetValue }
|
|
16794
17169
|
}
|
|
16795
|
-
), label && /* @__PURE__ */
|
|
17170
|
+
), label && /* @__PURE__ */ React71.createElement(InputField.Label, null, label));
|
|
16796
17171
|
});
|
|
16797
17172
|
|
|
16798
17173
|
// src/components/InspectorPrimitives.tsx
|
|
16799
17174
|
var InspectorPrimitives_exports = {};
|
|
16800
17175
|
__export(InspectorPrimitives_exports, {
|
|
16801
|
-
Checkbox: () =>
|
|
17176
|
+
Checkbox: () => Checkbox3,
|
|
16802
17177
|
Column: () => Column2,
|
|
16803
17178
|
HorizontalSeparator: () => HorizontalSeparator,
|
|
16804
17179
|
LabeledRow: () => LabeledRow,
|
|
@@ -16810,8 +17185,11 @@ __export(InspectorPrimitives_exports, {
|
|
|
16810
17185
|
Title: () => Title3,
|
|
16811
17186
|
VerticalSeparator: () => VerticalSeparator
|
|
16812
17187
|
});
|
|
16813
|
-
import
|
|
16814
|
-
|
|
17188
|
+
import React72, {
|
|
17189
|
+
forwardRef as forwardRef23,
|
|
17190
|
+
memo as memo32
|
|
17191
|
+
} from "react";
|
|
17192
|
+
var Section2 = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React72.createElement(
|
|
16815
17193
|
"div",
|
|
16816
17194
|
{
|
|
16817
17195
|
ref,
|
|
@@ -16819,8 +17197,8 @@ var Section2 = forwardRef21(({ className, ...props }, ref) => /* @__PURE__ */ Re
|
|
|
16819
17197
|
...props
|
|
16820
17198
|
}
|
|
16821
17199
|
));
|
|
16822
|
-
var SectionHeader =
|
|
16823
|
-
var Title3 =
|
|
17200
|
+
var SectionHeader = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React72.createElement("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
17201
|
+
var Title3 = forwardRef23(({ className, $textStyle, ...props }, ref) => /* @__PURE__ */ React72.createElement(
|
|
16824
17202
|
"div",
|
|
16825
17203
|
{
|
|
16826
17204
|
ref,
|
|
@@ -16828,7 +17206,7 @@ var Title3 = forwardRef21(({ className, $textStyle, ...props }, ref) => /* @__PU
|
|
|
16828
17206
|
...props
|
|
16829
17207
|
}
|
|
16830
17208
|
));
|
|
16831
|
-
var Row =
|
|
17209
|
+
var Row = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React72.createElement(
|
|
16832
17210
|
"div",
|
|
16833
17211
|
{
|
|
16834
17212
|
ref,
|
|
@@ -16836,7 +17214,7 @@ var Row = forwardRef21(({ className, ...props }, ref) => /* @__PURE__ */ React71
|
|
|
16836
17214
|
...props
|
|
16837
17215
|
}
|
|
16838
17216
|
));
|
|
16839
|
-
var Column2 =
|
|
17217
|
+
var Column2 = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React72.createElement(
|
|
16840
17218
|
"div",
|
|
16841
17219
|
{
|
|
16842
17220
|
ref,
|
|
@@ -16844,16 +17222,16 @@ var Column2 = forwardRef21(({ className, ...props }, ref) => /* @__PURE__ */ Rea
|
|
|
16844
17222
|
...props
|
|
16845
17223
|
}
|
|
16846
17224
|
));
|
|
16847
|
-
var
|
|
17225
|
+
var Checkbox3 = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React72.createElement(
|
|
16848
17226
|
"input",
|
|
16849
17227
|
{
|
|
16850
17228
|
ref,
|
|
16851
17229
|
type: "checkbox",
|
|
16852
|
-
className: cn("m-0", className),
|
|
17230
|
+
className: cn("m-0 focus:z-interactable", className),
|
|
16853
17231
|
...props
|
|
16854
17232
|
}
|
|
16855
17233
|
));
|
|
16856
|
-
var Text3 =
|
|
17234
|
+
var Text3 = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React72.createElement(
|
|
16857
17235
|
"span",
|
|
16858
17236
|
{
|
|
16859
17237
|
ref,
|
|
@@ -16861,19 +17239,23 @@ var Text3 = forwardRef21(({ className, ...props }, ref) => /* @__PURE__ */ React
|
|
|
16861
17239
|
...props
|
|
16862
17240
|
}
|
|
16863
17241
|
));
|
|
16864
|
-
var VerticalSeparator = () => /* @__PURE__ */
|
|
16865
|
-
var HorizontalSeparator = () => /* @__PURE__ */
|
|
16866
|
-
var RowLabel =
|
|
16867
|
-
|
|
16868
|
-
|
|
17242
|
+
var VerticalSeparator = () => /* @__PURE__ */ React72.createElement(Spacer.Vertical, { size: "inspector-v-separator" });
|
|
17243
|
+
var HorizontalSeparator = () => /* @__PURE__ */ React72.createElement(Spacer.Horizontal, { size: "inspector-h-separator" });
|
|
17244
|
+
var RowLabel = forwardRef23(function RowLabel2({
|
|
17245
|
+
className,
|
|
17246
|
+
$textStyle,
|
|
17247
|
+
...props
|
|
17248
|
+
}, ref) {
|
|
17249
|
+
return /* @__PURE__ */ React72.createElement(
|
|
17250
|
+
"label",
|
|
16869
17251
|
{
|
|
16870
17252
|
ref,
|
|
16871
|
-
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 ?? ""}`,
|
|
16872
17254
|
...props
|
|
16873
17255
|
}
|
|
16874
17256
|
);
|
|
16875
17257
|
});
|
|
16876
|
-
var LabeledRow =
|
|
17258
|
+
var LabeledRow = memo32(function LabeledRow2({
|
|
16877
17259
|
id,
|
|
16878
17260
|
children: children2,
|
|
16879
17261
|
label,
|
|
@@ -16881,7 +17263,7 @@ var LabeledRow = memo31(function LabeledRow2({
|
|
|
16881
17263
|
right,
|
|
16882
17264
|
className
|
|
16883
17265
|
}) {
|
|
16884
|
-
return /* @__PURE__ */
|
|
17266
|
+
return /* @__PURE__ */ React72.createElement(Row, { id, className: className ?? "" }, /* @__PURE__ */ React72.createElement(Column2, null, /* @__PURE__ */ React72.createElement(RowLabel, { $textStyle: labelTextStyle }, label, right && /* @__PURE__ */ React72.createElement(Spacer.Horizontal, null), right), /* @__PURE__ */ React72.createElement(Row, null, children2)));
|
|
16885
17267
|
});
|
|
16886
17268
|
export {
|
|
16887
17269
|
ActivityIndicator,
|
|
@@ -16891,6 +17273,7 @@ export {
|
|
|
16891
17273
|
Body,
|
|
16892
17274
|
Button,
|
|
16893
17275
|
CONTENT_AREA_ID,
|
|
17276
|
+
Checkbox,
|
|
16894
17277
|
Chip,
|
|
16895
17278
|
CompletionMenu,
|
|
16896
17279
|
ContextMenu,
|
|
@@ -16952,6 +17335,7 @@ export {
|
|
|
16952
17335
|
WorkspaceLayout,
|
|
16953
17336
|
cn,
|
|
16954
17337
|
createSectionedMenu,
|
|
17338
|
+
cssVars,
|
|
16955
17339
|
fuzzyFilter,
|
|
16956
17340
|
fuzzyScore,
|
|
16957
17341
|
fuzzyTokenize,
|