@techzyapp/ui-library 1.0.1 → 1.0.3
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/Masonry-BTvtDdnt.js +104 -0
- package/dist/Masonry-BTvtDdnt.js.map +1 -0
- package/dist/Masonry-Bl1Mlzqw.cjs +2 -0
- package/dist/Masonry-Bl1Mlzqw.cjs.map +1 -0
- package/dist/breakpoints-BNPC2_Te.cjs +2 -0
- package/dist/breakpoints-BNPC2_Te.cjs.map +1 -0
- package/dist/breakpoints-o3dzSzrU.js +12 -0
- package/dist/breakpoints-o3dzSzrU.js.map +1 -0
- package/dist/components/Masonry/Masonry.d.cts +41 -0
- package/dist/components/Masonry/Masonry.d.ts +41 -0
- package/dist/components/Masonry/index.cjs +2 -0
- package/dist/components/Masonry/index.cjs.map +1 -0
- package/dist/components/Masonry/index.d.cts +2 -0
- package/dist/components/Masonry/index.d.ts +2 -0
- package/dist/components/Masonry/index.js +6 -0
- package/dist/components/Masonry/index.js.map +1 -0
- package/dist/components/index.d.cts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/entries/components.cjs +1 -1
- package/dist/entries/components.js +85 -83
- package/dist/entries/components.js.map +1 -1
- package/dist/entries/theme.cjs +1 -1
- package/dist/entries/theme.d.cts +2 -2
- package/dist/entries/theme.d.ts +2 -2
- package/dist/entries/theme.js +16 -13
- package/dist/entries/theme.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +153 -148
- package/dist/index.js.map +1 -1
- package/dist/theme/breakpoints.d.cts +20 -0
- package/dist/theme/breakpoints.d.ts +20 -0
- package/dist/theme/index.d.cts +2 -0
- package/dist/theme/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { jsx as M } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as G, useMemo as I, Children as K, useState as A, useRef as C, useCallback as T, useLayoutEffect as N, useEffect as P } from "react";
|
|
3
|
+
import { s as O } from "./Flex-Bj3mMF5A.js";
|
|
4
|
+
import { B as d, a as H } from "./breakpoints-o3dzSzrU.js";
|
|
5
|
+
import { u as h } from "./useMediaQuery-_1EcFoC5.js";
|
|
6
|
+
const q = 200, F = (r, l) => r.length === l.length && r.every((n, c) => n === l[c]);
|
|
7
|
+
function S(r, l) {
|
|
8
|
+
if (r == null || typeof r != "object") return r;
|
|
9
|
+
const n = r;
|
|
10
|
+
let c;
|
|
11
|
+
for (const i of H)
|
|
12
|
+
n[i] != null && l[i] && (c = n[i]);
|
|
13
|
+
if (c === void 0) {
|
|
14
|
+
for (const i of H)
|
|
15
|
+
if (n[i] != null) {
|
|
16
|
+
c = n[i];
|
|
17
|
+
break;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return c;
|
|
21
|
+
}
|
|
22
|
+
const U = G(function({ columns: l = 3, minColumnWidth: n, gap: c = "md", padding: i, className: $, style: k, children: b, ...B }, m) {
|
|
23
|
+
const x = I(() => K.toArray(b), [b]), f = x.length, v = {
|
|
24
|
+
xs: !0,
|
|
25
|
+
sm: h(`(min-width: ${d.sm}px)`),
|
|
26
|
+
md: h(`(min-width: ${d.md}px)`),
|
|
27
|
+
lg: h(`(min-width: ${d.lg}px)`),
|
|
28
|
+
xl: h(`(min-width: ${d.xl}px)`)
|
|
29
|
+
}, y = Math.max(1, S(l, v) ?? 1), g = O(S(c, v)), [a, D] = A(y), [w, _] = A([]), R = C(null), E = C([]), j = T(
|
|
30
|
+
(e) => {
|
|
31
|
+
R.current = e, typeof m == "function" ? m(e) : m && (m.current = e);
|
|
32
|
+
},
|
|
33
|
+
[m]
|
|
34
|
+
), p = T(() => {
|
|
35
|
+
const e = R.current;
|
|
36
|
+
if (!e) return;
|
|
37
|
+
let s = y;
|
|
38
|
+
if (n != null) {
|
|
39
|
+
const t = parseFloat(getComputedStyle(e).columnGap) || 0, u = e.clientWidth;
|
|
40
|
+
s = Math.max(1, Math.floor((u + t) / (n + t)));
|
|
41
|
+
}
|
|
42
|
+
D((t) => t === s ? t : s);
|
|
43
|
+
const o = E.current.slice(0, f).map((t) => t ? t.offsetHeight : 0);
|
|
44
|
+
_((t) => F(t, o) ? t : o);
|
|
45
|
+
}, [y, n, f]);
|
|
46
|
+
N(p, [p, x, a, g]), P(() => {
|
|
47
|
+
const e = R.current;
|
|
48
|
+
if (!e || typeof ResizeObserver > "u") return;
|
|
49
|
+
const s = new ResizeObserver(() => p());
|
|
50
|
+
return s.observe(e), E.current.slice(0, f).forEach((o) => o && s.observe(o)), () => s.disconnect();
|
|
51
|
+
}, [p, f, a]);
|
|
52
|
+
const z = I(() => {
|
|
53
|
+
const e = Array.from({ length: a }, () => []), s = new Array(a).fill(0);
|
|
54
|
+
for (let o = 0; o < f; o++) {
|
|
55
|
+
let t = 0;
|
|
56
|
+
for (let u = 1; u < a; u++) s[u] < s[t] && (t = u);
|
|
57
|
+
e[t].push(o), s[t] += w[o] || q;
|
|
58
|
+
}
|
|
59
|
+
return e;
|
|
60
|
+
}, [a, f, w]);
|
|
61
|
+
return /* @__PURE__ */ M(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
ref: j,
|
|
65
|
+
className: $,
|
|
66
|
+
style: {
|
|
67
|
+
display: "flex",
|
|
68
|
+
alignItems: "flex-start",
|
|
69
|
+
gap: g,
|
|
70
|
+
padding: O(i),
|
|
71
|
+
...k
|
|
72
|
+
},
|
|
73
|
+
...B,
|
|
74
|
+
children: z.map((e, s) => /* @__PURE__ */ M(
|
|
75
|
+
"div",
|
|
76
|
+
{
|
|
77
|
+
style: {
|
|
78
|
+
display: "flex",
|
|
79
|
+
flexDirection: "column",
|
|
80
|
+
gap: g,
|
|
81
|
+
flex: "1 1 0",
|
|
82
|
+
minWidth: 0
|
|
83
|
+
},
|
|
84
|
+
children: e.map((o) => /* @__PURE__ */ M(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
ref: (t) => {
|
|
88
|
+
E.current[o] = t;
|
|
89
|
+
},
|
|
90
|
+
style: { minWidth: 0 },
|
|
91
|
+
children: x[o]
|
|
92
|
+
},
|
|
93
|
+
o
|
|
94
|
+
))
|
|
95
|
+
},
|
|
96
|
+
s
|
|
97
|
+
))
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
});
|
|
101
|
+
export {
|
|
102
|
+
U as M
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=Masonry-BTvtDdnt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Masonry-BTvtDdnt.js","sources":["../src/components/Masonry/Masonry.tsx"],"sourcesContent":["import {\n Children,\n forwardRef,\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n} from 'react'\nimport { space, type Spacing } from '../Flex/Flex'\nimport { BREAKPOINTS, BREAKPOINT_ORDER, type Breakpoint } from '../../theme/breakpoints'\nimport { useMediaQuery } from '../../hooks/useMediaQuery'\n\n// nominal height for a not-yet-measured item, so the first (pre-measure) pass spreads items across\n// columns round-robin instead of dumping them all into the first one; corrected on the layout pass.\nconst ESTIMATED_ITEM_HEIGHT = 200\n\nexport interface MasonryProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Number of columns. Either a fixed number, or a **mobile-first** map keyed by the library's\n * `Breakpoint`s (`xs`/`sm`/`md`/`lg`/`xl`) — each entry applies from that breakpoint's min-width up,\n * until a larger defined one overrides it, with the smallest defined key as the base. Defaults to\n * `3`. Ignored when `minColumnWidth` is set.\n *\n * @example columns={2} // always 2\n * @example columns={{ xs: 1, md: 2 }} // 1 below md (768px), 2 at md and up\n */\n columns?: number | Partial<Record<Breakpoint, number>>\n /** Responsive: fit as many equal columns as this min pixel width allows (overrides `columns`). */\n minColumnWidth?: number\n /**\n * Gap between items, horizontally and vertically. Either a single value (a `--tz-space-*` key, a px\n * number, or any CSS value) or a **mobile-first** breakpoint map — same resolution as `columns`.\n * Defaults to `md`.\n *\n * @example gap=\"md\"\n * @example gap={{ xs: 'sm', md: 'lg' }} // tighter on phones, looser from md up\n */\n gap?: Spacing | Partial<Record<Breakpoint, Spacing>>\n /** Padding around the grid (token key, px number, or CSS value). */\n padding?: Spacing\n /** The items to lay out. */\n children?: ReactNode\n}\n\nconst arraysEqual = (a: number[], b: number[]) =>\n a.length === b.length && a.every((v, i) => v === b[i])\n\n/**\n * Resolve a possibly-responsive prop to a concrete value. A plain value passes through; a mobile-first\n * breakpoint map (a plain object keyed by breakpoints) picks the value of the **largest defined\n * breakpoint that currently matches**, falling back to the smallest defined key as the base when none\n * larger has kicked in yet.\n */\nfunction resolveResponsive<T>(\n value: T | Partial<Record<Breakpoint, T>>,\n matches: Record<Breakpoint, boolean>,\n): T | undefined {\n if (value == null || typeof value !== 'object') return value as T | undefined\n const map = value as Partial<Record<Breakpoint, T>>\n let resolved: T | undefined\n for (const bp of BREAKPOINT_ORDER) {\n if (map[bp] != null && matches[bp]) resolved = map[bp]\n }\n if (resolved === undefined) {\n for (const bp of BREAKPOINT_ORDER) {\n if (map[bp] != null) {\n resolved = map[bp]\n break\n }\n }\n }\n return resolved\n}\n\n/**\n * A masonry layout — packs items of varying heights into balanced columns, always adding the next item\n * to the **shortest** column (Pinterest-style), so columns stay level rather than following a fixed\n * grid. Item heights are measured in the DOM (a `ResizeObserver` re-balances on content/size changes),\n * so it works with any children. `columns` is either a fixed number or a mobile-first breakpoint map\n * (`{ xs: 1, md: 2 }`); `minColumnWidth` is a responsive alternative (and overrides `columns`); `gap`\n * spaces items on both axes and is itself responsive the same way (`{ xs: 'sm', md: 'lg' }`).\n * Inline-styled like the other layout primitives (`Flex` / `Grid`); consumer `style` merges last.\n * Reading order flows left-to-right across the columns.\n */\nexport const Masonry = forwardRef<HTMLDivElement, MasonryProps>(function Masonry(\n { columns = 3, minColumnWidth, gap = 'md', padding, className, style, children, ...props },\n ref,\n) {\n const items = useMemo(() => Children.toArray(children), [children])\n const count = items.length\n\n // active min-width breakpoints — a FIXED set of hook calls (order-stable), mobile-first; `xs` is the\n // always-true base. `useMediaQuery` is correct on the first client render, so the resolved count has\n // no flash. These fire regardless of the `columns` form; a plain number just ignores them.\n const matches: Record<Breakpoint, boolean> = {\n xs: true,\n sm: useMediaQuery(`(min-width: ${BREAKPOINTS.sm}px)`),\n md: useMediaQuery(`(min-width: ${BREAKPOINTS.md}px)`),\n lg: useMediaQuery(`(min-width: ${BREAKPOINTS.lg}px)`),\n xl: useMediaQuery(`(min-width: ${BREAKPOINTS.xl}px)`),\n }\n const resolvedColumns = Math.max(1, resolveResponsive(columns, matches) ?? 1)\n const gapValue = space(resolveResponsive(gap, matches))\n\n const [colCount, setColCount] = useState(resolvedColumns)\n const [heights, setHeights] = useState<number[]>([])\n\n const rootRef = useRef<HTMLDivElement | null>(null)\n const itemRefs = useRef<Array<HTMLDivElement | null>>([])\n\n // merge the internal measuring ref with the forwarded ref\n const setRootRef = useCallback(\n (node: HTMLDivElement | null) => {\n rootRef.current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) ref.current = node\n },\n [ref],\n )\n\n // measure the container width → column count, and each item's height → the balance\n const measure = useCallback(() => {\n const root = rootRef.current\n if (!root) return\n\n let nextCols = resolvedColumns\n if (minColumnWidth != null) {\n const g = parseFloat(getComputedStyle(root).columnGap) || 0\n const width = root.clientWidth\n nextCols = Math.max(1, Math.floor((width + g) / (minColumnWidth + g)))\n }\n setColCount((prev) => (prev === nextCols ? prev : nextCols))\n\n const next = itemRefs.current.slice(0, count).map((el) => (el ? el.offsetHeight : 0))\n setHeights((prev) => (arraysEqual(prev, next) ? prev : next))\n }, [resolvedColumns, minColumnWidth, count])\n\n // measure before paint (mount + whenever the item set, column count, or gap changes — a gap change\n // shifts column widths, so heights and the minColumnWidth count need re-reading)\n useLayoutEffect(measure, [measure, items, colCount, gapValue])\n\n // re-balance on container resize and on any item resizing (image loads, dynamic content, …)\n useEffect(() => {\n const root = rootRef.current\n if (!root || typeof ResizeObserver === 'undefined') return\n const ro = new ResizeObserver(() => measure())\n ro.observe(root)\n itemRefs.current.slice(0, count).forEach((el) => el && ro.observe(el))\n return () => ro.disconnect()\n }, [measure, count, colCount])\n\n // greedily assign each item (in order) to the currently shortest column\n const columnsItems = useMemo(() => {\n const buckets: number[][] = Array.from({ length: colCount }, () => [])\n const acc = new Array(colCount).fill(0)\n for (let i = 0; i < count; i++) {\n let min = 0\n for (let c = 1; c < colCount; c++) if (acc[c] < acc[min]) min = c\n buckets[min].push(i)\n acc[min] += heights[i] || ESTIMATED_ITEM_HEIGHT\n }\n return buckets\n }, [colCount, count, heights])\n\n return (\n <div\n ref={setRootRef}\n className={className}\n style={{\n display: 'flex',\n alignItems: 'flex-start',\n gap: gapValue,\n padding: space(padding),\n ...style,\n }}\n {...props}\n >\n {columnsItems.map((indices, c) => (\n <div\n key={c}\n style={{\n display: 'flex',\n flexDirection: 'column',\n gap: gapValue,\n flex: '1 1 0',\n minWidth: 0,\n }}\n >\n {indices.map((i) => (\n <div\n key={i}\n ref={(el) => {\n itemRefs.current[i] = el\n }}\n style={{ minWidth: 0 } as CSSProperties}\n >\n {items[i]}\n </div>\n ))}\n </div>\n ))}\n </div>\n )\n})\n"],"names":["ESTIMATED_ITEM_HEIGHT","arraysEqual","a","b","v","i","resolveResponsive","value","matches","map","resolved","bp","BREAKPOINT_ORDER","Masonry","forwardRef","columns","minColumnWidth","gap","padding","className","style","children","props","ref","items","useMemo","Children","count","useMediaQuery","BREAKPOINTS","resolvedColumns","gapValue","space","colCount","setColCount","useState","heights","setHeights","rootRef","useRef","itemRefs","setRootRef","useCallback","node","measure","root","nextCols","g","width","prev","next","el","useLayoutEffect","useEffect","ro","columnsItems","buckets","acc","min","c","jsx","indices"],"mappings":";;;;;AAmBA,MAAMA,IAAwB,KA8BxBC,IAAc,CAACC,GAAaC,MAChCD,EAAE,WAAWC,EAAE,UAAUD,EAAE,MAAM,CAACE,GAAGC,MAAMD,MAAMD,EAAEE,CAAC,CAAC;AAQvD,SA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1
|
+
"use strict";const b=require("react/jsx-runtime"),r=require("react"),T=require("./Flex-CqL3Ghda.cjs"),m=require("./breakpoints-BNPC2_Te.cjs"),y=require("./useMediaQuery-BCsNfMA1.cjs"),P=200,j=(c,l)=>c.length===l.length&&c.every((o,i)=>o===l[i]);function v(c,l){if(c==null||typeof c!="object")return c;const o=c;let i;for(const u of m.BREAKPOINT_ORDER)o[u]!=null&&l[u]&&(i=o[u]);if(i===void 0){for(const u of m.BREAKPOINT_ORDER)if(o[u]!=null){i=o[u];break}}return i}const k=r.forwardRef(function({columns:l=3,minColumnWidth:o,gap:i="md",padding:u,className:w,style:S,children:I,...C},p){const x=r.useMemo(()=>r.Children.toArray(I),[I]),a=x.length,A={xs:!0,sm:y.useMediaQuery(`(min-width: ${m.BREAKPOINTS.sm}px)`),md:y.useMediaQuery(`(min-width: ${m.BREAKPOINTS.md}px)`),lg:y.useMediaQuery(`(min-width: ${m.BREAKPOINTS.lg}px)`),xl:y.useMediaQuery(`(min-width: ${m.BREAKPOINTS.xl}px)`)},R=Math.max(1,v(l,A)??1),g=T.space(v(i,A)),[f,q]=r.useState(R),[O,B]=r.useState([]),E=r.useRef(null),M=r.useRef([]),K=r.useCallback(t=>{E.current=t,typeof p=="function"?p(t):p&&(p.current=t)},[p]),h=r.useCallback(()=>{const t=E.current;if(!t)return;let n=R;if(o!=null){const e=parseFloat(getComputedStyle(t).columnGap)||0,d=t.clientWidth;n=Math.max(1,Math.floor((d+e)/(o+e)))}q(e=>e===n?e:n);const s=M.current.slice(0,a).map(e=>e?e.offsetHeight:0);B(e=>j(e,s)?e:s)},[R,o,a]);r.useLayoutEffect(h,[h,x,f,g]),r.useEffect(()=>{const t=E.current;if(!t||typeof ResizeObserver>"u")return;const n=new ResizeObserver(()=>h());return n.observe(t),M.current.slice(0,a).forEach(s=>s&&n.observe(s)),()=>n.disconnect()},[h,a,f]);const N=r.useMemo(()=>{const t=Array.from({length:f},()=>[]),n=new Array(f).fill(0);for(let s=0;s<a;s++){let e=0;for(let d=1;d<f;d++)n[d]<n[e]&&(e=d);t[e].push(s),n[e]+=O[s]||P}return t},[f,a,O]);return b.jsx("div",{ref:K,className:w,style:{display:"flex",alignItems:"flex-start",gap:g,padding:T.space(u),...S},...C,children:N.map((t,n)=>b.jsx("div",{style:{display:"flex",flexDirection:"column",gap:g,flex:"1 1 0",minWidth:0},children:t.map(s=>b.jsx("div",{ref:e=>{M.current[s]=e},style:{minWidth:0},children:x[s]},s))},n))})});exports.Masonry=k;
|
|
2
|
+
//# sourceMappingURL=Masonry-Bl1Mlzqw.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Masonry-Bl1Mlzqw.cjs","sources":["../src/components/Masonry/Masonry.tsx"],"sourcesContent":["import {\n Children,\n forwardRef,\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n} from 'react'\nimport { space, type Spacing } from '../Flex/Flex'\nimport { BREAKPOINTS, BREAKPOINT_ORDER, type Breakpoint } from '../../theme/breakpoints'\nimport { useMediaQuery } from '../../hooks/useMediaQuery'\n\n// nominal height for a not-yet-measured item, so the first (pre-measure) pass spreads items across\n// columns round-robin instead of dumping them all into the first one; corrected on the layout pass.\nconst ESTIMATED_ITEM_HEIGHT = 200\n\nexport interface MasonryProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Number of columns. Either a fixed number, or a **mobile-first** map keyed by the library's\n * `Breakpoint`s (`xs`/`sm`/`md`/`lg`/`xl`) — each entry applies from that breakpoint's min-width up,\n * until a larger defined one overrides it, with the smallest defined key as the base. Defaults to\n * `3`. Ignored when `minColumnWidth` is set.\n *\n * @example columns={2} // always 2\n * @example columns={{ xs: 1, md: 2 }} // 1 below md (768px), 2 at md and up\n */\n columns?: number | Partial<Record<Breakpoint, number>>\n /** Responsive: fit as many equal columns as this min pixel width allows (overrides `columns`). */\n minColumnWidth?: number\n /**\n * Gap between items, horizontally and vertically. Either a single value (a `--tz-space-*` key, a px\n * number, or any CSS value) or a **mobile-first** breakpoint map — same resolution as `columns`.\n * Defaults to `md`.\n *\n * @example gap=\"md\"\n * @example gap={{ xs: 'sm', md: 'lg' }} // tighter on phones, looser from md up\n */\n gap?: Spacing | Partial<Record<Breakpoint, Spacing>>\n /** Padding around the grid (token key, px number, or CSS value). */\n padding?: Spacing\n /** The items to lay out. */\n children?: ReactNode\n}\n\nconst arraysEqual = (a: number[], b: number[]) =>\n a.length === b.length && a.every((v, i) => v === b[i])\n\n/**\n * Resolve a possibly-responsive prop to a concrete value. A plain value passes through; a mobile-first\n * breakpoint map (a plain object keyed by breakpoints) picks the value of the **largest defined\n * breakpoint that currently matches**, falling back to the smallest defined key as the base when none\n * larger has kicked in yet.\n */\nfunction resolveResponsive<T>(\n value: T | Partial<Record<Breakpoint, T>>,\n matches: Record<Breakpoint, boolean>,\n): T | undefined {\n if (value == null || typeof value !== 'object') return value as T | undefined\n const map = value as Partial<Record<Breakpoint, T>>\n let resolved: T | undefined\n for (const bp of BREAKPOINT_ORDER) {\n if (map[bp] != null && matches[bp]) resolved = map[bp]\n }\n if (resolved === undefined) {\n for (const bp of BREAKPOINT_ORDER) {\n if (map[bp] != null) {\n resolved = map[bp]\n break\n }\n }\n }\n return resolved\n}\n\n/**\n * A masonry layout — packs items of varying heights into balanced columns, always adding the next item\n * to the **shortest** column (Pinterest-style), so columns stay level rather than following a fixed\n * grid. Item heights are measured in the DOM (a `ResizeObserver` re-balances on content/size changes),\n * so it works with any children. `columns` is either a fixed number or a mobile-first breakpoint map\n * (`{ xs: 1, md: 2 }`); `minColumnWidth` is a responsive alternative (and overrides `columns`); `gap`\n * spaces items on both axes and is itself responsive the same way (`{ xs: 'sm', md: 'lg' }`).\n * Inline-styled like the other layout primitives (`Flex` / `Grid`); consumer `style` merges last.\n * Reading order flows left-to-right across the columns.\n */\nexport const Masonry = forwardRef<HTMLDivElement, MasonryProps>(function Masonry(\n { columns = 3, minColumnWidth, gap = 'md', padding, className, style, children, ...props },\n ref,\n) {\n const items = useMemo(() => Children.toArray(children), [children])\n const count = items.length\n\n // active min-width breakpoints — a FIXED set of hook calls (order-stable), mobile-first; `xs` is the\n // always-true base. `useMediaQuery` is correct on the first client render, so the resolved count has\n // no flash. These fire regardless of the `columns` form; a plain number just ignores them.\n const matches: Record<Breakpoint, boolean> = {\n xs: true,\n sm: useMediaQuery(`(min-width: ${BREAKPOINTS.sm}px)`),\n md: useMediaQuery(`(min-width: ${BREAKPOINTS.md}px)`),\n lg: useMediaQuery(`(min-width: ${BREAKPOINTS.lg}px)`),\n xl: useMediaQuery(`(min-width: ${BREAKPOINTS.xl}px)`),\n }\n const resolvedColumns = Math.max(1, resolveResponsive(columns, matches) ?? 1)\n const gapValue = space(resolveResponsive(gap, matches))\n\n const [colCount, setColCount] = useState(resolvedColumns)\n const [heights, setHeights] = useState<number[]>([])\n\n const rootRef = useRef<HTMLDivElement | null>(null)\n const itemRefs = useRef<Array<HTMLDivElement | null>>([])\n\n // merge the internal measuring ref with the forwarded ref\n const setRootRef = useCallback(\n (node: HTMLDivElement | null) => {\n rootRef.current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) ref.current = node\n },\n [ref],\n )\n\n // measure the container width → column count, and each item's height → the balance\n const measure = useCallback(() => {\n const root = rootRef.current\n if (!root) return\n\n let nextCols = resolvedColumns\n if (minColumnWidth != null) {\n const g = parseFloat(getComputedStyle(root).columnGap) || 0\n const width = root.clientWidth\n nextCols = Math.max(1, Math.floor((width + g) / (minColumnWidth + g)))\n }\n setColCount((prev) => (prev === nextCols ? prev : nextCols))\n\n const next = itemRefs.current.slice(0, count).map((el) => (el ? el.offsetHeight : 0))\n setHeights((prev) => (arraysEqual(prev, next) ? prev : next))\n }, [resolvedColumns, minColumnWidth, count])\n\n // measure before paint (mount + whenever the item set, column count, or gap changes — a gap change\n // shifts column widths, so heights and the minColumnWidth count need re-reading)\n useLayoutEffect(measure, [measure, items, colCount, gapValue])\n\n // re-balance on container resize and on any item resizing (image loads, dynamic content, …)\n useEffect(() => {\n const root = rootRef.current\n if (!root || typeof ResizeObserver === 'undefined') return\n const ro = new ResizeObserver(() => measure())\n ro.observe(root)\n itemRefs.current.slice(0, count).forEach((el) => el && ro.observe(el))\n return () => ro.disconnect()\n }, [measure, count, colCount])\n\n // greedily assign each item (in order) to the currently shortest column\n const columnsItems = useMemo(() => {\n const buckets: number[][] = Array.from({ length: colCount }, () => [])\n const acc = new Array(colCount).fill(0)\n for (let i = 0; i < count; i++) {\n let min = 0\n for (let c = 1; c < colCount; c++) if (acc[c] < acc[min]) min = c\n buckets[min].push(i)\n acc[min] += heights[i] || ESTIMATED_ITEM_HEIGHT\n }\n return buckets\n }, [colCount, count, heights])\n\n return (\n <div\n ref={setRootRef}\n className={className}\n style={{\n display: 'flex',\n alignItems: 'flex-start',\n gap: gapValue,\n padding: space(padding),\n ...style,\n }}\n {...props}\n >\n {columnsItems.map((indices, c) => (\n <div\n key={c}\n style={{\n display: 'flex',\n flexDirection: 'column',\n gap: gapValue,\n flex: '1 1 0',\n minWidth: 0,\n }}\n >\n {indices.map((i) => (\n <div\n key={i}\n ref={(el) => {\n itemRefs.current[i] = el\n }}\n style={{ minWidth: 0 } as CSSProperties}\n >\n {items[i]}\n </div>\n ))}\n </div>\n ))}\n </div>\n )\n})\n"],"names":["ESTIMATED_ITEM_HEIGHT","arraysEqual","a","b","v","resolveResponsive","value","matches","map","resolved","bp","BREAKPOINT_ORDER","Masonry","forwardRef","columns","minColumnWidth","gap","padding","className","style","children","props","ref","items","useMemo","Children","count","useMediaQuery","BREAKPOINTS","resolvedColumns","gapValue","space","colCount","setColCount","useState","heights","setHeights","rootRef","useRef","itemRefs","setRootRef","useCallback","node","measure","root","nextCols","g","width","prev","next","el","useLayoutEffect","useEffect","ro","columnsItems","buckets","acc","i","min","c","jsx","indices"],"mappings":"wLAmBMA,EAAwB,IA8BxBC,EAAc,CAACC,EAAaC,IAChCD,EAAE,SAAWC,EAA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ACjC,MAAM+B,EAAsB,MAAM,KAAK,CAAE,OAAQvB,CAAA,EAAY,IAAM,EAAE,EAC/DwB,EAAM,IAAI,MAAMxB,CAAQ,EAAE,KAAK,CAAC,EACtC,QAASyB,EAAI,EAAGA,EAAI/B,EAAO+B,IAAK,CAC9B,IAAIC,EAAM,EACV,QAASC,EAAI,EAAGA,EAAI3B,EAAU2B,IAASH,EAAIG,CAAC,EAAIH,EAAIE,CAAG,IAAGA,EAAMC,GAChEJ,EAAQG,CAAG,EAAE,KAAKD,CAAC,EACnBD,EAAIE,CAAG,GAAKvB,EAAQsB,CAAC,GAAKzD,CAC5B,CACA,OAAOuD,CACT,EAAG,CAACvB,EAAUN,EAAOS,CAAO,CAAC,EAE7B,OACEyB,EAAAA,IAAC,MAAA,CACC,IAAKpB,EACL,UAAAtB,EACA,MAAO,CACL,QAAS,OACT,WAAY,aACZ,IAAKY,EACL,QAASC,EAAAA,MAAMd,CAAO,EACtB,GAAGE,CAAA,EAEJ,GAAGE,EAEH,SAAAiC,EAAa,IAAI,CAACO,EAASF,IAC1BC,EAAAA,IAAC,MAAA,CAEC,MAAO,CACL,QAAS,OACT,cAAe,SACf,IAAK9B,EACL,KAAM,QACN,SAAU,CAAA,EAGX,SAAA+B,EAAQ,IAAKJ,GACZG,EAAAA,IAAC,MAAA,CAEC,IAAMV,GAAO,CACXX,EAAS,QAAQkB,CAAC,EAAIP,CACxB,EACA,MAAO,CAAE,SAAU,CAAA,EAElB,WAAMO,CAAC,CAAA,EANHA,CAAA,CAQR,CAAA,EAnBIE,CAAA,CAqBR,CAAA,CAAA,CAGP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breakpoints-BNPC2_Te.cjs","sources":["../src/theme/breakpoints.ts"],"sourcesContent":["/**\n * The library's shared responsive breakpoints — the single source of truth for width thresholds.\n *\n * Mobile-first **min-width** values in px. `xs` is the base (`0`); the two values the component CSS\n * already keys off (`≤575.98px` phones, `≤1279.98px` tablet/overlay) line up with `sm` (576) and `xl`\n * (1280), so this scale is a superset of what the styles already use rather than a new set. Consume\n * these instead of hardcoding pixel thresholds, and derive the `Breakpoint` type from here rather than\n * re-listing the keys locally.\n */\nexport const BREAKPOINTS = {\n xs: 0,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1280,\n} as const\n\n/** A responsive breakpoint key (`'xs' | 'sm' | 'md' | 'lg' | 'xl'`). */\nexport type Breakpoint = keyof typeof BREAKPOINTS\n\n/** Breakpoint keys in ascending (mobile-first) order. */\nexport const BREAKPOINT_ORDER: readonly Breakpoint[] = ['xs', 'sm', 'md', 'lg', 'xl']\n"],"names":["BREAKPOINTS","BREAKPOINT_ORDER"],"mappings":"aASO,MAAMA,EAAc,CACzB,GAAI,EACJ,GAAI,IACJ,GAAI,IACJ,GAAI,IACJ,GAAI,IACN,EAMaC,EAA0C,CAAC,KAAM,KAAM,KAAM,KAAM,IAAI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breakpoints-o3dzSzrU.js","sources":["../src/theme/breakpoints.ts"],"sourcesContent":["/**\n * The library's shared responsive breakpoints — the single source of truth for width thresholds.\n *\n * Mobile-first **min-width** values in px. `xs` is the base (`0`); the two values the component CSS\n * already keys off (`≤575.98px` phones, `≤1279.98px` tablet/overlay) line up with `sm` (576) and `xl`\n * (1280), so this scale is a superset of what the styles already use rather than a new set. Consume\n * these instead of hardcoding pixel thresholds, and derive the `Breakpoint` type from here rather than\n * re-listing the keys locally.\n */\nexport const BREAKPOINTS = {\n xs: 0,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1280,\n} as const\n\n/** A responsive breakpoint key (`'xs' | 'sm' | 'md' | 'lg' | 'xl'`). */\nexport type Breakpoint = keyof typeof BREAKPOINTS\n\n/** Breakpoint keys in ascending (mobile-first) order. */\nexport const BREAKPOINT_ORDER: readonly Breakpoint[] = ['xs', 'sm', 'md', 'lg', 'xl']\n"],"names":["BREAKPOINTS","BREAKPOINT_ORDER"],"mappings":"AASO,MAAMA,IAAc;AAAA,EACzB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAMaC,IAA0C,CAAC,MAAM,MAAM,MAAM,MAAM,IAAI;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import { type Spacing } from '../Flex/Flex';
|
|
3
|
+
import { type Breakpoint } from '../../theme/breakpoints';
|
|
4
|
+
export interface MasonryProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/**
|
|
6
|
+
* Number of columns. Either a fixed number, or a **mobile-first** map keyed by the library's
|
|
7
|
+
* `Breakpoint`s (`xs`/`sm`/`md`/`lg`/`xl`) — each entry applies from that breakpoint's min-width up,
|
|
8
|
+
* until a larger defined one overrides it, with the smallest defined key as the base. Defaults to
|
|
9
|
+
* `3`. Ignored when `minColumnWidth` is set.
|
|
10
|
+
*
|
|
11
|
+
* @example columns={2} // always 2
|
|
12
|
+
* @example columns={{ xs: 1, md: 2 }} // 1 below md (768px), 2 at md and up
|
|
13
|
+
*/
|
|
14
|
+
columns?: number | Partial<Record<Breakpoint, number>>;
|
|
15
|
+
/** Responsive: fit as many equal columns as this min pixel width allows (overrides `columns`). */
|
|
16
|
+
minColumnWidth?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Gap between items, horizontally and vertically. Either a single value (a `--tz-space-*` key, a px
|
|
19
|
+
* number, or any CSS value) or a **mobile-first** breakpoint map — same resolution as `columns`.
|
|
20
|
+
* Defaults to `md`.
|
|
21
|
+
*
|
|
22
|
+
* @example gap="md"
|
|
23
|
+
* @example gap={{ xs: 'sm', md: 'lg' }} // tighter on phones, looser from md up
|
|
24
|
+
*/
|
|
25
|
+
gap?: Spacing | Partial<Record<Breakpoint, Spacing>>;
|
|
26
|
+
/** Padding around the grid (token key, px number, or CSS value). */
|
|
27
|
+
padding?: Spacing;
|
|
28
|
+
/** The items to lay out. */
|
|
29
|
+
children?: ReactNode;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A masonry layout — packs items of varying heights into balanced columns, always adding the next item
|
|
33
|
+
* to the **shortest** column (Pinterest-style), so columns stay level rather than following a fixed
|
|
34
|
+
* grid. Item heights are measured in the DOM (a `ResizeObserver` re-balances on content/size changes),
|
|
35
|
+
* so it works with any children. `columns` is either a fixed number or a mobile-first breakpoint map
|
|
36
|
+
* (`{ xs: 1, md: 2 }`); `minColumnWidth` is a responsive alternative (and overrides `columns`); `gap`
|
|
37
|
+
* spaces items on both axes and is itself responsive the same way (`{ xs: 'sm', md: 'lg' }`).
|
|
38
|
+
* Inline-styled like the other layout primitives (`Flex` / `Grid`); consumer `style` merges last.
|
|
39
|
+
* Reading order flows left-to-right across the columns.
|
|
40
|
+
*/
|
|
41
|
+
export declare const Masonry: import("react").ForwardRefExoticComponent<MasonryProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import { type Spacing } from '../Flex/Flex';
|
|
3
|
+
import { type Breakpoint } from '../../theme/breakpoints';
|
|
4
|
+
export interface MasonryProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/**
|
|
6
|
+
* Number of columns. Either a fixed number, or a **mobile-first** map keyed by the library's
|
|
7
|
+
* `Breakpoint`s (`xs`/`sm`/`md`/`lg`/`xl`) — each entry applies from that breakpoint's min-width up,
|
|
8
|
+
* until a larger defined one overrides it, with the smallest defined key as the base. Defaults to
|
|
9
|
+
* `3`. Ignored when `minColumnWidth` is set.
|
|
10
|
+
*
|
|
11
|
+
* @example columns={2} // always 2
|
|
12
|
+
* @example columns={{ xs: 1, md: 2 }} // 1 below md (768px), 2 at md and up
|
|
13
|
+
*/
|
|
14
|
+
columns?: number | Partial<Record<Breakpoint, number>>;
|
|
15
|
+
/** Responsive: fit as many equal columns as this min pixel width allows (overrides `columns`). */
|
|
16
|
+
minColumnWidth?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Gap between items, horizontally and vertically. Either a single value (a `--tz-space-*` key, a px
|
|
19
|
+
* number, or any CSS value) or a **mobile-first** breakpoint map — same resolution as `columns`.
|
|
20
|
+
* Defaults to `md`.
|
|
21
|
+
*
|
|
22
|
+
* @example gap="md"
|
|
23
|
+
* @example gap={{ xs: 'sm', md: 'lg' }} // tighter on phones, looser from md up
|
|
24
|
+
*/
|
|
25
|
+
gap?: Spacing | Partial<Record<Breakpoint, Spacing>>;
|
|
26
|
+
/** Padding around the grid (token key, px number, or CSS value). */
|
|
27
|
+
padding?: Spacing;
|
|
28
|
+
/** The items to lay out. */
|
|
29
|
+
children?: ReactNode;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A masonry layout — packs items of varying heights into balanced columns, always adding the next item
|
|
33
|
+
* to the **shortest** column (Pinterest-style), so columns stay level rather than following a fixed
|
|
34
|
+
* grid. Item heights are measured in the DOM (a `ResizeObserver` re-balances on content/size changes),
|
|
35
|
+
* so it works with any children. `columns` is either a fixed number or a mobile-first breakpoint map
|
|
36
|
+
* (`{ xs: 1, md: 2 }`); `minColumnWidth` is a responsive alternative (and overrides `columns`); `gap`
|
|
37
|
+
* spaces items on both axes and is itself responsive the same way (`{ xs: 'sm', md: 'lg' }`).
|
|
38
|
+
* Inline-styled like the other layout primitives (`Flex` / `Grid`); consumer `style` merges last.
|
|
39
|
+
* Reading order flows left-to-right across the columns.
|
|
40
|
+
*/
|
|
41
|
+
export declare const Masonry: import("react").ForwardRefExoticComponent<MasonryProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../Form-Bz2xgkEm.cjs"),e=require("../Accordion-Dy_dM79Y.cjs"),s=require("../Alert-DKIjM-9x.cjs"),d=require("../Avatar-_ufXh3AY.cjs"),q=require("../AvatarGroup-TW1pt4tj.cjs"),T=require("../Badge-BQpr2Jee.cjs"),p=require("../Blockquote-CxHwOecc.cjs"),g=require("../Breadcrumbs-CHONper7.cjs"),C=require("../Button-D4bfVNNa.cjs"),m=require("../Card-CfyaerZZ.cjs"),F=require("../Checkbox-DXOzYIAz.cjs"),S=require("../Chip-DSrdXLBU.cjs"),r=require("../ChoiceCardGroup-6eFM1eL0.cjs"),h=require("../Code-CUdpWlY5.cjs"),P=require("../CodeBlock-CgXOjKS-.cjs"),o=require("../Col-R5mAy8T9.cjs"),k=require("../ColorPicker-BwmaXCOy.cjs"),B=require("../DatePicker-DF4Epkn8.cjs"),b=require("../DateTimePicker-C557OjBU.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../Form-Bz2xgkEm.cjs"),e=require("../Accordion-Dy_dM79Y.cjs"),s=require("../Alert-DKIjM-9x.cjs"),d=require("../Avatar-_ufXh3AY.cjs"),q=require("../AvatarGroup-TW1pt4tj.cjs"),T=require("../Badge-BQpr2Jee.cjs"),p=require("../Blockquote-CxHwOecc.cjs"),g=require("../Breadcrumbs-CHONper7.cjs"),C=require("../Button-D4bfVNNa.cjs"),m=require("../Card-CfyaerZZ.cjs"),F=require("../Checkbox-DXOzYIAz.cjs"),S=require("../Chip-DSrdXLBU.cjs"),r=require("../ChoiceCardGroup-6eFM1eL0.cjs"),h=require("../Code-CUdpWlY5.cjs"),P=require("../CodeBlock-CgXOjKS-.cjs"),o=require("../Col-R5mAy8T9.cjs"),k=require("../ColorPicker-BwmaXCOy.cjs"),B=require("../DatePicker-DF4Epkn8.cjs"),b=require("../DateTimePicker-C557OjBU.cjs"),y=require("../Divider-CzbhdCiD.cjs"),D=require("../Dropdown-DygP50OB.cjs"),R=require("../EmptyState-CCCpZ-ZA.cjs"),A=require("../FileUploader-B4TJHyoi.cjs"),t=require("../Sidebar-AaIlRzgk.cjs"),I=require("../Flag-EPZOrH-U.cjs"),v=require("../Flex-CqL3Ghda.cjs"),x=require("../FullscreenToggle-DDKN5n8B.cjs"),G=require("../Grid-Bw95bKkJ.cjs"),i=require("../names-C2Yj1p3u.cjs"),L=require("../Icon-CXTl_QAP.cjs"),M=require("../IconButton-D6TenQZ_.cjs"),w=require("../List-CNz2M3-q.cjs"),N=require("../ListItem-RH-D-Wey.cjs"),O=require("../Loader-D1MtlQOH.cjs"),E=require("../Masonry-Bl1Mlzqw.cjs"),U=require("../Modal-B2YSCVVt.cjs"),_=require("../MultiSelect-CSJKSWpA.cjs"),f=require("../MultilineTextField-Dz6Fg8RJ.cjs"),j=require("../NumberField-DBpO-Z_7.cjs"),z=require("../OtpField-BUBYyorC.cjs"),H=require("../PageLayout-Dfbjw6jD.cjs"),J=require("../Pagination-DRwTLPh8.cjs"),K=require("../Popover-CBI1icIM.cjs"),c=require("../RadioGroup-C8u7eNBS.cjs"),Q=require("../RemoveDialog-ClyZKyUG.cjs"),V=require("../RichTextEditor-CAYt1Zm1.cjs"),W=require("../RootLayout-Cp-9CVjP.cjs"),X=require("../Select-_6WogC0u.cjs"),Y=require("../Slider-dxYVXRev.cjs"),n=require("../SpeedDial-C4jxIXTr.cjs"),Z=require("../Stepper-7pPEBRLI.cjs"),$=require("../SwatchPicker-DbAU9-ux.cjs"),ee=require("../Switch-DRkZ6kHJ.cjs"),re=require("../Table-BeOumGng.cjs"),oe=require("../Tabs-BZcMnjdC.cjs"),te=require("../TagsField-kknWiJZZ.cjs"),ie=require("../TextField-BPefnD5M.cjs"),ce=require("../ThemeToggle-DTal3RX5.cjs"),ne=require("../TimePicker-CfGrCH9T.cjs"),u=require("../Timeline-CoxW0Ia_.cjs"),ue=require("../Toaster-Bk5GtPjX.cjs"),a=require("../ToggleButtonGroup-DYRLwKKh.cjs"),ae=require("../Tooltip-Ao7az09p.cjs"),le=require("../TranslatedFields-DT3bYse6.cjs"),se=require("../Typography-BFatE1_A.cjs"),de=require("../UserCard-OlLeyyS0.cjs"),qe=require("../toastStore-B4Tk2Xk7.cjs");exports.Form=l.Form;exports.Accordion=e.Accordion;exports.AccordionItem=e.AccordionItem;exports.Alert=s.Alert;exports.Avatar=d.Avatar;exports.AvatarGroup=q.AvatarGroup;exports.Badge=T.Badge;exports.Blockquote=p.Blockquote;exports.Breadcrumbs=g.Breadcrumbs;exports.Button=C.Button;exports.Card=m.Card;exports.Checkbox=F.Checkbox;exports.Chip=S.Chip;exports.ChoiceCard=r.ChoiceCard;exports.ChoiceCardGroup=r.ChoiceCardGroup;exports.Code=h.Code;exports.CodeBlock=P.CodeBlock;exports.Col=o.Col;exports.Row=o.Row;exports.ColorPicker=k.ColorPicker;exports.DatePicker=B.DatePicker;exports.DateTimePicker=b.DateTimePicker;exports.Divider=y.Divider;exports.Dropdown=D.Dropdown;exports.EmptyState=R.EmptyState;exports.FileUploader=A.FileUploader;exports.FirstRouteRedirect=t.FirstRouteRedirect;exports.Sidebar=t.Sidebar;exports.Flag=I.Flag;exports.Flex=v.Flex;exports.FullscreenToggle=x.FullscreenToggle;exports.Grid=G.Grid;exports.ICON_COUNT=i.ICON_COUNT;exports.ICON_NAMES=i.ICON_NAMES;exports.Icon=L.Icon;exports.IconButton=M.IconButton;exports.List=w.List;exports.ListItem=N.ListItem;exports.Loader=O.Loader;exports.Masonry=E.Masonry;exports.Modal=U.Modal;exports.MultiSelect=_.MultiSelect;exports.MultilineTextField=f.MultilineTextField;exports.NumberField=j.NumberField;exports.OtpField=z.OtpField;exports.PageLayout=H.PageLayout;exports.Pagination=J.Pagination;exports.Popover=K.Popover;exports.Radio=c.Radio;exports.RadioGroup=c.RadioGroup;exports.RemoveDialog=Q.RemoveDialog;exports.RichTextEditor=V.RichTextEditor;exports.RootLayout=W.RootLayout;exports.Select=X.Select;exports.Slider=Y.Slider;exports.SpeedDial=n.SpeedDial;exports.SpeedDialAction=n.SpeedDialAction;exports.Stepper=Z.Stepper;exports.SwatchPicker=$.SwatchPicker;exports.Switch=ee.Switch;exports.Table=re.Table;exports.Tabs=oe.Tabs;exports.TagsField=te.TagsField;exports.TextField=ie.TextField;exports.ThemeToggle=ce.ThemeToggle;exports.TimePicker=ne.TimePicker;exports.Timeline=u.Timeline;exports.TimelineItem=u.TimelineItem;exports.Toaster=ue.Toaster;exports.ToggleButton=a.ToggleButton;exports.ToggleButtonGroup=a.ToggleButtonGroup;exports.Tooltip=ae.Tooltip;exports.TranslatedFields=le.TranslatedFields;exports.Typography=se.Typography;exports.UserCard=de.UserCard;exports.toast=qe.toast;
|
|
2
2
|
//# sourceMappingURL=components.cjs.map
|
|
@@ -5,15 +5,15 @@ import { A as f } from "../Avatar-BJVCdo-K.js";
|
|
|
5
5
|
import { A as l } from "../AvatarGroup-DdJf4aT7.js";
|
|
6
6
|
import { B as d } from "../Badge-DSWigoGC.js";
|
|
7
7
|
import { B as C } from "../Blockquote-CNIuJFHq.js";
|
|
8
|
-
import { B as
|
|
8
|
+
import { B as F } from "../Breadcrumbs-Bx5UgwDy.js";
|
|
9
9
|
import { B as u } from "../Button-DhEv0YFk.js";
|
|
10
10
|
import { C as R } from "../Card-DzClqJuu.js";
|
|
11
11
|
import { C as A } from "../Checkbox-XKL_Q5qj.js";
|
|
12
12
|
import { C as P } from "../Chip-Cfo0v3Z8.js";
|
|
13
|
-
import { C as h, a as
|
|
14
|
-
import { C as
|
|
15
|
-
import { C as
|
|
16
|
-
import { C as
|
|
13
|
+
import { C as h, a as M } from "../ChoiceCardGroup-CvFzZlgI.js";
|
|
14
|
+
import { C as L } from "../Code-DaEpXHfF.js";
|
|
15
|
+
import { C as y } from "../CodeBlock-BWxQyKRo.js";
|
|
16
|
+
import { C as N, R as v } from "../Col-D2TfZKiM.js";
|
|
17
17
|
import { C as w } from "../ColorPicker-2udt1ORM.js";
|
|
18
18
|
import { D as U } from "../DatePicker-WM9TC6L_.js";
|
|
19
19
|
import { D as q } from "../DateTimePicker-DBtcWK0F.js";
|
|
@@ -29,41 +29,42 @@ import { G as po } from "../Grid-CY-syhTX.js";
|
|
|
29
29
|
import { I as xo, a as fo } from "../names-D8ABK2Wk.js";
|
|
30
30
|
import { I as lo } from "../Icon-CophpkHo.js";
|
|
31
31
|
import { I as co } from "../IconButton-CBusrDa9.js";
|
|
32
|
-
import { L as
|
|
33
|
-
import { L as
|
|
32
|
+
import { L as no } from "../List-BHgFI9Ll.js";
|
|
33
|
+
import { L as So } from "../ListItem-B4yqZR-Z.js";
|
|
34
34
|
import { L as go } from "../Loader-C4JoXOyA.js";
|
|
35
|
-
import { M as Bo } from "../
|
|
36
|
-
import { M as Do } from "../
|
|
37
|
-
import { M as Io } from "../
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import { P as
|
|
42
|
-
import { P as Oo } from "../
|
|
43
|
-
import {
|
|
44
|
-
import { R as qo } from "../
|
|
45
|
-
import { R as zo } from "../
|
|
46
|
-
import { R as Jo } from "../
|
|
47
|
-
import {
|
|
48
|
-
import { S as Wo } from "../
|
|
49
|
-
import { S as Yo
|
|
50
|
-
import { S as or } from "../
|
|
51
|
-
import { S as er } from "../
|
|
52
|
-
import { S as tr } from "../
|
|
53
|
-
import {
|
|
54
|
-
import { T as xr } from "../
|
|
55
|
-
import { T as ir } from "../
|
|
56
|
-
import { T as Tr } from "../
|
|
57
|
-
import { T as cr } from "../
|
|
58
|
-
import { T as
|
|
59
|
-
import { T as
|
|
60
|
-
import { T as Rr } from "../
|
|
61
|
-
import { T as Ar
|
|
62
|
-
import { T as Ir } from "../
|
|
63
|
-
import { T as
|
|
64
|
-
import { T as
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
35
|
+
import { M as Bo } from "../Masonry-BTvtDdnt.js";
|
|
36
|
+
import { M as Do } from "../Modal-BuaPDlKV.js";
|
|
37
|
+
import { M as Io } from "../MultiSelect-BGRT_B60.js";
|
|
38
|
+
import { M as Mo } from "../MultilineTextField-CwNCJ9lZ.js";
|
|
39
|
+
import { N as Lo } from "../NumberField-DBvhSQCw.js";
|
|
40
|
+
import { O as yo } from "../OtpField-CTq-CUbF.js";
|
|
41
|
+
import { P as No } from "../PageLayout-DddzYw2B.js";
|
|
42
|
+
import { P as Oo } from "../Pagination-CN9V8M5C.js";
|
|
43
|
+
import { P as Eo } from "../Popover-CgIU4Rhg.js";
|
|
44
|
+
import { R as _o, a as qo } from "../RadioGroup-DbodUJW8.js";
|
|
45
|
+
import { R as zo } from "../RemoveDialog-Bvt6sH79.js";
|
|
46
|
+
import { R as Jo } from "../RichTextEditor-BTx8Py3I.js";
|
|
47
|
+
import { R as Qo } from "../RootLayout-DCpfuFWF.js";
|
|
48
|
+
import { S as Wo } from "../Select-PbTyxB1Q.js";
|
|
49
|
+
import { S as Yo } from "../Slider-oGXd5e9X.js";
|
|
50
|
+
import { S as $o, a as or } from "../SpeedDial-DgFj16BQ.js";
|
|
51
|
+
import { S as er } from "../Stepper-COKAyN1L.js";
|
|
52
|
+
import { S as tr } from "../SwatchPicker-D30aSrbY.js";
|
|
53
|
+
import { S as pr } from "../Switch-DMPJ0fhB.js";
|
|
54
|
+
import { T as xr } from "../Table-BjPLvMbf.js";
|
|
55
|
+
import { T as ir } from "../Tabs--DDM-zKe.js";
|
|
56
|
+
import { T as Tr } from "../TagsField-BTJcZS9P.js";
|
|
57
|
+
import { T as cr } from "../TextField-DMI1X09n.js";
|
|
58
|
+
import { T as nr } from "../ThemeToggle-Deh9j8pm.js";
|
|
59
|
+
import { T as Sr } from "../TimePicker-3JgvK2on.js";
|
|
60
|
+
import { T as gr, a as Rr } from "../Timeline-WkV4k_we.js";
|
|
61
|
+
import { T as Ar } from "../Toaster-D-eG1xv7.js";
|
|
62
|
+
import { T as Pr, a as Ir } from "../ToggleButtonGroup-BWd7MOcc.js";
|
|
63
|
+
import { T as Mr } from "../Tooltip-Cb_FKxT9.js";
|
|
64
|
+
import { T as Lr } from "../TranslatedFields-CI0F9bHw.js";
|
|
65
|
+
import { T as yr } from "../Typography-Cta6Rg4L.js";
|
|
66
|
+
import { U as Nr } from "../UserCard-BhqtX1vU.js";
|
|
67
|
+
import { t as Or } from "../toastStore-Cx_JOKwS.js";
|
|
67
68
|
export {
|
|
68
69
|
t as Accordion,
|
|
69
70
|
s as AccordionItem,
|
|
@@ -72,16 +73,16 @@ export {
|
|
|
72
73
|
l as AvatarGroup,
|
|
73
74
|
d as Badge,
|
|
74
75
|
C as Blockquote,
|
|
75
|
-
|
|
76
|
+
F as Breadcrumbs,
|
|
76
77
|
u as Button,
|
|
77
78
|
R as Card,
|
|
78
79
|
A as Checkbox,
|
|
79
80
|
P as Chip,
|
|
80
81
|
h as ChoiceCard,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
M as ChoiceCardGroup,
|
|
83
|
+
L as Code,
|
|
84
|
+
y as CodeBlock,
|
|
85
|
+
N as Col,
|
|
85
86
|
w as ColorPicker,
|
|
86
87
|
U as DatePicker,
|
|
87
88
|
q as DateTimePicker,
|
|
@@ -99,46 +100,47 @@ export {
|
|
|
99
100
|
fo as ICON_NAMES,
|
|
100
101
|
lo as Icon,
|
|
101
102
|
co as IconButton,
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
no as List,
|
|
104
|
+
So as ListItem,
|
|
104
105
|
go as Loader,
|
|
105
|
-
Bo as
|
|
106
|
-
Do as
|
|
107
|
-
Io as
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
Oo as
|
|
113
|
-
Eo as
|
|
114
|
-
|
|
115
|
-
qo as
|
|
116
|
-
zo as
|
|
117
|
-
Jo as
|
|
118
|
-
|
|
119
|
-
|
|
106
|
+
Bo as Masonry,
|
|
107
|
+
Do as Modal,
|
|
108
|
+
Io as MultiSelect,
|
|
109
|
+
Mo as MultilineTextField,
|
|
110
|
+
Lo as NumberField,
|
|
111
|
+
yo as OtpField,
|
|
112
|
+
No as PageLayout,
|
|
113
|
+
Oo as Pagination,
|
|
114
|
+
Eo as Popover,
|
|
115
|
+
_o as Radio,
|
|
116
|
+
qo as RadioGroup,
|
|
117
|
+
zo as RemoveDialog,
|
|
118
|
+
Jo as RichTextEditor,
|
|
119
|
+
Qo as RootLayout,
|
|
120
|
+
v as Row,
|
|
121
|
+
Wo as Select,
|
|
120
122
|
Z as Sidebar,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
123
|
+
Yo as Slider,
|
|
124
|
+
$o as SpeedDial,
|
|
125
|
+
or as SpeedDialAction,
|
|
126
|
+
er as Stepper,
|
|
127
|
+
tr as SwatchPicker,
|
|
128
|
+
pr as Switch,
|
|
129
|
+
xr as Table,
|
|
130
|
+
ir as Tabs,
|
|
131
|
+
Tr as TagsField,
|
|
132
|
+
cr as TextField,
|
|
133
|
+
nr as ThemeToggle,
|
|
134
|
+
Sr as TimePicker,
|
|
135
|
+
gr as Timeline,
|
|
136
|
+
Rr as TimelineItem,
|
|
137
|
+
Ar as Toaster,
|
|
138
|
+
Pr as ToggleButton,
|
|
139
|
+
Ir as ToggleButtonGroup,
|
|
140
|
+
Mr as Tooltip,
|
|
141
|
+
Lr as TranslatedFields,
|
|
142
|
+
yr as Typography,
|
|
143
|
+
Nr as UserCard,
|
|
144
|
+
Or as toast
|
|
143
145
|
};
|
|
144
146
|
//# sourceMappingURL=components.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"components.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/entries/theme.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../ConfigProvider-ByOFXVyP.cjs");exports.ConfigProvider=e.ConfigProvider;exports.DEFAULT_FONT_FAMILY=e.DEFAULT_FONT_FAMILY;exports.DEFAULT_NESTED_TAB_QUERY_KEY=e.DEFAULT_NESTED_TAB_QUERY_KEY;exports.DEFAULT_STEP_QUERY_KEY=e.DEFAULT_STEP_QUERY_KEY;exports.DEFAULT_TABS_QUERY_KEY=e.DEFAULT_TABS_QUERY_KEY;exports.applyTheme=e.applyTheme;exports.useHeaderConfig=e.useHeaderConfig;exports.useLocales=e.useLocales;exports.useNestedTabQueryKey=e.useNestedTabQueryKey;exports.useStepQueryKey=e.useStepQueryKey;exports.useTableQueryConfig=e.useTableQueryConfig;exports.useTabsQueryKey=e.useTabsQueryKey;exports.useTheme=e.useTheme;exports.useTranslationsNamespace=e.useTranslationsNamespace;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("../breakpoints-BNPC2_Te.cjs"),e=require("../ConfigProvider-ByOFXVyP.cjs");exports.BREAKPOINTS=T.BREAKPOINTS;exports.BREAKPOINT_ORDER=T.BREAKPOINT_ORDER;exports.ConfigProvider=e.ConfigProvider;exports.DEFAULT_FONT_FAMILY=e.DEFAULT_FONT_FAMILY;exports.DEFAULT_NESTED_TAB_QUERY_KEY=e.DEFAULT_NESTED_TAB_QUERY_KEY;exports.DEFAULT_STEP_QUERY_KEY=e.DEFAULT_STEP_QUERY_KEY;exports.DEFAULT_TABS_QUERY_KEY=e.DEFAULT_TABS_QUERY_KEY;exports.applyTheme=e.applyTheme;exports.useHeaderConfig=e.useHeaderConfig;exports.useLocales=e.useLocales;exports.useNestedTabQueryKey=e.useNestedTabQueryKey;exports.useStepQueryKey=e.useStepQueryKey;exports.useTableQueryConfig=e.useTableQueryConfig;exports.useTabsQueryKey=e.useTabsQueryKey;exports.useTheme=e.useTheme;exports.useTranslationsNamespace=e.useTranslationsNamespace;
|
|
2
2
|
//# sourceMappingURL=theme.cjs.map
|
package/dist/entries/theme.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { applyTheme, ConfigProvider, useTheme, useLocales, useTranslationsNamespace, useTabsQueryKey, useNestedTabQueryKey, useStepQueryKey, useTableQueryConfig, useHeaderConfig, DEFAULT_TABS_QUERY_KEY, DEFAULT_NESTED_TAB_QUERY_KEY, DEFAULT_STEP_QUERY_KEY, DEFAULT_FONT_FAMILY, } from '../theme';
|
|
2
|
-
export type { ThemePalette, ThemeColor, Config, ThemeConfig, ThemeColors, ThemeMode, ConfigProviderProps, LocaleConfig, KeysConfig, TableConfig, TableQueryConfig, HeaderConfig, HeaderUser, I18nConfig, } from '../theme';
|
|
1
|
+
export { applyTheme, ConfigProvider, useTheme, useLocales, useTranslationsNamespace, useTabsQueryKey, useNestedTabQueryKey, useStepQueryKey, useTableQueryConfig, useHeaderConfig, DEFAULT_TABS_QUERY_KEY, DEFAULT_NESTED_TAB_QUERY_KEY, DEFAULT_STEP_QUERY_KEY, DEFAULT_FONT_FAMILY, BREAKPOINTS, BREAKPOINT_ORDER, } from '../theme';
|
|
2
|
+
export type { ThemePalette, ThemeColor, Breakpoint, Config, ThemeConfig, ThemeColors, ThemeMode, ConfigProviderProps, LocaleConfig, KeysConfig, TableConfig, TableQueryConfig, HeaderConfig, HeaderUser, I18nConfig, } from '../theme';
|
package/dist/entries/theme.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { applyTheme, ConfigProvider, useTheme, useLocales, useTranslationsNamespace, useTabsQueryKey, useNestedTabQueryKey, useStepQueryKey, useTableQueryConfig, useHeaderConfig, DEFAULT_TABS_QUERY_KEY, DEFAULT_NESTED_TAB_QUERY_KEY, DEFAULT_STEP_QUERY_KEY, DEFAULT_FONT_FAMILY, } from '../theme';
|
|
2
|
-
export type { ThemePalette, ThemeColor, Config, ThemeConfig, ThemeColors, ThemeMode, ConfigProviderProps, LocaleConfig, KeysConfig, TableConfig, TableQueryConfig, HeaderConfig, HeaderUser, I18nConfig, } from '../theme';
|
|
1
|
+
export { applyTheme, ConfigProvider, useTheme, useLocales, useTranslationsNamespace, useTabsQueryKey, useNestedTabQueryKey, useStepQueryKey, useTableQueryConfig, useHeaderConfig, DEFAULT_TABS_QUERY_KEY, DEFAULT_NESTED_TAB_QUERY_KEY, DEFAULT_STEP_QUERY_KEY, DEFAULT_FONT_FAMILY, BREAKPOINTS, BREAKPOINT_ORDER, } from '../theme';
|
|
2
|
+
export type { ThemePalette, ThemeColor, Breakpoint, Config, ThemeConfig, ThemeColors, ThemeMode, ConfigProviderProps, LocaleConfig, KeysConfig, TableConfig, TableQueryConfig, HeaderConfig, HeaderUser, I18nConfig, } from '../theme';
|
package/dist/entries/theme.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as a, a as T } from "../breakpoints-o3dzSzrU.js";
|
|
2
|
+
import { C as _, D as r, c as u, d as o, e as A, f as y, g as K, h as D, i as Q, j as R, k as U, l as Y, m as f, n as i } from "../ConfigProvider-2c94kUOk.js";
|
|
2
3
|
export {
|
|
3
|
-
a as
|
|
4
|
-
T as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
y as
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
a as BREAKPOINTS,
|
|
5
|
+
T as BREAKPOINT_ORDER,
|
|
6
|
+
_ as ConfigProvider,
|
|
7
|
+
r as DEFAULT_FONT_FAMILY,
|
|
8
|
+
u as DEFAULT_NESTED_TAB_QUERY_KEY,
|
|
9
|
+
o as DEFAULT_STEP_QUERY_KEY,
|
|
10
|
+
A as DEFAULT_TABS_QUERY_KEY,
|
|
11
|
+
y as applyTheme,
|
|
12
|
+
K as useHeaderConfig,
|
|
13
|
+
D as useLocales,
|
|
14
|
+
Q as useNestedTabQueryKey,
|
|
15
|
+
R as useStepQueryKey,
|
|
13
16
|
U as useTableQueryConfig,
|
|
14
17
|
Y as useTabsQueryKey,
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
f as useTheme,
|
|
19
|
+
i as useTranslationsNamespace
|
|
17
20
|
};
|
|
18
21
|
//# sourceMappingURL=theme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"theme.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("./Form-Bz2xgkEm.cjs"),i=require("./useForm-C7erBHt0.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("./Form-Bz2xgkEm.cjs"),i=require("./useForm-C7erBHt0.cjs"),S=require("./useLockBodyScroll-CIXHZo-Q.cjs"),m=require("./useMediaQuery-BCsNfMA1.cjs"),o=require("./access-DPUHbE-S.cjs"),e=require("./ConfigProvider-ByOFXVyP.cjs"),t=require("./messages-Cy-qK5xU.cjs"),r=require("./translations-CXEeeUDL.cjs"),s=require("./table-CZRQGNdk.cjs"),a=require("./Icon-CXTl_QAP.cjs"),u=require("./Accordion-Dy_dM79Y.cjs"),y=require("./Alert-DKIjM-9x.cjs"),C=require("./Avatar-_ufXh3AY.cjs"),E=require("./AvatarGroup-TW1pt4tj.cjs"),c=require("./breakpoints-BNPC2_Te.cjs"),b=require("./Badge-BQpr2Jee.cjs"),D=require("./Blockquote-CxHwOecc.cjs"),L=require("./Breadcrumbs-CHONper7.cjs"),P=require("./Button-D4bfVNNa.cjs"),R=require("./Card-CfyaerZZ.cjs"),B=require("./Checkbox-DXOzYIAz.cjs"),_=require("./Chip-DSrdXLBU.cjs"),n=require("./ChoiceCardGroup-6eFM1eL0.cjs"),h=require("./Code-CUdpWlY5.cjs"),N=require("./CodeBlock-CgXOjKS-.cjs"),l=require("./Col-R5mAy8T9.cjs"),k=require("./ColorPicker-BwmaXCOy.cjs"),I=require("./DatePicker-DF4Epkn8.cjs"),U=require("./DateTimePicker-C557OjBU.cjs"),K=require("./Divider-CzbhdCiD.cjs"),M=require("./Dropdown-DygP50OB.cjs"),Q=require("./EmptyState-CCCpZ-ZA.cjs"),O=require("./FileUploader-B4TJHyoi.cjs"),T=require("./Sidebar-AaIlRzgk.cjs"),v=require("./Flag-EPZOrH-U.cjs"),x=require("./Flex-CqL3Ghda.cjs"),G=require("./FullscreenToggle-DDKN5n8B.cjs"),Y=require("./Grid-Bw95bKkJ.cjs"),d=require("./names-C2Yj1p3u.cjs"),f=require("./IconButton-D6TenQZ_.cjs"),w=require("./List-CNz2M3-q.cjs"),H=require("./ListItem-RH-D-Wey.cjs"),j=require("./Loader-D1MtlQOH.cjs"),z=require("./Masonry-Bl1Mlzqw.cjs"),J=require("./Modal-B2YSCVVt.cjs"),V=require("./MultiSelect-CSJKSWpA.cjs"),W=require("./MultilineTextField-Dz6Fg8RJ.cjs"),X=require("./NumberField-DBpO-Z_7.cjs"),Z=require("./OtpField-BUBYyorC.cjs"),$=require("./PageLayout-Dfbjw6jD.cjs"),ee=require("./Pagination-DRwTLPh8.cjs"),re=require("./Popover-CBI1icIM.cjs"),q=require("./RadioGroup-C8u7eNBS.cjs"),oe=require("./RemoveDialog-ClyZKyUG.cjs"),te=require("./RichTextEditor-CAYt1Zm1.cjs"),ie=require("./RootLayout-Cp-9CVjP.cjs"),se=require("./Select-_6WogC0u.cjs"),ae=require("./Slider-dxYVXRev.cjs"),p=require("./SpeedDial-C4jxIXTr.cjs"),ue=require("./Stepper-7pPEBRLI.cjs"),ce=require("./SwatchPicker-DbAU9-ux.cjs"),ne=require("./Switch-DRkZ6kHJ.cjs"),le=require("./Table-BeOumGng.cjs"),Te=require("./Tabs-BZcMnjdC.cjs"),de=require("./TagsField-kknWiJZZ.cjs"),qe=require("./TextField-BPefnD5M.cjs"),pe=require("./ThemeToggle-DTal3RX5.cjs"),ge=require("./TimePicker-CfGrCH9T.cjs"),g=require("./Timeline-CoxW0Ia_.cjs"),Ae=require("./Toaster-Bk5GtPjX.cjs"),A=require("./ToggleButtonGroup-DYRLwKKh.cjs"),Fe=require("./Tooltip-Ao7az09p.cjs"),Se=require("./TranslatedFields-DT3bYse6.cjs"),me=require("./Typography-BFatE1_A.cjs"),ye=require("./UserCard-OlLeyyS0.cjs"),Ce=require("./toastStore-B4Tk2Xk7.cjs");exports.Form=F.Form;exports.useDisclosure=i.useDisclosure;exports.useForm=i.useForm;exports.useLockBodyScroll=S.useLockBodyScroll;exports.useMediaQuery=m.useMediaQuery;exports.getAccessKeys=o.getAccessKeys;exports.hasAccess=o.hasAccess;exports.setAccessKeys=o.setAccessKeys;exports.useAccessKeys=o.useAccessKeys;exports.ConfigProvider=e.ConfigProvider;exports.DEFAULT_FONT_FAMILY=e.DEFAULT_FONT_FAMILY;exports.DEFAULT_NESTED_TAB_QUERY_KEY=e.DEFAULT_NESTED_TAB_QUERY_KEY;exports.DEFAULT_STEP_QUERY_KEY=e.DEFAULT_STEP_QUERY_KEY;exports.DEFAULT_TABS_QUERY_KEY=e.DEFAULT_TABS_QUERY_KEY;exports.applyTheme=e.applyTheme;exports.useHeaderConfig=e.useHeaderConfig;exports.useLanguage=e.useLanguage;exports.useLocales=e.useLocales;exports.useNestedTabQueryKey=e.useNestedTabQueryKey;exports.useStepQueryKey=e.useStepQueryKey;exports.useT=e.useT;exports.useTableQueryConfig=e.useTableQueryConfig;exports.useTabsQueryKey=e.useTabsQueryKey;exports.useTheme=e.useTheme;exports.useTranslations=e.useTranslations;exports.useTranslationsNamespace=e.useTranslationsNamespace;exports.createAppTranslator=t.createAppTranslator;exports.createTranslator=t.createTranslator;exports.flagFor=t.flagFor;exports.DEFAULT_TRANSLATIONS_NAMESPACE=r.DEFAULT_TRANSLATIONS_NAMESPACE;exports.buildTranslationName=r.buildTranslationName;exports.buildTranslations=r.buildTranslations;exports.flattenTranslations=r.flattenTranslations;exports.nestTranslations=r.nestTranslations;exports.toFormData=r.toFormData;exports.buildTableQuery=s.buildTableQuery;exports.parseTableQuery=s.parseTableQuery;exports.Icon=a.Icon;exports.icons=a.icons;exports.Accordion=u.Accordion;exports.AccordionItem=u.AccordionItem;exports.Alert=y.Alert;exports.Avatar=C.Avatar;exports.AvatarGroup=E.AvatarGroup;exports.BREAKPOINTS=c.BREAKPOINTS;exports.BREAKPOINT_ORDER=c.BREAKPOINT_ORDER;exports.Badge=b.Badge;exports.Blockquote=D.Blockquote;exports.Breadcrumbs=L.Breadcrumbs;exports.Button=P.Button;exports.Card=R.Card;exports.Checkbox=B.Checkbox;exports.Chip=_.Chip;exports.ChoiceCard=n.ChoiceCard;exports.ChoiceCardGroup=n.ChoiceCardGroup;exports.Code=h.Code;exports.CodeBlock=N.CodeBlock;exports.Col=l.Col;exports.Row=l.Row;exports.ColorPicker=k.ColorPicker;exports.DatePicker=I.DatePicker;exports.DateTimePicker=U.DateTimePicker;exports.Divider=K.Divider;exports.Dropdown=M.Dropdown;exports.EmptyState=Q.EmptyState;exports.FileUploader=O.FileUploader;exports.FirstRouteRedirect=T.FirstRouteRedirect;exports.Sidebar=T.Sidebar;exports.Flag=v.Flag;exports.Flex=x.Flex;exports.FullscreenToggle=G.FullscreenToggle;exports.Grid=Y.Grid;exports.ICON_COUNT=d.ICON_COUNT;exports.ICON_NAMES=d.ICON_NAMES;exports.IconButton=f.IconButton;exports.List=w.List;exports.ListItem=H.ListItem;exports.Loader=j.Loader;exports.Masonry=z.Masonry;exports.Modal=J.Modal;exports.MultiSelect=V.MultiSelect;exports.MultilineTextField=W.MultilineTextField;exports.NumberField=X.NumberField;exports.OtpField=Z.OtpField;exports.PageLayout=$.PageLayout;exports.Pagination=ee.Pagination;exports.Popover=re.Popover;exports.Radio=q.Radio;exports.RadioGroup=q.RadioGroup;exports.RemoveDialog=oe.RemoveDialog;exports.RichTextEditor=te.RichTextEditor;exports.RootLayout=ie.RootLayout;exports.Select=se.Select;exports.Slider=ae.Slider;exports.SpeedDial=p.SpeedDial;exports.SpeedDialAction=p.SpeedDialAction;exports.Stepper=ue.Stepper;exports.SwatchPicker=ce.SwatchPicker;exports.Switch=ne.Switch;exports.Table=le.Table;exports.Tabs=Te.Tabs;exports.TagsField=de.TagsField;exports.TextField=qe.TextField;exports.ThemeToggle=pe.ThemeToggle;exports.TimePicker=ge.TimePicker;exports.Timeline=g.Timeline;exports.TimelineItem=g.TimelineItem;exports.Toaster=Ae.Toaster;exports.ToggleButton=A.ToggleButton;exports.ToggleButtonGroup=A.ToggleButtonGroup;exports.Tooltip=Fe.Tooltip;exports.TranslatedFields=Se.TranslatedFields;exports.Typography=me.Typography;exports.UserCard=ye.UserCard;exports.toast=Ce.toast;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -3,163 +3,168 @@ import { u as s, a as t } from "./useForm-B_5wDIER.js";
|
|
|
3
3
|
import { u as m } from "./useLockBodyScroll-DwBILLPK.js";
|
|
4
4
|
import { u as x } from "./useMediaQuery-_1EcFoC5.js";
|
|
5
5
|
import { g as T, h as l, s as u, u as c } from "./access-Db4knwyR.js";
|
|
6
|
-
import { C as
|
|
7
|
-
import { c as
|
|
8
|
-
import { D as
|
|
6
|
+
import { C as d, D as A, c as C, d as F, e as S, f as g, g as E, u as D, h as y, i as R, j as B, a as L, k as b, l as _, m as N, b as P, n as h } from "./ConfigProvider-2c94kUOk.js";
|
|
7
|
+
import { c as M, a as U, f as K } from "./messages-C-zecFBE.js";
|
|
8
|
+
import { D as O, b as Q, a as Y, f as v, n as G, t as w } from "./translations-D15tFHM1.js";
|
|
9
9
|
import { b as q, p as H } from "./table-DF3zTrC3.js";
|
|
10
10
|
import { I as J, i as V } from "./Icon-CophpkHo.js";
|
|
11
11
|
import { A as X, a as Z } from "./Accordion-CAxa1I-m.js";
|
|
12
12
|
import { A as oo } from "./Alert-BQpA48PY.js";
|
|
13
13
|
import { A as eo } from "./Avatar-BJVCdo-K.js";
|
|
14
14
|
import { A as so } from "./AvatarGroup-DdJf4aT7.js";
|
|
15
|
-
import { B as po } from "./
|
|
16
|
-
import { B as
|
|
17
|
-
import { B as
|
|
18
|
-
import { B as
|
|
19
|
-
import {
|
|
20
|
-
import { C as
|
|
21
|
-
import { C as
|
|
22
|
-
import { C as
|
|
23
|
-
import { C as
|
|
24
|
-
import { C as
|
|
25
|
-
import { C as _o
|
|
26
|
-
import { C as
|
|
27
|
-
import {
|
|
28
|
-
import { D as
|
|
29
|
-
import { D as
|
|
30
|
-
import { D as
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import { F as
|
|
34
|
-
import { F as Jo } from "./
|
|
35
|
-
import { F as
|
|
36
|
-
import { F as
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import { I as tr } from "./
|
|
40
|
-
import {
|
|
41
|
-
import { L as
|
|
42
|
-
import { L as
|
|
43
|
-
import {
|
|
44
|
-
import { M as dr } from "./
|
|
45
|
-
import { M as
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import { P as
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import { R as Ur } from "./
|
|
54
|
-
import { R as
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import { S as
|
|
58
|
-
import { S as qr } from "./
|
|
59
|
-
import { S as zr } from "./
|
|
60
|
-
import { S as
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import { T as
|
|
64
|
-
import { T as
|
|
65
|
-
import { T as
|
|
66
|
-
import { T as
|
|
67
|
-
import { T as
|
|
68
|
-
import { T as le } from "./
|
|
69
|
-
import { T as ce, a as
|
|
70
|
-
import { T as Ae } from "./
|
|
71
|
-
import { T as Fe } from "./
|
|
72
|
-
import { T as
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
15
|
+
import { B as po, a as mo } from "./breakpoints-o3dzSzrU.js";
|
|
16
|
+
import { B as xo } from "./Badge-DSWigoGC.js";
|
|
17
|
+
import { B as To } from "./Blockquote-CNIuJFHq.js";
|
|
18
|
+
import { B as uo } from "./Breadcrumbs-Bx5UgwDy.js";
|
|
19
|
+
import { B as no } from "./Button-DhEv0YFk.js";
|
|
20
|
+
import { C as Co } from "./Card-DzClqJuu.js";
|
|
21
|
+
import { C as So } from "./Checkbox-XKL_Q5qj.js";
|
|
22
|
+
import { C as Eo } from "./Chip-Cfo0v3Z8.js";
|
|
23
|
+
import { C as yo, a as Ro } from "./ChoiceCardGroup-CvFzZlgI.js";
|
|
24
|
+
import { C as Lo } from "./Code-DaEpXHfF.js";
|
|
25
|
+
import { C as _o } from "./CodeBlock-BWxQyKRo.js";
|
|
26
|
+
import { C as Po, R as ho } from "./Col-D2TfZKiM.js";
|
|
27
|
+
import { C as Mo } from "./ColorPicker-2udt1ORM.js";
|
|
28
|
+
import { D as Ko } from "./DatePicker-WM9TC6L_.js";
|
|
29
|
+
import { D as Oo } from "./DateTimePicker-DBtcWK0F.js";
|
|
30
|
+
import { D as Yo } from "./Divider-LtH3dLgw.js";
|
|
31
|
+
import { D as Go } from "./Dropdown-DKAXue5_.js";
|
|
32
|
+
import { E as jo } from "./EmptyState-CetM49vk.js";
|
|
33
|
+
import { F as Ho } from "./FileUploader-VtmmwUFE.js";
|
|
34
|
+
import { F as Jo, S as Vo } from "./Sidebar-DRCs2ygZ.js";
|
|
35
|
+
import { F as Xo } from "./Flag-BWCX6oSR.js";
|
|
36
|
+
import { F as $o } from "./Flex-Bj3mMF5A.js";
|
|
37
|
+
import { F as rr } from "./FullscreenToggle-oWzYqUPH.js";
|
|
38
|
+
import { G as ar } from "./Grid-CY-syhTX.js";
|
|
39
|
+
import { I as tr, a as pr } from "./names-D8ABK2Wk.js";
|
|
40
|
+
import { I as fr } from "./IconButton-CBusrDa9.js";
|
|
41
|
+
import { L as ir } from "./List-BHgFI9Ll.js";
|
|
42
|
+
import { L as lr } from "./ListItem-B4yqZR-Z.js";
|
|
43
|
+
import { L as cr } from "./Loader-C4JoXOyA.js";
|
|
44
|
+
import { M as dr } from "./Masonry-BTvtDdnt.js";
|
|
45
|
+
import { M as Cr } from "./Modal-BuaPDlKV.js";
|
|
46
|
+
import { M as Sr } from "./MultiSelect-BGRT_B60.js";
|
|
47
|
+
import { M as Er } from "./MultilineTextField-CwNCJ9lZ.js";
|
|
48
|
+
import { N as yr } from "./NumberField-DBvhSQCw.js";
|
|
49
|
+
import { O as Br } from "./OtpField-CTq-CUbF.js";
|
|
50
|
+
import { P as br } from "./PageLayout-DddzYw2B.js";
|
|
51
|
+
import { P as Nr } from "./Pagination-CN9V8M5C.js";
|
|
52
|
+
import { P as hr } from "./Popover-CgIU4Rhg.js";
|
|
53
|
+
import { R as Mr, a as Ur } from "./RadioGroup-DbodUJW8.js";
|
|
54
|
+
import { R as kr } from "./RemoveDialog-Bvt6sH79.js";
|
|
55
|
+
import { R as Qr } from "./RichTextEditor-BTx8Py3I.js";
|
|
56
|
+
import { R as vr } from "./RootLayout-DCpfuFWF.js";
|
|
57
|
+
import { S as wr } from "./Select-PbTyxB1Q.js";
|
|
58
|
+
import { S as qr } from "./Slider-oGXd5e9X.js";
|
|
59
|
+
import { S as zr, a as Jr } from "./SpeedDial-DgFj16BQ.js";
|
|
60
|
+
import { S as Wr } from "./Stepper-COKAyN1L.js";
|
|
61
|
+
import { S as Zr } from "./SwatchPicker-D30aSrbY.js";
|
|
62
|
+
import { S as oe } from "./Switch-DMPJ0fhB.js";
|
|
63
|
+
import { T as ee } from "./Table-BjPLvMbf.js";
|
|
64
|
+
import { T as se } from "./Tabs--DDM-zKe.js";
|
|
65
|
+
import { T as pe } from "./TagsField-BTJcZS9P.js";
|
|
66
|
+
import { T as fe } from "./TextField-DMI1X09n.js";
|
|
67
|
+
import { T as ie } from "./ThemeToggle-Deh9j8pm.js";
|
|
68
|
+
import { T as le } from "./TimePicker-3JgvK2on.js";
|
|
69
|
+
import { T as ce, a as ne } from "./Timeline-WkV4k_we.js";
|
|
70
|
+
import { T as Ae } from "./Toaster-D-eG1xv7.js";
|
|
71
|
+
import { T as Fe, a as Se } from "./ToggleButtonGroup-BWd7MOcc.js";
|
|
72
|
+
import { T as Ee } from "./Tooltip-Cb_FKxT9.js";
|
|
73
|
+
import { T as ye } from "./TranslatedFields-CI0F9bHw.js";
|
|
74
|
+
import { T as Be } from "./Typography-Cta6Rg4L.js";
|
|
75
|
+
import { U as be } from "./UserCard-BhqtX1vU.js";
|
|
76
|
+
import { t as Ne } from "./toastStore-Cx_JOKwS.js";
|
|
75
77
|
export {
|
|
76
78
|
X as Accordion,
|
|
77
79
|
Z as AccordionItem,
|
|
78
80
|
oo as Alert,
|
|
79
81
|
eo as Avatar,
|
|
80
82
|
so as AvatarGroup,
|
|
81
|
-
po as
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
83
|
+
po as BREAKPOINTS,
|
|
84
|
+
mo as BREAKPOINT_ORDER,
|
|
85
|
+
xo as Badge,
|
|
86
|
+
To as Blockquote,
|
|
87
|
+
uo as Breadcrumbs,
|
|
88
|
+
no as Button,
|
|
89
|
+
Co as Card,
|
|
90
|
+
So as Checkbox,
|
|
91
|
+
Eo as Chip,
|
|
92
|
+
yo as ChoiceCard,
|
|
93
|
+
Ro as ChoiceCardGroup,
|
|
94
|
+
Lo as Code,
|
|
95
|
+
_o as CodeBlock,
|
|
96
|
+
Po as Col,
|
|
97
|
+
Mo as ColorPicker,
|
|
98
|
+
d as ConfigProvider,
|
|
95
99
|
A as DEFAULT_FONT_FAMILY,
|
|
96
100
|
C as DEFAULT_NESTED_TAB_QUERY_KEY,
|
|
97
101
|
F as DEFAULT_STEP_QUERY_KEY,
|
|
98
102
|
S as DEFAULT_TABS_QUERY_KEY,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
O as DEFAULT_TRANSLATIONS_NAMESPACE,
|
|
104
|
+
Ko as DatePicker,
|
|
105
|
+
Oo as DateTimePicker,
|
|
106
|
+
Yo as Divider,
|
|
107
|
+
Go as Dropdown,
|
|
108
|
+
jo as EmptyState,
|
|
109
|
+
Ho as FileUploader,
|
|
110
|
+
Jo as FirstRouteRedirect,
|
|
111
|
+
Xo as Flag,
|
|
112
|
+
$o as Flex,
|
|
109
113
|
e as Form,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
+
rr as FullscreenToggle,
|
|
115
|
+
ar as Grid,
|
|
116
|
+
tr as ICON_COUNT,
|
|
117
|
+
pr as ICON_NAMES,
|
|
114
118
|
J as Icon,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
119
|
+
fr as IconButton,
|
|
120
|
+
ir as List,
|
|
121
|
+
lr as ListItem,
|
|
122
|
+
cr as Loader,
|
|
123
|
+
dr as Masonry,
|
|
124
|
+
Cr as Modal,
|
|
125
|
+
Sr as MultiSelect,
|
|
126
|
+
Er as MultilineTextField,
|
|
127
|
+
yr as NumberField,
|
|
128
|
+
Br as OtpField,
|
|
129
|
+
br as PageLayout,
|
|
130
|
+
Nr as Pagination,
|
|
131
|
+
hr as Popover,
|
|
132
|
+
Mr as Radio,
|
|
133
|
+
Ur as RadioGroup,
|
|
134
|
+
kr as RemoveDialog,
|
|
135
|
+
Qr as RichTextEditor,
|
|
136
|
+
vr as RootLayout,
|
|
137
|
+
ho as Row,
|
|
138
|
+
wr as Select,
|
|
139
|
+
Vo as Sidebar,
|
|
140
|
+
qr as Slider,
|
|
141
|
+
zr as SpeedDial,
|
|
142
|
+
Jr as SpeedDialAction,
|
|
143
|
+
Wr as Stepper,
|
|
144
|
+
Zr as SwatchPicker,
|
|
145
|
+
oe as Switch,
|
|
146
|
+
ee as Table,
|
|
147
|
+
se as Tabs,
|
|
148
|
+
pe as TagsField,
|
|
149
|
+
fe as TextField,
|
|
150
|
+
ie as ThemeToggle,
|
|
151
|
+
le as TimePicker,
|
|
152
|
+
ce as Timeline,
|
|
153
|
+
ne as TimelineItem,
|
|
154
|
+
Ae as Toaster,
|
|
155
|
+
Fe as ToggleButton,
|
|
156
|
+
Se as ToggleButtonGroup,
|
|
157
|
+
Ee as Tooltip,
|
|
158
|
+
ye as TranslatedFields,
|
|
159
|
+
Be as Typography,
|
|
160
|
+
be as UserCard,
|
|
156
161
|
g as applyTheme,
|
|
157
162
|
q as buildTableQuery,
|
|
158
|
-
|
|
163
|
+
Q as buildTranslationName,
|
|
159
164
|
Y as buildTranslations,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
165
|
+
M as createAppTranslator,
|
|
166
|
+
U as createTranslator,
|
|
167
|
+
K as flagFor,
|
|
163
168
|
v as flattenTranslations,
|
|
164
169
|
T as getAccessKeys,
|
|
165
170
|
l as hasAccess,
|
|
@@ -168,22 +173,22 @@ export {
|
|
|
168
173
|
H as parseTableQuery,
|
|
169
174
|
u as setAccessKeys,
|
|
170
175
|
w as toFormData,
|
|
171
|
-
|
|
176
|
+
Ne as toast,
|
|
172
177
|
c as useAccessKeys,
|
|
173
178
|
s as useDisclosure,
|
|
174
179
|
t as useForm,
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
180
|
+
E as useHeaderConfig,
|
|
181
|
+
D as useLanguage,
|
|
182
|
+
y as useLocales,
|
|
178
183
|
m as useLockBodyScroll,
|
|
179
184
|
x as useMediaQuery,
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
185
|
+
R as useNestedTabQueryKey,
|
|
186
|
+
B as useStepQueryKey,
|
|
187
|
+
L as useT,
|
|
188
|
+
b as useTableQueryConfig,
|
|
189
|
+
_ as useTabsQueryKey,
|
|
190
|
+
N as useTheme,
|
|
191
|
+
P as useTranslations,
|
|
192
|
+
h as useTranslationsNamespace
|
|
188
193
|
};
|
|
189
194
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The library's shared responsive breakpoints — the single source of truth for width thresholds.
|
|
3
|
+
*
|
|
4
|
+
* Mobile-first **min-width** values in px. `xs` is the base (`0`); the two values the component CSS
|
|
5
|
+
* already keys off (`≤575.98px` phones, `≤1279.98px` tablet/overlay) line up with `sm` (576) and `xl`
|
|
6
|
+
* (1280), so this scale is a superset of what the styles already use rather than a new set. Consume
|
|
7
|
+
* these instead of hardcoding pixel thresholds, and derive the `Breakpoint` type from here rather than
|
|
8
|
+
* re-listing the keys locally.
|
|
9
|
+
*/
|
|
10
|
+
export declare const BREAKPOINTS: {
|
|
11
|
+
readonly xs: 0;
|
|
12
|
+
readonly sm: 576;
|
|
13
|
+
readonly md: 768;
|
|
14
|
+
readonly lg: 992;
|
|
15
|
+
readonly xl: 1280;
|
|
16
|
+
};
|
|
17
|
+
/** A responsive breakpoint key (`'xs' | 'sm' | 'md' | 'lg' | 'xl'`). */
|
|
18
|
+
export type Breakpoint = keyof typeof BREAKPOINTS;
|
|
19
|
+
/** Breakpoint keys in ascending (mobile-first) order. */
|
|
20
|
+
export declare const BREAKPOINT_ORDER: readonly Breakpoint[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The library's shared responsive breakpoints — the single source of truth for width thresholds.
|
|
3
|
+
*
|
|
4
|
+
* Mobile-first **min-width** values in px. `xs` is the base (`0`); the two values the component CSS
|
|
5
|
+
* already keys off (`≤575.98px` phones, `≤1279.98px` tablet/overlay) line up with `sm` (576) and `xl`
|
|
6
|
+
* (1280), so this scale is a superset of what the styles already use rather than a new set. Consume
|
|
7
|
+
* these instead of hardcoding pixel thresholds, and derive the `Breakpoint` type from here rather than
|
|
8
|
+
* re-listing the keys locally.
|
|
9
|
+
*/
|
|
10
|
+
export declare const BREAKPOINTS: {
|
|
11
|
+
readonly xs: 0;
|
|
12
|
+
readonly sm: 576;
|
|
13
|
+
readonly md: 768;
|
|
14
|
+
readonly lg: 992;
|
|
15
|
+
readonly xl: 1280;
|
|
16
|
+
};
|
|
17
|
+
/** A responsive breakpoint key (`'xs' | 'sm' | 'md' | 'lg' | 'xl'`). */
|
|
18
|
+
export type Breakpoint = keyof typeof BREAKPOINTS;
|
|
19
|
+
/** Breakpoint keys in ascending (mobile-first) order. */
|
|
20
|
+
export declare const BREAKPOINT_ORDER: readonly Breakpoint[];
|
package/dist/theme/index.d.cts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { applyTheme } from './applyTheme';
|
|
2
2
|
export type { ThemePalette, ThemeColor } from './applyTheme';
|
|
3
|
+
export { BREAKPOINTS, BREAKPOINT_ORDER } from './breakpoints';
|
|
4
|
+
export type { Breakpoint } from './breakpoints';
|
|
3
5
|
export { ConfigProvider, useTheme, useLocales, useTranslationsNamespace, useTabsQueryKey, useNestedTabQueryKey, useStepQueryKey, useTableQueryConfig, useHeaderConfig, useT, useTranslations, useLanguage, DEFAULT_TABS_QUERY_KEY, DEFAULT_NESTED_TAB_QUERY_KEY, DEFAULT_STEP_QUERY_KEY, DEFAULT_FONT_FAMILY, } from './ConfigProvider';
|
|
4
6
|
export type { Config, ThemeConfig, ThemeColors, ThemeMode, ConfigProviderProps, LocaleConfig, KeysConfig, TableConfig, TableQueryConfig, HeaderConfig, HeaderUser, I18nConfig, } from './ConfigProvider';
|
|
5
7
|
export type { Messages, MessageKey, MessageCatalog, MessageOverrides, Translator, AppMessages, AppTranslator, } from '../i18n/messages';
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { applyTheme } from './applyTheme';
|
|
2
2
|
export type { ThemePalette, ThemeColor } from './applyTheme';
|
|
3
|
+
export { BREAKPOINTS, BREAKPOINT_ORDER } from './breakpoints';
|
|
4
|
+
export type { Breakpoint } from './breakpoints';
|
|
3
5
|
export { ConfigProvider, useTheme, useLocales, useTranslationsNamespace, useTabsQueryKey, useNestedTabQueryKey, useStepQueryKey, useTableQueryConfig, useHeaderConfig, useT, useTranslations, useLanguage, DEFAULT_TABS_QUERY_KEY, DEFAULT_NESTED_TAB_QUERY_KEY, DEFAULT_STEP_QUERY_KEY, DEFAULT_FONT_FAMILY, } from './ConfigProvider';
|
|
4
6
|
export type { Config, ThemeConfig, ThemeColors, ThemeMode, ConfigProviderProps, LocaleConfig, KeysConfig, TableConfig, TableQueryConfig, HeaderConfig, HeaderUser, I18nConfig, } from './ConfigProvider';
|
|
5
7
|
export type { Messages, MessageKey, MessageCatalog, MessageOverrides, Translator, AppMessages, AppTranslator, } from '../i18n/messages';
|