@topvisor/ui 0.0.12 → 0.0.13

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.
@@ -22,7 +22,7 @@ define(["exports", "vue"], function(exports, vue) {
22
22
  SIZE2["XL"] = "xl";
23
23
  return SIZE2;
24
24
  })(SIZE || {});
25
- const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
25
+ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
26
26
  __name: "button",
27
27
  props: {
28
28
  color: { default: COLOR.Blue },
@@ -73,7 +73,7 @@ define(["exports", "vue"], function(exports, vue) {
73
73
  }
74
74
  });
75
75
  const progress = "_progress_fevtt_1";
76
- const style0$1 = {
76
+ const style0$2 = {
77
77
  "top-button": "top-button",
78
78
  "top-active": "top-active",
79
79
  "top-button-progress": "top-button-progress",
@@ -97,16 +97,16 @@ define(["exports", "vue"], function(exports, vue) {
97
97
  }
98
98
  return target;
99
99
  };
100
- const cssModules$1 = {
101
- "$style": style0$1
100
+ const cssModules$2 = {
101
+ "$style": style0$2
102
102
  };
103
- const button = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__cssModules", cssModules$1]]);
104
- const _hoisted_1 = ["name", "value", "checked", "indeterminate", "disabled"];
105
- const _hoisted_2 = {
103
+ const button = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__cssModules", cssModules$2]]);
104
+ const _hoisted_1$1 = ["name", "value", "checked", "indeterminate", "disabled"];
105
+ const _hoisted_2$1 = {
106
106
  key: 0,
107
107
  class: "top-checkbox_caption"
108
108
  };
109
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
109
+ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
110
110
  __name: "checkbox",
111
111
  props: {
112
112
  name: {},
@@ -140,22 +140,67 @@ define(["exports", "vue"], function(exports, vue) {
140
140
  checked: _ctx.checked,
141
141
  indeterminate: _ctx.indeterminate,
142
142
  disabled: _ctx.disabled
143
- }, null, 10, _hoisted_1),
144
- _ctx.title ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2, vue.toDisplayString(_ctx.title), 1)) : vue.createCommentVNode("", true)
143
+ }, null, 10, _hoisted_1$1),
144
+ _ctx.title ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$1, vue.toDisplayString(_ctx.title), 1)) : vue.createCommentVNode("", true)
145
145
  ], 2);
146
146
  };
147
147
  }
148
148
  });
149
- const style0 = {
149
+ const style0$1 = {
150
150
  "top-el": "top-el",
151
151
  "top-checkbox_input-switcher": "top-checkbox_input-switcher"
152
152
  };
153
+ const cssModules$1 = {
154
+ "$style": style0$1
155
+ };
156
+ const checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__cssModules", cssModules$1]]);
157
+ const _hoisted_1 = ["name", "value", "checked", "disabled"];
158
+ const _hoisted_2 = {
159
+ key: 0,
160
+ class: "top-radio_caption"
161
+ };
162
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
163
+ __name: "radio",
164
+ props: {
165
+ name: {},
166
+ value: {},
167
+ title: {},
168
+ checked: { type: Boolean },
169
+ disabled: { type: Boolean }
170
+ },
171
+ setup(__props) {
172
+ return (_ctx, _cache) => {
173
+ return vue.openBlock(), vue.createElementBlock("label", {
174
+ class: vue.normalizeClass(["top-el top-radio", {
175
+ ["top-radio_" + _ctx.name]: _ctx.name !== "",
176
+ ["top-active"]: _ctx.checked,
177
+ ["top-disabled"]: _ctx.disabled
178
+ }])
179
+ }, [
180
+ vue.createElementVNode("input", {
181
+ type: "radio",
182
+ class: "top-el top-radio_input",
183
+ name: _ctx.name,
184
+ value: _ctx.value,
185
+ checked: _ctx.checked,
186
+ disabled: _ctx.disabled
187
+ }, null, 8, _hoisted_1),
188
+ _ctx.title ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2, vue.toDisplayString(_ctx.title), 1)) : vue.createCommentVNode("", true)
189
+ ], 2);
190
+ };
191
+ }
192
+ });
193
+ const style0 = {
194
+ "top-radio": "top-radio",
195
+ "top-el": "top-el"
196
+ };
153
197
  const cssModules = {
154
198
  "$style": style0
155
199
  };
