origam 2.5.0 → 2.6.2
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.
- package/dist/src/assets/css/tokens/dark.css +3788 -3768
- package/dist/src/assets/css/tokens/light.css +1894 -1884
- package/dist/src/assets/css/tokens/primitive.css +2 -0
- package/dist/src/assets/css/tokens/themes-all.css +44226 -0
- package/dist/src/assets/locales/en.json +34 -2
- package/dist/src/assets/locales/fr.json +34 -2
- package/dist/src/assets/scss/tokens/_dark.scss +1894 -1884
- package/dist/src/assets/scss/tokens/_light.scss +1894 -1884
- package/dist/src/assets/scss/tokens/_primitive.scss +2 -0
- package/dist/src/assets/scss/tokens/_themes-all.scss +44241 -0
- package/dist/src/components/Alert/OrigamAlert.vue +16 -21
- package/dist/src/components/App/OrigamApp.vue +7 -38
- package/dist/src/components/App/OrigamAppBar.vue +35 -17
- package/dist/src/components/Audio/OrigamAudio.vue +77 -6
- package/dist/src/components/Avatar/OrigamAvatar.vue +11 -9
- package/dist/src/components/Avatar/OrigamAvatarGroup.vue +26 -8
- package/dist/src/components/Badge/OrigamBadge.vue +13 -3
- package/dist/src/components/Blockquote/OrigamBlockquote.vue +137 -13
- package/dist/src/components/BottomNav/OrigamBottomNav.vue +34 -4
- package/dist/src/components/Bracket/OrigamBracket.vue +386 -64
- package/dist/src/components/Bracket/OrigamBracketCompetitor.vue +190 -13
- package/dist/src/components/Bracket/OrigamBracketMatch.vue +197 -42
- package/dist/src/components/Bracket/OrigamBracketRound.vue +11 -3
- package/dist/src/components/Breadcrumb/OrigamBreadcrumb.vue +14 -12
- package/dist/src/components/Breadcrumb/OrigamBreadcrumbDivider.vue +4 -1
- package/dist/src/components/Breadcrumb/OrigamBreadcrumbItem.vue +3 -5
- package/dist/src/components/Btn/OrigamBtn.vue +69 -30
- package/dist/src/components/Btn/OrigamBtnGroup.vue +33 -7
- package/dist/src/components/Btn/OrigamBtnToggle.vue +4 -7
- package/dist/src/components/Calendar/OrigamCalendar.vue +785 -658
- package/dist/src/components/Card/OrigamCard.vue +24 -3
- package/dist/src/components/Card/OrigamCardHeader.vue +17 -3
- package/dist/src/components/Card/OrigamCardText.vue +29 -7
- package/dist/src/components/Carousel/OrigamCarousel.vue +29 -9
- package/dist/src/components/Carousel/OrigamCarouselItem.vue +2 -2
- package/dist/src/components/Chart/OrigamChart.vue +3 -1
- package/dist/src/components/Chart/OrigamChartAxis.vue +1 -1
- package/dist/src/components/Chart/OrigamChartBoxPlot.vue +7 -3
- package/dist/src/components/Chart/OrigamChartBullet.vue +7 -3
- package/dist/src/components/Chart/OrigamChartCandlestick.vue +7 -3
- package/dist/src/components/Chart/OrigamChartCartesian.vue +14 -10
- package/dist/src/components/Chart/OrigamChartGauge.vue +7 -3
- package/dist/src/components/Chart/OrigamChartHeatmap.vue +7 -3
- package/dist/src/components/Chart/OrigamChartHoneycomb.vue +7 -3
- package/dist/src/components/Chart/OrigamChartLegend.vue +1 -2
- package/dist/src/components/Chart/OrigamChartMap.vue +7 -3
- package/dist/src/components/Chart/OrigamChartPareto.vue +7 -3
- package/dist/src/components/Chart/OrigamChartPictorial.vue +9 -6
- package/dist/src/components/Chart/OrigamChartPolar.vue +13 -6
- package/dist/src/components/Chart/OrigamChartPolarBar.vue +7 -3
- package/dist/src/components/Chart/OrigamChartPyramid.vue +7 -3
- package/dist/src/components/Chart/OrigamChartRadar.vue +7 -5
- package/dist/src/components/Chart/OrigamChartRangeSelector.vue +3 -4
- package/dist/src/components/Chart/OrigamChartSankey.vue +7 -3
- package/dist/src/components/Chart/OrigamChartSparkline.vue +5 -3
- package/dist/src/components/Chart/OrigamChartStreamgraph.vue +9 -5
- package/dist/src/components/Chart/OrigamChartSunburst.vue +7 -3
- package/dist/src/components/Chart/OrigamChartTooltip.vue +1 -1
- package/dist/src/components/Chart/OrigamChartTreemap.vue +7 -3
- package/dist/src/components/Chart/OrigamChartVariwide.vue +7 -3
- package/dist/src/components/Chart/OrigamChartWordCloud.vue +3 -2
- package/dist/src/components/Checkbox/OrigamCheckbox.vue +18 -3
- package/dist/src/components/Checkbox/OrigamCheckboxBtn.vue +4 -2
- package/dist/src/components/Chip/OrigamChip.vue +25 -12
- package/dist/src/components/Chip/OrigamChipGroup.vue +5 -5
- package/dist/src/components/ClientOnly/OrigamClientOnly.vue +1 -1
- package/dist/src/components/Clipboard/OrigamClipboard.vue +12 -4
- package/dist/src/components/Code/OrigamCode.vue +144 -39
- package/dist/src/components/ColorPicker/OrigamColorPicker.vue +7 -2
- package/dist/src/components/ColorPicker/OrigamColorPickerCanvas.vue +3 -2
- package/dist/src/components/ColorPicker/OrigamColorPickerEdit.vue +2 -2
- package/dist/src/components/ColorPicker/OrigamColorPickerPreview.vue +1 -1
- package/dist/src/components/ColorPicker/OrigamColorPickerSwatches.vue +1 -1
- package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +15 -5
- package/dist/src/components/CommandPalette/OrigamCommandPalette.vue +13 -3
- package/dist/src/components/ConfirmWrapper/OrigamConfirmWrapper.vue +1 -1
- package/dist/src/components/ContextualMenu/OrigamContextualMenu.vue +7 -2
- package/dist/src/components/Counter/OrigamCounter.vue +2 -1
- package/dist/src/components/DataList/OrigamDataList.vue +21 -5
- package/dist/src/components/DataList/OrigamDataText.vue +5 -1
- package/dist/src/components/DataList/OrigamDataTitle.vue +5 -1
- package/dist/src/components/DataTable/OrigamDataTable.vue +15 -7
- package/dist/src/components/DataTable/OrigamDataTableColumnCell.vue +1 -1
- package/dist/src/components/DataTable/OrigamDataTableFooter.vue +1 -1
- package/dist/src/components/DataTable/OrigamDataTableGroupHeaderRow.vue +1 -1
- package/dist/src/components/DataTable/OrigamDataTableHeaderCell.vue +3 -2
- package/dist/src/components/DataTable/OrigamDataTableHeaders.vue +2 -1
- package/dist/src/components/DataTable/OrigamDataTableHeadersCell.vue +1 -1
- package/dist/src/components/DataTable/OrigamDataTableHeadersCellMobile.vue +1 -1
- package/dist/src/components/DataTable/OrigamDataTableRow.vue +5 -3
- package/dist/src/components/DataTable/OrigamDataTableRows.vue +3 -3
- package/dist/src/components/DatePicker/OrigamDatePicker.vue +21 -30
- package/dist/src/components/DatePicker/OrigamDatePickerControls.vue +2 -2
- package/dist/src/components/DatePicker/OrigamDatePickerHeader.vue +1 -1
- package/dist/src/components/DatePicker/OrigamDatePickerMonth.vue +16 -28
- package/dist/src/components/DatePicker/OrigamDatePickerMonths.vue +3 -3
- package/dist/src/components/DatePicker/OrigamDatePickerYears.vue +3 -3
- package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +27 -16
- package/dist/src/components/DefaultsProvider/OrigamDefaultsProvider.vue +1 -1
- package/dist/src/components/Dialog/OrigamDialog.vue +1 -1
- package/dist/src/components/Dialog/OrigamDialogConfirmation.vue +1 -1
- package/dist/src/components/Divider/OrigamDivider.vue +2 -2
- package/dist/src/components/Drawer/OrigamDrawer.vue +5 -11
- package/dist/src/components/EmptyState/OrigamEmptyState.vue +14 -4
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanel.vue +12 -2
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelContent.vue +4 -2
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelHeader.vue +14 -5
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanels.vue +2 -1
- package/dist/src/components/Field/OrigamField.vue +26 -9
- package/dist/src/components/FileField/OrigamFileField.vue +8 -3
- package/dist/src/components/FileField/OrigamFileFieldDragNDropItem.vue +14 -4
- package/dist/src/components/FileField/OrigamFileFieldListItem.vue +14 -4
- package/dist/src/components/Form/OrigamForm.vue +10 -2
- package/dist/src/components/Grid/OrigamGrid.vue +1 -1
- package/dist/src/components/Grid/OrigamGridItem.vue +1 -1
- package/dist/src/components/Grids/OrigamCol.vue +1 -1
- package/dist/src/components/Grids/OrigamContainer.vue +1 -1
- package/dist/src/components/Grids/OrigamRow.vue +6 -2
- package/dist/src/components/Grids/OrigamSpacer.vue +1 -1
- package/dist/src/components/Icon/OrigamClassIcon.vue +1 -1
- package/dist/src/components/Icon/OrigamComponentIcon.vue +1 -1
- package/dist/src/components/Icon/OrigamIcon.vue +1 -1
- package/dist/src/components/Icon/OrigamLigatureIcon.vue +1 -1
- package/dist/src/components/Icon/OrigamSvgIcon.vue +2 -2
- package/dist/src/components/Img/OrigamImg.vue +10 -9
- package/dist/src/components/InfiniteScroll/OrigamInfiniteScroll.vue +14 -7
- package/dist/src/components/InfiniteScroll/OrigamInfiniteScrollIntersect.vue +3 -2
- package/dist/src/components/InlineEdit/OrigamInlineEdit.vue +13 -4
- package/dist/src/components/Input/OrigamInput.vue +17 -3
- package/dist/src/components/ItemGroup/OrigamItem.vue +1 -1
- package/dist/src/components/ItemGroup/OrigamItemGroup.vue +1 -1
- package/dist/src/components/Kbd/OrigamKbd.vue +18 -8
- package/dist/src/components/Label/OrigamLabel.vue +14 -3
- package/dist/src/components/Layout/OrigamLayout.vue +1 -1
- package/dist/src/components/Lazy/OrigamLazy.vue +1 -1
- package/dist/src/components/List/OrigamList.vue +1 -1
- package/dist/src/components/List/OrigamListChildren.vue +1 -1
- package/dist/src/components/List/OrigamListGroup.vue +4 -1
- package/dist/src/components/List/OrigamListGroupActivator.vue +1 -1
- package/dist/src/components/List/OrigamListItem.vue +14 -4
- package/dist/src/components/List/OrigamListSubheader.vue +13 -3
- package/dist/src/components/Loader/OrigamLoader.vue +1 -1
- package/dist/src/components/Main/OrigamMain.vue +1 -1
- package/dist/src/components/Masonry/OrigamMasonry.vue +2 -2
- package/dist/src/components/Media/OrigamMediaController.vue +1 -1
- package/dist/src/components/Media/OrigamMediaScrubber.vue +3 -2
- package/dist/src/components/Media/OrigamMediaVolumeControl.vue +3 -2
- package/dist/src/components/Menu/OrigamMenu.vue +9 -2
- package/dist/src/components/Messages/OrigamMessages.vue +13 -4
- package/dist/src/components/NumberField/OrigamNumberField.vue +80 -40
- package/dist/src/components/NumberFormat/OrigamNumberFormat.vue +1 -1
- package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +107 -11
- package/dist/src/components/Overlay/OrigamOverlay.vue +1 -1
- package/dist/src/components/Overlay/OrigamOverlayScrim.vue +1 -1
- package/dist/src/components/Pagination/OrigamPagination.vue +16 -4
- package/dist/src/components/Parallax/OrigamParallax.vue +9 -2
- package/dist/src/components/Parallax/OrigamParallaxElement.vue +1 -1
- package/dist/src/components/Parallax/OrigamParallaxLayer.vue +2 -2
- package/dist/src/components/PasswordField/OrigamPasswordField.vue +9 -2
- package/dist/src/components/Picker/OrigamPicker.vue +8 -3
- package/dist/src/components/Picker/OrigamPickerTitle.vue +10 -3
- package/dist/src/components/Progress/OrigamProgress.vue +6 -3
- package/dist/src/components/Progress/OrigamProgressCircular.vue +3 -1
- package/dist/src/components/Progress/OrigamProgressLinear.vue +5 -6
- package/dist/src/components/{QRCode → QrCode}/OrigamQrCode.vue +1 -1
- package/dist/src/components/QrCode/index.d.ts +1 -0
- package/dist/src/components/Radio/OrigamRadio.vue +20 -11
- package/dist/src/components/Radio/OrigamRadioBtn.vue +4 -2
- package/dist/src/components/Radio/OrigamRadioGroup.vue +48 -41
- package/dist/src/components/RatingField/OrigamRatingField.vue +9 -13
- package/dist/src/components/RatingField/OrigamRatingFieldItem.vue +3 -6
- package/dist/src/components/Responsive/OrigamResponsive.vue +1 -1
- package/dist/src/components/Section/OrigamSection.vue +1 -1
- package/dist/src/components/Select/OrigamSelect.vue +19 -10
- package/dist/src/components/SelectionControl/OrigamSelectionControl.vue +12 -6
- package/dist/src/components/SelectionControl/OrigamSelectionControlGroup.vue +2 -2
- package/dist/src/components/Sheet/OrigamSheet.vue +11 -3
- package/dist/src/components/Skeleton/OrigamSkeleton.vue +2 -4
- package/dist/src/components/Slide/OrigamSlideGroup.vue +1 -1
- package/dist/src/components/SliderField/OrigamSliderField.vue +7 -6
- package/dist/src/components/SliderField/OrigamSliderFieldTrack.vue +1 -1
- package/dist/src/components/Snackbar/OrigamSnackbar.vue +5 -4
- package/dist/src/components/Snackbar/OrigamSnackbarGroup.vue +1 -1
- package/dist/src/components/Snackbar/OrigamSnackbarItem.vue +27 -26
- package/dist/src/components/Stepper/OrigamStepper.vue +6 -2
- package/dist/src/components/Stepper/OrigamStepperItem.vue +10 -3
- package/dist/src/components/Switch/OrigamSwitch.vue +35 -37
- package/dist/src/components/Switch/OrigamSwitchTrack.vue +9 -15
- package/dist/src/components/SystemBar/OrigamSystemBar.vue +14 -4
- package/dist/src/components/Table/OrigamTable.vue +15 -3
- package/dist/src/components/Tabs/OrigamTab.vue +13 -3
- package/dist/src/components/Tabs/OrigamTabPanel.vue +1 -1
- package/dist/src/components/Tabs/OrigamTabPanels.vue +1 -1
- package/dist/src/components/Tabs/OrigamTabs.vue +1 -1
- package/dist/src/components/TextField/OrigamTextField.vue +8 -1
- package/dist/src/components/TextMask/OrigamTextMask.vue +17 -27
- package/dist/src/components/TextareaField/OrigamRichToolbar.vue +15 -11
- package/dist/src/components/TextareaField/OrigamTextareaField.vue +11 -1
- package/dist/src/components/ThemeProvider/OrigamThemeProvider.vue +4 -1
- package/dist/src/components/Timeline/OrigamTimeline.vue +3 -3
- package/dist/src/components/Timeline/OrigamTimelineItem.vue +3 -1
- package/dist/src/components/Title/OrigamTitle.vue +20 -8
- package/dist/src/components/Toolbar/OrigamToolbar.vue +17 -5
- package/dist/src/components/Tooltip/OrigamTooltip.vue +12 -3
- package/dist/src/components/Transition/OrigamExpandX.vue +1 -1
- package/dist/src/components/Transition/OrigamExpandY.vue +1 -1
- package/dist/src/components/Transition/OrigamFade.vue +1 -1
- package/dist/src/components/Transition/OrigamReverseTranslatePicker.vue +1 -1
- package/dist/src/components/Transition/OrigamScaleRotate.vue +1 -1
- package/dist/src/components/Transition/OrigamSlideX.vue +1 -1
- package/dist/src/components/Transition/OrigamSlideY.vue +1 -1
- package/dist/src/components/Transition/OrigamSnack.vue +1 -1
- package/dist/src/components/Transition/OrigamTransition.vue +1 -1
- package/dist/src/components/Transition/OrigamTranslateBottom.vue +1 -1
- package/dist/src/components/Transition/OrigamTranslatePicker.vue +1 -1
- package/dist/src/components/Transition/OrigamTranslateScale.vue +1 -1
- package/dist/src/components/Transition/OrigamWindowXReverseTranslate.vue +1 -1
- package/dist/src/components/Transition/OrigamWindowXTranslate.vue +1 -1
- package/dist/src/components/Transition/OrigamWindowYReverseTranslate.vue +1 -1
- package/dist/src/components/Transition/OrigamWindowYTranslate.vue +1 -1
- package/dist/src/components/Treeview/OrigamTreeview.vue +1 -1
- package/dist/src/components/Treeview/OrigamTreeviewNode.vue +7 -5
- package/dist/src/components/Video/OrigamVideo.vue +56 -63
- package/dist/src/components/VirtualScroll/OrigamVirtualScroll.vue +1 -1
- package/dist/src/components/VirtualScroll/OrigamVirtualScrollItem.vue +1 -6
- package/dist/src/components/Watermark/OrigamWatermark.vue +1 -1
- package/dist/src/components/Window/OrigamWindow.vue +32 -2
- package/dist/src/components/Window/OrigamWindowItem.vue +1 -1
- package/dist/src/components/index.cjs +1 -1
- package/dist/src/components/index.js +1 -1
- package/dist/src/composables/Chart/chart-gauge.composable.cjs +1 -1
- package/dist/src/composables/Chart/chart-gauge.composable.js +1 -1
- package/dist/src/composables/Chart/chart-header-typography.composable.cjs +20 -0
- package/dist/src/composables/Chart/chart-header-typography.composable.d.ts +27 -0
- package/dist/src/composables/Chart/chart-header-typography.composable.js +11 -0
- package/dist/src/composables/Chart/chart-zoom.composable.cjs +0 -1
- package/dist/src/composables/Chart/chart-zoom.composable.js +0 -1
- package/dist/src/composables/Chart/chart.composable.cjs +0 -11
- package/dist/src/composables/Chart/chart.composable.js +0 -11
- package/dist/src/composables/Code/code.composable.js +4 -1
- package/dist/src/composables/Commons/audio.composable.d.ts +97 -31
- package/dist/src/composables/Commons/border.composable.cjs +10 -0
- package/dist/src/composables/Commons/border.composable.js +7 -0
- package/dist/src/composables/Commons/color.composable.cjs +42 -42
- package/dist/src/composables/Commons/color.composable.d.ts +8 -3
- package/dist/src/composables/Commons/color.composable.js +2 -2
- package/dist/src/composables/Commons/date-picker-calendar.composable.cjs +1 -1
- package/dist/src/composables/Commons/date-picker-calendar.composable.d.ts +1 -1
- package/dist/src/composables/Commons/date-picker-calendar.composable.js +1 -1
- package/dist/src/composables/Commons/defaults.composable.cjs +10 -9
- package/dist/src/composables/Commons/defaults.composable.js +10 -9
- package/dist/src/composables/Commons/delay.composable.cjs +8 -3
- package/dist/src/composables/Commons/delay.composable.js +7 -4
- package/dist/src/composables/Commons/density.composable.cjs +1 -1
- package/dist/src/composables/Commons/density.composable.js +2 -2
- package/dist/src/composables/Commons/dragResizer.composable.cjs +7 -9
- package/dist/src/composables/Commons/dragResizer.composable.js +8 -9
- package/dist/src/composables/Commons/focus.composable.cjs +1 -1
- package/dist/src/composables/Commons/focus.composable.js +1 -1
- package/dist/src/composables/Commons/layout.composable.cjs +12 -0
- package/dist/src/composables/Commons/layout.composable.js +14 -0
- package/dist/src/composables/Commons/message.composable.cjs +1 -1
- package/dist/src/composables/Commons/message.composable.d.ts +1 -1
- package/dist/src/composables/Commons/message.composable.js +1 -1
- package/dist/src/composables/Commons/rounded.composable.cjs +15 -4
- package/dist/src/composables/Commons/rounded.composable.d.ts +1 -1
- package/dist/src/composables/Commons/rounded.composable.js +17 -6
- package/dist/src/composables/Commons/scroll.composable.cjs +2 -2
- package/dist/src/composables/Commons/scroll.composable.js +2 -2
- package/dist/src/composables/Commons/size.composable.d.ts +1 -1
- package/dist/src/composables/Commons/stateEffect.composable.cjs +36 -14
- package/dist/src/composables/Commons/stateEffect.composable.js +38 -14
- package/dist/src/composables/Commons/status.composable.cjs +11 -1
- package/dist/src/composables/Commons/status.composable.d.ts +2 -0
- package/dist/src/composables/Commons/status.composable.js +10 -1
- package/dist/src/composables/Commons/sticky.composable.d.ts +2 -14
- package/dist/src/composables/Commons/style.composable.cjs +5 -3
- package/dist/src/composables/Commons/style.composable.js +5 -3
- package/dist/src/composables/Commons/typography.composable.cjs +23 -0
- package/dist/src/composables/Commons/typography.composable.d.ts +7 -0
- package/dist/src/composables/Commons/typography.composable.js +21 -0
- package/dist/src/composables/DataTable/headers.composable.d.ts +4 -364
- package/dist/src/composables/Icon/icon.composable.cjs +6 -1
- package/dist/src/composables/Icon/icon.composable.js +4 -1
- package/dist/src/composables/InlineEdit/inline-edit.composable.cjs +16 -2
- package/dist/src/composables/InlineEdit/inline-edit.composable.js +16 -2
- package/dist/src/composables/Masonry/masonry.composable.d.ts +2 -1
- package/dist/src/composables/Parallax/transform.composable.d.ts +1 -1
- package/dist/src/composables/Responsive/aspect.composable.cjs +9 -1
- package/dist/src/composables/Responsive/aspect.composable.d.ts +1 -1
- package/dist/src/composables/Responsive/aspect.composable.js +9 -1
- package/dist/src/composables/Theme/installed-themes.composable.cjs +11 -0
- package/dist/src/composables/Theme/installed-themes.composable.d.ts +19 -0
- package/dist/src/composables/Theme/installed-themes.composable.js +5 -0
- package/dist/src/composables/Theme/theme.composable.cjs +86 -15
- package/dist/src/composables/Theme/theme.composable.d.ts +55 -10
- package/dist/src/composables/Theme/theme.composable.js +88 -17
- package/dist/src/composables/index.cjs +36 -0
- package/dist/src/composables/index.d.ts +3 -0
- package/dist/src/composables/index.js +3 -0
- package/dist/src/consts/Bracket/bracket.const.cjs +4 -2
- package/dist/src/consts/Bracket/bracket.const.d.ts +12 -0
- package/dist/src/consts/Bracket/bracket.const.js +2 -0
- package/dist/src/consts/Commons/density.const.cjs +2 -2
- package/dist/src/consts/Commons/density.const.d.ts +1 -1
- package/dist/src/consts/Commons/density.const.js +1 -1
- package/dist/src/consts/Commons/rounded.const.cjs +4 -2
- package/dist/src/consts/Commons/rounded.const.d.ts +22 -2
- package/dist/src/consts/Commons/rounded.const.js +3 -1
- package/dist/src/consts/DataTable/select.const.cjs +1 -1
- package/dist/src/consts/DataTable/select.const.js +1 -1
- package/dist/src/consts/Icon/mdi.const.cjs +6 -1
- package/dist/src/consts/Icon/mdi.const.js +10 -2
- package/dist/src/consts/Theme/theme.const.cjs +11 -1
- package/dist/src/consts/Theme/theme.const.d.ts +16 -0
- package/dist/src/consts/Theme/theme.const.js +10 -0
- package/dist/src/directives/Contrast/contrast.directive.cjs +150 -0
- package/dist/src/directives/Contrast/contrast.directive.d.ts +5 -0
- package/dist/src/directives/Contrast/contrast.directive.js +131 -0
- package/dist/src/directives/index.cjs +7 -0
- package/dist/src/directives/index.d.ts +1 -0
- package/dist/src/directives/index.js +1 -0
- package/dist/src/enums/BottomNav/bottom-nav-position.enum.cjs +12 -0
- package/dist/src/enums/BottomNav/bottom-nav-position.enum.d.ts +10 -0
- package/dist/src/enums/BottomNav/bottom-nav-position.enum.js +6 -0
- package/dist/src/enums/Toolbar/toolbar.enum.cjs +1 -0
- package/dist/src/enums/Toolbar/toolbar.enum.d.ts +2 -1
- package/dist/src/enums/Toolbar/toolbar.enum.js +1 -0
- package/dist/src/enums/index.cjs +22 -0
- package/dist/src/enums/index.d.ts +2 -0
- package/dist/src/enums/index.js +2 -0
- package/dist/src/interfaces/Alert/alert.interface.d.ts +2 -3
- package/dist/src/interfaces/App/app-bar.interface.d.ts +19 -1
- package/dist/src/interfaces/App/app.interface.cjs +1 -0
- package/dist/src/interfaces/App/app.interface.d.ts +24 -0
- package/dist/src/interfaces/Audio/audio-player.interface.d.ts +23 -2
- package/dist/src/interfaces/Avatar/avatar.interface.d.ts +2 -4
- package/dist/src/interfaces/Badge/badge.interface.d.ts +2 -2
- package/dist/src/interfaces/Blockquote/blockquote.interface.d.ts +23 -21
- package/dist/src/interfaces/BottomNav/bottom-nav.interface.d.ts +12 -4
- package/dist/src/interfaces/Bracket/bracket-competitor-component.interface.d.ts +17 -6
- package/dist/src/interfaces/Bracket/bracket-match-component.interface.d.ts +13 -6
- package/dist/src/interfaces/Bracket/bracket-match.interface.d.ts +22 -0
- package/dist/src/interfaces/Bracket/bracket-round-component.interface.d.ts +2 -2
- package/dist/src/interfaces/Bracket/bracket.interface.d.ts +17 -2
- package/dist/src/interfaces/Breadcrumb/breadcrumb-divider.interface.d.ts +2 -2
- package/dist/src/interfaces/Breadcrumb/breadcrumb.interface.d.ts +2 -3
- package/dist/src/interfaces/Btn/btn-group.interface.d.ts +2 -2
- package/dist/src/interfaces/Btn/btn.interface.d.ts +11 -3
- package/dist/src/interfaces/Calendar/calendar.interface.d.ts +7 -2
- package/dist/src/interfaces/Card/card-header.interface.d.ts +2 -2
- package/dist/src/interfaces/Card/card-text.interface.d.ts +2 -2
- package/dist/src/interfaces/Carousel/carousel.interface.d.ts +2 -2
- package/dist/src/interfaces/Chart/chart-base.interface.d.ts +9 -8
- package/dist/src/interfaces/Chart/chart-word-cloud.interface.d.ts +1 -1
- package/dist/src/interfaces/Chart/chart.interface.d.ts +12 -1
- package/dist/src/interfaces/Checkbox/checkbox-btn.interface.d.ts +3 -3
- package/dist/src/interfaces/Checkbox/checkbox.interface.d.ts +10 -9
- package/dist/src/interfaces/Chip/chip-group.interface.d.ts +3 -1
- package/dist/src/interfaces/Chip/chip.interface.d.ts +2 -2
- package/dist/src/interfaces/Clipboard/clipboard.interface.d.ts +2 -2
- package/dist/src/interfaces/Code/code.interface.d.ts +19 -2
- package/dist/src/interfaces/ColorPickerField/color-picker-field.interface.d.ts +2 -2
- package/dist/src/interfaces/CommandPalette/command-palette.interface.d.ts +2 -1
- package/dist/src/interfaces/Commons/calendar.interface.d.ts +3 -3
- package/dist/src/interfaces/Commons/commons.interface.d.ts +34 -1
- package/dist/src/interfaces/Commons/filters.interface.d.ts +2 -2
- package/dist/src/interfaces/Commons/hover.interface.d.ts +18 -3
- package/dist/src/interfaces/Commons/scroll.interface.d.ts +8 -1
- package/dist/src/interfaces/Commons/typography.interface.cjs +1 -0
- package/dist/src/interfaces/Commons/typography.interface.d.ts +52 -0
- package/dist/src/interfaces/Commons/typography.interface.js +0 -0
- package/dist/src/interfaces/Commons/validation.interface.d.ts +3 -1
- package/dist/src/interfaces/Counter/counter.interface.d.ts +2 -2
- package/dist/src/interfaces/DataList/data-list.interface.d.ts +2 -2
- package/dist/src/interfaces/DataList/data-text.interface.d.ts +5 -0
- package/dist/src/interfaces/DataList/data-title.interface.d.ts +5 -0
- package/dist/src/interfaces/DataTable/headers.interface.d.ts +5 -5
- package/dist/src/interfaces/DataTable/row.interface.d.ts +2 -2
- package/dist/src/interfaces/DatePicker/date-picker-controls.interface.d.ts +16 -8
- package/dist/src/interfaces/DatePicker/date-picker-header.interface.d.ts +6 -3
- package/dist/src/interfaces/DatePicker/date-picker-months.interface.d.ts +2 -2
- package/dist/src/interfaces/DatePicker/date-picker-years.interface.d.ts +1 -1
- package/dist/src/interfaces/DatePicker/date-picker.interface.d.ts +1 -1
- package/dist/src/interfaces/Dialog/dialog-confirmation.interface.d.ts +2 -2
- package/dist/src/interfaces/EmptyState/empty-state.interface.d.ts +9 -2
- package/dist/src/interfaces/ExpensionPanel/expansion-panel-header.interface.d.ts +2 -2
- package/dist/src/interfaces/Field/field.interface.d.ts +7 -2
- package/dist/src/interfaces/FileField/file-field-dragndrop-item.interface.d.ts +2 -2
- package/dist/src/interfaces/FileField/file-field-list-item.interface.d.ts +2 -2
- package/dist/src/interfaces/FileField/file-field.interface.d.ts +1 -1
- package/dist/src/interfaces/Form/form.interface.d.ts +2 -2
- package/dist/src/interfaces/Grids/row.interface.d.ts +2 -2
- package/dist/src/interfaces/InfiniteScroll/infinite-scroll.interface.d.ts +2 -2
- package/dist/src/interfaces/InlineEdit/inline-edit.interface.d.ts +31 -2
- package/dist/src/interfaces/Input/input.interface.d.ts +4 -3
- package/dist/src/interfaces/Kbd/kbd.interface.d.ts +2 -2
- package/dist/src/interfaces/Label/label.interface.d.ts +2 -2
- package/dist/src/interfaces/List/list-group.interface.d.ts +4 -1
- package/dist/src/interfaces/List/list-item.interface.d.ts +2 -2
- package/dist/src/interfaces/List/list-subheader.interface.d.ts +2 -2
- package/dist/src/interfaces/Media/media-scrubber.interface.d.ts +10 -2
- package/dist/src/interfaces/Messages/messages.interface.d.ts +2 -2
- package/dist/src/interfaces/NumberField/number-field.interface.d.ts +1 -1
- package/dist/src/interfaces/Nuxt/nuxt-module.interface.d.ts +55 -15
- package/dist/src/interfaces/OtpInputField/otp-input-field.interface.d.ts +4 -2
- package/dist/src/interfaces/Pagination/pagination.interface.d.ts +18 -3
- package/dist/src/interfaces/Parallax/parallax.interface.d.ts +2 -2
- package/dist/src/interfaces/PasswordField/password-field.interface.d.ts +1 -1
- package/dist/src/interfaces/Picker/picker-title.interface.d.ts +2 -2
- package/dist/src/interfaces/Progress/progress.interface.d.ts +8 -2
- package/dist/src/interfaces/RatingField/rating-field-item.interface.d.ts +2 -1
- package/dist/src/interfaces/SelectionControl/selection-control-group.interface.d.ts +2 -1
- package/dist/src/interfaces/SelectionControl/selection-control.interface.d.ts +23 -5
- package/dist/src/interfaces/Sheet/sheet.interface.d.ts +2 -2
- package/dist/src/interfaces/Snackbar/snackbar-item.interface.d.ts +2 -2
- package/dist/src/interfaces/SystemBar/system-bar.interface.d.ts +2 -2
- package/dist/src/interfaces/Table/table.interface.d.ts +2 -2
- package/dist/src/interfaces/Tabs/tab.interface.d.ts +7 -2
- package/dist/src/interfaces/TextField/text-field.interface.d.ts +1 -1
- package/dist/src/interfaces/TextMask/text-mask.interface.d.ts +7 -33
- package/dist/src/interfaces/TextareaField/textarea-field.interface.d.ts +3 -3
- package/dist/src/interfaces/Theme/origam-theme.interface.cjs +1 -0
- package/dist/src/interfaces/Theme/origam-theme.interface.d.ts +114 -0
- package/dist/src/interfaces/Theme/origam-theme.interface.js +0 -0
- package/dist/src/interfaces/Timeline/timeline.interface.d.ts +1 -1
- package/dist/src/interfaces/Title/title.interface.d.ts +2 -2
- package/dist/src/interfaces/Toolbar/toolbar.interface.d.ts +2 -2
- package/dist/src/interfaces/Tooltip/tooltip.interface.d.ts +2 -2
- package/dist/src/interfaces/Video/video.interface.d.ts +2 -2
- package/dist/src/interfaces/Window/window.interface.d.ts +2 -2
- package/dist/src/interfaces/index.cjs +33 -0
- package/dist/src/interfaces/index.d.ts +3 -0
- package/dist/src/interfaces/index.js +3 -0
- package/dist/src/nuxt/module.cjs +78 -8
- package/dist/src/nuxt/module.js +81 -9
- package/dist/src/nuxt/plugin.client.cjs +28 -10
- package/dist/src/nuxt/plugin.client.js +28 -10
- package/dist/src/nuxt/plugin.server.cjs +52 -12
- package/dist/src/nuxt/plugin.server.js +55 -13
- package/dist/src/origam.cjs +39 -2
- package/dist/src/origam.d.ts +19 -1
- package/dist/src/origam.js +46 -5
- package/dist/src/services/Commons/date-adapter.service.d.ts +1 -1
- package/dist/src/themes/index.cjs +24 -0
- package/dist/src/themes/index.d.ts +1 -0
- package/dist/src/themes/index.js +1 -0
- package/dist/src/themes/origam.theme.cjs +906 -0
- package/dist/src/themes/origam.theme.d.ts +4 -0
- package/dist/src/themes/origam.theme.js +379 -0
- package/dist/src/types/BottomNav/bottom-nav.type.d.ts +2 -0
- package/dist/src/types/Commons/font-family.type.cjs +1 -0
- package/dist/src/types/Commons/font-family.type.d.ts +5 -0
- package/dist/src/types/Commons/font-family.type.js +0 -0
- package/dist/src/types/Commons/font-size.type.cjs +1 -0
- package/dist/src/types/Commons/font-size.type.d.ts +6 -0
- package/dist/src/types/Commons/font-size.type.js +0 -0
- package/dist/src/types/Commons/font-weight.type.cjs +1 -0
- package/dist/src/types/Commons/font-weight.type.d.ts +5 -0
- package/dist/src/types/Commons/font-weight.type.js +0 -0
- package/dist/src/types/Commons/letter-spacing.type.cjs +1 -0
- package/dist/src/types/Commons/letter-spacing.type.d.ts +5 -0
- package/dist/src/types/Commons/letter-spacing.type.js +0 -0
- package/dist/src/types/Commons/line-height.type.cjs +1 -0
- package/dist/src/types/Commons/line-height.type.d.ts +5 -0
- package/dist/src/types/Commons/line-height.type.js +0 -0
- package/dist/src/types/Commons/mode.type.d.ts +1 -1
- package/dist/src/types/Theme/installed-theme.type.cjs +1 -0
- package/dist/src/types/Theme/installed-theme.type.d.ts +31 -0
- package/dist/src/types/Theme/installed-theme.type.js +0 -0
- package/dist/src/types/Theme/semantic-tree.type.cjs +1 -0
- package/dist/src/types/Theme/semantic-tree.type.d.ts +48 -0
- package/dist/src/types/Theme/semantic-tree.type.js +0 -0
- package/dist/src/types/Theme/theme.type.d.ts +27 -6
- package/dist/src/types/Theme/token-tree.type.cjs +1 -0
- package/dist/src/types/Theme/token-tree.type.d.ts +10 -0
- package/dist/src/types/Theme/token-tree.type.js +0 -0
- package/dist/src/types/index.cjs +88 -0
- package/dist/src/types/index.d.ts +8 -0
- package/dist/src/types/index.js +8 -0
- package/dist/src/types/tokens.type.d.ts +1 -1
- package/dist/src/utils/Bracket/bracket-surface.util.cjs +106 -0
- package/dist/src/utils/Bracket/bracket-surface.util.d.ts +47 -0
- package/dist/src/utils/Bracket/bracket-surface.util.js +88 -0
- package/dist/src/utils/Commons/border.util.d.ts +1 -1
- package/dist/src/utils/Commons/color.util.cjs +4 -2
- package/dist/src/utils/Commons/color.util.js +4 -2
- package/dist/src/utils/Commons/commons.util.cjs +3 -2
- package/dist/src/utils/Commons/commons.util.d.ts +1 -1
- package/dist/src/utils/Commons/commons.util.js +3 -2
- package/dist/src/utils/Commons/date.util.d.ts +1 -1
- package/dist/src/utils/Commons/dom.util.d.ts +1 -1
- package/dist/src/utils/Commons/elevation.util.cjs +1 -1
- package/dist/src/utils/Commons/elevation.util.js +1 -1
- package/dist/src/utils/Commons/forwardRefs.util.cjs +1 -1
- package/dist/src/utils/Commons/forwardRefs.util.js +1 -1
- package/dist/src/utils/Commons/gradient.util.cjs +3 -3
- package/dist/src/utils/Commons/gradient.util.js +1 -1
- package/dist/src/utils/Commons/hover.util.cjs +5 -1
- package/dist/src/utils/Commons/hover.util.js +5 -1
- package/dist/src/utils/Commons/margin.util.d.ts +1 -1
- package/dist/src/utils/Commons/padding.util.d.ts +1 -1
- package/dist/src/utils/Commons/ripple.util.cjs +1 -2
- package/dist/src/utils/Commons/ripple.util.js +2 -3
- package/dist/src/utils/Commons/rounded.util.cjs +5 -0
- package/dist/src/utils/Commons/rounded.util.d.ts +10 -1
- package/dist/src/utils/Commons/rounded.util.js +4 -0
- package/dist/src/utils/DataTable/headers.util.cjs +1 -1
- package/dist/src/utils/DataTable/headers.util.js +1 -1
- package/dist/src/utils/DataTable/sort.util.cjs +2 -2
- package/dist/src/utils/DataTable/sort.util.js +2 -2
- package/dist/src/utils/List/list-item.util.d.ts +7 -0
- package/dist/src/utils/Theme/apply-theme.util.cjs +148 -0
- package/dist/src/utils/Theme/apply-theme.util.d.ts +65 -0
- package/dist/src/utils/Theme/apply-theme.util.js +125 -0
- package/dist/src/utils/Theme/token-name.util.cjs +47 -0
- package/dist/src/utils/Theme/token-name.util.d.ts +54 -0
- package/dist/src/utils/Theme/token-name.util.js +55 -0
- package/dist/src/utils/Transition/transition.util.d.ts +1 -1
- package/dist/src/utils/index.cjs +22 -0
- package/dist/src/utils/index.d.ts +2 -0
- package/dist/src/utils/index.js +2 -0
- package/package.json +22 -63
- package/CHANGELOG.md +0 -807
- package/README.md +0 -275
- package/dist/src/App.vue +0 -25
- package/dist/src/main.cjs +0 -7
- package/dist/src/main.d.ts +0 -1
- package/dist/src/main.js +0 -4
- /package/dist/src/components/{QRCode → QrCode}/index.cjs +0 -0
- /package/dist/src/components/{QRCode → QrCode}/index.js +0 -0
- /package/dist/src/{components/QRCode/index.d.ts → interfaces/App/app.interface.js} +0 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { IThemeVars, TThemeVars } from '../../types';
|
|
2
|
+
import type { TMode } from '../../types/Theme/theme.type';
|
|
3
|
+
import type { IDefault } from '../DefaultProvider/default-provider.interface';
|
|
4
|
+
/**
|
|
5
|
+
* Runtime theme object ingested by `createOrigam({ themes })`. At install time
|
|
6
|
+
* the DS resolves it to a block of `--origam-*` CSS variables injected into
|
|
7
|
+
* `<head>`, scoped to `:root` (or `[data-theme="<name>"]` when `name` is set,
|
|
8
|
+
* optionally narrowed by `[data-mode]` when `mode` is set).
|
|
9
|
+
*
|
|
10
|
+
* ## A theme has exactly THREE authoring surfaces
|
|
11
|
+
*
|
|
12
|
+
* 1. **`vars`** — the design tokens (the normal path). Plain nested JSON keyed
|
|
13
|
+
* by token GROUP (`color` / `rounded` / `border` / `typo` / `shadow` /
|
|
14
|
+
* `spacing` / `motion`). No `--origam-*` prefixes, no DTCG ceremony: the DS
|
|
15
|
+
* walks each tree and derives the CSS-variable name from the leaf path, so a
|
|
16
|
+
* hand-written theme resolves to the EXACT same `--origam-*` names as the
|
|
17
|
+
* published token sheets.
|
|
18
|
+
*
|
|
19
|
+
* 2. **`cssVars`** — the escape hatch. A flat map of raw `--origam-*` custom
|
|
20
|
+
* properties, for the rare var that has no group slot in `vars`.
|
|
21
|
+
*
|
|
22
|
+
* 3. **`component`** — per-component DEFAULT PROPS (not CSS): `{ global, 'origam-btn', … }`.
|
|
23
|
+
*
|
|
24
|
+
* ```ts
|
|
25
|
+
* {
|
|
26
|
+
* name: 'sobre', mode: 'light', label: 'Sobre',
|
|
27
|
+
* vars: {
|
|
28
|
+
* color: { surface: { default: '#ffffff' }, text: { primary: '#171717', secondary: '#525252' },
|
|
29
|
+
* action: { primary: { bg: '#7c3aed', fg: '#ffffff' } } },
|
|
30
|
+
* rounded: { md: '10px', lg: '14px' },
|
|
31
|
+
* typo: { family: { sans: 'Inter, sans-serif' } },
|
|
32
|
+
* shadow: { md: '0 2px 8px rgba(0,0,0,.12)' }
|
|
33
|
+
* },
|
|
34
|
+
* components: { 'origam-btn': { variant: 'flat', color: 'primary' } }
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* A COLOR slot accepts any CSS color OR a gradient (a gradient is an ordinary
|
|
39
|
+
* color value). Everything is plain JSON so a Theme Builder export round-trips
|
|
40
|
+
* without loss.
|
|
41
|
+
*/
|
|
42
|
+
export interface IOrigamTheme {
|
|
43
|
+
/**
|
|
44
|
+
* Brand name. When set, the injected variables are scoped to
|
|
45
|
+
* `[data-theme="<name>"]` instead of `:root`, so the theme activates only
|
|
46
|
+
* when `data-theme` matches (set it via `useTheme().setTheme(name)`).
|
|
47
|
+
*/
|
|
48
|
+
name?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Color mode this variable block applies to. When set alongside `name`,
|
|
51
|
+
* the selector becomes `[data-theme="<name>"][data-mode="<mode>"]`. When
|
|
52
|
+
* set without `name`, it becomes `[data-mode="<mode>"]`.
|
|
53
|
+
*/
|
|
54
|
+
mode?: TMode;
|
|
55
|
+
/**
|
|
56
|
+
* Human-readable brand label for UI (e.g. a theme switcher). Falls back to
|
|
57
|
+
* `name` when absent. Surfaced through `useInstalledThemes()`.
|
|
58
|
+
*/
|
|
59
|
+
label?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Short brand description for UI (e.g. a switcher subtitle). Surfaced
|
|
62
|
+
* through `useInstalledThemes()`.
|
|
63
|
+
*/
|
|
64
|
+
description?: string;
|
|
65
|
+
/**
|
|
66
|
+
* CSS background value for a brand swatch preview (a solid color or a
|
|
67
|
+
* `linear-gradient(...)`). Surfaced through `useInstalledThemes()` so a
|
|
68
|
+
* switcher can render a preview without a hard-coded metadata map.
|
|
69
|
+
*/
|
|
70
|
+
swatch?: string;
|
|
71
|
+
/**
|
|
72
|
+
* THE token-configuration bucket — the normal way to author a theme's
|
|
73
|
+
* design tokens. Nested JSON keyed by token GROUP; each group's tree
|
|
74
|
+
* resolves to its `--origam-*` namespace via the shared naming grammar
|
|
75
|
+
* (see `IThemeVars`):
|
|
76
|
+
* - `color` → `--origam-color-*` (`color.surface.default`, `color.action.primary.bg`, …)
|
|
77
|
+
* - `rounded` → `--origam-radius-*` (`rounded.md`, `rounded.lg`, …)
|
|
78
|
+
* - `border` → `--origam-border-*` (`border.width.thin`, …)
|
|
79
|
+
* - `typo` → `--origam-font-*` (`typo.family.sans`, `typo.size.md`, …)
|
|
80
|
+
* - `shadow` → `--origam-shadow-*` (`shadow.md`, …)
|
|
81
|
+
* - `spacing` → `--origam-space-*` (`spacing.4`, …)
|
|
82
|
+
* - `motion` → `--origam-motion-*` (`motion.duration.fast`, …)
|
|
83
|
+
*
|
|
84
|
+
* A color leaf accepts any CSS color OR a gradient (no dedicated gradient group).
|
|
85
|
+
*/
|
|
86
|
+
vars?: IThemeVars;
|
|
87
|
+
/**
|
|
88
|
+
* ESCAPE HATCH — pre-resolved raw `--origam-*` custom-property map. Keys
|
|
89
|
+
* with or without the leading `--` are accepted. Use ONLY for a raw var
|
|
90
|
+
* that has no group slot in `vars`. Wins over `vars` on key collision.
|
|
91
|
+
*
|
|
92
|
+
* cssVars: { '--origam-some-unmapped-var': '...' }
|
|
93
|
+
*/
|
|
94
|
+
cssVars?: TThemeVars;
|
|
95
|
+
/**
|
|
96
|
+
* Per-component DEFAULT PROPS layer. Keyed by `global` (applies to every
|
|
97
|
+
* component) or by a component's kebab-case instance name (e.g.
|
|
98
|
+
* `'origam-btn'`, `'origam-card'`), exactly like `<OrigamDefaultsProvider>`.
|
|
99
|
+
*
|
|
100
|
+
* `createOrigam` collapses the `component` maps of the ACTIVE brand×mode
|
|
101
|
+
* themes into a single `IDefault` and provides it under
|
|
102
|
+
* `ORIGAM_DEFAULTS_KEY`, so a component rendered with no explicit prop
|
|
103
|
+
* inherits the theme's default. This is the "look comes from the theme,
|
|
104
|
+
* not from hard-coded `withDefaults`" mechanism.
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* components: {
|
|
108
|
+
* global: { density: 'comfortable' },
|
|
109
|
+
* 'origam-btn': { color: 'primary', rounded: 0 },
|
|
110
|
+
* 'origam-card': { rounded: 'lg', elevation: 2 }
|
|
111
|
+
* }
|
|
112
|
+
*/
|
|
113
|
+
components?: IDefault;
|
|
114
|
+
}
|
|
File without changes
|
|
@@ -37,7 +37,7 @@ export interface ITimelineProps extends ICommonsComponentProps, ITagProps, IColo
|
|
|
37
37
|
truncateLine?: boolean;
|
|
38
38
|
ariaLabel?: string;
|
|
39
39
|
}
|
|
40
|
-
export interface ITimelineItemProps extends ICommonsComponentProps, IColorProps {
|
|
40
|
+
export interface ITimelineItemProps extends ICommonsComponentProps, IColorProps, IDensityProps, ISizeProps {
|
|
41
41
|
title?: string;
|
|
42
42
|
subtitle?: string;
|
|
43
43
|
icon?: TIcon;
|
|
@@ -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";
|
package/dist/src/nuxt/module.cjs
CHANGED
|
@@ -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:
|
|
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:
|
|
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 ??
|
|
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
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
|
|
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
|
}
|
package/dist/src/nuxt/module.js
CHANGED
|
@@ -1,15 +1,38 @@
|
|
|
1
|
-
import {
|
|
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:
|
|
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:
|
|
44
|
+
defaults: SCALAR_DEFAULTS,
|
|
22
45
|
setup(options, nuxt) {
|
|
23
46
|
const resolver = createResolver(import.meta.url);
|
|
24
|
-
const themes = options.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
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
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
|
|
16
|
+
const themeCookie = (0, _app.useCookie)(config.cookieName, {
|
|
18
17
|
maxAge: config.cookieMaxAge,
|
|
19
18
|
sameSite: "lax",
|
|
20
19
|
path: "/"
|
|
21
20
|
});
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
};
|