@atom-learning/components 2.28.1 → 2.28.3-beta.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 (44) hide show
  1. package/CHANGELOG.md +0 -7
  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 +5 -4
  5. package/dist/components/accordion/AccordionTrigger.js +1 -1
  6. package/dist/components/data-table/DataTable.js +1 -1
  7. package/dist/components/data-table/drag-and-drop/DragAndDropContainer.d.ts +3 -0
  8. package/dist/components/data-table/drag-and-drop/DragAndDropContainer.js +1 -1
  9. package/dist/components/data-table/drag-and-drop/DraggableRow.js +1 -1
  10. package/dist/components/data-table/drag-and-drop/index.d.ts +1 -1
  11. package/dist/components/tabs/Tabs.d.ts +7 -276
  12. package/dist/components/tabs/Tabs.js +1 -1
  13. package/dist/components/tabs/TabsContent.d.ts +267 -0
  14. package/dist/components/tabs/TabsContent.js +1 -0
  15. package/dist/components/tabs/{TabTrigger.d.ts → TabsTrigger.d.ts} +3 -6
  16. package/dist/components/tabs/TabsTrigger.js +1 -0
  17. package/dist/components/tabs/TabsTriggerList.d.ts +5 -9
  18. package/dist/components/tabs/TabsTriggerList.js +1 -1
  19. package/dist/components/top-bar/TopBar.js +1 -1
  20. package/dist/docgen.json +1 -1
  21. package/dist/docs/Accordion.mdx +56 -7
  22. package/dist/docs/README.mdx +79 -0
  23. package/dist/docs/Tabs.mdx +31 -57
  24. package/dist/experiments/color-scheme/ColorScheme.d.ts +41 -0
  25. package/dist/experiments/color-scheme/ColorScheme.js +1 -0
  26. package/dist/experiments/color-scheme/blue.json.js +1 -0
  27. package/dist/experiments/color-scheme/generateAlphaColors.d.ts +1 -0
  28. package/dist/experiments/color-scheme/generateAlphaColors.js +1 -0
  29. package/dist/experiments/color-scheme/index.d.ts +1 -0
  30. package/dist/experiments/color-scheme/slate.json.js +1 -0
  31. package/dist/experiments/color-scheme/stitches.colorscheme.config.d.ts +140 -0
  32. package/dist/experiments/color-scheme/stitches.colorscheme.config.js +1 -0
  33. package/dist/index.cjs.js +1 -1
  34. package/dist/utilities/hooks/useCallbackRef.js +1 -1
  35. package/dist/utilities/hooks/useScrollPosition.d.ts +6 -3
  36. package/dist/utilities/hooks/useScrollPosition.js +1 -1
  37. package/dist/utilities/hooks/useWindowScrollPosition.d.ts +6 -0
  38. package/dist/utilities/hooks/useWindowScrollPosition.js +1 -0
  39. package/dist/utilities/hooks/useWindowSize.d.ts +8 -0
  40. package/dist/utilities/hooks/useWindowSize.js +1 -0
  41. package/package.json +3 -2
  42. package/dist/components/tabs/TabTrigger.js +0 -1
  43. package/dist/components/tabs/utils.d.ts +0 -2
  44. package/dist/components/tabs/utils.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,10 +1,3 @@
