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

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 (55) hide show
  1. package/build/cjs/index.js +51 -6
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/esm/Alert/Alert.d.ts +1 -1
  4. package/build/esm/Alert/Alert.js.map +1 -1
  5. package/build/esm/AppBar/AppBarButton.d.ts +1 -1
  6. package/build/esm/BottomSheet/BottomSheet.d.ts +1 -1
  7. package/build/esm/BottomSheet/BottomSheetSurface.d.ts +1 -1
  8. package/build/esm/Button/Button.d.ts +1 -1
  9. package/build/esm/Button/ButtonGroup.d.ts +1 -1
  10. package/build/esm/Button/ButtonGroup.js.map +1 -1
  11. package/build/esm/Button/FilledButton.d.ts +1 -1
  12. package/build/esm/Button/FilledButton.js +17 -2
  13. package/build/esm/Button/FilledButton.js.map +1 -1
  14. package/build/esm/Button/OutlinedButton.d.ts +1 -1
  15. package/build/esm/Button/OutlinedButton.js +17 -2
  16. package/build/esm/Button/OutlinedButton.js.map +1 -1
  17. package/build/esm/Button/TransparentButton.d.ts +1 -1
  18. package/build/esm/Button/TransparentButton.js +17 -2
  19. package/build/esm/Button/TransparentButton.js.map +1 -1
  20. package/build/esm/CheckBox/CheckBox.d.ts +1 -1
  21. package/build/esm/Chip/ButtonChip.d.ts +1 -1
  22. package/build/esm/Chip/ChoiceChip.d.ts +1 -1
  23. package/build/esm/Combobox/Combobox.d.ts +7 -7
  24. package/build/esm/Dialog/Dialog.d.ts +1 -1
  25. package/build/esm/Dialog/DialogBackdrop.d.ts +1 -1
  26. package/build/esm/Dialog/DialogSurface.d.ts +1 -1
  27. package/build/esm/Menu/Menu.d.ts +5 -5
  28. package/build/esm/NavRail/NavRailItem.d.ts +3 -3
  29. package/build/esm/Popover/Popover.d.ts +1 -1
  30. package/build/esm/Popover/PopoverSurface.d.ts +1 -1
  31. package/build/esm/RadioButton/RadioGroup.d.ts +1 -1
  32. package/build/esm/Select/CustomContainerExample.d.ts +1 -1
  33. package/build/esm/Slider/Slider.d.ts +6 -6
  34. package/build/esm/Snackbar/Snackbar.d.ts +1 -1
  35. package/build/esm/Switch/Switch.d.ts +1 -1
  36. package/build/esm/Tab/Tab.d.ts +1 -1
  37. package/build/esm/Tab/TabList.d.ts +1 -1
  38. package/build/esm/Tab/TabPanel.d.ts +1 -1
  39. package/build/esm/TabIndicator/TabIndicator.d.ts +1 -1
  40. package/build/esm/Table/TableHead.d.ts +1 -1
  41. package/build/esm/TextField/TextField.d.ts +1 -1
  42. package/build/esm/Tooltip/Tooltip.d.ts +1 -1
  43. package/build/esm/color.js.map +1 -1
  44. package/build/esm/theme/theme.js.map +1 -1
  45. package/build/tsconfig-build.tsbuildinfo +1 -1
  46. package/package.json +3 -3
  47. package/src/Alert/Alert.story.tsx +28 -28
  48. package/src/Alert/Alert.tsx +33 -33
  49. package/src/Button/ButtonGroup.story.tsx +131 -106
  50. package/src/Button/ButtonGroup.tsx +35 -35
  51. package/src/Button/FilledButton.tsx +16 -1
  52. package/src/Button/OutlinedButton.tsx +62 -47
  53. package/src/Button/TransparentButton.tsx +16 -1
  54. package/src/color.ts +84 -84
  55. package/src/theme/theme.ts +499 -499
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basic-ui/material",
3
- "version": "1.0.0-alpha.44",
3
+ "version": "1.0.0-alpha.46",
4
4
  "description": "Accessible React Components used as building blocks for UI patterns",
