@strands.gg/accui 2.2.2 → 2.2.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.
@@ -866,7 +866,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
866
866
  };
867
867
  }
868
868
  });
869
- const StrandsUiInput = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-2b9f8959"]]);
869
+ const StrandsUiInput = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-26b9fb0d"]]);
870
870
  const _sfc_main$G = /* @__PURE__ */ defineComponent({
871
871
  __name: "UiLink",
872
872
  props: {
@@ -1497,9 +1497,9 @@ const _hoisted_14$g = { class: "crop-svg" };
1497
1497
  const _hoisted_15$e = ["cx", "cy", "r"];
1498
1498
  const _hoisted_16$e = { class: "controls" };
1499
1499
  const _hoisted_17$d = { class: "zoom-control" };
1500
- const _hoisted_18$c = ["min", "max"];
1501
- const _hoisted_19$b = { class: "action-buttons" };
1502
- const _hoisted_20$a = { class: "preview-section" };
1500
+ const _hoisted_18$d = ["min", "max"];
1501
+ const _hoisted_19$c = { class: "action-buttons" };
1502
+ const _hoisted_20$b = { class: "preview-section" };
1503
1503
  const _hoisted_21$9 = { class: "preview-container" };
1504
1504
  const _hoisted_22$9 = ["width", "height"];
1505
1505
  const _sfc_main$C = /* @__PURE__ */ defineComponent({
@@ -1896,7 +1896,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
1896
1896
  constrainImagePosition();
1897
1897
  updateCanvas();
1898
1898
  })
1899
- }, null, 40, _hoisted_18$c), [
1899
+ }, null, 40, _hoisted_18$d), [
1900
1900
  [
1901
1901
  vModelText,
1902
1902
  zoom.value,
@@ -1918,7 +1918,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
1918
1918
  "aria-label": "Zoom in"
1919
1919
  })
1920
1920
  ]),
1921
- createElementVNode("div", _hoisted_19$b, [
1921
+ createElementVNode("div", _hoisted_19$c, [
1922
1922
  createVNode(StrandsUiButton, {
1923
1923
  onClick: resetImage,
1924
1924
  variant: "outline",
@@ -1954,7 +1954,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
1954
1954
  ])
1955
1955
  ])
1956
1956
  ]),
1957
- createElementVNode("div", _hoisted_20$a, [
1957
+ createElementVNode("div", _hoisted_20$b, [
1958
1958
  _cache[9] || (_cache[9] = createElementVNode("h3", { class: "preview-title" }, "Preview", -1)),
1959
1959
  createElementVNode("div", _hoisted_21$9, [
1960
1960
  createElementVNode("canvas", {
@@ -2782,7 +2782,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
2782
2782
  };
2783
2783
  }
2784
2784
  });
2785
- const UiModal = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-4ed5f36e"]]);
2785
+ const UiModal = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-62dd0f6c"]]);
2786
2786
  const tailwindColors = {
2787
2787
  "#000000": {
2788
2788
  label: "Black"
@@ -3405,9 +3405,9 @@ const _hoisted_14$f = { class: "ui-color-picker-contrast-color-demo" };
3405
3405
  const _hoisted_15$d = { class: "ui-color-picker-contrast-ratio" };
3406
3406
  const _hoisted_16$d = { class: "ui-color-picker-contrast-levels" };
3407
3407
  const _hoisted_17$c = { class: "ui-color-picker-contrast-level-value" };
3408
- const _hoisted_18$b = { class: "ui-color-picker-contrast-level-value" };
3409
- const _hoisted_19$a = { class: "ui-color-picker-contrast-graph" };
3410
- const _hoisted_20$9 = {
3408
+ const _hoisted_18$c = { class: "ui-color-picker-contrast-level-value" };
3409
+ const _hoisted_19$b = { class: "ui-color-picker-contrast-graph" };
3410
+ const _hoisted_20$a = {
3411
3411
  viewBox: "0 0 280 40",
3412
3412
  class: "ui-color-picker-contrast-svg"
3413
3413
  };
@@ -5022,11 +5022,11 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
5022
5022
  createElementVNode("div", { class: "ui-color-picker-contrast-level-line ui-color-picker-contrast-level-line--dashed" }),
5023
5023
  createElementVNode("span", { class: "ui-color-picker-contrast-level-label" }, "Large Text")
5024
5024
  ], -1)),
5025
- createElementVNode("span", _hoisted_18$b, toDisplayString(contrastData.value.largeText), 1)
5025
+ createElementVNode("span", _hoisted_18$c, toDisplayString(contrastData.value.largeText), 1)
5026
5026
  ], 2)
5027
5027
  ]),
