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
|
@@ -3,12 +3,33 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports._resetThemeForTesting = _resetThemeForTesting;
|
|
7
|
+
exports.applyModeSync = applyModeSync;
|
|
6
8
|
exports.applyThemeSync = applyThemeSync;
|
|
9
|
+
exports.readPersistedMode = readPersistedMode;
|
|
7
10
|
exports.readPersistedTheme = readPersistedTheme;
|
|
8
11
|
exports.useTheme = useTheme;
|
|
9
12
|
var _vue = require("vue");
|
|
10
13
|
var _theme2 = require("../../consts/Theme/theme.const.cjs");
|
|
11
14
|
let _theme = null;
|
|
15
|
+
let _mode = null;
|
|
16
|
+
let _systemPrefersDark = null;
|
|
17
|
+
let _mediaInitDone = false;
|
|
18
|
+
function ensureSystemPreference() {
|
|
19
|
+
if (_systemPrefersDark === null) {
|
|
20
|
+
_systemPrefersDark = (0, _vue.ref)(false);
|
|
21
|
+
}
|
|
22
|
+
if (_mediaInitDone || typeof window === "undefined" || typeof window.matchMedia !== "function") {
|
|
23
|
+
return _systemPrefersDark;
|
|
24
|
+
}
|
|
25
|
+
_mediaInitDone = true;
|
|
26
|
+
const mq = window.matchMedia("(prefers-color-scheme: dark)");
|
|
27
|
+
_systemPrefersDark.value = mq.matches;
|
|
28
|
+
mq.addEventListener?.("change", e => {
|
|
29
|
+
if (_systemPrefersDark) _systemPrefersDark.value = e.matches;
|
|
30
|
+
});
|
|
31
|
+
return _systemPrefersDark;
|
|
32
|
+
}
|
|
12
33
|
function readPersisted() {
|
|
13
34
|
if (typeof window === "undefined") return "auto";
|
|
14
35
|
try {
|
|
@@ -32,51 +53,101 @@ function applyToDocument(theme) {
|
|
|
32
53
|
document.documentElement.setAttribute(_theme2.ORIGAM_THEME_ATTR, theme);
|
|
33
54
|
}
|
|
34
55
|
}
|
|
56
|
+
function readPersistedModeValue() {
|
|
57
|
+
if (typeof window === "undefined") return "auto";
|
|
58
|
+
try {
|
|
59
|
+
const v = window.localStorage?.getItem(_theme2.ORIGAM_MODE_STORAGE_KEY);
|
|
60
|
+
if (v === "auto" || v === "light" || v === "dark") return v;
|
|
61
|
+
} catch {}
|
|
62
|
+
return "auto";
|
|
63
|
+
}
|
|
64
|
+
function writePersistedMode(mode) {
|
|
65
|
+
if (typeof window === "undefined") return;
|
|
66
|
+
try {
|
|
67
|
+
window.localStorage?.setItem(_theme2.ORIGAM_MODE_STORAGE_KEY, mode);
|
|
68
|
+
} catch {}
|
|
69
|
+
}
|
|
70
|
+
function applyModeToDocument(resolvedMode) {
|
|
71
|
+
if (typeof document === "undefined") return;
|
|
72
|
+
document.documentElement.setAttribute(_theme2.ORIGAM_MODE_ATTR, resolvedMode);
|
|
73
|
+
}
|
|
35
74
|
function useTheme() {
|
|
36
75
|
if (_theme === null) {
|
|
37
76
|
_theme = (0, _vue.ref)(readPersisted());
|
|
38
77
|
}
|
|
78
|
+
if (_mode === null) {
|
|
79
|
+
_mode = (0, _vue.ref)(readPersistedModeValue());
|
|
80
|
+
}
|
|
39
81
|
const theme = _theme;
|
|
40
|
-
const
|
|
82
|
+
const mode = _mode;
|
|
83
|
+
const systemPrefersDark = ensureSystemPreference();
|
|
41
84
|
const resolved = (0, _vue.computed)(() => {
|
|
42
85
|
if (theme.value === "auto") return systemPrefersDark.value ? "dark" : "light";
|
|
43
86
|
return theme.value === "dark" ? "dark" : "light";
|
|
44
87
|
});
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
};
|
|
49
|
-
(0, _vue.onMounted)(() => {
|
|
50
|
-
if (typeof window === "undefined") return;
|
|
51
|
-
mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
52
|
-
systemPrefersDark.value = mediaQuery.matches;
|
|
53
|
-
mediaQuery.addEventListener?.("change", onSystemChange);
|
|
54
|
-
applyToDocument(theme.value);
|
|
55
|
-
});
|
|
56
|
-
(0, _vue.onUnmounted)(() => {
|
|
57
|
-
mediaQuery?.removeEventListener?.("change", onSystemChange);
|
|
88
|
+
const resolvedMode = (0, _vue.computed)(() => {
|
|
89
|
+
if (mode.value === "auto") return systemPrefersDark.value ? "dark" : "light";
|
|
90
|
+
return mode.value;
|
|
58
91
|
});
|
|
59
92
|
(0, _vue.watch)(theme, next => {
|
|
60
93
|
applyToDocument(next);
|
|
61
94
|
writePersisted(next);
|
|
95
|
+
}, {
|
|
96
|
+
immediate: true
|
|
97
|
+
});
|
|
98
|
+
(0, _vue.watch)(resolvedMode, next => {
|
|
99
|
+
applyModeToDocument(next);
|
|
100
|
+
}, {
|
|
101
|
+
immediate: true
|
|
102
|
+
});
|
|
103
|
+
(0, _vue.watch)(mode, next => {
|
|
104
|
+
writePersistedMode(next);
|
|
62
105
|
});
|
|
63
106
|
function setTheme(next) {
|
|
64
107
|
theme.value = next;
|
|
65
108
|
}
|
|
109
|
+
function setMode(next) {
|
|
110
|
+
mode.value = next;
|
|
111
|
+
}
|
|
66
112
|
function toggle() {
|
|
67
113
|
const effective = resolved.value;
|
|
68
114
|
theme.value = effective === "dark" ? "light" : "dark";
|
|
69
115
|
}
|
|
116
|
+
function toggleMode() {
|
|
117
|
+
const effective = resolvedMode.value;
|
|
118
|
+
mode.value = effective === "dark" ? "light" : "dark";
|
|
119
|
+
}
|
|
70
120
|
return {
|
|
71
121
|
theme: (0, _vue.readonly)(theme),
|
|
72
122
|
resolved: (0, _vue.readonly)(resolved),
|
|
73
123
|
setTheme,
|
|
74
|
-
toggle
|
|
124
|
+
toggle,
|
|
125
|
+
mode: (0, _vue.readonly)(mode),
|
|
126
|
+
resolvedMode: (0, _vue.readonly)(resolvedMode),
|
|
127
|
+
setMode,
|
|
128
|
+
toggleMode
|
|
75
129
|
};
|
|
76
130
|
}
|
|
77
131
|
function applyThemeSync(theme) {
|
|
78
132
|
applyToDocument(theme);
|
|
79
133
|
}
|
|
134
|
+
function applyModeSync(mode) {
|
|
135
|
+
if (mode === "light" || mode === "dark") {
|
|
136
|
+
applyModeToDocument(mode);
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
const prefersDark = ensureSystemPreference().value;
|
|
140
|
+
applyModeToDocument(prefersDark ? "dark" : "light");
|
|
141
|
+
}
|
|
80
142
|
function readPersistedTheme() {
|
|
81
143
|
return readPersisted();
|
|
144
|
+
}
|
|
145
|
+
function readPersistedMode() {
|
|
146
|
+
return readPersistedModeValue();
|
|
147
|
+
}
|
|
148
|
+
function _resetThemeForTesting() {
|
|
149
|
+
_theme = null;
|
|
150
|
+
_mode = null;
|
|
151
|
+
_systemPrefersDark = null;
|
|
152
|
+
_mediaInitDone = false;
|
|
82
153
|
}
|
|
@@ -1,17 +1,30 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
|
-
import type { TTheme, TThemeResolved } from '../../types';
|
|
2
|
+
import type { TMode, TModeResolved, TTheme, TThemeResolved } from '../../types/Theme/theme.type';
|
|
3
3
|
/**
|
|
4
|
-
* `useTheme()` returns a shared, reactive
|
|
4
|
+
* `useTheme()` returns a shared, reactive handle over the two theming axes.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* ### Brand axis (`theme` / `data-theme`)
|
|
7
|
+
* - `theme` (read-only ref): the current brand — `'auto' | 'light' | 'dark' | string`.
|
|
7
8
|
* - `setTheme(t)`: imperative setter. Persists to `localStorage` and applies
|
|
8
9
|
* `data-theme` to `<html>`.
|
|
9
10
|
* - `resolved` (computed): the effective theme after resolving `'auto'`
|
|
10
11
|
* against `prefers-color-scheme`. Useful for SVG asset switching.
|
|
11
|
-
* - `toggle()`: convenience to flip light ↔ dark (treats `'auto'`
|
|
12
|
+
* - `toggle()`: convenience to flip the brand light ↔ dark (treats `'auto'`
|
|
13
|
+
* as light). Kept for back-compat with the single-axis API.
|
|
12
14
|
*
|
|
13
|
-
*
|
|
14
|
-
* (
|
|
15
|
+
* ### Mode axis (`mode` / `data-mode`)
|
|
16
|
+
* - `mode` (read-only ref): the current color mode — `'auto' | 'light' | 'dark'`.
|
|
17
|
+
* - `setMode(m)`: imperative setter. Persists to `localStorage` and applies
|
|
18
|
+
* `data-mode` to `<html>`.
|
|
19
|
+
* - `resolvedMode` (computed): the effective mode after resolving `'auto'`
|
|
20
|
+
* against `prefers-color-scheme`.
|
|
21
|
+
* - `toggleMode()`: flip the color mode light ↔ dark (treats `'auto'` as the
|
|
22
|
+
* current system preference).
|
|
23
|
+
*
|
|
24
|
+
* The media-query listener is a lazily-initialised SINGLETON (see
|
|
25
|
+
* `ensureSystemPreference`) rather than an `onMounted` hook, so `resolvedMode`
|
|
26
|
+
* is correct even when `useTheme()` is first called outside a component (e.g.
|
|
27
|
+
* a Nuxt plugin). SSR stays safe — the init is a no-op without `window`.
|
|
15
28
|
*/
|
|
16
29
|
/*********************************************************
|
|
17
30
|
* useTheme
|
|
@@ -21,20 +34,52 @@ export declare function useTheme(): {
|
|
|
21
34
|
resolved: Readonly<Ref<TThemeResolved, TThemeResolved>>;
|
|
22
35
|
setTheme: (next: TTheme) => void;
|
|
23
36
|
toggle: () => void;
|
|
37
|
+
mode: Readonly<Ref<TMode, TMode>>;
|
|
38
|
+
resolvedMode: Readonly<Ref<TModeResolved, TModeResolved>>;
|
|
39
|
+
setMode: (next: TMode) => void;
|
|
40
|
+
toggleMode: () => void;
|
|
24
41
|
};
|
|
25
42
|
/**
|
|
26
|
-
* Internal helper for SSR / no-flash plugins: apply a theme to the
|
|
27
|
-
* synchronously (called BEFORE first render). Bypasses Vue reactivity.
|
|
43
|
+
* Internal helper for SSR / no-flash plugins: apply a theme (brand) to the
|
|
44
|
+
* document synchronously (called BEFORE first render). Bypasses Vue reactivity.
|
|
28
45
|
*/
|
|
29
46
|
/*********************************************************
|
|
30
47
|
* applyThemeSync
|
|
31
48
|
********************************************************/
|
|
32
49
|
export declare function applyThemeSync(theme: TTheme): void;
|
|
33
50
|
/**
|
|
34
|
-
* Internal helper for SSR / no-flash plugins:
|
|
35
|
-
*
|
|
51
|
+
* Internal helper for SSR / no-flash plugins: apply a CONCRETE mode to the
|
|
52
|
+
* document synchronously. Bypasses Vue reactivity. An `'auto'` argument is
|
|
53
|
+
* resolved against the current `prefers-color-scheme` (falling back to
|
|
54
|
+
* `'light'` when unavailable) so `data-mode` always ends up concrete — the
|
|
55
|
+
* token matrix has no mode-less fallback.
|
|
56
|
+
*/
|
|
57
|
+
/*********************************************************
|
|
58
|
+
* applyModeSync
|
|
59
|
+
********************************************************/
|
|
60
|
+
export declare function applyModeSync(mode: TMode): void;
|
|
61
|
+
/**
|
|
62
|
+
* Internal helper for SSR / no-flash plugins: read the persisted theme (brand)
|
|
63
|
+
* from localStorage without instantiating the composable.
|
|
36
64
|
*/
|
|
37
65
|
/*********************************************************
|
|
38
66
|
* readPersistedTheme
|
|
39
67
|
********************************************************/
|
|
40
68
|
export declare function readPersistedTheme(): TTheme;
|
|
69
|
+
/**
|
|
70
|
+
* Internal helper for SSR / no-flash plugins: read the persisted mode from
|
|
71
|
+
* localStorage without instantiating the composable.
|
|
72
|
+
*/
|
|
73
|
+
/*********************************************************
|
|
74
|
+
* readPersistedMode
|
|
75
|
+
********************************************************/
|
|
76
|
+
export declare function readPersistedMode(): TMode;
|
|
77
|
+
/**
|
|
78
|
+
* Test-only: clear the module-level singletons (theme / mode refs and the
|
|
79
|
+
* `prefers-color-scheme` cache) so each spec starts from a clean slate. Not
|
|
80
|
+
* part of the public API.
|
|
81
|
+
*/
|
|
82
|
+
/*********************************************************
|
|
83
|
+
* _resetThemeForTesting
|
|
84
|
+
********************************************************/
|
|
85
|
+
export declare function _resetThemeForTesting(): void;
|
|
@@ -1,6 +1,29 @@
|
|
|
1
|
-
import { computed,
|
|
2
|
-
import {
|
|
1
|
+
import { computed, readonly, ref, watch } from "vue";
|
|
2
|
+
import {
|
|
3
|
+
ORIGAM_MODE_ATTR as MODE_ATTR,
|
|
4
|
+
ORIGAM_MODE_STORAGE_KEY as MODE_STORAGE_KEY,
|
|
5
|
+
ORIGAM_THEME_ATTR as ATTR,
|
|
6
|
+
ORIGAM_THEME_STORAGE_KEY as STORAGE_KEY
|
|
7
|
+
} from "../../consts/Theme/theme.const.js";
|
|
3
8
|
let _theme = null;
|
|
9
|
+
let _mode = null;
|
|
10
|
+
let _systemPrefersDark = null;
|
|
11
|
+
let _mediaInitDone = false;
|
|
12
|
+
function ensureSystemPreference() {
|
|
13
|
+
if (_systemPrefersDark === null) {
|
|
14
|
+
_systemPrefersDark = ref(false);
|
|
15
|
+
}
|
|
16
|
+
if (_mediaInitDone || typeof window === "undefined" || typeof window.matchMedia !== "function") {
|
|
17
|
+
return _systemPrefersDark;
|
|
18
|
+
}
|
|
19
|
+
_mediaInitDone = true;
|
|
20
|
+
const mq = window.matchMedia("(prefers-color-scheme: dark)");
|
|
21
|
+
_systemPrefersDark.value = mq.matches;
|
|
22
|
+
mq.addEventListener?.("change", (e) => {
|
|
23
|
+
if (_systemPrefersDark) _systemPrefersDark.value = e.matches;
|
|
24
|
+
});
|
|
25
|
+
return _systemPrefersDark;
|
|
26
|
+
}
|
|
4
27
|
function readPersisted() {
|
|
5
28
|
if (typeof window === "undefined") return "auto";
|
|
6
29
|
try {
|
|
@@ -26,51 +49,99 @@ function applyToDocument(theme) {
|
|
|
26
49
|
document.documentElement.setAttribute(ATTR, theme);
|
|
27
50
|
}
|
|
28
51
|
}
|
|
52
|
+
function readPersistedModeValue() {
|
|
53
|
+
if (typeof window === "undefined") return "auto";
|
|
54
|
+
try {
|
|
55
|
+
const v = window.localStorage?.getItem(MODE_STORAGE_KEY);
|
|
56
|
+
if (v === "auto" || v === "light" || v === "dark") return v;
|
|
57
|
+
} catch {
|
|
58
|
+
}
|
|
59
|
+
return "auto";
|
|
60
|
+
}
|
|
61
|
+
function writePersistedMode(mode) {
|
|
62
|
+
if (typeof window === "undefined") return;
|
|
63
|
+
try {
|
|
64
|
+
window.localStorage?.setItem(MODE_STORAGE_KEY, mode);
|
|
65
|
+
} catch {
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function applyModeToDocument(resolvedMode) {
|
|
69
|
+
if (typeof document === "undefined") return;
|
|
70
|
+
document.documentElement.setAttribute(MODE_ATTR, resolvedMode);
|
|
71
|
+
}
|
|
29
72
|
export function useTheme() {
|
|
30
73
|
if (_theme === null) {
|
|
31
74
|
_theme = ref(readPersisted());
|
|
32
75
|
}
|
|
76
|
+
if (_mode === null) {
|
|
77
|
+
_mode = ref(readPersistedModeValue());
|
|
78
|
+
}
|
|
33
79
|
const theme = _theme;
|
|
34
|
-
const
|
|
80
|
+
const mode = _mode;
|
|
81
|
+
const systemPrefersDark = ensureSystemPreference();
|
|
35
82
|
const resolved = computed(() => {
|
|
36
83
|
if (theme.value === "auto") return systemPrefersDark.value ? "dark" : "light";
|
|
37
84
|
return theme.value === "dark" ? "dark" : "light";
|
|
38
85
|
});
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
};
|
|
43
|
-
onMounted(() => {
|
|
44
|
-
if (typeof window === "undefined") return;
|
|
45
|
-
mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
46
|
-
systemPrefersDark.value = mediaQuery.matches;
|
|
47
|
-
mediaQuery.addEventListener?.("change", onSystemChange);
|
|
48
|
-
applyToDocument(theme.value);
|
|
49
|
-
});
|
|
50
|
-
onUnmounted(() => {
|
|
51
|
-
mediaQuery?.removeEventListener?.("change", onSystemChange);
|
|
86
|
+
const resolvedMode = computed(() => {
|
|
87
|
+
if (mode.value === "auto") return systemPrefersDark.value ? "dark" : "light";
|
|
88
|
+
return mode.value;
|
|
52
89
|
});
|
|
53
90
|
watch(theme, (next) => {
|
|
54
91
|
applyToDocument(next);
|
|
55
92
|
writePersisted(next);
|
|
93
|
+
}, { immediate: true });
|
|
94
|
+
watch(resolvedMode, (next) => {
|
|
95
|
+
applyModeToDocument(next);
|
|
96
|
+
}, { immediate: true });
|
|
97
|
+
watch(mode, (next) => {
|
|
98
|
+
writePersistedMode(next);
|
|
56
99
|
});
|
|
57
100
|
function setTheme(next) {
|
|
58
101
|
theme.value = next;
|
|
59
102
|
}
|
|
103
|
+
function setMode(next) {
|
|
104
|
+
mode.value = next;
|
|
105
|
+
}
|
|
60
106
|
function toggle() {
|
|
61
107
|
const effective = resolved.value;
|
|
62
108
|
theme.value = effective === "dark" ? "light" : "dark";
|
|
63
109
|
}
|
|
110
|
+
function toggleMode() {
|
|
111
|
+
const effective = resolvedMode.value;
|
|
112
|
+
mode.value = effective === "dark" ? "light" : "dark";
|
|
113
|
+
}
|
|
64
114
|
return {
|
|
65
115
|
theme: readonly(theme),
|
|
66
116
|
resolved: readonly(resolved),
|
|
67
117
|
setTheme,
|
|
68
|
-
toggle
|
|
118
|
+
toggle,
|
|
119
|
+
mode: readonly(mode),
|
|
120
|
+
resolvedMode: readonly(resolvedMode),
|
|
121
|
+
setMode,
|
|
122
|
+
toggleMode
|
|
69
123
|
};
|
|
70
124
|
}
|
|
71
125
|
export function applyThemeSync(theme) {
|
|
72
126
|
applyToDocument(theme);
|
|
73
127
|
}
|
|
128
|
+
export function applyModeSync(mode) {
|
|
129
|
+
if (mode === "light" || mode === "dark") {
|
|
130
|
+
applyModeToDocument(mode);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
const prefersDark = ensureSystemPreference().value;
|
|
134
|
+
applyModeToDocument(prefersDark ? "dark" : "light");
|
|
135
|
+
}
|
|
74
136
|
export function readPersistedTheme() {
|
|
75
137
|
return readPersisted();
|
|
76
138
|
}
|
|
139
|
+
export function readPersistedMode() {
|
|
140
|
+
return readPersistedModeValue();
|
|
141
|
+
}
|
|
142
|
+
export function _resetThemeForTesting() {
|
|
143
|
+
_theme = null;
|
|
144
|
+
_mode = null;
|
|
145
|
+
_systemPrefersDark = null;
|
|
146
|
+
_mediaInitDone = false;
|
|
147
|
+
}
|
|
@@ -504,6 +504,18 @@ Object.keys(_touch).forEach(function (key) {
|
|
|
504
504
|
}
|
|
505
505
|
});
|
|
506
506
|
});
|
|
507
|
+
var _typography = require("./Commons/typography.composable.cjs");
|
|
508
|
+
Object.keys(_typography).forEach(function (key) {
|
|
509
|
+
if (key === "default" || key === "__esModule") return;
|
|
510
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
511
|
+
if (key in exports && exports[key] === _typography[key]) return;
|
|
512
|
+
Object.defineProperty(exports, key, {
|
|
513
|
+
enumerable: true,
|
|
514
|
+
get: function () {
|
|
515
|
+
return _typography[key];
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
});
|
|
507
519
|
var _velocity = require("./Commons/velocity.composable.cjs");
|
|
508
520
|
Object.keys(_velocity).forEach(function (key) {
|
|
509
521
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -1068,6 +1080,18 @@ Object.keys(_theme).forEach(function (key) {
|
|
|
1068
1080
|
}
|
|
1069
1081
|
});
|
|
1070
1082
|
});
|
|
1083
|
+
var _installedThemes = require("./Theme/installed-themes.composable.cjs");
|
|
1084
|
+
Object.keys(_installedThemes).forEach(function (key) {
|
|
1085
|
+
if (key === "default" || key === "__esModule") return;
|
|
1086
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
1087
|
+
if (key in exports && exports[key] === _installedThemes[key]) return;
|
|
1088
|
+
Object.defineProperty(exports, key, {
|
|
1089
|
+
enumerable: true,
|
|
1090
|
+
get: function () {
|
|
1091
|
+
return _installedThemes[key];
|
|
1092
|
+
}
|
|
1093
|
+
});
|
|
1094
|
+
});
|
|
1071
1095
|
var _textareaRich = require("./Textarea/textarea-rich.composable.cjs");
|
|
1072
1096
|
Object.keys(_textareaRich).forEach(function (key) {
|
|
1073
1097
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -1177,6 +1201,18 @@ Object.keys(_chart).forEach(function (key) {
|
|
|
1177
1201
|
}
|
|
1178
1202
|
});
|
|
1179
1203
|
});
|
|
1204
|
+
var _chartHeaderTypography = require("./Chart/chart-header-typography.composable.cjs");
|
|
1205
|
+
Object.keys(_chartHeaderTypography).forEach(function (key) {
|
|
1206
|
+
if (key === "default" || key === "__esModule") return;
|
|
1207
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
1208
|
+
if (key in exports && exports[key] === _chartHeaderTypography[key]) return;
|
|
1209
|
+
Object.defineProperty(exports, key, {
|
|
1210
|
+
enumerable: true,
|
|
1211
|
+
get: function () {
|
|
1212
|
+
return _chartHeaderTypography[key];
|
|
1213
|
+
}
|
|
1214
|
+
});
|
|
1215
|
+
});
|
|
1180
1216
|
var _chartZoom = require("./Chart/chart-zoom.composable.cjs");
|
|
1181
1217
|
Object.keys(_chartZoom).forEach(function (key) {
|
|
1182
1218
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -39,6 +39,7 @@ export * from './Commons/style.composable';
|
|
|
39
39
|
export * from './Commons/goTo.composable';
|
|
40
40
|
export * from './Commons/toggleScope.composable';
|
|
41
41
|
export * from './Commons/touch.composable';
|
|
42
|
+
export * from './Commons/typography.composable';
|
|
42
43
|
export * from './Commons/velocity.composable';
|
|
43
44
|
export * from './Commons/padding.composable';
|
|
44
45
|
export * from './Commons/margin.composable';
|
|
@@ -86,6 +87,7 @@ export * from './DataTable/cell.composable';
|
|
|
86
87
|
export * from './NumberField/hold.composable';
|
|
87
88
|
export * from './PasswordField/passwordStrength.composable';
|
|
88
89
|
export * from './Theme/theme.composable';
|
|
90
|
+
export * from './Theme/installed-themes.composable';
|
|
89
91
|
export * from './Textarea/textarea-rich.composable';
|
|
90
92
|
export * from './CssSupport/cssSupport.composable';
|
|
91
93
|
export * from './Mask/mask.composable';
|
|
@@ -96,4 +98,5 @@ export { useVideoPlayer } from './Video/video-player.composable';
|
|
|
96
98
|
export * from './Audio/use-waveform.composable';
|
|
97
99
|
export * from './Calendar/calendar.composable';
|
|
98
100
|
export * from './Chart/chart.composable';
|
|
101
|
+
export * from './Chart/chart-header-typography.composable';
|
|
99
102
|
export * from './Chart/chart-zoom.composable';
|
|
@@ -39,6 +39,7 @@ export * from "./Commons/style.composable.js";
|
|
|
39
39
|
export * from "./Commons/goTo.composable.js";
|
|
40
40
|
export * from "./Commons/toggleScope.composable.js";
|
|
41
41
|
export * from "./Commons/touch.composable.js";
|
|
42
|
+
export * from "./Commons/typography.composable.js";
|
|
42
43
|
export * from "./Commons/velocity.composable.js";
|
|
43
44
|
export * from "./Commons/padding.composable.js";
|
|
44
45
|
export * from "./Commons/margin.composable.js";
|
|
@@ -86,6 +87,7 @@ export * from "./DataTable/cell.composable.js";
|
|
|
86
87
|
export * from "./NumberField/hold.composable.js";
|
|
87
88
|
export * from "./PasswordField/passwordStrength.composable.js";
|
|
88
89
|
export * from "./Theme/theme.composable.js";
|
|
90
|
+
export * from "./Theme/installed-themes.composable.js";
|
|
89
91
|
export * from "./Textarea/textarea-rich.composable.js";
|
|
90
92
|
export * from "./CssSupport/cssSupport.composable.js";
|
|
91
93
|
export * from "./Mask/mask.composable.js";
|
|
@@ -96,4 +98,5 @@ export { useVideoPlayer } from "./Video/video-player.composable.js";
|
|
|
96
98
|
export * from "./Audio/use-waveform.composable.js";
|
|
97
99
|
export * from "./Calendar/calendar.composable.js";
|
|
98
100
|
export * from "./Chart/chart.composable.js";
|
|
101
|
+
export * from "./Chart/chart-header-typography.composable.js";
|
|
99
102
|
export * from "./Chart/chart-zoom.composable.js";
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.BRACKET_VARIANTS = exports.BRACKET_MATCH_STATUSES = exports.BRACKET_DEFAULT_ROUND_GAP = exports.BRACKET_DEFAULT_MATCH_WIDTH = exports.BRACKET_DEFAULT_MATCH_HEIGHT = exports.BRACKET_DEFAULT_MATCH_GAP = void 0;
|
|
6
|
+
exports.BRACKET_VARIANTS = exports.BRACKET_MATCH_STATUSES = exports.BRACKET_DEFAULT_WINNERS_LABEL = exports.BRACKET_DEFAULT_ROUND_GAP = exports.BRACKET_DEFAULT_MATCH_WIDTH = exports.BRACKET_DEFAULT_MATCH_HEIGHT = exports.BRACKET_DEFAULT_MATCH_GAP = exports.BRACKET_DEFAULT_LOSERS_LABEL = void 0;
|
|
7
7
|
const BRACKET_VARIANTS = exports.BRACKET_VARIANTS = ["single-elimination", "double-elimination", "round-robin"];
|
|
8
8
|
const BRACKET_MATCH_STATUSES = exports.BRACKET_MATCH_STATUSES = ["pending", "live", "completed", "forfeited"];
|
|
9
9
|
const BRACKET_DEFAULT_MATCH_WIDTH = exports.BRACKET_DEFAULT_MATCH_WIDTH = 240;
|
|
10
10
|
const BRACKET_DEFAULT_MATCH_HEIGHT = exports.BRACKET_DEFAULT_MATCH_HEIGHT = 72;
|
|
11
11
|
const BRACKET_DEFAULT_MATCH_GAP = exports.BRACKET_DEFAULT_MATCH_GAP = 24;
|
|
12
|
-
const BRACKET_DEFAULT_ROUND_GAP = exports.BRACKET_DEFAULT_ROUND_GAP = 48;
|
|
12
|
+
const BRACKET_DEFAULT_ROUND_GAP = exports.BRACKET_DEFAULT_ROUND_GAP = 48;
|
|
13
|
+
const BRACKET_DEFAULT_WINNERS_LABEL = exports.BRACKET_DEFAULT_WINNERS_LABEL = "Winners bracket";
|
|
14
|
+
const BRACKET_DEFAULT_LOSERS_LABEL = exports.BRACKET_DEFAULT_LOSERS_LABEL = "Losers bracket";
|
|
@@ -32,3 +32,15 @@ export declare const BRACKET_DEFAULT_MATCH_GAP = 24;
|
|
|
32
32
|
* `bracket.gap-round`.
|
|
33
33
|
*/
|
|
34
34
|
export declare const BRACKET_DEFAULT_ROUND_GAP = 48;
|
|
35
|
+
/**
|
|
36
|
+
* Default heading rendered above the winner-bracket tree in a
|
|
37
|
+
* double-elimination layout. Override via the `winnersLabel` prop
|
|
38
|
+
* (e.g. to localise). Kept as a literal in `withDefaults`, mirrored
|
|
39
|
+
* here for consumer reference.
|
|
40
|
+
*/
|
|
41
|
+
export declare const BRACKET_DEFAULT_WINNERS_LABEL = "Winners bracket";
|
|
42
|
+
/**
|
|
43
|
+
* Default heading rendered above the loser-bracket tree in a
|
|
44
|
+
* double-elimination layout. Override via the `losersLabel` prop.
|
|
45
|
+
*/
|
|
46
|
+
export declare const BRACKET_DEFAULT_LOSERS_LABEL = "Losers bracket";
|
|
@@ -13,3 +13,5 @@ export const BRACKET_DEFAULT_MATCH_WIDTH = 240;
|
|
|
13
13
|
export const BRACKET_DEFAULT_MATCH_HEIGHT = 72;
|
|
14
14
|
export const BRACKET_DEFAULT_MATCH_GAP = 24;
|
|
15
15
|
export const BRACKET_DEFAULT_ROUND_GAP = 48;
|
|
16
|
+
export const BRACKET_DEFAULT_WINNERS_LABEL = "Winners bracket";
|
|
17
|
+
export const BRACKET_DEFAULT_LOSERS_LABEL = "Losers bracket";
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.PREDEFINED_DENSITY = void 0;
|
|
7
7
|
var _enums = require("../../enums/index.cjs");
|
|
8
|
-
const
|
|
8
|
+
const PREDEFINED_DENSITY = exports.PREDEFINED_DENSITY = [_enums.DENSITY.DEFAULT, _enums.DENSITY.COMPACT, _enums.DENSITY.COMFORTABLE];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { TDensity } from '../../types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const PREDEFINED_DENSITY: Array<TDensity>;
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.PREDIFINED_ROUNDED = exports.BORDER_RADIUS_REGEX = void 0;
|
|
6
|
+
exports.PREDIFINED_ROUNDED = exports.PREDEFINED_ROUNDED = exports.CUSTOM_BORDER_RADIUS_REGEX = exports.BORDER_RADIUS_REGEX = void 0;
|
|
7
7
|
var _enums = require("../../enums/index.cjs");
|
|
8
8
|
const BORDER_RADIUS_REGEX = exports.BORDER_RADIUS_REGEX = /^(?<radius>(?: ?(?:0|(?:[0-9]+(?:\.[0-9]+)?)(?:px|pt|PC|in|cm|mm|em|rem|%|ex|ch|fr))){0,4})$/;
|
|
9
|
-
const
|
|
9
|
+
const CUSTOM_BORDER_RADIUS_REGEX = exports.CUSTOM_BORDER_RADIUS_REGEX = /^(?:var|calc|clamp|min|max|env)\(.*\)$|^-?(?:0|[0-9]*\.?[0-9]+)(?:px|pt|pc|in|cm|mm|q|em|rem|ex|ch|cap|ic|lh|rlh|vw|vh|vi|vb|vmin|vmax|%)$/i;
|
|
10
|
+
const PREDEFINED_ROUNDED = exports.PREDEFINED_ROUNDED = [_enums.ROUNDED.X_SMALL, _enums.ROUNDED.SMALL, _enums.ROUNDED.DEFAULT, _enums.ROUNDED.MEDIUM, _enums.ROUNDED.LARGE, _enums.ROUNDED.X_LARGE, _enums.ROUNDED.SHAPED, _enums.ROUNDED.SHAPED_INVERT];
|
|
11
|
+
const PREDIFINED_ROUNDED = exports.PREDIFINED_ROUNDED = PREDEFINED_ROUNDED;
|
|
@@ -9,10 +9,30 @@ import type { TRounded } from '../../types';
|
|
|
9
9
|
* Example matches: `4px`, `0`, `4px 0 4px 0`, `4px 4px 0 0`, `1.5rem`.
|
|
10
10
|
*/
|
|
11
11
|
export declare const BORDER_RADIUS_REGEX: RegExp;
|
|
12
|
+
/**
|
|
13
|
+
* Detects a free-form custom `border-radius` value that `BORDER_RADIUS_REGEX`
|
|
14
|
+
* (fixed unit whitelist) cannot describe but is still a valid CSS declaration:
|
|
15
|
+
* a custom-property reference (`var(--origam-radius---card)`), a `calc(...)` /
|
|
16
|
+
* `clamp(...)` / `min(...)` / `max(...)` expression, or a single CSS length
|
|
17
|
+
* whose unit lives outside the literal whitelist (`vw`, `vh`, `vmin`, `vmax`,
|
|
18
|
+
* `q`, `lh`, …). Mirrors how `convertToUnit` / `useDimension` already pass
|
|
19
|
+
* custom-property refs and computed lengths straight through, so `rounded`
|
|
20
|
+
* gains the same escape hatch as `width` / `height`.
|
|
21
|
+
*
|
|
22
|
+
* Example matches: `var(--origam-radius---card)`, `calc(1rem + 2px)`,
|
|
23
|
+
* `clamp(4px, 1vw, 16px)`, `12vw`, `var(--x, 8px)`.
|
|
24
|
+
*/
|
|
25
|
+
export declare const CUSTOM_BORDER_RADIUS_REGEX: RegExp;
|
|
12
26
|
/**
|
|
13
27
|
* Whitelist of named radius variants. Mirrors `useDensity` /
|
|
14
|
-
* `
|
|
28
|
+
* `PREDEFINED_DENSITY` so the composable can decide between
|
|
15
29
|
* `--rounded-{name}` (class output) and an inline `border-radius`
|
|
16
30
|
* declaration.
|
|
17
31
|
*/
|
|
18
|
-
export declare const
|
|
32
|
+
export declare const PREDEFINED_ROUNDED: Array<TRounded>;
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated Misspelling of `PREDEFINED_ROUNDED`. Kept as an alias for
|
|
35
|
+
* backward compatibility and slated for removal in a future major. Use
|
|
36
|
+
* `PREDEFINED_ROUNDED`.
|
|
37
|
+
*/
|
|
38
|
+
export declare const PREDIFINED_ROUNDED: ("default" | "x-small" | "small" | "medium" | "large" | "x-large" | "shaped" | "shaped-invert")[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ROUNDED } from "../../enums/index.js";
|
|
2
2
|
export const BORDER_RADIUS_REGEX = /^(?<radius>(?: ?(?:0|(?:[0-9]+(?:\.[0-9]+)?)(?:px|pt|PC|in|cm|mm|em|rem|%|ex|ch|fr))){0,4})$/;
|
|
3
|
-
export const
|
|
3
|
+
export const CUSTOM_BORDER_RADIUS_REGEX = /^(?:var|calc|clamp|min|max|env)\(.*\)$|^-?(?:0|[0-9]*\.?[0-9]+)(?:px|pt|pc|in|cm|mm|q|em|rem|ex|ch|cap|ic|lh|rlh|vw|vh|vi|vb|vmin|vmax|%)$/i;
|
|
4
|
+
export const PREDEFINED_ROUNDED = [
|
|
4
5
|
ROUNDED.X_SMALL,
|
|
5
6
|
ROUNDED.SMALL,
|
|
6
7
|
ROUNDED.DEFAULT,
|
|
@@ -10,3 +11,4 @@ export const PREDIFINED_ROUNDED = [
|
|
|
10
11
|
ROUNDED.SHAPED,
|
|
11
12
|
ROUNDED.SHAPED_INVERT
|
|
12
13
|
];
|
|
14
|
+
export const PREDIFINED_ROUNDED = PREDEFINED_ROUNDED;
|
|
@@ -4,7 +4,7 @@ export const singleSelectStrategy = {
|
|
|
4
4
|
showSelectAll: false,
|
|
5
5
|
allSelected: () => [],
|
|
6
6
|
select: ({ items, value }) => {
|
|
7
|
-
return new Set(value ? [items[0]
|
|
7
|
+
return new Set(value && items.length > 0 ? [items[0].value] : []);
|
|
8
8
|
},
|
|
9
9
|
selectAll: ({ selected }) => selected
|
|
10
10
|
};
|
|
@@ -8,9 +8,14 @@ var _vue = require("vue");
|
|
|
8
8
|
var _components = require("../../components/index.cjs");
|
|
9
9
|
var _enums = require("../../enums/index.cjs");
|
|
10
10
|
const MDI = exports.MDI = {
|
|
11
|
-
//
|
|
11
|
+
// The MDI font CSS exposes each glyph as `.mdi-<name>` (e.g. `.mdi-magnify`).
|
|
12
|
+
// Consumers may pass either the bare name (`magnify`) — as is the case when
|
|
13
|
+
// an `mdi:` prefix has been stripped by the icon resolver — or the already-
|
|
14
|
+
// prefixed form (`mdi-magnify`, as found in MDI_ALIASES below). We
|
|
15
|
+
// normalise to always emit the `mdi-` class so the font renders.
|
|
12
16
|
component: props => (0, _vue.h)(_components.OrigamClassIcon, {
|
|
13
17
|
...props,
|
|
18
|
+
icon: typeof props.icon === "string" && !props.icon.startsWith("mdi-") ? `mdi-${props.icon}` : props.icon,
|
|
14
19
|
class: "mdi"
|
|
15
20
|
})
|
|
16
21
|
};
|