156
- const checkbox = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
200
+ const radio = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
157
201
  exports.Button = button;
158
202
  exports.Checkbox = checkbox;
203
+ exports.Radio = radio;
159
204
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
160
205
  });
161
206
  //# 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';\n\n/**\n * Определение параметров\n */\nexport interface Props {\n\tcolor?: COLOR\n\tstyling?: STYLING // bug: name = style init with object type\n\tsize?: SIZE\n\n\tname?: string\n\ttitle?: string\n\ticon?: string\n\ticon2?: string\n\n\thref?: string // если установлена ссылка, isSubmit не может быть true\n\t// value?: string\n\n\tdisabled?: boolean\n\tisSubmit?: boolean\n\tisActive?: boolean\n\tisProgress?: boolean\n}\n\n/**\n * Определение слотов\n */\nexport interface Slots {\n\t/**\n\t * Cлот с проивзольным содержимым\n\t */\n\tdefault(): VNode[];\n}\n\n/**\n * Определение событий\n */\nexport interface Emits { }\n\n/**\n * Цвета\n */\nexport enum COLOR {\n\tTheme = 'theme',\n\tBlue = 'blue',\n\tGreen = 'green',\n\tOrange = 'orange',\n\tRed = 'red',\n\tPink = 'pink',\n}\n\n/**\n * Стили\n */\nexport enum STYLING {\n\tRegular = '',\n\tOutline = 'outline',\n\tSoft = 'soft',\n\tTransparent = 'transparent',\n}\n\n/**\n * Размеры\n */\nexport enum SIZE {\n\tS = '',\n\tL = 'l',\n\tXL = 'xl',\n}","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport type { Props } from './button';\nimport { COLOR, STYLING, SIZE } from './button';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tcolor: COLOR.Blue,\n\tstyling: STYLING.Regular,\n\tsize: SIZE.S,\n});\n\nconst tagName = computed(() => props.href ? 'a' : 'button');\n\nconst type = computed(() => props.isSubmit ? 'submit' : undefined);\n</script>\n\n<template>\n\t<component\n\t\t:is=\"tagName\"\n\t\t:class=\"{\n\t\t\t['top-active']: props.isActive,\n\t\t\t['top-disabled']: props.disabled,\n\t\t\t[$style['top-button']]: true,\n\t\t\t[$style['top-button-progress']]: props.isProgress,\n\t\t\t[$style[`top-size_${props.size}`]]: !!props.size,\n\t\t\t[$style[`top-color_${props.color}`]]: true,\n\t\t\t[$style[`top-style_${props.styling}`]]: !!props.styling,\n\t\t}\"\n\t\t:name=\"name\"\n\t\t:title=\"title\"\n\t\t:href=\"href\"\n\t\t:type=\"type\"\n\t\t:data-top-icon=\"icon || undefined\"\n\t\t:data-top-icon2=\"icon2 || undefined\"\n\t\t:disabled=\"disabled || undefined\"\n\t\t:inProgress=\"isProgress\"\n\t>\n\t\t<slot>{{ !icon ? \"Button\" : \"\" }}</slot>\n\t</component>\n</template>\n\n<style module>\n@import \"./style/button.css\";\n@import \"./style/style-outline.css\";\n@import \"./style/style-soft.css\";\n@import \"./style/style-transparent.css\";\n\n.top-button {\n\t--top-button-color: var(--color-white);\n\t--top-button-background-color: transparent;\n\t--top-button-background-color-hover: var(--top-button-background-color);\n\t--top-button-background-color-active: var(--top-button-background-color-hover);\n\t--top-button-background-color-selected: var(--top-button-background-color-hover);\n\t--top-button-box-shadow: none;\n\t--top-button-box-shadow-hover: var(--top-shadow-darken-2);\n\t--top-button-box-shadow-active: var(--top-shadow-darken-3);\n\t--top-button-box-shadow-selected: var(--top-shadow-darken-3);\n\t--top-forms-border-width: 0px;\n\t--top-icon-width: calc(var(--top-icon-size) + var(--top-forms-padding));\n\t--top-icon2-width: calc(var(--top-icon2-size) + var(--top-forms-padding));\n}\n\n.top-button.top-size_l {\n\t--top-forms-padding: var(--top-forms-padding_l);\n\t--top-forms-base-height: var(--top-forms-base-height_l);\n}\n\n.top-button.top-size_xl {\n\t--top-forms-padding: var(--top-forms-padding_xl);\n\t--top-forms-base-height: var(--top-forms-base-height_xl);\n}\n\n.top-button-progress {}\n</style>"],"names":["COLOR","STYLING","SIZE","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,UAAUC,IAAAA,SAAS,MAAM,MAAM,OAAO,MAAM,QAAQ;AAE1D,YAAM,OAAOA,IAAAA,SAAS,MAAM,MAAM,WAAW,WAAW,MAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
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';\n\n/**\n * Определение параметров\n */\nexport interface Props {\n\tcolor?: COLOR\n\tstyling?: STYLING // bug: name = style init with object type\n\tsize?: SIZE\n\n\tname?: string\n\ttitle?: string\n\ticon?: string\n\ticon2?: string\n\n\thref?: string // если установлена ссылка, isSubmit не может быть true\n\t// value?: string\n\n\tdisabled?: boolean\n\tisSubmit?: boolean\n\tisActive?: boolean\n\tisProgress?: boolean\n}\n\n/**\n * Определение слотов\n */\nexport interface Slots {\n\t/**\n\t * Cлот с проивзольным содержимым\n\t */\n\tdefault(): VNode[];\n}\n\n/**\n * Определение событий\n */\nexport interface Emits { }\n\n/**\n * Цвета\n */\nexport enum COLOR {\n\tTheme = 'theme',\n\tBlue = 'blue',\n\tGreen = 'green',\n\tOrange = 'orange',\n\tRed = 'red',\n\tPink = 'pink',\n}\n\n/**\n * Стили\n */\nexport enum STYLING {\n\tRegular = '',\n\tOutline = 'outline',\n\tSoft = 'soft',\n\tTransparent = 'transparent',\n}\n\n/**\n * Размеры\n */\nexport enum SIZE {\n\tS = '',\n\tL = 'l',\n\tXL = 'xl',\n}","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport type { Props } from './button';\nimport { COLOR, STYLING, SIZE } from './button';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tcolor: COLOR.Blue,\n\tstyling: STYLING.Regular,\n\tsize: SIZE.S,\n});\n\nconst tagName = computed(() => props.href ? 'a' : 'button');\n\nconst type = computed(() => props.isSubmit ? 'submit' : undefined);\n</script>\n\n<template>\n\t<component\n\t\t:is=\"tagName\"\n\t\t:class=\"{\n\t\t\t['top-active']: props.isActive,\n\t\t\t['top-disabled']: props.disabled,\n\t\t\t[$style['top-button']]: true,\n\t\t\t[$style['top-button-progress']]: props.isProgress,\n\t\t\t[$style[`top-size_${props.size}`]]: !!props.size,\n\t\t\t[$style[`top-color_${props.color}`]]: true,\n\t\t\t[$style[`top-style_${props.styling}`]]: !!props.styling,\n\t\t}\"\n\t\t:name=\"name\"\n\t\t:title=\"title\"\n\t\t:href=\"href\"\n\t\t:type=\"type\"\n\t\t:data-top-icon=\"icon || undefined\"\n\t\t:data-top-icon2=\"icon2 || undefined\"\n\t\t:disabled=\"disabled || undefined\"\n\t\t:inProgress=\"isProgress\"\n\t>\n\t\t<slot>{{ !icon ? \"Button\" : \"\" }}</slot>\n\t</component>\n</template>\n\n<style module>\n@import \"./style/button.css\";\n@import \"./style/style-outline.css\";\n@import \"./style/style-soft.css\";\n@import \"./style/style-transparent.css\";\n\n.top-button {\n\t--top-button-color: var(--color-white);\n\t--top-button-background-color: transparent;\n\t--top-button-background-color-hover: var(--top-button-background-color);\n\t--top-button-background-color-active: var(--top-button-background-color-hover);\n\t--top-button-background-color-selected: var(--top-button-background-color-hover);\n\t--top-button-box-shadow: none;\n\t--top-button-box-shadow-hover: var(--top-shadow-darken-2);\n\t--top-button-box-shadow-active: var(--top-shadow-darken-3);\n\t--top-button-box-shadow-selected: var(--top-shadow-darken-3);\n\t--top-forms-border-width: 0px;\n\t--top-icon-width: calc(var(--top-icon-size) + var(--top-forms-padding));\n\t--top-icon2-width: calc(var(--top-icon2-size) + var(--top-forms-padding));\n}\n\n.top-button.top-size_l {\n\t--top-forms-padding: var(--top-forms-padding_l);\n\t--top-forms-base-height: var(--top-forms-base-height_l);\n}\n\n.top-button.top-size_xl {\n\t--top-forms-padding: var(--top-forms-padding_xl);\n\t--top-forms-base-height: var(--top-forms-base-height_xl);\n}\n\n.top-button-progress {}\n</style>"],"names":["COLOR","STYLING","SIZE","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,UAAUC,IAAAA,SAAS,MAAM,MAAM,OAAO,MAAM,QAAQ;AAE1D,YAAM,OAAOA,IAAAA,SAAS,MAAM,MAAM,WAAW,WAAW,MAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/l/forms/forms.js CHANGED
@@ -21,7 +21,7 @@ var SIZE = /* @__PURE__ */ ((SIZE2) => {
21
21
  SIZE2["XL"] = "xl";
22
22
  return SIZE2;
23
23
  })(SIZE || {});