1
- ## [2.28.1](https://github.com/Atom-Learning/components/compare/v2.28.0...v2.28.1) (2023-01-18)
2
-
3
-
4
- ### Bug Fixes
5
-
6
- * added back theme for list ([b0c413e](https://github.com/Atom-Learning/components/commit/b0c413e25e2d4561b5ba497c9e1e0627486028e9))
7
-
8
1
  # [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.4.0) (2022-04-11)
9
2
 
10
3
 
@@ -1 +1 @@
1
- import{Content as i}from"@radix-ui/react-accordion";import t from"react";import{keyframes as e,styled as n}from"../../stitches.js";import{CSSWrapper as c}from"../../utilities/css-wrapper/CSSWrapper.js";const d=e({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),m=e({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),s=n(i,{border:0,width:"100%",bg:"#fff",'&[data-state="open"]':{borderRadius:"0 0 $0 $0"},"@allowMotion":{'&[data-state="open"]':{animation:`${d} 300ms ease-out`},'&[data-state="closed"]':{animation:`${m} 300ms ease-out`}}}),h=({children:o,css:a,...r})=>t.createElement(s,{...r},t.createElement(c,{css:a},o));export{h as AccordionContent};
1
+ import{Content as n}from"@radix-ui/react-accordion";import t from"react";import{keyframes as o,styled as i}from"../../stitches.js";import{CSSWrapper as d}from"../../utilities/css-wrapper/CSSWrapper.js";const c=o({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),s=o({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),m=i(n,{border:0,width:"100%",bg:"$background",overflow:"hidden",'&[data-state="open"]':{borderRadius:"0 0 $0 $0"},"@allowMotion":{'&[data-state="open"]':{animation:`${c} 300ms ease-out`},'&[data-state="closed"]':{animation:`${s} 300ms ease-out`}}}),h=({children:e,css:r,...a})=>t.createElement(m,{...a},t.createElement(d,{css:r},e));export{h as AccordionContent};
@@ -1 +1 @@
1
- import{Item as r}from"@radix-ui/react-accordion";import m from"react";import{styled as d}from"../../stitches.js";const l=d(r,{width:"100%",overflow:"hidden","&:not(:last-child)":{mb:"$1"}}),i=({children:t,value:e,...o})=>m.createElement(l,{value:e,...o},t);export{i as AccordionItem};
1
+ import{Item as m}from"@radix-ui/react-accordion";import r from"react";import{styled as l}from"../../stitches.js";const c=l(m,{width:"100%","&:not(:last-child)":{mb:"$1"}}),i=({children:t,value:e,...o})=>r.createElement(c,{value:e,...o},t);export{i as AccordionItem};
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
- declare const StyledTrigger: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-accordion").AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>>, {
3
- theme?: "primaryDark" | "light" | "tonal" | undefined;
4
- }, {
2
+ import { ColorScheme } from '../../experiments/color-scheme';
3
+ declare const StyledTrigger: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-accordion").AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>>, {}, {
5
4
  sm: string;
6
5
  md: string;
7
6
  lg: string;
@@ -267,6 +266,8 @@ declare const StyledTrigger: import("@stitches/react/types/styled-component").St
267
266
  };
268
267
  };
269
268
  }>>;
270
- declare type AccordionTriggerProps = React.ComponentProps<typeof StyledTrigger>;
269
+ declare type AccordionTriggerProps = React.ComponentProps<typeof StyledTrigger> & {
270
+ colorScheme?: typeof ColorScheme;
271
+ };
271
272
  export declare const AccordionTrigger: React.FC<AccordionTriggerProps>;
272
273
  export {};
@@ -1 +1 @@
1
- import{ChevronDown as s}from"@atom-learning/icons";import{Trigger as l}from"@radix-ui/react-accordion";import{darken as r}from"color2k";import n from"react";import{styled as i,theme as f}from"../../stitches.js";import{Icon as d}from"../icon/Icon.js";const a=(t,e,o,m="#fff")=>({bg:t,color:m,"&[disabled]":{bg:"$tonal100",cursor:"not-allowed",color:"$tonal400"},"&:not([disabled]):hover":{bg:e},"&:not([disabled]):active":{bg:o}}),p=i(d,{transition:"transform 300ms",'[data-state="open"] > &':{transform:"rotate(180deg)"},'[data-state="closed"] > &':{transform:"rotate(0deg)"}}),c=i(l,{border:0,py:"$3",px:"$4",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",'&[data-state="open"]':{borderRadius:"$0 $0 0 0"},'&[data-state="closed"]':{borderRadius:"$0"},variants:{theme:{primaryDark:a("$primaryDark",r(f.colors.primaryDark.value,.1),r(f.colors.primaryDark.value,.15)),light:a("#fff",r("#fff",.1),r("#fff",.15),"$tonal600"),tonal:a("$tonal100",r("#fff",.1),r("#fff",.15),"$tonal500")}}}),g=({theme:t="primaryDark",children:e,...o})=>n.createElement(c,{theme:t,...o},e,n.createElement(p,{is:s}));export{g as AccordionTrigger};
1
+ import{ChevronDown as i}from"@atom-learning/icons";import{Trigger as s}from"@radix-ui/react-accordion";import e from"react";import{styled as t}from"../../stitches.js";import{Icon as n}from"../icon/Icon.js";import{focusVisibleStyleBlock as c}from"../../utilities/style/focus-visible-style-block.js";import{ColorScheme as d}from"../../experiments/color-scheme/ColorScheme.js";const l=t(n,{transition:"transform 300ms",'[data-state="open"] > &':{transform:"rotate(180deg)"},'[data-state="closed"] > &':{transform:"rotate(0deg)"}}),m=t(s,{border:0,py:"$3",px:"$4",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",bg:"$interactive2",color:"$interactiveForeground","&[data-disabled]":{opacity:.3,cursor:"not-allowed"},"&:not([data-disabled])":{"&:active, &:hover, &:focus-visible":{bg:"$interactive3"},"&:focus-visible":{...c()}},'&[data-state="open"]':{borderRadius:"$0 $0 0 0"},'&[data-state="closed"]':{borderRadius:"$0"}}),f=({children:o,colorScheme:r={},...a})=>e.createElement(d,{asChild:!0,accent:"slate",interactive:"loContrast1",...r},e.createElement(m,{...a},o,e.createElement(l,{is:i})));export{f as AccordionTrigger};
@@ -1 +1 @@
1
- import*as o from"react";import{DataTableBody as t}from"./DataTableBody.js";import{DataTableProvider as m}from"./DataTableContext.js";import{DataTableDataCell as e}from"./DataTableDataCell.js";import{DataTableError as l}from"./DataTableError.js";import{DataTableGlobalFilter as i}from"./DataTableGlobalFilter.js";import{DataTableHead as p}from"./DataTableHead.js";import{DataTableHeaderCell as b}from"./DataTableHeaderCell.js";import{DataTableLoading as D}from"./DataTableLoading.js";import{DataTableRow as T}from"./DataTableRow.js";import{DataTableTable as f}from"./DataTableTable.js";import"@dnd-kit/core";import"@dnd-kit/modifiers";import"@dnd-kit/sortable";import"../table/Table.js";import"@dnd-kit/utilities";import"@tanstack/react-table";import"./drag-and-drop/Handle.js";import{DragAndDropTable as d}from"./drag-and-drop/DragAndDropTable.js";import{Pagination as n}from"./pagination/Pagination.js";const a=r=>o.createElement(m,{...r});a.Body=t,a.DataCell=e,a.DragAndDropTable=d,a.Head=p,a.HeaderCell=b,a.Pagination=n,a.Row=T,a.GlobalFilter=i,a.Table=f,a.Loading=D,a.Error=l;export{a as DataTable};
1
+ import*as o from"react";import{DataTableBody as t}from"./DataTableBody.js";import{DataTableProvider as e}from"./DataTableContext.js";import{DataTableDataCell as m}from"./DataTableDataCell.js";import{DataTableError as l}from"./DataTableError.js";import{DataTableGlobalFilter as i}from"./DataTableGlobalFilter.js";import{DataTableHead as p}from"./DataTableHead.js";import{DataTableHeaderCell as b}from"./DataTableHeaderCell.js";import{DataTableLoading as D}from"./DataTableLoading.js";import{DataTableRow as T}from"./DataTableRow.js";import{DataTableTable as f}from"./DataTableTable.js";import"./drag-and-drop/DragAndDropContainer.js";import"../table/Table.js";import"@dnd-kit/utilities";import"@dnd-kit/sortable";import"@tanstack/react-table";import"./drag-and-drop/Handle.js";import{DragAndDropTable as d}from"./drag-and-drop/DragAndDropTable.js";import{Pagination as n}from"./pagination/Pagination.js";const a=r=>o.createElement(e,{...r});a.Body=t,a.DataCell=m,a.DragAndDropTable=d,a.Head=p,a.HeaderCell=b,a.Pagination=n,a.Row=T,a.GlobalFilter=i,a.Table=f,a.Loading=D,a.Error=l;export{a as DataTable};
@@ -1,6 +1,9 @@
1
1
  import type { TAsyncDataResult, TableData } from '../DataTable.types';
2
2
  import type { UniqueIdentifier } from '@dnd-kit/core';
3
3
  import * as React from 'react';
4
+ export declare const useDragAndDropTable: () => {
5
+ idColumn: string;
6
+ };
4
7
  declare type DragAndDropContainerProps = {
5
8
  idColumn?: string;
6
9
  onChange?: (oldIndex: number, newIndex: number, newData: TableData) => void;
@@ -1 +1 @@
1
- import{useDataTable as h}from"../DataTableContext.js";import{useSensors as D,useSensor as u,PointerSensor as f,KeyboardSensor as g,DndContext as y,closestCenter as C}from"@dnd-kit/core";import{restrictToVerticalAxis as S}from"@dnd-kit/modifiers";import{sortableKeyboardCoordinates as b,SortableContext as w,verticalListSortingStrategy as x,arrayMove as E}from"@dnd-kit/sortable";import*as c from"react";const p=(t,s,o,r,a)=>{const{active:i,over:d}=t,l=o.indexOf(i[r]),n=o.indexOf(d==null?void 0:d[r]),e=E(s.results,l,n);return a==null||a(l,n,e),{results:e,total:e.length}},m=(t,s)=>t.results.map(o=>{const r=o[s];if(r===void 0)throw new Error("To ensure drag-and-drop works correctly, please ensure that each row has a unique ID. Use the `id` property or pass DataTable an `idColumn` prop that defines the ID property on the rows.");return r}),T=({idColumn:t="id",onChange:s=void 0,children:o})=>{const{data:r,setData:a}=h(),i=c.useMemo(()=>m(r,t),[r]),d=D(u(f),u(g,{coordinateGetter:b}));return c.createElement(y,{sensors:d,collisionDetection:C,onDragEnd:l=>{const{active:n,over:e}=l;n.id&&(e==null?void 0:e.id)&&n.id!==(e==null?void 0:e.id)&&a(v=>p({active:n,over:e},v,i,t,s))},modifiers:[S]},c.createElement(w,{items:i,strategy:x},o))};export{T as DragAndDropContainer,m as getRowOrder,p as processDragEndEvent};
1
+ import{useDataTable as g}from"../DataTableContext.js";import{useSensors as h,useSensor as u,PointerSensor as C,KeyboardSensor as f,DndContext as b,closestCenter as w}from"@dnd-kit/core";import{restrictToVerticalAxis as y}from"@dnd-kit/modifiers";import{sortableKeyboardCoordinates as x,SortableContext as E,verticalListSortingStrategy as S,arrayMove as T}from"@dnd-kit/sortable";import*as a from"react";const p=a.createContext({idColumn:"id"}),A=()=>{const e=a.useContext(p);if(!e)throw new Error("useDragAndDropTable can only be called within a DragAndDropContainer");return e},m=(e,i,o,t,s)=>{const{active:d,over:l}=e,c=o.indexOf(d.id),n=o.indexOf(l==null?void 0:l.id),r=T(i.results,c,n);return s==null||s(c,n,r),{results:r,total:r.length}},D=(e,i)=>e.results.map(o=>{const t=o[i];if(t===void 0)throw new Error("To ensure drag-and-drop works correctly, please ensure that each row has a unique ID. Use the `id` property or pass DataTable an `idColumn` prop that defines the ID property on the rows.");return t}),O=({idColumn:e="id",onChange:i=void 0,children:o})=>{const{data:t,setData:s}=g(),d=a.useMemo(()=>D(t,e),[t]),l=h(u(C),u(f,{coordinateGetter:x}));return a.createElement(b,{sensors:l,collisionDetection:w,onDragEnd:c=>{const{active:n,over:r}=c;n.id&&(r==null?void 0:r.id)&&n.id!==(r==null?void 0:r.id)&&s(v=>m({active:n,over:r},v,d,e,i))},modifiers:[y]},a.createElement(E,{items:d,strategy:S},a.createElement(p.Provider,{value:{idColumn:e}},o)))};export{O as DragAndDropContainer,D as getRowOrder,m as processDragEndEvent,A as useDragAndDropTable};
@@ -1 +1 @@
1
- import*as e from"react";import{Table as i}from"../../table/Table.js";import{DataTableDataCell as p}from"../DataTableDataCell.js";import"../DataTableContext.js";import"@dnd-kit/core";import"@dnd-kit/modifiers";import{useSortable as f}from"@dnd-kit/sortable";import{CSS as c}from"@dnd-kit/utilities";import{flexRender as d}from"@tanstack/react-table";import{Handle as g}from"./Handle.js";import"../DataTable.js";import"../DataTable.types.js";import"../DataTableLoading.js";const b=({row:t})=>{const{attributes:l,listeners:m,transform:a,setNodeRef:n,isDragging:o}=f({id:t.original.id});return e.createElement(i.Row,{ref:n,css:{transform:c.Transform.toString(a),zIndex:o?5:void 0}},t.getVisibleCells().map((r,s)=>s===0?e.createElement(i.Cell,{key:r.id},e.createElement(g,{...l,...m,isDragging:o,css:{display:"inline-block"},label:"drag and drop"}),d(r.column.columnDef.cell,r.getContext())):e.createElement(p,{key:r.id,cell:r})))};export{b as DraggableRow};
1
+ import*as e from"react";import{Table as l}from"../../table/Table.js";import{DataTableDataCell as f}from"../DataTableDataCell.js";import{useDragAndDropTable as d}from"./DragAndDropContainer.js";import{CSS as g}from"@dnd-kit/utilities";import{useSortable as c}from"@dnd-kit/sortable";import{flexRender as b}from"@tanstack/react-table";import{Handle as D}from"./Handle.js";import"../DataTable.js";import"../DataTable.types.js";import"../DataTableContext.js";import"../DataTableLoading.js";const u=({row:t})=>{const{idColumn:i}=d(),{attributes:m,listeners:a,transform:n,setNodeRef:s,isDragging:o}=c({id:t.original[i]});return e.createElement(l.Row,{ref:s,css:{transform:g.Transform.toString(n),zIndex:o?5:void 0}},t.getVisibleCells().map((r,p)=>p===0?e.createElement(l.Cell,{key:r.id},e.createElement(D,{...m,...a,isDragging:o,css:{display:"inline-block"},label:"drag and drop"}),b(r.column.columnDef.cell,r.getContext())):e.createElement(f,{key:r.id,cell:r})))};export{u as DraggableRow};
@@ -1,4 +1,4 @@
1
- export { DragAndDropContainer } from './DragAndDropContainer';
1
+ export { useDragAndDropTable, DragAndDropContainer } from './DragAndDropContainer';
2
2
  export { DraggableRow } from './DraggableRow';
3
3
  export { Handle } from './Handle';
4
4
  export { DragAndDropTable } from './DragAndDropTable';
@@ -1,278 +1,9 @@
1
1
  import * as React from 'react';
2
- import { TriggerListWrapper } from './TabsTriggerList';
3
- import { TabTrigger } from './TabTrigger';
2
+ import { TabsTriggerList } from './TabsTriggerList';
3
+ import { TabsTrigger } from './TabsTrigger';
4
+ import { TabsContent } from './TabsContent';
4
5
  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;
7
- }, {
8
- sm: string;
9
- md: string;
10
- lg: string;
11
- xl: string;
12
- reducedMotion: string;
13
- allowMotion: string;
14
- hover: string;
15
- }, import("@stitches/react/types/css-util").CSS<{
16
- sm: string;
17
- md: string;
18
- lg: string;
19
- xl: string;
20
- reducedMotion: string;
21
- allowMotion: string;
22
- hover: string;
23
- }, {
24
- colors: {
25
- textForeground: any;
26
- textSubtle: any;
27
- textPlaceholder: any;
28
- background: any;
29
- backgroundAccent: any;
30
- tonal50: any;
31
- tonal100: any;
32
- tonal200: any;
33
- tonal300: any;
34
- tonal400: any;
35
- tonal500: any;
36
- tonal600: any;
37
- alpha100: any;
38
- alpha150: any;
39
- alpha200: any;
40
- alpha250: any;
41
- alpha600: any;
42
- primaryLight: any;
43
- primary: any;
44
- primaryMid: any;
45
- primaryDark: any;
46
- secondary: any;
47
- brandRed: any;
48
- brandRedAccent: any;
49
- brandGreen: any;
50
- brandGreenAccent: any;
51
- brandPurple: any;
52
- brandPurpleAccent: any;
53
- brandYellow: any;
54
- brandYellowAccent: any;
55
- successLight: any;
56
- success: any;
57
- successMid: any;
58
- successDark: any;
59
- dangerLight: any;
60
- danger: any;
61
- dangerMid: any;
62
- dangerDark: any;
63
- warningLight: any;
64
- warning: any;
65
- warningMid: any;
66
- warningDark: any;
67
- warningText: 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
- declare const StyledTabContent: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsContentProps & React.RefAttributes<HTMLDivElement>>, {
274
- theme?: "dark" | "light" | undefined;
275
- }, {
6
+ declare const StyledRoot: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsProps & React.RefAttributes<HTMLDivElement>>, {}, {
276
7
  sm: string;
277
8
  md: string;
278
9
  lg: string;
@@ -539,8 +270,8 @@ declare const StyledTabContent: import("@stitches/react/types/styled-component")
539
270
  };
540
271
  }>>;
541
272
  export declare const Tabs: React.FC<TabsProps> & {
542
- TriggerList: typeof TriggerListWrapper;
543
- Trigger: typeof TabTrigger;
544
- Content: typeof StyledTabContent;
273
+ TriggerList: typeof TabsTriggerList;
274
+ Trigger: typeof TabsTrigger;
275
+ Content: typeof TabsContent;
545
276
  };
546
277
  export {};
@@ -1 +1 @@
1
- import{Root as l,Content as n}from"@radix-ui/react-tabs";import*as p from"react";import{styled as e}from"../../stitches.js";import{TriggerListWrapper as o}from"./TabsTriggerList.js";import{TabTrigger as s}from"./TabTrigger.js";import{passPropsToChildren as g}from"./utils.js";const h=e(l,{display:"flex",flexDirection:"column",variants:{theme:{light:{color:"$primary"},dark:{color:"white"}}}}),i=e(n,{flexGrow:1,fontFamily:"$body",variants:{theme:{light:{color:"$textForeground"},dark:{bg:"$primaryDark",color:"white"}}}}),r=({theme:t="light",children:m,...a})=>p.createElement(h,{theme:t,...a},g(m,{theme:t},[o,i]));r.TriggerList=o,r.Trigger=s,r.Content=i,r.displayName="Tabs";export{r as Tabs};
1
+ import{Root as i}from"@radix-ui/react-tabs";import*as e from"react";import{styled as m}from"../../stitches.js";import{TabsTriggerList as s}from"./TabsTriggerList.js";import{TabsTrigger as a}from"./TabsTrigger.js";import{TabsContent as g}from"./TabsContent.js";const T=m(i,{width:"100%"}),r=({children:t,...o})=>e.createElement(T,{...o},t);r.TriggerList=s,r.Trigger=a,r.Content=g,r.displayName="Tabs";export{r as Tabs};
@@ -0,0 +1,267 @@
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
+ }>>;
@@ -0,0 +1 @@
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};