@loadsmart/loadsmart-ui 5.11.0 → 5.11.2-beta.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 (56) hide show
  1. package/dist/index.js +490 -340
  2. package/dist/index.js.map +1 -1
  3. package/dist/testing/SelectEvent/SelectEvent.d.ts +2 -0
  4. package/dist/testing/index.js +1 -1
  5. package/dist/testing/index.js.map +1 -1
  6. package/package.json +8 -7
  7. package/src/common/CloseButton/CloseButton.tsx +11 -7
  8. package/src/common/SelectionWrapper.tsx +7 -7
  9. package/src/components/Accordion/Accordion.tsx +28 -22
  10. package/src/components/Banner/Banner.tsx +2 -2
  11. package/src/components/Breadcrumbs/Breadcrumb.tsx +3 -2
  12. package/src/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
  13. package/src/components/Button/Button.tsx +20 -17
  14. package/src/components/Calendar/Calendar.tsx +8 -4
  15. package/src/components/Calendar/PickerModeToggle.tsx +6 -3
  16. package/src/components/Calendar/Pickers/DayPicker.tsx +1 -1
  17. package/src/components/Calendar/Pickers/MonthPicker.tsx +1 -1
  18. package/src/components/Calendar/Pickers/PickerButton.tsx +39 -29
  19. package/src/components/Calendar/Pickers/YearPicker.tsx +1 -1
  20. package/src/components/Card/Card.tsx +9 -6
  21. package/src/components/Card/CardTitle.tsx +3 -4
  22. package/src/components/Checkbox/Checkbox.tsx +26 -14
  23. package/src/components/Dialog/Dialog.tsx +5 -5
  24. package/src/components/DragDropFile/styles.tsx +11 -6
  25. package/src/components/Drawer/Drawer.tsx +6 -6
  26. package/src/components/Dropdown/DropdownMenu.tsx +28 -15
  27. package/src/components/Dropdown/DropdownTrigger.tsx +34 -24
  28. package/src/components/HighlightMatch/HighlightMatch.tsx +1 -2
  29. package/src/components/Label/Label.tsx +3 -3
  30. package/src/components/Link/Link.tsx +13 -9
  31. package/src/components/Loaders/LoadingBar.tsx +2 -2
  32. package/src/components/Modal/Modal.tsx +12 -7
  33. package/src/components/ProgressBar/ProgressBar.tsx +6 -4
  34. package/src/components/Radio/Radio.tsx +19 -11
  35. package/src/components/Section/Section.tsx +8 -6
  36. package/src/components/Select/Select.test.tsx +161 -161
  37. package/src/components/Select/SelectEmpty.tsx +5 -4
  38. package/src/components/Select/SelectTrigger.tsx +11 -6
  39. package/src/components/SideNavigation/Menu/Menu.tsx +3 -3
  40. package/src/components/SideNavigation/Menu/MenuBaseItem.tsx +5 -4
  41. package/src/components/SideNavigation/Menu/MenuExpandable.tsx +3 -2
  42. package/src/components/Steps/ProgressSteps/ProgressStep.tsx +39 -31
  43. package/src/components/Switch/Switch.tsx +18 -6
  44. package/src/components/Table/Table.tsx +2 -2
  45. package/src/components/Tabs/Tabs.tsx +32 -26
  46. package/src/components/Tag/Tag.tsx +44 -35
  47. package/src/components/TextField/TextField.tsx +22 -15
  48. package/src/components/Textarea/Textarea.tsx +22 -17
  49. package/src/components/Toast/Toast.tsx +3 -3
  50. package/src/components/ToggleGroup/Toggle.tsx +7 -7
  51. package/src/components/ToggleGroup/ToggleGroup.stories.tsx +14 -12
  52. package/src/components/Tooltip/Tooltip.tsx +22 -20
  53. package/src/components/TopNavigation/Menu/MenuItemDropdown.tsx +1 -1
  54. package/src/components/TopNavigation/OpenSideNavButton/OpenSideNavButton.tsx +1 -1
  55. package/src/styles/font.tsx +3 -3
  56. package/src/testing/SelectEvent/SelectEvent.ts +94 -66
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loadsmart/loadsmart-ui",
3
- "version": "5.11.0",
3
+ "version": "5.11.2-beta.1",
4
4
  "description": "Miranda UI, a React UI library",
5
5
  "main": "dist",
