smoothly 0.2.3 → 0.2.6
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 +69 -24
- package/dist/cjs/smoothly.cjs.js +1 -1
- 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 +129 -10
- package/dist/collection/components/select-demo/index.js +9 -1
- package/dist/collection/components/tab/style.css +7 -11
- package/dist/collection/components/tab-switch/style.css +2 -1
- package/dist/collection/components/table/cell/style.css +2 -2
- package/dist/collection/components/table/demo/index.js +11 -9
- package/dist/collection/components/table/expandable/cell/index.js +3 -2
- package/dist/collection/components/table/expandable/cell/style.css +22 -26
- package/dist/collection/components/table/expandable/row/index.js +1 -2
- package/dist/collection/components/table/expandable/row/style.css +18 -24
- package/dist/collection/components/table/header/style.css +0 -1
- package/dist/collection/components/table/row/style.css +1 -1
- package/dist/collection/components/table/style.css +3 -8
- package/dist/custom-elements/index.js +72 -27
- package/dist/esm/loader.js +1 -1
- package/dist/esm/smoothly-accordion_51.entry.js +69 -24
- package/dist/esm/smoothly.js +1 -1
- package/dist/smoothly/{p-6e8e1fb1.entry.js → p-dfc1b7ca.entry.js} +1 -1
- package/dist/smoothly/smoothly.esm.js +1 -1
- 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 +13 -3
- package/dist/types/components.d.ts +15 -0
- package/package.json +1 -1
|
@@ -47831,12 +47831,15 @@ const SmoothlyMenuOptions$1 = class extends HTMLElement {
|
|
|
47831
47831
|
super();
|
|
47832
47832
|
this.__registerHost();
|
|
47833
47833
|
this.__attachShadow();
|
|
47834
|
+
this.menuEmpty = createEvent(this, "menuEmpty", 7);
|
|
47834
47835
|
this.filteredOptions = [];
|
|
47835
47836
|
this.highlightIndex = 0;
|
|
47836
47837
|
this.emptyMenuLabel = "No Options";
|
|
47838
|
+
this.newOptionLabel = "Add:";
|
|
47837
47839
|
this.order = false;
|
|
47838
47840
|
this.options = [];
|
|
47839
47841
|
this.resetHighlightOnOptionsChange = true;
|
|
47842
|
+
this.mutable = false;
|
|
47840
47843
|
}
|
|
47841
47844
|
optionsChangeHandler(newOptions) {
|
|
47842
47845
|
this.highlightIndex = this.resetHighlightOnOptionsChange ? 0 : this.highlightIndex;
|
|
@@ -47875,6 +47878,7 @@ const SmoothlyMenuOptions$1 = class extends HTMLElement {
|
|
|
47875
47878
|
return result;
|
|
47876
47879
|
}
|
|
47877
47880
|
async filterOptions(keyword, excludeValues = []) {
|
|
47881
|
+
this.keyword = keyword;
|
|
47878
47882
|
const keywordLowercase = keyword.toLowerCase();
|
|
47879
47883
|
this.filteredOptions = [];
|
|
47880
47884
|
for (const option of this.options) {
|
|
@@ -47882,6 +47886,7 @@ const SmoothlyMenuOptions$1 = class extends HTMLElement {
|
|
|
47882
47886
|
const isVisible = names.toLowerCase().includes(keywordLowercase) && !excludeValues.includes(option.value);
|
|
47883
47887
|
isVisible && this.filteredOptions.push(option);
|
|
47884
47888
|
}
|
|
47889
|
+
this.menuEmpty.emit(!this.filteredOptions.length);
|
|
47885
47890
|
this.order && this.sortOptions(keyword);
|
|
47886
47891
|
}
|
|
47887
47892
|
sortOptions(keyword) {
|
|
@@ -47918,7 +47923,7 @@ const SmoothlyMenuOptions$1 = class extends HTMLElement {
|
|
|
47918
47923
|
}
|
|
47919
47924
|
}
|
|
47920
47925
|
render() {
|
|
47921
|
-
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))));
|
|
47922
47927
|
}
|
|
47923
47928
|
get element() { return this; }
|
|
47924
47929
|
static get watchers() { return {
|
|
@@ -48011,7 +48016,7 @@ const Notifier = class extends HTMLElement {
|
|
|
48011
48016
|
static get style() { return styleCss$q; }
|
|
48012
48017
|
};
|
|
48013
48018
|
|
|
48014
|
-
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}";
|
|
48015
48020
|
|
|
48016
48021
|
const SmoothlyOption$1 = class extends HTMLElement {
|
|
48017
48022
|
constructor() {
|
|
@@ -48020,6 +48025,7 @@ const SmoothlyOption$1 = class extends HTMLElement {
|
|
|
48020
48025
|
this.__attachShadow();
|
|
48021
48026
|
this.optionHover = createEvent(this, "optionHover", 7);
|
|
48022
48027
|
this.optionSelect = createEvent(this, "optionSelect", 7);
|
|
48028
|
+
this.optionAdd = createEvent(this, "optionAdd", 7);
|
|
48023
48029
|
this.dataHighlight = false;
|
|
48024
48030
|
this.divider = false;
|
|
48025
48031
|
}
|
|
@@ -48028,7 +48034,9 @@ const SmoothlyOption$1 = class extends HTMLElement {
|
|
|
48028
48034
|
}
|
|
48029
48035
|
onSelect(event) {
|
|
48030
48036
|
if (this.value)
|
|
48031
|
-
this.
|
|
48037
|
+
this.new
|
|
48038
|
+
? this.optionAdd.emit({ name: this.name, value: this.value })
|
|
48039
|
+
: this.optionSelect.emit({ name: this.name, value: this.value });
|
|
48032
48040
|
else
|
|
48033
48041
|
throw `smoothly-option ${this.element.innerHTML} lacks value-property and can therefore not be selected`;
|
|
48034
48042
|
}
|
|
@@ -48047,16 +48055,20 @@ const SmoothlyPicker$1 = class extends HTMLElement {
|
|
|
48047
48055
|
this.__registerHost();
|
|
48048
48056
|
this.__attachShadow();
|
|
48049
48057
|
this.menuClose = createEvent(this, "menuClose", 7);
|
|
48058
|
+
this.notice = createEvent(this, "notice", 7);
|
|
48050
48059
|
this.keepFocusOnReRender = false;
|
|
48051
48060
|
this.emptyMenuLabel = "No Options";
|
|
48052
48061
|
this.multiple = false;
|
|
48062
|
+
this.mutable = false;
|
|
48053
48063
|
this.options = [];
|
|
48054
48064
|
this.selections = [];
|
|
48055
48065
|
this.selectNoneName = "Select None";
|
|
48056
48066
|
this.selectAllName = "Select All";
|
|
48057
48067
|
this.selectionName = "items selected";
|
|
48068
|
+
this.newOptionLabel = "Add:";
|
|
48069
|
+
this.valueValidator = _ => [true, undefined];
|
|
48058
48070
|
}
|
|
48059
|
-
|
|
48071
|
+
isOpenChangeHandler() {
|
|
48060
48072
|
if (this.isOpen == false) {
|
|
48061
48073
|
this.menuClose.emit(this.selections);
|
|
48062
48074
|
}
|
|
@@ -48068,10 +48080,26 @@ const SmoothlyPicker$1 = class extends HTMLElement {
|
|
|
48068
48080
|
this.keepFocusOnReRender = false;
|
|
48069
48081
|
}
|
|
48070
48082
|
}
|
|
48071
|
-
|
|
48083
|
+
optionSelectHandler(event) {
|
|
48072
48084
|
this.toggle(event.detail);
|
|
48073
48085
|
event.stopPropagation();
|
|
48074
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
|
+
}
|
|
48075
48103
|
toggle(option) {
|
|
48076
48104
|
option.value == "select-none"
|
|
48077
48105
|
? this.toggleAll()
|
|
@@ -48106,9 +48134,19 @@ const SmoothlyPicker$1 = class extends HTMLElement {
|
|
|
48106
48134
|
}
|
|
48107
48135
|
toggleHighlighted() {
|
|
48108
48136
|
var _a;
|
|
48109
|
-
(
|
|
48110
|
-
|
|
48111
|
-
|
|
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
|
+
});
|
|
48112
48150
|
}
|
|
48113
48151
|
highlightDefault() {
|
|
48114
48152
|
var _a;
|
|
@@ -48180,12 +48218,12 @@ const SmoothlyPicker$1 = class extends HTMLElement {
|
|
|
48180
48218
|
];
|
|
48181
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
|
|
48182
48220
|
? this.selections.length.toString() + " " + this.selectionName
|
|
48183
|
-
: 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 })));
|
|
48184
48222
|
}
|
|
48185
48223
|
get element() { return this; }
|
|
48186
48224
|
static get watchers() { return {
|
|
48187
|
-
"selections": ["
|
|
48188
|
-
"isOpen": ["
|
|
48225
|
+
"selections": ["isOpenChangeHandler"],
|
|
48226
|
+
"isOpen": ["isOpenChangeHandler"]
|
|
48189
48227
|
}; }
|
|
48190
48228
|
static get style() { return styleCss$o; }
|
|
48191
48229
|
};
|
|
@@ -48450,7 +48488,7 @@ const SmoothlySelectDemo$1 = class extends HTMLElement {
|
|
|
48450
48488
|
{ name: "Scary Kraken", value: "kraken" },
|
|
48451
48489
|
] }),
|
|
48452
48490
|
h("br", null),
|
|
48453
|
-
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: [
|
|
48454
48492
|
{ name: "Big Dog", value: "dog", aliases: ["WOFF"] },
|
|
48455
48493
|
{ name: "Cat Stevens", value: "cat", aliases: ["moew"] },
|
|
48456
48494
|
{ name: "Noble Pig", value: "pig" },
|
|
@@ -48464,6 +48502,13 @@ const SmoothlySelectDemo$1 = class extends HTMLElement {
|
|
|
48464
48502
|
{ name: "Scary Kraken", value: "kraken" },
|
|
48465
48503
|
] }),
|
|
48466
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),
|
|
48467
48512
|
h("smoothly-picker", { label: "Single select", multiple: false, "max-menu-height": "200px", options: [
|
|
48468
48513
|
{ name: "Dog", value: "dog", aliases: ["WOFF"], right: "Woof 🐶" },
|
|
48469
48514
|
{ name: "Cat", value: "cat", aliases: ["moew"] },
|
|
@@ -48724,7 +48769,7 @@ const SmoothlySvg$1 = class extends HTMLElement {
|
|
|
48724
48769
|
static get style() { return styleCss$c; }
|
|
48725
48770
|
};
|
|
48726
48771
|
|
|
48727
|
-
const styleCss$b = "
|
|
48772
|
+
const styleCss$b = "[open].sc-smoothly-tab-h{border-bottom:3px solid rgb(var(--smoothly-primary-color));box-sizing:border-box;margin-bottom:-3px}.hide.sc-smoothly-tab{display:none}label.sc-smoothly-tab{display:block;padding:.5rem;background-color:transparent;width:auto}";
|
|
48728
48773
|
|
|
48729
48774
|
const SmoothlyTab$1 = class extends HTMLElement {
|
|
48730
48775
|
constructor() {
|
|
@@ -48755,7 +48800,7 @@ const SmoothlyTab$1 = class extends HTMLElement {
|
|
|
48755
48800
|
static get style() { return styleCss$b; }
|
|
48756
48801
|
};
|
|
48757
48802
|
|
|
48758
|
-
const styleCss$a = ".sc-smoothly-tab-switch-h{display:flex;flex-direction:row;
|
|
48803
|
+
const styleCss$a = ".sc-smoothly-tab-switch-h{display:flex;flex-direction:row;justify-content:space-around;border-bottom:3px solid rgb(var(--smoothly-default-shade))}";
|
|
48759
48804
|
|
|
48760
48805
|
const SmoothlyTabSwitch$1 = class extends HTMLElement {
|
|
48761
48806
|
constructor() {
|
|
@@ -48782,7 +48827,7 @@ const SmoothlyTabSwitch$1 = class extends HTMLElement {
|
|
|
48782
48827
|
static get style() { return styleCss$a; }
|
|
48783
48828
|
};
|
|
48784
48829
|
|
|
48785
|
-
const styleCss$9 = ".sc-smoothly-table-h{display:table;
|
|
48830
|
+
const styleCss$9 = ".sc-smoothly-table-h{display:table;border-collapse:collapse;border:1px solid rgb(var(--smoothly-dark-color));width:var(--table-width, 80%);box-sizing:border-box;background-color:rgb(var(--smoothly-default-color));margin:auto}";
|
|
48786
48831
|
|
|
48787
48832
|
const Table = class extends HTMLElement {
|
|
48788
48833
|
constructor() {
|
|
@@ -48800,7 +48845,7 @@ const Table = class extends HTMLElement {
|
|
|
48800
48845
|
static get style() { return styleCss$9; }
|
|
48801
48846
|
};
|
|
48802
48847
|
|
|
48803
|
-
const styleCss$8 = ".sc-smoothly-table-cell-h{display:table-cell;
|
|
48848
|
+
const styleCss$8 = ".sc-smoothly-table-cell-h{display:table-cell;line-height:1.5rem;white-space:nowrap;padding:0.3rem 0 0.3rem 1rem}";
|
|
48804
48849
|
|
|
48805
48850
|
const TableCell = class extends HTMLElement {
|
|
48806
48851
|
constructor() {
|
|
@@ -48822,14 +48867,14 @@ const TableDemo = class extends HTMLElement {
|
|
|
48822
48867
|
}
|
|
48823
48868
|
render() {
|
|
48824
48869
|
return [
|
|
48825
|
-
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")
|
|
48826
|
-
h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "Header A"), h("smoothly-table-
|
|
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-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-expandable-row", null, h("smoothly-table-cell", null, "A Content"), h("div", { slot: "detail" }, h("smoothly-tab-switch", null, h("smoothly-tab", { label: "innertable 1", open: true }, h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "Header B")), h("smoothly-table-expandable-row", null, "B Content"))), h("smoothly-tab", { label: "innertable 2" }, h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "Header C")), h("smoothly-table-expandable-row", null, h("smoothly-table-cell", null, "C Content")))))))),
|
|
48827
48872
|
];
|
|
48828
48873
|
}
|
|
48829
48874
|
static get style() { return styleCss$7; }
|
|
48830
48875
|
};
|
|
48831
48876
|
|
|
48832
|
-
const styleCss$6 = ".sc-smoothly-table-expandable-cell-h{display:table-cell;
|
|
48877
|
+
const styleCss$6 = ".sc-smoothly-table-expandable-cell-h{display:table-cell;padding:0.3rem 0 0.3rem 0;cursor:pointer;line-height:1.5rem}[open].sc-smoothly-table-expandable-cell-h{position:relative;z-index:3;background-color:rgb(var(--smoothly-default-color));border:2px solid rgb(var(--smoothly-dark-color));border-bottom:none}.sc-smoothly-table-expandable-cell-h smoothly-icon.sc-smoothly-table-expandable-cell{width:0.6rem;float:left;padding:0 0.3rem;transition:transform 0.2s}[open].sc-smoothly-table-expandable-cell-h smoothly-icon.sc-smoothly-table-expandable-cell{transform:rotate(90deg)}aside.sc-smoothly-table-expandable-cell{display:flex}.hide.sc-smoothly-table-expandable-cell{display:none}.slot-detail.sc-smoothly-table-expandable-cell{position:relative;background-color:rgb(var(--smoothly-default-color));width:104%;left:-2%;border-left:2px solid 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%}";
|
|
48833
48878
|
|
|
48834
48879
|
const TableExpandableCell = class extends HTMLElement {
|
|
48835
48880
|
constructor() {
|
|
@@ -48859,7 +48904,7 @@ const TableExpandableCell = class extends HTMLElement {
|
|
|
48859
48904
|
}
|
|
48860
48905
|
}
|
|
48861
48906
|
render() {
|
|
48862
|
-
return (h(Host, { style: { textAlign: this.align } }, h("
|
|
48907
|
+
return (h(Host, { style: { textAlign: this.align } }, h("aside", null, h("smoothly-icon", { name: "chevron-forward", size: "tiny" }), h("slot", null)), h("tr", { ref: e => (this.expansionElement = e) }, h("td", { colSpan: 999, class: !this.open ? "hide" : "" }, h("div", { class: "slot-detail" }, h("slot", { name: "detail" }))))));
|
|
48863
48908
|
}
|
|
48864
48909
|
get element() { return this; }
|
|
48865
48910
|
static get watchers() { return {
|
|
@@ -48868,7 +48913,7 @@ const TableExpandableCell = class extends HTMLElement {
|
|
|
48868
48913
|
static get style() { return styleCss$6; }
|
|
48869
48914
|
};
|
|
48870
48915
|
|
|
48871
|
-
const styleCss$5 = ".sc-smoothly-table-expandable-row-h{display:table-row;
|
|
48916
|
+
const styleCss$5 = ".sc-smoothly-table-expandable-row-h{display:table-row;cursor:pointer;line-height:1.5rem}[open].sc-smoothly-table-expandable-row-h{position:relative;z-index:3;background-color:rgb(var(--smoothly-default-color));border:2px solid rgb(var(--smoothly-dark-color));border-bottom:none}.sc-smoothly-table-expandable-row-h smoothly-icon.sc-smoothly-table-expandable-row{width:0.6rem;height:1rem;margin-top:-1rem;margin-left:-1rem;transition:transform 0.2s}[open].sc-smoothly-table-expandable-row-h smoothly-icon.sc-smoothly-table-expandable-row{transform:rotate(90deg)}.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 4px 2px rgb(var(--smoothly-dark-color));box-sizing:border-box;padding:0.5rem 2%}";
|
|
48872
48917
|
|
|
48873
48918
|
const TableExpandableRow = class extends HTMLElement {
|
|
48874
48919
|
constructor() {
|
|
@@ -48891,7 +48936,7 @@ const TableExpandableRow = class extends HTMLElement {
|
|
|
48891
48936
|
this.element.after(this.expansionElement);
|
|
48892
48937
|
}
|
|
48893
48938
|
render() {
|
|
48894
|
-
return (h(Host, { style: { textAlign: this.align } }, h("slot", null), h("smoothly-
|
|
48939
|
+
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" }))))));
|
|
48895
48940
|
}
|
|
48896
48941
|
get element() { return this; }
|
|
48897
48942
|
static get watchers() { return {
|
|
@@ -48900,7 +48945,7 @@ const TableExpandableRow = class extends HTMLElement {
|
|
|
48900
48945
|
static get style() { return styleCss$5; }
|
|
48901
48946
|
};
|
|
48902
48947
|
|
|
48903
|
-
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
|
|
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}";
|
|
48904
48949
|
|
|
48905
48950
|
const TableHeader = class extends HTMLElement {
|
|
48906
48951
|
constructor() {
|
|
@@ -48913,7 +48958,7 @@ const TableHeader = class extends HTMLElement {
|
|
|
48913
48958
|
static get style() { return styleCss$4; }
|
|
48914
48959
|
};
|
|
48915
48960
|
|
|
48916
|
-
const styleCss$3 = ".sc-smoothly-table-row-h{display:table-row;
|
|
48961
|
+
const styleCss$3 = ".sc-smoothly-table-row-h{display:table-row;cursor:default;line-height:1.5rem}.hide.sc-smoothly-table-row{display:none}";
|
|
48917
48962
|
|
|
48918
48963
|
const TableRow = class extends HTMLElement {
|
|
48919
48964
|
constructor() {
|
|
@@ -49065,11 +49110,11 @@ const SmoothlyInputDateRange = /*@__PURE__*/proxyCustomElement(InputDateRange, [
|
|
|
49065
49110
|
const SmoothlyInputDemo = /*@__PURE__*/proxyCustomElement(SmoothlyInputDemo$1, [0,"smoothly-input-demo"]);
|
|
49066
49111
|
const SmoothlyInputMonth = /*@__PURE__*/proxyCustomElement(MonthSelector, [2,"smoothly-input-month",{"value":[1025]}]);
|
|
49067
49112
|
const SmoothlyItem = /*@__PURE__*/proxyCustomElement(Item, [6,"smoothly-item",{"value":[8],"selected":[1540]},[[0,"click","onClick"]]]);
|
|
49068
|
-
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"]]]);
|
|
49069
49114
|
const SmoothlyNotification = /*@__PURE__*/proxyCustomElement(Notification, [2,"smoothly-notification",{"notice":[16],"tick":[32]},[[0,"trigger","onTrigger"]]]);
|
|
49070
49115
|
const SmoothlyNotifier = /*@__PURE__*/proxyCustomElement(Notifier, [6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]]);
|
|
49071
|
-
const SmoothlyOption = /*@__PURE__*/proxyCustomElement(SmoothlyOption$1, [1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537],"divider":[1540]}]);
|
|
49072
|
-
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"],"selectAllName":[1025,"select-all-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"]]]);
|
|
49073
49118
|
const SmoothlyPopup = /*@__PURE__*/proxyCustomElement(SmoothlyPopup$1, [6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}]);
|
|
49074
49119
|
const SmoothlyQuiet = /*@__PURE__*/proxyCustomElement(SmoothlyQuiet$1, [6,"smoothly-quiet",{"color":[1]}]);
|
|
49075
49120
|
const SmoothlyRadio = /*@__PURE__*/proxyCustomElement(SmoothlyRadio$1, [6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}]);
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["smoothly-google-font",[[2,"smoothly-google-font",{"value":[1]}]]],["smoothly-radio-group",[[4,"smoothly-radio-group",{"orientation":[513]}]]],["smoothly-reorder",[[0,"smoothly-reorder"]]],["smoothly-trigger-sink",[[6,"smoothly-trigger-sink",{"context":[16],"destination":[1],"filter":[1]},[[0,"trigger","TriggerListener"]]]]],["smoothly-trigger-source",[[6,"smoothly-trigger-source",{"listen":[1]}]]],["smoothly-accordion_51",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}],[0,"smoothly-input-demo"],[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]],[0,"smoothly-display-demo"],[2,"smoothly-table-demo"],[4,"smoothly-app",{"color":[1]}],[0,"smoothly-dialog-demo"],[2,"smoothly-icon-demo"],[6,"smoothly-button",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"link":[1],"download":[4]}],[4,"smoothly-room",{"label":[1],"icon":[1],"path":[1],"to":[1]}],[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"]]],[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]],[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"],"selectAllName":[1025,"select-all-name"],"selectionName":[1025,"selection-name"],"
|
|
13
|
+
return bootstrapLazy([["smoothly-google-font",[[2,"smoothly-google-font",{"value":[1]}]]],["smoothly-radio-group",[[4,"smoothly-radio-group",{"orientation":[513]}]]],["smoothly-reorder",[[0,"smoothly-reorder"]]],["smoothly-trigger-sink",[[6,"smoothly-trigger-sink",{"context":[16],"destination":[1],"filter":[1]},[[0,"trigger","TriggerListener"]]]]],["smoothly-trigger-source",[[6,"smoothly-trigger-source",{"listen":[1]}]]],["smoothly-accordion_51",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}],[0,"smoothly-input-demo"],[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]],[0,"smoothly-display-demo"],[2,"smoothly-table-demo"],[4,"smoothly-app",{"color":[1]}],[0,"smoothly-dialog-demo"],[2,"smoothly-icon-demo"],[6,"smoothly-button",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"link":[1],"download":[4]}],[4,"smoothly-room",{"label":[1],"icon":[1],"path":[1],"to":[1]}],[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"]]],[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]],[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"]]],[6,"smoothly-dialog",{"color":[513],"open":[1540],"closable":[516],"header":[513]},[[0,"trigger","TriggerListener"]]],[2,"smoothly-backtotop",{"opacity":[1],"bottom":[1],"right":[1],"visible":[32]}],[2,"smoothly-checkbox",{"selectAll":[4,"select-all"],"size":[1],"intermediate":[1540],"selected":[1540],"disabled":[1540],"t":[32]}],[6,"smoothly-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]],[6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540]},[[0,"click","onClick"]]],[6,"smoothly-table-expandable-row",{"align":[1],"open":[1540]},[[0,"click","onClick"]]],[0,"smoothly-urlencoded",{"data":[1]}],[6,"smoothly-accordion",{"value":[1025]},[[0,"smoothlyOpen","handleOpenClose"],[0,"smoothlyClose","handleOpenClose"],[0,"smoothlyAccordionItemDidLoad","onAccordionItemDidLoad"],[0,"smoothlyAccordionItemDidUnload","onAccordionItemDidUnload"]]],[6,"smoothly-accordion-item",{"name":[1],"brand":[1],"open":[1540]}],[2,"smoothly-display",{"type":[1],"value":[8],"currency":[1],"country":[1]}],[2,"smoothly-display-amount",{"amount":[8],"currency":[1]}],[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}],[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}],[6,"smoothly-quiet",{"color":[1]}],[6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}],[6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}],[2,"smoothly-skeleton",{"widths":[16],"width":[1],"color":[1],"period":[2],"distance":[1],"align":[513]}],[2,"smoothly-svg",{"url":[513],"size":[513],"color":[1]}],[6,"smoothly-table",null,[[0,"expansionLoad","handleEvents"],[0,"expansionOpen","handleEvents"]]],[6,"smoothly-table-cell"],[6,"smoothly-table-header",{"name":[1]}],[6,"smoothly-table-row",null,[[0,"expansionLoad","onExpansionLoad"],[0,"expansionOpen","onExpansionOpen"]]],[6,"smoothly-input-date",{"value":[1025],"open":[1028],"max":[1025],"min":[1025],"disabled":[1028]},[[0,"dateSet","dateSetHandler"]]],[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],"moveHighlight":[64],"setHighlight":[64],"getHighlighted":[64],"filterOptions":[64]},[[0,"optionHover","optionHoverHandler"]]],[2,"smoothly-notification",{"notice":[16],"tick":[32]},[[0,"trigger","onTrigger"]]],[2,"smoothly-display-date-time",{"datetime":[1]}],[6,"smoothly-tab",{"label":[1],"open":[1540]},[[0,"click","onClick"]]],[6,"smoothly-tab-switch",{"selectedElement":[32]},[[0,"expansionOpen","openChanged"]]],[0,"smoothly-tuple",{"tuple":[16]}],[1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537],"divider":[1540],"new":[4]}],[2,"smoothly-spinner",{"active":[516],"size":[513]}],[2,"smoothly-calendar",{"month":[1025],"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"doubleInput":[516,"double-input"],"firstSelected":[32]}],[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],"getFormData":[64],"setKeepFocusOnReRender":[64],"setSelectionRange":[64]}],[2,"smoothly-input-month",{"value":[1025]}],[6,"smoothly-selector",{"opened":[32],"selectedElement":[32],"missing":[32],"filter":[32]},[[0,"click","onClick"],[0,"itemSelected","onItemSelected"],[0,"keydown","onKeyDown"]]],[6,"smoothly-item",{"value":[8],"selected":[1540],"filter":[64]},[[0,"click","onClick"]]],[6,"smoothly-trigger",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"name":[1],"value":[8]},[[0,"click","onClick"]]],[2,"smoothly-icon",{"color":[513],"fill":[513],"name":[1],"size":[513],"toolTip":[1,"tool-tip"],"document":[32]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|