Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.

Commit ff0dfe1

Browse files
committed
chore: move provide-all to src
1 parent eb81454 commit ff0dfe1

File tree

3 files changed

+48
-45
lines changed

3 files changed

+48
-45
lines changed

src/provide-all.ts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { provideWindowMediaQuery } from "./media-queries";
2+
import type { TBorderProviderConstructorParams } from "./tokens/internal/border";
3+
import type { TColorProviderConstructorParams } from "./tokens/internal/color";
4+
import type { TElevationProviderConstructorParams } from "./tokens/internal/elevation";
5+
import type { TMotionProviderConstructorParams } from "./tokens/internal/motion";
6+
import type { TShapeProviderConstructorParams } from "./tokens/internal/shape";
7+
import type { TSizingProviderConstructorParams } from "./tokens/internal/sizing";
8+
import type { TTypographyProviderConstructorParams } from "./tokens/internal/typography";
9+
import { provideBorder } from "./tokens/provide-border";
10+
import { provideColor } from "./tokens/provide-color";
11+
import { provideElevation } from "./tokens/provide-elevation";
12+
import { provideMotion } from "./tokens/provide-motion";
13+
import { provideShape } from "./tokens/provide-shape";
14+
import { provideSizing } from "./tokens/provide-sizing";
15+
import { provideTypography } from "./tokens/provide-typography";
16+
17+
export function provideAll(params: {
18+
color?: Partial<TColorProviderConstructorParams>,
19+
elevation?: Partial<TElevationProviderConstructorParams>,
20+
motion?: TMotionProviderConstructorParams,
21+
shape?: TShapeProviderConstructorParams,
22+
typography?: TTypographyProviderConstructorParams,
23+
border?: Partial<TBorderProviderConstructorParams>,
24+
sizing?: Partial<TSizingProviderConstructorParams>,
25+
}) {
26+
return ({
27+
color: provideColor(params.color),
28+
elevation: provideElevation(params.elevation),
29+
motion: provideMotion(params.motion),
30+
shape: provideShape(params.shape),
31+
typography: provideTypography(params.typography),
32+
border: provideBorder(params.border),
33+
sizing: provideSizing(params.sizing),
34+
windowMediaQuery: provideWindowMediaQuery(),
35+
getAllPlugins() {
36+
return ([
37+
this.color.getPlugin(),
38+
this.elevation.getPlugin(),
39+
this.motion.getPlugin(),
40+
this.shape.getPlugin(),
41+
this.typography.getPlugin(),
42+
this.border.getPlugin(),
43+
this.windowMediaQuery.getPlugin(),
44+
])
45+
}
46+
})
47+
}

src/tokens/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* provide*()
44
*/
5-
export * from './provide-all'
5+
export * from '../provide-all'
66
export * from './provide-border'
77
export * from './provide-color'
88
export * from './provide-elevation'

src/tokens/provide-all.ts

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)