smoothly 1.110.0 → 1.112.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/cjs/smoothly-app_98.cjs.entry.js +30 -14
- package/dist/cjs/smoothly-app_98.cjs.entry.js.map +1 -1
- package/dist/collection/components/input/clear/index.js +11 -7
- package/dist/collection/components/input/clear/index.js.map +1 -1
- package/dist/collection/components/input/reset/index.js +12 -8
- package/dist/collection/components/input/reset/index.js.map +1 -1
- package/dist/collection/components/input/submit/index.js +13 -7
- package/dist/collection/components/input/submit/index.js.map +1 -1
- package/dist/components/{p-CKxNCxBn.js → p-BGKOGyFA.js} +2 -2
- package/dist/components/{p-fJkfUsWz.js → p-BRkEF66h.js} +2 -2
- package/dist/components/{p-CrNizZqW.js → p-BX6yRNGo.js} +2 -2
- package/dist/components/{p-DZadnBSZ.js → p-BaBGzDg_.js} +2 -2
- package/dist/components/p-BaBGzDg_.js.map +1 -0
- package/dist/components/{p-p0yn7c4h.js → p-BiwhssQ8.js} +2 -2
- package/dist/components/{p-C8cvGmGP.js → p-Bj9DsW03.js} +2 -2
- package/dist/components/{p-DR3KUEvE.js → p-Bp9BMsim.js} +2 -2
- package/dist/components/{p-DBkHnJdp.js → p-Bs8X_nDB.js} +2 -2
- package/dist/components/{p-fafhoJgv.js → p-C3__jhwf.js} +2 -2
- package/dist/components/p-CG636AEF.js.map +1 -1
- package/dist/components/{p-DqwlZYFh.js → p-CKrPTQ_S.js} +2 -2
- package/dist/components/p-CKrPTQ_S.js.map +1 -0
- package/dist/components/{p-BgXgncGY.js → p-CZ6kkjYF.js} +2 -2
- package/dist/components/{p-DgHAvBgB.js → p-CqSJ0pgl.js} +2 -2
- package/dist/components/{p-C629G4I1.js → p-CqyInbXs.js} +2 -2
- package/dist/components/{p-CyhRVB6K.js → p-CrxXCTnH.js} +2 -2
- package/dist/components/{p-DA_1vtmU.js → p-CtN3gqjJ.js} +2 -2
- package/dist/components/{p-CVp4Wd4u.js → p-D7cDUGTe.js} +2 -2
- package/dist/components/p-D7cDUGTe.js.map +1 -0
- package/dist/components/p-DBuVH8IL.js.map +1 -1
- package/dist/components/{p-CiJgTdse.js → p-DVuQ4t_X.js} +2 -2
- package/dist/components/p-DZ4ogW8V.js.map +1 -1
- package/dist/components/{p-CdYYtJX2.js → p-DbIjGsJb.js} +2 -2
- package/dist/components/{p-HKrMuYSD.js → p-Dx5PGIAk.js} +2 -2
- package/dist/components/{p-DlHIV5_u.js → p-Mk_F6MCP.js} +2 -2
- package/dist/components/{p-C5Bgwjpo.js → p-jatJrx5f.js} +2 -2
- package/dist/components/p-t3cG0BK6.js +2 -0
- package/dist/components/{p-D1cLYdzg.js.map → p-t3cG0BK6.js.map} +1 -1
- package/dist/components/smoothly-app-demo.js +1 -1
- package/dist/components/smoothly-button-demo-standard.js +1 -1
- package/dist/components/smoothly-button-demo.js +1 -1
- package/dist/components/smoothly-form-demo-all.js +1 -1
- package/dist/components/smoothly-form-demo-card.js +1 -1
- package/dist/components/smoothly-form-demo-controlled.js +1 -1
- package/dist/components/smoothly-form-demo-date-range.js +1 -1
- package/dist/components/smoothly-form-demo-date.js +1 -1
- package/dist/components/smoothly-form-demo-login.js +1 -1
- package/dist/components/smoothly-form-demo-pet.js +1 -1
- package/dist/components/smoothly-form-demo-prices.js +1 -1
- package/dist/components/smoothly-form-demo-schedule.js +1 -1
- package/dist/components/smoothly-form-demo-transparent.js +1 -1
- package/dist/components/smoothly-form-demo-typed.js +1 -1
- package/dist/components/smoothly-form-demo.js +1 -1
- package/dist/components/smoothly-icon-demo.js +1 -1
- package/dist/components/smoothly-input-checkbox-demo.js +1 -1
- package/dist/components/smoothly-input-clear.js +1 -1
- package/dist/components/smoothly-input-date-demo.js +1 -1
- package/dist/components/smoothly-input-demo-standard.js +1 -1
- package/dist/components/smoothly-input-demo.js +1 -1
- package/dist/components/smoothly-input-range-demo.js +1 -1
- package/dist/components/smoothly-input-reset.js +1 -1
- package/dist/components/smoothly-input-submit.js +1 -1
- package/dist/esm/smoothly-app_98.entry.js +30 -14
- package/dist/esm/smoothly-app_98.entry.js.map +1 -1
- package/dist/smoothly/p-23badc13.entry.js +2 -0
- package/dist/smoothly/p-23badc13.entry.js.map +1 -0
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/types/components/input/clear/index.d.ts +1 -1
- package/dist/types/components/input/reset/index.d.ts +1 -1
- package/dist/types/components.d.ts +2 -14
- package/package.json +1 -1
- package/dist/components/p-CVp4Wd4u.js.map +0 -1
- package/dist/components/p-D1cLYdzg.js +0 -2
- package/dist/components/p-DZadnBSZ.js.map +0 -1
- package/dist/components/p-DqwlZYFh.js.map +0 -1
- package/dist/smoothly/p-0a7de225.entry.js +0 -2
- package/dist/smoothly/p-0a7de225.entry.js.map +0 -1
- /package/dist/components/{p-CKxNCxBn.js.map → p-BGKOGyFA.js.map} +0 -0
- /package/dist/components/{p-fJkfUsWz.js.map → p-BRkEF66h.js.map} +0 -0
- /package/dist/components/{p-CrNizZqW.js.map → p-BX6yRNGo.js.map} +0 -0
- /package/dist/components/{p-p0yn7c4h.js.map → p-BiwhssQ8.js.map} +0 -0
- /package/dist/components/{p-C8cvGmGP.js.map → p-Bj9DsW03.js.map} +0 -0
- /package/dist/components/{p-DR3KUEvE.js.map → p-Bp9BMsim.js.map} +0 -0
- /package/dist/components/{p-DBkHnJdp.js.map → p-Bs8X_nDB.js.map} +0 -0
- /package/dist/components/{p-fafhoJgv.js.map → p-C3__jhwf.js.map} +0 -0
- /package/dist/components/{p-BgXgncGY.js.map → p-CZ6kkjYF.js.map} +0 -0
- /package/dist/components/{p-DgHAvBgB.js.map → p-CqSJ0pgl.js.map} +0 -0
- /package/dist/components/{p-C629G4I1.js.map → p-CqyInbXs.js.map} +0 -0
- /package/dist/components/{p-CyhRVB6K.js.map → p-CrxXCTnH.js.map} +0 -0
- /package/dist/components/{p-DA_1vtmU.js.map → p-CtN3gqjJ.js.map} +0 -0
- /package/dist/components/{p-CiJgTdse.js.map → p-DVuQ4t_X.js.map} +0 -0
- /package/dist/components/{p-CdYYtJX2.js.map → p-DbIjGsJb.js.map} +0 -0
- /package/dist/components/{p-HKrMuYSD.js.map → p-Dx5PGIAk.js.map} +0 -0
- /package/dist/components/{p-DlHIV5_u.js.map → p-Mk_F6MCP.js.map} +0 -0
- /package/dist/components/{p-C5Bgwjpo.js.map → p-jatJrx5f.js.map} +0 -0
|
@@ -6,7 +6,6 @@ import { Input } from "../Input";
|
|
|
6
6
|
export class SmoothlyInputClear {
|
|
7
7
|
constructor() {
|
|
8
8
|
this.fill = "clear";
|
|
9
|
-
this.disabled = false;
|
|
10
9
|
this.size = "icon";
|
|
11
10
|
this.display = true;
|
|
12
11
|
this.type = "input";
|
|
@@ -23,10 +22,16 @@ export class SmoothlyInputClear {
|
|
|
23
22
|
this.display = defined && !p.readonly && !p.disabled;
|
|
24
23
|
}
|
|
25
24
|
if (p instanceof SmoothlyForm) {
|
|
26
|
-
this.disabled = p.readonly || Object.values(p.value).filter(val => val).length < 1;
|
|
27
25
|
this.display = !p.readonly;
|
|
28
26
|
}
|
|
29
27
|
});
|
|
28
|
+
if (typeof this.disabled !== "boolean") {
|
|
29
|
+
parent.listen(async (p) => {
|
|
30
|
+
if (p instanceof SmoothlyForm) {
|
|
31
|
+
this.disabled = p.readonly || Object.values(p.value).filter(val => val).length < 1;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
30
35
|
}
|
|
31
36
|
}
|
|
32
37
|
});
|
|
@@ -37,7 +42,7 @@ export class SmoothlyInputClear {
|
|
|
37
42
|
}
|
|
38
43
|
render() {
|
|
39
44
|
var _a;
|
|
40
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: 'c3057c346978456fae66b50daa28779d57897fe4', title: this.tooltip }, h("smoothly-button", { key: 'ada585112d53669e71813f504c07f4ea51f8365a', disabled: this.disabled, size: this.size, type: "button", shape: this.shape, expand: this.expand, color: this.color, fill: (_a = this.fill) !== null && _a !== void 0 ? _a : (this.type == "input" ? "clear" : undefined) }, h("slot", { key: '5300d48ce3c05f9ba4e7492db5069e5252aba1c3' }), h("smoothly-icon", { key: '771161bfba19ad4f9f875481a75c5b7b65d3d143', name: "close", size: "tiny" }))));
|
|
41
46
|
}
|
|
42
47
|
static get is() { return "smoothly-input-clear"; }
|
|
43
48
|
static get encapsulation() { return "scoped"; }
|
|
@@ -130,11 +135,11 @@ export class SmoothlyInputClear {
|
|
|
130
135
|
"mutable": true,
|
|
131
136
|
"complexType": {
|
|
132
137
|
"original": "boolean",
|
|
133
|
-
"resolved": "boolean",
|
|
138
|
+
"resolved": "boolean | undefined",
|
|
134
139
|
"references": {}
|
|
135
140
|
},
|
|
136
141
|
"required": false,
|
|
137
|
-
"optional":
|
|
142
|
+
"optional": true,
|
|
138
143
|
"docs": {
|
|
139
144
|
"tags": [],
|
|
140
145
|
"text": ""
|
|
@@ -142,8 +147,7 @@ export class SmoothlyInputClear {
|
|
|
142
147
|
"getter": false,
|
|
143
148
|
"setter": false,
|
|
144
149
|
"reflect": true,
|
|
145
|
-
"attribute": "disabled"
|
|
146
|
-
"defaultValue": "false"
|
|
150
|
+
"attribute": "disabled"
|
|
147
151
|
},
|
|
148
152
|
"size": {
|
|
149
153
|
"type": "string",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/input/clear/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAE9F,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAOhC,MAAM,OAAO,kB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EAAe,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,MAAM,GAAG,CACzB,CACZ,CACP,CAAA;IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Listen, Prop } from \"@stencil/core\"\nimport { Color, Fill } from \"../../../model\"\nimport { SmoothlyForm } from \"../../form\"\nimport { Clearable } from \"../Clearable\"\nimport { Editable } from \"../Editable\"\nimport { Input } from \"../Input\"\n\n@Component({\n\ttag: \"smoothly-input-clear\",\n\tstyleUrl: \"./style.css\",\n\tscoped: true,\n})\nexport class SmoothlyInputClear {\n\t@Element() element: HTMLSmoothlyInputClearElement\n\t@Prop() color?: Color\n\t@Prop({ reflect: true }) expand?: \"block\" | \"full\"\n\t@Prop({ reflect: true }) fill?: Fill = \"clear\"\n\t@Prop({ reflect: true, mutable: true }) disabled?: boolean\n\t@Prop({ reflect: true }) size: \"small\" | \"large\" | \"icon\" | \"flexible\" = \"icon\"\n\t@Prop({ reflect: true }) shape?: \"rounded\"\n\t@Prop({ reflect: true, mutable: true }) display = true\n\t@Prop({ reflect: true }) type: \"form\" | \"input\" = \"input\"\n\t@Prop() tooltip = \"Clear\"\n\tprivate parent?: Clearable | (Clearable & Editable)\n\t@Event() smoothlyInputLoad: EventEmitter<(parent: Editable) => void>\n\n\tasync componentWillLoad() {\n\t\tthis.smoothlyInputLoad.emit(parent => {\n\t\t\tif (Clearable.is(parent)) {\n\t\t\t\tthis.parent = parent\n\t\t\t\tif (Editable.Element.is(parent)) {\n\t\t\t\t\tparent.listen(async p => {\n\t\t\t\t\t\tif (Input.is(p)) {\n\t\t\t\t\t\t\tconst defined = typeof p.defined == \"boolean\" ? p.defined : Boolean(await p.getValue())\n\t\t\t\t\t\t\tthis.display = defined && !p.readonly && !p.disabled\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (p instanceof SmoothlyForm) {\n\t\t\t\t\t\t\tthis.display = !p.readonly\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\tif (typeof this.disabled !== \"boolean\") {\n\t\t\t\t\t\tparent.listen(async p => {\n\t\t\t\t\t\t\tif (p instanceof SmoothlyForm) {\n\t\t\t\t\t\t\t\tthis.disabled = p.readonly || Object.values(p.value).filter(val => val).length < 1\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\t@Listen(\"click\")\n\tclickHandler() {\n\t\tthis.parent?.clear()\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<Host title={this.tooltip}>\n\t\t\t\t<smoothly-button\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\tsize={this.size}\n\t\t\t\t\ttype={\"button\"}\n\t\t\t\t\tshape={this.shape}\n\t\t\t\t\texpand={this.expand}\n\t\t\t\t\tcolor={this.color}\n\t\t\t\t\tfill={this.fill ?? (this.type == \"input\" ? \"clear\" : undefined)}>\n\t\t\t\t\t<slot />\n\t\t\t\t\t<smoothly-icon name=\"close\" size=\"tiny\" />\n\t\t\t\t</smoothly-button>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
|
|
@@ -4,7 +4,6 @@ import { Editable } from "../Editable";
|
|
|
4
4
|
import { Input } from "../Input";
|
|
5
5
|
export class SmoothlyInputReset {
|
|
6
6
|
constructor() {
|
|
7
|
-
this.disabled = false;
|
|
8
7
|
this.size = "icon";
|
|
9
8
|
this.display = true;
|
|
10
9
|
this.type = "input";
|
|
@@ -14,7 +13,6 @@ export class SmoothlyInputReset {
|
|
|
14
13
|
this.smoothlyInputLoad.emit(parent => {
|
|
15
14
|
if (Editable.Element.type.is(parent)) {
|
|
16
15
|
this.parent = parent;
|
|
17
|
-
this.readonlyAtLoad = parent.readonly;
|
|
18
16
|
parent.listen(async (p) => {
|
|
19
17
|
if (Input.is(p)) {
|
|
20
18
|
const defined = typeof p.defined == "boolean" ? p.defined : Boolean(await p.getValue());
|
|
@@ -22,9 +20,16 @@ export class SmoothlyInputReset {
|
|
|
22
20
|
}
|
|
23
21
|
if (p instanceof SmoothlyForm) {
|
|
24
22
|
this.display = !p.readonly;
|
|
25
|
-
this.disabled = !this.readonlyAtLoad && !p.isDifferentFromInitial;
|
|
26
23
|
}
|
|
27
24
|
});
|
|
25
|
+
if (typeof this.disabled !== "boolean") {
|
|
26
|
+
this.readonlyAtLoad = parent.readonly;
|
|
27
|
+
parent.listen(async (p) => {
|
|
28
|
+
if (p instanceof SmoothlyForm) {
|
|
29
|
+
this.disabled = !this.readonlyAtLoad && !p.isDifferentFromInitial;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
28
33
|
}
|
|
29
34
|
});
|
|
30
35
|
}
|
|
@@ -36,7 +41,7 @@ export class SmoothlyInputReset {
|
|
|
36
41
|
}
|
|
37
42
|
render() {
|
|
38
43
|
var _a;
|
|
39
|
-
return (h(Host, { key: '
|
|
44
|
+
return (h(Host, { key: '07fe387d6e31ee4b8733dd797ccbb6bc2a602450', title: this.tooltip }, h("smoothly-button", { key: 'db64da157afc163be326cc342d344881b0dd665c', disabled: this.disabled, size: this.size, type: "button", shape: this.shape, expand: this.expand, color: this.color, fill: (_a = this.fill) !== null && _a !== void 0 ? _a : (this.type == "input" ? "clear" : undefined), onClick: event => this.clickHandler(event) }, h("slot", { key: '6a6a1f5f60b8dee75d3adeba5a7dfd611a84d256' }), h("smoothly-icon", { key: '5d37c4a5f21cf620ab223979e1b0d0e589b97d73', flip: "x", name: "refresh-outline", size: "tiny" }))));
|
|
40
45
|
}
|
|
41
46
|
static get is() { return "smoothly-input-reset"; }
|
|
42
47
|
static get encapsulation() { return "scoped"; }
|
|
@@ -128,11 +133,11 @@ export class SmoothlyInputReset {
|
|
|
128
133
|
"mutable": true,
|
|
129
134
|
"complexType": {
|
|
130
135
|
"original": "boolean",
|
|
131
|
-
"resolved": "boolean",
|
|
136
|
+
"resolved": "boolean | undefined",
|
|
132
137
|
"references": {}
|
|
133
138
|
},
|
|
134
139
|
"required": false,
|
|
135
|
-
"optional":
|
|
140
|
+
"optional": true,
|
|
136
141
|
"docs": {
|
|
137
142
|
"tags": [],
|
|
138
143
|
"text": ""
|
|
@@ -140,8 +145,7 @@ export class SmoothlyInputReset {
|
|
|
140
145
|
"getter": false,
|
|
141
146
|
"setter": false,
|
|
142
147
|
"reflect": true,
|
|
143
|
-
"attribute": "disabled"
|
|
144
|
-
"defaultValue": "false"
|
|
148
|
+
"attribute": "disabled"
|
|
145
149
|
},
|
|
146
150
|
"size": {
|
|
147
151
|
"type": "string",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/input/reset/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAErF,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAOhC,MAAM,OAAO,kBAAkB;IAL/B;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/input/reset/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAErF,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Event, EventEmitter, h, Host, Listen, Prop } from \"@stencil/core\"\nimport { Color, Fill } from \"../../../model\"\nimport { SmoothlyForm } from \"../../form\"\nimport { Editable } from \"../Editable\"\nimport { Input } from \"../Input\"\n\n@Component({\n\ttag: \"smoothly-input-reset\",\n\tstyleUrl: \"./style.css\",\n\tscoped: true,\n})\nexport class SmoothlyInputReset {\n\treadonlyAtLoad: boolean\n\t@Prop() color?: Color\n\t@Prop({ reflect: true }) expand?: \"block\" | \"full\"\n\t@Prop({ reflect: true }) fill?: Fill\n\t@Prop({ reflect: true, mutable: true }) disabled?: boolean\n\t@Prop({ reflect: true }) size: \"flexible\" | \"small\" | \"large\" | \"icon\" = \"icon\"\n\t@Prop({ reflect: true }) shape?: \"rounded\"\n\t@Prop({ reflect: true, mutable: true }) display = true\n\t@Prop({ reflect: true }) type: \"form\" | \"input\" = \"input\"\n\t@Prop() tooltip = \"Reset\"\n\tprivate parent?: Editable.Element\n\t@Event() smoothlyInputLoad: EventEmitter<(parent: Editable) => void>\n\n\tasync componentWillLoad() {\n\t\tthis.smoothlyInputLoad.emit(parent => {\n\t\t\tif (Editable.Element.type.is(parent)) {\n\t\t\t\tthis.parent = parent\n\t\t\t\tparent.listen(async p => {\n\t\t\t\t\tif (Input.is(p)) {\n\t\t\t\t\t\tconst defined = typeof p.defined == \"boolean\" ? p.defined : Boolean(await p.getValue())\n\t\t\t\t\t\tthis.display = p.readonly || !defined ? false : p.isDifferentFromInitial\n\t\t\t\t\t}\n\t\t\t\t\tif (p instanceof SmoothlyForm) {\n\t\t\t\t\t\tthis.display = !p.readonly\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tif (typeof this.disabled !== \"boolean\") {\n\t\t\t\t\tthis.readonlyAtLoad = parent.readonly\n\t\t\t\t\tparent.listen(async p => {\n\t\t\t\t\t\tif (p instanceof SmoothlyForm) {\n\t\t\t\t\t\t\tthis.disabled = !this.readonlyAtLoad && !p.isDifferentFromInitial\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\t@Listen(\"click\")\n\tclickHandler(event: MouseEvent) {\n\t\tevent.stopPropagation()\n\t\tthis.parent?.reset()\n\t\tthis.parent instanceof SmoothlyForm && this.readonlyAtLoad && this.parent?.edit(false)\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<Host title={this.tooltip}>\n\t\t\t\t<smoothly-button\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\tsize={this.size}\n\t\t\t\t\ttype={\"button\"}\n\t\t\t\t\tshape={this.shape}\n\t\t\t\t\texpand={this.expand}\n\t\t\t\t\tcolor={this.color}\n\t\t\t\t\tfill={this.fill ?? (this.type == \"input\" ? \"clear\" : undefined)}\n\t\t\t\t\tonClick={event => this.clickHandler(event)}>\n\t\t\t\t\t<slot />\n\t\t\t\t\t<smoothly-icon flip=\"x\" name=\"refresh-outline\" size=\"tiny\" />\n\t\t\t\t</smoothly-button>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
|
|
@@ -17,14 +17,20 @@ export class SmoothlyInputSubmit {
|
|
|
17
17
|
if (Submittable.is(parent) && Editable.type.is(parent)) {
|
|
18
18
|
this.parent = parent;
|
|
19
19
|
parent.listen(async (p) => {
|
|
20
|
-
var _a;
|
|
21
20
|
this.display = !p.readonly;
|
|
22
|
-
this.disabled =
|
|
23
|
-
!this.delete &&
|
|
24
|
-
(p.readonly ||
|
|
25
|
-
("validator" in p && p.validator instanceof isly.Type && !((_a = p.validator) === null || _a === void 0 ? void 0 : _a.is(Data.convertArrays(p.value)))) ||
|
|
26
|
-
!p.isDifferentFromInitial);
|
|
27
21
|
});
|
|
22
|
+
if (typeof this.disabled !== "boolean") {
|
|
23
|
+
parent.listen(async (p) => {
|
|
24
|
+
var _a;
|
|
25
|
+
this.disabled =
|
|
26
|
+
!this.delete &&
|
|
27
|
+
(p.readonly ||
|
|
28
|
+
("validator" in p &&
|
|
29
|
+
p.validator instanceof isly.Type &&
|
|
30
|
+
!((_a = p.validator) === null || _a === void 0 ? void 0 : _a.is(Data.convertArrays(p.value)))) ||
|
|
31
|
+
!p.isDifferentFromInitial);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
28
34
|
}
|
|
29
35
|
});
|
|
30
36
|
}
|
|
@@ -34,7 +40,7 @@ export class SmoothlyInputSubmit {
|
|
|
34
40
|
}
|
|
35
41
|
render() {
|
|
36
42
|
var _a, _b;
|
|
37
|
-
return (h(Host, { key: '
|
|
43
|
+
return (h(Host, { key: '4ba889ed871427b4fd99610c5b775068dc05cc54', title: this.tooltip }, this.delete == true ? (h("smoothly-button-confirm", { size: this.size, shape: this.shape, expand: this.expand, color: (_a = this.color) !== null && _a !== void 0 ? _a : "danger", fill: this.fill, onSmoothlyConfirm: () => this.clickHandler() }, h("slot", null), h("smoothly-icon", { name: "trash-outline", fill: "solid", size: "tiny" }))) : (h("smoothly-button", { disabled: this.disabled, size: this.size, type: "button", shape: this.shape, expand: this.expand, color: (_b = this.color) !== null && _b !== void 0 ? _b : "success", fill: this.fill, onClick: () => this.clickHandler() }, h("slot", null), this.icon && h("smoothly-icon", { name: this.icon, fill: "solid", size: "tiny" })))));
|
|
38
44
|
}
|
|
39
45
|
static get is() { return "smoothly-input-submit"; }
|
|
40
46
|
static get encapsulation() { return "scoped"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/input/submit/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqB,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAS,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M,EACnB,KAAK,EAAE,MAAA,IAAI,CAAC,KAAK,mCAAI,QAAQ,EAC7B,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,iBAAiB,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE;YAC5C,eAAQ;YACR,qBAAe,IAAI,EAAC,eAAe,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,MAAM,GAAG,CACtC,CAC1B,CAAC,CAAC,CAAC,CACH,uBACC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,KAAK,EAAE,MAAA,IAAI,CAAC,KAAK,mCAAI,SAAS,EAC9B,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE;YAClC,eAAQ;YACP,IAAI,CAAC,IAAI,IAAI,qBAAe,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,MAAM,GAAG,CACxD,CAClB,CACK,CACP,CAAA;IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, ComponentWillLoad, Event, EventEmitter, h, Host, Prop, VNode } from \"@stencil/core\"\nimport { isly } from \"isly\"\nimport { Color, Data, Fill, Icon } from \"../../../model\"\nimport { Editable } from \"../Editable\"\nimport { Submittable } from \"../Submittable\"\n\n@Component({\n\ttag: \"smoothly-input-submit\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyInputSubmit implements ComponentWillLoad {\n\tprivate parent?: Submittable & Editable\n\t@Prop({ reflect: true }) delete = false\n\t@Prop() color?: Color\n\t@Prop() icon: Icon | false = \"checkmark-outline\"\n\t@Prop({ reflect: true }) expand?: \"block\" | \"full\"\n\t@Prop({ reflect: true }) fill?: Fill\n\t@Prop({ reflect: true, mutable: true }) disabled = false\n\t@Prop({ reflect: true, mutable: true }) display = false\n\t@Prop({ reflect: true }) shape?: \"rounded\"\n\t@Prop({ reflect: true }) size: \"flexible\" | \"small\" | \"large\" | \"icon\" = \"icon\"\n\t@Prop() tooltip = this.delete ? \"Remove\" : \"Submit\"\n\t@Event() smoothlyInputLoad: EventEmitter<(parent: Editable) => void>\n\tcomponentWillLoad(): void {\n\t\tthis.smoothlyInputLoad.emit(parent => {\n\t\t\tif (Submittable.is(parent) && Editable.type.is(parent)) {\n\t\t\t\tthis.parent = parent\n\t\t\t\tparent.listen(async p => {\n\t\t\t\t\tthis.display = !p.readonly\n\t\t\t\t})\n\t\t\t\tif (typeof this.disabled !== \"boolean\") {\n\t\t\t\t\tparent.listen(async p => {\n\t\t\t\t\t\tthis.disabled =\n\t\t\t\t\t\t\t!this.delete &&\n\t\t\t\t\t\t\t(p.readonly ||\n\t\t\t\t\t\t\t\t(\"validator\" in p &&\n\t\t\t\t\t\t\t\t\tp.validator instanceof isly.Type &&\n\t\t\t\t\t\t\t\t\t!p.validator?.is(Data.convertArrays(p.value))) ||\n\t\t\t\t\t\t\t\t!p.isDifferentFromInitial)\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\tclickHandler() {\n\t\tthis.parent?.submit(this.delete)\n\t}\n\n\trender(): VNode | VNode[] {\n\t\treturn (\n\t\t\t<Host title={this.tooltip}>\n\t\t\t\t{this.delete == true ? (\n\t\t\t\t\t<smoothly-button-confirm\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\tshape={this.shape}\n\t\t\t\t\t\texpand={this.expand}\n\t\t\t\t\t\tcolor={this.color ?? \"danger\"}\n\t\t\t\t\t\tfill={this.fill}\n\t\t\t\t\t\tonSmoothlyConfirm={() => this.clickHandler()}>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t<smoothly-icon name=\"trash-outline\" fill=\"solid\" size=\"tiny\" />\n\t\t\t\t\t</smoothly-button-confirm>\n\t\t\t\t) : (\n\t\t\t\t\t<smoothly-button\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\ttype={\"button\"}\n\t\t\t\t\t\tshape={this.shape}\n\t\t\t\t\t\texpand={this.expand}\n\t\t\t\t\t\tcolor={this.color ?? \"success\"}\n\t\t\t\t\t\tfill={this.fill}\n\t\t\t\t\t\tonClick={() => this.clickHandler()}>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t{this.icon && <smoothly-icon name={this.icon} fill=\"solid\" size=\"tiny\" />}\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as t,c as o,h as a,d as s,t as c}from"./p-BsZrGTcp.js";import{i as m}from"./p-BVKhAhsB.js";import{d}from"./p-BoHJT9bR.js";import{d as l}from"./p-BHEtq3Ue.js";import{d as i}from"./p-DX3KKRD9.js";import{d as b}from"./p-BqAN7jax.js";import{d as f}from"./p-B8ljN4o0.js";import{d as n}from"./p-DM5CKilY.js";import{d as r}from"./p-CR3Ni_o7.js";import{d as y}from"./p-B-l1S16Z.js";import{d as u}from"./p-Ud7Qhkgt.js";import{d as h}from"./p-C3FORjes.js";import{d as p}from"./p-DgaHxdNI.js";import{d as k}from"./p-BiQsRsV4.js";import{d as v}from"./p-R4uIvvER.js";import{d as g}from"./p-C_f8s6n5.js";import{d as j}from"./p-DZadnBSZ.js";import{d as E}from"./p-nrkV1PqR.js";import{d as x}from"./p-D58kSmOp.js";import{d as D}from"./p-C9zTTp-4.js";import{d as S}from"./p-BgXgncGY.js";import{d as w}from"./p-DKggy9E3.js";import{d as C}from"./p-CGG77xzV.js";import{d as z}from"./p-DdTTiJbE.js";import{d as I}from"./p-CdYYtJX2.js";import{d as L}from"./p-CUiFFtAw.js";import{d as B}from"./p-CioJtwj-.js";import{d as A}from"./p-DTqtObrT.js";import{d as R}from"./p-nHKstm2X.js";import{d as N}from"./p-BDhPxj59.js";import{d as M}from"./p-DXHBXAV0.js";import{d as T}from"./p-D2FsRCII.js";import{d as F}from"./p-fafhoJgv.js";import{d as H}from"./p-DqwlZYFh.js";import{d as J}from"./p-RNCr3p17.js";import{d as X}from"./p-CVp4Wd4u.js";import{d as K}from"./p-BS2SWUX6.js";import{d as O}from"./p-CsLlJDsh.js";import{d as U}from"./p-DSsOLbj6.js";import{d as V}from"./p-2Y5tLcQ1.js";import{d as Y}from"./p-DMzn0Iz0.js";const Z=()=>`.sc-smoothly-input-demo-h{display:flex;flex-direction:column;margin-top:2em;margin-bottom:10rem}.sc-smoothly-input-demo-h .select-div-row.sc-smoothly-input-demo{display:flex}.sc-smoothly-input-demo-h .select-div-row.sc-smoothly-input-demo smoothly-input.sc-smoothly-input-demo{flex:1}smoothly-input-demo-standard.sc-smoothly-input-demo{margin-bottom:2rem}div.inputs.sc-smoothly-input-demo{max-width:min(calc(100% - 2rem), 56rem);margin:auto}div.inputs.sc-smoothly-input-demo>h2.sc-smoothly-input-demo:not(:first-child){padding-top:3em;margin-top:3em;border-top:1px solid black}.checkbox-group.sc-smoothly-input-demo{display:flex;gap:1.5em;align-items:center;background-color:rgb(var(--smoothly-input-background))}.select-div.sc-smoothly-input-demo{display:flex;gap:1em;flex-wrap:wrap}.select-div.sc-smoothly-input-demo>*.sc-smoothly-input-demo{flex-grow:1;min-width:min(100%, var(--smoothly-form-input-min-width, 18rem));flex-basis:40%}`;const q=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.smoothlyUrlUpdate=o(this,"smoothlyUrlUpdate");this.duration={hours:8};this.alphanumeric="!@##";this.numbers=[1,2,3,4,5,6,7,8,9]}render(){return a(s,{key:"77487e04cd393519b5080f752b3cba328ae8bbd3"},a("smoothly-input-demo-standard",{key:"f9de577b637efcaffe3a92dc55bff25520e0384f"}),a("smoothly-input-date-demo",{key:"cdb1c974c8cb5844cf800f8fc52c407479db307e"}),a("smoothly-input-demo-user-input",{key:"38bb2d03ef20e3e8e5737e423f4f54c9fad4f973"}),a("smoothly-input-demo-radio",{key:"999e3b97199fbcb547e83c589c1447e726f4754a"}),a("div",{key:"ee8094197dd274791200a010baedd05db71b888a",class:"inputs"},a("h2",{key:"5b65b420015ad7bb32ef059f6aee019400cdc6b3"},"Calendar"),a("smoothly-input-date",{key:"375cad6d89a6f80cbe8e67cbeb1759e0cb28ab11",name:"some-date"},"Calendar"),a("smoothly-input-date-time",{key:"797e6d6ccbbba14258926f21f202eacad2b85d76",name:"someDateTime",value:m.DateTime.now()},"DateTime"),a("h2",{key:"a49689e5821a93c721be25c6faa570f05402582b"},"Date Range"),a("smoothly-input-date-range",{key:"ab71a879e70b97431da2f0beacf54dc093ca0a7a",name:"testing",start:m.Date.now(),end:m.Date.nextMonth(m.Date.now()),min:"2021-10-01",max:"2025-01-31"}),a("smoothly-input-date-range",{key:"703952d0ba703d6a8cc26b4bef028d7a48c8c4f6",name:"testing",start:m.Date.now(),end:m.Date.nextMonth(m.Date.now()),min:"2021-10-10",max:"2024-12-30"},a("smoothly-input-reset",{key:"5bd07b3504d054442cefb2ba9db61c4d83ed39c9",slot:"end",size:"icon"})),a("smoothly-input-date-range",{key:"39c7ae936d2a952626f20dcc19ae0a52885db2f5",looks:"grid",start:m.Date.now(),end:m.Date.nextMonth(m.Date.now()),min:"2021-10-10",max:"2025-12-30",showLabel:false,style:{"--smoothly-input-border-radius":"0.5rem"}},a("smoothly-input-clear",{key:"ef4179eba332c4aefcccec094f4cd75e0a724b3d",slot:"end",size:"icon"})),a("h2",{key:"8b97455a27099963ab131055f4d43f0e050f4cc7"},"Date"),a("smoothly-input-date",{key:"c167353ed6a2b37488e709929e8dd7691ff3b0b7"},"Date"),a("smoothly-input-date",{key:"f0cfeb105e03c511c2b2c4daa5cd618fb1bcbfb4",showLabel:false,value:"2021-10-28",max:"2021-12-30",min:"2021-10-10"},"Date"),a("smoothly-input-date",{key:"771efe6acb85206eb87024409a78ed52d3907af0",value:"2021-10-28"},"Date",a("smoothly-input-reset",{key:"8e009b6d59da638ada992b07ddb2c2d1c071be55",slot:"end",size:"icon"})),a("smoothly-input-date",{key:"936b5cdea71f19463922d25d2ed9468df89586ce",value:"2021-10-28"},"Date",a("smoothly-input-clear",{key:"ad177348cf1f5353d3a2b7c7317fbd71c3614f61",slot:"end",size:"icon"})),a("h2",{key:"475ca58552f978b55eba5222267d18a0d78938c5"},"Select"),a("div",{key:"7eae0b4cee9e74e38e9e726934101066f870aeec",class:"select-div"},a("smoothly-input-select",{key:"16d9addd365f75e1ff255d9cd94bb90b20901fd3",name:"select-dessert",looks:"border"},a("label",{key:"7e7550a94183d31ae99bc7dd85eda059c755e3d0",slot:"label"},"Select with clear button"),a("smoothly-item",{key:"62b741c6154152014d1206fd2481984aa3097d8f",value:"1"},"Ice cream"),a("smoothly-item",{key:"b45f30884b44e05528555295bd11b4e01fc5d3a4",value:"2"},"Sponge cake"),a("smoothly-item",{key:"7b2c3712a21be6943acf8eb1557ddd9fa101320c",value:"3",disabled:true},"Disabled Item"),a("smoothly-item",{key:"47bbd5ccbaaa9977688f2db60e3b01ee44c37806",value:"4"},"Cookie"),a("smoothly-item",{key:"0965a9480aa7dfad59a07bc19d49ccf6a5a7d52d",value:"5"},"Croissant"),a("smoothly-item",{key:"8298f1a72b728eeb490ba52d31f34e4a5d667da5",value:"6"},"Chocolate fondue"),a("smoothly-input-clear",{key:"6a5b85b80fd07f85f8d7ca7704e3a80174bd6e6e",size:"icon",slot:"end"})),a("smoothly-input-select",{key:"e5bc84b980a2bd6cca07a580f15817c3b7dc988b",multiple:true,name:"select-dessert-multiple",looks:"border"},a("label",{key:"f73a74a039e1b892a444591ba6c86ab184dbcbbb",slot:"label"},"Select multiple with reset button"),a("smoothly-item",{key:"a863ec926936998f9bbf571b0250ed0f6d0d0a9c",value:"ice cream"},"Ice cream"),a("smoothly-item",{key:"7dc67e9285547dda4daad5136837e80450ac13ea",value:"sponge cake"},"Sponge cake"),a("smoothly-item",{key:"55dd30ea0dabd3481795c13c350ee7052207aad6",selected:true,value:"cookie"},"Cookie"),a("smoothly-item",{key:"213ff1fbc6a5c445bbbce07140dbd18ee162cb89",value:"croissant"},"Croissant"),a("smoothly-item",{key:"abc065dab103fdaeb511f56c8db239b82cc48577",selected:true,value:"chocolate fondue"},"Chocolate fondue"),a("smoothly-input-reset",{key:"48922c5a07288a94407c4dc1f55305f567d45893",size:"icon",slot:"end"})),a("smoothly-input-select",{key:"3ebed3f650a369cfbd7850584efd9bcf79c6f846",name:"spirit-animals",looks:"border",mutable:true},a("label",{key:"73f73f2bce086f81b7fcb46f4808bd5732783aef",slot:"label"},"Select or add new options"),a("smoothly-item",{key:"beb4a3b4c715c8b1f2bb5b765fb742da64363cb7",value:"manatee"},"Manatee"),a("smoothly-item",{key:"f5c8c7fccb97ac840b42220f8380035a7ac7088f",selected:true,value:"cthulu"},"Cthulu")),a("smoothly-input-select",{key:"5163d4d246184319955f0c1cc756f9cee765847b",name:"select-icon",clearable:false,showSelected:false},a("smoothly-item",{key:"2c7ab7ef09f08930f072f5e2e51677951c84ea50",value:"folder",selected:true},a("smoothly-icon",{key:"86f4ed31d2e4ff382aece3cedf8f0d0265454b8a",size:"small",name:"folder-outline"})),a("smoothly-item",{key:"afc8fbf7dba66206051d2ae4d7df8b16a0c3b2cf",value:"camera"},a("smoothly-icon",{key:"a9a115b3a8038393e75e72ef38742f3bb1b60339",size:"small",name:"camera-outline"}))),a("smoothly-input-select",{key:"d7aac15a3ff5c7271fd22cab0621aa6d4f69cb99",ordered:true,menuHeight:"7.5items",placeholder:"Select...",name:"select-month"},a("label",{key:"db0eba7390d2b64d810f07898b7b646f0d6a360d",slot:"label"},"Alphabet ordered select"),Array.from({length:26}).map(((e,t)=>String.fromCharCode(t+65))).map((e=>a("smoothly-item",{value:e,selected:e=="H"},e)))),a("smoothly-input-select",{key:"c61728d55e5e96dc81d5df36c4fa38ed802f8b00",multiple:true,menuHeight:"7.5items",placeholder:"Select...",name:"select-month"},a("label",{key:"5768a186da1bf2fa4fbc80fb91478af031981694",slot:"label"},"Month multiple select"),a("smoothly-item",{key:"950676b7ffb90bc765f2a0c24cb40c631f64add8",value:"1"},"January"),a("smoothly-item",{key:"57e77e1ca64869441e44e0c753a0c132e6c8a152",value:"2"},"February"),a("smoothly-item",{key:"2ee03ce05d5dfa6ec01fc3cde97051a10d2215d9",value:"3"},"March"),a("smoothly-item",{key:"9c9dfdf2dd5ebdfffdc92732b7dff4b770632775",value:"4"},"April"),a("smoothly-item",{key:"35a1ce3376a84c830c00fba8080c093ef6f4830a",value:"5"},"May"),a("smoothly-item",{key:"cbf4b76e9f8324b29626555ec612f5ee5da8d47b",value:"6"},"June"),a("smoothly-item",{key:"6f7bc0aaeb4ff6e5d0427ab5226924b625086419",value:"7"},"July"),a("smoothly-item",{key:"72d72d65b42e1250b527023364c2bb0c79178a37",value:"8"},"August"),a("smoothly-item",{key:"5d6f57f7ca75f90c30aef101bbbdbb9a26aafb69",value:"9"},"September"),a("smoothly-item",{key:"08d57569eab4d0948f87eaeb8d5e1b936ee17839",value:"10"},"October"),a("smoothly-item",{key:"99e91533b340a40db158f87ed28fb371ebd8eb08",value:"11"},"November"),a("smoothly-item",{key:"4fd40ffef20baed8a6f5ca58768c78693b3a45a4",value:"12"},"December")),a("div",{key:"e1c03afba7cd1421976e4a4c59beac860dedf723",class:"select-div-row"},a("smoothly-input-select",{key:"4067c5e666655fe1b474a73a58241373c826ab03",name:"select-icon",clearable:false,showSelected:false},a("smoothly-item",{key:"0589c79c7fa7cf31dbad4ab0e8be68523e684299",value:"folder",selected:true},a("smoothly-icon",{key:"56813db2ee593db9227920662d646f7493e0515a",size:"small",name:"folder-outline"})),a("smoothly-item",{key:"3937b7ebb395698a854b2eeb9aeed188fe8fd78d",value:"camera"},a("smoothly-icon",{key:"ce39494e071c12c23a475c31eb448512d2fa0f25",size:"small",name:"camera-outline"})),a("smoothly-item",{key:"9a65176e01981ccfd312fd4d3d4b255760891699",value:"boat"},a("smoothly-icon",{key:"e9e97ae824d225a6dc33fa997b5e46a8bc3c2812",size:"small",name:"boat-outline"}))),a("smoothly-input-select",{key:"1f21eb6eded9dffd449157755bad1b84f7a52981",name:"select-number",clearable:false},this.numbers.map((e=>a("smoothly-item",{value:"number",selected:e===3},e)))),a("smoothly-input",{key:"f4afcff411357a29b89fe0a52239ba7c677cb490",name:"name",value:"Sten Qvist"},"Name"))),a("h2",{key:"9883744d26d1eec36ed1082407e3656d4ea0d1f7"},"Duration"),a("smoothly-input",{key:"fa507aaa61557ca41837cf906a78fef5d16affc0",name:"duration",type:"duration",placeholder:"hh:mm",value:this.duration,onSmoothlyInput:e=>this.duration=e.detail.duration},"Duration"),a("smoothly-input",{key:"f5c027a3ed22026819a2e88ddc5300afe7b8c900",name:"duration",type:"duration",value:this.duration,placeholder:"-hh:mm",onSmoothlyInput:e=>{const t=e.detail.duration;this.duration=t}},"Duration"),a("h2",{key:"f178f51facdeb434a16ecc35c0820ee5035f7d6c"},"Integer with Min/Max"),a("smoothly-input",{key:"acc0577e2f0679be92ef3ba362210cd1953a73ff",name:"days",type:"integer",min:0,max:365},"Days per year (0-365)"),a("smoothly-input",{key:"9a24258cbec32021cf1ec3506f7b4cadf2f459e5",name:"hour",type:"integer",min:0,max:23},"Hours per day (0-23)"),a("smoothly-input",{key:"95a122168d96126ef14f48810daf29867fba07b4",name:"minute",type:"integer",min:0,max:59},"Minutes per hour (0-59)"),a("smoothly-input",{key:"9631a9f894bbefd71bb298683f3333c4357db73b",name:"minute",type:"integer",min:18,max:120},"Age (18-120)"),a("h2",{key:"c6f4545ede80c54a354bc0f01be6072b19ea2bb1"},"Invalid text with warning icon and tooltip"),a("smoothly-input",{key:"ae5cf8e08b0887db2752d0bf39a4c5a14cb1027c",copyable:true,name:"alphanumeric",invalid:!/^[a-zA-Z0-9]+$/.test(this.alphanumeric),errorMessage:"Only alphanumeric allowed",value:this.alphanumeric,onSmoothlyInput:e=>this.alphanumeric=e.detail.alphanumeric},"Alphanumeric"),a("h2",{key:"22724babf43bccb1d64e21646130dd8f58c9505c"},"Identifiers"),a("smoothly-input",{key:"c5a7f350b414fd154ab54c889aeab223cbe23d16",type:"identifier-code"},"Code"),a("smoothly-input",{key:"de0f4aaf40eca11ccb24293c3976ade34f91aaa5",type:"identifier-attribute"},"Attribute"),a("smoothly-input",{key:"fda65727abf9aa451b8b7f755f7bb92fa43afb93",type:"identifier-snake"},"Snake"),a("smoothly-input",{key:"11de906823b2e325f3f9548b019aa8234722656a",type:"identifier-pascal"},"Pascal"),a("smoothly-input",{key:"ba3477e4964b1336e6198db348640d7144fbd06c",type:"identifier-camel"},"Camel"),a("h2",{key:"059c263a0ec79a3986d4e57337a2949c755feb70"},"Input Alternatives"),a("smoothly-input",{key:"8fbe4f80ac2d1d4bd1093a2b60103e248e4169f8",type:"text",name:"name.last"},a("smoothly-icon",{key:"cd0f121fd2ff7bbc8cdc9cfa9cf730cef08e8f11",name:"checkmark-circle",slot:"start"}),"First Name"),a("smoothly-input",{key:"adf350f5ec052599e95fbf6dcc7c16fa64bcc277",type:"text",name:"name.first"},"Last Name",a("smoothly-icon",{key:"4d0ca4a746cce893302008a8b66f07df9a96604c",name:"checkmark-circle",slot:"end"})),a("smoothly-input",{key:"cfb36cd378ca610efbb3d6252e70391985f9b00f",type:"text",name:"name.first",placeholder:"Smith"},"Last Name",a("smoothly-icon",{key:"9fbb53db768468228c7716881cc996d20b77fba3",name:"checkmark-circle",slot:"end"})),a("smoothly-input",{key:"1383590d66cba4e38a1beb82cfafb551ea1661fd",placeholder:"test"}),a("smoothly-input-submit",{key:"13cc6546a1eb274496d10c27c3c80a2bca7dca66",slot:"submit",fill:"solid",onSubmit:e=>alert(e),color:"success"}),a("h4",{key:"53f6a46a5524668011994c2be07b47ab4d2fb1d0"},"Smoothly checkboxes"),a("div",{key:"cc5f357f8e9b673c95de607251ef97437f0f2afc",class:"checkbox-group"},a("smoothly-input-checkbox",{key:"b12ff9cf6d4c042dfc079dea8ed8f92d95a70c68",disabled:true,name:"first-checkbox"},a("smoothly-icon",{key:"7daedabd25cb229c4512c017efb990cca3a08cc8",name:"checkmark-circle",slot:"start",size:"tiny"}),"First"),a("smoothly-input-checkbox",{key:"0836da075b7030bee160bb8931c54092a5b93ef8",name:"second-checkbox",checked:true},a("smoothly-icon",{key:"4d94e2fe73e6580791da9d9a872cd8d4649df36f",name:"checkmark-circle",slot:"start",size:"tiny"}),"second",a("smoothly-input-clear",{key:"117ca8ae52817149a678b4a100a24c3a4829a9b3",size:"icon",slot:"end"})),a("smoothly-input-checkbox",{key:"6e99923c8c082c4727eea3c75b77b23d86eed801",name:"third-checkbox"},"3rd")),a("h4",{key:"3a807db156e197c5192388886889988b874018d8"},"Smoothly Radio Buttons"),a("smoothly-input-radio",{key:"85e1ce54231e39c9f248fe1c7829a2b9cc7775e3",clearable:true,name:"radioFirstInput"},a("smoothly-icon",{key:"72e48b10d12022b72d30591bc74af1c4cb516bf7",name:"checkmark-circle",slot:"start"}),a("label",{key:"5b67d1eaaf73b84abb3a3e26ddd3fe27c9993e23",slot:"label"},"Clearable"),a("smoothly-input-radio-item",{key:"06f796bdde5479565e1ee6258ad73f0b7c4327f5",value:"first"},"Label 1"),a("smoothly-input-radio-item",{key:"14ab365a1da0fe3b94f1454549e3040df215d9c8",selected:true,value:"second"},"Label 2"),a("smoothly-input-radio-item",{key:"ccaf48dc6917aeb500653f637c4b30883814e61a",value:"third"},"Label 3"),a("smoothly-input-clear",{key:"3cc0373ca5e87e2bb0916b2afed9e4cd70515866",size:"icon",slot:"end"})),a("smoothly-input-radio",{key:"cdd729d929f57261d1422a45d83f6332912ae399",name:"radioSecondInput"},a("label",{key:"95d8374b3914b2f88605e2e90cb607bb423fed2b",slot:"label"},"Not clearable"),a("smoothly-input-radio-item",{key:"b1cd33f88df8c1161b203675a4e02c8815954f96",value:"first"},"Label 1"),a("smoothly-input-radio-item",{key:"b797b785615fbfd4b881db249c99c39bf0fa6504",value:"second"},"Label 2"),a("smoothly-input-radio-item",{key:"8557067758ca9f7acc6b35db56e9c6aee2c49f43",value:"third"},"Label 3"),a("smoothly-input-radio-item",{key:"bdbbcf1228089b03cae001cdb573b8c7f37f08df",value:"fourth"},"Label 4"),a("smoothly-input-radio-item",{key:"414016c094bc15ceb37955e3adf1dc18db87e45c",value:"fifth"},"Label 5"),a("smoothly-input-radio-item",{key:"ba3a6a393f5f3af34eb12ec5391d0a6a1eb03e04",value:"sixth"},"Label 6")),a("smoothly-input-range-demo",{key:"97406c6ddb794364f4a1b53c5e1ed551ed8a1ad6"}),a("smoothly-input-color-demo",{key:"0676c5e29637f2097dd0fb084d6507ec9c5c218c"}),a("smoothly-input-price-demo",{key:"80c25cdc1a8d1c2d88df5c680527d5638da91d65"}),a("smoothly-back-to-top",{key:"6aad374c875c762e4e4aff5567aae10300fbd7be"})))}static get style(){return Z()}},[2,"smoothly-input-demo",{duration:[32],alphanumeric:[32]}]);function G(){if(typeof customElements==="undefined"){return}const e=["smoothly-input-demo","smoothly-back-to-top","smoothly-button","smoothly-button-confirm","smoothly-calendar","smoothly-date-text","smoothly-display","smoothly-display-json","smoothly-display-json-object","smoothly-display-json-primitive","smoothly-display-json-record-key","smoothly-form","smoothly-icon","smoothly-input","smoothly-input-checkbox","smoothly-input-clear","smoothly-input-color","smoothly-input-color-demo","smoothly-input-date","smoothly-input-date-demo","smoothly-input-date-range","smoothly-input-date-time","smoothly-input-demo-radio","smoothly-input-demo-standard","smoothly-input-demo-user-input","smoothly-input-file","smoothly-input-month","smoothly-input-price-demo","smoothly-input-radio","smoothly-input-radio-item","smoothly-input-range","smoothly-input-range-demo","smoothly-input-reset","smoothly-input-select","smoothly-input-submit","smoothly-item","smoothly-spinner","smoothly-tab","smoothly-tabs","smoothly-toggle-switch"];e.forEach((e=>{switch(e){case"smoothly-input-demo":if(!customElements.get(c(e))){customElements.define(c(e),q)}break;case"smoothly-back-to-top":if(!customElements.get(c(e))){d()}break;case"smoothly-button":if(!customElements.get(c(e))){l()}break;case"smoothly-button-confirm":if(!customElements.get(c(e))){i()}break;case"smoothly-calendar":if(!customElements.get(c(e))){b()}break;case"smoothly-date-text":if(!customElements.get(c(e))){f()}break;case"smoothly-display":if(!customElements.get(c(e))){n()}break;case"smoothly-display-json":if(!customElements.get(c(e))){r()}break;case"smoothly-display-json-object":if(!customElements.get(c(e))){y()}break;case"smoothly-display-json-primitive":if(!customElements.get(c(e))){u()}break;case"smoothly-display-json-record-key":if(!customElements.get(c(e))){h()}break;case"smoothly-form":if(!customElements.get(c(e))){p()}break;case"smoothly-icon":if(!customElements.get(c(e))){k()}break;case"smoothly-input":if(!customElements.get(c(e))){v()}break;case"smoothly-input-checkbox":if(!customElements.get(c(e))){g()}break;case"smoothly-input-clear":if(!customElements.get(c(e))){j()}break;case"smoothly-input-color":if(!customElements.get(c(e))){E()}break;case"smoothly-input-color-demo":if(!customElements.get(c(e))){x()}break;case"smoothly-input-date":if(!customElements.get(c(e))){D()}break;case"smoothly-input-date-demo":if(!customElements.get(c(e))){S()}break;case"smoothly-input-date-range":if(!customElements.get(c(e))){w()}break;case"smoothly-input-date-time":if(!customElements.get(c(e))){C()}break;case"smoothly-input-demo-radio":if(!customElements.get(c(e))){z()}break;case"smoothly-input-demo-standard":if(!customElements.get(c(e))){I()}break;case"smoothly-input-demo-user-input":if(!customElements.get(c(e))){L()}break;case"smoothly-input-file":if(!customElements.get(c(e))){B()}break;case"smoothly-input-month":if(!customElements.get(c(e))){A()}break;case"smoothly-input-price-demo":if(!customElements.get(c(e))){R()}break;case"smoothly-input-radio":if(!customElements.get(c(e))){N()}break;case"smoothly-input-radio-item":if(!customElements.get(c(e))){M()}break;case"smoothly-input-range":if(!customElements.get(c(e))){T()}break;case"smoothly-input-range-demo":if(!customElements.get(c(e))){F()}break;case"smoothly-input-reset":if(!customElements.get(c(e))){H()}break;case"smoothly-input-select":if(!customElements.get(c(e))){J()}break;case"smoothly-input-submit":if(!customElements.get(c(e))){X()}break;case"smoothly-item":if(!customElements.get(c(e))){K()}break;case"smoothly-spinner":if(!customElements.get(c(e))){O()}break;case"smoothly-tab":if(!customElements.get(c(e))){U()}break;case"smoothly-tabs":if(!customElements.get(c(e))){V()}break;case"smoothly-toggle-switch":if(!customElements.get(c(e))){Y()}break}}))}G();export{q as S,G as d};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as t,c as o,h as a,d as s,t as c}from"./p-BsZrGTcp.js";import{i as m}from"./p-BVKhAhsB.js";import{d}from"./p-BoHJT9bR.js";import{d as l}from"./p-BHEtq3Ue.js";import{d as i}from"./p-DX3KKRD9.js";import{d as b}from"./p-BqAN7jax.js";import{d as f}from"./p-B8ljN4o0.js";import{d as n}from"./p-DM5CKilY.js";import{d as r}from"./p-CR3Ni_o7.js";import{d as y}from"./p-B-l1S16Z.js";import{d as u}from"./p-Ud7Qhkgt.js";import{d as h}from"./p-C3FORjes.js";import{d as p}from"./p-DgaHxdNI.js";import{d as k}from"./p-BiQsRsV4.js";import{d as v}from"./p-R4uIvvER.js";import{d as j}from"./p-C_f8s6n5.js";import{d as g}from"./p-BaBGzDg_.js";import{d as E}from"./p-nrkV1PqR.js";import{d as x}from"./p-D58kSmOp.js";import{d as D}from"./p-C9zTTp-4.js";import{d as S}from"./p-CZ6kkjYF.js";import{d as w}from"./p-DKggy9E3.js";import{d as C}from"./p-CGG77xzV.js";import{d as z}from"./p-DdTTiJbE.js";import{d as I}from"./p-DbIjGsJb.js";import{d as L}from"./p-CUiFFtAw.js";import{d as B}from"./p-CioJtwj-.js";import{d as A}from"./p-DTqtObrT.js";import{d as R}from"./p-nHKstm2X.js";import{d as T}from"./p-BDhPxj59.js";import{d as N}from"./p-DXHBXAV0.js";import{d as M}from"./p-D2FsRCII.js";import{d as F}from"./p-C3__jhwf.js";import{d as H}from"./p-CKrPTQ_S.js";import{d as J}from"./p-RNCr3p17.js";import{d as K}from"./p-D7cDUGTe.js";import{d as U}from"./p-BS2SWUX6.js";import{d as G}from"./p-CsLlJDsh.js";import{d as O}from"./p-DSsOLbj6.js";import{d as _}from"./p-2Y5tLcQ1.js";import{d as Q}from"./p-DMzn0Iz0.js";const V=()=>`.sc-smoothly-input-demo-h{display:flex;flex-direction:column;margin-top:2em;margin-bottom:10rem}.sc-smoothly-input-demo-h .select-div-row.sc-smoothly-input-demo{display:flex}.sc-smoothly-input-demo-h .select-div-row.sc-smoothly-input-demo smoothly-input.sc-smoothly-input-demo{flex:1}smoothly-input-demo-standard.sc-smoothly-input-demo{margin-bottom:2rem}div.inputs.sc-smoothly-input-demo{max-width:min(calc(100% - 2rem), 56rem);margin:auto}div.inputs.sc-smoothly-input-demo>h2.sc-smoothly-input-demo:not(:first-child){padding-top:3em;margin-top:3em;border-top:1px solid black}.checkbox-group.sc-smoothly-input-demo{display:flex;gap:1.5em;align-items:center;background-color:rgb(var(--smoothly-input-background))}.select-div.sc-smoothly-input-demo{display:flex;gap:1em;flex-wrap:wrap}.select-div.sc-smoothly-input-demo>*.sc-smoothly-input-demo{flex-grow:1;min-width:min(100%, var(--smoothly-form-input-min-width, 18rem));flex-basis:40%}`;const X=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.smoothlyUrlUpdate=o(this,"smoothlyUrlUpdate");this.duration={hours:8};this.alphanumeric="!@##";this.numbers=[1,2,3,4,5,6,7,8,9]}render(){return a(s,{key:"77487e04cd393519b5080f752b3cba328ae8bbd3"},a("smoothly-input-demo-standard",{key:"f9de577b637efcaffe3a92dc55bff25520e0384f"}),a("smoothly-input-date-demo",{key:"cdb1c974c8cb5844cf800f8fc52c407479db307e"}),a("smoothly-input-demo-user-input",{key:"38bb2d03ef20e3e8e5737e423f4f54c9fad4f973"}),a("smoothly-input-demo-radio",{key:"999e3b97199fbcb547e83c589c1447e726f4754a"}),a("div",{key:"ee8094197dd274791200a010baedd05db71b888a",class:"inputs"},a("h2",{key:"5b65b420015ad7bb32ef059f6aee019400cdc6b3"},"Calendar"),a("smoothly-input-date",{key:"375cad6d89a6f80cbe8e67cbeb1759e0cb28ab11",name:"some-date"},"Calendar"),a("smoothly-input-date-time",{key:"797e6d6ccbbba14258926f21f202eacad2b85d76",name:"someDateTime",value:m.DateTime.now()},"DateTime"),a("h2",{key:"a49689e5821a93c721be25c6faa570f05402582b"},"Date Range"),a("smoothly-input-date-range",{key:"ab71a879e70b97431da2f0beacf54dc093ca0a7a",name:"testing",start:m.Date.now(),end:m.Date.nextMonth(m.Date.now()),min:"2021-10-01",max:"2025-01-31"}),a("smoothly-input-date-range",{key:"703952d0ba703d6a8cc26b4bef028d7a48c8c4f6",name:"testing",start:m.Date.now(),end:m.Date.nextMonth(m.Date.now()),min:"2021-10-10",max:"2024-12-30"},a("smoothly-input-reset",{key:"5bd07b3504d054442cefb2ba9db61c4d83ed39c9",slot:"end",size:"icon"})),a("smoothly-input-date-range",{key:"39c7ae936d2a952626f20dcc19ae0a52885db2f5",looks:"grid",start:m.Date.now(),end:m.Date.nextMonth(m.Date.now()),min:"2021-10-10",max:"2025-12-30",showLabel:false,style:{"--smoothly-input-border-radius":"0.5rem"}},a("smoothly-input-clear",{key:"ef4179eba332c4aefcccec094f4cd75e0a724b3d",slot:"end",size:"icon"})),a("h2",{key:"8b97455a27099963ab131055f4d43f0e050f4cc7"},"Date"),a("smoothly-input-date",{key:"c167353ed6a2b37488e709929e8dd7691ff3b0b7"},"Date"),a("smoothly-input-date",{key:"f0cfeb105e03c511c2b2c4daa5cd618fb1bcbfb4",showLabel:false,value:"2021-10-28",max:"2021-12-30",min:"2021-10-10"},"Date"),a("smoothly-input-date",{key:"771efe6acb85206eb87024409a78ed52d3907af0",value:"2021-10-28"},"Date",a("smoothly-input-reset",{key:"8e009b6d59da638ada992b07ddb2c2d1c071be55",slot:"end",size:"icon"})),a("smoothly-input-date",{key:"936b5cdea71f19463922d25d2ed9468df89586ce",value:"2021-10-28"},"Date",a("smoothly-input-clear",{key:"ad177348cf1f5353d3a2b7c7317fbd71c3614f61",slot:"end",size:"icon"})),a("h2",{key:"475ca58552f978b55eba5222267d18a0d78938c5"},"Select"),a("div",{key:"7eae0b4cee9e74e38e9e726934101066f870aeec",class:"select-div"},a("smoothly-input-select",{key:"16d9addd365f75e1ff255d9cd94bb90b20901fd3",name:"select-dessert",looks:"border"},a("label",{key:"7e7550a94183d31ae99bc7dd85eda059c755e3d0",slot:"label"},"Select with clear button"),a("smoothly-item",{key:"62b741c6154152014d1206fd2481984aa3097d8f",value:"1"},"Ice cream"),a("smoothly-item",{key:"b45f30884b44e05528555295bd11b4e01fc5d3a4",value:"2"},"Sponge cake"),a("smoothly-item",{key:"7b2c3712a21be6943acf8eb1557ddd9fa101320c",value:"3",disabled:true},"Disabled Item"),a("smoothly-item",{key:"47bbd5ccbaaa9977688f2db60e3b01ee44c37806",value:"4"},"Cookie"),a("smoothly-item",{key:"0965a9480aa7dfad59a07bc19d49ccf6a5a7d52d",value:"5"},"Croissant"),a("smoothly-item",{key:"8298f1a72b728eeb490ba52d31f34e4a5d667da5",value:"6"},"Chocolate fondue"),a("smoothly-input-clear",{key:"6a5b85b80fd07f85f8d7ca7704e3a80174bd6e6e",size:"icon",slot:"end"})),a("smoothly-input-select",{key:"e5bc84b980a2bd6cca07a580f15817c3b7dc988b",multiple:true,name:"select-dessert-multiple",looks:"border"},a("label",{key:"f73a74a039e1b892a444591ba6c86ab184dbcbbb",slot:"label"},"Select multiple with reset button"),a("smoothly-item",{key:"a863ec926936998f9bbf571b0250ed0f6d0d0a9c",value:"ice cream"},"Ice cream"),a("smoothly-item",{key:"7dc67e9285547dda4daad5136837e80450ac13ea",value:"sponge cake"},"Sponge cake"),a("smoothly-item",{key:"55dd30ea0dabd3481795c13c350ee7052207aad6",selected:true,value:"cookie"},"Cookie"),a("smoothly-item",{key:"213ff1fbc6a5c445bbbce07140dbd18ee162cb89",value:"croissant"},"Croissant"),a("smoothly-item",{key:"abc065dab103fdaeb511f56c8db239b82cc48577",selected:true,value:"chocolate fondue"},"Chocolate fondue"),a("smoothly-input-reset",{key:"48922c5a07288a94407c4dc1f55305f567d45893",size:"icon",slot:"end"})),a("smoothly-input-select",{key:"3ebed3f650a369cfbd7850584efd9bcf79c6f846",name:"spirit-animals",looks:"border",mutable:true},a("label",{key:"73f73f2bce086f81b7fcb46f4808bd5732783aef",slot:"label"},"Select or add new options"),a("smoothly-item",{key:"beb4a3b4c715c8b1f2bb5b765fb742da64363cb7",value:"manatee"},"Manatee"),a("smoothly-item",{key:"f5c8c7fccb97ac840b42220f8380035a7ac7088f",selected:true,value:"cthulu"},"Cthulu")),a("smoothly-input-select",{key:"5163d4d246184319955f0c1cc756f9cee765847b",name:"select-icon",clearable:false,showSelected:false},a("smoothly-item",{key:"2c7ab7ef09f08930f072f5e2e51677951c84ea50",value:"folder",selected:true},a("smoothly-icon",{key:"86f4ed31d2e4ff382aece3cedf8f0d0265454b8a",size:"small",name:"folder-outline"})),a("smoothly-item",{key:"afc8fbf7dba66206051d2ae4d7df8b16a0c3b2cf",value:"camera"},a("smoothly-icon",{key:"a9a115b3a8038393e75e72ef38742f3bb1b60339",size:"small",name:"camera-outline"}))),a("smoothly-input-select",{key:"d7aac15a3ff5c7271fd22cab0621aa6d4f69cb99",ordered:true,menuHeight:"7.5items",placeholder:"Select...",name:"select-month"},a("label",{key:"db0eba7390d2b64d810f07898b7b646f0d6a360d",slot:"label"},"Alphabet ordered select"),Array.from({length:26}).map(((e,t)=>String.fromCharCode(t+65))).map((e=>a("smoothly-item",{value:e,selected:e=="H"},e)))),a("smoothly-input-select",{key:"c61728d55e5e96dc81d5df36c4fa38ed802f8b00",multiple:true,menuHeight:"7.5items",placeholder:"Select...",name:"select-month"},a("label",{key:"5768a186da1bf2fa4fbc80fb91478af031981694",slot:"label"},"Month multiple select"),a("smoothly-item",{key:"950676b7ffb90bc765f2a0c24cb40c631f64add8",value:"1"},"January"),a("smoothly-item",{key:"57e77e1ca64869441e44e0c753a0c132e6c8a152",value:"2"},"February"),a("smoothly-item",{key:"2ee03ce05d5dfa6ec01fc3cde97051a10d2215d9",value:"3"},"March"),a("smoothly-item",{key:"9c9dfdf2dd5ebdfffdc92732b7dff4b770632775",value:"4"},"April"),a("smoothly-item",{key:"35a1ce3376a84c830c00fba8080c093ef6f4830a",value:"5"},"May"),a("smoothly-item",{key:"cbf4b76e9f8324b29626555ec612f5ee5da8d47b",value:"6"},"June"),a("smoothly-item",{key:"6f7bc0aaeb4ff6e5d0427ab5226924b625086419",value:"7"},"July"),a("smoothly-item",{key:"72d72d65b42e1250b527023364c2bb0c79178a37",value:"8"},"August"),a("smoothly-item",{key:"5d6f57f7ca75f90c30aef101bbbdbb9a26aafb69",value:"9"},"September"),a("smoothly-item",{key:"08d57569eab4d0948f87eaeb8d5e1b936ee17839",value:"10"},"October"),a("smoothly-item",{key:"99e91533b340a40db158f87ed28fb371ebd8eb08",value:"11"},"November"),a("smoothly-item",{key:"4fd40ffef20baed8a6f5ca58768c78693b3a45a4",value:"12"},"December")),a("div",{key:"e1c03afba7cd1421976e4a4c59beac860dedf723",class:"select-div-row"},a("smoothly-input-select",{key:"4067c5e666655fe1b474a73a58241373c826ab03",name:"select-icon",clearable:false,showSelected:false},a("smoothly-item",{key:"0589c79c7fa7cf31dbad4ab0e8be68523e684299",value:"folder",selected:true},a("smoothly-icon",{key:"56813db2ee593db9227920662d646f7493e0515a",size:"small",name:"folder-outline"})),a("smoothly-item",{key:"3937b7ebb395698a854b2eeb9aeed188fe8fd78d",value:"camera"},a("smoothly-icon",{key:"ce39494e071c12c23a475c31eb448512d2fa0f25",size:"small",name:"camera-outline"})),a("smoothly-item",{key:"9a65176e01981ccfd312fd4d3d4b255760891699",value:"boat"},a("smoothly-icon",{key:"e9e97ae824d225a6dc33fa997b5e46a8bc3c2812",size:"small",name:"boat-outline"}))),a("smoothly-input-select",{key:"1f21eb6eded9dffd449157755bad1b84f7a52981",name:"select-number",clearable:false},this.numbers.map((e=>a("smoothly-item",{value:"number",selected:e===3},e)))),a("smoothly-input",{key:"f4afcff411357a29b89fe0a52239ba7c677cb490",name:"name",value:"Sten Qvist"},"Name"))),a("h2",{key:"9883744d26d1eec36ed1082407e3656d4ea0d1f7"},"Duration"),a("smoothly-input",{key:"fa507aaa61557ca41837cf906a78fef5d16affc0",name:"duration",type:"duration",placeholder:"hh:mm",value:this.duration,onSmoothlyInput:e=>this.duration=e.detail.duration},"Duration"),a("smoothly-input",{key:"f5c027a3ed22026819a2e88ddc5300afe7b8c900",name:"duration",type:"duration",value:this.duration,placeholder:"-hh:mm",onSmoothlyInput:e=>{const t=e.detail.duration;this.duration=t}},"Duration"),a("h2",{key:"f178f51facdeb434a16ecc35c0820ee5035f7d6c"},"Integer with Min/Max"),a("smoothly-input",{key:"acc0577e2f0679be92ef3ba362210cd1953a73ff",name:"days",type:"integer",min:0,max:365},"Days per year (0-365)"),a("smoothly-input",{key:"9a24258cbec32021cf1ec3506f7b4cadf2f459e5",name:"hour",type:"integer",min:0,max:23},"Hours per day (0-23)"),a("smoothly-input",{key:"95a122168d96126ef14f48810daf29867fba07b4",name:"minute",type:"integer",min:0,max:59},"Minutes per hour (0-59)"),a("smoothly-input",{key:"9631a9f894bbefd71bb298683f3333c4357db73b",name:"minute",type:"integer",min:18,max:120},"Age (18-120)"),a("h2",{key:"c6f4545ede80c54a354bc0f01be6072b19ea2bb1"},"Invalid text with warning icon and tooltip"),a("smoothly-input",{key:"ae5cf8e08b0887db2752d0bf39a4c5a14cb1027c",copyable:true,name:"alphanumeric",invalid:!/^[a-zA-Z0-9]+$/.test(this.alphanumeric),errorMessage:"Only alphanumeric allowed",value:this.alphanumeric,onSmoothlyInput:e=>this.alphanumeric=e.detail.alphanumeric},"Alphanumeric"),a("h2",{key:"22724babf43bccb1d64e21646130dd8f58c9505c"},"Identifiers"),a("smoothly-input",{key:"c5a7f350b414fd154ab54c889aeab223cbe23d16",type:"identifier-code"},"Code"),a("smoothly-input",{key:"de0f4aaf40eca11ccb24293c3976ade34f91aaa5",type:"identifier-attribute"},"Attribute"),a("smoothly-input",{key:"fda65727abf9aa451b8b7f755f7bb92fa43afb93",type:"identifier-snake"},"Snake"),a("smoothly-input",{key:"11de906823b2e325f3f9548b019aa8234722656a",type:"identifier-pascal"},"Pascal"),a("smoothly-input",{key:"ba3477e4964b1336e6198db348640d7144fbd06c",type:"identifier-camel"},"Camel"),a("h2",{key:"059c263a0ec79a3986d4e57337a2949c755feb70"},"Input Alternatives"),a("smoothly-input",{key:"8fbe4f80ac2d1d4bd1093a2b60103e248e4169f8",type:"text",name:"name.last"},a("smoothly-icon",{key:"cd0f121fd2ff7bbc8cdc9cfa9cf730cef08e8f11",name:"checkmark-circle",slot:"start"}),"First Name"),a("smoothly-input",{key:"adf350f5ec052599e95fbf6dcc7c16fa64bcc277",type:"text",name:"name.first"},"Last Name",a("smoothly-icon",{key:"4d0ca4a746cce893302008a8b66f07df9a96604c",name:"checkmark-circle",slot:"end"})),a("smoothly-input",{key:"cfb36cd378ca610efbb3d6252e70391985f9b00f",type:"text",name:"name.first",placeholder:"Smith"},"Last Name",a("smoothly-icon",{key:"9fbb53db768468228c7716881cc996d20b77fba3",name:"checkmark-circle",slot:"end"})),a("smoothly-input",{key:"1383590d66cba4e38a1beb82cfafb551ea1661fd",placeholder:"test"}),a("smoothly-input-submit",{key:"13cc6546a1eb274496d10c27c3c80a2bca7dca66",slot:"submit",fill:"solid",onSubmit:e=>alert(e),color:"success"}),a("h4",{key:"53f6a46a5524668011994c2be07b47ab4d2fb1d0"},"Smoothly checkboxes"),a("div",{key:"cc5f357f8e9b673c95de607251ef97437f0f2afc",class:"checkbox-group"},a("smoothly-input-checkbox",{key:"b12ff9cf6d4c042dfc079dea8ed8f92d95a70c68",disabled:true,name:"first-checkbox"},a("smoothly-icon",{key:"7daedabd25cb229c4512c017efb990cca3a08cc8",name:"checkmark-circle",slot:"start",size:"tiny"}),"First"),a("smoothly-input-checkbox",{key:"0836da075b7030bee160bb8931c54092a5b93ef8",name:"second-checkbox",checked:true},a("smoothly-icon",{key:"4d94e2fe73e6580791da9d9a872cd8d4649df36f",name:"checkmark-circle",slot:"start",size:"tiny"}),"second",a("smoothly-input-clear",{key:"117ca8ae52817149a678b4a100a24c3a4829a9b3",size:"icon",slot:"end"})),a("smoothly-input-checkbox",{key:"6e99923c8c082c4727eea3c75b77b23d86eed801",name:"third-checkbox"},"3rd")),a("h4",{key:"3a807db156e197c5192388886889988b874018d8"},"Smoothly Radio Buttons"),a("smoothly-input-radio",{key:"85e1ce54231e39c9f248fe1c7829a2b9cc7775e3",clearable:true,name:"radioFirstInput"},a("smoothly-icon",{key:"72e48b10d12022b72d30591bc74af1c4cb516bf7",name:"checkmark-circle",slot:"start"}),a("label",{key:"5b67d1eaaf73b84abb3a3e26ddd3fe27c9993e23",slot:"label"},"Clearable"),a("smoothly-input-radio-item",{key:"06f796bdde5479565e1ee6258ad73f0b7c4327f5",value:"first"},"Label 1"),a("smoothly-input-radio-item",{key:"14ab365a1da0fe3b94f1454549e3040df215d9c8",selected:true,value:"second"},"Label 2"),a("smoothly-input-radio-item",{key:"ccaf48dc6917aeb500653f637c4b30883814e61a",value:"third"},"Label 3"),a("smoothly-input-clear",{key:"3cc0373ca5e87e2bb0916b2afed9e4cd70515866",size:"icon",slot:"end"})),a("smoothly-input-radio",{key:"cdd729d929f57261d1422a45d83f6332912ae399",name:"radioSecondInput"},a("label",{key:"95d8374b3914b2f88605e2e90cb607bb423fed2b",slot:"label"},"Not clearable"),a("smoothly-input-radio-item",{key:"b1cd33f88df8c1161b203675a4e02c8815954f96",value:"first"},"Label 1"),a("smoothly-input-radio-item",{key:"b797b785615fbfd4b881db249c99c39bf0fa6504",value:"second"},"Label 2"),a("smoothly-input-radio-item",{key:"8557067758ca9f7acc6b35db56e9c6aee2c49f43",value:"third"},"Label 3"),a("smoothly-input-radio-item",{key:"bdbbcf1228089b03cae001cdb573b8c7f37f08df",value:"fourth"},"Label 4"),a("smoothly-input-radio-item",{key:"414016c094bc15ceb37955e3adf1dc18db87e45c",value:"fifth"},"Label 5"),a("smoothly-input-radio-item",{key:"ba3a6a393f5f3af34eb12ec5391d0a6a1eb03e04",value:"sixth"},"Label 6")),a("smoothly-input-range-demo",{key:"97406c6ddb794364f4a1b53c5e1ed551ed8a1ad6"}),a("smoothly-input-color-demo",{key:"0676c5e29637f2097dd0fb084d6507ec9c5c218c"}),a("smoothly-input-price-demo",{key:"80c25cdc1a8d1c2d88df5c680527d5638da91d65"}),a("smoothly-back-to-top",{key:"6aad374c875c762e4e4aff5567aae10300fbd7be"})))}static get style(){return V()}},[2,"smoothly-input-demo",{duration:[32],alphanumeric:[32]}]);function q(){if(typeof customElements==="undefined"){return}const e=["smoothly-input-demo","smoothly-back-to-top","smoothly-button","smoothly-button-confirm","smoothly-calendar","smoothly-date-text","smoothly-display","smoothly-display-json","smoothly-display-json-object","smoothly-display-json-primitive","smoothly-display-json-record-key","smoothly-form","smoothly-icon","smoothly-input","smoothly-input-checkbox","smoothly-input-clear","smoothly-input-color","smoothly-input-color-demo","smoothly-input-date","smoothly-input-date-demo","smoothly-input-date-range","smoothly-input-date-time","smoothly-input-demo-radio","smoothly-input-demo-standard","smoothly-input-demo-user-input","smoothly-input-file","smoothly-input-month","smoothly-input-price-demo","smoothly-input-radio","smoothly-input-radio-item","smoothly-input-range","smoothly-input-range-demo","smoothly-input-reset","smoothly-input-select","smoothly-input-submit","smoothly-item","smoothly-spinner","smoothly-tab","smoothly-tabs","smoothly-toggle-switch"];e.forEach((e=>{switch(e){case"smoothly-input-demo":if(!customElements.get(c(e))){customElements.define(c(e),X)}break;case"smoothly-back-to-top":if(!customElements.get(c(e))){d()}break;case"smoothly-button":if(!customElements.get(c(e))){l()}break;case"smoothly-button-confirm":if(!customElements.get(c(e))){i()}break;case"smoothly-calendar":if(!customElements.get(c(e))){b()}break;case"smoothly-date-text":if(!customElements.get(c(e))){f()}break;case"smoothly-display":if(!customElements.get(c(e))){n()}break;case"smoothly-display-json":if(!customElements.get(c(e))){r()}break;case"smoothly-display-json-object":if(!customElements.get(c(e))){y()}break;case"smoothly-display-json-primitive":if(!customElements.get(c(e))){u()}break;case"smoothly-display-json-record-key":if(!customElements.get(c(e))){h()}break;case"smoothly-form":if(!customElements.get(c(e))){p()}break;case"smoothly-icon":if(!customElements.get(c(e))){k()}break;case"smoothly-input":if(!customElements.get(c(e))){v()}break;case"smoothly-input-checkbox":if(!customElements.get(c(e))){j()}break;case"smoothly-input-clear":if(!customElements.get(c(e))){g()}break;case"smoothly-input-color":if(!customElements.get(c(e))){E()}break;case"smoothly-input-color-demo":if(!customElements.get(c(e))){x()}break;case"smoothly-input-date":if(!customElements.get(c(e))){D()}break;case"smoothly-input-date-demo":if(!customElements.get(c(e))){S()}break;case"smoothly-input-date-range":if(!customElements.get(c(e))){w()}break;case"smoothly-input-date-time":if(!customElements.get(c(e))){C()}break;case"smoothly-input-demo-radio":if(!customElements.get(c(e))){z()}break;case"smoothly-input-demo-standard":if(!customElements.get(c(e))){I()}break;case"smoothly-input-demo-user-input":if(!customElements.get(c(e))){L()}break;case"smoothly-input-file":if(!customElements.get(c(e))){B()}break;case"smoothly-input-month":if(!customElements.get(c(e))){A()}break;case"smoothly-input-price-demo":if(!customElements.get(c(e))){R()}break;case"smoothly-input-radio":if(!customElements.get(c(e))){T()}break;case"smoothly-input-radio-item":if(!customElements.get(c(e))){N()}break;case"smoothly-input-range":if(!customElements.get(c(e))){M()}break;case"smoothly-input-range-demo":if(!customElements.get(c(e))){F()}break;case"smoothly-input-reset":if(!customElements.get(c(e))){H()}break;case"smoothly-input-select":if(!customElements.get(c(e))){J()}break;case"smoothly-input-submit":if(!customElements.get(c(e))){K()}break;case"smoothly-item":if(!customElements.get(c(e))){U()}break;case"smoothly-spinner":if(!customElements.get(c(e))){G()}break;case"smoothly-tab":if(!customElements.get(c(e))){O()}break;case"smoothly-tabs":if(!customElements.get(c(e))){_()}break;case"smoothly-toggle-switch":if(!customElements.get(c(e))){Q()}break}}))}q();export{X as S,q as d};
|
|
2
|
+
//# sourceMappingURL=p-BGKOGyFA.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as o,H as t,c as s,h as e,d as m,t as a}from"./p-BsZrGTcp.js";import{i as r}from"./p-BVKhAhsB.js";import{o as i}from"./p-Dr7iZPxA.js";import{f as n}from"./p-CkXes5c-.js";import{N as c}from"./p-C6lWCoIT.js";import"./p-DoFURPl2.js";import{d as l}from"./p-BHEtq3Ue.js";import{d as f}from"./p-DX3KKRD9.js";import{d as p}from"./p-BqAN7jax.js";import{d as h}from"./p-B8ljN4o0.js";import{d as y}from"./p-DgaHxdNI.js";import{d}from"./p-BiQsRsV4.js";import{d as u}from"./p-DKggy9E3.js";import{d as b}from"./p-DTqtObrT.js";import{d as k}from"./p-RNCr3p17.js";import{d as j}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as o,H as t,c as s,h as e,d as m,t as a}from"./p-BsZrGTcp.js";import{i as r}from"./p-BVKhAhsB.js";import{o as i}from"./p-Dr7iZPxA.js";import{f as n}from"./p-CkXes5c-.js";import{N as c}from"./p-C6lWCoIT.js";import"./p-DoFURPl2.js";import{d as l}from"./p-BHEtq3Ue.js";import{d as f}from"./p-DX3KKRD9.js";import{d as p}from"./p-BqAN7jax.js";import{d as h}from"./p-B8ljN4o0.js";import{d as y}from"./p-DgaHxdNI.js";import{d}from"./p-BiQsRsV4.js";import{d as u}from"./p-DKggy9E3.js";import{d as b}from"./p-DTqtObrT.js";import{d as k}from"./p-RNCr3p17.js";import{d as j}from"./p-D7cDUGTe.js";import{d as E}from"./p-BS2SWUX6.js";import{d as g}from"./p-CsLlJDsh.js";const D=()=>`.sc-smoothly-form-demo-date-range-h{display:block}`;const B=o(class o extends t{constructor(o){super();if(o!==false){this.__registerHost()}this.notice=s(this,"notice");this.validator=i({range:n("isoly.DateRange",r.DateRange.is)})}async submitHandler(o){o.stopPropagation();if(!this.validator.is(o.detail.value)){console.error(`Type is incomplete.`);this.notice.emit(c.failed(`Type is incomplete.`))}else{this.notice.emit(c.succeeded(`Type is complete!`));o.detail.result(true)}o.detail.result(false)}render(){return e(m,{key:"5cbcb41cef877f0e9fb78ce81697fc2439abb4f0"},e("h2",{key:"6a4ff28901af3515b1b7e6bf6b7feaf6a2d382a0"},"Date-range input"),e("smoothly-form",{key:"9579ce7a593f945b634c669880b9eb39a41f059f",looks:"border",type:"create",validator:this.validator,onSmoothlyFormSubmit:o=>this.submitHandler(o)},e("smoothly-input-date-range",{key:"43a8f7e8882a37479f5a52d902798815828d86c4",name:"range"},"Range"),e("smoothly-input-submit",{key:"72c48ab7aa2df6e594a2256969e31ad98543decc",slot:"submit"},e("smoothly-icon",{key:"71ae5057364c903f6fae97c46d3acef660471cc4",name:"checkmark-outline"}))))}static get style(){return D()}},[2,"smoothly-form-demo-date-range"]);function T(){if(typeof customElements==="undefined"){return}const o=["smoothly-form-demo-date-range","smoothly-button","smoothly-button-confirm","smoothly-calendar","smoothly-date-text","smoothly-form","smoothly-icon","smoothly-input-date-range","smoothly-input-month","smoothly-input-select","smoothly-input-submit","smoothly-item","smoothly-spinner"];o.forEach((o=>{switch(o){case"smoothly-form-demo-date-range":if(!customElements.get(a(o))){customElements.define(a(o),B)}break;case"smoothly-button":if(!customElements.get(a(o))){l()}break;case"smoothly-button-confirm":if(!customElements.get(a(o))){f()}break;case"smoothly-calendar":if(!customElements.get(a(o))){p()}break;case"smoothly-date-text":if(!customElements.get(a(o))){h()}break;case"smoothly-form":if(!customElements.get(a(o))){y()}break;case"smoothly-icon":if(!customElements.get(a(o))){d()}break;case"smoothly-input-date-range":if(!customElements.get(a(o))){u()}break;case"smoothly-input-month":if(!customElements.get(a(o))){b()}break;case"smoothly-input-select":if(!customElements.get(a(o))){k()}break;case"smoothly-input-submit":if(!customElements.get(a(o))){j()}break;case"smoothly-item":if(!customElements.get(a(o))){E()}break;case"smoothly-spinner":if(!customElements.get(a(o))){g()}break}}))}T();export{B as S,T as d};
|
|
2
|
+
//# sourceMappingURL=p-BRkEF66h.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as s,h as t,d as o,t as m}from"./p-BsZrGTcp.js";import{i as a}from"./p-BVKhAhsB.js";import{d as n}from"./p-BHEtq3Ue.js";import{d as i}from"./p-DX3KKRD9.js";import{d as l}from"./p-DgaHxdNI.js";import{d as r}from"./p-BiQsRsV4.js";import{d as c}from"./p-R4uIvvER.js";import{d as f}from"./p-C519IJGa.js";import{d}from"./p-DTqtObrT.js";import{d as u}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as s,h as t,d as o,t as m}from"./p-BsZrGTcp.js";import{i as a}from"./p-BVKhAhsB.js";import{d as n}from"./p-BHEtq3Ue.js";import{d as i}from"./p-DX3KKRD9.js";import{d as l}from"./p-DgaHxdNI.js";import{d as r}from"./p-BiQsRsV4.js";import{d as c}from"./p-R4uIvvER.js";import{d as f}from"./p-C519IJGa.js";import{d}from"./p-DTqtObrT.js";import{d as u}from"./p-CKrPTQ_S.js";import{d as p}from"./p-RNCr3p17.js";import{d as h}from"./p-D7cDUGTe.js";import{d as y}from"./p-BS2SWUX6.js";import{d as b}from"./p-CsLlJDsh.js";const k=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.name="Initial name";this.currency="EUR";this.date=a.Date.now();this.currencies=["GBP","SEK","EUR","USD"]}nameChanged(e,s){console.log(`updated name from '${s}' to '${e}'`)}async submitHandler(e){e.stopPropagation();console.log("Received event. Processing...",e.detail);if(!(typeof e.detail.value.name=="string")){console.error("Bad input. Resolving false.")}else if(!(typeof e.detail.value.date=="string")){console.error("Bad input. Resolving false.")}else if(!a.Currency.is(e.detail.value.currency)){console.error("Bad input. Resolving false.")}else{await new Promise((e=>window.setTimeout(e,1e3)));this.name=e.detail.value.name;this.date=e.detail.value.date;this.currency=e.detail.value.currency;console.log("Finished processing successfully. Resolving true.");e.detail.result(true)}e.detail.result(false)}render(){return t(o,{key:"2131171a287333757dd2e257272b2151f445d00a"},t("h2",{key:"ae5d57d207b35d5d25568cb929551076b02b29bb"},"Controlled"),t("smoothly-form",{key:"206b0c12bade21ffe5ec4357c27a11612adf99f7",readonly:true,looks:"grid",onSmoothlyFormSubmit:e=>this.submitHandler(e)},t("smoothly-input",{key:"9f607b8f55df8931f04e2df1746bc5b8f239700c",type:"text",name:"name",value:this.name},"Name"),t("smoothly-input-select",{key:"5fe97133fc282b8a428ba9d1d28e27f5642857d3",name:"currency"},t("span",{key:"76ca8e412897900e1054a70c2a2645ad3587d55d",slot:"label"},"Currency"),this.currencies.map((e=>t("smoothly-item",{selected:e==this.currency,value:e},e)))),t("smoothly-input",{key:"3099df2a407af93f416da0ff8e6093df00c49467"},"Dummy"),t("smoothly-input-month",{key:"1c5c73a802f6a8e90b8163e8fb9b652e0ba073f6",name:"date",value:this.date,next:true,previous:true},t("span",{key:"71f40ad3683c72e71366e0faa9750c536c82e05a",slot:"year-label"},"Year"),t("span",{key:"71888a27f0f94e796c983a4f41c6a679be7d66fe",slot:"month-label"},"Month")),t("smoothly-input-edit",{key:"1f2aba348ed5559946c30abede9e4656c30d887b",slot:"edit",size:"icon",color:"primary",fill:"default"}),t("smoothly-input-reset",{key:"6800fe757dab08be1ddb7c22e266b9093ffffefa",slot:"reset",size:"icon",color:"warning",fill:"default"}),t("smoothly-input-submit",{key:"f0c595bc65fa6207cd01792e7fa782e3a59b8464",slot:"submit",size:"icon",color:"success"})))}static get watchers(){return{name:[{nameChanged:0}]}}},[2,"smoothly-form-demo-controlled",{name:[32],currency:[32],date:[32]},undefined,{name:[{nameChanged:0}]}]);function E(){if(typeof customElements==="undefined"){return}const e=["smoothly-form-demo-controlled","smoothly-button","smoothly-button-confirm","smoothly-form","smoothly-icon","smoothly-input","smoothly-input-edit","smoothly-input-month","smoothly-input-reset","smoothly-input-select","smoothly-input-submit","smoothly-item","smoothly-spinner"];e.forEach((e=>{switch(e){case"smoothly-form-demo-controlled":if(!customElements.get(m(e))){customElements.define(m(e),k)}break;case"smoothly-button":if(!customElements.get(m(e))){n()}break;case"smoothly-button-confirm":if(!customElements.get(m(e))){i()}break;case"smoothly-form":if(!customElements.get(m(e))){l()}break;case"smoothly-icon":if(!customElements.get(m(e))){r()}break;case"smoothly-input":if(!customElements.get(m(e))){c()}break;case"smoothly-input-edit":if(!customElements.get(m(e))){f()}break;case"smoothly-input-month":if(!customElements.get(m(e))){d()}break;case"smoothly-input-reset":if(!customElements.get(m(e))){u()}break;case"smoothly-input-select":if(!customElements.get(m(e))){p()}break;case"smoothly-input-submit":if(!customElements.get(m(e))){h()}break;case"smoothly-item":if(!customElements.get(m(e))){y()}break;case"smoothly-spinner":if(!customElements.get(m(e))){b()}break}}))}E();export{k as S,E as d};
|
|
2
|
+
//# sourceMappingURL=p-BX6yRNGo.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as o,H as t,c as s,h as l,d as r,t as
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as o,H as t,c as s,h as l,d as r,t as n}from"./p-BsZrGTcp.js";import{C as e,I as i,S as a}from"./p-DgaHxdNI.js";import{E as c}from"./p-DFXJvHuL.js";import{d as h}from"./p-BHEtq3Ue.js";import{d as m}from"./p-BiQsRsV4.js";const y=()=>`[color=default].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-default-color);--smoothly-color-contrast:var(--smoothly-default-contrast);--smoothly-color-shade:var(--smoothly-default-shade);--smoothly-color-tint:var(--smoothly-default-tint)}[color=primary].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-primary-color);--smoothly-color-contrast:var(--smoothly-primary-contrast);--smoothly-color-shade:var(--smoothly-primary-shade);--smoothly-color-tint:var(--smoothly-primary-tint)}[color=secondary].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-secondary-color);--smoothly-color-contrast:var(--smoothly-secondary-contrast);--smoothly-color-shade:var(--smoothly-secondary-shade);--smoothly-color-tint:var(--smoothly-secondary-tint)}[color=tertiary].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-tertiary-color);--smoothly-color-contrast:var(--smoothly-tertiary-contrast);--smoothly-color-shade:var(--smoothly-tertiary-shade);--smoothly-color-tint:var(--smoothly-tertiary-tint)}[color=success].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-success-color);--smoothly-color-contrast:var(--smoothly-success-contrast);--smoothly-color-shade:var(--smoothly-success-shade);--smoothly-color-tint:var(--smoothly-success-tint)}[color=warning].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-warning-color);--smoothly-color-contrast:var(--smoothly-warning-contrast);--smoothly-color-shade:var(--smoothly-warning-shade);--smoothly-color-tint:var(--smoothly-warning-tint)}[color=danger].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-danger-color);--smoothly-color-contrast:var(--smoothly-danger-contrast);--smoothly-color-shade:var(--smoothly-danger-shade);--smoothly-color-tint:var(--smoothly-danger-tint)}[color=light].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-light-color);--smoothly-color-contrast:var(--smoothly-light-contrast);--smoothly-color-shade:var(--smoothly-light-shade);--smoothly-color-tint:var(--smoothly-light-tint)}[color=medium].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-medium-color);--smoothly-color-contrast:var(--smoothly-medium-contrast);--smoothly-color-shade:var(--smoothly-medium-shade);--smoothly-color-tint:var(--smoothly-medium-tint)}[color=dark].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-dark-color);--smoothly-color-contrast:var(--smoothly-dark-contrast);--smoothly-color-shade:var(--smoothly-dark-shade);--smoothly-color-tint:var(--smoothly-dark-tint)}.sc-smoothly-input-clear-h{--smoothly-button-border-radius:0.5rem;display:inline-flex;box-sizing:border-box;border-radius:var(--smoothly-button-border-radius);font-size:var(--smoothly-button-font-size, 1rem);cursor:pointer;border:none;outline:none;position:relative}[shape=rounded].sc-smoothly-input-clear-h{--smoothly-button-border-radius:2rem}[type=link].sc-smoothly-input-clear-h{display:inline}[disabled].sc-smoothly-input-clear-h{opacity:0.5}.sc-smoothly-input-clear-h>a.sc-smoothly-input-clear{font-weight:400;background-color:transparent}.sc-smoothly-input-clear-h>a.sc-smoothly-input-clear,.sc-smoothly-input-clear-h>button.sc-smoothly-input-clear{font-size:var(--smoothly-button-font-size);border:1px solid transparent;outline:none;cursor:pointer;display:inline-flex;gap:0.5rem;box-sizing:border-box}.sc-smoothly-input-clear-h>button.sc-smoothly-input-clear{font-weight:bold;justify-content:center;width:100%;align-items:center;border-radius:var(--smoothly-button-border-radius);padding-inline:var(--smoothly-button-padding-inline, 1rem)}.sc-smoothly-input-clear-h{min-height:var(--smoothly-button-height, 2.5rem)}.sc-smoothly-input-clear-h:has(>a:empty),.sc-smoothly-input-clear-h:has(>button:empty),.sc-smoothly-input-clear-h>a.sc-smoothly-input-clear:empty,.sc-smoothly-input-clear-h>button.sc-smoothly-input-clear:empty{border-width:0;min-height:0;padding-inline:0}[size=small].sc-smoothly-input-clear-h{--smoothly-button-height:2rem;--smoothly-button-padding-inline:0.75rem;--smoothly-button-font-size:0.875rem;--smoothly-icon-size:1.4rem}[size=large].sc-smoothly-input-clear-h{--smoothly-button-height:3rem;--smoothly-button-padding-inline:1.25rem;--smoothly-button-font-size:1.125rem}.sc-smoothly-input-clear-h:not([size=icon]):not([size=flexible])>button.sc-smoothly-input-clear{min-width:8rem}[size=icon].sc-smoothly-input-clear-h{--smoothly-icon-size:1.4rem}[size=icon].sc-smoothly-input-clear-h>button.sc-smoothly-input-clear{min-height:var(--smoothly-button-height, 2.5rem);min-width:var(--smoothly-button-height, 2.5rem);padding:0}.sc-smoothly-input-clear-h:not([size=icon]){min-width:8em}[size=flexible].sc-smoothly-input-clear-h{min-width:unset;padding:0;margin:0;display:flex;justify-content:center}[size=flexible].sc-smoothly-input-clear-h>button.sc-smoothly-input-clear{min-width:unset;padding:0;margin:0}[expand].sc-smoothly-input-clear-h{width:100%}[expand=full].sc-smoothly-input-clear-h{border-left:none;border-right:none;--smoothly-button-border-radius:0}[fill=outline].sc-smoothly-input-clear-h>button.sc-smoothly-input-clear{background-color:transparent;color:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));border-color:rgb(var(--smoothly-button-foreground))}.sc-smoothly-input-clear-h:not([fill=clear]):not([disabled])>button.sc-smoothly-input-clear:hover,.sc-smoothly-input-clear-h:not([disabled])>button.sc-smoothly-input-clear:focus-visible,[fill=outline].sc-smoothly-input-clear-h:not([disabled]):active>button.sc-smoothly-input-clear::before{border-color:rgb(var(--smoothly-button-focus-color))}[fill=outline].sc-smoothly-input-clear-h:not([disabled])>button.sc-smoothly-input-clear:hover::before,[fill=outline].sc-smoothly-input-clear-h:not([disabled])>button.sc-smoothly-input-clear:focus-within::before,[fill=outline].sc-smoothly-input-clear-h:not([disabled])>button.sc-smoothly-input-clear:active::before{content:"";position:absolute;border:2px solid rgb(var(--smoothly-button-focus-border));inset:-1px;border-radius:var(--smoothly-button-border-radius)}.sc-smoothly-input-clear-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-clear:hover,.sc-smoothly-input-clear-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-clear:focus-visible,.sc-smoothly-input-clear-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-clear:active{background:rgb(var(--smoothly-button-hover-background))}.sc-smoothly-input-clear-h>button.sc-smoothly-input-clear,.sc-smoothly-input-clear-h.sc-smoothly-input-clear-s>smoothly-icon,.sc-smoothly-input-clear-h .sc-smoothly-input-clear-s>smoothly-icon{color:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground))}[hidden].sc-smoothly-input-clear-h{display:none}.sc-smoothly-input-clear-h{display:flex}.sc-smoothly-input-clear-h:not([display]){display:none}.sc-smoothly-input-clear-h[type="input"].sc-smoothly-input-clear-s>smoothly-button>button{cursor:pointer;filter:opacity(60%);--smoothly-button-foreground:var(--smoothly-input-foreground);background-color:transparent}.sc-smoothly-input-clear-h.sc-smoothly-input-clear-s>smoothly-button>button>*+smoothly-icon{display:none}[disabled].sc-smoothly-input-clear-h{cursor:not-allowed}.sc-smoothly-input-clear-h[type="input"]:hover.sc-smoothly-input-clear-s>smoothly-icon,.sc-smoothly-input-clear-h[type="input"]:hover .sc-smoothly-input-clear-s>smoothly-icon{cursor:pointer;filter:opacity(100%)}`;const u=o(class o extends t{constructor(o){super();if(o!==false){this.__registerHost()}this.smoothlyInputLoad=s(this,"smoothlyInputLoad");this.fill="clear";this.size="icon";this.display=true;this.type="input";this.tooltip="Clear"}async componentWillLoad(){this.smoothlyInputLoad.emit((o=>{if(e.is(o)){this.parent=o;if(c.Element.is(o)){o.listen((async o=>{if(i.is(o)){const t=typeof o.defined=="boolean"?o.defined:Boolean(await o.getValue());this.display=t&&!o.readonly&&!o.disabled}if(o instanceof a){this.display=!o.readonly}}));if(typeof this.disabled!=="boolean"){o.listen((async o=>{if(o instanceof a){this.disabled=o.readonly||Object.values(o.value).filter((o=>o)).length<1}}))}}}}))}clickHandler(){var o;(o=this.parent)===null||o===void 0?void 0:o.clear()}render(){var o;return l(r,{key:"c3057c346978456fae66b50daa28779d57897fe4",title:this.tooltip},l("smoothly-button",{key:"ada585112d53669e71813f504c07f4ea51f8365a",disabled:this.disabled,size:this.size,type:"button",shape:this.shape,expand:this.expand,color:this.color,fill:(o=this.fill)!==null&&o!==void 0?o:this.type=="input"?"clear":undefined},l("slot",{key:"5300d48ce3c05f9ba4e7492db5069e5252aba1c3"}),l("smoothly-icon",{key:"771161bfba19ad4f9f875481a75c5b7b65d3d143",name:"close",size:"tiny"})))}get element(){return this}static get style(){return y()}},[262,"smoothly-input-clear",{color:[1],expand:[513],fill:[513],disabled:[1540],size:[513],shape:[513],display:[1540],type:[513],tooltip:[1]},[[0,"click","clickHandler"]]]);function d(){if(typeof customElements==="undefined"){return}const o=["smoothly-input-clear","smoothly-button","smoothly-icon"];o.forEach((o=>{switch(o){case"smoothly-input-clear":if(!customElements.get(n(o))){customElements.define(n(o),u)}break;case"smoothly-button":if(!customElements.get(n(o))){h()}break;case"smoothly-icon":if(!customElements.get(n(o))){m()}break}}))}d();export{u as S,d};
|
|
2
|
+
//# sourceMappingURL=p-BaBGzDg_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["styleCss","SmoothlyInputClear","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","fill","size","display","type","tooltip","componentWillLoad","smoothlyInputLoad","emit","parent","Clearable","is","Editable","Element","listen","async","p","Input","defined","Boolean","getValue","readonly","disabled","SmoothlyForm","Object","values","value","filter","val","length","clickHandler","_a","clear","render","h","Host","key","title","shape","expand","color","undefined","name"],"sources":["src/components/input/clear/style.css?tag=smoothly-input-clear&encapsulation=scoped","src/components/input/clear/index.tsx"],"sourcesContent":["@import \"../../button/style.css\";\n\n:host {\n\tdisplay: flex;\n}\n\n:host(:not([display])) {\n\tdisplay: none;\n}\n\n:host([type=\"input\"])::slotted(smoothly-button>button) {\n\tcursor: pointer;\n\tfilter: opacity(60%);\n\t--smoothly-button-foreground: var(--smoothly-input-foreground);\n\tbackground-color: transparent;\n}\n\n:host::slotted(smoothly-button>button > * > * + smoothly-icon) {\n\tdisplay: none;\n}\n\n:host([disabled]) {\n\tcursor: not-allowed\n}\n\n:host([type=\"input\"]):hover ::slotted(smoothly-icon) {\n\tcursor: pointer;\n\tfilter: opacity(100%);\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Listen, Prop } from \"@stencil/core\"\nimport { Color, Fill } from \"../../../model\"\nimport { SmoothlyForm } from \"../../form\"\nimport { Clearable } from \"../Clearable\"\nimport { Editable } from \"../Editable\"\nimport { Input } from \"../Input\"\n\n@Component({\n\ttag: \"smoothly-input-clear\",\n\tstyleUrl: \"./style.css\",\n\tscoped: true,\n})\nexport class SmoothlyInputClear {\n\t@Element() element: HTMLSmoothlyInputClearElement\n\t@Prop() color?: Color\n\t@Prop({ reflect: true }) expand?: \"block\" | \"full\"\n\t@Prop({ reflect: true }) fill?: Fill = \"clear\"\n\t@Prop({ reflect: true, mutable: true }) disabled?: boolean\n\t@Prop({ reflect: true }) size: \"small\" | \"large\" | \"icon\" | \"flexible\" = \"icon\"\n\t@Prop({ reflect: true }) shape?: \"rounded\"\n\t@Prop({ reflect: true, mutable: true }) display = true\n\t@Prop({ reflect: true }) type: \"form\" | \"input\" = \"input\"\n\t@Prop() tooltip = \"Clear\"\n\tprivate parent?: Clearable | (Clearable & Editable)\n\t@Event() smoothlyInputLoad: EventEmitter<(parent: Editable) => void>\n\n\tasync componentWillLoad() {\n\t\tthis.smoothlyInputLoad.emit(parent => {\n\t\t\tif (Clearable.is(parent)) {\n\t\t\t\tthis.parent = parent\n\t\t\t\tif (Editable.Element.is(parent)) {\n\t\t\t\t\tparent.listen(async p => {\n\t\t\t\t\t\tif (Input.is(p)) {\n\t\t\t\t\t\t\tconst defined = typeof p.defined == \"boolean\" ? p.defined : Boolean(await p.getValue())\n\t\t\t\t\t\t\tthis.display = defined && !p.readonly && !p.disabled\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (p instanceof SmoothlyForm) {\n\t\t\t\t\t\t\tthis.display = !p.readonly\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\tif (typeof this.disabled !== \"boolean\") {\n\t\t\t\t\t\tparent.listen(async p => {\n\t\t\t\t\t\t\tif (p instanceof SmoothlyForm) {\n\t\t\t\t\t\t\t\tthis.disabled = p.readonly || Object.values(p.value).filter(val => val).length < 1\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\t@Listen(\"click\")\n\tclickHandler() {\n\t\tthis.parent?.clear()\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<Host title={this.tooltip}>\n\t\t\t\t<smoothly-button\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\tsize={this.size}\n\t\t\t\t\ttype={\"button\"}\n\t\t\t\t\tshape={this.shape}\n\t\t\t\t\texpand={this.expand}\n\t\t\t\t\tcolor={this.color}\n\t\t\t\t\tfill={this.fill ?? (this.type == \"input\" ? \"clear\" : undefined)}>\n\t\t\t\t\t<slot />\n\t\t\t\t\t<smoothly-icon name=\"close\" size=\"tiny\" />\n\t\t\t\t</smoothly-button>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"mappings":"qOAAA,MAAMA,EAAW,IAAM,q3O,MCYVC,EAAkBC,EAAA,MAAAD,UAAAE,EAL/B,WAAAC,CAAAC,G,+FAS0BC,KAAAC,KAAc,QAEdD,KAAAE,KAAgD,OAEjCF,KAAAG,QAAU,KACzBH,KAAAI,KAAyB,QAC1CJ,KAAAK,QAAU,OAkDlB,CA9CA,uBAAMC,GACLN,KAAKO,kBAAkBC,MAAKC,IAC3B,GAAIC,EAAUC,GAAGF,GAAS,CACzBT,KAAKS,OAASA,EACd,GAAIG,EAASC,QAAQF,GAAGF,GAAS,CAChCA,EAAOK,QAAOC,MAAMC,IACnB,GAAIC,EAAMN,GAAGK,GAAI,CAChB,MAAME,SAAiBF,EAAEE,SAAW,UAAYF,EAAEE,QAAUC,cAAcH,EAAEI,YAC5EpB,KAAKG,QAAUe,IAAYF,EAAEK,WAAaL,EAAEM,Q,CAE7C,GAAIN,aAAaO,EAAc,CAC9BvB,KAAKG,SAAWa,EAAEK,Q,KAGpB,UAAWrB,KAAKsB,WAAa,UAAW,CACvCb,EAAOK,QAAOC,MAAMC,IACnB,GAAIA,aAAaO,EAAc,CAC9BvB,KAAKsB,SAAWN,EAAEK,UAAYG,OAAOC,OAAOT,EAAEU,OAAOC,QAAOC,GAAOA,IAAKC,OAAS,C,WASxF,YAAAC,G,OACCC,EAAA/B,KAAKS,UAAM,MAAAsB,SAAA,SAAAA,EAAEC,O,CAEd,MAAAC,G,MACC,OACCC,EAACC,EAAI,CAAAC,IAAA,2CAACC,MAAOrC,KAAKK,SACjB6B,EAAA,mBAAAE,IAAA,2CACCd,SAAUtB,KAAKsB,SACfpB,KAAMF,KAAKE,KACXE,KAAM,SACNkC,MAAOtC,KAAKsC,MACZC,OAAQvC,KAAKuC,OACbC,MAAOxC,KAAKwC,MACZvC,MAAM8B,EAAA/B,KAAKC,QAAI,MAAA8B,SAAA,EAAAA,EAAK/B,KAAKI,MAAQ,QAAU,QAAUqC,WACrDP,EAAA,QAAAE,IAAA,6CACAF,EAAA,iBAAAE,IAAA,2CAAeM,KAAK,QAAQxC,KAAK,U","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as o,H as s,h as e,d as t,t as m}from"./p-BsZrGTcp.js";import{d as a}from"./p-BHEtq3Ue.js";import{d as r}from"./p-DX3KKRD9.js";import{d as n}from"./p-DgaHxdNI.js";import{d as c}from"./p-BiQsRsV4.js";import{d as i}from"./p-R4uIvvER.js";import{d as l}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as o,H as s,h as e,d as t,t as m}from"./p-BsZrGTcp.js";import{d as a}from"./p-BHEtq3Ue.js";import{d as r}from"./p-DX3KKRD9.js";import{d as n}from"./p-DgaHxdNI.js";import{d as c}from"./p-BiQsRsV4.js";import{d as i}from"./p-R4uIvvER.js";import{d as l}from"./p-CKrPTQ_S.js";import{d as f}from"./p-D7cDUGTe.js";import{d as p}from"./p-CsLlJDsh.js";const d=o(class o extends s{constructor(o){super();if(o!==false){this.__registerHost()}}render(){return e(t,{key:"a85b73dcf84b35975a7f8baac4cee7db4a96e070"},e("h2",{key:"fa5ab594ad42bbe9eb3c704803eef599da54feb8"},"Login"),e("smoothly-form",{key:"e6abe031a6d92a6d4bcd86c53b838140c4a74eaa",looks:"border"},e("smoothly-input",{key:"0850b34c15fd675bec5d759c836588d0dee63c7a",type:"text",name:"username"},"Username"),e("smoothly-input",{key:"c22698a31ccfe3df8ee6e582d271540ec2759a28",type:"password",name:"password"},"Password"),e("smoothly-input-reset",{key:"28a205519134187c020abd897f40a8ed4a29341f",slot:"reset",type:"form",size:"icon",color:"warning"}),e("smoothly-input-submit",{key:"ecc29e9c09754fb89a21d1050234d5624a5aa855",slot:"submit"})))}},[2,"smoothly-form-demo-login"]);function u(){if(typeof customElements==="undefined"){return}const o=["smoothly-form-demo-login","smoothly-button","smoothly-button-confirm","smoothly-form","smoothly-icon","smoothly-input","smoothly-input-reset","smoothly-input-submit","smoothly-spinner"];o.forEach((o=>{switch(o){case"smoothly-form-demo-login":if(!customElements.get(m(o))){customElements.define(m(o),d)}break;case"smoothly-button":if(!customElements.get(m(o))){a()}break;case"smoothly-button-confirm":if(!customElements.get(m(o))){r()}break;case"smoothly-form":if(!customElements.get(m(o))){n()}break;case"smoothly-icon":if(!customElements.get(m(o))){c()}break;case"smoothly-input":if(!customElements.get(m(o))){i()}break;case"smoothly-input-reset":if(!customElements.get(m(o))){l()}break;case"smoothly-input-submit":if(!customElements.get(m(o))){f()}break;case"smoothly-spinner":if(!customElements.get(m(o))){p()}break}}))}u();export{d as S,u as d};
|
|
2
|
+
//# sourceMappingURL=p-BiwhssQ8.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as t,h as o,d as s,t as m}from"./p-BsZrGTcp.js";import{i as a}from"./p-BVKhAhsB.js";import{n as c,f as r}from"./p-CkXes5c-.js";import{o as l}from"./p-Dr7iZPxA.js";import{d as n}from"./p-BHEtq3Ue.js";import{d as i}from"./p-DX3KKRD9.js";import{d}from"./p-BqAN7jax.js";import{d as f}from"./p-B8ljN4o0.js";import{d as u}from"./p-DgaHxdNI.js";import{d as p}from"./p-BiQsRsV4.js";import{d as h}from"./p-R4uIvvER.js";import{d as y}from"./p-C9zTTp-4.js";import{d as b}from"./p-DTqtObrT.js";import{d as k}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as t,h as o,d as s,t as m}from"./p-BsZrGTcp.js";import{i as a}from"./p-BVKhAhsB.js";import{n as c,f as r}from"./p-CkXes5c-.js";import{o as l}from"./p-Dr7iZPxA.js";import{d as n}from"./p-BHEtq3Ue.js";import{d as i}from"./p-DX3KKRD9.js";import{d}from"./p-BqAN7jax.js";import{d as f}from"./p-B8ljN4o0.js";import{d as u}from"./p-DgaHxdNI.js";import{d as p}from"./p-BiQsRsV4.js";import{d as h}from"./p-R4uIvvER.js";import{d as y}from"./p-C9zTTp-4.js";import{d as b}from"./p-DTqtObrT.js";import{d as k}from"./p-CKrPTQ_S.js";import{d as j}from"./p-RNCr3p17.js";import{d as E}from"./p-D7cDUGTe.js";import{d as D}from"./p-BS2SWUX6.js";import{d as B}from"./p-CsLlJDsh.js";var x;(function(e){e.type=l({date:r("isoly.Date",a.Date.is),amount:c()})})(x||(x={}));var T;(function(e){e.type=l({schedule:x.type.array()})})(T||(T={}));const A=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}}render(){return o(s,{key:"6c26fc85d61f779af5fcab96c9e284d5b878688b"},o("h2",{key:"03b826fce15279c6e12a41b7b36801ae7ee4c519"},"Schedule"),o("smoothly-form",{key:"d346491153ecef66014e4094e2a146d9f22d05d2",looks:"line",validator:T.type},o("smoothly-input-date",{key:"2c9e97babe7f546172b3c2cba82196c023a202bd",name:"schedule.0.date"},"Date"),o("smoothly-input",{key:"ce96e610d3ccd1dc33a73bd50cdaa76a37cd5bdb",name:"schedule.0.amount",type:"price"},"Amount"),o("smoothly-input-date",{key:"53f1beac7d55968d08bac99d593df36e1aca34be",name:"schedule.1.date"},"Date"),o("smoothly-input",{key:"4d576bb6887c81df8b3bc70da45b6218d1dce3e9",name:"schedule.1.amount",type:"price"},"Amount"),o("smoothly-input-date",{key:"f743cfaa8782867a30cd80320c684b7a50aea546",name:"schedule.2.date"},"Date"),o("smoothly-input",{key:"7a9b171261c173302c61ce089849cdc0ddddf9cf",name:"schedule.2.amount",type:"price"},"Amount"),o("smoothly-input-reset",{key:"fe8b3bb4f160c7f40d1f383e39ac700a5e00ff07",slot:"reset",fill:"default",type:"form",color:"warning"}),o("smoothly-input-submit",{key:"2f494f54c287b73b73dd94956018360affffec4c",slot:"submit"})))}},[2,"smoothly-form-demo-schedule"]);function v(){if(typeof customElements==="undefined"){return}const e=["smoothly-form-demo-schedule","smoothly-button","smoothly-button-confirm","smoothly-calendar","smoothly-date-text","smoothly-form","smoothly-icon","smoothly-input","smoothly-input-date","smoothly-input-month","smoothly-input-reset","smoothly-input-select","smoothly-input-submit","smoothly-item","smoothly-spinner"];e.forEach((e=>{switch(e){case"smoothly-form-demo-schedule":if(!customElements.get(m(e))){customElements.define(m(e),A)}break;case"smoothly-button":if(!customElements.get(m(e))){n()}break;case"smoothly-button-confirm":if(!customElements.get(m(e))){i()}break;case"smoothly-calendar":if(!customElements.get(m(e))){d()}break;case"smoothly-date-text":if(!customElements.get(m(e))){f()}break;case"smoothly-form":if(!customElements.get(m(e))){u()}break;case"smoothly-icon":if(!customElements.get(m(e))){p()}break;case"smoothly-input":if(!customElements.get(m(e))){h()}break;case"smoothly-input-date":if(!customElements.get(m(e))){y()}break;case"smoothly-input-month":if(!customElements.get(m(e))){b()}break;case"smoothly-input-reset":if(!customElements.get(m(e))){k()}break;case"smoothly-input-select":if(!customElements.get(m(e))){j()}break;case"smoothly-input-submit":if(!customElements.get(m(e))){E()}break;case"smoothly-item":if(!customElements.get(m(e))){D()}break;case"smoothly-spinner":if(!customElements.get(m(e))){B()}break}}))}v();export{A as S,v as d};
|
|
2
|
+
//# sourceMappingURL=p-Bj9DsW03.js.map
|