@roadtrip/components 3.33.6 → 3.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/dist/cjs/road-badge_14.cjs.entry.js +22 -15
  2. package/dist/cjs/road-badge_14.cjs.entry.js.map +1 -1
  3. package/dist/cjs/road-modal.cjs.entry.js +1 -1
  4. package/dist/cjs/road-navbar-item-v2.cjs.entry.js +2 -2
  5. package/dist/cjs/road-navbar-item.cjs.entry.js +2 -2
  6. package/dist/cjs/road-navbar-v2.cjs.entry.js +1 -1
  7. package/dist/cjs/road-navbar.cjs.entry.js +1 -1
  8. package/dist/cjs/road-phone-number-input.cjs.entry.js +2 -2
  9. package/dist/cjs/road-plate-number.cjs.entry.js +2 -2
  10. package/dist/cjs/road-profil-dropdown.cjs.entry.js +1 -1
  11. package/dist/cjs/road-progress-indicator-horizontal.cjs.entry.js +1 -1
  12. package/dist/cjs/road-progress-indicator-vertical-item.cjs.entry.js +1 -1
  13. package/dist/cjs/road-progress-indicator-vertical.cjs.entry.js +1 -1
  14. package/dist/cjs/road-progress-tracker-item.cjs.entry.js +1 -1
  15. package/dist/cjs/road-progress-tracker.cjs.entry.js +1 -1
  16. package/dist/cjs/road-progress.cjs.entry.js +1 -1
  17. package/dist/cjs/road-radio-group.cjs.entry.js +1 -1
  18. package/dist/cjs/road-radio.cjs.entry.js +1 -1
  19. package/dist/cjs/road-range.cjs.entry.js +2 -2
  20. package/dist/cjs/road-rating.cjs.entry.js +1 -1
  21. package/dist/cjs/road-segmented-button-bar.cjs.entry.js +1 -1
  22. package/dist/cjs/road-segmented-button.cjs.entry.js +2 -2
  23. package/dist/cjs/road-segmented-buttons.cjs.entry.js +1 -1
  24. package/dist/cjs/road-select-filter.cjs.entry.js +2 -2
  25. package/dist/cjs/road-select.cjs.entry.js +1 -1
  26. package/dist/cjs/road-skeleton.cjs.entry.js +1 -1
  27. package/dist/cjs/road-spinner.cjs.entry.js +1 -1
  28. package/dist/cjs/road-switch.cjs.entry.js +2 -2
  29. package/dist/cjs/road-tab-bar.cjs.entry.js +2 -2
  30. package/dist/cjs/road-tab-button.cjs.entry.js +2 -2
  31. package/dist/cjs/road-tab.cjs.entry.js +2 -2
  32. package/dist/cjs/road-table.cjs.entry.js +1 -1
  33. package/dist/cjs/road-tabs.cjs.entry.js +1 -1
  34. package/dist/cjs/road-tag.cjs.entry.js +1 -1
  35. package/dist/cjs/road-text.cjs.entry.js +1 -1
  36. package/dist/cjs/road-textarea.cjs.entry.js +1 -1
  37. package/dist/cjs/road-toast.cjs.entry.js +1 -1
  38. package/dist/cjs/road-toggle.cjs.entry.js +2 -2
  39. package/dist/cjs/road-toolbar-title-page.cjs.entry.js +1 -1
  40. package/dist/cjs/road-toolbar-title.cjs.entry.js +1 -1
  41. package/dist/cjs/road-toolbar-v2.cjs.entry.js +1 -1
  42. package/dist/cjs/road-tooltip.cjs.entry.js +4 -4
  43. package/dist/cjs/road-tooltip.cjs.entry.js.map +1 -1
  44. package/dist/collection/components/input/input.css +1 -0
  45. package/dist/collection/components/input/input.js +11 -4
  46. package/dist/collection/components/input/input.js.map +1 -1
  47. package/dist/collection/components/input/input.stories.js +25 -9
  48. package/dist/collection/components/input-group/input-group.css +0 -2
  49. package/dist/collection/components/input-group/input-group.js +5 -5
  50. package/dist/collection/components/input-group/input-group.js.map +1 -1
  51. package/dist/collection/components/item/item.js +3 -3
  52. package/dist/collection/components/label/label.js +1 -1
  53. package/dist/collection/components/list/list.js +2 -2
  54. package/dist/collection/components/modal/modal.js +1 -1
  55. package/dist/collection/components/modal/modal.stories.js +4 -3
  56. package/dist/collection/components/navbar/navbar.js +1 -1
  57. package/dist/collection/components/navbar-item/navbar-item.js +2 -2
  58. package/dist/collection/components/navbar-item-v2/navbar-item-v2.js +2 -2
  59. package/dist/collection/components/navbar-v2/navbar-v2.js +1 -1
  60. package/dist/collection/components/phone-number-input/phone-number-input.js +2 -2
  61. package/dist/collection/components/plate-number/plate-number.js +2 -2
  62. package/dist/collection/components/plate-number/plate-number.stories.js +18 -12
  63. package/dist/collection/components/profil-dropdown/profil-dropdown.js +1 -1
  64. package/dist/collection/components/progress/progress.js +1 -1
  65. package/dist/collection/components/progress-indicator-horizontal/progress-indicator-horizontal.js +1 -1
  66. package/dist/collection/components/progress-indicator-vertical/progress-indicator-vertical.js +1 -1
  67. package/dist/collection/components/progress-indicator-vertical-item/progress-indicator-vertical-item.js +1 -1
  68. package/dist/collection/components/progress-tracker/progress-tracker.js +1 -1
  69. package/dist/collection/components/progress-tracker-item/progress-tracker-item.js +1 -1
  70. package/dist/collection/components/radio/radio.js +1 -1
  71. package/dist/collection/components/radio/radio.stories.js +12 -6
  72. package/dist/collection/components/radio-group/radio-group.js +1 -1
  73. package/dist/collection/components/range/range.js +2 -2
  74. package/dist/collection/components/range/range.stories.js +4 -3
  75. package/dist/collection/components/rating/rating.js +1 -1
  76. package/dist/collection/components/row/row.js +1 -1
  77. package/dist/collection/components/segmented-button/segmented-button.js +2 -2
  78. package/dist/collection/components/segmented-button-bar/segmented-button-bar.js +1 -1
  79. package/dist/collection/components/segmented-buttons/segmented-buttons.js +1 -1
  80. package/dist/collection/components/select/select.js +1 -1
  81. package/dist/collection/components/select/select.stories.js +12 -7
  82. package/dist/collection/components/select-filter/select-filter.js +2 -2
  83. package/dist/collection/components/select-filter/select-filter.stories.js +4 -2
  84. package/dist/collection/components/skeleton/skeleton.js +1 -1
  85. package/dist/collection/components/spinner/spinner.js +1 -1
  86. package/dist/collection/components/switch/switch.js +2 -2
  87. package/dist/collection/components/tab/tab.js +2 -2
  88. package/dist/collection/components/tab-bar/tab-bar.js +2 -2
  89. package/dist/collection/components/tab-button/tab-button.js +2 -2
  90. package/dist/collection/components/table/table.js +1 -1
  91. package/dist/collection/components/tabs/tabs.js +1 -1
  92. package/dist/collection/components/tag/tag.js +1 -1
  93. package/dist/collection/components/text/text.js +1 -1
  94. package/dist/collection/components/textarea/textarea.js +1 -1
  95. package/dist/collection/components/textarea/textarea.stories.js +18 -12
  96. package/dist/collection/components/toast/toast.js +1 -1
  97. package/dist/collection/components/toast/toast.stories.js +4 -2
  98. package/dist/collection/components/toggle/toggle.js +2 -2
  99. package/dist/collection/components/toggle/toggle.stories.js +12 -7
  100. package/dist/collection/components/toolbar/toolbar.js +1 -1
  101. package/dist/collection/components/toolbar-title/toolbar-title.js +1 -1
  102. package/dist/collection/components/toolbar-title-page/toolbar-title-page.js +1 -1
  103. package/dist/collection/components/toolbar-v2/toolbar-v2.js +1 -1
  104. package/dist/collection/components/tooltip/tooltip.css +31 -0
  105. package/dist/collection/components/tooltip/tooltip.js +5 -5
  106. package/dist/collection/components/tooltip/tooltip.js.map +1 -1
  107. package/dist/collection/components/tooltip/tooltip.stories.js +1 -1
  108. package/dist/esm/road-badge_14.entry.js +22 -15
  109. package/dist/esm/road-badge_14.entry.js.map +1 -1
  110. package/dist/esm/road-modal.entry.js +1 -1
  111. package/dist/esm/road-navbar-item-v2.entry.js +2 -2
  112. package/dist/esm/road-navbar-item.entry.js +2 -2
  113. package/dist/esm/road-navbar-v2.entry.js +1 -1
  114. package/dist/esm/road-navbar.entry.js +1 -1
  115. package/dist/esm/road-phone-number-input.entry.js +2 -2
  116. package/dist/esm/road-plate-number.entry.js +2 -2
  117. package/dist/esm/road-profil-dropdown.entry.js +1 -1
  118. package/dist/esm/road-progress-indicator-horizontal.entry.js +1 -1
  119. package/dist/esm/road-progress-indicator-vertical-item.entry.js +1 -1
  120. package/dist/esm/road-progress-indicator-vertical.entry.js +1 -1
  121. package/dist/esm/road-progress-tracker-item.entry.js +1 -1
  122. package/dist/esm/road-progress-tracker.entry.js +1 -1
  123. package/dist/esm/road-progress.entry.js +1 -1
  124. package/dist/esm/road-radio-group.entry.js +1 -1
  125. package/dist/esm/road-radio.entry.js +1 -1
  126. package/dist/esm/road-range.entry.js +2 -2
  127. package/dist/esm/road-rating.entry.js +1 -1
  128. package/dist/esm/road-segmented-button-bar.entry.js +1 -1
  129. package/dist/esm/road-segmented-button.entry.js +2 -2
  130. package/dist/esm/road-segmented-buttons.entry.js +1 -1
  131. package/dist/esm/road-select-filter.entry.js +2 -2
  132. package/dist/esm/road-select.entry.js +1 -1
  133. package/dist/esm/road-skeleton.entry.js +1 -1
  134. package/dist/esm/road-spinner.entry.js +1 -1
  135. package/dist/esm/road-switch.entry.js +2 -2
  136. package/dist/esm/road-tab-bar.entry.js +2 -2
  137. package/dist/esm/road-tab-button.entry.js +2 -2
  138. package/dist/esm/road-tab.entry.js +2 -2
  139. package/dist/esm/road-table.entry.js +1 -1
  140. package/dist/esm/road-tabs.entry.js +1 -1
  141. package/dist/esm/road-tag.entry.js +1 -1
  142. package/dist/esm/road-text.entry.js +1 -1
  143. package/dist/esm/road-textarea.entry.js +1 -1
  144. package/dist/esm/road-toast.entry.js +1 -1
  145. package/dist/esm/road-toggle.entry.js +2 -2
  146. package/dist/esm/road-toolbar-title-page.entry.js +1 -1
  147. package/dist/esm/road-toolbar-title.entry.js +1 -1
  148. package/dist/esm/road-toolbar-v2.entry.js +1 -1
  149. package/dist/esm/road-tooltip.entry.js +4 -4
  150. package/dist/esm/road-tooltip.entry.js.map +1 -1
  151. package/dist/html.html-data.json +13 -1
  152. package/dist/roadtrip/p-061f6889.entry.js +2 -0
  153. package/dist/roadtrip/{p-6d3d947e.entry.js.map → p-061f6889.entry.js.map} +1 -1
  154. package/dist/roadtrip/{p-03656f9a.entry.js → p-0a6c9571.entry.js} +2 -2
  155. package/dist/roadtrip/{p-e0421465.entry.js → p-0d7b6e32.entry.js} +2 -2
  156. package/dist/roadtrip/{p-6ff3b37c.entry.js → p-0de7b85d.entry.js} +2 -2
  157. package/dist/roadtrip/p-16726940.entry.js +2 -0
  158. package/dist/roadtrip/{p-06fbd2ea.entry.js → p-2f89b651.entry.js} +2 -2
  159. package/dist/roadtrip/{p-60bd73ad.entry.js → p-327d424c.entry.js} +2 -2
  160. package/dist/roadtrip/{p-e75ec60f.entry.js → p-38fd91b3.entry.js} +2 -2
  161. package/dist/roadtrip/p-3aa617b1.entry.js +2 -0
  162. package/dist/roadtrip/{p-449affa6.entry.js → p-41bab704.entry.js} +2 -2
  163. package/dist/roadtrip/p-4329a5ff.entry.js +2 -0
  164. package/dist/roadtrip/{p-42c0e1a9.entry.js → p-4765c524.entry.js} +3 -3
  165. package/dist/roadtrip/p-4765c524.entry.js.map +1 -0
  166. package/dist/roadtrip/p-50d9ed52.entry.js +2 -0
  167. package/dist/roadtrip/{p-db77c354.entry.js.map → p-50d9ed52.entry.js.map} +1 -1
  168. package/dist/roadtrip/{p-c28e7add.entry.js → p-5ed9e829.entry.js} +2 -2
  169. package/dist/roadtrip/{p-d80e7563.entry.js → p-6fb0f8b8.entry.js} +2 -2
  170. package/dist/roadtrip/{p-6c617506.entry.js → p-78e6204e.entry.js} +2 -2
  171. package/dist/roadtrip/{p-99a6faae.entry.js → p-7a7b1fb6.entry.js} +2 -2
  172. package/dist/roadtrip/{p-b5fa8c5a.entry.js → p-7d693464.entry.js} +2 -2
  173. package/dist/roadtrip/{p-3dcaa947.entry.js → p-7e1e110f.entry.js} +2 -2
  174. package/dist/roadtrip/{p-517aeeca.entry.js → p-7ea16bfa.entry.js} +2 -2
  175. package/dist/roadtrip/p-8c6ad79a.entry.js +2 -0
  176. package/dist/roadtrip/{p-b8c5d292.entry.js → p-93272a9d.entry.js} +2 -2
  177. package/dist/roadtrip/p-97245610.entry.js +2 -0
  178. package/dist/roadtrip/{p-a254df6d.entry.js → p-a0c91322.entry.js} +2 -2
  179. package/dist/roadtrip/{p-c465f551.entry.js → p-a406a342.entry.js} +2 -2
  180. package/dist/roadtrip/{p-e6e9882b.entry.js → p-a5c363f2.entry.js} +2 -2
  181. package/dist/roadtrip/{p-fe40ab3d.entry.js → p-ab550b59.entry.js} +2 -2
  182. package/dist/roadtrip/{p-5fea6a74.entry.js → p-ad9055c1.entry.js} +2 -2
  183. package/dist/roadtrip/{p-2e049c8e.entry.js → p-c4d3dda1.entry.js} +2 -2
  184. package/dist/roadtrip/{p-3f5dff96.entry.js → p-cb8924ee.entry.js} +2 -2
  185. package/dist/roadtrip/p-ce386f80.entry.js +2 -0
  186. package/dist/roadtrip/p-dc9509b1.entry.js +2 -0
  187. package/dist/roadtrip/p-dc9509b1.entry.js.map +1 -0
  188. package/dist/roadtrip/{p-c6824205.entry.js → p-df897815.entry.js} +2 -2
  189. package/dist/roadtrip/{p-eac313e4.entry.js → p-e82c8ca0.entry.js} +2 -2
  190. package/dist/roadtrip/{p-ea1a175d.entry.js → p-e8bcf7a0.entry.js} +2 -2
  191. package/dist/roadtrip/{p-37430583.entry.js → p-ebada9f6.entry.js} +2 -2
  192. package/dist/roadtrip/{p-950b8a43.entry.js → p-f1ef265d.entry.js} +2 -2
  193. package/dist/roadtrip/{p-167cd2fc.entry.js → p-f5bcb8d6.entry.js} +2 -2
  194. package/dist/roadtrip/{p-fd3c58b6.entry.js → p-f9ba8499.entry.js} +2 -2
  195. package/dist/roadtrip/{p-c47ccbf2.entry.js → p-fafcecb2.entry.js} +2 -2
  196. package/dist/roadtrip/{p-f1b53143.entry.js → p-ff430279.entry.js} +2 -2
  197. package/dist/roadtrip/roadtrip.esm.js +1 -1
  198. package/dist/types/components/input/input.d.ts +2 -2
  199. package/dist/types/components/tooltip/tooltip.d.ts +1 -1
  200. package/dist/types/components.d.ts +12 -4
  201. package/hydrate/index.js +77 -70
  202. package/hydrate/index.mjs +77 -70
  203. package/package.json +1 -1
  204. package/dist/roadtrip/p-215afdbd.entry.js +0 -2
  205. package/dist/roadtrip/p-42c0e1a9.entry.js.map +0 -1
  206. package/dist/roadtrip/p-4675ea6d.entry.js +0 -2
  207. package/dist/roadtrip/p-65f9bd9c.entry.js +0 -2
  208. package/dist/roadtrip/p-6d3d947e.entry.js +0 -2
  209. package/dist/roadtrip/p-85b1e505.entry.js +0 -2
  210. package/dist/roadtrip/p-8b04fc62.entry.js +0 -2
  211. package/dist/roadtrip/p-cfd2919e.entry.js +0 -2
  212. package/dist/roadtrip/p-db77c354.entry.js +0 -2
  213. package/dist/roadtrip/p-e6c4c576.entry.js +0 -2
  214. package/dist/roadtrip/p-e6c4c576.entry.js.map +0 -1
  215. /package/dist/roadtrip/{p-03656f9a.entry.js.map → p-0a6c9571.entry.js.map} +0 -0
  216. /package/dist/roadtrip/{p-e0421465.entry.js.map → p-0d7b6e32.entry.js.map} +0 -0
  217. /package/dist/roadtrip/{p-6ff3b37c.entry.js.map → p-0de7b85d.entry.js.map} +0 -0
  218. /package/dist/roadtrip/{p-65f9bd9c.entry.js.map → p-16726940.entry.js.map} +0 -0
  219. /package/dist/roadtrip/{p-06fbd2ea.entry.js.map → p-2f89b651.entry.js.map} +0 -0
  220. /package/dist/roadtrip/{p-60bd73ad.entry.js.map → p-327d424c.entry.js.map} +0 -0
  221. /package/dist/roadtrip/{p-e75ec60f.entry.js.map → p-38fd91b3.entry.js.map} +0 -0
  222. /package/dist/roadtrip/{p-85b1e505.entry.js.map → p-3aa617b1.entry.js.map} +0 -0
  223. /package/dist/roadtrip/{p-449affa6.entry.js.map → p-41bab704.entry.js.map} +0 -0
  224. /package/dist/roadtrip/{p-215afdbd.entry.js.map → p-4329a5ff.entry.js.map} +0 -0
  225. /package/dist/roadtrip/{p-c28e7add.entry.js.map → p-5ed9e829.entry.js.map} +0 -0
  226. /package/dist/roadtrip/{p-d80e7563.entry.js.map → p-6fb0f8b8.entry.js.map} +0 -0
  227. /package/dist/roadtrip/{p-6c617506.entry.js.map → p-78e6204e.entry.js.map} +0 -0
  228. /package/dist/roadtrip/{p-99a6faae.entry.js.map → p-7a7b1fb6.entry.js.map} +0 -0
  229. /package/dist/roadtrip/{p-b5fa8c5a.entry.js.map → p-7d693464.entry.js.map} +0 -0
  230. /package/dist/roadtrip/{p-3dcaa947.entry.js.map → p-7e1e110f.entry.js.map} +0 -0
  231. /package/dist/roadtrip/{p-517aeeca.entry.js.map → p-7ea16bfa.entry.js.map} +0 -0
  232. /package/dist/roadtrip/{p-4675ea6d.entry.js.map → p-8c6ad79a.entry.js.map} +0 -0
  233. /package/dist/roadtrip/{p-b8c5d292.entry.js.map → p-93272a9d.entry.js.map} +0 -0
  234. /package/dist/roadtrip/{p-8b04fc62.entry.js.map → p-97245610.entry.js.map} +0 -0
  235. /package/dist/roadtrip/{p-a254df6d.entry.js.map → p-a0c91322.entry.js.map} +0 -0
  236. /package/dist/roadtrip/{p-c465f551.entry.js.map → p-a406a342.entry.js.map} +0 -0
  237. /package/dist/roadtrip/{p-e6e9882b.entry.js.map → p-a5c363f2.entry.js.map} +0 -0
  238. /package/dist/roadtrip/{p-fe40ab3d.entry.js.map → p-ab550b59.entry.js.map} +0 -0
  239. /package/dist/roadtrip/{p-5fea6a74.entry.js.map → p-ad9055c1.entry.js.map} +0 -0
  240. /package/dist/roadtrip/{p-2e049c8e.entry.js.map → p-c4d3dda1.entry.js.map} +0 -0
  241. /package/dist/roadtrip/{p-3f5dff96.entry.js.map → p-cb8924ee.entry.js.map} +0 -0
  242. /package/dist/roadtrip/{p-cfd2919e.entry.js.map → p-ce386f80.entry.js.map} +0 -0
  243. /package/dist/roadtrip/{p-c6824205.entry.js.map → p-df897815.entry.js.map} +0 -0
  244. /package/dist/roadtrip/{p-eac313e4.entry.js.map → p-e82c8ca0.entry.js.map} +0 -0
  245. /package/dist/roadtrip/{p-ea1a175d.entry.js.map → p-e8bcf7a0.entry.js.map} +0 -0
  246. /package/dist/roadtrip/{p-37430583.entry.js.map → p-ebada9f6.entry.js.map} +0 -0
  247. /package/dist/roadtrip/{p-950b8a43.entry.js.map → p-f1ef265d.entry.js.map} +0 -0
  248. /package/dist/roadtrip/{p-167cd2fc.entry.js.map → p-f5bcb8d6.entry.js.map} +0 -0
  249. /package/dist/roadtrip/{p-fd3c58b6.entry.js.map → p-f9ba8499.entry.js.map} +0 -0
  250. /package/dist/roadtrip/{p-c47ccbf2.entry.js.map → p-fafcecb2.entry.js.map} +0 -0
  251. /package/dist/roadtrip/{p-f1b53143.entry.js.map → p-ff430279.entry.js.map} +0 -0
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-fee0103c.js');
6
6
 
