smoothly 0.2.2 → 0.2.5
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 +71 -25
- 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 +149 -11
- 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 -1
- package/dist/collection/components/table/expandable/row/style.css +26 -25
- 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 +74 -28
- package/dist/esm/loader.js +1 -1
- package/dist/esm/smoothly-accordion_51.entry.js +71 -25
- package/dist/esm/smoothly.js +1 -1
- package/dist/smoothly/{p-9d6a20c4.entry.js → p-332b1c90.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 +14 -3
- package/dist/types/components.d.ts +17 -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,15 +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";
|
|
46476
|
+
this.selectAllName = "Select All";
|
|
46466
46477
|
this.selectionName = "items selected";
|
|
46478
|
+
this.newOptionLabel = "Add:";
|
|
46479
|
+
this.valueValidator = _ => [true, undefined];
|
|
46467
46480
|
}
|
|
46468
|
-
|
|
46481
|
+
isOpenChangeHandler() {
|
|
46469
46482
|
if (this.isOpen == false) {
|
|
46470
46483
|
this.menuClose.emit(this.selections);
|
|
46471
46484
|
}
|
|
@@ -46477,10 +46490,26 @@ const SmoothlyPicker = class {
|
|
|
46477
46490
|
this.keepFocusOnReRender = false;
|
|
46478
46491
|
}
|
|
46479
46492
|
}
|
|
46480
|
-
|
|
46493
|
+
optionSelectHandler(event) {
|
|
46481
46494
|
this.toggle(event.detail);
|
|
46482
46495
|
event.stopPropagation();
|
|
46483
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
|
+
}
|
|
46484
46513
|
toggle(option) {
|
|
46485
46514
|
option.value == "select-none"
|
|
46486
46515
|
? this.toggleAll()
|
|
@@ -46515,9 +46544,19 @@ const SmoothlyPicker = class {
|
|
|
46515
46544
|
}
|
|
46516
46545
|
toggleHighlighted() {
|
|
46517
46546
|
var _a;
|
|
46518
|
-
(
|
|
46519
|
-
|
|
46520
|
-
|
|
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
|
+
});
|
|
46521
46560
|
}
|
|
46522
46561
|
highlightDefault() {
|
|
46523
46562
|
var _a;
|
|
@@ -46579,7 +46618,7 @@ const SmoothlyPicker = class {
|
|
|
46579
46618
|
? [
|
|
46580
46619
|
{
|
|
46581
46620
|
value: "select-none",
|
|
46582
|
-
name: this.selectNoneName,
|
|
46621
|
+
name: this.selections.length == this.options.length ? this.selectNoneName : this.selectAllName,
|
|
46583
46622
|
left: this.getCheckHtml(this.selections.length == ((_c = this.options) === null || _c === void 0 ? void 0 : _c.length)),
|
|
46584
46623
|
divider: true,
|
|
46585
46624
|
},
|
|
@@ -46589,12 +46628,12 @@ const SmoothlyPicker = class {
|
|
|
46589
46628
|
];
|
|
46590
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
|
|
46591
46630
|
? this.selections.length.toString() + " " + this.selectionName
|
|
46592
|
-
: 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 })));
|
|
46593
46632
|
}
|
|
46594
46633
|
get element() { return getElement(this); }
|
|
46595
46634
|
static get watchers() { return {
|
|
46596
|
-
"selections": ["
|
|
46597
|
-
"isOpen": ["
|
|
46635
|
+
"selections": ["isOpenChangeHandler"],
|
|
46636
|
+
"isOpen": ["isOpenChangeHandler"]
|
|
46598
46637
|
}; }
|
|
46599
46638
|
};
|
|
46600
46639
|
SmoothlyPicker.style = styleCss$k;
|
|
@@ -46742,7 +46781,7 @@ const SmoothlySelectDemo = class {
|
|
|
46742
46781
|
{ name: "Scary Kraken", value: "kraken" },
|
|
46743
46782
|
] }),
|
|
46744
46783
|
h("br", null),
|
|
46745
|
-
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: [
|
|
46746
46785
|
{ name: "Big Dog", value: "dog", aliases: ["WOFF"] },
|
|
46747
46786
|
{ name: "Cat Stevens", value: "cat", aliases: ["moew"] },
|
|
46748
46787
|
{ name: "Noble Pig", value: "pig" },
|
|
@@ -46756,6 +46795,13 @@ const SmoothlySelectDemo = class {
|
|
|
46756
46795
|
{ name: "Scary Kraken", value: "kraken" },
|
|
46757
46796
|
] }),
|
|
46758
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),
|
|
46759
46805
|
h("smoothly-picker", { label: "Single select", multiple: false, "max-menu-height": "200px", options: [
|
|
46760
46806
|
{ name: "Dog", value: "dog", aliases: ["WOFF"], right: "Woof 🐶" },
|
|
46761
46807
|
{ name: "Cat", value: "cat", aliases: ["moew"] },
|
|
@@ -47011,7 +47057,7 @@ const SmoothlySvg = class {
|
|
|
47011
47057
|
};
|
|
47012
47058
|
SmoothlySvg.style = styleCss$a;
|
|
47013
47059
|
|
|
47014
|
-
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}";
|
|
47015
47061
|
|
|
47016
47062
|
const SmoothlyTab = class {
|
|
47017
47063
|
constructor(hostRef) {
|
|
@@ -47041,7 +47087,7 @@ const SmoothlyTab = class {
|
|
|
47041
47087
|
};
|
|
47042
47088
|
SmoothlyTab.style = styleCss$9;
|
|
47043
47089
|
|
|
47044
|
-
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))}";
|
|
47045
47091
|
|
|
47046
47092
|
const SmoothlyTabSwitch = class {
|
|
47047
47093
|
constructor(hostRef) {
|
|
@@ -47067,7 +47113,7 @@ const SmoothlyTabSwitch = class {
|
|
|
47067
47113
|
};
|
|
47068
47114
|
SmoothlyTabSwitch.style = styleCss$8;
|
|
47069
47115
|
|
|
47070
|
-
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}";
|
|
47071
47117
|
|
|
47072
47118
|
const Table = class {
|
|
47073
47119
|
constructor(hostRef) {
|
|
@@ -47084,7 +47130,7 @@ const Table = class {
|
|
|
47084
47130
|
};
|
|
47085
47131
|
Table.style = styleCss$7;
|
|
47086
47132
|
|
|
47087
|
-
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}";
|
|
47088
47134
|
|
|
47089
47135
|
const TableCell = class {
|
|
47090
47136
|
constructor(hostRef) {
|
|
@@ -47104,14 +47150,14 @@ const TableDemo = class {
|
|
|
47104
47150
|
}
|
|
47105
47151
|
render() {
|
|
47106
47152
|
return [
|
|
47107
|
-
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")
|
|
47108
|
-
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")))))))),
|
|
47109
47155
|
];
|
|
47110
47156
|
}
|
|
47111
47157
|
};
|
|
47112
47158
|
TableDemo.style = styleCss$5;
|
|
47113
47159
|
|
|
47114
|
-
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%}";
|
|
47115
47161
|
|
|
47116
47162
|
const TableExpandableCell = class {
|
|
47117
47163
|
constructor(hostRef) {
|
|
@@ -47140,7 +47186,7 @@ const TableExpandableCell = class {
|
|
|
47140
47186
|
}
|
|
47141
47187
|
}
|
|
47142
47188
|
render() {
|
|
47143
|
-
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" }))))));
|
|
47144
47190
|
}
|
|
47145
47191
|
get element() { return getElement(this); }
|
|
47146
47192
|
static get watchers() { return {
|
|
@@ -47149,7 +47195,7 @@ const TableExpandableCell = class {
|
|
|
47149
47195
|
};
|
|
47150
47196
|
TableExpandableCell.style = styleCss$4;
|
|
47151
47197
|
|
|
47152
|
-
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-group;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;position:absolute;right:1rem;top:-1.8rem;transition:transform 0.2s}[open].sc-smoothly-table-expandable-row-h smoothly-icon.sc-smoothly-table-expandable-row{transform:rotate(90deg)}aside.sc-smoothly-table-expandable-row{display:table-row;position:relative}.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%}";
|
|
47153
47199
|
|
|
47154
47200
|
const TableExpandableRow = class {
|
|
47155
47201
|
constructor(hostRef) {
|
|
@@ -47171,7 +47217,7 @@ const TableExpandableRow = class {
|
|
|
47171
47217
|
this.element.after(this.expansionElement);
|
|
47172
47218
|
}
|
|
47173
47219
|
render() {
|
|
47174
|
-
return (h(Host, { style: { textAlign: this.align } }, h("slot", null), h("
|
|
47220
|
+
return (h(Host, { style: { textAlign: this.align } }, h("slot", null), h("aside", 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" }))))));
|
|
47175
47221
|
}
|
|
47176
47222
|
get element() { return getElement(this); }
|
|
47177
47223
|
static get watchers() { return {
|
|
@@ -47180,7 +47226,7 @@ const TableExpandableRow = class {
|
|
|
47180
47226
|
};
|
|
47181
47227
|
TableExpandableRow.style = styleCss$3;
|
|
47182
47228
|
|
|
47183
|
-
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}";
|
|
47184
47230
|
|
|
47185
47231
|
const TableHeader = class {
|
|
47186
47232
|
constructor(hostRef) {
|
|
@@ -47192,7 +47238,7 @@ const TableHeader = class {
|
|
|
47192
47238
|
};
|
|
47193
47239
|
TableHeader.style = styleCss$2;
|
|
47194
47240
|
|
|
47195
|
-
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}";
|
|
47196
47242
|
|
|
47197
47243
|
const TableRow = class {
|
|
47198
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"],"
|
|
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
|
});
|