@luzmo/lucero 0.0.3 → 0.0.6

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 (323) hide show
  1. package/components/accordion/accordion-item.d.ts +24 -0
  2. package/components/accordion/accordion.d.ts +42 -0
  3. package/components/accordion/index.cjs +43 -0
  4. package/components/accordion/index.d.ts +10 -0
  5. package/components/accordion/index.js +181 -0
  6. package/components/action-bar/action-bar.d.ts +42 -0
  7. package/components/action-bar/index.cjs +39 -0
  8. package/components/action-bar/index.d.ts +7 -0
  9. package/components/action-bar/index.js +107 -0
  10. package/components/action-button/action-button.d.ts +81 -0
  11. package/components/action-button/index.cjs +24 -0
  12. package/components/action-button/index.d.ts +7 -0
  13. package/components/action-button/index.js +161 -0
  14. package/components/action-group/action-group.d.ts +50 -0
  15. package/components/action-group/index.cjs +18 -0
  16. package/components/action-group/index.d.ts +7 -0
  17. package/components/action-group/index.js +29 -0
  18. package/components/action-group-B7oQXv30.js +258 -0
  19. package/components/action-group-C8YUQzt8.cjs +20 -0
  20. package/components/action-menu/action-menu.d.ts +40 -0
  21. package/components/action-menu/index.cjs +56 -0
  22. package/components/action-menu/index.d.ts +7 -0
  23. package/components/action-menu/index.js +126 -0
  24. package/components/async-directive-BhRGSTWB.js +82 -0
  25. package/components/async-directive-_65ULPLK.cjs +22 -0
  26. package/components/avatar/avatar.d.ts +31 -0
  27. package/components/avatar/index.cjs +24 -0
  28. package/components/avatar/index.d.ts +7 -0
  29. package/components/avatar/index.js +81 -0
  30. package/components/base-BjTwmyRF.cjs +22 -0
  31. package/components/base-CxUap9HL.js +665 -0
  32. package/components/base-D76d76ww.js +26 -0
  33. package/components/base-rtxi7uaR.cjs +40 -0
  34. package/components/button/button-base.d.ts +44 -0
  35. package/components/button/button.d.ts +59 -0
  36. package/components/button/clear-button.d.ts +22 -0
  37. package/components/button/close-button.d.ts +24 -0
  38. package/components/button/index.cjs +20 -0
  39. package/components/button/index.d.ts +13 -0
  40. package/components/button/index.js +127 -0
  41. package/components/button-base-CgrTYVgq.js +142 -0
  42. package/components/button-base-DjqSZyn2.cjs +25 -0
  43. package/components/button-group/button-group.d.ts +19 -0
  44. package/components/button-group/index.cjs +18 -0
  45. package/components/button-group/index.d.ts +7 -0
  46. package/components/button-group/index.js +59 -0
  47. package/components/checkbox/checkbox-base.d.ts +9 -0
  48. package/components/checkbox/checkbox-mixin.d.ts +14 -0
  49. package/components/checkbox/checkbox.d.ts +54 -0
  50. package/components/checkbox/index.cjs +25 -0
  51. package/components/checkbox/index.d.ts +7 -0
  52. package/components/checkbox/index.js +96 -0
  53. package/components/checkbox-mixin-BRluTF9s.js +70 -0
  54. package/components/checkbox-mixin-iB-0ivgo.cjs +27 -0
  55. package/components/clear-button-CyLF5dx_.js +53 -0
  56. package/components/clear-button-DFXE6MLx.cjs +18 -0
  57. package/components/close-button-CcD-aVqh.cjs +18 -0
  58. package/components/close-button-CzpdWCWI.js +51 -0
  59. package/components/color-Bg3tYsAQ.js +178 -0
  60. package/components/color-DphK4hwx.cjs +18 -0
  61. package/components/color-area/color-area.d.ts +67 -0
  62. package/components/color-area/index.cjs +80 -0
  63. package/components/color-area/index.d.ts +7 -0
  64. package/components/color-area/index.js +372 -0
  65. package/components/color-field/color-field.d.ts +20 -0
  66. package/components/color-field/index.cjs +23 -0
  67. package/components/color-field/index.d.ts +7 -0
  68. package/components/color-field/index.js +80 -0
  69. package/components/color-handle/color-handle.d.ts +13 -0
  70. package/components/color-handle/index.cjs +24 -0
  71. package/components/color-handle/index.d.ts +7 -0
  72. package/components/color-handle/index.js +73 -0
  73. package/components/color-loupe/color-loupe.d.ts +7 -0
  74. package/components/color-loupe/index.cjs +18 -0
  75. package/components/color-loupe/index.d.ts +7 -0
  76. package/components/color-loupe/index.js +29 -0
  77. package/components/color-loupe-BN3k1ACF.cjs +56 -0
  78. package/components/color-loupe-CD-dhmB1.js +81 -0
  79. package/components/color-menu/color-menu.d.ts +54 -0
  80. package/components/color-menu/index.cjs +86 -0
  81. package/components/color-menu/index.d.ts +7 -0
  82. package/components/color-menu/index.js +203 -0
  83. package/components/color-picker/color-picker.d.ts +39 -0
  84. package/components/color-picker/index.cjs +48 -0
  85. package/components/color-picker/index.d.ts +7 -0
  86. package/components/color-picker/index.js +141 -0
  87. package/components/color-slider/color-slider.d.ts +57 -0
  88. package/components/color-slider/index.cjs +57 -0
  89. package/components/color-slider/index.d.ts +7 -0
  90. package/components/color-slider/index.js +317 -0
  91. package/components/condition-attribute-with-id-DrQYZzFS.cjs +18 -0
  92. package/components/condition-attribute-with-id-Dv4lSRbe.js +31 -0
  93. package/components/dependency-manger-C5HCkMMB.cjs +18 -0
  94. package/components/dependency-manger-CEXvGQUV.js +54 -0
  95. package/components/directive-C7oCP5Bh.cjs +22 -0
  96. package/components/directive-helpers-C3pAxRR3.cjs +22 -0
  97. package/components/directive-helpers-D0vm0gvF.js +28 -0
  98. package/components/directive-oAbCiebi.js +44 -0
  99. package/components/divider/divider.d.ts +24 -0
  100. package/components/divider/index.cjs +18 -0
  101. package/components/divider/index.d.ts +7 -0
  102. package/components/divider/index.js +61 -0
  103. package/components/divider.module-CXMNveQc.cjs +18 -0
  104. package/components/divider.module-DwOuLGU3.js +21 -0
  105. package/components/element-resolution-BvRLGqIU.cjs +18 -0
  106. package/components/element-resolution-FCUT-wql.js +91 -0
  107. package/components/field-group/field-group.d.ts +24 -0
  108. package/components/field-group/index.cjs +18 -0
  109. package/components/field-group/index.d.ts +7 -0
  110. package/components/field-group/index.js +29 -0
  111. package/components/field-group-DAImvhSF.js +66 -0
  112. package/components/field-group-d5Hkb8UW.cjs +23 -0
  113. package/components/field-label/field-label.d.ts +50 -0
  114. package/components/field-label/index.cjs +18 -0
  115. package/components/field-label/index.d.ts +7 -0
  116. package/components/field-label/index.js +29 -0
  117. package/components/field-label-D1zKXSG6.cjs +25 -0
  118. package/components/field-label-DY9iRmRI.js +106 -0
  119. package/components/focus-group-DHeTq18L.js +218 -0
  120. package/components/focus-group-DnxZUBhQ.cjs +18 -0
  121. package/components/focus-visible-B0P9aY_G.cjs +18 -0
  122. package/components/focus-visible-DBlJGoEW.js +74 -0
  123. package/components/focusable-Bze9xE25.js +153 -0
  124. package/components/focusable-DyyBr-J-.cjs +18 -0
  125. package/components/focusable-selectors-B4YgbghQ.js +31 -0
  126. package/components/focusable-selectors-BgFlyFcY.cjs +18 -0
  127. package/components/icon/icon-base.d.ts +11 -0
  128. package/components/icon/icon.d.ts +12 -0
  129. package/components/icon/index.cjs +18 -0
  130. package/components/icon/index.d.ts +7 -0
  131. package/components/icon/index.js +88 -0
  132. package/components/if-defined-C-8FyBSN.cjs +22 -0
  133. package/components/if-defined-XzWkhMhg.js +27 -0
  134. package/components/index-C1chwzNp.js +727 -0
  135. package/components/index-CNtoBntg.cjs +77 -0
  136. package/components/index-Ci6Jnhu4.js +927 -0
  137. package/components/index-DCKCHDTt.cjs +18 -0
  138. package/components/index.cjs +27 -0
  139. package/components/index.js +207 -0
  140. package/components/infield-button/index.cjs +22 -0
  141. package/components/infield-button/index.d.ts +7 -0
  142. package/components/infield-button/index.js +64 -0
  143. package/components/infield-button/infield-button.d.ts +25 -0
  144. package/components/label/index.cjs +18 -0
  145. package/components/label/index.d.ts +7 -0
  146. package/components/label/index.js +51 -0
  147. package/components/label/label.d.ts +7 -0
  148. package/components/legend-position/index.d.ts +7 -0
  149. package/components/legend-position/legend-position.d.ts +10 -0
  150. package/components/like-anchor-DKuw8fJA.cjs +32 -0
  151. package/components/like-anchor-DnsAwo_O.js +69 -0
  152. package/components/manage-help-text-B-FXFXgT.js +92 -0
  153. package/components/manage-help-text-I5aYDAKT.cjs +30 -0
  154. package/components/menu/index.cjs +18 -0
  155. package/components/menu/index.d.ts +16 -0
  156. package/components/menu/index.js +32 -0
  157. package/components/menu/menu-divider.d.ts +14 -0
  158. package/components/menu/menu-group.d.ts +17 -0
  159. package/components/menu/menu-item.d.ts +125 -0
  160. package/components/menu/menu.d.ts +119 -0
  161. package/components/multi-language-field/index.cjs +39 -0
  162. package/components/multi-language-field/index.d.ts +7 -0
  163. package/components/multi-language-field/index.js +148 -0
  164. package/components/multi-language-field/multi-language-field.d.ts +41 -0
  165. package/components/mutation-controller-DH7YOCyj.js +52 -0
  166. package/components/mutation-controller-DkOMCW-c.cjs +22 -0
  167. package/components/number-field/index.cjs +57 -0
  168. package/components/number-field/index.d.ts +7 -0
  169. package/components/number-field/index.js +735 -0
  170. package/components/number-field/number-field.d.ts +113 -0
  171. package/components/observe-slot-text-DeSKIzvP.cjs +18 -0
  172. package/components/observe-slot-text-DrM71me1.js +87 -0
  173. package/components/overlay/abstract-overlay.d.ts +72 -0
  174. package/components/overlay/click-controller.d.ts +14 -0
  175. package/components/overlay/events.d.ts +23 -0
  176. package/components/overlay/full-size-plugin.d.ts +12 -0
  177. package/components/overlay/hover-controller.d.ts +20 -0
  178. package/components/overlay/index.cjs +73 -0
  179. package/components/overlay/index.d.ts +22 -0
  180. package/components/overlay/index.js +342 -0
  181. package/components/overlay/interaction-controller.d.ts +38 -0
  182. package/components/overlay/loader.d.ts +4 -0
  183. package/components/overlay/longpress-controller.d.ts +21 -0
  184. package/components/overlay/overlay-dialog.d.ts +4 -0
  185. package/components/overlay/overlay-events.d.ts +11 -0
  186. package/components/overlay/overlay-no-popover.d.ts +4 -0
  187. package/components/overlay/overlay-popover.d.ts +4 -0
  188. package/components/overlay/overlay-stack.d.ts +44 -0
  189. package/components/overlay/overlay-timer.d.ts +21 -0
  190. package/components/overlay/overlay-trigger-directive.d.ts +26 -0
  191. package/components/overlay/overlay-trigger.d.ts +53 -0
  192. package/components/overlay/overlay-types.d.ts +50 -0
  193. package/components/overlay/overlay.d.ts +464 -0
  194. package/components/overlay/placement-controller.d.ts +157 -0
  195. package/components/overlay/slottable-request-directive.d.ts +17 -0
  196. package/components/overlay/slottable-request-event.d.ts +12 -0
  197. package/components/overlay/strategies.d.ts +8 -0
  198. package/components/overlay/virtual-trigger.d.ts +7 -0
  199. package/components/overlay-C2Cck0Az.js +2712 -0
  200. package/components/overlay-dn6Xe_vz.cjs +47 -0
  201. package/components/pending-state--XOfTjzE.js +61 -0
  202. package/components/pending-state-BeJ7iP-O.cjs +26 -0
  203. package/components/picker/desktop-controller.d.ts +7 -0
  204. package/components/picker/index.cjs +18 -0
  205. package/components/picker/index.d.ts +7 -0
  206. package/components/picker/index.js +32 -0
  207. package/components/picker/interaction-controller.d.ts +43 -0
  208. package/components/picker/mobile-controller.d.ts +9 -0
  209. package/components/picker/picker.d.ts +154 -0
  210. package/components/picker/strategies.d.ts +6 -0
  211. package/components/picker-8cOc-jjh.cjs +127 -0
  212. package/components/picker-BZAWrSDk.js +655 -0
  213. package/components/platform-CQzYNWKq.cjs +18 -0
  214. package/components/platform-DQYMG7JI.js +54 -0
  215. package/components/popover/index.cjs +18 -0
  216. package/components/popover/index.d.ts +7 -0
  217. package/components/popover/index.js +29 -0
  218. package/components/popover/popover.d.ts +29 -0
  219. package/components/popover-CCzs4VH8.cjs +30 -0
  220. package/components/popover-D0EliN0L.js +67 -0
  221. package/components/progress-circle/index.cjs +18 -0
  222. package/components/progress-circle/index.d.ts +7 -0
  223. package/components/progress-circle/index.js +29 -0
  224. package/components/progress-circle/progress-circle.d.ts +35 -0
  225. package/components/progress-circle-DYSSkjlY.cjs +33 -0
  226. package/components/progress-circle-_-9sAlMM.js +97 -0
  227. package/components/query-BL-TJj7K.cjs +22 -0
  228. package/components/query-D_KR_GUc.js +51 -0
  229. package/components/query-assigned-elements-DjfhL1cl.js +36 -0
  230. package/components/query-assigned-elements-DsKsfk7G.cjs +22 -0
  231. package/components/query-assigned-nodes-BcKWmGzy.cjs +22 -0
  232. package/components/query-assigned-nodes-C76XVPWY.js +36 -0
  233. package/components/radio/index.cjs +22 -0
  234. package/components/radio/index.d.ts +10 -0
  235. package/components/radio/index.js +191 -0
  236. package/components/radio/radio-group.d.ts +27 -0
  237. package/components/radio/radio.d.ts +39 -0
  238. package/components/random-id-ByCz1xaq.js +26 -0
  239. package/components/random-id-CqvckpWe.cjs +18 -0
  240. package/components/roving-tabindex-By_fCy_e.cjs +18 -0
  241. package/components/roving-tabindex-DOg4z6ZU.js +66 -0
  242. package/components/search/index.cjs +45 -0
  243. package/components/search/index.d.ts +7 -0
  244. package/components/search/index.js +131 -0
  245. package/components/search/search.d.ts +27 -0
  246. package/components/sized-mixin-BAI6NiE2.cjs +18 -0
  247. package/components/sized-mixin-DcJTTohI.js +63 -0
  248. package/components/slider/index.cjs +18 -0
  249. package/components/slider/index.d.ts +7 -0
  250. package/components/slider/index.js +1158 -0
  251. package/components/slider/slider.d.ts +24 -0
  252. package/components/slottable-request-event-BfUUt1Mh.cjs +18 -0
  253. package/components/slottable-request-event-DggLA4Rx.js +31 -0
  254. package/components/state-D8vot9IB.js +29 -0
  255. package/components/state-WWHLNMRG.cjs +22 -0
  256. package/components/streaming-listener-BbmNyKWO.js +125 -0
  257. package/components/streaming-listener-C2A7ZJZP.cjs +18 -0
  258. package/components/style-map-CoBJRbvu.js +53 -0
  259. package/components/style-map-DH0jkl7s.cjs +22 -0
  260. package/components/swatch/index.cjs +49 -0
  261. package/components/swatch/index.d.ts +10 -0
  262. package/components/swatch/index.js +342 -0
  263. package/components/swatch/swatch-group.d.ts +41 -0
  264. package/components/swatch/swatch.d.ts +40 -0
  265. package/components/switch/index.cjs +22 -0
  266. package/components/switch/index.d.ts +7 -0
  267. package/components/switch/index.js +73 -0
  268. package/components/switch/switch.d.ts +27 -0
  269. package/components/tags/index.cjs +32 -0
  270. package/components/tags/index.d.ts +10 -0
  271. package/components/tags/index.js +173 -0
  272. package/components/tags/tag.d.ts +29 -0
  273. package/components/tags/tags.d.ts +28 -0
  274. package/components/text-field/help-text-manager.d.ts +19 -0
  275. package/components/text-field/help-text.d.ts +20 -0
  276. package/components/text-field/index.cjs +21 -0
  277. package/components/text-field/index.d.ts +14 -0
  278. package/components/text-field/index.js +62 -0
  279. package/components/text-field/manage-help-text.d.ts +13 -0
  280. package/components/text-field/text-field.d.ts +142 -0
  281. package/components/text-field-05QNK_Lj.js +313 -0
  282. package/components/text-field-BU7yxiOR.cjs +85 -0
  283. package/components/toast/index.cjs +51 -0
  284. package/components/toast/index.d.ts +7 -0
  285. package/components/toast/index.js +153 -0
  286. package/components/toast/toast.d.ts +77 -0
  287. package/components/tooltip/index.cjs +45 -0
  288. package/components/tooltip/index.d.ts +8 -0
  289. package/components/tooltip/index.js +220 -0
  290. package/components/tooltip/tooltip-directive.d.ts +5 -0
  291. package/components/tooltip/tooltip.d.ts +55 -0
  292. package/components/unit-input/index.cjs +43 -0
  293. package/components/unit-input/index.d.ts +7 -0
  294. package/components/unit-input/index.js +183 -0
  295. package/components/unit-input/unit-input.d.ts +33 -0
  296. package/components/when-CDK1Tt5Y.js +28 -0
  297. package/components/when-CDZyJPvd.cjs +22 -0
  298. package/index.d.ts +39 -0
  299. package/package.json +139 -101
  300. package/utils/base.d.ts +16 -0
  301. package/utils/condition-attribute-with-id.d.ts +2 -0
  302. package/utils/first-focusable-in.d.ts +3 -0
  303. package/utils/focus-visible.d.ts +29 -0
  304. package/utils/focusable-selectors.d.ts +2 -0
  305. package/utils/focusable.d.ts +58 -0
  306. package/utils/get-css-variable.d.ts +1 -0
  307. package/utils/get-label-from-slot.d.ts +1 -0
  308. package/utils/like-anchor.d.ts +23 -0
  309. package/utils/observe-slot-presence.d.ts +12 -0
  310. package/utils/observe-slot-text.d.ts +11 -0
  311. package/utils/platform.d.ts +10 -0
  312. package/utils/random-id.d.ts +1 -0
  313. package/utils/reactive-controllers/color.d.ts +54 -0
  314. package/utils/reactive-controllers/dependency-manger.d.ts +26 -0
  315. package/utils/reactive-controllers/element-resolution.d.ts +23 -0
  316. package/utils/reactive-controllers/focus-group.d.ts +62 -0
  317. package/utils/reactive-controllers/language-resolution.d.ts +11 -0
  318. package/utils/reactive-controllers/match-media.d.ts +13 -0
  319. package/utils/reactive-controllers/pending-state.d.ts +41 -0
  320. package/utils/reactive-controllers/roving-tabindex.d.ts +19 -0
  321. package/utils/reparent-child.d.ts +4 -0
  322. package/utils/sized-mixin.d.ts +17 -0
  323. package/utils/streaming-listener.d.ts +48 -0
