@atom-learning/components 1.0.0-rc.3 → 1.0.1

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 (118) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/components/action-icon/ActionIcon.d.ts +129 -43
  3. package/dist/components/alert-dialog/AlertDialog.d.ts +128 -42
  4. package/dist/components/alert-dialog/AlertDialogContent.d.ts +128 -42
  5. package/dist/components/alert-dialog/AlertDialogContent.js +1 -1
  6. package/dist/components/box/Box.d.ts +128 -42
  7. package/dist/components/button/Button.d.ts +128 -42
  8. package/dist/components/button/Button.js +1 -1
  9. package/dist/components/carousel/Carousel.js +1 -1
  10. package/dist/components/carousel/CarouselPagination.d.ts +128 -42
  11. package/dist/components/carousel/CarouselSlide.d.ts +128 -42
  12. package/dist/components/carousel/CarouselSlider.d.ts +128 -42
  13. package/dist/components/checkbox/Checkbox.d.ts +128 -42
  14. package/dist/components/combobox/Combobox.d.ts +128 -42
  15. package/dist/components/combobox/ComboboxInput.d.ts +128 -42
  16. package/dist/components/combobox/ComboboxInput.js +1 -1
  17. package/dist/components/combobox/ComboboxList.d.ts +128 -42
  18. package/dist/components/combobox/ComboboxOption.d.ts +128 -42
  19. package/dist/components/combobox/ComboboxPopover.d.ts +128 -42
  20. package/dist/components/dialog/Dialog.d.ts +128 -42
  21. package/dist/components/dialog/DialogClose.d.ts +128 -42
  22. package/dist/components/dialog/DialogContent.d.ts +128 -42
  23. package/dist/components/dialog/DialogContent.js +1 -1
  24. package/dist/components/divider/Divider.d.ts +134 -43
  25. package/dist/components/divider/Divider.js +1 -1
  26. package/dist/components/dropdown-menu/DropdownMenu.d.ts +128 -42
  27. package/dist/components/dropdown-menu/DropdownMenuContent.d.ts +128 -42
  28. package/dist/components/dropdown-menu/DropdownMenuContent.js +1 -1
  29. package/dist/components/dropdown-menu/DropdownMenuItem.d.ts +130 -45
  30. package/dist/components/dropdown-menu/DropdownMenuItem.js +1 -1
  31. package/dist/components/dropdown-menu/DropdownMenuSeparator.d.ts +128 -42
  32. package/dist/components/dropdown-menu/DropdownMenuSeparator.js +1 -1
  33. package/dist/components/dropdown-menu/DropdownMenuTrigger.d.ts +128 -42
  34. package/dist/components/field-wrapper/InlineFieldWrapper.d.ts +1 -1
  35. package/dist/components/field-wrapper/InlineFieldWrapper.js +1 -1
  36. package/dist/components/flex/Flex.d.ts +128 -42
  37. package/dist/components/form/Form.d.ts +128 -42
  38. package/dist/components/grid/Grid.d.ts +128 -42
  39. package/dist/components/heading/Heading.d.ts +128 -42
  40. package/dist/components/heading/Heading.js +1 -1
  41. package/dist/components/icon/Icon.d.ts +128 -42
  42. package/dist/components/image/Image.d.ts +128 -42
  43. package/dist/components/index.d.ts +5 -4
  44. package/dist/components/input/Input.d.ts +128 -42
  45. package/dist/components/label/Label.d.ts +129 -43
  46. package/dist/components/label/Label.js +1 -1
  47. package/dist/components/link/Link.d.ts +128 -42
  48. package/dist/components/list/List.d.ts +288 -116
  49. package/dist/components/popover/Popover.d.ts +128 -42
  50. package/dist/components/popover/PopoverContent.d.ts +128 -42
  51. package/dist/components/popover/PopoverContent.js +1 -1
  52. package/dist/components/progress-bar/ProgressBar.d.ts +128 -42
  53. package/dist/components/radio-button/RadioButton.d.ts +275 -0
  54. package/dist/components/radio-button/RadioButton.js +1 -0
  55. package/dist/components/radio-button/RadioButtonGroup.d.ts +269 -0
  56. package/dist/components/{radio → radio-button}/RadioButtonGroup.js +0 -0
  57. package/dist/components/{radio → radio-button}/index.d.ts +0 -0
  58. package/dist/components/{radio-field/RadioGroupField.d.ts → radio-button-field/RadioButtonField.d.ts} +2 -2
  59. package/dist/components/radio-button-field/RadioButtonField.js +1 -0
  60. package/dist/components/{radio-field → radio-button-field}/RadioField.d.ts +1 -1
  61. package/dist/components/radio-button-field/RadioField.js +1 -0
  62. package/dist/components/radio-button-field/index.d.ts +1 -0
  63. package/dist/components/radio-card/RadioCard.d.ts +274 -0
  64. package/dist/components/radio-card/RadioCard.js +1 -0
  65. package/dist/components/radio-card/RadioCardGroup.d.ts +9 -0
  66. package/dist/components/radio-card/RadioCardGroup.js +1 -0
  67. package/dist/components/radio-card/index.d.ts +2 -0
  68. package/dist/components/select/Select.d.ts +128 -42
  69. package/dist/components/select/Select.js +1 -1
  70. package/dist/components/stack/Stack.d.ts +128 -42
  71. package/dist/components/stack-content/StackContent.d.ts +128 -42
  72. package/dist/components/switch/Switch.d.ts +128 -42
  73. package/dist/components/switch/Switch.js +1 -1
  74. package/dist/components/table/Table.d.ts +128 -42
  75. package/dist/components/table/TableBody.d.ts +128 -42
  76. package/dist/components/table/TableCell.d.ts +128 -42
  77. package/dist/components/table/TableCell.js +1 -1
  78. package/dist/components/table/TableFooter.d.ts +128 -42
  79. package/dist/components/table/TableFooterCell.d.ts +128 -42
  80. package/dist/components/table/TableFooterCell.js +1 -1
  81. package/dist/components/table/TableHeader.d.ts +128 -42
  82. package/dist/components/table/TableHeaderCell.d.ts +128 -42
  83. package/dist/components/table/TableRow.d.ts +128 -42
  84. package/dist/components/tabs/TabTrigger.d.ts +128 -42
  85. package/dist/components/tabs/TabTrigger.js +1 -1
  86. package/dist/components/tabs/Tabs.d.ts +432 -174
  87. package/dist/components/text/Text.d.ts +128 -42
  88. package/dist/components/text/Text.js +1 -1
  89. package/dist/components/textarea/Textarea.d.ts +128 -42
  90. package/dist/components/toast/Toast.d.ts +128 -42
  91. package/dist/components/toast/Toast.js +1 -1
  92. package/dist/components/tooltip/Tooltip.js +1 -1
  93. package/dist/components/tooltip/TooltipContent.d.ts +128 -42
  94. package/dist/components/tooltip/TooltipContent.js +1 -1
  95. package/dist/components/video/Video.d.ts +128 -42
  96. package/dist/docgen.json +1 -1
  97. package/dist/docs/Divider.mdx +6 -2
  98. package/dist/docs/DropdownMenu.mdx +5 -3
  99. package/dist/docs/RadioButtonField.mdx +19 -0
  100. package/dist/docs/RadioCard.mdx +62 -0
  101. package/dist/index.cjs.js +1 -1
  102. package/dist/index.js +1 -1
  103. package/dist/stitches.d.ts +610 -200
  104. package/dist/stitches.js +1 -1
  105. package/dist/types/navigatorActions.types.d.ts +2 -5
  106. package/dist/utilities/css-wrapper/CSSWrapper.d.ts +1 -1
  107. package/dist/utilities/css-wrapper/CSSWrapper.js +1 -1
  108. package/dist/utilities/style/index.d.ts +3 -2
  109. package/dist/utilities/style/keyframe-animations.d.ts +24 -0
  110. package/dist/utilities/style/keyframe-animations.js +1 -0
  111. package/package.json +21 -20
  112. package/dist/components/radio/RadioButton.d.ts +0 -189
  113. package/dist/components/radio/RadioButton.js +0 -1
  114. package/dist/components/radio/RadioButtonGroup.d.ts +0 -183
  115. package/dist/components/radio-field/RadioField.js +0 -1
  116. package/dist/components/radio-field/RadioGroupField.js +0 -1
  117. package/dist/components/radio-field/index.d.ts +0 -1
  118. package/dist/docs/RadioField.mdx +0 -19
