@nubisco/ui 4.1.4 → 5.0.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 (300) hide show
  1. package/dist/{AiLabel-VbZiFHAZ.js → AiLabel-Ci7eROcw.js} +1 -1
  2. package/dist/{AiLabel-DZ9GkGqL.cjs → AiLabel-DtM5ZCQC.cjs} +1 -1
  3. package/dist/{Banner-7XsX8ibI.js → Banner-C5Erb75B.js} +1 -1
  4. package/dist/{Banner-DI5fA8Ow.cjs → Banner-JubX-4yR.cjs} +1 -1
  5. package/dist/{BlueprintControls-CJAKrQ6U.js → BlueprintControls-BkwhsHI8.js} +1 -1
  6. package/dist/{BlueprintControls-aF11uokn.cjs → BlueprintControls-CdvNvRkW.cjs} +1 -1
  7. package/dist/{BlueprintMinimap-C-gCkMIW.cjs → BlueprintMinimap-BIBsnBFs.cjs} +1 -1
  8. package/dist/{BlueprintMinimap-C-65UzhM.js → BlueprintMinimap-QAw6aiCc.js} +1 -1
  9. package/dist/{BottomPanel-B-dhgMWB.js → BottomPanel-BoBCdANz.js} +1 -1
  10. package/dist/{BottomPanel-CmVH0Hsf.cjs → BottomPanel-dbllmH2v.cjs} +1 -1
  11. package/dist/Button-Dwv0rx46.cjs +1 -0
  12. package/dist/{Button-Cegx6vaT.js → Button-Q8MBLMvG.js} +12 -4
  13. package/dist/{Card-Cs-7jXxG.cjs → Card-Cn5OS4q-.cjs} +1 -1
  14. package/dist/{Card-TjV_N8RU.js → Card-eM6DEphF.js} +1 -1
  15. package/dist/{Checkbox-BJrnykX9.js → Checkbox-DG82KK8V.js} +1 -1
  16. package/dist/{Checkbox-D9qW3gph.cjs → Checkbox-vFN3fLyr.cjs} +1 -1
  17. package/dist/{CheckboxGroup-CUSPscyy.js → CheckboxGroup-5pmdu9fe.js} +1 -1
  18. package/dist/{CheckboxGroup-mWcKUeq9.cjs → CheckboxGroup-Cyj2NUtI.cjs} +1 -1
  19. package/dist/{ColorStrip-CR1JDzwX.js → ColorStrip-BBTJU1Ox.js} +47 -45
  20. package/dist/ColorStrip-D3nbTyfs.cjs +1 -0
  21. package/dist/{Confirm-pgn2HajX.js → Confirm-C-HRTF0s.js} +23 -52
  22. package/dist/Confirm-w3Ig0L5j.cjs +1 -0
  23. package/dist/{DataTable-c0ltF6wT.js → DataTable-BVxSUB-h.js} +3 -3
  24. package/dist/{DataTable-BbiDmA1X.cjs → DataTable-Cnyh04sD.cjs} +1 -1
  25. package/dist/{DatePicker-YJ8-ViVK.js → DatePicker-BimOzKti.js} +1 -1
  26. package/dist/{DatePicker-C8_qR25v.cjs → DatePicker-CMPgr4Hp.cjs} +1 -1
  27. package/dist/{EmptyState-DVg8l-bl.js → EmptyState-CwMG-NeI.js} +1 -1
  28. package/dist/{EmptyState-henL7JH6.cjs → EmptyState-Cz91HAKF.cjs} +1 -1
  29. package/dist/{FileUploader-Lzy4bFn7.cjs → FileUploader-BJdRC-Kp.cjs} +1 -1
  30. package/dist/{FileUploader-BLwR6H3f.js → FileUploader-BO2cDUwP.js} +2 -2
  31. package/dist/{ImageCropper-CpEGFPKb.cjs → ImageCropper-D7mr-xRE.cjs} +1 -1
  32. package/dist/{ImageCropper-BX2BnJai.js → ImageCropper-DEaGU0cZ.js} +1 -1
  33. package/dist/{InfoHint-DesESwdO.cjs → InfoHint-BNpqLVSX.cjs} +1 -1
  34. package/dist/{InfoHint-JwhhBFZP.js → InfoHint-C663u_NL.js} +1 -1
  35. package/dist/{InlineEdit-CZEt1vhH.cjs → InlineEdit-D95I45Vt.cjs} +1 -1
  36. package/dist/{InlineEdit-DNMF_40m.js → InlineEdit-DrhJ0AX2.js} +1 -1
  37. package/dist/{Message-Daj6hLC4.cjs → Message-Ax7rnAQl.cjs} +1 -1
  38. package/dist/{Message-BuG5t7bu.js → Message-DqUW3GHc.js} +1 -1
  39. package/dist/Modal-B1CQyPNo.js +206 -0
  40. package/dist/Modal-DvukGfHg.cjs +1 -0
  41. package/dist/{NotificationCenter-DL_Tshyb.js → NotificationCenter-Duu3XZC3.js} +3 -3
  42. package/dist/{NotificationCenter-D51ty3Lq.cjs → NotificationCenter-oOzClQI-.cjs} +1 -1
  43. package/dist/{NumberInput-Vc2wzK62.cjs → NumberInput-DKZsdWLv.cjs} +1 -1
  44. package/dist/{NumberInput-6R8FkJc-.js → NumberInput-_ff3Xi2r.js} +2 -2
  45. package/dist/{Pagination-B6a62qvI.js → Pagination-6bF88x_p.js} +3 -3
  46. package/dist/{Pagination-CkBe9Naz.cjs → Pagination-EipK6BGe.cjs} +1 -1
  47. package/dist/{Panel-BVtGI7YH.js → Panel-D3s_MKfd.js} +1 -1
  48. package/dist/{Panel-DQfmVtie.cjs → Panel-qDfyu_0v.cjs} +1 -1
  49. package/dist/{ProgressBar-fAaKT9lD.cjs → ProgressBar-CbqsSdZZ.cjs} +1 -1
  50. package/dist/{ProgressBar-DjejtCKA.js → ProgressBar-aF2zBoRA.js} +2 -2
  51. package/dist/{Radio-CQveGtXr.js → Radio-BnI7bi9Y.js} +2 -2
  52. package/dist/{Radio-DSvkUCxV.cjs → Radio-BqjtCaST.cjs} +1 -1
  53. package/dist/{ReorderList-Bai4yaIG.cjs → ReorderList-DLQ3rVnX.cjs} +1 -1
  54. package/dist/{ReorderList-Be-qicSf.js → ReorderList-DpytAupm.js} +1 -1
  55. package/dist/{Select-swFFQIMN.js → Select-B5t5QtVe.js} +1 -1
  56. package/dist/{Select-ClCyOqQI.cjs → Select-dAYn2iZO.cjs} +1 -1
  57. package/dist/{Shell-B8YmApR6.cjs → Shell-9lzopP-w.cjs} +1 -1
  58. package/dist/{Shell-Dr7LHIqk.js → Shell-B3jhTiNP.js} +99 -96
  59. package/dist/{ShellPanel-I0ZMGQ4K.js → ShellPanel-B3vZcQhX.js} +1 -1
  60. package/dist/{ShellPanel-CnN9orWH.cjs → ShellPanel-ChujN0eX.cjs} +1 -1
  61. package/dist/{SidebarLink-y2If8dtl.js → SidebarLink-B_CGHs0b.js} +1 -1
  62. package/dist/{SidebarLink-CngTvuB6.cjs → SidebarLink-CZrDLC8g.cjs} +1 -1
  63. package/dist/{SidebarMenuItem-DoyuIs3w.cjs → SidebarMenuItem-Dc6oh2Nc.cjs} +1 -1
  64. package/dist/{SidebarMenuItem-DBINoxeA.js → SidebarMenuItem-Dpqr9e0A.js} +1 -1
  65. package/dist/{Skeleton-D8CHd_4p.cjs → Skeleton-DP9iM6Ku.cjs} +1 -1
  66. package/dist/{Skeleton-CC7LVdxd.js → Skeleton-sox6qUDk.js} +1 -1
  67. package/dist/Slider-BNiQaaVa.cjs +1 -0
  68. package/dist/{Slider-lOhGG7UX.js → Slider-C0761rBk.js} +47 -33
  69. package/dist/{StepperStep-w1SSX7t7.cjs → StepperStep-B9JEE6WJ.cjs} +1 -1
  70. package/dist/{StepperStep-DNXUj71b.js → StepperStep-DFeOJ1ju.js} +1 -1
  71. package/dist/{Tabs-W_4iyGVx.js → Tabs-CQP9zwDw.js} +1 -1
  72. package/dist/{Tabs-Clg7lzy5.cjs → Tabs-Dp27EDrK.cjs} +1 -1
  73. package/dist/{TextInput-CGD_wFwo.cjs → TextInput-D4jBlYm9.cjs} +2 -2
  74. package/dist/{TextInput-CxC2HVj6.js → TextInput-DNrd12uS.js} +2 -2
  75. package/dist/{Toast-DueO27yl.cjs → Toast-BBsrCQK8.cjs} +1 -1
  76. package/dist/{Toast-QXobTGZM.js → Toast-cisfK5Zd.js} +1 -1
  77. package/dist/{Toaster-DcA6PJPt.js → Toaster-C1Uyr6O7.js} +1 -1
  78. package/dist/{Toaster-DY8o_iiy.cjs → Toaster-Dz_o--LF.cjs} +1 -1
  79. package/dist/{TreeNode-DS1XJGty.cjs → TreeNode-DB7ipWCg.cjs} +1 -1
  80. package/dist/{TreeNode-BI-Azvhe.js → TreeNode-a0MHLI27.js} +1 -1
  81. package/dist/{Walkthrough-DHtLDsOk.cjs → Walkthrough-YD3YYxxM.cjs} +1 -1
  82. package/dist/{Walkthrough-l7HOZths.js → Walkthrough-qaQ1rved.js} +2 -2
  83. package/dist/all.cjs +1 -1
  84. package/dist/all.mjs +137 -135
  85. package/dist/component-styles.json +1 -1
  86. package/dist/components/AiLabel.cjs +1 -1
  87. package/dist/components/AiLabel.mjs +1 -1
  88. package/dist/components/AiLabel.vue.d.ts.map +1 -1
  89. package/dist/components/Banner.cjs +1 -1
  90. package/dist/components/Banner.mjs +1 -1
  91. package/dist/components/Banner.vue.d.ts.map +1 -1
  92. package/dist/components/BlueprintControls.cjs +1 -1
  93. package/dist/components/BlueprintControls.mjs +1 -1
  94. package/dist/components/BlueprintMinimap.cjs +1 -1
  95. package/dist/components/BlueprintMinimap.mjs +1 -1
  96. package/dist/components/BlueprintMinimap.vue.d.ts.map +1 -1
  97. package/dist/components/Board.vue.d.ts.map +1 -1
  98. package/dist/components/BottomPanel.cjs +1 -1
  99. package/dist/components/BottomPanel.mjs +1 -1
  100. package/dist/components/BottomPanel.vue.d.ts.map +1 -1
  101. package/dist/components/Button.cjs +1 -1
  102. package/dist/components/Button.d.ts +25 -1
  103. package/dist/components/Button.mjs +1 -1
  104. package/dist/components/Button.vue.d.ts +1 -1
  105. package/dist/components/Button.vue.d.ts.map +1 -1
  106. package/dist/components/Calendar.vue.d.ts.map +1 -1
  107. package/dist/components/Card.cjs +1 -1
  108. package/dist/components/Card.mjs +1 -1
  109. package/dist/components/Card.vue.d.ts.map +1 -1
  110. package/dist/components/Checkbox.cjs +1 -1
  111. package/dist/components/Checkbox.mjs +1 -1
  112. package/dist/components/Checkbox.vue.d.ts.map +1 -1
  113. package/dist/components/CheckboxGroup.cjs +1 -1
  114. package/dist/components/CheckboxGroup.mjs +1 -1
  115. package/dist/components/ColorStrip.cjs +1 -1
  116. package/dist/components/ColorStrip.mjs +1 -1
  117. package/dist/components/ColorStrip.vue.d.ts.map +1 -1
  118. package/dist/components/CommandPalette.vue.d.ts.map +1 -1
  119. package/dist/components/Confirm.cjs +1 -1
  120. package/dist/components/Confirm.mjs +1 -1
  121. package/dist/components/Confirm.vue.d.ts +1 -1
  122. package/dist/components/Confirm.vue.d.ts.map +1 -1
  123. package/dist/components/DataTable.cjs +1 -1
  124. package/dist/components/DataTable.mjs +1 -1
  125. package/dist/components/DataTable.vue.d.ts.map +1 -1
  126. package/dist/components/DatePicker.cjs +1 -1
  127. package/dist/components/DatePicker.mjs +1 -1
  128. package/dist/components/DatePicker.vue.d.ts.map +1 -1
  129. package/dist/components/EmptyState.cjs +1 -1
  130. package/dist/components/EmptyState.mjs +1 -1
  131. package/dist/components/EmptyState.vue.d.ts.map +1 -1
  132. package/dist/components/FileUploader.cjs +1 -1
  133. package/dist/components/FileUploader.mjs +1 -1
  134. package/dist/components/FileUploader.vue.d.ts.map +1 -1
  135. package/dist/components/ImageCropper.cjs +1 -1
  136. package/dist/components/ImageCropper.mjs +1 -1
  137. package/dist/components/ImageCropper.vue.d.ts.map +1 -1
  138. package/dist/components/InfoHint.cjs +1 -1
  139. package/dist/components/InfoHint.mjs +1 -1
  140. package/dist/components/InfoHint.vue.d.ts.map +1 -1
  141. package/dist/components/InlineEdit.cjs +1 -1
  142. package/dist/components/InlineEdit.mjs +1 -1
  143. package/dist/components/InlineEdit.vue.d.ts.map +1 -1
  144. package/dist/components/Menu.vue.d.ts.map +1 -1
  145. package/dist/components/MenuItem.vue.d.ts.map +1 -1
  146. package/dist/components/Message.cjs +1 -1
  147. package/dist/components/Message.mjs +1 -1
  148. package/dist/components/Message.vue.d.ts.map +1 -1
  149. package/dist/components/Modal.cjs +1 -1
  150. package/dist/components/Modal.d.ts +39 -0
  151. package/dist/components/Modal.mjs +1 -1
  152. package/dist/components/Modal.vue.d.ts +3 -0
  153. package/dist/components/Modal.vue.d.ts.map +1 -1
  154. package/dist/components/NotificationCenter.cjs +1 -1
  155. package/dist/components/NotificationCenter.mjs +1 -1
  156. package/dist/components/NotificationCenter.vue.d.ts.map +1 -1
  157. package/dist/components/NotificationCenterItem.vue.d.ts.map +1 -1
  158. package/dist/components/NumberInput.cjs +1 -1
  159. package/dist/components/NumberInput.mjs +1 -1
  160. package/dist/components/NumberInput.vue.d.ts.map +1 -1
  161. package/dist/components/Pagination.cjs +1 -1
  162. package/dist/components/Pagination.mjs +1 -1
  163. package/dist/components/Pagination.vue.d.ts.map +1 -1
  164. package/dist/components/Panel.cjs +1 -1
  165. package/dist/components/Panel.mjs +1 -1
  166. package/dist/components/Panel.vue.d.ts.map +1 -1
  167. package/dist/components/ProgressBar.cjs +1 -1
  168. package/dist/components/ProgressBar.mjs +1 -1
  169. package/dist/components/ProgressBar.vue.d.ts.map +1 -1
  170. package/dist/components/Radio.cjs +1 -1
  171. package/dist/components/Radio.mjs +1 -1
  172. package/dist/components/Radio.vue.d.ts.map +1 -1
  173. package/dist/components/ReorderList.cjs +1 -1
  174. package/dist/components/ReorderList.mjs +1 -1
  175. package/dist/components/ReorderList.vue.d.ts.map +1 -1
  176. package/dist/components/Select.cjs +1 -1
  177. package/dist/components/Select.mjs +1 -1
  178. package/dist/components/Select.vue.d.ts.map +1 -1
  179. package/dist/components/Shell.cjs +1 -1
  180. package/dist/components/Shell.mjs +1 -1
  181. package/dist/components/Shell.vue.d.ts.map +1 -1
  182. package/dist/components/ShellPanel.cjs +1 -1
  183. package/dist/components/ShellPanel.mjs +1 -1
  184. package/dist/components/ShellPanel.vue.d.ts.map +1 -1
  185. package/dist/components/SidebarLink.cjs +1 -1
  186. package/dist/components/SidebarLink.mjs +1 -1
  187. package/dist/components/SidebarLink.vue.d.ts.map +1 -1
  188. package/dist/components/SidebarMenuItem.cjs +1 -1
  189. package/dist/components/SidebarMenuItem.mjs +1 -1
  190. package/dist/components/SidebarMenuItem.vue.d.ts.map +1 -1
  191. package/dist/components/Skeleton.cjs +1 -1
  192. package/dist/components/Skeleton.mjs +1 -1
  193. package/dist/components/Skeleton.vue.d.ts.map +1 -1
  194. package/dist/components/Slider.cjs +1 -1
  195. package/dist/components/Slider.d.ts +8 -0
  196. package/dist/components/Slider.mjs +1 -1
  197. package/dist/components/Slider.vue.d.ts +1 -0
  198. package/dist/components/Slider.vue.d.ts.map +1 -1
  199. package/dist/components/StepperStep.cjs +1 -1
  200. package/dist/components/StepperStep.mjs +1 -1
  201. package/dist/components/StepperStep.vue.d.ts.map +1 -1
  202. package/dist/components/Tabs.cjs +1 -1
  203. package/dist/components/Tabs.mjs +1 -1
  204. package/dist/components/Tabs.vue.d.ts.map +1 -1
  205. package/dist/components/TextInput.cjs +1 -1
  206. package/dist/components/TextInput.mjs +1 -1
  207. package/dist/components/TextInput.vue.d.ts.map +1 -1
  208. package/dist/components/Toast.cjs +1 -1
  209. package/dist/components/Toast.mjs +1 -1
  210. package/dist/components/Toast.vue.d.ts.map +1 -1
  211. package/dist/components/Toaster.cjs +1 -1
  212. package/dist/components/Toaster.mjs +1 -1
  213. package/dist/components/TreeNode.cjs +1 -1
  214. package/dist/components/TreeNode.mjs +1 -1
  215. package/dist/components/TreeNode.vue.d.ts.map +1 -1
  216. package/dist/components/UserMenu.vue.d.ts.map +1 -1
  217. package/dist/components/Walkthrough.cjs +1 -1
  218. package/dist/components/Walkthrough.mjs +1 -1
  219. package/dist/components/Walkthrough.vue.d.ts.map +1 -1
  220. package/dist/composables/useAppearance.composable.cjs +1 -0
  221. package/dist/composables/useAppearance.composable.d.ts +131 -0
  222. package/dist/composables/useAppearance.composable.d.ts.map +1 -0
  223. package/dist/composables/useAppearance.composable.mjs +65 -0
  224. package/dist/composables/useConfirm.composable.cjs +1 -1
  225. package/dist/composables/useConfirm.composable.mjs +2 -1
  226. package/dist/composables/useFocusTrap.composable.cjs +1 -0
  227. package/dist/composables/useFocusTrap.composable.d.ts +91 -0
  228. package/dist/composables/useFocusTrap.composable.d.ts.map +1 -0
  229. package/dist/composables/useFocusTrap.composable.mjs +98 -0
  230. package/dist/composables/useNamedTheme.composable.cjs +1 -0
  231. package/dist/composables/useNamedTheme.composable.d.ts +98 -0
  232. package/dist/composables/useNamedTheme.composable.d.ts.map +1 -0
  233. package/dist/composables/useNamedTheme.composable.mjs +68 -0
  234. package/dist/index.cjs +1 -1
  235. package/dist/index.mjs +44 -42
  236. package/dist/main.d.ts +4 -0
  237. package/dist/main.d.ts.map +1 -1
  238. package/dist/plugins/vite/index.d.ts.map +1 -1
  239. package/dist/plugins/vite/index.js +59 -0
  240. package/dist/styles/AiLabel.css +1 -1
  241. package/dist/styles/Banner.css +1 -1
  242. package/dist/styles/BlueprintMinimap.css +1 -1
  243. package/dist/styles/Board.css +1 -1
  244. package/dist/styles/BottomPanel.css +1 -1
  245. package/dist/styles/Button.css +1 -1
  246. package/dist/styles/Calendar.css +1 -1
  247. package/dist/styles/Card.css +1 -1
  248. package/dist/styles/Checkbox.css +1 -1
  249. package/dist/styles/ColorStrip.css +1 -1
  250. package/dist/styles/CommandPalette.css +1 -1
  251. package/dist/styles/Confirm.css +1 -1
  252. package/dist/styles/DataTable.css +1 -1
  253. package/dist/styles/DatePicker.css +1 -1
  254. package/dist/styles/EmptyState.css +1 -1
  255. package/dist/styles/FileUploader.css +1 -1
  256. package/dist/styles/ImageCropper.css +1 -1
  257. package/dist/styles/InfoHint.css +1 -1
  258. package/dist/styles/InlineEdit.css +1 -1
  259. package/dist/styles/Menu.css +1 -1
  260. package/dist/styles/MenuItem.css +1 -1
  261. package/dist/styles/Message.css +1 -1
  262. package/dist/styles/Modal.css +1 -1
  263. package/dist/styles/NotificationCenter.css +1 -1
  264. package/dist/styles/NotificationCenterItem.css +1 -1
  265. package/dist/styles/NumberInput.css +1 -1
  266. package/dist/styles/Pagination.css +1 -1
  267. package/dist/styles/Panel.css +1 -1
  268. package/dist/styles/ProgressBar.css +1 -1
  269. package/dist/styles/Radio.css +1 -1
  270. package/dist/styles/ReorderList.css +1 -1
  271. package/dist/styles/Select.css +1 -1
  272. package/dist/styles/Shell.css +1 -1
  273. package/dist/styles/ShellPanel.css +1 -1
  274. package/dist/styles/SidebarLink.css +1 -1
  275. package/dist/styles/SidebarMenuItem.css +1 -1
  276. package/dist/styles/Skeleton.css +1 -1
  277. package/dist/styles/Slider.css +1 -1
  278. package/dist/styles/StepperStep.css +1 -1
  279. package/dist/styles/Tabs.css +1 -1
  280. package/dist/styles/TextInput.css +1 -1
  281. package/dist/styles/Toast.css +1 -1
  282. package/dist/styles/TreeNode.css +1 -1
  283. package/dist/styles/UserMenu.css +1 -1
  284. package/dist/styles/Walkthrough.css +1 -1
  285. package/dist/ui.css +45 -45
  286. package/package.json +7 -4
  287. package/src/plugins/vite/index.ts +62 -0
  288. package/src/styles/_appearance.scss +144 -0
  289. package/src/styles/_theme-api.scss +193 -0
  290. package/src/styles/_theme.scss +91 -5
  291. package/src/styles/index.scss +8 -0
  292. package/src/styles/logic/_radius.scss +146 -0
  293. package/src/styles/logic/index.scss +1 -0
  294. package/src/styles/presets/_classic-fields.scss +55 -0
  295. package/dist/Button-Dqtcr4i0.cjs +0 -1
  296. package/dist/ColorStrip-CAcR1O_R.cjs +0 -1
  297. package/dist/Confirm-CW160zEF.cjs +0 -1
  298. package/dist/Modal-8lgeNWj8.cjs +0 -1
  299. package/dist/Modal-iN94HtKE.js +0 -156
  300. package/dist/Slider-CxrK7cAU.cjs +0 -1
