@haiilo/catalyst 2.4.5 → 2.4.7
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.css +1 -1
- package/dist/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/index.esm.js +1 -1
- package/dist/catalyst/{p-5865f232.js → p-5362e648.js} +2 -2
- package/dist/catalyst/p-5362e648.js.map +1 -0
- package/dist/catalyst/p-c2bf7e26.entry.js +2 -0
- package/dist/catalyst/p-c2bf7e26.entry.js.map +1 -0
- package/dist/catalyst/scss/_variables.scss +24 -10
- package/dist/cjs/cat-alert_23.cjs.entry.js +20 -9
- package/dist/cjs/cat-alert_23.cjs.entry.js.map +1 -1
- package/dist/cjs/{cat-icon-registry-2a54df3d.js → cat-icon-registry-32ed379a.js} +5 -1
- package/dist/cjs/cat-icon-registry-32ed379a.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/collection/components/cat-dropdown/cat-dropdown.css +1 -1
- package/dist/collection/components/cat-icon/cat-icon-registry.js +4 -0
- package/dist/collection/components/cat-icon/cat-icon-registry.js.map +1 -1
- package/dist/collection/components/cat-select/cat-select.css +1 -1
- package/dist/collection/components/cat-select/cat-select.js +16 -4
- package/dist/collection/components/cat-select/cat-select.js.map +1 -1
- package/dist/collection/components/cat-select-demo/cat-select-demo.js +2 -1
- package/dist/collection/components/cat-select-demo/cat-select-demo.js.map +1 -1
- package/dist/collection/components/cat-toggle/cat-toggle.css +1 -1
- package/dist/collection/scss/_variables.scss +24 -10
- package/dist/components/cat-dropdown2.js +1 -1
- package/dist/components/cat-dropdown2.js.map +1 -1
- package/dist/components/cat-icon2.js +4 -0
- package/dist/components/cat-icon2.js.map +1 -1
- package/dist/components/cat-select-demo.js +2 -1
- package/dist/components/cat-select-demo.js.map +1 -1
- package/dist/components/cat-select2.js +15 -5
- package/dist/components/cat-select2.js.map +1 -1
- package/dist/components/cat-toggle.js +1 -1
- package/dist/components/cat-toggle.js.map +1 -1
- package/dist/esm/cat-alert_23.entry.js +20 -9
- package/dist/esm/cat-alert_23.entry.js.map +1 -1
- package/dist/esm/{cat-icon-registry-d537b18b.js → cat-icon-registry-7c4007ff.js} +5 -1
- package/dist/esm/cat-icon-registry-7c4007ff.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/types/components/cat-icon/cat-icon-registry.d.ts +1 -0
- package/dist/types/components/cat-select/cat-select.d.ts +2 -0
- package/package.json +2 -2
- package/dist/catalyst/p-51a48b4c.entry.js +0 -2
- package/dist/catalyst/p-51a48b4c.entry.js.map +0 -1
- package/dist/catalyst/p-5865f232.js.map +0 -1
- package/dist/cjs/cat-icon-registry-2a54df3d.js.map +0 -1
- package/dist/esm/cat-icon-registry-d537b18b.js.map +0 -1
|
@@ -30,21 +30,35 @@ $cat-elevation-transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
|
30
30
|
$cat-elevation: (
|
|
31
31
|
0: none,
|
|
32
32
|
1: (
|
|
33
|
-
0
|
|
33
|
+
0 0 0 1px cat-token('color.ui.border.default'),
|
|
34
|
+
0 1px 2px rgba(27, 31, 38, 0.05)
|
|
34
35
|
),
|
|
35
36
|
2: (
|
|
36
|
-
0
|
|
37
|
-
0
|
|
38
|
-
0 1px
|
|
37
|
+
0 0 0 1px cat-token('color.ui.border.default'),
|
|
38
|
+
0 1px 2px rgba(27, 31, 38, 0.06),
|
|
39
|
+
0 1px 3px rgba(27, 31, 38, 0.1)
|
|
39
40
|
),
|
|
40
41
|
3: (
|
|
41
|
-
0
|
|
42
|
-
0
|
|
43
|
-
0
|
|
42
|
+
0 0 0 1px cat-token('color.ui.border.default'),
|
|
43
|
+
0 2px 4px -2px rgba(27, 31, 38, 0.06),
|
|
44
|
+
0 4px 8px -2px rgba(27, 31, 38, 0.1)
|
|
44
45
|
),
|
|
45
46
|
4: (
|
|
46
|
-
0
|
|
47
|
-
0
|
|
48
|
-
0
|
|
47
|
+
0 0 0 1px cat-token('color.ui.border.default'),
|
|
48
|
+
0 4px 6px -2px rgba(27, 31, 38, 0.03),
|
|
49
|
+
0 12px 16px -4px rgba(27, 31, 38, 0.08)
|
|
50
|
+
),
|
|
51
|
+
5: (
|
|
52
|
+
0 0 0 1px cat-token('color.ui.border.default'),
|
|
53
|
+
0 8px 8px -4px rgba(27, 31, 38, 0.03),
|
|
54
|
+
0 20px 24px -4px rgba(27, 31, 38, 0.08)
|
|
55
|
+
),
|
|
56
|
+
6: (
|
|
57
|
+
0 0 0 1px cat-token('color.ui.border.default'),
|
|
58
|
+
0 24px 48px -12px rgba(27, 31, 38, 0.18)
|
|
59
|
+
),
|
|
60
|
+
7: (
|
|
61
|
+
0 0 0 1px cat-token('color.ui.border.default'),
|
|
62
|
+
0 32px 64px -12px rgba(27, 31, 38, 0.14)
|
|
49
63
|
)
|
|
50
64
|
);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-e540e911.js');
|
|
6
|
-
const catIconRegistry = require('./cat-icon-registry-
|
|
6
|
+
const catIconRegistry = require('./cat-icon-registry-32ed379a.js');
|
|
7
7
|
const firstTabbable = require('./first-tabbable-7966cf1c.js');
|
|
8
8
|
|
|
9
9
|
function setAttributeDefault(host, attr, value) {
|
|
@@ -1725,7 +1725,7 @@ const computePosition = (reference, floating, options) => computePosition$1(refe
|
|
|
1725
1725
|
*/
|
|
1726
1726
|
const timeTransitionS = 125;
|
|
1727
1727
|
|
|
1728
|
-
const catDropdownCss = ":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(
|
|
1728
|
+
const catDropdownCss = ":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 0 0 1px rgb(var(--cat-border-color, 235, 236, 240)), 0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);z-index:100;opacity:0;transition:transform 0.13s cubic-bezier(0.3, 0, 0.8, 0.15), opacity 0.13s cubic-bezier(0.3, 0, 0.8, 0.15)}.content[data-placement^=top]{transform:translateY(1rem)}.content[data-placement^=left]{transform:translateX(1rem)}.content[data-placement^=right]{transform:translateX(-1rem)}.content[data-placement^=bottom]{transform:translateY(-1rem)}.content.show{opacity:1;transform:translateX(0);transform:translateY(0);transition:transform 0.5s cubic-bezier(0.05, 0.7, 0.1, 1), opacity 0.5s cubic-bezier(0.05, 0.7, 0.1, 1)}.content.overflow-auto{overflow:auto}";
|
|
1729
1729
|
|
|
1730
1730
|
let nextUniqueId$7 = 0;
|
|
1731
1731
|
const CatDropdown = class {
|
|
@@ -4186,7 +4186,7 @@ var autosizeInput = function (element, options) {
|
|
|
4186
4186
|
}
|
|
4187
4187
|
};
|
|
4188
4188
|
|
|
4189
|
-
const catSelectCss = ".hint-section{display:flex;gap:0.5rem;flex-direction:column;color:rgb(var(--cat-hint-color, inherit))}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}:host{display:flex;flex-direction:column;gap:0.5rem;line-height:1.25rem;position:relative;margin-bottom:1rem}:host([hidden]){display:none}label{align-self:flex-start}label.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-optional{margin-left:0.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 105, 118, 135))}.select-wrapper{display:flex;align-items:flex-start;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:0 0 0 1px rgb(var(--cat-border-color-dark, 215, 219, 224));transition:box-shadow 0.13s linear;padding:0.25rem}.select-wrapper:not(.select-disabled):hover{box-shadow:0 0 0 2px rgb(var(--cat-border-color-dark, 215, 219, 224))}.select-wrapper:not(.select-disabled):focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255))}:host(.cat-error) .select-wrapper{box-shadow:0 0 0 1px rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) .select-wrapper:not(.input-disabled):hover{box-shadow:0 0 0 2px rgb(var(--cat-danger-bg, 217, 52, 13))}.select-disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135));pointer-events:none}.select-wrapper-inner{display:flex;flex:1 1 auto;flex-wrap:wrap;align-items:center;gap:0.25rem;min-width:0}.select-wrapper-inner>cat-avatar{padding-left:0.25rem}.select-wrapper-inner cat-avatar{--cat-avatar-size:1.25rem}.select-input{font:inherit;background:none;border:none;outline:none;padding:0.375rem 0.5rem;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.select-disabled .select-input{cursor:inherit}.select-pills{display:contents}.pill{display:inline-flex;align-items:center;gap:0.5rem;padding:0.25rem 0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-s, 0.125rem);white-space:nowrap;min-width:0}.pill>span{overflow:hidden;text-overflow:ellipsis;flex:1 1 0%}.pill>cat-button{margin-right:-0.25rem;margin-left:-0.25rem}.select-btn{transition:transform 0.13s linear}.select-btn::part(button){outline:none}cat-spinner{padding:0.375rem}.select-btn-open{transform:rotate(180deg)}.select-dropdown{position:absolute;right:0;background:white;display:none;overflow:auto;box-shadow:0 1px 4px 0 rgba(
|
|
4189
|
+
const catSelectCss = ".hint-section{display:flex;gap:0.5rem;flex-direction:column;color:rgb(var(--cat-hint-color, inherit))}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}:host{display:flex;flex-direction:column;gap:0.5rem;line-height:1.25rem;position:relative;margin-bottom:1rem}:host([hidden]){display:none}label{align-self:flex-start}label.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-optional{margin-left:0.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 105, 118, 135))}.select-wrapper{display:flex;align-items:flex-start;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:0 0 0 1px rgb(var(--cat-border-color-dark, 215, 219, 224));transition:box-shadow 0.13s linear;padding:0.25rem}.select-wrapper:not(.select-disabled):hover{box-shadow:0 0 0 2px rgb(var(--cat-border-color-dark, 215, 219, 224))}.select-wrapper:not(.select-disabled):focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255))}:host(.cat-error) .select-wrapper{box-shadow:0 0 0 1px rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) .select-wrapper:not(.input-disabled):hover{box-shadow:0 0 0 2px rgb(var(--cat-danger-bg, 217, 52, 13))}.select-disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135));pointer-events:none}.select-wrapper-inner{display:flex;flex:1 1 auto;flex-wrap:wrap;align-items:center;gap:0.25rem;min-width:0}.select-wrapper-inner>cat-avatar{padding-left:0.25rem}.select-wrapper-inner cat-avatar{--cat-avatar-size:1.25rem}.select-input{font:inherit;background:none;border:none;outline:none;padding:0.375rem 0.5rem;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.select-disabled .select-input{cursor:inherit}.select-pills{display:contents}.pill{display:inline-flex;align-items:center;gap:0.5rem;padding:0.25rem 0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-s, 0.125rem);white-space:nowrap;min-width:0}.pill>span{overflow:hidden;text-overflow:ellipsis;flex:1 1 0%}.pill>cat-button{margin-right:-0.25rem;margin-left:-0.25rem}.select-btn{transition:transform 0.13s linear}.select-btn::part(button){outline:none}cat-spinner{padding:0.375rem}.select-btn-open{transform:rotate(180deg)}.select-dropdown{position:absolute;right:0;background:white;display:none;overflow:auto;box-shadow:0 0 0 1px rgb(var(--cat-border-color, 235, 236, 240)), 0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);z-index:100}.select-options-wrapper{max-height:16rem;width:100%}.select-empty{margin:1rem 0;padding:0 1.25rem}.select-options{list-style-type:none;margin:0;padding:0.5rem 0}.select-options cat-checkbox,.select-options .select-option-single{margin:0;padding:0.5rem 1rem}.select-option-inner{display:flex;gap:0.5rem;--cat-avatar-size:1.25rem}.select-option-text{flex:1 1 0%;min-width:0}.select-option-single{cursor:pointer}.select-input-transparent-caret{caret-color:transparent}.select-option-empty,.select-option-loading{padding:0.5rem 1rem}.select-option:hover{background-color:rgba(var(--cat-secondary-bg, 105, 118, 135), 0.05)}.select-option-active{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-2px}.select-option-label{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-wrap:break-word;word-break:break-word}.select-option-description{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}";
|
|
4190
4190
|
|
|
4191
4191
|
const INIT_STATE = {
|
|
4192
4192
|
term: '',
|
|
@@ -4209,6 +4209,7 @@ const CatSelect = class {
|
|
|
4209
4209
|
this._id = `cat-input-${nextUniqueId$4++}`;
|
|
4210
4210
|
this.term$ = new Subject();
|
|
4211
4211
|
this.more$ = new Subject();
|
|
4212
|
+
this.valueChangedBySelection = false;
|
|
4212
4213
|
this.state = INIT_STATE;
|
|
4213
4214
|
this.hasSlottedLabel = false;
|
|
4214
4215
|
/**
|
|
@@ -4255,6 +4256,9 @@ const CatSelect = class {
|
|
|
4255
4256
|
this.reset(connector);
|
|
4256
4257
|
this.resolve();
|
|
4257
4258
|
}
|
|
4259
|
+
onValueChange() {
|
|
4260
|
+
!this.valueChangedBySelection ? this.resolve() : (this.valueChangedBySelection = false);
|
|
4261
|
+
}
|
|
4258
4262
|
onStateChange(newState, oldState) {
|
|
4259
4263
|
var _a;
|
|
4260
4264
|
const changed = (key) => newState[key] !== oldState[key];
|
|
@@ -4265,16 +4269,17 @@ const CatSelect = class {
|
|
|
4265
4269
|
}
|
|
4266
4270
|
}
|
|
4267
4271
|
if (changed('selection')) {
|
|
4272
|
+
let newValue;
|
|
4268
4273
|
if (!this.multiple && this.state.selection.length) {
|
|
4269
4274
|
this.hide();
|
|
4270
4275
|
}
|
|
4271
4276
|
const idsSelected = this.state.selection.map(item => item.item.id);
|
|
4272
4277
|
if (!this.tags) {
|
|
4273
4278
|
if (this.multiple) {
|
|
4274
|
-
|
|
4279
|
+
newValue = idsSelected;
|
|
4275
4280
|
}
|
|
4276
4281
|
else {
|
|
4277
|
-
|
|
4282
|
+
newValue = idsSelected.length ? idsSelected[0] : '';
|
|
4278
4283
|
}
|
|
4279
4284
|
}
|
|
4280
4285
|
else {
|
|
@@ -4283,12 +4288,16 @@ const CatSelect = class {
|
|
|
4283
4288
|
.filter(item => item.item.id.startsWith(`select-${this.id}-tag`))
|
|
4284
4289
|
.map(item => item.render.label);
|
|
4285
4290
|
if (this.multiple) {
|
|
4286
|
-
|
|
4291
|
+
newValue = { ids, tags };
|
|
4287
4292
|
}
|
|
4288
4293
|
else {
|
|
4289
|
-
|
|
4294
|
+
newValue = { id: ids.length ? ids[0] : '', tag: tags.length ? tags[0] : '' };
|
|
4290
4295
|
}
|
|
4291
4296
|
}
|
|
4297
|
+
if (!oldState.isResolving) {
|
|
4298
|
+
this.valueChangedBySelection = true;
|
|
4299
|
+
this.value = newValue;
|
|
4300
|
+
}
|
|
4292
4301
|
this.catChange.emit();
|
|
4293
4302
|
}
|
|
4294
4303
|
}
|
|
@@ -4759,6 +4768,7 @@ const CatSelect = class {
|
|
|
4759
4768
|
get hostElement() { return index.getElement(this); }
|
|
4760
4769
|
static get watchers() { return {
|
|
4761
4770
|
"connector": ["onConnectorChange"],
|
|
4771
|
+
"value": ["onValueChange"],
|
|
4762
4772
|
"state": ["onStateChange"]
|
|
4763
4773
|
}; }
|
|
4764
4774
|
};
|
|
@@ -4867,8 +4877,9 @@ const CatSelectTest = class {
|
|
|
4867
4877
|
description: user.desc
|
|
4868
4878
|
})
|
|
4869
4879
|
});
|
|
4870
|
-
(_e = this.singleSelectAvatar) === null || _e === void 0 ? void 0 : _e.connect(
|
|
4880
|
+
(_e = this.singleSelectAvatar) === null || _e === void 0 ? void 0 : _e.connect(this.countryConnector);
|
|
4871
4881
|
(_f = this.singleSelectTagging) === null || _f === void 0 ? void 0 : _f.connect(this.countryConnector);
|
|
4882
|
+
setTimeout(() => this.multipleSelect && (this.multipleSelect.value = []), 5000);
|
|
4872
4883
|
}
|
|
4873
4884
|
render() {
|
|
4874
4885
|
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-dropdown", { 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%' } })))));
|
|
@@ -6399,7 +6410,7 @@ const CatTextarea = class {
|
|
|
6399
6410
|
};
|
|
6400
6411
|
CatTextarea.style = catTextareaCss;
|
|
6401
6412
|
|
|
6402
|
-
const catToggleCss = ".hint-section{display:flex;gap:0.5rem;flex-direction:column;color:rgb(var(--cat-hint-color, inherit))}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}:host{display:flex;flex-direction:column;gap:0.5rem;margin-bottom:1rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.label-left{flex-direction:row-reverse}input{position:absolute;margin:0;width:2rem;height:1.25rem;opacity:0;cursor:inherit}.toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;position:relative;width:2rem;height:1.25rem;border-radius:10rem;background-color:rgb(var(--cat-border-color-dark, 215, 219, 224));transition:background-color 0.13s ease;pointer-events:none}:checked+.toggle{background-color:rgb(var(--cat-primary-bg, 0, 129, 148))}:focus-visible+.toggle{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.toggle::after{content:\"\";position:absolute;width:1rem;height:1rem;background:#fff;border-radius:10rem;transform:translateX(calc(2px - 0.5rem));transition:transform 0.13s linear;box-shadow:0 1px
|
|
6413
|
+
const catToggleCss = ".hint-section{display:flex;gap:0.5rem;flex-direction:column;color:rgb(var(--cat-hint-color, inherit))}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}:host{display:flex;flex-direction:column;gap:0.5rem;margin-bottom:1rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.label-left{flex-direction:row-reverse}input{position:absolute;margin:0;width:2rem;height:1.25rem;opacity:0;cursor:inherit}.toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;position:relative;width:2rem;height:1.25rem;border-radius:10rem;background-color:rgb(var(--cat-border-color-dark, 215, 219, 224));transition:background-color 0.13s ease;pointer-events:none}:checked+.toggle{background-color:rgb(var(--cat-primary-bg, 0, 129, 148))}:focus-visible+.toggle{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.toggle::after{content:\"\";position:absolute;width:1rem;height:1rem;background:#fff;border-radius:10rem;transform:translateX(calc(2px - 0.5rem));transition:transform 0.13s linear;box-shadow:0 0 0 1px rgb(var(--cat-border-color, 235, 236, 240)), 0 1px 2px rgba(27, 31, 38, 0.06), 0 1px 3px rgba(27, 31, 38, 0.1)}:checked+.toggle::after{transform:translateX(calc(-2px + 0.5rem));background:rgb(var(--cat-primary-fill, 255, 255, 255))}.is-disabled .toggle{background-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}:host(.cat-error) .toggle{background-color:rgba(var(--cat-danger-bg, 217, 52, 13), 0.2)}:host(.cat-error) :checked+.toggle{background-color:rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) :checked+.toggle::after{background:rgb(var(--cat-danger-fill, 255, 255, 255))}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}";
|
|
6403
6414
|
|
|
6404
6415
|
let nextUniqueId$1 = 0;
|
|
6405
6416
|
const CatToggle = class {
|