@basic-ui/material 1.0.0-alpha.46 → 1.0.0-alpha.48

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.
@@ -1,31 +1,29 @@
1
- import { forwardRef } from 'react';
2
- import { rem } from 'polished';
3
-
4
- import { TableHeadProvider } from './context';
5
- import type { TableBodyProps } from './TableBody';
6
- import { TableBody } from './TableBody';
7
- import { mixColor } from '../color';
8
-
9
- export type TableHeadProps = TableBodyProps;
10
-
11
- export const TableHead = forwardRef<HTMLDivElement, TableHeadProps>(
12
- (props, ref) => {
13
- const { children, __css, ...rest } = props;
14
-
15
- return (
16
- <TableBody
17
- ref={ref}
18
- __css={{
19
- borderBottomStyle: 'solid',
20
- borderBottomWidth: rem(1),
21
- borderBottomColor: 'surface-variant',
22
- background: mixColor('surface', 'primary', 0.05),
23
- ...__css,
24
- }}
25
- {...rest}
26
- >
27
- <TableHeadProvider value={true}>{children}</TableHeadProvider>
28
- </TableBody>
29
- );
30
- }
31
- );
1
+ import { forwardRef } from 'react';
2
+ import { rem } from 'polished';
3
+
4
+ import { TableHeadProvider } from './context';
5
+ import type { TableBodyProps } from './TableBody';
6
+ import { TableBody } from './TableBody';
7
+
8
+ export type TableHeadProps = TableBodyProps;
9
+
10
+ export const TableHead = forwardRef<HTMLDivElement, TableHeadProps>(
11
+ (props, ref) => {
12
+ const { children, __css, ...rest } = props;
13
+
14
+ return (
15
+ <TableBody
16
+ ref={ref}
17
+ __css={{
18
+ borderBottomStyle: 'solid',
19
+ borderBottomWidth: rem(1),
20
+ borderBottomColor: 'surface-variant',
21
+ ...__css,
22
+ }}
23
+ {...rest}
24
+ >
25
+ <TableHeadProvider value={true}>{children}</TableHeadProvider>
26
+ </TableBody>
27
+ );
28
+ }
29
+ );
@@ -1,38 +1,38 @@
1
- import { forwardRef } from 'react';
2
- import { rem } from 'polished';
3
-
4
- import type { TextProps } from '../Text';
5
- import { Text } from '../Text';
6
-
7
- export type TableRowProps = TextProps;
8
-
9
- export const TableRow = forwardRef<HTMLDivElement, TableRowProps>(
10
- (props, ref) => {
11
- const { children, __css, ...rest } = props;
12
-
13
- return (
14
- <Text
15
- ref={ref}
16
- as="div"
17
- role="row"
18
- display="flex"
19
- flexDirection="row"
20
- width="100%"
21
- variant="body-medium"
22
- px={2}
23
- __css={{
24
- borderBottomStyle: 'solid',
25
- borderBottomWidth: rem(1),
26
- borderBottomColor: 'surface-variant',
27
- '&:last-of-type': {
28
- borderBottom: 'none',
29
- },
30
- ...__css,
31
- }}
32
- {...rest}
33
- >
34
- {children}
35
- </Text>
36
- );
37
- }
38
- );
1
+ import { forwardRef } from 'react';
2
+ import { rem } from 'polished';
3
+
4
+ import type { TextProps } from '../Text';
5
+ import { Text } from '../Text';
6
+
7
+ export type TableRowProps = TextProps;
8
+
9
+ export const TableRow = forwardRef<HTMLDivElement, TableRowProps>(
10
+ (props, ref) => {
11
+ const { children, __css, ...rest } = props;
12
+
13
+ return (
14
+ <Text
15
+ ref={ref}
16
+ as="div"
17
+ role="row"
18
+ variant="body-medium"
19
+ px={2}
20
+ __css={{
21
+ display: 'flex',
22
+ flexDirection: 'row',
23
+ width: '100%',
24
+ borderBottomStyle: 'solid',
25
+ borderBottomWidth: rem(1),
26
+ borderBottomColor: 'surface-variant',
27
+ '&:last-of-type': {
28
+ borderBottom: 'none',
29
+ },
30
+ ...__css,
31
+ }}
32
+ {...rest}
33
+ >
34
+ {children}
35
+ </Text>
36
+ );
37
+ }
38
+ );
@@ -1,5 +1,5 @@
1
- export * from './Table';
2
- export * from './TableHead';
3
- export * from './TableBody';
4
- export * from './TableCell';
5
- export * from './TableRow';
1
+ export * from './Table';
2
+ export * from './TableHead';
3
+ export * from './TableBody';
4
+ export * from './TableCell';
5
+ export * from './TableRow';