@espressif/dashboard-ui-components 1.10.0 → 1.11.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 (340) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/dist/_vendor/@radix-ui/primitive/dist/index.js +9 -0
  3. package/dist/_vendor/@radix-ui/react-checkbox/dist/index.js +185 -0
  4. package/dist/_vendor/@radix-ui/react-compose-refs/dist/index.js +28 -0
  5. package/dist/_vendor/@radix-ui/react-context/dist/index.js +68 -0
  6. package/dist/_vendor/@radix-ui/react-presence/dist/index.js +127 -0
  7. package/dist/_vendor/@radix-ui/react-primitive/dist/index.js +42 -0
  8. package/dist/_vendor/@radix-ui/react-use-controllable-state/dist/index.js +55 -0
  9. package/dist/_vendor/@radix-ui/react-use-layout-effect/dist/index.js +5 -0
  10. package/dist/_vendor/@radix-ui/react-use-previous/dist/index.js +17 -0
  11. package/dist/_vendor/@radix-ui/react-use-size/dist/index.js +39 -0
  12. package/dist/_vendor/lottie-react/build/index.es.js +537 -0
  13. package/dist/_vendor/lottie-web/build/player/lottie.js +14149 -0
  14. package/dist/_virtual/_rolldown/runtime.js +24 -0
  15. package/dist/assets/illustrations/bulb-cloud-drawing.js +4 -0
  16. package/dist/assets/illustrations/rm-dashboard-update.js +4 -0
  17. package/dist/assets/illustrations/rm-data-download.js +4 -0
  18. package/dist/assets/logos/espressif/espressif-no-text.js +4 -0
  19. package/dist/assets/logos/espressif/espressif-with-text-dm.js +4 -0
  20. package/dist/assets/logos/espressif/espressif-with-text.js +4 -0
  21. package/dist/assets/logos/insights/insights-no-text.js +4 -0
  22. package/dist/assets/logos/insights/insights-with-text-dm.js +4 -0
  23. package/dist/assets/logos/insights/insights-with-text.js +4 -0
  24. package/dist/assets/logos/launchpad/launchpad-no-text-dm.js +4 -0
  25. package/dist/assets/logos/launchpad/launchpad-no-text.js +4 -0
  26. package/dist/assets/logos/launchpad/launchpad-with-text-dm.js +4 -0
  27. package/dist/assets/logos/launchpad/launchpad-with-text.js +4 -0
  28. package/dist/assets/logos/private-agents/private-agents-no-text.js +4 -0
  29. package/dist/assets/logos/private-agents/private-agents-with-text-dm.js +4 -0
  30. package/dist/assets/logos/private-agents/private-agents-with-text.js +4 -0
  31. package/dist/assets/logos/rainmaker/rainmaker-no-text.js +4 -0
  32. package/dist/assets/logos/rainmaker/rainmaker-with-text-dm.js +4 -0
  33. package/dist/assets/logos/rainmaker/rainmaker-with-text.js +4 -0
  34. package/dist/assets/logos/rainmaker-classic/rainmaker-classic-no-text-dm.js +4 -0
  35. package/dist/assets/logos/rainmaker-classic/rainmaker-classic-no-text.js +4 -0
  36. package/dist/assets/logos/rainmaker-classic/rainmaker-classic-with-text-dm.js +4 -0
  37. package/dist/assets/logos/rainmaker-classic/rainmaker-classic-with-text.js +4 -0
  38. package/dist/assets/logos/rainmaker-neo/rainmaker-neo-no-text.js +4 -0
  39. package/dist/assets/logos/rainmaker-neo/rainmaker-neo-with-text-dm.js +4 -0
  40. package/dist/assets/logos/rainmaker-neo/rainmaker-neo-with-text.js +4 -0
  41. package/dist/assets/logos/ui-components/ui-components-no-text.js +4 -0
  42. package/dist/assets/logos/ui-components/ui-components-with-text-dm.js +4 -0
  43. package/dist/assets/logos/ui-components/ui-components-with-text.js +4 -0
  44. package/dist/assets/logos/zerocode/zerocode-no-text.js +4 -0
  45. package/dist/assets/logos/zerocode/zerocode-with-text-dm.js +4 -0
  46. package/dist/assets/logos/zerocode/zerocode-with-text.js +4 -0
  47. package/dist/assets/logos/zerocode-ai/zerocode-ai-no-text.js +4 -0
  48. package/dist/assets/logos/zerocode-ai/zerocode-ai-with-text-dm.js +4 -0
  49. package/dist/assets/logos/zerocode-ai/zerocode-ai-with-text.js +4 -0
  50. package/dist/common/animated-rainmaker-logo/animated-rainmaker-logo.constants.js +18 -0
  51. package/dist/common/animated-rainmaker-logo/animated-rainmaker-logo.js +24 -0
  52. package/dist/common/animated-rainmaker-logo/rainmaker-c-logo.js +50 -0
  53. package/dist/common/animated-rainmaker-logo/use-animated-rainmaker-logo-animation.js +85 -0
  54. package/dist/common/app-logo/app-logo.js +59 -0
  55. package/dist/common/app-logo/logo-config.js +297 -0
  56. package/dist/common/copyright-card/copyright-card.js +39 -0
  57. package/dist/common/footer-card/footer-card.js +22 -0
  58. package/dist/common/index.js +8 -8
  59. package/dist/common/my-account-menu/my-account-menu.js +32 -0
  60. package/dist/common/page-loader/page-loader.js +21 -0
  61. package/dist/common/profile-card/profile-card.js +26 -0
  62. package/dist/components/accordion/accordion.js +52 -0
  63. package/dist/components/advanced-search-box/advanced-search-box.js +106 -0
  64. package/dist/components/alert/alert.js +85 -0
  65. package/dist/components/animated-containers/pop-collection-item.js +28 -0
  66. package/dist/components/async-multi-select/async-multi-select.js +199 -0
  67. package/dist/components/avatar/avatar.js +41 -0
  68. package/dist/components/button/button.js +191 -0
  69. package/dist/components/button/flash-button.js +110 -0
  70. package/dist/components/button/invert-button.js +13 -0
  71. package/dist/components/calendar/calendar.js +105 -0
  72. package/dist/components/cards/animated-card/animated-card-animations.js +57 -0
  73. package/dist/components/cards/animated-card/animated-card.js +42 -0
  74. package/dist/components/cards/basic-details-card.js +46 -0
  75. package/dist/components/cards/collapsible-card.js +48 -0
  76. package/dist/components/cards/no-data-card/no-data-card.js +30 -0
  77. package/dist/components/cards/section-card.js +265 -0
  78. package/dist/components/cards/simple-card.js +24 -0
  79. package/dist/components/carousel/carousel.js +158 -0
  80. package/dist/components/chart/area-chart.js +135 -0
  81. package/dist/components/chart/bar-chart.js +151 -0
  82. package/dist/components/chart/chart-colors.js +85 -0
  83. package/dist/components/chart/chart-series-data.js +53 -0
  84. package/dist/components/chart/chart.js +147 -0
  85. package/dist/components/chart/chart.types.js +7 -0
  86. package/dist/components/chart/composed-chart.js +182 -0
  87. package/dist/components/chart/donut-chart.js +177 -0
  88. package/dist/components/chart/line-chart.js +137 -0
  89. package/dist/components/chart/treemap-chart.js +294 -0
  90. package/dist/components/circular-progress/circular-progress.js +125 -0
  91. package/dist/components/code-editor/code-editor.js +235 -0
  92. package/dist/components/code-editor/code-editor.utils.js +122 -0
  93. package/dist/components/code-editor/use-code-editor-keys.js +79 -0
  94. package/dist/components/code-editor/use-highlighted-html.js +102 -0
  95. package/dist/components/confirmation-dialog/confirmation-dialog.js +72 -0
  96. package/dist/components/content-container/content-container.js +20 -0
  97. package/dist/components/copiable-text/copiable-text.js +46 -0
  98. package/dist/components/data-table/data-table.js +186 -0
  99. package/dist/components/data-table/responsive-columns.js +65 -0
  100. package/dist/components/data-table/row-actions.js +27 -0
  101. package/dist/components/data-table/sticky-columns.js +71 -0
  102. package/dist/components/data-table/table-body.js +57 -0
  103. package/dist/components/data-table/table-header.js +21 -0
  104. package/dist/components/date-picker/date-picker.js +95 -0
  105. package/dist/components/date-range-picker/date-range-picker.js +301 -0
  106. package/dist/components/date-range-picker/presets.js +174 -0
  107. package/dist/components/date-time-picker/date-time-picker.js +144 -0
  108. package/dist/components/date-time-picker/date-time-picker.utils.js +32 -0
  109. package/dist/components/device-icon/device-icon.config.js +194 -0
  110. package/dist/components/device-icon/device-icon.js +17 -0
  111. package/dist/components/device-icon/icons/air-conditioner.js +22 -0
  112. package/dist/components/device-icon/icons/blind.js +24 -0
  113. package/dist/components/device-icon/icons/dimmer.js +14 -0
  114. package/dist/components/device-icon/icons/extension-board.js +42 -0
  115. package/dist/components/device-icon/icons/fan.js +14 -0
  116. package/dist/components/device-icon/icons/knob.js +14 -0
  117. package/dist/components/device-icon/icons/led-strip.js +22 -0
  118. package/dist/components/device-icon/icons/light.js +14 -0
  119. package/dist/components/device-icon/icons/refrigerator.js +18 -0
  120. package/dist/components/device-icon/icons/retro-switch.js +18 -0
  121. package/dist/components/device-icon/icons/router.js +20 -0
  122. package/dist/components/device-icon/icons/sensor.js +20 -0
  123. package/dist/components/device-icon/icons/socket.js +19 -0
  124. package/dist/components/device-icon/icons/switch.js +19 -0
  125. package/dist/components/device-icon/icons/thermostat.js +21 -0
  126. package/dist/components/device-icon/icons/washing-machine.js +22 -0
  127. package/dist/components/device-icon/match-device.js +61 -0
  128. package/dist/components/dynamic-list/dynamic-list.js +445 -0
  129. package/dist/components/error-display/full-size-error/full-size-error.js +20 -0
  130. package/dist/components/error-display/inline-error/inline-error.js +12 -0
  131. package/dist/components/file-input/file-input.js +318 -0
  132. package/dist/components/file-upload/file-upload.js +317 -0
  133. package/dist/components/filters-bar/filters-bar.js +36 -0
  134. package/dist/components/fullscreen-dialog/fullscreen-dialog.js +68 -0
  135. package/dist/components/icon-avatar/icon-avatar.js +130 -0
  136. package/dist/components/icon-text-action-card/icon-text-action-card.js +190 -0
  137. package/dist/components/illustration/illustration-registry.js +37 -0
  138. package/dist/components/illustration/illustration-variants.js +21 -0
  139. package/dist/components/illustration/illustration.js +68 -0
  140. package/dist/components/index.d.ts +0 -20
  141. package/dist/components/index.js +134 -6
  142. package/dist/components/key-value-manager/key-value-manager-add-popover.js +126 -0
  143. package/dist/components/key-value-manager/key-value-manager-field.js +47 -0
  144. package/dist/components/key-value-manager/key-value-manager-table.js +188 -0
  145. package/dist/components/key-value-manager/key-value-manager.js +111 -0
  146. package/dist/components/key-value-manager/key-value-manager.props.js +28 -0
  147. package/dist/components/key-value-manager/key-value-manager.utils.js +21 -0
  148. package/dist/components/link/link.js +67 -0
  149. package/dist/components/list/dropdown-list-item.js +60 -0
  150. package/dist/components/list/list-item.utils.js +76 -0
  151. package/dist/components/list/list.js +49 -0
  152. package/dist/components/list/list.props.js +27 -0
  153. package/dist/components/list/standard-list-item.js +66 -0
  154. package/dist/components/list-details/list-details-item-button.js +46 -0
  155. package/dist/components/list-details/list-details-item-dropdown.js +112 -0
  156. package/dist/components/list-details/list-details-item-strip.js +125 -0
  157. package/dist/components/list-details/list-details.js +148 -0
  158. package/dist/components/lottie-animation-container/lottie-animation-container.js +31 -0
  159. package/dist/components/lottie-animations/animation-data/access-denied.js +3980 -0
  160. package/dist/components/lottie-animations/animation-data/active.js +825 -0
  161. package/dist/components/lottie-animations/animation-data/bar-chart.js +610 -0
  162. package/dist/components/lottie-animations/animation-data/chart-loading.js +5368 -0
  163. package/dist/components/lottie-animations/animation-data/cloud-download.js +1660 -0
  164. package/dist/components/lottie-animations/animation-data/cloud-sync.js +932 -0
  165. package/dist/components/lottie-animations/animation-data/coud-upload.js +7060 -0
  166. package/dist/components/lottie-animations/animation-data/cross-throb.js +1506 -0
  167. package/dist/components/lottie-animations/animation-data/dashboard-loading.js +14330 -0
  168. package/dist/components/lottie-animations/animation-data/error-spread-out.js +5567 -0
  169. package/dist/components/lottie-animations/animation-data/error.js +1211 -0
  170. package/dist/components/lottie-animations/animation-data/green-success.js +14826 -0
  171. package/dist/components/lottie-animations/animation-data/inactive.js +723 -0
  172. package/dist/components/lottie-animations/animation-data/light.js +2678 -0
  173. package/dist/components/lottie-animations/animation-data/lock.js +900 -0
  174. package/dist/components/lottie-animations/animation-data/lock2.js +1686 -0
  175. package/dist/components/lottie-animations/animation-data/locked.js +641 -0
  176. package/dist/components/lottie-animations/animation-data/search-error.js +954 -0
  177. package/dist/components/lottie-animations/animation-data/security.js +4121 -0
  178. package/dist/components/lottie-animations/animation-data/success.js +404 -0
  179. package/dist/components/lottie-animations/animation-data/verification-in-progress.js +10138 -0
  180. package/dist/components/lottie-animations/animation-data/warning.js +843 -0
  181. package/dist/components/lottie-animations/verification-in-progress/verification-in-progress.js +19 -0
  182. package/dist/components/markdown-content/markdown-content.components.js +114 -0
  183. package/dist/components/markdown-content/markdown-content.js +39 -0
  184. package/dist/components/menu/menu.js +19 -0
  185. package/dist/components/monospace-content/monospace-content.js +80 -0
  186. package/dist/components/nav-bar/nav-bar-details-panel.js +51 -0
  187. package/dist/components/nav-bar/nav-bar-mobile-menu.js +105 -0
  188. package/dist/components/nav-bar/nav-bar.js +449 -0
  189. package/dist/components/nav-bar/use-nav-bar-overflow.js +74 -0
  190. package/dist/components/nav-bar/use-nav-bar-scroll.js +42 -0
  191. package/dist/components/overflow-badge-list/overflow-badge-list.js +58 -0
  192. package/dist/components/page-container/page-container-skeleton.js +72 -0
  193. package/dist/components/page-container/page-container.js +93 -0
  194. package/dist/components/pagination/pagination.js +96 -0
  195. package/dist/components/pagination/pagination.props.js +16 -0
  196. package/dist/components/progress-bar/progress-bar.js +106 -0
  197. package/dist/components/radio-group/radio-group.js +41 -0
  198. package/dist/components/requirement-list/requirement-list.js +83 -0
  199. package/dist/components/scrollable-sections/scrollable-sections.js +270 -0
  200. package/dist/components/search-box/search-box.js +54 -0
  201. package/dist/components/search-field-shell.js +24 -0
  202. package/dist/components/selectable-card-list/checkbox-card-list.js +85 -0
  203. package/dist/components/selectable-card-list/radio-card-list.js +99 -0
  204. package/dist/components/selectable-card-list/selectable-card-list-shared.js +135 -0
  205. package/dist/components/selectable-card-list/selectable-card-list.js +34 -0
  206. package/dist/components/sidebar/sidebar.js +344 -0
  207. package/dist/components/sidebar/types.js +6 -0
  208. package/dist/components/simple-clickable-card/simple-clickable-card-shared.js +309 -0
  209. package/dist/components/simple-clickable-card/simple-clickable-card.js +106 -0
  210. package/dist/components/simple-info-card/simple-info-card.js +154 -0
  211. package/dist/components/simple-list/simple-list.js +146 -0
  212. package/dist/components/simple-paginated-list/simple-paginated-list.js +178 -0
  213. package/dist/components/simplified-date/simplified-date.js +56 -0
  214. package/dist/components/skeletons/table-skeleton.js +16 -0
  215. package/dist/components/spinner/spinner.js +25 -0
  216. package/dist/components/stat-card/stat-card.js +206 -0
  217. package/dist/components/status-badge/status-badge.js +108 -0
  218. package/dist/components/status-card-list/status-card-list.js +282 -0
  219. package/dist/components/tag/tag.js +144 -0
  220. package/dist/components/tag-input/tag-input.js +161 -0
  221. package/dist/components/text-effects/glitch-effect/glitch-text.js +115 -0
  222. package/dist/components/text-effects/gradient-text/gradient-text.js +32 -0
  223. package/dist/components/text-effects/highlight-text/highlight-text.js +35 -0
  224. package/dist/components/text-effects/parse-text-markup.js +53 -0
  225. package/dist/components/text-effects/shimmer-text/shimmer-text.js +67 -0
  226. package/dist/components/time-picker/time-picker.js +23 -0
  227. package/dist/components/toast/toast.js +126 -0
  228. package/dist/components/togglable-items-list/togglable-items-list.js +28 -0
  229. package/dist/components/tooltip/tooltip.js +21 -0
  230. package/dist/components/transfer-list/transfer-list.js +413 -0
  231. package/dist/components/truncated-line-with-tooltip/truncated-line-with-tooltip.js +61 -0
  232. package/dist/components/typography/typography-variants.js +41 -0
  233. package/dist/components/typography/typography.js +15 -0
  234. package/dist/components/user-type-badge/user-type-badge.js +40 -0
  235. package/dist/components/user-type-badge/user-type-badge.registry.js +17 -0
  236. package/dist/components/vertical-stepper/vertical-stepper.js +171 -0
  237. package/dist/core/alert.js +33 -0
  238. package/dist/core/animate-ui/components/animate/code-header.js +30 -0
  239. package/dist/core/animate-ui/components/animate/code.js +35 -0
  240. package/dist/core/animate-ui/components/animate/tabs.js +188 -0
  241. package/dist/core/animate-ui/components/animate/tooltip.js +39 -0
  242. package/dist/core/animate-ui/components/base/preview-card.js +29 -0
  243. package/dist/core/animate-ui/components/base/progress.js +32 -0
  244. package/dist/core/animate-ui/components/base/radio.js +24 -0
  245. package/dist/core/animate-ui/components/buttons/copy.js +95 -0
  246. package/dist/core/animate-ui/components/radix/accordion.js +36 -0
  247. package/dist/core/animate-ui/components/radix/dialog.js +60 -0
  248. package/dist/core/animate-ui/components/radix/dropdown-menu.js +129 -0
  249. package/dist/core/animate-ui/components/radix/sheet.js +110 -0
  250. package/dist/core/animate-ui/components/radix/sidebar.js +416 -0
  251. package/dist/core/animate-ui/components/radix/switch.js +34 -0
  252. package/dist/core/animate-ui/components/radix/toggle-group.js +115 -0
  253. package/dist/core/animate-ui/components/radix/toggle.js +24 -0
  254. package/dist/core/animate-ui/primitives/animate/code-block.js +131 -0
  255. package/dist/core/animate-ui/primitives/animate/escape-html.js +7 -0
  256. package/dist/core/animate-ui/primitives/animate/shiki-highlighter.js +64 -0
  257. package/dist/core/animate-ui/primitives/animate/slot.js +39 -0
  258. package/dist/core/animate-ui/primitives/animate/tabs.js +202 -0
  259. package/dist/core/animate-ui/primitives/animate/tooltip.js +351 -0
  260. package/dist/core/animate-ui/primitives/base/preview-card.js +107 -0
  261. package/dist/core/animate-ui/primitives/base/progress.js +60 -0
  262. package/dist/core/animate-ui/primitives/base/radio.js +83 -0
  263. package/dist/core/animate-ui/primitives/buttons/button.js +15 -0
  264. package/dist/core/animate-ui/primitives/effects/highlight.js +407 -0
  265. package/dist/core/animate-ui/primitives/radix/accordion.js +76 -0
  266. package/dist/core/animate-ui/primitives/radix/dialog.js +136 -0
  267. package/dist/core/animate-ui/primitives/radix/dropdown-menu.js +305 -0
  268. package/dist/core/animate-ui/primitives/radix/sheet.js +165 -0
  269. package/dist/core/animate-ui/primitives/radix/switch.js +86 -0
  270. package/dist/core/animate-ui/primitives/radix/toggle-group.js +100 -0
  271. package/dist/core/animate-ui/primitives/texts/counting-number.js +75 -0
  272. package/dist/core/avatar.js +32 -0
  273. package/dist/core/badge.js +27 -0
  274. package/dist/core/breadcrumb.js +62 -0
  275. package/dist/core/button/button.js +43 -0
  276. package/dist/core/button/craft-button.js +78 -0
  277. package/dist/core/button-group.js +38 -0
  278. package/dist/core/button.js +40 -0
  279. package/dist/core/card.js +42 -0
  280. package/dist/core/carousel/carousel.js +149 -0
  281. package/dist/core/checkbox/motion-checkbox.js +103 -0
  282. package/dist/core/collapsible.js +54 -0
  283. package/dist/core/combobox/combobox.js +85 -0
  284. package/dist/core/command.js +61 -0
  285. package/dist/core/field-end-icons.js +36 -0
  286. package/dist/core/field-label-row.js +33 -0
  287. package/dist/core/form.js +92 -0
  288. package/dist/core/hooks/use-controlled-state.js +27 -0
  289. package/dist/core/hooks/use-data-state.js +39 -0
  290. package/dist/core/hooks/use-is-in-view.js +18 -0
  291. package/dist/core/hooks/use-mobile.js +19 -0
  292. package/dist/core/hooks/use-reveal-on-scroll-up.js +141 -0
  293. package/dist/core/hooks/use-scroll-overflow.js +50 -0
  294. package/dist/core/index.js +18 -52
  295. package/dist/core/input/input-password.js +30 -0
  296. package/dist/core/input/input.js +147 -0
  297. package/dist/core/input-otp/input-otp.js +183 -0
  298. package/dist/core/label.js +15 -0
  299. package/dist/core/popover.js +31 -0
  300. package/dist/core/scroll-area.js +42 -0
  301. package/dist/core/select.js +121 -0
  302. package/dist/core/separator.js +40 -0
  303. package/dist/core/skeleton.js +11 -0
  304. package/dist/core/table.js +59 -0
  305. package/dist/core/textarea/textarea.js +97 -0
  306. package/dist/core/utils/get-strict-context.js +18 -0
  307. package/dist/index.js +148 -9
  308. package/dist/layouts/entry-layout/entry-layout-bg.js +4 -0
  309. package/dist/layouts/entry-layout/entry-layout.js +52 -0
  310. package/dist/layouts/index.js +7 -6
  311. package/dist/layouts/workspace-layout/account-menu/account-menu.js +108 -0
  312. package/dist/layouts/workspace-layout/breadcrumbs/derive-breadcrumbs.js +37 -0
  313. package/dist/layouts/workspace-layout/breadcrumbs/workspace-breadcrumbs.js +22 -0
  314. package/dist/layouts/workspace-layout/footer/footer.js +15 -0
  315. package/dist/layouts/workspace-layout/header/header.js +54 -0
  316. package/dist/layouts/workspace-layout/workspace-layout.js +157 -0
  317. package/dist/tailwind-preset.js +3 -4
  318. package/dist/utils/cn.js +8 -0
  319. package/dist/utils/color.js +72 -0
  320. package/dist/utils/index.js +3 -2
  321. package/dist/utils/path-match.js +17 -0
  322. package/dist/utils/silver-shine.js +63 -0
  323. package/dist/utils/variant-gradient-underlay.js +45 -0
  324. package/dist/utils/variant.js +426 -0
  325. package/package.json +7 -4
  326. package/dist/chunk-2GDYZAKR.js +0 -505
  327. package/dist/chunk-ALCWXFUC.js +0 -733
  328. package/dist/chunk-CDHBLANU.js +0 -59
  329. package/dist/chunk-LUESSJAF.js +0 -70068
  330. package/dist/chunk-TMORRNEB.js +0 -323
  331. package/dist/chunk-TRTQSARU.js +0 -31
  332. package/dist/chunk-VU4CZ76T.js +0 -43
  333. package/dist/chunk-XNLCVHBC.js +0 -364
  334. package/dist/chunk-Z4776NRY.js +0 -4347
  335. package/src/assets/illustrations/add-to-group.svg +0 -32
  336. package/src/assets/illustrations/chip.svg +0 -51
  337. package/src/assets/illustrations/create-new-group.svg +0 -27
  338. package/src/assets/illustrations/new-ota.svg +0 -61
  339. package/src/assets/illustrations/secured-key.svg +0 -48
  340. /package/dist/assets/{entry-layout-bg-JPI7GJ42.webp → entry-layout-bg-DUM0UhT3.webp} +0 -0
