@loadsmart/loadsmart-ui 5.13.2 → 5.14.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.
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/TopNavigation/TopNavigation.d.ts +2 -2
- package/dist/index.js +57 -45
- package/dist/index.js.map +1 -1
- package/dist/miranda-compatibility.theme-bb0cbfb2.js +2 -0
- package/dist/miranda-compatibility.theme-bb0cbfb2.js.map +1 -0
- package/dist/prop-73352de5.js +2 -0
- package/dist/{prop-0f94ff83.js.map → prop-73352de5.js.map} +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/testing/index.js.map +1 -1
- package/dist/theming/index.js +1 -1
- package/dist/theming/index.js.map +1 -1
- package/dist/theming/themes/alice.theme.d.ts +171 -9
- package/dist/theming/themes/index.d.ts +1 -0
- package/dist/theming/themes/loadsmart.theme.d.ts +83 -9
- package/dist/theming/themes/miranda-compatibility.theme.d.ts +745 -0
- package/dist/theming/theming.helpers.d.ts +1 -0
- package/dist/tools/index.js +1 -1
- package/package.json +5 -3
- package/src/addons/Theme/register.js +2 -1
- package/src/components/Dropdown/DropdownMenu.tsx +1 -1
- package/src/components/Dropdown/DropdownTrigger.tsx +6 -4
- package/src/components/Select/SelectOption.tsx +4 -7
- package/src/components/SideNavigation/Menu/Menu.tsx +4 -3
- package/src/components/SideNavigation/Menu/MenuBaseItem.tsx +1 -1
- package/src/components/SideNavigation/Menu/MenuLink.tsx +4 -5
- package/src/components/SideNavigation/SideNavigation.stories.tsx +1 -1
- package/src/components/Steps/ProgressSteps/ProgressStep.tsx +9 -7
- package/src/components/ToggleGroup/Toggle.tsx +58 -33
- package/src/components/ToggleGroup/ToggleGroup.tsx +32 -19
- package/src/components/TopNavigation/TopNavigation.tsx +2 -2
- package/src/theming/themes/alice.theme.ts +111 -20
- package/src/theming/themes/index.ts +1 -0
- package/src/theming/themes/loadsmart.theme.ts +100 -9
- package/src/theming/themes/miranda-compatibility.theme.ts +900 -0
- package/src/theming/theming.helpers.ts +6 -0
- package/dist/loadsmart.theme-63c13988.js +0 -2
- package/dist/loadsmart.theme-63c13988.js.map +0 -1
- package/dist/prop-0f94ff83.js +0 -2
|
@@ -18,4 +18,5 @@ export declare function generateBorderGetters({ radiuses, widths, }: {
|
|
|
18
18
|
radiuses: VariableMap;
|
|
19
19
|
widths: VariableMap;
|
|
20
20
|
}): Record<string, (name: string) => VariableValue>;
|
|
21
|
+
export declare function generateHeightGetter(heights: VariableMap): (name: string) => VariableValue;
|
|
21
22
|
export {};
|
package/dist/tools/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../prop-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../prop-73352de5.js");require("../toArray-b56541b4.js"),require("../miranda-compatibility.theme-bb0cbfb2.js"),require("@loadsmart/miranda-tokens"),require("../theming/index.js"),exports.conditional=e.conditional,exports.prop=e.prop,exports.whenProps=e.whenProps;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loadsmart/loadsmart-ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.14.1",
|
|
4
4
|
"description": "Miranda UI, a React UI library",
|
|
5
5
|
"main": "dist",
|
|
6
6
|
"files": [
|
|
@@ -78,6 +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/miranda-tokens": "1.3.0",
|
|
81
82
|
"@loadsmart/stylelint-config": "0.0.3",
|
|
82
83
|
"@rollup/plugin-babel": "5.3.0",
|
|
83
84
|
"@rollup/plugin-commonjs": "19.0.0",
|
|
@@ -167,16 +168,17 @@
|
|
|
167
168
|
"tailwindcss": "npm:@tailwindcss/postcss7-compat",
|
|
168
169
|
"ts-jest": "26.5.6",
|
|
169
170
|
"ts-toolbelt": "^9.6.0",
|
|
170
|
-
"ttypescript": "1.5.
|
|
171
|
+
"ttypescript": "^1.5.13",
|
|
171
172
|
"typescript": "4.2.4",
|
|
172
173
|
"typescript-plugin-styled-components": "1.5.0"
|
|
173
174
|
},
|
|
174
175
|
"peerDependencies": {
|
|
176
|
+
"@loadsmart/miranda-tokens": "1.3.0",
|
|
175
177
|
"@testing-library/dom": ">=5.12.0",
|
|
176
178
|
"@testing-library/react": ">=11.2.6",
|
|
177
179
|
"prop-types": ">=15.7.2",
|
|
178
|
-
"react": ">=16.8.0",
|
|
179
180
|
"react-dom": ">=16.8.0",
|
|
181
|
+
"react": ">=16.8.0",
|
|
180
182
|
"styled-components": ">=5.3.0"
|
|
181
183
|
},
|
|
182
184
|
"dependencies": {
|
|
@@ -18,8 +18,9 @@ import loadsmart, {
|
|
|
18
18
|
SHADOWS,
|
|
19
19
|
SPACINGS,
|
|
20
20
|
} from '../../theming/themes/loadsmart.theme'
|
|
21
|
+
import miranda from '../../theming/themes/miranda-compatibility.theme'
|
|
21
22
|
|
|
22
|
-
const THEMES = { alice, loadsmart }
|
|
23
|
+
const THEMES = { alice, loadsmart, miranda }
|
|
23
24
|
|
|
24
25
|
const TOKEN_PARAM_KEY = 'tokenPrefix'
|
|
25
26
|
|
|
@@ -26,7 +26,7 @@ import conditional, { whenProps } from 'tools/conditional'
|
|
|
26
26
|
|
|
27
27
|
const Popover = styled(DefaultPopover)<{ $align: 'start' | 'end' }>`
|
|
28
28
|
position: absolute;
|
|
29
|
-
top: calc(
|
|
29
|
+
top: calc(${token('dropdown-trigger-height')} + ${token('space-xs')});
|
|
30
30
|
|
|
31
31
|
${conditional({
|
|
32
32
|
'left: 0;': whenProps({ $align: 'start' }),
|
|
@@ -37,7 +37,7 @@ type TriggerButtonProps = ButtonProps & {
|
|
|
37
37
|
|
|
38
38
|
const dropdownExpandedStyle = css`
|
|
39
39
|
&[aria-expanded='true'] {
|
|
40
|
-
color: ${token('color
|
|
40
|
+
color: ${token('dropdown-trigger-expanded-color')};
|
|
41
41
|
}
|
|
42
42
|
`
|
|
43
43
|
|
|
@@ -120,8 +120,8 @@ const TriggerButton = styled(
|
|
|
120
120
|
|
|
121
121
|
visibility: hidden;
|
|
122
122
|
|
|
123
|
-
/* @REVIEW: since this is a span descendant of a button
|
|
124
|
-
I'm using the direct value of children the solution inside Link
|
|
123
|
+
/* @REVIEW: since this is a span descendant of a button
|
|
124
|
+
I'm using the direct value of children the solution inside Link
|
|
125
125
|
relies on data-text attribute */
|
|
126
126
|
|
|
127
127
|
content: '${children}';
|
|
@@ -163,7 +163,9 @@ const DropdownTriggerWrapper = styled.div<DropdownTriggerWrapperProps>`
|
|
|
163
163
|
|
|
164
164
|
color: ${token('color-neutral-darker')};
|
|
165
165
|
|
|
166
|
-
height:
|
|
166
|
+
height: ${token('dropdown-trigger-height')};
|
|
167
|
+
box-sizing: border-box;
|
|
168
|
+
|
|
167
169
|
flex: 1;
|
|
168
170
|
|
|
169
171
|
${hoverable`
|
|
@@ -22,17 +22,14 @@ const Group = styled(DefaultGroup).attrs({
|
|
|
22
22
|
`
|
|
23
23
|
|
|
24
24
|
const Icon = styled(DefaultIcon)`
|
|
25
|
-
color: ${token('color
|
|
25
|
+
color: ${token('select-selected-option-check-color')};
|
|
26
26
|
`
|
|
27
27
|
|
|
28
28
|
const DefaultSelectOption = styled(Dropdown.Item)<DropdownMenuItemProps>`
|
|
29
29
|
background: ${conditional({
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
'33': whenProps({ 'aria-selected': true }),
|
|
34
|
-
ff: whenProps({ 'aria-selected': false }),
|
|
35
|
-
})};
|
|
30
|
+
'select-selected-option-background-color': whenProps({ 'aria-selected': true }),
|
|
31
|
+
'color-neutral-white': whenProps({ 'aria-selected': false }),
|
|
32
|
+
})};
|
|
36
33
|
`
|
|
37
34
|
|
|
38
35
|
function SelectOption({
|
|
@@ -15,9 +15,10 @@ const MenuTitle = styled.div`
|
|
|
15
15
|
padding-left: ${token('space-l')};
|
|
16
16
|
|
|
17
17
|
color: ${token('color-neutral')};
|
|
18
|
-
|
|
19
|
-
font-
|
|
20
|
-
|
|
18
|
+
|
|
19
|
+
font-weight: ${token('side-navigation-menu-title-font-weight')};
|
|
20
|
+
font-size: ${token('side-navigation-menu-title-font-size')};
|
|
21
|
+
line-height: ${token('side-navigation-menu-title-line-height')};
|
|
21
22
|
text-transform: uppercase;
|
|
22
23
|
`
|
|
23
24
|
|
|
@@ -8,16 +8,15 @@ import MenuBaseItem from './MenuBaseItem'
|
|
|
8
8
|
|
|
9
9
|
const StyledMenuItem = styled((props) => <MenuBaseItem as="a" {...props} />)`
|
|
10
10
|
${hoverable`
|
|
11
|
-
color: ${token('color
|
|
11
|
+
color: ${token('side-navigation-menu-link-color--hover')};
|
|
12
12
|
`}
|
|
13
13
|
|
|
14
14
|
${({ active }) =>
|
|
15
15
|
active
|
|
16
16
|
? css`
|
|
17
|
-
color: ${token('color
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
box-shadow: inset ${token('space-xs')} 0px ${token('color-primary')};
|
|
17
|
+
background-color: ${token('side-navigation-menu-link-background-color--active')};
|
|
18
|
+
box-shadow: inset ${token('space-xs')} 0
|
|
19
|
+
${token('side-navigation-menu-link-box-shadow-color--active')};
|
|
21
20
|
`
|
|
22
21
|
: ''}
|
|
23
22
|
`
|
|
@@ -31,8 +31,8 @@ const StepConnector = styled.span<{ complete: boolean }>`
|
|
|
31
31
|
})};
|
|
32
32
|
|
|
33
33
|
background: ${conditional({
|
|
34
|
-
'color
|
|
35
|
-
'color
|
|
34
|
+
'steps-progress-step-background-color': whenProps({ complete: false }),
|
|
35
|
+
'steps-progress-step-background-color--complete': whenProps({ complete: true }),
|
|
36
36
|
})};
|
|
37
37
|
`
|
|
38
38
|
|
|
@@ -79,16 +79,18 @@ const StepIndicator = styled.span<{ current: boolean; complete: boolean }>`
|
|
|
79
79
|
border-width: 2px;
|
|
80
80
|
border-style: solid;
|
|
81
81
|
border-color: ${conditional({
|
|
82
|
-
'color
|
|
82
|
+
'steps-progress-step-background-color--complete': whenProps([
|
|
83
83
|
{ current: true, complete: [true, false] },
|
|
84
84
|
{ current: false, complete: true },
|
|
85
85
|
]),
|
|
86
|
-
'color
|
|
86
|
+
'steps-progress-step-background-color': whenProps({ current: false, complete: false }),
|
|
87
87
|
})};
|
|
88
88
|
border-radius: ${token('border-radius-circle')};
|
|
89
89
|
|
|
90
90
|
background: ${conditional({
|
|
91
|
-
'color
|
|
91
|
+
'steps-progress-step-background-color--complete': whenProps([
|
|
92
|
+
{ current: false, complete: true },
|
|
93
|
+
]),
|
|
92
94
|
'color-neutral-white': whenProps([
|
|
93
95
|
{ current: true, complete: [true, false] },
|
|
94
96
|
{ current: false, complete: false },
|
|
@@ -96,9 +98,9 @@ const StepIndicator = styled.span<{ current: boolean; complete: boolean }>`
|
|
|
96
98
|
})};
|
|
97
99
|
|
|
98
100
|
color: ${conditional({
|
|
99
|
-
'color
|
|
101
|
+
'steps-progress-step-background-color': whenProps({ current: false, complete: false }),
|
|
100
102
|
'color-neutral-white': whenProps({ current: false, complete: true }),
|
|
101
|
-
'color
|
|
103
|
+
'steps-progress-step-background-color--complete': whenProps({ current: true }),
|
|
102
104
|
})};
|
|
103
105
|
`
|
|
104
106
|
|
|
@@ -14,82 +14,107 @@ import ToggleGroupContext, { SelectableContext } from './ToggleGroupContext'
|
|
|
14
14
|
import type { ToggleGroupOptionProps, ToggleGroupType } from './ToggleGroup.types'
|
|
15
15
|
|
|
16
16
|
const ToggleButton = styled(BaseButton)<{ $type: ToggleGroupType }>`
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
text-transform: ${token('toggle-text-transform')};
|
|
18
|
+
|
|
19
|
+
background-color: ${conditional({
|
|
20
|
+
'toggle-background-color': whenProps({ 'aria-checked': false }),
|
|
21
|
+
'toggle-checked-background-color': whenProps({ 'aria-checked': true }),
|
|
20
22
|
})};
|
|
21
23
|
|
|
22
24
|
border-color: ${conditional({
|
|
23
|
-
'
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
'color-transparent': whenProps({ $type: 'single', 'aria-checked': false }),
|
|
25
|
+
'toggle-single-border-color': whenProps({ $type: 'single', 'aria-checked': false }),
|
|
26
|
+
'toggle-single-checked-border-color': whenProps({ $type: 'single', 'aria-checked': true }),
|
|
27
|
+
'toggle-multiple-border-color': whenProps({ $type: 'multiple', 'aria-checked': false }),
|
|
28
|
+
'toggle-multiple-checked-border-color': whenProps({ $type: 'multiple', 'aria-checked': true }),
|
|
28
29
|
})};
|
|
29
30
|
|
|
30
31
|
color: ${conditional({
|
|
31
|
-
'color
|
|
32
|
-
'
|
|
32
|
+
'toggle-color': whenProps({ 'aria-checked': false }),
|
|
33
|
+
'toggle-checked-color': whenProps({ 'aria-checked': true }),
|
|
33
34
|
})};
|
|
34
35
|
|
|
35
36
|
padding: ${token('space-xs')} ${token('space-s')};
|
|
36
37
|
|
|
37
38
|
${hoverable`
|
|
38
39
|
border-color: ${conditional({
|
|
39
|
-
'
|
|
40
|
-
'color
|
|
40
|
+
'toggle-multiple-border-color--hover': whenProps({ $type: 'multiple' }),
|
|
41
|
+
'toggle-single-border-color--hover': whenProps({ $type: 'single' }),
|
|
41
42
|
})};
|
|
42
43
|
|
|
43
44
|
background-color: ${conditional({
|
|
44
|
-
'color
|
|
45
|
-
'
|
|
45
|
+
'toggle-background-color--hover': whenProps({ 'aria-checked': false }),
|
|
46
|
+
'toggle-checked-background-color--hover': whenProps({ 'aria-checked': true }),
|
|
46
47
|
})};
|
|
48
|
+
|
|
47
49
|
color: ${conditional({
|
|
48
|
-
'color
|
|
49
|
-
'
|
|
50
|
+
'toggle-color--hover': whenProps({ 'aria-checked': false }),
|
|
51
|
+
'toggle-checked-color--hover': whenProps({ 'aria-checked': true }),
|
|
50
52
|
})};
|
|
51
53
|
`}
|
|
52
54
|
|
|
53
55
|
${focusable`
|
|
54
|
-
border-color: ${
|
|
56
|
+
border-color: ${conditional({
|
|
57
|
+
'toggle-multiple-border-color--focus': whenProps({ $type: 'multiple' }),
|
|
58
|
+
'toggle-single-border-color--focus': whenProps({ $type: 'single' }),
|
|
59
|
+
})};
|
|
60
|
+
|
|
55
61
|
background-color: ${conditional({
|
|
56
|
-
'color
|
|
57
|
-
'
|
|
62
|
+
'toggle-background-color--focus': whenProps({ 'aria-checked': false }),
|
|
63
|
+
'toggle-checked-background-color--focus': whenProps({ 'aria-checked': true }),
|
|
58
64
|
})};
|
|
65
|
+
|
|
59
66
|
color: ${conditional({
|
|
60
|
-
'color
|
|
61
|
-
'
|
|
67
|
+
'toggle-color--focus': whenProps({ 'aria-checked': false }),
|
|
68
|
+
'toggle-checked-color--focus': whenProps({ 'aria-checked': true }),
|
|
62
69
|
})};
|
|
63
70
|
|
|
64
71
|
box-shadow: ${token('button-primary-outline')};
|
|
65
72
|
`}
|
|
66
73
|
|
|
67
74
|
${activatable`
|
|
68
|
-
border-color:
|
|
75
|
+
border-color: ${conditional({
|
|
76
|
+
'toggle-multiple-border-color--active': whenProps({ $type: 'multiple' }),
|
|
77
|
+
'toggle-single-border-color--active': whenProps({ $type: 'single' }),
|
|
78
|
+
})};
|
|
79
|
+
|
|
69
80
|
background-color: ${conditional({
|
|
70
|
-
'color
|
|
71
|
-
'color
|
|
81
|
+
'toggle-background-color--active': whenProps({ 'aria-checked': false }),
|
|
82
|
+
'toggle-checked-background-color--active': whenProps({ 'aria-checked': true }),
|
|
72
83
|
})};
|
|
84
|
+
|
|
73
85
|
color: ${conditional({
|
|
74
|
-
'color
|
|
75
|
-
'
|
|
86
|
+
'toggle-color--active': whenProps({ 'aria-checked': false }),
|
|
87
|
+
'toggle-checked-color--active': whenProps({ 'aria-checked': true }),
|
|
76
88
|
})};
|
|
77
89
|
`}
|
|
78
90
|
|
|
79
91
|
${disableable`
|
|
80
92
|
opacity: 1; // toggle group already applies opacity; we don't want to overlap it.
|
|
81
93
|
|
|
94
|
+
background-color: ${conditional({
|
|
95
|
+
'toggle-background-color--disabled': whenProps({ 'aria-checked': false }),
|
|
96
|
+
'toggle-checked-background-color--disabled': whenProps({ 'aria-checked': true }),
|
|
97
|
+
})};
|
|
98
|
+
|
|
82
99
|
border-color: ${conditional({
|
|
83
|
-
'
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
100
|
+
'toggle-single-border-color--disabled': whenProps({ $type: 'single', 'aria-checked': false }),
|
|
101
|
+
'toggle-single-checked-border-color--disabled': whenProps({
|
|
102
|
+
$type: 'single',
|
|
103
|
+
'aria-checked': true,
|
|
104
|
+
}),
|
|
105
|
+
'toggle-multiple-border-color--disabled': whenProps({
|
|
106
|
+
$type: 'multiple',
|
|
107
|
+
'aria-checked': false,
|
|
108
|
+
}),
|
|
109
|
+
'toggle-multiple-checked-border-color--disabled': whenProps({
|
|
110
|
+
$type: 'multiple',
|
|
111
|
+
'aria-checked': true,
|
|
112
|
+
}),
|
|
88
113
|
})};
|
|
89
114
|
|
|
90
115
|
color: ${conditional({
|
|
91
|
-
'color
|
|
92
|
-
'
|
|
116
|
+
'toggle-color--disabled': whenProps({ 'aria-checked': false }),
|
|
117
|
+
'toggle-checked-color--disabled': whenProps({ 'aria-checked': true }),
|
|
93
118
|
})};
|
|
94
119
|
`}
|
|
95
120
|
`
|
|
@@ -21,32 +21,45 @@ import type {
|
|
|
21
21
|
|
|
22
22
|
const Container = styled(Group)<{ $multiple: boolean; $scale: ToggleGroupProps['scale'] }>`
|
|
23
23
|
padding: ${conditional({
|
|
24
|
-
'
|
|
25
|
-
'
|
|
24
|
+
'toggle-group-multiple-padding': whenProps({ $multiple: true }),
|
|
25
|
+
'toggle-group-single-padding': whenProps({ $multiple: false }),
|
|
26
26
|
})};
|
|
27
27
|
|
|
28
|
-
${({
|
|
29
|
-
$multiple
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
border-color: ${conditional({
|
|
29
|
+
'toggle-group-multiple-border-color': whenProps({ $multiple: true }),
|
|
30
|
+
'toggle-group-single-border-color': whenProps({ $multiple: false }),
|
|
31
|
+
})};
|
|
32
|
+
|
|
33
|
+
border-style: ${conditional({
|
|
34
|
+
'toggle-group-multiple-border-style': whenProps({ $multiple: true }),
|
|
35
|
+
'toggle-group-single-border-style': whenProps({ $multiple: false }),
|
|
36
|
+
})};
|
|
37
|
+
|
|
38
|
+
border-width: ${conditional({
|
|
39
|
+
'toggle-group-multiple-border-width': whenProps({ $multiple: true }),
|
|
40
|
+
'toggle-group-single-border-width': whenProps({ $multiple: false }),
|
|
41
|
+
})};
|
|
42
|
+
|
|
43
|
+
border-radius: ${conditional({
|
|
44
|
+
'toggle-group-multiple-border-radius': whenProps({ $multiple: true }),
|
|
45
|
+
'toggle-group-single-border-radius': whenProps({ $multiple: false }),
|
|
46
|
+
})};
|
|
37
47
|
|
|
38
48
|
${disableable()}
|
|
39
49
|
|
|
40
50
|
${Toggle} {
|
|
41
|
-
${conditional({
|
|
42
|
-
'
|
|
51
|
+
height: ${conditional({
|
|
52
|
+
'toggle-single-height': whenProps({ $multiple: false, $scale: 'default' }),
|
|
53
|
+
'toggle-single-small-height': whenProps({ $multiple: false, $scale: 'small' }),
|
|
54
|
+
'toggle-multiple-height': whenProps({ $multiple: true, $scale: 'default' }),
|
|
55
|
+
'toggle-multiple-small-height': whenProps({ $multiple: true, $scale: 'small' }),
|
|
43
56
|
})};
|
|
44
57
|
|
|
45
|
-
|
|
46
|
-
'
|
|
47
|
-
'
|
|
48
|
-
'
|
|
49
|
-
'
|
|
58
|
+
font-size: ${conditional({
|
|
59
|
+
'toggle-single-font-size': whenProps({ $multiple: false, $scale: 'default' }),
|
|
60
|
+
'toggle-single-small-font-size': whenProps({ $multiple: false, $scale: 'small' }),
|
|
61
|
+
'toggle-multiple-font-size': whenProps({ $multiple: true, $scale: 'default' }),
|
|
62
|
+
'toggle-multiple-small-font-size': whenProps({ $multiple: true, $scale: 'small' }),
|
|
50
63
|
})};
|
|
51
64
|
}
|
|
52
65
|
`
|
|
@@ -118,7 +131,7 @@ function ToggleGroup(props: ToggleGroupProps): JSX.Element {
|
|
|
118
131
|
id={id}
|
|
119
132
|
role={multiple ? 'group' : 'radiogroup'}
|
|
120
133
|
align="center"
|
|
121
|
-
space=
|
|
134
|
+
space="xs"
|
|
122
135
|
$multiple={multiple}
|
|
123
136
|
$scale={scale}
|
|
124
137
|
>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import type {
|
|
2
|
+
import type { ReactNode } from 'react'
|
|
3
3
|
import styled, { css } from 'styled-components'
|
|
4
4
|
|
|
5
5
|
import { getToken as token } from 'theming'
|
|
@@ -33,7 +33,7 @@ const Container = styled.div`
|
|
|
33
33
|
`
|
|
34
34
|
|
|
35
35
|
export interface TopNavigationProps {
|
|
36
|
-
children
|
|
36
|
+
children?: ReactNode
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
function TopNavigation({ children }: TopNavigationProps): JSX.Element {
|