6
6
  "files": [
@@ -78,7 +78,7 @@
78
78
  "@babel/preset-typescript": "7.13.0",
79
79
  "@commitlint/cli": "16.0.2",
80
80
  "@commitlint/config-conventional": "16.0.0",
81
- "@loadsmart/stylelint-config": "^1.2.1-beta.1",
81
+ "@loadsmart/stylelint-config": "0.0.3",
82
82
  "@rollup/plugin-babel": "5.3.0",
83
83
  "@rollup/plugin-commonjs": "19.0.0",
84
84
  "@rollup/plugin-json": "4.1.0",
@@ -158,7 +158,12 @@
158
158
  "rollup-plugin-visualizer": "^5.5.2",
159
159
  "semantic-release": "17.4.2",
160
160
  "styled-components": "5.3.0",
161
- "stylelint": "^13.13.1",
161
+ "stylelint": "13.13.1",
162
+ "stylelint-config-prettier": "8.0.2",
163
+ "stylelint-config-rational-order": "0.1.2",
164
+ "stylelint-config-recommended": "5.0.0",
165
+ "stylelint-no-unsupported-browser-features": "5.0.1",
166
+ "stylelint-order": "4.1.0",
162
167
  "tailwindcss": "npm:@tailwindcss/postcss7-compat",
163
168
  "ts-jest": "26.5.6",
164
169
  "ts-toolbelt": "^9.6.0",
@@ -186,10 +191,6 @@
186
191
  "lodash.omit": "4.5.0",
187
192
  "lodash.range": "3.2.0"
188
193
  },
189
- "browserslist": [
190
- "last 1 chrome version",
191
- "last 1 firefox version"
192
- ],
193
194
  "repository": {
194
195
  "type": "git",
195
196
  "url": "https://github.com/loadsmart/miranda.git"
@@ -14,6 +14,17 @@ export interface CloseButtonProps extends ButtonProps {
14
14
  }
15
15
 
16
16
  const Button = styled(BaseButton)`
17
+ border: none;
18
+ border-radius: ${token('border-radius-circle')};
19
+
20
+ color: ${token('color-neutral-darker')};
21
+
22
+ background: ${token('color-transparent')};
23
+
24
+ padding: ${token('space-xs')};
25
+
26
+ font-size: ${token('font-size-3')};
27
+
17
28
  /*
18
29
  * button height is set in the BaseButton component
19
30
  * we set width here to ensure a perfectly rounded button
@@ -23,13 +34,6 @@ const Button = styled(BaseButton)`
23
34
  'button-small-height': whenProps({ scale: 'small' }),
24
35
  'button-large-height': whenProps({ scale: 'large' }),
25
36
  })};
26
- padding: ${token('space-xs')};
27
- font-size: ${token('font-size-3')};
28
- color: ${token('color-neutral-darker')};
29
- background: ${token('color-transparent')};
30
-
31
- border: none;
32
- border-radius: ${token('border-radius-circle')};
33
37
 
34
38
  ${focusable`
35
39
  box-shadow: ${token('button-icon-outline')};
@@ -54,11 +54,18 @@ const Children = styled.span`
54
54
  const StyledLabel = styled.label<SelectionStyleProps>`
55
55
  box-sizing: border-box;
56
56
 
57
+ ${transition()}
58
+ ${font({
59
+ weight: 'checkbox-font-weight',
60
+ })}
61
+
57
62
  display: inline-flex;
58
63
  flex-flow: row nowrap;
59
64
  align-items: center;
60
65
  justify-content: flex-start;
61
66
 
67
+ cursor: pointer;
68
+
62
69
  font-size: ${conditional({
63
70
  'checkbox-font-size': whenProps({ scale: 'default' }),
64
71
  'checkbox-small-font-size': whenProps({ scale: 'small' }),
@@ -69,13 +76,6 @@ const StyledLabel = styled.label<SelectionStyleProps>`
69
76
  'checkbox-dark-color': whenProps({ scheme: 'dark' }),
70
77
  })};
71
78
 
72
- cursor: pointer;
73
-
74
- ${transition()}
75
- ${font({
76
- weight: 'checkbox-font-weight',
77
- })}
78
-
79
79
  ${Children} {
80
80
  margin: 0 ${token('space-xs')};
81
81
  }
@@ -31,64 +31,70 @@ const StyledWrapper = styled.article<{ open: boolean }>`
31
31
  `
