@opens/ui 1.0.2 → 1.0.4

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,5 +1,5 @@
1
- import { defineComponent as v, ref as i, watch as $, openBlock as p, createElementBlock as f, createElementVNode as t, toDisplayString as c, normalizeClass as y, withDirectives as b, withKeys as _, vModelDynamic as C, vModelText as V, renderSlot as g, vShow as h, createVNode as w, withCtx as D, vModelCheckbox as I, createTextVNode as T } from "vue";
2
- const N = { class: "simple-input" }, P = { class: "yu-flex yu-h-full yu-pl-2" }, E = { class: "material-icons yu-text-gray-700 yu-my-auto" }, K = ["placeholder", "type", "maxlength"], M = /* @__PURE__ */ v({
1
+ import { defineComponent as v, ref as i, watch as $, openBlock as p, createElementBlock as f, createElementVNode as t, toDisplayString as c, normalizeClass as y, withDirectives as x, withKeys as _, vModelDynamic as C, vModelText as V, renderSlot as g, vShow as h, createVNode as w, withCtx as D, vModelCheckbox as I, createTextVNode as T } from "vue";
2
+ const N = { class: "simple-input" }, P = { class: "yu-flex yu-h-full yu-pl-2" }, z = { class: "material-icons yu-text-gray-700 yu-my-auto" }, E = ["placeholder", "type", "maxlength"], K = /* @__PURE__ */ v({
3
3
  __name: "icon-text-input",
4
4
  props: {
5
5
  value: null,
@@ -28,32 +28,32 @@ const N = { class: "simple-input" }, P = { class: "yu-flex yu-h-full yu-pl-2" },
28
28
  function r() {
29
29
  return !(s.value || l.value);
30
30
  }
31
- function x(d) {
31
+ function b(d) {
32
32
  u("input", d.target.value);
33
33
  }
34
34
  return (d, o) => (p(), f("div", N, [
35
35
  t("div", P, [
36
- t("i", E, c(e.icon), 1),
36
+ t("i", z, c(e.icon), 1),
37
37
  t("p", {
38
38
  class: y(["yu-text-gray-500 yu-font-plus yu-font-medium yu-p-1 yu-px-2 yu-transition", { "yu-translate-y-2 yu-text-sm": r(), "yu-translate-y-0 yu-text-xs": !r() }])
39
39
  }, c(e.label), 3)
40
40
  ]),
41
- b(t("input", {
41
+ x(t("input", {
42
42
  class: "yu-pl-8 yu-absolute yu-w-full yu-h-full yu-outline-none yu-bg-transparent yu-appearence-none yu-indent-2 yu-pt-3 yu-font-plus yu-font-semibold yu-text-gray-800",
43
43
  placeholder: e.placeholder,
44
- onInput: x,
44
+ onInput: b,
45
45
  onFocus: o[0] || (o[0] = (m) => s.value = !0),
46
46
  onBlur: o[1] || (o[1] = (m) => s.value = !1),
47
47
  "onUpdate:modelValue": o[2] || (o[2] = (m) => l.value = m),
48
48
  type: a.value || e.type,
49
49
  onKeyup: o[3] || (o[3] = _((m) => d.$emit("keyup-enter"), ["enter"])),
50
50
  maxlength: e.caract
51
- }, null, 40, K), [
51
+ }, null, 40, E), [
52
52
  [C, l.value]
53
53
  ])
54
54
  ]));
55
55
  }
56
- }), U = ["disabled"], k = /* @__PURE__ */ v({
56
+ }), M = ["disabled"], k = /* @__PURE__ */ v({
57
57
  __name: "text-input",
58
58
  props: {
59
59
  modelValue: null,
@@ -70,7 +70,7 @@ const N = { class: "simple-input" }, P = { class: "yu-flex yu-h-full yu-pl-2" },
70
70
  function r(d) {
71
71
  u(d);
72
72
  }
73
- function x(d) {
73
+ function b(d) {
74
74
  const o = d.target;
75
75
  u("update:model-value", o.value);
76
76
  }
@@ -80,21 +80,21 @@ const N = { class: "simple-input" }, P = { class: "yu-flex yu-h-full yu-pl-2" },
80
80
  t("p", {
81
81
  class: y(["yu-text-gray-500 yu-font-plus yu-font-medium yu-p-1 yu-px-2 yu-transition", { "yu-translate-y-1/4 yu-text-sm": s(), "yu-translate-x-0 yu-text-xs": !s() }])
82
82
  }, c(e.label), 3),
83
- b(t("input", {
83
+ x(t("input", {
84
84
  class: "yu-absolute yu-w-full yu-h-full yu-outline-none yu-bg-transparent yu-appearence-none yu-indent-2 yu-pt-3 yu-font-plus yu-font-semibold yu-text-gray-800 dark:yu-text-gray-200",
85
85
  "onUpdate:modelValue": o[0] || (o[0] = (m) => l.value = m),
86
86
  type: "text",
87
87
  disabled: e.disabled,
88
- onInput: x,
88
+ onInput: b,
89
89
  onKeyup: o[1] || (o[1] = _((m) => r("press-enter"), ["enter"])),
90
90
  onFocus: o[2] || (o[2] = (m) => a.value = !0),
91
91
  onBlur: o[3] || (o[3] = (m) => a.value = !1)
92
- }, null, 40, U), [
92
+ }, null, 40, M), [
93
93
  [V, l.value]
94
94
  ])
95
95
  ], 2));
96
96
  }
97
- }), F = ["checked"], L = /* @__PURE__ */ v({
97
+ }), U = ["checked"], F = /* @__PURE__ */ v({
98
98
  __name: "switch-checkbox",
99
99
  props: {
100
100
  modelValue: { type: Boolean },
@@ -114,14 +114,14 @@ const N = { class: "simple-input" }, P = { class: "yu-flex yu-h-full yu-pl-2" },
114
114
  class: "yu-absolute yu-block yu-w-6 yu-h-6 yu-bg-white yu-border-4 yu-rounded-full yu-appearance-none yu-cursor-pointer toggle-checkbox checked:yu-right-0 checked:yu-border-primary-500",
115
115
  type: "checkbox",
116
116
  checked: l.value
117
- }, null, 8, F),
117
+ }, null, 8, U),
118
118
  t("label", {
119
119
  class: y(["yu-block yu-h-6 yu-overflow-hidden yu-bg-gray-300 yu-rounded-full yu-cursor-pointer yu-toggle-label", { "yu-bg-primary-500": l.value }]),
120
120
  for: "toggle"
121
121
  }, null, 2)
122
122
  ]));
123
123
  }
