@fairfox/polly 0.88.0 → 0.89.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/cli/polly.js +4 -4
  2. package/dist/cli/polly.js.map +2 -2
  3. package/dist/gallery/gallery.css +51 -59
  4. package/dist/gallery/gallery.js +1155 -1047
  5. package/dist/src/actions/index.js +5 -78
  6. package/dist/src/actions/index.js.map +2 -2
  7. package/dist/src/background/index.js +126 -152
  8. package/dist/src/background/index.js.map +4 -4
  9. package/dist/src/background/message-router.js +126 -152
  10. package/dist/src/background/message-router.js.map +4 -4
  11. package/dist/src/client/index.js +186 -259
  12. package/dist/src/client/index.js.map +5 -5
  13. package/dist/src/elysia/index.js +21 -35
  14. package/dist/src/elysia/index.js.map +2 -2
  15. package/dist/src/index.js +218 -246
  16. package/dist/src/index.js.map +10 -10
  17. package/dist/src/mesh.js +49 -61
  18. package/dist/src/mesh.js.map +4 -4
  19. package/dist/src/peer.js +23 -52
  20. package/dist/src/peer.js.map +2 -2
  21. package/dist/src/polly-ui/Button.d.ts +7 -0
  22. package/dist/src/polly-ui/Collapsible.d.ts +3 -1
  23. package/dist/src/polly-ui/Layout.d.ts +16 -1
  24. package/dist/src/polly-ui/index.css +47 -59
  25. package/dist/src/polly-ui/index.js +112 -124
  26. package/dist/src/polly-ui/index.js.map +13 -13
  27. package/dist/src/polly-ui/markdown.js +72 -145
  28. package/dist/src/polly-ui/markdown.js.map +2 -2
  29. package/dist/src/polly-ui/styles.css +47 -59
  30. package/dist/src/polly-ui/theme.css +10 -0
  31. package/dist/src/shared/adapters/index.js +31 -44
  32. package/dist/src/shared/adapters/index.js.map +2 -2
  33. package/dist/src/shared/lib/context-helpers.js +126 -152
  34. package/dist/src/shared/lib/context-helpers.js.map +4 -4
  35. package/dist/src/shared/lib/errors.js +1 -74
  36. package/dist/src/shared/lib/errors.js.map +2 -2
  37. package/dist/src/shared/lib/guards.js +1 -74
  38. package/dist/src/shared/lib/guards.js.map +2 -2
  39. package/dist/src/shared/lib/message-bus.js +126 -152
  40. package/dist/src/shared/lib/message-bus.js.map +4 -4
  41. package/dist/src/shared/lib/resource.js +16 -27
  42. package/dist/src/shared/lib/resource.js.map +5 -5
  43. package/dist/src/shared/lib/state.js +13 -26
  44. package/dist/src/shared/lib/state.js.map +2 -2
  45. package/dist/src/shared/lib/test-helpers.js +1 -74
  46. package/dist/src/shared/lib/test-helpers.js.map +2 -2
  47. package/dist/src/shared/state/app-state.js +35 -46
  48. package/dist/src/shared/state/app-state.js.map +5 -5
  49. package/dist/src/shared/types/messages.js +1 -74
  50. package/dist/src/shared/types/messages.js.map +2 -2
  51. package/dist/tools/bdd/src/cli.js +11 -15
  52. package/dist/tools/bdd/src/cli.js.map +2 -2
  53. package/dist/tools/bdd/src/index.js +11 -19
  54. package/dist/tools/bdd/src/index.js.map +2 -2
  55. package/dist/tools/gallery/src/cli.js +1 -18
  56. package/dist/tools/gallery/src/cli.js.map +2 -2
  57. package/dist/tools/init/src/cli.js +1 -18
  58. package/dist/tools/init/src/cli.js.map +2 -2
  59. package/dist/tools/mutate/src/cli.js +8 -25
  60. package/dist/tools/mutate/src/cli.js.map +2 -2
  61. package/dist/tools/mutate/src/index.js +8 -26
  62. package/dist/tools/mutate/src/index.js.map +2 -2
  63. package/dist/tools/quality/src/cli.js +39 -46
  64. package/dist/tools/quality/src/cli.js.map +3 -3
  65. package/dist/tools/quality/src/css/check-layout.d.ts +5 -3
  66. package/dist/tools/quality/src/index.js +39 -47
  67. package/dist/tools/quality/src/index.js.map +3 -3
  68. package/dist/tools/test/src/adapters/index.js +4 -77
  69. package/dist/tools/test/src/adapters/index.js.map +2 -2
  70. package/dist/tools/test/src/browser/index.js +1 -74
  71. package/dist/tools/test/src/browser/index.js.map +2 -2
  72. package/dist/tools/test/src/browser/run.js +5 -22
  73. package/dist/tools/test/src/browser/run.js.map +2 -2
  74. package/dist/tools/test/src/contrast/index.js +1 -74
  75. package/dist/tools/test/src/contrast/index.js.map +2 -2
  76. package/dist/tools/test/src/coverage-policy/cli.js +13 -25
  77. package/dist/tools/test/src/coverage-policy/cli.js.map +2 -2
  78. package/dist/tools/test/src/coverage-policy/index.js +11 -23
  79. package/dist/tools/test/src/coverage-policy/index.js.map +2 -2
  80. package/dist/tools/test/src/e2e-mesh/index.js +18 -43
  81. package/dist/tools/test/src/e2e-mesh/index.js.map +2 -2
  82. package/dist/tools/test/src/e2e-relay/index.js +615 -623
  83. package/dist/tools/test/src/e2e-relay/index.js.map +2 -2
  84. package/dist/tools/test/src/index.js +30 -103
  85. package/dist/tools/test/src/index.js.map +5 -5
  86. package/dist/tools/test/src/test-utils.js +1 -74
  87. package/dist/tools/test/src/test-utils.js.map +2 -2
  88. package/dist/tools/test/src/tiers/cli.js +1 -18
  89. package/dist/tools/test/src/tiers/cli.js.map +2 -2
  90. package/dist/tools/test/src/tiers/worker.js +11 -15
  91. package/dist/tools/test/src/tiers/worker.js.map +2 -2
  92. package/dist/tools/test/src/visual/index.js +1112 -1134
  93. package/dist/tools/test/src/visual/index.js.map +3 -3
  94. package/dist/tools/verify/src/cli.js +103 -169
  95. package/dist/tools/verify/src/cli.js.map +2 -2
  96. package/dist/tools/verify/src/config.js +1 -74
  97. package/dist/tools/verify/src/config.js.map +2 -2
  98. package/dist/tools/verify/src/stryker/index.js +1 -19
  99. package/dist/tools/verify/src/stryker/index.js.map +2 -2
  100. package/dist/tools/visualize/src/cli.js +69 -85
  101. package/dist/tools/visualize/src/cli.js.map +2 -2
  102. package/package.json +1 -1
