origam 2.2.1 → 2.3.0
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/CHANGELOG.md +224 -0
- package/README.md +22 -0
- package/dist/src/assets/css/tokens/dark.css +318 -0
- package/dist/src/assets/css/tokens/light.css +159 -0
- package/dist/src/assets/locales/index.js +2 -2
- package/dist/src/assets/scss/tokens/_dark.scss +159 -0
- package/dist/src/assets/scss/tokens/_light.scss +159 -0
- package/dist/src/components/Bracket/OrigamBracket.vue +530 -0
- package/dist/src/components/Bracket/OrigamBracketCompetitor.vue +210 -0
- package/dist/src/components/Bracket/OrigamBracketMatch.vue +288 -0
- package/dist/src/components/Bracket/OrigamBracketRound.vue +150 -0
- package/dist/src/components/Bracket/index.cjs +34 -0
- package/dist/src/components/Bracket/index.d.ts +4 -0
- package/dist/src/components/Bracket/index.js +4 -0
- package/dist/src/components/ClientOnly/OrigamClientOnly.vue +28 -0
- package/dist/src/components/ClientOnly/index.cjs +13 -0
- package/dist/src/components/ClientOnly/index.d.ts +1 -0
- package/dist/src/components/ClientOnly/index.js +1 -0
- package/dist/src/components/Code/OrigamCode.vue +449 -0
- package/dist/src/components/Code/index.cjs +13 -0
- package/dist/src/components/Code/index.d.ts +1 -0
- package/dist/src/components/Code/index.js +1 -0
- package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +1 -0
- package/dist/src/components/CommandPalette/OrigamCommandPalette.vue +614 -0
- package/dist/src/components/CommandPalette/index.cjs +13 -0
- package/dist/src/components/CommandPalette/index.d.ts +1 -0
- package/dist/src/components/CommandPalette/index.js +1 -0
- package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +1 -0
- package/dist/src/components/Parallax/OrigamParallax.vue +65 -34
- package/dist/src/components/Parallax/OrigamParallaxLayer.vue +119 -0
- package/dist/src/components/Parallax/index.cjs +7 -0
- package/dist/src/components/Parallax/index.d.ts +1 -0
- package/dist/src/components/Parallax/index.js +1 -0
- package/dist/src/components/PasswordField/OrigamPasswordField.vue +1 -0
- package/dist/src/components/Select/OrigamSelect.vue +1 -0
- package/dist/src/components/SnackbarStack/OrigamSnackbarStack.vue +457 -0
- package/dist/src/components/SnackbarStack/index.cjs +13 -0
- package/dist/src/components/SnackbarStack/index.d.ts +1 -0
- package/dist/src/components/SnackbarStack/index.js +1 -0
- package/dist/src/components/Tabs/OrigamTab.vue +263 -0
- package/dist/src/components/Tabs/OrigamTabPanel.vue +112 -0
- package/dist/src/components/Tabs/OrigamTabPanels.vue +139 -0
- package/dist/src/components/Tabs/OrigamTabs.vue +242 -0
- package/dist/src/components/Tabs/index.cjs +34 -0
- package/dist/src/components/Tabs/index.d.ts +4 -0
- package/dist/src/components/Tabs/index.js +4 -0
- package/dist/src/components/TextField/OrigamTextField.vue +75 -5
- package/dist/src/components/TextareaField/OrigamRichToolbar.vue +284 -0
- package/dist/src/components/TextareaField/OrigamTextareaField.vue +192 -5
- package/dist/src/components/TextareaField/index.cjs +7 -0
- package/dist/src/components/TextareaField/index.d.ts +1 -0
- package/dist/src/components/TextareaField/index.js +1 -0
- package/dist/src/components/index.cjs +66 -0
- package/dist/src/components/index.d.ts +6 -0
- package/dist/src/components/index.js +6 -0
- package/dist/src/composables/Code/code.composable.cjs +98 -0
- package/dist/src/composables/Code/code.composable.d.ts +10 -0
- package/dist/src/composables/Code/code.composable.js +82 -0
- package/dist/src/composables/CommandPalette/command.composable.cjs +53 -0
- package/dist/src/composables/CommandPalette/command.composable.d.ts +37 -0
- package/dist/src/composables/CommandPalette/command.composable.js +46 -0
- package/dist/src/composables/Commons/virtual.composable.cjs +1 -0
- package/dist/src/composables/Commons/virtual.composable.js +1 -0
- package/dist/src/composables/CssSupport/cssSupport.composable.cjs +12 -0
- package/dist/src/composables/CssSupport/cssSupport.composable.d.ts +25 -0
- package/dist/src/composables/CssSupport/cssSupport.composable.js +10 -1
- package/dist/src/composables/DataTable/headers.composable.d.ts +36 -36
- package/dist/src/composables/Mask/index.cjs +16 -0
- package/dist/src/composables/Mask/index.d.ts +1 -0
- package/dist/src/composables/Mask/index.js +1 -0
- package/dist/src/composables/Mask/mask.composable.cjs +57 -0
- package/dist/src/composables/Mask/mask.composable.d.ts +39 -0
- package/dist/src/composables/Mask/mask.composable.js +51 -0
- package/dist/src/composables/Parallax/parallax.composable.cjs +232 -0
- package/dist/src/composables/Parallax/parallax.composable.d.ts +60 -0
- package/dist/src/composables/Parallax/parallax.composable.js +219 -0
- package/dist/src/composables/Responsive/aspect.composable.cjs +6 -1
- package/dist/src/composables/Responsive/aspect.composable.d.ts +10 -0
- package/dist/src/composables/Responsive/aspect.composable.js +6 -1
- package/dist/src/composables/SnackbarStack/snackbar-stack.composable.cjs +102 -0
- package/dist/src/composables/SnackbarStack/snackbar-stack.composable.d.ts +58 -0
- package/dist/src/composables/SnackbarStack/snackbar-stack.composable.js +92 -0
- package/dist/src/composables/Textarea/textarea-rich.composable.cjs +263 -0
- package/dist/src/composables/Textarea/textarea-rich.composable.d.ts +41 -0
- package/dist/src/composables/Textarea/textarea-rich.composable.js +257 -0
- package/dist/src/composables/index.cjs +66 -0
- package/dist/src/composables/index.d.ts +6 -0
- package/dist/src/composables/index.js +6 -0
- package/dist/src/consts/Bracket/bracket.const.cjs +12 -0
- package/dist/src/consts/Bracket/bracket.const.d.ts +34 -0
- package/dist/src/consts/Bracket/bracket.const.js +15 -0
- package/dist/src/consts/Code/code.const.cjs +26 -0
- package/dist/src/consts/Code/code.const.d.ts +40 -0
- package/dist/src/consts/Code/code.const.js +35 -0
- package/dist/src/consts/CommandPalette/command-palette.const.cjs +10 -0
- package/dist/src/consts/CommandPalette/command-palette.const.d.ts +16 -0
- package/dist/src/consts/CommandPalette/command-palette.const.js +7 -0
- package/dist/src/consts/Mask/built-in-patterns.const.cjs +66 -0
- package/dist/src/consts/Mask/built-in-patterns.const.d.ts +20 -0
- package/dist/src/consts/Mask/built-in-patterns.const.js +60 -0
- package/dist/src/consts/Parallax/parallax-layer.const.cjs +7 -0
- package/dist/src/consts/Parallax/parallax-layer.const.d.ts +3 -0
- package/dist/src/consts/Parallax/parallax-layer.const.js +1 -0
- package/dist/src/consts/SnackbarStack/snackbar-stack.const.cjs +12 -0
- package/dist/src/consts/SnackbarStack/snackbar-stack.const.d.ts +33 -0
- package/dist/src/consts/SnackbarStack/snackbar-stack.const.js +18 -0
- package/dist/src/consts/Tabs/tabs.const.cjs +9 -0
- package/dist/src/consts/Tabs/tabs.const.d.ts +23 -0
- package/dist/src/consts/Tabs/tabs.const.js +3 -0
- package/dist/src/consts/Textarea/textarea.const.cjs +28 -0
- package/dist/src/consts/Textarea/textarea.const.d.ts +38 -0
- package/dist/src/consts/Textarea/textarea.const.js +65 -0
- package/dist/src/consts/Theme/theme.const.cjs +15 -0
- package/dist/src/consts/Theme/theme.const.d.ts +9 -0
- package/dist/src/consts/Theme/theme.const.js +9 -0
- package/dist/src/consts/index.cjs +99 -0
- package/dist/src/consts/index.d.ts +9 -0
- package/dist/src/consts/index.js +9 -0
- package/dist/src/enums/Bracket/bracket-match-status.enum.cjs +13 -0
- package/dist/src/enums/Bracket/bracket-match-status.enum.d.ts +6 -0
- package/dist/src/enums/Bracket/bracket-match-status.enum.js +7 -0
- package/dist/src/enums/Bracket/bracket-variant.enum.cjs +12 -0
- package/dist/src/enums/Bracket/bracket-variant.enum.d.ts +5 -0
- package/dist/src/enums/Bracket/bracket-variant.enum.js +6 -0
- package/dist/src/enums/Code/code-lang.enum.cjs +23 -0
- package/dist/src/enums/Code/code-lang.enum.d.ts +25 -0
- package/dist/src/enums/Code/code-lang.enum.js +17 -0
- package/dist/src/enums/Code/code-theme.enum.cjs +12 -0
- package/dist/src/enums/Code/code-theme.enum.d.ts +12 -0
- package/dist/src/enums/Code/code-theme.enum.js +6 -0
- package/dist/src/enums/Mask/mask.enum.cjs +28 -0
- package/dist/src/enums/Mask/mask.enum.d.ts +36 -0
- package/dist/src/enums/Mask/mask.enum.js +22 -0
- package/dist/src/enums/Parallax/parallax-direction.enum.cjs +12 -0
- package/dist/src/enums/Parallax/parallax-direction.enum.d.ts +5 -0
- package/dist/src/enums/Parallax/parallax-direction.enum.js +6 -0
- package/dist/src/enums/Parallax/parallax-easing.enum.cjs +12 -0
- package/dist/src/enums/Parallax/parallax-easing.enum.d.ts +5 -0
- package/dist/src/enums/Parallax/parallax-easing.enum.js +6 -0
- package/dist/src/enums/Tabs/tab-variant.enum.cjs +12 -0
- package/dist/src/enums/Tabs/tab-variant.enum.d.ts +5 -0
- package/dist/src/enums/Tabs/tab-variant.enum.js +6 -0
- package/dist/src/enums/Textarea/textarea-mode.enum.cjs +11 -0
- package/dist/src/enums/Textarea/textarea-mode.enum.d.ts +13 -0
- package/dist/src/enums/Textarea/textarea-mode.enum.js +5 -0
- package/dist/src/enums/Textarea/textarea-output.enum.cjs +11 -0
- package/dist/src/enums/Textarea/textarea-output.enum.d.ts +14 -0
- package/dist/src/enums/Textarea/textarea-output.enum.js +5 -0
- package/dist/src/enums/Textarea/textarea-toolbar-command.enum.cjs +21 -0
- package/dist/src/enums/Textarea/textarea-toolbar-command.enum.d.ts +20 -0
- package/dist/src/enums/Textarea/textarea-toolbar-command.enum.js +15 -0
- package/dist/src/enums/Textarea/textarea-toolbar-position.enum.cjs +12 -0
- package/dist/src/enums/Textarea/textarea-toolbar-position.enum.d.ts +10 -0
- package/dist/src/enums/Textarea/textarea-toolbar-position.enum.js +6 -0
- package/dist/src/enums/index.cjs +132 -0
- package/dist/src/enums/index.d.ts +12 -0
- package/dist/src/enums/index.js +12 -0
- package/dist/src/interfaces/Bracket/bracket-competitor-component.interface.cjs +1 -0
- package/dist/src/interfaces/Bracket/bracket-competitor-component.interface.d.ts +53 -0
- package/dist/src/interfaces/Bracket/bracket-competitor-component.interface.js +0 -0
- package/dist/src/interfaces/Bracket/bracket-competitor.interface.cjs +1 -0
- package/dist/src/interfaces/Bracket/bracket-competitor.interface.d.ts +25 -0
- package/dist/src/interfaces/Bracket/bracket-competitor.interface.js +0 -0
- package/dist/src/interfaces/Bracket/bracket-match-component.interface.cjs +1 -0
- package/dist/src/interfaces/Bracket/bracket-match-component.interface.d.ts +45 -0
- package/dist/src/interfaces/Bracket/bracket-match-component.interface.js +0 -0
- package/dist/src/interfaces/Bracket/bracket-match.interface.cjs +1 -0
- package/dist/src/interfaces/Bracket/bracket-match.interface.d.ts +51 -0
- package/dist/src/interfaces/Bracket/bracket-match.interface.js +0 -0
- package/dist/src/interfaces/Bracket/bracket-round-component.interface.cjs +1 -0
- package/dist/src/interfaces/Bracket/bracket-round-component.interface.d.ts +26 -0
- package/dist/src/interfaces/Bracket/bracket-round-component.interface.js +0 -0
- package/dist/src/interfaces/Bracket/bracket-round.interface.cjs +1 -0
- package/dist/src/interfaces/Bracket/bracket-round.interface.d.ts +27 -0
- package/dist/src/interfaces/Bracket/bracket-round.interface.js +0 -0
- package/dist/src/interfaces/Bracket/bracket.interface.cjs +1 -0
- package/dist/src/interfaces/Bracket/bracket.interface.d.ts +71 -0
- package/dist/src/interfaces/Bracket/bracket.interface.js +0 -0
- package/dist/src/interfaces/Code/code.interface.cjs +1 -0
- package/dist/src/interfaces/Code/code.interface.d.ts +99 -0
- package/dist/src/interfaces/Code/code.interface.js +0 -0
- package/dist/src/interfaces/CommandPalette/command-palette.interface.cjs +1 -0
- package/dist/src/interfaces/CommandPalette/command-palette.interface.d.ts +57 -0
- package/dist/src/interfaces/CommandPalette/command-palette.interface.js +0 -0
- package/dist/src/interfaces/CommandPalette/command.interface.cjs +1 -0
- package/dist/src/interfaces/CommandPalette/command.interface.d.ts +51 -0
- package/dist/src/interfaces/CommandPalette/command.interface.js +0 -0
- package/dist/src/interfaces/Mask/mask-options.interface.cjs +1 -0
- package/dist/src/interfaces/Mask/mask-options.interface.d.ts +48 -0
- package/dist/src/interfaces/Mask/mask-options.interface.js +0 -0
- package/dist/src/interfaces/Nuxt/nuxt-module.interface.cjs +1 -0
- package/dist/src/interfaces/Nuxt/nuxt-module.interface.d.ts +73 -0
- package/dist/src/interfaces/Nuxt/nuxt-module.interface.js +0 -0
- package/dist/src/interfaces/Parallax/parallax-layer.interface.cjs +1 -0
- package/dist/src/interfaces/Parallax/parallax-layer.interface.d.ts +39 -0
- package/dist/src/interfaces/Parallax/parallax-layer.interface.js +0 -0
- package/dist/src/interfaces/Parallax/parallax.interface.d.ts +83 -3
- package/dist/src/interfaces/SnackbarStack/snackbar-stack-item.interface.cjs +1 -0
- package/dist/src/interfaces/SnackbarStack/snackbar-stack-item.interface.d.ts +60 -0
- package/dist/src/interfaces/SnackbarStack/snackbar-stack-item.interface.js +0 -0
- package/dist/src/interfaces/SnackbarStack/snackbar-stack.interface.cjs +1 -0
- package/dist/src/interfaces/SnackbarStack/snackbar-stack.interface.d.ts +60 -0
- package/dist/src/interfaces/SnackbarStack/snackbar-stack.interface.js +0 -0
- package/dist/src/interfaces/Tabs/tab-panel.interface.cjs +1 -0
- package/dist/src/interfaces/Tabs/tab-panel.interface.d.ts +12 -0
- package/dist/src/interfaces/Tabs/tab-panel.interface.js +0 -0
- package/dist/src/interfaces/Tabs/tab-panels.interface.cjs +1 -0
- package/dist/src/interfaces/Tabs/tab-panels.interface.d.ts +28 -0
- package/dist/src/interfaces/Tabs/tab-panels.interface.js +0 -0
- package/dist/src/interfaces/Tabs/tab.interface.cjs +1 -0
- package/dist/src/interfaces/Tabs/tab.interface.d.ts +18 -0
- package/dist/src/interfaces/Tabs/tab.interface.js +0 -0
- package/dist/src/interfaces/Tabs/tabs.interface.cjs +1 -0
- package/dist/src/interfaces/Tabs/tabs.interface.d.ts +26 -0
- package/dist/src/interfaces/Tabs/tabs.interface.js +0 -0
- package/dist/src/interfaces/TextField/text-field.interface.d.ts +21 -1
- package/dist/src/interfaces/Textarea/textarea-rich.interface.cjs +1 -0
- package/dist/src/interfaces/Textarea/textarea-rich.interface.d.ts +41 -0
- package/dist/src/interfaces/Textarea/textarea-rich.interface.js +0 -0
- package/dist/src/interfaces/Textarea/textarea-toolbar.interface.cjs +1 -0
- package/dist/src/interfaces/Textarea/textarea-toolbar.interface.d.ts +31 -0
- package/dist/src/interfaces/Textarea/textarea-toolbar.interface.js +0 -0
- package/dist/src/interfaces/TextareaField/textarea-field.interface.d.ts +38 -1
- package/dist/src/interfaces/index.cjs +231 -0
- package/dist/src/interfaces/index.d.ts +21 -0
- package/dist/src/interfaces/index.js +21 -0
- package/dist/src/nuxt/index.cjs +13 -0
- package/dist/src/nuxt/index.d.ts +2 -0
- package/dist/src/nuxt/index.js +1 -0
- package/dist/src/nuxt/module.cjs +74 -0
- package/dist/src/nuxt/module.d.ts +31 -0
- package/dist/src/nuxt/module.js +68 -0
- package/dist/src/nuxt/plugin.client.cjs +44 -0
- package/dist/src/nuxt/plugin.client.d.ts +2 -0
- package/dist/src/nuxt/plugin.client.js +36 -0
- package/dist/src/nuxt/plugin.server.cjs +51 -0
- package/dist/src/nuxt/plugin.server.d.ts +2 -0
- package/dist/src/nuxt/plugin.server.js +45 -0
- package/dist/src/types/Bracket/bracket-direction.type.cjs +1 -0
- package/dist/src/types/Bracket/bracket-direction.type.d.ts +13 -0
- package/dist/src/types/Bracket/bracket-direction.type.js +0 -0
- package/dist/src/types/Bracket/bracket-match-status.type.cjs +1 -0
- package/dist/src/types/Bracket/bracket-match-status.type.d.ts +2 -0
- package/dist/src/types/Bracket/bracket-match-status.type.js +0 -0
- package/dist/src/types/Bracket/bracket-round-side.type.cjs +1 -0
- package/dist/src/types/Bracket/bracket-round-side.type.d.ts +12 -0
- package/dist/src/types/Bracket/bracket-round-side.type.js +0 -0
- package/dist/src/types/Bracket/bracket-variant.type.cjs +1 -0
- package/dist/src/types/Bracket/bracket-variant.type.d.ts +2 -0
- package/dist/src/types/Bracket/bracket-variant.type.js +0 -0
- package/dist/src/types/Code/code-lang.type.cjs +1 -0
- package/dist/src/types/Code/code-lang.type.d.ts +2 -0
- package/dist/src/types/Code/code-lang.type.js +0 -0
- package/dist/src/types/Code/code-theme.type.cjs +1 -0
- package/dist/src/types/Code/code-theme.type.d.ts +2 -0
- package/dist/src/types/Code/code-theme.type.js +0 -0
- package/dist/src/types/CommandPalette/command-palette-hotkey.type.cjs +1 -0
- package/dist/src/types/CommandPalette/command-palette-hotkey.type.d.ts +5 -0
- package/dist/src/types/CommandPalette/command-palette-hotkey.type.js +0 -0
- package/dist/src/types/Mask/built-in-pattern.type.cjs +1 -0
- package/dist/src/types/Mask/built-in-pattern.type.d.ts +7 -0
- package/dist/src/types/Mask/built-in-pattern.type.js +0 -0
- package/dist/src/types/Mask/mask.type.cjs +1 -0
- package/dist/src/types/Mask/mask.type.d.ts +19 -0
- package/dist/src/types/Mask/mask.type.js +0 -0
- package/dist/src/types/Mask/pattern-validator.type.cjs +1 -0
- package/dist/src/types/Mask/pattern-validator.type.d.ts +16 -0
- package/dist/src/types/Mask/pattern-validator.type.js +0 -0
- package/dist/src/types/Parallax/parallax-direction.type.cjs +1 -0
- package/dist/src/types/Parallax/parallax-direction.type.d.ts +2 -0
- package/dist/src/types/Parallax/parallax-direction.type.js +0 -0
- package/dist/src/types/Parallax/parallax-easing.type.cjs +1 -0
- package/dist/src/types/Parallax/parallax-easing.type.d.ts +2 -0
- package/dist/src/types/Parallax/parallax-easing.type.js +0 -0
- package/dist/src/types/SnackbarStack/snackbar-stack-direction.type.cjs +1 -0
- package/dist/src/types/SnackbarStack/snackbar-stack-direction.type.d.ts +11 -0
- package/dist/src/types/SnackbarStack/snackbar-stack-direction.type.js +0 -0
- package/dist/src/types/SnackbarStack/snackbar-stack-location.type.cjs +1 -0
- package/dist/src/types/SnackbarStack/snackbar-stack-location.type.d.ts +9 -0
- package/dist/src/types/SnackbarStack/snackbar-stack-location.type.js +0 -0
- package/dist/src/types/SnackbarStack/snackbar-stack.type.cjs +1 -0
- package/dist/src/types/SnackbarStack/snackbar-stack.type.d.ts +2 -0
- package/dist/src/types/SnackbarStack/snackbar-stack.type.js +0 -0
- package/dist/src/types/Tabs/tab-panel.type.cjs +1 -0
- package/dist/src/types/Tabs/tab-panel.type.d.ts +2 -0
- package/dist/src/types/Tabs/tab-panel.type.js +0 -0
- package/dist/src/types/Tabs/tab-panels.type.cjs +1 -0
- package/dist/src/types/Tabs/tab-panels.type.d.ts +2 -0
- package/dist/src/types/Tabs/tab-panels.type.js +0 -0
- package/dist/src/types/Tabs/tab-variant.type.cjs +1 -0
- package/dist/src/types/Tabs/tab-variant.type.d.ts +2 -0
- package/dist/src/types/Tabs/tab-variant.type.js +0 -0
- package/dist/src/types/Tabs/tab.type.cjs +1 -0
- package/dist/src/types/Tabs/tab.type.d.ts +2 -0
- package/dist/src/types/Tabs/tab.type.js +0 -0
- package/dist/src/types/Tabs/tabs.type.cjs +1 -0
- package/dist/src/types/Tabs/tabs.type.d.ts +2 -0
- package/dist/src/types/Tabs/tabs.type.js +0 -0
- package/dist/src/types/Textarea/textarea-mode.type.cjs +1 -0
- package/dist/src/types/Textarea/textarea-mode.type.d.ts +2 -0
- package/dist/src/types/Textarea/textarea-mode.type.js +0 -0
- package/dist/src/types/Textarea/textarea-output.type.cjs +1 -0
- package/dist/src/types/Textarea/textarea-output.type.d.ts +2 -0
- package/dist/src/types/Textarea/textarea-output.type.js +0 -0
- package/dist/src/types/Textarea/textarea-toolbar-command.type.cjs +1 -0
- package/dist/src/types/Textarea/textarea-toolbar-command.type.d.ts +2 -0
- package/dist/src/types/Textarea/textarea-toolbar-command.type.js +0 -0
- package/dist/src/types/Textarea/textarea-toolbar-position.type.cjs +1 -0
- package/dist/src/types/Textarea/textarea-toolbar-position.type.d.ts +2 -0
- package/dist/src/types/Textarea/textarea-toolbar-position.type.js +0 -0
- package/dist/src/types/index.cjs +264 -0
- package/dist/src/types/index.d.ts +24 -0
- package/dist/src/types/index.js +24 -0
- package/dist/src/types/tokens.type.d.ts +1 -1
- package/dist/src/utils/Code/parse-highlight-lines.util.cjs +34 -0
- package/dist/src/utils/Code/parse-highlight-lines.util.d.ts +24 -0
- package/dist/src/utils/Code/parse-highlight-lines.util.js +28 -0
- package/dist/src/utils/CommandPalette/fuzzy-match.util.cjs +84 -0
- package/dist/src/utils/CommandPalette/fuzzy-match.util.d.ts +51 -0
- package/dist/src/utils/CommandPalette/fuzzy-match.util.js +62 -0
- package/dist/src/utils/Mask/apply-mask.util.cjs +120 -0
- package/dist/src/utils/Mask/apply-mask.util.d.ts +13 -0
- package/dist/src/utils/Mask/apply-mask.util.js +91 -0
- package/dist/src/utils/Mask/index.cjs +38 -0
- package/dist/src/utils/Mask/index.d.ts +3 -0
- package/dist/src/utils/Mask/index.js +3 -0
- package/dist/src/utils/Mask/resolve-mask-config.util.cjs +31 -0
- package/dist/src/utils/Mask/resolve-mask-config.util.d.ts +15 -0
- package/dist/src/utils/Mask/resolve-mask-config.util.js +21 -0
- package/dist/src/utils/Mask/validate-pattern.util.cjs +92 -0
- package/dist/src/utils/Mask/validate-pattern.util.d.ts +41 -0
- package/dist/src/utils/Mask/validate-pattern.util.js +81 -0
- package/dist/src/utils/Textarea/html-to-markdown.util.cjs +85 -0
- package/dist/src/utils/Textarea/html-to-markdown.util.d.ts +21 -0
- package/dist/src/utils/Textarea/html-to-markdown.util.js +78 -0
- package/dist/src/utils/Textarea/sanitize-html.util.cjs +82 -0
- package/dist/src/utils/Textarea/sanitize-html.util.d.ts +17 -0
- package/dist/src/utils/Textarea/sanitize-html.util.js +83 -0
- package/dist/src/utils/index.cjs +77 -0
- package/dist/src/utils/index.d.ts +7 -0
- package/dist/src/utils/index.js +7 -0
- package/package.json +13 -3
- package/dist/src/globals.d.ts +0 -172
- package/dist/src/shims.d.ts +0 -36
- package/dist/src/vite-env.d.ts +0 -1
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="tag"
|
|
4
|
+
:id="id"
|
|
5
|
+
ref="rootRef"
|
|
6
|
+
role="tablist"
|
|
7
|
+
:aria-orientation="ariaOrientation"
|
|
8
|
+
:class="tabsClasses"
|
|
9
|
+
:style="tabsStyles"
|
|
10
|
+
@keydown="handleKeydown"
|
|
11
|
+
>
|
|
12
|
+
<origam-defaults-provider :defaults="slotDefaults">
|
|
13
|
+
<slot
|
|
14
|
+
name="default"
|
|
15
|
+
v-bind="slotProps"
|
|
16
|
+
/>
|
|
17
|
+
</origam-defaults-provider>
|
|
18
|
+
</component>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script setup>
|
|
22
|
+
import { computed, ref, StyleValue } from "vue";
|
|
23
|
+
import { OrigamDefaultsProvider } from "../../components";
|
|
24
|
+
import {
|
|
25
|
+
useDensity,
|
|
26
|
+
useGroup,
|
|
27
|
+
useProps,
|
|
28
|
+
useRounded,
|
|
29
|
+
useStyle
|
|
30
|
+
} from "../../composables";
|
|
31
|
+
import { ORIGAM_TABS_KEY } from "../../consts";
|
|
32
|
+
import { DENSITY, DIRECTION, TAB_VARIANT } from "../../enums";
|
|
33
|
+
const props = defineProps({
|
|
34
|
+
tag: { type: String, required: false, default: "div" },
|
|
35
|
+
variant: { type: null, required: false, default: TAB_VARIANT.DEFAULT },
|
|
36
|
+
fixed: { type: Boolean, required: false, default: false },
|
|
37
|
+
centered: { type: Boolean, required: false, default: false },
|
|
38
|
+
id: { type: String, required: false },
|
|
39
|
+
class: { type: [String, Array, Object], required: false },
|
|
40
|
+
style: { type: [String, Array, Object, Boolean, null], required: false, skipCheck: true },
|
|
41
|
+
direction: { type: null, required: false, default: DIRECTION.HORIZONTAL },
|
|
42
|
+
density: { type: null, required: false, default: DENSITY.DEFAULT },
|
|
43
|
+
rounded: { type: [Boolean, Number, String, null], required: false, skipCheck: true },
|
|
44
|
+
roundedTopRight: { type: [Boolean, Number, String], required: false },
|
|
45
|
+
roundedTopLeft: { type: [Boolean, Number, String], required: false },
|
|
46
|
+
roundedBottomLeft: { type: [Boolean, Number, String], required: false },
|
|
47
|
+
roundedBottomRight: { type: [Boolean, Number, String], required: false },
|
|
48
|
+
color: { type: [String, Boolean, null], required: false, skipCheck: true },
|
|
49
|
+
bgColor: { type: [String, Boolean, null], required: false, skipCheck: true },
|
|
50
|
+
disabled: { type: Boolean, required: false },
|
|
51
|
+
modelValue: { type: null, required: false },
|
|
52
|
+
multiple: { type: Boolean, required: false },
|
|
53
|
+
mandatory: { type: Boolean, required: false, default: true },
|
|
54
|
+
max: { type: Number, required: false },
|
|
55
|
+
selectedClass: { type: String, required: false, default: "origam-tab--active" }
|
|
56
|
+
});
|
|
57
|
+
defineEmits(["update:modelValue"]);
|
|
58
|
+
const { filterProps } = useProps(props);
|
|
59
|
+
const { isSelected, select, next, prev, selected, items } = useGroup(props, ORIGAM_TABS_KEY);
|
|
60
|
+
const rootRef = ref();
|
|
61
|
+
const slotProps = computed(() => ({
|
|
62
|
+
isSelected,
|
|
63
|
+
select,
|
|
64
|
+
next,
|
|
65
|
+
prev,
|
|
66
|
+
selected,
|
|
67
|
+
items: items.value
|
|
68
|
+
}));
|
|
69
|
+
const slotDefaults = computed(() => ({
|
|
70
|
+
"origam-tab": {
|
|
71
|
+
density: props.density,
|
|
72
|
+
color: props.color,
|
|
73
|
+
variant: props.variant,
|
|
74
|
+
fixed: props.fixed
|
|
75
|
+
}
|
|
76
|
+
}));
|
|
77
|
+
const ariaOrientation = computed(() => props.direction === DIRECTION.VERTICAL ? "vertical" : "horizontal");
|
|
78
|
+
const focusTab = (id2) => {
|
|
79
|
+
if (!rootRef.value) return;
|
|
80
|
+
const target = rootRef.value.querySelector(`[data-origam-tab-id="${id2}"]`);
|
|
81
|
+
target?.focus();
|
|
82
|
+
};
|
|
83
|
+
const focusFirstNonDisabled = (offset) => {
|
|
84
|
+
const list = items.value;
|
|
85
|
+
if (!list.length) return;
|
|
86
|
+
const start = offset > 0 ? 0 : list.length - 1;
|
|
87
|
+
const end = offset > 0 ? list.length : -1;
|
|
88
|
+
for (let i = start; i !== end; i += offset) {
|
|
89
|
+
const item = list[i];
|
|
90
|
+
if (!item.disabled) {
|
|
91
|
+
select(item.id, true);
|
|
92
|
+
focusTab(item.id);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const handleKeydown = (event) => {
|
|
98
|
+
const isHorizontal = props.direction !== DIRECTION.VERTICAL;
|
|
99
|
+
const prevKey = isHorizontal ? "ArrowLeft" : "ArrowUp";
|
|
100
|
+
const nextKey = isHorizontal ? "ArrowRight" : "ArrowDown";
|
|
101
|
+
const currentId = selected.value[0];
|
|
102
|
+
if (event.key === prevKey) {
|
|
103
|
+
event.preventDefault();
|
|
104
|
+
prev();
|
|
105
|
+
if (selected.value[0] != null) focusTab(selected.value[0]);
|
|
106
|
+
} else if (event.key === nextKey) {
|
|
107
|
+
event.preventDefault();
|
|
108
|
+
next();
|
|
109
|
+
if (selected.value[0] != null) focusTab(selected.value[0]);
|
|
110
|
+
} else if (event.key === "Home") {
|
|
111
|
+
event.preventDefault();
|
|
112
|
+
focusFirstNonDisabled(1);
|
|
113
|
+
} else if (event.key === "End") {
|
|
114
|
+
event.preventDefault();
|
|
115
|
+
focusFirstNonDisabled(-1);
|
|
116
|
+
} else if (event.key === "Enter" || event.key === " ") {
|
|
117
|
+
if (currentId != null) {
|
|
118
|
+
event.preventDefault();
|
|
119
|
+
select(currentId, true);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
const { densityClasses } = useDensity(props);
|
|
124
|
+
const { roundedClasses, roundedStyles } = useRounded(props);
|
|
125
|
+
const tabsStyles = computed(() => {
|
|
126
|
+
return [
|
|
127
|
+
roundedStyles.value,
|
|
128
|
+
props.style
|
|
129
|
+
];
|
|
130
|
+
});
|
|
131
|
+
const tabsClasses = computed(() => {
|
|
132
|
+
return [
|
|
133
|
+
"origam-tabs",
|
|
134
|
+
`origam-tabs--${props.variant}`,
|
|
135
|
+
`origam-tabs--direction-${props.direction}`,
|
|
136
|
+
{
|
|
137
|
+
"origam-tabs--fixed": props.fixed,
|
|
138
|
+
"origam-tabs--centered": props.centered
|
|
139
|
+
},
|
|
140
|
+
densityClasses.value,
|
|
141
|
+
roundedClasses.value,
|
|
142
|
+
props.class
|
|
143
|
+
];
|
|
144
|
+
});
|
|
145
|
+
const { id, css, load, isLoaded, unload } = useStyle(tabsStyles);
|
|
146
|
+
defineExpose({
|
|
147
|
+
filterProps,
|
|
148
|
+
next,
|
|
149
|
+
prev,
|
|
150
|
+
select,
|
|
151
|
+
css,
|
|
152
|
+
id,
|
|
153
|
+
load,
|
|
154
|
+
unload,
|
|
155
|
+
isLoaded
|
|
156
|
+
});
|
|
157
|
+
</script>
|
|
158
|
+
|
|
159
|
+
<style lang="scss" scoped>
|
|
160
|
+
.origam-tabs {
|
|
161
|
+
display: flex;
|
|
162
|
+
flex-wrap: nowrap;
|
|
163
|
+
position: relative;
|
|
164
|
+
min-height: var(--origam-tabs---height, 48px);
|
|
165
|
+
|
|
166
|
+
gap: var(--origam-tabs---gap, 0);
|
|
167
|
+
padding-block: var(--origam-tabs---padding-block, 0);
|
|
168
|
+
padding-inline: var(--origam-tabs---padding-inline, 0);
|
|
169
|
+
|
|
170
|
+
background-color: var(--origam-tabs---background-color, transparent);
|
|
171
|
+
border-radius: var(--origam-tabs---border-radius, 0);
|
|
172
|
+
border-width: var(--origam-tabs---border-width, 0);
|
|
173
|
+
border-style: var(--origam-tabs---border-style, solid);
|
|
174
|
+
border-color: var(--origam-tabs---border-color, currentColor);
|
|
175
|
+
color: var(--origam-tabs---color, inherit);
|
|
176
|
+
|
|
177
|
+
&--direction-horizontal {
|
|
178
|
+
flex-direction: row;
|
|
179
|
+
align-items: stretch;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
&--direction-vertical {
|
|
183
|
+
flex-direction: column;
|
|
184
|
+
align-items: stretch;
|
|
185
|
+
min-height: 0;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
&--fixed {
|
|
189
|
+
:deep(.origam-tab) {
|
|
190
|
+
flex: 1 1 0;
|
|
191
|
+
min-width: 0;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
&--centered {
|
|
196
|
+
justify-content: center;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
&--default {
|
|
200
|
+
border-block-end-width: var(--origam-tabs--default---border-block-end-width, 1px);
|
|
201
|
+
border-block-end-color: var(--origam-tabs--default---border-block-end-color, var(--origam-color__border---subtle, rgba(0, 0, 0, 0.12)));
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
&--pills {
|
|
205
|
+
background-color: var(--origam-tabs--pills---background-color, transparent);
|
|
206
|
+
gap: var(--origam-tabs--pills---gap, 8px);
|
|
207
|
+
padding: var(--origam-tabs--pills---padding, 4px);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
&--underline {
|
|
211
|
+
border-block-end-width: var(--origam-tabs--underline---border-block-end-width, 1px);
|
|
212
|
+
border-block-end-color: var(--origam-tabs--underline---border-block-end-color, var(--origam-color__border---subtle, rgba(0, 0, 0, 0.12)));
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&--density-comfortable {
|
|
216
|
+
--origam-tabs---height: 56px;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
&--density-default {
|
|
220
|
+
--origam-tabs---height: 48px;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
&--density-compact {
|
|
224
|
+
--origam-tabs---height: 36px;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
</style>
|
|
228
|
+
|
|
229
|
+
<style>
|
|
230
|
+
:root {
|
|
231
|
+
--origam-tabs---height: 48px;
|
|
232
|
+
--origam-tabs---gap: 0;
|
|
233
|
+
--origam-tabs---padding-block: 0;
|
|
234
|
+
--origam-tabs---padding-inline: 0;
|
|
235
|
+
--origam-tabs---background-color: transparent;
|
|
236
|
+
--origam-tabs---border-radius: 0;
|
|
237
|
+
--origam-tabs---border-width: 0;
|
|
238
|
+
--origam-tabs---border-style: solid;
|
|
239
|
+
--origam-tabs---border-color: currentColor;
|
|
240
|
+
--origam-tabs---color: inherit;
|
|
241
|
+
}
|
|
242
|
+
</style>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "OrigamTab", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _OrigamTab.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "OrigamTabPanel", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _OrigamTabPanel.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "OrigamTabPanels", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _OrigamTabPanels.default;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "OrigamTabs", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _OrigamTabs.default;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
var _OrigamTabs = _interopRequireDefault(require("./OrigamTabs.vue"));
|
|
31
|
+
var _OrigamTab = _interopRequireDefault(require("./OrigamTab.vue"));
|
|
32
|
+
var _OrigamTabPanels = _interopRequireDefault(require("./OrigamTabPanels.vue"));
|
|
33
|
+
var _OrigamTabPanel = _interopRequireDefault(require("./OrigamTabPanel.vue"));
|
|
34
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -90,12 +90,14 @@
|
|
|
90
90
|
:placeholder="placeholder"
|
|
91
91
|
:readonly="isReadonly"
|
|
92
92
|
:size="1"
|
|
93
|
-
:type="
|
|
94
|
-
:value="
|
|
93
|
+
:type="resolvedInputType"
|
|
94
|
+
:value="displayValue"
|
|
95
|
+
:aria-invalid="ariaInvalid"
|
|
95
96
|
v-bind="{ ...fieldSlotProps, ...inputAttrs }"
|
|
96
97
|
@blur="handleBlur"
|
|
97
98
|
@focus="handleFocus"
|
|
98
99
|
@input="handleInput"
|
|
100
|
+
@paste="handlePaste"
|
|
99
101
|
>
|
|
100
102
|
</div>
|
|
101
103
|
</template>
|
|
@@ -181,7 +183,7 @@
|
|
|
181
183
|
</template>
|
|
182
184
|
|
|
183
185
|
<script setup>
|
|
184
|
-
import { computed, nextTick, ref, toRef, StyleValue, useAttrs, useSlots } from "vue";
|
|
186
|
+
import { computed, nextTick, ref, toRef, StyleValue, useAttrs, useSlots, watch } from "vue";
|
|
185
187
|
import { OrigamCounter, OrigamField, OrigamInput } from "../../components";
|
|
186
188
|
import {
|
|
187
189
|
useAdjacent,
|
|
@@ -189,6 +191,7 @@ import {
|
|
|
189
191
|
useDefaults,
|
|
190
192
|
useFocus,
|
|
191
193
|
useLocale,
|
|
194
|
+
useMask,
|
|
192
195
|
useProps,
|
|
193
196
|
useStyle,
|
|
194
197
|
useVModel
|
|
@@ -196,7 +199,7 @@ import {
|
|
|
196
199
|
import { ACTIVE_TEXT_FIELD_TYPE, INPUT_TEXT_FIELD_TYPE } from "../../consts";
|
|
197
200
|
import { vIntersect } from "../../directives";
|
|
198
201
|
import { DENSITY, DIRECTION, MDI_ICONS, TEXT_FIELD_TYPE } from "../../enums";
|
|
199
|
-
import { filterInputAttrs, forwardRefs } from "../../utils";
|
|
202
|
+
import { applyMask, filterInputAttrs, forwardRefs, resolveMaskConfig } from "../../utils";
|
|
200
203
|
const _props = defineProps({
|
|
201
204
|
autofocus: { type: Boolean, required: false },
|
|
202
205
|
counter: { type: [Boolean, Number, String], required: false },
|
|
@@ -207,6 +210,7 @@ const _props = defineProps({
|
|
|
207
210
|
role: { type: String, required: false },
|
|
208
211
|
type: { type: null, required: false, default: TEXT_FIELD_TYPE.TEXT },
|
|
209
212
|
modelModifiers: { type: [String, Boolean], required: false },
|
|
213
|
+
mask: { type: null, required: false },
|
|
210
214
|
id: { type: String, required: false },
|
|
211
215
|
class: { type: [String, Array, Object], required: false },
|
|
212
216
|
style: { type: [String, Array, Object, Boolean, null], required: false, skipCheck: true },
|
|
@@ -297,7 +301,7 @@ const _props = defineProps({
|
|
|
297
301
|
prependIcon: { type: null, required: false }
|
|
298
302
|
});
|
|
299
303
|
const props = useDefaults(_props);
|
|
300
|
-
const emits = defineEmits(["click:control", "mousedown:control", "update:focused", "update:modelValue", "click:appendInner", "click:prependInner", "click:clear", "update:active", "click:append", "click:prepend"]);
|
|
304
|
+
const emits = defineEmits(["click:control", "mousedown:control", "valid", "complete", "update:focused", "update:modelValue", "click:appendInner", "click:prependInner", "click:clear", "update:active", "click:append", "click:prepend"]);
|
|
301
305
|
defineSlots();
|
|
302
306
|
const slots = useSlots();
|
|
303
307
|
const attrs = useAttrs();
|
|
@@ -370,8 +374,57 @@ const handleClear = (e) => {
|
|
|
370
374
|
emits("click:clear", e);
|
|
371
375
|
});
|
|
372
376
|
};
|
|
377
|
+
const maskConfig = computed(() => resolveMaskConfig(props.mask ?? null));
|
|
378
|
+
const hasMask = computed(() => maskConfig.value !== null);
|
|
379
|
+
const {
|
|
380
|
+
masked: maskedValue,
|
|
381
|
+
unmasked: unmaskedValue,
|
|
382
|
+
isValid: maskIsValid,
|
|
383
|
+
complete: maskComplete
|
|
384
|
+
} = useMask(model, toRef(props, "mask"));
|
|
385
|
+
const displayValue = computed(() => {
|
|
386
|
+
return hasMask.value ? maskedValue.value : model.value ?? "";
|
|
387
|
+
});
|
|
388
|
+
const ariaInvalid = computed(() => {
|
|
389
|
+
if (!hasMask.value) return void 0;
|
|
390
|
+
if (!isFocused.value && !model.value) return void 0;
|
|
391
|
+
return !maskIsValid.value;
|
|
392
|
+
});
|
|
393
|
+
const resolvedInputType = computed(() => {
|
|
394
|
+
if (!hasMask.value) return props.type;
|
|
395
|
+
const pattern = maskConfig.value?.pattern ?? "";
|
|
396
|
+
if (typeof props.mask === "string" && props.mask.startsWith("phone")) {
|
|
397
|
+
return "tel";
|
|
398
|
+
}
|
|
399
|
+
if (pattern && /^[#\s+()\-./]+$/.test(pattern)) {
|
|
400
|
+
return "tel";
|
|
401
|
+
}
|
|
402
|
+
return props.type;
|
|
403
|
+
});
|
|
404
|
+
watch(maskIsValid, (v) => {
|
|
405
|
+
if (hasMask.value) emits("valid", v);
|
|
406
|
+
}, { immediate: false });
|
|
407
|
+
watch(maskComplete, (c) => {
|
|
408
|
+
if (hasMask.value) emits("complete", { complete: c, unmasked: unmaskedValue.value });
|
|
409
|
+
}, { immediate: false });
|
|
373
410
|
const handleInput = (e) => {
|
|
374
411
|
const el = e.target;
|
|
412
|
+
if (hasMask.value) {
|
|
413
|
+
const cfg = maskConfig.value;
|
|
414
|
+
const tokens = cfg?.pattern ?? "";
|
|
415
|
+
const r = applyMask(el.value, tokens);
|
|
416
|
+
model.value = r.unmasked;
|
|
417
|
+
nextTick(() => {
|
|
418
|
+
if (el.value !== r.masked) el.value = r.masked;
|
|
419
|
+
const pos = r.masked.length;
|
|
420
|
+
try {
|
|
421
|
+
el.setSelectionRange(pos, pos);
|
|
422
|
+
} catch (err) {
|
|
423
|
+
void err;
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
375
428
|
model.value = el.value;
|
|
376
429
|
if (typeof props.modelModifiers === "string" && INPUT_TEXT_FIELD_TYPE.includes(props.type)) {
|
|
377
430
|
const caretPosition = [el.selectionStart, el.selectionEnd];
|
|
@@ -381,6 +434,17 @@ const handleInput = (e) => {
|
|
|
381
434
|
});
|
|
382
435
|
}
|
|
383
436
|
};
|
|
437
|
+
const handlePaste = (e) => {
|
|
438
|
+
if (!hasMask.value) return;
|
|
439
|
+
const text = e.clipboardData?.getData("text") ?? "";
|
|
440
|
+
if (!text) return;
|
|
441
|
+
e.preventDefault();
|
|
442
|
+
const cfg = maskConfig.value;
|
|
443
|
+
if (!cfg) return;
|
|
444
|
+
const merged = (unmaskedValue.value ?? "") + text;
|
|
445
|
+
const r = applyMask(merged, cfg.pattern);
|
|
446
|
+
model.value = r.unmasked;
|
|
447
|
+
};
|
|
384
448
|
const hasCounter = computed(() => {
|
|
385
449
|
return slots.counter || props.counter !== false && props.counter != null;
|
|
386
450
|
});
|
|
@@ -393,6 +457,12 @@ const enrichedRules = computed(() => {
|
|
|
393
457
|
const limit = props.counter;
|
|
394
458
|
base.push((v) => !v || v.length <= limit || t("origam.validation.max_length", [limit]));
|
|
395
459
|
}
|
|
460
|
+
if (hasMask.value) {
|
|
461
|
+
base.push(() => {
|
|
462
|
+
if (!model.value) return true;
|
|
463
|
+
return maskIsValid.value || t("origam.validation.invalid_format", "Invalid format");
|
|
464
|
+
});
|
|
465
|
+
}
|
|
396
466
|
return base;
|
|
397
467
|
});
|
|
398
468
|
const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
|