32
32
 
33
33
  const StyledToggle = styled.button<{ open: boolean }>`
34
+ ${font({
35
+ height: 'font-height-2',
36
+ })}
37
+
38
+ ${transition()}
39
+
34
40
  display: flex;
35
41
  flex-direction: row;
36
- align-items: center;
37
42
  justify-content: flex-start;
38
-
39
- width: 100%;
40
- padding: ${token('space-s')} ${token('space-m')};
43
+ align-items: center;
41
44
 
42
45
  font-size: ${token('font-size-3')};
43
46
  font-weight: ${conditional({
44
47
  'font-weight-regular': whenProps({ open: false }),
45
48
  'font-weight-bold': whenProps({ open: true }),
46
49
  })};
47
-
48
- color: ${token('color-neutral-darker')};
49
50
  text-align: left;
51
+
50
52
  cursor: pointer;
53
+
54
+ color: ${token('color-neutral-darker')};
55
+
51
56
  background-color: ${token('color-transparent')};
52
- border: none;
53
57
  border-radius: ${token('border-radius-s')};
58
+ border: none;
59
+
60
+ padding: ${token('space-s')} ${token('space-m')};
61
+
62
+ width: 100%;
54
63
 
55
- ${font({
56
- height: 'font-height-2',
57
- })}
58
- ${transition()}
59
64
  ${hoverable`
60
65
  background: ${token('color-neutral-lighter')};
61
66
  `}
67
+
62
68
  ${focusable`
63
69
  box-shadow: ${token('shadow-glow-primary')};
64
70
  `}
65
71
  `
66
72
 
67
73
  const StyledContent = styled.section<{ open: boolean }>`
68
- padding-top: ${conditional({
74
+ ${font({
75
+ height: 'font-height-2',
76
+ weight: 'font-weight-medium',
77
+ })}
78
+
79
+ padding-left: ${conditional({
69
80
  '0': whenProps({ open: false }),
70
- 'space-xl': whenProps({ open: true }),
81
+ 'space-m': whenProps({ open: true }),
71
82
  })};
72
83
  padding-right: ${conditional({
73
84
  '0': whenProps({ open: false }),
74
85
  'space-m': whenProps({ open: true }),
75
86
  })};
76
- padding-bottom: ${conditional({
87
+ padding-top: ${conditional({
77
88
  '0': whenProps({ open: false }),
78
- 'space-s': whenProps({ open: true }),
89
+ 'space-xl': whenProps({ open: true }),
79
90
  })};
80
- padding-left: ${conditional({
91
+ padding-bottom: ${conditional({
81
92
  '0': whenProps({ open: false }),
82
- 'space-m': whenProps({ open: true }),
93
+ 'space-s': whenProps({ open: true }),
83
94
  })};
84
95
 
85
96
  overflow-x: hidden;
86
97
  overflow-y: auto;
87
-
88
- ${font({
89
- height: 'font-height-2',
90
- weight: 'font-weight-medium',
91
- })}
92
98
  `
93
99
 
94
100
  const HiddenInput = styled.input`
@@ -32,15 +32,15 @@ interface VariantProps {
32
32
  }
33
33
 
34
34
  const Description = styled.div`
35
+ color: ${token('banner-description-color')};
35
36
  font-size: ${token('banner-font-size')};
36
37
  line-height: ${token('banner-font-height')};
37
- color: ${token('banner-description-color')};
38
38
  text-align: left;
39
39
  `
40
40
 
41
41
  const Title = styled.div<VariantProps>`
42
- font-size: ${token('banner-font-size')};
43
42
  font-weight: ${token('banner-title-font-weight')};
43
+ font-size: ${token('banner-font-size')};
44
44
  line-height: ${token('banner-font-height')};
45
45
  text-align: left;
46
46
  `
@@ -31,11 +31,12 @@ const StyledLi = styled.li<BreadcrumbProps>`
31
31
  display: inline-flex;
32
32
  align-items: center;
33
33
 
34
- font-size: ${token('breadcrumbs-font-size')};
35
34
  font-weight: ${conditional({
36
35
  'breadcrumbs-font-weight': whenProps({ active: false }),
37
36
  'breadcrumbs-font-weight--active': whenProps({ active: true }),
38
37
  })};
