@paperless/core 2.0.1-beta.120 → 2.0.1-beta.122

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 (225) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/build/{p-ddad483b.entry.js → p-05db72d0.entry.js} +2 -2
  3. package/dist/build/{p-adb1ad27.entry.js → p-0740b690.entry.js} +2 -2
  4. package/dist/build/{p-4630294b.js → p-22db5ddd.js} +1 -1
  5. package/dist/build/{p-ad08592e.entry.js → p-26a3990a.entry.js} +2 -2
  6. package/dist/build/p-26b8bf57.entry.js +2 -0
  7. package/dist/build/p-26b8bf57.entry.js.map +1 -0
  8. package/dist/build/{p-79ed922f.entry.js → p-2edd87f3.entry.js} +2 -2
  9. package/dist/build/p-474a16ab.entry.js +2 -0
  10. package/dist/build/p-4953f4a9.entry.js +2 -0
  11. package/dist/build/p-4953f4a9.entry.js.map +1 -0
  12. package/dist/build/p-5048c4c2.entry.js +2 -0
  13. package/dist/{paperless/p-347b3ec3.entry.js → build/p-8981247d.entry.js} +2 -2
  14. package/dist/build/{p-983c6eb3.entry.js → p-8ff7cf25.entry.js} +2 -2
  15. package/dist/build/p-9cf8ba05.entry.js +2 -0
  16. package/dist/build/p-9cf8ba05.entry.js.map +1 -0
  17. package/dist/build/{p-007df641.entry.js → p-add932d6.entry.js} +2 -2
  18. package/dist/build/p-attachment.entry.esm.js.map +1 -1
  19. package/dist/build/{p-b13d6a2c.entry.js → p-c4724fb7.entry.js} +2 -2
  20. package/dist/{paperless/p-53009290.entry.js → build/p-c879f50c.entry.js} +2 -2
  21. package/dist/build/{p-3bd5d63a.entry.js → p-cc3307b8.entry.js} +2 -2
  22. package/dist/build/{p-55a41995.entry.js → p-d6828011.entry.js} +2 -2
  23. package/dist/build/{p-b0fc8bea.entry.js → p-e2054751.entry.js} +2 -2
  24. package/dist/build/{p-505a20af.entry.js → p-ef4a690b.entry.js} +2 -2
  25. package/dist/build/p-stepper-item.entry.esm.js.map +1 -1
  26. package/dist/build/p-stepper.entry.esm.js.map +1 -1
  27. package/dist/build/paperless.esm.js +1 -1
  28. package/dist/cjs/p-attachment.cjs.entry.js +5 -8
  29. package/dist/cjs/p-attachment.cjs.entry.js.map +1 -1
  30. package/dist/cjs/p-attachment.entry.cjs.js.map +1 -1
  31. package/dist/cjs/p-button-group.cjs.entry.js +1 -1
  32. package/dist/cjs/p-calendar.cjs.entry.js +1 -1
  33. package/dist/cjs/p-checkbox_4.cjs.entry.js +3 -3
  34. package/dist/cjs/p-content-slider.cjs.entry.js +2 -2
  35. package/dist/cjs/p-datepicker.cjs.entry.js +2 -2
  36. package/dist/cjs/p-empty-state_9.cjs.entry.js +8 -8
  37. package/dist/cjs/p-field_2.cjs.entry.js +3 -3
  38. package/dist/cjs/p-label.cjs.entry.js +3 -3
  39. package/dist/cjs/p-listing.cjs.entry.js +1 -1
  40. package/dist/cjs/p-navbar.cjs.entry.js +1 -1
  41. package/dist/cjs/p-navigation-item.cjs.entry.js +2 -2
  42. package/dist/cjs/p-navigation-section.cjs.entry.js +1 -1
  43. package/dist/cjs/p-pagination_3.cjs.entry.js +4 -4
  44. package/dist/cjs/p-select.cjs.entry.js +1 -1
  45. package/dist/cjs/p-stepper-item.cjs.entry.js +29 -24
  46. package/dist/cjs/p-stepper-item.cjs.entry.js.map +1 -1
  47. package/dist/cjs/p-stepper-item.entry.cjs.js.map +1 -1
  48. package/dist/cjs/p-stepper.cjs.entry.js +10 -17
  49. package/dist/cjs/p-stepper.cjs.entry.js.map +1 -1
  50. package/dist/cjs/p-stepper.entry.cjs.js.map +1 -1
  51. package/dist/cjs/p-toast.cjs.entry.js +1 -1
  52. package/dist/collection/components/atoms/stepper/item/stepper-item.component.css +1 -1
  53. package/dist/collection/components/atoms/stepper/item/stepper-item.component.js +28 -23
  54. package/dist/collection/components/atoms/stepper/item/stepper-item.component.js.map +1 -1
  55. package/dist/collection/components/molecules/attachment/attachment.component.js +5 -8
  56. package/dist/collection/components/molecules/attachment/attachment.component.js.map +1 -1
  57. package/dist/collection/components/molecules/button-group/button-group.component.js +1 -1
  58. package/dist/collection/components/molecules/calendar/calendar.component.js +1 -1
  59. package/dist/collection/components/molecules/content-slider/content-slider.component.js +2 -2
  60. package/dist/collection/components/molecules/datepicker/datepicker.component.js +2 -2
  61. package/dist/collection/components/molecules/dropdown/dropdown.component.js +3 -3
  62. package/dist/collection/components/molecules/empty-state/empty-state.component.js +2 -2
  63. package/dist/collection/components/molecules/field/field/field.component.js +3 -3
  64. package/dist/collection/components/molecules/label/label.component.js +3 -3
  65. package/dist/collection/components/molecules/navigation/item/navigation-item.component.js +2 -2
  66. package/dist/collection/components/molecules/navigation/section/navigation-section.component.js +1 -1
  67. package/dist/collection/components/molecules/pagination/pages/pagination-pages.component.js +1 -1
  68. package/dist/collection/components/molecules/pagination/pagination/pagination.component.js +3 -3
  69. package/dist/collection/components/molecules/select/select.component.js +1 -1
  70. package/dist/collection/components/molecules/table/cell/table-cell.component.js +1 -1
  71. package/dist/collection/components/molecules/table/footer/table-footer.component.js +2 -2
  72. package/dist/collection/components/molecules/table/row/table-row.component.js +3 -3
  73. package/dist/collection/components/molecules/toast/toast.component.js +1 -1
  74. package/dist/collection/components/organisms/listing/listing.component.js +1 -1
  75. package/dist/collection/components/organisms/navbar/navbar.component.js +1 -1
  76. package/dist/collection/components/organisms/stepper/stepper.component.css +1 -1
  77. package/dist/collection/components/organisms/stepper/stepper.component.js +9 -16
  78. package/dist/collection/components/organisms/stepper/stepper.component.js.map +1 -1
  79. package/dist/components/{p-CtkrGsqa.js → p-2ZI4Mzgd.js} +8 -8
  80. package/dist/components/{p-CtkrGsqa.js.map → p-2ZI4Mzgd.js.map} +1 -1
  81. package/dist/components/{p-UP0QWP4I.js → p-BFXs5OQx.js} +3 -3
  82. package/dist/components/{p-UP0QWP4I.js.map → p-BFXs5OQx.js.map} +1 -1
  83. package/dist/components/{p-Blx3errZ.js → p-BZbrGNXl.js} +5 -5
  84. package/dist/components/{p-Blx3errZ.js.map → p-BZbrGNXl.js.map} +1 -1
  85. package/dist/components/{p-DyXjCQd1.js → p-Bb8uyInh.js} +5 -5
  86. package/dist/components/{p-DyXjCQd1.js.map → p-Bb8uyInh.js.map} +1 -1
  87. package/dist/components/{p-BdBHOvJP.js → p-CPkh1e-n.js} +4 -4
  88. package/dist/components/{p-BdBHOvJP.js.map → p-CPkh1e-n.js.map} +1 -1
  89. package/dist/components/{p-Ch3YJ0-j.js → p-ClUlzt-d.js} +3 -3
  90. package/dist/components/{p-Ch3YJ0-j.js.map → p-ClUlzt-d.js.map} +1 -1
  91. package/dist/components/{p-DtHs-SzC.js → p-Cy1bLMTg.js} +8 -8
  92. package/dist/components/{p-DtHs-SzC.js.map → p-Cy1bLMTg.js.map} +1 -1
  93. package/dist/components/{p-DdoouZCr.js → p-Da_mcBgh.js} +3 -3
  94. package/dist/components/{p-DdoouZCr.js.map → p-Da_mcBgh.js.map} +1 -1
  95. package/dist/components/{p-CxhSYJBZ.js → p-Dh_4gXYW.js} +3 -3
  96. package/dist/components/{p-CxhSYJBZ.js.map → p-Dh_4gXYW.js.map} +1 -1
  97. package/dist/components/{p-BUl1mbJp.js → p-Du_Am2CT.js} +5 -5
  98. package/dist/components/{p-BUl1mbJp.js.map → p-Du_Am2CT.js.map} +1 -1
  99. package/dist/components/p-attachment.js +5 -8
  100. package/dist/components/p-attachment.js.map +1 -1
  101. package/dist/components/p-button-group.js +1 -1
  102. package/dist/components/p-calendar.js +1 -1
  103. package/dist/components/p-content-slider.js +2 -2
  104. package/dist/components/p-datepicker.js +5 -5
  105. package/dist/components/p-dropdown.js +1 -1
  106. package/dist/components/p-empty-state.js +1 -1
  107. package/dist/components/p-field.js +1 -1
  108. package/dist/components/{p-zJvwlVQ_.js → p-jkRa9dQy.js} +3 -3
  109. package/dist/components/{p-zJvwlVQ_.js.map → p-jkRa9dQy.js.map} +1 -1
  110. package/dist/components/p-label.js +3 -3
  111. package/dist/components/p-listing.js +1 -1
  112. package/dist/components/p-navbar.js +1 -1
  113. package/dist/components/p-navigation-item.js +2 -2
  114. package/dist/components/p-navigation-section.js +1 -1
  115. package/dist/components/p-pagination-pages.js +1 -1
  116. package/dist/components/p-pagination-size.js +1 -1
  117. package/dist/components/p-pagination.js +1 -1
  118. package/dist/components/p-profile.js +1 -1
  119. package/dist/components/p-select.js +3 -3
  120. package/dist/components/p-stepper-item.js +29 -24
  121. package/dist/components/p-stepper-item.js.map +1 -1
  122. package/dist/components/p-stepper.js +10 -17
  123. package/dist/components/p-stepper.js.map +1 -1
  124. package/dist/components/p-table-cell.js +1 -1
  125. package/dist/components/p-table-footer.js +1 -1
  126. package/dist/components/p-table-header.js +1 -1
  127. package/dist/components/p-table-row.js +1 -1
  128. package/dist/components/p-table.js +10 -10
  129. package/dist/components/p-toast.js +1 -1
  130. package/dist/esm/p-attachment.entry.js +5 -8
  131. package/dist/esm/p-attachment.entry.js.map +1 -1
  132. package/dist/esm/p-button-group.entry.js +1 -1
  133. package/dist/esm/p-calendar.entry.js +1 -1
  134. package/dist/esm/p-checkbox_4.entry.js +3 -3
  135. package/dist/esm/p-content-slider.entry.js +2 -2
  136. package/dist/esm/p-datepicker.entry.js +2 -2
  137. package/dist/esm/p-empty-state_9.entry.js +8 -8
  138. package/dist/esm/p-field_2.entry.js +3 -3
  139. package/dist/esm/p-label.entry.js +3 -3
  140. package/dist/esm/p-listing.entry.js +1 -1
  141. package/dist/esm/p-navbar.entry.js +1 -1
  142. package/dist/esm/p-navigation-item.entry.js +2 -2
  143. package/dist/esm/p-navigation-section.entry.js +1 -1
  144. package/dist/esm/p-pagination_3.entry.js +4 -4
  145. package/dist/esm/p-select.entry.js +1 -1
  146. package/dist/esm/p-stepper-item.entry.js +29 -24
  147. package/dist/esm/p-stepper-item.entry.js.map +1 -1
  148. package/dist/esm/p-stepper.entry.js +10 -17
  149. package/dist/esm/p-stepper.entry.js.map +1 -1
  150. package/dist/esm/p-toast.entry.js +1 -1
  151. package/dist/index.html +1 -1
  152. package/dist/paperless/{p-ddad483b.entry.js → p-05db72d0.entry.js} +2 -2
  153. package/dist/paperless/{p-adb1ad27.entry.js → p-0740b690.entry.js} +2 -2
  154. package/dist/paperless/{p-ad08592e.entry.js → p-26a3990a.entry.js} +2 -2
  155. package/dist/paperless/p-26b8bf57.entry.js +2 -0
  156. package/dist/paperless/p-26b8bf57.entry.js.map +1 -0
  157. package/dist/paperless/{p-79ed922f.entry.js → p-2edd87f3.entry.js} +2 -2
  158. package/dist/paperless/p-474a16ab.entry.js +2 -0
  159. package/dist/paperless/p-4953f4a9.entry.js +2 -0
  160. package/dist/paperless/p-4953f4a9.entry.js.map +1 -0
  161. package/dist/paperless/p-5048c4c2.entry.js +2 -0
  162. package/dist/{build/p-347b3ec3.entry.js → paperless/p-8981247d.entry.js} +2 -2
  163. package/dist/paperless/{p-983c6eb3.entry.js → p-8ff7cf25.entry.js} +2 -2
  164. package/dist/paperless/p-9cf8ba05.entry.js +2 -0
  165. package/dist/paperless/p-9cf8ba05.entry.js.map +1 -0
  166. package/dist/paperless/{p-007df641.entry.js → p-add932d6.entry.js} +2 -2
  167. package/dist/paperless/p-attachment.entry.esm.js.map +1 -1
  168. package/dist/paperless/{p-b13d6a2c.entry.js → p-c4724fb7.entry.js} +2 -2
  169. package/dist/{build/p-53009290.entry.js → paperless/p-c879f50c.entry.js} +2 -2
  170. package/dist/paperless/{p-3bd5d63a.entry.js → p-cc3307b8.entry.js} +2 -2
  171. package/dist/paperless/{p-55a41995.entry.js → p-d6828011.entry.js} +2 -2
  172. package/dist/paperless/{p-b0fc8bea.entry.js → p-e2054751.entry.js} +2 -2
  173. package/dist/paperless/{p-505a20af.entry.js → p-ef4a690b.entry.js} +2 -2
  174. package/dist/paperless/p-stepper-item.entry.esm.js.map +1 -1
  175. package/dist/paperless/p-stepper.entry.esm.js.map +1 -1
  176. package/dist/paperless/paperless.esm.js +1 -1
  177. package/dist/sw.js +1 -1
  178. package/dist/sw.js.map +1 -1
  179. package/package.json +1 -1
  180. package/dist/build/p-56a401d7.entry.js +0 -2
  181. package/dist/build/p-58f9ac89.entry.js +0 -2
  182. package/dist/build/p-58f9ac89.entry.js.map +0 -1
  183. package/dist/build/p-7adc863b.entry.js +0 -2
  184. package/dist/build/p-aec4f685.entry.js +0 -2
  185. package/dist/build/p-aec4f685.entry.js.map +0 -1
  186. package/dist/build/p-de598439.entry.js +0 -2
  187. package/dist/build/p-de598439.entry.js.map +0 -1
  188. package/dist/paperless/p-56a401d7.entry.js +0 -2
  189. package/dist/paperless/p-58f9ac89.entry.js +0 -2
  190. package/dist/paperless/p-58f9ac89.entry.js.map +0 -1
  191. package/dist/paperless/p-7adc863b.entry.js +0 -2
  192. package/dist/paperless/p-aec4f685.entry.js +0 -2
  193. package/dist/paperless/p-aec4f685.entry.js.map +0 -1
  194. package/dist/paperless/p-de598439.entry.js +0 -2
  195. package/dist/paperless/p-de598439.entry.js.map +0 -1
  196. /package/dist/build/{p-ddad483b.entry.js.map → p-05db72d0.entry.js.map} +0 -0
  197. /package/dist/build/{p-adb1ad27.entry.js.map → p-0740b690.entry.js.map} +0 -0
  198. /package/dist/build/{p-ad08592e.entry.js.map → p-26a3990a.entry.js.map} +0 -0
  199. /package/dist/build/{p-79ed922f.entry.js.map → p-2edd87f3.entry.js.map} +0 -0
  200. /package/dist/build/{p-56a401d7.entry.js.map → p-474a16ab.entry.js.map} +0 -0
  201. /package/dist/build/{p-7adc863b.entry.js.map → p-5048c4c2.entry.js.map} +0 -0
  202. /package/dist/build/{p-347b3ec3.entry.js.map → p-8981247d.entry.js.map} +0 -0
  203. /package/dist/build/{p-983c6eb3.entry.js.map → p-8ff7cf25.entry.js.map} +0 -0
  204. /package/dist/build/{p-007df641.entry.js.map → p-add932d6.entry.js.map} +0 -0
  205. /package/dist/build/{p-b13d6a2c.entry.js.map → p-c4724fb7.entry.js.map} +0 -0
  206. /package/dist/build/{p-53009290.entry.js.map → p-c879f50c.entry.js.map} +0 -0
  207. /package/dist/build/{p-3bd5d63a.entry.js.map → p-cc3307b8.entry.js.map} +0 -0
  208. /package/dist/build/{p-55a41995.entry.js.map → p-d6828011.entry.js.map} +0 -0
  209. /package/dist/build/{p-b0fc8bea.entry.js.map → p-e2054751.entry.js.map} +0 -0
  210. /package/dist/build/{p-505a20af.entry.js.map → p-ef4a690b.entry.js.map} +0 -0
  211. /package/dist/paperless/{p-ddad483b.entry.js.map → p-05db72d0.entry.js.map} +0 -0
  212. /package/dist/paperless/{p-adb1ad27.entry.js.map → p-0740b690.entry.js.map} +0 -0
  213. /package/dist/paperless/{p-ad08592e.entry.js.map → p-26a3990a.entry.js.map} +0 -0
  214. /package/dist/paperless/{p-79ed922f.entry.js.map → p-2edd87f3.entry.js.map} +0 -0
  215. /package/dist/paperless/{p-56a401d7.entry.js.map → p-474a16ab.entry.js.map} +0 -0
  216. /package/dist/paperless/{p-7adc863b.entry.js.map → p-5048c4c2.entry.js.map} +0 -0
  217. /package/dist/paperless/{p-347b3ec3.entry.js.map → p-8981247d.entry.js.map} +0 -0
  218. /package/dist/paperless/{p-983c6eb3.entry.js.map → p-8ff7cf25.entry.js.map} +0 -0
  219. /package/dist/paperless/{p-007df641.entry.js.map → p-add932d6.entry.js.map} +0 -0
  220. /package/dist/paperless/{p-b13d6a2c.entry.js.map → p-c4724fb7.entry.js.map} +0 -0
  221. /package/dist/paperless/{p-53009290.entry.js.map → p-c879f50c.entry.js.map} +0 -0
  222. /package/dist/paperless/{p-3bd5d63a.entry.js.map → p-cc3307b8.entry.js.map} +0 -0
  223. /package/dist/paperless/{p-55a41995.entry.js.map → p-d6828011.entry.js.map} +0 -0
  224. /package/dist/paperless/{p-b0fc8bea.entry.js.map → p-e2054751.entry.js.map} +0 -0
  225. /package/dist/paperless/{p-505a20af.entry.js.map → p-ef4a690b.entry.js.map} +0 -0
