@haiilo/catalyst 0.11.0 → 0.12.0

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 (63) hide show
  1. package/dist/catalyst/catalyst.css +1 -1
  2. package/dist/catalyst/catalyst.esm.js +1 -1
  3. package/dist/catalyst/catalyst.esm.js.map +1 -1
  4. package/dist/catalyst/{p-aa382647.entry.js → p-14edfc2b.entry.js} +5 -5
  5. package/dist/catalyst/p-14edfc2b.entry.js.map +1 -0
  6. package/dist/catalyst/p-5ba5e33c.entry.js +2 -0
  7. package/dist/catalyst/{p-c0b4200d.entry.js.map → p-5ba5e33c.entry.js.map} +1 -1
  8. package/dist/catalyst/scss/core/_base.scss +0 -1
  9. package/dist/catalyst/scss/utils/_layout.scss +4 -4
  10. package/dist/catalyst/scss/utils/_typography.mixins.scss +3 -3
  11. package/dist/cjs/cat-alert_21.cjs.entry.js +63 -23
  12. package/dist/cjs/cat-alert_21.cjs.entry.js.map +1 -1
  13. package/dist/cjs/cat-textarea.cjs.entry.js +1 -1
  14. package/dist/cjs/cat-textarea.cjs.entry.js.map +1 -1
  15. package/dist/cjs/catalyst.cjs.js +1 -1
  16. package/dist/cjs/loader.cjs.js +1 -1
  17. package/dist/collection/components/cat-button/cat-button.css +185 -0
  18. package/dist/collection/components/cat-checkbox/cat-checkbox.css +16 -9
  19. package/dist/collection/components/cat-input/cat-input.css +3 -0
  20. package/dist/collection/components/cat-radio/cat-radio.css +3 -0
  21. package/dist/collection/components/cat-radio-group/cat-radio-group.js +30 -0
  22. package/dist/collection/components/cat-radio-group/cat-radio-group.js.map +1 -1
  23. package/dist/collection/components/cat-select/cat-select.css +4 -2
  24. package/dist/collection/components/cat-select/cat-select.js +76 -17
  25. package/dist/collection/components/cat-select/cat-select.js.map +1 -1
  26. package/dist/collection/components/cat-textarea/cat-textarea.css +3 -0
  27. package/dist/collection/components/cat-toggle/cat-toggle.css +9 -9
  28. package/dist/collection/components/cat-tooltip/cat-tooltip.css +2 -3
  29. package/dist/collection/index.js.map +1 -1
  30. package/dist/collection/scss/core/_base.scss +0 -1
  31. package/dist/collection/scss/utils/_layout.scss +4 -4
  32. package/dist/collection/scss/utils/_typography.mixins.scss +3 -3
  33. package/dist/components/cat-button2.js +1 -1
  34. package/dist/components/cat-button2.js.map +1 -1
  35. package/dist/components/cat-checkbox.js +1 -1
  36. package/dist/components/cat-checkbox.js.map +1 -1
  37. package/dist/components/cat-input.js +1 -1
  38. package/dist/components/cat-input.js.map +1 -1
  39. package/dist/components/cat-radio-group.js +7 -1
  40. package/dist/components/cat-radio-group.js.map +1 -1
  41. package/dist/components/cat-radio.js +1 -1
  42. package/dist/components/cat-radio.js.map +1 -1
  43. package/dist/components/cat-select.js +52 -18
  44. package/dist/components/cat-select.js.map +1 -1
  45. package/dist/components/cat-textarea.js +1 -1
  46. package/dist/components/cat-textarea.js.map +1 -1
  47. package/dist/components/cat-toggle.js +1 -1
  48. package/dist/components/cat-toggle.js.map +1 -1
  49. package/dist/components/cat-tooltip.js +1 -1
  50. package/dist/components/cat-tooltip.js.map +1 -1
  51. package/dist/esm/cat-alert_21.entry.js +63 -23
  52. package/dist/esm/cat-alert_21.entry.js.map +1 -1
  53. package/dist/esm/cat-textarea.entry.js +1 -1
  54. package/dist/esm/cat-textarea.entry.js.map +1 -1
  55. package/dist/esm/catalyst.js +1 -1
  56. package/dist/esm/loader.js +1 -1
  57. package/dist/types/components/cat-radio-group/cat-radio-group.d.ts +5 -0
  58. package/dist/types/components/cat-select/cat-select.d.ts +9 -0
  59. package/dist/types/components.d.ts +8 -0
  60. package/dist/types/index.d.ts +1 -1
  61. package/package.json +2 -2
  62. package/dist/catalyst/p-aa382647.entry.js.map +0 -1
  63. package/dist/catalyst/p-c0b4200d.entry.js +0 -2
