@morlay/dsh-client-ui-primitives 0.0.7 → 0.0.8
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/README.md +29 -5
- package/dist/client.d.mts +186 -11201
- package/dist/client.mjs +981 -1827
- package/package.json +5 -7
- package/src/client/controls/Bubble.module.css +17 -0
- package/src/client/controls/Bubble.tsx +17 -0
- package/src/client/controls/Button.module.css +10 -0
- package/src/client/controls/Button.tsx +29 -0
- package/src/client/controls/DisclosureRow.module.css +22 -0
- package/src/client/controls/DisclosureRow.tsx +20 -0
- package/src/client/controls/IconButton.module.css +50 -0
- package/src/client/controls/IconButton.tsx +45 -0
- package/src/client/controls/ModelRouteList.module.css +100 -0
- package/src/client/controls/ModelRouteList.tsx +118 -0
- package/src/client/controls/MultilineField.module.css +26 -0
- package/src/client/controls/MultilineField.tsx +19 -0
- package/src/client/controls/SearchInput.module.css +11 -0
- package/src/client/controls/SearchInput.tsx +22 -0
- package/src/client/controls/SearchSelect.module.css +34 -0
- package/src/client/controls/SearchSelect.tsx +138 -0
- package/src/client/controls/SeatButton.module.css +53 -0
- package/src/client/controls/SeatButton.tsx +40 -0
- package/src/client/controls/Spinner.module.css +18 -0
- package/src/client/controls/Spinner.tsx +14 -0
- package/src/client/controls/Tabs.module.css +48 -0
- package/src/client/controls/Tabs.tsx +57 -0
- package/src/client/controls/TagInput.module.css +105 -0
- package/src/client/controls/TagInput.tsx +152 -0
- package/src/client/controls/TimeLabel.module.css +16 -0
- package/src/client/controls/TimeLabel.tsx +15 -0
- package/src/client/controls/VisuallyHidden.module.css +9 -0
- package/src/client/controls/VisuallyHidden.tsx +16 -0
- package/src/client/controls/classes.ts +7 -0
- package/src/client/controls/index.ts +30 -0
- package/src/client/controls/tags.ts +24 -0
- package/src/client/index.ts +10 -2
- package/src/client/layout/Row.tsx +86 -0
- package/src/client/layout/Stack.tsx +79 -0
- package/src/client/layout/Text.tsx +54 -0
- package/src/client/layout/index.ts +16 -0
- package/src/client/layout/layout.module.css +217 -0
- package/src/client/layout/scales.ts +91 -0
- package/src/client/schema-form/Editor.tsx +48 -65
- package/src/client/schema-form/SchemaForm.tsx +4 -4
- package/src/client/schema-form/controller.ts +5 -2
- package/src/client/schema-form/geometry.ts +3 -0
- package/src/client/schema-form/schema-form.module.css +335 -0
- package/src/client/schema-form/value.tsx +10 -9
- package/src/client/settings-form/SettingsFieldRow.module.css +93 -0
- package/src/client/settings-form/SettingsFieldRow.tsx +103 -0
- package/src/client/settings-form/index.ts +5 -18
- package/src/css-modules.d.ts +6 -0
- package/src/client/schema-form/styles.ts +0 -321
- package/src/client/settings-form/SettingsForm.styles.ts +0 -58
- package/src/client/settings-form/SettingsForm.tsx +0 -68
- package/src/client/settings-form/fields.styles.ts +0 -158
- package/src/client/settings-form/fields.tsx +0 -184
- package/src/client/settings-form/form-model.ts +0 -339
- package/src/client/styling/css.ts +0 -27
- package/src/client/styling/focus.ts +0 -9
- package/src/client/styling/index.ts +0 -6
- package/src/client/styling/styled.tsx +0 -54
- package/src/client/styling/styling.ts +0 -142
- package/src/client/styling/token.ts +0 -275
- package/src/client/styling/toolkit.ts +0 -37
- package/src/client/theme.generated.ts +0 -846
- package/src/client/theme.ts +0 -5
package/dist/client.mjs
CHANGED
|
@@ -2,9 +2,10 @@ import { n as __exportAll, t as __commonJSMin } from "./rolldown-runtime-EAsCxrD
|
|
|
2
2
|
import { a as parseReference, i as isLocalReference, n as formatReference, o as parseReferenceToken, r as formatReferenceMention, t as findReferences } from "./reference-Cjcn21uW.mjs";
|
|
3
3
|
import { createSnapshotStore } from "@deepseek-ai/dsh-client-store";
|
|
4
4
|
import { Service } from "@deepseek-ai/cordis";
|
|
5
|
-
import { cloneElement,
|
|
6
|
-
import { IconCheckOutlineRegular, IconChevronDownOutlineRegular, IconChevronRightOutlineRegular, IconCloseOutlineRegular, IconCopyOutlineRegular, IconRefreshOutlineRegular, IconTrashOutlineRegular, Input, MarkdownText, Menu,
|
|
5
|
+
import { cloneElement, forwardRef, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
6
|
+
import { Button as Button$1, DisclosureRow as DisclosureRow$1, IconCheckOutlineRegular, IconChevronDownOutlineRegular, IconChevronRightOutlineRegular, IconCloseOutlineRegular, IconCopyOutlineRegular, IconRefreshOutlineRegular, IconTrashOutlineRegular, Input, MarkdownText, Menu, MenuItemButton, SettingsForm, Tooltip, rankByName } from "@deepseek-ai/dsh-client-ui-primitives";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
export * from "@deepseek-ai/dsh-client-ui-primitives";
|
|
8
9
|
function emptyMeta() {
|
|
9
10
|
return {
|
|
10
11
|
description: void 0,
|
|
@@ -922,7 +923,7 @@ var SchemaFormController = class {
|
|
|
922
923
|
return this.#ns;
|
|
923
924
|
}
|
|
924
925
|
refresh() {
|
|
925
|
-
this.#
|
|
926
|
+
this.#sync();
|
|
926
927
|
}
|
|
927
928
|
dispose() {
|
|
928
929
|
for (const dispose of this.#disposers.splice(0)) dispose();
|
|
@@ -1442,1219 +1443,38 @@ function isPrefix(prefix, path) {
|
|
|
1442
1443
|
return prefix.every((segment, index) => path[index] === segment);
|
|
1443
1444
|
}
|
|
1444
1445
|
//#endregion
|
|
1445
|
-
//#region src/client/
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
}
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
const tokensSymbol = Symbol("tokens");
|
|
1476
|
-
const tokenInstSymbol = Symbol("tokenInst");
|
|
1477
|
-
const SELF = "$";
|
|
1478
|
-
function tokenVars(token, tokens, path) {
|
|
1479
|
-
const reserved = /* @__PURE__ */ new Set([
|
|
1480
|
-
"constructor",
|
|
1481
|
-
"toJSON",
|
|
1482
|
-
"__proto__"
|
|
1483
|
-
]);
|
|
1484
|
-
return new Proxy(() => {}, {
|
|
1485
|
-
apply() {
|
|
1486
|
-
return Token.fallbackVar(token.cssVar(path));
|
|
1487
|
-
},
|
|
1488
|
-
get(_target, property) {
|
|
1489
|
-
if (property === Symbol.toPrimitive || property === Symbol.toStringTag || property === "toString") return () => `var(${token.cssVar(path)})`;
|
|
1490
|
-
if (property === "valueOf") return () => Token.fallbackVar(token.cssVar(path));
|
|
1491
|
-
if (property === tokenInstSymbol) return token;
|
|
1492
|
-
if (property === tokensSymbol) return tokens;
|
|
1493
|
-
if (property === cssVarSymbol) return token.cssVar(path);
|
|
1494
|
-
if (!isString(property) || reserved.has(property)) return void 0;
|
|
1495
|
-
const next = tokens[property];
|
|
1496
|
-
if (isUndefined(next)) return void 0;
|
|
1497
|
-
return tokenVars(token, next, [...path, property]);
|
|
1498
|
-
}
|
|
1499
|
-
});
|
|
1500
|
-
}
|
|
1501
|
-
var Token = class Token {
|
|
1502
|
-
prefix;
|
|
1503
|
-
static vars(tokens, options = {}) {
|
|
1504
|
-
return tokenVars(new Token(options.prefix ?? ""), tokens, []);
|
|
1505
|
-
}
|
|
1506
|
-
static extendsVars(vars, extra) {
|
|
1507
|
-
const tokens = vars[tokensSymbol] ?? {};
|
|
1508
|
-
return Token.vars(toMerged(tokens, extra));
|
|
1509
|
-
}
|
|
1510
|
-
static assignVars(vars, overwrites) {
|
|
1511
|
-
const tokens = overwrites ?? vars[tokensSymbol] ?? {};
|
|
1512
|
-
const token = vars[tokenInstSymbol] ?? new Token("");
|
|
1513
|
-
const result = {};
|
|
1514
|
-
for (const [name, value] of flattenTokens(token, tokens, [])) result[name] = token.normalize(value);
|
|
1515
|
-
return result;
|
|
1516
|
-
}
|
|
1517
|
-
static variants(variants) {
|
|
1518
|
-
return mapKeys(variants, (key) => `&[data-variant="${key}"]`);
|
|
1519
|
-
}
|
|
1520
|
-
static val(strings, ...values) {
|
|
1521
|
-
return function* () {
|
|
1522
|
-
for (let index = 0; index < strings.length; index += 1) {
|
|
1523
|
-
const literal = strings[index];
|
|
1524
|
-
if (literal) yield literal;
|
|
1525
|
-
if (index >= values.length) continue;
|
|
1526
|
-
const value = values[index];
|
|
1527
|
-
yield* isFunction(value) ? value() : [value];
|
|
1528
|
-
}
|
|
1529
|
-
};
|
|
1530
|
-
}
|
|
1531
|
-
static calc(strings, ...values) {
|
|
1532
|
-
return combinator("calc(", ")", strings, values);
|
|
1533
|
-
}
|
|
1534
|
-
static min(strings, ...values) {
|
|
1535
|
-
return combinator("min(", ")", strings, values);
|
|
1536
|
-
}
|
|
1537
|
-
static max(strings, ...values) {
|
|
1538
|
-
return combinator("max(", ")", strings, values);
|
|
1539
|
-
}
|
|
1540
|
-
static url(strings, ...values) {
|
|
1541
|
-
return combinator("url(", ")", strings, values);
|
|
1542
|
-
}
|
|
1543
|
-
static colorMix(strings, ...values) {
|
|
1544
|
-
return combinator("color-mix(", ")", strings, values);
|
|
1545
|
-
}
|
|
1546
|
-
static colorScale(color, options = {}) {
|
|
1547
|
-
const channel = (name, amount, max) => Token.calc`${name} + (${String(max)} - ${name}) * max(${amount}, 0) + ${name} * min(${amount}, 0)`;
|
|
1548
|
-
const mix = (from, to, amount) => Token.colorMix`in srgb, ${from}, ${to} ${Token.calc`${amount} * 100%`}`;
|
|
1549
|
-
let result = color;
|
|
1550
|
-
if (!isUndefined(options.alpha) || !isUndefined(options.lightness) || !isUndefined(options.saturation)) result = Token.val`hsl(from ${result} h ${isUndefined(options.saturation) ? "s" : channel("s", options.saturation, 100)} ${isUndefined(options.lightness) ? "l" : channel("l", options.lightness, 100)} / ${isUndefined(options.alpha) ? "alpha" : channel("alpha", options.alpha, 1)})`;
|
|
1551
|
-
if (!isUndefined(options.whiteness)) result = mix(result, "white", options.whiteness);
|
|
1552
|
-
if (!isUndefined(options.blackness)) result = mix(result, "black", options.blackness);
|
|
1553
|
-
return result;
|
|
1554
|
-
}
|
|
1555
|
-
static fallbackVar(value, ...fallbacks) {
|
|
1556
|
-
return Object.assign(function* () {
|
|
1557
|
-
yield "var(";
|
|
1558
|
-
for (const [index, item] of [value, ...fallbacks].entries()) {
|
|
1559
|
-
if (index > 0) yield ", ";
|
|
1560
|
-
yield* asIterable(item);
|
|
1561
|
-
}
|
|
1562
|
-
yield ")";
|
|
1563
|
-
}, { [cssVarSymbol]: value });
|
|
1564
|
-
}
|
|
1565
|
-
static collect(value) {
|
|
1566
|
-
const iterable = isFunction(value) ? value() : value;
|
|
1567
|
-
let result = "";
|
|
1568
|
-
for (const item of iterable) result += `${item}`;
|
|
1569
|
-
return result;
|
|
1570
|
-
}
|
|
1571
|
-
constructor(prefix = "") {
|
|
1572
|
-
this.prefix = prefix;
|
|
1573
|
-
}
|
|
1574
|
-
prop = (key) => key.startsWith("--") ? key : kebabCase(key);
|
|
1575
|
-
normalize = (input) => {
|
|
1576
|
-
const value = isFunction(input) ? input() : input;
|
|
1577
|
-
if (typeof value === "number") return `${value}`;
|
|
1578
|
-
if (typeof value === "string") return value;
|
|
1579
|
-
if (isUndefined(value) || isNull(value)) return "";
|
|
1580
|
-
if (isFunction(value)) return Token.collect(value);
|
|
1581
|
-
if (isPlainObject(value) && Symbol.iterator in value) return Token.collect(value);
|
|
1582
|
-
return "";
|
|
1583
|
-
};
|
|
1584
|
-
cssVar = (paths) => `--${[this.prefix, ...paths].filter(Boolean).join("-")}`;
|
|
1585
|
-
};
|
|
1586
|
-
function combinator(open, close, strings, values) {
|
|
1587
|
-
return function* () {
|
|
1588
|
-
yield open;
|
|
1589
|
-
yield* Token.val(strings, ...values)();
|
|
1590
|
-
yield close;
|
|
1591
|
-
};
|
|
1592
|
-
}
|
|
1593
|
-
function* asIterable(value) {
|
|
1594
|
-
const resolved = isFunction(value) ? value() : value;
|
|
1595
|
-
const variable = resolved?.[cssVarSymbol];
|
|
1596
|
-
if (!isUndefined(variable)) {
|
|
1597
|
-
yield variable;
|
|
1598
|
-
return;
|
|
1599
|
-
}
|
|
1600
|
-
if (typeof resolved === "object" && resolved !== null && Symbol.iterator in resolved) {
|
|
1601
|
-
yield* resolved;
|
|
1602
|
-
return;
|
|
1603
|
-
}
|
|
1604
|
-
yield resolved;
|
|
1605
|
-
}
|
|
1606
|
-
function* flattenTokens(token, value, parents) {
|
|
1607
|
-
for (const [property, child] of Object.entries(value)) {
|
|
1608
|
-
if (property === SELF) continue;
|
|
1609
|
-
if (isPlainObject(child)) {
|
|
1610
|
-
yield* flattenTokens(token, child, [...parents, property]);
|
|
1611
|
-
continue;
|
|
1612
|
-
}
|
|
1613
|
-
yield [token.cssVar([...parents, property]), child];
|
|
1614
|
-
}
|
|
1615
|
-
}
|
|
1616
|
-
function kebabCase(value) {
|
|
1617
|
-
return value.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
1618
|
-
}
|
|
1619
|
-
//#endregion
|
|
1620
|
-
//#region src/client/styling/styling.ts
|
|
1621
|
-
var Styling = class Styling {
|
|
1622
|
-
static create() {
|
|
1623
|
-
return new Styling();
|
|
1624
|
-
}
|
|
1625
|
-
static toRule(sheet) {
|
|
1626
|
-
return sheet.selector === void 0 ? sheet.contents.join("") : `${sheet.selector} {${sheet.contents.join("")} }`;
|
|
1627
|
-
}
|
|
1628
|
-
#token = new Token();
|
|
1629
|
-
#sheets = /* @__PURE__ */ new Map();
|
|
1630
|
-
#injected = /* @__PURE__ */ new Set();
|
|
1631
|
-
props = (...styles) => {
|
|
1632
|
-
const merged = mergeStyles(styles);
|
|
1633
|
-
if (Object.keys(merged).length === 0) return {};
|
|
1634
|
-
const sheet = this.#sheet(2, this.#rules(merged));
|
|
1635
|
-
return sheet === void 0 ? {} : { [`data-css-${sheet.id}`]: "" };
|
|
1636
|
-
};
|
|
1637
|
-
keyframes = (frames = {}) => {
|
|
1638
|
-
return this.#sheet(1, this.#rules(frames))?.id ?? "anim-none";
|
|
1639
|
-
};
|
|
1640
|
-
injectGlobals = (styles = {}) => {
|
|
1641
|
-
for (const [name, style] of Object.entries(styles)) this.#sheet(0, this.#rules(style), name);
|
|
1642
|
-
};
|
|
1643
|
-
className = (...styles) => {
|
|
1644
|
-
const merged = mergeStyles(styles);
|
|
1645
|
-
if (Object.keys(merged).length === 0) return "";
|
|
1646
|
-
const sheet = this.#sheet(3, this.#rules(merged));
|
|
1647
|
-
return sheet === void 0 ? "" : `cls-${sheet.id}`;
|
|
1648
|
-
};
|
|
1649
|
-
sheets = () => [...this.#sheets.values()].map((sheet) => Styling.toRule(sheet));
|
|
1650
|
-
#sheet(type, rules, selector) {
|
|
1651
|
-
let hash = 0;
|
|
1652
|
-
const contents = [];
|
|
1653
|
-
for (const rule of rules) {
|
|
1654
|
-
contents.push(rule);
|
|
1655
|
-
hash = incrementalHash(rule, hash);
|
|
1656
|
-
}
|
|
1657
|
-
if (selector !== void 0) hash = incrementalHash(selector, hash);
|
|
1658
|
-
if (hash === 0) return void 0;
|
|
1659
|
-
let id = selector ?? "";
|
|
1660
|
-
if (type === 2) id = `s${hash.toString(36)}`;
|
|
1661
|
-
if (type === 3) id = `c${hash.toString(36)}`;
|
|
1662
|
-
if (type === 0) id = `g${hash.toString(36)}`;
|
|
1663
|
-
if (type === 1) id = `a${hash.toString(36)}`;
|
|
1664
|
-
let resolvedSelector = selector;
|
|
1665
|
-
if (resolvedSelector === void 0) {
|
|
1666
|
-
if (type === 1) resolvedSelector = `@keyframes ${id}`;
|
|
1667
|
-
if (type === 2) resolvedSelector = `[data-css-${id}]`;
|
|
1668
|
-
if (type === 3) resolvedSelector = `.cls-${id}`;
|
|
1669
|
-
}
|
|
1670
|
-
const sheet = {
|
|
1671
|
-
id,
|
|
1672
|
-
contents,
|
|
1673
|
-
selector: resolvedSelector
|
|
1674
|
-
};
|
|
1675
|
-
const existing = this.#sheets.get(id);
|
|
1676
|
-
if (existing !== void 0 && existing.contents.join("") === contents.join("")) return existing;
|
|
1677
|
-
this.#sheets.set(id, sheet);
|
|
1678
|
-
this.#inject(sheet);
|
|
1679
|
-
return sheet;
|
|
1680
|
-
}
|
|
1681
|
-
#inject(sheet) {
|
|
1682
|
-
if (this.#injected.has(sheet.id)) return;
|
|
1683
|
-
this.#injected.add(sheet.id);
|
|
1684
|
-
if (typeof document === "undefined") return;
|
|
1685
|
-
const element = document.createElement("style");
|
|
1686
|
-
element.setAttribute("data-css", sheet.id);
|
|
1687
|
-
element.textContent = Styling.toRule(sheet);
|
|
1688
|
-
document.head.appendChild(element);
|
|
1689
|
-
}
|
|
1690
|
-
*#rules(styles) {
|
|
1691
|
-
const nested = /* @__PURE__ */ new Map();
|
|
1692
|
-
for (const [key, value] of Object.entries(styles)) {
|
|
1693
|
-
if (isNull(value) || isUndefined(value)) continue;
|
|
1694
|
-
if (isPlainObject(value)) {
|
|
1695
|
-
nested.set(key, value);
|
|
1696
|
-
continue;
|
|
1697
|
-
}
|
|
1698
|
-
yield ` ${this.#token.prop(key)}: ${this.#token.normalize(value)};`;
|
|
1699
|
-
}
|
|
1700
|
-
for (const [key, value] of nested.entries()) {
|
|
1701
|
-
yield ` ${key} {`;
|
|
1702
|
-
yield* this.#rules(value);
|
|
1703
|
-
yield " }";
|
|
1704
|
-
}
|
|
1705
|
-
}
|
|
1706
|
-
};
|
|
1707
|
-
function mergeStyles(styles) {
|
|
1708
|
-
return styles.reduce((accumulated, style) => style ? toMerged(accumulated, style) : accumulated, {});
|
|
1709
|
-
}
|
|
1710
|
-
function incrementalHash(value, previous = 0) {
|
|
1711
|
-
let hash = previous;
|
|
1712
|
-
for (let index = 0; index < value.length; index += 1) {
|
|
1713
|
-
hash = (hash << 5) - hash + value.charCodeAt(index);
|
|
1714
|
-
hash &= 2147483647;
|
|
1715
|
-
}
|
|
1716
|
-
return hash;
|
|
1717
|
-
}
|
|
1718
|
-
const STYLING_SINGLETON = Symbol.for("@morlay/dsh-client-ui-primitives/styling");
|
|
1719
|
-
const globalScope = globalThis;
|
|
1720
|
-
const styling = globalScope[STYLING_SINGLETON] ??= Styling.create();
|
|
1721
|
-
//#endregion
|
|
1722
|
-
//#region src/client/styling/styled.tsx
|
|
1723
|
-
const sxSymbol = Symbol("styled.sx");
|
|
1724
|
-
function styled(Component, defaultProps = {}) {
|
|
1725
|
-
return (...styles) => {
|
|
1726
|
-
const sx = styles.reduce((merged, style) => toMerged(merged, style), {});
|
|
1727
|
-
const Styled = forwardRef((props, ref) => {
|
|
1728
|
-
const styleProps = useMemo(() => styling.props(sx), []);
|
|
1729
|
-
return createElement(Component, {
|
|
1730
|
-
...defaultProps,
|
|
1731
|
-
...props,
|
|
1732
|
-
...styleProps,
|
|
1733
|
-
ref
|
|
1734
|
-
});
|
|
1735
|
-
});
|
|
1736
|
-
Styled.displayName = `styled(${typeof Component === "string" ? Component : Component.displayName ?? Component.name ?? "Component"})`;
|
|
1737
|
-
return Object.assign(Styled, { [sxSymbol]: sx });
|
|
1738
|
-
};
|
|
1739
|
-
}
|
|
1740
|
-
function styleOf(component) {
|
|
1741
|
-
return component[sxSymbol];
|
|
1742
|
-
}
|
|
1743
|
-
//#endregion
|
|
1744
|
-
//#region src/client/theme.generated.ts
|
|
1745
|
-
const designTokens = {
|
|
1746
|
-
alias: {
|
|
1747
|
-
bg: {
|
|
1748
|
-
base: "var(--dsw-static-neutral-bluish-00)",
|
|
1749
|
-
document: {
|
|
1750
|
-
preview: "var(--dsw-static-neutral-bluish-100)",
|
|
1751
|
-
selection: "color-mix(in srgb, var(--dsw-static-blue-500) 40%, transparent)"
|
|
1752
|
-
},
|
|
1753
|
-
layer: {
|
|
1754
|
-
"1": "var(--dsw-static-neutral-bluish-00)",
|
|
1755
|
-
"2": "var(--dsw-static-neutral-bluish-00)",
|
|
1756
|
-
"3": "var(--dsw-static-neutral-bluish-00)"
|
|
1757
|
-
},
|
|
1758
|
-
mask: {
|
|
1759
|
-
"1": "rgba(0, 0, 0, 0.24)",
|
|
1760
|
-
"2": "rgba(0, 0, 0, 0.12)",
|
|
1761
|
-
"3": "rgba(0, 0, 0, 0.48)",
|
|
1762
|
-
drop: "rgba(255, 255, 255, 0.7)",
|
|
1763
|
-
photo: "rgba(0, 0, 0, 0.88)"
|
|
1764
|
-
},
|
|
1765
|
-
module: { platform: "var(--dsw-static-neutral-bluish-60)" },
|
|
1766
|
-
multi: { select: "var(--dsw-static-neutral-bluish-60)" },
|
|
1767
|
-
overlay: "var(--dsw-static-neutral-bluish-150)",
|
|
1768
|
-
skeleton: "rgba(0, 0, 0, 0.04)"
|
|
1769
|
-
},
|
|
1770
|
-
border: {
|
|
1771
|
-
inverted: "rgba(0, 0, 0, 0)",
|
|
1772
|
-
inverted2: "rgba(0, 0, 0, 0)",
|
|
1773
|
-
l1: "rgba(0, 0, 0, 0.04)",
|
|
1774
|
-
l2: {
|
|
1775
|
-
$: "rgba(0, 0, 0, 0.1)",
|
|
1776
|
-
darkmode: { thin: "rgba(0, 0, 0, 0.1)" }
|
|
1777
|
-
},
|
|
1778
|
-
l3: "rgba(0, 0, 0, 0.12)",
|
|
1779
|
-
l4: "rgba(0, 0, 0, 0.16)"
|
|
1780
|
-
},
|
|
1781
|
-
brand: {
|
|
1782
|
-
primary: {
|
|
1783
|
-
$: "var(--dsw-static-neutral-bluish-1000)",
|
|
1784
|
-
invert: "var(--dsw-static-neutral-bluish-1000)",
|
|
1785
|
-
new: { colorprimary: { new: { color: "rgb(65, 118, 230)" } } }
|
|
1786
|
-
},
|
|
1787
|
-
text: "var(--dsw-static-neutral-bluish-1000)"
|
|
1788
|
-
},
|
|
1789
|
-
button: {
|
|
1790
|
-
contrast: { fill: "var(--dsw-static-neutral-bluish-700)" },
|
|
1791
|
-
elevated: { fill: "var(--dsw-static-neutral-bluish-00)" },
|
|
1792
|
-
floating: {
|
|
1793
|
-
fill: "var(--dsw-static-neutral-bluish-00)",
|
|
1794
|
-
hover: "var(--dsw-static-neutral-bluish-75)"
|
|
1795
|
-
},
|
|
1796
|
-
ghost: { active: {
|
|
1797
|
-
border: "var(--dsw-static-neutral-bluish-500)",
|
|
1798
|
-
fill: "var(--dsw-static-neutral-bluish-100)",
|
|
1799
|
-
hover: "var(--dsw-static-neutral-bluish-150)"
|
|
1800
|
-
} },
|
|
1801
|
-
info: {
|
|
1802
|
-
fill: "var(--dsw-static-deepseek-500)",
|
|
1803
|
-
hover: "var(--dsw-static-deepseek-400)"
|
|
1804
|
-
},
|
|
1805
|
-
primary: {
|
|
1806
|
-
dimmed: "var(--dsw-static-neutral-bluish-100)",
|
|
1807
|
-
fill: "var(--dsw-alias-brand-primary)",
|
|
1808
|
-
hover: "var(--dsw-static-neutral-bluish-750)"
|
|
1809
|
-
},
|
|
1810
|
-
tool: { bar: {
|
|
1811
|
-
fill: {
|
|
1812
|
-
$: "rgba(84, 85, 87, 0.5)",
|
|
1813
|
-
invisible: "rgba(31, 31, 31, 0.36)"
|
|
1814
|
-
},
|
|
1815
|
-
hover: "rgba(84, 85, 87, 0.6)"
|
|
1816
|
-
} }
|
|
1817
|
-
},
|
|
1818
|
-
code: { diff: {
|
|
1819
|
-
added: "var(--dsw-static-green-500-a08)",
|
|
1820
|
-
deleted: "var(--dsw-static-red-600-a08)"
|
|
1821
|
-
} },
|
|
1822
|
-
file: { diff: {
|
|
1823
|
-
added: {
|
|
1824
|
-
bg: "rgb(230, 244, 231)",
|
|
1825
|
-
gutter: "rgb(237, 247, 237)",
|
|
1826
|
-
marker: "rgb(1, 162, 65)"
|
|
1827
|
-
},
|
|
1828
|
-
deleted: {
|
|
1829
|
-
bg: "rgb(252, 230, 226)",
|
|
1830
|
-
gutter: "rgb(253, 236, 233)",
|
|
1831
|
-
marker: "rgb(186, 39, 35)"
|
|
1832
|
-
}
|
|
1833
|
-
} },
|
|
1834
|
-
interactive: { bg: {
|
|
1835
|
-
active: "rgba(38, 49, 72, 0.1)",
|
|
1836
|
-
hover: {
|
|
1837
|
-
$: "rgba(38, 49, 72, 0.06)",
|
|
1838
|
-
accent: "rgba(38, 49, 72, 0.14)",
|
|
1839
|
-
danger: "rgba(236, 19, 19, 0.05)",
|
|
1840
|
-
solid: "var(--dsw-static-neutral-bluish-75)"
|
|
1841
|
-
}
|
|
1842
|
-
} },
|
|
1843
|
-
label: {
|
|
1844
|
-
caption: "var(--dsw-static-neutral-bluish-400)",
|
|
1845
|
-
deep: { diving: {
|
|
1846
|
-
$: "color-mix(in srgb, var(--dsw-static-deepseek-500) 70%, var(--dsw-static-blue-950))",
|
|
1847
|
-
shimmer: "color-mix(in srgb, var(--dsw-static-deepseek-500) 30%, var(--dsw-static-blue-950))"
|
|
1848
|
-
} },
|
|
1849
|
-
dimmed: "var(--dsw-static-neutral-bluish-200)",
|
|
1850
|
-
document: { preview: "var(--dsw-static-neutral-bluish-700)" },
|
|
1851
|
-
primary: {
|
|
1852
|
-
$: "var(--dsw-static-neutral-bluish-1000)",
|
|
1853
|
-
bluish: "var(--dsw-static-blue-900)",
|
|
1854
|
-
dimmed: "var(--dsw-static-neutral-bluish-950)",
|
|
1855
|
-
foreground: "var(--dsw-static-neutral-bluish-00)",
|
|
1856
|
-
inverted: "var(--dsw-static-neutral-bluish-00)"
|
|
1857
|
-
},
|
|
1858
|
-
secondary: "var(--dsw-static-neutral-bluish-700)",
|
|
1859
|
-
shimmer: "color-mix(in srgb, var(--dsw-static-neutral-1000) 30%, transparent)",
|
|
1860
|
-
tertiary: "var(--dsw-static-neutral-bluish-600)"
|
|
1861
|
-
},
|
|
1862
|
-
link: "var(--dsw-static-deepseek-500)",
|
|
1863
|
-
markdown: {
|
|
1864
|
-
citation: "var(--dsw-static-neutral-bluish-100)",
|
|
1865
|
-
code: {
|
|
1866
|
-
block: {
|
|
1867
|
-
$: "var(--dsw-static-neutral-bluish-50)",
|
|
1868
|
-
banner: "var(--dsw-static-neutral-bluish-50)"
|
|
1869
|
-
},
|
|
1870
|
-
segment: {
|
|
1871
|
-
selected: "var(--dsw-static-neutral-bluish-00)",
|
|
1872
|
-
unselected: "var(--dsw-static-neutral-bluish-75)"
|
|
1873
|
-
}
|
|
1874
|
-
},
|
|
1875
|
-
inline: { code: "var(--dsw-static-neutral-50)" },
|
|
1876
|
-
placeholder: "var(--dsw-static-neutral-bluish-60)",
|
|
1877
|
-
tag: "var(--dsw-static-neutral-bluish-75)"
|
|
1878
|
-
},
|
|
1879
|
-
menu: {
|
|
1880
|
-
group: { header: { fill: "rgba(248, 249, 250, 0.94)" } },
|
|
1881
|
-
icon: "var(--dsw-static-neutral-bluish-800)"
|
|
1882
|
-
},
|
|
1883
|
-
onboarding: {
|
|
1884
|
-
accent: "rgb(57, 100, 254)",
|
|
1885
|
-
card: { fill: "color-mix(in srgb, var(--dsw-static-neutral-bluish-00) 80%, transparent)" },
|
|
1886
|
-
checkbox: { border: "color-mix(in srgb, var(--dsw-static-neutral-bluish-1000) 20%, transparent)" },
|
|
1887
|
-
secondary: { fill: "var(--dsw-static-neutral-bluish-00)" }
|
|
1888
|
-
},
|
|
1889
|
-
scrollbar: {
|
|
1890
|
-
bg: {
|
|
1891
|
-
l1: "var(--dsw-static-neutral-200)",
|
|
1892
|
-
l2: "var(--dsw-static-neutral-200)"
|
|
1893
|
-
},
|
|
1894
|
-
hover: {
|
|
1895
|
-
l1: "var(--dsw-static-neutral-300)",
|
|
1896
|
-
l2: "var(--dsw-static-neutral-300)"
|
|
1897
|
-
}
|
|
1898
|
-
},
|
|
1899
|
-
settings: { card: {
|
|
1900
|
-
fill: "var(--dsw-alias-bg-layer-2)",
|
|
1901
|
-
stroke: "var(--dsw-alias-border-l4)"
|
|
1902
|
-
} },
|
|
1903
|
-
state: {
|
|
1904
|
-
business: {
|
|
1905
|
-
primary: "var(--dsw-static-deepseek-500)",
|
|
1906
|
-
tertiary: "var(--dsw-static-deepseek-100)"
|
|
1907
|
-
},
|
|
1908
|
-
error: {
|
|
1909
|
-
primary: "var(--dsw-static-red-600)",
|
|
1910
|
-
secondary: "var(--dsw-static-red-400)"
|
|
1911
|
-
},
|
|
1912
|
-
idle: { primary: "var(--dsw-static-neutral-300)" },
|
|
1913
|
-
success: {
|
|
1914
|
-
primary: "var(--dsw-static-green-500)",
|
|
1915
|
-
secondary: "var(--dsw-static-green-400)",
|
|
1916
|
-
tertiary: "var(--dsw-static-green-100)"
|
|
1917
|
-
},
|
|
1918
|
-
warn: {
|
|
1919
|
-
label: "var(--dsw-static-amber-600)",
|
|
1920
|
-
primary: "var(--dsw-static-amber-500)",
|
|
1921
|
-
secondary: "var(--dsw-static-amber-400)",
|
|
1922
|
-
tertiary: "var(--dsw-static-amber-100)"
|
|
1923
|
-
}
|
|
1924
|
-
},
|
|
1925
|
-
switch: { thumb: "var(--dsw-static-neutral-bluish-00)" },
|
|
1926
|
-
toast: {
|
|
1927
|
-
bg: "var(--dsw-static-neutral-bluish-800)",
|
|
1928
|
-
label: "var(--dsw-static-neutral-bluish-00)"
|
|
1929
|
-
},
|
|
1930
|
-
tooltip: {
|
|
1931
|
-
bg: "var(--dsw-static-neutral-bluish-850)",
|
|
1932
|
-
key: { bg: "color-mix(in srgb, var(--dsw-alias-tooltip-bg), white 18%)" }
|
|
1933
|
-
},
|
|
1934
|
-
turn: { trigger: { bg: {
|
|
1935
|
-
$: "var(--dsw-alias-markdown-code-block)",
|
|
1936
|
-
hover: "var(--dsw-alias-interactive-bg-hover)"
|
|
1937
|
-
} } }
|
|
1938
|
-
},
|
|
1939
|
-
corner: { shape: "superellipse(1.5)" },
|
|
1940
|
-
elevation: {
|
|
1941
|
-
panel: "var(--dsw-elevation-stroke), 0 3px 8px 0 rgba(0, 0, 0, 0.03), 0 0 16px 0 rgba(0, 0, 0, 0.02)",
|
|
1942
|
-
prominent: "var(--dsw-elevation-stroke), 0 3px 8px 0 rgba(0, 0, 0, 0.04), 0 0 20px 0 rgba(0, 0, 0, 0.05)",
|
|
1943
|
-
soft: "var(--dsw-elevation-stroke), 0 4px 16px 0 rgba(0, 0, 0, 0.03), 0 0 24px 0 rgba(0, 0, 0, 0.03)",
|
|
1944
|
-
stroke: {
|
|
1945
|
-
$: "0 0 0 0.5px var(--dsw-elevation-stroke-color)",
|
|
1946
|
-
color: "var(--dsw-alias-border-l4)"
|
|
1947
|
-
}
|
|
1948
|
-
},
|
|
1949
|
-
focus: { ring: {
|
|
1950
|
-
color: "transparent",
|
|
1951
|
-
width: "2px"
|
|
1952
|
-
} },
|
|
1953
|
-
font: {
|
|
1954
|
-
base: {
|
|
1955
|
-
"16": {
|
|
1956
|
-
$: "16px/24px var(--dsw-font-family)",
|
|
1957
|
-
font: {
|
|
1958
|
-
family: "var(--dsw-font-family)",
|
|
1959
|
-
size: "16px",
|
|
1960
|
-
style: "normal",
|
|
1961
|
-
weight: "400"
|
|
1962
|
-
},
|
|
1963
|
-
line: { height: "24px" }
|
|
1964
|
-
},
|
|
1965
|
-
strong: { "16": {
|
|
1966
|
-
$: "500 16px/24px var(--dsw-font-family)",
|
|
1967
|
-
font: {
|
|
1968
|
-
family: "var(--dsw-font-family)",
|
|
1969
|
-
size: "16px",
|
|
1970
|
-
style: "normal",
|
|
1971
|
-
weight: "500"
|
|
1972
|
-
},
|
|
1973
|
-
line: { height: "24px" }
|
|
1974
|
-
} }
|
|
1975
|
-
},
|
|
1976
|
-
family: {
|
|
1977
|
-
$: "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',\n 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif",
|
|
1978
|
-
brand: "'Montserrat', var(--dsw-font-family)"
|
|
1979
|
-
},
|
|
1980
|
-
l: { "20": {
|
|
1981
|
-
$: "500 20px/28px var(--dsw-font-family)",
|
|
1982
|
-
font: {
|
|
1983
|
-
family: "var(--dsw-font-family)",
|
|
1984
|
-
size: "20px",
|
|
1985
|
-
style: "normal",
|
|
1986
|
-
weight: "500"
|
|
1987
|
-
},
|
|
1988
|
-
line: { height: "28px" }
|
|
1989
|
-
} },
|
|
1990
|
-
m: { "18": {
|
|
1991
|
-
$: "500 16px/28px var(--dsw-font-family)",
|
|
1992
|
-
font: {
|
|
1993
|
-
family: "var(--dsw-font-family)",
|
|
1994
|
-
size: "16px",
|
|
1995
|
-
style: "normal",
|
|
1996
|
-
weight: "500"
|
|
1997
|
-
},
|
|
1998
|
-
line: { height: "28px" }
|
|
1999
|
-
} },
|
|
2000
|
-
markdown: {
|
|
2001
|
-
base: {
|
|
2002
|
-
$: "var(--dsh-content-font-size, 14px) / calc(24px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
2003
|
-
font: {
|
|
2004
|
-
family: "var(--dsw-font-family)",
|
|
2005
|
-
size: "var(--dsh-content-font-size, 14px)",
|
|
2006
|
-
style: "normal",
|
|
2007
|
-
weight: "400"
|
|
2008
|
-
},
|
|
2009
|
-
italic: {
|
|
2010
|
-
$: "italic var(--dsh-content-font-size, 14px) / calc(24px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
2011
|
-
font: {
|
|
2012
|
-
family: "var(--dsw-font-family)",
|
|
2013
|
-
size: "var(--dsh-content-font-size, 14px)",
|
|
2014
|
-
style: "italic",
|
|
2015
|
-
weight: "400"
|
|
2016
|
-
},
|
|
2017
|
-
line: { height: "calc(24px + var(--dsh-content-font-delta))" }
|
|
2018
|
-
},
|
|
2019
|
-
line: { height: "calc(24px + var(--dsh-content-font-delta))" },
|
|
2020
|
-
strong: {
|
|
2021
|
-
$: "600 var(--dsh-content-font-size, 14px) / calc(24px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
2022
|
-
font: {
|
|
2023
|
-
family: "var(--dsw-font-family)",
|
|
2024
|
-
size: "var(--dsh-content-font-size, 14px)",
|
|
2025
|
-
style: "normal",
|
|
2026
|
-
weight: "600"
|
|
2027
|
-
},
|
|
2028
|
-
italic: {
|
|
2029
|
-
$: "italic 600 var(--dsh-content-font-size, 14px) / calc(24px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
2030
|
-
font: {
|
|
2031
|
-
family: "var(--dsw-font-family)",
|
|
2032
|
-
size: "var(--dsh-content-font-size, 14px)",
|
|
2033
|
-
style: "italic",
|
|
2034
|
-
weight: "600"
|
|
2035
|
-
},
|
|
2036
|
-
line: { height: "calc(24px + var(--dsh-content-font-delta))" }
|
|
2037
|
-
},
|
|
2038
|
-
line: { height: "calc(24px + var(--dsh-content-font-delta))" }
|
|
2039
|
-
}
|
|
2040
|
-
},
|
|
2041
|
-
code: {
|
|
2042
|
-
$: "12px/19px var(--ds-font-family-code)",
|
|
2043
|
-
block: {
|
|
2044
|
-
$: "11px/19px var(--ds-font-family-code)",
|
|
2045
|
-
font: {
|
|
2046
|
-
family: "var(--ds-font-family-code)",
|
|
2047
|
-
size: "11px",
|
|
2048
|
-
style: "normal",
|
|
2049
|
-
weight: "400"
|
|
2050
|
-
},
|
|
2051
|
-
line: { height: "19px" },
|
|
2052
|
-
small: {
|
|
2053
|
-
$: "11px/16px var(--ds-font-family-code)",
|
|
2054
|
-
font: {
|
|
2055
|
-
family: "var(--ds-font-family-code)",
|
|
2056
|
-
size: "11px",
|
|
2057
|
-
style: "normal",
|
|
2058
|
-
weight: "400"
|
|
2059
|
-
},
|
|
2060
|
-
line: { height: "16px" }
|
|
2061
|
-
}
|
|
2062
|
-
},
|
|
2063
|
-
font: {
|
|
2064
|
-
family: "var(--ds-font-family-code)",
|
|
2065
|
-
size: "12px",
|
|
2066
|
-
style: "normal",
|
|
2067
|
-
weight: "400"
|
|
2068
|
-
},
|
|
2069
|
-
line: { height: "19px" }
|
|
2070
|
-
},
|
|
2071
|
-
h1: {
|
|
2072
|
-
$: "700 calc(21px + var(--dsh-content-font-delta)) / calc(30px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
2073
|
-
font: {
|
|
2074
|
-
family: "var(--dsw-font-family)",
|
|
2075
|
-
size: "calc(21px + var(--dsh-content-font-delta))",
|
|
2076
|
-
style: "normal",
|
|
2077
|
-
weight: "700"
|
|
2078
|
-
},
|
|
2079
|
-
line: { height: "calc(30px + var(--dsh-content-font-delta))" }
|
|
2080
|
-
},
|
|
2081
|
-
h2: {
|
|
2082
|
-
$: "700 calc(19px + var(--dsh-content-font-delta)) / calc(28px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
2083
|
-
font: {
|
|
2084
|
-
family: "var(--dsw-font-family)",
|
|
2085
|
-
size: "calc(19px + var(--dsh-content-font-delta))",
|
|
2086
|
-
style: "normal",
|
|
2087
|
-
weight: "700"
|
|
2088
|
-
},
|
|
2089
|
-
line: { height: "calc(28px + var(--dsh-content-font-delta))" }
|
|
2090
|
-
},
|
|
2091
|
-
h3: {
|
|
2092
|
-
$: "700 calc(18px + var(--dsh-content-font-delta)) / calc(26px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
2093
|
-
font: {
|
|
2094
|
-
family: "var(--dsw-font-family)",
|
|
2095
|
-
size: "calc(18px + var(--dsh-content-font-delta))",
|
|
2096
|
-
style: "normal",
|
|
2097
|
-
weight: "700"
|
|
2098
|
-
},
|
|
2099
|
-
line: { height: "calc(26px + var(--dsh-content-font-delta))" }
|
|
2100
|
-
},
|
|
2101
|
-
h4: {
|
|
2102
|
-
$: "600 var(--dsh-content-font-size, 14px) / calc(24px + var(--dsh-content-font-delta)) var(--dsw-font-family)",
|
|
2103
|
-
font: {
|
|
2104
|
-
family: "var(--dsw-font-family)",
|
|
2105
|
-
size: "var(--dsh-content-font-size, 14px)",
|
|
2106
|
-
style: "normal",
|
|
2107
|
-
weight: "600"
|
|
2108
|
-
},
|
|
2109
|
-
line: { height: "calc(24px + var(--dsh-content-font-delta))" }
|
|
2110
|
-
},
|
|
2111
|
-
small: {
|
|
2112
|
-
$: "12px/20px var(--dsw-font-family)",
|
|
2113
|
-
font: {
|
|
2114
|
-
family: "var(--dsw-font-family)",
|
|
2115
|
-
size: "12px",
|
|
2116
|
-
style: "normal",
|
|
2117
|
-
weight: "400"
|
|
2118
|
-
},
|
|
2119
|
-
italic: {
|
|
2120
|
-
$: "italic 12px/20px var(--dsw-font-family)",
|
|
2121
|
-
font: {
|
|
2122
|
-
family: "var(--dsw-font-family)",
|
|
2123
|
-
size: "12px",
|
|
2124
|
-
style: "italic",
|
|
2125
|
-
weight: "400"
|
|
2126
|
-
},
|
|
2127
|
-
line: { height: "20px" }
|
|
2128
|
-
},
|
|
2129
|
-
line: { height: "20px" },
|
|
2130
|
-
strong: {
|
|
2131
|
-
$: "600 12px/20px var(--dsw-font-family)",
|
|
2132
|
-
font: {
|
|
2133
|
-
family: "var(--dsw-font-family)",
|
|
2134
|
-
size: "12px",
|
|
2135
|
-
style: "normal",
|
|
2136
|
-
weight: "600"
|
|
2137
|
-
},
|
|
2138
|
-
italic: {
|
|
2139
|
-
$: "italic 600 12px/20px var(--dsw-font-family)",
|
|
2140
|
-
font: {
|
|
2141
|
-
family: "var(--dsw-font-family)",
|
|
2142
|
-
size: "12px",
|
|
2143
|
-
style: "italic",
|
|
2144
|
-
weight: "600"
|
|
2145
|
-
},
|
|
2146
|
-
line: { height: "20px" }
|
|
2147
|
-
},
|
|
2148
|
-
line: { height: "20px" }
|
|
2149
|
-
}
|
|
2150
|
-
},
|
|
2151
|
-
table: {
|
|
2152
|
-
$: "var(--dsh-content-font-size-secondary, 13px)/calc(22px + var(--dsh-content-font-delta-secondary, 0px)) var(--dsw-font-family)",
|
|
2153
|
-
font: {
|
|
2154
|
-
family: "var(--dsw-font-family)",
|
|
2155
|
-
size: "var(--dsh-content-font-size-secondary, 13px)",
|
|
2156
|
-
style: "normal",
|
|
2157
|
-
weight: "400"
|
|
2158
|
-
},
|
|
2159
|
-
head: {
|
|
2160
|
-
$: "500 var(--dsh-content-font-size-secondary, 13px)/calc(22px + var(--dsh-content-font-delta-secondary, 0px)) var(--dsw-font-family)",
|
|
2161
|
-
font: {
|
|
2162
|
-
family: "var(--dsw-font-family)",
|
|
2163
|
-
size: "var(--dsh-content-font-size-secondary, 13px)",
|
|
2164
|
-
style: "normal",
|
|
2165
|
-
weight: "500"
|
|
2166
|
-
},
|
|
2167
|
-
line: { height: "calc(22px + var(--dsh-content-font-delta-secondary, 0px))" }
|
|
2168
|
-
},
|
|
2169
|
-
line: { height: "calc(22px + var(--dsh-content-font-delta-secondary, 0px))" }
|
|
2170
|
-
}
|
|
2171
|
-
},
|
|
2172
|
-
s: {
|
|
2173
|
-
"14": {
|
|
2174
|
-
$: "14px/22px var(--dsw-font-family)",
|
|
2175
|
-
font: {
|
|
2176
|
-
family: "var(--dsw-font-family)",
|
|
2177
|
-
size: "14px",
|
|
2178
|
-
style: "normal",
|
|
2179
|
-
weight: "400"
|
|
2180
|
-
},
|
|
2181
|
-
line: { height: "22px" }
|
|
2182
|
-
},
|
|
2183
|
-
strong: { "14": {
|
|
2184
|
-
$: "500 14px/22px var(--dsw-font-family)",
|
|
2185
|
-
font: {
|
|
2186
|
-
family: "var(--dsw-font-family)",
|
|
2187
|
-
size: "14px",
|
|
2188
|
-
style: "normal",
|
|
2189
|
-
weight: "500"
|
|
2190
|
-
},
|
|
2191
|
-
line: { height: "22px" }
|
|
2192
|
-
} }
|
|
2193
|
-
},
|
|
2194
|
-
xl: { "24": {
|
|
2195
|
-
$: "600 24px/32px var(--dsw-font-family)",
|
|
2196
|
-
font: {
|
|
2197
|
-
family: "var(--dsw-font-family)",
|
|
2198
|
-
size: "24px",
|
|
2199
|
-
style: "normal",
|
|
2200
|
-
weight: "600"
|
|
2201
|
-
},
|
|
2202
|
-
line: { height: "32px" }
|
|
2203
|
-
} },
|
|
2204
|
-
xs: {
|
|
2205
|
-
"13": {
|
|
2206
|
-
$: "13px/20px var(--dsw-font-family)",
|
|
2207
|
-
font: {
|
|
2208
|
-
family: "var(--dsw-font-family)",
|
|
2209
|
-
size: "13px",
|
|
2210
|
-
style: "normal",
|
|
2211
|
-
weight: "400"
|
|
2212
|
-
},
|
|
2213
|
-
line: { height: "20px" }
|
|
2214
|
-
},
|
|
2215
|
-
strong: { "13": {
|
|
2216
|
-
$: "500 13px/20px var(--dsw-font-family)",
|
|
2217
|
-
font: {
|
|
2218
|
-
family: "var(--dsw-font-family)",
|
|
2219
|
-
size: "13px",
|
|
2220
|
-
style: "normal",
|
|
2221
|
-
weight: "500"
|
|
2222
|
-
},
|
|
2223
|
-
line: { height: "20px" }
|
|
2224
|
-
} }
|
|
2225
|
-
},
|
|
2226
|
-
xxs: {
|
|
2227
|
-
"12": {
|
|
2228
|
-
$: "12px/18px var(--dsw-font-family)",
|
|
2229
|
-
font: {
|
|
2230
|
-
family: "var(--dsw-font-family)",
|
|
2231
|
-
size: "12px",
|
|
2232
|
-
style: "normal",
|
|
2233
|
-
weight: "400"
|
|
2234
|
-
},
|
|
2235
|
-
line: { height: "18px" }
|
|
2236
|
-
},
|
|
2237
|
-
strong: { "12": {
|
|
2238
|
-
$: "500 12px/18px var(--dsw-font-family)",
|
|
2239
|
-
font: {
|
|
2240
|
-
family: "var(--dsw-font-family)",
|
|
2241
|
-
size: "12px",
|
|
2242
|
-
style: "normal",
|
|
2243
|
-
weight: "500"
|
|
2244
|
-
},
|
|
2245
|
-
line: { height: "18px" }
|
|
2246
|
-
} }
|
|
2247
|
-
},
|
|
2248
|
-
xxxs: {
|
|
2249
|
-
"11": {
|
|
2250
|
-
$: "11px/14px var(--dsw-font-family)",
|
|
2251
|
-
font: {
|
|
2252
|
-
family: "var(--dsw-font-family)",
|
|
2253
|
-
size: "11px",
|
|
2254
|
-
style: "normal",
|
|
2255
|
-
weight: "400"
|
|
2256
|
-
},
|
|
2257
|
-
line: { height: "14px" }
|
|
2258
|
-
},
|
|
2259
|
-
strong: { "11": {
|
|
2260
|
-
$: "500 11px/14px var(--dsw-font-family)",
|
|
2261
|
-
font: {
|
|
2262
|
-
family: "var(--dsw-font-family)",
|
|
2263
|
-
size: "11px",
|
|
2264
|
-
style: "normal",
|
|
2265
|
-
weight: "500"
|
|
2266
|
-
},
|
|
2267
|
-
line: { height: "14px" }
|
|
2268
|
-
} }
|
|
2269
|
-
}
|
|
2270
|
-
},
|
|
2271
|
-
gradient: { onboarding: {
|
|
2272
|
-
blue: { stops: "#3964fe 18.75%, #398efe 51.78%, #6dccff 86.252%, #3964fe" },
|
|
2273
|
-
cyan: { stops: "#0293b4 21.154%, #2dc8eb 50.954%, #aff0ff 85.326%, #0293b4" },
|
|
2274
|
-
violet: { stops: "#2a2fb6 33.102%, #8b76f6 50.954%, #c5c0ff 85.326%, #2a2fb6" }
|
|
2275
|
-
} },
|
|
2276
|
-
linear: {
|
|
2277
|
-
gradient: { think: "linear-gradient(180deg, #fff 20.19%, rgba(255, 255, 255, 0) 100%)" },
|
|
2278
|
-
think: { select: "linear-gradient(180deg, #f5f6f7 20.19%, rgba(245, 246, 247, 0) 100%)" }
|
|
2279
|
-
},
|
|
2280
|
-
mask: { blur: "none" },
|
|
2281
|
-
menu: {
|
|
2282
|
-
backdrop: { filter: "blur(40px) saturate(150%)" },
|
|
2283
|
-
surface: { fill: "rgba(248, 249, 250, 0.58)" }
|
|
2284
|
-
},
|
|
2285
|
-
radius: {
|
|
2286
|
-
lg: "16px",
|
|
2287
|
-
md: "12px",
|
|
2288
|
-
panel: "28px",
|
|
2289
|
-
sm: "8px",
|
|
2290
|
-
xl: "20px",
|
|
2291
|
-
xs: "4px"
|
|
2292
|
-
},
|
|
2293
|
-
shadow: {
|
|
2294
|
-
lv1: {
|
|
2295
|
-
$: "0 2px 4px 0 rgba(0, 0, 0, 0.05)",
|
|
2296
|
-
blur: "0 4px 12px 0 rgba(0, 0, 0, 0.02)"
|
|
2297
|
-
},
|
|
2298
|
-
lv2: "0 4px 12px 0 rgba(0, 0, 0, 0.02), 0 2px 8px 0 rgba(0, 0, 0, 0.04)",
|
|
2299
|
-
lv3: "0 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 4px 0 rgba(0, 0, 0, 0.02), 0 12px 32px 0 rgba(0, 0, 0, 0.08)"
|
|
2300
|
-
},
|
|
2301
|
-
specific: {
|
|
2302
|
-
bubble: {
|
|
2303
|
-
$: "var(--dsw-static-deepseek-50)",
|
|
2304
|
-
highlight: "var(--dsw-static-deepseek-200)"
|
|
2305
|
-
},
|
|
2306
|
-
input: { major: "var(--dsw-static-neutral-bluish-00)" },
|
|
2307
|
-
login: { input: "var(--dsw-static-neutral-bluish-50)" },
|
|
2308
|
-
menu: "var(--dsw-menu-surface-fill)",
|
|
2309
|
-
selector: "var(--dsw-static-neutral-bluish-60)",
|
|
2310
|
-
sidebar: {
|
|
2311
|
-
fill: "var(--dsw-static-neutral-bluish-50)",
|
|
2312
|
-
nav: { item: {
|
|
2313
|
-
active: {
|
|
2314
|
-
$: "var(--dsw-static-neutral-bluish-100)",
|
|
2315
|
-
accent: "var(--dsw-static-deepseek-100)"
|
|
2316
|
-
},
|
|
2317
|
-
hover: "var(--dsw-static-neutral-bluish-75)"
|
|
2318
|
-
} }
|
|
2319
|
-
},
|
|
2320
|
-
tip: "var(--dsw-static-neutral-bluish-60)"
|
|
2321
|
-
},
|
|
2322
|
-
static: {
|
|
2323
|
-
amber: {
|
|
2324
|
-
"100": "rgb(254, 245, 231)",
|
|
2325
|
-
"400": "rgb(247, 173, 49)",
|
|
2326
|
-
"500": "rgb(245, 158, 11)",
|
|
2327
|
-
"600": "rgb(221, 134, 41)",
|
|
2328
|
-
"900": "rgb(39, 36, 31)"
|
|
2329
|
-
},
|
|
2330
|
-
blue: {
|
|
2331
|
-
"50": "rgb(239, 246, 255)",
|
|
2332
|
-
"75": "rgb(229, 240, 255)",
|
|
2333
|
-
"100": "rgb(219, 234, 254)",
|
|
2334
|
-
"300": "rgb(147, 197, 253)",
|
|
2335
|
-
"400": "rgb(96, 165, 250)",
|
|
2336
|
-
"450": "rgb(77, 147, 248)",
|
|
2337
|
-
"500": "rgb(59, 130, 246)",
|
|
2338
|
-
"600": "rgb(37, 99, 235)",
|
|
2339
|
-
"800": "rgb(30, 64, 175)",
|
|
2340
|
-
"900": "rgb(14, 48, 116)",
|
|
2341
|
-
"950": "rgb(23, 37, 84)",
|
|
2342
|
-
"50p": "rgb(234, 243, 255)"
|
|
2343
|
-
},
|
|
2344
|
-
deepseek: {
|
|
2345
|
-
"50": "rgb(237, 243, 254)",
|
|
2346
|
-
"100": "rgb(228, 237, 253)",
|
|
2347
|
-
"200": "rgb(211, 226, 255)",
|
|
2348
|
-
"300": "rgb(183, 200, 254)",
|
|
2349
|
-
"400": "rgb(122, 170, 255)",
|
|
2350
|
-
"450": "rgb(86, 134, 254)",
|
|
2351
|
-
"500": "rgb(65, 118, 230)",
|
|
2352
|
-
"600": "rgb(72, 104, 178)",
|
|
2353
|
-
"700": { delete: "rgb(47, 76, 143)" },
|
|
2354
|
-
"800": "rgb(52, 65, 91)",
|
|
2355
|
-
"900": "rgb(40, 49, 66)"
|
|
2356
|
-
},
|
|
2357
|
-
green: {
|
|
2358
|
-
"100": "rgb(230, 250, 237)",
|
|
2359
|
-
"400": "rgb(78, 209, 126)",
|
|
2360
|
-
"500": {
|
|
2361
|
-
$: "rgb(34, 197, 94)",
|
|
2362
|
-
a08: "rgb(34 197 94 / 8%)",
|
|
2363
|
-
a12: "rgb(34 197 94 / 12%)"
|
|
2364
|
-
},
|
|
2365
|
-
"900": "rgb(35, 60, 44)"
|
|
2366
|
-
},
|
|
2367
|
-
neutral: {
|
|
2368
|
-
"50": "rgb(250, 250, 250)",
|
|
2369
|
-
"100": "rgb(245, 245, 245)",
|
|
2370
|
-
"150": "rgb(237, 237, 237)",
|
|
2371
|
-
"200": "rgb(229, 229, 229)",
|
|
2372
|
-
"250": "rgb(220, 220, 220)",
|
|
2373
|
-
"300": "rgb(212, 212, 212)",
|
|
2374
|
-
"400": "rgb(162, 164, 166)",
|
|
2375
|
-
"500": "rgb(127, 130, 135)",
|
|
2376
|
-
"550": "rgb(101, 103, 107)",
|
|
2377
|
-
"600": "rgb(84, 85, 87)",
|
|
2378
|
-
"700": "rgb(60, 60, 61)",
|
|
2379
|
-
"800": "rgb(41, 41, 41)",
|
|
2380
|
-
"850": "rgb(33, 33, 35)",
|
|
2381
|
-
"900": "rgb(15, 15, 15)",
|
|
2382
|
-
"1000": "rgb(0, 0, 0)",
|
|
2383
|
-
"00": "rgb(255, 255, 255)",
|
|
2384
|
-
bluish: {
|
|
2385
|
-
"50": "rgb(249, 250, 251)",
|
|
2386
|
-
"60": "rgb(245, 246, 247)",
|
|
2387
|
-
"75": "rgb(241, 243, 245)",
|
|
2388
|
-
"100": "rgb(235, 238, 242)",
|
|
2389
|
-
"150": "rgb(233, 236, 242)",
|
|
2390
|
-
"200": "rgb(225, 229, 238)",
|
|
2391
|
-
"300": "rgb(207, 211, 214)",
|
|
2392
|
-
"400": "rgb(173, 178, 184)",
|
|
2393
|
-
"500": "rgb(151, 157, 166)",
|
|
2394
|
-
"600": "rgb(129, 133, 140)",
|
|
2395
|
-
"700": "rgb(97, 102, 107)",
|
|
2396
|
-
"750": "rgb(67, 69, 74)",
|
|
2397
|
-
"800": "rgb(53, 54, 56)",
|
|
2398
|
-
"850": "rgb(44, 44, 46)",
|
|
2399
|
-
"875": "rgb(35, 35, 36)",
|
|
2400
|
-
"900": "rgb(27, 27, 28)",
|
|
2401
|
-
"950": "rgb(21, 21, 23)",
|
|
2402
|
-
"1000": "rgb(15, 17, 21)",
|
|
2403
|
-
"00": "rgb(255, 255, 255)"
|
|
2404
|
-
}
|
|
2405
|
-
},
|
|
2406
|
-
red: {
|
|
2407
|
-
"50": "rgb(254, 242, 242)",
|
|
2408
|
-
"100": "rgb(254, 226, 226)",
|
|
2409
|
-
"400": {
|
|
2410
|
-
$: "rgb(242, 90, 90)",
|
|
2411
|
-
a12: "rgb(242 90 90 / 12%)"
|
|
2412
|
-
},
|
|
2413
|
-
"500": "rgb(239, 68, 68)",
|
|
2414
|
-
"600": {
|
|
2415
|
-
$: "rgb(236, 19, 19)",
|
|
2416
|
-
a08: "rgb(236 19 19 / 8%)"
|
|
2417
|
-
},
|
|
2418
|
-
"900": "rgb(87, 12, 12)"
|
|
2419
|
-
}
|
|
2420
|
-
}
|
|
1446
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/schema-form/schema-form.module.css.mjs
|
|
1447
|
+
const css$16 = ".B1Faoa_editorRoot{width:100%;color:var(--dsw-alias-label-primary);flex-direction:column;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,monospace;font-size:14px;line-height:22px;display:flex}.B1Faoa_lineRow{white-space:nowrap;align-items:flex-start;gap:6px;min-height:22px;padding-right:8px;display:flex}.B1Faoa_lineRow:hover{background:var(--dsw-alias-bg-layer-2)}.B1Faoa_lineRow[data-selected=true]{background:var(--dsw-alias-bg-layer-3)}.B1Faoa_lineRow[data-dirty=true]{box-shadow:inset 2px 0 0 var(--dsw-alias-brand-primary)}.B1Faoa_lineRow[data-overridden=true]{box-shadow:inset 2px 0 0 var(--dsw-elevation-stroke-color)}.B1Faoa_lineRow[data-dirty=true] [data-role=key],.B1Faoa_lineRow[data-overridden=true] [data-role=key]{color:var(--dsw-alias-brand-primary)}.B1Faoa_lineRow[data-invalid=true]{background:color-mix(in srgb, var(--dsw-alias-state-error-secondary) 12%, transparent);box-shadow:inset 2px 0 0 var(--dsw-alias-state-error-primary)}.B1Faoa_lineRow[data-invalid=true] [data-role=key]{color:var(--dsw-alias-state-error-primary)}.B1Faoa_lineRow:hover [data-role=actions]{opacity:1}.B1Faoa_lineBody{flex:1;align-items:center;gap:6px;min-width:0;min-height:22px;display:flex}.B1Faoa_lineNumber{text-align:right;width:32px;color:var(--dsw-alias-label-caption);user-select:none;cursor:pointer;flex:none;line-height:22px}.B1Faoa_lineFold{width:14px;height:22px;color:var(--dsw-alias-label-caption);cursor:pointer;background:0 0;border:0;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.B1Faoa_lineFold:hover{color:var(--dsw-alias-label-secondary)}.B1Faoa_lineFoldSpacer{flex:none;width:14px}.B1Faoa_lineKey{color:var(--dsw-alias-label-primary);flex:none}.B1Faoa_lineKey[data-index=true]{color:var(--dsw-alias-label-caption)}.B1Faoa_lineToken{color:var(--dsw-alias-label-caption);flex:none}.B1Faoa_lineValue{text-overflow:ellipsis;cursor:text;min-width:0;color:var(--dsw-alias-state-business-primary);display:block;overflow:hidden}.B1Faoa_lineValue[data-tone=number]{color:var(--dsw-alias-state-warn-primary)}.B1Faoa_lineValue[data-tone=boolean]{color:var(--dsw-alias-state-success-primary)}.B1Faoa_lineValue[data-tone=empty]{color:var(--dsw-alias-label-caption)}.B1Faoa_valueSlot{flex:0 auto;min-width:0;display:block;overflow:hidden}.B1Faoa_valueTrigger{min-width:0;font:inherit;text-align:left;cursor:pointer;color:var(--dsw-alias-label-caption);background:0 0;border:0;align-items:center;gap:2px;padding:0;display:inline-flex}.B1Faoa_valueTrigger:disabled{cursor:default}.B1Faoa_valueTrigger:focus-visible{outline:none}.B1Faoa_compactInput{flex:auto;min-width:0;display:inline-flex}.B1Faoa_compactInput>span{border-radius:4px;width:100%;height:22px;padding:0 6px}.B1Faoa_compactInput input{font-size:14px;line-height:22px}.B1Faoa_compactTextField{background:var(--dsw-alias-bg-layer-1);min-width:0;box-shadow:0 0 0 .5px var(--dsw-elevation-stroke-color);border:0;border-radius:4px;flex:auto;padding:0 6px;display:inline-flex}.B1Faoa_compactTextField:focus-within{--dsw-elevation-stroke-color:var(--dsw-alias-brand-primary)}.B1Faoa_compactTextField>textarea{resize:none;field-sizing:content;width:100%;min-height:20px;max-height:240px;color:var(--dsw-alias-label-primary);background:0 0;border:0;outline:none;flex:1;padding:0;font-family:inherit;font-size:14px;line-height:22px}.B1Faoa_lineComment{text-overflow:ellipsis;min-width:0;color:var(--dsw-alias-label-tertiary);flex:auto;font-family:inherit;font-size:12px;overflow:hidden}.B1Faoa_lineInvalid{text-overflow:ellipsis;min-width:0;color:var(--dsw-alias-state-error-primary);flex:0 auto;font-family:inherit;font-size:12px;overflow:hidden}.B1Faoa_lineActions{opacity:0;flex:none;align-items:center;gap:4px;display:inline-flex}.B1Faoa_lineActions>button{width:20px;height:20px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-radius:4px;justify-content:center;align-items:center;padding:0;display:inline-flex}.B1Faoa_lineActions>button:hover{background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary)}.B1Faoa_lineActions>button:disabled{cursor:not-allowed;color:var(--dsw-alias-label-dimmed)}.B1Faoa_hoverActions[data-editing=true]{opacity:1;gap:6px}.B1Faoa_hoverActions[data-editing=true]>button{box-shadow:0 0 0 .5px var(--dsw-elevation-stroke-color);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary)}.B1Faoa_hoverActions[data-editing=true]>button:first-of-type{color:var(--dsw-alias-state-success-primary)}.B1Faoa_addWrap{flex:auto;align-items:center;gap:6px;min-width:0;margin-left:6px;display:inline-flex;position:relative}.B1Faoa_addWrap[data-invalid=true] input{border-color:var(--dsw-alias-state-error-primary)}.B1Faoa_hint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:1.5}";
|
|
1448
|
+
const tagId$16 = "@morlay/dsh-client-ui-primitives/schema-form.module.css";
|
|
1449
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/dsh-client-ui-primitives/schema-form.module.css\"]") === null) {
|
|
1450
|
+
const tag = document.createElement("style");
|
|
1451
|
+
tag.dataset.plugin = "@morlay/dsh-client-ui-primitives";
|
|
1452
|
+
tag.dataset.pluginCss = tagId$16;
|
|
1453
|
+
tag.textContent = css$16;
|
|
1454
|
+
document.head.appendChild(tag);
|
|
1455
|
+
}
|
|
1456
|
+
var schema_form_module_css_default = {
|
|
1457
|
+
"compactTextField": "B1Faoa_compactTextField",
|
|
1458
|
+
"editorRoot": "B1Faoa_editorRoot",
|
|
1459
|
+
"lineRow": "B1Faoa_lineRow",
|
|
1460
|
+
"lineActions": "B1Faoa_lineActions",
|
|
1461
|
+
"lineInvalid": "B1Faoa_lineInvalid",
|
|
1462
|
+
"hint": "B1Faoa_hint",
|
|
1463
|
+
"lineKey": "B1Faoa_lineKey",
|
|
1464
|
+
"lineNumber": "B1Faoa_lineNumber",
|
|
1465
|
+
"lineToken": "B1Faoa_lineToken",
|
|
1466
|
+
"valueTrigger": "B1Faoa_valueTrigger",
|
|
1467
|
+
"lineFoldSpacer": "B1Faoa_lineFoldSpacer",
|
|
1468
|
+
"lineComment": "B1Faoa_lineComment",
|
|
1469
|
+
"compactInput": "B1Faoa_compactInput",
|
|
1470
|
+
"addWrap": "B1Faoa_addWrap",
|
|
1471
|
+
"lineFold": "B1Faoa_lineFold",
|
|
1472
|
+
"hoverActions": "B1Faoa_hoverActions",
|
|
1473
|
+
"valueSlot": "B1Faoa_valueSlot",
|
|
1474
|
+
"lineValue": "B1Faoa_lineValue",
|
|
1475
|
+
"lineBody": "B1Faoa_lineBody"
|
|
2421
1476
|
};
|
|
2422
1477
|
//#endregion
|
|
2423
|
-
//#region src/client/theme.ts
|
|
2424
|
-
const dsw = Token.vars(designTokens, { prefix: "dsw" });
|
|
2425
|
-
//#endregion
|
|
2426
|
-
//#region src/client/schema-form/styles.ts
|
|
2427
|
-
const MONO = "ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace";
|
|
2428
|
-
const ROW = "22px";
|
|
2429
|
-
const GAP = "6px";
|
|
2430
|
-
const ACTION = "20px";
|
|
2431
|
-
const ACTION_GAP = "4px";
|
|
2432
|
-
const FOLD = "14px";
|
|
2433
|
-
const NUMBER = "32px";
|
|
2434
|
-
const PAD = "8px";
|
|
2435
|
-
const HAIRLINE = dsw.elevation.stroke;
|
|
2436
|
-
const LINE = dsw.elevation.stroke.color;
|
|
2437
|
-
const EDGE = "2px";
|
|
2438
|
-
const ERROR_WASH = `color-mix(in srgb, ${String(dsw.alias.state.error.secondary)} 12%, transparent)`;
|
|
2439
|
-
const EditorRoot = styled("div")({
|
|
2440
|
-
display: "flex",
|
|
2441
|
-
flexDirection: "column",
|
|
2442
|
-
width: "100%",
|
|
2443
|
-
fontFamily: MONO,
|
|
2444
|
-
fontSize: "14px",
|
|
2445
|
-
lineHeight: ROW,
|
|
2446
|
-
color: dsw.alias.label.primary
|
|
2447
|
-
});
|
|
2448
|
-
const LineRow = styled("div")({
|
|
2449
|
-
display: "flex",
|
|
2450
|
-
alignItems: "flex-start",
|
|
2451
|
-
gap: GAP,
|
|
2452
|
-
minHeight: ROW,
|
|
2453
|
-
paddingRight: PAD,
|
|
2454
|
-
whiteSpace: "nowrap",
|
|
2455
|
-
"&:hover": { background: dsw.alias.bg.layer["2"] },
|
|
2456
|
-
"&[data-selected='true']": { background: dsw.alias.bg.layer["3"] },
|
|
2457
|
-
"&[data-dirty='true']": { boxShadow: `inset ${EDGE} 0 0 ${String(dsw.alias.brand.primary)}` },
|
|
2458
|
-
"&[data-overridden='true']": { boxShadow: `inset ${EDGE} 0 0 ${String(LINE)}` },
|
|
2459
|
-
"&[data-dirty='true'] [data-role='key']": { color: dsw.alias.brand.primary },
|
|
2460
|
-
"&[data-overridden='true'] [data-role='key']": { color: dsw.alias.brand.primary },
|
|
2461
|
-
"&[data-invalid='true']": {
|
|
2462
|
-
background: ERROR_WASH,
|
|
2463
|
-
boxShadow: `inset ${EDGE} 0 0 ${String(dsw.alias.state.error.primary)}`
|
|
2464
|
-
},
|
|
2465
|
-
"&[data-invalid='true'] [data-role='key']": { color: dsw.alias.state.error.primary },
|
|
2466
|
-
"&:hover [data-role='actions']": { opacity: 1 }
|
|
2467
|
-
});
|
|
2468
|
-
const LineBody = styled("div")({
|
|
2469
|
-
display: "flex",
|
|
2470
|
-
alignItems: "center",
|
|
2471
|
-
gap: GAP,
|
|
2472
|
-
flex: 1,
|
|
2473
|
-
minWidth: 0,
|
|
2474
|
-
minHeight: ROW
|
|
2475
|
-
});
|
|
2476
|
-
const LineNumber = styled("span")({
|
|
2477
|
-
flex: "none",
|
|
2478
|
-
width: NUMBER,
|
|
2479
|
-
lineHeight: ROW,
|
|
2480
|
-
textAlign: "right",
|
|
2481
|
-
color: dsw.alias.label.caption,
|
|
2482
|
-
userSelect: "none",
|
|
2483
|
-
cursor: "pointer"
|
|
2484
|
-
});
|
|
2485
|
-
const LineFold = styled("button")({
|
|
2486
|
-
display: "inline-flex",
|
|
2487
|
-
alignItems: "center",
|
|
2488
|
-
justifyContent: "center",
|
|
2489
|
-
flex: "none",
|
|
2490
|
-
width: FOLD,
|
|
2491
|
-
height: ROW,
|
|
2492
|
-
padding: 0,
|
|
2493
|
-
border: 0,
|
|
2494
|
-
background: "none",
|
|
2495
|
-
color: dsw.alias.label.caption,
|
|
2496
|
-
cursor: "pointer",
|
|
2497
|
-
"&:hover": { color: dsw.alias.label.secondary }
|
|
2498
|
-
});
|
|
2499
|
-
const LineFoldSpacer = styled("span")({
|
|
2500
|
-
flex: "none",
|
|
2501
|
-
width: FOLD
|
|
2502
|
-
});
|
|
2503
|
-
const LineKey = styled("span")({
|
|
2504
|
-
flex: "none",
|
|
2505
|
-
color: dsw.alias.label.primary,
|
|
2506
|
-
"&[data-index='true']": { color: dsw.alias.label.caption }
|
|
2507
|
-
});
|
|
2508
|
-
const LineToken = styled("span")({
|
|
2509
|
-
flex: "none",
|
|
2510
|
-
color: dsw.alias.label.caption
|
|
2511
|
-
});
|
|
2512
|
-
const LineValue = styled("span")({
|
|
2513
|
-
display: "block",
|
|
2514
|
-
minWidth: 0,
|
|
2515
|
-
overflow: "hidden",
|
|
2516
|
-
textOverflow: "ellipsis",
|
|
2517
|
-
cursor: "text",
|
|
2518
|
-
color: dsw.alias.state.business.primary,
|
|
2519
|
-
"&[data-tone='number']": { color: dsw.alias.state.warn.primary },
|
|
2520
|
-
"&[data-tone='boolean']": { color: dsw.alias.state.success.primary },
|
|
2521
|
-
"&[data-tone='empty']": { color: dsw.alias.label.caption }
|
|
2522
|
-
});
|
|
2523
|
-
const ValueSlot = styled("span")({
|
|
2524
|
-
display: "block",
|
|
2525
|
-
flex: "0 1 auto",
|
|
2526
|
-
minWidth: 0,
|
|
2527
|
-
overflow: "hidden"
|
|
2528
|
-
});
|
|
2529
|
-
const ValueTrigger = styled("button")({
|
|
2530
|
-
display: "inline-flex",
|
|
2531
|
-
alignItems: "center",
|
|
2532
|
-
gap: "2px",
|
|
2533
|
-
minWidth: 0,
|
|
2534
|
-
padding: 0,
|
|
2535
|
-
border: 0,
|
|
2536
|
-
background: "none",
|
|
2537
|
-
font: "inherit",
|
|
2538
|
-
textAlign: "left",
|
|
2539
|
-
cursor: "pointer",
|
|
2540
|
-
color: dsw.alias.label.caption,
|
|
2541
|
-
"&:disabled": { cursor: "default" },
|
|
2542
|
-
"&:focus-visible": { outline: "none" }
|
|
2543
|
-
});
|
|
2544
|
-
const CompactInput = styled("span")({
|
|
2545
|
-
display: "inline-flex",
|
|
2546
|
-
flex: "1 1 auto",
|
|
2547
|
-
minWidth: 0,
|
|
2548
|
-
"& > span": {
|
|
2549
|
-
width: "100%",
|
|
2550
|
-
height: ROW,
|
|
2551
|
-
padding: "0 6px",
|
|
2552
|
-
borderRadius: "4px"
|
|
2553
|
-
},
|
|
2554
|
-
"& input": {
|
|
2555
|
-
fontSize: "14px",
|
|
2556
|
-
lineHeight: ROW
|
|
2557
|
-
}
|
|
2558
|
-
});
|
|
2559
|
-
const CompactTextField = styled("span")({
|
|
2560
|
-
display: "inline-flex",
|
|
2561
|
-
flex: "1 1 auto",
|
|
2562
|
-
minWidth: 0,
|
|
2563
|
-
padding: "0 6px",
|
|
2564
|
-
borderRadius: "4px",
|
|
2565
|
-
background: dsw.alias.bg.layer["1"],
|
|
2566
|
-
border: 0,
|
|
2567
|
-
boxShadow: HAIRLINE,
|
|
2568
|
-
"&:focus-within": { "--dsw-elevation-stroke-color": dsw.alias.brand.primary },
|
|
2569
|
-
"& > textarea": {
|
|
2570
|
-
flex: 1,
|
|
2571
|
-
width: "100%",
|
|
2572
|
-
minHeight: ACTION,
|
|
2573
|
-
maxHeight: "240px",
|
|
2574
|
-
padding: 0,
|
|
2575
|
-
border: 0,
|
|
2576
|
-
outline: "none",
|
|
2577
|
-
background: "transparent",
|
|
2578
|
-
resize: "none",
|
|
2579
|
-
fieldSizing: "content",
|
|
2580
|
-
fontFamily: "inherit",
|
|
2581
|
-
fontSize: "14px",
|
|
2582
|
-
lineHeight: ROW,
|
|
2583
|
-
color: dsw.alias.label.primary
|
|
2584
|
-
}
|
|
2585
|
-
});
|
|
2586
|
-
const LineComment = styled("span")({
|
|
2587
|
-
flex: "1 1 auto",
|
|
2588
|
-
minWidth: 0,
|
|
2589
|
-
overflow: "hidden",
|
|
2590
|
-
textOverflow: "ellipsis",
|
|
2591
|
-
color: dsw.alias.label.tertiary,
|
|
2592
|
-
fontFamily: "inherit",
|
|
2593
|
-
fontSize: "12px"
|
|
2594
|
-
});
|
|
2595
|
-
const LineInvalid = styled("span")({
|
|
2596
|
-
flex: "0 1 auto",
|
|
2597
|
-
minWidth: 0,
|
|
2598
|
-
overflow: "hidden",
|
|
2599
|
-
textOverflow: "ellipsis",
|
|
2600
|
-
color: dsw.alias.state.error.primary,
|
|
2601
|
-
fontFamily: "inherit",
|
|
2602
|
-
fontSize: "12px"
|
|
2603
|
-
});
|
|
2604
|
-
const HoverActions = styled(styled("span")({
|
|
2605
|
-
display: "inline-flex",
|
|
2606
|
-
alignItems: "center",
|
|
2607
|
-
gap: ACTION_GAP,
|
|
2608
|
-
flex: "none",
|
|
2609
|
-
opacity: 0,
|
|
2610
|
-
"& > button": {
|
|
2611
|
-
display: "inline-flex",
|
|
2612
|
-
alignItems: "center",
|
|
2613
|
-
justifyContent: "center",
|
|
2614
|
-
width: ACTION,
|
|
2615
|
-
height: ACTION,
|
|
2616
|
-
padding: 0,
|
|
2617
|
-
border: 0,
|
|
2618
|
-
borderRadius: "4px",
|
|
2619
|
-
background: "none",
|
|
2620
|
-
color: dsw.alias.label.secondary,
|
|
2621
|
-
cursor: "pointer",
|
|
2622
|
-
"&:hover": {
|
|
2623
|
-
background: dsw.alias.bg.layer["3"],
|
|
2624
|
-
color: dsw.alias.label.primary
|
|
2625
|
-
},
|
|
2626
|
-
"&:disabled": {
|
|
2627
|
-
cursor: "not-allowed",
|
|
2628
|
-
color: dsw.alias.label.dimmed
|
|
2629
|
-
}
|
|
2630
|
-
}
|
|
2631
|
-
}))({ "&[data-editing='true']": {
|
|
2632
|
-
opacity: 1,
|
|
2633
|
-
gap: GAP,
|
|
2634
|
-
"& > button": {
|
|
2635
|
-
boxShadow: HAIRLINE,
|
|
2636
|
-
background: dsw.alias.bg.layer["1"],
|
|
2637
|
-
color: dsw.alias.label.primary,
|
|
2638
|
-
"&:first-of-type": { color: dsw.alias.state.success.primary }
|
|
2639
|
-
}
|
|
2640
|
-
} });
|
|
2641
|
-
const AddWrap = styled("span")({
|
|
2642
|
-
position: "relative",
|
|
2643
|
-
display: "inline-flex",
|
|
2644
|
-
alignItems: "center",
|
|
2645
|
-
gap: GAP,
|
|
2646
|
-
flex: "1 1 auto",
|
|
2647
|
-
minWidth: 0,
|
|
2648
|
-
marginLeft: GAP,
|
|
2649
|
-
"&[data-invalid='true'] input": { borderColor: dsw.alias.state.error.primary }
|
|
2650
|
-
});
|
|
2651
|
-
const Hint$1 = styled("p")({
|
|
2652
|
-
margin: 0,
|
|
2653
|
-
fontSize: "12px",
|
|
2654
|
-
lineHeight: 1.5,
|
|
2655
|
-
color: dsw.alias.label.tertiary
|
|
2656
|
-
});
|
|
2657
|
-
//#endregion
|
|
2658
1478
|
//#region src/client/schema-form/TruncatedTooltip.tsx
|
|
2659
1479
|
function TruncatedTooltip({ label, children }) {
|
|
2660
1480
|
const node = useRef(null);
|
|
@@ -2711,7 +1531,8 @@ function InlineValue({ owner }) {
|
|
|
2711
1531
|
owner,
|
|
2712
1532
|
options: owner.options
|
|
2713
1533
|
});
|
|
2714
|
-
if (owner.node.meta.secret) return /* @__PURE__ */ jsx(
|
|
1534
|
+
if (owner.node.meta.secret) return /* @__PURE__ */ jsx("span", {
|
|
1535
|
+
className: schema_form_module_css_default.lineValue,
|
|
2715
1536
|
"data-tone": "empty",
|
|
2716
1537
|
title: owner.hint,
|
|
2717
1538
|
children: owner.secretConfigured ? "••••••" : ""
|
|
@@ -2719,7 +1540,8 @@ function InlineValue({ owner }) {
|
|
|
2719
1540
|
const text = tokenText(owner.value);
|
|
2720
1541
|
return /* @__PURE__ */ jsx(TruncatedTooltip, {
|
|
2721
1542
|
label: text,
|
|
2722
|
-
children: /* @__PURE__ */ jsx(
|
|
1543
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1544
|
+
className: schema_form_module_css_default.lineValue,
|
|
2723
1545
|
"data-tone": owner.node.readOnly === null ? tokenTone(owner.value) : "empty",
|
|
2724
1546
|
children: text
|
|
2725
1547
|
})
|
|
@@ -2749,14 +1571,16 @@ function OptionSelect({ owner, options }) {
|
|
|
2749
1571
|
onClose: () => {
|
|
2750
1572
|
setOpen(false);
|
|
2751
1573
|
},
|
|
2752
|
-
anchor: /* @__PURE__ */ jsxs(
|
|
1574
|
+
anchor: /* @__PURE__ */ jsxs("button", {
|
|
1575
|
+
className: schema_form_module_css_default.valueTrigger,
|
|
2753
1576
|
type: "button",
|
|
2754
1577
|
disabled: owner.disabled,
|
|
2755
1578
|
"aria-label": owner.label,
|
|
2756
1579
|
onClick: () => {
|
|
2757
1580
|
setOpen(true);
|
|
2758
1581
|
},
|
|
2759
|
-
children: [/* @__PURE__ */ jsx(
|
|
1582
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1583
|
+
className: schema_form_module_css_default.lineValue,
|
|
2760
1584
|
"data-tone": current === void 0 ? tokenTone(owner.value) : tokenTone(current.value),
|
|
2761
1585
|
children: label
|
|
2762
1586
|
}), /* @__PURE__ */ jsx(IconChevronDownOutlineRegular, { size: 14 })]
|
|
@@ -2885,6 +1709,11 @@ function parseFor(node, t) {
|
|
|
2885
1709
|
}
|
|
2886
1710
|
}
|
|
2887
1711
|
//#endregion
|
|
1712
|
+
//#region src/client/controls/classes.ts
|
|
1713
|
+
function classes(...names) {
|
|
1714
|
+
return names.filter((name) => typeof name === "string" && name !== "").join(" ");
|
|
1715
|
+
}
|
|
1716
|
+
//#endregion
|
|
2888
1717
|
//#region src/client/schema-form/Editor.tsx
|
|
2889
1718
|
function Editor(props) {
|
|
2890
1719
|
const { ns, state, face, t, resolveText, renderField } = props;
|
|
@@ -2900,9 +1729,10 @@ function Editor(props) {
|
|
|
2900
1729
|
t
|
|
2901
1730
|
]);
|
|
2902
1731
|
const disabled = !state.writable || !state.available;
|
|
2903
|
-
return /* @__PURE__ */ jsx(
|
|
1732
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1733
|
+
className: schema_form_module_css_default.editorRoot,
|
|
2904
1734
|
"data-editor": "schema-form",
|
|
2905
|
-
children: lines.map((line, index) => /* @__PURE__ */ jsx(Row, {
|
|
1735
|
+
children: lines.map((line, index) => /* @__PURE__ */ jsx(Row$1, {
|
|
2906
1736
|
line,
|
|
2907
1737
|
n: index + 1,
|
|
2908
1738
|
ns,
|
|
@@ -2963,20 +1793,26 @@ function useFold(state, toggled, setToggled) {
|
|
|
2963
1793
|
toggled
|
|
2964
1794
|
]);
|
|
2965
1795
|
}
|
|
2966
|
-
function Row({ line, n, ns, state, face, fold, t, resolveText, disabled, editing, selected, dismissed, onEdit, onAdded, onDismiss, onSelect, renderField }) {
|
|
1796
|
+
function Row$1({ line, n, ns, state, face, fold, t, resolveText, disabled, editing, selected, dismissed, onEdit, onAdded, onDismiss, onSelect, renderField }) {
|
|
2967
1797
|
const key = fieldKey(line.path);
|
|
2968
1798
|
const indent = { paddingLeft: `${String(line.depth * 14)}px` };
|
|
2969
|
-
const body = line.kind === "comment" ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(
|
|
1799
|
+
const body = line.kind === "comment" ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
1800
|
+
className: schema_form_module_css_default.lineFoldSpacer,
|
|
1801
|
+
"data-role": "fold"
|
|
1802
|
+
}), /* @__PURE__ */ jsx(TruncatedTooltip, {
|
|
2970
1803
|
label: line.text,
|
|
2971
|
-
children: line.invalid ? /* @__PURE__ */ jsx(
|
|
1804
|
+
children: line.invalid ? /* @__PURE__ */ jsx("span", {
|
|
1805
|
+
className: schema_form_module_css_default.lineInvalid,
|
|
2972
1806
|
"data-role": "comment",
|
|
2973
1807
|
children: `// ${line.text}`
|
|
2974
|
-
}) : /* @__PURE__ */ jsx(
|
|
1808
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
1809
|
+
className: schema_form_module_css_default.lineComment,
|
|
2975
1810
|
"data-role": "comment",
|
|
2976
1811
|
children: `// ${line.text}`
|
|
2977
1812
|
})
|
|
2978
1813
|
})] }) : line.kind === "open" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2979
|
-
/* @__PURE__ */ jsx(
|
|
1814
|
+
/* @__PURE__ */ jsx("button", {
|
|
1815
|
+
className: schema_form_module_css_default.lineFold,
|
|
2980
1816
|
"data-role": "fold",
|
|
2981
1817
|
type: "button",
|
|
2982
1818
|
"aria-expanded": !line.collapsed,
|
|
@@ -2992,7 +1828,10 @@ function Row({ line, n, ns, state, face, fold, t, resolveText, disabled, editing
|
|
|
2992
1828
|
t,
|
|
2993
1829
|
disabled
|
|
2994
1830
|
}),
|
|
2995
|
-
/* @__PURE__ */ jsx(
|
|
1831
|
+
/* @__PURE__ */ jsx("span", {
|
|
1832
|
+
className: schema_form_module_css_default.lineToken,
|
|
1833
|
+
children: line.shape === "object" ? line.collapsed ? "{…}" : "{" : line.collapsed ? "[…]" : "["
|
|
1834
|
+
}),
|
|
2996
1835
|
/* @__PURE__ */ jsx(VariantSelect, {
|
|
2997
1836
|
control: line.variants,
|
|
2998
1837
|
path: line.path,
|
|
@@ -3001,8 +1840,14 @@ function Row({ line, n, ns, state, face, fold, t, resolveText, disabled, editing
|
|
|
3001
1840
|
t
|
|
3002
1841
|
})
|
|
3003
1842
|
] }) : line.kind === "close" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3004
|
-
/* @__PURE__ */ jsx(
|
|
3005
|
-
|
|
1843
|
+
/* @__PURE__ */ jsx("span", {
|
|
1844
|
+
className: schema_form_module_css_default.lineFoldSpacer,
|
|
1845
|
+
"data-role": "fold"
|
|
1846
|
+
}),
|
|
1847
|
+
/* @__PURE__ */ jsx("span", {
|
|
1848
|
+
className: schema_form_module_css_default.lineToken,
|
|
1849
|
+
children: line.shape === "object" ? "}" : "]"
|
|
1850
|
+
}),
|
|
3006
1851
|
/* @__PURE__ */ jsx(AddLine, {
|
|
3007
1852
|
line,
|
|
3008
1853
|
state,
|
|
@@ -3025,20 +1870,23 @@ function Row({ line, n, ns, state, face, fold, t, resolveText, disabled, editing
|
|
|
3025
1870
|
onDismiss,
|
|
3026
1871
|
renderField
|
|
3027
1872
|
});
|
|
3028
|
-
return /* @__PURE__ */ jsxs(
|
|
1873
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1874
|
+
className: schema_form_module_css_default.lineRow,
|
|
3029
1875
|
"data-line": line.kind,
|
|
3030
1876
|
"data-field-path": line.path.join("."),
|
|
3031
1877
|
"data-selected": selected === key ? "true" : void 0,
|
|
3032
1878
|
"data-dirty": line.kind === "field" && line.field.staged ? "true" : void 0,
|
|
3033
1879
|
"data-overridden": line.kind === "field" && line.field.overridden && !line.field.staged ? "true" : void 0,
|
|
3034
1880
|
"data-invalid": line.kind === "field" && (line.field.invalid !== void 0 || state.invalidAt.has(key)) ? "true" : void 0,
|
|
3035
|
-
children: [/* @__PURE__ */ jsx(
|
|
1881
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1882
|
+
className: schema_form_module_css_default.lineNumber,
|
|
3036
1883
|
"data-role": "number",
|
|
3037
1884
|
onClick: () => {
|
|
3038
1885
|
onSelect(line.path);
|
|
3039
1886
|
},
|
|
3040
1887
|
children: n
|
|
3041
|
-
}), /* @__PURE__ */ jsx(
|
|
1888
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1889
|
+
className: schema_form_module_css_default.lineBody,
|
|
3042
1890
|
"data-role": "body",
|
|
3043
1891
|
style: indent,
|
|
3044
1892
|
children: body
|
|
@@ -3083,49 +1931,63 @@ function FieldLine({ line, ns, state, face, t, disabled, editing, dismissed, onE
|
|
|
3083
1931
|
const text = line.field.text ?? valueText(line.field.value);
|
|
3084
1932
|
const multiline = isMultiline(line.field.value) || /[\r\n]/.test(text);
|
|
3085
1933
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3086
|
-
/* @__PURE__ */ jsx(
|
|
3087
|
-
|
|
1934
|
+
/* @__PURE__ */ jsx("span", {
|
|
1935
|
+
className: schema_form_module_css_default.lineFoldSpacer,
|
|
1936
|
+
"data-role": "fold"
|
|
1937
|
+
}),
|
|
1938
|
+
/* @__PURE__ */ jsx("span", {
|
|
1939
|
+
className: schema_form_module_css_default.lineKey,
|
|
3088
1940
|
"data-role": "key",
|
|
3089
1941
|
"data-index": member?.index === void 0 ? void 0 : "true",
|
|
3090
1942
|
title: member?.key ?? line.node.key,
|
|
3091
1943
|
children: member?.key ?? line.node.key
|
|
3092
1944
|
}),
|
|
3093
|
-
/* @__PURE__ */ jsx(
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
1945
|
+
/* @__PURE__ */ jsx("span", {
|
|
1946
|
+
className: schema_form_module_css_default.lineToken,
|
|
1947
|
+
children: member?.index === void 0 ? ": " : " "
|
|
1948
|
+
}),
|
|
1949
|
+
isEditing ? multiline ? /* @__PURE__ */ jsx("span", {
|
|
1950
|
+
className: schema_form_module_css_default.compactTextField,
|
|
1951
|
+
children: /* @__PURE__ */ jsx("textarea", {
|
|
1952
|
+
autoFocus: !missing,
|
|
1953
|
+
rows: 1,
|
|
1954
|
+
"aria-label": owner.label,
|
|
1955
|
+
value: text,
|
|
1956
|
+
onChange: (event) => {
|
|
1957
|
+
owner.onEditText(event.target.value);
|
|
1958
|
+
},
|
|
1959
|
+
onKeyDown: (event) => {
|
|
1960
|
+
if (event.key === "Escape") {
|
|
1961
|
+
face.revert(line.path);
|
|
1962
|
+
onEdit(void 0);
|
|
1963
|
+
}
|
|
3106
1964
|
}
|
|
3107
|
-
}
|
|
3108
|
-
})
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
1965
|
+
})
|
|
1966
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
1967
|
+
className: schema_form_module_css_default.compactInput,
|
|
1968
|
+
children: /* @__PURE__ */ jsx(Input, {
|
|
1969
|
+
autoFocus: !missing,
|
|
1970
|
+
type: "text",
|
|
1971
|
+
"aria-label": owner.label,
|
|
1972
|
+
placeholder: missing ? t("empty") : "",
|
|
1973
|
+
value: text,
|
|
1974
|
+
onBlur: () => {
|
|
1975
|
+
if (!missing) onEdit(void 0);
|
|
1976
|
+
},
|
|
1977
|
+
onChange: (event) => {
|
|
1978
|
+
owner.onEditText(event.target.value);
|
|
1979
|
+
},
|
|
1980
|
+
onKeyDown: (event) => {
|
|
1981
|
+
if (event.key === "Enter" && !missing) onEdit(void 0);
|
|
1982
|
+
if (event.key === "Escape") {
|
|
1983
|
+
face.revert(line.path);
|
|
1984
|
+
onEdit(void 0);
|
|
1985
|
+
}
|
|
3125
1986
|
}
|
|
3126
|
-
}
|
|
3127
|
-
})
|
|
3128
|
-
isEditing || line.variantsStandIn ? null : /* @__PURE__ */ jsx(
|
|
1987
|
+
})
|
|
1988
|
+
}) : null,
|
|
1989
|
+
isEditing || line.variantsStandIn ? null : /* @__PURE__ */ jsx("span", {
|
|
1990
|
+
className: schema_form_module_css_default.valueSlot,
|
|
3129
1991
|
"data-role": "value",
|
|
3130
1992
|
onClick: () => {
|
|
3131
1993
|
if (editable) onEdit(key);
|
|
@@ -3139,7 +2001,8 @@ function FieldLine({ line, ns, state, face, t, disabled, editing, dismissed, onE
|
|
|
3139
2001
|
disabled,
|
|
3140
2002
|
t
|
|
3141
2003
|
}),
|
|
3142
|
-
isEditing ? /* @__PURE__ */ jsxs(
|
|
2004
|
+
isEditing ? /* @__PURE__ */ jsxs("span", {
|
|
2005
|
+
className: classes(schema_form_module_css_default.lineActions, schema_form_module_css_default.hoverActions),
|
|
3143
2006
|
"data-role": "actions",
|
|
3144
2007
|
"data-editing": "true",
|
|
3145
2008
|
children: [/* @__PURE__ */ jsx("button", {
|
|
@@ -3162,7 +2025,8 @@ function FieldLine({ line, ns, state, face, t, disabled, editing, dismissed, onE
|
|
|
3162
2025
|
children: /* @__PURE__ */ jsx(IconCloseOutlineRegular, { size: 14 })
|
|
3163
2026
|
})]
|
|
3164
2027
|
}) : null,
|
|
3165
|
-
/* @__PURE__ */ jsxs(
|
|
2028
|
+
/* @__PURE__ */ jsxs("span", {
|
|
2029
|
+
className: classes(schema_form_module_css_default.lineActions, schema_form_module_css_default.hoverActions),
|
|
3166
2030
|
"data-role": "actions",
|
|
3167
2031
|
children: [
|
|
3168
2032
|
line.field.staged && !disabled ? /* @__PURE__ */ jsx("button", {
|
|
@@ -3228,7 +2092,8 @@ function VariantSelect({ control, path, face, disabled, t }) {
|
|
|
3228
2092
|
onClose: () => {
|
|
3229
2093
|
setOpen(false);
|
|
3230
2094
|
},
|
|
3231
|
-
anchor: /* @__PURE__ */ jsxs(
|
|
2095
|
+
anchor: /* @__PURE__ */ jsxs("button", {
|
|
2096
|
+
className: schema_form_module_css_default.valueTrigger,
|
|
3232
2097
|
type: "button",
|
|
3233
2098
|
"data-role": "variant",
|
|
3234
2099
|
disabled,
|
|
@@ -3236,7 +2101,8 @@ function VariantSelect({ control, path, face, disabled, t }) {
|
|
|
3236
2101
|
onClick: () => {
|
|
3237
2102
|
setOpen(true);
|
|
3238
2103
|
},
|
|
3239
|
-
children: [/* @__PURE__ */ jsx(
|
|
2104
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2105
|
+
className: schema_form_module_css_default.lineValue,
|
|
3240
2106
|
"data-tone": "empty",
|
|
3241
2107
|
children: current?.label ?? ""
|
|
3242
2108
|
}), /* @__PURE__ */ jsx(IconChevronDownOutlineRegular, { size: 14 })]
|
|
@@ -3249,14 +2115,19 @@ function LinePrefix({ line, face, t, disabled }) {
|
|
|
3249
2115
|
if (key === "") return null;
|
|
3250
2116
|
const indexed = member !== void 0 && member.index !== void 0;
|
|
3251
2117
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3252
|
-
/* @__PURE__ */ jsx(
|
|
2118
|
+
/* @__PURE__ */ jsx("span", {
|
|
2119
|
+
className: schema_form_module_css_default.lineKey,
|
|
3253
2120
|
"data-role": "key",
|
|
3254
2121
|
"data-index": indexed ? "true" : void 0,
|
|
3255
2122
|
title: key,
|
|
3256
2123
|
children: key
|
|
3257
2124
|
}),
|
|
3258
|
-
/* @__PURE__ */ jsx(
|
|
3259
|
-
|
|
2125
|
+
/* @__PURE__ */ jsx("span", {
|
|
2126
|
+
className: schema_form_module_css_default.lineToken,
|
|
2127
|
+
children: indexed ? " " : ": "
|
|
2128
|
+
}),
|
|
2129
|
+
member === void 0 ? null : /* @__PURE__ */ jsx("span", {
|
|
2130
|
+
className: classes(schema_form_module_css_default.lineActions, schema_form_module_css_default.hoverActions),
|
|
3260
2131
|
"data-role": "actions",
|
|
3261
2132
|
children: /* @__PURE__ */ jsx(RemoveLineButton, {
|
|
3262
2133
|
member,
|
|
@@ -3319,7 +2190,8 @@ function AddLine({ line, state, face, t, resolveText, disabled, onAdded }) {
|
|
|
3319
2190
|
setText("");
|
|
3320
2191
|
setOpen(false);
|
|
3321
2192
|
};
|
|
3322
|
-
return /* @__PURE__ */ jsxs(
|
|
2193
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
2194
|
+
className: schema_form_module_css_default.addWrap,
|
|
3323
2195
|
"data-add": spec.kind,
|
|
3324
2196
|
"data-invalid": invalid ? "true" : void 0,
|
|
3325
2197
|
children: [
|
|
@@ -3339,35 +2211,44 @@ function AddLine({ line, state, face, t, resolveText, disabled, onAdded }) {
|
|
|
3339
2211
|
onClose: () => {
|
|
3340
2212
|
setOpen(false);
|
|
3341
2213
|
},
|
|
3342
|
-
anchor: /* @__PURE__ */ jsx(
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
2214
|
+
anchor: /* @__PURE__ */ jsx("span", {
|
|
2215
|
+
className: schema_form_module_css_default.compactInput,
|
|
2216
|
+
children: /* @__PURE__ */ jsx(Input, {
|
|
2217
|
+
value: text,
|
|
2218
|
+
placeholder: label,
|
|
2219
|
+
"aria-label": label,
|
|
2220
|
+
disabled,
|
|
2221
|
+
onFocus: () => {
|
|
2222
|
+
setOpen(true);
|
|
2223
|
+
},
|
|
2224
|
+
onChange: (event) => {
|
|
2225
|
+
setText(event.target.value);
|
|
2226
|
+
setInvalid(false);
|
|
2227
|
+
setOpen(true);
|
|
2228
|
+
},
|
|
2229
|
+
onKeyDown: (event) => {
|
|
2230
|
+
if (event.key === "Enter") {
|
|
2231
|
+
event.preventDefault();
|
|
2232
|
+
commit(matched.length === 1 && spec.kind === "prop" ? matched[0]?.key : void 0);
|
|
2233
|
+
}
|
|
2234
|
+
if (event.key === "Escape") {
|
|
2235
|
+
setText("");
|
|
2236
|
+
setOpen(false);
|
|
2237
|
+
}
|
|
3363
2238
|
}
|
|
3364
|
-
}
|
|
3365
|
-
})
|
|
2239
|
+
})
|
|
2240
|
+
})
|
|
3366
2241
|
}),
|
|
3367
|
-
invalid ? /* @__PURE__ */ jsx(
|
|
2242
|
+
invalid ? /* @__PURE__ */ jsx("span", {
|
|
2243
|
+
className: schema_form_module_css_default.lineInvalid,
|
|
2244
|
+
children: t("unknownProperty")
|
|
2245
|
+
}) : null,
|
|
3368
2246
|
!invalid && matched.length === 1 && matched[0]?.description !== void 0 ? /* @__PURE__ */ jsx(TruncatedTooltip, {
|
|
3369
2247
|
label: resolveText(matched[0].description),
|
|
3370
|
-
children: /* @__PURE__ */ jsx(
|
|
2248
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
2249
|
+
className: schema_form_module_css_default.lineComment,
|
|
2250
|
+
children: resolveText(matched[0].description)
|
|
2251
|
+
})
|
|
3371
2252
|
}) : null
|
|
3372
2253
|
]
|
|
3373
2254
|
});
|
|
@@ -3385,11 +2266,12 @@ function SchemaForm(props) {
|
|
|
3385
2266
|
save: t("save"),
|
|
3386
2267
|
saving: t("saving")
|
|
3387
2268
|
};
|
|
3388
|
-
if (!state.configured) return /* @__PURE__ */ jsx(
|
|
2269
|
+
if (!state.configured) return /* @__PURE__ */ jsx("p", {
|
|
2270
|
+
className: schema_form_module_css_default.hint,
|
|
3389
2271
|
role: "status",
|
|
3390
2272
|
children: t("noSchema")
|
|
3391
2273
|
});
|
|
3392
|
-
return /* @__PURE__ */ jsxs(SettingsForm
|
|
2274
|
+
return /* @__PURE__ */ jsxs(SettingsForm, {
|
|
3393
2275
|
labels,
|
|
3394
2276
|
state,
|
|
3395
2277
|
onSave: () => {
|
|
@@ -3408,7 +2290,8 @@ function SchemaForm(props) {
|
|
|
3408
2290
|
...owner,
|
|
3409
2291
|
onEditText: withParse(owner, t)
|
|
3410
2292
|
} }) })
|
|
3411
|
-
}), state.violation === void 0 ? null : /* @__PURE__ */ jsx(
|
|
2293
|
+
}), state.violation === void 0 ? null : /* @__PURE__ */ jsx("p", {
|
|
2294
|
+
className: schema_form_module_css_default.hint,
|
|
3412
2295
|
role: "alert",
|
|
3413
2296
|
"data-violation": "true",
|
|
3414
2297
|
children: t("notSaved", { message: state.violation.message })
|
|
@@ -3567,552 +2450,823 @@ function markdownLabels(t) {
|
|
|
3567
2450
|
};
|
|
3568
2451
|
}
|
|
3569
2452
|
//#endregion
|
|
3570
|
-
//#region src/client/
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
2453
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/layout/layout.module.css.mjs
|
|
2454
|
+
const css$15 = ".e_G4ZW_stack{flex-direction:column;min-width:0;display:flex}.e_G4ZW_row{flex-direction:row;align-items:center;min-width:0;display:flex}.e_G4ZW_gap0{gap:0}.e_G4ZW_gap2{gap:2px}.e_G4ZW_gap4{gap:4px}.e_G4ZW_gap6{gap:6px}.e_G4ZW_gap8{gap:8px}.e_G4ZW_gap10{gap:10px}.e_G4ZW_gap12{gap:12px}.e_G4ZW_gap14{gap:14px}.e_G4ZW_gap16{gap:16px}.e_G4ZW_alignStart{align-items:flex-start}.e_G4ZW_alignCenter{align-items:center}.e_G4ZW_alignEnd{align-items:flex-end}.e_G4ZW_justifyBetween{justify-content:space-between}.e_G4ZW_justifyEnd{justify-content:flex-end}.e_G4ZW_justifyCenter{justify-content:center}.e_G4ZW_wrap{flex-wrap:wrap}.e_G4ZW_grow{flex:auto;min-width:0}.e_G4ZW_push{margin-left:auto}.e_G4ZW_fill{box-sizing:border-box;width:100%;height:100%;overflow:hidden}.e_G4ZW_scroll{flex:auto;min-height:0;overflow-y:auto}.e_G4ZW_plain{margin:0;padding:0;list-style:none}.e_G4ZW_padNone{padding:0}.e_G4ZW_padCard{padding:8px 12px}.e_G4ZW_padBody{padding:8px 0}.e_G4ZW_padPage{padding:24px 28px}.e_G4ZW_padRow{padding:10px 12px}.e_G4ZW_padBlocking{padding:32px 40px}.e_G4ZW_text{margin:0}.e_G4ZW_sizeXs{font-size:11px;line-height:1.5}.e_G4ZW_sizeSm{font-size:12px;line-height:18px}.e_G4ZW_sizeMd{font-size:13px;line-height:20px}.e_G4ZW_sizeBase{font-size:14px;line-height:24px}.e_G4ZW_sizeLg{font-size:16px;line-height:24px}.e_G4ZW_tonePrimary{color:var(--dsw-alias-label-primary)}.e_G4ZW_toneSecondary{color:var(--dsw-alias-label-secondary)}.e_G4ZW_toneTertiary{color:var(--dsw-alias-label-tertiary)}.e_G4ZW_toneDanger{color:var(--dsw-alias-label-error,var(--dsw-alias-label-primary))}.e_G4ZW_weightMedium{font-weight:500}.e_G4ZW_strong{font-weight:600}.e_G4ZW_mono{word-break:break-all;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,monospace}.e_G4ZW_truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.e_G4ZW_tabular{font-variant-numeric:tabular-nums}.e_G4ZW_boxed{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-base);border-radius:10px}.e_G4ZW_fixed{flex:none}.e_G4ZW_gapWide{gap:6px 20px}.e_G4ZW_narrow{min-width:0;max-width:min(calc(var(--dsh-chat-content-width,748px) * .702), 82%)}.e_G4ZW_wSearch{flex:none;width:360px;max-width:100%}";
|
|
2455
|
+
const tagId$15 = "@morlay/dsh-client-ui-primitives/layout.module.css";
|
|
2456
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/dsh-client-ui-primitives/layout.module.css\"]") === null) {
|
|
2457
|
+
const tag = document.createElement("style");
|
|
2458
|
+
tag.dataset.plugin = "@morlay/dsh-client-ui-primitives";
|
|
2459
|
+
tag.dataset.pluginCss = tagId$15;
|
|
2460
|
+
tag.textContent = css$15;
|
|
2461
|
+
document.head.appendChild(tag);
|
|
2462
|
+
}
|
|
2463
|
+
var layout_module_css_default = {
|
|
2464
|
+
"weightMedium": "e_G4ZW_weightMedium",
|
|
2465
|
+
"gap16": "e_G4ZW_gap16",
|
|
2466
|
+
"padBlocking": "e_G4ZW_padBlocking",
|
|
2467
|
+
"wSearch": "e_G4ZW_wSearch",
|
|
2468
|
+
"gapWide": "e_G4ZW_gapWide",
|
|
2469
|
+
"alignEnd": "e_G4ZW_alignEnd",
|
|
2470
|
+
"strong": "e_G4ZW_strong",
|
|
2471
|
+
"toneSecondary": "e_G4ZW_toneSecondary",
|
|
2472
|
+
"justifyCenter": "e_G4ZW_justifyCenter",
|
|
2473
|
+
"justifyEnd": "e_G4ZW_justifyEnd",
|
|
2474
|
+
"fill": "e_G4ZW_fill",
|
|
2475
|
+
"padNone": "e_G4ZW_padNone",
|
|
2476
|
+
"boxed": "e_G4ZW_boxed",
|
|
2477
|
+
"justifyBetween": "e_G4ZW_justifyBetween",
|
|
2478
|
+
"plain": "e_G4ZW_plain",
|
|
2479
|
+
"grow": "e_G4ZW_grow",
|
|
2480
|
+
"sizeBase": "e_G4ZW_sizeBase",
|
|
2481
|
+
"gap14": "e_G4ZW_gap14",
|
|
2482
|
+
"alignCenter": "e_G4ZW_alignCenter",
|
|
2483
|
+
"sizeMd": "e_G4ZW_sizeMd",
|
|
2484
|
+
"tonePrimary": "e_G4ZW_tonePrimary",
|
|
2485
|
+
"stack": "e_G4ZW_stack",
|
|
2486
|
+
"toneTertiary": "e_G4ZW_toneTertiary",
|
|
2487
|
+
"mono": "e_G4ZW_mono",
|
|
2488
|
+
"sizeLg": "e_G4ZW_sizeLg",
|
|
2489
|
+
"gap0": "e_G4ZW_gap0",
|
|
2490
|
+
"gap8": "e_G4ZW_gap8",
|
|
2491
|
+
"gap6": "e_G4ZW_gap6",
|
|
2492
|
+
"scroll": "e_G4ZW_scroll",
|
|
2493
|
+
"sizeSm": "e_G4ZW_sizeSm",
|
|
2494
|
+
"gap2": "e_G4ZW_gap2",
|
|
2495
|
+
"gap4": "e_G4ZW_gap4",
|
|
2496
|
+
"sizeXs": "e_G4ZW_sizeXs",
|
|
2497
|
+
"padCard": "e_G4ZW_padCard",
|
|
2498
|
+
"alignStart": "e_G4ZW_alignStart",
|
|
2499
|
+
"padPage": "e_G4ZW_padPage",
|
|
2500
|
+
"push": "e_G4ZW_push",
|
|
2501
|
+
"truncate": "e_G4ZW_truncate",
|
|
2502
|
+
"row": "e_G4ZW_row",
|
|
2503
|
+
"toneDanger": "e_G4ZW_toneDanger",
|
|
2504
|
+
"wrap": "e_G4ZW_wrap",
|
|
2505
|
+
"padRow": "e_G4ZW_padRow",
|
|
2506
|
+
"tabular": "e_G4ZW_tabular",
|
|
2507
|
+
"fixed": "e_G4ZW_fixed",
|
|
2508
|
+
"narrow": "e_G4ZW_narrow",
|
|
2509
|
+
"gap10": "e_G4ZW_gap10",
|
|
2510
|
+
"padBody": "e_G4ZW_padBody",
|
|
2511
|
+
"text": "e_G4ZW_text",
|
|
2512
|
+
"gap12": "e_G4ZW_gap12"
|
|
2513
|
+
};
|
|
2514
|
+
//#endregion
|
|
2515
|
+
//#region src/client/layout/scales.ts
|
|
2516
|
+
function gapClass(css, gap) {
|
|
2517
|
+
if (gap === void 0) return void 0;
|
|
2518
|
+
return gap === "wide" ? css.gapWide : css[`gap${gap}`];
|
|
2519
|
+
}
|
|
2520
|
+
function alignClass(css, align) {
|
|
2521
|
+
if (align === void 0 || align === "stretch") return void 0;
|
|
2522
|
+
if (align === "start") return css.alignStart;
|
|
2523
|
+
return align === "center" ? css.alignCenter : css.alignEnd;
|
|
2524
|
+
}
|
|
2525
|
+
function justifyClass(css, justify) {
|
|
2526
|
+
if (justify === void 0) return void 0;
|
|
2527
|
+
if (justify === "between") return css.justifyBetween;
|
|
2528
|
+
if (justify === "end") return css.justifyEnd;
|
|
2529
|
+
return justify === "center" ? css.justifyCenter : void 0;
|
|
2530
|
+
}
|
|
2531
|
+
function padClass(css, pad) {
|
|
2532
|
+
if (pad === void 0 || pad === "none") return void 0;
|
|
2533
|
+
if (pad === "card") return css.padCard;
|
|
2534
|
+
if (pad === "body") return css.padBody;
|
|
2535
|
+
if (pad === "page") return css.padPage;
|
|
2536
|
+
return pad === "row" ? css.padRow : css.padBlocking;
|
|
2537
|
+
}
|
|
2538
|
+
function sizeClass(css, size) {
|
|
2539
|
+
if (size === void 0) return void 0;
|
|
2540
|
+
if (size === "xs") return css.sizeXs;
|
|
2541
|
+
if (size === "sm") return css.sizeSm;
|
|
2542
|
+
if (size === "md") return css.sizeMd;
|
|
2543
|
+
return size === "base" ? css.sizeBase : css.sizeLg;
|
|
2544
|
+
}
|
|
2545
|
+
function toneClass(css, tone) {
|
|
2546
|
+
if (tone === void 0) return void 0;
|
|
2547
|
+
if (tone === "primary") return css.tonePrimary;
|
|
2548
|
+
if (tone === "secondary") return css.toneSecondary;
|
|
2549
|
+
return tone === "tertiary" ? css.toneTertiary : css.toneDanger;
|
|
2550
|
+
}
|
|
2551
|
+
function weightClass(css, weight) {
|
|
2552
|
+
if (weight === void 0) return void 0;
|
|
2553
|
+
return weight === "medium" ? css.weightMedium : css.strong;
|
|
3585
2554
|
}
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
2555
|
+
//#endregion
|
|
2556
|
+
//#region src/client/layout/Row.tsx
|
|
2557
|
+
const Row = forwardRef(function Row({ as: Element = "div", gap, align, justify, wrap = false, grow = false, boxed = false, fixed = false, narrow = false, push = false, plain = false, pad, className, children, ...rest }, ref) {
|
|
2558
|
+
return /* @__PURE__ */ jsx(Element, {
|
|
2559
|
+
ref,
|
|
2560
|
+
className: classes(layout_module_css_default.row, gapClass(layout_module_css_default, gap), alignClass(layout_module_css_default, align), justifyClass(layout_module_css_default, justify), padClass(layout_module_css_default, pad), wrap ? layout_module_css_default.wrap : void 0, grow ? layout_module_css_default.grow : void 0, boxed ? layout_module_css_default.boxed : void 0, fixed ? layout_module_css_default.fixed : void 0, narrow ? layout_module_css_default.narrow : void 0, push ? layout_module_css_default.push : void 0, boxed ? layout_module_css_default.boxed : void 0, fixed ? layout_module_css_default.fixed : void 0, plain ? layout_module_css_default.plain : void 0, className),
|
|
2561
|
+
...rest,
|
|
2562
|
+
children
|
|
2563
|
+
});
|
|
2564
|
+
});
|
|
2565
|
+
//#endregion
|
|
2566
|
+
//#region src/client/layout/Stack.tsx
|
|
2567
|
+
const Stack = forwardRef(function Stack({ as: Element = "div", gap, align, pad, grow = false, boxed = false, fixed = false, narrow = false, fill = false, scroll = false, plain = false, className, children, ...rest }, ref) {
|
|
2568
|
+
return /* @__PURE__ */ jsx(Element, {
|
|
2569
|
+
ref,
|
|
2570
|
+
className: classes(layout_module_css_default.stack, gapClass(layout_module_css_default, gap), alignClass(layout_module_css_default, align), padClass(layout_module_css_default, pad), grow ? layout_module_css_default.grow : void 0, boxed ? layout_module_css_default.boxed : void 0, fixed ? layout_module_css_default.fixed : void 0, narrow ? layout_module_css_default.narrow : void 0, fill ? layout_module_css_default.fill : void 0, scroll ? layout_module_css_default.scroll : void 0, plain ? layout_module_css_default.plain : void 0, className),
|
|
2571
|
+
...rest,
|
|
2572
|
+
children
|
|
2573
|
+
});
|
|
2574
|
+
});
|
|
2575
|
+
//#endregion
|
|
2576
|
+
//#region src/client/layout/Text.tsx
|
|
2577
|
+
function Text({ as: Element = "span", size, tone, weight, mono = false, truncate = false, tabular = false, className, children }) {
|
|
2578
|
+
return /* @__PURE__ */ jsx(Element, {
|
|
2579
|
+
className: classes(layout_module_css_default.text, sizeClass(layout_module_css_default, size), toneClass(layout_module_css_default, tone), weightClass(layout_module_css_default, weight), mono ? layout_module_css_default.mono : void 0, truncate ? layout_module_css_default.truncate : void 0, tabular ? layout_module_css_default.tabular : void 0, className),
|
|
2580
|
+
children
|
|
2581
|
+
});
|
|
3598
2582
|
}
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
};
|
|
3635
|
-
}
|
|
3636
|
-
field(field) {
|
|
3637
|
-
const staged = this.staged.get(field);
|
|
3638
|
-
if (this.secretSpecs.has(field)) return {
|
|
3639
|
-
text: staged?.text ?? "",
|
|
3640
|
-
overridden: false,
|
|
3641
|
-
invalid: false
|
|
3642
|
-
};
|
|
3643
|
-
const spec = this.spec(field);
|
|
3644
|
-
if (staged === void 0) return {
|
|
3645
|
-
text: spec.format(this.sectionValue(field)),
|
|
3646
|
-
overridden: this.stored(field),
|
|
3647
|
-
invalid: false
|
|
3648
|
-
};
|
|
3649
|
-
const write = staged.clear ? { kind: "clear" } : spec.parse(staged.text);
|
|
3650
|
-
return {
|
|
3651
|
-
text: staged.text,
|
|
3652
|
-
overridden: write?.kind === "set",
|
|
3653
|
-
invalid: write === void 0
|
|
3654
|
-
};
|
|
3655
|
-
}
|
|
3656
|
-
actions() {
|
|
3657
|
-
return {
|
|
3658
|
-
edit: (field, text) => {
|
|
3659
|
-
this.stage(field, {
|
|
3660
|
-
text,
|
|
3661
|
-
clear: false
|
|
3662
|
-
});
|
|
3663
|
-
},
|
|
3664
|
-
resetField: (field) => {
|
|
3665
|
-
this.stage(field, {
|
|
3666
|
-
text: this.spec(field).format(this.baseValue(field)),
|
|
3667
|
-
clear: true
|
|
3668
|
-
});
|
|
3669
|
-
},
|
|
3670
|
-
save: () => {
|
|
3671
|
-
this.save();
|
|
2583
|
+
//#endregion
|
|
2584
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/settings-form/SettingsFieldRow.module.css.mjs
|
|
2585
|
+
const css$14 = "._72UBVa_row{flex-direction:column;display:flex}._72UBVa_row[data-divider=true]{border-top:.5px solid var(--dsw-alias-border-l2)}._72UBVa_body{flex-direction:column;gap:6px;padding:12px 0;display:flex}._72UBVa_inline{flex-direction:row;justify-content:space-between;align-items:center;gap:16px;padding:12px 0;display:flex}._72UBVa_text{flex-direction:column;gap:2px;min-width:0;display:flex}._72UBVa_label{color:var(--dsw-alias-label-primary);align-items:center;gap:8px;font-size:13px;font-weight:500;line-height:1.5;display:flex}._72UBVa_badge{corner-shape:round;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform);border-radius:999px;align-items:center;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px;display:inline-flex}._72UBVa_reset{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;padding:0;font-size:12px;line-height:1.5}._72UBVa_reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}._72UBVa_reset:disabled{cursor:default}._72UBVa_hint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:1.5}._72UBVa_invalid{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px;line-height:1.5}";
|
|
2586
|
+
const tagId$14 = "@morlay/dsh-client-ui-primitives/SettingsFieldRow.module.css";
|
|
2587
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/dsh-client-ui-primitives/SettingsFieldRow.module.css\"]") === null) {
|
|
2588
|
+
const tag = document.createElement("style");
|
|
2589
|
+
tag.dataset.plugin = "@morlay/dsh-client-ui-primitives";
|
|
2590
|
+
tag.dataset.pluginCss = tagId$14;
|
|
2591
|
+
tag.textContent = css$14;
|
|
2592
|
+
document.head.appendChild(tag);
|
|
2593
|
+
}
|
|
2594
|
+
var SettingsFieldRow_module_css_default = {
|
|
2595
|
+
"inline": "_72UBVa_inline",
|
|
2596
|
+
"row": "_72UBVa_row",
|
|
2597
|
+
"reset": "_72UBVa_reset",
|
|
2598
|
+
"hint": "_72UBVa_hint",
|
|
2599
|
+
"badge": "_72UBVa_badge",
|
|
2600
|
+
"body": "_72UBVa_body",
|
|
2601
|
+
"text": "_72UBVa_text",
|
|
2602
|
+
"label": "_72UBVa_label",
|
|
2603
|
+
"invalid": "_72UBVa_invalid"
|
|
2604
|
+
};
|
|
2605
|
+
//#endregion
|
|
2606
|
+
//#region src/client/settings-form/SettingsFieldRow.tsx
|
|
2607
|
+
function SettingsFieldRow({ label, hint, layout = "stack", divider = false, overriddenLabel, resetLabel, onReset, invalid, children, className, ...rest }) {
|
|
2608
|
+
const labelNode = /* @__PURE__ */ jsxs("span", {
|
|
2609
|
+
className: SettingsFieldRow_module_css_default.label,
|
|
2610
|
+
children: [label, overriddenLabel === void 0 ? null : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
2611
|
+
className: SettingsFieldRow_module_css_default.badge,
|
|
2612
|
+
children: overriddenLabel
|
|
2613
|
+
}), resetLabel === void 0 || onReset === void 0 ? null : /* @__PURE__ */ jsx("button", {
|
|
2614
|
+
type: "button",
|
|
2615
|
+
className: SettingsFieldRow_module_css_default.reset,
|
|
2616
|
+
onClick: () => {
|
|
2617
|
+
onReset();
|
|
3672
2618
|
},
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
}
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
value: write.value
|
|
3751
|
-
}
|
|
3752
|
-
});
|
|
3753
|
-
}
|
|
3754
|
-
return plan;
|
|
3755
|
-
}
|
|
3756
|
-
stage(field, edit) {
|
|
3757
|
-
this.baseline ??= this.scope.getSnapshot();
|
|
3758
|
-
this.staged.set(field, edit);
|
|
3759
|
-
this.failed = false;
|
|
3760
|
-
this.publish();
|
|
3761
|
-
}
|
|
3762
|
-
spec(field) {
|
|
3763
|
-
const spec = this.specs.get(field);
|
|
3764
|
-
if (spec === void 0) throw new Error(`plugin card has no field ${field}`);
|
|
3765
|
-
return spec;
|
|
3766
|
-
}
|
|
3767
|
-
snapshotOf() {
|
|
3768
|
-
return this.scope.getSnapshot();
|
|
3769
|
-
}
|
|
3770
|
-
sectionValue(field) {
|
|
3771
|
-
return this.snapshotOf().value?.[field];
|
|
3772
|
-
}
|
|
3773
|
-
baseValue(field) {
|
|
3774
|
-
return this.snapshotOf().base?.[field];
|
|
3775
|
-
}
|
|
3776
|
-
userLayer() {
|
|
3777
|
-
return this.snapshotOf().user;
|
|
3778
|
-
}
|
|
3779
|
-
stored(field) {
|
|
3780
|
-
const user = this.userLayer();
|
|
3781
|
-
return user !== void 0 && Object.hasOwn(user, field);
|
|
3782
|
-
}
|
|
3783
|
-
publish() {
|
|
3784
|
-
for (const listener of this.listeners) listener();
|
|
3785
|
-
}
|
|
2619
|
+
children: resetLabel
|
|
2620
|
+
})] })]
|
|
2621
|
+
});
|
|
2622
|
+
const invalidNode = invalid === void 0 ? null : /* @__PURE__ */ jsx("p", {
|
|
2623
|
+
className: SettingsFieldRow_module_css_default.invalid,
|
|
2624
|
+
role: "alert",
|
|
2625
|
+
children: invalid
|
|
2626
|
+
});
|
|
2627
|
+
if (layout === "inline") return /* @__PURE__ */ jsxs("div", {
|
|
2628
|
+
className: classes(SettingsFieldRow_module_css_default.row, className),
|
|
2629
|
+
"data-role": "field-row",
|
|
2630
|
+
"data-divider": divider ? "true" : "false",
|
|
2631
|
+
...rest,
|
|
2632
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
2633
|
+
className: SettingsFieldRow_module_css_default.inline,
|
|
2634
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
2635
|
+
className: SettingsFieldRow_module_css_default.text,
|
|
2636
|
+
children: [labelNode, /* @__PURE__ */ jsx("p", {
|
|
2637
|
+
className: SettingsFieldRow_module_css_default.hint,
|
|
2638
|
+
children: hint
|
|
2639
|
+
})]
|
|
2640
|
+
}), children]
|
|
2641
|
+
}), invalidNode]
|
|
2642
|
+
});
|
|
2643
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2644
|
+
className: classes(SettingsFieldRow_module_css_default.row, className),
|
|
2645
|
+
"data-role": "field-row",
|
|
2646
|
+
"data-divider": divider ? "true" : "false",
|
|
2647
|
+
...rest,
|
|
2648
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
2649
|
+
className: SettingsFieldRow_module_css_default.body,
|
|
2650
|
+
children: [
|
|
2651
|
+
labelNode,
|
|
2652
|
+
children,
|
|
2653
|
+
/* @__PURE__ */ jsx("p", {
|
|
2654
|
+
className: SettingsFieldRow_module_css_default.hint,
|
|
2655
|
+
children: hint
|
|
2656
|
+
})
|
|
2657
|
+
]
|
|
2658
|
+
}), invalidNode]
|
|
2659
|
+
});
|
|
2660
|
+
}
|
|
2661
|
+
//#endregion
|
|
2662
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/Bubble.module.css.mjs
|
|
2663
|
+
const css$13 = ".dtkLCG_bubble{background:var(--dsw-specific-bubble);border-radius:var(--dsw-radius-xl);max-width:100%;font-size:var(--dsh-content-font-size,14px);line-height:calc(22px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-primary);white-space:pre-wrap;word-break:break-word;padding:10px 16px}";
|
|
2664
|
+
const tagId$13 = "@morlay/dsh-client-ui-primitives/Bubble.module.css";
|
|
2665
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/dsh-client-ui-primitives/Bubble.module.css\"]") === null) {
|
|
2666
|
+
const tag = document.createElement("style");
|
|
2667
|
+
tag.dataset.plugin = "@morlay/dsh-client-ui-primitives";
|
|
2668
|
+
tag.dataset.pluginCss = tagId$13;
|
|
2669
|
+
tag.textContent = css$13;
|
|
2670
|
+
document.head.appendChild(tag);
|
|
2671
|
+
}
|
|
2672
|
+
var Bubble_module_css_default = { "bubble": "dtkLCG_bubble" };
|
|
2673
|
+
//#endregion
|
|
2674
|
+
//#region src/client/controls/Bubble.tsx
|
|
2675
|
+
function Bubble({ className, children, ...rest }) {
|
|
2676
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2677
|
+
className: classes(Bubble_module_css_default.bubble, className),
|
|
2678
|
+
...rest,
|
|
2679
|
+
children
|
|
2680
|
+
});
|
|
2681
|
+
}
|
|
2682
|
+
//#endregion
|
|
2683
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/Button.module.css.mjs
|
|
2684
|
+
const css$12 = ".WFViLq_label{white-space:nowrap}.WFViLq_danger{--dsw-alias-button-primary-fill:var(--dsw-alias-state-error-primary)}";
|
|
2685
|
+
const tagId$12 = "@morlay/dsh-client-ui-primitives/Button.module.css";
|
|
2686
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/dsh-client-ui-primitives/Button.module.css\"]") === null) {
|
|
2687
|
+
const tag = document.createElement("style");
|
|
2688
|
+
tag.dataset.plugin = "@morlay/dsh-client-ui-primitives";
|
|
2689
|
+
tag.dataset.pluginCss = tagId$12;
|
|
2690
|
+
tag.textContent = css$12;
|
|
2691
|
+
document.head.appendChild(tag);
|
|
2692
|
+
}
|
|
2693
|
+
var Button_module_css_default = {
|
|
2694
|
+
"label": "WFViLq_label",
|
|
2695
|
+
"danger": "WFViLq_danger"
|
|
3786
2696
|
};
|
|
3787
2697
|
//#endregion
|
|
3788
|
-
//#region src/client/
|
|
3789
|
-
const
|
|
2698
|
+
//#region src/client/controls/Button.tsx
|
|
2699
|
+
const Button = forwardRef(function Button({ className, tone, ...rest }, ref) {
|
|
2700
|
+
return /* @__PURE__ */ jsx(Button$1, {
|
|
2701
|
+
ref,
|
|
2702
|
+
"data-role": "button",
|
|
2703
|
+
className: classes(className, Button_module_css_default.label, tone === "danger" ? Button_module_css_default.danger : void 0),
|
|
2704
|
+
...rest
|
|
2705
|
+
});
|
|
2706
|
+
});
|
|
3790
2707
|
//#endregion
|
|
3791
|
-
//#region src/client/
|
|
3792
|
-
const
|
|
3793
|
-
const
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
"& > p + p": { marginTop: "8px" }
|
|
3855
|
-
},
|
|
3856
|
-
badges: {
|
|
3857
|
-
display: "inline-flex",
|
|
3858
|
-
alignItems: "center",
|
|
3859
|
-
gap: "8px"
|
|
3860
|
-
},
|
|
3861
|
-
badge: {
|
|
3862
|
-
display: "inline-flex",
|
|
3863
|
-
alignItems: "center",
|
|
3864
|
-
borderRadius: "999px",
|
|
3865
|
-
cornerShape: "round",
|
|
3866
|
-
padding: "1px 8px",
|
|
3867
|
-
fontSize: "11px",
|
|
3868
|
-
lineHeight: "17px",
|
|
3869
|
-
fontWeight: 500,
|
|
3870
|
-
whiteSpace: "nowrap"
|
|
3871
|
-
},
|
|
3872
|
-
badgeNeutral: {
|
|
3873
|
-
background: dsw.alias.bg.module.platform,
|
|
3874
|
-
color: dsw.alias.label.secondary
|
|
3875
|
-
},
|
|
3876
|
-
badgeQuiet: { color: dsw.alias.label.tertiary },
|
|
3877
|
-
reset: {
|
|
3878
|
-
border: "none",
|
|
3879
|
-
background: "none",
|
|
3880
|
-
padding: 0,
|
|
3881
|
-
font: "inherit",
|
|
3882
|
-
fontSize: "12px",
|
|
3883
|
-
lineHeight: 1.5,
|
|
3884
|
-
color: dsw.alias.label.secondary,
|
|
3885
|
-
cursor: "pointer",
|
|
3886
|
-
"&:hover:not(:disabled)": { color: dsw.alias.label.primary },
|
|
3887
|
-
"&:disabled": { cursor: "default" }
|
|
3888
|
-
},
|
|
3889
|
-
input: {
|
|
3890
|
-
height: "34px",
|
|
3891
|
-
padding: "0 12px",
|
|
3892
|
-
border: `0.5px solid ${String(dsw.alias.border.l4)}`,
|
|
3893
|
-
borderRadius: "8px",
|
|
3894
|
-
background: dsw.alias.bg.layer["3"],
|
|
3895
|
-
font: "inherit",
|
|
3896
|
-
fontSize: "13px",
|
|
3897
|
-
lineHeight: 1.5,
|
|
3898
|
-
color: dsw.alias.label.primary,
|
|
3899
|
-
"&:focus-visible": {
|
|
3900
|
-
outline: "none",
|
|
3901
|
-
borderColor: dsw.alias.state.business.primary
|
|
3902
|
-
},
|
|
3903
|
-
"&:disabled": {
|
|
3904
|
-
color: dsw.alias.label.tertiary,
|
|
3905
|
-
cursor: "default"
|
|
3906
|
-
},
|
|
3907
|
-
"&[aria-invalid='true']": { borderColor: dsw.alias.state.error.primary }
|
|
3908
|
-
},
|
|
3909
|
-
invalid: {
|
|
3910
|
-
margin: 0,
|
|
3911
|
-
fontSize: "12px",
|
|
3912
|
-
lineHeight: 1.5,
|
|
3913
|
-
color: dsw.alias.state.error.primary
|
|
3914
|
-
},
|
|
3915
|
-
hint: {
|
|
3916
|
-
margin: 0,
|
|
3917
|
-
fontSize: "12px",
|
|
3918
|
-
lineHeight: 1.5,
|
|
3919
|
-
color: dsw.alias.label.tertiary
|
|
3920
|
-
}
|
|
2708
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/DisclosureRow.module.css.mjs
|
|
2709
|
+
const css$11 = ".MBWCEG_content{flex:auto;min-width:0}.MBWCEG_contentLayout{align-items:center;gap:8px;width:100%;min-width:0;display:flex}";
|
|
2710
|
+
const tagId$11 = "@morlay/dsh-client-ui-primitives/DisclosureRow.module.css";
|
|
2711
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/dsh-client-ui-primitives/DisclosureRow.module.css\"]") === null) {
|
|
2712
|
+
const tag = document.createElement("style");
|
|
2713
|
+
tag.dataset.plugin = "@morlay/dsh-client-ui-primitives";
|
|
2714
|
+
tag.dataset.pluginCss = tagId$11;
|
|
2715
|
+
tag.textContent = css$11;
|
|
2716
|
+
document.head.appendChild(tag);
|
|
2717
|
+
}
|
|
2718
|
+
var DisclosureRow_module_css_default = {
|
|
2719
|
+
"content": "MBWCEG_content",
|
|
2720
|
+
"contentLayout": "MBWCEG_contentLayout"
|
|
2721
|
+
};
|
|
2722
|
+
//#endregion
|
|
2723
|
+
//#region src/client/controls/DisclosureRow.tsx
|
|
2724
|
+
function DisclosureRow(props) {
|
|
2725
|
+
return /* @__PURE__ */ jsx(DisclosureRow$1, {
|
|
2726
|
+
contentClassName: DisclosureRow_module_css_default.content,
|
|
2727
|
+
contentLayoutClassName: DisclosureRow_module_css_default.contentLayout,
|
|
2728
|
+
...props
|
|
2729
|
+
});
|
|
2730
|
+
}
|
|
2731
|
+
//#endregion
|
|
2732
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/SearchInput.module.css.mjs
|
|
2733
|
+
const css$10 = ".KiR4MG_search{flex:none;width:360px;max-width:100%}.KiR4MG_full{flex:none;width:100%}";
|
|
2734
|
+
const tagId$10 = "@morlay/dsh-client-ui-primitives/SearchInput.module.css";
|
|
2735
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/dsh-client-ui-primitives/SearchInput.module.css\"]") === null) {
|
|
2736
|
+
const tag = document.createElement("style");
|
|
2737
|
+
tag.dataset.plugin = "@morlay/dsh-client-ui-primitives";
|
|
2738
|
+
tag.dataset.pluginCss = tagId$10;
|
|
2739
|
+
tag.textContent = css$10;
|
|
2740
|
+
document.head.appendChild(tag);
|
|
2741
|
+
}
|
|
2742
|
+
var SearchInput_module_css_default = {
|
|
2743
|
+
"search": "KiR4MG_search",
|
|
2744
|
+
"full": "KiR4MG_full"
|
|
2745
|
+
};
|
|
2746
|
+
//#endregion
|
|
2747
|
+
//#region src/client/controls/SearchInput.tsx
|
|
2748
|
+
function SearchInput({ width = "search", className, ...rest }) {
|
|
2749
|
+
return /* @__PURE__ */ jsx(Input, {
|
|
2750
|
+
className: classes(className, width === "search" ? SearchInput_module_css_default.search : SearchInput_module_css_default.full),
|
|
2751
|
+
...rest
|
|
2752
|
+
});
|
|
2753
|
+
}
|
|
2754
|
+
//#endregion
|
|
2755
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/SeatButton.module.css.mjs
|
|
2756
|
+
const css$9 = ".HcNbhG_seat{border-radius:var(--dsw-radius-sm);min-width:0;max-width:min(100%,240px);min-height:28px;color:var(--dsw-alias-label-primary);white-space:nowrap;cursor:pointer;background:0 0;border:none;align-items:center;gap:4px;padding:0 8px;font-size:13px;font-weight:500;line-height:20px;display:inline-flex}.HcNbhG_seat:not(:disabled):hover,.HcNbhG_seat[aria-expanded=true],.HcNbhG_expanded{background:var(--dsw-alias-interactive-bg-hover)}.HcNbhG_seat:disabled{cursor:default;color:var(--dsw-alias-label-quaternary)}.HcNbhG_icon{color:var(--dsw-alias-label-primary);flex:none;align-items:center;display:inline-flex}.HcNbhG_label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.HcNbhG_chevron{color:var(--dsw-alias-label-caption);flex:none;display:inline-flex}";
|
|
2757
|
+
const tagId$9 = "@morlay/dsh-client-ui-primitives/SeatButton.module.css";
|
|
2758
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/dsh-client-ui-primitives/SeatButton.module.css\"]") === null) {
|
|
2759
|
+
const tag = document.createElement("style");
|
|
2760
|
+
tag.dataset.plugin = "@morlay/dsh-client-ui-primitives";
|
|
2761
|
+
tag.dataset.pluginCss = tagId$9;
|
|
2762
|
+
tag.textContent = css$9;
|
|
2763
|
+
document.head.appendChild(tag);
|
|
2764
|
+
}
|
|
2765
|
+
var SeatButton_module_css_default = {
|
|
2766
|
+
"chevron": "HcNbhG_chevron",
|
|
2767
|
+
"expanded": "HcNbhG_expanded",
|
|
2768
|
+
"icon": "HcNbhG_icon",
|
|
2769
|
+
"seat": "HcNbhG_seat",
|
|
2770
|
+
"label": "HcNbhG_label"
|
|
3921
2771
|
};
|
|
3922
2772
|
//#endregion
|
|
3923
|
-
//#region src/client/
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
const HelpButton = styled("button")(styles$1.helpButton);
|
|
3930
|
-
const Help = styled("div")(styles$1.help);
|
|
3931
|
-
const Badges = styled("span")(styles$1.badges);
|
|
3932
|
-
const NeutralBadge = styled("span")(styles$1.badge, styles$1.badgeNeutral);
|
|
3933
|
-
const QuietBadge = styled("span")(styles$1.badge, styles$1.badgeQuiet);
|
|
3934
|
-
const Reset = styled("button")(styles$1.reset);
|
|
3935
|
-
const Input$1 = styled("input")(styles$1.input);
|
|
3936
|
-
const Invalid = styled("p")(styles$1.invalid);
|
|
3937
|
-
const Hint = styled("p")(styles$1.hint);
|
|
3938
|
-
function InfoGlyph({ size }) {
|
|
3939
|
-
return /* @__PURE__ */ jsxs("svg", {
|
|
3940
|
-
width: size,
|
|
3941
|
-
height: size,
|
|
3942
|
-
viewBox: "0 0 14 14",
|
|
3943
|
-
fill: "none",
|
|
3944
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3945
|
-
"aria-hidden": "true",
|
|
2773
|
+
//#region src/client/controls/SeatButton.tsx
|
|
2774
|
+
function SeatButton({ icon, label, expanded = false, chevron, type = "button", className, ...rest }) {
|
|
2775
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
2776
|
+
type,
|
|
2777
|
+
className: classes(SeatButton_module_css_default.seat, expanded ? SeatButton_module_css_default.expanded : void 0, className),
|
|
2778
|
+
...rest,
|
|
3946
2779
|
children: [
|
|
3947
|
-
/* @__PURE__ */ jsx("
|
|
3948
|
-
|
|
3949
|
-
|
|
2780
|
+
/* @__PURE__ */ jsx("span", {
|
|
2781
|
+
className: SeatButton_module_css_default.icon,
|
|
2782
|
+
children: icon
|
|
3950
2783
|
}),
|
|
3951
|
-
/* @__PURE__ */ jsx("
|
|
3952
|
-
|
|
3953
|
-
|
|
2784
|
+
/* @__PURE__ */ jsx("span", {
|
|
2785
|
+
className: SeatButton_module_css_default.label,
|
|
2786
|
+
children: label
|
|
3954
2787
|
}),
|
|
3955
|
-
/* @__PURE__ */ jsx("
|
|
3956
|
-
|
|
3957
|
-
|
|
2788
|
+
chevron === void 0 ? null : /* @__PURE__ */ jsx("span", {
|
|
2789
|
+
className: SeatButton_module_css_default.chevron,
|
|
2790
|
+
children: chevron
|
|
3958
2791
|
})
|
|
3959
2792
|
]
|
|
3960
2793
|
});
|
|
3961
2794
|
}
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
const
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
2795
|
+
//#endregion
|
|
2796
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/Spinner.module.css.mjs
|
|
2797
|
+
const css$8 = ".HGVDmW_spinner{border:2px solid var(--dsw-alias-border-l2);border-top-color:var(--dsw-alias-label-primary);border-radius:50%;width:28px;height:28px;animation:.9s linear infinite HGVDmW_spin}@keyframes HGVDmW_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}";
|
|
2798
|
+
const tagId$8 = "@morlay/dsh-client-ui-primitives/Spinner.module.css";
|
|
2799
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/dsh-client-ui-primitives/Spinner.module.css\"]") === null) {
|
|
2800
|
+
const tag = document.createElement("style");
|
|
2801
|
+
tag.dataset.plugin = "@morlay/dsh-client-ui-primitives";
|
|
2802
|
+
tag.dataset.pluginCss = tagId$8;
|
|
2803
|
+
tag.textContent = css$8;
|
|
2804
|
+
document.head.appendChild(tag);
|
|
2805
|
+
}
|
|
2806
|
+
var Spinner_module_css_default = {
|
|
2807
|
+
"spin": "HGVDmW_spin",
|
|
2808
|
+
"spinner": "HGVDmW_spinner"
|
|
2809
|
+
};
|
|
2810
|
+
//#endregion
|
|
2811
|
+
//#region src/client/controls/Spinner.tsx
|
|
2812
|
+
function Spinner({ label }) {
|
|
2813
|
+
return /* @__PURE__ */ jsx("span", {
|
|
2814
|
+
className: Spinner_module_css_default.spinner,
|
|
2815
|
+
role: "status",
|
|
2816
|
+
"aria-label": label
|
|
2817
|
+
});
|
|
2818
|
+
}
|
|
2819
|
+
//#endregion
|
|
2820
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/Tabs.module.css.mjs
|
|
2821
|
+
const css$7 = ".GO-36q_tabs{z-index:1;flex:none;gap:36px;margin-top:10px;padding-left:8px;display:flex;position:relative}.GO-36q_tab{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;padding:0 0 9px;font-size:13px;font-weight:500;line-height:16px;position:relative}.GO-36q_tab:after{content:\"\";background:0 0;border-radius:2px;height:2px;position:absolute;bottom:-1px;left:0;right:0}.GO-36q_tabActive{color:var(--dsw-alias-state-business-primary)}.GO-36q_tabActive:after{background:var(--dsw-alias-state-business-primary)}.GO-36q_tab:disabled{cursor:not-allowed;opacity:.4}";
|
|
2822
|
+
const tagId$7 = "@morlay/dsh-client-ui-primitives/Tabs.module.css";
|
|
2823
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/dsh-client-ui-primitives/Tabs.module.css\"]") === null) {
|
|
2824
|
+
const tag = document.createElement("style");
|
|
2825
|
+
tag.dataset.plugin = "@morlay/dsh-client-ui-primitives";
|
|
2826
|
+
tag.dataset.pluginCss = tagId$7;
|
|
2827
|
+
tag.textContent = css$7;
|
|
2828
|
+
document.head.appendChild(tag);
|
|
2829
|
+
}
|
|
2830
|
+
var Tabs_module_css_default = {
|
|
2831
|
+
"tab": "GO-36q_tab",
|
|
2832
|
+
"tabs": "GO-36q_tabs",
|
|
2833
|
+
"tabActive": "GO-36q_tabActive"
|
|
2834
|
+
};
|
|
2835
|
+
//#endregion
|
|
2836
|
+
//#region src/client/controls/Tabs.tsx
|
|
2837
|
+
function Tabs({ label, items, value, onChange, role = "tablist", disabled = false }) {
|
|
2838
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2839
|
+
className: Tabs_module_css_default.tabs,
|
|
2840
|
+
role,
|
|
2841
|
+
"aria-label": label,
|
|
2842
|
+
children: items.map((item) => {
|
|
2843
|
+
const active = item.value === value;
|
|
2844
|
+
return /* @__PURE__ */ jsx("button", {
|
|
2845
|
+
type: "button",
|
|
2846
|
+
role: role === "tablist" ? "tab" : "radio",
|
|
2847
|
+
"data-tab": item.value,
|
|
2848
|
+
"aria-selected": role === "tablist" ? active : void 0,
|
|
2849
|
+
"aria-checked": role === "tablist" ? void 0 : active,
|
|
2850
|
+
disabled,
|
|
2851
|
+
className: classes(Tabs_module_css_default.tab, active ? Tabs_module_css_default.tabActive : void 0),
|
|
2852
|
+
onClick: () => {
|
|
2853
|
+
onChange(item.value);
|
|
2854
|
+
},
|
|
2855
|
+
children: item.label
|
|
2856
|
+
}, item.value);
|
|
2857
|
+
})
|
|
2858
|
+
});
|
|
2859
|
+
}
|
|
2860
|
+
//#endregion
|
|
2861
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/TimeLabel.module.css.mjs
|
|
2862
|
+
const css$6 = "._3IuWPG_label{color:var(--dsw-alias-label-tertiary);white-space:nowrap;opacity:0;padding:0;font-size:14px;line-height:24px;transition:opacity 80ms}[data-time-hover-root]:hover ._3IuWPG_label,[data-time-hover-root]:focus-within ._3IuWPG_label{opacity:1}";
|
|
2863
|
+
const tagId$6 = "@morlay/dsh-client-ui-primitives/TimeLabel.module.css";
|
|
2864
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/dsh-client-ui-primitives/TimeLabel.module.css\"]") === null) {
|
|
2865
|
+
const tag = document.createElement("style");
|
|
2866
|
+
tag.dataset.plugin = "@morlay/dsh-client-ui-primitives";
|
|
2867
|
+
tag.dataset.pluginCss = tagId$6;
|
|
2868
|
+
tag.textContent = css$6;
|
|
2869
|
+
document.head.appendChild(tag);
|
|
2870
|
+
}
|
|
2871
|
+
var TimeLabel_module_css_default = { "label": "_3IuWPG_label" };
|
|
2872
|
+
//#endregion
|
|
2873
|
+
//#region src/client/controls/TimeLabel.tsx
|
|
2874
|
+
function TimeLabel({ className, children, ...rest }) {
|
|
2875
|
+
return /* @__PURE__ */ jsx("span", {
|
|
2876
|
+
className: classes(TimeLabel_module_css_default.label, className),
|
|
2877
|
+
...rest,
|
|
2878
|
+
children
|
|
2879
|
+
});
|
|
2880
|
+
}
|
|
2881
|
+
//#endregion
|
|
2882
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/VisuallyHidden.module.css.mjs
|
|
2883
|
+
const css$5 = ".YAvv4W_hidden{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}";
|
|
2884
|
+
const tagId$5 = "@morlay/dsh-client-ui-primitives/VisuallyHidden.module.css";
|
|
2885
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/dsh-client-ui-primitives/VisuallyHidden.module.css\"]") === null) {
|
|
2886
|
+
const tag = document.createElement("style");
|
|
2887
|
+
tag.dataset.plugin = "@morlay/dsh-client-ui-primitives";
|
|
2888
|
+
tag.dataset.pluginCss = tagId$5;
|
|
2889
|
+
tag.textContent = css$5;
|
|
2890
|
+
document.head.appendChild(tag);
|
|
2891
|
+
}
|
|
2892
|
+
var VisuallyHidden_module_css_default = { "hidden": "YAvv4W_hidden" };
|
|
2893
|
+
//#endregion
|
|
2894
|
+
//#region src/client/controls/VisuallyHidden.tsx
|
|
2895
|
+
function VisuallyHidden({ children, ...rest }) {
|
|
2896
|
+
return /* @__PURE__ */ jsx("span", {
|
|
2897
|
+
className: VisuallyHidden_module_css_default.hidden,
|
|
2898
|
+
...rest,
|
|
2899
|
+
children
|
|
2900
|
+
});
|
|
2901
|
+
}
|
|
2902
|
+
//#endregion
|
|
2903
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/IconButton.module.css.mjs
|
|
2904
|
+
const css$4 = ".I3t6Ga_iconButton{box-sizing:border-box;width:28px;height:28px;color:var(--dsw-alias-label-secondary);border-radius:var(--dsw-radius-sm);cursor:pointer;background:0 0;border:none;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.I3t6Ga_iconButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.I3t6Ga_iconButton:disabled{cursor:not-allowed;opacity:.4}.I3t6Ga_iconButton:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.I3t6Ga_sm{width:20px;height:20px;padding:0}.I3t6Ga_circle{color:var(--dsw-alias-label-tertiary);border-radius:28px;padding:6px}.I3t6Ga_circle:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}";
|
|
2905
|
+
const tagId$4 = "@morlay/dsh-client-ui-primitives/IconButton.module.css";
|
|
2906
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/dsh-client-ui-primitives/IconButton.module.css\"]") === null) {
|
|
2907
|
+
const tag = document.createElement("style");
|
|
2908
|
+
tag.dataset.plugin = "@morlay/dsh-client-ui-primitives";
|
|
2909
|
+
tag.dataset.pluginCss = tagId$4;
|
|
2910
|
+
tag.textContent = css$4;
|
|
2911
|
+
document.head.appendChild(tag);
|
|
2912
|
+
}
|
|
2913
|
+
var IconButton_module_css_default = {
|
|
2914
|
+
"sm": "I3t6Ga_sm",
|
|
2915
|
+
"circle": "I3t6Ga_circle",
|
|
2916
|
+
"iconButton": "I3t6Ga_iconButton"
|
|
2917
|
+
};
|
|
2918
|
+
//#endregion
|
|
2919
|
+
//#region src/client/controls/IconButton.tsx
|
|
2920
|
+
function IconButton({ label, children, type = "button", shape = "square", size = "md", className, ...rest }) {
|
|
2921
|
+
return /* @__PURE__ */ jsx("button", {
|
|
2922
|
+
type,
|
|
2923
|
+
"data-role": "icon-button",
|
|
2924
|
+
"aria-label": label,
|
|
2925
|
+
className: classes(IconButton_module_css_default.iconButton, size === "sm" ? IconButton_module_css_default.sm : void 0, shape === "circle" ? IconButton_module_css_default.circle : void 0, className),
|
|
2926
|
+
...rest,
|
|
2927
|
+
children
|
|
2928
|
+
});
|
|
2929
|
+
}
|
|
2930
|
+
//#endregion
|
|
2931
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/ModelRouteList.module.css.mjs
|
|
2932
|
+
const css$3 = "._2eBkWq_list{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg);gap:6px;min-width:0;max-height:280px;margin:0;padding:10px;display:grid;overflow:auto}._2eBkWq_group{gap:6px;display:grid}._2eBkWq_group+._2eBkWq_group{border-top:.5px solid var(--dsw-alias-border-l3);margin-top:4px;padding-top:10px}._2eBkWq_provider{color:var(--dsw-alias-label-tertiary);padding:0 6px;font-size:11px;font-weight:500}._2eBkWq_item{border-radius:var(--dsw-radius-md);cursor:pointer;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;min-width:0;padding:6px;display:grid}._2eBkWq_item:hover{background:var(--dsw-alias-bg-layer-4)}._2eBkWq_item:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}._2eBkWq_item[aria-disabled=true]{cursor:not-allowed;opacity:.4}._2eBkWq_picked{background:var(--dsw-alias-interactive-bg-hover)}._2eBkWq_text{min-width:0}._2eBkWq_name{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-size:13px;display:block;overflow:hidden}._2eBkWq_id{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-tertiary);margin-top:2px;font-size:11px;display:block;overflow:hidden}._2eBkWq_notice{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:1.5}._2eBkWq_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px;line-height:1.5}";
|
|
2933
|
+
const tagId$3 = "@morlay/dsh-client-ui-primitives/ModelRouteList.module.css";
|
|
2934
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/dsh-client-ui-primitives/ModelRouteList.module.css\"]") === null) {
|
|
2935
|
+
const tag = document.createElement("style");
|
|
2936
|
+
tag.dataset.plugin = "@morlay/dsh-client-ui-primitives";
|
|
2937
|
+
tag.dataset.pluginCss = tagId$3;
|
|
2938
|
+
tag.textContent = css$3;
|
|
2939
|
+
document.head.appendChild(tag);
|
|
2940
|
+
}
|
|
2941
|
+
var ModelRouteList_module_css_default = {
|
|
2942
|
+
"id": "_2eBkWq_id",
|
|
2943
|
+
"list": "_2eBkWq_list",
|
|
2944
|
+
"group": "_2eBkWq_group",
|
|
2945
|
+
"provider": "_2eBkWq_provider",
|
|
2946
|
+
"name": "_2eBkWq_name",
|
|
2947
|
+
"notice": "_2eBkWq_notice",
|
|
2948
|
+
"error": "_2eBkWq_error",
|
|
2949
|
+
"text": "_2eBkWq_text",
|
|
2950
|
+
"item": "_2eBkWq_item",
|
|
2951
|
+
"picked": "_2eBkWq_picked"
|
|
2952
|
+
};
|
|
2953
|
+
//#endregion
|
|
2954
|
+
//#region src/client/controls/ModelRouteList.tsx
|
|
2955
|
+
function ModelRouteList({ label, candidates, selectedKey, disabled = false, status, loadingLabel, errorLabel, emptyLabel, onSelect }) {
|
|
2956
|
+
if (status === "loading") return /* @__PURE__ */ jsx("p", {
|
|
2957
|
+
className: ModelRouteList_module_css_default.notice,
|
|
2958
|
+
role: "status",
|
|
2959
|
+
children: loadingLabel
|
|
2960
|
+
});
|
|
2961
|
+
if (status === "error") return /* @__PURE__ */ jsx("p", {
|
|
2962
|
+
className: ModelRouteList_module_css_default.error,
|
|
2963
|
+
role: "alert",
|
|
2964
|
+
children: errorLabel
|
|
2965
|
+
});
|
|
2966
|
+
if (candidates.length === 0) return /* @__PURE__ */ jsx("p", {
|
|
2967
|
+
className: ModelRouteList_module_css_default.notice,
|
|
2968
|
+
children: emptyLabel
|
|
2969
|
+
});
|
|
2970
|
+
const groups = /* @__PURE__ */ new Map();
|
|
2971
|
+
for (const candidate of candidates) {
|
|
2972
|
+
const group = groups.get(candidate.provider);
|
|
2973
|
+
if (group === void 0) groups.set(candidate.provider, {
|
|
2974
|
+
name: candidate.providerName,
|
|
2975
|
+
items: [candidate]
|
|
2976
|
+
});
|
|
2977
|
+
else group.items.push(candidate);
|
|
2978
|
+
}
|
|
2979
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2980
|
+
className: ModelRouteList_module_css_default.list,
|
|
2981
|
+
"data-role": "model-route-list",
|
|
2982
|
+
role: "radiogroup",
|
|
2983
|
+
"aria-label": label,
|
|
2984
|
+
"data-control": "model-routes",
|
|
2985
|
+
children: [...groups].map(([provider, group]) => /* @__PURE__ */ jsxs("div", {
|
|
2986
|
+
className: ModelRouteList_module_css_default.group,
|
|
2987
|
+
"data-route-group": provider,
|
|
2988
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2989
|
+
className: ModelRouteList_module_css_default.provider,
|
|
2990
|
+
children: group.name
|
|
2991
|
+
}), group.items.map((candidate) => {
|
|
2992
|
+
const picked = candidate.key === selectedKey;
|
|
2993
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2994
|
+
className: classes(ModelRouteList_module_css_default.item, picked ? ModelRouteList_module_css_default.picked : void 0),
|
|
2995
|
+
role: "radio",
|
|
2996
|
+
"aria-checked": picked,
|
|
2997
|
+
"aria-label": `${candidate.modelName} ${candidate.provider}/${candidate.model}`,
|
|
2998
|
+
"aria-disabled": disabled ? true : void 0,
|
|
2999
|
+
tabIndex: disabled ? -1 : 0,
|
|
3000
|
+
"data-route": candidate.key,
|
|
3001
|
+
onClick: () => {
|
|
3002
|
+
if (!disabled) onSelect(candidate);
|
|
3003
|
+
},
|
|
3004
|
+
onKeyDown: (event) => {
|
|
3005
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
3006
|
+
event.preventDefault();
|
|
3007
|
+
if (!disabled) onSelect(candidate);
|
|
3008
|
+
},
|
|
3009
|
+
children: [picked ? /* @__PURE__ */ jsx(IconCheckOutlineRegular, {}) : /* @__PURE__ */ jsx("span", { "aria-hidden": "true" }), /* @__PURE__ */ jsxs("span", {
|
|
3010
|
+
className: ModelRouteList_module_css_default.text,
|
|
3011
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
3012
|
+
className: ModelRouteList_module_css_default.name,
|
|
3013
|
+
children: candidate.modelName
|
|
3014
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
3015
|
+
className: ModelRouteList_module_css_default.id,
|
|
3016
|
+
children: `${candidate.providerName} · ${candidate.provider}/${candidate.model}`
|
|
3017
|
+
})]
|
|
3018
|
+
})]
|
|
3019
|
+
}, candidate.key);
|
|
3020
|
+
})]
|
|
3021
|
+
}, provider))
|
|
3022
|
+
});
|
|
3023
|
+
}
|
|
3024
|
+
//#endregion
|
|
3025
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/MultilineField.module.css.mjs
|
|
3026
|
+
const css$2 = "._stHfW_multiline{box-sizing:border-box;width:100%;min-height:64px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3);border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);resize:vertical;padding:6px 12px;font-family:inherit;font-size:13px;line-height:1.5}._stHfW_multiline:disabled{cursor:not-allowed;opacity:.4}._stHfW_multiline:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}";
|
|
3027
|
+
const tagId$2 = "@morlay/dsh-client-ui-primitives/MultilineField.module.css";
|
|
3028
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/dsh-client-ui-primitives/MultilineField.module.css\"]") === null) {
|
|
3029
|
+
const tag = document.createElement("style");
|
|
3030
|
+
tag.dataset.plugin = "@morlay/dsh-client-ui-primitives";
|
|
3031
|
+
tag.dataset.pluginCss = tagId$2;
|
|
3032
|
+
tag.textContent = css$2;
|
|
3033
|
+
document.head.appendChild(tag);
|
|
3034
|
+
}
|
|
3035
|
+
var MultilineField_module_css_default = { "multiline": "_stHfW_multiline" };
|
|
3036
|
+
//#endregion
|
|
3037
|
+
//#region src/client/controls/MultilineField.tsx
|
|
3038
|
+
function MultilineField({ rows = 3, className, ...rest }) {
|
|
3039
|
+
return /* @__PURE__ */ jsx("textarea", {
|
|
3040
|
+
rows,
|
|
3041
|
+
"data-role": "multiline-field",
|
|
3042
|
+
className: classes(MultilineField_module_css_default.multiline, className),
|
|
3043
|
+
...rest
|
|
3044
|
+
});
|
|
3045
|
+
}
|
|
3046
|
+
//#endregion
|
|
3047
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/SearchSelect.module.css.mjs
|
|
3048
|
+
const css$1 = ".BtUTmW_trigger{white-space:nowrap;height:32px}.BtUTmW_searchRow{border-bottom:.5px solid var(--dsw-alias-border-l2);align-items:center;padding:4px 8px 8px;display:flex}.BtUTmW_searchInput{width:100%;color:var(--dsw-alias-label-primary);background:0 0;border:none;outline:none;padding:2px 0;font-family:inherit;font-size:13px;line-height:1.5}.BtUTmW_empty{color:var(--dsw-alias-label-tertiary);margin:0;padding:8px;font-size:12px;line-height:1.5}";
|
|
3049
|
+
const tagId$1 = "@morlay/dsh-client-ui-primitives/SearchSelect.module.css";
|
|
3050
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/dsh-client-ui-primitives/SearchSelect.module.css\"]") === null) {
|
|
3051
|
+
const tag = document.createElement("style");
|
|
3052
|
+
tag.dataset.plugin = "@morlay/dsh-client-ui-primitives";
|
|
3053
|
+
tag.dataset.pluginCss = tagId$1;
|
|
3054
|
+
tag.textContent = css$1;
|
|
3055
|
+
document.head.appendChild(tag);
|
|
3056
|
+
}
|
|
3057
|
+
var SearchSelect_module_css_default = {
|
|
3058
|
+
"searchRow": "BtUTmW_searchRow",
|
|
3059
|
+
"searchInput": "BtUTmW_searchInput",
|
|
3060
|
+
"empty": "BtUTmW_empty",
|
|
3061
|
+
"trigger": "BtUTmW_trigger"
|
|
3062
|
+
};
|
|
3063
|
+
//#endregion
|
|
3064
|
+
//#region src/client/controls/SearchSelect.tsx
|
|
3065
|
+
function SearchSelect({ label, value, emptyLabel, options, disabled = false, searchLabel, noMatchLabel, onSelect }) {
|
|
3066
|
+
const [open, setOpen] = useState(false);
|
|
3067
|
+
const [query, setQuery] = useState("");
|
|
3068
|
+
const searchRef = useRef(null);
|
|
3069
|
+
useEffect(() => {
|
|
3070
|
+
if (open) searchRef.current?.focus();
|
|
3071
|
+
}, [open]);
|
|
3072
|
+
const matches = useMemo(() => rankByName(options.map((option) => ({
|
|
3073
|
+
value: option.value,
|
|
3074
|
+
name: option.label ?? option.value,
|
|
3075
|
+
label: option.value
|
|
3076
|
+
})), query), [options, query]);
|
|
3077
|
+
const current = options.find((option) => option.value === value);
|
|
3078
|
+
const close = () => {
|
|
3079
|
+
setOpen(false);
|
|
3080
|
+
setQuery("");
|
|
3081
|
+
};
|
|
3082
|
+
const pick = (next) => {
|
|
3083
|
+
close();
|
|
3084
|
+
onSelect(next);
|
|
3085
|
+
};
|
|
3086
|
+
return /* @__PURE__ */ jsxs(Menu, {
|
|
3087
|
+
open,
|
|
3088
|
+
anchor: /* @__PURE__ */ jsx(Button$1, {
|
|
3089
|
+
variant: "outline",
|
|
3090
|
+
size: "sm",
|
|
3091
|
+
"data-role": "search-select",
|
|
3092
|
+
className: classes(SearchSelect_module_css_default.trigger),
|
|
3093
|
+
"data-action": "pick",
|
|
3094
|
+
disabled,
|
|
3095
|
+
"aria-haspopup": "menu",
|
|
3096
|
+
"aria-label": label,
|
|
3977
3097
|
onClick: () => {
|
|
3978
|
-
|
|
3098
|
+
if (open) close();
|
|
3099
|
+
else setOpen(true);
|
|
3979
3100
|
},
|
|
3980
|
-
children:
|
|
3981
|
-
}) : null] }), props.overridden ? /* @__PURE__ */ jsxs(Badges, { children: [/* @__PURE__ */ jsx(NeutralBadge, { children: props.overriddenLabel }), /* @__PURE__ */ jsx(Reset, {
|
|
3982
|
-
type: "button",
|
|
3983
|
-
disabled: props.disabled,
|
|
3984
|
-
onClick: props.onReset,
|
|
3985
|
-
children: props.resetLabel
|
|
3986
|
-
})] }) : null] }),
|
|
3987
|
-
/* @__PURE__ */ jsx(Input$1, {
|
|
3988
|
-
id: props.id,
|
|
3989
|
-
type: "text",
|
|
3990
|
-
...props.numeric === true ? { inputMode: "numeric" } : {},
|
|
3991
|
-
...props.invalid ? { "aria-invalid": true } : {},
|
|
3992
|
-
"aria-describedby": description || void 0,
|
|
3993
|
-
value: props.text,
|
|
3994
|
-
placeholder: props.placeholder ?? "",
|
|
3995
|
-
disabled: props.disabled,
|
|
3996
|
-
onChange: (event) => {
|
|
3997
|
-
props.onEdit(event.target.value);
|
|
3998
|
-
}
|
|
3999
|
-
}),
|
|
4000
|
-
hasMessage ? props.invalid ? /* @__PURE__ */ jsx(Invalid, {
|
|
4001
|
-
id: messageId,
|
|
4002
|
-
children: props.invalidLabel
|
|
4003
|
-
}) : /* @__PURE__ */ jsx(Hint, {
|
|
4004
|
-
id: messageId,
|
|
4005
|
-
children: props.hint
|
|
4006
|
-
}) : null,
|
|
4007
|
-
props.help !== void 0 && helpOpen ? /* @__PURE__ */ jsx(Help, {
|
|
4008
|
-
id: helpId,
|
|
4009
|
-
role: "region",
|
|
4010
|
-
"aria-label": props.help.label,
|
|
4011
|
-
children: props.help.content
|
|
4012
|
-
}) : null
|
|
4013
|
-
] });
|
|
4014
|
-
}
|
|
4015
|
-
function SettingsSecretField(props) {
|
|
4016
|
-
const Badge = props.configured ? NeutralBadge : QuietBadge;
|
|
4017
|
-
return /* @__PURE__ */ jsxs(Field, { children: [
|
|
4018
|
-
/* @__PURE__ */ jsxs(Head, { children: [/* @__PURE__ */ jsx(HeadLabel, {
|
|
4019
|
-
htmlFor: props.id,
|
|
4020
|
-
children: props.label
|
|
4021
|
-
}), /* @__PURE__ */ jsx(Badges, { children: /* @__PURE__ */ jsx(Badge, { children: props.stateLabel }) })] }),
|
|
4022
|
-
/* @__PURE__ */ jsx(Input$1, {
|
|
4023
|
-
id: props.id,
|
|
4024
|
-
type: "password",
|
|
4025
|
-
autoComplete: "new-password",
|
|
4026
|
-
value: props.text,
|
|
4027
|
-
disabled: props.disabled,
|
|
4028
|
-
onChange: (event) => {
|
|
4029
|
-
props.onEdit(event.target.value);
|
|
4030
|
-
}
|
|
3101
|
+
children: value === "" ? emptyLabel : current?.label ?? value
|
|
4031
3102
|
}),
|
|
4032
|
-
|
|
4033
|
-
|
|
3103
|
+
selectedId: value,
|
|
3104
|
+
onSelect: pick,
|
|
3105
|
+
onClose: close,
|
|
3106
|
+
children: [
|
|
3107
|
+
/* @__PURE__ */ jsx("div", {
|
|
3108
|
+
className: SearchSelect_module_css_default.searchRow,
|
|
3109
|
+
children: /* @__PURE__ */ jsx("input", {
|
|
3110
|
+
className: SearchSelect_module_css_default.searchInput,
|
|
3111
|
+
ref: searchRef,
|
|
3112
|
+
value: query,
|
|
3113
|
+
"aria-label": searchLabel,
|
|
3114
|
+
placeholder: searchLabel,
|
|
3115
|
+
onChange: (event) => {
|
|
3116
|
+
setQuery(event.currentTarget.value);
|
|
3117
|
+
}
|
|
3118
|
+
})
|
|
3119
|
+
}),
|
|
3120
|
+
/* @__PURE__ */ jsx(MenuItemButton, {
|
|
3121
|
+
icon: value === "" ? /* @__PURE__ */ jsx(IconCheckOutlineRegular, {}) : void 0,
|
|
3122
|
+
onSelect: () => {
|
|
3123
|
+
pick("");
|
|
3124
|
+
},
|
|
3125
|
+
children: emptyLabel
|
|
3126
|
+
}),
|
|
3127
|
+
matches.map((option) => /* @__PURE__ */ jsx(MenuItemButton, {
|
|
3128
|
+
icon: option.value === value ? /* @__PURE__ */ jsx(IconCheckOutlineRegular, {}) : void 0,
|
|
3129
|
+
onSelect: () => {
|
|
3130
|
+
pick(option.value);
|
|
3131
|
+
},
|
|
3132
|
+
children: option.name
|
|
3133
|
+
}, option.value)),
|
|
3134
|
+
matches.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
3135
|
+
className: SearchSelect_module_css_default.empty,
|
|
3136
|
+
children: noMatchLabel
|
|
3137
|
+
}) : null
|
|
3138
|
+
]
|
|
3139
|
+
});
|
|
4034
3140
|
}
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
}
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
flex: 1,
|
|
4054
|
-
minWidth: 0,
|
|
4055
|
-
margin: 0,
|
|
4056
|
-
fontSize: "12px",
|
|
4057
|
-
lineHeight: 1.5,
|
|
4058
|
-
color: "var(--dsw-alias-label-error)"
|
|
4059
|
-
},
|
|
4060
|
-
save: {
|
|
4061
|
-
appearance: "none",
|
|
4062
|
-
border: "1px solid transparent",
|
|
4063
|
-
borderRadius: "8px",
|
|
4064
|
-
padding: "5px 14px",
|
|
4065
|
-
font: "inherit",
|
|
4066
|
-
fontSize: "13px",
|
|
4067
|
-
lineHeight: 1.5,
|
|
4068
|
-
cursor: "pointer",
|
|
4069
|
-
background: dsw.alias.label.primary,
|
|
4070
|
-
color: dsw.alias.bg.layer["3"],
|
|
4071
|
-
"&:disabled": {
|
|
4072
|
-
opacity: .4,
|
|
4073
|
-
cursor: "default"
|
|
4074
|
-
},
|
|
4075
|
-
"&:focus-visible": {
|
|
4076
|
-
outline: focusRing,
|
|
4077
|
-
outlineOffset: "1px"
|
|
4078
|
-
}
|
|
3141
|
+
//#endregion
|
|
3142
|
+
//#region src/client/controls/tags.ts
|
|
3143
|
+
function parseTagList(text) {
|
|
3144
|
+
const seen = /* @__PURE__ */ new Set();
|
|
3145
|
+
const names = [];
|
|
3146
|
+
for (const raw of text.split(/[,,;;\t\n\r]+/u)) {
|
|
3147
|
+
const name = raw.trim();
|
|
3148
|
+
if (name === "" || seen.has(name)) continue;
|
|
3149
|
+
seen.add(name);
|
|
3150
|
+
names.push(name);
|
|
3151
|
+
}
|
|
3152
|
+
return names;
|
|
3153
|
+
}
|
|
3154
|
+
function mergeTags(current, incoming) {
|
|
3155
|
+
const merged = [...current];
|
|
3156
|
+
for (const name of incoming) {
|
|
3157
|
+
if (name === "" || merged.includes(name)) continue;
|
|
3158
|
+
merged.push(name);
|
|
4079
3159
|
}
|
|
3160
|
+
return merged;
|
|
3161
|
+
}
|
|
3162
|
+
//#endregion
|
|
3163
|
+
//#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/TagInput.module.css.mjs
|
|
3164
|
+
const css = ".Is5kta_row{align-items:flex-start;gap:8px;width:100%;display:flex}.Is5kta_anchor{flex:auto;width:100%;min-width:0;display:flex}.Is5kta_box{box-sizing:border-box;background:var(--dsw-alias-bg-layer-3);border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);flex-flow:wrap;align-items:center;gap:4px 6px;width:100%;min-height:32px;padding:4px 8px;display:flex}.Is5kta_input{min-width:120px;color:var(--dsw-alias-label-primary);background:0 0;border:none;outline:none;flex:120px;padding:2px 0;font-family:inherit;font-size:13px;line-height:1.5}.Is5kta_chip{corner-shape:round;white-space:nowrap;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform);border-radius:999px;align-items:center;gap:2px;padding:1px 4px 1px 8px;font-size:11px;font-weight:500;line-height:17px;display:inline-flex}.Is5kta_chipRemove{box-sizing:border-box;width:14px;height:14px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:999px;flex:none;justify-content:center;align-items:center;padding:0;line-height:1;display:inline-flex}.Is5kta_chipRemove:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.Is5kta_chipRemove:disabled{cursor:not-allowed;opacity:.4}.Is5kta_chipRemove:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:0}.Is5kta_empty{color:var(--dsw-alias-label-tertiary);margin:0;padding:8px;font-size:12px;line-height:1.5}";
|
|
3165
|
+
const tagId = "@morlay/dsh-client-ui-primitives/TagInput.module.css";
|
|
3166
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/dsh-client-ui-primitives/TagInput.module.css\"]") === null) {
|
|
3167
|
+
const tag = document.createElement("style");
|
|
3168
|
+
tag.dataset.plugin = "@morlay/dsh-client-ui-primitives";
|
|
3169
|
+
tag.dataset.pluginCss = tagId;
|
|
3170
|
+
tag.textContent = css;
|
|
3171
|
+
document.head.appendChild(tag);
|
|
3172
|
+
}
|
|
3173
|
+
var TagInput_module_css_default = {
|
|
3174
|
+
"empty": "Is5kta_empty",
|
|
3175
|
+
"anchor": "Is5kta_anchor",
|
|
3176
|
+
"input": "Is5kta_input",
|
|
3177
|
+
"chip": "Is5kta_chip",
|
|
3178
|
+
"chipRemove": "Is5kta_chipRemove",
|
|
3179
|
+
"box": "Is5kta_box",
|
|
3180
|
+
"row": "Is5kta_row"
|
|
4080
3181
|
};
|
|
4081
3182
|
//#endregion
|
|
4082
|
-
//#region src/client/
|
|
4083
|
-
|
|
4084
|
-
const
|
|
4085
|
-
const
|
|
4086
|
-
const
|
|
4087
|
-
const
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
3183
|
+
//#region src/client/controls/TagInput.tsx
|
|
3184
|
+
function TagInput({ value, onChange, options, placeholder, label, disabled = false, noMatchLabel = "", removeLabel }) {
|
|
3185
|
+
const [draft, setDraft] = useState("");
|
|
3186
|
+
const [open, setOpen] = useState(false);
|
|
3187
|
+
const commit = (text) => {
|
|
3188
|
+
const names = parseTagList(text);
|
|
3189
|
+
if (names.length === 0) return;
|
|
3190
|
+
onChange(mergeTags(value, names));
|
|
3191
|
+
setDraft("");
|
|
3192
|
+
};
|
|
3193
|
+
const remaining = useMemo(() => (options ?? []).filter((option) => !value.includes(option.value)).map((option) => ({
|
|
3194
|
+
value: option.value,
|
|
3195
|
+
name: option.label ?? option.value,
|
|
3196
|
+
label: option.value
|
|
3197
|
+
})), [options, value]);
|
|
3198
|
+
const matches = useMemo(() => rankByName(remaining, draft), [remaining, draft]);
|
|
3199
|
+
return /* @__PURE__ */ jsx("div", {
|
|
3200
|
+
className: TagInput_module_css_default.row,
|
|
3201
|
+
"data-role": "tag-input",
|
|
3202
|
+
"data-control": "tags",
|
|
3203
|
+
children: /* @__PURE__ */ jsxs(Menu, {
|
|
3204
|
+
open: open && remaining.length > 0,
|
|
3205
|
+
className: TagInput_module_css_default.anchor,
|
|
3206
|
+
anchor: /* @__PURE__ */ jsxs("div", {
|
|
3207
|
+
className: TagInput_module_css_default.box,
|
|
3208
|
+
children: [value.map((name) => /* @__PURE__ */ jsxs("span", {
|
|
3209
|
+
className: TagInput_module_css_default.chip,
|
|
3210
|
+
"data-tag": name,
|
|
3211
|
+
children: [name, /* @__PURE__ */ jsx("button", {
|
|
3212
|
+
type: "button",
|
|
3213
|
+
className: TagInput_module_css_default.chipRemove,
|
|
3214
|
+
"data-action": "remove-tag",
|
|
3215
|
+
disabled,
|
|
3216
|
+
"aria-label": removeLabel(name),
|
|
3217
|
+
onClick: () => {
|
|
3218
|
+
onChange(value.filter((candidate) => candidate !== name));
|
|
3219
|
+
},
|
|
3220
|
+
children: /* @__PURE__ */ jsx(IconCloseOutlineRegular, { size: 10 })
|
|
3221
|
+
})]
|
|
3222
|
+
}, name)), /* @__PURE__ */ jsx("input", {
|
|
3223
|
+
className: TagInput_module_css_default.input,
|
|
3224
|
+
value: draft,
|
|
3225
|
+
placeholder: value.length === 0 ? placeholder : "",
|
|
3226
|
+
"aria-label": label,
|
|
3227
|
+
disabled,
|
|
3228
|
+
onFocus: () => {
|
|
3229
|
+
setOpen(true);
|
|
3230
|
+
},
|
|
3231
|
+
onBlur: () => {
|
|
3232
|
+
setOpen(false);
|
|
3233
|
+
},
|
|
3234
|
+
onChange: (event) => {
|
|
3235
|
+
setDraft(event.currentTarget.value);
|
|
3236
|
+
},
|
|
3237
|
+
onKeyDown: (event) => {
|
|
3238
|
+
if (event.key !== "Enter") return;
|
|
3239
|
+
event.preventDefault();
|
|
3240
|
+
commit(draft);
|
|
3241
|
+
},
|
|
3242
|
+
onPaste: (event) => {
|
|
3243
|
+
const text = event.clipboardData.getData("text");
|
|
3244
|
+
if (parseTagList(text).length < 2) return;
|
|
3245
|
+
event.preventDefault();
|
|
3246
|
+
commit(text);
|
|
3247
|
+
}
|
|
3248
|
+
})]
|
|
3249
|
+
}),
|
|
3250
|
+
onClose: () => {
|
|
3251
|
+
setOpen(false);
|
|
3252
|
+
},
|
|
3253
|
+
children: [matches.map((candidate) => /* @__PURE__ */ jsx("span", {
|
|
3254
|
+
onMouseDown: (event) => {
|
|
3255
|
+
event.preventDefault();
|
|
3256
|
+
},
|
|
3257
|
+
children: /* @__PURE__ */ jsx(MenuItemButton, {
|
|
3258
|
+
onSelect: () => {
|
|
3259
|
+
commit(candidate.value);
|
|
3260
|
+
},
|
|
3261
|
+
children: candidate.name
|
|
3262
|
+
})
|
|
3263
|
+
}, candidate.value)), matches.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
3264
|
+
className: TagInput_module_css_default.empty,
|
|
3265
|
+
"data-role": "tag-input-empty",
|
|
3266
|
+
children: noMatchLabel
|
|
3267
|
+
}) : null]
|
|
3268
|
+
})
|
|
4098
3269
|
});
|
|
4099
|
-
const blocked = !state.dirty || state.invalid || state.saving;
|
|
4100
|
-
return /* @__PURE__ */ jsxs(Form, { children: [
|
|
4101
|
-
!state.writable ? /* @__PURE__ */ jsx(Notice, {
|
|
4102
|
-
role: "status",
|
|
4103
|
-
children: labels.readOnly
|
|
4104
|
-
}) : null,
|
|
4105
|
-
props.children,
|
|
4106
|
-
/* @__PURE__ */ jsxs(Footer, { children: [state.failed ? /* @__PURE__ */ jsx(Failed, {
|
|
4107
|
-
role: "status",
|
|
4108
|
-
children: labels.saveFailed
|
|
4109
|
-
}) : null, /* @__PURE__ */ jsx(Save, {
|
|
4110
|
-
type: "button",
|
|
4111
|
-
disabled: blocked,
|
|
4112
|
-
onClick: props.onSave,
|
|
4113
|
-
children: state.saving ? labels.saving : labels.save
|
|
4114
|
-
})] })
|
|
4115
|
-
] });
|
|
4116
3270
|
}
|
|
4117
3271
|
//#endregion
|
|
4118
3272
|
//#region ../../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js
|
|
@@ -4573,4 +3727,4 @@ function apply(ctx) {
|
|
|
4573
3727
|
apply$1(ctx);
|
|
4574
3728
|
}
|
|
4575
3729
|
//#endregion
|
|
4576
|
-
export { ReferenceMarkdown, NS as SCHEMA_FORM_NS, SchemaFormController, SchemaFormHints,
|
|
3730
|
+
export { Bubble, Button, DisclosureRow, IconButton, ModelRouteList, MultilineField, ReferenceMarkdown, Row, NS as SCHEMA_FORM_NS, SchemaFormController, SchemaFormHints, SearchInput, SearchSelect, SeatButton, SettingsFieldRow, Spinner, Stack, Tabs, TagInput, Text, TimeLabel, VisuallyHidden, apply, failureOf, findReferences, formatReference, formatReferenceMention, inject, isLocalReference, markdownLabels, mergeTags, parseReference, parseReferenceToken, parseTagList, projectRoot, referenceMentions, rowRegistrations, schema_form_exports as schemaForm, walkFields };
|