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.
- 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 +9 -9
- 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/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/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/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/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.js +3 -2
- 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/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 +9 -0
- 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/index.cjs +22 -0
- package/dist/src/utils/index.d.ts +2 -0
- package/dist/src/utils/index.js +2 -0
- package/package.json +17 -58
- 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,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.applyTheme = applyTheme;
|
|
7
|
+
exports.applyThemes = applyThemes;
|
|
8
|
+
exports.installedThemesFromList = installedThemesFromList;
|
|
9
|
+
exports.resolveThemeVars = resolveThemeVars;
|
|
10
|
+
exports.semanticTreeToVars = semanticTreeToVars;
|
|
11
|
+
exports.themeSelector = themeSelector;
|
|
12
|
+
exports.themeToCss = themeToCss;
|
|
13
|
+
exports.themeVarsToVars = themeVarsToVars;
|
|
14
|
+
var _tokenName = require("./token-name.util.cjs");
|
|
15
|
+
const STYLE_ELEMENT_PREFIX = "origam-theme";
|
|
16
|
+
function normaliseVarName(key) {
|
|
17
|
+
return key.startsWith("--") ? key : `--${key}`;
|
|
18
|
+
}
|
|
19
|
+
const VARS_GROUP_ROOTS = {
|
|
20
|
+
color: ["color"],
|
|
21
|
+
rounded: ["radius"],
|
|
22
|
+
border: ["border"],
|
|
23
|
+
typo: ["font"],
|
|
24
|
+
shadow: ["shadow"],
|
|
25
|
+
spacing: ["space"],
|
|
26
|
+
motion: ["motion"]
|
|
27
|
+
};
|
|
28
|
+
function isSemanticLeaf(node) {
|
|
29
|
+
const t = typeof node;
|
|
30
|
+
return t === "string" || t === "number";
|
|
31
|
+
}
|
|
32
|
+
function semanticTreeToVars(tree, rootPath) {
|
|
33
|
+
const out = {};
|
|
34
|
+
const walk = (node, path) => {
|
|
35
|
+
for (const key of Object.keys(node)) {
|
|
36
|
+
const child = node[key];
|
|
37
|
+
const nextPath = [...path, key];
|
|
38
|
+
if (isSemanticLeaf(child)) {
|
|
39
|
+
out[(0, _tokenName.tokenPathToCssVar)(nextPath, false)] = child;
|
|
40
|
+
} else {
|
|
41
|
+
walk(child, nextPath);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
walk(tree, [...rootPath]);
|
|
46
|
+
return out;
|
|
47
|
+
}
|
|
48
|
+
function themeVarsToVars(vars) {
|
|
49
|
+
let out = {};
|
|
50
|
+
for (const group of Object.keys(VARS_GROUP_ROOTS)) {
|
|
51
|
+
const tree = vars[group];
|
|
52
|
+
if (!tree) continue;
|
|
53
|
+
out = {
|
|
54
|
+
...out,
|
|
55
|
+
...semanticTreeToVars(tree, VARS_GROUP_ROOTS[group])
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
return out;
|
|
59
|
+
}
|
|
60
|
+
function resolveThemeVars(theme) {
|
|
61
|
+
const fromVars = theme.vars ? themeVarsToVars(theme.vars) : {};
|
|
62
|
+
const fromCssVars = {};
|
|
63
|
+
if (theme.cssVars) {
|
|
64
|
+
for (const key of Object.keys(theme.cssVars)) {
|
|
65
|
+
fromCssVars[normaliseVarName(key)] = theme.cssVars[key];
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
...fromVars,
|
|
70
|
+
...fromCssVars
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function themeSelector(theme) {
|
|
74
|
+
const hasName = typeof theme.name === "string" && theme.name.length > 0;
|
|
75
|
+
const hasMode = theme.mode === "light" || theme.mode === "dark";
|
|
76
|
+
if (!hasName && !hasMode) return ":root";
|
|
77
|
+
if (!hasName) return `[data-mode="${theme.mode}"]`;
|
|
78
|
+
const attrs = `[data-theme="${theme.name}"]${hasMode ? `[data-mode="${theme.mode}"]` : ""}`;
|
|
79
|
+
return `:root:root${attrs}, ${attrs}`;
|
|
80
|
+
}
|
|
81
|
+
function themeToCss(theme) {
|
|
82
|
+
const vars = resolveThemeVars(theme);
|
|
83
|
+
const decls = Object.keys(vars).map(name => ` ${name}: ${vars[name]};`).join("\n");
|
|
84
|
+
return `${themeSelector(theme)} {
|
|
85
|
+
${decls}
|
|
86
|
+
}
|
|
87
|
+
`;
|
|
88
|
+
}
|
|
89
|
+
function applyTheme(theme) {
|
|
90
|
+
if (typeof document === "undefined") return null;
|
|
91
|
+
const vars = resolveThemeVars(theme);
|
|
92
|
+
if (Object.keys(vars).length === 0) return null;
|
|
93
|
+
const namePart = theme.name ? `-${theme.name}` : "";
|
|
94
|
+
const modePart = theme.mode === "light" || theme.mode === "dark" ? `-${theme.mode}` : "";
|
|
95
|
+
const id = `${STYLE_ELEMENT_PREFIX}${namePart}${modePart}`;
|
|
96
|
+
let style = document.getElementById(id);
|
|
97
|
+
if (!style) {
|
|
98
|
+
style = document.createElement("style");
|
|
99
|
+
style.id = id;
|
|
100
|
+
style.setAttribute("data-origam-theme", theme.name ?? "root");
|
|
101
|
+
if (modePart) style.setAttribute("data-origam-mode", theme.mode);
|
|
102
|
+
document.head.appendChild(style);
|
|
103
|
+
}
|
|
104
|
+
style.textContent = themeToCss(theme);
|
|
105
|
+
return id;
|
|
106
|
+
}
|
|
107
|
+
function applyThemes(themes) {
|
|
108
|
+
const ids = [];
|
|
109
|
+
for (const theme of themes) {
|
|
110
|
+
const id = applyTheme(theme);
|
|
111
|
+
if (id) ids.push(id);
|
|
112
|
+
}
|
|
113
|
+
return ids;
|
|
114
|
+
}
|
|
115
|
+
function installedThemesFromList(themes) {
|
|
116
|
+
const order = [];
|
|
117
|
+
const modesByName = /* @__PURE__ */new Map();
|
|
118
|
+
const metaByName = /* @__PURE__ */new Map();
|
|
119
|
+
for (const theme of themes) {
|
|
120
|
+
if (!theme.name) continue;
|
|
121
|
+
if (!modesByName.has(theme.name)) {
|
|
122
|
+
modesByName.set(theme.name, /* @__PURE__ */new Set());
|
|
123
|
+
metaByName.set(theme.name, {});
|
|
124
|
+
order.push(theme.name);
|
|
125
|
+
}
|
|
126
|
+
if (theme.mode === "light" || theme.mode === "dark") {
|
|
127
|
+
modesByName.get(theme.name).add(theme.mode);
|
|
128
|
+
}
|
|
129
|
+
const meta = metaByName.get(theme.name);
|
|
130
|
+
if (meta.label === void 0 && theme.label) meta.label = theme.label;
|
|
131
|
+
if (meta.description === void 0 && theme.description) meta.description = theme.description;
|
|
132
|
+
if (meta.swatch === void 0 && theme.swatch) meta.swatch = theme.swatch;
|
|
133
|
+
}
|
|
134
|
+
return order.map(name => {
|
|
135
|
+
const meta = metaByName.get(name);
|
|
136
|
+
return {
|
|
137
|
+
name,
|
|
138
|
+
modes: [...modesByName.get(name)],
|
|
139
|
+
label: meta.label ?? name,
|
|
140
|
+
...(meta.description !== void 0 ? {
|
|
141
|
+
description: meta.description
|
|
142
|
+
} : {}),
|
|
143
|
+
...(meta.swatch !== void 0 ? {
|
|
144
|
+
swatch: meta.swatch
|
|
145
|
+
} : {})
|
|
146
|
+
};
|
|
147
|
+
});
|
|
148
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { IOrigamTheme } from '../../interfaces';
|
|
2
|
+
import type { ISemanticTree, IThemeVars, TInstalledThemes, TThemeVars } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Walk a hand-authored semantic tree depth-first, prefixing every leaf path
|
|
5
|
+
* with `rootPath` and converting it to a `--origam-*` name through the shared
|
|
6
|
+
* `tokenPathToCssVar` grammar (primitive/semantic side, never component). The
|
|
7
|
+
* leaf value passes through verbatim — a gradient string is just a color value.
|
|
8
|
+
*/
|
|
9
|
+
export declare function semanticTreeToVars(tree: ISemanticTree, rootPath: ReadonlyArray<string>): TThemeVars;
|
|
10
|
+
/**
|
|
11
|
+
* Collapse the structured `vars` token bucket (the normal authoring path) into a
|
|
12
|
+
* flat CSS-var map. Each group (`color` / `rounded` / `border` / `typo` /
|
|
13
|
+
* `shadow` / `spacing` / `motion`) is walked under its `--origam-*` root path.
|
|
14
|
+
*/
|
|
15
|
+
export declare function themeVarsToVars(vars: IThemeVars): TThemeVars;
|
|
16
|
+
/**
|
|
17
|
+
* Resolve an `IOrigamTheme` to its flat CSS-var map.
|
|
18
|
+
*
|
|
19
|
+
* Precedence (low → high): the structured `vars` token bucket (the normal
|
|
20
|
+
* authoring path), then the `cssVars` raw `--origam-*` escape hatch (always
|
|
21
|
+
* wins on key collision).
|
|
22
|
+
*/
|
|
23
|
+
export declare function resolveThemeVars(theme: IOrigamTheme): TThemeVars;
|
|
24
|
+
/**
|
|
25
|
+
* Compute the CSS selector a theme block targets, from its `name` / `mode`:
|
|
26
|
+
* - neither → `:root`
|
|
27
|
+
* - name only → `[data-theme="<name>"]`
|
|
28
|
+
* - mode only → `[data-mode="<mode>"]`
|
|
29
|
+
* - name + mode → `[data-theme="<name>"][data-mode="<mode>"]`
|
|
30
|
+
*
|
|
31
|
+
* A `mode` of `'auto'` is treated as "no mode scoping".
|
|
32
|
+
*/
|
|
33
|
+
export declare function themeSelector(theme: IOrigamTheme): string;
|
|
34
|
+
/**
|
|
35
|
+
* Serialise an `IOrigamTheme` to a CSS rule string:
|
|
36
|
+
* `<selector> {\n --origam-…: value;\n …\n}`
|
|
37
|
+
*
|
|
38
|
+
* Pure — no DOM access. Used both by `applyTheme` (runtime injection) and by
|
|
39
|
+
* the Theme Builder's CSS export so a single code path produces both.
|
|
40
|
+
*/
|
|
41
|
+
export declare function themeToCss(theme: IOrigamTheme): string;
|
|
42
|
+
/**
|
|
43
|
+
* Inject (or replace) a theme's CSS variables into `<head>` at runtime.
|
|
44
|
+
* SSR-safe: a no-op when `document` is unavailable. Returns the `<style>`
|
|
45
|
+
* element id used, or `null` when skipped (SSR / empty theme).
|
|
46
|
+
*
|
|
47
|
+
* The element id derives from the theme name so multiple named themes can
|
|
48
|
+
* coexist; re-applying the same theme replaces its block in place.
|
|
49
|
+
*/
|
|
50
|
+
export declare function applyTheme(theme: IOrigamTheme): string | null;
|
|
51
|
+
/**
|
|
52
|
+
* Install a list of themes at once: injects each one's scoped block (via
|
|
53
|
+
* `applyTheme`) and returns the ids that were actually written (SSR / empty
|
|
54
|
+
* themes are skipped, so the result may be shorter than the input).
|
|
55
|
+
*/
|
|
56
|
+
export declare function applyThemes(themes: IOrigamTheme[]): string[];
|
|
57
|
+
/**
|
|
58
|
+
* Collapse an `IOrigamTheme[]` into the distinct-brand summary exposed to
|
|
59
|
+
* consumers: one entry per `name`, listing every concrete mode that brand was
|
|
60
|
+
* installed for, plus the UI metadata (`label` / `description` / `swatch`)
|
|
61
|
+
* gathered from the objects of that brand (first non-empty value wins; `label`
|
|
62
|
+
* falls back to `name`). Themes without a `name` (root-scoped) are ignored —
|
|
63
|
+
* they are not selectable brands. Pure (no DOM access), so it runs SSR-side.
|
|
64
|
+
*/
|
|
65
|
+
export declare function installedThemesFromList(themes: IOrigamTheme[]): TInstalledThemes;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { tokenPathToCssVar } from "./token-name.util.js";
|
|
2
|
+
const STYLE_ELEMENT_PREFIX = "origam-theme";
|
|
3
|
+
function normaliseVarName(key) {
|
|
4
|
+
return key.startsWith("--") ? key : `--${key}`;
|
|
5
|
+
}
|
|
6
|
+
const VARS_GROUP_ROOTS = {
|
|
7
|
+
color: ["color"],
|
|
8
|
+
rounded: ["radius"],
|
|
9
|
+
border: ["border"],
|
|
10
|
+
typo: ["font"],
|
|
11
|
+
shadow: ["shadow"],
|
|
12
|
+
spacing: ["space"],
|
|
13
|
+
motion: ["motion"]
|
|
14
|
+
};
|
|
15
|
+
function isSemanticLeaf(node) {
|
|
16
|
+
const t = typeof node;
|
|
17
|
+
return t === "string" || t === "number";
|
|
18
|
+
}
|
|
19
|
+
export function semanticTreeToVars(tree, rootPath) {
|
|
20
|
+
const out = {};
|
|
21
|
+
const walk = (node, path) => {
|
|
22
|
+
for (const key of Object.keys(node)) {
|
|
23
|
+
const child = node[key];
|
|
24
|
+
const nextPath = [...path, key];
|
|
25
|
+
if (isSemanticLeaf(child)) {
|
|
26
|
+
out[tokenPathToCssVar(nextPath, false)] = child;
|
|
27
|
+
} else {
|
|
28
|
+
walk(child, nextPath);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
walk(tree, [...rootPath]);
|
|
33
|
+
return out;
|
|
34
|
+
}
|
|
35
|
+
export function themeVarsToVars(vars) {
|
|
36
|
+
let out = {};
|
|
37
|
+
for (const group of Object.keys(VARS_GROUP_ROOTS)) {
|
|
38
|
+
const tree = vars[group];
|
|
39
|
+
if (!tree) continue;
|
|
40
|
+
out = { ...out, ...semanticTreeToVars(tree, VARS_GROUP_ROOTS[group]) };
|
|
41
|
+
}
|
|
42
|
+
return out;
|
|
43
|
+
}
|
|
44
|
+
export function resolveThemeVars(theme) {
|
|
45
|
+
const fromVars = theme.vars ? themeVarsToVars(theme.vars) : {};
|
|
46
|
+
const fromCssVars = {};
|
|
47
|
+
if (theme.cssVars) {
|
|
48
|
+
for (const key of Object.keys(theme.cssVars)) {
|
|
49
|
+
fromCssVars[normaliseVarName(key)] = theme.cssVars[key];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return { ...fromVars, ...fromCssVars };
|
|
53
|
+
}
|
|
54
|
+
export function themeSelector(theme) {
|
|
55
|
+
const hasName = typeof theme.name === "string" && theme.name.length > 0;
|
|
56
|
+
const hasMode = theme.mode === "light" || theme.mode === "dark";
|
|
57
|
+
if (!hasName && !hasMode) return ":root";
|
|
58
|
+
if (!hasName) return `[data-mode="${theme.mode}"]`;
|
|
59
|
+
const attrs = `[data-theme="${theme.name}"]${hasMode ? `[data-mode="${theme.mode}"]` : ""}`;
|
|
60
|
+
return `:root:root${attrs}, ${attrs}`;
|
|
61
|
+
}
|
|
62
|
+
export function themeToCss(theme) {
|
|
63
|
+
const vars = resolveThemeVars(theme);
|
|
64
|
+
const decls = Object.keys(vars).map((name) => ` ${name}: ${vars[name]};`).join("\n");
|
|
65
|
+
return `${themeSelector(theme)} {
|
|
66
|
+
${decls}
|
|
67
|
+
}
|
|
68
|
+
`;
|
|
69
|
+
}
|
|
70
|
+
export function applyTheme(theme) {
|
|
71
|
+
if (typeof document === "undefined") return null;
|
|
72
|
+
const vars = resolveThemeVars(theme);
|
|
73
|
+
if (Object.keys(vars).length === 0) return null;
|
|
74
|
+
const namePart = theme.name ? `-${theme.name}` : "";
|
|
75
|
+
const modePart = theme.mode === "light" || theme.mode === "dark" ? `-${theme.mode}` : "";
|
|
76
|
+
const id = `${STYLE_ELEMENT_PREFIX}${namePart}${modePart}`;
|
|
77
|
+
let style = document.getElementById(id);
|
|
78
|
+
if (!style) {
|
|
79
|
+
style = document.createElement("style");
|
|
80
|
+
style.id = id;
|
|
81
|
+
style.setAttribute("data-origam-theme", theme.name ?? "root");
|
|
82
|
+
if (modePart) style.setAttribute("data-origam-mode", theme.mode);
|
|
83
|
+
document.head.appendChild(style);
|
|
84
|
+
}
|
|
85
|
+
style.textContent = themeToCss(theme);
|
|
86
|
+
return id;
|
|
87
|
+
}
|
|
88
|
+
export function applyThemes(themes) {
|
|
89
|
+
const ids = [];
|
|
90
|
+
for (const theme of themes) {
|
|
91
|
+
const id = applyTheme(theme);
|
|
92
|
+
if (id) ids.push(id);
|
|
93
|
+
}
|
|
94
|
+
return ids;
|
|
95
|
+
}
|
|
96
|
+
export function installedThemesFromList(themes) {
|
|
97
|
+
const order = [];
|
|
98
|
+
const modesByName = /* @__PURE__ */ new Map();
|
|
99
|
+
const metaByName = /* @__PURE__ */ new Map();
|
|
100
|
+
for (const theme of themes) {
|
|
101
|
+
if (!theme.name) continue;
|
|
102
|
+
if (!modesByName.has(theme.name)) {
|
|
103
|
+
modesByName.set(theme.name, /* @__PURE__ */ new Set());
|
|
104
|
+
metaByName.set(theme.name, {});
|
|
105
|
+
order.push(theme.name);
|
|
106
|
+
}
|
|
107
|
+
if (theme.mode === "light" || theme.mode === "dark") {
|
|
108
|
+
modesByName.get(theme.name).add(theme.mode);
|
|
109
|
+
}
|
|
110
|
+
const meta = metaByName.get(theme.name);
|
|
111
|
+
if (meta.label === void 0 && theme.label) meta.label = theme.label;
|
|
112
|
+
if (meta.description === void 0 && theme.description) meta.description = theme.description;
|
|
113
|
+
if (meta.swatch === void 0 && theme.swatch) meta.swatch = theme.swatch;
|
|
114
|
+
}
|
|
115
|
+
return order.map((name) => {
|
|
116
|
+
const meta = metaByName.get(name);
|
|
117
|
+
return {
|
|
118
|
+
name,
|
|
119
|
+
modes: [...modesByName.get(name)],
|
|
120
|
+
label: meta.label ?? name,
|
|
121
|
+
...meta.description !== void 0 ? { description: meta.description } : {},
|
|
122
|
+
...meta.swatch !== void 0 ? { swatch: meta.swatch } : {}
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TOKEN_INTENT_STATES = void 0;
|
|
7
|
+
exports.isBemChildKey = isBemChildKey;
|
|
8
|
+
exports.tokenPathToCssVar = tokenPathToCssVar;
|
|
9
|
+
exports.tokenPathToCssVarName = tokenPathToCssVarName;
|
|
10
|
+
const TOKEN_INTENT_STATES = exports.TOKEN_INTENT_STATES = /* @__PURE__ */new Set(["primary", "secondary", "ghost", "success", "warning", "danger", "info", "error", "selected", "outlined", "elevated", "filter", "hover", "active", "disabled", "focus"]);
|
|
11
|
+
function isBemChildKey(key) {
|
|
12
|
+
return /^[a-zA-Z]+$/.test(key) && !key.includes("-");
|
|
13
|
+
}
|
|
14
|
+
function tokenPathToCssVarName(path, isComponent) {
|
|
15
|
+
if (isComponent) {
|
|
16
|
+
const [blockName, ...rest] = path;
|
|
17
|
+
if (rest.length === 0) {
|
|
18
|
+
return `origam-${blockName}`;
|
|
19
|
+
}
|
|
20
|
+
if (rest.length > 1 && TOKEN_INTENT_STATES.has(rest[0])) {
|
|
21
|
+
const [state, ...propParts] = rest;
|
|
22
|
+
return `origam-${blockName}--${state}---${propParts.join("-")}`;
|
|
23
|
+
}
|
|
24
|
+
if (rest.length > 1 && isBemChildKey(rest[0])) {
|
|
25
|
+
const [child, ...propParts] = rest;
|
|
26
|
+
if (propParts.length > 1 && TOKEN_INTENT_STATES.has(propParts[0])) {
|
|
27
|
+
const [state, ...innerProp] = propParts;
|
|
28
|
+
return `origam-${blockName}__${child}--${state}---${innerProp.join("-")}`;
|
|
29
|
+
}
|
|
30
|
+
return `origam-${blockName}__${child}---${propParts.join("-")}`;
|
|
31
|
+
}
|
|
32
|
+
return `origam-${blockName}---${rest.join("-")}`;
|
|
33
|
+
}
|
|
34
|
+
if (path.length === 2) {
|
|
35
|
+
return `origam-${path[0]}---${path[1]}`;
|
|
36
|
+
}
|
|
37
|
+
if (path.length === 3) {
|
|
38
|
+
return `origam-${path[0]}__${path[1]}---${path[2]}`;
|
|
39
|
+
}
|
|
40
|
+
if (path.length === 4) {
|
|
41
|
+
return `origam-${path[0]}__${path[1]}--${path[2]}---${path[3]}`;
|
|
42
|
+
}
|
|
43
|
+
return `origam-${path.join("-")}`;
|
|
44
|
+
}
|
|
45
|
+
function tokenPathToCssVar(path, isComponent) {
|
|
46
|
+
return `--${tokenPathToCssVarName(path, isComponent)}`;
|
|
47
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token-path → origam CSS-variable-name naming grammar (runtime).
|
|
3
|
+
*
|
|
4
|
+
* This is the runtime / Theme-Builder-export twin of the build-time core in
|
|
5
|
+
* `scripts/token-name.mjs`. Both implement the SAME algorithm; a parity unit
|
|
6
|
+
* test (`token-name.util.spec.ts`) asserts they stay byte-identical so the
|
|
7
|
+
* names baked into the published CSS sheets never drift from the names a
|
|
8
|
+
* runtime-injected or exported theme produces.
|
|
9
|
+
*
|
|
10
|
+
* Why two copies instead of one shared module: the build script is a Node
|
|
11
|
+
* `.mjs` that runs before the library is bundled, while the published library
|
|
12
|
+
* only ships `src/**\/*.ts` (mkdist). A relative import from `src` into
|
|
13
|
+
* `scripts/` would not survive the build, so the implementation is duplicated
|
|
14
|
+
* and protected by the parity test instead.
|
|
15
|
+
*
|
|
16
|
+
* Grammar (`---` separates block from property, `--` a state/modifier, `__` a
|
|
17
|
+
* BEM child):
|
|
18
|
+
*
|
|
19
|
+
* COMPONENT
|
|
20
|
+
* ['btn'] → --origam-btn
|
|
21
|
+
* ['btn', 'background-color'] → --origam-btn---background-color
|
|
22
|
+
* ['btn', 'primary', 'background-color'] → --origam-btn--primary---background-color
|
|
23
|
+
* ['card', 'overlay', 'background-color'] → --origam-card__overlay---background-color
|
|
24
|
+
* ['card', 'overlay', 'hover', 'opacity'] → --origam-card__overlay--hover---opacity
|
|
25
|
+
*
|
|
26
|
+
* PRIMITIVE / SEMANTIC (by path length)
|
|
27
|
+
* ['color', 'black'] → --origam-color---black
|
|
28
|
+
* ['color', 'neutral', '500'] → --origam-color__neutral---500
|
|
29
|
+
* ['color', 'action', 'primary', 'bg'] → --origam-color__action--primary---bg
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* Component-level intent / state / modifier segments. A path segment matching
|
|
33
|
+
* one of these (in a component context) is emitted with the `--` modifier
|
|
34
|
+
* separator rather than treated as a BEM child or property.
|
|
35
|
+
*/
|
|
36
|
+
export declare const TOKEN_INTENT_STATES: ReadonlySet<string>;
|
|
37
|
+
/**
|
|
38
|
+
* A BEM child key is a single bare word (letters only, no separators / digits).
|
|
39
|
+
* Property keys typically contain hyphens (`background-color`) so they fail
|
|
40
|
+
* this test and are emitted as properties rather than children.
|
|
41
|
+
*/
|
|
42
|
+
export declare function isBemChildKey(key: string): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Resolve a token path to its origam CSS variable name (WITHOUT the leading
|
|
45
|
+
* `--`). `isComponent` is `true` when the token originates from a
|
|
46
|
+
* `tokens/component/*.json` source; `false` for primitive / semantic tokens.
|
|
47
|
+
*/
|
|
48
|
+
export declare function tokenPathToCssVarName(path: ReadonlyArray<string>, isComponent: boolean): string;
|
|
49
|
+
/**
|
|
50
|
+
* Convenience wrapper that returns the full custom-property reference,
|
|
51
|
+
* `--origam-…`, ready to drop into a stylesheet declaration or `style`
|
|
52
|
+
* binding.
|
|
53
|
+
*/
|
|
54
|
+
export declare function tokenPathToCssVar(path: ReadonlyArray<string>, isComponent: boolean): string;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export const TOKEN_INTENT_STATES = /* @__PURE__ */ new Set([
|
|
2
|
+
"primary",
|
|
3
|
+
"secondary",
|
|
4
|
+
"ghost",
|
|
5
|
+
"success",
|
|
6
|
+
"warning",
|
|
7
|
+
"danger",
|
|
8
|
+
"info",
|
|
9
|
+
"error",
|
|
10
|
+
"selected",
|
|
11
|
+
"outlined",
|
|
12
|
+
"elevated",
|
|
13
|
+
"filter",
|
|
14
|
+
"hover",
|
|
15
|
+
"active",
|
|
16
|
+
"disabled",
|
|
17
|
+
"focus"
|
|
18
|
+
]);
|
|
19
|
+
export function isBemChildKey(key) {
|
|
20
|
+
return /^[a-zA-Z]+$/.test(key) && !key.includes("-");
|
|
21
|
+
}
|
|
22
|
+
export function tokenPathToCssVarName(path, isComponent) {
|
|
23
|
+
if (isComponent) {
|
|
24
|
+
const [blockName, ...rest] = path;
|
|
25
|
+
if (rest.length === 0) {
|
|
26
|
+
return `origam-${blockName}`;
|
|
27
|
+
}
|
|
28
|
+
if (rest.length > 1 && TOKEN_INTENT_STATES.has(rest[0])) {
|
|
29
|
+
const [state, ...propParts] = rest;
|
|
30
|
+
return `origam-${blockName}--${state}---${propParts.join("-")}`;
|
|
31
|
+
}
|
|
32
|
+
if (rest.length > 1 && isBemChildKey(rest[0])) {
|
|
33
|
+
const [child, ...propParts] = rest;
|
|
34
|
+
if (propParts.length > 1 && TOKEN_INTENT_STATES.has(propParts[0])) {
|
|
35
|
+
const [state, ...innerProp] = propParts;
|
|
36
|
+
return `origam-${blockName}__${child}--${state}---${innerProp.join("-")}`;
|
|
37
|
+
}
|
|
38
|
+
return `origam-${blockName}__${child}---${propParts.join("-")}`;
|
|
39
|
+
}
|
|
40
|
+
return `origam-${blockName}---${rest.join("-")}`;
|
|
41
|
+
}
|
|
42
|
+
if (path.length === 2) {
|
|
43
|
+
return `origam-${path[0]}---${path[1]}`;
|
|
44
|
+
}
|
|
45
|
+
if (path.length === 3) {
|
|
46
|
+
return `origam-${path[0]}__${path[1]}---${path[2]}`;
|
|
47
|
+
}
|
|
48
|
+
if (path.length === 4) {
|
|
49
|
+
return `origam-${path[0]}__${path[1]}--${path[2]}---${path[3]}`;
|
|
50
|
+
}
|
|
51
|
+
return `origam-${path.join("-")}`;
|
|
52
|
+
}
|
|
53
|
+
export function tokenPathToCssVar(path, isComponent) {
|
|
54
|
+
return `--${tokenPathToCssVarName(path, isComponent)}`;
|
|
55
|
+
}
|
package/dist/src/utils/index.cjs
CHANGED
|
@@ -695,4 +695,26 @@ Object.keys(_mercator).forEach(function (key) {
|
|
|
695
695
|
return _mercator[key];
|
|
696
696
|
}
|
|
697
697
|
});
|
|
698
|
+
});
|
|
699
|
+
var _tokenName = require("./Theme/token-name.util.cjs");
|
|
700
|
+
Object.keys(_tokenName).forEach(function (key) {
|
|
701
|
+
if (key === "default" || key === "__esModule") return;
|
|
702
|
+
if (key in exports && exports[key] === _tokenName[key]) return;
|
|
703
|
+
Object.defineProperty(exports, key, {
|
|
704
|
+
enumerable: true,
|
|
705
|
+
get: function () {
|
|
706
|
+
return _tokenName[key];
|
|
707
|
+
}
|
|
708
|
+
});
|
|
709
|
+
});
|
|
710
|
+
var _applyTheme = require("./Theme/apply-theme.util.cjs");
|
|
711
|
+
Object.keys(_applyTheme).forEach(function (key) {
|
|
712
|
+
if (key === "default" || key === "__esModule") return;
|
|
713
|
+
if (key in exports && exports[key] === _applyTheme[key]) return;
|
|
714
|
+
Object.defineProperty(exports, key, {
|
|
715
|
+
enumerable: true,
|
|
716
|
+
get: function () {
|
|
717
|
+
return _applyTheme[key];
|
|
718
|
+
}
|
|
719
|
+
});
|
|
698
720
|
});
|
package/dist/src/utils/index.js
CHANGED
|
@@ -61,3 +61,5 @@ export * from "./Mask/validate-pattern.util.js";
|
|
|
61
61
|
export * from "./QrCode/qr-code-adapters.util.js";
|
|
62
62
|
export * from "./Chart/path.util.js";
|
|
63
63
|
export * from "./Chart/mercator.util.js";
|
|
64
|
+
export * from "./Theme/token-name.util.js";
|
|
65
|
+
export * from "./Theme/apply-theme.util.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "origam",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "origam — a Vue 3 design system with multi-theme design tokens, CSS-first components and TypeScript types.",
|
|
6
6
|
"keywords": [
|
|
@@ -48,18 +48,23 @@
|
|
|
48
48
|
},
|
|
49
49
|
"./styles": {
|
|
50
50
|
"scss": "./dist/src/assets/scss/main.scss",
|
|
51
|
-
"style": "./dist/src/assets/css/main.css"
|
|
51
|
+
"style": "./dist/src/assets/css/main.css",
|
|
52
|
+
"import": "./dist/src/assets/css/main.css",
|
|
53
|
+
"require": "./dist/src/assets/css/main.css",
|
|
54
|
+
"default": "./dist/src/assets/css/main.css"
|
|
52
55
|
},
|
|
53
56
|
"./tokens/css": "./dist/src/assets/css/tokens/primitive.css",
|
|
54
57
|
"./tokens/css/primitive": "./dist/src/assets/css/tokens/primitive.css",
|
|
55
58
|
"./tokens/css/light": "./dist/src/assets/css/tokens/light.css",
|
|
56
59
|
"./tokens/css/dark": "./dist/src/assets/css/tokens/dark.css",
|
|
57
60
|
"./tokens/css/utilities": "./dist/src/assets/css/tokens/origam-utilities.css",
|
|
61
|
+
"./tokens/css/themes-all": "./dist/src/assets/css/tokens/themes-all.css",
|
|
58
62
|
"./tokens/scss": "./dist/src/assets/scss/tokens/_primitive.scss",
|
|
59
63
|
"./tokens/scss/primitive": "./dist/src/assets/scss/tokens/_primitive.scss",
|
|
60
64
|
"./tokens/scss/light": "./dist/src/assets/scss/tokens/_light.scss",
|
|
61
65
|
"./tokens/scss/dark": "./dist/src/assets/scss/tokens/_dark.scss",
|
|
62
66
|
"./tokens/scss/utilities": "./dist/src/assets/scss/tokens/_origam-utilities.scss",
|
|
67
|
+
"./tokens/scss/themes-all": "./dist/src/assets/scss/tokens/_themes-all.scss",
|
|
63
68
|
"./tokens/types": "./dist/src/types/tokens.type.d.ts",
|
|
64
69
|
"./origam": "./dist/src/origam.js",
|
|
65
70
|
"./nuxt": {
|
|
@@ -87,38 +92,6 @@
|
|
|
87
92
|
"README.md",
|
|
88
93
|
"CHANGELOG.md"
|
|
89
94
|
],
|
|
90
|
-
"scripts": {
|
|
91
|
-
"dev": "npm run server:dev && npm run story:dev && npm run docs:dev",
|
|
92
|
-
"build": "npm run server:build && npm run story:build && npm run docs:build",
|
|
93
|
-
"preview": "npm run server:preview && npm run story:preview && npm run docs:preview",
|
|
94
|
-
"story:dev": "CHOKIDAR_USEPOLLING=1 CHOKIDAR_INTERVAL=600 histoire dev",
|
|
95
|
-
"story:dev:native": "histoire dev",
|
|
96
|
-
"story:build": "histoire build",
|
|
97
|
-
"story:preview": "histoire preview",
|
|
98
|
-
"server:dev": "npm run tokens:build && vite",
|
|
99
|
-
"server:build": "npm run tokens:build && unbuild",
|
|
100
|
-
"server:preview": "vite preview",
|
|
101
|
-
"tokens:build": "node scripts/build-tokens.mjs",
|
|
102
|
-
"tokens:watch": "node scripts/build-tokens.mjs --watch",
|
|
103
|
-
"tokens:lint": "node scripts/build-tokens.mjs --dry-run --strict",
|
|
104
|
-
"docs:dev": "CHOKIDAR_USEPOLLING=1 CHOKIDAR_INTERVAL=600 vitepress dev docs",
|
|
105
|
-
"docs:dev:native": "vitepress dev docs",
|
|
106
|
-
"docs:build": "vitepress build docs",
|
|
107
|
-
"docs:preview": "vitepress preview docs",
|
|
108
|
-
"type:build": "vue-tsc --build --force",
|
|
109
|
-
"type:dev": "vue-tsc --watch --noEmit --skipLibCheck",
|
|
110
|
-
"lint:fix": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
|
|
111
|
-
"test:unit": "vitest",
|
|
112
|
-
"test:a11y": "playwright test --config=playwright.a11y.config.ts",
|
|
113
|
-
"test:e2e": "playwright test",
|
|
114
|
-
"test:e2e:ui": "playwright test --ui",
|
|
115
|
-
"test:e2e:debug": "playwright test --debug",
|
|
116
|
-
"test:e2e:report": "playwright show-report",
|
|
117
|
-
"test:e2e:cypress-legacy": "cypress",
|
|
118
|
-
"test:open": "cypress open",
|
|
119
|
-
"clean": "rm -rf dist node_modules package-lock.json",
|
|
120
|
-
"prepublishOnly": "npm run tokens:build && npm run server:build && npm run test:unit -- --run"
|
|
121
|
-
},
|
|
122
95
|
"dependencies": {
|
|
123
96
|
"@mdi/font": "^7.4.47",
|
|
124
97
|
"qrcode-generator": "^2.0.4",
|
|
@@ -138,43 +111,29 @@
|
|
|
138
111
|
}
|
|
139
112
|
},
|
|
140
113
|
"devDependencies": {
|
|
141
|
-
"@axe-core/playwright": "^4.11.3",
|
|
142
|
-
"@histoire/plugin-vue": "^1.0.0-beta.1",
|
|
143
114
|
"@nuxt/kit": "^4.4.5",
|
|
144
|
-
"@
|
|
115
|
+
"@types/node": "^24.0.14",
|
|
145
116
|
"@tokens-studio/sd-transforms": "^1.2.9",
|
|
146
|
-
"@types/jest": "^30.0.0",
|
|
147
117
|
"@vitejs/plugin-vue": "^6.0.0",
|
|
148
|
-
"@vue/test-utils": "^2.4.6",
|
|
149
|
-
"axe-core": "^4.11.4",
|
|
150
|
-
"eslint": "^9.31.0",
|
|
151
|
-
"eslint-config-prettier": "^10.1.5",
|
|
152
|
-
"eslint-plugin-vue": "^10.3.0",
|
|
153
|
-
"globals": "^16.3.0",
|
|
154
|
-
"happy-dom": "^15.11.7",
|
|
155
|
-
"histoire": "^1.0.0-beta.1",
|
|
156
|
-
"husky": "^9.1.7",
|
|
157
|
-
"lint-staged": "^16.1.2",
|
|
158
|
-
"markdown-it-codetabs": "^1.2.0",
|
|
159
|
-
"markdown-it-deflist": "^3.0.0",
|
|
160
|
-
"markdown-it-footnote": "^4.0.0",
|
|
161
118
|
"sass": "^1.89.2",
|
|
162
119
|
"style-dictionary": "^4.4.0",
|
|
163
120
|
"ts-transformer-keys": "^0.4.4",
|
|
164
121
|
"typescript": "^5.8.3",
|
|
165
|
-
"typescript-eslint": "^8.37.0",
|
|
166
122
|
"unbuild": "^3.5.0",
|
|
167
123
|
"unplugin-vue-components": "^28.8.0",
|
|
168
124
|
"vite": "^7.0.5",
|
|
169
125
|
"vite-plugin-commonjs": "^0.10.4",
|
|
170
126
|
"vite-tsconfig-paths": "^5.1.4",
|
|
171
|
-
"vitepress": "^1.6.3",
|
|
172
|
-
"vitest": "^3.2.4",
|
|
173
127
|
"vue": "^3.5.17",
|
|
174
|
-
"vue-eslint-parser": "^10.4.0",
|
|
175
|
-
"vue-i18n": "^11.1.10",
|
|
176
|
-
"vue-router": "^4.5.1",
|
|
177
128
|
"vue-sfc-transformer": "^0.1.16",
|
|
178
129
|
"vue-tsc": "^3.0.2"
|
|
130
|
+
},
|
|
131
|
+
"scripts": {
|
|
132
|
+
"build": "pnpm run tokens:build && unbuild",
|
|
133
|
+
"lib:build": "pnpm run build",
|
|
134
|
+
"type-check": "vue-tsc --noEmit -p tsconfig.json",
|
|
135
|
+
"tokens:build": "node scripts/build-tokens.mjs",
|
|
136
|
+
"tokens:watch": "node scripts/build-tokens.mjs --watch",
|
|
137
|
+
"tokens:lint": "node scripts/build-tokens.mjs --dry-run --strict"
|
|
179
138
|
}
|
|
180
|
-
}
|
|
139
|
+
}
|