7
- const tooltipCss = ":host{--max-width:85vw;--z-index:1;--width:max-content;position:relative;display:inline-block}:host(:hover){cursor:pointer}:host([trigger=\"hover\"]) .tooltip{transition:opacity 0.2s ease-in-out, transform 0.2s ease-in-out}.tooltip{position:absolute;top:-0.5rem;left:50%;z-index:1;width:var(--width);min-width:100%;max-width:var(--max-width);padding:0.5rem;font-family:var(--road-font);font-size:var(--road-body-small);color:var(--road-on-surface);text-align:center;pointer-events:none;visibility:hidden;background:var(--road-surface);border:1px solid var(--road-outline-weak);border-radius:0.25rem;box-shadow:var(--road-elevation-low);opacity:0;transition:opacity 0.2s ease-in-out, transform 0.2s ease-in-out;transform:translateX(-50%) translateY(-100%)}:host([contentalign=\"left\"]) .tooltip{text-align:left}.tooltip.tooltip-text-left::after{text-align:left}.tooltip-open{visibility:visible;opacity:1}:host([data-tooltip-position=\"top\"]) .tooltip{left:50%;transform:translateX(-50%) translateY(-70%)}:host([data-tooltip-position=\"top\"]) .tooltip-open{left:50%;transform:translateX(-50%) translateY(-100%)}:host([data-tooltip-position=\"top-left\"]) .tooltip{left:0%;transform:translateY(-70%)}:host([data-tooltip-position=\"top-left\"]) .tooltip-open{transform:translateY(-100%)}:host([data-tooltip-position=\"top-right\"]) .tooltip{left:50%;transform:translateY(-70%)}:host([data-tooltip-position=\"top-right\"]) .tooltip-open{left:100%;transform:translateY(-100%)}:host([data-tooltip-position=\"left\"]) .tooltip{top:50%;left:0%;margin-right:0.5rem;transform:translateX(-94%) translateY(-55%)}:host([data-tooltip-position=\"left\"]) .tooltip-open{transform:translateX(-103%) translateY(-55%)}:host([data-tooltip-position=\"bottom\"]) .tooltip{top:100%;left:50%;margin-top:0.5rem;transform:translateX(-50%) translateY(-40%)}:host([data-tooltip-position=\"bottom\"]) .tooltip-open{transform:translateX(-50%) translateY(-6%)}:host([data-tooltip-position=\"bottom-left\"]) .tooltip{top:100%;left:0;margin-top:0.5rem;transform:translateY(-40%)}:host([data-tooltip-position=\"bottom-left\"]) .tooltip-open{transform:translateY(-6%)}:host([data-tooltip-position=\"bottom-right\"]) .tooltip{top:100%;left:100%;margin-top:0.5rem;transform:translateY(-40%)}:host([data-tooltip-position=\"bottom-right\"]) .tooltip-open{transform:translateY(-6%)}:host([data-tooltip-position=\"right\"]) .tooltip{top:50%;left:100%;margin-left:0.5rem;transform:translateX(-14%) translateY(-55%)}:host([data-tooltip-position=\"right\"]) .tooltip-open{transform:translateX(-4%) translateY(-55%)}";
7
+ const tooltipCss = ":host{--max-width:85vw;--z-index:1;--width:max-content;position:relative;display:inline-block}:host(:hover){cursor:pointer}:host([trigger=\"hover\"]) .tooltip{transition:opacity 0.2s ease-in-out, transform 0.2s ease-in-out}.tooltip{position:absolute;top:-0.5rem;left:50%;z-index:1;width:var(--width);min-width:100%;max-width:var(--max-width);padding:0.5rem;font-family:var(--road-font);font-size:var(--road-body-small);color:var(--road-on-surface);text-align:center;pointer-events:none;visibility:hidden;background:var(--road-surface);border:1px solid var(--road-outline-weak);border-radius:0.25rem;box-shadow:var(--road-elevation-low);opacity:0;transition:opacity 0.2s ease-in-out, transform 0.2s ease-in-out;transform:translateX(-50%) translateY(-100%)}:host([contentalign=\"left\"]) .tooltip{text-align:left}.tooltip.tooltip-text-left::after{text-align:left}.tooltip-open{visibility:visible;opacity:1}:host([data-tooltip-position=\"top\"]) .tooltip{left:50%;transform:translateX(-50%) translateY(-70%)}:host([data-tooltip-position=\"top\"]) .tooltip-open{left:50%;transform:translateX(-50%) translateY(-100%)}:host([data-tooltip-position=\"top-left\"]) .tooltip{left:0%;transform:translateY(-70%)}:host([data-tooltip-position=\"top-left\"]) .tooltip-open{transform:translateY(-100%)}:host([data-tooltip-position=\"top-right\"]) .tooltip{left:50%;transform:translateY(-70%)}:host([data-tooltip-position=\"top-right\"]) .tooltip-open{left:100%;transform:translateY(-100%)}:host([data-tooltip-position=\"top-end\"]) .tooltip{left:auto;right:0%;transform:translateY(-70%)}:host([data-tooltip-position=\"top-end\"]) .tooltip-open{transform:translateY(-100%)}:host([data-tooltip-position=\"left\"]) .tooltip{top:50%;left:0%;margin-right:0.5rem;transform:translateX(-94%) translateY(-55%)}:host([data-tooltip-position=\"left\"]) .tooltip-open{transform:translateX(-103%) translateY(-55%)}:host([data-tooltip-position=\"bottom\"]) .tooltip{top:100%;left:50%;margin-top:0.5rem;transform:translateX(-50%) translateY(-40%)}:host([data-tooltip-position=\"bottom\"]) .tooltip-open{transform:translateX(-50%) translateY(-6%)}:host([data-tooltip-position=\"bottom-left\"]) .tooltip{top:100%;left:0;margin-top:0.5rem;transform:translateY(-40%)}:host([data-tooltip-position=\"bottom-left\"]) .tooltip-open{transform:translateY(-6%)}:host([data-tooltip-position=\"bottom-right\"]) .tooltip{top:100%;left:100%;margin-top:0.5rem;transform:translateY(-40%)}:host([data-tooltip-position=\"bottom-right\"]) .tooltip-open{transform:translateY(-6%)}:host([data-tooltip-position=\"bottom-end\"]) .tooltip{margin-top:0.5rem;left:auto;top:100%;right:0;transform:translateY(-40%)}:host([data-tooltip-position=\"bottom-end\"]) .tooltip-open{transform:translateY(-6%)}:host([data-tooltip-position=\"right\"]) .tooltip{top:50%;left:100%;margin-left:0.5rem;transform:translateX(-14%) translateY(-55%)}:host([data-tooltip-position=\"right\"]) .tooltip-open{transform:translateX(-4%) translateY(-55%)}";
8
8
  const RoadTooltipStyle0 = tooltipCss;
9
9
 