5028
- createElementVNode("div", _hoisted_19$a, [
5029
- (openBlock(), createElementBlock("svg", _hoisted_20$9, [
5028
+ createElementVNode("div", _hoisted_19$b, [
5029
+ (openBlock(), createElementBlock("svg", _hoisted_20$a, [
5030
5030
  _cache[13] || (_cache[13] = createStaticVNode('<defs data-v-e9e45931><linearGradient id="contrastGradientDefault" x1="0%" y1="0%" x2="100%" y2="0%" data-v-e9e45931><stop offset="0%" stop-color="#ef4444" data-v-e9e45931></stop><stop offset="21.4%" stop-color="#ef4444" data-v-e9e45931></stop><stop offset="21.4%" stop-color="#f59e0b" data-v-e9e45931></stop><stop offset="64.3%" stop-color="#f59e0b" data-v-e9e45931></stop><stop offset="64.3%" stop-color="#22c55e" data-v-e9e45931></stop><stop offset="100%" stop-color="#22c55e" data-v-e9e45931></stop></linearGradient></defs><rect x="0" y="15" width="280" height="10" fill="url(#contrastGradientDefault)" rx="5" data-v-e9e45931></rect><line x1="60" y1="10" x2="60" y2="30" stroke="#666" stroke-width="1" opacity="0.5" data-v-e9e45931></line><line x1="180" y1="10" x2="180" y2="30" stroke="#666" stroke-width="1" opacity="0.5" data-v-e9e45931></line>', 4)),
5031
5031
  createElementVNode("circle", {
5032
5032
  cx: Math.min(270, Math.max(10, Math.min(contrastData.value.ratio, 14) / 14 * 260 + 10)),
@@ -5688,9 +5688,9 @@ const _hoisted_14$e = { value: "" };
5688
5688
  const _hoisted_15$c = ["value"];
5689
5689
  const _hoisted_16$c = { class: "ui-table-body" };
5690
5690
  const _hoisted_17$b = { class: "ui-table-group-content" };
5691
- const _hoisted_18$a = { class: "ui-table-group-name" };
5692
- const _hoisted_19$9 = { class: "ui-table-group-count" };
5693
- const _hoisted_20$8 = ["onClick"];
5691
+ const _hoisted_18$b = { class: "ui-table-group-name" };
5692
+ const _hoisted_19$a = { class: "ui-table-group-count" };
5693
+ const _hoisted_20$9 = ["onClick"];
5694
5694
  const _hoisted_21$7 = ["onClick"];
5695
5695
  const _hoisted_22$7 = { class: "ui-table-subrow-content" };
5696
5696
  const _hoisted_23$6 = { class: "ui-table-subrow-default" };
@@ -6083,8 +6083,8 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
6083
6083
  }, [
6084
6084
  createElementVNode("div", _hoisted_17$b, [
6085
6085
  createVNode(unref(Users), { size: 16 }),
6086
- createElementVNode("span", _hoisted_18$a, toDisplayString(row._groupName), 1),
6087
- createElementVNode("span", _hoisted_19$9, "(" + toDisplayString(row._groupCount) + " items)", 1)
6086
+ createElementVNode("span", _hoisted_18$b, toDisplayString(row._groupName), 1),
6087
+ createElementVNode("span", _hoisted_19$a, "(" + toDisplayString(row._groupCount) + " items)", 1)
6088
6088
  ])
6089
6089
  ], 4)) : (openBlock(), createElementBlock("div", {
6090
6090
  key: 1,
@@ -6132,7 +6132,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
6132
6132
  ], true)
6133
6133
  ], 14, _hoisted_21$7);
6134
6134
  }), 128))
6135
- ], 10, _hoisted_20$8)),
6135
+ ], 10, _hoisted_20$9)),
6136
6136
  expandedRows.value.has(rowIndex) ? (openBlock(), createElementBlock("div", {
6137
6137
  key: 2,
6138
6138
  class: "ui-table-subrow",
@@ -6653,7 +6653,7 @@ function useStrandsMfa() {
6653
6653
  const makeAuthenticatedRequest = async (url, options = {}) => {
6654
6654
  const headers = {
6655
6655
  "Content-Type": "application/json",
6656
- ...options.headers
6656
+ ...options.headers || {}
6657
6657
  };
6658
6658
  if (currentSession.value?.accessToken) {
6659
6659
  headers["Authorization"] = `Bearer ${currentSession.value.accessToken}`;
@@ -6881,12 +6881,12 @@ const _hoisted_17$a = {
6881
6881
  key: 2,
6882
6882
  class: "mfa-email-request"
6883
6883
  };
6884
- const _hoisted_18$9 = {
6884
+ const _hoisted_18$a = {
6885
6885
  key: 3,
6886
6886
  class: "mfa-hardware-section"
6887
6887
  };
6888
- const _hoisted_19$8 = { class: "mfa-hardware-prompt" };
6889
- const _hoisted_20$7 = { class: "mfa-hardware-prompt-content" };
6888
+ const _hoisted_19$9 = { class: "mfa-hardware-prompt" };
6889
+ const _hoisted_20$8 = { class: "mfa-hardware-prompt-content" };
6890
6890
  const _hoisted_21$6 = { class: "mfa-hardware-prompt-icon" };
6891
6891
  const _hoisted_22$6 = { class: "mfa-hardware-prompt-text" };
6892
6892
  const _hoisted_23$5 = { class: "mfa-hardware-prompt-title" };
@@ -7379,9 +7379,9 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
7379
7379
  _: 1
7380
7380
  }, 8, ["disabled", "loading"])
7381
7381
  ])) : createCommentVNode("", true),
7382
- selectedMethod.value?.device_type === "hardware" || selectedMethod.value?.device_type === "passkey" ? (openBlock(), createElementBlock("div", _hoisted_18$9, [
7383
- createElementVNode("div", _hoisted_19$8, [
7384
- createElementVNode("div", _hoisted_20$7, [
7382
+ selectedMethod.value?.device_type === "hardware" || selectedMethod.value?.device_type === "passkey" ? (openBlock(), createElementBlock("div", _hoisted_18$a, [
7383
+ createElementVNode("div", _hoisted_19$9, [
7384
+ createElementVNode("div", _hoisted_20$8, [
7385
7385
  createElementVNode("div", _hoisted_21$6, [
7386
7386
  (openBlock(), createBlock(resolveDynamicComponent(selectedMethod.value.device_type === "passkey" ? IconShield : IconKeyRound), {
7387
7387
  size: 24,
@@ -7830,7 +7830,10 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
7830
7830
  }
7831
7831
  });
7832
7832
  const _hoisted_1$m = { class: "accui-component-scope" };
7833
- const _hoisted_2$i = { class: "auth-logo-header" };
7833
+ const _hoisted_2$i = {
7834
+ key: 0,
7835
+ class: "auth-logo-header"
7836
+ };
7834
7837
  const _hoisted_3$i = { class: "auth-header" };
7835
7838
  const _hoisted_4$h = {
7836
7839
  key: 0,
@@ -7869,12 +7872,12 @@ const _hoisted_15$a = {
7869
7872
  };
7870
7873
  const _hoisted_16$a = { class: "auth-oauth-generic-text" };
7871
7874
  const _hoisted_17$9 = { class: "auth-oauth-text" };
7872
- const _hoisted_18$8 = {
7875
+ const _hoisted_18$9 = {
7873
7876
  key: 0,
7874
7877
  class: "auth-divider"
7875
7878
  };
7876
- const _hoisted_19$7 = { class: "auth-divider-text" };
7877
- const _hoisted_20$6 = {
7879
+ const _hoisted_19$8 = { class: "auth-divider-text" };
7880
+ const _hoisted_20$7 = {
7878
7881
  key: 0,
7879
7882
  class: "auth-password-field"
7880
7883
  };
@@ -8144,9 +8147,9 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
8144
8147
  }, {
8145
8148
  default: withCtx(() => [
8146
8149
  createElementVNode("div", null, [
8147
- createElementVNode("div", _hoisted_2$i, [
8150
+ !props.inModal ? (openBlock(), createElementBlock("div", _hoisted_2$i, [
8148
8151
  createVNode(_sfc_main$p)
8149
- ]),
8152
+ ])) : createCommentVNode("", true),
8150
8153
  createElementVNode("div", _hoisted_3$i, [
8151
8154
  createVNode(Transition, {
8152
8155
  name: "fade",
@@ -8272,8 +8275,8 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
8272
8275
  onAfterLeave
8273
8276
  }, {
8274
8277
  default: withCtx(() => [
8275
- !isPasswordReset.value && displayProviders.value?.length ? (openBlock(), createElementBlock("div", _hoisted_18$8, [
8276
- createElementVNode("span", _hoisted_19$7, "Or " + toDisplayString(isSignUp.value ? "create account" : "sign in") + " with email", 1)
8278
+ !isPasswordReset.value && displayProviders.value?.length ? (openBlock(), createElementBlock("div", _hoisted_18$9, [
8279
+ createElementVNode("span", _hoisted_19$8, "Or " + toDisplayString(isSignUp.value ? "create account" : "sign in") + " with email", 1)
8277
8280
  ])) : createCommentVNode("", true)
8278
8281
  ]),
8279
8282
  _: 1
@@ -8306,7 +8309,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
8306
8309
  onAfterLeave
8307
8310
  }, {
8308
8311
  default: withCtx(() => [
8309
- !isPasswordReset.value && !isSignUp.value ? (openBlock(), createElementBlock("div", _hoisted_20$6, [
8312
+ !isPasswordReset.value && !isSignUp.value ? (openBlock(), createElementBlock("div", _hoisted_20$7, [
8310
8313
  createElementVNode("div", _hoisted_21$5, [
8311
8314
  _cache[10] || (_cache[10] = createElementVNode("span", { class: "auth-password-label" }, "Password", -1)),
8312
8315
  createVNode(unref(StrandsUiLink), {
@@ -8399,7 +8402,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
8399
8402
  _: 1
8400
8403
  }),
8401
8404
  error.value ? (openBlock(), createBlock(unref(StrandsUiAlert), {
8402
- key: 0,
8405
+ key: 1,
8403
8406
  variant: "error",
8404
8407
  message: error.value,
8405
8408
  class: "auth-error-alert",
@@ -8448,7 +8451,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
8448
8451
  };
8449
8452
  }
8450
8453
  });
8451
- const StrandsAuth = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-e683c269"]]);
8454
+ const StrandsAuth = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-ee5a004f"]]);
8452
8455
  const _hoisted_1$l = {
8453
8456
  viewBox: "0 0 24 24",
8454
8457
  class: "accui-w-5 accui-h-5"
@@ -8521,8 +8524,8 @@ const _hoisted_14$b = { class: "accui-form-group" };
8521
8524
  const _hoisted_15$9 = { class: "accui-input-wrapper" };
8522
8525
  const _hoisted_16$9 = { class: "accui-form-group" };
8523
8526
  const _hoisted_17$8 = { class: "accui-input-wrapper" };
8524
- const _hoisted_18$7 = { class: "accui-auth-links" };
8525
- const _hoisted_19$6 = { class: "accui-auth-link-text" };
8527
+ const _hoisted_18$8 = { class: "accui-auth-links" };
8528
+ const _hoisted_19$7 = { class: "accui-auth-link-text" };
8526
8529
  const _sfc_main$l = /* @__PURE__ */ defineComponent({
8527
8530
  __name: "StrandsSignIn",
8528
8531
  props: {
@@ -8740,8 +8743,8 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
8740
8743
  dismissible: "",
8741
8744
  onDismiss: _cache[4] || (_cache[4] = ($event) => error.value = "")
8742
8745
  }, null, 8, ["message"])) : createCommentVNode("", true),
8743
- createElementVNode("div", _hoisted_18$7, [
8744
- createElementVNode("p", _hoisted_19$6, [
8746
+ createElementVNode("div", _hoisted_18$8, [
8747
+ createElementVNode("p", _hoisted_19$7, [
8745
8748
  _cache[14] || (_cache[14] = createTextVNode(" Don't have an account? ", -1)),
8746
8749
  createVNode(unref(StrandsUiLink), {
8747
8750
  onClick: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("switch-to-signup")),
@@ -8815,16 +8818,16 @@ const _hoisted_17$7 = {
8815
8818
  viewBox: "0 0 24 24",
8816
8819
  class: "oauth-icon"
8817
8820
  };
8818
- const _hoisted_18$6 = {
8821
+ const _hoisted_18$7 = {
8819
8822
  key: 2,
8820
8823
  class: "oauth-icon oauth-icon-github",
8821
8824
  viewBox: "0 0 24 24"
8822
8825
  };
8823
- const _hoisted_19$5 = {
8826
+ const _hoisted_19$6 = {
8824
8827
  key: 3,
8825
8828
  class: "oauth-icon-fallback"
8826
8829
  };
8827
- const _hoisted_20$5 = { class: "oauth-icon-fallback-text" };
8830
+ const _hoisted_20$6 = { class: "oauth-icon-fallback-text" };
8828
8831
  const _hoisted_21$4 = { class: "oauth-button-text" };
8829
8832
  const _hoisted_22$4 = {
8830
8833
  key: 1,
@@ -9041,10 +9044,10 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
9041
9044
  fill: "#EA4335",
9042
9045
  d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"
9043
9046
  }, null, -1)
9044
- ])])) : provider.id === "github" ? (openBlock(), createElementBlock("svg", _hoisted_18$6, [..._cache[7] || (_cache[7] = [
9047
+ ])])) : provider.id === "github" ? (openBlock(), createElementBlock("svg", _hoisted_18$7, [..._cache[7] || (_cache[7] = [
9045
9048
  createElementVNode("path", { d: "M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" }, null, -1)
9046
- ])])) : (openBlock(), createElementBlock("div", _hoisted_19$5, [
9047
- createElementVNode("span", _hoisted_20$5, toDisplayString((provider.displayName || provider.name).charAt(0).toUpperCase()), 1)
9049
+ ])])) : (openBlock(), createElementBlock("div", _hoisted_19$6, [
9050
+ createElementVNode("span", _hoisted_20$6, toDisplayString((provider.displayName || provider.name).charAt(0).toUpperCase()), 1)
9048
9051
  ]))
9049
9052
  ]),
9050
9053
  createElementVNode("span", _hoisted_21$4, "Continue with " + toDisplayString(provider.displayName || provider.name), 1)
@@ -9533,9 +9536,9 @@ const _hoisted_15$7 = {
9533
9536
  };
9534
9537
  const _hoisted_16$7 = { class: "totp-setup-backup-codes" };
9535
9538
  const _hoisted_17$6 = { class: "totp-setup-backup-grid-wrapper" };
9536
- const _hoisted_18$5 = { class: "totp-setup-backup-grid" };
9537
- const _hoisted_19$4 = { class: "totp-setup-backup-actions" };
9538
- const _hoisted_20$4 = { class: "totp-setup-final-actions" };
9539
+ const _hoisted_18$6 = { class: "totp-setup-backup-grid" };
9540
+ const _hoisted_19$5 = { class: "totp-setup-backup-actions" };
9541
+ const _hoisted_20$5 = { class: "totp-setup-final-actions" };
9539
9542
  const _sfc_main$i = /* @__PURE__ */ defineComponent({
9540
9543
  __name: "StrandsTotpSetupModal",
9541
9544
  props: {
@@ -9831,7 +9834,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
9831
9834
  ])
9832
9835
  ], -1)),
9833
9836
  createElementVNode("div", _hoisted_17$6, [
9834
- createElementVNode("div", _hoisted_18$5, [
9837
+ createElementVNode("div", _hoisted_18$6, [
9835
9838
  (openBlock(true), createElementBlock(Fragment, null, renderList(totpSetupData.value?.backup_codes, (code, index) => {
9836
9839
  return openBlock(), createElementBlock("div", {
9837
9840
  key: index,
@@ -9840,7 +9843,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
9840
9843
  }), 128))
9841
9844
  ])
9842
9845
  ]),
9843
- createElementVNode("div", _hoisted_19$4, [
9846
+ createElementVNode("div", _hoisted_19$5, [
9844
9847
  createVNode(unref(StrandsUiButton), {
9845
9848
  variant: "secondary",
9846
9849
  size: "sm",
@@ -9853,7 +9856,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
9853
9856
  })
9854
9857
  ])
9855
9858
  ]),
9856
- createElementVNode("div", _hoisted_20$4, [
9859
+ createElementVNode("div", _hoisted_20$5, [
9857
9860
  createVNode(unref(StrandsUiButton), {
9858
9861
  variant: "primary",
9859
9862
  onClick: finish
@@ -10603,12 +10606,12 @@ const _hoisted_14$6 = { class: "mfa-device-action" };
10603
10606
  const _hoisted_15$5 = { class: "mfa-device-layout" };
10604
10607
  const _hoisted_16$5 = { class: "mfa-device-icon-container mfa-device-icon-email" };
10605
10608
  const _hoisted_17$5 = { class: "mfa-device-action" };
10606
- const _hoisted_18$4 = {
10609
+ const _hoisted_18$5 = {
10607
10610
  key: 1,
10608
10611
  class: "mfa-manage-devices"
10609
10612
  };
10610
- const _hoisted_19$3 = { class: "mfa-devices-list" };
10611
- const _hoisted_20$3 = { class: "mfa-device-card-content" };
10613
+ const _hoisted_19$4 = { class: "mfa-devices-list" };
10614
+ const _hoisted_20$4 = { class: "mfa-device-card-content" };
10612
10615
  const _hoisted_21$3 = { class: "mfa-device-card-info" };
10613
10616
  const _hoisted_22$3 = { class: "mfa-device-card-details" };
10614
10617
  const _hoisted_23$2 = { class: "mfa-device-card-name" };
@@ -10911,16 +10914,16 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
10911
10914
  ])
10912
10915
  ])
10913
10916
  ])
10914
- ])) : currentTab?.value === "manage" && unref(activeMfaDevices).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_18$4, [
10917
+ ])) : currentTab?.value === "manage" && unref(activeMfaDevices).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_18$5, [
10915
10918
  createElementVNode("div", null, [
10916
10919
  _cache[14] || (_cache[14] = createElementVNode("h3", { class: "mfa-section-title" }, "Manage Your Active Devices", -1)),
10917
- createElementVNode("div", _hoisted_19$3, [
10920
+ createElementVNode("div", _hoisted_19$4, [
10918
10921
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(activeMfaDevices), (device) => {
10919
10922
  return openBlock(), createElementBlock("div", {
10920
10923
  key: device.id,
10921
10924
  class: "mfa-device-card"
10922
10925
  }, [
10923
- createElementVNode("div", _hoisted_20$3, [
10926
+ createElementVNode("div", _hoisted_20$4, [
10924
10927
  createElementVNode("div", _hoisted_21$3, [
10925
10928
  createElementVNode("div", {
10926
10929
  class: normalizeClass(["mfa-device-card-icon-container", getDeviceIconBackground(device.device_type)])
@@ -11293,9 +11296,9 @@ const _hoisted_14$4 = { class: "sessions-list" };
11293
11296
  const _hoisted_15$4 = { class: "session-header" };
11294
11297
  const _hoisted_16$4 = { class: "session-device" };
11295
11298
  const _hoisted_17$4 = { class: "device-icon" };
11296
- const _hoisted_18$3 = { class: "device-info" };
11297
- const _hoisted_19$2 = { class: "device-name" };
11298
- const _hoisted_20$2 = {
11299
+ const _hoisted_18$4 = { class: "device-info" };
11300
+ const _hoisted_19$3 = { class: "device-name" };
11301
+ const _hoisted_20$3 = {
11299
11302
  key: 0,
11300
11303
  class: "current-badge"
11301
11304
  };
@@ -11660,10 +11663,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
11660
11663
  createElementVNode("div", _hoisted_17$4, [
11661
11664
  (openBlock(), createBlock(resolveDynamicComponent(getDeviceIcon(session.device_type)), { size: 20 }))
11662
11665
  ]),
11663
- createElementVNode("div", _hoisted_18$3, [
11664
- createElementVNode("h4", _hoisted_19$2, [
11666
+ createElementVNode("div", _hoisted_18$4, [
11667
+ createElementVNode("h4", _hoisted_19$3, [
11665
11668
  createTextVNode(toDisplayString(session.device_name || "Unknown Device") + " ", 1),
11666
- session.is_current ? (openBlock(), createElementBlock("span", _hoisted_20$2, "Current")) : createCommentVNode("", true)
11669
+ session.is_current ? (openBlock(), createElementBlock("span", _hoisted_20$3, "Current")) : createCommentVNode("", true)
11667
11670
  ]),
11668
11671
  createElementVNode("p", _hoisted_21$2, toDisplayString(session.device_type || "Unknown type"), 1)
11669
11672
  ])
@@ -11801,9 +11804,9 @@ const _hoisted_16$3 = {
11801
11804
  class: "profile-change-form"
11802
11805
  };
11803
11806
  const _hoisted_17$3 = { class: "profile-field-section" };
11804
- const _hoisted_18$2 = { class: "profile-field-header" };
11805
- const _hoisted_19$1 = { class: "profile-field-subtitle" };
11806
- const _hoisted_20$1 = {
11807
+ const _hoisted_18$3 = { class: "profile-field-header" };
11808
+ const _hoisted_19$2 = { class: "profile-field-subtitle" };
11809
+ const _hoisted_20$2 = {
11807
11810
  key: 0,
11808
11811
  class: "profile-change-form"
11809
11812
  };
@@ -12663,10 +12666,10 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
12663
12666
  })
12664
12667
  ]),
12665
12668
  createElementVNode("div", _hoisted_17$3, [
12666
- createElementVNode("div", _hoisted_18$2, [
12669
+ createElementVNode("div", _hoisted_18$3, [
12667
12670
  createElementVNode("div", null, [
12668
12671
  _cache[12] || (_cache[12] = createElementVNode("h4", { class: "profile-field-title" }, "Username", -1)),
12669
- createElementVNode("p", _hoisted_19$1, toDisplayString(currentUser.value?.username || "No username set"), 1)
12672
+ createElementVNode("p", _hoisted_19$2, toDisplayString(currentUser.value?.username || "No username set"), 1)
12670
12673
  ]),
12671
12674
  createVNode(unref(StrandsUiButton), {
12672
12675
  variant: "secondary",
@@ -12682,7 +12685,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
12682
12685
  ]),
12683
12686
  createVNode(Transition, { name: "expand" }, {
12684
12687
  default: withCtx(() => [
12685
- showUsernameChange.value ? (openBlock(), createElementBlock("div", _hoisted_20$1, [
12688
+ showUsernameChange.value ? (openBlock(), createElementBlock("div", _hoisted_20$2, [
12686
12689
  createVNode(unref(StrandsUiInput), {
12687
12690
  modelValue: usernameForm.username,
12688
12691
  "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => usernameForm.username = $event),
@@ -12797,7 +12800,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
12797
12800
  createVNode(StrandsMfaModal, { onMfaUpdated: handleMfaUpdated }, {
12798
12801
  trigger: withCtx(() => [
12799
12802
  createVNode(unref(StrandsUiButton), {
12800
- variant: currentUser.value?.mfaEnabled ? "secondary" : "primary",
12803
+ variant: "secondary",
12801
12804
  size: "sm",
12802
12805
  class: "profile-toggle-container"
12803
12806
  }, {
@@ -12805,7 +12808,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
12805
12808
  createTextVNode(toDisplayString(currentUser.value?.mfaEnabled ? "Manage" : "Setup"), 1)
12806
12809
  ]),
12807
12810
  _: 1
12808
- }, 8, ["variant"])
12811
+ })
12809
12812
  ]),
12810
12813
  _: 1
12811
12814
  })
@@ -13007,7 +13010,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
13007
13010
  };
13008
13011
  }
13009
13012
  });
13010
- const StrandsUserProfile = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-2c3b6c2d"]]);
13013
+ const StrandsUserProfile = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-a61738d7"]]);
13011
13014
  const _hoisted_1$8 = { class: "accui-component-scope" };
13012
13015
  const _hoisted_2$6 = { class: "accui-w-full accui-min-w-100 accui-max-w-md accui-mx-auto accui-animate-slide-up" };
13013
13016
  const _hoisted_3$6 = { class: "accui-mt-8 accui-text-center" };
@@ -13451,35 +13454,38 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
13451
13454
  };
13452
13455
  }
13453
13456
  });
13454
- const _hoisted_1$4 = ["onKeydown", "aria-expanded"];
13455
- const _hoisted_2$3 = { class: "user-button-content" };
13456
- const _hoisted_3$3 = {
13457
+ const _hoisted_1$4 = { key: 0 };
13458
+ const _hoisted_2$3 = ["onKeydown", "aria-expanded"];
13459
+ const _hoisted_3$3 = { class: "user-button-content" };
13460
+ const _hoisted_4$3 = {
13457
13461
  key: 0,
13458
13462
  class: "user-info"
13459
13463
  };
13460
- const _hoisted_4$3 = { class: "user-name" };
13461
- const _hoisted_5$2 = { class: "avatar-container" };
13462
- const _hoisted_6$2 = { class: "avatar-wrapper" };
13463
- const _hoisted_7$2 = ["src", "alt"];
13464
- const _hoisted_8$2 = {
13464
+ const _hoisted_5$2 = { class: "user-name" };
13465
+ const _hoisted_6$2 = { class: "avatar-container" };
13466
+ const _hoisted_7$2 = { class: "avatar-wrapper" };
13467
+ const _hoisted_8$2 = ["src", "alt"];
13468
+ const _hoisted_9$2 = {
13465
13469
  key: 1,
13466
13470
  class: "avatar-default"
13467
13471
  };
13468
- const _hoisted_9$2 = ["onKeydown"];
13469
- const _hoisted_10$2 = { class: "dropdown-content" };
13470
- const _hoisted_11$2 = { class: "dropdown-header" };
13471
- const _hoisted_12$2 = {
13472
+ const _hoisted_10$2 = ["onKeydown"];
13473
+ const _hoisted_11$2 = { class: "dropdown-content" };
13474
+ const _hoisted_12$2 = { class: "dropdown-header" };
13475
+ const _hoisted_13$2 = {
13472
13476
  key: 0,
13473
13477
  class: "dropdown-avatar-container"
13474
13478
  };
13475
- const _hoisted_13$2 = ["src", "alt"];
13476
- const _hoisted_14$2 = {
13479
+ const _hoisted_14$2 = ["src", "alt"];
13480
+ const _hoisted_15$2 = {
13477
13481
  key: 1,
13478
13482
  class: "dropdown-avatar-default"
13479
13483
  };
13480
- const _hoisted_15$2 = { class: "dropdown-user-details" };
13481
- const _hoisted_16$2 = { class: "dropdown-user-name" };
13482
- const _hoisted_17$2 = { class: "dropdown-user-email" };
13484
+ const _hoisted_16$2 = { class: "dropdown-user-details" };
13485
+ const _hoisted_17$2 = { class: "dropdown-user-name" };
13486
+ const _hoisted_18$2 = { class: "dropdown-user-email" };
13487
+ const _hoisted_19$1 = { key: 1 };
13488
+ const _hoisted_20$1 = { class: "sign-in-auth-wrapper" };
13483
13489
  const _sfc_main$5 = /* @__PURE__ */ defineComponent({
13484
13490
  __name: "StrandsUserButton",
13485
13491
  props: {
@@ -13494,13 +13500,16 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
13494
13500
  setup(__props, { emit: __emit }) {
13495
13501
  const props = __props;
13496
13502
  const emit = __emit;
13497
- const { currentUser, signOut } = useStrandsAuth();
13503
+ const { currentUser, signOut, isAuthenticated } = useStrandsAuth();
13498
13504
  const showDropdown = ref(false);
13499
13505
  const showProfileModal = ref(false);
13500
13506
  const showSignInModal = ref(false);
13501
13507
  const containerRef = ref();
13502
13508
  const profileButtonRef = ref();
13503
- const user = computed(() => props.user || currentUser.value);
13509
+ const user = computed(() => {
13510
+ if (props.user) return props.user;
13511
+ return isAuthenticated.value ? currentUser.value : null;
13512
+ });
13504
13513
  const displayName = computed(() => {
13505
13514
  if (!user.value) return "User";
13506
13515
  if (user.value.username) {
@@ -13550,7 +13559,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
13550
13559
  const handleProfileUpdated = () => {
13551
13560
  emit("profile-updated");
13552
13561
  };
13553
- const handleProfileError = (error) => {
13562
+ const handleProfileError = () => {
13554
13563
  };
13555
13564
  const openSignIn = () => {
13556
13565
  showSignInModal.value = true;
@@ -13562,7 +13571,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
13562
13571
  closeSignIn();
13563
13572
  emit("signed-in");
13564
13573
  };
13565
- const handleSignInError = (error) => {
13574
+ const handleSignInError = () => {
13566
13575
  };
13567
13576
  const handleSignOut = async () => {
13568
13577
  try {
@@ -13589,261 +13598,209 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
13589
13598
  ref_key: "containerRef",
13590
13599
  ref: containerRef
13591
13600
  }, [
13592
- createVNode(unref(SignedIn), {
13593
- invert: !!props.user
13594
- }, {
13595
- loading: withCtx(() => [..._cache[0] || (_cache[0] = [])]),
13596
- fallback: withCtx(() => [
13597
- createElementVNode("button", {
13598
- onClick: openSignIn,
13599
- class: "sign-in-button",
13600
- "aria-label": "Sign in"
13601
- }, [..._cache[10] || (_cache[10] = [
13602
- createElementVNode("svg", {
13603
- class: "sign-in-icon",
13604
- fill: "none",
13605
- stroke: "currentColor",
13606
- viewBox: "0 0 24 24"
13607
- }, [
13608
- createElementVNode("path", {
13609
- "stroke-linecap": "round",
13610
- "stroke-linejoin": "round",
13611
- "stroke-width": "2",
13612
- d: "M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1"
13613
- })
13614
- ], -1),
13615
- createElementVNode("span", null, "Sign In", -1)
13616
- ])]),
13617
- createVNode(UiModal, {
13618
- open: showSignInModal.value,
13619
- onClose: closeSignIn,
13620
- "fullscreen-on-mobile": false
13621
- }, {
13622
- header: withCtx(() => [
13623
- createElementVNode("div", { class: "modal-header" }, [
13624
- _cache[12] || (_cache[12] = createElementVNode("h2", { class: "modal-title" }, "Sign In", -1)),
13625
- createElementVNode("button", {
13626
- onClick: closeSignIn,
13627
- class: "modal-close-button",
13628
- "aria-label": "Close sign in"
13629
- }, [..._cache[11] || (_cache[11] = [
13601
+ user.value ? (openBlock(), createElementBlock("div", _hoisted_1$4, [
13602
+ createElementVNode("button", {
13603
+ onClick: toggleDropdown,
13604
+ onKeydown: [
13605
+ withKeys(toggleDropdown, ["enter"]),
13606
+ withKeys(withModifiers(toggleDropdown, ["prevent"]), ["space"]),
13607
+ withKeys(closeDropdown, ["escape"]),
13608
+ withKeys(withModifiers(openDropdown, ["prevent"]), ["arrow-down"])
13609
+ ],
13610
+ class: normalizeClass(["user-button", { "user-button-active": showDropdown.value }]),
13611
+ "aria-haspopup": "true",
13612
+ "aria-expanded": showDropdown.value,
13613
+ "aria-label": "User menu"
13614
+ }, [
13615
+ createElementVNode("div", _hoisted_3$3, [
13616
+ !_ctx.hideUser ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
13617
+ createElementVNode("div", _hoisted_5$2, toDisplayString(displayName.value), 1)
13618
+ ])) : createCommentVNode("", true),
13619
+ createElementVNode("div", _hoisted_6$2, [
13620
+ createElementVNode("div", _hoisted_7$2, [
13621
+ user.value?.avatar ? (openBlock(), createElementBlock("img", {
13622
+ key: 0,
13623
+ src: user.value.avatar,
13624
+ alt: `${user.value.firstName || user.value.email}'s avatar`,
13625
+ class: "avatar-image",
13626
+ width: "32",
13627
+ height: "32",
13628
+ loading: "eager"
13629
+ }, null, 8, _hoisted_8$2)) : (openBlock(), createElementBlock("div", _hoisted_9$2, [..._cache[1] || (_cache[1] = [
13630
13630
  createElementVNode("svg", {
13631
- class: "modal-close-icon",
13632
- fill: "none",
13633
- stroke: "currentColor",
13634
- viewBox: "0 0 24 24"
13631
+ class: "avatar-icon",
13632
+ fill: "currentColor",
13633
+ viewBox: "0 0 20 20"
13635
13634
  }, [
13636
13635
  createElementVNode("path", {
13637
- "stroke-linecap": "round",
13638
- "stroke-linejoin": "round",
13639
- "stroke-width": "2",
13640
- d: "M6 18L18 6M6 6l12 12"
13636
+ "fill-rule": "evenodd",
13637
+ d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
13638
+ "clip-rule": "evenodd"
13641
13639
  })
13642
13640
  ], -1)
13643
- ])])
13641
+ ])]))
13644
13642
  ])
13645
13643
  ]),
13644
+ (openBlock(), createElementBlock("svg", {
13645
+ class: normalizeClass(["dropdown-arrow", { "dropdown-arrow-open": showDropdown.value }]),
13646
+ fill: "none",
13647
+ stroke: "currentColor",
13648
+ viewBox: "0 0 24 24"
13649
+ }, [..._cache[2] || (_cache[2] = [
13650
+ createElementVNode("path", {
13651
+ "stroke-linecap": "round",
13652
+ "stroke-linejoin": "round",
13653
+ "stroke-width": "2",
13654
+ d: "M19 9l-7 7-7-7"
13655
+ }, null, -1)
13656
+ ])], 2))
13657
+ ]),
13658
+ createVNode(Transition, { name: "dropdown" }, {
13646
13659
  default: withCtx(() => [
13660
+ showDropdown.value ? (openBlock(), createElementBlock("div", {
13661
+ key: 0,
13662
+ class: normalizeClass([
13663
+ "dropdown-menu",
13664
+ `dropdown-menu-align-${props.menuAlign}`,
13665
+ `dropdown-menu-vertical-${props.menuVerticalAlign}`
13666
+ ]),
13667
+ role: "menu",
13668
+ "aria-orientation": "vertical",
13669
+ onKeydown: [
13670
+ withKeys(closeDropdown, ["escape"]),
13671
+ withKeys(withModifiers(focusPrevious, ["prevent"]), ["arrow-up"]),
13672
+ withKeys(withModifiers(focusNext, ["prevent"]), ["arrow-down"]),
13673
+ withKeys(withModifiers(focusFirst, ["prevent"]), ["home"]),
13674
+ withKeys(withModifiers(focusLast, ["prevent"]), ["end"])
13675
+ ]
13676
+ }, [
13677
+ createElementVNode("div", _hoisted_11$2, [
13678
+ createElementVNode("div", _hoisted_12$2, [
13679
+ user.value ? (openBlock(), createElementBlock("div", _hoisted_13$2, [
13680
+ createVNode(unref(StrandsUiLevelProgress), {
13681
+ size: 80,
13682
+ value: user.value.xp,
13683
+ max: user.value.next_level_xp,
13684
+ level: user.value.level,
13685
+ "level-label": `LEVEL ${user.value.level}`,
13686
+ "user-settings": user.value.settings,
13687
+ class: "level-progress-overlay"
13688
+ }, null, 8, ["value", "max", "level", "level-label", "user-settings"]),
13689
+ user.value?.avatar ? (openBlock(), createElementBlock("img", {
13690
+ key: 0,
13691
+ src: user.value.avatar,
13692
+ alt: `${user.value.firstName || user.value.email}'s avatar`,
13693
+ class: "dropdown-avatar-image",
13694
+ width: "64",
13695
+ height: "64"
13696
+ }, null, 8, _hoisted_14$2)) : (openBlock(), createElementBlock("div", _hoisted_15$2, [..._cache[3] || (_cache[3] = [
13697
+ createElementVNode("svg", {
13698
+ class: "dropdown-avatar-icon",
13699
+ fill: "currentColor",
13700
+ viewBox: "0 0 20 20"
13701
+ }, [
13702
+ createElementVNode("path", {
13703
+ "fill-rule": "evenodd",
13704
+ d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
13705
+ "clip-rule": "evenodd"
13706
+ })
13707
+ ], -1)
13708
+ ])]))
13709
+ ])) : createCommentVNode("", true),
13710
+ createElementVNode("div", _hoisted_16$2, [
13711
+ createElementVNode("div", _hoisted_17$2, toDisplayString(displayName.value), 1),
13712
+ createElementVNode("div", _hoisted_18$2, toDisplayString(user.value?.email), 1)
13713
+ ])
13714
+ ]),
13715
+ _cache[6] || (_cache[6] = createElementVNode("div", { class: "dropdown-divider" }, null, -1)),
13716
+ renderSlot(_ctx.$slots, "default", {}, void 0, true),
13717
+ _cache[7] || (_cache[7] = createElementVNode("div", { class: "dropdown-divider" }, null, -1)),
13718
+ createVNode(unref(StrandsNav), null, {
13719
+ default: withCtx(() => [
13720
+ createVNode(unref(StrandsNav).Item, { onClick: openProfile }, {
13721
+ default: withCtx(() => [..._cache[4] || (_cache[4] = [
13722
+ createTextVNode("Profile", -1)
13723
+ ])]),
13724
+ _: 1
13725
+ }),
13726
+ createVNode(unref(StrandsNav).Item, {
13727
+ onClick: handleSignOut,
13728
+ color: "danger"
13729
+ }, {
13730
+ default: withCtx(() => [..._cache[5] || (_cache[5] = [
13731
+ createTextVNode("Sign Out", -1)
13732
+ ])]),
13733
+ _: 1
13734
+ })
13735
+ ]),
13736
+ _: 1
13737
+ })
13738
+ ])
13739
+ ], 42, _hoisted_10$2)) : createCommentVNode("", true)
13740
+ ]),
13741
+ _: 3
13742
+ })
13743
+ ], 42, _hoisted_2$3),
13744
+ createVNode(UiModal, {
13745
+ open: showProfileModal.value,
13746
+ onClose: closeProfile,
13747
+ "fullscreen-on-mobile": false
13748
+ }, {
13749
+ default: withCtx(() => [
13750
+ createVNode(unref(StrandsUserProfile), {
13751
+ user: user.value,
13752
+ onProfileUpdated: handleProfileUpdated,
13753
+ onError: handleProfileError,
13754
+ "in-modal": ""
13755
+ }, null, 8, ["user"])
13756
+ ]),
13757
+ _: 1
13758
+ }, 8, ["open"])
13759
+ ])) : (openBlock(), createElementBlock("div", _hoisted_19$1, [
13760
+ createElementVNode("button", {
13761
+ onClick: openSignIn,
13762
+ class: "sign-in-button",
13763
+ "aria-label": "Sign in"
13764
+ }, [..._cache[8] || (_cache[8] = [
13765
+ createElementVNode("svg", {
13766
+ class: "sign-in-icon",
13767
+ fill: "none",
13768
+ stroke: "currentColor",
13769
+ viewBox: "0 0 24 24"
13770
+ }, [
13771
+ createElementVNode("path", {
13772
+ "stroke-linecap": "round",
13773
+ "stroke-linejoin": "round",
13774
+ "stroke-width": "2",
13775
+ d: "M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1"
13776
+ })
13777
+ ], -1),
13778
+ createElementVNode("span", null, "Sign In", -1)
13779
+ ])]),
13780
+ createVNode(UiModal, {
13781
+ modelValue: showSignInModal.value,
13782
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => showSignInModal.value = $event),
13783
+ onClose: closeSignIn,
13784
+ "fullscreen-on-mobile": false
13785
+ }, {
13786
+ default: withCtx(() => [
13787
+ createElementVNode("div", _hoisted_20$1, [
13647
13788
  createVNode(unref(StrandsAuth), {
13648
13789
  onSignedIn: handleSignedIn,
13649
13790
  onError: handleSignInError,
13650
13791
  "redirect-url": _ctx.redirectUrl,
13651
13792
  "in-modal": ""
13652
13793
  }, null, 8, ["redirect-url"])
13653
- ]),
13654
- _: 1
13655
- }, 8, ["open"])
13656
- ]),
13657
- default: withCtx(() => [
13658
- createElementVNode("button", {
13659
- onClick: toggleDropdown,
13660
- onKeydown: [
13661
- withKeys(toggleDropdown, ["enter"]),
13662
- withKeys(withModifiers(toggleDropdown, ["prevent"]), ["space"]),
13663
- withKeys(closeDropdown, ["escape"]),
13664
- withKeys(withModifiers(openDropdown, ["prevent"]), ["arrow-down"])
13665
- ],
13666
- class: normalizeClass(["user-button", { "user-button-active": showDropdown.value }]),
13667
- "aria-haspopup": "true",
13668
- "aria-expanded": showDropdown.value,
13669
- "aria-label": "User menu"
13670
- }, [
13671
- createElementVNode("div", _hoisted_2$3, [
13672
- !_ctx.hideUser ? (openBlock(), createElementBlock("div", _hoisted_3$3, [
13673
- createElementVNode("div", _hoisted_4$3, toDisplayString(displayName.value), 1)
13674
- ])) : createCommentVNode("", true),
13675
- createElementVNode("div", _hoisted_5$2, [
13676
- createElementVNode("div", _hoisted_6$2, [
13677
- user.value?.avatar ? (openBlock(), createElementBlock("img", {
13678
- key: 0,
13679
- src: user.value.avatar,
13680
- alt: `${user.value.firstName || user.value.email}'s avatar`,
13681
- class: "avatar-image",
13682
- width: "32",
13683
- height: "32",
13684
- loading: "eager"
13685
- }, null, 8, _hoisted_7$2)) : (openBlock(), createElementBlock("div", _hoisted_8$2, [..._cache[1] || (_cache[1] = [
13686
- createElementVNode("svg", {
13687
- class: "avatar-icon",
13688
- fill: "currentColor",
13689
- viewBox: "0 0 20 20"
13690
- }, [
13691
- createElementVNode("path", {
13692
- "fill-rule": "evenodd",
13693
- d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
13694
- "clip-rule": "evenodd"
13695
- })
13696
- ], -1)
13697
- ])]))
13698
- ])
13699
- ]),
13700
- (openBlock(), createElementBlock("svg", {
13701
- class: normalizeClass(["dropdown-arrow", { "dropdown-arrow-open": showDropdown.value }]),
13702
- fill: "none",
13703
- stroke: "currentColor",
13704
- viewBox: "0 0 24 24"
13705
- }, [..._cache[2] || (_cache[2] = [
13706
- createElementVNode("path", {
13707
- "stroke-linecap": "round",
13708
- "stroke-linejoin": "round",
13709
- "stroke-width": "2",
13710
- d: "M19 9l-7 7-7-7"
13711
- }, null, -1)
13712
- ])], 2))
13713
- ]),
13714
- createVNode(Transition, { name: "dropdown" }, {
13715
- default: withCtx(() => [
13716
- showDropdown.value ? (openBlock(), createElementBlock("div", {
13717
- key: 0,
13718
- class: normalizeClass([
13719
- "dropdown-menu",
13720
- `dropdown-menu-align-${props.menuAlign}`,
13721
- `dropdown-menu-vertical-${props.menuVerticalAlign}`
13722
- ]),
13723
- role: "menu",
13724
- "aria-orientation": "vertical",
13725
- onKeydown: [
13726
- withKeys(closeDropdown, ["escape"]),
13727
- withKeys(withModifiers(focusPrevious, ["prevent"]), ["arrow-up"]),
13728
- withKeys(withModifiers(focusNext, ["prevent"]), ["arrow-down"]),
13729
- withKeys(withModifiers(focusFirst, ["prevent"]), ["home"]),
13730
- withKeys(withModifiers(focusLast, ["prevent"]), ["end"])
13731
- ]
13732
- }, [
13733
- createElementVNode("div", _hoisted_10$2, [
13734
- createElementVNode("div", _hoisted_11$2, [
13735
- user.value ? (openBlock(), createElementBlock("div", _hoisted_12$2, [
13736
- createVNode(unref(StrandsUiLevelProgress), {
13737
- size: 80,
13738
- value: user.value.xp,
13739
- max: user.value.next_level_xp,
13740
- level: user.value.level,
13741
- "level-label": `LEVEL ${user.value.level}`,
13742
- "user-settings": user.value.settings,
13743
- class: "level-progress-overlay"
13744
- }, null, 8, ["value", "max", "level", "level-label", "user-settings"]),
13745
- user.value?.avatar ? (openBlock(), createElementBlock("img", {
13746
- key: 0,
13747
- src: user.value.avatar,
13748
- alt: `${user.value.firstName || user.value.email}'s avatar`,
13749
- class: "dropdown-avatar-image",
13750
- width: "64",
13751
- height: "64"
13752
- }, null, 8, _hoisted_13$2)) : (openBlock(), createElementBlock("div", _hoisted_14$2, [..._cache[3] || (_cache[3] = [
13753
- createElementVNode("svg", {
13754
- class: "dropdown-avatar-icon",
13755
- fill: "currentColor",
13756
- viewBox: "0 0 20 20"
13757
- }, [
13758
- createElementVNode("path", {
13759
- "fill-rule": "evenodd",
13760
- d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
13761
- "clip-rule": "evenodd"
13762
- })
13763
- ], -1)
13764
- ])]))
13765
- ])) : createCommentVNode("", true),
13766
- createElementVNode("div", _hoisted_15$2, [
13767
- createElementVNode("div", _hoisted_16$2, toDisplayString(displayName.value), 1),
13768
- createElementVNode("div", _hoisted_17$2, toDisplayString(user.value?.email), 1)
13769
- ])
13770
- ]),
13771
- _cache[6] || (_cache[6] = createElementVNode("div", { class: "dropdown-divider" }, null, -1)),
13772
- renderSlot(_ctx.$slots, "default", {}, void 0, true),
13773
- _cache[7] || (_cache[7] = createElementVNode("div", { class: "dropdown-divider" }, null, -1)),
13774
- createVNode(unref(StrandsNav), null, {
13775
- default: withCtx(() => [
13776
- createVNode(unref(StrandsNav).Item, { onClick: openProfile }, {
13777
- default: withCtx(() => [..._cache[4] || (_cache[4] = [
13778
- createTextVNode("Profile", -1)
13779
- ])]),
13780
- _: 1
13781
- }),
13782
- createVNode(unref(StrandsNav).Item, {
13783
- onClick: handleSignOut,
13784
- color: "danger"
13785
- }, {
13786
- default: withCtx(() => [..._cache[5] || (_cache[5] = [
13787
- createTextVNode("Sign Out", -1)
13788
- ])]),
13789
- _: 1
13790
- })
13791
- ]),
13792
- _: 1
13793
- })
13794
- ])
13795
- ], 42, _hoisted_9$2)) : createCommentVNode("", true)
13796
- ]),
13797
- _: 3
13798
- })
13799
- ], 42, _hoisted_1$4),
13800
- createVNode(UiModal, {
13801
- open: showProfileModal.value,
13802
- onClose: closeProfile,
13803
- "fullscreen-on-mobile": false
13804
- }, {
13805
- header: withCtx(() => [
13806
- createElementVNode("div", { class: "modal-header" }, [
13807
- _cache[9] || (_cache[9] = createElementVNode("h2", { class: "modal-title" }, "User Profile", -1)),
13808
- createElementVNode("button", {
13809
- onClick: closeProfile,
13810
- class: "modal-close-button",
13811
- "aria-label": "Close profile"
13812
- }, [..._cache[8] || (_cache[8] = [
13813
- createElementVNode("svg", {
13814
- class: "modal-close-icon",
13815
- fill: "none",
13816
- stroke: "currentColor",
13817
- viewBox: "0 0 24 24"
13818
- }, [
13819
- createElementVNode("path", {
13820
- "stroke-linecap": "round",
13821
- "stroke-linejoin": "round",
13822
- "stroke-width": "2",
13823
- d: "M6 18L18 6M6 6l12 12"
13824
- })
13825
- ], -1)
13826
- ])])
13827
- ])
13828
- ]),
13829
- default: withCtx(() => [
13830
- createVNode(unref(StrandsUserProfile), {
13831
- user: user.value,
13832
- onProfileUpdated: handleProfileUpdated,
13833
- onError: handleProfileError,
13834
- "in-modal": ""
13835
- }, null, 8, ["user"])
13836
- ]),
13837
- _: 1
13838
- }, 8, ["open"])
13839
- ]),
13840
- _: 3
13841
- }, 8, ["invert"])
13794
+ ])
13795
+ ]),
13796
+ _: 1
13797
+ }, 8, ["modelValue"])
13798
+ ]))
13842
13799
  ], 512);
13843
13800
  };
13844
13801
  }
13845
13802
  });
13846
- const StrandsUserButton = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-ae05f8c9"]]);
13803
+ const StrandsUserButton = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-20ad1bfa"]]);
13847
13804
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
13848
13805
  __name: "StrandsNav",
13849
13806
  props: {