@@ -0,0 +1,146 @@
1
+ /// Concentric corner geometry.
2
+ ///
3
+ /// Two nested rounded boxes only look like one object if their corners are
4
+ /// concentric: the inner arc has to be the outer arc moved inwards by the
5
+ /// distance between them. The rule is
6
+ ///
7
+ /// inner = max(0, outer - inset)
8
+ ///
9
+ /// where `inset` is the real distance between the two boundaries. Give both
10
+ /// boxes the same radius and the inner corner looks too round; give the inner
11
+ /// box an unrelated smaller value and the two arcs run at different centres
12
+ /// and the gap between them visibly pinches at the corner.
13
+ ///
14
+ /// ## How the context travels
15
+ ///
16
+ /// A surface that draws a corner publishes it as `--nb-radius-context`. Custom
17
+ /// properties inherit, so any descendant can read the corner of the nearest
18
+ /// enclosing surface without knowing how deep it is or what is in between.
19
+ ///
20
+ /// An inset surface then derives from that context, passing the distance from
21
+ /// the enclosing surface's border-box edge to its own border-box edge. That
22
+ /// distance is a fact the inner component's own stylesheet already knows,
23
+ /// because it is the enclosing surface's padding plus its border, which is
24
+ /// exactly what the layout is built from. Nothing is measured at runtime and
25
+ /// no layout is read back, so this costs nothing and cannot desynchronise.
26
+ ///
27
+ /// ## What does *not* derive
28
+ ///
29
+ /// DOM nesting alone does not establish a geometric relationship. A button in
30
+ /// the middle of a panel is not an inset boundary of it: it does not follow
31
+ /// the panel's corners, and its radius should not shrink because someone put
32
+ /// it inside something round. Standalone controls use `standalone()` and take
33
+ /// their own semantic role.
34
+ ///
35
+ /// Only elements whose edges actually run parallel to the enclosing surface's
36
+ /// edges, at a uniform distance, use `inset()`.
37
+ ///
38
+ /// @group @nubisco/radius
39
+
40
+ /// Declares an element as a surface with its own corner, and publishes that
41
+ /// corner to its descendants.
42
+ ///
43
+ /// @param {String} $role - a semantic role: control, popover, panel, modal
44
+ /// @param {String} $radius [null] - an explicit value, for the rare surface
45
+ /// whose corner is not one of the roles
46
+ @mixin surface($role: null, $radius: null) {
47
+ @if $radius {
48
+ border-radius: #{$radius};
49
+ --nb-radius-context: #{$radius};
50
+ } @else {
51
+ border-radius: var(--nb-radius-#{$role});
52
+ --nb-radius-context: var(--nb-radius-#{$role});
53
+ }
54
+ }
55
+
56
+ /// Derives this element's corner from the enclosing surface's.
57
+ ///
58
+ /// `$inset` is the distance from the enclosing surface's border-box edge to
59
+ /// this element's border-box edge: its padding plus its border width. Pass the
60
+ /// same expression the layout uses, so the two cannot drift apart.
61
+ ///
62
+ /// `max()` floors the result at zero, which is what CSS wants anyway and what
63
+ /// keeps a deeply inset surface from trying to go negative.
64
+ ///
65
+ /// The result is also written to `--nb-radius-self`, which is what
66
+ /// `publish-inner()` republishes one level down. This mixin deliberately does
67
+ /// NOT write `--nb-radius-context` itself: a custom property that reads the
68
+ /// same name it declares is self-referential, which CSS treats as invalid at
69
+ /// computed-value time, and the whole chain silently collapses to zero. That
70
+ /// is not a theoretical hazard, it is the bug the first version of this file
71
+ /// shipped with.
72
+ ///
73
+ /// @param {String} $inset - distance between the two boundaries
74
+ @mixin inset($inset) {
75
+ --nb-radius-self: max(0px, calc(var(--nb-radius-context, 0px) - #{$inset}));
76
+
77
+ border-radius: var(--nb-radius-self);
78
+ }
79
+
80
+ /// Republishes a derived corner as the context for the next level down.
81
+ ///
82
+ /// Goes on an element that does not itself derive: a component's inner content
83
+ /// wrapper, typically. Because that element declares `--nb-radius-context` but
84
+ /// never declares `--nb-radius-self`, there is no cycle, and concentric
85
+ /// geometry composes to any depth.
86
+ ///
87
+ /// ```scss
88
+ /// .card { @include radius.surface(panel); }
89
+ /// .card__media { @include radius.inset(16px); }
90
+ /// .card__body { @include radius.publish-inner(); }
91
+ /// ```
92
+ @mixin publish-inner {
93
+ --nb-radius-context: var(--nb-radius-self, 0px);
94
+ }
95
+
96
+ /// The two-axis form, for an inset that differs horizontally and vertically.
97
+ ///
98
+ /// A padded card whose image bleeds to the left and right edges but not to the
99
+ /// top and bottom is inset by zero on one axis and by the padding on the
100
+ /// other, and a single radius cannot describe that. CSS takes the two axes
101
+ /// either side of a slash.
102
+ ///
103
+ /// @param {String} $inset-x - horizontal distance between the boundaries
104
+ /// @param {String} $inset-y - vertical distance between the boundaries
105
+ @mixin inset-xy($inset-x, $inset-y) {
106
+ --nb-radius-self-x: max(
107
+ 0px,
108
+ calc(var(--nb-radius-context, 0px) - #{$inset-x})
109
+ );
110
+ --nb-radius-self-y: max(
111
+ 0px,
112
+ calc(var(--nb-radius-context, 0px) - #{$inset-y})
113
+ );
114
+
115
+ border-radius: var(--nb-radius-self-x) / var(--nb-radius-self-y);
116
+ }
117
+
118
+ /// A control that lives inside a surface without following its corners.
119
+ ///
120
+ /// Takes its own semantic role and stops the context there, so that anything
121
+ /// nested inside the control derives from the control rather than from the
122
+ /// panel two levels up.
123
+ ///
124
+ /// @param {String} $role - a semantic role: control, popover, panel, modal
125
+ @mixin standalone($role: control) {
126
+ border-radius: var(--nb-radius-#{$role});
127
+ --nb-radius-context: var(--nb-radius-#{$role});
128
+ }
129
+
130
+ /// Geometry that never follows the appearance setting.
131
+ ///
132
+ /// Avatars, radios and status dots are round because of what they are, not
133
+ /// because of a style preference, and a switch track is a track at any
134
+ /// appearance. This exists so those cases read as deliberate in the source
135
+ /// rather than looking like values someone forgot to tokenise.
136
+ @mixin circular {
137
+ border-radius: var(--nb-radius-circle);
138
+ // A circle is not a corner anything can be concentric with, and a child
139
+ // deriving from 50% would get a meaningless percentage of its own box.
140
+ --nb-radius-context: 0px;
141
+ }
142
+
143
+ @mixin pill {
144
+ border-radius: var(--nb-radius-pill);
145
+ --nb-radius-context: 0px;
146
+ }
@@ -1,2 +1,3 @@
1
1
  @forward 'a11y';
2
2
  @forward 'tints';
3
+ @forward 'radius';
@@ -0,0 +1,55 @@
1
+ /// The pre-4.2 field treatment, as an opt-out.
2
+ ///
3
+ /// The library's default field fill changed: the enabled state used to be
4
+ /// `#cacbcc` in the light theme, a mid grey darker than every surface it sat
5
+ /// on, which is what most interfaces use to mean "unavailable". Enabled was
6
+ /// wearing the disabled state's clothes, and `disabled` on top of it was only
7
+ /// a `0.45` opacity, so the two differed in brightness rather than in kind.
8
+ ///
9
+ /// The new default lightens the enabled fill and gives disabled and read-only
10
+ /// their own boundary contrast. **Geometry is identical**: still a filled box
11
+ /// with a single bottom rule, still square, same height, padding and
12
+ /// alignment. Corner rounding is a separate, global concern and is not
13
+ /// something a field treatment decides.
14
+ ///
15
+ /// This preset exists for an application that has calibrated screenshots,
16
+ /// visual regression baselines or printed material against the old fills and
17
+ /// wants to move on its own schedule:
18
+ ///
19
+ /// ```html
20
+ /// <html data-nb-preset="classic-fields">
21
+ /// ```
22
+ ///
23
+ /// It can also be scoped to a subtree. It restores fills and boundary
24
+ /// contrast only, so it composes with the appearance setting exactly as the
25
+ /// default does.
26
+ ///
27
+ /// @group @nubisco/presets
28
+
29
+ @use '../variables/layers';
30
+
31
+ @mixin classic-fields {
32
+ [data-nb-preset='classic-fields'] {
33
+ --nb-c-field-bg: #{layers.token(layers.$light, field-bg)};
34
+ --nb-c-field-border: #{layers.token(layers.$light, field-border)};
35
+ // The old treatment had no separate disabled or read-only values: both
36
+ // fell back to the enabled ones and leaned on opacity alone.
37
+ --nb-c-field-bg-disabled: #{layers.token(layers.$light, field-bg)};
38
+ --nb-c-field-border-disabled: #{layers.token(layers.$light, field-border)};
39
+ --nb-c-field-border-readonly: #{layers.token(layers.$light, field-border)};
40
+ }
41
+
42
+ /*
43
+ * Two selectors because the theme class and the preset attribute can land on
44
+ * the same element or on different ones, and a compound `.dark[data-...]`
45
+ * alone would miss the nested case.
46
+ */
47
+ .dark[data-nb-preset='classic-fields'],
48
+ .dark [data-nb-preset='classic-fields'] {
49
+ --nb-c-field-bg: #{layers.token(layers.$dark, field-bg)};
50
+ --nb-c-field-border: #{layers.token(layers.$dark, field-border)};
51
+ --nb-c-field-bg-disabled: #{layers.token(layers.$dark, field-bg)};
52
+ --nb-c-field-border-disabled: #{layers.token(layers.$dark, field-border)};
53
+ --nb-c-field-border-readonly: #{layers.token(layers.$dark, field-border)};
54
+ }
55
+ }
@@ -1 +0,0 @@
1
- require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-tagjRzOz.cjs`),t=require(`./Size.d-GBIblj2D.cjs`),n=require(`./Icon-C8R_r_In.cjs`),r=require(`./composables/useRouterLink.composable.cjs`);let i=require(`vue`);var a=function(e){return e.Button=`button`,e.Submit=`submit`,e.Reset=`reset`,e}(a||{}),o={key:0,class:`nb-button__decorations`},s={key:0,class:`nb-button__spinner`,"aria-hidden":`true`},c=(0,i.defineComponent)({__name:`Button`,props:{variant:{default:void 0},outlined:{type:Boolean,default:!1},size:{default:t.t.Medium},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},icon:{default:void 0},type:{default:a.Button},href:{default:void 0},target:{default:void 0},rel:{default:void 0},to:{default:void 0}},emits:[`click`],setup(e){let t=e,a=(0,i.useSlots)(),c=(0,i.computed)(()=>!a.default&&!!(t.icon||t.loading)),l=r.useRouterLink(),u=(0,i.computed)(()=>t.to!=null&&!!l.value),d=(0,i.computed)(()=>{if(typeof t.to==`string`)return t.to;if(t.href)return t.href}),f=(0,i.computed)(()=>u.value?l.value:d.value?`a`:`button`),p=(0,i.computed)(()=>f.value===`a`?{href:d.value,target:t.target,rel:t.rel}:{}),m={xxs:10,xs:12,sm:12,md:14,lg:16,xl:16,xxl:20},h=(0,i.computed)(()=>m[t.size??`md`]??14);return(t,r)=>((0,i.openBlock)(),(0,i.createBlock)((0,i.resolveDynamicComponent)(f.value),(0,i.mergeProps)({class:[`nb-button`,`nb-button--${e.variant}`,`nb-button--${e.size}`,{"nb-button--outlined":e.outlined},{"nb-button--loading":e.loading},{"nb-button--icon-only":c.value}],to:u.value?e.to:void 0},p.value,{disabled:f.value===`button`?e.disabled||e.loading:void 0,"aria-disabled":f.value!==`button`&&(e.disabled||e.loading)?!0:void 0,type:f.value===`button`?e.type:void 0,onClick:r[0]||=n=>e.disabled||e.loading?void 0:t.$emit(`click`,n)}),{default:(0,i.withCtx)(()=>[(0,i.renderSlot)(t.$slots,`default`,{},void 0,!0),e.loading||e.icon?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,o,[e.loading?((0,i.openBlock)(),(0,i.createElementBlock)(`span`,s)):e.icon?((0,i.openBlock)(),(0,i.createBlock)(n.t,{key:1,name:e.icon,size:h.value,class:`nb-button__icon`},null,8,[`name`,`size`])):(0,i.createCommentVNode)(``,!0)])):(0,i.createCommentVNode)(``,!0)]),_:3},16,[`class`,`to`,`disabled`,`aria-disabled`,`type`]))}}),l=e.t(c,[[`__scopeId`,`data-v-fc827929`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return l}});
@@ -1 +0,0 @@
1
- const e=require(`./chunk-D-qHiVGv.cjs`),t=require(`./_plugin-vue_export-helper-tagjRzOz.cjs`),n=require(`./Icon-C8R_r_In.cjs`),r=require(`./Label-CXejhF9x.cjs`),i=require(`./Grid-DVT8lBHr.cjs`);let a=require(`vue`),o=require(`@nubisco/ui/icons/empty`);o=e.n(o);var s={key:1,class:`nb-color-strip-wrapper__inner-header`},c={key:1,class:`nb-color-strip-wrapper__inner-label`},l=30,u=8,d=(0,a.defineComponent)({__name:`ColorStrip`,props:(0,a.mergeModels)({options:{default:()=>[`#DCDCDC`,`#C0C0C0`,`#808080`]},onlyView:{type:Boolean,default:!1},allowMultiple:{type:Boolean,default:!1},wrap:{type:Boolean,default:!1},showNull:{type:Boolean,default:!1},variant:{default:`default`},id:{default:void 0},label:{default:void 0}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,d=`nb-color-strip-${(0,a.useId)()}`,f=(0,a.computed)(()=>t.id??d),p=(0,a.useModel)(e,`modelValue`,{set:e=>e}),m=(0,a.computed)(()=>t.options.map(e=>typeof e==`string`?{value:e,color:e}:{...e,color:e.color||`#FFFFFF`,value:e.value===void 0?e.color:e.value})),h={id:`null-option`,value:null,color:`transparent`,label:`None`},g=(0,a.ref)(p.value==null);(0,a.watch)(()=>p.value,e=>{e??(g.value=!0)});let _=(0,a.computed)(()=>t.allowMultiple?!1:t.showNull||g.value),v=(0,a.computed)(()=>_.value?[h,...m.value]:m.value),y=(0,a.computed)(()=>{if(!t.wrap)return{maxWidth:`none`,flexWrap:`nowrap`};let e=v.value.length;if(e<=0)return;let n=Math.ceil(Math.sqrt(e));return{maxWidth:`${n*l+(n-1)*u}px`,flexWrap:`wrap`}}),b=(0,a.computed)(()=>({"nb-color-strip":!0,"only-view":t.onlyView})),x=e=>t.onlyView?!1:e===null?p.value==null:e===void 0?!1:t.allowMultiple?Array.isArray(p.value)&&p.value.includes(e):p.value===e,S=e=>({"nb-color-strip-color":!0,"nb-color-strip-color-null":w(e),selected:!t.onlyView&&x(e.value)}),C=e=>{if(!w(e))return{backgroundColor:e.color}},w=e=>e.id===`null-option`,T=e=>x(e.value)?`duotone`:`regular`,E=e=>{if(e!==void 0){if(!t.allowMultiple&&e===null){p.value=null;return}if(t.allowMultiple){let t=Array.isArray(p.value)?p.value.slice():[],n=t.indexOf(e);n===-1?t.push(e):t.splice(n,1),p.value=t}else p.value=e}};function D(e){let t=typeof e==`string`?e:e.color,{r:n,g:r,b:i}=O((t&&t.startsWith(`var(`)?getComputedStyle(document.documentElement).getPropertyValue(t.slice(4,-1).trim()).trim():t)||`#FFFFFF`);return(.299*n+.587*r+.114*i)/255>.5?`black`:`white`}function O(e){let t=e.replace(`#`,``);t.length===3&&(t=t.split(``).map(e=>e+e).join(``));let n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255}}return(t,l)=>((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{class:(0,a.normalizeClass)([`nb-color-strip-wrapper`,`nb-color-strip-wrapper--${e.variant}`])},[e.variant===`default`?((0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,{key:0},[t.$slots.label?(0,a.renderSlot)(t.$slots,`label`,{key:0},void 0,!0):e.label?((0,a.openBlock)(),(0,a.createBlock)(r.t,{key:1,for:f.value,disabled:!1},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.label),1)]),_:1},8,[`for`])):(0,a.createCommentVNode)(``,!0)],64)):(0,a.createCommentVNode)(``,!0),e.variant===`fluid`&&(e.label||t.$slots.label)?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,s,[t.$slots.label?(0,a.renderSlot)(t.$slots,`label`,{key:0},void 0,!0):((0,a.openBlock)(),(0,a.createElementBlock)(`label`,c,(0,a.toDisplayString)(e.label),1))])):(0,a.createCommentVNode)(``,!0),(0,a.createVNode)(i.t,{id:f.value,dir:`row`,gap:`xs`,class:(0,a.normalizeClass)(b.value),shrink:!1,style:(0,a.normalizeStyle)(y.value)},{default:(0,a.withCtx)(()=>[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(v.value,t=>((0,a.openBlock)(),(0,a.createBlock)(i.t,{is:`button`,key:`option-${t.id||t.value}`,align:`center`,justify:`center`,class:(0,a.normalizeClass)(S(t)),style:(0,a.normalizeStyle)(C(t)),disabled:t.disabled,onClick:n=>!e.onlyView&&E(t.value)},{default:(0,a.withCtx)(()=>[!e.onlyView&&x(t.value)&&!w(t)?((0,a.openBlock)(),(0,a.createBlock)(n.t,{key:0,name:`check-light`,color:D(t)},null,8,[`color`])):(0,a.createCommentVNode)(``,!0),w(t)?((0,a.openBlock)(),(0,a.createBlock)(n.t,{key:1,name:o,weight:T(t)},null,8,[`weight`])):(0,a.createCommentVNode)(``,!0)]),_:2},1032,[`class`,`style`,`disabled`,`onClick`]))),128))]),_:1},8,[`id`,`class`,`style`])],2))}}),f=t.t(d,[[`__scopeId`,`data-v-5c562edf`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return f}});
@@ -1 +0,0 @@
1
- require(`./chunk-D-qHiVGv.cjs`);const e=require(`./composables/useReducedMotion.composable.cjs`),t=require(`./_plugin-vue_export-helper-tagjRzOz.cjs`),n=require(`./Icon-C8R_r_In.cjs`),r=require(`./Button-Dqtcr4i0.cjs`),i=require(`./Message-Daj6hLC4.cjs`),a=require(`./Modal-8lgeNWj8.cjs`),ee=require(`./TextInput-CGD_wFwo.cjs`);let o=require(`vue`),s=require(`@nubisco/ui/icons/warning`),c=require(`@nubisco/ui/icons/check`);var l=200,u=[`[data-nb-confirm-floating]`,`.nb-select__dropdown`,`.nb-menu`,`.nb-date-picker__calendar`,`.nb-user-menu__panel`,`.nb-sidebar-menu-item__flyout`],d=new Set;function f(e){let t=e.trim();return t?(d.add(t),()=>{d.delete(t)}):()=>{}}function p(e=[]){return[...u,...d,...e].map(e=>e.trim()).filter(Boolean).join(`,`)}function m(e,t){if(!e)return;let n=`${t?0:200}ms`;e.style.transitionDuration=n;let r=e.parentElement;r instanceof HTMLElement&&(r.style.transitionDuration=n)}var h={key:0,class:`nb-confirm__message`},te={key:0,class:`nb-confirm__subject-kind`},ne={class:`nb-confirm__subject-name`},g={key:1,class:`nb-confirm__gate`},_={class:`nb-confirm__live`},re={key:0,class:`nb-confirm__status`,role:`status`},ie={key:1,class:`nb-confirm__status nb-confirm__status--success`,role:`status`},v=(0,o.defineComponent)({__name:`Confirm`,props:{open:{type:Boolean,default:!1},title:{},message:{default:void 0},subject:{default:void 0},subjectLabel:{default:void 0},confirmLabel:{default:`Confirm`},cancelLabel:{default:`Cancel`},tone:{default:`danger`},typeToConfirm:{default:void 0},typeToConfirmLabel:{default:void 0},typeToConfirmHelper:{default:void 0},busy:{type:Boolean,default:!1},busyLabel:{default:`Working...`},succeeded:{type:Boolean,default:!1},successLabel:{default:void 0},error:{default:void 0},size:{default:`sm`},floatingSelectors:{default:()=>[]},contentClass:{default:void 0}},emits:[`confirm`,`cancel`],setup(t,{expose:l,emit:u}){let d=t,f=u,v=(0,o.useId)(),y=`nb-confirm-title-${v}`,b=`nb-confirm-body-${v}`,x=(0,o.useSlots)(),S=(0,o.ref)(null),C=(0,o.ref)(null),w=(0,o.ref)(null),T=(0,o.ref)(``),E=e.useReducedMotion(),D=(0,o.computed)(()=>d.busy||d.succeeded);function O(){return!!d.message||!!d.subject||!!x.default}let k=(0,o.computed)(()=>d.tone===`danger`?`danger`:`primary`),A=(0,o.computed)(()=>d.typeToConfirmLabel??`Type ${d.typeToConfirm} to confirm`),j=(0,o.computed)(()=>!d.typeToConfirm||T.value.trim()===d.typeToConfirm),M=(0,o.computed)(()=>j.value&&!D.value);function N(){M.value&&f(`confirm`)}function P(){let e=w.value?.$el;return e instanceof HTMLElement?e:null}function F(){return S.value?.closest(`[role="dialog"],[role="alertdialog"]`)??null}function ae(){return typeof document>`u`?[]:Array.from(document.querySelectorAll(`[aria-modal="true"]`))}function I(){let e=F();if(!e)return!1;let t=ae();return t.length===0||t[t.length-1]===e}let L=[`a[href]:not([tabindex="-1"])`,`area[href]:not([tabindex="-1"])`,`button:not([disabled]):not([tabindex="-1"])`,`input:not([disabled]):not([type="hidden"]):not([tabindex="-1"])`,`select:not([disabled]):not([tabindex="-1"])`,`textarea:not([disabled]):not([tabindex="-1"])`,`summary:not([tabindex="-1"])`,`audio[controls]:not([tabindex="-1"])`,`video[controls]:not([tabindex="-1"])`,`iframe:not([tabindex="-1"])`,`[contenteditable]:not([contenteditable="false"]):not([tabindex="-1"])`,`[tabindex]:not([tabindex="-1"])`].map(e=>`${e}:not([hidden]):not([aria-hidden="true"])`).join(`,`);function R(){return p(d.floatingSelectors)}function z(e){return e instanceof Element?!!e.closest(R()):!1}function B(e){let t=F();return!!t&&!!e&&t.contains(e)}function V(){let e=F();return e?Array.from(e.querySelectorAll(L)).filter(e=>e.getAttribute(`aria-disabled`)!==`true`):[]}function H(){let e=F();return e?(e.focus(),!0):!1}function U(){let e=V()[0];e?e.focus():H()}let W=null;function G(){let e=W;W=null,e?.isConnected&&e.focus()}function K(){m(F(),E.value)}(0,o.watch)(E,()=>{d.open&&K()}),(0,o.watch)(()=>[d.busy,d.error],async(e,t)=>{if(!d.open)return;let[n,r]=e,i=t?.[0]??!1;if(await(0,o.nextTick)(),n){V().length===0&&H();return}if(i&&r){let e=C.value;e?e.focus():U();return}let a=document.activeElement;!B(a)&&!z(a)&&U()}),(0,o.watch)(()=>d.open,async e=>{e?(W=document.activeElement instanceof HTMLElement?document.activeElement:null,T.value=``,await(0,o.nextTick)(),K(),P()?P()?.focus():H()):G()},{immediate:!0});function q(){D.value||f(`cancel`)}let J=!1,Y=!1;function X(e){let t=e.target;J=B(t)||z(t)}function Z(e){Y=B(e.target)}function oe(){let e=J&&!Y;J=!1,!e&&q()}function Q(e){if(!d.open||z(document.activeElement))return;if(e.key===`Escape`){if(!I())return;e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),q();return}if(e.key!==`Tab`||!I())return;let t=V();if(t.length===0){e.preventDefault(),B(document.activeElement)||H();return}let n=t[0],r=t[t.length-1],i=document.activeElement;e.shiftKey&&(i===n||!B(i))?(e.preventDefault(),r.focus()):!e.shiftKey&&i===r?(e.preventDefault(),n.focus()):B(i)||(e.preventDefault(),n.focus())}function $(e){if(!d.open)return;let t=e.relatedTarget;if(t instanceof Element){if(B(t)||z(t))return}else if(t!==null)return;requestAnimationFrame(()=>{if(!d.open)return;let e=document.activeElement;B(e)||z(e)||e&&e!==document.body&&!e.isConnected||I()&&U()})}return typeof document<`u`&&(document.addEventListener(`keydown`,Q,!0),document.addEventListener(`focusout`,$,!0),document.addEventListener(`mousedown`,X,!0),document.addEventListener(`touchstart`,X,!0),document.addEventListener(`click`,Z,!0)),(0,o.onMounted)(()=>{d.open&&(K(),P()?P()?.focus():H())}),(0,o.onUnmounted)(()=>{typeof document<`u`&&(document.removeEventListener(`keydown`,Q,!0),document.removeEventListener(`focusout`,$,!0),document.removeEventListener(`mousedown`,X,!0),document.removeEventListener(`touchstart`,X,!0),document.removeEventListener(`click`,Z,!0)),G()}),l({focusCancel:()=>P()?.focus(),restoreFocus:G,isTopmost:I}),(e,l)=>((0,o.openBlock)(),(0,o.createBlock)(a.t,{open:t.open,size:t.size,role:t.tone===`danger`?`alertdialog`:`dialog`,"labelled-by":y,"described-by":O()?b:void 0,busy:t.busy,"close-on-overlay":!D.value,"close-disabled":D.value,"close-on-escape":!1,onClose:oe},{header:(0,o.withCtx)(()=>[(0,o.createElementVNode)(`span`,{id:y,class:(0,o.normalizeClass)([`nb-confirm__heading`,`nb-confirm__heading--${t.tone}`])},[t.tone===`danger`?((0,o.openBlock)(),(0,o.createBlock)(n.t,{key:0,name:(0,o.unref)(s.regular),size:16,"aria-hidden":`true`},null,8,[`name`])):(0,o.createCommentVNode)(``,!0),(0,o.createElementVNode)(`span`,null,(0,o.toDisplayString)(t.title),1)],2)]),footer:(0,o.withCtx)(()=>[(0,o.createVNode)(r.t,{ref_key:`cancelRef`,ref:w,class:`nb-confirm__action nb-confirm__action--cancel`,variant:`ghost`,size:`lg`,disabled:D.value,"data-nb-confirm":`cancel`,onClick:q},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(t.cancelLabel),1)]),_:1},8,[`disabled`]),(0,o.createVNode)(r.t,{class:`nb-confirm__action nb-confirm__action--confirm`,variant:k.value,size:`lg`,disabled:!M.value,loading:t.busy,"data-nb-confirm":`confirm`,onClick:N},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(t.confirmLabel),1)]),_:1},8,[`variant`,`disabled`,`loading`])]),default:(0,o.withCtx)(()=>[(0,o.createElementVNode)(`div`,{ref_key:`rootRef`,ref:S,class:(0,o.normalizeClass)([`nb-confirm`,t.contentClass])},[O()?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{key:0,id:b,class:`nb-confirm__body`},[(0,o.renderSlot)(e.$slots,`default`,{},()=>[t.message?((0,o.openBlock)(),(0,o.createElementBlock)(`p`,h,(0,o.toDisplayString)(t.message),1)):(0,o.createCommentVNode)(``,!0)],!0),t.subject?((0,o.openBlock)(),(0,o.createElementBlock)(`p`,{key:0,class:(0,o.normalizeClass)([`nb-confirm__subject`,`nb-confirm__subject--${t.tone}`])},[t.subjectLabel?((0,o.openBlock)(),(0,o.createElementBlock)(`span`,te,(0,o.toDisplayString)(t.subjectLabel),1)):(0,o.createCommentVNode)(``,!0),(0,o.createElementVNode)(`span`,ne,(0,o.toDisplayString)(t.subject),1)],2)):(0,o.createCommentVNode)(``,!0)])):(0,o.createCommentVNode)(``,!0),t.typeToConfirm?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,g,[(0,o.createVNode)(ee.t,{modelValue:T.value,"onUpdate:modelValue":l[0]||=e=>T.value=e,class:`nb-confirm__gate-field`,label:A.value,helper:t.typeToConfirmHelper,disabled:D.value,autocomplete:`off`,spellcheck:`false`,"data-nb-confirm":`gate`,onKeydown:l[1]||=(0,o.withKeys)((0,o.withModifiers)(()=>{},[`prevent`]),[`enter`])},null,8,[`modelValue`,`label`,`helper`,`disabled`])])):(0,o.createCommentVNode)(``,!0),(0,o.createElementVNode)(`div`,_,[t.busy?((0,o.openBlock)(),(0,o.createElementBlock)(`p`,re,(0,o.toDisplayString)(t.busyLabel),1)):(0,o.createCommentVNode)(``,!0),t.succeeded&&t.successLabel?((0,o.openBlock)(),(0,o.createElementBlock)(`p`,ie,[(0,o.createVNode)(n.t,{name:(0,o.unref)(c.regular),size:14,"aria-hidden":`true`},null,8,[`name`]),(0,o.createElementVNode)(`span`,null,(0,o.toDisplayString)(t.successLabel),1)])):(0,o.createCommentVNode)(``,!0),t.error?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{key:2,ref_key:`errorRef`,ref:C,class:`nb-confirm__error`,tabindex:`-1`},[(0,o.createVNode)(i.t,{variant:`error`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(t.error),1)]),_:1})],512)):(0,o.createCommentVNode)(``,!0)])],2)]),_:3},8,[`open`,`size`,`role`,`described-by`,`busy`,`close-on-overlay`,`close-disabled`]))}}),y=t.t(v,[[`__scopeId`,`data-v-828ae71d`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return y}});
@@ -1 +0,0 @@
1
- require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-tagjRzOz.cjs`),t=require(`./Size.d-GBIblj2D.cjs`),n=require(`./Icon-C8R_r_In.cjs`),r=require(`./composables/useSurfaceLayer.composable.cjs`),i=require(`./Grid-DVT8lBHr.cjs`),a=require(`./composables/useScrollLock.composable.cjs`);let o=require(`vue`),s=require(`@nubisco/ui/icons/x`);var c=[`role`,`aria-labelledby`,`aria-describedby`,`aria-busy`],l={key:0,class:`nb-modal--header`},u=[`disabled`,`aria-disabled`],d=[`tabindex`,`role`,`aria-labelledby`],f=(0,o.defineComponent)({__name:`Modal`,props:{open:{type:Boolean,default:!1},title:{default:void 0},size:{default:t.r.Medium},closeOnOverlay:{type:Boolean,default:!0},role:{default:`dialog`},labelledBy:{default:void 0},describedBy:{default:void 0},busy:{type:Boolean,default:!1},closeDisabled:{type:Boolean,default:!1},closeOnEscape:{type:Boolean,default:!0}},emits:[`close`],setup(e,{expose:t,emit:f}){let p=e,m=f,h=(0,o.useSlots)(),g=(0,o.computed)(()=>!!h.header||!!p.title),_=`nb-modal-title-${(0,o.useId)()}`,v=(0,o.ref)(null),y=(0,o.ref)(null),{layerProps:b}=r.useSurfaceLayer({overlay:!0});function x(){p.closeOnOverlay&&m(`close`)}let S=!1;function C(){S||(S=!0,a.acquireScrollLock())}function w(){S&&(S=!1,a.releaseScrollLock())}let T=(0,o.ref)(!1);function E(){let e=y.value;if(!e)return;let t=e.scrollHeight-e.clientHeight;!T.value&&t>4?T.value=!0:T.value&&t<=0&&(T.value=!1)}let D=null,O=null;function k(){let e=y.value;e&&(A(),typeof ResizeObserver<`u`&&(D=new ResizeObserver(()=>E()),D.observe(e)),typeof MutationObserver<`u`&&(O=new MutationObserver(()=>E()),O.observe(e,{childList:!0,subtree:!0,characterData:!0})),E())}function A(){D?.disconnect(),D=null,O?.disconnect(),O=null}(0,o.watch)(()=>p.open,async e=>{e?C():w(),await(0,o.nextTick)(),e?k():(A(),T.value=!1)},{immediate:!0}),(0,o.onUnmounted)(()=>{w(),A()});function j(){let e=v.value;if(!e)return!1;let t=Array.from(document.querySelectorAll(`[aria-modal="true"]`));return t.length===0||t[t.length-1]===e}function M(e){e.key===`Escape`&&(!p.open||!p.closeOnEscape||p.closeDisabled||j()&&m(`close`))}return(0,o.onMounted)(()=>{document.addEventListener(`keydown`,M),p.open&&k()}),(0,o.onUnmounted)(()=>{document.removeEventListener(`keydown`,M)}),t({dialogEl:()=>v.value,bodyEl:()=>y.value}),(t,r)=>((0,o.openBlock)(),(0,o.createBlock)(o.Teleport,{to:`body`},[(0,o.createVNode)(o.Transition,{name:`nb-modal`},{default:(0,o.withCtx)(()=>[e.open?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{key:0,class:`nb-modal--overlay`,onClick:(0,o.withModifiers)(x,[`self`])},[(0,o.createElementVNode)(`div`,(0,o.mergeProps)({ref_key:`contentRef`,ref:v,class:[`nb-modal--content`,`nb-modal--content--${e.size}`]},(0,o.unref)(b),{role:e.role,"aria-modal":`true`,"aria-labelledby":e.labelledBy??(g.value?_:void 0),"aria-describedby":e.describedBy,"aria-busy":e.busy?`true`:void 0,tabindex:`-1`,onClick:r[1]||=(0,o.withModifiers)(()=>{},[`stop`])}),[g.value?((0,o.openBlock)(),(0,o.createElementBlock)(`header`,l,[(0,o.createElementVNode)(`span`,{id:_,class:`nb-modal--title`},[(0,o.renderSlot)(t.$slots,`header`,{},()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.title),1)],!0)]),(0,o.createElementVNode)(`button`,{class:`nb-modal--close`,"aria-label":`Close`,disabled:e.closeDisabled,"aria-disabled":e.closeDisabled?`true`:void 0,onClick:r[0]||=e=>m(`close`)},[(0,o.createVNode)(n.t,{name:(0,o.unref)(s.regular)},null,8,[`name`])],8,u)])):(0,o.createCommentVNode)(``,!0),(0,o.createElementVNode)(`main`,{ref_key:`bodyRef`,ref:y,class:`nb-modal--body`,tabindex:T.value?0:void 0,role:T.value?`region`:void 0,"aria-labelledby":T.value?e.labelledBy??(g.value?_:void 0):void 0},[(0,o.renderSlot)(t.$slots,`default`,{},void 0,!0)],8,d),t.$slots.footer?((0,o.openBlock)(),(0,o.createBlock)(i.t,{key:1,is:`footer`,justify:`end`,class:`nb-modal--footer`,distributed:``},{default:(0,o.withCtx)(()=>[(0,o.renderSlot)(t.$slots,`footer`,{},void 0,!0)]),_:3})):(0,o.createCommentVNode)(``,!0)],16,c)])):(0,o.createCommentVNode)(``,!0)]),_:3})]))}}),p=e.t(f,[[`__scopeId`,`data-v-2dfc5b1b`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return p}});
@@ -1,156 +0,0 @@
1
- import { t as e } from "./_plugin-vue_export-helper-O4QQSku4.js";
2
- import { r as t } from "./Size.d-Bah6vMl3.js";
3
- import { t as n } from "./Icon-rREAqsu0.js";
4
- import { useSurfaceLayer as r } from "./composables/useSurfaceLayer.composable.mjs";
5
- import { t as i } from "./Grid-CVNb1HcS.js";
6
- import { acquireScrollLock as a, releaseScrollLock as o } from "./composables/useScrollLock.composable.mjs";
7
- import { Teleport as s, Transition as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as m, createVNode as h, defineComponent as g, mergeProps as _, nextTick as v, onMounted as y, onUnmounted as b, openBlock as x, ref as S, renderSlot as C, toDisplayString as w, unref as T, useId as E, useSlots as D, watch as O, withCtx as k, withModifiers as A } from "vue";
8
- import { regular as ee } from "@nubisco/ui/icons/x";
9
- //#region src/components/Modal.vue?vue&type=script&setup=true&lang.ts
10
- var j = [
11
- "role",
12
- "aria-labelledby",
13
- "aria-describedby",
14
- "aria-busy"
15
- ], M = {
16
- key: 0,
17
- class: "nb-modal--header"
18
- }, N = ["disabled", "aria-disabled"], P = [
19
- "tabindex",
20
- "role",
21
- "aria-labelledby"
22
- ], F = /* @__PURE__ */ e(/* @__PURE__ */ g({
23
- __name: "Modal",
24
- props: {
25
- open: {
26
- type: Boolean,
27
- default: !1
28
- },
29
- title: { default: void 0 },
30
- size: { default: t.Medium },
31
- closeOnOverlay: {
32
- type: Boolean,
33
- default: !0
34
- },
35
- role: { default: "dialog" },
36
- labelledBy: { default: void 0 },
37
- describedBy: { default: void 0 },
38
- busy: {
39
- type: Boolean,
40
- default: !1
41
- },
42
- closeDisabled: {
43
- type: Boolean,
44
- default: !1
45
- },
46
- closeOnEscape: {
47
- type: Boolean,
48
- default: !0
49
- }
50
- },
51
- emits: ["close"],
52
- setup(e, { expose: t, emit: g }) {
53
- let F = e, I = g, L = D(), R = l(() => !!L.header || !!F.title), z = `nb-modal-title-${E()}`, B = S(null), V = S(null), { layerProps: H } = r({ overlay: !0 });
54
- function U() {
55
- F.closeOnOverlay && I("close");
56
- }
57
- let W = !1;
58
- function G() {
59
- W || (W = !0, a());
60
- }
61
- function K() {
62
- W && (W = !1, o());
63
- }
64
- let q = S(!1);
65
- function J() {
66
- let e = V.value;
67
- if (!e) return;
68
- let t = e.scrollHeight - e.clientHeight;
69
- !q.value && t > 4 ? q.value = !0 : q.value && t <= 0 && (q.value = !1);
70
- }
71
- let Y = null, X = null;
72
- function Z() {
73
- let e = V.value;
74
- e && (Q(), typeof ResizeObserver < "u" && (Y = new ResizeObserver(() => J()), Y.observe(e)), typeof MutationObserver < "u" && (X = new MutationObserver(() => J()), X.observe(e, {
75
- childList: !0,
76
- subtree: !0,
77
- characterData: !0
78
- })), J());
79
- }
80
- function Q() {
81
- Y?.disconnect(), Y = null, X?.disconnect(), X = null;
82
- }
83
- O(() => F.open, async (e) => {
84
- e ? G() : K(), await v(), e ? Z() : (Q(), q.value = !1);
85
- }, { immediate: !0 }), b(() => {
86
- K(), Q();
87
- });
88
- function te() {
89
- let e = B.value;
90
- if (!e) return !1;
91
- let t = Array.from(document.querySelectorAll("[aria-modal=\"true\"]"));
92
- return t.length === 0 || t[t.length - 1] === e;
93
- }
94
- function $(e) {
95
- e.key === "Escape" && (!F.open || !F.closeOnEscape || F.closeDisabled || te() && I("close"));
96
- }
97
- return y(() => {
98
- document.addEventListener("keydown", $), F.open && Z();
99
- }), b(() => {
100
- document.removeEventListener("keydown", $);
101
- }), t({
102
- dialogEl: () => B.value,
103
- bodyEl: () => V.value
104
- }), (t, r) => (x(), u(s, { to: "body" }, [h(c, { name: "nb-modal" }, {
105
- default: k(() => [e.open ? (x(), f("div", {
106
- key: 0,
107
- class: "nb-modal--overlay",
108
- onClick: A(U, ["self"])
109
- }, [p("div", _({
110
- ref_key: "contentRef",
111
- ref: B,
112
- class: ["nb-modal--content", `nb-modal--content--${e.size}`]
113
- }, T(H), {
114
- role: e.role,
115
- "aria-modal": "true",
116
- "aria-labelledby": e.labelledBy ?? (R.value ? z : void 0),
117
- "aria-describedby": e.describedBy,
118
- "aria-busy": e.busy ? "true" : void 0,
119
- tabindex: "-1",
120
- onClick: r[1] ||= A(() => {}, ["stop"])
121
- }), [
122
- R.value ? (x(), f("header", M, [p("span", {
123
- id: z,
124
- class: "nb-modal--title"
125
- }, [C(t.$slots, "header", {}, () => [m(w(e.title), 1)], !0)]), p("button", {
126
- class: "nb-modal--close",
127
- "aria-label": "Close",
128
- disabled: e.closeDisabled,
129
- "aria-disabled": e.closeDisabled ? "true" : void 0,
130
- onClick: r[0] ||= (e) => I("close")
131
- }, [h(n, { name: T(ee) }, null, 8, ["name"])], 8, N)])) : d("", !0),
132
- p("main", {
133
- ref_key: "bodyRef",
134
- ref: V,
135
- class: "nb-modal--body",
136
- tabindex: q.value ? 0 : void 0,
137
- role: q.value ? "region" : void 0,
138
- "aria-labelledby": q.value ? e.labelledBy ?? (R.value ? z : void 0) : void 0
139
- }, [C(t.$slots, "default", {}, void 0, !0)], 8, P),
140
- t.$slots.footer ? (x(), u(i, {
141
- key: 1,
142
- is: "footer",
143
- justify: "end",
144
- class: "nb-modal--footer",
145
- distributed: ""
146
- }, {
147
- default: k(() => [C(t.$slots, "footer", {}, void 0, !0)]),
148
- _: 3
149
- })) : d("", !0)
150
- ], 16, j)])) : d("", !0)]),
151
- _: 3
152
- })]));
153
- }
154
- }), [["__scopeId", "data-v-2dfc5b1b"]]);
155
- //#endregion
156
- export { F as t };
@@ -1 +0,0 @@
1
- require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-tagjRzOz.cjs`),t=require(`./Size.d-GBIblj2D.cjs`),n=require(`./Label-CXejhF9x.cjs`),r=require(`./Message-Daj6hLC4.cjs`),i=require(`./Grid-DVT8lBHr.cjs`),a=require(`./NumberInput-Vc2wzK62.cjs`);let o=require(`vue`);var s={class:`nb-slider__field-box`},c={key:0,class:`nb-slider__inner-header`},l={class:`nb-slider__inner-label`},u={class:`nb-slider__track-labels`},d={class:`nb-slider__track-label`},f={class:`nb-slider__track-label`},p=(0,o.defineComponent)({__name:`Slider`,props:{modelValue:{},min:{default:0},max:{default:100},step:{default:1},range:{type:Boolean,default:!1},showInput:{type:Boolean,default:!0},name:{},disabled:{type:Boolean,default:!1},required:{type:Boolean},id:{},label:{},error:{},warning:{},helper:{},variant:{default:`default`},size:{default:t.r.Medium}},emits:[`update:modelValue`,`change`],setup(e,{emit:t}){let p=e,m=t,h=(0,o.ref)(null),g=(0,o.ref)(null),_=(0,o.computed)(()=>p.range||p.modelValue===null||p.modelValue===void 0?p.min??0:Array.isArray(p.modelValue)?p.modelValue[0]??p.min??0:p.modelValue),v=(0,o.computed)(()=>!p.range||!Array.isArray(p.modelValue)?p.min??0:p.modelValue[0]??p.min??0),y=(0,o.computed)(()=>!p.range||!Array.isArray(p.modelValue)?p.max??100:p.modelValue[1]??p.max??100),b=(0,o.computed)(()=>{let e=p.step??1;if(!isFinite(e)||e<=0)return 0;let t=String(e),n=t.indexOf(`.`);return n===-1?0:t.length-n-1});function x(e){let t=b.value;return t>0?Number(e.toFixed(t)):Math.round(e)}let S=(0,o.computed)(()=>x(p.range?y.value:_.value));function C(e){let t=p.min??0,n=p.max??100;return n===t?0:(e-t)/(n-t)*100}function w(e){let t=p.min??0,n=p.max??100,r=p.step??1,i=t+e/100*(n-t),a=Math.round(i/r)*r;return Math.max(t,Math.min(n,a))}function T(e){if(!h.value)return 0;let t=h.value.getBoundingClientRect(),n=`touches`in e?e.touches[0].clientX:e.clientX;return Math.max(0,Math.min(100,(n-t.left)/t.width*100))}let E=(0,o.computed)(()=>{if(!p.range)return{left:`0%`,width:`${C(_.value)}%`};let e=C(v.value),t=C(y.value);return{left:`${e}%`,width:`${t-e}%`}});function D(e){m(`update:modelValue`,e)}function O(e,t){m(`update:modelValue`,[e,t])}function k(e){if(e===null)return;let t=p.min??0,n=p.max??100;D(Math.max(t,Math.min(n,e)))}function A(e){if(e===null)return;let t=p.min??0;O(Math.max(t,Math.min(y.value,e)),y.value)}function j(e){if(e===null)return;let t=p.max??100,n=Math.max(v.value,Math.min(t,e));O(v.value,n)}function M(e){if(!p.range)return null;let t=C(v.value),n=C(y.value);return Math.abs(e-t)<=Math.abs(e-n)?`low`:`high`}function N(e){let t=w(e);if(!p.range){D(t);return}if(g.value===`low`)O(Math.min(t,y.value),y.value);else{let e=Math.max(t,v.value);O(v.value,e)}}function P(e){p.disabled||N(T(e))}function F(e){p.disabled||(m(`change`,p.range?[v.value,y.value]:_.value),N(T(e))),z()}function I(e){p.disabled||N(T(e))}function L(e){p.disabled||(m(`change`,p.range?[v.value,y.value]:_.value),N(T(e))),V()}function R(){document.addEventListener(`mousemove`,P),document.addEventListener(`mouseup`,F)}function z(){g.value=null,document.removeEventListener(`mousemove`,P),document.removeEventListener(`mouseup`,F)}function B(){document.addEventListener(`touchmove`,I,{passive:!0}),document.addEventListener(`touchend`,L)}function V(){g.value=null,document.removeEventListener(`touchmove`,I),document.removeEventListener(`touchend`,L)}function H(e){if(p.disabled)return;let t=T(e);g.value=M(t),N(t),R()}function U(e){if(p.disabled)return;let t=T(e);g.value=M(t),N(t),B()}function W(e,t){p.disabled||(g.value=p.range?e:null,R())}function G(e,t){p.disabled||(g.value=p.range?e:null,B())}(0,o.onBeforeUnmount)(()=>{z(),V()});let K=(0,o.computed)(()=>[`nb-slider`,`nb-slider--${p.size}`,`nb-slider--${p.variant}`,{"nb-slider--range":p.range,"nb-slider--disabled":p.disabled,"nb-slider--error":!!p.error,"nb-slider--warning":!p.error&&!!p.warning}]),q=(0,o.computed)(()=>({"nb-slider__track-area--error":!!p.error,"nb-slider__track-area--warning":!p.error&&!!p.warning}));return(t,p)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{class:(0,o.normalizeClass)(K.value)},[e.variant===`default`&&e.label?((0,o.openBlock)(),(0,o.createBlock)(n.t,{key:0,class:`nb-slider__label`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.label),1)]),_:1})):(0,o.createCommentVNode)(``,!0),(0,o.createElementVNode)(`div`,s,[e.variant===`fluid`&&e.label?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,c,[(0,o.createElementVNode)(`label`,l,(0,o.toDisplayString)(e.label),1)])):(0,o.createCommentVNode)(``,!0),(0,o.createVNode)(i.t,{dir:`row`,align:`center`,gap:`sm`,class:`nb-slider__row`},{default:(0,o.withCtx)(()=>[e.range&&e.showInput?((0,o.openBlock)(),(0,o.createBlock)(a.t,{key:0,size:e.variant===`fluid`?`sm`:e.size,"model-value":v.value,min:e.min,max:y.value,step:e.step,disabled:e.disabled,class:`nb-slider__input`,"onUpdate:modelValue":A,onChange:A},null,8,[`size`,`model-value`,`min`,`max`,`step`,`disabled`])):(0,o.createCommentVNode)(``,!0),(0,o.createVNode)(i.t,{dir:`col`,justify:`end`,gap:`xs`,class:(0,o.normalizeClass)([`nb-slider__track-area`,q.value]),grow:``},{default:(0,o.withCtx)(()=>[(0,o.createElementVNode)(`div`,{ref_key:`trackRef`,ref:h,class:`nb-slider__track`,onMousedown:H,onTouchstartPassive:U},[(0,o.createElementVNode)(`div`,{class:`nb-slider__track__fill`,style:(0,o.normalizeStyle)(E.value)},null,4),e.range?((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:1},[(0,o.createElementVNode)(`div`,{class:`nb-slider__track__handle nb-slider__track__handle--low`,style:(0,o.normalizeStyle)({left:`${C(v.value)}%`}),onMousedown:p[2]||=(0,o.withModifiers)(e=>W(`low`,e),[`stop`]),onTouchstartPassive:p[3]||=(0,o.withModifiers)(e=>G(`low`,e),[`stop`])},null,36),(0,o.createElementVNode)(`div`,{class:`nb-slider__track__handle nb-slider__track__handle--high`,style:(0,o.normalizeStyle)({left:`${C(y.value)}%`}),onMousedown:p[4]||=(0,o.withModifiers)(e=>W(`high`,e),[`stop`]),onTouchstartPassive:p[5]||=(0,o.withModifiers)(e=>G(`high`,e),[`stop`])},null,36),p[8]||=(0,o.createElementVNode)(`div`,{class:`nb-slider__tick`},null,-1)],64)):((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{key:0,class:`nb-slider__track__handle`,style:(0,o.normalizeStyle)({left:`${C(_.value)}%`}),onMousedown:p[0]||=(0,o.withModifiers)(e=>W(null,e),[`stop`]),onTouchstartPassive:p[1]||=(0,o.withModifiers)(e=>G(null,e),[`stop`])},null,36))],544),(0,o.createElementVNode)(`div`,u,[(0,o.createElementVNode)(`span`,d,(0,o.toDisplayString)(e.min),1),(0,o.createElementVNode)(`span`,f,(0,o.toDisplayString)(e.max),1)])]),_:1},8,[`class`]),e.showInput?((0,o.openBlock)(),(0,o.createBlock)(a.t,{key:1,size:e.variant===`fluid`?`sm`:e.size,"model-value":S.value,min:e.range?v.value:e.min,max:e.max,step:e.step,disabled:e.disabled,class:`nb-slider__input`,"onUpdate:modelValue":p[6]||=t=>e.range?j(t):k(t),onChange:p[7]||=t=>e.range?j(t):k(t)},null,8,[`size`,`model-value`,`min`,`max`,`step`,`disabled`])):(0,o.createCommentVNode)(``,!0)]),_:1})]),e.error?((0,o.openBlock)(),(0,o.createBlock)(r.t,{key:1,variant:`error`,class:`nb-slider__message`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.error),1)]),_:1})):e.warning?((0,o.openBlock)(),(0,o.createBlock)(r.t,{key:2,variant:`warning`,class:`nb-slider__message`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.warning),1)]),_:1})):e.helper?((0,o.openBlock)(),(0,o.createBlock)(r.t,{key:3,variant:`helper`,class:`nb-slider__message`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.helper),1)]),_:1})):(0,o.createCommentVNode)(``,!0)],2))}}),m=e.t(p,[[`__scopeId`,`data-v-9c9efe18`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return m}});