24
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
24
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
25
25
  __name: "button",
26
26
  props: {
27
27
  color: { default: COLOR.Blue },
@@ -72,7 +72,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
72
72
  }
73
73
  });
74
74
  const progress = "_progress_fevtt_1";
75
- const style0$1 = {
75
+ const style0$2 = {
76
76
  "top-button": "top-button",
77
77
  "top-active": "top-active",
78
78
  "top-button-progress": "top-button-progress",
@@ -96,16 +96,16 @@ const _export_sfc = (sfc, props) => {
96
96
  }
97
97
  return target;
98
98
  };
99
- const cssModules$1 = {
100
- "$style": style0$1
99
+ const cssModules$2 = {
100
+ "$style": style0$2
101
101
  };
102
- const button = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__cssModules", cssModules$1]]);
103
- const _hoisted_1 = ["name", "value", "checked", "indeterminate", "disabled"];
104
- const _hoisted_2 = {
102
+ const button = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__cssModules", cssModules$2]]);
103
+ const _hoisted_1$1 = ["name", "value", "checked", "indeterminate", "disabled"];
104
+ const _hoisted_2$1 = {
105
105
  key: 0,
106
106
  class: "top-checkbox_caption"
107
107
  };
108
- const _sfc_main = /* @__PURE__ */ defineComponent({
108
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
109
109
  __name: "checkbox",
110
110
  props: {
111
111
  name: {},
@@ -139,22 +139,67 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
139
139
  checked: _ctx.checked,
140
140
  indeterminate: _ctx.indeterminate,
141
141
  disabled: _ctx.disabled
142
- }, null, 10, _hoisted_1),
143
- _ctx.title ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true)
142
+ }, null, 10, _hoisted_1$1),
143
+ _ctx.title ? (openBlock(), createElementBlock("span", _hoisted_2$1, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true)
144
144
  ], 2);
