origam 2.5.0 → 2.6.1

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 (523) hide show
  1. package/dist/src/assets/css/tokens/dark.css +3788 -3768
  2. package/dist/src/assets/css/tokens/light.css +1894 -1884
  3. package/dist/src/assets/css/tokens/primitive.css +2 -0
  4. package/dist/src/assets/css/tokens/themes-all.css +44226 -0
  5. package/dist/src/assets/locales/en.json +34 -2
  6. package/dist/src/assets/locales/fr.json +34 -2
  7. package/dist/src/assets/scss/tokens/_dark.scss +1894 -1884
  8. package/dist/src/assets/scss/tokens/_light.scss +1894 -1884
  9. package/dist/src/assets/scss/tokens/_primitive.scss +2 -0
  10. package/dist/src/assets/scss/tokens/_themes-all.scss +44241 -0
  11. package/dist/src/components/Alert/OrigamAlert.vue +16 -21
  12. package/dist/src/components/App/OrigamApp.vue +7 -38
  13. package/dist/src/components/App/OrigamAppBar.vue +35 -17
  14. package/dist/src/components/Audio/OrigamAudio.vue +77 -6
  15. package/dist/src/components/Avatar/OrigamAvatar.vue +11 -9
  16. package/dist/src/components/Avatar/OrigamAvatarGroup.vue +26 -8
  17. package/dist/src/components/Badge/OrigamBadge.vue +13 -3
  18. package/dist/src/components/Blockquote/OrigamBlockquote.vue +137 -13
  19. package/dist/src/components/BottomNav/OrigamBottomNav.vue +34 -4
  20. package/dist/src/components/Bracket/OrigamBracket.vue +386 -64
  21. package/dist/src/components/Bracket/OrigamBracketCompetitor.vue +190 -13
  22. package/dist/src/components/Bracket/OrigamBracketMatch.vue +197 -42
  23. package/dist/src/components/Bracket/OrigamBracketRound.vue +11 -3
  24. package/dist/src/components/Breadcrumb/OrigamBreadcrumb.vue +14 -12
  25. package/dist/src/components/Breadcrumb/OrigamBreadcrumbDivider.vue +4 -1
  26. package/dist/src/components/Breadcrumb/OrigamBreadcrumbItem.vue +3 -5
  27. package/dist/src/components/Btn/OrigamBtn.vue +69 -30
  28. package/dist/src/components/Btn/OrigamBtnGroup.vue +33 -7
  29. package/dist/src/components/Btn/OrigamBtnToggle.vue +4 -7
  30. package/dist/src/components/Calendar/OrigamCalendar.vue +785 -658
  31. package/dist/src/components/Card/OrigamCard.vue +24 -3
  32. package/dist/src/components/Card/OrigamCardHeader.vue +17 -3
  33. package/dist/src/components/Card/OrigamCardText.vue +29 -7
  34. package/dist/src/components/Carousel/OrigamCarousel.vue +29 -9
  35. package/dist/src/components/Carousel/OrigamCarouselItem.vue +2 -2
  36. package/dist/src/components/Chart/OrigamChart.vue +3 -1
  37. package/dist/src/components/Chart/OrigamChartAxis.vue +1 -1
  38. package/dist/src/components/Chart/OrigamChartBoxPlot.vue +7 -3
  39. package/dist/src/components/Chart/OrigamChartBullet.vue +7 -3
  40. package/dist/src/components/Chart/OrigamChartCandlestick.vue +7 -3
  41. package/dist/src/components/Chart/OrigamChartCartesian.vue +14 -10
  42. package/dist/src/components/Chart/OrigamChartGauge.vue +7 -3
  43. package/dist/src/components/Chart/OrigamChartHeatmap.vue +7 -3
  44. package/dist/src/components/Chart/OrigamChartHoneycomb.vue +7 -3
  45. package/dist/src/components/Chart/OrigamChartLegend.vue +1 -2
  46. package/dist/src/components/Chart/OrigamChartMap.vue +7 -3
  47. package/dist/src/components/Chart/OrigamChartPareto.vue +7 -3
  48. package/dist/src/components/Chart/OrigamChartPictorial.vue +9 -6
  49. package/dist/src/components/Chart/OrigamChartPolar.vue +13 -6
  50. package/dist/src/components/Chart/OrigamChartPolarBar.vue +7 -3
  51. package/dist/src/components/Chart/OrigamChartPyramid.vue +7 -3
  52. package/dist/src/components/Chart/OrigamChartRadar.vue +7 -5
  53. package/dist/src/components/Chart/OrigamChartRangeSelector.vue +3 -4
  54. package/dist/src/components/Chart/OrigamChartSankey.vue +7 -3
  55. package/dist/src/components/Chart/OrigamChartSparkline.vue +5 -3
  56. package/dist/src/components/Chart/OrigamChartStreamgraph.vue +9 -5
  57. package/dist/src/components/Chart/OrigamChartSunburst.vue +7 -3
  58. package/dist/src/components/Chart/OrigamChartTooltip.vue +1 -1
  59. package/dist/src/components/Chart/OrigamChartTreemap.vue +7 -3
  60. package/dist/src/components/Chart/OrigamChartVariwide.vue +7 -3
  61. package/dist/src/components/Chart/OrigamChartWordCloud.vue +3 -2
  62. package/dist/src/components/Checkbox/OrigamCheckbox.vue +18 -3
  63. package/dist/src/components/Checkbox/OrigamCheckboxBtn.vue +4 -2
  64. package/dist/src/components/Chip/OrigamChip.vue +25 -12
  65. package/dist/src/components/Chip/OrigamChipGroup.vue +5 -5
  66. package/dist/src/components/ClientOnly/OrigamClientOnly.vue +1 -1
  67. package/dist/src/components/Clipboard/OrigamClipboard.vue +12 -4
  68. package/dist/src/components/Code/OrigamCode.vue +144 -39
  69. package/dist/src/components/ColorPicker/OrigamColorPicker.vue +7 -2
  70. package/dist/src/components/ColorPicker/OrigamColorPickerCanvas.vue +3 -2
  71. package/dist/src/components/ColorPicker/OrigamColorPickerEdit.vue +2 -2
  72. package/dist/src/components/ColorPicker/OrigamColorPickerPreview.vue +1 -1
  73. package/dist/src/components/ColorPicker/OrigamColorPickerSwatches.vue +1 -1
  74. package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +15 -5
  75. package/dist/src/components/CommandPalette/OrigamCommandPalette.vue +13 -3
  76. package/dist/src/components/ConfirmWrapper/OrigamConfirmWrapper.vue +1 -1
  77. package/dist/src/components/ContextualMenu/OrigamContextualMenu.vue +7 -2
  78. package/dist/src/components/Counter/OrigamCounter.vue +2 -1
  79. package/dist/src/components/DataList/OrigamDataList.vue +21 -5
  80. package/dist/src/components/DataList/OrigamDataText.vue +5 -1
  81. package/dist/src/components/DataList/OrigamDataTitle.vue +5 -1
  82. package/dist/src/components/DataTable/OrigamDataTable.vue +15 -7
  83. package/dist/src/components/DataTable/OrigamDataTableColumnCell.vue +1 -1
  84. package/dist/src/components/DataTable/OrigamDataTableFooter.vue +1 -1
  85. package/dist/src/components/DataTable/OrigamDataTableGroupHeaderRow.vue +1 -1
  86. package/dist/src/components/DataTable/OrigamDataTableHeaderCell.vue +3 -2
  87. package/dist/src/components/DataTable/OrigamDataTableHeaders.vue +2 -1
  88. package/dist/src/components/DataTable/OrigamDataTableHeadersCell.vue +1 -1
  89. package/dist/src/components/DataTable/OrigamDataTableHeadersCellMobile.vue +1 -1
  90. package/dist/src/components/DataTable/OrigamDataTableRow.vue +5 -3
  91. package/dist/src/components/DataTable/OrigamDataTableRows.vue +3 -3
  92. package/dist/src/components/DatePicker/OrigamDatePicker.vue +21 -30
  93. package/dist/src/components/DatePicker/OrigamDatePickerControls.vue +2 -2
  94. package/dist/src/components/DatePicker/OrigamDatePickerHeader.vue +1 -1
  95. package/dist/src/components/DatePicker/OrigamDatePickerMonth.vue +16 -28
  96. package/dist/src/components/DatePicker/OrigamDatePickerMonths.vue +3 -3
  97. package/dist/src/components/DatePicker/OrigamDatePickerYears.vue +3 -3
  98. package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +27 -16
  99. package/dist/src/components/DefaultsProvider/OrigamDefaultsProvider.vue +1 -1
  100. package/dist/src/components/Dialog/OrigamDialog.vue +1 -1
  101. package/dist/src/components/Dialog/OrigamDialogConfirmation.vue +1 -1
  102. package/dist/src/components/Divider/OrigamDivider.vue +2 -2
  103. package/dist/src/components/Drawer/OrigamDrawer.vue +5 -11
  104. package/dist/src/components/EmptyState/OrigamEmptyState.vue +14 -4
  105. package/dist/src/components/ExpansionPanel/OrigamExpansionPanel.vue +12 -2
  106. package/dist/src/components/ExpansionPanel/OrigamExpansionPanelContent.vue +4 -2
  107. package/dist/src/components/ExpansionPanel/OrigamExpansionPanelHeader.vue +14 -5
  108. package/dist/src/components/ExpansionPanel/OrigamExpansionPanels.vue +2 -1
  109. package/dist/src/components/Field/OrigamField.vue +26 -9
  110. package/dist/src/components/FileField/OrigamFileField.vue +8 -3
  111. package/dist/src/components/FileField/OrigamFileFieldDragNDropItem.vue +14 -4
  112. package/dist/src/components/FileField/OrigamFileFieldListItem.vue +14 -4
  113. package/dist/src/components/Form/OrigamForm.vue +10 -2
  114. package/dist/src/components/Grid/OrigamGrid.vue +1 -1
  115. package/dist/src/components/Grid/OrigamGridItem.vue +1 -1
  116. package/dist/src/components/Grids/OrigamCol.vue +1 -1
  117. package/dist/src/components/Grids/OrigamContainer.vue +1 -1
  118. package/dist/src/components/Grids/OrigamRow.vue +6 -2
  119. package/dist/src/components/Grids/OrigamSpacer.vue +1 -1
  120. package/dist/src/components/Icon/OrigamClassIcon.vue +1 -1
  121. package/dist/src/components/Icon/OrigamComponentIcon.vue +1 -1
  122. package/dist/src/components/Icon/OrigamIcon.vue +1 -1
  123. package/dist/src/components/Icon/OrigamLigatureIcon.vue +1 -1
  124. package/dist/src/components/Icon/OrigamSvgIcon.vue +2 -2
  125. package/dist/src/components/Img/OrigamImg.vue +10 -9
  126. package/dist/src/components/InfiniteScroll/OrigamInfiniteScroll.vue +14 -7
  127. package/dist/src/components/InfiniteScroll/OrigamInfiniteScrollIntersect.vue +3 -2
  128. package/dist/src/components/InlineEdit/OrigamInlineEdit.vue +13 -4
  129. package/dist/src/components/Input/OrigamInput.vue +17 -3
  130. package/dist/src/components/ItemGroup/OrigamItem.vue +1 -1
  131. package/dist/src/components/ItemGroup/OrigamItemGroup.vue +1 -1
  132. package/dist/src/components/Kbd/OrigamKbd.vue +18 -8
  133. package/dist/src/components/Label/OrigamLabel.vue +14 -3
  134. package/dist/src/components/Layout/OrigamLayout.vue +1 -1
  135. package/dist/src/components/Lazy/OrigamLazy.vue +1 -1
  136. package/dist/src/components/List/OrigamList.vue +1 -1
  137. package/dist/src/components/List/OrigamListChildren.vue +1 -1
  138. package/dist/src/components/List/OrigamListGroup.vue +4 -1
  139. package/dist/src/components/List/OrigamListGroupActivator.vue +1 -1
  140. package/dist/src/components/List/OrigamListItem.vue +14 -4
  141. package/dist/src/components/List/OrigamListSubheader.vue +13 -3
  142. package/dist/src/components/Loader/OrigamLoader.vue +1 -1
  143. package/dist/src/components/Main/OrigamMain.vue +1 -1
  144. package/dist/src/components/Masonry/OrigamMasonry.vue +2 -2
  145. package/dist/src/components/Media/OrigamMediaController.vue +1 -1
  146. package/dist/src/components/Media/OrigamMediaScrubber.vue +3 -2
  147. package/dist/src/components/Media/OrigamMediaVolumeControl.vue +3 -2
  148. package/dist/src/components/Menu/OrigamMenu.vue +9 -2
  149. package/dist/src/components/Messages/OrigamMessages.vue +13 -4
  150. package/dist/src/components/NumberField/OrigamNumberField.vue +80 -40
  151. package/dist/src/components/NumberFormat/OrigamNumberFormat.vue +1 -1
  152. package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +107 -11
  153. package/dist/src/components/Overlay/OrigamOverlay.vue +1 -1
  154. package/dist/src/components/Overlay/OrigamOverlayScrim.vue +1 -1
  155. package/dist/src/components/Pagination/OrigamPagination.vue +16 -4
  156. package/dist/src/components/Parallax/OrigamParallax.vue +9 -2
  157. package/dist/src/components/Parallax/OrigamParallaxElement.vue +1 -1
  158. package/dist/src/components/Parallax/OrigamParallaxLayer.vue +2 -2
  159. package/dist/src/components/PasswordField/OrigamPasswordField.vue +9 -2
  160. package/dist/src/components/Picker/OrigamPicker.vue +8 -3
  161. package/dist/src/components/Picker/OrigamPickerTitle.vue +10 -3
  162. package/dist/src/components/Progress/OrigamProgress.vue +6 -3
  163. package/dist/src/components/Progress/OrigamProgressCircular.vue +3 -1
  164. package/dist/src/components/Progress/OrigamProgressLinear.vue +5 -6
  165. package/dist/src/components/{QRCode → QrCode}/OrigamQrCode.vue +1 -1
  166. package/dist/src/components/QrCode/index.d.ts +1 -0
  167. package/dist/src/components/Radio/OrigamRadio.vue +20 -11
  168. package/dist/src/components/Radio/OrigamRadioBtn.vue +4 -2
  169. package/dist/src/components/Radio/OrigamRadioGroup.vue +48 -41
  170. package/dist/src/components/RatingField/OrigamRatingField.vue +9 -13
  171. package/dist/src/components/RatingField/OrigamRatingFieldItem.vue +3 -6
  172. package/dist/src/components/Responsive/OrigamResponsive.vue +1 -1
  173. package/dist/src/components/Section/OrigamSection.vue +1 -1
  174. package/dist/src/components/Select/OrigamSelect.vue +19 -10
  175. package/dist/src/components/SelectionControl/OrigamSelectionControl.vue +12 -6
  176. package/dist/src/components/SelectionControl/OrigamSelectionControlGroup.vue +2 -2
  177. package/dist/src/components/Sheet/OrigamSheet.vue +11 -3
  178. package/dist/src/components/Skeleton/OrigamSkeleton.vue +2 -4
  179. package/dist/src/components/Slide/OrigamSlideGroup.vue +1 -1
  180. package/dist/src/components/SliderField/OrigamSliderField.vue +7 -6
  181. package/dist/src/components/SliderField/OrigamSliderFieldTrack.vue +1 -1
  182. package/dist/src/components/Snackbar/OrigamSnackbar.vue +5 -4
  183. package/dist/src/components/Snackbar/OrigamSnackbarGroup.vue +1 -1
  184. package/dist/src/components/Snackbar/OrigamSnackbarItem.vue +27 -26
  185. package/dist/src/components/Stepper/OrigamStepper.vue +6 -2
  186. package/dist/src/components/Stepper/OrigamStepperItem.vue +10 -3
  187. package/dist/src/components/Switch/OrigamSwitch.vue +35 -37
  188. package/dist/src/components/Switch/OrigamSwitchTrack.vue +9 -15
  189. package/dist/src/components/SystemBar/OrigamSystemBar.vue +14 -4
  190. package/dist/src/components/Table/OrigamTable.vue +15 -3
  191. package/dist/src/components/Tabs/OrigamTab.vue +13 -3
  192. package/dist/src/components/Tabs/OrigamTabPanel.vue +1 -1
  193. package/dist/src/components/Tabs/OrigamTabPanels.vue +1 -1
  194. package/dist/src/components/Tabs/OrigamTabs.vue +1 -1
  195. package/dist/src/components/TextField/OrigamTextField.vue +8 -1
  196. package/dist/src/components/TextMask/OrigamTextMask.vue +17 -27
  197. package/dist/src/components/TextareaField/OrigamRichToolbar.vue +15 -11
  198. package/dist/src/components/TextareaField/OrigamTextareaField.vue +11 -1
  199. package/dist/src/components/ThemeProvider/OrigamThemeProvider.vue +4 -1
  200. package/dist/src/components/Timeline/OrigamTimeline.vue +3 -3
  201. package/dist/src/components/Timeline/OrigamTimelineItem.vue +3 -1
  202. package/dist/src/components/Title/OrigamTitle.vue +20 -8
  203. package/dist/src/components/Toolbar/OrigamToolbar.vue +17 -5
  204. package/dist/src/components/Tooltip/OrigamTooltip.vue +12 -3
  205. package/dist/src/components/Transition/OrigamExpandX.vue +1 -1
  206. package/dist/src/components/Transition/OrigamExpandY.vue +1 -1
  207. package/dist/src/components/Transition/OrigamFade.vue +1 -1
  208. package/dist/src/components/Transition/OrigamReverseTranslatePicker.vue +1 -1
  209. package/dist/src/components/Transition/OrigamScaleRotate.vue +1 -1
  210. package/dist/src/components/Transition/OrigamSlideX.vue +1 -1
  211. package/dist/src/components/Transition/OrigamSlideY.vue +1 -1
  212. package/dist/src/components/Transition/OrigamSnack.vue +1 -1
  213. package/dist/src/components/Transition/OrigamTransition.vue +1 -1
  214. package/dist/src/components/Transition/OrigamTranslateBottom.vue +1 -1
  215. package/dist/src/components/Transition/OrigamTranslatePicker.vue +1 -1
  216. package/dist/src/components/Transition/OrigamTranslateScale.vue +1 -1
  217. package/dist/src/components/Transition/OrigamWindowXReverseTranslate.vue +1 -1
  218. package/dist/src/components/Transition/OrigamWindowXTranslate.vue +1 -1
  219. package/dist/src/components/Transition/OrigamWindowYReverseTranslate.vue +1 -1
  220. package/dist/src/components/Transition/OrigamWindowYTranslate.vue +1 -1
  221. package/dist/src/components/Treeview/OrigamTreeview.vue +1 -1
  222. package/dist/src/components/Treeview/OrigamTreeviewNode.vue +7 -5
  223. package/dist/src/components/Video/OrigamVideo.vue +56 -63
  224. package/dist/src/components/VirtualScroll/OrigamVirtualScroll.vue +1 -1
  225. package/dist/src/components/VirtualScroll/OrigamVirtualScrollItem.vue +1 -6
  226. package/dist/src/components/Watermark/OrigamWatermark.vue +1 -1
  227. package/dist/src/components/Window/OrigamWindow.vue +32 -2
  228. package/dist/src/components/Window/OrigamWindowItem.vue +1 -1
  229. package/dist/src/components/index.cjs +1 -1
  230. package/dist/src/components/index.js +1 -1
  231. package/dist/src/composables/Chart/chart-gauge.composable.cjs +1 -1
  232. package/dist/src/composables/Chart/chart-gauge.composable.js +1 -1
  233. package/dist/src/composables/Chart/chart-header-typography.composable.cjs +20 -0
  234. package/dist/src/composables/Chart/chart-header-typography.composable.d.ts +27 -0
  235. package/dist/src/composables/Chart/chart-header-typography.composable.js +11 -0
  236. package/dist/src/composables/Chart/chart-zoom.composable.cjs +0 -1
  237. package/dist/src/composables/Chart/chart-zoom.composable.js +0 -1
  238. package/dist/src/composables/Chart/chart.composable.cjs +0 -11
  239. package/dist/src/composables/Chart/chart.composable.js +0 -11
  240. package/dist/src/composables/Code/code.composable.js +4 -1
  241. package/dist/src/composables/Commons/audio.composable.d.ts +9 -9
  242. package/dist/src/composables/Commons/border.composable.cjs +10 -0
  243. package/dist/src/composables/Commons/border.composable.js +7 -0
  244. package/dist/src/composables/Commons/color.composable.cjs +42 -42
  245. package/dist/src/composables/Commons/color.composable.d.ts +8 -3
  246. package/dist/src/composables/Commons/color.composable.js +2 -2
  247. package/dist/src/composables/Commons/date-picker-calendar.composable.cjs +1 -1
  248. package/dist/src/composables/Commons/date-picker-calendar.composable.d.ts +1 -1
  249. package/dist/src/composables/Commons/date-picker-calendar.composable.js +1 -1
  250. package/dist/src/composables/Commons/defaults.composable.cjs +10 -9
  251. package/dist/src/composables/Commons/defaults.composable.js +10 -9
  252. package/dist/src/composables/Commons/delay.composable.cjs +8 -3
  253. package/dist/src/composables/Commons/delay.composable.js +7 -4
  254. package/dist/src/composables/Commons/density.composable.cjs +1 -1
  255. package/dist/src/composables/Commons/density.composable.js +2 -2
  256. package/dist/src/composables/Commons/dragResizer.composable.cjs +7 -9
  257. package/dist/src/composables/Commons/dragResizer.composable.js +8 -9
  258. package/dist/src/composables/Commons/focus.composable.cjs +1 -1
  259. package/dist/src/composables/Commons/focus.composable.js +1 -1
  260. package/dist/src/composables/Commons/layout.composable.cjs +12 -0
  261. package/dist/src/composables/Commons/layout.composable.js +14 -0
  262. package/dist/src/composables/Commons/message.composable.cjs +1 -1
  263. package/dist/src/composables/Commons/message.composable.d.ts +1 -1
  264. package/dist/src/composables/Commons/message.composable.js +1 -1
  265. package/dist/src/composables/Commons/rounded.composable.cjs +15 -4
  266. package/dist/src/composables/Commons/rounded.composable.d.ts +1 -1
  267. package/dist/src/composables/Commons/rounded.composable.js +17 -6
  268. package/dist/src/composables/Commons/scroll.composable.cjs +2 -2
  269. package/dist/src/composables/Commons/scroll.composable.js +2 -2
  270. package/dist/src/composables/Commons/stateEffect.composable.cjs +36 -14
  271. package/dist/src/composables/Commons/stateEffect.composable.js +38 -14
  272. package/dist/src/composables/Commons/status.composable.cjs +11 -1
  273. package/dist/src/composables/Commons/status.composable.d.ts +2 -0
  274. package/dist/src/composables/Commons/status.composable.js +10 -1
  275. package/dist/src/composables/Commons/sticky.composable.d.ts +2 -14
  276. package/dist/src/composables/Commons/style.composable.cjs +5 -3
  277. package/dist/src/composables/Commons/style.composable.js +5 -3
  278. package/dist/src/composables/Commons/typography.composable.cjs +23 -0
  279. package/dist/src/composables/Commons/typography.composable.d.ts +7 -0
  280. package/dist/src/composables/Commons/typography.composable.js +21 -0
  281. package/dist/src/composables/DataTable/headers.composable.d.ts +4 -364
  282. package/dist/src/composables/Icon/icon.composable.cjs +6 -1
  283. package/dist/src/composables/Icon/icon.composable.js +4 -1
  284. package/dist/src/composables/InlineEdit/inline-edit.composable.cjs +16 -2
  285. package/dist/src/composables/InlineEdit/inline-edit.composable.js +16 -2
  286. package/dist/src/composables/Masonry/masonry.composable.d.ts +2 -1
  287. package/dist/src/composables/Responsive/aspect.composable.cjs +9 -1
  288. package/dist/src/composables/Responsive/aspect.composable.d.ts +1 -1
  289. package/dist/src/composables/Responsive/aspect.composable.js +9 -1
  290. package/dist/src/composables/Theme/installed-themes.composable.cjs +11 -0
  291. package/dist/src/composables/Theme/installed-themes.composable.d.ts +19 -0
  292. package/dist/src/composables/Theme/installed-themes.composable.js +5 -0
  293. package/dist/src/composables/Theme/theme.composable.cjs +86 -15
  294. package/dist/src/composables/Theme/theme.composable.d.ts +55 -10
  295. package/dist/src/composables/Theme/theme.composable.js +88 -17
  296. package/dist/src/composables/index.cjs +36 -0
  297. package/dist/src/composables/index.d.ts +3 -0
  298. package/dist/src/composables/index.js +3 -0
  299. package/dist/src/consts/Bracket/bracket.const.cjs +4 -2
  300. package/dist/src/consts/Bracket/bracket.const.d.ts +12 -0
  301. package/dist/src/consts/Bracket/bracket.const.js +2 -0
  302. package/dist/src/consts/Commons/density.const.cjs +2 -2
  303. package/dist/src/consts/Commons/density.const.d.ts +1 -1
  304. package/dist/src/consts/Commons/density.const.js +1 -1
  305. package/dist/src/consts/Commons/rounded.const.cjs +4 -2
  306. package/dist/src/consts/Commons/rounded.const.d.ts +22 -2
  307. package/dist/src/consts/Commons/rounded.const.js +3 -1
  308. package/dist/src/consts/DataTable/select.const.cjs +1 -1
  309. package/dist/src/consts/DataTable/select.const.js +1 -1
  310. package/dist/src/consts/Icon/mdi.const.cjs +6 -1
  311. package/dist/src/consts/Icon/mdi.const.js +10 -2
  312. package/dist/src/consts/Theme/theme.const.cjs +11 -1
  313. package/dist/src/consts/Theme/theme.const.d.ts +16 -0
  314. package/dist/src/consts/Theme/theme.const.js +10 -0
  315. package/dist/src/directives/Contrast/contrast.directive.cjs +150 -0
  316. package/dist/src/directives/Contrast/contrast.directive.d.ts +5 -0
  317. package/dist/src/directives/Contrast/contrast.directive.js +131 -0
  318. package/dist/src/directives/index.cjs +7 -0
  319. package/dist/src/directives/index.d.ts +1 -0
  320. package/dist/src/directives/index.js +1 -0
  321. package/dist/src/enums/BottomNav/bottom-nav-position.enum.cjs +12 -0
  322. package/dist/src/enums/BottomNav/bottom-nav-position.enum.d.ts +10 -0
  323. package/dist/src/enums/BottomNav/bottom-nav-position.enum.js +6 -0
  324. package/dist/src/enums/Toolbar/toolbar.enum.cjs +1 -0
  325. package/dist/src/enums/Toolbar/toolbar.enum.d.ts +2 -1
  326. package/dist/src/enums/Toolbar/toolbar.enum.js +1 -0
  327. package/dist/src/enums/index.cjs +22 -0
  328. package/dist/src/enums/index.d.ts +2 -0
  329. package/dist/src/enums/index.js +2 -0
  330. package/dist/src/interfaces/Alert/alert.interface.d.ts +2 -3
  331. package/dist/src/interfaces/App/app-bar.interface.d.ts +19 -1
  332. package/dist/src/interfaces/App/app.interface.cjs +1 -0
  333. package/dist/src/interfaces/App/app.interface.d.ts +24 -0
  334. package/dist/src/interfaces/Audio/audio-player.interface.d.ts +23 -2
  335. package/dist/src/interfaces/Avatar/avatar.interface.d.ts +2 -4
  336. package/dist/src/interfaces/Badge/badge.interface.d.ts +2 -2
  337. package/dist/src/interfaces/Blockquote/blockquote.interface.d.ts +23 -21
  338. package/dist/src/interfaces/BottomNav/bottom-nav.interface.d.ts +12 -4
  339. package/dist/src/interfaces/Bracket/bracket-competitor-component.interface.d.ts +17 -6
  340. package/dist/src/interfaces/Bracket/bracket-match-component.interface.d.ts +13 -6
  341. package/dist/src/interfaces/Bracket/bracket-match.interface.d.ts +22 -0
  342. package/dist/src/interfaces/Bracket/bracket-round-component.interface.d.ts +2 -2
  343. package/dist/src/interfaces/Bracket/bracket.interface.d.ts +17 -2
  344. package/dist/src/interfaces/Breadcrumb/breadcrumb-divider.interface.d.ts +2 -2
  345. package/dist/src/interfaces/Breadcrumb/breadcrumb.interface.d.ts +2 -3
  346. package/dist/src/interfaces/Btn/btn-group.interface.d.ts +2 -2
  347. package/dist/src/interfaces/Btn/btn.interface.d.ts +11 -3
  348. package/dist/src/interfaces/Calendar/calendar.interface.d.ts +7 -2
  349. package/dist/src/interfaces/Card/card-header.interface.d.ts +2 -2
  350. package/dist/src/interfaces/Card/card-text.interface.d.ts +2 -2
  351. package/dist/src/interfaces/Carousel/carousel.interface.d.ts +2 -2
  352. package/dist/src/interfaces/Chart/chart-base.interface.d.ts +9 -8
  353. package/dist/src/interfaces/Chart/chart-word-cloud.interface.d.ts +1 -1
  354. package/dist/src/interfaces/Chart/chart.interface.d.ts +12 -1
  355. package/dist/src/interfaces/Checkbox/checkbox-btn.interface.d.ts +3 -3
  356. package/dist/src/interfaces/Checkbox/checkbox.interface.d.ts +10 -9
  357. package/dist/src/interfaces/Chip/chip-group.interface.d.ts +3 -1
  358. package/dist/src/interfaces/Chip/chip.interface.d.ts +2 -2
  359. package/dist/src/interfaces/Clipboard/clipboard.interface.d.ts +2 -2
  360. package/dist/src/interfaces/Code/code.interface.d.ts +19 -2
  361. package/dist/src/interfaces/ColorPickerField/color-picker-field.interface.d.ts +2 -2
  362. package/dist/src/interfaces/CommandPalette/command-palette.interface.d.ts +2 -1
  363. package/dist/src/interfaces/Commons/calendar.interface.d.ts +3 -3
  364. package/dist/src/interfaces/Commons/commons.interface.d.ts +34 -1
  365. package/dist/src/interfaces/Commons/filters.interface.d.ts +2 -2
  366. package/dist/src/interfaces/Commons/hover.interface.d.ts +18 -3
  367. package/dist/src/interfaces/Commons/scroll.interface.d.ts +8 -1
  368. package/dist/src/interfaces/Commons/typography.interface.cjs +1 -0
  369. package/dist/src/interfaces/Commons/typography.interface.d.ts +52 -0
  370. package/dist/src/interfaces/Commons/typography.interface.js +0 -0
  371. package/dist/src/interfaces/Commons/validation.interface.d.ts +3 -1
  372. package/dist/src/interfaces/Counter/counter.interface.d.ts +2 -2
  373. package/dist/src/interfaces/DataList/data-list.interface.d.ts +2 -2
  374. package/dist/src/interfaces/DataList/data-text.interface.d.ts +5 -0
  375. package/dist/src/interfaces/DataList/data-title.interface.d.ts +5 -0
  376. package/dist/src/interfaces/DataTable/headers.interface.d.ts +5 -5
  377. package/dist/src/interfaces/DataTable/row.interface.d.ts +2 -2
  378. package/dist/src/interfaces/DatePicker/date-picker-controls.interface.d.ts +16 -8
  379. package/dist/src/interfaces/DatePicker/date-picker-header.interface.d.ts +6 -3
  380. package/dist/src/interfaces/DatePicker/date-picker-months.interface.d.ts +2 -2
  381. package/dist/src/interfaces/DatePicker/date-picker-years.interface.d.ts +1 -1
  382. package/dist/src/interfaces/DatePicker/date-picker.interface.d.ts +1 -1
  383. package/dist/src/interfaces/Dialog/dialog-confirmation.interface.d.ts +2 -2
  384. package/dist/src/interfaces/EmptyState/empty-state.interface.d.ts +9 -2
  385. package/dist/src/interfaces/ExpensionPanel/expansion-panel-header.interface.d.ts +2 -2
  386. package/dist/src/interfaces/Field/field.interface.d.ts +7 -2
  387. package/dist/src/interfaces/FileField/file-field-dragndrop-item.interface.d.ts +2 -2
  388. package/dist/src/interfaces/FileField/file-field-list-item.interface.d.ts +2 -2
  389. package/dist/src/interfaces/FileField/file-field.interface.d.ts +1 -1
  390. package/dist/src/interfaces/Form/form.interface.d.ts +2 -2
  391. package/dist/src/interfaces/Grids/row.interface.d.ts +2 -2
  392. package/dist/src/interfaces/InfiniteScroll/infinite-scroll.interface.d.ts +2 -2
  393. package/dist/src/interfaces/InlineEdit/inline-edit.interface.d.ts +31 -2
  394. package/dist/src/interfaces/Input/input.interface.d.ts +4 -3
  395. package/dist/src/interfaces/Kbd/kbd.interface.d.ts +2 -2
  396. package/dist/src/interfaces/Label/label.interface.d.ts +2 -2
  397. package/dist/src/interfaces/List/list-group.interface.d.ts +4 -1
  398. package/dist/src/interfaces/List/list-item.interface.d.ts +2 -2
  399. package/dist/src/interfaces/List/list-subheader.interface.d.ts +2 -2
  400. package/dist/src/interfaces/Media/media-scrubber.interface.d.ts +10 -2
  401. package/dist/src/interfaces/Messages/messages.interface.d.ts +2 -2
  402. package/dist/src/interfaces/NumberField/number-field.interface.d.ts +1 -1
  403. package/dist/src/interfaces/Nuxt/nuxt-module.interface.d.ts +55 -15
  404. package/dist/src/interfaces/OtpInputField/otp-input-field.interface.d.ts +4 -2
  405. package/dist/src/interfaces/Pagination/pagination.interface.d.ts +18 -3
  406. package/dist/src/interfaces/Parallax/parallax.interface.d.ts +2 -2
  407. package/dist/src/interfaces/PasswordField/password-field.interface.d.ts +1 -1
  408. package/dist/src/interfaces/Picker/picker-title.interface.d.ts +2 -2
  409. package/dist/src/interfaces/Progress/progress.interface.d.ts +8 -2
  410. package/dist/src/interfaces/RatingField/rating-field-item.interface.d.ts +2 -1
  411. package/dist/src/interfaces/SelectionControl/selection-control-group.interface.d.ts +2 -1
  412. package/dist/src/interfaces/SelectionControl/selection-control.interface.d.ts +23 -5
  413. package/dist/src/interfaces/Sheet/sheet.interface.d.ts +2 -2
  414. package/dist/src/interfaces/Snackbar/snackbar-item.interface.d.ts +2 -2
  415. package/dist/src/interfaces/SystemBar/system-bar.interface.d.ts +2 -2
  416. package/dist/src/interfaces/Table/table.interface.d.ts +2 -2
  417. package/dist/src/interfaces/Tabs/tab.interface.d.ts +7 -2
  418. package/dist/src/interfaces/TextField/text-field.interface.d.ts +1 -1
  419. package/dist/src/interfaces/TextMask/text-mask.interface.d.ts +7 -33
  420. package/dist/src/interfaces/TextareaField/textarea-field.interface.d.ts +3 -3
  421. package/dist/src/interfaces/Theme/origam-theme.interface.cjs +1 -0
  422. package/dist/src/interfaces/Theme/origam-theme.interface.d.ts +114 -0
  423. package/dist/src/interfaces/Theme/origam-theme.interface.js +0 -0
  424. package/dist/src/interfaces/Timeline/timeline.interface.d.ts +1 -1
  425. package/dist/src/interfaces/Title/title.interface.d.ts +2 -2
  426. package/dist/src/interfaces/Toolbar/toolbar.interface.d.ts +2 -2
  427. package/dist/src/interfaces/Tooltip/tooltip.interface.d.ts +2 -2
  428. package/dist/src/interfaces/Video/video.interface.d.ts +2 -2
  429. package/dist/src/interfaces/Window/window.interface.d.ts +2 -2
  430. package/dist/src/interfaces/index.cjs +33 -0
  431. package/dist/src/interfaces/index.d.ts +3 -0
  432. package/dist/src/interfaces/index.js +3 -0
  433. package/dist/src/nuxt/module.cjs +78 -8
  434. package/dist/src/nuxt/module.js +81 -9
  435. package/dist/src/nuxt/plugin.client.cjs +28 -10
  436. package/dist/src/nuxt/plugin.client.js +28 -10
  437. package/dist/src/nuxt/plugin.server.cjs +52 -12
  438. package/dist/src/nuxt/plugin.server.js +55 -13
  439. package/dist/src/origam.cjs +39 -2
  440. package/dist/src/origam.d.ts +19 -1
  441. package/dist/src/origam.js +46 -5
  442. package/dist/src/themes/index.cjs +24 -0
  443. package/dist/src/themes/index.d.ts +1 -0
  444. package/dist/src/themes/index.js +1 -0
  445. package/dist/src/themes/origam.theme.cjs +906 -0
  446. package/dist/src/themes/origam.theme.d.ts +4 -0
  447. package/dist/src/themes/origam.theme.js +379 -0
  448. package/dist/src/types/BottomNav/bottom-nav.type.d.ts +2 -0
  449. package/dist/src/types/Commons/font-family.type.cjs +1 -0
  450. package/dist/src/types/Commons/font-family.type.d.ts +5 -0
  451. package/dist/src/types/Commons/font-family.type.js +0 -0
  452. package/dist/src/types/Commons/font-size.type.cjs +1 -0
  453. package/dist/src/types/Commons/font-size.type.d.ts +6 -0
  454. package/dist/src/types/Commons/font-size.type.js +0 -0
  455. package/dist/src/types/Commons/font-weight.type.cjs +1 -0
  456. package/dist/src/types/Commons/font-weight.type.d.ts +5 -0
  457. package/dist/src/types/Commons/font-weight.type.js +0 -0
  458. package/dist/src/types/Commons/letter-spacing.type.cjs +1 -0
  459. package/dist/src/types/Commons/letter-spacing.type.d.ts +5 -0
  460. package/dist/src/types/Commons/letter-spacing.type.js +0 -0
  461. package/dist/src/types/Commons/line-height.type.cjs +1 -0
  462. package/dist/src/types/Commons/line-height.type.d.ts +5 -0
  463. package/dist/src/types/Commons/line-height.type.js +0 -0
  464. package/dist/src/types/Commons/mode.type.d.ts +1 -1
  465. package/dist/src/types/Theme/installed-theme.type.cjs +1 -0
  466. package/dist/src/types/Theme/installed-theme.type.d.ts +31 -0
  467. package/dist/src/types/Theme/installed-theme.type.js +0 -0
  468. package/dist/src/types/Theme/semantic-tree.type.cjs +1 -0
  469. package/dist/src/types/Theme/semantic-tree.type.d.ts +48 -0
  470. package/dist/src/types/Theme/semantic-tree.type.js +0 -0
  471. package/dist/src/types/Theme/theme.type.d.ts +27 -6
  472. package/dist/src/types/Theme/token-tree.type.cjs +1 -0
  473. package/dist/src/types/Theme/token-tree.type.d.ts +10 -0
  474. package/dist/src/types/Theme/token-tree.type.js +0 -0
  475. package/dist/src/types/index.cjs +88 -0
  476. package/dist/src/types/index.d.ts +8 -0
  477. package/dist/src/types/index.js +8 -0
  478. package/dist/src/types/tokens.type.d.ts +1 -1
  479. package/dist/src/utils/Bracket/bracket-surface.util.cjs +106 -0
  480. package/dist/src/utils/Bracket/bracket-surface.util.d.ts +47 -0
  481. package/dist/src/utils/Bracket/bracket-surface.util.js +88 -0
  482. package/dist/src/utils/Commons/color.util.cjs +4 -2
  483. package/dist/src/utils/Commons/color.util.js +4 -2
  484. package/dist/src/utils/Commons/commons.util.cjs +3 -2
  485. package/dist/src/utils/Commons/commons.util.js +3 -2
  486. package/dist/src/utils/Commons/dom.util.d.ts +1 -1
  487. package/dist/src/utils/Commons/elevation.util.cjs +1 -1
  488. package/dist/src/utils/Commons/elevation.util.js +1 -1
  489. package/dist/src/utils/Commons/forwardRefs.util.cjs +1 -1
  490. package/dist/src/utils/Commons/forwardRefs.util.js +1 -1
  491. package/dist/src/utils/Commons/gradient.util.cjs +3 -3
  492. package/dist/src/utils/Commons/gradient.util.js +1 -1
  493. package/dist/src/utils/Commons/hover.util.cjs +5 -1
  494. package/dist/src/utils/Commons/hover.util.js +5 -1
  495. package/dist/src/utils/Commons/ripple.util.cjs +1 -2
  496. package/dist/src/utils/Commons/ripple.util.js +2 -3
  497. package/dist/src/utils/Commons/rounded.util.cjs +5 -0
  498. package/dist/src/utils/Commons/rounded.util.d.ts +9 -0
  499. package/dist/src/utils/Commons/rounded.util.js +4 -0
  500. package/dist/src/utils/DataTable/headers.util.cjs +1 -1
  501. package/dist/src/utils/DataTable/headers.util.js +1 -1
  502. package/dist/src/utils/DataTable/sort.util.cjs +2 -2
  503. package/dist/src/utils/DataTable/sort.util.js +2 -2
  504. package/dist/src/utils/List/list-item.util.d.ts +7 -0
  505. package/dist/src/utils/Theme/apply-theme.util.cjs +148 -0
  506. package/dist/src/utils/Theme/apply-theme.util.d.ts +65 -0
  507. package/dist/src/utils/Theme/apply-theme.util.js +125 -0
  508. package/dist/src/utils/Theme/token-name.util.cjs +47 -0
  509. package/dist/src/utils/Theme/token-name.util.d.ts +54 -0
  510. package/dist/src/utils/Theme/token-name.util.js +55 -0
  511. package/dist/src/utils/index.cjs +22 -0
  512. package/dist/src/utils/index.d.ts +2 -0
  513. package/dist/src/utils/index.js +2 -0
  514. package/package.json +17 -58
  515. package/CHANGELOG.md +0 -807
  516. package/README.md +0 -275
  517. package/dist/src/App.vue +0 -25
  518. package/dist/src/main.cjs +0 -7
  519. package/dist/src/main.d.ts +0 -1
  520. package/dist/src/main.js +0 -4
  521. /package/dist/src/components/{QRCode → QrCode}/index.cjs +0 -0
  522. /package/dist/src/components/{QRCode → QrCode}/index.js +0 -0
  523. /package/dist/src/{components/QRCode/index.d.ts → interfaces/App/app.interface.js} +0 -0