38
+
39
+ font-size: ${token('breadcrumbs-font-size')};
39
40
  line-height: ${token('breadcrumbs-font-height')};
40
41
 
41
42
  & + & {
@@ -45,9 +46,9 @@ const StyledLi = styled.li<BreadcrumbProps>`
45
46
  &:not(:only-child):not(:last-child)::after {
46
47
  position: absolute;
47
48
  left: calc(100% + 14px);
48
- font-size: ${token('breadcrumbs-font-size')};
49
49
 
50
50
  font-weight: ${token('font-weight-bold')};
51
+ font-size: ${token('breadcrumbs-font-size')};
51
52
 
52
53
  line-height: ${token('breadcrumbs-font-height')};
53
54
 
@@ -20,9 +20,9 @@ const StyledWrapper = styled.nav`
20
20
  const StyledOl = styled.ol`
21
21
  display: flex;
22
22
  flex-direction: row;
23
+ margin: 0;
23
24
 
24
25
  padding: 0;
25
- margin: 0;
26
26
 
27
27
  list-style: none;
28
28
  `
@@ -68,6 +68,16 @@ const BaseStyledButton = styled.button<{
68
68
  $scale: ButtonProps['scale']
69
69
  $loading?: ButtonProps['loading']
70
70
  }>`
71
+ ${transition()}
72
+
73
+ ${typography(
74
+ conditional({
75
+ 'button-md': whenProps({ $scale: 'default' }),
76
+ 'button-sm': whenProps({ $scale: 'small' }),
77
+ 'button-lg': whenProps({ $scale: 'large' }),
78
+ })
79
+ )}
80
+
71
81
  box-sizing: border-box;
72
82
 
73
83
  display: inline-flex;
@@ -75,6 +85,16 @@ const BaseStyledButton = styled.button<{
75
85
  align-items: center;
76
86
  justify-content: center;
77
87
 
88
+ text-transform: uppercase;
89
+ text-align: center;
90
+
91
+ cursor: pointer;
92
+
93
+ border-radius: ${token('border-radius-s')};
94
+ border-width: ${token('border-width-thin')};
95
+ border-style: solid;
96
+ border-color: ${token('color-neutral-darker')};
97
+
78
98
  height: ${conditional({
79
99
  'button-height': whenProps({ $scale: 'default' }),
80
100
  'button-small-height': whenProps({ $scale: 'small' }),
@@ -82,25 +102,8 @@ const BaseStyledButton = styled.button<{
82
102
  })};
83
103
 
84
104
  padding: 0 8px;
85
- text-align: center;
86
- text-transform: uppercase;
87
-
88
- cursor: pointer;
89
-
90
- border-color: ${token('color-neutral-darker')};
91
- border-style: solid;
92
- border-width: ${token('border-width-thin')};
93
- border-radius: ${token('border-radius-s')};
94
105
 
95
106
  ${disableable()}
96
- ${transition()}
97
- ${typography(
98
- conditional({
99
- 'button-md': whenProps({ $scale: 'default' }),
100
- 'button-sm': whenProps({ $scale: 'small' }),
101
- 'button-lg': whenProps({ $scale: 'large' }),
102
- })
103
- )}
104
107
 
105
108
  ${({ $loading }) => $loading && 'pointer-events: none;'}
106
109
 
@@ -23,19 +23,23 @@ const Container = styled(Stack)`
23
23
  `
24
24
 
25
25
  const BorderlessButton = styled(BaseButton)`
26
+ ${typography('body-bold')}
27
+ border-color: transparent;
28
+ background-color: transparent;
29
+
26
30
  color: ${token('color-neutral')};
31
+
32
+ inline-size: 40px;
33
+
27
34
  visibility: ${conditional({
28
35
  visible: whenProps({ 'aria-hidden': false }),
29
36
  hidden: whenProps({ 'aria-hidden': true }),
30
37
  })};
31
- background-color: transparent;
32
- border-color: transparent;
33
- inline-size: 40px;
34
38
 
35
- ${typography('body-bold')}
36
39
  ${hoverable`
37
40
  color: ${token('color-neutral-dark')};
38
41
  `}
42
+
39
43
  ${focusable`
40
44
  box-shadow: ${token('button-primary-outline')};
41
45
  `}
@@ -12,10 +12,7 @@ import typography from 'styles/typography'
12
12
  import type { ButtonProps } from 'components/Button'
13
13
 
14
14
  const Button = styled(BaseButton)`
15
- color: ${token('color-neutral-dark')};
16
15
  user-select: none;
17
- background-color: transparent;
18
- border-color: transparent;
19
16
 
20
17
  ${typography(
21
18
  conditional({
@@ -23,9 +20,15 @@ const Button = styled(BaseButton)`
23
20
  body: whenProps({ 'aria-expanded': false }),
24
21
  })
