@wishbone-media/spark 0.5.1 → 0.5.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.
package/dist/index.js CHANGED
@@ -41,13 +41,13 @@ const b = {
41
41
  farTimes: oe,
42
42
  farXmark: ae
43
43
  };
44
- function ys(e) {
44
+ function Bs(e) {
45
45
  Object.assign(b, e), N.add(...Object.values(e));
46
46
  }
47
- function Bs(e) {
47
+ function bs(e) {
48
48
  N.add(...Object.values(b)), e.component("FontAwesomeIcon", ne);
49
49
  }
50
- const Le = { class: "flex items-center" }, We = { class: "shrink-0 self-start" }, Oe = { class: "ml-3" }, Je = { class: "ml-auto pl-3 pt-1 self-start" }, Te = { class: "-mx-1.5 -my-1.5" }, bs = {
50
+ const Le = { class: "flex items-center" }, We = { class: "shrink-0 self-start" }, Oe = { class: "ml-3" }, Je = { class: "ml-auto pl-3 pt-1 self-start" }, Te = { class: "-mx-1.5 -my-1.5" }, ws = {
51
51
  __name: "SparkAlert",
52
52
  props: {
53
53
  type: {
@@ -408,7 +408,7 @@ const Le = { class: "flex items-center" }, We = { class: "shrink-0 self-start" }
408
408
  M(t.$slots, "default")
409
409
  ], 10, bt));
410
410
  }
411
- }, ws = {
411
+ }, hs = {
412
412
  __name: "SparkButtonGroup",
413
413
  setup(e) {
414
414
  const a = E(null);
@@ -430,7 +430,7 @@ const Le = { class: "flex items-center" }, We = { class: "shrink-0 self-start" }
430
430
  }, Mt = {
431
431
  key: 1,
432
432
  class: "p-5"
433
- }, hs = {
433
+ }, Ms = {
434
434
  __name: "SparkCard",
435
435
  props: {
436
436
  padded: {
@@ -535,7 +535,7 @@ const H = new Ct(), zt = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
535
535
  }, Pt = { class: "px-4 pt-5 pb-4 sm:p-6" }, Ht = {
536
536
  key: 0,
537
537
  class: "text-lg font-medium text-gray-900"
538
- }, Ms = {
538
+ }, Cs = {
539
539
  __name: "SparkModalDialog",
540
540
  props: {
541
541
  title: {
@@ -784,7 +784,7 @@ const z = new Et(), kt = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Qt =
784
784
  }, Ot = ["href", "onClick"], Jt = {
785
785
  key: 1,
786
786
  class: "text-[13px]"
787
- }, Tt = { class: "mt-auto" }, qt = { class: "p-[10px] flex-shrink-0" }, Ft = { class: "flex flex-1 items-center gap-x-6" }, Nt = { class: "relative flex flex-1 items-center justify-between" }, Ut = { class: "cursor-pointer" }, Rt = ["src"], Xt = { class: "mr-[10px] pb-[10px] flex-1 flex flex-col" }, Cs = {
787
+ }, Tt = { class: "mt-auto" }, qt = { class: "p-[10px] flex-shrink-0" }, Ft = { class: "flex flex-1 items-center gap-x-6" }, Nt = { class: "relative flex flex-1 items-center gap-4" }, Ut = { class: "cursor-pointer" }, Rt = ["src"], Xt = { class: "ml-auto" }, Kt = { class: "mr-[10px] pb-[10px] flex-1 flex flex-col" }, zs = {
788
788
  __name: "SparkDefaultContainer",
789
789
  props: {
790
790
  appStore: {
@@ -926,7 +926,7 @@ const z = new Et(), kt = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Qt =
926
926
  M(l.$slots, "header-center", {}, () => [
927
927
  e.appStore.state.showBrandSelector ? (r(), i("div", {
928
928
  key: 0,
929
- class: "cursor-pointer h-9 flex items-center",
929
+ class: "absolute left-1/2 -translate-x-1/2 cursor-pointer h-9 flex items-center",
930
930
  onClick: f
931
931
  }, [
932
932
  c(n).currentBrand ? (r(), i("img", {
@@ -937,23 +937,25 @@ const z = new Et(), kt = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Qt =
937
937
  }, null, 8, Rt)) : x("", !0)
938
938
  ])) : x("", !0)
939
939
  ]),
940
- M(l.$slots, "header-right", {}, () => [
941
- e.appStore.state.showAppSelector ? (r(), i("button", {
942
- key: 0,
943
- class: "rounded-sm bg-white w-[42px] h-[42px] ring-1 ring-inset ring-gray-300",
944
- type: "button",
945
- onClick: A
946
- }, [
947
- u(o, {
948
- icon: c(b).farGripDotsVertical,
949
- class: "size-4 text-gray-400"
950
- }, null, 8, ["icon"])
951
- ])) : x("", !0)
940
+ s("div", Xt, [
941
+ M(l.$slots, "header-right", {}, () => [
942
+ e.appStore.state.showAppSelector ? (r(), i("button", {
943
+ key: 0,
944
+ class: "rounded-sm bg-white w-[42px] h-[42px] ring-1 ring-inset ring-gray-300",
945
+ type: "button",
946
+ onClick: A
947
+ }, [
948
+ u(o, {
949
+ icon: c(b).farGripDotsVertical,
950
+ class: "size-4 text-gray-400"
951
+ }, null, 8, ["icon"])
952
+ ])) : x("", !0)
953
+ ])
952
954
  ])
953
955
  ])
954
956
  ])
955
957
  ]),
956
- s("main", Xt, [
958
+ s("main", Kt, [
957
959
  u(p)
958
960
  ])
959
961
  ], 2),
@@ -971,19 +973,19 @@ const z = new Et(), kt = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Qt =
971
973
  ], 64);
972
974
  };
973
975
  }
974
- }, Kt = (e, a) => {
976
+ }, Vt = (e, a) => {
975
977
  const n = e.__vccOpts || e;
976
978
  for (const [A, f] of a)
977
979
  n[A] = f;
978
980
  return n;
979
- }, Vt = {}, _t = { class: "h-full" };
980
- function $t(e, a) {
981
+ }, _t = {}, $t = { class: "h-full" };
982
+ function es(e, a) {
981
983
  const n = C("router-view");
982
- return r(), i("main", _t, [
984
+ return r(), i("main", $t, [
983
985
  u(n)
984
986
  ]);
985
987
  }
986
- const zs = /* @__PURE__ */ Kt(Vt, [["render", $t]]), Ys = I("sparkApp", () => {
988
+ const Ys = /* @__PURE__ */ Vt(_t, [["render", es]]), Ds = I("sparkApp", () => {
987
989
  const e = k({
988
990
  app: "",
989
991
  icon: "",
@@ -997,7 +999,7 @@ const zs = /* @__PURE__ */ Kt(Vt, [["render", $t]]), Ys = I("sparkApp", () => {
997
999
  e.app = n.app || "", e.icon = n.icon || "", e.homeRoute = n.homeRoute ?? "dashboard", e.showBrandSelector = n.showBrandSelector ?? !0, e.showAppSelector = n.showAppSelector ?? !0;
998
1000
  }
999
1001
  };
1000
- }), Ds = I("sparkNav", () => {
1002
+ }), Ps = I("sparkNav", () => {
1001
1003
  const e = k({
1002
1004
  menu: [],
1003
1005
  collapsed: !1,
@@ -1040,20 +1042,20 @@ const zs = /* @__PURE__ */ Kt(Vt, [["render", $t]]), Ys = I("sparkApp", () => {
1040
1042
  e.hidden = !e.hidden;
1041
1043
  }
1042
1044
  };
1043
- }), es = { class: "h-full grid place-content-center relative" }, ts = { class: "absolute top-8 left-8" }, ss = ["src"], ns = {
1045
+ }), ts = { class: "h-full grid place-content-center relative" }, ss = { class: "absolute top-8 left-8" }, ns = ["src"], as = {
1044
1046
  key: 1,
1045
1047
  width: "59",
1046
1048
  height: "23",
1047
1049
  viewBox: "0 0 59 23",
1048
1050
  fill: "none",
1049
1051
  xmlns: "http://www.w3.org/2000/svg"
1050
- }, as = { class: "max-w-sm grid gap-y-1 -mt-8" }, os = { class: "mb-7" }, rs = { class: "text-gray-600" }, ls = { class: "grid grid-flow-col justify-between my-1" }, is = {
1052
+ }, os = { class: "max-w-sm grid gap-y-1 -mt-8" }, rs = { class: "mb-7" }, ls = { class: "text-gray-600" }, is = { class: "grid grid-flow-col justify-between my-1" }, cs = {
1051
1053
  key: 0,
1052
1054
  class: "text-red-600 text-sm mb-2"
1053
- }, cs = { key: 0 }, As = { key: 1 }, ms = {
1055
+ }, As = { key: 0 }, ms = { key: 1 }, ds = {
1054
1056
  key: 0,
1055
1057
  class: "mt-4 text-center text-sm text-gray-600"
1056
- }, Ps = {
1058
+ }, Hs = {
1057
1059
  __name: "SparkLoginView",
1058
1060
  props: {
1059
1061
  logo: {
@@ -1091,14 +1093,14 @@ const zs = /* @__PURE__ */ Kt(Vt, [["render", $t]]), Ys = I("sparkApp", () => {
1091
1093
  };
1092
1094
  return (l, t) => {
1093
1095
  const o = C("FormKit"), p = C("router-link");
1094
- return r(), i("div", es, [
1095
- s("div", ts, [
1096
+ return r(), i("div", ts, [
1097
+ s("div", ss, [
1096
1098
  n.logo ? (r(), i("img", {
1097
1099
  key: 0,
1098
1100
  src: n.logo,
1099
1101
  alt: "Logo",
1100
1102
  class: "h-[23px] w-auto"
1101
- }, null, 8, ss)) : (r(), i("svg", ns, [...t[0] || (t[0] = [
1103
+ }, null, 8, ns)) : (r(), i("svg", as, [...t[0] || (t[0] = [
1102
1104
  s("path", {
1103
1105
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
1104
1106
  fill: "#1C64F2"
@@ -1117,10 +1119,10 @@ const zs = /* @__PURE__ */ Kt(Vt, [["render", $t]]), Ys = I("sparkApp", () => {
1117
1119
  }, null, -1)
1118
1120
  ])]))
1119
1121
  ]),
1120
- s("div", as, [
1121
- s("div", os, [
1122
+ s("div", os, [
1123
+ s("div", rs, [
1122
1124
  t[1] || (t[1] = s("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Log in", -1)),
1123
- s("p", rs, " Welcome back" + h(n.appName ? ` to ${n.appName}` : "") + "! Please enter your details. ", 1)
1125
+ s("p", ls, " Welcome back" + h(n.appName ? ` to ${n.appName}` : "") + "! Please enter your details. ", 1)
1124
1126
  ]),
1125
1127
  u(o, {
1126
1128
  type: "form",
@@ -1144,7 +1146,7 @@ const zs = /* @__PURE__ */ Kt(Vt, [["render", $t]]), Ys = I("sparkApp", () => {
1144
1146
  validation: "required",
1145
1147
  "outer-class": "max-w-full"
1146
1148
  }),
1147
- s("div", ls, [
1149
+ s("div", is, [
1148
1150
  u(o, {
1149
1151
  label: "Remember me",
1150
1152
  name: "remember",
@@ -1160,7 +1162,7 @@ const zs = /* @__PURE__ */ Kt(Vt, [["render", $t]]), Ys = I("sparkApp", () => {
1160
1162
  _: 1
1161
1163
  }, 8, ["to"])
1162
1164
  ]),
1163
- v.value ? (r(), i("div", is, h(v.value), 1)) : x("", !0),
1165
+ v.value ? (r(), i("div", cs, h(v.value), 1)) : x("", !0),
1164
1166
  u(c(V), {
1165
1167
  type: "submit",
1166
1168
  size: "xl",
@@ -1168,14 +1170,14 @@ const zs = /* @__PURE__ */ Kt(Vt, [["render", $t]]), Ys = I("sparkApp", () => {
1168
1170
  "button-class": "w-full"
1169
1171
  }, {
1170
1172
  default: B(() => [
1171
- f.value ? (r(), i("span", As, "Signing in...")) : (r(), i("span", cs, "Sign in"))
1173
+ f.value ? (r(), i("span", ms, "Signing in...")) : (r(), i("span", As, "Sign in"))
1172
1174
  ]),
1173
1175
  _: 1
1174
1176
  }, 8, ["disabled"])
1175
1177
  ]),
1176
1178
  _: 1
1177
1179
  }),
1178
- n.signupRoute ? (r(), i("div", ms, [
1180
+ n.signupRoute ? (r(), i("div", ds, [
1179
1181
  t[4] || (t[4] = Q(" Don't have an account? ", -1)),
1180
1182
  u(p, {
1181
1183
  to: n.signupRoute,
@@ -1194,24 +1196,24 @@ const zs = /* @__PURE__ */ Kt(Vt, [["render", $t]]), Ys = I("sparkApp", () => {
1194
1196
  };
1195
1197
  export {
1196
1198
  b as Icons,
1197
- bs as SparkAlert,
1199
+ ws as SparkAlert,
1198
1200
  st as SparkAppSelector,
1199
1201
  Bt as SparkBrandSelector,
1200
1202
  V as SparkButton,
1201
- ws as SparkButtonGroup,
1202
- hs as SparkCard,
1203
- Cs as SparkDefaultContainer,
1204
- Ps as SparkLoginView,
1203
+ hs as SparkButtonGroup,
1204
+ Ms as SparkCard,
1205
+ zs as SparkDefaultContainer,
1206
+ Hs as SparkLoginView,
1205
1207
  Dt as SparkModalContainer,
1206
- Ms as SparkModalDialog,
1208
+ Cs as SparkModalDialog,
1207
1209
  W as SparkOverlay,
1208
- zs as SparkPublicContainer,
1209
- ys as addIcons,
1210
- Bs as setupFontAwesome,
1210
+ Ys as SparkPublicContainer,
1211
+ Bs as addIcons,
1212
+ bs as setupFontAwesome,
1211
1213
  H as sparkModalService,
1212
1214
  z as sparkOverlayService,
1213
- Ys as useSparkAppStore,
1215
+ Ds as useSparkAppStore,
1214
1216
  K as useSparkBrandFilterStore,
1215
- Ds as useSparkNavStore,
1217
+ Ps as useSparkNavStore,
1216
1218
  O as useSparkOverlay
1217
1219
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wishbone-media/spark",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -103,7 +103,7 @@
103
103
  <div :class="contentClass" class="h-full transition-all flex flex-col">
104
104
  <div class="p-[10px] flex-shrink-0">
105
105
  <div class="flex flex-1 items-center gap-x-6">
106
- <div class="relative flex flex-1 items-center justify-between">
106
+ <div class="relative flex flex-1 items-center gap-4">
107
107
  <slot name="header-left">
108
108
  <div class="cursor-pointer">
109
109
  <font-awesome-icon
@@ -117,7 +117,7 @@
117
117
  <slot name="header-center">
118
118
  <div
119
119
  v-if="appStore.state.showBrandSelector"
120
- class="cursor-pointer h-9 flex items-center"
120
+ class="absolute left-1/2 -translate-x-1/2 cursor-pointer h-9 flex items-center"
121
121
  @click="toggleBrandSelector"
122
122
  >
123
123
  <img
@@ -129,16 +129,18 @@
129
129
  </div>
130
130
  </slot>
131
131
 
132
- <slot name="header-right">
133
- <button
134
- v-if="appStore.state.showAppSelector"
135
- class="rounded-sm bg-white w-[42px] h-[42px] ring-1 ring-inset ring-gray-300"
136
- type="button"
137
- @click="toggleAppSelector"
138
- >
139
- <font-awesome-icon :icon="Icons.farGripDotsVertical" class="size-4 text-gray-400" />
140
- </button>
141
- </slot>
132
+ <div class="ml-auto">
133
+ <slot name="header-right">
134
+ <button
135
+ v-if="appStore.state.showAppSelector"
136
+ class="rounded-sm bg-white w-[42px] h-[42px] ring-1 ring-inset ring-gray-300"
137
+ type="button"
138
+ @click="toggleAppSelector"
139
+ >
140
+ <font-awesome-icon :icon="Icons.farGripDotsVertical" class="size-4 text-gray-400" />
141
+ </button>
142
+ </slot>
143
+ </div>
142
144
  </div>
143
145
  </div>
144
146
  </div>