@mastra/playground-ui 31.0.0-alpha.4 → 31.0.0-alpha.6
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/CHANGELOG.md +52 -0
- package/dist/index.cjs.js +197 -54
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +580 -79
- package/dist/index.es.js +198 -55
- package/dist/index.es.js.map +1 -1
- package/dist/src/ds/components/Checkbox/checkbox.stories.d.ts +3 -0
- package/dist/src/ds/components/CodeEditor/code-editor.d.ts +0 -1
- package/dist/src/ds/components/CodeEditor/code-languages.d.ts +8 -0
- package/dist/src/ds/components/CodeEditor/highlight.d.ts +2 -0
- package/dist/src/ds/components/CodeEditor/index.d.ts +2 -0
- package/dist/src/ds/components/RadioGroup/radio-group.stories.d.ts +2 -0
- package/dist/src/ds/components/Switch/switch.stories.d.ts +2 -0
- package/dist/src/index.d.ts +0 -1
- package/package.json +10 -8
- package/dist/src/ds/components/SelectElement/index.d.ts +0 -1
- package/dist/src/ds/components/SelectElement/select-element.stories.d.ts +0 -10
- package/dist/src/ds/components/SelectElement/select.d.ts +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
1
1
|
# @mastra/playground-ui
|
|
2
2
|
|
|
3
|
+
## 31.0.0-alpha.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Agent Builder starter agents now use the admin-configured default model when the model policy has one set. Previously, the starter ignored the admin default and always picked the first entry from the picker allowlist, which surfaced as "default model gets over-written by agent builder" on agents created from starter cards or the freeform prompt. ([#17424](https://github.com/mastra-ai/mastra/pull/17424))
|
|
8
|
+
|
|
9
|
+
When no admin default is set, behavior is unchanged: the starter falls back to the first allowed model, then to the hardcoded fallback.
|
|
10
|
+
|
|
11
|
+
- Improved switch focus, disabled, and motion states. ([#17416](https://github.com/mastra-ai/mastra/pull/17416))
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`860ec4e`](https://github.com/mastra-ai/mastra/commit/860ec4edf6aa508edfd4f34c312c141209eb0dbf), [`bb3fce8`](https://github.com/mastra-ai/mastra/commit/bb3fce8f8d80079170c0f98cb2efbb29ae34375d), [`19a8658`](https://github.com/mastra-ai/mastra/commit/19a86589c788ef48bb6c1b0612cc82a201857379), [`a659a77`](https://github.com/mastra-ai/mastra/commit/a659a779bdebe3a52a518c56d2260592d0240fe0), [`3332be9`](https://github.com/mastra-ai/mastra/commit/3332be9701ecd77aba840959d9a1d1ce7aef02d3), [`05d61e1`](https://github.com/mastra-ai/mastra/commit/05d61e18aa014a012a32ee9cb79cdcf3210dbe9d)]:
|
|
14
|
+
- @mastra/react@0.4.3-alpha.6
|
|
15
|
+
- @mastra/client-js@1.22.0-alpha.6
|
|
16
|
+
- @mastra/core@1.38.0-alpha.6
|
|
17
|
+
|
|
18
|
+
## 31.0.0-alpha.5
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Improved studio load time by only bundling the CodeMirror and Shiki languages the editor actually uses, and removed a redundant TypeScript pass from the playground-ui build. ([#17406](https://github.com/mastra-ai/mastra/pull/17406))
|
|
23
|
+
|
|
24
|
+
- Improved RadioGroup styling with neutral selected states, cleaner focus outlines, and surface-aware disabled states. ([#17401](https://github.com/mastra-ai/mastra/pull/17401))
|
|
25
|
+
|
|
26
|
+
- Removed the unused `ElementSelect` export from `@mastra/playground-ui`. Use the `Select` primitives instead. ([#17417](https://github.com/mastra-ai/mastra/pull/17417))
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
// Before
|
|
30
|
+
import { ElementSelect } from '@mastra/playground-ui';
|
|
31
|
+
|
|
32
|
+
<ElementSelect name="status" value={status} onChange={setStatus} options={['Draft', 'Published']} />;
|
|
33
|
+
|
|
34
|
+
// After
|
|
35
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@mastra/playground-ui';
|
|
36
|
+
|
|
37
|
+
<Select name="status" value={status} onValueChange={setStatus}>
|
|
38
|
+
<SelectTrigger>
|
|
39
|
+
<SelectValue placeholder="Select..." />
|
|
40
|
+
</SelectTrigger>
|
|
41
|
+
<SelectContent>
|
|
42
|
+
<SelectItem value="draft">Draft</SelectItem>
|
|
43
|
+
<SelectItem value="published">Published</SelectItem>
|
|
44
|
+
</SelectContent>
|
|
45
|
+
</Select>;
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
- Improved Checkbox styling with neutral selected states, cleaner focus outlines, and smoother state transitions. ([#17400](https://github.com/mastra-ai/mastra/pull/17400))
|
|
49
|
+
|
|
50
|
+
- Updated dependencies [[`a18775a`](https://github.com/mastra-ai/mastra/commit/a18775a693172546ee2378d39b67d4e32895b251), [`1baf2d1`](https://github.com/mastra-ai/mastra/commit/1baf2d152c6881338ff8f114633d5316fe13dd15), [`309f7c9`](https://github.com/mastra-ai/mastra/commit/309f7c9899ee6870a07a16690a091c6ba7af4e1e), [`66d65f5`](https://github.com/mastra-ai/mastra/commit/66d65f58e4b1f862c7f7928866a4426f8de9d583)]:
|
|
51
|
+
- @mastra/core@1.38.0-alpha.5
|
|
52
|
+
- @mastra/client-js@1.22.0-alpha.5
|
|
53
|
+
- @mastra/react@0.4.3-alpha.5
|
|
54
|
+
|
|
3
55
|
## 31.0.0-alpha.4
|
|
4
56
|
|
|
5
57
|
### Patch Changes
|
package/dist/index.cjs.js
CHANGED
|
@@ -9,7 +9,6 @@ const tooltip = require('@base-ui/react/tooltip');
|
|
|
9
9
|
const langJson = require('@codemirror/lang-json');
|
|
10
10
|
const langMarkdown = require('@codemirror/lang-markdown');
|
|
11
11
|
const language = require('@codemirror/language');
|
|
12
|
-
const languageData = require('@codemirror/language-data');
|
|
13
12
|
const state = require('@codemirror/state');
|
|
14
13
|
const view = require('@codemirror/view');
|
|
15
14
|
const highlight$1 = require('@lezer/highlight');
|
|
@@ -3745,6 +3744,66 @@ const Button = React.forwardRef(
|
|
|
3745
3744
|
);
|
|
3746
3745
|
Button.displayName = "Button";
|
|
3747
3746
|
|
|
3747
|
+
function legacy(parser) {
|
|
3748
|
+
return new language.LanguageSupport(language.StreamLanguage.define(parser));
|
|
3749
|
+
}
|
|
3750
|
+
const codeLanguages = [
|
|
3751
|
+
language.LanguageDescription.of({
|
|
3752
|
+
name: "JavaScript",
|
|
3753
|
+
alias: ["ecmascript", "js", "node"],
|
|
3754
|
+
extensions: ["js", "mjs", "cjs"],
|
|
3755
|
+
load() {
|
|
3756
|
+
return import('@codemirror/lang-javascript').then((m) => m.javascript());
|
|
3757
|
+
}
|
|
3758
|
+
}),
|
|
3759
|
+
language.LanguageDescription.of({
|
|
3760
|
+
name: "JSON",
|
|
3761
|
+
alias: ["json5"],
|
|
3762
|
+
extensions: ["json", "map"],
|
|
3763
|
+
load() {
|
|
3764
|
+
return import('@codemirror/lang-json').then((m) => m.json());
|
|
3765
|
+
}
|
|
3766
|
+
}),
|
|
3767
|
+
language.LanguageDescription.of({
|
|
3768
|
+
name: "JSX",
|
|
3769
|
+
extensions: ["jsx"],
|
|
3770
|
+
load() {
|
|
3771
|
+
return import('@codemirror/lang-javascript').then((m) => m.javascript({ jsx: true }));
|
|
3772
|
+
}
|
|
3773
|
+
}),
|
|
3774
|
+
language.LanguageDescription.of({
|
|
3775
|
+
name: "Markdown",
|
|
3776
|
+
extensions: ["md", "markdown", "mkd"],
|
|
3777
|
+
load() {
|
|
3778
|
+
return import('@codemirror/lang-markdown').then((m) => m.markdown());
|
|
3779
|
+
}
|
|
3780
|
+
}),
|
|
3781
|
+
language.LanguageDescription.of({
|
|
3782
|
+
name: "TSX",
|
|
3783
|
+
extensions: ["tsx"],
|
|
3784
|
+
load() {
|
|
3785
|
+
return import('@codemirror/lang-javascript').then((m) => m.javascript({ jsx: true, typescript: true }));
|
|
3786
|
+
}
|
|
3787
|
+
}),
|
|
3788
|
+
language.LanguageDescription.of({
|
|
3789
|
+
name: "TypeScript",
|
|
3790
|
+
alias: ["ts"],
|
|
3791
|
+
extensions: ["ts", "mts", "cts"],
|
|
3792
|
+
load() {
|
|
3793
|
+
return import('@codemirror/lang-javascript').then((m) => m.javascript({ typescript: true }));
|
|
3794
|
+
}
|
|
3795
|
+
}),
|
|
3796
|
+
language.LanguageDescription.of({
|
|
3797
|
+
name: "Shell",
|
|
3798
|
+
alias: ["bash", "sh", "zsh"],
|
|
3799
|
+
extensions: ["sh", "ksh", "bash"],
|
|
3800
|
+
filename: /^PKGBUILD$/,
|
|
3801
|
+
load() {
|
|
3802
|
+
return import('@codemirror/legacy-modes/mode/shell').then((m) => legacy(m.shell));
|
|
3803
|
+
}
|
|
3804
|
+
})
|
|
3805
|
+
];
|
|
3806
|
+
|
|
3748
3807
|
function flattenSchemaToVariables(schema, maxDepth = 5) {
|
|
3749
3808
|
if (!schema?.properties) {
|
|
3750
3809
|
return [];
|
|
@@ -4273,7 +4332,7 @@ const CodeEditor = React.forwardRef(
|
|
|
4273
4332
|
if (language === "json") {
|
|
4274
4333
|
exts.push(langJson.jsonLanguage);
|
|
4275
4334
|
} else if (language === "markdown") {
|
|
4276
|
-
exts.push(langMarkdown.markdown({ base: langMarkdown.markdownLanguage, codeLanguages
|
|
4335
|
+
exts.push(langMarkdown.markdown({ base: langMarkdown.markdownLanguage, codeLanguages }));
|
|
4277
4336
|
exts.push(view.EditorView.lineWrapping);
|
|
4278
4337
|
}
|
|
4279
4338
|
if (highlightVariables && language === "markdown") {
|
|
@@ -4316,11 +4375,59 @@ const CodeEditor = React.forwardRef(
|
|
|
4316
4375
|
);
|
|
4317
4376
|
}
|
|
4318
4377
|
);
|
|
4378
|
+
|
|
4379
|
+
const langAliases = {
|
|
4380
|
+
js: "javascript",
|
|
4381
|
+
javascript: "javascript",
|
|
4382
|
+
mjs: "javascript",
|
|
4383
|
+
cjs: "javascript",
|
|
4384
|
+
node: "javascript",
|
|
4385
|
+
ts: "typescript",
|
|
4386
|
+
typescript: "typescript",
|
|
4387
|
+
mts: "typescript",
|
|
4388
|
+
cts: "typescript",
|
|
4389
|
+
tsx: "tsx",
|
|
4390
|
+
jsx: "jsx",
|
|
4391
|
+
json: "json",
|
|
4392
|
+
json5: "json",
|
|
4393
|
+
md: "markdown",
|
|
4394
|
+
markdown: "markdown",
|
|
4395
|
+
sh: "bash",
|
|
4396
|
+
bash: "bash",
|
|
4397
|
+
shell: "bash",
|
|
4398
|
+
zsh: "bash"
|
|
4399
|
+
};
|
|
4400
|
+
let highlighterPromise = null;
|
|
4401
|
+
function getHighlighter() {
|
|
4402
|
+
if (!highlighterPromise) {
|
|
4403
|
+
highlighterPromise = (async () => {
|
|
4404
|
+
const [{ createHighlighterCore }, { createJavaScriptRegexEngine }] = await Promise.all([
|
|
4405
|
+
import('shiki/core'),
|
|
4406
|
+
import('shiki/engine/javascript')
|
|
4407
|
+
]);
|
|
4408
|
+
return createHighlighterCore({
|
|
4409
|
+
themes: [import('shiki/themes/github-light.mjs'), import('shiki/themes/github-dark.mjs')],
|
|
4410
|
+
langs: [
|
|
4411
|
+
import('shiki/langs/javascript.mjs'),
|
|
4412
|
+
import('shiki/langs/typescript.mjs'),
|
|
4413
|
+
import('shiki/langs/tsx.mjs'),
|
|
4414
|
+
import('shiki/langs/jsx.mjs'),
|
|
4415
|
+
import('shiki/langs/json.mjs'),
|
|
4416
|
+
import('shiki/langs/bash.mjs'),
|
|
4417
|
+
import('shiki/langs/markdown.mjs')
|
|
4418
|
+
],
|
|
4419
|
+
engine: createJavaScriptRegexEngine()
|
|
4420
|
+
});
|
|
4421
|
+
})();
|
|
4422
|
+
}
|
|
4423
|
+
return highlighterPromise;
|
|
4424
|
+
}
|
|
4319
4425
|
async function highlight(code, language) {
|
|
4320
|
-
const
|
|
4321
|
-
if (!
|
|
4322
|
-
const
|
|
4323
|
-
|
|
4426
|
+
const lang = langAliases[language?.toLowerCase()];
|
|
4427
|
+
if (!lang) return null;
|
|
4428
|
+
const highlighter = await getHighlighter();
|
|
4429
|
+
const { tokens } = highlighter.codeToTokens(code, {
|
|
4430
|
+
lang,
|
|
4324
4431
|
defaultColor: false,
|
|
4325
4432
|
themes: {
|
|
4326
4433
|
light: "github-light",
|
|
@@ -6173,28 +6280,38 @@ const Checkbox = React__namespace.forwardRef(
|
|
|
6173
6280
|
ref,
|
|
6174
6281
|
checked: isCheckedIndeterminate ? false : checked,
|
|
6175
6282
|
indeterminate: indeterminate ?? isCheckedIndeterminate,
|
|
6283
|
+
"data-slot": "checkbox",
|
|
6176
6284
|
className: cn(
|
|
6177
|
-
"peer h-4 w-4 shrink-0
|
|
6178
|
-
"
|
|
6179
|
-
"shadow-sm",
|
|
6285
|
+
"peer flex h-4 w-4 shrink-0 cursor-pointer items-center justify-center rounded-[0.3125rem]",
|
|
6286
|
+
"border border-neutral6/[0.06] bg-neutral6/[0.12] text-surface1 outline-hidden",
|
|
6180
6287
|
transitions.all,
|
|
6181
|
-
"hover:border-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
"data-[
|
|
6185
|
-
"data-[
|
|
6186
|
-
"data-[
|
|
6187
|
-
"data-[
|
|
6288
|
+
"hover:border-neutral6/[0.12] hover:bg-neutral6/[0.16]",
|
|
6289
|
+
"active:scale-95 active:border-neutral6/[0.18] active:bg-neutral6/[0.18]",
|
|
6290
|
+
"focus-visible:border-neutral5/50 focus-visible:outline focus-visible:outline-1 focus-visible:outline-offset-2 focus-visible:outline-neutral5/55",
|
|
6291
|
+
"data-[checked]:border-neutral6 data-[checked]:bg-neutral6 data-[checked]:text-surface1",
|
|
6292
|
+
"data-[indeterminate]:border-neutral6 data-[indeterminate]:bg-neutral6 data-[indeterminate]:text-surface1",
|
|
6293
|
+
"data-[checked]:hover:border-neutral5 data-[checked]:hover:bg-neutral5",
|
|
6294
|
+
"data-[indeterminate]:hover:border-neutral5 data-[indeterminate]:hover:bg-neutral5",
|
|
6295
|
+
"data-[checked]:active:border-neutral4 data-[checked]:active:bg-neutral4",
|
|
6296
|
+
"data-[indeterminate]:active:border-neutral4 data-[indeterminate]:active:bg-neutral4",
|
|
6297
|
+
// Base UI's Checkbox.Root is a `<span>`, so `:disabled` never matches; target `data-disabled`.
|
|
6298
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:border-neutral6/[0.38] data-[disabled]:bg-neutral6/[0.38] data-[disabled]:hover:border-neutral6/[0.38] data-[disabled]:hover:bg-neutral6/[0.38] data-[disabled]:active:scale-100",
|
|
6299
|
+
"data-[disabled]:data-[checked]:border-neutral6/[0.38] data-[disabled]:data-[checked]:bg-neutral6/[0.38] data-[disabled]:data-[checked]:text-neutral6",
|
|
6300
|
+
"data-[disabled]:data-[indeterminate]:border-neutral6/[0.38] data-[disabled]:data-[indeterminate]:bg-neutral6/[0.38] data-[disabled]:data-[indeterminate]:text-neutral6",
|
|
6188
6301
|
className
|
|
6189
6302
|
),
|
|
6190
6303
|
...props,
|
|
6191
6304
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6192
6305
|
checkbox.Checkbox.Indicator,
|
|
6193
6306
|
{
|
|
6307
|
+
keepMounted: true,
|
|
6194
6308
|
className: cn(
|
|
6195
6309
|
"group/checkbox-indicator flex items-center justify-center text-current",
|
|
6196
|
-
"
|
|
6197
|
-
"data-[
|
|
6310
|
+
"opacity-0 scale-75 transition-[opacity,transform] duration-200 ease-out-custom",
|
|
6311
|
+
"data-[checked]:opacity-100 data-[checked]:scale-100",
|
|
6312
|
+
"data-[indeterminate]:opacity-100 data-[indeterminate]:scale-100",
|
|
6313
|
+
"data-[starting-style]:opacity-0 data-[starting-style]:scale-75",
|
|
6314
|
+
"data-[ending-style]:opacity-0 data-[ending-style]:scale-75"
|
|
6198
6315
|
),
|
|
6199
6316
|
children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxIndicatorIcon, {})
|
|
6200
6317
|
}
|
|
@@ -6206,8 +6323,30 @@ const Checkbox = React__namespace.forwardRef(
|
|
|
6206
6323
|
Checkbox.displayName = "Checkbox";
|
|
6207
6324
|
function CheckboxIndicatorIcon() {
|
|
6208
6325
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6209
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6210
|
-
|
|
6326
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6327
|
+
lucideReact.Check,
|
|
6328
|
+
{
|
|
6329
|
+
className: cn(
|
|
6330
|
+
"size-3 scale-95 stroke-[3.25] transition-[stroke-dashoffset,transform] duration-200 ease-out-custom",
|
|
6331
|
+
// Lucide's check path is ~22.6 units long. Use a longer dash so the
|
|
6332
|
+
// final checked mark is never clipped.
|
|
6333
|
+
"[stroke-dasharray:28] [stroke-dashoffset:28]",
|
|
6334
|
+
"group-data-[checked]/checkbox-indicator:[stroke-dashoffset:0]",
|
|
6335
|
+
"group-data-[checked]/checkbox-indicator:scale-100",
|
|
6336
|
+
"group-data-[indeterminate]/checkbox-indicator:hidden"
|
|
6337
|
+
)
|
|
6338
|
+
}
|
|
6339
|
+
),
|
|
6340
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6341
|
+
lucideReact.Minus,
|
|
6342
|
+
{
|
|
6343
|
+
className: cn(
|
|
6344
|
+
"hidden size-3 scale-95 stroke-[3.25] transition-transform duration-200 ease-out-custom",
|
|
6345
|
+
"group-data-[indeterminate]/checkbox-indicator:block",
|
|
6346
|
+
"group-data-[indeterminate]/checkbox-indicator:scale-100"
|
|
6347
|
+
)
|
|
6348
|
+
}
|
|
6349
|
+
)
|
|
6211
6350
|
] });
|
|
6212
6351
|
}
|
|
6213
6352
|
|
|
@@ -8732,7 +8871,7 @@ const ButtonsGroupText = React__namespace.forwardRef(
|
|
|
8732
8871
|
ButtonsGroupText.displayName = "ButtonsGroupText";
|
|
8733
8872
|
|
|
8734
8873
|
const RadioGroup = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
8735
|
-
return /* @__PURE__ */ jsxRuntime.jsx(radioGroup.RadioGroup, { ref, className: cn("grid gap-2", className), ...props });
|
|
8874
|
+
return /* @__PURE__ */ jsxRuntime.jsx(radioGroup.RadioGroup, { ref, "data-slot": "radio-group", className: cn("grid gap-2", className), ...props });
|
|
8736
8875
|
});
|
|
8737
8876
|
RadioGroup.displayName = "RadioGroup";
|
|
8738
8877
|
const RadioGroupItem = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
@@ -8740,31 +8879,36 @@ const RadioGroupItem = React__namespace.forwardRef(({ className, ...props }, ref
|
|
|
8740
8879
|
radio.Radio.Root,
|
|
8741
8880
|
{
|
|
8742
8881
|
ref,
|
|
8882
|
+
"data-slot": "radio-group-item",
|
|
8743
8883
|
className: cn(
|
|
8744
|
-
|
|
8745
|
-
|
|
8746
|
-
// take effect and keep the control square inside flex rows.
|
|
8747
|
-
"flex shrink-0 items-center justify-center",
|
|
8748
|
-
"aspect-square h-4 w-4 rounded-full border border-neutral3 text-neutral6",
|
|
8749
|
-
"shadow-sm",
|
|
8884
|
+
"flex h-4 w-4 shrink-0 cursor-pointer items-center justify-center rounded-full",
|
|
8885
|
+
"border border-neutral6/[0.06] bg-neutral6/[0.12] text-surface1 outline-hidden",
|
|
8750
8886
|
transitions.all,
|
|
8751
|
-
"hover:border-
|
|
8752
|
-
|
|
8753
|
-
|
|
8754
|
-
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 data-[disabled]:hover:border-neutral3 data-[disabled]:hover:shadow-sm",
|
|
8887
|
+
"hover:border-neutral6/[0.12] hover:bg-neutral6/[0.16]",
|
|
8888
|
+
"active:scale-95 active:border-neutral6/[0.18] active:bg-neutral6/[0.18]",
|
|
8889
|
+
"focus-visible:border-neutral5/50 focus-visible:outline focus-visible:outline-1 focus-visible:outline-offset-2 focus-visible:outline-neutral5/55",
|
|
8755
8890
|
// Base UI exposes `data-checked`/`data-unchecked` instead of Radix's `data-state`.
|
|
8756
|
-
"data-[checked]:border-
|
|
8891
|
+
"data-[checked]:border-neutral6 data-[checked]:bg-neutral6 data-[checked]:text-surface1",
|
|
8892
|
+
"data-[checked]:hover:border-neutral5 data-[checked]:hover:bg-neutral5",
|
|
8893
|
+
"data-[checked]:active:border-neutral4 data-[checked]:active:bg-neutral4",
|
|
8894
|
+
// Base UI's Radio.Root is a `<span>`, so `:disabled` never matches; target `data-disabled`.
|
|
8895
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:border-neutral6/[0.38] data-[disabled]:bg-neutral6/[0.38] data-[disabled]:hover:border-neutral6/[0.38] data-[disabled]:hover:bg-neutral6/[0.38] data-[disabled]:active:scale-100",
|
|
8896
|
+
"data-[disabled]:data-[checked]:border-neutral6/[0.38] data-[disabled]:data-[checked]:bg-neutral6/[0.38] data-[disabled]:data-[checked]:text-neutral6",
|
|
8757
8897
|
className
|
|
8758
8898
|
),
|
|
8759
8899
|
...props,
|
|
8760
8900
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8761
8901
|
radio.Radio.Indicator,
|
|
8762
8902
|
{
|
|
8903
|
+
keepMounted: true,
|
|
8763
8904
|
className: cn(
|
|
8764
|
-
"flex items-center justify-center",
|
|
8765
|
-
"
|
|
8905
|
+
"flex items-center justify-center text-current",
|
|
8906
|
+
"scale-50 opacity-0 transition-[opacity,scale] duration-200 ease-out-custom",
|
|
8907
|
+
"data-[checked]:scale-100 data-[checked]:opacity-100",
|
|
8908
|
+
"data-[starting-style]:scale-50 data-[starting-style]:opacity-0",
|
|
8909
|
+
"data-[ending-style]:scale-50 data-[ending-style]:opacity-0"
|
|
8766
8910
|
),
|
|
8767
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8911
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "size-1.5 rounded-full bg-current" })
|
|
8768
8912
|
}
|
|
8769
8913
|
)
|
|
8770
8914
|
}
|
|
@@ -9811,13 +9955,16 @@ const Switch = React__namespace.forwardRef(({ className, asChild, children, ...p
|
|
|
9811
9955
|
ref,
|
|
9812
9956
|
"data-slot": "switch",
|
|
9813
9957
|
className: cn(
|
|
9814
|
-
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-
|
|
9815
|
-
|
|
9816
|
-
|
|
9817
|
-
"
|
|
9818
|
-
"
|
|
9819
|
-
"data-[checked]:bg-
|
|
9820
|
-
"data-[
|
|
9958
|
+
"peer group/switch inline-flex h-5 w-9 shrink-0 cursor-pointer items-center overflow-hidden rounded-full border-0 bg-neutral6/[0.14] p-0.5 outline-hidden",
|
|
9959
|
+
"transition-colors duration-normal ease-out-custom motion-reduce:transition-none",
|
|
9960
|
+
"hover:bg-neutral6/[0.18]",
|
|
9961
|
+
"active:bg-neutral6/[0.22]",
|
|
9962
|
+
"focus-visible:outline focus-visible:outline-1 focus-visible:outline-offset-2 focus-visible:outline-neutral5/55",
|
|
9963
|
+
"data-[checked]:bg-neutral6/[0.92]",
|
|
9964
|
+
"data-[checked]:hover:bg-neutral6",
|
|
9965
|
+
"data-[checked]:active:bg-neutral5",
|
|
9966
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:bg-neutral6/[0.16] data-[disabled]:hover:bg-neutral6/[0.16]",
|
|
9967
|
+
"data-[disabled]:data-[checked]:bg-neutral6/[0.3] data-[disabled]:data-[checked]:hover:bg-neutral6/[0.3]",
|
|
9821
9968
|
className
|
|
9822
9969
|
),
|
|
9823
9970
|
...renderProps,
|
|
@@ -9827,11 +9974,14 @@ const Switch = React__namespace.forwardRef(({ className, asChild, children, ...p
|
|
|
9827
9974
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9828
9975
|
_switch.Switch.Thumb,
|
|
9829
9976
|
{
|
|
9977
|
+
"data-slot": "switch-thumb",
|
|
9830
9978
|
className: cn(
|
|
9831
|
-
"pointer-events-none block h-4 w-
|
|
9832
|
-
"transition-
|
|
9833
|
-
"
|
|
9834
|
-
"data-[checked]:
|
|
9979
|
+
"switch-thumb-motion pointer-events-none block h-4 w-5 rounded-full bg-neutral6",
|
|
9980
|
+
"transition-[background-color,translate,width,transform] duration-normal ease-out-custom motion-reduce:transition-none",
|
|
9981
|
+
"group-active/switch:w-6 group-data-[disabled]/switch:w-5",
|
|
9982
|
+
"data-[checked]:translate-x-3 data-[checked]:bg-surface1 data-[unchecked]:translate-x-0",
|
|
9983
|
+
"group-active/switch:data-[checked]:translate-x-2",
|
|
9984
|
+
"data-[disabled]:data-[unchecked]:bg-neutral6/[0.42] data-[disabled]:data-[checked]:bg-surface1/80"
|
|
9835
9985
|
)
|
|
9836
9986
|
}
|
|
9837
9987
|
)
|
|
@@ -11925,13 +12075,6 @@ function SectionCard({
|
|
|
11925
12075
|
);
|
|
11926
12076
|
}
|
|
11927
12077
|
|
|
11928
|
-
function ElementSelect({ name, onChange, value, options, placeholder }) {
|
|
11929
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Select, { name, onValueChange: onChange, value, children: [
|
|
11930
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: placeholder || "Select..." }) }),
|
|
11931
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: (options || []).map((option, idx) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: `${idx}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 [&>svg]:w-[1.2em] [&>svg]:h-[1.2em] [&>svg]:text-neutral3", children: option }) }, option)) })
|
|
11932
|
-
] });
|
|
11933
|
-
}
|
|
11934
|
-
|
|
11935
12078
|
function SettingsRow({ label, description, htmlFor, className, children }) {
|
|
11936
12079
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11937
12080
|
"div",
|
|
@@ -22403,7 +22546,6 @@ exports.DrawerTrigger = DrawerTrigger;
|
|
|
22403
22546
|
exports.DrawerViewport = DrawerViewport;
|
|
22404
22547
|
exports.DropdownMenu = DropdownMenu;
|
|
22405
22548
|
exports.EXTENSION_TO_MIME = EXTENSION_TO_MIME;
|
|
22406
|
-
exports.ElementSelect = ElementSelect;
|
|
22407
22549
|
exports.EmptyState = EmptyState;
|
|
22408
22550
|
exports.Entity = Entity;
|
|
22409
22551
|
exports.EntityContent = EntityContent;
|
|
@@ -22668,6 +22810,7 @@ exports.clearSavedLogsFilters = clearSavedLogsFilters;
|
|
|
22668
22810
|
exports.clearSavedMetricsFilters = clearSavedMetricsFilters;
|
|
22669
22811
|
exports.clearSavedTraceFilters = clearSavedTraceFilters;
|
|
22670
22812
|
exports.cn = cn;
|
|
22813
|
+
exports.codeLanguages = codeLanguages;
|
|
22671
22814
|
exports.comboboxStyles = comboboxStyles;
|
|
22672
22815
|
exports.countLeafRules = countLeafRules;
|
|
22673
22816
|
exports.createDefaultRule = createDefaultRule;
|