@fairfox/polly 0.74.1 → 0.75.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.
- package/dist/src/polly-ui/Collapsible.d.ts +3 -1
- package/dist/src/polly-ui/Dropdown.d.ts +3 -1
- package/dist/src/polly-ui/FileInput.d.ts +25 -0
- package/dist/src/polly-ui/Html.d.ts +21 -0
- package/dist/src/polly-ui/Layout.d.ts +2 -1
- package/dist/src/polly-ui/Link.d.ts +25 -0
- package/dist/src/polly-ui/Output.d.ts +26 -0
- package/dist/src/polly-ui/Surface.d.ts +20 -3
- package/dist/src/polly-ui/Text.d.ts +2 -0
- package/dist/src/polly-ui/index.css +118 -11
- package/dist/src/polly-ui/index.d.ts +4 -0
- package/dist/src/polly-ui/index.js +168 -42
- package/dist/src/polly-ui/index.js.map +13 -9
- package/dist/src/polly-ui/internal/passthrough.d.ts +8 -4
- package/dist/src/polly-ui/markdown.d.ts +4 -0
- package/dist/src/polly-ui/markdown.js +3 -1
- package/dist/src/polly-ui/markdown.js.map +3 -3
- package/dist/src/polly-ui/styles.css +127 -11
- package/dist/src/polly-ui/theme.css +9 -0
- package/package.json +1 -1
|
@@ -124,10 +124,13 @@ function dispatchAction(action, data) {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
// src/polly-ui/internal/passthrough.ts
|
|
127
|
+
function isPassthroughKey(key) {
|
|
128
|
+
return key.startsWith("data-") || key.startsWith("aria-") || key === "title";
|
|
129
|
+
}
|
|
127
130
|
function collectPassthrough(props) {
|
|
128
131
|
const out = {};
|
|
129
132
|
for (const key of Object.keys(props)) {
|
|
130
|
-
if (!
|
|
133
|
+
if (!isPassthroughKey(key))
|
|
131
134
|
continue;
|
|
132
135
|
const value = props[key];
|
|
133
136
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
@@ -374,6 +377,7 @@ function Layout(props) {
|
|
|
374
377
|
const baseClass = baseParts.filter(Boolean).join(" ");
|
|
375
378
|
const combined = contents ? className : className ? `${baseClass} ${className}` : baseClass;
|
|
376
379
|
return createElement(as, {
|
|
380
|
+
...collectPassthrough(props),
|
|
377
381
|
id,
|
|
378
382
|
className: combined,
|
|
379
383
|
style,
|
|
@@ -519,6 +523,7 @@ function Dropdown(props) {
|
|
|
519
523
|
type: "button",
|
|
520
524
|
class: triggerClassName ?? Dropdown_module_default["trigger"] ?? "",
|
|
521
525
|
disabled: triggerDisabled,
|
|
526
|
+
"data-open": isOpen.value ? "true" : "false",
|
|
522
527
|
children: trigger
|
|
523
528
|
}, undefined, false, undefined, this),
|
|
524
529
|
/* @__PURE__ */ jsxDEV3("div", {
|
|
@@ -945,8 +950,9 @@ function Surface(props) {
|
|
|
945
950
|
const position = props.position ?? v.position;
|
|
946
951
|
const inset = props.inset ?? v.inset;
|
|
947
952
|
const zIndex = props.zIndex ?? v.zIndex;
|
|
948
|
-
const { maxHeight, overflow, borderStyle, transform } = props;
|
|
949
|
-
const
|
|
953
|
+
const { maxHeight, overflow, borderStyle, transform, borderColor, scheme, pointerEvents } = props;
|
|
954
|
+
const wantsBorder = border !== undefined && border !== "none" || borderColor !== undefined;
|
|
955
|
+
const borderWidth = props.borderWidth ?? v.borderWidth ?? (wantsBorder ? "default" : undefined);
|
|
950
956
|
const style = {};
|
|
951
957
|
if (padding)
|
|
952
958
|
style["--s-p"] = padding;
|
|
@@ -956,12 +962,16 @@ function Surface(props) {
|
|
|
956
962
|
style["--s-radius"] = radiusValue(radius);
|
|
957
963
|
if (border)
|
|
958
964
|
style["--s-border-color"] = borderColorValue(border);
|
|
965
|
+
if (borderColor)
|
|
966
|
+
style["--s-border-color"] = borderColor;
|
|
959
967
|
if (borderWidth)
|
|
960
968
|
style["--s-border-width"] = borderWidthValue(borderWidth);
|
|
961
969
|
if (shadow)
|
|
962
970
|
style["--s-shadow"] = shadowValue(shadow);
|
|
963
971
|
if (borderStyle)
|
|
964
972
|
style["--s-border-style"] = borderStyle;
|
|
973
|
+
if (pointerEvents)
|
|
974
|
+
style["--s-pe"] = pointerEvents;
|
|
965
975
|
if (width)
|
|
966
976
|
style["--s-w"] = width;
|
|
967
977
|
if (height)
|
|
@@ -996,7 +1006,7 @@ function Surface(props) {
|
|
|
996
1006
|
for (const key of Object.keys(props)) {
|
|
997
1007
|
const isData = key.startsWith("data-");
|
|
998
1008
|
const isAria = key.startsWith("aria-");
|
|
999
|
-
if (!isData && !isAria)
|
|
1009
|
+
if (!isData && !isAria && key !== "title")
|
|
1000
1010
|
continue;
|
|
1001
1011
|
if (key === "data-polly-surface")
|
|
1002
1012
|
continue;
|
|
@@ -1021,6 +1031,7 @@ function Surface(props) {
|
|
|
1021
1031
|
"aria-labelledby": props["aria-labelledby"],
|
|
1022
1032
|
"aria-describedby": props["aria-describedby"],
|
|
1023
1033
|
"data-polly-surface": variant,
|
|
1034
|
+
"data-polly-theme": scheme,
|
|
1024
1035
|
...passthrough
|
|
1025
1036
|
}, props.children);
|
|
1026
1037
|
}
|
|
@@ -1654,9 +1665,116 @@ function Host() {
|
|
|
1654
1665
|
}, undefined, true, undefined, this);
|
|
1655
1666
|
}
|
|
1656
1667
|
var ConfirmDialog = { Host, confirm };
|
|
1668
|
+
// src/polly-ui/FileInput.module.css
|
|
1669
|
+
var FileInput_module_default = {
|
|
1670
|
+
fileInput: "fileInput_esO1fA",
|
|
1671
|
+
native: "native_esO1fA",
|
|
1672
|
+
disabled: "disabled_esO1fA"
|
|
1673
|
+
};
|
|
1674
|
+
|
|
1675
|
+
// src/polly-ui/FileInput.tsx
|
|
1676
|
+
import { jsxDEV as jsxDEV14 } from "preact/jsx-dev-runtime";
|
|
1677
|
+
function FileInput(props) {
|
|
1678
|
+
const { onFiles, label = "Choose file", accept, multiple, disabled, className, id } = props;
|
|
1679
|
+
const handleChange = (e) => {
|
|
1680
|
+
const { files } = e.currentTarget;
|
|
1681
|
+
if (files && files.length > 0)
|
|
1682
|
+
onFiles(files);
|
|
1683
|
+
};
|
|
1684
|
+
const parts = [FileInput_module_default["fileInput"]];
|
|
1685
|
+
if (disabled)
|
|
1686
|
+
parts.push(FileInput_module_default["disabled"]);
|
|
1687
|
+
if (className)
|
|
1688
|
+
parts.push(className);
|
|
1689
|
+
return /* @__PURE__ */ jsxDEV14("label", {
|
|
1690
|
+
id,
|
|
1691
|
+
class: parts.filter(Boolean).join(" "),
|
|
1692
|
+
"data-polly-ui": true,
|
|
1693
|
+
"data-polly-file-input": true,
|
|
1694
|
+
children: [
|
|
1695
|
+
/* @__PURE__ */ jsxDEV14("input", {
|
|
1696
|
+
type: "file",
|
|
1697
|
+
class: FileInput_module_default["native"],
|
|
1698
|
+
accept,
|
|
1699
|
+
multiple,
|
|
1700
|
+
disabled,
|
|
1701
|
+
onChange: handleChange
|
|
1702
|
+
}, undefined, false, undefined, this),
|
|
1703
|
+
/* @__PURE__ */ jsxDEV14("span", {
|
|
1704
|
+
children: label
|
|
1705
|
+
}, undefined, false, undefined, this)
|
|
1706
|
+
]
|
|
1707
|
+
}, undefined, true, undefined, this);
|
|
1708
|
+
}
|
|
1709
|
+
// src/polly-ui/Html.tsx
|
|
1710
|
+
import { createElement as createElement4 } from "preact";
|
|
1711
|
+
function Html(props) {
|
|
1712
|
+
const { html, as = "div", className, id } = props;
|
|
1713
|
+
return createElement4(as, {
|
|
1714
|
+
...collectPassthrough(props),
|
|
1715
|
+
id,
|
|
1716
|
+
class: className,
|
|
1717
|
+
"data-polly-ui": true,
|
|
1718
|
+
"data-polly-html": true,
|
|
1719
|
+
dangerouslySetInnerHTML: { __html: html }
|
|
1720
|
+
});
|
|
1721
|
+
}
|
|
1722
|
+
// src/polly-ui/Link.module.css
|
|
1723
|
+
var Link_module_default = {
|
|
1724
|
+
link: "link__T-0-w",
|
|
1725
|
+
subtle: "subtle__T-0-w"
|
|
1726
|
+
};
|
|
1727
|
+
|
|
1728
|
+
// src/polly-ui/Link.tsx
|
|
1729
|
+
import { jsxDEV as jsxDEV15 } from "preact/jsx-dev-runtime";
|
|
1730
|
+
function Link(props) {
|
|
1731
|
+
const { children, href, external, download, subtle, className, id } = props;
|
|
1732
|
+
const parts = [Link_module_default["link"]];
|
|
1733
|
+
if (subtle)
|
|
1734
|
+
parts.push(Link_module_default["subtle"]);
|
|
1735
|
+
if (className)
|
|
1736
|
+
parts.push(className);
|
|
1737
|
+
return /* @__PURE__ */ jsxDEV15("a", {
|
|
1738
|
+
...collectPassthrough(props),
|
|
1739
|
+
id,
|
|
1740
|
+
class: parts.filter(Boolean).join(" "),
|
|
1741
|
+
href,
|
|
1742
|
+
target: external ? "_blank" : undefined,
|
|
1743
|
+
rel: external ? "noopener noreferrer" : undefined,
|
|
1744
|
+
download,
|
|
1745
|
+
"data-polly-ui": true,
|
|
1746
|
+
"data-polly-link": true,
|
|
1747
|
+
children
|
|
1748
|
+
}, undefined, false, undefined, this);
|
|
1749
|
+
}
|
|
1750
|
+
// src/polly-ui/Output.module.css
|
|
1751
|
+
var Output_module_default = {
|
|
1752
|
+
output: "output_wLrUbA",
|
|
1753
|
+
scroll: "scroll_wLrUbA"
|
|
1754
|
+
};
|
|
1755
|
+
|
|
1756
|
+
// src/polly-ui/Output.tsx
|
|
1757
|
+
import { jsxDEV as jsxDEV16 } from "preact/jsx-dev-runtime";
|
|
1758
|
+
function Output(props) {
|
|
1759
|
+
const { children, scroll, tabIndex, className, id } = props;
|
|
1760
|
+
const parts = [Output_module_default["output"]];
|
|
1761
|
+
if (scroll)
|
|
1762
|
+
parts.push(Output_module_default["scroll"]);
|
|
1763
|
+
if (className)
|
|
1764
|
+
parts.push(className);
|
|
1765
|
+
return /* @__PURE__ */ jsxDEV16("pre", {
|
|
1766
|
+
...collectPassthrough(props),
|
|
1767
|
+
id,
|
|
1768
|
+
class: parts.filter(Boolean).join(" "),
|
|
1769
|
+
tabIndex,
|
|
1770
|
+
"data-polly-ui": true,
|
|
1771
|
+
"data-polly-output": true,
|
|
1772
|
+
children
|
|
1773
|
+
}, undefined, false, undefined, this);
|
|
1774
|
+
}
|
|
1657
1775
|
// src/polly-ui/Select.tsx
|
|
1658
1776
|
import { useComputed, useSignal as useSignal2 } from "@preact/signals";
|
|
1659
|
-
import { jsxDEV as
|
|
1777
|
+
import { jsxDEV as jsxDEV17, Fragment as Fragment2 } from "preact/jsx-dev-runtime";
|
|
1660
1778
|
function formatSelected(options, selected) {
|
|
1661
1779
|
if (selected.size === 0)
|
|
1662
1780
|
return "";
|
|
@@ -1710,13 +1828,13 @@ function Select(props) {
|
|
|
1710
1828
|
if (wide)
|
|
1711
1829
|
triggerParts.push(Select_module_default["triggerWide"] ?? "");
|
|
1712
1830
|
const triggerClass = triggerParts.filter(Boolean).join(" ");
|
|
1713
|
-
const triggerContent = /* @__PURE__ */
|
|
1831
|
+
const triggerContent = /* @__PURE__ */ jsxDEV17(Fragment2, {
|
|
1714
1832
|
children: [
|
|
1715
|
-
/* @__PURE__ */
|
|
1833
|
+
/* @__PURE__ */ jsxDEV17("span", {
|
|
1716
1834
|
class: Select_module_default["triggerLabel"],
|
|
1717
1835
|
children: displayText.value
|
|
1718
1836
|
}, undefined, false, undefined, this),
|
|
1719
|
-
/* @__PURE__ */
|
|
1837
|
+
/* @__PURE__ */ jsxDEV17("span", {
|
|
1720
1838
|
class: Select_module_default["caret"],
|
|
1721
1839
|
"aria-hidden": "true"
|
|
1722
1840
|
}, undefined, false, undefined, this)
|
|
@@ -1725,36 +1843,36 @@ function Select(props) {
|
|
|
1725
1843
|
const parts = [Select_module_default["select"] ?? ""];
|
|
1726
1844
|
if (className)
|
|
1727
1845
|
parts.push(className);
|
|
1728
|
-
return /* @__PURE__ */
|
|
1846
|
+
return /* @__PURE__ */ jsxDEV17("div", {
|
|
1729
1847
|
id,
|
|
1730
1848
|
class: parts.filter(Boolean).join(" "),
|
|
1731
1849
|
"data-polly-ui": true,
|
|
1732
1850
|
"data-polly-select": true,
|
|
1733
1851
|
children: [
|
|
1734
|
-
label !== undefined && /* @__PURE__ */
|
|
1852
|
+
label !== undefined && /* @__PURE__ */ jsxDEV17("span", {
|
|
1735
1853
|
class: Select_module_default["label"],
|
|
1736
1854
|
children: label
|
|
1737
1855
|
}, undefined, false, undefined, this),
|
|
1738
|
-
/* @__PURE__ */
|
|
1856
|
+
/* @__PURE__ */ jsxDEV17(Dropdown, {
|
|
1739
1857
|
isOpen: isOpen2,
|
|
1740
1858
|
trigger: triggerContent,
|
|
1741
1859
|
triggerClassName: triggerClass,
|
|
1742
1860
|
triggerDisabled: disabled,
|
|
1743
1861
|
multiSelect,
|
|
1744
1862
|
children: [
|
|
1745
|
-
multiSelect && /* @__PURE__ */
|
|
1863
|
+
multiSelect && /* @__PURE__ */ jsxDEV17("div", {
|
|
1746
1864
|
class: Select_module_default["actions"],
|
|
1747
|
-
children: /* @__PURE__ */
|
|
1865
|
+
children: /* @__PURE__ */ jsxDEV17(Layout, {
|
|
1748
1866
|
columns: "1fr 1fr",
|
|
1749
1867
|
gap: "var(--polly-space-xs)",
|
|
1750
1868
|
children: [
|
|
1751
|
-
/* @__PURE__ */
|
|
1869
|
+
/* @__PURE__ */ jsxDEV17("button", {
|
|
1752
1870
|
type: "button",
|
|
1753
1871
|
class: Select_module_default["actionBtn"],
|
|
1754
1872
|
onClick: handleSelectAll,
|
|
1755
1873
|
children: "Select All"
|
|
1756
1874
|
}, undefined, false, undefined, this),
|
|
1757
|
-
/* @__PURE__ */
|
|
1875
|
+
/* @__PURE__ */ jsxDEV17("button", {
|
|
1758
1876
|
type: "button",
|
|
1759
1877
|
class: Select_module_default["actionBtn"],
|
|
1760
1878
|
onClick: handleClear,
|
|
@@ -1766,19 +1884,19 @@ function Select(props) {
|
|
|
1766
1884
|
options.map((opt) => {
|
|
1767
1885
|
const isSelected = selected.value.has(opt.value);
|
|
1768
1886
|
const optClass = isSelected ? `${Select_module_default["option"]} ${Select_module_default["optionSelected"]}` : Select_module_default["option"];
|
|
1769
|
-
return /* @__PURE__ */
|
|
1887
|
+
return /* @__PURE__ */ jsxDEV17("button", {
|
|
1770
1888
|
type: "button",
|
|
1771
1889
|
class: optClass,
|
|
1772
1890
|
onClick: () => handleOptionClick(opt.value),
|
|
1773
1891
|
children: [
|
|
1774
|
-
multiSelect && /* @__PURE__ */
|
|
1892
|
+
multiSelect && /* @__PURE__ */ jsxDEV17("input", {
|
|
1775
1893
|
type: "checkbox",
|
|
1776
1894
|
class: Select_module_default["optionCheck"],
|
|
1777
1895
|
checked: isSelected,
|
|
1778
1896
|
tabIndex: -1,
|
|
1779
1897
|
readOnly: true
|
|
1780
1898
|
}, undefined, false, undefined, this),
|
|
1781
|
-
/* @__PURE__ */
|
|
1899
|
+
/* @__PURE__ */ jsxDEV17("span", {
|
|
1782
1900
|
children: opt.label
|
|
1783
1901
|
}, undefined, false, undefined, this)
|
|
1784
1902
|
]
|
|
@@ -1798,7 +1916,7 @@ var Skeleton_module_default = {
|
|
|
1798
1916
|
};
|
|
1799
1917
|
|
|
1800
1918
|
// src/polly-ui/Skeleton.tsx
|
|
1801
|
-
import { jsxDEV as
|
|
1919
|
+
import { jsxDEV as jsxDEV18 } from "preact/jsx-dev-runtime";
|
|
1802
1920
|
function resolveSize(value) {
|
|
1803
1921
|
if (value === undefined)
|
|
1804
1922
|
return;
|
|
@@ -1831,7 +1949,7 @@ function Skeleton(props) {
|
|
|
1831
1949
|
parts.push(vClass);
|
|
1832
1950
|
if (className)
|
|
1833
1951
|
parts.push(className);
|
|
1834
|
-
return /* @__PURE__ */
|
|
1952
|
+
return /* @__PURE__ */ jsxDEV18("span", {
|
|
1835
1953
|
class: parts.join(" "),
|
|
1836
1954
|
style,
|
|
1837
1955
|
"data-polly-ui": true,
|
|
@@ -1847,26 +1965,26 @@ var Tabs_module_default = {
|
|
|
1847
1965
|
};
|
|
1848
1966
|
|
|
1849
1967
|
// src/polly-ui/Tabs.tsx
|
|
1850
|
-
import { jsxDEV as
|
|
1968
|
+
import { jsxDEV as jsxDEV19 } from "preact/jsx-dev-runtime";
|
|
1851
1969
|
function Tabs(props) {
|
|
1852
1970
|
const { tabs, activeTab, action, className, id } = props;
|
|
1853
1971
|
const parts = [Tabs_module_default["tabs"] ?? ""];
|
|
1854
1972
|
if (className)
|
|
1855
1973
|
parts.push(className);
|
|
1856
|
-
return /* @__PURE__ */
|
|
1974
|
+
return /* @__PURE__ */ jsxDEV19("nav", {
|
|
1857
1975
|
id,
|
|
1858
1976
|
class: parts.filter(Boolean).join(" "),
|
|
1859
1977
|
"aria-label": props["aria-label"],
|
|
1860
1978
|
"data-polly-ui": true,
|
|
1861
1979
|
"data-polly-tabs": true,
|
|
1862
|
-
children: /* @__PURE__ */
|
|
1980
|
+
children: /* @__PURE__ */ jsxDEV19(Layout, {
|
|
1863
1981
|
columns: `repeat(${tabs.length}, auto)`,
|
|
1864
1982
|
gap: "0",
|
|
1865
1983
|
alignItems: "end",
|
|
1866
1984
|
children: tabs.map((tab) => {
|
|
1867
1985
|
const isActive = activeTab === tab.id;
|
|
1868
1986
|
const tabClass = isActive ? `${Tabs_module_default["tab"]} ${Tabs_module_default["active"]}` : Tabs_module_default["tab"];
|
|
1869
|
-
return /* @__PURE__ */
|
|
1987
|
+
return /* @__PURE__ */ jsxDEV19("button", {
|
|
1870
1988
|
type: "button",
|
|
1871
1989
|
class: tabClass,
|
|
1872
1990
|
disabled: tab.disabled,
|
|
@@ -1880,7 +1998,7 @@ function Tabs(props) {
|
|
|
1880
1998
|
}, undefined, false, undefined, this);
|
|
1881
1999
|
}
|
|
1882
2000
|
// src/polly-ui/Text.tsx
|
|
1883
|
-
import { createElement as
|
|
2001
|
+
import { createElement as createElement5 } from "preact";
|
|
1884
2002
|
|
|
1885
2003
|
// src/polly-ui/Text.module.css
|
|
1886
2004
|
var Text_module_default = {
|
|
@@ -1890,6 +2008,7 @@ var Text_module_default = {
|
|
|
1890
2008
|
warning: "warning_75HKdQ",
|
|
1891
2009
|
success: "success_75HKdQ",
|
|
1892
2010
|
italic: "italic_75HKdQ",
|
|
2011
|
+
strikethrough: "strikethrough_75HKdQ",
|
|
1893
2012
|
tight: "tight_75HKdQ",
|
|
1894
2013
|
base: "base_75HKdQ",
|
|
1895
2014
|
loose: "loose_75HKdQ",
|
|
@@ -1912,6 +2031,7 @@ function Text(props) {
|
|
|
1912
2031
|
size,
|
|
1913
2032
|
weight,
|
|
1914
2033
|
italic,
|
|
2034
|
+
strikethrough,
|
|
1915
2035
|
leading,
|
|
1916
2036
|
className,
|
|
1917
2037
|
id
|
|
@@ -1925,11 +2045,13 @@ function Text(props) {
|
|
|
1925
2045
|
parts.push(Text_module_default[weight]);
|
|
1926
2046
|
if (italic)
|
|
1927
2047
|
parts.push(Text_module_default["italic"]);
|
|
2048
|
+
if (strikethrough)
|
|
2049
|
+
parts.push(Text_module_default["strikethrough"]);
|
|
1928
2050
|
if (leading)
|
|
1929
2051
|
parts.push(Text_module_default[leading]);
|
|
1930
2052
|
if (className)
|
|
1931
2053
|
parts.push(className);
|
|
1932
|
-
return
|
|
2054
|
+
return createElement5(as, {
|
|
1933
2055
|
...collectPassthrough(props),
|
|
1934
2056
|
id,
|
|
1935
2057
|
class: parts.filter(Boolean).join(" "),
|
|
@@ -1963,7 +2085,7 @@ var TextInput_module_default = {
|
|
|
1963
2085
|
};
|
|
1964
2086
|
|
|
1965
2087
|
// src/polly-ui/TextInput.tsx
|
|
1966
|
-
import { jsxDEV as
|
|
2088
|
+
import { jsxDEV as jsxDEV20 } from "preact/jsx-dev-runtime";
|
|
1967
2089
|
function isSignal2(v) {
|
|
1968
2090
|
return typeof v === "object" && v !== null && "value" in v && "peek" in v;
|
|
1969
2091
|
}
|
|
@@ -1984,7 +2106,7 @@ function TextInput(props) {
|
|
|
1984
2106
|
const defaultValue = controlled ? undefined : props.value ?? "";
|
|
1985
2107
|
const className = props.className ? `${TextInput_module_default["input"]} ${props.className}` : TextInput_module_default["input"];
|
|
1986
2108
|
if (variant === "multi") {
|
|
1987
|
-
return /* @__PURE__ */
|
|
2109
|
+
return /* @__PURE__ */ jsxDEV20("textarea", {
|
|
1988
2110
|
...a11y,
|
|
1989
2111
|
class: className,
|
|
1990
2112
|
"data-polly-input-variant": "multi",
|
|
@@ -1999,7 +2121,7 @@ function TextInput(props) {
|
|
|
1999
2121
|
}
|
|
2000
2122
|
}, undefined, false, undefined, this);
|
|
2001
2123
|
}
|
|
2002
|
-
return /* @__PURE__ */
|
|
2124
|
+
return /* @__PURE__ */ jsxDEV20("input", {
|
|
2003
2125
|
...a11y,
|
|
2004
2126
|
type: "text",
|
|
2005
2127
|
class: className,
|
|
@@ -2058,7 +2180,7 @@ var Toast_module_default = {
|
|
|
2058
2180
|
};
|
|
2059
2181
|
|
|
2060
2182
|
// src/polly-ui/Toast.tsx
|
|
2061
|
-
import { jsxDEV as
|
|
2183
|
+
import { jsxDEV as jsxDEV21 } from "preact/jsx-dev-runtime";
|
|
2062
2184
|
function Viewport(props) {
|
|
2063
2185
|
const autoDismissMs = props.autoDismissMs ?? 5000;
|
|
2064
2186
|
const [portalNode, setPortalNode] = useState3(null);
|
|
@@ -2080,13 +2202,13 @@ function Viewport(props) {
|
|
|
2080
2202
|
}, [paused, entries, autoDismissMs]);
|
|
2081
2203
|
if (!portalNode)
|
|
2082
2204
|
return null;
|
|
2083
|
-
const content = /* @__PURE__ */
|
|
2205
|
+
const content = /* @__PURE__ */ jsxDEV21("div", {
|
|
2084
2206
|
class: `${Toast_module_default["viewport"]} ${props.className ?? ""}`.trim(),
|
|
2085
2207
|
"data-polly-ui": true,
|
|
2086
2208
|
"data-polly-toast-viewport": true,
|
|
2087
2209
|
onMouseEnter: () => setPaused(true),
|
|
2088
2210
|
onMouseLeave: () => setPaused(false),
|
|
2089
|
-
children: entries.map((entry) => /* @__PURE__ */
|
|
2211
|
+
children: entries.map((entry) => /* @__PURE__ */ jsxDEV21(ToastItem, {
|
|
2090
2212
|
entry
|
|
2091
2213
|
}, entry.id, false, undefined, this))
|
|
2092
2214
|
}, undefined, false, undefined, this);
|
|
@@ -2094,7 +2216,7 @@ function Viewport(props) {
|
|
|
2094
2216
|
}
|
|
2095
2217
|
function ToastItem({ entry }) {
|
|
2096
2218
|
const liveness = entry.severity === "error" ? "assertive" : "polite";
|
|
2097
|
-
return /* @__PURE__ */
|
|
2219
|
+
return /* @__PURE__ */ jsxDEV21(Surface, {
|
|
2098
2220
|
variant: "raised",
|
|
2099
2221
|
padding: "var(--polly-space-md) var(--polly-space-lg)",
|
|
2100
2222
|
className: Toast_module_default["item"],
|
|
@@ -2104,11 +2226,11 @@ function ToastItem({ entry }) {
|
|
|
2104
2226
|
role: entry.severity === "error" ? "alert" : "status",
|
|
2105
2227
|
"aria-live": liveness,
|
|
2106
2228
|
children: [
|
|
2107
|
-
/* @__PURE__ */
|
|
2229
|
+
/* @__PURE__ */ jsxDEV21("span", {
|
|
2108
2230
|
class: Toast_module_default["message"],
|
|
2109
2231
|
children: entry.message
|
|
2110
2232
|
}, undefined, false, undefined, this),
|
|
2111
|
-
/* @__PURE__ */
|
|
2233
|
+
/* @__PURE__ */ jsxDEV21("button", {
|
|
2112
2234
|
type: "button",
|
|
2113
2235
|
class: Toast_module_default["close"],
|
|
2114
2236
|
"data-polly-ui": true,
|
|
@@ -2135,7 +2257,7 @@ var Toggle_module_default = {
|
|
|
2135
2257
|
};
|
|
2136
2258
|
|
|
2137
2259
|
// src/polly-ui/Toggle.tsx
|
|
2138
|
-
import { jsxDEV as
|
|
2260
|
+
import { jsxDEV as jsxDEV22 } from "preact/jsx-dev-runtime";
|
|
2139
2261
|
function Toggle(props) {
|
|
2140
2262
|
const { checked = false, disabled = false, label, name, className, id } = props;
|
|
2141
2263
|
const parts = [Toggle_module_default["toggle"]];
|
|
@@ -2143,12 +2265,12 @@ function Toggle(props) {
|
|
|
2143
2265
|
parts.push(Toggle_module_default["disabled"]);
|
|
2144
2266
|
if (className)
|
|
2145
2267
|
parts.push(className);
|
|
2146
|
-
return /* @__PURE__ */
|
|
2268
|
+
return /* @__PURE__ */ jsxDEV22("label", {
|
|
2147
2269
|
class: parts.join(" "),
|
|
2148
2270
|
"data-polly-ui": true,
|
|
2149
2271
|
"data-polly-toggle": true,
|
|
2150
2272
|
children: [
|
|
2151
|
-
/* @__PURE__ */
|
|
2273
|
+
/* @__PURE__ */ jsxDEV22("input", {
|
|
2152
2274
|
id,
|
|
2153
2275
|
type: "checkbox",
|
|
2154
2276
|
role: "switch",
|
|
@@ -2158,13 +2280,13 @@ function Toggle(props) {
|
|
|
2158
2280
|
checked,
|
|
2159
2281
|
disabled
|
|
2160
2282
|
}, undefined, false, undefined, this),
|
|
2161
|
-
/* @__PURE__ */
|
|
2283
|
+
/* @__PURE__ */ jsxDEV22("span", {
|
|
2162
2284
|
class: checked ? `${Toggle_module_default["track"]} ${Toggle_module_default["trackChecked"]}` : Toggle_module_default["track"],
|
|
2163
|
-
children: /* @__PURE__ */
|
|
2285
|
+
children: /* @__PURE__ */ jsxDEV22("span", {
|
|
2164
2286
|
class: checked ? `${Toggle_module_default["thumb"]} ${Toggle_module_default["thumbChecked"]}` : Toggle_module_default["thumb"]
|
|
2165
2287
|
}, undefined, false, undefined, this)
|
|
2166
2288
|
}, undefined, false, undefined, this),
|
|
2167
|
-
label !== undefined && /* @__PURE__ */
|
|
2289
|
+
label !== undefined && /* @__PURE__ */ jsxDEV22("span", {
|
|
2168
2290
|
class: Toggle_module_default["label"],
|
|
2169
2291
|
children: label
|
|
2170
2292
|
}, undefined, false, undefined, this)
|
|
@@ -2183,8 +2305,12 @@ export {
|
|
|
2183
2305
|
Skeleton,
|
|
2184
2306
|
Select,
|
|
2185
2307
|
OverlayRoot,
|
|
2308
|
+
Output,
|
|
2186
2309
|
Modal,
|
|
2310
|
+
Link,
|
|
2187
2311
|
Layout,
|
|
2312
|
+
Html,
|
|
2313
|
+
FileInput,
|
|
2188
2314
|
Dropdown,
|
|
2189
2315
|
ConfirmDialog,
|
|
2190
2316
|
Collapsible,
|
|
@@ -2199,4 +2325,4 @@ export {
|
|
|
2199
2325
|
ActionForm
|
|
2200
2326
|
};
|
|
2201
2327
|
|
|
2202
|
-
//# debugId=
|
|
2328
|
+
//# debugId=5574312029A6A13F64756E2164756E21
|