@@ -1,2 +0,0 @@
1
- import{r as t,c as n,h as e,H as i,g as o}from"./p-659073b5.js";import{l as r}from"./p-2ad6f8d8.js";import{C as a}from"./p-6fce43dd.js";var s,l,h="function"==typeof Map?new Map:(s=[],l=[],{has:function(t){return s.indexOf(t)>-1},get:function(t){return l[s.indexOf(t)]},set:function(t,n){-1===s.indexOf(t)&&(s.push(t),l.push(n))},delete:function(t){var n=s.indexOf(t);n>-1&&(s.splice(n,1),l.splice(n,1))}}),u=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(s){u=function(t){var n=document.createEvent("Event");return n.initEvent(t,!0,!1),n}}function c(t){var n=h.get(t);n&&n.destroy()}function d(t){var n=h.get(t);n&&n.update()}var p=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((p=function(t){return t}).destroy=function(t){return t},p.update=function(t){return t}):((p=function(t,n){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!h.has(t)){var n,e=null,i=null,o=null,r=function(){t.clientWidth!==i&&c()},a=function(n){window.removeEventListener("resize",r,!1),t.removeEventListener("input",c,!1),t.removeEventListener("keyup",c,!1),t.removeEventListener("autosize:destroy",a,!1),t.removeEventListener("autosize:update",c,!1),Object.keys(n).forEach((function(e){t.style[e]=n[e]})),h.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",a,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",c,!1),window.addEventListener("resize",r,!1),t.addEventListener("input",c,!1),t.addEventListener("autosize:update",c,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",h.set(t,{destroy:a,update:c}),"vertical"===(n=window.getComputedStyle(t,null)).resize?t.style.resize="none":"both"===n.resize&&(t.style.resize="horizontal"),e="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(e)&&(e=0),c()}function s(n){var e=t.style.width;t.style.width="0px",t.style.width=e,t.style.overflowY=n}function l(){if(0!==t.scrollHeight){var n=function(t){for(var n=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&n.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return n}(t),o=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+e+"px",i=t.clientWidth,n.forEach((function(t){t.node.scrollTop=t.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function c(){l();var n=Math.round(parseFloat(t.style.height)),e=window.getComputedStyle(t,null),i="content-box"===e.boxSizing?Math.round(parseFloat(e.height)):t.offsetHeight;if(i<n?"hidden"===e.overflowY&&(s("scroll"),l(),i="content-box"===e.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==e.overflowY&&(s("hidden"),l(),i="content-box"===e.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),o!==i){o=i;var r=u("autosize:resized");try{t.dispatchEvent(r)}catch(t){}}}}(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],c),t},p.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],d),t});var f=p;const m=".hint-section{display:flex;gap:0.5rem;flex-direction:column}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1rem;margin:0}:host{display:flex;flex-direction:column;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;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;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}textarea{margin:0;padding:0.625rem 0.75rem;min-height:2.5rem;font:inherit;background:white;border-radius:0.25rem;border:none;box-shadow:0 0 0 1px #d7dbe0;transition:box-shadow 0.13s linear}textarea:disabled{background:#f8f8fb;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135));resize:none}textarea:hover:not(:disabled){box-shadow:0 0 0 2px #d7dbe0}textarea:focus{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255))}textarea::placeholder{color:rgb(var(--cat-font-color-muted, 105, 118, 135))}";let b=0;const w=class{constructor(e){t(this,e);this.catChange=n(this,"catChange",7);this.catFocus=n(this,"catFocus",7);this.catBlur=n(this,"catBlur",7);this.id=`cat-textarea-${b++}`;this.hasSlottedLabel=false;this.disabled=false;this.label="";this.labelHidden=false;this.name="";this.readonly=false;this.required=false;this.rows=3}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');if(!this.label&&!this.hasSlottedLabel){r.error("[A11y] Missing ARIA label on textarea",this)}}componentDidLoad(){f(this.textarea)}async setFocus(t){this.textarea.focus(t)}render(){return e(i,null,(this.hasSlottedLabel||this.label)&&e("label",{htmlFor:this.id,class:{hidden:this.labelHidden}},e("span",{part:"label"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label,!this.required&&e("span",{class:"input-optional","aria-hidden":"true"},"(Optional)"))),e("textarea",{ref:t=>this.textarea=t,id:this.id,disabled:this.disabled,maxlength:this.maxLength,minlength:this.minLength,name:this.name,placeholder:this.placeholder,readonly:this.readonly,required:this.required,rows:this.rows,value:this.value,onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this)}),this.hintSection)}get hintSection(){const t=!!this.hostElement.querySelector('[slot="hint"]');return(this.hint||t)&&e(a,{hint:this.hint,slottedHint:t&&e("slot",{name:"hint"})})}onInput(t){this.value=this.textarea.value;this.catChange.emit(t)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}get hostElement(){return o(this)}};w.style=m;export{w as cat_textarea};
2
- //# sourceMappingURL=p-c0b4200d.entry.js.map