@soroush.tech/design-system 1.3.2 → 2.0.0-alpha.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/README.md +72 -37
- package/dist/AppBar.cjs +5 -1
- package/dist/AppBar.d.cts +6 -6
- package/dist/AppBar.d.mts +6 -6
- package/dist/AppBar.mjs +5 -1
- package/dist/Avatar.cjs +2 -2
- package/dist/Avatar.d.cts +6 -6
- package/dist/Avatar.d.mts +6 -6
- package/dist/Avatar.mjs +2 -2
- package/dist/Backdrop.cjs +1 -1
- package/dist/Backdrop.d.cts +1 -1
- package/dist/Backdrop.d.mts +1 -1
- package/dist/Backdrop.mjs +1 -1
- package/dist/Button.cjs +2 -2
- package/dist/Button.d.cts +1 -1
- package/dist/Button.d.mts +1 -1
- package/dist/Button.mjs +2 -2
- package/dist/ButtonGroup.cjs +1 -1
- package/dist/ButtonGroup.d.cts +1 -1
- package/dist/ButtonGroup.d.mts +1 -1
- package/dist/ButtonGroup.mjs +1 -1
- package/dist/Card.cjs +3 -3
- package/dist/Card.d.cts +3 -3
- package/dist/Card.d.mts +3 -3
- package/dist/Card.mjs +3 -3
- package/dist/Checkbox.cjs +1 -1
- package/dist/Checkbox.d.cts +2 -2
- package/dist/Checkbox.d.mts +2 -2
- package/dist/Checkbox.mjs +1 -1
- package/dist/CircularProgress.cjs +1 -1
- package/dist/CircularProgress.d.cts +6 -6
- package/dist/CircularProgress.d.mts +6 -6
- package/dist/CircularProgress.mjs +1 -1
- package/dist/Drawer.cjs +2 -2
- package/dist/Drawer.d.cts +3 -3
- package/dist/Drawer.d.mts +3 -3
- package/dist/Drawer.mjs +2 -2
- package/dist/Flex.cjs +1 -1
- package/dist/Flex.d.cts +1 -1
- package/dist/Flex.d.mts +1 -1
- package/dist/Flex.mjs +1 -1
- package/dist/FocusTrap.cjs +1 -1
- package/dist/FocusTrap.mjs +1 -1
- package/dist/Form.cjs +2 -2
- package/dist/Form.d.cts +5 -5
- package/dist/Form.d.mts +5 -5
- package/dist/Form.mjs +2 -2
- package/dist/FormControl.cjs +2 -2
- package/dist/FormControl.d.cts +8 -8
- package/dist/FormControl.d.mts +8 -8
- package/dist/FormControl.mjs +2 -2
- package/dist/FormHelperText.cjs +1 -1
- package/dist/FormHelperText.d.cts +1 -1
- package/dist/FormHelperText.d.mts +1 -1
- package/dist/FormHelperText.mjs +1 -1
- package/dist/FormLabel.cjs +1 -1
- package/dist/FormLabel.d.cts +1 -1
- package/dist/FormLabel.d.mts +1 -1
- package/dist/FormLabel.mjs +1 -1
- package/dist/Grid.cjs +1 -1
- package/dist/Grid.d.cts +1 -15
- package/dist/Grid.d.mts +1 -15
- package/dist/Grid.mjs +1 -1
- package/dist/{Icon-ByDvM-t1.cjs → Icon-CKLBJ7CC.cjs} +2 -2
- package/dist/{Icon-CU_nUmsU.mjs → Icon-CkQGOBmm.mjs} +2 -2
- 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.cjs +1 -1
- package/dist/Image.d.cts +3 -3
- package/dist/Image.d.mts +3 -3
- package/dist/Image.mjs +1 -1
- package/dist/LinearProgress.cjs +1 -1
- package/dist/LinearProgress.d.cts +5 -5
- package/dist/LinearProgress.d.mts +5 -5
- package/dist/LinearProgress.mjs +1 -1
- package/dist/Link.cjs +2 -2
- package/dist/Link.d.cts +1 -1
- package/dist/Link.d.mts +1 -1
- package/dist/Link.mjs +2 -2
- package/dist/MenuItem.cjs +3 -3
- package/dist/MenuItem.d.cts +9 -9
- package/dist/MenuItem.d.mts +9 -9
- package/dist/MenuItem.mjs +3 -3
- package/dist/{Modal-Bjfv7n4e.cjs → Modal-CApyh_V5.cjs} +2 -2
- package/dist/{Modal-Bv-mf8Fn.mjs → Modal-CYNcPk-2.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 +3 -3
- package/dist/NativeSelect.d.cts +12 -12
- package/dist/NativeSelect.d.mts +12 -12
- package/dist/NativeSelect.mjs +3 -3
- package/dist/PageLayout/LayoutGrid.cjs +21 -0
- package/dist/PageLayout/LayoutGrid.d.cts +22 -0
- package/dist/PageLayout/LayoutGrid.d.mts +22 -0
- package/dist/PageLayout/LayoutGrid.mjs +20 -0
- package/dist/PageLayout/PageLayout.cjs +148 -0
- package/dist/PageLayout/PageLayout.d.cts +31 -0
- package/dist/PageLayout/PageLayout.d.mts +31 -0
- package/dist/PageLayout/PageLayout.mjs +147 -0
- package/dist/PageLayout.cjs +7 -0
- package/dist/PageLayout.d.cts +19 -0
- package/dist/PageLayout.d.mts +19 -0
- package/dist/PageLayout.mjs +4 -0
- package/dist/PageLayoutContext-DjJ1_7Xc.mjs +5 -0
- package/dist/PageLayoutContext-agXGhegE.cjs +9 -0
- package/dist/Pagination/PaginationItem.cjs +3 -3
- package/dist/Pagination/PaginationItem.d.cts +1 -1
- package/dist/Pagination/PaginationItem.d.mts +1 -1
- package/dist/Pagination/PaginationItem.mjs +3 -3
- package/dist/Pagination.cjs +2 -2
- package/dist/Pagination.d.cts +2 -2
- package/dist/Pagination.d.mts +2 -2
- package/dist/Pagination.mjs +2 -2
- package/dist/Paper.cjs +2 -2
- package/dist/Paper.d.cts +1 -1
- package/dist/Paper.d.mts +1 -1
- package/dist/Paper.mjs +2 -2
- package/dist/{Popover-CH3yI-j-.mjs → Popover-DWOrf7sy.mjs} +4 -4
- package/dist/{Popover-COoJ2p2I.cjs → Popover-Dz6h3A_9.cjs} +4 -4
- package/dist/Popover.cjs +1 -1
- package/dist/Popover.d.cts +7 -7
- package/dist/Popover.d.mts +7 -7
- package/dist/Popover.mjs +1 -1
- package/dist/Portal.cjs +1 -1
- package/dist/Portal.d.cts +1 -1
- package/dist/Portal.d.mts +1 -1
- package/dist/Portal.mjs +1 -1
- package/dist/Pressable.cjs +4 -4
- package/dist/Pressable.d.cts +1 -1
- package/dist/Pressable.d.mts +1 -1
- package/dist/Pressable.mjs +4 -4
- package/dist/Quote.cjs +2 -2
- package/dist/Quote.d.cts +4 -4
- package/dist/Quote.d.mts +4 -4
- package/dist/Quote.mjs +2 -2
- package/dist/Radio.cjs +1 -1
- package/dist/Radio.d.cts +3 -3
- package/dist/Radio.d.mts +3 -3
- package/dist/Radio.mjs +1 -1
- package/dist/Select.cjs +4 -4
- package/dist/Select.d.cts +11 -11
- package/dist/Select.d.mts +11 -11
- package/dist/Select.mjs +4 -4
- package/dist/Sidebar/Sidebar.cjs +29 -10
- package/dist/Sidebar/Sidebar.d.cts +16 -13
- package/dist/Sidebar/Sidebar.d.mts +16 -13
- package/dist/Sidebar/Sidebar.mjs +30 -11
- package/dist/Sidebar/SidebarItem.cjs +5 -4
- package/dist/Sidebar/SidebarItem.d.cts +13 -13
- package/dist/Sidebar/SidebarItem.d.mts +13 -13
- package/dist/Sidebar/SidebarItem.mjs +5 -4
- package/dist/Sidebar.d.cts +1 -1
- package/dist/Sidebar.d.mts +1 -1
- package/dist/{SidebarContext-ao6lRfTX.d.cts → SidebarContext-B1lWrt77.d.cts} +4 -4
- package/dist/{SidebarContext-ao6lRfTX.d.mts → SidebarContext-B1lWrt77.d.mts} +4 -4
- package/dist/Skeleton.cjs +1 -1
- package/dist/Skeleton.d.cts +3 -3
- package/dist/Skeleton.d.mts +3 -3
- package/dist/Skeleton.mjs +1 -1
- package/dist/Switch.cjs +2 -2
- package/dist/Switch.d.cts +5 -5
- package/dist/Switch.d.mts +5 -5
- package/dist/Switch.mjs +2 -2
- package/dist/Table/Table.cjs +1 -1
- package/dist/Table/Table.d.cts +14 -14
- package/dist/Table/Table.d.mts +14 -14
- package/dist/Table/Table.mjs +1 -1
- package/dist/Table/TableBody.cjs +1 -1
- package/dist/Table/TableBody.d.cts +6 -6
- package/dist/Table/TableBody.d.mts +6 -6
- package/dist/Table/TableBody.mjs +1 -1
- package/dist/Table/TableCell.cjs +1 -1
- package/dist/Table/TableCell.d.cts +1 -1
- package/dist/Table/TableCell.d.mts +1 -1
- package/dist/Table/TableCell.mjs +1 -1
- package/dist/Table/TableContainer.cjs +2 -2
- package/dist/Table/TableContainer.d.cts +4 -4
- package/dist/Table/TableContainer.d.mts +4 -4
- package/dist/Table/TableContainer.mjs +2 -2
- package/dist/Table/TableControl.cjs +1 -1
- package/dist/Table/TableControl.d.cts +7 -7
- package/dist/Table/TableControl.d.mts +7 -7
- package/dist/Table/TableControl.mjs +1 -1
- package/dist/Table/TableFooter.cjs +1 -1
- package/dist/Table/TableFooter.d.cts +6 -6
- package/dist/Table/TableFooter.d.mts +6 -6
- package/dist/Table/TableFooter.mjs +1 -1
- package/dist/Table/TableHead.cjs +1 -1
- package/dist/Table/TableHead.d.cts +6 -6
- package/dist/Table/TableHead.d.mts +6 -6
- package/dist/Table/TableHead.mjs +1 -1
- package/dist/Table/TablePagination.cjs +3 -3
- package/dist/Table/TablePagination.d.cts +4 -4
- package/dist/Table/TablePagination.d.mts +4 -4
- package/dist/Table/TablePagination.mjs +3 -3
- package/dist/Table/TablePaginationActions.cjs +2 -2
- package/dist/Table/TablePaginationActions.d.cts +1 -1
- package/dist/Table/TablePaginationActions.d.mts +1 -1
- package/dist/Table/TablePaginationActions.mjs +2 -2
- package/dist/Table/TableRow.cjs +1 -1
- package/dist/Table/TableRow.d.cts +7 -7
- package/dist/Table/TableRow.d.mts +7 -7
- package/dist/Table/TableRow.mjs +1 -1
- package/dist/Table/TableSortLabel.cjs +2 -2
- package/dist/Table/TableSortLabel.d.cts +1 -1
- package/dist/Table/TableSortLabel.d.mts +1 -1
- package/dist/Table/TableSortLabel.mjs +2 -2
- package/dist/Table/hooks.cjs +5 -5
- package/dist/Table/hooks.d.cts +5 -5
- package/dist/Table/hooks.d.mts +5 -5
- package/dist/Table/hooks.mjs +5 -5
- package/dist/Table.d.cts +5 -5
- package/dist/Table.d.mts +5 -5
- package/dist/{TableContext-BoOxdk8p.d.cts → TableContext-DBOk01Xl.d.mts} +2 -2
- package/dist/{TableContext-DV31j6HO.d.mts → TableContext-DRAhXvq3.d.cts} +2 -2
- package/dist/TextInput.cjs +2 -2
- package/dist/TextInput.d.cts +10 -10
- package/dist/TextInput.d.mts +10 -10
- package/dist/TextInput.mjs +2 -2
- package/dist/ToggleButton/ToggleButton.cjs +2 -2
- package/dist/ToggleButton/ToggleButton.d.cts +3 -3
- package/dist/ToggleButton/ToggleButton.d.mts +3 -3
- package/dist/ToggleButton/ToggleButton.mjs +2 -2
- package/dist/ToggleButton/ToggleButtonGroup.cjs +3 -3
- package/dist/ToggleButton/ToggleButtonGroup.d.cts +4 -4
- package/dist/ToggleButton/ToggleButtonGroup.d.mts +4 -4
- package/dist/ToggleButton/ToggleButtonGroup.mjs +3 -3
- package/dist/ToggleButton.d.cts +1 -1
- package/dist/ToggleButton.d.mts +1 -1
- package/dist/{ToggleButtonGroupContext-CqD-Afho.d.cts → ToggleButtonGroupContext-10jEsQdg.d.cts} +2 -2
- package/dist/{ToggleButtonGroupContext-CqD-Afho.d.mts → ToggleButtonGroupContext-10jEsQdg.d.mts} +2 -2
- package/dist/Typography.cjs +2 -2
- package/dist/Typography.d.cts +2 -2
- package/dist/Typography.d.mts +2 -2
- package/dist/Typography.mjs +2 -2
- package/dist/View.cjs +1 -1
- package/dist/View.d.cts +1 -1
- package/dist/View.d.mts +1 -1
- package/dist/View.mjs +1 -1
- package/dist/engine.cjs +2 -2
- package/dist/engine.d.cts +3 -3
- package/dist/engine.d.mts +3 -3
- package/dist/engine.mjs +2 -2
- package/dist/{index-CrXLEJO4.d.mts → index-8mHoIUt5.d.mts} +8 -8
- package/dist/{index-DLUE7t3O.d.cts → index-B41OXLX8.d.mts} +4 -4
- package/dist/{index-X4STXeE2.d.cts → index-B6vxRNLt.d.cts} +14 -14
- package/dist/{index-BBWtMvkm.d.cts → index-B8KscJic.d.cts} +3 -3
- package/dist/{index-MsUtFRul.d.cts → index-BDD-L8uL.d.cts} +3 -3
- package/dist/{index-BW-9sqFG.d.cts → index-BGD4OzzG.d.cts} +6 -6
- package/dist/index-BJ5Tsf7u.d.cts +16 -0
- package/dist/{index-n2OyTMr6.d.mts → index-BMJ3tyIw.d.cts} +4 -4
- package/dist/{index-CbGfrKZi.d.mts → index-BNpkmtaM.d.mts} +6 -6
- package/dist/{index-CKz1lEdR.d.mts → index-BSR9zrAA.d.mts} +6 -6
- package/dist/index-BnFxdnEL.d.mts +16 -0
- package/dist/{index-BYYEoNec.d.cts → index-CCrocxBL.d.cts} +6 -6
- package/dist/{index-q9peil7T.d.mts → index-CEqa8xx8.d.mts} +7 -7
- package/dist/{index-CiShdd2j.d.cts → index-CLttbRhG.d.cts} +8 -8
- package/dist/{index-DfhMdqqI.d.mts → index-CVb5zbas.d.mts} +14 -14
- package/dist/{index-DEEHBUUZ.d.cts → index-Cjlax0-f.d.mts} +4 -4
- package/dist/{index-BoOs5h_b.d.mts → index-CoHrw2p7.d.mts} +3 -3
- package/dist/{index-CCfnnT2l.d.cts → index-CohgpyUj.d.cts} +7 -7
- package/dist/{index-CSXMCqrV.d.cts → index-CtrxW81j.d.cts} +8 -8
- package/dist/{index-m9jUR509.d.mts → index-CvWslVk6.d.cts} +9 -9
- package/dist/{index-3hPS6Lm8.d.mts → index-CzmA09Yf.d.mts} +8 -8
- package/dist/{index-uH0EeDBZ.d.cts → index-D4i9vrQM.d.mts} +12 -12
- package/dist/{index-DkPJUFzd.d.cts → index-DNNg9RoR.d.cts} +5 -5
- package/dist/{index-B0xTqpvt.d.mts → index-DPHwCZYf.d.cts} +4 -4
- package/dist/{index-2QPYJgCl.d.cts → index-DkJzi96w.d.cts} +7 -7
- package/dist/{index-D07y72Xr.d.mts → index-DsKd9VW5.d.mts} +7 -7
- package/dist/{index-CohsoGjZ.d.cts → index-DuefjNlC.d.mts} +7 -7
- package/dist/{index-DGku7hLP.d.mts → index-EYR0z1Qv.d.cts} +4 -4
- package/dist/{index-hcZwhQmR.d.mts → index-IEvuh6Cd.d.mts} +5 -5
- package/dist/{index-BAfSyQaP.d.mts → index-S3NZS-Qp.d.cts} +12 -12
- package/dist/{index-DxBKLmUS.d.mts → index-bN91IhZi.d.cts} +7 -7
- package/dist/{index-CTYZyQ2g.d.mts → index-qtKJ56yu.d.mts} +3 -3
- package/dist/{index-D_AwmCU5.d.cts → index-r2avCy1z.d.mts} +4 -4
- package/dist/{index-BPzvFTi5.d.cts → index-tv-TGYSG.d.mts} +9 -9
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/layoutStyles-B4Z1K6HZ.cjs +67 -0
- package/dist/layoutStyles-f0ISNjsC.mjs +56 -0
- package/dist/{src-D3tHU94W.mjs → src-DLGYOJMh.mjs} +1 -1
- package/dist/{src-BJrcLd7P.cjs → src-DU81aGy9.cjs} +1 -1
- 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-Cudynq5K.mjs → theme-BQGlZoma.mjs} +53 -5
- package/dist/{theme-CleLAV6A.cjs → theme-BmEAXmwh.cjs} +64 -4
- package/dist/theme.cjs +3 -1
- package/dist/theme.d.cts +3 -3
- package/dist/theme.d.mts +3 -3
- package/dist/theme.mjs +2 -2
- package/dist/{themes-CUV79qWU.d.cts → themes-9YNnlVyY.d.cts} +90 -21
- package/dist/{themes-CUV79qWU.d.mts → themes-9YNnlVyY.d.mts} +90 -21
- package/dist/{useTablePagination--XtCc2YL.d.cts → useTablePagination-CLoac5oX.d.cts} +6 -6
- package/dist/{useTablePagination-RgVhJs-7.d.mts → useTablePagination-RelVsdMR.d.mts} +6 -6
- package/package.json +15 -5
|
@@ -13,19 +13,19 @@ type ThemeOverride = DeepPartial<Theme>;
|
|
|
13
13
|
*
|
|
14
14
|
* - Recurses only where both sides are plain objects; arrays (`shadows`,
|
|
15
15
|
* `fontSizes`) and functions replace wholesale.
|
|
16
|
-
* - `undefined` override values are ignored
|
|
16
|
+
* - `undefined` override values are ignored - a key can be added or replaced,
|
|
17
17
|
* never removed.
|
|
18
18
|
* - Neither argument is mutated; untouched branches keep referential identity.
|
|
19
19
|
*/
|
|
20
20
|
declare const createTheme: (base: Theme, overrides: ThemeOverride) => Theme;
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region src/theme/themes.d.ts
|
|
23
|
-
/** Design-system's own style-object shape
|
|
23
|
+
/** Design-system's own style-object shape - Emotion stays an internal implementation detail. */
|
|
24
24
|
type CSSObject$1 = CSSObject;
|
|
25
25
|
/**
|
|
26
26
|
* Re-opens a named scale interface as an anonymous mapped type. Named
|
|
27
27
|
* interfaces have no implicit index signature, which styled-system's
|
|
28
|
-
* Record-based `Theme` constraint requires
|
|
28
|
+
* Record-based `Theme` constraint requires - the mapped copy restores it
|
|
29
29
|
* while keeping the literal keys (and any consumer-augmented keys).
|
|
30
30
|
*/
|
|
31
31
|
type OpenScale<T> = { [K in keyof T]: T[K]; };
|
|
@@ -91,7 +91,7 @@ interface ThemeSwitch {
|
|
|
91
91
|
thumb: string;
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
|
-
* Shadow tokens
|
|
94
|
+
* Shadow tokens - the single base color every shadow composites from
|
|
95
95
|
* (the `theme.shadows` elevation array and component shadows alike).
|
|
96
96
|
*/
|
|
97
97
|
interface ThemeShadow {
|
|
@@ -100,7 +100,7 @@ interface ThemeShadow {
|
|
|
100
100
|
/** Alpha applied per elevation step in the default `theme.shadows` array. */
|
|
101
101
|
opacity: number;
|
|
102
102
|
}
|
|
103
|
-
/** Stacking order for layered UI
|
|
103
|
+
/** Stacking order for layered UI - ascending: appBar < drawer < modal. */
|
|
104
104
|
interface ThemeZOrder {
|
|
105
105
|
appBar: number;
|
|
106
106
|
drawer: number;
|
|
@@ -182,11 +182,74 @@ interface ThemeSizes {
|
|
|
182
182
|
lg: SizeEntry;
|
|
183
183
|
}
|
|
184
184
|
/**
|
|
185
|
-
* Square glyph dimension per density key
|
|
185
|
+
* Square glyph dimension per density key - Icon token sizes and the
|
|
186
186
|
* Checkbox/Radio glyphs. Mapped over `ThemeSizes` so augmenting a size key
|
|
187
187
|
* forces the matching icon size to be supplied.
|
|
188
188
|
*/
|
|
189
189
|
type ThemeIconSizes = { [K in keyof ThemeSizes]: string; };
|
|
190
|
+
/**
|
|
191
|
+
* `theme.breakpoints`, ascending, in declared order - responsive props map onto
|
|
192
|
+
* them in this order. A value is a CSS length (a min-width), a media condition such
|
|
193
|
+
* as `(600px <= width < 1200px)`, or a full `@media ...` rule, kept as written.
|
|
194
|
+
* `createTheme` appends a consumer's new breakpoint after these, so it must be larger.
|
|
195
|
+
*/
|
|
196
|
+
interface ThemeBreakpoints {
|
|
197
|
+
tablet: string;
|
|
198
|
+
web: string;
|
|
199
|
+
wide: string;
|
|
200
|
+
}
|
|
201
|
+
/** A `theme.space` key - layout margins and gutters step on the spacing scale. */
|
|
202
|
+
type LayoutSpace = Exclude<keyof ThemeSpace, 'auto'>;
|
|
203
|
+
/** A `theme.space` key or a CSS length (a 280px panel is a size, not a spacing step). */
|
|
204
|
+
type LayoutLength = LayoutSpace | string;
|
|
205
|
+
/** Bar heights at the top and bottom of the page; `0` removes an inherited bar. */
|
|
206
|
+
interface LayoutBars {
|
|
207
|
+
top?: LayoutLength;
|
|
208
|
+
bottom?: LayoutLength;
|
|
209
|
+
}
|
|
210
|
+
/** A side panel: a track (`inline`), over the content (`overlay`), its rail (`collapsed`) or absent (`hidden`). */
|
|
211
|
+
interface LayoutPanel {
|
|
212
|
+
mode: 'inline' | 'overlay' | 'collapsed' | 'hidden';
|
|
213
|
+
/** Open width. */
|
|
214
|
+
width: LayoutLength;
|
|
215
|
+
/** Collapsed width. */
|
|
216
|
+
railWidth: LayoutLength;
|
|
217
|
+
}
|
|
218
|
+
/** Side panels by logical side - `start` and `end` flip in RTL. */
|
|
219
|
+
interface LayoutPanels {
|
|
220
|
+
start?: LayoutPanel;
|
|
221
|
+
end?: LayoutPanel;
|
|
222
|
+
}
|
|
223
|
+
/** The content columns, measured in the space the bars and inline panels leave. */
|
|
224
|
+
interface LayoutContent {
|
|
225
|
+
columns: number;
|
|
226
|
+
/** Inline padding of the content. */
|
|
227
|
+
margin: LayoutSpace;
|
|
228
|
+
/** Gap between columns. */
|
|
229
|
+
gutter: LayoutSpace;
|
|
230
|
+
/** `fluid` spans the space; `fixed` is a container centred at `maxWidth`. */
|
|
231
|
+
mode: 'fluid' | 'fixed';
|
|
232
|
+
maxWidth?: LayoutLength;
|
|
233
|
+
}
|
|
234
|
+
/** The page layout at one breakpoint. */
|
|
235
|
+
interface LayoutEntry {
|
|
236
|
+
bars: LayoutBars;
|
|
237
|
+
panels: LayoutPanels;
|
|
238
|
+
content: LayoutContent;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* `theme.layout`: the complete `base` entry (below the first breakpoint), then a
|
|
242
|
+
* partial entry per breakpoint, merged mobile-first in `ThemeBreakpoints` order. A
|
|
243
|
+
* panel first declared at a breakpoint needs its `mode`, `width` and `railWidth`
|
|
244
|
+
* there; an incomplete one is left out.
|
|
245
|
+
*/
|
|
246
|
+
type ThemeLayout = {
|
|
247
|
+
base: LayoutEntry;
|
|
248
|
+
} & { [K in keyof ThemeBreakpoints]?: {
|
|
249
|
+
bars?: LayoutBars;
|
|
250
|
+
panels?: { [P in keyof LayoutPanels]?: Partial<LayoutPanel>; };
|
|
251
|
+
content?: Partial<LayoutContent>;
|
|
252
|
+
}; };
|
|
190
253
|
/** Style of one typography variant. */
|
|
191
254
|
interface TypographyVariantStyle {
|
|
192
255
|
element: ElementType;
|
|
@@ -213,8 +276,8 @@ interface ThemeTypographyVariants {
|
|
|
213
276
|
}
|
|
214
277
|
/**
|
|
215
278
|
* Optional theme-driven component defaults. Components carry their own
|
|
216
|
-
* literal fallbacks (`size = 'md'`, `variant = 'outside'`,
|
|
217
|
-
* them through `themeDefault(theme, key, fallback)`
|
|
279
|
+
* literal fallbacks (`size = 'md'`, `variant = 'outside'`, ...) and resolve
|
|
280
|
+
* them through `themeDefault(theme, key, fallback)` - set any key here (or
|
|
218
281
|
* via `ThemeProvider`'s `defaults` prop) to override that fallback globally,
|
|
219
282
|
* e.g. when your theme uses entirely different size or palette keys.
|
|
220
283
|
*/
|
|
@@ -223,9 +286,9 @@ interface ThemeDefaults {
|
|
|
223
286
|
size?: keyof ThemeSizes;
|
|
224
287
|
/** Compact density for dense secondary UI (table pagination actions). Fallback: `'sm'`. */
|
|
225
288
|
compactSize?: keyof ThemeSizes;
|
|
226
|
-
/** Accent palette color (buttons, links, progress, pagination
|
|
289
|
+
/** Accent palette color (buttons, links, progress, pagination...). Fallback: `'primary'`. */
|
|
227
290
|
color?: keyof ThemePalette;
|
|
228
|
-
/** Neutral palette color for toggle controls (checkbox, radio, switch
|
|
291
|
+
/** Neutral palette color for toggle controls (checkbox, radio, switch...). Fallback: `'default'`. */
|
|
229
292
|
neutralColor?: keyof ThemePalette;
|
|
230
293
|
/** Body text color. Fallback: `'initial'`. */
|
|
231
294
|
textColor?: keyof ThemeText;
|
|
@@ -267,7 +330,7 @@ interface ThemeDefaults {
|
|
|
267
330
|
paginationShape?: 'circular' | 'rounded';
|
|
268
331
|
}
|
|
269
332
|
/**
|
|
270
|
-
* A style contributed from `theme.components`
|
|
333
|
+
* A style contributed from `theme.components` - a plain CSS object, or a
|
|
271
334
|
* callback receiving the theme and the styled root's resolved props
|
|
272
335
|
* (`ownerState`) for conditional styling.
|
|
273
336
|
*/
|
|
@@ -282,20 +345,20 @@ interface ComponentVariant<OwnerState> {
|
|
|
282
345
|
}
|
|
283
346
|
/** Per-component customization: default prop values, per-slot CSS, extra variants. */
|
|
284
347
|
interface ComponentConfig<OwnerState = Record<string, unknown>, Slot extends string = 'root'> {
|
|
285
|
-
/** Default prop values
|
|
348
|
+
/** Default prop values - explicit props and group context always win. */
|
|
286
349
|
defaultProps?: Partial<OwnerState>;
|
|
287
350
|
/** Per-slot CSS merged after the component's own styles (theme wins). */
|
|
288
351
|
styleOverrides?: Partial<Record<Slot, ComponentStyle<OwnerState>>>;
|
|
289
352
|
/** Extra variants matched by props. Replaced wholesale by `createTheme`, never merged. */
|
|
290
353
|
variants?: ReadonlyArray<ComponentVariant<OwnerState>>;
|
|
291
354
|
}
|
|
292
|
-
/** Button's variant values
|
|
355
|
+
/** Button's variant values - augment to register new ones (then style them via `variants`). */
|
|
293
356
|
interface ButtonVariants {
|
|
294
357
|
contained: true;
|
|
295
358
|
outlined: true;
|
|
296
359
|
text: true;
|
|
297
360
|
}
|
|
298
|
-
/** The resolved props Button's styled roots receive
|
|
361
|
+
/** The resolved props Button's styled roots receive - what `ownerState` exposes. */
|
|
299
362
|
interface ButtonOwnerState {
|
|
300
363
|
variant?: keyof ButtonVariants;
|
|
301
364
|
color?: keyof ThemePalette;
|
|
@@ -328,7 +391,7 @@ interface CardOwnerState {
|
|
|
328
391
|
}
|
|
329
392
|
/**
|
|
330
393
|
* Pressable's resolved props / theme-settable defaults. Only the three keys it
|
|
331
|
-
* actually resolves through `useDefaultProps`
|
|
394
|
+
* actually resolves through `useDefaultProps` - the disabled state reaches the
|
|
332
395
|
* styled root as `isDisabled` and is never read from here, so exposing it would
|
|
333
396
|
* promise theme authors an override that does nothing.
|
|
334
397
|
*/
|
|
@@ -363,12 +426,14 @@ interface ThemeComponents {
|
|
|
363
426
|
Icon?: ComponentConfig;
|
|
364
427
|
Image?: ComponentConfig;
|
|
365
428
|
LinearProgress?: ComponentConfig<Record<string, unknown>, 'root' | 'track' | 'dash' | 'bar' | 'traveler' | 'segment' | 'secondaryBar'>;
|
|
429
|
+
LayoutGrid?: ComponentConfig;
|
|
366
430
|
Link?: ComponentConfig;
|
|
367
431
|
MenuItem?: ComponentConfig<Record<string, unknown>, 'root' | 'check'>;
|
|
368
432
|
Modal?: ComponentConfig;
|
|
369
433
|
NativeSelect?: ComponentConfig<Record<string, unknown>, 'root' | 'select' | 'icon'>;
|
|
370
434
|
Pagination?: ComponentConfig<Record<string, unknown>, 'root' | 'list'>;
|
|
371
435
|
PaginationItem?: ComponentConfig<Record<string, unknown>, 'root' | 'ellipsis'>;
|
|
436
|
+
PageLayout?: ComponentConfig<Record<string, unknown>, 'root' | 'bar' | 'panel' | 'content'>;
|
|
372
437
|
Paper?: ComponentConfig;
|
|
373
438
|
Popover?: ComponentConfig<Record<string, unknown>, 'root' | 'positioner'>;
|
|
374
439
|
Pressable?: ComponentConfig<PressableOwnerState>;
|
|
@@ -397,11 +462,13 @@ interface ThemeComponents {
|
|
|
397
462
|
}
|
|
398
463
|
interface Theme {
|
|
399
464
|
name: string;
|
|
400
|
-
/** Optional overrides for component default token/variant keys
|
|
465
|
+
/** Optional overrides for component default token/variant keys - see `ThemeDefaults`. */
|
|
401
466
|
defaults?: OpenScale<ThemeDefaults>;
|
|
402
|
-
/** Optional per-component customization
|
|
467
|
+
/** Optional per-component customization - see `ThemeComponents`. */
|
|
403
468
|
components?: OpenScale<ThemeComponents>;
|
|
404
469
|
space: OpenScale<ThemeSpace>;
|
|
470
|
+
breakpoints: OpenScale<ThemeBreakpoints>;
|
|
471
|
+
layout: ThemeLayout;
|
|
405
472
|
border: OpenScale<ThemeBorder>;
|
|
406
473
|
text: OpenScale<ThemeText>;
|
|
407
474
|
background: OpenScale<ThemeBackground>;
|
|
@@ -421,7 +488,7 @@ interface Theme {
|
|
|
421
488
|
colorScheme: 'light' | 'dark';
|
|
422
489
|
blur: string;
|
|
423
490
|
logoFilter: string;
|
|
424
|
-
/** mix-blend-mode for the AboutHero portrait
|
|
491
|
+
/** mix-blend-mode for the AboutHero portrait - screen on dark, multiply on light. */
|
|
425
492
|
portraitBlend: string;
|
|
426
493
|
/** opacity for the AboutHero portrait. */
|
|
427
494
|
portraitOpacity: number;
|
|
@@ -493,11 +560,13 @@ declare const avatar: {
|
|
|
493
560
|
declare const icon: ThemeIconSizes;
|
|
494
561
|
declare const sizes: ThemeSizes;
|
|
495
562
|
declare const space: ThemeSpace;
|
|
563
|
+
declare const breakpoints: ThemeBreakpoints;
|
|
564
|
+
declare const layout: ThemeLayout;
|
|
496
565
|
declare const typography: ThemeTypographyVariants;
|
|
497
566
|
/**
|
|
498
|
-
* The package's complete default theme (dark-schemed). Raw hex only
|
|
499
|
-
* belong to the consumer, who builds brand themes with `createTheme(baseTheme,
|
|
567
|
+
* The package's complete default theme (dark-schemed). Raw hex only - palettes
|
|
568
|
+
* belong to the consumer, who builds brand themes with `createTheme(baseTheme, ...)`.
|
|
500
569
|
*/
|
|
501
570
|
declare const baseTheme: Theme;
|
|
502
571
|
//#endregion
|
|
503
|
-
export {
|
|
572
|
+
export { fontWeights as $, ThemeFontWeights as A, ThemeSkeleton as B, ThemeAvatarSizes as C, ThemeBreakpoints as D, ThemeBorderWidths as E, ThemeLineHeights as F, ThemeZOrder as G, ThemeSwitch as H, ThemePalette as I, avatar as J, TypographyVariant as K, ThemeRadii as L, ThemeIconSizes as M, ThemeLayout as N, ThemeComponents as O, ThemeLetterSpacings as P, fontSizes as Q, ThemeShadow as R, Theme as S, ThemeBorder as T, ThemeText as U, ThemeSpace as V, ThemeTypographyVariants as W, borderWidths as X, baseTheme as Y, breakpoints as Z, OpenScale as _, CardSlotIconProps as a, radii as at, PressableOwnerState as b, ComponentStyle as c, typography as ct, LayoutContent as d, ThemeOverride as dt, fonts as et, LayoutEntry as f, createTheme as ft, LayoutSpace as g, LayoutPanels as h, CardOwnerState as i, lineHeights as it, ThemeFonts as j, ThemeDefaults as k, ComponentVariant as l, zOrder as lt, LayoutPanel as m, ButtonVariants as n, layout as nt, CardSlotTypographyProps as o, sizes as ot, LayoutLength as p, TypographyVariantStyle as q, CSSObject$1 as r, letterSpacings as rt, ComponentConfig as s, space as st, ButtonOwnerState as t, icon as tt, LayoutBars as u, DeepPartial as ut, PaletteColor as v, ThemeBackground as w, SizeEntry as x, PaletteEntry as y, ThemeSizes as z };
|
|
@@ -13,19 +13,19 @@ type ThemeOverride = DeepPartial<Theme>;
|
|
|
13
13
|
*
|
|
14
14
|
* - Recurses only where both sides are plain objects; arrays (`shadows`,
|
|
15
15
|
* `fontSizes`) and functions replace wholesale.
|
|
16
|
-
* - `undefined` override values are ignored
|
|
16
|
+
* - `undefined` override values are ignored - a key can be added or replaced,
|
|
17
17
|
* never removed.
|
|
18
18
|
* - Neither argument is mutated; untouched branches keep referential identity.
|
|
19
19
|
*/
|
|
20
20
|
declare const createTheme: (base: Theme, overrides: ThemeOverride) => Theme;
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region src/theme/themes.d.ts
|
|
23
|
-
/** Design-system's own style-object shape
|
|
23
|
+
/** Design-system's own style-object shape - Emotion stays an internal implementation detail. */
|
|
24
24
|
type CSSObject$1 = CSSObject;
|
|
25
25
|
/**
|
|
26
26
|
* Re-opens a named scale interface as an anonymous mapped type. Named
|
|
27
27
|
* interfaces have no implicit index signature, which styled-system's
|
|
28
|
-
* Record-based `Theme` constraint requires
|
|
28
|
+
* Record-based `Theme` constraint requires - the mapped copy restores it
|
|
29
29
|
* while keeping the literal keys (and any consumer-augmented keys).
|
|
30
30
|
*/
|
|
31
31
|
type OpenScale<T> = { [K in keyof T]: T[K]; };
|
|
@@ -91,7 +91,7 @@ interface ThemeSwitch {
|
|
|
91
91
|
thumb: string;
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
|
-
* Shadow tokens
|
|
94
|
+
* Shadow tokens - the single base color every shadow composites from
|
|
95
95
|
* (the `theme.shadows` elevation array and component shadows alike).
|
|
96
96
|
*/
|
|
97
97
|
interface ThemeShadow {
|
|
@@ -100,7 +100,7 @@ interface ThemeShadow {
|
|
|
100
100
|
/** Alpha applied per elevation step in the default `theme.shadows` array. */
|
|
101
101
|
opacity: number;
|
|
102
102
|
}
|
|
103
|
-
/** Stacking order for layered UI
|
|
103
|
+
/** Stacking order for layered UI - ascending: appBar < drawer < modal. */
|
|
104
104
|
interface ThemeZOrder {
|
|
105
105
|
appBar: number;
|
|
106
106
|
drawer: number;
|
|
@@ -182,11 +182,74 @@ interface ThemeSizes {
|
|
|
182
182
|
lg: SizeEntry;
|
|
183
183
|
}
|
|
184
184
|
/**
|
|
185
|
-
* Square glyph dimension per density key
|
|
185
|
+
* Square glyph dimension per density key - Icon token sizes and the
|
|
186
186
|
* Checkbox/Radio glyphs. Mapped over `ThemeSizes` so augmenting a size key
|
|
187
187
|
* forces the matching icon size to be supplied.
|
|
188
188
|
*/
|
|
189
189
|
type ThemeIconSizes = { [K in keyof ThemeSizes]: string; };
|
|
190
|
+
/**
|
|
191
|
+
* `theme.breakpoints`, ascending, in declared order - responsive props map onto
|
|
192
|
+
* them in this order. A value is a CSS length (a min-width), a media condition such
|
|
193
|
+
* as `(600px <= width < 1200px)`, or a full `@media ...` rule, kept as written.
|
|
194
|
+
* `createTheme` appends a consumer's new breakpoint after these, so it must be larger.
|
|
195
|
+
*/
|
|
196
|
+
interface ThemeBreakpoints {
|
|
197
|
+
tablet: string;
|
|
198
|
+
web: string;
|
|
199
|
+
wide: string;
|
|
200
|
+
}
|
|
201
|
+
/** A `theme.space` key - layout margins and gutters step on the spacing scale. */
|
|
202
|
+
type LayoutSpace = Exclude<keyof ThemeSpace, 'auto'>;
|
|
203
|
+
/** A `theme.space` key or a CSS length (a 280px panel is a size, not a spacing step). */
|
|
204
|
+
type LayoutLength = LayoutSpace | string;
|
|
205
|
+
/** Bar heights at the top and bottom of the page; `0` removes an inherited bar. */
|
|
206
|
+
interface LayoutBars {
|
|
207
|
+
top?: LayoutLength;
|
|
208
|
+
bottom?: LayoutLength;
|
|
209
|
+
}
|
|
210
|
+
/** A side panel: a track (`inline`), over the content (`overlay`), its rail (`collapsed`) or absent (`hidden`). */
|
|
211
|
+
interface LayoutPanel {
|
|
212
|
+
mode: 'inline' | 'overlay' | 'collapsed' | 'hidden';
|
|
213
|
+
/** Open width. */
|
|
214
|
+
width: LayoutLength;
|
|
215
|
+
/** Collapsed width. */
|
|
216
|
+
railWidth: LayoutLength;
|
|
217
|
+
}
|
|
218
|
+
/** Side panels by logical side - `start` and `end` flip in RTL. */
|
|
219
|
+
interface LayoutPanels {
|
|
220
|
+
start?: LayoutPanel;
|
|
221
|
+
end?: LayoutPanel;
|
|
222
|
+
}
|
|
223
|
+
/** The content columns, measured in the space the bars and inline panels leave. */
|
|
224
|
+
interface LayoutContent {
|
|
225
|
+
columns: number;
|
|
226
|
+
/** Inline padding of the content. */
|
|
227
|
+
margin: LayoutSpace;
|
|
228
|
+
/** Gap between columns. */
|
|
229
|
+
gutter: LayoutSpace;
|
|
230
|
+
/** `fluid` spans the space; `fixed` is a container centred at `maxWidth`. */
|
|
231
|
+
mode: 'fluid' | 'fixed';
|
|
232
|
+
maxWidth?: LayoutLength;
|
|
233
|
+
}
|
|
234
|
+
/** The page layout at one breakpoint. */
|
|
235
|
+
interface LayoutEntry {
|
|
236
|
+
bars: LayoutBars;
|
|
237
|
+
panels: LayoutPanels;
|
|
238
|
+
content: LayoutContent;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* `theme.layout`: the complete `base` entry (below the first breakpoint), then a
|
|
242
|
+
* partial entry per breakpoint, merged mobile-first in `ThemeBreakpoints` order. A
|
|
243
|
+
* panel first declared at a breakpoint needs its `mode`, `width` and `railWidth`
|
|
244
|
+
* there; an incomplete one is left out.
|
|
245
|
+
*/
|
|
246
|
+
type ThemeLayout = {
|
|
247
|
+
base: LayoutEntry;
|
|
248
|
+
} & { [K in keyof ThemeBreakpoints]?: {
|
|
249
|
+
bars?: LayoutBars;
|
|
250
|
+
panels?: { [P in keyof LayoutPanels]?: Partial<LayoutPanel>; };
|
|
251
|
+
content?: Partial<LayoutContent>;
|
|
252
|
+
}; };
|
|
190
253
|
/** Style of one typography variant. */
|
|
191
254
|
interface TypographyVariantStyle {
|
|
192
255
|
element: ElementType;
|
|
@@ -213,8 +276,8 @@ interface ThemeTypographyVariants {
|
|
|
213
276
|
}
|
|
214
277
|
/**
|
|
215
278
|
* Optional theme-driven component defaults. Components carry their own
|
|
216
|
-
* literal fallbacks (`size = 'md'`, `variant = 'outside'`,
|
|
217
|
-
* them through `themeDefault(theme, key, fallback)`
|
|
279
|
+
* literal fallbacks (`size = 'md'`, `variant = 'outside'`, ...) and resolve
|
|
280
|
+
* them through `themeDefault(theme, key, fallback)` - set any key here (or
|
|
218
281
|
* via `ThemeProvider`'s `defaults` prop) to override that fallback globally,
|
|
219
282
|
* e.g. when your theme uses entirely different size or palette keys.
|
|
220
283
|
*/
|
|
@@ -223,9 +286,9 @@ interface ThemeDefaults {
|
|
|
223
286
|
size?: keyof ThemeSizes;
|
|
224
287
|
/** Compact density for dense secondary UI (table pagination actions). Fallback: `'sm'`. */
|
|
225
288
|
compactSize?: keyof ThemeSizes;
|
|
226
|
-
/** Accent palette color (buttons, links, progress, pagination
|
|
289
|
+
/** Accent palette color (buttons, links, progress, pagination...). Fallback: `'primary'`. */
|
|
227
290
|
color?: keyof ThemePalette;
|
|
228
|
-
/** Neutral palette color for toggle controls (checkbox, radio, switch
|
|
291
|
+
/** Neutral palette color for toggle controls (checkbox, radio, switch...). Fallback: `'default'`. */
|
|
229
292
|
neutralColor?: keyof ThemePalette;
|
|
230
293
|
/** Body text color. Fallback: `'initial'`. */
|
|
231
294
|
textColor?: keyof ThemeText;
|
|
@@ -267,7 +330,7 @@ interface ThemeDefaults {
|
|
|
267
330
|
paginationShape?: 'circular' | 'rounded';
|
|
268
331
|
}
|
|
269
332
|
/**
|
|
270
|
-
* A style contributed from `theme.components`
|
|
333
|
+
* A style contributed from `theme.components` - a plain CSS object, or a
|
|
271
334
|
* callback receiving the theme and the styled root's resolved props
|
|
272
335
|
* (`ownerState`) for conditional styling.
|
|
273
336
|
*/
|
|
@@ -282,20 +345,20 @@ interface ComponentVariant<OwnerState> {
|
|
|
282
345
|
}
|
|
283
346
|
/** Per-component customization: default prop values, per-slot CSS, extra variants. */
|
|
284
347
|
interface ComponentConfig<OwnerState = Record<string, unknown>, Slot extends string = 'root'> {
|
|
285
|
-
/** Default prop values
|
|
348
|
+
/** Default prop values - explicit props and group context always win. */
|
|
286
349
|
defaultProps?: Partial<OwnerState>;
|
|
287
350
|
/** Per-slot CSS merged after the component's own styles (theme wins). */
|
|
288
351
|
styleOverrides?: Partial<Record<Slot, ComponentStyle<OwnerState>>>;
|
|
289
352
|
/** Extra variants matched by props. Replaced wholesale by `createTheme`, never merged. */
|
|
290
353
|
variants?: ReadonlyArray<ComponentVariant<OwnerState>>;
|
|
291
354
|
}
|
|
292
|
-
/** Button's variant values
|
|
355
|
+
/** Button's variant values - augment to register new ones (then style them via `variants`). */
|
|
293
356
|
interface ButtonVariants {
|
|
294
357
|
contained: true;
|
|
295
358
|
outlined: true;
|
|
296
359
|
text: true;
|
|
297
360
|
}
|
|
298
|
-
/** The resolved props Button's styled roots receive
|
|
361
|
+
/** The resolved props Button's styled roots receive - what `ownerState` exposes. */
|
|
299
362
|
interface ButtonOwnerState {
|
|
300
363
|
variant?: keyof ButtonVariants;
|
|
301
364
|
color?: keyof ThemePalette;
|
|
@@ -328,7 +391,7 @@ interface CardOwnerState {
|
|
|
328
391
|
}
|
|
329
392
|
/**
|
|
330
393
|
* Pressable's resolved props / theme-settable defaults. Only the three keys it
|
|
331
|
-
* actually resolves through `useDefaultProps`
|
|
394
|
+
* actually resolves through `useDefaultProps` - the disabled state reaches the
|
|
332
395
|
* styled root as `isDisabled` and is never read from here, so exposing it would
|
|
333
396
|
* promise theme authors an override that does nothing.
|
|
334
397
|
*/
|
|
@@ -363,12 +426,14 @@ interface ThemeComponents {
|
|
|
363
426
|
Icon?: ComponentConfig;
|
|
364
427
|
Image?: ComponentConfig;
|
|
365
428
|
LinearProgress?: ComponentConfig<Record<string, unknown>, 'root' | 'track' | 'dash' | 'bar' | 'traveler' | 'segment' | 'secondaryBar'>;
|
|
429
|
+
LayoutGrid?: ComponentConfig;
|
|
366
430
|
Link?: ComponentConfig;
|
|
367
431
|
MenuItem?: ComponentConfig<Record<string, unknown>, 'root' | 'check'>;
|
|
368
432
|
Modal?: ComponentConfig;
|
|
369
433
|
NativeSelect?: ComponentConfig<Record<string, unknown>, 'root' | 'select' | 'icon'>;
|
|
370
434
|
Pagination?: ComponentConfig<Record<string, unknown>, 'root' | 'list'>;
|
|
371
435
|
PaginationItem?: ComponentConfig<Record<string, unknown>, 'root' | 'ellipsis'>;
|
|
436
|
+
PageLayout?: ComponentConfig<Record<string, unknown>, 'root' | 'bar' | 'panel' | 'content'>;
|
|
372
437
|
Paper?: ComponentConfig;
|
|
373
438
|
Popover?: ComponentConfig<Record<string, unknown>, 'root' | 'positioner'>;
|
|
374
439
|
Pressable?: ComponentConfig<PressableOwnerState>;
|
|
@@ -397,11 +462,13 @@ interface ThemeComponents {
|
|
|
397
462
|
}
|
|
398
463
|
interface Theme {
|
|
399
464
|
name: string;
|
|
400
|
-
/** Optional overrides for component default token/variant keys
|
|
465
|
+
/** Optional overrides for component default token/variant keys - see `ThemeDefaults`. */
|
|
401
466
|
defaults?: OpenScale<ThemeDefaults>;
|
|
402
|
-
/** Optional per-component customization
|
|
467
|
+
/** Optional per-component customization - see `ThemeComponents`. */
|
|
403
468
|
components?: OpenScale<ThemeComponents>;
|
|
404
469
|
space: OpenScale<ThemeSpace>;
|
|
470
|
+
breakpoints: OpenScale<ThemeBreakpoints>;
|
|
471
|
+
layout: ThemeLayout;
|
|
405
472
|
border: OpenScale<ThemeBorder>;
|
|
406
473
|
text: OpenScale<ThemeText>;
|
|
407
474
|
background: OpenScale<ThemeBackground>;
|
|
@@ -421,7 +488,7 @@ interface Theme {
|
|
|
421
488
|
colorScheme: 'light' | 'dark';
|
|
422
489
|
blur: string;
|
|
423
490
|
logoFilter: string;
|
|
424
|
-
/** mix-blend-mode for the AboutHero portrait
|
|
491
|
+
/** mix-blend-mode for the AboutHero portrait - screen on dark, multiply on light. */
|
|
425
492
|
portraitBlend: string;
|
|
426
493
|
/** opacity for the AboutHero portrait. */
|
|
427
494
|
portraitOpacity: number;
|
|
@@ -493,11 +560,13 @@ declare const avatar: {
|
|
|
493
560
|
declare const icon: ThemeIconSizes;
|
|
494
561
|
declare const sizes: ThemeSizes;
|
|
495
562
|
declare const space: ThemeSpace;
|
|
563
|
+
declare const breakpoints: ThemeBreakpoints;
|
|
564
|
+
declare const layout: ThemeLayout;
|
|
496
565
|
declare const typography: ThemeTypographyVariants;
|
|
497
566
|
/**
|
|
498
|
-
* The package's complete default theme (dark-schemed). Raw hex only
|
|
499
|
-
* belong to the consumer, who builds brand themes with `createTheme(baseTheme,
|
|
567
|
+
* The package's complete default theme (dark-schemed). Raw hex only - palettes
|
|
568
|
+
* belong to the consumer, who builds brand themes with `createTheme(baseTheme, ...)`.
|
|
500
569
|
*/
|
|
501
570
|
declare const baseTheme: Theme;
|
|
502
571
|
//#endregion
|
|
503
|
-
export {
|
|
572
|
+
export { fontWeights as $, ThemeFontWeights as A, ThemeSkeleton as B, ThemeAvatarSizes as C, ThemeBreakpoints as D, ThemeBorderWidths as E, ThemeLineHeights as F, ThemeZOrder as G, ThemeSwitch as H, ThemePalette as I, avatar as J, TypographyVariant as K, ThemeRadii as L, ThemeIconSizes as M, ThemeLayout as N, ThemeComponents as O, ThemeLetterSpacings as P, fontSizes as Q, ThemeShadow as R, Theme as S, ThemeBorder as T, ThemeText as U, ThemeSpace as V, ThemeTypographyVariants as W, borderWidths as X, baseTheme as Y, breakpoints as Z, OpenScale as _, CardSlotIconProps as a, radii as at, PressableOwnerState as b, ComponentStyle as c, typography as ct, LayoutContent as d, ThemeOverride as dt, fonts as et, LayoutEntry as f, createTheme as ft, LayoutSpace as g, LayoutPanels as h, CardOwnerState as i, lineHeights as it, ThemeFonts as j, ThemeDefaults as k, ComponentVariant as l, zOrder as lt, LayoutPanel as m, ButtonVariants as n, layout as nt, CardSlotTypographyProps as o, sizes as ot, LayoutLength as p, TypographyVariantStyle as q, CSSObject$1 as r, letterSpacings as rt, ComponentConfig as s, space as st, ButtonOwnerState as t, icon as tt, LayoutBars as u, DeepPartial as ut, PaletteColor as v, ThemeBackground as w, SizeEntry as x, PaletteEntry as y, ThemeSizes as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as TableSortLabelDirection } from "./index-
|
|
1
|
+
import { n as TableSortLabelDirection } from "./index-DNNg9RoR.cjs";
|
|
2
2
|
//#region src/Table/hooks/useTableSort.d.ts
|
|
3
|
-
/** One column's sort state
|
|
3
|
+
/** One column's sort state - spreads directly onto `TableSortLabel`. */
|
|
4
4
|
interface TableSortEntry {
|
|
5
5
|
isActive: boolean;
|
|
6
6
|
direction: TableSortLabelDirection;
|
|
@@ -11,13 +11,13 @@ type TableSortMap<K extends string = string> = Record<K, TableSortEntry>;
|
|
|
11
11
|
/**
|
|
12
12
|
* Column-keyed sort state for sortable tables. Each column remembers its own
|
|
13
13
|
* direction (initially `'asc'`); clicking a column activates it AND flips its
|
|
14
|
-
* stored direction
|
|
14
|
+
* stored direction - so the first click on a column sorts `'desc'`.
|
|
15
15
|
* `keys` is read once on mount.
|
|
16
16
|
*
|
|
17
17
|
* ```tsx
|
|
18
18
|
* const sort = useTableSort(['name', 'latency'])
|
|
19
19
|
* <TableSortLabel {...sort.name}>Service</TableSortLabel>
|
|
20
|
-
* <TableControl data={rows} sort={sort}>{(row) =>
|
|
20
|
+
* <TableControl data={rows} sort={sort}>{(row) => ...}</TableControl>
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
declare function useTableSort<K extends string>(keys: readonly K[], onChange?: (key: K, direction: TableSortLabelDirection) => void): TableSortMap<K>;
|
|
@@ -29,7 +29,7 @@ interface UseTablePaginationOptions {
|
|
|
29
29
|
/** Initial rows per page; `-1` shows all rows. Default: `10`. */
|
|
30
30
|
defaultRowsPerPage?: number;
|
|
31
31
|
}
|
|
32
|
-
/** Paging state
|
|
32
|
+
/** Paging state - property names mirror `TablePagination`'s props so it spreads in one go. */
|
|
33
33
|
interface TablePaginationState {
|
|
34
34
|
page: number;
|
|
35
35
|
rowsPerPage: number;
|
|
@@ -43,7 +43,7 @@ interface TablePaginationState {
|
|
|
43
43
|
* ```tsx
|
|
44
44
|
* const pagination = useTablePagination({ defaultRowsPerPage: 10 })
|
|
45
45
|
* <TablePagination count={data.length} {...pagination} />
|
|
46
|
-
* <TableControl data={data} pagination={pagination}>{(row) =>
|
|
46
|
+
* <TableControl data={data} pagination={pagination}>{(row) => ...}</TableControl>
|
|
47
47
|
* ```
|
|
48
48
|
*/
|
|
49
49
|
declare function useTablePagination({ defaultPage, defaultRowsPerPage }?: UseTablePaginationOptions): TablePaginationState;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as TableSortLabelDirection } from "./index-
|
|
1
|
+
import { n as TableSortLabelDirection } from "./index-IEvuh6Cd.mjs";
|
|
2
2
|
//#region src/Table/hooks/useTableSort.d.ts
|
|
3
|
-
/** One column's sort state
|
|
3
|
+
/** One column's sort state - spreads directly onto `TableSortLabel`. */
|
|
4
4
|
interface TableSortEntry {
|
|
5
5
|
isActive: boolean;
|
|
6
6
|
direction: TableSortLabelDirection;
|
|
@@ -11,13 +11,13 @@ type TableSortMap<K extends string = string> = Record<K, TableSortEntry>;
|
|
|
11
11
|
/**
|
|
12
12
|
* Column-keyed sort state for sortable tables. Each column remembers its own
|
|
13
13
|
* direction (initially `'asc'`); clicking a column activates it AND flips its
|
|
14
|
-
* stored direction
|
|
14
|
+
* stored direction - so the first click on a column sorts `'desc'`.
|
|
15
15
|
* `keys` is read once on mount.
|
|
16
16
|
*
|
|
17
17
|
* ```tsx
|
|
18
18
|
* const sort = useTableSort(['name', 'latency'])
|
|
19
19
|
* <TableSortLabel {...sort.name}>Service</TableSortLabel>
|
|
20
|
-
* <TableControl data={rows} sort={sort}>{(row) =>
|
|
20
|
+
* <TableControl data={rows} sort={sort}>{(row) => ...}</TableControl>
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
declare function useTableSort<K extends string>(keys: readonly K[], onChange?: (key: K, direction: TableSortLabelDirection) => void): TableSortMap<K>;
|
|
@@ -29,7 +29,7 @@ interface UseTablePaginationOptions {
|
|
|
29
29
|
/** Initial rows per page; `-1` shows all rows. Default: `10`. */
|
|
30
30
|
defaultRowsPerPage?: number;
|
|
31
31
|
}
|
|
32
|
-
/** Paging state
|
|
32
|
+
/** Paging state - property names mirror `TablePagination`'s props so it spreads in one go. */
|
|
33
33
|
interface TablePaginationState {
|
|
34
34
|
page: number;
|
|
35
35
|
rowsPerPage: number;
|
|
@@ -43,7 +43,7 @@ interface TablePaginationState {
|
|
|
43
43
|
* ```tsx
|
|
44
44
|
* const pagination = useTablePagination({ defaultRowsPerPage: 10 })
|
|
45
45
|
* <TablePagination count={data.length} {...pagination} />
|
|
46
|
-
* <TableControl data={data} pagination={pagination}>{(row) =>
|
|
46
|
+
* <TableControl data={data} pagination={pagination}>{(row) => ...}</TableControl>
|
|
47
47
|
* ```
|
|
48
48
|
*/
|
|
49
49
|
declare function useTablePagination({ defaultPage, defaultRowsPerPage }?: UseTablePaginationOptions): TablePaginationState;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soroush.tech/design-system",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Emotion + @soroush.tech/styled-system React component library
|
|
3
|
+
"version": "2.0.0-alpha.0",
|
|
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",
|
|
7
7
|
"react",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"homepage": "https://soroush.tech/design-system",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/soroush-tech/
|
|
19
|
+
"url": "git+https://github.com/soroush-tech/design-system.git",
|
|
20
20
|
"directory": "packages/design-system"
|
|
21
21
|
},
|
|
22
22
|
"bugs": {
|
|
23
|
-
"url": "https://github.com/soroush-tech/
|
|
23
|
+
"url": "https://github.com/soroush-tech/design-system/issues"
|
|
24
24
|
},
|
|
25
25
|
"type": "module",
|
|
26
26
|
"sideEffects": false,
|
|
@@ -278,6 +278,16 @@
|
|
|
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
|
+
},
|
|
281
291
|
"./Paper": {
|
|
282
292
|
"import": {
|
|
283
293
|
"types": "./dist/Paper.d.mts",
|
|
@@ -477,7 +487,7 @@
|
|
|
477
487
|
"@emotion/cache": "^11.14.0",
|
|
478
488
|
"@emotion/react": "^11.14.0",
|
|
479
489
|
"@emotion/styled": "^11.14.1",
|
|
480
|
-
"@soroush.tech/styled-system": "^5.
|
|
490
|
+
"@soroush.tech/styled-system": "^5.9.0-alpha.0"
|
|
481
491
|
},
|
|
482
492
|
"peerDependencies": {
|
|
483
493
|
"react": "^19.2.8",
|