package/dist/stitches.js CHANGED
@@ -1 +1 @@
1
- import*as t from"@atom-learning/theme";import{createStitches as i}from"@stitches/react";const m={bg:t=>({background:t}),inset:t=>({top:t,right:t,bottom:t,left:t}),size:t=>({height:t,width:t}),p:t=>({padding:t}),pt:t=>({paddingTop:t}),pr:t=>({paddingRight:t}),pb:t=>({paddingBottom:t}),pl:t=>({paddingLeft:t}),px:t=>({paddingLeft:t,paddingRight:t}),py:t=>({paddingTop:t,paddingBottom:t}),m:t=>({margin:t}),mt:t=>({marginTop:t}),mr:t=>({marginRight:t}),mb:t=>({marginBottom:t}),ml:t=>({marginLeft:t}),mx:t=>({marginLeft:t,marginRight:t}),my:t=>({marginTop:t,marginBottom:t})},e={sm:"(min-width: 550px)",md:"(min-width: 800px)",lg:"(min-width: 1100px)",xl:"(min-width: 1350px)",reducedMotion:"(prefers-reduced-motion)",hover:"(hover: hover)"},d=i({theme:t,utils:m,media:e}),{css:o,getCssText:g,createTheme:n,globalCss:p,keyframes:r,styled:a,theme:h}=d;export{n as createTheme,o as css,g as getCssText,p as globalCss,r as keyframes,e as media,a as styled,h as theme,m as utils};
1
+ import*as t from"@atom-learning/theme";import{createStitches as e}from"@stitches/react";const i={bg:t=>({background:t}),inset:t=>({top:t,right:t,bottom:t,left:t}),size:t=>({height:t,width:t}),p:t=>({padding:t}),pt:t=>({paddingTop:t}),pr:t=>({paddingRight:t}),pb:t=>({paddingBottom:t}),pl:t=>({paddingLeft:t}),px:t=>({paddingLeft:t,paddingRight:t}),py:t=>({paddingTop:t,paddingBottom:t}),m:t=>({margin:t}),mt:t=>({marginTop:t}),mr:t=>({marginRight:t}),mb:t=>({marginBottom:t}),ml:t=>({marginLeft:t}),mx:t=>({marginLeft:t,marginRight:t}),my:t=>({marginTop:t,marginBottom:t})},m={sm:"(min-width: 550px)",md:"(min-width: 800px)",lg:"(min-width: 1100px)",xl:"(min-width: 1350px)",reducedMotion:"(prefers-reduced-motion)",allowMotion:"(prefers-reduced-motion: no-preference)",hover:"(hover: hover)"},o=e({theme:t,utils:i,media:m}),{css:r,getCssText:d,createTheme:n,globalCss:p,keyframes:g,styled:a,theme:h}=o;export{n as createTheme,r as css,d as getCssText,p as globalCss,g as keyframes,m as media,a as styled,h as theme,i as utils};
@@ -1,7 +1,4 @@
1
1
  export declare type NavigatorActions = {
2
- onClick: (...args: unknown[]) => void;
3
- href?: never;
4
- } | {
5
- onClick?: never;
6
- href: string;
2
+ onClick?: (...args: unknown[]) => void;
3
+ href?: string;
7
4
  };
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { CSS } from '../../stitches';
2
+ import type { CSS } from '../../stitches';
3
3
  declare type CssWrapperProps = {
4
4
  css?: CSS;
5
5
  children: React.ReactNode;
@@ -1 +1 @@
1
- import{createElement as r,Fragment as s}from"react";import{Box as o}from"../../components/box/Box.js";const p=({css:p,children:t})=>p?r(o,{css:p,"data-testid":"css-wrapper"},t):r(s,null,t);p.displayName="CSSWrapper";export{p as CSSWrapper};
1
+ import{createElement as o,Fragment as r}from"react";import{Box as s}from"../../components/box/Box.js";const p=({css:p,children:c})=>p?o(s,{css:p},c):o(r,null,c);p.displayName="CSSWrapper";export{p as CSSWrapper};
@@ -1,2 +1,3 @@
1
- export { capsize } from './capsize';
2
- export { encodeBackgroundIcon } from './encode-background-icon';
1
+ export * from './capsize';
2
+ export * from './encode-background-icon';
3
+ export * from './keyframe-animations';
@@ -0,0 +1,24 @@
1
+ export declare const slideUpAndFade: {
2
+ (): string;
3
+ name: string;
4
+ };
5
+ export declare const slideRightAndFade: {
6
+ (): string;
7
+ name: string;
8
+ };
9
+ export declare const slideDownAndFade: {
10
+ (): string;
11
+ name: string;
12
+ };
13
+ export declare const slideLeftAndFade: {
14
+ (): string;
15
+ name: string;
16
+ };
17
+ export declare const fadeIn: {
18
+ (): string;
19
+ name: string;
20
+ };
21
+ export declare const fadeOut: {
22
+ (): string;
23
+ name: string;
24
+ };
@@ -0,0 +1 @@
1
+ import{keyframes as t}from"../../stitches.js";const a=t({"0%":{opacity:0,transform:"translateY(2px)"},"100%":{opacity:1,transform:"translateY(0)"}}),r=t({"0%":{opacity:0,transform:"translateX(-2px)"},"100%":{opacity:1,transform:"translateX(0)"}}),o=t({"0%":{opacity:0,transform:"translateY(-2px)"},"100%":{opacity:1,transform:"translateY(0)"}}),s=t({"0%":{opacity:0,transform:"translateX(2px)"},"100%":{opacity:1,transform:"translateX(0)"}}),p=t({"0%":{opacity:0},"100%":{opacity:1}}),n=t({"0%":{opacity:1},"100%":{opacity:0}});export{p as fadeIn,n as fadeOut,o as slideDownAndFade,s as slideLeftAndFade,r as slideRightAndFade,a as slideUpAndFade};
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "source": "src/index.ts",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.js",
6
- "version": "1.0.0-rc.3",
6
+ "version": "1.0.1",
7
7
  "description": "",
8
8
  "files": [
9
9
  "dist"
@@ -43,13 +43,13 @@
43
43
  "path": "dist/index.js"
44
44
  },
45
45
  {
46
- "limit": "300ms",
46
+ "limit": "400ms",
47
47
  "path": "dist/index.js",
48
48
  "import": "{ Box }"
49
49
  }
50
50
  ],
