@atom-learning/components 1.2.3 → 1.5.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.
Files changed (68) hide show
  1. package/dist/components/action-icon/ActionIcon.d.ts +2 -2
  2. package/dist/components/action-icon/ActionIcon.js +1 -1
  3. package/dist/components/calendar/Calendar.d.ts +19 -0
  4. package/dist/components/calendar/Calendar.js +1 -0
  5. package/dist/components/calendar/Day.d.ts +269 -0
  6. package/dist/components/calendar/Day.js +1 -0
  7. package/dist/components/calendar/constants.d.ts +2 -0
  8. package/dist/components/calendar/constants.js +1 -0
  9. package/dist/components/date-field/DateField.d.ts +17 -0
  10. package/dist/components/date-field/DateField.js +1 -0
  11. package/dist/components/date-field/index.d.ts +1 -0
  12. package/dist/components/date-input/DateInput.d.ts +17 -0
  13. package/dist/components/date-input/DateInput.js +1 -0
  14. package/dist/components/date-input/constants.d.ts +1 -0
  15. package/dist/components/date-input/constants.js +1 -0
  16. package/dist/components/date-input/index.d.ts +1 -0
  17. package/dist/components/date-input/use-date.d.ts +5 -0
  18. package/dist/components/date-input/use-date.js +1 -0
  19. package/dist/components/dialog/DialogContent.d.ts +1 -0
  20. package/dist/components/dialog/DialogContent.js +1 -1
  21. package/dist/components/form/Form.types.d.ts +2 -2
  22. package/dist/components/index.d.ts +6 -1
  23. package/dist/components/notification-badge/NotificationBadge.d.ts +535 -0
  24. package/dist/components/notification-badge/NotificationBadge.js +1 -0
  25. package/dist/components/notification-badge/index.d.ts +1 -0
  26. package/dist/components/popover/PopoverContent.d.ts +1 -0
  27. package/dist/components/popover/PopoverContent.js +1 -1
  28. package/dist/components/search-input/SearchInput.d.ts +3 -1
  29. package/dist/components/search-input/SearchInput.js +1 -1
  30. package/dist/components/slider/Slider.d.ts +276 -0
  31. package/dist/components/slider/Slider.js +1 -0
  32. package/dist/components/slider/SliderSteps.d.ts +13 -0
  33. package/dist/components/slider/SliderSteps.js +1 -0
  34. package/dist/components/slider/SliderValue.d.ts +9 -0
  35. package/dist/components/slider/SliderValue.js +1 -0
  36. package/dist/components/slider/index.d.ts +1 -0
  37. package/dist/components/slider-field/SliderField.d.ts +13 -0
  38. package/dist/components/slider-field/SliderField.js +1 -0
  39. package/dist/components/slider-field/index.d.ts +1 -0
  40. package/dist/components/table/Table.d.ts +1 -0
  41. package/dist/components/table/Table.js +1 -1
  42. package/dist/components/table/TableHeader.d.ts +7 -1
  43. package/dist/components/table/TableHeader.js +1 -1
  44. package/dist/components/table/TableHeaderCell.js +1 -1
  45. package/dist/components/table/TableRow.js +1 -1
  46. package/dist/components/tabs/TabTrigger.d.ts +5 -3
  47. package/dist/components/tabs/TabTrigger.js +1 -1
  48. package/dist/components/tabs/Tabs.d.ts +8 -268
  49. package/dist/components/tabs/Tabs.js +1 -1
  50. package/dist/components/tabs/TabsTriggerList.d.ts +274 -0
  51. package/dist/components/tabs/TabsTriggerList.js +1 -0
  52. package/dist/components/tabs/utils.d.ts +2 -0
  53. package/dist/components/tabs/utils.js +1 -0
  54. package/dist/components/text/Text.js +1 -1
  55. package/dist/docgen.json +1 -1
  56. package/dist/docs/DateField.mdx +20 -0
  57. package/dist/docs/DateInput.mdx +81 -0
  58. package/dist/docs/Dialog.mdx +16 -1
  59. package/dist/docs/NotificationBadge.mdx +33 -0
  60. package/dist/docs/RadioButton.mdx +1 -1
  61. package/dist/docs/SearchInput.mdx +2 -1
  62. package/dist/docs/Slider.mdx +117 -0
  63. package/dist/docs/SliderField.mdx +35 -0
  64. package/dist/docs/Table.mdx +14 -0
  65. package/dist/docs/Tabs.mdx +24 -1
  66. package/dist/index.cjs.js +1 -1
  67. package/dist/index.js +1 -1
  68. package/package.json +7 -2
