@atom-learning/components 1.16.3 → 1.17.2-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 (41) hide show
  1. package/dist/components/accordion/Accordion.d.ts +3 -2
  2. package/dist/components/accordion/Accordion.js +1 -1
  3. package/dist/components/button/Button.d.ts +1 -1
  4. package/dist/components/button/Button.js +1 -1
  5. package/dist/components/dialog/Dialog.d.ts +2 -0
  6. package/dist/components/dialog/Dialog.js +1 -1
  7. package/dist/components/dialog/DialogBackground.d.ts +529 -0
  8. package/dist/components/dialog/DialogBackground.js +1 -0
  9. package/dist/components/dialog/DialogContent.js +1 -1
  10. package/dist/components/divider/Divider.d.ts +1 -2
  11. package/dist/components/divider/Divider.js +1 -1
  12. package/dist/components/heading/Heading.d.ts +1 -1
  13. package/dist/components/heading/Heading.js +1 -1
  14. package/dist/components/image/Image.d.ts +1 -1
  15. package/dist/components/image/Image.js +1 -1
  16. package/dist/components/index.d.ts +1 -0
  17. package/dist/components/link/Link.js +1 -1
  18. package/dist/components/list/List.d.ts +4 -3
  19. package/dist/components/list/List.js +1 -1
  20. package/dist/components/markdown-content/components/MarkdownEmphasis.js +1 -1
  21. package/dist/components/markdown-content/components/MarkdownStrong.js +1 -1
  22. package/dist/components/stack/Stack.d.ts +5 -5
  23. package/dist/components/stack/Stack.js +1 -1
  24. package/dist/components/stack-content/StackContent.js +1 -1
  25. package/dist/components/text/Text.d.ts +2 -2
  26. package/dist/components/text/Text.js +1 -1
  27. package/dist/components/toggle-group/ToggleGroupButton.d.ts +534 -0
  28. package/dist/components/toggle-group/ToggleGroupButton.js +1 -0
  29. package/dist/components/toggle-group/ToggleGroupItem.d.ts +532 -0
  30. package/dist/components/toggle-group/ToggleGroupItem.js +1 -0
  31. package/dist/components/toggle-group/ToggleGroupRoot.d.ts +280 -0
  32. package/dist/components/toggle-group/ToggleGroupRoot.js +1 -0
  33. package/dist/components/toggle-group/index.d.ts +1351 -0
  34. package/dist/components/toggle-group/index.js +1 -0
  35. package/dist/docgen.json +1 -1
  36. package/dist/docs/Dialog.mdx +19 -0
  37. package/dist/index.cjs.js +1 -1
  38. package/dist/index.js +1 -1
  39. package/dist/utilities/style/focus-visible-style-block.js +1 -0
  40. package/package.json +1 -1
  41. package/CHANGELOG.md +0 -208
@@ -53,6 +53,7 @@ export { Text } from './text';
53
53
  export { Textarea } from './textarea';
54
54
  export { TextareaField } from './textarea-field';
55
55
  export { ToastProvider, toast } from './toast';
56
+ export { ToggleGroup } from './toggle-group';
56
57
  export { Tooltip } from './tooltip';
57
58
  export { ValidationError } from './validation-error';
58
59
  export { Video } from './video';
@@ -1 +1 @@
1
- import{forwardRef as d,createElement as n}from"react";import{styled as l}from"../../stitches.js";import{StyledHeading as c}from"../heading/Heading.js";import{StyledLi as p}from"../list/List.js";import{StyledParagraph as y,textVariantSize as f}from"../text/Text.js";const t=l("a",{bg:"unset",border:"unset",p:"unset",color:"$primary",cursor:"pointer",fontFamily:"$body",textDecoration:"none","&:focus, &:hover":{color:"$primaryMid",textDecoration:"underline"},"&:active":{color:"$primaryDark"},[`${y} > &, ${c} > &, ${p} > &`]:{fontSize:"100%",lineHeight:1,"&::before, &::after":{content:"none"}},variants:{size:f()}}),a=d(({size:o="md",onClick:m,href:r,...e},i)=>r?n(t,{size:o,...e,ref:i,href:r}):n(t,{as:"button",size:o,...e,ref:i,onClick:m}));a.displayName="Link";export{a as Link,t as StyledLink};
1
+ import{forwardRef as d,createElement as n}from"react";import{styled as l}from"../../stitches.js";import{StyledHeading as c}from"../heading/Heading.js";import{StyledLi as p}from"../list/List.js";import{StyledText as y,textVariantSize as f}from"../text/Text.js";const t=l("a",{bg:"unset",border:"unset",p:"unset",color:"$primary",cursor:"pointer",fontFamily:"$body",textDecoration:"none","&:focus, &:hover":{color:"$primaryMid",textDecoration:"underline"},"&:active":{color:"$primaryDark"},[`${y} > &, ${c} > &, ${p} > &`]:{fontSize:"100%",lineHeight:1,"&::before, &::after":{content:"none"}},variants:{size:f()}}),a=d(({size:o="md",onClick:m,href:e,...r},i)=>e?n(t,{size:o,...r,ref:i,href:e}):n(t,{as:"button",size:o,...r,ref:i,onClick:m}));a.displayName="Link";export{a as Link,t as StyledLink};
@@ -264,7 +264,7 @@ export declare const StyledLi: import("@stitches/react/types/styled-component").
264
264
  };
