smoothly 1.1.1-alpha.21 → 1.1.1-alpha.23
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_95.cjs.entry.js +6 -6
- package/dist/cjs/smoothly-app_95.cjs.entry.js.map +1 -1
- package/dist/collection/components/calendar/style.css +36 -22
- package/dist/collection/components/filter/style.css +6 -4
- package/dist/collection/components/input/date/range/style.css +1 -0
- package/dist/collection/components/input/date/style.css +1 -0
- package/dist/collection/components/input/style.css +0 -1
- package/dist/collection/components/item/style.css +5 -2
- package/dist/components/{p-d4a36c0e.js → p-1dfa73db.js} +3 -3
- package/dist/components/{p-d4a36c0e.js.map → p-1dfa73db.js.map} +1 -1
- package/dist/components/{p-c6e5608f.js → p-38ef76a8.js} +5 -5
- package/dist/components/{p-c6e5608f.js.map → p-38ef76a8.js.map} +1 -1
- package/dist/components/{p-0c409b98.js → p-395f2d30.js} +4 -4
- package/dist/components/{p-0c409b98.js.map → p-395f2d30.js.map} +1 -1
- package/dist/components/{p-64342f9c.js → p-48fcebd3.js} +3 -3
- package/dist/components/{p-64342f9c.js.map → p-48fcebd3.js.map} +1 -1
- package/dist/components/{p-9fa4b6d0.js → p-533b5124.js} +2 -2
- package/dist/components/{p-9fa4b6d0.js.map → p-533b5124.js.map} +1 -1
- package/dist/components/{p-e73096f5.js → p-553d66f2.js} +5 -5
- package/dist/components/p-553d66f2.js.map +1 -0
- package/dist/components/{p-b95284aa.js → p-59c5dec0.js} +2 -2
- package/dist/components/{p-b95284aa.js.map → p-59c5dec0.js.map} +1 -1
- package/dist/components/{p-1743a7e2.js → p-6e1d34f1.js} +3 -3
- package/dist/components/{p-1743a7e2.js.map → p-6e1d34f1.js.map} +1 -1
- package/dist/components/{p-342939e0.js → p-70aee140.js} +4 -4
- package/dist/components/{p-342939e0.js.map → p-70aee140.js.map} +1 -1
- package/dist/components/{p-798e9f7c.js → p-84425325.js} +2 -2
- package/dist/components/{p-798e9f7c.js.map → p-84425325.js.map} +1 -1
- package/dist/components/{p-5569639d.js → p-bfa3193e.js} +2 -2
- package/dist/components/{p-5569639d.js.map → p-bfa3193e.js.map} +1 -1
- package/dist/components/{p-fe55a54e.js → p-c8cfe6cd.js} +7 -7
- package/dist/components/p-c8cfe6cd.js.map +1 -0
- package/dist/components/{p-229cf51b.js → p-d6ba71a4.js} +2 -2
- package/dist/components/{p-229cf51b.js.map → p-d6ba71a4.js.map} +1 -1
- package/dist/components/{p-50d5fb98.js → p-d7242817.js} +2 -2
- package/dist/components/{p-50d5fb98.js.map → p-d7242817.js.map} +1 -1
- package/dist/components/{p-488297a3.js → p-df721dfc.js} +2 -2
- package/dist/components/p-df721dfc.js.map +1 -0
- package/dist/components/{p-e23bc122.js → p-e13d98d0.js} +8 -8
- package/dist/components/{p-e23bc122.js.map → p-e13d98d0.js.map} +1 -1
- package/dist/components/{p-db26a36c.js → p-e15ce98c.js} +7 -7
- package/dist/components/p-e15ce98c.js.map +1 -0
- package/dist/components/{p-9f010bc0.js → p-e4d90d09.js} +4 -4
- package/dist/components/p-e4d90d09.js.map +1 -0
- package/dist/components/{p-67e3f6ba.js → p-e584d156.js} +2 -2
- package/dist/components/p-e584d156.js.map +1 -0
- package/dist/components/{p-6b68c185.js → p-e79dc7fb.js} +2 -2
- package/dist/components/{p-6b68c185.js.map → p-e79dc7fb.js.map} +1 -1
- package/dist/components/{p-88e2b22e.js → p-f2914f55.js} +10 -10
- package/dist/components/{p-88e2b22e.js.map → p-f2914f55.js.map} +1 -1
- package/dist/components/{p-b75ab804.js → p-f2d454ba.js} +13 -13
- package/dist/components/{p-b75ab804.js.map → p-f2d454ba.js.map} +1 -1
- package/dist/components/{p-499be380.js → p-f7b7b902.js} +3 -3
- package/dist/components/{p-499be380.js.map → p-f7b7b902.js.map} +1 -1
- package/dist/components/smoothly-address-display.js +1 -1
- package/dist/components/smoothly-address.js +1 -1
- package/dist/components/smoothly-addresses.js +3 -3
- package/dist/components/smoothly-app-demo.js +21 -21
- package/dist/components/smoothly-calendar.js +1 -1
- package/dist/components/smoothly-filter-field.js +1 -1
- package/dist/components/smoothly-filter-input.js +1 -1
- package/dist/components/smoothly-filter-picker.js +1 -1
- package/dist/components/smoothly-filter.js +1 -1
- package/dist/components/smoothly-input-color.js +1 -1
- package/dist/components/smoothly-input-date-range.js +1 -1
- package/dist/components/smoothly-input-date.js +1 -1
- package/dist/components/smoothly-input-demo-controlled-form.js +1 -1
- package/dist/components/smoothly-input-demo.js +1 -1
- package/dist/components/smoothly-input-month.js +1 -1
- package/dist/components/smoothly-input-select.js +1 -1
- package/dist/components/smoothly-input.js +1 -1
- package/dist/components/smoothly-item.js +1 -1
- package/dist/components/smoothly-picker-demo.js +1 -1
- package/dist/components/smoothly-picker-menu.js +1 -1
- package/dist/components/smoothly-picker.js +1 -1
- package/dist/components/smoothly-table-demo-filtered.js +1 -1
- package/dist/components/smoothly-table-demo.js +1 -1
- package/dist/components/smoothly-table-testing.js +1 -1
- package/dist/components/smoothly-theme-picker.js +1 -1
- package/dist/esm/smoothly-app_95.entry.js +6 -6
- package/dist/esm/smoothly-app_95.entry.js.map +1 -1
- package/dist/smoothly/p-535d2b01.entry.js +2 -0
- package/dist/smoothly/p-535d2b01.entry.js.map +1 -0
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/package.json +1 -1
- package/dist/components/p-488297a3.js.map +0 -1
- package/dist/components/p-67e3f6ba.js.map +0 -1
- package/dist/components/p-9f010bc0.js.map +0 -1
- package/dist/components/p-db26a36c.js.map +0 -1
- package/dist/components/p-e73096f5.js.map +0 -1
- package/dist/components/p-fe55a54e.js.map +0 -1
- package/dist/smoothly/p-84da94cd.entry.js +0 -2
- package/dist/smoothly/p-84da94cd.entry.js.map +0 -1
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: block;
|
|
3
3
|
--other-month-opacity: 0.5;
|
|
4
|
-
|
|
4
|
+
padding-bottom: 1rem;
|
|
5
|
+
box-shadow: 0 0 1px 0px rgb(var(--smoothly-default-contrast));
|
|
5
6
|
}
|
|
6
|
-
|
|
7
|
+
|
|
8
|
+
:host>smoothly-input-month {
|
|
7
9
|
width: calc(100% - 1em);
|
|
8
10
|
padding: 0.5em 0.5em 0 0.5em;
|
|
9
11
|
}
|
|
10
|
-
|
|
12
|
+
|
|
13
|
+
:host>table {
|
|
11
14
|
table-layout: fixed;
|
|
12
15
|
width: 100%;
|
|
13
16
|
}
|
|
14
|
-
|
|
15
|
-
:host
|
|
17
|
+
|
|
18
|
+
:host>table>thead>tr>th,
|
|
19
|
+
:host>table>tr>td {
|
|
16
20
|
text-align: center;
|
|
17
21
|
padding: 0.5em;
|
|
18
22
|
min-width: 2em;
|
|
@@ -20,43 +24,53 @@
|
|
|
20
24
|
cursor: pointer;
|
|
21
25
|
user-select: none;
|
|
22
26
|
}
|
|
23
|
-
|
|
27
|
+
|
|
28
|
+
:host>table>tr>td.currentMonth {
|
|
24
29
|
color: rgb(var(--smoothly-default-contrast));
|
|
25
30
|
}
|
|
26
|
-
|
|
31
|
+
|
|
32
|
+
:host>table>tr>td:not(.currentMonth) {
|
|
27
33
|
color: rgba(var(--smoothly-default-contrast), var(--other-month-opacity));
|
|
28
34
|
}
|
|
29
|
-
|
|
30
|
-
:host
|
|
31
|
-
:host
|
|
32
|
-
:host
|
|
35
|
+
|
|
36
|
+
:host>table>tr>td:nth-child(6):not(.currentMonth).selected,
|
|
37
|
+
:host>table>tr>td:nth-child(6):not(.currentMonth).dateRange,
|
|
38
|
+
:host>table>tr>td:nth-child(7):not(.currentMonth).selected,
|
|
39
|
+
:host>table>tr>td:nth-child(7):not(.currentMonth).dateRange {
|
|
33
40
|
color: rgba(var(--smoothly-default-contrast));
|
|
34
41
|
}
|
|
35
|
-
|
|
36
|
-
:host
|
|
42
|
+
|
|
43
|
+
:host>table>tr>td:nth-child(6),
|
|
44
|
+
:host>table>tr>td:nth-child(7) {
|
|
37
45
|
color: rgb(var(--smoothly-danger-tint));
|
|
38
46
|
}
|
|
39
|
-
|
|
40
|
-
:host
|
|
47
|
+
|
|
48
|
+
:host>table>tr>td:nth-child(6):not(.currentMonth),
|
|
49
|
+
:host>table>tr>td:nth-child(7):not(.currentMonth) {
|
|
41
50
|
color: rgba(var(--smoothly-danger-tint), var(--other-month-opacity));
|
|
42
51
|
}
|
|
43
|
-
|
|
52
|
+
|
|
53
|
+
:host>table>tr>td:not(.selected, .disable):hover {
|
|
44
54
|
color: rgb(var(--smoothly-primary-contrast));
|
|
45
55
|
background: rgb(var(--smoothly-primary-tint));
|
|
46
56
|
}
|
|
47
|
-
|
|
57
|
+
|
|
58
|
+
:host>table>tr>td.selected {
|
|
48
59
|
color: rgb(var(--smoothly-primary-contrast));
|
|
49
60
|
background: rgb(var(--smoothly-primary-color));
|
|
50
61
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
62
|
+
|
|
63
|
+
:host>table>tr>td:not(.selected, .dateRange):not(:hover).today {
|
|
64
|
+
background: rgb(var(--smoothly-medium-tint));
|
|
65
|
+
color: rgb(var(--smoothly-medium-contrast));
|
|
54
66
|
}
|
|
55
|
-
|
|
67
|
+
|
|
68
|
+
:host>table>tr>td.dateRange {
|
|
56
69
|
color: rgb(var(--smoothly-primary-contrast));
|
|
57
70
|
background: rgb(var(--smoothly-primary-tint));
|
|
58
71
|
}
|
|
59
|
-
|
|
72
|
+
|
|
73
|
+
:host>table>tr>td.disable {
|
|
60
74
|
cursor: not-allowed;
|
|
61
75
|
background-color: rgb(var(--smoothly-default-tint), 0.5);
|
|
62
76
|
color: rgb(var(--smoothly-default-contrast), 0.5);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
position: relative;
|
|
3
3
|
border: 1px solid rgb(var(--smoothly-medium-tint));
|
|
4
4
|
margin-left: 1rem;
|
|
5
|
+
background-color: rgb(var(--background-color, var(--smoothly-color-shade)));
|
|
5
6
|
margin-right: 1rem;
|
|
6
7
|
display: flex;
|
|
7
8
|
flex-direction: row;
|
|
@@ -16,6 +17,7 @@
|
|
|
16
17
|
pointer-events: auto;
|
|
17
18
|
margin-left: 0.3em;
|
|
18
19
|
margin-right: 0.3em;
|
|
20
|
+
|
|
19
21
|
&>[looks="plain"] {
|
|
20
22
|
display: flex;
|
|
21
23
|
align-self: stretch;
|
|
@@ -34,7 +36,7 @@
|
|
|
34
36
|
flex-shrink: 0;
|
|
35
37
|
}
|
|
36
38
|
|
|
37
|
-
:host
|
|
39
|
+
:host>div.close {
|
|
38
40
|
position: fixed;
|
|
39
41
|
z-index: 3;
|
|
40
42
|
top: 0;
|
|
@@ -44,7 +46,7 @@
|
|
|
44
46
|
background: transparent;
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
:host
|
|
49
|
+
:host>div.hidden {
|
|
48
50
|
display: none;
|
|
49
51
|
}
|
|
50
52
|
|
|
@@ -63,7 +65,7 @@
|
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
/* arrow */
|
|
66
|
-
:host
|
|
68
|
+
:host>div.container:before {
|
|
67
69
|
content: "";
|
|
68
70
|
width: 0.6em;
|
|
69
71
|
height: 0.6em;
|
|
@@ -76,7 +78,7 @@
|
|
|
76
78
|
}
|
|
77
79
|
|
|
78
80
|
/* arrow placement */
|
|
79
|
-
:host
|
|
81
|
+
:host>div.container.arrow-top:before {
|
|
80
82
|
left: calc(91%);
|
|
81
83
|
top: -5px;
|
|
82
84
|
}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
:host([selected]) {
|
|
2
|
-
background-color: rgb(var(--smoothly-primary-
|
|
2
|
+
background-color: rgb(var(--smoothly-primary-color));
|
|
3
3
|
color: rgb(var(--smoothly-primary-contrast));
|
|
4
4
|
}
|
|
5
|
+
|
|
5
6
|
:host {
|
|
6
7
|
padding: 0.5em;
|
|
7
8
|
cursor: pointer;
|
|
8
9
|
color: rgb(var(--smoothly-default-contrast));
|
|
9
10
|
border: rgb(var(--smoothly-default-shade) solid 1px);
|
|
10
11
|
}
|
|
12
|
+
|
|
11
13
|
:host([marked]),
|
|
12
14
|
:host:hover {
|
|
13
|
-
background-color: rgba(var(--smoothly-primary-tint)
|
|
15
|
+
background-color: rgba(var(--smoothly-primary-tint));
|
|
16
|
+
color: rgb(var(--smoothly-primary-contrast));
|
|
14
17
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h } from './p-5963f898.js';
|
|
2
|
-
import { d as defineCustomElement$3 } from './p-
|
|
2
|
+
import { d as defineCustomElement$3 } from './p-533b5124.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './p-b1fbd693.js';
|
|
4
|
-
import { d as defineCustomElement$1 } from './p-
|
|
4
|
+
import { d as defineCustomElement$1 } from './p-e584d156.js';
|
|
5
5
|
|
|
6
6
|
const styleCss = ".sc-smoothly-address-h{display:flex;justify-content:space-evenly}";
|
|
7
7
|
const SmoothlyAddressStyle0 = styleCss;
|
|
@@ -53,4 +53,4 @@ defineCustomElement();
|
|
|
53
53
|
|
|
54
54
|
export { SmoothlyAddress as S, defineCustomElement as d };
|
|
55
55
|
|
|
56
|
-
//# sourceMappingURL=p-
|
|
56
|
+
//# sourceMappingURL=p-1dfa73db.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-1dfa73db.js","mappings":";;;;;AAAA,MAAM,QAAQ,GAAG,mEAAmE,CAAC;AACrF,8BAAe,QAAQ;;MCMV,eAAe;;;;;wBAER,KAAK;;IACxB,MAAM;QACL,OAAO,iFAA0B,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAA6B,CAAA;KACxG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/address/style.css?tag=smoothly-address&encapsulation=scoped","src/components/address/index.tsx"],"sourcesContent":[":host {\n\tdisplay: flex;\n\tjustify-content: space-evenly;\n}\n","import { Component, h, Prop } from \"@stencil/core\"\nimport { address } from \"../address-display\"\n@Component({\n\ttag: \"smoothly-address\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyAddress {\n\t@Prop() value: address\n\t@Prop() editable = false\n\trender() {\n\t\treturn <smoothly-address-display value={this.value} editable={this.editable}></smoothly-address-display>\n\t}\n}\n"],"version":3}
|
|
@@ -4,13 +4,13 @@ import { d as defineCustomElement$c } from './p-2f39a851.js';
|
|
|
4
4
|
import { d as defineCustomElement$b } from './p-00be532f.js';
|
|
5
5
|
import { d as defineCustomElement$a } from './p-acf78dd8.js';
|
|
6
6
|
import { d as defineCustomElement$9 } from './p-b1fbd693.js';
|
|
7
|
-
import { d as defineCustomElement$8 } from './p-
|
|
7
|
+
import { d as defineCustomElement$8 } from './p-e584d156.js';
|
|
8
8
|
import { d as defineCustomElement$7 } from './p-589fc3bc.js';
|
|
9
|
-
import { d as defineCustomElement$6 } from './p-
|
|
9
|
+
import { d as defineCustomElement$6 } from './p-48fcebd3.js';
|
|
10
10
|
import { d as defineCustomElement$5 } from './p-9a889d6c.js';
|
|
11
|
-
import { d as defineCustomElement$4 } from './p-
|
|
11
|
+
import { d as defineCustomElement$4 } from './p-d6ba71a4.js';
|
|
12
12
|
import { d as defineCustomElement$3 } from './p-08ef862f.js';
|
|
13
|
-
import { d as defineCustomElement$2 } from './p-
|
|
13
|
+
import { d as defineCustomElement$2 } from './p-df721dfc.js';
|
|
14
14
|
import { d as defineCustomElement$1 } from './p-fef85273.js';
|
|
15
15
|
|
|
16
16
|
const styleCss = ".sc-smoothly-input-demo-controlled-form-h{display:flex;width:100%}.sc-smoothly-input-demo-controlled-form-h smoothly-form.sc-smoothly-input-demo-controlled-form{width:100%}";
|
|
@@ -139,4 +139,4 @@ defineCustomElement();
|
|
|
139
139
|
|
|
140
140
|
export { SmoothlyInputDemoControlledForm as S, defineCustomElement as d };
|
|
141
141
|
|
|
142
|
-
//# sourceMappingURL=p-
|
|
142
|
+
//# sourceMappingURL=p-38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AS,EAAE,IAAI,EAAE,SAAS,GAAI,EACtG,8EAAuB,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAI,CAC1D,CACV,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["isoly.Date","isoly.Currency"],"sources":["src/components/input/demo/controlled-form/style.css?tag=smoothly-input-demo-controlled-form&encapsulation=scoped","src/components/input/demo/controlled-form/index.tsx"],"sourcesContent":[":host {\n\tdisplay: flex;\n\twidth: 100%;\n}\n:host smoothly-form {\n\twidth: 100%;\n}\n","import { Component, h, Host, State, VNode, Watch } from \"@stencil/core\"\nimport { isoly } from \"isoly\"\nimport { SmoothlyFormCustomEvent } from \"../../../../components\"\nimport { Data } from \"../../../../model\"\n\n@Component({\n\ttag: \"smoothly-input-demo-controlled-form\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyInputDemoControlledForm {\n\t@State() name = \"Initial name\"\n\t@State() currency: isoly.Currency = \"EUR\"\n\t@State() date: isoly.Date = isoly.Date.now()\n\tprivate currencies: isoly.Currency[] = [\"GBP\", \"SEK\", \"EUR\", \"USD\"]\n\n\t@Watch(\"name\")\n\tnameChanged(current: string, previous: string): void {\n\t\tconsole.log(`updated name from '${previous}' to '${current}'`)\n\t}\n\n\tasync submitHandler(\n\t\tevent: SmoothlyFormCustomEvent<{ result: (result: boolean) => void; value: Data }>\n\t): Promise<void> {\n\t\tevent.stopPropagation()\n\t\tconsole.log(\"Received event. Processing...\", event.detail)\n\t\tif (!(typeof event.detail.value.name == \"string\")) {\n\t\t\tconsole.error(\"Bad input. Resolving false.\")\n\t\t} else if (!(typeof event.detail.value.date == \"string\"))\n\t\t\tconsole.error(\"Bad input. Resolving false.\")\n\t\telse if (!isoly.Currency.is(event.detail.value.currency))\n\t\t\tconsole.error(\"Bad input. Resolving false.\")\n\t\telse {\n\t\t\tawait new Promise(resolve => window.setTimeout(resolve, 1_000))\n\t\t\tthis.name = event.detail.value.name\n\t\t\tthis.date = event.detail.value.date\n\t\t\tthis.currency = event.detail.value.currency\n\t\t\tconsole.log(\"Finished processing successfully. Resolving true.\")\n\t\t\tevent.detail.result(true)\n\t\t}\n\t\tevent.detail.result(false)\n\t}\n\n\trender(): VNode | VNode[] {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<smoothly-form readonly looks={\"grid\"} onSmoothlyFormSubmit={e => this.submitHandler(e)}>\n\t\t\t\t\t<smoothly-input type={\"text\"} name={\"name\"} value={this.name}>\n\t\t\t\t\t\tName\n\t\t\t\t\t</smoothly-input>\n\t\t\t\t\t<smoothly-input-select name={\"currency\"}>\n\t\t\t\t\t\t<span slot={\"label\"}>Currency</span>\n\t\t\t\t\t\t{this.currencies.map(currency => (\n\t\t\t\t\t\t\t<smoothly-item selected={currency == this.currency} value={currency}>\n\t\t\t\t\t\t\t\t{currency}\n\t\t\t\t\t\t\t</smoothly-item>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</smoothly-input-select>\n\t\t\t\t\t<smoothly-input>Dummy</smoothly-input>\n\t\t\t\t\t<smoothly-input-month name={\"date\"} value={this.date} next previous>\n\t\t\t\t\t\t<span slot={\"year-label\"}>Year</span>\n\t\t\t\t\t\t<span slot={\"month-label\"}>Month</span>\n\t\t\t\t\t</smoothly-input-month>\n\t\t\t\t\t<smoothly-input-edit slot={\"edit\"} type={\"button\"} size={\"icon\"} color={\"primary\"} fill={\"default\"} />\n\t\t\t\t\t<smoothly-input-reset slot={\"reset\"} type={\"form\"} size={\"icon\"} color={\"warning\"} fill={\"default\"} />\n\t\t\t\t\t<smoothly-input-submit slot={\"submit\"} size={\"icon\"} color={\"success\"} />\n\t\t\t\t</smoothly-form>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -5,10 +5,10 @@ import { N as Notice } from './p-ef01331e.js';
|
|
|
5
5
|
import { d as defineCustomElement$c } from './p-2f39a851.js';
|
|
6
6
|
import { d as defineCustomElement$b } from './p-acf78dd8.js';
|
|
7
7
|
import { d as defineCustomElement$a } from './p-b1fbd693.js';
|
|
8
|
-
import { d as defineCustomElement$9 } from './p-
|
|
8
|
+
import { d as defineCustomElement$9 } from './p-e584d156.js';
|
|
9
9
|
import { d as defineCustomElement$8 } from './p-093304f1.js';
|
|
10
|
-
import { d as defineCustomElement$7 } from './p-
|
|
11
|
-
import { d as defineCustomElement$6 } from './p-
|
|
10
|
+
import { d as defineCustomElement$7 } from './p-f7b7b902.js';
|
|
11
|
+
import { d as defineCustomElement$6 } from './p-d7242817.js';
|
|
12
12
|
import { d as defineCustomElement$5 } from './p-ef360b5d.js';
|
|
13
13
|
import { d as defineCustomElement$4 } from './p-f4e48a77.js';
|
|
14
14
|
import { d as defineCustomElement$3 } from './p-c569a63b.js';
|
|
@@ -162,4 +162,4 @@ defineCustomElement();
|
|
|
162
162
|
|
|
163
163
|
export { SmoothlyPickerDemo as S, defineCustomElement as d };
|
|
164
164
|
|
|
165
|
-
//# sourceMappingURL=p-
|
|
165
|
+
//# sourceMappingURL=p-395f2d30.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-0c409b98.js","mappings":";;;;;;;;;;;;;;;;;AAAA,MAAM,QAAQ,GAAG,gwBAAgwB,CAAC;AAClxB,iCAAe,QAAQ;;ACGvB,SAAS,aAAa,CAAC,KAAa;IACnC,OAAO,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,IAAI,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,EAAE,CAAA;AACvG,CAAC;MAOY,kBAAkB;;;;QAEtB,UAAK,GAAuC;YACnD,oBAAoB,EAAE,aAAa;YACnC,mBAAmB,EAAE,YAAY;YACjC,kBAAkB,EAAE,WAAW;SAC/B,CAAA;uBACkB,CAA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zC,6DAAM,IAAI,EAAE,OAAO,gBAAkB,EACrC,sEAAe,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,mBAAmB,GAAG,CAC9B,CACR,CACZ,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/picker/demo/style.css?tag=smoothly-picker-demo&encapsulation=scoped","src/components/picker/demo/index.tsx"],"sourcesContent":[":host {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n:host smoothly-form {\n\tmax-width: 50rem;\n}\n:host .counter {\n\tposition: relative;\n\twidth: 3rem;\n\theight: 3rem;\n}\n:host .counter-button {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tpadding: 0;\n\tmargin: 0;\n\theight: 3rem;\n\twidth: 3rem;\n\tbackground-color: inherit;\n\tborder: none;\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n}\n:host .controlled smoothly-input:not([readonly]),\n:host .controlled smoothly-picker:not([readonly]) {\n\toutline: 1px solid rgb(var(--smoothly-success-color));\n}\n","import { Component, h, Host, Listen, State } from \"@stencil/core\"\nimport { Data, Notice } from \"../../../model\"\nimport { Controls } from \"../menu\"\n\nfunction validateEmail(email: string) {\n\treturn email.match(/^.+@.+/) ? true : { result: false, notice: Notice.failed(\"That is not an email\") }\n}\n\n@Component({\n\ttag: \"smoothly-picker-demo\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyPickerDemo {\n\tprivate controls?: Controls\n\tprivate users: Record<string, string | undefined> = {\n\t\t\"giovani@rocket.com\": \"giovani doe\",\n\t\t\"jessie@rocket.com\": \"jessie doe\",\n\t\t\"james@rocket.com\": \"james doe\",\n\t}\n\t@State() counter = 3\n\t@State() data = {\n\t\tmessage: \"hello world\",\n\t\temails: [{ value: \"jessie@rocket.com\" }, { value: \"james@rocket.com\" }],\n\t\toptions: [\n\t\t\t{ value: \"giovani@rocket.com\" },\n\t\t\t{ value: \"john@example.com\" },\n\t\t\t{ value: \"jane@example.com\" },\n\t\t\t{ value: \"jack@example.com\" },\n\t\t\t{ value: \"jessica@example.com\" },\n\t\t\t{ value: \"julia@example.com\" },\n\t\t\t{ value: \"jayden@example.com\" },\n\t\t\t{ value: \"jake@example.com\" },\n\t\t\t{ value: \"jamie@example.com\" },\n\t\t\t{ value: \"jasmine@example.com\" },\n\t\t],\n\t}\n\t@State() change?: SmoothlyPickerDemo[\"data\"]\n\tinputHandler(event: CustomEvent<Data>) {\n\t\tif (this.change) {\n\t\t\tthis.change = {\n\t\t\t\t...this.change,\n\t\t\t\t...event.detail,\n\t\t\t}\n\t\t\tconsole.log(\"demo input\", this.change)\n\t\t}\n\t}\n\t@Listen(\"smoothlyFormSubmit\")\n\tsubmitHandler(event: CustomEvent<Data>) {\n\t\tconsole.log(\"submitted\", event.detail)\n\t}\n\tclickHandler() {\n\t\tif (!this.change)\n\t\t\tthis.controls?.remember()\n\t\telse\n\t\t\tthis.controls?.restore()\n\t\tthis.change = this.change ? undefined : { ...this.data, emails: [...this.data.emails] }\n\t}\n\tloadedHandler(event: CustomEvent<Controls>) {\n\t\tthis.controls = event.detail\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<div>\n\t\t\t\t\t<smoothly-button onClick={() => (this.counter += 1)}>Add one</smoothly-button>\n\t\t\t\t\t<smoothly-button onClick={() => (this.counter -= 1)}>Remove one</smoothly-button>\n\t\t\t\t\t<smoothly-picker\n\t\t\t\t\t\tclass={\"counter\"}\n\t\t\t\t\t\tkey={Array.from({ length: this.counter }).toString()}\n\t\t\t\t\t\tname=\"counter\"\n\t\t\t\t\t\tmultiple\n\t\t\t\t\t\tmutable>\n\t\t\t\t\t\t{Array.from({ length: this.counter }).map((_, index) => (\n\t\t\t\t\t\t\t<smoothly-picker-option value={index} selected={index < this.counter - 1}>\n\t\t\t\t\t\t\t\t{index}\n\t\t\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t<span slot=\"search\">Search</span>\n\t\t\t\t\t\t<button slot=\"child\" class={\"counter-button\"}>\n\t\t\t\t\t\t\t<smoothly-icon name={\"add-outline\"} />\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</smoothly-picker>\n\t\t\t\t</div>\n\n\t\t\t\t<h5>Controlled input</h5>\n\t\t\t\t<smoothly-button color={\"secondary\"} onClick={() => this.clickHandler()}>\n\t\t\t\t\t{!this.change ? \"start edit\" : \"end edit\"}\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-form class={\"controlled\"} looks=\"line\" onSmoothlyFormInput={e => this.inputHandler(e)}>\n\t\t\t\t\t<smoothly-input readonly={!this.change} name=\"message\" value={this.data.message}>\n\t\t\t\t\t\tMessage\n\t\t\t\t\t</smoothly-input>\n\t\t\t\t\t<smoothly-picker\n\t\t\t\t\t\tname=\"emails\"\n\t\t\t\t\t\tmutable\n\t\t\t\t\t\tmultiple\n\t\t\t\t\t\treadonly={!this.change}\n\t\t\t\t\t\tvalidator={validateEmail}\n\t\t\t\t\t\tonSmoothlyPickerLoaded={e => this.loadedHandler(e)}>\n\t\t\t\t\t\t<span slot=\"label\">Emails</span>\n\t\t\t\t\t\t<span slot=\"search\">Search</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" slot=\"display\" name=\"person-add-outline\" />\n\t\t\t\t\t\t{(this.change?.emails ?? this.data.emails).map(email => (\n\t\t\t\t\t\t\t<smoothly-picker-option\n\t\t\t\t\t\t\t\tkey={email.value}\n\t\t\t\t\t\t\t\tvalue={email}\n\t\t\t\t\t\t\t\tselected\n\t\t\t\t\t\t\t\tsearch={[this.users[email.value] ?? []].flat()}>\n\t\t\t\t\t\t\t\t<span>{this.users[email.value]}</span>\n\t\t\t\t\t\t\t\t<span slot=\"label\">{email.value}</span>\n\t\t\t\t\t\t\t\t<smoothly-icon size=\"tiny\" slot=\"display\" name=\"person-outline\" />\n\t\t\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t{this.data.options.map(email => (\n\t\t\t\t\t\t\t<smoothly-picker-option key={email.value} value={email} search={[this.users[email.value] ?? []].flat()}>\n\t\t\t\t\t\t\t\t<span>{this.users[email.value]}</span>\n\t\t\t\t\t\t\t\t<span slot=\"label\">{email.value}</span>\n\t\t\t\t\t\t\t\t<smoothly-icon size=\"tiny\" slot=\"display\" name=\"person-outline\" />\n\t\t\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</smoothly-picker>\n\t\t\t\t\t<smoothly-input-clear slot={\"submit\"} type=\"form\" color=\"danger\" fill=\"solid\">\n\t\t\t\t\t\tClear\n\t\t\t\t\t</smoothly-input-clear>\n\t\t\t\t\t<smoothly-button slot={\"submit\"} color={\"secondary\"} onClick={() => this.controls?.clear()}>\n\t\t\t\t\t\tRemoved added by mutation\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-submit size=\"icon\" slot=\"submit\">\n\t\t\t\t\t\t<smoothly-icon name=\"checkmark-circle\" />\n\t\t\t\t\t</smoothly-submit>\n\t\t\t\t</smoothly-form>\n\n\t\t\t\t<h5>uncontrolled inputs</h5>\n\t\t\t\t<smoothly-form onSmoothlyFormSubmit={e => console.log(\"submitted\", e.detail)} looks=\"line\">\n\t\t\t\t\t<smoothly-input name=\"purpose\" type=\"text\">\n\t\t\t\t\t\tPurpose\n\t\t\t\t\t</smoothly-input>\n\t\t\t\t\t<smoothly-picker multiple mutable name=\"emails\" validator={validateEmail}>\n\t\t\t\t\t\t<span slot=\"label\">Emails</span>\n\t\t\t\t\t\t<span slot=\"search\">Search</span>\n\t\t\t\t\t\t<smoothly-picker-option value={\"james@rocket.com\"}>james@rocket.com</smoothly-picker-option>\n\t\t\t\t\t\t<smoothly-picker-option selected value={\"jessie@rocket.com\"}>\n\t\t\t\t\t\t\tjessie@rocket.com\n\t\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t\t<smoothly-picker-option value={\"giovanni@rocket.com\"}>giovanni@rocket.com</smoothly-picker-option>\n\t\t\t\t\t</smoothly-picker>\n\t\t\t\t\t<smoothly-submit slot=\"submit\">Submit</smoothly-submit>\n\t\t\t\t\t<smoothly-input-clear type=\"form\" color=\"danger\" fill=\"solid\" slot=\"clear\">\n\t\t\t\t\t\tClear\n\t\t\t\t\t</smoothly-input-clear>\n\t\t\t\t\t<smoothly-picker name=\"shape\">\n\t\t\t\t\t\t<span slot=\"label\">Shape</span>\n\t\t\t\t\t\t<span slot=\"search\">Search</span>\n\t\t\t\t\t\t<smoothly-picker-option value={\"circle\"}>\n\t\t\t\t\t\t\t<span slot=\"label\">Circle</span>\n\t\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"ellipse-outline\" />\n\t\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t\t<smoothly-picker-option value={\"cube\"}>\n\t\t\t\t\t\t\t<span slot={\"label\"}>Cube</span>\n\t\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"cube-outline\" />\n\t\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t\t<smoothly-picker-option value={\"square\"} selected>\n\t\t\t\t\t\t\t<span slot={\"label\"}>Square</span>\n\t\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"square-outline\" />\n\t\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t</smoothly-picker>\n\t\t\t\t\t<smoothly-picker multiple readonly name=\"animals\">\n\t\t\t\t\t\t<span slot=\"label\">Animals</span>\n\t\t\t\t\t\t<span slot=\"search\">Search</span>\n\t\t\t\t\t\t<smoothly-picker-option selected value={\"cat\"}>\n\t\t\t\t\t\t\tCat\n\t\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t\t<smoothly-picker-option value={\"dog\"}>Dog</smoothly-picker-option>\n\t\t\t\t\t\t<smoothly-picker-option value={\"fish\"}>Fish</smoothly-picker-option>\n\t\t\t\t\t</smoothly-picker>\n\t\t\t\t</smoothly-form>\n\t\t\t\t<smoothly-picker looks=\"border\" name=\"icon\" multiple>\n\t\t\t\t\t<span slot=\"label\">Icon</span>\n\t\t\t\t\t<span slot=\"search\">Search</span>\n\t\t\t\t\t<smoothly-picker-option value={\"circle\"} required>\n\t\t\t\t\t\t<span slot=\"label\">Circle</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"ellipse-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t<smoothly-picker-option value={\"cube\"}>\n\t\t\t\t\t\t<span slot={\"label\"}>Cube</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"cube-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t<smoothly-picker-option value={\"square\"} selected>\n\t\t\t\t\t\t<span slot={\"label\"}>Square</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"square-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t<smoothly-picker-option value={\"airplane\"}>\n\t\t\t\t\t\t<span slot={\"label\"}>Airplane</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"airplane-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t<smoothly-picker-option value={\"alarm\"}>\n\t\t\t\t\t\t<span slot={\"label\"}>Alarm</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"alarm-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t<smoothly-picker-option value={\"archive\"}>\n\t\t\t\t\t\t<span slot={\"label\"}>Archive</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"archive-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t<smoothly-picker-option value={\"bag\"}>\n\t\t\t\t\t\t<span slot={\"label\"}>Bag</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"bag-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t<smoothly-picker-option value={\"cafe\"}>\n\t\t\t\t\t\t<span slot={\"label\"}>Cafe</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"cafe-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t<smoothly-picker-option value={\"disc\"}>\n\t\t\t\t\t\t<span slot={\"label\"}>Disc</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"disc-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t<smoothly-picker-option value={\"earth\"}>\n\t\t\t\t\t\t<span slot={\"label\"}>Earth</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"earth-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t<smoothly-picker-option value={\"fast-food\"}>\n\t\t\t\t\t\t<span slot={\"label\"}>Fast food</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"fast-food-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t</smoothly-picker>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-395f2d30.js","mappings":";;;;;;;;;;;;;;;;;AAAA,MAAM,QAAQ,GAAG,gwBAAgwB,CAAC;AAClxB,iCAAe,QAAQ;;ACGvB,SAAS,aAAa,CAAC,KAAa;IACnC,OAAO,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,IAAI,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,EAAE,CAAA;AACvG,CAAC;MAOY,kBAAkB;;;;QAEtB,UAAK,GAAuC;YACnD,oBAAoB,EAAE,aAAa;YACnC,mBAAmB,EAAE,YAAY;YACjC,kBAAkB,EAAE,WAAW;SAC/B,CAAA;uBACkB,CAAC;oBACJ;YACf,OAAO,EAAE,aAAa;YACtB,MA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C,sEAAe,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,mBAAmB,GAAG,CAC9B,CACR,CACZ,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/picker/demo/style.css?tag=smoothly-picker-demo&encapsulation=scoped","src/components/picker/demo/index.tsx"],"sourcesContent":[":host {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n:host smoothly-form {\n\tmax-width: 50rem;\n}\n:host .counter {\n\tposition: relative;\n\twidth: 3rem;\n\theight: 3rem;\n}\n:host .counter-button {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tpadding: 0;\n\tmargin: 0;\n\theight: 3rem;\n\twidth: 3rem;\n\tbackground-color: inherit;\n\tborder: none;\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n}\n:host .controlled smoothly-input:not([readonly]),\n:host .controlled smoothly-picker:not([readonly]) {\n\toutline: 1px solid rgb(var(--smoothly-success-color));\n}\n","import { Component, h, Host, Listen, State } from \"@stencil/core\"\nimport { Data, Notice } from \"../../../model\"\nimport { Controls } from \"../menu\"\n\nfunction validateEmail(email: string) {\n\treturn email.match(/^.+@.+/) ? true : { result: false, notice: Notice.failed(\"That is not an email\") }\n}\n\n@Component({\n\ttag: \"smoothly-picker-demo\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyPickerDemo {\n\tprivate controls?: Controls\n\tprivate users: Record<string, string | undefined> = {\n\t\t\"giovani@rocket.com\": \"giovani doe\",\n\t\t\"jessie@rocket.com\": \"jessie doe\",\n\t\t\"james@rocket.com\": \"james doe\",\n\t}\n\t@State() counter = 3\n\t@State() data = {\n\t\tmessage: \"hello world\",\n\t\temails: [{ value: \"jessie@rocket.com\" }, { value: \"james@rocket.com\" }],\n\t\toptions: [\n\t\t\t{ value: \"giovani@rocket.com\" },\n\t\t\t{ value: \"john@example.com\" },\n\t\t\t{ value: \"jane@example.com\" },\n\t\t\t{ value: \"jack@example.com\" },\n\t\t\t{ value: \"jessica@example.com\" },\n\t\t\t{ value: \"julia@example.com\" },\n\t\t\t{ value: \"jayden@example.com\" },\n\t\t\t{ value: \"jake@example.com\" },\n\t\t\t{ value: \"jamie@example.com\" },\n\t\t\t{ value: \"jasmine@example.com\" },\n\t\t],\n\t}\n\t@State() change?: SmoothlyPickerDemo[\"data\"]\n\tinputHandler(event: CustomEvent<Data>) {\n\t\tif (this.change) {\n\t\t\tthis.change = {\n\t\t\t\t...this.change,\n\t\t\t\t...event.detail,\n\t\t\t}\n\t\t\tconsole.log(\"demo input\", this.change)\n\t\t}\n\t}\n\t@Listen(\"smoothlyFormSubmit\")\n\tsubmitHandler(event: CustomEvent<Data>) {\n\t\tconsole.log(\"submitted\", event.detail)\n\t}\n\tclickHandler() {\n\t\tif (!this.change)\n\t\t\tthis.controls?.remember()\n\t\telse\n\t\t\tthis.controls?.restore()\n\t\tthis.change = this.change ? undefined : { ...this.data, emails: [...this.data.emails] }\n\t}\n\tloadedHandler(event: CustomEvent<Controls>) {\n\t\tthis.controls = event.detail\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<div>\n\t\t\t\t\t<smoothly-button onClick={() => (this.counter += 1)}>Add one</smoothly-button>\n\t\t\t\t\t<smoothly-button onClick={() => (this.counter -= 1)}>Remove one</smoothly-button>\n\t\t\t\t\t<smoothly-picker\n\t\t\t\t\t\tclass={\"counter\"}\n\t\t\t\t\t\tkey={Array.from({ length: this.counter }).toString()}\n\t\t\t\t\t\tname=\"counter\"\n\t\t\t\t\t\tmultiple\n\t\t\t\t\t\tmutable>\n\t\t\t\t\t\t{Array.from({ length: this.counter }).map((_, index) => (\n\t\t\t\t\t\t\t<smoothly-picker-option value={index} selected={index < this.counter - 1}>\n\t\t\t\t\t\t\t\t{index}\n\t\t\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t<span slot=\"search\">Search</span>\n\t\t\t\t\t\t<button slot=\"child\" class={\"counter-button\"}>\n\t\t\t\t\t\t\t<smoothly-icon name={\"add-outline\"} />\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</smoothly-picker>\n\t\t\t\t</div>\n\n\t\t\t\t<h5>Controlled input</h5>\n\t\t\t\t<smoothly-button color={\"secondary\"} onClick={() => this.clickHandler()}>\n\t\t\t\t\t{!this.change ? \"start edit\" : \"end edit\"}\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-form class={\"controlled\"} looks=\"line\" onSmoothlyFormInput={e => this.inputHandler(e)}>\n\t\t\t\t\t<smoothly-input readonly={!this.change} name=\"message\" value={this.data.message}>\n\t\t\t\t\t\tMessage\n\t\t\t\t\t</smoothly-input>\n\t\t\t\t\t<smoothly-picker\n\t\t\t\t\t\tname=\"emails\"\n\t\t\t\t\t\tmutable\n\t\t\t\t\t\tmultiple\n\t\t\t\t\t\treadonly={!this.change}\n\t\t\t\t\t\tvalidator={validateEmail}\n\t\t\t\t\t\tonSmoothlyPickerLoaded={e => this.loadedHandler(e)}>\n\t\t\t\t\t\t<span slot=\"label\">Emails</span>\n\t\t\t\t\t\t<span slot=\"search\">Search</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" slot=\"display\" name=\"person-add-outline\" />\n\t\t\t\t\t\t{(this.change?.emails ?? this.data.emails).map(email => (\n\t\t\t\t\t\t\t<smoothly-picker-option\n\t\t\t\t\t\t\t\tkey={email.value}\n\t\t\t\t\t\t\t\tvalue={email}\n\t\t\t\t\t\t\t\tselected\n\t\t\t\t\t\t\t\tsearch={[this.users[email.value] ?? []].flat()}>\n\t\t\t\t\t\t\t\t<span>{this.users[email.value]}</span>\n\t\t\t\t\t\t\t\t<span slot=\"label\">{email.value}</span>\n\t\t\t\t\t\t\t\t<smoothly-icon size=\"tiny\" slot=\"display\" name=\"person-outline\" />\n\t\t\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t{this.data.options.map(email => (\n\t\t\t\t\t\t\t<smoothly-picker-option key={email.value} value={email} search={[this.users[email.value] ?? []].flat()}>\n\t\t\t\t\t\t\t\t<span>{this.users[email.value]}</span>\n\t\t\t\t\t\t\t\t<span slot=\"label\">{email.value}</span>\n\t\t\t\t\t\t\t\t<smoothly-icon size=\"tiny\" slot=\"display\" name=\"person-outline\" />\n\t\t\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</smoothly-picker>\n\t\t\t\t\t<smoothly-input-clear slot={\"submit\"} type=\"form\" color=\"danger\" fill=\"solid\">\n\t\t\t\t\t\tClear\n\t\t\t\t\t</smoothly-input-clear>\n\t\t\t\t\t<smoothly-button slot={\"submit\"} color={\"secondary\"} onClick={() => this.controls?.clear()}>\n\t\t\t\t\t\tRemoved added by mutation\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-submit size=\"icon\" slot=\"submit\">\n\t\t\t\t\t\t<smoothly-icon name=\"checkmark-circle\" />\n\t\t\t\t\t</smoothly-submit>\n\t\t\t\t</smoothly-form>\n\n\t\t\t\t<h5>uncontrolled inputs</h5>\n\t\t\t\t<smoothly-form onSmoothlyFormSubmit={e => console.log(\"submitted\", e.detail)} looks=\"line\">\n\t\t\t\t\t<smoothly-input name=\"purpose\" type=\"text\">\n\t\t\t\t\t\tPurpose\n\t\t\t\t\t</smoothly-input>\n\t\t\t\t\t<smoothly-picker multiple mutable name=\"emails\" validator={validateEmail}>\n\t\t\t\t\t\t<span slot=\"label\">Emails</span>\n\t\t\t\t\t\t<span slot=\"search\">Search</span>\n\t\t\t\t\t\t<smoothly-picker-option value={\"james@rocket.com\"}>james@rocket.com</smoothly-picker-option>\n\t\t\t\t\t\t<smoothly-picker-option selected value={\"jessie@rocket.com\"}>\n\t\t\t\t\t\t\tjessie@rocket.com\n\t\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t\t<smoothly-picker-option value={\"giovanni@rocket.com\"}>giovanni@rocket.com</smoothly-picker-option>\n\t\t\t\t\t</smoothly-picker>\n\t\t\t\t\t<smoothly-submit slot=\"submit\">Submit</smoothly-submit>\n\t\t\t\t\t<smoothly-input-clear type=\"form\" color=\"danger\" fill=\"solid\" slot=\"clear\">\n\t\t\t\t\t\tClear\n\t\t\t\t\t</smoothly-input-clear>\n\t\t\t\t\t<smoothly-picker name=\"shape\">\n\t\t\t\t\t\t<span slot=\"label\">Shape</span>\n\t\t\t\t\t\t<span slot=\"search\">Search</span>\n\t\t\t\t\t\t<smoothly-picker-option value={\"circle\"}>\n\t\t\t\t\t\t\t<span slot=\"label\">Circle</span>\n\t\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"ellipse-outline\" />\n\t\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t\t<smoothly-picker-option value={\"cube\"}>\n\t\t\t\t\t\t\t<span slot={\"label\"}>Cube</span>\n\t\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"cube-outline\" />\n\t\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t\t<smoothly-picker-option value={\"square\"} selected>\n\t\t\t\t\t\t\t<span slot={\"label\"}>Square</span>\n\t\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"square-outline\" />\n\t\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t</smoothly-picker>\n\t\t\t\t\t<smoothly-picker multiple readonly name=\"animals\">\n\t\t\t\t\t\t<span slot=\"label\">Animals</span>\n\t\t\t\t\t\t<span slot=\"search\">Search</span>\n\t\t\t\t\t\t<smoothly-picker-option selected value={\"cat\"}>\n\t\t\t\t\t\t\tCat\n\t\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t\t<smoothly-picker-option value={\"dog\"}>Dog</smoothly-picker-option>\n\t\t\t\t\t\t<smoothly-picker-option value={\"fish\"}>Fish</smoothly-picker-option>\n\t\t\t\t\t</smoothly-picker>\n\t\t\t\t</smoothly-form>\n\t\t\t\t<smoothly-picker looks=\"border\" name=\"icon\" multiple>\n\t\t\t\t\t<span slot=\"label\">Icon</span>\n\t\t\t\t\t<span slot=\"search\">Search</span>\n\t\t\t\t\t<smoothly-picker-option value={\"circle\"} required>\n\t\t\t\t\t\t<span slot=\"label\">Circle</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"ellipse-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t<smoothly-picker-option value={\"cube\"}>\n\t\t\t\t\t\t<span slot={\"label\"}>Cube</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"cube-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t<smoothly-picker-option value={\"square\"} selected>\n\t\t\t\t\t\t<span slot={\"label\"}>Square</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"square-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t<smoothly-picker-option value={\"airplane\"}>\n\t\t\t\t\t\t<span slot={\"label\"}>Airplane</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"airplane-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t<smoothly-picker-option value={\"alarm\"}>\n\t\t\t\t\t\t<span slot={\"label\"}>Alarm</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"alarm-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t<smoothly-picker-option value={\"archive\"}>\n\t\t\t\t\t\t<span slot={\"label\"}>Archive</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"archive-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t<smoothly-picker-option value={\"bag\"}>\n\t\t\t\t\t\t<span slot={\"label\"}>Bag</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"bag-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t<smoothly-picker-option value={\"cafe\"}>\n\t\t\t\t\t\t<span slot={\"label\"}>Cafe</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"cafe-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t<smoothly-picker-option value={\"disc\"}>\n\t\t\t\t\t\t<span slot={\"label\"}>Disc</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"disc-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t<smoothly-picker-option value={\"earth\"}>\n\t\t\t\t\t\t<span slot={\"label\"}>Earth</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"earth-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t<smoothly-picker-option value={\"fast-food\"}>\n\t\t\t\t\t\t<span slot={\"label\"}>Fast food</span>\n\t\t\t\t\t\t<smoothly-icon size=\"tiny\" name=\"fast-food-outline\" />\n\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t</smoothly-picker>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -2,8 +2,8 @@ import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-
|
|
|
2
2
|
import { D as Date$1 } from './p-e44d9427.js';
|
|
3
3
|
import { d as defineCustomElement$4 } from './p-2f39a851.js';
|
|
4
4
|
import { d as defineCustomElement$3 } from './p-b1fbd693.js';
|
|
5
|
-
import { d as defineCustomElement$2 } from './p-
|
|
6
|
-
import { d as defineCustomElement$1 } from './p-
|
|
5
|
+
import { d as defineCustomElement$2 } from './p-d6ba71a4.js';
|
|
6
|
+
import { d as defineCustomElement$1 } from './p-df721dfc.js';
|
|
7
7
|
|
|
8
8
|
function month(date) {
|
|
9
9
|
const d = new Date(date);
|
|
@@ -205,4 +205,4 @@ defineCustomElement();
|
|
|
205
205
|
|
|
206
206
|
export { SmoothlyInputMonth as S, defineCustomElement as d, month as m, weekdays as w };
|
|
207
207
|
|
|
208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AAI,EAAE,UAAU,EAChB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAClC,sEAAe,IAAI,EAAE,uBAAuB,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,GAAI,CACjF,CACZ,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["isoly.Date","generate.years","generate.months"],"sources":["src/components/calendar/generate.ts","src/components/input/month/style.css?tag=smoothly-input-month&encapsulation=scoped","src/components/input/month/index.tsx"],"sourcesContent":["import * as isoly from \"isoly\"\n\nexport function month(date: isoly.Date): isoly.Date[][] {\n\tconst d = new Date(date)\n\td.setDate(1)\n\tlet day = -((d.getDay() + 6) % 7) + 1\n\tconst result: string[][] = []\n\tfor (let row = 0; row < 6; row++) {\n\t\tconst r = []\n\t\tfor (let column = 0; column < 7; column++) {\n\t\t\tconst d = new Date(date)\n\t\t\td.setUTCDate(day++)\n\t\t\tr.push(isoly.Date.create(d))\n\t\t}\n\t\tif (row < 5 || isoly.Date.firstOfMonth(r[0]) == isoly.Date.firstOfMonth(date))\n\t\t\tresult.push(r)\n\t}\n\treturn result\n}\n\nexport function weekdays(): string[] {\n\tconst day = new globalThis.Date()\n\tday.setDate(day.getDate() - day.getDay() + 1)\n\tconst result: string[] = []\n\tfor (let i = 0; i < 7; i++) {\n\t\tresult.push(day.toLocaleString(undefined, { weekday: \"short\" }))\n\t\tday.setDate(day.getDate() + 1)\n\t}\n\treturn result\n}\n\nexport function months(current: isoly.Date): { date: isoly.Date; name: string; selected?: boolean }[] {\n\tconst day = new globalThis.Date(current)\n\tconst result: { date: isoly.Date; name: string; selected?: boolean }[] = []\n\tfor (let i = 0; i < 12; i++) {\n\t\tday.setMonth(i, 28)\n\t\tconst date = isoly.Date.create(day)\n\t\tresult.push({\n\t\t\tdate,\n\t\t\tname: day.toLocaleString(undefined, { month: \"long\" }),\n\t\t\tselected: date.substr(0, 7) == current.substr(0, 7),\n\t\t})\n\t}\n\treturn result\n}\nexport function years(current: isoly.Date): { date: isoly.Date; name: string; selected?: boolean }[] {\n\tconst day = new globalThis.Date(current)\n\tconst start = new Date().getFullYear() - 10\n\tconst end = new Date().getFullYear() + 10\n\tconst result: { date: isoly.Date; name: string; selected?: boolean }[] = []\n\tfor (let i = start; i <= end; i++) {\n\t\tday.setFullYear(i)\n\t\tconst date = isoly.Date.create(day)\n\t\tresult.push({\n\t\t\tdate,\n\t\t\tname: day.toLocaleString(undefined, { year: \"numeric\" }),\n\t\t\tselected: date == current,\n\t\t})\n\t}\n\treturn result\n}\n",":host {\n\tdisplay: flex;\n\tflex-direction: row;\n\tjustify-content: center;\n}\n\n:host>smoothly-input-select:last-of-type {\n\tdisplay: flex;\n\twidth: 100%;\n}\n\n:host[looks=line],\n:host[looks=border],\n:host[looks=transparent] {\n\tgap: 2em;\n}\n\n:host:not([previous])>smoothly-button:first-of-type,\n:host:not([next])>smoothly-button:last-of-type {\n\tdisplay: none;\n}\n","import {\n\tComponent,\n\tComponentWillLoad,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tMethod,\n\tProp,\n\tVNode,\n\tWatch,\n} from \"@stencil/core\"\nimport { isoly } from \"isoly\"\nimport { Data } from \"../../../model\"\nimport { Color } from \"../../../model\"\nimport * as generate from \"../../calendar/generate\"\nimport { Editable } from \"../Editable\"\nimport { Input } from \"../Input\"\nimport { Looks } from \"../Looks\"\n\n@Component({\n\ttag: \"smoothly-input-month\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyInputMonth implements ComponentWillLoad, Input, Editable {\n\tchanged: boolean\n\t@Element() element: HTMLSmoothlyInputMonthElement\n\t@Prop({ reflect: true, mutable: true }) readonly: boolean\n\t@Prop({ reflect: true }) color?: Color\n\t@Prop({ reflect: true, mutable: true }) looks: Looks\n\t@Prop() name: string\n\t@Prop({ mutable: true }) value?: isoly.Date = isoly.Date.now()\n\t@Prop({ reflect: true }) next = false\n\t@Prop({ reflect: true }) previous = false\n\t@Event() smoothlyInput: EventEmitter<Data>\n\t@Event() smoothlyInputLoad: EventEmitter<(parent: HTMLElement) => void>\n\t@Event() smoothlyFormDisable: EventEmitter<(disabled: boolean) => void>\n\t@Event() smoothlyInputLooks: EventEmitter<(looks: Looks, color: Color) => void>\n\tprivate year?: HTMLSmoothlyInputSelectElement\n\tprivate month?: HTMLSmoothlyInputSelectElement\n\tprivate listener: { changed?: (parent: Editable) => Promise<void> } = {}\n\n\tcomponentWillLoad(): void {\n\t\tthis.smoothlyInputLooks.emit(looks => (this.looks = looks))\n\t\tthis.smoothlyInputLoad.emit(() => {})\n\t\t!this.readonly && this.smoothlyFormDisable.emit(readonly => (this.readonly = readonly))\n\t\tthis.valueChanged()\n\t}\n\t@Watch(\"value\")\n\tvalueChanged(): void {\n\t\tthis.smoothlyInput.emit({ [this.name]: this.value })\n\t}\n\tprivate adjustMonth(delta: number): void {\n\t\tif (!this.readonly) {\n\t\t\tconst date = isoly.Date.parse(this.value ?? isoly.Date.now())\n\t\t\tdate.setMonth(date.getMonth() + delta)\n\t\t\tthis.value = isoly.Date.create(date)\n\t\t}\n\t}\n\t@Method()\n\tasync clear(): Promise<void> {\n\t\tthis.year?.clear()\n\t\tthis.month?.clear()\n\t}\n\t@Method()\n\tasync listen(property: \"changed\", listener: (parent: Editable) => Promise<void>): Promise<void> {\n\t\tthis.listener[property] = listener\n\t\tlistener(this)\n\t}\n\t@Method()\n\tasync edit(editable: boolean): Promise<void> {\n\t\tthis.readonly = !editable\n\t}\n\t@Method()\n\tasync reset(): Promise<void> {\n\t\tthis.year?.reset()\n\t\tthis.month?.reset()\n\t}\n\t@Method()\n\tasync setInitialValue(): Promise<void> {\n\t\tthis.year?.setInitialValue()\n\t\tthis.month?.setInitialValue()\n\t}\n\tinputHandler(event: CustomEvent<Record<string, any>>): void {\n\t\tif (event.target != this.element) {\n\t\t\tevent.stopPropagation()\n\t\t\tconst year = event.detail[`${this.name}-year`]\n\t\t\tconst month = event.detail[`${this.name}-month`]\n\t\t\tif (month && isoly.Date.is(month))\n\t\t\t\tthis.value = isoly.Date.firstOfMonth(month)\n\t\t\telse if (year && isoly.Date.is(year))\n\t\t\t\tthis.value = isoly.Date.firstOfMonth(year)\n\t\t}\n\t}\n\t@Listen(\"smoothlyInputLooks\")\n\tsmoothlyInputLooksHandler(event: CustomEvent<(looks: Looks, color: Color | undefined) => void>): void {\n\t\tif (event.target != this.element) {\n\t\t\tevent.stopPropagation()\n\t\t\tevent.detail(this.looks, this.color)\n\t\t}\n\t}\n\t@Listen(\"smoothlyInputLoad\")\n\tasync smoothlyInputLoadHandler(event: CustomEvent<(parent: unknown) => void>): Promise<void> {\n\t\tif (event.target != this.element)\n\t\t\tevent.stopPropagation()\n\t}\n\n\trender(): VNode | VNode[] {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<smoothly-button\n\t\t\t\t\tsize={\"flexible\"}\n\t\t\t\t\tcolor={this.color}\n\t\t\t\t\tdisabled={this.readonly}\n\t\t\t\t\tonClick={() => this.adjustMonth(-1)}>\n\t\t\t\t\t<smoothly-icon name={\"caret-back-outline\"} size={\"tiny\"} color={this.color} fill={\"default\"} />\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-input-select\n\t\t\t\t\tref={e => (this.year = e)}\n\t\t\t\t\tname={`${this.name}-year`}\n\t\t\t\t\treadonly={this.readonly}\n\t\t\t\t\tchanged={this.changed}\n\t\t\t\t\tmenuHeight=\"5.5items\"\n\t\t\t\t\trequired\n\t\t\t\t\tonSmoothlyInput={e => this.inputHandler(e)}\n\t\t\t\t\tsearchDisabled>\n\t\t\t\t\t<div slot={\"label\"}>\n\t\t\t\t\t\t<slot name={\"year-label\"} />\n\t\t\t\t\t</div>\n\t\t\t\t\t{generate.years(this.value ?? isoly.Date.now()).map(year => (\n\t\t\t\t\t\t<smoothly-item key={year.date} value={year.date} selected={year.selected || this.value == year.date}>\n\t\t\t\t\t\t\t{year.name}\n\t\t\t\t\t\t</smoothly-item>\n\t\t\t\t\t))}\n\t\t\t\t</smoothly-input-select>\n\t\t\t\t<smoothly-input-select\n\t\t\t\t\tref={e => (this.month = e)}\n\t\t\t\t\tname={`${this.name}-month`}\n\t\t\t\t\treadonly={this.readonly}\n\t\t\t\t\tcolor={this.color}\n\t\t\t\t\tlooks={this.looks}\n\t\t\t\t\tchanged={this.changed}\n\t\t\t\t\tmenuHeight=\"5.5items\"\n\t\t\t\t\trequired\n\t\t\t\t\tonSmoothlyInput={e => this.inputHandler(e)}\n\t\t\t\t\tsearchDisabled>\n\t\t\t\t\t<div slot={\"label\"}>\n\t\t\t\t\t\t<slot name={\"month-label\"} />\n\t\t\t\t\t</div>\n\t\t\t\t\t{generate.months(this.value ?? isoly.Date.now()).map(month => (\n\t\t\t\t\t\t<smoothly-item key={month.date} value={month.date} selected={month.selected || this.value == month.date}>\n\t\t\t\t\t\t\t{month.name}\n\t\t\t\t\t\t</smoothly-item>\n\t\t\t\t\t))}\n\t\t\t\t</smoothly-input-select>\n\t\t\t\t<smoothly-button\n\t\t\t\t\tsize={\"flexible\"}\n\t\t\t\t\tcolor={this.color}\n\t\t\t\t\tdisabled={this.readonly}\n\t\t\t\t\tonClick={() => this.adjustMonth(1)}>\n\t\t\t\t\t<smoothly-icon name={\"caret-forward-outline\"} size={\"tiny\"} color={this.color} fill={\"default\"} />\n\t\t\t\t</smoothly-button>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-48fcebd3.js","mappings":";;;;;;;SAEgB,KAAK,CAAC,IAAgB;IACrC,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAA;IACxB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CA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AE,SAAS,GAAI,CACjF,CACZ,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["isoly.Date","generate.years","generate.months"],"sources":["src/components/calendar/generate.ts","src/components/input/month/style.css?tag=smoothly-input-month&encapsulation=scoped","src/components/input/month/index.tsx"],"sourcesContent":["import * as isoly from \"isoly\"\n\nexport function month(date: isoly.Date): isoly.Date[][] {\n\tconst d = new Date(date)\n\td.setDate(1)\n\tlet day = -((d.getDay() + 6) % 7) + 1\n\tconst result: string[][] = []\n\tfor (let row = 0; row < 6; row++) {\n\t\tconst r = []\n\t\tfor (let column = 0; column < 7; column++) {\n\t\t\tconst d = new Date(date)\n\t\t\td.setUTCDate(day++)\n\t\t\tr.push(isoly.Date.create(d))\n\t\t}\n\t\tif (row < 5 || isoly.Date.firstOfMonth(r[0]) == isoly.Date.firstOfMonth(date))\n\t\t\tresult.push(r)\n\t}\n\treturn result\n}\n\nexport function weekdays(): string[] {\n\tconst day = new globalThis.Date()\n\tday.setDate(day.getDate() - day.getDay() + 1)\n\tconst result: string[] = []\n\tfor (let i = 0; i < 7; i++) {\n\t\tresult.push(day.toLocaleString(undefined, { weekday: \"short\" }))\n\t\tday.setDate(day.getDate() + 1)\n\t}\n\treturn result\n}\n\nexport function months(current: isoly.Date): { date: isoly.Date; name: string; selected?: boolean }[] {\n\tconst day = new globalThis.Date(current)\n\tconst result: { date: isoly.Date; name: string; selected?: boolean }[] = []\n\tfor (let i = 0; i < 12; i++) {\n\t\tday.setMonth(i, 28)\n\t\tconst date = isoly.Date.create(day)\n\t\tresult.push({\n\t\t\tdate,\n\t\t\tname: day.toLocaleString(undefined, { month: \"long\" }),\n\t\t\tselected: date.substr(0, 7) == current.substr(0, 7),\n\t\t})\n\t}\n\treturn result\n}\nexport function years(current: isoly.Date): { date: isoly.Date; name: string; selected?: boolean }[] {\n\tconst day = new globalThis.Date(current)\n\tconst start = new Date().getFullYear() - 10\n\tconst end = new Date().getFullYear() + 10\n\tconst result: { date: isoly.Date; name: string; selected?: boolean }[] = []\n\tfor (let i = start; i <= end; i++) {\n\t\tday.setFullYear(i)\n\t\tconst date = isoly.Date.create(day)\n\t\tresult.push({\n\t\t\tdate,\n\t\t\tname: day.toLocaleString(undefined, { year: \"numeric\" }),\n\t\t\tselected: date == current,\n\t\t})\n\t}\n\treturn result\n}\n",":host {\n\tdisplay: flex;\n\tflex-direction: row;\n\tjustify-content: center;\n}\n\n:host>smoothly-input-select:last-of-type {\n\tdisplay: flex;\n\twidth: 100%;\n}\n\n:host[looks=line],\n:host[looks=border],\n:host[looks=transparent] {\n\tgap: 2em;\n}\n\n:host:not([previous])>smoothly-button:first-of-type,\n:host:not([next])>smoothly-button:last-of-type {\n\tdisplay: none;\n}\n","import {\n\tComponent,\n\tComponentWillLoad,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tMethod,\n\tProp,\n\tVNode,\n\tWatch,\n} from \"@stencil/core\"\nimport { isoly } from \"isoly\"\nimport { Data } from \"../../../model\"\nimport { Color } from \"../../../model\"\nimport * as generate from \"../../calendar/generate\"\nimport { Editable } from \"../Editable\"\nimport { Input } from \"../Input\"\nimport { Looks } from \"../Looks\"\n\n@Component({\n\ttag: \"smoothly-input-month\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyInputMonth implements ComponentWillLoad, Input, Editable {\n\tchanged: boolean\n\t@Element() element: HTMLSmoothlyInputMonthElement\n\t@Prop({ reflect: true, mutable: true }) readonly: boolean\n\t@Prop({ reflect: true }) color?: Color\n\t@Prop({ reflect: true, mutable: true }) looks: Looks\n\t@Prop() name: string\n\t@Prop({ mutable: true }) value?: isoly.Date = isoly.Date.now()\n\t@Prop({ reflect: true }) next = false\n\t@Prop({ reflect: true }) previous = false\n\t@Event() smoothlyInput: EventEmitter<Data>\n\t@Event() smoothlyInputLoad: EventEmitter<(parent: HTMLElement) => void>\n\t@Event() smoothlyFormDisable: EventEmitter<(disabled: boolean) => void>\n\t@Event() smoothlyInputLooks: EventEmitter<(looks: Looks, color: Color) => void>\n\tprivate year?: HTMLSmoothlyInputSelectElement\n\tprivate month?: HTMLSmoothlyInputSelectElement\n\tprivate listener: { changed?: (parent: Editable) => Promise<void> } = {}\n\n\tcomponentWillLoad(): void {\n\t\tthis.smoothlyInputLooks.emit(looks => (this.looks = looks))\n\t\tthis.smoothlyInputLoad.emit(() => {})\n\t\t!this.readonly && this.smoothlyFormDisable.emit(readonly => (this.readonly = readonly))\n\t\tthis.valueChanged()\n\t}\n\t@Watch(\"value\")\n\tvalueChanged(): void {\n\t\tthis.smoothlyInput.emit({ [this.name]: this.value })\n\t}\n\tprivate adjustMonth(delta: number): void {\n\t\tif (!this.readonly) {\n\t\t\tconst date = isoly.Date.parse(this.value ?? isoly.Date.now())\n\t\t\tdate.setMonth(date.getMonth() + delta)\n\t\t\tthis.value = isoly.Date.create(date)\n\t\t}\n\t}\n\t@Method()\n\tasync clear(): Promise<void> {\n\t\tthis.year?.clear()\n\t\tthis.month?.clear()\n\t}\n\t@Method()\n\tasync listen(property: \"changed\", listener: (parent: Editable) => Promise<void>): Promise<void> {\n\t\tthis.listener[property] = listener\n\t\tlistener(this)\n\t}\n\t@Method()\n\tasync edit(editable: boolean): Promise<void> {\n\t\tthis.readonly = !editable\n\t}\n\t@Method()\n\tasync reset(): Promise<void> {\n\t\tthis.year?.reset()\n\t\tthis.month?.reset()\n\t}\n\t@Method()\n\tasync setInitialValue(): Promise<void> {\n\t\tthis.year?.setInitialValue()\n\t\tthis.month?.setInitialValue()\n\t}\n\tinputHandler(event: CustomEvent<Record<string, any>>): void {\n\t\tif (event.target != this.element) {\n\t\t\tevent.stopPropagation()\n\t\t\tconst year = event.detail[`${this.name}-year`]\n\t\t\tconst month = event.detail[`${this.name}-month`]\n\t\t\tif (month && isoly.Date.is(month))\n\t\t\t\tthis.value = isoly.Date.firstOfMonth(month)\n\t\t\telse if (year && isoly.Date.is(year))\n\t\t\t\tthis.value = isoly.Date.firstOfMonth(year)\n\t\t}\n\t}\n\t@Listen(\"smoothlyInputLooks\")\n\tsmoothlyInputLooksHandler(event: CustomEvent<(looks: Looks, color: Color | undefined) => void>): void {\n\t\tif (event.target != this.element) {\n\t\t\tevent.stopPropagation()\n\t\t\tevent.detail(this.looks, this.color)\n\t\t}\n\t}\n\t@Listen(\"smoothlyInputLoad\")\n\tasync smoothlyInputLoadHandler(event: CustomEvent<(parent: unknown) => void>): Promise<void> {\n\t\tif (event.target != this.element)\n\t\t\tevent.stopPropagation()\n\t}\n\n\trender(): VNode | VNode[] {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<smoothly-button\n\t\t\t\t\tsize={\"flexible\"}\n\t\t\t\t\tcolor={this.color}\n\t\t\t\t\tdisabled={this.readonly}\n\t\t\t\t\tonClick={() => this.adjustMonth(-1)}>\n\t\t\t\t\t<smoothly-icon name={\"caret-back-outline\"} size={\"tiny\"} color={this.color} fill={\"default\"} />\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-input-select\n\t\t\t\t\tref={e => (this.year = e)}\n\t\t\t\t\tname={`${this.name}-year`}\n\t\t\t\t\treadonly={this.readonly}\n\t\t\t\t\tchanged={this.changed}\n\t\t\t\t\tmenuHeight=\"5.5items\"\n\t\t\t\t\trequired\n\t\t\t\t\tonSmoothlyInput={e => this.inputHandler(e)}\n\t\t\t\t\tsearchDisabled>\n\t\t\t\t\t<div slot={\"label\"}>\n\t\t\t\t\t\t<slot name={\"year-label\"} />\n\t\t\t\t\t</div>\n\t\t\t\t\t{generate.years(this.value ?? isoly.Date.now()).map(year => (\n\t\t\t\t\t\t<smoothly-item key={year.date} value={year.date} selected={year.selected || this.value == year.date}>\n\t\t\t\t\t\t\t{year.name}\n\t\t\t\t\t\t</smoothly-item>\n\t\t\t\t\t))}\n\t\t\t\t</smoothly-input-select>\n\t\t\t\t<smoothly-input-select\n\t\t\t\t\tref={e => (this.month = e)}\n\t\t\t\t\tname={`${this.name}-month`}\n\t\t\t\t\treadonly={this.readonly}\n\t\t\t\t\tcolor={this.color}\n\t\t\t\t\tlooks={this.looks}\n\t\t\t\t\tchanged={this.changed}\n\t\t\t\t\tmenuHeight=\"5.5items\"\n\t\t\t\t\trequired\n\t\t\t\t\tonSmoothlyInput={e => this.inputHandler(e)}\n\t\t\t\t\tsearchDisabled>\n\t\t\t\t\t<div slot={\"label\"}>\n\t\t\t\t\t\t<slot name={\"month-label\"} />\n\t\t\t\t\t</div>\n\t\t\t\t\t{generate.months(this.value ?? isoly.Date.now()).map(month => (\n\t\t\t\t\t\t<smoothly-item key={month.date} value={month.date} selected={month.selected || this.value == month.date}>\n\t\t\t\t\t\t\t{month.name}\n\t\t\t\t\t\t</smoothly-item>\n\t\t\t\t\t))}\n\t\t\t\t</smoothly-input-select>\n\t\t\t\t<smoothly-button\n\t\t\t\t\tsize={\"flexible\"}\n\t\t\t\t\tcolor={this.color}\n\t\t\t\t\tdisabled={this.readonly}\n\t\t\t\t\tonClick={() => this.adjustMonth(1)}>\n\t\t\t\t\t<smoothly-icon name={\"caret-forward-outline\"} size={\"tiny\"} color={this.color} fill={\"default\"} />\n\t\t\t\t</smoothly-button>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h } from './p-5963f898.js';
|
|
2
2
|
import { d as defineCustomElement$2 } from './p-b1fbd693.js';
|
|
3
|
-
import { d as defineCustomElement$1 } from './p-
|
|
3
|
+
import { d as defineCustomElement$1 } from './p-e584d156.js';
|
|
4
4
|
|
|
5
5
|
const styleCss = ".sc-smoothly-address-display-h{display:block;width:30%}";
|
|
6
6
|
const SmoothlyAddressDisplayStyle0 = styleCss;
|
|
@@ -56,4 +56,4 @@ defineCustomElement();
|
|
|
56
56
|
|
|
57
57
|
export { SmoothlyAddressDisplay as S, defineCustomElement as d };
|
|
58
58
|
|
|
59
|
-
//# sourceMappingURL=p-
|
|
59
|
+
//# sourceMappingURL=p-533b5124.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-533b5124.js","mappings":";;;;AAAA,MAAM,QAAQ,GAAG,yDAAyD,CAAC;AAC3E,qCAAe,QAAQ;;MCeV,sBAAsB;;;;;;;IAGlC,MAAM;QACL,IAAI,IAAI,CAAC,QAAQ,EAAE;YAClB,OAAO;gBACN,eACC,cAAK,IAAI,CAAC,KAAK,CAAC,OAAO,MAAO,EAC9B,sBAAgB,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,aAEjD,EACjB,sBAAgB,IAAI,EAAC,aAAa,EAAC,IAAI,EAAC,KAAK,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,cAEtD,EACjB,sBAAgB,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,WAE7C,EACjB,sBAAgB,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,aAAa,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,kBAE3D,CACZ;aACN,CAAA;SACD;aAAM;YACN,OAAO;gBACN,eACC,cAAK,IAAI,CAAC,KAAK,CAAC,OAAO,MAAO,EAC9B,aAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAK,EAC1B,aAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAK,EAC3B,aAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAK,EACxB,aAAI,IAAI,CAAC,KAAK,CAAC,WAAW,CAAK,CAC1B;aACN,CAAA;SACD;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/address-display/style.css?tag=smoothly-address-display&encapsulation=scoped","src/components/address-display/index.tsx"],"sourcesContent":[":host {\n\tdisplay: block;\n\twidth: 30%;\n}\n","import { Component, h, Prop } from \"@stencil/core\"\nimport * as isoly from \"isoly\"\n\nexport interface address {\n\tallowed?: string\n\tcountryCode: isoly.CountryCode.Alpha2\n\tstreet: string\n\tzipCode: string\n\tcity: string\n}\n\n@Component({\n\ttag: \"smoothly-address-display\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyAddressDisplay {\n\t@Prop() value: address\n\t@Prop() editable: boolean\n\trender() {\n\t\tif (this.editable) {\n\t\t\treturn [\n\t\t\t\t<div>\n\t\t\t\t\t<h4>{this.value.allowed}:</h4>\n\t\t\t\t\t<smoothly-input type=\"text\" name=\"street\" value={this.value.street}>\n\t\t\t\t\t\tStreet\n\t\t\t\t\t</smoothly-input>\n\t\t\t\t\t<smoothly-input type=\"postal-code\" name=\"zip\" value={this.value.zipCode}>\n\t\t\t\t\t\tZipCode\n\t\t\t\t\t</smoothly-input>\n\t\t\t\t\t<smoothly-input type=\"text\" name=\"city\" value={this.value.city}>\n\t\t\t\t\t\tCity\n\t\t\t\t\t</smoothly-input>\n\t\t\t\t\t<smoothly-input type=\"text\" name=\"countryCode\" value={this.value.countryCode}>\n\t\t\t\t\t\tCountryCode\n\t\t\t\t\t</smoothly-input>\n\t\t\t\t</div>,\n\t\t\t]\n\t\t} else {\n\t\t\treturn [\n\t\t\t\t<div>\n\t\t\t\t\t<h4>{this.value.allowed}:</h4>\n\t\t\t\t\t<p>{this.value.street}</p>\n\t\t\t\t\t<p>{this.value.zipCode}</p>\n\t\t\t\t\t<p>{this.value.city}</p>\n\t\t\t\t\t<p>{this.value.countryCode}</p>\n\t\t\t\t</div>,\n\t\t\t]\n\t\t}\n\t}\n}\n"],"version":3}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h } from './p-5963f898.js';
|
|
2
2
|
import { D as Date } from './p-e44d9427.js';
|
|
3
|
-
import { m as month, w as weekdays, d as defineCustomElement$3 } from './p-
|
|
3
|
+
import { m as month, w as weekdays, d as defineCustomElement$3 } from './p-48fcebd3.js';
|
|
4
4
|
import { d as defineCustomElement$5 } from './p-2f39a851.js';
|
|
5
5
|
import { d as defineCustomElement$4 } from './p-b1fbd693.js';
|
|
6
|
-
import { d as defineCustomElement$2 } from './p-
|
|
7
|
-
import { d as defineCustomElement$1 } from './p-
|
|
6
|
+
import { d as defineCustomElement$2 } from './p-d6ba71a4.js';
|
|
7
|
+
import { d as defineCustomElement$1 } from './p-df721dfc.js';
|
|
8
8
|
|
|
9
|
-
const styleCss = ".sc-smoothly-calendar-h{display:block;--other-month-opacity:0.5;
|
|
9
|
+
const styleCss = ".sc-smoothly-calendar-h{display:block;--other-month-opacity:0.5;padding-bottom:1rem;box-shadow:0 0 1px 0px rgb(var(--smoothly-default-contrast))}.sc-smoothly-calendar-h>smoothly-input-month.sc-smoothly-calendar{width:calc(100% - 1em);padding:0.5em 0.5em 0 0.5em}.sc-smoothly-calendar-h>table.sc-smoothly-calendar{table-layout:fixed;width:100%}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>thead.sc-smoothly-calendar>tr.sc-smoothly-calendar>th.sc-smoothly-calendar,.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar{text-align:center;padding:0.5em;min-width:2em;background-color:rgb(var(--smoothly-default-shade));cursor:pointer;user-select:none}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.currentMonth.sc-smoothly-calendar{color:rgb(var(--smoothly-default-contrast))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:not(.currentMonth){color:rgba(var(--smoothly-default-contrast), var(--other-month-opacity))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(6):not(.currentMonth).selected,.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(6):not(.currentMonth).dateRange,.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(7):not(.currentMonth).selected,.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(7):not(.currentMonth).dateRange{color:rgba(var(--smoothly-default-contrast))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(6),.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(7){color:rgb(var(--smoothly-danger-tint))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(6):not(.currentMonth),.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(7):not(.currentMonth){color:rgba(var(--smoothly-danger-tint), var(--other-month-opacity))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:not(.selected,.disable).sc-smoothly-calendar:hover{color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-tint))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.selected.sc-smoothly-calendar{color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-color))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:not(.selected,.dateRange).sc-smoothly-calendar:not(:hover).today{background:rgb(var(--smoothly-medium-tint));color:rgb(var(--smoothly-medium-contrast))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.dateRange.sc-smoothly-calendar{color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-tint))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.disable.sc-smoothly-calendar{cursor:not-allowed;background-color:rgb(var(--smoothly-default-tint), 0.5);color:rgb(var(--smoothly-default-contrast), 0.5)}";
|
|
10
10
|
const SmoothlyCalendarStyle0 = styleCss;
|
|
11
11
|
|
|
12
12
|
const Calendar = proxyCustomElement(class Calendar extends H {
|
|
@@ -153,4 +153,4 @@ defineCustomElement();
|
|
|
153
153
|
|
|
154
154
|
export { Calendar as C, defineCustomElement as d };
|
|
155
155
|
|
|
156
|
-
//# sourceMappingURL=p-
|
|
156
|
+
//# sourceMappingURL=p-553d66f2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-553d66f2.js","mappings":";;;;;;;;AAAA,MAAM,QAAQ,GAAG,oyGAAoyG,CAAC;AACtzG,+BAAe,QAAQ;;MCQV,QAAQ;;;;;;;;;QAwBZ,iBAAY,GAAG,CAAC,CAAA;;qBApBe,IAAI,CAAC,GAAG,EAAE;;;;;;;;IAajD,OAAO,CAAC,IAAU;QACjB,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KACnC;IAED,KAAK,CAAC,IAAU;QACf,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KACjC;IAEO,OAAO,CAAC,IAAU;QACzB,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,EAAE,CAAA;QAClD,IAAI,CAAC,YAAY,IAAI,CAAC,CAAA;QACtB,IAAI,IAAI,CAAC,WAAW,EAAE;YACrB,IAAI,IAAI,CAAC,YAAY,GAAG,CAAC,IAAI,CAAC;gBAC7B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAA;iBAC1C;gBACJ,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,GAAG,IAAI,CAAC,KAAK;oBAClC,IAAI,CAAC,GAAG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AAW;0BACb,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,IAAI,IAAI;8BACrC,CAAC,UAAU,CAAC;8BACZ,IAAI,KAAK,MAAA,IAAI,CAAC,KAAK,mCAAI,EAAE,CAAC,IAAI,IAAI,KAAK,MAAA,IAAI,CAAC,GAAG,mCAAI,EAAE,CAAC;kCACtD,CAAC,WAAW,CAAC;kCACb,EAAE;0BACH,EAAE,CACL;yBACA,MAAM,CAAC,IAAI,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;yBAChG,IAAI,CAAC,GAAG,CAAC,IACV,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAClB,EACL;aAAA,CAAC,CACE,CACL,CAAC,CACK;SACR,CAAA;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["generate.weekdays","generate.month"],"sources":["src/components/calendar/style.css?tag=smoothly-calendar&encapsulation=scoped","src/components/calendar/index.tsx"],"sourcesContent":[":host {\n\tdisplay: block;\n\t--other-month-opacity: 0.5;\n\tpadding-bottom: 1rem;\n\tbox-shadow: 0 0 1px 0px rgb(var(--smoothly-default-contrast));\n}\n\n:host>smoothly-input-month {\n\twidth: calc(100% - 1em);\n\tpadding: 0.5em 0.5em 0 0.5em;\n}\n\n:host>table {\n\ttable-layout: fixed;\n\twidth: 100%;\n}\n\n:host>table>thead>tr>th,\n:host>table>tr>td {\n\ttext-align: center;\n\tpadding: 0.5em;\n\tmin-width: 2em;\n\tbackground-color: rgb(var(--smoothly-default-shade));\n\tcursor: pointer;\n\tuser-select: none;\n}\n\n:host>table>tr>td.currentMonth {\n\tcolor: rgb(var(--smoothly-default-contrast));\n}\n\n:host>table>tr>td:not(.currentMonth) {\n\tcolor: rgba(var(--smoothly-default-contrast), var(--other-month-opacity));\n}\n\n:host>table>tr>td:nth-child(6):not(.currentMonth).selected,\n:host>table>tr>td:nth-child(6):not(.currentMonth).dateRange,\n:host>table>tr>td:nth-child(7):not(.currentMonth).selected,\n:host>table>tr>td:nth-child(7):not(.currentMonth).dateRange {\n\tcolor: rgba(var(--smoothly-default-contrast));\n}\n\n:host>table>tr>td:nth-child(6),\n:host>table>tr>td:nth-child(7) {\n\tcolor: rgb(var(--smoothly-danger-tint));\n}\n\n:host>table>tr>td:nth-child(6):not(.currentMonth),\n:host>table>tr>td:nth-child(7):not(.currentMonth) {\n\tcolor: rgba(var(--smoothly-danger-tint), var(--other-month-opacity));\n}\n\n:host>table>tr>td:not(.selected, .disable):hover {\n\tcolor: rgb(var(--smoothly-primary-contrast));\n\tbackground: rgb(var(--smoothly-primary-tint));\n}\n\n:host>table>tr>td.selected {\n\tcolor: rgb(var(--smoothly-primary-contrast));\n\tbackground: rgb(var(--smoothly-primary-color));\n}\n\n:host>table>tr>td:not(.selected, .dateRange):not(:hover).today {\n\tbackground: rgb(var(--smoothly-medium-tint));\n\tcolor: rgb(var(--smoothly-medium-contrast));\n}\n\n:host>table>tr>td.dateRange {\n\tcolor: rgb(var(--smoothly-primary-contrast));\n\tbackground: rgb(var(--smoothly-primary-tint));\n}\n\n:host>table>tr>td.disable {\n\tcursor: not-allowed;\n\tbackground-color: rgb(var(--smoothly-default-tint), 0.5);\n\tcolor: rgb(var(--smoothly-default-contrast), 0.5);\n}\n","import { Component, Element, Event, EventEmitter, h, Prop, State, Watch } from \"@stencil/core\"\nimport { Date, DateRange } from \"isoly\"\nimport * as generate from \"./generate\"\n\n@Component({\n\ttag: \"smoothly-calendar\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class Calendar {\n\tprivate frozenDate: Date\n\t@Element() element: HTMLTableRowElement\n\t@Prop({ mutable: true }) month?: Date\n\t@Prop({ mutable: true }) value: Date = Date.now()\n\t@Prop({ mutable: true }) start?: Date\n\t@Prop({ mutable: true }) end?: Date\n\t@Prop({ mutable: true }) max: Date\n\t@Prop({ mutable: true }) min: Date\n\t@Prop({ reflect: true }) doubleInput: boolean\n\t@Event() smoothlyValueChange: EventEmitter<Date>\n\t@Event() smoothlyStartChange: EventEmitter<Date>\n\t@Event() smoothlyEndChange: EventEmitter<Date>\n\t@Event() smoothlyDateSet: EventEmitter<Date>\n\t@Event() smoothlyDateRangeSet: EventEmitter<DateRange>\n\t@State() firstSelected: boolean\n\t@Watch(\"start\")\n\tonStart(next: Date) {\n\t\tthis.smoothlyStartChange.emit(next)\n\t}\n\t@Watch(\"end\")\n\tonEnd(next: Date) {\n\t\tthis.smoothlyEndChange.emit(next)\n\t}\n\tprivate clickCounter = 0\n\tprivate onClick(date: Date) {\n\t\tthis.smoothlyValueChange.emit((this.value = date))\n\t\tthis.clickCounter += 1\n\t\tif (this.doubleInput) {\n\t\t\tif (this.clickCounter % 2 == 1)\n\t\t\t\tthis.start = this.end = this.frozenDate = date\n\t\t\telse {\n\t\t\t\tif (this.start && date > this.start)\n\t\t\t\t\tthis.end = date\n\t\t\t\telse\n\t\t\t\t\tthis.start = date\n\t\t\t}\n\t\t}\n\t\t!this.doubleInput && this.smoothlyDateSet.emit(this.value)\n\t\tthis.doubleInput &&\n\t\t\tthis.clickCounter % 2 == 0 &&\n\t\t\tthis.start &&\n\t\t\tthis.end &&\n\t\t\tthis.smoothlyDateRangeSet.emit({ start: this.start, end: this.end })\n\t}\n\tprivate onHover(date: Date) {\n\t\tif (this.doubleInput && this.clickCounter % 2 == 1) {\n\t\t\tif (date < this.frozenDate) {\n\t\t\t\tthis.start = date\n\t\t\t\tthis.end = this.frozenDate\n\t\t\t} else {\n\t\t\t\tthis.start = this.frozenDate\n\t\t\t\tthis.end = date\n\t\t\t}\n\t\t}\n\t}\n\trender() {\n\t\treturn [\n\t\t\t<smoothly-input-month\n\t\t\t\tname=\"month\"\n\t\t\t\tvalue={this.month ?? this.value}\n\t\t\t\tnext\n\t\t\t\tprevious\n\t\t\t\tonSmoothlyInput={e => {\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\"month\" in e.detail && typeof e.detail.month == \"string\" && (this.month = e.detail.month)\n\t\t\t\t}}>\n\t\t\t\t<div slot={\"year-label\"}>\n\t\t\t\t\t<slot name={\"year-label\"} />\n\t\t\t\t</div>\n\t\t\t\t<div slot={\"month-label\"}>\n\t\t\t\t\t<slot name={\"month-label\"} />\n\t\t\t\t</div>\n\t\t\t</smoothly-input-month>,\n\t\t\t<table>\n\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t{generate.weekdays().map(day => (\n\t\t\t\t\t\t\t<th>{day}</th>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t{generate.month(this.month ?? this.value).map(week => (\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t{week.map(date => (\n\t\t\t\t\t\t\t<td\n\t\t\t\t\t\t\t\ttabindex={1}\n\t\t\t\t\t\t\t\tonMouseOver={() => {\n\t\t\t\t\t\t\t\t\t!this.doubleInput && (this.min || this.max) && (date < this.min || date > this.max)\n\t\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t\t: this.onHover(date)\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\t\t(this.min || this.max) && (date < this.min || date > this.max) ? undefined : () => this.onClick(date)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tclass={(date == this.value ? [\"selected\"] : [])\n\t\t\t\t\t\t\t\t\t.concat(\n\t\t\t\t\t\t\t\t\t\t...(date == Date.now() ? [\"today\"] : []),\n\t\t\t\t\t\t\t\t\t\tDate.firstOfMonth(this.month ?? this.value) == Date.firstOfMonth(date) ? [\"currentMonth\"] : [],\n\t\t\t\t\t\t\t\t\t\tthis.doubleInput\n\t\t\t\t\t\t\t\t\t\t\t? this.start == date || this.end == date\n\t\t\t\t\t\t\t\t\t\t\t\t? [\"selected\"]\n\t\t\t\t\t\t\t\t\t\t\t\t: date >= (this.start ?? \"\") && date <= (this.end ?? \"\")\n\t\t\t\t\t\t\t\t\t\t\t\t? [\"dateRange\"]\n\t\t\t\t\t\t\t\t\t\t\t\t: []\n\t\t\t\t\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t.concat(...(this.min || this.max ? (date < this.min || date > this.max ? [\"disable\"] : []) : \"\"))\n\t\t\t\t\t\t\t\t\t.join(\" \")}>\n\t\t\t\t\t\t\t\t{date.substring(8, 10)}\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</tr>\n\t\t\t\t))}\n\t\t\t</table>,\n\t\t]\n\t}\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-5963f898.js';
|
|
2
2
|
import { p as parse } from './p-caf09da9.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './p-b1fbd693.js';
|
|
4
|
-
import { d as defineCustomElement$1 } from './p-
|
|
4
|
+
import { d as defineCustomElement$1 } from './p-e584d156.js';
|
|
5
5
|
|
|
6
6
|
const styleCss = ".sc-smoothly-filter-field-h{flex-grow:5}";
|
|
7
7
|
const SmoothlyFilterFieldStyle0 = styleCss;
|
|
@@ -61,4 +61,4 @@ defineCustomElement();
|
|
|
61
61
|
|
|
62
62
|
export { SmoothlyFilterField as S, defineCustomElement as d };
|
|
63
63
|
|
|
64
|
-
//# sourceMappingURL=p-
|
|
64
|
+
//# sourceMappingURL=p-59c5dec0.js.map
|