@topvisor/ui 0.0.8 → 0.0.9

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,4 +1,4 @@
1
- define(["vue"], function(vue) {
1
+ define(["exports", "vue"], function(exports, vue) {
2
2
  "use strict"; vue = vue ?? Vue;
3
3
  var COLOR = /* @__PURE__ */ ((COLOR2) => {
4
4
  COLOR2["Theme"] = "theme";
@@ -22,7 +22,7 @@ define(["vue"], function(vue) {
22
22
  SIZE2["XL"] = "xl";
23
23
  return SIZE2;
24
24
  })(SIZE || {});
25
- /* @__PURE__ */ vue.defineComponent({
25
+ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
26
26
  __name: "button",
27
27
  props: {
28
28
  color: { default: COLOR.Blue },
@@ -95,10 +95,57 @@ define(["vue"], function(vue) {
95
95
  "g-size_l": "g-size_l",
96
96
  "g-size_xl": "g-size_xl"
97
97
  };
98
+ const _export_sfc = (sfc, props) => {
99
+ const target = sfc.__vccOpts || sfc;
100
+ for (const [key, val] of props) {
101
+ target[key] = val;
102
+ }
103
+ return target;
104
+ };
105
+ const cssModules$1 = {
106
+ "$style": style0$1
107
+ };
108
+ const Button = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__cssModules", cssModules$1]]);
109
+ const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
110
+ __proto__: null,
111
+ default: Button
112
+ }, Symbol.toStringTag, { value: "Module" }));
113
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
114
+ __name: "example",
115
+ props: {
116
+ text: { default: "Вы можете поменять этот текст в props.text" },
117
+ color: {},
118
+ isActive: { type: Boolean }
119
+ },
120
+ setup(__props) {
121
+ vue.useCssVars((_ctx) => ({
122
+ "811e7836": _ctx.color
123
+ }));
124
+ return (_ctx, _cache) => {
125
+ return vue.openBlock(), vue.createElementBlock("div", {
126
+ class: vue.normalizeClass({
127
+ [_ctx.$style.example]: true,
128
+ [_ctx.$style["g-active"]]: _ctx.isActive
129
+ })
130
+ }, vue.toDisplayString(_ctx.text), 3);
131
+ };
132
+ }
133
+ });
98
134
  const example = "top-example";
99
135
  const style0 = {
100
136
  example,
101
137
  "g-active": "g-active"
102
138
  };
139
+ const cssModules = {
140
+ "$style": style0
141
+ };
142
+ const Example = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
143
+ const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
144
+ __proto__: null,
145
+ default: Example
146
+ }, Symbol.toStringTag, { value: "Module" }));
147
+ exports.Button = index$1;
148
+ exports.Example = index;
149
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
103
150
  });