265
265
  };
266
266
  }>>;
267
- declare const StyledList: import("@stitches/react/types/styled-component").StyledComponent<"ul", {
267
+ export declare const StyledList: import("@stitches/react/types/styled-component").StyledComponent<"ul", {
268
268
  size?: ("sm" | "md" | "lg" | "xl" | "xs") | undefined;
269
269
  as?: "ol" | "ul" | undefined;
270
270
  }, {
@@ -532,10 +532,11 @@ declare const StyledList: import("@stitches/react/types/styled-component").Style
532
532
  };
533
533
  };
534
534
  }>>;
535
- declare type ListProps = React.ComponentProps<typeof StyledList> & {
535
+ declare type ListPropsType = React.ComponentPropsWithRef<typeof StyledList> & {
536
536
  ordered?: boolean;
537
537
  };
538
- export declare const List: React.FC<ListProps> & {
538
+ declare type ListType = React.ForwardRefExoticComponent<ListPropsType> & {
539
539
  Item: typeof StyledLi;
540
540
  };
541
+ export declare const List: ListType;
541
542
  export {};
@@ -1 +1 @@
1
- import{createElement as m}from"react";import{styled as l}from"../../stitches.js";import{textVariantSize as a}from"../text/Text.js";const t=l("li",{}),n=l("ul",{fontFamily:"$body",m:"unset",p:"unset",[`& > ${t}`]:{"&:not(:last-child)":{mb:"$2"},"&:last-child":{mb:0}},variants:{size:a({applyCapsize:!1}),as:{ol:{pl:"$4",listStyle:"decimal",[`& > ${t}`]:{pl:"$1","&::marker":{fontSize:"$sm",fontWeight:"bold"}}},ul:{pl:"$3",[`& > ${t}`]:{pl:"$2","&::marker":{content:"\u2022",fontWeight:"bold"}}}}}}),e=({size:o="md",ordered:i,...s})=>m(n,{as:i?"ol":"ul",size:o,...s});e.Item=t;export{e as List,t as StyledLi};
1
+ import{forwardRef as r,createElement as n}from"react";import{styled as l}from"../../stitches.js";import{textVariantSize as p}from"../text/Text.js";const t=l("li",{}),e=l("ul",{fontFamily:"$body",m:"unset",p:"unset",[`& > ${t}`]:{"&:not(:last-child)":{mb:"$2"},"&:last-child":{mb:0}},variants:{size:p({applyCapsize:!1}),as:{ol:{pl:"$4",listStyle:"decimal",[`& > ${t}`]:{pl:"$1","&::marker":{fontSize:"$sm",fontWeight:"bold"}}},ul:{pl:"$3",[`& > ${t}`]:{pl:"$2","&::marker":{content:"\u2022",fontWeight:"bold"}}}}}}),o=r(({size:i="md",ordered:s,...a},m)=>n(e,{ref:m,as:s?"ol":"ul",size:i,...a}));o.Item=t;export{o as List,t as StyledLi,e as StyledList};
@@ -1 +1 @@
1
- import{createElement as l}from"react";import{styled as o}from"../../../stitches.js";const m=o("em",{fontStyle:"italic"}),n=({node:e,handleNode:r})=>{var t;return l(m,null,(t=e.children)==null?void 0:t.map(r))};export{n as MarkdownEmphasis};
1
+ import{createElement as o}from"react";import{styled as l}from"../../../stitches.js";const n=l("em",{fontStyle:"italic"}),a=({node:r,handleNode:e})=>{var t;return o(n,null,(t=r.children)==null?void 0:t.map(e))};export{a as MarkdownEmphasis};
@@ -1 +1 @@
1
- import{createElement as n}from"react";import{styled as e}from"../../../stitches.js";const l=e("strong",{fontWeight:600}),m=({node:r,handleNode:o})=>{var t;return n(l,null,(t=r.children)==null?void 0:t.map(o))};export{m as MarkdownStrong};
1
+ import{createElement as n}from"react";import{styled as e}from"../../../stitches.js";const l=e("strong",{fontWeight:600}),a=({node:t,handleNode:o})=>{var r;return n(l,null,(r=t.children)==null?void 0:r.map(o))};export{a as MarkdownStrong};
@@ -3,9 +3,9 @@ import { CSS } from '../../stitches';
3
3
  declare const StyledStack: import("@stitches/react/types/styled-component").StyledComponent<"div", {
4
4
  direction?: "row" | "column" | "row-reverse" | undefined;
5
5
  wrap?: "wrap" | "wrap-reverse" | "no-wrap" | undefined;
6
- justify?: "center" | "end" | "start" | undefined;
7
- align?: "center" | "end" | "start" | undefined;
8
- gap?: number | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | undefined;
6
+ justify?: boolean | "center" | "false" | "end" | "start" | undefined;
7
+ align?: boolean | "center" | "false" | "end" | "start" | undefined;
8
+ gap?: number | boolean | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "false" | undefined;
9
9
  }, {
10
10
  sm: string;
11
11
  md: string;
@@ -271,8 +271,8 @@ declare const StyledStack: import("@stitches/react/types/styled-component").Styl
271
271
  };
272
272
  };
273
273
  }>>;