@@ -1,4 +1,4 @@
1
- import type { IBorderProps, IBgColorProps, IColorProps, ICommonsComponentProps, IDensityProps, IMarginProps, IPaddingProps, ITagProps } from '../../interfaces';
2
- export interface ITitleProps extends ITagProps, ICommonsComponentProps, IColorProps, IBgColorProps, IDensityProps, IPaddingProps, IMarginProps, IBorderProps {
1
+ import type { IBorderProps, IBgColorProps, IColorProps, ICommonsComponentProps, IDensityProps, IMarginProps, IPaddingProps, ITagProps, ITypographyProps } from '../../interfaces';
2
+ export interface ITitleProps extends ITagProps, ICommonsComponentProps, IColorProps, IBgColorProps, IDensityProps, IPaddingProps, IMarginProps, IBorderProps, ITypographyProps {
3
3
  text?: string;
4
4
  }
@@ -1,5 +1,5 @@
1
- import type { IActiveProps, IBgColorProps, IBorderProps, IColorProps, ICommonsComponentProps, IDensityProps, IDimensionProps, IElevationProps, IHoverProps, IMarginProps, IPaddingProps, IPositionProps, IRoundedProps, ITagProps } from '../../interfaces';
2
- export interface IToolbarProps extends ITagProps, ICommonsComponentProps, IBorderProps, IRoundedProps, IElevationProps, IDensityProps, IColorProps, IBgColorProps, IPaddingProps, IMarginProps, IPositionProps, IDimensionProps, IActiveProps, IHoverProps {
1
+ import type { IActiveProps, IBgColorProps, IBorderProps, IColorProps, ICommonsComponentProps, IDensityProps, IDimensionProps, IElevationProps, IHoverProps, IMarginProps, IPaddingProps, IPositionProps, IRoundedProps, ITagProps, ITypographyProps } from '../../interfaces';
2
+ export interface IToolbarProps extends ITagProps, ICommonsComponentProps, IBorderProps, IRoundedProps, IElevationProps, IDensityProps, IColorProps, IBgColorProps, IPaddingProps, IMarginProps, IPositionProps, IDimensionProps, IActiveProps, IHoverProps, ITypographyProps {
3
3
  collapse?: boolean;
4
4
  flat?: boolean;
5
5
  floating?: boolean;
@@ -1,5 +1,5 @@
1
- import type { IActivatorProps, IBgColorProps, IColorProps, ICommonsComponentEmits, ICommonsComponentProps, IDimensionProps, ILazyProps, ILocationStrategyProps, IOverlayProps, IScrimProps, IScrollStrategyProps, ITransitionComponentProps } from '../../interfaces';
2
- export interface ITooltipProps extends ICommonsComponentProps, IOverlayProps, IColorProps, IBgColorProps, IDimensionProps, IActivatorProps, ILocationStrategyProps, IScrollStrategyProps, ILazyProps, ITransitionComponentProps, IScrimProps {
1
+ import type { IActivatorProps, IBgColorProps, IColorProps, ICommonsComponentEmits, ICommonsComponentProps, IDimensionProps, ILazyProps, ILocationStrategyProps, IOverlayProps, IScrimProps, IScrollStrategyProps, ITransitionComponentProps, ITypographyProps } from '../../interfaces';
2
+ export interface ITooltipProps extends ICommonsComponentProps, IOverlayProps, IColorProps, IBgColorProps, IDimensionProps, IActivatorProps, ILocationStrategyProps, IScrollStrategyProps, ILazyProps, ITransitionComponentProps, IScrimProps, ITypographyProps {
3
3
  id?: string;
4
4
  text?: string;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import type { Ref } from 'vue';
2
- import type { IBgColorProps, IBorderProps, IColorProps, ICommonsComponentProps, IDimensionProps, IElevationProps, IMarginProps, IMediaPlayerEmits, IMediaPlayerMethods, IMediaPlayerState, IPaddingProps, IRoundedProps, IUseMediaPlayerOptions, IVideoSource, IVideoTrack } from '../../interfaces';
2
+ import type { IBgColorProps, IBorderProps, IColorProps, ICommonsComponentProps, IDimensionProps, IElevationProps, IMarginProps, IMediaPlayerEmits, IMediaPlayerMethods, IMediaPlayerState, IPaddingProps, IRoundedProps, ITypographyProps, IUseMediaPlayerOptions, IVideoSource, IVideoTrack } from '../../interfaces';
3
3
  import type { TVideoControls } from '../../types';
4
4
  /**
5
5
  * Bindings passed to the `#controls` scoped slot of `<OrigamVideo>`.
@@ -71,7 +71,7 @@ export interface IVideoSlots {
71
71
  /**
72
72
  * Props for `<OrigamVideo>`.
73
73
  */
74
- export interface IVideoProps extends ICommonsComponentProps, IColorProps, IBgColorProps, IDimensionProps, IRoundedProps, IBorderProps, IMarginProps, IPaddingProps, IElevationProps {
74
+ export interface IVideoProps extends ICommonsComponentProps, IColorProps, IBgColorProps, IDimensionProps, IRoundedProps, IBorderProps, IMarginProps, IPaddingProps, IElevationProps, ITypographyProps {
75
75
  /**
76
76
  * Media URL — either a single string for `<video src>`, or an array
77
77
  * of `<source>` descriptors when multiple formats are provided. The
@@ -1,7 +1,7 @@
1
- import type { IBorderProps, ICommonsComponentEmits, ICommonsComponentProps, IDirectionProps, IElevationProps, IMarginProps, IPaddingProps, IRoundedProps, ITagProps, ITouchHandlers } from '../../interfaces';
1
+ import type { IActiveProps, IBgColorProps, IBorderProps, ICommonsComponentEmits, ICommonsComponentProps, IDirectionProps, IElevationProps, IHoverProps, IMarginProps, IPaddingProps, IRoundedProps, ITagProps, ITouchHandlers } from '../../interfaces';
2
2
  import type { TIcon } from '../../types';
3
3
  import type { ComputedRef, Ref } from 'vue';
4
- export interface IWindowProps extends ICommonsComponentProps, ITagProps, IDirectionProps, IBorderProps, IPaddingProps, IMarginProps, IRoundedProps, IElevationProps {
4
+ export interface IWindowProps extends ICommonsComponentProps, ITagProps, IDirectionProps, IBorderProps, IPaddingProps, IMarginProps, IRoundedProps, IElevationProps, IBgColorProps, IHoverProps, IActiveProps {
5
5
  continuous?: boolean;
6
6
  nextIcon?: TIcon;
7
7
  prevIcon?: TIcon;
@@ -14,6 +14,17 @@ Object.keys(_alert).forEach(function (key) {
14
14
  }
15
15
  });
16
16
  });
17
+ var _app = require("./App/app.interface.cjs");
18
+ Object.keys(_app).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _app[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _app[key];
25
+ }
26
+ });
27
+ });
17
28
  var _appBar = require("./App/app-bar.interface.cjs");
18
29
  Object.keys(_appBar).forEach(function (key) {
19
30
  if (key === "default" || key === "__esModule") return;
@@ -1015,6 +1026,17 @@ Object.keys(_touch).forEach(function (key) {
1015
1026
  }
1016
1027
  });
1017
1028
  });
1029
+ var _typography = require("./Commons/typography.interface.cjs");
1030
+ Object.keys(_typography).forEach(function (key) {
1031
+ if (key === "default" || key === "__esModule") return;
1032
+ if (key in exports && exports[key] === _typography[key]) return;
1033
+ Object.defineProperty(exports, key, {
1034
+ enumerable: true,
1035
+ get: function () {
1036
+ return _typography[key];
1037
+ }
1038
+ });
1039
+ });
1018
1040
  var _validation = require("./Commons/validation.interface.cjs");
1019
1041
  Object.keys(_validation).forEach(function (key) {
1020
1042
  if (key === "default" || key === "__esModule") return;
@@ -2478,6 +2500,17 @@ Object.keys(_nuxtModule).forEach(function (key) {
2478
2500
  }
2479
2501
  });
2480
2502
  });
2503
+ var _origamTheme = require("./Theme/origam-theme.interface.cjs");
2504
+ Object.keys(_origamTheme).forEach(function (key) {
2505
+ if (key === "default" || key === "__esModule") return;
2506
+ if (key in exports && exports[key] === _origamTheme[key]) return;
2507
+ Object.defineProperty(exports, key, {
2508
+ enumerable: true,
2509
+ get: function () {
2510
+ return _origamTheme[key];
2511
+ }
2512
+ });
2513
+ });
2481
2514
  var _qrCode = require("./QrCode/qr-code.interface.cjs");
2482
2515
  Object.keys(_qrCode).forEach(function (key) {
2483
2516
  if (key === "default" || key === "__esModule") return;
@@ -1,4 +1,5 @@
1
1
  export * from './Alert/alert.interface';
2
+ export * from './App/app.interface';
2
3
  export * from './App/app-bar.interface';
3
4
  export * from './Avatar/avatar.interface';
4
5
  export * from './Avatar/avatar-group.interface';
@@ -90,6 +91,7 @@ export * from './Commons/status.interface';
90
91
  export * from './Commons/sticky.interface';
91
92
  export * from './Commons/style.interface';
92
93
  export * from './Commons/touch.interface';
94
+ export * from './Commons/typography.interface';
93
95
  export * from './Commons/validation.interface';
94
96
  export * from './Commons/virtual.interface';
95
97
  export * from './ContextualMenu/contextual-menu.interface';
@@ -223,6 +225,7 @@ export * from './Timeline/timeline.interface';
223
225
  export * from './Treeview/treeview.interface';
224
226
  export * from './Mask/mask-options.interface';
225
227
  export * from './Nuxt/nuxt-module.interface';
228
+ export * from './Theme/origam-theme.interface';
226
229
  export * from './QrCode/qr-code.interface';
227
230
  export * from './QrCode/qr-code-logo.interface';
228
231
  export * from './Watermark/watermark.interface';
@@ -1,4 +1,5 @@
1
1
  export * from "./Alert/alert.interface.js";
2
+ export * from "./App/app.interface.js";
2
3
  export * from "./App/app-bar.interface.js";
3
4
  export * from "./Avatar/avatar.interface.js";
4
5
  export * from "./Avatar/avatar-group.interface.js";
@@ -90,6 +91,7 @@ export * from "./Commons/status.interface.js";
90
91
  export * from "./Commons/sticky.interface.js";
91
92
  export * from "./Commons/style.interface.js";
92
93
  export * from "./Commons/touch.interface.js";
94
+ export * from "./Commons/typography.interface.js";
93
95
  export * from "./Commons/validation.interface.js";
94
96
  export * from "./Commons/virtual.interface.js";
95
97
  export * from "./ContextualMenu/contextual-menu.interface.js";
@@ -223,6 +225,7 @@ export * from "./Timeline/timeline.interface.js";
223
225
  export * from "./Treeview/treeview.interface.js";
224
226
  export * from "./Mask/mask-options.interface.js";
225
227
  export * from "./Nuxt/nuxt-module.interface.js";
228
+ export * from "./Theme/origam-theme.interface.js";
226
229
  export * from "./QrCode/qr-code.interface.js";
227
230
  export * from "./QrCode/qr-code-logo.interface.js";
228
231
  export * from "./Watermark/watermark.interface.js";
@@ -4,18 +4,36 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
+ var _nodeFs = require("node:fs");
8
+ var _nodePath = require("node:path");
7
9
  var _kit = require("@nuxt/kit");
8
10
  const MODULE_NAME = "origam-nuxt";
9
11
  const CONFIG_KEY = "origam";
12
+ const NUXT_COMPOSABLES_BLOCKLIST = /* @__PURE__ */new Set(["useRoute", "useRouter", "useLink", "useHydration"]);
13
+ const DEFAULT_THEMES = [];
14
+ const DEFAULT_MODES = ["light", "dark"];
10
15
  const DEFAULTS = {
11
- themes: ["light", "dark"],
16
+ themes: DEFAULT_THEMES,
12
17
  defaultTheme: "auto",
18
+ modes: DEFAULT_MODES,
19
+ defaultMode: "auto",
13
20
  cookieName: "origam-theme",
21
+ modeCookieName: "origam-mode",
14
22
  cookieMaxAge: 60 * 60 * 24 * 365,
15
23
  autoImport: true,
16
24
  includeUtilities: true,
17
25
  prefix: "Origam"
18
26
  };
27
+ const SCALAR_DEFAULTS = {
28
+ defaultTheme: DEFAULTS.defaultTheme,
29
+ defaultMode: DEFAULTS.defaultMode,
30
+ cookieName: DEFAULTS.cookieName,
31
+ modeCookieName: DEFAULTS.modeCookieName,
32
+ cookieMaxAge: DEFAULTS.cookieMaxAge,
33
+ autoImport: DEFAULTS.autoImport,
34
+ includeUtilities: DEFAULTS.includeUtilities,
35
+ prefix: DEFAULTS.prefix
36
+ };
19
37
  module.exports = (0, _kit.defineNuxtModule)({
20
38
  meta: {
21
39
  name: MODULE_NAME,
@@ -24,12 +42,15 @@ module.exports = (0, _kit.defineNuxtModule)({
24
42
  nuxt: "^3.0.0 || ^4.0.0"
25
43
  }
26
44
  },
27
- defaults: DEFAULTS,
45
+ defaults: SCALAR_DEFAULTS,
28
46
  setup(options, nuxt) {
29
47
  const resolver = (0, _kit.createResolver)(require('url').pathToFileURL(__filename).toString());
30
- const themes = options.themes ?? DEFAULTS.themes;
48
+ const themes = options.themes ?? DEFAULT_THEMES;
31
49
  const defaultTheme = options.defaultTheme ?? DEFAULTS.defaultTheme;
50
+ const modes = options.modes ?? DEFAULT_MODES;
51
+ const defaultMode = options.defaultMode ?? DEFAULTS.defaultMode;
32
52
  const cookieName = options.cookieName ?? DEFAULTS.cookieName;
53
+ const modeCookieName = options.modeCookieName ?? DEFAULTS.modeCookieName;
33
54
  const cookieMaxAge = options.cookieMaxAge ?? DEFAULTS.cookieMaxAge;
34
55
  const autoImport = options.autoImport ?? DEFAULTS.autoImport;
35
56
  const includeUtilities = options.includeUtilities ?? DEFAULTS.includeUtilities;
@@ -37,10 +58,9 @@ module.exports = (0, _kit.defineNuxtModule)({
37
58
  if (!nuxt.options.css.includes("origam/tokens/css/primitive")) {
38
59
  nuxt.options.css.unshift("origam/tokens/css/primitive");
39
60
  }
40
- for (const theme of themes) {
41
- const cssId = `origam/tokens/css/${theme}`;
42
- if (!nuxt.options.css.includes(cssId)) {
43
- nuxt.options.css.push(cssId);
61
+ for (const sheet of ["origam/tokens/css/light", "origam/tokens/css/dark"]) {
62
+ if (!nuxt.options.css.includes(sheet)) {
63
+ nuxt.options.css.push(sheet);
44
64
  }
45
65
  }
46
66
  if (includeUtilities && !nuxt.options.css.includes("origam/tokens/css/utilities")) {
@@ -55,7 +75,52 @@ module.exports = (0, _kit.defineNuxtModule)({
55
75
  mode: "client"
56
76
  });
57
77
  if (autoImport) {
58
- (0, _kit.addImportsDir)(resolver.resolve("../composables"));
78
+ const composablesRoot = resolver.resolve("../composables");
79
+ const exportNameRegex = /export\s+(?:async\s+)?(?:function|const|let|var)\s+([A-Za-z_$][\w$]*)/g;
80
+ const collect = (dir, acc) => {
81
+ let entries;
82
+ try {
83
+ entries = (0, _nodeFs.readdirSync)(dir);
84
+ } catch {
85
+ return;
86
+ }
87
+ for (const entry of entries) {
88
+ const full = (0, _nodePath.join)(dir, entry);
89
+ let s;
90
+ try {
91
+ s = (0, _nodeFs.statSync)(full);
92
+ } catch {
93
+ continue;
94
+ }
95
+ if (s.isDirectory()) {
96
+ collect(full, acc);
97
+ continue;
98
+ }
99
+ if (!/\.(?:m?js|ts)$/.test(entry)) continue;
100
+ if (entry.endsWith(".d.ts")) continue;
101
+ let src = "";
102
+ try {
103
+ src = (0, _nodeFs.readFileSync)(full, "utf-8");
104
+ } catch {
105
+ continue;
106
+ }
107
+ let m;
108
+ exportNameRegex.lastIndex = 0;
109
+ while (m = exportNameRegex.exec(src)) {
110
+ const name = m[1];
111
+ if (NUXT_COMPOSABLES_BLOCKLIST.has(name)) continue;
112
+ acc.push({
113
+ name,
114
+ from: full
115
+ });
116
+ }
117
+ }
118
+ };
119
+ const imports = [];
120
+ collect(composablesRoot, imports);
121
+ if (imports.length) {
122
+ (0, _kit.addImports)(imports);
123
+ }
59
124
  (0, _kit.addComponentsDir)({
60
125
  path: resolver.resolve("../components"),
61
126
  prefix: "",
@@ -65,9 +130,14 @@ module.exports = (0, _kit.defineNuxtModule)({
65
130
  }
66
131
  nuxt.options.runtimeConfig.public = nuxt.options.runtimeConfig.public || {};
67
132
  nuxt.options.runtimeConfig.public.origam = {
133
+ // Installed theme OBJECTS, passed straight to createOrigam in the
134
+ // plugins (ADR-004 — no preset-name resolution).
68
135
  themes,
69
136
  defaultTheme,
137
+ modes,
138
+ defaultMode,
70
139
  cookieName,
140
+ modeCookieName,
71
141
  cookieMaxAge
72
142
  };
73
143
  }
@@ -1,15 +1,38 @@
1
- import { addComponentsDir, addImportsDir, addPlugin, createResolver, defineNuxtModule } from "@nuxt/kit";
1
+ import { readdirSync, readFileSync, statSync } from "node:fs";
2
+ import { join } from "node:path";
3
+ import { addComponentsDir, addImports, addPlugin, createResolver, defineNuxtModule } from "@nuxt/kit";
2
4
  const MODULE_NAME = "origam-nuxt";
3
5
  const CONFIG_KEY = "origam";
6
+ const NUXT_COMPOSABLES_BLOCKLIST = /* @__PURE__ */ new Set([
7
+ "useRoute",
8
+ "useRouter",
9
+ "useLink",
10
+ "useHydration"
11
+ ]);
12
+ const DEFAULT_THEMES = [];
13
+ const DEFAULT_MODES = ["light", "dark"];
4
14
  const DEFAULTS = {
5
- themes: ["light", "dark"],
15
+ themes: DEFAULT_THEMES,
6
16
  defaultTheme: "auto",
17
+ modes: DEFAULT_MODES,
18
+ defaultMode: "auto",
7
19
  cookieName: "origam-theme",
20
+ modeCookieName: "origam-mode",
8
21
  cookieMaxAge: 60 * 60 * 24 * 365,
9
22
  autoImport: true,
10
23
  includeUtilities: true,
11
24
  prefix: "Origam"
12
25
  };
26
+ const SCALAR_DEFAULTS = {
27
+ defaultTheme: DEFAULTS.defaultTheme,
28
+ defaultMode: DEFAULTS.defaultMode,
29
+ cookieName: DEFAULTS.cookieName,
30
+ modeCookieName: DEFAULTS.modeCookieName,
31
+ cookieMaxAge: DEFAULTS.cookieMaxAge,
32
+ autoImport: DEFAULTS.autoImport,
33
+ includeUtilities: DEFAULTS.includeUtilities,
34
+ prefix: DEFAULTS.prefix
35
+ };
13
36
  export default defineNuxtModule({
14
37
  meta: {
15
38
  name: MODULE_NAME,
@@ -18,12 +41,15 @@ export default defineNuxtModule({
18
41
  nuxt: "^3.0.0 || ^4.0.0"
19
42
  }
20
43
  },
21
- defaults: DEFAULTS,
44
+ defaults: SCALAR_DEFAULTS,
22
45
  setup(options, nuxt) {
23
46
  const resolver = createResolver(import.meta.url);
24
- const themes = options.themes ?? DEFAULTS.themes;
47
+ const themes = options.themes ?? DEFAULT_THEMES;
25
48
  const defaultTheme = options.defaultTheme ?? DEFAULTS.defaultTheme;
49
+ const modes = options.modes ?? DEFAULT_MODES;
50
+ const defaultMode = options.defaultMode ?? DEFAULTS.defaultMode;
26
51
  const cookieName = options.cookieName ?? DEFAULTS.cookieName;
52
+ const modeCookieName = options.modeCookieName ?? DEFAULTS.modeCookieName;
27
53
  const cookieMaxAge = options.cookieMaxAge ?? DEFAULTS.cookieMaxAge;
28
54
  const autoImport = options.autoImport ?? DEFAULTS.autoImport;
29
55
  const includeUtilities = options.includeUtilities ?? DEFAULTS.includeUtilities;
@@ -31,10 +57,9 @@ export default defineNuxtModule({
31
57
  if (!nuxt.options.css.includes("origam/tokens/css/primitive")) {
32
58
  nuxt.options.css.unshift("origam/tokens/css/primitive");
33
59
  }
34
- for (const theme of themes) {
35
- const cssId = `origam/tokens/css/${theme}`;
36
- if (!nuxt.options.css.includes(cssId)) {
37
- nuxt.options.css.push(cssId);
60
+ for (const sheet of ["origam/tokens/css/light", "origam/tokens/css/dark"]) {
61
+ if (!nuxt.options.css.includes(sheet)) {
62
+ nuxt.options.css.push(sheet);
38
63
  }
39
64
  }
40
65
  if (includeUtilities && !nuxt.options.css.includes("origam/tokens/css/utilities")) {
@@ -49,7 +74,49 @@ export default defineNuxtModule({
49
74
  mode: "client"
50
75
  });
51
76
  if (autoImport) {
52
- addImportsDir(resolver.resolve("../composables"));
77
+ const composablesRoot = resolver.resolve("../composables");
78
+ const exportNameRegex = /export\s+(?:async\s+)?(?:function|const|let|var)\s+([A-Za-z_$][\w$]*)/g;
79
+ const collect = (dir, acc) => {
80
+ let entries;
81
+ try {
82
+ entries = readdirSync(dir);
83
+ } catch {
84
+ return;
85
+ }
86
+ for (const entry of entries) {
87
+ const full = join(dir, entry);
88
+ let s;
89
+ try {
90
+ s = statSync(full);
91
+ } catch {
92
+ continue;
93
+ }
94
+ if (s.isDirectory()) {
95
+ collect(full, acc);
96
+ continue;
97
+ }
98
+ if (!/\.(?:m?js|ts)$/.test(entry)) continue;
99
+ if (entry.endsWith(".d.ts")) continue;
100
+ let src = "";
101
+ try {
102
+ src = readFileSync(full, "utf-8");
103
+ } catch {
104
+ continue;
105
+ }
106
+ let m;
107
+ exportNameRegex.lastIndex = 0;
108
+ while (m = exportNameRegex.exec(src)) {
109
+ const name = m[1];
110
+ if (NUXT_COMPOSABLES_BLOCKLIST.has(name)) continue;
111
+ acc.push({ name, from: full });
112
+ }
113
+ }
114
+ };
115
+ const imports = [];
116
+ collect(composablesRoot, imports);
117
+ if (imports.length) {
118
+ addImports(imports);
119
+ }
53
120
  addComponentsDir({
54
121
  path: resolver.resolve("../components"),
55
122
  prefix: "",
@@ -59,9 +126,14 @@ export default defineNuxtModule({
59
126
  }
60
127
  nuxt.options.runtimeConfig.public = nuxt.options.runtimeConfig.public || {};
61
128
  nuxt.options.runtimeConfig.public.origam = {
129
+ // Installed theme OBJECTS, passed straight to createOrigam in the
130
+ // plugins (ADR-004 — no preset-name resolution).
62
131
  themes,
63
132
  defaultTheme,
133
+ modes,
134
+ defaultMode,
64
135
  cookieName,
136
+ modeCookieName,
65
137
  cookieMaxAge
66
138
  };
67
139
  }
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
 
7
7
  var _vue = require("vue");
8
8
  var _composables = require("../composables/index.cjs");
9
- var _consts = require("../consts/index.cjs");
10
9
  var _origam = require("../origam.cjs");
11
10
  var _app = require("#app");
12
11
  module.exports = (0, _app.defineNuxtPlugin)({
@@ -14,29 +13,48 @@ module.exports = (0, _app.defineNuxtPlugin)({
14
13
  setup(nuxtApp) {
15
14
  const runtimeConfig = (0, _app.useRuntimeConfig)().public;
16
15
  const config = runtimeConfig.origam;
17
- const cookie = (0, _app.useCookie)(config.cookieName, {
16
+ const themeCookie = (0, _app.useCookie)(config.cookieName, {
18
17
  maxAge: config.cookieMaxAge,
19
18
  sameSite: "lax",
20
19
  path: "/"
21
20
  });
22
- const fromDom = typeof document !== "undefined" && document.documentElement.dataset.theme || null;
23
- const initialTheme = fromDom ?? cookie.value ?? config.defaultTheme;
24
- const origam = (0, _origam.createOrigam)();
21
+ const modeCookie = (0, _app.useCookie)(config.modeCookieName, {
22
+ maxAge: config.cookieMaxAge,
23
+ sameSite: "lax",
24
+ path: "/"
25
+ });
26
+ const themeFromDom = typeof document !== "undefined" && document.documentElement.dataset.theme || null;
27
+ const initialTheme = themeFromDom ?? themeCookie.value ?? config.defaultTheme;
28
+ const initialMode = modeCookie.value ?? config.defaultMode;
29
+ const themes = config.themes ?? [];
30
+ const origam = (0, _origam.createOrigam)({
31
+ themes,
32
+ ssr: true
33
+ });
25
34
  nuxtApp.vueApp.use(origam);
26
35
  const themeApi = (0, _composables.useTheme)();
27
36
  themeApi.setTheme(initialTheme);
37
+ themeApi.setMode(initialMode);
38
+ (0, _vue.watch)([themeApi.theme, themeApi.resolvedMode], ([brand, mode]) => {
39
+ origam._defaultsRef.value = origam._activeDefaultsFor(brand === "auto" ? "" : brand, mode);
40
+ }, {
41
+ immediate: true
42
+ });
28
43
  (0, _vue.watch)(themeApi.theme, next => {
29
- cookie.value = next;
30
- if (typeof document !== "undefined") {
31
- document.documentElement.setAttribute(_consts.ORIGAM_THEME_ATTR, next);
32
- }
44
+ themeCookie.value = next;
45
+ }, {
46
+ flush: "post"
47
+ });
48
+ (0, _vue.watch)(themeApi.mode, next => {
49
+ modeCookie.value = next;
33
50
  }, {
34
51
  flush: "post"
35
52
  });
36
53
  return {
37
54
  provide: {
38
55
  origam: {
39
- theme: initialTheme
56
+ theme: initialTheme,
57
+ mode: initialMode
40
58
  }
41
59
  }
42
60
  };
@@ -1,6 +1,5 @@
1
1
  import { watch } from "vue";
2
2
  import { useTheme } from "../composables/index.js";
3
- import { ORIGAM_THEME_ATTR } from "../consts/index.js";
4
3
  import { createOrigam } from "../origam.js";
5
4
  import { defineNuxtPlugin, useCookie, useRuntimeConfig } from "#app";
6
5
  export default defineNuxtPlugin({
@@ -8,27 +7,46 @@ export default defineNuxtPlugin({
8
7
  setup(nuxtApp) {
9
8
  const runtimeConfig = useRuntimeConfig().public;
10
9
  const config = runtimeConfig.origam;
11
- const cookie = useCookie(config.cookieName, {
10
+ const themeCookie = useCookie(config.cookieName, {
12
11
  maxAge: config.cookieMaxAge,
13
12
  sameSite: "lax",
14
13
  path: "/"
15
14
  });
16
- const fromDom = typeof document !== "undefined" && document.documentElement.dataset.theme || null;
17
- const initialTheme = fromDom ?? cookie.value ?? config.defaultTheme;
18
- const origam = createOrigam();
15
+ const modeCookie = useCookie(config.modeCookieName, {
16
+ maxAge: config.cookieMaxAge,
17
+ sameSite: "lax",
18
+ path: "/"
19
+ });
20
+ const themeFromDom = typeof document !== "undefined" && document.documentElement.dataset.theme || null;
21
+ const initialTheme = themeFromDom ?? themeCookie.value ?? config.defaultTheme;
22
+ const initialMode = modeCookie.value ?? config.defaultMode;
23
+ const themes = config.themes ?? [];
24
+ const origam = createOrigam({ themes, ssr: true });
19
25
  nuxtApp.vueApp.use(origam);
20
26
  const themeApi = useTheme();
21
27
  themeApi.setTheme(initialTheme);
28
+ themeApi.setMode(initialMode);
29
+ watch(
30
+ [themeApi.theme, themeApi.resolvedMode],
31
+ ([brand, mode]) => {
32
+ origam._defaultsRef.value = origam._activeDefaultsFor(
33
+ brand === "auto" ? "" : brand,
34
+ mode
35
+ );
36
+ },
37
+ { immediate: true }
38
+ );
22
39
  watch(themeApi.theme, (next) => {
23
- cookie.value = next;
24
- if (typeof document !== "undefined") {
25
- document.documentElement.setAttribute(ORIGAM_THEME_ATTR, next);
26
- }
40
+ themeCookie.value = next;
41
+ }, { flush: "post" });
42
+ watch(themeApi.mode, (next) => {
43
+ modeCookie.value = next;
27
44
  }, { flush: "post" });
28
45
  return {
29
46
  provide: {
30
47
  origam: {
31
- theme: initialTheme
48
+ theme: initialTheme,
49
+ mode: initialMode
32
50
  }
33
51
  }
34
52
  };
@@ -5,20 +5,33 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
 
7
7
  var _origam = require("../origam.cjs");
8
+ var _applyTheme = require("../utils/Theme/apply-theme.util.cjs");
8
9
  var _consts = require("../consts/index.cjs");
9
10
  var _app = require("#app");
10
- function resolveServerTheme(cookieValue, config, headers) {
11
+ function resolveServerTheme(cookieValue, config) {
11
12
  if (cookieValue && cookieValue !== _consts.ORIGAM_THEME_AUTO) {
12
13
  return cookieValue;
13
14
  }
14
- if (config.defaultTheme && config.defaultTheme !== _consts.ORIGAM_THEME_AUTO && cookieValue !== _consts.ORIGAM_THEME_AUTO) {
15
+ if (config.defaultTheme && config.defaultTheme !== _consts.ORIGAM_THEME_AUTO) {
15
16
  return config.defaultTheme;
16
17
  }
18
+ return _consts.ORIGAM_THEME_AUTO;
19
+ }
20
+ function resolveServerMode(cookieValue, config, headers) {
21
+ if (cookieValue === _consts.ORIGAM_MODE_LIGHT || cookieValue === _consts.ORIGAM_MODE_DARK) {
22
+ return cookieValue;
23
+ }
24
+ if (config.defaultMode === _consts.ORIGAM_MODE_LIGHT || config.defaultMode === _consts.ORIGAM_MODE_DARK) {
25
+ return config.defaultMode;
26
+ }
17
27
  const hint = headers["sec-ch-prefers-color-scheme"];
18
- if (hint === _consts.ORIGAM_THEME_DARK) {
19
- return config.themes.includes(_consts.ORIGAM_THEME_DARK) ? _consts.ORIGAM_THEME_DARK : config.themes[0] ?? _consts.ORIGAM_THEME_LIGHT;
28
+ if (hint === _consts.ORIGAM_MODE_DARK && config.modes.includes(_consts.ORIGAM_MODE_DARK)) {
29
+ return _consts.ORIGAM_MODE_DARK;
20
30
  }
21
- return config.themes.includes(_consts.ORIGAM_THEME_LIGHT) ? _consts.ORIGAM_THEME_LIGHT : config.themes[0] ?? _consts.ORIGAM_THEME_LIGHT;
31
+ if (hint === _consts.ORIGAM_MODE_LIGHT && config.modes.includes(_consts.ORIGAM_MODE_LIGHT)) {
32
+ return _consts.ORIGAM_MODE_LIGHT;
33
+ }
34
+ return _consts.ORIGAM_MODE_LIGHT;
22
35
  }
23
36
  module.exports = (0, _app.defineNuxtPlugin)({
24
37
  name: "origam:server",
@@ -26,24 +39,51 @@ module.exports = (0, _app.defineNuxtPlugin)({
26
39
  setup(nuxtApp) {
27
40
  const runtimeConfig = (0, _app.useRuntimeConfig)().public;
28
41
  const config = runtimeConfig.origam;
29
- const cookie = (0, _app.useCookie)(config.cookieName, {
42
+ const themeCookie = (0, _app.useCookie)(config.cookieName, {
43
+ maxAge: config.cookieMaxAge,
44
+ sameSite: "lax",
45
+ path: "/"
46
+ });
47
+ const modeCookie = (0, _app.useCookie)(config.modeCookieName, {
30
48
  maxAge: config.cookieMaxAge,
31
49
  sameSite: "lax",
32
50
  path: "/"
33
51
  });
34
52
  const headers = (0, _app.useRequestHeaders)(["sec-ch-prefers-color-scheme"]);
35
- const resolved = resolveServerTheme(cookie.value, config, headers);
53
+ const resolvedTheme = resolveServerTheme(themeCookie.value, config);
54
+ const resolvedMode = resolveServerMode(modeCookie.value, config, headers);
55
+ const htmlAttrs = {
56
+ [_consts.ORIGAM_MODE_ATTR]: resolvedMode
57
+ };
58
+ if (resolvedTheme !== _consts.ORIGAM_THEME_AUTO) {
59
+ htmlAttrs[_consts.ORIGAM_THEME_ATTR] = resolvedTheme;
60
+ }
61
+ const themes = config.themes ?? [];
62
+ const activeThemes = themes.filter(theme => {
63
+ const brandMatches = resolvedTheme === _consts.ORIGAM_THEME_AUTO ? theme.name === void 0 || theme.name === "" : theme.name === resolvedTheme;
64
+ const modeMatches = theme.mode === void 0 || theme.mode === resolvedMode;
65
+ return brandMatches && modeMatches;
66
+ });
67
+ const ssrThemeCss = activeThemes.map(_applyTheme.themeToCss).join("\n");
36
68
  (0, _app.useHead)({
37
- htmlAttrs: {
38
- "data-theme": resolved
39
- }
69
+ htmlAttrs,
70
+ style: ssrThemeCss ? [{
71
+ id: "origam-theme-ssr",
72
+ key: "origam-theme-ssr",
73
+ innerHTML: ssrThemeCss
74
+ }] : []
75
+ });
76
+ const origam = (0, _origam.createOrigam)({
77
+ themes,
78
+ ssr: true
40
79
  });
41
- const origam = (0, _origam.createOrigam)();
80
+ origam._defaultsRef.value = origam._activeDefaultsFor(resolvedTheme === _consts.ORIGAM_THEME_AUTO ? "" : resolvedTheme, resolvedMode);
42
81
  nuxtApp.vueApp.use(origam);
43
82
  return {
44
83
  provide: {
45
84
  origam: {
46
- theme: resolved
85
+ theme: resolvedTheme,
86
+ mode: resolvedMode
47
87
  }
48
88
  }
49
89
  };