smoothly 0.1.121 → 0.2.4
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-accordion_51.cjs.entry.js +127 -65
- package/dist/cjs/smoothly.cjs.js +1 -1
- package/dist/collection/components/app/style.css +12 -12
- package/dist/collection/components/button/style.css +1 -2
- package/dist/collection/components/calendar/style.css +2 -3
- package/dist/collection/components/input/index.js +68 -8
- package/dist/collection/components/input-date/index.js +1 -1
- package/dist/collection/components/input-date/style.css +2 -3
- package/dist/collection/components/input-date-range/index.js +2 -2
- package/dist/collection/components/input-demo/index.js +2 -1
- package/dist/collection/components/item/style.css +2 -3
- package/dist/collection/components/menu-options/index.js +64 -3
- package/dist/collection/components/option/index.js +35 -1
- package/dist/collection/components/option/style.css +6 -0
- package/dist/collection/components/picker/index.js +149 -11
- package/dist/collection/components/select-demo/index.js +9 -1
- package/dist/collection/components/select-demo/style.css +1 -1
- package/dist/collection/components/selector/style.css +0 -2
- package/dist/collection/components/tab/style.css +3 -4
- package/dist/collection/components/tab-switch/index.js +1 -0
- package/dist/collection/components/tab-switch/style.css +1 -1
- package/dist/collection/components/table/cell/style.css +3 -1
- package/dist/collection/components/table/demo/index.js +38 -32
- package/dist/collection/components/table/expandable/cell/index.js +8 -9
- package/dist/collection/components/table/expandable/cell/style.css +38 -1
- package/dist/collection/components/table/expandable/row/index.js +84 -21
- package/dist/collection/components/table/expandable/row/style.css +35 -4
- package/dist/collection/components/table/header/index.js +22 -2
- package/dist/collection/components/table/header/style.css +5 -3
- package/dist/collection/components/table/index.js +33 -1
- package/dist/collection/components/table/row/index.js +20 -84
- package/dist/collection/components/table/row/style.css +2 -8
- package/dist/collection/components/table/style.css +8 -3
- package/dist/custom-elements/index.js +136 -74
- package/dist/esm/loader.js +1 -1
- package/dist/esm/smoothly-accordion_51.entry.js +127 -65
- package/dist/esm/smoothly.js +1 -1
- package/dist/smoothly/p-a302008c.entry.js +1 -0
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/types/components/input/index.d.ts +10 -3
- package/dist/types/components/menu-options/index.d.ts +5 -0
- package/dist/types/components/option/index.d.ts +5 -0
- package/dist/types/components/picker/index.d.ts +14 -3
- package/dist/types/components/table/expandable/cell/index.d.ts +2 -2
- package/dist/types/components/table/expandable/row/index.d.ts +9 -4
- package/dist/types/components/table/header/index.d.ts +1 -0
- package/dist/types/components/table/index.d.ts +3 -0
- package/dist/types/components/table/row/index.d.ts +3 -9
- package/dist/types/components.d.ts +31 -7
- package/package.json +2 -2
- package/dist/smoothly/p-f4529a2d.entry.js +0 -1
|
@@ -1715,7 +1715,7 @@ const SmoothlyBacktotop$1 = class extends HTMLElement {
|
|
|
1715
1715
|
static get style() { return styleCss$I; }
|
|
1716
1716
|
};
|
|
1717
1717
|
|
|
1718
|
-
const styleCss$H = "[type=link].sc-smoothly-button-h{display:inline}.sc-smoothly-button-h:not([type=link]){display:block}.sc-smoothly-button-h{margin:1em;border-style:solid;border-width:1px;border-radius:3px}[hidden].sc-smoothly-button-h{display:none}[disabled].sc-smoothly-button-h{opacity:0.5}a.sc-smoothly-button,button.sc-smoothly-button{border-color:transparent;background-color:transparent;padding:0.2em 0.3em;font-size:110%;font-weight:400}.sc-smoothly-button-h:not([disabled]):hover,.sc-smoothly-button-h:not([disabled]):focus,.sc-smoothly-button-h:not([disabled]):active{border-color:var(--smoothly-button-border)}[type=button].sc-smoothly-button-h>a.sc-smoothly-button{display:block;text-align:center;text-decoration:inherit}[type=button].sc-smoothly-button-h>a.sc-smoothly-button{width:calc(100% - 0.6em)}.sc-smoothly-button-h>button.sc-smoothly-button{width:100%}[expand=fill].sc-smoothly-button-h{width:100%;border-left:none;border-right:none}";
|
|
1718
|
+
const styleCss$H = "[type=link].sc-smoothly-button-h{display:inline}.sc-smoothly-button-h:not([type=link]){display:block}.sc-smoothly-button-h{margin:1em;border-style:solid;border-width:1px;border-radius:3px}[hidden].sc-smoothly-button-h{display:none}[disabled].sc-smoothly-button-h{opacity:0.5}a.sc-smoothly-button,button.sc-smoothly-button{display:block;border-color:transparent;background-color:transparent;padding:0.2em 0.3em;font-size:110%;font-weight:400}.sc-smoothly-button-h:not([disabled]):hover,.sc-smoothly-button-h:not([disabled]):focus,.sc-smoothly-button-h:not([disabled]):active{border-color:var(--smoothly-button-border)}[type=button].sc-smoothly-button-h>a.sc-smoothly-button{display:block;text-align:center;text-decoration:inherit}[type=button].sc-smoothly-button-h>a.sc-smoothly-button{width:calc(100% - 0.6em)}.sc-smoothly-button-h>button.sc-smoothly-button{width:100%}[expand=fill].sc-smoothly-button-h{width:100%;border-left:none;border-right:none}";
|
|
1719
1719
|
|
|
1720
1720
|
const SmoothlyButton$1 = class extends HTMLElement {
|
|
1721
1721
|
constructor() {
|
|
@@ -47463,7 +47463,9 @@ const SmoothlyInput$1 = class extends HTMLElement {
|
|
|
47463
47463
|
constructor() {
|
|
47464
47464
|
super();
|
|
47465
47465
|
this.__registerHost();
|
|
47466
|
-
this.
|
|
47466
|
+
this.smoothlyBlur = createEvent(this, "smoothlyBlur", 7);
|
|
47467
|
+
this.smoothlyChange = createEvent(this, "smoothlyChange", 7);
|
|
47468
|
+
this.smoothlyInput = createEvent(this, "smoothlyInput", 7);
|
|
47467
47469
|
this.keepFocusOnReRender = false;
|
|
47468
47470
|
this.type = "text";
|
|
47469
47471
|
this.required = false;
|
|
@@ -47472,6 +47474,7 @@ const SmoothlyInput$1 = class extends HTMLElement {
|
|
|
47472
47474
|
this.maxLength = Number.POSITIVE_INFINITY;
|
|
47473
47475
|
this.autocomplete = true;
|
|
47474
47476
|
this.disabled = false;
|
|
47477
|
+
this.readonly = false;
|
|
47475
47478
|
}
|
|
47476
47479
|
get formatter() {
|
|
47477
47480
|
let result;
|
|
@@ -47497,7 +47500,7 @@ const SmoothlyInput$1 = class extends HTMLElement {
|
|
|
47497
47500
|
if (value != before) {
|
|
47498
47501
|
if (typeof value == "string")
|
|
47499
47502
|
value = value.trim();
|
|
47500
|
-
this.
|
|
47503
|
+
this.smoothlyInput.emit({ name: this.name, value });
|
|
47501
47504
|
}
|
|
47502
47505
|
}
|
|
47503
47506
|
onCurrency() {
|
|
@@ -47547,8 +47550,14 @@ const SmoothlyInput$1 = class extends HTMLElement {
|
|
|
47547
47550
|
const after = this.formatter.format(dist.StateEditor.copy(this.formatter.unformat(dist.StateEditor.copy(Object.assign({}, this.state)))));
|
|
47548
47551
|
this.updateBackend(after, this.inputElement);
|
|
47549
47552
|
}
|
|
47550
|
-
onBlur(event) {
|
|
47553
|
+
onBlur(event) {
|
|
47554
|
+
this.smoothlyBlur.emit();
|
|
47555
|
+
if (this.initialValue != this.value)
|
|
47556
|
+
this.smoothlyChange.emit({ name: this.name, value: this.value });
|
|
47557
|
+
this.initialValue = undefined;
|
|
47558
|
+
}
|
|
47551
47559
|
onFocus(event) {
|
|
47560
|
+
this.initialValue = this.value;
|
|
47552
47561
|
const after = this.formatter.format(dist.StateEditor.copy(this.formatter.unformat(dist.StateEditor.copy(Object.assign({}, this.state)))));
|
|
47553
47562
|
if (event.target)
|
|
47554
47563
|
this.updateBackend(after, event.target);
|
|
@@ -47624,8 +47633,10 @@ const SmoothlyInput$1 = class extends HTMLElement {
|
|
|
47624
47633
|
return value;
|
|
47625
47634
|
}
|
|
47626
47635
|
processKey(event, backend) {
|
|
47627
|
-
|
|
47628
|
-
|
|
47636
|
+
if (!this.readonly) {
|
|
47637
|
+
const after = dist.Action.apply(this.formatter, this.state, event);
|
|
47638
|
+
this.updateBackend(after, backend);
|
|
47639
|
+
}
|
|
47629
47640
|
}
|
|
47630
47641
|
updateBackend(after, backend) {
|
|
47631
47642
|
if (after.value != backend.value)
|
|
@@ -47640,7 +47651,7 @@ const SmoothlyInput$1 = class extends HTMLElement {
|
|
|
47640
47651
|
}
|
|
47641
47652
|
render() {
|
|
47642
47653
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
47643
|
-
return (h(Host, { class: { "has-value": ((_a = this.state) === null || _a === void 0 ? void 0 : _a.value) != undefined && ((_b = this.state) === null || _b === void 0 ? void 0 : _b.value) != "" }, onclick: () => { var _a; return (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.focus(); } }, h("div", null, h("input", { name: this.name, type: (_c = this.state) === null || _c === void 0 ? void 0 : _c.type, placeholder: this.placeholder, required: this.required, autocomplete: this.autocomplete ? (_d = this.state) === null || _d === void 0 ? void 0 : _d.autocomplete : "off", disabled: this.disabled, pattern: ((_e = this.state) === null || _e === void 0 ? void 0 : _e.pattern) && ((_f = this.state) === null || _f === void 0 ? void 0 : _f.pattern.source), value: (_g = this.state) === null || _g === void 0 ? void 0 : _g.value, onInput: (e) => this.onInput(e), onFocus: e => this.onFocus(e), onClick: e => this.onClick(e), onBlur: e => this.onBlur(e), onKeyDown: e => this.onKeyDown(e), ref: (el) => (this.inputElement = el), onPaste: e => this.onPaste(e) }), h("label", { htmlFor: this.name }, h("slot", null)), h("smoothly-icon", { name: "alert-circle", color: "danger", fill: "clear", size: "small" }))));
|
|
47654
|
+
return (h(Host, { class: { "has-value": ((_a = this.state) === null || _a === void 0 ? void 0 : _a.value) != undefined && ((_b = this.state) === null || _b === void 0 ? void 0 : _b.value) != "" }, onclick: () => { var _a; return (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.focus(); } }, h("div", null, h("input", { name: this.name, type: (_c = this.state) === null || _c === void 0 ? void 0 : _c.type, placeholder: this.placeholder, required: this.required, autocomplete: this.autocomplete ? (_d = this.state) === null || _d === void 0 ? void 0 : _d.autocomplete : "off", disabled: this.disabled, readOnly: this.readonly, pattern: ((_e = this.state) === null || _e === void 0 ? void 0 : _e.pattern) && ((_f = this.state) === null || _f === void 0 ? void 0 : _f.pattern.source), value: (_g = this.state) === null || _g === void 0 ? void 0 : _g.value, onInput: (e) => this.onInput(e), onFocus: e => this.onFocus(e), onClick: e => this.onClick(e), onBlur: e => this.onBlur(e), onKeyDown: e => this.onKeyDown(e), ref: (el) => (this.inputElement = el), onPaste: e => this.onPaste(e) }), h("label", { htmlFor: this.name }, h("slot", null)), h("smoothly-icon", { name: "alert-circle", color: "danger", fill: "clear", size: "small" }))));
|
|
47644
47655
|
}
|
|
47645
47656
|
static get watchers() { return {
|
|
47646
47657
|
"value": ["valueWatcher"],
|
|
@@ -47653,7 +47664,7 @@ function getLocale() {
|
|
|
47653
47664
|
return dist$2.Locale.is(result) ? result : dist$2.Language.is(result) ? dist$2.Locale.toLocale(result) : undefined;
|
|
47654
47665
|
}
|
|
47655
47666
|
|
|
47656
|
-
const styleCss$w = ".sc-smoothly-input-date-h{position:relative}nav.sc-smoothly-input-date{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--smoothly-default-shade));max-width:22em}.sc-smoothly-input-date-h>div.sc-smoothly-input-date{position:fixed;top:0px;left:0px;right:0px;bottom:0px;width:100vw;height:100vh;z-index:2}.sc-smoothly-input-date-h>nav.sc-smoothly-input-date>.arrow.sc-smoothly-input-date{position:absolute;z-index:9;transform:translate(2em,
|
|
47667
|
+
const styleCss$w = ".sc-smoothly-input-date-h{position:relative}nav.sc-smoothly-input-date{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--smoothly-default-shade));max-width:22em}.sc-smoothly-input-date-h>div.sc-smoothly-input-date{position:fixed;top:0px;left:0px;right:0px;bottom:0px;width:100vw;height:100vh;z-index:2}.sc-smoothly-input-date-h>nav.sc-smoothly-input-date>.arrow.sc-smoothly-input-date{position:absolute;z-index:9;transform:translate(2em, -0.55em) rotate(45deg);width:1em;height:1em;background-color:rgb(var(--smoothly-default-shade))}";
|
|
47657
47668
|
|
|
47658
47669
|
const InputDate = class extends HTMLElement {
|
|
47659
47670
|
constructor() {
|
|
@@ -47671,7 +47682,7 @@ const InputDate = class extends HTMLElement {
|
|
|
47671
47682
|
render() {
|
|
47672
47683
|
var _a;
|
|
47673
47684
|
return [
|
|
47674
|
-
h("smoothly-input", { onClick: () => (this.open = !this.open), disabled: this.disabled, type: "date", value: this.value,
|
|
47685
|
+
h("smoothly-input", { onClick: () => (this.open = !this.open), disabled: this.disabled, type: "date", value: this.value, onSmoothlyInput: e => (this.value = e.detail.value) }, h("slot", null)),
|
|
47675
47686
|
this.open && !this.disabled
|
|
47676
47687
|
? [
|
|
47677
47688
|
h("div", { onClick: () => (this.open = false) }),
|
|
@@ -47717,7 +47728,7 @@ const InputDateRange = class extends HTMLElement {
|
|
|
47717
47728
|
render() {
|
|
47718
47729
|
var _a;
|
|
47719
47730
|
return [
|
|
47720
|
-
h("section", { onClick: () => (this.open = !this.open) }, h("smoothly-input", { type: "date", value: this.start, showLabel: this.showLabel,
|
|
47731
|
+
h("section", { onClick: () => (this.open = !this.open) }, h("smoothly-input", { type: "date", value: this.start, showLabel: this.showLabel, onSmoothlyInput: e => (this.start = e.detail.value) }, "from"), h("span", null, "\u2013"), h("smoothly-input", { type: "date", showLabel: this.showLabel, value: this.end, onSmoothlyInput: e => (this.end = e.detail.value) }, "to")),
|
|
47721
47732
|
this.open ? h("div", { onClick: () => (this.open = false) }) : [],
|
|
47722
47733
|
this.open ? (h("nav", null, h("div", { class: "arrow" }), h("smoothly-calendar", { doubleInput: true, value: (_a = this.value) !== null && _a !== void 0 ? _a : dist$2.Date.now(), onValueChanged: event => {
|
|
47723
47734
|
this.value = event.detail;
|
|
@@ -47738,7 +47749,7 @@ const SmoothlyInputDemo$1 = class extends HTMLElement {
|
|
|
47738
47749
|
}
|
|
47739
47750
|
render() {
|
|
47740
47751
|
return [
|
|
47741
|
-
h("form", { action: "done", style: { position: "relative" } }, h("header", null, h("h5", null, "Address")), h("main", null, h("smoothly-input", { type: "text", name: "name" }, "Name"), h("smoothly-input", { type: "date", name: "date" }, "Date"), h("smoothly-input", { type: "date-time", name: "date-time" }, "Date-Time"), h("smoothly-input", { type: "divisor", name: "divisor" }, "Divisor"), h("smoothly-input", { type: "text", name: "street", value: "street" }, "Street"), h("smoothly-input", { type: "card-number", name: "card" }, "Card #"), h("smoothly-input", { type: "card-expires", name: "card", style: { width: "calc(60% - 2px)" } }, "Expires"), h("smoothly-input", { type: "card-csc", name: "card", style: { width: "calc(40% - 1px)", borderLeft: "none" } }, "CVV/CVC"), h("smoothly-radio", { name: "option", value: "1" }, "option 1"), h("smoothly-radio", { name: "option", value: "2", checked: true }, "option 2"), h("smoothly-radio", { name: "option", value: "3" }, "option 3"), h("smoothly-accordion", null, h("smoothly-accordion-item", { name: "A", open: true }, h("smoothly-radio", { name: "a", value: "1" }, "a 1"), h("smoothly-radio", { name: "a", value: "2", checked: true }, "a 2"), h("smoothly-radio", { name: "a", value: "3" }, "a 3")), h("smoothly-accordion-item", { name: "B" }, h("smoothly-radio", { name: "b", value: "1" }, "b 1"), h("smoothly-radio", { name: "b", value: "2" }, "b 2"), h("smoothly-radio", { name: "b", value: "3" }, "b 3"))), h("smoothly-display-amount", { currency: "SEK", amount: "1289.5" }), h("smoothly-display-date-time", { datetime: "2019-01-31T20:01:34" }), h("smoothly-checkbox", { selectAll: true, intermediate: true }), h("smoothly-checkbox", null), h("smoothly-checkbox", { disabled: true }), h("smoothly-address-display", { value: '{ "countryCode": "SE", "street": "Korkstigen 2", "zipCode": "654 31", "city": "Fejksala" }' }), h("smoothly-address", { editable: false, value: '{ "countryCode": "SE", "street": "Stigv\u00E4gen 34", "zipCode": "123 45", "city": "Hobbiton" }' }), h("smoothly-addresses", { allowed: "billing delivery visit", editable: true, value: '{ "billing": { "countryCode": "SE", "street": "Rundslingan 3", "zipCode": "987 65", "city": "Klotby" }, "visit": { "countryCode": "SE", "street": "G\u00E5ngbanan 34", "zipCode": "543 21", "city": "Trasktr\u00E4sk" } }' }), h("smoothly-input", { type: "postal-code", name: "zip", style: { width: "calc(60% - 2px)" } }, "ZipCode"), h("smoothly-input", { type: "text", name: "testing" }, "Texttest"), h("smoothly-input", { type: "password", name: "password" }, "Password"), h("smoothly-input", { type: "email", name: "email" }, "Email"), h("smoothly-input", { type: "price", currency: "SEK", name: "price" }, "Price"), h("smoothly-input", { type: "percent", name: "percent" }, "Percent"), h("smoothly-input", { type: "phone", name: "phone" }, "Phone"), h("smoothly-input-date", null, "Date")), h("footer", null, h("smoothly-submit", { expand: "block", onSubmit: (e) => alert(e), color: "success" }, "Submit"), h("smoothly-trigger", { expand: "block", color: "success", onClick: (e) => console.log(e.detail) }, "Trigger"))),
|
|
47752
|
+
h("form", { action: "done", style: { position: "relative" } }, h("header", null, h("h5", null, "Address")), h("main", null, h("smoothly-input", { type: "text", name: "name", readonly: true, value: "Readonly", onSmoothlyBlur: () => console.log("smoothly blur") }, "Readonly"), h("smoothly-input", { type: "text", name: "name", onSmoothlyChange: e => console.log("smoothly change event") }, "Name"), h("smoothly-input", { type: "date", name: "date" }, "Date"), h("smoothly-input", { type: "date-time", name: "date-time" }, "Date-Time"), h("smoothly-input", { type: "divisor", name: "divisor" }, "Divisor"), h("smoothly-input", { type: "text", name: "street", value: "street" }, "Street"), h("smoothly-input", { type: "card-number", name: "card" }, "Card #"), h("smoothly-input", { type: "card-expires", name: "card", style: { width: "calc(60% - 2px)" } }, "Expires"), h("smoothly-input", { type: "card-csc", name: "card", style: { width: "calc(40% - 1px)", borderLeft: "none" } }, "CVV/CVC"), h("smoothly-radio", { name: "option", value: "1" }, "option 1"), h("smoothly-radio", { name: "option", value: "2", checked: true }, "option 2"), h("smoothly-radio", { name: "option", value: "3" }, "option 3"), h("smoothly-accordion", null, h("smoothly-accordion-item", { name: "A", open: true }, h("smoothly-radio", { name: "a", value: "1" }, "a 1"), h("smoothly-radio", { name: "a", value: "2", checked: true }, "a 2"), h("smoothly-radio", { name: "a", value: "3" }, "a 3")), h("smoothly-accordion-item", { name: "B" }, h("smoothly-radio", { name: "b", value: "1" }, "b 1"), h("smoothly-radio", { name: "b", value: "2" }, "b 2"), h("smoothly-radio", { name: "b", value: "3" }, "b 3"))), h("smoothly-display-amount", { currency: "SEK", amount: "1289.5" }), h("smoothly-display-date-time", { datetime: "2019-01-31T20:01:34" }), h("smoothly-checkbox", { selectAll: true, intermediate: true }), h("smoothly-checkbox", null), h("smoothly-checkbox", { disabled: true }), h("smoothly-address-display", { value: '{ "countryCode": "SE", "street": "Korkstigen 2", "zipCode": "654 31", "city": "Fejksala" }' }), h("smoothly-address", { editable: false, value: '{ "countryCode": "SE", "street": "Stigv\u00E4gen 34", "zipCode": "123 45", "city": "Hobbiton" }' }), h("smoothly-addresses", { allowed: "billing delivery visit", editable: true, value: '{ "billing": { "countryCode": "SE", "street": "Rundslingan 3", "zipCode": "987 65", "city": "Klotby" }, "visit": { "countryCode": "SE", "street": "G\u00E5ngbanan 34", "zipCode": "543 21", "city": "Trasktr\u00E4sk" } }' }), h("smoothly-input", { type: "postal-code", name: "zip", style: { width: "calc(60% - 2px)" } }, "ZipCode"), h("smoothly-input", { type: "text", name: "testing" }, "Texttest"), h("smoothly-input", { type: "password", name: "password" }, "Password"), h("smoothly-input", { type: "email", name: "email" }, "Email"), h("smoothly-input", { type: "price", currency: "SEK", name: "price" }, "Price"), h("smoothly-input", { type: "percent", name: "percent" }, "Percent"), h("smoothly-input", { type: "phone", name: "phone" }, "Phone"), h("smoothly-input-date", null, "Date")), h("footer", null, h("smoothly-submit", { expand: "block", onSubmit: (e) => alert(e), color: "success" }, "Submit"), h("smoothly-trigger", { expand: "block", color: "success", onClick: (e) => console.log(e.detail) }, "Trigger"))),
|
|
47742
47753
|
h("smoothly-backtotop", null),
|
|
47743
47754
|
];
|
|
47744
47755
|
}
|
|
@@ -47776,7 +47787,7 @@ const MonthSelector = class extends HTMLElement {
|
|
|
47776
47787
|
static get style() { return styleCss$u; }
|
|
47777
47788
|
};
|
|
47778
47789
|
|
|
47779
|
-
const styleCss$t = "[selected].sc-smoothly-item-h{background-color:rgb(var(--smoothly-primary-shade));color:rgb(var(--smoothly-primary-contrast))}.sc-smoothly-item-h{padding
|
|
47790
|
+
const styleCss$t = "[selected].sc-smoothly-item-h{background-color:rgb(var(--smoothly-primary-shade));color:rgb(var(--smoothly-primary-contrast))}.sc-smoothly-item-h{padding:0.5em;cursor:pointer;background-color:rgb(var(--smoothly-default-shade));color:rgb(var(--smoothly-default-contrast));border:rgb(var(--smoothly-default-shade) solid 1px)}.sc-smoothly-item-h:hover{background-color:rgb(var(--smoothly-primary-color));color:rgb(var(--smoothly-primary-contrast))}";
|
|
47780
47791
|
|
|
47781
47792
|
const Item = class extends HTMLElement {
|
|
47782
47793
|
constructor() {
|
|
@@ -47820,12 +47831,15 @@ const SmoothlyMenuOptions$1 = class extends HTMLElement {
|
|
|
47820
47831
|
super();
|
|
47821
47832
|
this.__registerHost();
|
|
47822
47833
|
this.__attachShadow();
|
|
47834
|
+
this.menuEmpty = createEvent(this, "menuEmpty", 7);
|
|
47823
47835
|
this.filteredOptions = [];
|
|
47824
47836
|
this.highlightIndex = 0;
|
|
47825
47837
|
this.emptyMenuLabel = "No Options";
|
|
47838
|
+
this.newOptionLabel = "Add:";
|
|
47826
47839
|
this.order = false;
|
|
47827
47840
|
this.options = [];
|
|
47828
47841
|
this.resetHighlightOnOptionsChange = true;
|
|
47842
|
+
this.mutable = false;
|
|
47829
47843
|
}
|
|
47830
47844
|
optionsChangeHandler(newOptions) {
|
|
47831
47845
|
this.highlightIndex = this.resetHighlightOnOptionsChange ? 0 : this.highlightIndex;
|
|
@@ -47864,6 +47878,7 @@ const SmoothlyMenuOptions$1 = class extends HTMLElement {
|
|
|
47864
47878
|
return result;
|
|
47865
47879
|
}
|
|
47866
47880
|
async filterOptions(keyword, excludeValues = []) {
|
|
47881
|
+
this.keyword = keyword;
|
|
47867
47882
|
const keywordLowercase = keyword.toLowerCase();
|
|
47868
47883
|
this.filteredOptions = [];
|
|
47869
47884
|
for (const option of this.options) {
|
|
@@ -47871,6 +47886,7 @@ const SmoothlyMenuOptions$1 = class extends HTMLElement {
|
|
|
47871
47886
|
const isVisible = names.toLowerCase().includes(keywordLowercase) && !excludeValues.includes(option.value);
|
|
47872
47887
|
isVisible && this.filteredOptions.push(option);
|
|
47873
47888
|
}
|
|
47889
|
+
this.menuEmpty.emit(!this.filteredOptions.length);
|
|
47874
47890
|
this.order && this.sortOptions(keyword);
|
|
47875
47891
|
}
|
|
47876
47892
|
sortOptions(keyword) {
|
|
@@ -47907,7 +47923,7 @@ const SmoothlyMenuOptions$1 = class extends HTMLElement {
|
|
|
47907
47923
|
}
|
|
47908
47924
|
}
|
|
47909
47925
|
render() {
|
|
47910
|
-
return (h(Host, { style: { "--max-menu-height": this.maxMenuHeight } }, this.filteredOptions.length > 0 ? (this.filteredOptions.map((option, index) => (h("smoothly-option", { style: this.optionStyle, ref: el => index == 0 && (this.firstOptionsElement = el !== null && el !== void 0 ? el : this.firstOptionsElement), value: option.value, name: option.name, divider: option.divider, "data-highlight": this.highlightIndex == index }, option.left ? h("div", { slot: "left" }, option.left) : undefined, option.right ? h("div", { slot: "right" }, option.right) : undefined)))) : (h("div", null, this.emptyMenuLabel))));
|
|
47926
|
+
return (h(Host, { style: { "--max-menu-height": this.maxMenuHeight } }, this.filteredOptions.length > 0 ? (this.filteredOptions.map((option, index) => (h("smoothly-option", { style: this.optionStyle, ref: el => index == 0 && (this.firstOptionsElement = el !== null && el !== void 0 ? el : this.firstOptionsElement), value: option.value, name: option.name, divider: option.divider, "data-highlight": this.highlightIndex == index }, option.left ? h("div", { slot: "left" }, option.left) : undefined, option.right ? h("div", { slot: "right" }, option.right) : undefined)))) : this.mutable ? (h("smoothly-option", { style: this.optionStyle, ref: el => (this.firstOptionsElement = el !== null && el !== void 0 ? el : this.firstOptionsElement), value: this.keyword, name: this.keyword, "data-highlight": 0, new: true }, h("div", { slot: "left" }, h("smoothly-icon", { name: "square-outline", size: "small" }), " ", this.newOptionLabel))) : (h("div", null, this.emptyMenuLabel))));
|
|
47911
47927
|
}
|
|
47912
47928
|
get element() { return this; }
|
|
47913
47929
|
static get watchers() { return {
|
|
@@ -48000,7 +48016,7 @@ const Notifier = class extends HTMLElement {
|
|
|
48000
48016
|
static get style() { return styleCss$q; }
|
|
48001
48017
|
};
|
|
48002
48018
|
|
|
48003
|
-
const styleCss$p = ":host{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:0.7em 1em;margin-left:1px;margin-right:1px;background-color:transparent;position:relative}:host([data-highlight]){background-color:rgb(var(--smoothly-default-shade))}:host>div.middle{padding-left:0.5em;flex-shrink:1;width:100%}:host([divider]){margin-bottom:0.5em}::slotted([slot=right]){font-style:italic;white-space:nowrap}:host([divider])::after{position:absolute;height:1px;width:100%;left:0;bottom:-0.25em;content:\"\";background-color:rgba(var(--smoothly-dark-color))}";
|
|
48019
|
+
const styleCss$p = ":host{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:0.7em 1em;margin-left:1px;margin-right:1px;background-color:transparent;position:relative}:host([data-highlight]){background-color:rgb(var(--smoothly-default-shade))}:host>div.middle{padding-left:0.5em;flex-shrink:1;width:100%}:host([divider]){margin-bottom:0.5em}::slotted([slot=right]){font-style:italic;white-space:nowrap}:host([divider])::after{position:absolute;height:1px;width:100%;left:0;bottom:-0.25em;content:\"\";background-color:rgba(var(--smoothly-dark-color))}::slotted([slot=left]){display:flex;align-items:center;gap:1ch}";
|
|
48004
48020
|
|
|
48005
48021
|
const SmoothlyOption$1 = class extends HTMLElement {
|
|
48006
48022
|
constructor() {
|
|
@@ -48009,6 +48025,7 @@ const SmoothlyOption$1 = class extends HTMLElement {
|
|
|
48009
48025
|
this.__attachShadow();
|
|
48010
48026
|
this.optionHover = createEvent(this, "optionHover", 7);
|
|
48011
48027
|
this.optionSelect = createEvent(this, "optionSelect", 7);
|
|
48028
|
+
this.optionAdd = createEvent(this, "optionAdd", 7);
|
|
48012
48029
|
this.dataHighlight = false;
|
|
48013
48030
|
this.divider = false;
|
|
48014
48031
|
}
|
|
@@ -48017,7 +48034,9 @@ const SmoothlyOption$1 = class extends HTMLElement {
|
|
|
48017
48034
|
}
|
|
48018
48035
|
onSelect(event) {
|
|
48019
48036
|
if (this.value)
|
|
48020
|
-
this.
|
|
48037
|
+
this.new
|
|
48038
|
+
? this.optionAdd.emit({ name: this.name, value: this.value })
|
|
48039
|
+
: this.optionSelect.emit({ name: this.name, value: this.value });
|
|
48021
48040
|
else
|
|
48022
48041
|
throw `smoothly-option ${this.element.innerHTML} lacks value-property and can therefore not be selected`;
|
|
48023
48042
|
}
|
|
@@ -48036,15 +48055,20 @@ const SmoothlyPicker$1 = class extends HTMLElement {
|
|
|
48036
48055
|
this.__registerHost();
|
|
48037
48056
|
this.__attachShadow();
|
|
48038
48057
|
this.menuClose = createEvent(this, "menuClose", 7);
|
|
48058
|
+
this.notice = createEvent(this, "notice", 7);
|
|
48039
48059
|
this.keepFocusOnReRender = false;
|
|
48040
48060
|
this.emptyMenuLabel = "No Options";
|
|
48041
48061
|
this.multiple = false;
|
|
48062
|
+
this.mutable = false;
|
|
48042
48063
|
this.options = [];
|
|
48043
48064
|
this.selections = [];
|
|
48044
48065
|
this.selectNoneName = "Select None";
|
|
48066
|
+
this.selectAllName = "Select All";
|
|
48045
48067
|
this.selectionName = "items selected";
|
|
48068
|
+
this.newOptionLabel = "Add:";
|
|
48069
|
+
this.valueValidator = _ => [true, undefined];
|
|
48046
48070
|
}
|
|
48047
|
-
|
|
48071
|
+
isOpenChangeHandler() {
|
|
48048
48072
|
if (this.isOpen == false) {
|
|
48049
48073
|
this.menuClose.emit(this.selections);
|
|
48050
48074
|
}
|
|
@@ -48056,10 +48080,26 @@ const SmoothlyPicker$1 = class extends HTMLElement {
|
|
|
48056
48080
|
this.keepFocusOnReRender = false;
|
|
48057
48081
|
}
|
|
48058
48082
|
}
|
|
48059
|
-
|
|
48083
|
+
optionSelectHandler(event) {
|
|
48060
48084
|
this.toggle(event.detail);
|
|
48061
48085
|
event.stopPropagation();
|
|
48062
48086
|
}
|
|
48087
|
+
optionAddHandler(event) {
|
|
48088
|
+
if (this.mutable) {
|
|
48089
|
+
const [status, notice] = this.valueValidator(event.detail.value);
|
|
48090
|
+
if (status) {
|
|
48091
|
+
const option = Object.assign({}, event.detail);
|
|
48092
|
+
this.options = [...this.options, option];
|
|
48093
|
+
this.select(option);
|
|
48094
|
+
}
|
|
48095
|
+
notice && this.notice.emit(notice);
|
|
48096
|
+
}
|
|
48097
|
+
event.stopPropagation();
|
|
48098
|
+
}
|
|
48099
|
+
emptyHandler(event) {
|
|
48100
|
+
this.empty = event.detail;
|
|
48101
|
+
event.stopPropagation();
|
|
48102
|
+
}
|
|
48063
48103
|
toggle(option) {
|
|
48064
48104
|
option.value == "select-none"
|
|
48065
48105
|
? this.toggleAll()
|
|
@@ -48094,9 +48134,19 @@ const SmoothlyPicker$1 = class extends HTMLElement {
|
|
|
48094
48134
|
}
|
|
48095
48135
|
toggleHighlighted() {
|
|
48096
48136
|
var _a;
|
|
48097
|
-
(
|
|
48098
|
-
|
|
48099
|
-
|
|
48137
|
+
if (this.mutable && this.empty) {
|
|
48138
|
+
const [status, notice] = this.valueValidator(this.inputElement.value);
|
|
48139
|
+
if (status) {
|
|
48140
|
+
const option = { name: this.inputElement.value, value: this.inputElement.value };
|
|
48141
|
+
this.options = [...this.options, option];
|
|
48142
|
+
this.select(option);
|
|
48143
|
+
}
|
|
48144
|
+
notice && this.notice.emit(notice);
|
|
48145
|
+
}
|
|
48146
|
+
else
|
|
48147
|
+
(_a = this.menuElement) === null || _a === void 0 ? void 0 : _a.getHighlighted().then((result) => {
|
|
48148
|
+
result && this.toggle(result);
|
|
48149
|
+
});
|
|
48100
48150
|
}
|
|
48101
48151
|
highlightDefault() {
|
|
48102
48152
|
var _a;
|
|
@@ -48158,7 +48208,7 @@ const SmoothlyPicker$1 = class extends HTMLElement {
|
|
|
48158
48208
|
? [
|
|
48159
48209
|
{
|
|
48160
48210
|
value: "select-none",
|
|
48161
|
-
name: this.selectNoneName,
|
|
48211
|
+
name: this.selections.length == this.options.length ? this.selectNoneName : this.selectAllName,
|
|
48162
48212
|
left: this.getCheckHtml(this.selections.length == ((_c = this.options) === null || _c === void 0 ? void 0 : _c.length)),
|
|
48163
48213
|
divider: true,
|
|
48164
48214
|
},
|
|
@@ -48168,12 +48218,12 @@ const SmoothlyPicker$1 = class extends HTMLElement {
|
|
|
48168
48218
|
];
|
|
48169
48219
|
return (h(Host, { style: cssVariables, "has-selection": this.selections.length > 0, "is-open": this.isOpen ? "" : undefined, onMouseDown: (e) => e.preventDefault(), onClick: () => this.onClick() }, h("div", null, h("smoothly-icon", { class: "search", name: "search-outline", size: "tiny" }), h("label", null, this.label), h("input", { type: "text", ref: (el) => (this.inputElement = el ? el : this.inputElement), onFocus: () => this.highlightDefault(), onBlur: () => this.onBlur(), placeholder: this.selections.length > 3
|
|
48170
48220
|
? this.selections.length.toString() + " " + this.selectionName
|
|
48171
|
-
: this.selections.map(selection => selection.name).join(", "), onKeyDown: e => this.onKeyDown(e), onInput: (e) => this.onInput(e) }), h("smoothly-icon", { class: "down", name: "chevron-down", size: "tiny" }), h("smoothly-icon", { class: "up", name: "chevron-up", size: "tiny" })), h("smoothly-menu-options", { style: { width: "100%" }, optionStyle: Object.assign({}, this.optionStyle), order: false, emptyMenuLabel: this.emptyMenuLabel, "max-menu-height": this.maxMenuHeight, ref: (el) => (this.menuElement = el !== null && el !== void 0 ? el : this.menuElement), onClick: e => e.stopPropagation(), resetHighlightOnOptionsChange: false, options: options })));
|
|
48221
|
+
: this.selections.map(selection => selection.name).join(", "), onKeyDown: e => this.onKeyDown(e), onInput: (e) => this.onInput(e) }), h("smoothly-icon", { class: "down", name: "chevron-down", size: "tiny" }), h("smoothly-icon", { class: "up", name: "chevron-up", size: "tiny" })), h("smoothly-menu-options", { style: { width: "100%" }, optionStyle: Object.assign({}, this.optionStyle), order: false, emptyMenuLabel: this.emptyMenuLabel, newOptionLabel: this.newOptionLabel, "max-menu-height": this.maxMenuHeight, mutable: this.mutable, ref: (el) => (this.menuElement = el !== null && el !== void 0 ? el : this.menuElement), onClick: e => e.stopPropagation(), resetHighlightOnOptionsChange: false, options: options })));
|
|
48172
48222
|
}
|
|
48173
48223
|
get element() { return this; }
|
|
48174
48224
|
static get watchers() { return {
|
|
48175
|
-
"selections": ["
|
|
48176
|
-
"isOpen": ["
|
|
48225
|
+
"selections": ["isOpenChangeHandler"],
|
|
48226
|
+
"isOpen": ["isOpenChangeHandler"]
|
|
48177
48227
|
}; }
|
|
48178
48228
|
static get style() { return styleCss$o; }
|
|
48179
48229
|
};
|
|
@@ -48438,7 +48488,7 @@ const SmoothlySelectDemo$1 = class extends HTMLElement {
|
|
|
48438
48488
|
{ name: "Scary Kraken", value: "kraken" },
|
|
48439
48489
|
] }),
|
|
48440
48490
|
h("br", null),
|
|
48441
|
-
h("smoothly-picker", { label: "", "empty-menu-label": "Sorry, we're out of options.", "max-height": "58px", multiple: true, options: [
|
|
48491
|
+
h("smoothly-picker", { label: "Multiple", "empty-menu-label": "Sorry, we're out of options.", "max-height": "58px", multiple: true, options: [
|
|
48442
48492
|
{ name: "Big Dog", value: "dog", aliases: ["WOFF"] },
|
|
48443
48493
|
{ name: "Cat Stevens", value: "cat", aliases: ["moew"] },
|
|
48444
48494
|
{ name: "Noble Pig", value: "pig" },
|
|
@@ -48452,6 +48502,13 @@ const SmoothlySelectDemo$1 = class extends HTMLElement {
|
|
|
48452
48502
|
{ name: "Scary Kraken", value: "kraken" },
|
|
48453
48503
|
] }),
|
|
48454
48504
|
h("br", null),
|
|
48505
|
+
h("smoothly-picker", { label: "Multiple mutable", "max-height": "58px", multiple: true, mutable: true, newOptionLabel: "Invite:", options: [
|
|
48506
|
+
{ name: "john@example.com", value: "john@example.com" },
|
|
48507
|
+
{ name: "jane@example.com", value: "jane@example.com" },
|
|
48508
|
+
{ name: "james@example.com", value: "james@example.com" },
|
|
48509
|
+
{ name: "jessie@example.com", value: "jessie@example.com" },
|
|
48510
|
+
], valueValidator: (email) => email.match(/^\w+@\w+/) ? [true, undefined] : [false, Notice.failed("Incorrectly formatted email")] }),
|
|
48511
|
+
h("br", null),
|
|
48455
48512
|
h("smoothly-picker", { label: "Single select", multiple: false, "max-menu-height": "200px", options: [
|
|
48456
48513
|
{ name: "Dog", value: "dog", aliases: ["WOFF"], right: "Woof 🐶" },
|
|
48457
48514
|
{ name: "Cat", value: "cat", aliases: ["moew"] },
|
|
@@ -48751,6 +48808,7 @@ const SmoothlyTabSwitch$1 = class extends HTMLElement {
|
|
|
48751
48808
|
this.__registerHost();
|
|
48752
48809
|
}
|
|
48753
48810
|
openChanged(event) {
|
|
48811
|
+
event.stopPropagation();
|
|
48754
48812
|
this.selectedElement = event.target;
|
|
48755
48813
|
this.selectedElement.open = true;
|
|
48756
48814
|
this.element.after(event.detail);
|
|
@@ -48769,12 +48827,16 @@ const SmoothlyTabSwitch$1 = class extends HTMLElement {
|
|
|
48769
48827
|
static get style() { return styleCss$a; }
|
|
48770
48828
|
};
|
|
48771
48829
|
|
|
48772
|
-
const styleCss$9 = ".sc-smoothly-table-h{display:table;text-align:left;border
|
|
48830
|
+
const styleCss$9 = ".sc-smoothly-table-h{display:table;text-align:left;border:1px solid rgb(var(--smoothly-dark-color));width:80%;box-sizing:border-box;background-color:rgb(var(--smoothly-default-color));margin:1rem 9.5%;padding-bottom:0.5rem}.slot-detail.sc-smoothly-table>div.sc-smoothly-table{padding:10rem 0;margin-left:10rem}";
|
|
48773
48831
|
|
|
48774
48832
|
const Table = class extends HTMLElement {
|
|
48775
48833
|
constructor() {
|
|
48776
48834
|
super();
|
|
48777
48835
|
this.__registerHost();
|
|
48836
|
+
this.loadMore = createEvent(this, "loadMore", 7);
|
|
48837
|
+
}
|
|
48838
|
+
handleEvents(event) {
|
|
48839
|
+
event.stopPropagation();
|
|
48778
48840
|
}
|
|
48779
48841
|
render() {
|
|
48780
48842
|
return [h("slot", null)];
|
|
@@ -48783,7 +48845,7 @@ const Table = class extends HTMLElement {
|
|
|
48783
48845
|
static get style() { return styleCss$9; }
|
|
48784
48846
|
};
|
|
48785
48847
|
|
|
48786
|
-
const styleCss$8 = ".sc-smoothly-table-cell-h{display:table-cell;padding:0.
|
|
48848
|
+
const styleCss$8 = ".sc-smoothly-table-cell-h{display:table-cell;vertical-align:middle;line-height:1.5rem;padding:0.2rem 0 0.2rem 1rem}";
|
|
48787
48849
|
|
|
48788
48850
|
const TableCell = class extends HTMLElement {
|
|
48789
48851
|
constructor() {
|
|
@@ -48805,21 +48867,21 @@ const TableDemo = class extends HTMLElement {
|
|
|
48805
48867
|
}
|
|
48806
48868
|
render() {
|
|
48807
48869
|
return [
|
|
48808
|
-
h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "Header A"), h("smoothly-table-header", null, "Header B"), h("smoothly-table-header", null, "Header C")), h("smoothly-table-
|
|
48809
|
-
h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "Header
|
|
48870
|
+
h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "Header A"), h("smoothly-table-header", null, "Header B"), h("smoothly-table-header", null, "Header C"), h("smoothly-table-header", null, "Header D"), h("smoothly-table-header", null)), h("smoothly-table-row", null, h("smoothly-table-expandable-cell", null, "normal row (exp.cell)", h("div", { slot: "detail" }, "expandable cell 1 content")), h("smoothly-table-expandable-cell", null, "expandable cell", h("div", { slot: "detail" }, "expandable cell 2 content")), h("smoothly-table-expandable-cell", null, "expandable cell", h("div", { slot: "detail" }, "expandable cell 3 content")), h("smoothly-table-expandable-cell", null, "expandable cell", h("div", { slot: "detail" }, "expandable cell 4 content"))), h("smoothly-table-row", null, h("smoothly-table-cell", null, "normal row (nor.cell)\""), h("smoothly-table-cell", null, "normal cell"), h("smoothly-table-expandable-cell", null, "expandable cell", h("div", { slot: "detail" }, "expandable cell details.")), h("smoothly-table-expandable-cell", null, "expandable cell", h("div", { slot: "detail" }, "expandable cell details."))), h("smoothly-table-expandable-row", null, h("smoothly-table-cell", null, "expandable row (nor.cell)"), h("smoothly-table-cell", null, "Normal cell"), h("smoothly-table-cell", null, "normal cell"), h("smoothly-table-cell", null, "Normal cell"), h("div", { slot: "detail" }, "expandable row content"))),
|
|
48871
|
+
h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "Header A"), h("smoothly-table-header", null)), h("smoothly-table-expandable-row", null, "A Content", h("div", { slot: "detail" }, h("smoothly-tab-switch", null, h("smoothly-tab", { label: "1", open: true }, h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "Header B"), h("smoothly-table-header", null)), h("smoothly-table-expandable-row", null, h("smoothly-table-cell", null, "B Content")))))))),
|
|
48810
48872
|
];
|
|
48811
48873
|
}
|
|
48812
48874
|
static get style() { return styleCss$7; }
|
|
48813
48875
|
};
|
|
48814
48876
|
|
|
48815
|
-
const styleCss$6 = ".sc-smoothly-table-expandable-cell-h{display:table-cell;padding:0.
|
|
48877
|
+
const styleCss$6 = ".sc-smoothly-table-expandable-cell-h{display:table-cell;vertical-align:middle;line-height:1.5em;cursor:pointer;padding:0.2em 0 0.2em;border-style:solid solid none solid;border-width:2px;border-color:rgb(var(--smoothly-default-color))}.hide.sc-smoothly-table-expandable-cell{display:none}[open].sc-smoothly-table-expandable-cell-h{position:relative;z-index:3;background-color:rgb(var(--smoothly-default-color));border-style:solid solid none solid;border-width:2px;border-color:rgb(var(--smoothly-dark-color))}.slot-detail.sc-smoothly-table-expandable-cell{position:relative;background-color:rgb(var(--smoothly-default-color));width:104%;left:-2%;border-left-style:solid;border-left-color:rgb(var(--smoothly-tertiary-color));box-shadow:0px 0px 5px 4px rgb(var(--smoothly-dark-color), 0.5);box-sizing:border-box;padding:0.5rem 2%}.sc-smoothly-table-expandable-cell-h smoothly-icon.sc-smoothly-table-expandable-cell{width:0.6rem;height:1rem;float:left;padding-left:0.2rem;padding-right:0.2rem;padding-bottom:0.5rem;transition:transform 0.2s}[open].sc-smoothly-table-expandable-cell-h smoothly-icon.sc-smoothly-table-expandable-cell{transform:rotate(90deg)}";
|
|
48816
48878
|
|
|
48817
48879
|
const TableExpandableCell = class extends HTMLElement {
|
|
48818
48880
|
constructor() {
|
|
48819
48881
|
super();
|
|
48820
48882
|
this.__registerHost();
|
|
48821
48883
|
this.expansionOpen = createEvent(this, "expansionOpen", 7);
|
|
48822
|
-
this.
|
|
48884
|
+
this.expansionLoad = createEvent(this, "expansionLoad", 7);
|
|
48823
48885
|
this.align = "left";
|
|
48824
48886
|
}
|
|
48825
48887
|
openChanged(value) {
|
|
@@ -48833,7 +48895,7 @@ const TableExpandableCell = class extends HTMLElement {
|
|
|
48833
48895
|
this.open = !this.open;
|
|
48834
48896
|
}
|
|
48835
48897
|
componentDidLoad() {
|
|
48836
|
-
this.
|
|
48898
|
+
this.expansionLoad.emit();
|
|
48837
48899
|
}
|
|
48838
48900
|
componentDidRender() {
|
|
48839
48901
|
if (this.beginOpen) {
|
|
@@ -48842,7 +48904,7 @@ const TableExpandableCell = class extends HTMLElement {
|
|
|
48842
48904
|
}
|
|
48843
48905
|
}
|
|
48844
48906
|
render() {
|
|
48845
|
-
return (h(Host, { style: { textAlign: this.align } }, h("slot", null), h("tr", { ref: e => (this.expansionElement = e) }, h("td", { colSpan:
|
|
48907
|
+
return (h(Host, { style: { textAlign: this.align } }, h("slot", null), h("smoothly-icon", { name: "chevron-forward", size: "tiny" }), h("tr", { ref: e => (this.expansionElement = e) }, h("td", { colSpan: 999, class: !this.open ? "hide" : "" }, h("div", { class: "slot-detail" }, h("slot", { name: "detail" }))))));
|
|
48846
48908
|
}
|
|
48847
48909
|
get element() { return this; }
|
|
48848
48910
|
static get watchers() { return {
|
|
@@ -48851,33 +48913,39 @@ const TableExpandableCell = class extends HTMLElement {
|
|
|
48851
48913
|
static get style() { return styleCss$6; }
|
|
48852
48914
|
};
|
|
48853
48915
|
|
|
48854
|
-
const styleCss$5 = ".sc-smoothly-table-expandable-row-h{display:table-row;border:1px solid rgb(var(--smoothly-default-color));cursor:pointer}.sc-smoothly-table-expandable-row
|
|
48916
|
+
const styleCss$5 = ".sc-smoothly-table-expandable-row-h{display:table-row;border:1px solid rgb(var(--smoothly-default-color));cursor:pointer;box-sizing:border-box}.hide.sc-smoothly-table-expandable-row{display:none}.slot-detail.sc-smoothly-table-expandable-row{position:relative;background-color:rgb(var(--smoothly-default-color));width:104%;left:-2%;border-left-style:solid;border-left-color:rgb(var(--smoothly-tertiary-color));box-shadow:0px 0px 5px 2px rgb(var(--smoothly-dark-color), 0.5);box-sizing:border-box;padding:0.5rem 2%}.sc-smoothly-table-expandable-row-h smoothly-icon.sc-smoothly-table-expandable-row{width:0.6rem;height:1rem;float:left;padding-left:0.2rem;padding-right:0.2rem;padding-bottom:0.5rem;transition:transform 0.2s}[open].sc-smoothly-table-expandable-row-h smoothly-icon.sc-smoothly-table-expandable-row{transform:rotate(90deg)}[open].sc-smoothly-table-expandable-row-h smoothly-table-cell.sc-smoothly-table-expandable-row{padding-bottom:0.5rem}[open].sc-smoothly-table-expandable-row-h{position:relative;z-index:3;background-color:rgb(var(--smoothly-default-color));border-style:solid;border-width:5px;box-shadow:inset 2px 0px 0px 0px rgb(var(--smoothly-dark-color)), inset 0px 2px 0px 0px rgb(var(--smoothly-dark-color)), inset -2px 0px 0px 0px rgb(var(--smoothly-dark-color)), inset 0px 0px 0px 2px rgb(var(--smoothly-default-color))}";
|
|
48855
48917
|
|
|
48856
48918
|
const TableExpandableRow = class extends HTMLElement {
|
|
48857
48919
|
constructor() {
|
|
48858
48920
|
super();
|
|
48859
48921
|
this.__registerHost();
|
|
48860
|
-
this.
|
|
48922
|
+
this.expansionOpen = createEvent(this, "expansionOpen", 7);
|
|
48923
|
+
this.align = "left";
|
|
48861
48924
|
}
|
|
48862
|
-
|
|
48863
|
-
this.
|
|
48925
|
+
openChanged(value) {
|
|
48926
|
+
if (this.expansionElement)
|
|
48927
|
+
this.element.after(this.expansionElement);
|
|
48864
48928
|
}
|
|
48865
|
-
|
|
48866
|
-
this.
|
|
48867
|
-
|
|
48868
|
-
|
|
48869
|
-
|
|
48870
|
-
|
|
48871
|
-
|
|
48929
|
+
onClick(e) {
|
|
48930
|
+
this.open = !this.open;
|
|
48931
|
+
e.stopPropagation();
|
|
48932
|
+
}
|
|
48933
|
+
componentDidRender() {
|
|
48934
|
+
this.expansionOpen.emit(this.expansionElement);
|
|
48935
|
+
if (this.expansionElement && this.open)
|
|
48936
|
+
this.element.after(this.expansionElement);
|
|
48872
48937
|
}
|
|
48873
48938
|
render() {
|
|
48874
|
-
return (h(Host,
|
|
48939
|
+
return (h(Host, { style: { textAlign: this.align } }, h("slot", null), h("smoothly-table-cell", null, h("smoothly-icon", { name: "chevron-forward", size: "tiny" })), h("tr", { ref: e => (this.expansionElement = e) }, h("td", { colSpan: 999, class: !this.open ? "hide" : "" }, h("div", { class: "slot-detail" }, h("slot", { name: "detail" }))))));
|
|
48875
48940
|
}
|
|
48876
48941
|
get element() { return this; }
|
|
48942
|
+
static get watchers() { return {
|
|
48943
|
+
"open": ["openChanged"]
|
|
48944
|
+
}; }
|
|
48877
48945
|
static get style() { return styleCss$5; }
|
|
48878
48946
|
};
|
|
48879
48947
|
|
|
48880
|
-
const styleCss$4 = ".sc-smoothly-table-header-h{display:table-cell;
|
|
48948
|
+
const styleCss$4 = ".sc-smoothly-table-header-h{display:table-cell;line-height:2.5rem;background-color:rgb(var(--smoothly-color-shade));border-bottom:1px solid rgb(var(--smoothly-dark-color));padding-left:1rem;font-weight:bold;margin-bottom:5rem}";
|
|
48881
48949
|
|
|
48882
48950
|
const TableHeader = class extends HTMLElement {
|
|
48883
48951
|
constructor() {
|
|
@@ -48885,40 +48953,34 @@ const TableHeader = class extends HTMLElement {
|
|
|
48885
48953
|
this.__registerHost();
|
|
48886
48954
|
}
|
|
48887
48955
|
render() {
|
|
48888
|
-
return h("slot", null);
|
|
48956
|
+
return (h(Host, null, h("slot", null)));
|
|
48889
48957
|
}
|
|
48890
48958
|
static get style() { return styleCss$4; }
|
|
48891
48959
|
};
|
|
48892
48960
|
|
|
48893
|
-
const styleCss$3 = ".sc-smoothly-table-row-h{display:table-row;border:1px solid rgb(var(--smoothly-dark-color), 0.5);cursor:
|
|
48961
|
+
const styleCss$3 = ".sc-smoothly-table-row-h{display:table-row;border:1px solid rgb(var(--smoothly-dark-color), 0.5);cursor:default}.hide.sc-smoothly-table-row{display:none}";
|
|
48894
48962
|
|
|
48895
48963
|
const TableRow = class extends HTMLElement {
|
|
48896
48964
|
constructor() {
|
|
48897
48965
|
super();
|
|
48898
48966
|
this.__registerHost();
|
|
48899
|
-
this.
|
|
48900
|
-
this.align = "left";
|
|
48901
|
-
}
|
|
48902
|
-
openChanged(value) {
|
|
48903
|
-
if (this.expansionElement)
|
|
48904
|
-
this.element.after(this.expansionElement);
|
|
48967
|
+
this.expansions = [];
|
|
48905
48968
|
}
|
|
48906
|
-
|
|
48907
|
-
this.
|
|
48908
|
-
e.stopPropagation();
|
|
48969
|
+
onExpansionLoad(event) {
|
|
48970
|
+
this.expansions.push(event.target);
|
|
48909
48971
|
}
|
|
48910
|
-
|
|
48911
|
-
this.
|
|
48912
|
-
|
|
48913
|
-
|
|
48972
|
+
onExpansionOpen(event) {
|
|
48973
|
+
this.expansions.forEach(cell => {
|
|
48974
|
+
if (cell != event.target)
|
|
48975
|
+
cell.open = false;
|
|
48976
|
+
});
|
|
48977
|
+
if (event.detail)
|
|
48978
|
+
this.element.after(event.detail);
|
|
48914
48979
|
}
|
|
48915
48980
|
render() {
|
|
48916
|
-
return
|
|
48981
|
+
return h("slot", null);
|
|
48917
48982
|
}
|
|
48918
48983
|
get element() { return this; }
|
|
48919
|
-
static get watchers() { return {
|
|
48920
|
-
"open": ["openChanged"]
|
|
48921
|
-
}; }
|
|
48922
48984
|
static get style() { return styleCss$3; }
|
|
48923
48985
|
};
|
|
48924
48986
|
|
|
@@ -49042,17 +49104,17 @@ const SmoothlyFrame = /*@__PURE__*/proxyCustomElement(SmoothlyFrame$1, [2,"smoot
|
|
|
49042
49104
|
const SmoothlyGoogleFont = /*@__PURE__*/proxyCustomElement(SmoothlyGoogleFont$1, [2,"smoothly-google-font",{"value":[1]}]);
|
|
49043
49105
|
const SmoothlyIcon = /*@__PURE__*/proxyCustomElement(SmoothlyIcon$1, [2,"smoothly-icon",{"color":[513],"fill":[513],"name":[1],"size":[513],"toolTip":[1,"tool-tip"],"document":[32]}]);
|
|
49044
49106
|
const SmoothlyIconDemo = /*@__PURE__*/proxyCustomElement(SmoothlyIconDemo$1, [2,"smoothly-icon-demo"]);
|
|
49045
|
-
const SmoothlyInput = /*@__PURE__*/proxyCustomElement(SmoothlyInput$1, [6,"smoothly-input",{"name":[513],"value":[1032],"type":[513],"required":[1540],"minLength":[1026,"min-length"],"showLabel":[516,"show-label"],"maxLength":[1026,"max-length"],"autocomplete":[1028],"pattern":[1040],"placeholder":[1025],"disabled":[1028],"currency":[513]}]);
|
|
49107
|
+
const SmoothlyInput = /*@__PURE__*/proxyCustomElement(SmoothlyInput$1, [6,"smoothly-input",{"name":[513],"value":[1032],"type":[513],"required":[1540],"minLength":[1026,"min-length"],"showLabel":[516,"show-label"],"maxLength":[1026,"max-length"],"autocomplete":[1028],"pattern":[1040],"placeholder":[1025],"disabled":[1028],"readonly":[1028],"currency":[513],"initialValue":[32]}]);
|
|
49046
49108
|
const SmoothlyInputDate = /*@__PURE__*/proxyCustomElement(InputDate, [6,"smoothly-input-date",{"value":[1025],"open":[1028],"max":[1025],"min":[1025],"disabled":[1028]},[[0,"dateSet","dateSetHandler"]]]);
|
|
49047
49109
|
const SmoothlyInputDateRange = /*@__PURE__*/proxyCustomElement(InputDateRange, [2,"smoothly-input-date-range",{"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"open":[1028],"showLabel":[516,"show-label"]},[[0,"startChanged","onStartChanged"],[0,"endChanged","onEndChanged"],[0,"dateRangeSet","onDateRangeSet"]]]);
|
|
49048
49110
|
const SmoothlyInputDemo = /*@__PURE__*/proxyCustomElement(SmoothlyInputDemo$1, [0,"smoothly-input-demo"]);
|
|
49049
49111
|
const SmoothlyInputMonth = /*@__PURE__*/proxyCustomElement(MonthSelector, [2,"smoothly-input-month",{"value":[1025]}]);
|
|
49050
49112
|
const SmoothlyItem = /*@__PURE__*/proxyCustomElement(Item, [6,"smoothly-item",{"value":[8],"selected":[1540]},[[0,"click","onClick"]]]);
|
|
49051
|
-
const SmoothlyMenuOptions = /*@__PURE__*/proxyCustomElement(SmoothlyMenuOptions$1, [1,"smoothly-menu-options",{"emptyMenuLabel":[1025,"empty-menu-label"],"maxMenuHeight":[1,"max-menu-height"],"order":[4],"optionStyle":[8,"option-style"],"options":[1040],"resetHighlightOnOptionsChange":[1028,"reset-highlight-on-options-change"],"filteredOptions":[32],"highlightIndex":[32]},[[0,"optionHover","optionHoverHandler"]]]);
|
|
49113
|
+
const SmoothlyMenuOptions = /*@__PURE__*/proxyCustomElement(SmoothlyMenuOptions$1, [1,"smoothly-menu-options",{"emptyMenuLabel":[1025,"empty-menu-label"],"newOptionLabel":[1,"new-option-label"],"maxMenuHeight":[1,"max-menu-height"],"order":[4],"optionStyle":[8,"option-style"],"options":[1040],"resetHighlightOnOptionsChange":[1028,"reset-highlight-on-options-change"],"mutable":[4],"filteredOptions":[32],"highlightIndex":[32],"keyword":[32]},[[0,"optionHover","optionHoverHandler"]]]);
|
|
49052
49114
|
const SmoothlyNotification = /*@__PURE__*/proxyCustomElement(Notification, [2,"smoothly-notification",{"notice":[16],"tick":[32]},[[0,"trigger","onTrigger"]]]);
|
|
49053
49115
|
const SmoothlyNotifier = /*@__PURE__*/proxyCustomElement(Notifier, [6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]]);
|
|
49054
|
-
const SmoothlyOption = /*@__PURE__*/proxyCustomElement(SmoothlyOption$1, [1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537],"divider":[1540]}]);
|
|
49055
|
-
const SmoothlyPicker = /*@__PURE__*/proxyCustomElement(SmoothlyPicker$1, [1,"smoothly-picker",{"maxMenuHeight":[1,"max-menu-height"],"maxHeight":[1,"max-height"],"emptyMenuLabel":[1025,"empty-menu-label"],"multiple":[516],"optionStyle":[8,"option-style"],"options":[16],"labelSetting":[513,"label-setting"],"label":[513],"selections":[1040],"selectNoneName":[1025,"select-none-name"],"selectionName":[1025,"selection-name"],"isOpen":[32]},[[0,"optionSelect","
|
|
49116
|
+
const SmoothlyOption = /*@__PURE__*/proxyCustomElement(SmoothlyOption$1, [1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537],"divider":[1540],"new":[4]}]);
|
|
49117
|
+
const SmoothlyPicker = /*@__PURE__*/proxyCustomElement(SmoothlyPicker$1, [1,"smoothly-picker",{"maxMenuHeight":[1,"max-menu-height"],"maxHeight":[1,"max-height"],"emptyMenuLabel":[1025,"empty-menu-label"],"multiple":[516],"mutable":[4],"optionStyle":[8,"option-style"],"options":[16],"labelSetting":[513,"label-setting"],"label":[513],"selections":[1040],"selectNoneName":[1025,"select-none-name"],"selectAllName":[1025,"select-all-name"],"selectionName":[1025,"selection-name"],"newOptionLabel":[1025,"new-option-label"],"valueValidator":[16],"isOpen":[32],"empty":[32]},[[0,"optionSelect","optionSelectHandler"],[0,"optionAdd","optionAddHandler"],[0,"menuEmpty","emptyHandler"]]]);
|
|
49056
49118
|
const SmoothlyPopup = /*@__PURE__*/proxyCustomElement(SmoothlyPopup$1, [6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}]);
|
|
49057
49119
|
const SmoothlyQuiet = /*@__PURE__*/proxyCustomElement(SmoothlyQuiet$1, [6,"smoothly-quiet",{"color":[1]}]);
|
|
49058
49120
|
const SmoothlyRadio = /*@__PURE__*/proxyCustomElement(SmoothlyRadio$1, [6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}]);
|
|
@@ -49068,13 +49130,13 @@ const SmoothlySubmit = /*@__PURE__*/proxyCustomElement(SmoothlySubmit$1, [6,"smo
|
|
|
49068
49130
|
const SmoothlySvg = /*@__PURE__*/proxyCustomElement(SmoothlySvg$1, [2,"smoothly-svg",{"url":[513],"size":[513],"color":[1]}]);
|
|
49069
49131
|
const SmoothlyTab = /*@__PURE__*/proxyCustomElement(SmoothlyTab$1, [6,"smoothly-tab",{"label":[1],"open":[1540]},[[0,"click","onClick"]]]);
|
|
49070
49132
|
const SmoothlyTabSwitch = /*@__PURE__*/proxyCustomElement(SmoothlyTabSwitch$1, [6,"smoothly-tab-switch",{"selectedElement":[32]},[[0,"expansionOpen","openChanged"]]]);
|
|
49071
|
-
const SmoothlyTable = /*@__PURE__*/proxyCustomElement(Table, [6,"smoothly-table"]);
|
|
49133
|
+
const SmoothlyTable = /*@__PURE__*/proxyCustomElement(Table, [6,"smoothly-table",null,[[0,"expansionLoad","handleEvents"],[0,"expansionOpen","handleEvents"]]]);
|
|
49072
49134
|
const SmoothlyTableCell = /*@__PURE__*/proxyCustomElement(TableCell, [6,"smoothly-table-cell"]);
|
|
49073
49135
|
const SmoothlyTableDemo = /*@__PURE__*/proxyCustomElement(TableDemo, [2,"smoothly-table-demo"]);
|
|
49074
|
-
const SmoothlyTableExpandableCell = /*@__PURE__*/proxyCustomElement(TableExpandableCell, [6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540]
|
|
49075
|
-
const SmoothlyTableExpandableRow = /*@__PURE__*/proxyCustomElement(TableExpandableRow, [6,"smoothly-table-expandable-row",
|
|
49076
|
-
const SmoothlyTableHeader = /*@__PURE__*/proxyCustomElement(TableHeader, [6,"smoothly-table-header"]);
|
|
49077
|
-
const SmoothlyTableRow = /*@__PURE__*/proxyCustomElement(TableRow, [6,"smoothly-table-row",
|
|
49136
|
+
const SmoothlyTableExpandableCell = /*@__PURE__*/proxyCustomElement(TableExpandableCell, [6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540]},[[0,"click","onClick"]]]);
|
|
49137
|
+
const SmoothlyTableExpandableRow = /*@__PURE__*/proxyCustomElement(TableExpandableRow, [6,"smoothly-table-expandable-row",{"align":[1],"open":[1540]},[[0,"click","onClick"]]]);
|
|
49138
|
+
const SmoothlyTableHeader = /*@__PURE__*/proxyCustomElement(TableHeader, [6,"smoothly-table-header",{"name":[1]}]);
|
|
49139
|
+
const SmoothlyTableRow = /*@__PURE__*/proxyCustomElement(TableRow, [6,"smoothly-table-row",null,[[0,"expansionLoad","onExpansionLoad"],[0,"expansionOpen","onExpansionOpen"]]]);
|
|
49078
49140
|
const SmoothlyTrigger = /*@__PURE__*/proxyCustomElement(SmoothlyTrigger$1, [6,"smoothly-trigger",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"name":[1],"value":[8]},[[0,"click","onClick"]]]);
|
|
49079
49141
|
const SmoothlyTriggerSink = /*@__PURE__*/proxyCustomElement(SmoothlyTriggerSink$1, [6,"smoothly-trigger-sink",{"context":[16],"destination":[1],"filter":[1]},[[0,"trigger","TriggerListener"]]]);
|
|
49080
49142
|
const SmoothlyTriggerSource = /*@__PURE__*/proxyCustomElement(SmoothlyTriggerSource$1, [6,"smoothly-trigger-source",{"listen":[1]}]);
|