@@ -4,24 +4,15 @@ var index = require('./index-BDuPp9vl.js');
4
4
  var index$1 = require('./index-mudu9vpz.js');
5
5
  require('./clsx-BtxeOLZW.js');
6
6
 
7
- const stepperComponentCss = "*{box-sizing:border-box}.static{position:static!important}.flex{display:flex!important}.h-auto{height:auto!important}.w-full{width:100%!important}.flex-col{flex-direction:column!important}.flex-wrap{flex-wrap:wrap!important}.items-start{align-items:flex-start!important}.items-end{align-items:flex-end!important}.items-center{align-items:center!important}.gap-2{gap:.5rem!important}";
7
+ const stepperComponentCss = "*{box-sizing:border-box}.static{position:static!important}.flex{display:flex!important}.h-auto{height:auto!important}.w-full{width:100%!important}.flex-col{flex-direction:column!important}.flex-wrap{flex-wrap:wrap!important}.items-center{align-items:center!important}.gap-2{gap:.5rem!important}";
8
8
 
9
9
  const stepper = index$1.cva(['flex gap-2'], {
10
10
  variants: {
11
11
  direction: {
12
- vertical: 'w-full flex-col flex-wrap items-start',
13
- horizontal: 'h-auto items-center'
12
+ vertical: 'w-full flex-col flex-wrap',
13
+ horizontal: 'h-auto items-center',
14
14
  },
15
- contentPosition: {
16
- start: null,
17
- end: null
18
- }
19
15
  },
20
- compoundVariants: [{
21
- direction: 'vertical',
22
- contentPosition: 'start',
23
- class: 'items-end'
24
- }]
25
16
  });