@@ -1,6 +1,7 @@
1
- export { AccountMenu, EntryLayout, Footer as WorkspaceFooter, Header as WorkspaceHeader, WorkspaceLayout } from '../chunk-2GDYZAKR.js';
2
- import '../chunk-TMORRNEB.js';
3
- export { isSidebarGroup } from '../chunk-Z4776NRY.js';
4
- import '../chunk-XNLCVHBC.js';
5
- import '../chunk-VU4CZ76T.js';
6
- import '../chunk-TRTQSARU.js';
1
+ import { isSidebarGroup } from "../components/sidebar/types.js";
2
+ import Header from "./workspace-layout/header/header.js";
3
+ import Footer from "./workspace-layout/footer/footer.js";
4
+ import AccountMenu from "./workspace-layout/account-menu/account-menu.js";
5
+ import WorkspaceLayout from "./workspace-layout/workspace-layout.js";
6
+ import EntryLayout from "./entry-layout/entry-layout.js";
7
+ export { AccountMenu, EntryLayout, Footer as WorkspaceFooter, Header as WorkspaceHeader, WorkspaceLayout, isSidebarGroup };
@@ -0,0 +1,108 @@
1
+ import { DropdownMenuItem } from "../../../core/animate-ui/components/radix/dropdown-menu.js";
2
+ import ProfileCard from "../../../common/profile-card/profile-card.js";
3
+ import MyAccountMenu from "../../../common/my-account-menu/my-account-menu.js";
4
+ import { useMemo } from "react";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { Check, Globe, LogOut, Palette } from "lucide-react";
7
+ //#region src/layouts/workspace-layout/account-menu/account-menu.tsx
8
+ function AccountMenu({ userName, userEmail, userProfilePictureUrl, avatarBadgeColor, onLogoutClick, onProfileCardClick, onColorThemeChange, colorTheme, onLanguageChange, languages, currentLanguage, additionalItems }) {
9
+ const menuItems = useMemo(() => {
10
+ const groups = [];
11
+ if (userName || userEmail) {
12
+ const profileCard = /* @__PURE__ */ jsx(ProfileCard, {
13
+ name: userName,
14
+ email: userEmail,
15
+ imageUrl: userProfilePictureUrl
16
+ }, "profile");
17
+ groups.push({
18
+ id: "profile",
19
+ items: [onProfileCardClick ? /* @__PURE__ */ jsx("div", {
20
+ className: "-mx-2.5 -my-1.5",
21
+ children: /* @__PURE__ */ jsx(DropdownMenuItem, {
22
+ onSelect: onProfileCardClick,
23
+ className: "px-2.5 py-1.5 cursor-pointer *:flex-1 *:min-w-0",
24
+ children: profileCard
25
+ })
26
+ }, "profile") : profileCard]
27
+ });
28
+ }
29
+ if (onColorThemeChange) {
30
+ const isDark = colorTheme === "dark";
31
+ const themeItems = [{
32
+ id: "theme-dark",
33
+ label: "Dark mode",
34
+ endIcon: isDark ? /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) : void 0,
35
+ isSelected: isDark,
36
+ onClick: () => onColorThemeChange("dark")
37
+ }, {
38
+ id: "theme-light",
39
+ label: "Light mode",
40
+ endIcon: !isDark ? /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) : void 0,
41
+ isSelected: !isDark,
42
+ onClick: () => onColorThemeChange("light")
43
+ }];
44
+ groups.push({
45
+ id: "theme",
46
+ items: [{
47
+ id: "color-theme",
48
+ label: "Color theme",
49
+ startIcon: /* @__PURE__ */ jsx(Palette, { className: "h-4 w-4" }),
50
+ items: themeItems
51
+ }]
52
+ });
53
+ }
54
+ if (onLanguageChange && languages?.length) {
55
+ const langItems = languages.map((lang) => ({
56
+ id: `lang-${lang.code}`,
57
+ label: lang.label,
58
+ endIcon: lang.code === currentLanguage ? /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) : void 0,
59
+ isSelected: lang.code === currentLanguage,
60
+ onClick: () => onLanguageChange(lang.code)
61
+ }));
62
+ groups.push({
63
+ id: "language",
64
+ items: [{
65
+ id: "language",
66
+ label: "Language",
67
+ startIcon: /* @__PURE__ */ jsx(Globe, { className: "h-4 w-4" }),
68
+ items: langItems
69
+ }]
70
+ });
71
+ }
72
+ if (additionalItems?.length) groups.push(...additionalItems);
73
+ if (onLogoutClick) groups.push({
74
+ id: "logout",
75
+ items: [{
76
+ id: "logout",
77
+ label: "Logout",
78
+ startIcon: /* @__PURE__ */ jsx(LogOut, { className: "h-4 w-4" }),
79
+ color: "error",
80
+ onClick: onLogoutClick
81
+ }]
82
+ });
83
+ return groups;
84
+ }, [
85
+ userName,
86
+ userEmail,
87
+ userProfilePictureUrl,
88
+ onProfileCardClick,
89
+ onColorThemeChange,
90
+ colorTheme,
91
+ onLanguageChange,
92
+ languages,
93
+ currentLanguage,
94
+ additionalItems,
95
+ onLogoutClick
96
+ ]);
97
+ if (menuItems.length === 0) return null;
98
+ return /* @__PURE__ */ jsx(MyAccountMenu, {
99
+ name: userName,
100
+ email: userEmail,
101
+ imageUrl: userProfilePictureUrl,
102
+ badgeColor: avatarBadgeColor,
103
+ menuItems,
104
+ minWidth: "220px"
105
+ });
106
+ }
107
+ //#endregion
108
+ export { AccountMenu as default };
@@ -0,0 +1,37 @@
1
+ import { isPathPrefixOf } from "../../../utils/path-match.js";
2
+ import { isSidebarGroup } from "../../../components/sidebar/types.js";
3
+ //#region src/layouts/workspace-layout/breadcrumbs/derive-breadcrumbs.ts
4
+ function labelFromPath(path) {
5
+ const last = path.split("/").filter(Boolean).pop();
6
+ if (!last) return "Home";
7
+ return last.charAt(0).toUpperCase() + last.slice(1).replace(/-/g, " ");
8
+ }
9
+ function deriveBreadcrumbs(groups, currentPath, indexPath) {
10
+ const matches = [];
11
+ if (indexPath && isPathPrefixOf(indexPath, currentPath)) {
12
+ if (!groups.some((entry) => {
13
+ if (isSidebarGroup(entry)) return entry.items.some((item) => item.path === indexPath);
14
+ return entry.path === indexPath;
15
+ })) matches.push({
16
+ label: labelFromPath(indexPath),
17
+ path: indexPath
18
+ });
19
+ }
20
+ for (const entry of groups) if (isSidebarGroup(entry)) {
21
+ for (const item of entry.items) if (isPathPrefixOf(item.path, currentPath)) matches.push({
22
+ label: item.label,
23
+ path: item.path
24
+ });
25
+ } else if (isPathPrefixOf(entry.path, currentPath)) matches.push({
26
+ label: entry.label,
27
+ path: entry.path
28
+ });
29
+ if (matches.length === 0) return [];
30
+ matches.sort((a, b) => a.path.length - b.path.length);
31
+ return matches.map((match) => ({
32
+ label: match.label,
33
+ path: match.path === currentPath ? void 0 : match.path
34
+ }));
35
+ }
36
+ //#endregion
37
+ export { deriveBreadcrumbs };
@@ -0,0 +1,22 @@
1
+ import { useSidebar } from "../../../core/animate-ui/components/radix/sidebar.js";
2
+ import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "../../../core/breadcrumb.js";
3
+ import React from "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ //#region src/layouts/workspace-layout/breadcrumbs/workspace-breadcrumbs.tsx
6
+ function WorkspaceBreadcrumbs({ items, linkComponent: LinkComponent, collapseOnMobile = false }) {
7
+ const { isMobile } = useSidebar();
8
+ if (items.length === 0) return null;
9
+ const visibleItems = collapseOnMobile && isMobile ? items.slice(-1) : items;
10
+ return /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsx(BreadcrumbList, { children: visibleItems.map((item, index) => {
11
+ const isLast = index === visibleItems.length - 1;
12
+ return /* @__PURE__ */ jsxs(React.Fragment, { children: [/* @__PURE__ */ jsx(BreadcrumbItem, { children: item.path ? /* @__PURE__ */ jsx(BreadcrumbLink, {
13
+ asChild: true,
14
+ children: /* @__PURE__ */ jsx(LinkComponent, {
15
+ to: item.path,
16
+ children: item.label
17
+ })
18
+ }) : /* @__PURE__ */ jsx(BreadcrumbPage, { children: item.label }) }), !isLast && /* @__PURE__ */ jsx(BreadcrumbSeparator, {})] }, item.path ?? index);
19
+ }) }) });
20
+ }
21
+ //#endregion
22
+ export { WorkspaceBreadcrumbs as default };
@@ -0,0 +1,15 @@
1
+ import { cn } from "../../../utils/cn.js";
2
+ import FooterCard from "../../../common/footer-card/footer-card.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/layouts/workspace-layout/footer/footer.tsx
5
+ function Footer({ hidden = false }) {
6
+ return /* @__PURE__ */ jsx("footer", {
7
+ className: cn("bg-sidebar", hidden ? "h-[var(--espd-hidden-footer-height)]" : "h-[var(--espd-footer-height)]"),
8
+ children: !hidden && /* @__PURE__ */ jsx("div", {
9
+ className: "text-[10px] text-muted-foreground h-full flex items-center justify-center tracking-normal",
10
+ children: /* @__PURE__ */ jsx(FooterCard, {})
11
+ })
12
+ });
13
+ }
14
+ //#endregion
15
+ export { Footer as default };
@@ -0,0 +1,54 @@
1
+ import { cn } from "../../../utils/cn.js";
2
+ import { Button } from "../../../core/button.js";
3
+ import { SidebarTrigger, useSidebar } from "../../../core/animate-ui/components/radix/sidebar.js";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { Menu } from "lucide-react";
6
+ //#region src/layouts/workspace-layout/header/header.tsx
7
+ function Header({ leftContent, rightContent, endContent, showSidebarTrigger = false, mobileLogo }) {
8
+ const { state, isMobile, toggleSidebar } = useSidebar();
9
+ const sidebarWidth = state === "collapsed" ? "calc(var(--espd-sidebar-width-collapsed) - 1px)" : "calc(var(--espd-sidebar-width) - 1px)";
10
+ return /* @__PURE__ */ jsx("header", {
11
+ className: "fixed top-0 z-50 border-b backdrop-blur supports-[backdrop-filter]:bg-header transition-[left,width] duration-200 ease-linear border-header-border",
12
+ style: {
13
+ left: isMobile ? 0 : `calc(${sidebarWidth})`,
14
+ width: isMobile ? "100%" : `calc(100% - ${sidebarWidth})`,
15
+ height: "var(--espd-header-height)"
16
+ },
17
+ children: /* @__PURE__ */ jsxs("div", {
18
+ className: "flex h-full items-center gap-3 pr-4",
19
+ children: [
20
+ showSidebarTrigger && /* @__PURE__ */ jsx("div", {
21
+ className: "sidebar-trigger shrink-0",
22
+ children: isMobile ? /* @__PURE__ */ jsxs(Button, {
23
+ variant: "ghost",
24
+ size: "icon",
25
+ className: "size-10",
26
+ onClick: toggleSidebar,
27
+ children: [/* @__PURE__ */ jsx(Menu, { className: "!size-6" }), /* @__PURE__ */ jsx("span", {
28
+ className: "sr-only",
29
+ children: "Toggle Sidebar"
30
+ })]
31
+ }) : /* @__PURE__ */ jsx(SidebarTrigger, {})
32
+ }),
33
+ isMobile && mobileLogo && /* @__PURE__ */ jsx("div", {
34
+ className: "mobile-logo shrink-0",
35
+ children: mobileLogo
36
+ }),
37
+ leftContent && /* @__PURE__ */ jsx("div", {
38
+ className: cn("min-w-0", !rightContent && "flex-1"),
39
+ children: leftContent
40
+ }),
41
+ rightContent && /* @__PURE__ */ jsx("div", {
42
+ className: "flex-1 min-w-0",
43
+ children: rightContent
44
+ }),
45
+ endContent && /* @__PURE__ */ jsx("div", {
46
+ className: "shrink-0 ml-auto flex items-center gap-2",
47
+ children: endContent
48
+ })
49
+ ]
50
+ })
51
+ });
52
+ }
53
+ //#endregion
54
+ export { Header as default };
@@ -0,0 +1,157 @@
1
+ import { SidebarInset, SidebarProvider, useSidebar } from "../../core/animate-ui/components/radix/sidebar.js";
2
+ import Sidebar from "../../components/sidebar/sidebar.js";
3
+ import AppLogo from "../../common/app-logo/app-logo.js";
4
+ import Header from "./header/header.js";
5
+ import Footer from "./footer/footer.js";
6
+ import AccountMenu from "./account-menu/account-menu.js";
7
+ import WorkspaceBreadcrumbs from "./breadcrumbs/workspace-breadcrumbs.js";
8
+ import { deriveBreadcrumbs } from "./breadcrumbs/derive-breadcrumbs.js";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ //#region src/layouts/workspace-layout/workspace-layout.tsx
11
+ function renderLogoForState({ logo, logoCollapsed, logoAssets, appName, darkMode, collapsed }) {
12
+ const nodeOverride = collapsed ? logoCollapsed ?? logo : logo;
13
+ if (nodeOverride !== void 0) return nodeOverride;
14
+ if (logoAssets) return /* @__PURE__ */ jsx(AppLogo, {
15
+ logo: logoAssets,
16
+ darkMode,
17
+ minimal: collapsed
18
+ });
19
+ if (appName) return /* @__PURE__ */ jsx(AppLogo, {
20
+ name: appName,
21
+ darkMode,
22
+ minimal: collapsed
23
+ });
24
+ return null;
25
+ }
26
+ function SidebarLogo({ logo, logoCollapsed, logoAssets, appName, darkMode, indexPath, linkComponent: LinkComponent }) {
27
+ const { state, isMobile } = useSidebar();
28
+ const node = renderLogoForState({
29
+ logo,
30
+ logoCollapsed,
31
+ logoAssets,
32
+ appName,
33
+ darkMode,
34
+ collapsed: state === "collapsed" && !isMobile
35
+ });
36
+ if (node === null) return null;
37
+ if (indexPath && LinkComponent) return /* @__PURE__ */ jsx(LinkComponent, {
38
+ to: indexPath,
39
+ className: "no-underline",
40
+ children: node
41
+ });
42
+ return node;
43
+ }
44
+ function EspressifFooterBranding({ darkMode }) {
45
+ const { state } = useSidebar();
46
+ return /* @__PURE__ */ jsx("a", {
47
+ href: "https://www.espressif.com/",
48
+ target: "_blank",
49
+ rel: "noopener noreferrer",
50
+ className: "no-underline flex justify-center w-full opacity-25 transition-opacity duration-500 ease-in-out hover:opacity-100",
51
+ "aria-label": "Espressif",
52
+ children: /* @__PURE__ */ jsx(AppLogo, {
53
+ width: 120,
54
+ darkMode,
55
+ minimal: state === "collapsed"
56
+ })
57
+ });
58
+ }
59
+ function WorkspaceLayout({ appName, logo, logoCollapsed, logoMobile, logoAssets, footerBranding, children, sidebarConfig, headerConfig, footerConfig, sidebarOpen, defaultSidebarOpen, onSidebarOpenChange, onLogoutClick, onProfileCardClick, onColorThemeChange, colorTheme, onLanguageChange, languages, currentLanguage, accountMenuItems, hideBreadcrumbs }) {
60
+ const SidebarLinkComp = sidebarConfig.linkComponent;
61
+ const hideFooter = footerConfig?.hidden ?? false;
62
+ const darkMode = colorTheme === "dark";
63
+ const contentHeight = hideFooter ? "calc(100vh - var(--espd-header-height) - var(--espd-hidden-footer-height))" : "calc(100vh - var(--espd-header-height) - var(--espd-footer-height))";
64
+ const breadcrumbItems = hideBreadcrumbs ? [] : headerConfig?.breadcrumbs ?? deriveBreadcrumbs(sidebarConfig.items, sidebarConfig.currentPath, sidebarConfig.indexPath);
65
+ const mobileLogoNode = logoMobile ?? (logoAssets ? /* @__PURE__ */ jsx(AppLogo, {
66
+ logo: logoAssets,
67
+ darkMode,
68
+ minimal: true,
69
+ width: 24
70
+ }) : appName ? /* @__PURE__ */ jsx(AppLogo, {
71
+ name: appName,
72
+ darkMode,
73
+ minimal: true,
74
+ width: 24
75
+ }) : null);
76
+ const mobileLogo = mobileLogoNode && sidebarConfig.indexPath ? /* @__PURE__ */ jsx(SidebarLinkComp, {
77
+ to: sidebarConfig.indexPath,
78
+ className: "no-underline",
79
+ children: mobileLogoNode
80
+ }) : mobileLogoNode;
81
+ const headerLeftContent = breadcrumbItems.length > 0 ? /* @__PURE__ */ jsx(WorkspaceBreadcrumbs, {
82
+ items: breadcrumbItems,
83
+ linkComponent: SidebarLinkComp,
84
+ collapseOnMobile: headerConfig?.collapseBreadcrumbsOnMobile ?? false
85
+ }) : null;
86
+ let footerBrandingNode = null;
87
+ if (footerBranding === false) footerBrandingNode = null;
88
+ else if (footerBranding !== void 0) footerBrandingNode = footerBranding;
89
+ else if (appName && sidebarConfig.hideCompanyBranding !== true) footerBrandingNode = /* @__PURE__ */ jsx(EspressifFooterBranding, { darkMode });
90
+ const sidebarFooter = sidebarConfig.footer != null || footerBrandingNode != null ? /* @__PURE__ */ jsxs("div", {
91
+ className: "flex flex-col gap-2 w-full",
92
+ children: [sidebarConfig.footer, footerBrandingNode]
93
+ }) : void 0;
94
+ const accountMenu = /* @__PURE__ */ jsx(AccountMenu, {
95
+ userName: headerConfig?.userName,
96
+ userEmail: headerConfig?.userEmail,
97
+ userProfilePictureUrl: headerConfig?.userProfilePictureUrl,
98
+ avatarBadgeColor: headerConfig?.avatarBadgeColor,
99
+ onLogoutClick,
100
+ onProfileCardClick,
101
+ onColorThemeChange,
102
+ colorTheme,
103
+ onLanguageChange,
104
+ languages,
105
+ currentLanguage,
106
+ additionalItems: accountMenuItems
107
+ });
108
+ return /* @__PURE__ */ jsxs(SidebarProvider, {
109
+ open: sidebarOpen,
110
+ defaultOpen: defaultSidebarOpen,
111
+ onOpenChange: onSidebarOpenChange,
112
+ children: [/* @__PURE__ */ jsx(Sidebar, {
113
+ items: sidebarConfig.items,
114
+ currentPath: sidebarConfig.currentPath,
115
+ header: /* @__PURE__ */ jsx(SidebarLogo, {
116
+ logo,
117
+ logoCollapsed,
118
+ logoAssets,
119
+ appName,
120
+ darkMode,
121
+ indexPath: sidebarConfig.indexPath,
122
+ linkComponent: SidebarLinkComp
123
+ }),
124
+ headerHeight: "var(--espd-header-height)",
125
+ footer: sidebarFooter,
126
+ linkComponent: SidebarLinkComp,
127
+ collapsible: sidebarConfig.allowCollapsible ? "icon" : "none",
128
+ variant: sidebarConfig.variant,
129
+ focusActiveGroup: sidebarConfig.focusActiveGroup
130
+ }), /* @__PURE__ */ jsxs(SidebarInset, {
131
+ className: "overflow-hidden h-dvh max-h-dvh",
132
+ children: [
133
+ /* @__PURE__ */ jsx(Header, {
134
+ leftContent: headerLeftContent,
135
+ rightContent: headerConfig?.rightContent,
136
+ endContent: accountMenu,
137
+ showSidebarTrigger: sidebarConfig.allowCollapsible,
138
+ mobileLogo
139
+ }),
140
+ /* @__PURE__ */ jsx("div", {
141
+ className: "flex flex-1 flex-col gap-4 bg-sidebar",
142
+ style: {
143
+ paddingTop: "var(--espd-header-height)",
144
+ height: contentHeight
145
+ },
146
+ children: /* @__PURE__ */ jsx("main", {
147
+ className: "flex-1 bg-background h-full overflow-y-auto md:rounded-tl-2xl md:rounded-bl-2xl pb-10",
148
+ children
149
+ })
150
+ }),
151
+ /* @__PURE__ */ jsx(Footer, { hidden: hideFooter })
152
+ ]
153
+ })]
154
+ });
155
+ }
156
+ //#endregion
157
+ export { WorkspaceLayout as default };
@@ -1,5 +1,3 @@
1
- import './chunk-TRTQSARU.js';
2
-
3
1
  // tailwind.preset.ts
