@fairfox/polly 0.89.0 → 0.89.1

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.
@@ -505,8 +505,33 @@ var Select_module_default = {
505
505
  optionCheck: "optionCheck_daofbw"
506
506
  };
507
507
 
508
+ // src/polly-ui/internal/select-trigger.tsx
509
+ import { jsxDEV as jsxDEV4 } from "preact/jsx-dev-runtime";
510
+ function SelectTrigger(props) {
511
+ const { label, caret = true, as = "div" } = props;
512
+ return /* @__PURE__ */ jsxDEV4(Layout, {
513
+ as,
514
+ inline: true,
515
+ columns: caret ? "1fr auto" : "1fr",
516
+ ...caret ? { gap: "var(--polly-space-sm)" } : {},
517
+ alignItems: "center",
518
+ maxInlineSize: "100%",
519
+ children: [
520
+ /* @__PURE__ */ jsxDEV4("span", {
521
+ class: Select_module_default["triggerLabel"],
522
+ "data-polly-select-label": true,
523
+ children: label
524
+ }, undefined, false, undefined, this),
525
+ caret && /* @__PURE__ */ jsxDEV4("span", {
526
+ class: Select_module_default["caret"],
527
+ "aria-hidden": "true"
528
+ }, undefined, false, undefined, this)
529
+ ]
530
+ }, undefined, true, undefined, this);
531
+ }
532
+
508
533
  // src/polly-ui/ActionSelect.tsx