145
145
  };
146
146
  }
147
147
  });
148
- const style0 = {
148
+ const style0$1 = {
149
149
  "top-el": "top-el",
150
150
  "top-checkbox_input-switcher": "top-checkbox_input-switcher"
151
151
  };
152
+ const cssModules$1 = {
153
+ "$style": style0$1
154
+ };
155
+ const checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__cssModules", cssModules$1]]);
156
+ const _hoisted_1 = ["name", "value", "checked", "disabled"];
157
+ const _hoisted_2 = {
158
+ key: 0,
159
+ class: "top-radio_caption"
160
+ };
161
+ const _sfc_main = /* @__PURE__ */ defineComponent({
162
+ __name: "radio",
163
+ props: {
164
+ name: {},
165
+ value: {},
166
+ title: {},
167
+ checked: { type: Boolean },
168
+ disabled: { type: Boolean }
169
+ },
170
+ setup(__props) {
171
+ return (_ctx, _cache) => {
172
+ return openBlock(), createElementBlock("label", {
173
+ class: normalizeClass(["top-el top-radio", {
174
+ ["top-radio_" + _ctx.name]: _ctx.name !== "",
175
+ ["top-active"]: _ctx.checked,
176
+ ["top-disabled"]: _ctx.disabled
177
+ }])
178
+ }, [
179
+ createElementVNode("input", {
180
+ type: "radio",
181
+ class: "top-el top-radio_input",
182
+ name: _ctx.name,
183
+ value: _ctx.value,
184
+ checked: _ctx.checked,
185
+ disabled: _ctx.disabled
186
+ }, null, 8, _hoisted_1),
187
+ _ctx.title ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true)
188
+ ], 2);
189
+ };
190
+ }
191
+ });
192
+ const style0 = {
193
+ "top-radio": "top-radio",
194
+ "top-el": "top-el"
195
+ };
152
196
  const cssModules = {
153
197
  "$style": style0
154
198
  };