10
10
  const Tooltip = class {
@@ -99,12 +99,12 @@ const Tooltip = class {
99
99
  return triggers.includes(triggerType);
100
100
  }
101
101
  render() {
102
- return (index.h(index.Host, { key: 'a41350a6114e63e0d73759b29c0afa19d467ac4b', onMouseOver: this.onMouseOver, onMouseOut: this.onMouseOut, onClick: this.onClick, onFocus: this.onFocus, onBlur: this.onBlur, tabindex: "0" // Makes the element focusable
102
+ return (index.h(index.Host, { key: '172216930c32f4de48df7264149b90c95cdf299f', onMouseOver: this.onMouseOver, onMouseOut: this.onMouseOut, onClick: this.onClick, onFocus: this.onFocus, onBlur: this.onBlur, tabindex: "0" // Makes the element focusable
103
103
  ,
104
- "data-tooltip-position": this.position }, index.h("slot", { key: 'e2985be0f2af606eb675875a1ef0e53190c54b50', "aria-describedby": this.tooltipId }), index.h("div", { key: '45f8da72265c812ebbc781cafd7356f02294c2ae', part: "tooltip", id: this.tooltipId, class: {
104
+ "data-tooltip-position": this.position }, index.h("slot", { key: 'e87dd66f22d8586f1916b4fdd9839bec64d3aea4', "aria-describedby": this.tooltipId }), index.h("div", { key: 'b61044b9938cf4859676d05a76a6fc4e8f8fb77a', part: "tooltip", id: this.tooltipId, class: {
105
105
  tooltip: true,
106
106
  'tooltip-open': this.isOpen,
107
- }, role: "tooltip", "aria-hidden": !this.isOpen ? 'true' : 'false' }, this.content, index.h("slot", { key: 'a3d80cc2d48e26c0a5c2f45e38854601c1f3ea83', name: "tooltip-content" }))));
107
+ }, role: "tooltip", "aria-hidden": !this.isOpen ? 'true' : 'false' }, this.content, index.h("slot", { key: 'a7a84bbde98a3ee34b8ab8c1d397446dbd314f2e', name: "tooltip-content" }))));
108
108
  }
109
109
  get el() { return index.getElement(this); }
110
110
  };
@@ -1 +1 @@
1
- {"file":"road-tooltip.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,UAAU,GAAG,+gFAA+gF,CAAC;AACniF,0BAAe,UAAU;;MCYZ,OAAO;IALpB;;;;;QAYU,cAAS,GAAW,gBAAgB,EAAE,UAAU,EAAE,CAAC;;;;QAKnD,YAAO,GAAG,EAAE,CAAC;;;;QAKb,aAAQ,GAQH,KAAK,CAAC;;;;QAKX,iBAAY,GAEP,QAAQ,CAAC;;;;QAKG,WAAM,GAAG,KAAK,CAAC;;;;;;QAOhC,YAAO,GAAW,OAAO,CAAC;QAkB1B,YAAO,GAAG;YAChB,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;gBAC5B,I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C,aAAa,CAAC,CAAC;QACzD,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;KAC9D;IAED,oBAAoB;QAClB,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAC5D,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;KACjE;IAwBS,UAAU,CAAC,WAAmB;QACpC,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACzC,OAAO,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;KACvC;IAED,MAAM;QACJ,QACEA,QAACC,UAAI,qDACH,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,QAAQ,EAAC,GAAG;;qCACW,IAAI,CAAC,QAAQ,IAEpCD,uFAAwB,IAAI,CAAC,SAAS,GAAI,EAE1CA,kEACE,IAAI,EAAC,SAAS,EACd,EAAE,EAAE,IAAI,CAAC,SAAS,EAClB,KAAK,EAAE;gBACL,OAAO,EAAE,IAAI;gBACb,cAAc,EAAE,IAAI,CAAC,MAAM;aAC5B,EACD,IAAI,EAAC,SAAS,iBACD,CAAC,IAAI,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,IAE3C,IAAI,CAAC,OAAO,EACbA,mEAAM,IAAI,EAAC,iBAAiB,GAAG,CAC3B,CACD,EACP;KACH;;;AAGH,IAAI,UAAU,GAAG,CAAC,CAAC;;;;;","names":["h","Host"],"sources":["src/components/tooltip/tooltip.css?tag=road-tooltip&encapsulation=shadow","src/components/tooltip/tooltip.tsx"],"sourcesContent":["/*\n * Tooltip\n *\n * Index\n * - Tooltip\n * - Position\n */\n\n/**\n * @prop --max-width: The maximum width of the tooltip.\n * @prop --z-index: The z-index of the tooltip.\n * @prop --width: width of the tooltip.\n */\n\n/* TOOLTIP\n -------------------- */\n\n:host {\n --max-width: 85vw;\n --z-index: 1;\n --width: max-content;\n\n position: relative;\n display: inline-block;\n}\n\n:host(:hover) {\n cursor: pointer;\n}\n\n\n:host([trigger=\"hover\"]) .tooltip {\n transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;\n}\n\n.tooltip {\n position: absolute;\n top: -0.5rem;\n left: 50%;\n z-index: 1;\n width: var(--width);\n min-width: 100%;\n max-width: var(--max-width);\n padding: 0.5rem;\n font-family: var(--road-font);\n font-size: var(--road-body-small);\n color: var(--road-on-surface);\n text-align: center;\n pointer-events: none;\n visibility: hidden;\n background: var(--road-surface);\n border: 1px solid var(--road-outline-weak);\n border-radius: 0.25rem;\n box-shadow: var(--road-elevation-low);\n opacity: 0;\n transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;\n transform: translateX(-50%) translateY(-100%);\n}\n\n:host([contentalign=\"left\"]) .tooltip {\n text-align: left;\n}\n\n.tooltip.tooltip-text-left::after {\n text-align: left;\n}\n\n.tooltip-open {\n visibility: visible;\n opacity: 1;\n}\n\n\n/* POSITION\n -------------------- */\n\n/**\n * Top\n */\n\n:host([data-tooltip-position=\"top\"]) .tooltip {\n left: 50%;\n transform: translateX(-50%) translateY(-70%);\n}\n\n:host([data-tooltip-position=\"top\"]) .tooltip-open {\n left: 50%;\n transform: translateX(-50%) translateY(-100%);\n}\n\n/**\n * Top Left\n */\n\n:host([data-tooltip-position=\"top-left\"]) .tooltip {\n left: 0%;\n transform: translateY(-70%);\n}\n\n:host([data-tooltip-position=\"top-left\"]) .tooltip-open {\n transform: translateY(-100%);\n}\n\n/**\n * Top Right\n */\n\n:host([data-tooltip-position=\"top-right\"]) .tooltip {\n left: 50%;\n transform: translateY(-70%);\n}\n\n:host([data-tooltip-position=\"top-right\"]) .tooltip-open {\n left: 100%;\n transform: translateY(-100%);\n}\n\n/**\n * Left\n */\n\n:host([data-tooltip-position=\"left\"]) .tooltip {\n top: 50%;\n left: 0%;\n margin-right: 0.5rem;\n transform: translateX(-94%) translateY(-55%);\n}\n\n:host([data-tooltip-position=\"left\"]) .tooltip-open {\n transform: translateX(-103%) translateY(-55%);\n}\n\n/**\n * Bottom\n */\n\n:host([data-tooltip-position=\"bottom\"]) .tooltip {\n top: 100%;\n left: 50%;\n margin-top: 0.5rem;\n transform: translateX(-50%) translateY(-40%);\n}\n\n:host([data-tooltip-position=\"bottom\"]) .tooltip-open {\n transform: translateX(-50%) translateY(-6%);\n}\n\n/**\n * Bottom Left\n */\n\n:host([data-tooltip-position=\"bottom-left\"]) .tooltip {\n top: 100%;\n left: 0;\n margin-top: 0.5rem;\n transform: translateY(-40%);\n}\n\n:host([data-tooltip-position=\"bottom-left\"]) .tooltip-open {\n transform: translateY(-6%);\n}\n\n/**\n * Bottom Right\n */\n\n:host([data-tooltip-position=\"bottom-right\"]) .tooltip {\n top: 100%;\n left: 100%;\n margin-top: 0.5rem;\n transform: translateY(-40%);\n}\n\n:host([data-tooltip-position=\"bottom-right\"]) .tooltip-open {\n transform: translateY(-6%);\n}\n\n/**\n * Right\n */\n\n:host([data-tooltip-position=\"right\"]) .tooltip {\n top: 50%;\n left: 100%;\n margin-left: 0.5rem;\n transform: translateX(-14%) translateY(-55%);\n}\n\n:host([data-tooltip-position=\"right\"]) .tooltip-open {\n transform: translateX(-4%) translateY(-55%);\n}\n","import { Component, Host, h, Prop, Method, Element } from '@stencil/core';\n\n/**\n * @slot tooltip-content - content of the tooltip, if you need to add html content, use this slot, otherwise use directly the content prop.\n *\n * @part tooltip - tooltip container\n */\n\n@Component({\n tag: 'road-tooltip',\n styleUrl: 'tooltip.css',\n shadow: true,\n})\nexport class Tooltip {\n\n @Element() el!: HTMLRoadTooltipElement;\n\n /**\n * The id of tooltip\n */\n @Prop() tooltipId: string = `road-tooltip-${++tooltipIds}`;\n\n /**\n * The tooltip's content.\n */\n @Prop() content = '';\n\n /**\n * The position of the tooltip.\n */\n @Prop() position:\n | 'top'\n | 'right'\n | 'bottom'\n | 'top-left'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-right'\n | 'left' = 'top';\n\n /**\n * The content align of the tooltip.\n */\n @Prop() contentAlign:\n | 'center'\n | 'left' = 'center';\n\n /**\n * Indicates whether or not the tooltip is open. You can use this or the open/close methods.\n */\n @Prop({ mutable: true }) isOpen = false;\n\n /**\n * Controls how the tooltip is activated. Possible options include `click`, `hover`, `focus`. Multiple\n * options can be passed by separating them with a space. When manual is used, the tooltip must be activated\n * programmatically.\n */\n @Prop() trigger: string = 'hover';\n\n /**\n * Open the tooltip.\n */\n @Method()\n async open() {\n this.isOpen = true;\n }\n\n /**\n * Close the tooltip.\n */\n @Method()\n async close() {\n this.isOpen = false;\n }\n\n private onClick = () => {\n if (this.hasTrigger('click')) {\n this.isOpen ? this.close() : this.open();\n }\n };\n\n private onMouseOver = () => {\n if (this.hasTrigger('hover')) {\n this.open();\n }\n };\n\n private onMouseOut = () => {\n if (this.hasTrigger('hover')) {\n this.close();\n }\n };\n\nprivate isKeyboardNavigation = false;\n\n// Écoute les événements pour détecter le mode d'interaction\ncomponentDidMount() {\n document.addEventListener('keydown', this.handleKeyDown);\n document.addEventListener('mousedown', this.handleMouseDown);\n}\n\ncomponentDidLoad() {\n document.addEventListener('keydown', this.handleKeyDown);\n document.addEventListener('mousedown', this.handleMouseDown);\n}\n\ncomponentWillUnmount() {\n document.removeEventListener('keydown', this.handleKeyDown);\n document.removeEventListener('mousedown', this.handleMouseDown);\n}\n\n\nprivate handleKeyDown = () => {\n this.isKeyboardNavigation = true;\n};\n\nprivate handleMouseDown = () => {\n this.isKeyboardNavigation = false;\n};\n\nprivate onFocus = () => {\n if (this.isKeyboardNavigation && this.hasTrigger('hover')) {\n this.open();\n }\n};\n\n\n private onBlur = () => {\n if (this.isKeyboardNavigation && this.hasTrigger('hover')) {\n this.close();\n }\n };\n\n private hasTrigger(triggerType: string) {\n const triggers = this.trigger.split(' ');\n return triggers.includes(triggerType);\n }\n\n render() {\n return (\n <Host\n onMouseOver={this.onMouseOver}\n onMouseOut={this.onMouseOut}\n onClick={this.onClick}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n tabindex=\"0\" // Makes the element focusable\n data-tooltip-position={this.position}\n >\n <slot aria-describedby={this.tooltipId} />\n\n <div\n part=\"tooltip\"\n id={this.tooltipId}\n class={{\n tooltip: true,\n 'tooltip-open': this.isOpen,\n }}\n role=\"tooltip\"\n aria-hidden={!this.isOpen ? 'true' : 'false'}\n >\n {this.content}\n <slot name=\"tooltip-content\" />\n </div>\n </Host>\n );\n }\n}\n\nlet tooltipIds = 0;\n"],"version":3}
1
+ {"file":"road-tooltip.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,UAAU,GAAG,25FAA25F,CAAC;AAC/6F,0BAAe,UAAU;;MCYZ,OAAO;IALpB;;;;;QAYU,cAAS,GAAW,gBAAgB,EAAE,UAAU,EAAE,CAAC;;;;QAKnD,YAAO,GAAG,EAAE,CAAC;;;;QAKb,aAAQ,GAYH,KAAK,CAAC;;;;QAKX,iBAAY,GAEP,QAAQ,CAAC;;;;QAKG,WAAM,GAAG,KAAK,CAAC;;;;;;QAOhC,YAAO,GAAW,OAAO,CAAC;QAkB1B,YAAO,GAAG;YAChB,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;gBAC5B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;aAC1C;SACF,CAAC;QAEM,gBAAW,GAAG;YACpB,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;gBAC5B,IAAI,CAAC,IAAI,EAAE,CAAC;aACb;SACF,CAAC;QAEM,eAAU,GAAG;YACnB,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;gBA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pC,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACzC,OAAO,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;KACvC;IAED,MAAM;QACJ,QACEA,QAACC,UAAI,qDACH,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,QAAQ,EAAC,GAAG;;qCACW,IAAI,CAAC,QAAQ,IAEpCD,uFAAwB,IAAI,CAAC,SAAS,GAAI,EAE1CA,kEACE,IAAI,EAAC,SAAS,EACd,EAAE,EAAE,IAAI,CAAC,SAAS,EAClB,KAAK,EAAE;gBACL,OAAO,EAAE,IAAI;gBACb,cAAc,EAAE,IAAI,CAAC,MAAM;aAC5B,EACD,IAAI,EAAC,SAAS,iBACD,CAAC,IAAI,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,IAE3C,IAAI,CAAC,OAAO,EACbA,mEAAM,IAAI,EAAC,iBAAiB,GAAG,CAC3B,CACD,EACP;KACH;;;AAGH,IAAI,UAAU,GAAG,CAAC,CAAC;;;;;","names":["h","Host"],"sources":["src/components/tooltip/tooltip.css?tag=road-tooltip&encapsulation=shadow","src/components/tooltip/tooltip.tsx"],"sourcesContent":["/*\n * Tooltip\n *\n * Index\n * - Tooltip\n * - Position\n */\n\n/**\n * @prop --max-width: The maximum width of the tooltip.\n * @prop --z-index: The z-index of the tooltip.\n * @prop --width: width of the tooltip.\n */\n\n/* TOOLTIP\n -------------------- */\n\n:host {\n --max-width: 85vw;\n --z-index: 1;\n --width: max-content;\n\n position: relative;\n display: inline-block;\n}\n\n:host(:hover) {\n cursor: pointer;\n}\n\n\n:host([trigger=\"hover\"]) .tooltip {\n transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;\n}\n\n.tooltip {\n position: absolute;\n top: -0.5rem;\n left: 50%;\n z-index: 1;\n width: var(--width);\n min-width: 100%;\n max-width: var(--max-width);\n padding: 0.5rem;\n font-family: var(--road-font);\n font-size: var(--road-body-small);\n color: var(--road-on-surface);\n text-align: center;\n pointer-events: none;\n visibility: hidden;\n background: var(--road-surface);\n border: 1px solid var(--road-outline-weak);\n border-radius: 0.25rem;\n box-shadow: var(--road-elevation-low);\n opacity: 0;\n transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;\n transform: translateX(-50%) translateY(-100%);\n}\n\n:host([contentalign=\"left\"]) .tooltip {\n text-align: left;\n}\n\n.tooltip.tooltip-text-left::after {\n text-align: left;\n}\n\n.tooltip-open {\n visibility: visible;\n opacity: 1;\n}\n\n\n/* POSITION\n -------------------- */\n\n/**\n * Top\n */\n\n:host([data-tooltip-position=\"top\"]) .tooltip {\n left: 50%;\n transform: translateX(-50%) translateY(-70%);\n}\n\n:host([data-tooltip-position=\"top\"]) .tooltip-open {\n left: 50%;\n transform: translateX(-50%) translateY(-100%);\n}\n\n/**\n * Top Left\n */\n\n:host([data-tooltip-position=\"top-left\"]) .tooltip {\n left: 0%;\n transform: translateY(-70%);\n}\n\n:host([data-tooltip-position=\"top-left\"]) .tooltip-open {\n transform: translateY(-100%);\n}\n\n/**\n * Top Right\n */\n\n:host([data-tooltip-position=\"top-right\"]) .tooltip {\n left: 50%;\n transform: translateY(-70%);\n}\n\n:host([data-tooltip-position=\"top-right\"]) .tooltip-open {\n left: 100%;\n transform: translateY(-100%);\n}\n\n/**\n * Top end\n */\n\n :host([data-tooltip-position=\"top-end\"]) .tooltip {\n left: auto;\n right: 0%;\n transform: translateY(-70%);\n}\n\n:host([data-tooltip-position=\"top-end\"]) .tooltip-open {\n transform: translateY(-100%);\n}\n\n/**\n * Left\n */\n\n:host([data-tooltip-position=\"left\"]) .tooltip {\n top: 50%;\n left: 0%;\n margin-right: 0.5rem;\n transform: translateX(-94%) translateY(-55%);\n}\n\n:host([data-tooltip-position=\"left\"]) .tooltip-open {\n transform: translateX(-103%) translateY(-55%);\n}\n\n/**\n * Bottom\n */\n\n:host([data-tooltip-position=\"bottom\"]) .tooltip {\n top: 100%;\n left: 50%;\n margin-top: 0.5rem;\n transform: translateX(-50%) translateY(-40%);\n}\n\n:host([data-tooltip-position=\"bottom\"]) .tooltip-open {\n transform: translateX(-50%) translateY(-6%);\n}\n\n/**\n * Bottom Left\n */\n\n:host([data-tooltip-position=\"bottom-left\"]) .tooltip {\n top: 100%;\n left: 0;\n margin-top: 0.5rem;\n transform: translateY(-40%);\n}\n\n:host([data-tooltip-position=\"bottom-left\"]) .tooltip-open {\n transform: translateY(-6%);\n}\n\n/**\n * Bottom Right\n */\n\n:host([data-tooltip-position=\"bottom-right\"]) .tooltip {\n top: 100%;\n left: 100%;\n margin-top: 0.5rem;\n transform: translateY(-40%);\n}\n\n:host([data-tooltip-position=\"bottom-right\"]) .tooltip-open {\n transform: translateY(-6%);\n}\n\n\n/**\n * Bottom end\n */\n\n :host([data-tooltip-position=\"bottom-end\"]) .tooltip {\n margin-top: 0.5rem;\n left: auto;\n top: 100%;\n right: 0;\n transform: translateY(-40%);\n}\n\n:host([data-tooltip-position=\"bottom-end\"]) .tooltip-open {\n transform: translateY(-6%);\n}\n\n/**\n * Right\n */\n\n:host([data-tooltip-position=\"right\"]) .tooltip {\n top: 50%;\n left: 100%;\n margin-left: 0.5rem;\n transform: translateX(-14%) translateY(-55%);\n}\n\n:host([data-tooltip-position=\"right\"]) .tooltip-open {\n transform: translateX(-4%) translateY(-55%);\n}\n","import { Component, Host, h, Prop, Method, Element } from '@stencil/core';\n\n/**\n * @slot tooltip-content - content of the tooltip, if you need to add html content, use this slot, otherwise use directly the content prop.\n *\n * @part tooltip - tooltip container\n */\n\n@Component({\n tag: 'road-tooltip',\n styleUrl: 'tooltip.css',\n shadow: true,\n})\nexport class Tooltip {\n\n @Element() el!: HTMLRoadTooltipElement;\n\n /**\n * The id of tooltip\n */\n @Prop() tooltipId: string = `road-tooltip-${++tooltipIds}`;\n\n /**\n * The tooltip's content.\n */\n @Prop() content = '';\n\n /**\n * The position of the tooltip.\n */\n @Prop() position:\n | 'top'\n | 'right'\n | 'bottom'\n | 'top-left'\n | 'top-right'\n | 'top-start'\n | 'top-end'\n | 'bottom-left'\n | 'bottom-right'\n | 'bottom-start'\n | 'bottom-end'\n | 'left' = 'top';\n\n /**\n * The content align of the tooltip.\n */\n @Prop() contentAlign:\n | 'center'\n | 'left' = 'center';\n\n /**\n * Indicates whether or not the tooltip is open. You can use this or the open/close methods.\n */\n @Prop({ mutable: true }) isOpen = false;\n\n /**\n * Controls how the tooltip is activated. Possible options include `click`, `hover`, `focus`. Multiple\n * options can be passed by separating them with a space. When manual is used, the tooltip must be activated\n * programmatically.\n */\n @Prop() trigger: string = 'hover';\n\n /**\n * Open the tooltip.\n */\n @Method()\n async open() {\n this.isOpen = true;\n }\n\n /**\n * Close the tooltip.\n */\n @Method()\n async close() {\n this.isOpen = false;\n }\n\n private onClick = () => {\n if (this.hasTrigger('click')) {\n this.isOpen ? this.close() : this.open();\n }\n };\n\n private onMouseOver = () => {\n if (this.hasTrigger('hover')) {\n this.open();\n }\n };\n\n private onMouseOut = () => {\n if (this.hasTrigger('hover')) {\n this.close();\n }\n };\n\nprivate isKeyboardNavigation = false;\n\n// Écoute les événements pour détecter le mode d'interaction\ncomponentDidMount() {\n document.addEventListener('keydown', this.handleKeyDown);\n document.addEventListener('mousedown', this.handleMouseDown);\n}\n\ncomponentDidLoad() {\n document.addEventListener('keydown', this.handleKeyDown);\n document.addEventListener('mousedown', this.handleMouseDown);\n}\n\ncomponentWillUnmount() {\n document.removeEventListener('keydown', this.handleKeyDown);\n document.removeEventListener('mousedown', this.handleMouseDown);\n}\n\n\nprivate handleKeyDown = () => {\n this.isKeyboardNavigation = true;\n};\n\nprivate handleMouseDown = () => {\n this.isKeyboardNavigation = false;\n};\n\nprivate onFocus = () => {\n if (this.isKeyboardNavigation && this.hasTrigger('hover')) {\n this.open();\n }\n};\n\n\n private onBlur = () => {\n if (this.isKeyboardNavigation && this.hasTrigger('hover')) {\n this.close();\n }\n };\n\n private hasTrigger(triggerType: string) {\n const triggers = this.trigger.split(' ');\n return triggers.includes(triggerType);\n }\n\n render() {\n return (\n <Host\n onMouseOver={this.onMouseOver}\n onMouseOut={this.onMouseOut}\n onClick={this.onClick}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n tabindex=\"0\" // Makes the element focusable\n data-tooltip-position={this.position}\n >\n <slot aria-describedby={this.tooltipId} />\n\n <div\n part=\"tooltip\"\n id={this.tooltipId}\n class={{\n tooltip: true,\n 'tooltip-open': this.isOpen,\n }}\n role=\"tooltip\"\n aria-hidden={!this.isOpen ? 'true' : 'false'}\n >\n {this.content}\n <slot name=\"tooltip-content\" />\n </div>\n </Host>\n );\n }\n}\n\nlet tooltipIds = 0;\n"],"version":3}
@@ -230,6 +230,7 @@
230
230
  border-color: var(--road-danger-outline);