@@ -1,76 +1,3 @@
1
- var __create = Object.create;
2
- var __getProtoOf = Object.getPrototypeOf;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- function __accessProp(key) {
8
- return this[key];
9
- }
10
- var __toESMCache_node;
11
- var __toESMCache_esm;
12
- var __toESM = (mod, isNodeMode, target) => {
13
- var canCache = mod != null && typeof mod === "object";
14
- if (canCache) {
15
- var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
- var cached = cache.get(mod);
17
- if (cached)
18
- return cached;
19
- }
20
- target = mod != null ? __create(__getProtoOf(mod)) : {};
21
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
- if (mod && typeof mod === "object" || typeof mod === "function") {
23
- for (let key of __getOwnPropNames(mod))
24
- if (!__hasOwnProp.call(to, key))
25
- __defProp(to, key, {
26
- get: __accessProp.bind(mod, key),
27
- enumerable: true
28
- });
29
- }
30
- if (canCache)
31
- cache.set(mod, to);
32
- return to;
33
- };
34
- var __toCommonJS = (from) => {
35
- var entry = (__moduleCache ??= new WeakMap).get(from), desc;
36
- if (entry)
37
- return entry;
38
- entry = __defProp({}, "__esModule", { value: true });
39
- if (from && typeof from === "object" || typeof from === "function") {
40
- for (var key of __getOwnPropNames(from))
41
- if (!__hasOwnProp.call(entry, key))
42
- __defProp(entry, key, {
43
- get: __accessProp.bind(from, key),
44
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
45
- });
46
- }
47
- __moduleCache.set(from, entry);
48
- return entry;
49
- };
50
- var __moduleCache;
51
- var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
52
- var __returnValue = (v) => v;
53
- function __exportSetter(name, newValue) {
54
- this[name] = __returnValue.bind(null, newValue);
55
- }
56
- var __export = (target, all) => {
57
- for (var name in all)
58
- __defProp(target, name, {
59
- get: all[name],
60
- enumerable: true,
61
- configurable: true,
62
- set: __exportSetter.bind(all, name)
63
- });
64
- };
65
- var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
66
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
67
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
68
- }) : x)(function(x) {
69
- if (typeof require !== "undefined")
70
- return require.apply(this, arguments);
71
- throw Error('Dynamic require of "' + x + '" is not supported');
72
- });
73
-
74
1
  // src/polly-ui/ActionForm.module.css