155
- const checkbox = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
199
+ const radio = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
156
200
  export {
157
201
  button as Button,
158
- checkbox as Checkbox
202
+ checkbox as Checkbox,
203
+ radio as Radio
159
204
  };
160
205
  //# 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';\n\n/**\n * Определение параметров\n */\nexport interface Props {\n\tcolor?: COLOR\n\tstyling?: STYLING // bug: name = style init with object type\n\tsize?: SIZE\n\n\tname?: string\n\ttitle?: string\n\ticon?: string\n\ticon2?: string\n\n\thref?: string // если установлена ссылка, isSubmit не может быть true\n\t// value?: string\n\n\tdisabled?: boolean\n\tisSubmit?: boolean\n\tisActive?: boolean\n\tisProgress?: boolean\n}\n\n/**\n * Определение слотов\n */\nexport interface Slots {\n\t/**\n\t * Cлот с проивзольным содержимым\n\t */\n\tdefault(): VNode[];\n}\n\n/**\n * Определение событий\n */\nexport interface Emits { }\n\n/**\n * Цвета\n */\nexport enum COLOR {\n\tTheme = 'theme',\n\tBlue = 'blue',\n\tGreen = 'green',\n\tOrange = 'orange',\n\tRed = 'red',\n\tPink = 'pink',\n}\n\n/**\n * Стили\n */\nexport enum STYLING {\n\tRegular = '',\n\tOutline = 'outline',\n\tSoft = 'soft',\n\tTransparent = 'transparent',\n}\n\n/**\n * Размеры\n */\nexport enum SIZE {\n\tS = '',\n\tL = 'l',\n\tXL = 'xl',\n}","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport type { Props } from './button';\nimport { COLOR, STYLING, SIZE } from './button';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tcolor: COLOR.Blue,\n\tstyling: STYLING.Regular,\n\tsize: SIZE.S,\n});\n\nconst tagName = computed(() => props.href ? 'a' : 'button');\n\nconst type = computed(() => props.isSubmit ? 'submit' : undefined);\n</script>\n\n<template>\n\t<component\n\t\t:is=\"tagName\"\n\t\t:class=\"{\n\t\t\t['top-active']: props.isActive,\n\t\t\t['top-disabled']: props.disabled,\n\t\t\t[$style['top-button']]: true,\n\t\t\t[$style['top-button-progress']]: props.isProgress,\n\t\t\t[$style[`top-size_${props.size}`]]: !!props.size,\n\t\t\t[$style[`top-color_${props.color}`]]: true,\n\t\t\t[$style[`top-style_${props.styling}`]]: !!props.styling,\n\t\t}\"\n\t\t:name=\"name\"\n\t\t:title=\"title\"\n\t\t:href=\"href\"\n\t\t:type=\"type\"\n\t\t:data-top-icon=\"icon || undefined\"\n\t\t:data-top-icon2=\"icon2 || undefined\"\n\t\t:disabled=\"disabled || undefined\"\n\t\t:inProgress=\"isProgress\"\n\t>\n\t\t<slot>{{ !icon ? \"Button\" : \"\" }}</slot>\n\t</component>\n</template>\n\n<style module>\n@import \"./style/button.css\";\n@import \"./style/style-outline.css\";\n@import \"./style/style-soft.css\";\n@import \"./style/style-transparent.css\";\n\n.top-button {\n\t--top-button-color: var(--color-white);\n\t--top-button-background-color: transparent;\n\t--top-button-background-color-hover: var(--top-button-background-color);\n\t--top-button-background-color-active: var(--top-button-background-color-hover);\n\t--top-button-background-color-selected: var(--top-button-background-color-hover);\n\t--top-button-box-shadow: none;\n\t--top-button-box-shadow-hover: var(--top-shadow-darken-2);\n\t--top-button-box-shadow-active: var(--top-shadow-darken-3);\n\t--top-button-box-shadow-selected: var(--top-shadow-darken-3);\n\t--top-forms-border-width: 0px;\n\t--top-icon-width: calc(var(--top-icon-size) + var(--top-forms-padding));\n\t--top-icon2-width: calc(var(--top-icon2-size) + var(--top-forms-padding));\n}\n\n.top-button.top-size_l {\n\t--top-forms-padding: var(--top-forms-padding_l);\n\t--top-forms-base-height: var(--top-forms-base-height_l);\n}\n\n.top-button.top-size_xl {\n\t--top-forms-padding: var(--top-forms-padding_xl);\n\t--top-forms-base-height: var(--top-forms-base-height_xl);\n}\n\n.top-button-progress {}\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,UAAU,SAAS,MAAM,MAAM,OAAO,MAAM,QAAQ;AAE1D,UAAM,OAAO,SAAS,MAAM,MAAM,WAAW,WAAW,MAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
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';\n\n/**\n * Определение параметров\n */\nexport interface Props {\n\tcolor?: COLOR\n\tstyling?: STYLING // bug: name = style init with object type\n\tsize?: SIZE\n\n\tname?: string\n\ttitle?: string\n\ticon?: string\n\ticon2?: string\n\n\thref?: string // если установлена ссылка, isSubmit не может быть true\n\t// value?: string\n\n\tdisabled?: boolean\n\tisSubmit?: boolean\n\tisActive?: boolean\n\tisProgress?: boolean\n}\n\n/**\n * Определение слотов\n */\nexport interface Slots {\n\t/**\n\t * Cлот с проивзольным содержимым\n\t */\n\tdefault(): VNode[];\n}\n\n/**\n * Определение событий\n */\nexport interface Emits { }\n\n/**\n * Цвета\n */\nexport enum COLOR {\n\tTheme = 'theme',\n\tBlue = 'blue',\n\tGreen = 'green',\n\tOrange = 'orange',\n\tRed = 'red',\n\tPink = 'pink',\n}\n\n/**\n * Стили\n */\nexport enum STYLING {\n\tRegular = '',\n\tOutline = 'outline',\n\tSoft = 'soft',\n\tTransparent = 'transparent',\n}\n\n/**\n * Размеры\n */\nexport enum SIZE {\n\tS = '',\n\tL = 'l',\n\tXL = 'xl',\n}","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport type { Props } from './button';\nimport { COLOR, STYLING, SIZE } from './button';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tcolor: COLOR.Blue,\n\tstyling: STYLING.Regular,\n\tsize: SIZE.S,\n});\n\nconst tagName = computed(() => props.href ? 'a' : 'button');\n\nconst type = computed(() => props.isSubmit ? 'submit' : undefined);\n</script>\n\n<template>\n\t<component\n\t\t:is=\"tagName\"\n\t\t:class=\"{\n\t\t\t['top-active']: props.isActive,\n\t\t\t['top-disabled']: props.disabled,\n\t\t\t[$style['top-button']]: true,\n\t\t\t[$style['top-button-progress']]: props.isProgress,\n\t\t\t[$style[`top-size_${props.size}`]]: !!props.size,\n\t\t\t[$style[`top-color_${props.color}`]]: true,\n\t\t\t[$style[`top-style_${props.styling}`]]: !!props.styling,\n\t\t}\"\n\t\t:name=\"name\"\n\t\t:title=\"title\"\n\t\t:href=\"href\"\n\t\t:type=\"type\"\n\t\t:data-top-icon=\"icon || undefined\"\n\t\t:data-top-icon2=\"icon2 || undefined\"\n\t\t:disabled=\"disabled || undefined\"\n\t\t:inProgress=\"isProgress\"\n\t>\n\t\t<slot>{{ !icon ? \"Button\" : \"\" }}</slot>\n\t</component>\n</template>\n\n<style module>\n@import \"./style/button.css\";\n@import \"./style/style-outline.css\";\n@import \"./style/style-soft.css\";\n@import \"./style/style-transparent.css\";\n\n.top-button {\n\t--top-button-color: var(--color-white);\n\t--top-button-background-color: transparent;\n\t--top-button-background-color-hover: var(--top-button-background-color);\n\t--top-button-background-color-active: var(--top-button-background-color-hover);\n\t--top-button-background-color-selected: var(--top-button-background-color-hover);\n\t--top-button-box-shadow: none;\n\t--top-button-box-shadow-hover: var(--top-shadow-darken-2);\n\t--top-button-box-shadow-active: var(--top-shadow-darken-3);\n\t--top-button-box-shadow-selected: var(--top-shadow-darken-3);\n\t--top-forms-border-width: 0px;\n\t--top-icon-width: calc(var(--top-icon-size) + var(--top-forms-padding));\n\t--top-icon2-width: calc(var(--top-icon2-size) + var(--top-forms-padding));\n}\n\n.top-button.top-size_l {\n\t--top-forms-padding: var(--top-forms-padding_l);\n\t--top-forms-base-height: var(--top-forms-base-height_l);\n}\n\n.top-button.top-size_xl {\n\t--top-forms-padding: var(--top-forms-padding_xl);\n\t--top-forms-base-height: var(--top-forms-base-height_xl);\n}\n\n.top-button-progress {}\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,UAAU,SAAS,MAAM,MAAM,OAAO,MAAM,QAAQ;AAE1D,UAAM,OAAO,SAAS,MAAM,MAAM,WAAW,WAAW,MAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/l/style.css CHANGED
@@ -318,3 +318,35 @@ a.top-button:hover {
318
318
  background: var(--top-checkbox-background-color-checked-hover);
319
319
  color: var(--top-checkbox_input-switcher-color-checked-hover);
320
320
  }