231
231
  }
232
232
 
233
+ .form-control.is-invalid ~ .invalid-feedback,
233
234
  .form-control.is-invalid ~ .invalid-feedback,
234
235
  .was-validated .form-control:invalid ~ .invalid-feedback {
235
236
  display: flex;
@@ -137,6 +137,9 @@ export class Input {
137
137
  this.roadBlur.emit(value);
138
138
  this.roadChange.emit({ value });
139
139
  }
140
+ else {
141
+ this.roadBlur.emit(value);
142
+ }
140
143
  // Appeler enforceMinMaxValue lors de la perte de focus
141
144
  this.enforceMinMaxValue();
142
145
  };
@@ -201,7 +204,11 @@ export class Input {
201
204
  const hasValueClass = this.value !== '' && this.value !== null ? 'has-value' : '';
202
205
  const lessLabelClass = this.label !== '' ? '' : 'less-label';
203
206
  const isInvalidClass = this.error !== undefined && this.error !== '' ? 'is-invalid' : '';
204
- return (h(Host, { key: 'e8296b902967681ad3483560e720236c98dc4f9f', "aria-disabled": this.disabled ? 'true' : null, class: this.sizes && `input-${this.sizes}`, value: value, blockdecimal: this.blockdecimal }, h("input", { key: '8ad175738f8fca4ca345aff156e3124db00afbdf', class: `form-control ${hasValueClass} ${isInvalidClass} ${lessLabelClass}`, id: this.inputId, "aria-disabled": this.disabled ? 'true' : null, "aria-labelledby": labelId, disabled: this.disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, enterKeyHint: this.enterkeyhint, autoFocus: this.autofocus, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, size: this.size, type: this.type, value: value, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.type === 'number' ? (event) => this.handleKeyDown(event) : undefined, "data-cy": 'road-input' }), h("label", { key: 'f9e63512f533d2cf89a8bbfd6fffd8824a721211', class: "form-label", id: labelId, htmlFor: this.inputId }, this.label), this.error && this.error !== '' && h("p", { key: 'ec34468bc61c42943ee5b275081e02be859e45e2', class: "invalid-feedback" }, h("road-icon", { key: '83204d0fecc77eb3d8e8bc9697cd9bfc7ddb3be5', slot: "start", name: "alert-error-solid", "aria-hidden": "true", size: "sm" }), this.error), this.helper && this.helper !== '' && h("p", { key: 'b639735e1508e1aac0ba5800edf9649fb1847155', class: "helper" }, this.helper), this.type && this.type == 'password' && h("slot", { key: 'c33c73bc53ae22f3b3bd97021a5c4f320cff89f9', name: "checklistPassword" })));
207
+ return (h(Host, { key: '1dc5be8cca2464709ea4661a875c35feaec6d7b3', "aria-disabled": this.disabled ? 'true' : null, class: this.sizes && `input-${this.sizes}`, value: value, blockdecimal: this.blockdecimal }, h("input", { key: '57575b6d01b4bf45703e76e0ac4b7e75aa7177ae', class: `form-control ${hasValueClass} ${isInvalidClass} ${lessLabelClass}`, id: this.inputId, "aria-disabled": this.disabled ? 'true' : null, "aria-labelledby": labelId, disabled: this.disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, enterKeyHint: this.enterkeyhint, autoFocus: this.autofocus, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, size: this.size, type: this.type, value: value, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.type === 'number' ? (event) => this.handleKeyDown(event) : undefined, "data-cy": 'road-input' }), h("label", { key: '90ab2cc491c203f18e37654e361a03bf31f6e908', class: "form-label", id: labelId, htmlFor: this.inputId }, this.label), this.error && this.error !== '' && (Array.isArray(this.error)
208
+ ? // Si error est un tableau, on itère et génère un <p> pour chaque élément
209
+ this.error.map((err, index) => (h("p", { key: index, class: "invalid-feedback" }, h("road-icon", { slot: "start", name: "alert-error-solid", "aria-hidden": "true", size: "sm" }), err.trim(), " ")))
210
+ : // Si error est une chaîne, on la divise avec split et génère un <p> pour chaque élément
211
+ this.error.split(',').map((err, index) => (h("p", { key: index, class: "invalid-feedback" }, h("road-icon", { slot: "start", name: "alert-error-solid", "aria-hidden": "true", size: "sm" }), err.trim(), " ")))), this.helper && this.helper !== '' && h("p", { key: 'ac10569a3eacf0e85142238d18139bb4b95c24e3', class: "helper" }, this.helper), this.type && this.type == 'password' && h("slot", { key: '17e2a2ea624850955a29167e0475cff88960cc49', name: "checklistPassword" })));
205
212
  }
206
213
  static get is() { return "road-input"; }
207
214
  static get encapsulation() { return "scoped"; }