274
- declare type StackProps = React.ComponentProps<typeof StyledStack> & {
274
+ declare type StackPropsType = React.ComponentProps<typeof StyledStack> & {
275
275
  css?: CSS;
276
276
  };
277
- export declare const Stack: React.FC<StackProps>;
277
+ export declare const Stack: React.FC<StackPropsType>;
278
278
  export {};
@@ -1 +1 @@
1
- import{createElement as n}from"react";import{theme as l,styled as i}from"../../stitches.js";import{CSSWrapper as f}from"../../utilities/css-wrapper/CSSWrapper.js";const m=Object.keys(l.space).reduce((t,e)=>({...t,[e]:{mt:`-$space$${e}`,ml:`-$space$${e}`,"& > *":{mt:`$space$${e}`,ml:`$space$${e}`}}}),{}),w=i("div",{display:"flex","& > *":{m:0},variants:{direction:{row:{flexDirection:"row"},"row-reverse":{flexDirection:"row-reverse"},column:{flexDirection:"column"}},wrap:{wrap:{flexWrap:"wrap"},"no-wrap":{flexWrap:"no-wrap"},"wrap-reverse":{flexWrap:"wrap-reverse"}},justify:{start:{justifyContent:"flex-start"},center:{justifyContent:"center"},end:{justifyContent:"flex-end"}},align:{start:{alignItems:"flex-start"},center:{alignItems:"center"},end:{alignItems:"flex-end"}},gap:m}}),s=({css:t,gap:e=2,direction:r="row",wrap:p="wrap",justify:o="start",align:a,...c})=>n(f,{css:t},n(w,{direction:r,gap:e,wrap:p,justify:o,align:typeof a=="undefined"&&r!=="column"?"center":a,...c}));s.displayName="Stack";export{s as Stack};
1
+ import{createElement as n}from"react";import{theme as c,styled as f}from"../../stitches.js";import{CSSWrapper as i}from"../../utilities/css-wrapper/CSSWrapper.js";const m=Object.keys(c.space).reduce((t,e)=>({...t,[e]:{mt:`-$space$${e}`,ml:`-$space$${e}`,"& > *":{mt:`$space$${e}`,ml:`$space$${e}`}}}),{}),w=f("div",{display:"flex","& > *":{m:0},variants:{direction:{row:{flexDirection:"row"},"row-reverse":{flexDirection:"row-reverse"},column:{flexDirection:"column"}},wrap:{wrap:{flexWrap:"wrap"},"no-wrap":{flexWrap:"no-wrap"},"wrap-reverse":{flexWrap:"wrap-reverse"}},justify:{start:{justifyContent:"flex-start"},center:{justifyContent:"center"},end:{justifyContent:"flex-end"},false:{}},align:{start:{alignItems:"flex-start"},center:{alignItems:"center"},end:{alignItems:"flex-end"},false:{}},gap:{...m,false:{}}}}),s=({css:t,gap:e=2,direction:r="row",wrap:p="wrap",justify:l="start",align:a,...o})=>n(i,{css:t},n(w,{direction:r,gap:e,wrap:p,justify:l,align:typeof a=="undefined"&&r!=="column"?"center":a,...o}));s.displayName="Stack";export{s as Stack};
@@ -1 +1 @@
1
- import{createElement as e,Children as a,isValidElement as p,cloneElement as s}from"react";import{styled as f}from"../../stitches.js";import{Divider as d}from"../divider/Divider.js";import{Heading as c}from"../heading/Heading.js";import{Image as l}from"../image/Image.js";import{List as k}from"../list/List.js";import"../markdown-content/components/MarkdownCode.js";import"../markdown-content/components/MarkdownEmphasis.js";import{MarkdownHeading as u}from"../markdown-content/components/MarkdownHeading.js";import"../markdown-content/components/MarkdownInlineCode.js";import{MarkdownImage as y}from"../markdown-content/components/MarkdownImage.js";import"../link/Link.js";import{MarkdownList as $}from"../markdown-content/components/MarkdownList.js";import{MarkdownParagraph as g}from"../markdown-content/components/MarkdownParagraph.js";import"../markdown-content/components/MarkdownStrong.js";import{MarkdownThematicBreak as w}from"../markdown-content/components/MarkdownThematicBreak.js";import{Text as C}from"../text/Text.js";const M=f("div",{}),m=(o,i)=>s(o,{css:{...i,...o.props.css?o.props.css:{}}}),n=({children:o,...i})=>e(M,{...i},a.map(o,r=>{if(!p(r))return r;const t=r==null?void 0:r.type;return t===c||t===u?m(r,{maxWidth:"65ch","&:not(:first-child)":{mt:"$5"},"&:not(:last-child)":{mb:"$5"}}):t===C||t===g||t===k||t===$?m(r,{maxWidth:"75ch","&:not(:last-child)":{mb:"$5"}}):t===d||t===w?m(r,{my:"$5"}):t===l||t===y?m(r,{display:"block","&:not(:first-child)":{mt:"$6"},"&:not(:last-child)":{mb:"$6"}}):r}));n.displayName="StackContent";export{n as StackContent};
1
+ import{forwardRef as i,createElement as d}from"react";import{styled as e}from"../../stitches.js";import{StyledDivider as l}from"../divider/Divider.js";import{StyledHeading as r}from"../heading/Heading.js";import{StyledImage as a}from"../image/Image.js";import{StyledList as c}from"../list/List.js";import{StyledText as n}from"../text/Text.js";const h=e("div",{[`& > ${r}`]:{maxWidth:"65ch","&:not(:first-child)":{mt:"$5"},"&:not(:last-child)":{mb:"$5"}},[`& > ${n}`]:{maxWidth:"75ch","&:not(:last-child)":{mb:"$5"}},[`& > ${c}`]:{maxWidth:"75ch","&:not(:last-child)":{mb:"$5"}},[`& > ${l}`]:{my:"$5"},[`& > ${a}`]:{display:"block","&:not(:first-child)":{mt:"$6"},"&:not(:last-child)":{mb:"$6"}}}),t=i((o,m)=>d(h,{ref:m,...o}));t.displayName="StackContent";export{t as StackContent};
@@ -5,7 +5,7 @@ declare type TextSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
5
5
  export declare const textVariantSize: ({ applyCapsize }?: {
6
6
  applyCapsize?: boolean | undefined;
7
7
  }) => Record<TextSizes, CSS>;
8
- export declare const StyledParagraph: import("@stitches/react/types/styled-component").StyledComponent<"p", {
8
+ export declare const StyledText: import("@stitches/react/types/styled-component").StyledComponent<"p", {
9
9
  size?: TextSizes | undefined;
10
10
  }, {
11
11
  sm: string;
@@ -272,7 +272,7 @@ export declare const StyledParagraph: import("@stitches/react/types/styled-compo
272
272
  };
273
273
  };
274
274
  }>>;
275
- declare type TextProps = Override<React.ComponentProps<typeof StyledParagraph>, {
275
+ declare type TextProps = Override<React.ComponentProps<typeof StyledText>, {
276
276
  as?: 'blockquote' | 'caption' | 'dd' | 'dt' | 'figcaption' | 'li' | 'p' | 'span' | 'legend' | React.ComponentType | React.ElementType;
277
277
  }>;
278
278
  export declare const Text: React.FC<TextProps>;
@@ -1 +1 @@
1
- import{forwardRef as f,createElement as l}from"react";import{styled as g}from"../../stitches.js";import{capsize as e}from"../../utilities/style/capsize.js";const i=({applyCapsize:t=!0}={})=>({xs:{fontSize:"$xs",lineHeight:1.6,...t?e(.4364):{}},sm:{fontSize:"$sm",lineHeight:1.53,...t?e(.4056):{}},md:{fontSize:"$md",lineHeight:1.5,...t?e(.3864):{}},lg:{fontSize:"$lg",lineHeight:1.52,...t?e(.3983):{}},xl:{fontSize:"$xl",lineHeight:1.42,...t?e(.3506):{}}}),o=g("p",{color:"$tonal600",fontFamily:"$body",fontWeight:400,margin:0,"& > &":{"&:before, &:after":{display:"none"}},variants:{size:i()}}),n=f(({size:t="md",...r},m)=>l(o,{size:t,...r,ref:m}));n.displayName="Text";export{o as StyledParagraph,n as Text,i as textVariantSize};
1
+ import{forwardRef as f,createElement as l}from"react";import{styled as d}from"../../stitches.js";import{capsize as e}from"../../utilities/style/capsize.js";const i=({applyCapsize:t=!0}={})=>({xs:{fontSize:"$xs",lineHeight:1.6,...t?e(.4364):{}},sm:{fontSize:"$sm",lineHeight:1.53,...t?e(.4056):{}},md:{fontSize:"$md",lineHeight:1.5,...t?e(.3864):{}},lg:{fontSize:"$lg",lineHeight:1.52,...t?e(.3983):{}},xl:{fontSize:"$xl",lineHeight:1.42,...t?e(.3506):{}}}),o=d("p",{color:"$tonal600",fontFamily:"$body",fontWeight:400,margin:0,"& > &":{"&:before, &:after":{display:"none"}},variants:{size:i()}}),n=f(({size:t="md",...r},m)=>l(o,{size:t,...r,ref:m}));n.displayName="Text";export{o as StyledText,n as Text,i as textVariantSize};
@@ -0,0 +1,534 @@
1
+ import * as React from 'react';
2
+ export declare const StyledButton: import("@stitches/react/types/styled-component").StyledComponent<import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-toggle-group").ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>>, {}, {
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
+ subjectEnglish: any;
63
+ subjectMaths: any;
64
+ subjectScience: any;
65
+ subjectVerbalReasoning: any;
66
+ subjectNonVerbalReasoning: any;
67
+ subjectCreativeWriting: any;
68
+ subjectExamSkills: any;
69
+ };
70
+ space: {
71
+ "0": any;
72
+ "1": any;
73
+ "2": any;
74
+ "3": any;
75
+ "4": any;
76
+ "5": any;
77
+ "6": any;
78
+ "7": any;
79
+ "8": any;
80
+ "9": any;
81
+ };
82
+ fontSizes: {
83
+ xs: any;
84
+ sm: any;
85
+ md: any;
86
+ lg: any;
87
+ xl: any;
88
+ "2xl": any;
89
+ "3xl": any;
90
+ "4xl": any;
91
+ };
92
+ fonts: {
93
+ sans: any;
94
+ mono: any;
95
+ display: any;
96
+ body: any;
97
+ };
98
+ sizes: {
99
+ "0": any;
100
+ "1": any;
101
+ "2": any;
102
+ "3": any;
103
+ "4": any;
104
+ "5": any;
105
+ "6": any;
106
+ "7": any;
107
+ "8": any;
108
+ };
109
+ radii: {
110
+ "0": any;
111
+ "1": any;
112
+ "2": any;
113
+ "3": any;
114
+ round: any;
115
+ };
116
+ shadows: {
117
+ "0": any;
118
+ "1": any;
119
+ "2": any;
120
+ "3": any;
121
+ };
122
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
123
+ bg: (value: {
124
+ readonly [$$PropertyValue]: "background";
125
+ }) => {
126
+ background: {
127
+ readonly [$$PropertyValue]: "background";
128
+ };
129
+ };
130
+ inset: (value: string | number | {
131
+ readonly [$$ScaleValue]: "space";
132
+ }) => {
133
+ top: string | number | {
134
+ readonly [$$ScaleValue]: "space";
135
+ };
136
+ right: string | number | {
137
+ readonly [$$ScaleValue]: "space";
138
+ };
139
+ bottom: string | number | {
140
+ readonly [$$ScaleValue]: "space";
141
+ };
142
+ left: string | number | {
143
+ readonly [$$ScaleValue]: "space";
144
+ };
145
+ };
146
+ size: (value: string | number | {
147
+ readonly [$$ScaleValue]: "size";
148
+ }) => {
149
+ height: string | number | {
150
+ readonly [$$ScaleValue]: "size";
151
+ };
152
+ width: string | number | {
153
+ readonly [$$ScaleValue]: "size";
154
+ };
155
+ };
156
+ p: (value: string | number | {
157
+ readonly [$$ScaleValue]: "space";
158
+ }) => {
159
+ padding: string | number | {
160
+ readonly [$$ScaleValue]: "space";
161
+ };
162
+ };
163
+ pt: (value: string | number | {
164
+ readonly [$$ScaleValue]: "space";
165
+ }) => {
166
+ paddingTop: string | number | {
167
+ readonly [$$ScaleValue]: "space";
168
+ };
169
+ };
170
+ pr: (value: string | number | {
171
+ readonly [$$ScaleValue]: "space";
172
+ }) => {
173
+ paddingRight: string | number | {
174
+ readonly [$$ScaleValue]: "space";
175
+ };
176
+ };
177
+ pb: (value: string | number | {
178
+ readonly [$$ScaleValue]: "space";
179
+ }) => {
180
+ paddingBottom: string | number | {
181
+ readonly [$$ScaleValue]: "space";
182
+ };
183
+ };
184
+ pl: (value: string | number | {
185
+ readonly [$$ScaleValue]: "space";
186
+ }) => {
187
+ paddingLeft: string | number | {
188
+ readonly [$$ScaleValue]: "space";
189
+ };
190
+ };
191
+ px: (value: string | number | {
192
+ readonly [$$ScaleValue]: "space";
193
+ }) => {
194
+ paddingLeft: string | number | {
195
+ readonly [$$ScaleValue]: "space";
196
+ };
197
+ paddingRight: string | number | {
198
+ readonly [$$ScaleValue]: "space";
199
+ };
200
+ };
201
+ py: (value: string | number | {
202
+ readonly [$$ScaleValue]: "space";
203
+ }) => {
204
+ paddingTop: string | number | {
205
+ readonly [$$ScaleValue]: "space";
206
+ };
207
+ paddingBottom: string | number | {
208
+ readonly [$$ScaleValue]: "space";
209
+ };
210
+ };
211
+ m: (value: string | number | {
212
+ readonly [$$ScaleValue]: "space";
213
+ }) => {
214
+ margin: string | number | {
215
+ readonly [$$ScaleValue]: "space";
216
+ };
217
+ };
218
+ mt: (value: string | number | {
219
+ readonly [$$ScaleValue]: "space";
220
+ }) => {
221
+ marginTop: string | number | {
222
+ readonly [$$ScaleValue]: "space";
223
+ };
224
+ };
225
+ mr: (value: string | number | {
226
+ readonly [$$ScaleValue]: "space";
227
+ }) => {
228
+ marginRight: string | number | {
229
+ readonly [$$ScaleValue]: "space";
230
+ };
231
+ };
232
+ mb: (value: string | number | {
233
+ readonly [$$ScaleValue]: "space";
234
+ }) => {
235
+ marginBottom: string | number | {
236
+ readonly [$$ScaleValue]: "space";
237
+ };
238
+ };
239
+ ml: (value: string | number | {
240
+ readonly [$$ScaleValue]: "space";
241
+ }) => {
242
+ marginLeft: string | number | {
243
+ readonly [$$ScaleValue]: "space";
244
+ };
245
+ };
246
+ mx: (value: string | number | {
247
+ readonly [$$ScaleValue]: "space";
248
+ }) => {
249
+ marginLeft: string | number | {
250
+ readonly [$$ScaleValue]: "space";
251
+ };
252
+ marginRight: string | number | {
253
+ readonly [$$ScaleValue]: "space";
254
+ };
255
+ };
256
+ my: (value: string | number | {
257
+ readonly [$$ScaleValue]: "space";
258
+ }) => {
259
+ marginTop: string | number | {
260
+ readonly [$$ScaleValue]: "space";
261
+ };
262
+ marginBottom: string | number | {
263
+ readonly [$$ScaleValue]: "space";
264
+ };
265
+ };
266
+ }>>, {
267
+ size?: "sm" | "md" | "lg" | undefined;
268
+ isIconOnly?: boolean | "true" | undefined;
269
+ }, {
270
+ sm: string;
271
+ md: string;
272
+ lg: string;
273
+ xl: string;
274
+ reducedMotion: string;
275
+ allowMotion: string;
276
+ hover: string;
277
+ }, import("@stitches/react/types/css-util").CSS<{
278
+ sm: string;
279
+ md: string;
280
+ lg: string;
281
+ xl: string;
282
+ reducedMotion: string;
283
+ allowMotion: string;
284
+ hover: string;
285
+ }, {
286
+ colors: {
287
+ textForeground: any;
288
+ textSubtle: any;
289
+ textPlaceholder: any;
290
+ background: any;
291
+ backgroundAccent: any;
292
+ tonal50: any;
293
+ tonal100: any;
294
+ tonal200: any;
295
+ tonal300: any;
296
+ tonal400: any;
297
+ tonal500: any;
298
+ tonal600: any;
299
+ alpha100: any;
300
+ alpha150: any;
301
+ alpha200: any;
302
+ alpha250: any;
303
+ alpha600: any;
304
+ primaryLight: any;
305
+ primary: any;
306
+ primaryMid: any;
307
+ primaryDark: any;
308
+ secondary: any;
309
+ brandRed: any;
310
+ brandRedAccent: any;
311
+ brandGreen: any;
312
+ brandGreenAccent: any;
313
+ brandPurple: any;
314
+ brandPurpleAccent: any;
315
+ brandYellow: any;
316
+ brandYellowAccent: any;
317
+ successLight: any;
318
+ success: any;
319
+ successMid: any;
320
+ successDark: any;
321
+ dangerLight: any;
322
+ danger: any;
323
+ dangerMid: any;
324
+ dangerDark: any;
325
+ warningLight: any;
326
+ warning: any;
327
+ warningMid: any;
328
+ warningDark: any;
329
+ subjectEnglish: any;
330
+ subjectMaths: any;
331
+ subjectScience: any;
332
+ subjectVerbalReasoning: any;
333
+ subjectNonVerbalReasoning: any;
334
+ subjectCreativeWriting: any;
335
+ subjectExamSkills: any;
336
+ };
337
+ space: {
338
+ "0": any;
339
+ "1": any;
340
+ "2": any;
341
+ "3": any;
342
+ "4": any;
343
+ "5": any;
344
+ "6": any;
345
+ "7": any;
346
+ "8": any;
347
+ "9": any;
348
+ };
349
+ fontSizes: {
350
+ xs: any;
351
+ sm: any;
352
+ md: any;
353
+ lg: any;
354
+ xl: any;
355
+ "2xl": any;
356
+ "3xl": any;
357
+ "4xl": any;
358
+ };
359
+ fonts: {
360
+ sans: any;
361
+ mono: any;
362
+ display: any;
363
+ body: any;
364
+ };
365
+ sizes: {
366
+ "0": any;
367
+ "1": any;
368
+ "2": any;
369
+ "3": any;
370
+ "4": any;
371
+ "5": any;
372
+ "6": any;
373
+ "7": any;
374
+ "8": any;
375
+ };
376
+ radii: {
377
+ "0": any;
378
+ "1": any;
379
+ "2": any;
380
+ "3": any;
381
+ round: any;
382
+ };
383
+ shadows: {
384
+ "0": any;
385
+ "1": any;
386
+ "2": any;
387
+ "3": any;
388
+ };
389
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
390
+ bg: (value: {
391
+ readonly [$$PropertyValue]: "background";
392
+ }) => {
393
+ background: {
394
+ readonly [$$PropertyValue]: "background";
395
+ };
396
+ };
397
+ inset: (value: string | number | {
398
+ readonly [$$ScaleValue]: "space";
399
+ }) => {
400
+ top: string | number | {
401
+ readonly [$$ScaleValue]: "space";
402
+ };
403
+ right: string | number | {
404
+ readonly [$$ScaleValue]: "space";
405
+ };
406
+ bottom: string | number | {
407
+ readonly [$$ScaleValue]: "space";
408
+ };
409
+ left: string | number | {
410
+ readonly [$$ScaleValue]: "space";
411
+ };
412
+ };
413
+ size: (value: string | number | {
414
+ readonly [$$ScaleValue]: "size";
415
+ }) => {
416
+ height: string | number | {
417
+ readonly [$$ScaleValue]: "size";
418
+ };
419
+ width: string | number | {
420
+ readonly [$$ScaleValue]: "size";
421
+ };
422
+ };
423
+ p: (value: string | number | {
424
+ readonly [$$ScaleValue]: "space";
425
+ }) => {
426
+ padding: string | number | {
427
+ readonly [$$ScaleValue]: "space";
428
+ };
429
+ };
430
+ pt: (value: string | number | {
431
+ readonly [$$ScaleValue]: "space";
432
+ }) => {
433
+ paddingTop: string | number | {
434
+ readonly [$$ScaleValue]: "space";
435
+ };
436
+ };
437
+ pr: (value: string | number | {
438
+ readonly [$$ScaleValue]: "space";
439
+ }) => {
440
+ paddingRight: string | number | {
441
+ readonly [$$ScaleValue]: "space";
442
+ };
443
+ };
444
+ pb: (value: string | number | {
445
+ readonly [$$ScaleValue]: "space";
446
+ }) => {
447
+ paddingBottom: string | number | {
448
+ readonly [$$ScaleValue]: "space";
449
+ };
450
+ };
451
+ pl: (value: string | number | {
452
+ readonly [$$ScaleValue]: "space";
453
+ }) => {
454
+ paddingLeft: string | number | {
455
+ readonly [$$ScaleValue]: "space";
456
+ };
457
+ };
458
+ px: (value: string | number | {
459
+ readonly [$$ScaleValue]: "space";
460
+ }) => {
461
+ paddingLeft: string | number | {
462
+ readonly [$$ScaleValue]: "space";
463
+ };
464
+ paddingRight: string | number | {
465
+ readonly [$$ScaleValue]: "space";
466
+ };
467
+ };
468
+ py: (value: string | number | {
469
+ readonly [$$ScaleValue]: "space";
470
+ }) => {
471
+ paddingTop: string | number | {
472
+ readonly [$$ScaleValue]: "space";
473
+ };
474
+ paddingBottom: string | number | {
475
+ readonly [$$ScaleValue]: "space";
476
+ };
477
+ };
478
+ m: (value: string | number | {
479
+ readonly [$$ScaleValue]: "space";
480
+ }) => {
481
+ margin: string | number | {
482
+ readonly [$$ScaleValue]: "space";
483
+ };
484
+ };
485
+ mt: (value: string | number | {
486
+ readonly [$$ScaleValue]: "space";
487
+ }) => {
488
+ marginTop: string | number | {
489
+ readonly [$$ScaleValue]: "space";
490
+ };
491
+ };
492
+ mr: (value: string | number | {
493
+ readonly [$$ScaleValue]: "space";
494
+ }) => {
495
+ marginRight: string | number | {
496
+ readonly [$$ScaleValue]: "space";
497
+ };
498
+ };
499
+ mb: (value: string | number | {
500
+ readonly [$$ScaleValue]: "space";
501
+ }) => {
502
+ marginBottom: string | number | {
503
+ readonly [$$ScaleValue]: "space";
504
+ };
505
+ };
506
+ ml: (value: string | number | {
507
+ readonly [$$ScaleValue]: "space";
508
+ }) => {
509
+ marginLeft: string | number | {
510
+ readonly [$$ScaleValue]: "space";
511
+ };
512
+ };
513
+ mx: (value: string | number | {
514
+ readonly [$$ScaleValue]: "space";
515
+ }) => {
516
+ marginLeft: string | number | {
517
+ readonly [$$ScaleValue]: "space";
518
+ };
519
+ marginRight: string | number | {
520
+ readonly [$$ScaleValue]: "space";
521
+ };
522
+ };
523
+ my: (value: string | number | {
524
+ readonly [$$ScaleValue]: "space";
525
+ }) => {
526
+ marginTop: string | number | {
527
+ readonly [$$ScaleValue]: "space";
528
+ };
529
+ marginBottom: string | number | {
530
+ readonly [$$ScaleValue]: "space";
531
+ };
532
+ };
533
+ }>>;
534
+ export declare const ToggleGroupButton: React.FC<React.ComponentProps<typeof StyledButton>>;
@@ -0,0 +1 @@
1
+ import{Children as d,isValidElement as m,createElement as l,cloneElement as u}from"react";import{styled as f}from"../../stitches.js";import{StyledIcon as $,Icon as p}from"../icon/Icon.js";import{StyledItem as x}from"./ToggleGroupItem.js";const o={sm:"32px",md:"40px",lg:"48px"},I={sm:"$4",md:"$5",lg:"$5"},S={sm:"$2",md:"$3",lg:"$3"},s=n=>({fontSize:`$${n}`,px:I[n],minHeight:o[n],"& > *:not(:last-child)":{mr:S[n]}}),c=f(x,{flexGrow:1,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:600,lineHeight:1,py:"$1",[`& ${$}`]:{flexShrink:0},variants:{size:{sm:s("sm"),md:s("md"),lg:s("lg")},isIconOnly:{true:{}}},compoundVariants:[{isIconOnly:!0,size:"sm",css:{minWidth:o.sm,p:0}},{isIconOnly:!0,size:"md",css:{minWidth:o.md,p:0}},{isIconOnly:!0,size:"lg",css:{minWidth:o.lg,p:0}}]}),h=({size:n,children:g,...a})=>{var r;const e=d.toArray(g),i=e.length<=1,y=i&&m(e[0])&&((r=e[0])==null?void 0:r.type)===p;return l(c,{size:n,isIconOnly:y,...a},e.map(t=>!i&&typeof t=="string"?l("span",{key:t},t):m(t)&&(t==null?void 0:t.type)===p?u(t,{...t.props,size:n}):t))};export{c as StyledButton,h as ToggleGroupButton};