@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.
Files changed (46) hide show
  1. package/dist/catalyst/catalyst.css +1 -1
  2. package/dist/catalyst/catalyst.esm.js +1 -1
  3. package/dist/catalyst/index.esm.js +1 -1
  4. package/dist/catalyst/{p-5865f232.js → p-5362e648.js} +2 -2
  5. package/dist/catalyst/p-5362e648.js.map +1 -0
  6. package/dist/catalyst/p-c2bf7e26.entry.js +2 -0
  7. package/dist/catalyst/p-c2bf7e26.entry.js.map +1 -0
  8. package/dist/catalyst/scss/_variables.scss +24 -10
  9. package/dist/cjs/cat-alert_23.cjs.entry.js +20 -9
  10. package/dist/cjs/cat-alert_23.cjs.entry.js.map +1 -1
  11. package/dist/cjs/{cat-icon-registry-2a54df3d.js → cat-icon-registry-32ed379a.js} +5 -1
  12. package/dist/cjs/cat-icon-registry-32ed379a.js.map +1 -0
  13. package/dist/cjs/index.cjs.js +1 -1
  14. package/dist/collection/components/cat-dropdown/cat-dropdown.css +1 -1
  15. package/dist/collection/components/cat-icon/cat-icon-registry.js +4 -0
  16. package/dist/collection/components/cat-icon/cat-icon-registry.js.map +1 -1
  17. package/dist/collection/components/cat-select/cat-select.css +1 -1
  18. package/dist/collection/components/cat-select/cat-select.js +16 -4
  19. package/dist/collection/components/cat-select/cat-select.js.map +1 -1
  20. package/dist/collection/components/cat-select-demo/cat-select-demo.js +2 -1
  21. package/dist/collection/components/cat-select-demo/cat-select-demo.js.map +1 -1
  22. package/dist/collection/components/cat-toggle/cat-toggle.css +1 -1
  23. package/dist/collection/scss/_variables.scss +24 -10
  24. package/dist/components/cat-dropdown2.js +1 -1
  25. package/dist/components/cat-dropdown2.js.map +1 -1
  26. package/dist/components/cat-icon2.js +4 -0
  27. package/dist/components/cat-icon2.js.map +1 -1
  28. package/dist/components/cat-select-demo.js +2 -1
  29. package/dist/components/cat-select-demo.js.map +1 -1
  30. package/dist/components/cat-select2.js +15 -5
  31. package/dist/components/cat-select2.js.map +1 -1
  32. package/dist/components/cat-toggle.js +1 -1
  33. package/dist/components/cat-toggle.js.map +1 -1
  34. package/dist/esm/cat-alert_23.entry.js +20 -9
  35. package/dist/esm/cat-alert_23.entry.js.map +1 -1
  36. package/dist/esm/{cat-icon-registry-d537b18b.js → cat-icon-registry-7c4007ff.js} +5 -1
  37. package/dist/esm/cat-icon-registry-7c4007ff.js.map +1 -0
  38. package/dist/esm/index.js +2 -2
  39. package/dist/types/components/cat-icon/cat-icon-registry.d.ts +1 -0
  40. package/dist/types/components/cat-select/cat-select.d.ts +2 -0
  41. package/package.json +2 -2
  42. package/dist/catalyst/p-51a48b4c.entry.js +0 -2
  43. package/dist/catalyst/p-51a48b4c.entry.js.map +0 -1
  44. package/dist/catalyst/p-5865f232.js.map +0 -1
  45. package/dist/cjs/cat-icon-registry-2a54df3d.js.map +0 -1
  46. package/dist/esm/cat-icon-registry-d537b18b.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-c2a28ebb.js';
2
- import { l as loglevel, e as CatIconRegistry, b as catI18nRegistry } from './cat-icon-registry-d537b18b.js';
2
+ import { l as loglevel, e as CatIconRegistry, b as catI18nRegistry } from './cat-icon-registry-7c4007ff.js';
3
3
  import { c as createFocusTrap, t as tabbable, f as firstTabbable } from './first-tabbable-4a00de61.js';
4
4
 
5
5
  function setAttributeDefault(host, attr, value) {
@@ -1721,7 +1721,7 @@ const computePosition = (reference, floating, options) => computePosition$1(refe
1721
1721
  */
1722
1722
  const timeTransitionS = 125;
1723
1723
 
1724
- 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(16, 29, 48, 0.2);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}";
1724
+ 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}";
1725
1725
 
1726
1726
  let nextUniqueId$7 = 0;
1727
1727
  const CatDropdown = class {
@@ -4182,7 +4182,7 @@ var autosizeInput = function (element, options) {
4182
4182
  }
4183
4183
  };
4184
4184
 
4185
- 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(16, 29, 48, 0.2);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))}";
4185
+ 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))}";
4186
4186
 
