mhz-ui 1.2.11 → 1.2.12

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.
@@ -0,0 +1 @@
1
+ ._container_18qot_1{display:flex;flex-grow:1;flex-direction:column;gap:4px;width:100%}._options_18qot_9{display:flex;height:40px;border:1px solid var(--color-gray);border-radius:16px}._options_18qot_9[data-tall=true]{height:52px}._button_18qot_19{display:flex;flex-grow:1;align-items:center;justify-content:center;font-size:1rem;cursor:pointer;background-color:var(--color-gray-light);border:none}._button_18qot_19:first-child{border-top-left-radius:16px;border-bottom-left-radius:16px}._button_18qot_19[data-fill=true]:last-child{border-top-right-radius:16px;border-bottom-right-radius:16px}._button_18qot_19[data-current=true]{color:var(--color-white);background-color:var(--color-accent-dark)}._input_18qot_42{flex-grow:1;min-width:60px;max-width:80px;font-size:1rem;text-align:center;outline:none;border:none;border-top-right-radius:16px;border-bottom-right-radius:16px}
@@ -0,0 +1,13 @@
1
+ interface IProps {
2
+ modelValue: number;
3
+ options: number[];
4
+ title: string;
5
+ isTall?: boolean;
6
+ isInput?: boolean;
7
+ }
8
+ declare const _default: import('vue').DefineComponent<IProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
+ "update:modelValue": (options: number) => any;
10
+ }, string, import('vue').PublicProps, Readonly<IProps> & Readonly<{
11
+ "onUpdate:modelValue"?: ((options: number) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
13
+ export default _default;
@@ -0,0 +1,58 @@
1
+ import "./UiChoice.css";
2
+ import { defineComponent as m, createElementBlock as n, openBlock as s, normalizeClass as l, createElementVNode as u, toDisplayString as r, createCommentVNode as _, Fragment as y, renderList as b } from "vue";
3
+ import { _ as f } from "../_plugin-vue_export-helper-CHgC5LLL.js";
4
+ const C = ["data-tall"], V = ["onClick", "data-current", "data-fill"], k = ["value"], $ = /* @__PURE__ */ m({
5
+ __name: "UiChoice",
6
+ props: {
7
+ modelValue: {},
8
+ options: {},
9
+ title: {},
10
+ isTall: { type: Boolean },
11
+ isInput: { type: Boolean }
12
+ },
13
+ emits: ["update:modelValue"],
14
+ setup(c, { emit: p }) {
15
+ const e = c, d = p;
16
+ function a(t) {
17
+ d("update:modelValue", typeof t == "number" ? t : Number(t.target.value));
18
+ }
19
+ return (t, i) => (s(), n("div", {
20
+ class: l(t.$style.container)
21
+ }, [
22
+ u("label", null, r(e.title), 1),
23
+ u("div", {
24
+ class: l(t.$style.options),
25
+ "data-tall": e.isTall
26
+ }, [
27
+ (s(!0), n(y, null, b(e.options, (o) => (s(), n("button", {
28
+ key: o,
29
+ onClick: (N) => a(o),
30
+ type: "button",
31
+ class: l(t.$style.button),
32
+ "data-current": e.modelValue === o,
33
+ "data-fill": !e.isInput
34
+ }, r(o), 11, V))), 128)),
35
+ e.isInput ? (s(), n("input", {
36
+ key: 0,
37
+ type: "number",
38
+ class: l(t.$style.input),
39
+ value: e.modelValue,
40
+ onChange: i[0] || (i[0] = (o) => a(o)),
41
+ step: "1",
42
+ min: "1",
43
+ max: "60"
44
+ }, null, 42, k)) : _("", !0)
45
+ ], 10, C)
46
+ ], 2));
47
+ }
48
+ }), h = "_container_18qot_1", g = "_options_18qot_9", q = "_button_18qot_19", v = "_input_18qot_42", B = {
49
+ container: h,
50
+ options: g,
51
+ button: q,
52
+ input: v
53
+ }, I = {
54
+ $style: B
55
+ }, T = /* @__PURE__ */ f($, [["__cssModules", I]]);
56
+ export {
57
+ T as default
58
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import { Meta, StoryObj } from '@storybook/vue3';
2
+ import { UiChoice } from '..';
3
+ declare const meta: Meta<typeof UiChoice>;
4
+ type Story = StoryObj<typeof UiChoice>;
5
+ export default meta;
6
+ export declare const Primary: Story;
@@ -0,0 +1,5 @@
1
+ export declare const options: number[];
2
+ export declare const modelValue: number;
3
+ export declare const title = "\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A";
4
+ export declare const isTall = true;
5
+ export declare const isInput = true;