@react-ui-org/react-ui 0.50.2 → 0.52.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/lib.development.js +157 -49
- package/dist/lib.js +1 -1
- package/package.json +1 -1
- package/src/lib/components/Alert/Alert.jsx +1 -3
- package/src/lib/components/Alert/Alert.scss +1 -9
- package/src/lib/components/Alert/README.mdx +0 -20
- package/src/lib/components/Alert/_settings.scss +1 -1
- package/src/lib/components/Alert/_theme.scss +0 -10
- package/src/lib/components/Badge/Badge.jsx +1 -3
- package/src/lib/components/Badge/Badge.scss +25 -44
- package/src/lib/components/Badge/README.mdx +6 -14
- package/src/lib/components/Button/Button.jsx +20 -10
- package/src/lib/components/Button/README.mdx +8 -3
- package/src/lib/components/Button/_base.scss +21 -12
- package/src/lib/components/Button/_priorities.scss +13 -18
- package/src/lib/components/Button/_settings.scss +1 -1
- package/src/lib/components/Button/_theme.scss +0 -10
- package/src/lib/components/ButtonGroup/ButtonGroup.jsx +5 -3
- package/src/lib/components/ButtonGroup/ButtonGroup.scss +26 -1
- package/src/lib/components/ButtonGroup/README.mdx +85 -59
- package/src/lib/components/ButtonGroup/_theme.scss +13 -0
- package/src/lib/components/Card/Card.jsx +1 -3
- package/src/lib/components/Card/Card.scss +0 -9
- package/src/lib/components/Card/README.mdx +0 -16
- package/src/lib/components/Card/_theme.scss +0 -10
- package/src/lib/components/FormLayout/README.mdx +22 -8
- package/src/lib/components/Grid/_helpers/generateResponsiveCustomProperties.js +1 -1
- package/src/lib/components/InputGroup/InputGroup.jsx +170 -0
- package/src/lib/components/InputGroup/InputGroup.scss +92 -0
- package/src/lib/components/InputGroup/InputGroupContext.js +3 -0
- package/src/lib/components/InputGroup/README.mdx +278 -0
- package/src/lib/components/InputGroup/_theme.scss +2 -0
- package/src/lib/components/InputGroup/index.js +2 -0
- package/src/lib/components/Modal/Modal.jsx +58 -97
- package/src/lib/components/Modal/ModalCloseButton.scss +2 -2
- package/src/lib/components/Modal/README.mdx +392 -128
- package/src/lib/components/Modal/_helpers/getPositionClassName.js +7 -0
- package/src/lib/components/Modal/_helpers/getSizeClassName.js +19 -0
- package/src/lib/components/Modal/_hooks/useModalFocus.js +126 -0
- package/src/lib/components/Modal/_hooks/useModalScrollPrevention.js +35 -0
- package/src/lib/components/Modal/_settings.scss +2 -2
- package/src/lib/components/Popover/README.mdx +7 -4
- package/src/lib/components/Radio/README.mdx +9 -1
- package/src/lib/components/Radio/Radio.jsx +39 -31
- package/src/lib/components/Radio/Radio.scss +11 -1
- package/src/lib/components/ScrollView/README.mdx +2 -2
- package/src/lib/components/SelectField/SelectField.jsx +21 -8
- package/src/lib/components/SelectField/SelectField.scss +5 -0
- package/src/lib/components/Table/_components/TableCell.scss +6 -5
- package/src/lib/components/Table/_components/TableHeaderCell/TableHeaderCell.jsx +8 -5
- package/src/lib/components/Table/_settings.scss +5 -6
- package/src/lib/components/Text/README.mdx +14 -8
- package/src/lib/components/TextField/TextField.jsx +21 -8
- package/src/lib/components/TextField/TextField.scss +5 -0
- package/src/lib/components/TextLink/README.mdx +8 -6
- package/src/lib/components/TextLink/TextLink.scss +5 -0
- package/src/lib/components/TextLink/_theme.scss +2 -0
- package/src/lib/components/Toolbar/README.mdx +19 -11
- package/src/lib/components/_helpers/getRootColorClassName.js +4 -0
- package/src/lib/index.js +1 -0
- package/src/lib/styles/elements/_code.scss +1 -3
- package/src/lib/styles/elements/_page.scss +1 -0
- package/src/lib/styles/elements/_rulers.scss +1 -3
- package/src/lib/styles/elements/_small.scss +1 -1
- package/src/lib/styles/settings/_form-fields.scss +1 -1
- package/src/lib/styles/settings/_utilities.scss +46 -14
- package/src/lib/styles/theme/_accessibility.scss +4 -4
- package/src/lib/styles/theme/_borders.scss +3 -2
- package/src/lib/styles/theme/_code.scss +2 -2
- package/src/lib/styles/theme/_links.scss +6 -4
- package/src/lib/styles/theme/_lists.scss +1 -1
- package/src/lib/styles/theme/_page.scss +2 -2
- package/src/lib/styles/theme/_spacing.scss +11 -11
- package/src/lib/styles/theme/_typography.scss +19 -18
- package/src/lib/styles/theme-constants/_colors.scss +23 -23
- package/src/lib/styles/tools/_spacing.scss +1 -1
- package/src/lib/styles/tools/form-fields/_box-field-elements.scss +19 -2
- package/src/lib/styles/tools/form-fields/_box-field-sizes.scss +11 -8
- package/src/lib/styles/tools/form-fields/_foundation.scss +7 -0
- package/src/lib/theme.scss +650 -567
- package/src/lib/styles/theme/_colors.scss +0 -65
- /package/src/lib/components/{Button/helpers → _helpers}/getRootPriorityClassName.js +0 -0
@@ -7,6 +7,7 @@ import { getRootValidationStateClassName } from '../_helpers/getRootValidationSt
|
|
7
7
|
import { resolveContextOrProp } from '../_helpers/resolveContextOrProp';
|
8
8
|
import { transferProps } from '../_helpers/transferProps';
|
9
9
|
import { FormLayoutContext } from '../FormLayout';
|
10
|
+
import { InputGroupContext } from '../InputGroup/InputGroupContext';
|
10
11
|
import styles from './TextField.scss';
|
11
12
|
|
12
13
|
const SMALL_INPUT_SIZE = 10;
|
@@ -29,7 +30,8 @@ export const TextField = React.forwardRef((props, ref) => {
|
|
29
30
|
variant,
|
30
31
|
...restProps
|
31
32
|
} = props;
|
32
|
-
const
|
33
|
+
const formLayoutContext = useContext(FormLayoutContext);
|
34
|
+
const inputGroupContext = useContext(InputGroupContext);
|
33
35
|
const hasSmallInput = (inputSize !== null) && (inputSize <= SMALL_INPUT_SIZE);
|
34
36
|
|
35
37
|
return (
|
@@ -39,13 +41,17 @@ export const TextField = React.forwardRef((props, ref) => {
|
|
39
41
|
fullWidth && styles.isRootFullWidth,
|
40
42
|
hasSmallInput && styles.hasRootSmallInput,
|
41
43
|
inputSize && styles.hasRootCustomInputSize,
|
42
|
-
|
43
|
-
resolveContextOrProp(
|
44
|
+
formLayoutContext && styles.isRootInFormLayout,
|
45
|
+
resolveContextOrProp(inputGroupContext && inputGroupContext.disabled, disabled) && styles.isRootDisabled,
|
46
|
+
resolveContextOrProp(formLayoutContext && formLayoutContext.layout, layout) === 'horizontal'
|
44
47
|
? styles.isRootLayoutHorizontal
|
45
48
|
: styles.isRootLayoutVertical,
|
46
|
-
|
49
|
+
inputGroupContext && styles.isRootGrouped,
|
47
50
|
required && styles.isRootRequired,
|
48
|
-
getRootSizeClassName(
|
51
|
+
getRootSizeClassName(
|
52
|
+
resolveContextOrProp(inputGroupContext && inputGroupContext.size, size),
|
53
|
+
styles,
|
54
|
+
),
|
49
55
|
getRootValidationStateClassName(validationState, styles),
|
50
56
|
variant === 'filled' ? styles.isRootVariantFilled : styles.isRootVariantOutline,
|
51
57
|
)}
|
@@ -56,7 +62,7 @@ export const TextField = React.forwardRef((props, ref) => {
|
|
56
62
|
<div
|
57
63
|
className={classNames(
|
58
64
|
styles.label,
|
59
|
-
!isLabelVisible && styles.isLabelHidden,
|
65
|
+
(!isLabelVisible || inputGroupContext) && styles.isLabelHidden,
|
60
66
|
)}
|
61
67
|
id={id && `${id}__labelText`}
|
62
68
|
>
|
@@ -67,7 +73,7 @@ export const TextField = React.forwardRef((props, ref) => {
|
|
67
73
|
<input
|
68
74
|
{...transferProps(restProps)}
|
69
75
|
className={styles.input}
|
70
|
-
disabled={disabled}
|
76
|
+
disabled={resolveContextOrProp(inputGroupContext && inputGroupContext.disabled, disabled)}
|
71
77
|
id={id}
|
72
78
|
ref={ref}
|
73
79
|
required={required}
|
@@ -86,7 +92,7 @@ export const TextField = React.forwardRef((props, ref) => {
|
|
86
92
|
{helpText}
|
87
93
|
</div>
|
88
94
|
)}
|
89
|
-
{validationText && (
|
95
|
+
{(validationText && !inputGroupContext) && (
|
90
96
|
<div
|
91
97
|
className={styles.validationText}
|
92
98
|
id={id && `${id}__validationText`}
|
@@ -143,6 +149,8 @@ TextField.propTypes = {
|
|
143
149
|
/**
|
144
150
|
* If `false`, the label will be visually hidden (but remains accessible by assistive
|
145
151
|
* technologies).
|
152
|
+
*
|
153
|
+
* Automatically set to `false` when the component is rendered within `InputGroup` component.
|
146
154
|
*/
|
147
155
|
isLabelVisible: PropTypes.bool,
|
148
156
|
/**
|
@@ -162,6 +170,8 @@ TextField.propTypes = {
|
|
162
170
|
required: PropTypes.bool,
|
163
171
|
/**
|
164
172
|
* Size of the field.
|
173
|
+
*
|
174
|
+
* Ignored if the component is rendered within `InputGroup` component as the value is inherited in such case.
|
165
175
|
*/
|
166
176
|
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
167
177
|
/**
|
@@ -174,6 +184,9 @@ TextField.propTypes = {
|
|
174
184
|
validationState: PropTypes.oneOf(['invalid', 'valid', 'warning']),
|
175
185
|
/**
|
176
186
|
* Validation message to be displayed.
|
187
|
+
*
|
188
|
+
* Validation text is never rendered when the component is placed into `InputGroup`. Instead, the `InputGroup`
|
189
|
+
* component itself renders all validation texts of its nested components.
|
177
190
|
*/
|
178
191
|
validationText: PropTypes.node,
|
179
192
|
/**
|
@@ -73,12 +73,14 @@ accessibility.
|
|
73
73
|
|
74
74
|
## Theming
|
75
75
|
|
76
|
-
| Custom Property
|
77
|
-
|
78
|
-
| `--rui-TextLink__color`
|
79
|
-
| `--rui-TextLink__text-decoration`
|
80
|
-
| `--rui-TextLink--hover__color`
|
81
|
-
| `--rui-TextLink--hover__text-decoration`
|
76
|
+
| Custom Property | Description |
|
77
|
+
|-------------------------------------------|-------------------------------------|
|
78
|
+
| `--rui-TextLink__color` | Text color |
|
79
|
+
| `--rui-TextLink__text-decoration` | Text decoration, e.g. underline |
|
80
|
+
| `--rui-TextLink--hover__color` | Text color on hover |
|
81
|
+
| `--rui-TextLink--hover__text-decoration` | Text decoration on hover |
|
82
|
+
| `--rui-TextLink--active__color` | Text color in the active state |
|
83
|
+
| `--rui-TextLink--active__text-decoration` | Text decoration in the active state |
|
82
84
|
|
83
85
|
[React synthetic events]: https://reactjs.org/docs/events.html
|
84
86
|
[a]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attributes
|
@@ -2,3 +2,5 @@ $color: var(--rui-TextLink__color);
|
|
2
2
|
$text-decoration: var(--rui-TextLink__text-decoration);
|
3
3
|
$hover-color: var(--rui-TextLink--hover__color);
|
4
4
|
$hover-text-decoration: var(--rui-TextLink--hover__text-decoration);
|
5
|
+
$active-color: var(--rui-TextLink--active__color);
|
6
|
+
$active-text-decoration: var(--rui-TextLink--active__text-decoration);
|
@@ -90,24 +90,28 @@ of `right`.
|
|
90
90
|
<span id="alignment-label">Alignment:</span>
|
91
91
|
</ToolbarItem>
|
92
92
|
<ToolbarItem>
|
93
|
-
<ButtonGroup aria-labelledby="alignment-label">
|
93
|
+
<ButtonGroup aria-labelledby="alignment-label" priority="outline">
|
94
94
|
<Button
|
95
|
-
|
95
|
+
aria-pressed={alignment === 'top'}
|
96
|
+
color={alignment === 'top' ? 'selected' : 'secondary'}
|
96
97
|
label="top"
|
97
98
|
onClick={() => setAlignment('top')}
|
98
99
|
/>
|
99
100
|
<Button
|
100
|
-
|
101
|
+
aria-pressed={alignment === 'middle'}
|
102
|
+
color={alignment === 'middle' ? 'selected' : 'secondary'}
|
101
103
|
label="middle"
|
102
104
|
onClick={() => setAlignment('middle')}
|
103
105
|
/>
|
104
106
|
<Button
|
105
|
-
|
107
|
+
aria-pressed={alignment === 'bottom'}
|
108
|
+
color={alignment === 'bottom' ? 'selected' : 'secondary'}
|
106
109
|
label="bottom"
|
107
110
|
onClick={() => setAlignment('bottom')}
|
108
111
|
/>
|
109
112
|
<Button
|
110
|
-
|
113
|
+
aria-pressed={alignment === 'baseline'}
|
114
|
+
color={alignment === 'baseline' ? 'selected' : 'secondary'}
|
111
115
|
label="baseline"
|
112
116
|
onClick={() => setAlignment('baseline')}
|
113
117
|
/>
|
@@ -119,24 +123,28 @@ of `right`.
|
|
119
123
|
<span id="justification-label">Justification:</span>
|
120
124
|
</ToolbarItem>
|
121
125
|
<ToolbarItem>
|
122
|
-
<ButtonGroup aria-labelledby="justification-label">
|
126
|
+
<ButtonGroup aria-labelledby="justification-label" priority="outline">
|
123
127
|
<Button
|
124
|
-
|
128
|
+
aria-pressed={justification === 'start'}
|
129
|
+
color={justification === 'start' ? 'selected' : 'secondary'}
|
125
130
|
label="start"
|
126
131
|
onClick={() => setJustification('start')}
|
127
132
|
/>
|
128
133
|
<Button
|
129
|
-
|
134
|
+
aria-pressed={justification === 'center'}
|
135
|
+
color={justification === 'center' ? 'selected' : 'secondary'}
|
130
136
|
label="center"
|
131
137
|
onClick={() => setJustification('center')}
|
132
138
|
/>
|
133
139
|
<Button
|
134
|
-
|
140
|
+
aria-pressed={justification === 'end'}
|
141
|
+
color={justification === 'end' ? 'selected' : 'secondary'}
|
135
142
|
label="end"
|
136
143
|
onClick={() => setJustification('end')}
|
137
144
|
/>
|
138
145
|
<Button
|
139
|
-
|
146
|
+
aria-pressed={justification === 'space-between'}
|
147
|
+
color={justification === 'space-between' ? 'selected' : 'secondary'}
|
140
148
|
label="space-between"
|
141
149
|
onClick={() => setJustification('space-between')}
|
142
150
|
/>
|
@@ -202,7 +210,7 @@ toolbar groups, or on the entire toolbar.
|
|
202
210
|
|
203
211
|
<Playground>
|
204
212
|
{() => {
|
205
|
-
const [isGroupDense, setIsGroupDense] = React.useState(
|
213
|
+
const [isGroupDense, setIsGroupDense] = React.useState(false);
|
206
214
|
const [isToolbarDense, setIsToolbarDense] = React.useState(false);
|
207
215
|
return (
|
208
216
|
<div>
|
package/src/lib/index.js
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
@use "sass:map";
|
2
1
|
@use "../theme/code";
|
3
|
-
@use "../theme/colors";
|
4
2
|
|
5
3
|
code,
|
6
4
|
pre {
|
@@ -10,5 +8,5 @@ pre {
|
|
10
8
|
|
11
9
|
code {
|
12
10
|
padding: 0.15em 0.5em;
|
13
|
-
background-color:
|
11
|
+
background-color: var(--rui-color-background-light);
|
14
12
|
}
|
@@ -6,6 +6,7 @@ html {
|
|
6
6
|
height: 100%;
|
7
7
|
-moz-osx-font-smoothing: grayscale;
|
8
8
|
-webkit-font-smoothing: antialiased;
|
9
|
+
font-weight: typography.$font-weight-base;
|
9
10
|
font-size: typography.$font-size-base;
|
10
11
|
line-height: typography.$line-height-base;
|
11
12
|
font-family: typography.$font-family-base;
|
@@ -15,7 +15,7 @@ $horizontal-inner-gap: spacing.of(2);
|
|
15
15
|
$horizontal-outer-spacing: spacing.of(2);
|
16
16
|
|
17
17
|
$box-input-font-family: typography.$font-family-base;
|
18
|
-
$box-input-font-weight: map.get(typography.$font-weight-values,
|
18
|
+
$box-input-font-weight: map.get(typography.$font-weight-values, default);
|
19
19
|
$box-input-line-height: 1.5rem; // 1.
|
20
20
|
$box-field-caret-size: 2.25rem;
|
21
21
|
$box-field-input-number-arrows-width: 1.5rem;
|
@@ -1,5 +1,4 @@
|
|
1
1
|
@use "sass:map";
|
2
|
-
@use "../theme/colors";
|
3
2
|
@use "../theme/spacing";
|
4
3
|
@use "../theme/typography";
|
5
4
|
|
@@ -85,8 +84,8 @@ $map: (
|
|
85
84
|
"font-size": (
|
86
85
|
responsive: false,
|
87
86
|
property: font-size,
|
88
|
-
class:
|
89
|
-
values: typography.$size-values,
|
87
|
+
class: font-size,
|
88
|
+
values: typography.$font-size-values,
|
90
89
|
),
|
91
90
|
"text-align": (
|
92
91
|
responsive: true,
|
@@ -99,17 +98,50 @@ $map: (
|
|
99
98
|
property: color,
|
100
99
|
class: text,
|
101
100
|
values: (
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
101
|
+
// Text colors
|
102
|
+
primary: var(--rui-color-text-primary),
|
103
|
+
primary-disabled: var(--rui-color-text-primary-disabled),
|
104
|
+
secondary: var(--rui-color-text-secondary),
|
105
|
+
secondary-disabled: var(--rui-color-text-secondary-disabled),
|
106
|
+
// Feedback colors
|
107
|
+
success: var(--rui-color-feedback-success),
|
108
|
+
warning: var(--rui-color-feedback-warning),
|
109
|
+
danger: var(--rui-color-feedback-danger),
|
110
|
+
help: var(--rui-color-feedback-help),
|
111
|
+
info: var(--rui-color-feedback-info),
|
112
|
+
note: var(--rui-color-feedback-note),
|
113
|
+
// Neutral colors
|
114
|
+
light: var(--rui-color-neutral-light),
|
115
|
+
dark: var(--rui-color-neutral-dark),
|
116
|
+
),
|
117
|
+
),
|
118
|
+
"background-color": (
|
119
|
+
responsive: false,
|
120
|
+
property: background-color,
|
121
|
+
class: bg,
|
122
|
+
values: (
|
123
|
+
// Content layers
|
124
|
+
base: var(--rui-color-background-base),
|
125
|
+
layer-1: var(--rui-color-background-layer-1),
|
126
|
+
layer-2: var(--rui-color-background-layer-2),
|
127
|
+
// Component backgrounds
|
128
|
+
basic: var(--rui-color-background-basic),
|
129
|
+
disabled: var(--rui-color-background-disabled),
|
130
|
+
// Interactive backgrounds: intentionally not generated to utilities, CSS use only.
|
131
|
+
// Action backgrounds
|
132
|
+
primary: var(--rui-color-background-primary),
|
133
|
+
secondary: var(--rui-color-background-secondary),
|
134
|
+
selected: var(--rui-color-background-selected),
|
135
|
+
// Feedback backgrounds
|
136
|
+
success: var(--rui-color-background-success),
|
137
|
+
warning: var(--rui-color-background-warning),
|
138
|
+
danger: var(--rui-color-background-danger),
|
139
|
+
help: var(--rui-color-background-help),
|
140
|
+
info: var(--rui-color-background-info),
|
141
|
+
note: var(--rui-color-background-note),
|
142
|
+
// Neutral backgrounds
|
143
|
+
light: var(--rui-color-background-light),
|
144
|
+
dark: var(--rui-color-background-dark),
|
113
145
|
),
|
114
146
|
),
|
115
147
|
);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
// 1. Make it possible to keep the original box shadow of the component: if `--rui-focus-box-shadow` is set to
|
2
2
|
// `initial`, `revert` or `unset`, `--rui-local-box-shadow` is used.
|
3
3
|
|
4
|
-
$tap-target-size: var(--rui-tap-target-size);
|
5
|
-
$focus-outline: var(--rui-focus-
|
6
|
-
$focus-outline-offset: var(--rui-focus-
|
7
|
-
$focus-box-shadow: var(--rui-focus-
|
4
|
+
$tap-target-size: var(--rui-dimension-tap-target-size);
|
5
|
+
$focus-outline: var(--rui-border-focus-ring);
|
6
|
+
$focus-outline-offset: var(--rui-dimension-focus-ring-offset);
|
7
|
+
$focus-box-shadow: var(--rui-shadow-focus-ring, var(--rui-local-box-shadow, initial)); // 1.
|
@@ -1,2 +1,3 @@
|
|
1
|
-
$width: var(--rui-border-width);
|
2
|
-
$radius: var(--rui-
|
1
|
+
$width: var(--rui-dimension-border-width-1);
|
2
|
+
$radius-1: var(--rui-dimension-radius-1);
|
3
|
+
$radius-2: var(--rui-dimension-radius-2);
|
@@ -1,2 +1,2 @@
|
|
1
|
-
$font-family: var(--rui-
|
2
|
-
$font-size: var(--rui-
|
1
|
+
$font-family: var(--rui-font-family-monospace);
|
2
|
+
$font-size: var(--rui-font-size-code);
|
@@ -1,4 +1,6 @@
|
|
1
|
-
$color: var(--rui-link
|
2
|
-
$decoration: var(--rui-
|
3
|
-
$hover-color: var(--rui-link-hover
|
4
|
-
$hover-decoration: var(--rui-link-hover
|
1
|
+
$color: var(--rui-color-text-link);
|
2
|
+
$decoration: var(--rui-text-decoration-link);
|
3
|
+
$hover-color: var(--rui-color-text-link-hover);
|
4
|
+
$hover-decoration: var(--rui-text-decoration-link-hover);
|
5
|
+
$active-color: var(--rui-color-text-link-active);
|
6
|
+
$active-decoration: var(--rui-text-decoration-link-active);
|
@@ -1 +1 @@
|
|
1
|
-
$unordered-style: var(--rui-list-unordered
|
1
|
+
$unordered-style: var(--rui-list-style-unordered);
|
@@ -1,2 +1,2 @@
|
|
1
|
-
$
|
2
|
-
$
|
1
|
+
$background: var(--rui-color-background-base);
|
2
|
+
$color: var(--rui-color-text-primary);
|
@@ -1,16 +1,16 @@
|
|
1
1
|
$values: (
|
2
|
-
0: var(--rui-
|
3
|
-
1: var(--rui-
|
4
|
-
2: var(--rui-
|
5
|
-
3: var(--rui-
|
6
|
-
4: var(--rui-
|
7
|
-
5: var(--rui-
|
8
|
-
6: var(--rui-
|
9
|
-
7: var(--rui-
|
2
|
+
0: var(--rui-dimension-space-0),
|
3
|
+
1: var(--rui-dimension-space-1),
|
4
|
+
2: var(--rui-dimension-space-2),
|
5
|
+
3: var(--rui-dimension-space-3),
|
6
|
+
4: var(--rui-dimension-space-4),
|
7
|
+
5: var(--rui-dimension-space-5),
|
8
|
+
6: var(--rui-dimension-space-6),
|
9
|
+
7: var(--rui-dimension-space-7),
|
10
10
|
);
|
11
11
|
|
12
12
|
$bottom: (
|
13
|
-
|
14
|
-
headings: var(--rui-
|
15
|
-
layouts: var(--rui-
|
13
|
+
base: var(--rui-dimension-space-bottom-base),
|
14
|
+
headings: var(--rui-dimension-space-bottom-headings),
|
15
|
+
layouts: var(--rui-dimension-space-bottom-layouts),
|
16
16
|
);
|
@@ -1,24 +1,25 @@
|
|
1
1
|
$font-weight-values: (
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
medium: var(--rui-typography-font-weight-medium),
|
6
|
-
bold: var(--rui-typography-font-weight-bold),
|
2
|
+
light: var(--rui-font-weight-light),
|
3
|
+
default: var(--rui-font-weight-base),
|
4
|
+
bold: var(--rui-font-weight-bold),
|
7
5
|
);
|
8
6
|
|
9
|
-
$
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
7
|
+
$font-weight-base: var(--rui-font-weight-base);
|
8
|
+
|
9
|
+
$font-size-values: (
|
10
|
+
1: var(--rui-font-size-1),
|
11
|
+
2: var(--rui-font-size-2),
|
12
|
+
3: var(--rui-font-size-3),
|
13
|
+
4: var(--rui-font-size-4),
|
14
|
+
5: var(--rui-font-size-5),
|
15
|
+
6: var(--rui-font-size-6),
|
16
16
|
);
|
17
17
|
|
18
|
-
$size-
|
19
|
-
$size-
|
18
|
+
$font-size-base: var(--rui-font-size-base);
|
19
|
+
$font-size-small: var(--rui-font-size-small);
|
20
|
+
$font-size-smaller: var(--rui-font-size-smaller);
|
21
|
+
|
22
|
+
$font-family-base: var(--rui-font-family-base);
|
20
23
|
|
21
|
-
$
|
22
|
-
$
|
23
|
-
$line-height-base: var(--rui-typography-line-height-base);
|
24
|
-
$line-height-small: var(--rui-typography-line-height-small);
|
24
|
+
$line-height-base: var(--rui-line-height-base);
|
25
|
+
$line-height-small: var(--rui-line-height-small);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// ⚠️
|
1
|
+
// ⚠️ FOR `theme.scss` PURPOSES ONLY. DO NOT USE AS A BASE FOR YOUR COLOR PALETTES OR ANYWHERE ELSE THAN IN THE THEME.
|
2
2
|
|
3
3
|
@use "sass:color";
|
4
4
|
@use "../tools/colors";
|
@@ -8,8 +8,24 @@ $_amount-light: 90%;
|
|
8
8
|
$_amount-dark: 10%;
|
9
9
|
$_amount-darker: 20%;
|
10
10
|
|
11
|
+
$gray-50: colors.darken-color($_gray-base-color, 5%);
|
12
|
+
$gray-100: colors.darken-color($_gray-base-color, 10%);
|
13
|
+
$gray-200: colors.darken-color($_gray-base-color, 20%);
|
14
|
+
$gray-300: colors.darken-color($_gray-base-color, 30%);
|
15
|
+
$gray-400: colors.darken-color($_gray-base-color, 40%);
|
16
|
+
$gray-500: colors.darken-color($_gray-base-color, 50%);
|
17
|
+
$gray-600: colors.darken-color($_gray-base-color, 60%);
|
18
|
+
$gray-700: colors.darken-color($_gray-base-color, 70%);
|
19
|
+
$gray-800: colors.darken-color($_gray-base-color, 80%);
|
20
|
+
$gray-900: colors.darken-color($_gray-base-color, 90%);
|
21
|
+
|
11
22
|
$primary: #00778b;
|
12
|
-
$secondary:
|
23
|
+
$secondary: $gray-500;
|
24
|
+
$selected: #007bff;
|
25
|
+
|
26
|
+
$focus: color.scale($selected, $alpha: -50%);
|
27
|
+
|
28
|
+
$transparent: transparent;
|
13
29
|
|
14
30
|
$success: #28a745;
|
15
31
|
$warning: #ffc107;
|
@@ -21,7 +37,6 @@ $note: #007bff;
|
|
21
37
|
$white: #fff;
|
22
38
|
$black: #000;
|
23
39
|
|
24
|
-
// Derived color palette
|
25
40
|
$primary-light: colors.lighten-color($primary, $_amount-light);
|
26
41
|
$primary-dark: colors.darken-color($primary, $_amount-dark);
|
27
42
|
$primary-darker: colors.darken-color($primary, $_amount-darker);
|
@@ -32,6 +47,11 @@ $secondary-dark: colors.darken-color($secondary, $_amount-dark);
|
|
32
47
|
$secondary-darker: colors.darken-color($secondary, $_amount-darker);
|
33
48
|
$on-secondary: $white;
|
34
49
|
|
50
|
+
$selected-light: colors.lighten-color($selected, $_amount-light);
|
51
|
+
$selected-dark: colors.darken-color($selected, $_amount-dark);
|
52
|
+
$selected-darker: colors.darken-color($selected, $_amount-darker);
|
53
|
+
$on-selected: $white;
|
54
|
+
|
35
55
|
$success-light: colors.lighten-color($success, $_amount-light);
|
36
56
|
$success-dark: colors.darken-color($success, $_amount-dark);
|
37
57
|
$success-darker: colors.darken-color($success, $_amount-darker);
|
@@ -61,23 +81,3 @@ $note-light: colors.lighten-color($note, $_amount-light);
|
|
61
81
|
$note-dark: colors.darken-color($note, $_amount-dark);
|
62
82
|
$note-darker: colors.darken-color($note, $_amount-darker);
|
63
83
|
$on-note: $white;
|
64
|
-
|
65
|
-
$gray-50: colors.darken-color($_gray-base-color, 5%);
|
66
|
-
$gray-100: colors.darken-color($_gray-base-color, 10%);
|
67
|
-
$gray-200: colors.darken-color($_gray-base-color, 20%);
|
68
|
-
$gray-300: colors.darken-color($_gray-base-color, 30%);
|
69
|
-
$gray-400: colors.darken-color($_gray-base-color, 40%);
|
70
|
-
$gray-500: colors.darken-color($_gray-base-color, 50%);
|
71
|
-
$gray-600: colors.darken-color($_gray-base-color, 60%);
|
72
|
-
$gray-700: colors.darken-color($_gray-base-color, 70%);
|
73
|
-
$gray-800: colors.darken-color($_gray-base-color, 80%);
|
74
|
-
$gray-900: colors.darken-color($_gray-base-color, 90%);
|
75
|
-
|
76
|
-
$light: $white;
|
77
|
-
$dark: $gray-700;
|
78
|
-
$muted: $gray-500;
|
79
|
-
|
80
|
-
$active: $note;
|
81
|
-
$on-active: $on-note;
|
82
|
-
$active-hover: $note-darker;
|
83
|
-
$active-focus: color.adjust($note, $alpha: -0.75);
|
@@ -11,7 +11,7 @@
|
|
11
11
|
}
|
12
12
|
}
|
13
13
|
|
14
|
-
@mixin bottom($category:
|
14
|
+
@mixin bottom($category: base) {
|
15
15
|
@if not map.has-key(spacing.$bottom, $category) {
|
16
16
|
@error "Invalid spacing category specified! #{$category} doesn't exist. "
|
17
17
|
+ "Choose one of #{map.keys(spacing.$bottom)}.";
|
@@ -3,6 +3,7 @@
|
|
3
3
|
// result width across browsers.
|
4
4
|
// 3. Let inputs properly fit various layout scenarios.
|
5
5
|
// 4. Leave out space for SelectField caret.
|
6
|
+
// 5. Use a block-level display mode to prevent extra white space below grouped inputs in Safari.
|
6
7
|
|
7
8
|
@use "../../settings/form-fields" as settings;
|
8
9
|
@use "../../theme/form-fields" as theme;
|
@@ -93,8 +94,8 @@
|
|
93
94
|
align-items: center;
|
94
95
|
justify-content: center;
|
95
96
|
width: calc(#{settings.$box-field-caret-size} - 2 * #{theme.$box-border-width});
|
96
|
-
border-
|
97
|
-
border-
|
97
|
+
border-start-end-radius: theme.$box-border-radius;
|
98
|
+
border-end-end-radius: theme.$box-border-radius;
|
98
99
|
pointer-events: none;
|
99
100
|
}
|
100
101
|
|
@@ -122,3 +123,19 @@
|
|
122
123
|
transform: scaleX(1);
|
123
124
|
}
|
124
125
|
}
|
126
|
+
|
127
|
+
@mixin in-group-layout() {
|
128
|
+
.inputContainer {
|
129
|
+
display: block; // 5.
|
130
|
+
}
|
131
|
+
|
132
|
+
&:not(:first-child) .input {
|
133
|
+
border-start-start-radius: var(--rui-local-inner-border-radius);
|
134
|
+
border-end-start-radius: var(--rui-local-inner-border-radius);
|
135
|
+
}
|
136
|
+
|
137
|
+
&:not(:last-child) .input {
|
138
|
+
border-start-end-radius: var(--rui-local-inner-border-radius);
|
139
|
+
border-end-end-radius: var(--rui-local-inner-border-radius);
|
140
|
+
}
|
141
|
+
}
|
@@ -1,19 +1,22 @@
|
|
1
1
|
@use "sass:map";
|
2
2
|
@use "../../theme/form-fields" as theme;
|
3
3
|
|
4
|
-
@mixin size($size, $is-multiline: false) {
|
4
|
+
@mixin size($size, $has-input: true, $is-multiline: false) {
|
5
5
|
$size-properties: map.get(theme.$box-sizes, $size);
|
6
6
|
|
7
7
|
--rui-local-padding-y: #{map.get($size-properties, padding-y)};
|
8
8
|
--rui-local-padding-x: #{map.get($size-properties, padding-x)};
|
9
|
-
--rui-local-font-size: #{map.get($size-properties, font-size)};
|
10
9
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
10
|
+
@if $has-input {
|
11
|
+
--rui-local-font-size: #{map.get($size-properties, font-size)};
|
12
|
+
|
13
|
+
.input {
|
14
|
+
@if $is-multiline {
|
15
|
+
height: auto;
|
16
|
+
min-height: map.get($size-properties, height);
|
17
|
+
} @else {
|
18
|
+
--rui-local-height: #{map.get($size-properties, height)};
|
19
|
+
}
|
17
20
|
}
|
18
21
|
}
|
19
22
|
}
|