@gomusdev/web-components 1.11.0 → 1.12.0
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/dist-js/gomus-webcomponents.iife.js +128 -17
- package/dist-js/gomus-webcomponents.js +128 -17
- package/package.json +1 -2
|
@@ -29382,7 +29382,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29382
29382
|
var root_1$8 = /* @__PURE__ */ from_html(`<!> <!> <!>`, 1);
|
|
29383
29383
|
function DatePicker_1($$anchor, $$props) {
|
|
29384
29384
|
push($$props, true);
|
|
29385
|
-
let dateString = prop($$props, "dateString", 15);
|
|
29385
|
+
let dateString = prop($$props, "dateString", 15), labelClass = prop($$props, "labelClass", 7), inputClass = prop($$props, "inputClass", 7);
|
|
29386
29386
|
let date2 = /* @__PURE__ */ state(proxy($14e0f24ef4ac5c92$export$d0bdf45af03a6ea3($14e0f24ef4ac5c92$export$aa8b41735afcabd2())));
|
|
29387
29387
|
user_effect(() => {
|
|
29388
29388
|
dateString(get$2(date2).toString());
|
|
@@ -29394,6 +29394,20 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29394
29394
|
set dateString($$value) {
|
|
29395
29395
|
dateString($$value);
|
|
29396
29396
|
flushSync();
|
|
29397
|
+
},
|
|
29398
|
+
get labelClass() {
|
|
29399
|
+
return labelClass();
|
|
29400
|
+
},
|
|
29401
|
+
set labelClass($$value) {
|
|
29402
|
+
labelClass($$value);
|
|
29403
|
+
flushSync();
|
|
29404
|
+
},
|
|
29405
|
+
get inputClass() {
|
|
29406
|
+
return inputClass();
|
|
29407
|
+
},
|
|
29408
|
+
set inputClass($$value) {
|
|
29409
|
+
inputClass($$value);
|
|
29410
|
+
flushSync();
|
|
29397
29411
|
}
|
|
29398
29412
|
};
|
|
29399
29413
|
var fragment = comment();
|
|
@@ -29410,7 +29424,11 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29410
29424
|
var fragment_1 = root_1$8();
|
|
29411
29425
|
var node_1 = first_child(fragment_1);
|
|
29412
29426
|
component(node_1, () => Date_field_label, ($$anchor4, DatePicker_Label) => {
|
|
29413
|
-
DatePicker_Label($$anchor4, {
|
|
29427
|
+
DatePicker_Label($$anchor4, {
|
|
29428
|
+
get class() {
|
|
29429
|
+
return `go-datepicker-label $${labelClass() ?? ""}`;
|
|
29430
|
+
}
|
|
29431
|
+
});
|
|
29414
29432
|
});
|
|
29415
29433
|
var node_2 = sibling(node_1, 2);
|
|
29416
29434
|
{
|
|
@@ -29447,7 +29465,9 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29447
29465
|
};
|
|
29448
29466
|
component(node_2, () => Date_field_input, ($$anchor4, DatePicker_Input) => {
|
|
29449
29467
|
DatePicker_Input($$anchor4, {
|
|
29450
|
-
class
|
|
29468
|
+
get class() {
|
|
29469
|
+
return `go-datepicker-input $${inputClass() ?? ""}`;
|
|
29470
|
+
},
|
|
29451
29471
|
children,
|
|
29452
29472
|
$$slots: { default: true }
|
|
29453
29473
|
});
|
|
@@ -29607,7 +29627,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29607
29627
|
append($$anchor, fragment);
|
|
29608
29628
|
return pop($$exports);
|
|
29609
29629
|
}
|
|
29610
|
-
create_custom_element(DatePicker_1, { dateString: {} }, [], [], true);
|
|
29630
|
+
create_custom_element(DatePicker_1, { dateString: {}, labelClass: {}, inputClass: {} }, [], [], true);
|
|
29611
29631
|
var root_2$6 = /* @__PURE__ */ from_html(`<span class="go-field-star" aria-hidden="true">*</span>`);
|
|
29612
29632
|
var root_1$7 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
|
|
29613
29633
|
var root_3$4 = /* @__PURE__ */ from_html(`<label><!></label> <input/>`, 1);
|
|
@@ -29646,6 +29666,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29646
29666
|
() => ({
|
|
29647
29667
|
...get$2(fieldAttributes),
|
|
29648
29668
|
...restProps,
|
|
29669
|
+
class: inputClass(),
|
|
29649
29670
|
placeholder: field().placeholder,
|
|
29650
29671
|
type: field().type,
|
|
29651
29672
|
name: field().key
|
|
@@ -29656,7 +29677,10 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29656
29677
|
void 0,
|
|
29657
29678
|
true
|
|
29658
29679
|
);
|
|
29659
|
-
template_effect(() =>
|
|
29680
|
+
template_effect(() => {
|
|
29681
|
+
set_class(label, 1, clsx(labelClass()));
|
|
29682
|
+
set_attribute(label, "for", get$2(inputId));
|
|
29683
|
+
});
|
|
29660
29684
|
bind_value(input_1, () => field().value, ($$value) => field(field().value = $$value, true));
|
|
29661
29685
|
append($$anchor2, fragment_1);
|
|
29662
29686
|
};
|
|
@@ -29684,7 +29708,10 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29684
29708
|
labelText(node_3);
|
|
29685
29709
|
reset(span_1);
|
|
29686
29710
|
reset(label_1);
|
|
29687
|
-
template_effect(() =>
|
|
29711
|
+
template_effect(() => {
|
|
29712
|
+
set_class(label_1, 1, clsx(labelClass()));
|
|
29713
|
+
set_attribute(label_1, "for", get$2(inputId));
|
|
29714
|
+
});
|
|
29688
29715
|
append($$anchor2, label_1);
|
|
29689
29716
|
};
|
|
29690
29717
|
const select = ($$anchor2) => {
|
|
@@ -29694,7 +29721,12 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29694
29721
|
labelText(node_4);
|
|
29695
29722
|
reset(label_2);
|
|
29696
29723
|
var select_1 = sibling(label_2, 2);
|
|
29697
|
-
attribute_effect(select_1, () => ({
|
|
29724
|
+
attribute_effect(select_1, () => ({
|
|
29725
|
+
...get$2(fieldAttributes),
|
|
29726
|
+
...restProps,
|
|
29727
|
+
name: field().key,
|
|
29728
|
+
class: inputClass()
|
|
29729
|
+
}));
|
|
29698
29730
|
var node_5 = child(select_1);
|
|
29699
29731
|
{
|
|
29700
29732
|
var consequent_1 = ($$anchor3) => {
|
|
@@ -29720,12 +29752,21 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29720
29752
|
});
|
|
29721
29753
|
}
|
|
29722
29754
|
reset(select_1);
|
|
29723
|
-
template_effect(() =>
|
|
29755
|
+
template_effect(() => {
|
|
29756
|
+
set_class(label_2, 1, clsx(labelClass()));
|
|
29757
|
+
set_attribute(label_2, "for", get$2(inputId));
|
|
29758
|
+
});
|
|
29724
29759
|
bind_select_value(select_1, () => field().value, ($$value) => field(field().value = $$value, true));
|
|
29725
29760
|
append($$anchor2, fragment_2);
|
|
29726
29761
|
};
|
|
29727
29762
|
const date2 = ($$anchor2) => {
|
|
29728
29763
|
DatePicker_1($$anchor2, {
|
|
29764
|
+
get labelClass() {
|
|
29765
|
+
return labelClass();
|
|
29766
|
+
},
|
|
29767
|
+
get inputClass() {
|
|
29768
|
+
return inputClass();
|
|
29769
|
+
},
|
|
29729
29770
|
get dateString() {
|
|
29730
29771
|
return field().value;
|
|
29731
29772
|
},
|
|
@@ -29749,9 +29790,23 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29749
29790
|
var label_3 = root_11$1();
|
|
29750
29791
|
var text_1 = child(label_3);
|
|
29751
29792
|
var input_3 = sibling(text_1);
|
|
29752
|
-
attribute_effect(
|
|
29793
|
+
attribute_effect(
|
|
29794
|
+
input_3,
|
|
29795
|
+
() => ({
|
|
29796
|
+
...get$2(fieldAttributes),
|
|
29797
|
+
...restProps,
|
|
29798
|
+
class: inputClass(),
|
|
29799
|
+
type: "radio"
|
|
29800
|
+
}),
|
|
29801
|
+
void 0,
|
|
29802
|
+
void 0,
|
|
29803
|
+
void 0,
|
|
29804
|
+
void 0,
|
|
29805
|
+
true
|
|
29806
|
+
);
|
|
29753
29807
|
reset(label_3);
|
|
29754
29808
|
template_effect(() => {
|
|
29809
|
+
set_class(label_3, 1, clsx(labelClass()));
|
|
29755
29810
|
set_attribute(label_3, "for", get$2(inputId) + get$2(option));
|
|
29756
29811
|
set_text(text_1, `${get$2(option) ?? ""} `);
|
|
29757
29812
|
});
|
|
@@ -29767,13 +29822,15 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29767
29822
|
reset(fieldset);
|
|
29768
29823
|
append($$anchor2, fieldset);
|
|
29769
29824
|
};
|
|
29770
|
-
let field = prop($$props, "field", 15), describedById = prop($$props, "describedById", 7), restProps = /* @__PURE__ */ rest_props($$props, [
|
|
29825
|
+
let field = prop($$props, "field", 15), describedById = prop($$props, "describedById", 7), labelClass = prop($$props, "labelClass", 7), inputClass = prop($$props, "inputClass", 7), restProps = /* @__PURE__ */ rest_props($$props, [
|
|
29771
29826
|
"$$slots",
|
|
29772
29827
|
"$$events",
|
|
29773
29828
|
"$$legacy",
|
|
29774
29829
|
"$$host",
|
|
29775
29830
|
"field",
|
|
29776
|
-
"describedById"
|
|
29831
|
+
"describedById",
|
|
29832
|
+
"labelClass",
|
|
29833
|
+
"inputClass"
|
|
29777
29834
|
]);
|
|
29778
29835
|
const map = {
|
|
29779
29836
|
input,
|
|
@@ -29818,6 +29875,20 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29818
29875
|
set describedById($$value) {
|
|
29819
29876
|
describedById($$value);
|
|
29820
29877
|
flushSync();
|
|
29878
|
+
},
|
|
29879
|
+
get labelClass() {
|
|
29880
|
+
return labelClass();
|
|
29881
|
+
},
|
|
29882
|
+
set labelClass($$value) {
|
|
29883
|
+
labelClass($$value);
|
|
29884
|
+
flushSync();
|
|
29885
|
+
},
|
|
29886
|
+
get inputClass() {
|
|
29887
|
+
return inputClass();
|
|
29888
|
+
},
|
|
29889
|
+
set inputClass($$value) {
|
|
29890
|
+
inputClass($$value);
|
|
29891
|
+
flushSync();
|
|
29821
29892
|
}
|
|
29822
29893
|
};
|
|
29823
29894
|
var fragment_6 = comment();
|
|
@@ -29836,14 +29907,14 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29836
29907
|
append($$anchor, fragment_6);
|
|
29837
29908
|
return pop($$exports);
|
|
29838
29909
|
}
|
|
29839
|
-
create_custom_element(InputAndLabel, { field: {}, describedById: {} }, [], [], true);
|
|
29910
|
+
create_custom_element(InputAndLabel, { field: {}, describedById: {}, labelClass: {}, inputClass: {} }, [], [], true);
|
|
29840
29911
|
var root_1$6 = /* @__PURE__ */ from_html(`<span> </span>`);
|
|
29841
29912
|
var root_3$3 = /* @__PURE__ */ from_html(`<li> </li>`);
|
|
29842
29913
|
var root_2$5 = /* @__PURE__ */ from_html(`<ul class="go-field-errors" role="alert"></ul>`);
|
|
29843
29914
|
var root$5 = /* @__PURE__ */ from_html(`<!> <!> <!>`, 1);
|
|
29844
29915
|
function Field($$anchor, $$props) {
|
|
29845
29916
|
push($$props, true);
|
|
29846
|
-
let key = prop($$props, "key", 7), required = prop($$props, "required", 7, false);
|
|
29917
|
+
let key = prop($$props, "key", 7), required = prop($$props, "required", 7, false), labelClass = prop($$props, "labelClass", 7), inputClass = prop($$props, "inputClass", 7);
|
|
29847
29918
|
let field = /* @__PURE__ */ state(proxy(Forms.createField(key(), required())));
|
|
29848
29919
|
let details = /* @__PURE__ */ state(void 0);
|
|
29849
29920
|
onMount(async () => {
|
|
@@ -29886,6 +29957,20 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29886
29957
|
set required($$value = false) {
|
|
29887
29958
|
required($$value);
|
|
29888
29959
|
flushSync();
|
|
29960
|
+
},
|
|
29961
|
+
get labelClass() {
|
|
29962
|
+
return labelClass();
|
|
29963
|
+
},
|
|
29964
|
+
set labelClass($$value) {
|
|
29965
|
+
labelClass($$value);
|
|
29966
|
+
flushSync();
|
|
29967
|
+
},
|
|
29968
|
+
get inputClass() {
|
|
29969
|
+
return inputClass();
|
|
29970
|
+
},
|
|
29971
|
+
set inputClass($$value) {
|
|
29972
|
+
inputClass($$value);
|
|
29973
|
+
flushSync();
|
|
29889
29974
|
}
|
|
29890
29975
|
};
|
|
29891
29976
|
var fragment = root$5();
|
|
@@ -29894,6 +29979,12 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29894
29979
|
get describedById() {
|
|
29895
29980
|
return get$2(describedById);
|
|
29896
29981
|
},
|
|
29982
|
+
get labelClass() {
|
|
29983
|
+
return labelClass();
|
|
29984
|
+
},
|
|
29985
|
+
get inputClass() {
|
|
29986
|
+
return inputClass();
|
|
29987
|
+
},
|
|
29897
29988
|
get field() {
|
|
29898
29989
|
return get$2(field);
|
|
29899
29990
|
},
|
|
@@ -29943,7 +30034,9 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29943
30034
|
Field,
|
|
29944
30035
|
{
|
|
29945
30036
|
key: { attribute: "key", reflect: true, type: "String" },
|
|
29946
|
-
required: { attribute: "required", reflect: true, type: "Boolean" }
|
|
30037
|
+
required: { attribute: "required", reflect: true, type: "Boolean" },
|
|
30038
|
+
labelClass: { attribute: "label-class", reflect: true, type: "String" },
|
|
30039
|
+
inputClass: { attribute: "input-class", reflect: true, type: "String" }
|
|
29947
30040
|
},
|
|
29948
30041
|
[],
|
|
29949
30042
|
["getField"],
|
|
@@ -30060,14 +30153,32 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
30060
30153
|
customElements.define("go-form-feedback", create_custom_element(FormFeedback, {}, ["default"], [], false));
|
|
30061
30154
|
function Submit($$anchor, $$props) {
|
|
30062
30155
|
push($$props, true);
|
|
30156
|
+
let buttonClass = prop($$props, "buttonClass", 7, "");
|
|
30063
30157
|
let details = /* @__PURE__ */ state(void 0);
|
|
30064
30158
|
onMount(() => {
|
|
30065
30159
|
set(details, getDetails($$props.$$host), true);
|
|
30066
|
-
wrapInElement($$props.$$host, "button", { type: "submit" });
|
|
30160
|
+
wrapInElement($$props.$$host, "button", { type: "submit", class: buttonClass() });
|
|
30067
30161
|
});
|
|
30068
|
-
|
|
30162
|
+
var $$exports = {
|
|
30163
|
+
get buttonClass() {
|
|
30164
|
+
return buttonClass();
|
|
30165
|
+
},
|
|
30166
|
+
set buttonClass($$value = "") {
|
|
30167
|
+
buttonClass($$value);
|
|
30168
|
+
flushSync();
|
|
30169
|
+
}
|
|
30170
|
+
};
|
|
30171
|
+
return pop($$exports);
|
|
30069
30172
|
}
|
|
30070
|
-
customElements.define("go-submit", create_custom_element(
|
|
30173
|
+
customElements.define("go-submit", create_custom_element(
|
|
30174
|
+
Submit,
|
|
30175
|
+
{
|
|
30176
|
+
buttonClass: { attribute: "button-class", reflect: true, type: "String" }
|
|
30177
|
+
},
|
|
30178
|
+
[],
|
|
30179
|
+
[],
|
|
30180
|
+
false
|
|
30181
|
+
));
|
|
30071
30182
|
var root_1$3 = /* @__PURE__ */ from_html(`<p>Form submitted successfully!</p>`);
|
|
30072
30183
|
var root$3 = /* @__PURE__ */ from_html(`<div aria-live="assertive"><!></div>`);
|
|
30073
30184
|
function SuccessFeedback($$anchor, $$props) {
|
|
@@ -29382,7 +29382,7 @@ var root_6 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
|
|
|
29382
29382
|
var root_1$8 = /* @__PURE__ */ from_html(`<!> <!> <!>`, 1);
|
|
29383
29383
|
function DatePicker_1($$anchor, $$props) {
|
|
29384
29384
|
push($$props, true);
|
|
29385
|
-
let dateString = prop($$props, "dateString", 15);
|
|
29385
|
+
let dateString = prop($$props, "dateString", 15), labelClass = prop($$props, "labelClass", 7), inputClass = prop($$props, "inputClass", 7);
|
|
29386
29386
|
let date2 = /* @__PURE__ */ state(proxy($14e0f24ef4ac5c92$export$d0bdf45af03a6ea3($14e0f24ef4ac5c92$export$aa8b41735afcabd2())));
|
|
29387
29387
|
user_effect(() => {
|
|
29388
29388
|
dateString(get$2(date2).toString());
|
|
@@ -29394,6 +29394,20 @@ function DatePicker_1($$anchor, $$props) {
|
|
|
29394
29394
|
set dateString($$value) {
|
|
29395
29395
|
dateString($$value);
|
|
29396
29396
|
flushSync();
|
|
29397
|
+
},
|
|
29398
|
+
get labelClass() {
|
|
29399
|
+
return labelClass();
|
|
29400
|
+
},
|
|
29401
|
+
set labelClass($$value) {
|
|
29402
|
+
labelClass($$value);
|
|
29403
|
+
flushSync();
|
|
29404
|
+
},
|
|
29405
|
+
get inputClass() {
|
|
29406
|
+
return inputClass();
|
|
29407
|
+
},
|
|
29408
|
+
set inputClass($$value) {
|
|
29409
|
+
inputClass($$value);
|
|
29410
|
+
flushSync();
|
|
29397
29411
|
}
|
|
29398
29412
|
};
|
|
29399
29413
|
var fragment = comment();
|
|
@@ -29410,7 +29424,11 @@ function DatePicker_1($$anchor, $$props) {
|
|
|
29410
29424
|
var fragment_1 = root_1$8();
|
|
29411
29425
|
var node_1 = first_child(fragment_1);
|
|
29412
29426
|
component(node_1, () => Date_field_label, ($$anchor4, DatePicker_Label) => {
|
|
29413
|
-
DatePicker_Label($$anchor4, {
|
|
29427
|
+
DatePicker_Label($$anchor4, {
|
|
29428
|
+
get class() {
|
|
29429
|
+
return `go-datepicker-label $${labelClass() ?? ""}`;
|
|
29430
|
+
}
|
|
29431
|
+
});
|
|
29414
29432
|
});
|
|
29415
29433
|
var node_2 = sibling(node_1, 2);
|
|
29416
29434
|
{
|
|
@@ -29447,7 +29465,9 @@ function DatePicker_1($$anchor, $$props) {
|
|
|
29447
29465
|
};
|
|
29448
29466
|
component(node_2, () => Date_field_input, ($$anchor4, DatePicker_Input) => {
|
|
29449
29467
|
DatePicker_Input($$anchor4, {
|
|
29450
|
-
class
|
|
29468
|
+
get class() {
|
|
29469
|
+
return `go-datepicker-input $${inputClass() ?? ""}`;
|
|
29470
|
+
},
|
|
29451
29471
|
children,
|
|
29452
29472
|
$$slots: { default: true }
|
|
29453
29473
|
});
|
|
@@ -29607,7 +29627,7 @@ function DatePicker_1($$anchor, $$props) {
|
|
|
29607
29627
|
append($$anchor, fragment);
|
|
29608
29628
|
return pop($$exports);
|
|
29609
29629
|
}
|
|
29610
|
-
create_custom_element(DatePicker_1, { dateString: {} }, [], [], true);
|
|
29630
|
+
create_custom_element(DatePicker_1, { dateString: {}, labelClass: {}, inputClass: {} }, [], [], true);
|
|
29611
29631
|
var root_2$6 = /* @__PURE__ */ from_html(`<span class="go-field-star" aria-hidden="true">*</span>`);
|
|
29612
29632
|
var root_1$7 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
|
|
29613
29633
|
var root_3$4 = /* @__PURE__ */ from_html(`<label><!></label> <input/>`, 1);
|
|
@@ -29646,6 +29666,7 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
29646
29666
|
() => ({
|
|
29647
29667
|
...get$2(fieldAttributes),
|
|
29648
29668
|
...restProps,
|
|
29669
|
+
class: inputClass(),
|
|
29649
29670
|
placeholder: field().placeholder,
|
|
29650
29671
|
type: field().type,
|
|
29651
29672
|
name: field().key
|
|
@@ -29656,7 +29677,10 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
29656
29677
|
void 0,
|
|
29657
29678
|
true
|
|
29658
29679
|
);
|
|
29659
|
-
template_effect(() =>
|
|
29680
|
+
template_effect(() => {
|
|
29681
|
+
set_class(label, 1, clsx(labelClass()));
|
|
29682
|
+
set_attribute(label, "for", get$2(inputId));
|
|
29683
|
+
});
|
|
29660
29684
|
bind_value(input_1, () => field().value, ($$value) => field(field().value = $$value, true));
|
|
29661
29685
|
append($$anchor2, fragment_1);
|
|
29662
29686
|
};
|
|
@@ -29684,7 +29708,10 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
29684
29708
|
labelText(node_3);
|
|
29685
29709
|
reset(span_1);
|
|
29686
29710
|
reset(label_1);
|
|
29687
|
-
template_effect(() =>
|
|
29711
|
+
template_effect(() => {
|
|
29712
|
+
set_class(label_1, 1, clsx(labelClass()));
|
|
29713
|
+
set_attribute(label_1, "for", get$2(inputId));
|
|
29714
|
+
});
|
|
29688
29715
|
append($$anchor2, label_1);
|
|
29689
29716
|
};
|
|
29690
29717
|
const select = ($$anchor2) => {
|
|
@@ -29694,7 +29721,12 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
29694
29721
|
labelText(node_4);
|
|
29695
29722
|
reset(label_2);
|
|
29696
29723
|
var select_1 = sibling(label_2, 2);
|
|
29697
|
-
attribute_effect(select_1, () => ({
|
|
29724
|
+
attribute_effect(select_1, () => ({
|
|
29725
|
+
...get$2(fieldAttributes),
|
|
29726
|
+
...restProps,
|
|
29727
|
+
name: field().key,
|
|
29728
|
+
class: inputClass()
|
|
29729
|
+
}));
|
|
29698
29730
|
var node_5 = child(select_1);
|
|
29699
29731
|
{
|
|
29700
29732
|
var consequent_1 = ($$anchor3) => {
|
|
@@ -29720,12 +29752,21 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
29720
29752
|
});
|
|
29721
29753
|
}
|
|
29722
29754
|
reset(select_1);
|
|
29723
|
-
template_effect(() =>
|
|
29755
|
+
template_effect(() => {
|
|
29756
|
+
set_class(label_2, 1, clsx(labelClass()));
|
|
29757
|
+
set_attribute(label_2, "for", get$2(inputId));
|
|
29758
|
+
});
|
|
29724
29759
|
bind_select_value(select_1, () => field().value, ($$value) => field(field().value = $$value, true));
|
|
29725
29760
|
append($$anchor2, fragment_2);
|
|
29726
29761
|
};
|
|
29727
29762
|
const date2 = ($$anchor2) => {
|
|
29728
29763
|
DatePicker_1($$anchor2, {
|
|
29764
|
+
get labelClass() {
|
|
29765
|
+
return labelClass();
|
|
29766
|
+
},
|
|
29767
|
+
get inputClass() {
|
|
29768
|
+
return inputClass();
|
|
29769
|
+
},
|
|
29729
29770
|
get dateString() {
|
|
29730
29771
|
return field().value;
|
|
29731
29772
|
},
|
|
@@ -29749,9 +29790,23 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
29749
29790
|
var label_3 = root_11$1();
|
|
29750
29791
|
var text_1 = child(label_3);
|
|
29751
29792
|
var input_3 = sibling(text_1);
|
|
29752
|
-
attribute_effect(
|
|
29793
|
+
attribute_effect(
|
|
29794
|
+
input_3,
|
|
29795
|
+
() => ({
|
|
29796
|
+
...get$2(fieldAttributes),
|
|
29797
|
+
...restProps,
|
|
29798
|
+
class: inputClass(),
|
|
29799
|
+
type: "radio"
|
|
29800
|
+
}),
|
|
29801
|
+
void 0,
|
|
29802
|
+
void 0,
|
|
29803
|
+
void 0,
|
|
29804
|
+
void 0,
|
|
29805
|
+
true
|
|
29806
|
+
);
|
|
29753
29807
|
reset(label_3);
|
|
29754
29808
|
template_effect(() => {
|
|
29809
|
+
set_class(label_3, 1, clsx(labelClass()));
|
|
29755
29810
|
set_attribute(label_3, "for", get$2(inputId) + get$2(option));
|
|
29756
29811
|
set_text(text_1, `${get$2(option) ?? ""} `);
|
|
29757
29812
|
});
|
|
@@ -29767,13 +29822,15 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
29767
29822
|
reset(fieldset);
|
|
29768
29823
|
append($$anchor2, fieldset);
|
|
29769
29824
|
};
|
|
29770
|
-
let field = prop($$props, "field", 15), describedById = prop($$props, "describedById", 7), restProps = /* @__PURE__ */ rest_props($$props, [
|
|
29825
|
+
let field = prop($$props, "field", 15), describedById = prop($$props, "describedById", 7), labelClass = prop($$props, "labelClass", 7), inputClass = prop($$props, "inputClass", 7), restProps = /* @__PURE__ */ rest_props($$props, [
|
|
29771
29826
|
"$$slots",
|
|
29772
29827
|
"$$events",
|
|
29773
29828
|
"$$legacy",
|
|
29774
29829
|
"$$host",
|
|
29775
29830
|
"field",
|
|
29776
|
-
"describedById"
|
|
29831
|
+
"describedById",
|
|
29832
|
+
"labelClass",
|
|
29833
|
+
"inputClass"
|
|
29777
29834
|
]);
|
|
29778
29835
|
const map = {
|
|
29779
29836
|
input,
|
|
@@ -29818,6 +29875,20 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
29818
29875
|
set describedById($$value) {
|
|
29819
29876
|
describedById($$value);
|
|
29820
29877
|
flushSync();
|
|
29878
|
+
},
|
|
29879
|
+
get labelClass() {
|
|
29880
|
+
return labelClass();
|
|
29881
|
+
},
|
|
29882
|
+
set labelClass($$value) {
|
|
29883
|
+
labelClass($$value);
|
|
29884
|
+
flushSync();
|
|
29885
|
+
},
|
|
29886
|
+
get inputClass() {
|
|
29887
|
+
return inputClass();
|
|
29888
|
+
},
|
|
29889
|
+
set inputClass($$value) {
|
|
29890
|
+
inputClass($$value);
|
|
29891
|
+
flushSync();
|
|
29821
29892
|
}
|
|
29822
29893
|
};
|
|
29823
29894
|
var fragment_6 = comment();
|
|
@@ -29836,14 +29907,14 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
29836
29907
|
append($$anchor, fragment_6);
|
|
29837
29908
|
return pop($$exports);
|
|
29838
29909
|
}
|
|
29839
|
-
create_custom_element(InputAndLabel, { field: {}, describedById: {} }, [], [], true);
|
|
29910
|
+
create_custom_element(InputAndLabel, { field: {}, describedById: {}, labelClass: {}, inputClass: {} }, [], [], true);
|
|
29840
29911
|
var root_1$6 = /* @__PURE__ */ from_html(`<span> </span>`);
|
|
29841
29912
|
var root_3$3 = /* @__PURE__ */ from_html(`<li> </li>`);
|
|
29842
29913
|
var root_2$5 = /* @__PURE__ */ from_html(`<ul class="go-field-errors" role="alert"></ul>`);
|
|
29843
29914
|
var root$5 = /* @__PURE__ */ from_html(`<!> <!> <!>`, 1);
|
|
29844
29915
|
function Field($$anchor, $$props) {
|
|
29845
29916
|
push($$props, true);
|
|
29846
|
-
let key = prop($$props, "key", 7), required = prop($$props, "required", 7, false);
|
|
29917
|
+
let key = prop($$props, "key", 7), required = prop($$props, "required", 7, false), labelClass = prop($$props, "labelClass", 7), inputClass = prop($$props, "inputClass", 7);
|
|
29847
29918
|
let field = /* @__PURE__ */ state(proxy(Forms.createField(key(), required())));
|
|
29848
29919
|
let details = /* @__PURE__ */ state(void 0);
|
|
29849
29920
|
onMount(async () => {
|
|
@@ -29886,6 +29957,20 @@ function Field($$anchor, $$props) {
|
|
|
29886
29957
|
set required($$value = false) {
|
|
29887
29958
|
required($$value);
|
|
29888
29959
|
flushSync();
|
|
29960
|
+
},
|
|
29961
|
+
get labelClass() {
|
|
29962
|
+
return labelClass();
|
|
29963
|
+
},
|
|
29964
|
+
set labelClass($$value) {
|
|
29965
|
+
labelClass($$value);
|
|
29966
|
+
flushSync();
|
|
29967
|
+
},
|
|
29968
|
+
get inputClass() {
|
|
29969
|
+
return inputClass();
|
|
29970
|
+
},
|
|
29971
|
+
set inputClass($$value) {
|
|
29972
|
+
inputClass($$value);
|
|
29973
|
+
flushSync();
|
|
29889
29974
|
}
|
|
29890
29975
|
};
|
|
29891
29976
|
var fragment = root$5();
|
|
@@ -29894,6 +29979,12 @@ function Field($$anchor, $$props) {
|
|
|
29894
29979
|
get describedById() {
|
|
29895
29980
|
return get$2(describedById);
|
|
29896
29981
|
},
|
|
29982
|
+
get labelClass() {
|
|
29983
|
+
return labelClass();
|
|
29984
|
+
},
|
|
29985
|
+
get inputClass() {
|
|
29986
|
+
return inputClass();
|
|
29987
|
+
},
|
|
29897
29988
|
get field() {
|
|
29898
29989
|
return get$2(field);
|
|
29899
29990
|
},
|
|
@@ -29943,7 +30034,9 @@ customElements.define("go-field", create_custom_element(
|
|
|
29943
30034
|
Field,
|
|
29944
30035
|
{
|
|
29945
30036
|
key: { attribute: "key", reflect: true, type: "String" },
|
|
29946
|
-
required: { attribute: "required", reflect: true, type: "Boolean" }
|
|
30037
|
+
required: { attribute: "required", reflect: true, type: "Boolean" },
|
|
30038
|
+
labelClass: { attribute: "label-class", reflect: true, type: "String" },
|
|
30039
|
+
inputClass: { attribute: "input-class", reflect: true, type: "String" }
|
|
29947
30040
|
},
|
|
29948
30041
|
[],
|
|
29949
30042
|
["getField"],
|
|
@@ -30060,14 +30153,32 @@ function FormFeedback($$anchor, $$props) {
|
|
|
30060
30153
|
customElements.define("go-form-feedback", create_custom_element(FormFeedback, {}, ["default"], [], false));
|
|
30061
30154
|
function Submit($$anchor, $$props) {
|
|
30062
30155
|
push($$props, true);
|
|
30156
|
+
let buttonClass = prop($$props, "buttonClass", 7, "");
|
|
30063
30157
|
let details = /* @__PURE__ */ state(void 0);
|
|
30064
30158
|
onMount(() => {
|
|
30065
30159
|
set(details, getDetails($$props.$$host), true);
|
|
30066
|
-
wrapInElement($$props.$$host, "button", { type: "submit" });
|
|
30160
|
+
wrapInElement($$props.$$host, "button", { type: "submit", class: buttonClass() });
|
|
30067
30161
|
});
|
|
30068
|
-
|
|
30162
|
+
var $$exports = {
|
|
30163
|
+
get buttonClass() {
|
|
30164
|
+
return buttonClass();
|
|
30165
|
+
},
|
|
30166
|
+
set buttonClass($$value = "") {
|
|
30167
|
+
buttonClass($$value);
|
|
30168
|
+
flushSync();
|
|
30169
|
+
}
|
|
30170
|
+
};
|
|
30171
|
+
return pop($$exports);
|
|
30069
30172
|
}
|
|
30070
|
-
customElements.define("go-submit", create_custom_element(
|
|
30173
|
+
customElements.define("go-submit", create_custom_element(
|
|
30174
|
+
Submit,
|
|
30175
|
+
{
|
|
30176
|
+
buttonClass: { attribute: "button-class", reflect: true, type: "String" }
|
|
30177
|
+
},
|
|
30178
|
+
[],
|
|
30179
|
+
[],
|
|
30180
|
+
false
|
|
30181
|
+
));
|
|
30071
30182
|
var root_1$3 = /* @__PURE__ */ from_html(`<p>Form submitted successfully!</p>`);
|
|
30072
30183
|
var root$3 = /* @__PURE__ */ from_html(`<div aria-live="assertive"><!></div>`);
|
|
30073
30184
|
function SuccessFeedback($$anchor, $$props) {
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "Giantmonkey GmbH"
|
|
5
5
|
},
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"version": "1.
|
|
7
|
+
"version": "1.12.0",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"main": "./dist-js/gomus-webcomponents.iife.js",
|
|
10
10
|
"module": "./dist-js/gomus-webcomponents.iife.js",
|
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
"@storybook/addon-designs": "^11.0.1",
|
|
59
59
|
"@storybook/addon-docs": "^10.0.1",
|
|
60
60
|
"@storybook/addon-svelte-csf": "^5.0.10",
|
|
61
|
-
"@storybook/addons": "^7.6.17",
|
|
62
61
|
"@storybook/svelte-vite": "^10.0.1",
|
|
63
62
|
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
64
63
|
"@testing-library/jest-dom": "^6.9.1",
|