smoothly 0.3.17 → 0.3.19
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_53.cjs.entry.js +81 -19
- package/dist/cjs/smoothly.cjs.js +1 -1
- package/dist/collection/components/table/cell/index.js +1 -1
- package/dist/collection/components/table/cell/style.css +18 -0
- package/dist/collection/components/table/demo/index.js +1 -0
- package/dist/collection/components/table/demo/style.css +7 -0
- package/dist/collection/components/table/expandable/cell/index.js +66 -5
- package/dist/collection/components/table/expandable/cell/style.css +36 -8
- package/dist/collection/components/table/expandable/row/index.js +69 -6
- package/dist/collection/components/table/expandable/row/style.css +45 -19
- package/dist/collection/components/table/header/style.css +1 -1
- package/dist/collection/components/table/index.js +115 -4
- package/dist/collection/components/table/style.css +10 -3
- package/dist/custom-elements/index.js +84 -22
- package/dist/esm/loader.js +1 -1
- package/dist/esm/smoothly-accordion_53.entry.js +81 -19
- package/dist/esm/smoothly.js +1 -1
- package/dist/smoothly/{p-0c774f8d.entry.js → p-8dd649c3.entry.js} +1 -1
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/types/components/table/expandable/cell/index.d.ts +16 -8
- package/dist/types/components/table/expandable/row/index.d.ts +15 -6
- package/dist/types/components/table/index.d.ts +22 -3
- package/dist/types/components.d.ts +9 -1
- package/package.json +1 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["smoothly-country.cjs",[[2,"smoothly-country",{"value":[1],"text":[1],"language":[32]}]]],["smoothly-google-font.cjs",[[2,"smoothly-google-font",{"value":[1]}]]],["smoothly-radio-group.cjs",[[4,"smoothly-radio-group",{"orientation":[513]}]]],["smoothly-reorder.cjs",[[0,"smoothly-reorder"]]],["smoothly-trigger-sink.cjs",[[6,"smoothly-trigger-sink",{"context":[16],"destination":[1],"filter":[1]},[[0,"trigger","TriggerListener"]]]]],["smoothly-trigger-source.cjs",[[6,"smoothly-trigger-source",{"listen":[1]}]]],["smoothly-accordion_53.cjs",[[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"]]],[1,"smoothly-picker",{"disabled":[516],"readonly":[516],"maxMenuHeight":[1,"max-menu-height"],"maxHeight":[1,"max-height"],"emptyMenuLabel":[1025,"empty-menu-label"],"multiple":[516],"mutable":[4],"optionStyle":[8,"option-style"],"options":[1040],"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,"optionUnselect","optionSelectHandler"],[0,"optionAdd","optionAddHandler"],[0,"menuEmpty","emptyHandler"]]],[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]],[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-radio-button-item",{"value":[8],"selected":[1540],"color":[513]}],[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]
|
|
17
|
+
return index.bootstrapLazy([["smoothly-country.cjs",[[2,"smoothly-country",{"value":[1],"text":[1],"language":[32]}]]],["smoothly-google-font.cjs",[[2,"smoothly-google-font",{"value":[1]}]]],["smoothly-radio-group.cjs",[[4,"smoothly-radio-group",{"orientation":[513]}]]],["smoothly-reorder.cjs",[[0,"smoothly-reorder"]]],["smoothly-trigger-sink.cjs",[[6,"smoothly-trigger-sink",{"context":[16],"destination":[1],"filter":[1]},[[0,"trigger","TriggerListener"]]]]],["smoothly-trigger-source.cjs",[[6,"smoothly-trigger-source",{"listen":[1]}]]],["smoothly-accordion_53.cjs",[[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"]]],[1,"smoothly-picker",{"disabled":[516],"readonly":[516],"maxMenuHeight":[1,"max-menu-height"],"maxHeight":[1,"max-height"],"emptyMenuLabel":[1025,"empty-menu-label"],"multiple":[516],"mutable":[4],"optionStyle":[8,"option-style"],"options":[1040],"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,"optionUnselect","optionSelectHandler"],[0,"optionAdd","optionAddHandler"],[0,"menuEmpty","emptyHandler"]]],[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]],[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-radio-button-item",{"value":[8],"selected":[1540],"color":[513]}],[6,"smoothly-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]],[6,"smoothly-table-cell"],[6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540],"allowSpotlight":[32],"spotlight":[32]},[[0,"click","onClick"],[0,"tableLoad","handleTableLoaded"]]],[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],"format":[16]}],[2,"smoothly-display-amount",{"amount":[8],"currency":[1],"toInteger":[4,"to-integer"]}],[2,"smoothly-display-date-time",{"datetime":[1]}],[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}],[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}],[6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}],[6,"smoothly-radio-button",{"name":[1],"value":[1032],"deselectable":[516],"decoration":[513]},[[2,"radioItemSelectInternal","radioSelectHandler"]]],[6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}],[2,"smoothly-skeleton",{"widths":[16],"width":[1025],"color":[1],"period":[2],"distance":[1],"align":[513]}],[2,"smoothly-svg",{"url":[513],"size":[513],"color":[1]}],[6,"smoothly-table",{"root":[1540]},[[0,"expandableLoad","handleExpandableLoaded"],[0,"expandableChange","handleExpandableState"],[0,"spotlightChange","handleSpotlightState"],[0,"smoothlyNestedTable","handleNestedTable"],[0,"expansionLoad","handleEvents"],[0,"expansionOpen","handleEvents"]]],[6,"smoothly-table-expandable-row",{"align":[1],"open":[1540],"allowSpotlight":[32],"spotlight":[32]},[[0,"click","onClick"],[0,"tableLoad","handleTableLoaded"]]],[6,"smoothly-table-header",{"name":[1]}],[6,"smoothly-table-row",null,[[0,"expansionLoad","onExpansionLoad"],[0,"expansionOpen","onExpansionOpen"]]],[6,"smoothly-input-date",{"name":[513],"value":[1025],"open":[1028],"max":[1025],"min":[1025],"disabled":[1028]},[[0,"dateSet","dateSetHandler"]]],[1,"smoothly-menu-options",{"toggle":[4],"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"]]],[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],"checkbox":[4],"new":[4],"toggle":[4],"checked":[1028]}],[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-quiet",{"color":[1]}],[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);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -22660,12 +22660,39 @@ const SmoothlyTabSwitch = class {
|
|
|
22660
22660
|
};
|
|
22661
22661
|
SmoothlyTabSwitch.style = styleCss$8;
|
|
22662
22662
|
|
|
22663
|
-
const styleCss$7 = ".sc-smoothly-table-h{display:table;
|
|
22663
|
+
const styleCss$7 = ".sc-smoothly-table-h{display:table;width:var(--table-width, 80%);box-sizing:border-box;background-color:rgb(var(--smoothly-default-color))}[root].sc-smoothly-table-h{margin-left:auto;margin-right:auto;margin-left:1.5rem;margin-right:1.5rem}.sc-smoothly-table-h:not([root]){margin:0;width:100%}";
|
|
22664
22664
|
|
|
22665
22665
|
const Table = class {
|
|
22666
22666
|
constructor(hostRef) {
|
|
22667
22667
|
index.registerInstance(this, hostRef);
|
|
22668
|
-
this.
|
|
22668
|
+
this.smoothlyNestedTable = index.createEvent(this, "smoothlyNestedTable", 7);
|
|
22669
|
+
this.spotlightChange = index.createEvent(this, "spotlightChange", 7);
|
|
22670
|
+
this.tableLoad = index.createEvent(this, "tableLoad", 7);
|
|
22671
|
+
this.expandable = new Map();
|
|
22672
|
+
this.expanded = new Set();
|
|
22673
|
+
this.root = true;
|
|
22674
|
+
}
|
|
22675
|
+
componentWillLoad() {
|
|
22676
|
+
this.smoothlyNestedTable.emit(() => (this.root = false));
|
|
22677
|
+
this.tableLoad.emit((owner) => (this.owner = owner));
|
|
22678
|
+
}
|
|
22679
|
+
handleExpandableLoaded(event) {
|
|
22680
|
+
event.stopPropagation();
|
|
22681
|
+
event.target && this.expandable.set(event.target, event.detail);
|
|
22682
|
+
}
|
|
22683
|
+
handleExpandableState(event) {
|
|
22684
|
+
event.stopPropagation();
|
|
22685
|
+
event.target && (event.detail ? this.expanded.add(event.target) : this.expanded.delete(event.target));
|
|
22686
|
+
this.spotlightChange.emit({ allowSpotlight: !this.expanded.size, owner: this.owner });
|
|
22687
|
+
}
|
|
22688
|
+
handleSpotlightState(event) {
|
|
22689
|
+
var _a;
|
|
22690
|
+
event.target != this.element &&
|
|
22691
|
+
(event.stopPropagation(),
|
|
22692
|
+
event.detail.owner && ((_a = this.expandable.get(event.detail.owner)) === null || _a === void 0 ? void 0 : _a.allowSpotlight(event.detail.allowSpotlight)));
|
|
22693
|
+
}
|
|
22694
|
+
handleNestedTable(event) {
|
|
22695
|
+
event.target != this.element && (event.stopPropagation(), event.detail());
|
|
22669
22696
|
}
|
|
22670
22697
|
handleEvents(event) {
|
|
22671
22698
|
event.stopPropagation();
|
|
@@ -22677,19 +22704,19 @@ const Table = class {
|
|
|
22677
22704
|
};
|
|
22678
22705
|
Table.style = styleCss$7;
|
|
22679
22706
|
|
|
22680
|
-
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}";
|
|
22707
|
+
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;border-bottom:1px solid rgb(var(--smoothly-dark-color))}.sc-smoothly-table-cell-h smoothly-icon.sc-smoothly-table-cell{display:none}.sc-smoothly-table-cell-h>div.sc-smoothly-table-cell{display:flex;align-items:center;justify-content:space-between}.sc-smoothly-table-cell-h smoothly-icon.sc-smoothly-table-cell{width:0.6rem;height:0.6rem;margin:0 0.3rem;transition:transform 0.2s}";
|
|
22681
22708
|
|
|
22682
22709
|
const TableCell = class {
|
|
22683
22710
|
constructor(hostRef) {
|
|
22684
22711
|
index.registerInstance(this, hostRef);
|
|
22685
22712
|
}
|
|
22686
22713
|
render() {
|
|
22687
|
-
return (index.h(index.Host, null, index.h("slot", null)));
|
|
22714
|
+
return (index.h(index.Host, null, index.h("div", null, index.h("slot", null), index.h("smoothly-icon", { name: "chevron-forward", size: "tiny" }))));
|
|
22688
22715
|
}
|
|
22689
22716
|
};
|
|
22690
22717
|
TableCell.style = styleCss$6;
|
|
22691
22718
|
|
|
22692
|
-
const styleCss$5 = "";
|
|
22719
|
+
const styleCss$5 = ".sc-smoothly-table-demo-h{display:flex;flex-direction:column;align-items:center;gap:3rem;padding-bottom:10rem}";
|
|
22693
22720
|
|
|
22694
22721
|
const TableDemo = class {
|
|
22695
22722
|
constructor(hostRef) {
|
|
@@ -22699,18 +22726,23 @@ const TableDemo = class {
|
|
|
22699
22726
|
return [
|
|
22700
22727
|
index.h("smoothly-table", null, index.h("smoothly-table-row", null, index.h("smoothly-table-header", null, "Header A"), index.h("smoothly-table-header", null, "Header B"), index.h("smoothly-table-header", null, "Header C"), index.h("smoothly-table-header", null, "Header D")), index.h("smoothly-table-row", null, index.h("smoothly-table-expandable-cell", null, "normal row (exp.cell)", index.h("div", { slot: "detail" }, "expandable cell 1 content")), index.h("smoothly-table-expandable-cell", null, "expandable cell", index.h("div", { slot: "detail" }, "expandable cell 2 content")), index.h("smoothly-table-expandable-cell", null, "expandable cell", index.h("div", { slot: "detail" }, "expandable cell 3 content")), index.h("smoothly-table-expandable-cell", null, "expandable cell", index.h("div", { slot: "detail" }, "expandable cell 4 content"))), index.h("smoothly-table-row", null, index.h("smoothly-table-cell", null, "normal row (nor.cell)\""), index.h("smoothly-table-cell", null, "normal cell"), index.h("smoothly-table-expandable-cell", null, "expandable cell", index.h("div", { slot: "detail" }, "expandable cell details.")), index.h("smoothly-table-expandable-cell", null, "expandable cell", index.h("div", { slot: "detail" }, "expandable cell details."))), index.h("smoothly-table-expandable-row", null, index.h("smoothly-table-cell", null, "expandable row (nor.cell)"), index.h("smoothly-table-cell", null, "Normal cell"), index.h("smoothly-table-cell", null, "normal cell"), index.h("smoothly-table-cell", null, "Normal cell"), index.h("div", { slot: "detail" }, "expandable row content"))),
|
|
22701
22728
|
index.h("smoothly-table", null, index.h("smoothly-table-row", null, index.h("smoothly-table-header", null, "Header A")), index.h("smoothly-table-expandable-row", null, index.h("smoothly-table-cell", null, "A Content"), index.h("div", { slot: "detail" }, index.h("smoothly-tab-switch", null, index.h("smoothly-tab", { label: "innertable 1", open: true }, index.h("smoothly-table", null, index.h("smoothly-table-row", null, index.h("smoothly-table-header", null, "Header B")), index.h("smoothly-table-expandable-row", null, "B Content"))), index.h("smoothly-tab", { label: "innertable 2" }, index.h("smoothly-table", null, index.h("smoothly-table-row", null, index.h("smoothly-table-header", null, "Header C")), index.h("smoothly-table-expandable-row", null, index.h("smoothly-table-cell", null, "C Content")))))))),
|
|
22729
|
+
index.h("smoothly-table", null, index.h("smoothly-table-row", null, index.h("smoothly-table-header", null, "A"), index.h("smoothly-table-header", null, "B")), index.h("smoothly-table-expandable-row", null, index.h("smoothly-table-cell", null, "a row"), index.h("smoothly-table-cell", null, "b row"), index.h("div", { slot: "detail" }, index.h("smoothly-table", null, index.h("smoothly-table-row", null, index.h("smoothly-table-header", null, "C"), index.h("smoothly-table-header", null, "D")), index.h("smoothly-table-expandable-row", null, index.h("smoothly-table-cell", null, "c"), index.h("smoothly-table-cell", null, "d"), index.h("div", { slot: "detail" }, index.h("smoothly-table", null, index.h("smoothly-table-row", null, index.h("smoothly-table-header", null, "E"), index.h("smoothly-table-header", null, "F")), index.h("smoothly-table-expandable-row", null, index.h("smoothly-table-cell", null, "e row"), index.h("smoothly-table-cell", null, "f row"), index.h("div", { slot: "detail" }, "nested expandable row expansion e f")))))))), index.h("smoothly-table-row", null, index.h("smoothly-table-expandable-cell", null, "a cell", index.h("div", { slot: "detail" }, index.h("smoothly-table", null, index.h("smoothly-table-row", null, index.h("smoothly-table-header", null, "E"), index.h("smoothly-table-header", null, "F")), index.h("smoothly-table-row", null, index.h("smoothly-table-expandable-cell", null, "e cell", index.h("div", { slot: "detail" }, "nested expandable cell expansion e")), index.h("smoothly-table-expandable-cell", null, "f cell", index.h("div", { slot: "detail" }, "nested expandable cell expansion f")))))), index.h("smoothly-table-expandable-cell", null, "b cell", index.h("div", { slot: "detail" }, index.h("smoothly-table", null, index.h("smoothly-table-row", null, index.h("smoothly-table-header", null, "C"), index.h("smoothly-table-header", null, "D")), index.h("smoothly-table-row", null, index.h("smoothly-table-expandable-cell", null, "c cell", index.h("div", { slot: "detail" }, "nested expandable cell expansion c")), index.h("smoothly-table-expandable-cell", null, "d cell", index.h("div", { slot: "detail" }, "nested expandable cell expansion d")))))))),
|
|
22702
22730
|
];
|
|
22703
22731
|
}
|
|
22704
22732
|
};
|
|
22705
22733
|
TableDemo.style = styleCss$5;
|
|
22706
22734
|
|
|
22707
|
-
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));
|
|
22735
|
+
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;border-bottom:1px solid rgb(var(--smoothly-dark-color))}[open].sc-smoothly-table-expandable-cell-h{position:relative;z-index:3;background-color:rgb(var(--smoothly-default-color));box-shadow:-1px 0 0 rgb(var(--smoothly-dark-color)) inset, \n\t\t1px 0 0 rgb(var(--smoothly-dark-color)) inset;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;display:flex;height:100%;align-self:center}[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}td.sc-smoothly-table-expandable-cell-s>*{--expansion-width:1.5rem;--expansion-border-width:3px;position:relative;background-color:rgb(var(--smoothly-default-color));width:calc(100% + 3rem - var(--expansion-border-width));left:calc(-1 * var(--expansion-width));border-left:var(--expansion-border-width) solid rgb(0, 0, 0, 0);box-shadow:0px 0px 4px 2px rgb(var(--smoothly-dark-color));box-sizing:border-box;padding:0.5rem calc(var(--expansion-width) - var(--expansion-border-width));border-bottom:1px solid rgb(var(--smoothly-dark-color));border-left-width:3px}tr.spotlight>td.sc-smoothly-table-expandable-cell-s>*{border-left-color:rgb(var(--smoothly-tertiary-color))}td.sc-smoothly-table-expandable-cell-s>*::before{content:\"\";position:absolute;display:flex;top:-1px;bottom:0;left:-3px;width:calc(var(--expansion-width) + 1px);border-top:1px solid rgb(var(--smoothly-dark-color))}td.sc-smoothly-table-expandable-cell-s>*::after{content:\"\";position:absolute;display:flex;top:-1px;bottom:0;right:0;width:calc(var(--expansion-width) -1px);border-top:1px solid rgb(var(--smoothly-dark-color))}";
|
|
22708
22736
|
|
|
22709
22737
|
const TableExpandableCell = class {
|
|
22710
22738
|
constructor(hostRef) {
|
|
22711
22739
|
index.registerInstance(this, hostRef);
|
|
22712
22740
|
this.expansionOpen = index.createEvent(this, "expansionOpen", 7);
|
|
22713
22741
|
this.expansionLoad = index.createEvent(this, "expansionLoad", 7);
|
|
22742
|
+
this.expandableChange = index.createEvent(this, "expandableChange", 7);
|
|
22743
|
+
this.expandableLoad = index.createEvent(this, "expandableLoad", 7);
|
|
22744
|
+
this.allowSpotlight = true;
|
|
22745
|
+
this.spotlight = true;
|
|
22714
22746
|
this.align = "left";
|
|
22715
22747
|
}
|
|
22716
22748
|
openChanged(value) {
|
|
@@ -22719,12 +22751,16 @@ const TableExpandableCell = class {
|
|
|
22719
22751
|
this.beginOpen = true;
|
|
22720
22752
|
else
|
|
22721
22753
|
this.element.append(this.expansionElement);
|
|
22754
|
+
this.expandableChange.emit(this.open);
|
|
22722
22755
|
}
|
|
22723
|
-
|
|
22724
|
-
this.
|
|
22756
|
+
handleSpotlight() {
|
|
22757
|
+
this.spotlight = this.open && this.allowSpotlight;
|
|
22725
22758
|
}
|
|
22726
|
-
|
|
22759
|
+
componentWillLoad() {
|
|
22727
22760
|
this.expansionLoad.emit();
|
|
22761
|
+
this.expandableLoad.emit({
|
|
22762
|
+
allowSpotlight: (allowed) => (this.allowSpotlight = allowed),
|
|
22763
|
+
});
|
|
22728
22764
|
}
|
|
22729
22765
|
componentDidRender() {
|
|
22730
22766
|
if (this.beginOpen) {
|
|
@@ -22732,48 +22768,74 @@ const TableExpandableCell = class {
|
|
|
22732
22768
|
this.expansionOpen.emit(this.expansionElement);
|
|
22733
22769
|
}
|
|
22734
22770
|
}
|
|
22771
|
+
onClick() {
|
|
22772
|
+
this.open = !this.open;
|
|
22773
|
+
}
|
|
22774
|
+
handleTableLoaded(event) {
|
|
22775
|
+
event.stopPropagation();
|
|
22776
|
+
event.detail(this.element);
|
|
22777
|
+
}
|
|
22735
22778
|
render() {
|
|
22736
|
-
return (index.h(index.Host, { style: { textAlign: this.align } }, index.h("aside", null, index.h("smoothly-icon", { name: "chevron-forward", size: "tiny" }), index.h("slot", null)), index.h("tr", { ref: e => (this.expansionElement = e) }, index.h("td", { colSpan: 999, class: !this.open ? "hide" : "" }, index.h("
|
|
22779
|
+
return (index.h(index.Host, { style: { textAlign: this.align } }, index.h("aside", null, index.h("smoothly-icon", { name: "chevron-forward", size: "tiny" }), index.h("slot", null)), index.h("tr", { class: this.spotlight ? "spotlight" : "", ref: e => (this.expansionElement = e) }, index.h("td", { colSpan: 999, class: !this.open ? "hide" : "" }, index.h("slot", { name: "detail" })))));
|
|
22737
22780
|
}
|
|
22738
22781
|
get element() { return index.getElement(this); }
|
|
22739
22782
|
static get watchers() { return {
|
|
22740
|
-
"open": ["openChanged"]
|
|
22783
|
+
"open": ["openChanged", "handleSpotlight"],
|
|
22784
|
+
"allowSpotlight": ["handleSpotlight"]
|
|
22741
22785
|
}; }
|
|
22742
22786
|
};
|
|
22743
22787
|
TableExpandableCell.style = styleCss$4;
|
|
22744
22788
|
|
|
22745
|
-
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));
|
|
22789
|
+
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));box-shadow:-1px 0 0 0 rgb(var(--smoothly-dark-color)) inset, \n\t\t1px 0 0 0 rgb(var(--smoothly-dark-color)) inset}.sc-smoothly-table-expandable-row-h[open].sc-smoothly-table-expandable-row-s>smoothly-table-cell{border-bottom:none}.hide.sc-smoothly-table-expandable-row{display:none}.sc-smoothly-table-expandable-row-h>tr.sc-smoothly-table-expandable-row>td.sc-smoothly-table-expandable-row{position:relative}td.sc-smoothly-table-expandable-row-s>*{--expansion-width:1.5rem;--expansion-border-width:3px;position:relative;background-color:rgb(var(--smoothly-default-color));width:calc(100% + 3rem - var(--expansion-border-width));left:calc(-1 * var(--expansion-width));border-left:var(--expansion-border-width) solid rgb(0, 0, 0, 0);box-shadow:0px 0px 4px 2px rgb(var(--smoothly-dark-color));box-sizing:border-box;padding:0.5rem calc(var(--expansion-width) - var(--expansion-border-width));border-bottom:1px solid rgb(var(--smoothly-dark-color));border-left-width:3px}tr.spotlight>td.sc-smoothly-table-expandable-row-s>*{border-left-color:rgb(var(--smoothly-tertiary-color))}td.sc-smoothly-table-expandable-row-s>*::before{content:\"\";position:absolute;display:flex;top:0;bottom:0;left:-3px;width:calc(var(--expansion-width) + 1px);border-top:1px solid rgb(var(--smoothly-dark-color))}td.sc-smoothly-table-expandable-row-s>*::after{content:\"\";position:absolute;display:flex;top:0;bottom:0;right:0;width:calc(var(--expansion-width) -1px);border-top:1px solid rgb(var(--smoothly-dark-color))}.sc-smoothly-table-expandable-row-h.sc-smoothly-table-expandable-row-s>smoothly-table-cell:last-of-type smoothly-icon{display:flex}.sc-smoothly-table-expandable-row-h[open].sc-smoothly-table-expandable-row-s>smoothly-table-cell:last-of-type smoothly-icon{transform:rotate(90deg)}";
|
|
22746
22790
|
|
|
22747
22791
|
const TableExpandableRow = class {
|
|
22748
22792
|
constructor(hostRef) {
|
|
22749
22793
|
index.registerInstance(this, hostRef);
|
|
22750
22794
|
this.expansionOpen = index.createEvent(this, "expansionOpen", 7);
|
|
22795
|
+
this.expandableChange = index.createEvent(this, "expandableChange", 7);
|
|
22796
|
+
this.expandableLoad = index.createEvent(this, "expandableLoad", 7);
|
|
22797
|
+
this.allowSpotlight = true;
|
|
22798
|
+
this.spotlight = true;
|
|
22751
22799
|
this.align = "left";
|
|
22752
22800
|
}
|
|
22753
|
-
openChanged(
|
|
22801
|
+
openChanged() {
|
|
22754
22802
|
if (this.expansionElement)
|
|
22755
22803
|
this.element.after(this.expansionElement);
|
|
22804
|
+
this.expandableChange.emit(this.open);
|
|
22756
22805
|
}
|
|
22757
|
-
|
|
22758
|
-
this.
|
|
22759
|
-
|
|
22806
|
+
handleSpotlight() {
|
|
22807
|
+
this.spotlight = this.open && this.allowSpotlight;
|
|
22808
|
+
}
|
|
22809
|
+
componentWillLoad() {
|
|
22810
|
+
this.expandableLoad.emit({
|
|
22811
|
+
allowSpotlight: (allowed) => (this.allowSpotlight = allowed),
|
|
22812
|
+
});
|
|
22760
22813
|
}
|
|
22761
22814
|
componentDidRender() {
|
|
22762
22815
|
this.expansionOpen.emit(this.expansionElement);
|
|
22763
22816
|
if (this.expansionElement && this.open)
|
|
22764
22817
|
this.element.after(this.expansionElement);
|
|
22765
22818
|
}
|
|
22819
|
+
onClick(event) {
|
|
22820
|
+
event.stopPropagation();
|
|
22821
|
+
this.open = !this.open;
|
|
22822
|
+
}
|
|
22823
|
+
handleTableLoaded(event) {
|
|
22824
|
+
event.stopPropagation();
|
|
22825
|
+
event.detail(this.element);
|
|
22826
|
+
}
|
|
22766
22827
|
render() {
|
|
22767
|
-
return (index.h(index.Host, { style: { textAlign: this.align } }, index.h("slot", null), index.h("
|
|
22828
|
+
return (index.h(index.Host, { style: { textAlign: this.align } }, index.h("slot", null), index.h("tr", { class: this.spotlight ? "spotlight" : "", ref: e => (this.expansionElement = e) }, index.h("td", { colSpan: 999, class: !this.open ? "hide" : "" }, index.h("slot", { name: "detail" })))));
|
|
22768
22829
|
}
|
|
22769
22830
|
get element() { return index.getElement(this); }
|
|
22770
22831
|
static get watchers() { return {
|
|
22771
|
-
"open": ["openChanged"]
|
|
22832
|
+
"open": ["openChanged", "handleSpotlight"],
|
|
22833
|
+
"allowSpotlight": ["handleSpotlight"]
|
|
22772
22834
|
}; }
|
|
22773
22835
|
};
|
|
22774
22836
|
TableExpandableRow.style = styleCss$3;
|
|
22775
22837
|
|
|
22776
|
-
const styleCss$2 = ".sc-smoothly-table-header-h{display:table-cell;line-height:2.5rem;
|
|
22838
|
+
const styleCss$2 = ".sc-smoothly-table-header-h{display:table-cell;line-height:2.5rem;border-bottom:1px solid rgb(var(--smoothly-dark-color));border-top:1px solid rgb(var(--smoothly-dark-color));padding-left:1rem;font-weight:bold}";
|
|
22777
22839
|
|
|
22778
22840
|
const TableHeader = class {
|
|
22779
22841
|
constructor(hostRef) {
|
package/dist/cjs/smoothly.cjs.js
CHANGED
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["smoothly-country.cjs",[[2,"smoothly-country",{"value":[1],"text":[1],"language":[32]}]]],["smoothly-google-font.cjs",[[2,"smoothly-google-font",{"value":[1]}]]],["smoothly-radio-group.cjs",[[4,"smoothly-radio-group",{"orientation":[513]}]]],["smoothly-reorder.cjs",[[0,"smoothly-reorder"]]],["smoothly-trigger-sink.cjs",[[6,"smoothly-trigger-sink",{"context":[16],"destination":[1],"filter":[1]},[[0,"trigger","TriggerListener"]]]]],["smoothly-trigger-source.cjs",[[6,"smoothly-trigger-source",{"listen":[1]}]]],["smoothly-accordion_53.cjs",[[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"]]],[1,"smoothly-picker",{"disabled":[516],"readonly":[516],"maxMenuHeight":[1,"max-menu-height"],"maxHeight":[1,"max-height"],"emptyMenuLabel":[1025,"empty-menu-label"],"multiple":[516],"mutable":[4],"optionStyle":[8,"option-style"],"options":[1040],"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,"optionUnselect","optionSelectHandler"],[0,"optionAdd","optionAddHandler"],[0,"menuEmpty","emptyHandler"]]],[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]],[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-radio-button-item",{"value":[8],"selected":[1540],"color":[513]}],[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]
|
|
18
|
+
return index.bootstrapLazy([["smoothly-country.cjs",[[2,"smoothly-country",{"value":[1],"text":[1],"language":[32]}]]],["smoothly-google-font.cjs",[[2,"smoothly-google-font",{"value":[1]}]]],["smoothly-radio-group.cjs",[[4,"smoothly-radio-group",{"orientation":[513]}]]],["smoothly-reorder.cjs",[[0,"smoothly-reorder"]]],["smoothly-trigger-sink.cjs",[[6,"smoothly-trigger-sink",{"context":[16],"destination":[1],"filter":[1]},[[0,"trigger","TriggerListener"]]]]],["smoothly-trigger-source.cjs",[[6,"smoothly-trigger-source",{"listen":[1]}]]],["smoothly-accordion_53.cjs",[[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"]]],[1,"smoothly-picker",{"disabled":[516],"readonly":[516],"maxMenuHeight":[1,"max-menu-height"],"maxHeight":[1,"max-height"],"emptyMenuLabel":[1025,"empty-menu-label"],"multiple":[516],"mutable":[4],"optionStyle":[8,"option-style"],"options":[1040],"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,"optionUnselect","optionSelectHandler"],[0,"optionAdd","optionAddHandler"],[0,"menuEmpty","emptyHandler"]]],[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]],[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-radio-button-item",{"value":[8],"selected":[1540],"color":[513]}],[6,"smoothly-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]],[6,"smoothly-table-cell"],[6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540],"allowSpotlight":[32],"spotlight":[32]},[[0,"click","onClick"],[0,"tableLoad","handleTableLoaded"]]],[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],"format":[16]}],[2,"smoothly-display-amount",{"amount":[8],"currency":[1],"toInteger":[4,"to-integer"]}],[2,"smoothly-display-date-time",{"datetime":[1]}],[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}],[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}],[6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}],[6,"smoothly-radio-button",{"name":[1],"value":[1032],"deselectable":[516],"decoration":[513]},[[2,"radioItemSelectInternal","radioSelectHandler"]]],[6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}],[2,"smoothly-skeleton",{"widths":[16],"width":[1025],"color":[1],"period":[2],"distance":[1],"align":[513]}],[2,"smoothly-svg",{"url":[513],"size":[513],"color":[1]}],[6,"smoothly-table",{"root":[1540]},[[0,"expandableLoad","handleExpandableLoaded"],[0,"expandableChange","handleExpandableState"],[0,"spotlightChange","handleSpotlightState"],[0,"smoothlyNestedTable","handleNestedTable"],[0,"expansionLoad","handleEvents"],[0,"expansionOpen","handleEvents"]]],[6,"smoothly-table-expandable-row",{"align":[1],"open":[1540],"allowSpotlight":[32],"spotlight":[32]},[[0,"click","onClick"],[0,"tableLoad","handleTableLoaded"]]],[6,"smoothly-table-header",{"name":[1]}],[6,"smoothly-table-row",null,[[0,"expansionLoad","onExpansionLoad"],[0,"expansionOpen","onExpansionOpen"]]],[6,"smoothly-input-date",{"name":[513],"value":[1025],"open":[1028],"max":[1025],"min":[1025],"disabled":[1028]},[[0,"dateSet","dateSetHandler"]]],[1,"smoothly-menu-options",{"toggle":[4],"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"]]],[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],"checkbox":[4],"new":[4],"toggle":[4],"checked":[1028]}],[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-quiet",{"color":[1]}],[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);
|
|
19
19
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
export class TableCell {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Host, null, h("slot", null)));
|
|
4
|
+
return (h(Host, null, h("div", null, h("slot", null), h("smoothly-icon", { name: "chevron-forward", size: "tiny" }))));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "smoothly-table-cell"; }
|
|
7
7
|
static get encapsulation() { return "scoped"; }
|
|
@@ -3,4 +3,22 @@
|
|
|
3
3
|
line-height: 1.5rem;
|
|
4
4
|
white-space: nowrap;
|
|
5
5
|
padding: 0.3rem 0 0.3rem 1rem;
|
|
6
|
+
border-bottom: 1px solid rgb(var(--smoothly-dark-color));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:host smoothly-icon {
|
|
10
|
+
display: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:host > div {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:host smoothly-icon {
|
|
20
|
+
width: 0.6rem;
|
|
21
|
+
height: 0.6rem;
|
|
22
|
+
margin: 0 0.3rem;
|
|
23
|
+
transition: transform 0.2s;
|
|
6
24
|
}
|
|
@@ -4,6 +4,7 @@ export class TableDemo {
|
|
|
4
4
|
return [
|
|
5
5
|
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"))),
|
|
6
6
|
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")))))))),
|
|
7
|
+
h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "A"), h("smoothly-table-header", null, "B")), h("smoothly-table-expandable-row", null, h("smoothly-table-cell", null, "a row"), h("smoothly-table-cell", null, "b row"), h("div", { slot: "detail" }, h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "C"), h("smoothly-table-header", null, "D")), h("smoothly-table-expandable-row", null, h("smoothly-table-cell", null, "c"), h("smoothly-table-cell", null, "d"), h("div", { slot: "detail" }, h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "E"), h("smoothly-table-header", null, "F")), h("smoothly-table-expandable-row", null, h("smoothly-table-cell", null, "e row"), h("smoothly-table-cell", null, "f row"), h("div", { slot: "detail" }, "nested expandable row expansion e f")))))))), h("smoothly-table-row", null, h("smoothly-table-expandable-cell", null, "a cell", h("div", { slot: "detail" }, h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "E"), h("smoothly-table-header", null, "F")), h("smoothly-table-row", null, h("smoothly-table-expandable-cell", null, "e cell", h("div", { slot: "detail" }, "nested expandable cell expansion e")), h("smoothly-table-expandable-cell", null, "f cell", h("div", { slot: "detail" }, "nested expandable cell expansion f")))))), h("smoothly-table-expandable-cell", null, "b cell", h("div", { slot: "detail" }, h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "C"), h("smoothly-table-header", null, "D")), h("smoothly-table-row", null, h("smoothly-table-expandable-cell", null, "c cell", h("div", { slot: "detail" }, "nested expandable cell expansion c")), h("smoothly-table-expandable-cell", null, "d cell", h("div", { slot: "detail" }, "nested expandable cell expansion d")))))))),
|
|
7
8
|
];
|
|
8
9
|
}
|
|
9
10
|
static get is() { return "smoothly-table-demo"; }
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { h, Host } from "@stencil/core";
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
2
|
export class TableExpandableCell {
|
|
3
3
|
constructor() {
|
|
4
|
+
this.allowSpotlight = true;
|
|
5
|
+
this.spotlight = true;
|
|
4
6
|
this.align = "left";
|
|
5
7
|
}
|
|
6
8
|
openChanged(value) {
|
|
@@ -9,12 +11,16 @@ export class TableExpandableCell {
|
|
|
9
11
|
this.beginOpen = true;
|
|
10
12
|
else
|
|
11
13
|
this.element.append(this.expansionElement);
|
|
14
|
+
this.expandableChange.emit(this.open);
|
|
12
15
|
}
|
|
13
|
-
|
|
14
|
-
this.
|
|
16
|
+
handleSpotlight() {
|
|
17
|
+
this.spotlight = this.open && this.allowSpotlight;
|
|
15
18
|
}
|
|
16
|
-
|
|
19
|
+
componentWillLoad() {
|
|
17
20
|
this.expansionLoad.emit();
|
|
21
|
+
this.expandableLoad.emit({
|
|
22
|
+
allowSpotlight: (allowed) => (this.allowSpotlight = allowed),
|
|
23
|
+
});
|
|
18
24
|
}
|
|
19
25
|
componentDidRender() {
|
|
20
26
|
if (this.beginOpen) {
|
|
@@ -22,8 +28,15 @@ export class TableExpandableCell {
|
|
|
22
28
|
this.expansionOpen.emit(this.expansionElement);
|
|
23
29
|
}
|
|
24
30
|
}
|
|
31
|
+
onClick() {
|
|
32
|
+
this.open = !this.open;
|
|
33
|
+
}
|
|
34
|
+
handleTableLoaded(event) {
|
|
35
|
+
event.stopPropagation();
|
|
36
|
+
event.detail(this.element);
|
|
37
|
+
}
|
|
25
38
|
render() {
|
|
26
|
-
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("
|
|
39
|
+
return (h(Host, { style: { textAlign: this.align } }, h("aside", null, h("smoothly-icon", { name: "chevron-forward", size: "tiny" }), h("slot", null)), h("tr", { class: this.spotlight ? "spotlight" : "", ref: e => (this.expansionElement = e) }, h("td", { colSpan: 999, class: !this.open ? "hide" : "" }, h("slot", { name: "detail" })))));
|
|
27
40
|
}
|
|
28
41
|
static get is() { return "smoothly-table-expandable-cell"; }
|
|
29
42
|
static get encapsulation() { return "scoped"; }
|
|
@@ -76,6 +89,12 @@ export class TableExpandableCell {
|
|
|
76
89
|
}
|
|
77
90
|
};
|
|
78
91
|
}
|
|
92
|
+
static get states() {
|
|
93
|
+
return {
|
|
94
|
+
"allowSpotlight": {},
|
|
95
|
+
"spotlight": {}
|
|
96
|
+
};
|
|
97
|
+
}
|
|
79
98
|
static get events() {
|
|
80
99
|
return [{
|
|
81
100
|
"method": "expansionOpen",
|
|
@@ -111,6 +130,36 @@ export class TableExpandableCell {
|
|
|
111
130
|
"resolved": "void",
|
|
112
131
|
"references": {}
|
|
113
132
|
}
|
|
133
|
+
}, {
|
|
134
|
+
"method": "expandableChange",
|
|
135
|
+
"name": "expandableChange",
|
|
136
|
+
"bubbles": true,
|
|
137
|
+
"cancelable": true,
|
|
138
|
+
"composed": true,
|
|
139
|
+
"docs": {
|
|
140
|
+
"tags": [],
|
|
141
|
+
"text": ""
|
|
142
|
+
},
|
|
143
|
+
"complexType": {
|
|
144
|
+
"original": "boolean",
|
|
145
|
+
"resolved": "boolean",
|
|
146
|
+
"references": {}
|
|
147
|
+
}
|
|
148
|
+
}, {
|
|
149
|
+
"method": "expandableLoad",
|
|
150
|
+
"name": "expandableLoad",
|
|
151
|
+
"bubbles": true,
|
|
152
|
+
"cancelable": true,
|
|
153
|
+
"composed": true,
|
|
154
|
+
"docs": {
|
|
155
|
+
"tags": [],
|
|
156
|
+
"text": ""
|
|
157
|
+
},
|
|
158
|
+
"complexType": {
|
|
159
|
+
"original": "{ allowSpotlight: (allowed: boolean) => void }",
|
|
160
|
+
"resolved": "{ allowSpotlight: (allowed: boolean) => void; }",
|
|
161
|
+
"references": {}
|
|
162
|
+
}
|
|
114
163
|
}];
|
|
115
164
|
}
|
|
116
165
|
static get elementRef() { return "element"; }
|
|
@@ -118,6 +167,12 @@ export class TableExpandableCell {
|
|
|
118
167
|
return [{
|
|
119
168
|
"propName": "open",
|
|
120
169
|
"methodName": "openChanged"
|
|
170
|
+
}, {
|
|
171
|
+
"propName": "open",
|
|
172
|
+
"methodName": "handleSpotlight"
|
|
173
|
+
}, {
|
|
174
|
+
"propName": "allowSpotlight",
|
|
175
|
+
"methodName": "handleSpotlight"
|
|
121
176
|
}];
|
|
122
177
|
}
|
|
123
178
|
static get listeners() {
|
|
@@ -127,6 +182,12 @@ export class TableExpandableCell {
|
|
|
127
182
|
"target": undefined,
|
|
128
183
|
"capture": false,
|
|
129
184
|
"passive": false
|
|
185
|
+
}, {
|
|
186
|
+
"name": "tableLoad",
|
|
187
|
+
"method": "handleTableLoaded",
|
|
188
|
+
"target": undefined,
|
|
189
|
+
"capture": false,
|
|
190
|
+
"passive": false
|
|
130
191
|
}];
|
|
131
192
|
}
|
|
132
193
|
}
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
padding: 0.3rem 0 0.3rem 0;
|
|
4
4
|
cursor: pointer;
|
|
5
5
|
line-height: 1.5rem;
|
|
6
|
+
border-bottom: 1px solid rgb(var(--smoothly-dark-color));
|
|
6
7
|
}
|
|
7
8
|
:host[open] {
|
|
8
9
|
position: relative;
|
|
9
10
|
z-index: 3;
|
|
10
11
|
background-color: rgb(var(--smoothly-default-color));
|
|
11
|
-
|
|
12
|
+
box-shadow: -1px 0 0 rgb(var(--smoothly-dark-color)) inset,
|
|
13
|
+
1px 0 0 rgb(var(--smoothly-dark-color)) inset;
|
|
12
14
|
border-bottom: none;
|
|
13
15
|
}
|
|
14
16
|
:host smoothly-icon {
|
|
@@ -29,15 +31,41 @@ aside {
|
|
|
29
31
|
.hide {
|
|
30
32
|
display: none;
|
|
31
33
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
td::slotted(*) {
|
|
35
|
+
--expansion-width: 1.5rem;
|
|
36
|
+
--expansion-border-width: 3px;
|
|
34
37
|
position: relative;
|
|
35
38
|
background-color: rgb(var(--smoothly-default-color));
|
|
36
|
-
width:
|
|
37
|
-
left: -
|
|
38
|
-
border-left:
|
|
39
|
-
box-shadow: 0px 0px
|
|
39
|
+
width: calc(100% + 3rem - var(--expansion-border-width));
|
|
40
|
+
left: calc(-1 * var(--expansion-width));
|
|
41
|
+
border-left: var(--expansion-border-width) solid rgb(0, 0, 0, 0);
|
|
42
|
+
box-shadow: 0px 0px 4px 2px rgb(var(--smoothly-dark-color));
|
|
40
43
|
box-sizing: border-box;
|
|
41
|
-
padding: 0.5rem
|
|
44
|
+
padding: 0.5rem calc(var(--expansion-width) - var(--expansion-border-width));
|
|
45
|
+
border-bottom: 1px solid rgb(var(--smoothly-dark-color));
|
|
46
|
+
border-left-width: 3px;
|
|
47
|
+
}
|
|
48
|
+
tr.spotlight > td::slotted(*) {
|
|
49
|
+
border-left-color: rgb(var(--smoothly-tertiary-color));
|
|
50
|
+
}
|
|
51
|
+
td::slotted(*)::before {
|
|
52
|
+
content: "";
|
|
53
|
+
position: absolute;
|
|
54
|
+
display: flex;
|
|
55
|
+
top: -1px;
|
|
56
|
+
bottom: 0;
|
|
57
|
+
left: -3px;
|
|
58
|
+
width: calc(var(--expansion-width) + 1px);
|
|
59
|
+
border-top: 1px solid rgb(var(--smoothly-dark-color));
|
|
60
|
+
}
|
|
61
|
+
td::slotted(*)::after {
|
|
62
|
+
content: "";
|
|
63
|
+
position: absolute;
|
|
64
|
+
display: flex;
|
|
65
|
+
top: -1px;
|
|
66
|
+
bottom: 0;
|
|
67
|
+
right: 0;
|
|
68
|
+
width: calc(var(--expansion-width) -1px);
|
|
69
|
+
border-top: 1px solid rgb(var(--smoothly-dark-color));
|
|
42
70
|
}
|
|
43
71
|
|