5
5
  "author": "Lucas Terra <lucasterra7@gmail.com>",
6
6
  "license": "MIT",
@@ -30,7 +30,7 @@
30
30
  "test:watch": "yarn test --watch"
31
31
  },
32
32
  "dependencies": {
33
- "@basic-ui/core": "^0.0.52",
33
+ "@basic-ui/core": "^0.0.53",
34
34
  "@basic-ui/dynamic-theme": "^0.0.11",
35
35
  "@styled-system/should-forward-prop": "5.1.5",
36
36
  "@types/styled-system": "^5.1.10",
@@ -62,5 +62,5 @@
62
62
  "react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0",
63
63
  "tailwindcss": "^3.0.0"
64
64
  },
65
- "gitHead": "fc731d3f336d3dce8bcf3b6589d724883bc66c7a"
65
+ "gitHead": "006bc0e1e68809669136f96dc66f2e591bffbfb7"
66
66
  }
@@ -1,28 +1,28 @@
1
- import { Alert } from './';
2
- import { Link } from '../Link';
3
- // import './styles.css';
4
-
5
- export default {
6
- title: 'Components/Alert',
7
- };
8
-
9
- export const Controlled = () => {
10
- const color = ['primary', 'secondary', 'error'];
11
- return (
12
- <>
13
- {color.map((c) => (
14
- <Alert color={c} key={c} m={3}>
15
- You can use{' '}
16
- <Link
17
- target="__blank"
18
- rel="noopener noreferrer"
19
- href="https://stripe.com/docs/connect/testing#account-numbers"
20
- >
21
- test accounts
22
- </Link>{' '}
23
- to simulate events and verify your integration.
24
- </Alert>
25
- ))}
26
- </>
27
- );
28
- };
1
+ import { Alert } from './';
2
+ import { Link } from '../Link';
3
+ // import './styles.css';
4
+
5
+ export default {
6
+ title: 'Components/Alert',
7
+ };
8
+
9
+ export const Controlled = () => {
10
+ const color = ['primary', 'secondary', 'error'];
11
+ return (
12
+ <>
13
+ {color.map((c) => (
14
+ <Alert color={c} key={c} m={3}>
15
+ You can use{' '}
16
+ <Link
17
+ target="__blank"
18
+ rel="noopener noreferrer"
19
+ href="https://stripe.com/docs/connect/testing#account-numbers"
20
+ >
21
+ test accounts
22
+ </Link>{' '}
23
+ to simulate events and verify your integration.
24
+ </Alert>
25
+ ))}
26
+ </>
27
+ );
28
+ };
@@ -1,33 +1,33 @@
1
- import { rem } from 'polished';
2
- import { forwardRef } from 'react';
3
-
4
- import { alpha } from '../color';
5
- import type { TextProps } from '../Text';
6
- import { Text } from '../Text';
7
-
8
- export type AlertProps = TextProps & { color?: string };
9
-
10
- export const Alert = forwardRef<HTMLDivElement, AlertProps>(function Alert(
11
- props,
12
- forwardedRef
13
- ) {
14
- const { as = 'div', color = 'secondary', __css, ...otherProps } = props;
15
-
16
- return (
17
- <Text
18
- ref={forwardedRef}
19
- as={as}
20
- variant="body-medium"
21
- __css={{
22
- p: 3,
23
- bg: alpha(color, 0.1),
24
- borderRadius: 'extra-small',
25
- borderColor: alpha(color, 0.2),
26
- borderStyle: 'solid',
27
- borderWidth: rem(1),
28
- ...__css,
29
- }}
30
- {...otherProps}
31
- />
32
- );
33
- });
1
+ import { rem } from 'polished';
2
+ import { forwardRef } from 'react';
3
+
4
+ import { alpha } from '../color';
5
+ import type { TextProps } from '../Text';
6
+ import { Text } from '../Text';
7
+
8
+ export type AlertProps = TextProps & { color?: string };
9
+
10
+ export const Alert = forwardRef<HTMLDivElement, AlertProps>(function Alert(
11
+ props,
12
+ forwardedRef
13
+ ) {
14
+ const { as = 'div', color = 'secondary', __css, ...otherProps } = props;
15
+
16
+ return (
17
+ <Text
18
+ ref={forwardedRef}
19
+ as={as}
20
+ variant="body-medium"
21
+ __css={{
22
+ p: 3,
23
+ bg: alpha(color, 0.1),
24
+ borderRadius: 'extra-small',
25
+ borderColor: alpha(color, 0.2),
26
+ borderStyle: 'solid',
27
+ borderWidth: rem(1),
28
+ ...__css,
29
+ }}
30
+ {...otherProps}
31
+ />
32
+ );
33
+ });
@@ -1,106 +1,131 @@
1
- import { Box } from '../Box';
2
- import { Button } from './Button';
3
- import { ButtonGroup as BaseButtonGroup } from './ButtonGroup';
4
-
5
- export default { title: 'components/ButtonGroup' };
6
-
7
- const Example = () => {
8
- return (
9
- <Box sx={{ gap: 24, flexDirection: 'column', display: 'flex' }}>
10
- <BaseButtonGroup variant="text">
11
- <Button>Hello</Button>
12
- <Button>Hello</Button>
13
- </BaseButtonGroup>
14
- <BaseButtonGroup variant="text">
15
- <Button>Hello</Button>
16
- <Button>Hello</Button>
17
- <Button>Hello</Button>
18
- </BaseButtonGroup>
19
- <BaseButtonGroup variant="text">
20
- <Button>Hello</Button>
21
- <Button disabled>Hello</Button>
22
- <Button>Hello</Button>
23
- </BaseButtonGroup>
24
- <BaseButtonGroup variant="filled">
25
- <Button>Hello</Button>
26
- <Button>Hello</Button>
27
- </BaseButtonGroup>
28
- <BaseButtonGroup variant="filled">
29
- <Button>Hello</Button>
30
- <Button>Hello</Button>
31
- <Button>Hello</Button>
32
- </BaseButtonGroup>
33
- <BaseButtonGroup variant="filled">
34
- <Button>Hello</Button>
35
- <Button disabled>Hello</Button>
36
- <Button>Hello</Button>
37
- </BaseButtonGroup>
38
- <BaseButtonGroup variant="outlined">
39
- <Button>Hello</Button>
40
- <Button>Hello</Button>
41
- </BaseButtonGroup>
42
- <BaseButtonGroup variant="outlined">
43
- <Button>Hello</Button>
44
- <Button>Hello</Button>
45
- <Button>Hello</Button>
46
- </BaseButtonGroup>
47
- <BaseButtonGroup variant="outlined">
48
- <Button>Hello</Button>
49
- <Button disabled>Hello</Button>
50
- <Button>Hello</Button>
51
- </BaseButtonGroup>
52
- </Box>
53
- );
54
- };
55
-
56
- const Pressable = () => {
57
- return (
58
- <Box sx={{ gap: 24, flexDirection: 'column', display: 'flex' }}>
59
- <BaseButtonGroup variant="text">
60
- <Button aria-pressed="true">Hello</Button>
61
- <Button>Hello</Button>
62
- </BaseButtonGroup>
63
- <BaseButtonGroup variant="text">
64
- <Button aria-pressed="true">Hello</Button>
65
- <Button>Hello</Button>
66
- <Button>Hello</Button>
67
- </BaseButtonGroup>
68
- <BaseButtonGroup variant="text">
69
- <Button aria-pressed="true">Hello</Button>
70
- <Button disabled>Hello</Button>
71
- <Button>Hello</Button>
72
- </BaseButtonGroup>
73
- <BaseButtonGroup variant="filled">
74
- <Button aria-pressed="true">Hello</Button>
75
- <Button>Hello</Button>
76
- </BaseButtonGroup>
77
- <BaseButtonGroup variant="filled">
78
- <Button aria-pressed="true">Hello</Button>
79
- <Button>Hello</Button>
80
- <Button>Hello</Button>
81
- </BaseButtonGroup>
82
- <BaseButtonGroup variant="filled">
83
- <Button aria-pressed="true">Hello</Button>
84
- <Button disabled>Hello</Button>
85
- <Button>Hello</Button>
86
- </BaseButtonGroup>
87
- <BaseButtonGroup variant="outlined">
88
- <Button aria-pressed="true">Hello</Button>
89
- <Button>Hello</Button>
90
- </BaseButtonGroup>
91
- <BaseButtonGroup variant="outlined">
92
- <Button aria-pressed="true">Hello</Button>
93
- <Button>Hello</Button>
94
- <Button>Hello</Button>
95
- </BaseButtonGroup>
96
- <BaseButtonGroup variant="outlined">
97
- <Button aria-pressed="true">Hello</Button>
98
- <Button disabled>Hello</Button>
99
- <Button>Hello</Button>
100
- </BaseButtonGroup>
101
- </Box>
102
- );
103
- };
104
-
105
- export const ButtonGroup = () => <Example />;
106
- export const ButtonGroupPressable = () => <Pressable />;
1
+ import { Box } from '../Box';
2
+ import { Button } from './Button';
3
+ import { ButtonGroup as BaseButtonGroup } from './ButtonGroup';
4
+
5
+ export default { title: 'components/ButtonGroup' };
6
+
7
+ const Example = () => {
8
+ return (
9
+ <Box sx={{ gap: 24, flexDirection: 'row', display: 'flex' }}>
10
+ {(['text', 'filled', 'outlined'] as const).map((variant) => (
11
+ <Box
12
+ sx={{ gap: 24, flexDirection: 'column', display: 'flex' }}
13
+ key={variant}
14
+ >
15
+ <BaseButtonGroup variant={variant}>
16
+ <Button>Hello</Button>
17
+ <Button>Hello</Button>
18
+ </BaseButtonGroup>
19
+
20
+ <BaseButtonGroup variant={variant}>
21
+ <Button disabled>Hello</Button>
22
+ <Button>Hello</Button>
23
+ </BaseButtonGroup>
24
+ <BaseButtonGroup variant={variant}>
25
+ <Button>Hello</Button>
26
+ <Button disabled>Hello</Button>
27
+ </BaseButtonGroup>
28
+ <BaseButtonGroup variant={variant}>
29
+ <Button disabled>Hello</Button>
30
+ <Button disabled>Hello</Button>
31
+ </BaseButtonGroup>
32
+
33
+ <BaseButtonGroup variant={variant}>
34
+ <Button>Hello</Button>
35
+ <Button>Hello</Button>
36
+ <Button>Hello</Button>
37
+ </BaseButtonGroup>
38
+
39
+ <BaseButtonGroup variant={variant}>
40
+ <Button disabled>Hello</Button>
41
+ <Button disabled>Hello</Button>
42
+ <Button disabled>Hello</Button>
43
+ </BaseButtonGroup>
44
+
45
+ <BaseButtonGroup variant={variant}>
46
+ <Button disabled>Hello</Button>
47
+ <Button>Hello</Button>
48
+ <Button>Hello</Button>
49
+ </BaseButtonGroup>
50
+ <BaseButtonGroup variant={variant}>
51
+ <Button>Hello</Button>
52
+ <Button disabled>Hello</Button>
53
+ <Button>Hello</Button>
54
+ </BaseButtonGroup>
55
+ <BaseButtonGroup variant={variant}>
56
+ <Button>Hello</Button>
57
+ <Button>Hello</Button>
58
+ <Button disabled>Hello</Button>
59
+ </BaseButtonGroup>
60
+ <BaseButtonGroup variant={variant}>
61
+ <Button>Hello</Button>
62
+ <Button disabled>Hello</Button>
63
+ <Button disabled>Hello</Button>
64
+ </BaseButtonGroup>
65
+ <BaseButtonGroup variant={variant}>
66
+ <Button disabled>Hello</Button>
67
+ <Button>Hello</Button>
68
+ <Button disabled>Hello</Button>
69
+ </BaseButtonGroup>
70
+ <BaseButtonGroup variant={variant}>
71
+ <Button disabled>Hello</Button>
72
+ <Button disabled>Hello</Button>
73
+ <Button>Hello</Button>
74
+ </BaseButtonGroup>
75
+ </Box>
76
+ ))}
77
+ </Box>
78
+ );
79
+ };
80
+
81
+ const Pressable = () => {
82
+ return (
83
+ <Box sx={{ gap: 24, flexDirection: 'column', display: 'flex' }}>
84
+ <BaseButtonGroup variant="text">
85
+ <Button aria-pressed="true">Hello</Button>
86
+ <Button>Hello</Button>
87
+ </BaseButtonGroup>
88
+ <BaseButtonGroup variant="text">
89
+ <Button aria-pressed="true">Hello</Button>
90
+ <Button>Hello</Button>
91
+ <Button>Hello</Button>
92
+ </BaseButtonGroup>
93
+ <BaseButtonGroup variant="text">
94
+ <Button aria-pressed="true">Hello</Button>
95
+ <Button disabled>Hello</Button>
96
+ <Button>Hello</Button>
97
+ </BaseButtonGroup>
98
+ <BaseButtonGroup variant="filled">
99
+ <Button aria-pressed="true">Hello</Button>
100
+ <Button>Hello</Button>
101
+ </BaseButtonGroup>
102
+ <BaseButtonGroup variant="filled">
103
+ <Button aria-pressed="true">Hello</Button>
104
+ <Button>Hello</Button>
105
+ <Button>Hello</Button>
106
+ </BaseButtonGroup>
107
+ <BaseButtonGroup variant="filled">
108
+ <Button aria-pressed="true">Hello</Button>
109
+ <Button disabled>Hello</Button>
110
+ <Button>Hello</Button>
111
+ </BaseButtonGroup>
112
+ <BaseButtonGroup variant="outlined">
113
+ <Button aria-pressed="true">Hello</Button>
114
+ <Button>Hello</Button>
115
+ </BaseButtonGroup>
116
+ <BaseButtonGroup variant="outlined">
117
+ <Button aria-pressed="true">Hello</Button>
118
+ <Button>Hello</Button>
119
+ <Button>Hello</Button>
120
+ </BaseButtonGroup>
121
+ <BaseButtonGroup variant="outlined">
122
+ <Button aria-pressed="true">Hello</Button>
123
+ <Button disabled>Hello</Button>
124
+ <Button>Hello</Button>
125
+ </BaseButtonGroup>
126
+ </Box>
127
+ );
128
+ };
129
+
130
+ export const ButtonGroup = () => <Example />;
131
+ export const ButtonGroupPressable = () => <Pressable />;
@@ -1,35 +1,35 @@
1
- import { forwardRef, useMemo } from 'react';
2
-
3
- import type { ButtonProps } from './Button';
4
- import type { ButtonGroupContextProps } from './context';
5
- import { ButtonGroupContext } from './context';
6
-
7
- export type ButtonGroupProps = ButtonProps & ButtonGroupContextProps;
8
-
9
- export const ButtonGroup = forwardRef<HTMLDivElement, ButtonGroupProps>(
10
- function ButtonGroup(props, forwardedRef) {
11
- const {
12
- as: Comp = 'div',
13
- variant = 'text',
14
- direction = 'row',
15
- ...otherProps
16
- } = props;
17
-
18
- const value: ButtonGroupContextProps = useMemo(
19
- () => ({ direction, variant }),
20
- [direction, variant]
21
- );
22
-
23
- return (
24
- <ButtonGroupContext.Provider value={value}>
25
- <Comp
26
- ref={forwardedRef}
27
- role="group"
28
- data-button-group=""
29
- data-button-group-direction={direction}
30
- {...otherProps}
31
- />
32
- </ButtonGroupContext.Provider>
33
- );
34
- }
35
- );
1
+ import { forwardRef, useMemo } from 'react';
2
+
3
+ import type { ButtonProps } from './Button';
4
+ import type { ButtonGroupContextProps } from './context';
5
+ import { ButtonGroupContext } from './context';
6
+
7
+ export type ButtonGroupProps = ButtonProps & ButtonGroupContextProps;
8
+
9
+ export const ButtonGroup = forwardRef<HTMLDivElement, ButtonGroupProps>(
10
+ function ButtonGroup(props, forwardedRef) {
11
+ const {
12
+ as: Comp = 'div',
13
+ variant = 'text',
14
+ direction = 'row',
15
+ ...otherProps
16
+ } = props;
17
+
18
+ const value: ButtonGroupContextProps = useMemo(
19
+ () => ({ direction, variant }),
20
+ [direction, variant]
21
+ );
22
+
23
+ return (
24
+ <ButtonGroupContext.Provider value={value}>
25
+ <Comp
26
+ ref={forwardedRef}
27
+ role="group"
28
+ data-button-group=""
29
+ data-button-group-direction={direction}
30
+ {...otherProps}
31
+ />
32
+ </ButtonGroupContext.Provider>
33
+ );
34
+ }
35
+ );
@@ -53,8 +53,23 @@ export const FilledButton = styled(BaseButton)(
53
53
  borderLeftStyle: 'solid',
54
54
  borderLeftWidth: rem(1),
55
55
  },
