slexkit 0.3.0 → 0.3.1
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 +18 -0
- package/README.md +4 -3
- package/README.zh-CN.md +4 -3
- package/dist/ai/llms-components.txt +2 -1
- package/dist/ai/llms-full.txt +73 -42
- package/dist/ai/llms-runtime.txt +11 -12
- package/dist/ai/llms.txt +1 -1
- package/dist/ai/slexkit-ai-manifest.json +77 -73
- package/dist/components/checkbox.js +1 -0
- package/dist/components/choice.css +2 -2
- package/dist/components/display.css +1 -1
- package/dist/components/index.js +56 -153
- package/dist/components/input.css +53 -119
- package/dist/components/input.js +33 -143
- package/dist/components/radio-group.js +1 -0
- package/dist/components/select.css +0 -6
- package/dist/components/slider.css +27 -18
- package/dist/components/specs.js +2 -1
- package/dist/components/switch.css +3 -3
- package/dist/components/switch.js +1 -0
- package/dist/components/text-input.css +21 -90
- package/dist/components/text.js +12 -0
- package/dist/components/tooling.css +0 -1
- package/dist/runtime.cjs +22 -5
- package/dist/runtime.js +22 -5
- package/dist/slexkit.cjs +78 -158
- package/dist/slexkit.css +54 -121
- package/dist/slexkit.js +78 -158
- package/dist/types/version.d.ts +2 -2
- package/dist/umd/slexkit.tooling.umd.js +77 -158
- package/dist/umd/slexkit.umd.js +78 -158
- package/package.json +3 -2
- package/skills/slexkit-host-integration/SKILL.md +1 -1
- package/src/components/svelte/display/Text.svelte +14 -1
- package/src/components/svelte/input/Checkbox.svelte +1 -1
- package/src/components/svelte/input/Input.svelte +0 -110
- package/src/components/svelte/input/RadioGroup.svelte +1 -1
- package/src/components/svelte/input/Switch.svelte +1 -1
- package/src/styles/components/choice.css +2 -2
- package/src/styles/components/select.css +0 -6
- package/src/styles/components/slider.css +27 -18
- package/src/styles/components/switch.css +3 -3
- package/src/styles/components/text-input.css +21 -90
- package/src/styles/display.css +1 -1
- package/src/styles/tooling.css +0 -1
package/dist/slexkit.cjs
CHANGED
|
@@ -783,6 +783,9 @@ function isWritableComponent(type) {
|
|
|
783
783
|
const mode = getComponentStateMode(type);
|
|
784
784
|
return mode === "value" || mode === "checked" || mode === "enabled";
|
|
785
785
|
}
|
|
786
|
+
function isReadableComponent(type) {
|
|
787
|
+
return getComponentStateMode(type) === "readable";
|
|
788
|
+
}
|
|
786
789
|
function isStatefulComponent(type) {
|
|
787
790
|
return getComponentStateMode(type) !== "none";
|
|
788
791
|
}
|
|
@@ -899,7 +902,10 @@ function createGProxy(g, components, componentTypes) {
|
|
|
899
902
|
function ensureComponentState(name, type, components, componentTypes) {
|
|
900
903
|
if (!components[name])
|
|
901
904
|
components[name] = {};
|
|
902
|
-
componentTypes[name]
|
|
905
|
+
const previousType = componentTypes[name] ?? "";
|
|
906
|
+
if (!(isWritableComponent(previousType) && isReadableComponent(type))) {
|
|
907
|
+
componentTypes[name] = type;
|
|
908
|
+
}
|
|
903
909
|
return components[name];
|
|
904
910
|
}
|
|
905
911
|
function syncReadableComponentProp(type, state, propName, value) {
|
|
@@ -927,6 +933,9 @@ function syncReadableComponentProp(type, state, propName, value) {
|
|
|
927
933
|
function syncComponentProps(type, name, props, components, componentTypes) {
|
|
928
934
|
if (!name || !isStatefulComponent(type))
|
|
929
935
|
return;
|
|
936
|
+
const previousType = componentTypes[name] ?? "";
|
|
937
|
+
if (isWritableComponent(previousType) && isReadableComponent(type))
|
|
938
|
+
return;
|
|
930
939
|
const state = ensureComponentState(name, type, components, componentTypes);
|
|
931
940
|
if (type === "input" && typeof props.type === "string") {
|
|
932
941
|
assignInputType(state, props.type);
|
|
@@ -991,7 +1000,7 @@ function seedStaticComponentState(type, state, props) {
|
|
|
991
1000
|
function warnDuplicateState(ns, name, currentType, currentPath, previous) {
|
|
992
1001
|
console.warn(`[SlexKit][${ns}] Component state '${name}' is declared more than once at ${previous.path} and ${currentPath}; state is shared by namespace and component name.`);
|
|
993
1002
|
if (previous.type !== currentType) {
|
|
994
|
-
console.warn(`[SlexKit][${ns}] Component state '${name}' is used by multiple component types (${previous.type}, ${currentType});
|
|
1003
|
+
console.warn(`[SlexKit][${ns}] Component state '${name}' is used by multiple component types (${previous.type}, ${currentType}); use distinct names when components should not share state.`);
|
|
995
1004
|
}
|
|
996
1005
|
}
|
|
997
1006
|
function dynamicStateBinding(type, props) {
|
|
@@ -1003,6 +1012,9 @@ function isMirroredValueControlPair(previousType, currentType) {
|
|
|
1003
1012
|
return previousType === "input" && currentType === "slider" || previousType === "slider" && currentType === "input";
|
|
1004
1013
|
}
|
|
1005
1014
|
function shouldWarnDuplicateState(currentType, currentBinding, previous) {
|
|
1015
|
+
if (isReadableComponent(previous.type) && isReadableComponent(currentType)) {
|
|
1016
|
+
return false;
|
|
1017
|
+
}
|
|
1006
1018
|
if (currentBinding && previous.stateBinding === currentBinding && isMirroredValueControlPair(previous.type, currentType)) {
|
|
1007
1019
|
return false;
|
|
1008
1020
|
}
|
|
@@ -1813,7 +1825,7 @@ ${parseSource}
|
|
|
1813
1825
|
var parseSlexKitDsl = parseSlexSource;
|
|
1814
1826
|
|
|
1815
1827
|
// src/version.ts
|
|
1816
|
-
var SLEXKIT_VERSION = "0.3.
|
|
1828
|
+
var SLEXKIT_VERSION = "0.3.1";
|
|
1817
1829
|
var SLEX_PROTOCOL_VERSION = "0.1";
|
|
1818
1830
|
var SLEXKIT_COMPONENTS_VERSION = SLEXKIT_VERSION;
|
|
1819
1831
|
function getSlexKitInfo() {
|
|
@@ -2941,7 +2953,6 @@ var inputSpec = component({
|
|
|
2941
2953
|
min: { type: "string | number", dynamic: true, description: "Minimum value used by numeric input controls." },
|
|
2942
2954
|
max: { type: "string | number", dynamic: true, description: "Maximum value used by numeric input controls." },
|
|
2943
2955
|
step: { type: "string | number", dynamic: true, description: "Step size used by numeric input controls." },
|
|
2944
|
-
controls: { type: "boolean", default: true, dynamic: true, description: "Show decrement and increment buttons for numeric inputs." },
|
|
2945
2956
|
onchange: { type: "write-expression", description: "Write expression invoked when the value changes." }
|
|
2946
2957
|
},
|
|
2947
2958
|
children: noChildren,
|
|
@@ -3449,6 +3460,8 @@ var textSpec = component({
|
|
|
3449
3460
|
content: { type: "string", dynamic: true, description: "Alias for text." },
|
|
3450
3461
|
label: { type: "string", dynamic: true, description: "Alias for text." },
|
|
3451
3462
|
variant: { type: "string", values: ["default", "muted"], default: "default", description: "Text visual variant." },
|
|
3463
|
+
color: { type: "string", dynamic: true, description: "Optional CSS color for controlled previews." },
|
|
3464
|
+
size: { type: "string | number", dynamic: true, description: "Optional font size. Numbers are treated as px." },
|
|
3452
3465
|
class: { type: "string", description: "Additional host-controlled CSS class." }
|
|
3453
3466
|
},
|
|
3454
3467
|
children: noChildren,
|
|
@@ -3819,7 +3832,11 @@ function isRenderableSource(value) {
|
|
|
3819
3832
|
return Object.keys(value).some((key) => key.includes(":"));
|
|
3820
3833
|
}
|
|
3821
3834
|
function bareLayoutFromSource(value) {
|
|
3822
|
-
const
|
|
3835
|
+
const layout = { ...value };
|
|
3836
|
+
delete layout.slex;
|
|
3837
|
+
delete layout.namespace;
|
|
3838
|
+
delete layout.g;
|
|
3839
|
+
delete layout.layout;
|
|
3823
3840
|
return layout;
|
|
3824
3841
|
}
|
|
3825
3842
|
function isStateOnlySource(value) {
|
|
@@ -12590,6 +12607,7 @@ function Checkbox($$anchor, $$props) {
|
|
|
12590
12607
|
reset(label2);
|
|
12591
12608
|
reset(span);
|
|
12592
12609
|
template_effect(($0, $1) => {
|
|
12610
|
+
set_attribute2(label2, "data-disabled", get2(p).disabled ? "true" : undefined);
|
|
12593
12611
|
input.disabled = !!get2(p).disabled;
|
|
12594
12612
|
set_attribute2(input, "data-state", get2(checked) ? "checked" : "unchecked");
|
|
12595
12613
|
set_attribute2(input, "aria-label", $0);
|
|
@@ -12665,6 +12683,7 @@ function Switch($$anchor, $$props) {
|
|
|
12665
12683
|
reset(span);
|
|
12666
12684
|
template_effect(($0, $1) => {
|
|
12667
12685
|
set_attribute2(label2, "data-state", get2(enabled) ? "on" : "off");
|
|
12686
|
+
set_attribute2(label2, "data-disabled", get2(p).disabled ? "true" : undefined);
|
|
12668
12687
|
input.disabled = !!get2(p).disabled;
|
|
12669
12688
|
set_attribute2(input, "aria-label", $0);
|
|
12670
12689
|
set_text(text_1, $1);
|
|
@@ -12685,26 +12704,11 @@ delegate(["pointerdown", "click", "change"]);
|
|
|
12685
12704
|
var nextInputId = 0;
|
|
12686
12705
|
var root_14 = from_html(`<label class="slex-input-label"> </label>`);
|
|
12687
12706
|
var root_2 = from_html(`<span class="slex-input-unit" aria-hidden="true"> </span>`);
|
|
12688
|
-
var root_33 = from_html(`<
|
|
12689
|
-
var root_4 = from_html(`<div class="slex-input-
|
|
12690
|
-
var
|
|
12691
|
-
var root8 = from_html(`<div class="slex-input-field"><!> <div class="slex-input-control"><input class="slex-input"/> <!> <!></div> <!> <!></div>`);
|
|
12707
|
+
var root_33 = from_html(`<div class="slex-input-description"> </div>`);
|
|
12708
|
+
var root_4 = from_html(`<div class="slex-input-error" role="alert"> </div>`);
|
|
12709
|
+
var root8 = from_html(`<div class="slex-input-field"><!> <div class="slex-input-control"><input class="slex-input"/> <!></div> <!> <!></div>`);
|
|
12692
12710
|
function Input($$anchor, $$props) {
|
|
12693
12711
|
push($$props, true);
|
|
12694
|
-
const engineeringPrefixFactors = {
|
|
12695
|
-
p: 0.000000000001,
|
|
12696
|
-
n: 0.000000001,
|
|
12697
|
-
u: 0.000001,
|
|
12698
|
-
"µ": 0.000001,
|
|
12699
|
-
"碌": 0.000001,
|
|
12700
|
-
m: 0.001,
|
|
12701
|
-
k: 1000,
|
|
12702
|
-
K: 1000,
|
|
12703
|
-
M: 1e6,
|
|
12704
|
-
meg: 1e6,
|
|
12705
|
-
G: 1e9,
|
|
12706
|
-
T: 1000000000000
|
|
12707
|
-
};
|
|
12708
12712
|
let p = state(proxy({}));
|
|
12709
12713
|
let value = state("");
|
|
12710
12714
|
const fallbackId = `slex-input-${++nextInputId}`;
|
|
@@ -12716,8 +12720,6 @@ function Input($$anchor, $$props) {
|
|
|
12716
12720
|
const readonly = user_derived(() => bool(get2(p).readonly) || bool(get2(p).readOnly));
|
|
12717
12721
|
const required = user_derived(() => bool(get2(p).required));
|
|
12718
12722
|
const invalid2 = user_derived(() => bool(get2(p).invalid) || !!get2(errorText));
|
|
12719
|
-
const steppable = user_derived(isSteppableInput);
|
|
12720
|
-
const controls = user_derived(() => get2(steppable) && get2(p).controls !== false && get2(p).controls !== "false");
|
|
12721
12723
|
const componentId = user_derived(() => safeId($$props.componentName));
|
|
12722
12724
|
const inputId = user_derived(() => text2(get2(p).id) || (get2(componentId) ? `slex-input-${get2(componentId)}` : fallbackId));
|
|
12723
12725
|
const descriptionId = user_derived(() => `${get2(inputId)}-description`);
|
|
@@ -12728,10 +12730,6 @@ function Input($$anchor, $$props) {
|
|
|
12728
12730
|
get2(descriptionText) ? get2(descriptionId) : "",
|
|
12729
12731
|
get2(errorText) ? get2(errorId) : ""
|
|
12730
12732
|
].filter(Boolean).join(" "));
|
|
12731
|
-
const numericValue = user_derived(readNumericValue);
|
|
12732
|
-
const controlLabel = user_derived(() => get2(labelText) || text2(get2(p).placeholder) || $$props.componentName || "input");
|
|
12733
|
-
const decrementDisabled = user_derived(() => !canStep(-1));
|
|
12734
|
-
const incrementDisabled = user_derived(() => !canStep(1));
|
|
12735
12733
|
user_effect(() => bindPropStore($$props.props, (next2) => {
|
|
12736
12734
|
set(p, next2, true);
|
|
12737
12735
|
set(value, text2(next2.value), true);
|
|
@@ -12742,72 +12740,6 @@ function Input($$anchor, $$props) {
|
|
|
12742
12740
|
function inputType() {
|
|
12743
12741
|
return text2(get2(p).type, "text") === "engineering" ? "text" : text2(get2(p).type, "text");
|
|
12744
12742
|
}
|
|
12745
|
-
function isSteppableInput() {
|
|
12746
|
-
const kind = text2(get2(p).type, "text");
|
|
12747
|
-
return kind === "number" || kind === "engineering" || get2(p).min !== undefined || get2(p).max !== undefined || get2(p).step !== undefined;
|
|
12748
|
-
}
|
|
12749
|
-
function numericProp(input) {
|
|
12750
|
-
if (input === undefined || input === null || input === "")
|
|
12751
|
-
return;
|
|
12752
|
-
const next2 = Number(input);
|
|
12753
|
-
return Number.isFinite(next2) ? next2 : undefined;
|
|
12754
|
-
}
|
|
12755
|
-
function stepSize() {
|
|
12756
|
-
const next2 = numericProp(get2(p).step);
|
|
12757
|
-
if (next2 !== undefined && next2 > 0)
|
|
12758
|
-
return next2;
|
|
12759
|
-
if (text2(get2(p).type, "text") !== "engineering")
|
|
12760
|
-
return 1;
|
|
12761
|
-
const parsed = parseEngineeringNumber(get2(value));
|
|
12762
|
-
if (!parsed.valid || !parsed.prefix)
|
|
12763
|
-
return 1;
|
|
12764
|
-
return engineeringPrefixFactors[parsed.prefix] ?? 1;
|
|
12765
|
-
}
|
|
12766
|
-
function readNumericValue() {
|
|
12767
|
-
if (text2(get2(p).type, "text") === "engineering") {
|
|
12768
|
-
const parsed = parseEngineeringNumber(get2(value));
|
|
12769
|
-
return parsed.valid && parsed.number !== null ? parsed.number : null;
|
|
12770
|
-
}
|
|
12771
|
-
const next2 = Number(get2(value));
|
|
12772
|
-
return Number.isFinite(next2) ? next2 : null;
|
|
12773
|
-
}
|
|
12774
|
-
function clamp(next2) {
|
|
12775
|
-
const min = numericProp(get2(p).min);
|
|
12776
|
-
const max = numericProp(get2(p).max);
|
|
12777
|
-
let clamped = next2;
|
|
12778
|
-
if (min !== undefined)
|
|
12779
|
-
clamped = Math.max(min, clamped);
|
|
12780
|
-
if (max !== undefined)
|
|
12781
|
-
clamped = Math.min(max, clamped);
|
|
12782
|
-
return clamped;
|
|
12783
|
-
}
|
|
12784
|
-
function canStep(direction) {
|
|
12785
|
-
if (!get2(controls) || get2(disabled) || get2(readonly) || get2(numericValue) === null)
|
|
12786
|
-
return false;
|
|
12787
|
-
return clamp(get2(numericValue) + direction * stepSize()) !== get2(numericValue);
|
|
12788
|
-
}
|
|
12789
|
-
function formatSteppedValue(next2) {
|
|
12790
|
-
if (text2(get2(p).type, "text") !== "engineering")
|
|
12791
|
-
return text2(next2);
|
|
12792
|
-
const parsed = parseEngineeringNumber(get2(value));
|
|
12793
|
-
if (!parsed.valid)
|
|
12794
|
-
return text2(next2);
|
|
12795
|
-
const factor = parsed.prefix ? engineeringPrefixFactors[parsed.prefix] : undefined;
|
|
12796
|
-
const visibleNumber = factor ? next2 / factor : next2;
|
|
12797
|
-
return `${formatNumber2(visibleNumber)}${parsed.prefix}${parsed.unit}`;
|
|
12798
|
-
}
|
|
12799
|
-
function formatNumber2(next2) {
|
|
12800
|
-
return text2(Number(next2.toPrecision(12)));
|
|
12801
|
-
}
|
|
12802
|
-
function emitValue(nextValue) {
|
|
12803
|
-
set(value, nextValue, true);
|
|
12804
|
-
emit($$props.ctx, "change", text2(get2(p).type, "text") === "engineering" ? parseEngineeringNumber(get2(value)) : get2(value));
|
|
12805
|
-
}
|
|
12806
|
-
function stepBy(direction) {
|
|
12807
|
-
if (!canStep(direction) || get2(numericValue) === null)
|
|
12808
|
-
return;
|
|
12809
|
-
emitValue(formatSteppedValue(clamp(get2(numericValue) + direction * stepSize())));
|
|
12810
|
-
}
|
|
12811
12743
|
function update2(event2) {
|
|
12812
12744
|
if (get2(disabled) || get2(readonly))
|
|
12813
12745
|
return;
|
|
@@ -12833,9 +12765,9 @@ function Input($$anchor, $$props) {
|
|
|
12833
12765
|
});
|
|
12834
12766
|
}
|
|
12835
12767
|
var div_1 = sibling(node, 2);
|
|
12836
|
-
var
|
|
12837
|
-
remove_input_defaults(
|
|
12838
|
-
var node_1 = sibling(
|
|
12768
|
+
var input = child(div_1);
|
|
12769
|
+
remove_input_defaults(input);
|
|
12770
|
+
var node_1 = sibling(input, 2);
|
|
12839
12771
|
{
|
|
12840
12772
|
var consequent_1 = ($$anchor2) => {
|
|
12841
12773
|
var span = root_2();
|
|
@@ -12849,33 +12781,11 @@ function Input($$anchor, $$props) {
|
|
|
12849
12781
|
$$render(consequent_1);
|
|
12850
12782
|
});
|
|
12851
12783
|
}
|
|
12852
|
-
var node_2 = sibling(node_1, 2);
|
|
12853
|
-
{
|
|
12854
|
-
var consequent_2 = ($$anchor2) => {
|
|
12855
|
-
var span_1 = root_33();
|
|
12856
|
-
var button = child(span_1);
|
|
12857
|
-
var button_1 = sibling(button, 2);
|
|
12858
|
-
reset(span_1);
|
|
12859
|
-
template_effect(() => {
|
|
12860
|
-
set_attribute2(button, "aria-label", `Increase ${get2(controlLabel)}`);
|
|
12861
|
-
button.disabled = get2(incrementDisabled);
|
|
12862
|
-
set_attribute2(button_1, "aria-label", `Decrease ${get2(controlLabel)}`);
|
|
12863
|
-
button_1.disabled = get2(decrementDisabled);
|
|
12864
|
-
});
|
|
12865
|
-
delegated("click", button, () => stepBy(1));
|
|
12866
|
-
delegated("click", button_1, () => stepBy(-1));
|
|
12867
|
-
append($$anchor2, span_1);
|
|
12868
|
-
};
|
|
12869
|
-
if_block(node_2, ($$render) => {
|
|
12870
|
-
if (get2(controls))
|
|
12871
|
-
$$render(consequent_2);
|
|
12872
|
-
});
|
|
12873
|
-
}
|
|
12874
12784
|
reset(div_1);
|
|
12875
|
-
var
|
|
12785
|
+
var node_2 = sibling(div_1, 2);
|
|
12876
12786
|
{
|
|
12877
|
-
var
|
|
12878
|
-
var div_2 =
|
|
12787
|
+
var consequent_2 = ($$anchor2) => {
|
|
12788
|
+
var div_2 = root_33();
|
|
12879
12789
|
var text_3 = child(div_2, true);
|
|
12880
12790
|
reset(div_2);
|
|
12881
12791
|
template_effect(() => {
|
|
@@ -12884,15 +12794,15 @@ function Input($$anchor, $$props) {
|
|
|
12884
12794
|
});
|
|
12885
12795
|
append($$anchor2, div_2);
|
|
12886
12796
|
};
|
|
12887
|
-
if_block(
|
|
12797
|
+
if_block(node_2, ($$render) => {
|
|
12888
12798
|
if (get2(descriptionText))
|
|
12889
|
-
$$render(
|
|
12799
|
+
$$render(consequent_2);
|
|
12890
12800
|
});
|
|
12891
12801
|
}
|
|
12892
|
-
var
|
|
12802
|
+
var node_3 = sibling(node_2, 2);
|
|
12893
12803
|
{
|
|
12894
|
-
var
|
|
12895
|
-
var div_3 =
|
|
12804
|
+
var consequent_3 = ($$anchor2) => {
|
|
12805
|
+
var div_3 = root_4();
|
|
12896
12806
|
var text_4 = child(div_3, true);
|
|
12897
12807
|
reset(div_3);
|
|
12898
12808
|
template_effect(() => {
|
|
@@ -12901,9 +12811,9 @@ function Input($$anchor, $$props) {
|
|
|
12901
12811
|
});
|
|
12902
12812
|
append($$anchor2, div_3);
|
|
12903
12813
|
};
|
|
12904
|
-
if_block(
|
|
12814
|
+
if_block(node_3, ($$render) => {
|
|
12905
12815
|
if (get2(errorText))
|
|
12906
|
-
$$render(
|
|
12816
|
+
$$render(consequent_3);
|
|
12907
12817
|
});
|
|
12908
12818
|
}
|
|
12909
12819
|
reset(div);
|
|
@@ -12912,21 +12822,20 @@ function Input($$anchor, $$props) {
|
|
|
12912
12822
|
set_attribute2(div, "data-required", get2(required) ? "true" : undefined);
|
|
12913
12823
|
set_attribute2(div, "data-readonly", get2(readonly) ? "true" : undefined);
|
|
12914
12824
|
set_attribute2(div_1, "data-has-unit", get2(unitText) ? "true" : undefined);
|
|
12915
|
-
set_attribute2(
|
|
12916
|
-
set_attribute2(
|
|
12917
|
-
set_attribute2(
|
|
12918
|
-
set_attribute2(
|
|
12919
|
-
set_attribute2(
|
|
12920
|
-
|
|
12921
|
-
|
|
12922
|
-
|
|
12923
|
-
|
|
12924
|
-
set_attribute2(
|
|
12925
|
-
set_attribute2(
|
|
12926
|
-
set_attribute2(
|
|
12927
|
-
set_attribute2(
|
|
12928
|
-
set_attribute2(
|
|
12929
|
-
set_attribute2(input_1, "aria-invalid", get2(invalid2) ? "true" : undefined);
|
|
12825
|
+
set_attribute2(input, "id", get2(inputId));
|
|
12826
|
+
set_attribute2(input, "type", $0);
|
|
12827
|
+
set_attribute2(input, "inputmode", $1);
|
|
12828
|
+
set_attribute2(input, "name", $2);
|
|
12829
|
+
set_attribute2(input, "placeholder", $3);
|
|
12830
|
+
input.disabled = get2(disabled);
|
|
12831
|
+
input.readOnly = get2(readonly);
|
|
12832
|
+
input.required = get2(required);
|
|
12833
|
+
set_attribute2(input, "min", $4);
|
|
12834
|
+
set_attribute2(input, "max", $5);
|
|
12835
|
+
set_attribute2(input, "step", $6);
|
|
12836
|
+
set_attribute2(input, "aria-label", get2(computedAriaLabel) || undefined);
|
|
12837
|
+
set_attribute2(input, "aria-describedby", get2(describedBy) || undefined);
|
|
12838
|
+
set_attribute2(input, "aria-invalid", get2(invalid2) ? "true" : undefined);
|
|
12930
12839
|
}, [
|
|
12931
12840
|
() => inputType(),
|
|
12932
12841
|
() => text2(get2(p).type, "text") === "engineering" ? "decimal" : undefined,
|
|
@@ -12936,12 +12845,12 @@ function Input($$anchor, $$props) {
|
|
|
12936
12845
|
() => get2(p).max === undefined ? undefined : text2(get2(p).max),
|
|
12937
12846
|
() => get2(p).step === undefined ? undefined : text2(get2(p).step)
|
|
12938
12847
|
]);
|
|
12939
|
-
delegated("input",
|
|
12940
|
-
bind_value(
|
|
12848
|
+
delegated("input", input, update2);
|
|
12849
|
+
bind_value(input, () => get2(value), ($$value) => set(value, $$value));
|
|
12941
12850
|
append($$anchor, div);
|
|
12942
12851
|
pop();
|
|
12943
12852
|
}
|
|
12944
|
-
delegate(["input"
|
|
12853
|
+
delegate(["input"]);
|
|
12945
12854
|
|
|
12946
12855
|
// src/components/svelte/input/RadioGroup.svelte
|
|
12947
12856
|
var root_34 = from_html(`<span> </span>`);
|
|
@@ -13057,6 +12966,7 @@ function RadioGroup($$anchor, $$props) {
|
|
|
13057
12966
|
reset(label2);
|
|
13058
12967
|
reset(span_1);
|
|
13059
12968
|
template_effect(($0, $1, $2) => {
|
|
12969
|
+
set_attribute2(label2, "data-disabled", get2(disabled) ? "true" : undefined);
|
|
13060
12970
|
set_attribute2(input, "name", $0);
|
|
13061
12971
|
set_value(input, $1);
|
|
13062
12972
|
set_checked(input, get2(itemValue) === get2(value));
|
|
@@ -13092,7 +13002,7 @@ var root_35 = from_html(`<span> </span>`);
|
|
|
13092
13002
|
var root_16 = from_html(`<label class="slex-select-label"><!> <!></label>`);
|
|
13093
13003
|
var root_8 = from_html(`<span class="slex-select-check" aria-hidden="true"></span>`);
|
|
13094
13004
|
var root_6 = from_html(`<li role="option"><span class="slex-select-option-label"><!> <span> </span></span> <!></li>`);
|
|
13095
|
-
var
|
|
13005
|
+
var root_52 = from_html(`<ul class="slex-select-menu" role="listbox"></ul>`);
|
|
13096
13006
|
var root_9 = from_html(`<option> </option>`);
|
|
13097
13007
|
var root10 = from_html(`<div class="slex-select"><!> <button type="button" class="slex-select-trigger" aria-haspopup="listbox"><span class="slex-select-value"><!> <span> </span></span> <span class="slex-select-icon" aria-hidden="true"></span></button> <!> <select class="slex-select-native" tabindex="-1" aria-hidden="true"><option> </option><!></select></div>`);
|
|
13098
13008
|
function Select($$anchor, $$props) {
|
|
@@ -13296,7 +13206,7 @@ function Select($$anchor, $$props) {
|
|
|
13296
13206
|
var node_4 = sibling(button, 2);
|
|
13297
13207
|
{
|
|
13298
13208
|
var consequent_6 = ($$anchor2) => {
|
|
13299
|
-
var ul =
|
|
13209
|
+
var ul = root_52();
|
|
13300
13210
|
each(ul, 21, () => get2(options), index, ($$anchor3, item, index2) => {
|
|
13301
13211
|
const isSelected = user_derived(() => get2(item).value === text2(get2(value)));
|
|
13302
13212
|
const isActive = user_derived(() => index2 === get2(activeIndex));
|
|
@@ -16147,7 +16057,7 @@ function TabItem($$anchor, $$props) {
|
|
|
16147
16057
|
delegate(["click"]);
|
|
16148
16058
|
|
|
16149
16059
|
// src/components/svelte/input/Tabs.svelte
|
|
16150
|
-
var
|
|
16060
|
+
var root_53 = from_html(`<span class="slex-sr-only"> </span>`);
|
|
16151
16061
|
var root_36 = from_html(`<!> <!>`, 1);
|
|
16152
16062
|
var root_82 = from_html(`<div></div>`);
|
|
16153
16063
|
var root_18 = from_html(`<!> <span class="slex-tabs-selected-indicator" aria-hidden="true"></span>`, 1);
|
|
@@ -16325,7 +16235,7 @@ function Tabs2($$anchor, $$props) {
|
|
|
16325
16235
|
var node_4 = sibling(node_3, 2);
|
|
16326
16236
|
{
|
|
16327
16237
|
var consequent_1 = ($$anchor5) => {
|
|
16328
|
-
var span =
|
|
16238
|
+
var span = root_53();
|
|
16329
16239
|
var text_1 = child(span, true);
|
|
16330
16240
|
reset(span);
|
|
16331
16241
|
template_effect(() => set_text(text_1, get2(label2)));
|
|
@@ -16765,7 +16675,7 @@ var root_43 = from_svg(`<svg fill="currentColor" viewBox="0 0 20 20" xmlns="http
|
|
|
16765
16675
|
var root_111 = from_html(`<button><!> <!></button>`);
|
|
16766
16676
|
var root_62 = from_html(`<span class="sr-only"> </span>`);
|
|
16767
16677
|
var root_83 = from_svg(`<svg fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>`);
|
|
16768
|
-
var
|
|
16678
|
+
var root_54 = from_html(`<a><!> <!></a>`);
|
|
16769
16679
|
function CloseButton($$anchor, $$props) {
|
|
16770
16680
|
push($$props, true);
|
|
16771
16681
|
let color = prop($$props, "color", 3, "gray"), name = prop($$props, "name", 3, "Close"), size = prop($$props, "size", 3, "md"), restProps = rest_props($$props, [
|
|
@@ -16839,7 +16749,7 @@ function CloseButton($$anchor, $$props) {
|
|
|
16839
16749
|
append($$anchor2, button);
|
|
16840
16750
|
};
|
|
16841
16751
|
var alternate_2 = ($$anchor2) => {
|
|
16842
|
-
var a =
|
|
16752
|
+
var a = root_54();
|
|
16843
16753
|
attribute_effect(a, ($0) => ({
|
|
16844
16754
|
...restProps,
|
|
16845
16755
|
onclick,
|
|
@@ -17472,11 +17382,21 @@ function Text2($$anchor, $$props) {
|
|
|
17472
17382
|
push($$props, true);
|
|
17473
17383
|
let p = state(proxy({}));
|
|
17474
17384
|
user_effect(() => bindPropStore($$props.props, (next2) => set(p, next2, true)));
|
|
17385
|
+
const color = user_derived(() => get2(p).color == null || get2(p).color === "" ? undefined : text2(get2(p).color));
|
|
17386
|
+
const size = user_derived(() => cssLength(get2(p).size));
|
|
17387
|
+
function cssLength(value) {
|
|
17388
|
+
if (value == null || value === "")
|
|
17389
|
+
return;
|
|
17390
|
+
const rendered = text2(value);
|
|
17391
|
+
return /^-?\d+(\.\d+)?$/.test(rendered) ? `${rendered}px` : rendered;
|
|
17392
|
+
}
|
|
17475
17393
|
var div = root20();
|
|
17394
|
+
let styles;
|
|
17476
17395
|
var text_1 = child(div, true);
|
|
17477
17396
|
reset(div);
|
|
17478
17397
|
template_effect(($0, $1) => {
|
|
17479
17398
|
set_class(div, 1, $0);
|
|
17399
|
+
styles = set_style(div, "", styles, { color: get2(color), "font-size": get2(size) });
|
|
17480
17400
|
set_text(text_1, $1);
|
|
17481
17401
|
}, [
|
|
17482
17402
|
() => `slex-text${get2(p).variant ? ` slex-text--${text2(get2(p).variant)}` : ""}${get2(p).class ? ` ${text2(get2(p).class)}` : ""}`,
|
|
@@ -17648,7 +17568,7 @@ var root_311 = from_html(`<span> </span>`);
|
|
|
17648
17568
|
var root_45 = from_html(`<span class="slex-code-block-language"> </span>`);
|
|
17649
17569
|
var root_114 = from_html(`<figcaption class="slex-code-block-header"><span class="slex-code-block-title"><!> <!></span> <!></figcaption>`);
|
|
17650
17570
|
var root_72 = from_html(`<span> </span>`);
|
|
17651
|
-
var
|
|
17571
|
+
var root_55 = from_html(`<span class="slex-code-line"><span class="slex-code-line-content"></span></span>`);
|
|
17652
17572
|
var root22 = from_html(`<figure class="slex-code-block"><!> <pre class="slex-code-block-pre"><code></code></pre></figure>`);
|
|
17653
17573
|
function CodeBlock($$anchor, $$props) {
|
|
17654
17574
|
push($$props, true);
|
|
@@ -17817,7 +17737,7 @@ function CodeBlock($$anchor, $$props) {
|
|
|
17817
17737
|
var pre = sibling(node, 2);
|
|
17818
17738
|
var code_1 = child(pre);
|
|
17819
17739
|
each(code_1, 21, () => get2(lines), index, ($$anchor2, line) => {
|
|
17820
|
-
var span_3 =
|
|
17740
|
+
var span_3 = root_55();
|
|
17821
17741
|
var span_4 = child(span_3);
|
|
17822
17742
|
each(span_4, 21, () => get2(line), index, ($$anchor3, token) => {
|
|
17823
17743
|
var fragment_1 = comment();
|
|
@@ -31957,7 +31877,7 @@ function Table($$anchor, $$props) {
|
|
|
31957
31877
|
|
|
31958
31878
|
// src/components/svelte/content/Section.svelte
|
|
31959
31879
|
var root_28 = from_html(`<div class="slex-section-eyebrow"> </div>`);
|
|
31960
|
-
var
|
|
31880
|
+
var root_56 = from_html(`<span> </span>`);
|
|
31961
31881
|
var root_313 = from_html(`<h2 class="slex-section-title"><!><!></h2>`);
|
|
31962
31882
|
var root_65 = from_html(`<p class="slex-section-subtitle"> </p>`);
|
|
31963
31883
|
var root_73 = from_html(`<a class="slex-section-action"> </a>`);
|
|
@@ -32008,7 +31928,7 @@ function Section($$anchor, $$props) {
|
|
|
32008
31928
|
var node_4 = sibling(node_3);
|
|
32009
31929
|
{
|
|
32010
31930
|
var consequent_2 = ($$anchor4) => {
|
|
32011
|
-
var span =
|
|
31931
|
+
var span = root_56();
|
|
32012
31932
|
var text_2 = child(span, true);
|
|
32013
31933
|
reset(span);
|
|
32014
31934
|
template_effect(($0) => set_text(text_2, $0), [() => text2(get2(p).title)]);
|