@@ -0,0 +1,51 @@
1
+ /*! * Lucero - The design system for Luzmo.
2
+ *
3
+ * Copyright © 2025 Luzmo
4
+ * All rights reserved.
5
+ * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
+ * This license allows users with a current active Luzmo account to use Lucero.
7
+ * This license terminates automatically if a user no longer has an active Luzmo account.
8
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
+ *
10
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
+ * SOFTWARE.
17
+ * */
18
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../base-rtxi7uaR.cjs");require("../close-button-CcD-aVqh.cjs");const d=require("../focus-visible-B0P9aY_G.cjs"),u=require("@luzmo/icons"),v="@media (forced-colors: active){:host{--highcontrast-toast-border-color: ButtonText;border:var(--luzmo-toast-border-width, var(--toast-border-width)) solid var(--highcontrast-toast-border-color, transparent)}}:host{box-sizing:border-box;min-block-size:var(--luzmo-toast-block-size, var(--toast-block-size));max-inline-size:var(--luzmo-toast-max-inline-size, var(--toast-max-inline-size));border-radius:var(--luzmo-toast-corner-radius, var(--toast-corner-radius));font-size:var(--luzmo-toast-font-size, var(--toast-font-size));font-weight:var(--luzmo-toast-font-weight, var(--toast-font-weight));-webkit-font-smoothing:antialiased;background-color:var(--highcontrast-toast-background-color-default, var(--luzmo-toast-background-color-default, var(--toast-background-color-default)));color:var(--highcontrast-toast-background-color-default, var(--luzmo-toast-background-color-default, var(--toast-background-color-default)));overflow-wrap:anywhere;flex-direction:row;align-items:stretch;padding-inline-start:var(--luzmo-toast-spacing-start-edge-to-text-and-icon, var(--toast-spacing-start-edge-to-text-and-icon));display:inline-flex}:host([variant=negative]){background-color:var(--highcontrast-toast-negative-background-color-default, var(--luzmo-toast-negative-background-color-default, var(--toast-negative-background-color-default)))}:host([variant=negative]),:host([variant=negative]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-negative-background-color-default, var(--luzmo-toast-negative-background-color-default, var(--toast-negative-background-color-default)))}:host([variant=info]){background-color:var(--highcontrast-toast-informative-background-color-default, var(--luzmo-toast-informative-background-color-default, var(--toast-informative-background-color-default)))}:host([variant=info]),:host([variant=info]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-informative-background-color-default, var(--luzmo-toast-informative-background-color-default, var(--toast-informative-background-color-default)))}:host([variant=positive]){background-color:var(--highcontrast-toast-positive-background-color-default, var(--luzmo-toast-positive-background-color-default, var(--toast-positive-background-color-default)))}:host([variant=positive]),:host([variant=positive]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-positive-background-color-default, var(--luzmo-toast-positive-background-color-default, var(--toast-positive-background-color-default)))}.type{flex-grow:0;flex-shrink:0;margin-block-start:var(--luzmo-toast-spacing-top-edge-to-icon, var(--toast-spacing-top-edge-to-icon));margin-inline-start:0;margin-inline-end:var(--luzmo-toast-spacing-icon-to-text, var(--toast-spacing-icon-to-text))}.content,.type{color:var(--highcontrast-toast-text-and-icon-color, var(--luzmo-toast-text-and-icon-color, var(--toast-text-and-icon-color)))}.content{box-sizing:border-box;line-height:var(--luzmo-toast-line-height, var(--toast-line-height));text-align:start;flex:auto;padding-block-start:calc(var(--luzmo-toast-spacing-top-edge-to-text, var(--toast-spacing-top-edge-to-text)) - var(--luzmo-toast-spacing-block-start, var(--toast-spacing-block-start)));padding-block-end:calc(var(--luzmo-toast-spacing-bottom-edge-to-text, var(--toast-spacing-bottom-edge-to-text)) - var(--luzmo-toast-spacing-block-end, var(--toast-spacing-block-end)));padding-inline-start:0;padding-inline-end:var(--luzmo-toast-spacing-text-to-action-button-horizontal, var(--toast-spacing-text-to-action-button-horizontal));display:inline-block}.content:lang(ja),.content:lang(ko),.content:lang(zh){line-height:var(--luzmo-toast-line-height-cjk, var(--toast-line-height-cjk))}.buttons{border-inline-start-color:var(--luzmo-toast-divider-color, var(--toast-divider-color));flex:none;align-items:flex-start;margin-block-start:var(--luzmo-toast-spacing-top-edge-to-divider, var(--toast-spacing-top-edge-to-divider));margin-block-end:var(--luzmo-toast-spacing-bottom-edge-to-divider, var(--toast-spacing-bottom-edge-to-divider));padding-inline-end:var(--luzmo-toast-spacing-close-button, var(--toast-spacing-close-button));display:flex}.buttons .luzmo-CloseButton{align-self:flex-start}.body{flex-wrap:wrap;flex:auto;align-self:center;align-items:center;padding-block-start:var(--luzmo-toast-spacing-block-start, var(--toast-spacing-block-start));padding-block-end:var(--luzmo-toast-spacing-block-end, var(--toast-spacing-block-end));display:flex}.body ::slotted([slot=action]){margin-inline-start:auto;margin-inline-end:var(--luzmo-toast-spacing-text-and-action-button-to-divider, var(--toast-spacing-text-and-action-button-to-divider))}.body ::slotted([slot=action]:dir(rtl)),:host([dir=rtl]) .body ::slotted([slot=action]){margin-inline-end:var(--luzmo-toast-spacing-text-and-action-button-to-divider, var(--toast-spacing-text-and-action-button-to-divider))}.body+.buttons{border-inline-start-style:solid;border-inline-start-width:1px;padding-inline-start:var(--luzmo-toast-spacing-close-button, var(--toast-spacing-close-button))}:host{--toast-background-color-default: rgb(80, 80, 80);--toast-font-weight: var(--luzmo-font-weight);--toast-font-size: var(--luzmo-font-size);--toast-corner-radius: var(--luzmo-border-radius);--toast-block-size: var(--luzmo-component-height);--toast-max-inline-size: 360px;--toast-border-width: var(--luzmo-border-width);--toast-line-height: var(--luzmo-line-height);--toast-line-height-cjk: 1.5;--toast-spacing-icon-to-text: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--toast-spacing-start-edge-to-text-and-icon: var(--luzmo-spacing-5);--toast-spacing-text-and-action-button-to-divider: var(--luzmo-spacing-5);--toast-spacing-top-edge-to-divider: var(--luzmo-spacing-3);--toast-spacing-bottom-edge-to-divider: var(--luzmo-spacing-3);--toast-spacing-top-edge-to-icon: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--toast-spacing-text-to-action-button-horizontal: var(--luzmo-spacing-5);--toast-spacing-close-button: var(--luzmo-spacing-3);--toast-spacing-block-start: var(--luzmo-spacing-3);--toast-spacing-block-end: var(--luzmo-spacing-3);--toast-spacing-top-edge-to-text: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--toast-spacing-bottom-edge-to-text: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--toast-negative-background-color-default: var(--luzmo-color-negative);--toast-positive-background-color-default: var(--luzmo-color-positive);--toast-informative-background-color-default: var(--luzmo-color-informative);--toast-text-and-icon-color: rgb(255, 255, 255);--toast-divider-color: rgba(255, 255, 255, .2)}:host{--overlay-animation-distance: var(--spacing-100);--overlay-animation-duration: var(--animation-duration-100);opacity:0;pointer-events:none;transition:transform var(--overlay-animation-duration) ease-in-out,opacity var(--overlay-animation-duration) ease-in-out,visibility 0s linear var(--overlay-animation-duration);visibility:hidden}:host([open]){opacity:1;pointer-events:auto;transition-delay:0s;visibility:visible}:host([variant=error]),:host([variant=warning]){background-color:var(--highcontrast-toast-negative-background-color-default, var(--luzmo-toast-negative-background-color-default, var(--toast-negative-background-color-default)))}:host([variant=negative]),:host([variant=negative]) .closeButton:focus-visible:not(:active),:host([variant=warning]),:host([variant=warning]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-negative-background-color-default, var(--luzmo-toast-negative-background-color-default, var(--toast-negative-background-color-default)))}";var g=Object.defineProperty,h=Object.getOwnPropertyDescriptor,s=(r,t,a,n)=>{for(var i=n>1?void 0:n?h(t,a):t,l=r.length-1,c;l>=0;l--)(c=r[l])&&(i=(n?c(t,a,i):c(i))||i);return n&&i&&g(t,a,i),i};const m=["negative","positive","info"];class e extends d.FocusVisiblePolyfillMixin(o.LuzmoElement){constructor(){super(...arguments),this.open=!1,this._timeout=null,this._variant="",this.countdownStart=0,this.nextCount=-1,this.doCountdown=t=>{this.countdownStart||(this.countdownStart=performance.now()),t-this.countdownStart>this._timeout?(this.shouldClose(),this.countdownStart=0):this.countdown()},this.countdown=()=>{cancelAnimationFrame(this.nextCount),this.nextCount=requestAnimationFrame(this.doCountdown)},this.holdCountdown=()=>{this.stopCountdown(),this.addEventListener("focusout",this.resumeCountdown)},this.resumeCountdown=()=>{this.removeEventListener("focusout",this.holdCountdown),this.countdown()}}static get styles(){return[o.r(v)]}set timeout(t){const n=typeof t!==null&&t>0?Math.max(6e3,t):null,i=this.timeout;n&&this.countdownStart&&(this.countdownStart=performance.now()),this._timeout=n,this.requestUpdate("timeout",i)}get timeout(){return this._timeout}set variant(t){if(t===this.variant)return;const a=this.variant;m.includes(t)?(this.setAttribute("variant",t),this._variant=t):(this.removeAttribute("variant"),this._variant=""),this.requestUpdate("variant",a)}get variant(){return this._variant}renderIcon(t,a){switch(t){case"info":return o.x`
19
+ <luzmo-icon
20
+ .icon=${u.luzmoInfoCircleOutline}
21
+ label=${a||"Information"}
22
+ class="type"
23
+ ></luzmo-icon>
24
+ `;case"negative":return o.x`
25
+ <luzmo-icon
26
+ .icon=${u.luzmoAlertOutline}
27
+ label=${a||"Error"}
28
+ class="type"
29
+ ></luzmo-icon>
30
+ `;case"positive":return o.x`
31
+ <luzmo-icon
32
+ .icon=${u.luzmoCheckCircleOutline}
33
+ label=${a||"Success"}
34
+ class="type"
35
+ ></luzmo-icon>
36
+ `;default:return o.x``}}startCountdown(){this.countdown(),this.addEventListener("focusin",this.holdCountdown)}stopCountdown(){cancelAnimationFrame(this.nextCount),this.countdownStart=0}shouldClose(){this.dispatchEvent(new CustomEvent("close",{composed:!0,bubbles:!0,cancelable:!0}))&&this.close()}close(){this.open=!1}render(){return o.x`
37
+ ${this.renderIcon(this.variant,this.iconLabel)}
38
+ <div class="body" role="alert">
39
+ <div class="content">
40
+ <slot></slot>
41
+ </div>
42
+ <slot name="action"></slot>
43
+ </div>
44
+ <div class="buttons">
45
+ <luzmo-close-button
46
+ @click=${this.shouldClose}
47
+ label="Close"
48
+ static-color="white"
49
+ ></luzmo-close-button>
50
+ </div>
51
+ `}updated(t){super.updated(t),t.has("open")&&(this.open?this.timeout&&this.startCountdown():this.timeout&&this.stopCountdown()),t.has("timeout")&&(this.timeout!==null&&this.open?this.startCountdown():this.stopCountdown())}}s([o.n({type:Boolean,reflect:!0})],e.prototype,"open",2);s([o.n({type:Number})],e.prototype,"timeout",1);s([o.n({type:String})],e.prototype,"variant",1);s([o.n({type:String,attribute:"icon-label"})],e.prototype,"iconLabel",2);customElements.get("luzmo-toast")||customElements.define("luzmo-toast",e);exports.LuzmoToast=e;
@@ -0,0 +1,7 @@
1
+ import { LuzmoToast } from './toast';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'luzmo-toast': LuzmoToast;
5
+ }
6
+ }
7
+ export { LuzmoToast } from './toast';
@@ -0,0 +1,153 @@
1
+ /*! * Lucero - The design system for Luzmo.
2
+ *
3
+ * Copyright © 2025 Luzmo
4
+ * All rights reserved.
5
+ * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
+ * This license allows users with a current active Luzmo account to use Lucero.
7
+ * This license terminates automatically if a user no longer has an active Luzmo account.
8
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
+ *
10
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
+ * SOFTWARE.
17
+ * */
18
+ import { L as m, r as g, x as i, n as l } from "../base-CxUap9HL.js";
19
+ import "../close-button-CzpdWCWI.js";
20
+ import { F as v } from "../focus-visible-DBlJGoEW.js";
21
+ import { luzmoCheckCircleOutline as p, luzmoAlertOutline as z, luzmoInfoCircleOutline as b } from "@luzmo/icons";
22
+ const d = () => {
23
+ if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
24
+ const e = document.createElement("style");
25
+ e.setAttribute("data-luzmo-vars", ""), e.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-color-disabled);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-color-negative: #ca221c;--luzmo-color-negative-hover: #b3241f;--luzmo-color-negative-down: #9f231f;--luzmo-color-negative-focus: #b3241f;--luzmo-color-negative-rgb: 202, 34, 28;--luzmo-color-positive: rgb(20, 150, 101);--luzmo-color-positive-hover: rgb(17, 128, 86);--luzmo-color-positive-down: rgb(16, 105, 71);--luzmo-color-positive-focus: rgb(17, 128, 86);--luzmo-color-positive-rgb: 20, 150, 101;--luzmo-color-selected: rgb(110, 110, 110);--luzmo-color-selected-hover: rgb(70, 70, 70);--luzmo-color-selected-down: rgb(40, 40, 40);--luzmo-color-selected-focus: rgb(70, 70, 70);--luzmo-color-selected-hard: #1e1e1e;--luzmo-color-selected-hard-hover: rgb(0, 0, 0);--luzmo-color-selected-hard-down: rgb(0, 0, 0);--luzmo-color-selected-hard-focus: rgb(0, 0, 0);--luzmo-color-informative: #1a77e9;--luzmo-color-informative-rgb: 26, 119, 233;--luzmo-color-disabled: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(e);
26
+ }
27
+ };
28
+ d();
29
+ const h = "@media (forced-colors: active){:host{--highcontrast-toast-border-color: ButtonText;border:var(--luzmo-toast-border-width, var(--toast-border-width)) solid var(--highcontrast-toast-border-color, transparent)}}:host{box-sizing:border-box;min-block-size:var(--luzmo-toast-block-size, var(--toast-block-size));max-inline-size:var(--luzmo-toast-max-inline-size, var(--toast-max-inline-size));border-radius:var(--luzmo-toast-corner-radius, var(--toast-corner-radius));font-size:var(--luzmo-toast-font-size, var(--toast-font-size));font-weight:var(--luzmo-toast-font-weight, var(--toast-font-weight));-webkit-font-smoothing:antialiased;background-color:var(--highcontrast-toast-background-color-default, var(--luzmo-toast-background-color-default, var(--toast-background-color-default)));color:var(--highcontrast-toast-background-color-default, var(--luzmo-toast-background-color-default, var(--toast-background-color-default)));overflow-wrap:anywhere;flex-direction:row;align-items:stretch;padding-inline-start:var(--luzmo-toast-spacing-start-edge-to-text-and-icon, var(--toast-spacing-start-edge-to-text-and-icon));display:inline-flex}:host([variant=negative]){background-color:var(--highcontrast-toast-negative-background-color-default, var(--luzmo-toast-negative-background-color-default, var(--toast-negative-background-color-default)))}:host([variant=negative]),:host([variant=negative]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-negative-background-color-default, var(--luzmo-toast-negative-background-color-default, var(--toast-negative-background-color-default)))}:host([variant=info]){background-color:var(--highcontrast-toast-informative-background-color-default, var(--luzmo-toast-informative-background-color-default, var(--toast-informative-background-color-default)))}:host([variant=info]),:host([variant=info]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-informative-background-color-default, var(--luzmo-toast-informative-background-color-default, var(--toast-informative-background-color-default)))}:host([variant=positive]){background-color:var(--highcontrast-toast-positive-background-color-default, var(--luzmo-toast-positive-background-color-default, var(--toast-positive-background-color-default)))}:host([variant=positive]),:host([variant=positive]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-positive-background-color-default, var(--luzmo-toast-positive-background-color-default, var(--toast-positive-background-color-default)))}.type{flex-grow:0;flex-shrink:0;margin-block-start:var(--luzmo-toast-spacing-top-edge-to-icon, var(--toast-spacing-top-edge-to-icon));margin-inline-start:0;margin-inline-end:var(--luzmo-toast-spacing-icon-to-text, var(--toast-spacing-icon-to-text))}.content,.type{color:var(--highcontrast-toast-text-and-icon-color, var(--luzmo-toast-text-and-icon-color, var(--toast-text-and-icon-color)))}.content{box-sizing:border-box;line-height:var(--luzmo-toast-line-height, var(--toast-line-height));text-align:start;flex:auto;padding-block-start:calc(var(--luzmo-toast-spacing-top-edge-to-text, var(--toast-spacing-top-edge-to-text)) - var(--luzmo-toast-spacing-block-start, var(--toast-spacing-block-start)));padding-block-end:calc(var(--luzmo-toast-spacing-bottom-edge-to-text, var(--toast-spacing-bottom-edge-to-text)) - var(--luzmo-toast-spacing-block-end, var(--toast-spacing-block-end)));padding-inline-start:0;padding-inline-end:var(--luzmo-toast-spacing-text-to-action-button-horizontal, var(--toast-spacing-text-to-action-button-horizontal));display:inline-block}.content:lang(ja),.content:lang(ko),.content:lang(zh){line-height:var(--luzmo-toast-line-height-cjk, var(--toast-line-height-cjk))}.buttons{border-inline-start-color:var(--luzmo-toast-divider-color, var(--toast-divider-color));flex:none;align-items:flex-start;margin-block-start:var(--luzmo-toast-spacing-top-edge-to-divider, var(--toast-spacing-top-edge-to-divider));margin-block-end:var(--luzmo-toast-spacing-bottom-edge-to-divider, var(--toast-spacing-bottom-edge-to-divider));padding-inline-end:var(--luzmo-toast-spacing-close-button, var(--toast-spacing-close-button));display:flex}.buttons .luzmo-CloseButton{align-self:flex-start}.body{flex-wrap:wrap;flex:auto;align-self:center;align-items:center;padding-block-start:var(--luzmo-toast-spacing-block-start, var(--toast-spacing-block-start));padding-block-end:var(--luzmo-toast-spacing-block-end, var(--toast-spacing-block-end));display:flex}.body ::slotted([slot=action]){margin-inline-start:auto;margin-inline-end:var(--luzmo-toast-spacing-text-and-action-button-to-divider, var(--toast-spacing-text-and-action-button-to-divider))}.body ::slotted([slot=action]:dir(rtl)),:host([dir=rtl]) .body ::slotted([slot=action]){margin-inline-end:var(--luzmo-toast-spacing-text-and-action-button-to-divider, var(--toast-spacing-text-and-action-button-to-divider))}.body+.buttons{border-inline-start-style:solid;border-inline-start-width:1px;padding-inline-start:var(--luzmo-toast-spacing-close-button, var(--toast-spacing-close-button))}:host{--toast-background-color-default: rgb(80, 80, 80);--toast-font-weight: var(--luzmo-font-weight);--toast-font-size: var(--luzmo-font-size);--toast-corner-radius: var(--luzmo-border-radius);--toast-block-size: var(--luzmo-component-height);--toast-max-inline-size: 360px;--toast-border-width: var(--luzmo-border-width);--toast-line-height: var(--luzmo-line-height);--toast-line-height-cjk: 1.5;--toast-spacing-icon-to-text: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--toast-spacing-start-edge-to-text-and-icon: var(--luzmo-spacing-5);--toast-spacing-text-and-action-button-to-divider: var(--luzmo-spacing-5);--toast-spacing-top-edge-to-divider: var(--luzmo-spacing-3);--toast-spacing-bottom-edge-to-divider: var(--luzmo-spacing-3);--toast-spacing-top-edge-to-icon: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--toast-spacing-text-to-action-button-horizontal: var(--luzmo-spacing-5);--toast-spacing-close-button: var(--luzmo-spacing-3);--toast-spacing-block-start: var(--luzmo-spacing-3);--toast-spacing-block-end: var(--luzmo-spacing-3);--toast-spacing-top-edge-to-text: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--toast-spacing-bottom-edge-to-text: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--toast-negative-background-color-default: var(--luzmo-color-negative);--toast-positive-background-color-default: var(--luzmo-color-positive);--toast-informative-background-color-default: var(--luzmo-color-informative);--toast-text-and-icon-color: rgb(255, 255, 255);--toast-divider-color: rgba(255, 255, 255, .2)}:host{--overlay-animation-distance: var(--spacing-100);--overlay-animation-duration: var(--animation-duration-100);opacity:0;pointer-events:none;transition:transform var(--overlay-animation-duration) ease-in-out,opacity var(--overlay-animation-duration) ease-in-out,visibility 0s linear var(--overlay-animation-duration);visibility:hidden}:host([open]){opacity:1;pointer-events:auto;transition-delay:0s;visibility:visible}:host([variant=error]),:host([variant=warning]){background-color:var(--highcontrast-toast-negative-background-color-default, var(--luzmo-toast-negative-background-color-default, var(--toast-negative-background-color-default)))}:host([variant=negative]),:host([variant=negative]) .closeButton:focus-visible:not(:active),:host([variant=warning]),:host([variant=warning]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-negative-background-color-default, var(--luzmo-toast-negative-background-color-default, var(--toast-negative-background-color-default)))}";
30
+ var f = Object.defineProperty, x = Object.getOwnPropertyDescriptor, s = (e, o, t, r) => {
31
+ for (var a = r > 1 ? void 0 : r ? x(o, t) : o, c = e.length - 1, u; c >= 0; c--)
32
+ (u = e[c]) && (a = (r ? u(o, t, a) : u(a)) || a);
33
+ return r && a && f(o, t, a), a;
34
+ };
35
+ const k = ["negative", "positive", "info"];
36
+ class n extends v(m) {
37
+ constructor() {
38
+ super(...arguments), this.open = !1, this._timeout = null, this._variant = "", this.countdownStart = 0, this.nextCount = -1, this.doCountdown = (o) => {
39
+ this.countdownStart || (this.countdownStart = performance.now()), o - this.countdownStart > this._timeout ? (this.shouldClose(), this.countdownStart = 0) : this.countdown();
40
+ }, this.countdown = () => {
41
+ cancelAnimationFrame(this.nextCount), this.nextCount = requestAnimationFrame(this.doCountdown);
42
+ }, this.holdCountdown = () => {
43
+ this.stopCountdown(), this.addEventListener("focusout", this.resumeCountdown);
44
+ }, this.resumeCountdown = () => {
45
+ this.removeEventListener("focusout", this.holdCountdown), this.countdown();
46
+ };
47
+ }
48
+ static get styles() {
49
+ return [g(h)];
50
+ }
51
+ set timeout(o) {
52
+ const r = typeof o !== null && o > 0 ? Math.max(6e3, o) : null, a = this.timeout;
53
+ r && this.countdownStart && (this.countdownStart = performance.now()), this._timeout = r, this.requestUpdate("timeout", a);
54
+ }
55
+ get timeout() {
56
+ return this._timeout;
57
+ }
58
+ set variant(o) {
59
+ if (o === this.variant)
60
+ return;
61
+ const t = this.variant;
62
+ k.includes(o) ? (this.setAttribute("variant", o), this._variant = o) : (this.removeAttribute("variant"), this._variant = ""), this.requestUpdate("variant", t);
63
+ }
64
+ get variant() {
65
+ return this._variant;
66
+ }
67
+ // TODO(#4931): Address the deprecated variants or remove the flags
68
+ renderIcon(o, t) {
69
+ switch (o) {
70
+ case "info":
71
+ return i`
72
+ <luzmo-icon
73
+ .icon=${b}
74
+ label=${t || "Information"}
75
+ class="type"
76
+ ></luzmo-icon>
77
+ `;
78
+ case "negative":
79
+ return i`
80
+ <luzmo-icon
81
+ .icon=${z}
82
+ label=${t || "Error"}
83
+ class="type"
84
+ ></luzmo-icon>
85
+ `;
86
+ case "positive":
87
+ return i`
88
+ <luzmo-icon
89
+ .icon=${p}
90
+ label=${t || "Success"}
91
+ class="type"
92
+ ></luzmo-icon>
93
+ `;
94
+ default:
95
+ return i``;
96
+ }
97
+ }
98
+ startCountdown() {
99
+ this.countdown(), this.addEventListener("focusin", this.holdCountdown);
100
+ }
101
+ stopCountdown() {
102
+ cancelAnimationFrame(this.nextCount), this.countdownStart = 0;
103
+ }
104
+ shouldClose() {
105
+ this.dispatchEvent(
106
+ new CustomEvent("close", {
107
+ composed: !0,
108
+ bubbles: !0,
109
+ cancelable: !0
110
+ })
111
+ ) && this.close();
112
+ }
113
+ close() {
114
+ this.open = !1;
115
+ }
116
+ render() {
117
+ return i`
118
+ ${this.renderIcon(this.variant, this.iconLabel)}
119
+ <div class="body" role="alert">
120
+ <div class="content">
121
+ <slot></slot>
122
+ </div>
123
+ <slot name="action"></slot>
124
+ </div>
125
+ <div class="buttons">
126
+ <luzmo-close-button
127
+ @click=${this.shouldClose}
128
+ label="Close"
129
+ static-color="white"
130
+ ></luzmo-close-button>
131
+ </div>
132
+ `;
133
+ }
134
+ updated(o) {
135
+ super.updated(o), o.has("open") && (this.open ? this.timeout && this.startCountdown() : this.timeout && this.stopCountdown()), o.has("timeout") && (this.timeout !== null && this.open ? this.startCountdown() : this.stopCountdown());
136
+ }
137
+ }
138
+ s([
139
+ l({ type: Boolean, reflect: !0 })
140
+ ], n.prototype, "open", 2);
141
+ s([
142
+ l({ type: Number })
143
+ ], n.prototype, "timeout", 1);
144
+ s([
145
+ l({ type: String })
146
+ ], n.prototype, "variant", 1);
147
+ s([
148
+ l({ type: String, attribute: "icon-label" })
149
+ ], n.prototype, "iconLabel", 2);
150
+ customElements.get("luzmo-toast") || customElements.define("luzmo-toast", n);
151
+ export {
152
+ n as LuzmoToast
153
+ };
@@ -0,0 +1,77 @@
1
+ import { CSSResultArray, PropertyValues, TemplateResult } from 'lit';
2
+ import { LuzmoElement } from '../../utils/base';
3
+ import '../button/close-button';
4
+ export declare const toastVariants: ToastVariants[];
5
+ export type ToastVariants = 'negative' | 'positive' | 'info' | '';
6
+ declare const LuzmoToast_base: typeof LuzmoElement;
7
+ /**
8
+ * @element luzmo-toast
9
+ *
10
+ * @slot - The toast content
11
+ * @slot action - button element surfacing an action in the Toast
12
+ *
13
+ * @fires close - Announces that the Toast has been closed by the user or by its timeout.
14
+ */
15
+ export declare class LuzmoToast extends LuzmoToast_base {
16
+ static get styles(): CSSResultArray;
17
+ /**
18
+ * The `open` property indicates whether the toast is visible or hidden.
19
+ *
20
+ * @param {Boolean} open
21
+ */
22
+ open: boolean;
23
+ /**
24
+ * When a timeout is provided, it represents the number of milliseconds from when
25
+ * the Toast was placed on the page before it will automatically dismiss itself.
26
+ *
27
+ * Accessibility concerns require that a Toast is available for at least 6000ms
28
+ * before being dismissed, so any timeout of less than 6000ms will be raised to
29
+ * that baseline.
30
+ *
31
+ * It is suggested that messages longer than 120 words should receive an additional
32
+ * 1000ms in their timeout for each additional 120 words in the message.
33
+ *
34
+ * For example, a message with 240 words should have a timeout of 7000ms,
35
+ * and a message with 360 words should have a timeout of 8000ms.
36
+ *
37
+ * @param timeout
38
+ * @default null
39
+ */
40
+ set timeout(timeout: number | null);
41
+ get timeout(): number | null;
42
+ private _timeout;
43
+ /**
44
+ * The variant applies specific styling when set to `negative`, `positive`, `info`, `error`, or `warning`.
45
+ *
46
+ * The variants `error` and `warning` are deprecated and should be replaced with `negative`.
47
+ *
48
+ * `variant` attribute is removed when not matching one of the above.
49
+ *
50
+ * @param variant
51
+ */
52
+ set variant(variant: ToastVariants);
53
+ get variant(): ToastVariants;
54
+ private _variant;
55
+ /**
56
+ * The `iconLabel` property is used to set the `label` attribute on the icon element. This is used to provide a text alternative for the icon to ensure accessibility.
57
+ *
58
+ * If the `iconLabel` property is not set, the icon will use the `variant` to dynamically set the `label`.
59
+ *
60
+ * @param {String} iconLabel
61
+ */
62
+ iconLabel?: string;
63
+ private renderIcon;
64
+ private countdownStart;
65
+ private nextCount;
66
+ private doCountdown;
67
+ private countdown;
68
+ private holdCountdown;
69
+ private resumeCountdown;
70
+ private startCountdown;
71
+ private stopCountdown;
72
+ private shouldClose;
73
+ close(): void;
74
+ protected render(): TemplateResult;
75
+ protected updated(changes: PropertyValues): void;
76
+ }
77
+ export {};
@@ -0,0 +1,45 @@
1
+ /*! * Lucero - The design system for Luzmo.
2
+ *
3
+ * Copyright © 2025 Luzmo
4
+ * All rights reserved.
5
+ * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
+ * This license allows users with a current active Luzmo account to use Lucero.
7
+ * This license terminates automatically if a user no longer has an active Luzmo account.
8
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
+ *
10
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
+ * SOFTWARE.
17
+ * */
18
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../base-rtxi7uaR.cjs"),m=require("../query-BL-TJj7K.cjs"),u=require("../if-defined-C-8FyBSN.cjs"),c=require("../focusable-selectors-BgFlyFcY.cjs"),h=require("../dependency-manger-C5HCkMMB.cjs"),z=require("../sized-mixin-BAI6NiE2.cjs"),d="#tooltip{pointer-events:none;visibility:hidden;opacity:0;transition:transform .13s ease-in-out,opacity .13s ease-in-out,visibility 0s linear .13s;transition:transform var(--luzmo-overlay-animation-duration, .13s) ease-in-out,opacity var(--luzmo-overlay-animation-duration, .13s) ease-in-out,visibility 0s linear var(--luzmo-overlay-animation-duration, .13s)}:host([open]) #tooltip{pointer-events:auto;visibility:visible;opacity:1;transition-delay:0s;transition-delay:var(--luzmo-overlay-animation-duration-opened, 0s)}@media (forced-colors: active){#tooltip{border:1px solid rgba(0,0,0,0)}#tip{--highcontrast-tooltip-background-color-default: CanvasText;--highcontrast-tooltip-background-color-informative: CanvasText;--highcontrast-tooltip-background-color-positive: CanvasText;--highcontrast-tooltip-background-color-negative: CanvasText;forced-color-adjust:none}}#tooltip{box-sizing:border-box;vertical-align:top;inline-size:auto;padding-inline:var(--luzmo-tooltip-spacing-inline, .688rem);border-radius:var(--luzmo-tooltip-border-radius, .313rem);block-size:auto;min-block-size:var(--luzmo-tooltip-height, 1.875rem);max-inline-size:var(--luzmo-tooltip-max-inline-size, 12.5rem);background-color:var(--highcontrast-tooltip-background-color-default, var(--luzmo-tooltip-background-color-default, rgb(109, 109, 109)));color:var(--luzmo-tooltip-content-color, white);font-size:var(--luzmo-tooltip-font-size, var(--tooltip-font-size, .938rem));font-weight:var(--luzmo-tooltip-font-weight, 400);line-height:var(--luzmo-tooltip-line-height, 1.3);word-break:break-word;-webkit-font-smoothing:antialiased;cursor:default;-webkit-user-select:none;user-select:none;flex-direction:row;align-items:center;display:inline-flex;position:relative}:host(:lang(ja)) #tooltip,:host(:lang(ko)) #tooltip,:host(:lang(zh)) #tooltip{line-height:var(--luzmo-tooltip-cjk-line-height, 1.5)}#tooltip p{margin:0}:host([variant=info]) #tooltip{background-color:var(--highcontrast-tooltip-background-color-informative, var(--luzmo-tooltip-background-color-informative, rgb(2, 101, 220)))}:host([variant=positive]) #tooltip{background-color:var(--highcontrast-tooltip-background-color-positive, var(--luzmo-tooltip-background-color-positive, rgb(0, 122, 77)))}:host([variant=negative]) #tooltip{background-color:var(--highcontrast-tooltip-background-color-negative, var(--luzmo-tooltip-background-color-negative, rgb(211, 21, 16)))}#tip{block-size:var(--luzmo-tooltip-tip-square-size, .625rem);inline-size:var(--luzmo-tooltip-tip-square-size, .625rem);inset-block-start:100%;background-color:var(--highcontrast-tooltip-background-color-default, var(--luzmo-tooltip-background-color-default, rgb(109, 109, 109)));clip-path:polygon(0 calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)),50% var(--luzmo-tooltip-tip-height-percentage, 50%),100% calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)));position:absolute;left:50%;transform:translate(-50%)}:host([variant=info]) #tooltip #tip{background-color:var(--highcontrast-tooltip-background-color-informative, var(--luzmo-tooltip-background-color-informative, rgb(2, 101, 220)))}:host([variant=positive]) #tooltip #tip{background-color:var(--highcontrast-tooltip-background-color-positive, var(--luzmo-tooltip-background-color-positive, rgb(0, 122, 77)))}:host([variant=negative]) #tooltip #tip{background-color:var(--highcontrast-tooltip-background-color-negative, var(--luzmo-tooltip-background-color-negative, rgb(211, 21, 16)))}:host([placement*=top]) #tooltip #tip,.luzmo-Tooltip--top-end #tip,.luzmo-Tooltip--top-left #tip,.luzmo-Tooltip--top-right #tip,.luzmo-Tooltip--top-start #tip{inset-block-start:100%}:host([placement*=bottom]) #tooltip #tip,.luzmo-Tooltip--bottom-end #tip,.luzmo-Tooltip--bottom-left #tip,.luzmo-Tooltip--bottom-right #tip,.luzmo-Tooltip--bottom-start #tip{clip-path:polygon(50% calc(100% - var(--luzmo-tooltip-tip-height-percentage, 50%)),0 calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)),100% calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)));inset-block:auto 100%}.luzmo-Tooltip--bottom-end #tip,.luzmo-Tooltip--bottom-left #tip,.luzmo-Tooltip--bottom-right #tip,.luzmo-Tooltip--bottom-start #tip,.luzmo-Tooltip--top-end #tip,.luzmo-Tooltip--top-left #tip,.luzmo-Tooltip--top-right #tip,.luzmo-Tooltip--top-start #tip{transform:none}.luzmo-Tooltip--bottom-left #tip,.luzmo-Tooltip--top-left #tip{inset-inline-start:var(--luzmo-tooltip-pointer-corner-spacing, .313rem)}.luzmo-Tooltip--bottom-right #tip,.luzmo-Tooltip--top-right #tip{inset-inline:auto var(--luzmo-tooltip-pointer-corner-spacing, .313rem)}.luzmo-Tooltip--bottom-start #tip,.luzmo-Tooltip--top-start #tip{inset-inline:var(--luzmo-tooltip-pointer-corner-spacing, .313rem) auto}.luzmo-Tooltip--bottom-start #tip:dir(rtl),.luzmo-Tooltip--top-start #tip:dir(rtl),:host([dir=rtl]) .luzmo-Tooltip--bottom-start #tip,:host([dir=rtl]) .luzmo-Tooltip--top-start #tip{right:var(--luzmo-tooltip-pointer-corner-spacing, .313rem);left:auto}.luzmo-Tooltip--bottom-end #tip,.luzmo-Tooltip--top-end #tip{inset-inline:auto var(--luzmo-tooltip-pointer-corner-spacing, .313rem)}.luzmo-Tooltip--bottom-end #tip:dir(rtl),.luzmo-Tooltip--top-end #tip:dir(rtl),:host([dir=rtl]) .luzmo-Tooltip--bottom-end #tip,:host([dir=rtl]) .luzmo-Tooltip--top-end #tip{left:var(--luzmo-tooltip-pointer-corner-spacing, .313rem);right:auto}.luzmo-Tooltip--end #tip,.luzmo-Tooltip--end-bottom #tip,.luzmo-Tooltip--end-top #tip,:host([placement*=left]) #tooltip #tip,.luzmo-Tooltip--left-bottom #tip,.luzmo-Tooltip--left-top #tip,:host([placement*=right]) #tooltip #tip,.luzmo-Tooltip--right-bottom #tip,.luzmo-Tooltip--right-top #tip,.luzmo-Tooltip--start #tip,.luzmo-Tooltip--start-bottom #tip,.luzmo-Tooltip--start-top #tip{inset-block-start:50%;transform:translateY(-50%)}.luzmo-Tooltip--end-bottom #tip,.luzmo-Tooltip--end-top #tip,.luzmo-Tooltip--left-bottom #tip,.luzmo-Tooltip--left-top #tip,.luzmo-Tooltip--right-bottom #tip,.luzmo-Tooltip--right-top #tip,.luzmo-Tooltip--start-bottom #tip,.luzmo-Tooltip--start-top #tip{inset-block-start:auto;transform:none}.luzmo-Tooltip--end #tip,.luzmo-Tooltip--end-bottom #tip,.luzmo-Tooltip--end-top #tip,:host([placement*=right]) #tooltip #tip,.luzmo-Tooltip--right-bottom #tip,.luzmo-Tooltip--right-top #tip{clip-path:polygon(calc(100% - var(--luzmo-tooltip-tip-height-percentage, 50%)) 50%,calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 100%,calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 0);inset-inline:auto 100%}:host([placement*=left]) #tooltip #tip,.luzmo-Tooltip--left-bottom #tip,.luzmo-Tooltip--left-top #tip,.luzmo-Tooltip--start #tip,.luzmo-Tooltip--start-bottom #tip,.luzmo-Tooltip--start-top #tip{clip-path:polygon(calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 0,calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 100%,var(--luzmo-tooltip-tip-height-percentage, 50%) 50%);inset-inline-start:100%}.luzmo-Tooltip--end-top #tip,.luzmo-Tooltip--left-top #tip,.luzmo-Tooltip--right-top #tip,.luzmo-Tooltip--start-top #tip{inset-block-start:var(--luzmo-tooltip-pointer-corner-spacing, .313rem)}.luzmo-Tooltip--end-bottom #tip,.luzmo-Tooltip--left-bottom #tip,.luzmo-Tooltip--right-bottom #tip,.luzmo-Tooltip--start-bottom #tip{inset-block-end:var(--luzmo-tooltip-pointer-corner-spacing, .313rem)}.luzmo-Tooltip--end #tip:dir(rtl),.luzmo-Tooltip--end-bottom #tip:dir(rtl),.luzmo-Tooltip--end-top #tip:dir(rtl),:host([placement*=left]) #tooltip #tip:dir(rtl),.luzmo-Tooltip--left-bottom #tip:dir(rtl),.luzmo-Tooltip--left-top #tip:dir(rtl),:host([dir=rtl]) .luzmo-Tooltip--end #tip,:host([dir=rtl]) .luzmo-Tooltip--end-bottom #tip,:host([dir=rtl]) .luzmo-Tooltip--end-top #tip,:host([dir=rtl][placement*=left]) #tooltip #tip,:host([dir=rtl]) .luzmo-Tooltip--left-bottom #tip,:host([dir=rtl]) .luzmo-Tooltip--left-top #tip{clip-path:polygon(calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 0,calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 100%,var(--luzmo-tooltip-tip-height-percentage, 50%) 50%);left:100%;right:auto}:host([placement*=right]) #tooltip #tip:dir(rtl),.luzmo-Tooltip--right-bottom #tip:dir(rtl),.luzmo-Tooltip--right-top #tip:dir(rtl),.luzmo-Tooltip--start #tip:dir(rtl),.luzmo-Tooltip--start-bottom #tip:dir(rtl),.luzmo-Tooltip--start-top #tip:dir(rtl),:host([dir=rtl][placement*=right]) #tooltip #tip,:host([dir=rtl]) .luzmo-Tooltip--right-bottom #tip,:host([dir=rtl]) .luzmo-Tooltip--right-top #tip,:host([dir=rtl]) .luzmo-Tooltip--start #tip,:host([dir=rtl]) .luzmo-Tooltip--start-bottom #tip,:host([dir=rtl]) .luzmo-Tooltip--start-top #tip{clip-path:polygon(var(--luzmo-tooltip-tip-height-percentage, 50%) 50%,calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 100%,calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 0);left:auto;right:100%}::slotted([slot=icon]){inline-size:var(--luzmo-tooltip-icon-width, 1.125rem);block-size:var(--luzmo-tooltip-icon-height, 1.125rem);flex-shrink:0;align-self:flex-start;margin-block-start:var(--luzmo-tooltip-icon-spacing-block-start, .313rem);margin-inline-start:calc(var(--luzmo-tooltip-icon-spacing-inline-start, .563rem) - var(--luzmo-tooltip-spacing-inline, .688rem));margin-inline-end:var(--luzmo-tooltip-icon-spacing-inline-end, .563rem)}#label{line-height:var(--luzmo-tooltip-line-height, 1.3);margin-block-start:var(--luzmo-tooltip-spacing-block-start, .313rem);margin-block-end:var(--luzmo-tooltip-spacing-block-end, .375rem)}#tooltip,:host([placement*=top]) #tooltip,.luzmo-Tooltip--top-end,.luzmo-Tooltip--top-left,.luzmo-Tooltip--top-right,.luzmo-Tooltip--top-start{margin-block-end:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--top-end,:host([open]) .luzmo-Tooltip--top-left,:host([open]) .luzmo-Tooltip--top-right,:host([open]) .luzmo-Tooltip--top-start,:host([placement*=top][open]) #tooltip,:host([open]) #tooltip{transform:translateY(calc(var(--luzmo-tooltip-animation-distance, .313rem) * -1))}:host([placement*=bottom]) #tooltip,.luzmo-Tooltip--bottom-end,.luzmo-Tooltip--bottom-left,.luzmo-Tooltip--bottom-right,.luzmo-Tooltip--bottom-start{margin-block-start:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--bottom-end,:host([open]) .luzmo-Tooltip--bottom-left,:host([open]) .luzmo-Tooltip--bottom-right,:host([open]) .luzmo-Tooltip--bottom-start,:host([placement*=bottom][open]) #tooltip{transform:translateY(var(--luzmo-tooltip-animation-distance, .313rem))}:host([placement*=right]) #tooltip,.luzmo-Tooltip--right-bottom,.luzmo-Tooltip--right-top{margin-left:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--right-bottom,:host([open]) .luzmo-Tooltip--right-top,:host([placement*=right][open]) #tooltip{transform:translate(var(--luzmo-tooltip-animation-distance, .313rem))}:host([placement*=left]) #tooltip,.luzmo-Tooltip--left-bottom,.luzmo-Tooltip--left-top{margin-right:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--left-bottom,:host([open]) .luzmo-Tooltip--left-top,:host([placement*=left][open]) #tooltip{transform:translate(calc(var(--luzmo-tooltip-animation-distance, .313rem) * -1))}.luzmo-Tooltip--start,.luzmo-Tooltip--start-bottom,.luzmo-Tooltip--start-top{margin-inline-end:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--start-bottom,:host([open]) .luzmo-Tooltip--start-top,:host([open]) .luzmo-Tooltip--start{transform:translate(calc(var(--luzmo-tooltip-animation-distance, .313rem) * -1))}:host([open]) .luzmo-Tooltip--start-bottom:dir(rtl),:host([open]) .luzmo-Tooltip--start-top:dir(rtl),:host([open]) .luzmo-Tooltip--start:dir(rtl),:host([dir=rtl][open]) .luzmo-Tooltip--start-bottom,:host([dir=rtl][open]) .luzmo-Tooltip--start-top,:host([dir=rtl][open]) .luzmo-Tooltip--start{transform:translate(var(--luzmo-tooltip-animation-distance, .313rem))}.luzmo-Tooltip--end,.luzmo-Tooltip--end-bottom,.luzmo-Tooltip--end-top{margin-inline-start:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--end-bottom,:host([open]) .luzmo-Tooltip--end-top,:host([open]) .luzmo-Tooltip--end{transform:translate(var(--luzmo-tooltip-animation-distance, .313rem))}:host([open]) .luzmo-Tooltip--end-bottom:dir(rtl),:host([open]) .luzmo-Tooltip--end-top:dir(rtl),:host([open]) .luzmo-Tooltip--end:dir(rtl),:host([dir=rtl][open]) .luzmo-Tooltip--end-bottom,:host([dir=rtl][open]) .luzmo-Tooltip--end-top,:host([dir=rtl][open]) .luzmo-Tooltip--end{transform:translate(calc(var(--luzmo-tooltip-animation-distance, .313rem) * -1))}:host{--luzmo-tooltip-background-color-default: rgb(0, 0, 0);--tooltip-font-size: var(--luzmo-font-size)}:host([size=s]){--tooltip-font-size: var(--luzmo-font-size-s)}:host([size=m]){--tooltip-font-size: var(--luzmo-font-size-m)}:host([size=l]){--tooltip-font-size: var(--luzmo-font-size-l)}:host([size=xl]){--tooltip-font-size: var(--luzmo-font-size-xl)}:host{display:contents;white-space:initial}#tooltip{inline-size:max-content}#tip{clip-path:polygon(0 -5%,50% 50%,100% -5%);width:.625rem!important;height:.625rem!important}#tip[style]{transform:none!important}:host(:not([placement*=top])) #tooltip{margin-bottom:0}:host([placement*=top]) #tooltip #tip{inset-block-start:100%}:host([placement*=bottom]) #tooltip #tip{inset-block-end:100%;clip-path:polygon(50% 50%,0 105%,100% 105%);top:auto}:host([placement*=left]) #tooltip #tip,:host([placement*=right]) #tooltip #tip{inset-block-start:50%;transform:translateY(-50%)}:host([placement*=right]) #tooltip #tip{clip-path:polygon(50% 50%,105% 100%,105% 0);inset-inline:calc(var(--luzmo-tooltip-tip-block-size, .313rem) * -2) 100%}:host([placement*=left]) #tooltip #tip{clip-path:polygon(-5% 0,-5% 100%,50% 50%);inset-inline-start:100%}luzmo-overlay:not(:defined){display:none}";var g=Object.defineProperty,b=Object.getOwnPropertyDescriptor,r=(n,t,o,i)=>{for(var p=i>1?void 0:i?b(t,o):t,a=n.length-1,s;a>=0;a--)(s=n[a])&&(p=(i?s(t,o,p):s(p))||p);return i&&p&&g(t,o,p),p};class v extends HTMLElement{constructor(){super(),this._open=!1,this._placement="top",this.addEventListener("luzmo-opened",this.redispatchEvent),this.addEventListener("luzmo-closed",this.redispatchEvent)}redispatchEvent(t){t.stopPropagation(),this.tooltip.dispatchEvent(new CustomEvent(t.type,{bubbles:t.bubbles,composed:t.composed,detail:t.detail}))}get tooltip(){return this.getRootNode().host}static get observedAttributes(){return["open","placement"]}attributeChangedCallback(t,o,i){switch(t){case"open":{this.open=i!==null;break}case"placement":{this.placement=i;break}}}set open(t){this._open=t;const{tooltip:o}=this;o&&(o.open=t)}get open(){return this._open}set placement(t){this._placement=t;const{tooltip:o}=this;o&&(o.placement=t)}get placement(){return this._placement}get tipElement(){return this.tooltip.tipElement}}customElements.get("luzmo-tooltip-openable")||customElements.define("luzmo-tooltip-openable",v);class e extends z.SizedMixin(l.LuzmoElement,{defaultSize:"s"}){constructor(){super(...arguments),this.delayed=!1,this.dependencyManager=new h.DependencyManagerController(this),this.disabled=!1,this.selfManaged=!1,this.offset=0,this.open=!1,this._variant="",this.handleOpenOverlay=()=>{this.open=!0},this.handleCloseOverlay=()=>{this.open=!1}}static get styles(){return[l.r(d)]}get variant(){return this._variant}set variant(t){if(t!==this.variant){if(["info","positive","negative"].includes(t)){this.setAttribute("variant",t),this._variant=t;return}this.removeAttribute("variant"),this._variant=""}}forwardTransitionEvent(t){this.dispatchEvent(new TransitionEvent(t.type,{bubbles:!0,composed:!0,propertyName:t.propertyName}))}get triggerElement(){var p;let t=this.assignedSlot||this,o=t.getRootNode();if(o===document)return null;let i=t.parentElement||o.host||o;for(;!((p=i==null?void 0:i.matches)!=null&&p.call(i,c.focusableSelector));){if(t=i.assignedSlot||i,o=t.getRootNode(),o===document)return null;i=t.parentElement||o.host||o}return i}render(){const t=l.x`
19
+ <luzmo-tooltip-openable
20
+ id="tooltip"
21
+ placement=${u.o(this.placement)}
22
+ @transitionrun=${this.forwardTransitionEvent}
23
+ @transitionend=${this.forwardTransitionEvent}
24
+ @transitioncancel=${this.forwardTransitionEvent}
25
+ >
26
+ <slot name="icon"></slot>
27
+ <span id="label"><slot></slot></span>
28
+ <span id="tip" aria-hidden="true"></span>
29
+ </luzmo-tooltip-openable>
30
+ `;return this.selfManaged?(this.dependencyManager.add("luzmo-overlay"),Promise.resolve().then(()=>require("../overlay/index.cjs")),l.x`
31
+ <luzmo-overlay
32
+ ?open=${this.open&&!this.disabled&&this.dependencyManager.loaded}
33
+ ?delayed=${this.delayed}
34
+ ?disabled=${this.disabled}
35
+ offset=${this.offset}
36
+ .placement=${this.placement}
37
+ type="hint"
38
+ .tipPadding=${this.tipPadding}
39
+ .triggerInteraction=${"hover"}
40
+ @luzmo-opened=${this.handleOpenOverlay}
41
+ @luzmo-closed=${this.handleCloseOverlay}
42
+ >
43
+ ${t}
44
+ </luzmo-overlay>
45
+ `):t}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{if(!this.selfManaged)return;const t=this.overlayElement;if(t){const o=this.triggerElement;t.triggerElement=o}})}}r([l.n({type:Boolean})],e.prototype,"delayed",2);r([l.n({type:Boolean})],e.prototype,"disabled",2);r([l.n({type:Boolean,attribute:"self-managed"})],e.prototype,"selfManaged",2);r([l.n({type:Number})],e.prototype,"offset",2);r([l.n({type:Boolean,reflect:!0})],e.prototype,"open",2);r([m.e("luzmo-overlay")],e.prototype,"overlayElement",2);r([l.n({reflect:!0})],e.prototype,"placement",2);r([m.e("#tip")],e.prototype,"tipElement",2);r([l.n({type:Number})],e.prototype,"tipPadding",2);r([l.n({type:String})],e.prototype,"variant",1);customElements.get("luzmo-tooltip")||customElements.define("luzmo-tooltip",e);exports.Tooltip=e;
@@ -0,0 +1,8 @@
1
+ export * from './tooltip';
2
+ import { Tooltip } from './tooltip';
3
+ declare global {
4
+ interface HTMLElementTagNameMap {
5
+ 'luzmo-tooltip': Tooltip;
6
+ }
7
+ }
8
+ export { Tooltip } from './tooltip';