smoothly 1.0.0-alpha.111 → 1.0.0-alpha.113
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/Observers-6450f075.js +25 -0
- package/dist/cjs/Observers-6450f075.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -1
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/smoothly-accordion_67.cjs.entry.js +55 -11
- package/dist/cjs/smoothly-accordion_67.cjs.entry.js.map +1 -1
- package/dist/cjs/smoothly.cjs.js +2 -1
- package/dist/cjs/smoothly.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/picker/demo/index.js +1 -1
- package/dist/collection/components/picker/demo/index.js.map +1 -1
- package/dist/collection/components/picker/index.js +1 -1
- package/dist/collection/components/picker/index.js.map +1 -1
- package/dist/collection/components/picker/menu/index.js +66 -2
- package/dist/collection/components/picker/menu/index.js.map +1 -1
- package/dist/collection/components/picker/menu/style.css +16 -6
- package/dist/collection/components/picker/option/index.js +28 -2
- package/dist/collection/components/picker/option/index.js.map +1 -1
- package/dist/collection/components/picker/option/style.css +3 -4
- package/dist/collection/components/picker/style.css +1 -3
- package/dist/collection/components/table/demo/index.js +1 -1
- package/dist/collection/components/table/demo/index.js.map +1 -1
- package/dist/collection/components/table/expandable/cell/index.js +1 -22
- package/dist/collection/components/table/expandable/cell/index.js.map +1 -1
- package/dist/collection/global/Observers.js +22 -0
- package/dist/collection/global/Observers.js.map +1 -0
- package/dist/collection/global/index.js +5 -0
- package/dist/collection/global/index.js.map +1 -0
- package/dist/collection/model/Option.js.map +1 -1
- package/dist/custom-elements/index.js +79 -14
- package/dist/custom-elements/index.js.map +1 -1
- package/dist/esm/Observers-5f08e828.js +25 -0
- package/dist/esm/Observers-5f08e828.js.map +1 -0
- package/dist/esm/loader.js +2 -1
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/smoothly-accordion_67.entry.js +55 -11
- package/dist/esm/smoothly-accordion_67.entry.js.map +1 -1
- package/dist/esm/smoothly.js +2 -1
- package/dist/esm/smoothly.js.map +1 -1
- package/dist/smoothly/p-ede93d69.js +2 -0
- package/dist/smoothly/p-ede93d69.js.map +1 -0
- package/dist/smoothly/p-f85f09d3.entry.js +2 -0
- package/dist/smoothly/p-f85f09d3.entry.js.map +1 -0
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/smoothly/smoothly.esm.js.map +1 -1
- package/dist/types/components/picker/menu/index.d.ts +7 -0
- package/dist/types/components/picker/option/index.d.ts +1 -0
- package/dist/types/components/table/expandable/cell/index.d.ts +0 -1
- package/dist/types/components.d.ts +4 -2
- package/dist/types/global/Observers.d.ts +8 -0
- package/dist/types/global/index.d.ts +4 -0
- package/dist/types/model/Option.d.ts +1 -0
- package/package.json +1 -1
- package/dist/smoothly/p-97386eea.entry.js +0 -2
- package/dist/smoothly/p-97386eea.entry.js.map +0 -1
|
@@ -1345,6 +1345,32 @@ const smoothly = /*#__PURE__*/Object.freeze({
|
|
|
1345
1345
|
get Cosmetic () { return Cosmetic; }
|
|
1346
1346
|
});
|
|
1347
1347
|
|
|
1348
|
+
const observers = new WeakMap();
|
|
1349
|
+
var Observers$1;
|
|
1350
|
+
(function (Observers) {
|
|
1351
|
+
function get(...parameters) {
|
|
1352
|
+
return observers.get(...parameters);
|
|
1353
|
+
}
|
|
1354
|
+
Observers.get = get;
|
|
1355
|
+
function set(...parameters) {
|
|
1356
|
+
observers.set(...parameters);
|
|
1357
|
+
return Observers;
|
|
1358
|
+
}
|
|
1359
|
+
Observers.set = set;
|
|
1360
|
+
function remove(...parameters) {
|
|
1361
|
+
return observers.delete(...parameters);
|
|
1362
|
+
}
|
|
1363
|
+
Observers.remove = remove;
|
|
1364
|
+
function has(...parameters) {
|
|
1365
|
+
return observers.has(...parameters);
|
|
1366
|
+
}
|
|
1367
|
+
Observers.has = has;
|
|
1368
|
+
})(Observers$1 || (Observers$1 = {}));
|
|
1369
|
+
|
|
1370
|
+
function global$1 () {
|
|
1371
|
+
return { Observers: Observers$1 };
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1348
1374
|
const styleCss$16 = "smoothly-accordion-item.sc-smoothly-accordion{border:1px solid rgb(var(--smoothly-dark-color));border-bottom:none}smoothly-accordion-item.sc-smoothly-accordion:first-of-type{border-top-left-radius:4px;border-top-right-radius:4px;margin-top:0.4em}smoothly-accordion-item.sc-smoothly-accordion:last-of-type{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:1px solid rgb(var(--smoothly-dark-color));margin-bottom:0.6em}smoothly-accordion-item[open].sc-smoothly-accordion{border-color:rgb(var(--smoothly-primary-color));border-bottom:1px solid rgb(var(--smoothly-primary-color))}smoothly-accordion-item[open].sc-smoothly-accordion+smoothly-accordion-item.sc-smoothly-accordion{border-top:none}";
|
|
1349
1375
|
|
|
1350
1376
|
const SmoothlyAccordion$1 = class extends HTMLElement {
|
|
@@ -53950,7 +53976,7 @@ const Notifier = class extends HTMLElement {
|
|
|
53950
53976
|
static get style() { return styleCss$A; }
|
|
53951
53977
|
};
|
|
53952
53978
|
|
|
53953
|
-
const styleCss$z = ".sc-smoothly-picker-h{box-sizing:border-box}.sc-smoothly-picker-h[looks=\"border\"].sc-smoothly-picker-s>smoothly-picker-menu smoothly-input,[looks=\"border\"].sc-smoothly-picker-h{border:rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px}.sc-smoothly-picker-h[looks=\"line\"].sc-smoothly-picker-s>smoothly-picker-menu smoothly-input,[looks=\"line\"].sc-smoothly-picker-h{border-bottom:rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px}.sc-smoothly-picker-h[looks=\"grid\"].sc-smoothly-picker-s>smoothly-picker-menu smoothly-input,[looks=\"grid\"].sc-smoothly-picker-h{border:rgba(var(--text-color, var(--smoothly-color-contrast)), .5) solid .5px}.sc-smoothly-picker-h{display:flex;position:relative;width:max-content;padding:1.2em 0.7em 0.2em 0.8em;background-color:rgb(var(--background-color, var(--smoothly-color-shade)))}
|
|
53979
|
+
const styleCss$z = ".sc-smoothly-picker-h{box-sizing:border-box}.sc-smoothly-picker-h[looks=\"border\"].sc-smoothly-picker-s>smoothly-picker-menu smoothly-input,[looks=\"border\"].sc-smoothly-picker-h{border:rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px}.sc-smoothly-picker-h[looks=\"line\"].sc-smoothly-picker-s>smoothly-picker-menu smoothly-input,[looks=\"line\"].sc-smoothly-picker-h{border-bottom:rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px}.sc-smoothly-picker-h[looks=\"grid\"].sc-smoothly-picker-s>smoothly-picker-menu smoothly-input,[looks=\"grid\"].sc-smoothly-picker-h{border:rgba(var(--text-color, var(--smoothly-color-contrast)), .5) solid .5px}.sc-smoothly-picker-h{display:flex;position:relative;width:max-content;padding:1.2em 0.7em 0.2em 0.8em;background-color:rgb(var(--background-color, var(--smoothly-color-shade)))}smoothly-slot-elements.sc-smoothly-picker{white-space:nowrap}.selected.sc-smoothly-picker{position:relative;display:flex;align-items:center;gap:1rem;width:100%;overflow:hidden;text-overflow:ellipsis;margin-right:2px}.selected.sc-smoothly-picker::after{content:\"\";position:absolute;top:0;bottom:0;right:0;width:2ch;background:linear-gradient(90deg, rgba(var(--background-color, var(--smoothly-color-shade)), 0) 0%, rgba(var(--background-color, var(--smoothly-color-shade)), 1) 100%)}.selected.sc-smoothly-picker *.sc-smoothly-picker{display:none}.label.sc-smoothly-picker{position:absolute;left:0.4rem;top:0.6rem;color:rgb(var(--text-color, var(--smoothly-color-contrast)));opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}.selected.sc-smoothly-picker:not(:empty)+.label.sc-smoothly-picker{top:0.4em;transform:scale(0.6)}";
|
|
53954
53980
|
|
|
53955
53981
|
const SmoothlyPicker$1 = class extends HTMLElement {
|
|
53956
53982
|
constructor() {
|
|
@@ -54022,7 +54048,7 @@ const SmoothlyPicker$1 = class extends HTMLElement {
|
|
|
54022
54048
|
this.selected.forEach(option => option.selected && option.element.clickHandler());
|
|
54023
54049
|
}
|
|
54024
54050
|
render() {
|
|
54025
|
-
return (h(Host, null, h("smoothly-slot-elements", { class: "selected", nodes: this.display }), h("span", { class: "label" }, h("slot", { name: "label" })), h("button", { type: "button" }, h("smoothly-icon", { size: "tiny", name: this.open ? "caret-down-outline" : "caret-forward-outline" })), h("smoothly-picker-menu", { looks: this.looks, onClick: e => e.stopPropagation(), multiple: this.multiple, mutable: this.mutable, readonly: this.readonly, validator: this.validator }, h("slot", { name: "search", slot: "search" }), h("slot", { name: "display", slot: "display" }), h("slot", null))));
|
|
54051
|
+
return (h(Host, null, h("smoothly-slot-elements", { class: "selected", nodes: this.display }), h("span", { class: "label" }, h("slot", { name: "label" })), h("button", { type: "button" }, h("smoothly-icon", { size: "tiny", name: this.open ? "caret-down-outline" : "caret-forward-outline" })), h("smoothly-picker-menu", { open: this.open, looks: this.looks, onClick: e => e.stopPropagation(), multiple: this.multiple, mutable: this.mutable, readonly: this.readonly, validator: this.validator }, h("slot", { name: "search", slot: "search" }), h("slot", { name: "display", slot: "display" }), h("slot", null))));
|
|
54026
54052
|
}
|
|
54027
54053
|
get element() { return this; }
|
|
54028
54054
|
static get watchers() { return {
|
|
@@ -54091,13 +54117,14 @@ const SmoothlyPickerDemo$1 = class extends HTMLElement {
|
|
|
54091
54117
|
}), this.data.options.map(email => {
|
|
54092
54118
|
var _a;
|
|
54093
54119
|
return (h("smoothly-picker-option", { key: email, value: email, search: [(_a = this.users[email]) !== null && _a !== void 0 ? _a : []].flat() }, h("span", null, this.users[email]), h("span", { slot: "label" }, email), h("smoothly-icon", { size: "tiny", slot: "display", name: "person-outline" })));
|
|
54094
|
-
})), h("smoothly-submit", { size: "icon", slot: "submit" }, h("smoothly-icon", { name: "checkmark-circle" })), h("smoothly-input-clear", { type: "form", color: "danger", fill: "solid", slot: "clear" }, "Clear")), h("h5", null, "uncontrolled inputs"), h("smoothly-form", { onSmoothlyFormSubmit: e => console.log("submitted", e.detail), looks: "line" }, h("smoothly-input", { name: "purpose", type: "text" }, "Purpose"), h("smoothly-picker", { multiple: true, mutable: true, name: "emails", validator: validateEmail }, h("span", { slot: "label" }, "Emails"), h("span", { slot: "search" }, "Search"), h("smoothly-picker-option", { value: "james@rocket.com" }, "james@rocket.com"), h("smoothly-picker-option", { selected: true, value: "jessie@rocket.com" }, "jessie@rocket.com"), h("smoothly-picker-option", { value: "giovanni@rocket.com" }, "giovanni@rocket.com")), h("smoothly-submit", { slot: "submit" }, "Submit"), h("smoothly-input-clear", { type: "form", color: "danger", fill: "solid", slot: "clear" }, "Clear"), h("smoothly-picker", { name: "shape" }, h("span", { slot: "label" }, "Shape"), h("span", { slot: "search" }, "Search"), h("smoothly-picker-option", { value: "circle" }, h("span", { slot: "label" }, "Circle"), h("smoothly-icon", { size: "tiny", name: "ellipse-outline" })), h("smoothly-picker-option", { value: "cube" }, h("span", { slot: "label" }, "Cube"), h("smoothly-icon", { size: "tiny", name: "cube-outline" })), h("smoothly-picker-option", { value: "square", selected: true }, h("span", { slot: "label" }, "Square"), h("smoothly-icon", { size: "tiny", name: "square-outline" }))), h("smoothly-picker", { multiple: true, readonly: true, name: "animals" }, h("span", { slot: "label" }, "Animals"), h("span", { slot: "search" }, "Search"), h("smoothly-picker-option", { selected: true, value: "cat" }, "Cat"), h("smoothly-picker-option", { value: "dog" }, "Dog"), h("smoothly-picker-option", { value: "fish" }, "Fish")))));
|
|
54120
|
+
})), h("smoothly-submit", { size: "icon", slot: "submit" }, h("smoothly-icon", { name: "checkmark-circle" })), h("smoothly-input-clear", { type: "form", color: "danger", fill: "solid", slot: "clear" }, "Clear")), h("h5", null, "uncontrolled inputs"), h("smoothly-form", { onSmoothlyFormSubmit: e => console.log("submitted", e.detail), looks: "line" }, h("smoothly-input", { name: "purpose", type: "text" }, "Purpose"), h("smoothly-picker", { multiple: true, mutable: true, name: "emails", validator: validateEmail }, h("span", { slot: "label" }, "Emails"), h("span", { slot: "search" }, "Search"), h("smoothly-picker-option", { value: "james@rocket.com" }, "james@rocket.com"), h("smoothly-picker-option", { selected: true, value: "jessie@rocket.com" }, "jessie@rocket.com"), h("smoothly-picker-option", { value: "giovanni@rocket.com" }, "giovanni@rocket.com")), h("smoothly-submit", { slot: "submit" }, "Submit"), h("smoothly-input-clear", { type: "form", color: "danger", fill: "solid", slot: "clear" }, "Clear"), h("smoothly-picker", { name: "shape" }, h("span", { slot: "label" }, "Shape"), h("span", { slot: "search" }, "Search"), h("smoothly-picker-option", { value: "circle" }, h("span", { slot: "label" }, "Circle"), h("smoothly-icon", { size: "tiny", name: "ellipse-outline" })), h("smoothly-picker-option", { value: "cube" }, h("span", { slot: "label" }, "Cube"), h("smoothly-icon", { size: "tiny", name: "cube-outline" })), h("smoothly-picker-option", { value: "square", selected: true }, h("span", { slot: "label" }, "Square"), h("smoothly-icon", { size: "tiny", name: "square-outline" }))), h("smoothly-picker", { multiple: true, readonly: true, name: "animals" }, h("span", { slot: "label" }, "Animals"), h("span", { slot: "search" }, "Search"), h("smoothly-picker-option", { selected: true, value: "cat" }, "Cat"), h("smoothly-picker-option", { value: "dog" }, "Dog"), h("smoothly-picker-option", { value: "fish" }, "Fish"))), h("smoothly-picker", { looks: "border", name: "icon" }, h("span", { slot: "label" }, "Icon"), h("span", { slot: "search" }, "Search"), h("smoothly-picker-option", { value: "circle" }, h("span", { slot: "label" }, "Circle"), h("smoothly-icon", { size: "tiny", name: "ellipse-outline" })), h("smoothly-picker-option", { value: "cube" }, h("span", { slot: "label" }, "Cube"), h("smoothly-icon", { size: "tiny", name: "cube-outline" })), h("smoothly-picker-option", { value: "square", selected: true }, h("span", { slot: "label" }, "Square"), h("smoothly-icon", { size: "tiny", name: "square-outline" })), h("smoothly-picker-option", { value: "airplane" }, h("span", { slot: "label" }, "Airplane"), h("smoothly-icon", { size: "tiny", name: "airplane-outline" })), h("smoothly-picker-option", { value: "alarm" }, h("span", { slot: "label" }, "Alarm"), h("smoothly-icon", { size: "tiny", name: "alarm-outline" })), h("smoothly-picker-option", { value: "archive" }, h("span", { slot: "label" }, "Archive"), h("smoothly-icon", { size: "tiny", name: "archive-outline" })), h("smoothly-picker-option", { value: "bag" }, h("span", { slot: "label" }, "Bag"), h("smoothly-icon", { size: "tiny", name: "bag-outline" })), h("smoothly-picker-option", { value: "cafe" }, h("span", { slot: "label" }, "Cafe"), h("smoothly-icon", { size: "tiny", name: "cafe-outline" })), h("smoothly-picker-option", { value: "disc" }, h("span", { slot: "label" }, "Disc"), h("smoothly-icon", { size: "tiny", name: "disc-outline" })), h("smoothly-picker-option", { value: "earth" }, h("span", { slot: "label" }, "Earth"), h("smoothly-icon", { size: "tiny", name: "earth-outline" })), h("smoothly-picker-option", { value: "fast-food" }, h("span", { slot: "label" }, "Fast food"), h("smoothly-icon", { size: "tiny", name: "fast-food-outline" })))));
|
|
54095
54121
|
}
|
|
54096
54122
|
static get style() { return styleCss$y; }
|
|
54097
54123
|
};
|
|
54098
54124
|
|
|
54099
|
-
const styleCss$x = ".sc-smoothly-picker-menu-h{display:flex;flex-direction:column;gap:0.5rem;position:absolute;z-index:4;
|
|
54125
|
+
const styleCss$x = ".sc-smoothly-picker-menu-h{display:flex;flex-direction:column;gap:0.5rem;position:absolute;z-index:4;left:-1px;right:-1px;min-width:max-content;background-color:rgb(var(--background-color, var(--smoothly-color-shade)));padding:0.5rem;border:rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px}.sc-smoothly-picker-menu-h:not(.flip){top:100%}.flip.sc-smoothly-picker-menu-h{bottom:100%}.sc-smoothly-picker-menu-h:not([open]){display:none}.sc-smoothly-picker-menu-h .list.sc-smoothly-picker-menu{display:grid;grid-template-columns:auto 1fr auto;align-items:center;row-gap:0.5ch;overflow-y:auto;max-height:calc(1.75rem * 10 + 0.5ch * 9);padding-right:0.5rem;padding-bottom:0.25rem}.sc-smoothly-picker-menu-h .hide.sc-smoothly-picker-menu{display:none}.sc-smoothly-picker-menu-h .controls.sc-smoothly-picker-menu{display:grid;grid-template-columns:1fr auto;gap:0.5rem;transition:grid-template-columns 200ms linear}.sc-smoothly-picker-menu-h .controls.sc-smoothly-picker-menu>button.sc-smoothly-picker-menu:disabled{opacity:0.3}";
|
|
54100
54126
|
|
|
54127
|
+
const Observers = global$1().Observers;
|
|
54101
54128
|
function* chain(...iterables) {
|
|
54102
54129
|
for (const iterable of iterables)
|
|
54103
54130
|
yield* iterable;
|
|
@@ -54120,6 +54147,7 @@ const SmoothlyPickerMenu$1 = class extends HTMLElement {
|
|
|
54120
54147
|
this.notice = createEvent(this, "notice", 7);
|
|
54121
54148
|
this.smoothlyPickerMenuLoaded = createEvent(this, "smoothlyPickerMenuLoaded", 7);
|
|
54122
54149
|
this.looks = undefined;
|
|
54150
|
+
this.open = false;
|
|
54123
54151
|
this.multiple = false;
|
|
54124
54152
|
this.mutable = false;
|
|
54125
54153
|
this.readonly = false;
|
|
@@ -54130,6 +54158,19 @@ const SmoothlyPickerMenu$1 = class extends HTMLElement {
|
|
|
54130
54158
|
this.search = "";
|
|
54131
54159
|
this.valid = false;
|
|
54132
54160
|
this.display = undefined;
|
|
54161
|
+
this.flip = false;
|
|
54162
|
+
this.flipChecked = false;
|
|
54163
|
+
}
|
|
54164
|
+
componentWillLoad() {
|
|
54165
|
+
if (!Observers.has(this.element)) {
|
|
54166
|
+
const threshold = 0.4;
|
|
54167
|
+
Observers.set(this.element, new IntersectionObserver(entries => {
|
|
54168
|
+
var _a, _b;
|
|
54169
|
+
return ((_b = (_a = entries.find(entry => entry.target == this.element)) === null || _a === void 0 ? void 0 : _a.intersectionRatio) !== null && _b !== void 0 ? _b : 0) < threshold &&
|
|
54170
|
+
!this.flipChecked &&
|
|
54171
|
+
((this.flip = !this.flip), (this.flipChecked = true));
|
|
54172
|
+
}, { threshold }));
|
|
54173
|
+
}
|
|
54133
54174
|
}
|
|
54134
54175
|
componentDidLoad() {
|
|
54135
54176
|
this.smoothlyPickerMenuLoaded.emit({
|
|
@@ -54159,10 +54200,27 @@ const SmoothlyPickerMenu$1 = class extends HTMLElement {
|
|
|
54159
54200
|
},
|
|
54160
54201
|
});
|
|
54161
54202
|
}
|
|
54203
|
+
disconnectedCallback() {
|
|
54204
|
+
var _a;
|
|
54205
|
+
if (!this.element.parentElement) {
|
|
54206
|
+
(_a = Observers.get(this.element)) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
54207
|
+
Observers.remove(this.element);
|
|
54208
|
+
}
|
|
54209
|
+
}
|
|
54210
|
+
openChange() {
|
|
54211
|
+
const observer = Observers.get(this.element);
|
|
54212
|
+
if (this.open)
|
|
54213
|
+
observer === null || observer === void 0 ? void 0 : observer.observe(this.element);
|
|
54214
|
+
else
|
|
54215
|
+
observer === null || observer === void 0 ? void 0 : observer.unobserve(this.element);
|
|
54216
|
+
}
|
|
54162
54217
|
readonlyChanged() {
|
|
54163
54218
|
for (const option of chain(this.options.values(), this.backend.values()))
|
|
54164
54219
|
option.set.readonly(this.readonly);
|
|
54165
54220
|
}
|
|
54221
|
+
scrollHandler() {
|
|
54222
|
+
this.flipChecked = false;
|
|
54223
|
+
}
|
|
54166
54224
|
optionLoadHandler(event) {
|
|
54167
54225
|
if (!this.listElement || !event.composedPath().includes(this.listElement)) {
|
|
54168
54226
|
event.stopPropagation();
|
|
@@ -54247,16 +54305,19 @@ const SmoothlyPickerMenu$1 = class extends HTMLElement {
|
|
|
54247
54305
|
event.detail.set.nodes(this.display);
|
|
54248
54306
|
}
|
|
54249
54307
|
render() {
|
|
54250
|
-
return (h(Host, { class: { valid: this.valid } }, h("smoothly-slotted-elements", { class: "hide", onSmoothlySlottedChange: e => (this.display = e.detail) }, h("slot", { name: "display" })), h("div", { class: "hide" }, h("slot", null), Array.from(this.created.values(), option => (h("smoothly-picker-option", { key: option.value, value: option.value, selected: option.selected }, option.value, h("smoothly-slot-elements", { slot: "display", nodes: this.display }))))), h("div", { class: "controls" }, h("smoothly-input", { ref: e => (this.searchElement = e), name: "search", value: this.search, looks: this.looks, onKeyDown: e => this.keyDownHandler(e), onSmoothlyInput: e => this.inputHandler(e), onSmoothlyChange: e => e.stopPropagation(), onSmoothlyBlur: e => e.stopPropagation() }, h("slot", { name: "search" })), this.mutable && !this.readonly ? (h("button", { onClick: () => this.addHandler(), disabled: !this.valid, type: "button" }, h("smoothly-icon", { name: "add-outline" }))) : null), h("div", { class: "list", ref: e => (this.listElement = e) }, Array.from(this.backend.values())
|
|
54308
|
+
return (h(Host, { class: { valid: this.valid, flip: this.flip } }, h("smoothly-slotted-elements", { class: "hide", onSmoothlySlottedChange: e => (this.display = e.detail) }, h("slot", { name: "display" })), h("div", { class: "hide" }, h("slot", null), Array.from(this.created.values(), option => (h("smoothly-picker-option", { key: option.value, value: option.value, selected: option.selected }, option.value, h("smoothly-slot-elements", { slot: "display", nodes: this.display }))))), h("div", { class: "controls" }, h("smoothly-input", { ref: e => (this.searchElement = e), name: "search", value: this.search, looks: this.looks, onKeyDown: e => this.keyDownHandler(e), onSmoothlyInput: e => this.inputHandler(e), onSmoothlyChange: e => e.stopPropagation(), onSmoothlyBlur: e => e.stopPropagation() }, h("slot", { name: "search" })), this.mutable && !this.readonly ? (h("button", { onClick: () => this.addHandler(), disabled: !this.valid, type: "button" }, h("smoothly-icon", { name: "add-outline" }))) : null), h("div", { class: "list", ref: e => (this.listElement = e) }, Array.from(this.backend.values())
|
|
54309
|
+
.sort((a, b) => a.position - b.position)
|
|
54310
|
+
.map(option => (h("smoothly-slot-elements", { ref: e => restoreListener(e, option), clone: false, nodes: option.clone }))))));
|
|
54251
54311
|
}
|
|
54252
54312
|
get element() { return this; }
|
|
54253
54313
|
static get watchers() { return {
|
|
54314
|
+
"open": ["openChange"],
|
|
54254
54315
|
"readonly": ["readonlyChanged"]
|
|
54255
54316
|
}; }
|
|
54256
54317
|
static get style() { return styleCss$x; }
|
|
54257
54318
|
};
|
|
54258
54319
|
|
|
54259
|
-
const styleCss$w = ":host{display:contents}:host(:not([visible])){display:none}:host>*{cursor:pointer;padding:0.25ch 0.5rem}.display{padding-left:0}button{color:unset;background-color:inherit;border:none;padding-right:0}.content{display:flex;column-gap:1rem;
|
|
54320
|
+
const styleCss$w = ":host{display:contents}:host(:not([visible])){display:none}:host>*{cursor:pointer;padding:0.25ch 0.5rem}:host .display{padding-left:0}:host button{color:unset;background-color:inherit;border:none;padding-right:0}:host .content{display:flex;column-gap:1rem;justify-content:space-between}";
|
|
54260
54321
|
|
|
54261
54322
|
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
54262
54323
|
var t = {};
|
|
@@ -54282,10 +54343,12 @@ const SmoothlyPickerOption$1 = class extends HTMLElement {
|
|
|
54282
54343
|
this.visible = true;
|
|
54283
54344
|
this.value = undefined;
|
|
54284
54345
|
this.search = [];
|
|
54346
|
+
this.position = -1;
|
|
54285
54347
|
this.readonly = false;
|
|
54286
54348
|
this.slotted = [];
|
|
54287
54349
|
}
|
|
54288
54350
|
get option() {
|
|
54351
|
+
var _a;
|
|
54289
54352
|
return {
|
|
54290
54353
|
element: this.element,
|
|
54291
54354
|
selected: this.selected,
|
|
@@ -54294,6 +54357,9 @@ const SmoothlyPickerOption$1 = class extends HTMLElement {
|
|
|
54294
54357
|
search: this.search,
|
|
54295
54358
|
value: this.value,
|
|
54296
54359
|
slotted: this.slotted,
|
|
54360
|
+
position: this.position >= 0 || !((_a = this.element.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement)
|
|
54361
|
+
? this.position
|
|
54362
|
+
: Array.from(this.element.parentElement.parentElement.children).indexOf(this.element.parentElement),
|
|
54297
54363
|
set: {
|
|
54298
54364
|
selected: selected => (this.selected = selected),
|
|
54299
54365
|
readonly: readonly => (this.readonly = readonly),
|
|
@@ -54325,10 +54391,11 @@ const SmoothlyPickerOption$1 = class extends HTMLElement {
|
|
|
54325
54391
|
this.selected = !this.selected;
|
|
54326
54392
|
}
|
|
54327
54393
|
render() {
|
|
54328
|
-
return (h(Host, { class: { visible: this.visible }, onClick: () => this.clickHandler() }, h("div", { class: "display" }, h("slot", { name: "display" })), h("div", { class: "content" }, h("smoothly-slotted-elements", { onSmoothlySlottedChange: e => this.slottedChangeHandler(e), clone: true }, h("slot", null)), h("slot", { name: "label" })), h("button", { type: "button" }, h("smoothly-icon", { name: this.selected ? "checkbox-outline" : "square-outline" }))));
|
|
54394
|
+
return (h(Host, { class: { visible: this.visible }, onClick: () => this.clickHandler() }, h("div", { part: "display", class: "display" }, h("slot", { name: "display" })), h("div", { part: "content", class: "content" }, h("smoothly-slotted-elements", { onSmoothlySlottedChange: e => this.slottedChangeHandler(e), clone: true }, h("slot", null)), h("slot", { name: "label" })), h("button", { type: "button" }, h("smoothly-icon", { name: this.selected ? "checkbox-outline" : "square-outline" }))));
|
|
54329
54395
|
}
|
|
54330
54396
|
get element() { return this; }
|
|
54331
54397
|
static get watchers() { return {
|
|
54398
|
+
"position": ["emitChange"],
|
|
54332
54399
|
"selected": ["emitChange"],
|
|
54333
54400
|
"slotted": ["emitChange"]
|
|
54334
54401
|
}; }
|
|
@@ -54945,7 +55012,7 @@ const TableDemo = class extends HTMLElement {
|
|
|
54945
55012
|
h("h4", null, "Filtered & Checked Table"),
|
|
54946
55013
|
h("smoothly-table-demo-filtered", null),
|
|
54947
55014
|
h("smoothly-table-testing", null),
|
|
54948
|
-
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",
|
|
55015
|
+
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"))),
|
|
54949
55016
|
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")))))))),
|
|
54950
55017
|
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-expandable-row", null, h("smoothly-table-cell", null, h("span", null, "one"), h("span", null, "two"), h("span", null, "three")), h("smoothly-table-cell", null, "five", h("smoothly-icon", { name: "paper-plane-sharp", size: "small" })), h("div", { slot: "detail" }, "four")), 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" }, h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "G"), h("smoothly-table-header", null, "H")), h("smoothly-table-row", null, h("smoothly-table-expandable-cell", null, "g cell", h("div", { slot: "detail" }, "nested expandable cell expansion g")), h("smoothly-table-expandable-cell", null, "h cell", h("div", { slot: "detail" }, "nested expandable cell expansion h")))))), 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")))))))),
|
|
54951
55018
|
h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "display"), h("smoothly-table-header", null, "contents")), h("smoothly-table-expandable-row", null, h("div", { class: "content" }, h("smoothly-table-cell", null, "A"), h("smoothly-table-cell", null, "B")), h("div", { slot: "detail" }, "expansion"))),
|
|
@@ -55044,7 +55111,6 @@ const TableExpandableCell = class extends HTMLElement {
|
|
|
55044
55111
|
this.allowSpotlight = true;
|
|
55045
55112
|
this.spotlight = true;
|
|
55046
55113
|
this.align = "left";
|
|
55047
|
-
this.expansionData = undefined;
|
|
55048
55114
|
this.open = undefined;
|
|
55049
55115
|
}
|
|
55050
55116
|
openChanged(value) {
|
|
@@ -55078,8 +55144,7 @@ const TableExpandableCell = class extends HTMLElement {
|
|
|
55078
55144
|
event.detail(this.element);
|
|
55079
55145
|
}
|
|
55080
55146
|
render() {
|
|
55081
|
-
|
|
55082
|
-
return (h(Host, { style: { textAlign: this.align } }, h("aside", null, h("smoothly-icon", { name: "caret-forward-outline" }), h("slot", null)), h("tr", { class: { spotlight: this.spotlight }, ref: e => (this.expansionElement = e) }, h("td", { colSpan: 999, class: !this.open ? "hide" : "" }, this.open && ((_a = this.expansionData) === null || _a === void 0 ? void 0 : _a.call(this)), h("slot", { name: "detail" })))));
|
|
55147
|
+
return (h(Host, { style: { textAlign: this.align } }, h("aside", null, h("smoothly-icon", { name: "caret-forward-outline" }), h("slot", null)), h("tr", { class: { spotlight: this.spotlight }, ref: e => (this.expansionElement = e) }, h("td", { colSpan: 999, class: !this.open ? "hide" : "" }, h("slot", { name: "detail" })))));
|
|
55083
55148
|
}
|
|
55084
55149
|
get element() { return this; }
|
|
55085
55150
|
static get watchers() { return {
|
|
@@ -55419,8 +55484,8 @@ const SmoothlyNotification = /*@__PURE__*/proxyCustomElement(Notification, [2,"s
|
|
|
55419
55484
|
const SmoothlyNotifier = /*@__PURE__*/proxyCustomElement(Notifier, [6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]]);
|
|
55420
55485
|
const SmoothlyPicker = /*@__PURE__*/proxyCustomElement(SmoothlyPicker$1, [6,"smoothly-picker",{"looks":[1537],"name":[513],"open":[1540],"mutable":[516],"multiple":[516],"readonly":[516],"validator":[16],"selected":[32],"display":[32]},[[0,"smoothlyInputLooks","smoothlyInputLooksHandler"],[0,"smoothlyPickerMenuLoaded","menuLoadedHandler"],[0,"smoothlyPickerOptionLoaded","optionLoadedHandler"],[0,"smoothlyPickerOptionChange","optionChangeHandler"],[8,"click","clickHandler"],[8,"focusin","focusHandler"]]]);
|
|
55421
55486
|
const SmoothlyPickerDemo = /*@__PURE__*/proxyCustomElement(SmoothlyPickerDemo$1, [2,"smoothly-picker-demo",{"data":[32],"change":[32]},[[0,"smoothlyFormSubmit","submitHandler"]]]);
|
|
55422
|
-
const SmoothlyPickerMenu = /*@__PURE__*/proxyCustomElement(SmoothlyPickerMenu$1, [6,"smoothly-picker-menu",{"looks":[1],"multiple":[516],"mutable":[516],"readonly":[516],"validator":[16],"backend":[32],"options":[32],"created":[32],"search":[32],"valid":[32],"display":[32]},[[0,"smoothlyPickerOptionLoad","optionLoadHandler"],[0,"smoothlyPickerOptionLoaded","optionLoadedHandler"],[0,"smoothlyPickerOptionChange","optionChangeHandler"],[0,"smoothlySlotEmpty","emptyDisplayHandler"]]]);
|
|
55423
|
-
const SmoothlyPickerOption = /*@__PURE__*/proxyCustomElement(SmoothlyPickerOption$1, [1,"smoothly-picker-option",{"selected":[1540],"visible":[1540],"value":[1032],"search":[1040],"readonly":[32],"slotted":[32]}]);
|
|
55487
|
+
const SmoothlyPickerMenu = /*@__PURE__*/proxyCustomElement(SmoothlyPickerMenu$1, [6,"smoothly-picker-menu",{"looks":[1],"open":[516],"multiple":[516],"mutable":[516],"readonly":[516],"validator":[16],"backend":[32],"options":[32],"created":[32],"search":[32],"valid":[32],"display":[32],"flip":[32],"flipChecked":[32]},[[9,"scroll","scrollHandler"],[0,"smoothlyPickerOptionLoad","optionLoadHandler"],[0,"smoothlyPickerOptionLoaded","optionLoadedHandler"],[0,"smoothlyPickerOptionChange","optionChangeHandler"],[0,"smoothlySlotEmpty","emptyDisplayHandler"]]]);
|
|
55488
|
+
const SmoothlyPickerOption = /*@__PURE__*/proxyCustomElement(SmoothlyPickerOption$1, [1,"smoothly-picker-option",{"selected":[1540],"visible":[1540],"value":[1032],"search":[1040],"position":[514],"readonly":[32],"slotted":[32]}]);
|
|
55424
55489
|
const SmoothlyPopup = /*@__PURE__*/proxyCustomElement(SmoothlyPopup$1, [6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}]);
|
|
55425
55490
|
const SmoothlyQuiet = /*@__PURE__*/proxyCustomElement(SmoothlyQuiet$1, [6,"smoothly-quiet",{"color":[1]}]);
|
|
55426
55491
|
const SmoothlyRadio = /*@__PURE__*/proxyCustomElement(SmoothlyRadio$1, [6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tab":[2]}]);
|
|
@@ -55442,7 +55507,7 @@ const SmoothlyTable = /*@__PURE__*/proxyCustomElement(Table, [6,"smoothly-table"
|
|
|
55442
55507
|
const SmoothlyTableCell = /*@__PURE__*/proxyCustomElement(TableCell, [6,"smoothly-table-cell"]);
|
|
55443
55508
|
const SmoothlyTableDemo = /*@__PURE__*/proxyCustomElement(TableDemo, [2,"smoothly-table-demo"]);
|
|
55444
55509
|
const SmoothlyTableDemoFiltered = /*@__PURE__*/proxyCustomElement(TableDemoFiltered, [2,"smoothly-table-demo-filtered",{"criteria":[32],"data":[32],"selector":[32]},[[0,"filters","onFilterUpdate"],[2,"smoothlyInput","smoothlyInputHandler"]]]);
|
|
55445
|
-
const SmoothlyTableExpandableCell = /*@__PURE__*/proxyCustomElement(TableExpandableCell, [6,"smoothly-table-expandable-cell",{"align":[1],"
|
|
55510
|
+
const SmoothlyTableExpandableCell = /*@__PURE__*/proxyCustomElement(TableExpandableCell, [6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540],"allowSpotlight":[32],"spotlight":[32]},[[0,"click","onClick"],[0,"smoothlyTableLoad","handleTableLoaded"]]]);
|
|
55446
55511
|
const SmoothlyTableExpandableRow = /*@__PURE__*/proxyCustomElement(TableExpandableRow, [6,"smoothly-table-expandable-row",{"align":[1],"open":[1540],"allowSpotlight":[32],"spotlight":[32]},[[0,"smoothlyTableLoad","handleTableLoaded"]]]);
|
|
55447
55512
|
const SmoothlyTableFooter = /*@__PURE__*/proxyCustomElement(TableFooter, [6,"smoothly-table-footer"]);
|
|
55448
55513
|
const SmoothlyTableHeader = /*@__PURE__*/proxyCustomElement(TableHeader, [6,"smoothly-table-header",{"name":[1]}]);
|