@devix-tecnologia/timeline-vue 1.1.1 → 1.1.2

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.
Files changed (41) hide show
  1. package/README.md +41 -36
  2. package/dist/style.css +1 -1
  3. package/dist/timeline-vue.es.js +47 -47
  4. package/dist/types/components/timeline/organismos/Timeline.vue.d.ts +1 -0
  5. package/package.json +2 -2
  6. package/src/assets/vue.svg +0 -1
  7. package/src/components/timeline/atomos/AvatarTimeline.stories.ts +0 -32
  8. package/src/components/timeline/atomos/AvatarTimeline.vue +0 -51
  9. package/src/components/timeline/atomos/BoxData.stories.ts +0 -41
  10. package/src/components/timeline/atomos/BoxData.vue +0 -57
  11. package/src/components/timeline/atomos/Destaque.stories.ts +0 -24
  12. package/src/components/timeline/atomos/Destaque.vue +0 -39
  13. package/src/components/timeline/atomos/Hora.stories.ts +0 -36
  14. package/src/components/timeline/atomos/Hora.vue +0 -50
  15. package/src/components/timeline/atomos/IconeCategoria.stories.ts +0 -60
  16. package/src/components/timeline/atomos/IconeCategoria.vue +0 -110
  17. package/src/components/timeline/atomos/IconeStatus.stories.ts +0 -38
  18. package/src/components/timeline/atomos/IconeStatus.vue +0 -73
  19. package/src/components/timeline/atomos/SubtituloEvento.stories.ts +0 -24
  20. package/src/components/timeline/atomos/SubtituloEvento.vue +0 -33
  21. package/src/components/timeline/atomos/TituloEvento.stories.ts +0 -24
  22. package/src/components/timeline/atomos/TituloEvento.vue +0 -32
  23. package/src/components/timeline/index.ts +0 -7
  24. package/src/components/timeline/moleculas/DescricaoEvento.stories.ts +0 -31
  25. package/src/components/timeline/moleculas/DescricaoEvento.vue +0 -59
  26. package/src/components/timeline/moleculas/EventoTimeline.stories.ts +0 -94
  27. package/src/components/timeline/moleculas/EventoTimeline.vue +0 -158
  28. package/src/components/timeline/moleculas/HoraEvento.stories.ts +0 -37
  29. package/src/components/timeline/moleculas/HoraEvento.vue +0 -74
  30. package/src/components/timeline/moleculas/PerfilTimeline.stories.ts +0 -40
  31. package/src/components/timeline/moleculas/PerfilTimeline.vue +0 -76
  32. package/src/components/timeline/moleculas/SeparadorPeriodo.stories.ts +0 -42
  33. package/src/components/timeline/moleculas/SeparadorPeriodo.vue +0 -100
  34. package/src/components/timeline/moleculas/Topo.vue +0 -38
  35. package/src/components/timeline/organismos/Timeline.mock.ts +0 -311
  36. package/src/components/timeline/organismos/Timeline.stories.ts +0 -48
  37. package/src/components/timeline/organismos/Timeline.vue +0 -217
  38. package/src/components/timeline/type.ts +0 -34
  39. package/src/global.css +0 -98
  40. package/src/index.ts +0 -16
  41. package/src/vite-env.d.ts +0 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent as d, reactive as C, computed as y, openBlock as a, createElementBlock as i, createElementVNode as T, normalizeClass as q, normalizeStyle as z, toDisplayString as v, resolveComponent as p, createVNode as g, ref as j, createBlock as b, createCommentVNode as E, Fragment as B, renderList as H } from "vue";
