@atom-learning/components 2.28.3-beta.1 → 2.28.3

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/components/accordion/AccordionContent.js +1 -1
  3. package/dist/components/accordion/AccordionItem.js +1 -1
  4. package/dist/components/accordion/AccordionTrigger.d.ts +4 -5
  5. package/dist/components/accordion/AccordionTrigger.js +1 -1
  6. package/dist/components/button/Button.d.ts +0 -1
  7. package/dist/components/button/Button.js +1 -1
  8. package/dist/components/calendar/Calendar.js +1 -1
  9. package/dist/components/tabs/{TabsTrigger.d.ts → TabTrigger.d.ts} +6 -3
  10. package/dist/components/tabs/TabTrigger.js +1 -0
  11. package/dist/components/tabs/Tabs.d.ts +276 -7
  12. package/dist/components/tabs/Tabs.js +1 -1
  13. package/dist/components/tabs/TabsTriggerList.d.ts +9 -5
  14. package/dist/components/tabs/TabsTriggerList.js +1 -1
  15. package/dist/components/tabs/utils.d.ts +2 -0
  16. package/dist/components/tabs/utils.js +1 -0
  17. package/dist/components/top-bar/TopBar.js +1 -1
  18. package/dist/docgen.json +1 -1
  19. package/dist/docs/Accordion.mdx +7 -56
  20. package/dist/docs/Button.mdx +0 -8
  21. package/dist/docs/Tabs.mdx +57 -31
  22. package/dist/index.cjs.js +1 -1
  23. package/dist/utilities/hooks/useCallbackRef.js +1 -1
  24. package/dist/utilities/hooks/useScrollPosition.d.ts +3 -6
  25. package/dist/utilities/hooks/useScrollPosition.js +1 -1
  26. package/package.json +2 -3
  27. package/dist/components/tabs/TabsContent.d.ts +0 -267
  28. package/dist/components/tabs/TabsContent.js +0 -1
  29. package/dist/components/tabs/TabsTrigger.js +0 -1
  30. package/dist/docs/README.mdx +0 -79
  31. package/dist/experiments/color-scheme/ColorScheme.d.ts +0 -201
  32. package/dist/experiments/color-scheme/ColorScheme.js +0 -1
  33. package/dist/experiments/color-scheme/blue.json.js +0 -1
  34. package/dist/experiments/color-scheme/generateAlphaColors.d.ts +0 -1
  35. package/dist/experiments/color-scheme/generateAlphaColors.js +0 -1
  36. package/dist/experiments/color-scheme/index.d.ts +0 -1
  37. package/dist/experiments/color-scheme/slate.json.js +0 -1
  38. package/dist/experiments/color-scheme/stitches.colorscheme.config.d.ts +0 -452
  39. package/dist/experiments/color-scheme/stitches.colorscheme.config.js +0 -1
  40. package/dist/utilities/hooks/useWindowScrollPosition.d.ts +0 -6
  41. package/dist/utilities/hooks/useWindowScrollPosition.js +0 -1
  42. package/dist/utilities/hooks/useWindowSize.d.ts +0 -8
  43. package/dist/utilities/hooks/useWindowSize.js +0 -1