@@ -723,15 +730,15 @@ export class Input {
723
730
  "type": "string",
724
731
  "mutable": false,
725
732
  "complexType": {
726
- "original": "string",
727
- "resolved": "string | undefined",
733
+ "original": "string | string[]",
734
+ "resolved": "string | string[] | undefined",
728
735
  "references": {}
729
736
  },
730
737
  "required": false,
731
738
  "optional": true,
732
739
  "docs": {
733
740
  "tags": [],
734
- "text": "Error message for the field"
741
+ "text": "Error message for the field, for multiple error messages separate by ','"
735
742
  },
736
743
  "getter": false,
737
744
  "setter": false,
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MAAM,IAAI,IAAI,CAAC,MAAM,KAAK,EAAE,IAAI,0DAAG,KAAK,EAAC,QAAQ,IAAE,IAAI,CAAC,MAAM,CAAK;YACxE,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,UAAU,IAAI,6DAAM,IAAI,EAAC,mBAAmB,GAAG,CACrE,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAED,IAAI,QAAQ,GAAG,CAAC,CAAC","sourcesContent":["import { Component, Event, EventEmitter, Host, Prop, Watch, h, Method } from '@stencil/core';\nimport { debounce as lodashDebounce } from 'lodash';\nimport { AutocompleteTypes, TextFieldTypes } from '../../interface';\n\n/**\n * @slot checklistPassword - Content the checklist Password exemple.\n * `<div class=\"checklist-password mt-16\" slot=\"checklistPassword\">`\n * `<span class=\"checklist-password-label\"><strong>Low Safety</strong></span>`\n * `<road-progress color=\"danger\" value=\"25\" class=\"mt-8 mb-16\"></road-progress>`\n * `<p class=\"text-medium mb-8\">For optimal safety your password must have at least :</p>`\n * `<ul class=\"m-0 pl-16\">`\n * `<li id=\"letter\" class=\"invalid mb-8\">1 lowercase and 1 uppercase</li>`\n * `<li id=\"number\" class=\"invalid mb-8\">1 digit</li>`\n * `<li id=\"length\" class=\"invalid\">8 characters minimum</li>`\n * `</ul>`\n * `</div>`\n */\n\n@Component({\n tag: 'road-input',\n styleUrl: 'input.css',\n scoped: true,\n})\nexport class Input {\n /**\n * The id of input\n */\n @Prop() inputId: string = `road-input-${inputIds++}`;\n\n /**\n * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\n */\n @Prop() autocapitalize = 'off';\n\n /**\n * Indicates whether the value of the control can be automatically completed by the browser.\n */\n @Prop() autocomplete: AutocompleteTypes = 'off';\n\n /**\n * If `true`, block decimal.\n */\n @Prop() blockdecimal = false;\n\n\n /**\n * Whether auto correction should be enabled when the user is entering/editing the text value.\n */\n @Prop() autocorrect: 'on' | 'off' = 'off';\n\n /**\n * This Boolean attribute lets you specify that a form control should have input focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * If `true`, the user cannot interact with the input.\n */\n @Prop() disabled = false;\n\n /**\n * A hint to the browser for which enter key to display.\n * Possible values: `\"enter\"`, `\"done\"`, `\"go\"`, `\"next\"`,\n * `\"previous\"`, `\"search\"`, and `\"send\"`.\n */\n @Prop() enterkeyhint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';\n\n /**\n * A hint to the browser for which keyboard to display.\n * This attribute applies when the value of the type attribute is `\"text\"`, `\"password\"`, `\"email\"`, or `\"url\"`. Possible values are: `\"verbatim\"`, `\"latin\"`, `\"latin-name\"`, `\"latin-prose\"`, `\"full-width-latin\"`, `\"kana\"`, `\"katakana\"`, `\"numeric\"`, `\"tel\"`, `\"email\"`, `\"url\"`.\n */\n @Prop() inputmode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';\n\n /**\n * The maximum value, which must not be less than its minimum (min attribute) value.\n */\n @Prop() max?: string;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter.\n */\n @Prop() maxlength?: number;\n\n /**\n * The minimum value, which must not be greater than its maximum (max attribute) value.\n */\n @Prop() min?: string;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter.\n */\n @Prop() minlength?: number;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * A regular expression that the value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, or `\"password\"`, otherwise it is ignored.\n */\n @Prop() pattern?: string;\n\n /**\n * Instructional text that shows before the input has a value.\n */\n @Prop() placeholder?: string;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop() readonly = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * If `true`, the element will have its spelling and grammar checked.\n */\n @Prop() spellcheck = false;\n\n /**\n * Works with the min and max attributes to limit the increments at which a value can be set.\n * Possible values are: `\"any\"` or a positive floating point number.\n */\n @Prop() step?: string;\n\n /**\n * The initial size of the control. This value is in pixels unless the value of the type attribute is `\"text\"` or `\"password\"`, in which case it is an integer number of characters. This attribute applies only when the `type` attribute is set to `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, or `\"password\"`, otherwise it is ignored.\n */\n @Prop() size?: number;\n\n /**\n * The sizes of the input.\n */\n @Prop() sizes: 'lg' | 'xl' = 'lg';\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: TextFieldTypes = 'text';\n\n /**\n * The value of the input.(for dynamic use use v-model for vue instead)\n */\n @Prop({ mutable: true }) value?: string | number | null = '';\n\n /**\n * Label for the field\n */\n @Prop() label?: string = '';\n\n /**\n * Error message for the field\n */\n @Prop() error?: string;\n\n /**\n * Helper message for the field\n */\n @Prop() helper?: string;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `roadChange` event after each keystroke.\n */\n @Prop() debounce = 0;\n\n private handleKeyDown(event: KeyboardEvent) {\n if (this.type === 'number' && this.blockdecimal) {\n const forbiddenKeys = ['.', ',', 'e', '-', '¨', '^', '`', '+'];\n if (forbiddenKeys.includes(event.key)) {\n event.preventDefault();\n }\n }\n }\n\n\n private debouncedRoadChange = this.createDebouncedRoadChange();\n\n private createDebouncedRoadChange() {\n return lodashDebounce((value: any) => {\n this.roadChange.emit({ value: value == null ? value : value.toString() });\n }, this.debounce);\n }\n\n @Watch('debounce')\n debounceChanged() {\n // Créez une nouvelle fonction debouncedRoadChange avec la nouvelle valeur de debounce\n this.debouncedRoadChange = this.createDebouncedRoadChange();\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged(newValue: string | number | null, oldValue: string | number | null) {\n if (newValue !== oldValue) {\n this.debouncedRoadChange(newValue);\n }\n }\n\n @Method()\n async enforceMinMaxValue() {\n let value = this.getValue();\n\n const minValue = this.min !== undefined ? parseFloat(this.min) : undefined;\n const maxValue = this.max !== undefined ? parseFloat(this.max) : undefined;\n let numericValue = parseFloat(value);\n\n if (!isNaN(numericValue)) {\n if (minValue !== undefined && numericValue < minValue) {\n numericValue = minValue;\n }\n if (maxValue !== undefined && numericValue > maxValue) {\n numericValue = maxValue;\n }\n value = numericValue.toString();\n }\n\n if (this.type === 'number' && this.value !== value) {\n this.value = value; // Déclenche @Watch('value')\n }\n }\n\n /**\n * Emitted when a keyboard input occurred.\n */\n\n /** @internal */\n @Event() roadInput!: EventEmitter<KeyboardEvent>;\n\n /**\n * Emitted when the value has changed.\n */\n\n /** @internal */\n @Event() roadChange!: EventEmitter<{\n value: string | undefined | null;\n }>;\n\n /**\n * Emitted when the input loses focus.\n */\n\n /** @internal */\n @Event() roadBlur!: EventEmitter<string | null>;\n\n /**\n * Emitted when the input has focus.\n */\n\n /** @internal */\n @Event() roadFocus!: EventEmitter<void>;\n\n\n\n\n\n private getValue(): string {\n return typeof this.value === 'number'\n ? this.value.toString()\n : (this.value || '').toString();\n }\n\n private onInput = (ev: Event) => {\n const input = ev.target as HTMLInputElement;\n let newValue = input.value;\n \n if (this.type === 'number' && this.blockdecimal) {\n newValue = newValue.replace(/[.,]/g, ''); // Supprime les décimales si `blockdecimal` est activé\n }\n \n\n\n \n if (this.type === 'number') {\n // Convertir en nombre et ajuster selon min/max\n let numericValue = parseFloat(newValue);\n const minValue = this.min !== undefined ? parseFloat(this.min) : undefined;\n const maxValue = this.max !== undefined ? parseFloat(this.max) : undefined;\n \n if (!isNaN(numericValue)) {\n if (minValue !== undefined && numericValue < minValue) {\n numericValue = minValue;\n }\n if (maxValue !== undefined && numericValue > maxValue) {\n numericValue = maxValue;\n }\n newValue = numericValue.toString();\n input.value = newValue; // Force l'affichage de la valeur max\n ev.preventDefault(); // Empêche la saisie supplémentaire\n }\n this.value = newValue;\n }\n \n // Vérification si la valeur a réellement changé avant de la mettre à jour\n if (this.value !== newValue) {\n this.value = newValue;\n this.roadInput.emit(ev as KeyboardEvent);\n }\n\n // Appeler enforceMinMaxValue à chaque modification de la valeur\n this.enforceMinMaxValue();\n }; \n \n\n private onBlur = () => {\n let value = this.getValue();\n \n \n \n if (this.type === 'number') {\n const minValue = this.min !== undefined ? parseFloat(this.min) : undefined;\n const maxValue = this.max !== undefined ? parseFloat(this.max) : undefined;\n let numericValue = parseFloat(value);\n \n if (!isNaN(numericValue)) {\n if (minValue !== undefined && numericValue < minValue) {\n numericValue = minValue;\n }\n if (maxValue !== undefined && numericValue > maxValue) {\n numericValue = maxValue;\n }\n value = numericValue.toString();\n }\n this.value = value;\n const input = document.getElementById(this.inputId) as HTMLInputElement;\n input.value = value;\n }\n \n // Vérification si la valeur a changé avant mise à jour\n if (this.value !== value) {\n this.value = value;\n this.roadBlur.emit(value);\n this.roadChange.emit({ value });\n }\n \n // Appeler enforceMinMaxValue lors de la perte de focus\n this.enforceMinMaxValue();\n };\n \n\n private onFocus = () => {\n this.roadFocus.emit();\n };\n\n\n\n componentWillLoad() {\n this.debounceChanged(); // Initialize debounce on component load\n }\n\n render() {\n const value = this.getValue();\n const labelId = this.inputId + '-label';\n const hasValueClass = this.value !== '' && this.value !== null ? 'has-value' : '';\n const lessLabelClass = this.label !== '' ? '' : 'less-label';\n const isInvalidClass = this.error !== undefined && this.error !== '' ? 'is-invalid' : '';\n\n return (\n <Host aria-disabled={this.disabled ? 'true' : null} class={this.sizes && `input-${this.sizes}`} value={value} blockdecimal={this.blockdecimal}>\n <input\n class={`form-control ${hasValueClass} ${isInvalidClass} ${lessLabelClass}`}\n id={this.inputId}\n aria-disabled={this.disabled ? 'true' : null}\n aria-labelledby={labelId}\n disabled={this.disabled}\n autoCapitalize={this.autocapitalize}\n autoComplete={this.autocomplete}\n autoCorrect={this.autocorrect}\n enterKeyHint={this.enterkeyhint}\n autoFocus={this.autofocus}\n inputMode={this.inputmode}\n min={this.min}\n max={this.max}\n minLength={this.minlength}\n maxLength={this.maxlength}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n step={this.step}\n size={this.size}\n type={this.type}\n value={value}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onKeyDown={this.type === 'number' ? (event: KeyboardEvent) => this.handleKeyDown(event) : undefined}\n data-cy='road-input'\n />\n <label class=\"form-label\" id={labelId} htmlFor={this.inputId}>{this.label}</label>\n {this.error && this.error !== '' && <p class=\"invalid-feedback\"><road-icon slot=\"start\" name=\"alert-error-solid\" aria-hidden=\"true\" size=\"sm\"></road-icon>{this.error}</p>}\n {this.helper && this.helper !== '' && <p class=\"helper\">{this.helper}</p>}\n {this.type && this.type == 'password' && <slot name=\"checklistPassword\" />}\n </Host>\n );\n }\n}\n\nlet inputIds = 0;\n"]}
1
+ {"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,QAAQ,CAAC;AAGpD;;;;;;;;;;;;GAYG;AAOH,MAAM,OAAO,KAAK;IALlB;QAME;;WAEG;QACK,YAAO,GAAW,cAAc,QAAQ,EAAE,EAAE,CAAC;QAErD;;WAEG;QACK,mBAAc,GAAG,KAAK,CAAC;QAE/B;;WAEG;QACK,iBAAY,GAAsB,KAAK,CAAC;QAEhD;;WAEG;QACK,iBAAY,GAAG,KAAK,CAAC;QAG7B;;WAEG;QACK,gBAAW,GAAiB,KAAK,CAAC;QAE1C;;WAEG;QACK,cAAS,GAAG,KAAK,CAAC;QAE1B;;WAEG;QACK,aAAQ,GAAG,KAAK,CAAC;QAmCzB;;WAEG;QACK,SAAI,GAAW,IAAI,CAAC,OAAO,CAAC;QAYpC;;WAEG;QACK,aAAQ,GAAG,KAAK,CAAC;QAEzB;;WAEG;QACK,aAAQ,GAAG,KAAK,CAAC;QAEzB;;WAEG;QACK,eAAU,GAAG,KAAK,CAAC;QAa3B;;WAEG;QACK,UAAK,GAAgB,IAAI,CAAC;QAElC;;WAEG;QACK,SAAI,GAAmB,MAAM,CAAC;QAEtC;;WAEG;QACsB,UAAK,GAA4B,EAAE,CAAC;QAE7D;;WAEG;QACK,UAAK,GAAY,EAAE,CAAC;QAY5B;;WAEG;QACK,aAAQ,GAAG,CAAC,CAAC;QAYb,w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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAED,IAAI,QAAQ,GAAG,CAAC,CAAC","sourcesContent":["import { Component, Event, EventEmitter, Host, Prop, Watch, h, Method } from '@stencil/core';\nimport { debounce as lodashDebounce } from 'lodash';\nimport { AutocompleteTypes, TextFieldTypes } from '../../interface';\n\n/**\n * @slot checklistPassword - Content the checklist Password exemple.\n * `<div class=\"checklist-password mt-16\" slot=\"checklistPassword\">`\n * `<span class=\"checklist-password-label\"><strong>Low Safety</strong></span>`\n * `<road-progress color=\"danger\" value=\"25\" class=\"mt-8 mb-16\"></road-progress>`\n * `<p class=\"text-medium mb-8\">For optimal safety your password must have at least :</p>`\n * `<ul class=\"m-0 pl-16\">`\n * `<li id=\"letter\" class=\"invalid mb-8\">1 lowercase and 1 uppercase</li>`\n * `<li id=\"number\" class=\"invalid mb-8\">1 digit</li>`\n * `<li id=\"length\" class=\"invalid\">8 characters minimum</li>`\n * `</ul>`\n * `</div>`\n */\n\n@Component({\n tag: 'road-input',\n styleUrl: 'input.css',\n scoped: true,\n})\nexport class Input {\n /**\n * The id of input\n */\n @Prop() inputId: string = `road-input-${inputIds++}`;\n\n /**\n * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\n */\n @Prop() autocapitalize = 'off';\n\n /**\n * Indicates whether the value of the control can be automatically completed by the browser.\n */\n @Prop() autocomplete: AutocompleteTypes = 'off';\n\n /**\n * If `true`, block decimal.\n */\n @Prop() blockdecimal = false;\n\n\n /**\n * Whether auto correction should be enabled when the user is entering/editing the text value.\n */\n @Prop() autocorrect: 'on' | 'off' = 'off';\n\n /**\n * This Boolean attribute lets you specify that a form control should have input focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * If `true`, the user cannot interact with the input.\n */\n @Prop() disabled = false;\n\n /**\n * A hint to the browser for which enter key to display.\n * Possible values: `\"enter\"`, `\"done\"`, `\"go\"`, `\"next\"`,\n * `\"previous\"`, `\"search\"`, and `\"send\"`.\n */\n @Prop() enterkeyhint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';\n\n /**\n * A hint to the browser for which keyboard to display.\n * This attribute applies when the value of the type attribute is `\"text\"`, `\"password\"`, `\"email\"`, or `\"url\"`. Possible values are: `\"verbatim\"`, `\"latin\"`, `\"latin-name\"`, `\"latin-prose\"`, `\"full-width-latin\"`, `\"kana\"`, `\"katakana\"`, `\"numeric\"`, `\"tel\"`, `\"email\"`, `\"url\"`.\n */\n @Prop() inputmode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';\n\n /**\n * The maximum value, which must not be less than its minimum (min attribute) value.\n */\n @Prop() max?: string;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter.\n */\n @Prop() maxlength?: number;\n\n /**\n * The minimum value, which must not be greater than its maximum (max attribute) value.\n */\n @Prop() min?: string;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter.\n */\n @Prop() minlength?: number;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * A regular expression that the value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, or `\"password\"`, otherwise it is ignored.\n */\n @Prop() pattern?: string;\n\n /**\n * Instructional text that shows before the input has a value.\n */\n @Prop() placeholder?: string;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop() readonly = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * If `true`, the element will have its spelling and grammar checked.\n */\n @Prop() spellcheck = false;\n\n /**\n * Works with the min and max attributes to limit the increments at which a value can be set.\n * Possible values are: `\"any\"` or a positive floating point number.\n */\n @Prop() step?: string;\n\n /**\n * The initial size of the control. This value is in pixels unless the value of the type attribute is `\"text\"` or `\"password\"`, in which case it is an integer number of characters. This attribute applies only when the `type` attribute is set to `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, or `\"password\"`, otherwise it is ignored.\n */\n @Prop() size?: number;\n\n /**\n * The sizes of the input.\n */\n @Prop() sizes: 'lg' | 'xl' = 'lg';\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: TextFieldTypes = 'text';\n\n /**\n * The value of the input.(for dynamic use use v-model for vue instead)\n */\n @Prop({ mutable: true }) value?: string | number | null = '';\n\n /**\n * Label for the field\n */\n @Prop() label?: string = '';\n\n /**\n * Error message for the field, for multiple error messages separate by ','\n */\n @Prop() error?: string | string[];\n\n /**\n * Helper message for the field\n */\n @Prop() helper?: string;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `roadChange` event after each keystroke.\n */\n @Prop() debounce = 0;\n\n private handleKeyDown(event: KeyboardEvent) {\n if (this.type === 'number' && this.blockdecimal) {\n const forbiddenKeys = ['.', ',', 'e', '-', '¨', '^', '`', '+'];\n if (forbiddenKeys.includes(event.key)) {\n event.preventDefault();\n }\n }\n }\n\n\n private debouncedRoadChange = this.createDebouncedRoadChange();\n\n private createDebouncedRoadChange() {\n return lodashDebounce((value: any) => {\n this.roadChange.emit({ value: value == null ? value : value.toString() });\n }, this.debounce);\n }\n\n @Watch('debounce')\n debounceChanged() {\n // Créez une nouvelle fonction debouncedRoadChange avec la nouvelle valeur de debounce\n this.debouncedRoadChange = this.createDebouncedRoadChange();\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged(newValue: string | number | null, oldValue: string | number | null) {\n if (newValue !== oldValue) {\n this.debouncedRoadChange(newValue);\n }\n }\n\n @Method()\n async enforceMinMaxValue() {\n let value = this.getValue();\n\n const minValue = this.min !== undefined ? parseFloat(this.min) : undefined;\n const maxValue = this.max !== undefined ? parseFloat(this.max) : undefined;\n let numericValue = parseFloat(value);\n\n if (!isNaN(numericValue)) {\n if (minValue !== undefined && numericValue < minValue) {\n numericValue = minValue;\n }\n if (maxValue !== undefined && numericValue > maxValue) {\n numericValue = maxValue;\n }\n value = numericValue.toString();\n }\n\n if (this.type === 'number' && this.value !== value) {\n this.value = value; // Déclenche @Watch('value')\n }\n }\n\n /**\n * Emitted when a keyboard input occurred.\n */\n\n /** @internal */\n @Event() roadInput!: EventEmitter<KeyboardEvent>;\n\n /**\n * Emitted when the value has changed.\n */\n\n /** @internal */\n @Event() roadChange!: EventEmitter<{\n value: string | undefined | null;\n }>;\n\n /**\n * Emitted when the input loses focus.\n */\n\n /** @internal */\n @Event() roadBlur!: EventEmitter<string | null>;\n\n /**\n * Emitted when the input has focus.\n */\n\n /** @internal */\n @Event() roadFocus!: EventEmitter<void>;\n\n\n\n\n\n private getValue(): string {\n return typeof this.value === 'number'\n ? this.value.toString()\n : (this.value || '').toString();\n }\n\n private onInput = (ev: Event) => {\n const input = ev.target as HTMLInputElement;\n let newValue = input.value;\n \n if (this.type === 'number' && this.blockdecimal) {\n newValue = newValue.replace(/[.,]/g, ''); // Supprime les décimales si `blockdecimal` est activé\n }\n \n\n\n \n if (this.type === 'number') {\n // Convertir en nombre et ajuster selon min/max\n let numericValue = parseFloat(newValue);\n const minValue = this.min !== undefined ? parseFloat(this.min) : undefined;\n const maxValue = this.max !== undefined ? parseFloat(this.max) : undefined;\n \n if (!isNaN(numericValue)) {\n if (minValue !== undefined && numericValue < minValue) {\n numericValue = minValue;\n }\n if (maxValue !== undefined && numericValue > maxValue) {\n numericValue = maxValue;\n }\n newValue = numericValue.toString();\n input.value = newValue; // Force l'affichage de la valeur max\n ev.preventDefault(); // Empêche la saisie supplémentaire\n }\n this.value = newValue;\n }\n \n // Vérification si la valeur a réellement changé avant de la mettre à jour\n if (this.value !== newValue) {\n this.value = newValue;\n this.roadInput.emit(ev as KeyboardEvent);\n }\n\n // Appeler enforceMinMaxValue à chaque modification de la valeur\n this.enforceMinMaxValue();\n }; \n \n\n private onBlur = () => {\n let value = this.getValue();\n \n \n \n if (this.type === 'number') {\n const minValue = this.min !== undefined ? parseFloat(this.min) : undefined;\n const maxValue = this.max !== undefined ? parseFloat(this.max) : undefined;\n let numericValue = parseFloat(value);\n \n if (!isNaN(numericValue)) {\n if (minValue !== undefined && numericValue < minValue) {\n numericValue = minValue;\n }\n if (maxValue !== undefined && numericValue > maxValue) {\n numericValue = maxValue;\n }\n value = numericValue.toString();\n }\n this.value = value;\n const input = document.getElementById(this.inputId) as HTMLInputElement;\n input.value = value;\n }\n \n // Vérification si la valeur a changé avant mise à jour\n if (this.value !== value) {\n this.value = value;\n this.roadBlur.emit(value);\n this.roadChange.emit({ value });\n }else{\n this.roadBlur.emit(value);\n }\n \n // Appeler enforceMinMaxValue lors de la perte de focus\n this.enforceMinMaxValue();\n };\n \n\n private onFocus = () => {\n this.roadFocus.emit();\n };\n\n\n\n componentWillLoad() {\n this.debounceChanged(); // Initialize debounce on component load\n }\n\n render() {\n const value = this.getValue();\n const labelId = this.inputId + '-label';\n const hasValueClass = this.value !== '' && this.value !== null ? 'has-value' : '';\n const lessLabelClass = this.label !== '' ? '' : 'less-label';\n const isInvalidClass = this.error !== undefined && this.error !== '' ? 'is-invalid' : '';\n\n return (\n <Host aria-disabled={this.disabled ? 'true' : null} class={this.sizes && `input-${this.sizes}`} value={value} blockdecimal={this.blockdecimal}>\n <input\n class={`form-control ${hasValueClass} ${isInvalidClass} ${lessLabelClass}`}\n id={this.inputId}\n aria-disabled={this.disabled ? 'true' : null}\n aria-labelledby={labelId}\n disabled={this.disabled}\n autoCapitalize={this.autocapitalize}\n autoComplete={this.autocomplete}\n autoCorrect={this.autocorrect}\n enterKeyHint={this.enterkeyhint}\n autoFocus={this.autofocus}\n inputMode={this.inputmode}\n min={this.min}\n max={this.max}\n minLength={this.minlength}\n maxLength={this.maxlength}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n step={this.step}\n size={this.size}\n type={this.type}\n value={value}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onKeyDown={this.type === 'number' ? (event: KeyboardEvent) => this.handleKeyDown(event) : undefined}\n data-cy='road-input'\n />\n <label class=\"form-label\" id={labelId} htmlFor={this.inputId}>{this.label}</label>\n {this.error && this.error !== '' && (\n Array.isArray(this.error) \n ? // Si error est un tableau, on itère et génère un <p> pour chaque élément\n this.error.map((err, index) => (\n <p key={index} class=\"invalid-feedback\">\n <road-icon slot=\"start\" name=\"alert-error-solid\" aria-hidden=\"true\" size=\"sm\"></road-icon>\n {err.trim()} {/* Enlever les espaces superflus */}\n </p>\n ))\n : // Si error est une chaîne, on la divise avec split et génère un <p> pour chaque élément\n this.error.split(',').map((err, index) => (\n <p key={index} class=\"invalid-feedback\">\n <road-icon slot=\"start\" name=\"alert-error-solid\" aria-hidden=\"true\" size=\"sm\"></road-icon>\n {err.trim()} {/* Enlever les espaces superflus */}\n </p>\n ))\n )}\n\n {this.helper && this.helper !== '' && <p class=\"helper\">{this.helper}</p>}\n {this.type && this.type == 'password' && <slot name=\"checklistPassword\" />}\n </Host>\n );\n }\n}\n\nlet inputIds = 0;\n"]}
@@ -36,7 +36,7 @@ export default {
36
36
  control: 'boolean',
37
37
  },
38
38
  error: {
39
- description: "Error message for the field",
39
+ description: "Error message for the field, for multiple error messages separate by ','",
40
40
  control: 'text',
41
41
  },
42
42
  helper: {
@@ -151,25 +151,35 @@ export default {
151
151
  control: 'text',
152
152
  },
153
153
  roadblur: {
154
- control: {
155
- type: null,
154
+ action: 'roadblur',
155
+ description: 'Emitted when the input loses focus.',
156
+ table: {
157
+ category: 'Events',
158
+ type: { summary: 'CustomEvent' },
156
159
  },
157
160
  },
158
161
  roadfocus: {
159
- control: {
160
- type: null,
162
+ action: 'roadfocus',
163
+ description: 'Emitted when the input loses focus.',
164
+ table: {
165
+ category: 'Events',
166
+ type: { summary: 'CustomEvent' },
161
167
  },
162
168
  },
163
169
  roadchange: {
164
170
  action: 'roadchange',
165
- control: {
166
- type: null,
171
+ description: 'Emitted when the value has changed.',
172
+ table: {
173
+ category: 'Events',
174
+ type: { summary: 'CustomEvent' },
167
175
  },
168
176
  },
169
177
  roadinput: {
170
178
  action: 'roadinput',
171
- control: {
172
- type: null,
179
+ description: "Emitted when a keyboard input occurred.",
180
+ table: {
181
+ category: 'Events',
182
+ type: { summary: 'CustomEvent' },
173
183
  },
174
184
  },
175
185
  '--height': {
@@ -293,6 +303,12 @@ Error.args = {
293
303
  error: 'This field is required',
294
304
  };
295
305
 
306
+ export const MultipleErrors = Template.bind({});
307
+ MultipleErrors.args = {
308
+ error: ['Champ requis', 'Doit contenir au moins 8 caractères'],
309
+ };
310
+
311
+
296
312
  export const Helper = Template.bind({});
297
313
  Helper.args = {
298
314
  helper: 'This field is required',
@@ -74,12 +74,10 @@
74
74
  @media (hover: hover) {
75
75
 
76
76
  .input-group:not(.is-disabled):hover ::slotted([slot="prepend"]) {
77
- border-color: var(--road-input-outline-variant);
78
77
  border-right-color: transparent;
79
78
  }
80
79
 
81
80
  .input-group:not(.is-disabled):hover ::slotted([slot="append"]) {
82
- border-color: var(--road-input-outline-variant);
83
81
  border-left-color: transparent;
84
82
  }
85
83
 
@@ -33,16 +33,16 @@ export class InputGroup {
33
33
  const formSelect = this.el.querySelector('.form-select');
34
34
  const formSelectLabel = this.el.querySelector('.form-select-label');
35
35
  if (formControl) {
36
- formControl.style.textIndent = hasPrepend ? '2rem' : '';
36
+ formControl.style.textIndent = hasPrepend ? '2.1rem' : '';
37
37
  }
38
38
  if (formSelect) {
39
- formSelect.style.textIndent = hasPrepend ? '2rem' : '';
39
+ formSelect.style.textIndent = hasPrepend ? '2.1rem' : '';
40
40
  }
41
41
  if (formLabel) {
42
- formLabel.style.textIndent = hasPrepend ? '2.7rem' : '';
42
+ formLabel.style.textIndent = hasPrepend ? '2.8rem' : '';
43
43
  }
44
44
  if (formSelectLabel) {
45
- formSelectLabel.style.textIndent = hasPrepend ? '2.7rem' : '';
45
+ formSelectLabel.style.textIndent = hasPrepend ? '2.8rem' : '';
46
46
  }
47
47
  }
48
48
  componentDidLoad() {
@@ -58,7 +58,7 @@ export class InputGroup {
58
58
  ? `size-${this.el.querySelector('road-input').sizes}`
59
59
  : '';
60
60
  const disabledClass = this.disabled ? 'is-disabled' : '';
61
- return (h("div", { key: '99a512f367c7dfb57297073d05d3e341df818ab3', class: `input-group ${errorClass} ${disabledClass} ${sizeClass}` }, h("div", { key: '9e89c27036e321223513c99d3f399694008a4b99', class: "input-group-prepend" }, h("slot", { key: 'f448db90587308448b33aeeff57e26f9943c836c', name: "prepend" })), h("slot", { key: '67214bd2d0fed61ae080aa10306b98bb376f8f7d' }), h("div", { key: '152a4f643d38c0b443a39d3cc8fa781c9b99f87b', class: "input-group-append" }, h("slot", { key: '549c3c8f388cf6f26c1080da788a9aadf53ac61b', name: "append" }))));
61
+ return (h("div", { key: '54938b0939fc88368a47099bd3263a4eaaa273fc', class: `input-group ${errorClass} ${disabledClass} ${sizeClass}` }, h("div", { key: '3039896e2e22c633d4b298899488b16dc2d34018', class: "input-group-prepend" }, h("slot", { key: 'ad675a53558b83d6dd5b0ae044db538245da0316', name: "prepend" })), h("slot", { key: '1283ee327bbe9755e107a80cf700293c685429bf' }), h("div", { key: '677da10746507b1171498461da76d7e8e7d6056a', class: "input-group-append" }, h("slot", { key: '2bbf8d38a2343e362ee20bc8c3d54f88fd992eed', name: "append" }))));
62
62
  }
63
63
  static get is() { return "road-input-group"; }
64
64
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"input-group.js","sourceRoot":"","sources":["../../../src/components/input-group/input-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEnE;;;;GAIG;AAOH,MAAM,OAAO,UAAU;IALvB;QAQE,4EAA4E;QACpE,aAAQ,GAAY,KAAK,CAAC;KAsEnC;IApEC,6EAA6E;IAE7E,oBAAoB,CAAC,QAAiB;QACpC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IAED,yCAAyC;IACjC,mBAAmB,CAAC,UAAmB;QAC7C,MAAM,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,sCAAsC,CAAC,CAAC;QAClF,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACvB,IAAI,UAAU,EAAE,CAAC;gBACf,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;YACrC,CAAC;iBAAM,CAAC;gBACN,KAAK,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;YACpC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,oEAAoE;IAC5D,iBAAiB;QACvB,MAAM,UAAU,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,kBAAkB,C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AAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;IAED,MAAM;QACJ,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;QAClF,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,mBAAmB,CAAC;YAC1D,CAAC,CAAC,QAAS,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,YAAY,CAA0B,CAAC,KAAK,EAAE;YAC/E,CAAC,CAAC,EAAE,CAAC;QACP,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;QAEzD,OAAO,CACL,4DAAK,KAAK,EAAE,eAAe,UAAU,IAAI,aAAa,IAAI,SAAS,EAAE;YACnE,4DAAK,KAAK,EAAC,qBAAqB;gBAC9B,6DAAM,IAAI,EAAC,SAAS,GAAG,CACnB;YACN,8DAAQ;YACR,4DAAK,KAAK,EAAC,oBAAoB;gBAC7B,6DAAM,IAAI,EAAC,QAAQ,GAAG,CAClB,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop, Watch } from '@stencil/core';\n\n/**\n * @slot prepend - Add icon or button before the field.\n * @slot - Add the road-input or road-select here.\n * @slot append - Add icon or button after the field.\n */\n\n@Component({\n tag: 'road-input-group',\n styleUrl: 'input-group.css',\n shadow: true,\n})\nexport class InputGroup {\n @Element() el!: HTMLRoadInputGroupElement;\n\n /** Disables the entire input group and propagates the state to children. */\n @Prop() disabled: boolean = false;\n\n /** Watches for changes in the `disabled` prop and updates child elements. */\n @Watch('disabled')\n handleDisabledChange(newValue: boolean) {\n this.updateDisabledState(newValue);\n }\n\n /** Applique le `disabled` aux enfants */\n private updateDisabledState(isDisabled: boolean) {\n const children = this.el.querySelectorAll('road-input, road-button, road-select');\n children.forEach(child => {\n if (isDisabled) {\n child.setAttribute('disabled', '');\n } else {\n child.removeAttribute('disabled');\n }\n });\n }\n\n /** Vérifie et applique le `text-indent` si `prepend` est présent */\n private updateIndentation() {\n const hasPrepend = !!this.el.querySelector('[slot=\"prepend\"]');\n const formControl = this.el.querySelector('.form-control') as HTMLElement;\n const formLabel = this.el.querySelector('.form-label') as HTMLElement;\n const formSelect = this.el.querySelector('.form-select') as HTMLElement;\n const formSelectLabel = this.el.querySelector('.form-select-label') as HTMLElement;\n \n if (formControl) {\n formControl.style.textIndent = hasPrepend ? '2rem' : '';\n }\n if (formSelect) {\n formSelect.style.textIndent = hasPrepend ? '2rem' : '';\n }\n if (formLabel) {\n formLabel.style.textIndent = hasPrepend ? '2.7rem' : '';\n }\n if (formSelectLabel) {\n formSelectLabel.style.textIndent = hasPrepend ? '2.7rem' : '';\n }\n }\n\n componentDidLoad() {\n this.updateDisabledState(this.disabled);\n this.updateIndentation(); // Appliquer les styles au montage\n\n // Observer les mutations (au cas où des éléments sont ajoutés dynamiquement)\n const observer = new MutationObserver(() => this.updateIndentation());\n observer.observe(this.el, { childList: true, subtree: true });\n }\n\n render() {\n const errorClass = this.el.querySelector('road-input[error]') ? 'is-invalid' : '';\n const sizeClass = this.el.querySelector('road-input[sizes]') \n ? `size-${(this.el.querySelector('road-input') as HTMLRoadInputElement).sizes}` \n : '';\n const disabledClass = this.disabled ? 'is-disabled' : '';\n\n return (\n <div class={`input-group ${errorClass} ${disabledClass} ${sizeClass}`}>\n <div class=\"input-group-prepend\">\n <slot name=\"prepend\" />\n </div>\n <slot />\n <div class=\"input-group-append\">\n <slot name=\"append\" />\n </div>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"input-group.js","sourceRoot":"","sources":["../../../src/components/input-group/input-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EA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C,CAAC,CAAC,EAAE,CAAC;QAEzD,OAAO,CACL,4DAAK,KAAK,EAAE,eAAe,UAAU,IAAI,aAAa,IAAI,SAAS,EAAE;YACnE,4DAAK,KAAK,EAAC,qBAAqB;gBAC9B,6DAAM,IAAI,EAAC,SAAS,GAAG,CACnB;YACN,8DAAQ;YACR,4DAAK,KAAK,EAAC,oBAAoB;gBAC7B,6DAAM,IAAI,EAAC,QAAQ,GAAG,CAClB,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop, Watch } from '@stencil/core';\n\n/**\n * @slot prepend - Add icon or button before the field.\n * @slot - Add the road-input or road-select here.\n * @slot append - Add icon or button after the field.\n */\n\n@Component({\n tag: 'road-input-group',\n styleUrl: 'input-group.css',\n shadow: true,\n})\nexport class InputGroup {\n @Element() el!: HTMLRoadInputGroupElement;\n\n /** Disables the entire input group and propagates the state to children. */\n @Prop() disabled: boolean = false;\n\n /** Watches for changes in the `disabled` prop and updates child elements. */\n @Watch('disabled')\n handleDisabledChange(newValue: boolean) {\n this.updateDisabledState(newValue);\n }\n\n /** Applique le `disabled` aux enfants */\n private updateDisabledState(isDisabled: boolean) {\n const children = this.el.querySelectorAll('road-input, road-button, road-select');\n children.forEach(child => {\n if (isDisabled) {\n child.setAttribute('disabled', '');\n } else {\n child.removeAttribute('disabled');\n }\n });\n }\n\n /** Vérifie et applique le `text-indent` si `prepend` est présent */\n private updateIndentation() {\n const hasPrepend = !!this.el.querySelector('[slot=\"prepend\"]');\n const formControl = this.el.querySelector('.form-control') as HTMLElement;\n const formLabel = this.el.querySelector('.form-label') as HTMLElement;\n const formSelect = this.el.querySelector('.form-select') as HTMLElement;\n const formSelectLabel = this.el.querySelector('.form-select-label') as HTMLElement;\n \n if (formControl) {\n formControl.style.textIndent = hasPrepend ? '2.1rem' : '';\n }\n if (formSelect) {\n formSelect.style.textIndent = hasPrepend ? '2.1rem' : '';\n }\n if (formLabel) {\n formLabel.style.textIndent = hasPrepend ? '2.8rem' : '';\n }\n if (formSelectLabel) {\n formSelectLabel.style.textIndent = hasPrepend ? '2.8rem' : '';\n }\n }\n\n componentDidLoad() {\n this.updateDisabledState(this.disabled);\n this.updateIndentation(); // Appliquer les styles au montage\n\n // Observer les mutations (au cas où des éléments sont ajoutés dynamiquement)\n const observer = new MutationObserver(() => this.updateIndentation());\n observer.observe(this.el, { childList: true, subtree: true });\n }\n\n render() {\n const errorClass = this.el.querySelector('road-input[error]') ? 'is-invalid' : '';\n const sizeClass = this.el.querySelector('road-input[sizes]') \n ? `size-${(this.el.querySelector('road-input') as HTMLRoadInputElement).sizes}` \n : '';\n const disabledClass = this.disabled ? 'is-disabled' : '';\n\n return (\n <div class={`input-group ${errorClass} ${disabledClass} ${sizeClass}`}>\n <div class=\"input-group-prepend\">\n <slot name=\"prepend\" />\n </div>\n <slot />\n <div class=\"input-group-append\">\n <slot name=\"append\" />\n </div>\n </div>\n );\n }\n}\n"]}
@@ -57,13 +57,13 @@ export class Item {
57
57
  target,
58
58
  };
59
59
  const showDetail = detail !== undefined && detail;
60
- return (h(Host, { key: '9fb4b35e594ec2393232ad0a9403e279e2e2889c', "aria-disabled": disabled ? 'true' : null, class: {
60
+ return (h(Host, { key: '9b71788b470f7fc686c9953868c59515607d5b01', "aria-disabled": disabled ? 'true' : null, class: {
61
61
  [`item-lines-${lines}`]: lines !== undefined,
62
- } }, h(TagType, Object.assign({ key: '9fba47364f496d51e09e3b2a5a92dd00ef71ff87' }, attrs, { class: {
62
+ } }, h(TagType, Object.assign({ key: 'd05ff0c98f1a0713e935954b995e0f6476069414' }, attrs, { class: {
63
63
  'item-native': true,
64
64
  'item-active': this.active,
65
65
  [`layout-${layout}`]: layout !== undefined,
66
- }, part: "native", disabled: disabled }), h("slot", { key: 'fe656d0fa4a1f518f6ab7a43524e244d6eb37d30', name: "start" }), h("div", { key: 'd1c19e1d0a10b578799970249bf4e40cdddd9dc3', class: "item-inner" }, h("div", { key: '3523d2bd743dc2f16cc1dc2de844a3ab3be93ff2', class: "input-wrapper" }, h("slot", { key: 'a7da0e4dcf42fc54130eaafa1a08d16315b52d54' }), h("div", { key: 'd63ad621b6f43da35bec1a270ceacd40876b4d3e', class: "input-wrapper-info" }, h("road-label", { key: '14763d79d648cfbbb21136998287411ab3231cbc', class: "input-wrapper-info-title" }, this.titleItem), h("p", { key: '5048f0bab07eb191b4ba3d8655a7890a45926541', class: "input-wrapper-info-text" }, this.text))), h("slot", { key: 'ef5cef7e326421ea28f0420a81a1773b74adc8bf', name: "end" }), showDetail && h("road-icon", { key: 'ecb61fe5b2cd5e3ba3ba8b30427337cbde78fd78', icon: detailIcon, lazy: false, class: "item-detail-icon" })))));
66
+ }, part: "native", disabled: disabled }), h("slot", { key: '4287ffe1ac1fc6471bef8cc1c060637bd6889ef4', name: "start" }), h("div", { key: '70dff3ab1b88fc4e51e83280504c85cfdbef6e75', class: "item-inner" }, h("div", { key: '872a6387bceac2c8ef76d8ebd5ecc47cb6f93aa7', class: "input-wrapper" }, h("slot", { key: 'c0e117161a86fb92ed121ab1fdc71de76a9d1aae' }), h("div", { key: '23f4c082e69b0584cecadaf62c3cda21073068d6', class: "input-wrapper-info" }, h("road-label", { key: '7af0a0698d00c0681181038163b8f5c15ef82e9a', class: "input-wrapper-info-title" }, this.titleItem), h("p", { key: '87653ef8324a8e8b82270d697e657e242e9494be', class: "input-wrapper-info-text" }, this.text))), h("slot", { key: '4d58e9d7d5f808b3a7f6bc2dee4912015070a495', name: "end" }), showDetail && h("road-icon", { key: '6422e581f75db848cc4e788d7fd9f48709bd7588', icon: detailIcon, lazy: false, class: "item-detail-icon" })))));
67
67
  }
68
68
  static get is() { return "road-item"; }
69
69
  static get encapsulation() { return "shadow"; }
@@ -4,7 +4,7 @@ import { h } from "@stencil/core";
4
4
  */
5
5
  export class Label {
6
6
  render() {
7
- return (h("slot", { key: '3ba99679bcd840c743cbc724843909bd267d0ab2' }));
7
+ return (h("slot", { key: 'e6b8246e6673eeaa1d33517a58de2df43091c4dc' }));
8
8
  }
9
9
  static get is() { return "road-label"; }
10
10
  static get encapsulation() { return "shadow"; }
@@ -5,9 +5,9 @@ import { Host, h } from "@stencil/core";
5
5
  export class List {
6
6
  render() {
7
7
  const { lines } = this;
8
- return (h(Host, { key: 'ddd543051e3de681b5672d7ab87ebe742858da9c', class: {
8
+ return (h(Host, { key: 'a830b17499a394ad9bccaaed0aa2056ae538929b', class: {
9
9
  [`list-lines-${lines}`]: lines !== undefined,
10
- } }, h("slot", { key: '56e04b9869dc48d1011e422c57ec2578e61301c6' })));
10
+ } }, h("slot", { key: '1010f8f4a4376db24412ea8e5f407f3951ac8333' })));
11
11
  }
12
12
  static get is() { return "road-list"; }
13
13
  static get encapsulation() { return "shadow"; }
@@ -65,7 +65,7 @@ export class Modal {
65
65
  const modalIsOpenClass = this.isOpen ? 'modal-open' : '';
66
66
  const inverseHeaderClass = this.hasInverseHeader ? 'modal-header-inverse' : '';
67
67
  const closeIconElement = this.hasCloseIcon ? h("button", { type: "button", class: "modal-close", onClick: this.onClick, "aria-label": "Close" }, h("road-icon", { icon: navigationClose, "aria-hidden": "true" })) : '';
68
- return (h(Host, { key: 'b87d292936b3298bd9e0fef68931b1197d89990f', class: `modal ${modalIsOpenClass}`, tabindex: "-1", role: "dialog", "aria-label": "modal" }, h("div", { key: '9c9ce64aca4d7e856b1a36de791aebd6b7b7affb', class: "modal-overlay", onClick: this.onClick, tabindex: "-1" }), h("div", { key: '9afc412d8a8f819d265d2d9102c1c96c14314816', class: "modal-dialog", style: { maxWidth: `${this.maxWidth}px` }, role: "document", tabindex: "0" }, h("div", { key: '3ed271357372e1e6306280c7eaa7283ac2336ab3', class: "modal-content" }, h("header", { key: '806e9a7258847239b31b89576213470e04b2c03d', class: `modal-header ${inverseHeaderClass}` }, h("h2", { key: 'aca390c8fbb825c385d43e667f9563a1204eafcb', class: "modal-title" }, this.modalTitle), closeIconElement), h("div", { key: '000d132ec44dff846b4cc7d55039ded734f7db4c', class: "modal-body" }, h("slot", { key: '87025f81c5fd3498e38656d96772ba495b34f66e' }))))));
68
+ return (h(Host, { key: 'dea7d12a7d711034e4bfbb57bd5ab17d0d2d0c64', class: `modal ${modalIsOpenClass}`, tabindex: "-1", role: "dialog", "aria-label": "modal" }, h("div", { key: 'e3be54a36318d4a7942ac56477dccbc089b62d95', class: "modal-overlay", onClick: this.onClick, tabindex: "-1" }), h("div", { key: '34576fcfbe6ca5da7cb655969ac011d627c4a450', class: "modal-dialog", style: { maxWidth: `${this.maxWidth}px` }, role: "document", tabindex: "0" }, h("div", { key: '997ebcf1495edc6427595303fc87f77b31fa69c8', class: "modal-content" }, h("header", { key: '0724f16b5f0deeeada144df5e0f5df9e61f1e94f', class: `modal-header ${inverseHeaderClass}` }, h("h2", { key: '4ca7c0df3c5f39fcb4d0c18ef0d286d8131c75d2', class: "modal-title" }, this.modalTitle), closeIconElement), h("div", { key: '86a30cd070f946728373100e30e86914c9952699', class: "modal-body" }, h("slot", { key: '2a80c579ec2784e0baee03e0d65d55ff626e541a' }))))));
69
69
  }
70
70
  static get is() { return "road-modal"; }
71
71
  static get encapsulation() { return "shadow"; }
@@ -44,9 +44,10 @@ export default {
44
44
  control: 'text',
45
45
  },
46
46
  close: {
47
- description: "Indicate when closing the modal",
48
- control: {
49
- type: null,
47
+ description: 'Indicate when closing the modal',
48
+ table: {
49
+ category: 'Events',
50
+ type: { summary: 'CustomEvent' },
50
51
  },
51
52
  },
52
53
  '--z-index': {
@@ -21,7 +21,7 @@ export class Navbar {
21
21
  this.selectedTabChanged();
22
22
  }
23
23
  render() {
24
- return (h(Host, { key: '1413fa96200fad5a83abd97f951c46b6a6a25777', role: "menubar" }, h("slot", { key: 'c6f91f0af00788a5708cb95f44789938c7d6eeda' })));
24
+ return (h(Host, { key: '188151d4f107e38799301e254fef5cb36b77f427', role: "menubar" }, h("slot", { key: '7ed62f55bd9828c04a28f4090b6563dbc7cbd741' })));
25
25
  }
26
26
  static get is() { return "road-navbar"; }
27
27
  static get encapsulation() { return "shadow"; }
@@ -61,11 +61,11 @@ export class NavbarItem {
61
61
  rel,
62
62
  target,
63
63
  };
64
- return (h(Host, { key: '8d13f1295c10b09012ee6f0c3a683c44ea9575de', onClick: this.onClick, onKeyup: this.onKeyUp, role: "menuitem", tabindex: "0", "aria-selected": selected ? 'true' : null, id: tab !== undefined ? `navbar-item-${tab}` : null, disabled: disabled, class: {
64
+ return (h(Host, { key: 'acbf239caf20ec5fdad46f4af576243eab63c2f9', onClick: this.onClick, onKeyup: this.onKeyUp, role: "menuitem", tabindex: "0", "aria-selected": selected ? 'true' : null, id: tab !== undefined ? `navbar-item-${tab}` : null, disabled: disabled, class: {
65
65
  'navbar-item': true,
66
66
  'tab-selected': selected,
67
67
  'tab-disabled': disabled,
68
- } }, h("a", Object.assign({ key: '3053f87c13f67102e2b3e10c9f1e536a083fdf3e' }, attrs, { tabIndex: -1, class: "button-native", part: "native" }), h("span", { key: '74b5de95c1cbcaa1f5bef7dded2e8949134241b5', class: "button-inner" }, h("slot", { key: '84f6e5bf2ba906fdd7356dce268a7e7d8d399bff' })))));
68
+ } }, h("a", Object.assign({ key: 'ba6ba2a86abdc210604b52e77ab44362ddeda18d' }, attrs, { tabIndex: -1, class: "button-native", part: "native" }), h("span", { key: '189d158e062896460568593a287e52708eb13d4c', class: "button-inner" }, h("slot", { key: 'e690abfecff3881e688020a4f8c173c73674b050' })))));
69
69
  }
70
70
  static get is() { return "road-navbar-item"; }
71
71
  static get encapsulation() { return "shadow"; }
@@ -61,11 +61,11 @@ export class NavbarItem {
61
61
  rel,
62
62
  target,
63
63
  };
64
- return (h(Host, { key: '191e295ae457ff383a61caf39b2b14b361dfd208', onClick: this.onClick, onKeyup: this.onKeyUp, role: "menuitem", tabindex: "0", "aria-selected": selected ? 'true' : null, id: tab !== undefined ? `navbar-item-${tab}` : null, disabled: disabled, class: {
64
+ return (h(Host, { key: 'd3962edd95606e908423aef6bcac10e9900f5cac', onClick: this.onClick, onKeyup: this.onKeyUp, role: "menuitem", tabindex: "0", "aria-selected": selected ? 'true' : null, id: tab !== undefined ? `navbar-item-${tab}` : null, disabled: disabled, class: {
65
65
  'navbar-item': true,
66
66
  'tab-selected': selected,
67
67
  'tab-disabled': disabled,
68
- } }, h("a", Object.assign({ key: '445f29f9ba3534f1b4c02861ea4ac3768cc48b0c' }, attrs, { tabIndex: -1, class: "button-native", part: "native" }), h("span", { key: '3d7a3ac9b15cef609ab6402ed35b030830e03dd8', class: "button-inner" }, h("slot", { key: '059d10fdd31ed3a4e8caecaa62b9aacd4483883f' })))));
68
+ } }, h("a", Object.assign({ key: '2f2f9d568a06d666ddcded0a3bbf18b9145dc6ec' }, attrs, { tabIndex: -1, class: "button-native", part: "native" }), h("span", { key: '49e8a3698a19ed7b591531bda1baa3ddc0c0925f', class: "button-inner" }, h("slot", { key: '3b9a1513ead6236942ad77fb19b099f26332b31c' })))));
69
69
  }
70
70
  static get is() { return "road-navbar-item-v2"; }
71
71
  static get encapsulation() { return "shadow"; }
@@ -28,7 +28,7 @@ export class NavbarV2 {
28
28
  }
29
29
  render() {
30
30
  const compactClass = this.compact ? 'compact' : '';
31
- return (h(Host, { key: 'e4fe4a407edcf036a5f3da534cc88eb4b863ab71', role: "menubar", class: `${compactClass}` }, h("slot", { key: 'ef7df2d2775c533592267b1b420e522e23836d7e' })));
31
+ return (h(Host, { key: '666a88c32c86b9e81a4f7fa244385f43ae44d72f', role: "menubar", class: `${compactClass}` }, h("slot", { key: '2b65539c449d50ca60a93e96ff65b0ea28fca173' })));
32
32
  }
33
33
  static get is() { return "road-navbar-v2"; }
34
34
  static get encapsulation() { return "shadow"; }
@@ -151,9 +151,9 @@ export class RoadPhoneNumberInput {
151
151
  const isErrorClass = this.errorMessage.length ? 'is-error' : '';
152
152
  const hasValueClass = this.hasValue() ? 'has-value' : '';
153
153
  const sizes = 'xl';
154
- return (h(Host, { key: '7d65a01428b79587c98a5e399bab8403c0849a68' }, h("div", { key: 'b59d36be4bd2ecbe7469b37c194501d542895b29', class: 'phone-number-inputs-container' }, h("div", { key: '4cf3f4e60de5f861e09c8cbde5551fb95f209970', class: `road-phone-input-select ${isErrorClass} ${isInvalidClass}`, slot: "prepend" }, h("select", { key: '187f3724fcc9bf5c34c6490e61e5adee102ac052', id: selectId, class: `form-select-area has-value`, "aria-disabled": this.disabled ? 'true' : null, disabled: this.disabled, onChange: (event) => this.handleSelect(event), "aria-label": this.codeLabel, tabIndex: this.disabled ? -1 : 0 }, this.countryOptions && this.countryOptions.map(option => (h("option", { value: option.value, disabled: option.disabled, selected: option.selected }, option.label)))), h("label", { key: '8e867ef3d625b2e69246591cb8f84e7794ba1a7c', class: "form-select-area-label", id: labelId, htmlFor: selectId }, this.codeLabel), h("label", { key: '71ae31a4e0da49b93d28e433a41fbb40b74b603d', class: "form-select-area-value", id: valueId, htmlFor: selectId }, "+", this.selectedCountryCode)), h("input", { key: '289ac4032540c87f77784439864983ed5d544439', type: 'tel', id: inputId, class: `input-${sizes} phone-number-input-field ${hasValueClass} ${isErrorClass}`, value: this.phoneValue, required: this.required, tabIndex: 0, onInput: (event) => this.handleInput(event) }), h("label", { key: '60e9f10714d8807449534d1bce2f74f65a1646dc', class: "phone-number-input-label", id: labelId, htmlFor: inputId }, this.phoneLabel)), this.errorMessage
154
+ return (h(Host, { key: 'cecbc63d32eea08a7a110f9990df28aceb53c2a8' }, h("div", { key: 'b2cbe43100fe14b762af1910139e3d746e983c7c', class: 'phone-number-inputs-container' }, h("div", { key: '067b2ebb88dc0f3d98318d522dbf05c56adad91c', class: `road-phone-input-select ${isErrorClass} ${isInvalidClass}`, slot: "prepend" }, h("select", { key: 'd654ca41d2f8a859c2a8ba40bc65f7ff57fa2b70', id: selectId, class: `form-select-area has-value`, "aria-disabled": this.disabled ? 'true' : null, disabled: this.disabled, onChange: (event) => this.handleSelect(event), "aria-label": this.codeLabel, tabIndex: this.disabled ? -1 : 0 }, this.countryOptions && this.countryOptions.map(option => (h("option", { value: option.value, disabled: option.disabled, selected: option.selected }, option.label)))), h("label", { key: 'fac2d9990c24757cc975f750a3eec44f173dfeca', class: "form-select-area-label", id: labelId, htmlFor: selectId }, this.codeLabel), h("label", { key: 'b7449465cdf82627c8737b09c73bbf8c46104e41', class: "form-select-area-value", id: valueId, htmlFor: selectId }, "+", this.selectedCountryCode)), h("input", { key: 'ea5d0a4808ab0117c3f9b163e5c9e2f2751a3908', type: 'tel', id: inputId, class: `input-${sizes} phone-number-input-field ${hasValueClass} ${isErrorClass}`, value: this.phoneValue, required: this.required, tabIndex: 0, onInput: (event) => this.handleInput(event) }), h("label", { key: '5c0628f00c771e0b36a2d0d662634ed9a0924a62', class: "phone-number-input-label", id: labelId, htmlFor: inputId }, this.phoneLabel)), this.errorMessage
155
155
  && this.errorMessage !== ''
156
- && h("p", { key: 'b140351db845f88befd99aab39daa115c770732e', class: "invalid-feedback" }, h("road-icon", { key: 'ed89fc9c99493f67973448bbea8d7f0c20e0c455', slot: "start", color: 'danger', name: "alert-error-solid", "aria-hidden": "true", size: "sm" }), this.errorMessage)));
156
+ && h("p", { key: '70d8e2b0acc90afbd08607fbdd420e6c2b0ed25d', class: "invalid-feedback" }, h("road-icon", { key: '490e8baafe7b9ef670f11227043e6552287131ec', slot: "start", color: 'danger', name: "alert-error-solid", "aria-hidden": "true", size: "sm" }), this.errorMessage)));
157
157
  }
158
158
  static get is() { return "road-phone-number-input"; }
159
159
  static get encapsulation() { return "scoped"; }
@@ -92,10 +92,10 @@ export class PlateNumber {
92
92
  render() {
93
93
  const value = this.getValue();
94
94
  const motorbikeClass = this.motorbike ? 'motorbike-plate' : '';
95
- return (h("road-input-group", { key: 'd99ec720113a121c58794385a2a697459cc4e0eb', class: `plate-number plate-number-${this.country.toLowerCase()} ${motorbikeClass}` }, h("label", { key: '559c8428a6403ee087bc219b6027b12a48c658d8', slot: "prepend", class: "input-group-prepend" }, h("div", { key: '8483940a622fb54e8bc29dfeaf3ade7aaeeb0e8c', class: "plate-number-start" }, h("road-icon", { key: 'ba60f444919f5b6221fe4d910ced4bec521e4101', class: "plate-number-icon", icon: licensePlateStarEu }), h("div", { key: '095d70b607191a292c5857559566954122c5081c', class: "plate-number-location", "aria-label": this.country, role: "img" }, this.countries
95
+ return (h("road-input-group", { key: '28c30b625e2af365c0249677e44c7d0429763631', class: `plate-number plate-number-${this.country.toLowerCase()} ${motorbikeClass}` }, h("label", { key: '70107849b6839becadfb8b5ef92a6111295bdb08', slot: "prepend", class: "input-group-prepend" }, h("div", { key: '31ee9cd44c6fa9e0df1b610f342e4c7409ec10a0', class: "plate-number-start" }, h("road-icon", { key: '0b9a9f14ebbae17cba9cd3dd2541ec0ea80c9108', class: "plate-number-icon", icon: licensePlateStarEu }), h("div", { key: '6ee7f8b160a21b6c9ae549f1979598f5bc3d5eb1', class: "plate-number-location", "aria-label": this.country, role: "img" }, this.countries
96
96
  .filter(item => item.country === this.country)[0].letter))), this.motorbike
97
97
  ? (h("textarea", { class: "form-control plate-number-input mb-0", disabled: this.disabled, placeholder: this.placeholder != null ? this.placeholder : this.countries.filter(item => item.country === this.country)[0].placeholder, readOnly: this.readonly, maxlength: "9", rows: 2, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus }))
98
- : (h("input", { class: "plate-number-input mb-0", disabled: this.disabled, placeholder: this.placeholder != null ? this.placeholder : this.countries.filter(item => item.country === this.country)[0].placeholder, readOnly: this.readonly, value: value, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus })), h("label", { key: '28ce8da1e17d33750056cbbb7b62686f492b4f6d', slot: "append", class: "input-group-append" }, h("div", { key: 'a7fd028f9e8457e1b865abbe79539223d64c7087', class: "plate-number-end" }))));
98
+ : (h("input", { class: "plate-number-input mb-0", disabled: this.disabled, placeholder: this.placeholder != null ? this.placeholder : this.countries.filter(item => item.country === this.country)[0].placeholder, readOnly: this.readonly, value: value, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus })), h("label", { key: '30b0898365b95e47c58b1ce349a224574f9b6939', slot: "append", class: "input-group-append" }, h("div", { key: '022809f30f9dea2d7e2e5d18067f3c8cb5c7a72d', class: "plate-number-end" }))));
99
99
  }
100
100
  static get is() { return "road-plate-number"; }
101
101
  static get encapsulation() { return "scoped"; }