@strands.gg/accui 2.14.1 → 2.14.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.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as _export_sfc, S as StrandsUiButton, U as UiButtonContent, a as _sfc_main$G, b as _sfc_main$H, c as _sfc_main$I, d as createLucideIcon, M as Minus, e as StrandsUiCard, f as UiTooltip, g as UiDivider, u as useFloatingPosition, C as ChevronDown, h as StrandsUiInput, i as StrandsUiLoader, j as StrandsUiTabs, k as StrandsUiLink, l as StrandsUiAlert } from "./StrandsUIPlugin-tl7L52hZ.es.js";
2
- import { m } from "./StrandsUIPlugin-tl7L52hZ.es.js";
1
+ import { _ as _export_sfc, S as StrandsUiButton, U as UiButtonContent, a as _sfc_main$G, b as _sfc_main$H, c as _sfc_main$I, d as createLucideIcon, M as Minus, e as StrandsUiCard, f as UiTooltip, g as UiDivider, u as useFloatingPosition, C as ChevronDown, h as StrandsUiInput, i as StrandsUiLoader, j as StrandsUiTabs, k as StrandsUiLink, l as StrandsUiAlert } from "./StrandsUIPlugin-CE4-QxEo.es.js";
2
+ import { m } from "./StrandsUIPlugin-CE4-QxEo.es.js";
3
3
  import { defineComponent, computed, provide, onMounted, onUnmounted, createElementBlock, openBlock, normalizeClass, createElementVNode, createBlock, renderSlot, Teleport, createCommentVNode, toDisplayString, createTextVNode, ref, reactive, watch, withModifiers, createStaticVNode, createVNode, withDirectives, withCtx, unref, vModelText, nextTick, Fragment, Transition, createSlots, normalizeStyle, renderList, mergeProps, useSlots, inject, resolveDynamicComponent, onBeforeUnmount, withKeys, h, isMemoSame, getCurrentInstance } from "vue";
4
4
  import { u as useStrandsConfig, p as provideStrandsConfig } from "./useStrandsConfig-fRu-OG08.es.js";
5
5
  import { s } from "./useStrandsConfig-fRu-OG08.es.js";
@@ -296,7 +296,7 @@ const _hoisted_18$e = ["min", "max"];
296
296
  const _hoisted_19$d = { class: "action-buttons" };
297
297
  const _hoisted_20$b = { class: "preview-section" };
298
298
  const _hoisted_21$b = { class: "preview-container" };
299
- const _hoisted_22$8 = ["width", "height"];
299
+ const _hoisted_22$7 = ["width", "height"];
300
300
  const _sfc_main$D = /* @__PURE__ */ defineComponent({
301
301
  __name: "UiAvatarEditor",
302
302
  props: {
@@ -766,7 +766,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
766
766
  width: previewSize.value,
767
767
  height: previewSize.value,
768
768
  class: "preview-canvas"
769
- }, null, 8, _hoisted_22$8)
769
+ }, null, 8, _hoisted_22$7)
770
770
  ]),
771
771
  _cache[10] || (_cache[10] = createElementVNode("p", { class: "preview-instructions" }, [
772
772
  createTextVNode(" Drag image to reposition"),
@@ -1806,7 +1806,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
1806
1806
  };
1807
1807
  }
1808
1808
  });
1809
- const UiModal = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-ecf47be6"]]);
1809
+ const UiModal = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-2decdbca"]]);
1810
1810
  const tailwindColors = {
1811
1811
  "#000000": {
1812
1812
  label: "Black"
@@ -2436,7 +2436,7 @@ const _hoisted_20$a = {
2436
2436
  class: "ui-color-picker-contrast-svg"
2437
2437
  };
2438
2438
  const _hoisted_21$a = ["cx", "fill"];
2439
- const _hoisted_22$7 = { class: "ui-color-picker-inputs" };
2439
+ const _hoisted_22$6 = { class: "ui-color-picker-inputs" };
2440
2440
  const _hoisted_23$5 = {
2441
2441
  key: 0,
2442
2442
  class: "ui-color-picker-input-row"
@@ -4295,7 +4295,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
4295
4295
  style: normalizeStyle({ left: `${alpha.value * 100}%` })
4296
4296
  }, null, 4)
4297
4297
  ], 544)) : createCommentVNode("", true),