51
51
  "devDependencies": {
52
- "@atom-learning/icons": "^0.3.0",
52
+ "@atom-learning/icons": "1.5.0",
53
53
  "@atom-learning/jest-stitches": "1.0.10",
54
54
  "@atom-learning/theme": "1.0.0",
55
55
  "@babel/plugin-transform-modules-commonjs": "^7.12.1",
@@ -58,7 +58,7 @@
58
58
  "@babel/preset-typescript": "^7.12.7",
59
59
  "@commitlint/cli": "^11.0.0",
60
60
  "@commitlint/config-conventional": "^11.0.0",
61
- "@radix-ui/react-id": "0.1.0",
61
+ "@radix-ui/react-id": "0.1.1",
62
62
  "@rollup/plugin-babel": "^5.3.0",
63
63
  "@rollup/plugin-commonjs": "^17.1.0",
64
64
  "@rollup/plugin-node-resolve": "^11.2.0",
@@ -108,7 +108,7 @@
108
108
  "rollup-plugin-terser": "^7.0.2",
109
109
  "rollup-plugin-visualizer": "^4.2.2",
110
110
  "semantic-release": "^17.4.2",
111
- "semantic-release-slack-bot": "^2.1.0",
111
+ "semantic-release-slack-bot": "^2.1.1",
112
112
  "size-limit": "^5.0.5",
113
113
  "stitches-reset": "^1.0.0",
114
114
  "tsc-alias": "^1.3.5",
@@ -122,26 +122,26 @@
122
122
  "react": "^16.8.0"
123
123
  },
