@namroodinc/liquid-editorial 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +67 -2
- package/dist/chunks/Icon-CGY1FNXT.js +77 -0
- package/dist/chunks/Icon-CGY1FNXT.js.map +1 -0
- package/dist/chunks/Icon-CWsA1W83.cjs +2 -0
- package/dist/chunks/Icon-CWsA1W83.cjs.map +1 -0
- package/dist/components/AssetGrid/index.cjs +2 -0
- package/dist/components/AssetGrid/index.cjs.map +1 -0
- package/dist/components/AssetGrid/index.d.cts +54 -0
- package/dist/components/AssetGrid/index.d.cts.map +1 -0
- package/dist/components/AssetGrid/index.d.ts +54 -0
- package/dist/components/AssetGrid/index.d.ts.map +1 -0
- package/dist/components/AssetGrid/index.js +137 -0
- package/dist/components/AssetGrid/index.js.map +1 -0
- package/dist/components/AssetGrid/style.css +196 -0
- package/dist/components/Avatar/index.cjs +2 -0
- package/dist/components/Avatar/index.cjs.map +1 -0
- package/dist/components/Avatar/index.d.cts +24 -0
- package/dist/components/Avatar/index.d.cts.map +1 -0
- package/dist/components/Avatar/index.d.ts +24 -0
- package/dist/components/Avatar/index.d.ts.map +1 -0
- package/dist/components/Avatar/index.js +43 -0
- package/dist/components/Avatar/index.js.map +1 -0
- package/dist/components/Avatar/style.css +70 -0
- package/dist/components/Badge/index.cjs +2 -0
- package/dist/components/Badge/index.cjs.map +1 -0
- package/dist/components/Badge/index.d.cts +25 -0
- package/dist/components/Badge/index.d.cts.map +1 -0
- package/dist/components/Badge/index.d.ts +25 -0
- package/dist/components/Badge/index.d.ts.map +1 -0
- package/dist/components/Badge/index.js +28 -0
- package/dist/components/Badge/index.js.map +1 -0
- package/dist/components/Badge/style.css +103 -0
- package/dist/components/Board/index.cjs +2 -0
- package/dist/components/Board/index.cjs.map +1 -0
- package/dist/components/Board/index.d.cts +62 -0
- package/dist/components/Board/index.d.cts.map +1 -0
- package/dist/components/Board/index.d.ts +62 -0
- package/dist/components/Board/index.d.ts.map +1 -0
- package/dist/components/Board/index.js +227 -0
- package/dist/components/Board/index.js.map +1 -0
- package/dist/components/Board/style.css +145 -0
- package/dist/components/Button/index.cjs +2 -0
- package/dist/components/Button/index.cjs.map +1 -0
- package/dist/components/Button/index.d.cts +22 -0
- package/dist/components/Button/index.d.cts.map +1 -0
- package/dist/components/Button/index.d.ts +22 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/Button/index.js +37 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/Button/style.css +139 -0
- package/dist/components/ButtonGroup/index.cjs +2 -0
- package/dist/components/ButtonGroup/index.cjs.map +1 -0
- package/dist/components/ButtonGroup/index.d.cts +17 -0
- package/dist/components/ButtonGroup/index.d.cts.map +1 -0
- package/dist/components/ButtonGroup/index.d.ts +17 -0
- package/dist/components/ButtonGroup/index.d.ts.map +1 -0
- package/dist/components/ButtonGroup/index.js +18 -0
- package/dist/components/ButtonGroup/index.js.map +1 -0
- package/dist/components/ButtonGroup/style.css +66 -0
- package/dist/components/Choice/index.cjs +2 -0
- package/dist/components/Choice/index.cjs.map +1 -0
- package/dist/components/Choice/index.d.cts +25 -0
- package/dist/components/Choice/index.d.cts.map +1 -0
- package/dist/components/Choice/index.d.ts +25 -0
- package/dist/components/Choice/index.d.ts.map +1 -0
- package/dist/components/Choice/index.js +58 -0
- package/dist/components/Choice/index.js.map +1 -0
- package/dist/components/Choice/style.css +96 -0
- package/dist/components/Container/index.cjs +2 -0
- package/dist/components/Container/index.cjs.map +1 -0
- package/dist/components/Container/index.d.cts +19 -0
- package/dist/components/Container/index.d.cts.map +1 -0
- package/dist/components/Container/index.d.ts +19 -0
- package/dist/components/Container/index.d.ts.map +1 -0
- package/dist/components/Container/index.js +20 -0
- package/dist/components/Container/index.js.map +1 -0
- package/dist/components/Container/style.css +41 -0
- package/dist/components/DatePicker/index.cjs +2 -0
- package/dist/components/DatePicker/index.cjs.map +1 -0
- package/dist/components/DatePicker/index.d.cts +57 -0
- package/dist/components/DatePicker/index.d.cts.map +1 -0
- package/dist/components/DatePicker/index.d.ts +57 -0
- package/dist/components/DatePicker/index.d.ts.map +1 -0
- package/dist/components/DatePicker/index.js +248 -0
- package/dist/components/DatePicker/index.js.map +1 -0
- package/dist/components/DatePicker/style.css +149 -0
- package/dist/components/Drawer/index.cjs +2 -0
- package/dist/components/Drawer/index.cjs.map +1 -0
- package/dist/components/Drawer/index.d.cts +23 -0
- package/dist/components/Drawer/index.d.cts.map +1 -0
- package/dist/components/Drawer/index.d.ts +23 -0
- package/dist/components/Drawer/index.d.ts.map +1 -0
- package/dist/components/Drawer/index.js +85 -0
- package/dist/components/Drawer/index.js.map +1 -0
- package/dist/components/Drawer/style.css +147 -0
- package/dist/components/EntryPicker/index.cjs +2 -0
- package/dist/components/EntryPicker/index.cjs.map +1 -0
- package/dist/components/EntryPicker/index.d.cts +36 -0
- package/dist/components/EntryPicker/index.d.cts.map +1 -0
- package/dist/components/EntryPicker/index.d.ts +36 -0
- package/dist/components/EntryPicker/index.d.ts.map +1 -0
- package/dist/components/EntryPicker/index.js +178 -0
- package/dist/components/EntryPicker/index.js.map +1 -0
- package/dist/components/EntryPicker/style.css +162 -0
- package/dist/components/Field/index.cjs +2 -0
- package/dist/components/Field/index.cjs.map +1 -0
- package/dist/components/Field/index.d.cts +19 -0
- package/dist/components/Field/index.d.cts.map +1 -0
- package/dist/components/Field/index.d.ts +19 -0
- package/dist/components/Field/index.d.ts.map +1 -0
- package/dist/components/Field/index.js +41 -0
- package/dist/components/Field/index.js.map +1 -0
- package/dist/components/Field/style.css +100 -0
- package/dist/components/FieldAffix/index.cjs +2 -0
- package/dist/components/FieldAffix/index.cjs.map +1 -0
- package/dist/components/FieldAffix/index.d.cts +19 -0
- package/dist/components/FieldAffix/index.d.cts.map +1 -0
- package/dist/components/FieldAffix/index.d.ts +19 -0
- package/dist/components/FieldAffix/index.d.ts.map +1 -0
- package/dist/components/FieldAffix/index.js +45 -0
- package/dist/components/FieldAffix/index.js.map +1 -0
- package/dist/components/FieldAffix/style.css +54 -0
- package/dist/components/Grid/index.cjs +2 -0
- package/dist/components/Grid/index.cjs.map +1 -0
- package/dist/components/Grid/index.d.cts +44 -0
- package/dist/components/Grid/index.d.cts.map +1 -0
- package/dist/components/Grid/index.d.ts +44 -0
- package/dist/components/Grid/index.d.ts.map +1 -0
- package/dist/components/Grid/index.js +49 -0
- package/dist/components/Grid/index.js.map +1 -0
- package/dist/components/Grid/style.css +226 -0
- package/dist/components/Icon/icons.d.cts +64 -0
- package/dist/components/Icon/icons.d.cts.map +1 -0
- package/dist/components/Icon/icons.d.ts +64 -0
- package/dist/components/Icon/icons.d.ts.map +1 -0
- package/dist/components/Icon/index.cjs +1 -0
- package/dist/components/Icon/index.d.cts +15 -0
- package/dist/components/Icon/index.d.cts.map +1 -0
- package/dist/components/Icon/index.d.ts +15 -0
- package/dist/components/Icon/index.d.ts.map +1 -0
- package/dist/components/Icon/index.js +1 -0
- package/dist/components/Icon/style.css +10 -0
- package/dist/components/ImageCropper/index.cjs +2 -0
- package/dist/components/ImageCropper/index.cjs.map +1 -0
- package/dist/components/ImageCropper/index.d.cts +66 -0
- package/dist/components/ImageCropper/index.d.cts.map +1 -0
- package/dist/components/ImageCropper/index.d.ts +66 -0
- package/dist/components/ImageCropper/index.d.ts.map +1 -0
- package/dist/components/ImageCropper/index.js +263 -0
- package/dist/components/ImageCropper/index.js.map +1 -0
- package/dist/components/ImageCropper/style.css +160 -0
- package/dist/components/Menu/index.cjs +2 -0
- package/dist/components/Menu/index.cjs.map +1 -0
- package/dist/components/Menu/index.d.cts +35 -0
- package/dist/components/Menu/index.d.cts.map +1 -0
- package/dist/components/Menu/index.d.ts +35 -0
- package/dist/components/Menu/index.d.ts.map +1 -0
- package/dist/components/Menu/index.js +110 -0
- package/dist/components/Menu/index.js.map +1 -0
- package/dist/components/Menu/style.css +87 -0
- package/dist/components/Modal/index.cjs +2 -0
- package/dist/components/Modal/index.cjs.map +1 -0
- package/dist/components/Modal/index.d.cts +19 -0
- package/dist/components/Modal/index.d.cts.map +1 -0
- package/dist/components/Modal/index.d.ts +19 -0
- package/dist/components/Modal/index.d.ts.map +1 -0
- package/dist/components/Modal/index.js +84 -0
- package/dist/components/Modal/index.js.map +1 -0
- package/dist/components/Modal/style.css +106 -0
- package/dist/components/NumberField/index.cjs +2 -0
- package/dist/components/NumberField/index.cjs.map +1 -0
- package/dist/components/NumberField/index.d.cts +50 -0
- package/dist/components/NumberField/index.d.cts.map +1 -0
- package/dist/components/NumberField/index.d.ts +50 -0
- package/dist/components/NumberField/index.d.ts.map +1 -0
- package/dist/components/NumberField/index.js +124 -0
- package/dist/components/NumberField/index.js.map +1 -0
- package/dist/components/NumberField/style.css +85 -0
- package/dist/components/Popover/index.cjs +2 -0
- package/dist/components/Popover/index.cjs.map +1 -0
- package/dist/components/Popover/index.d.cts +28 -0
- package/dist/components/Popover/index.d.cts.map +1 -0
- package/dist/components/Popover/index.d.ts +28 -0
- package/dist/components/Popover/index.d.ts.map +1 -0
- package/dist/components/Popover/index.js +52 -0
- package/dist/components/Popover/index.js.map +1 -0
- package/dist/components/Popover/style.css +23 -0
- package/dist/components/RichTextEditor/index.cjs +2 -0
- package/dist/components/RichTextEditor/index.cjs.map +1 -0
- package/dist/components/RichTextEditor/index.d.cts +23 -0
- package/dist/components/RichTextEditor/index.d.cts.map +1 -0
- package/dist/components/RichTextEditor/index.d.ts +23 -0
- package/dist/components/RichTextEditor/index.d.ts.map +1 -0
- package/dist/components/RichTextEditor/index.js +175 -0
- package/dist/components/RichTextEditor/index.js.map +1 -0
- package/dist/components/RichTextEditor/style.css +136 -0
- package/dist/components/SearchField/index.cjs +2 -0
- package/dist/components/SearchField/index.cjs.map +1 -0
- package/dist/components/SearchField/index.d.cts +11 -0
- package/dist/components/SearchField/index.d.cts.map +1 -0
- package/dist/components/SearchField/index.d.ts +11 -0
- package/dist/components/SearchField/index.d.ts.map +1 -0
- package/dist/components/SearchField/index.js +49 -0
- package/dist/components/SearchField/index.js.map +1 -0
- package/dist/components/SearchField/style.css +27 -0
- package/dist/components/Select/index.cjs +2 -0
- package/dist/components/Select/index.cjs.map +1 -0
- package/dist/components/Select/index.d.cts +26 -0
- package/dist/components/Select/index.d.cts.map +1 -0
- package/dist/components/Select/index.d.ts +26 -0
- package/dist/components/Select/index.d.ts.map +1 -0
- package/dist/components/Select/index.js +129 -0
- package/dist/components/Select/index.js.map +1 -0
- package/dist/components/Select/style.css +88 -0
- package/dist/components/SelectionCard/index.cjs +2 -0
- package/dist/components/SelectionCard/index.cjs.map +1 -0
- package/dist/components/SelectionCard/index.d.cts +32 -0
- package/dist/components/SelectionCard/index.d.cts.map +1 -0
- package/dist/components/SelectionCard/index.d.ts +32 -0
- package/dist/components/SelectionCard/index.d.ts.map +1 -0
- package/dist/components/SelectionCard/index.js +71 -0
- package/dist/components/SelectionCard/index.js.map +1 -0
- package/dist/components/SelectionCard/style.css +133 -0
- package/dist/components/SideNav/index.cjs +2 -0
- package/dist/components/SideNav/index.cjs.map +1 -0
- package/dist/components/SideNav/index.d.cts +58 -0
- package/dist/components/SideNav/index.d.cts.map +1 -0
- package/dist/components/SideNav/index.d.ts +58 -0
- package/dist/components/SideNav/index.d.ts.map +1 -0
- package/dist/components/SideNav/index.js +113 -0
- package/dist/components/SideNav/index.js.map +1 -0
- package/dist/components/SideNav/style.css +184 -0
- package/dist/components/Skeleton/index.cjs +2 -0
- package/dist/components/Skeleton/index.cjs.map +1 -0
- package/dist/components/Skeleton/index.d.cts +21 -0
- package/dist/components/Skeleton/index.d.cts.map +1 -0
- package/dist/components/Skeleton/index.d.ts +21 -0
- package/dist/components/Skeleton/index.d.ts.map +1 -0
- package/dist/components/Skeleton/index.js +31 -0
- package/dist/components/Skeleton/index.js.map +1 -0
- package/dist/components/Skeleton/style.css +55 -0
- package/dist/components/Slider/index.cjs +2 -0
- package/dist/components/Slider/index.cjs.map +1 -0
- package/dist/components/Slider/index.d.cts +40 -0
- package/dist/components/Slider/index.d.cts.map +1 -0
- package/dist/components/Slider/index.d.ts +40 -0
- package/dist/components/Slider/index.d.ts.map +1 -0
- package/dist/components/Slider/index.js +117 -0
- package/dist/components/Slider/index.js.map +1 -0
- package/dist/components/Slider/style.css +156 -0
- package/dist/components/SortableList/index.cjs +2 -0
- package/dist/components/SortableList/index.cjs.map +1 -0
- package/dist/components/SortableList/index.d.cts +27 -0
- package/dist/components/SortableList/index.d.cts.map +1 -0
- package/dist/components/SortableList/index.d.ts +27 -0
- package/dist/components/SortableList/index.d.ts.map +1 -0
- package/dist/components/SortableList/index.js +85 -0
- package/dist/components/SortableList/index.js.map +1 -0
- package/dist/components/SortableList/style.css +71 -0
- package/dist/components/Stepper/index.cjs +2 -0
- package/dist/components/Stepper/index.cjs.map +1 -0
- package/dist/components/Stepper/index.d.cts +32 -0
- package/dist/components/Stepper/index.d.cts.map +1 -0
- package/dist/components/Stepper/index.d.ts +32 -0
- package/dist/components/Stepper/index.d.ts.map +1 -0
- package/dist/components/Stepper/index.js +69 -0
- package/dist/components/Stepper/index.js.map +1 -0
- package/dist/components/Stepper/style.css +154 -0
- package/dist/components/SubNav/index.cjs +2 -0
- package/dist/components/SubNav/index.cjs.map +1 -0
- package/dist/components/SubNav/index.d.cts +31 -0
- package/dist/components/SubNav/index.d.cts.map +1 -0
- package/dist/components/SubNav/index.d.ts +31 -0
- package/dist/components/SubNav/index.d.ts.map +1 -0
- package/dist/components/SubNav/index.js +62 -0
- package/dist/components/SubNav/index.js.map +1 -0
- package/dist/components/SubNav/style.css +86 -0
- package/dist/components/Switch/index.cjs +2 -0
- package/dist/components/Switch/index.cjs.map +1 -0
- package/dist/components/Switch/index.d.cts +12 -0
- package/dist/components/Switch/index.d.cts.map +1 -0
- package/dist/components/Switch/index.d.ts +12 -0
- package/dist/components/Switch/index.d.ts.map +1 -0
- package/dist/components/Switch/index.js +37 -0
- package/dist/components/Switch/index.js.map +1 -0
- package/dist/components/Switch/style.css +65 -0
- package/dist/components/Table/index.cjs +2 -0
- package/dist/components/Table/index.cjs.map +1 -0
- package/dist/components/Table/index.d.cts +54 -0
- package/dist/components/Table/index.d.cts.map +1 -0
- package/dist/components/Table/index.d.ts +54 -0
- package/dist/components/Table/index.d.ts.map +1 -0
- package/dist/components/Table/index.js +102 -0
- package/dist/components/Table/index.js.map +1 -0
- package/dist/components/Table/style.css +122 -0
- package/dist/components/TagsInput/index.cjs +2 -0
- package/dist/components/TagsInput/index.cjs.map +1 -0
- package/dist/components/TagsInput/index.d.cts +22 -0
- package/dist/components/TagsInput/index.d.cts.map +1 -0
- package/dist/components/TagsInput/index.d.ts +22 -0
- package/dist/components/TagsInput/index.d.ts.map +1 -0
- package/dist/components/TagsInput/index.js +60 -0
- package/dist/components/TagsInput/index.js.map +1 -0
- package/dist/components/TagsInput/style.css +83 -0
- package/dist/components/TextField/index.cjs +2 -0
- package/dist/components/TextField/index.cjs.map +1 -0
- package/dist/components/TextField/index.d.cts +11 -0
- package/dist/components/TextField/index.d.cts.map +1 -0
- package/dist/components/TextField/index.d.ts +11 -0
- package/dist/components/TextField/index.d.ts.map +1 -0
- package/dist/components/TextField/index.js +29 -0
- package/dist/components/TextField/index.js.map +1 -0
- package/dist/components/TextField/style.css +1 -0
- package/dist/components/Time/index.cjs +2 -0
- package/dist/components/Time/index.cjs.map +1 -0
- package/dist/components/Time/index.d.cts +35 -0
- package/dist/components/Time/index.d.cts.map +1 -0
- package/dist/components/Time/index.d.ts +35 -0
- package/dist/components/Time/index.d.ts.map +1 -0
- package/dist/components/Time/index.js +98 -0
- package/dist/components/Time/index.js.map +1 -0
- package/dist/components/Time/style.css +30 -0
- package/dist/components/Toast/index.cjs +2 -0
- package/dist/components/Toast/index.cjs.map +1 -0
- package/dist/components/Toast/index.d.cts +30 -0
- package/dist/components/Toast/index.d.cts.map +1 -0
- package/dist/components/Toast/index.d.ts +30 -0
- package/dist/components/Toast/index.d.ts.map +1 -0
- package/dist/components/Toast/index.js +96 -0
- package/dist/components/Toast/index.js.map +1 -0
- package/dist/components/Toast/style.css +80 -0
- package/dist/components/TopNav/index.cjs +2 -0
- package/dist/components/TopNav/index.cjs.map +1 -0
- package/dist/components/TopNav/index.d.cts +28 -0
- package/dist/components/TopNav/index.d.cts.map +1 -0
- package/dist/components/TopNav/index.d.ts +28 -0
- package/dist/components/TopNav/index.d.ts.map +1 -0
- package/dist/components/TopNav/index.js +45 -0
- package/dist/components/TopNav/index.js.map +1 -0
- package/dist/components/TopNav/style.css +80 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +77 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +77 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +38 -0
- package/dist/reset.css +15 -0
- package/dist/reset.css.d.ts +2 -0
- package/dist/styles.css +39 -0
- package/dist/styles.css.d.ts +2 -0
- package/dist/tokens.css +457 -0
- package/dist/tokens.css.d.ts +2 -0
- package/package.json +130 -4
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { useLayoutEffect as e, useRef as t, useState as n } from "react";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/FieldAffix/index.tsx
|
|
5
|
+
function a(...e) {
|
|
6
|
+
return e.filter(Boolean).join(" ");
|
|
7
|
+
}
|
|
8
|
+
function o({ lead: o, trail: s, isTrailInteractive: c = !1, className: l, children: u }) {
|
|
9
|
+
let d = t(null), f = t(null), [p, m] = n({
|
|
10
|
+
start: 0,
|
|
11
|
+
end: 0
|
|
12
|
+
});
|
|
13
|
+
e(() => {
|
|
14
|
+
let e = () => m({
|
|
15
|
+
start: d.current?.offsetWidth ?? 0,
|
|
16
|
+
end: f.current?.offsetWidth ?? 0
|
|
17
|
+
});
|
|
18
|
+
if (e(), typeof ResizeObserver > "u") return;
|
|
19
|
+
let t = new ResizeObserver(e);
|
|
20
|
+
return d.current && t.observe(d.current), f.current && t.observe(f.current), () => t.disconnect();
|
|
21
|
+
}, [o, s]);
|
|
22
|
+
let h = {};
|
|
23
|
+
return o && (h["--field-pad-start"] = `calc(${p.start}px + var(--field-affix-gap) * 2)`), s && (h["--field-pad-end"] = `calc(${p.end}px + var(--field-affix-gap) * 2)`), /* @__PURE__ */ i("span", {
|
|
24
|
+
className: a("ds-field-affix", l),
|
|
25
|
+
style: h,
|
|
26
|
+
children: [
|
|
27
|
+
o && /* @__PURE__ */ r("span", {
|
|
28
|
+
className: "ds-field-affix__lead",
|
|
29
|
+
ref: d,
|
|
30
|
+
children: o
|
|
31
|
+
}),
|
|
32
|
+
u,
|
|
33
|
+
s && /* @__PURE__ */ r("span", {
|
|
34
|
+
className: "ds-field-affix__trail",
|
|
35
|
+
ref: f,
|
|
36
|
+
"data-interactive": c || void 0,
|
|
37
|
+
children: s
|
|
38
|
+
})
|
|
39
|
+
]
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { o as FieldAffix };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["cx","parts","FieldAffix","leadRef","useRef","trailRef","pad","setPad","useState","measure","observer","lead","trail","style","className","children","isTrailInteractive"],"sources":["../../../src/components/FieldAffix/index.tsx"],"sourcesContent":["import {\n useLayoutEffect,\n useRef,\n useState,\n type ReactNode,\n} from \"react\";\nimport \"../Field/style.css\";\nimport \"./style.css\";\n\nfunction cx(...parts: (string | undefined | false)[]) {\n return parts.filter(Boolean).join(\" \");\n}\n\nexport interface FieldAffixProps {\n /** Node pinned to the start of the field — a glyph, a currency mark. */\n lead?: ReactNode;\n /** Node pinned to the end of the field — a unit, a clear button. */\n trail?: ReactNode;\n /** Set when the trailing node is interactive, so it can take the pointer. */\n isTrailInteractive?: boolean;\n className?: string;\n /** The field itself — one `.ds-field-skin` control. */\n children: ReactNode;\n}\n\n/**\n * The one way a field carries something beside its text. Both affixes are\n * measured, and the control's inline padding is reserved from that measurement\n * — so content never runs under a glyph, whatever the affix holds.\n */\nexport function FieldAffix({\n lead,\n trail,\n isTrailInteractive = false,\n className,\n children,\n}: FieldAffixProps) {\n const leadRef = useRef<HTMLSpanElement | null>(null);\n const trailRef = useRef<HTMLSpanElement | null>(null);\n const [pad, setPad] = useState<{ start: number; end: number }>({ start: 0, end: 0 });\n\n useLayoutEffect(() => {\n const measure = () =>\n setPad({\n start: leadRef.current?.offsetWidth ?? 0,\n end: trailRef.current?.offsetWidth ?? 0,\n });\n measure();\n if (typeof ResizeObserver === \"undefined\") return;\n const observer = new ResizeObserver(measure);\n if (leadRef.current) observer.observe(leadRef.current);\n if (trailRef.current) observer.observe(trailRef.current);\n return () => observer.disconnect();\n }, [lead, trail]);\n\n const style: Record<string, string> = {};\n if (lead) style[\"--field-pad-start\"] = `calc(${pad.start}px + var(--field-affix-gap) * 2)`;\n if (trail) style[\"--field-pad-end\"] = `calc(${pad.end}px + var(--field-affix-gap) * 2)`;\n\n return (\n <span className={cx(\"ds-field-affix\", className)} style={style}>\n {lead && (\n <span className=\"ds-field-affix__lead\" ref={leadRef}>\n {lead}\n </span>\n )}\n {children}\n {trail && (\n <span\n className=\"ds-field-affix__trail\"\n ref={trailRef}\n data-interactive={isTrailInteractive || undefined}\n >\n {trail}\n </span>\n )}\n </span>\n );\n}\n"],"mappings":";;;;AASA,SAASA,EAAG,GAAGC,GAAuC;CACpD,OAAOA,EAAM,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;AACvC;AAmBA,SAAgBC,EAAW,EACzB,SACA,UACA,wBAAqB,IACrB,cACA,eACkB;CAClB,IAAMC,IAAUC,EAA+B,IAAI,GAC7CC,IAAWD,EAA+B,IAAI,GAC9C,CAACE,GAAKC,KAAUC,EAAyC;EAAE,OAAO;EAAG,KAAK;CAAE,CAAC;CAEnF,QAAsB;EACpB,IAAMC,UACJF,EAAO;GACL,OAAOJ,EAAQ,SAAS,eAAe;GACvC,KAAKE,EAAS,SAAS,eAAe;EACxC,CAAC;EAEH,IADAI,EAAQ,GACJ,OAAO,iBAAmB,KAAa;EAC3C,IAAMC,IAAW,IAAI,eAAeD,CAAO;EAG3C,OAFIN,EAAQ,WAASO,EAAS,QAAQP,EAAQ,OAAO,GACjDE,EAAS,WAASK,EAAS,QAAQL,EAAS,OAAO,SAC1CK,EAAS,WAAW;CACnC,GAAG,CAACC,GAAMC,CAAK,CAAC;CAEhB,IAAMC,IAAgC,CAAC;CAIvC,OAHIF,MAAM,EAAM,uBAAuB,QAAQL,EAAI,MAAM,oCACrDM,MAAO,EAAM,qBAAqB,QAAQN,EAAI,IAAI,oCAGpD,kBAAC,QAAD;EAAM,WAAWN,EAAG,kBAAkBc,CAAS;EAAU;EAAzD,UAAA;GACGH,KACC,kBAAC,QAAD;IAAM,WAAU;IAAuB,KAAKR;IACzC,UAAAQ;GACG,CAAA;GAEPI;GACAH,KACC,kBAAC,QAAD;IACE,WAAU;IACV,KAAKP;IACL,oBAAkBW,KAAsB,KAAA;IAEvC,UAAAJ;GACG,CAAA;EAEJ;;AAEV"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.ds-field-affix {
|
|
3
|
+
--field-affix-gap: 10px;
|
|
4
|
+
|
|
5
|
+
position: relative;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
inline-size: 100%;
|
|
9
|
+
min-inline-size: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* The measured reservation. Beats the sized padding on the field skin so a
|
|
13
|
+
* field with an affix never prints its text under one. */
|
|
14
|
+
.ds-field-affix > input.ds-field-skin[data-size],
|
|
15
|
+
.ds-field-affix > .ds-field-skin {
|
|
16
|
+
padding-inline: var(--field-pad-start, var(--field-affix-gap))
|
|
17
|
+
var(--field-pad-end, var(--field-affix-gap));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.ds-field-affix__lead,
|
|
21
|
+
.ds-field-affix__trail {
|
|
22
|
+
position: absolute;
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
gap: var(--space-1);
|
|
26
|
+
color: var(--color-text-muted);
|
|
27
|
+
font-size: var(--field-font-size-md);
|
|
28
|
+
pointer-events: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ds-field-affix:has(> .ds-field-skin[data-size="sm"]) .ds-field-affix__lead,
|
|
32
|
+
.ds-field-affix:has(> .ds-field-skin[data-size="sm"]) .ds-field-affix__trail {
|
|
33
|
+
font-size: var(--field-font-size-sm);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.ds-field-affix:has(> .ds-field-skin[data-size="md"]) .ds-field-affix__lead,
|
|
37
|
+
.ds-field-affix:has(> .ds-field-skin[data-size="md"]) .ds-field-affix__trail,
|
|
38
|
+
.ds-field-affix:has(> .ds-field-skin[data-size="lg"]) .ds-field-affix__lead,
|
|
39
|
+
.ds-field-affix:has(> .ds-field-skin[data-size="lg"]) .ds-field-affix__trail {
|
|
40
|
+
font-size: var(--field-font-size-md);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ds-field-affix__lead {
|
|
44
|
+
inset-inline-start: var(--field-affix-gap);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ds-field-affix__trail {
|
|
48
|
+
inset-inline-end: var(--field-affix-gap);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.ds-field-affix__trail[data-interactive] {
|
|
52
|
+
pointer-events: auto;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("react/jsx-runtime");var n=(0,e.forwardRef)(function({columns:e=`auto`,gap:n=`md`,rowGap:r,minColumnWidth:i=`var(--asset-tile-min-width)`,align:a=`stretch`,as:o=`div`,className:s,style:c,...l},u){return(0,t.jsx)(o,{ref:u,className:[`ds-grid`,`ds-grid--cols-${e}`,`ds-grid--gap-${n}`,r?`ds-grid--row-gap-${r}`:null,`ds-grid--align-${a}`,s].filter(Boolean).join(` `),style:{"--grid-min-column":i,...c},...l})}),r=(0,e.forwardRef)(function({span:e=1,as:n=`div`,className:r,...i},a){return(0,t.jsx)(n,{ref:a,className:[`ds-grid__item`,`ds-grid__item--span-${e}`,r].filter(Boolean).join(` `),...i})}),i=(0,e.forwardRef)(function({direction:e=`vertical`,gap:n=`md`,align:r=`stretch`,justify:i=`start`,wrap:a=!1,as:o=`div`,className:s,...c},l){return(0,t.jsx)(o,{ref:l,className:[`ds-stack`,`ds-stack--${e}`,`ds-grid--gap-${n}`,`ds-stack--align-${r}`,`ds-stack--justify-${i}`,a?`ds-stack--wrap`:null,s].filter(Boolean).join(` `),...c})});exports.Grid=n,exports.GridItem=r,exports.Stack=i;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["forwardRef","TagEl","react","react_jsx_runtime","Grid","asTag","rest","columns","gap","rowGap","align","className","minColumnWidth","style","GridItem","span","Stack","direction","justify","wrap"],"sources":["../../../src/components/Grid/index.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type ElementType, type HTMLAttributes } from \"react\";\nimport \"./style.css\";\n\n/** Gap steps map onto the spacing scale — never a raw pixel value. */\nexport type GapSize = \"none\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\n\n/** Column counts the system offers. `auto` fills by minimum column width. */\nexport type GridColumns = 1 | 2 | 3 | 4 | 6 | 12 | \"auto\";\n\nexport type GridAlign = \"start\" | \"center\" | \"end\" | \"stretch\";\n\nexport interface GridProps extends HTMLAttributes<HTMLDivElement> {\n /** Columns at the widest. Narrow containers step down automatically. */\n columns?: GridColumns;\n /** Space between every child, in both axes. */\n gap?: GapSize;\n /** Override the row gap when rows should breathe differently. */\n rowGap?: GapSize;\n /** Smallest a column may get before the grid drops one, for `columns=\"auto\"`. */\n minColumnWidth?: string;\n align?: GridAlign;\n /** Render as a different element — `ul`, `section`, and so on. */\n as?: \"div\" | \"ul\" | \"ol\" | \"section\";\n}\n\n/**\n * A spacing wrapper. Put things inside it and they take their rhythm from the\n * wrapper's `gap` — no margins on the children, ever. Columns step down on\n * their own inside a narrow container, so a Grid is safe anywhere.\n */\nexport const Grid = forwardRef<HTMLDivElement, GridProps>(function Grid(\n {\n columns = \"auto\",\n gap = \"md\",\n rowGap,\n minColumnWidth = \"var(--asset-tile-min-width)\",\n align = \"stretch\",\n as: asTag = \"div\",\n className,\n style,\n ...rest\n },\n ref,\n) {\n const TagEl = asTag as ElementType;\n return (\n <TagEl\n ref={ref as never}\n className={[\n \"ds-grid\",\n `ds-grid--cols-${columns}`,\n `ds-grid--gap-${gap}`,\n rowGap ? `ds-grid--row-gap-${rowGap}` : null,\n `ds-grid--align-${align}`,\n className,\n ]\n .filter(Boolean)\n .join(\" \")}\n style={{ \"--grid-min-column\": minColumnWidth, ...style } as CSSProperties}\n {...rest}\n />\n );\n});\n\nexport interface GridItemProps extends HTMLAttributes<HTMLDivElement> {\n /** How many columns this child takes. `full` spans the whole row. */\n span?: 1 | 2 | 3 | 4 | 6 | 12 | \"full\";\n as?: \"div\" | \"li\" | \"article\" | \"section\";\n}\n\n/** Only needed when one child should be wider than the rest. */\nexport const GridItem = forwardRef<HTMLDivElement, GridItemProps>(function GridItem(\n { span = 1, as: asTag = \"div\", className, ...rest },\n ref,\n) {\n const TagEl = asTag as ElementType;\n return (\n <TagEl\n ref={ref as never}\n className={[\"ds-grid__item\", `ds-grid__item--span-${span}`, className]\n .filter(Boolean)\n .join(\" \")}\n {...rest}\n />\n );\n});\n\nexport type StackDirection = \"vertical\" | \"horizontal\";\n\nexport interface StackProps extends HTMLAttributes<HTMLDivElement> {\n direction?: StackDirection;\n gap?: GapSize;\n align?: \"start\" | \"center\" | \"end\" | \"stretch\" | \"baseline\";\n justify?: \"start\" | \"center\" | \"end\" | \"between\";\n wrap?: boolean;\n as?: \"div\" | \"ul\" | \"ol\" | \"section\" | \"header\" | \"footer\";\n}\n\n/** The one-axis version of Grid: same gap scale, no columns. */\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(function Stack(\n {\n direction = \"vertical\",\n gap = \"md\",\n align = \"stretch\",\n justify = \"start\",\n wrap = false,\n as: asTag = \"div\",\n className,\n ...rest\n },\n ref,\n) {\n const TagEl = asTag as ElementType;\n return (\n <TagEl\n ref={ref as never}\n className={[\n \"ds-stack\",\n `ds-stack--${direction}`,\n `ds-grid--gap-${gap}`,\n `ds-stack--align-${align}`,\n `ds-stack--justify-${justify}`,\n wrap ? \"ds-stack--wrap\" : null,\n className,\n ]\n .filter(Boolean)\n .join(\" \")}\n {...rest}\n />\n );\n});\n"],"mappings":"A,yHA8BA,IAAaI,GAAA,EAAOJ,EAAAA,WAAAA,CAAsC,SACxD,CACE,UAAU,OACV,MAAM,KACN,SACA,iBAAiB,8BACjB,QAAQ,UACR,GAAIK,EAAQ,MACZ,YACA,QACA,GAAGC,GAEL,EACA,CAEA,OACE,EAAAH,EAAA,IAAA,CAACF,EAAD,CACO,MACL,UAAW,CACT,UACA,iBAAiBM,IACjB,gBAAgBC,IAChBC,EAAS,oBAAoBA,IAAW,KACxC,kBAAkBC,IAClBC,CACF,CAAC,CACE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG,EACX,MAAO,CAAE,oBAAqBC,EAAgB,GAAGC,CAAM,EACvD,GAAIP,CACL,CAAA,CAEL,CAAC,EASYQ,GAAA,EAAWd,EAAAA,WAAAA,CAA0C,SAChE,CAAE,OAAO,EAAG,GAAIK,EAAQ,MAAO,YAAW,GAAGC,GAC7C,EACA,CAEA,OACE,EAAAH,EAAA,IAAA,CAACF,EAAD,CACO,MACL,UAAW,CAAC,gBAAiB,uBAAuBc,IAAQJ,CAAS,CAAC,CACnE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG,EACX,GAAIL,CACL,CAAA,CAEL,CAAC,EAcYU,GAAA,EAAQhB,EAAAA,WAAAA,CAAuC,SAC1D,CACE,YAAY,WACZ,MAAM,KACN,QAAQ,UACR,UAAU,QACV,OAAO,GACP,GAAIK,EAAQ,MACZ,YACA,GAAGC,GAEL,EACA,CAEA,OACE,EAAAH,EAAA,IAAA,CAACF,EAAD,CACO,MACL,UAAW,CACT,WACA,aAAagB,IACb,gBAAgBT,IAChB,mBAAmBE,IACnB,qBAAqBQ,IACrBC,EAAO,iBAAmB,KAC1BR,CACF,CAAC,CACE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG,EACX,GAAIL,CACL,CAAA,CAEL,CAAC,E"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type HTMLAttributes } from "react";
|
|
2
|
+
/** Gap steps map onto the spacing scale — never a raw pixel value. */
|
|
3
|
+
export type GapSize = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
4
|
+
/** Column counts the system offers. `auto` fills by minimum column width. */
|
|
5
|
+
export type GridColumns = 1 | 2 | 3 | 4 | 6 | 12 | "auto";
|
|
6
|
+
export type GridAlign = "start" | "center" | "end" | "stretch";
|
|
7
|
+
export interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
/** Columns at the widest. Narrow containers step down automatically. */
|
|
9
|
+
columns?: GridColumns;
|
|
10
|
+
/** Space between every child, in both axes. */
|
|
11
|
+
gap?: GapSize;
|
|
12
|
+
/** Override the row gap when rows should breathe differently. */
|
|
13
|
+
rowGap?: GapSize;
|
|
14
|
+
/** Smallest a column may get before the grid drops one, for `columns="auto"`. */
|
|
15
|
+
minColumnWidth?: string;
|
|
16
|
+
align?: GridAlign;
|
|
17
|
+
/** Render as a different element — `ul`, `section`, and so on. */
|
|
18
|
+
as?: "div" | "ul" | "ol" | "section";
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A spacing wrapper. Put things inside it and they take their rhythm from the
|
|
22
|
+
* wrapper's `gap` — no margins on the children, ever. Columns step down on
|
|
23
|
+
* their own inside a narrow container, so a Grid is safe anywhere.
|
|
24
|
+
*/
|
|
25
|
+
export declare const Grid: import("react").ForwardRefExoticComponent<GridProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
26
|
+
export interface GridItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
27
|
+
/** How many columns this child takes. `full` spans the whole row. */
|
|
28
|
+
span?: 1 | 2 | 3 | 4 | 6 | 12 | "full";
|
|
29
|
+
as?: "div" | "li" | "article" | "section";
|
|
30
|
+
}
|
|
31
|
+
/** Only needed when one child should be wider than the rest. */
|
|
32
|
+
export declare const GridItem: import("react").ForwardRefExoticComponent<GridItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
33
|
+
export type StackDirection = "vertical" | "horizontal";
|
|
34
|
+
export interface StackProps extends HTMLAttributes<HTMLDivElement> {
|
|
35
|
+
direction?: StackDirection;
|
|
36
|
+
gap?: GapSize;
|
|
37
|
+
align?: "start" | "center" | "end" | "stretch" | "baseline";
|
|
38
|
+
justify?: "start" | "center" | "end" | "between";
|
|
39
|
+
wrap?: boolean;
|
|
40
|
+
as?: "div" | "ul" | "ol" | "section" | "header" | "footer";
|
|
41
|
+
}
|
|
42
|
+
/** The one-axis version of Grid: same gap scale, no columns. */
|
|
43
|
+
export declare const Stack: import("react").ForwardRefExoticComponent<StackProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
44
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Grid/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoD,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAC9F,OAAO,aAAa,CAAC;AAErB,sEAAsE;AACtE,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAExE,6EAA6E;AAC7E,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC;AAE1D,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;AAE/D,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC/D,wEAAwE;IACxE,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,+CAA+C;IAC/C,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,iEAAiE;IACjE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iFAAiF;IACjF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kEAAkE;IAClE,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;CACtC;AAED;;;;GAIG;AACH,eAAO,MAAM,IAAI,sGAgCf,CAAC;AAEH,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,cAAc,CAAC;IACnE,qEAAqE;IACrE,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC;IACvC,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,CAAC;CAC3C;AAED,gEAAgE;AAChE,eAAO,MAAM,QAAQ,0GAcnB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,YAAY,CAAC;AAEvD,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,cAAc,CAAC;IAChE,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,UAAU,CAAC;IAC5D,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;IACjD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;CAC5D;AAED,gEAAgE;AAChE,eAAO,MAAM,KAAK,uGA+BhB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type HTMLAttributes } from "react";
|
|
2
|
+
/** Gap steps map onto the spacing scale — never a raw pixel value. */
|
|
3
|
+
export type GapSize = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
4
|
+
/** Column counts the system offers. `auto` fills by minimum column width. */
|
|
5
|
+
export type GridColumns = 1 | 2 | 3 | 4 | 6 | 12 | "auto";
|
|
6
|
+
export type GridAlign = "start" | "center" | "end" | "stretch";
|
|
7
|
+
export interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
/** Columns at the widest. Narrow containers step down automatically. */
|
|
9
|
+
columns?: GridColumns;
|
|
10
|
+
/** Space between every child, in both axes. */
|
|
11
|
+
gap?: GapSize;
|
|
12
|
+
/** Override the row gap when rows should breathe differently. */
|
|
13
|
+
rowGap?: GapSize;
|
|
14
|
+
/** Smallest a column may get before the grid drops one, for `columns="auto"`. */
|
|
15
|
+
minColumnWidth?: string;
|
|
16
|
+
align?: GridAlign;
|
|
17
|
+
/** Render as a different element — `ul`, `section`, and so on. */
|
|
18
|
+
as?: "div" | "ul" | "ol" | "section";
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A spacing wrapper. Put things inside it and they take their rhythm from the
|
|
22
|
+
* wrapper's `gap` — no margins on the children, ever. Columns step down on
|
|
23
|
+
* their own inside a narrow container, so a Grid is safe anywhere.
|
|
24
|
+
*/
|
|
25
|
+
export declare const Grid: import("react").ForwardRefExoticComponent<GridProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
26
|
+
export interface GridItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
27
|
+
/** How many columns this child takes. `full` spans the whole row. */
|
|
28
|
+
span?: 1 | 2 | 3 | 4 | 6 | 12 | "full";
|
|
29
|
+
as?: "div" | "li" | "article" | "section";
|
|
30
|
+
}
|
|
31
|
+
/** Only needed when one child should be wider than the rest. */
|
|
32
|
+
export declare const GridItem: import("react").ForwardRefExoticComponent<GridItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
33
|
+
export type StackDirection = "vertical" | "horizontal";
|
|
34
|
+
export interface StackProps extends HTMLAttributes<HTMLDivElement> {
|
|
35
|
+
direction?: StackDirection;
|
|
36
|
+
gap?: GapSize;
|
|
37
|
+
align?: "start" | "center" | "end" | "stretch" | "baseline";
|
|
38
|
+
justify?: "start" | "center" | "end" | "between";
|
|
39
|
+
wrap?: boolean;
|
|
40
|
+
as?: "div" | "ul" | "ol" | "section" | "header" | "footer";
|
|
41
|
+
}
|
|
42
|
+
/** The one-axis version of Grid: same gap scale, no columns. */
|
|
43
|
+
export declare const Stack: import("react").ForwardRefExoticComponent<StackProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
44
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Grid/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoD,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAC9F,OAAO,aAAa,CAAC;AAErB,sEAAsE;AACtE,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAExE,6EAA6E;AAC7E,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC;AAE1D,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;AAE/D,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC/D,wEAAwE;IACxE,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,+CAA+C;IAC/C,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,iEAAiE;IACjE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iFAAiF;IACjF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kEAAkE;IAClE,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;CACtC;AAED;;;;GAIG;AACH,eAAO,MAAM,IAAI,sGAgCf,CAAC;AAEH,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,cAAc,CAAC;IACnE,qEAAqE;IACrE,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC;IACvC,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,CAAC;CAC3C;AAED,gEAAgE;AAChE,eAAO,MAAM,QAAQ,0GAcnB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,YAAY,CAAC;AAEvD,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,cAAc,CAAC;IAChE,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,UAAU,CAAC;IAC5D,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;IACjD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;CAC5D;AAED,gEAAgE;AAChE,eAAO,MAAM,KAAK,uGA+BhB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { forwardRef as e } from "react";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/Grid/index.tsx
|
|
4
|
+
var n = e(function({ columns: e = "auto", gap: n = "md", rowGap: r, minColumnWidth: i = "var(--asset-tile-min-width)", align: a = "stretch", as: o = "div", className: s, style: c, ...l }, u) {
|
|
5
|
+
return /* @__PURE__ */ t(o, {
|
|
6
|
+
ref: u,
|
|
7
|
+
className: [
|
|
8
|
+
"ds-grid",
|
|
9
|
+
`ds-grid--cols-${e}`,
|
|
10
|
+
`ds-grid--gap-${n}`,
|
|
11
|
+
r ? `ds-grid--row-gap-${r}` : null,
|
|
12
|
+
`ds-grid--align-${a}`,
|
|
13
|
+
s
|
|
14
|
+
].filter(Boolean).join(" "),
|
|
15
|
+
style: {
|
|
16
|
+
"--grid-min-column": i,
|
|
17
|
+
...c
|
|
18
|
+
},
|
|
19
|
+
...l
|
|
20
|
+
});
|
|
21
|
+
}), r = e(function({ span: e = 1, as: n = "div", className: r, ...i }, a) {
|
|
22
|
+
return /* @__PURE__ */ t(n, {
|
|
23
|
+
ref: a,
|
|
24
|
+
className: [
|
|
25
|
+
"ds-grid__item",
|
|
26
|
+
`ds-grid__item--span-${e}`,
|
|
27
|
+
r
|
|
28
|
+
].filter(Boolean).join(" "),
|
|
29
|
+
...i
|
|
30
|
+
});
|
|
31
|
+
}), i = e(function({ direction: e = "vertical", gap: n = "md", align: r = "stretch", justify: i = "start", wrap: a = !1, as: o = "div", className: s, ...c }, l) {
|
|
32
|
+
return /* @__PURE__ */ t(o, {
|
|
33
|
+
ref: l,
|
|
34
|
+
className: [
|
|
35
|
+
"ds-stack",
|
|
36
|
+
`ds-stack--${e}`,
|
|
37
|
+
`ds-grid--gap-${n}`,
|
|
38
|
+
`ds-stack--align-${r}`,
|
|
39
|
+
`ds-stack--justify-${i}`,
|
|
40
|
+
a ? "ds-stack--wrap" : null,
|
|
41
|
+
s
|
|
42
|
+
].filter(Boolean).join(" "),
|
|
43
|
+
...c
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
//#endregion
|
|
47
|
+
export { n as Grid, r as GridItem, i as Stack };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["TagEl","Grid","forwardRef","asTag","rest","columns","gap","rowGap","align","className","minColumnWidth","style","GridItem","span","Stack","direction","justify","wrap"],"sources":["../../../src/components/Grid/index.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type ElementType, type HTMLAttributes } from \"react\";\nimport \"./style.css\";\n\n/** Gap steps map onto the spacing scale — never a raw pixel value. */\nexport type GapSize = \"none\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\n\n/** Column counts the system offers. `auto` fills by minimum column width. */\nexport type GridColumns = 1 | 2 | 3 | 4 | 6 | 12 | \"auto\";\n\nexport type GridAlign = \"start\" | \"center\" | \"end\" | \"stretch\";\n\nexport interface GridProps extends HTMLAttributes<HTMLDivElement> {\n /** Columns at the widest. Narrow containers step down automatically. */\n columns?: GridColumns;\n /** Space between every child, in both axes. */\n gap?: GapSize;\n /** Override the row gap when rows should breathe differently. */\n rowGap?: GapSize;\n /** Smallest a column may get before the grid drops one, for `columns=\"auto\"`. */\n minColumnWidth?: string;\n align?: GridAlign;\n /** Render as a different element — `ul`, `section`, and so on. */\n as?: \"div\" | \"ul\" | \"ol\" | \"section\";\n}\n\n/**\n * A spacing wrapper. Put things inside it and they take their rhythm from the\n * wrapper's `gap` — no margins on the children, ever. Columns step down on\n * their own inside a narrow container, so a Grid is safe anywhere.\n */\nexport const Grid = forwardRef<HTMLDivElement, GridProps>(function Grid(\n {\n columns = \"auto\",\n gap = \"md\",\n rowGap,\n minColumnWidth = \"var(--asset-tile-min-width)\",\n align = \"stretch\",\n as: asTag = \"div\",\n className,\n style,\n ...rest\n },\n ref,\n) {\n const TagEl = asTag as ElementType;\n return (\n <TagEl\n ref={ref as never}\n className={[\n \"ds-grid\",\n `ds-grid--cols-${columns}`,\n `ds-grid--gap-${gap}`,\n rowGap ? `ds-grid--row-gap-${rowGap}` : null,\n `ds-grid--align-${align}`,\n className,\n ]\n .filter(Boolean)\n .join(\" \")}\n style={{ \"--grid-min-column\": minColumnWidth, ...style } as CSSProperties}\n {...rest}\n />\n );\n});\n\nexport interface GridItemProps extends HTMLAttributes<HTMLDivElement> {\n /** How many columns this child takes. `full` spans the whole row. */\n span?: 1 | 2 | 3 | 4 | 6 | 12 | \"full\";\n as?: \"div\" | \"li\" | \"article\" | \"section\";\n}\n\n/** Only needed when one child should be wider than the rest. */\nexport const GridItem = forwardRef<HTMLDivElement, GridItemProps>(function GridItem(\n { span = 1, as: asTag = \"div\", className, ...rest },\n ref,\n) {\n const TagEl = asTag as ElementType;\n return (\n <TagEl\n ref={ref as never}\n className={[\"ds-grid__item\", `ds-grid__item--span-${span}`, className]\n .filter(Boolean)\n .join(\" \")}\n {...rest}\n />\n );\n});\n\nexport type StackDirection = \"vertical\" | \"horizontal\";\n\nexport interface StackProps extends HTMLAttributes<HTMLDivElement> {\n direction?: StackDirection;\n gap?: GapSize;\n align?: \"start\" | \"center\" | \"end\" | \"stretch\" | \"baseline\";\n justify?: \"start\" | \"center\" | \"end\" | \"between\";\n wrap?: boolean;\n as?: \"div\" | \"ul\" | \"ol\" | \"section\" | \"header\" | \"footer\";\n}\n\n/** The one-axis version of Grid: same gap scale, no columns. */\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(function Stack(\n {\n direction = \"vertical\",\n gap = \"md\",\n align = \"stretch\",\n justify = \"start\",\n wrap = false,\n as: asTag = \"div\",\n className,\n ...rest\n },\n ref,\n) {\n const TagEl = asTag as ElementType;\n return (\n <TagEl\n ref={ref as never}\n className={[\n \"ds-stack\",\n `ds-stack--${direction}`,\n `ds-grid--gap-${gap}`,\n `ds-stack--align-${align}`,\n `ds-stack--justify-${justify}`,\n wrap ? \"ds-stack--wrap\" : null,\n className,\n ]\n .filter(Boolean)\n .join(\" \")}\n {...rest}\n />\n );\n});\n"],"mappings":";;;AA8BA,IAAaC,IAAOC,EAAsC,SACxD,EACE,aAAU,QACV,SAAM,MACN,WACA,oBAAiB,+BACjB,WAAQ,WACR,IAAIC,IAAQ,OACZ,cACA,UACA,GAAGC,KAEL,GACA;CAEA,OACE,kBAACJ,GAAD;EACO;EACL,WAAW;GACT;GACA,iBAAiBK;GACjB,gBAAgBC;GAChBC,IAAS,oBAAoBA,MAAW;GACxC,kBAAkBC;GAClBC;EACF,CAAC,CACE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;EACX,OAAO;GAAE,qBAAqBC;GAAgB,GAAGC;EAAM;EACvD,GAAIP;CACL,CAAA;AAEL,CAAC,GASYQ,IAAWV,EAA0C,SAChE,EAAE,UAAO,GAAG,IAAIC,IAAQ,OAAO,cAAW,GAAGC,KAC7C,GACA;CAEA,OACE,kBAACJ,GAAD;EACO;EACL,WAAW;GAAC;GAAiB,uBAAuBa;GAAQJ;EAAS,CAAC,CACnE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;EACX,GAAIL;CACL,CAAA;AAEL,CAAC,GAcYU,IAAQZ,EAAuC,SAC1D,EACE,eAAY,YACZ,SAAM,MACN,WAAQ,WACR,aAAU,SACV,UAAO,IACP,IAAIC,IAAQ,OACZ,cACA,GAAGC,KAEL,GACA;CAEA,OACE,kBAACJ,GAAD;EACO;EACL,WAAW;GACT;GACA,aAAae;GACb,gBAAgBT;GAChB,mBAAmBE;GACnB,qBAAqBQ;GACrBC,IAAO,mBAAmB;GAC1BR;EACF,CAAC,CACE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;EACX,GAAIL;CACL,CAAA;AAEL,CAAC"}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
/* One gap scale, shared by Grid and Stack. Children never carry margins —
|
|
3
|
+
* the wrapper owns all the space between things. */
|
|
4
|
+
.ds-grid--gap-none {
|
|
5
|
+
--grid-gap: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.ds-grid--gap-xs {
|
|
9
|
+
--grid-gap: var(--space-1);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ds-grid--gap-sm {
|
|
13
|
+
--grid-gap: var(--space-2);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ds-grid--gap-md {
|
|
17
|
+
--grid-gap: var(--space-4);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.ds-grid--gap-lg {
|
|
21
|
+
--grid-gap: var(--space-6);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ds-grid--gap-xl {
|
|
25
|
+
--grid-gap: var(--space-8);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ds-grid--gap-2xl {
|
|
29
|
+
--grid-gap: var(--space-12);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ds-grid--row-gap-none {
|
|
33
|
+
--grid-row-gap: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.ds-grid--row-gap-xs {
|
|
37
|
+
--grid-row-gap: var(--space-1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.ds-grid--row-gap-sm {
|
|
41
|
+
--grid-row-gap: var(--space-2);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.ds-grid--row-gap-md {
|
|
45
|
+
--grid-row-gap: var(--space-4);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.ds-grid--row-gap-lg {
|
|
49
|
+
--grid-row-gap: var(--space-6);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.ds-grid--row-gap-xl {
|
|
53
|
+
--grid-row-gap: var(--space-8);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.ds-grid--row-gap-2xl {
|
|
57
|
+
--grid-row-gap: var(--space-12);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.ds-grid {
|
|
61
|
+
display: grid;
|
|
62
|
+
gap: var(--grid-row-gap, var(--grid-gap)) var(--grid-gap);
|
|
63
|
+
margin: 0;
|
|
64
|
+
padding: 0;
|
|
65
|
+
list-style: none;
|
|
66
|
+
container-type: inline-size;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.ds-grid--cols-auto {
|
|
70
|
+
grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--grid-min-column)), 1fr));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.ds-grid--cols-1 {
|
|
74
|
+
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.ds-grid--cols-2 {
|
|
78
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.ds-grid--cols-3 {
|
|
82
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.ds-grid--cols-4 {
|
|
86
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.ds-grid--cols-6 {
|
|
90
|
+
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.ds-grid--cols-12 {
|
|
94
|
+
grid-template-columns: repeat(12, minmax(0, 1fr));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.ds-grid--align-start {
|
|
98
|
+
align-items: start;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.ds-grid--align-center {
|
|
102
|
+
align-items: center;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.ds-grid--align-end {
|
|
106
|
+
align-items: end;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.ds-grid--align-stretch {
|
|
110
|
+
align-items: stretch;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.ds-grid__item--span-1 {
|
|
114
|
+
grid-column: span 1;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.ds-grid__item--span-2 {
|
|
118
|
+
grid-column: span 2;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.ds-grid__item--span-3 {
|
|
122
|
+
grid-column: span 3;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.ds-grid__item--span-4 {
|
|
126
|
+
grid-column: span 4;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.ds-grid__item--span-6 {
|
|
130
|
+
grid-column: span 6;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.ds-grid__item--span-12 {
|
|
134
|
+
grid-column: span 12;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.ds-grid__item--span-full {
|
|
138
|
+
grid-column: 1 / -1;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* A grid steps down inside a narrow container, not a narrow window, so it
|
|
142
|
+
* behaves the same in a page, a drawer and a modal. */
|
|
143
|
+
@container (max-width: 60rem) {
|
|
144
|
+
.ds-grid--cols-12 {
|
|
145
|
+
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.ds-grid--cols-6 {
|
|
149
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.ds-grid--cols-4 {
|
|
153
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@container (max-width: 40rem) {
|
|
158
|
+
.ds-grid--cols-12,
|
|
159
|
+
.ds-grid--cols-6,
|
|
160
|
+
.ds-grid--cols-4,
|
|
161
|
+
.ds-grid--cols-3,
|
|
162
|
+
.ds-grid--cols-2 {
|
|
163
|
+
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.ds-grid__item {
|
|
167
|
+
grid-column: 1 / -1;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.ds-stack {
|
|
172
|
+
display: flex;
|
|
173
|
+
gap: var(--grid-gap);
|
|
174
|
+
margin: 0;
|
|
175
|
+
padding: 0;
|
|
176
|
+
list-style: none;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.ds-stack--vertical {
|
|
180
|
+
flex-direction: column;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.ds-stack--horizontal {
|
|
184
|
+
flex-direction: row;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.ds-stack--wrap {
|
|
188
|
+
flex-wrap: wrap;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.ds-stack--align-start {
|
|
192
|
+
align-items: flex-start;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.ds-stack--align-center {
|
|
196
|
+
align-items: center;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.ds-stack--align-end {
|
|
200
|
+
align-items: flex-end;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.ds-stack--align-stretch {
|
|
204
|
+
align-items: stretch;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.ds-stack--align-baseline {
|
|
208
|
+
align-items: baseline;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.ds-stack--justify-start {
|
|
212
|
+
justify-content: flex-start;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.ds-stack--justify-center {
|
|
216
|
+
justify-content: center;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.ds-stack--justify-end {
|
|
220
|
+
justify-content: flex-end;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.ds-stack--justify-between {
|
|
224
|
+
justify-content: space-between;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The finite icon set. Adding a glyph means adding a line here — a visible
|
|
3
|
+
* decision rather than an import someone typed at a call site.
|
|
4
|
+
*/
|
|
5
|
+
export declare const icons: {
|
|
6
|
+
readonly "alert-triangle": import("lucide-react").LucideIcon;
|
|
7
|
+
readonly archive: import("lucide-react").LucideIcon;
|
|
8
|
+
readonly bold: import("lucide-react").LucideIcon;
|
|
9
|
+
readonly code: import("lucide-react").LucideIcon;
|
|
10
|
+
readonly "heading-2": import("lucide-react").LucideIcon;
|
|
11
|
+
readonly "heading-3": import("lucide-react").LucideIcon;
|
|
12
|
+
readonly italic: import("lucide-react").LucideIcon;
|
|
13
|
+
readonly "link-off": import("lucide-react").LucideIcon;
|
|
14
|
+
readonly list: import("lucide-react").LucideIcon;
|
|
15
|
+
readonly "list-ordered": import("lucide-react").LucideIcon;
|
|
16
|
+
readonly quote: import("lucide-react").LucideIcon;
|
|
17
|
+
readonly redo: import("lucide-react").LucideIcon;
|
|
18
|
+
readonly strikethrough: import("lucide-react").LucideIcon;
|
|
19
|
+
readonly undo: import("lucide-react").LucideIcon;
|
|
20
|
+
readonly "arrow-left": import("lucide-react").LucideIcon;
|
|
21
|
+
readonly "arrow-right": import("lucide-react").LucideIcon;
|
|
22
|
+
readonly calendar: import("lucide-react").LucideIcon;
|
|
23
|
+
readonly check: import("lucide-react").LucideIcon;
|
|
24
|
+
readonly "chevron-down": import("lucide-react").LucideIcon;
|
|
25
|
+
readonly "chevron-left": import("lucide-react").LucideIcon;
|
|
26
|
+
readonly "chevron-up": import("lucide-react").LucideIcon;
|
|
27
|
+
readonly minus: import("lucide-react").LucideIcon;
|
|
28
|
+
readonly "chevron-right": import("lucide-react").LucideIcon;
|
|
29
|
+
readonly clock: import("lucide-react").LucideIcon;
|
|
30
|
+
readonly copy: import("lucide-react").LucideIcon;
|
|
31
|
+
readonly download: import("lucide-react").LucideIcon;
|
|
32
|
+
readonly eye: import("lucide-react").LucideIcon;
|
|
33
|
+
readonly filter: import("lucide-react").LucideIcon;
|
|
34
|
+
readonly bell: import("lucide-react").LucideIcon;
|
|
35
|
+
readonly "chevrons-left": import("lucide-react").LucideIcon;
|
|
36
|
+
readonly "chevrons-right": import("lucide-react").LucideIcon;
|
|
37
|
+
readonly "file-text": import("lucide-react").LucideIcon;
|
|
38
|
+
readonly folder: import("lucide-react").LucideIcon;
|
|
39
|
+
readonly globe: import("lucide-react").LucideIcon;
|
|
40
|
+
readonly home: import("lucide-react").LucideIcon;
|
|
41
|
+
readonly "layout-grid": import("lucide-react").LucideIcon;
|
|
42
|
+
readonly menu: import("lucide-react").LucideIcon;
|
|
43
|
+
readonly users: import("lucide-react").LucideIcon;
|
|
44
|
+
readonly "grip-horizontal": import("lucide-react").LucideIcon;
|
|
45
|
+
readonly "grip-vertical": import("lucide-react").LucideIcon;
|
|
46
|
+
readonly image: import("lucide-react").LucideIcon;
|
|
47
|
+
readonly info: import("lucide-react").LucideIcon;
|
|
48
|
+
readonly link: import("lucide-react").LucideIcon;
|
|
49
|
+
readonly spinner: import("lucide-react").LucideIcon;
|
|
50
|
+
readonly "more-horizontal": import("lucide-react").LucideIcon;
|
|
51
|
+
readonly pencil: import("lucide-react").LucideIcon;
|
|
52
|
+
readonly plus: import("lucide-react").LucideIcon;
|
|
53
|
+
readonly "rotate-ccw": import("lucide-react").LucideIcon;
|
|
54
|
+
readonly "rotate-cw": import("lucide-react").LucideIcon;
|
|
55
|
+
readonly search: import("lucide-react").LucideIcon;
|
|
56
|
+
readonly settings: import("lucide-react").LucideIcon;
|
|
57
|
+
readonly trash: import("lucide-react").LucideIcon;
|
|
58
|
+
readonly upload: import("lucide-react").LucideIcon;
|
|
59
|
+
readonly user: import("lucide-react").LucideIcon;
|
|
60
|
+
readonly x: import("lucide-react").LucideIcon;
|
|
61
|
+
};
|
|
62
|
+
export type IconName = keyof typeof icons;
|
|
63
|
+
export declare const iconNames: IconName[];
|
|
64
|
+
//# sourceMappingURL=icons.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.cts","sourceRoot":"","sources":["../../../src/components/Icon/icons.ts"],"names":[],"mappings":"AA0DA;;;GAGG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDR,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,KAAK,CAAC;AAE1C,eAAO,MAAM,SAAS,EAAyB,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The finite icon set. Adding a glyph means adding a line here — a visible
|
|
3
|
+
* decision rather than an import someone typed at a call site.
|
|
4
|
+
*/
|
|
5
|
+
export declare const icons: {
|
|
6
|
+
readonly "alert-triangle": import("lucide-react").LucideIcon;
|
|
7
|
+
readonly archive: import("lucide-react").LucideIcon;
|
|
8
|
+
readonly bold: import("lucide-react").LucideIcon;
|
|
9
|
+
readonly code: import("lucide-react").LucideIcon;
|
|
10
|
+
readonly "heading-2": import("lucide-react").LucideIcon;
|
|
11
|
+
readonly "heading-3": import("lucide-react").LucideIcon;
|
|
12
|
+
readonly italic: import("lucide-react").LucideIcon;
|
|
13
|
+
readonly "link-off": import("lucide-react").LucideIcon;
|
|
14
|
+
readonly list: import("lucide-react").LucideIcon;
|
|
15
|
+
readonly "list-ordered": import("lucide-react").LucideIcon;
|
|
16
|
+
readonly quote: import("lucide-react").LucideIcon;
|
|
17
|
+
readonly redo: import("lucide-react").LucideIcon;
|
|
18
|
+
readonly strikethrough: import("lucide-react").LucideIcon;
|
|
19
|
+
readonly undo: import("lucide-react").LucideIcon;
|
|
20
|
+
readonly "arrow-left": import("lucide-react").LucideIcon;
|
|
21
|
+
readonly "arrow-right": import("lucide-react").LucideIcon;
|
|
22
|
+
readonly calendar: import("lucide-react").LucideIcon;
|
|
23
|
+
readonly check: import("lucide-react").LucideIcon;
|
|
24
|
+
readonly "chevron-down": import("lucide-react").LucideIcon;
|
|
25
|
+
readonly "chevron-left": import("lucide-react").LucideIcon;
|
|
26
|
+
readonly "chevron-up": import("lucide-react").LucideIcon;
|
|
27
|
+
readonly minus: import("lucide-react").LucideIcon;
|
|
28
|
+
readonly "chevron-right": import("lucide-react").LucideIcon;
|
|
29
|
+
readonly clock: import("lucide-react").LucideIcon;
|
|
30
|
+
readonly copy: import("lucide-react").LucideIcon;
|
|
31
|
+
readonly download: import("lucide-react").LucideIcon;
|
|
32
|
+
readonly eye: import("lucide-react").LucideIcon;
|
|
33
|
+
readonly filter: import("lucide-react").LucideIcon;
|
|
34
|
+
readonly bell: import("lucide-react").LucideIcon;
|
|
35
|
+
readonly "chevrons-left": import("lucide-react").LucideIcon;
|
|
36
|
+
readonly "chevrons-right": import("lucide-react").LucideIcon;
|
|
37
|
+
readonly "file-text": import("lucide-react").LucideIcon;
|
|
38
|
+
readonly folder: import("lucide-react").LucideIcon;
|
|
39
|
+
readonly globe: import("lucide-react").LucideIcon;
|
|
40
|
+
readonly home: import("lucide-react").LucideIcon;
|
|
41
|
+
readonly "layout-grid": import("lucide-react").LucideIcon;
|
|
42
|
+
readonly menu: import("lucide-react").LucideIcon;
|
|
43
|
+
readonly users: import("lucide-react").LucideIcon;
|
|
44
|
+
readonly "grip-horizontal": import("lucide-react").LucideIcon;
|
|
45
|
+
readonly "grip-vertical": import("lucide-react").LucideIcon;
|
|
46
|
+
readonly image: import("lucide-react").LucideIcon;
|
|
47
|
+
readonly info: import("lucide-react").LucideIcon;
|
|
48
|
+
readonly link: import("lucide-react").LucideIcon;
|
|
49
|
+
readonly spinner: import("lucide-react").LucideIcon;
|
|
50
|
+
readonly "more-horizontal": import("lucide-react").LucideIcon;
|
|
51
|
+
readonly pencil: import("lucide-react").LucideIcon;
|
|
52
|
+
readonly plus: import("lucide-react").LucideIcon;
|
|
53
|
+
readonly "rotate-ccw": import("lucide-react").LucideIcon;
|
|
54
|
+
readonly "rotate-cw": import("lucide-react").LucideIcon;
|
|
55
|
+
readonly search: import("lucide-react").LucideIcon;
|
|
56
|
+
readonly settings: import("lucide-react").LucideIcon;
|
|
57
|
+
readonly trash: import("lucide-react").LucideIcon;
|
|
58
|
+
readonly upload: import("lucide-react").LucideIcon;
|
|
59
|
+
readonly user: import("lucide-react").LucideIcon;
|
|
60
|
+
readonly x: import("lucide-react").LucideIcon;
|
|
61
|
+
};
|
|
62
|
+
export type IconName = keyof typeof icons;
|
|
63
|
+
export declare const iconNames: IconName[];
|
|
64
|
+
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/icons.ts"],"names":[],"mappings":"AA0DA;;;GAGG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDR,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,KAAK,CAAC;AAE1C,eAAO,MAAM,SAAS,EAAyB,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/Icon-CWsA1W83.cjs");exports.Icon=e.t;
|