4
2
  var espPreset = {
5
3
  darkMode: "class",
@@ -113,5 +111,6 @@ var espPreset = {
113
111
  }
114
112
  };
115
113
  var tailwind_preset_default = espPreset;
116
-
117
- export { tailwind_preset_default as default };
114
+ export {
115
+ tailwind_preset_default as default
116
+ };
@@ -0,0 +1,8 @@
1
+ import { clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+ //#region src/utils/cn.ts
4
+ function cn(...inputs) {
5
+ return twMerge(clsx(inputs));
6
+ }
7
+ //#endregion
8
+ export { cn };
@@ -0,0 +1,72 @@
1
+ //#region src/utils/color.ts
2
+ var PRESET_COLORS = /* @__PURE__ */ new Set([
3
+ "primary",
4
+ "secondary",
5
+ "error",
6
+ "info",
7
+ "success",
8
+ "warning",
9
+ "disabled",
10
+ "gray",
11
+ "mist"
12
+ ]);
13
+ function isPresetColor(color) {
14
+ return PRESET_COLORS.has(color);
15
+ }
16
+ var presetClassMap = {
17
+ primary: {
18
+ bg: "bg-primary",
19
+ text: "text-primary",
20
+ border: "border-primary"
21
+ },
22
+ secondary: {
23
+ bg: "bg-secondary",
24
+ text: "text-secondary",
25
+ border: "border-secondary"
26
+ },
27
+ error: {
28
+ bg: "bg-error",
29
+ text: "text-error",
30
+ border: "border-error"
31
+ },
32
+ info: {
33
+ bg: "bg-info",
34
+ text: "text-info",
35
+ border: "border-info"
36
+ },
37
+ success: {
38
+ bg: "bg-success",
39
+ text: "text-success",
40
+ border: "border-success"
41
+ },
42
+ warning: {
43
+ bg: "bg-warning",
44
+ text: "text-warning",
45
+ border: "border-warning"
46
+ },
47
+ disabled: {
48
+ bg: "bg-disabled",
49
+ text: "text-disabled",
50
+ border: "border-disabled"
51
+ },
52
+ gray: {
53
+ bg: "bg-gray",
54
+ text: "text-gray",
55
+ border: "border-input"
56
+ },
57
+ mist: {
58
+ bg: "bg-mist",
59
+ text: "text-mist",
60
+ border: "border-mist-border"
61
+ }
62
+ };
63
+ /**
64
+ * Resolve a `Color` value to either a Tailwind class (for presets) or an
65
+ * inline style object (for arbitrary CSS color strings).
66
+ */
67
+ function resolveColor(color, target) {
68
+ if (isPresetColor(color)) return { className: presetClassMap[color][target] };
69
+ return { style: { [target === "bg" ? "backgroundColor" : target === "text" ? "color" : "borderColor"]: color } };
70
+ }
71
+ //#endregion
72
+ export { isPresetColor, resolveColor };
@@ -1,2 +1,3 @@
1
- export { cn, isPresetColor, resolveColor } from '../chunk-VU4CZ76T.js';
2
- import '../chunk-TRTQSARU.js';
1
+ import { cn } from "./cn.js";
2
+ import { isPresetColor, resolveColor } from "./color.js";
3
+ export { cn, isPresetColor, resolveColor };
@@ -0,0 +1,17 @@
1
+ //#region src/utils/path-match.ts
2
+ /**
3
+ * Segment-aware "is `prefix` an ancestor of (or equal to) `fullPath`" test.
4
+ *
5
+ * A plain `fullPath.startsWith(prefix)` would treat sibling routes whose names share a
6
+ * leading substring as parent/child — `/components/input` would match
7
+ * `/components/input-password`. Requiring the boundary to fall on a `/` keeps
8
+ * `/home/nodes` matching `/home/nodes/123` while leaving `/home/nodes-archive` alone.
9
+ *
10
+ * Internal helper: not exported from `src/utils/index.ts` (the public `/utils` entry).
11
+ */
12
+ function isPathPrefixOf(prefix, fullPath) {
13
+ if (prefix === fullPath) return true;
14
+ return fullPath.startsWith(prefix) && (prefix.endsWith("/") || fullPath[prefix.length] === "/");
15
+ }
16
+ //#endregion
17
+ export { isPathPrefixOf };
@@ -0,0 +1,63 @@
1
+ import { cn } from "./cn.js";
2
+ import "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/utils/silver-shine.tsx
5
+ /**
6
+ * Static metallic gradient overlay layer used when `color === "silver"`. Stacks above the
7
+ * variant container surface (and above any gradient underlay layers). Pointer-events disabled
8
+ * so it never blocks interaction.
9
+ *
10
+ * Two visual ingredients:
11
+ * - A subtle diagonal `linear-gradient` that mimics light bouncing off brushed metal.
12
+ * - An inset `box-shadow` that paints a 1px metallic bezel inside the rounded surface.
13
+ *
14
+ * Both use fixed `rgba(...)` values so the look is consistent in light + dark themes without
15
+ * needing extra theme tokens.
16
+ */
17
+ var SILVER_SHINE_OVERLAY_CLASS = cn("pointer-events-none absolute inset-0 -z-10 rounded-[inherit]", "bg-[linear-gradient(135deg,rgba(255,255,255,0.10)_0%,rgba(255,255,255,0.02)_35%,rgba(0,0,0,0.04)_70%,rgba(255,255,255,0.06)_100%)]");
18
+ var SILVER_SHINE_OVERLAY_STYLE = { boxShadow: "inset 0 0 0 1px rgba(255,255,255,0.18), inset 0 -1px 0 rgba(0,0,0,0.08)" };
19
+ function SilverShineOverlay() {
20
+ return /* @__PURE__ */ jsx("span", {
21
+ "aria-hidden": true,
22
+ className: SILVER_SHINE_OVERLAY_CLASS,
23
+ style: SILVER_SHINE_OVERLAY_STYLE
24
+ });
25
+ }
26
+ /**
27
+ * Metallic linear-gradient applied to the surface fill (with a soft inset bezel) for
28
+ * `color="silver"` + `variant="solid"`. Layered on top of `bg-gray` so the underlying gray
29
+ * tint controls the base hue and the gradient adds the polished-metal sheen.
30
+ */
31
+ var SILVER_SOLID_SURFACE_STYLE = {
32
+ backgroundImage: "linear-gradient(135deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.04) 35%, rgba(0,0,0,0.12) 70%, rgba(255,255,255,0.14) 100%)",
33
+ boxShadow: "inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -1px 0 rgba(0,0,0,0.18)"
34
+ };
35
+ /**
36
+ * Metallic ring drawn as a 1px gradient border with a *truly transparent* interior, used for
37
+ * `color="silver"` + `variant="outline"`. Uses the `mask-composite` ring trick:
38
+ *
39
+ * - The overlay paints the metallic gradient over its entire `padding-box`.
40
+ * - Two mask layers (one clipped to `content-box`, one to the default `border-box`) combined
41
+ * with `mask-composite: exclude` (`-webkit-mask-composite: xor`) leave only the 1px ring at
42
+ * the edge visible.
43
+ *
44
+ * The container itself stays unbordered and transparent so whatever sits behind shows through
45
+ * the inside of the ring (real transparency, not "matches the page bg").
46
+ *
47
+ * In `.dark`, a separate low-luminance gradient replaces the light metallic fill so the 1px ring
48
+ * does not read as a bright halo (inline `background` + opacity was insufficient).
49
+ */
50
+ function SilverMetallicBorderOverlay() {
51
+ return /* @__PURE__ */ jsx("span", {
52
+ "aria-hidden": true,
53
+ className: cn("pointer-events-none absolute inset-0 rounded-[inherit] p-px", "bg-[linear-gradient(135deg,rgba(230,230,230,0.95)_0%,rgba(190,190,190,0.70)_28%,rgba(248,248,248,0.95)_52%,rgba(175,175,175,0.70)_76%,rgba(225,225,225,0.95)_100%)]", "dark:bg-[linear-gradient(135deg,rgba(255,255,255,0.05)_0%,rgba(110,110,110,0.28)_32%,rgba(255,255,255,0.07)_52%,rgba(70,70,70,0.24)_72%,rgba(180,180,180,0.09)_100%)]"),
54
+ style: {
55
+ WebkitMask: "linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",
56
+ WebkitMaskComposite: "xor",
57
+ mask: "linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",
58
+ maskComposite: "exclude"
59
+ }
60
+ });
61
+ }
62
+ //#endregion
63
+ export { SILVER_SHINE_OVERLAY_CLASS, SILVER_SHINE_OVERLAY_STYLE, SILVER_SOLID_SURFACE_STYLE, SilverMetallicBorderOverlay, SilverShineOverlay };
@@ -0,0 +1,45 @@
1
+ import { cn } from "./cn.js";
2
+ import { SilverMetallicBorderOverlay, SilverShineOverlay } from "./silver-shine.js";
3
+ import { VARIANT_GRADIENT_BACKDROP_BASE, VARIANT_GRADIENT_HOVER_OVERLAY_CLASS } from "./variant.js";
4
+ import "react";
5
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
6
+ //#region src/utils/variant-gradient-underlay.tsx
7
+ /**
8
+ * Smooth gradient hover uses two stacked backgrounds and fades the hover layer in with
9
+ * `opacity` (`group-hover`). Two different `background-image` values on one element cannot
10
+ * interpolate in CSS.
11
+ */
12
+ function VariantGradientUnderlay({ layers, layersInline, silverShine = false, silverBorder = false }) {
13
+ const shine = silverShine ? /* @__PURE__ */ jsx(SilverShineOverlay, {}) : null;
14
+ const border = silverBorder ? /* @__PURE__ */ jsx(SilverMetallicBorderOverlay, {}) : null;
15
+ if (layers != null) return /* @__PURE__ */ jsxs(Fragment$1, { children: [
16
+ /* @__PURE__ */ jsx("span", {
17
+ "aria-hidden": true,
18
+ className: cn(VARIANT_GRADIENT_BACKDROP_BASE, layers.idle)
19
+ }),
20
+ /* @__PURE__ */ jsx("span", {
21
+ "aria-hidden": true,
22
+ className: cn(VARIANT_GRADIENT_BACKDROP_BASE, layers.hover, VARIANT_GRADIENT_HOVER_OVERLAY_CLASS)
23
+ }),
24
+ shine,
25
+ border
26
+ ] });
27
+ if (layersInline != null) return /* @__PURE__ */ jsxs(Fragment$1, { children: [
28
+ /* @__PURE__ */ jsx("span", {
29
+ "aria-hidden": true,
30
+ className: VARIANT_GRADIENT_BACKDROP_BASE,
31
+ style: layersInline.idle
32
+ }),
33
+ /* @__PURE__ */ jsx("span", {
34
+ "aria-hidden": true,
35
+ className: cn(VARIANT_GRADIENT_BACKDROP_BASE, VARIANT_GRADIENT_HOVER_OVERLAY_CLASS),
36
+ style: layersInline.hover
37
+ }),
38
+ shine,
39
+ border
40
+ ] });
41
+ if (shine || border) return /* @__PURE__ */ jsxs(Fragment$1, { children: [shine, border] });
42
+ return null;
43
+ }
44
+ //#endregion
45
+ export { VariantGradientUnderlay };