@haiilo/catalyst 1.3.0 → 1.3.1
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/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/catalyst.esm.js.map +1 -1
- package/dist/catalyst/p-53a1db22.js +3 -0
- package/dist/catalyst/p-53a1db22.js.map +1 -0
- package/dist/catalyst/p-5bfc70e3.entry.js +2 -0
- package/dist/catalyst/{p-270fd91d.entry.js.map → p-5bfc70e3.entry.js.map} +1 -1
- package/dist/catalyst/p-b561dcd4.entry.js +2 -0
- package/dist/catalyst/p-b561dcd4.entry.js.map +1 -0
- package/dist/cjs/cat-alert_22.cjs.entry.js +11 -15
- package/dist/cjs/cat-alert_22.cjs.entry.js.map +1 -1
- package/dist/cjs/cat-modal.cjs.entry.js +2 -2
- package/dist/cjs/cat-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/catalyst.cjs.js +2 -2
- package/dist/cjs/{index-b2134f1b.js → index-e540e911.js} +1 -4
- package/dist/cjs/index-e540e911.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/cat-menu/cat-menu.css +3 -1
- package/dist/collection/components/cat-menu/cat-menu.js +23 -1
- package/dist/collection/components/cat-menu/cat-menu.js.map +1 -1
- package/dist/collection/components/cat-radio-group/cat-radio-group.js +3 -11
- package/dist/collection/components/cat-radio-group/cat-radio-group.js.map +1 -1
- package/dist/collection/components/cat-select-demo/cat-select-demo.js +4 -1
- package/dist/collection/components/cat-select-demo/cat-select-demo.js.map +1 -1
- package/dist/components/cat-menu.js +1 -167
- package/dist/components/cat-menu.js.map +1 -1
- package/dist/components/cat-menu2.js +176 -0
- package/dist/components/cat-menu2.js.map +1 -0
- package/dist/components/cat-radio-group.js +3 -11
- package/dist/components/cat-radio-group.js.map +1 -1
- package/dist/components/cat-select-demo.js +15 -9
- package/dist/components/cat-select-demo.js.map +1 -1
- package/dist/esm/cat-alert_22.entry.js +11 -15
- package/dist/esm/cat-alert_22.entry.js.map +1 -1
- package/dist/esm/cat-modal.entry.js +2 -2
- package/dist/esm/cat-modal.entry.js.map +1 -1
- package/dist/esm/catalyst.js +2 -2
- package/dist/esm/{index-033048ed.js → index-c2a28ebb.js} +2 -4
- package/dist/esm/index-c2a28ebb.js.map +1 -0
- package/dist/esm/loader.js +2 -2
- package/dist/types/components/cat-menu/cat-menu.d.ts +4 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +2 -2
- package/dist/catalyst/p-270fd91d.entry.js +0 -2
- package/dist/catalyst/p-3ad731e4.entry.js +0 -2
- package/dist/catalyst/p-3ad731e4.entry.js.map +0 -1
- package/dist/catalyst/p-692e49d6.js +0 -3
- package/dist/catalyst/p-692e49d6.js.map +0 -1
- package/dist/cjs/index-b2134f1b.js.map +0 -1
- package/dist/esm/index-033048ed.js.map +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-e540e911.js');
|
|
6
6
|
const catNotification = require('./cat-notification-bcb9fb86.js');
|
|
7
7
|
const firstTabbable = require('./first-tabbable-7966cf1c.js');
|
|
8
8
|
|
|
@@ -1822,7 +1822,7 @@ const computePosition = (reference, floating, options) => computePosition$1(refe
|
|
|
1822
1822
|
...options
|
|
1823
1823
|
});
|
|
1824
1824
|
|
|
1825
|
-
const catMenuCss = ":host{display:contents}:host([hidden]){display:none}::slotted(nav){padding-top:0.5rem;padding-bottom:0.5rem;min-width:8rem;max-width:16rem}.content{position:absolute;background:white;display:none
|
|
1825
|
+
const catMenuCss = ":host{display:contents}:host([hidden]){display:none}::slotted(nav){padding-top:0.5rem;padding-bottom:0.5rem;min-width:8rem;max-width:16rem}.content{position:absolute;background:white;display:none;-webkit-overflow-scrolling:touch;min-height:2rem;max-height:calc(100vh - 48px);box-shadow:0 1px 4px 0 rgba(16, 29, 48, 0.2);border-radius:var(--cat-border-radius-m, 0.25rem);z-index:100}.content.overflow-auto{overflow:auto}";
|
|
1826
1826
|
|
|
1827
1827
|
let nextUniqueId$6 = 0;
|
|
1828
1828
|
const CatMenu = class {
|
|
@@ -1839,6 +1839,10 @@ const CatMenu = class {
|
|
|
1839
1839
|
* Do not close the menu on outside clicks.
|
|
1840
1840
|
*/
|
|
1841
1841
|
this.noAutoClose = false;
|
|
1842
|
+
/**
|
|
1843
|
+
* Allow overflow when menu is open.
|
|
1844
|
+
*/
|
|
1845
|
+
this.overflow = false;
|
|
1842
1846
|
}
|
|
1843
1847
|
clickHandler(event) {
|
|
1844
1848
|
if (!this.trigger) {
|
|
@@ -1879,7 +1883,7 @@ const CatMenu = class {
|
|
|
1879
1883
|
}
|
|
1880
1884
|
}
|
|
1881
1885
|
render() {
|
|
1882
|
-
return (index.h(index.Host, null, index.h("slot", { name: "trigger", ref: el => (this.triggerSlot = el) }), index.h("div", { class:
|
|
1886
|
+
return (index.h(index.Host, null, index.h("slot", { name: "trigger", ref: el => (this.triggerSlot = el) }), index.h("div", { class: { content: true, 'overflow-auto': !this.overflow }, ref: el => (this.content = el) }, index.h("slot", { name: "content" }))));
|
|
1883
1887
|
}
|
|
1884
1888
|
get contentId() {
|
|
1885
1889
|
return `cat-menu-${this.id}`;
|
|
@@ -2055,22 +2059,14 @@ const CatRadioGroup = class {
|
|
|
2055
2059
|
this.labelLeft = false;
|
|
2056
2060
|
}
|
|
2057
2061
|
onNameChanged(newName) {
|
|
2058
|
-
this.catRadioGroup.forEach(catRadio =>
|
|
2059
|
-
catRadio.name = newName;
|
|
2060
|
-
});
|
|
2062
|
+
this.catRadioGroup.forEach(catRadio => (catRadio.name = newName));
|
|
2061
2063
|
}
|
|
2062
2064
|
onValueChanged(newValue) {
|
|
2063
|
-
this.catRadioGroup.forEach(catRadio =>
|
|
2064
|
-
catRadio.checked = catRadio.value === newValue;
|
|
2065
|
-
});
|
|
2065
|
+
this.catRadioGroup.forEach(catRadio => (catRadio.checked = catRadio.value === newValue));
|
|
2066
2066
|
this.updateTabIndex();
|
|
2067
2067
|
}
|
|
2068
2068
|
onDisabledChanged(disabled) {
|
|
2069
|
-
this.catRadioGroup.forEach(catRadio =>
|
|
2070
|
-
if (disabled) {
|
|
2071
|
-
catRadio.disabled = disabled;
|
|
2072
|
-
}
|
|
2073
|
-
});
|
|
2069
|
+
this.catRadioGroup.forEach(catRadio => (catRadio.disabled = disabled));
|
|
2074
2070
|
}
|
|
2075
2071
|
onLabelLeftChanged(labelLeft) {
|
|
2076
2072
|
this.catRadioGroup.forEach(catRadio => {
|
|
@@ -4664,7 +4660,7 @@ const CatSelectTest = class {
|
|
|
4664
4660
|
(_f = this.singleSelectTagging) === null || _f === void 0 ? void 0 : _f.connect(this.countryConnector);
|
|
4665
4661
|
}
|
|
4666
4662
|
render() {
|
|
4667
|
-
return (index.h(index.Host, { style: { display: 'flex', flexDirection: 'column' } }, index.h("cat-select", { label: "Multiple Select", hint: "This is a hint!", ref: el => (this.multipleSelect = el), value: ['1'], placeholder: "Hello World", onCatChange: () => { var _a; return console.log((_a = this.multipleSelect) === null || _a === void 0 ? void 0 : _a.value); }, onCatBlur: e => console.log('Multiple blur', e), multiple: true, clearable: true }, index.h("span", { slot: "hint" }, "Searching for \"no\" -", '>', " no options are returned!")), index.h("cat-select", { label: "Multiple with img", ref: el => (this.multipleSelectAvatar = el), value: ['1'], placeholder: "Hello World", multiple: true, clearable: true }), index.h("cat-select", { label: "Multiple with tagging support", hint: "This is a hint!", ref: el => (this.multipleSelectTagging = el), value: { ids: ['1'], tags: ['Test', 'Albania', 'Algeria'] }, placeholder: "Select country", onCatChange: () => { var _a; return console.log((_a = this.multipleSelectTagging) === null || _a === void 0 ? void 0 : _a.value); }, multiple: true, tags: true, clearable: true }), index.h("cat-select", { label: "Single Select", hint: "This is a hint!", ref: el => (this.singleSelect = el), placeholder: "Search for a country or capital", onCatBlur: e => console.log('Single blur', e), clearable: true }), index.h("cat-select", { label: "Single with img", ref: el => (this.singleSelectAvatar = el), value: '1', onCatChange: () => { var _a; return console.log((_a = this.singleSelectAvatar) === null || _a === void 0 ? void 0 : _a.value); }, placeholder: "Search for a country or capital", clearable: true }), index.h("cat-select", { label: "Single with tagging support", ref: el => (this.singleSelectTagging = el), value: { id: '', tag: 'Albania' }, placeholder: "Search for a country or capital", onCatChange: () => { var _a; return console.log('Single', (_a = this.singleSelectTagging) === null || _a === void 0 ? void 0 : _a.value); }, tagHint: "new country", tags: true, clearable: true })));
|
|
4663
|
+
return (index.h(index.Host, { style: { display: 'flex', flexDirection: 'column' } }, index.h("cat-select", { label: "Multiple Select", hint: "This is a hint!", ref: el => (this.multipleSelect = el), value: ['1'], placeholder: "Hello World", onCatChange: () => { var _a; return console.log((_a = this.multipleSelect) === null || _a === void 0 ? void 0 : _a.value); }, onCatBlur: e => console.log('Multiple blur', e), multiple: true, clearable: true }, index.h("span", { slot: "hint" }, "Searching for \"no\" -", '>', " no options are returned!")), index.h("cat-select", { label: "Multiple with img", ref: el => (this.multipleSelectAvatar = el), value: ['1'], placeholder: "Hello World", multiple: true, clearable: true }), index.h("cat-select", { label: "Multiple with tagging support", hint: "This is a hint!", ref: el => (this.multipleSelectTagging = el), value: { ids: ['1'], tags: ['Test', 'Albania', 'Algeria'] }, placeholder: "Select country", onCatChange: () => { var _a; return console.log((_a = this.multipleSelectTagging) === null || _a === void 0 ? void 0 : _a.value); }, multiple: true, tags: true, clearable: true }), index.h("cat-select", { label: "Single Select", hint: "This is a hint!", ref: el => (this.singleSelect = el), placeholder: "Search for a country or capital", onCatBlur: e => console.log('Single blur', e), clearable: true }), index.h("cat-select", { label: "Single with img", ref: el => (this.singleSelectAvatar = el), value: '1', onCatChange: () => { var _a; return console.log((_a = this.singleSelectAvatar) === null || _a === void 0 ? void 0 : _a.value); }, placeholder: "Search for a country or capital", clearable: true }), index.h("cat-menu", { overflow: true, noAutoClose: true }, index.h("cat-button", { slot: "trigger", style: { width: '50%' } }, "Open select"), index.h("div", { slot: "content", style: { width: '400px' } }, index.h("cat-select", { label: "Single with tagging support", ref: el => (this.singleSelectTagging = el), value: { id: '', tag: 'Albania' }, placeholder: "Search for a country or capital", onCatChange: () => { var _a; return console.log('Single', (_a = this.singleSelectTagging) === null || _a === void 0 ? void 0 : _a.value); }, tagHint: "new country", tags: true, clearable: true, style: { width: '90%' } })))));
|
|
4668
4664
|
}
|
|
4669
4665
|
get countryConnector() {
|
|
4670
4666
|
return {
|