@oxide/design-system 1.7.7--canary.87d60df.0 → 1.7.7--canary.c74e439.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.
- package/components/dist/index.d.ts +5 -5
- package/components/dist/index.js +161 -105
- package/components/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
2
|
import * as _oxide_react_asciidoc from '@oxide/react-asciidoc';
|
|
5
3
|
import { DocumentSection, Block, DocumentBlock } from '@oxide/react-asciidoc';
|
|
6
4
|
import * as _asciidoctor_core from '@asciidoctor/core';
|
|
7
5
|
import { Registry, Document, Html5Converter, Block as Block$1 } from '@asciidoctor/core';
|
|
6
|
+
import * as react from 'react';
|
|
7
|
+
import { ReactNode } from 'react';
|
|
8
8
|
import { TabsProps, TabsTriggerProps, TabsListProps, TabsContentProps } from '@radix-ui/react-tabs';
|
|
9
9
|
import { SetRequired } from 'type-fest';
|
|
10
10
|
|
|
@@ -44,9 +44,9 @@ declare const AsciiDocBlocks: {
|
|
|
44
44
|
Section: ({ node }: {
|
|
45
45
|
node: _oxide_react_asciidoc.SectionBlock;
|
|
46
46
|
}) => react_jsx_runtime.JSX.Element;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
47
|
+
Listing: ({ node }: {
|
|
48
|
+
node: _oxide_react_asciidoc.LiteralBlock;
|
|
49
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
50
50
|
MinimalDocument: ({ document }: {
|
|
51
51
|
document: DocumentBlock;
|
|
52
52
|
}) => react_jsx_runtime.JSX.Element;
|
package/components/dist/index.js
CHANGED
|
@@ -177,6 +177,10 @@ var Warning12 = ({ className }) => /* @__PURE__ */ jsx(
|
|
|
177
177
|
);
|
|
178
178
|
var Admonition_default = Admonition;
|
|
179
179
|
|
|
180
|
+
// components/src/asciidoc/Listing.tsx
|
|
181
|
+
import { Title as Title2, useConverterContext } from "@oxide/react-asciidoc";
|
|
182
|
+
import cn2 from "classnames";
|
|
183
|
+
|
|
180
184
|
// node_modules/stylis/src/Enum.js
|
|
181
185
|
var COMMENT = "comm";
|
|
182
186
|
var RULESET = "rule";
|
|
@@ -1704,9 +1708,61 @@ var Mermaid = memo(function Mermaid2({ content }) {
|
|
|
1704
1708
|
});
|
|
1705
1709
|
var Mermaid_default = Mermaid;
|
|
1706
1710
|
|
|
1707
|
-
//
|
|
1711
|
+
// components/src/asciidoc/Listing.tsx
|
|
1708
1712
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1709
|
-
var
|
|
1713
|
+
var Listing = ({ node: node2 }) => {
|
|
1714
|
+
const { document: document2 } = useConverterContext();
|
|
1715
|
+
const docAttrs = document2.attributes || {};
|
|
1716
|
+
const nowrap = node2.attributes.nowrap || docAttrs["prewrap"] === void 0;
|
|
1717
|
+
if (node2.style === "source") {
|
|
1718
|
+
const lang = node2.language;
|
|
1719
|
+
return /* @__PURE__ */ jsxs3(
|
|
1720
|
+
"div",
|
|
1721
|
+
{
|
|
1722
|
+
className: "listingblock",
|
|
1723
|
+
...node2.lineNumber ? { "data-lineno": node2.lineNumber } : {},
|
|
1724
|
+
children: [
|
|
1725
|
+
/* @__PURE__ */ jsx3(Title2, { text: node2.title }),
|
|
1726
|
+
/* @__PURE__ */ jsx3("div", { className: "content", children: /* @__PURE__ */ jsx3("pre", { className: cn2("highlight", nowrap ? " nowrap" : ""), children: lang && lang === "mermaid" ? /* @__PURE__ */ jsx3(Mermaid_default, { content: node2.content || "" }) : /* @__PURE__ */ jsx3(
|
|
1727
|
+
"code",
|
|
1728
|
+
{
|
|
1729
|
+
className: lang && `language-${lang}`,
|
|
1730
|
+
"data-lang": lang || void 0,
|
|
1731
|
+
dangerouslySetInnerHTML: {
|
|
1732
|
+
__html: node2.content || ""
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1735
|
+
) }) })
|
|
1736
|
+
]
|
|
1737
|
+
}
|
|
1738
|
+
);
|
|
1739
|
+
} else {
|
|
1740
|
+
return /* @__PURE__ */ jsxs3(
|
|
1741
|
+
"div",
|
|
1742
|
+
{
|
|
1743
|
+
className: "listingblock",
|
|
1744
|
+
...node2.lineNumber ? { "data-lineno": node2.lineNumber } : {},
|
|
1745
|
+
children: [
|
|
1746
|
+
/* @__PURE__ */ jsx3(Title2, { text: node2.title }),
|
|
1747
|
+
/* @__PURE__ */ jsx3("div", { className: "content", children: /* @__PURE__ */ jsx3(
|
|
1748
|
+
"pre",
|
|
1749
|
+
{
|
|
1750
|
+
className: cn2("highlight !block", nowrap ? "nowrap" : ""),
|
|
1751
|
+
dangerouslySetInnerHTML: {
|
|
1752
|
+
__html: node2.content || ""
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
) })
|
|
1756
|
+
]
|
|
1757
|
+
}
|
|
1758
|
+
);
|
|
1759
|
+
}
|
|
1760
|
+
};
|
|
1761
|
+
var Listing_default = Listing;
|
|
1762
|
+
|
|
1763
|
+
// icons/react/Link16Icon.tsx
|
|
1764
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1765
|
+
var Link16Icon = ({ title, titleId, ...props }) => /* @__PURE__ */ jsxs4(
|
|
1710
1766
|
"svg",
|
|
1711
1767
|
{
|
|
1712
1768
|
width: 16,
|
|
@@ -1717,10 +1773,10 @@ var Link16Icon = ({ title, titleId, ...props }) => /* @__PURE__ */ jsxs3(
|
|
|
1717
1773
|
"aria-labelledby": titleId,
|
|
1718
1774
|
...props,
|
|
1719
1775
|
children: [
|
|
1720
|
-
title ? /* @__PURE__ */
|
|
1721
|
-
/* @__PURE__ */
|
|
1722
|
-
/* @__PURE__ */
|
|
1723
|
-
/* @__PURE__ */
|
|
1776
|
+
title ? /* @__PURE__ */ jsx4("title", { id: titleId, children: title }) : null,
|
|
1777
|
+
/* @__PURE__ */ jsxs4("g", { fill: "currentColor", children: [
|
|
1778
|
+
/* @__PURE__ */ jsx4("path", { d: "m6.586 12.243 1.59-1.591a.75.75 0 0 1 1.061 0l.354.353a.75.75 0 0 1 0 1.06L8 13.658A4 4 0 0 1 2.343 8l1.591-1.591a.75.75 0 0 1 1.06 0l.354.354a.75.75 0 0 1 0 1.06l-1.59 1.591a2 2 0 1 0 2.828 2.829ZM12.066 9.591a.75.75 0 0 1-1.06 0l-.354-.354a.75.75 0 0 1 0-1.06l1.59-1.591a2 2 0 1 0-2.828-2.829l-1.59 1.591a.75.75 0 0 1-1.061 0l-.354-.353a.75.75 0 0 1 0-1.06L8 2.342A4 4 0 0 1 13.657 8l-1.591 1.591Z" }),
|
|
1779
|
+
/* @__PURE__ */ jsx4("path", { d: "M9.945 5.702a.75.75 0 0 0-1.061 0L5.702 8.884a.75.75 0 0 0 0 1.06l.353.354a.75.75 0 0 0 1.061 0l3.182-3.182a.75.75 0 0 0 0-1.06l-.353-.354Z" })
|
|
1724
1780
|
] })
|
|
1725
1781
|
]
|
|
1726
1782
|
}
|
|
@@ -1728,12 +1784,12 @@ var Link16Icon = ({ title, titleId, ...props }) => /* @__PURE__ */ jsxs3(
|
|
|
1728
1784
|
var Link16Icon_default = Link16Icon;
|
|
1729
1785
|
|
|
1730
1786
|
// icons/react/Checkmark12Icon.tsx
|
|
1731
|
-
import { jsx as
|
|
1787
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1732
1788
|
var Checkmark12Icon = ({
|
|
1733
1789
|
title,
|
|
1734
1790
|
titleId,
|
|
1735
1791
|
...props
|
|
1736
|
-
}) => /* @__PURE__ */
|
|
1792
|
+
}) => /* @__PURE__ */ jsxs5(
|
|
1737
1793
|
"svg",
|
|
1738
1794
|
{
|
|
1739
1795
|
width: 12,
|
|
@@ -1744,8 +1800,8 @@ var Checkmark12Icon = ({
|
|
|
1744
1800
|
"aria-labelledby": titleId,
|
|
1745
1801
|
...props,
|
|
1746
1802
|
children: [
|
|
1747
|
-
title ? /* @__PURE__ */
|
|
1748
|
-
/* @__PURE__ */
|
|
1803
|
+
title ? /* @__PURE__ */ jsx5("title", { id: titleId, children: title }) : null,
|
|
1804
|
+
/* @__PURE__ */ jsx5(
|
|
1749
1805
|
"path",
|
|
1750
1806
|
{
|
|
1751
1807
|
fillRule: "evenodd",
|
|
@@ -1760,12 +1816,12 @@ var Checkmark12Icon = ({
|
|
|
1760
1816
|
var Checkmark12Icon_default = Checkmark12Icon;
|
|
1761
1817
|
|
|
1762
1818
|
// icons/react/DirectionRightIcon.tsx
|
|
1763
|
-
import { jsx as
|
|
1819
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1764
1820
|
var DirectionRightIcon = ({
|
|
1765
1821
|
title,
|
|
1766
1822
|
titleId,
|
|
1767
1823
|
...props
|
|
1768
|
-
}) => /* @__PURE__ */
|
|
1824
|
+
}) => /* @__PURE__ */ jsxs6(
|
|
1769
1825
|
"svg",
|
|
1770
1826
|
{
|
|
1771
1827
|
width: 12,
|
|
@@ -1776,8 +1832,8 @@ var DirectionRightIcon = ({
|
|
|
1776
1832
|
"aria-labelledby": titleId,
|
|
1777
1833
|
...props,
|
|
1778
1834
|
children: [
|
|
1779
|
-
title ? /* @__PURE__ */
|
|
1780
|
-
/* @__PURE__ */
|
|
1835
|
+
title ? /* @__PURE__ */ jsx6("title", { id: titleId, children: title }) : null,
|
|
1836
|
+
/* @__PURE__ */ jsx6(
|
|
1781
1837
|
"path",
|
|
1782
1838
|
{
|
|
1783
1839
|
d: "M8.807 6.597a.667.667 0 0 0 0-1.194l-5.842-2.92A.667.667 0 0 0 2 3.079v5.842c0 .496.522.818.965.596l5.842-2.92Z",
|
|
@@ -1790,12 +1846,12 @@ var DirectionRightIcon = ({
|
|
|
1790
1846
|
var DirectionRightIcon_default = DirectionRightIcon;
|
|
1791
1847
|
|
|
1792
1848
|
// icons/react/SelectArrows6Icon.tsx
|
|
1793
|
-
import { jsx as
|
|
1849
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1794
1850
|
var SelectArrows6Icon = ({
|
|
1795
1851
|
title,
|
|
1796
1852
|
titleId,
|
|
1797
1853
|
...props
|
|
1798
|
-
}) => /* @__PURE__ */
|
|
1854
|
+
}) => /* @__PURE__ */ jsxs7(
|
|
1799
1855
|
"svg",
|
|
1800
1856
|
{
|
|
1801
1857
|
width: 6,
|
|
@@ -1806,8 +1862,8 @@ var SelectArrows6Icon = ({
|
|
|
1806
1862
|
"aria-labelledby": titleId,
|
|
1807
1863
|
...props,
|
|
1808
1864
|
children: [
|
|
1809
|
-
title ? /* @__PURE__ */
|
|
1810
|
-
/* @__PURE__ */
|
|
1865
|
+
title ? /* @__PURE__ */ jsx7("title", { id: titleId, children: title }) : null,
|
|
1866
|
+
/* @__PURE__ */ jsx7(
|
|
1811
1867
|
"path",
|
|
1812
1868
|
{
|
|
1813
1869
|
fillRule: "evenodd",
|
|
@@ -1823,31 +1879,31 @@ var SelectArrows6Icon_default = SelectArrows6Icon;
|
|
|
1823
1879
|
|
|
1824
1880
|
// components/src/asciidoc/Section.tsx
|
|
1825
1881
|
import { Content as Content2, parse as parse4 } from "@oxide/react-asciidoc";
|
|
1826
|
-
import
|
|
1882
|
+
import cn3 from "classnames";
|
|
1827
1883
|
import { createElement as createElement2 } from "react";
|
|
1828
|
-
import { Fragment as Fragment2, jsx as
|
|
1884
|
+
import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1829
1885
|
var stripAnchors = (str) => str.replace(/<a[^>]*>(.*?)<\/a>/gi, "$1");
|
|
1830
1886
|
var Section = ({ node: node2 }) => {
|
|
1831
1887
|
const level = node2.level;
|
|
1832
1888
|
let title = "";
|
|
1833
1889
|
let sectNum = node2.num;
|
|
1834
1890
|
sectNum = sectNum === "." ? "" : sectNum;
|
|
1835
|
-
title = /* @__PURE__ */
|
|
1836
|
-
/* @__PURE__ */
|
|
1837
|
-
/* @__PURE__ */
|
|
1891
|
+
title = /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
1892
|
+
/* @__PURE__ */ jsx8("span", { className: "anchor", id: node2.id || "", "aria-hidden": "true" }),
|
|
1893
|
+
/* @__PURE__ */ jsxs8("a", { className: "link group", href: `#${node2.id}`, children: [
|
|
1838
1894
|
parse4(stripAnchors(node2.title)),
|
|
1839
|
-
/* @__PURE__ */
|
|
1895
|
+
/* @__PURE__ */ jsx8(Link16Icon_default, { className: "ml-2 hidden text-accent-secondary group-hover:inline-block" })
|
|
1840
1896
|
] })
|
|
1841
1897
|
] });
|
|
1842
1898
|
if (level === 0) {
|
|
1843
|
-
return /* @__PURE__ */
|
|
1844
|
-
/* @__PURE__ */
|
|
1845
|
-
/* @__PURE__ */
|
|
1899
|
+
return /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
1900
|
+
/* @__PURE__ */ jsx8("h1", { className: cn3("sect0", node2.role), "data-sectnum": sectNum, children: title }),
|
|
1901
|
+
/* @__PURE__ */ jsx8(Content2, { blocks: node2.blocks })
|
|
1846
1902
|
] });
|
|
1847
1903
|
} else {
|
|
1848
|
-
return /* @__PURE__ */
|
|
1904
|
+
return /* @__PURE__ */ jsxs8("div", { className: cn3(`sect${level}`, node2.role), children: [
|
|
1849
1905
|
createElement2(`h${level + 1}`, { "data-sectnum": sectNum }, title),
|
|
1850
|
-
/* @__PURE__ */
|
|
1906
|
+
/* @__PURE__ */ jsx8("div", { className: "sectionbody", children: /* @__PURE__ */ jsx8(Content2, { blocks: node2.blocks }) })
|
|
1851
1907
|
] });
|
|
1852
1908
|
}
|
|
1853
1909
|
};
|
|
@@ -1855,16 +1911,16 @@ var Section_default = Section;
|
|
|
1855
1911
|
|
|
1856
1912
|
// components/src/asciidoc/Table.tsx
|
|
1857
1913
|
import { Table as InnerTable } from "@oxide/react-asciidoc";
|
|
1858
|
-
import { jsx as
|
|
1859
|
-
var Table = ({ node: node2 }) => /* @__PURE__ */
|
|
1914
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1915
|
+
var Table = ({ node: node2 }) => /* @__PURE__ */ jsx9("div", { className: "table-wrapper", children: /* @__PURE__ */ jsx9(InnerTable, { node: node2 }) });
|
|
1860
1916
|
var Table_default = Table;
|
|
1861
1917
|
|
|
1862
1918
|
// components/src/asciidoc/TableOfContents.tsx
|
|
1863
1919
|
import * as Accordion from "@radix-ui/react-accordion";
|
|
1864
1920
|
import { Link } from "@remix-run/react";
|
|
1865
|
-
import
|
|
1921
|
+
import cn4 from "classnames";
|
|
1866
1922
|
import { Fragment as Fragment3, useCallback, useEffect, useMemo, useRef, useState as useState2 } from "react";
|
|
1867
|
-
import { jsx as
|
|
1923
|
+
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1868
1924
|
function useIntersectionObserver(elements, callback, options) {
|
|
1869
1925
|
const [observer, setObserver] = useState2(null);
|
|
1870
1926
|
useEffect(() => {
|
|
@@ -1993,7 +2049,7 @@ function useActiveSectionTracking(initialSections, onSectionChange, debug = fals
|
|
|
1993
2049
|
return "0px";
|
|
1994
2050
|
}
|
|
1995
2051
|
});
|
|
1996
|
-
debugNode = /* @__PURE__ */
|
|
2052
|
+
debugNode = /* @__PURE__ */ jsx10(
|
|
1997
2053
|
"div",
|
|
1998
2054
|
{
|
|
1999
2055
|
style: {
|
|
@@ -2020,24 +2076,24 @@ var DesktopOutline = ({
|
|
|
2020
2076
|
activeItem
|
|
2021
2077
|
}) => {
|
|
2022
2078
|
const renderToc = (sections) => {
|
|
2023
|
-
return sections.map((item) => /* @__PURE__ */
|
|
2024
|
-
/* @__PURE__ */
|
|
2079
|
+
return sections.map((item) => /* @__PURE__ */ jsxs9(Fragment3, { children: [
|
|
2080
|
+
/* @__PURE__ */ jsx10(
|
|
2025
2081
|
"li",
|
|
2026
2082
|
{
|
|
2027
2083
|
"data-level": item.level,
|
|
2028
|
-
className:
|
|
2029
|
-
children: /* @__PURE__ */
|
|
2084
|
+
className: cn4("mb-0 list-none text-sans-sm", item.level > 2 && "hidden"),
|
|
2085
|
+
children: /* @__PURE__ */ jsx10(
|
|
2030
2086
|
Link,
|
|
2031
2087
|
{
|
|
2032
2088
|
to: `#${item.id}`,
|
|
2033
|
-
className:
|
|
2089
|
+
className: cn4(
|
|
2034
2090
|
"block border-l py-[4px] pr-4",
|
|
2035
2091
|
activeItem === item.id ? "active text-accent-secondary border-accent-secondary hover:text-accent" : "text-tertiary border-secondary hover:text-secondary"
|
|
2036
2092
|
),
|
|
2037
2093
|
style: {
|
|
2038
2094
|
paddingLeft: `${0.5 + item.level * 0.5}rem`
|
|
2039
2095
|
},
|
|
2040
|
-
children: /* @__PURE__ */
|
|
2096
|
+
children: /* @__PURE__ */ jsx10("span", { dangerouslySetInnerHTML: { __html: item.title } })
|
|
2041
2097
|
}
|
|
2042
2098
|
)
|
|
2043
2099
|
}
|
|
@@ -2046,7 +2102,7 @@ var DesktopOutline = ({
|
|
|
2046
2102
|
] }, item.id));
|
|
2047
2103
|
};
|
|
2048
2104
|
if (toc && toc.length > 0) {
|
|
2049
|
-
return /* @__PURE__ */
|
|
2105
|
+
return /* @__PURE__ */ jsx10("ul", { className: "toc", children: renderToc(toc) });
|
|
2050
2106
|
}
|
|
2051
2107
|
return null;
|
|
2052
2108
|
};
|
|
@@ -2056,27 +2112,27 @@ var SmallScreenOutline = ({
|
|
|
2056
2112
|
title
|
|
2057
2113
|
}) => {
|
|
2058
2114
|
const renderToc = (sections) => {
|
|
2059
|
-
return sections.map((item) => /* @__PURE__ */
|
|
2060
|
-
/* @__PURE__ */
|
|
2115
|
+
return sections.map((item) => /* @__PURE__ */ jsxs9(Fragment3, { children: [
|
|
2116
|
+
/* @__PURE__ */ jsx10(
|
|
2061
2117
|
"li",
|
|
2062
2118
|
{
|
|
2063
2119
|
"data-level": item.level,
|
|
2064
|
-
className:
|
|
2120
|
+
className: cn4(
|
|
2065
2121
|
"AccordionContent hydrated list-none text-sans-sm",
|
|
2066
2122
|
item.level > 2 && "hidden"
|
|
2067
2123
|
),
|
|
2068
|
-
children: /* @__PURE__ */
|
|
2124
|
+
children: /* @__PURE__ */ jsx10(
|
|
2069
2125
|
Link,
|
|
2070
2126
|
{
|
|
2071
2127
|
to: `#${item.id}`,
|
|
2072
|
-
className:
|
|
2128
|
+
className: cn4(
|
|
2073
2129
|
"block border-l py-[4px]",
|
|
2074
2130
|
activeItem === item.id ? "active text-accent-secondary border-accent-secondary hover:text-accent" : "text-tertiary border-secondary hover:text-secondary"
|
|
2075
2131
|
),
|
|
2076
2132
|
style: {
|
|
2077
2133
|
paddingLeft: `${0.5 + item.level * 0.5}rem`
|
|
2078
2134
|
},
|
|
2079
|
-
children: /* @__PURE__ */
|
|
2135
|
+
children: /* @__PURE__ */ jsx10("span", { dangerouslySetInnerHTML: { __html: item.title } })
|
|
2080
2136
|
}
|
|
2081
2137
|
)
|
|
2082
2138
|
}
|
|
@@ -2085,19 +2141,19 @@ var SmallScreenOutline = ({
|
|
|
2085
2141
|
] }, item.id));
|
|
2086
2142
|
};
|
|
2087
2143
|
if (toc && toc.length > 0) {
|
|
2088
|
-
return /* @__PURE__ */
|
|
2144
|
+
return /* @__PURE__ */ jsx10(
|
|
2089
2145
|
Accordion.Root,
|
|
2090
2146
|
{
|
|
2091
2147
|
type: "single",
|
|
2092
2148
|
className: "sticky top-[calc(var(--header-height)-1px)] z-10 -mt-px mb-10 block max-h-[calc(100vh-var(--header-height)+1px)] w-full overflow-y-scroll border-b border-t bg-default border-secondary 1200:hidden print:hidden",
|
|
2093
2149
|
collapsible: true,
|
|
2094
|
-
children: /* @__PURE__ */
|
|
2095
|
-
/* @__PURE__ */
|
|
2150
|
+
children: /* @__PURE__ */ jsxs9(Accordion.Item, { value: `small-toc-${title}`, children: [
|
|
2151
|
+
/* @__PURE__ */ jsx10(Accordion.Header, { children: /* @__PURE__ */ jsxs9(Accordion.Trigger, { className: "flex h-[--toc-header-height] w-full items-center justify-between px-4 text-sans-md text-default hover:bg-hover 400:px-6 600:px-8 [&>svg]:data-[state=open]:rotate-90", children: [
|
|
2096
2152
|
"Table of Contents",
|
|
2097
2153
|
" ",
|
|
2098
|
-
/* @__PURE__ */
|
|
2154
|
+
/* @__PURE__ */ jsx10(DirectionRightIcon_default, { className: "transition-all text-tertiary" })
|
|
2099
2155
|
] }) }),
|
|
2100
|
-
/* @__PURE__ */
|
|
2156
|
+
/* @__PURE__ */ jsx10(Accordion.Content, { className: "AccordionContent hydrated w-full border-t px-4 border-secondary 400:px-6 600:px-8", children: /* @__PURE__ */ jsx10("div", { className: "py-4", children: renderToc(toc) }) })
|
|
2101
2157
|
] })
|
|
2102
2158
|
}
|
|
2103
2159
|
);
|
|
@@ -3656,13 +3712,13 @@ var handleDocument = async (document2) => {
|
|
|
3656
3712
|
};
|
|
3657
3713
|
|
|
3658
3714
|
// components/src/asciidoc/index.tsx
|
|
3659
|
-
import { jsx as
|
|
3660
|
-
var MinimalDocument = ({ document: document2 }) => /* @__PURE__ */
|
|
3715
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
3716
|
+
var MinimalDocument = ({ document: document2 }) => /* @__PURE__ */ jsx11("div", { id: "content", className: "asciidoc-body w-full", children: /* @__PURE__ */ jsx11(Content4, { blocks: document2.blocks }) });
|
|
3661
3717
|
var AsciiDocBlocks = {
|
|
3662
3718
|
Admonition: Admonition_default,
|
|
3663
3719
|
Table: Table_default,
|
|
3664
3720
|
Section: Section_default,
|
|
3665
|
-
|
|
3721
|
+
Listing: Listing_default,
|
|
3666
3722
|
MinimalDocument
|
|
3667
3723
|
};
|
|
3668
3724
|
var renderWithBreaks = (text) => {
|
|
@@ -3733,8 +3789,8 @@ var InlineConverter = class {
|
|
|
3733
3789
|
};
|
|
3734
3790
|
|
|
3735
3791
|
// components/src/ui/badge/Badge.tsx
|
|
3736
|
-
import
|
|
3737
|
-
import { jsx as
|
|
3792
|
+
import cn5 from "classnames";
|
|
3793
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
3738
3794
|
var badgeColors = {
|
|
3739
3795
|
default: {
|
|
3740
3796
|
default: `ring-1 ring-inset bg-accent-secondary text-accent ring-[rgba(var(--base-green-800-rgb),0.15)]`,
|
|
@@ -3759,25 +3815,25 @@ var Badge = ({
|
|
|
3759
3815
|
color = "default",
|
|
3760
3816
|
variant = "default"
|
|
3761
3817
|
}) => {
|
|
3762
|
-
return /* @__PURE__ */
|
|
3818
|
+
return /* @__PURE__ */ jsx12(
|
|
3763
3819
|
"span",
|
|
3764
3820
|
{
|
|
3765
|
-
className:
|
|
3821
|
+
className: cn5(
|
|
3766
3822
|
"ox-badge",
|
|
3767
3823
|
`variant-${variant}`,
|
|
3768
3824
|
"inline-flex h-4 items-center whitespace-nowrap rounded-sm px-[3px] py-[1px] uppercase text-mono-sm",
|
|
3769
3825
|
badgeColors[variant][color],
|
|
3770
3826
|
className
|
|
3771
3827
|
),
|
|
3772
|
-
children: /* @__PURE__ */
|
|
3828
|
+
children: /* @__PURE__ */ jsx12("span", { children })
|
|
3773
3829
|
}
|
|
3774
3830
|
);
|
|
3775
3831
|
};
|
|
3776
3832
|
|
|
3777
3833
|
// components/src/ui/button/Button.tsx
|
|
3778
|
-
import
|
|
3834
|
+
import cn6 from "classnames";
|
|
3779
3835
|
import { forwardRef } from "react";
|
|
3780
|
-
import { jsx as
|
|
3836
|
+
import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3781
3837
|
var buttonSizes = ["sm", "icon", "base"];
|
|
3782
3838
|
var variants = ["primary", "secondary", "ghost", "danger"];
|
|
3783
3839
|
var sizeStyle = {
|
|
@@ -3790,7 +3846,7 @@ var buttonStyle = ({
|
|
|
3790
3846
|
size: size2 = "base",
|
|
3791
3847
|
variant = "primary"
|
|
3792
3848
|
} = {}) => {
|
|
3793
|
-
return
|
|
3849
|
+
return cn6(
|
|
3794
3850
|
"ox-button inline-flex items-center justify-center rounded align-top elevation-1 disabled:cursor-not-allowed",
|
|
3795
3851
|
`btn-${variant}`,
|
|
3796
3852
|
sizeStyle[size2],
|
|
@@ -3817,10 +3873,10 @@ var Button = forwardRef(
|
|
|
3817
3873
|
...rest
|
|
3818
3874
|
}, ref) => {
|
|
3819
3875
|
const isDisabled = disabled || loading;
|
|
3820
|
-
return /* @__PURE__ */
|
|
3876
|
+
return /* @__PURE__ */ jsxs10(
|
|
3821
3877
|
"button",
|
|
3822
3878
|
{
|
|
3823
|
-
className:
|
|
3879
|
+
className: cn6(buttonStyle({ size: size2, variant }), className, {
|
|
3824
3880
|
"visually-disabled": isDisabled
|
|
3825
3881
|
}),
|
|
3826
3882
|
ref,
|
|
@@ -3830,8 +3886,8 @@ var Button = forwardRef(
|
|
|
3830
3886
|
"aria-disabled": isDisabled,
|
|
3831
3887
|
...rest,
|
|
3832
3888
|
children: [
|
|
3833
|
-
loading && /* @__PURE__ */
|
|
3834
|
-
/* @__PURE__ */
|
|
3889
|
+
loading && /* @__PURE__ */ jsx13(Spinner, { className: "absolute", variant }),
|
|
3890
|
+
/* @__PURE__ */ jsx13("span", { className: cn6("flex items-center", innerClassName, { invisible: loading }), children })
|
|
3835
3891
|
]
|
|
3836
3892
|
}
|
|
3837
3893
|
);
|
|
@@ -3839,9 +3895,9 @@ var Button = forwardRef(
|
|
|
3839
3895
|
);
|
|
3840
3896
|
|
|
3841
3897
|
// components/src/ui/spinner/Spinner.tsx
|
|
3842
|
-
import
|
|
3898
|
+
import cn7 from "classnames";
|
|
3843
3899
|
import { useEffect as useEffect2, useRef as useRef2, useState as useState3 } from "react";
|
|
3844
|
-
import { Fragment as Fragment4, jsx as
|
|
3900
|
+
import { Fragment as Fragment4, jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3845
3901
|
var spinnerSizes = ["base", "lg"];
|
|
3846
3902
|
var spinnerVariants = ["primary", "secondary", "ghost", "danger"];
|
|
3847
3903
|
var Spinner = ({
|
|
@@ -3853,7 +3909,7 @@ var Spinner = ({
|
|
|
3853
3909
|
const center = size2 === "lg" ? 18 : 6;
|
|
3854
3910
|
const radius = size2 === "lg" ? 16 : 5;
|
|
3855
3911
|
const strokeWidth = size2 === "lg" ? 3 : 2;
|
|
3856
|
-
return /* @__PURE__ */
|
|
3912
|
+
return /* @__PURE__ */ jsxs11(
|
|
3857
3913
|
"svg",
|
|
3858
3914
|
{
|
|
3859
3915
|
width: frameSize,
|
|
@@ -3862,9 +3918,9 @@ var Spinner = ({
|
|
|
3862
3918
|
fill: "none",
|
|
3863
3919
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3864
3920
|
"aria-labelledby": "Spinner",
|
|
3865
|
-
className:
|
|
3921
|
+
className: cn7("spinner", `spinner-${variant}`, `spinner-${size2}`, className),
|
|
3866
3922
|
children: [
|
|
3867
|
-
/* @__PURE__ */
|
|
3923
|
+
/* @__PURE__ */ jsx14(
|
|
3868
3924
|
"circle",
|
|
3869
3925
|
{
|
|
3870
3926
|
fill: "none",
|
|
@@ -3877,7 +3933,7 @@ var Spinner = ({
|
|
|
3877
3933
|
strokeOpacity: 0.2
|
|
3878
3934
|
}
|
|
3879
3935
|
),
|
|
3880
|
-
/* @__PURE__ */
|
|
3936
|
+
/* @__PURE__ */ jsx14(
|
|
3881
3937
|
"circle",
|
|
3882
3938
|
{
|
|
3883
3939
|
className: "path",
|
|
@@ -3918,24 +3974,24 @@ var SpinnerLoader = ({ isLoading, children = null, minTime = 500 }) => {
|
|
|
3918
3974
|
clearTimeout(hideTimeout.current);
|
|
3919
3975
|
};
|
|
3920
3976
|
}, [isLoading, minTime]);
|
|
3921
|
-
return isVisible ? /* @__PURE__ */
|
|
3977
|
+
return isVisible ? /* @__PURE__ */ jsx14(Spinner, {}) : /* @__PURE__ */ jsx14(Fragment4, { children });
|
|
3922
3978
|
};
|
|
3923
3979
|
|
|
3924
3980
|
// components/src/ui/tabs/Tabs.tsx
|
|
3925
3981
|
import { Content as Content5, List, Root as Root2, Trigger as Trigger2 } from "@radix-ui/react-tabs";
|
|
3926
|
-
import
|
|
3927
|
-
import { jsx as
|
|
3982
|
+
import cn8 from "classnames";
|
|
3983
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
3928
3984
|
var Tabs = {
|
|
3929
|
-
Root: ({ className, ...props }) => /* @__PURE__ */
|
|
3930
|
-
Trigger: ({ children, className, ...props }) => /* @__PURE__ */
|
|
3931
|
-
List: ({ className, ...props }) => /* @__PURE__ */
|
|
3932
|
-
Content: ({ className, ...props }) => /* @__PURE__ */
|
|
3985
|
+
Root: ({ className, ...props }) => /* @__PURE__ */ jsx15(Root2, { ...props, className: cn8("ox-tabs", className) }),
|
|
3986
|
+
Trigger: ({ children, className, ...props }) => /* @__PURE__ */ jsx15(Trigger2, { ...props, className: cn8("ox-tab", className), children: /* @__PURE__ */ jsx15("div", { children }) }),
|
|
3987
|
+
List: ({ className, ...props }) => /* @__PURE__ */ jsx15(List, { ...props, className: cn8("ox-tabs-list", className) }),
|
|
3988
|
+
Content: ({ className, ...props }) => /* @__PURE__ */ jsx15(Content5, { ...props, className: cn8("ox-tabs-panel", className) })
|
|
3933
3989
|
};
|
|
3934
3990
|
|
|
3935
3991
|
// components/src/ui/checkbox/Checkbox.tsx
|
|
3936
|
-
import
|
|
3937
|
-
import { jsx as
|
|
3938
|
-
var Check = () => /* @__PURE__ */
|
|
3992
|
+
import cn9 from "classnames";
|
|
3993
|
+
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3994
|
+
var Check = () => /* @__PURE__ */ jsx16(Checkmark12Icon_default, { className: "pointer-events-none absolute left-0.5 top-0.5 h-3 w-3 fill-current text-accent" });
|
|
3939
3995
|
var Indeterminate = classed.div`absolute w-2 h-0.5 left-1 top-[7px] bg-accent pointer-events-none`;
|
|
3940
3996
|
var inputStyle = `
|
|
3941
3997
|
appearance-none border border-default bg-default h-4 w-4 rounded-sm absolute left-0 outline-none
|
|
@@ -3949,28 +4005,28 @@ var Checkbox = ({
|
|
|
3949
4005
|
children,
|
|
3950
4006
|
className,
|
|
3951
4007
|
...inputProps
|
|
3952
|
-
}) => /* @__PURE__ */
|
|
3953
|
-
/* @__PURE__ */
|
|
3954
|
-
/* @__PURE__ */
|
|
4008
|
+
}) => /* @__PURE__ */ jsxs12("label", { className: "inline-flex items-center", children: [
|
|
4009
|
+
/* @__PURE__ */ jsxs12("span", { className: "relative h-4 w-4", children: [
|
|
4010
|
+
/* @__PURE__ */ jsx16(
|
|
3955
4011
|
"input",
|
|
3956
4012
|
{
|
|
3957
|
-
className:
|
|
4013
|
+
className: cn9(inputStyle, className),
|
|
3958
4014
|
type: "checkbox",
|
|
3959
4015
|
ref: (el) => el && (el.indeterminate = !!indeterminate),
|
|
3960
4016
|
...inputProps
|
|
3961
4017
|
}
|
|
3962
4018
|
),
|
|
3963
|
-
inputProps.checked && !indeterminate && /* @__PURE__ */
|
|
3964
|
-
indeterminate && /* @__PURE__ */
|
|
4019
|
+
inputProps.checked && !indeterminate && /* @__PURE__ */ jsx16(Check, {}),
|
|
4020
|
+
indeterminate && /* @__PURE__ */ jsx16(Indeterminate, {})
|
|
3965
4021
|
] }),
|
|
3966
|
-
children && /* @__PURE__ */
|
|
4022
|
+
children && /* @__PURE__ */ jsx16("span", { className: "ml-2.5 text-sans-md text-secondary", children })
|
|
3967
4023
|
] });
|
|
3968
4024
|
|
|
3969
4025
|
// components/src/ui/listbox/Listbox.tsx
|
|
3970
4026
|
import { FloatingPortal, flip, offset, size, useFloating } from "@floating-ui/react";
|
|
3971
4027
|
import { Listbox as Select } from "@headlessui/react";
|
|
3972
|
-
import
|
|
3973
|
-
import { Fragment as Fragment5, jsx as
|
|
4028
|
+
import cn10 from "classnames";
|
|
4029
|
+
import { Fragment as Fragment5, jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3974
4030
|
var Listbox = ({
|
|
3975
4031
|
name,
|
|
3976
4032
|
selected,
|
|
@@ -3999,19 +4055,19 @@ var Listbox = ({
|
|
|
3999
4055
|
const selectedItem = selected && items.find((i) => i.value === selected);
|
|
4000
4056
|
const noItems = !isLoading && items.length === 0;
|
|
4001
4057
|
const isDisabled = disabled || noItems;
|
|
4002
|
-
return /* @__PURE__ */
|
|
4058
|
+
return /* @__PURE__ */ jsx17("div", { className: cn10("relative", className), children: /* @__PURE__ */ jsx17(
|
|
4003
4059
|
Select,
|
|
4004
4060
|
{
|
|
4005
4061
|
value: selected,
|
|
4006
4062
|
onChange: (val) => val !== null && onChange(val),
|
|
4007
4063
|
disabled: isDisabled || isLoading,
|
|
4008
|
-
children: ({ open }) => /* @__PURE__ */
|
|
4009
|
-
/* @__PURE__ */
|
|
4064
|
+
children: ({ open }) => /* @__PURE__ */ jsxs13(Fragment5, { children: [
|
|
4065
|
+
/* @__PURE__ */ jsxs13(
|
|
4010
4066
|
Select.Button,
|
|
4011
4067
|
{
|
|
4012
4068
|
name,
|
|
4013
4069
|
ref: refs.setReference,
|
|
4014
|
-
className:
|
|
4070
|
+
className: cn10(
|
|
4015
4071
|
`flex h-10 w-full items-center justify-between
|
|
4016
4072
|
rounded border text-sans-md`,
|
|
4017
4073
|
hasError ? "focus-error border-error-secondary hover:border-error" : "border-default hover:border-hover",
|
|
@@ -4022,37 +4078,37 @@ var Listbox = ({
|
|
|
4022
4078
|
),
|
|
4023
4079
|
...props,
|
|
4024
4080
|
children: [
|
|
4025
|
-
/* @__PURE__ */
|
|
4081
|
+
/* @__PURE__ */ jsx17("div", { className: "w-full px-3 text-left", children: selectedItem ? (
|
|
4026
4082
|
// labelString is one line, which is what we need when label is a ReactNode
|
|
4027
4083
|
selectedItem.labelString || selectedItem.label
|
|
4028
|
-
) : /* @__PURE__ */
|
|
4029
|
-
!isDisabled && /* @__PURE__ */
|
|
4030
|
-
/* @__PURE__ */
|
|
4084
|
+
) : /* @__PURE__ */ jsx17("span", { className: "text-quaternary", children: noItems ? "No items" : placeholder }) }),
|
|
4085
|
+
!isDisabled && /* @__PURE__ */ jsx17(SpinnerLoader, { isLoading }),
|
|
4086
|
+
/* @__PURE__ */ jsx17(
|
|
4031
4087
|
"div",
|
|
4032
4088
|
{
|
|
4033
4089
|
className: "ml-3 flex h-[calc(100%-12px)] items-center border-l px-3 border-secondary",
|
|
4034
4090
|
"aria-hidden": true,
|
|
4035
|
-
children: /* @__PURE__ */
|
|
4091
|
+
children: /* @__PURE__ */ jsx17(SelectArrows6Icon_default, { className: "h-[14px] w-2 text-tertiary" })
|
|
4036
4092
|
}
|
|
4037
4093
|
)
|
|
4038
4094
|
]
|
|
4039
4095
|
}
|
|
4040
4096
|
),
|
|
4041
|
-
/* @__PURE__ */
|
|
4097
|
+
/* @__PURE__ */ jsx17(FloatingPortal, { children: /* @__PURE__ */ jsx17(
|
|
4042
4098
|
Select.Options,
|
|
4043
4099
|
{
|
|
4044
4100
|
ref: refs.setFloating,
|
|
4045
4101
|
style: floatingStyles,
|
|
4046
4102
|
className: "ox-menu pointer-events-auto z-50 overflow-y-auto !outline-none",
|
|
4047
|
-
children: items.map((item) => /* @__PURE__ */
|
|
4103
|
+
children: items.map((item) => /* @__PURE__ */ jsx17(
|
|
4048
4104
|
Select.Option,
|
|
4049
4105
|
{
|
|
4050
4106
|
value: item.value,
|
|
4051
4107
|
className: "relative border-b border-secondary last:border-0",
|
|
4052
|
-
children: ({ active, selected: selected2 }) => /* @__PURE__ */
|
|
4108
|
+
children: ({ active, selected: selected2 }) => /* @__PURE__ */ jsx17(
|
|
4053
4109
|
"div",
|
|
4054
4110
|
{
|
|
4055
|
-
className:
|
|
4111
|
+
className: cn10(
|
|
4056
4112
|
"ox-menu-item text-secondary",
|
|
4057
4113
|
selected2 && "is-selected",
|
|
4058
4114
|
active && "is-highlighted"
|