@@ -1 +1 @@
1
- import*as l from"react";const n=()=>{const e=l.useRef(null),u=l.useCallback(t=>{t&&(e.current=t)},[]);return[e,u]},s=()=>{const[e,u]=l.useState(null),t=l.useCallback(a=>{a&&u(a)},[]);return[e,t]};export{n as useCallbackRef,s as useCallbackRefState};
1
+ import*as t from"react";const s=()=>{const e=t.useRef(null),n=t.useCallback(r=>{r&&(e.current=r)},[]);return[e,n]};export{s as useCallbackRef};
@@ -1,7 +1,4 @@
1
- export declare const useScrollPosition: ({ elRef, delay }: {
2
- elRef?: HTMLElement | null | undefined;
3
- delay?: number | undefined;
4
- }) => {
5
- left: number;
6
- top: number;
1
+ export declare const useScrollPosition: () => {
2
+ x: number;
3
+ y: number;
7
4
  };
@@ -1 +1 @@
1
- import{useState as s,useEffect as n}from"react";import{debounce as c}from"throttle-debounce";const f=({elRef:e,delay:r=500})=>{const[l,o]=s({left:0,top:0});return n(()=>{if(!e)return;const t=c(r,()=>{o({left:e.scrollLeft,top:e.scrollTop})});return e.addEventListener("scroll",t),()=>{e.removeEventListener("scroll",t)}},[e]),l};export{f as useScrollPosition};
1
+ import{useState as s,useEffect as l}from"react";import{throttle as i}from"throttle-debounce";const c=()=>{const[t,r]=s({x:0,y:0}),{x:e,y:n}=t;return l(()=>{const o=i(500,()=>{r({x:window.scrollX,y:window.scrollY})});return window.addEventListener("scroll",o),()=>{window.removeEventListener("scroll",o)}},[]),{x:e,y:n}};export{c as useScrollPosition};
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "dist/index.cjs.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "module": "dist/index.js",
7
- "version": "2.28.3-beta.1",
7
+ "version": "2.28.3",
8
8
  "description": "",
9
9
  "files": [
10
10
  "dist"
@@ -107,7 +107,6 @@
107
107
  "react-docgen-typescript": "2.1.0",
108
108
  "rollup": "^2.39.0",
109
109
  "rollup-plugin-esbuild": "^4.8.2",
110
- "rollup-plugin-json": "^4.0.0",
111
110
  "rollup-plugin-summary": "^1.3.0",
112
111
  "rollup-plugin-terser": "^7.0.2",
113
112
  "rollup-plugin-visualizer": "^4.2.2",
@@ -172,7 +171,7 @@
172
171
  "husky": {
173
172
  "hooks": {
174
173
  "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
175
- "pre-commit": "bash ../scripts/prevent-commit.sh && lint-staged"
174
+ "pre-commit": "bash scripts/prevent-commit.sh && lint-staged"
176
175
  }
177
176
  },
178
177
  "commitlint": {
@@ -1,267 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const TabsContent: import("@stitches/react/types/styled-component").StyledComponent<import("react").ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsContentProps & import("react").RefAttributes<HTMLDivElement>>, {}, {
3
- sm: string;
4
- md: string;
5
- lg: string;
6
- xl: string;
7
- reducedMotion: string;
8
- allowMotion: string;
9
- hover: string;
10
- }, import("@stitches/react/types/css-util").CSS<{
11
- sm: string;
12
- md: string;
13
- lg: string;
14
- xl: string;
15
- reducedMotion: string;
16
- allowMotion: string;
17
- hover: string;
18
- }, {
19
- colors: {
20
- textForeground: any;
21
- textSubtle: any;
22
- textPlaceholder: any;
23
- background: any;
24
- backgroundAccent: any;
25
- tonal50: any;
26
- tonal100: any;
27
- tonal200: any;
28
- tonal300: any;
29
- tonal400: any;
30
- tonal500: any;
31
- tonal600: any;
32
- alpha100: any;
33
- alpha150: any;
34
- alpha200: any;
35
- alpha250: any;
36
- alpha600: any;
37
- primaryLight: any;
38
- primary: any;
39
- primaryMid: any;
40
- primaryDark: any;
41
- secondary: any;
42
- brandRed: any;
43
- brandRedAccent: any;
44
- brandGreen: any;
45
- brandGreenAccent: any;
46
- brandPurple: any;
47
- brandPurpleAccent: any;
48
- brandYellow: any;
49
- brandYellowAccent: any;
50
- successLight: any;
51
- success: any;
52
- successMid: any;
53
- successDark: any;
54
- dangerLight: any;
55
- danger: any;
56
- dangerMid: any;
57
- dangerDark: any;
58
- warningLight: any;
59
- warning: any;
60
- warningMid: any;
61
- warningDark: any;
62
- warningText: any;
63
- subjectEnglish: any;
64
- subjectMaths: any;
65
- subjectScience: any;
66
- subjectVerbalReasoning: any;
67
- subjectNonVerbalReasoning: any;
68
- subjectCreativeWriting: any;
69
- subjectExamSkills: any;
70
- };
71
- space: {
72
- "0": any;
73
- "1": any;
74
- "2": any;
75
- "3": any;
76
- "4": any;
77
- "5": any;
78
- "6": any;
79
- "7": any;
80
- "8": any;
81
- "9": any;
82
- };
83
- fontSizes: {
84
- xs: any;
85
- sm: any;
86
- md: any;
87
- lg: any;
88
- xl: any;
89
- "2xl": any;
90
- "3xl": any;
91
- "4xl": any;
92
- };
93
- fonts: {
94
- sans: any;
95
- mono: any;
96
- display: any;
97
- body: any;
98
- };
99
- sizes: {
100
- "0": any;
101
- "1": any;
102
- "2": any;
103
- "3": any;
104
- "4": any;
105
- "5": any;
106
- "6": any;
107
- "7": any;
108
- "8": any;
109
- };
110
- radii: {
111
- "0": any;
112
- "1": any;
113
- "2": any;
114
- "3": any;
115
- round: any;
116
- };
117
- shadows: {
118
- "0": any;
119
- "1": any;
120
- "2": any;
121
- "3": any;
122
- };
123
- }, import("@stitches/react/types/config").DefaultThemeMap, {
124
- bg: (value: {
125
- readonly [$$PropertyValue]: "background";
126
- }) => {
127
- background: {
128
- readonly [$$PropertyValue]: "background";
129
- };
130
- };
131
- inset: (value: string | number | {
132
- readonly [$$ScaleValue]: "space";
133
- }) => {
134
- top: string | number | {
135
- readonly [$$ScaleValue]: "space";
136
- };
137
- right: string | number | {
138
- readonly [$$ScaleValue]: "space";
139
- };
140
- bottom: string | number | {
141
- readonly [$$ScaleValue]: "space";
142
- };
143
- left: string | number | {
144
- readonly [$$ScaleValue]: "space";
145
- };
146
- };
147
- size: (value: string | number | {
148
- readonly [$$ScaleValue]: "size";
149
- }) => {
150
- height: string | number | {
151
- readonly [$$ScaleValue]: "size";
152
- };
153
- width: string | number | {
154
- readonly [$$ScaleValue]: "size";
155
- };
156
- };
157
- p: (value: string | number | {
158
- readonly [$$ScaleValue]: "space";
159
- }) => {
160
- padding: string | number | {
161
- readonly [$$ScaleValue]: "space";
162
- };
163
- };
164
- pt: (value: string | number | {
165
- readonly [$$ScaleValue]: "space";
166
- }) => {
167
- paddingTop: string | number | {
168
- readonly [$$ScaleValue]: "space";
169
- };
170
- };
171
- pr: (value: string | number | {
172
- readonly [$$ScaleValue]: "space";
173
- }) => {
174
- paddingRight: string | number | {
175
- readonly [$$ScaleValue]: "space";
176
- };
177
- };
178
- pb: (value: string | number | {
179
- readonly [$$ScaleValue]: "space";
180
- }) => {
181
- paddingBottom: string | number | {
182
- readonly [$$ScaleValue]: "space";
183
- };
184
- };
185
- pl: (value: string | number | {
186
- readonly [$$ScaleValue]: "space";
187
- }) => {
188
- paddingLeft: string | number | {
189
- readonly [$$ScaleValue]: "space";
190
- };
191
- };
192
- px: (value: string | number | {
193
- readonly [$$ScaleValue]: "space";
194
- }) => {
195
- paddingLeft: string | number | {
196
- readonly [$$ScaleValue]: "space";
197
- };
198
- paddingRight: string | number | {
199
- readonly [$$ScaleValue]: "space";
200
- };
201
- };
202
- py: (value: string | number | {
203
- readonly [$$ScaleValue]: "space";
204
- }) => {
205
- paddingTop: string | number | {
206
- readonly [$$ScaleValue]: "space";
207
- };
208
- paddingBottom: string | number | {
209
- readonly [$$ScaleValue]: "space";
210
- };
211
- };
212
- m: (value: string | number | {
213
- readonly [$$ScaleValue]: "space";
214
- }) => {
215
- margin: string | number | {
216
- readonly [$$ScaleValue]: "space";
217
- };
218
- };
219
- mt: (value: string | number | {
220
- readonly [$$ScaleValue]: "space";
221
- }) => {
222
- marginTop: string | number | {
223
- readonly [$$ScaleValue]: "space";
224
- };
225
- };
226
- mr: (value: string | number | {
227
- readonly [$$ScaleValue]: "space";
228
- }) => {
229
- marginRight: string | number | {
230
- readonly [$$ScaleValue]: "space";
231
- };
232
- };
233
- mb: (value: string | number | {
234
- readonly [$$ScaleValue]: "space";
235
- }) => {
236
- marginBottom: string | number | {
237
- readonly [$$ScaleValue]: "space";
238
- };
239
- };
240
- ml: (value: string | number | {
241
- readonly [$$ScaleValue]: "space";
242
- }) => {
243
- marginLeft: string | number | {
244
- readonly [$$ScaleValue]: "space";
245
- };
246
- };
247
- mx: (value: string | number | {
248
- readonly [$$ScaleValue]: "space";
249
- }) => {
250
- marginLeft: string | number | {
251
- readonly [$$ScaleValue]: "space";
252
- };
253
- marginRight: string | number | {
254
- readonly [$$ScaleValue]: "space";
255
- };
256
- };
257
- my: (value: string | number | {
258
- readonly [$$ScaleValue]: "space";
259
- }) => {
260
- marginTop: string | number | {
261
- readonly [$$ScaleValue]: "space";
262
- };
263
- marginBottom: string | number | {
264
- readonly [$$ScaleValue]: "space";
265
- };
266
- };
267
- }>>;
@@ -1 +0,0 @@
1
- import{Content as t}from"@radix-ui/react-tabs";import{styled as n}from"../../stitches.js";const e=n(t,{flexGrow:1,fontFamily:"$body"}),o=e;o.displayName="TabsContent";export{o as TabsContent};
@@ -1 +0,0 @@
1
- import{Trigger as i}from"@radix-ui/react-tabs";import*as e from"react";import{styled as a}from"../../stitches.js";import{Text as n}from"../text/Text.js";import{focusVisibleStyleBlock as c}from"../../utilities/style/focus-visible-style-block.js";const s=a(i,{background:"none",border:"none",cursor:"pointer",flexShrink:0,p:"$4",userSelect:"none",borderBottom:"2px solid transparent",'&[data-state="active"]':{color:"$interactive1",fontWeight:600,letterSpacing:"-0.005em",borderColor:"currentColor"},"&[data-disabled]":{opacity:.3,cursor:"not-allowed"},"&:not([data-disabled])":{"&:hover, &:focus-visible":{color:"$interactive2",bg:"$accentA1"},"&:active":{color:"$interactive3"},"&:focus-visible":{...c()}}}),r=({children:o,...t})=>e.createElement(s,{asChild:!0,...t},e.createElement(n,{size:"sm",as:"span"},o));r.displayName="TabsTrigger";export{r as TabsTrigger};
@@ -1,79 +0,0 @@
1
- ## Color Schemes (v.ALPHA)
2
-
3
- `color-scheme/`, is an **internal** component in an alpha stage (usable but not finalised) which introduces a `ColorScheme` component. It has been worked on heavily in terms of considering the required options and logic from dev but is **not finished and needs more design input**.
4
-
5
- The problem that this component was introduced to solve is the difficult way we have approached theming so far in our components.
6
- In the past we have heavily relied on props drilling and passing down theme related stitches variants to children, which means _(1)_ the colours can easily break when the expected children are nested further than directly under the 'theme providing' parent (The component which has a `theme` prop and tries to prop-drill theme). Moreover, _(2)_ we have inconsistent naming for our themes and _(3)_ inconsistent implementations on active components since _(4)_ the theming need to be documented and coded separately for each new component.
7
-
8
- This `<ColorScheme />` component allows for `base` (`var(--baseX)`) and `accent` (`var(--accentX)`) theme property, as well as an `interactive` contrast mode to affect all interactable components.
9
-
10
- The props are:
11
-
12
- - `base` is used for the base colours of the wrapped component: different tones of background and text. It currently only supports the `slate` (grey) colour but can be extended for different base colors.
13
- - `accent` is used for highlighted elements and interactive elements of the color scheme. It can be used directly but should be used with an interactive theme for interactive elements - see `<Button />`, `Accordion.Trigger` etc. Currently allowed accents are `slate` and `blue`.
14
- - `interactive` supports 4 versions `loContrast1` and `loContrast2` which on light color schemes are lighter and on a dark mode they would be darker (so low contrast in comparison to the background), and `hiContrast1`, `hiContrast2` which are used for the opposite.
15
-
16
- All the color scheme configurations setup used in the component can be found in `color-scheme/src/stitches.colorscheme.config.ts`
17
-
18
- The ColorScheme itself works by re-declaring the needed CSS variables any time it's used. It is heavily inpired by both [stitches theming guidelines](https://stitches.dev/docs/theming) and particularly by [the radix colors project](https://www.radix-ui.com/colors) of which it's almost a copy of but with our own colours defined and some aliasing to match the current design use requirements.
19
-
20
- Currently in use by a couple of components in library and the full documentation site. This component is subject to change when the Atom Learning colour theming patterns are properly established and we can make final decisions on the colours and API. **There will be changes to this code in the future.**
21
-
22
- ### Examples
23
-
24
- ```jsx
25
- <ColorScheme base="slate" accent="blue" interactive="hiContrast1">
26
- <Box css={{ background: '$background', color: '$foreground' }}>
27
- Off-black text over a white background
28
- </Box>
29
- <Box css={{ background: '$base1', color: '$foreground' }}>
30
- Off-black text over very slightly grey background
31
- </Box>
32
- <Box css={{ background: '$base7', color: '$foreground6plus' }}>
33
- White text over darker grey background
34
- </Box>
35
- <Box css={{ background: '$accent1', color: '$foreground' }}>
36
- Off-black text over a slightly blue background
37
- </Box>
38
- <Box css={{ background: '$accent7', color: '$foreground6plus' }}>
39
- White text over darker blue background
40
- </Box>
41
- <Box css={{ background: '$accent9', color: '$foreground6plus' }}>
42
- White text over much darker blue background
43
- </Box>
44
- <Button
45
- css={{
46
- background: '$interactive1',
47
- color: '$interactiveForeground',
48
- ['&:hover']: { background: '$interactive2' },
49
- ['&:active']: { background: '$interactive3' }
50
- }}
51
- >
52
- Blue button with white text
53
- </Button>
54
- <ColorScheme
55
- interactive="hiContrast2"
56
- as={Button}
57
- css={{
58
- background: '$interactive1',
59
- color: '$interactiveForeground',
60
- ['&:hover']: { background: '$interactive2' },
61
- ['&:active']: { background: '$interactive3' }
62
- }}
63
- >
64
- Darker blue button with white text
65
- </ColorScheme>
66
- <ColorScheme
67
- interactive="loContrast2"
68
- as={Button}
69
- css={{
70
- background: '$interactive1',
71
- color: '$interactiveForeground',
72
- ['&:hover']: { background: '$interactive2' },
73
- ['&:active']: { background: '$interactive3' }
74
- }}
75
- >
76
- Light blue button with off-black text
77
- </ColorScheme>
78
- </ColorScheme>
79
- ```
@@ -1,201 +0,0 @@
1
- import * as React from 'react';
2
- import { bases, accents } from './stitches.colorscheme.config';
3
- declare type TColorSchemeOwnProps = {
4
- base?: keyof typeof bases;
5
- accent?: keyof typeof accents;
6
- interactive?: 'loContrast1' | 'loContrast2' | 'hiContrast1' | 'hiContrast2';
7
- asChild?: boolean;
8
- };
9
- declare const StyledColorScheme: import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {
10
- sm: string;
11
- md: string;
12
- lg: string;
13
- xl: string;
14
- reducedMotion: string;
15
- allowMotion: string;
16
- hover: string;
17
- }, import("@stitches/react/types/css-util").CSS<{
18
- sm: string;
19
- md: string;
20
- lg: string;
21
- xl: string;
22
- reducedMotion: string;
23
- allowMotion: string;
24
- hover: string;
25
- }, {
26
- colors: {
27
- slate1: any;
28
- slate2: any;
29
- slate3: any;
30
- slate4: any;
31
- slate5: any;
32
- slate6: any;
33
- slate7: any;
34
- slate8: any;
35
- slate9: any;
36
- slate10: any;
37
- blue1: any;
38
- blue2: any;
39
- blue3: any;
40
- blue4: any;
41
- blue5: any;
42
- blue6: any;
43
- blue7: any;
44
- blue8: any;
45
- blue9: any;
46
- blue10: any;
47
- background: any;
48
- foreground: any;
49
- foreground6plus: any;
50
- };
51
- }, import("@stitches/react/types/config").DefaultThemeMap, {
52
- bg: (value: {
53
- readonly [$$PropertyValue]: "background";
54
- }) => {
55
- background: {
56
- readonly [$$PropertyValue]: "background";
57
- };
58
- };
59
- inset: (value: string | number | {
60
- readonly [$$ScaleValue]: "space";
61
- }) => {
62
- top: string | number | {
63
- readonly [$$ScaleValue]: "space";
64
- };
65
- right: string | number | {
66
- readonly [$$ScaleValue]: "space";
67
- };
68
- bottom: string | number | {
69
- readonly [$$ScaleValue]: "space";
70
- };
71
- left: string | number | {
72
- readonly [$$ScaleValue]: "space";
73
- };
74
- };
75
- size: (value: string | number | {
76
- readonly [$$ScaleValue]: "size";
77
- }) => {
78
- height: string | number | {
79
- readonly [$$ScaleValue]: "size";
80
- };
81
- width: string | number | {
82
- readonly [$$ScaleValue]: "size";
83
- };
84
- };
85
- p: (value: string | number | {
86
- readonly [$$ScaleValue]: "space";
87
- }) => {
88
- padding: string | number | {
89
- readonly [$$ScaleValue]: "space";
90
- };
91
- };
92
- pt: (value: string | number | {
93
- readonly [$$ScaleValue]: "space";
94
- }) => {
95
- paddingTop: string | number | {
96
- readonly [$$ScaleValue]: "space";
97
- };
98
- };
99
- pr: (value: string | number | {
100
- readonly [$$ScaleValue]: "space";
101
- }) => {
102
- paddingRight: string | number | {
103
- readonly [$$ScaleValue]: "space";
104
- };
105
- };
106
- pb: (value: string | number | {
107
- readonly [$$ScaleValue]: "space";
108
- }) => {
109
- paddingBottom: string | number | {
110
- readonly [$$ScaleValue]: "space";
111
- };
112
- };
113
- pl: (value: string | number | {
114
- readonly [$$ScaleValue]: "space";
115
- }) => {
116
- paddingLeft: string | number | {
117
- readonly [$$ScaleValue]: "space";
118
- };
119
- };
120
- px: (value: string | number | {
121
- readonly [$$ScaleValue]: "space";
122
- }) => {
123
- paddingLeft: string | number | {
124
- readonly [$$ScaleValue]: "space";
125
- };
126
- paddingRight: string | number | {
127
- readonly [$$ScaleValue]: "space";
128
- };
129
- };
130
- py: (value: string | number | {
131
- readonly [$$ScaleValue]: "space";
132
- }) => {
133
- paddingTop: string | number | {
134
- readonly [$$ScaleValue]: "space";
135
- };
136
- paddingBottom: string | number | {
137
- readonly [$$ScaleValue]: "space";
138
- };
139
- };
140
- m: (value: string | number | {
141
- readonly [$$ScaleValue]: "space";
142
- }) => {
143
- margin: string | number | {
144
- readonly [$$ScaleValue]: "space";
145
- };
146
- };
147
- mt: (value: string | number | {
148
- readonly [$$ScaleValue]: "space";
149
- }) => {
150
- marginTop: string | number | {
151
- readonly [$$ScaleValue]: "space";
152
- };
153
- };
154
- mr: (value: string | number | {
155
- readonly [$$ScaleValue]: "space";
156
- }) => {
157
- marginRight: string | number | {
158
- readonly [$$ScaleValue]: "space";
159
- };
160
- };
161
- mb: (value: string | number | {
162
- readonly [$$ScaleValue]: "space";
163
- }) => {
164
- marginBottom: string | number | {
165
- readonly [$$ScaleValue]: "space";
166
- };
167
- };
168
- ml: (value: string | number | {
169
- readonly [$$ScaleValue]: "space";
170
- }) => {
171
- marginLeft: string | number | {
172
- readonly [$$ScaleValue]: "space";
173
- };
174
- };
175
- mx: (value: string | number | {
176
- readonly [$$ScaleValue]: "space";
177
- }) => {
178
- marginLeft: string | number | {
179
- readonly [$$ScaleValue]: "space";
180
- };
181
- marginRight: string | number | {
182
- readonly [$$ScaleValue]: "space";
183
- };
184
- };
185
- my: (value: string | number | {
186
- readonly [$$ScaleValue]: "space";
187
- }) => {
188
- marginTop: string | number | {
189
- readonly [$$ScaleValue]: "space";
190
- };
191
- marginBottom: string | number | {
192
- readonly [$$ScaleValue]: "space";
193
- };
194
- };
195
- }>>;
196
- declare type TColorSchemeProps = React.ComponentProps<typeof StyledColorScheme> & TColorSchemeOwnProps;
197
- /**
198
- * @experimental Component has not been finalised. Further design input required. Use with caution.
199
- */
200
- export declare const ColorScheme: React.ForwardRefExoticComponent<Pick<TColorSchemeProps, "css" | "key" | keyof React.HTMLAttributes<HTMLDivElement> | keyof TColorSchemeOwnProps> & React.RefAttributes<HTMLDivElement>>;
201
- export {};
@@ -1 +0,0 @@
1
- import*as o from"react";import{styled as f,colorSchemes as e}from"./stitches.colorscheme.config.js";import{Slot as d}from"@radix-ui/react-slot";const p=f("div"),t=o.forwardRef(({base:r="",accent:a="",interactive:c="",className:m,asChild:s=!1,...i},l)=>{const n=[m,e[`interactive-${c}`],e[`accent-${a}`],e[`base-${r}`]].filter(Boolean).join(" ");return o.createElement(s?d:p,{ref:l,className:n,...i})});t.displayName="ColorScheme";export{t as ColorScheme};
@@ -1 +0,0 @@
1
- var e="#F3F8FF",l="#E5F1FF",u="#D6EAFF",b="#C2DEFF",F="#B3D4FA",a="#057AFF",r="#0F67F5",v="#194DCC",D="#102DA3",A="#15235E",E={blue1:e,blue2:l,blue3:u,blue4:b,blue5:F,blue6:a,blue7:r,blue8:v,blue9:D,blue10:A};export{e as blue1,A as blue10,l as blue2,u as blue3,b as blue4,F as blue5,a as blue6,r as blue7,v as blue8,D as blue9,E as default};
@@ -1 +0,0 @@
1
- export declare const generateAlphaColors: (colorName: string, colors: Record<string, string>) => Record<string, string>;
@@ -1 +0,0 @@
1
- import{parseToRgba as u}from"color2k";const M=[255,255,255,1],r=[.05,.1,.15,.2,.27,.35,.5,.7,.8,.95],n=a=>Math.round(Math.max(Math.min(a,255),0)),$=(a,h)=>{const e={};return Object.entries(h).forEach(([f,i],o)=>{const[m,p,b]=u(i),[t,s,c]=M,g=[n((m-t)/r[o]+t),n((p-s)/r[o]+s),n((b-c)/r[o]+c),r[o]];e[`${a}A${o+1}`]=`rgba(${g.join(",")})`}),e};export{$ as generateAlphaColors};
@@ -1 +0,0 @@
1
- export { ColorScheme } from './ColorScheme';
@@ -1 +0,0 @@
1
- var a="#F6F6F6",e="#EBEBEB",t="#E0E0E0",l="#CECECE",s="#C2C2C2",r="#757575",v="#545454",C="#333333",E="#1F1F1F",F="#1C1C1C",B={slate1:a,slate2:e,slate3:t,slate4:l,slate5:s,slate6:r,slate7:v,slate8:C,slate9:E,slate10:F};export{B as default,a as slate1,F as slate10,e as slate2,t as slate3,l as slate4,s as slate5,r as slate6,v as slate7,C as slate8,E as slate9};