509
- import { jsxDEV as jsxDEV4, Fragment } from "preact/jsx-dev-runtime";
534
+ import { jsxDEV as jsxDEV5 } from "preact/jsx-dev-runtime";
510
535
  function labelFor(options, value) {
511
536
  for (const opt of options) {
512
537
  if (opt.value === value)
@@ -546,7 +571,7 @@ function ActionSelect(props) {
546
571
  const parts = [Select_module_default["select"] ?? ""];
547
572
  if (className)
548
573
  parts.push(className);
549
- return /* @__PURE__ */ jsxDEV4("div", {
574
+ return /* @__PURE__ */ jsxDEV5("div", {
550
575
  ...collectPassthrough(props),
551
576
  id,
552
577
  class: parts.filter(Boolean).join(" "),
@@ -554,44 +579,36 @@ function ActionSelect(props) {
554
579
  "data-polly-action-select": true,
555
580
  "data-state": isEmpty ? "empty" : "filled",
556
581
  children: [
557
- label !== undefined && /* @__PURE__ */ jsxDEV4("span", {
582
+ label !== undefined && /* @__PURE__ */ jsxDEV5("span", {
558
583
  class: Select_module_default["label"],
559
584
  children: label
560
585
  }, undefined, false, undefined, this),
561
- disabled ? /* @__PURE__ */ jsxDEV4("span", {
586
+ disabled ? /* @__PURE__ */ jsxDEV5("span", {
562
587
  class: triggerClass,
563
588
  "aria-disabled": "true",
564
589
  title: displayText,
565
- children: /* @__PURE__ */ jsxDEV4("span", {
566
- class: Select_module_default["triggerLabel"],
567
- children: displayText
590
+ children: /* @__PURE__ */ jsxDEV5(SelectTrigger, {
591
+ as: "span",
592
+ caret: false,
593
+ label: displayText
568
594
  }, undefined, false, undefined, this)
569
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV4(Dropdown, {
595
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV5(Dropdown, {
570
596
  isOpen,
571
597
  triggerClassName: triggerClass,
572
598
  triggerTitle: displayText,
573
- trigger: /* @__PURE__ */ jsxDEV4(Fragment, {
574
- children: [
575
- /* @__PURE__ */ jsxDEV4("span", {
576
- class: Select_module_default["triggerLabel"],
577
- children: displayText
578
- }, undefined, false, undefined, this),
579
- /* @__PURE__ */ jsxDEV4("span", {
580
- class: Select_module_default["caret"],
581
- "aria-hidden": "true"
582
- }, undefined, false, undefined, this)
583
- ]
584
- }, undefined, true, undefined, this),
599
+ trigger: /* @__PURE__ */ jsxDEV5(SelectTrigger, {
600
+ label: displayText
601
+ }, undefined, false, undefined, this),
585
602
  children: options.map((opt) => {
586
603
  const isSelected = opt.value === value;
587
604
  const optClass = isSelected ? `${Select_module_default["option"]} ${Select_module_default["optionSelected"]}` : Select_module_default["option"];
588
- return /* @__PURE__ */ jsxDEV4("button", {
605
+ return /* @__PURE__ */ jsxDEV5("button", {
589
606
  type: "button",
590
607
  role: "option",
591
608
  class: optClass,
592
609
  "aria-selected": isSelected ? "true" : "false",
593
610
  onClick: () => commit(opt.value),
594
- children: /* @__PURE__ */ jsxDEV4("span", {
611
+ children: /* @__PURE__ */ jsxDEV5("span", {
595
612
  children: opt.label
596
613
  }, undefined, false, undefined, this)
597
614
  }, opt.value, false, undefined, this);
@@ -610,7 +627,7 @@ var Badge_module_default = {
610
627
  };
611
628
 
612
629
  // src/polly-ui/Badge.tsx
613
- import { jsxDEV as jsxDEV5 } from "preact/jsx-dev-runtime";
630
+ import { jsxDEV as jsxDEV6 } from "preact/jsx-dev-runtime";
614
631
  function variantClass(variant) {
615
632
  if (variant === "info")
616
633
  return Badge_module_default["info"];
@@ -630,7 +647,7 @@ function Badge(props) {
630
647
  parts.push(v);
631
648
  if (className)
632
649
  parts.push(className);
633
- return /* @__PURE__ */ jsxDEV5("span", {
650
+ return /* @__PURE__ */ jsxDEV6("span", {
634
651
  id,
635
652
  title,
636
653
  class: parts.join(" "),
@@ -660,7 +677,7 @@ var Button_module_default = {
660
677
  };
661
678
 
662
679
  // src/polly-ui/Button.tsx
663
- import { jsxDEV as jsxDEV6 } from "preact/jsx-dev-runtime";
680
+ import { jsxDEV as jsxDEV7 } from "preact/jsx-dev-runtime";
664
681
  function tierClass(tier) {
665
682
  if (tier === "primary")
666
683
  return Button_module_default["tierPrimary"];
@@ -723,17 +740,17 @@ function Button(props) {
723
740
  if (className)
724
741
  parts.push(className);
725
742
  const buttonClass = parts.filter(Boolean).join(" ");
726
- const content = icon === undefined ? label : /* @__PURE__ */ jsxDEV6(Layout, {
743
+ const content = icon === undefined ? label : /* @__PURE__ */ jsxDEV7(Layout, {
727
744
  inline: true,
728
745
  columns: "auto auto",
729
746
  gap: "var(--polly-space-sm)",
730
747
  alignItems: "center",
731
748
  children: [
732
- /* @__PURE__ */ jsxDEV6("span", {
749
+ /* @__PURE__ */ jsxDEV7("span", {
733
750
  class: Button_module_default["icon"],
734
751
  children: icon
735
752
  }, undefined, false, undefined, this),
736
- label !== undefined && /* @__PURE__ */ jsxDEV6("span", {
753
+ label !== undefined && /* @__PURE__ */ jsxDEV7("span", {
737
754
  class: Button_module_default["label"],
738
755
  children: label
739
756
  }, undefined, false, undefined, this)
@@ -752,7 +769,7 @@ function Button(props) {
752
769
  }
753
770
  }
754
771
  if ("href" in props && props.href) {
755
- return /* @__PURE__ */ jsxDEV6("a", {
772
+ return /* @__PURE__ */ jsxDEV7("a", {
756
773
  id,
757
774
  class: buttonClass,
758
775
  title: resolvedTitle,
@@ -770,7 +787,7 @@ function Button(props) {
770
787
  }, undefined, false, undefined, this);
771
788
  }
772
789
  const resolvedType = "type" in props && props.type ? props.type : "button";
773
- return /* @__PURE__ */ jsxDEV6("button", {
790
+ return /* @__PURE__ */ jsxDEV7("button", {
774
791
  id,
775
792
  class: buttonClass,
776
793
  title: resolvedTitle,
@@ -998,10 +1015,10 @@ function Surface(props) {
998
1015
  }
999
1016
 
1000
1017
  // src/polly-ui/Card.tsx
1001
- import { jsxDEV as jsxDEV7 } from "preact/jsx-dev-runtime";
1018
+ import { jsxDEV as jsxDEV8 } from "preact/jsx-dev-runtime";
1002
1019
  function Root(props) {
1003
1020
  const { variant = "raised", radius = "md", ...rest } = props;
1004
- return /* @__PURE__ */ jsxDEV7(Surface, {
1021
+ return /* @__PURE__ */ jsxDEV8(Surface, {
1005
1022
  variant,
1006
1023
  radius,
1007
1024
  "data-polly-card": true,
@@ -1016,7 +1033,7 @@ function Header(props) {
1016
1033
  borderSides = "block-end",
1017
1034
  ...rest
1018
1035
  } = props;
1019
- return /* @__PURE__ */ jsxDEV7(Surface, {
1036
+ return /* @__PURE__ */ jsxDEV8(Surface, {
1020
1037
  padding,
1021
1038
  border,
1022
1039
  borderSides,
@@ -1027,7 +1044,7 @@ function Header(props) {
1027
1044
  }
1028
1045
  function Body(props) {
1029
1046
  const { padding = "var(--polly-space-lg)", ...rest } = props;
1030
- return /* @__PURE__ */ jsxDEV7(Surface, {
1047
+ return /* @__PURE__ */ jsxDEV8(Surface, {
1031
1048
  padding,
1032
1049
  "data-polly-card-body": true,
1033
1050
  ...rest,
@@ -1041,7 +1058,7 @@ function Footer(props) {
1041
1058
  borderSides = "block-start",
1042
1059
  ...rest
1043
1060
  } = props;
1044
- return /* @__PURE__ */ jsxDEV7(Surface, {
1061
+ return /* @__PURE__ */ jsxDEV8(Surface, {
1045
1062
  padding,
1046
1063
  border,
1047
1064
  borderSides,
@@ -1060,7 +1077,7 @@ var Checkbox_module_default = {
1060
1077
  };
1061
1078
 
1062
1079
  // src/polly-ui/Checkbox.tsx
1063
- import { jsxDEV as jsxDEV8 } from "preact/jsx-dev-runtime";
1080
+ import { jsxDEV as jsxDEV9 } from "preact/jsx-dev-runtime";
1064
1081
  function isSignal(value) {
1065
1082
  return typeof value === "object" && value !== null && "value" in value && "peek" in value;
1066
1083
  }
@@ -1077,7 +1094,7 @@ function Checkbox(props) {
1077
1094
  parts.push(Checkbox_module_default["disabled"] ?? "");
1078
1095
  if (className)
1079
1096
  parts.push(className);
1080
- return /* @__PURE__ */ jsxDEV8(Layout, {
1097
+ return /* @__PURE__ */ jsxDEV9(Layout, {
1081
1098
  as: "label",
1082
1099
  inline: true,
1083
1100
  columns: "auto auto",
@@ -1087,7 +1104,7 @@ function Checkbox(props) {
1087
1104
  "data-polly-ui": true,
1088
1105
  "data-polly-checkbox": true,
1089
1106
  children: [
1090
- /* @__PURE__ */ jsxDEV8("input", {
1107
+ /* @__PURE__ */ jsxDEV9("input", {
1091
1108
  id,
1092
1109
  type: "checkbox",
1093
1110
  class: Checkbox_module_default["input"],
@@ -1097,7 +1114,7 @@ function Checkbox(props) {
1097
1114
  disabled,
1098
1115
  onChange: handleChange
1099
1116
  }, undefined, false, undefined, this),
1100
- label !== undefined && /* @__PURE__ */ jsxDEV8("span", {
1117
+ label !== undefined && /* @__PURE__ */ jsxDEV9("span", {
1101
1118
  class: Checkbox_module_default["label"],
1102
1119
  children: label
1103
1120
  }, undefined, false, undefined, this)
@@ -1148,7 +1165,7 @@ var Code_module_default = {
1148
1165
  };
1149
1166
 
1150
1167
  // src/polly-ui/Code.tsx
1151
- import { jsxDEV as jsxDEV9 } from "preact/jsx-dev-runtime";
1168
+ import { jsxDEV as jsxDEV10 } from "preact/jsx-dev-runtime";
1152
1169
  function Code(props) {
1153
1170
  const { children, block, className, id } = props;
1154
1171
  const passthrough = collectPassthrough(props);
@@ -1156,13 +1173,13 @@ function Code(props) {
1156
1173
  const parts = [Code_module_default["block"]];
1157
1174
  if (className)
1158
1175
  parts.push(className);
1159
- return /* @__PURE__ */ jsxDEV9("pre", {
1176
+ return /* @__PURE__ */ jsxDEV10("pre", {
1160
1177
  ...passthrough,
1161
1178
  id,
1162
1179
  class: parts.filter(Boolean).join(" "),
1163
1180
  "data-polly-ui": true,
1164
1181
  "data-polly-code": "block",
1165
- children: /* @__PURE__ */ jsxDEV9("code", {
1182
+ children: /* @__PURE__ */ jsxDEV10("code", {
1166
1183
  children
1167
1184
  }, undefined, false, undefined, this)
1168
1185
  }, undefined, false, undefined, this);
@@ -1170,7 +1187,7 @@ function Code(props) {
1170
1187
  const parts = [Code_module_default["code"]];
1171
1188
  if (className)
1172
1189
  parts.push(className);
1173
- return /* @__PURE__ */ jsxDEV9("code", {
1190
+ return /* @__PURE__ */ jsxDEV10("code", {
1174
1191
  ...passthrough,
1175
1192
  id,
1176
1193
  class: parts.filter(Boolean).join(" "),
@@ -1189,7 +1206,7 @@ var Collapsible_module_default = {
1189
1206
  };
1190
1207
 
1191
1208
  // src/polly-ui/Collapsible.tsx
1192
- import { jsxDEV as jsxDEV10 } from "preact/jsx-dev-runtime";
1209
+ import { jsxDEV as jsxDEV11 } from "preact/jsx-dev-runtime";
1193
1210
  var NON_TEXT_INPUT_TYPES = new Set([
1194
1211
  "checkbox",
1195
1212
  "radio",
@@ -1225,14 +1242,14 @@ function Collapsible(props) {
1225
1242
  const parts = [Collapsible_module_default["collapsible"]];
1226
1243
  if (className)
1227
1244
  parts.push(className);
1228
- return /* @__PURE__ */ jsxDEV10("details", {
1245
+ return /* @__PURE__ */ jsxDEV11("details", {
1229
1246
  id,
1230
1247
  class: parts.join(" "),
1231
1248
  open: defaultOpen,
1232
1249
  "data-polly-ui": true,
1233
1250
  "data-polly-collapsible": true,
1234
1251
  children: [
1235
- /* @__PURE__ */ jsxDEV10(Layout, {
1252
+ /* @__PURE__ */ jsxDEV11(Layout, {
1236
1253
  as: "summary",
1237
1254
  columns: "auto 1fr",
1238
1255
  gap: "var(--polly-space-sm)",
@@ -1240,17 +1257,17 @@ function Collapsible(props) {
1240
1257
  className: Collapsible_module_default["summary"],
1241
1258
  onKeyUp: handleSummaryKeyUp,
1242
1259
  children: [
1243
- /* @__PURE__ */ jsxDEV10("span", {
1260
+ /* @__PURE__ */ jsxDEV11("span", {
1244
1261
  class: Collapsible_module_default["marker"],
1245
1262
  "aria-hidden": "true"
1246
1263
  }, undefined, false, undefined, this),
1247
- /* @__PURE__ */ jsxDEV10("span", {
1264
+ /* @__PURE__ */ jsxDEV11("span", {
1248
1265
  class: Collapsible_module_default["summaryContent"],
1249
1266
  children: summary
1250
1267
  }, undefined, false, undefined, this)
1251
1268
  ]
1252
1269
  }, undefined, true, undefined, this),
1253
- /* @__PURE__ */ jsxDEV10("div", {
1270
+ /* @__PURE__ */ jsxDEV11("div", {
1254
1271
  class: Collapsible_module_default["content"],
1255
1272
  children
1256
1273
  }, undefined, false, undefined, this)
@@ -1420,7 +1437,7 @@ var OverlayRoot_module_default = {
1420
1437
  };
1421
1438
 
1422
1439
  // src/polly-ui/OverlayRoot.tsx
1423
- import { jsxDEV as jsxDEV11 } from "preact/jsx-dev-runtime";
1440
+ import { jsxDEV as jsxDEV12 } from "preact/jsx-dev-runtime";
1424
1441
  function OverlayRoot() {
1425
1442
  const ref = useRef3(null);
1426
1443
  useEffect3(() => {
@@ -1439,7 +1456,7 @@ function OverlayRoot() {
1439
1456
  release?.();
1440
1457
  };
1441
1458
  }, []);
1442
- return /* @__PURE__ */ jsxDEV11("div", {
1459
+ return /* @__PURE__ */ jsxDEV12("div", {
1443
1460
  ref,
1444
1461
  class: OverlayRoot_module_default["root"],
1445
1462
  "data-polly-ui": true,
@@ -1451,7 +1468,7 @@ function getOverlayRootNode() {
1451
1468
  }
1452
1469
 
1453
1470
  // src/polly-ui/Modal.tsx
1454
- import { jsxDEV as jsxDEV12 } from "preact/jsx-dev-runtime";
1471
+ import { jsxDEV as jsxDEV13 } from "preact/jsx-dev-runtime";
1455
1472
  var Ctx = createContext(null);
1456
1473
  function useModal() {
1457
1474
  const ctx = useContext(Ctx);
@@ -1493,9 +1510,9 @@ function Root2({ when, onClose, children, "aria-label": ariaLabel }) {
1493
1510
  onClose?.();
1494
1511
  };
1495
1512
  const ctx = { id, titleId, descId, close };
1496
- const content = /* @__PURE__ */ jsxDEV12(Ctx.Provider, {
1513
+ const content = /* @__PURE__ */ jsxDEV13(Ctx.Provider, {
1497
1514
  value: ctx,
1498
- children: /* @__PURE__ */ jsxDEV12(Layout, {
1515
+ children: /* @__PURE__ */ jsxDEV13(Layout, {
1499
1516
  elementRef: mountRef,
1500
1517
  alignItems: "center",
1501
1518
  justifyItems: "center",
@@ -1517,7 +1534,7 @@ function Root2({ when, onClose, children, "aria-label": ariaLabel }) {
1517
1534
  }
1518
1535
  function Backdrop() {
1519
1536
  const { close } = useModal();
1520
- return /* @__PURE__ */ jsxDEV12("div", {
1537
+ return /* @__PURE__ */ jsxDEV13("div", {
1521
1538
  class: Modal_module_default["backdrop"],
1522
1539
  "data-polly-modal-backdrop": true,
1523
1540
  onClick: close,
@@ -1526,7 +1543,7 @@ function Backdrop() {
1526
1543
  }
1527
1544
  function Content({ children, className, style }) {
1528
1545
  const cls = className ? `${Modal_module_default["surface"]} ${className}` : Modal_module_default["surface"];
1529
- return /* @__PURE__ */ jsxDEV12(Surface, {
1546
+ return /* @__PURE__ */ jsxDEV13(Surface, {
1530
1547
  variant: "raised",
1531
1548
  radius: "lg",
1532
1549
  shadow: "lg",
@@ -1538,7 +1555,7 @@ function Content({ children, className, style }) {
1538
1555
  }, undefined, false, undefined, this);
1539
1556
  }
1540
1557
  function Header2({ children }) {
1541
- return /* @__PURE__ */ jsxDEV12("header", {
1558
+ return /* @__PURE__ */ jsxDEV13("header", {
1542
1559
  class: Modal_module_default["header"],
1543
1560
  "data-polly-modal-header": true,
1544
1561
  children
@@ -1546,7 +1563,7 @@ function Header2({ children }) {
1546
1563
  }
1547
1564
  function Title({ children }) {
1548
1565
  const { titleId } = useModal();
1549
- return /* @__PURE__ */ jsxDEV12("h2", {
1566
+ return /* @__PURE__ */ jsxDEV13("h2", {
1550
1567
  id: titleId,
1551
1568
  class: Modal_module_default["title"],
1552
1569
  "data-polly-modal-title": true,
@@ -1555,7 +1572,7 @@ function Title({ children }) {
1555
1572
  }
1556
1573
  function Body2({ children }) {
1557
1574
  const { descId } = useModal();
1558
- return /* @__PURE__ */ jsxDEV12("div", {
1575
+ return /* @__PURE__ */ jsxDEV13("div", {
1559
1576
  id: descId,
1560
1577
  class: Modal_module_default["body"],
1561
1578
  "data-polly-modal-body": true,
@@ -1563,7 +1580,7 @@ function Body2({ children }) {
1563
1580
  }, undefined, false, undefined, this);
1564
1581
  }
1565
1582
  function Footer2({ children }) {
1566
- return /* @__PURE__ */ jsxDEV12("footer", {
1583
+ return /* @__PURE__ */ jsxDEV13("footer", {
1567
1584
  class: Modal_module_default["footer"],
1568
1585
  "data-polly-modal-footer": true,
1569
1586
  children
@@ -1572,7 +1589,7 @@ function Footer2({ children }) {
1572
1589
  function Close({ children, action }) {
1573
1590
  const { close } = useModal();
1574
1591
  if (action) {
1575
- return /* @__PURE__ */ jsxDEV12("button", {
1592
+ return /* @__PURE__ */ jsxDEV13("button", {
1576
1593
  type: "button",
1577
1594
  class: Modal_module_default["close"],
1578
1595
  "data-polly-ui": true,
@@ -1582,7 +1599,7 @@ function Close({ children, action }) {
1582
1599
  children
1583
1600
  }, undefined, false, undefined, this);
1584
1601
  }
1585
- return /* @__PURE__ */ jsxDEV12("button", {
1602
+ return /* @__PURE__ */ jsxDEV13("button", {
1586
1603
  type: "button",
1587
1604
  class: Modal_module_default["close"],
1588
1605
  "data-polly-ui": true,
@@ -1604,7 +1621,7 @@ var Modal = {
1604
1621
  };
1605
1622
 
1606
1623
  // src/polly-ui/ConfirmDialog.tsx
1607
- import { jsxDEV as jsxDEV13 } from "preact/jsx-dev-runtime";
1624
+ import { jsxDEV as jsxDEV14 } from "preact/jsx-dev-runtime";
1608
1625
  var pending = signal2(null);
1609
1626
  var isOpen = signal2(false);
1610
1627
  var nextId = 0;
@@ -1635,30 +1652,30 @@ function Host() {
1635
1652
  const current = pending.value;
1636
1653
  if (!current)
1637
1654
  return null;
1638
- return /* @__PURE__ */ jsxDEV13(Modal.Root, {
1655
+ return /* @__PURE__ */ jsxDEV14(Modal.Root, {
1639
1656
  when: isOpen,
1640
1657
  onClose: () => close(false),
1641
1658
  children: [
1642
- /* @__PURE__ */ jsxDEV13(Modal.Backdrop, {}, undefined, false, undefined, this),
1643
- /* @__PURE__ */ jsxDEV13(Modal.Content, {
1659
+ /* @__PURE__ */ jsxDEV14(Modal.Backdrop, {}, undefined, false, undefined, this),
1660
+ /* @__PURE__ */ jsxDEV14(Modal.Content, {
1644
1661
  children: [
1645
- /* @__PURE__ */ jsxDEV13(Modal.Header, {
1646
- children: /* @__PURE__ */ jsxDEV13(Modal.Title, {
1662
+ /* @__PURE__ */ jsxDEV14(Modal.Header, {
1663
+ children: /* @__PURE__ */ jsxDEV14(Modal.Title, {
1647
1664
  children: current.title
1648
1665
  }, undefined, false, undefined, this)
1649
1666
  }, undefined, false, undefined, this),
1650
- current.body ? /* @__PURE__ */ jsxDEV13(Modal.Body, {
1667
+ current.body ? /* @__PURE__ */ jsxDEV14(Modal.Body, {
1651
1668
  children: current.body
1652
1669
  }, undefined, false, undefined, this) : null,
1653
- /* @__PURE__ */ jsxDEV13(Modal.Footer, {
1654
- children: /* @__PURE__ */ jsxDEV13(Layout, {
1670
+ /* @__PURE__ */ jsxDEV14(Modal.Footer, {
1671
+ children: /* @__PURE__ */ jsxDEV14(Layout, {
1655
1672
  columns: "auto auto",
1656
1673
  gap: "var(--polly-space-sm)",
1657
1674
  justifyContent: "end",
1658
1675
  className: ConfirmDialog_module_default["actions"],
1659
1676
  "data-polly-confirm-actions": true,
1660
1677
  children: [
1661
- /* @__PURE__ */ jsxDEV13("button", {
1678
+ /* @__PURE__ */ jsxDEV14("button", {
1662
1679
  type: "button",
1663
1680
  class: ConfirmDialog_module_default["cancel"],
1664
1681
  "data-polly-ui": true,
@@ -1667,7 +1684,7 @@ function Host() {
1667
1684
  onClick: () => close(false),
1668
1685
  children: current.cancelLabel ?? "Cancel"
1669
1686
  }, undefined, false, undefined, this),
1670
- /* @__PURE__ */ jsxDEV13("button", {
1687
+ /* @__PURE__ */ jsxDEV14("button", {
1671
1688
  type: "button",
1672
1689
  class: current.danger ? ConfirmDialog_module_default["confirmDanger"] : ConfirmDialog_module_default["confirm"],
1673
1690
  "data-polly-ui": true,
@@ -1693,7 +1710,7 @@ var FileInput_module_default = {
1693
1710
  };
1694
1711
 
1695
1712
  // src/polly-ui/FileInput.tsx
1696
- import { jsxDEV as jsxDEV14 } from "preact/jsx-dev-runtime";
1713
+ import { jsxDEV as jsxDEV15 } from "preact/jsx-dev-runtime";
1697
1714
  function FileInput(props) {
1698
1715
  const { onFiles, label = "Choose file", accept, multiple, disabled, className, id } = props;
1699
1716
  const handleChange = (e) => {
@@ -1706,13 +1723,13 @@ function FileInput(props) {
1706
1723
  parts.push(FileInput_module_default["disabled"]);
1707
1724
  if (className)
1708
1725
  parts.push(className);
1709
- return /* @__PURE__ */ jsxDEV14("label", {
1726
+ return /* @__PURE__ */ jsxDEV15("label", {
1710
1727
  id,
1711
1728
  class: parts.filter(Boolean).join(" "),
1712
1729
  "data-polly-ui": true,
1713
1730
  "data-polly-file-input": true,
1714
1731
  children: [
1715
- /* @__PURE__ */ jsxDEV14("input", {
1732
+ /* @__PURE__ */ jsxDEV15("input", {
1716
1733
  type: "file",
1717
1734
  class: FileInput_module_default["native"],
1718
1735
  accept,
@@ -1720,7 +1737,7 @@ function FileInput(props) {
1720
1737
  disabled,
1721
1738
  onChange: handleChange
1722
1739
  }, undefined, false, undefined, this),
1723
- /* @__PURE__ */ jsxDEV14("span", {
1740
+ /* @__PURE__ */ jsxDEV15("span", {
1724
1741
  children: label
1725
1742
  }, undefined, false, undefined, this)
1726
1743
  ]
@@ -1746,7 +1763,7 @@ var Link_module_default = {
1746
1763
  };
1747
1764
 
1748
1765
  // src/polly-ui/Link.tsx
1749
- import { jsxDEV as jsxDEV15 } from "preact/jsx-dev-runtime";
1766
+ import { jsxDEV as jsxDEV16 } from "preact/jsx-dev-runtime";
1750
1767
  function Link(props) {
1751
1768
  const { children, href, external, download, subtle, className, id } = props;
1752
1769
  const parts = [Link_module_default["link"]];
@@ -1754,7 +1771,7 @@ function Link(props) {
1754
1771
  parts.push(Link_module_default["subtle"]);
1755
1772
  if (className)
1756
1773
  parts.push(className);
1757
- return /* @__PURE__ */ jsxDEV15("a", {
1774
+ return /* @__PURE__ */ jsxDEV16("a", {
1758
1775
  ...collectPassthrough(props),
1759
1776
  id,
1760
1777
  class: parts.filter(Boolean).join(" "),
@@ -1774,7 +1791,7 @@ var Output_module_default = {
1774
1791
  };
1775
1792
 
1776
1793
  // src/polly-ui/Output.tsx
1777
- import { jsxDEV as jsxDEV16 } from "preact/jsx-dev-runtime";
1794
+ import { jsxDEV as jsxDEV17 } from "preact/jsx-dev-runtime";
1778
1795
  function Output(props) {
1779
1796
  const { children, scroll, tabIndex, className, id } = props;
1780
1797
  const parts = [Output_module_default["output"]];
@@ -1782,7 +1799,7 @@ function Output(props) {
1782
1799
  parts.push(Output_module_default["scroll"]);
1783
1800
  if (className)
1784
1801
  parts.push(className);
1785
- return /* @__PURE__ */ jsxDEV16("pre", {
1802
+ return /* @__PURE__ */ jsxDEV17("pre", {
1786
1803
  ...collectPassthrough(props),
1787
1804
  id,
1788
1805
  class: parts.filter(Boolean).join(" "),
@@ -1794,7 +1811,7 @@ function Output(props) {
1794
1811
  }
1795
1812
  // src/polly-ui/Select.tsx
1796
1813
  import { useComputed, useSignal as useSignal2 } from "@preact/signals";
1797
- import { jsxDEV as jsxDEV17 } from "preact/jsx-dev-runtime";
1814
+ import { jsxDEV as jsxDEV18 } from "preact/jsx-dev-runtime";
1798
1815
  var MULTI_SELECT_LABEL_THRESHOLD = 2;
1799
1816
  function formatSelected(options, selected, multiSelect) {
1800
1817
  if (selected.size === 0)
@@ -1857,38 +1874,23 @@ function Select(props) {
1857
1874
  if (wide)
1858
1875
  triggerParts.push(Select_module_default["triggerWide"] ?? "");
1859
1876
  const triggerClass = triggerParts.filter(Boolean).join(" ");
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%",
1866
- children: [
1867
- /* @__PURE__ */ jsxDEV17("span", {
1868
- class: Select_module_default["triggerLabel"],
1869
- "data-polly-select-label": true,
1870
- children: displayText.value
1871
- }, undefined, false, undefined, this),
1872
- /* @__PURE__ */ jsxDEV17("span", {
1873
- class: Select_module_default["caret"],
1874
- "aria-hidden": "true"
1875
- }, undefined, false, undefined, this)
1876
- ]
1877
- }, undefined, true, undefined, this);
1877
+ const triggerContent = /* @__PURE__ */ jsxDEV18(SelectTrigger, {
1878
+ label: displayText.value
1879
+ }, undefined, false, undefined, this);
1878
1880
  const parts = [Select_module_default["select"] ?? ""];
1879
1881
  if (className)
1880
1882
  parts.push(className);
1881
- return /* @__PURE__ */ jsxDEV17("div", {
1883
+ return /* @__PURE__ */ jsxDEV18("div", {
1882
1884
  id,
1883
1885
  class: parts.filter(Boolean).join(" "),
1884
1886
  "data-polly-ui": true,
1885
1887
  "data-polly-select": true,
1886
1888
  children: [
1887
- label !== undefined && /* @__PURE__ */ jsxDEV17("span", {
1889
+ label !== undefined && /* @__PURE__ */ jsxDEV18("span", {
1888
1890
  class: Select_module_default["label"],
1889
1891
  children: label
1890
1892
  }, undefined, false, undefined, this),
1891
- /* @__PURE__ */ jsxDEV17(Dropdown, {
1893
+ /* @__PURE__ */ jsxDEV18(Dropdown, {
1892
1894
  isOpen,
1893
1895
  trigger: triggerContent,
1894
1896
  triggerClassName: triggerClass,
@@ -1896,19 +1898,19 @@ function Select(props) {
1896
1898
  triggerTitle: displayText.value,
1897
1899
  multiSelect,
1898
1900
  children: [
1899
- multiSelect && /* @__PURE__ */ jsxDEV17("div", {
1901
+ multiSelect && /* @__PURE__ */ jsxDEV18("div", {
1900
1902
  class: Select_module_default["actions"],
1901
- children: /* @__PURE__ */ jsxDEV17(Layout, {
1903
+ children: /* @__PURE__ */ jsxDEV18(Layout, {
1902
1904
  columns: "1fr 1fr",
1903
1905
  gap: "var(--polly-space-xs)",
1904
1906
  children: [
1905
- /* @__PURE__ */ jsxDEV17("button", {
1907
+ /* @__PURE__ */ jsxDEV18("button", {
1906
1908
  type: "button",
1907
1909
  class: Select_module_default["actionBtn"],
1908
1910
  onClick: handleSelectAll,
1909
1911
  children: "Select All"
1910
1912
  }, undefined, false, undefined, this),
1911
- /* @__PURE__ */ jsxDEV17("button", {
1913
+ /* @__PURE__ */ jsxDEV18("button", {
1912
1914
  type: "button",
1913
1915
  class: Select_module_default["actionBtn"],
1914
1916
  onClick: handleClear,
@@ -1917,35 +1919,35 @@ function Select(props) {
1917
1919
  ]
1918
1920
  }, undefined, true, undefined, this)
1919
1921
  }, undefined, false, undefined, this),
1920
- !multiSelect && clearable && /* @__PURE__ */ jsxDEV17("button", {
1922
+ !multiSelect && clearable && /* @__PURE__ */ jsxDEV18("button", {
1921
1923
  type: "button",
1922
1924
  role: "option",
1923
1925
  "aria-selected": isEmpty.value ? "true" : "false",
1924
1926
  class: isEmpty.value ? `${Select_module_default["option"]} ${Select_module_default["optionSelected"]}` : Select_module_default["option"],
1925
1927
  "data-polly-select-clear": true,
1926
1928
  onClick: handleClearOption,
1927
- children: /* @__PURE__ */ jsxDEV17("span", {
1929
+ children: /* @__PURE__ */ jsxDEV18("span", {
1928
1930
  children: placeholder
1929
1931
  }, undefined, false, undefined, this)
1930
1932
  }, undefined, false, undefined, this),
1931
1933
  options.map((opt) => {
1932
1934
  const isSelected = selected.value.has(opt.value);
1933
1935
  const optClass = isSelected ? `${Select_module_default["option"]} ${Select_module_default["optionSelected"]}` : Select_module_default["option"];
1934
- return /* @__PURE__ */ jsxDEV17("button", {
1936
+ return /* @__PURE__ */ jsxDEV18("button", {
1935
1937
  type: "button",
1936
1938
  role: "option",
1937
1939
  "aria-selected": isSelected ? "true" : "false",
1938
1940
  class: optClass,
1939
1941
  onClick: () => handleOptionClick(opt.value),
1940
1942
  children: [
1941
- multiSelect && /* @__PURE__ */ jsxDEV17("input", {
1943
+ multiSelect && /* @__PURE__ */ jsxDEV18("input", {
1942
1944
  type: "checkbox",
1943
1945
  class: Select_module_default["optionCheck"],
1944
1946
  checked: isSelected,
1945
1947
  tabIndex: -1,
1946
1948
  readOnly: true
1947
1949
  }, undefined, false, undefined, this),
1948
- /* @__PURE__ */ jsxDEV17("span", {
1950
+ /* @__PURE__ */ jsxDEV18("span", {
1949
1951
  children: opt.label
1950
1952
  }, undefined, false, undefined, this)
1951
1953
  ]
@@ -1965,7 +1967,7 @@ var Skeleton_module_default = {
1965
1967
  };
1966
1968
 
1967
1969
  // src/polly-ui/Skeleton.tsx
1968
- import { jsxDEV as jsxDEV18 } from "preact/jsx-dev-runtime";
1970
+ import { jsxDEV as jsxDEV19 } from "preact/jsx-dev-runtime";
1969
1971
  function resolveSize(value) {
1970
1972
  if (value === undefined)
1971
1973
  return;
@@ -1998,7 +2000,7 @@ function Skeleton(props) {
1998
2000
  parts.push(vClass);
1999
2001
  if (className)
2000
2002
  parts.push(className);
2001
- return /* @__PURE__ */ jsxDEV18("span", {
2003
+ return /* @__PURE__ */ jsxDEV19("span", {
2002
2004
  class: parts.join(" "),
2003
2005
  style,
2004
2006
  "data-polly-ui": true,
@@ -2014,19 +2016,19 @@ var Tabs_module_default = {
2014
2016
  };
2015
2017
 
2016
2018
  // src/polly-ui/Tabs.tsx
2017
- import { jsxDEV as jsxDEV19 } from "preact/jsx-dev-runtime";
2019
+ import { jsxDEV as jsxDEV20 } from "preact/jsx-dev-runtime";
2018
2020
  function Tabs(props) {
2019
2021
  const { tabs, activeTab, action, className, id } = props;
2020
2022
  const parts = [Tabs_module_default["tabs"] ?? ""];
2021
2023
  if (className)
2022
2024
  parts.push(className);
2023
- return /* @__PURE__ */ jsxDEV19("nav", {
2025
+ return /* @__PURE__ */ jsxDEV20("nav", {
2024
2026
  id,
2025
2027
  class: parts.filter(Boolean).join(" "),
2026
2028
  "aria-label": props["aria-label"],
2027
2029
  "data-polly-ui": true,
2028
2030
  "data-polly-tabs": true,
2029
- children: /* @__PURE__ */ jsxDEV19(Layout, {
2031
+ children: /* @__PURE__ */ jsxDEV20(Layout, {
2030
2032
  columns: `repeat(${tabs.length}, auto)`,
2031
2033
  gap: "0",
2032
2034
  alignItems: "end",
@@ -2034,7 +2036,7 @@ function Tabs(props) {
2034
2036
  children: tabs.map((tab) => {
2035
2037
  const isActive = activeTab === tab.id;
2036
2038
  const tabClass = isActive ? `${Tabs_module_default["tab"]} ${Tabs_module_default["active"]}` : Tabs_module_default["tab"];
2037
- return /* @__PURE__ */ jsxDEV19("button", {
2039
+ return /* @__PURE__ */ jsxDEV20("button", {
2038
2040
  type: "button",
2039
2041
  class: tabClass,
2040
2042
  disabled: tab.disabled,
@@ -2140,7 +2142,7 @@ var TextInput_module_default = {
2140
2142
  };
2141
2143
 
2142
2144
  // src/polly-ui/TextInput.tsx
2143
- import { jsxDEV as jsxDEV20 } from "preact/jsx-dev-runtime";
2145
+ import { jsxDEV as jsxDEV21 } from "preact/jsx-dev-runtime";
2144
2146
  function isSignal2(v) {
2145
2147
  return typeof v === "object" && v !== null && "value" in v && "peek" in v;
2146
2148
  }
@@ -2168,7 +2170,7 @@ function TextInput(props) {
2168
2170
  props.value.value = e.currentTarget.value;
2169
2171
  }
2170
2172
  };
2171
- const control = variant === "multi" ? /* @__PURE__ */ jsxDEV20("textarea", {
2173
+ const control = variant === "multi" ? /* @__PURE__ */ jsxDEV21("textarea", {
2172
2174
  ...a11y,
2173
2175
  class: className,
2174
2176
  title: props.title,
@@ -2178,7 +2180,7 @@ function TextInput(props) {
2178
2180
  value: stringValue,
2179
2181
  defaultValue,
2180
2182
  onInput
2181
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV20("input", {
2183
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV21("input", {
2182
2184
  ...a11y,
2183
2185
  type: props.inputType ?? "text",
2184
2186
  class: className,
@@ -2194,14 +2196,14 @@ function TextInput(props) {
2194
2196
  }, undefined, false, undefined, this);
2195
2197
  if (!hasError)
2196
2198
  return control;
2197
- return /* @__PURE__ */ jsxDEV20(Layout, {
2199
+ return /* @__PURE__ */ jsxDEV21(Layout, {
2198
2200
  gap: "var(--polly-space-xs)",
2199
2201
  className: TextInput_module_default["field"],
2200
2202
  "data-polly-ui": true,
2201
2203
  "data-polly-field": true,
2202
2204
  children: [
2203
2205
  control,
2204
- /* @__PURE__ */ jsxDEV20("span", {
2206
+ /* @__PURE__ */ jsxDEV21("span", {
2205
2207
  id: errorId,
2206
2208
  role: "alert",
2207
2209
  class: TextInput_module_default["error"],
@@ -2254,7 +2256,7 @@ var Toast_module_default = {
2254
2256
  };
2255
2257
 
2256
2258
  // src/polly-ui/Toast.tsx
2257
- import { jsxDEV as jsxDEV21 } from "preact/jsx-dev-runtime";
2259
+ import { jsxDEV as jsxDEV22 } from "preact/jsx-dev-runtime";
2258
2260
  function Viewport(props) {
2259
2261
  const autoDismissMs = props.autoDismissMs ?? 5000;
2260
2262
  const [portalNode, setPortalNode] = useState3(null);
@@ -2276,14 +2278,14 @@ function Viewport(props) {
2276
2278
  }, [paused, entries, autoDismissMs]);
2277
2279
  if (!portalNode)
2278
2280
  return null;
2279
- const content = /* @__PURE__ */ jsxDEV21(Layout, {
2281
+ const content = /* @__PURE__ */ jsxDEV22(Layout, {
2280
2282
  gap: "var(--polly-space-sm)",
2281
2283
  className: `${Toast_module_default["viewport"]} ${props.className ?? ""}`.trim(),
2282
2284
  "data-polly-ui": true,
2283
2285
  "data-polly-toast-viewport": true,
2284
2286
  onMouseEnter: () => setPaused(true),
2285
2287
  onMouseLeave: () => setPaused(false),
2286
- children: entries.map((entry) => /* @__PURE__ */ jsxDEV21(ToastItem, {
2288
+ children: entries.map((entry) => /* @__PURE__ */ jsxDEV22(ToastItem, {
2287
2289
  entry
2288
2290
  }, entry.id, false, undefined, this))
2289
2291
  }, undefined, false, undefined, this);
@@ -2291,7 +2293,7 @@ function Viewport(props) {
2291
2293
  }
2292
2294
  function ToastItem({ entry }) {
2293
2295
  const liveness = entry.severity === "error" ? "assertive" : "polite";
2294
- return /* @__PURE__ */ jsxDEV21(Surface, {
2296
+ return /* @__PURE__ */ jsxDEV22(Surface, {
2295
2297
  variant: "raised",
2296
2298
  padding: "var(--polly-space-md) var(--polly-space-lg)",
2297
2299
  className: Toast_module_default["item"],
@@ -2300,16 +2302,16 @@ function ToastItem({ entry }) {
2300
2302
  "data-severity": entry.severity,
2301
2303
  role: entry.severity === "error" ? "alert" : "status",
2302
2304
  "aria-live": liveness,
2303
- children: /* @__PURE__ */ jsxDEV21(Layout, {
2305
+ children: /* @__PURE__ */ jsxDEV22(Layout, {
2304
2306
  columns: "1fr auto",
2305
2307
  gap: "var(--polly-space-md)",
2306
2308
  alignItems: "center",
2307
2309
  children: [
2308
- /* @__PURE__ */ jsxDEV21("span", {
2310
+ /* @__PURE__ */ jsxDEV22("span", {
2309
2311
  class: Toast_module_default["message"],
2310
2312
  children: entry.message
2311
2313
  }, undefined, false, undefined, this),
2312
- /* @__PURE__ */ jsxDEV21("button", {
2314
+ /* @__PURE__ */ jsxDEV22("button", {
2313
2315
  type: "button",
2314
2316
  class: Toast_module_default["close"],
2315
2317
  "data-polly-ui": true,
@@ -2337,7 +2339,7 @@ var Toggle_module_default = {
2337
2339
  };
2338
2340
 
2339
2341
  // src/polly-ui/Toggle.tsx
2340
- import { jsxDEV as jsxDEV22 } from "preact/jsx-dev-runtime";
2342
+ import { jsxDEV as jsxDEV23 } from "preact/jsx-dev-runtime";
2341
2343
  function Toggle(props) {
2342
2344
  const { checked = false, disabled = false, label, name, className, id } = props;
2343
2345
  const parts = [Toggle_module_default["toggle"]];
@@ -2345,7 +2347,7 @@ function Toggle(props) {
2345
2347
  parts.push(Toggle_module_default["disabled"]);
2346
2348
  if (className)
2347
2349
  parts.push(className);
2348
- return /* @__PURE__ */ jsxDEV22(Layout, {
2350
+ return /* @__PURE__ */ jsxDEV23(Layout, {
2349
2351
  as: "label",
2350
2352
  inline: true,
2351
2353
  columns: "auto auto",
@@ -2355,7 +2357,7 @@ function Toggle(props) {
2355
2357
  "data-polly-ui": true,
2356
2358
  "data-polly-toggle": true,
2357
2359
  children: [
2358
- /* @__PURE__ */ jsxDEV22("input", {
2360
+ /* @__PURE__ */ jsxDEV23("input", {
2359
2361
  id,
2360
2362
  type: "checkbox",
2361
2363
  role: "switch",
@@ -2365,13 +2367,13 @@ function Toggle(props) {
2365
2367
  checked,
2366
2368
  disabled
2367
2369
  }, undefined, false, undefined, this),
2368
- /* @__PURE__ */ jsxDEV22("span", {
2370
+ /* @__PURE__ */ jsxDEV23("span", {
2369
2371
  class: checked ? `${Toggle_module_default["track"]} ${Toggle_module_default["trackChecked"]}` : Toggle_module_default["track"],
2370
- children: /* @__PURE__ */ jsxDEV22("span", {
2372
+ children: /* @__PURE__ */ jsxDEV23("span", {
2371
2373
  class: checked ? `${Toggle_module_default["thumb"]} ${Toggle_module_default["thumbChecked"]}` : Toggle_module_default["thumb"]
2372
2374
  }, undefined, false, undefined, this)
2373
2375
  }, undefined, false, undefined, this),
2374
- label !== undefined && /* @__PURE__ */ jsxDEV22("span", {
2376
+ label !== undefined && /* @__PURE__ */ jsxDEV23("span", {
2375
2377
  class: Toggle_module_default["label"],
2376
2378
  children: label
2377
2379
  }, undefined, false, undefined, this)
@@ -2410,4 +2412,4 @@ export {
2410
2412
  getOverlayRootNode
2411
2413
  };
2412
2414
 
2413
- //# debugId=E3BB994F404F3CB764756E2164756E21
2415
+ //# debugId=EE704C83CAA1B4AA64756E2164756E21