bromcom-ui-next 0.1.2 → 0.1.4

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 (209) hide show
  1. package/dist/bromcom-ui/bromcom-ui.css +1 -1
  2. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  3. package/dist/bromcom-ui/bromcom-ui.esm.js.map +1 -1
  4. package/dist/bromcom-ui/global/global.js +14 -15
  5. package/dist/bromcom-ui/p-04f6d730.entry.js +2 -0
  6. package/dist/bromcom-ui/p-04f6d730.entry.js.map +1 -0
  7. package/dist/bromcom-ui/{p-b36f4f44.js → p-12360e4c.js} +1 -1
  8. package/dist/bromcom-ui/p-15fe392b.js +3 -0
  9. package/dist/bromcom-ui/p-15fe392b.js.map +1 -0
  10. package/dist/bromcom-ui/p-1b11150b.entry.js +2 -0
  11. package/dist/bromcom-ui/p-1b11150b.entry.js.map +1 -0
  12. package/dist/bromcom-ui/p-1d86c1cf.entry.js +2 -0
  13. package/dist/bromcom-ui/p-1d86c1cf.entry.js.map +1 -0
  14. package/dist/bromcom-ui/p-31354aaa.js +2 -0
  15. package/dist/bromcom-ui/p-31354aaa.js.map +1 -0
  16. package/dist/bromcom-ui/p-3b607038.entry.js +2 -0
  17. package/dist/bromcom-ui/p-3b607038.entry.js.map +1 -0
  18. package/dist/bromcom-ui/p-5d0838e9.entry.js +2 -0
  19. package/dist/bromcom-ui/p-5d0838e9.entry.js.map +1 -0
  20. package/dist/bromcom-ui/p-729a870f.js +2 -0
  21. package/dist/bromcom-ui/p-729a870f.js.map +1 -0
  22. package/dist/bromcom-ui/p-a590f793.entry.js +2 -0
  23. package/dist/bromcom-ui/p-a590f793.entry.js.map +1 -0
  24. package/dist/bromcom-ui/p-cd437280.entry.js +2 -0
  25. package/dist/bromcom-ui/p-cd437280.entry.js.map +1 -0
  26. package/dist/bromcom-ui/p-dcea8d62.entry.js +2 -0
  27. package/dist/bromcom-ui/{p-0a74cf15.entry.js.map → p-dcea8d62.entry.js.map} +1 -1
  28. package/dist/bromcom-ui/p-ebed10d5.entry.js +2 -0
  29. package/dist/bromcom-ui/{p-2d836917.entry.js.map → p-ebed10d5.entry.js.map} +1 -1
  30. package/dist/cjs/app-globals-29edfda4.js +39 -0
  31. package/dist/cjs/app-globals-29edfda4.js.map +1 -0
  32. package/dist/cjs/bcm-accordion-group.cjs.entry.js +92 -0
  33. package/dist/cjs/bcm-accordion-group.cjs.entry.js.map +1 -0
  34. package/dist/cjs/bcm-accordion.cjs.entry.js +128 -0
  35. package/dist/cjs/bcm-accordion.cjs.entry.js.map +1 -0
  36. package/dist/cjs/bcm-alert.cjs.entry.js +2 -2
  37. package/dist/cjs/bcm-alert.cjs.entry.js.map +1 -1
  38. package/dist/cjs/bcm-avatar_4.cjs.entry.js +577 -0
  39. package/dist/cjs/bcm-avatar_4.cjs.entry.js.map +1 -0
  40. package/dist/cjs/bcm-chip.cjs.entry.js +130 -0
  41. package/dist/cjs/bcm-chip.cjs.entry.js.map +1 -0
  42. package/dist/cjs/bcm-divider.cjs.entry.js +81 -0
  43. package/dist/cjs/bcm-divider.cjs.entry.js.map +1 -0
  44. package/dist/cjs/bcm-input.cjs.entry.js +313 -0
  45. package/dist/cjs/bcm-input.cjs.entry.js.map +1 -0
  46. package/dist/cjs/bcm-text.cjs.entry.js +4 -4
  47. package/dist/cjs/bcm-text.cjs.entry.js.map +1 -1
  48. package/dist/cjs/bcm-textarea.cjs.entry.js +316 -0
  49. package/dist/cjs/bcm-textarea.cjs.entry.js.map +1 -0
  50. package/dist/cjs/bromcom-ui.cjs.js +3 -3
  51. package/dist/cjs/{index-638f2d15.js → index-4795c073.js} +43 -5
  52. package/dist/cjs/index-4795c073.js.map +1 -0
  53. package/dist/{components/p-b36f4f44.js → cjs/index-5a88e57b.js} +5 -3
  54. package/dist/cjs/{index-a4eea4bb.js.map → index-5a88e57b.js.map} +1 -1
  55. package/dist/cjs/loader.cjs.js +3 -3
  56. package/dist/cjs/validation-messages-c36e5c31.js +134 -0
  57. package/dist/cjs/validation-messages-c36e5c31.js.map +1 -0
  58. package/dist/collection/collection-manifest.json +6 -1
  59. package/dist/collection/components/accordion/accordion.component.js +5 -5
  60. package/dist/collection/components/accordion/accordion.component.js.map +1 -1
  61. package/dist/collection/components/accordion/accordion.css +1 -1
  62. package/dist/collection/components/accordion-group/accordion-group.component.js +1 -1
  63. package/dist/collection/components/accordion-group/accordion-group.component.js.map +1 -1
  64. package/dist/collection/components/accordion-group/accordion-group.css +1 -1
  65. package/dist/collection/components/alert/alert.css +1 -1
  66. package/dist/collection/components/avatar/avatar.component.js.map +1 -1
  67. package/dist/collection/components/avatar/avatar.css +1 -1
  68. package/dist/collection/components/badge/badge.component.js +373 -0
  69. package/dist/collection/components/badge/badge.component.js.map +1 -0
  70. package/dist/collection/components/badge/badge.css +1 -0
  71. package/dist/collection/components/basic-badge/basic-badge.component.js +236 -0
  72. package/dist/collection/components/basic-badge/basic-badge.component.js.map +1 -0
  73. package/dist/collection/components/basic-badge/basic-badge.css +1 -0
  74. package/dist/collection/components/button/button.component.js +3 -3
  75. package/dist/collection/components/button/button.component.js.map +1 -1
  76. package/dist/collection/components/button/button.css +1 -1
  77. package/dist/collection/components/chip/chip.component.js +2 -2
  78. package/dist/collection/components/chip/chip.component.js.map +1 -1
  79. package/dist/collection/components/chip/chip.css +1 -1
  80. package/dist/collection/components/divider/divider.component.js +190 -0
  81. package/dist/collection/components/divider/divider.component.js.map +1 -0
  82. package/dist/collection/components/divider/divider.css +1 -0
  83. package/dist/collection/components/input/input.component.js +1050 -0
  84. package/dist/collection/components/input/input.component.js.map +1 -0
  85. package/dist/collection/components/input/input.css +2 -0
  86. package/dist/collection/components/input/types.js +11 -0
  87. package/dist/collection/components/input/types.js.map +1 -0
  88. package/dist/collection/components/text/text.component.js +1 -1
  89. package/dist/collection/components/text/text.css +1 -1
  90. package/dist/collection/components/textarea/textarea.component.js +1013 -0
  91. package/dist/collection/components/textarea/textarea.component.js.map +1 -0
  92. package/dist/collection/components/textarea/textarea.css +2 -0
  93. package/dist/collection/components/textarea/types.js +2 -0
  94. package/dist/collection/components/textarea/types.js.map +1 -0
  95. package/dist/collection/global/global.js +14 -15
  96. package/dist/collection/utils/i18n.js +29 -0
  97. package/dist/collection/utils/i18n.js.map +1 -0
  98. package/dist/collection/utils/id/generate-id.js +16 -0
  99. package/dist/collection/utils/id/generate-id.js.map +1 -0
  100. package/dist/collection/utils/slot/check-slot-content.js +15 -0
  101. package/dist/collection/utils/slot/check-slot-content.js.map +1 -0
  102. package/dist/collection/utils/validation-messages.js +17 -0
  103. package/dist/collection/utils/validation-messages.js.map +1 -0
  104. package/dist/components/bcm-accordion-group.js +3 -3
  105. package/dist/components/bcm-accordion-group.js.map +1 -1
  106. package/dist/components/bcm-accordion.js +7 -7
  107. package/dist/components/bcm-accordion.js.map +1 -1
  108. package/dist/components/bcm-alert.js +2 -2
  109. package/dist/components/bcm-alert.js.map +1 -1
  110. package/dist/components/bcm-avatar.js +13 -7
  111. package/dist/components/bcm-avatar.js.map +1 -1
  112. package/dist/components/bcm-badge.d.ts +11 -0
  113. package/dist/components/bcm-badge.js +8 -0
  114. package/dist/components/bcm-badge.js.map +1 -0
  115. package/dist/components/bcm-basic-badge.d.ts +11 -0
  116. package/dist/components/bcm-basic-badge.js +113 -0
  117. package/dist/components/bcm-basic-badge.js.map +1 -0
  118. package/dist/components/bcm-button.js +5 -5
  119. package/dist/components/bcm-button.js.map +1 -1
  120. package/dist/components/bcm-chip.js +4 -4
  121. package/dist/components/bcm-chip.js.map +1 -1
  122. package/dist/components/bcm-divider.d.ts +11 -0
  123. package/dist/components/bcm-divider.js +100 -0
  124. package/dist/components/bcm-divider.js.map +1 -0
  125. package/dist/components/bcm-input.d.ts +11 -0
  126. package/dist/components/bcm-input.js +369 -0
  127. package/dist/components/bcm-input.js.map +1 -0
  128. package/dist/components/bcm-text.js +4 -4
  129. package/dist/components/bcm-text.js.map +1 -1
  130. package/dist/components/bcm-textarea.d.ts +11 -0
  131. package/dist/components/bcm-textarea.js +369 -0
  132. package/dist/components/bcm-textarea.js.map +1 -0
  133. package/dist/components/index.js +12 -16
  134. package/dist/components/index.js.map +1 -1
  135. package/dist/{esm/index-f0e9d579.js → components/p-12360e4c.js} +3 -3
  136. package/dist/components/{p-b36f4f44.js.map → p-12360e4c.js.map} +1 -1
  137. package/dist/components/{p-0adcc84f.js → p-13582168.js} +34 -3
  138. package/dist/components/p-13582168.js.map +1 -0
  139. package/dist/components/p-31354aaa.js +129 -0
  140. package/dist/components/p-31354aaa.js.map +1 -0
  141. package/dist/components/p-39637e05.js +145 -0
  142. package/dist/components/p-39637e05.js.map +1 -0
  143. package/dist/esm/app-globals-bfa07b76.js +37 -0
  144. package/dist/esm/app-globals-bfa07b76.js.map +1 -0
  145. package/dist/esm/bcm-accordion-group.entry.js +88 -0
  146. package/dist/esm/bcm-accordion-group.entry.js.map +1 -0
  147. package/dist/esm/bcm-accordion.entry.js +124 -0
  148. package/dist/esm/bcm-accordion.entry.js.map +1 -0
  149. package/dist/esm/bcm-alert.entry.js +2 -2
  150. package/dist/esm/bcm-alert.entry.js.map +1 -1
  151. package/dist/esm/bcm-avatar_4.entry.js +570 -0
  152. package/dist/esm/bcm-avatar_4.entry.js.map +1 -0
  153. package/dist/esm/bcm-chip.entry.js +126 -0
  154. package/dist/esm/bcm-chip.entry.js.map +1 -0
  155. package/dist/esm/bcm-divider.entry.js +77 -0
  156. package/dist/esm/bcm-divider.entry.js.map +1 -0
  157. package/dist/esm/bcm-input.entry.js +309 -0
  158. package/dist/esm/bcm-input.entry.js.map +1 -0
  159. package/dist/esm/bcm-text.entry.js +4 -4
  160. package/dist/esm/bcm-text.entry.js.map +1 -1
  161. package/dist/esm/bcm-textarea.entry.js +312 -0
  162. package/dist/esm/bcm-textarea.entry.js.map +1 -0
  163. package/dist/esm/bromcom-ui.js +4 -4
  164. package/dist/{cjs/index-a4eea4bb.js → esm/index-097075ad.js} +3 -5
  165. package/dist/esm/{index-f0e9d579.js.map → index-097075ad.js.map} +1 -1
  166. package/dist/esm/{index-ce2fac11.js → index-27cc1bac.js} +43 -5
  167. package/dist/esm/index-27cc1bac.js.map +1 -0
  168. package/dist/esm/loader.js +4 -4
  169. package/dist/esm/validation-messages-a29d53be.js +129 -0
  170. package/dist/esm/validation-messages-a29d53be.js.map +1 -0
  171. package/dist/types/components/badge/badge.component.d.ts +87 -0
  172. package/dist/types/components/basic-badge/basic-badge.component.d.ts +54 -0
  173. package/dist/types/components/divider/divider.component.d.ts +40 -0
  174. package/dist/types/components/input/input.component.d.ts +93 -0
  175. package/dist/types/components/input/types.d.ts +13 -0
  176. package/dist/types/components/textarea/textarea.component.d.ts +85 -0
  177. package/dist/types/components/textarea/types.d.ts +7 -0
  178. package/dist/types/components.d.ts +889 -0
  179. package/dist/types/utils/i18n.d.ts +8 -0
  180. package/dist/types/utils/id/generate-id.d.ts +9 -0
  181. package/dist/types/utils/slot/check-slot-content.d.ts +7 -0
  182. package/dist/types/utils/validation-messages.d.ts +11 -0
  183. package/package.json +3 -2
  184. package/dist/bromcom-ui/p-0a74cf15.entry.js +0 -2
  185. package/dist/bromcom-ui/p-27c997d8.js +0 -3
  186. package/dist/bromcom-ui/p-27c997d8.js.map +0 -1
  187. package/dist/bromcom-ui/p-2d836917.entry.js +0 -2
  188. package/dist/bromcom-ui/p-40643b53.js +0 -2
  189. package/dist/bromcom-ui/p-40643b53.js.map +0 -1
  190. package/dist/bromcom-ui/p-84a5dcdb.entry.js +0 -2
  191. package/dist/bromcom-ui/p-84a5dcdb.entry.js.map +0 -1
  192. package/dist/bromcom-ui/p-f0c61f8c.entry.js +0 -2
  193. package/dist/bromcom-ui/p-f0c61f8c.entry.js.map +0 -1
  194. package/dist/cjs/app-globals-e8faea0d.js +0 -43
  195. package/dist/cjs/app-globals-e8faea0d.js.map +0 -1
  196. package/dist/cjs/bcm-accordion_4.cjs.entry.js +0 -623
  197. package/dist/cjs/bcm-accordion_4.cjs.entry.js.map +0 -1
  198. package/dist/cjs/bcm-avatar.cjs.entry.js +0 -89
  199. package/dist/cjs/bcm-avatar.cjs.entry.js.map +0 -1
  200. package/dist/cjs/index-638f2d15.js.map +0 -1
  201. package/dist/components/p-0adcc84f.js.map +0 -1
  202. package/dist/esm/app-globals-f781c325.js +0 -41
  203. package/dist/esm/app-globals-f781c325.js.map +0 -1
  204. package/dist/esm/bcm-accordion_4.entry.js +0 -616
  205. package/dist/esm/bcm-accordion_4.entry.js.map +0 -1
  206. package/dist/esm/bcm-avatar.entry.js +0 -85
  207. package/dist/esm/bcm-avatar.entry.js.map +0 -1
  208. package/dist/esm/index-ce2fac11.js.map +0 -1
  209. /package/dist/bromcom-ui/{p-b36f4f44.js.map → p-12360e4c.js.map} +0 -0
