@becket-ui/react 0.2.0 → 0.4.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.
- package/dist/components/AspectRatio.d.ts +17 -0
- package/dist/components/AspectRatio.d.ts.map +1 -0
- package/dist/components/AspectRatio.js +12 -0
- package/dist/components/AspectRatio.js.map +1 -0
- package/dist/components/Avatar.d.ts +24 -0
- package/dist/components/Avatar.d.ts.map +1 -0
- package/dist/components/Avatar.js +30 -0
- package/dist/components/Avatar.js.map +1 -0
- package/dist/components/Badge.d.ts +1 -1
- package/dist/components/Badge.js +1 -1
- package/dist/components/Blockquote.d.ts +18 -0
- package/dist/components/Blockquote.d.ts.map +1 -0
- package/dist/components/Blockquote.js +24 -0
- package/dist/components/Blockquote.js.map +1 -0
- package/dist/components/Center.d.ts +12 -0
- package/dist/components/Center.d.ts.map +1 -0
- package/dist/components/Center.js +14 -0
- package/dist/components/Center.js.map +1 -0
- package/dist/components/Code.d.ts +5 -0
- package/dist/components/Code.d.ts.map +1 -0
- package/dist/components/Code.js +12 -0
- package/dist/components/Code.js.map +1 -0
- package/dist/components/Dialog.js +1 -1
- package/dist/components/Drawer.js +1 -1
- package/dist/components/Figure.d.ts +11 -0
- package/dist/components/Figure.d.ts.map +1 -0
- package/dist/components/Figure.js +18 -0
- package/dist/components/Figure.js.map +1 -0
- package/dist/components/Flex.d.ts +2 -2
- package/dist/components/Flex.js +2 -2
- package/dist/components/Glyphs.d.ts +1 -1
- package/dist/components/Glyphs.js +1 -1
- package/dist/components/Grid.d.ts +29 -0
- package/dist/components/Grid.d.ts.map +1 -0
- package/dist/components/Grid.js +57 -0
- package/dist/components/Grid.js.map +1 -0
- package/dist/components/Hide.d.ts +1 -1
- package/dist/components/Hide.js +1 -1
- package/dist/components/Image.d.ts +18 -0
- package/dist/components/Image.d.ts.map +1 -0
- package/dist/components/Image.js +23 -0
- package/dist/components/Image.js.map +1 -0
- package/dist/components/Kbd.d.ts +5 -0
- package/dist/components/Kbd.d.ts.map +1 -0
- package/dist/components/Kbd.js +12 -0
- package/dist/components/Kbd.js.map +1 -0
- package/dist/components/List.d.ts +19 -0
- package/dist/components/List.d.ts.map +1 -0
- package/dist/components/List.js +27 -0
- package/dist/components/List.js.map +1 -0
- package/dist/components/Mark.d.ts +5 -0
- package/dist/components/Mark.d.ts.map +1 -0
- package/dist/components/Mark.js +12 -0
- package/dist/components/Mark.js.map +1 -0
- package/dist/components/Prose.d.ts +20 -0
- package/dist/components/Prose.d.ts.map +1 -0
- package/dist/components/Prose.js +14 -0
- package/dist/components/Prose.js.map +1 -0
- package/dist/components/Radio.js +1 -1
- package/dist/components/Select.d.ts +1 -1
- package/dist/components/Select.js +1 -1
- package/dist/components/SimpleGrid.d.ts +1 -1
- package/dist/components/SimpleGrid.js +1 -1
- package/dist/components/SkipLink.d.ts +8 -0
- package/dist/components/SkipLink.d.ts.map +1 -0
- package/dist/components/SkipLink.js +14 -0
- package/dist/components/SkipLink.js.map +1 -0
- package/dist/components/Stack.d.ts +2 -2
- package/dist/components/Stack.js +2 -2
- package/dist/components/Tag.d.ts +1 -1
- package/dist/components/Tag.js +1 -1
- package/dist/components/TextField.d.ts +1 -1
- package/dist/components/TextField.js +1 -1
- package/dist/components/Textarea.d.ts +1 -1
- package/dist/components/Textarea.js +1 -1
- package/dist/components/VisuallyHidden.d.ts +9 -0
- package/dist/components/VisuallyHidden.d.ts.map +1 -0
- package/dist/components/VisuallyHidden.js +14 -0
- package/dist/components/VisuallyHidden.js.map +1 -0
- package/dist/helpers/responsive.d.ts +1 -1
- package/dist/helpers/responsive.js.map +1 -1
- package/dist/helpers/storybookControls.d.ts +1 -1
- package/dist/helpers/storybookControls.js +1 -1
- package/dist/helpers/storybookControls.js.map +1 -1
- package/dist/helpers/storybookImages.d.ts +3 -0
- package/dist/helpers/storybookImages.d.ts.map +1 -0
- package/dist/helpers/storybookImages.js +16 -0
- package/dist/helpers/storybookImages.js.map +1 -0
- package/dist/index.d.ts +65 -42
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +62 -31
- package/dist/index.js.map +1 -1
- package/guides/building-with-becket.md +20 -4
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Button } from "./components/Button";
|
|
2
|
-
import { Heading } from "./components/Heading";
|
|
3
|
-
import { Text } from "./components/Text";
|
|
4
|
-
import { Flex } from "./components/Flex";
|
|
5
|
-
import { Stack, HStack, VStack } from "./components/Stack";
|
|
6
|
-
import { Tag } from "./components/Tag";
|
|
7
|
-
import { Badge } from "./components/Badge";
|
|
8
|
-
import { Switch } from "./components/Switch";
|
|
1
|
+
import { Button } from "./components/Button.js";
|
|
2
|
+
import { Heading } from "./components/Heading.js";
|
|
3
|
+
import { Text } from "./components/Text.js";
|
|
4
|
+
import { Flex } from "./components/Flex.js";
|
|
5
|
+
import { Stack, HStack, VStack } from "./components/Stack.js";
|
|
6
|
+
import { Tag } from "./components/Tag.js";
|
|
7
|
+
import { Badge } from "./components/Badge.js";
|
|
8
|
+
import { Switch } from "./components/Switch.js";
|
|
9
9
|
import {
|
|
10
10
|
Field,
|
|
11
11
|
FieldLabel,
|
|
@@ -15,12 +15,12 @@ import {
|
|
|
15
15
|
FieldSelect,
|
|
16
16
|
FieldTextarea,
|
|
17
17
|
useField
|
|
18
|
-
} from "./components/Field";
|
|
19
|
-
import { TextField } from "./components/TextField";
|
|
20
|
-
import { Checkbox } from "./components/Checkbox";
|
|
21
|
-
import { Radio, RadioGroup } from "./components/Radio";
|
|
22
|
-
import { Select } from "./components/Select";
|
|
23
|
-
import { Textarea } from "./components/Textarea";
|
|
18
|
+
} from "./components/Field.js";
|
|
19
|
+
import { TextField } from "./components/TextField.js";
|
|
20
|
+
import { Checkbox } from "./components/Checkbox.js";
|
|
21
|
+
import { Radio, RadioGroup } from "./components/Radio.js";
|
|
22
|
+
import { Select } from "./components/Select.js";
|
|
23
|
+
import { Textarea } from "./components/Textarea.js";
|
|
24
24
|
import {
|
|
25
25
|
Card,
|
|
26
26
|
CardHeader,
|
|
@@ -28,12 +28,12 @@ import {
|
|
|
28
28
|
CardFooter,
|
|
29
29
|
CardTitle,
|
|
30
30
|
CardDescription
|
|
31
|
-
} from "./components/Card";
|
|
32
|
-
import { SimpleGrid } from "./components/SimpleGrid";
|
|
33
|
-
import { Container } from "./components/Container";
|
|
34
|
-
import { Box } from "./components/Box";
|
|
35
|
-
import { Hide } from "./components/Hide";
|
|
36
|
-
import { Tooltip } from "./components/Tooltip";
|
|
31
|
+
} from "./components/Card.js";
|
|
32
|
+
import { SimpleGrid } from "./components/SimpleGrid.js";
|
|
33
|
+
import { Container } from "./components/Container.js";
|
|
34
|
+
import { Box } from "./components/Box.js";
|
|
35
|
+
import { Hide } from "./components/Hide.js";
|
|
36
|
+
import { Tooltip } from "./components/Tooltip.js";
|
|
37
37
|
import {
|
|
38
38
|
Dialog,
|
|
39
39
|
DialogHeader,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
DialogFooter,
|
|
42
42
|
DialogTitle,
|
|
43
43
|
DialogClose
|
|
44
|
-
} from "./components/Dialog";
|
|
44
|
+
} from "./components/Dialog.js";
|
|
45
45
|
import {
|
|
46
46
|
Drawer,
|
|
47
47
|
DrawerHeader,
|
|
@@ -49,9 +49,9 @@ import {
|
|
|
49
49
|
DrawerFooter,
|
|
50
50
|
DrawerTitle,
|
|
51
51
|
DrawerClose
|
|
52
|
-
} from "./components/Drawer";
|
|
53
|
-
import { Menu, MenuItem } from "./components/Menu";
|
|
54
|
-
import { Tabs, TabList, Tab, TabPanel } from "./components/Tabs";
|
|
52
|
+
} from "./components/Drawer.js";
|
|
53
|
+
import { Menu, MenuItem } from "./components/Menu.js";
|
|
54
|
+
import { Tabs, TabList, Tab, TabPanel } from "./components/Tabs.js";
|
|
55
55
|
import {
|
|
56
56
|
Table,
|
|
57
57
|
TableCaption,
|
|
@@ -67,9 +67,9 @@ import {
|
|
|
67
67
|
Tr,
|
|
68
68
|
Th,
|
|
69
69
|
Td
|
|
70
|
-
} from "./components/Table";
|
|
71
|
-
import { Spinner } from "./components/Spinner";
|
|
72
|
-
import { Icon } from "./components/Icon";
|
|
70
|
+
} from "./components/Table.js";
|
|
71
|
+
import { Spinner } from "./components/Spinner.js";
|
|
72
|
+
import { Icon } from "./components/Icon.js";
|
|
73
73
|
import {
|
|
74
74
|
CheckIcon,
|
|
75
75
|
ChevronDownIcon,
|
|
@@ -84,9 +84,23 @@ import {
|
|
|
84
84
|
SearchIcon,
|
|
85
85
|
SunIcon,
|
|
86
86
|
WarningIcon
|
|
87
|
-
} from "./components/Glyphs";
|
|
88
|
-
import { Link } from "./components/Link";
|
|
89
|
-
import {
|
|
87
|
+
} from "./components/Glyphs.js";
|
|
88
|
+
import { Link } from "./components/Link.js";
|
|
89
|
+
import { Prose } from "./components/Prose.js";
|
|
90
|
+
import { List, ListItem } from "./components/List.js";
|
|
91
|
+
import { Code } from "./components/Code.js";
|
|
92
|
+
import { Kbd } from "./components/Kbd.js";
|
|
93
|
+
import { Mark } from "./components/Mark.js";
|
|
94
|
+
import { Blockquote, BlockquoteCaption } from "./components/Blockquote.js";
|
|
95
|
+
import { Image } from "./components/Image.js";
|
|
96
|
+
import { Figure } from "./components/Figure.js";
|
|
97
|
+
import { Avatar } from "./components/Avatar.js";
|
|
98
|
+
import { SkipLink } from "./components/SkipLink.js";
|
|
99
|
+
import { VisuallyHidden } from "./components/VisuallyHidden.js";
|
|
100
|
+
import { Center } from "./components/Center.js";
|
|
101
|
+
import { Grid, GridItem } from "./components/Grid.js";
|
|
102
|
+
import { AspectRatio } from "./components/AspectRatio.js";
|
|
103
|
+
import { Separator } from "./components/Separator.js";
|
|
90
104
|
import {
|
|
91
105
|
BREAKPOINTS,
|
|
92
106
|
SEMANTIC_BREAKPOINTS,
|
|
@@ -95,10 +109,14 @@ import {
|
|
|
95
109
|
normalizeResponsiveValue,
|
|
96
110
|
normalizeGapValue,
|
|
97
111
|
resolveBreakpointAlias
|
|
98
|
-
} from "./helpers/responsive";
|
|
112
|
+
} from "./helpers/responsive.js";
|
|
99
113
|
export {
|
|
114
|
+
AspectRatio,
|
|
115
|
+
Avatar,
|
|
100
116
|
BREAKPOINTS,
|
|
101
117
|
Badge,
|
|
118
|
+
Blockquote,
|
|
119
|
+
BlockquoteCaption,
|
|
102
120
|
Box,
|
|
103
121
|
Button,
|
|
104
122
|
Card,
|
|
@@ -107,11 +125,13 @@ export {
|
|
|
107
125
|
CardFooter,
|
|
108
126
|
CardHeader,
|
|
109
127
|
CardTitle,
|
|
128
|
+
Center,
|
|
110
129
|
CheckIcon,
|
|
111
130
|
Checkbox,
|
|
112
131
|
ChevronDownIcon,
|
|
113
132
|
ChevronRightIcon,
|
|
114
133
|
CloseIcon,
|
|
134
|
+
Code,
|
|
115
135
|
Container,
|
|
116
136
|
CopyIcon,
|
|
117
137
|
Dialog,
|
|
@@ -134,18 +154,27 @@ export {
|
|
|
134
154
|
FieldLabel,
|
|
135
155
|
FieldSelect,
|
|
136
156
|
FieldTextarea,
|
|
157
|
+
Figure,
|
|
137
158
|
Flex,
|
|
159
|
+
Grid,
|
|
160
|
+
GridItem,
|
|
138
161
|
HStack,
|
|
139
162
|
Heading,
|
|
140
163
|
Hide,
|
|
141
164
|
Icon,
|
|
165
|
+
Image,
|
|
142
166
|
InfoIcon,
|
|
167
|
+
Kbd,
|
|
143
168
|
Link,
|
|
144
169
|
LinkIcon,
|
|
170
|
+
List,
|
|
171
|
+
ListItem,
|
|
172
|
+
Mark,
|
|
145
173
|
Menu,
|
|
146
174
|
MenuIcon,
|
|
147
175
|
MenuItem,
|
|
148
176
|
MoonIcon,
|
|
177
|
+
Prose,
|
|
149
178
|
Radio,
|
|
150
179
|
RadioGroup,
|
|
151
180
|
SEMANTIC_BREAKPOINTS,
|
|
@@ -155,6 +184,7 @@ export {
|
|
|
155
184
|
Select,
|
|
156
185
|
Separator,
|
|
157
186
|
SimpleGrid,
|
|
187
|
+
SkipLink,
|
|
158
188
|
Spinner,
|
|
159
189
|
Stack,
|
|
160
190
|
SunIcon,
|
|
@@ -183,6 +213,7 @@ export {
|
|
|
183
213
|
Tooltip,
|
|
184
214
|
Tr,
|
|
185
215
|
VStack,
|
|
216
|
+
VisuallyHidden,
|
|
186
217
|
WarningIcon,
|
|
187
218
|
normalizeGapValue,
|
|
188
219
|
normalizeResponsiveValue,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { Button } from './components/Button';\nexport { Heading } from './components/Heading';\nexport { Text } from './components/Text';\nexport { Flex } from './components/Flex';\nexport { Stack, HStack, VStack } from './components/Stack';\nexport { Tag } from './components/Tag';\nexport { Badge } from './components/Badge';\nexport { Switch } from './components/Switch';\nexport type { SwitchProps } from './components/Switch';\nexport {\n Field,\n FieldLabel,\n FieldHelper,\n FieldError,\n FieldControl,\n FieldSelect,\n FieldTextarea,\n useField,\n} from './components/Field';\nexport type { FieldSize, FieldContextValue } from './components/Field';\nexport { TextField } from './components/TextField';\nexport { Checkbox } from './components/Checkbox';\nexport { Radio, RadioGroup } from './components/Radio';\nexport type { RadioProps, RadioGroupProps } from './components/Radio';\nexport { Select } from './components/Select';\nexport { Textarea } from './components/Textarea';\nexport {\n Card,\n CardHeader,\n CardBody,\n CardFooter,\n CardTitle,\n CardDescription,\n} from './components/Card';\nexport { SimpleGrid } from './components/SimpleGrid';\nexport { Container } from './components/Container';\nexport type { ContainerProps } from './components/Container';\nexport { Box } from './components/Box';\nexport type { BoxProps } from './components/Box';\nexport { Hide } from './components/Hide';\nexport type { HideProps } from './components/Hide';\nexport { Tooltip } from './components/Tooltip';\nexport type { TooltipPlacement, TooltipProps } from './components/Tooltip';\nexport {\n Dialog,\n DialogHeader,\n DialogBody,\n DialogFooter,\n DialogTitle,\n DialogClose,\n} from './components/Dialog';\nexport {\n Drawer,\n DrawerHeader,\n DrawerBody,\n DrawerFooter,\n DrawerTitle,\n DrawerClose,\n} from './components/Drawer';\nexport { Menu, MenuItem } from './components/Menu';\nexport { Tabs, TabList, Tab, TabPanel } from './components/Tabs';\nexport {\n Table,\n TableCaption,\n TableHeader,\n TableBody,\n TableFooter,\n TableRow,\n TableColumnHeader,\n TableCell,\n Thead,\n Tbody,\n Tfoot,\n Tr,\n Th,\n Td,\n} from './components/Table';\nexport { Spinner } from './components/Spinner';\nexport { Icon } from './components/Icon';\nexport type { IconProps } from './components/Icon';\nexport {\n CheckIcon,\n ChevronDownIcon,\n ChevronRightIcon,\n CloseIcon,\n CopyIcon,\n ExternalLinkIcon,\n InfoIcon,\n LinkIcon,\n MenuIcon,\n MoonIcon,\n SearchIcon,\n SunIcon,\n WarningIcon,\n} from './components/Glyphs';\nexport type { GlyphProps } from './components/Glyphs';\nexport { Link } from './components/Link';\nexport { Separator } from './components/Separator';\nexport type { LabelCustomColors, LabelVisual } from './helpers/labelColors';\nexport type {\n Breakpoint,\n BreakpointAlias,\n BreakpointMap,\n ResponsiveValue,\n GapValue,\n SpacingScale,\n SpacingStep,\n SpacingSemantic,\n SemanticBreakpoint,\n} from './helpers/responsive';\nexport {\n BREAKPOINTS,\n SEMANTIC_BREAKPOINTS,\n SEMANTIC_TO_BREAKPOINT,\n SPACING_SCALE,\n normalizeResponsiveValue,\n normalizeGapValue,\n resolveBreakpointAlias,\n} from './helpers/responsive';\n"],"mappings":"AAAA,SAAS,cAAc;AACvB,SAAS,eAAe;AACxB,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,OAAO,QAAQ,cAAc;AACtC,SAAS,WAAW;AACpB,SAAS,aAAa;AACtB,SAAS,cAAc;AAEvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB;AACzB,SAAS,OAAO,kBAAkB;AAElC,SAAS,cAAc;AACvB,SAAS,gBAAgB;AACzB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAE1B,SAAS,WAAW;AAEpB,SAAS,YAAY;AAErB,SAAS,eAAe;AAExB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,MAAM,gBAAgB;AAC/B,SAAS,MAAM,SAAS,KAAK,gBAAgB;AAC7C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,eAAe;AACxB,SAAS,YAAY;AAErB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAa1B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { Button } from './components/Button';\nexport { Heading } from './components/Heading';\nexport { Text } from './components/Text';\nexport { Flex } from './components/Flex';\nexport { Stack, HStack, VStack } from './components/Stack';\nexport { Tag } from './components/Tag';\nexport { Badge } from './components/Badge';\nexport { Switch } from './components/Switch';\nexport type { SwitchProps } from './components/Switch';\nexport {\n Field,\n FieldLabel,\n FieldHelper,\n FieldError,\n FieldControl,\n FieldSelect,\n FieldTextarea,\n useField,\n} from './components/Field';\nexport type { FieldSize, FieldContextValue } from './components/Field';\nexport { TextField } from './components/TextField';\nexport { Checkbox } from './components/Checkbox';\nexport { Radio, RadioGroup } from './components/Radio';\nexport type { RadioProps, RadioGroupProps } from './components/Radio';\nexport { Select } from './components/Select';\nexport { Textarea } from './components/Textarea';\nexport {\n Card,\n CardHeader,\n CardBody,\n CardFooter,\n CardTitle,\n CardDescription,\n} from './components/Card';\nexport { SimpleGrid } from './components/SimpleGrid';\nexport { Container } from './components/Container';\nexport type { ContainerProps } from './components/Container';\nexport { Box } from './components/Box';\nexport type { BoxProps } from './components/Box';\nexport { Hide } from './components/Hide';\nexport type { HideProps } from './components/Hide';\nexport { Tooltip } from './components/Tooltip';\nexport type { TooltipPlacement, TooltipProps } from './components/Tooltip';\nexport {\n Dialog,\n DialogHeader,\n DialogBody,\n DialogFooter,\n DialogTitle,\n DialogClose,\n} from './components/Dialog';\nexport {\n Drawer,\n DrawerHeader,\n DrawerBody,\n DrawerFooter,\n DrawerTitle,\n DrawerClose,\n} from './components/Drawer';\nexport { Menu, MenuItem } from './components/Menu';\nexport { Tabs, TabList, Tab, TabPanel } from './components/Tabs';\nexport {\n Table,\n TableCaption,\n TableHeader,\n TableBody,\n TableFooter,\n TableRow,\n TableColumnHeader,\n TableCell,\n Thead,\n Tbody,\n Tfoot,\n Tr,\n Th,\n Td,\n} from './components/Table';\nexport { Spinner } from './components/Spinner';\nexport { Icon } from './components/Icon';\nexport type { IconProps } from './components/Icon';\nexport {\n CheckIcon,\n ChevronDownIcon,\n ChevronRightIcon,\n CloseIcon,\n CopyIcon,\n ExternalLinkIcon,\n InfoIcon,\n LinkIcon,\n MenuIcon,\n MoonIcon,\n SearchIcon,\n SunIcon,\n WarningIcon,\n} from './components/Glyphs';\nexport type { GlyphProps } from './components/Glyphs';\nexport { Link } from './components/Link';\nexport { Prose } from './components/Prose';\nexport { List, ListItem } from './components/List';\nexport type { ListProps, ListItemProps } from './components/List';\nexport { Code } from './components/Code';\nexport { Kbd } from './components/Kbd';\nexport { Mark } from './components/Mark';\nexport { Blockquote, BlockquoteCaption } from './components/Blockquote';\nexport type { BlockquoteProps, BlockquoteCaptionProps } from './components/Blockquote';\nexport { Image } from './components/Image';\nexport type { ImageProps } from './components/Image';\nexport { Figure } from './components/Figure';\nexport type { FigureProps } from './components/Figure';\nexport { Avatar } from './components/Avatar';\nexport type { AvatarProps } from './components/Avatar';\nexport { SkipLink } from './components/SkipLink';\nexport { VisuallyHidden } from './components/VisuallyHidden';\nexport { Center } from './components/Center';\nexport type { CenterProps } from './components/Center';\nexport { Grid, GridItem } from './components/Grid';\nexport type { GridProps, GridItemProps } from './components/Grid';\nexport { AspectRatio } from './components/AspectRatio';\nexport type { AspectRatioProps } from './components/AspectRatio';\nexport type { ProseProps } from './components/Prose';\nexport { Separator } from './components/Separator';\nexport type { LabelCustomColors, LabelVisual } from './helpers/labelColors';\nexport type {\n Breakpoint,\n BreakpointAlias,\n BreakpointMap,\n ResponsiveValue,\n GapValue,\n SpacingScale,\n SpacingStep,\n SpacingSemantic,\n SemanticBreakpoint,\n} from './helpers/responsive';\nexport {\n BREAKPOINTS,\n SEMANTIC_BREAKPOINTS,\n SEMANTIC_TO_BREAKPOINT,\n SPACING_SCALE,\n normalizeResponsiveValue,\n normalizeGapValue,\n resolveBreakpointAlias,\n} from './helpers/responsive';\n"],"mappings":"AAAA,SAAS,cAAc;AACvB,SAAS,eAAe;AACxB,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,OAAO,QAAQ,cAAc;AACtC,SAAS,WAAW;AACpB,SAAS,aAAa;AACtB,SAAS,cAAc;AAEvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB;AACzB,SAAS,OAAO,kBAAkB;AAElC,SAAS,cAAc;AACvB,SAAS,gBAAgB;AACzB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAE1B,SAAS,WAAW;AAEpB,SAAS,YAAY;AAErB,SAAS,eAAe;AAExB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,MAAM,gBAAgB;AAC/B,SAAS,MAAM,SAAS,KAAK,gBAAgB;AAC7C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,eAAe;AACxB,SAAS,YAAY;AAErB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,YAAY;AACrB,SAAS,aAAa;AACtB,SAAS,MAAM,gBAAgB;AAE/B,SAAS,YAAY;AACrB,SAAS,WAAW;AACpB,SAAS,YAAY;AACrB,SAAS,YAAY,yBAAyB;AAE9C,SAAS,aAAa;AAEtB,SAAS,cAAc;AAEvB,SAAS,cAAc;AAEvB,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAC/B,SAAS,cAAc;AAEvB,SAAS,MAAM,gBAAgB;AAE/B,SAAS,mBAAmB;AAG5B,SAAS,iBAAiB;AAa1B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
|
|
@@ -42,10 +42,20 @@ Raw elements with inline styles are the most common mistake. Use this table:
|
|
|
42
42
|
| inline `svg` icon | `Icon` around your SVG, or a built-in glyph (`SearchIcon`, `ChevronDownIcon`, …); add `label` only when it carries meaning |
|
|
43
43
|
| `a` | `Link` |
|
|
44
44
|
| `a` styled as a button (call to action) | `Button as="a" href="…"` (anchor props are typed) |
|
|
45
|
+
| HTML from Markdown or MDX (blog posts, docs) | `<Prose as="article">`; wrap embedded components in `data-not-prose` |
|
|
46
|
+
| `ul` / `ol` with `li` | `List` (`as="ol"` for steps, `marker="none"` for nav) + `ListItem` |
|
|
47
|
+
| inline `code`, `kbd`, `mark` | `Code`, `Kbd`, `Mark` |
|
|
48
|
+
| `blockquote` (+ attribution) | `Blockquote cite` + `BlockquoteCaption` |
|
|
49
|
+
| `img` | `Image alt` (required; lazy by default), inside `Figure caption` when captioned |
|
|
50
|
+
| profile photo or initials circle | `Avatar name src` |
|
|
51
|
+
| centered box | `Center` (`inline` for icons in text) |
|
|
52
|
+
| 12-column page layout | `Grid columns={{ base: 1, md: 12 }}` + `GridItem colSpan` |
|
|
53
|
+
| fixed-ratio media (video, map, cover image) | `AspectRatio ratio="8:5"` (`"16:9"` for video) |
|
|
54
|
+
| screen-reader-only text, skip link | `VisuallyHidden`, `SkipLink href="#main"` |
|
|
45
55
|
| custom modal, side panel, dropdown, tabs or tooltip | `Dialog`, `Drawer`, `Menu`, `Tabs`, `Tooltip` |
|
|
46
56
|
|
|
47
|
-
Raw elements are fine for semantics Becket doesn't cover (`form`, `main`, `nav`, `section
|
|
48
|
-
|
|
57
|
+
Raw elements are fine for semantics Becket doesn't cover (`form`, `main`, `nav`, `section`). Render
|
|
58
|
+
them through a layout component's `as` prop when they also lay things out:
|
|
49
59
|
`<VStack as="form" gap="md">`.
|
|
50
60
|
|
|
51
61
|
**Known gaps** (until these ship, an inline `style` with tokens is allowed, with a `TODO` naming the
|
|
@@ -61,10 +71,16 @@ Style with component props, written inline where the component is used. That's B
|
|
|
61
71
|
language: `gap`, `align`, `justify`, `visual`, `size`, `invalid`, `columns`.
|
|
62
72
|
|
|
63
73
|
- **Spacing:** semantic `gap="xs|sm|md|lg|xl"` (or the Fibonacci steps `1 2 3 5 8 13 21 34`). Never
|
|
64
|
-
pixel numbers
|
|
74
|
+
pixel numbers, and never Panda's in-between keys (`4`, `6`, `10`, `12`): they exist but are off
|
|
75
|
+
the scale.
|
|
76
|
+
- **Sizes and ratios:** use the component's `size` prop rather than a width, since its steps are
|
|
77
|
+
already on the scale. For fixed media, use the Fibonacci ratios (`AspectRatio ratio="3:2|8:5|13:8"`,
|
|
78
|
+
or a portrait flip such as `"5:8"`), and `"16:9"` only for video. Don't bring in sizes or ratios
|
|
79
|
+
from another system (`4:3`, 40px avatars).
|
|
65
80
|
- **When you need your own CSS** (a known gap above, or a one-off like `minWidth: 0`), use token
|
|
66
81
|
variables: `var(--beckui--colors-muted)`, `var(--beckui--spacing-lg)`, `var(--beckui--sizes-4xl)`,
|
|
67
|
-
`var(--beckui--radii-md)
|
|
82
|
+
`var(--beckui--radii-md)`; inside running text, `var(--beckui--spacing-text-2)` (em-based). Never hex,
|
|
83
|
+
`rgb()`, or raw `px`/`rem`/`em` values for spacing and color, since they ignore the app's theme overrides.
|
|
68
84
|
- **Must not** write or copy `.beckui--*` class names. They're generated, not API.
|
|
69
85
|
- **Avoid** named styled wrappers, CSS files per screen, or style objects defined away from the
|
|
70
86
|
element. A reader shouldn't have to look anything up to see how an element looks.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@becket-ui/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Becket React component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@becket-ui/tokens": "^0.
|
|
41
|
+
"@becket-ui/tokens": "^0.4.0",
|
|
42
42
|
"react": ">=19",
|
|
43
43
|
"react-dom": ">=19"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@becket-ui/a11y": "0.0.0",
|
|
47
|
-
"@becket-ui/tokens": "0.
|
|
47
|
+
"@becket-ui/tokens": "0.4.0",
|
|
48
48
|
"@pandacss/dev": "^1.12.1",
|
|
49
49
|
"@storybook/react": "^10.6.0",
|
|
50
50
|
"@storybook/react-vite": "^10.6.0",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"vitest": "^5.0.0"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
|
-
"build": "tsup && tsc --emitDeclarationOnly -p tsconfig.build.json",
|
|
65
|
+
"build": "tsup && tsc --emitDeclarationOnly -p tsconfig.build.json && node scripts/add-js-extensions.mjs",
|
|
66
66
|
"test": "vitest run",
|
|
67
67
|
"storybook": "storybook dev -p 6006 -c ../../apps/docs/.storybook --project-root ../../apps/docs",
|
|
68
68
|
"build-storybook": "storybook build -c ../../apps/docs/.storybook --project-root ../../apps/docs"
|