@elmethis/core 1.0.0-alpha.19 → 1.0.0-alpha.191
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/_virtual/_plugin-vue_export-helper.mjs +10 -0
- package/dist/components/{headings/ElmHeading4.stories.d.ts → badge/ElmBadge.stories.d.ts} +2 -2
- package/dist/components/{typography/ElmBulletedList.vue.d.ts → badge/ElmBadge.vue.d.ts} +8 -7
- package/dist/components/badge/ElmBadge.vue.mjs +10 -0
- package/dist/components/badge/ElmBadge.vue2.mjs +33 -0
- package/dist/components/badge/ElmBadge.vue3.mjs +26 -0
- package/dist/components/badge/ElmTag.stories.d.ts +7 -0
- package/dist/components/badge/ElmTag.vue.d.ts +14 -0
- package/dist/components/badge/ElmTag.vue.mjs +10 -0
- package/dist/components/badge/ElmTag.vue2.mjs +39 -0
- package/dist/components/badge/ElmTag.vue3.mjs +26 -0
- package/dist/components/code/ElmCodeBlock.stories.d.ts +2 -0
- package/dist/components/code/ElmCodeBlock.vue.d.ts +31 -2
- package/dist/components/code/ElmCodeBlock.vue.mjs +23 -0
- package/dist/components/code/ElmCodeBlock.vue2.mjs +127 -0
- package/dist/components/code/ElmCodeBlock.vue3.mjs +42 -0
- package/dist/components/code/ElmKatex.vue.d.ts +3 -1
- package/dist/components/code/ElmKatex.vue.mjs +10 -0
- package/dist/components/code/ElmKatex.vue2.mjs +67 -0
- package/dist/components/code/ElmKatex.vue3.mjs +20 -0
- package/dist/components/code/ElmShikiHighlighter.stories.d.ts +6 -0
- package/dist/components/code/ElmShikiHighlighter.vue.d.ts +22 -0
- package/dist/components/code/ElmShikiHighlighter.vue.mjs +23 -0
- package/dist/components/code/ElmShikiHighlighter.vue2.mjs +55 -0
- package/dist/components/code/ElmShikiHighlighter.vue3.mjs +20 -0
- package/dist/components/code/shikiInstance.d.ts +2 -0
- package/dist/components/code/shikiInstance.mjs +76 -0
- package/dist/components/containments/ElmColumn.vue.d.ts +3 -2
- package/dist/components/containments/ElmColumn.vue.mjs +10 -0
- package/dist/components/containments/ElmColumn.vue2.mjs +16 -0
- package/dist/components/containments/ElmColumn.vue3.mjs +20 -0
- package/dist/components/containments/ElmColumnList.vue.d.ts +3 -2
- package/dist/components/containments/ElmColumnList.vue.mjs +10 -0
- package/dist/components/containments/ElmColumnList.vue2.mjs +16 -0
- package/dist/components/containments/ElmColumnList.vue3.mjs +18 -0
- package/dist/components/containments/ElmDesktopWindow.vue.d.ts +3 -2
- package/dist/components/containments/ElmDesktopWindow.vue.mjs +10 -0
- package/dist/components/containments/ElmDesktopWindow.vue2.mjs +42 -0
- package/dist/components/containments/ElmDesktopWindow.vue3.mjs +26 -0
- package/dist/components/containments/ElmModal.vue.d.ts +8 -7
- package/dist/components/containments/ElmModal.vue.mjs +23 -0
- package/dist/components/containments/ElmModal.vue2.mjs +44 -0
- package/dist/components/containments/ElmModal.vue3.mjs +23 -0
- package/dist/components/containments/ElmParallax.vue.mjs +10 -0
- package/dist/components/containments/ElmParallax.vue2.mjs +35 -0
- package/dist/components/containments/ElmParallax.vue3.mjs +20 -0
- package/dist/components/containments/ElmSnackbar.stories.d.ts +6 -0
- package/dist/components/containments/ElmSnackbar.vue.d.ts +11 -0
- package/dist/components/containments/ElmSnackbar.vue.mjs +10 -0
- package/dist/components/containments/ElmSnackbar.vue2.mjs +39 -0
- package/dist/components/containments/ElmSnackbar.vue3.mjs +26 -0
- package/dist/components/containments/ElmSnackbarContainer.vue.d.ts +10 -0
- package/dist/components/containments/ElmSnackbarContainer.vue.mjs +23 -0
- package/dist/components/containments/ElmSnackbarContainer.vue2.mjs +33 -0
- package/dist/components/containments/ElmSnackbarContainer.vue3.mjs +19 -0
- package/dist/components/containments/ElmToggle.stories.d.ts +1 -0
- package/dist/components/containments/ElmToggle.vue.d.ts +21 -10
- package/dist/components/containments/ElmToggle.vue.mjs +23 -0
- package/dist/components/containments/ElmToggle.vue2.mjs +103 -0
- package/dist/components/containments/ElmToggle.vue3.mjs +33 -0
- package/dist/components/containments/ElmTooltip.vue.d.ts +5 -2
- package/dist/components/containments/ElmTooltip.vue.mjs +23 -0
- package/dist/components/containments/ElmTooltip.vue2.mjs +49 -0
- package/dist/components/containments/ElmTooltip.vue3.mjs +20 -0
- package/dist/components/containments/useSnackbarState.d.ts +28 -0
- package/dist/components/data/ElmMultiProgress.stories.d.ts +6 -0
- package/dist/components/data/ElmMultiProgress.vue.d.ts +30 -0
- package/dist/components/data/ElmMultiProgress.vue.mjs +10 -0
- package/dist/components/data/ElmMultiProgress.vue2.mjs +45 -0
- package/dist/components/data/ElmMultiProgress.vue3.mjs +23 -0
- package/dist/components/data/ElmProgress.stories.d.ts +1 -0
- package/dist/components/data/ElmProgress.vue.d.ts +6 -1
- package/dist/components/data/ElmProgress.vue.mjs +10 -0
- package/dist/components/data/ElmProgress.vue2.mjs +53 -0
- package/dist/components/data/ElmProgress.vue3.mjs +32 -0
- package/dist/components/data/ElmStatusMessage.stories.d.ts +9 -0
- package/dist/components/data/ElmStatusMessage.vue.d.ts +6 -0
- package/dist/components/data/ElmStatusMessage.vue.mjs +23 -0
- package/dist/components/data/ElmStatusMessage.vue2.mjs +75 -0
- package/dist/components/data/ElmStatusMessage.vue3.mjs +23 -0
- package/dist/components/fallback/ElmBlockFallback.stories.d.ts +6 -0
- package/dist/components/fallback/ElmBlockFallback.vue.d.ts +4 -0
- package/dist/components/fallback/ElmBlockFallback.vue.mjs +10 -0
- package/dist/components/fallback/ElmBlockFallback.vue2.mjs +17 -0
- package/dist/components/fallback/ElmBlockFallback.vue3.mjs +18 -0
- package/dist/components/fallback/ElmRectangleWave.vue.d.ts +1 -1
- package/dist/components/fallback/ElmRectangleWave.vue.mjs +10 -0
- package/dist/components/fallback/ElmRectangleWave.vue2.mjs +15 -0
- package/dist/components/fallback/ElmRectangleWave.vue3.mjs +21 -0
- package/dist/components/{headings/ElmHeading1.stories.d.ts → fallback/ElmSpinner.stories.d.ts} +2 -2
- package/dist/components/fallback/ElmSpinner.vue.d.ts +9 -0
- package/dist/components/fallback/ElmSpinner.vue.mjs +10 -0
- package/dist/components/fallback/ElmSpinner.vue2.mjs +30 -0
- package/dist/components/fallback/ElmSpinner.vue3.mjs +24 -0
- package/dist/components/fallback/ElmUnsupportedBlock.stories.d.ts +6 -0
- package/dist/components/fallback/ElmUnsupportedBlock.vue.d.ts +5 -0
- package/dist/components/fallback/ElmUnsupportedBlock.vue.mjs +10 -0
- package/dist/components/fallback/ElmUnsupportedBlock.vue2.mjs +46 -0
- package/dist/components/fallback/ElmUnsupportedBlock.vue3.mjs +29 -0
- package/dist/components/form/ElmButton.stories.d.ts +11 -0
- package/dist/components/form/ElmButton.vue.d.ts +41 -0
- package/dist/components/form/ElmButton.vue.mjs +23 -0
- package/dist/components/form/ElmButton.vue2.mjs +68 -0
- package/dist/components/form/ElmButton.vue3.mjs +36 -0
- package/dist/components/form/ElmCheckbox.vue.d.ts +16 -6
- package/dist/components/form/ElmCheckbox.vue.mjs +10 -0
- package/dist/components/form/ElmCheckbox.vue2.mjs +177 -0
- package/dist/components/form/ElmCheckbox.vue3.mjs +34 -0
- package/dist/components/{headings/ElmHeading2.stories.d.ts → form/ElmSwitch.stories.d.ts} +2 -2
- package/dist/components/form/ElmSwitch.vue.d.ts +32 -0
- package/dist/components/form/ElmSwitch.vue.mjs +10 -0
- package/dist/components/form/ElmSwitch.vue2.mjs +61 -0
- package/dist/components/form/ElmSwitch.vue3.mjs +28 -0
- package/dist/components/form/ElmTextField.stories.d.ts +6 -0
- package/dist/components/form/ElmTextField.vue.d.ts +30 -0
- package/dist/components/form/ElmTextField.vue.mjs +10 -0
- package/dist/components/form/ElmTextField.vue2.mjs +124 -0
- package/dist/components/form/ElmTextField.vue3.mjs +46 -0
- package/dist/components/{headings/ElmHeading3.stories.d.ts → form/ElmTotp.stories.d.ts} +2 -2
- package/dist/components/form/ElmTotp.vue.d.ts +12 -0
- package/dist/components/form/ElmTotp.vue.mjs +10 -0
- package/dist/components/form/ElmTotp.vue2.mjs +102 -0
- package/dist/components/form/ElmTotp.vue3.mjs +34 -0
- package/dist/components/icon/ElmArrowIcon.stories.d.ts +6 -0
- package/dist/components/icon/ElmArrowIcon.vue.d.ts +26 -0
- package/dist/components/icon/ElmArrowIcon.vue.mjs +10 -0
- package/dist/components/icon/ElmArrowIcon.vue2.mjs +31 -0
- package/dist/components/icon/ElmArrowIcon.vue3.mjs +29 -0
- package/dist/components/icon/ElmBookmarkIcon.stories.d.ts +8 -0
- package/dist/components/icon/ElmBookmarkIcon.vue.d.ts +7 -0
- package/dist/components/icon/ElmBookmarkIcon.vue.mjs +10 -0
- package/dist/components/icon/ElmBookmarkIcon.vue2.mjs +45 -0
- package/dist/components/icon/ElmBookmarkIcon.vue3.mjs +27 -0
- package/dist/components/icon/ElmCubeIcon.vue.d.ts +1 -1
- package/dist/components/icon/ElmCubeIcon.vue.mjs +10 -0
- package/dist/components/icon/ElmCubeIcon.vue2.mjs +41 -0
- package/dist/components/icon/ElmCubeIcon.vue3.mjs +24 -0
- package/dist/components/icon/ElmDotLoadingIcon.vue.d.ts +2 -2
- package/dist/components/icon/ElmDotLoadingIcon.vue.mjs +10 -0
- package/dist/components/icon/ElmDotLoadingIcon.vue2.mjs +28 -0
- package/dist/components/icon/ElmDotLoadingIcon.vue3.mjs +26 -0
- package/dist/components/icon/ElmInlineIcon.stories.d.ts +6 -0
- package/dist/components/icon/ElmInlineIcon.vue.d.ts +12 -0
- package/dist/components/icon/ElmInlineIcon.vue.mjs +10 -0
- package/dist/components/icon/ElmInlineIcon.vue2.mjs +27 -0
- package/dist/components/icon/ElmInlineIcon.vue3.mjs +20 -0
- package/dist/components/icon/ElmLanguageIcon.vue.d.ts +1 -1
- package/dist/components/icon/ElmLanguageIcon.vue.mjs +23 -0
- package/dist/components/icon/ElmLanguageIcon.vue2.mjs +148 -0
- package/dist/components/icon/ElmLanguageIcon.vue3.mjs +23 -0
- package/dist/components/icon/ElmLoginIcon.stories.d.ts +6 -0
- package/dist/components/icon/ElmLoginIcon.vue.d.ts +18 -0
- package/dist/components/icon/ElmLoginIcon.vue.mjs +10 -0
- package/dist/components/icon/ElmLoginIcon.vue2.mjs +37 -0
- package/dist/components/icon/ElmLoginIcon.vue3.mjs +20 -0
- package/dist/components/icon/ElmToggleTheme.vue.mjs +10 -0
- package/dist/components/icon/ElmToggleTheme.vue2.mjs +30 -0
- package/dist/components/icon/ElmToggleTheme.vue3.mjs +20 -0
- package/dist/components/icon/languages/Bash.vue.d.ts +1 -1
- package/dist/{Bash-mlA01V07.js → components/icon/languages/Bash.vue.mjs} +20 -15
- package/dist/components/icon/languages/Bash.vue2.mjs +20 -0
- package/dist/components/icon/languages/{JavaScript.vue.d.ts → Css.vue.d.ts} +1 -1
- package/dist/components/icon/languages/Css.vue.mjs +19 -0
- package/dist/components/icon/languages/Rust.vue.d.ts +1 -1
- package/dist/components/icon/languages/Rust.vue.mjs +17 -0
- package/dist/components/jsonschema/ElmChildContainer.stories.d.ts +6 -0
- package/dist/components/{typography/ElmListItem.vue.d.ts → jsonschema/ElmChildContainer.vue.d.ts} +6 -3
- package/dist/components/jsonschema/ElmFieldAttribute.stories.d.ts +6 -0
- package/dist/components/jsonschema/ElmFieldAttribute.vue.d.ts +7 -0
- package/dist/components/jsonschema/ElmFieldType.stories.d.ts +7 -0
- package/dist/components/jsonschema/ElmFieldType.vue.d.ts +8 -0
- package/dist/components/jsonschema/ElmJsonSchema.stories.d.ts +7 -0
- package/dist/components/jsonschema/ElmJsonSchema.vue.d.ts +7 -0
- package/dist/components/media/ElmBlockImage.stories.d.ts +9 -0
- package/dist/components/media/ElmBlockImage.vue.d.ts +12 -0
- package/dist/components/media/ElmBlockImage.vue.mjs +23 -0
- package/dist/components/media/ElmBlockImage.vue2.mjs +117 -0
- package/dist/components/media/ElmBlockImage.vue3.mjs +36 -0
- package/dist/components/media/ElmFile.vue.d.ts +6 -1
- package/dist/components/media/ElmFile.vue.mjs +10 -0
- package/dist/components/media/ElmFile.vue2.mjs +77 -0
- package/dist/components/media/ElmFile.vue3.mjs +26 -0
- package/dist/components/media/ElmImage.stories.d.ts +2 -0
- package/dist/components/media/ElmImage.vue.d.ts +5 -0
- package/dist/components/media/ElmImage.vue.mjs +23 -0
- package/dist/components/media/ElmImage.vue2.mjs +91 -0
- package/dist/components/media/ElmImage.vue3.mjs +30 -0
- package/dist/components/navigation/ElmBookmark.stories.d.ts +2 -0
- package/dist/components/navigation/ElmBookmark.vue.d.ts +14 -10
- package/dist/components/navigation/ElmBookmark.vue.mjs +10 -0
- package/dist/components/navigation/ElmBookmark.vue2.mjs +115 -0
- package/dist/components/navigation/ElmBookmark.vue3.mjs +44 -0
- package/dist/components/navigation/ElmBreadcrumb.vue.d.ts +3 -1
- package/dist/components/navigation/ElmBreadcrumb.vue.mjs +10 -0
- package/dist/components/navigation/ElmBreadcrumb.vue2.mjs +63 -0
- package/dist/components/navigation/ElmBreadcrumb.vue3.mjs +30 -0
- package/dist/components/navigation/ElmPagetop.vue.d.ts +2 -2
- package/dist/components/navigation/ElmPagetop.vue.mjs +10 -0
- package/dist/components/navigation/ElmPagetop.vue2.mjs +51 -0
- package/dist/components/navigation/ElmPagetop.vue3.mjs +30 -0
- package/dist/components/navigation/ElmTableOfContents.vue.d.ts +1 -1
- package/dist/components/navigation/ElmTableOfContents.vue.mjs +10 -0
- package/dist/components/navigation/ElmTableOfContents.vue2.mjs +43 -0
- package/dist/components/navigation/ElmTableOfContents.vue3.mjs +26 -0
- package/dist/components/others/ElmColorSample.stories.d.ts +6 -0
- package/dist/components/others/ElmColorSample.vue.d.ts +8 -0
- package/dist/components/others/ElmColorSample.vue.mjs +23 -0
- package/dist/components/others/ElmColorSample.vue2.mjs +72 -0
- package/dist/components/others/ElmColorSample.vue3.mjs +21 -0
- package/dist/components/others/ElmColorTable.stories.d.ts +6 -0
- package/dist/components/others/ElmColorTable.vue.d.ts +11 -0
- package/dist/components/others/ElmColorTable.vue.mjs +10 -0
- package/dist/components/others/ElmColorTable.vue2.mjs +45 -0
- package/dist/components/others/ElmColorTable.vue3.mjs +22 -0
- package/dist/components/others/ElmJsonComponentRenderer.stories.d.ts +23 -0
- package/dist/components/others/ElmJsonComponentRenderer.vue.d.ts +6 -0
- package/dist/components/others/ElmJsonComponentRenderer.vue.mjs +10 -0
- package/dist/components/others/ElmJsonComponentRenderer.vue2.mjs +214 -0
- package/dist/components/others/ElmJsonComponentRenderer.vue3.mjs +21 -0
- package/dist/components/others/ElmTyping.stories.d.ts +6 -0
- package/dist/components/others/ElmTyping.vue.d.ts +4 -0
- package/dist/components/table/ElmTable.vue.d.ts +32 -4
- package/dist/components/table/ElmTable.vue.mjs +10 -0
- package/dist/components/table/ElmTable.vue2.mjs +61 -0
- package/dist/components/table/ElmTable.vue3.mjs +27 -0
- package/dist/components/table/ElmTableBody.vue.d.ts +8 -4
- package/dist/components/table/ElmTableBody.vue.mjs +14 -0
- package/dist/components/table/ElmTableBody.vue2.mjs +4 -0
- package/dist/components/table/ElmTableCell.vue.d.ts +7 -3
- package/dist/components/table/ElmTableCell.vue.mjs +10 -0
- package/dist/components/table/ElmTableCell.vue2.mjs +28 -0
- package/dist/components/table/ElmTableCell.vue3.mjs +26 -0
- package/dist/components/table/ElmTableHeader.vue.d.ts +8 -4
- package/dist/components/table/ElmTableHeader.vue.mjs +10 -0
- package/dist/components/table/ElmTableHeader.vue2.mjs +17 -0
- package/dist/components/table/ElmTableHeader.vue3.mjs +20 -0
- package/dist/components/table/ElmTableRow.vue.d.ts +8 -4
- package/dist/components/table/ElmTableRow.vue.mjs +10 -0
- package/dist/components/table/ElmTableRow.vue2.mjs +20 -0
- package/dist/components/table/ElmTableRow.vue3.mjs +21 -0
- package/dist/components/template/ElmTemplate.vue.d.ts +1 -1
- package/dist/components/typography/ElmBlockQuote.vue.d.ts +6 -2
- package/dist/components/typography/ElmBlockQuote.vue.mjs +10 -0
- package/dist/components/typography/ElmBlockQuote.vue2.mjs +64 -0
- package/dist/components/typography/ElmBlockQuote.vue3.mjs +26 -0
- package/dist/components/typography/ElmCallout.vue.d.ts +6 -3
- package/dist/components/typography/ElmCallout.vue.mjs +10 -0
- package/dist/components/typography/ElmCallout.vue2.mjs +57 -0
- package/dist/components/typography/ElmCallout.vue3.mjs +26 -0
- package/dist/components/typography/ElmDivider.vue.d.ts +8 -1
- package/dist/components/typography/ElmDivider.vue.mjs +10 -0
- package/dist/components/typography/ElmDivider.vue2.mjs +29 -0
- package/dist/components/typography/ElmDivider.vue3.mjs +20 -0
- package/dist/components/typography/ElmFragmentIdentifier.stories.d.ts +6 -0
- package/dist/components/typography/ElmFragmentIdentifier.vue.d.ts +8 -0
- package/dist/components/typography/ElmFragmentIdentifier.vue.mjs +10 -0
- package/dist/components/typography/ElmFragmentIdentifier.vue2.mjs +57 -0
- package/dist/components/typography/ElmFragmentIdentifier.vue3.mjs +23 -0
- package/dist/components/typography/ElmHeading.stories.d.ts +7 -0
- package/dist/components/typography/ElmHeading.vue.d.ts +49 -0
- package/dist/components/typography/ElmHeading.vue.mjs +10 -0
- package/dist/components/typography/ElmHeading.vue2.mjs +72 -0
- package/dist/components/typography/ElmHeading.vue3.mjs +39 -0
- package/dist/components/{inline → typography}/ElmInlineText.stories.d.ts +3 -0
- package/dist/components/{inline → typography}/ElmInlineText.vue.d.ts +22 -1
- package/dist/components/typography/ElmInlineText.vue.mjs +10 -0
- package/dist/components/typography/ElmInlineText.vue2.mjs +95 -0
- package/dist/components/typography/ElmInlineText.vue3.mjs +29 -0
- package/dist/components/typography/ElmList.stories.d.ts +8 -0
- package/dist/components/typography/ElmList.vue.d.ts +31 -0
- package/dist/components/typography/ElmList.vue.mjs +36 -0
- package/dist/components/typography/ElmList.vue3.mjs +17 -0
- package/dist/components/typography/ElmParagraph.vue.d.ts +5 -2
- package/dist/components/typography/ElmParagraph.vue.mjs +10 -0
- package/dist/components/typography/ElmParagraph.vue2.mjs +27 -0
- package/dist/components/typography/ElmParagraph.vue3.mjs +20 -0
- package/dist/components/typography/ElmTypingAnimation.stories.d.ts +6 -0
- package/dist/components/typography/ElmTypingAnimation.vue.d.ts +21 -0
- package/dist/hooks/useElmethisTheme.mjs +43 -0
- package/dist/hooks/useTyping.d.ts +17 -0
- package/dist/hooks/useTyping.mjs +37 -0
- package/dist/index.d.ts +112 -46
- package/dist/index.mjs +128 -0
- package/dist/node_modules/.pnpm/@mdi_js@7.4.47/node_modules/@mdi/js/mdi.mjs +14 -0
- package/package.json +32 -32
- package/dist/JavaScript-stKTLCvS.js +0 -22
- package/dist/Rust-PU5XwTn1.js +0 -16
- package/dist/TypeScript-ViBgqhx7.js +0 -22
- package/dist/components/code/ElmPrismHighlighter.stories.d.ts +0 -7
- package/dist/components/code/ElmPrismHighlighter.vue.d.ts +0 -14
- package/dist/components/headings/ElmHeading1.vue.d.ts +0 -20
- package/dist/components/headings/ElmHeading2.vue.d.ts +0 -20
- package/dist/components/headings/ElmHeading3.vue.d.ts +0 -20
- package/dist/components/headings/ElmHeading4.vue.d.ts +0 -20
- package/dist/components/headings/ElmHeading5.stories.d.ts +0 -6
- package/dist/components/headings/ElmHeading5.vue.d.ts +0 -20
- package/dist/components/headings/ElmHeading6.stories.d.ts +0 -6
- package/dist/components/headings/ElmHeading6.vue.d.ts +0 -20
- package/dist/components/icon/languages/TypeScript.vue.d.ts +0 -2
- package/dist/components/inline/ElmInlineCode.stories.d.ts +0 -6
- package/dist/components/inline/ElmInlineCode.vue.d.ts +0 -15
- package/dist/components/inline/ElmInlineLink.stories.d.ts +0 -9
- package/dist/components/inline/ElmInlineLink.vue.d.ts +0 -37
- package/dist/components/inline/ElmInlineRuby.stories.d.ts +0 -6
- package/dist/components/inline/ElmInlineRuby.vue.d.ts +0 -19
- package/dist/components/renderer/ElmJsonRenderer.stories.d.ts +0 -19
- package/dist/components/renderer/ElmJsonRenderer.vue.d.ts +0 -163
- package/dist/components/typography/ElmBulletedList.stories.d.ts +0 -7
- package/dist/components/typography/ElmListItem.stories.d.ts +0 -6
- package/dist/components/typography/ElmNumberedList.stories.d.ts +0 -7
- package/dist/components/typography/ElmNumberedList.vue.d.ts +0 -20
- package/dist/elmethis.js +0 -48
- package/dist/elmethis.umd.cjs +0 -419
- package/dist/index-DvtsYpwQ.js +0 -16274
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
(function() {
|
|
2
|
+
"use strict";
|
|
3
|
+
try {
|
|
4
|
+
if (typeof document != "undefined") {
|
|
5
|
+
var elementStyle = document.createElement("style");
|
|
6
|
+
elementStyle.appendChild(document.createTextNode(".v-enter-to[data-v-324befdb],.v-leave-from[data-v-324befdb]{opacity:1}.v-enter-active[data-v-324befdb],.v-leave-active[data-v-324befdb]{transition:opacity .1s}.v-enter-from[data-v-324befdb],.v-leave-to[data-v-324befdb]{opacity:0}"));
|
|
7
|
+
document.head.appendChild(elementStyle);
|
|
8
|
+
}
|
|
9
|
+
} catch (e) {
|
|
10
|
+
console.error("vite-plugin-css-injected-by-js", e);
|
|
11
|
+
}
|
|
12
|
+
})();
|
|
13
|
+
import _sfc_main from "./ElmButton.vue2.mjs";
|
|
14
|
+
import style0 from "./ElmButton.vue3.mjs";
|
|
15
|
+
|
|
16
|
+
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
17
|
+
const cssModules = {
|
|
18
|
+
"$style": style0
|
|
19
|
+
};
|
|
20
|
+
const ElmButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules], ["__scopeId", "data-v-324befdb"]]);
|
|
21
|
+
export {
|
|
22
|
+
ElmButton as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { defineComponent, ref, onUnmounted, createElementBlock, openBlock, normalizeStyle, normalizeClass, createCommentVNode, createVNode, Transition, withCtx, createBlock, renderSlot } from "vue";
|
|
2
|
+
import ElmDotLoadingIcon from "../icon/ElmDotLoadingIcon.vue.mjs";
|
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "ElmButton",
|
|
5
|
+
props: {
|
|
6
|
+
loading: { type: Boolean, default: false },
|
|
7
|
+
block: { type: Boolean, default: false },
|
|
8
|
+
disabled: { type: Boolean, default: false },
|
|
9
|
+
primary: { type: Boolean, default: false },
|
|
10
|
+
onClick: {}
|
|
11
|
+
},
|
|
12
|
+
setup(__props) {
|
|
13
|
+
const props = __props;
|
|
14
|
+
const clicked = ref(false);
|
|
15
|
+
const id = ref();
|
|
16
|
+
const handleClick = () => {
|
|
17
|
+
if (!props.loading && !props.disabled && props.onClick) {
|
|
18
|
+
clicked.value = true;
|
|
19
|
+
id.value = window.setTimeout(() => clicked.value = false, 300);
|
|
20
|
+
props.onClick();
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
onUnmounted(() => {
|
|
24
|
+
if (id.value) clearTimeout(id.value);
|
|
25
|
+
});
|
|
26
|
+
return (_ctx, _cache) => {
|
|
27
|
+
return openBlock(), createElementBlock("button", {
|
|
28
|
+
class: normalizeClass([
|
|
29
|
+
_ctx.$style.button,
|
|
30
|
+
{
|
|
31
|
+
[_ctx.$style.enable]: !_ctx.loading && !_ctx.disabled,
|
|
32
|
+
[_ctx.$style.normal]: !_ctx.primary,
|
|
33
|
+
[_ctx.$style.primary]: _ctx.primary
|
|
34
|
+
}
|
|
35
|
+
]),
|
|
36
|
+
style: normalizeStyle({
|
|
37
|
+
display: _ctx.block ? "flex" : "inline-flex",
|
|
38
|
+
width: _ctx.block ? "100%" : "auto",
|
|
39
|
+
cursor: _ctx.disabled ? "not-allowed" : _ctx.loading ? "progress" : "pointer",
|
|
40
|
+
"--opacity": _ctx.disabled ? 0.6 : void 0
|
|
41
|
+
}),
|
|
42
|
+
onClick: handleClick
|
|
43
|
+
}, [
|
|
44
|
+
clicked.value ? (openBlock(), createElementBlock("div", {
|
|
45
|
+
key: 0,
|
|
46
|
+
class: normalizeClass(_ctx.$style.ripple)
|
|
47
|
+
}, null, 2)) : createCommentVNode("", true),
|
|
48
|
+
createVNode(Transition, { mode: "out-in" }, {
|
|
49
|
+
default: withCtx(() => [
|
|
50
|
+
_ctx.loading ? (openBlock(), createBlock(ElmDotLoadingIcon, {
|
|
51
|
+
key: 0,
|
|
52
|
+
size: "1.5rem"
|
|
53
|
+
})) : (openBlock(), createElementBlock("span", {
|
|
54
|
+
key: 1,
|
|
55
|
+
class: normalizeClass(_ctx.$style.flex)
|
|
56
|
+
}, [
|
|
57
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
58
|
+
], 2))
|
|
59
|
+
]),
|
|
60
|
+
_: 3
|
|
61
|
+
})
|
|
62
|
+
], 6);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
export {
|
|
67
|
+
_sfc_main as default
|
|
68
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
(function() {
|
|
2
|
+
"use strict";
|
|
3
|
+
try {
|
|
4
|
+
if (typeof document != "undefined") {
|
|
5
|
+
var elementStyle = document.createElement("style");
|
|
6
|
+
elementStyle.appendChild(document.createTextNode("._button_mdlzb_1{all:unset;position:relative;overflow:hidden;min-height:2.75rem;justify-content:center;align-items:center;gap:.5rem;border-radius:.25rem;box-sizing:border-box;padding:.5rem 1.5rem;line-height:1.5rem;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;transition:opacity .2s,transform .2s;opacity:var(--opacity)}._normal_mdlzb_19{box-shadow:0 0 .25rem #0003;color:#0009;background-color:#fffc}[data-theme=dark] ._normal_mdlzb_19{box-shadow:0 0 .25rem #0009;color:#fff9;background-color:#ffffff1a}._primary_mdlzb_30{box-shadow:0 0 .25rem #0003;color:#fff9;background-color:#000c}[data-theme=dark] ._primary_mdlzb_30{box-shadow:0 0 .25rem #0009;color:#0009;background-color:#fffc}._enable_mdlzb_41{transition:opacity .2s,transform .2s}[data-theme=dark] ._enable_mdlzb_41:hover{transform:translate(-1px) translateY(-1px);opacity:.7;opacity:var(--opacity, .7)}[data-theme=dark] ._enable_mdlzb_41:active{transform:translate(1px) translateY(1px);opacity:.5;opacity:var(--opacity, .5)}._enable_mdlzb_41:hover{transform:translate(-1px) translateY(-1px);opacity:.7;opacity:var(--opacity, .7)}._enable_mdlzb_41:active{transform:translate(1px) translateY(1px);opacity:.5;opacity:var(--opacity, .5)}._flex_mdlzb_61{display:flex;justify-content:center;align-items:center;gap:.5rem}@keyframes _button-ripple_mdlzb_1{0%{transform:scale(0);opacity:1}to{transform:scale(1);opacity:0}}._ripple_mdlzb_78{position:absolute;pointer-events:none;border-radius:50%;background-color:#80808059;width:100%;aspect-ratio:1/1;transition:none;opacity:0;animation-name:_button-ripple_mdlzb_1;animation-duration:.3s;animation-fill-mode:both;animation-timing-function:ease-out}"));
|
|
7
|
+
document.head.appendChild(elementStyle);
|
|
8
|
+
}
|
|
9
|
+
} catch (e) {
|
|
10
|
+
console.error("vite-plugin-css-injected-by-js", e);
|
|
11
|
+
}
|
|
12
|
+
})();
|
|
13
|
+
const button = "_button_mdlzb_1";
|
|
14
|
+
const normal = "_normal_mdlzb_19";
|
|
15
|
+
const primary = "_primary_mdlzb_30";
|
|
16
|
+
const enable = "_enable_mdlzb_41";
|
|
17
|
+
const flex = "_flex_mdlzb_61";
|
|
18
|
+
const ripple = "_ripple_mdlzb_78";
|
|
19
|
+
const style0 = {
|
|
20
|
+
button,
|
|
21
|
+
normal,
|
|
22
|
+
primary,
|
|
23
|
+
enable,
|
|
24
|
+
flex,
|
|
25
|
+
ripple,
|
|
26
|
+
"button-ripple": "_button-ripple_mdlzb_1"
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
button,
|
|
30
|
+
style0 as default,
|
|
31
|
+
enable,
|
|
32
|
+
flex,
|
|
33
|
+
normal,
|
|
34
|
+
primary,
|
|
35
|
+
ripple
|
|
36
|
+
};
|
|
@@ -3,14 +3,24 @@ export interface ElmCheckboxProps {
|
|
|
3
3
|
* The label displayed.
|
|
4
4
|
*/
|
|
5
5
|
label: string;
|
|
6
|
+
/**
|
|
7
|
+
* Whether the checkbox is in a loading state.
|
|
8
|
+
*/
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Whether the checkbox is disabled.
|
|
12
|
+
*/
|
|
13
|
+
disable?: boolean;
|
|
6
14
|
}
|
|
7
|
-
|
|
15
|
+
type __VLS_Props = ElmCheckboxProps;
|
|
8
16
|
type __VLS_PublicProps = {
|
|
9
|
-
|
|
10
|
-
} &
|
|
17
|
+
modelValue?: boolean;
|
|
18
|
+
} & __VLS_Props;
|
|
11
19
|
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
|
-
"update:
|
|
20
|
+
"update:modelValue": (value: boolean) => any;
|
|
13
21
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
|
-
"onUpdate:
|
|
15
|
-
}>, {
|
|
22
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
loading: boolean;
|
|
25
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
16
26
|
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import _sfc_main from "./ElmCheckbox.vue2.mjs";
|
|
2
|
+
import style0 from "./ElmCheckbox.vue3.mjs";
|
|
3
|
+
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
const cssModules = {
|
|
5
|
+
"$style": style0
|
|
6
|
+
};
|
|
7
|
+
const ElmCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
|
|
8
|
+
export {
|
|
9
|
+
ElmCheckbox as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { defineComponent, mergeModels, useModel, createElementBlock, openBlock, normalizeClass, createElementVNode, createVNode, createCommentVNode, normalizeStyle } from "vue";
|
|
2
|
+
import ElmInlineText from "../typography/ElmInlineText.vue.mjs";
|
|
3
|
+
const _hoisted_1 = { style: {
|
|
4
|
+
display: "flex",
|
|
5
|
+
alignItems: "center",
|
|
6
|
+
gap: "0.5rem"
|
|
7
|
+
} };
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "ElmCheckbox",
|
|
10
|
+
props: /* @__PURE__ */ mergeModels({
|
|
11
|
+
label: {},
|
|
12
|
+
loading: { type: Boolean, default: false },
|
|
13
|
+
disable: { type: Boolean }
|
|
14
|
+
}, {
|
|
15
|
+
"modelValue": { type: Boolean, ...{} },
|
|
16
|
+
"modelModifiers": {}
|
|
17
|
+
}),
|
|
18
|
+
emits: ["update:modelValue"],
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const isChecked = useModel(__props, "modelValue");
|
|
22
|
+
function toggleCheck() {
|
|
23
|
+
if (!props.loading && !props.disable) {
|
|
24
|
+
isChecked.value = !isChecked.value;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return (_ctx, _cache) => {
|
|
28
|
+
return openBlock(), createElementBlock("div", {
|
|
29
|
+
class: normalizeClass([
|
|
30
|
+
_ctx.$style.container,
|
|
31
|
+
{
|
|
32
|
+
[_ctx.$style["container--disable"]]: props.disable
|
|
33
|
+
}
|
|
34
|
+
]),
|
|
35
|
+
onClick: toggleCheck
|
|
36
|
+
}, [
|
|
37
|
+
createElementVNode("div", _hoisted_1, [
|
|
38
|
+
(openBlock(), createElementBlock("svg", {
|
|
39
|
+
width: "24",
|
|
40
|
+
height: "24",
|
|
41
|
+
class: normalizeClass(_ctx.$style.checkbox)
|
|
42
|
+
}, [
|
|
43
|
+
createElementVNode("circle", {
|
|
44
|
+
cx: "0",
|
|
45
|
+
cy: "0",
|
|
46
|
+
r: "2",
|
|
47
|
+
class: normalizeClass(_ctx.$style.loading),
|
|
48
|
+
style: normalizeStyle({ opacity: props.loading ? 1 : 0 })
|
|
49
|
+
}, _cache[0] || (_cache[0] = [
|
|
50
|
+
createElementVNode("animate", {
|
|
51
|
+
attributeName: "cx",
|
|
52
|
+
values: "4; 20; 20; 4; 4",
|
|
53
|
+
dur: "1.2s",
|
|
54
|
+
repeatCount: "indefinite",
|
|
55
|
+
keySplines: "0.25 0.1 0.25 1; 0.42 0 0.58 1; 0.25 0.1 0.25 1; 0.42 0 0.58 1",
|
|
56
|
+
calcMode: "spline"
|
|
57
|
+
}, null, -1),
|
|
58
|
+
createElementVNode("animate", {
|
|
59
|
+
attributeName: "cy",
|
|
60
|
+
values: "4; 4; 20; 20; 4",
|
|
61
|
+
dur: "1.2s",
|
|
62
|
+
repeatCount: "indefinite",
|
|
63
|
+
keySplines: "0.25 0.1 0.25 1; 0.42 0 0.58 1; 0.25 0.1 0.25 1; 0.42 0 0.58 1",
|
|
64
|
+
calcMode: "spline"
|
|
65
|
+
}, null, -1)
|
|
66
|
+
]), 6),
|
|
67
|
+
createElementVNode("circle", {
|
|
68
|
+
cx: "20",
|
|
69
|
+
cy: "20",
|
|
70
|
+
r: "2",
|
|
71
|
+
class: normalizeClass(_ctx.$style.loading),
|
|
72
|
+
style: normalizeStyle({ opacity: props.loading ? 1 : 0 })
|
|
73
|
+
}, _cache[1] || (_cache[1] = [
|
|
74
|
+
createElementVNode("animate", {
|
|
75
|
+
attributeName: "cx",
|
|
76
|
+
values: "20; 4; 4; 20; 20",
|
|
77
|
+
dur: "1.2s",
|
|
78
|
+
repeatCount: "indefinite",
|
|
79
|
+
keySplines: "0.25 0.1 0.25 1; 0.42 0 0.58 1; 0.25 0.1 0.25 1; 0.42 0 0.58 1",
|
|
80
|
+
calcMode: "spline"
|
|
81
|
+
}, null, -1),
|
|
82
|
+
createElementVNode("animate", {
|
|
83
|
+
attributeName: "cy",
|
|
84
|
+
values: "20; 20; 4; 4; 20",
|
|
85
|
+
dur: "1.2s",
|
|
86
|
+
repeatCount: "indefinite",
|
|
87
|
+
keySplines: "0.25 0.1 0.25 1; 0.42 0 0.58 1; 0.25 0.1 0.25 1; 0.42 0 0.58 1",
|
|
88
|
+
calcMode: "spline"
|
|
89
|
+
}, null, -1)
|
|
90
|
+
]), 6),
|
|
91
|
+
createElementVNode("rect", {
|
|
92
|
+
x: "4",
|
|
93
|
+
y: "4",
|
|
94
|
+
width: "16",
|
|
95
|
+
height: "16",
|
|
96
|
+
class: normalizeClass([
|
|
97
|
+
_ctx.$style.rect,
|
|
98
|
+
{
|
|
99
|
+
[_ctx.$style["rect--checked"]]: isChecked.value,
|
|
100
|
+
[_ctx.$style["rect--loading"]]: props.loading
|
|
101
|
+
}
|
|
102
|
+
]),
|
|
103
|
+
strokeWidth: "0.8"
|
|
104
|
+
}, null, 2),
|
|
105
|
+
isChecked.value ? (openBlock(), createElementBlock("polyline", {
|
|
106
|
+
key: 0,
|
|
107
|
+
class: normalizeClass(_ctx.$style["check-line"]),
|
|
108
|
+
points: "5,12 10,17 19,8",
|
|
109
|
+
strokeWidth: "1.5",
|
|
110
|
+
fill: "transparent"
|
|
111
|
+
}, null, 2)) : createCommentVNode("", true),
|
|
112
|
+
_cache[2] || (_cache[2] = createElementVNode("line", {
|
|
113
|
+
x1: "0",
|
|
114
|
+
y1: "1",
|
|
115
|
+
x2: "4",
|
|
116
|
+
y2: "1",
|
|
117
|
+
strokeWidth: "2",
|
|
118
|
+
fill: "transparent"
|
|
119
|
+
}, null, -1)),
|
|
120
|
+
_cache[3] || (_cache[3] = createElementVNode("line", {
|
|
121
|
+
x1: "4",
|
|
122
|
+
y1: "0",
|
|
123
|
+
x2: "24",
|
|
124
|
+
y2: "0",
|
|
125
|
+
strokeWidth: "1",
|
|
126
|
+
fill: "transparent"
|
|
127
|
+
}, null, -1)),
|
|
128
|
+
_cache[4] || (_cache[4] = createElementVNode("line", {
|
|
129
|
+
x1: "0",
|
|
130
|
+
y1: "4",
|
|
131
|
+
x2: "0",
|
|
132
|
+
y2: "16",
|
|
133
|
+
strokeWidth: "1",
|
|
134
|
+
fill: "transparent"
|
|
135
|
+
}, null, -1)),
|
|
136
|
+
_cache[5] || (_cache[5] = createElementVNode("line", {
|
|
137
|
+
x1: "0",
|
|
138
|
+
y1: "18",
|
|
139
|
+
x2: "0",
|
|
140
|
+
y2: "20",
|
|
141
|
+
strokeWidth: "1",
|
|
142
|
+
fill: "transparent"
|
|
143
|
+
}, null, -1)),
|
|
144
|
+
_cache[6] || (_cache[6] = createElementVNode("line", {
|
|
145
|
+
x1: "0",
|
|
146
|
+
y1: "24",
|
|
147
|
+
x2: "20",
|
|
148
|
+
y2: "24",
|
|
149
|
+
strokeWidth: "1",
|
|
150
|
+
fill: "transparent"
|
|
151
|
+
}, null, -1)),
|
|
152
|
+
_cache[7] || (_cache[7] = createElementVNode("line", {
|
|
153
|
+
x1: "20",
|
|
154
|
+
y1: "23",
|
|
155
|
+
x2: "24",
|
|
156
|
+
y2: "23",
|
|
157
|
+
strokeWidth: "1.5",
|
|
158
|
+
fill: "transparent"
|
|
159
|
+
}, null, -1)),
|
|
160
|
+
_cache[8] || (_cache[8] = createElementVNode("line", {
|
|
161
|
+
x1: "24",
|
|
162
|
+
y1: "4",
|
|
163
|
+
x2: "24",
|
|
164
|
+
y2: "20",
|
|
165
|
+
style: { strokeWidth: 1 },
|
|
166
|
+
fill: "transparent"
|
|
167
|
+
}, null, -1))
|
|
168
|
+
], 2)),
|
|
169
|
+
createVNode(ElmInlineText, { text: _ctx.label }, null, 8, ["text"])
|
|
170
|
+
])
|
|
171
|
+
], 2);
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
export {
|
|
176
|
+
_sfc_main as default
|
|
177
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
(function() {
|
|
2
|
+
"use strict";
|
|
3
|
+
try {
|
|
4
|
+
if (typeof document != "undefined") {
|
|
5
|
+
var elementStyle = document.createElement("style");
|
|
6
|
+
elementStyle.appendChild(document.createTextNode("._container_101ok_1{width:-moz-fit-content;width:fit-content;font-family:sans-serif;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;transition:opacity .2s}._container_101ok_1:hover{opacity:.8}._container--disable_101ok_11{opacity:.45;cursor:not-allowed}._container--disable_101ok_11:hover{opacity:.45}._checkbox_101ok_19{stroke:#000c;fill:transparent}[data-theme=dark] ._checkbox_101ok_19{stroke:#fffc}._rect_101ok_27{transition:all .2s}._rect--loading_101ok_30{opacity:.3}._rect--checked_101ok_33{fill:#000c}[data-theme=dark] ._rect--checked_101ok_33{fill:#fffc}._loading_101ok_40{transition:opacity .2s;fill:#000000b3}[data-theme=dark] ._loading_101ok_40{fill:#ffffffb3}@keyframes _elmethis-checkbox-check-line_101ok_1{0%{stroke-dashoffset:100%}to{stroke-dashoffset:0%}}._check-line_101ok_56{stroke-dasharray:100%;animation-name:_elmethis-checkbox-check-line_101ok_1;animation-duration:.2s;animation-timing-function:ease-in-out;animation-delay:.1s;animation-fill-mode:both;transform-origin:center;stroke:#ffffffe6}[data-theme=dark] ._check-line_101ok_56{stroke:#000000e6}"));
|
|
7
|
+
document.head.appendChild(elementStyle);
|
|
8
|
+
}
|
|
9
|
+
} catch (e) {
|
|
10
|
+
console.error("vite-plugin-css-injected-by-js", e);
|
|
11
|
+
}
|
|
12
|
+
})();
|
|
13
|
+
const container = "_container_101ok_1";
|
|
14
|
+
const checkbox = "_checkbox_101ok_19";
|
|
15
|
+
const rect = "_rect_101ok_27";
|
|
16
|
+
const loading = "_loading_101ok_40";
|
|
17
|
+
const style0 = {
|
|
18
|
+
container,
|
|
19
|
+
"container--disable": "_container--disable_101ok_11",
|
|
20
|
+
checkbox,
|
|
21
|
+
rect,
|
|
22
|
+
"rect--loading": "_rect--loading_101ok_30",
|
|
23
|
+
"rect--checked": "_rect--checked_101ok_33",
|
|
24
|
+
loading,
|
|
25
|
+
"check-line": "_check-line_101ok_56",
|
|
26
|
+
"elmethis-checkbox-check-line": "_elmethis-checkbox-check-line_101ok_1"
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
checkbox,
|
|
30
|
+
container,
|
|
31
|
+
style0 as default,
|
|
32
|
+
loading,
|
|
33
|
+
rect
|
|
34
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/vue3';
|
|
2
|
-
import { default as
|
|
3
|
-
declare const meta: Meta<typeof
|
|
2
|
+
import { default as ElmSwitch } from './ElmSwitch.vue';
|
|
3
|
+
declare const meta: Meta<typeof ElmSwitch>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
6
|
export declare const Primary: Story;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Property } from 'csstype';
|
|
2
|
+
export interface ElmSwitchProps {
|
|
3
|
+
/**
|
|
4
|
+
* The color of the switch when checked.
|
|
5
|
+
*/
|
|
6
|
+
color: string;
|
|
7
|
+
/**
|
|
8
|
+
* The size of the switch.
|
|
9
|
+
*/
|
|
10
|
+
size: Property.Width;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the switch is disabled.
|
|
13
|
+
*/
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
type __VLS_Props = ElmSwitchProps;
|
|
17
|
+
declare const __VLS_defaults: {
|
|
18
|
+
modelValue: boolean;
|
|
19
|
+
};
|
|
20
|
+
type __VLS_PublicProps = {
|
|
21
|
+
modelValue?: typeof __VLS_defaults['modelValue'];
|
|
22
|
+
} & __VLS_Props;
|
|
23
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
24
|
+
"update:modelValue": (value: boolean) => any;
|
|
25
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
26
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
27
|
+
}>, {
|
|
28
|
+
color: string;
|
|
29
|
+
size: Property.Width;
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import _sfc_main from "./ElmSwitch.vue2.mjs";
|
|
2
|
+
import style0 from "./ElmSwitch.vue3.mjs";
|
|
3
|
+
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
const cssModules = {
|
|
5
|
+
"$style": style0
|
|
6
|
+
};
|
|
7
|
+
const ElmSwitch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
|
|
8
|
+
export {
|
|
9
|
+
ElmSwitch as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { defineComponent, mergeModels, useModel, createElementBlock, openBlock, normalizeStyle, createElementVNode, normalizeClass } from "vue";
|
|
2
|
+
const _hoisted_1 = ["checked", "disabled"];
|
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "ElmSwitch",
|
|
5
|
+
props: /* @__PURE__ */ mergeModels({
|
|
6
|
+
color: { default: "#6987b8" },
|
|
7
|
+
size: { default: "18px" },
|
|
8
|
+
disabled: { type: Boolean, default: false }
|
|
9
|
+
}, {
|
|
10
|
+
"modelValue": { default: false },
|
|
11
|
+
"modelModifiers": {}
|
|
12
|
+
}),
|
|
13
|
+
emits: ["update:modelValue"],
|
|
14
|
+
setup(__props) {
|
|
15
|
+
const props = __props;
|
|
16
|
+
const checked = useModel(__props, "modelValue");
|
|
17
|
+
const handleClick = () => {
|
|
18
|
+
if (!props.disabled) checked.value = !checked.value;
|
|
19
|
+
};
|
|
20
|
+
return (_ctx, _cache) => {
|
|
21
|
+
return openBlock(), createElementBlock("div", {
|
|
22
|
+
onClick: handleClick,
|
|
23
|
+
style: normalizeStyle({
|
|
24
|
+
"--color": _ctx.color,
|
|
25
|
+
"--padding": "2px",
|
|
26
|
+
"--size": _ctx.size,
|
|
27
|
+
"--width": "calc(var(--size) * 2 + var(--padding) * 2)"
|
|
28
|
+
})
|
|
29
|
+
}, [
|
|
30
|
+
createElementVNode("input", {
|
|
31
|
+
class: normalizeClass([_ctx.$style.switch]),
|
|
32
|
+
type: "checkbox",
|
|
33
|
+
checked: checked.value,
|
|
34
|
+
disabled: _ctx.disabled
|
|
35
|
+
}, null, 10, _hoisted_1),
|
|
36
|
+
createElementVNode("div", {
|
|
37
|
+
class: normalizeClass([
|
|
38
|
+
_ctx.$style.bar,
|
|
39
|
+
{
|
|
40
|
+
[_ctx.$style["bar--checked"]]: checked.value,
|
|
41
|
+
[_ctx.$style["bar--disabled"]]: _ctx.disabled
|
|
42
|
+
}
|
|
43
|
+
])
|
|
44
|
+
}, [
|
|
45
|
+
createElementVNode("div", {
|
|
46
|
+
class: normalizeClass([
|
|
47
|
+
_ctx.$style.circle,
|
|
48
|
+
{
|
|
49
|
+
[_ctx.$style["circle--checked"]]: checked.value,
|
|
50
|
+
[_ctx.$style["circle--disabled"]]: _ctx.disabled
|
|
51
|
+
}
|
|
52
|
+
])
|
|
53
|
+
}, null, 2)
|
|
54
|
+
], 2)
|
|
55
|
+
], 4);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
export {
|
|
60
|
+
_sfc_main as default
|
|
61
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
(function() {
|
|
2
|
+
"use strict";
|
|
3
|
+
try {
|
|
4
|
+
if (typeof document != "undefined") {
|
|
5
|
+
var elementStyle = document.createElement("style");
|
|
6
|
+
elementStyle.appendChild(document.createTextNode("._switch_y5v18_1{display:none}._bar_y5v18_5{z-index:0;padding:var(--padding);width:var(--width);height:var(--size);border-radius:calc((var(--size) + var(--padding)) / 2);position:relative;cursor:pointer;box-shadow:0 0 2px #0000001a;transition:opacity .3s,background-color .3s;background-color:#80808040}._bar--checked_y5v18_17{background-color:var(--color)}._bar--disabled_y5v18_20{cursor:not-allowed}._circle_y5v18_24{z-index:1;width:var(--size);height:var(--size);border-radius:50%;position:absolute;top:var(--padding);left:var(--padding);transition:transform .3s,opacity .3s,background-color .3s;background-color:#ffffffe6}._circle--checked_y5v18_35{transform:translate(calc(var(--width) - var(--size)))}._circle--disabled_y5v18_38{opacity:.5;background-color:gray}._circle_y5v18_24:hover{opacity:.8}"));
|
|
7
|
+
document.head.appendChild(elementStyle);
|
|
8
|
+
}
|
|
9
|
+
} catch (e) {
|
|
10
|
+
console.error("vite-plugin-css-injected-by-js", e);
|
|
11
|
+
}
|
|
12
|
+
})();
|
|
13
|
+
const bar = "_bar_y5v18_5";
|
|
14
|
+
const circle = "_circle_y5v18_24";
|
|
15
|
+
const style0 = {
|
|
16
|
+
"switch": "_switch_y5v18_1",
|
|
17
|
+
bar,
|
|
18
|
+
"bar--checked": "_bar--checked_y5v18_17",
|
|
19
|
+
"bar--disabled": "_bar--disabled_y5v18_20",
|
|
20
|
+
circle,
|
|
21
|
+
"circle--checked": "_circle--checked_y5v18_35",
|
|
22
|
+
"circle--disabled": "_circle--disabled_y5v18_38"
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
bar,
|
|
26
|
+
circle,
|
|
27
|
+
style0 as default
|
|
28
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { VNode, FunctionalComponent } from 'vue';
|
|
2
|
+
export interface ElmTextFieldProps {
|
|
3
|
+
label: string;
|
|
4
|
+
maxLength?: number;
|
|
5
|
+
suffix?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
icon?: VNode | FunctionalComponent;
|
|
10
|
+
isPassword?: boolean;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
}
|
|
13
|
+
type __VLS_Props = ElmTextFieldProps;
|
|
14
|
+
declare const __VLS_defaults: {
|
|
15
|
+
modelValue: string;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_PublicProps = {
|
|
18
|
+
modelValue?: typeof __VLS_defaults['modelValue'];
|
|
19
|
+
} & __VLS_Props;
|
|
20
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
21
|
+
"update:modelValue": (value: string) => any;
|
|
22
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
23
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
24
|
+
}>, {
|
|
25
|
+
required: boolean;
|
|
26
|
+
loading: boolean;
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
isPassword: boolean;
|
|
29
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import _sfc_main from "./ElmTextField.vue2.mjs";
|
|
2
|
+
import style0 from "./ElmTextField.vue3.mjs";
|
|
3
|
+
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
const cssModules = {
|
|
5
|
+
"$style": style0
|
|
6
|
+
};
|
|
7
|
+
const ElmTextField = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
|
|
8
|
+
export {
|
|
9
|
+
ElmTextField as default
|
|
10
|
+
};
|