@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,5 +1,22 @@
|
|
|
1
1
|
import { CSSObject } from "@emotion/react";
|
|
2
2
|
import { ElementType } from "react";
|
|
3
|
+
import { ContainerQueries, QueryHelpers } from "@soroush.tech/styled-system";
|
|
4
|
+
//#region src/theme/breakpoints.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* The query helpers a theme's breakpoint scale carries: `up` / `down` / `only` / `between` /
|
|
7
|
+
* `not` as `@media` rules, and `containerQueries` for the same sizes as `@container` rules.
|
|
8
|
+
*/
|
|
9
|
+
interface BreakpointHelpers extends QueryHelpers {
|
|
10
|
+
containerQueries: ContainerQueries;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The scale with its helpers attached as non-enumerable methods: the engine, the theme's JSON
|
|
14
|
+
* and a spread see only the sizes, while `theme.breakpoints.up('md')` works. `createTheme`
|
|
15
|
+
* and `ThemeProvider` re-attach them after a merge, so they always follow the theme's own
|
|
16
|
+
* breakpoints.
|
|
17
|
+
*/
|
|
18
|
+
declare const withBreakpointHelpers: <Scale extends Record<string, string | number>>(scale: Scale) => Scale & BreakpointHelpers;
|
|
19
|
+
//#endregion
|
|
3
20
|
//#region src/theme/utils/createTheme.d.ts
|
|
4
21
|
/**
|
|
5
22
|
* Recursive partial of a theme shape. Plain objects recurse; arrays and
|
|
@@ -16,6 +33,7 @@ type ThemeOverride = DeepPartial<Theme>;
|
|
|
16
33
|
* - `undefined` override values are ignored - a key can be added or replaced,
|
|
17
34
|
* never removed.
|
|
18
35
|
* - Neither argument is mutated; untouched branches keep referential identity.
|
|
36
|
+
* - `breakpoints` gets its query helpers back, built from the merged sizes.
|
|
19
37
|
*/
|
|
20
38
|
declare const createTheme: (base: Theme, overrides: ThemeOverride) => Theme;
|
|
21
39
|
//#endregion
|
|
@@ -187,17 +205,39 @@ interface ThemeSizes {
|
|
|
187
205
|
* forces the matching icon size to be supplied.
|
|
188
206
|
*/
|
|
189
207
|
type ThemeIconSizes = { [K in keyof ThemeSizes]: string; };
|
|
208
|
+
/** The default breakpoint names - Material 3's window classes. */
|
|
209
|
+
interface DefaultBreakpoints {
|
|
210
|
+
/** compact: 0-599px - the base, applies everywhere until `sm` overrides it. */
|
|
211
|
+
xs: true;
|
|
212
|
+
/** medium: 600-839px. */
|
|
213
|
+
sm: true;
|
|
214
|
+
/** expanded: 840-1199px. */
|
|
215
|
+
md: true;
|
|
216
|
+
/** large: 1200-1599px. */
|
|
217
|
+
lg: true;
|
|
218
|
+
/** extra-large: 1600px and up. */
|
|
219
|
+
xl: true;
|
|
220
|
+
}
|
|
190
221
|
/**
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
222
|
+
* Add, rename or remove breakpoints by augmenting this interface: `true` adds a name, `false`
|
|
223
|
+
* removes a default one.
|
|
224
|
+
*
|
|
225
|
+
* declare module '@soroush.tech/design-system/theme' {
|
|
226
|
+
* interface BreakpointOverrides { mobile: true; tablet: true; xs: false; sm: false }
|
|
227
|
+
* }
|
|
195
228
|
*/
|
|
196
|
-
interface
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
229
|
+
interface BreakpointOverrides {}
|
|
230
|
+
/** The theme's breakpoint names: the defaults, plus every override set to `true`, minus every one set to `false`. */
|
|
231
|
+
type BreakpointKey = Exclude<keyof DefaultBreakpoints | keyof BreakpointOverrides, { [K in keyof BreakpointOverrides]: BreakpointOverrides[K] extends false ? K : never; }[keyof BreakpointOverrides]>;
|
|
232
|
+
/**
|
|
233
|
+
* `theme.breakpoints`: where each window class starts, ascending, in declared order. A key holds
|
|
234
|
+
* from its value until the next key, so `xs: '0px'` applies everywhere until `sm` overrides it;
|
|
235
|
+
* media queries are min-width, which is why the theme writes the start of each range. Responsive
|
|
236
|
+
* props map onto the keys by name, or by position for an array. A value is a CSS length; a
|
|
237
|
+
* media condition or a full `@media` rule is passed through, without the range helpers.
|
|
238
|
+
* `createTheme` appends a breakpoint you add after the existing ones, so it must be larger.
|
|
239
|
+
*/
|
|
240
|
+
type ThemeBreakpoints = { [K in BreakpointKey]: string; };
|
|
201
241
|
/** A `theme.space` key - layout margins and gutters step on the spacing scale. */
|
|
202
242
|
type LayoutSpace = Exclude<keyof ThemeSpace, 'auto'>;
|
|
203
243
|
/** A `theme.space` key or a CSS length (a 280px panel is a size, not a spacing step). */
|
|
@@ -238,14 +278,12 @@ interface LayoutEntry {
|
|
|
238
278
|
content: LayoutContent;
|
|
239
279
|
}
|
|
240
280
|
/**
|
|
241
|
-
* `theme.layout`:
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
281
|
+
* `theme.layout`: layout tokens per breakpoint, merged mobile-first in breakpoint order. The
|
|
282
|
+
* first breakpoint's entry (`xs`) is complete; every later one lists only what changes. A panel
|
|
283
|
+
* first declared at a later breakpoint needs its `mode`, `width` and `railWidth` there. These
|
|
284
|
+
* are tokens: apps (and the studio) read them; nothing in the design system lays a page out.
|
|
245
285
|
*/
|
|
246
|
-
type ThemeLayout = {
|
|
247
|
-
base: LayoutEntry;
|
|
248
|
-
} & { [K in keyof ThemeBreakpoints]?: {
|
|
286
|
+
type ThemeLayout = { [K in BreakpointKey]?: {
|
|
249
287
|
bars?: LayoutBars;
|
|
250
288
|
panels?: { [P in keyof LayoutPanels]?: Partial<LayoutPanel>; };
|
|
251
289
|
content?: Partial<LayoutContent>;
|
|
@@ -426,14 +464,12 @@ interface ThemeComponents {
|
|
|
426
464
|
Icon?: ComponentConfig;
|
|
427
465
|
Image?: ComponentConfig;
|
|
428
466
|
LinearProgress?: ComponentConfig<Record<string, unknown>, 'root' | 'track' | 'dash' | 'bar' | 'traveler' | 'segment' | 'secondaryBar'>;
|
|
429
|
-
LayoutGrid?: ComponentConfig;
|
|
430
467
|
Link?: ComponentConfig;
|
|
431
468
|
MenuItem?: ComponentConfig<Record<string, unknown>, 'root' | 'check'>;
|
|
432
469
|
Modal?: ComponentConfig;
|
|
433
470
|
NativeSelect?: ComponentConfig<Record<string, unknown>, 'root' | 'select' | 'icon'>;
|
|
434
471
|
Pagination?: ComponentConfig<Record<string, unknown>, 'root' | 'list'>;
|
|
435
472
|
PaginationItem?: ComponentConfig<Record<string, unknown>, 'root' | 'ellipsis'>;
|
|
436
|
-
PageLayout?: ComponentConfig<Record<string, unknown>, 'root' | 'bar' | 'panel' | 'content'>;
|
|
437
473
|
Paper?: ComponentConfig;
|
|
438
474
|
Popover?: ComponentConfig<Record<string, unknown>, 'root' | 'positioner'>;
|
|
439
475
|
Pressable?: ComponentConfig<PressableOwnerState>;
|
|
@@ -467,7 +503,7 @@ interface Theme {
|
|
|
467
503
|
/** Optional per-component customization - see `ThemeComponents`. */
|
|
468
504
|
components?: OpenScale<ThemeComponents>;
|
|
469
505
|
space: OpenScale<ThemeSpace>;
|
|
470
|
-
breakpoints: OpenScale<ThemeBreakpoints>;
|
|
506
|
+
breakpoints: OpenScale<ThemeBreakpoints & BreakpointHelpers>;
|
|
471
507
|
layout: ThemeLayout;
|
|
472
508
|
border: OpenScale<ThemeBorder>;
|
|
473
509
|
text: OpenScale<ThemeText>;
|
|
@@ -560,7 +596,7 @@ declare const avatar: {
|
|
|
560
596
|
declare const icon: ThemeIconSizes;
|
|
561
597
|
declare const sizes: ThemeSizes;
|
|
562
598
|
declare const space: ThemeSpace;
|
|
563
|
-
declare const breakpoints: ThemeBreakpoints;
|
|
599
|
+
declare const breakpoints: ThemeBreakpoints & BreakpointHelpers;
|
|
564
600
|
declare const layout: ThemeLayout;
|
|
565
601
|
declare const typography: ThemeTypographyVariants;
|
|
566
602
|
/**
|
|
@@ -568,5 +604,10 @@ declare const typography: ThemeTypographyVariants;
|
|
|
568
604
|
* belong to the consumer, who builds brand themes with `createTheme(baseTheme, ...)`.
|
|
569
605
|
*/
|
|
570
606
|
declare const baseTheme: Theme;
|
|
607
|
+
/**
|
|
608
|
+
* The query helpers for `baseTheme`'s breakpoints, as plain functions. A theme with its own
|
|
609
|
+
* breakpoints has the same helpers on `theme.breakpoints`.
|
|
610
|
+
*/
|
|
611
|
+
declare const up: (from: import("@soroush.tech/styled-system").BreakpointInput) => string, down: (to: import("@soroush.tech/styled-system").BreakpointInput) => string, only: (key: string) => string, between: (from: import("@soroush.tech/styled-system").BreakpointInput, to: import("@soroush.tech/styled-system").BreakpointInput) => string, not: (key: string) => string, containerQueries: import("@soroush.tech/styled-system").ContainerQueries;
|
|
571
612
|
//#endregion
|
|
572
|
-
export {
|
|
613
|
+
export { between as $, ThemeBreakpoints as A, ThemeRadii as B, PressableOwnerState as C, withBreakpointHelpers as Ct, ThemeBackground as D, ThemeAvatarSizes as E, ThemeIconSizes as F, ThemeSwitch as G, ThemeSizes as H, ThemeLayout as I, ThemeZOrder as J, ThemeText as K, ThemeLetterSpacings as L, ThemeDefaults as M, ThemeFontWeights as N, ThemeBorder as O, ThemeFonts as P, baseTheme as Q, ThemeLineHeights as R, PaletteEntry as S, BreakpointHelpers as St, Theme as T, ThemeSkeleton as U, ThemeShadow as V, ThemeSpace as W, TypographyVariantStyle as X, TypographyVariant as Y, avatar as Z, LayoutPanel as _, up as _t, CSSObject$1 as a, fontWeights as at, OpenScale as b, ThemeOverride as bt, CardSlotTypographyProps as c, layout as ct, ComponentVariant as d, not as dt, borderWidths as et, DefaultBreakpoints as f, only as ft, LayoutLength as g, typography as gt, LayoutEntry as h, space as ht, ButtonVariants as i, fontSizes as it, ThemeComponents as j, ThemeBorderWidths as k, ComponentConfig as l, letterSpacings as lt, LayoutContent as m, sizes as mt, BreakpointOverrides as n, containerQueries as nt, CardOwnerState as o, fonts as ot, LayoutBars as p, radii as pt, ThemeTypographyVariants as q, ButtonOwnerState as r, down as rt, CardSlotIconProps as s, icon as st, BreakpointKey as t, breakpoints as tt, ComponentStyle as u, lineHeights as ut, LayoutPanels as v, zOrder as vt, SizeEntry as w, PaletteColor as x, createTheme as xt, LayoutSpace as y, DeepPartial as yt, ThemePalette as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as TableSortLabelDirection } from "./index-
|
|
1
|
+
import { n as TableSortLabelDirection } from "./index-BAb24XNa.cjs";
|
|
2
2
|
//#region src/Table/hooks/useTableSort.d.ts
|
|
3
3
|
/** One column's sort state - spreads directly onto `TableSortLabel`. */
|
|
4
4
|
interface TableSortEntry {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as TableSortLabelDirection } from "./index-
|
|
1
|
+
import { n as TableSortLabelDirection } from "./index-Fcf_SOl_.mjs";
|
|
2
2
|
//#region src/Table/hooks/useTableSort.d.ts
|
|
3
3
|
/** One column's sort state - spreads directly onto `TableSortLabel`. */
|
|
4
4
|
interface TableSortEntry {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soroush.tech/design-system",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.1",
|
|
4
4
|
"description": "Emotion + @soroush.tech/styled-system React component library - token-driven light/dark themes, layout primitives, forms, and overlays.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design-system",
|
|
@@ -278,16 +278,6 @@
|
|
|
278
278
|
"default": "./dist/Pagination.cjs"
|
|
279
279
|
}
|
|
280
280
|
},
|
|
281
|
-
"./PageLayout": {
|
|
282
|
-
"import": {
|
|
283
|
-
"types": "./dist/PageLayout.d.mts",
|
|
284
|
-
"default": "./dist/PageLayout.mjs"
|
|
285
|
-
},
|
|
286
|
-
"require": {
|
|
287
|
-
"types": "./dist/PageLayout.d.cts",
|
|
288
|
-
"default": "./dist/PageLayout.cjs"
|
|
289
|
-
}
|
|
290
|
-
},
|
|
291
281
|
"./Paper": {
|
|
292
282
|
"import": {
|
|
293
283
|
"types": "./dist/Paper.d.mts",
|
|
@@ -487,7 +477,7 @@
|
|
|
487
477
|
"@emotion/cache": "^11.14.0",
|
|
488
478
|
"@emotion/react": "^11.14.0",
|
|
489
479
|
"@emotion/styled": "^11.14.1",
|
|
490
|
-
"@soroush.tech/styled-system": "^
|
|
480
|
+
"@soroush.tech/styled-system": "^6.0.0-alpha.0"
|
|
491
481
|
},
|
|
492
482
|
"peerDependencies": {
|
|
493
483
|
"react": "^19.2.8",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_src = require("../src-DU81aGy9.cjs");
|
|
3
|
-
const require_Grid = require("../Grid.cjs");
|
|
4
|
-
const require_layoutStyles = require("../layoutStyles-B4Z1K6HZ.cjs");
|
|
5
|
-
//#region src/PageLayout/LayoutGrid/LayoutGrid.tsx
|
|
6
|
-
/**
|
|
7
|
-
* A `Grid` on the theme's content columns: each breakpoint's
|
|
8
|
-
* `theme.layout.*.content.columns` equal tracks, its `gutter` between them.
|
|
9
|
-
* Place items with `gridColumn` (`'span 4'`, `'1 / -1'`, ...). `grid` and
|
|
10
|
-
* `space` come last, so a `gridTemplateColumns` or `gap` prop still wins.
|
|
11
|
-
*/
|
|
12
|
-
const LayoutGrid = require_src.styled(require_Grid.Grid, {
|
|
13
|
-
name: "LayoutGrid",
|
|
14
|
-
label: "LayoutGrid",
|
|
15
|
-
systemProps: [require_src.src_exports.grid, require_src.src_exports.space]
|
|
16
|
-
})(({ theme }) => require_layoutStyles.layoutStyles(theme, ({ content: { columns, gutter } }) => ({
|
|
17
|
-
gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))`,
|
|
18
|
-
columnGap: require_layoutStyles.layoutLength(theme, gutter)
|
|
19
|
-
})));
|
|
20
|
-
//#endregion
|
|
21
|
-
exports.LayoutGrid = LayoutGrid;
|
|
@@ -1,22 +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 { r as GridProps } from "../index-BJ5Tsf7u.cjs";
|
|
5
|
-
//#region src/PageLayout/LayoutGrid/LayoutGrid.d.ts
|
|
6
|
-
type LayoutGridProps = GridProps;
|
|
7
|
-
/**
|
|
8
|
-
* A `Grid` on the theme's content columns: each breakpoint's
|
|
9
|
-
* `theme.layout.*.content.columns` equal tracks, its `gutter` between them.
|
|
10
|
-
* Place items with `gridColumn` (`'span 4'`, `'1 / -1'`, ...). `grid` and
|
|
11
|
-
* `space` come last, so a `gridTemplateColumns` or `gap` prop still wins.
|
|
12
|
-
*/
|
|
13
|
-
declare const LayoutGrid: import("@emotion/styled").StyledComponent<Pick<{
|
|
14
|
-
theme?: Theme;
|
|
15
|
-
as?: React.ElementType;
|
|
16
|
-
} & ViewProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
17
|
-
theme?: Theme;
|
|
18
|
-
} & GridProps, "about" | "accessKey" | "alignContent" | "alignItems" | "alignSelf" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "as" | "aspectRatio" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "autoSave" | "bg" | "border" | "borderBottom" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderColor" | "borderLeft" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRadius" | "borderRight" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderStyle" | "borderTop" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "borderWidth" | "borderX" | "borderY" | "bottom" | "children" | "className" | "color" | "columnGap" | "content" | "contentEditable" | "contextMenu" | "cursor" | "dangerouslySetInnerHTML" | "datatype" | "defaultChecked" | "defaultValue" | "dir" | "display" | "draggable" | "enterKeyHint" | "exportparts" | "flex" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gap" | "gridArea" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumn" | "gridColumnGap" | "gridGap" | "gridRow" | "gridRowGap" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "hidden" | "id" | "inert" | "inlist" | "inputMode" | "is" | "itemID" | "itemProp" | "itemRef" | "itemScope" | "itemType" | "justifyContent" | "justifyItems" | "justifySelf" | "key" | "lang" | "left" | "letterSpacing" | "lineHeight" | "m" | "margin" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "marginX" | "marginY" | "maxHeight" | "maxWidth" | "mb" | "minHeight" | "minWidth" | "ml" | "mr" | "mt" | "mx" | "my" | "nonce" | "onAbort" | "onAbortCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAuxClick" | "onAuxClickCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onBeforeToggle" | "onBlur" | "onBlurCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onChange" | "onChangeCapture" | "onClick" | "onClickCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onContextMenu" | "onContextMenuCapture" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onError" | "onErrorCapture" | "onFocus" | "onFocusCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onInput" | "onInputCapture" | "onInvalid" | "onInvalidCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onLoad" | "onLoadCapture" | "onLoadStart" | "onLoadStartCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onPaste" | "onPasteCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerMove" | "onPointerMoveCapture" | "onPointerOut" | "onPointerOutCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerUp" | "onPointerUpCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onReset" | "onResetCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onSelect" | "onSelectCapture" | "onStalled" | "onStalledCapture" | "onSubmit" | "onSubmitCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onToggle" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onWheel" | "onWheelCapture" | "opacity" | "order" | "overflow" | "overflowX" | "overflowY" | "p" | "padding" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "paddingX" | "paddingY" | "part" | "pb" | "pl" | "popover" | "popoverTarget" | "popoverTargetAction" | "position" | "pr" | "prefix" | "property" | "pt" | "px" | "py" | "radioGroup" | "ref" | "rel" | "resource" | "results" | "rev" | "right" | "role" | "rowGap" | "security" | "size" | "slot" | "spellCheck" | "style" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "tabIndex" | "textAlign" | "textAlignLast" | "textDecoration" | "textDecorationColor" | "textDecorationLine" | "textDecorationStyle" | "textDecorationThickness" | "textOverflow" | "textTransform" | "theme" | "title" | "top" | "translate" | "typeof" | "unselectable" | "verticalAlign" | "vocab" | "whiteSpace" | "width" | "zIndex"> & {
|
|
19
|
-
theme?: Theme;
|
|
20
|
-
} & GridProps, {}, {}>;
|
|
21
|
-
//#endregion
|
|
22
|
-
export { LayoutGrid, LayoutGridProps };
|
|
@@ -1,22 +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 { r as GridProps } from "../index-BnFxdnEL.mjs";
|
|
5
|
-
//#region src/PageLayout/LayoutGrid/LayoutGrid.d.ts
|
|
6
|
-
type LayoutGridProps = GridProps;
|
|
7
|
-
/**
|
|
8
|
-
* A `Grid` on the theme's content columns: each breakpoint's
|
|
9
|
-
* `theme.layout.*.content.columns` equal tracks, its `gutter` between them.
|
|
10
|
-
* Place items with `gridColumn` (`'span 4'`, `'1 / -1'`, ...). `grid` and
|
|
11
|
-
* `space` come last, so a `gridTemplateColumns` or `gap` prop still wins.
|
|
12
|
-
*/
|
|
13
|
-
declare const LayoutGrid: import("@emotion/styled").StyledComponent<Pick<{
|
|
14
|
-
theme?: Theme;
|
|
15
|
-
as?: React.ElementType;
|
|
16
|
-
} & ViewProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
17
|
-
theme?: Theme;
|
|
18
|
-
} & GridProps, "about" | "accessKey" | "alignContent" | "alignItems" | "alignSelf" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "as" | "aspectRatio" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "autoSave" | "bg" | "border" | "borderBottom" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderColor" | "borderLeft" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRadius" | "borderRight" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderStyle" | "borderTop" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "borderWidth" | "borderX" | "borderY" | "bottom" | "children" | "className" | "color" | "columnGap" | "content" | "contentEditable" | "contextMenu" | "cursor" | "dangerouslySetInnerHTML" | "datatype" | "defaultChecked" | "defaultValue" | "dir" | "display" | "draggable" | "enterKeyHint" | "exportparts" | "flex" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gap" | "gridArea" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumn" | "gridColumnGap" | "gridGap" | "gridRow" | "gridRowGap" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "hidden" | "id" | "inert" | "inlist" | "inputMode" | "is" | "itemID" | "itemProp" | "itemRef" | "itemScope" | "itemType" | "justifyContent" | "justifyItems" | "justifySelf" | "key" | "lang" | "left" | "letterSpacing" | "lineHeight" | "m" | "margin" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "marginX" | "marginY" | "maxHeight" | "maxWidth" | "mb" | "minHeight" | "minWidth" | "ml" | "mr" | "mt" | "mx" | "my" | "nonce" | "onAbort" | "onAbortCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAuxClick" | "onAuxClickCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onBeforeToggle" | "onBlur" | "onBlurCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onChange" | "onChangeCapture" | "onClick" | "onClickCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onContextMenu" | "onContextMenuCapture" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onError" | "onErrorCapture" | "onFocus" | "onFocusCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onInput" | "onInputCapture" | "onInvalid" | "onInvalidCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onLoad" | "onLoadCapture" | "onLoadStart" | "onLoadStartCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onPaste" | "onPasteCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerMove" | "onPointerMoveCapture" | "onPointerOut" | "onPointerOutCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerUp" | "onPointerUpCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onReset" | "onResetCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onSelect" | "onSelectCapture" | "onStalled" | "onStalledCapture" | "onSubmit" | "onSubmitCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onToggle" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onWheel" | "onWheelCapture" | "opacity" | "order" | "overflow" | "overflowX" | "overflowY" | "p" | "padding" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "paddingX" | "paddingY" | "part" | "pb" | "pl" | "popover" | "popoverTarget" | "popoverTargetAction" | "position" | "pr" | "prefix" | "property" | "pt" | "px" | "py" | "radioGroup" | "ref" | "rel" | "resource" | "results" | "rev" | "right" | "role" | "rowGap" | "security" | "size" | "slot" | "spellCheck" | "style" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "tabIndex" | "textAlign" | "textAlignLast" | "textDecoration" | "textDecorationColor" | "textDecorationLine" | "textDecorationStyle" | "textDecorationThickness" | "textOverflow" | "textTransform" | "theme" | "title" | "top" | "translate" | "typeof" | "unselectable" | "verticalAlign" | "vocab" | "whiteSpace" | "width" | "zIndex"> & {
|
|
19
|
-
theme?: Theme;
|
|
20
|
-
} & GridProps, {}, {}>;
|
|
21
|
-
//#endregion
|
|
22
|
-
export { LayoutGrid, LayoutGridProps };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { a as src_exports, o as styled } from "../src-DLGYOJMh.mjs";
|
|
2
|
-
import { Grid } from "../Grid.mjs";
|
|
3
|
-
import { n as layoutStyles, t as layoutLength } from "../layoutStyles-f0ISNjsC.mjs";
|
|
4
|
-
//#region src/PageLayout/LayoutGrid/LayoutGrid.tsx
|
|
5
|
-
/**
|
|
6
|
-
* A `Grid` on the theme's content columns: each breakpoint's
|
|
7
|
-
* `theme.layout.*.content.columns` equal tracks, its `gutter` between them.
|
|
8
|
-
* Place items with `gridColumn` (`'span 4'`, `'1 / -1'`, ...). `grid` and
|
|
9
|
-
* `space` come last, so a `gridTemplateColumns` or `gap` prop still wins.
|
|
10
|
-
*/
|
|
11
|
-
const LayoutGrid = styled(Grid, {
|
|
12
|
-
name: "LayoutGrid",
|
|
13
|
-
label: "LayoutGrid",
|
|
14
|
-
systemProps: [src_exports.grid, src_exports.space]
|
|
15
|
-
})(({ theme }) => layoutStyles(theme, ({ content: { columns, gutter } }) => ({
|
|
16
|
-
gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))`,
|
|
17
|
-
columnGap: layoutLength(theme, gutter)
|
|
18
|
-
})));
|
|
19
|
-
//#endregion
|
|
20
|
-
export { LayoutGrid };
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_src = require("../src-DU81aGy9.cjs");
|
|
3
|
-
const require_View = require("../View.cjs");
|
|
4
|
-
const require_PageLayoutContext = require("../PageLayoutContext-agXGhegE.cjs");
|
|
5
|
-
const require_Grid = require("../Grid.cjs");
|
|
6
|
-
const require_layoutStyles = require("../layoutStyles-B4Z1K6HZ.cjs");
|
|
7
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
-
//#region src/PageLayout/PageLayout/PageLayout.tsx
|
|
9
|
-
const regionContext = {
|
|
10
|
-
top: {
|
|
11
|
-
region: "bar",
|
|
12
|
-
placement: "top"
|
|
13
|
-
},
|
|
14
|
-
bottom: {
|
|
15
|
-
region: "bar",
|
|
16
|
-
placement: "bottom"
|
|
17
|
-
},
|
|
18
|
-
start: {
|
|
19
|
-
region: "panel",
|
|
20
|
-
side: "start"
|
|
21
|
-
},
|
|
22
|
-
end: {
|
|
23
|
-
region: "panel",
|
|
24
|
-
side: "end"
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
const inRegion = (key, node) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PageLayoutContext.PageLayoutContext.Provider, {
|
|
28
|
-
value: regionContext[key],
|
|
29
|
-
children: node
|
|
30
|
-
});
|
|
31
|
-
const panelTrack = (theme, panel) => {
|
|
32
|
-
if (panel?.mode === "inline") return require_layoutStyles.layoutLength(theme, panel.width);
|
|
33
|
-
if (panel?.mode === "collapsed") return require_layoutStyles.layoutLength(theme, panel.railWidth);
|
|
34
|
-
return "0px";
|
|
35
|
-
};
|
|
36
|
-
const PageLayoutRoot = require_src.styled(require_Grid.Grid, {
|
|
37
|
-
name: "PageLayout",
|
|
38
|
-
label: "PageLayout",
|
|
39
|
-
shouldForwardProp: (prop) => prop !== "regions",
|
|
40
|
-
systemProps: [require_src.src_exports.layout]
|
|
41
|
-
})({
|
|
42
|
-
position: "relative",
|
|
43
|
-
minHeight: "100dvh",
|
|
44
|
-
gridTemplateAreas: "\"top top top\" \"start content end\" \"bottom bottom bottom\""
|
|
45
|
-
}, ({ theme, regions }) => require_layoutStyles.layoutStyles(theme, ({ bars, panels }) => {
|
|
46
|
-
const track = (side) => regions[side] ? panelTrack(theme, panels[side]) : "0px";
|
|
47
|
-
const row = (placement) => regions[placement] ? require_layoutStyles.layoutLength(theme, bars[placement]) : "0px";
|
|
48
|
-
return {
|
|
49
|
-
gridTemplateColumns: `${track("start")} minmax(0, 1fr) ${track("end")}`,
|
|
50
|
-
gridTemplateRows: `${row("top")} minmax(0, 1fr) ${row("bottom")}`
|
|
51
|
-
};
|
|
52
|
-
}));
|
|
53
|
-
const PageLayoutBar = require_src.styled(require_View.View, {
|
|
54
|
-
name: "PageLayout",
|
|
55
|
-
slot: "bar",
|
|
56
|
-
label: "PageLayoutBar",
|
|
57
|
-
shouldForwardProp: (prop) => prop !== "placement"
|
|
58
|
-
})(({ theme, placement }) => ({
|
|
59
|
-
gridArea: placement,
|
|
60
|
-
minWidth: 0,
|
|
61
|
-
...require_layoutStyles.layoutStyles(theme, ({ bars }) => ({ display: require_layoutStyles.layoutLength(theme, bars[placement]) === "0px" ? "none" : "block" }))
|
|
62
|
-
}));
|
|
63
|
-
const panelStyle = (theme, side, isOpen, panel) => {
|
|
64
|
-
if (panel?.mode === "overlay") return {
|
|
65
|
-
display: isOpen ? "block" : "none",
|
|
66
|
-
position: "absolute",
|
|
67
|
-
insetBlock: 0,
|
|
68
|
-
[side === "start" ? "insetInlineStart" : "insetInlineEnd"]: 0,
|
|
69
|
-
width: require_layoutStyles.layoutLength(theme, panel.width),
|
|
70
|
-
zIndex: theme.zOrder.drawer
|
|
71
|
-
};
|
|
72
|
-
return {
|
|
73
|
-
display: !panel || panel.mode === "hidden" ? "none" : "block",
|
|
74
|
-
position: "static",
|
|
75
|
-
width: "auto",
|
|
76
|
-
zIndex: "auto"
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
const PageLayoutPanel = require_src.styled(require_View.View, {
|
|
80
|
-
name: "PageLayout",
|
|
81
|
-
slot: "panel",
|
|
82
|
-
label: "PageLayoutPanel",
|
|
83
|
-
shouldForwardProp: (prop) => prop !== "side" && prop !== "isOpen"
|
|
84
|
-
})(({ theme, side, isOpen }) => ({
|
|
85
|
-
gridArea: side,
|
|
86
|
-
minWidth: 0,
|
|
87
|
-
overflow: "auto",
|
|
88
|
-
...require_layoutStyles.layoutStyles(theme, ({ panels }) => panelStyle(theme, side, isOpen, panels[side]))
|
|
89
|
-
}));
|
|
90
|
-
const PageLayoutContent = require_src.styled(require_View.View, {
|
|
91
|
-
name: "PageLayout",
|
|
92
|
-
slot: "content",
|
|
93
|
-
label: "PageLayoutContent"
|
|
94
|
-
})(({ theme }) => ({
|
|
95
|
-
gridArea: "content",
|
|
96
|
-
minWidth: 0,
|
|
97
|
-
width: "100%",
|
|
98
|
-
...require_layoutStyles.layoutStyles(theme, ({ content: { margin, mode, maxWidth } }) => {
|
|
99
|
-
const isFixed = mode === "fixed";
|
|
100
|
-
return {
|
|
101
|
-
paddingInline: require_layoutStyles.layoutLength(theme, margin),
|
|
102
|
-
maxWidth: isFixed && maxWidth !== void 0 ? require_layoutStyles.layoutLength(theme, maxWidth) : "none",
|
|
103
|
-
marginInline: isFixed ? "auto" : 0
|
|
104
|
-
};
|
|
105
|
-
})
|
|
106
|
-
}));
|
|
107
|
-
/**
|
|
108
|
-
* The page frame from `theme.layout`: bars on top and bottom, side panels at the
|
|
109
|
-
* start and end, and the content container between them, each breakpoint
|
|
110
|
-
* arranged by its layout entry in CSS alone (no JavaScript media queries, so
|
|
111
|
-
* server rendering matches the client). Lay the content out on the theme's
|
|
112
|
-
* columns with `LayoutGrid`.
|
|
113
|
-
*/
|
|
114
|
-
function PageLayout({ children, topBar, bottomBar, startPanel, endPanel, openPanels = {}, ...rest }) {
|
|
115
|
-
const regions = {
|
|
116
|
-
top: topBar != null,
|
|
117
|
-
bottom: bottomBar != null,
|
|
118
|
-
start: startPanel != null,
|
|
119
|
-
end: endPanel != null
|
|
120
|
-
};
|
|
121
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(PageLayoutRoot, {
|
|
122
|
-
regions,
|
|
123
|
-
...rest,
|
|
124
|
-
children: [
|
|
125
|
-
regions.top && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageLayoutBar, {
|
|
126
|
-
placement: "top",
|
|
127
|
-
children: inRegion("top", topBar)
|
|
128
|
-
}),
|
|
129
|
-
regions.start && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageLayoutPanel, {
|
|
130
|
-
side: "start",
|
|
131
|
-
isOpen: !!openPanels.start,
|
|
132
|
-
children: inRegion("start", startPanel)
|
|
133
|
-
}),
|
|
134
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageLayoutContent, { children }),
|
|
135
|
-
regions.end && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageLayoutPanel, {
|
|
136
|
-
side: "end",
|
|
137
|
-
isOpen: !!openPanels.end,
|
|
138
|
-
children: inRegion("end", endPanel)
|
|
139
|
-
}),
|
|
140
|
-
regions.bottom && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageLayoutBar, {
|
|
141
|
-
placement: "bottom",
|
|
142
|
-
children: inRegion("bottom", bottomBar)
|
|
143
|
-
})
|
|
144
|
-
]
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
//#endregion
|
|
148
|
-
exports.PageLayout = PageLayout;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { h as LayoutPanels } from "../themes-9YNnlVyY.cjs";
|
|
2
|
-
import { r as GridProps } from "../index-BJ5Tsf7u.cjs";
|
|
3
|
-
import "../index-BDD-L8uL.cjs";
|
|
4
|
-
import { ReactNode } from "react";
|
|
5
|
-
//#region src/PageLayout/PageLayout/PageLayout.d.ts
|
|
6
|
-
type PageLayoutPanelSide = keyof LayoutPanels;
|
|
7
|
-
type PageLayoutBarPlacement = 'top' | 'bottom';
|
|
8
|
-
interface PageLayoutProps extends GridProps {
|
|
9
|
-
/** The page content, in the theme's content container (fluid or fixed per breakpoint). */
|
|
10
|
-
children: ReactNode;
|
|
11
|
-
/** The top bar - its height per breakpoint is `theme.layout.*.bars.top`; absent where unset or `0`. */
|
|
12
|
-
topBar?: ReactNode;
|
|
13
|
-
/** The bottom bar - its height per breakpoint is `theme.layout.*.bars.bottom`; absent where unset or `0`. */
|
|
14
|
-
bottomBar?: ReactNode;
|
|
15
|
-
/** The start-side panel, laid out per breakpoint by `theme.layout.*.panels.start`. */
|
|
16
|
-
startPanel?: ReactNode;
|
|
17
|
-
/** The end-side panel, laid out per breakpoint by `theme.layout.*.panels.end`. */
|
|
18
|
-
endPanel?: ReactNode;
|
|
19
|
-
/** Which `overlay` panels are open. Panels in another mode ignore it. Default: none. */
|
|
20
|
-
openPanels?: { [Side in PageLayoutPanelSide]?: boolean; };
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* The page frame from `theme.layout`: bars on top and bottom, side panels at the
|
|
24
|
-
* start and end, and the content container between them, each breakpoint
|
|
25
|
-
* arranged by its layout entry in CSS alone (no JavaScript media queries, so
|
|
26
|
-
* server rendering matches the client). Lay the content out on the theme's
|
|
27
|
-
* columns with `LayoutGrid`.
|
|
28
|
-
*/
|
|
29
|
-
declare function PageLayout({ children, topBar, bottomBar, startPanel, endPanel, openPanels, ...rest }: Readonly<PageLayoutProps>): import("react").JSX.Element;
|
|
30
|
-
//#endregion
|
|
31
|
-
export { PageLayout, PageLayoutBarPlacement, PageLayoutPanelSide, PageLayoutProps };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { h as LayoutPanels } from "../themes-9YNnlVyY.mjs";
|
|
2
|
-
import { r as GridProps } from "../index-BnFxdnEL.mjs";
|
|
3
|
-
import "../index-CoHrw2p7.mjs";
|
|
4
|
-
import { ReactNode } from "react";
|
|
5
|
-
//#region src/PageLayout/PageLayout/PageLayout.d.ts
|
|
6
|
-
type PageLayoutPanelSide = keyof LayoutPanels;
|
|
7
|
-
type PageLayoutBarPlacement = 'top' | 'bottom';
|
|
8
|
-
interface PageLayoutProps extends GridProps {
|
|
9
|
-
/** The page content, in the theme's content container (fluid or fixed per breakpoint). */
|
|
10
|
-
children: ReactNode;
|
|
11
|
-
/** The top bar - its height per breakpoint is `theme.layout.*.bars.top`; absent where unset or `0`. */
|
|
12
|
-
topBar?: ReactNode;
|
|
13
|
-
/** The bottom bar - its height per breakpoint is `theme.layout.*.bars.bottom`; absent where unset or `0`. */
|
|
14
|
-
bottomBar?: ReactNode;
|
|
15
|
-
/** The start-side panel, laid out per breakpoint by `theme.layout.*.panels.start`. */
|
|
16
|
-
startPanel?: ReactNode;
|
|
17
|
-
/** The end-side panel, laid out per breakpoint by `theme.layout.*.panels.end`. */
|
|
18
|
-
endPanel?: ReactNode;
|
|
19
|
-
/** Which `overlay` panels are open. Panels in another mode ignore it. Default: none. */
|
|
20
|
-
openPanels?: { [Side in PageLayoutPanelSide]?: boolean; };
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* The page frame from `theme.layout`: bars on top and bottom, side panels at the
|
|
24
|
-
* start and end, and the content container between them, each breakpoint
|
|
25
|
-
* arranged by its layout entry in CSS alone (no JavaScript media queries, so
|
|
26
|
-
* server rendering matches the client). Lay the content out on the theme's
|
|
27
|
-
* columns with `LayoutGrid`.
|
|
28
|
-
*/
|
|
29
|
-
declare function PageLayout({ children, topBar, bottomBar, startPanel, endPanel, openPanels, ...rest }: Readonly<PageLayoutProps>): import("react").JSX.Element;
|
|
30
|
-
//#endregion
|
|
31
|
-
export { PageLayout, PageLayoutBarPlacement, PageLayoutPanelSide, PageLayoutProps };
|