124
- }), j = /* @__PURE__ */ v({
124
+ }), L = /* @__PURE__ */ v({
125
125
  __name: "button-primary",
126
126
  props: {
127
127
  large: {
@@ -152,7 +152,7 @@ const N = { class: "simple-input" }, P = { class: "yu-flex yu-h-full yu-pl-2" },
152
152
  g(u.$slots, "default")
153
153
  ], 2));
154
154
  }
155
- }), q = /* @__PURE__ */ v({
155
+ }), j = /* @__PURE__ */ v({
156
156
  __name: "button-secondary",
157
157
  props: {
158
158
  large: {
@@ -183,9 +183,9 @@ const N = { class: "simple-input" }, P = { class: "yu-flex yu-h-full yu-pl-2" },
183
183
  g(u.$slots, "default")
184
184
  ], 2));
185
185
  }
186
- }), z = { class: "yu-transition yu-text-gray-900 yu-font-plus yu-text-sm yu-p-2 yu-font-semibold yu-rounded-md yu-cursor-pointer yu-flex yu-items-center active:yu-scale-95 hover:yu-bg-primary-500 hover:!yu-bg-opacity-10 hover:yu-text-primary-400" };
186
+ }), q = { class: "yu-transition yu-text-gray-900 yu-font-plus yu-text-sm yu-p-2 yu-font-semibold yu-rounded-md yu-cursor-pointer yu-flex yu-items-center active:yu-scale-95 hover:yu-bg-primary-500 hover:!yu-bg-opacity-10 hover:yu-text-primary-400" };
187
187
  function A(e, u) {
188
- return p(), f("div", z, [
188
+ return p(), f("div", q, [
189
189
  g(e.$slots, "default")
190
190
  ]);
191
191
  }
@@ -196,7 +196,7 @@ const B = (e, u) => {
196
196
  return n;
197
197
  };
198
198
  var O = {};
199
- const S = /* @__PURE__ */ B(O, [["render", A]]), G = { class: "yu-relative yu-w-full" }, H = { class: "yu-text-gray-700 yu-font-plus yu-font-medium yu-text-base yu-mr-2" }, J = { class: "yu-mt-2 yu-w-full yu-bg-white yu-rounded-md yu-flex yu-flex-col yu-gap-1 yu-shadow-md yu-absolute" }, Q = /* @__PURE__ */ v({
199
+ const S = /* @__PURE__ */ B(O, [["render", A]]), G = { class: "yu-relative yu-w-full" }, H = { class: "yu-text-gray-700 yu-font-plus yu-font-medium yu-text-base yu-mr-2" }, J = { class: "yu-mt-2 yu-w-full yu-bg-white yu-rounded-md yu-flex yu-flex-col yu-gap-1 yu-shadow-md yu-absolute yu-z-10" }, Q = /* @__PURE__ */ v({
200
200
  __name: "simple-dropdown",
201
201
  props: {
202
202
  label: {
@@ -213,10 +213,10 @@ const S = /* @__PURE__ */ B(O, [["render", A]]), G = { class: "yu-relative yu-w-
213
213
  return (n, l) => (p(), f("div", null, [
214
214
  t("div", G, [
215
215
  t("button", {
216
- class: y(["yu-ml-auto yu-bg-gray-700 yu-bg-opacity-0 yu-px-3 yu-p-2 yu-rounded-md yu-flex yu-gap-1 yu-transition hover:yu-bg-opacity-10 yu-group active:yu-bg-primary-500 active:!yu-bg-opacity-10 active:yu-scale-95", { "!yu-bg-primary-500 !yu-bg-opacity-10": u.value }]),
216
+ class: y(["yu-w-full yu-bg-gray-700 yu-bg-opacity-0 yu-px-3 yu-p-2 yu-rounded-md yu-flex yu-gap-1 yu-transition hover:yu-bg-opacity-10 yu-group active:yu-bg-primary-500 active:!yu-bg-opacity-10 active:yu-scale-95", { "!yu-bg-primary-500 !yu-bg-opacity-10": u.value }]),
217
217
  onClick: l[0] || (l[0] = (a) => u.value = !u.value)
218
218
  }, [
219
- b(t("i", {
219
+ x(t("i", {
220
220
  class: y(["material-icons yu-text-gray-700 yu-h-fit", { "yu-text-primary-500": u.value }])
221
221
  }, c(e.icon), 3), [
222
222
  [h, e.icon]
@@ -226,7 +226,7 @@ const S = /* @__PURE__ */ B(O, [["render", A]]), G = { class: "yu-relative yu-w-
226
226
  class: y(["material-icons yu-text-gray-700 yu-h-fit yu-ml-auto", { "yu-text-primary-500 yu-rotate-180": u.value }])
227
227
  }, " keyboard_arrow_down", 2)
228
228
  ], 2),
229
- b(t("div", J, [
229
+ x(t("div", J, [
230
230
  t("div", {
231
231
  class: "yu-w-full yu-rounded-md yu-p-2",
232
232
  onClick: l[1] || (l[1] = (a) => u.value = !1)
@@ -239,7 +239,7 @@ const S = /* @__PURE__ */ B(O, [["render", A]]), G = { class: "yu-relative yu-w-
239
239
  ])
240
240
  ]));
241
241
  }
242
- }), R = { class: "yu-w-fit" }, W = { class: "yu-text-gray-700 yu-font-plus yu-font-medium yu-text-base yu-mr-2" }, X = { class: "yu-mt-2 yu-w-full yu-bg-white yu-rounded-md yu-shadow-md" }, Y = { class: "yu-w-full yu-rounded-md yu-p-2 yu-flex yu-flex-col yu-gap-1" }, Z = /* @__PURE__ */ t("div", { class: "yu-text-gray-700 yu-text-xs" }, "Selecionar todos", -1), ee = /* @__PURE__ */ v({
242
+ }), R = { class: "yu-w-fit yu-relative" }, W = { class: "yu-text-gray-700 yu-font-plus yu-font-medium yu-text-base yu-mr-2" }, X = { class: "yu-mt-2 yu-w-full yu-bg-white yu-rounded-md yu-shadow-md yu-z-10 yu-absolute" }, Y = { class: "yu-w-full yu-rounded-md yu-p-2 yu-flex yu-flex-col yu-gap-1" }, Z = /* @__PURE__ */ t("div", { class: "yu-text-gray-700 yu-text-xs" }, "Selecionar todos", -1), ee = /* @__PURE__ */ v({
243
243
  __name: "select-dropdown",
244
244
  props: {
245
245
  label: {
@@ -263,7 +263,7 @@ const S = /* @__PURE__ */ B(O, [["render", A]]), G = { class: "yu-relative yu-w-
263
263
  return (s, r) => (p(), f("div", R, [
264
264
  t("button", {
265
265
  class: y(["yu-bg-gray-700 yu-bg-opacity-0 yu-px-3 yu-p-2 yu-rounded-md yu-flex yu-gap-1 yu-transition hover:yu-bg-opacity-10 yu-group active:yu-bg-primary-500 active:!yu-bg-opacity-10 active:yu-scale-95", { "!yu-bg-primary-500 !yu-bg-opacity-10": n.value }]),
266
- onClick: r[0] || (r[0] = (x) => n.value = !n.value)
266
+ onClick: r[0] || (r[0] = (b) => n.value = !n.value)
267
267
  }, [
268
268
  t("i", {
269
269
  class: y(["material-icons yu-text-gray-700 yu-h-fit", { "yu-text-primary-500": n.value }])
@@ -273,18 +273,18 @@ const S = /* @__PURE__ */ B(O, [["render", A]]), G = { class: "yu-relative yu-w-
273
273
  class: y(["material-icons yu-text-gray-700 yu-h-fit yu-ml-auto", { "yu-text-primary-500 yu-rotate-180": n.value }])
274
274
  }, " keyboard_arrow_down", 2)
275
275
  ], 2),
276
- b(t("div", X, [
276
+ x(t("div", X, [
277
277
  t("div", Y, [
278
278
  w(k, { label: "Dropdown" }),
279
279
  w(S, {
280
- onClick: r[2] || (r[2] = (x) => a())
280
+ onClick: r[2] || (r[2] = (b) => a())
281
281
  }, {
282
282
  default: D(() => [
283
283
  Z,
284
- b(t("input", {
284
+ x(t("input", {
285
285
  class: "yu-ml-auto yu-accent-primary-500 yu-border-2 yu-cursor-pointer",
286
286
  type: "checkbox",
287
- "onUpdate:modelValue": r[1] || (r[1] = (x) => l.value = x)
287
+ "onUpdate:modelValue": r[1] || (r[1] = (b) => l.value = b)
288
288
  }, null, 512), [
289
289
  [I, l.value]
290
290
  ])
@@ -355,19 +355,19 @@ var ce = {};
355
355
  const pe = /* @__PURE__ */ B(ce, [["render", de]]);
356
356
  const me = {
357
357
  install: (e) => {
358
- e.component("TextInput", k), e.component("IconTextInput", M), e.component("SwitchCheckbox", L), e.component("ButtonPrimary", j), e.component("ButtonSecondary", q), e.component("SimpleDropdown", Q), e.component("SelectDropdown", ee), e.component("SimpleDropdownItem", S), e.component("StatCard", ye), e.component("ListCard", pe);
358
+ e.component("TextInput", k), e.component("IconTextInput", K), e.component("SwitchCheckbox", F), e.component("ButtonPrimary", L), e.component("ButtonSecondary", j), e.component("SimpleDropdown", Q), e.component("SelectDropdown", ee), e.component("SimpleDropdownItem", S), e.component("StatCard", ye), e.component("ListCard", pe);
359
359
  }
360
360
  };
361
361
  export {
362
- j as ButtonPrimary,
363
- q as ButtonSecondary,
364
- M as IconTextInput,
362
+ L as ButtonPrimary,
363
+ j as ButtonSecondary,
364
+ K as IconTextInput,
365
365
  pe as ListCard,
366
366
  ee as SelectDropdown,
367
367
  Q as SimpleDropdown,
368
368
  S as SimpleDropdownItem,
369
369
  ye as StatCard,
370
- L as SwitchCheckbox,
370
+ F as SwitchCheckbox,
371
371
  k as TextInput,
372
372
  me as default
373
373
  };