@enos5/enos-vue 0.2.1 → 0.2.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 (2) hide show
  1. package/dist/index.js +62 -54
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -65,7 +65,7 @@ const ut = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
65
65
  return Rl;
66
66
  },
67
67
  get EnosVue() {
68
- return es;
68
+ return Ja;
69
69
  },
70
70
  get FormSection() {
71
71
  return Gl;
@@ -116,10 +116,10 @@ const ut = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
116
116
  return pa;
117
117
  },
118
118
  get TableList() {
119
- return Ma;
119
+ return Ia;
120
120
  },
121
121
  get TableListForm() {
122
- return Za;
122
+ return Ya;
123
123
  },
124
124
  get TextArea() {
125
125
  return Ee;
@@ -2295,22 +2295,22 @@ const Et = /* @__PURE__ */ ke(Mt, [["render", zt]]), Ft = { class: "sr-only" },
2295
2295
  ])
2296
2296
  ]));
2297
2297
  }
2298
- }, va = { class: "bg-white border border-gray-200/60 rounded-xl shadow-[0_1px_3px_rgba(0,0,0,0.1)] animate-fadeIn mx-4 md:mx-0" }, ha = { class: "overflow-x-auto rounded-xl" }, xa = { class: "min-w-full divide-y divide-gray-200" }, wa = { class: "bg-gray-50" }, ka = {
2298
+ }, va = { class: "min-w-full divide-y divide-gray-200" }, ha = { class: "bg-gray-50" }, xa = {
2299
2299
  key: 0,
2300
2300
  class: "px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider"
2301
- }, Sa = { class: "bg-white divide-y divide-gray-200" }, $a = {
2301
+ }, wa = { class: "bg-white divide-y divide-gray-200" }, ka = {
2302
2302
  key: 0,
2303
2303
  class: "flex items-center"
2304
- }, Ca = ["title"], Va = {
2304
+ }, Sa = ["title"], $a = {
2305
2305
  key: 0,
2306
2306
  class: "ml-2 inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-red-100 text-red-800"
2307
- }, _a = ["innerHTML"], Ta = { key: 3 }, Aa = {
2307
+ }, Ca = ["innerHTML"], Va = { key: 3 }, _a = {
2308
2308
  key: 0,
2309
2309
  class: "px-6 py-4 whitespace-nowrap text-right text-sm font-medium"
2310
- }, Ba = {
2310
+ }, Ta = {
2311
2311
  key: 0,
2312
2312
  class: "text-center py-12"
2313
- }, La = { class: "inline-flex items-center justify-center w-16 h-16 bg-gray-100 rounded-full mb-4" }, Ia = { class: "text-lg font-medium text-gray-900 mb-2" }, Da = { class: "text-gray-500 mb-4" }, Ma = {
2313
+ }, Aa = { class: "inline-flex items-center justify-center w-16 h-16 bg-gray-100 rounded-full mb-4" }, Ba = { class: "text-lg font-medium text-gray-900 mb-2" }, La = { class: "text-gray-500 mb-4" }, Ia = {
2314
2314
  __name: "TableList",
2315
2315
  props: {
2316
2316
  data: {
@@ -2350,6 +2350,10 @@ const Et = /* @__PURE__ */ ke(Mt, [["render", zt]]), Ft = { class: "sr-only" },
2350
2350
  type: Number,
2351
2351
  default: 40
2352
2352
  },
2353
+ isCard: {
2354
+ type: Boolean,
2355
+ default: !0
2356
+ },
2353
2357
  actionsLabel: {
2354
2358
  type: String,
2355
2359
  default: "Actions"
@@ -2381,10 +2385,14 @@ const Et = /* @__PURE__ */ ke(Mt, [["render", zt]]), Ft = { class: "sr-only" },
2381
2385
  let T = "px-6 py-4 text-sm truncate";
2382
2386
  return k.isSecondary || (T += " font-medium"), k.isSecondary && (T += " text-gray-600"), T;
2383
2387
  }, h = (k) => k.sortable ? "" : "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider";
2384
- return (k, T) => (a(), i("div", va, [
2385
- o("div", ha, [
2386
- o("table", xa, [
2387
- o("thead", wa, [
2388
+ return (k, T) => (a(), i("div", {
2389
+ class: S(["bg-white", e.isCard ? "border border-gray-200/60 rounded-xl shadow-[0_1px_3px_rgba(0,0,0,0.1)] animate-fadeIn mx-4 md:mx-0" : ""])
2390
+ }, [
2391
+ o("div", {
2392
+ class: S(["overflow-x-auto", e.isCard ? "rounded-xl" : ""])
2393
+ }, [
2394
+ o("table", va, [
2395
+ o("thead", ha, [
2388
2396
  o("tr", null, [
2389
2397
  (a(!0), i(q, null, W(e.columns, (m) => (a(), i(q, {
2390
2398
  key: m.key
@@ -2405,10 +2413,10 @@ const Et = /* @__PURE__ */ ke(Mt, [["render", zt]]), Ft = { class: "sr-only" },
2405
2413
  class: S([h(m), { "text-right": m.align === "right" }])
2406
2414
  }, V(m.label), 3))
2407
2415
  ], 64))), 128)),
2408
- k.$slots.actions ? (a(), i("th", ka, V(e.actionsLabel), 1)) : M("", !0)
2416
+ k.$slots.actions ? (a(), i("th", xa, V(e.actionsLabel), 1)) : M("", !0)
2409
2417
  ])
2410
2418
  ]),
2411
- o("tbody", Sa, [
2419
+ o("tbody", wa, [
2412
2420
  (a(!0), i(q, null, W(e.data, (m, L) => (a(), i("tr", {
2413
2421
  key: m.id,
2414
2422
  class: S(e.rowClasses(m, L))
@@ -2417,12 +2425,12 @@ const Et = /* @__PURE__ */ ke(Mt, [["render", zt]]), Ft = { class: "sr-only" },
2417
2425
  key: D.key,
2418
2426
  class: S(_(D))
2419
2427
  }, [
2420
- D.key === "name" && !D.slot ? (a(), i("div", $a, [
2428
+ D.key === "name" && !D.slot ? (a(), i("div", ka, [
2421
2429
  o("div", {
2422
2430
  class: "text-sm font-medium truncate",
2423
2431
  title: v(m, D)
2424
- }, V(v(m, D)), 9, Ca),
2425
- b(m) ? (a(), i("span", Va, V(e.deletedLabel), 1)) : M("", !0)
2432
+ }, V(v(m, D)), 9, Sa),
2433
+ b(m) ? (a(), i("span", $a, V(e.deletedLabel), 1)) : M("", !0)
2426
2434
  ])) : D.slot ? w(k.$slots, D.slot, {
2427
2435
  key: 1,
2428
2436
  item: m,
@@ -2431,9 +2439,9 @@ const Et = /* @__PURE__ */ ke(Mt, [["render", zt]]), Ft = { class: "sr-only" },
2431
2439
  }) : D.render ? (a(), i("div", {
2432
2440
  key: 2,
2433
2441
  innerHTML: D.render(m)
2434
- }, null, 8, _a)) : (a(), i("div", Ta, V(v(m, D)), 1))
2442
+ }, null, 8, Ca)) : (a(), i("div", Va, V(v(m, D)), 1))
2435
2443
  ], 2))), 128)),
2436
- k.$slots.actions ? (a(), i("td", Aa, [
2444
+ k.$slots.actions ? (a(), i("td", _a, [
2437
2445
  w(k.$slots, "actions", {
2438
2446
  item: m,
2439
2447
  index: L
@@ -2442,13 +2450,13 @@ const Et = /* @__PURE__ */ ke(Mt, [["render", zt]]), Ft = { class: "sr-only" },
2442
2450
  ], 2))), 128))
2443
2451
  ])
2444
2452
  ])
2445
- ]),
2446
- u.value ? M("", !0) : (a(), i("div", Ba, [
2447
- o("div", La, [
2453
+ ], 2),
2454
+ u.value ? M("", !0) : (a(), i("div", Ta, [
2455
+ o("div", Aa, [
2448
2456
  (a(), B(Be(e.emptyState.icon), { class: "w-8 h-8 text-gray-400" }))
2449
2457
  ]),
2450
- o("h3", Ia, V(e.emptyState.title), 1),
2451
- o("p", Da, V(e.emptyState.description), 1),
2458
+ o("h3", Ba, V(e.emptyState.title), 1),
2459
+ o("p", La, V(e.emptyState.description), 1),
2452
2460
  e.emptyState.actionText && e.emptyState.actionUrl ? (a(), B(Ce, {
2453
2461
  key: 0,
2454
2462
  href: e.emptyState.actionUrl,
@@ -2460,24 +2468,24 @@ const Et = /* @__PURE__ */ ke(Mt, [["render", zt]]), Ft = { class: "sr-only" },
2460
2468
  _: 1
2461
2469
  }, 8, ["href"])) : M("", !0)
2462
2470
  ]))
2463
- ]));
2471
+ ], 2));
2464
2472
  }
2465
- }, ja = { class: "relative max-w-sm" }, Oa = { class: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none" }, za = ["placeholder"], Ea = { class: "min-w-full divide-y divide-gray-200" }, Fa = { class: "bg-gray-50" }, Na = {
2473
+ }, Da = { class: "relative max-w-sm" }, Ma = { class: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none" }, ja = ["placeholder"], Oa = { class: "min-w-full divide-y divide-gray-200" }, za = { class: "bg-gray-50" }, Ea = {
2466
2474
  key: 0,
2467
2475
  class: "px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider"
2468
- }, Ua = { class: "bg-white divide-y divide-gray-200" }, Ka = {
2476
+ }, Fa = { class: "bg-white divide-y divide-gray-200" }, Na = {
2469
2477
  key: 2,
2470
2478
  class: "flex items-center"
2471
- }, Ra = ["title"], Ha = {
2479
+ }, Ua = ["title"], Ka = {
2472
2480
  key: 0,
2473
2481
  class: "ml-2 inline-flex items-center rounded-full bg-red-100 px-2 py-1 text-xs font-medium text-red-800"
2474
- }, qa = ["innerHTML"], Pa = { key: 5 }, Wa = {
2482
+ }, Ra = ["innerHTML"], Ha = { key: 5 }, qa = {
2475
2483
  key: 0,
2476
2484
  class: "px-6 py-4 whitespace-nowrap text-right text-sm font-medium"
2477
- }, Ga = { class: "flex items-center justify-end gap-2" }, Xa = {
2485
+ }, Pa = { class: "flex items-center justify-end gap-2" }, Wa = {
2478
2486
  key: 2,
2479
2487
  class: "py-12 text-center"
2480
- }, Qa = { class: "mb-4 inline-flex h-16 w-16 items-center justify-center rounded-full bg-gray-100" }, Ya = { class: "mb-2 text-lg font-medium text-gray-900" }, Ja = { class: "mb-4 text-gray-500" }, Za = {
2488
+ }, Ga = { class: "mb-4 inline-flex h-16 w-16 items-center justify-center rounded-full bg-gray-100" }, Xa = { class: "mb-2 text-lg font-medium text-gray-900" }, Qa = { class: "mb-4 text-gray-500" }, Ya = {
2481
2489
  __name: "TableListForm",
2482
2490
  props: {
2483
2491
  data: {
@@ -2555,7 +2563,7 @@ const Et = /* @__PURE__ */ ke(Mt, [["render", zt]]), Ft = { class: "sr-only" },
2555
2563
  },
2556
2564
  rowEditing: {
2557
2565
  type: Boolean,
2558
- default: !1
2566
+ default: !0
2559
2567
  },
2560
2568
  canEditRow: {
2561
2569
  type: Function,
@@ -2700,8 +2708,8 @@ const Et = /* @__PURE__ */ ke(Mt, [["render", zt]]), Ft = { class: "sr-only" },
2700
2708
  e.isCard ? "border-b border-gray-200 bg-gray-50/80 rounded-t-xl" : "mb-4 bg-white/80 backdrop-blur-sm"
2701
2709
  ])
2702
2710
  }, [
2703
- o("div", ja, [
2704
- o("div", Oa, [
2711
+ o("div", Da, [
2712
+ o("div", Ma, [
2705
2713
  F(I(ot), { class: "h-4 w-4 text-gray-400" })
2706
2714
  ]),
2707
2715
  ee(o("input", {
@@ -2709,7 +2717,7 @@ const Et = /* @__PURE__ */ ke(Mt, [["render", zt]]), Ft = { class: "sr-only" },
2709
2717
  type: "text",
2710
2718
  placeholder: e.searchPlaceholder,
2711
2719
  class: "block w-full rounded-md border border-gray-200 bg-white pl-9 pr-3 py-2 text-sm text-gray-900 placeholder-gray-500 transition-colors duration-200 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20"
2712
- }, null, 8, za), [
2720
+ }, null, 8, ja), [
2713
2721
  [et, f.value]
2714
2722
  ])
2715
2723
  ])
@@ -2718,8 +2726,8 @@ const Et = /* @__PURE__ */ ke(Mt, [["render", zt]]), Ft = { class: "sr-only" },
2718
2726
  key: 1,
2719
2727
  class: S(["overflow-x-auto", e.isCard ? "rounded-xl" : ""])
2720
2728
  }, [
2721
- o("table", Ea, [
2722
- o("thead", Fa, [
2729
+ o("table", Oa, [
2730
+ o("thead", za, [
2723
2731
  o("tr", null, [
2724
2732
  (a(!0), i(q, null, W(e.columns, (c) => (a(), i(q, {
2725
2733
  key: c.key
@@ -2740,10 +2748,10 @@ const Et = /* @__PURE__ */ ke(Mt, [["render", zt]]), Ft = { class: "sr-only" },
2740
2748
  class: S([U(c), { "text-right": c.align === "right" }])
2741
2749
  }, V(c.label), 3))
2742
2750
  ], 64))), 128)),
2743
- k.value ? (a(), i("th", Na, V(e.actionsLabel), 1)) : M("", !0)
2751
+ k.value ? (a(), i("th", Ea, V(e.actionsLabel), 1)) : M("", !0)
2744
2752
  ])
2745
2753
  ]),
2746
- o("tbody", Ua, [
2754
+ o("tbody", Fa, [
2747
2755
  (a(!0), i(q, null, W(_.value, (c, A) => (a(), i("tr", {
2748
2756
  key: G(c, A),
2749
2757
  class: S(e.rowClasses(c, A))
@@ -2767,22 +2775,22 @@ const Et = /* @__PURE__ */ ke(Mt, [["render", zt]]), Ft = { class: "sr-only" },
2767
2775
  "helper-text": "",
2768
2776
  "onUpdate:modelValue": (R) => Z(p.key, R, c),
2769
2777
  onBlur: (R) => Z(p.key, R?.target?.value ?? _e(c, p, A), c, "blur")
2770
- }, null, 8, ["type", "class", "placeholder", "model-value", "disabled", "maxlength", "error-message", "onUpdate:modelValue", "onBlur"])) : p.key === "name" && !p.slot ? (a(), i("div", Ka, [
2778
+ }, null, 8, ["type", "class", "placeholder", "model-value", "disabled", "maxlength", "error-message", "onUpdate:modelValue", "onBlur"])) : p.key === "name" && !p.slot ? (a(), i("div", Na, [
2771
2779
  o("div", {
2772
2780
  class: "text-sm font-medium truncate",
2773
2781
  title: ae(c, p)
2774
- }, V(ae(c, p)), 9, Ra),
2775
- X(c) ? (a(), i("span", Ha, V(e.deletedLabel), 1)) : M("", !0)
2782
+ }, V(ae(c, p)), 9, Ua),
2783
+ X(c) ? (a(), i("span", Ka, V(e.deletedLabel), 1)) : M("", !0)
2776
2784
  ])) : p.slot ? w(r.$slots, p.slot, E({
2777
2785
  key: 3,
2778
2786
  ref_for: !0
2779
2787
  }, me(c, p, A))) : p.render ? (a(), i("div", {
2780
2788
  key: 4,
2781
2789
  innerHTML: p.render(c)
2782
- }, null, 8, qa)) : (a(), i("div", Pa, V(ae(c, p)), 1))
2790
+ }, null, 8, Ra)) : (a(), i("div", Ha, V(ae(c, p)), 1))
2783
2791
  ], 2))), 128)),
2784
- k.value ? (a(), i("td", Wa, [
2785
- o("div", Ga, [
2792
+ k.value ? (a(), i("td", qa, [
2793
+ o("div", Pa, [
2786
2794
  h.value ? w(r.$slots, "actions", E({
2787
2795
  key: 0,
2788
2796
  ref_for: !0
@@ -2831,12 +2839,12 @@ const Et = /* @__PURE__ */ ke(Mt, [["render", zt]]), Ft = { class: "sr-only" },
2831
2839
  ], 2))), 128))
2832
2840
  ])
2833
2841
  ])
2834
- ], 2)) : (a(), i("div", Xa, [
2835
- o("div", Qa, [
2842
+ ], 2)) : (a(), i("div", Wa, [
2843
+ o("div", Ga, [
2836
2844
  (a(), B(Be(e.emptyState.icon), { class: "h-8 w-8 text-gray-400" }))
2837
2845
  ]),
2838
- o("h3", Ya, V(e.emptyState.title), 1),
2839
- o("p", Ja, V(e.emptyState.description), 1),
2846
+ o("h3", Xa, V(e.emptyState.title), 1),
2847
+ o("p", Qa, V(e.emptyState.description), 1),
2840
2848
  e.emptyState.actionText && e.emptyState.actionUrl ? (a(), B(Ce, {
2841
2849
  key: 0,
2842
2850
  href: e.emptyState.actionUrl,
@@ -2850,7 +2858,7 @@ const Et = /* @__PURE__ */ ke(Mt, [["render", zt]]), Ft = { class: "sr-only" },
2850
2858
  ]))
2851
2859
  ], 2));
2852
2860
  }
2853
- }, es = {
2861
+ }, Ja = {
2854
2862
  install(e) {
2855
2863
  for (const [s, t] of Object.entries(ut))
2856
2864
  s !== "EnosVue" && e.component(s, t);
@@ -2877,7 +2885,7 @@ export {
2877
2885
  we as Divider,
2878
2886
  Nl as Dropdown,
2879
2887
  Rl as DropdownLink,
2880
- es as EnosVue,
2888
+ Ja as EnosVue,
2881
2889
  Gl as FormSection,
2882
2890
  Ke as ImageInput,
2883
2891
  Ql as InputError,
@@ -2894,8 +2902,8 @@ export {
2894
2902
  Se as SectionTitle,
2895
2903
  Ne as SelectInput,
2896
2904
  pa as SortControls,
2897
- Ma as TableList,
2898
- Za as TableListForm,
2905
+ Ia as TableList,
2906
+ Ya as TableListForm,
2899
2907
  Ee as TextArea,
2900
2908
  ze as TextInput,
2901
2909
  Ve as ThSortable
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enos5/enos-vue",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"