@strands.gg/accui 2.3.7 → 2.3.8

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.
@@ -1438,10 +1438,10 @@ const _hoisted_1$A = {
1438
1438
  class: "loader-icon"
1439
1439
  };
1440
1440
  const _hoisted_2$t = ["width", "height"];
1441
- const _hoisted_3$r = ["d", "stroke", "stroke-width"];
1442
- const _hoisted_4$p = ["d", "stroke", "stroke-width"];
1443
- const _hoisted_5$m = ["width", "height"];
1444
- const _hoisted_6$l = ["stroke"];
1441
+ const _hoisted_3$r = ["d"];
1442
+ const _hoisted_4$p = ["stroke-width"];
1443
+ const _hoisted_5$m = ["stroke-width"];
1444
+ const _hoisted_6$l = ["width", "height"];
1445
1445
  const _hoisted_7$k = {
1446
1446
  key: 3,
1447
1447
  class: "loader-text"
@@ -1460,32 +1460,12 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
1460
1460
  setup(__props) {
1461
1461
  const path = logo.replace(/<svg[^>]*>/, "").replace(/<\/svg>/, "").trim();
1462
1462
  const d = path.match(/d="([^"]*)"/)?.[1] || "";
1463
- const props = __props;
1464
- function getCurrentAccentColor() {
1465
- if (typeof window !== "undefined") {
1466
- const cssValue = getComputedStyle(document.documentElement).getPropertyValue("--strands-accent").trim();
1467
- if (cssValue) {
1468
- return cssValue;
1469
- }
1470
- }
1471
- return "#EA00A8";
1472
- }
1473
- const getColorMap = () => {
1474
- const accentColor = getCurrentAccentColor();
1475
- return {
1476
- primary: { solid: accentColor, semi: `${accentColor}10` },
1477
- success: { solid: "#22c55e", semi: "#22c55e10" },
1478
- warning: { solid: "#f59e0b", semi: "#f59e0b10" },
1479
- danger: { solid: "#ef4444", semi: "#ef444410" },
1480
- white: { solid: "#ffffff", semi: "#ffffff10" },
1481
- black: { solid: "#000000", semi: "#00000010" }
1482
- };
1483
- };
1484
- const semiColor = computed(() => getColorMap()[props.color].semi);
1485
- const solidColor = computed(() => getColorMap()[props.color].solid);
1486
1463
  return (_ctx, _cache) => {
1487
1464
  return openBlock(), createElementBlock("div", {
1488
- class: normalizeClass(["loader-container", { "loader-centered": _ctx.centered }])
1465
+ class: normalizeClass(["loader-container", [
1466
+ { "loader-centered": _ctx.centered },
1467
+ `loader-color-${_ctx.color}`
1468
+ ]])
1489
1469
  }, [
1490
1470
  _ctx.variant === "spinner" ? (openBlock(), createElementBlock("div", _hoisted_1$A, [
1491
1471
  (openBlock(), createElementBlock("svg", {
@@ -1493,25 +1473,30 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
1493
1473
  height: _ctx.size,
1494
1474
  viewBox: "0 0 500 500"
1495
1475
  }, [
1496
- createElementVNode("path", {
1497
- d: unref(d),
1476
+ createElementVNode("defs", null, [
1477
+ createElementVNode("path", {
1478
+ id: "logo-path",
1479
+ d: unref(d),
1480
+ transform: "translate(81, 13) scale(1.0)"
1481
+ }, null, 8, _hoisted_3$r)
1482
+ ]),
1483
+ createElementVNode("use", {
1484
+ href: "#logo-path",
1498
1485
  fill: "none",
1499
- stroke: semiColor.value,
1486
+ stroke: "var(--loader-semi-color)",
1500
1487
  "stroke-width": _ctx.weight,
1501
1488
  "stroke-linecap": "round",
1502
- "stroke-linejoin": "round",
1503
- transform: "translate(81, 13) scale(1.0)"
1504
- }, null, 8, _hoisted_3$r),
1505
- createElementVNode("path", {
1506
- d: unref(d),
1489
+ "stroke-linejoin": "round"
1490
+ }, null, 8, _hoisted_4$p),
1491
+ createElementVNode("use", {
1492
+ href: "#logo-path",
1507
1493
  fill: "none",
1508
- stroke: solidColor.value,
1494
+ stroke: "var(--loader-solid-color)",
1509
1495
  "stroke-width": _ctx.weight,
1510
1496
  "stroke-linecap": "round",
1511
1497
  "stroke-linejoin": "round",
1512
- class: "loader-animated-path",
1513
- transform: "translate(81, 13) scale(1.0)"
1514
- }, null, 8, _hoisted_4$p)
1498
+ class: "loader-animated-path"
1499
+ }, null, 8, _hoisted_5$m)
1515
1500
  ], 8, _hoisted_2$t))
1516
1501
  ])) : _ctx.variant === "circle" ? (openBlock(), createElementBlock("div", {
1517
1502
  key: 1,
@@ -1522,18 +1507,18 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
1522
1507
  width: _ctx.size,
1523
1508
  height: _ctx.size,
1524
1509
  viewBox: "0 0 50 50"
1525
- }, [
1510
+ }, [..._cache[0] || (_cache[0] = [
1526
1511
  createElementVNode("circle", {
1527
1512
  cx: "25",
1528
1513
  cy: "25",
1529
1514
  r: "20",
1530
1515
  fill: "none",
1531
- stroke: solidColor.value,
1516
+ stroke: "var(--loader-solid-color)",
1532
1517
  "stroke-width": "4",
1533
1518
  "stroke-linecap": "round",
1534
1519
  class: "loader-circle-path"
1535
- }, null, 8, _hoisted_6$l)
1536
- ], 8, _hoisted_5$m))
1520
+ }, null, -1)
1521
+ ])], 8, _hoisted_6$l))
1537
1522
  ], 4)) : _ctx.variant === "bar" ? (openBlock(), createElementBlock("div", {
1538
1523
  key: 2,
1539
1524
  class: "loader-bar",
@@ -1541,23 +1526,17 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
1541
1526
  width: _ctx.fullWidth ? "100%" : `${_ctx.size * 1.5}px`,
1542
1527
  height: `${Math.max(_ctx.size * 0.1, 4)}px`
1543
1528
  })
1544
- }, [
1545
- createElementVNode("div", {
1546
- class: "loader-bar-track",
1547
- style: normalizeStyle({ backgroundColor: semiColor.value })
1548
- }, [
1549
- createElementVNode("div", {
1550
- class: "loader-bar-fill",
1551
- style: normalizeStyle({ backgroundColor: solidColor.value })
1552
- }, null, 4)
1553
- ], 4)
1554
- ], 4)) : createCommentVNode("", true),
1529
+ }, [..._cache[1] || (_cache[1] = [
1530
+ createElementVNode("div", { class: "loader-bar-track" }, [
1531
+ createElementVNode("div", { class: "loader-bar-fill" })
1532
+ ], -1)
1533
+ ])], 4)) : createCommentVNode("", true),
1555
1534
  _ctx.text ? (openBlock(), createElementBlock("p", _hoisted_7$k, toDisplayString(_ctx.text), 1)) : createCommentVNode("", true)
1556
1535
  ], 2);
1557
1536
  };
1558
1537
  }
1559
1538
  });
1560
- const StrandsUiLoader = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-dde32ad9"]]);
1539
+ const StrandsUiLoader = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-ba3ffb77"]]);
1561
1540
  const _hoisted_1$z = ["aria-pressed", "aria-labelledby"];
1562
1541
  const _sfc_main$C = /* @__PURE__ */ defineComponent({
1563
1542
  __name: "UiToggle",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strands.gg/accui",
3
- "version": "2.3.7",
3
+ "version": "2.3.8",
4
4
  "description": "Strands Authentication UI Components",
5
5
  "type": "module",
6
6
  "main": "./dist/strands-auth-ui.cjs.js",