mediacube-ui-v2 0.0.313 → 0.0.314

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "catalogSchemaVersion": 2,
3
- "libraryVersion": "0.0.313",
3
+ "libraryVersion": "0.0.314",
4
4
  "packageName": "mediacube-ui-v2",
5
5
  "pathHash": "9b6f3b8016b22ac7",
6
6
  "componentCount": 76,
@@ -2526,6 +2526,13 @@
2526
2526
  "required": false,
2527
2527
  "defaultValue": "false",
2528
2528
  "description": "Разрешаем вводить '-' для числовых типов num/amount_format"
2529
+ },
2530
+ {
2531
+ "name": "allowEmpty",
2532
+ "type": "boolean",
2533
+ "required": false,
2534
+ "defaultValue": "true",
2535
+ "description": ""
2529
2536
  }
2530
2537
  ],
2531
2538
  "emits": [
@@ -2581,7 +2588,7 @@
2581
2588
  ],
2582
2589
  "storyHints": {
2583
2590
  "metaArgs": {
2584
- "_unparsedSnippet": "{\n disabled: false,\n copy: false,\n readOnly: false,\n isMobile: false,\n required: false,\n clearOutput: false,\n type: InputTypes.Text,\n dir: Directions.Ltr,\n title: 'McFieldText',\n helpText: 'Help text',\n errors: ['Error text'],\n placeholder: 'McFieldText placeholder',\n name: 'McFieldText name',\n autocomplete: Autocomplete.Off,\n tabindex: 0,\n maxDecimals: 2,\n maxLength: 255,\n locale: 'en'\n }"
2591
+ "_unparsedSnippet": "{\n disabled: false,\n allowEmpty: true,\n copy: false,\n readOnly: false,\n isMobile: false,\n required: false,\n clearOutput: false,\n type: InputTypes.Text,\n dir: Directions.Ltr,\n title: 'McFieldText',\n helpText: 'Help text',\n errors: ['Error text'],\n placeholder: 'McFieldText placeholder',\n name: 'McFieldText name',\n autocomplete: Autocomplete.Off,\n tabindex: 0,\n maxDecimals: 2,\n maxLength: 255,\n locale: 'en'\n }"
2585
2592
  },
2586
2593
  "stories": {
2587
2594
  "Default": {
@@ -2597,7 +2604,7 @@
2597
2604
  "@/types/styles/Icons",
2598
2605
  "@/types/styles/Spaces"
2599
2606
  ],
2600
- "searchText": "elements/mcfieldtext/mcfieldtext mcfieldtext mediacube-ui-v2/components/elements/mcfieldtext/mcfieldtext modelvalue type title mask helptext disabled errors placeholder name datemaskplaceholder maxlength minheight maxheight copy autocomplete readonly tabindex passwordtooltip passwordhidetooltip clearoutput maskoptions required locale ismobile maxdecimals dir width removeleadingzero allownegative update:modelvalue keydown copy @/types/idirections @/types/iinput @/types/styles/colors @/types/styles/icons @/types/styles/spaces",
2607
+ "searchText": "elements/mcfieldtext/mcfieldtext mcfieldtext mediacube-ui-v2/components/elements/mcfieldtext/mcfieldtext modelvalue type title mask helptext disabled errors placeholder name datemaskplaceholder maxlength minheight maxheight copy autocomplete readonly tabindex passwordtooltip passwordhidetooltip clearoutput maskoptions required locale ismobile maxdecimals dir width removeleadingzero allownegative allowempty update:modelvalue keydown copy @/types/idirections @/types/iinput @/types/styles/colors @/types/styles/icons @/types/styles/spaces",
2601
2608
  "aiDoc": "",
2602
2609
  "docgenError": null
2603
2610
  },
@@ -1 +1 @@
1
- @charset "UTF-8";.mc-modal{position:relative;--mc-modal-padding: 2rem;--mc-modal-padding-small: .75rem;--mc-modal-header-line-height: 1.5rem;--mc-modal-header-line-height-small: 1.25rem;--mc-modal-button-height: 3rem;--mc-modal-button-height-small: 2.5rem;--mc-modal-max-width: 510px;--mc-modal-min-width: 768px;--mc-modal-state-number: 0;width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;opacity:var(--mc-modal-state-number)}@media (min-width: 480px){.mc-modal{--modal-scale: calc(var(--mc-modal-state-number) * .1 + .9);padding:12px 0;height:auto;max-height:80%;max-width:var(--mc-modal-max-width);min-width:var(--mc-modal-min-width)}}.mc-modal__overlay{position:absolute;inset:0;background-color:#20242780;display:flex;justify-content:flex-start}.mc-modal__overlay--hidden{background:transparent}.mc-modal__wrapper{position:absolute;inset:0;z-index:1;overflow:hidden;display:flex;justify-content:center;align-items:center}.mc-modal__btn-close,.mc-modal__btn-back{transition:.15s all;box-sizing:border-box;display:block;margin:0;padding:0;white-space:nowrap;vertical-align:middle;user-select:none;text-align:center;text-decoration:none;text-transform:none;border-radius:0;border:none;background-color:transparent;background-image:none;cursor:pointer;outline:0;font-size:0;line-height:0;font-family:inherit;-webkit-appearance:none;-webkit-text-fill-color:currentColor}.mc-modal__btn-close:focus,.mc-modal__btn-back:focus{outline:0}.mc-modal__btn-close,.mc-modal__btn-back{color:#8f99a3}.mc-modal__btn-close:hover,.mc-modal__btn-close:focus,.mc-modal__btn-back:hover,.mc-modal__btn-back:focus{color:#202427}.mc-modal__btn-close:active,.mc-modal__btn-back:active{color:#202427!important}.mc-modal__btn-close{position:absolute;top:1.5rem;inset-inline-end:1.5rem;padding:0!important}@media (min-width: 480px){.mc-modal__btn-close{position:absolute;top:1.5rem;inset-inline-end:1.5rem}}.mc-modal__btn-back{position:absolute;top:1.5rem;inset-inline-start:1.5rem}@media (min-width: 480px){.mc-modal__btn-back{position:absolute;top:1.5rem;inset-inline-start:1.5rem}}.mc-modal__icon-close{height:1.5rem;width:1.5rem;transition:color .15s}.mc-modal.overlay-fade-enter-active .mc-modal__inner,.mc-modal.overlay-fade-leave-active .mc-modal__inner{transition:all .15s;transform:translateZ(0)}.mc-modal.overlay-fade-enter .mc-modal__inner,.mc-modal.overlay-fade-leave-active .mc-modal__inner{transform:translate3d(0,-20px,0)}.mc-modal.mc-modal--secondary .mc-modal__inner{border-radius:2rem;box-shadow:0 15px 30px #20008c28;padding:2rem}.mc-modal.mc-modal--secondary .mc-modal__btn-close,.mc-modal.mc-modal--secondary .mc-modal__btn-back{top:27px}.mc-modal.mc-modal--secondary .mc-modal__btn-close{inset-inline-end:2rem}.mc-modal.mc-modal--secondary .mc-modal__btn-back{inset-inline-start:2rem}.mc-modal.mc-modal--secondary .mc-modal__header{padding-bottom:9px;border-bottom:2px solid #EDF0F3;margin-bottom:var(--mc-modal-padding)}.mc-modal.mc-modal--secondary .mc-modal__control{display:flex;justify-content:space-between;align-items:center}.mc-modal.mc-modal--secondary .mc-modal__control .mc-button{border-radius:.75rem}.mc-modal__header{flex-shrink:0;transition:.15s all;padding:var(--mc-modal-padding) 1rem 1.75rem;border-color:#edf0f3}@media (min-width: 480px){.mc-modal__header{padding:1.75rem}.mc-modal__header .mc-title{transition:.15s all;line-height:var(--mc-modal-header-line-height)}}.mc-modal__header:has(.mc-modal__title:empty){display:none}.mc-modal__header:has(.mc-modal__title:empty)+.mc-modal__body{padding-top:2rem}.mc-modal__title{margin-top:0;margin-bottom:0;color:#212121;font-family:Inter,sans-serif}.mc-modal__body{padding:.25rem 1rem 1rem;flex-grow:1;min-height:0;overflow-x:hidden}.mc-modal__body>*:only-child{min-height:100%}@media (min-width: 480px){.mc-modal__body{padding:.25rem 2rem 1rem;overflow:visible}}.mc-modal__inner{position:relative;box-shadow:0 4px 12px #00000029;background-color:#fff;display:flex;flex-direction:column;overflow:hidden;height:100%!important}.mc-modal__inner>*:first-child{padding-top:var(--mc-modal-padding)}.mc-modal__inner>*:last-child{padding-bottom:var(--mc-modal-padding)}@media (min-width: 480px){.mc-modal__inner--with-title .mc-modal__btn-close{position:absolute;top:var(--mc-modal-padding);inset-inline-end:3rem}}@media (min-width: 480px){.mc-modal__inner--with-title .mc-modal__btn-back{position:absolute;top:var(--mc-modal-padding);inset-inline-start:3rem}}@media (min-width: 480px){.mc-modal__inner{overflow:visible;-ms-overflow-style:none;scrollbar-width:none;border-radius:.5rem;margin:0 .75rem}.mc-modal__inner::-webkit-scrollbar{display:none}}.mc-modal--scrollable{overflow:hidden!important}.mc-modal--scrollable .mc-modal__body{overflow-y:auto;overflow-x:hidden}.mc-modal--scrollable .mc-modal__inner{overflow-x:hidden}@media (min-width: 480px){.mc-modal--scrollable .mc-modal__inner{max-height:80vh}}.mc-modal--header-align-center .mc-modal__header{padding-inline:2.5rem;text-align:center}@media (min-width: 480px){.mc-modal--header-align-center .mc-modal__header{padding-inline:3.5rem}}.mc-modal--header-align-left .mc-modal__header{padding-bottom:.75rem}@media (min-width: 480px){.mc-modal--small-indents .mc-modal__control{padding-block:var(--mc-modal-padding-small)!important}.mc-modal--small-indents .mc-modal__control .mc-button{height:var(--mc-modal-button-height-small)}.mc-modal--small-indents .mc-modal__header{padding-block:var(--mc-modal-padding-small)!important}.mc-modal--small-indents .mc-modal__header .mc-title{font-weight:600;font-size:1rem;line-height:var(--mc-modal-header-line-height-small);align-items:center}.mc-modal--small-indents .mc-modal__body{padding-bottom:.25rem}}.mc-modal--small-indents .mc-modal__inner--with-title .mc-modal__btn-back,.mc-modal--small-indents .mc-modal__inner--with-title .mc-modal__btn-close{top:var(--mc-modal-padding-small)!important}.mc-modal--scrolled-top .mc-modal__header{border-bottom:1px solid #EDF0F3}.mc-modal--scrolled-bottom .mc-modal__control:not(:empty){border-top:1px solid #EDF0F3}.mc-modal--top-padding .mc-modal__inner:before{content:"";height:2rem;min-height:2rem}.mc-modal__control{flex-shrink:0;display:flex;justify-content:center;padding:1rem 1rem 2rem;transition:.15s all}@media (min-width: 480px){.mc-modal__control{padding:1rem 1.5rem 2rem}}.mc-modal__control .mc-button{width:100%}@media (min-width: 480px){.mc-modal__control .mc-button{min-width:100px;height:var(--mc-modal-button-height);transition:.15s all;width:unset}}.mc-modal__control:empty{position:relative;padding:1.75rem 0 0}.mc-modal__control:not(:empty){border-color:#edf0f3}.mc-modal:has(.mc-modal__control:empty) .mc-modal__body{padding-bottom:.25rem}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__header{padding:1.5rem 1.5rem .75rem}}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__btn-close{top:1.5rem}}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__inner>*:first-child{padding-top:1.5rem}}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__inner>*:last-child{padding-bottom:1.5rem}}.mc-modal--variation-info .mc-modal__body{padding-bottom:.25rem}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__body{padding-inline:1.5rem}}.mc-modal--variation-info .mc-modal__control{padding-top:1.25rem}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__control{padding-top:.75rem}}html[dir=rtl] .mc-modal__btn-back{transform:rotate(180deg)}
1
+ @charset "UTF-8";.mc-modal{position:relative;--mc-modal-padding: 2rem;--mc-modal-padding-small: .75rem;--mc-modal-header-line-height: 1.5rem;--mc-modal-header-line-height-small: 1.25rem;--mc-modal-button-height: 3rem;--mc-modal-button-height-small: 2.5rem;--mc-modal-max-width: 510px;--mc-modal-min-width: 768px;--mc-modal-state-number: 0;width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;opacity:var(--mc-modal-state-number)}@media (min-width: 480px){.mc-modal{--modal-scale: calc(var(--mc-modal-state-number) * .1 + .9);padding:12px 0;height:auto;max-height:80%;max-width:var(--mc-modal-max-width);min-width:var(--mc-modal-min-width)}}.mc-modal__overlay{position:absolute;inset:0;background-color:#20242780;display:flex;justify-content:flex-start}.mc-modal__overlay--hidden{background:transparent}.mc-modal__wrapper{position:absolute;inset:0;z-index:1;overflow:hidden;display:flex;justify-content:center;align-items:center}.mc-modal__btn-close,.mc-modal__btn-back{transition:.15s all;box-sizing:border-box;display:block;margin:0;padding:0;white-space:nowrap;vertical-align:middle;user-select:none;text-align:center;text-decoration:none;text-transform:none;border-radius:0;border:none;background-color:transparent;background-image:none;cursor:pointer;outline:0;font-size:0;line-height:0;font-family:inherit;-webkit-appearance:none;-webkit-text-fill-color:currentColor}.mc-modal__btn-close:focus,.mc-modal__btn-back:focus{outline:0}.mc-modal__btn-close,.mc-modal__btn-back{color:#8f99a3}.mc-modal__btn-close:hover,.mc-modal__btn-close:focus,.mc-modal__btn-back:hover,.mc-modal__btn-back:focus{color:#202427}.mc-modal__btn-close:active,.mc-modal__btn-back:active{color:#202427!important}.mc-modal__btn-close{position:absolute;top:1.5rem;inset-inline-end:1.5rem;padding:0!important}@media (min-width: 480px){.mc-modal__btn-close{position:absolute;top:1.5rem;inset-inline-end:1.5rem}}.mc-modal__btn-back{position:absolute;top:1.5rem;inset-inline-start:1.5rem}@media (min-width: 480px){.mc-modal__btn-back{position:absolute;top:1.5rem;inset-inline-start:1.5rem}}.mc-modal__icon-close{height:1.5rem;width:1.5rem;transition:color .15s}.mc-modal.overlay-fade-enter-active .mc-modal__inner,.mc-modal.overlay-fade-leave-active .mc-modal__inner{transition:all .15s;transform:translateZ(0)}.mc-modal.overlay-fade-enter .mc-modal__inner,.mc-modal.overlay-fade-leave-active .mc-modal__inner{transform:translate3d(0,-20px,0)}.mc-modal.mc-modal--secondary .mc-modal__inner{border-radius:2rem;box-shadow:0 15px 30px #20008c28;padding:2rem}.mc-modal.mc-modal--secondary .mc-modal__btn-close,.mc-modal.mc-modal--secondary .mc-modal__btn-back{top:27px}.mc-modal.mc-modal--secondary .mc-modal__btn-close{inset-inline-end:2rem}.mc-modal.mc-modal--secondary .mc-modal__btn-back{inset-inline-start:2rem}.mc-modal.mc-modal--secondary .mc-modal__header{padding-bottom:9px;border-bottom:2px solid #EDF0F3;margin-bottom:var(--mc-modal-padding)}.mc-modal.mc-modal--secondary .mc-modal__control{display:flex;justify-content:space-between;align-items:center}.mc-modal.mc-modal--secondary .mc-modal__control .mc-button{border-radius:.75rem}.mc-modal__header{flex-shrink:0;transition:.15s all;padding:var(--mc-modal-padding) 1rem 1.75rem;border-color:#edf0f3}@media (min-width: 480px){.mc-modal__header{padding:1.75rem}.mc-modal__header .mc-title{transition:.15s all;line-height:var(--mc-modal-header-line-height)}}.mc-modal__header:has(.mc-modal__title:empty){display:none}.mc-modal__header:has(.mc-modal__title:empty)+.mc-modal__body{padding-top:2rem}.mc-modal__title{margin-top:0;margin-bottom:0;color:#212121;font-family:Inter,sans-serif;overflow-x:hidden;text-overflow:ellipsis}.mc-modal__body{padding:.25rem 1rem 1rem;flex-grow:1;min-height:0;overflow-x:hidden}.mc-modal__body>*:only-child{min-height:100%}@media (min-width: 480px){.mc-modal__body{padding:.25rem 2rem 1rem;overflow:visible}}.mc-modal__inner{position:relative;box-shadow:0 4px 12px #00000029;background-color:#fff;display:flex;flex-direction:column;overflow:hidden;height:100%!important}.mc-modal__inner>*:first-child{padding-top:var(--mc-modal-padding)}.mc-modal__inner>*:last-child{padding-bottom:var(--mc-modal-padding)}@media (min-width: 480px){.mc-modal__inner--with-title .mc-modal__btn-close{position:absolute;top:var(--mc-modal-padding);inset-inline-end:2rem}}@media (min-width: 480px){.mc-modal__inner--with-title .mc-modal__btn-back{position:absolute;top:var(--mc-modal-padding);inset-inline-start:2rem}}@media (min-width: 480px){.mc-modal__inner{overflow:visible;-ms-overflow-style:none;scrollbar-width:none;border-radius:.5rem;margin:0 .75rem}.mc-modal__inner::-webkit-scrollbar{display:none}}.mc-modal--scrollable{overflow:hidden!important}.mc-modal--scrollable .mc-modal__body{overflow-y:auto;overflow-x:hidden}.mc-modal--scrollable .mc-modal__inner{overflow-x:hidden}@media (min-width: 480px){.mc-modal--scrollable .mc-modal__inner{max-height:80vh}}.mc-modal--header-align-center .mc-modal__header{padding-inline:2.5rem;text-align:center}@media (min-width: 480px){.mc-modal--header-align-center .mc-modal__header{padding-inline:3.5rem}}.mc-modal--header-align-left .mc-modal__header{padding-bottom:.75rem}@media (min-width: 480px){.mc-modal--small-indents .mc-modal__control{padding-block:var(--mc-modal-padding-small)!important}.mc-modal--small-indents .mc-modal__control .mc-button{height:var(--mc-modal-button-height-small)}.mc-modal--small-indents .mc-modal__header{padding-block:var(--mc-modal-padding-small)!important}.mc-modal--small-indents .mc-modal__header .mc-title{font-weight:600;font-size:1rem;line-height:var(--mc-modal-header-line-height-small);align-items:center}.mc-modal--small-indents .mc-modal__body{padding-bottom:.25rem}}.mc-modal--small-indents .mc-modal__inner--with-title .mc-modal__btn-back,.mc-modal--small-indents .mc-modal__inner--with-title .mc-modal__btn-close{top:var(--mc-modal-padding-small)!important}.mc-modal--scrolled-top .mc-modal__header{border-bottom:1px solid #EDF0F3}.mc-modal--scrolled-bottom .mc-modal__control:not(:empty){border-top:1px solid #EDF0F3}.mc-modal--top-padding .mc-modal__inner:before{content:"";height:2rem;min-height:2rem}.mc-modal__control{flex-shrink:0;display:flex;justify-content:center;padding:1rem 1rem 2rem;transition:.15s all}@media (min-width: 480px){.mc-modal__control{padding:1rem 1.5rem 2rem}}.mc-modal__control .mc-button{width:100%}@media (min-width: 480px){.mc-modal__control .mc-button{min-width:100px;height:var(--mc-modal-button-height);transition:.15s all;width:unset}}.mc-modal__control:empty{position:relative;padding:1.75rem 0 0}.mc-modal__control:not(:empty){border-color:#edf0f3}.mc-modal:has(.mc-modal__control:empty) .mc-modal__body{padding-bottom:.25rem}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__header{padding:1.5rem 1.5rem .75rem}}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__btn-close{top:1.5rem}}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__inner>*:first-child{padding-top:1.5rem}}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__inner>*:last-child{padding-bottom:1.5rem}}.mc-modal--variation-info .mc-modal__body{padding-bottom:.25rem}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__body{padding-inline:1.5rem}}.mc-modal--variation-info .mc-modal__control{padding-top:1.25rem}@media (min-width: 480px){.mc-modal--variation-info .mc-modal__control{padding-top:.75rem}}html[dir=rtl] .mc-modal__btn-back{transform:rotate(180deg)}
@@ -1,30 +1,30 @@
1
- import { defineComponent as Ce, useAttrs as Ne, ref as Q, reactive as Ve, computed as l, watch as Me, openBlock as u, createElementBlock as p, withModifiers as S, normalizeStyle as X, normalizeClass as ee, createElementVNode as x, renderSlot as T, createBlock as y, unref as m, withCtx as k, createTextVNode as R, toDisplayString as B, createCommentVNode as d, mergeProps as C, Fragment as $e, createVNode as q } from "vue";
2
- import { IMask as j, IMaskComponent as Be } from "vue-imask";
3
- import { Spaces as ze } from "../../../types/styles/Spaces.js";
4
- import { Directions as te } from "../../../enums/ui/Directions2.js";
5
- import { useFieldErrors as Ae } from "../../../composables/useFieldErrors2.js";
6
- import { Autocomplete as Fe, InputTypes as i } from "../../../enums/Input2.js";
7
- import { useTextareaAutosize as Pe } from "@vueuse/core";
8
- import { ButtonSize as ae, ButtonType as Le } from "../../../enums/ui/Button2.js";
9
- import { HorizontalAlignment as Oe } from "../../../enums/ui/Alignment2.js";
10
- import { TitleVariations as K } from "../../../enums/Title2.js";
11
- import { Weights as De } from "../../../enums/ui/Weights2.js";
12
- import { useTheme as Ie } from "../../../composables/useTheme2.js";
13
- import z from "../McTitle/McTitle.vue2.js";
1
+ import { defineComponent as Fe, useAttrs as Pe, ref as q, reactive as Ee, computed as l, watch as ze, openBlock as u, createElementBlock as p, withModifiers as C, normalizeStyle as oe, normalizeClass as le, createElementVNode as x, renderSlot as V, createBlock as g, unref as m, withCtx as k, createTextVNode as j, toDisplayString as F, createCommentVNode as d, mergeProps as M, Fragment as Le, createVNode as U } from "vue";
2
+ import { IMask as Z, IMaskComponent as De } from "vue-imask";
3
+ import { Spaces as Oe } from "../../../types/styles/Spaces.js";
4
+ import { Directions as ne } from "../../../enums/ui/Directions2.js";
5
+ import { useFieldErrors as Ie } from "../../../composables/useFieldErrors2.js";
6
+ import { Autocomplete as He, InputTypes as i } from "../../../enums/Input2.js";
7
+ import { useTextareaAutosize as Ke } from "@vueuse/core";
8
+ import { ButtonSize as se, ButtonType as Re } from "../../../enums/ui/Button2.js";
9
+ import { HorizontalAlignment as qe } from "../../../enums/ui/Alignment2.js";
10
+ import { TitleVariations as W } from "../../../enums/Title2.js";
11
+ import { Weights as je } from "../../../enums/ui/Weights2.js";
12
+ import { useTheme as Ue } from "../../../composables/useTheme2.js";
13
+ import P from "../McTitle/McTitle.vue2.js";
14
14
  import '../../../assets/components/elements/McTooltip/index.css';import '../../../assets/components/elements/McSvgIcon/index.css';import '../../../assets/components/elements/McButton/index.css';import '../../../assets/components/elements/McTitle/index.css';/* empty css */
15
- import re from "../McButton/McButton.vue2.js";
15
+ import ie from "../McButton/McButton.vue2.js";
16
16
  /* empty css */
17
- import oe from "../McSvgIcon/McSvgIcon.vue2.js";
17
+ import ue from "../McSvgIcon/McSvgIcon.vue2.js";
18
18
  /* empty css */
19
- import Ee from "../McTooltip/McTooltip.vue2.js";
19
+ import Ze from "../McTooltip/McTooltip.vue2.js";
20
20
  /* empty css */
21
- const He = ["dir"], Re = ["for"], qe = ["for"], je = { class: "mc-field-text__main" }, Ke = { class: "mc-field-text__input-wrapper" }, Ue = ["value", "maxlength"], Ze = ["value"], We = ["value", "type", "readonly", "maxlength"], Ye = {
21
+ const We = ["dir"], Ye = ["for"], Ge = ["for"], Je = { class: "mc-field-text__main" }, Qe = { class: "mc-field-text__input-wrapper" }, Xe = ["value", "maxlength"], et = ["value"], tt = ["value", "type", "readonly", "maxlength"], at = {
22
22
  key: 0,
23
23
  class: "mc-field-text__right"
24
- }, Ge = {
24
+ }, rt = {
25
25
  key: 0,
26
26
  class: "mc-field-text__footer"
27
- }, Je = { key: 1 }, xt = /* @__PURE__ */ Ce({
27
+ }, ot = { key: 1 }, Nt = /* @__PURE__ */ Fe({
28
28
  __name: "McFieldText",
29
29
  props: {
30
30
  /**
@@ -160,7 +160,7 @@ const He = ["dir"], Re = ["for"], qe = ["for"], je = { class: "mc-field-text__ma
160
160
  */
161
161
  autocomplete: {
162
162
  type: String,
163
- default: Fe.On
163
+ default: He.On
164
164
  },
165
165
  /**
166
166
  * только чтение текста
@@ -246,7 +246,7 @@ const He = ["dir"], Re = ["for"], qe = ["for"], je = { class: "mc-field-text__ma
246
246
  },
247
247
  dir: {
248
248
  type: String,
249
- default: te.Ltr
249
+ default: ne.Ltr
250
250
  },
251
251
  width: {
252
252
  type: String,
@@ -265,58 +265,62 @@ const He = ["dir"], Re = ["for"], qe = ["for"], je = { class: "mc-field-text__ma
265
265
  allowNegative: {
266
266
  type: Boolean,
267
267
  default: !1
268
+ },
269
+ allowEmpty: {
270
+ type: Boolean,
271
+ default: !0
268
272
  }
269
273
  },
270
274
  emits: ["update:modelValue", "keydown", "copy"],
271
- setup(f, { emit: le }) {
272
- const { textarea: Qe } = Pe(), A = le, F = Ne(), t = f, U = Ie("fieldText"), N = Q(t.type), h = Ve({
275
+ setup(f, { emit: ce }) {
276
+ const { textarea: lt } = Ke(), E = ce, z = Pe(), t = f, Y = Ue("fieldText"), A = q(t.type), h = Ee({
273
277
  name: "copy",
274
278
  color: "black"
275
- }), g = Ae(t.errors), ne = Q(!1), P = l(() => t.dir === te.Rtl), se = l(() => ({
279
+ }), y = Ie(t.errors), me = q(!1), _ = q(null), L = l(() => t.dir === ne.Rtl), de = l(() => ({
276
280
  "mc-field-text": !0,
277
- "mc-field-text--error": !!g.errorText.value,
278
- "mc-field-text--textarea": _.value,
279
- "mc-field-text--textarea-autosize": b.value,
281
+ "mc-field-text--error": !!y.errorText.value,
282
+ "mc-field-text--textarea": b.value,
283
+ "mc-field-text--textarea-autosize": w.value,
280
284
  "mc-field-text--disabled": t.disabled,
281
285
  "mc-field-text--copy": t.copy,
282
- "mc-field-text--rtl": P.value
283
- })), ie = l(() => ({
284
- "--mc-field-text-color": U.colors[U.component.color],
286
+ "mc-field-text--rtl": L.value
287
+ })), pe = l(() => ({
288
+ "--mc-field-text-color": Y.colors[Y.component.color],
285
289
  "--mc-field-text-width": t.width
286
- })), ue = l(() => `${t.title}${t.required ? " *" : ""}`), L = l(() => N.value === i.Date), ce = l(() => !!t.mask || !!t.maskOptions || L.value), _ = l(() => t.type === i.Textarea), b = l(() => t.type === i.TextareaAutosize), me = l(() => {
290
+ })), fe = l(() => `${t.title}${t.required ? " *" : ""}`), D = l(() => A.value === i.Date), ye = l(() => !!t.mask || !!t.maskOptions || D.value), b = l(() => t.type === i.Textarea), w = l(() => t.type === i.TextareaAutosize), ve = l(() => {
287
291
  const e = Math.max(t.minHeight, 40), a = Math.max(t.maxHeight, e);
288
292
  return {
289
293
  "--textarea-autosize-min-height": `${e}px`,
290
294
  "--textarea-autosize-max-height": t.maxHeight ? `${a}px` : "auto"
291
295
  };
292
- }), Z = l(() => t.type === i.Password), de = l(() => t.type === i.AmountFormat), O = l(() => !!t.maxLength && (_.value || b.value)), D = l(() => N.value === i.Password), pe = l(() => D.value ? "visibility_off" : "visibility"), W = l(() => t.modelValue ? String(t.modelValue).length : 0), fe = l(() => `${W.value}/${t.maxLength}`), ge = l(() => t.maxLength < +W.value ? "red" : "dark-gray"), ye = l(() => ({
296
+ }), G = l(() => t.type === i.Password), ge = l(() => t.type === i.AmountFormat), O = l(() => !!t.maxLength && (b.value || w.value)), I = l(() => A.value === i.Password), he = l(() => I.value ? "visibility_off" : "visibility"), J = l(() => t.modelValue ? String(t.modelValue).length : 0), xe = l(() => `${J.value}/${t.maxLength}`), ke = l(() => t.maxLength < +J.value ? "red" : "dark-gray"), _e = l(() => ({
293
297
  mask: Date,
294
298
  autofix: !0,
295
299
  blocks: {
296
300
  d: {
297
- mask: j.MaskedRange,
301
+ mask: Z.MaskedRange,
298
302
  placeholderChar: t.dateMaskPlaceholder.date || "d",
299
303
  from: 1,
300
304
  to: 31,
301
305
  maxLength: 2
302
306
  },
303
307
  m: {
304
- mask: j.MaskedRange,
308
+ mask: Z.MaskedRange,
305
309
  placeholderChar: t.dateMaskPlaceholder.month || "m",
306
310
  from: 1,
307
311
  to: 12,
308
312
  maxLength: 2
309
313
  },
310
314
  Y: {
311
- mask: j.MaskedRange,
315
+ mask: Z.MaskedRange,
312
316
  placeholderChar: t.dateMaskPlaceholder.year || "y",
313
317
  from: 1900,
314
318
  to: 2999,
315
319
  maxLength: 4
316
320
  }
317
321
  }
318
- })), he = l(() => ({
319
- ...w.value,
322
+ })), be = l(() => ({
323
+ ...T.value,
320
324
  mask: t.mask,
321
325
  lazy: !1,
322
326
  overwrite: !1,
@@ -327,114 +331,128 @@ const He = ["dir"], Re = ["for"], qe = ["for"], je = { class: "mc-field-text__ma
327
331
  readonly: t.readOnly,
328
332
  maxlength: t.maxLength,
329
333
  type: "tel",
330
- ...F,
334
+ ...z,
331
335
  ...t.maskOptions ?? {},
332
- ...L.value ? ye.value : {}
336
+ ...D.value ? _e.value : {}
333
337
  })), v = l({
334
338
  get() {
335
- return de.value && !P.value ? J(String(t.modelValue)) : t.modelValue;
339
+ return ge.value && !L.value ? re(String(t.modelValue)) : t.modelValue;
336
340
  },
337
341
  set(e) {
338
- g.toggleErrorVisible(), A("update:modelValue", e);
342
+ y.toggleErrorVisible(), E("update:modelValue", e);
339
343
  }
340
- }), V = (e) => {
341
- v.value = xe(e);
342
- }, w = l(() => ({
343
- style: ve.value,
344
+ }), B = (e) => {
345
+ v.value = Se(e);
346
+ }, S = l(() => t.type === i.AmountFormat || t.type === i.Num), T = l(() => ({
347
+ style: we.value,
344
348
  placeholder: t.placeholder,
345
349
  disabled: t.disabled,
346
350
  name: t.name,
347
351
  "field-id": t.name,
348
352
  autocomplete: t.autocomplete,
349
353
  tabindex: t.tabindex,
350
- ...F,
351
- class: ["mc-field-text__input", F.class || ""].join(" ")
352
- })), ve = l(() => {
354
+ ...z,
355
+ class: ["mc-field-text__input", z.class || ""].join(" ")
356
+ })), we = l(() => {
353
357
  let e = {};
354
- if (_.value || b.value) {
355
- const a = O.value ? "400" : "150", r = ze[a];
358
+ if (b.value || w.value) {
359
+ const a = O.value ? "400" : "150", r = Oe[a];
356
360
  e = { paddingBottom: `${parseInt(r) - 1}px` };
357
361
  }
358
362
  return {
359
- ...!_.value && !b.value ? { boxSizing: "border-box" } : {},
363
+ ...!b.value && !w.value ? { boxSizing: "border-box" } : {},
360
364
  ...e
361
365
  };
362
- }), Y = (e) => {
366
+ }), Q = (e) => {
363
367
  if (e && t.maxDecimals) {
364
368
  const [a, r] = e.split(".");
365
369
  if (r?.length > t.maxDecimals)
366
370
  return `${a}.${r.slice(0, t.maxDecimals)}`;
367
371
  }
368
372
  return e;
369
- }, I = (e) => {
373
+ }, H = (e) => {
370
374
  if (!t.removeLeadingZero) return e;
371
375
  let a = e;
372
376
  const [r] = e || [];
373
377
  return e.length > 1 && +r == 0 && e.indexOf(".") === -1 && (a = e.slice(1)), a;
374
- }, xe = (e) => {
378
+ }, Se = (e) => {
375
379
  if (!e) return t.modelValue;
376
380
  const a = e.target;
377
- let r = L.value && a && a.value ? a.value?.substring(0, 10) : a.value;
378
- const { start: o } = _e(a);
379
- let n = E(r);
381
+ let r = D.value && a && a.value ? a.value?.substring(0, 10) : a.value;
382
+ const { start: o } = Ve(a);
383
+ let n = K(r);
380
384
  switch (t.type) {
381
385
  case i.Num: {
382
386
  const s = r?.replace(/,/g, ".")?.replace(/ /g, "");
383
387
  let [c] = /-?\d*[\.]?\d*/.exec(String(s)) || [];
384
- c = Y(c), c = I(c), r = String(c), a.value = String(c);
388
+ c = Q(c), c = H(c), r = String(c), a.value = String(c);
385
389
  break;
386
390
  }
387
391
  case i.Int: {
388
392
  let [s] = /-?\d*/.exec(String(a.value)) || [];
389
- s = I(s), r = String(s), a.value = String(s);
393
+ s = H(s), r = String(s), a.value = String(s);
390
394
  break;
391
395
  }
392
396
  case i.AmountFormat: {
393
- r = r?.replace(/,/g, ".")?.replace(/ /g, ""), r = Y(r), r = I(r), n = E(r);
397
+ r = r?.replace(/,/g, ".")?.replace(/ /g, ""), r = Q(r), r = H(r), n = K(r);
394
398
  const s = parseFloat(n), c = n.replace(/ /gm, "");
395
399
  r = n ? String(s) === c ? s : c || s || n : null;
396
- const $ = J(n);
397
- a.value = P.value ? $.replace(/ /gm, "") : $;
398
- const Te = a.value?.slice(0, o).replace(/[^ ]/gm, "")?.length || 0, H = o + Te;
399
- Number.isFinite(o) && Number.isFinite(H) && M(a, H, H);
400
+ const N = re(n);
401
+ a.value = L.value ? N.replace(/ /gm, "") : N;
402
+ const $e = a.value?.slice(0, o).replace(/[^ ]/gm, "")?.length || 0, R = o + $e;
403
+ Number.isFinite(o) && Number.isFinite(R) && $(a, R, R);
400
404
  break;
401
405
  }
402
406
  case i.Uppercase: {
403
- r = r?.toUpperCase(), a.value = r, Number.isFinite(o) && M(a, o, o);
407
+ r = r?.toUpperCase(), a.value = r, Number.isFinite(o) && $(a, o, o);
404
408
  break;
405
409
  }
406
410
  case i.Lowercase: {
407
- r = r?.toLowerCase(), a.value = r, Number.isFinite(o) && M(a, o, o);
411
+ r = r?.toLowerCase(), a.value = r, Number.isFinite(o) && $(a, o, o);
408
412
  break;
409
413
  }
410
414
  case i.Password:
411
- r = r?.replace(/ /gm, ""), a.value = r, Number.isFinite(o) && M(a, o, o);
415
+ r = r?.replace(/ /gm, ""), a.value = r, Number.isFinite(o) && $(a, o, o);
412
416
  break;
413
417
  case i.PhoneNumber:
414
418
  r.length === 0 && (r = "+"), r.charAt(0) !== "+" && (r = "+" + r), r = r.replace(/(?!^)\D/g, ""), a.value = r;
415
419
  break;
416
420
  }
417
421
  return r;
418
- }, G = (e) => {
422
+ }, Te = (e) => "key" in e, X = (e) => {
423
+ const a = _.value;
424
+ !e || !a || t.allowEmpty || !S.value || (e.preventDefault(), a.value = "0", v.value = "0", ae(a, 1, 1));
425
+ }, ee = (e) => {
426
+ const a = _.value;
427
+ if (!e || !a || t.allowEmpty || !S.value) return;
428
+ const r = e.type === "paste", o = Te(e), n = o && (e.metaKey || e.ctrlKey), s = o && (e.key === "Delete" || e.key === "Backspace");
429
+ ((s || r) && a.value.length <= 1 || s && n) && X(e);
430
+ }, Ne = (e) => {
431
+ if (!e || !_.value) return;
432
+ const a = e.target;
433
+ !t.allowEmpty && a.value.length < 1 && S.value && X(e);
434
+ }, Ce = (e) => {
435
+ !e || !_.value || !t.allowEmpty && S.value && ee(e);
436
+ }, te = (e) => {
419
437
  switch (t.type) {
420
438
  case i.AmountFormat:
421
439
  case i.Num: {
422
- ne.value = !!e.key?.match(/Backspace/);
440
+ me.value = !!e.key?.match(/Backspace/);
423
441
  const a = e.code?.match(/Space/), r = [".", ","];
424
442
  t.allowNegative && r.push("-");
425
443
  const o = r.includes(e.key), n = e.metaKey || e.ctrlKey, s = e.key?.match(/Arrow|Backspace|\.,/);
426
- (isNaN(+e.key) && !s && !o && !n || a) && e.preventDefault();
427
- const c = typeof t.modelValue == "string" && r.some(($) => String(t.modelValue)?.includes($));
444
+ !t.allowEmpty && S.value && ee(e), (isNaN(+e.key) && !s && !o && !n || a) && e.preventDefault();
445
+ const c = typeof t.modelValue == "string" && r.some((N) => String(t.modelValue)?.includes(N));
428
446
  o && c && e.preventDefault();
429
447
  break;
430
448
  }
431
449
  }
432
- A("keydown", e);
433
- }, E = (e) => {
450
+ E("keydown", e);
451
+ }, K = (e) => {
434
452
  if (!e) return e;
435
453
  const [a] = /-?\d*[\.]?\d*/.exec(String(e)?.replace(/ /gm, "")?.trim()) || [];
436
454
  return a;
437
- }, ke = (e, a, r) => {
455
+ }, ae = (e, a, r) => {
438
456
  if (!e.setSelectionRange) return;
439
457
  let o = Number(a), n = Number(r);
440
458
  if (!Number.isFinite(o) || !Number.isFinite(n)) return;
@@ -444,13 +462,13 @@ const He = ["dir"], Re = ["for"], qe = ["for"], je = { class: "mc-field-text__ma
444
462
  typeof document < "u" && document.activeElement !== e && e.focus(), e.setSelectionRange(o, n);
445
463
  } catch {
446
464
  }
447
- }, M = (e, a, r) => {
448
- const o = () => ke(e, a, r);
465
+ }, $ = (e, a, r) => {
466
+ const o = () => ae(e, a, r);
449
467
  typeof requestAnimationFrame == "function" ? requestAnimationFrame(o) : o();
450
- }, _e = (e) => typeof e.selectionStart == "number" && typeof e.selectionEnd == "number" ? { start: e.selectionStart, end: e.selectionEnd } : { start: 0, end: 0 }, J = (e) => {
451
- const a = E(e), r = !!String(a)?.match(/\./), [o, n] = String(a).replace(/[^\d\.-]/g, "").replace(/\B(?=(?:\d{3})+(?!\d))/g, " ").split("."), s = [o, n?.replace(/ /gm, "") || ""];
468
+ }, Ve = (e) => typeof e.selectionStart == "number" && typeof e.selectionEnd == "number" ? { start: e.selectionStart, end: e.selectionEnd } : { start: 0, end: 0 }, re = (e) => {
469
+ const a = K(e), r = !!String(a)?.match(/\./), [o, n] = String(a).replace(/[^\d\.-]/g, "").replace(/\B(?=(?:\d{3})+(?!\d))/g, " ").split("."), s = [o, n?.replace(/ /gm, "") || ""];
452
470
  return r ? s.join(".") : s.filter((c) => !!c).join(".");
453
- }, be = () => {
471
+ }, Me = () => {
454
472
  try {
455
473
  navigator.clipboard.writeText(t.modelValue), h.name = "check", h.color = "green", setTimeout(() => {
456
474
  h.name = "copy", h.color = "black";
@@ -458,17 +476,17 @@ const He = ["dir"], Re = ["for"], qe = ["for"], je = { class: "mc-field-text__ma
458
476
  } catch (e) {
459
477
  console.error("error while copy with navigator", e);
460
478
  }
461
- A("copy", t.modelValue);
462
- }, we = () => {
463
- N.value = D.value ? i.Text : i.Password;
479
+ E("copy", t.modelValue);
480
+ }, Ae = () => {
481
+ A.value = I.value ? i.Text : i.Password;
464
482
  };
465
- Me(
483
+ ze(
466
484
  () => t.errors,
467
485
  (e) => {
468
- g.setError(e);
486
+ y.setError(e);
469
487
  }
470
488
  );
471
- const Se = (e) => {
489
+ const Be = (e) => {
472
490
  if (!e) return;
473
491
  const a = e.target;
474
492
  if (!a) return;
@@ -482,109 +500,113 @@ const He = ["dir"], Re = ["for"], qe = ["for"], je = { class: "mc-field-text__ma
482
500
  };
483
501
  return (e, a) => (u(), p("div", {
484
502
  dir: t.dir,
485
- class: ee(se.value),
486
- style: X(ie.value),
487
- onClick: S(Se, ["stop"])
503
+ class: le(de.value),
504
+ style: oe(pe.value),
505
+ onClick: C(Be, ["stop"])
488
506
  }, [
489
507
  x("label", {
490
508
  for: f.name,
491
509
  class: "mc-field-text__header"
492
510
  }, [
493
- T(e.$slots, "header", {}, () => [
494
- f.title ? (u(), y(z, {
511
+ V(e.$slots, "header", {}, () => [
512
+ f.title ? (u(), g(P, {
495
513
  key: 0,
496
514
  "max-width": "100%",
497
- weight: m(De).Medium
515
+ weight: m(je).Medium
498
516
  }, {
499
517
  default: k(() => [
500
- R(B(ue.value), 1)
518
+ j(F(fe.value), 1)
501
519
  ]),
502
520
  _: 1
503
521
  }, 8, ["weight"])) : d("", !0)
504
522
  ])
505
- ], 8, Re),
523
+ ], 8, Ye),
506
524
  x("label", {
507
525
  for: f.name,
508
526
  class: "mc-field-text__inner"
509
527
  }, [
510
- x("div", je, [
528
+ x("div", Je, [
511
529
  e.$slots.prepend ? (u(), p("div", {
512
530
  key: 0,
513
531
  class: "mc-field-text__prepend",
514
- onClick: a[0] || (a[0] = S(() => {
532
+ onClick: a[0] || (a[0] = C(() => {
515
533
  }, ["stop"]))
516
534
  }, [
517
- T(e.$slots, "prepend")
535
+ V(e.$slots, "prepend")
518
536
  ])) : d("", !0),
519
- x("div", Ke, [
520
- _.value ? (u(), p("textarea", C({
537
+ x("div", Qe, [
538
+ b.value ? (u(), p("textarea", M({
521
539
  key: 0,
522
540
  value: v.value
523
- }, w.value, {
541
+ }, T.value, {
524
542
  maxlength: f.maxLength,
525
543
  rows: "1",
526
- onInput: V
527
- }), null, 16, Ue)) : b.value ? (u(), p("div", {
544
+ onInput: B
545
+ }), null, 16, Xe)) : w.value ? (u(), p("div", {
528
546
  key: 1,
529
547
  class: "mc-field-text--textarea-autosize_wrapper",
530
- style: X(me.value)
548
+ style: oe(ve.value)
531
549
  }, [
532
- x("span", C({ class: "mc-field-text--textarea-autosize_backdrop-cover" }, w.value), B(v.value), 17),
533
- x("textarea", C({ value: v.value }, w.value, { onInput: V }), null, 16, Ze)
534
- ], 4)) : (u(), p($e, { key: 2 }, [
535
- ce.value ? (u(), y(m(Be), C({
550
+ x("span", M({ class: "mc-field-text--textarea-autosize_backdrop-cover" }, T.value), F(v.value), 17),
551
+ x("textarea", M({ value: v.value }, T.value, { onInput: B }), null, 16, et)
552
+ ], 4)) : (u(), p(Le, { key: 2 }, [
553
+ ye.value ? (u(), g(m(De), M({
536
554
  key: 0,
537
555
  value: v.value
538
- }, he.value, {
539
- onKeydown: G,
540
- "onUpdate:modelValue": a[1] || (a[1] = (r, o) => V(o))
541
- }), null, 16, ["value"])) : (u(), p("input", C({
556
+ }, be.value, {
557
+ onKeydown: te,
558
+ "onUpdate:modelValue": a[1] || (a[1] = (r, o) => B(o))
559
+ }), null, 16, ["value"])) : (u(), p("input", M({
542
560
  key: 1,
561
+ ref_key: "input",
562
+ ref: _,
543
563
  value: v.value
544
- }, w.value, {
545
- type: N.value,
564
+ }, T.value, {
565
+ type: A.value,
546
566
  readonly: t.readOnly,
547
567
  maxlength: f.maxLength,
548
- onKeydown: G,
549
- onInput: V
550
- }), null, 16, We))
568
+ onKeydown: te,
569
+ onKeyup: Ne,
570
+ onInput: B,
571
+ onPaste: Ce
572
+ }), null, 16, tt))
551
573
  ], 64))
552
574
  ]),
553
- e.$slots.append || f.copy || Z.value ? (u(), p("div", {
575
+ e.$slots.append || f.copy || G.value ? (u(), p("div", {
554
576
  key: 1,
555
- class: ee(["mc-field-text__append", { "mc-field-text__append--indent-bottom": O.value }]),
556
- onClick: a[2] || (a[2] = S(() => {
577
+ class: le(["mc-field-text__append", { "mc-field-text__append--indent-bottom": O.value }]),
578
+ onClick: a[2] || (a[2] = C(() => {
557
579
  }, ["stop"]))
558
580
  }, [
559
- T(e.$slots, "append"),
560
- f.copy ? (u(), y(re, {
581
+ V(e.$slots, "append"),
582
+ f.copy ? (u(), g(ie, {
561
583
  key: 0,
562
584
  variation: "black-link",
563
- size: m(ae).MCompact,
564
- onClick: S(be, ["stop", "prevent"])
585
+ size: m(se).MCompact,
586
+ onClick: C(Me, ["stop", "prevent"])
565
587
  }, {
566
588
  "icon-append": k(() => [
567
- q(oe, {
589
+ U(ue, {
568
590
  name: h.name,
569
591
  color: h.color
570
592
  }, null, 8, ["name", "color"])
571
593
  ]),
572
594
  _: 1
573
595
  }, 8, ["size"])) : d("", !0),
574
- Z.value ? (u(), y(Ee, {
596
+ G.value ? (u(), g(Ze, {
575
597
  key: 1,
576
- content: D.value ? t.passwordTooltip : t.passwordHideTooltip || t.passwordTooltip
598
+ content: I.value ? t.passwordTooltip : t.passwordHideTooltip || t.passwordTooltip
577
599
  }, {
578
600
  default: k(() => [
579
- q(re, {
601
+ U(ie, {
580
602
  variation: "black-link",
581
- size: m(ae).MCompact,
603
+ size: m(se).MCompact,
582
604
  tabindex: "-1",
583
- type: m(Le).Button,
584
- onClick: S(we, ["stop", "prevent"])
605
+ type: m(Re).Button,
606
+ onClick: C(Ae, ["stop", "prevent"])
585
607
  }, {
586
608
  "icon-append": k(() => [
587
- q(oe, { name: pe.value }, null, 8, ["name"])
609
+ U(ue, { name: he.value }, null, 8, ["name"])
588
610
  ]),
589
611
  _: 1
590
612
  }, 8, ["size", "type"])
@@ -592,51 +614,51 @@ const He = ["dir"], Re = ["for"], qe = ["for"], je = { class: "mc-field-text__ma
592
614
  _: 1
593
615
  }, 8, ["content"])) : d("", !0)
594
616
  ], 2)) : d("", !0),
595
- O.value ? (u(), y(z, {
617
+ O.value ? (u(), g(P, {
596
618
  key: 2,
597
619
  class: "mc-field-text__char-counter",
598
- variation: m(K).Overline,
599
- "text-align": m(Oe).Right,
600
- color: ge.value
620
+ variation: m(W).Overline,
621
+ "text-align": m(qe).Right,
622
+ color: ke.value
601
623
  }, {
602
624
  default: k(() => [
603
- R(B(fe.value), 1)
625
+ j(F(xe.value), 1)
604
626
  ]),
605
627
  _: 1
606
628
  }, 8, ["variation", "text-align", "color"])) : d("", !0)
607
629
  ]),
608
- e.$slots.right ? (u(), p("div", Ye, [
609
- T(e.$slots, "right")
630
+ e.$slots.right ? (u(), p("div", at, [
631
+ V(e.$slots, "right")
610
632
  ])) : d("", !0)
611
- ], 8, qe),
612
- m(g).errorText.value || t.helpText || e.$slots.footer ? (u(), p("div", Ge, [
613
- m(g).errorText.value ? (u(), y(z, {
633
+ ], 8, Ge),
634
+ m(y).errorText.value || t.helpText || e.$slots.footer ? (u(), p("div", rt, [
635
+ m(y).errorText.value ? (u(), g(P, {
614
636
  key: 0,
615
637
  "tag-name": "div",
616
638
  color: "red",
617
- variation: m(K).Overline,
639
+ variation: m(W).Overline,
618
640
  class: "mc-field-text__error-text",
619
- "html-data": m(g).errorText.value
641
+ "html-data": m(y).errorText.value
620
642
  }, null, 8, ["variation", "html-data"])) : d("", !0),
621
- m(g).errorText.value ? (u(), p("br", Je)) : d("", !0),
622
- T(e.$slots, "footer", {}, () => [
623
- t.helpText ? (u(), y(z, {
643
+ m(y).errorText.value ? (u(), p("br", ot)) : d("", !0),
644
+ V(e.$slots, "footer", {}, () => [
645
+ t.helpText ? (u(), g(P, {
624
646
  key: 0,
625
647
  "tag-name": "div",
626
- variation: m(K).Overline,
648
+ variation: m(W).Overline,
627
649
  color: "gray",
628
650
  "max-width": "100%"
629
651
  }, {
630
652
  default: k(() => [
631
- R(B(t.helpText), 1)
653
+ j(F(t.helpText), 1)
632
654
  ]),
633
655
  _: 1
634
656
  }, 8, ["variation"])) : d("", !0)
635
657
  ])
636
658
  ])) : d("", !0)
637
- ], 14, He));
659
+ ], 14, We));
638
660
  }
639
661
  });
640
662
  export {
641
- xt as default
663
+ Nt as default
642
664
  };
@@ -243,6 +243,10 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<im
243
243
  type: BooleanConstructor;
244
244
  default: boolean;
245
245
  };
246
+ allowEmpty: {
247
+ type: BooleanConstructor;
248
+ default: boolean;
249
+ };
246
250
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
247
251
  copy: (value: string) => any;
248
252
  keydown: (value: KeyboardEvent) => any;
@@ -487,6 +491,10 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<im
487
491
  type: BooleanConstructor;
488
492
  default: boolean;
489
493
  };
494
+ allowEmpty: {
495
+ type: BooleanConstructor;
496
+ default: boolean;
497
+ };
490
498
  }>> & Readonly<{
491
499
  onCopy?: ((value: string) => any) | undefined;
492
500
  onKeydown?: ((value: KeyboardEvent) => any) | undefined;
@@ -506,6 +514,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<im
506
514
  helpText: string;
507
515
  errors: string[];
508
516
  autocomplete: Autocomplete;
517
+ allowEmpty: boolean;
509
518
  maxHeight: number;
510
519
  dateMaskPlaceholder: Record<string, any>;
511
520
  maxLength: number;
@@ -519,7 +528,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<im
519
528
  maxDecimals: number;
520
529
  removeLeadingZero: boolean;
521
530
  allowNegative: boolean;
522
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>, {
531
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
532
+ input: HTMLInputElement;
533
+ }, HTMLDivElement>, {
523
534
  header?(_: {}): any;
524
535
  prepend?(_: {}): any;
525
536
  append?(_: {}): any;
@@ -115,6 +115,10 @@ declare const McFieldText: {
115
115
  type: BooleanConstructor;
116
116
  default: boolean;
117
117
  };
118
+ allowEmpty: {
119
+ type: BooleanConstructor;
120
+ default: boolean;
121
+ };
118
122
  }>> & Readonly<{
119
123
  onCopy?: ((value: string) => any) | undefined;
120
124
  onKeydown?: ((value: KeyboardEvent) => any) | undefined;
@@ -138,6 +142,7 @@ declare const McFieldText: {
138
142
  helpText: string;
139
143
  errors: string[];
140
144
  autocomplete: import('../../../enums/Input').Autocomplete;
145
+ allowEmpty: boolean;
141
146
  maxHeight: number;
142
147
  dateMaskPlaceholder: Record<string, any>;
143
148
  maxLength: number;
@@ -151,7 +156,9 @@ declare const McFieldText: {
151
156
  maxDecimals: number;
152
157
  removeLeadingZero: boolean;
153
158
  allowNegative: boolean;
154
- }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
159
+ }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
160
+ input: HTMLInputElement;
161
+ }, HTMLDivElement, import('vue').ComponentProvideOptions, {
155
162
  P: {};
156
163
  B: {};
157
164
  D: {};
@@ -274,6 +281,10 @@ declare const McFieldText: {
274
281
  type: BooleanConstructor;
275
282
  default: boolean;
276
283
  };
284
+ allowEmpty: {
285
+ type: BooleanConstructor;
286
+ default: boolean;
287
+ };
277
288
  }>> & Readonly<{
278
289
  onCopy?: ((value: string) => any) | undefined;
279
290
  onKeydown?: ((value: KeyboardEvent) => any) | undefined;
@@ -293,6 +304,7 @@ declare const McFieldText: {
293
304
  helpText: string;
294
305
  errors: string[];
295
306
  autocomplete: import('../../../enums/Input').Autocomplete;
307
+ allowEmpty: boolean;
296
308
  maxHeight: number;
297
309
  dateMaskPlaceholder: Record<string, any>;
298
310
  maxLength: number;
@@ -426,6 +438,10 @@ declare const McFieldText: {
426
438
  type: BooleanConstructor;
427
439
  default: boolean;
428
440
  };
441
+ allowEmpty: {
442
+ type: BooleanConstructor;
443
+ default: boolean;
444
+ };
429
445
  }>> & Readonly<{
430
446
  onCopy?: ((value: string) => any) | undefined;
431
447
  onKeydown?: ((value: KeyboardEvent) => any) | undefined;
@@ -449,6 +465,7 @@ declare const McFieldText: {
449
465
  helpText: string;
450
466
  errors: string[];
451
467
  autocomplete: import('../../../enums/Input').Autocomplete;
468
+ allowEmpty: boolean;
452
469
  maxHeight: number;
453
470
  dateMaskPlaceholder: Record<string, any>;
454
471
  maxLength: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mediacube-ui-v2",
3
- "version": "0.0.313",
3
+ "version": "0.0.314",
4
4
  "license": "MIT",
5
5
  "description": "Design system for Mediacube services",
6
6
  "sideEffects": [