75
2
  var ActionForm_module_default = {
76
3
  form: "form_oqTahQ"
@@ -321,6 +248,10 @@ function Layout(props) {
321
248
  className,
322
249
  onClick,
323
250
  onKeyDown,
251
+ onKeyUp,
252
+ onMouseEnter,
253
+ onMouseLeave,
254
+ elementRef,
324
255
  role,
325
256
  tabIndex,
326
257
  id
@@ -385,6 +316,10 @@ function Layout(props) {
385
316
  style,
386
317
  onClick,
387
318
  onKeyDown,
319
+ onKeyUp,
320
+ onMouseEnter,
321
+ onMouseLeave,
322
+ ref: elementRef,
388
323
  role,
389
324
  tabIndex,
390
325
  "aria-label": props["aria-label"],
@@ -435,11 +370,11 @@ function Dropdown(props) {
435
370
  }, [popoverId, isOpen]);
436
371
  useEffect2(() => {
437
372
  const menu = menuRef.current;
438
- const trigger2 = triggerRef.current;
439
- if (!menu || !trigger2)
373
+ const trigger = triggerRef.current;
374
+ if (!menu || !trigger)
440
375
  return;
441
376
  const positionMenu = () => {
442
- const t = trigger2.getBoundingClientRect();
377
+ const t = trigger.getBoundingClientRect();
443
378
  const prevDisplay = menu.style.display;
444
379
  menu.style.maxHeight = "";
445
380
  menu.style.display = "block";
@@ -448,7 +383,7 @@ function Dropdown(props) {
448
383
  menu.style.display = prevDisplay;
449
384
  const viewportWidth = document.documentElement.clientWidth;
450
385
  const viewportHeight = document.documentElement.clientHeight;
451
- const isRtl = getComputedStyle(trigger2).direction === "rtl" || document.documentElement.dir === "rtl";
386
+ const isRtl = getComputedStyle(trigger).direction === "rtl" || document.documentElement.dir === "rtl";
452
387
  const physicalRight = isRtl && align === "left" || align === "right";
453
388
  let left = physicalRight ? t.right - menuWidth : t.left;
454
389
  const maxLeft = Math.max(VIEWPORT_PADDING, viewportWidth - menuWidth - VIEWPORT_PADDING);
@@ -718,13 +653,14 @@ var Button_module_default = {
718
653
  btnLarge: "btnLarge_c4HKfA",
719
654
  btnCircle: "btnCircle_c4HKfA",
720
655
  btnFullWidth: "btnFullWidth_c4HKfA",
656
+ btnFlush: "btnFlush_c4HKfA",
721
657
  btnBounded: "btnBounded_c4HKfA",
722
658
  icon: "icon_c4HKfA",
723
659
  label: "label_c4HKfA"
724
660
  };
725
661
 
726
662
  // src/polly-ui/Button.tsx
727
- import { jsxDEV as jsxDEV6, Fragment as Fragment2 } from "preact/jsx-dev-runtime";
663
+ import { jsxDEV as jsxDEV6 } from "preact/jsx-dev-runtime";
728
664
  function tierClass(tier) {
729
665
  if (tier === "primary")
730
666
  return Button_module_default["tierPrimary"];
@@ -760,6 +696,7 @@ function Button(props) {
760
696
  fullWidth = false,
761
697
  circle = false,
762
698
  bounded = false,
699
+ flush = false,
763
700
  className,
764
701
  title,
765
702
  icon,
@@ -781,12 +718,18 @@ function Button(props) {
781
718
  parts.push(Button_module_default["btnFullWidth"] ?? "");
782
719
  if (bounded)
783
720
  parts.push(Button_module_default["btnBounded"] ?? "");
721
+ if (flush)
722
+ parts.push(Button_module_default["btnFlush"] ?? "");
784
723
  if (className)
785
724
  parts.push(className);
786
725
  const buttonClass = parts.filter(Boolean).join(" ");
787
- const content = /* @__PURE__ */ jsxDEV6(Fragment2, {
726
+ const content = icon === undefined ? label : /* @__PURE__ */ jsxDEV6(Layout, {
727
+ inline: true,
728
+ columns: "auto auto",
729
+ gap: "var(--polly-space-sm)",
730
+ alignItems: "center",
788
731
  children: [
789
- icon !== undefined && /* @__PURE__ */ jsxDEV6("span", {
732
+ /* @__PURE__ */ jsxDEV6("span", {
790
733
  class: Button_module_default["icon"],
791
734
  children: icon
792
735
  }, undefined, false, undefined, this),
@@ -871,6 +814,7 @@ var variantDefaults = {
871
814
  border: "default"
872
815
  },
873
816
  bubble: {
817
+ background: "var(--polly-surface-bubble)",
874
818
  radius: "md",
875
819
  border: "default",
876
820
  padding: "var(--polly-space-sm) var(--polly-space-md)"
@@ -1133,8 +1077,13 @@ function Checkbox(props) {
1133
1077
  parts.push(Checkbox_module_default["disabled"] ?? "");
1134
1078
  if (className)
1135
1079
  parts.push(className);
1136
- return /* @__PURE__ */ jsxDEV8("label", {
1137
- class: parts.filter(Boolean).join(" "),
1080
+ return /* @__PURE__ */ jsxDEV8(Layout, {
1081
+ as: "label",
1082
+ inline: true,
1083
+ columns: "auto auto",
1084
+ gap: "var(--polly-space-sm)",
1085
+ alignItems: "center",
1086
+ className: parts.filter(Boolean).join(" "),
1138
1087
  "data-polly-ui": true,
1139
1088
  "data-polly-checkbox": true,
1140
1089
  children: [
@@ -1204,13 +1153,13 @@ function Code(props) {
1204
1153
  const { children, block, className, id } = props;
1205
1154
  const passthrough = collectPassthrough(props);
1206
1155
  if (block) {
1207
- const parts2 = [Code_module_default["block"]];
1156
+ const parts = [Code_module_default["block"]];
1208
1157
  if (className)
1209
- parts2.push(className);
1158
+ parts.push(className);
1210
1159
  return /* @__PURE__ */ jsxDEV9("pre", {
1211
1160
  ...passthrough,
1212
1161
  id,
1213
- class: parts2.filter(Boolean).join(" "),
1162
+ class: parts.filter(Boolean).join(" "),
1214
1163
  "data-polly-ui": true,
1215
1164
  "data-polly-code": "block",
1216
1165
  children: /* @__PURE__ */ jsxDEV9("code", {
@@ -1234,6 +1183,8 @@ function Code(props) {
1234
1183
  var Collapsible_module_default = {
1235
1184
  collapsible: "collapsible_sEhnPw",
1236
1185
  summary: "summary_sEhnPw",
1186
+ marker: "marker_sEhnPw",
1187
+ summaryContent: "summaryContent_sEhnPw",
1237
1188
  content: "content_sEhnPw"
1238
1189
  };
1239
1190
 
@@ -1281,11 +1232,24 @@ function Collapsible(props) {
1281
1232
  "data-polly-ui": true,
1282
1233
  "data-polly-collapsible": true,
1283
1234
  children: [
1284
- /* @__PURE__ */ jsxDEV10("summary", {
1285
- class: Collapsible_module_default["summary"],
1235
+ /* @__PURE__ */ jsxDEV10(Layout, {
1236
+ as: "summary",
1237
+ columns: "auto 1fr",
1238
+ gap: "var(--polly-space-sm)",
1239
+ alignItems: "center",
1240
+ className: Collapsible_module_default["summary"],
1286
1241
  onKeyUp: handleSummaryKeyUp,
1287
- children: summary
1288
- }, undefined, false, undefined, this),
1242
+ children: [
1243
+ /* @__PURE__ */ jsxDEV10("span", {
1244
+ class: Collapsible_module_default["marker"],
1245
+ "aria-hidden": "true"
1246
+ }, undefined, false, undefined, this),
1247
+ /* @__PURE__ */ jsxDEV10("span", {
1248
+ class: Collapsible_module_default["summaryContent"],
1249
+ children: summary
1250
+ }, undefined, false, undefined, this)
1251
+ ]
1252
+ }, undefined, true, undefined, this),
1289
1253
  /* @__PURE__ */ jsxDEV10("div", {
1290
1254
  class: Collapsible_module_default["content"],
1291
1255
  children
@@ -1531,9 +1495,12 @@ function Root2({ when, onClose, children, "aria-label": ariaLabel }) {
1531
1495
  const ctx = { id, titleId, descId, close };
1532
1496
  const content = /* @__PURE__ */ jsxDEV12(Ctx.Provider, {
1533
1497
  value: ctx,
1534
- children: /* @__PURE__ */ jsxDEV12("div", {
1535
- ref: mountRef,
1536
- class: Modal_module_default["container"],
1498
+ children: /* @__PURE__ */ jsxDEV12(Layout, {
1499
+ elementRef: mountRef,
1500
+ alignItems: "center",
1501
+ justifyItems: "center",
1502
+ height: "100%",
1503
+ className: Modal_module_default["container"],
1537
1504
  "data-polly-ui": true,
1538
1505
  "data-polly-modal-content": true,
1539
1506
  "data-overlay-id": id,
@@ -1684,8 +1651,11 @@ function Host() {
1684
1651
  children: current.body
1685
1652
  }, undefined, false, undefined, this) : null,
1686
1653
  /* @__PURE__ */ jsxDEV13(Modal.Footer, {
1687
- children: /* @__PURE__ */ jsxDEV13("div", {
1688
- class: ConfirmDialog_module_default["actions"],
1654
+ children: /* @__PURE__ */ jsxDEV13(Layout, {
1655
+ columns: "auto auto",
1656
+ gap: "var(--polly-space-sm)",
1657
+ justifyContent: "end",
1658
+ className: ConfirmDialog_module_default["actions"],
1689
1659
  "data-polly-confirm-actions": true,
1690
1660
  children: [
1691
1661
  /* @__PURE__ */ jsxDEV13("button", {
@@ -1824,7 +1794,7 @@ function Output(props) {
1824
1794
  }
1825
1795
  // src/polly-ui/Select.tsx
1826
1796
  import { useComputed, useSignal as useSignal2 } from "@preact/signals";
1827
- import { jsxDEV as jsxDEV17, Fragment as Fragment3 } from "preact/jsx-dev-runtime";
1797
+ import { jsxDEV as jsxDEV17 } from "preact/jsx-dev-runtime";
1828
1798
  var MULTI_SELECT_LABEL_THRESHOLD = 2;
1829
1799
  function formatSelected(options, selected, multiSelect) {
1830
1800
  if (selected.size === 0)
@@ -1852,7 +1822,7 @@ function Select(props) {
1852
1822
  className,
1853
1823
  id
1854
1824
  } = props;
1855
- const isOpen2 = useSignal2(false);
1825
+ const isOpen = useSignal2(false);
1856
1826
  const displayText = useComputed(() => {
1857
1827
  const text = formatSelected(options, selected.value, multiSelect);
1858
1828
  return text.length > 0 ? text : placeholder;
@@ -1868,7 +1838,7 @@ function Select(props) {
1868
1838
  selected.value = next;
1869
1839
  } else {
1870
1840
  selected.value = new Set([value]);
1871
- isOpen2.value = false;
1841
+ isOpen.value = false;
1872
1842
  }
1873
1843
  };
1874
1844
  const handleSelectAll = () => {
@@ -1879,7 +1849,7 @@ function Select(props) {
1879
1849
  };
1880
1850
  const handleClearOption = () => {
1881
1851
  selected.value = new Set;
1882
- isOpen2.value = false;
1852
+ isOpen.value = false;
1883
1853
  };
1884
1854
  const triggerParts = [Select_module_default["trigger"] ?? ""];
1885
1855
  if (isEmpty.value)
@@ -1887,10 +1857,16 @@ function Select(props) {
1887
1857
  if (wide)
1888
1858
  triggerParts.push(Select_module_default["triggerWide"] ?? "");
1889
1859
  const triggerClass = triggerParts.filter(Boolean).join(" ");
1890
- const triggerContent = /* @__PURE__ */ jsxDEV17(Fragment3, {
1860
+ const triggerContent = /* @__PURE__ */ jsxDEV17(Layout, {
1861
+ inline: true,
1862
+ columns: "1fr auto",
1863
+ gap: "var(--polly-space-sm)",
1864
+ alignItems: "center",
1865
+ maxInlineSize: "100%",
1891
1866
  children: [
1892
1867
  /* @__PURE__ */ jsxDEV17("span", {
1893
1868
  class: Select_module_default["triggerLabel"],
1869
+ "data-polly-select-label": true,
1894
1870
  children: displayText.value
1895
1871
  }, undefined, false, undefined, this),
1896
1872
  /* @__PURE__ */ jsxDEV17("span", {
@@ -1913,7 +1889,7 @@ function Select(props) {
1913
1889
  children: label
1914
1890
  }, undefined, false, undefined, this),
1915
1891
  /* @__PURE__ */ jsxDEV17(Dropdown, {
1916
- isOpen: isOpen2,
1892
+ isOpen,
1917
1893
  trigger: triggerContent,
1918
1894
  triggerClassName: triggerClass,
1919
1895
  triggerDisabled: disabled,
@@ -2218,8 +2194,9 @@ function TextInput(props) {
2218
2194
  }, undefined, false, undefined, this);
2219
2195
  if (!hasError)
2220
2196
  return control;
2221
- return /* @__PURE__ */ jsxDEV20("div", {
2222
- class: TextInput_module_default["field"],
2197
+ return /* @__PURE__ */ jsxDEV20(Layout, {
2198
+ gap: "var(--polly-space-xs)",
2199
+ className: TextInput_module_default["field"],
2223
2200
  "data-polly-ui": true,
2224
2201
  "data-polly-field": true,
2225
2202
  children: [
@@ -2299,8 +2276,9 @@ function Viewport(props) {
2299
2276
  }, [paused, entries, autoDismissMs]);
2300
2277
  if (!portalNode)
2301
2278
  return null;
2302
- const content = /* @__PURE__ */ jsxDEV21("div", {
2303
- class: `${Toast_module_default["viewport"]} ${props.className ?? ""}`.trim(),
2279
+ const content = /* @__PURE__ */ jsxDEV21(Layout, {
2280
+ gap: "var(--polly-space-sm)",
2281
+ className: `${Toast_module_default["viewport"]} ${props.className ?? ""}`.trim(),
2304
2282
  "data-polly-ui": true,
2305
2283
  "data-polly-toast-viewport": true,
2306
2284
  onMouseEnter: () => setPaused(true),
@@ -2322,23 +2300,28 @@ function ToastItem({ entry }) {
2322
2300
  "data-severity": entry.severity,
2323
2301
  role: entry.severity === "error" ? "alert" : "status",
2324
2302
  "aria-live": liveness,
2325
- children: [
2326
- /* @__PURE__ */ jsxDEV21("span", {
2327
- class: Toast_module_default["message"],
2328
- children: entry.message
2329
- }, undefined, false, undefined, this),
2330
- /* @__PURE__ */ jsxDEV21("button", {
2331
- type: "button",
2332
- class: Toast_module_default["close"],
2333
- "data-polly-ui": true,
2334
- "data-polly-interactive": true,
2335
- "data-polly-toast-close": true,
2336
- onClick: () => clearError(entry.id),
2337
- "aria-label": "Dismiss",
2338
- children: "×"
2339
- }, undefined, false, undefined, this)
2340
- ]
2341
- }, undefined, true, undefined, this);
2303
+ children: /* @__PURE__ */ jsxDEV21(Layout, {
2304
+ columns: "1fr auto",
2305
+ gap: "var(--polly-space-md)",
2306
+ alignItems: "center",
2307
+ children: [
2308
+ /* @__PURE__ */ jsxDEV21("span", {
2309
+ class: Toast_module_default["message"],
2310
+ children: entry.message
2311
+ }, undefined, false, undefined, this),
2312
+ /* @__PURE__ */ jsxDEV21("button", {
2313
+ type: "button",
2314
+ class: Toast_module_default["close"],
2315
+ "data-polly-ui": true,
2316
+ "data-polly-interactive": true,
2317
+ "data-polly-toast-close": true,
2318
+ onClick: () => clearError(entry.id),
2319
+ "aria-label": "Dismiss",
2320
+ children: "×"
2321
+ }, undefined, false, undefined, this)
2322
+ ]
2323
+ }, undefined, true, undefined, this)
2324
+ }, undefined, false, undefined, this);
2342
2325
  }
2343
2326
  var Toast = { Viewport };
2344
2327
  // src/polly-ui/Toggle.module.css
@@ -2362,8 +2345,13 @@ function Toggle(props) {
2362
2345
  parts.push(Toggle_module_default["disabled"]);
2363
2346
  if (className)
2364
2347
  parts.push(className);
2365
- return /* @__PURE__ */ jsxDEV22("label", {
2366
- class: parts.join(" "),
2348
+ return /* @__PURE__ */ jsxDEV22(Layout, {
2349
+ as: "label",
2350
+ inline: true,
2351
+ columns: "auto auto",
2352
+ gap: "var(--polly-space-sm)",
2353
+ alignItems: "center",
2354
+ className: parts.join(" "),
2367
2355
  "data-polly-ui": true,
2368
2356
  "data-polly-toggle": true,
2369
2357
  children: [
@@ -2422,4 +2410,4 @@ export {
2422
2410
  getOverlayRootNode
2423
2411
  };
2424
2412
 
2425
- //# debugId=658A56B7B40F7FD364756E2164756E21
2413
+ //# debugId=E3BB994F404F3CB764756E2164756E21