@@ -0,0 +1,369 @@
1
+ import { p as proxyCustomElement, H, c as createEvent, h } from './p-13582168.js';
2
+ import { c as ce } from './p-5fcf77f9.js';
3
+ import { c as classNames } from './p-12360e4c.js';
4
+ import { g as generateId, s as setValidationMessages, a as getValidationMessage, d as defaultValidationMessages } from './p-31354aaa.js';
5
+
6
+ const textareaCss = ".visible{visibility:visible}.collapse{visibility:collapse}.relative{position:relative}.block{display:block}.flex{display:flex}.table{display:table}.contents{display:contents}.hidden{display:none}.border-collapse{border-collapse:collapse}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize-none{resize:none;resize:none!important}.resize-y{resize:vertical;resize:vertical!important}.resize-x{resize:horizontal;resize:horizontal!important}.resize{resize:both!important;resize:both}.border{border-width:1px}.underline{text-decoration-line:underline}.outline{outline-style:solid}/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid oklch(.928 .006 264.531);box-sizing:border-box}:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:Inter,sans-serif;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:oklch(.707 .022 261.325);opacity:1}input::placeholder,textarea::placeholder{color:oklch(.707 .022 261.325);opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:host{display:block;width:100%}.bcm-textarea__container{display:flex;flex-direction:column;width:100%}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.static{position:static}.mt-1{margin-top:.25rem}.min-h-0{min-height:0}.min-h-\\[3rem\\]{min-height:3rem}.min-h-\\[4rem\\]{min-height:4rem}.min-h-\\[5rem\\]{min-height:5rem}.w-full{width:100%}.grow{flex-grow:1}.cursor-not-allowed{cursor:not-allowed}.\\!resize-none{resize:none!important}.\\!resize-y{resize:vertical!important}.\\!resize-x{resize:horizontal!important}.\\!resize{resize:both!important}.appearance-none{appearance:none}.flex-col{flex-direction:column}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.border-0{border-width:0}.border-solid{border-style:solid}.border-\\[--bcm-ui-color-border-default\\]{border-color:var(--bcm-ui-color-border-default)}.border-\\[--bcm-ui-color-border-error\\]{border-color:var(--bcm-ui-color-border-error)}.border-\\[--bcm-ui-color-border-info\\]{border-color:var(--bcm-ui-color-border-info)}.border-\\[--bcm-ui-color-border-success\\]{border-color:var(--bcm-ui-color-border-success)}.border-\\[--bcm-ui-color-border-warning\\]{border-color:var(--bcm-ui-color-border-warning)}.bg-\\[--bcm-ui-color-background-base-default\\]{background-color:var(--bcm-ui-color-background-base-default)}.bg-transparent{background-color:transparent}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.text-right{text-align:right}.font-sans{font-family:Inter,sans-serif}.text-size-3{font-size:var(--bcm-ui-font-size-3,12px);line-height:var(--bcm-ui-line-height-3,16px)}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.text-size-6{font-size:var(--bcm-ui-font-size-6,18px);line-height:var(--bcm-ui-line-height-6,24px)}.font-medium{font-weight:500}.text-\\[--bcm-ui-color-text-caption\\]{color:var(--bcm-ui-color-text-caption)}.text-\\[--bcm-ui-color-text-default\\]{color:var(--bcm-ui-color-text-default)}.text-\\[--bcm-ui-color-text-disabled\\]{color:var(--bcm-ui-color-text-disabled)}.text-\\[--bcm-ui-color-text-error\\]{color:var(--bcm-ui-color-text-error)}.text-\\[--bcm-ui-color-text-info\\]{color:var(--bcm-ui-color-text-info)}.text-\\[--bcm-ui-color-text-placeholder\\]{color:var(--bcm-ui-color-text-placeholder)}.text-\\[--bcm-ui-color-text-success\\]{color:var(--bcm-ui-color-text-success)}.text-\\[--bcm-ui-color-text-warning\\]{color:var(--bcm-ui-color-text-warning)}.text-color-disabled{color:var(--bcm-ui-color-text-disabled)}.text-color-label{color:var(--bcm-ui-color-text-label)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-50{opacity:.5}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-0{outline-width:0}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-\\[--bcm-ui-color-border-primary\\]{--tw-ring-color:var(--bcm-ui-color-border-primary)}.ring-opacity-50{--tw-ring-opacity:0.5}.blur{--tw-blur:blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.placeholder\\:font-normal::placeholder{font-weight:400}.placeholder\\:text-\\[--bcm-ui-color-text-placeholder\\]::placeholder{color:var(--bcm-ui-color-text-placeholder)}.hover\\:border-\\[--bcm-ui-color-border-error\\]:hover{border-color:var(--bcm-ui-color-border-error)}.hover\\:border-\\[--bcm-ui-color-border-info\\]:hover{border-color:var(--bcm-ui-color-border-info)}.hover\\:border-\\[--bcm-ui-color-border-primary\\]:hover{border-color:var(--bcm-ui-color-border-primary)}.hover\\:border-\\[--bcm-ui-color-border-success\\]:hover{border-color:var(--bcm-ui-color-border-success)}.hover\\:border-\\[--bcm-ui-color-border-warning\\]:hover{border-color:var(--bcm-ui-color-border-warning)}.has-\\[\\:focus\\]\\:border-\\[--bcm-ui-color-border-error\\]:has(:focus){border-color:var(--bcm-ui-color-border-error)}.has-\\[\\:focus\\]\\:border-\\[--bcm-ui-color-border-info\\]:has(:focus){border-color:var(--bcm-ui-color-border-info)}.has-\\[\\:focus\\]\\:border-\\[--bcm-ui-color-border-primary\\]:has(:focus){border-color:var(--bcm-ui-color-border-primary)}.has-\\[\\:focus\\]\\:border-\\[--bcm-ui-color-border-success\\]:has(:focus){border-color:var(--bcm-ui-color-border-success)}.has-\\[\\:focus\\]\\:border-\\[--bcm-ui-color-border-warning\\]:has(:focus){border-color:var(--bcm-ui-color-border-warning)}";
7
+ const BcmTextareaStyle0 = textareaCss;
8
+
9
+ const BcmTextarea$1 = /*@__PURE__*/ proxyCustomElement(class BcmTextarea extends H {
10
+ constructor() {
11
+ super();
12
+ this.__registerHost();
13
+ this.__attachShadow();
14
+ this.bcmInput = createEvent(this, "bcmInput", 1);
15
+ this.bcmChange = createEvent(this, "bcmChange", 1);
16
+ this.bcmFocus = createEvent(this, "bcmFocus", 1);
17
+ this.bcmBlur = createEvent(this, "bcmBlur", 1);
18
+ this.bcmKeyDown = createEvent(this, "bcmKeyDown", 1);
19
+ this.bcmKeyUp = createEvent(this, "bcmKeyUp", 1);
20
+ this.isFocused = false;
21
+ this.isValid = true;
22
+ this.internalStatus = 'default';
23
+ /** Textarea value */
24
+ this.value = '';
25
+ /** Textarea rows */
26
+ this.rows = 3;
27
+ /** Resize behavior */
28
+ this.resize = 'none';
29
+ /** Auto grow height based on content */
30
+ this.autoGrow = false;
31
+ /** Input id */
32
+ this._id = generateId('textarea');
33
+ /** Controls the textarea size */
34
+ this.size = 'medium';
35
+ /** Defines the textarea's status/state */
36
+ this.status = 'default';
37
+ /** Full width textarea */
38
+ this.fullWidth = false;
39
+ /** Whether the textarea is disabled */
40
+ this.disabled = false;
41
+ /** Whether the textarea is readonly */
42
+ this.readonly = false;
43
+ /** Whether the textarea is required */
44
+ this.required = false;
45
+ /** Show character counter */
46
+ this.showCounter = true;
47
+ this.onChange = (event) => {
48
+ this.bcmChange.emit(event);
49
+ };
50
+ this.onFocus = (event) => {
51
+ this.isFocused = true;
52
+ this.bcmFocus.emit(event);
53
+ };
54
+ this.onBlur = (event) => {
55
+ this.isFocused = false;
56
+ this.bcmBlur.emit(event);
57
+ this.validateInput();
58
+ };
59
+ this.onKeyDown = (event) => {
60
+ this.bcmKeyDown.emit(event);
61
+ };
62
+ this.onKeyUp = (event) => {
63
+ this.bcmKeyUp.emit(event);
64
+ };
65
+ this.styleClass = ce({
66
+ slots: {
67
+ base: [
68
+ 'bcm-textarea bcm-textarea__container',
69
+ 'bg-[--bcm-ui-color-background-base-default]',
70
+ 'border border-solid rounded',
71
+ 'flex flex-col', // flex-col ekledik
72
+ 'transition-colors duration-200',
73
+ 'px-2 py-2',
74
+ 'w-full', // w-full ekledik
75
+ ],
76
+ textareaClass: [
77
+ 'textarea',
78
+ 'w-full',
79
+ 'border-0 outline-0 bg-transparent',
80
+ 'appearance-none',
81
+ 'text-[--bcm-ui-color-text-default] placeholder:text-[--bcm-ui-color-text-placeholder] placeholder:font-normal',
82
+ 'font-sans antialiased font-medium',
83
+ 'px-1',
84
+ 'overflow-y-auto', // overflow-y-auto ekledik
85
+ 'min-h-0', // min-h-0 ekledik
86
+ ],
87
+ counterText: ['textarea-counter-text', 'text-[--bcm-ui-color-text-placeholder]', 'text-right', 'mt-1'],
88
+ },
89
+ variants: {
90
+ size: {
91
+ small: {
92
+ base: '',
93
+ textareaClass: 'text-size-4 min-h-[3rem]',
94
+ counterText: 'text-size-3',
95
+ },
96
+ medium: {
97
+ base: '',
98
+ textareaClass: 'text-size-5 min-h-[4rem]',
99
+ counterText: 'text-size-4',
100
+ },
101
+ large: {
102
+ base: '',
103
+ textareaClass: 'text-size-6 min-h-[5rem]',
104
+ counterText: 'text-size-5',
105
+ },
106
+ },
107
+ resize: {
108
+ none: { textareaClass: '!resize-none' },
109
+ both: { textareaClass: '!resize' },
110
+ horizontal: { textareaClass: '!resize-x' },
111
+ vertical: { textareaClass: '!resize-y' },
112
+ },
113
+ status: {
114
+ default: {
115
+ base: ['border-[--bcm-ui-color-border-default]', 'hover:border-[--bcm-ui-color-border-primary]', 'has-[:focus]:border-[--bcm-ui-color-border-primary]'],
116
+ },
117
+ error: {
118
+ base: ['border-[--bcm-ui-color-border-error]', 'hover:border-[--bcm-ui-color-border-error]', 'has-[:focus]:border-[--bcm-ui-color-border-error]'],
119
+ },
120
+ success: {
121
+ base: ['border-[--bcm-ui-color-border-success]', 'hover:border-[--bcm-ui-color-border-success]', 'has-[:focus]:border-[--bcm-ui-color-border-success]'],
122
+ },
123
+ warning: {
124
+ base: ['border-[--bcm-ui-color-border-warning]', 'hover:border-[--bcm-ui-color-border-warning]', 'has-[:focus]:border-[--bcm-ui-color-border-warning]'],
125
+ },
126
+ info: {
127
+ base: ['border-[--bcm-ui-color-border-info]', 'hover:border-[--bcm-ui-color-border-info]', 'has-[:focus]:border-[--bcm-ui-color-border-info]'],
128
+ },
129
+ },
130
+ fullWidth: {
131
+ true: 'full-width w-full',
132
+ },
133
+ disabled: {
134
+ true: {
135
+ base: 'disabled cursor-not-allowed opacity-50',
136
+ textareaClass: '!resize-none', // disabled durumunda resize'ı engelle
137
+ },
138
+ false: '',
139
+ },
140
+ focused: {
141
+ true: {
142
+ base: 'ring-2 ring-[--bcm-ui-color-border-primary] ring-opacity-50',
143
+ },
144
+ false: '',
145
+ },
146
+ },
147
+ defaultVariants: {
148
+ size: 'medium',
149
+ status: 'default',
150
+ resize: 'vertical',
151
+ fullWidth: false,
152
+ disabled: false,
153
+ focused: false,
154
+ },
155
+ }, {
156
+ twMerge: false,
157
+ });
158
+ }
159
+ handleValueChange(newValue) {
160
+ if (this.textareaRef) {
161
+ this.textareaRef.value = newValue;
162
+ if (this.autoGrow) {
163
+ this.adjustHeight();
164
+ }
165
+ }
166
+ }
167
+ watchStatus(newValue) {
168
+ this.internalStatus = newValue;
169
+ }
170
+ watchErrorMessage(newValue) {
171
+ this.internalErrorMessage = newValue;
172
+ }
173
+ componentWillLoad() {
174
+ setValidationMessages('en', defaultValidationMessages);
175
+ this.internalStatus = this.status;
176
+ this.internalErrorMessage = this.errorMessage;
177
+ }
178
+ componentDidLoad() {
179
+ var _a;
180
+ if (this.autoGrow) {
181
+ this.adjustHeight();
182
+ // Input event'ini dinle
183
+ (_a = this.textareaRef) === null || _a === void 0 ? void 0 : _a.addEventListener('input', () => this.adjustHeight());
184
+ }
185
+ }
186
+ disconnectedCallback() {
187
+ // Event listener'ı temizle
188
+ if (this.autoGrow && this.textareaRef) {
189
+ this.textareaRef.removeEventListener('input', () => this.adjustHeight());
190
+ }
191
+ }
192
+ async setFocus() {
193
+ var _a;
194
+ (_a = this.textareaRef) === null || _a === void 0 ? void 0 : _a.focus();
195
+ }
196
+ async setBlur() {
197
+ var _a;
198
+ (_a = this.textareaRef) === null || _a === void 0 ? void 0 : _a.blur();
199
+ }
200
+ async select() {
201
+ var _a;
202
+ (_a = this.textareaRef) === null || _a === void 0 ? void 0 : _a.select();
203
+ }
204
+ adjustHeight() {
205
+ if (!this.autoGrow || !this.textareaRef)
206
+ return;
207
+ requestAnimationFrame(() => {
208
+ // Önce height'ı sıfırla ki scrollHeight doğru hesaplansın
209
+ this.textareaRef.style.height = '0px';
210
+ const computedStyle = getComputedStyle(this.textareaRef);
211
+ const lineHeight = parseInt(computedStyle.lineHeight);
212
+ const paddingTop = parseInt(computedStyle.paddingTop);
213
+ const paddingBottom = parseInt(computedStyle.paddingBottom);
214
+ const scrollHeight = this.textareaRef.scrollHeight;
215
+ let newHeight = scrollHeight;
216
+ // Min/max kontrolleri
217
+ if (this.minRows) {
218
+ const minHeight = this.minRows * lineHeight + paddingTop + paddingBottom;
219
+ newHeight = Math.max(newHeight, minHeight);
220
+ }
221
+ if (this.maxRows) {
222
+ const maxHeight = this.maxRows * lineHeight + paddingTop + paddingBottom;
223
+ newHeight = Math.min(newHeight, maxHeight);
224
+ }
225
+ this.textareaRef.style.height = `${newHeight}px`;
226
+ });
227
+ }
228
+ validateInput() {
229
+ if (!this.textareaRef)
230
+ return;
231
+ // Reset validation state
232
+ this.isValid = true;
233
+ this.validationMessage = '';
234
+ const value = this.textareaRef.value;
235
+ // Required check
236
+ if (this.required && !value) {
237
+ this.isValid = false;
238
+ this.validationMessage = getValidationMessage('required');
239
+ this.internalStatus = 'error';
240
+ this.internalErrorMessage = this.validationMessage;
241
+ return;
242
+ }
243
+ // Minimum length check
244
+ if (this.minLength && value.length < this.minLength) {
245
+ this.isValid = false;
246
+ this.validationMessage = getValidationMessage('minlength', { min: this.minLength });
247
+ }
248
+ // Maximum length check
249
+ else if (this.maxLength && value.length > this.maxLength) {
250
+ this.isValid = false;
251
+ this.validationMessage = getValidationMessage('maxlength', { max: this.maxLength });
252
+ }
253
+ // Custom validator
254
+ if (this.validator) {
255
+ const customError = this.validator(value);
256
+ if (customError) {
257
+ this.isValid = false;
258
+ this.validationMessage = customError;
259
+ }
260
+ }
261
+ // Update component state
262
+ this.internalStatus = this.isValid ? 'default' : 'error';
263
+ this.internalErrorMessage = this.validationMessage;
264
+ }
265
+ render() {
266
+ const textareaId = this._id + '-textarea' || this.name;
267
+ const { base, textareaClass, counterText } = this.styleClass({
268
+ size: this.size,
269
+ status: this.internalStatus,
270
+ resize: this.resize,
271
+ fullWidth: this.fullWidth,
272
+ disabled: this.disabled,
273
+ focused: this.isFocused,
274
+ });
275
+ return (h("div", { key: '3b518823eafee23f5efb8fecdd1869cb0625f712', class: "bcm-ui-element" }, this.label && (h("label", { key: '17851980564ab95c9a1ac30fa494c3b4ef50f75b', class: classNames('textarea-label font-medium', {
276
+ 'text-color-label': !this.disabled,
277
+ 'text-color-disabled': this.disabled,
278
+ }, {
279
+ 'text-size-3': this.size === 'small',
280
+ 'text-size-4': this.size === 'medium',
281
+ 'text-size-5': this.size === 'large',
282
+ }), htmlFor: textareaId }, h("slot", { key: '3a0c9c5d95ac3389f3d48d41577b88ee21dfb940', name: "label" }, this.label), this.required && h("span", { key: 'fd499a157c4ff22f17feaabcbe7c5a2d2d75e35b' }, "*"))), h("div", { key: '625e4a27c30495aaf39259e8ac68bc1d819fd506', class: base() }, h("textarea", { key: 'be30548713a724d4f535885c7b6838fb056d0b3d', ref: el => (this.textareaRef = el), id: textareaId, class: textareaClass(), name: this.name, rows: this.rows, cols: this.cols, disabled: this.disabled, readonly: this.readonly, required: this.required, placeholder: this.placeholder, minLength: this.minLength, maxLength: this.maxLength, "aria-invalid": this.status === 'error', "aria-required": this.required, "aria-labelledby": this.labelledby, "aria-describedby": this.describedby, value: this.value, onInput: event => {
283
+ const target = event.target;
284
+ this.value = target.value;
285
+ this.bcmInput.emit(event);
286
+ this.validateInput();
287
+ if (this.autoGrow) {
288
+ this.adjustHeight();
289
+ }
290
+ }, onChange: this.onChange, onFocus: this.onFocus, onBlur: this.onBlur, onKeyDown: this.onKeyDown, onKeyUp: this.onKeyUp }), this.showCounter && (h("div", { key: '1ebabb979efac47054160558fab66d4fccc603f9', class: counterText() }, this.value.length, this.maxLength ? `/${this.maxLength}` : ''))), (this.captionText || this.internalErrorMessage || this.validationMessage) && (h("div", { key: '1c7f59c0d4337c7c359dc9aea3e332e5715bf80d', class: classNames('textarea-caption-text font-regular mt-1', {
291
+ 'text-[--bcm-ui-color-text-caption]': !this.disabled && this.internalStatus === 'default',
292
+ 'text-[--bcm-ui-color-text-error]': !this.disabled && (this.internalStatus === 'error' || !this.isValid),
293
+ 'text-[--bcm-ui-color-text-success]': !this.disabled && this.internalStatus === 'success',
294
+ 'text-[--bcm-ui-color-text-warning]': !this.disabled && this.internalStatus === 'warning',
295
+ 'text-[--bcm-ui-color-text-info]': !this.disabled && this.internalStatus === 'info',
296
+ 'text-[--bcm-ui-color-text-disabled]': this.disabled,
297
+ }, {
298
+ 'text-size-3': this.size === 'small',
299
+ 'text-size-4': this.size === 'medium',
300
+ 'text-size-5': this.size === 'large',
301
+ }) }, !this.isValid ? this.validationMessage : this.internalStatus === 'error' ? this.internalErrorMessage : this.captionText))));
302
+ }
303
+ get el() { return this; }
304
+ static get watchers() { return {
305
+ "value": ["handleValueChange"],
306
+ "status": ["watchStatus"],
307
+ "errorMessage": ["watchErrorMessage"]
308
+ }; }
309
+ static get style() { return BcmTextareaStyle0; }
310
+ }, [1, "bcm-textarea", {
311
+ "value": [1537],
312
+ "rows": [2],
313
+ "cols": [2],
314
+ "minRows": [2, "min-rows"],
315
+ "maxRows": [2, "max-rows"],
316
+ "resize": [1],
317
+ "autoGrow": [4, "auto-grow"],
318
+ "placeholder": [1],
319
+ "name": [1],
320
+ "_id": [513, "id"],
321
+ "size": [1],
322
+ "status": [1],
323
+ "fullWidth": [516, "full-width"],
324
+ "disabled": [4],
325
+ "readonly": [4],
326
+ "required": [4],
327
+ "minLength": [2, "min-length"],
328
+ "maxLength": [2, "max-length"],
329
+ "showCounter": [4, "show-counter"],
330
+ "label": [1],
331
+ "errorMessage": [1, "error-message"],
332
+ "captionText": [1, "caption-text"],
333
+ "labelledby": [1],
334
+ "describedby": [1],
335
+ "validator": [16],
336
+ "isFocused": [32],
337
+ "validationMessage": [32],
338
+ "isValid": [32],
339
+ "internalStatus": [32],
340
+ "internalErrorMessage": [32],
341
+ "setFocus": [64],
342
+ "setBlur": [64],
343
+ "select": [64]
344
+ }, undefined, {
345
+ "value": ["handleValueChange"],
346
+ "status": ["watchStatus"],
347
+ "errorMessage": ["watchErrorMessage"]
348
+ }]);
349
+ function defineCustomElement$1() {
350
+ if (typeof customElements === "undefined") {
351
+ return;
352
+ }
353
+ const components = ["bcm-textarea"];
354
+ components.forEach(tagName => { switch (tagName) {
355
+ case "bcm-textarea":
356
+ if (!customElements.get(tagName)) {
357
+ customElements.define(tagName, BcmTextarea$1);
358
+ }
359
+ break;
360
+ } });
361
+ }
362
+ defineCustomElement$1();
363
+
364
+ const BcmTextarea = BcmTextarea$1;
365
+ const defineCustomElement = defineCustomElement$1;
366
+
367
+ export { BcmTextarea, defineCustomElement };
368
+
369
+ //# sourceMappingURL=bcm-textarea.js.map
@@ -0,0 +1 @@
1
+ {"file":"bcm-textarea.js","mappings":";;;;;AAAA,MAAM,WAAW,GAAG,i4QAAi4Q,CAAC;AACt5Q,0BAAe,WAAW;;MCYbA,aAAW;IALxB;;;;;;;;;;QASW,cAAS,GAAG,KAAK,CAAC;QAElB,YAAO,GAAG,IAAI,CAAC;QACf,mBAAc,GAAgB,SAAS,CAAC;;QAKjD,UAAK,GAAW,EAAE,CAAC;;QAInB,SAAI,GAAY,CAAC,CAAC;;QAgBlB,WAAM,GAAmB,MAAM,CAAC;;QAIhC,aAAQ,GAAG,KAAK,CAAC;;QAYjB,QAAG,GAAY,UAAU,CAAC,UAAU,CAAC,CAAC;;QAItC,SAAI,GAAc,QAAQ,CAAC;;QAI3B,WAAM,GAAgB,SAAS,CAAC;;QAIhC,cAAS,GAAG,KAAK,CAAC;;QAIlB,aAAQ,GAAG,KAAK,CAAC;;QAIjB,aAAQ,GAAG,KAAK,CAAC;;QAIjB,aAAQ,GAAG,KAAK,CAAC;;QAYjB,gBAAW,GAAY,IAAI,CAAC;QAqM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yC,EACzC;gBACE,oCAAoC,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS;gBACzF,kCAAkC,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,cAAc,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;gBACxG,oCAAoC,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS;gBACzF,oCAAoC,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS;gBACzF,iCAAiC,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,KAAK,MAAM;gBACnF,qCAAqC,EAAE,IAAI,CAAC,QAAQ;aACrD,EACD;gBACE,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;gBACpC,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;gBACrC,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;aACrC,CACF,IAEA,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,cAAc,KAAK,OAAO,GAAG,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,WAAW,CACpH,CACP,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["BcmTextarea","tv"],"sources":["src/components/textarea/textarea.scss?tag=bcm-textarea&encapsulation=shadow","src/components/textarea/textarea.component.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n}\n\n.bcm-textarea {\n &__container {\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n}\n\n// Tailwind'in resize sınıflarını override et\n.resize-none {\n resize: none !important;\n}\n\n.resize {\n resize: both !important;\n}\n\n.resize-y {\n resize: vertical !important;\n}\n\n.resize-x {\n resize: horizontal !important;\n}\n","import { Component, Prop, h, Event, EventEmitter, Method, State, Watch, Element } from '@stencil/core';\nimport { InputSize, InputStatus, TextareaResize } from './types';\nimport { tv } from 'tailwind-variants';\nimport classNames from 'classnames';\nimport { generateId } from '../../utils/id/generate-id';\n// import { checkSlotContent } from '../../utils/slot/check-slot-content';\nimport { getValidationMessage, setValidationMessages, defaultValidationMessages } from '../../utils/validation-messages';\n\n@Component({\n tag: 'bcm-textarea',\n styleUrl: 'textarea.scss',\n shadow: true,\n})\nexport class BcmTextarea {\n @Element() el: HTMLElement;\n private textareaRef: HTMLTextAreaElement;\n\n @State() isFocused = false;\n @State() validationMessage: string;\n @State() isValid = true;\n @State() internalStatus: InputStatus = 'default';\n @State() internalErrorMessage: string;\n\n /** Textarea value */\n @Prop({ mutable: true, reflect: true })\n value: string = '';\n\n /** Textarea rows */\n @Prop()\n rows?: number = 3;\n\n /** Textarea cols */\n @Prop()\n cols?: number;\n\n /** Minimum height in rows */\n @Prop()\n minRows?: number;\n\n /** Maximum height in rows */\n @Prop()\n maxRows?: number;\n\n /** Resize behavior */\n @Prop()\n resize: TextareaResize = 'none';\n\n /** Auto grow height based on content */\n @Prop()\n autoGrow = false;\n\n /** Input placeholder text */\n @Prop()\n placeholder?: string;\n\n /** Input name */\n @Prop()\n name?: string;\n\n /** Input id */\n @Prop({ attribute: 'id', reflect: true })\n _id?: string = generateId('textarea');\n\n /** Controls the textarea size */\n @Prop()\n size: InputSize = 'medium';\n\n /** Defines the textarea's status/state */\n @Prop()\n status: InputStatus = 'default';\n\n /** Full width textarea */\n @Prop({ attribute: 'full-width', reflect: true })\n fullWidth = false;\n\n /** Whether the textarea is disabled */\n @Prop()\n disabled = false;\n\n /** Whether the textarea is readonly */\n @Prop()\n readonly = false;\n\n /** Whether the textarea is required */\n @Prop()\n required = false;\n\n /** Min length for text input */\n @Prop()\n minLength?: number;\n\n /** Max length for text input */\n @Prop()\n maxLength?: number;\n\n /** Show character counter */\n @Prop()\n showCounter: boolean = true;\n\n /** Textarea label for accessibility */\n @Prop()\n label?: string;\n\n /** Error message to display */\n @Prop()\n errorMessage?: string;\n\n /** Caption text to display below textarea */\n @Prop()\n captionText?: string;\n\n /** ID of associated label element */\n @Prop()\n labelledby?: string;\n\n /** ID of associated caption/error text element */\n @Prop()\n describedby?: string;\n\n /** Custom validation function */\n @Prop()\n validator?: (value: string) => string | undefined;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmInput: EventEmitter<InputEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmChange: EventEmitter<Event>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmFocus: EventEmitter<FocusEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmBlur: EventEmitter<FocusEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmKeyDown: EventEmitter<KeyboardEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmKeyUp: EventEmitter<KeyboardEvent>;\n\n @Watch('value')\n handleValueChange(newValue: string) {\n if (this.textareaRef) {\n this.textareaRef.value = newValue;\n if (this.autoGrow) {\n this.adjustHeight();\n }\n }\n }\n\n @Watch('status')\n watchStatus(newValue: InputStatus) {\n this.internalStatus = newValue;\n }\n\n @Watch('errorMessage')\n watchErrorMessage(newValue: string) {\n this.internalErrorMessage = newValue;\n }\n\n componentWillLoad() {\n setValidationMessages('en', defaultValidationMessages);\n this.internalStatus = this.status;\n this.internalErrorMessage = this.errorMessage;\n }\n\n componentDidLoad() {\n if (this.autoGrow) {\n this.adjustHeight();\n // Input event'ini dinle\n this.textareaRef?.addEventListener('input', () => this.adjustHeight());\n }\n }\n\n disconnectedCallback() {\n // Event listener'ı temizle\n if (this.autoGrow && this.textareaRef) {\n this.textareaRef.removeEventListener('input', () => this.adjustHeight());\n }\n }\n\n @Method()\n async setFocus() {\n this.textareaRef?.focus();\n }\n\n @Method()\n async setBlur() {\n this.textareaRef?.blur();\n }\n\n @Method()\n async select() {\n this.textareaRef?.select();\n }\n\n private adjustHeight() {\n if (!this.autoGrow || !this.textareaRef) return;\n\n requestAnimationFrame(() => {\n // Önce height'ı sıfırla ki scrollHeight doğru hesaplansın\n this.textareaRef.style.height = '0px';\n\n const computedStyle = getComputedStyle(this.textareaRef);\n const lineHeight = parseInt(computedStyle.lineHeight);\n const paddingTop = parseInt(computedStyle.paddingTop);\n const paddingBottom = parseInt(computedStyle.paddingBottom);\n const scrollHeight = this.textareaRef.scrollHeight;\n\n let newHeight = scrollHeight;\n\n // Min/max kontrolleri\n if (this.minRows) {\n const minHeight = this.minRows * lineHeight + paddingTop + paddingBottom;\n newHeight = Math.max(newHeight, minHeight);\n }\n\n if (this.maxRows) {\n const maxHeight = this.maxRows * lineHeight + paddingTop + paddingBottom;\n newHeight = Math.min(newHeight, maxHeight);\n }\n\n this.textareaRef.style.height = `${newHeight}px`;\n });\n }\n\n private validateInput(): void {\n if (!this.textareaRef) return;\n\n // Reset validation state\n this.isValid = true;\n this.validationMessage = '';\n\n const value = this.textareaRef.value;\n\n // Required check\n if (this.required && !value) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('required');\n this.internalStatus = 'error';\n this.internalErrorMessage = this.validationMessage;\n return;\n }\n\n // Minimum length check\n if (this.minLength && value.length < this.minLength) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('minlength', { min: this.minLength });\n }\n // Maximum length check\n else if (this.maxLength && value.length > this.maxLength) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('maxlength', { max: this.maxLength });\n }\n\n // Custom validator\n if (this.validator) {\n const customError = this.validator(value);\n if (customError) {\n this.isValid = false;\n this.validationMessage = customError;\n }\n }\n\n // Update component state\n this.internalStatus = this.isValid ? 'default' : 'error';\n this.internalErrorMessage = this.validationMessage;\n }\n\n private onChange = (event: Event) => {\n this.bcmChange.emit(event);\n };\n\n private onFocus = (event: FocusEvent) => {\n this.isFocused = true;\n this.bcmFocus.emit(event);\n };\n\n private onBlur = (event: FocusEvent) => {\n this.isFocused = false;\n this.bcmBlur.emit(event);\n this.validateInput();\n };\n\n private onKeyDown = (event: KeyboardEvent) => {\n this.bcmKeyDown.emit(event);\n };\n\n private onKeyUp = (event: KeyboardEvent) => {\n this.bcmKeyUp.emit(event);\n };\n\n private styleClass = tv(\n {\n slots: {\n base: [\n 'bcm-textarea bcm-textarea__container',\n 'bg-[--bcm-ui-color-background-base-default]',\n 'border border-solid rounded',\n 'flex flex-col', // flex-col ekledik\n 'transition-colors duration-200',\n 'px-2 py-2',\n 'w-full', // w-full ekledik\n ],\n textareaClass: [\n 'textarea',\n 'w-full',\n 'border-0 outline-0 bg-transparent',\n 'appearance-none',\n 'text-[--bcm-ui-color-text-default] placeholder:text-[--bcm-ui-color-text-placeholder] placeholder:font-normal',\n 'font-sans antialiased font-medium',\n 'px-1',\n 'overflow-y-auto', // overflow-y-auto ekledik\n 'min-h-0', // min-h-0 ekledik\n ],\n counterText: ['textarea-counter-text', 'text-[--bcm-ui-color-text-placeholder]', 'text-right', 'mt-1'],\n },\n variants: {\n size: {\n small: {\n base: '',\n textareaClass: 'text-size-4 min-h-[3rem]',\n counterText: 'text-size-3',\n },\n medium: {\n base: '',\n textareaClass: 'text-size-5 min-h-[4rem]',\n counterText: 'text-size-4',\n },\n large: {\n base: '',\n textareaClass: 'text-size-6 min-h-[5rem]',\n counterText: 'text-size-5',\n },\n },\n resize: {\n none: { textareaClass: '!resize-none' },\n both: { textareaClass: '!resize' },\n horizontal: { textareaClass: '!resize-x' },\n vertical: { textareaClass: '!resize-y' },\n },\n status: {\n default: {\n base: ['border-[--bcm-ui-color-border-default]', 'hover:border-[--bcm-ui-color-border-primary]', 'has-[:focus]:border-[--bcm-ui-color-border-primary]'],\n },\n error: {\n base: ['border-[--bcm-ui-color-border-error]', 'hover:border-[--bcm-ui-color-border-error]', 'has-[:focus]:border-[--bcm-ui-color-border-error]'],\n },\n success: {\n base: ['border-[--bcm-ui-color-border-success]', 'hover:border-[--bcm-ui-color-border-success]', 'has-[:focus]:border-[--bcm-ui-color-border-success]'],\n },\n warning: {\n base: ['border-[--bcm-ui-color-border-warning]', 'hover:border-[--bcm-ui-color-border-warning]', 'has-[:focus]:border-[--bcm-ui-color-border-warning]'],\n },\n info: {\n base: ['border-[--bcm-ui-color-border-info]', 'hover:border-[--bcm-ui-color-border-info]', 'has-[:focus]:border-[--bcm-ui-color-border-info]'],\n },\n },\n fullWidth: {\n true: 'full-width w-full',\n },\n disabled: {\n true: {\n base: 'disabled cursor-not-allowed opacity-50',\n textareaClass: '!resize-none', // disabled durumunda resize'ı engelle\n },\n false: '',\n },\n focused: {\n true: {\n base: 'ring-2 ring-[--bcm-ui-color-border-primary] ring-opacity-50',\n },\n false: '',\n },\n },\n defaultVariants: {\n size: 'medium',\n status: 'default',\n resize: 'vertical',\n fullWidth: false,\n disabled: false,\n focused: false,\n },\n },\n {\n twMerge: false,\n },\n );\n\n render() {\n const textareaId = this._id + '-textarea' || this.name;\n\n const { base, textareaClass, counterText } = this.styleClass({\n size: this.size,\n status: this.internalStatus,\n resize: this.resize,\n fullWidth: this.fullWidth,\n disabled: this.disabled,\n focused: this.isFocused,\n });\n\n return (\n <div class=\"bcm-ui-element\">\n {/* Label rendering */}\n {this.label && (\n <label\n class={classNames(\n 'textarea-label font-medium',\n {\n 'text-color-label': !this.disabled,\n 'text-color-disabled': this.disabled,\n },\n {\n 'text-size-3': this.size === 'small',\n 'text-size-4': this.size === 'medium',\n 'text-size-5': this.size === 'large',\n },\n )}\n htmlFor={textareaId}\n >\n <slot name=\"label\">{this.label}</slot>\n {this.required && <span>*</span>}\n </label>\n )}\n\n {/* Textarea container */}\n <div class={base()}>\n <textarea\n ref={el => (this.textareaRef = el)}\n id={textareaId}\n class={textareaClass()}\n name={this.name}\n rows={this.rows}\n cols={this.cols}\n disabled={this.disabled}\n readonly={this.readonly}\n required={this.required}\n placeholder={this.placeholder}\n minLength={this.minLength}\n maxLength={this.maxLength}\n aria-invalid={this.status === 'error'}\n aria-required={this.required}\n aria-labelledby={this.labelledby}\n aria-describedby={this.describedby}\n value={this.value}\n onInput={event => {\n const target = event.target as HTMLTextAreaElement;\n this.value = target.value;\n this.bcmInput.emit(event);\n this.validateInput();\n if (this.autoGrow) {\n this.adjustHeight();\n }\n }}\n onChange={this.onChange}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onKeyDown={this.onKeyDown}\n onKeyUp={this.onKeyUp}\n />\n {/* buraya isteğe bağlı olarak gözüken bir karakter sayacı ekleyeceğiz. bu sayaç sağa yaslı olacak şu formatta olacak 0/120 gibi 0 mevcut karakteri 120 ise limiti gösterecek */}\n {this.showCounter && (\n <div class={counterText()}>\n {this.value.length}\n {this.maxLength ? `/${this.maxLength}` : ''}\n </div>\n )}\n </div>\n\n {/* Validation/Caption message */}\n {(this.captionText || this.internalErrorMessage || this.validationMessage) && (\n <div\n class={classNames(\n 'textarea-caption-text font-regular mt-1',\n {\n 'text-[--bcm-ui-color-text-caption]': !this.disabled && this.internalStatus === 'default',\n 'text-[--bcm-ui-color-text-error]': !this.disabled && (this.internalStatus === 'error' || !this.isValid),\n 'text-[--bcm-ui-color-text-success]': !this.disabled && this.internalStatus === 'success',\n 'text-[--bcm-ui-color-text-warning]': !this.disabled && this.internalStatus === 'warning',\n 'text-[--bcm-ui-color-text-info]': !this.disabled && this.internalStatus === 'info',\n 'text-[--bcm-ui-color-text-disabled]': this.disabled,\n },\n {\n 'text-size-3': this.size === 'small',\n 'text-size-4': this.size === 'medium',\n 'text-size-5': this.size === 'large',\n },\n )}\n >\n {!this.isValid ? this.validationMessage : this.internalStatus === 'error' ? this.internalErrorMessage : this.captionText}\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
- export { g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-0adcc84f.js';
1
+ export { g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-13582168.js';
2
2
 
3
3
  function addHeadScript(obj) {
4
4
  const head = document.head;
@@ -10,28 +10,24 @@ function addHeadScript(obj) {
10
10
  }
11
11
  addHeadScript({ src: 'https://kit.fontawesome.com/5e86bea963.js', crossOrigin: 'anonymous' });
12
12
  const FA_GLOBAL_CSS = 'https://designsystem.bromcomcloud.com/fontawesome/6/css/all.min.css';
13
- let element = (tag, p = {}) => Object.assign(document.createElement(tag), p);
14
13
  customElements.define('bcm-icon', class extends HTMLElement {
15
14
  constructor() {
16
- let href = FA_GLOBAL_CSS;
17
- let linkFontAwesome = () => element('link', { rel: 'stylesheet', href });
18
- let hasFontAwesome = document.querySelector(`link[href="${href}"]`);
19
- if (!hasFontAwesome)
20
- document.head.append(linkFontAwesome());
21
- super().attachShadow({ mode: 'open' }).append(linkFontAwesome(), element('icon'));
22
- }
23
- connectedCallback() {
24
- this.style.display = 'inline-block';
25
- this.icon = this.icon;
26
- // this.onclick = evt => this.dispatchEvent(new CustomEvent('click', { bubbles: true, detail: evt }));
27
- //this.onmouseenter = evt => this.dispatchEvent(new CustomEvent('mouseenter', { bubbles: true, detail: evt }));
28
- //this.onmouseleave = evt => this.dispatchEvent(new CustomEvent('mouseleave', { bubbles: true, detail: evt }));
15
+ super();
16
+ const shadow = this.attachShadow({ mode: 'open' });
17
+ shadow.innerHTML = `
18
+ <link rel="stylesheet" href="${FA_GLOBAL_CSS}"/>
19
+ <i></i>
20
+ `;
29
21
  }
30
22
  get icon() {
31
23
  return this.getAttribute('name') || this.getAttribute('icon-name');
32
24
  }
33
25
  set icon(icon) {
34
- this.shadowRoot.querySelector('icon').innerHTML = `<i class="${icon}"></i>`;
26
+ this.shadowRoot.querySelector('i').className = `${icon}`;
27
+ }
28
+ connectedCallback() {
29
+ this.style.display = 'inline-block';
30
+ this.icon = this.icon;
35
31
  }
36
32
  });
37
33
 
@@ -1 +1 @@
1
- {"file":"index.js","mappings":";;AAAA,SAAS,aAAa,CAAC,GAAG,EAAE;AAC5B,IAAI,MAAM,IAAI,GAAG,QAAQ,CAAC;AAC1B,IAAI,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC;AAC1C,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG;AAChC,QAAQ,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;AAC1B;AACA,IAAI,IAAI,CAAC,WAAW,CAAC;AACrB;;AAEA,MAAM,aAAa,GAAG,qEAAqE,CAAC;;AAE5F,cAAc,CAAC,MAAM,CAAC,UAAU,EAAE,cAAc,WAAW,CAAC;;AAE5D,QAAQ,IAAI,IAAI,GAAG,aAAa,CAAC;;AAEjC,QAAQ,IAAI;AACZ,QAAQ,IAAI;AACZ,YAAY,QAAQ,CAAC,IAAI,CAAC;AAC1B,QAAQ,KAAK,EAAE,CAAC;AAChB,KAAK;AACL,IAAI,iBAAiB,GAAG;AACxB,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,cAAc,CAAC;AAC5C,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;AAC9B;AACA;AACA;AACA,KAAK;AACL,IAAI,IAAI,IAAI,GAAG;AACf,QAAQ,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;AAC3E,KAAK;AACL,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE;AACnB;AACA,KAAK;AACL,CAAC,CAAC","names":[],"sources":["src/global/global.js"],"sourcesContent":["function addHeadScript(obj) {\n const head = document.head;\n const script = document.createElement('script');\n Object.keys(obj).forEach(key => {\n script[key] = obj[key];\n });\n head.appendChild(script);\n}\n\naddHeadScript({ src: 'https://kit.fontawesome.com/5e86bea963.js', crossOrigin: 'anonymous' });\n\nconst FA_GLOBAL_CSS = 'https://designsystem.bromcomcloud.com/fontawesome/6/css/all.min.css';\n\nlet element = (tag, p = {}) => Object.assign(document.createElement(tag), p);\n\ncustomElements.define(\n 'bcm-icon',\n class extends HTMLElement {\n constructor() {\n let href = FA_GLOBAL_CSS;\n let linkFontAwesome = () => element('link', { rel: 'stylesheet', href });\n let hasFontAwesome = document.querySelector(`link[href=\"${href}\"]`);\n if (!hasFontAwesome) document.head.append(linkFontAwesome());\n super().attachShadow({ mode: 'open' }).append(linkFontAwesome(), element('icon'));\n }\n connectedCallback() {\n this.style.display = 'inline-block';\n this.icon = this.icon;\n // this.onclick = evt => this.dispatchEvent(new CustomEvent('click', { bubbles: true, detail: evt }));\n //this.onmouseenter = evt => this.dispatchEvent(new CustomEvent('mouseenter', { bubbles: true, detail: evt }));\n //this.onmouseleave = evt => this.dispatchEvent(new CustomEvent('mouseleave', { bubbles: true, detail: evt }));\n }\n get icon() {\n return this.getAttribute('name') || this.getAttribute('icon-name');\n }\n set icon(icon) {\n this.shadowRoot.querySelector('icon').innerHTML = `<i class=\"${icon}\"></i>`;\n }\n },\n);\n"],"version":3}
1
+ {"file":"index.js","mappings":";;AAAA,SAAS,aAAa,CAAC,GAAG,EAAE;AAC5B,IAAI,MAAM,IAAI,GAAG,QAAQ,CAAC;AAC1B,IAAI,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC;AAC1C,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG;AAChC,QAAQ,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;AAC1B;AACA,IAAI,IAAI,CAAC,WAAW,CAAC;AACrB;;AAEA,MAAM,aAAa,GAAG,qEAAqE,CAAC;;AAE5F,IAAI,WAAW,GAAG;;AAElB,QAAQ,MAAM,MAAM;AACpB,QAAQ;AACR;AACA;AACA,MAAM,CAAC,CAAC;AACR,KAAK;AACL,IAAI,IAAI,IAAI,GAAG;AACf,QAAQ,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC;AACjD,KAAK;AACL,IAAI;AACJ;;AAEA,IAAI;AACJ,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,cAAc,CAAC;AAC5C;;AAEA,CAAC,CAAC","names":[],"sources":["src/global/global.js"],"sourcesContent":["function addHeadScript(obj) {\n const head = document.head;\n const script = document.createElement('script');\n Object.keys(obj).forEach(key => {\n script[key] = obj[key];\n });\n head.appendChild(script);\n}\n\naddHeadScript({ src: 'https://kit.fontawesome.com/5e86bea963.js', crossOrigin: 'anonymous' });\n\nconst FA_GLOBAL_CSS = 'https://designsystem.bromcomcloud.com/fontawesome/6/css/all.min.css';\n\ncustomElements.define(\n 'bcm-icon',\n class extends HTMLElement {\n constructor() {\n super();\n const shadow = this.attachShadow({ mode: 'open' });\n shadow.innerHTML = `\n <link rel=\"stylesheet\" href=\"${FA_GLOBAL_CSS}\"/>\n <i></i>\n `;\n }\n\n get icon() {\n return this.getAttribute('name') || this.getAttribute('icon-name');\n }\n\n set icon(icon) {\n this.shadowRoot.querySelector('i').className = `${icon}`;\n }\n\n connectedCallback() {\n this.style.display = 'inline-block';\n this.icon = this.icon;\n }\n },\n);\n"],"version":3}
@@ -75,8 +75,8 @@ var classnames = {exports: {}};
75
75
  }());
76
76
  }(classnames));