1
+ import { defineComponent as d, reactive as C, computed as y, openBlock as a, createElementBlock as i, createElementVNode as T, normalizeClass as q, normalizeStyle as z, toDisplayString as v, resolveComponent as _, createVNode as f, ref as j, createBlock as b, createCommentVNode as E, Fragment as B, renderList as H } from "vue";
2
2
  const M = d({
3
3
  name: "categoria",
4
4
  props: {
@@ -37,7 +37,7 @@ const M = d({
37
37
  };
38
38
  }
39
39
  });
40
- const _ = (e, t) => {
40
+ const p = (e, t) => {
41
41
  const r = e.__vccOpts || e;
42
42
  for (const [s, l] of t)
43
43
  r[s] = l;
@@ -54,7 +54,7 @@ function R(e, t, r, s, l, u) {
54
54
  ], 14, N)
55
55
  ]);
56
56
  }
57
- const F = /* @__PURE__ */ _(M, [["render", R], ["__scopeId", "data-v-01127706"]]), w = d({
57
+ const F = /* @__PURE__ */ p(M, [["render", R], ["__scopeId", "data-v-01127706"]]), w = d({
58
58
  name: "status",
59
59
  props: {
60
60
  status: {
@@ -76,7 +76,7 @@ function V(e, t, r, s, l, u) {
76
76
  class: q([e.classes, "iconeStatus"])
77
77
  }, null, 2);
78
78
  }
79
- const J = /* @__PURE__ */ _(w, [["render", V], ["__scopeId", "data-v-22a8820e"]]), Y = d({
79
+ const J = /* @__PURE__ */ p(w, [["render", V], ["__scopeId", "data-v-22a8820e"]]), Y = d({
80
80
  props: {
81
81
  subtitulo: {
82
82
  required: !0,
@@ -92,7 +92,7 @@ const G = { class: "subtitulo" };
92
92
  function K(e, t, r, s, l, u) {
93
93
  return a(), i("h4", G, v(e.subtitulo), 1);
94
94
  }
95
- const Q = /* @__PURE__ */ _(Y, [["render", K], ["__scopeId", "data-v-f5319628"]]), U = d({
95
+ const Q = /* @__PURE__ */ p(Y, [["render", K], ["__scopeId", "data-v-f5319628"]]), U = d({
96
96
  props: {
97
97
  titulo: {
98
98
  required: !0,
@@ -108,7 +108,7 @@ const W = { class: "titulo" };
108
108
  function X(e, t, r, s, l, u) {
109
109
  return a(), i("h3", W, v(e.titulo), 1);
110
110
  }
111
- const Z = /* @__PURE__ */ _(U, [["render", X], ["__scopeId", "data-v-fce23b0e"]]), x = d({
111
+ const Z = /* @__PURE__ */ p(U, [["render", X], ["__scopeId", "data-v-fce23b0e"]]), x = d({
112
112
  props: {
113
113
  titulo: {
114
114
  required: !0,
@@ -133,15 +133,15 @@ const ee = {
133
133
  style: { "padding-top": "3.3rem" }
134
134
  };
135
135
  function oe(e, t, r, s, l, u) {
136
- const c = p("TituloEvento"), S = p("SubtituloEvento");
136
+ const c = _("TituloEvento"), S = _("SubtituloEvento");
137
137
  return e.subtitulo ? (a(), i("div", ee, [
138
- g(c, { titulo: e.titulo }, null, 8, ["titulo"]),
139
- g(S, { subtitulo: e.subtitulo }, null, 8, ["subtitulo"])
138
+ f(c, { titulo: e.titulo }, null, 8, ["titulo"]),
139
+ f(S, { subtitulo: e.subtitulo }, null, 8, ["subtitulo"])
140
140
  ])) : (a(), i("div", te, [
141
- g(c, { titulo: e.titulo }, null, 8, ["titulo"])
141
+ f(c, { titulo: e.titulo }, null, 8, ["titulo"])
142
142
  ]));
143
143
  }
144
- const ae = /* @__PURE__ */ _(x, [["render", oe], ["__scopeId", "data-v-bb6e1ced"]]), re = d({
144
+ const ae = /* @__PURE__ */ p(x, [["render", oe], ["__scopeId", "data-v-bb6e1ced"]]), re = d({
145
145
  name: "hora",
146
146
  props: {
147
147
  hora: {
@@ -167,7 +167,7 @@ function ne(e, t, r, s, l, u) {
167
167
  class: q(["hora", e.classes])
168
168
  }, v(e.hora.getHours()) + ":" + v(e.hora.getMinutes().toString().padStart(2, "0")), 3);
169
169
  }
170
- const se = /* @__PURE__ */ _(re, [["render", ne], ["__scopeId", "data-v-071a9ea4"]]), ie = d({
170
+ const se = /* @__PURE__ */ p(re, [["render", ne], ["__scopeId", "data-v-071a9ea4"]]), ie = d({
171
171
  props: {
172
172
  horaPrevista: {
173
173
  type: Date,
@@ -188,7 +188,7 @@ const se = /* @__PURE__ */ _(re, [["render", ne], ["__scopeId", "data-v-071a9ea4
188
188
  });
189
189
  const le = { class: "areaHora" }, ce = { class: "horaEvento" };
190
190
  function ue(e, t, r, s, l, u) {
191
- const c = p("Hora");
191
+ const c = _("Hora");
192
192
  return a(), i("div", le, [
193
193
  T("div", ce, [
194
194
  e.horaRealizada ? (a(), b(c, {
@@ -210,7 +210,7 @@ function ue(e, t, r, s, l, u) {
210
210
  ])
211
211
  ]);
212
212
  }
213
- const de = /* @__PURE__ */ _(ie, [["render", ue], ["__scopeId", "data-v-04f44efd"]]), _e = d({
213
+ const de = /* @__PURE__ */ p(ie, [["render", ue], ["__scopeId", "data-v-04f44efd"]]), pe = d({
214
214
  name: "destaque",
215
215
  props: {
216
216
  destaque: {
@@ -222,11 +222,11 @@ const de = /* @__PURE__ */ _(ie, [["render", ue], ["__scopeId", "data-v-04f44efd
222
222
  return {};
223
223
  }
224
224
  });
225
- const pe = { class: "destaqueEvento texto-pequeno" };
225
+ const _e = { class: "destaqueEvento texto-pequeno" };
226
226
  function me(e, t, r, s, l, u) {
227
- return a(), i("div", pe, v(e.destaque), 1);
227
+ return a(), i("div", _e, v(e.destaque), 1);
228
228
  }
229
- const ve = /* @__PURE__ */ _(_e, [["render", me], ["__scopeId", "data-v-b0b0beb7"]]), fe = d({
229
+ const ve = /* @__PURE__ */ p(pe, [["render", me], ["__scopeId", "data-v-b0b0beb7"]]), ge = d({
230
230
  props: {
231
231
  status: {
232
232
  required: !0,
@@ -288,30 +288,30 @@ const ve = /* @__PURE__ */ _(_e, [["render", me], ["__scopeId", "data-v-b0b0beb7
288
288
  };
289
289
  }
290
290
  });
291
- const ge = ["onclick"];
291
+ const fe = ["onclick"];
292
292
  function ye(e, t, r, s, l, u) {
293
- const c = p("IconeStatus"), S = p("HoraEvento"), P = p("IconeCategoria"), o = p("DescricaoEvento"), n = p("Destaque");
293
+ const c = _("IconeStatus"), S = _("HoraEvento"), P = _("IconeCategoria"), o = _("DescricaoEvento"), n = _("Destaque");
294
294
  return a(), i("article", {
295
295
  class: q(["eventoTimeline", [e.status, "criticidade-" + e.criticidade, e.eventoSelecionado, e.clicavel]]),
296
296
  onclick: e.aoCLicar
297
297
  }, [
298
- g(c, { status: e.status }, null, 8, ["status"]),
299
- g(S, {
298
+ f(c, { status: e.status }, null, 8, ["status"]),
299
+ f(S, {
300
300
  horaPrevista: e.previsto,
301
301
  horaRealizada: e.realizado
302
302
  }, null, 8, ["horaPrevista", "horaRealizada"]),
303
- g(P, {
303
+ f(P, {
304
304
  iconeCategoria: e.categoria.icone,
305
305
  categoria: e.categoria.nome
306
306
  }, null, 8, ["iconeCategoria", "categoria"]),
307
- g(o, {
307
+ f(o, {
308
308
  titulo: e.titulo,
309
309
  subtitulo: e.subtitulo
310
310
  }, null, 8, ["titulo", "subtitulo"]),
311
- g(n, { destaque: e.destaque }, null, 8, ["destaque"])
312
- ], 10, ge);
311
+ f(n, { destaque: e.destaque }, null, 8, ["destaque"])
312
+ ], 10, fe);
313
313
  }
314
- const $e = /* @__PURE__ */ _(fe, [["render", ye], ["__scopeId", "data-v-1d1f6a39"]]), he = d({
314
+ const $e = /* @__PURE__ */ p(ge, [["render", ye]]), he = d({
315
315
  name: "BoxData",
316
316
  props: {
317
317
  dataNumero: {
@@ -336,7 +336,7 @@ function be(e, t, r, s, l, u) {
336
336
  class: q(["boxData padrao", e.classes])
337
337
  }, v(e.dataNumero), 3);
338
338
  }
339
- const Se = /* @__PURE__ */ _(he, [["render", be], ["__scopeId", "data-v-5e2b8273"]]), Te = d({
339
+ const Se = /* @__PURE__ */ p(he, [["render", be], ["__scopeId", "data-v-5e2b8273"]]), Te = d({
340
340
  name: "SeparadorPeriodo",
341
341
  props: {
342
342
  dataSeparador: {
@@ -355,10 +355,10 @@ const Se = /* @__PURE__ */ _(he, [["render", be], ["__scopeId", "data-v-5e2b8273
355
355
  });
356
356
  const qe = { class: "separadorPeriodo" }, Pe = { class: "areaData" };
357
357
  function Ee(e, t, r, s, l, u) {
358
- const c = p("BoxData");
358
+ const c = _("BoxData");
359
359
  return a(), i("div", qe, [
360
360
  T("div", Pe, [
361
- g(c, {
361
+ f(c, {
362
362
  dataNumero: e.dataSeparador.getDate(),
363
363
  aparencia: e.aparencia
364
364
  }, null, 8, ["dataNumero", "aparencia"])
@@ -368,7 +368,7 @@ function Ee(e, t, r, s, l, u) {
368
368
  }, v(e.mesCorrente(e.dataSeparador.getMonth())) + " de " + v(e.dataSeparador.getFullYear()), 3)
369
369
  ]);
370
370
  }
371
- const Ce = /* @__PURE__ */ _(Te, [["render", Ee], ["__scopeId", "data-v-de9ead2d"]]), ke = d({
371
+ const Ce = /* @__PURE__ */ p(Te, [["render", Ee]]), ke = d({
372
372
  props: {
373
373
  imagem: {
374
374
  type: String
@@ -393,7 +393,7 @@ function Ae(e, t, r, s, l, u) {
393
393
  }, null, 8, Ie)) : e.icone ? (a(), i("span", ze, v(e.icone), 1)) : E("", !0)
394
394
  ]);
395
395
  }
396
- const je = /* @__PURE__ */ _(ke, [["render", Ae], ["__scopeId", "data-v-a913d26b"]]), Be = d({
396
+ const je = /* @__PURE__ */ p(ke, [["render", Ae], ["__scopeId", "data-v-a913d26b"]]), Be = d({
397
397
  components: { AvatarTimeline: je },
398
398
  props: {
399
399
  imagemPerfil: {
@@ -420,10 +420,9 @@ const je = /* @__PURE__ */ _(ke, [["render", Ae], ["__scopeId", "data-v-a913d26b
420
420
  });
421
421
  const He = { class: "nome" };
422
422
  function Me(e, t, r, s, l, u) {
423
- const c = p("AvatarTimeline");
423
+ const c = _("AvatarTimeline");
424
424
  return a(), i("section", {
425
- class: "perfilTimeline fixed",
426
- ref: "elementoFixo",
425
+ class: "perfilTimeline",
427
426
  style: z(e.style)
428
427
  }, [
429
428
  e.imagemPerfil ? (a(), b(c, {
@@ -436,7 +435,8 @@ function Me(e, t, r, s, l, u) {
436
435
  T("h2", He, v(e.nomePerfil), 1)
437
436
  ], 4);
438
437
  }
439
- const Oe = /* @__PURE__ */ _(Be, [["render", Me], ["__scopeId", "data-v-9f148523"]]), Ne = d({
438
+ const Oe = /* @__PURE__ */ p(Be, [["render", Me]]);
439
+ const Ne = d({
440
440
  props: {
441
441
  perfilTimeline: {
442
442
  required: !0,
@@ -467,21 +467,21 @@ const Oe = /* @__PURE__ */ _(Be, [["render", Me], ["__scopeId", "data-v-9f148523
467
467
  const l = () => {
468
468
  setInterval(s, 6e4);
469
469
  }, u = (o, n) => {
470
- const m = o.getDay() === n.getDay(), $ = o.getMonth() === n.getMonth(), f = o.getFullYear() === n.getFullYear();
471
- return m && $ && f;
470
+ const m = o.getDay() === n.getDay(), $ = o.getMonth() === n.getMonth(), g = o.getFullYear() === n.getFullYear();
471
+ return m && $ && g;
472
472
  }, c = (o) => {
473
473
  if (o) {
474
474
  const n = Date.now();
475
475
  let m = null, $ = [];
476
- for (const f of o) {
477
- const h = f.data.getTime();
478
- if (f.status === "planejado" || f.status === "atrasado") {
479
- const k = Math.abs(n - f.data.getTime());
476
+ for (const g of o) {
477
+ const h = g.data.getTime();
478
+ if (g.status === "planejado" || g.status === "atrasado") {
479
+ const k = Math.abs(n - g.data.getTime());
480
480
  if (m === null || k < m && h <= n)
481
481
  m = k, $.length = 0;
482
482
  else if (k > m)
483
483
  continue;
484
- $.push(f);
484
+ $.push(g);
485
485
  }
486
486
  }
487
487
  return $;
@@ -493,12 +493,12 @@ const Oe = /* @__PURE__ */ _(Be, [["render", Me], ["__scopeId", "data-v-9f148523
493
493
  (n, m) => n.data.getTime() - m.data.getTime()
494
494
  );
495
495
  if (o) {
496
- let n = [], m = null, $ = 0, f;
496
+ let n = [], m = null, $ = 0, g;
497
497
  for (const h of o) {
498
498
  const k = /* @__PURE__ */ new Date(), D = h.data;
499
- f = h.status;
499
+ g = h.status;
500
500
  const A = h.tolerancia * 60 * 1e3;
501
- f === "planejado" && D.getTime() + A < k.getTime() && (h.status = "atrasado"), (!m || !u(m, D)) && (m = D, n.push({
501
+ g === "planejado" && D.getTime() + A < k.getTime() && (h.status = "atrasado"), (!m || !u(m, D)) && (m = D, n.push({
502
502
  tipo: "dia",
503
503
  valor: h.data,
504
504
  key: ++$
@@ -529,7 +529,7 @@ const Oe = /* @__PURE__ */ _(Be, [["render", Me], ["__scopeId", "data-v-9f148523
529
529
  });
530
530
  const Le = { class: "areaTimeline" };
531
531
  function Re(e, t, r, s, l, u) {
532
- const c = p("PerfilTimeline"), S = p("SeparadorPeriodo"), P = p("EventoTimeline");
532
+ const c = _("PerfilTimeline"), S = _("SeparadorPeriodo"), P = _("EventoTimeline");
533
533
  return a(), i("div", Le, [
534
534
  e.perfilTimeline !== null ? (a(), b(c, {
535
535
  key: 0,
@@ -564,7 +564,7 @@ function Re(e, t, r, s, l, u) {
564
564
  ], 2)
565
565
  ]);
566
566
  }
567
- const Fe = /* @__PURE__ */ _(Ne, [["render", Re], ["__scopeId", "data-v-4245f5f5"]]), we = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
567
+ const Fe = /* @__PURE__ */ p(Ne, [["render", Re]]), we = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
568
568
  __proto__: null
569
569
  }, Symbol.toStringTag, { value: "Module" })), I = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
570
570
  __proto__: null,
@@ -1,4 +1,5 @@
1
1
  import { Evento } from "../type";
2
+ import "material-symbols/outlined.css";
2
3
  type TipoEventoTimeline = {
3
4
  tipo: "dia";
4
5
  valor: Date;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@devix-tecnologia/timeline-vue",
3
3
  "private": false,
4
- "version": "1.1.1",
4
+ "version": "1.1.2",
5
5
  "scripts": {
6
6
  "dev": "vite",
7
7
  "build": "vue-tsc && vite build",
@@ -12,6 +12,7 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "@fontsource/material-icons": "^4.5.4",
15
+ "material-symbols": "^0.5.5",
15
16
  "vue": "^3.0.0"
16
17
  },
17
18
  "devDependencies": {
@@ -36,7 +37,6 @@
36
37
  "vue-tsc": "^1.2.0"
37
38
  },
38
39
  "files": [
39
- "src",
40
40
  "dist"
41
41
  ],
42
42
  "types": "./dist/types/index.d.ts",
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
@@ -1,32 +0,0 @@
1
- import AvatarTimeline from './AvatarTimeline.vue';
2
- import { Meta, StoryFn } from '@storybook/vue3';
3
-
4
- export default {
5
- title: 'Devix/Timeline/Atomos/AvatarTimeline',
6
- component: AvatarTimeline,
7
- parameters: {
8
- componentSubtitle: 'Imagem ou ícones do Materials Symbols do Google',
9
- },
10
- argTypes: {},
11
- } as Meta<typeof AvatarTimeline>;
12
-
13
- const Template: StoryFn<typeof AvatarTimeline> = (args) => ({
14
- components: { AvatarTimeline },
15
- setup() {
16
- return { args };
17
- },
18
- template: '<AvatarTimeline v-bind="args" />',
19
- });
20
-
21
- const avatar =
22
- 'https://images.unsplash.com/photo-1526080652727-5b77f74eacd2?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1752&q=80';
23
-
24
- export const Imagem = Template.bind({});
25
- Imagem.args = {
26
- imagem: avatar,
27
- };
28
-
29
- export const Icone = Template.bind({});
30
- Icone.args = {
31
- icone: 'person',
32
- };
@@ -1,51 +0,0 @@
1
- <template>
2
- <div class="avatar">
3
- <img v-if="imagem" :src="imagem" />
4
- <span v-else-if="icone" class="material-symbols-outlined">
5
- {{ icone }}
6
- </span>
7
- </div>
8
- </template>
9
- <script lang="ts">
10
- import { defineComponent } from "vue";
11
- export default defineComponent({
12
- props: {
13
- imagem: {
14
- type: String,
15
- },
16
- icone: {
17
- type: String,
18
- },
19
- },
20
- setup() {
21
- return {};
22
- },
23
- });
24
- </script>
25
- <style scoped>
26
- .avatar {
27
- background: var(--cor-secundaria);
28
- color: var(--cor-apoio);
29
- width: 6rem;
30
- height: 6rem;
31
- border-radius: 50%;
32
- display: flex;
33
- flex-direction: row;
34
- justify-content: center;
35
- align-items: center;
36
- aspect-ratio: 1 / 1;
37
- }
38
-
39
- .avatar img {
40
- aspect-ratio: 1 / 1;
41
- width: 100%;
42
- height: 100%;
43
- object-fit: cover;
44
- object-position: center;
45
- border-radius: 50%;
46
- }
47
-
48
- .avatar span {
49
- font-size: 3rem;
50
- }
51
- </style>
@@ -1,41 +0,0 @@
1
- import '@fontsource/material-icons';
2
- import BoxData from './BoxData.vue';
3
- import { Meta, StoryFn } from '@storybook/vue3';
4
-
5
- export default {
6
- title: 'Devix/Timeline/Atomos/BoxData',
7
- component: BoxData,
8
- argTypes: {
9
- // dataBox: { control: { type: String } },
10
- aparencia: {
11
- control: { type: 'select' },
12
- options: ['padrao', 'escuro', 'claro'],
13
- },
14
- },
15
- } as Meta<typeof BoxData>;
16
-
17
- const Template: StoryFn<typeof BoxData> = (args) => ({
18
- components: { BoxData },
19
- setup() {
20
- return { args };
21
- },
22
- template: '<BoxData v-bind="args" />',
23
- });
24
-
25
- export const Padrao = Template.bind({});
26
- Padrao.args = {
27
- dataNumero: '01',
28
- aparencia: 'padrao',
29
- };
30
-
31
- export const Escuro = Template.bind({});
32
- Escuro.args = {
33
- dataNumero: '01',
34
- aparencia: 'escuro',
35
- };
36
-
37
- export const Claro = Template.bind({});
38
- Claro.args = {
39
- dataNumero: '01',
40
- aparencia: 'claro',
41
- };
@@ -1,57 +0,0 @@
1
- <template>
2
- <h3 class="boxData padrao" :class="classes">{{ dataNumero }}</h3>
3
- </template>
4
- <script lang="ts">
5
- import { defineComponent, reactive, computed } from 'vue';
6
-
7
- export default defineComponent({
8
- name: 'BoxData',
9
- props: {
10
- dataNumero: {
11
- required: true,
12
- type: Number,
13
- },
14
- aparencia: {
15
- type: String,
16
- },
17
- },
18
- components: {},
19
- setup(props) {
20
- props = reactive(props);
21
- return {
22
- classes: computed(() => ({
23
- [`${props.aparencia || 'padrao'}`]: true,
24
- })),
25
- };
26
- },
27
- });
28
- </script>
29
-
30
- <style scoped>
31
- .boxData {
32
- line-height: 3.5rem;
33
- border-radius: 0.5rem;
34
- background: var(--cor-primaria);
35
- color: var(--cor-secundaria);
36
- margin: 0;
37
- width: 3.5rem;
38
- height: 3.5rem;
39
- text-align: center;
40
- }
41
-
42
- .padrao {
43
- background: var(--cor-primaria);
44
- color: var(--cor-secundaria);
45
- }
46
-
47
- .escuro {
48
- background: var(--cor-secundaria);
49
- color: var(--cor-primaria);
50
- }
51
-
52
- .claro {
53
- background: var(--cor-terciaria);
54
- color: var(--cor-secundaria);
55
- box-shadow: 0px 0px 10px 0px #0000001c;
56
- }
57
- </style>
@@ -1,24 +0,0 @@
1
- import '@fontsource/material-icons';
2
- import Destaque from './Destaque.vue';
3
- import { Meta, StoryFn } from '@storybook/vue3';
4
-
5
- export default {
6
- title: 'Devix/Timeline/Atomos/Destaque',
7
- component: Destaque,
8
- argTypes: {
9
- // subtitulo: { control: { type: String } },
10
- },
11
- } as Meta<typeof Destaque>;
12
-
13
- const DestaqueoMock = 'Texto alinhado a direita';
14
-
15
- const Template: StoryFn<typeof Destaque> = (args) => ({
16
- components: { Destaque },
17
- setup() {
18
- return { args };
19
- },
20
- template: '<Destaque v-bind="args" />',
21
- });
22
-
23
- export const Padrao = Template.bind({});
24
- Padrao.args = { destaque: DestaqueoMock };
@@ -1,39 +0,0 @@
1
- <template>
2
- <div class="destaqueEvento texto-pequeno">{{ destaque }}</div>
3
- </template>
4
- <script lang="ts">
5
- import { defineComponent } from "vue";
6
-
7
- export default defineComponent({
8
- name: "destaque",
9
- props: {
10
- destaque: {
11
- type: String,
12
- },
13
- },
14
- components: {},
15
- setup() {
16
- return {};
17
- },
18
- });
19
- </script>
20
- <style scoped>
21
- .realizado .destaqueEvento,
22
- .cancelado .destaqueEvento,
23
- .adiado .destaqueEvento {
24
- opacity: 0.4;
25
- }
26
- .destaqueEvento {
27
- display: table-cell;
28
- text-align: right;
29
- width: 15%;
30
- line-height: 1em;
31
- color: var(--cor-texto);
32
- padding: 2.4rem 1.4rem;
33
- vertical-align: middle;
34
- }
35
-
36
- .bg-selecionado .destaqueEvento {
37
- color: var(--cor-texto-selecao);
38
- }
39
- </style>
@@ -1,36 +0,0 @@
1
- import Hora from './Hora.vue';
2
- import { Meta, StoryFn } from '@storybook/vue3';
3
-
4
- export default {
5
- title: 'Devix/Timeline/Atomos/Hora',
6
- component: Hora,
7
- argTypes: {
8
- // hora: { control: { type: String } },
9
- aparencia: {
10
- control: { type: 'select' },
11
- options: ['padrao', 'riscada'],
12
- },
13
- },
14
- } as Meta<typeof Hora>;
15
-
16
- const horaMock = '2023-12-10T09:00Z';
17
-
18
- const Template: StoryFn<typeof Hora> = (args) => ({
19
- components: { Hora },
20
- setup() {
21
- return { args };
22
- },
23
- template: '<Hora v-bind="args" />',
24
- });
25
-
26
- export const Padrao = Template.bind({});
27
- Padrao.args = {
28
- hora: horaMock,
29
- aparencia: 'padrao',
30
- };
31
-
32
- export const Riscada = Template.bind({});
33
- Riscada.args = {
34
- hora: horaMock,
35
- aparencia: 'riscada',
36
- };
@@ -1,50 +0,0 @@
1
- <template>
2
- <div class="hora" :class="classes">
3
- {{ hora.getHours() }}:{{ hora.getMinutes().toString().padStart(2, "0") }}
4
- </div>
5
- </template>
6
- <script lang="ts">
7
- import { defineComponent, reactive, computed, ref } from "vue";
8
-
9
- export default defineComponent({
10
- name: "hora",
11
- props: {
12
- hora: {
13
- required: true,
14
- type: Date,
15
- },
16
- aparencia: {
17
- type: String,
18
- },
19
- },
20
- components: {},
21
- setup(props) {
22
- const propsAparecia = ref(props.aparencia);
23
-
24
- return {
25
- classes: computed(() => ({
26
- [`hora-${propsAparecia || ""}`]: true,
27
- })),
28
- };
29
- },
30
- });
31
- </script>
32
- <style scoped>
33
- .hora {
34
- color: var(--cor-texto);
35
- }
36
-
37
- .bg-selecionado .hora {
38
- color: var(--cor-texto-selecao);
39
- }
40
- .hora-padrao,
41
- .horaRealizada {
42
- font-weight: 500;
43
- font-size: 1.4rem;
44
- }
45
- .hora-riscada,
46
- .horaPlanejada {
47
- text-decoration: line-through;
48
- font-size: 1rem;
49
- }
50
- </style>