4187
4187
  const INIT_STATE = {
4188
4188
  term: '',
@@ -4205,6 +4205,7 @@ const CatSelect = class {
4205
4205
  this._id = `cat-input-${nextUniqueId$4++}`;
4206
4206
  this.term$ = new Subject();
4207
4207
  this.more$ = new Subject();
4208
+ this.valueChangedBySelection = false;
4208
4209
  this.state = INIT_STATE;
4209
4210
  this.hasSlottedLabel = false;
4210
4211
  /**
@@ -4251,6 +4252,9 @@ const CatSelect = class {
4251
4252
  this.reset(connector);
4252
4253
  this.resolve();
4253
4254
  }
4255
+ onValueChange() {
4256
+ !this.valueChangedBySelection ? this.resolve() : (this.valueChangedBySelection = false);
4257
+ }
4254
4258
  onStateChange(newState, oldState) {
4255
4259
  var _a;
4256
4260
  const changed = (key) => newState[key] !== oldState[key];
@@ -4261,16 +4265,17 @@ const CatSelect = class {
4261
4265
  }
4262
4266
  }
4263
4267
  if (changed('selection')) {
4268
+ let newValue;
4264
4269
  if (!this.multiple && this.state.selection.length) {
4265
4270
  this.hide();
4266
4271
  }
4267
4272
  const idsSelected = this.state.selection.map(item => item.item.id);
4268
4273
  if (!this.tags) {
4269
4274
  if (this.multiple) {
4270
- this.value = idsSelected;
4275
+ newValue = idsSelected;
4271
4276
  }
4272
4277
  else {
4273
- this.value = idsSelected.length ? idsSelected[0] : '';
4278
+ newValue = idsSelected.length ? idsSelected[0] : '';
4274
4279
  }
4275
4280
  }
4276
4281
  else {
@@ -4279,12 +4284,16 @@ const CatSelect = class {
4279
4284
  .filter(item => item.item.id.startsWith(`select-${this.id}-tag`))
4280
4285
  .map(item => item.render.label);
4281
4286
  if (this.multiple) {
4282
- this.value = { ids, tags };
4287
+ newValue = { ids, tags };
4283
4288
  }
4284
4289
  else {
4285
- this.value = { id: ids.length ? ids[0] : '', tag: tags.length ? tags[0] : '' };
4290
+ newValue = { id: ids.length ? ids[0] : '', tag: tags.length ? tags[0] : '' };
4286
4291
  }
4287
4292
  }
4293
+ if (!oldState.isResolving) {
4294
+ this.valueChangedBySelection = true;
4295
+ this.value = newValue;
4296
+ }
4288
4297
  this.catChange.emit();
4289
4298
  }
4290
4299
  }
@@ -4755,6 +4764,7 @@ const CatSelect = class {
4755
4764
  get hostElement() { return getElement(this); }
4756
4765
  static get watchers() { return {
4757
4766
  "connector": ["onConnectorChange"],
4767
+ "value": ["onValueChange"],
4758
4768
  "state": ["onStateChange"]
4759
4769
  }; }
4760
4770
  };
@@ -4863,8 +4873,9 @@ const CatSelectTest = class {
4863
4873
  description: user.desc
4864
4874
  })
4865
4875
  });
4866
- (_e = this.singleSelectAvatar) === null || _e === void 0 ? void 0 : _e.connect(Object.assign(Object.assign({}, this.countryConnector), { customId: (item) => item.country }));
4876
+ (_e = this.singleSelectAvatar) === null || _e === void 0 ? void 0 : _e.connect(this.countryConnector);
4867
4877
  (_f = this.singleSelectTagging) === null || _f === void 0 ? void 0 : _f.connect(this.countryConnector);
4878
+ setTimeout(() => this.multipleSelect && (this.multipleSelect.value = []), 5000);
4868
4879
  }
4869
4880
  render() {
4870
4881
  return (h(Host, { style: { display: 'flex', flexDirection: 'column' } }, 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 }, h("span", { slot: "hint" }, "Searching for \"no\" -", '>', " no options are returned!")), h("cat-select", { label: "Multiple with img", ref: el => (this.multipleSelectAvatar = el), value: ['1'], placeholder: "Hello World", multiple: true, clearable: true }), 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 }), 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 }), 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 }), h("cat-dropdown", { overflow: true, noAutoClose: true }, h("cat-button", { slot: "trigger", style: { width: '50%' } }, "Open select"), h("div", { slot: "content", style: { width: '400px' } }, 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%' } })))));
@@ -6395,7 +6406,7 @@ const CatTextarea = class {
6395
6406
  };
6396
6407
  CatTextarea.style = catTextareaCss;
6397
6408
 
6398
- 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 4px 0 rgba(16, 29, 48, 0.2)}: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))}";
6409
+ 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))}";
6399
6410
 
6400
6411
  let nextUniqueId$1 = 0;
6401
6412
  const CatToggle = class {