77
77
 
78
- const cs = classnames.exports;
78
+ const classNames = classnames.exports;
79
79
 
80
- export { cs as c };
80
+ export { classNames as c };
81
81
 
82
- //# sourceMappingURL=index-f0e9d579.js.map
82
+ //# sourceMappingURL=p-12360e4c.js.map
@@ -1 +1 @@
1
- {"file":"p-b36f4f44.js","mappings":";;;;;;;;;AAKA;AACA;AACA,CAAC,YAAY;AAEb;AACA,CAAC,IAAI,MAAM,GAAG,EAAE,CAAC,cAAc,CAAC;AAChC;AACA,CAAC,SAAS,UAAU,IAAI;AACxB,EAAE,IAAI,OAAO,GAAG,EAAE,CAAC;AACnB;AACA,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AA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,CAAC,SAAS,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;AACxC,EAAE,IAAI,CAAC,QAAQ,EAAE;AACjB,GAAG,OAAO,KAAK,CAAC;AAChB,GAAG;AACH;AACA,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,OAAO,KAAK,GAAG,GAAG,GAAG,QAAQ,CAAC;AACjC,GAAG;AACH;AACA,EAAE,OAAO,KAAK,GAAG,QAAQ,CAAC;AAC1B,EAAE;AACF;AACA,CAAC,IAAqC,MAAM,CAAC,OAAO,EAAE;AACtD,EAAE,UAAU,CAAC,OAAO,GAAG,UAAU,CAAC;AAClC,EAAE,iBAAiB,UAAU,CAAC;AAC9B,EAAE,MAKM;AACR,EAAE,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC;AACjC,EAAE;AACF,CAAC,EAAE;;;;;;;","names":[],"sources":["node_modules/classnames/index.js"],"sourcesContent":["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n"],"version":3}
1
+ {"file":"p-12360e4c.js","mappings":";;;;;;;;;AAKA;AACA;AACA,CAAC,YAAY;AAEb;AACA,CAAC,IAAI,MAAM,GAAG,EAAE,CAAC,cAAc,CAAC;AAChC;AACA,CAAC,SAAS,UAAU,IAAI;AACxB,EAAE,IAAI,OAAO,GAAG,EAAE,CAAC;AACnB;AACA,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC7C,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAC1B,GAAG,IAAI,GAAG,EAAE;AACZ,IAAI,OAAO,GAAG,WAAW,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;AACpD,IAAI;AACJ,GAAG;AACH;AACA,EAAE,OAAO,OAAO,CAAC;AACjB,EAAE;AACF;AACA,CAAC,SAAS,UAAU,EAAE,GAAG,EAAE;AAC3B,EAAE,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;AAC1D,GAAG,OAAO,GAAG,CAAC;AACd,GAAG;AACH;AACA,EAAE,IAAI,OAAO,GAAG,KAAK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,CAAC,UAAU,GAAG,UAAU,CAAC;AACjC,EAAE;AACF,CAAC,EAAE;;;;;;;","names":[],"sources":["node_modules/classnames/index.js"],"sourcesContent":["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'bromcom-ui';
2
- const BUILD = /* bromcom-ui */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: false, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: false };
2
+ const BUILD = /* bromcom-ui */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: false, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
3
3
 
4
4
  /*
5
5
  Stencil Client Platform v4.25.1 | MIT Licensed | https://stenciljs.com
@@ -288,6 +288,9 @@ var parsePropertyValue = (propValue, propType) => {
288
288
  if (propType & 4 /* Boolean */) {
289
289
  return propValue === "false" ? false : propValue === "" || !!propValue;
290
290
  }