@@ -1,271 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { TabTrigger } from './TabTrigger';
3
- declare const StyledRoot: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsProps & React.RefAttributes<HTMLDivElement>>, {}, {
4
- sm: string;
5
- md: string;
6
- lg: string;
7
- xl: string;
8
- reducedMotion: string;
9
- allowMotion: string;
10
- hover: string;
11
- }, import("@stitches/react/types/css-util").CSS<{
12
- sm: string;
13
- md: string;
14
- lg: string;
15
- xl: string;
16
- reducedMotion: string;
17
- allowMotion: string;
18
- hover: string;
3
+ import { TriggerListWrapper } from './TabsTriggerList';
4
+ declare type TabsProps = React.ComponentProps<typeof StyledRoot>;
5
+ declare const StyledRoot: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsProps & React.RefAttributes<HTMLDivElement>>, {
6
+ theme?: "dark" | "light" | undefined;
19
7
  }, {
20
- colors: {
21
- textForeground: any;
22
- textSubtle: any;
23
- textPlaceholder: any;
24
- background: any;
25
- backgroundAccent: any;
26
- tonal50: any;
27
- tonal100: any;
28
- tonal200: any;
29
- tonal300: any;
30
- tonal400: any;
31
- tonal500: any;
32
- tonal600: any;
33
- alpha100: any;
34
- alpha150: any;
35
- alpha200: any;
36
- alpha250: any;
37
- alpha600: any;
38
- primaryLight: any;
39
- primary: any;
40
- primaryMid: any;
41
- primaryDark: any;
42
- secondary: any;
43
- brandRed: any;
44
- brandRedAccent: any;
45
- brandGreen: any;
46
- brandGreenAccent: any;
47
- brandPurple: any;
48
- brandPurpleAccent: any;
49
- brandYellow: any;
50
- brandYellowAccent: any;
51
- successLight: any;
52
- success: any;
53
- successMid: any;
54
- successDark: any;
55
- dangerLight: any;
56
- danger: any;
57
- dangerMid: any;
58
- dangerDark: any;
59
- warningLight: any;
60
- warning: any;
61
- warningMid: any;
62
- warningDark: 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
- }>>;
268
- declare const StyledTabContent: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsContentProps & React.RefAttributes<HTMLDivElement>>, {}, {
269
8
  sm: string;
270
9
  md: string;
271
10
  lg: string;
@@ -530,7 +269,9 @@ declare const StyledTabContent: import("@stitches/react/types/styled-component")
530
269
  };
531
270
  };
532
271
  }>>;
533
- declare const StyledTriggerList: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsListProps & React.RefAttributes<HTMLDivElement>>, {}, {
272
+ declare const StyledTabContent: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsContentProps & React.RefAttributes<HTMLDivElement>>, {
273
+ theme?: "dark" | "light" | undefined;
274
+ }, {
534
275
  sm: string;
535
276
  md: string;
536
277
  lg: string;
@@ -795,9 +536,8 @@ declare const StyledTriggerList: import("@stitches/react/types/styled-component"
795
536
  };
796
537
  };
797
538
  }>>;
798
- declare type TabsProps = React.ComponentProps<typeof StyledRoot>;
799
539
  export declare const Tabs: React.FC<TabsProps> & {
800
- TriggerList: typeof StyledTriggerList;
540
+ TriggerList: typeof TriggerListWrapper;
801
541
  Trigger: typeof TabTrigger;
802
542
  Content: typeof StyledTabContent;
803
543
  };