104
151
  //# sourceMappingURL=forms.amd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"forms.amd.js","sources":["../../../src/components/forms/button/button.ts","../../../src/components/forms/button/button.vue"],"sourcesContent":["import type { VNode } from 'vue';\r\n\r\n/**\r\n * Определение параметров\r\n */\r\nexport interface Props {\r\n\tcolor?: COLOR\r\n\tstyling?: STYLING // bug: name = style init with object type\r\n\tsize?: SIZE\r\n\r\n\tname?: string\r\n\ttitle?: string\r\n\ticon?: string\r\n\ticon2?: string\r\n\r\n\thref?: string // если установлена ссылка, isSubmit не может быть true\r\n\t// value?: string\r\n\r\n\tdisabled?: boolean\r\n\tisSubmit?: boolean\r\n\tisActive?: boolean\r\n\tisProgress?: boolean\r\n}\r\n\r\n/**\r\n * Определение слотов\r\n */\r\nexport interface Slots {\r\n\t/**\r\n\t * Cлот с проивзольным содержимым\r\n\t */\r\n\tdefault(): VNode[];\r\n}\r\n\r\n/**\r\n * Определение событий\r\n */\r\nexport interface Emits { }\r\n\r\n/**\r\n * Цвета\r\n */\r\nexport enum COLOR {\r\n\tTheme = 'theme',\r\n\tBlue = 'blue',\r\n\tGreen = 'green',\r\n\tOrange = 'orange',\r\n\tRed = 'red',\r\n\tPink = 'pink',\r\n}\r\n\r\n/**\r\n * Стили\r\n */\r\nexport enum STYLING {\r\n\tRegular = '',\r\n\tOutline = 'outline',\r\n\tSoft = 'soft',\r\n\tTransparent = 'transparent',\r\n}\r\n\r\n/**\r\n * Размеры\r\n */\r\nexport enum SIZE {\r\n\tS = '',\r\n\tL = 'l',\r\n\tXL = 'xl',\r\n}","<script setup lang=\"ts\">\r\nimport { computed, useCssModule } from 'vue';\r\nimport type { Props } from './button';\r\nimport { COLOR, STYLING, SIZE } from './button';\r\n\r\nconst props = withDefaults(defineProps<Props>(), {\r\n\tcolor: COLOR.Blue,\r\n\tstyling: STYLING.Regular,\r\n\tsize: SIZE.S,\r\n});\r\n\r\nconst style = useCssModule();\r\n\r\nconst tagName = computed(() => props.href ? 'a' : 'button');\r\n\r\nconst type = computed(() => props.isSubmit ? 'submit' : undefined);\r\n\r\nconst classes = computed(() => {\r\n\treturn {\r\n\t\t['g']: true,\r\n\t\t['g-active']: props.isActive,\r\n\t\t['g-disabled']: props.disabled,\r\n\t\t[style['top-button']]: true,\r\n\t\t[style['top-button-progress']]: props.isProgress,\r\n\t\t[style[`g-size_${props.size}`]]: !!props.size,\r\n\t\t[style[`g-color_${props.color}`]]: true,\r\n\t\t[style[`g-style_${props.styling}`]]: !!props.styling,\r\n\t};\r\n});\r\n</script>\r\n\r\n<template>\r\n\t<component\r\n\t\t:is=\"tagName\"\r\n\t\t:class=\"classes\"\r\n\t\t:name=\"name\"\r\n\t\t:title=\"title\"\r\n\t\t:href=\"href\"\r\n\t\t:type=\"type\"\r\n\t\t:data-g-icon=\"icon || undefined\"\r\n\t\t:data-g-icon2=\"icon2 || undefined\"\r\n\t\t:disabled=\"disabled || undefined\"\r\n\t\t:inProgress=\"isProgress\"\r\n\t>\r\n\t\t<slot>{{ !icon ? \"Button\" : \"\" }}</slot>\r\n\t</component>\r\n</template>\r\n\r\n<style module>\r\n@import \"./style/button.css\";\r\n@import \"./style/style-outline.css\";\r\n@import \"./style/style-soft.css\";\r\n@import \"./style/style-transparent.css\";\r\n\r\n.top-button {\r\n\t--top-button-color: var(--color-white);\r\n\t--top-button-background-color: transparent;\r\n\t--top-button-background-color-hover: var(--top-button-background-color);\r\n\t--top-button-background-color-active: var(--top-button-background-color-hover);\r\n\t--top-button-background-color-selected: var(--top-button-background-color-hover);\r\n\t--top-button-box-shadow: none;\r\n\t--top-button-box-shadow-hover: var(--g-shadow-darken-2);\r\n\t--top-button-box-shadow-active: var(--g-shadow-darken-3);\r\n\t--top-button-box-shadow-selected: var(--g-shadow-darken-3);\r\n\t--g-forms-border-width: 0px;\r\n\t--g-icon-width: calc(var(--g-icon-size) + var(--g-forms-padding));\r\n\t--g-icon2-width: calc(var(--g-icon2-size) + var(--g-forms-padding));\r\n}\r\n\r\n.top-button.g-size_l {\r\n\t--g-forms-padding: var(--g-forms-padding_l);\r\n\t--g-forms-base-height: var(--g-forms-base-height_l);\r\n}\r\n\r\n.top-button.g-size_xl {\r\n\t--g-forms-padding: var(--g-forms-padding_xl);\r\n\t--g-forms-base-height: var(--g-forms-base-height_xl);\r\n}\r\n\r\n.top-button-progress {}\r\n</style>"],"names":["COLOR","STYLING","SIZE","useCssModule","computed"],"mappings":";;AA0CY,MAAA,0BAAAA,WAAL;AACNA,WAAA,OAAQ,IAAA;AACRA,WAAA,MAAO,IAAA;AACPA,WAAA,OAAQ,IAAA;AACRA,WAAA,QAAS,IAAA;AACTA,WAAA,KAAM,IAAA;AACNA,WAAA,MAAO,IAAA;AANIA,WAAAA;AAAAA,EAAA,GAAA,SAAA,CAAA,CAAA;AAYA,MAAA,4BAAAC,aAAL;AACNA,aAAA,SAAU,IAAA;AACVA,aAAA,SAAU,IAAA;AACVA,aAAA,MAAO,IAAA;AACPA,aAAA,aAAc,IAAA;AAJHA,WAAAA;AAAAA,EAAA,GAAA,WAAA,CAAA,CAAA;AAUA,MAAA,yBAAAC,UAAL;AACNA,UAAA,GAAI,IAAA;AACJA,UAAA,GAAI,IAAA;AACJA,UAAA,IAAK,IAAA;AAHMA,WAAAA;AAAAA,EAAA,GAAA,QAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;ACrDZ,YAAM,QAAQC,IAAAA;AAEd,YAAM,UAAUC,IAAAA,SAAS,MAAM,MAAM,OAAO,MAAM,QAAQ;AAE1D,YAAM,OAAOA,IAAAA,SAAS,MAAM,MAAM,WAAW,WAAW,MAAS;AAE3D,YAAA,UAAUA,IAAAA,SAAS,MAAM;AACvB,eAAA;AAAA,UACN,CAAC,GAAG,GAAG;AAAA,UACP,CAAC,UAAU,GAAG,MAAM;AAAA,UACpB,CAAC,YAAY,GAAG,MAAM;AAAA,UACtB,CAAC,MAAM,YAAY,CAAC,GAAG;AAAA,UACvB,CAAC,MAAM,qBAAqB,CAAC,GAAG,MAAM;AAAA,UACtC,CAAC,MAAM,UAAU,MAAM,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM;AAAA,UACzC,CAAC,MAAM,WAAW,MAAM,KAAK,EAAE,CAAC,GAAG;AAAA,UACnC,CAAC,MAAM,WAAW,MAAM,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM;AAAA,QAAA;AAAA,MAC9C,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"forms.amd.js","sources":["../../../src/components/forms/button/button.ts","../../../src/components/forms/button/button.vue"],"sourcesContent":["import type { VNode } from 'vue';\r\n\r\n/**\r\n * Определение параметров\r\n */\r\nexport interface Props {\r\n\tcolor?: COLOR\r\n\tstyling?: STYLING // bug: name = style init with object type\r\n\tsize?: SIZE\r\n\r\n\tname?: string\r\n\ttitle?: string\r\n\ticon?: string\r\n\ticon2?: string\r\n\r\n\thref?: string // если установлена ссылка, isSubmit не может быть true\r\n\t// value?: string\r\n\r\n\tdisabled?: boolean\r\n\tisSubmit?: boolean\r\n\tisActive?: boolean\r\n\tisProgress?: boolean\r\n}\r\n\r\n/**\r\n * Определение слотов\r\n */\r\nexport interface Slots {\r\n\t/**\r\n\t * Cлот с проивзольным содержимым\r\n\t */\r\n\tdefault(): VNode[];\r\n}\r\n\r\n/**\r\n * Определение событий\r\n */\r\nexport interface Emits { }\r\n\r\n/**\r\n * Цвета\r\n */\r\nexport enum COLOR {\r\n\tTheme = 'theme',\r\n\tBlue = 'blue',\r\n\tGreen = 'green',\r\n\tOrange = 'orange',\r\n\tRed = 'red',\r\n\tPink = 'pink',\r\n}\r\n\r\n/**\r\n * Стили\r\n */\r\nexport enum STYLING {\r\n\tRegular = '',\r\n\tOutline = 'outline',\r\n\tSoft = 'soft',\r\n\tTransparent = 'transparent',\r\n}\r\n\r\n/**\r\n * Размеры\r\n */\r\nexport enum SIZE {\r\n\tS = '',\r\n\tL = 'l',\r\n\tXL = 'xl',\r\n}","<script setup lang=\"ts\">\r\nimport { computed, useCssModule } from 'vue';\r\nimport type { Props } from './button';\r\nimport { COLOR, STYLING, SIZE } from './button';\r\n\r\nconst props = withDefaults(defineProps<Props>(), {\r\n\tcolor: COLOR.Blue,\r\n\tstyling: STYLING.Regular,\r\n\tsize: SIZE.S,\r\n});\r\n\r\nconst style = useCssModule();\r\n\r\nconst tagName = computed(() => props.href ? 'a' : 'button');\r\n\r\nconst type = computed(() => props.isSubmit ? 'submit' : undefined);\r\n\r\nconst classes = computed(() => {\r\n\treturn {\r\n\t\t['g']: true,\r\n\t\t['g-active']: props.isActive,\r\n\t\t['g-disabled']: props.disabled,\r\n\t\t[style['top-button']]: true,\r\n\t\t[style['top-button-progress']]: props.isProgress,\r\n\t\t[style[`g-size_${props.size}`]]: !!props.size,\r\n\t\t[style[`g-color_${props.color}`]]: true,\r\n\t\t[style[`g-style_${props.styling}`]]: !!props.styling,\r\n\t};\r\n});\r\n</script>\r\n\r\n<template>\r\n\t<component\r\n\t\t:is=\"tagName\"\r\n\t\t:class=\"classes\"\r\n\t\t:name=\"name\"\r\n\t\t:title=\"title\"\r\n\t\t:href=\"href\"\r\n\t\t:type=\"type\"\r\n\t\t:data-g-icon=\"icon || undefined\"\r\n\t\t:data-g-icon2=\"icon2 || undefined\"\r\n\t\t:disabled=\"disabled || undefined\"\r\n\t\t:inProgress=\"isProgress\"\r\n\t>\r\n\t\t<slot>{{ !icon ? \"Button\" : \"\" }}</slot>\r\n\t</component>\r\n</template>\r\n\r\n<style module>\r\n@import \"./style/button.css\";\r\n@import \"./style/style-outline.css\";\r\n@import \"./style/style-soft.css\";\r\n@import \"./style/style-transparent.css\";\r\n\r\n.top-button {\r\n\t--top-button-color: var(--color-white);\r\n\t--top-button-background-color: transparent;\r\n\t--top-button-background-color-hover: var(--top-button-background-color);\r\n\t--top-button-background-color-active: var(--top-button-background-color-hover);\r\n\t--top-button-background-color-selected: var(--top-button-background-color-hover);\r\n\t--top-button-box-shadow: none;\r\n\t--top-button-box-shadow-hover: var(--g-shadow-darken-2);\r\n\t--top-button-box-shadow-active: var(--g-shadow-darken-3);\r\n\t--top-button-box-shadow-selected: var(--g-shadow-darken-3);\r\n\t--g-forms-border-width: 0px;\r\n\t--g-icon-width: calc(var(--g-icon-size) + var(--g-forms-padding));\r\n\t--g-icon2-width: calc(var(--g-icon2-size) + var(--g-forms-padding));\r\n}\r\n\r\n.top-button.g-size_l {\r\n\t--g-forms-padding: var(--g-forms-padding_l);\r\n\t--g-forms-base-height: var(--g-forms-base-height_l);\r\n}\r\n\r\n.top-button.g-size_xl {\r\n\t--g-forms-padding: var(--g-forms-padding_xl);\r\n\t--g-forms-base-height: var(--g-forms-base-height_xl);\r\n}\r\n\r\n.top-button-progress {}\r\n</style>"],"names":["COLOR","STYLING","SIZE","useCssModule","computed"],"mappings":";;AA0CY,MAAA,0BAAAA,WAAL;AACNA,WAAA,OAAQ,IAAA;AACRA,WAAA,MAAO,IAAA;AACPA,WAAA,OAAQ,IAAA;AACRA,WAAA,QAAS,IAAA;AACTA,WAAA,KAAM,IAAA;AACNA,WAAA,MAAO,IAAA;AANIA,WAAAA;AAAAA,EAAA,GAAA,SAAA,CAAA,CAAA;AAYA,MAAA,4BAAAC,aAAL;AACNA,aAAA,SAAU,IAAA;AACVA,aAAA,SAAU,IAAA;AACVA,aAAA,MAAO,IAAA;AACPA,aAAA,aAAc,IAAA;AAJHA,WAAAA;AAAAA,EAAA,GAAA,WAAA,CAAA,CAAA;AAUA,MAAA,yBAAAC,UAAL;AACNA,UAAA,GAAI,IAAA;AACJA,UAAA,GAAI,IAAA;AACJA,UAAA,IAAK,IAAA;AAHMA,WAAAA;AAAAA,EAAA,GAAA,QAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;ACrDZ,YAAM,QAAQC,IAAAA;AAEd,YAAM,UAAUC,IAAAA,SAAS,MAAM,MAAM,OAAO,MAAM,QAAQ;AAE1D,YAAM,OAAOA,IAAAA,SAAS,MAAM,MAAM,WAAW,WAAW,MAAS;AAE3D,YAAA,UAAUA,IAAAA,SAAS,MAAM;AACvB,eAAA;AAAA,UACN,CAAC,GAAG,GAAG;AAAA,UACP,CAAC,UAAU,GAAG,MAAM;AAAA,UACpB,CAAC,YAAY,GAAG,MAAM;AAAA,UACtB,CAAC,MAAM,YAAY,CAAC,GAAG;AAAA,UACvB,CAAC,MAAM,qBAAqB,CAAC,GAAG,MAAM;AAAA,UACtC,CAAC,MAAM,UAAU,MAAM,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM;AAAA,UACzC,CAAC,MAAM,WAAW,MAAM,KAAK,EAAE,CAAC,GAAG;AAAA,UACnC,CAAC,MAAM,WAAW,MAAM,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM;AAAA,QAAA;AAAA,MAC9C,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/l/forms/forms.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent, useCssModule, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, withCtx, renderSlot, createTextVNode, toDisplayString } from "vue";