291
+ if (propType & 2 /* Number */) {
292
+ return parseFloat(propValue);
293
+ }
291
294
  if (propType & 1 /* String */) {
292
295
  return String(propValue);
293
296
  }
@@ -873,12 +876,16 @@ var postUpdateComponent = (hostRef) => {
873
876
  const tagName = hostRef.$cmpMeta$.$tagName$;
874
877
  const elm = hostRef.$hostElement$;
875
878
  const endPostUpdate = createTime("postUpdate", tagName);
879
+ const instance = elm;
876
880
  const ancestorComponent = hostRef.$ancestorComponent$;
877
881
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
878
882
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
879
883
  {
880
884
  addHydratedFlag(elm);
881
885
  }
886
+ {
887
+ safeCall(instance, "componentDidLoad", void 0, elm);
888
+ }
882
889
  endPostUpdate();
883
890
  {
884
891
  hostRef.$onReadyResolve$(elm);
@@ -925,14 +932,28 @@ var addHydratedFlag = (elm) => {
925
932
  var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
926
933
  var setValue = (ref, propName, newVal, cmpMeta) => {
927
934
  const hostRef = getHostRef(ref);
935
+ const elm = ref;
928
936
  const oldVal = hostRef.$instanceValues$.get(propName);
929
937
  const flags = hostRef.$flags$;
938
+ const instance = elm;
930
939
  newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
931
940
  const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
932
941
  const didValueChange = newVal !== oldVal && !areBothNaN;
933
942
  if (didValueChange) {
934
943
  hostRef.$instanceValues$.set(propName, newVal);
935
944
  {
945
+ if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
946
+ const watchMethods = cmpMeta.$watchers$[propName];
947
+ if (watchMethods) {
948
+ watchMethods.map((watchMethodName) => {
949
+ try {
950
+ instance[watchMethodName](newVal, oldVal, propName);
951
+ } catch (e) {
952
+ consoleError(e, elm);
953
+ }
954
+ });
955
+ }
956
+ }
936
957
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
937
958
  scheduleUpdate(hostRef, false);
938
959
  }
@@ -944,7 +965,10 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
944
965
  var proxyComponent = (Cstr, cmpMeta, flags) => {
945
966
  var _a, _b;
946
967
  const prototype = Cstr.prototype;
947
- if (cmpMeta.$members$ || BUILD.watchCallback ) {
968
+ if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
969
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
970
+ cmpMeta.$watchers$ = Cstr.watchers;
971
+ }
948
972
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
949
973
  members.map(([memberName, [memberFlags]]) => {
950
974
  if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
@@ -1138,9 +1162,13 @@ var proxyCustomElement = (Cstr, compactMeta) => {
1138
1162
  {
1139
1163
  cmpMeta.$listeners$ = compactMeta[3];
1140
1164
  }
1165
+ {
1166
+ cmpMeta.$watchers$ = Cstr.$watchers$;
1167
+ }
1141
1168
  {
1142
1169
  cmpMeta.$attrsToReflect$ = [];
1143
1170
  }
1171
+ const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
1144
1172
  Object.assign(Cstr.prototype, {
1145
1173
  __hasHostListenerAttached: false,
1146
1174
  __registerHost() {
@@ -1156,6 +1184,9 @@ var proxyCustomElement = (Cstr, compactMeta) => {
1156
1184
  },
1157
1185
  disconnectedCallback() {
1158
1186
  disconnectedCallback(this);
1187
+ if (originalDisconnectedCallback) {
1188
+ originalDisconnectedCallback.call(this);
1189
+ }
1159
1190
  plt.raf(() => {
1160
1191
  var _a;
1161
1192
  const hostRef = getHostRef(this);
@@ -1219,4 +1250,4 @@ var setPlatformOptions = (opts) => Object.assign(plt, opts);
1219
1250
 
1220
1251
  export { H, setNonce as a, setPlatformOptions as b, createEvent as c, Host as d, getAssetPath as g, h, proxyCustomElement as p, setAssetPath as s };
1221
1252
 
1222
- //# sourceMappingURL=p-0adcc84f.js.map
1253
+ //# sourceMappingURL=p-13582168.js.map