321
+
322
+ :root {
323
+ --top-radio-background-color: var(--content-background-color);
324
+ --top-radio-background-color-hover: var(--top-radio-background-color);
325
+ --top-radio-background-color-active: var(--top-radio-background-color);
326
+ }
327
+ .top-radio {
328
+ cursor: pointer;
329
+ }
330
+ [type="radio"].top-el:before {
331
+ content: ' ';
332
+ border-radius: 100%;
333
+ border: 1px solid var(--color-gray-200);
334
+ width: 16px;
335
+ height: 16px;
336
+ }
337
+ [type="radio"].top-el:hover:before,
338
+ .top-radio:hover > [type="radio"].top-el:before {
339
+ border-color: var(--top-radio-color-hover);
340
+ }
341
+ [type="radio"].top-el:checked:before {
342
+ box-shadow:
343
+ var(--top-radio-background-color) 1px 1px 0 inset,
344
+ var(--top-radio-background-color) -1px -1px 0 inset,
345
+ var(--top-radio-background-color) 1px -1px 0 inset,
346
+ var(--top-radio-background-color) -1px 1px 0 inset;
347
+ background: var(--top-radio-color);
348
+ border-color: var(--top-radio-color);
349
+ }
350
+ [type="radio"].top-el[title]:after {
351
+ margin: 0 0 0 8px;
352
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@topvisor/ui",
3
3
  "private": false,
4
- "version": "0.0.12",
4
+ "version": "0.0.13",
5
5
  "type": "module",
6
6
  "description": "Topvisor UI-kit Vue",
7
7
  "author": "Topvisor",