26
17
  const Stepper = class {
27
18
  constructor(hostRef) {
@@ -138,17 +129,17 @@ const Stepper = class {
138
129
  stepperLine.active = i < activeStep;
139
130
  if (heightDiff > 0 && this.direction === 'vertical') {
140
131
  let totalHeight = 0;
141
- stepperLine.style.marginTop = "0";
142
- stepperLine.style.marginBottom = "0";
132
+ stepperLine.style.marginTop = '0';
133
+ stepperLine.style.marginBottom = '0';
143
134
  if (this.align === 'start' || this.align === 'center') {
144
135
  stepperLine.style.marginTop = `-${heightDiff / 16}rem`;
145
136
  totalHeight += heightDiff;
146
137
  }
147
- if (this.align === 'center' || this.align === "end") {
138
+ if (this.align === 'center' || this.align === 'end') {
148
139
  stepperLine.style.marginBottom = `-${heightDiffNext / 16}rem`;
149
140
  totalHeight += heightDiffNext;
150
141
  }
151
- stepperLine.style.minHeight = `calc(${(totalHeight / 16)}rem)`;
142
+ stepperLine.style.minHeight = `calc(${totalHeight / 16}rem)`;
152
143
  }
153
144
  };
154
145
  componentDidLoad() {
@@ -161,7 +152,9 @@ const Stepper = class {
161
152
  }
162
153
  }
163
154
  render() {
164
- return (index.h("div", { key: '5f5f1f7f51d7474c5cf40eafc151dba96d5a9c53', class: stepper({ direction: this.direction }) }, index.h("slot", { key: '69c3ef7de59309fa3907c4ed8bb33cd483350466', onSlotchange: () => this._generateStepsOnce() })));
155
+ return (index.h("div", { key: '6c1f37dcbb6d9cba1a05f55eef4269082ee58950', class: stepper({
156
+ direction: this.direction,
157
+ }) }, index.h("slot", { key: 'eefa8e4657f229d45036d6ccda25f1c8fa24934a', onSlotchange: () => this._generateStepsOnce() })));
165
158
  }
166
159
  _onAlignChange() {
167
160
  this._generateStepsOnce();
@@ -1 +1 @@
1
- {"file":"p-stepper.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,mBAAmB,GAAG,gYAAgY;;ACG5Z,MAAM,OAAO,GAAGA,WAAG,CAClB,CAAC,YAAY,CAAC,EACd;AACC,IAAA,QAAQ,EAAE;AACT,QAAA,SAAS,EAAE;AACV,YAAA,QAAQ,EAAE,uCAAuC;AACjD,YAAA,UAAU,EAAE;AACZ,SAAA;AACD,QAAA,eAAe,EAAE;AAChB,YAAA,KAAK,EAAE,IAAI;AACX,YAAA,GAAG,EAAE;AACL;AACD,KAAA;AACD,IAAA,gBAAgB,EAAE,CAAC;AAClB,YAAA,SAAS,EAAE,UAAU;AACrB,YAAA,eAAe,EAAE,OAAO;AACxB,YAAA,KAAK,EAAE;SACP;AACD,CAAA,CACD;MAOY,OAAO,GAAA,MAAA;;;;AACnB;;AAEG;IACK,UAAU,GAAW,CAAC;AAE9B;;AAEG;IACK,gBAAgB,GAAY,IAAI;AAExC;;AAEG;IACK,SAAS,GAA8B,YAAY;AAE3D;;AAEG;IACK,KAAK,GAA+B,QAAQ;AAEpD;;AAEG;IACK,eAAe,GAAoB,KAAK;;AAOxC,IAAA,gBAAgB;AAChB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A,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,EAAA,EACjDA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,YAAY,EAAE,MAAM,IAAI,CAAC,kBAAkB,EAAE,EAAA,CAAI,CAClD;;IAKE,cAAc,GAAA;QACvB,IAAI,CAAC,kBAAkB,EAAE;;IAIhB,kBAAkB,GAAA;QAC3B,IAAI,CAAC,kBAAkB,EAAE;;IAIhB,mBAAmB,GAAA;QAC5B,IAAI,CAAC,kBAAkB,EAAE;;;;;;;;;;;;","names":["cva","h"],"sources":["src/components/organisms/stepper/stepper.component.css?tag=p-stepper&encapsulation=shadow","src/components/organisms/stepper/stepper.component.tsx"],"sourcesContent":["","import { Component, Element, h, Prop, Watch } from '@stencil/core';\nimport { cva } from 'class-variance-authority';\n\nconst stepper = cva(\n\t['flex gap-2'],\n\t{\n\t\tvariants: {\n\t\t\tdirection: {\n\t\t\t\tvertical: 'w-full flex-col flex-wrap items-start',\n\t\t\t\thorizontal: 'h-auto items-center'\n\t\t\t},\n\t\t\tcontentPosition: {\n\t\t\t\tstart: null,\n\t\t\t\tend: null\n\t\t\t}\n\t\t},\n\t\tcompoundVariants: [{\n\t\t\tdirection: 'vertical',\n\t\t\tcontentPosition: 'start',\n\t\t\tclass: 'items-end'\n\t\t}]\n\t}\n);\n\n@Component({\n\ttag: 'p-stepper',\n\tstyleUrl: 'stepper.component.css',\n\tshadow: true,\n})\nexport class Stepper {\n\t/**\n\t * The currently active step\n\t */\n\t@Prop() activeStep: number = 1;\n\n\t/**\n\t * Wether to automatically apply active & finished to items\n\t */\n\t@Prop() enableAutoStatus: boolean = true;\n\n\t/**\n\t * The direction of the stepper\n\t */\n\t@Prop() direction: 'horizontal' | 'vertical' = 'horizontal';\n\n\t/**\n\t * The alignment of the content in case of vertical direction\n\t */\n\t@Prop() align: 'start' | 'center' | 'end' = 'center';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop() contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _generateTimeout: NodeJS.Timeout | undefined;\n\tprivate _resizeObserver: ResizeObserver;\n\n\tprivate _generateStepsOnce = () => {\n\t\tif (this._generateTimeout) {\n\t\t\tclearTimeout(this._generateTimeout);\n\t\t\tthis._generateTimeout = null;\n\t\t}\n\n\t\tthis._generateTimeout = setTimeout(() => this._generateSteps(), 50);\n\t};\n\n\tprivate _generateSteps = async () => {\n\t\tif (!this._el) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet activeStep = this.activeStep - 1 || 0;\n\t\tconst items = this._el.querySelectorAll('p-stepper-item');\n\n\t\tlet directionChanged = false;\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\tif (this.enableAutoStatus) {\n\t\t\t\titem.active = i === activeStep;\n\t\t\t\titem.finished = i < activeStep;\n\t\t\t}\n\n\t\t\tif (!this.activeStep || activeStep < 0) {\n\t\t\t\tif (item.active) {\n\t\t\t\t\tactiveStep = i;\n\t\t\t\t}\n\n\t\t\t\tif (activeStep < 0 && item.finished) {\n\t\t\t\t\tactiveStep = i + 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (item.direction !== this.direction && !directionChanged) {\n\t\t\t\tdirectionChanged = true;\n\t\t\t}\n\n\t\t\titem.number = i + 1;\n\t\t\titem.direction = this.direction;\n\t\t\titem.align = this.direction === 'vertical' ? this.align : 'start';\n\t\t\titem.contentPosition = this.contentPosition;\n\t\t}\n\n\t\tif (directionChanged) {\n\t\t\t// super hacky way to ensure all elements that have a direction changed are re-rendered\n\t\t\tawait new Promise(resolve => setTimeout(resolve, 200));\n\t\t}\n\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\tif (i < items.length - 1) {\n\t\t\t\tlet nextItem = item.nextElementSibling;\n\n\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {\n\t\t\t\t\tconst stepperLine = document.createElement('p-stepper-line');\n\t\t\t\t\tthis._el.insertBefore(stepperLine, nextItem);\n\t\t\t\t\tthis._setStepperLineData(stepperLine, item, nextItem, i, activeStep);\n\n\t\t\t\t\tconst previous = stepperLine.previousElementSibling;\n\t\t\t\t\tif (previous && previous.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\t\tprevious.remove();\n\t\t\t\t\t}\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\tconst stepperLine = nextItem;\n\t\t\t\t\tnextItem = nextItem.nextElementSibling;\n\n\t\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {\n\t\t\t\t\t\tthis._setStepperLineData(\n\t\t\t\t\t\t\tstepperLine,\n\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\tnextItem,\n\t\t\t\t\t\t\ti,\n\t\t\t\t\t\t\tactiveStep\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i > 0) {\n\t\t\t\tconst previousItem = item.previousElementSibling;\n\t\t\t\tif (\n\t\t\t\t\tpreviousItem &&\n\t\t\t\t\tpreviousItem.tagName.toLowerCase() === 'p-stepper-line'\n\t\t\t\t) {\n\t\t\t\t\tpreviousItem.direction = this.direction;\n\t\t\t\t\tpreviousItem.active = item.active || item.finished;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst lines = this._el.querySelectorAll(\n\t\t\t'p-stepper-line:not(:has(+ p-stepper-item)), p-stepper-line:first-child'\n\t\t);\n\t\tfor (let j = lines.length - 1; j >= 0; j--) {\n\t\t\tconst line = lines.item(j);\n\t\t\tline.remove();\n\t\t}\n\t};\n\n\tprivate _setStepperLineData = (\n\t\tstepperLine: HTMLPStepperLineElement,\n\t\titem: HTMLPStepperItemElement,\n\t\tnextItem: HTMLPStepperItemElement,\n\t\ti: number,\n\t\tactiveStep: number\n\t) => {\n\t\tlet heightDiff = item.clientHeight - 24;\n\t\tlet heightDiffNext = nextItem.clientHeight - 24;\n\n\t\tif(this.align === 'center') {\n\t\t\theightDiff = heightDiff / 2;\n\t\t\theightDiffNext = heightDiffNext / 2;\n\t\t}\n\n\t\tstepperLine.direction = this.direction;\n\t\tstepperLine.active = i < activeStep;\n\n\t\tif (heightDiff > 0 && this.direction === 'vertical') {\n\t\t\tlet totalHeight = 0;\n\n\t\t\tstepperLine.style.marginTop = \"0\";\n\t\t\tstepperLine.style.marginBottom= \"0\";\n\n\t\t\tif(this.align === 'start' || this.align === 'center') {\n\t\t\t\tstepperLine.style.marginTop = `-${heightDiff / 16}rem`;\n\t\t\t\ttotalHeight += heightDiff;\n\t\t\t}\n\n\t\t\tif(this.align === 'center' || this.align===\"end\") {\n\t\t\t\tstepperLine.style.marginBottom = `-${heightDiffNext / 16}rem`;\n\t\t\t\ttotalHeight += heightDiffNext;\n\t\t\t}\n\n\t\t\tstepperLine.style.minHeight = `calc(${\n\t\t\t\t(totalHeight / 16)\n\t\t\t}rem)`;\n\t\t}\n\t};\n\n\tcomponentDidLoad() {\n\t\tthis._resizeObserver = new ResizeObserver(() => this._generateStepsOnce());\n\t\tthis._resizeObserver.observe(this._el);\n\t}\n\n\tdisconnectCallback() {\n\t\tif (this._resizeObserver) {\n\t\t\tthis._resizeObserver.disconnect();\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div class={stepper({ direction: this.direction })}>\n\t\t\t\t<slot onSlotchange={() => this._generateStepsOnce()} />\n\t\t\t</div>\n\t\t);\n\t}\n\n\t@Watch('align')\n\tprotected _onAlignChange() {\n\t\tthis._generateStepsOnce();\n\t}\n\n\t@Watch('direction')\n\tprotected _onDirectionChange() {\n\t\tthis._generateStepsOnce();\n\t}\n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AAI,IAAI,CAAC,KAAK,KAAK,KAAK,EAAE;gBACpD,WAAW,CAAC,KAAK,CAAC,YAAY,GAAG,IAAI,cAAc,GAAG,EAAE,CAAA,GAAA,CAAK;gBAC7D,WAAW,IAAI,cAAc;;YAG9B,WAAW,CAAC,KAAK,CAAC,SAAS,GAAG,QAAQ,WAAW,GAAG,EAAE,CAAA,IAAA,CAAM;;AAE9D,KAAC;IAED,gBAAgB,GAAA;AACf,QAAA,IAAI,CAAC,eAAe,GAAG,IAAI,cAAc,CAAC,MAAM,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1E,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;;IAGvC,kBAAkB,GAAA;AACjB,QAAA,IAAI,IAAI,CAAC,eAAe,EAAE;AACzB,YAAA,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE;;;IAInC,MAAM,GAAA;AACL,QAAA,QACCC,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACC,KAAK,EAAE,OAAO,CAAC;gBACd,SAAS,EAAE,IAAI,CAAC,SAAS;aACzB,CAAC,EAAA,EAEFA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,YAAY,EAAE,MAAM,IAAI,CAAC,kBAAkB,EAAE,EAAA,CAAI,CAClD;;IAKE,cAAc,GAAA;QACvB,IAAI,CAAC,kBAAkB,EAAE;;IAIhB,kBAAkB,GAAA;QAC3B,IAAI,CAAC,kBAAkB,EAAE;;IAIhB,mBAAmB,GAAA;QAC5B,IAAI,CAAC,kBAAkB,EAAE;;;;;;;;;;;;","names":["cva","h"],"sources":["src/components/organisms/stepper/stepper.component.css?tag=p-stepper&encapsulation=shadow","src/components/organisms/stepper/stepper.component.tsx"],"sourcesContent":["","import { Component, Element, h, Prop, Watch } from '@stencil/core';\nimport { cva } from 'class-variance-authority';\n\nconst stepper = cva(['flex gap-2'], {\n\tvariants: {\n\t\tdirection: {\n\t\t\tvertical: 'w-full flex-col flex-wrap',\n\t\t\thorizontal: 'h-auto items-center',\n\t\t},\n\t},\n});\n\n@Component({\n\ttag: 'p-stepper',\n\tstyleUrl: 'stepper.component.css',\n\tshadow: true,\n})\nexport class Stepper {\n\t/**\n\t * The currently active step\n\t */\n\t@Prop() activeStep: number = 1;\n\n\t/**\n\t * Wether to automatically apply active & finished to items\n\t */\n\t@Prop() enableAutoStatus: boolean = true;\n\n\t/**\n\t * The direction of the stepper\n\t */\n\t@Prop() direction: 'horizontal' | 'vertical' = 'horizontal';\n\n\t/**\n\t * The alignment of the content in case of vertical direction\n\t */\n\t@Prop() align: 'start' | 'center' | 'end' = 'center';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop() contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _generateTimeout: NodeJS.Timeout | undefined;\n\tprivate _resizeObserver: ResizeObserver;\n\n\tprivate _generateStepsOnce = () => {\n\t\tif (this._generateTimeout) {\n\t\t\tclearTimeout(this._generateTimeout);\n\t\t\tthis._generateTimeout = null;\n\t\t}\n\n\t\tthis._generateTimeout = setTimeout(() => this._generateSteps(), 50);\n\t};\n\n\tprivate _generateSteps = async () => {\n\t\tif (!this._el) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet activeStep = this.activeStep - 1 || 0;\n\t\tconst items = this._el.querySelectorAll('p-stepper-item');\n\n\t\tlet directionChanged = false;\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\tif (this.enableAutoStatus) {\n\t\t\t\titem.active = i === activeStep;\n\t\t\t\titem.finished = i < activeStep;\n\t\t\t}\n\n\t\t\tif (!this.activeStep || activeStep < 0) {\n\t\t\t\tif (item.active) {\n\t\t\t\t\tactiveStep = i;\n\t\t\t\t}\n\n\t\t\t\tif (activeStep < 0 && item.finished) {\n\t\t\t\t\tactiveStep = i + 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (item.direction !== this.direction && !directionChanged) {\n\t\t\t\tdirectionChanged = true;\n\t\t\t}\n\n\t\t\titem.number = i + 1;\n\t\t\titem.direction = this.direction;\n\t\t\titem.align = this.direction === 'vertical' ? this.align : 'start';\n\t\t\titem.contentPosition = this.contentPosition;\n\t\t}\n\n\t\tif (directionChanged) {\n\t\t\t// super hacky way to ensure all elements that have a direction changed are re-rendered\n\t\t\tawait new Promise(resolve => setTimeout(resolve, 200));\n\t\t}\n\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\tif (i < items.length - 1) {\n\t\t\t\tlet nextItem = item.nextElementSibling;\n\n\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {\n\t\t\t\t\tconst stepperLine = document.createElement('p-stepper-line');\n\t\t\t\t\tthis._el.insertBefore(stepperLine, nextItem);\n\t\t\t\t\tthis._setStepperLineData(stepperLine, item, nextItem, i, activeStep);\n\n\t\t\t\t\tconst previous = stepperLine.previousElementSibling;\n\t\t\t\t\tif (previous && previous.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\t\tprevious.remove();\n\t\t\t\t\t}\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\tconst stepperLine = nextItem;\n\t\t\t\t\tnextItem = nextItem.nextElementSibling;\n\n\t\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {\n\t\t\t\t\t\tthis._setStepperLineData(\n\t\t\t\t\t\t\tstepperLine,\n\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\tnextItem,\n\t\t\t\t\t\t\ti,\n\t\t\t\t\t\t\tactiveStep\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i > 0) {\n\t\t\t\tconst previousItem = item.previousElementSibling;\n\t\t\t\tif (\n\t\t\t\t\tpreviousItem &&\n\t\t\t\t\tpreviousItem.tagName.toLowerCase() === 'p-stepper-line'\n\t\t\t\t) {\n\t\t\t\t\tpreviousItem.direction = this.direction;\n\t\t\t\t\tpreviousItem.active = item.active || item.finished;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst lines = this._el.querySelectorAll(\n\t\t\t'p-stepper-line:not(:has(+ p-stepper-item)), p-stepper-line:first-child'\n\t\t);\n\t\tfor (let j = lines.length - 1; j >= 0; j--) {\n\t\t\tconst line = lines.item(j);\n\t\t\tline.remove();\n\t\t}\n\t};\n\n\tprivate _setStepperLineData = (\n\t\tstepperLine: HTMLPStepperLineElement,\n\t\titem: HTMLPStepperItemElement,\n\t\tnextItem: HTMLPStepperItemElement,\n\t\ti: number,\n\t\tactiveStep: number\n\t) => {\n\t\tlet heightDiff = item.clientHeight - 24;\n\t\tlet heightDiffNext = nextItem.clientHeight - 24;\n\n\t\tif (this.align === 'center') {\n\t\t\theightDiff = heightDiff / 2;\n\t\t\theightDiffNext = heightDiffNext / 2;\n\t\t}\n\n\t\tstepperLine.direction = this.direction;\n\t\tstepperLine.active = i < activeStep;\n\n\t\tif (heightDiff > 0 && this.direction === 'vertical') {\n\t\t\tlet totalHeight = 0;\n\n\t\t\tstepperLine.style.marginTop = '0';\n\t\t\tstepperLine.style.marginBottom = '0';\n\n\t\t\tif (this.align === 'start' || this.align === 'center') {\n\t\t\t\tstepperLine.style.marginTop = `-${heightDiff / 16}rem`;\n\t\t\t\ttotalHeight += heightDiff;\n\t\t\t}\n\n\t\t\tif (this.align === 'center' || this.align === 'end') {\n\t\t\t\tstepperLine.style.marginBottom = `-${heightDiffNext / 16}rem`;\n\t\t\t\ttotalHeight += heightDiffNext;\n\t\t\t}\n\n\t\t\tstepperLine.style.minHeight = `calc(${totalHeight / 16}rem)`;\n\t\t}\n\t};\n\n\tcomponentDidLoad() {\n\t\tthis._resizeObserver = new ResizeObserver(() => this._generateStepsOnce());\n\t\tthis._resizeObserver.observe(this._el);\n\t}\n\n\tdisconnectCallback() {\n\t\tif (this._resizeObserver) {\n\t\t\tthis._resizeObserver.disconnect();\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclass={stepper({\n\t\t\t\t\tdirection: this.direction,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t<slot onSlotchange={() => this._generateStepsOnce()} />\n\t\t\t</div>\n\t\t);\n\t}\n\n\t@Watch('align')\n\tprotected _onAlignChange() {\n\t\tthis._generateStepsOnce();\n\t}\n\n\t@Watch('direction')\n\tprotected _onDirectionChange() {\n\t\tthis._generateStepsOnce();\n\t}\n\n\t@Watch('activeStep')\n\tprotected _onActiveStepChange() {\n\t\tthis._generateStepsOnce();\n\t}\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"version":3,"file":"p-stepper.entry.cjs.js","sources":["src/components/organisms/stepper/stepper.component.css?tag=p-stepper&encapsulation=shadow","src/components/organisms/stepper/stepper.component.tsx"],"sourcesContent":["","import { Component, Element, h, Prop, Watch } from '@stencil/core';\nimport { cva } from 'class-variance-authority';\n\nconst stepper = cva(\n\t['flex gap-2'],\n\t{\n\t\tvariants: {\n\t\t\tdirection: {\n\t\t\t\tvertical: 'w-full flex-col flex-wrap items-start',\n\t\t\t\thorizontal: 'h-auto items-center'\n\t\t\t},\n\t\t\tcontentPosition: {\n\t\t\t\tstart: null,\n\t\t\t\tend: null\n\t\t\t}\n\t\t},\n\t\tcompoundVariants: [{\n\t\t\tdirection: 'vertical',\n\t\t\tcontentPosition: 'start',\n\t\t\tclass: 'items-end'\n\t\t}]\n\t}\n);\n\n@Component({\n\ttag: 'p-stepper',\n\tstyleUrl: 'stepper.component.css',\n\tshadow: true,\n})\nexport class Stepper {\n\t/**\n\t * The currently active step\n\t */\n\t@Prop() activeStep: number = 1;\n\n\t/**\n\t * Wether to automatically apply active & finished to items\n\t */\n\t@Prop() enableAutoStatus: boolean = true;\n\n\t/**\n\t * The direction of the stepper\n\t */\n\t@Prop() direction: 'horizontal' | 'vertical' = 'horizontal';\n\n\t/**\n\t * The alignment of the content in case of vertical direction\n\t */\n\t@Prop() align: 'start' | 'center' | 'end' = 'center';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop() contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _generateTimeout: NodeJS.Timeout | undefined;\n\tprivate _resizeObserver: ResizeObserver;\n\n\tprivate _generateStepsOnce = () => {\n\t\tif (this._generateTimeout) {\n\t\t\tclearTimeout(this._generateTimeout);\n\t\t\tthis._generateTimeout = null;\n\t\t}\n\n\t\tthis._generateTimeout = setTimeout(() => this._generateSteps(), 50);\n\t};\n\n\tprivate _generateSteps = async () => {\n\t\tif (!this._el) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet activeStep = this.activeStep - 1 || 0;\n\t\tconst items = this._el.querySelectorAll('p-stepper-item');\n\n\t\tlet directionChanged = false;\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\tif (this.enableAutoStatus) {\n\t\t\t\titem.active = i === activeStep;\n\t\t\t\titem.finished = i < activeStep;\n\t\t\t}\n\n\t\t\tif (!this.activeStep || activeStep < 0) {\n\t\t\t\tif (item.active) {\n\t\t\t\t\tactiveStep = i;\n\t\t\t\t}\n\n\t\t\t\tif (activeStep < 0 && item.finished) {\n\t\t\t\t\tactiveStep = i + 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (item.direction !== this.direction && !directionChanged) {\n\t\t\t\tdirectionChanged = true;\n\t\t\t}\n\n\t\t\titem.number = i + 1;\n\t\t\titem.direction = this.direction;\n\t\t\titem.align = this.direction === 'vertical' ? this.align : 'start';\n\t\t\titem.contentPosition = this.contentPosition;\n\t\t}\n\n\t\tif (directionChanged) {\n\t\t\t// super hacky way to ensure all elements that have a direction changed are re-rendered\n\t\t\tawait new Promise(resolve => setTimeout(resolve, 200));\n\t\t}\n\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\tif (i < items.length - 1) {\n\t\t\t\tlet nextItem = item.nextElementSibling;\n\n\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {\n\t\t\t\t\tconst stepperLine = document.createElement('p-stepper-line');\n\t\t\t\t\tthis._el.insertBefore(stepperLine, nextItem);\n\t\t\t\t\tthis._setStepperLineData(stepperLine, item, nextItem, i, activeStep);\n\n\t\t\t\t\tconst previous = stepperLine.previousElementSibling;\n\t\t\t\t\tif (previous && previous.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\t\tprevious.remove();\n\t\t\t\t\t}\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\tconst stepperLine = nextItem;\n\t\t\t\t\tnextItem = nextItem.nextElementSibling;\n\n\t\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {\n\t\t\t\t\t\tthis._setStepperLineData(\n\t\t\t\t\t\t\tstepperLine,\n\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\tnextItem,\n\t\t\t\t\t\t\ti,\n\t\t\t\t\t\t\tactiveStep\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i > 0) {\n\t\t\t\tconst previousItem = item.previousElementSibling;\n\t\t\t\tif (\n\t\t\t\t\tpreviousItem &&\n\t\t\t\t\tpreviousItem.tagName.toLowerCase() === 'p-stepper-line'\n\t\t\t\t) {\n\t\t\t\t\tpreviousItem.direction = this.direction;\n\t\t\t\t\tpreviousItem.active = item.active || item.finished;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst lines = this._el.querySelectorAll(\n\t\t\t'p-stepper-line:not(:has(+ p-stepper-item)), p-stepper-line:first-child'\n\t\t);\n\t\tfor (let j = lines.length - 1; j >= 0; j--) {\n\t\t\tconst line = lines.item(j);\n\t\t\tline.remove();\n\t\t}\n\t};\n\n\tprivate _setStepperLineData = (\n\t\tstepperLine: HTMLPStepperLineElement,\n\t\titem: HTMLPStepperItemElement,\n\t\tnextItem: HTMLPStepperItemElement,\n\t\ti: number,\n\t\tactiveStep: number\n\t) => {\n\t\tlet heightDiff = item.clientHeight - 24;\n\t\tlet heightDiffNext = nextItem.clientHeight - 24;\n\n\t\tif(this.align === 'center') {\n\t\t\theightDiff = heightDiff / 2;\n\t\t\theightDiffNext = heightDiffNext / 2;\n\t\t}\n\n\t\tstepperLine.direction = this.direction;\n\t\tstepperLine.active = i < activeStep;\n\n\t\tif (heightDiff > 0 && this.direction === 'vertical') {\n\t\t\tlet totalHeight = 0;\n\n\t\t\tstepperLine.style.marginTop = \"0\";\n\t\t\tstepperLine.style.marginBottom= \"0\";\n\n\t\t\tif(this.align === 'start' || this.align === 'center') {\n\t\t\t\tstepperLine.style.marginTop = `-${heightDiff / 16}rem`;\n\t\t\t\ttotalHeight += heightDiff;\n\t\t\t}\n\n\t\t\tif(this.align === 'center' || this.align===\"end\") {\n\t\t\t\tstepperLine.style.marginBottom = `-${heightDiffNext / 16}rem`;\n\t\t\t\ttotalHeight += heightDiffNext;\n\t\t\t}\n\n\t\t\tstepperLine.style.minHeight = `calc(${\n\t\t\t\t(totalHeight / 16)\n\t\t\t}rem)`;\n\t\t}\n\t};\n\n\tcomponentDidLoad() {\n\t\tthis._resizeObserver = new ResizeObserver(() => this._generateStepsOnce());\n\t\tthis._resizeObserver.observe(this._el);\n\t}\n\n\tdisconnectCallback() {\n\t\tif (this._resizeObserver) {\n\t\t\tthis._resizeObserver.disconnect();\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div class={stepper({ direction: this.direction })}>\n\t\t\t\t<slot onSlotchange={() => this._generateStepsOnce()} />\n\t\t\t</div>\n\t\t);\n\t}\n\n\t@Watch('align')\n\tprotected _onAlignChange() {\n\t\tthis._generateStepsOnce();\n\t}\n\n\t@Watch('direction')\n\tprotected _onDirectionChange() {\n\t\tthis._generateStepsOnce();\n\t}\n\n\t@Watch('activeStep')\n\tprotected _onActiveStepChange() {\n\t\tthis._generateStepsOnce();\n\t}\n}\n"],"names":["cva","h"],"mappings":";;;;;;AAAA,MAAM,mBAAmB,GAAG,gYAAgY;;ACG5Z,MAAM,OAAO,GAAGA,WAAG,CAClB,CAAC,YAAY,CAAC,EACd;AACC,IAAA,QAAQ,EAAE;AACT,QAAA,SAAS,EAAE;AACV,YAAA,QAAQ,EAAE,uCAAuC;AACjD,YAAA,UAAU,EAAE;AACZ,SAAA;AACD,QAAA,eAAe,EAAE;AAChB,YAAA,KAAK,EAAE,IAAI;AACX,YAAA,GAAG,EAAE;AACL;AACD,KAAA;AACD,IAAA,gBAAgB,EAAE,CAAC;AAClB,YAAA,SAAS,EAAE,UAAU;AACrB,YAAA,eAAe,EAAE,OAAO;AACxB,YAAA,KAAK,EAAE;SACP;AACD,CAAA,CACD;MAOY,OAAO,GAAA,MAAA;;;;AACnB;;AAEG;IACK,UAAU,GAAW,CAAC;AAE9B;;AAEG;IACK,gBAAgB,GAAY,IAAI;AAExC;;AAEG;IACK,SAAS,GAA8B,YAAY;AAE3D;;AAEG;IACK,KAAK,GAA+B,QAAQ;AAEpD;;AAEG;IACK,eAAe,GAAoB,KAAK;;AAOxC,IAAA,gBAAgB;AAChB,IAAA,eAAe;IAEf,kBAAkB,GAAG,MAAK;AACjC,QAAA,IAAI,IAAI,CAAC,gBAAgB,EAAE;AAC1B,YAAA,YAAY,CAAC,IAAI,CAAC,gBAAgB,CAAC;AACnC,YAAA,IAAI,CAAC,gBAAgB,GAAG,IAAI;;AAG7B,QAAA,IAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC,MAAM,IAAI,CAAC,cAAc,EAAE,EAAE,EAAE,CAAC;AACpE,KAAC;IAE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B,GAAA;QAC3B,IAAI,CAAC,kBAAkB,EAAE;;IAIhB,mBAAmB,GAAA;QAC5B,IAAI,CAAC,kBAAkB,EAAE;;;;;;;;;;;;"}
1
+ {"version":3,"file":"p-stepper.entry.cjs.js","sources":["src/components/organisms/stepper/stepper.component.css?tag=p-stepper&encapsulation=shadow","src/components/organisms/stepper/stepper.component.tsx"],"sourcesContent":["","import { Component, Element, h, Prop, Watch } from '@stencil/core';\nimport { cva } from 'class-variance-authority';\n\nconst stepper = cva(['flex gap-2'], {\n\tvariants: {\n\t\tdirection: {\n\t\t\tvertical: 'w-full flex-col flex-wrap',\n\t\t\thorizontal: 'h-auto items-center',\n\t\t},\n\t},\n});\n\n@Component({\n\ttag: 'p-stepper',\n\tstyleUrl: 'stepper.component.css',\n\tshadow: true,\n})\nexport class Stepper {\n\t/**\n\t * The currently active step\n\t */\n\t@Prop() activeStep: number = 1;\n\n\t/**\n\t * Wether to automatically apply active & finished to items\n\t */\n\t@Prop() enableAutoStatus: boolean = true;\n\n\t/**\n\t * The direction of the stepper\n\t */\n\t@Prop() direction: 'horizontal' | 'vertical' = 'horizontal';\n\n\t/**\n\t * The alignment of the content in case of vertical direction\n\t */\n\t@Prop() align: 'start' | 'center' | 'end' = 'center';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop() contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _generateTimeout: NodeJS.Timeout | undefined;\n\tprivate _resizeObserver: ResizeObserver;\n\n\tprivate _generateStepsOnce = () => {\n\t\tif (this._generateTimeout) {\n\t\t\tclearTimeout(this._generateTimeout);\n\t\t\tthis._generateTimeout = null;\n\t\t}\n\n\t\tthis._generateTimeout = setTimeout(() => this._generateSteps(), 50);\n\t};\n\n\tprivate _generateSteps = async () => {\n\t\tif (!this._el) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet activeStep = this.activeStep - 1 || 0;\n\t\tconst items = this._el.querySelectorAll('p-stepper-item');\n\n\t\tlet directionChanged = false;\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\tif (this.enableAutoStatus) {\n\t\t\t\titem.active = i === activeStep;\n\t\t\t\titem.finished = i < activeStep;\n\t\t\t}\n\n\t\t\tif (!this.activeStep || activeStep < 0) {\n\t\t\t\tif (item.active) {\n\t\t\t\t\tactiveStep = i;\n\t\t\t\t}\n\n\t\t\t\tif (activeStep < 0 && item.finished) {\n\t\t\t\t\tactiveStep = i + 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (item.direction !== this.direction && !directionChanged) {\n\t\t\t\tdirectionChanged = true;\n\t\t\t}\n\n\t\t\titem.number = i + 1;\n\t\t\titem.direction = this.direction;\n\t\t\titem.align = this.direction === 'vertical' ? this.align : 'start';\n\t\t\titem.contentPosition = this.contentPosition;\n\t\t}\n\n\t\tif (directionChanged) {\n\t\t\t// super hacky way to ensure all elements that have a direction changed are re-rendered\n\t\t\tawait new Promise(resolve => setTimeout(resolve, 200));\n\t\t}\n\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\tif (i < items.length - 1) {\n\t\t\t\tlet nextItem = item.nextElementSibling;\n\n\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {\n\t\t\t\t\tconst stepperLine = document.createElement('p-stepper-line');\n\t\t\t\t\tthis._el.insertBefore(stepperLine, nextItem);\n\t\t\t\t\tthis._setStepperLineData(stepperLine, item, nextItem, i, activeStep);\n\n\t\t\t\t\tconst previous = stepperLine.previousElementSibling;\n\t\t\t\t\tif (previous && previous.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\t\tprevious.remove();\n\t\t\t\t\t}\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\tconst stepperLine = nextItem;\n\t\t\t\t\tnextItem = nextItem.nextElementSibling;\n\n\t\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {\n\t\t\t\t\t\tthis._setStepperLineData(\n\t\t\t\t\t\t\tstepperLine,\n\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\tnextItem,\n\t\t\t\t\t\t\ti,\n\t\t\t\t\t\t\tactiveStep\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i > 0) {\n\t\t\t\tconst previousItem = item.previousElementSibling;\n\t\t\t\tif (\n\t\t\t\t\tpreviousItem &&\n\t\t\t\t\tpreviousItem.tagName.toLowerCase() === 'p-stepper-line'\n\t\t\t\t) {\n\t\t\t\t\tpreviousItem.direction = this.direction;\n\t\t\t\t\tpreviousItem.active = item.active || item.finished;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst lines = this._el.querySelectorAll(\n\t\t\t'p-stepper-line:not(:has(+ p-stepper-item)), p-stepper-line:first-child'\n\t\t);\n\t\tfor (let j = lines.length - 1; j >= 0; j--) {\n\t\t\tconst line = lines.item(j);\n\t\t\tline.remove();\n\t\t}\n\t};\n\n\tprivate _setStepperLineData = (\n\t\tstepperLine: HTMLPStepperLineElement,\n\t\titem: HTMLPStepperItemElement,\n\t\tnextItem: HTMLPStepperItemElement,\n\t\ti: number,\n\t\tactiveStep: number\n\t) => {\n\t\tlet heightDiff = item.clientHeight - 24;\n\t\tlet heightDiffNext = nextItem.clientHeight - 24;\n\n\t\tif (this.align === 'center') {\n\t\t\theightDiff = heightDiff / 2;\n\t\t\theightDiffNext = heightDiffNext / 2;\n\t\t}\n\n\t\tstepperLine.direction = this.direction;\n\t\tstepperLine.active = i < activeStep;\n\n\t\tif (heightDiff > 0 && this.direction === 'vertical') {\n\t\t\tlet totalHeight = 0;\n\n\t\t\tstepperLine.style.marginTop = '0';\n\t\t\tstepperLine.style.marginBottom = '0';\n\n\t\t\tif (this.align === 'start' || this.align === 'center') {\n\t\t\t\tstepperLine.style.marginTop = `-${heightDiff / 16}rem`;\n\t\t\t\ttotalHeight += heightDiff;\n\t\t\t}\n\n\t\t\tif (this.align === 'center' || this.align === 'end') {\n\t\t\t\tstepperLine.style.marginBottom = `-${heightDiffNext / 16}rem`;\n\t\t\t\ttotalHeight += heightDiffNext;\n\t\t\t}\n\n\t\t\tstepperLine.style.minHeight = `calc(${totalHeight / 16}rem)`;\n\t\t}\n\t};\n\n\tcomponentDidLoad() {\n\t\tthis._resizeObserver = new ResizeObserver(() => this._generateStepsOnce());\n\t\tthis._resizeObserver.observe(this._el);\n\t}\n\n\tdisconnectCallback() {\n\t\tif (this._resizeObserver) {\n\t\t\tthis._resizeObserver.disconnect();\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclass={stepper({\n\t\t\t\t\tdirection: this.direction,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t<slot onSlotchange={() => this._generateStepsOnce()} />\n\t\t\t</div>\n\t\t);\n\t}\n\n\t@Watch('align')\n\tprotected _onAlignChange() {\n\t\tthis._generateStepsOnce();\n\t}\n\n\t@Watch('direction')\n\tprotected _onDirectionChange() {\n\t\tthis._generateStepsOnce();\n\t}\n\n\t@Watch('activeStep')\n\tprotected _onActiveStepChange() {\n\t\tthis._generateStepsOnce();\n\t}\n}\n"],"names":["cva","h"],"mappings":";;;;;;AAAA,MAAM,mBAAmB,GAAG,wSAAwS;;ACGpU,MAAM,OAAO,GAAGA,WAAG,CAAC,CAAC,YAAY,CAAC,EAAE;AACnC,IAAA,QAAQ,EAAE;AACT,QAAA,SAAS,EAAE;AACV,YAAA,QAAQ,EAAE,2BAA2B;AACrC,YAAA,UAAU,EAAE,qBAAqB;AACjC,SAAA;AACD,KAAA;AACD,CAAA,CAAC;MAOW,OAAO,GAAA,MAAA;;;;AACnB;;AAEG;IACK,UAAU,GAAW,CAAC;AAE9B;;AAEG;IACK,gBAAgB,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A,IAAI,IAAI,CAAC,eAAe,EAAE;AACzB,YAAA,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE;;;IAInC,MAAM,GAAA;AACL,QAAA,QACCC,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACC,KAAK,EAAE,OAAO,CAAC;gBACd,SAAS,EAAE,IAAI,CAAC,SAAS;aACzB,CAAC,EAAA,EAEFA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,YAAY,EAAE,MAAM,IAAI,CAAC,kBAAkB,EAAE,EAAA,CAAI,CAClD;;IAKE,cAAc,GAAA;QACvB,IAAI,CAAC,kBAAkB,EAAE;;IAIhB,kBAAkB,GAAA;QAC3B,IAAI,CAAC,kBAAkB,EAAE;;IAIhB,mBAAmB,GAAA;QAC5B,IAAI,CAAC,kBAAkB,EAAE;;;;;;;;;;;;"}
@@ -58,7 +58,7 @@ const Toast = class {
58
58
  */
59
59
  action;
60
60
  render() {
61
- return (index.h(index.Host, { key: '06a0d2cab072cf70299668a4a541f9d94f3008e9', onClick: () => this._onClick() }, index.h("div", { key: 'da173c03012d63bf72a36babd3c7b3e10fb9d04d', class: indicator({ variant: this.variant }) }), index.h("div", { key: 'd967e9541d86003bd6dde2380d2b0f67efb0ec75', class: content() }, index.h("div", { key: '4c77f29e21958c9f530fe804e454e90645c3a4e8', class: 'flex w-full min-w-0 flex-col' }, index.h("p", { key: '3e831a294a86bccae2fe8532db4bca655e6c1e53', class: 'm-0 overflow-hidden text-ellipsis whitespace-nowrap text-sm font-semibold text-white-500' }, this.header?.length ? this.header : index.h("slot", { name: 'header' })), index.h("p", { key: '80b9b8f37cfa62722ee2a651a1604b0530848a0d', class: 'm-0 w-full overflow-hidden text-ellipsis whitespace-nowrap text-xs text-dark-teal-200' }, this.content?.length ? this.content : index.h("slot", { name: 'content' }))), this.enableAction && (index.h("p-button", { key: 'a211f4486eb1b520341e83f1578b7ba6b488c8e8', variant: 'transparent', iconOnly: true, icon: this.actionIcon, iconFlip: this.actionIconFlip, iconRotate: this.actionIconRotate, class: 'flex-shrink-0' })))));
61
+ return (index.h(index.Host, { key: '7c2874fbba97c8fe5f6e3592ef02f5096b8776fb', onClick: () => this._onClick() }, index.h("div", { key: '11764a3b0c3935827929a3292c599667b95b25e3', class: indicator({ variant: this.variant }) }), index.h("div", { key: '80109f534d14e600643d69fe119a65ef2cc33d2f', class: content() }, index.h("div", { key: '681e62cb17ed77140520c65832374716e4ffa612', class: 'flex w-full min-w-0 flex-col' }, index.h("p", { key: '21ce7a2095920227008192e1c90e7fc8515faee3', class: 'm-0 overflow-hidden text-ellipsis whitespace-nowrap text-sm font-semibold text-white-500' }, this.header?.length ? this.header : index.h("slot", { name: 'header' })), index.h("p", { key: '1153f6ed724e56a0ed671910dc756b1e9343a249', class: 'm-0 w-full overflow-hidden text-ellipsis whitespace-nowrap text-xs text-dark-teal-200' }, this.content?.length ? this.content : index.h("slot", { name: 'content' }))), this.enableAction && (index.h("p-button", { key: '6fd6786d8474df0da1d57d7954422e59eaa71cac', variant: 'transparent', iconOnly: true, icon: this.actionIcon, iconFlip: this.actionIconFlip, iconRotate: this.actionIconRotate, class: 'flex-shrink-0' })))));
62
62
  }
63
63
  _onClick() {
64
64
  if (this.enableAction) {
@@ -1 +1 @@
1
- *{box-sizing:border-box}.static{position:static!important}.flex{display:flex!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.flex-row-reverse{flex-direction:row-reverse!important}.items-start{align-items:flex-start!important}.items-end{align-items:flex-end!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.gap-2{gap:.5rem!important}.rounded-full{border-radius:9999px!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-dark-teal-400{--tw-border-opacity:1!important;border-color:rgb(51 116 109/var(--tw-border-opacity,1))!important}.bg-dark-teal-400{--tw-bg-opacity:1!important;background-color:rgb(51 116 109/var(--tw-bg-opacity,1))!important}.bg-dark-teal-50{--tw-bg-opacity:1!important;background-color:rgb(229 238 237/var(--tw-bg-opacity,1))!important}.text-center{text-align:center!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-medium{font-weight:500!important}.text-black-teal-400{--tw-text-opacity:1!important;color:rgb(53 85 80/var(--tw-text-opacity,1))!important}.text-black-teal-500{--tw-text-opacity:1!important;color:rgb(3 42 36/var(--tw-text-opacity,1))!important}.text-dark-teal-400{--tw-text-opacity:1!important;color:rgb(51 116 109/var(--tw-text-opacity,1))!important}.text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}
1
+ *{box-sizing:border-box}.static{position:static!important}.flex{display:flex!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.flex-1{flex:1 1 0%!important}.flex-row-reverse{flex-direction:row-reverse!important}.items-start{align-items:flex-start!important}.items-end{align-items:flex-end!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.gap-2{gap:.5rem!important}.rounded-full{border-radius:9999px!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-dark-teal-400{--tw-border-opacity:1!important;border-color:rgb(51 116 109/var(--tw-border-opacity,1))!important}.bg-dark-teal-400{--tw-bg-opacity:1!important;background-color:rgb(51 116 109/var(--tw-bg-opacity,1))!important}.bg-dark-teal-50{--tw-bg-opacity:1!important;background-color:rgb(229 238 237/var(--tw-bg-opacity,1))!important}.text-center{text-align:center!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-medium{font-weight:500!important}.text-black-teal-400{--tw-text-opacity:1!important;color:rgb(53 85 80/var(--tw-text-opacity,1))!important}.text-black-teal-500{--tw-text-opacity:1!important;color:rgb(3 42 36/var(--tw-text-opacity,1))!important}.text-dark-teal-400{--tw-text-opacity:1!important;color:rgb(51 116 109/var(--tw-text-opacity,1))!important}.text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}
@@ -10,26 +10,31 @@ const item = cva('flex gap-2', {
10
10
  },
11
11
  contentPosition: {
12
12
  start: 'flex-row-reverse',
13
- end: null
13
+ end: null,
14
14
  },
15
- }
15
+ },
16
16
  });
17
- const circle = cva(['h-6 w-6 flex items-center justify-center', 'text-sm text-center font-medium', 'border border-solid border-dark-teal-400', 'rounded-full'], {
17
+ const circle = cva([
18
+ 'h-6 w-6 flex items-center justify-center',
19
+ 'text-sm text-center font-medium',
20
+ 'border border-solid border-dark-teal-400',
21
+ 'rounded-full',
22
+ ], {
18
23
  variants: {
19
24
  finished: {
20
25
  true: null,
21
- false: null
26
+ false: null,
22
27
  },
23
28
  active: {
24
29
  true: null,
25
- false: null
26
- }
30
+ false: null,
31
+ },
27
32
  },
28
33
  compoundVariants: [
29
34
  {
30
35
  finished: false,
31
36
  active: false,
32
- class: 'text-dark-teal-400 bg-dark-teal-50'
37
+ class: 'text-dark-teal-400 bg-dark-teal-50',
33
38
  },
34
39
  {
35
40
  active: true,
@@ -40,25 +45,25 @@ const circle = cva(['h-6 w-6 flex items-center justify-center', 'text-sm text-ce
40
45
  active: false,
41
46
  finished: true,
42
47
  class: 'text-white bg-dark-teal-400',
43
- }
44
- ]
48
+ },
49
+ ],
45
50
  });
46
- const content = cva('text-sm font-medium', {
51
+ const content = cva('text-sm font-medium flex-1', {
47
52
  variants: {
48
53
  finished: {
49
54
  true: null,
50
- false: null
55
+ false: null,
51
56
  },
52
57
  active: {
53
58
  true: null,
54
- false: null
55
- }
59
+ false: null,
60
+ },
56
61
  },
57
62
  compoundVariants: [
58
63
  {
59
64
  finished: false,
60
65
  active: false,
61
- class: 'text-black-teal-400'
66
+ class: 'text-black-teal-400',
62
67
  },
63
68
  {
64
69
  active: true,
@@ -69,8 +74,8 @@ const content = cva('text-sm font-medium', {
69
74
  active: false,
70
75
  finished: true,
71
76
  class: 'text-black-teal-500',
72
- }
73
- ]
77
+ },
78
+ ],
74
79
  });
75
80
  export class StepperItem {
76
81
  /**
@@ -94,16 +99,16 @@ export class StepperItem {
94
99
  */
95
100
  active = false;
96
101
  render() {
97
- return (h("div", { key: '735e108b939c47a411ae79ccb1e1232dd1043dc9', class: item({
102
+ return (h("div", { key: '370271d4be56bd4caf5d95ef7d1674996355d464', class: item({
98
103
  align: this.align,
99
- contentPosition: this.contentPosition
100
- }) }, h("div", { key: '57da032e1162eac2f92b49ca7fea53af1fbede14', class: circle({
104
+ contentPosition: this.contentPosition,
105
+ }) }, h("div", { key: '69f53b49846faebade7d31b28be925eb69457520', class: circle({
101
106
  active: asBoolean(this.active),
102
- finished: asBoolean(this.finished)
103
- }) }, this.number), h("div", { key: 'c82c13a351fbeba0232d4094883e5008a12fd105', class: content({
107
+ finished: asBoolean(this.finished),
108
+ }) }, this.number), h("div", { key: '406f3c2f79b45b170153527ace5815082b63fead', class: content({
104
109
  active: asBoolean(this.active),
105
- finished: asBoolean(this.finished)
106
- }) }, h("slot", { key: 'd72d3471e83da48b1b1d2a2aeccce8f7acd98d99' }))));
110
+ finished: asBoolean(this.finished),
111
+ }) }, h("slot", { key: '35b81d821930911a114ac2af16555e8491b8ca0f' }))));
107
112
  }
108
113
  static get is() { return "p-stepper-item"; }
109
114
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"stepper-item.component.js","sourceRoot":"","sources":["../../../../../src/components/atoms/stepper/item/stepper-item.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,MAAM,IAAI,GAAG,GAAG,CACf,YAAY,EACZ;IACC,QAAQ,EAAE;QACT,KAAK,EAAE;YACN,KAAK,EAAE,aAAa;YACpB,MAAM,EAAE,cAAc;YACtB,GAAG,EAAE,WAAW;SAChB;QACD,eAAe,EAAE;YAChB,KAAK,EAAE,kBAAkB;YACzB,GAAG,EAAE,IAAI;SACT;KACD;CACD,CACD,CAAC;AAE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;IACK,QAAQ,GAAY,KAAK,CAAC;IAElC;;OAEG;IACK,MAAM,GAAY,KAAK,CAAC;IAEhC,MAAM;QACL,OAAO,CACN,4DAAK,KAAK,EAAE,IAAI,CAAC;gBAChB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,eAAe,EAAE,IAAI,CAAC,eAAe;aACrC,CAAC;YACD,4DAAK,KAAK,EAAE,MAAM,CAAC;oBAClB,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;oBAC9B,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;iBAClC,CAAC,IACA,IAAI,CAAC,MAAM,CACP;YACN,4DAAK,KAAK,EAAE,OAAO,CAAC;oBACnB,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;oBAC9B,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;iBAClC,CAAC;gBACD,8DAAQ,CACH,CACD,CACN,CAAC;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, h, Prop } from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { asBoolean } from '../../../../utils/as-boolean';\n\nconst item = cva(\n\t'flex gap-2',\n\t{\n\t\tvariants: {\n\t\t\talign: {\n\t\t\t\tstart: 'items-start',\n\t\t\t\tcenter: 'items-center',\n\t\t\t\tend: 'items-end',\n\t\t\t},\n\t\t\tcontentPosition: {\n\t\t\t\tstart: 'flex-row-reverse',\n\t\t\t\tend: null\n\t\t\t},\n\t\t}\n\t}\n);\n\nconst circle = cva(['h-6 w-6 flex items-center justify-center', 'text-sm text-center font-medium', 'border border-solid border-dark-teal-400', 'rounded-full'], {\n\tvariants: {\n\t\tfinished: {\n\t\t\ttrue: null,\n\t\t\tfalse: null\n\t\t},\n\t\tactive: {\n\t\t\ttrue: null,\n\t\t\tfalse: null\n\t\t}\n\t},\n\tcompoundVariants: [\n\t\t{\n\t\t\tfinished: false,\n\t\t\tactive: false,\n\t\t\tclass: 'text-dark-teal-400 bg-dark-teal-50'\n\t\t},\n\t\t{\n\t\t\tactive: true,\n\t\t\tfinished: false,\n\t\t\tclass: 'text-white bg-dark-teal-400',\n\t\t},\n\t\t{\n\t\t\tactive: false,\n\t\t\tfinished: true,\n\t\t\tclass: 'text-white bg-dark-teal-400',\n\n\t\t}\n\t]\n})\n\nconst content = cva('text-sm font-medium', {\n\tvariants: {\n\t\tfinished: {\n\t\t\ttrue: null,\n\t\t\tfalse: null\n\t\t},\n\t\tactive: {\n\t\t\ttrue: null,\n\t\t\tfalse: null\n\t\t}\n\t},\n\tcompoundVariants: [\n\t\t{\n\t\t\tfinished: false,\n\t\t\tactive: false,\n\t\t\tclass: 'text-black-teal-400'\n\t\t},\n\t\t{\n\t\t\tactive: true,\n\t\t\tfinished: false,\n\t\t\tclass: 'text-black-teal-500',\n\t\t},\n\t\t{\n\t\t\tactive: false,\n\t\t\tfinished: true,\n\t\t\tclass: 'text-black-teal-500',\n\n\t\t}\n\t]\n})\n\n@Component({\n\ttag: 'p-stepper-item',\n\tstyleUrl: 'stepper-item.component.css',\n\tshadow: true,\n})\nexport class StepperItem {\n\t/**\n\t * The number of the step\n\t */\n\t@Prop() number: number = 1;\n\n\t/**\n\t * The alignment of the content in case of vertical direction\n\t */\n\t@Prop() align: 'start' | 'center' | 'end' = 'center';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop() contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * Wether the step is finished\n\t */\n\t@Prop() finished: boolean = false;\n\n\t/**\n\t * Wether the step is active\n\t */\n\t@Prop() active: boolean = false;\n\n\trender() {\n\t\treturn (\n\t\t\t<div class={item({\n\t\t\t\talign: this.align,\n\t\t\t\tcontentPosition: this.contentPosition\n\t\t\t})}>\n\t\t\t\t<div class={circle({\n\t\t\t\t\tactive: asBoolean(this.active),\n\t\t\t\t\tfinished: asBoolean(this.finished)\n\t\t\t\t})}>\n\t\t\t\t\t{this.number}\n\t\t\t\t</div>\n\t\t\t\t<div class={content({\n\t\t\t\t\tactive: asBoolean(this.active),\n\t\t\t\t\tfinished: asBoolean(this.finished)\n\t\t\t\t})}>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
1
+ {"version":3,"file":"stepper-item.component.js","sourceRoot":"","sources":["../../../../../src/components/atoms/stepper/item/stepper-item.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,MAAM,IAAI,GAAG,GAAG,CAAC,YAAY,EAAE;IAC9B,QAAQ,EAAE;QACT,KAAK,EAAE;YACN,KAAK,EAAE,aAAa;YACpB,MAAM,EAAE,cAAc;YACtB,GAAG,EAAE,WAAW;SAChB;QACD,eAAe,EAAE;YAChB,KAAK,EAAE,kBAAkB;YACzB,GAAG,EAAE,IAAI;SACT;KACD;CACD,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,GAAG,CACjB;IACC,0CAA0C;IAC1C,iCAAiC;IACjC,0CAA0C;IAC1C,cAAc;CACd,EACD;IACC,QAAQ,EAAE;QACT,QAAQ,EAAE;YACT,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,IAAI;SACX;QACD,MAAM,EAAE;YACP,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,IAAI;SACX;KACD;IACD,gBAAgB,EAAE;QACjB;YACC,QAAQ,EAAE,KAAK;YACf,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,oCAAoC;SAC3C;QACD;YACC,MAAM,EAAE,IAAI;YACZ,QAAQ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ACN,4DACC,KAAK,EAAE,OAAO,CAAC;oBACd,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;oBAC9B,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;iBAClC,CAAC;gBAEF,8DAAQ,CACH,CACD,CACN,CAAC;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, h, Prop } from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { asBoolean } from '../../../../utils/as-boolean';\n\nconst item = cva('flex gap-2', {\n\tvariants: {\n\t\talign: {\n\t\t\tstart: 'items-start',\n\t\t\tcenter: 'items-center',\n\t\t\tend: 'items-end',\n\t\t},\n\t\tcontentPosition: {\n\t\t\tstart: 'flex-row-reverse',\n\t\t\tend: null,\n\t\t},\n\t},\n});\n\nconst circle = cva(\n\t[\n\t\t'h-6 w-6 flex items-center justify-center',\n\t\t'text-sm text-center font-medium',\n\t\t'border border-solid border-dark-teal-400',\n\t\t'rounded-full',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tfinished: {\n\t\t\t\ttrue: null,\n\t\t\t\tfalse: null,\n\t\t\t},\n\t\t\tactive: {\n\t\t\t\ttrue: null,\n\t\t\t\tfalse: null,\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{\n\t\t\t\tfinished: false,\n\t\t\t\tactive: false,\n\t\t\t\tclass: 'text-dark-teal-400 bg-dark-teal-50',\n\t\t\t},\n\t\t\t{\n\t\t\t\tactive: true,\n\t\t\t\tfinished: false,\n\t\t\t\tclass: 'text-white bg-dark-teal-400',\n\t\t\t},\n\t\t\t{\n\t\t\t\tactive: false,\n\t\t\t\tfinished: true,\n\t\t\t\tclass: 'text-white bg-dark-teal-400',\n\t\t\t},\n\t\t],\n\t}\n);\n\nconst content = cva('text-sm font-medium flex-1', {\n\tvariants: {\n\t\tfinished: {\n\t\t\ttrue: null,\n\t\t\tfalse: null,\n\t\t},\n\t\tactive: {\n\t\t\ttrue: null,\n\t\t\tfalse: null,\n\t\t},\n\t},\n\tcompoundVariants: [\n\t\t{\n\t\t\tfinished: false,\n\t\t\tactive: false,\n\t\t\tclass: 'text-black-teal-400',\n\t\t},\n\t\t{\n\t\t\tactive: true,\n\t\t\tfinished: false,\n\t\t\tclass: 'text-black-teal-500',\n\t\t},\n\t\t{\n\t\t\tactive: false,\n\t\t\tfinished: true,\n\t\t\tclass: 'text-black-teal-500',\n\t\t},\n\t],\n});\n\n@Component({\n\ttag: 'p-stepper-item',\n\tstyleUrl: 'stepper-item.component.css',\n\tshadow: true,\n})\nexport class StepperItem {\n\t/**\n\t * The number of the step\n\t */\n\t@Prop() number: number = 1;\n\n\t/**\n\t * The alignment of the content in case of vertical direction\n\t */\n\t@Prop() align: 'start' | 'center' | 'end' = 'center';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop() contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * Wether the step is finished\n\t */\n\t@Prop() finished: boolean = false;\n\n\t/**\n\t * Wether the step is active\n\t */\n\t@Prop() active: boolean = false;\n\n\trender() {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclass={item({\n\t\t\t\t\talign: this.align,\n\t\t\t\t\tcontentPosition: this.contentPosition,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclass={circle({\n\t\t\t\t\t\tactive: asBoolean(this.active),\n\t\t\t\t\t\tfinished: asBoolean(this.finished),\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{this.number}\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tclass={content({\n\t\t\t\t\t\tactive: asBoolean(this.active),\n\t\t\t\t\t\tfinished: asBoolean(this.finished),\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
@@ -90,22 +90,19 @@ export class Attachment {
90
90
  _cameraFileRef;
91
91
  render() {
92
92
  let prefix = (h("p-icon", { key: '98d1184d2cd2c229ec68045e1a57ebc6e77b771c', class: 'text-black-teal-300', variant: 'attachment' }));
93
- if (this.loading) {
94
- prefix = h("p-loader", { key: 'c7b5719acde0493005d9a999773f3941e3ea0c74', color: 'white' });
95
- }
96
93
  if (this.error) {
97
- prefix = (h("p-icon", { key: '31c9e87b595b1b5d63f87a8b949c2188a7df15df', variant: 'warning', class: 'text-negative-red' }));
94
+ prefix = (h("p-icon", { key: '6bdf7a757ba3d4f9614ae0ff1d0ae4aab23bed94', variant: 'warning', class: 'text-negative-red' }));
98
95
  }
99
96
  // const isMobileDevice = isMobile();
100
97
  const isMobileDevice = isTablet();
101
98
  const baseText = 'min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-sm';
102
- return (h(Fragment, { key: 'cf9bab100de1dd9ecc09d934503b52d460d776bf' }, h("p-field-container", { key: '223ff93d594b77fb7375dfbfcf2e465bd811afe1', variant: 'write', label: this.label, helper: this.helper, error: this.error, required: this.required, forceShowTooltip: !!this.error?.length }, h("div", { key: 'b9c2b692b6729c75fa14c840b32426dbc7c24b1d', slot: 'content', class: 'flex w-full items-start gap-2' }, h("div", { key: '538917ada65d116c13150422d812e0978109f5aa', class: attachment({
99
+ return (h(Fragment, { key: 'd0c314631138f0418a71130e3506c9c24bb11f3e' }, h("p-field-container", { key: 'f11e3dc93b47c63025abde1bfc03f0cc64b6a050', variant: 'write', label: this.label, helper: this.helper, error: this.error, required: this.required, forceShowTooltip: !!this.error?.length }, h("div", { key: 'dd8fb0529546118b6e39215f83bee385bb413aec', slot: 'content', class: 'flex w-full items-start gap-2' }, h("div", { key: 'b9263a22549e5cef936ac178b2c8277caa96ffc8', class: attachment({
103
100
  error: !!this.error?.length,
104
- }) }, prefix, h("span", { key: '3eed62fd70d4d68602547bc1df64d3f4f80f309e', class: cn(baseText, 'peer empty:hidden') }, this.value), h("span", { key: 'fd31f8e559e2e4f97595dd55a7f8cfc84103bef5', class: cn(baseText, 'hidden peer-empty:block') }, this.placeholder)), h("p-tooltip", { key: 'dd546d986fe7f3a9cdd44038a12c0f349ab36d1d', content: this.mode === 'read'
101
+ }) }, prefix, h("span", { key: '47cc0ed86d0996a2575785f05f93e7e8075a0a7f', class: cn(baseText, 'peer empty:hidden') }, this.value), h("span", { key: '6a6c0feccdff8f71924e2461ec011ff6379f3556', class: cn(baseText, 'hidden peer-empty:block') }, this.placeholder)), h("p-tooltip", { key: '6d4fbee5737e6bfbcd03d202e4f8b7606fa4eded', content: this.mode === 'read'
105
102
  ? this.downloadTooltip
106
103
  : this.value?.length
107
104
  ? this.deleteTooltip
108
- : this.uploadTooltip }, h("p-button", { key: 'e1dfca67f00cca2dec1bc65c6d011c88a4b2c372', slot: 'trigger', variant: 'secondary', iconOnly: true, icon: this.mode === 'read'
105
+ : this.uploadTooltip }, h("p-button", { key: 'b493da0c5ac7ae1bd791b8fc72d272cb5b10a42a', slot: 'trigger', variant: 'secondary', iconOnly: true, icon: this.mode === 'read'
109
106
  ? 'download'
110
107
  : this.value?.length
111
108
  ? 'trash'
@@ -116,7 +113,7 @@ export class Attachment {
116
113
  : this.delete).emit() })), this.enableCameraOnMobile &&
117
114
  this.mode === 'write' &&
118
115
  isMobileDevice &&
119
- !this.value?.length && (h("p-tooltip", { key: '4549ea82a571f35bf5afe992ffe6e0423be85bfd', content: this.cameraTooltip, class: 'desktop-xs:hidden' }, h("p-button", { key: 'b4fb61645f2908a77ee3ea186330dfc4281cae96', slot: 'trigger', variant: 'secondary', iconOnly: true, icon: 'camera', onOnClick: () => this._cameraClick() }))))), h("input", { key: 'fa1b6e709f72cca737f1225e22f0781dedc07536', class: 'hidden', type: 'file', accept: Array.isArray(this.accept) ? this.accept?.join(',') : this.accept, ref: el => (this._fileRef = el), onChange: ev => this._onFileChange(ev) }), h("input", { key: 'ebc5d19fa3d8ec3e1d380a9298609c6fafccfcc9', class: 'hidden', type: 'file', accept: 'image/*', capture: 'true', ref: el => (this._cameraFileRef = el), onChange: ev => this._onFileChange(ev) })));
116
+ !this.value?.length && (h("p-tooltip", { key: '236de11a856b0f701ef79251aa2e4586ddd57900', content: this.cameraTooltip, class: 'desktop-xs:hidden' }, h("p-button", { key: '127ffe5ef98d6c5eea7be990e3631a3f066f1c7d', slot: 'trigger', variant: 'secondary', iconOnly: true, icon: 'camera', onOnClick: () => this._cameraClick() }))))), h("input", { key: '501a70ea7830308f1b53f516a0db4c671bd5aeb7', class: 'hidden', type: 'file', accept: Array.isArray(this.accept) ? this.accept?.join(',') : this.accept, ref: el => (this._fileRef = el), onChange: ev => this._onFileChange(ev) }), h("input", { key: '9be1eca163d4945987e2329d98f50a73f3f8cb2e', class: 'hidden', type: 'file', accept: 'image/*', capture: 'true', ref: el => (this._cameraFileRef = el), onChange: ev => this._onFileChange(ev) })));
120
117
  }
121
118
  _uploadClick() {
122
119
  if (!this._fileRef || this.mode !== 'write') {
@@ -1 +1 @@
1
- {"version":3,"file":"attachment.component.js","sourceRoot":"","sources":["../../../../src/components/molecules/attachment/attachment.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,SAAS,EACT,KAAK,EAEL,QAAQ,EACR,CAAC,EACD,IAAI,GACJ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,MAAM,UAAU,GAAG,GAAG,CACrB;IACC,8CAA8C;IAC9C,6BAA6B;IAC7B,kCAAkC;CAClC,EACD;IACC,QAAQ,EAAE;QACT,KAAK,EAAE;YACN,KAAK,EAAE,wDAAwD;YAC/D,IAAI,EAAE,qBAAqB;SAC3B;KACD;CACD,CACD,CAAC;AAOF,MAAM,OAAO,UAAU;IACtB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Q,CAAC,KAAK,GAAG,EAAE,CAAC;QAC1B,CAAC;QAED,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YACzB,IAAI,CAAC,cAAc,CAAC,KAAK,GAAG,EAAE,CAAC;QAChC,CAAC;QAED,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACtB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import {\n\tComponent,\n\tEvent,\n\tEventEmitter,\n\tFragment,\n\th,\n\tProp,\n} from '@stencil/core';\nimport { cn, isMobile, isTablet } from '../../../utils';\nimport { cva } from 'class-variance-authority';\n\nconst attachment = cva(\n\t[\n\t\t'flex flex-1 items-center justify-start gap-2',\n\t\t'h-8 min-w-0 px-2 rounded-lg',\n\t\t'border border-solid bg-white-600',\n\t],\n\t{\n\t\tvariants: {\n\t\t\terror: {\n\t\t\t\tfalse: 'bg-white-600 border-black-teal-100 text-black-teal-200',\n\t\t\t\ttrue: 'border-negative-red',\n\t\t\t},\n\t\t},\n\t}\n);\n\n@Component({\n\ttag: 'p-attachment',\n\tstyleUrl: 'attachment.component.css',\n\tshadow: true,\n})\nexport class Attachment {\n\t/**\n\t * Wether to enable the camera button on mobile\n\t */\n\t@Prop() enableCameraOnMobile = false;\n\n\t/**\n\t * The value of the attachment (usually the file name)\n\t */\n\t@Prop() value: string;\n\n\t/**\n\t * The fileID to use to track the file\n\t */\n\t@Prop() fileId: string;\n\n\t/**\n\t * The type of files to accept\n\t */\n\t@Prop() accept: string[] | string = null;\n\n\t/**\n\t * The label of the attachment\n\t */\n\t@Prop() label: string | HTMLSlotElement;\n\n\t/**\n\t * The helper of the attachment\n\t */\n\t@Prop() helper: string | HTMLSlotElement;\n\n\t/**\n\t * Wether the attachment is required\n\t */\n\t@Prop({ reflect: true }) required = true;\n\n\t/**\n\t * The variant of the attachment\n\t */\n\t@Prop() mode: 'read' | 'write' = 'read';\n\n\t/**\n\t * The placeholder of the attachment\n\t */\n\t@Prop() placeholder: string = 'Upload a file...';\n\n\t/**\n\t * The text for the camera tooltip\n\t */\n\t@Prop() cameraTooltip: string = 'Camera';\n\n\t/**\n\t * The text for the download tooltip\n\t */\n\t@Prop() downloadTooltip: string = 'Download';\n\n\t/**\n\t * The text for the upload tooltip\n\t */\n\t@Prop() uploadTooltip: string = 'Upload';\n\n\t/**\n\t * The text for the delete tooltip\n\t */\n\t@Prop() deleteTooltip: string = 'Delete';\n\n\t/**\n\t * Wether the attachment is loading\n\t */\n\t@Prop() loading = false;\n\n\t/**\n\t * The error to show\n\t */\n\t@Prop() error: string;\n\n\t/**\n\t * Event when upload is pressed\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tupload: EventEmitter<{\n\t\tfile: File;\n\t\tfileId: string;\n\t\tresult: string;\n\t}>;\n\n\t/**\n\t * Event when download is pressed\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tdownload: EventEmitter<void>;\n\n\t/**\n\t * Event when delete is pressed\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tdelete: EventEmitter<void>;\n\n\tprivate _fileRef: HTMLInputElement;\n\tprivate _cameraFileRef: HTMLInputElement;\n\n\trender() {\n\t\tlet prefix = (\n\t\t\t<p-icon\n\t\t\t\tclass='text-black-teal-300'\n\t\t\t\tvariant='attachment'\n\t\t\t/>\n\t\t);\n\n\t\tif (this.loading) {\n\t\t\tprefix = <p-loader color='white' />;\n\t\t}\n\n\t\tif (this.error) {\n\t\t\tprefix = (\n\t\t\t\t<p-icon\n\t\t\t\t\tvariant='warning'\n\t\t\t\t\tclass='text-negative-red'\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\t// const isMobileDevice = isMobile();\n\t\tconst isMobileDevice = isTablet();\n\n\t\tconst baseText =\n\t\t\t'min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-sm';\n\t\treturn (\n\t\t\t<Fragment>\n\t\t\t\t<p-field-container\n\t\t\t\t\tvariant='write'\n\t\t\t\t\tlabel={this.label}\n\t\t\t\t\thelper={this.helper}\n\t\t\t\t\terror={this.error}\n\t\t\t\t\trequired={this.required}\n\t\t\t\t\tforceShowTooltip={!!this.error?.length}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tslot='content'\n\t\t\t\t\t\tclass='flex w-full items-start gap-2'\n\t\t\t\t\t>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass={attachment({\n\t\t\t\t\t\t\t\terror: !!this.error?.length,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{prefix}\n\n\t\t\t\t\t\t\t<span class={cn(baseText, 'peer empty:hidden')}>\n\t\t\t\t\t\t\t\t{this.value}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span class={cn(baseText, 'hidden peer-empty:block')}>\n\t\t\t\t\t\t\t\t{this.placeholder}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<p-tooltip\n\t\t\t\t\t\t\tcontent={\n\t\t\t\t\t\t\t\tthis.mode === 'read'\n\t\t\t\t\t\t\t\t\t? this.downloadTooltip\n\t\t\t\t\t\t\t\t\t: this.value?.length\n\t\t\t\t\t\t\t\t\t? this.deleteTooltip\n\t\t\t\t\t\t\t\t\t: this.uploadTooltip\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<p-button\n\t\t\t\t\t\t\t\tslot='trigger'\n\t\t\t\t\t\t\t\tvariant='secondary'\n\t\t\t\t\t\t\t\ticonOnly={true}\n\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\tthis.mode === 'read'\n\t\t\t\t\t\t\t\t\t\t? 'download'\n\t\t\t\t\t\t\t\t\t\t: this.value?.length\n\t\t\t\t\t\t\t\t\t\t? 'trash'\n\t\t\t\t\t\t\t\t\t\t: 'upload'\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdisabled={this.loading}\n\t\t\t\t\t\t\t\tloading={this.loading}\n\t\t\t\t\t\t\t\tonOnClick={() =>\n\t\t\t\t\t\t\t\t\tthis.mode === 'write' && !this.value?.length\n\t\t\t\t\t\t\t\t\t\t? this._uploadClick()\n\t\t\t\t\t\t\t\t\t\t: (this.mode === 'read'\n\t\t\t\t\t\t\t\t\t\t\t\t? this.download\n\t\t\t\t\t\t\t\t\t\t\t\t: this.delete\n\t\t\t\t\t\t\t\t\t\t ).emit()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</p-tooltip>\n\n\t\t\t\t\t\t{this.enableCameraOnMobile &&\n\t\t\t\t\t\t\tthis.mode === 'write' &&\n\t\t\t\t\t\t\tisMobileDevice &&\n\t\t\t\t\t\t\t!this.value?.length && (\n\t\t\t\t\t\t\t\t<p-tooltip\n\t\t\t\t\t\t\t\t\tcontent={this.cameraTooltip}\n\t\t\t\t\t\t\t\t\tclass='desktop-xs:hidden'\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<p-button\n\t\t\t\t\t\t\t\t\t\tslot='trigger'\n\t\t\t\t\t\t\t\t\t\tvariant='secondary'\n\t\t\t\t\t\t\t\t\t\ticonOnly={true}\n\t\t\t\t\t\t\t\t\t\ticon='camera'\n\t\t\t\t\t\t\t\t\t\tonOnClick={() => this._cameraClick()}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</p-tooltip>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</p-field-container>\n\n\t\t\t\t<input\n\t\t\t\t\tclass='hidden'\n\t\t\t\t\ttype='file'\n\t\t\t\t\taccept={\n\t\t\t\t\t\tArray.isArray(this.accept) ? this.accept?.join(',') : this.accept\n\t\t\t\t\t}\n\t\t\t\t\tref={el => (this._fileRef = el)}\n\t\t\t\t\tonChange={ev => this._onFileChange(ev)}\n\t\t\t\t/>\n\n\t\t\t\t<input\n\t\t\t\t\tclass='hidden'\n\t\t\t\t\ttype='file'\n\t\t\t\t\taccept='image/*'\n\t\t\t\t\tcapture='true'\n\t\t\t\t\tref={el => (this._cameraFileRef = el)}\n\t\t\t\t\tonChange={ev => this._onFileChange(ev)}\n\t\t\t\t/>\n\t\t\t</Fragment>\n\t\t);\n\t}\n\n\tprivate _uploadClick() {\n\t\tif (!this._fileRef || this.mode !== 'write') {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._fileRef.click();\n\t}\n\n\tprivate _cameraClick() {\n\t\tif (!this.enableCameraOnMobile || isMobile()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._cameraFileRef || this.mode !== 'write') {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._cameraFileRef?.click();\n\t}\n\n\tprivate _onFileChange(ev: Event) {\n\t\tconst target = ev.target as HTMLInputElement;\n\t\tconst file = target.files?.[0];\n\n\t\tif (file) {\n\t\t\tthis.loading = true;\n\n\t\t\tconst reader = new FileReader();\n\t\t\treader.onload = (e: any) => this._onLoad(file, e?.currentTarget?.result);\n\t\t\treader.readAsDataURL(file);\n\t\t}\n\t}\n\n\tprivate _onLoad(file: File, result: string) {\n\t\tthis.upload.emit({\n\t\t\tfileId: this.fileId,\n\t\t\tresult,\n\t\t\tfile,\n\t\t});\n\n\t\tif (this._fileRef) {\n\t\t\tthis._fileRef.value = '';\n\t\t}\n\n\t\tif (this._cameraFileRef) {\n\t\t\tthis._cameraFileRef.value = '';\n\t\t}\n\n\t\tthis.loading = false;\n\t}\n}\n"]}
1
+ {"version":3,"file":"attachment.component.js","sourceRoot":"","sources":["../../../../src/components/molecules/attachment/attachment.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,SAAS,EACT,KAAK,EAEL,QAAQ,EACR,CAAC,EACD,IAAI,GACJ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,MAAM,UAAU,GAAG,GAAG,CACrB;IACC,8CAA8C;IAC9C,6BAA6B;IAC7B,kCAAkC;CAClC,EACD;IACC,QAAQ,EAAE;QACT,KAAK,EAAE;YACN,KAAK,EAAE,wDAAwD;YAC/D,IAAI,EAAE,qBAAqB;SAC3B;KACD;CACD,CACD,CAAC;AAOF,MAAM,OAAO,UAAU;IACtB;;OAEG;IACK,oBAAoB,GAAG,KAAK,CAAC;IAErC;;OAEG;IACK,KAAK,CAAS;IAEtB;;OAEG;IACK,MAAM,CAAS;IAEvB;;OAEG;IACK,MAAM,GAAsB,IAAI,CAAC;IAEzC;;OAEG;IACK,KAAK,CAA2B;IAExC;;OAEG;IACK,MAAM,CAA2B;IAEzC;;OAEG;IACsB,QAAQ,GAAG,IAAI,CAAC;IAEzC;;OAEG;IACK,IAAI,GAAqB,MAAM,CAAC;IAExC;;OAEG;IACK,WAAW,GAAW,kBAAkB,CAAC;IAEjD;;OAEG;IACK,aAAa,GAAW,QAAQ,CAAC;IAEzC;;OAEG;IACK,eAAe,GAAW,UAAU,CAAC;IAE7C;;OAEG;IACK,aAAa,GAAW,QAAQ,CAAC;IAEzC;;OAEG;IACK,aAAa,GAAW,QAAQ,CAAC;IAEzC;;OAEG;IACK,OAAO,GAAG,KAAK,CAAC;IAExB;;OAEG;IACK,KAAK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,\n\tFragment,\n\th,\n\tProp,\n} from '@stencil/core';\nimport { cn, isMobile, isTablet } from '../../../utils';\nimport { cva } from 'class-variance-authority';\n\nconst attachment = cva(\n\t[\n\t\t'flex flex-1 items-center justify-start gap-2',\n\t\t'h-8 min-w-0 px-2 rounded-lg',\n\t\t'border border-solid bg-white-600',\n\t],\n\t{\n\t\tvariants: {\n\t\t\terror: {\n\t\t\t\tfalse: 'bg-white-600 border-black-teal-100 text-black-teal-200',\n\t\t\t\ttrue: 'border-negative-red',\n\t\t\t},\n\t\t},\n\t}\n);\n\n@Component({\n\ttag: 'p-attachment',\n\tstyleUrl: 'attachment.component.css',\n\tshadow: true,\n})\nexport class Attachment {\n\t/**\n\t * Wether to enable the camera button on mobile\n\t */\n\t@Prop() enableCameraOnMobile = false;\n\n\t/**\n\t * The value of the attachment (usually the file name)\n\t */\n\t@Prop() value: string;\n\n\t/**\n\t * The fileID to use to track the file\n\t */\n\t@Prop() fileId: string;\n\n\t/**\n\t * The type of files to accept\n\t */\n\t@Prop() accept: string[] | string = null;\n\n\t/**\n\t * The label of the attachment\n\t */\n\t@Prop() label: string | HTMLSlotElement;\n\n\t/**\n\t * The helper of the attachment\n\t */\n\t@Prop() helper: string | HTMLSlotElement;\n\n\t/**\n\t * Wether the attachment is required\n\t */\n\t@Prop({ reflect: true }) required = true;\n\n\t/**\n\t * The variant of the attachment\n\t */\n\t@Prop() mode: 'read' | 'write' = 'read';\n\n\t/**\n\t * The placeholder of the attachment\n\t */\n\t@Prop() placeholder: string = 'Upload a file...';\n\n\t/**\n\t * The text for the camera tooltip\n\t */\n\t@Prop() cameraTooltip: string = 'Camera';\n\n\t/**\n\t * The text for the download tooltip\n\t */\n\t@Prop() downloadTooltip: string = 'Download';\n\n\t/**\n\t * The text for the upload tooltip\n\t */\n\t@Prop() uploadTooltip: string = 'Upload';\n\n\t/**\n\t * The text for the delete tooltip\n\t */\n\t@Prop() deleteTooltip: string = 'Delete';\n\n\t/**\n\t * Wether the attachment is loading\n\t */\n\t@Prop() loading = false;\n\n\t/**\n\t * The error to show\n\t */\n\t@Prop() error: string;\n\n\t/**\n\t * Event when upload is pressed\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tupload: EventEmitter<{\n\t\tfile: File;\n\t\tfileId: string;\n\t\tresult: string;\n\t}>;\n\n\t/**\n\t * Event when download is pressed\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tdownload: EventEmitter<void>;\n\n\t/**\n\t * Event when delete is pressed\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tdelete: EventEmitter<void>;\n\n\tprivate _fileRef: HTMLInputElement;\n\tprivate _cameraFileRef: HTMLInputElement;\n\n\trender() {\n\t\tlet prefix = (\n\t\t\t<p-icon\n\t\t\t\tclass='text-black-teal-300'\n\t\t\t\tvariant='attachment'\n\t\t\t/>\n\t\t);\n\n\t\tif (this.error) {\n\t\t\tprefix = (\n\t\t\t\t<p-icon\n\t\t\t\t\tvariant='warning'\n\t\t\t\t\tclass='text-negative-red'\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\t// const isMobileDevice = isMobile();\n\t\tconst isMobileDevice = isTablet();\n\n\t\tconst baseText =\n\t\t\t'min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-sm';\n\t\treturn (\n\t\t\t<Fragment>\n\t\t\t\t<p-field-container\n\t\t\t\t\tvariant='write'\n\t\t\t\t\tlabel={this.label}\n\t\t\t\t\thelper={this.helper}\n\t\t\t\t\terror={this.error}\n\t\t\t\t\trequired={this.required}\n\t\t\t\t\tforceShowTooltip={!!this.error?.length}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tslot='content'\n\t\t\t\t\t\tclass='flex w-full items-start gap-2'\n\t\t\t\t\t>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass={attachment({\n\t\t\t\t\t\t\t\terror: !!this.error?.length,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{prefix}\n\n\t\t\t\t\t\t\t<span class={cn(baseText, 'peer empty:hidden')}>\n\t\t\t\t\t\t\t\t{this.value}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span class={cn(baseText, 'hidden peer-empty:block')}>\n\t\t\t\t\t\t\t\t{this.placeholder}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<p-tooltip\n\t\t\t\t\t\t\tcontent={\n\t\t\t\t\t\t\t\tthis.mode === 'read'\n\t\t\t\t\t\t\t\t\t? this.downloadTooltip\n\t\t\t\t\t\t\t\t\t: this.value?.length\n\t\t\t\t\t\t\t\t\t? this.deleteTooltip\n\t\t\t\t\t\t\t\t\t: this.uploadTooltip\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<p-button\n\t\t\t\t\t\t\t\tslot='trigger'\n\t\t\t\t\t\t\t\tvariant='secondary'\n\t\t\t\t\t\t\t\ticonOnly={true}\n\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\tthis.mode === 'read'\n\t\t\t\t\t\t\t\t\t\t? 'download'\n\t\t\t\t\t\t\t\t\t\t: this.value?.length\n\t\t\t\t\t\t\t\t\t\t? 'trash'\n\t\t\t\t\t\t\t\t\t\t: 'upload'\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdisabled={this.loading}\n\t\t\t\t\t\t\t\tloading={this.loading}\n\t\t\t\t\t\t\t\tonOnClick={() =>\n\t\t\t\t\t\t\t\t\tthis.mode === 'write' && !this.value?.length\n\t\t\t\t\t\t\t\t\t\t? this._uploadClick()\n\t\t\t\t\t\t\t\t\t\t: (this.mode === 'read'\n\t\t\t\t\t\t\t\t\t\t\t\t? this.download\n\t\t\t\t\t\t\t\t\t\t\t\t: this.delete\n\t\t\t\t\t\t\t\t\t\t ).emit()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</p-tooltip>\n\n\t\t\t\t\t\t{this.enableCameraOnMobile &&\n\t\t\t\t\t\t\tthis.mode === 'write' &&\n\t\t\t\t\t\t\tisMobileDevice &&\n\t\t\t\t\t\t\t!this.value?.length && (\n\t\t\t\t\t\t\t\t<p-tooltip\n\t\t\t\t\t\t\t\t\tcontent={this.cameraTooltip}\n\t\t\t\t\t\t\t\t\tclass='desktop-xs:hidden'\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<p-button\n\t\t\t\t\t\t\t\t\t\tslot='trigger'\n\t\t\t\t\t\t\t\t\t\tvariant='secondary'\n\t\t\t\t\t\t\t\t\t\ticonOnly={true}\n\t\t\t\t\t\t\t\t\t\ticon='camera'\n\t\t\t\t\t\t\t\t\t\tonOnClick={() => this._cameraClick()}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</p-tooltip>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</p-field-container>\n\n\t\t\t\t<input\n\t\t\t\t\tclass='hidden'\n\t\t\t\t\ttype='file'\n\t\t\t\t\taccept={\n\t\t\t\t\t\tArray.isArray(this.accept) ? this.accept?.join(',') : this.accept\n\t\t\t\t\t}\n\t\t\t\t\tref={el => (this._fileRef = el)}\n\t\t\t\t\tonChange={ev => this._onFileChange(ev)}\n\t\t\t\t/>\n\n\t\t\t\t<input\n\t\t\t\t\tclass='hidden'\n\t\t\t\t\ttype='file'\n\t\t\t\t\taccept='image/*'\n\t\t\t\t\tcapture='true'\n\t\t\t\t\tref={el => (this._cameraFileRef = el)}\n\t\t\t\t\tonChange={ev => this._onFileChange(ev)}\n\t\t\t\t/>\n\t\t\t</Fragment>\n\t\t);\n\t}\n\n\tprivate _uploadClick() {\n\t\tif (!this._fileRef || this.mode !== 'write') {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._fileRef.click();\n\t}\n\n\tprivate _cameraClick() {\n\t\tif (!this.enableCameraOnMobile || isMobile()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._cameraFileRef || this.mode !== 'write') {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._cameraFileRef?.click();\n\t}\n\n\tprivate _onFileChange(ev: Event) {\n\t\tconst target = ev.target as HTMLInputElement;\n\t\tconst file = target.files?.[0];\n\n\t\tif (file) {\n\t\t\tthis.loading = true;\n\n\t\t\tconst reader = new FileReader();\n\t\t\treader.onload = (e: any) => this._onLoad(file, e?.currentTarget?.result);\n\t\t\treader.readAsDataURL(file);\n\t\t}\n\t}\n\n\tprivate _onLoad(file: File, result: string) {\n\t\tthis.upload.emit({\n\t\t\tfileId: this.fileId,\n\t\t\tresult,\n\t\t\tfile,\n\t\t});\n\n\t\tif (this._fileRef) {\n\t\t\tthis._fileRef.value = '';\n\t\t}\n\n\t\tif (this._cameraFileRef) {\n\t\t\tthis._cameraFileRef.value = '';\n\t\t}\n\n\t\tthis.loading = false;\n\t}\n}\n"]}
@@ -12,7 +12,7 @@ export class ButtonGroup {
12
12
  this._checkButtons();
13
13
  }
14
14
  render() {
15
- return (h(Host, { key: '0ecb5d82eacdf3350f0887169f1e680d5575f970', class: 'flex items-center' }, h("slot", { key: 'f46c24841d7222135c0bdca168886fa90b5a2b0b' })));
15
+ return (h(Host, { key: 'dc19a3e99ec6e1ef6d7e879f4e55ce0fa60935d1', class: 'flex items-center' }, h("slot", { key: '94c714842824e84f9636b6d046a8cecf7e0d1bca' })));
16
16
  }
17
17
  slotchange() {
18
18
  this._checkButtons();
@@ -157,7 +157,7 @@ export class Calendar {
157
157
  .filter(date => isValid(date));
158
158
  }
159
159
  render() {
160
- return (h(Host, { key: '3bc005be3abe7f7ff19c1261961e875e85ffb697', class: calendar({ variant: this.variant }) }, this._getView()));
160
+ return (h(Host, { key: '88cd0df6b8d9196bc4963bef4735e82bd54e6477', class: calendar({ variant: this.variant }) }, this._getView()));
161
161
  }
162
162
  _getView() {
163
163
  if (this._view === 'year') {
@@ -50,9 +50,9 @@ export class ContentSlider {
50
50
  }
51
51
  }
52
52
  render() {
53
- return (h(Host, { key: 'e690c7769634eda186a3abc83d34d86c607f753d', class: "p-content-slider" }, h("div", { key: 'e6270d967bbef325e89e2d0cdbd903ea60dc82b8', class: `slider ${!this.disableDrag && 'draggable'} ${this._dragging && 'dragging'}`, style: {
53
+ return (h(Host, { key: '2c6deaf4db1b1d6ace1b7f80f34f066bf6e6c4c2', class: "p-content-slider" }, h("div", { key: '267bee4f1f52f541b1fa8f051cd13a4b87e1d25b', class: `slider ${!this.disableDrag && 'draggable'} ${this._dragging && 'dragging'}`, style: {
54
54
  height: `${this._outerHeight}px`,
55
- }, ref: (el) => (this._sliderRef = el), onMouseDown: (e) => this._mouseDownHandler(e), onTouchStart: (e) => this._mouseDownHandler(e), onMouseMove: (e) => this._mouseMoveHandler(e), onTouchMove: (e) => this._mouseMoveHandler(e) }, h("div", { key: 'ef9190265da0a8d0e842696929a9ad8d9d3a7f25', class: "inner-slider", ref: (ref) => this._setInnerSliderReft(ref), onTransitionEnd: () => this._transitionEndHandler() }, h("slot", { key: 'de62baf7fabcc682a326cf32df9974b0fe821a70' }))), h("div", { key: '142f7bf7d6172a1c22d61da84342e449c31d24fa', class: `indicator ${this.hideMobileIndicator && 'hidden'}` }, this._items.map((_, i) => (h("div", { onClick: () => this._scrollTo(i, true), class: `item ${!this.disableIndicatorClick && 'cursor-pointer'}` }, h("div", { class: cn('block w-2 h-2 rounded-full', {
55
+ }, ref: (el) => (this._sliderRef = el), onMouseDown: (e) => this._mouseDownHandler(e), onTouchStart: (e) => this._mouseDownHandler(e), onMouseMove: (e) => this._mouseMoveHandler(e), onTouchMove: (e) => this._mouseMoveHandler(e) }, h("div", { key: 'dd01ac807b0618de6a544b24aa68c3a1de660594', class: "inner-slider", ref: (ref) => this._setInnerSliderReft(ref), onTransitionEnd: () => this._transitionEndHandler() }, h("slot", { key: '080161c80e4996803fc567c4c72391e6e3718d8c' }))), h("div", { key: '1c0d460fe26f9a48726aeaf9d80b56c26ed4c02c', class: `indicator ${this.hideMobileIndicator && 'hidden'}` }, this._items.map((_, i) => (h("div", { onClick: () => this._scrollTo(i, true), class: `item ${!this.disableIndicatorClick && 'cursor-pointer'}` }, h("div", { class: cn('block w-2 h-2 rounded-full', {
56
56
  'bg-dark-teal-600': i === this._visibleIndex,
57
57
  'bg-dark-teal-400': i !== this._visibleIndex,
58
58
  }) })))))));
@@ -189,9 +189,9 @@ export class Datepicker {
189
189
  this.parseValue(this.value);
190
190
  }
191
191
  render() {
192
- return (h("p-dropdown", { key: '56d5e4f34708d0fce2878c190f5ac3768b791eb0', strategy: this.strategy, placement: this.placement, disableTriggerClick: true, applyMaxWidth: false, applyFullWidth: false, insideClick: true, show: this._showDropdown }, h("p-field", { key: '14d07dc0c17e13b9618a2d3647551e89a9de381e', slot: 'trigger', icon: this.hideIconWhenFilled && !!this._value ? null : 'calendar-multi', iconPosition: 'start', size: this.size, prefix: this.prefix, label: this.label, loading: this.loading, helper: this.helper, required: asBoolean(this.required), error: this.error, forceShowTooltip: !!this.error?.length && !this._showDropdown, disabled: asBoolean(this.disabled), focused: this._showDropdown, value: this._getFormattedDate(), placeholder: this.placeholder, onFocus: () => this._onFocus(), onBlur: () => this._onBlur(), onValueChange: ev => this._onValueChange(ev.detail), onInputRefChange: ev => (this._inputRef = ev.detail) }), this.enableNativePicker && this._isMobileBrowser && (h("input", { key: 'fc619640bda49aab5a3f7923cba60bb7b177e3d2', slot: 'trigger', type: this.mode === 'day' ? 'date' : 'month', class: 'h-0 overflow-hidden' // we use h-0 here so location dependent pickers can correctly place itself
192
+ return (h("p-dropdown", { key: 'e7869713c65d18c4cca65b21d00eaf1b282478ae', strategy: this.strategy, placement: this.placement, disableTriggerClick: true, applyMaxWidth: false, applyFullWidth: false, insideClick: true, show: this._showDropdown }, h("p-field", { key: '5a2562733e52d020c5b837e372b63b6d93e640cb', slot: 'trigger', icon: this.hideIconWhenFilled && !!this._value ? null : 'calendar-multi', iconPosition: 'start', size: this.size, prefix: this.prefix, label: this.label, loading: this.loading, helper: this.helper, required: asBoolean(this.required), error: this.error, forceShowTooltip: !!this.error?.length && !this._showDropdown, disabled: asBoolean(this.disabled), focused: this._showDropdown, value: this._getFormattedDate(), placeholder: this.placeholder, onFocus: () => this._onFocus(), onBlur: () => this._onBlur(), onValueChange: ev => this._onValueChange(ev.detail), onInputRefChange: ev => (this._inputRef = ev.detail) }), this.enableNativePicker && this._isMobileBrowser && (h("input", { key: 'ca64266832730cee49657467042466b5f9aa4fb6', slot: 'trigger', type: this.mode === 'day' ? 'date' : 'month', class: 'h-0 overflow-hidden' // we use h-0 here so location dependent pickers can correctly place itself
193
193
  ,
194
- onInput: ev => this._onNativeInput(ev), ref: ref => (this._dateInputRef = ref), value: this._value && format(this._value, 'yyyy-MM-dd'), min: this.minDate && format(new Date(this.minDate), 'yyyy-MM-dd'), max: this.maxDate && format(new Date(this.maxDate), 'yyyy-MM-dd') })), h("div", { key: '08b99cfad43078c05ba02c6d24e4e8965ad39660', slot: 'items' }, h("p-calendar", { key: '8bd50644a1d5de09fabfec8bd0886eccbdaf7e0f', variant: 'embedded', value: this._value, onValueChange: ({ detail }) => (this.value = detail), preselectToday: this.preselectToday, disabledDates: this.disabledDates, minDate: this.minDate, maxDate: this.maxDate, disableWeekends: this.disableWeekends, mode: this.mode }))));
194
+ onInput: ev => this._onNativeInput(ev), ref: ref => (this._dateInputRef = ref), value: this._value && format(this._value, 'yyyy-MM-dd'), min: this.minDate && format(new Date(this.minDate), 'yyyy-MM-dd'), max: this.maxDate && format(new Date(this.maxDate), 'yyyy-MM-dd') })), h("div", { key: 'f09e3fdcef04441e01250566b5907a2adb3aa56c', slot: 'items' }, h("p-calendar", { key: '4bd89f69c22bdd7c3a3f38b45a6b1f6f07428bc3', variant: 'embedded', value: this._value, onValueChange: ({ detail }) => (this.value = detail), preselectToday: this.preselectToday, disabledDates: this.disabledDates, minDate: this.minDate, maxDate: this.maxDate, disableWeekends: this.disableWeekends, mode: this.mode }))));
195
195
  }
196
196
  documentClickHandler({ target }) {
197
197
  if (!this._showDropdown || childOf(target, this._el)) {
@@ -134,12 +134,12 @@ export class Dropdown {
134
134
  };
135
135
  let dropdownContainer;
136
136
  if (this.usePortal) {
137
- dropdownContainer = (h("p-portal", { key: '45d9dca9b78eb77742f2fbb56f4779f1007d1f64', ...dropdownContainerProps }, h("p-dropdown-menu-container", { key: '97ba77e223193778babb5a30e75f1ab5fb782038', variant: this.variant, maxWidth: !this.calculateWidth && this.applyMaxWidth, fullWidth: this.applyFullWidth && !this.applyMaxWidth, allowOverflow: this.allowOverflow, scrollable: this.scrollable }, h("slot", { key: 'bcec93f857b22404f9063cdf7ab3005cfb80c8c1', name: 'items' }))));
137
+ dropdownContainer = (h("p-portal", { key: 'b190fdbb1896b89a457acceb5683df256d672f27', ...dropdownContainerProps }, h("p-dropdown-menu-container", { key: 'd87b9e08bd8a8f8d31a78160d4f95cd0ed372379', variant: this.variant, maxWidth: !this.calculateWidth && this.applyMaxWidth, fullWidth: this.applyFullWidth && !this.applyMaxWidth, allowOverflow: this.allowOverflow, scrollable: this.scrollable }, h("slot", { key: 'a7a9fcb5c30b3b346911cc5bc86ceb2fca607a70', name: 'items' }))));
138
138
  }
139
139
  else {
140
- dropdownContainer = (h("p-dropdown-menu-container", { key: 'eaae1c1d9b6bed7948d617af927a802a65554b49', variant: this.variant, maxWidth: !this.calculateWidth && this.applyMaxWidth, fullWidth: this.applyFullWidth && !this.applyMaxWidth, allowOverflow: this.allowOverflow, scrollable: this.scrollable, ...dropdownContainerProps }, h("slot", { key: 'd83b7da99b32f04d24b5c693db6f348db9d4f098', name: 'items' })));
140
+ dropdownContainer = (h("p-dropdown-menu-container", { key: '93f7c0ef0cb20dae0caa6c24d7c96e8bdc0c3b25', variant: this.variant, maxWidth: !this.calculateWidth && this.applyMaxWidth, fullWidth: this.applyFullWidth && !this.applyMaxWidth, allowOverflow: this.allowOverflow, scrollable: this.scrollable, ...dropdownContainerProps }, h("slot", { key: '88a67c2fe59c5a5bad314f8417eaf18bb5e127d3', name: 'items' })));
141
141
  }
142
- return (h(Host, { key: '5a3485f037af205013b4df388cbdc696c1a52c27', class: 'relative' }, h("div", { key: 'c4958bc045f04e52aa91152df93bef784b69692b', class: 'trigger', ref: ref => (this._trigger = ref), onClick: () => this._triggerClickHandler() }, h("slot", { key: 'e7ef3a19433d5f4a936c4e87bb7171aed4fbb26e', name: 'trigger' })), h("div", { key: '3b7e67e4026bd58aea5049ba4b2bdf11c35ab4a2', class: 'relative w-full' }, dropdownContainer)));
142
+ return (h(Host, { key: 'c54ff9106342e613fce1d3dbd1005c39e1bf733f', class: 'relative' }, h("div", { key: '4d23c6ab5da92cc200b3204e471561d3b0ac7382', class: 'trigger', ref: ref => (this._trigger = ref), onClick: () => this._triggerClickHandler() }, h("slot", { key: '87f719c93f4cb1b209ac39e5c4ff8e687113ddbf', name: 'trigger' })), h("div", { key: '896fc9c220dbffaf0bd94da1a0af2dca6e905304', class: 'relative w-full' }, dropdownContainer)));
143
143
  }
144
144
  _checkButtons(active = false) {
145
145
  if (!this.applyChevron) {
@@ -54,11 +54,11 @@ export class EmptyState {
54
54
  const hasHeaderSlot = !!this._el.querySelector(':scope > [slot="header"]');
55
55
  const hasContentSlot = !!this._el.querySelector(':scope > [slot="content"]');
56
56
  const hasActionSlot = !!this._el.querySelector(':scope > [slot="action"]');
57
- return (h("div", { key: '3a7d84b99522447adb59ea65ee25bfaf09c43124', class: emptyState({
57
+ return (h("div", { key: '4d4ffeaee2bb367b6fa44558bffc6b1ea36e7ff2', class: emptyState({
58
58
  enableAction: asBoolean(this.enableAction, true),
59
59
  }), onClick: ev => this.enableAction && !this.actionLoading
60
60
  ? this.action.emit(ev)
61
- : undefined }, this.illustration && (h("p-illustration", { key: 'df17d4af088bd47f85eafde1b482799b4a5df92f', class: 'mb-8 text-teal', variant: this.illustration })), hasHeaderSlot ? (h("slot", { name: 'header' })) : (this.header?.length && (h("p", { class: 'my-0 text-center font-ambit text-sm font-bold text-black-teal' }, this.header))), hasContentSlot ? (h("slot", { name: 'content' })) : (this.content?.length && (h("p", { class: 'my-0 text-center text-sm text-black-teal-300' }, this.content))), this.enableAction &&
61
+ : undefined }, this.illustration && (h("p-illustration", { key: '5ffdc50bc7b414703c1ab66e8c11d9213360e421', class: 'mb-8 text-teal', variant: this.illustration })), hasHeaderSlot ? (h("slot", { name: 'header' })) : (this.header?.length && (h("p", { class: 'my-0 text-center font-ambit text-sm font-bold text-black-teal' }, this.header))), hasContentSlot ? (h("slot", { name: 'content' })) : (this.content?.length && (h("p", { class: 'my-0 text-center text-sm text-black-teal-300' }, this.content))), this.enableAction &&
62
62
  (hasActionSlot ? (h("slot", { name: 'action' })) : (h("p-button", { class: 'mt-4', icon: this.actionIcon, loading: this.actionLoading, variant: this.actionVariant }, this.actionText)))));
63
63
  }
64
64
  static get is() { return "p-empty-state"; }
@@ -291,7 +291,7 @@ export class Field {
291
291
  }
292
292
  render() {
293
293
  const { id, prefix, suffix, hasHeaderSlot, hasLabelSlot, hasHelperSlot, hasErrorSlot, hasValueSlot, } = this._getSlotInfo();
294
- return (h("p-field-container", { key: '4739226c8fd8b8edad199a82f353a209a06d0780', forceShowTooltip: this.forceShowTooltip || this._focused || !!this.error?.length, id: id, label: this.label, loading: this.loading, loadingSize: this.size, helper: this.helper, error: this.error, required: this.required, variant: this.variant }, hasLabelSlot && (h("slot", { key: '23a6b72964df66748f3ba3a8a8d5344a6661a0cc', name: 'label', slot: 'label' })), hasHeaderSlot && (h("slot", { key: '358248d69b2d4407a197f9ea2031c4e8795f8788', name: 'header', slot: 'header' })), hasHelperSlot && (h("slot", { key: '75dc9c79b5f459eb26681333d67670df2e5c15e3', name: 'helper', slot: 'helper' })), hasErrorSlot && (h("slot", { key: '594107ce6229c835d761fa2cf380d08c1acbb79b', name: 'error', slot: 'error' })), h("div", { key: 'f3f832858476ca7607048cba1c9882847c30d927', class: field({
294
+ return (h("p-field-container", { key: 'a92c6392ff4a75a207dedf98669fba2007ed7538', forceShowTooltip: this.forceShowTooltip || this._focused || !!this.error?.length, id: id, label: this.label, loading: this.loading, loadingSize: this.size, helper: this.helper, error: this.error, required: this.required, variant: this.variant }, hasLabelSlot && (h("slot", { key: 'e5dfe2ce998f9551e4cf33ac90466d3d131c5ae6', name: 'label', slot: 'label' })), hasHeaderSlot && (h("slot", { key: '617f0b58f400991ab410ca9df3ec6ffd33cc868e', name: 'header', slot: 'header' })), hasHelperSlot && (h("slot", { key: 'c67eb1b96546b14a4c098bceab4cecac6a4dac8f', name: 'helper', slot: 'helper' })), hasErrorSlot && (h("slot", { key: '34f87caa4af35fb697a61fa5411bdd08d5d51178', name: 'error', slot: 'error' })), h("div", { key: '5cc4561212aae28984aaeff23957ed09d296e402', class: field({
295
295
  error: !!this.error?.length,
296
296
  disabled: asBoolean(this.disabled),
297
297
  focused: asBoolean(this.focused) || this._focused,
@@ -300,7 +300,7 @@ export class Field {
300
300
  isTextarea: this.type === 'textarea',
301
301
  }), title: this.variant === 'read' && !hasValueSlot ? this.value : undefined, slot: 'content' }, (this.error?.length ||
302
302
  prefix ||
303
- (this.icon && this.iconPosition === 'start')) && (h("div", { key: '533a0a5dea83e2f9e160ff5f68d25489f31aea7b', class: prefixAndSuffix({
303
+ (this.icon && this.iconPosition === 'start')) && (h("div", { key: '460e6be21e52843d4a9af43ff9526b527e1fe05e', class: prefixAndSuffix({
304
304
  error: !!this.error?.length,
305
305
  disabled: asBoolean(this.disabled),
306
306
  focused: asBoolean(this.focused) || this._focused,
@@ -309,7 +309,7 @@ export class Field {
309
309
  }), onClick: () => this._focusInput() }, (this.icon && this.iconPosition === 'start') ||
310
310
  this.error?.length ? (h("p-icon", { class: cn('flex', {
311
311
  'mt-[0.125rem]': this.variant === 'read' && this.size === 'base',
312
- }), variant: this.error?.length ? 'warning' : this.icon, rotate: this.iconRotate, flip: this.iconFlip })) : (prefix))), this._getContent(hasValueSlot, id), (suffix || (this.icon && this.iconPosition === 'end')) && (h("div", { key: 'c7c263cdf165c842dd1102002d978d9824cc4670', class: prefixAndSuffix({
312
+ }), variant: this.error?.length ? 'warning' : this.icon, rotate: this.iconRotate, flip: this.iconFlip })) : (prefix))), this._getContent(hasValueSlot, id), (suffix || (this.icon && this.iconPosition === 'end')) && (h("div", { key: '956d7a69023974f782a517ee7d657d56651b3335', class: prefixAndSuffix({
313
313
  error: !!this.error?.length,
314
314
  disabled: asBoolean(this.disabled),
315
315
  focused: asBoolean(this.focused) || this._focused,