4298
- createElementVNode("div", _hoisted_22$7, [
4298
+ createElementVNode("div", _hoisted_22$6, [
4299
4299
  currentColorFormat.value === "hex" ? (openBlock(), createElementBlock("div", _hoisted_23$5, [
4300
4300
  createElementVNode("div", _hoisted_24$5, [
4301
4301
  _cache[24] || (_cache[24] = createElementVNode("label", { class: "ui-color-picker-label" }, "Hex", -1)),
@@ -4897,7 +4897,7 @@ const _hoisted_21$9 = {
4897
4897
  key: 0,
4898
4898
  class: "ui-table-empty"
4899
4899
  };
4900
- const _hoisted_22$6 = {
4900
+ const _hoisted_22$5 = {
4901
4901
  key: 1,
4902
4902
  class: "ui-table-footer"
4903
4903
  };
@@ -5453,7 +5453,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
5453
5453
  ], true)
5454
5454
  ])) : createCommentVNode("", true)
5455
5455
  ]),
5456
- hasFooterSlots.value ? (openBlock(), createElementBlock("div", _hoisted_22$6, [
5456
+ hasFooterSlots.value ? (openBlock(), createElementBlock("div", _hoisted_22$5, [
5457
5457
  (openBlock(true), createElementBlock(Fragment, null, renderList(internalColumns.value, (column, index) => {
5458
5458
  return openBlock(), createElementBlock("div", {
5459
5459
  key: `footer-${index}`,
@@ -5868,7 +5868,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
5868
5868
  _ctx.variant === "button" ? (openBlock(), createBlock(StrandsUiButton, {
5869
5869
  key: 0,
5870
5870
  icon: !_ctx.includeLabel,
5871
- squircle: true,
5871
+ squircle: "",
5872
5872
  variant: "ghost",
5873
5873
  size: _ctx.size,
5874
5874
  disabled: isDisabled.value,
@@ -5986,7 +5986,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
5986
5986
  };
5987
5987
  }
5988
5988
  });
5989
- const UiThemeToggle = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-9feda151"]]);
5989
+ const UiThemeToggle = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-1edc8bae"]]);
5990
5990
  const _hoisted_1$s = {
5991
5991
  key: 0,
5992
5992
  class: "slider-header"
@@ -7010,7 +7010,7 @@ const _hoisted_18$a = {
7010
7010
  const _hoisted_19$9 = { class: "mfa-hardware-prompt" };
7011
7011
  const _hoisted_20$7 = { class: "mfa-hardware-prompt-content" };
7012
7012
  const _hoisted_21$7 = { class: "mfa-hardware-prompt-icon" };
7013
- const _hoisted_22$5 = { class: "mfa-hardware-prompt-text" };
7013
+ const _hoisted_22$4 = { class: "mfa-hardware-prompt-text" };
7014
7014
  const _hoisted_23$4 = { class: "mfa-hardware-prompt-title" };
7015
7015
  const _hoisted_24$4 = { class: "mfa-hardware-prompt-description" };
7016
7016
  const _hoisted_25$4 = { class: "mfa-backup-option" };
@@ -7514,7 +7514,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
7514
7514
  class: "mfa-hardware-icon-svg"
7515
7515
  }))
7516
7516
  ]),
7517
- createElementVNode("div", _hoisted_22$5, [
7517
+ createElementVNode("div", _hoisted_22$4, [
7518
7518
  createElementVNode("h4", _hoisted_23$4, toDisplayString(selectedMethod.value.device_type === "passkey" ? "Use your passkey" : "Touch your hardware key"), 1),
7519
7519
  createElementVNode("p", _hoisted_24$4, toDisplayString(selectedMethod.value.device_type === "passkey" ? "Use biometrics, PIN, or device security to authenticate" : "Insert and touch your hardware key to authenticate"), 1)
7520
7520
  ])
@@ -8943,7 +8943,7 @@ const _hoisted_19$6 = {
8943
8943
  };
8944
8944
  const _hoisted_20$5 = { class: "oauth-icon-fallback-text" };
8945
8945
  const _hoisted_21$5 = { class: "oauth-button-text" };
8946
- const _hoisted_22$4 = {
8946
+ const _hoisted_22$3 = {
8947
8947
  key: 1,
8948
8948
  class: "divider-with-text"
8949
8949
  };
@@ -9170,7 +9170,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
9170
9170
  }, 1032, ["disabled", "onClick"]);
9171
9171
  }), 128))
9172
9172
  ])) : createCommentVNode("", true),
9173
- unref(enabledProviders)?.length ? (openBlock(), createElementBlock("div", _hoisted_22$4, [..._cache[8] || (_cache[8] = [
9173
+ unref(enabledProviders)?.length ? (openBlock(), createElementBlock("div", _hoisted_22$3, [..._cache[8] || (_cache[8] = [
9174
9174
  createElementVNode("span", { class: "divider-text" }, "Or create account with email", -1)
9175
9175
  ])])) : createCommentVNode("", true),
9176
9176
  createElementVNode("form", {
@@ -11247,7 +11247,7 @@ const _hoisted_18$4 = { class: "mfa-device-option" };
11247
11247
  const _hoisted_19$3 = { class: "mfa-device-option-content" };
11248
11248
  const _hoisted_20$3 = { class: "mfa-device-option-icon" };
11249
11249
  const _hoisted_21$3 = { class: "mfa-device-option" };
11250
- const _hoisted_22$3 = { class: "mfa-device-option-content" };
11250
+ const _hoisted_22$2 = { class: "mfa-device-option-content" };
11251
11251
  const _hoisted_23$2 = { class: "mfa-device-option-icon" };
11252
11252
  const _hoisted_24$2 = {
11253
11253
  key: 1,
@@ -11557,7 +11557,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
11557
11557
  })
11558
11558
  ]),
11559
11559
  createElementVNode("div", _hoisted_21$3, [
11560
- createElementVNode("div", _hoisted_22$3, [
11560
+ createElementVNode("div", _hoisted_22$2, [
11561
11561
  createElementVNode("div", _hoisted_23$2, [
11562
11562
  createVNode(Fingerprint, { size: 24 })
11563
11563
  ]),
@@ -11996,7 +11996,7 @@ const _hoisted_18$3 = {
11996
11996
  const _hoisted_19$2 = { class: "session-details" };
11997
11997
  const _hoisted_20$2 = { class: "detail-row" };
11998
11998
  const _hoisted_21$2 = { class: "detail-icon" };
11999
- const _hoisted_22$2 = { class: "detail-text" };
11999
+ const _hoisted_22$1 = { class: "detail-text" };
12000
12000
  const _hoisted_23$1 = { class: "detail-row" };
12001
12001
  const _hoisted_24$1 = { class: "detail-icon" };
12002
12002
  const _hoisted_25$1 = { class: "detail-text" };
@@ -12290,7 +12290,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
12290
12290
  createElementVNode("span", _hoisted_21$2, [
12291
12291
  createVNode(Monitor2, { size: 14 })
12292
12292
  ]),
12293
- createElementVNode("span", _hoisted_22$2, toDisplayString(session.user_agent || "Unknown device"), 1)
12293
+ createElementVNode("span", _hoisted_22$1, toDisplayString(session.user_agent || "Unknown device"), 1)
12294
12294
  ]),
12295
12295
  createElementVNode("div", _hoisted_23$1, [
12296
12296
  createElementVNode("span", _hoisted_24$1, [
@@ -12378,7 +12378,7 @@ const _hoisted_20$1 = {
12378
12378
  class: "profile-change-form"
12379
12379
  };
12380
12380
  const _hoisted_21$1 = { class: "profile-password-section" };
12381
- const _hoisted_22$1 = { class: "profile-field-section" };
12381
+ const _hoisted_22 = { class: "profile-field-section" };
12382
12382
  const _hoisted_23 = { class: "profile-field-header" };
12383
12383
  const _hoisted_24 = { class: "profile-field-subtitle" };
12384
12384
  const _hoisted_25 = {
@@ -13287,7 +13287,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
13287
13287
  ]),
13288
13288
  createElementVNode("div", _hoisted_21$1, [
13289
13289
  _cache[23] || (_cache[23] = createElementVNode("h3", { class: "profile-section-title" }, "Security Settings", -1)),
13290
- createElementVNode("div", _hoisted_22$1, [
13290
+ createElementVNode("div", _hoisted_22, [
13291
13291
  createElementVNode("div", _hoisted_23, [
13292
13292
  createElementVNode("div", null, [
13293
13293
  _cache[18] || (_cache[18] = createElementVNode("h4", { class: "profile-field-title" }, "Password", -1)),
@@ -13947,58 +13947,45 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
13947
13947
  };
13948
13948
  }
13949
13949
  });
13950
- const _hoisted_1$3 = {
13951
- key: 0,
13952
- class: "mini-profile-avatar-container"
13953
- };
13954
- const _hoisted_2$2 = ["src", "alt", "width", "height"];
13955
- const _hoisted_3$2 = {
13956
- key: 1,
13957
- class: "mini-profile-avatar-default"
13958
- };
13950
+ const _hoisted_1$3 = ["onKeydown", "aria-expanded"];
13951
+ const _hoisted_2$2 = { class: "mini-profile-avatar-container" };
13952
+ const _hoisted_3$2 = ["src", "alt", "width", "height"];
13959
13953
  const _hoisted_4$2 = {
13960
13954
  key: 1,
13961
- class: "avatar-wrapper"
13955
+ class: "mini-profile-avatar-default"
13962
13956
  };
13963
- const _hoisted_5$1 = ["src", "alt", "width", "height"];
13964
- const _hoisted_6$1 = {
13957
+ const _hoisted_5$1 = { class: "mini-profile-content" };
13958
+ const _hoisted_6$1 = { class: "mini-profile-name" };
13959
+ const _hoisted_7$1 = { class: "mini-profile-email" };
13960
+ const _hoisted_8$1 = ["src", "alt", "width", "height"];
13961
+ const _hoisted_9$1 = {
13965
13962
  key: 1,
13966
13963
  class: "avatar-default"
13967
13964
  };
13968
- const _hoisted_7$1 = {
13969
- key: 0,
13970
- class: "mini-profile-content"
13971
- };
13972
- const _hoisted_8$1 = { class: "mini-profile-name" };
13973
- const _hoisted_9$1 = { class: "mini-profile-email" };
13974
- const _hoisted_10$1 = {
13975
- key: 1,
13976
- class: "user-info"
13977
- };
13978
- const _hoisted_11$1 = { class: "user-name" };
13979
- const _hoisted_12$1 = ["onKeydown"];
13980
- const _hoisted_13$1 = { class: "dropdown-content" };
13981
- const _hoisted_14$1 = {
13965
+ const _hoisted_10$1 = { key: 0 };
13966
+ const _hoisted_11$1 = ["onKeydown"];
13967
+ const _hoisted_12$1 = { class: "dropdown-content" };
13968
+ const _hoisted_13$1 = {
13982
13969
  key: 0,
13983
13970
  class: "dropdown-header"
13984
13971
  };
13985
- const _hoisted_15$1 = {
13972
+ const _hoisted_14$1 = {
13986
13973
  key: 0,
13987
13974
  class: "dropdown-avatar-container"
13988
13975
  };
13989
- const _hoisted_16$1 = ["src", "alt"];
13990
- const _hoisted_17$1 = {
13976
+ const _hoisted_15$1 = ["src", "alt"];
13977
+ const _hoisted_16$1 = {
13991
13978
  key: 1,
13992
13979
  class: "dropdown-avatar-default"
13993
13980
  };
13994
- const _hoisted_18$1 = { class: "dropdown-user-details" };
13995
- const _hoisted_19 = { class: "dropdown-user-name" };
13996
- const _hoisted_20 = { class: "dropdown-user-email" };
13997
- const _hoisted_21 = {
13981
+ const _hoisted_17$1 = { class: "dropdown-user-details" };
13982
+ const _hoisted_18$1 = { class: "dropdown-user-name" };
13983
+ const _hoisted_19 = { class: "dropdown-user-email" };
13984
+ const _hoisted_20 = {
13998
13985
  key: 1,
13999
13986
  class: "dropdown-divider"
14000
13987
  };
14001
- const _hoisted_22 = { class: "sign-in-auth-wrapper" };
13988
+ const _hoisted_21 = { class: "sign-in-auth-wrapper" };
14002
13989
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
14003
13990
  __name: "StrandsUserButton",
14004
13991
  props: {
@@ -14021,10 +14008,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
14021
14008
  const containerRef = ref();
14022
14009
  const triggerRef = ref();
14023
14010
  const dropdownRef = ref();
14024
- const triggerElement = computed(() => {
14025
- const element = triggerRef.value?.$el;
14026
- return element;
14027
- });
14011
+ const triggerElement = computed(() => triggerRef.value);
14028
14012
  const { floatingStyle, updatePosition } = useFloatingPosition({
14029
14013
  trigger: triggerElement,
14030
14014
  floating: dropdownRef,
@@ -14039,6 +14023,18 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
14039
14023
  }
14040
14024
  });
14041
14025
  const avatarSize = computed(() => {
14026
+ if (props.variant === "mini-profile") {
14027
+ switch (props.size) {
14028
+ case "sm":
14029
+ return 32;
14030
+ case "md":
14031
+ return 44;
14032
+ case "lg":
14033
+ return 56;
14034
+ default:
14035
+ return 44;
14036
+ }
14037
+ }
14042
14038
  switch (props.size) {
14043
14039
  case "sm":
14044
14040
  return 24;
@@ -14142,7 +14138,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
14142
14138
  onClick: openSignIn,
14143
14139
  "aria-label": "Sign in"
14144
14140
  }, {
14145
- "leading-icon": withCtx(() => [..._cache[8] || (_cache[8] = [
14141
+ "leading-icon": withCtx(() => [..._cache[9] || (_cache[9] = [
14146
14142
  createElementVNode("svg", {
14147
14143
  class: "sign-in-icon",
14148
14144
  fill: "none",
@@ -14158,7 +14154,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
14158
14154
  ], -1)
14159
14155
  ])]),
14160
14156
  default: withCtx(() => [
14161
- _cache[9] || (_cache[9] = createTextVNode(" Sign In ", -1))
14157
+ _cache[10] || (_cache[10] = createTextVNode(" Sign In ", -1))
14162
14158
  ]),
14163
14159
  _: 1
14164
14160
  }),
@@ -14168,7 +14164,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
14168
14164
  "fullscreen-on-mobile": false
14169
14165
  }, {
14170
14166
  default: withCtx(() => [
14171
- createElementVNode("div", _hoisted_22, [
14167
+ createElementVNode("div", _hoisted_21, [
14172
14168
  createVNode(unref(StrandsAuth), {
14173
14169
  onSignedIn: handleSignedIn,
14174
14170
  onError: handleSignInError,
@@ -14187,13 +14183,82 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
14187
14183
  })
14188
14184
  ]),
14189
14185
  default: withCtx(() => [
14190
- createElementVNode("div", {
14191
- class: normalizeClass(["user-button-wrapper", `user-button-size-${_ctx.size}`, _ctx.variant === "mini-profile" && "user-button-mini-profile"])
14186
+ _ctx.variant === "mini-profile" ? (openBlock(), createElementBlock("div", {
14187
+ key: 0,
14188
+ ref_key: "triggerRef",
14189
+ ref: triggerRef,
14190
+ class: normalizeClass(["mini-profile-static-card", `user-button-size-${_ctx.size}`, { "mini-profile-active": showDropdown.value }]),
14191
+ onClick: toggleDropdown,
14192
+ onKeydown: [
14193
+ withKeys(toggleDropdown, ["enter"]),
14194
+ withKeys(withModifiers(toggleDropdown, ["prevent"]), ["space"]),
14195
+ withKeys(closeDropdown, ["escape"]),
14196
+ withKeys(withModifiers(openDropdown, ["prevent"]), ["arrow-down"])
14197
+ ],
14198
+ role: "button",
14199
+ tabindex: "0",
14200
+ "aria-haspopup": "true",
14201
+ "aria-expanded": showDropdown.value,
14202
+ "aria-label": "User menu"
14203
+ }, [
14204
+ createElementVNode("div", _hoisted_2$2, [
14205
+ createVNode(unref(UiLevelProgress), {
14206
+ size: avatarSizeWithProgress.value,
14207
+ value: user.value?.xp || 0,
14208
+ max: user.value?.next_level_xp || 100,
14209
+ level: user.value?.level || 1,
14210
+ "level-label": `LEVEL ${user.value?.level || 1}`,
14211
+ "user-settings": user.value?.settings,
14212
+ class: "mini-profile-level-progress"
14213
+ }, null, 8, ["size", "value", "max", "level", "level-label", "user-settings"]),
14214
+ user.value?.avatar ? (openBlock(), createElementBlock("img", {
14215
+ key: 0,
14216
+ src: user.value.avatar,
14217
+ alt: `${user.value?.firstName || user.value?.email}'s avatar`,
14218
+ class: "mini-profile-avatar-image",
14219
+ width: avatarSize.value,
14220
+ height: avatarSize.value,
14221
+ loading: "eager"
14222
+ }, null, 8, _hoisted_3$2)) : (openBlock(), createElementBlock("div", _hoisted_4$2, [..._cache[2] || (_cache[2] = [
14223
+ createElementVNode("svg", {
14224
+ class: "mini-profile-avatar-icon",
14225
+ fill: "currentColor",
14226
+ viewBox: "0 0 20 20"
14227
+ }, [
14228
+ createElementVNode("path", {
14229
+ "fill-rule": "evenodd",
14230
+ d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
14231
+ "clip-rule": "evenodd"
14232
+ })
14233
+ ], -1)
14234
+ ])]))
14235
+ ]),
14236
+ createElementVNode("div", _hoisted_5$1, [
14237
+ createElementVNode("div", _hoisted_6$1, toDisplayString(displayName.value), 1),
14238
+ createElementVNode("div", _hoisted_7$1, toDisplayString(user.value?.email), 1)
14239
+ ]),
14240
+ (openBlock(), createElementBlock("svg", {
14241
+ class: normalizeClass(["mini-profile-dropdown-arrow", { "dropdown-arrow-open": showDropdown.value }]),
14242
+ fill: "none",
14243
+ stroke: "currentColor",
14244
+ viewBox: "0 0 24 24"
14245
+ }, [..._cache[3] || (_cache[3] = [
14246
+ createElementVNode("path", {
14247
+ "stroke-linecap": "round",
14248
+ "stroke-linejoin": "round",
14249
+ "stroke-width": "2",
14250
+ d: "M19 9l-7 7-7-7"
14251
+ }, null, -1)
14252
+ ])], 2))
14253
+ ], 42, _hoisted_1$3)) : (openBlock(), createElementBlock("div", {
14254
+ key: 1,
14255
+ ref_key: "triggerRef",
14256
+ ref: triggerRef,
14257
+ class: "user-button-wrapper"
14192
14258
  }, [
14193
14259
  createVNode(unref(CompoundUiButton), {
14194
- ref_key: "triggerRef",
14195
- ref: triggerRef,
14196
14260
  color: "secondary",
14261
+ size: _ctx.size,
14197
14262
  active: showDropdown.value,
14198
14263
  onClick: toggleDropdown,
14199
14264
  onKeydown: [
@@ -14207,60 +14272,27 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
14207
14272
  "aria-label": "User menu"
14208
14273
  }, {
14209
14274
  "leading-icon": withCtx(() => [
14210
- _ctx.variant === "mini-profile" ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
14211
- createVNode(unref(UiLevelProgress), {
14212
- size: avatarSizeWithProgress.value,
14213
- value: user.value?.xp || 0,
14214
- max: user.value?.next_level_xp || 100,
14215
- level: user.value?.level || 1,
14216
- "level-label": `LEVEL ${user.value?.level || 1}`,
14217
- "user-settings": user.value?.settings,
14218
- class: "mini-profile-level-progress"
14219
- }, null, 8, ["size", "value", "max", "level", "level-label", "user-settings"]),
14220
- user.value?.avatar ? (openBlock(), createElementBlock("img", {
14221
- key: 0,
14222
- src: user.value.avatar,
14223
- alt: `${user.value?.firstName || user.value?.email}'s avatar`,
14224
- class: "mini-profile-avatar-image",
14225
- width: avatarSize.value,
14226
- height: avatarSize.value,
14227
- loading: "eager"
14228
- }, null, 8, _hoisted_2$2)) : (openBlock(), createElementBlock("div", _hoisted_3$2, [..._cache[2] || (_cache[2] = [
14229
- createElementVNode("svg", {
14230
- class: "mini-profile-avatar-icon",
14231
- fill: "currentColor",
14232
- viewBox: "0 0 20 20"
14233
- }, [
14234
- createElementVNode("path", {
14235
- "fill-rule": "evenodd",
14236
- d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
14237
- "clip-rule": "evenodd"
14238
- })
14239
- ], -1)
14240
- ])]))
14241
- ])) : (openBlock(), createElementBlock("div", _hoisted_4$2, [
14242
- user.value?.avatar ? (openBlock(), createElementBlock("img", {
14243
- key: 0,
14244
- src: user.value.avatar,
14245
- alt: `${user.value?.firstName || user.value?.email}'s avatar`,
14246
- class: "avatar-image",
14247
- width: avatarSize.value,
14248
- height: avatarSize.value,
14249
- loading: "eager"
14250
- }, null, 8, _hoisted_5$1)) : (openBlock(), createElementBlock("div", _hoisted_6$1, [..._cache[3] || (_cache[3] = [
14251
- createElementVNode("svg", {
14252
- class: "avatar-icon",
14253
- fill: "currentColor",
14254
- viewBox: "0 0 20 20"
14255
- }, [
14256
- createElementVNode("path", {
14257
- "fill-rule": "evenodd",
14258
- d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
14259
- "clip-rule": "evenodd"
14260
- })
14261
- ], -1)
14262
- ])]))
14263
- ]))
14275
+ user.value?.avatar ? (openBlock(), createElementBlock("img", {
14276
+ key: 0,
14277
+ src: user.value.avatar,
14278
+ alt: `${user.value?.firstName || user.value?.email}'s avatar`,
14279
+ class: "avatar-image",
14280
+ width: avatarSize.value,
14281
+ height: avatarSize.value,
14282
+ loading: "eager"
14283
+ }, null, 8, _hoisted_8$1)) : (openBlock(), createElementBlock("div", _hoisted_9$1, [..._cache[4] || (_cache[4] = [
14284
+ createElementVNode("svg", {
14285
+ class: "avatar-icon",
14286
+ fill: "currentColor",
14287
+ viewBox: "0 0 20 20"
14288
+ }, [
14289
+ createElementVNode("path", {
14290
+ "fill-rule": "evenodd",
14291
+ d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
14292
+ "clip-rule": "evenodd"
14293
+ })
14294
+ ], -1)
14295
+ ])]))
14264
14296
  ]),
14265
14297
  "trailing-icon": withCtx(() => [
14266
14298
  (openBlock(), createElementBlock("svg", {
@@ -14268,7 +14300,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
14268
14300
  fill: "none",
14269
14301
  stroke: "currentColor",
14270
14302
  viewBox: "0 0 24 24"
14271
- }, [..._cache[4] || (_cache[4] = [
14303
+ }, [..._cache[5] || (_cache[5] = [
14272
14304
  createElementVNode("path", {
14273
14305
  "stroke-linecap": "round",
14274
14306
  "stroke-linejoin": "round",
@@ -14278,16 +14310,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
14278
14310
  ])], 2))
14279
14311
  ]),
14280
14312
  default: withCtx(() => [
14281
- _ctx.variant === "mini-profile" ? (openBlock(), createElementBlock("div", _hoisted_7$1, [
14282
- createElementVNode("div", _hoisted_8$1, toDisplayString(displayName.value), 1),
14283
- createElementVNode("div", _hoisted_9$1, toDisplayString(user.value?.email), 1)
14284
- ])) : !_ctx.hideUser ? (openBlock(), createElementBlock("div", _hoisted_10$1, [
14285
- createElementVNode("div", _hoisted_11$1, toDisplayString(displayName.value), 1)
14286
- ])) : createCommentVNode("", true)
14313
+ !_ctx.hideUser ? (openBlock(), createElementBlock("span", _hoisted_10$1, toDisplayString(displayName.value), 1)) : createCommentVNode("", true)
14287
14314
  ]),
14288
14315
  _: 1
14289
- }, 8, ["active", "onKeydown", "aria-expanded"])
14290
- ], 2),
14316
+ }, 8, ["size", "active", "onKeydown", "aria-expanded"])
14317
+ ], 512)),
14291
14318
  (openBlock(), createBlock(Teleport, { to: "body" }, [
14292
14319
  showDropdown.value ? (openBlock(), createElementBlock("div", {
14293
14320
  key: 0,
@@ -14305,9 +14332,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
14305
14332
  withKeys(withModifiers(focusLast, ["prevent"]), ["end"])
14306
14333
  ]
14307
14334
  }, [
14308
- createElementVNode("div", _hoisted_13$1, [
14309
- _ctx.variant !== "mini-profile" ? (openBlock(), createElementBlock("div", _hoisted_14$1, [
14310
- user.value ? (openBlock(), createElementBlock("div", _hoisted_15$1, [
14335
+ createElementVNode("div", _hoisted_12$1, [
14336
+ _ctx.variant !== "mini-profile" ? (openBlock(), createElementBlock("div", _hoisted_13$1, [
14337
+ user.value ? (openBlock(), createElementBlock("div", _hoisted_14$1, [
14311
14338
  createVNode(unref(UiLevelProgress), {
14312
14339
  size: 80,
14313
14340
  value: user.value.xp,
@@ -14324,7 +14351,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
14324
14351
  class: "dropdown-avatar-image",
14325
14352
  width: "64",
14326
14353
  height: "64"
14327
- }, null, 8, _hoisted_16$1)) : (openBlock(), createElementBlock("div", _hoisted_17$1, [..._cache[5] || (_cache[5] = [
14354
+ }, null, 8, _hoisted_15$1)) : (openBlock(), createElementBlock("div", _hoisted_16$1, [..._cache[6] || (_cache[6] = [
14328
14355
  createElementVNode("svg", {
14329
14356
  class: "dropdown-avatar-icon",
14330
14357
  fill: "currentColor",
@@ -14338,20 +14365,20 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
14338
14365
  ], -1)
14339
14366
  ])]))
14340
14367
  ])) : createCommentVNode("", true),
14341
- createElementVNode("div", _hoisted_18$1, [
14342
- createElementVNode("div", _hoisted_19, toDisplayString(displayName.value), 1),
14343
- createElementVNode("div", _hoisted_20, toDisplayString(user.value?.email), 1)
14368
+ createElementVNode("div", _hoisted_17$1, [
14369
+ createElementVNode("div", _hoisted_18$1, toDisplayString(displayName.value), 1),
14370
+ createElementVNode("div", _hoisted_19, toDisplayString(user.value?.email), 1)
14344
14371
  ])
14345
14372
  ])) : createCommentVNode("", true),
14346
14373
  renderSlot(_ctx.$slots, "default", {}, void 0, true),
14347
- _ctx.variant !== "mini-profile" ? (openBlock(), createElementBlock("div", _hoisted_21)) : createCommentVNode("", true),
14374
+ _ctx.variant !== "mini-profile" ? (openBlock(), createElementBlock("div", _hoisted_20)) : createCommentVNode("", true),
14348
14375
  createVNode(unref(StrandsNav), null, {
14349
14376
  default: withCtx(() => [
14350
14377
  createVNode(unref(StrandsNav).Item, {
14351
14378
  color: "secondary",
14352
14379
  onClick: openProfile
14353
14380
  }, {
14354
- default: withCtx(() => [..._cache[6] || (_cache[6] = [
14381
+ default: withCtx(() => [..._cache[7] || (_cache[7] = [
14355
14382
  createTextVNode("Profile", -1)
14356
14383
  ])]),
14357
14384
  _: 1
@@ -14360,7 +14387,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
14360
14387
  color: "danger",
14361
14388
  onClick: handleSignOut
14362
14389
  }, {
14363
- default: withCtx(() => [..._cache[7] || (_cache[7] = [
14390
+ default: withCtx(() => [..._cache[8] || (_cache[8] = [
14364
14391
  createTextVNode("Sign Out", -1)
14365
14392
  ])]),
14366
14393
  _: 1
@@ -14369,7 +14396,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
14369
14396
  _: 1
14370
14397
  })
14371
14398
  ])
14372
- ], 44, _hoisted_12$1)) : createCommentVNode("", true)
14399
+ ], 44, _hoisted_11$1)) : createCommentVNode("", true)
14373
14400
  ])),
14374
14401
  createVNode(unref(UiModal), {
14375
14402
  modelValue: showProfileModal.value,
@@ -14392,7 +14419,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
14392
14419
  };
14393
14420
  }
14394
14421
  });
14395
- const StrandsUserButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-2c322150"]]);
14422
+ const StrandsUserButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-c84f825d"]]);
14396
14423
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
14397
14424
  __name: "StrandsNav",
14398
14425
  props: {
package/dist/vite.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";function n(n={}){const{styles:s=1,accentColor:r="#EA00A8",useSquircle:t=1,...i}=n;let c;return{name:"@strands.gg/accui:vite-plugin",enforce:"pre",config:(n,{command:s})=>(c={accentColor:r,useSquircle:t,...i},{define:{t:JSON.stringify(c)}}),transformIndexHtml:{order:"pre",handler(n){if(r&&"#EA00A8"!==r){const s=`<style data-strands-accent>\n :root {\n --strands-accent: ${r};\n --accui-strands-accent: ${r};\n --accui-strands-50: color-mix(in srgb, ${r} 10%, white);\n --accui-strands-100: color-mix(in srgb, ${r} 20%, white);\n --accui-strands-200: color-mix(in srgb, ${r} 30%, white);\n --accui-strands-300: color-mix(in srgb, ${r} 40%, white);\n --accui-strands-400: color-mix(in srgb, ${r} 70%, white);\n --accui-strands-500: ${r};\n --accui-strands-600: color-mix(in srgb, ${r} 85%, black);\n --accui-strands-700: color-mix(in srgb, ${r} 70%, black);\n --accui-strands-800: color-mix(in srgb, ${r} 55%, black);\n --accui-strands-900: color-mix(in srgb, ${r} 40%, black);\n --accui-strands-950: color-mix(in srgb, ${r} 25%, black);\n }</style>`;return n.replace("</head>",` ${s}\n </head>`)}return n}},transform:async(n,r)=>(s&&r.endsWith("main.ts")||r.endsWith("main.js"))&&!n.includes("@strands.gg/accui/style.css")?{code:`import '@strands.gg/accui/style.css'\n${n}`,map:null}:!r.endsWith("main.ts")&&!r.endsWith("main.js")||n.includes("setStrandsConfig")||n.includes("__STRANDS_INJECTED__")?null:{code:`\n// Auto-injected by @strands.gg/accui Vite plugin\nimport { setStrandsConfig } from '@strands.gg/accui'\n\nif (typeof window !== 'undefined') {\n const strandsConfig = ${JSON.stringify(c)}\n setStrandsConfig(strandsConfig)\n window.__STRANDS_CONFIG__ = strandsConfig\n window.__STRANDS_INJECTED__ = true\n}\n\n${n}`,map:null}}}Object.defineProperties(exports,{i:{value:1},[Symbol.toStringTag]:{value:"Module"}}),exports.StrandsAuth=n,exports.StrandsAuthVitePlugin=n,exports.createStrandsAuth=function(n={}){return{install(s){Promise.resolve().then(()=>require("./StrandsUIPlugin-C9rrMU2i.cjs.js")).then(n=>n.StrandsUIPlugin$1).then(n=>{const r=n.default;s.use(r)}),Promise.resolve().then(()=>require("./useStrandsConfig-Sr6NG90B.cjs.js")).then(n=>n.useStrandsConfig$1).then(s=>{const{setStrandsConfig:r}=s;r(n),"undefined"!=typeof window&&(window.t=n)})}}},exports.default=n,exports.strandsAuth=n;
1
+ "use strict";function n(n={}){const{styles:s=1,accentColor:r="#EA00A8",useSquircle:t=1,...i}=n;let c;return{name:"@strands.gg/accui:vite-plugin",enforce:"pre",config:(n,{command:s})=>(c={accentColor:r,useSquircle:t,...i},{define:{t:JSON.stringify(c)}}),transformIndexHtml:{order:"pre",handler(n){if(r&&"#EA00A8"!==r){const s=`<style data-strands-accent>\n :root {\n --strands-accent: ${r};\n --accui-strands-accent: ${r};\n --accui-strands-50: color-mix(in srgb, ${r} 10%, white);\n --accui-strands-100: color-mix(in srgb, ${r} 20%, white);\n --accui-strands-200: color-mix(in srgb, ${r} 30%, white);\n --accui-strands-300: color-mix(in srgb, ${r} 40%, white);\n --accui-strands-400: color-mix(in srgb, ${r} 70%, white);\n --accui-strands-500: ${r};\n --accui-strands-600: color-mix(in srgb, ${r} 85%, black);\n --accui-strands-700: color-mix(in srgb, ${r} 70%, black);\n --accui-strands-800: color-mix(in srgb, ${r} 55%, black);\n --accui-strands-900: color-mix(in srgb, ${r} 40%, black);\n --accui-strands-950: color-mix(in srgb, ${r} 25%, black);\n }</style>`;return n.replace("</head>",` ${s}\n </head>`)}return n}},transform:async(n,r)=>(s&&r.endsWith("main.ts")||r.endsWith("main.js"))&&!n.includes("@strands.gg/accui/style.css")?{code:`import '@strands.gg/accui/style.css'\n${n}`,map:null}:!r.endsWith("main.ts")&&!r.endsWith("main.js")||n.includes("setStrandsConfig")||n.includes("__STRANDS_INJECTED__")?null:{code:`\n// Auto-injected by @strands.gg/accui Vite plugin\nimport { setStrandsConfig } from '@strands.gg/accui'\n\nif (typeof window !== 'undefined') {\n const strandsConfig = ${JSON.stringify(c)}\n setStrandsConfig(strandsConfig)\n window.__STRANDS_CONFIG__ = strandsConfig\n window.__STRANDS_INJECTED__ = true\n}\n\n${n}`,map:null}}}Object.defineProperties(exports,{i:{value:1},[Symbol.toStringTag]:{value:"Module"}}),exports.StrandsAuth=n,exports.StrandsAuthVitePlugin=n,exports.createStrandsAuth=function(n={}){return{install(s){Promise.resolve().then(()=>require("./StrandsUIPlugin-Dl-CMqkQ.cjs.js")).then(n=>n.StrandsUIPlugin$1).then(n=>{const r=n.default;s.use(r)}),Promise.resolve().then(()=>require("./useStrandsConfig-Sr6NG90B.cjs.js")).then(n=>n.useStrandsConfig$1).then(s=>{const{setStrandsConfig:r}=s;r(n),"undefined"!=typeof window&&(window.t=n)})}}},exports.default=n,exports.strandsAuth=n;
package/dist/vite.es.js CHANGED
@@ -86,7 +86,7 @@ ${code}`,
86
86
  function createStrandsAuth(config = {}) {
87
87
  return {
88
88
  install(app) {
89
- import("./StrandsUIPlugin-tl7L52hZ.es.js").then((n) => n.n).then((module) => {
89
+ import("./StrandsUIPlugin-CE4-QxEo.es.js").then((n) => n.n).then((module) => {
90
90
  const StrandsUIPlugin = module.default;
91
91
  app.use(StrandsUIPlugin);
92
92
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strands.gg/accui",
3
- "version": "2.14.1",
3
+ "version": "2.14.2",
4
4
  "description": "Strands Authentication UI Components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs.js",