@@ -1 +1 @@
1
- const r=["children"];import{Root as e,Content as t,List as i}from"@radix-ui/react-tabs";import{createElement as o}from"react";import{styled as n}from"../../stitches.js";import{TabTrigger as l}from"./TabTrigger.js";const s=n(e,{display:"flex",flexDirection:"column"}),a=n(t,{flexGrow:1}),f=n(i,{flexShrink:0,display:"flex",borderBottom:"1px solid $primaryDark"}),c=e=>{let{children:t}=e,i=function(r,e){if(null==r)return{};var t,i,o={},n=Object.keys(r);for(i=0;i<n.length;i++)t=n[i],e.indexOf(t)>=0||(o[t]=r[t]);return o}(e,r);return o(s,Object.assign({},i),t)};c.TriggerList=f,c.Trigger=l,c.Content=a,c.displayName="Tabs";export{c as Tabs};
1
+ const r=["theme","children"];import{Root as t,Content as e}from"@radix-ui/react-tabs";import{createElement as i}from"react";import{styled as o}from"../../stitches.js";import{TabTrigger as m}from"./TabTrigger.js";import{TriggerListWrapper as a}from"./TabsTriggerList.js";import{passPropsToChildren as l}from"./utils.js";const n=o(t,{display:"flex",flexDirection:"column",variants:{theme:{light:{color:"$primary"},dark:{color:"white"}}}}),s=o(e,{flexGrow:1,fontFamily:"$body",variants:{theme:{light:{color:"$textForeground"},dark:{bg:"$primaryDark",color:"white"}}}}),c=t=>{let{theme:e="light",children:o}=t,m=function(r,t){if(null==r)return{};var e,i,o={},m=Object.keys(r);for(i=0;i<m.length;i++)e=m[i],t.indexOf(e)>=0||(o[e]=r[e]);return o}(t,r);return i(n,Object.assign({theme:e},m),l(o,{theme:e},[a,s]))};c.TriggerList=a,c.Trigger=m,c.Content=s,c.displayName="Tabs";export{c as Tabs};
@@ -0,0 +1,274 @@
1
+ import React from 'react';
2
+ interface ListProps extends React.ComponentProps<typeof StyledTriggerList> {
3
+ enableTabScrolling?: boolean;
4
+ }
5
+ declare const StyledTriggerList: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsListProps & React.RefAttributes<HTMLDivElement>>, {
6
+ theme?: "dark" | "light" | undefined;
7
+ appearance?: "uppercase" | undefined;
8
+ }, {
9
+ sm: string;
10
+ md: string;
11
+ lg: string;
12
+ xl: string;
13
+ reducedMotion: string;
14
+ allowMotion: string;
15
+ hover: string;
16
+ }, import("@stitches/react/types/css-util").CSS<{
17
+ sm: string;
18
+ md: string;
19
+ lg: string;
20
+ xl: string;
21
+ reducedMotion: string;
22
+ allowMotion: string;
23
+ hover: string;
24
+ }, {
25
+ colors: {
26
+ textForeground: any;
27
+ textSubtle: any;
28
+ textPlaceholder: any;
29
+ background: any;
30
+ backgroundAccent: any;
31
+ tonal50: any;
32
+ tonal100: any;
33
+ tonal200: any;
34
+ tonal300: any;
35
+ tonal400: any;
36
+ tonal500: any;
37
+ tonal600: any;
38
+ alpha100: any;
39
+ alpha150: any;
40
+ alpha200: any;
41
+ alpha250: any;
42
+ alpha600: any;
43
+ primaryLight: any;
44
+ primary: any;
45
+ primaryMid: any;
46
+ primaryDark: any;
47
+ secondary: any;
48
+ brandRed: any;
49
+ brandRedAccent: any;
50
+ brandGreen: any;
51
+ brandGreenAccent: any;
52
+ brandPurple: any;
53
+ brandPurpleAccent: any;
54
+ brandYellow: any;
55
+ brandYellowAccent: any;
56
+ successLight: any;
57
+ success: any;
58
+ successMid: any;
59
+ successDark: any;
60
+ dangerLight: any;
61
+ danger: any;
62
+ dangerMid: any;
63
+ dangerDark: any;
64
+ warningLight: any;
65
+ warning: any;
66
+ warningMid: any;
67
+ warningDark: any;
68
+ subjectEnglish: any;
69
+ subjectMaths: any;
70
+ subjectScience: any;
71
+ subjectVerbalReasoning: any;
72
+ subjectNonVerbalReasoning: any;
73
+ subjectCreativeWriting: any;
74
+ subjectExamSkills: any;
75
+ };
76
+ space: {
77
+ "0": any;
78
+ "1": any;
79
+ "2": any;
80
+ "3": any;
81
+ "4": any;
82
+ "5": any;
83
+ "6": any;
84
+ "7": any;
85
+ "8": any;
86
+ "9": any;
87
+ };
88
+ fontSizes: {
89
+ xs: any;
90
+ sm: any;
91
+ md: any;
92
+ lg: any;
93
+ xl: any;
94
+ "2xl": any;
95
+ "3xl": any;
96
+ "4xl": any;
97
+ };
98
+ fonts: {
99
+ sans: any;
100
+ mono: any;
101
+ display: any;
102
+ body: any;
103
+ };
104
+ sizes: {
105
+ "0": any;
106
+ "1": any;
107
+ "2": any;
108
+ "3": any;
109
+ "4": any;
110
+ "5": any;
111
+ "6": any;
112
+ "7": any;
113
+ "8": any;
114
+ };
115
+ radii: {
116
+ "0": any;
117
+ "1": any;
118
+ "2": any;
119
+ "3": any;
120
+ round: any;
121
+ };
122
+ shadows: {
123
+ "0": any;
124
+ "1": any;
125
+ "2": any;
126
+ "3": any;
127
+ };
128
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
129
+ bg: (value: {
130
+ readonly [$$PropertyValue]: "background";
131
+ }) => {
132
+ background: {
133
+ readonly [$$PropertyValue]: "background";
134
+ };
135
+ };
136
+ inset: (value: string | number | {
137
+ readonly [$$ScaleValue]: "space";
138
+ }) => {
139
+ top: string | number | {
140
+ readonly [$$ScaleValue]: "space";
141
+ };
142
+ right: string | number | {
143
+ readonly [$$ScaleValue]: "space";
144
+ };
145
+ bottom: string | number | {
146
+ readonly [$$ScaleValue]: "space";
147
+ };
148
+ left: string | number | {
149
+ readonly [$$ScaleValue]: "space";
150
+ };
151
+ };
152
+ size: (value: string | number | {
153
+ readonly [$$ScaleValue]: "size";
154
+ }) => {
155
+ height: string | number | {
156
+ readonly [$$ScaleValue]: "size";
157
+ };
158
+ width: string | number | {
159
+ readonly [$$ScaleValue]: "size";
160
+ };
161
+ };
162
+ p: (value: string | number | {
163
+ readonly [$$ScaleValue]: "space";
164
+ }) => {
165
+ padding: string | number | {
166
+ readonly [$$ScaleValue]: "space";
167
+ };
168
+ };
169
+ pt: (value: string | number | {
170
+ readonly [$$ScaleValue]: "space";
171
+ }) => {
172
+ paddingTop: string | number | {
173
+ readonly [$$ScaleValue]: "space";
174
+ };
175
+ };
176
+ pr: (value: string | number | {
177
+ readonly [$$ScaleValue]: "space";
178
+ }) => {
179
+ paddingRight: string | number | {
180
+ readonly [$$ScaleValue]: "space";
181
+ };
182
+ };
183
+ pb: (value: string | number | {
184
+ readonly [$$ScaleValue]: "space";
185
+ }) => {
186
+ paddingBottom: string | number | {
187
+ readonly [$$ScaleValue]: "space";
188
+ };
189
+ };
190
+ pl: (value: string | number | {
191
+ readonly [$$ScaleValue]: "space";
192
+ }) => {
193
+ paddingLeft: string | number | {
194
+ readonly [$$ScaleValue]: "space";
195
+ };
196
+ };
197
+ px: (value: string | number | {
198
+ readonly [$$ScaleValue]: "space";
199
+ }) => {
200
+ paddingLeft: string | number | {
201
+ readonly [$$ScaleValue]: "space";
202
+ };
203
+ paddingRight: string | number | {
204
+ readonly [$$ScaleValue]: "space";
205
+ };
206
+ };
207
+ py: (value: string | number | {
208
+ readonly [$$ScaleValue]: "space";
209
+ }) => {
210
+ paddingTop: string | number | {
211
+ readonly [$$ScaleValue]: "space";
212
+ };
213
+ paddingBottom: string | number | {
214
+ readonly [$$ScaleValue]: "space";
215
+ };
216
+ };
217
+ m: (value: string | number | {
218
+ readonly [$$ScaleValue]: "space";
219
+ }) => {
220
+ margin: string | number | {
221
+ readonly [$$ScaleValue]: "space";
222
+ };
223
+ };
224
+ mt: (value: string | number | {
225
+ readonly [$$ScaleValue]: "space";
226
+ }) => {
227
+ marginTop: string | number | {
228
+ readonly [$$ScaleValue]: "space";
229
+ };
230
+ };
231
+ mr: (value: string | number | {
232
+ readonly [$$ScaleValue]: "space";
233
+ }) => {
234
+ marginRight: string | number | {
235
+ readonly [$$ScaleValue]: "space";
236
+ };
237
+ };
238
+ mb: (value: string | number | {
239
+ readonly [$$ScaleValue]: "space";
240
+ }) => {
241
+ marginBottom: string | number | {
242
+ readonly [$$ScaleValue]: "space";
243
+ };
244
+ };
245
+ ml: (value: string | number | {
246
+ readonly [$$ScaleValue]: "space";
247
+ }) => {
248
+ marginLeft: string | number | {
249
+ readonly [$$ScaleValue]: "space";
250
+ };
251
+ };
252
+ mx: (value: string | number | {
253
+ readonly [$$ScaleValue]: "space";
254
+ }) => {
255
+ marginLeft: string | number | {
256
+ readonly [$$ScaleValue]: "space";
257
+ };
258
+ marginRight: string | number | {
259
+ readonly [$$ScaleValue]: "space";
260
+ };
261
+ };
262
+ my: (value: string | number | {
263
+ readonly [$$ScaleValue]: "space";
264
+ }) => {
265
+ marginTop: string | number | {
266
+ readonly [$$ScaleValue]: "space";
267
+ };
268
+ marginBottom: string | number | {
269
+ readonly [$$ScaleValue]: "space";
270
+ };
271
+ };
272
+ }>>;
273
+ export declare const TriggerListWrapper: React.FC<ListProps>;
274
+ export {};
@@ -0,0 +1 @@
1
+ const e=["children","theme","appearance","enableTabScrolling"];import{List as t}from"@radix-ui/react-tabs";import r,{useRef as o,useState as i,useCallback as l,useEffect as n}from"react";import{ChevronLeft as s,ChevronRight as a}from"@atom-learning/icons";import{opacify as c}from"polished";import{debounce as m}from"throttle-debounce";import{theme as p,styled as f}from"../../stitches.js";import{ActionIcon as h}from"../action-icon/ActionIcon.js";import{Flex as d}from"../flex/Flex.js";import{Icon as b}from"../icon/Icon.js";import{TabTrigger as u}from"./TabTrigger.js";import{passPropsToChildren as g}from"./utils.js";const v=f(h,{position:"absolute",transition:"all 125ms",variants:{theme:{light:{bg:`${c(-.2,"white")} !important`},dark:{bg:`${c(-.2,p.colors.primaryDark.value)} !important`,color:"currentColor !important"}},visible:{true:{opacity:1,visibility:"visible",pointerEvents:"all"},false:{opacity:0,visibility:"hidden",pointerEvents:"none"}}}}),x=f(t,{flexShrink:0,display:"flex",width:"100%",overflowX:"auto","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none",variants:{theme:{light:{borderBottom:"1px solid $tonal300"},dark:{bg:"$primaryDark",borderBottom:"1px solid $tonal200"}},appearance:{uppercase:{textTransform:"uppercase"}}}}),E=t=>{let{children:c,theme:p,appearance:f,enableTabScrolling:h}=t,E=function(e,t){if(null==e)return{};var r,o,i={},l=Object.keys(e);for(o=0;o<l.length;o++)r=l[o],t.indexOf(r)>=0||(i[r]=e[r]);return i}(t,e);const w=o(null),[j,k]=i(!1),[y,W]=i(!1),[z,L]=i(),T=l((e=>{const t=w.current;if(t){const{scrollWidth:r,scrollLeft:o}=t,i=Math.round(r/4);let l=o;if("right"===e){const e=t.scrollLeft+i;l=e<=r?e:o}else{const e=o-i;l=e>0?e:0}t.scroll({left:l,behavior:"smooth"}),setTimeout((()=>{const{scrollWidth:e,scrollLeft:r,offsetWidth:o}=t;0===r?(k(!1),W(!0)):r+o===e?(W(!1),k(!0)):(k(!0),W(!0))}),500)}}),[]);n((()=>{const e=m(500,(()=>{L(window.innerWidth)}));return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),n((()=>{const e=w.current;if(e){const{offsetWidth:t,scrollWidth:r}=e,o=r>t;null==e.scroll||e.scroll({left:0}),k(!1),W(o)}}),[z]);return j||y||h?r.createElement(d,{css:{position:"relative"}},r.createElement(v,{size:"xl",label:"Scroll Left",theme:p,onClick:()=>T("left"),visible:j,css:{left:0}},r.createElement(b,{is:s,size:"lg"})),r.createElement(x,Object.assign({},E,{ref:w,appearance:f,theme:p}),g(c,{theme:p},[u])),r.createElement(v,{size:"xl",label:"Scroll right",theme:p,onClick:()=>T("right"),visible:y,css:{right:0}},r.createElement(b,{is:a,size:"lg"}))):r.createElement(x,Object.assign({theme:p},E,{appearance:f,ref:w}),g(c,{theme:p},[u]))};export{E as TriggerListWrapper};
@@ -0,0 +1,2 @@
1
+ import { JSXElementConstructor } from 'react';
2
+ export declare const passPropsToChildren: (children: any, props: Record<string, any>, allowedChildNodeTypes?: JSXElementConstructor<any>[]) => any;
@@ -0,0 +1 @@
1
+ function t(){return(t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}import e from"react";const n=(n,r,o=[])=>e.Children.map(n,(n=>e.isValidElement(n)&&o.includes(null==n?void 0:n.type)?e.cloneElement(n,t({},r)):n));export{n as passPropsToChildren};
@@ -1 +1 @@
1
- const t=["size"];function e(){return(e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t}).apply(this,arguments)}import{forwardRef as i,createElement as r}from"react";import{styled as n}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import{capsize as s}from"../../utilities/style/capsize.js";import"polished";import"../../utilities/style/keyframe-animations.js";const o=({applyCapsize:t=!0}={})=>({xs:e({fontSize:"$xs",lineHeight:1.6},t?s(.4364):{}),sm:e({fontSize:"$sm",lineHeight:1.53},t?s(.4056):{}),md:e({fontSize:"$md",lineHeight:1.5},t?s(.3864):{}),lg:e({fontSize:"$lg",lineHeight:1.52},t?s(.3983):{}),xl:e({fontSize:"$xl",lineHeight:1.42},t?s(.3506):{})}),l=n("p",{color:"$tonal600",fontFamily:"$body",fontWeight:400,margin:0,variants:{size:o()}}),a=i(((e,i)=>{let{size:n="md"}=e,s=function(t,e){if(null==t)return{};var i,r,n={},s=Object.keys(t);for(r=0;r<s.length;r++)i=s[r],e.indexOf(i)>=0||(n[i]=t[i]);return n}(e,t);return r(l,Object.assign({size:n},s,{ref:i}))}));a.displayName="Text";export{l as StyledParagraph,a as Text,o as textVariantSize};
1
+ const e=["size"];function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e}).apply(this,arguments)}import{forwardRef as i,createElement as r}from"react";import{styled as n}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import{capsize as s}from"../../utilities/style/capsize.js";import"polished";import"../../utilities/style/keyframe-animations.js";const o=({applyCapsize:e=!0}={})=>({xs:t({fontSize:"$xs",lineHeight:1.6},e?s(.4364):{}),sm:t({fontSize:"$sm",lineHeight:1.53},e?s(.4056):{}),md:t({fontSize:"$md",lineHeight:1.5},e?s(.3864):{}),lg:t({fontSize:"$lg",lineHeight:1.52},e?s(.3983):{}),xl:t({fontSize:"$xl",lineHeight:1.42},e?s(.3506):{})}),l=n("p",{color:"$tonal600",fontFamily:"$body",fontWeight:400,margin:0,"& > &":{"&:before, &:after":{display:"none"}},variants:{size:o()}}),a=i(((t,i)=>{let{size:n="md"}=t,s=function(e,t){if(null==e)return{};var i,r,n={},s=Object.keys(e);for(r=0;r<s.length;r++)i=s[r],t.indexOf(i)>=0||(n[i]=e[i]);return n}(t,e);return r(l,Object.assign({size:n},s,{ref:i}))}));a.displayName="Text";export{l as StyledParagraph,a as Text,o as textVariantSize};