56
+ // Handling the border between enabled/disabled buttons
57
+ ':not(:disabled):has(+ :disabled)': {
58
+ borderRightWidth: rem(1),
59
+ borderRightStyle: 'solid',
60
+ },
61
+ ':disabled + :not(:disabled)': {
62
+ borderLeftWidth: rem(1),
63
+ borderLeftStyle: 'solid',
64
+ },
65
+ ':not(:disabled) + :disabled': {
66
+ borderLeftWidth: rem(0),
67
+ },
68
+ ':disabled:has(+ :not(:disabled))': {
69
+ borderRightWidth: rem(0),
70
+ },
56
71
  ':last-of-type:nth-of-type(2)': {
57
- borderLeftWidth: 0,
72
+ borderLeftWidth: rem(0),
58
73
  },
59
74
  },
60
75
  }
@@ -1,47 +1,62 @@
1
- import styled from '@emotion/styled';
2
- import { css } from '@styled-system/css';
3
- import { rem } from 'polished';
4
-
5
- import { alpha } from '../color';
6
- import { TransparentButton } from './TransparentButton';
7
-
8
- export const OutlinedButton = styled(TransparentButton)(
9
- css({
10
- borderStyle: 'solid',
11
- borderWidth: rem(1),
12
- borderColor: 'outline',
13
- boxShadow: 0,
14
- '&:focus,:&active,:&hover': { boxShadow: 0 },
15
- '&:focus-visible,&:active': {
16
- borderColor: 'currentColor',
17
- },
18
- '&:disabled': {
19
- color: alpha('on.surface', 0.38),
20
- borderColor: alpha('outline', 0.12),
21
- cursor: 'default',
22
- },
23
- }),
24
- ({ isGroupedButton = false }) =>
25
- isGroupedButton && {
26
- '[data-button-group=""] &': {
27
- ':first-of-type': {
28
- borderTopRightRadius: 0,
29
- borderBottomRightRadius: 0,
30
- },
31
- ':not(:first-of-type):not(:last-of-type)': {
32
- borderRadius: 0,
33
- borderRightWidth: 0,
34
- borderLeftWidth: 0,
35
- },
36
- ':last-of-type': {
37
- borderTopLeftRadius: 0,
38
- borderBottomLeftRadius: 0,
39
- borderLeftStyle: 'solid',
40
- borderLeftWidth: rem(1),
41
- },
42
- ':last-of-type:nth-of-type(2)': {
43
- borderLeftWidth: 0,
44
- },
45
- },
46
- }
47
- );
1
+ import styled from '@emotion/styled';
2
+ import { css } from '@styled-system/css';
3
+ import { rem } from 'polished';
4
+
5
+ import { alpha } from '../color';
6
+ import { TransparentButton } from './TransparentButton';
7
+
8
+ export const OutlinedButton = styled(TransparentButton)(
9
+ css({
10
+ borderStyle: 'solid',
11
+ borderWidth: rem(1),
12
+ borderColor: 'outline',
13
+ boxShadow: 0,
14
+ '&:focus,:&active,:&hover': { boxShadow: 0 },
15
+ '&:focus-visible,&:active': {
16
+ borderColor: 'currentColor',
17
+ },
18
+ '&:disabled': {
19
+ color: alpha('on.surface', 0.38),
20
+ borderColor: alpha('outline', 0.12),
21
+ cursor: 'default',
22
+ },
23
+ }),
24
+ ({ isGroupedButton = false }) =>
25
+ isGroupedButton && {
26
+ '[data-button-group=""] &': {
27
+ ':first-of-type': {
28
+ borderTopRightRadius: 0,
29
+ borderBottomRightRadius: 0,
30
+ },
31
+ ':not(:first-of-type):not(:last-of-type)': {
32
+ borderRadius: 0,
33
+ borderRightWidth: 0,
34
+ borderLeftWidth: 0,
35
+ },
36
+ ':last-of-type': {
37
+ borderTopLeftRadius: 0,
38
+ borderBottomLeftRadius: 0,
39
+ borderLeftStyle: 'solid',
40
+ borderLeftWidth: rem(1),
41
+ },
42
+ // Handling the border between enabled/disabled buttons
43
+ ':not(:disabled):has(+ :disabled)': {
44
+ borderRightWidth: rem(1),
45
+ borderRightStyle: 'solid',
46
+ },
47
+ ':disabled + :not(:disabled)': {
48
+ borderLeftWidth: rem(1),
49
+ borderLeftStyle: 'solid',
50
+ },
51
+ ':not(:disabled) + :disabled': {
52
+ borderLeftWidth: rem(0),
53
+ },
54
+ ':disabled:has(+ :not(:disabled))': {
55
+ borderRightWidth: rem(0),
56
+ },
57
+ ':last-of-type:nth-of-type(2)': {
58
+ borderLeftWidth: rem(0),
59
+ },
60
+ },
61
+ }
62
+ );
@@ -40,8 +40,23 @@ export const TransparentButton = styled(BaseButton)(
40
40
  borderLeftStyle: 'solid',
41
41
  borderLeftWidth: rem(1),
42
42
  },
43
+ // Handling the border between enabled/disabled buttons
44
+ ':not(:disabled):has(+ :disabled)': {
45
+ borderRightWidth: rem(1),
46
+ borderRightStyle: 'solid',
47
+ },
48
+ ':disabled + :not(:disabled)': {
49
+ borderLeftWidth: rem(1),
50
+ borderLeftStyle: 'solid',
51
+ },
52
+ ':not(:disabled) + :disabled': {
53
+ borderLeftWidth: rem(0),
54
+ },
55
+ ':disabled:has(+ :not(:disabled))': {
56
+ borderRightWidth: rem(0),
57
+ },
43
58
  ':last-of-type:nth-of-type(2)': {
44
- borderLeftWidth: 0,
59
+ borderLeftWidth: rem(0),
45
60
  },
46
61
  },
47
62
  }