124
124
  "dependencies": {
125
- "@radix-ui/react-alert-dialog": "0.1.0",
126
- "@radix-ui/react-checkbox": "0.1.0",
127
- "@radix-ui/react-dialog": "0.1.0",
128
- "@radix-ui/react-dropdown-menu": "^0.1.0",
129
- "@radix-ui/react-popover": "0.1.0",
130
- "@radix-ui/react-progress": "0.1.0",
131
- "@radix-ui/react-radio-group": "0.1.0",
132
- "@radix-ui/react-switch": "0.1.0",
133
- "@radix-ui/react-tabs": "0.1.0",
134
- "@radix-ui/react-tooltip": "0.1.0",
135
- "@radix-ui/react-visually-hidden": "0.1.0",
136
- "@reach/combobox": "^0.15.1",
137
- "@stitches/react": "^1.2.1",
138
- "@types/react": "^17.0.2",
125
+ "@radix-ui/react-alert-dialog": "0.1.1",
126
+ "@radix-ui/react-checkbox": "0.1.1",
127
+ "@radix-ui/react-dialog": "0.1.1",
128
+ "@radix-ui/react-dropdown-menu": "^0.1.1",
129
+ "@radix-ui/react-popover": "0.1.1",
130
+ "@radix-ui/react-progress": "0.1.1",
131
+ "@radix-ui/react-radio-group": "0.1.1",
132
+ "@radix-ui/react-switch": "0.1.1",
133
+ "@radix-ui/react-tabs": "0.1.1",
134
+ "@radix-ui/react-tooltip": "0.1.1",
135
+ "@radix-ui/react-visually-hidden": "0.1.1",
136
+ "@reach/combobox": "^0.16.1",
137
+ "@stitches/react": "^1.2.5",
138
+ "@types/react": "^17.0.30",
139
139
  "dlv": "^1.1.3",
140
140
  "invariant": "^2.2.4",
141
141
  "mdast-util-directive": "1.0.1",
142
142
  "mdast-util-from-markdown": "0.8.5",
143
143
  "micromark-extension-directive": "1.4.0",
144
- "polished": "^4.1.2",
144
+ "polished": "^4.1.3",
145
145
  "pure-react-carousel": "^1.27.6",
146
146
  "react-hook-form": "^6.15.4",
147
147
  "react-hook-form-persist": "^2.0.0",
@@ -192,6 +192,7 @@
192
192
  [
193
193
  "semantic-release-slack-bot",
194
194
  {
195
+ "packageName": "@atom-learning/components",
195
196
  "branchesConfig": [
196
197
  {
197
198
  "pattern": "main",
@@ -1,189 +0,0 @@
1
- import * as RadioGroup from '@radix-ui/react-radio-group';
2
- import * as React from 'react';
3
- import { Override } from '../../utilities/types';
4
- declare const StyledRadioButton: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<RadioGroup.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>, {}, {
5
- sm: string;
6
- md: string;
7
- lg: string;
8
- xl: string;
9
- reducedMotion: 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
- 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: import("@stitches/react").PropertyValue<"background">) => {
124
- background: import("@stitches/react").PropertyValue<"background">;
125
- };
126
- inset: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
127
- top: string | number | import("@stitches/react").ScaleValue<"space">;
128
- right: string | number | import("@stitches/react").ScaleValue<"space">;
129
- bottom: string | number | import("@stitches/react").ScaleValue<"space">;
130
- left: string | number | import("@stitches/react").ScaleValue<"space">;
131
- };
132
- size: (value: string | number | import("@stitches/react").ScaleValue<"size">) => {
133
- height: string | number | import("@stitches/react").ScaleValue<"size">;
134
- width: string | number | import("@stitches/react").ScaleValue<"size">;
135
- };
136
- p: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
137
- padding: string | number | import("@stitches/react").ScaleValue<"space">;
138
- };
139
- pt: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
140
- paddingTop: string | number | import("@stitches/react").ScaleValue<"space">;
141
- };
142
- pr: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
143
- paddingRight: string | number | import("@stitches/react").ScaleValue<"space">;
144
- };
145
- pb: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
146
- paddingBottom: string | number | import("@stitches/react").ScaleValue<"space">;
147
- };
148
- pl: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
149
- paddingLeft: string | number | import("@stitches/react").ScaleValue<"space">;
150
- };
151
- px: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
152
- paddingLeft: string | number | import("@stitches/react").ScaleValue<"space">;
153
- paddingRight: string | number | import("@stitches/react").ScaleValue<"space">;
154
- };
155
- py: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
156
- paddingTop: string | number | import("@stitches/react").ScaleValue<"space">;
157
- paddingBottom: string | number | import("@stitches/react").ScaleValue<"space">;
158
- };
159
- m: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
160
- margin: string | number | import("@stitches/react").ScaleValue<"space">;
161
- };
162
- mt: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
163
- marginTop: string | number | import("@stitches/react").ScaleValue<"space">;
164
- };
165
- mr: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
166
- marginRight: string | number | import("@stitches/react").ScaleValue<"space">;
167
- };
168
- mb: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
169
- marginBottom: string | number | import("@stitches/react").ScaleValue<"space">;
170
- };
171
- ml: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
172
- marginLeft: string | number | import("@stitches/react").ScaleValue<"space">;
173
- };
174
- mx: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
175
- marginLeft: string | number | import("@stitches/react").ScaleValue<"space">;
176
- marginRight: string | number | import("@stitches/react").ScaleValue<"space">;
177
- };
178
- my: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
179
- marginTop: string | number | import("@stitches/react").ScaleValue<"space">;
180
- marginBottom: string | number | import("@stitches/react").ScaleValue<"space">;
181
- };
182
- }>>;
183
- declare type RadioButtonProps = Override<React.ComponentPropsWithoutRef<typeof StyledRadioButton>, {
184
- as?: never;
185
- } & {
186
- 'aria-label'?: string;
187
- }>;
188
- export declare const RadioButton: React.FC<RadioButtonProps>;
189
- export {};
@@ -1 +0,0 @@
1
- import{Item as o,Indicator as r}from"@radix-ui/react-radio-group";import{createElement as e}from"react";import{styled as t}from"../../stitches.js";const a=t(o,{alignItems:"center",appearance:"none",backgroundColor:"transparent",border:"1px solid $tonal400",borderRadius:"$round",color:"white",cursor:"pointer",display:"flex",justifyContent:"center",p:0,size:"$1",transition:"all 50ms ease-out","&:focus":{outline:"2px solid $primary",outlineOffset:"1px"},":checked + &":{backgroundColor:"$primary",borderColor:"$primary"},"&[disabled]":{backgroundColor:"$tonal100",borderColor:"$tonal400",color:"$tonal400",cursor:"not-allowed"}}),n=t(r,{size:"6px",borderRadius:"$round",backgroundColor:"currentcolor",position:"absolute"}),i=o=>e(a,Object.assign({},o),e(n,null));i.displayName="RadioButton";export{i as RadioButton};
@@ -1,183 +0,0 @@
1
- /// <reference types="react" />
2
- import * as RadioGroup from '@radix-ui/react-radio-group';
3
- export declare const RadioButtonGroup: import("@stitches/react/types/styled-component").StyledComponent<import("react").ForwardRefExoticComponent<RadioGroup.RadioGroupProps & import("react").RefAttributes<HTMLDivElement>>, {
4
- direction?: "column" | "row" | undefined;
5
- }, {
6
- sm: string;
7
- md: string;
8
- lg: string;
9
- xl: string;
10
- reducedMotion: string;
11
- hover: string;
12
- }, import("@stitches/react/types/css-util").CSS<{
13
- sm: string;
14
- md: string;
15
- lg: string;
16
- xl: string;
17
- reducedMotion: string;
18
- hover: string;
19
- }, {
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: import("@stitches/react").PropertyValue<"background">) => {
125
- background: import("@stitches/react").PropertyValue<"background">;
126
- };
127
- inset: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
128
- top: string | number | import("@stitches/react").ScaleValue<"space">;
129
- right: string | number | import("@stitches/react").ScaleValue<"space">;
130
- bottom: string | number | import("@stitches/react").ScaleValue<"space">;
131
- left: string | number | import("@stitches/react").ScaleValue<"space">;
132
- };
133
- size: (value: string | number | import("@stitches/react").ScaleValue<"size">) => {
134
- height: string | number | import("@stitches/react").ScaleValue<"size">;
135
- width: string | number | import("@stitches/react").ScaleValue<"size">;
136
- };
137
- p: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
138
- padding: string | number | import("@stitches/react").ScaleValue<"space">;
139
- };
140
- pt: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
141
- paddingTop: string | number | import("@stitches/react").ScaleValue<"space">;
142
- };
143
- pr: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
144
- paddingRight: string | number | import("@stitches/react").ScaleValue<"space">;
145
- };
146
- pb: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
147
- paddingBottom: string | number | import("@stitches/react").ScaleValue<"space">;
148
- };
149
- pl: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
150
- paddingLeft: string | number | import("@stitches/react").ScaleValue<"space">;
151
- };
152
- px: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
153
- paddingLeft: string | number | import("@stitches/react").ScaleValue<"space">;
154
- paddingRight: string | number | import("@stitches/react").ScaleValue<"space">;
155
- };
156
- py: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
157
- paddingTop: string | number | import("@stitches/react").ScaleValue<"space">;
158
- paddingBottom: string | number | import("@stitches/react").ScaleValue<"space">;
159
- };
160
- m: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
161
- margin: string | number | import("@stitches/react").ScaleValue<"space">;
162
- };
163
- mt: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
164
- marginTop: string | number | import("@stitches/react").ScaleValue<"space">;
165
- };
166
- mr: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
167
- marginRight: string | number | import("@stitches/react").ScaleValue<"space">;
168
- };
169
- mb: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
170
- marginBottom: string | number | import("@stitches/react").ScaleValue<"space">;
171
- };
172
- ml: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
173
- marginLeft: string | number | import("@stitches/react").ScaleValue<"space">;
174
- };
175
- mx: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
176
- marginLeft: string | number | import("@stitches/react").ScaleValue<"space">;
177
- marginRight: string | number | import("@stitches/react").ScaleValue<"space">;
178
- };
179
- my: (value: string | number | import("@stitches/react").ScaleValue<"space">) => {
180
- marginTop: string | number | import("@stitches/react").ScaleValue<"space">;
181
- marginBottom: string | number | import("@stitches/react").ScaleValue<"space">;
182
- };
183
- }>>;
@@ -1 +0,0 @@
1
- const r=["css","label","value"];import{createElement as e}from"react";import"../field-wrapper/FieldWrapper.js";import{InlineFieldWrapper as i}from"../field-wrapper/InlineFieldWrapper.js";import{RadioButton as o}from"../radio/RadioButton.js";import"../radio/RadioButtonGroup.js";const t=t=>{let{css:a,label:l,value:p}=t,s=function(r,e){if(null==r)return{};var i,o,t={},a=Object.keys(r);for(o=0;o<a.length;o++)i=a[o],e.indexOf(i)>=0||(t[i]=r[i]);return t}(t,r);return e(i,{css:a,label:l},e(o,Object.assign({value:p},s)))};t.displayName="RadioField";export{t as RadioField};
@@ -1 +0,0 @@
1
- import{createElement as o}from"react";import{useFormContext as r,Controller as e}from"react-hook-form";import"../form/Form.js";import{useFieldError as t}from"../form/useFieldError.js";import{Label as i}from"../label/Label.js";import"../radio/RadioButton.js";import{RadioButtonGroup as a}from"../radio/RadioButtonGroup.js";import{Text as l}from"../text/Text.js";import{ValidationError as m}from"../validation-error/ValidationError.js";import{styled as s}from"../../stitches.js";import{RadioField as d}from"./RadioField.js";const n=s("fieldset",{all:"unset"}),u=({children:s,css:d,direction:u="column",defaultValue:c,description:p,label:f,name:j,validation:h})=>{const{control:b}=r(),{error:v}=t(j);return o(n,{css:d},o(i,{as:"legend",css:{p:0,mb:"$3"},required:Boolean(null==h?void 0:h.required)},f),p&&o(l,{size:"sm",css:{color:"$tonal300",mb:"$3",maxWidth:"80ch"}},p),o(e,{control:b,name:j,rules:h,defaultValue:c,render:({onChange:r,value:e})=>o(a,{direction:u,defaultValue:c,onValueChange:r,value:e},s)}),v&&o(m,{css:{mt:"$2"}},v))};u.Item=d,u.displayName="RadioGroupField";export{u as RadioGroupField};
@@ -1 +0,0 @@
1
- export { RadioGroupField } from './RadioGroupField';
@@ -1,19 +0,0 @@
1
- ---
2
- title: Radio Field
3
- component: RadioField
4
- description: Combines a RadioButton with a Label and ValidationError
5
- category: Form fields
6
- ---
7
-
8
- `RadioGroupField` wraps a `RadioGroup` to provide a legend and a `ValidationError`. `RadioGroupField.Item` renders an individual `Radio` with an inline `Label`.
9
-
10
- **Note**: a `RadioGroupField.Item`’s `value` **must** be a `string`.
11
-
12
- ```tsx preview
13
- <Form>
14
- <RadioGroupField name="options">
15
- <RadioGroupField.Item label="Option 1" value="1" />
16
- <RadioGroupField.Item label="Option 2" value="2" />
17
- </RadioGroupField>
18
- </Form>
19
- ```