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
|
@@ -46247,12 +46247,15 @@ const styleCss$o = ":host{max-height:18.75rem;width:85%;max-height:var(--max-men
|
|
|
46247
46247
|
const SmoothlyMenuOptions = class {
|
|
46248
46248
|
constructor(hostRef) {
|
|
46249
46249
|
registerInstance(this, hostRef);
|
|
46250
|
+
this.menuEmpty = createEvent(this, "menuEmpty", 7);
|
|
46250
46251
|
this.filteredOptions = [];
|
|
46251
46252
|
this.highlightIndex = 0;
|
|
46252
46253
|
this.emptyMenuLabel = "No Options";
|
|
46254
|
+
this.newOptionLabel = "Add:";
|
|
46253
46255
|
this.order = false;
|
|
46254
46256
|
this.options = [];
|
|
46255
46257
|
this.resetHighlightOnOptionsChange = true;
|
|
46258
|
+
this.mutable = false;
|
|
46256
46259
|
}
|
|
46257
46260
|
optionsChangeHandler(newOptions) {
|
|
46258
46261
|
this.highlightIndex = this.resetHighlightOnOptionsChange ? 0 : this.highlightIndex;
|
|
@@ -46291,6 +46294,7 @@ const SmoothlyMenuOptions = class {
|
|
|
46291
46294
|
return result;
|
|
46292
46295
|
}
|
|
46293
46296
|
async filterOptions(keyword, excludeValues = []) {
|
|
46297
|
+
this.keyword = keyword;
|
|
46294
46298
|
const keywordLowercase = keyword.toLowerCase();
|
|
46295
46299
|
this.filteredOptions = [];
|
|
46296
46300
|
for (const option of this.options) {
|
|
@@ -46298,6 +46302,7 @@ const SmoothlyMenuOptions = class {
|
|
|
46298
46302
|
const isVisible = names.toLowerCase().includes(keywordLowercase) && !excludeValues.includes(option.value);
|
|
46299
46303
|
isVisible && this.filteredOptions.push(option);
|
|
46300
46304
|
}
|
|
46305
|
+
this.menuEmpty.emit(!this.filteredOptions.length);
|
|
46301
46306
|
this.order && this.sortOptions(keyword);
|
|
46302
46307
|
}
|
|
46303
46308
|
sortOptions(keyword) {
|
|
@@ -46334,7 +46339,7 @@ const SmoothlyMenuOptions = class {
|
|
|
46334
46339
|
}
|
|
46335
46340
|
}
|
|
46336
46341
|
render() {
|
|
46337
|
-
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))));
|
|
46342
|
+
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))));
|
|
46338
46343
|
}
|
|
46339
46344
|
get element() { return getElement(this); }
|
|
46340
46345
|
static get watchers() { return {
|
|
@@ -46425,13 +46430,14 @@ const Notifier = class {
|
|
|
46425
46430
|
};
|
|
46426
46431
|
Notifier.style = styleCss$m;
|
|
46427
46432
|
|
|
46428
|
-
const styleCss$l = ":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))}";
|
|
46433
|
+
const styleCss$l = ":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}";
|
|
46429
46434
|
|
|
46430
46435
|
const SmoothlyOption = class {
|
|
46431
46436
|
constructor(hostRef) {
|
|
46432
46437
|
registerInstance(this, hostRef);
|
|
46433
46438
|
this.optionHover = createEvent(this, "optionHover", 7);
|
|
46434
46439
|
this.optionSelect = createEvent(this, "optionSelect", 7);
|
|
46440
|
+
this.optionAdd = createEvent(this, "optionAdd", 7);
|
|
46435
46441
|
this.dataHighlight = false;
|
|
46436
46442
|
this.divider = false;
|
|
46437
46443
|
}
|
|
@@ -46440,7 +46446,9 @@ const SmoothlyOption = class {
|
|
|
46440
46446
|
}
|
|
46441
46447
|
onSelect(event) {
|
|
46442
46448
|
if (this.value)
|
|
46443
|
-
this.
|
|
46449
|
+
this.new
|
|
46450
|
+
? this.optionAdd.emit({ name: this.name, value: this.value })
|
|
46451
|
+
: this.optionSelect.emit({ name: this.name, value: this.value });
|
|
46444
46452
|
else
|
|
46445
46453
|
throw `smoothly-option ${this.element.innerHTML} lacks value-property and can therefore not be selected`;
|
|
46446
46454
|
}
|
|
@@ -46457,16 +46465,20 @@ const SmoothlyPicker = class {
|
|
|
46457
46465
|
constructor(hostRef) {
|
|
46458
46466
|
registerInstance(this, hostRef);
|
|
46459
46467
|
this.menuClose = createEvent(this, "menuClose", 7);
|
|
46468
|
+
this.notice = createEvent(this, "notice", 7);
|
|
46460
46469
|
this.keepFocusOnReRender = false;
|
|
46461
46470
|
this.emptyMenuLabel = "No Options";
|
|
46462
46471
|
this.multiple = false;
|
|
46472
|
+
this.mutable = false;
|
|
46463
46473
|
this.options = [];
|
|
46464
46474
|
this.selections = [];
|
|
46465
46475
|
this.selectNoneName = "Select None";
|
|
46466
46476
|
this.selectAllName = "Select All";
|
|
46467
46477
|
this.selectionName = "items selected";
|
|
46478
|
+
this.newOptionLabel = "Add:";
|
|
46479
|
+
this.valueValidator = _ => [true, undefined];
|
|
46468
46480
|
}
|
|
46469
|
-
|
|
46481
|
+
isOpenChangeHandler() {
|
|
46470
46482
|
if (this.isOpen == false) {
|
|
46471
46483
|
this.menuClose.emit(this.selections);
|
|
46472
46484
|
}
|
|
@@ -46478,10 +46490,26 @@ const SmoothlyPicker = class {
|
|
|
46478
46490
|
this.keepFocusOnReRender = false;
|
|
46479
46491
|
}
|
|
46480
46492
|
}
|
|
46481
|
-
|
|
46493
|
+
optionSelectHandler(event) {
|
|
46482
46494
|
this.toggle(event.detail);
|
|
46483
46495
|
event.stopPropagation();
|
|
46484
46496
|
}
|
|
46497
|
+
optionAddHandler(event) {
|
|
46498
|
+
if (this.mutable) {
|
|
46499
|
+
const [status, notice] = this.valueValidator(event.detail.value);
|
|
46500
|
+
if (status) {
|
|
46501
|
+
const option = Object.assign({}, event.detail);
|
|
46502
|
+
this.options = [...this.options, option];
|
|
46503
|
+
this.select(option);
|
|
46504
|
+
}
|
|
46505
|
+
notice && this.notice.emit(notice);
|
|
46506
|
+
}
|
|
46507
|
+
event.stopPropagation();
|
|
46508
|
+
}
|
|
46509
|
+
emptyHandler(event) {
|
|
46510
|
+
this.empty = event.detail;
|
|
46511
|
+
event.stopPropagation();
|
|
46512
|
+
}
|
|
46485
46513
|
toggle(option) {
|
|
46486
46514
|
option.value == "select-none"
|
|
46487
46515
|
? this.toggleAll()
|
|
@@ -46516,9 +46544,19 @@ const SmoothlyPicker = class {
|
|
|
46516
46544
|
}
|
|
46517
46545
|
toggleHighlighted() {
|
|
46518
46546
|
var _a;
|
|
46519
|
-
(
|
|
46520
|
-
|
|
46521
|
-
|
|
46547
|
+
if (this.mutable && this.empty) {
|
|
46548
|
+
const [status, notice] = this.valueValidator(this.inputElement.value);
|
|
46549
|
+
if (status) {
|
|
46550
|
+
const option = { name: this.inputElement.value, value: this.inputElement.value };
|
|
46551
|
+
this.options = [...this.options, option];
|
|
46552
|
+
this.select(option);
|
|
46553
|
+
}
|
|
46554
|
+
notice && this.notice.emit(notice);
|
|
46555
|
+
}
|
|
46556
|
+
else
|
|
46557
|
+
(_a = this.menuElement) === null || _a === void 0 ? void 0 : _a.getHighlighted().then((result) => {
|
|
46558
|
+
result && this.toggle(result);
|
|
46559
|
+
});
|
|
46522
46560
|
}
|
|
46523
46561
|
highlightDefault() {
|
|
46524
46562
|
var _a;
|
|
@@ -46590,12 +46628,12 @@ const SmoothlyPicker = class {
|
|
|
46590
46628
|
];
|
|
46591
46629
|
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
|
|
46592
46630
|
? this.selections.length.toString() + " " + this.selectionName
|
|
46593
|
-
: 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 })));
|
|
46631
|
+
: 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 })));
|
|
46594
46632
|
}
|
|
46595
46633
|
get element() { return getElement(this); }
|
|
46596
46634
|
static get watchers() { return {
|
|
46597
|
-
"selections": ["
|
|
46598
|
-
"isOpen": ["
|
|
46635
|
+
"selections": ["isOpenChangeHandler"],
|
|
46636
|
+
"isOpen": ["isOpenChangeHandler"]
|
|
46599
46637
|
}; }
|
|
46600
46638
|
};
|
|
46601
46639
|
SmoothlyPicker.style = styleCss$k;
|
|
@@ -46743,7 +46781,7 @@ const SmoothlySelectDemo = class {
|
|
|
46743
46781
|
{ name: "Scary Kraken", value: "kraken" },
|
|
46744
46782
|
] }),
|
|
46745
46783
|
h("br", null),
|
|
46746
|
-
h("smoothly-picker", { label: "", "empty-menu-label": "Sorry, we're out of options.", "max-height": "58px", multiple: true, options: [
|
|
46784
|
+
h("smoothly-picker", { label: "Multiple", "empty-menu-label": "Sorry, we're out of options.", "max-height": "58px", multiple: true, options: [
|
|
46747
46785
|
{ name: "Big Dog", value: "dog", aliases: ["WOFF"] },
|
|
46748
46786
|
{ name: "Cat Stevens", value: "cat", aliases: ["moew"] },
|
|
46749
46787
|
{ name: "Noble Pig", value: "pig" },
|
|
@@ -46757,6 +46795,13 @@ const SmoothlySelectDemo = class {
|
|
|
46757
46795
|
{ name: "Scary Kraken", value: "kraken" },
|
|
46758
46796
|
] }),
|
|
46759
46797
|
h("br", null),
|
|
46798
|
+
h("smoothly-picker", { label: "Multiple mutable", "max-height": "58px", multiple: true, mutable: true, newOptionLabel: "Invite:", options: [
|
|
46799
|
+
{ name: "john@example.com", value: "john@example.com" },
|
|
46800
|
+
{ name: "jane@example.com", value: "jane@example.com" },
|
|
46801
|
+
{ name: "james@example.com", value: "james@example.com" },
|
|
46802
|
+
{ name: "jessie@example.com", value: "jessie@example.com" },
|
|
46803
|
+
], valueValidator: (email) => email.match(/^\w+@\w+/) ? [true, undefined] : [false, Notice.failed("Incorrectly formatted email")] }),
|
|
46804
|
+
h("br", null),
|
|
46760
46805
|
h("smoothly-picker", { label: "Single select", multiple: false, "max-menu-height": "200px", options: [
|
|
46761
46806
|
{ name: "Dog", value: "dog", aliases: ["WOFF"], right: "Woof 🐶" },
|
|
46762
46807
|
{ name: "Cat", value: "cat", aliases: ["moew"] },
|
|
@@ -47012,7 +47057,7 @@ const SmoothlySvg = class {
|
|
|
47012
47057
|
};
|
|
47013
47058
|
SmoothlySvg.style = styleCss$a;
|
|
47014
47059
|
|
|
47015
|
-
const styleCss$9 = "
|
|
47060
|
+
const styleCss$9 = "[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}";
|
|
47016
47061
|
|
|
47017
47062
|
const SmoothlyTab = class {
|
|
47018
47063
|
constructor(hostRef) {
|
|
@@ -47042,7 +47087,7 @@ const SmoothlyTab = class {
|
|
|
47042
47087
|
};
|
|
47043
47088
|
SmoothlyTab.style = styleCss$9;
|
|
47044
47089
|
|
|
47045
|
-
const styleCss$8 = ".sc-smoothly-tab-switch-h{display:flex;flex-direction:row;
|
|
47090
|
+
const styleCss$8 = ".sc-smoothly-tab-switch-h{display:flex;flex-direction:row;justify-content:space-around;border-bottom:3px solid rgb(var(--smoothly-default-shade))}";
|
|
47046
47091
|
|
|
47047
47092
|
const SmoothlyTabSwitch = class {
|
|
47048
47093
|
constructor(hostRef) {
|
|
@@ -47068,7 +47113,7 @@ const SmoothlyTabSwitch = class {
|
|
|
47068
47113
|
};
|
|
47069
47114
|
SmoothlyTabSwitch.style = styleCss$8;
|
|
47070
47115
|
|
|
47071
|
-
const styleCss$7 = ".sc-smoothly-table-h{display:table;
|
|
47116
|
+
const styleCss$7 = ".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}";
|
|
47072
47117
|
|
|
47073
47118
|
const Table = class {
|
|
47074
47119
|
constructor(hostRef) {
|
|
@@ -47085,7 +47130,7 @@ const Table = class {
|
|
|
47085
47130
|
};
|
|
47086
47131
|
Table.style = styleCss$7;
|
|
47087
47132
|
|
|
47088
|
-
const styleCss$6 = ".sc-smoothly-table-cell-h{display:table-cell;
|
|
47133
|
+
const styleCss$6 = ".sc-smoothly-table-cell-h{display:table-cell;line-height:1.5rem;white-space:nowrap;padding:0.3rem 0 0.3rem 1rem}";
|
|
47089
47134
|
|
|
47090
47135
|
const TableCell = class {
|
|
47091
47136
|
constructor(hostRef) {
|
|
@@ -47105,14 +47150,14 @@ const TableDemo = class {
|
|
|
47105
47150
|
}
|
|
47106
47151
|
render() {
|
|
47107
47152
|
return [
|
|
47108
|
-
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")
|
|
47109
|
-
h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "Header A"), h("smoothly-table-
|
|
47153
|
+
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"))),
|
|
47154
|
+
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")))))))),
|
|
47110
47155
|
];
|
|
47111
47156
|
}
|
|
47112
47157
|
};
|
|
47113
47158
|
TableDemo.style = styleCss$5;
|
|
47114
47159
|
|
|
47115
|
-
const styleCss$4 = ".sc-smoothly-table-expandable-cell-h{display:table-cell;
|
|
47160
|
+
const styleCss$4 = ".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%}";
|
|
47116
47161
|
|
|
47117
47162
|
const TableExpandableCell = class {
|
|
47118
47163
|
constructor(hostRef) {
|
|
@@ -47141,7 +47186,7 @@ const TableExpandableCell = class {
|
|
|
47141
47186
|
}
|
|
47142
47187
|
}
|
|
47143
47188
|
render() {
|
|
47144
|
-
return (h(Host, { style: { textAlign: this.align } }, h("
|
|
47189
|
+
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" }))))));
|
|
47145
47190
|
}
|
|
47146
47191
|
get element() { return getElement(this); }
|
|
47147
47192
|
static get watchers() { return {
|
|
@@ -47150,7 +47195,7 @@ const TableExpandableCell = class {
|
|
|
47150
47195
|
};
|
|
47151
47196
|
TableExpandableCell.style = styleCss$4;
|
|
47152
47197
|
|
|
47153
|
-
const styleCss$3 = ".sc-smoothly-table-expandable-row-h{display:table-row;
|
|
47198
|
+
const styleCss$3 = ".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%}";
|
|
47154
47199
|
|
|
47155
47200
|
const TableExpandableRow = class {
|
|
47156
47201
|
constructor(hostRef) {
|
|
@@ -47172,7 +47217,7 @@ const TableExpandableRow = class {
|
|
|
47172
47217
|
this.element.after(this.expansionElement);
|
|
47173
47218
|
}
|
|
47174
47219
|
render() {
|
|
47175
|
-
return (h(Host, { style: { textAlign: this.align } }, h("slot", null), h("smoothly-
|
|
47220
|
+
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" }))))));
|
|
47176
47221
|
}
|
|
47177
47222
|
get element() { return getElement(this); }
|
|
47178
47223
|
static get watchers() { return {
|
|
@@ -47181,7 +47226,7 @@ const TableExpandableRow = class {
|
|
|
47181
47226
|
};
|
|
47182
47227
|
TableExpandableRow.style = styleCss$3;
|
|
47183
47228
|
|
|
47184
|
-
const styleCss$2 = ".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
|
|
47229
|
+
const styleCss$2 = ".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}";
|
|
47185
47230
|
|
|
47186
47231
|
const TableHeader = class {
|
|
47187
47232
|
constructor(hostRef) {
|
|
@@ -47193,7 +47238,7 @@ const TableHeader = class {
|
|
|
47193
47238
|
};
|
|
47194
47239
|
TableHeader.style = styleCss$2;
|
|
47195
47240
|
|
|
47196
|
-
const styleCss$1 = ".sc-smoothly-table-row-h{display:table-row;
|
|
47241
|
+
const styleCss$1 = ".sc-smoothly-table-row-h{display:table-row;cursor:default;line-height:1.5rem}.hide.sc-smoothly-table-row{display:none}";
|
|
47197
47242
|
|
|
47198
47243
|
const TableRow = class {
|
|
47199
47244
|
constructor(hostRef) {
|
package/dist/esm/smoothly.js
CHANGED
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
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"],"
|
|
16
|
+
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);
|
|
17
17
|
});
|