smoothly 1.98.0 → 1.100.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/loader.cjs.js +1 -1
- package/dist/cjs/smoothly-app_103.cjs.entry.js +30 -10
- package/dist/cjs/smoothly-app_103.cjs.entry.js.map +1 -1
- package/dist/cjs/smoothly.cjs.js +1 -1
- package/dist/collection/components/input/checkbox/style.css +1 -0
- package/dist/collection/components/input/color/style.css +1 -1
- package/dist/collection/components/input/date/range/style.css +1 -1
- package/dist/collection/components/input/date/style.css +1 -1
- package/dist/collection/components/input/date/time/style.css +1 -1
- package/dist/collection/components/input/select/style.css +1 -1
- package/dist/collection/components/modal/style.css +1 -1
- package/dist/collection/components/table/head/index.js +23 -2
- package/dist/collection/components/table/head/index.js.map +1 -1
- package/dist/collection/components/table/head/style.css +2 -2
- package/dist/collection/components/table/style.css +0 -10
- package/dist/components/{p-c0073997.js → p-064f3907.js} +2 -2
- package/dist/components/{p-c0073997.js.map → p-064f3907.js.map} +1 -1
- package/dist/components/{p-dd423995.js → p-12f62e4d.js} +5 -5
- package/dist/components/{p-dd423995.js.map → p-12f62e4d.js.map} +1 -1
- package/dist/components/{p-5b65866f.js → p-14e31e4a.js} +3 -3
- package/dist/components/{p-5b65866f.js.map → p-14e31e4a.js.map} +1 -1
- package/dist/components/{p-2b0bbc2a.js → p-1904abe1.js} +2 -2
- package/dist/components/{p-2b0bbc2a.js.map → p-1904abe1.js.map} +1 -1
- package/dist/components/{p-7cc6e1f0.js → p-30f4e440.js} +3 -3
- package/dist/components/{p-7cc6e1f0.js.map → p-30f4e440.js.map} +1 -1
- package/dist/components/{p-c23cde86.js → p-31603adf.js} +3 -3
- package/dist/components/{p-c23cde86.js.map → p-31603adf.js.map} +1 -1
- package/dist/components/{p-c1918e49.js → p-346ba422.js} +2 -2
- package/dist/components/p-346ba422.js.map +1 -0
- package/dist/components/{p-64e731a9.js → p-35b09ed4.js} +6 -6
- package/dist/components/{p-64e731a9.js.map → p-35b09ed4.js.map} +1 -1
- package/dist/components/{p-62af2a18.js → p-3abf736a.js} +2 -2
- package/dist/components/{p-62af2a18.js.map → p-3abf736a.js.map} +1 -1
- package/dist/components/{p-29853f1a.js → p-4051f859.js} +25 -4
- package/dist/components/p-4051f859.js.map +1 -0
- package/dist/components/{p-7b240f39.js → p-4441247b.js} +2 -2
- package/dist/components/{p-7b240f39.js.map → p-4441247b.js.map} +1 -1
- package/dist/components/{p-6014eafb.js → p-4d3d5d0b.js} +3 -3
- package/dist/components/{p-6014eafb.js.map → p-4d3d5d0b.js.map} +1 -1
- package/dist/components/{p-3a2d2f1d.js → p-581d3377.js} +5 -5
- package/dist/components/{p-3a2d2f1d.js.map → p-581d3377.js.map} +1 -1
- package/dist/components/{p-a1a35d69.js → p-658906f0.js} +3 -3
- package/dist/components/{p-a1a35d69.js.map → p-658906f0.js.map} +1 -1
- package/dist/components/{p-ea32c95d.js → p-6959d76f.js} +17 -17
- package/dist/components/{p-ea32c95d.js.map → p-6959d76f.js.map} +1 -1
- package/dist/components/{p-f9dbc6a8.js → p-6aaf93a3.js} +4 -4
- package/dist/components/{p-f9dbc6a8.js.map → p-6aaf93a3.js.map} +1 -1
- package/dist/components/{p-b9b392d9.js → p-6e8454e3.js} +3 -3
- package/dist/components/{p-b9b392d9.js.map → p-6e8454e3.js.map} +1 -1
- package/dist/components/{p-d507ffdf.js → p-7b6467fd.js} +5 -5
- package/dist/components/{p-d507ffdf.js.map → p-7b6467fd.js.map} +1 -1
- package/dist/components/{p-b1988646.js → p-88d9faa4.js} +4 -4
- package/dist/components/{p-b1988646.js.map → p-88d9faa4.js.map} +1 -1
- package/dist/components/{p-ed076e45.js → p-90cf2f0e.js} +2 -2
- package/dist/components/p-90cf2f0e.js.map +1 -0
- package/dist/components/{p-4f145ff6.js → p-93141817.js} +7 -7
- package/dist/components/{p-4f145ff6.js.map → p-93141817.js.map} +1 -1
- package/dist/components/{p-efd84dbf.js → p-96fff9ba.js} +5 -5
- package/dist/components/{p-efd84dbf.js.map → p-96fff9ba.js.map} +1 -1
- package/dist/components/{p-6765b081.js → p-a3c25ce5.js} +5 -5
- package/dist/components/{p-6765b081.js.map → p-a3c25ce5.js.map} +1 -1
- package/dist/components/{p-f316d417.js → p-a8f5826f.js} +5 -5
- package/dist/components/{p-f316d417.js.map → p-a8f5826f.js.map} +1 -1
- package/dist/components/{p-b5193b68.js → p-aff94100.js} +2 -2
- package/dist/components/{p-b5193b68.js.map → p-aff94100.js.map} +1 -1
- package/dist/components/{p-3592f43e.js → p-b494ebd3.js} +5 -5
- package/dist/components/{p-3592f43e.js.map → p-b494ebd3.js.map} +1 -1
- package/dist/components/{p-36889973.js → p-bf485157.js} +9 -9
- package/dist/components/{p-36889973.js.map → p-bf485157.js.map} +1 -1
- package/dist/components/{p-ba6ea28b.js → p-c172bb64.js} +2 -2
- package/dist/components/{p-ba6ea28b.js.map → p-c172bb64.js.map} +1 -1
- package/dist/components/{p-c41f5e08.js → p-c2fb9b51.js} +3 -3
- package/dist/components/{p-c41f5e08.js.map → p-c2fb9b51.js.map} +1 -1
- package/dist/components/{p-c2d6384a.js → p-c4637f18.js} +5 -5
- package/dist/components/{p-c2d6384a.js.map → p-c4637f18.js.map} +1 -1
- package/dist/components/{p-a1075237.js → p-d4f3568a.js} +9 -9
- package/dist/components/{p-a1075237.js.map → p-d4f3568a.js.map} +1 -1
- package/dist/components/{p-efd2f358.js → p-dea4659e.js} +2 -2
- package/dist/components/p-dea4659e.js.map +1 -0
- package/dist/components/{p-9166e0af.js → p-e04a506b.js} +4 -4
- package/dist/components/{p-9166e0af.js.map → p-e04a506b.js.map} +1 -1
- package/dist/components/{p-827edd31.js → p-e32d9cd5.js} +2 -2
- package/dist/components/{p-827edd31.js.map → p-e32d9cd5.js.map} +1 -1
- package/dist/components/{p-6a24968b.js → p-e3486f48.js} +3 -3
- package/dist/components/{p-6a24968b.js.map → p-e3486f48.js.map} +1 -1
- package/dist/components/{p-024a7630.js → p-efce730e.js} +9 -9
- package/dist/components/{p-024a7630.js.map → p-efce730e.js.map} +1 -1
- package/dist/components/{p-9204948c.js → p-f2f0d309.js} +3 -3
- package/dist/components/{p-9204948c.js.map → p-f2f0d309.js.map} +1 -1
- package/dist/components/{p-250c5656.js → p-f55ddc88.js} +12 -12
- package/dist/components/{p-250c5656.js.map → p-f55ddc88.js.map} +1 -1
- package/dist/components/{p-2e33ff08.js → p-fb348bb4.js} +13 -13
- package/dist/components/{p-2e33ff08.js.map → p-fb348bb4.js.map} +1 -1
- package/dist/components/{p-7a5f9284.js → p-fdf5432e.js} +2 -2
- package/dist/components/{p-7a5f9284.js.map → p-fdf5432e.js.map} +1 -1
- package/dist/components/smoothly-app-demo.js +40 -40
- package/dist/components/smoothly-button-demo-standard.js +1 -1
- package/dist/components/smoothly-button-demo.js +1 -1
- package/dist/components/smoothly-calendar.js +1 -1
- package/dist/components/smoothly-dialog-demo.js +1 -1
- package/dist/components/smoothly-filter-select.js +1 -1
- package/dist/components/smoothly-form-demo-all.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-pet.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 +7 -7
- package/dist/components/smoothly-input-checkbox.js +1 -1
- package/dist/components/smoothly-input-color-demo.js +1 -1
- package/dist/components/smoothly-input-color.js +1 -1
- package/dist/components/smoothly-input-date-demo.js +1 -1
- package/dist/components/smoothly-input-date-range.js +1 -1
- package/dist/components/smoothly-input-date-time.js +1 -1
- package/dist/components/smoothly-input-date.js +1 -1
- package/dist/components/smoothly-input-demo-standard.js +1 -1
- package/dist/components/smoothly-input-demo-user-input.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-modal.js +1 -1
- package/dist/components/smoothly-table-demo-colspan.js +1 -1
- package/dist/components/smoothly-table-demo-filler-row.js +1 -1
- package/dist/components/smoothly-table-demo-filtered.js +1 -1
- package/dist/components/smoothly-table-demo-group.js +1 -1
- package/dist/components/smoothly-table-demo-nested-no-cell-inner.js +1 -1
- package/dist/components/smoothly-table-demo-nested-no-cell.js +1 -1
- package/dist/components/smoothly-table-demo-simple.js +1 -1
- package/dist/components/smoothly-table-demo.js +1 -1
- package/dist/components/smoothly-table-head.js +1 -1
- package/dist/components/smoothly-table.js +1 -1
- package/dist/components/smoothly-theme-demo.js +1 -1
- package/dist/components/smoothly-theme-picker.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/smoothly-app_103.entry.js +30 -10
- package/dist/esm/smoothly-app_103.entry.js.map +1 -1
- package/dist/esm/smoothly.js +1 -1
- package/dist/smoothly/{p-bfaa89cd.entry.js → p-3b24fabe.entry.js} +2 -2
- package/dist/smoothly/p-3b24fabe.entry.js.map +1 -0
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/smoothly/smoothly.esm.js.map +1 -1
- package/dist/types/components/table/head/index.d.ts +3 -1
- package/package.json +1 -1
- package/dist/components/p-29853f1a.js.map +0 -1
- package/dist/components/p-c1918e49.js.map +0 -1
- package/dist/components/p-ed076e45.js.map +0 -1
- package/dist/components/p-efd2f358.js.map +0 -1
- package/dist/smoothly/p-bfaa89cd.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-1904abe1.js","mappings":";;;;;AAAA,MAAM,QAAQ,GAAG,EAAE,CAAC;AACpB,kCAAe,QAAQ;;MCMV,mBAAmB;;;;uBACb,cAAc;;IAChC,MAAM;QACL,QACC,EAAC,IAAI,uDACJ,8EACC,IAAI,EAAC,OAAO,EACZ,KAAK,EAAC,QAAQ,EACd,eAAe,EAAE,CAAC;gBACjB,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC,CAAA;gBAC1D,IAAI,OAAO,YAAY,eAAe,IAAI,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,QAAQ;oBAC1E,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAA;aAC9B,IACD,8DAAO,IAAI,EAAC,OAAO,mBAAqB,EACxC,8DAAQ,CACe,CAClB,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/theme/picker/style.css?tag=smoothly-theme-picker&encapsulation=scoped","src/components/theme/picker/index.tsx"],"sourcesContent":["","import { Component, h, Host, Prop } from \"@stencil/core\"\n\n@Component({\n\ttag: \"smoothly-theme-picker\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyThemePicker {\n\t@Prop() element = \"smoothly-css\"\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<smoothly-input-select\n\t\t\t\t\tname=\"theme\"\n\t\t\t\t\tlooks=\"border\"\n\t\t\t\t\tonSmoothlyInput={e => {\n\t\t\t\t\t\tconst element = document.querySelector(`#${this.element}`)\n\t\t\t\t\t\tif (element instanceof HTMLLinkElement && typeof e.detail.theme == \"string\")\n\t\t\t\t\t\t\telement.href = e.detail.theme\n\t\t\t\t\t}}>\n\t\t\t\t\t<label slot=\"label\">Select theme</label>\n\t\t\t\t\t<slot />\n\t\t\t\t</smoothly-input-select>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, F as Fragment } from './p-f765921a.js';
|
|
2
2
|
import { D as Date } from './p-390767c7.js';
|
|
3
|
-
import { w as weekdays, m as month, d as defineCustomElement$3 } from './p-
|
|
3
|
+
import { w as weekdays, m as month, d as defineCustomElement$3 } from './p-c172bb64.js';
|
|
4
4
|
import { d as defineCustomElement$4 } from './p-604f869e.js';
|
|
5
|
-
import { d as defineCustomElement$2 } from './p-
|
|
5
|
+
import { d as defineCustomElement$2 } from './p-4441247b.js';
|
|
6
6
|
import { d as defineCustomElement$1 } from './p-1e46b981.js';
|
|
7
7
|
|
|
8
8
|
const styleCss = ".sc-smoothly-calendar-h{display:block;--other-month-opacity:0.5;padding:0.5em;border:1px solid rgb(var(--smoothly-input-border))}.sc-smoothly-calendar-h>smoothly-input-month.sc-smoothly-calendar{padding: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;box-sizing:border-box;background-color:rgb(var(--smoothly-input-background));color:rgb(var(--smoothly-input-foreground));-webkit-user-select:none;user-select:none}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar{position:relative;cursor:pointer}.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-calendar-weekend-foreground, var(--smoothly-danger-color)))}.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-calendar-weekend-foreground, var(--smoothly-danger-color)), 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.today.sc-smoothly-calendar::before{content:\"\";inset:2px;position:absolute;border:1px solid currentColor}.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;opacity:0.5}";
|
|
@@ -160,4 +160,4 @@ defineCustomElement();
|
|
|
160
160
|
|
|
161
161
|
export { Calendar as C, defineCustomElement as d };
|
|
162
162
|
|
|
163
|
-
//# sourceMappingURL=p-
|
|
163
|
+
//# sourceMappingURL=p-30f4e440.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-7cc6e1f0.js","mappings":";;;;;;;AAAA,MAAM,QAAQ,GAAG,g4GAAg4G,CAAC;AACl5G,+BAAe,QAAQ;;MCQV,QAAQ;;;;;;QAwCZ,iBAAY,GAAG,CAAC,CAAA;;;;;;;;;;;IAzBxB,iBAAiB;QAChB,IAAI,CAAC,OAAO,EAAE,CAAA;QACd,IAAI,CAAC,KAAK,EAAE,CAAA;KACZ;IAED,OAAO;QACN,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,KAAK,CAAA;KAC/B;IAED,KAAK;QACJ,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAA;KAC3B;IAED,MAAM,MAAM,CAAC,SAAqC;;QACjD,MAAM,IAAI,GAAGA,IAAU,CAAC,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;cACzC,SAAS,CAAC,CAAC;cACX,MAAA,MAAA,IAAI,CAAC,KAAK,0CAAE,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,mCAAIA,IAAU,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QAClE,MAAM,GAAG,GAAGA,IAAU,CAAC,KAAK,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;cACzC,SAAS,CAAC,CAAC;cACX,MAAA,MAAA,IAAI,CAAC,KAAK,0CAAE,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,mCAAIA,IAAU,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAA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CAAC,CACK,CACE,EACX;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["isoly.Date","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: 0.5em;\n\tborder: 1px solid rgb(var(--smoothly-input-border));\n}\n\n:host>smoothly-input-month {\n\tpadding: 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\tbox-sizing: border-box;\n\tbackground-color: rgb(var(--smoothly-input-background));\n\tcolor: rgb(var(--smoothly-input-foreground));\n\t-webkit-user-select: none;\n\tuser-select: none;\n}\n:host>table>tr>td {\n\tposition: relative;\n\tcursor: pointer;\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-calendar-weekend-foreground, var(--smoothly-danger-color)));\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-calendar-weekend-foreground, var(--smoothly-danger-color)), 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.today::before {\n\tcontent: \"\";\n\tinset: 2px;\n\tposition: absolute;\n\tborder: 1px solid currentColor;\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\topacity: 0.5;\n}\n","import { Component, Element, Event, EventEmitter, Fragment, h, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { isoly } 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: isoly.Date\n\t@Element() element: HTMLTableRowElement\n\t@Prop({ mutable: true }) month?: isoly.Date\n\t@Prop({ mutable: true }) value?: isoly.Date\n\t@Prop() start?: isoly.Date\n\t@Prop() end?: isoly.Date\n\t@Prop({ mutable: true }) max: isoly.Date\n\t@Prop({ mutable: true }) min: isoly.Date\n\t@Prop({ reflect: true }) doubleInput: boolean\n\t@State() startInternal?: isoly.Date\n\t@State() endInternal?: isoly.Date\n\t@Event() smoothlyDateSet: EventEmitter<isoly.Date>\n\t@Event() smoothlyDateRangeSet: EventEmitter<isoly.DateRange>\n\n\tcomponentWillLoad() {\n\t\tthis.onStart()\n\t\tthis.onEnd()\n\t}\n\t@Watch(\"start\")\n\tonStart() {\n\t\tthis.startInternal = this.start\n\t}\n\t@Watch(\"end\")\n\tonEnd() {\n\t\tthis.endInternal = this.end\n\t}\n\t@Method()\n\tasync jumpTo(yearMonth: { Y?: string; M?: string }) {\n\t\tconst year = isoly.Date.Year.is(yearMonth.Y)\n\t\t\t? yearMonth.Y\n\t\t\t: this.month?.substring(0, 4) ?? isoly.Date.now().substring(0, 4)\n\t\tconst mon = isoly.Date.Month.is(yearMonth.M)\n\t\t\t? yearMonth.M\n\t\t\t: this.month?.substring(5, 7) ?? isoly.Date.now().substring(5, 7)\n\t\tconst date = `${year}-${mon}-01`\n\t\tif (isoly.Date.is(date))\n\t\t\tthis.month = date\n\t}\n\n\tprivate clickCounter = 0\n\tprivate onClick(date: isoly.Date) {\n\t\tthis.value = date\n\t\tthis.smoothlyDateSet.emit(this.value)\n\t}\n\tprivate onClickDoubleInput(date: isoly.Date) {\n\t\tthis.clickCounter += 1\n\t\tif (this.clickCounter % 2 == 1) {\n\t\t\tthis.startInternal = this.endInternal = this.frozenDate = date\n\t\t} else {\n\t\t\tconst start = this.startInternal! > date ? date : this.startInternal\n\t\t\tconst end = this.endInternal! < date ? date : this.endInternal\n\t\t\tthis.startInternal = start\n\t\t\tthis.endInternal = end\n\t\t}\n\t\tthis.clickCounter % 2 == 0 &&\n\t\t\tthis.startInternal &&\n\t\t\tthis.endInternal &&\n\t\t\tthis.smoothlyDateRangeSet.emit({ start: this.startInternal, end: this.endInternal })\n\t}\n\tprivate onHover(date: isoly.Date) {\n\t\tif (this.doubleInput && this.clickCounter % 2 == 1) {\n\t\t\tif (date < this.frozenDate) {\n\t\t\t\tthis.startInternal = date\n\t\t\t\tthis.endInternal = this.frozenDate\n\t\t\t} else {\n\t\t\t\tthis.startInternal = this.frozenDate\n\t\t\t\tthis.endInternal = date\n\t\t\t}\n\t\t}\n\t}\n\tprivate withinLimit(date: isoly.Date) {\n\t\treturn (!this.min || date >= this.min) && (!this.max || date <= this.max)\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<Fragment>\n\t\t\t\t<smoothly-input-month\n\t\t\t\t\tname=\"month\"\n\t\t\t\t\tvalue={this.month ?? this.value}\n\t\t\t\t\tmin={this.min}\n\t\t\t\t\tmax={this.max}\n\t\t\t\t\tinCalendar\n\t\t\t\t\tnext\n\t\t\t\t\tprevious\n\t\t\t\t\tshowLabel={false}\n\t\t\t\t\tonSmoothlyInput={e => {\n\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\"month\" in e.detail && typeof e.detail.month == \"string\" && (this.month = e.detail.month)\n\t\t\t\t\t}}\n\t\t\t\t\tonSmoothlyUserInput={e => e.stopPropagation()}>\n\t\t\t\t\t<div slot={\"year-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<div slot={\"month-label\"}>\n\t\t\t\t\t\t<slot name={\"month-label\"} />\n\t\t\t\t\t</div>\n\t\t\t\t</smoothly-input-month>\n\t\t\t\t<table>\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t{generate.weekdays().map(day => (\n\t\t\t\t\t\t\t\t<th>{day}</th>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t{generate.month(this.month ?? this.value ?? isoly.Date.now()).map(week => (\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t{week.map(date => (\n\t\t\t\t\t\t\t\t<td\n\t\t\t\t\t\t\t\t\ttabindex={1}\n\t\t\t\t\t\t\t\t\tonMouseOver={this.withinLimit(date) ? () => this.onHover(date) : undefined}\n\t\t\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\t\t\tthis.withinLimit(date)\n\t\t\t\t\t\t\t\t\t\t\t? () => (this.doubleInput ? this.onClickDoubleInput(date) : this.onClick(date))\n\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\tselected:\n\t\t\t\t\t\t\t\t\t\t\tdate == this.value ||\n\t\t\t\t\t\t\t\t\t\t\t(this.doubleInput && (date == this.startInternal || date == this.endInternal)),\n\t\t\t\t\t\t\t\t\t\ttoday: date == isoly.Date.now(),\n\t\t\t\t\t\t\t\t\t\tcurrentMonth:\n\t\t\t\t\t\t\t\t\t\t\tisoly.Date.firstOfMonth(this.month ?? this.value ?? isoly.Date.now()) ==\n\t\t\t\t\t\t\t\t\t\t\tisoly.Date.firstOfMonth(date),\n\t\t\t\t\t\t\t\t\t\tdateRange: this.doubleInput && date > (this.startInternal ?? \"\") && date < (this.endInternal ?? \"\"),\n\t\t\t\t\t\t\t\t\t\tdisable: !this.withinLimit(date),\n\t\t\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t\t\t{date.substring(8, 10)}\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t))}\n\t\t\t\t</table>\n\t\t\t</Fragment>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-30f4e440.js","mappings":";;;;;;;AAAA,MAAM,QAAQ,GAAG,g4GAAg4G,CAAC;AACl5G,+BAAe,QAAQ;;MCQV,QAAQ;;;;;;QAwCZ,iBAAY,GAAG,CAAC,CAAA;;;;;;;;;;;IAzBxB,iBAAiB;QAChB,IAAI,CAAC,OAAO,EAAE,CAAA;QACd,IAAI,CAAC,KAAK,EAAE,CAAA;KACZ;IAED,OAAO;QACN,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,KAAK,CAAA;KAC/B;IAED,KAAK;QACJ,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAA;KAC3B;IAED,MAAM,MAAM,CAAC,SAAqC;;QACjD,MAAM,IAAI,GAAGA,IAAU,CAAC,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;cACzC,SAAS,CAAC,CAAC;cACX,MAAA,MAAA,IAAI,CAAC,KAAK,0CAAE,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,mCAAIA,IAAU,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QAClE,MAAM,GAAG,GAAGA,IAAU,CAAC,KAAK,CA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AAC,IAAI,IAAI,IAAI,MAAA,IAAI,CAAC,WAAW,mCAAI,EAAE,CAAC;oBACnG,OAAO,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;iBAChC,IACA,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAClB,EACL;SAAA,CAAC,CACE,CACL,CAAC,CACK,CACE,EACX;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["isoly.Date","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: 0.5em;\n\tborder: 1px solid rgb(var(--smoothly-input-border));\n}\n\n:host>smoothly-input-month {\n\tpadding: 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\tbox-sizing: border-box;\n\tbackground-color: rgb(var(--smoothly-input-background));\n\tcolor: rgb(var(--smoothly-input-foreground));\n\t-webkit-user-select: none;\n\tuser-select: none;\n}\n:host>table>tr>td {\n\tposition: relative;\n\tcursor: pointer;\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-calendar-weekend-foreground, var(--smoothly-danger-color)));\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-calendar-weekend-foreground, var(--smoothly-danger-color)), 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.today::before {\n\tcontent: \"\";\n\tinset: 2px;\n\tposition: absolute;\n\tborder: 1px solid currentColor;\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\topacity: 0.5;\n}\n","import { Component, Element, Event, EventEmitter, Fragment, h, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { isoly } 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: isoly.Date\n\t@Element() element: HTMLTableRowElement\n\t@Prop({ mutable: true }) month?: isoly.Date\n\t@Prop({ mutable: true }) value?: isoly.Date\n\t@Prop() start?: isoly.Date\n\t@Prop() end?: isoly.Date\n\t@Prop({ mutable: true }) max: isoly.Date\n\t@Prop({ mutable: true }) min: isoly.Date\n\t@Prop({ reflect: true }) doubleInput: boolean\n\t@State() startInternal?: isoly.Date\n\t@State() endInternal?: isoly.Date\n\t@Event() smoothlyDateSet: EventEmitter<isoly.Date>\n\t@Event() smoothlyDateRangeSet: EventEmitter<isoly.DateRange>\n\n\tcomponentWillLoad() {\n\t\tthis.onStart()\n\t\tthis.onEnd()\n\t}\n\t@Watch(\"start\")\n\tonStart() {\n\t\tthis.startInternal = this.start\n\t}\n\t@Watch(\"end\")\n\tonEnd() {\n\t\tthis.endInternal = this.end\n\t}\n\t@Method()\n\tasync jumpTo(yearMonth: { Y?: string; M?: string }) {\n\t\tconst year = isoly.Date.Year.is(yearMonth.Y)\n\t\t\t? yearMonth.Y\n\t\t\t: this.month?.substring(0, 4) ?? isoly.Date.now().substring(0, 4)\n\t\tconst mon = isoly.Date.Month.is(yearMonth.M)\n\t\t\t? yearMonth.M\n\t\t\t: this.month?.substring(5, 7) ?? isoly.Date.now().substring(5, 7)\n\t\tconst date = `${year}-${mon}-01`\n\t\tif (isoly.Date.is(date))\n\t\t\tthis.month = date\n\t}\n\n\tprivate clickCounter = 0\n\tprivate onClick(date: isoly.Date) {\n\t\tthis.value = date\n\t\tthis.smoothlyDateSet.emit(this.value)\n\t}\n\tprivate onClickDoubleInput(date: isoly.Date) {\n\t\tthis.clickCounter += 1\n\t\tif (this.clickCounter % 2 == 1) {\n\t\t\tthis.startInternal = this.endInternal = this.frozenDate = date\n\t\t} else {\n\t\t\tconst start = this.startInternal! > date ? date : this.startInternal\n\t\t\tconst end = this.endInternal! < date ? date : this.endInternal\n\t\t\tthis.startInternal = start\n\t\t\tthis.endInternal = end\n\t\t}\n\t\tthis.clickCounter % 2 == 0 &&\n\t\t\tthis.startInternal &&\n\t\t\tthis.endInternal &&\n\t\t\tthis.smoothlyDateRangeSet.emit({ start: this.startInternal, end: this.endInternal })\n\t}\n\tprivate onHover(date: isoly.Date) {\n\t\tif (this.doubleInput && this.clickCounter % 2 == 1) {\n\t\t\tif (date < this.frozenDate) {\n\t\t\t\tthis.startInternal = date\n\t\t\t\tthis.endInternal = this.frozenDate\n\t\t\t} else {\n\t\t\t\tthis.startInternal = this.frozenDate\n\t\t\t\tthis.endInternal = date\n\t\t\t}\n\t\t}\n\t}\n\tprivate withinLimit(date: isoly.Date) {\n\t\treturn (!this.min || date >= this.min) && (!this.max || date <= this.max)\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<Fragment>\n\t\t\t\t<smoothly-input-month\n\t\t\t\t\tname=\"month\"\n\t\t\t\t\tvalue={this.month ?? this.value}\n\t\t\t\t\tmin={this.min}\n\t\t\t\t\tmax={this.max}\n\t\t\t\t\tinCalendar\n\t\t\t\t\tnext\n\t\t\t\t\tprevious\n\t\t\t\t\tshowLabel={false}\n\t\t\t\t\tonSmoothlyInput={e => {\n\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\"month\" in e.detail && typeof e.detail.month == \"string\" && (this.month = e.detail.month)\n\t\t\t\t\t}}\n\t\t\t\t\tonSmoothlyUserInput={e => e.stopPropagation()}>\n\t\t\t\t\t<div slot={\"year-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<div slot={\"month-label\"}>\n\t\t\t\t\t\t<slot name={\"month-label\"} />\n\t\t\t\t\t</div>\n\t\t\t\t</smoothly-input-month>\n\t\t\t\t<table>\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t{generate.weekdays().map(day => (\n\t\t\t\t\t\t\t\t<th>{day}</th>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t{generate.month(this.month ?? this.value ?? isoly.Date.now()).map(week => (\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t{week.map(date => (\n\t\t\t\t\t\t\t\t<td\n\t\t\t\t\t\t\t\t\ttabindex={1}\n\t\t\t\t\t\t\t\t\tonMouseOver={this.withinLimit(date) ? () => this.onHover(date) : undefined}\n\t\t\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\t\t\tthis.withinLimit(date)\n\t\t\t\t\t\t\t\t\t\t\t? () => (this.doubleInput ? this.onClickDoubleInput(date) : this.onClick(date))\n\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\tselected:\n\t\t\t\t\t\t\t\t\t\t\tdate == this.value ||\n\t\t\t\t\t\t\t\t\t\t\t(this.doubleInput && (date == this.startInternal || date == this.endInternal)),\n\t\t\t\t\t\t\t\t\t\ttoday: date == isoly.Date.now(),\n\t\t\t\t\t\t\t\t\t\tcurrentMonth:\n\t\t\t\t\t\t\t\t\t\t\tisoly.Date.firstOfMonth(this.month ?? this.value ?? isoly.Date.now()) ==\n\t\t\t\t\t\t\t\t\t\t\tisoly.Date.firstOfMonth(date),\n\t\t\t\t\t\t\t\t\t\tdateRange: this.doubleInput && date > (this.startInternal ?? \"\") && date < (this.endInternal ?? \"\"),\n\t\t\t\t\t\t\t\t\t\tdisable: !this.withinLimit(date),\n\t\t\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t\t\t{date.substring(8, 10)}\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t))}\n\t\t\t\t</table>\n\t\t\t</Fragment>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, d as Host } from './p-f765921a.js';
|
|
2
|
-
import { d as defineCustomElement$5 } from './p-
|
|
2
|
+
import { d as defineCustomElement$5 } from './p-346ba422.js';
|
|
3
3
|
import { d as defineCustomElement$4 } from './p-35bfb804.js';
|
|
4
4
|
import { d as defineCustomElement$3 } from './p-2779565d.js';
|
|
5
|
-
import { d as defineCustomElement$2 } from './p-
|
|
5
|
+
import { d as defineCustomElement$2 } from './p-4051f859.js';
|
|
6
6
|
import { d as defineCustomElement$1 } from './p-3fa2299b.js';
|
|
7
7
|
|
|
8
8
|
const styleCss = ".sc-smoothly-table-demo-nested-no-cell-inner-h{display:block;margin:1em auto;width:60%}";
|
|
@@ -64,4 +64,4 @@ defineCustomElement();
|
|
|
64
64
|
|
|
65
65
|
export { SmoothlyTableDemoNestedNoCellInner as S, defineCustomElement as d };
|
|
66
66
|
|
|
67
|
-
//# sourceMappingURL=p-
|
|
67
|
+
//# sourceMappingURL=p-31603adf.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-31603adf.js","mappings":";;;;;;;AAAA,MAAM,QAAQ,GAAG,yFAAyF,CAAC;AAC3G,iDAAe,QAAQ;;MCMV,kCAAkC;;;;;;IAO9C,MAAM;;QACL,QACC,EAAC,IAAI,uDACJ,uEAAgB,OAAO,EAAE,CAAC,IACzB,8EACC,6EACC,4DAAK,KAAK,EAAC,qBAAqB,SAAS,EACzC,4DAAK,KAAK,EAAC,qBAAqB,WAAW,EAC3C,4DAAK,KAAK,EAAC,qBAAqB,UAAU,EAC1C,4DAAK,KAAK,EAAC,qBAAqB,cAAc,CAC1B,CACA,EACtB,8EACE,MAAA,IAAI,CAAC,IAAI,0CAAE,GAAG,CAAC,KAAK,KACpB,yCACC,WAAK,KAAK,EAAC,qBAAqB,IAAE,KAAK,CAAC,EAAE,CAAO,EACjD,WAAK,KAAK,EAAC,qBAAqB,IAAE,KAAK,CAAC,IAAI,CAAO,EACnD,WAAK,KAAK,EAAC,qBAAqB,IAAE,KAAK,CAAC,GAAG,CAAO,EAClD,WAAK,KAAK,EAAC,qBAAqB,IAAE,KAAK,CAAC,OAAO,CAAO,CACvB,CAChC,CAAC,CACmB,CACN,CACX,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/table/demo/nested-no-cell/inner/style.css?tag=smoothly-table-demo-nested-no-cell-inner&encapsulation=scoped","src/components/table/demo/nested-no-cell/inner/index.tsx"],"sourcesContent":[":host {\n\tdisplay: block;\n\tmargin: 1em auto;\n\twidth: 60%;\n}\n","import { Component, h, Host, Prop, VNode } from \"@stencil/core\"\n\n@Component({\n\ttag: \"smoothly-table-demo-nested-no-cell-inner\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyTableDemoNestedNoCellInner {\n\t@Prop() data?: {\n\t\tid: number\n\t\tname: string\n\t\tage: number\n\t\tbalance: number\n\t}[]\n\trender(): VNode | VNode[] {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<smoothly-table columns={4}>\n\t\t\t\t\t<smoothly-table-head>\n\t\t\t\t\t\t<smoothly-table-row>\n\t\t\t\t\t\t\t<div class=\"smoothly-table-cell\">Id</div>\n\t\t\t\t\t\t\t<div class=\"smoothly-table-cell\">Name</div>\n\t\t\t\t\t\t\t<div class=\"smoothly-table-cell\">Age</div>\n\t\t\t\t\t\t\t<div class=\"smoothly-table-cell\">Balance</div>\n\t\t\t\t\t\t</smoothly-table-row>\n\t\t\t\t\t</smoothly-table-head>\n\t\t\t\t\t<smoothly-table-body>\n\t\t\t\t\t\t{this.data?.map(entry => (\n\t\t\t\t\t\t\t<smoothly-table-expandable-row>\n\t\t\t\t\t\t\t\t<div class=\"smoothly-table-cell\">{entry.id}</div>\n\t\t\t\t\t\t\t\t<div class=\"smoothly-table-cell\">{entry.name}</div>\n\t\t\t\t\t\t\t\t<div class=\"smoothly-table-cell\">{entry.age}</div>\n\t\t\t\t\t\t\t\t<div class=\"smoothly-table-cell\">{entry.balance}</div>\n\t\t\t\t\t\t\t</smoothly-table-expandable-row>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</smoothly-table-body>\n\t\t\t\t</smoothly-table>\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, d as Host } from './p-f765921a.js';
|
|
2
2
|
|
|
3
|
-
const styleCss = ".sc-smoothly-table-h{display:grid;grid-template-columns:repeat(var(--columns), auto);color:rgb(var(--smoothly-table-foreground));stroke:rgb(var(--smoothly-table-foreground));fill:rgb(var(--smoothly-table-foreground))}
|
|
3
|
+
const styleCss = ".sc-smoothly-table-h{display:grid;grid-template-columns:repeat(var(--columns), auto);color:rgb(var(--smoothly-table-foreground));stroke:rgb(var(--smoothly-table-foreground));fill:rgb(var(--smoothly-table-foreground))}";
|
|
4
4
|
const SmoothlyTableStyle0 = styleCss;
|
|
5
5
|
|
|
6
6
|
const SmoothlyTable = proxyCustomElement(class SmoothlyTable extends H {
|
|
@@ -39,4 +39,4 @@ defineCustomElement();
|
|
|
39
39
|
|
|
40
40
|
export { SmoothlyTable as S, defineCustomElement as d };
|
|
41
41
|
|
|
42
|
-
//# sourceMappingURL=p-
|
|
42
|
+
//# sourceMappingURL=p-346ba422.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-346ba422.js","mappings":";;AAAA,MAAM,QAAQ,GAAG,2NAA2N,CAAC;AAC7O,4BAAe,QAAQ;;MCOV,aAAa;;;;uBACP,CAAC;;IAGnB,gCAAgC,CAAC,KAAsD;QACtF,KAAK,CAAC,eAAe,EAAE,CAAA;KACvB;IAGD,iCAAiC,CAAC,KAAsD;QACvF,KAAK,CAAC,eAAe,EAAE,CAAA;KACvB;IAED,MAAM;QACL,QACC,EAAC,IAAI,qDAAC,KAAK,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,IACpD,8DAAQ,CACF,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/table/style.css?tag=smoothly-table&encapsulation=scoped","src/components/table/index.tsx"],"sourcesContent":[":host {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(var(--columns), auto);\n\tcolor: rgb(var(--smoothly-table-foreground));\n\tstroke: rgb(var(--smoothly-table-foreground));\n\tfill: rgb(var(--smoothly-table-foreground));\n}\n","import { Component, h, Host, Listen, Prop, VNode } from \"@stencil/core\"\nimport { SmoothlyTableExpandableCellCustomEvent } from \"../../components\"\n\n@Component({\n\ttag: \"smoothly-table\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyTable {\n\t@Prop() columns = 1\n\n\t@Listen(\"smoothlyTableExpandableRowChange\")\n\tsmoothlyTableExpandableRowChange(event: SmoothlyTableExpandableCellCustomEvent<boolean>): void {\n\t\tevent.stopPropagation()\n\t}\n\n\t@Listen(\"smoothlyTableExpandableCellChange\")\n\tsmoothlyTableExpandableCellChange(event: SmoothlyTableExpandableCellCustomEvent<boolean>): void {\n\t\tevent.stopPropagation()\n\t}\n\n\trender(): VNode | VNode[] {\n\t\treturn (\n\t\t\t<Host style={{ \"--columns\": this.columns.toString() }}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, d as Host } from './p-f765921a.js';
|
|
2
2
|
import { d as defineCustomElement$f } from './p-76531b32.js';
|
|
3
3
|
import { d as defineCustomElement$e } from './p-2826e824.js';
|
|
4
|
-
import { d as defineCustomElement$d } from './p-
|
|
4
|
+
import { d as defineCustomElement$d } from './p-30f4e440.js';
|
|
5
5
|
import { d as defineCustomElement$c } from './p-00165343.js';
|
|
6
6
|
import { d as defineCustomElement$b } from './p-19d93e64.js';
|
|
7
7
|
import { d as defineCustomElement$a } from './p-604f869e.js';
|
|
8
8
|
import { d as defineCustomElement$9 } from './p-e48ad105.js';
|
|
9
|
-
import { d as defineCustomElement$8 } from './p-
|
|
10
|
-
import { d as defineCustomElement$7 } from './p-
|
|
9
|
+
import { d as defineCustomElement$8 } from './p-12f62e4d.js';
|
|
10
|
+
import { d as defineCustomElement$7 } from './p-581d3377.js';
|
|
11
11
|
import { d as defineCustomElement$6 } from './p-53eb6d93.js';
|
|
12
|
-
import { d as defineCustomElement$5 } from './p-
|
|
13
|
-
import { d as defineCustomElement$4 } from './p-
|
|
12
|
+
import { d as defineCustomElement$5 } from './p-c172bb64.js';
|
|
13
|
+
import { d as defineCustomElement$4 } from './p-4441247b.js';
|
|
14
14
|
import { d as defineCustomElement$3 } from './p-0b3f1a79.js';
|
|
15
15
|
import { d as defineCustomElement$2 } from './p-1e46b981.js';
|
|
16
16
|
import { d as defineCustomElement$1 } from './p-3a1a67e7.js';
|
|
@@ -116,4 +116,4 @@ defineCustomElement();
|
|
|
116
116
|
|
|
117
117
|
export { SmoothlyFormDemoTransparent as S, defineCustomElement as d };
|
|
118
118
|
|
|
119
|
-
//# sourceMappingURL=p-
|
|
119
|
+
//# sourceMappingURL=p-35b09ed4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-35b09ed4.js","mappings":";;;;;;;;;;;;;;;;;MAMa,2BAA2B;;;;;IACvC,MAAM;QACL,QACC,EAAC,IAAI,uDACJ,2EAAoB,EACpB,sEAAe,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAC1F,4EAAqB,IAAI,EAAE,MAAM,IAChC,6DAAM,IAAI,EAAE,OAAO,WAAa,EAChC,sEAAe,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,qBAAqB,EAAE,IAAI,EAAE,OAAO,GAAI,CACxD,EACtB,uEAAgB,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAE1D,EACjB,qFAA+C,EAC/C,iGAAiE,EACjE,8EAAuB,IAAI,EAAE,WAAW,IACvC,sEAAe,KAAK,EAAE,OAAO,IAC5B,sEAAe,IAAI,EAAE,kBAAkB,GAAI,CAC5B,EAChB,sEAAe,KAAK,EAAE,KAAK,IAC1B,sEAAe,IAAI,EAAE,aAAa,GAAI,CACvB,EAChB,sEAAe,KAAK,EAAE,KAAK,EAAE,QAAQ,UACpC,sEAAe,IAAI,EAAE,aAAa,GAAI,CACvB,CACO,EACxB,8EAAuB,IAAI,EAAE,kBAAkB,GAAI,CACpC,CACV,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/form/demo/transparent/index.tsx"],"sourcesContent":["import { Component, h, Host, VNode } from \"@stencil/core\"\n\n@Component({\n\ttag: \"smoothly-form-demo-transparent\",\n\tscoped: true,\n})\nexport class SmoothlyFormDemoTransparent {\n\trender(): VNode | VNode[] {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<h2>Transparent</h2>\n\t\t\t\t<smoothly-form looks={\"transparent\"} onSmoothlyFormSubmit={e => console.log(e.detail.value)}>\n\t\t\t\t\t<smoothly-input-file name={\"file\"}>\n\t\t\t\t\t\t<span slot={\"label\"}>File</span>\n\t\t\t\t\t\t<smoothly-icon slot={\"button\"} name={\"folder-open-outline\"} size={\"small\"} />\n\t\t\t\t\t</smoothly-input-file>\n\t\t\t\t\t<smoothly-input type={\"duration\"} looks={\"transparent\"} placeholder={\"h:mm\"}>\n\t\t\t\t\t\tInput\n\t\t\t\t\t</smoothly-input>\n\t\t\t\t\t<smoothly-input-date>Date</smoothly-input-date>\n\t\t\t\t\t<smoothly-input-date-range>Date Range</smoothly-input-date-range>\n\t\t\t\t\t<smoothly-input-select name={\"transport\"}>\n\t\t\t\t\t\t<smoothly-item value={\"plane\"}>\n\t\t\t\t\t\t\t<smoothly-icon name={\"airplane-outline\"} />\n\t\t\t\t\t\t</smoothly-item>\n\t\t\t\t\t\t<smoothly-item value={\"car\"}>\n\t\t\t\t\t\t\t<smoothly-icon name={\"car-outline\"} />\n\t\t\t\t\t\t</smoothly-item>\n\t\t\t\t\t\t<smoothly-item value={\"bus\"} selected>\n\t\t\t\t\t\t\t<smoothly-icon name={\"bus-outline\"} />\n\t\t\t\t\t\t</smoothly-item>\n\t\t\t\t\t</smoothly-input-select>\n\t\t\t\t\t<smoothly-input-submit icon={\"checkbox-outline\"} />\n\t\t\t\t</smoothly-form>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -3,7 +3,7 @@ import { d as defineCustomElement$7 } from './p-76531b32.js';
|
|
|
3
3
|
import { d as defineCustomElement$6 } from './p-753658b4.js';
|
|
4
4
|
import { d as defineCustomElement$5 } from './p-d8e3f8c5.js';
|
|
5
5
|
import { d as defineCustomElement$4 } from './p-604f869e.js';
|
|
6
|
-
import { d as defineCustomElement$3 } from './p-
|
|
6
|
+
import { d as defineCustomElement$3 } from './p-dea4659e.js';
|
|
7
7
|
import { d as defineCustomElement$2 } from './p-04b312ca.js';
|
|
8
8
|
import { d as defineCustomElement$1 } from './p-6f96e7ef.js';
|
|
9
9
|
|
|
@@ -79,4 +79,4 @@ defineCustomElement();
|
|
|
79
79
|
|
|
80
80
|
export { SmoothlyDialogDemo as S, defineCustomElement as d };
|
|
81
81
|
|
|
82
|
-
//# sourceMappingURL=p-
|
|
82
|
+
//# sourceMappingURL=p-3abf736a.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-3abf736a.js","mappings":";;;;;;;;;AAAA,MAAM,QAAQ,GAAG,qGAAqG,CAAC;AACvH,iCAAe,QAAQ;;MCMV,kBAAkB;;;;yBACT,KAAK;6BACD,KAAK;yBACT,KAAK;;IAE1B,MAAM;QACL,QACC,EAAC,IAAI,uDACJ,wEAAiB,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,OAAO,EAAC,OAAO,EAAE,OAAO,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,iBAEhE,EAClB,wEAAiB,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,OAAO,EAAC,OAAO,EAAE,OAAO,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,iDAEpE,EAClB,wEAAiB,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,OAAO,EAAC,OAAO,EAAE,OAAO,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,iBAE3E,EAElB,uEAAgB,QAAQ,QAAC,IAAI,EAAE,IAAI,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/components/dialog/demo/index.tsx"],"sourcesContent":["\n:host > smoothly-button {\n\tdisplay: block;\n\tmargin-block: 2rem;\n}\n","import { Component, h, Host, State } from \"@stencil/core\"\n\n@Component({\n\ttag: \"smoothly-dialog-demo\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyDialogDemo {\n\t@State() openModal = false\n\t@State() openTallModal = false\n\t@State() showFrame = false\n\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<smoothly-button fill=\"solid\" color=\"light\" onClick={() => (this.openModal = true)}>\n\t\t\t\t\tOpen Modal\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button fill=\"solid\" color=\"light\" onClick={() => (this.openTallModal = true)}>\n\t\t\t\t\tOpen Modal with long text and top-aligned.\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button fill=\"solid\" color=\"light\" onClick={() => (this.showFrame = !this.showFrame)}>\n\t\t\t\t\tShow Frame\n\t\t\t\t</smoothly-button>\n\n\t\t\t\t<smoothly-modal closable open={this.openModal} onSmoothlyModalChange={e => (this.openModal = e.detail)}>\n\t\t\t\t\t<h2 slot=\"header\">Modal</h2>\n\t\t\t\t\t<span>Are you sure you want to confirm this action?</span>\n\t\t\t\t\t<smoothly-button slot=\"actions\" color=\"success\">\n\t\t\t\t\t\tConfirm\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button slot=\"actions\" color=\"light\" fill=\"outline\" onClick={() => (this.openModal = false)}>\n\t\t\t\t\t\tCancel\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t</smoothly-modal>\n\n\t\t\t\t<smoothly-modal\n\t\t\t\t\tclosable\n\t\t\t\t\topen={this.openTallModal}\n\t\t\t\t\tonSmoothlyModalChange={e => (this.openTallModal = e.detail)}\n\t\t\t\t\talign=\"top\">\n\t\t\t\t\t<h2 slot=\"header\">Modal</h2>\n\t\t\t\t\t<smoothly-summary>\n\t\t\t\t\t\t<div slot=\"summary\">Lorem ipsum</div>\n\t\t\t\t\t\t<div slot=\"content\">\n\t\t\t\t\t\t\t{Array.from({ length: 10 }).map(() => (\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\tLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et\n\t\t\t\t\t\t\t\t\tdolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut\n\t\t\t\t\t\t\t\t\taliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum\n\t\t\t\t\t\t\t\t\tdolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui\n\t\t\t\t\t\t\t\t\tofficia deserunt mollit anim id est laborum.\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</smoothly-summary>\n\t\t\t\t\t<smoothly-button slot=\"actions\" color=\"light\" fill=\"outline\" onClick={() => (this.openTallModal = false)}>\n\t\t\t\t\t\tCancel\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t</smoothly-modal>\n\n\t\t\t\t{this.showFrame && (\n\t\t\t\t\t<smoothly-dialog closable>\n\t\t\t\t\t\t<smoothly-frame url=\"https://www.wikipedia.org/\" name=\"parent\" style={{ height: \"80vh\" }} />\n\t\t\t\t\t</smoothly-dialog>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -3,7 +3,7 @@ import './p-57ac5d1b.js';
|
|
|
3
3
|
import './p-390767c7.js';
|
|
4
4
|
import { S as Scrollable } from './p-47ea6b68.js';
|
|
5
5
|
|
|
6
|
-
const styleCss = ".sc-smoothly-table-head-h{grid-column:1 / -1;display:grid;grid-template-columns:subgrid;top:
|
|
6
|
+
const styleCss = ".sc-smoothly-table-head-h{grid-column:1 / -1;display:grid;grid-template-columns:subgrid;top:var(--top);position:sticky;z-index:var(--z-index);--smoothly-color:var(--smoothly-table-header-background);--smoothly-color-contrast:var(--smoothly-table-header-foreground);background-color:rgb(var(--smoothly-table-header-background));color:rgb(var(--smoothly-table-header-foreground));stroke:rgb(var(--smoothly-table-header-foreground));fill:rgb(var(--smoothly-table-header-foreground));font-weight:bold;transition:box-shadow 0.3s ease}.scrolled.sc-smoothly-table-head-h{box-shadow:var(--smoothly-table-header-shadow)}";
|
|
7
7
|
const SmoothlyTableHeadStyle0 = styleCss;
|
|
8
8
|
|
|
9
9
|
const SmoothlyTableHead = proxyCustomElement(class SmoothlyTableHead extends H {
|
|
@@ -19,23 +19,44 @@ const SmoothlyTableHead = proxyCustomElement(class SmoothlyTableHead extends H {
|
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
this.scrolled = undefined;
|
|
22
|
+
this.depth = 0;
|
|
23
|
+
}
|
|
24
|
+
getTopOffset() {
|
|
25
|
+
let depth = 0;
|
|
26
|
+
let currentElement = this.element;
|
|
27
|
+
while (currentElement) {
|
|
28
|
+
if (currentElement.tagName.toLowerCase() === "smoothly-table") {
|
|
29
|
+
const head = currentElement.querySelector("smoothly-table-head");
|
|
30
|
+
if (head !== this.element) {
|
|
31
|
+
const rows = Array.from(head.querySelectorAll("smoothly-table-row"));
|
|
32
|
+
depth += rows.length;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
currentElement = currentElement.parentElement;
|
|
36
|
+
}
|
|
37
|
+
this.depth = depth;
|
|
22
38
|
}
|
|
23
39
|
connectedCallback() {
|
|
24
40
|
var _a;
|
|
25
41
|
this.scrollParent = Scrollable.findParent(this.element);
|
|
26
42
|
(_a = this.scrollParent) === null || _a === void 0 ? void 0 : _a.addEventListener("scroll", this.onScroll);
|
|
43
|
+
this.getTopOffset();
|
|
27
44
|
}
|
|
28
45
|
disconnectedCallback() {
|
|
29
46
|
var _a;
|
|
30
47
|
(_a = this.scrollParent) === null || _a === void 0 ? void 0 : _a.removeEventListener("scroll", this.onScroll);
|
|
31
48
|
}
|
|
32
49
|
render() {
|
|
33
|
-
return (h(Host, { key: '
|
|
50
|
+
return (h(Host, { key: 'af0948178b8c6b2d2dce77f8a9ee7d00ccfbfe30', class: { scrolled: !!this.scrolled }, style: {
|
|
51
|
+
"--top": `calc(${this.depth} * var(--smoothly-table-cell-min-height))`,
|
|
52
|
+
"--z-index": `${10 - this.depth}`,
|
|
53
|
+
} }, h("slot", { key: '50e8a632a94c230ded1e47cfece114ef2c523ead' })));
|
|
34
54
|
}
|
|
35
55
|
get element() { return this; }
|
|
36
56
|
static get style() { return SmoothlyTableHeadStyle0; }
|
|
37
57
|
}, [6, "smoothly-table-head", {
|
|
38
|
-
"scrolled": [32]
|
|
58
|
+
"scrolled": [32],
|
|
59
|
+
"depth": [32]
|
|
39
60
|
}]);
|
|
40
61
|
function defineCustomElement() {
|
|
41
62
|
if (typeof customElements === "undefined") {
|
|
@@ -54,4 +75,4 @@ defineCustomElement();
|
|
|
54
75
|
|
|
55
76
|
export { SmoothlyTableHead as S, defineCustomElement as d };
|
|
56
77
|
|
|
57
|
-
//# sourceMappingURL=p-
|
|
78
|
+
//# sourceMappingURL=p-4051f859.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-4051f859.js","mappings":";;;;;AAAA,MAAM,QAAQ,GAAG,qmBAAqmB,CAAC;AACvnB,gCAAe,QAAQ;;MCOV,iBAAiB;;;;QAKrB,aAAQ,GAAG,CAAC,KAAY;YAC/B,IAAI,KAAK,CAAC,MAAM,YAAYA,CAAW,EAAE;gBACxC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM,CAAA;gBAChC,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,qBAAqB,EAAE,CAAA;gBAC5D,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAA;gBACxD,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,GAAG,IAAI,WAAW,CAAC,GAAG,CAAA;aACjD;SACD,CAAA;;qB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;;;","names":["HTMLElement"],"sources":["src/components/table/head/style.css?tag=smoothly-table-head&encapsulation=scoped","src/components/table/head/index.tsx"],"sourcesContent":[":host {\n\tgrid-column: 1 / -1;\n\tdisplay: grid;\n\tgrid-template-columns: subgrid;\n\ttop: var(--top);\n\tposition: sticky;\n\tz-index: var(--z-index);\n\t--smoothly-color: var(--smoothly-table-header-background);\n\t--smoothly-color-contrast: var(--smoothly-table-header-foreground);\n\tbackground-color: rgb(var(--smoothly-table-header-background));\n\tcolor: rgb(var(--smoothly-table-header-foreground));\n\tstroke: rgb(var(--smoothly-table-header-foreground));\n\tfill: rgb(var(--smoothly-table-header-foreground));\n\tfont-weight: bold;\n\ttransition: box-shadow 0.3s ease;\n}\n\n:host.scrolled {\n\tbox-shadow: var(--smoothly-table-header-shadow);\n}\n","import { Component, Element, h, Host, State, VNode } from \"@stencil/core\"\nimport { Scrollable } from \"../../../model\"\n\n@Component({\n\ttag: \"smoothly-table-head\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyTableHead {\n\t@Element() element: HTMLSmoothlyTableHeadElement\n\t@State() scrolled?: boolean\n\t@State() depth = 0\n\tprivate scrollParent?: HTMLElement\n\tprivate onScroll = (event: Event) => {\n\t\tif (event.target instanceof HTMLElement) {\n\t\t\tthis.scrollParent = event.target\n\t\t\tconst parentRect = this.scrollParent.getBoundingClientRect()\n\t\t\tconst elementRect = this.element.getBoundingClientRect()\n\t\t\tthis.scrolled = parentRect.top == elementRect.top\n\t\t}\n\t}\n\tgetTopOffset() {\n\t\tlet depth = 0\n\t\tlet currentElement: HTMLElement | null = this.element\n\t\twhile (currentElement) {\n\t\t\tif (currentElement.tagName.toLowerCase() === \"smoothly-table\") {\n\t\t\t\tconst head = currentElement.querySelector(\"smoothly-table-head\") as HTMLSmoothlyTableHeadElement\n\t\t\t\tif (head !== this.element) {\n\t\t\t\t\tconst rows = Array.from(\n\t\t\t\t\t\thead.querySelectorAll(\"smoothly-table-row\") as NodeListOf<HTMLSmoothlyTableHeadElement>\n\t\t\t\t\t)\n\t\t\t\t\tdepth += rows.length\n\t\t\t\t}\n\t\t\t}\n\t\t\tcurrentElement = currentElement.parentElement as HTMLSmoothlyTableHeadElement\n\t\t}\n\t\tthis.depth = depth\n\t}\n\tconnectedCallback() {\n\t\tthis.scrollParent = Scrollable.findParent(this.element)\n\t\tthis.scrollParent?.addEventListener(\"scroll\", this.onScroll)\n\t\tthis.getTopOffset()\n\t}\n\tdisconnectedCallback() {\n\t\tthis.scrollParent?.removeEventListener(\"scroll\", this.onScroll)\n\t}\n\n\trender(): VNode | VNode[] {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={{ scrolled: !!this.scrolled }}\n\t\t\t\tstyle={\n\t\t\t\t\t{\n\t\t\t\t\t\t\"--top\": `calc(${this.depth} * var(--smoothly-table-cell-min-height))`,\n\t\t\t\t\t\t\"--z-index\": `${10 - this.depth}`,\n\t\t\t\t\t} as any\n\t\t\t\t}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -22,7 +22,7 @@ var Item;
|
|
|
22
22
|
Item.is = Item.type.is;
|
|
23
23
|
})(Item || (Item = {}));
|
|
24
24
|
|
|
25
|
-
const styleCss = ".sc-smoothly-input-select-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks=\"border\"].sc-smoothly-input-select-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks=\"border\"].sc-smoothly-input-select-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks=\"border\"][readonly].sc-smoothly-input-select-h{border:transparent solid 1px}[looks=\"line\"].sc-smoothly-input-select-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks=\"line\"][readonly].sc-smoothly-input-select-h{border-bottom:transparent solid 1px}[looks=\"line\"].sc-smoothly-input-select-h:not([readonly]):not([disabled]):focus-within::before{content:\"\";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks=\"grid\"].sc-smoothly-input-select-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks=\"grid\"][readonly].sc-smoothly-input-select-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks=\"grid\"].sc-smoothly-input-select-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks=\"transparent\"].sc-smoothly-input-select-h{border:none}[looks=\"transparent\"][readonly].sc-smoothly-input-select-h,[looks=\"transparent\"].sc-smoothly-input-select-h:not(:focus-within){background-color:transparent}[looks=\"transparent\"][readonly].sc-smoothly-input-select-h>input.sc-smoothly-input-select,[looks=\"transparent\"].sc-smoothly-input-select-h:not(:focus-within)>input.sc-smoothly-input-select{background-color:transparent}[looks=\"transparent\"].sc-smoothly-input-select-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-select-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-select-h.sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h .sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h .label.sc-smoothly-input-select{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}.sc-smoothly-input-select-h.floating-label.sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h.floating-label .sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h.has-value.sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h.has-value .sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h[placeholder].sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h[placeholder] .sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h[readonly].sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h[readonly] .sc-smoothly-input-select-s>[slot=label],.floating-label.sc-smoothly-input-select-h .label.sc-smoothly-input-select,.has-value.sc-smoothly-input-select-h .label.sc-smoothly-input-select,.has-text.sc-smoothly-input-select-h .label.sc-smoothly-input-select,[placeholder].sc-smoothly-input-select-h .label.sc-smoothly-input-select,[readonly].sc-smoothly-input-select-h .label.sc-smoothly-input-select,.sc-smoothly-input-select-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-select{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-select-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-select{display:none}.sc-smoothly-input-select-h smoothly-icon.smoothly-invalid.sc-smoothly-input-select{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}.sc-smoothly-input-select-h{display:flex;justify-content:space-between;flex-direction:row;position:relative;background-color:rgb(var(--smoothly-input-background));color:rgb(var(--smoothly-input-foreground));fill:rgb(var(--smoothly-input-foreground));stroke:rgb(var(--smoothly-input-foreground));padding-left:var(--input-padding-side)}.open.sc-smoothly-input-select-h{border-radius:var(--smoothly-input-border-radius) var(--smoothly-input-border-radius) 0 0}.icon.sc-smoothly-input-select-h{width:fit-content;flex-direction:column}.sc-smoothly-input-select-h>div.select-display.sc-smoothly-input-select{box-sizing:border-box;display:flex;padding:var(--input-value-padding-top) .8rem var(--input-value-padding-bottom) 0;overflow:hidden;width:100%;white-space:nowrap;gap:1rem;text-overflow:ellipsis}.sc-smoothly-input-select-h:not([readonly]):not([disabled])>div.select-display.sc-smoothly-input-select{cursor:pointer}.sc-smoothly-input-select-h:not(:has([slot=label]))>div.select-display.sc-smoothly-input-select,.sc-smoothly-input-select-h:not([show-label])>div.select-display.sc-smoothly-input-select{padding:.6rem .8rem .6rem 0;align-items:center}.sc-smoothly-input-select-h>div.select-display.sc-smoothly-input-select smoothly-icon.sc-smoothly-input-select{color:rgb(var(--smoothly-input-foreground));fill:rgb(var(--smoothly-input-foreground));stroke:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-select-h>div.icons.sc-smoothly-input-select{display:flex;flex-direction:row;align-items:center}.sc-smoothly-input-select-h:hover>div.icons.sc-smoothly-input-select-s>smoothly-icon{filter:opacity(100%)}.sc-smoothly-input-select-h>div.icons.sc-smoothly-input-select>smoothly-icon[name=caret-down-outline].sc-smoothly-input-select,.sc-smoothly-input-select-h>div.icons.sc-smoothly-input-select>smoothly-icon[name=caret-forward-outline].sc-smoothly-input-select{opacity:.7;height:100%;padding-inline:var(--input-padding-side)}.sc-smoothly-input-select-h:not([readonly]):not([disabled])>div.icons.sc-smoothly-input-select>smoothly-icon[name=caret-down-outline].sc-smoothly-input-select,.sc-smoothly-input-select-h:not([readonly]):not([disabled])>div.icons.sc-smoothly-input-select>smoothly-icon[name=caret-forward-outline].sc-smoothly-input-select{cursor:pointer}[invalid].sc-smoothly-input-select-h>div.sc-smoothly-input-select>smoothly-icon.smoothly-invalid.sc-smoothly-input-select{display:block;padding:0.5rem}.sc-smoothly-input-select-h>div.sc-smoothly-input-select>smoothly-icon.smoothly-invalid.sc-smoothly-input-select{display:none}.sc-smoothly-input-select-h .label.sc-smoothly-input-select{left:.5rem}.has-value.sc-smoothly-input-select-h:has([slot=label]:not(:empty))>div.select-display.sc-smoothly-input-select,.sc-smoothly-input-select-h:not(.has-value)[placeholder]>div.select-display.sc-smoothly-input-select{overflow:hidden;width:100%}.sc-smoothly-input-select-h>.options.sc-smoothly-input-select{display:flex;flex-direction:column;position:absolute;top:var(--element-height);z-index:10;max-height:var(--menu-height, unset);overflow-x:hidden;overflow-y:auto;background-color:rgb(var(--smoothly-input-background));left:0;right:0;border-radius:0 0 var(--smoothly-input-border-radius) var(--smoothly-input-border-radius);min-width:fit-content;border:rgb(var(--smoothly-input-border, var(--smoothly-color-contrast))) solid 1px;border-top:rgba(var(--smoothly-input-border, var(--smoothly-color-contrast)), .4) solid 1px}[looks=\"grid\"].sc-smoothly-input-select-h>div.options.sc-smoothly-input-select,[looks=border].sc-smoothly-input-select-h>div.options.sc-smoothly-input-select,[looks=\"transparent\"].sc-smoothly-input-select-h>div.options.sc-smoothly-input-select{left:-1px;right:-1px}[multiple].sc-smoothly-input-select-h>div.options.sc-smoothly-input-select>smoothly-item.sc-smoothly-input-select::before{content:\"\";display:inline-block;width:1rem;height:1rem;margin-right:0.5rem;border:1px solid rgb(var(--smoothly-input-foreground));border-radius:0.15rem;vertical-align:middle}[multiple].sc-smoothly-input-select-h>div.options.sc-smoothly-input-select>smoothly-item[selected].sc-smoothly-input-select::after{content:\"✔\";position:absolute;left:0.65rem;color:rgb(var(--smoothly-item-selected-foreground))}[multiple].sc-smoothly-input-select-h>div.options.sc-smoothly-input-select>smoothly-item[selected].sc-smoothly-input-select::before{border:1px solid rgb(var(--smoothly-item-selected-foreground))}[multiple].sc-smoothly-input-select-h>div.options.sc-smoothly-input-select>smoothly-item[selected].sc-smoothly-input-select::after{color:rgb(var(--smoothly-item-selected-foreground))}[multiple].sc-smoothly-input-select-h>div.options.sc-smoothly-input-select>smoothly-item.sc-smoothly-input-select:hover::before{border:1px solid rgb(var(--smoothly-item-hover-foreground))}[multiple].sc-smoothly-input-select-h>div.options.sc-smoothly-input-select>smoothly-item.sc-smoothly-input-select:hover::after{color:rgb(var(--smoothly-item-hover-foreground))}.sc-smoothly-input-select-h>div.options.sc-smoothly-input-select-s>smoothly-item,.sc-smoothly-input-select-h>div.options.sc-smoothly-input-select-s>div.search-preview{padding:.7rem .7rem .7rem .25rem}.sc-smoothly-input-select-h>div.options.sc-smoothly-input-select-s>div.search-preview{display:flex;position:sticky;top:0;gap:1rem;background-color:rgb(var(--smoothly-input-background));color:rgb(var(--smoothly-color-contrast));fill:rgb(var(--smoothly-color-contrast));stroke:rgb(var(--smoothly-color-contrast))}.sc-smoothly-input-select-h>div.options.sc-smoothly-input-select-s>div.search-preview::before{content:\"\";position:absolute;inset:0;background-color:rgba(var(--smoothly-primary-tint), 0.5);z-index:-1}.sc-smoothly-input-select-h>div.options.sc-smoothly-input-select>div.search-preview.sc-smoothly-input-select>smoothly-icon[name=\"backspace-outline\"].sc-smoothly-input-select{margin-left:auto;margin-right:0}.sc-smoothly-input-select-h>div.options.hidden.sc-smoothly-input-select{display:none}";
|
|
25
|
+
const styleCss = ".sc-smoothly-input-select-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks=\"border\"].sc-smoothly-input-select-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks=\"border\"].sc-smoothly-input-select-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks=\"border\"][readonly].sc-smoothly-input-select-h{border:transparent solid 1px}[looks=\"line\"].sc-smoothly-input-select-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks=\"line\"][readonly].sc-smoothly-input-select-h{border-bottom:transparent solid 1px}[looks=\"line\"].sc-smoothly-input-select-h:not([readonly]):not([disabled]):focus-within::before{content:\"\";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks=\"grid\"].sc-smoothly-input-select-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks=\"grid\"][readonly].sc-smoothly-input-select-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks=\"grid\"].sc-smoothly-input-select-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks=\"transparent\"].sc-smoothly-input-select-h{border:none}[looks=\"transparent\"][readonly].sc-smoothly-input-select-h,[looks=\"transparent\"].sc-smoothly-input-select-h:not(:focus-within){background-color:transparent}[looks=\"transparent\"][readonly].sc-smoothly-input-select-h>input.sc-smoothly-input-select,[looks=\"transparent\"].sc-smoothly-input-select-h:not(:focus-within)>input.sc-smoothly-input-select{background-color:transparent}[looks=\"transparent\"].sc-smoothly-input-select-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-select-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-select-h.sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h .sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h .label.sc-smoothly-input-select{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}.sc-smoothly-input-select-h.floating-label.sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h.floating-label .sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h.has-value.sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h.has-value .sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h[placeholder].sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h[placeholder] .sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h[readonly].sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h[readonly] .sc-smoothly-input-select-s>[slot=label],.floating-label.sc-smoothly-input-select-h .label.sc-smoothly-input-select,.has-value.sc-smoothly-input-select-h .label.sc-smoothly-input-select,.has-text.sc-smoothly-input-select-h .label.sc-smoothly-input-select,[placeholder].sc-smoothly-input-select-h .label.sc-smoothly-input-select,[readonly].sc-smoothly-input-select-h .label.sc-smoothly-input-select,.sc-smoothly-input-select-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-select{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-select-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-select{display:none}.sc-smoothly-input-select-h smoothly-icon.smoothly-invalid.sc-smoothly-input-select{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}.sc-smoothly-input-select-h{display:flex;justify-content:space-between;flex-direction:row;position:relative;background-color:rgb(var(--smoothly-input-background));color:rgb(var(--smoothly-input-foreground));fill:rgb(var(--smoothly-input-foreground));stroke:rgb(var(--smoothly-input-foreground));padding-left:var(--input-padding-side)}.open.sc-smoothly-input-select-h{border-radius:var(--smoothly-input-border-radius) var(--smoothly-input-border-radius) 0 0}.icon.sc-smoothly-input-select-h{width:fit-content;flex-direction:column}.sc-smoothly-input-select-h>div.select-display.sc-smoothly-input-select{box-sizing:border-box;display:flex;padding:var(--input-value-padding-top) .8rem var(--input-value-padding-bottom) 0;overflow:hidden;width:100%;white-space:nowrap;gap:1rem;text-overflow:ellipsis}.sc-smoothly-input-select-h:not([readonly]):not([disabled])>div.select-display.sc-smoothly-input-select{cursor:pointer}.sc-smoothly-input-select-h:not(:has([slot=label]))>div.select-display.sc-smoothly-input-select,.sc-smoothly-input-select-h:not([show-label])>div.select-display.sc-smoothly-input-select{padding:.6rem .8rem .6rem 0;align-items:center}.sc-smoothly-input-select-h>div.select-display.sc-smoothly-input-select smoothly-icon.sc-smoothly-input-select{color:rgb(var(--smoothly-input-foreground));fill:rgb(var(--smoothly-input-foreground));stroke:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-select-h>div.icons.sc-smoothly-input-select{display:flex;flex-direction:row;align-items:center}.sc-smoothly-input-select-h:hover>div.icons.sc-smoothly-input-select-s>smoothly-icon{filter:opacity(100%)}.sc-smoothly-input-select-h>div.icons.sc-smoothly-input-select>smoothly-icon[name=caret-down-outline].sc-smoothly-input-select,.sc-smoothly-input-select-h>div.icons.sc-smoothly-input-select>smoothly-icon[name=caret-forward-outline].sc-smoothly-input-select{opacity:.7;height:100%;padding-inline:var(--input-padding-side)}.sc-smoothly-input-select-h:not([readonly]):not([disabled])>div.icons.sc-smoothly-input-select>smoothly-icon[name=caret-down-outline].sc-smoothly-input-select,.sc-smoothly-input-select-h:not([readonly]):not([disabled])>div.icons.sc-smoothly-input-select>smoothly-icon[name=caret-forward-outline].sc-smoothly-input-select{cursor:pointer}[invalid].sc-smoothly-input-select-h>div.sc-smoothly-input-select>smoothly-icon.smoothly-invalid.sc-smoothly-input-select{display:block;padding:0.5rem}.sc-smoothly-input-select-h>div.sc-smoothly-input-select>smoothly-icon.smoothly-invalid.sc-smoothly-input-select{display:none}.sc-smoothly-input-select-h .label.sc-smoothly-input-select{left:.5rem}.has-value.sc-smoothly-input-select-h:has([slot=label]:not(:empty))>div.select-display.sc-smoothly-input-select,.sc-smoothly-input-select-h:not(.has-value)[placeholder]>div.select-display.sc-smoothly-input-select{overflow:hidden;width:100%}.sc-smoothly-input-select-h>.options.sc-smoothly-input-select{display:flex;flex-direction:column;position:absolute;top:var(--element-height);z-index:20;max-height:var(--menu-height, unset);overflow-x:hidden;overflow-y:auto;background-color:rgb(var(--smoothly-input-background));left:0;right:0;border-radius:0 0 var(--smoothly-input-border-radius) var(--smoothly-input-border-radius);min-width:fit-content;border:rgb(var(--smoothly-input-border, var(--smoothly-color-contrast))) solid 1px;border-top:rgba(var(--smoothly-input-border, var(--smoothly-color-contrast)), .4) solid 1px}[looks=\"grid\"].sc-smoothly-input-select-h>div.options.sc-smoothly-input-select,[looks=border].sc-smoothly-input-select-h>div.options.sc-smoothly-input-select,[looks=\"transparent\"].sc-smoothly-input-select-h>div.options.sc-smoothly-input-select{left:-1px;right:-1px}[multiple].sc-smoothly-input-select-h>div.options.sc-smoothly-input-select>smoothly-item.sc-smoothly-input-select::before{content:\"\";display:inline-block;width:1rem;height:1rem;margin-right:0.5rem;border:1px solid rgb(var(--smoothly-input-foreground));border-radius:0.15rem;vertical-align:middle}[multiple].sc-smoothly-input-select-h>div.options.sc-smoothly-input-select>smoothly-item[selected].sc-smoothly-input-select::after{content:\"✔\";position:absolute;left:0.65rem;color:rgb(var(--smoothly-item-selected-foreground))}[multiple].sc-smoothly-input-select-h>div.options.sc-smoothly-input-select>smoothly-item[selected].sc-smoothly-input-select::before{border:1px solid rgb(var(--smoothly-item-selected-foreground))}[multiple].sc-smoothly-input-select-h>div.options.sc-smoothly-input-select>smoothly-item[selected].sc-smoothly-input-select::after{color:rgb(var(--smoothly-item-selected-foreground))}[multiple].sc-smoothly-input-select-h>div.options.sc-smoothly-input-select>smoothly-item.sc-smoothly-input-select:hover::before{border:1px solid rgb(var(--smoothly-item-hover-foreground))}[multiple].sc-smoothly-input-select-h>div.options.sc-smoothly-input-select>smoothly-item.sc-smoothly-input-select:hover::after{color:rgb(var(--smoothly-item-hover-foreground))}.sc-smoothly-input-select-h>div.options.sc-smoothly-input-select-s>smoothly-item,.sc-smoothly-input-select-h>div.options.sc-smoothly-input-select-s>div.search-preview{padding:.7rem .7rem .7rem .25rem}.sc-smoothly-input-select-h>div.options.sc-smoothly-input-select-s>div.search-preview{display:flex;position:sticky;top:0;gap:1rem;background-color:rgb(var(--smoothly-input-background));color:rgb(var(--smoothly-color-contrast));fill:rgb(var(--smoothly-color-contrast));stroke:rgb(var(--smoothly-color-contrast))}.sc-smoothly-input-select-h>div.options.sc-smoothly-input-select-s>div.search-preview::before{content:\"\";position:absolute;inset:0;background-color:rgba(var(--smoothly-primary-tint), 0.5);z-index:-1}.sc-smoothly-input-select-h>div.options.sc-smoothly-input-select>div.search-preview.sc-smoothly-input-select>smoothly-icon[name=\"backspace-outline\"].sc-smoothly-input-select{margin-left:auto;margin-right:0}.sc-smoothly-input-select-h>div.options.hidden.sc-smoothly-input-select{display:none}";
|
|
26
26
|
const SmoothlyInputSelectStyle0 = styleCss;
|
|
27
27
|
|
|
28
28
|
const SmoothlyInputSelect = proxyCustomElement(class SmoothlyInputSelect extends H {
|
|
@@ -408,4 +408,4 @@ defineCustomElement();
|
|
|
408
408
|
|
|
409
409
|
export { SmoothlyInputSelect as S, defineCustomElement as d };
|
|
410
410
|
|
|
411
|
-
//# sourceMappingURL=p-
|
|
411
|
+
//# sourceMappingURL=p-4441247b.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-7b240f39.js","mappings":";;;;;;;;IAIiB,IAAI,CAkBpB;AAlBD,WAAiB,IAAI;IAOpB,IAAiB,OAAO,CAQvB;IARD,WAAiB,OAAO;QACV,YAAI,GAAGA,MAAW,CAAU;YACxC,KAAK,EAAEC,GAAQ,EAAE;YACjB,YAAY,EAAEC,OAAY,EAAE;YAC5B,QAAQ,EAAEA,OAAY,EAAE,CAAC,QAAQ,EAAE;YACnC,MAAM,EAAEC,YAAa,EAAE;SACvB,CAAC,CAAA;QACW,UAAE,GAAG,QAAA,IAAI,CAAC,EAAE,CAAA;KACzB,EARgB,OAAO,GAAP,YAAO,KAAP,YAAO,QAQvB;IACY,SAAI,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAO,EAAE,CAAC,CAAA;IACpC,OAAE,GAAG,KAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EAlBgB,IAAI,KAAJ,IAAI;;ACJrB,MAAM,QAAQ,GAAG,yzTAAyzT,CAAC;AAC30T,kCAAe,QAAQ;;MC0BV,mBAAmB;;;;;;;;;;QAE/B,2BAAsB,GAAG,KAAK,CAAA;QACtB,iBAAY,GAA8B,EAAE,CAAA;QAC5C,wBAAmB,GAAG,KAAK,CAAA;QAC3B,aAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QAKzC,UAAK,GAA8B,EAAE,CAAA;QAsBrC,aAAQ,GAAG,KAAK,CAAA;uBAnBqB,KAAK;;oBAElB,UAAU;;;yBAGL,IAAI;4BACwB,IAAI;wBAClB,KAAK;wBACpB,KAAK;0BACH,KAAK;;wBAEP,KAAK;yBACrB,IAAI;uBACW,KAAK;;;wBAGr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AE,CAAA;gBACnB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAA;gBAChB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAA;aACpB,GACA,EACD,IAAI,CAAC,OAAO,KACZ,sEACC,IAAI,EAAC,KAAK,EACV,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,CAAC;gBACT,CAAC,CAAC,eAAe,EAAE,CAAA;gBACnB,IAAI,CAAC,OAAO,EAAE,CAAA;aACd,GACA,CACF,CACI,CACN,EACD,8DAAQ,EACP,IAAI,CAAC,UAAU,CACX,CACA,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["isly.object","isly.any","isly.boolean","isly.function"],"sources":["src/components/item/Item.ts","src/components/input/select/style.css?tag=smoothly-input-select&encapsulation=scoped","src/components/input/select/index.tsx"],"sourcesContent":["import { isly } from \"isly\"\n\nexport interface Item extends Item.Element {}\n\nexport namespace Item {\n\texport interface Element {\n\t\tvalue: any\n\t\tselected?: boolean\n\t\tdeselectable: boolean\n\t\tfilter: (filter: string) => Promise<void>\n\t}\n\texport namespace Element {\n\t\texport const type = isly.object<Element>({\n\t\t\tvalue: isly.any(),\n\t\t\tdeselectable: isly.boolean(),\n\t\t\tselected: isly.boolean().optional(),\n\t\t\tfilter: isly.function(),\n\t\t})\n\t\texport const is = type.is\n\t}\n\texport const type = Element.type.extend<Item>({})\n\texport const is = type.is\n}\n","@import \"../shared.css\";\n\n:host {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tflex-direction: row;\n\tposition: relative;\n\tbackground-color: rgb(var(--smoothly-input-background));\n\tcolor: rgb(var(--smoothly-input-foreground));\n\tfill: rgb(var(--smoothly-input-foreground));\n\tstroke: rgb(var(--smoothly-input-foreground));\n\tpadding-left: var(--input-padding-side);\n}\n\n:host.open {\n\tborder-radius: var(--smoothly-input-border-radius) var(--smoothly-input-border-radius) 0 0;\n}\n\n:host.icon {\n\twidth: fit-content;\n\tflex-direction: column;\n}\n\n:host>div.select-display {\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tpadding: var(--input-value-padding-top) .8rem var(--input-value-padding-bottom) 0;\n\toverflow: hidden;\n\twidth: 100%;\n\twhite-space: nowrap;\n\tgap: 1rem;\n\ttext-overflow: ellipsis;\n}\n:host:not([readonly]):not([disabled])>div.select-display {\n\tcursor: pointer;\n}\n\n:host:not(:has([slot=label]))>div.select-display,\n:host:not([show-label])>div.select-display {\n\tpadding: .6rem .8rem .6rem 0;\n\talign-items: center;\n}\n\n:host>div.select-display smoothly-icon {\n\tcolor: rgb(var(--smoothly-input-foreground));\n\tfill: rgb(var(--smoothly-input-foreground));\n\tstroke: rgb(var(--smoothly-input-foreground));\n}\n\n:host>div.icons {\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n}\n\n:host:hover>div.icons::slotted(smoothly-icon) {\n\tfilter: opacity(100%);\n}\n\n:host>div.icons>smoothly-icon[name=caret-down-outline],\n:host>div.icons>smoothly-icon[name=caret-forward-outline] {\n\topacity: .7;\n\theight: 100%;\n\tpadding-inline: var(--input-padding-side);\n}\n:host:not([readonly]):not([disabled])>div.icons>smoothly-icon[name=caret-down-outline],\n:host:not([readonly]):not([disabled])>div.icons>smoothly-icon[name=caret-forward-outline] {\n\tcursor: pointer;\n}\n\n:host[invalid]>div>smoothly-icon.smoothly-invalid {\n\tdisplay: block;\n\tpadding: 0.5rem;\n}\n\n:host>div>smoothly-icon.smoothly-invalid {\n\tdisplay: none\n}\n\n:host .label {\n\tleft: .5rem;\n}\n\n:host.has-value:has([slot=label]:not(:empty))>div.select-display,\n:host:not(.has-value)[placeholder]>div.select-display {\n\toverflow: hidden;\n\twidth: 100%;\n}\n\n:host>.options {\n\tdisplay: flex;\n\tflex-direction: column;\n\tposition: absolute;\n\ttop: var(--element-height);\n\tz-index: 10;\n\tmax-height: var(--menu-height, unset);\n\toverflow-x: hidden;\n\toverflow-y: auto;\n\tbackground-color: rgb(var(--smoothly-input-background));\n\tleft: 0;\n\tright: 0;\n\tborder-radius: 0 0 var(--smoothly-input-border-radius) var(--smoothly-input-border-radius);\n\tmin-width: fit-content;\n\tborder: rgb(var(--smoothly-input-border, var(--smoothly-color-contrast))) solid 1px;\n\tborder-top: rgba(var(--smoothly-input-border, var(--smoothly-color-contrast)), .4) solid 1px;\n}\n:host[looks=\"grid\"]>div.options,\n:host[looks=border]>div.options,\n:host[looks=\"transparent\"]>div.options {\n\tleft: -1px;\n\tright: -1px;\n}\n:host[multiple]>div.options>smoothly-item::before {\n\tcontent: \"\";\n\tdisplay: inline-block;\n\twidth: 1rem;\n\theight: 1rem;\n\tmargin-right: 0.5rem;\n\tborder: 1px solid rgb(var(--smoothly-input-foreground));\n\tborder-radius: 0.15rem;\n\tvertical-align: middle;\n}\n:host[multiple]>div.options>smoothly-item[selected]::after {\n\tcontent: \"✔\";\n\tposition: absolute;\n\tleft: 0.65rem; \n\tcolor: rgb(var(--smoothly-item-selected-foreground))\n}\n:host[multiple]>div.options>smoothly-item[selected]::before {\n\tborder: 1px solid rgb(var(--smoothly-item-selected-foreground));\n}\n:host[multiple]>div.options>smoothly-item[selected]::after {\n\tcolor: rgb(var(--smoothly-item-selected-foreground));\n}\n:host[multiple]>div.options>smoothly-item:hover::before {\n\tborder: 1px solid rgb(var(--smoothly-item-hover-foreground));\n}\n:host[multiple]>div.options>smoothly-item:hover::after {\n\tcolor: rgb(var(--smoothly-item-hover-foreground));\n}\n:host>div.options::slotted(smoothly-item),\n:host>div.options::slotted(div.search-preview) {\n\tpadding: .7rem .7rem .7rem .25rem;\n}\n\n:host>div.options::slotted(div.search-preview) {\n\tdisplay: flex;\n\tposition: sticky;\n\ttop: 0;\n\tgap: 1rem;\n\tbackground-color: rgb(var(--smoothly-input-background));\n\tcolor: rgb(var(--smoothly-color-contrast));\n\tfill: rgb(var(--smoothly-color-contrast));\n\tstroke: rgb(var(--smoothly-color-contrast));\n}\n:host>div.options::slotted(div.search-preview)::before {\n\t/* Hack to not make the search-preview have opacity without showing what is underneath */\n\tcontent: \"\";\n\tposition: absolute;\n\tinset: 0;\n\tbackground-color: rgba(var(--smoothly-primary-tint), 0.5);\n\tz-index: -1;\n}\n\n:host>div.options>div.search-preview>smoothly-icon[name=\"backspace-outline\"] {\n\tmargin-left: auto;\n\tmargin-right: 0;\n}\n\n:host>div.options.hidden {\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\tState,\n\tVNode,\n\tWatch,\n} from \"@stencil/core\"\nimport { Color, Data } from \"../../../model\"\nimport { Item } from \"../../item/Item\"\nimport { Clearable } from \"../Clearable\"\nimport { Editable } from \"../Editable\"\nimport { Input } from \"../Input\"\nimport { Looks } from \"../Looks\"\n\n@Component({\n\ttag: \"smoothly-input-select\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyInputSelect implements Input, Editable, Clearable, ComponentWillLoad {\n\tparent: Editable | undefined\n\tisDifferentFromInitial = false\n\tprivate initialValue: HTMLSmoothlyItemElement[] = []\n\tprivate initialValueHandled = false\n\tprivate observer = Editable.Observer.create(this)\n\tprivate displaySelectedElement?: HTMLElement\n\tprivate iconsDiv?: HTMLElement\n\tprivate toggle?: HTMLElement\n\tprivate optionsDiv?: HTMLDivElement\n\tprivate items: HTMLSmoothlyItemElement[] = []\n\tprivate itemHeight: number | undefined\n\t@Element() element: HTMLSmoothlyInputSelectElement\n\t@Prop({ reflect: true }) invalid?: boolean = false\n\t@Prop({ reflect: true }) errorMessage?: string\n\t@Prop({ reflect: true }) name = \"selected\"\n\t@Prop({ reflect: true, mutable: true }) color?: Color\n\t@Prop({ reflect: true, mutable: true }) looks?: Looks\n\t@Prop({ reflect: true }) showLabel = true\n\t@Prop({ reflect: true, mutable: true }) showSelected?: boolean = true\n\t@Prop({ reflect: true, mutable: true }) readonly = false\n\t@Prop({ reflect: true }) disabled = false\n\t@Prop({ reflect: true }) inCalendar = false\n\t@Prop({ reflect: true }) ordered?: boolean\n\t@Prop({ reflect: true }) multiple = false\n\t@Prop() clearable = true\n\t@Prop({ mutable: true }) defined = false\n\t@Prop({ reflect: true }) placeholder?: string | any\n\t@Prop() menuHeight?: `${number}${\"items\" | \"rem\" | \"px\" | \"vh\"}`\n\t@Prop() required = false\n\t@Prop() searchDisabled = false\n\t@Prop() mutable = false\n\tprivate lastOpen = false\n\t@State() open = false\n\t@State() selected: HTMLSmoothlyItemElement[] = []\n\t@State() filter = \"\"\n\t@State() addedItems: HTMLSmoothlyItemElement[] = []\n\t@Event() smoothlyInput: EventEmitter<Data>\n\t@Event() smoothlyUserInput: EventEmitter<Input.UserInput>\n\t@Event() smoothlyInputLooks: EventEmitter<(looks?: Looks, color?: Color) => void>\n\t@Event() smoothlyInputLoad: EventEmitter<(parent: Editable) => void>\n\t@Event() smoothlyFormDisable: EventEmitter<(disabled: boolean) => void>\n\t@Event() smoothlyItemSelect: EventEmitter<HTMLSmoothlyItemElement>\n\n\tcomponentWillLoad(): void | Promise<void> {\n\t\tthis.smoothlyInputLooks.emit(\n\t\t\t(looks, color) => ((this.looks = this.looks ?? looks), !this.color && (this.color = color))\n\t\t)\n\t\tthis.smoothlyInputLoad.emit(parent => (this.parent = parent))\n\t\t!this.readonly && this.smoothlyFormDisable.emit(readonly => (this.readonly = readonly))\n\t\tthis.observer.publish()\n\t}\n\tcomponentDidLoad(): void | Promise<void> {\n\t\tthis.selected && !this.initialValueHandled && (this.initialValue = [...this.selected])\n\t\tthis.initialValueHandled = true\n\t\tthis.onSelectedChange()\n\t}\n\tcomponentDidRender(): void | Promise<void> {\n\t\tthis.itemHeight === undefined && (this.itemHeight = this.items.find(item => item.clientHeight > 0)?.clientHeight)\n\t\tif (this.menuHeight && this.itemHeight) {\n\t\t\tthis.element?.style.setProperty(\n\t\t\t\t\"--menu-height\",\n\t\t\t\t!this.menuHeight.endsWith(\"items\") || this.items.length == 0\n\t\t\t\t\t? this.menuHeight\n\t\t\t\t\t: `${this.itemHeight * +(this.menuHeight.match(/^(\\d+(\\.\\d+)?|\\.\\d+)/g)?.[0] ?? \"10\")}px`\n\t\t\t)\n\t\t}\n\t\tthis.element?.style.setProperty(\"--element-height\", `${this.element.clientHeight}px`)\n\n\t\tif (this.ordered && !this.multiple && this.open && !this.lastOpen) {\n\t\t\tthis.scrollToSelected()\n\t\t}\n\t}\n\tasync disconnectedCallback() {\n\t\tif (!this.element.isConnected)\n\t\t\tawait this.unregister()\n\t}\n\t@Watch(\"name\")\n\tnameChange(_: string | undefined, oldName: string | undefined) {\n\t\tInput.formRename(this, oldName)\n\t}\n\t@Method()\n\tasync register() {\n\t\tInput.formAdd(this)\n\t}\n\t@Method()\n\tasync unregister() {\n\t\tInput.formRemove(this)\n\t}\n\t@Method()\n\tasync getValue(): Promise<any | any[] | undefined> {\n\t\treturn !this.multiple && this.selected[0]\n\t\t\t? this.selected[0].value\n\t\t\t: this.multiple && this.selected.length > 0\n\t\t\t? this.selected.map(item => item.value)\n\t\t\t: undefined\n\t}\n\t@Method()\n\tasync getItems(): Promise<HTMLSmoothlyItemElement[]> {\n\t\treturn this.items\n\t}\n\t@Method()\n\tasync listen(listener: Editable.Observer.Listener): Promise<void> {\n\t\tthis.observer.subscribe(listener)\n\t}\n\t@Method()\n\tasync reset(): Promise<void> {\n\t\tthis.selected.forEach(item => (item.selected = item.hidden = false))\n\t\tthis.initialValue.forEach(item => (item.selected = true))\n\t\tthis.selected = [...this.initialValue]\n\t\tthis.displaySelected()\n\t\tthis.isDifferentFromInitial = false\n\t\tthis.open && this.handleShowOptions()\n\t}\n\n\t@Method()\n\tasync clear(): Promise<void> {\n\t\tif (this.clearable) {\n\t\t\tthis.selected.forEach(item => (item.selected = item.hidden = false))\n\t\t\tthis.selected = []\n\t\t\tif (this.displaySelectedElement) {\n\t\t\t\tthis.displaySelectedElement.innerHTML = this.placeholder ?? \"\"\n\t\t\t}\n\t\t}\n\t}\n\t@Method()\n\tasync edit(editable: boolean): Promise<void> {\n\t\tthis.readonly = !editable\n\t}\n\t@Method()\n\tasync setInitialValue(): Promise<void> {\n\t\tthis.isDifferentFromInitial = false\n\t\tthis.initialValue = [...this.selected]\n\t}\n\t@Watch(\"selected\")\n\tasync onSelectedChange() {\n\t\tthis.initialValueHandled && (this.isDifferentFromInitial = !this.areValuesEqual(this.selected, this.initialValue))\n\t\tthis.defined = this.selected.length > 0\n\t\tthis.smoothlyInput.emit({ [this.name]: await this.getValue() })\n\t\tthis.observer.publish()\n\t}\n\t@Watch(\"required\")\n\tonRequiredChange(): void {\n\t\tthis.items.forEach(item => (item.deselectable = !this.required))\n\t}\n\t@Watch(\"filter\")\n\tasync onFilterChange(value: string): Promise<void> {\n\t\tvalue = value.toLowerCase()\n\t\tawait Promise.all(this.items.map(item => item.filter(value)))\n\t}\n\t@Watch(\"disabled\")\n\t@Watch(\"readonly\")\n\twatchingReadonly(): void {\n\t\tthis.observer.publish()\n\t}\n\t@Listen(\"smoothlyInputLoad\")\n\tasync smoothlyInputLoadHandler(event: CustomEvent<(parent: SmoothlyInputSelect) => void>): Promise<void> {\n\t\tif (\n\t\t\tevent.target &&\n\t\t\t((\"name\" in event.target && event.target.name !== this.name) ||\n\t\t\t\t(event.composedPath().some(e => e == this.iconsDiv) && !event.composedPath().some(e => e == this.toggle)))\n\t\t) {\n\t\t\tevent.stopPropagation()\n\t\t} else if (Item.Element.is(event.target)) {\n\t\t\tevent.stopPropagation()\n\t\t\tevent.target.deselectable = !this.required\n\t\t\tthis.items.push(event.target as HTMLSmoothlyItemElement)\n\t\t}\n\t\tInput.registerSubAction(this, event)\n\t\tthis.displaySelected()\n\t}\n\t@Listen(\"click\", { target: \"window\" })\n\tonWindowClick(event: Event): void {\n\t\t!event.composedPath().includes(this.element) && this.open && this.handleShowOptions()\n\t}\n\t@Listen(\"smoothlyItemDOMChange\")\n\tonItemDomChange(e: CustomEvent) {\n\t\te.stopPropagation()\n\t\tconst item = e.target as HTMLSmoothlyItemElement\n\t\tif (item.selected)\n\t\t\tthis.displaySelected()\n\t}\n\t@Listen(\"smoothlyItemSelect\")\n\tasync onItemSelect(event: CustomEvent<{ userInitiated: boolean; item: HTMLSmoothlyItemElement }>): Promise<void> {\n\t\tevent.stopPropagation()\n\t\tconst item = event.detail.item\n\t\tif (this.multiple) {\n\t\t\tthis.selected = item.selected ? [...this.selected, item] : this.selected.filter(item => item.selected)\n\t\t} else if (item.selected || !this.items.some(e => e.selected)) {\n\t\t\tthis.selected[0] && (this.selected[0].hidden = this.selected[0].selected = false)\n\t\t\tthis.selected = !item.selected ? this.selected.filter(item => item.selected) : [item]\n\t\t\t!this.showSelected && item.selected && (item.hidden = true)\n\t\t}\n\t\tthis.displaySelected()\n\t\tif (event.detail.userInitiated)\n\t\t\tthis.smoothlyUserInput.emit({ name: this.name, value: await this.getValue() })\n\t}\n\t@Watch(\"open\")\n\tonClosed(open: boolean, before: boolean): void {\n\t\tthis.lastOpen = before\n\t\tif (!open) {\n\t\t\tconst markedItem = this.items.find(item => item.marked)\n\t\t\tif (markedItem) {\n\t\t\t\tmarkedItem.marked = false\n\t\t\t}\n\t\t}\n\t}\n\thandleShowOptions(event?: Event): void {\n\t\tconst wasButtonClicked =\n\t\t\tevent?.composedPath().some(e => e == this.iconsDiv) && !event.composedPath().some(e => e == this.toggle)\n\t\tconst clickedItem = event\n\t\t\t?.composedPath()\n\t\t\t.find((el): el is HTMLSmoothlyItemElement => \"tagName\" in el && el.tagName == \"SMOOTHLY-ITEM\")\n\t\t!this.readonly &&\n\t\t\t!this.disabled &&\n\t\t\t!(clickedItem && this.items.includes(clickedItem) && this.multiple) &&\n\t\t\t!wasButtonClicked &&\n\t\t\t(this.open = !this.open)\n\t\tthis.filter = \"\"\n\t}\n\tareValuesEqual(selected: HTMLSmoothlyItemElement[], initialValue: HTMLSmoothlyItemElement[]): boolean {\n\t\treturn selected.length === initialValue.length && initialValue.every(value => selected.includes(value))\n\t}\n\tdisplaySelected(): void {\n\t\tconst displayString: string = this.selected.map(option => `<div>${option.innerHTML}</div>`).join(\"\")\n\t\tthis.displaySelectedElement &&\n\t\t\t(this.displaySelectedElement.innerHTML = this.selected.length > 0 ? displayString : this.placeholder ?? \"\")\n\t}\n\t@Listen(\"keydown\")\n\tonKeyDown(event: KeyboardEvent) {\n\t\tif (!this.searchDisabled) {\n\t\t\tevent.stopPropagation()\n\t\t\tconst visibleItems = this.items.some(item => item.getAttribute(\"hidden\") === null)\n\t\t\tif (event.key != \"Tab\" && !event.ctrlKey && !event.metaKey)\n\t\t\t\tevent.preventDefault()\n\t\t\tif (this.open) {\n\t\t\t\tswitch (event.key) {\n\t\t\t\t\tcase \"ArrowUp\":\n\t\t\t\t\t\tvisibleItems && this.move(-1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"ArrowDown\":\n\t\t\t\t\t\tvisibleItems && this.move(1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"Escape\":\n\t\t\t\t\t\tif (this.filter == \"\")\n\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthis.filter = \"\"\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"Backspace\":\n\t\t\t\t\t\tthis.filter = event.ctrlKey ? \"\" : this.filter.slice(0, -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"Enter\":\n\t\t\t\t\t\tconst result = this.items.find(item => item.marked)\n\t\t\t\t\t\tif (result?.value)\n\t\t\t\t\t\t\tresult.selected = !result.selected\n\t\t\t\t\t\tif (!this.multiple) {\n\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\t\tthis.filter = \"\"\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"Tab\":\n\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif (event.key.length == 1)\n\t\t\t\t\t\t\tthis.filter += event.key\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch (event.key) {\n\t\t\t\t\tcase \"Enter\":\n\t\t\t\t\tcase \" \":\n\t\t\t\t\t\tthis.handleShowOptions()\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"ArrowDown\":\n\t\t\t\t\t\tthis.handleShowOptions()\n\t\t\t\t\t\tthis.move(1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"ArrowUp\":\n\t\t\t\t\t\tthis.handleShowOptions()\n\t\t\t\t\t\tthis.move(-1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"Tab\":\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthis.handleShowOptions()\n\t\t\t\t\t\tif (event.key.length == 1)\n\t\t\t\t\t\t\tthis.filter += event.key\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tprivate scrollToSelected() {\n\t\tconst selectedItem = this.items.find(item => item.selected)\n\t\tif (selectedItem) {\n\t\t\tthis.items.map(item => (item.marked = false))\n\t\t\tselectedItem.marked = true\n\t\t\tthis.scrollTo(selectedItem, \"instant\")\n\t\t}\n\t}\n\tprivate move(direction: -1 | 1): void {\n\t\tconst selectableItems = this.items.filter(item => !item.hidden && !item.disabled)\n\t\tlet markedIndex = selectableItems.findIndex(item => item.marked)\n\t\tif (markedIndex == -1)\n\t\t\tmarkedIndex = 0\n\t\telse {\n\t\t\tselectableItems[markedIndex].marked = false\n\t\t\tmarkedIndex = (markedIndex + direction + selectableItems.length) % selectableItems.length\n\t\t}\n\t\tselectableItems[markedIndex].marked = true\n\t\tthis.scrollTo(selectableItems[markedIndex], \"smooth\")\n\t}\n\tprivate scrollTo(item: HTMLSmoothlyItemElement, behavior?: \"instant\" | \"smooth\") {\n\t\tthis.optionsDiv?.scrollTo({\n\t\t\ttop: item.offsetTop + item.offsetHeight / 2 - (this.optionsDiv?.clientHeight ?? 0) / 2,\n\t\t\tbehavior,\n\t\t})\n\t}\n\tprivate addItem() {\n\t\tthis.addedItems = this.addedItems.concat(\n\t\t\t<smoothly-item value={this.filter} selected>\n\t\t\t\t{this.filter}\n\t\t\t</smoothly-item>\n\t\t)\n\t}\n\n\trender(): VNode | VNode[] {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\ttabIndex={this.disabled ? undefined : 0}\n\t\t\t\tclass={{ \"has-value\": this.selected.length !== 0, open: this.open }}\n\t\t\t\tonClick={(event: Event) => this.handleShowOptions(event)}>\n\t\t\t\t<div class=\"select-display\" ref={element => (this.displaySelectedElement = element)}>\n\t\t\t\t\t{this.placeholder}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"icons\" ref={element => (this.iconsDiv = element)}>\n\t\t\t\t\t<smoothly-icon class=\"smoothly-invalid\" name=\"alert-circle\" size=\"small\" tooltip={this.errorMessage} />\n\t\t\t\t\t<slot name=\"end\" />\n\t\t\t\t\t{this.looks == \"border\" && !this.readonly && (\n\t\t\t\t\t\t<smoothly-icon\n\t\t\t\t\t\t\tref={element => (this.toggle = element)}\n\t\t\t\t\t\t\tsize=\"tiny\"\n\t\t\t\t\t\t\tname={this.open ? \"caret-down-outline\" : \"caret-forward-outline\"}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<slot name=\"label\" />\n\t\t\t\t<div class={{ hidden: !this.open, options: true }} ref={(el: HTMLDivElement) => (this.optionsDiv = el)}>\n\t\t\t\t\t{this.filter.length > 0 && (\n\t\t\t\t\t\t<div class=\"search-preview\">\n\t\t\t\t\t\t\t<smoothly-icon name=\"search-outline\" size=\"small\" />\n\t\t\t\t\t\t\t{this.filter}\n\t\t\t\t\t\t\t<smoothly-icon\n\t\t\t\t\t\t\t\tname=\"backspace-outline\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tonClick={e => {\n\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\tthis.filter = \"\"\n\t\t\t\t\t\t\t\t\tthis.element.focus()\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{this.mutable && (\n\t\t\t\t\t\t\t\t<smoothly-icon\n\t\t\t\t\t\t\t\t\tname=\"add\"\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\tonClick={e => {\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\tthis.addItem()\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<slot />\n\t\t\t\t\t{this.addedItems}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-4441247b.js","mappings":";;;;;;;;IAIiB,IAAI,CAkBpB;AAlBD,WAAiB,IAAI;IAOpB,IAAiB,OAAO,CAQvB;IARD,WAAiB,OAAO;QACV,YAAI,GAAGA,MAAW,CAAU;YACxC,KAAK,EAAEC,GAAQ,EAAE;YACjB,YAAY,EAAEC,OAAY,EAAE;YAC5B,QAAQ,EAAEA,OAAY,EAAE,CAAC,QAAQ,EAAE;YACnC,MAAM,EAAEC,YAAa,EAAE;SACvB,CAAC,CAAA;QACW,UAAE,GAAG,QAAA,IAAI,CAAC,EAAE,CAAA;KACzB,EARgB,OAAO,GAAP,YAAO,KAAP,YAAO,QAQvB;IACY,SAAI,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAO,EAAE,CAAC,CAAA;IACpC,OAAE,GAAG,KAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EAlBgB,IAAI,KAAJ,IAAI;;ACJrB,MAAM,QAAQ,GAAG,yzTAAyzT,CAAC;AAC30T,kCAAe,QAAQ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MAAM,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,EAAkB,MAAM,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,IACpG,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,KACtB,4DAAK,KAAK,EAAC,gBAAgB,IAC1B,sEAAe,IAAI,EAAC,gBAAgB,EAAC,IAAI,EAAC,OAAO,GAAG,EACnD,IAAI,CAAC,MAAM,EACZ,sEACC,IAAI,EAAC,mBAAmB,EACxB,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,CAAC;gBACT,CAAC,CAAC,eAAe,EAAE,CAAA;gBACnB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAA;gBAChB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAA;aACpB,GACA,EACD,IAAI,CAAC,OAAO,KACZ,sEACC,IAAI,EAAC,KAAK,EACV,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,CAAC;gBACT,CAAC,CAAC,eAAe,EAAE,CAAA;gBACnB,IAAI,CAAC,OAAO,EAAE,CAAA;aACd,GACA,CACF,CACI,CACN,EACD,8DAAQ,EACP,IAAI,CAAC,UAAU,CACX,CACA,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["isly.object","isly.any","isly.boolean","isly.function"],"sources":["src/components/item/Item.ts","src/components/input/select/style.css?tag=smoothly-input-select&encapsulation=scoped","src/components/input/select/index.tsx"],"sourcesContent":["import { isly } from \"isly\"\n\nexport interface Item extends Item.Element {}\n\nexport namespace Item {\n\texport interface Element {\n\t\tvalue: any\n\t\tselected?: boolean\n\t\tdeselectable: boolean\n\t\tfilter: (filter: string) => Promise<void>\n\t}\n\texport namespace Element {\n\t\texport const type = isly.object<Element>({\n\t\t\tvalue: isly.any(),\n\t\t\tdeselectable: isly.boolean(),\n\t\t\tselected: isly.boolean().optional(),\n\t\t\tfilter: isly.function(),\n\t\t})\n\t\texport const is = type.is\n\t}\n\texport const type = Element.type.extend<Item>({})\n\texport const is = type.is\n}\n","@import \"../shared.css\";\n\n:host {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tflex-direction: row;\n\tposition: relative;\n\tbackground-color: rgb(var(--smoothly-input-background));\n\tcolor: rgb(var(--smoothly-input-foreground));\n\tfill: rgb(var(--smoothly-input-foreground));\n\tstroke: rgb(var(--smoothly-input-foreground));\n\tpadding-left: var(--input-padding-side);\n}\n\n:host.open {\n\tborder-radius: var(--smoothly-input-border-radius) var(--smoothly-input-border-radius) 0 0;\n}\n\n:host.icon {\n\twidth: fit-content;\n\tflex-direction: column;\n}\n\n:host>div.select-display {\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tpadding: var(--input-value-padding-top) .8rem var(--input-value-padding-bottom) 0;\n\toverflow: hidden;\n\twidth: 100%;\n\twhite-space: nowrap;\n\tgap: 1rem;\n\ttext-overflow: ellipsis;\n}\n:host:not([readonly]):not([disabled])>div.select-display {\n\tcursor: pointer;\n}\n\n:host:not(:has([slot=label]))>div.select-display,\n:host:not([show-label])>div.select-display {\n\tpadding: .6rem .8rem .6rem 0;\n\talign-items: center;\n}\n\n:host>div.select-display smoothly-icon {\n\tcolor: rgb(var(--smoothly-input-foreground));\n\tfill: rgb(var(--smoothly-input-foreground));\n\tstroke: rgb(var(--smoothly-input-foreground));\n}\n\n:host>div.icons {\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n}\n\n:host:hover>div.icons::slotted(smoothly-icon) {\n\tfilter: opacity(100%);\n}\n\n:host>div.icons>smoothly-icon[name=caret-down-outline],\n:host>div.icons>smoothly-icon[name=caret-forward-outline] {\n\topacity: .7;\n\theight: 100%;\n\tpadding-inline: var(--input-padding-side);\n}\n:host:not([readonly]):not([disabled])>div.icons>smoothly-icon[name=caret-down-outline],\n:host:not([readonly]):not([disabled])>div.icons>smoothly-icon[name=caret-forward-outline] {\n\tcursor: pointer;\n}\n\n:host[invalid]>div>smoothly-icon.smoothly-invalid {\n\tdisplay: block;\n\tpadding: 0.5rem;\n}\n\n:host>div>smoothly-icon.smoothly-invalid {\n\tdisplay: none\n}\n\n:host .label {\n\tleft: .5rem;\n}\n\n:host.has-value:has([slot=label]:not(:empty))>div.select-display,\n:host:not(.has-value)[placeholder]>div.select-display {\n\toverflow: hidden;\n\twidth: 100%;\n}\n\n:host>.options {\n\tdisplay: flex;\n\tflex-direction: column;\n\tposition: absolute;\n\ttop: var(--element-height);\n\tz-index: 20;\n\tmax-height: var(--menu-height, unset);\n\toverflow-x: hidden;\n\toverflow-y: auto;\n\tbackground-color: rgb(var(--smoothly-input-background));\n\tleft: 0;\n\tright: 0;\n\tborder-radius: 0 0 var(--smoothly-input-border-radius) var(--smoothly-input-border-radius);\n\tmin-width: fit-content;\n\tborder: rgb(var(--smoothly-input-border, var(--smoothly-color-contrast))) solid 1px;\n\tborder-top: rgba(var(--smoothly-input-border, var(--smoothly-color-contrast)), .4) solid 1px;\n}\n:host[looks=\"grid\"]>div.options,\n:host[looks=border]>div.options,\n:host[looks=\"transparent\"]>div.options {\n\tleft: -1px;\n\tright: -1px;\n}\n:host[multiple]>div.options>smoothly-item::before {\n\tcontent: \"\";\n\tdisplay: inline-block;\n\twidth: 1rem;\n\theight: 1rem;\n\tmargin-right: 0.5rem;\n\tborder: 1px solid rgb(var(--smoothly-input-foreground));\n\tborder-radius: 0.15rem;\n\tvertical-align: middle;\n}\n:host[multiple]>div.options>smoothly-item[selected]::after {\n\tcontent: \"✔\";\n\tposition: absolute;\n\tleft: 0.65rem; \n\tcolor: rgb(var(--smoothly-item-selected-foreground))\n}\n:host[multiple]>div.options>smoothly-item[selected]::before {\n\tborder: 1px solid rgb(var(--smoothly-item-selected-foreground));\n}\n:host[multiple]>div.options>smoothly-item[selected]::after {\n\tcolor: rgb(var(--smoothly-item-selected-foreground));\n}\n:host[multiple]>div.options>smoothly-item:hover::before {\n\tborder: 1px solid rgb(var(--smoothly-item-hover-foreground));\n}\n:host[multiple]>div.options>smoothly-item:hover::after {\n\tcolor: rgb(var(--smoothly-item-hover-foreground));\n}\n:host>div.options::slotted(smoothly-item),\n:host>div.options::slotted(div.search-preview) {\n\tpadding: .7rem .7rem .7rem .25rem;\n}\n\n:host>div.options::slotted(div.search-preview) {\n\tdisplay: flex;\n\tposition: sticky;\n\ttop: 0;\n\tgap: 1rem;\n\tbackground-color: rgb(var(--smoothly-input-background));\n\tcolor: rgb(var(--smoothly-color-contrast));\n\tfill: rgb(var(--smoothly-color-contrast));\n\tstroke: rgb(var(--smoothly-color-contrast));\n}\n:host>div.options::slotted(div.search-preview)::before {\n\t/* Hack to not make the search-preview have opacity without showing what is underneath */\n\tcontent: \"\";\n\tposition: absolute;\n\tinset: 0;\n\tbackground-color: rgba(var(--smoothly-primary-tint), 0.5);\n\tz-index: -1;\n}\n\n:host>div.options>div.search-preview>smoothly-icon[name=\"backspace-outline\"] {\n\tmargin-left: auto;\n\tmargin-right: 0;\n}\n\n:host>div.options.hidden {\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\tState,\n\tVNode,\n\tWatch,\n} from \"@stencil/core\"\nimport { Color, Data } from \"../../../model\"\nimport { Item } from \"../../item/Item\"\nimport { Clearable } from \"../Clearable\"\nimport { Editable } from \"../Editable\"\nimport { Input } from \"../Input\"\nimport { Looks } from \"../Looks\"\n\n@Component({\n\ttag: \"smoothly-input-select\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyInputSelect implements Input, Editable, Clearable, ComponentWillLoad {\n\tparent: Editable | undefined\n\tisDifferentFromInitial = false\n\tprivate initialValue: HTMLSmoothlyItemElement[] = []\n\tprivate initialValueHandled = false\n\tprivate observer = Editable.Observer.create(this)\n\tprivate displaySelectedElement?: HTMLElement\n\tprivate iconsDiv?: HTMLElement\n\tprivate toggle?: HTMLElement\n\tprivate optionsDiv?: HTMLDivElement\n\tprivate items: HTMLSmoothlyItemElement[] = []\n\tprivate itemHeight: number | undefined\n\t@Element() element: HTMLSmoothlyInputSelectElement\n\t@Prop({ reflect: true }) invalid?: boolean = false\n\t@Prop({ reflect: true }) errorMessage?: string\n\t@Prop({ reflect: true }) name = \"selected\"\n\t@Prop({ reflect: true, mutable: true }) color?: Color\n\t@Prop({ reflect: true, mutable: true }) looks?: Looks\n\t@Prop({ reflect: true }) showLabel = true\n\t@Prop({ reflect: true, mutable: true }) showSelected?: boolean = true\n\t@Prop({ reflect: true, mutable: true }) readonly = false\n\t@Prop({ reflect: true }) disabled = false\n\t@Prop({ reflect: true }) inCalendar = false\n\t@Prop({ reflect: true }) ordered?: boolean\n\t@Prop({ reflect: true }) multiple = false\n\t@Prop() clearable = true\n\t@Prop({ mutable: true }) defined = false\n\t@Prop({ reflect: true }) placeholder?: string | any\n\t@Prop() menuHeight?: `${number}${\"items\" | \"rem\" | \"px\" | \"vh\"}`\n\t@Prop() required = false\n\t@Prop() searchDisabled = false\n\t@Prop() mutable = false\n\tprivate lastOpen = false\n\t@State() open = false\n\t@State() selected: HTMLSmoothlyItemElement[] = []\n\t@State() filter = \"\"\n\t@State() addedItems: HTMLSmoothlyItemElement[] = []\n\t@Event() smoothlyInput: EventEmitter<Data>\n\t@Event() smoothlyUserInput: EventEmitter<Input.UserInput>\n\t@Event() smoothlyInputLooks: EventEmitter<(looks?: Looks, color?: Color) => void>\n\t@Event() smoothlyInputLoad: EventEmitter<(parent: Editable) => void>\n\t@Event() smoothlyFormDisable: EventEmitter<(disabled: boolean) => void>\n\t@Event() smoothlyItemSelect: EventEmitter<HTMLSmoothlyItemElement>\n\n\tcomponentWillLoad(): void | Promise<void> {\n\t\tthis.smoothlyInputLooks.emit(\n\t\t\t(looks, color) => ((this.looks = this.looks ?? looks), !this.color && (this.color = color))\n\t\t)\n\t\tthis.smoothlyInputLoad.emit(parent => (this.parent = parent))\n\t\t!this.readonly && this.smoothlyFormDisable.emit(readonly => (this.readonly = readonly))\n\t\tthis.observer.publish()\n\t}\n\tcomponentDidLoad(): void | Promise<void> {\n\t\tthis.selected && !this.initialValueHandled && (this.initialValue = [...this.selected])\n\t\tthis.initialValueHandled = true\n\t\tthis.onSelectedChange()\n\t}\n\tcomponentDidRender(): void | Promise<void> {\n\t\tthis.itemHeight === undefined && (this.itemHeight = this.items.find(item => item.clientHeight > 0)?.clientHeight)\n\t\tif (this.menuHeight && this.itemHeight) {\n\t\t\tthis.element?.style.setProperty(\n\t\t\t\t\"--menu-height\",\n\t\t\t\t!this.menuHeight.endsWith(\"items\") || this.items.length == 0\n\t\t\t\t\t? this.menuHeight\n\t\t\t\t\t: `${this.itemHeight * +(this.menuHeight.match(/^(\\d+(\\.\\d+)?|\\.\\d+)/g)?.[0] ?? \"10\")}px`\n\t\t\t)\n\t\t}\n\t\tthis.element?.style.setProperty(\"--element-height\", `${this.element.clientHeight}px`)\n\n\t\tif (this.ordered && !this.multiple && this.open && !this.lastOpen) {\n\t\t\tthis.scrollToSelected()\n\t\t}\n\t}\n\tasync disconnectedCallback() {\n\t\tif (!this.element.isConnected)\n\t\t\tawait this.unregister()\n\t}\n\t@Watch(\"name\")\n\tnameChange(_: string | undefined, oldName: string | undefined) {\n\t\tInput.formRename(this, oldName)\n\t}\n\t@Method()\n\tasync register() {\n\t\tInput.formAdd(this)\n\t}\n\t@Method()\n\tasync unregister() {\n\t\tInput.formRemove(this)\n\t}\n\t@Method()\n\tasync getValue(): Promise<any | any[] | undefined> {\n\t\treturn !this.multiple && this.selected[0]\n\t\t\t? this.selected[0].value\n\t\t\t: this.multiple && this.selected.length > 0\n\t\t\t? this.selected.map(item => item.value)\n\t\t\t: undefined\n\t}\n\t@Method()\n\tasync getItems(): Promise<HTMLSmoothlyItemElement[]> {\n\t\treturn this.items\n\t}\n\t@Method()\n\tasync listen(listener: Editable.Observer.Listener): Promise<void> {\n\t\tthis.observer.subscribe(listener)\n\t}\n\t@Method()\n\tasync reset(): Promise<void> {\n\t\tthis.selected.forEach(item => (item.selected = item.hidden = false))\n\t\tthis.initialValue.forEach(item => (item.selected = true))\n\t\tthis.selected = [...this.initialValue]\n\t\tthis.displaySelected()\n\t\tthis.isDifferentFromInitial = false\n\t\tthis.open && this.handleShowOptions()\n\t}\n\n\t@Method()\n\tasync clear(): Promise<void> {\n\t\tif (this.clearable) {\n\t\t\tthis.selected.forEach(item => (item.selected = item.hidden = false))\n\t\t\tthis.selected = []\n\t\t\tif (this.displaySelectedElement) {\n\t\t\t\tthis.displaySelectedElement.innerHTML = this.placeholder ?? \"\"\n\t\t\t}\n\t\t}\n\t}\n\t@Method()\n\tasync edit(editable: boolean): Promise<void> {\n\t\tthis.readonly = !editable\n\t}\n\t@Method()\n\tasync setInitialValue(): Promise<void> {\n\t\tthis.isDifferentFromInitial = false\n\t\tthis.initialValue = [...this.selected]\n\t}\n\t@Watch(\"selected\")\n\tasync onSelectedChange() {\n\t\tthis.initialValueHandled && (this.isDifferentFromInitial = !this.areValuesEqual(this.selected, this.initialValue))\n\t\tthis.defined = this.selected.length > 0\n\t\tthis.smoothlyInput.emit({ [this.name]: await this.getValue() })\n\t\tthis.observer.publish()\n\t}\n\t@Watch(\"required\")\n\tonRequiredChange(): void {\n\t\tthis.items.forEach(item => (item.deselectable = !this.required))\n\t}\n\t@Watch(\"filter\")\n\tasync onFilterChange(value: string): Promise<void> {\n\t\tvalue = value.toLowerCase()\n\t\tawait Promise.all(this.items.map(item => item.filter(value)))\n\t}\n\t@Watch(\"disabled\")\n\t@Watch(\"readonly\")\n\twatchingReadonly(): void {\n\t\tthis.observer.publish()\n\t}\n\t@Listen(\"smoothlyInputLoad\")\n\tasync smoothlyInputLoadHandler(event: CustomEvent<(parent: SmoothlyInputSelect) => void>): Promise<void> {\n\t\tif (\n\t\t\tevent.target &&\n\t\t\t((\"name\" in event.target && event.target.name !== this.name) ||\n\t\t\t\t(event.composedPath().some(e => e == this.iconsDiv) && !event.composedPath().some(e => e == this.toggle)))\n\t\t) {\n\t\t\tevent.stopPropagation()\n\t\t} else if (Item.Element.is(event.target)) {\n\t\t\tevent.stopPropagation()\n\t\t\tevent.target.deselectable = !this.required\n\t\t\tthis.items.push(event.target as HTMLSmoothlyItemElement)\n\t\t}\n\t\tInput.registerSubAction(this, event)\n\t\tthis.displaySelected()\n\t}\n\t@Listen(\"click\", { target: \"window\" })\n\tonWindowClick(event: Event): void {\n\t\t!event.composedPath().includes(this.element) && this.open && this.handleShowOptions()\n\t}\n\t@Listen(\"smoothlyItemDOMChange\")\n\tonItemDomChange(e: CustomEvent) {\n\t\te.stopPropagation()\n\t\tconst item = e.target as HTMLSmoothlyItemElement\n\t\tif (item.selected)\n\t\t\tthis.displaySelected()\n\t}\n\t@Listen(\"smoothlyItemSelect\")\n\tasync onItemSelect(event: CustomEvent<{ userInitiated: boolean; item: HTMLSmoothlyItemElement }>): Promise<void> {\n\t\tevent.stopPropagation()\n\t\tconst item = event.detail.item\n\t\tif (this.multiple) {\n\t\t\tthis.selected = item.selected ? [...this.selected, item] : this.selected.filter(item => item.selected)\n\t\t} else if (item.selected || !this.items.some(e => e.selected)) {\n\t\t\tthis.selected[0] && (this.selected[0].hidden = this.selected[0].selected = false)\n\t\t\tthis.selected = !item.selected ? this.selected.filter(item => item.selected) : [item]\n\t\t\t!this.showSelected && item.selected && (item.hidden = true)\n\t\t}\n\t\tthis.displaySelected()\n\t\tif (event.detail.userInitiated)\n\t\t\tthis.smoothlyUserInput.emit({ name: this.name, value: await this.getValue() })\n\t}\n\t@Watch(\"open\")\n\tonClosed(open: boolean, before: boolean): void {\n\t\tthis.lastOpen = before\n\t\tif (!open) {\n\t\t\tconst markedItem = this.items.find(item => item.marked)\n\t\t\tif (markedItem) {\n\t\t\t\tmarkedItem.marked = false\n\t\t\t}\n\t\t}\n\t}\n\thandleShowOptions(event?: Event): void {\n\t\tconst wasButtonClicked =\n\t\t\tevent?.composedPath().some(e => e == this.iconsDiv) && !event.composedPath().some(e => e == this.toggle)\n\t\tconst clickedItem = event\n\t\t\t?.composedPath()\n\t\t\t.find((el): el is HTMLSmoothlyItemElement => \"tagName\" in el && el.tagName == \"SMOOTHLY-ITEM\")\n\t\t!this.readonly &&\n\t\t\t!this.disabled &&\n\t\t\t!(clickedItem && this.items.includes(clickedItem) && this.multiple) &&\n\t\t\t!wasButtonClicked &&\n\t\t\t(this.open = !this.open)\n\t\tthis.filter = \"\"\n\t}\n\tareValuesEqual(selected: HTMLSmoothlyItemElement[], initialValue: HTMLSmoothlyItemElement[]): boolean {\n\t\treturn selected.length === initialValue.length && initialValue.every(value => selected.includes(value))\n\t}\n\tdisplaySelected(): void {\n\t\tconst displayString: string = this.selected.map(option => `<div>${option.innerHTML}</div>`).join(\"\")\n\t\tthis.displaySelectedElement &&\n\t\t\t(this.displaySelectedElement.innerHTML = this.selected.length > 0 ? displayString : this.placeholder ?? \"\")\n\t}\n\t@Listen(\"keydown\")\n\tonKeyDown(event: KeyboardEvent) {\n\t\tif (!this.searchDisabled) {\n\t\t\tevent.stopPropagation()\n\t\t\tconst visibleItems = this.items.some(item => item.getAttribute(\"hidden\") === null)\n\t\t\tif (event.key != \"Tab\" && !event.ctrlKey && !event.metaKey)\n\t\t\t\tevent.preventDefault()\n\t\t\tif (this.open) {\n\t\t\t\tswitch (event.key) {\n\t\t\t\t\tcase \"ArrowUp\":\n\t\t\t\t\t\tvisibleItems && this.move(-1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"ArrowDown\":\n\t\t\t\t\t\tvisibleItems && this.move(1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"Escape\":\n\t\t\t\t\t\tif (this.filter == \"\")\n\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthis.filter = \"\"\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"Backspace\":\n\t\t\t\t\t\tthis.filter = event.ctrlKey ? \"\" : this.filter.slice(0, -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"Enter\":\n\t\t\t\t\t\tconst result = this.items.find(item => item.marked)\n\t\t\t\t\t\tif (result?.value)\n\t\t\t\t\t\t\tresult.selected = !result.selected\n\t\t\t\t\t\tif (!this.multiple) {\n\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\t\tthis.filter = \"\"\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"Tab\":\n\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif (event.key.length == 1)\n\t\t\t\t\t\t\tthis.filter += event.key\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch (event.key) {\n\t\t\t\t\tcase \"Enter\":\n\t\t\t\t\tcase \" \":\n\t\t\t\t\t\tthis.handleShowOptions()\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"ArrowDown\":\n\t\t\t\t\t\tthis.handleShowOptions()\n\t\t\t\t\t\tthis.move(1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"ArrowUp\":\n\t\t\t\t\t\tthis.handleShowOptions()\n\t\t\t\t\t\tthis.move(-1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"Tab\":\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthis.handleShowOptions()\n\t\t\t\t\t\tif (event.key.length == 1)\n\t\t\t\t\t\t\tthis.filter += event.key\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tprivate scrollToSelected() {\n\t\tconst selectedItem = this.items.find(item => item.selected)\n\t\tif (selectedItem) {\n\t\t\tthis.items.map(item => (item.marked = false))\n\t\t\tselectedItem.marked = true\n\t\t\tthis.scrollTo(selectedItem, \"instant\")\n\t\t}\n\t}\n\tprivate move(direction: -1 | 1): void {\n\t\tconst selectableItems = this.items.filter(item => !item.hidden && !item.disabled)\n\t\tlet markedIndex = selectableItems.findIndex(item => item.marked)\n\t\tif (markedIndex == -1)\n\t\t\tmarkedIndex = 0\n\t\telse {\n\t\t\tselectableItems[markedIndex].marked = false\n\t\t\tmarkedIndex = (markedIndex + direction + selectableItems.length) % selectableItems.length\n\t\t}\n\t\tselectableItems[markedIndex].marked = true\n\t\tthis.scrollTo(selectableItems[markedIndex], \"smooth\")\n\t}\n\tprivate scrollTo(item: HTMLSmoothlyItemElement, behavior?: \"instant\" | \"smooth\") {\n\t\tthis.optionsDiv?.scrollTo({\n\t\t\ttop: item.offsetTop + item.offsetHeight / 2 - (this.optionsDiv?.clientHeight ?? 0) / 2,\n\t\t\tbehavior,\n\t\t})\n\t}\n\tprivate addItem() {\n\t\tthis.addedItems = this.addedItems.concat(\n\t\t\t<smoothly-item value={this.filter} selected>\n\t\t\t\t{this.filter}\n\t\t\t</smoothly-item>\n\t\t)\n\t}\n\n\trender(): VNode | VNode[] {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\ttabIndex={this.disabled ? undefined : 0}\n\t\t\t\tclass={{ \"has-value\": this.selected.length !== 0, open: this.open }}\n\t\t\t\tonClick={(event: Event) => this.handleShowOptions(event)}>\n\t\t\t\t<div class=\"select-display\" ref={element => (this.displaySelectedElement = element)}>\n\t\t\t\t\t{this.placeholder}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"icons\" ref={element => (this.iconsDiv = element)}>\n\t\t\t\t\t<smoothly-icon class=\"smoothly-invalid\" name=\"alert-circle\" size=\"small\" tooltip={this.errorMessage} />\n\t\t\t\t\t<slot name=\"end\" />\n\t\t\t\t\t{this.looks == \"border\" && !this.readonly && (\n\t\t\t\t\t\t<smoothly-icon\n\t\t\t\t\t\t\tref={element => (this.toggle = element)}\n\t\t\t\t\t\t\tsize=\"tiny\"\n\t\t\t\t\t\t\tname={this.open ? \"caret-down-outline\" : \"caret-forward-outline\"}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<slot name=\"label\" />\n\t\t\t\t<div class={{ hidden: !this.open, options: true }} ref={(el: HTMLDivElement) => (this.optionsDiv = el)}>\n\t\t\t\t\t{this.filter.length > 0 && (\n\t\t\t\t\t\t<div class=\"search-preview\">\n\t\t\t\t\t\t\t<smoothly-icon name=\"search-outline\" size=\"small\" />\n\t\t\t\t\t\t\t{this.filter}\n\t\t\t\t\t\t\t<smoothly-icon\n\t\t\t\t\t\t\t\tname=\"backspace-outline\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tonClick={e => {\n\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\tthis.filter = \"\"\n\t\t\t\t\t\t\t\t\tthis.element.focus()\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{this.mutable && (\n\t\t\t\t\t\t\t\t<smoothly-icon\n\t\t\t\t\t\t\t\t\tname=\"add\"\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\tonClick={e => {\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\tthis.addItem()\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<slot />\n\t\t\t\t\t{this.addedItems}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -4,12 +4,12 @@ import { d as defineCustomElement$b } from './p-4e754f3b.js';
|
|
|
4
4
|
import { d as defineCustomElement$a } from './p-f893b6cc.js';
|
|
5
5
|
import { d as defineCustomElement$9 } from './p-ccbdacc9.js';
|
|
6
6
|
import { d as defineCustomElement$8 } from './p-3aed2b34.js';
|
|
7
|
-
import { d as defineCustomElement$7 } from './p-
|
|
7
|
+
import { d as defineCustomElement$7 } from './p-346ba422.js';
|
|
8
8
|
import { d as defineCustomElement$6 } from './p-35bfb804.js';
|
|
9
9
|
import { d as defineCustomElement$5 } from './p-5d4481e5.js';
|
|
10
10
|
import { d as defineCustomElement$4 } from './p-40d2000b.js';
|
|
11
11
|
import { d as defineCustomElement$3 } from './p-76cc6651.js';
|
|
12
|
-
import { d as defineCustomElement$2 } from './p-
|
|
12
|
+
import { d as defineCustomElement$2 } from './p-4051f859.js';
|
|
13
13
|
import { d as defineCustomElement$1 } from './p-3fa2299b.js';
|
|
14
14
|
|
|
15
15
|
const styleCss = ".sc-smoothly-table-demo-simple-h{display:block}.sc-smoothly-table-demo-simple-h>smoothly-display.sc-smoothly-table-demo-simple{font-size:2em}.sc-smoothly-table-demo-simple-h>*.sc-smoothly-table-demo-simple{margin-bottom:2rem}";
|
|
@@ -174,4 +174,4 @@ defineCustomElement();
|
|
|
174
174
|
|
|
175
175
|
export { SmoothlyTableDemoSimple as S, defineCustomElement as d };
|
|
176
176
|
|
|
177
|
-
//# sourceMappingURL=p-
|
|
177
|
+
//# sourceMappingURL=p-4d3d5d0b.js.map
|