@soroush.tech/design-system 2.0.0-alpha.0 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -24
- package/dist/AppBar.cjs +0 -4
- package/dist/AppBar.d.cts +3 -3
- package/dist/AppBar.d.mts +3 -3
- package/dist/AppBar.mjs +0 -4
- package/dist/Avatar.cjs +1 -1
- package/dist/Avatar.d.cts +3 -3
- package/dist/Avatar.d.mts +3 -3
- package/dist/Avatar.mjs +1 -1
- package/dist/Backdrop.d.cts +1 -1
- package/dist/Backdrop.d.mts +1 -1
- package/dist/Button.cjs +1 -1
- package/dist/Button.d.cts +1 -1
- package/dist/Button.d.mts +1 -1
- package/dist/Button.mjs +1 -1
- package/dist/ButtonGroup.d.cts +1 -1
- package/dist/ButtonGroup.d.mts +1 -1
- package/dist/Card.cjs +2 -2
- package/dist/Card.d.cts +3 -3
- package/dist/Card.d.mts +3 -3
- package/dist/Card.mjs +2 -2
- package/dist/Checkbox.d.cts +2 -2
- package/dist/Checkbox.d.mts +2 -2
- package/dist/CircularProgress.d.cts +3 -3
- package/dist/CircularProgress.d.mts +3 -3
- package/dist/Drawer.cjs +109 -17
- package/dist/Drawer.d.cts +43 -7
- package/dist/Drawer.d.mts +43 -7
- package/dist/Drawer.mjs +109 -18
- package/dist/Flex.cjs +6 -2
- package/dist/Flex.d.cts +1 -1
- package/dist/Flex.d.mts +1 -1
- package/dist/Flex.mjs +6 -2
- package/dist/Form.d.cts +1 -1
- package/dist/Form.d.mts +1 -1
- package/dist/FormControl.cjs +1 -1
- package/dist/FormControl.d.cts +2 -2
- package/dist/FormControl.d.mts +2 -2
- package/dist/FormControl.mjs +1 -1
- package/dist/FormHelperText.d.cts +1 -1
- package/dist/FormHelperText.d.mts +1 -1
- package/dist/FormLabel.d.cts +1 -1
- package/dist/FormLabel.d.mts +1 -1
- package/dist/Grid.cjs +7 -2
- package/dist/Grid.d.cts +19 -1
- package/dist/Grid.d.mts +19 -1
- package/dist/Grid.mjs +7 -2
- package/dist/{Icon-CkQGOBmm.mjs → Icon-BGcd6yy0.mjs} +1 -1
- package/dist/{Icon-CKLBJ7CC.cjs → Icon-Cn6Zx8wb.cjs} +1 -1
- package/dist/Icon.cjs +1 -1
- package/dist/Icon.d.cts +1 -1
- package/dist/Icon.d.mts +1 -1
- package/dist/Icon.mjs +1 -1
- package/dist/Image.d.cts +2 -2
- package/dist/Image.d.mts +2 -2
- package/dist/LinearProgress.d.cts +3 -3
- package/dist/LinearProgress.d.mts +3 -3
- package/dist/Link.cjs +1 -1
- package/dist/Link.d.cts +1 -1
- package/dist/Link.d.mts +1 -1
- package/dist/Link.mjs +1 -1
- package/dist/MenuItem.cjs +2 -2
- package/dist/MenuItem.d.cts +2 -2
- package/dist/MenuItem.d.mts +2 -2
- package/dist/MenuItem.mjs +2 -2
- package/dist/Modal.cjs +1 -1
- package/dist/Modal.d.cts +1 -1
- package/dist/Modal.d.mts +1 -1
- package/dist/Modal.mjs +1 -1
- package/dist/NativeSelect.cjs +2 -2
- package/dist/NativeSelect.d.cts +3 -3
- package/dist/NativeSelect.d.mts +3 -3
- package/dist/NativeSelect.mjs +2 -2
- package/dist/Pagination/PaginationItem.cjs +1 -1
- package/dist/Pagination/PaginationItem.d.cts +1 -1
- package/dist/Pagination/PaginationItem.d.mts +1 -1
- package/dist/Pagination/PaginationItem.mjs +1 -1
- package/dist/Pagination.d.cts +2 -2
- package/dist/Pagination.d.mts +2 -2
- package/dist/Paper.cjs +1 -1
- package/dist/Paper.d.cts +1 -1
- package/dist/Paper.d.mts +1 -1
- package/dist/Paper.mjs +1 -1
- package/dist/{Popover-Dz6h3A_9.cjs → Popover-CrSABgRk.cjs} +2 -2
- package/dist/{Popover-DWOrf7sy.mjs → Popover-DlpXdcwt.mjs} +2 -2
- package/dist/Popover.cjs +1 -1
- package/dist/Popover.d.cts +4 -4
- package/dist/Popover.d.mts +4 -4
- package/dist/Popover.mjs +1 -1
- package/dist/Pressable.cjs +1 -1
- package/dist/Pressable.d.cts +1 -1
- package/dist/Pressable.d.mts +1 -1
- package/dist/Pressable.mjs +1 -1
- package/dist/Quote.d.cts +4 -4
- package/dist/Quote.d.mts +4 -4
- package/dist/Radio.d.cts +2 -2
- package/dist/Radio.d.mts +2 -2
- package/dist/Select.cjs +3 -3
- package/dist/Select.d.cts +3 -3
- package/dist/Select.d.mts +3 -3
- package/dist/Select.mjs +3 -3
- package/dist/Sidebar/Sidebar.cjs +6 -25
- package/dist/Sidebar/Sidebar.d.cts +2 -5
- package/dist/Sidebar/Sidebar.d.mts +2 -5
- package/dist/Sidebar/Sidebar.mjs +7 -26
- package/dist/Sidebar/SidebarItem.cjs +1 -2
- package/dist/Sidebar/SidebarItem.d.cts +4 -4
- package/dist/Sidebar/SidebarItem.d.mts +4 -4
- package/dist/Sidebar/SidebarItem.mjs +1 -2
- package/dist/Skeleton.d.cts +2 -2
- package/dist/Skeleton.d.mts +2 -2
- package/dist/Switch.cjs +1 -1
- package/dist/Switch.d.cts +2 -2
- package/dist/Switch.d.mts +2 -2
- package/dist/Switch.mjs +1 -1
- package/dist/Table/Table.d.cts +3 -3
- package/dist/Table/Table.d.mts +3 -3
- package/dist/Table/TableBody.d.cts +2 -2
- package/dist/Table/TableBody.d.mts +2 -2
- package/dist/Table/TableCell.d.cts +1 -1
- package/dist/Table/TableCell.d.mts +1 -1
- package/dist/Table/TableContainer.d.cts +4 -4
- package/dist/Table/TableContainer.d.mts +4 -4
- package/dist/Table/TableControl.d.cts +1 -1
- package/dist/Table/TableControl.d.mts +1 -1
- package/dist/Table/TableFooter.d.cts +2 -2
- package/dist/Table/TableFooter.d.mts +2 -2
- package/dist/Table/TableHead.d.cts +2 -2
- package/dist/Table/TableHead.d.mts +2 -2
- package/dist/Table/TablePagination.d.cts +2 -2
- package/dist/Table/TablePagination.d.mts +2 -2
- package/dist/Table/TablePaginationActions.cjs +1 -1
- package/dist/Table/TablePaginationActions.d.cts +1 -1
- package/dist/Table/TablePaginationActions.d.mts +1 -1
- package/dist/Table/TablePaginationActions.mjs +1 -1
- package/dist/Table/TableRow.d.cts +2 -2
- package/dist/Table/TableRow.d.mts +2 -2
- package/dist/Table/TableSortLabel.cjs +1 -1
- package/dist/Table/TableSortLabel.d.cts +1 -1
- package/dist/Table/TableSortLabel.d.mts +1 -1
- package/dist/Table/TableSortLabel.mjs +1 -1
- package/dist/Table/hooks.d.cts +1 -1
- package/dist/Table/hooks.d.mts +1 -1
- package/dist/Table.d.cts +5 -5
- package/dist/Table.d.mts +5 -5
- package/dist/{TableContext-DRAhXvq3.d.cts → TableContext-98M9MAm7.d.cts} +1 -1
- package/dist/{TableContext-DBOk01Xl.d.mts → TableContext-BwK_fB9Q.d.mts} +1 -1
- package/dist/TextInput.cjs +1 -1
- package/dist/TextInput.d.cts +2 -2
- package/dist/TextInput.d.mts +2 -2
- package/dist/TextInput.mjs +1 -1
- package/dist/ToggleButton/ToggleButton.cjs +1 -1
- package/dist/ToggleButton/ToggleButton.d.cts +1 -1
- package/dist/ToggleButton/ToggleButton.d.mts +1 -1
- package/dist/ToggleButton/ToggleButton.mjs +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.cjs +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.d.cts +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.d.mts +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.mjs +1 -1
- package/dist/Typography.cjs +1 -1
- package/dist/Typography.d.cts +2 -2
- package/dist/Typography.d.mts +2 -2
- package/dist/Typography.mjs +1 -1
- package/dist/View.cjs +2 -1
- package/dist/View.d.cts +1 -1
- package/dist/View.d.mts +1 -1
- package/dist/View.mjs +2 -1
- package/dist/engine.d.cts +1 -1
- package/dist/engine.d.mts +1 -1
- package/dist/{index-D4i9vrQM.d.mts → index-6BHvkjdp.d.cts} +3 -3
- package/dist/{index-CvWslVk6.d.cts → index-AlVOmB-K.d.mts} +4 -4
- package/dist/{index-tv-TGYSG.d.mts → index-B2LR3Y5d.d.cts} +4 -4
- package/dist/{index-EYR0z1Qv.d.cts → index-BAKGyLEF.d.mts} +2 -2
- package/dist/{index-DNNg9RoR.d.cts → index-BAb24XNa.d.cts} +3 -3
- package/dist/{index-CVb5zbas.d.mts → index-BC98RYwO.d.mts} +3 -3
- package/dist/{index-CzmA09Yf.d.mts → index-BS5dkngf.d.mts} +2 -2
- package/dist/{index-CLttbRhG.d.cts → index-BfOZMmZA.d.cts} +2 -2
- package/dist/{index-B6vxRNLt.d.cts → index-BjMQ1Sfq.d.cts} +3 -3
- package/dist/{index-Cjlax0-f.d.mts → index-BvLNPm5C.d.cts} +2 -2
- package/dist/index-C-ACdUhw.d.mts +20 -0
- package/dist/{index-CoHrw2p7.d.mts → index-C2e925FY.d.cts} +1 -1
- package/dist/{index-qtKJ56yu.d.mts → index-CHr4HUzH.d.mts} +2 -2
- package/dist/{index-BNpkmtaM.d.mts → index-CJWXZFFZ.d.cts} +4 -4
- package/dist/{index-DsKd9VW5.d.mts → index-COKAN6-s.d.mts} +3 -3
- package/dist/{index-bN91IhZi.d.cts → index-COYl2TN0.d.mts} +3 -3
- package/dist/{index-CCrocxBL.d.cts → index-CaCfFN31.d.mts} +4 -4
- package/dist/{index-DkJzi96w.d.cts → index-CkYiijiE.d.cts} +1 -1
- package/dist/{index-BSR9zrAA.d.mts → index-CorVAOY7.d.mts} +3 -3
- package/dist/{index-CohgpyUj.d.cts → index-D3kNrl9W.d.cts} +3 -3
- package/dist/{index-8mHoIUt5.d.mts → index-D4M18wt_.d.mts} +2 -2
- package/dist/{index-CtrxW81j.d.cts → index-D8jHpwh5.d.cts} +2 -2
- package/dist/{index-DuefjNlC.d.mts → index-DClEfecw.d.cts} +3 -3
- package/dist/{index-S3NZS-Qp.d.cts → index-DLtzp-Mg.d.mts} +3 -3
- package/dist/{index-CEqa8xx8.d.mts → index-DVG64KQ4.d.mts} +1 -1
- package/dist/index-Da9Sr6v7.d.cts +20 -0
- package/dist/{index-DPHwCZYf.d.cts → index-Dyfu-Otn.d.mts} +2 -2
- package/dist/{index-B8KscJic.d.cts → index-FTr8Mn3p.d.cts} +2 -2
- package/dist/{index-IEvuh6Cd.d.mts → index-Fcf_SOl_.d.mts} +3 -3
- package/dist/{index-BGD4OzzG.d.cts → index-OWbQXOvw.d.cts} +3 -3
- package/dist/{index-BDD-L8uL.d.cts → index-iHyGhLkM.d.mts} +1 -1
- package/dist/{index-r2avCy1z.d.mts → index-wJbUPxSk.d.cts} +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/style.cjs +1 -1
- package/dist/style.d.cts +2 -2
- package/dist/style.d.mts +2 -2
- package/dist/style.mjs +1 -1
- package/dist/{theme-BQGlZoma.mjs → theme-C1o9qa2E.mjs} +75 -27
- package/dist/{theme-BmEAXmwh.cjs → theme-DfAqr7qo.cjs} +116 -26
- package/dist/theme.cjs +8 -1
- package/dist/theme.d.cts +3 -3
- package/dist/theme.d.mts +3 -3
- package/dist/theme.mjs +2 -2
- package/dist/{themes-9YNnlVyY.d.mts → themes-CCguU8uo.d.mts} +62 -21
- package/dist/{themes-9YNnlVyY.d.cts → themes-CtTQTVqe.d.cts} +62 -21
- package/dist/{useTablePagination-CLoac5oX.d.cts → useTablePagination-BG93T2Od.d.cts} +1 -1
- package/dist/{useTablePagination-RelVsdMR.d.mts → useTablePagination-jBWK8cmx.d.mts} +1 -1
- package/package.json +2 -12
- package/dist/PageLayout/LayoutGrid.cjs +0 -21
- package/dist/PageLayout/LayoutGrid.d.cts +0 -22
- package/dist/PageLayout/LayoutGrid.d.mts +0 -22
- package/dist/PageLayout/LayoutGrid.mjs +0 -20
- package/dist/PageLayout/PageLayout.cjs +0 -148
- package/dist/PageLayout/PageLayout.d.cts +0 -31
- package/dist/PageLayout/PageLayout.d.mts +0 -31
- package/dist/PageLayout/PageLayout.mjs +0 -147
- package/dist/PageLayout.cjs +0 -7
- package/dist/PageLayout.d.cts +0 -19
- package/dist/PageLayout.d.mts +0 -19
- package/dist/PageLayout.mjs +0 -4
- package/dist/PageLayoutContext-DjJ1_7Xc.mjs +0 -5
- package/dist/PageLayoutContext-agXGhegE.cjs +0 -9
- package/dist/index-B41OXLX8.d.mts +0 -16
- package/dist/index-BJ5Tsf7u.d.cts +0 -16
- package/dist/index-BMJ3tyIw.d.cts +0 -16
- package/dist/index-BnFxdnEL.d.mts +0 -16
- package/dist/layoutStyles-B4Z1K6HZ.cjs +0 -67
- package/dist/layoutStyles-f0ISNjsC.mjs +0 -56
- package/dist/{Modal-CYNcPk-2.mjs → Modal-BcsyrrpH.mjs} +1 -1
- package/dist/{Modal-CApyh_V5.cjs → Modal-CM3osOqj.cjs} +1 -1
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { a as src_exports, o as styled } from "../src-DLGYOJMh.mjs";
|
|
2
|
-
import { View } from "../View.mjs";
|
|
3
|
-
import { t as PageLayoutContext } from "../PageLayoutContext-DjJ1_7Xc.mjs";
|
|
4
|
-
import { Grid } from "../Grid.mjs";
|
|
5
|
-
import { n as layoutStyles, t as layoutLength } from "../layoutStyles-f0ISNjsC.mjs";
|
|
6
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
//#region src/PageLayout/PageLayout/PageLayout.tsx
|
|
8
|
-
const regionContext = {
|
|
9
|
-
top: {
|
|
10
|
-
region: "bar",
|
|
11
|
-
placement: "top"
|
|
12
|
-
},
|
|
13
|
-
bottom: {
|
|
14
|
-
region: "bar",
|
|
15
|
-
placement: "bottom"
|
|
16
|
-
},
|
|
17
|
-
start: {
|
|
18
|
-
region: "panel",
|
|
19
|
-
side: "start"
|
|
20
|
-
},
|
|
21
|
-
end: {
|
|
22
|
-
region: "panel",
|
|
23
|
-
side: "end"
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
const inRegion = (key, node) => /* @__PURE__ */ jsx(PageLayoutContext.Provider, {
|
|
27
|
-
value: regionContext[key],
|
|
28
|
-
children: node
|
|
29
|
-
});
|
|
30
|
-
const panelTrack = (theme, panel) => {
|
|
31
|
-
if (panel?.mode === "inline") return layoutLength(theme, panel.width);
|
|
32
|
-
if (panel?.mode === "collapsed") return layoutLength(theme, panel.railWidth);
|
|
33
|
-
return "0px";
|
|
34
|
-
};
|
|
35
|
-
const PageLayoutRoot = styled(Grid, {
|
|
36
|
-
name: "PageLayout",
|
|
37
|
-
label: "PageLayout",
|
|
38
|
-
shouldForwardProp: (prop) => prop !== "regions",
|
|
39
|
-
systemProps: [src_exports.layout]
|
|
40
|
-
})({
|
|
41
|
-
position: "relative",
|
|
42
|
-
minHeight: "100dvh",
|
|
43
|
-
gridTemplateAreas: "\"top top top\" \"start content end\" \"bottom bottom bottom\""
|
|
44
|
-
}, ({ theme, regions }) => layoutStyles(theme, ({ bars, panels }) => {
|
|
45
|
-
const track = (side) => regions[side] ? panelTrack(theme, panels[side]) : "0px";
|
|
46
|
-
const row = (placement) => regions[placement] ? layoutLength(theme, bars[placement]) : "0px";
|
|
47
|
-
return {
|
|
48
|
-
gridTemplateColumns: `${track("start")} minmax(0, 1fr) ${track("end")}`,
|
|
49
|
-
gridTemplateRows: `${row("top")} minmax(0, 1fr) ${row("bottom")}`
|
|
50
|
-
};
|
|
51
|
-
}));
|
|
52
|
-
const PageLayoutBar = styled(View, {
|
|
53
|
-
name: "PageLayout",
|
|
54
|
-
slot: "bar",
|
|
55
|
-
label: "PageLayoutBar",
|
|
56
|
-
shouldForwardProp: (prop) => prop !== "placement"
|
|
57
|
-
})(({ theme, placement }) => ({
|
|
58
|
-
gridArea: placement,
|
|
59
|
-
minWidth: 0,
|
|
60
|
-
...layoutStyles(theme, ({ bars }) => ({ display: layoutLength(theme, bars[placement]) === "0px" ? "none" : "block" }))
|
|
61
|
-
}));
|
|
62
|
-
const panelStyle = (theme, side, isOpen, panel) => {
|
|
63
|
-
if (panel?.mode === "overlay") return {
|
|
64
|
-
display: isOpen ? "block" : "none",
|
|
65
|
-
position: "absolute",
|
|
66
|
-
insetBlock: 0,
|
|
67
|
-
[side === "start" ? "insetInlineStart" : "insetInlineEnd"]: 0,
|
|
68
|
-
width: layoutLength(theme, panel.width),
|
|
69
|
-
zIndex: theme.zOrder.drawer
|
|
70
|
-
};
|
|
71
|
-
return {
|
|
72
|
-
display: !panel || panel.mode === "hidden" ? "none" : "block",
|
|
73
|
-
position: "static",
|
|
74
|
-
width: "auto",
|
|
75
|
-
zIndex: "auto"
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
const PageLayoutPanel = styled(View, {
|
|
79
|
-
name: "PageLayout",
|
|
80
|
-
slot: "panel",
|
|
81
|
-
label: "PageLayoutPanel",
|
|
82
|
-
shouldForwardProp: (prop) => prop !== "side" && prop !== "isOpen"
|
|
83
|
-
})(({ theme, side, isOpen }) => ({
|
|
84
|
-
gridArea: side,
|
|
85
|
-
minWidth: 0,
|
|
86
|
-
overflow: "auto",
|
|
87
|
-
...layoutStyles(theme, ({ panels }) => panelStyle(theme, side, isOpen, panels[side]))
|
|
88
|
-
}));
|
|
89
|
-
const PageLayoutContent = styled(View, {
|
|
90
|
-
name: "PageLayout",
|
|
91
|
-
slot: "content",
|
|
92
|
-
label: "PageLayoutContent"
|
|
93
|
-
})(({ theme }) => ({
|
|
94
|
-
gridArea: "content",
|
|
95
|
-
minWidth: 0,
|
|
96
|
-
width: "100%",
|
|
97
|
-
...layoutStyles(theme, ({ content: { margin, mode, maxWidth } }) => {
|
|
98
|
-
const isFixed = mode === "fixed";
|
|
99
|
-
return {
|
|
100
|
-
paddingInline: layoutLength(theme, margin),
|
|
101
|
-
maxWidth: isFixed && maxWidth !== void 0 ? layoutLength(theme, maxWidth) : "none",
|
|
102
|
-
marginInline: isFixed ? "auto" : 0
|
|
103
|
-
};
|
|
104
|
-
})
|
|
105
|
-
}));
|
|
106
|
-
/**
|
|
107
|
-
* The page frame from `theme.layout`: bars on top and bottom, side panels at the
|
|
108
|
-
* start and end, and the content container between them, each breakpoint
|
|
109
|
-
* arranged by its layout entry in CSS alone (no JavaScript media queries, so
|
|
110
|
-
* server rendering matches the client). Lay the content out on the theme's
|
|
111
|
-
* columns with `LayoutGrid`.
|
|
112
|
-
*/
|
|
113
|
-
function PageLayout({ children, topBar, bottomBar, startPanel, endPanel, openPanels = {}, ...rest }) {
|
|
114
|
-
const regions = {
|
|
115
|
-
top: topBar != null,
|
|
116
|
-
bottom: bottomBar != null,
|
|
117
|
-
start: startPanel != null,
|
|
118
|
-
end: endPanel != null
|
|
119
|
-
};
|
|
120
|
-
return /* @__PURE__ */ jsxs(PageLayoutRoot, {
|
|
121
|
-
regions,
|
|
122
|
-
...rest,
|
|
123
|
-
children: [
|
|
124
|
-
regions.top && /* @__PURE__ */ jsx(PageLayoutBar, {
|
|
125
|
-
placement: "top",
|
|
126
|
-
children: inRegion("top", topBar)
|
|
127
|
-
}),
|
|
128
|
-
regions.start && /* @__PURE__ */ jsx(PageLayoutPanel, {
|
|
129
|
-
side: "start",
|
|
130
|
-
isOpen: !!openPanels.start,
|
|
131
|
-
children: inRegion("start", startPanel)
|
|
132
|
-
}),
|
|
133
|
-
/* @__PURE__ */ jsx(PageLayoutContent, { children }),
|
|
134
|
-
regions.end && /* @__PURE__ */ jsx(PageLayoutPanel, {
|
|
135
|
-
side: "end",
|
|
136
|
-
isOpen: !!openPanels.end,
|
|
137
|
-
children: inRegion("end", endPanel)
|
|
138
|
-
}),
|
|
139
|
-
regions.bottom && /* @__PURE__ */ jsx(PageLayoutBar, {
|
|
140
|
-
placement: "bottom",
|
|
141
|
-
children: inRegion("bottom", bottomBar)
|
|
142
|
-
})
|
|
143
|
-
]
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
//#endregion
|
|
147
|
-
export { PageLayout };
|
package/dist/PageLayout.cjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_PageLayoutContext = require("./PageLayoutContext-agXGhegE.cjs");
|
|
3
|
-
const require_PageLayout_PageLayout = require("./PageLayout/PageLayout.cjs");
|
|
4
|
-
const require_PageLayout_LayoutGrid = require("./PageLayout/LayoutGrid.cjs");
|
|
5
|
-
exports.LayoutGrid = require_PageLayout_LayoutGrid.LayoutGrid;
|
|
6
|
-
exports.PageLayout = require_PageLayout_PageLayout.PageLayout;
|
|
7
|
-
exports.PageLayoutContext = require_PageLayoutContext.PageLayoutContext;
|
package/dist/PageLayout.d.cts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { h as LayoutPanels } from "./themes-9YNnlVyY.cjs";
|
|
2
|
-
import { LayoutGrid, LayoutGridProps } from "./PageLayout/LayoutGrid.cjs";
|
|
3
|
-
import "./index-BDD-L8uL.cjs";
|
|
4
|
-
import { PageLayout, PageLayoutBarPlacement, PageLayoutPanelSide, PageLayoutProps } from "./PageLayout/PageLayout.cjs";
|
|
5
|
-
//#region src/PageLayout/PageLayoutContext.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* The `PageLayout` region a component renders in, so components that fill a region
|
|
8
|
-
* (`Sidebar` in a panel, `AppBar` in a bar) can size from it. `null` outside one.
|
|
9
|
-
*/
|
|
10
|
-
type PageLayoutRegion = {
|
|
11
|
-
region: 'panel';
|
|
12
|
-
side: keyof LayoutPanels;
|
|
13
|
-
} | {
|
|
14
|
-
region: 'bar';
|
|
15
|
-
placement: 'top' | 'bottom';
|
|
16
|
-
};
|
|
17
|
-
declare const PageLayoutContext: import("react").Context<PageLayoutRegion | null>;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { LayoutGrid, LayoutGridProps, PageLayout, PageLayoutBarPlacement, PageLayoutContext, PageLayoutPanelSide, PageLayoutProps, PageLayoutRegion };
|
package/dist/PageLayout.d.mts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { h as LayoutPanels } from "./themes-9YNnlVyY.mjs";
|
|
2
|
-
import { LayoutGrid, LayoutGridProps } from "./PageLayout/LayoutGrid.mjs";
|
|
3
|
-
import "./index-CoHrw2p7.mjs";
|
|
4
|
-
import { PageLayout, PageLayoutBarPlacement, PageLayoutPanelSide, PageLayoutProps } from "./PageLayout/PageLayout.mjs";
|
|
5
|
-
//#region src/PageLayout/PageLayoutContext.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* The `PageLayout` region a component renders in, so components that fill a region
|
|
8
|
-
* (`Sidebar` in a panel, `AppBar` in a bar) can size from it. `null` outside one.
|
|
9
|
-
*/
|
|
10
|
-
type PageLayoutRegion = {
|
|
11
|
-
region: 'panel';
|
|
12
|
-
side: keyof LayoutPanels;
|
|
13
|
-
} | {
|
|
14
|
-
region: 'bar';
|
|
15
|
-
placement: 'top' | 'bottom';
|
|
16
|
-
};
|
|
17
|
-
declare const PageLayoutContext: import("react").Context<PageLayoutRegion | null>;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { LayoutGrid, LayoutGridProps, PageLayout, PageLayoutBarPlacement, PageLayoutContext, PageLayoutPanelSide, PageLayoutProps, PageLayoutRegion };
|
package/dist/PageLayout.mjs
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
//#region src/PageLayout/PageLayoutContext.ts
|
|
2
|
-
const PageLayoutContext = (0, require("react").createContext)(null);
|
|
3
|
-
//#endregion
|
|
4
|
-
Object.defineProperty(exports, "PageLayoutContext", {
|
|
5
|
-
enumerable: true,
|
|
6
|
-
get: function() {
|
|
7
|
-
return PageLayoutContext;
|
|
8
|
-
}
|
|
9
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { S as Theme } from "./themes-9YNnlVyY.mjs";
|
|
2
|
-
import "./index-CEqa8xx8.mjs";
|
|
3
|
-
import { s as ViewProps } from "./index-tv-TGYSG.mjs";
|
|
4
|
-
import { FlexboxProps } from "@soroush.tech/styled-system";
|
|
5
|
-
//#region src/Flex/Flex.d.ts
|
|
6
|
-
/** Valid values for the gap prop - derived from theme.space keys. */
|
|
7
|
-
type GapToken = keyof Theme['space'];
|
|
8
|
-
interface FlexProps extends ViewProps, FlexboxProps<Theme> {}
|
|
9
|
-
declare const Flex: import("@emotion/styled").StyledComponent<{
|
|
10
|
-
theme?: Theme;
|
|
11
|
-
as?: React.ElementType;
|
|
12
|
-
} & ViewProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
13
|
-
theme?: Theme;
|
|
14
|
-
} & FlexProps, {}, {}>;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { FlexProps as n, GapToken as r, Flex as t };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { S as Theme } from "./themes-9YNnlVyY.cjs";
|
|
2
|
-
import "./index-DkJzi96w.cjs";
|
|
3
|
-
import { s as ViewProps } from "./index-CvWslVk6.cjs";
|
|
4
|
-
import { FlexboxProps, GridProps } from "@soroush.tech/styled-system";
|
|
5
|
-
//#region src/Grid/Grid.d.ts
|
|
6
|
-
/** Valid values for the gap / columnGap / rowGap props - derived from theme.space keys. */
|
|
7
|
-
type GapToken = keyof Theme['space'];
|
|
8
|
-
interface GridProps$1 extends ViewProps, GridProps<Theme>, FlexboxProps<Theme> {}
|
|
9
|
-
declare const Grid: import("@emotion/styled").StyledComponent<{
|
|
10
|
-
theme?: Theme;
|
|
11
|
-
as?: React.ElementType;
|
|
12
|
-
} & ViewProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
13
|
-
theme?: Theme;
|
|
14
|
-
} & GridProps$1, {}, {}>;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { Grid as n, GridProps$1 as r, GapToken as t };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { S as Theme } from "./themes-9YNnlVyY.cjs";
|
|
2
|
-
import "./index-DkJzi96w.cjs";
|
|
3
|
-
import { s as ViewProps } from "./index-CvWslVk6.cjs";
|
|
4
|
-
import { FlexboxProps } from "@soroush.tech/styled-system";
|
|
5
|
-
//#region src/Flex/Flex.d.ts
|
|
6
|
-
/** Valid values for the gap prop - derived from theme.space keys. */
|
|
7
|
-
type GapToken = keyof Theme['space'];
|
|
8
|
-
interface FlexProps extends ViewProps, FlexboxProps<Theme> {}
|
|
9
|
-
declare const Flex: import("@emotion/styled").StyledComponent<{
|
|
10
|
-
theme?: Theme;
|
|
11
|
-
as?: React.ElementType;
|
|
12
|
-
} & ViewProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
13
|
-
theme?: Theme;
|
|
14
|
-
} & FlexProps, {}, {}>;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { FlexProps as n, GapToken as r, Flex as t };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { S as Theme } from "./themes-9YNnlVyY.mjs";
|
|
2
|
-
import "./index-CEqa8xx8.mjs";
|
|
3
|
-
import { s as ViewProps } from "./index-tv-TGYSG.mjs";
|
|
4
|
-
import { FlexboxProps, GridProps } from "@soroush.tech/styled-system";
|
|
5
|
-
//#region src/Grid/Grid.d.ts
|
|
6
|
-
/** Valid values for the gap / columnGap / rowGap props - derived from theme.space keys. */
|
|
7
|
-
type GapToken = keyof Theme['space'];
|
|
8
|
-
interface GridProps$1 extends ViewProps, GridProps<Theme>, FlexboxProps<Theme> {}
|
|
9
|
-
declare const Grid: import("@emotion/styled").StyledComponent<{
|
|
10
|
-
theme?: Theme;
|
|
11
|
-
as?: React.ElementType;
|
|
12
|
-
} & ViewProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
13
|
-
theme?: Theme;
|
|
14
|
-
} & GridProps$1, {}, {}>;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { Grid as n, GridProps$1 as r, GapToken as t };
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
const require_src = require("./src-DU81aGy9.cjs");
|
|
2
|
-
//#region src/PageLayout/layoutStyles.ts
|
|
3
|
-
const mergePanel = (panel, override) => {
|
|
4
|
-
const { mode, width, railWidth } = {
|
|
5
|
-
...panel,
|
|
6
|
-
...override
|
|
7
|
-
};
|
|
8
|
-
return mode && width !== void 0 && railWidth !== void 0 ? {
|
|
9
|
-
mode,
|
|
10
|
-
width,
|
|
11
|
-
railWidth
|
|
12
|
-
} : void 0;
|
|
13
|
-
};
|
|
14
|
-
const mergeEntry = (entry, { bars, panels, content }) => ({
|
|
15
|
-
bars: {
|
|
16
|
-
...entry.bars,
|
|
17
|
-
...bars
|
|
18
|
-
},
|
|
19
|
-
panels: {
|
|
20
|
-
start: mergePanel(entry.panels.start, panels?.start),
|
|
21
|
-
end: mergePanel(entry.panels.end, panels?.end)
|
|
22
|
-
},
|
|
23
|
-
content: {
|
|
24
|
-
...entry.content,
|
|
25
|
-
...content
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
/**
|
|
29
|
-
* `theme.layout` resolved mobile-first: the base entry, then one entry per
|
|
30
|
-
* breakpoint that has one, merged over the entries before it, with its `@media` rule.
|
|
31
|
-
*/
|
|
32
|
-
const layoutEntries = ({ breakpoints, layout }) => {
|
|
33
|
-
let entry = layout.base;
|
|
34
|
-
const entries = [[null, entry]];
|
|
35
|
-
for (const [key, value] of Object.entries(breakpoints)) {
|
|
36
|
-
const override = layout[key];
|
|
37
|
-
if (!override) continue;
|
|
38
|
-
entry = mergeEntry(entry, override);
|
|
39
|
-
entries.push([(0, require_src.src_exports.createMediaQuery)(value), entry]);
|
|
40
|
-
}
|
|
41
|
-
return entries;
|
|
42
|
-
};
|
|
43
|
-
/** A layout length as CSS: a `theme.space` key resolves through the scale, a length stays as written. */
|
|
44
|
-
const layoutLength = (theme, value = 0) => {
|
|
45
|
-
const length = theme.space[value] ?? value;
|
|
46
|
-
return typeof length === "number" ? `${length}px` : length;
|
|
47
|
-
};
|
|
48
|
-
/** Styles per layout entry: the base entry's at the top level, each breakpoint's in its `@media` block. */
|
|
49
|
-
const layoutStyles = (theme, style) => {
|
|
50
|
-
const styles = {};
|
|
51
|
-
for (const [media, entry] of layoutEntries(theme)) if (media) styles[media] = style(entry);
|
|
52
|
-
else Object.assign(styles, style(entry));
|
|
53
|
-
return styles;
|
|
54
|
-
};
|
|
55
|
-
//#endregion
|
|
56
|
-
Object.defineProperty(exports, "layoutLength", {
|
|
57
|
-
enumerable: true,
|
|
58
|
-
get: function() {
|
|
59
|
-
return layoutLength;
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
Object.defineProperty(exports, "layoutStyles", {
|
|
63
|
-
enumerable: true,
|
|
64
|
-
get: function() {
|
|
65
|
-
return layoutStyles;
|
|
66
|
-
}
|
|
67
|
-
});
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { a as src_exports } from "./src-DLGYOJMh.mjs";
|
|
2
|
-
//#region src/PageLayout/layoutStyles.ts
|
|
3
|
-
const mergePanel = (panel, override) => {
|
|
4
|
-
const { mode, width, railWidth } = {
|
|
5
|
-
...panel,
|
|
6
|
-
...override
|
|
7
|
-
};
|
|
8
|
-
return mode && width !== void 0 && railWidth !== void 0 ? {
|
|
9
|
-
mode,
|
|
10
|
-
width,
|
|
11
|
-
railWidth
|
|
12
|
-
} : void 0;
|
|
13
|
-
};
|
|
14
|
-
const mergeEntry = (entry, { bars, panels, content }) => ({
|
|
15
|
-
bars: {
|
|
16
|
-
...entry.bars,
|
|
17
|
-
...bars
|
|
18
|
-
},
|
|
19
|
-
panels: {
|
|
20
|
-
start: mergePanel(entry.panels.start, panels?.start),
|
|
21
|
-
end: mergePanel(entry.panels.end, panels?.end)
|
|
22
|
-
},
|
|
23
|
-
content: {
|
|
24
|
-
...entry.content,
|
|
25
|
-
...content
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
/**
|
|
29
|
-
* `theme.layout` resolved mobile-first: the base entry, then one entry per
|
|
30
|
-
* breakpoint that has one, merged over the entries before it, with its `@media` rule.
|
|
31
|
-
*/
|
|
32
|
-
const layoutEntries = ({ breakpoints, layout }) => {
|
|
33
|
-
let entry = layout.base;
|
|
34
|
-
const entries = [[null, entry]];
|
|
35
|
-
for (const [key, value] of Object.entries(breakpoints)) {
|
|
36
|
-
const override = layout[key];
|
|
37
|
-
if (!override) continue;
|
|
38
|
-
entry = mergeEntry(entry, override);
|
|
39
|
-
entries.push([(0, src_exports.createMediaQuery)(value), entry]);
|
|
40
|
-
}
|
|
41
|
-
return entries;
|
|
42
|
-
};
|
|
43
|
-
/** A layout length as CSS: a `theme.space` key resolves through the scale, a length stays as written. */
|
|
44
|
-
const layoutLength = (theme, value = 0) => {
|
|
45
|
-
const length = theme.space[value] ?? value;
|
|
46
|
-
return typeof length === "number" ? `${length}px` : length;
|
|
47
|
-
};
|
|
48
|
-
/** Styles per layout entry: the base entry's at the top level, each breakpoint's in its `@media` block. */
|
|
49
|
-
const layoutStyles = (theme, style) => {
|
|
50
|
-
const styles = {};
|
|
51
|
-
for (const [media, entry] of layoutEntries(theme)) if (media) styles[media] = style(entry);
|
|
52
|
-
else Object.assign(styles, style(entry));
|
|
53
|
-
return styles;
|
|
54
|
-
};
|
|
55
|
-
//#endregion
|
|
56
|
-
export { layoutStyles as n, layoutLength as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { o as styled, t as createShouldForwardProp } from "./src-DLGYOJMh.mjs";
|
|
2
2
|
import { View } from "./View.mjs";
|
|
3
3
|
import { Backdrop } from "./Backdrop.mjs";
|
|
4
|
-
import { Portal } from "./Portal.mjs";
|
|
5
4
|
import { FocusTrap } from "./FocusTrap.mjs";
|
|
5
|
+
import { Portal } from "./Portal.mjs";
|
|
6
6
|
import { useCallback, useEffect, useMemo, useRef } from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/utils/ownerDocument.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_src = require("./src-DU81aGy9.cjs");
|
|
2
2
|
const require_View = require("./View.cjs");
|
|
3
3
|
const require_Backdrop = require("./Backdrop.cjs");
|
|
4
|
-
const require_Portal = require("./Portal.cjs");
|
|
5
4
|
const require_FocusTrap = require("./FocusTrap.cjs");
|
|
5
|
+
const require_Portal = require("./Portal.cjs");
|
|
6
6
|
let react = require("react");
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
8
|
let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
|