1
+ import { defineComponent, useCssModule, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, withCtx, renderSlot, createTextVNode, toDisplayString, useCssVars, createElementBlock } from "vue";
2
2
  var COLOR = /* @__PURE__ */ ((COLOR2) => {
3
3
  COLOR2["Theme"] = "theme";
4
4
  COLOR2["Blue"] = "blue";
@@ -21,7 +21,7 @@ var SIZE = /* @__PURE__ */ ((SIZE2) => {
21
21
  SIZE2["XL"] = "xl";
22
22
  return SIZE2;
23
23
  })(SIZE || {});
24
- /* @__PURE__ */ defineComponent({
24
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
25
25
  __name: "button",
26
26
  props: {
27
27
  color: { default: COLOR.Blue },
@@ -94,9 +94,57 @@ const style0$1 = {
94
94
  "g-size_l": "g-size_l",
95
95
  "g-size_xl": "g-size_xl"
96
96
  };
97
+ const _export_sfc = (sfc, props) => {
98
+ const target = sfc.__vccOpts || sfc;
99
+ for (const [key, val] of props) {
100
+ target[key] = val;
101
+ }
102
+ return target;
103
+ };
104
+ const cssModules$1 = {
105
+ "$style": style0$1
106
+ };
107
+ const Button = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__cssModules", cssModules$1]]);
108
+ const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
109
+ __proto__: null,
110
+ default: Button
111
+ }, Symbol.toStringTag, { value: "Module" }));
112
+ const _sfc_main = /* @__PURE__ */ defineComponent({
113
+ __name: "example",
114
+ props: {
115
+ text: { default: "Вы можете поменять этот текст в props.text" },
116
+ color: {},
117
+ isActive: { type: Boolean }
118
+ },
119
+ setup(__props) {
120
+ useCssVars((_ctx) => ({
121
+ "811e7836": _ctx.color
122
+ }));
123
+ return (_ctx, _cache) => {
124
+ return openBlock(), createElementBlock("div", {
125
+ class: normalizeClass({
126
+ [_ctx.$style.example]: true,
127
+ [_ctx.$style["g-active"]]: _ctx.isActive
128
+ })
129
+ }, toDisplayString(_ctx.text), 3);
130
+ };
131
+ }
132
+ });
97
133
  const example = "top-example";
98
134
  const style0 = {
99
135
  example,
100
136
  "g-active": "g-active"
101
137
  };
138
+ const cssModules = {
139
+ "$style": style0
140
+ };
141
+ const Example = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
142
+ const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
143
+ __proto__: null,
144
+ default: Example
145
+ }, Symbol.toStringTag, { value: "Module" }));
146
+ export {
147
+ index$1 as Button,
148
+ index as Example
149
+ };
102
150
  //# sourceMappingURL=forms.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"forms.js","sources":["../../../src/components/forms/button/button.ts","../../../src/components/forms/button/button.vue"],"sourcesContent":["import type { VNode } from 'vue';\r\n\r\n/**\r\n * Определение параметров\r\n */\r\nexport interface Props {\r\n\tcolor?: COLOR\r\n\tstyling?: STYLING // bug: name = style init with object type\r\n\tsize?: SIZE\r\n\r\n\tname?: string\r\n\ttitle?: string\r\n\ticon?: string\r\n\ticon2?: string\r\n\r\n\thref?: string // если установлена ссылка, isSubmit не может быть true\r\n\t// value?: string\r\n\r\n\tdisabled?: boolean\r\n\tisSubmit?: boolean\r\n\tisActive?: boolean\r\n\tisProgress?: boolean\r\n}\r\n\r\n/**\r\n * Определение слотов\r\n */\r\nexport interface Slots {\r\n\t/**\r\n\t * Cлот с проивзольным содержимым\r\n\t */\r\n\tdefault(): VNode[];\r\n}\r\n\r\n/**\r\n * Определение событий\r\n */\r\nexport interface Emits { }\r\n\r\n/**\r\n * Цвета\r\n */\r\nexport enum COLOR {\r\n\tTheme = 'theme',\r\n\tBlue = 'blue',\r\n\tGreen = 'green',\r\n\tOrange = 'orange',\r\n\tRed = 'red',\r\n\tPink = 'pink',\r\n}\r\n\r\n/**\r\n * Стили\r\n */\r\nexport enum STYLING {\r\n\tRegular = '',\r\n\tOutline = 'outline',\r\n\tSoft = 'soft',\r\n\tTransparent = 'transparent',\r\n}\r\n\r\n/**\r\n * Размеры\r\n */\r\nexport enum SIZE {\r\n\tS = '',\r\n\tL = 'l',\r\n\tXL = 'xl',\r\n}","<script setup lang=\"ts\">\r\nimport { computed, useCssModule } from 'vue';\r\nimport type { Props } from './button';\r\nimport { COLOR, STYLING, SIZE } from './button';\r\n\r\nconst props = withDefaults(defineProps<Props>(), {\r\n\tcolor: COLOR.Blue,\r\n\tstyling: STYLING.Regular,\r\n\tsize: SIZE.S,\r\n});\r\n\r\nconst style = useCssModule();\r\n\r\nconst tagName = computed(() => props.href ? 'a' : 'button');\r\n\r\nconst type = computed(() => props.isSubmit ? 'submit' : undefined);\r\n\r\nconst classes = computed(() => {\r\n\treturn {\r\n\t\t['g']: true,\r\n\t\t['g-active']: props.isActive,\r\n\t\t['g-disabled']: props.disabled,\r\n\t\t[style['top-button']]: true,\r\n\t\t[style['top-button-progress']]: props.isProgress,\r\n\t\t[style[`g-size_${props.size}`]]: !!props.size,\r\n\t\t[style[`g-color_${props.color}`]]: true,\r\n\t\t[style[`g-style_${props.styling}`]]: !!props.styling,\r\n\t};\r\n});\r\n</script>\r\n\r\n<template>\r\n\t<component\r\n\t\t:is=\"tagName\"\r\n\t\t:class=\"classes\"\r\n\t\t:name=\"name\"\r\n\t\t:title=\"title\"\r\n\t\t:href=\"href\"\r\n\t\t:type=\"type\"\r\n\t\t:data-g-icon=\"icon || undefined\"\r\n\t\t:data-g-icon2=\"icon2 || undefined\"\r\n\t\t:disabled=\"disabled || undefined\"\r\n\t\t:inProgress=\"isProgress\"\r\n\t>\r\n\t\t<slot>{{ !icon ? \"Button\" : \"\" }}</slot>\r\n\t</component>\r\n</template>\r\n\r\n<style module>\r\n@import \"./style/button.css\";\r\n@import \"./style/style-outline.css\";\r\n@import \"./style/style-soft.css\";\r\n@import \"./style/style-transparent.css\";\r\n\r\n.top-button {\r\n\t--top-button-color: var(--color-white);\r\n\t--top-button-background-color: transparent;\r\n\t--top-button-background-color-hover: var(--top-button-background-color);\r\n\t--top-button-background-color-active: var(--top-button-background-color-hover);\r\n\t--top-button-background-color-selected: var(--top-button-background-color-hover);\r\n\t--top-button-box-shadow: none;\r\n\t--top-button-box-shadow-hover: var(--g-shadow-darken-2);\r\n\t--top-button-box-shadow-active: var(--g-shadow-darken-3);\r\n\t--top-button-box-shadow-selected: var(--g-shadow-darken-3);\r\n\t--g-forms-border-width: 0px;\r\n\t--g-icon-width: calc(var(--g-icon-size) + var(--g-forms-padding));\r\n\t--g-icon2-width: calc(var(--g-icon2-size) + var(--g-forms-padding));\r\n}\r\n\r\n.top-button.g-size_l {\r\n\t--g-forms-padding: var(--g-forms-padding_l);\r\n\t--g-forms-base-height: var(--g-forms-base-height_l);\r\n}\r\n\r\n.top-button.g-size_xl {\r\n\t--g-forms-padding: var(--g-forms-padding_xl);\r\n\t--g-forms-base-height: var(--g-forms-base-height_xl);\r\n}\r\n\r\n.top-button-progress {}\r\n</style>"],"names":["COLOR","STYLING","SIZE"],"mappings":";AA0CY,IAAA,0BAAAA,WAAL;AACNA,SAAA,OAAQ,IAAA;AACRA,SAAA,MAAO,IAAA;AACPA,SAAA,OAAQ,IAAA;AACRA,SAAA,QAAS,IAAA;AACTA,SAAA,KAAM,IAAA;AACNA,SAAA,MAAO,IAAA;AANIA,SAAAA;AAAA,GAAA,SAAA,CAAA,CAAA;AAYA,IAAA,4BAAAC,aAAL;AACNA,WAAA,SAAU,IAAA;AACVA,WAAA,SAAU,IAAA;AACVA,WAAA,MAAO,IAAA;AACPA,WAAA,aAAc,IAAA;AAJHA,SAAAA;AAAA,GAAA,WAAA,CAAA,CAAA;AAUA,IAAA,yBAAAC,UAAL;AACNA,QAAA,GAAI,IAAA;AACJA,QAAA,GAAI,IAAA;AACJA,QAAA,IAAK,IAAA;AAHMA,SAAAA;AAAA,GAAA,QAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;ACrDZ,UAAM,QAAQ;AAEd,UAAM,UAAU,SAAS,MAAM,MAAM,OAAO,MAAM,QAAQ;AAE1D,UAAM,OAAO,SAAS,MAAM,MAAM,WAAW,WAAW,MAAS;AAE3D,UAAA,UAAU,SAAS,MAAM;AACvB,aAAA;AAAA,QACN,CAAC,GAAG,GAAG;AAAA,QACP,CAAC,UAAU,GAAG,MAAM;AAAA,QACpB,CAAC,YAAY,GAAG,MAAM;AAAA,QACtB,CAAC,MAAM,YAAY,CAAC,GAAG;AAAA,QACvB,CAAC,MAAM,qBAAqB,CAAC,GAAG,MAAM;AAAA,QACtC,CAAC,MAAM,UAAU,MAAM,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM;AAAA,QACzC,CAAC,MAAM,WAAW,MAAM,KAAK,EAAE,CAAC,GAAG;AAAA,QACnC,CAAC,MAAM,WAAW,MAAM,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM;AAAA,MAAA;AAAA,IAC9C,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"forms.js","sources":["../../../src/components/forms/button/button.ts","../../../src/components/forms/button/button.vue"],"sourcesContent":["import type { VNode } from 'vue';\r\n\r\n/**\r\n * Определение параметров\r\n */\r\nexport interface Props {\r\n\tcolor?: COLOR\r\n\tstyling?: STYLING // bug: name = style init with object type\r\n\tsize?: SIZE\r\n\r\n\tname?: string\r\n\ttitle?: string\r\n\ticon?: string\r\n\ticon2?: string\r\n\r\n\thref?: string // если установлена ссылка, isSubmit не может быть true\r\n\t// value?: string\r\n\r\n\tdisabled?: boolean\r\n\tisSubmit?: boolean\r\n\tisActive?: boolean\r\n\tisProgress?: boolean\r\n}\r\n\r\n/**\r\n * Определение слотов\r\n */\r\nexport interface Slots {\r\n\t/**\r\n\t * Cлот с проивзольным содержимым\r\n\t */\r\n\tdefault(): VNode[];\r\n}\r\n\r\n/**\r\n * Определение событий\r\n */\r\nexport interface Emits { }\r\n\r\n/**\r\n * Цвета\r\n */\r\nexport enum COLOR {\r\n\tTheme = 'theme',\r\n\tBlue = 'blue',\r\n\tGreen = 'green',\r\n\tOrange = 'orange',\r\n\tRed = 'red',\r\n\tPink = 'pink',\r\n}\r\n\r\n/**\r\n * Стили\r\n */\r\nexport enum STYLING {\r\n\tRegular = '',\r\n\tOutline = 'outline',\r\n\tSoft = 'soft',\r\n\tTransparent = 'transparent',\r\n}\r\n\r\n/**\r\n * Размеры\r\n */\r\nexport enum SIZE {\r\n\tS = '',\r\n\tL = 'l',\r\n\tXL = 'xl',\r\n}","<script setup lang=\"ts\">\r\nimport { computed, useCssModule } from 'vue';\r\nimport type { Props } from './button';\r\nimport { COLOR, STYLING, SIZE } from './button';\r\n\r\nconst props = withDefaults(defineProps<Props>(), {\r\n\tcolor: COLOR.Blue,\r\n\tstyling: STYLING.Regular,\r\n\tsize: SIZE.S,\r\n});\r\n\r\nconst style = useCssModule();\r\n\r\nconst tagName = computed(() => props.href ? 'a' : 'button');\r\n\r\nconst type = computed(() => props.isSubmit ? 'submit' : undefined);\r\n\r\nconst classes = computed(() => {\r\n\treturn {\r\n\t\t['g']: true,\r\n\t\t['g-active']: props.isActive,\r\n\t\t['g-disabled']: props.disabled,\r\n\t\t[style['top-button']]: true,\r\n\t\t[style['top-button-progress']]: props.isProgress,\r\n\t\t[style[`g-size_${props.size}`]]: !!props.size,\r\n\t\t[style[`g-color_${props.color}`]]: true,\r\n\t\t[style[`g-style_${props.styling}`]]: !!props.styling,\r\n\t};\r\n});\r\n</script>\r\n\r\n<template>\r\n\t<component\r\n\t\t:is=\"tagName\"\r\n\t\t:class=\"classes\"\r\n\t\t:name=\"name\"\r\n\t\t:title=\"title\"\r\n\t\t:href=\"href\"\r\n\t\t:type=\"type\"\r\n\t\t:data-g-icon=\"icon || undefined\"\r\n\t\t:data-g-icon2=\"icon2 || undefined\"\r\n\t\t:disabled=\"disabled || undefined\"\r\n\t\t:inProgress=\"isProgress\"\r\n\t>\r\n\t\t<slot>{{ !icon ? \"Button\" : \"\" }}</slot>\r\n\t</component>\r\n</template>\r\n\r\n<style module>\r\n@import \"./style/button.css\";\r\n@import \"./style/style-outline.css\";\r\n@import \"./style/style-soft.css\";\r\n@import \"./style/style-transparent.css\";\r\n\r\n.top-button {\r\n\t--top-button-color: var(--color-white);\r\n\t--top-button-background-color: transparent;\r\n\t--top-button-background-color-hover: var(--top-button-background-color);\r\n\t--top-button-background-color-active: var(--top-button-background-color-hover);\r\n\t--top-button-background-color-selected: var(--top-button-background-color-hover);\r\n\t--top-button-box-shadow: none;\r\n\t--top-button-box-shadow-hover: var(--g-shadow-darken-2);\r\n\t--top-button-box-shadow-active: var(--g-shadow-darken-3);\r\n\t--top-button-box-shadow-selected: var(--g-shadow-darken-3);\r\n\t--g-forms-border-width: 0px;\r\n\t--g-icon-width: calc(var(--g-icon-size) + var(--g-forms-padding));\r\n\t--g-icon2-width: calc(var(--g-icon2-size) + var(--g-forms-padding));\r\n}\r\n\r\n.top-button.g-size_l {\r\n\t--g-forms-padding: var(--g-forms-padding_l);\r\n\t--g-forms-base-height: var(--g-forms-base-height_l);\r\n}\r\n\r\n.top-button.g-size_xl {\r\n\t--g-forms-padding: var(--g-forms-padding_xl);\r\n\t--g-forms-base-height: var(--g-forms-base-height_xl);\r\n}\r\n\r\n.top-button-progress {}\r\n</style>"],"names":["COLOR","STYLING","SIZE"],"mappings":";AA0CY,IAAA,0BAAAA,WAAL;AACNA,SAAA,OAAQ,IAAA;AACRA,SAAA,MAAO,IAAA;AACPA,SAAA,OAAQ,IAAA;AACRA,SAAA,QAAS,IAAA;AACTA,SAAA,KAAM,IAAA;AACNA,SAAA,MAAO,IAAA;AANIA,SAAAA;AAAA,GAAA,SAAA,CAAA,CAAA;AAYA,IAAA,4BAAAC,aAAL;AACNA,WAAA,SAAU,IAAA;AACVA,WAAA,SAAU,IAAA;AACVA,WAAA,MAAO,IAAA;AACPA,WAAA,aAAc,IAAA;AAJHA,SAAAA;AAAA,GAAA,WAAA,CAAA,CAAA;AAUA,IAAA,yBAAAC,UAAL;AACNA,QAAA,GAAI,IAAA;AACJA,QAAA,GAAI,IAAA;AACJA,QAAA,IAAK,IAAA;AAHMA,SAAAA;AAAA,GAAA,QAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;ACrDZ,UAAM,QAAQ;AAEd,UAAM,UAAU,SAAS,MAAM,MAAM,OAAO,MAAM,QAAQ;AAE1D,UAAM,OAAO,SAAS,MAAM,MAAM,WAAW,WAAW,MAAS;AAE3D,UAAA,UAAU,SAAS,MAAM;AACvB,aAAA;AAAA,QACN,CAAC,GAAG,GAAG;AAAA,QACP,CAAC,UAAU,GAAG,MAAM;AAAA,QACpB,CAAC,YAAY,GAAG,MAAM;AAAA,QACtB,CAAC,MAAM,YAAY,CAAC,GAAG;AAAA,QACvB,CAAC,MAAM,qBAAqB,CAAC,GAAG,MAAM;AAAA,QACtC,CAAC,MAAM,UAAU,MAAM,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM;AAAA,QACzC,CAAC,MAAM,WAAW,MAAM,KAAK,EAAE,CAAC,GAAG;AAAA,QACnC,CAAC,MAAM,WAAW,MAAM,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM;AAAA,MAAA;AAAA,IAC9C,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@topvisor/ui",
3
3
  "private": false,
4
- "version": "0.0.8",
4
+ "version": "0.0.9",
5
5
  "type": "module",
6
6
  "description": "Topvisor UI-kit Vue",
7
7
  "author": "Topvisor",