25
22
  )};
23
+ border-color: transparent;
24
+ background-color: transparent;
25
+
26
+ color: ${token('color-neutral-dark')};
27
+
26
28
  ${focusable`
27
29
  box-shadow: ${token('button-primary-outline')};
28
30
  `}
31
+
29
32
  ${disableable`
30
33
  pointer-events: none;
31
34
  opacity: 1;
@@ -53,9 +53,9 @@ const Text = styled(DefaultText)`
53
53
 
54
54
  const Grid = styled.div`
55
55
  display: grid;
56
+ grid-gap: ${token('space-2xs')};
56
57
  grid-template-rows: 1.25rem repeat(auto-fill, 2.5rem);
57
58
  grid-template-columns: repeat(7, 2.5rem);
58
- grid-gap: ${token('space-2xs')};
59
59
  `
60
60
 
61
61
  /**
@@ -10,9 +10,9 @@ import type { CalendarMonth, CalendarMonthAlias } from '../Month.helper'
10
10
 
11
11
  const Container = styled.div`
12
12
  display: grid;
13
- grid-template-columns: repeat(3, 1fr);
14
13
  grid-auto-rows: 3.75rem;
15
14
  grid-gap: ${token('space-2xs')};
15
+ grid-template-columns: repeat(3, 1fr);
16
16
  `
17
17
 
18
18
  function getStatus(calendar: useCalendarReturn, month: CalendarMonth) {
@@ -19,8 +19,20 @@ const PickerButton = styled(BaseButton)<{
19
19
  | 'selection'
20
20
  | 'next-month-day'
21
21
  }>`
22
+ ${typography(
23
+ conditional({
24
+ body: whenProps({ $status: ['default', 'faded'] }),
25
+ 'body-bold': whenProps({
26
+ $status: ['current-day', 'selection-start', 'selection', 'selection-end'],
27
+ }),
28
+ })
29
+ )}
30
+
31
+ user-select: none;
32
+
22
33
  height: 100%;
23
- padding: ${token('space-xs')} ${token('space-s')};
34
+
35
+ border-radius: 0;
24
36
 
25
37
  color: ${conditional({
26
38
  'color-neutral-lighter': whenProps({
@@ -30,45 +42,30 @@ const PickerButton = styled(BaseButton)<{
30
42
  'color-neutral-dark': whenProps({ $status: 'next-month-day' }),
31
43
  'color-accent': whenProps({ $status: 'current-day' }),
32
44
  })};
33
- visibility: ${conditional({
34
- visible: whenProps({ 'aria-hidden': false }),
35
- hidden: whenProps({ 'aria-hidden': true }),
36
- })};
37
- user-select: none;
45
+
38
46
  background: ${conditional({
39
47
  'color-transparent': whenProps({ $status: ['default', 'faded', 'next-month-day'] }),
40
48
  'color-neutral-darker': whenProps({ $status: ['selection-start', 'selection-end'] }),
41
49
  'color-neutral': whenProps({ $status: 'selection' }),
42
50
  'color-neutral-lightest': whenProps({ $status: 'current-day' }),
43
51
  })};
52
+
44
53
  border-color: ${conditional({
45
54
  'color-transparent': whenProps({ $status: ['default', 'faded', 'next-month-day'] }),
46
55
  'color-neutral-darker': whenProps({ $status: ['selection-start', 'selection-end'] }),
47
56
  'color-neutral': whenProps({ $status: 'selection' }),
48
57
  'color-neutral-light': whenProps({ $status: 'current-day' }),
49
58
  })};
50
- border-radius: 0;
51
59
 
52
60
  ${conditional({
53
61
  'opacity: 0.4;': whenProps({ $status: 'faded' }),
54
62
  'opacity: 1;': whenProps({ $status: (status) => status !== 'faded' }),
55
63
  })}
56
- ${typography(
57
- conditional({
58
- body: whenProps({ $status: ['default', 'faded'] }),
59
- 'body-bold': whenProps({
60
- $status: ['current-day', 'selection-start', 'selection', 'selection-end'],
61
- }),
62
- })
63
- )}
64
+
65
+ padding: ${token('space-xs')} ${token('space-s')};
66
+
64
67
  ${hoverable`
65
- font-weight: ${token('font-weight-bold')};
66
- color: ${conditional({
67
- 'color-neutral-dark': whenProps({ $status: ['default', 'faded'] }),
68
- 'color-neutral-lightest': whenProps({
69
- $status: ['selection-start', 'selection', 'selection-end'],
70
- }),
71
- })};
68
+ border-color: ${token('color-neutral')};
72
69
  background-color: ${conditional({
73
70
  'color-transparent': whenProps({ $status: ['default', 'faded', 'next-month-day'] }),
74
71
  'color-neutral-dark': whenProps({
@@ -76,7 +73,14 @@ const PickerButton = styled(BaseButton)<{
76
73
  }),
77
74
  'color-neutral-lightest': whenProps({ $status: 'current-day' }),
78
75
  })};
79
- border-color: ${token('color-neutral')};
76
+ color: ${conditional({
77
+ 'color-neutral-dark': whenProps({ $status: ['default', 'faded'] }),
78
+ 'color-neutral-lightest': whenProps({
79
+ $status: ['selection-start', 'selection', 'selection-end'],
80
+ }),
81
+ })};
82
+
83
+ font-weight: ${token('font-weight-bold')};
80
84
  `}
81
85
 
82
86
  ${focusable`
@@ -85,25 +89,31 @@ const PickerButton = styled(BaseButton)<{
85
89
  `}
86
90
 
87
91
  ${activatable`
88
- color: ${conditional({
89
- 'color-neutral': whenProps({ 'aria-checked': false }),
90
- 'color-neutral-white': whenProps({ 'aria-checked': true }),
91
- })};
92
+ border-color: ${token('color-neutral')};
92
93
  background-color: ${conditional({
93
94
  'color-transparent': whenProps({ 'aria-checked': false }),
94
95
  'color-neutral': whenProps({ 'aria-checked': true }),
95
96
  })};
96
- border-color: ${token('color-neutral')};
97
+ color: ${conditional({
98
+ 'color-neutral': whenProps({ 'aria-checked': false }),
99
+ 'color-neutral-white': whenProps({ 'aria-checked': true }),
100
+ })};
97
101
  `}
98
102
 
99
103
  ${disableable`
100
- color: ${token('color-neutral-darker')};
101
104
  background-color: ${token('color-transparent')};
102
105
  border-color: ${conditional({
103
106
  'color-neutral-darkest': whenProps({ 'aria-checked': true }),
104
107
  'color-transparent': whenProps({ 'aria-checked': false }),
105
108
  })};
109
+
110
+ color: ${token('color-neutral-darker')};
106
111
  `}
112
+
113
+ visibility: ${conditional({
114
+ visible: whenProps({ 'aria-hidden': false }),
115
+ hidden: whenProps({ 'aria-hidden': true }),
116
+ })};
107
117
  `
108
118
 
109
119
  export default styled(PickerButton)({})
@@ -9,9 +9,9 @@ import type { useCalendarReturn, CalendarPickerProps } from '../Calendar.types'
9
9
 
10
10
  const Container = styled.div`
11
11
  display: grid;
12
- grid-template-columns: repeat(4, 1fr);
13
12
  grid-auto-rows: 2.875rem;
14
13
  grid-gap: ${token('space-2xs')};
14
+ grid-template-columns: repeat(4, 1fr);
15
15
  `
16
16
 
17
17
  const PickerButton = styled(DefaultPickerButton)`
@@ -15,10 +15,10 @@ export interface CardProps extends HTMLAttributes<HTMLElement> {
15
15
 
16
16
  const CardSubtitle = styled.div`
17
17
  padding: 0 ${token('card-padding-x')} ${token('card-padding-y')};
18
- font-size: ${token('card-subtitle-font-size')};
19
- font-weight: ${token('card-subtitle-font-weight')};
20
18
 
21
19
  color: ${token('card-color')};
20
+ font-weight: ${token('card-subtitle-font-weight')};
21
+ font-size: ${token('card-subtitle-font-size')};
22
22
  `
23
23
 
24
24
  const CardSeparator = styled.hr`
@@ -35,13 +35,12 @@ const CardBody = styled.div`
35
35
  `
36
36
 
37
37
  const Wrapper = styled.div`
38
+ ${font({})}
39
+
38
40
  display: flex;
39
41
  flex-direction: row;
42
+
40
43
  color: ${token('card-color')};
41
- background: ${token('card-background')};
42
- border: 1px solid ${token('card-border-color')};
43
- border-radius: ${token('card-border-radius')};
44
- ${font({})}
45
44
 
46
45
  ${CardTitleWrapper} + ${CardSubtitle} {
47
46
  margin-top: ${token('space-xs')};
@@ -50,6 +49,10 @@ const Wrapper = styled.div`
50
49
  ${CardTitleWrapper} + ${CardSeparator} {
51
50
  margin-top: ${token('card-padding-y')};
52
51
  }
52
+
53
+ border: 1px solid ${token('card-border-color')};
54
+ border-radius: ${token('card-border-radius')};
55
+ background: ${token('card-background')};
53
56
  `
54
57
 
55
58
  const Container = styled.div<{ flagged: boolean }>`
@@ -21,13 +21,12 @@ const Leading = styled(StyledSpan)`
21
21
  `
22
22
 
23
23
  const Wrapper = styled.div`
24
-
25
24
  padding: ${token('card-padding-y')} ${token('card-padding-x')} 0;
26
- font-size: ${token('card-title-font-size')};
27
- font-weight: ${token('card-title-font-weight')};
28
- line-height: ${token('card-title-font-height')};
29
25
 
30
26
  color: ${token('card-color')};
27
+ font-weight: ${token('card-title-font-weight')};
28
+ font-size: ${token('card-title-font-size')};
29
+ line-height: ${token('card-title-font-height')};
31
30
  `
32
31
 
33
32
  function CardTitle({ children, leading, ...others }: CardTitleProps): JSX.Element {
@@ -21,32 +21,45 @@ export interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement>, Se
21
21
  const Check = styled(Icon)<SelectionStyleProps>`
22
22
  position: absolute;
23
23
  top: 50%;
24
+
24
25
  left: 50%;
25
- pointer-events: none;
26
+
26
27
  transform: translate(-50%, -50%);
28
+
29
+ pointer-events: none;
27
30
  `
28
31
 
29
32
  const Selector = styled.input<SelectionStyleProps>`
33
+ ${transition()}
34
+
30
35
  display: inline-flex;
31
36
  flex-flow: row nowrap;
32
37
  align-items: center;
33
- width: ${token('checkbox-selector-size')};
34
- height: ${token('checkbox-selector-size')};
35
- color: white;
38
+
36
39
  cursor: pointer;
37
- background: ${conditional({
38
- 'checkbox-selector-background': whenProps({ scheme: 'light' }),
39
- 'checkbox-dark-selector-background': whenProps({ scheme: 'dark' }),
40
- })};
40
+
41
+ appearance: none;
42
+
43
+ outline: none;
44
+
45
+ color: white;
46
+
47
+ height: ${token('checkbox-selector-size')};
48
+ width: ${token('checkbox-selector-size')};
49
+
50
+ border-radius: ${token('checkbox-selector-border-radius')};
51
+ border-width: ${token('button-border-width')};
52
+ border-style: solid;
53
+
41
54
  border-color: ${conditional({
42
55
  'checkbox-selector-border-color': whenProps({ scheme: 'light' }),
43
56
  'checkbox-dark-selector-border-color': whenProps({ scheme: 'dark' }),
44
57
  })};
45
- border-style: solid;
46
- border-width: ${token('button-border-width')};
47
- border-radius: ${token('checkbox-selector-border-radius')};
48
- appearance: none;
49
- outline: none;
58
+
59
+ background: ${conditional({
60
+ 'checkbox-selector-background': whenProps({ scheme: 'light' }),
61
+ 'checkbox-dark-selector-background': whenProps({ scheme: 'dark' }),
62
+ })};
50
63
 
51
64
  :checked {
52
65
  background-color: ${token('checkbox-selector-checked-background')};
@@ -116,7 +129,6 @@ const Selector = styled.input<SelectionStyleProps>`
116
129
 
117
130
  box-shadow: ${token('checkbox-selector-outline')};
118
131
  `}
119
- ${transition()}
120
132
  `
121
133
 
122
134
  function Checkbox({