@react-ui-org/react-ui 0.50.2 → 0.51.0

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 (54) hide show
  1. package/dist/lib.development.js +30 -30
  2. package/dist/lib.js +1 -1
  3. package/package.json +1 -1
  4. package/src/lib/components/Alert/Alert.jsx +1 -3
  5. package/src/lib/components/Alert/Alert.scss +1 -9
  6. package/src/lib/components/Alert/README.mdx +0 -20
  7. package/src/lib/components/Alert/_settings.scss +1 -1
  8. package/src/lib/components/Alert/_theme.scss +0 -10
  9. package/src/lib/components/Badge/Badge.jsx +1 -3
  10. package/src/lib/components/Badge/Badge.scss +25 -44
  11. package/src/lib/components/Badge/README.mdx +6 -14
  12. package/src/lib/components/Button/Button.jsx +3 -1
  13. package/src/lib/components/Button/README.mdx +8 -3
  14. package/src/lib/components/Button/_priorities.scss +12 -0
  15. package/src/lib/components/Button/_settings.scss +1 -1
  16. package/src/lib/components/ButtonGroup/README.mdx +74 -58
  17. package/src/lib/components/Card/Card.jsx +1 -3
  18. package/src/lib/components/Card/Card.scss +0 -9
  19. package/src/lib/components/Card/README.mdx +0 -16
  20. package/src/lib/components/Card/_theme.scss +0 -10
  21. package/src/lib/components/FormLayout/README.mdx +17 -8
  22. package/src/lib/components/Grid/_helpers/generateResponsiveCustomProperties.js +1 -1
  23. package/src/lib/components/Modal/ModalCloseButton.scss +2 -2
  24. package/src/lib/components/Modal/README.mdx +106 -115
  25. package/src/lib/components/Modal/_settings.scss +1 -1
  26. package/src/lib/components/Popover/README.mdx +7 -4
  27. package/src/lib/components/ScrollView/README.mdx +2 -2
  28. package/src/lib/components/Table/_components/TableCell.scss +6 -5
  29. package/src/lib/components/Table/_components/TableHeaderCell/TableHeaderCell.jsx +8 -5
  30. package/src/lib/components/Table/_settings.scss +5 -6
  31. package/src/lib/components/Text/README.mdx +14 -8
  32. package/src/lib/components/TextLink/README.mdx +8 -6
  33. package/src/lib/components/TextLink/TextLink.scss +5 -0
  34. package/src/lib/components/TextLink/_theme.scss +2 -0
  35. package/src/lib/components/Toolbar/README.mdx +19 -11
  36. package/src/lib/components/_helpers/getRootColorClassName.js +4 -0
  37. package/src/lib/styles/elements/_code.scss +1 -3
  38. package/src/lib/styles/elements/_page.scss +1 -0
  39. package/src/lib/styles/elements/_rulers.scss +1 -3
  40. package/src/lib/styles/elements/_small.scss +1 -1
  41. package/src/lib/styles/settings/_form-fields.scss +1 -1
  42. package/src/lib/styles/settings/_utilities.scss +46 -14
  43. package/src/lib/styles/theme/_accessibility.scss +4 -4
  44. package/src/lib/styles/theme/_borders.scss +2 -2
  45. package/src/lib/styles/theme/_code.scss +2 -2
  46. package/src/lib/styles/theme/_links.scss +6 -4
  47. package/src/lib/styles/theme/_lists.scss +1 -1
  48. package/src/lib/styles/theme/_page.scss +2 -2
  49. package/src/lib/styles/theme/_spacing.scss +11 -11
  50. package/src/lib/styles/theme/_typography.scss +19 -18
  51. package/src/lib/styles/theme-constants/_colors.scss +23 -23
  52. package/src/lib/styles/tools/_spacing.scss +1 -1
  53. package/src/lib/theme.scss +635 -564
  54. package/src/lib/styles/theme/_colors.scss +0 -65
@@ -14,12 +14,13 @@
14
14
  border-bottom-width: 2px;
15
15
  }
16
16
 
17
+ .tableHeadCellLayout {
18
+ display: flex;
19
+ gap: settings.$cell-padding-x;
20
+ align-items: center;
21
+ }
22
+
17
23
  .isTableCellSortingActive,
18
24
  .isTableHeadCellSortingActive {
19
25
  background-color: settings.$sorted-background-color;
20
26
  }
21
-
22
- .sortButton {
23
- display: inline-block;
24
- margin-right: settings.$cell-padding-x;
25
- }
@@ -16,23 +16,26 @@ export const TableHeaderCell = ({
16
16
  className={isSortingActive ? styles.isTableHeadCellSortingActive : styles.tableHeadCell}
17
17
  id={id}
18
18
  >
19
- {sort && column.isSortable && (
20
- <div className={styles.sortButton}>
19
+ <span className={styles.tableHeadCellLayout}>
20
+ {sort && column.isSortable && (
21
21
  <Button
22
+ aria-pressed={isSortingActive}
22
23
  beforeLabel={
23
24
  sortDirection === 'asc'
24
25
  ? sort.ascendingIcon
25
26
  : sort.descendingIcon
26
27
  }
28
+ color={isSortingActive ? 'selected' : 'secondary'}
27
29
  id={id && `${id}__sortButton`}
28
30
  label={sortDirection}
29
31
  labelVisibility="none"
30
32
  onClick={() => sort.onClick(column.name, sortDirection)}
31
33
  priority="flat"
34
+ size="small"
32
35
  />
33
- </div>
34
- )}
35
- {column.label}
36
+ )}
37
+ {column.label}
38
+ </span>
36
39
  </th>
37
40
  );
38
41
  };
@@ -1,15 +1,14 @@
1
1
  @use "sass:map";
2
2
  @use "../../styles/theme/borders";
3
- @use "../../styles/theme/colors";
4
3
  @use "../../styles/theme/typography";
5
4
  @use "../../styles/tools/spacing";
6
5
 
7
6
  $cell-padding-x: spacing.of(3);
8
7
  $cell-padding-y: spacing.of(1);
9
8
  $border-width: borders.$width;
10
- $border-color: map.get(colors.$grays, gray-100);
11
- $background-color: colors.$white;
12
- $head-background-color: colors.$white;
9
+ $border-color: var(--rui-color-border-secondary);
10
+ $background-color: var(--rui-color-background-basic);
11
+ $head-background-color: var(--rui-color-background-basic);
13
12
  $head-font-weight: map.get(typography.$font-weight-values, bold);
14
- $hover-background-color: map.get(colors.$grays, gray-50);
15
- $sorted-background-color: map.get(colors.$grays, gray-50);
13
+ $hover-background-color: var(--rui-color-background-interactive-hover);
14
+ $sorted-background-color: var(--rui-color-background-selected);
@@ -156,19 +156,22 @@ will override automatic break point selection in `auto` mode when present.
156
156
  <span id="word-wrapping-options-label">Word wrapping:</span>
157
157
  </ToolbarItem>
158
158
  <ToolbarItem>
159
- <ButtonGroup aria-labelledby="word-wrapping-options-label">
159
+ <ButtonGroup aria-labelledby="word-wrapping-options-label" priority="outline">
160
160
  <Button
161
- color={wordWrapping === 'normal' ? 'dark' : 'primary'}
161
+ aria-pressed={wordWrapping === 'normal'}
162
+ color={wordWrapping === 'normal' ? 'selected' : 'secondary'}
162
163
  label="normal"
163
164
  onClick={() => setWordWrapping('normal')}
164
165
  />
165
166
  <Button
166
- color={wordWrapping === 'long-words' ? 'dark' : 'primary'}
167
+ aria-pressed={wordWrapping === 'long-words'}
168
+ color={wordWrapping === 'long-words' ? 'selected' : 'secondary'}
167
169
  label="long-words"
168
170
  onClick={() => setWordWrapping('long-words')}
169
171
  />
170
172
  <Button
171
- color={wordWrapping === 'anywhere' ? 'dark' : 'primary'}
173
+ aria-pressed={wordWrapping === 'anywhere'}
174
+ color={wordWrapping === 'anywhere' ? 'selected' : 'secondary'}
172
175
  label="anywhere"
173
176
  onClick={() => setWordWrapping('anywhere')}
174
177
  />
@@ -180,19 +183,22 @@ will override automatic break point selection in `auto` mode when present.
180
183
  <span id="hyphens-options-label">Hyphens:</span>
181
184
  </ToolbarItem>
182
185
  <ToolbarItem>
183
- <ButtonGroup aria-labelledby="hyphens-options-label">
186
+ <ButtonGroup aria-labelledby="hyphens-options-label" priority="outline">
184
187
  <Button
185
- color={hyphens === 'none' ? 'dark' : 'primary'}
188
+ aria-pressed={hyphens === 'none'}
189
+ color={hyphens === 'none' ? 'selected' : 'secondary'}
186
190
  label="none"
187
191
  onClick={() => setHyphens('none')}
188
192
  />
189
193
  <Button
190
- color={hyphens === 'auto' ? 'dark' : 'primary'}
194
+ aria-pressed={hyphens === 'auto'}
195
+ color={hyphens === 'auto' ? 'selected' : 'secondary'}
191
196
  label="auto"
192
197
  onClick={() => setHyphens('auto')}
193
198
  />
194
199
  <Button
195
- color={hyphens === 'manual' ? 'dark' : 'primary'}
200
+ aria-pressed={hyphens === 'manual'}
201
+ color={hyphens === 'manual' ? 'selected' : 'secondary'}
196
202
  label="manual"
197
203
  onClick={() => setHyphens('manual')}
198
204
  />
@@ -73,12 +73,14 @@ accessibility.
73
73
 
74
74
  ## Theming
75
75
 
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 |
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
@@ -8,4 +8,9 @@
8
8
  text-decoration: theme.$hover-text-decoration;
9
9
  color: theme.$hover-color;
10
10
  }
11
+
12
+ &:active {
13
+ text-decoration: theme.$active-text-decoration;
14
+ color: theme.$active-color;
15
+ }
11
16
  }
@@ -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
- color={alignment === 'top' ? 'dark' : 'primary'}
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
- color={alignment === 'middle' ? 'dark' : 'primary'}
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
- color={alignment === 'bottom' ? 'dark' : 'primary'}
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
- color={alignment === 'baseline' ? 'dark' : 'primary'}
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
- color={justification === 'start' ? 'dark' : 'primary'}
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
- color={justification === 'center' ? 'dark' : 'primary'}
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
- color={justification === 'end' ? 'dark' : 'primary'}
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
- color={justification === 'space-between' ? 'dark' : 'primary'}
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(true);
213
+ const [isGroupDense, setIsGroupDense] = React.useState(false);
206
214
  const [isToolbarDense, setIsToolbarDense] = React.useState(false);
207
215
  return (
208
216
  <div>
@@ -7,6 +7,10 @@ export const getRootColorClassName = (variant, styles) => {
7
7
  return styles.isRootColorSecondary;
8
8
  }
9
9
 
10
+ if (variant === 'selected') {
11
+ return styles.isRootColorSelected;
12
+ }
13
+
10
14
  if (variant === 'success') {
11
15
  return styles.isRootColorSuccess;
12
16
  }
@@ -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: map.get(colors.$grays, gray-100);
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;
@@ -1,9 +1,7 @@
1
- @use "sass:map";
2
1
  @use "../theme/borders";
3
- @use "../theme/colors";
4
2
 
5
3
  hr {
6
4
  border: 0;
7
- border-top: borders.$width solid map.get(colors.$grays, gray-200);
5
+ border-top: borders.$width solid var(--rui-color-border-secondary);
8
6
  background: none;
9
7
  }
@@ -1,5 +1,5 @@
1
1
  @use "../theme/typography";
2
2
 
3
3
  small {
4
- font-size: typography.$size-small;
4
+ font-size: typography.$font-size-small;
5
5
  }
@@ -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, regular);
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: typography-size,
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
- primary: map.get(colors.$brand, primary),
103
- secondary: map.get(colors.$brand, secondary),
104
- success: map.get(colors.$ui, success),
105
- warning: map.get(colors.$ui, warning),
106
- danger: map.get(colors.$ui, danger),
107
- help: map.get(colors.$ui, help),
108
- info: map.get(colors.$ui, info),
109
- note: map.get(colors.$ui, note),
110
- light: colors.$light,
111
- dark: colors.$dark,
112
- muted: colors.$muted,
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-outline);
6
- $focus-outline-offset: var(--rui-focus-outline-offset);
7
- $focus-box-shadow: var(--rui-focus-box-shadow, var(--rui-local-box-shadow, initial)); // 1.
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,2 @@
1
- $width: var(--rui-border-width);
2
- $radius: var(--rui-border-radius);
1
+ $width: var(--rui-dimension-border-width-1);
2
+ $radius: var(--rui-dimension-radius-1);
@@ -1,2 +1,2 @@
1
- $font-family: var(--rui-code-font-family);
2
- $font-size: var(--rui-code-font-size);
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-color);
2
- $decoration: var(--rui-link-decoration);
3
- $hover-color: var(--rui-link-hover-color);
4
- $hover-decoration: var(--rui-link-hover-decoration);
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-style);
1
+ $unordered-style: var(--rui-list-style-unordered);
@@ -1,2 +1,2 @@
1
- $color: var(--rui-page-color);
2
- $background: var(--rui-page-background);
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-spacing-0),
3
- 1: var(--rui-spacing-1),
4
- 2: var(--rui-spacing-2),
5
- 3: var(--rui-spacing-3),
6
- 4: var(--rui-spacing-4),
7
- 5: var(--rui-spacing-5),
8
- 6: var(--rui-spacing-6),
9
- 7: var(--rui-spacing-7),
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
- default: var(--rui-spacing-bottom-default),
14
- headings: var(--rui-spacing-bottom-headings),
15
- layouts: var(--rui-spacing-bottom-layouts),
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
- thin: var(--rui-typography-font-weight-thin),
3
- light: var(--rui-typography-font-weight-light),
4
- regular: var(--rui-typography-font-weight-regular),
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
- $size-values: (
10
- 0: var(--rui-typography-size-0),
11
- 1: var(--rui-typography-size-1),
12
- 2: var(--rui-typography-size-2),
13
- 3: var(--rui-typography-size-3),
14
- 4: var(--rui-typography-size-4),
15
- 5: var(--rui-typography-size-5),
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-small: var(--rui-typography-size-small);
19
- $size-smaller: var(--rui-typography-size-smaller);
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
- $font-family-base: var(--rui-typography-font-family-base);
22
- $font-size-base: var(--rui-typography-font-size-base);
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
- // ⚠️ For `theme.scss` purposes only, do not use anywhere else.
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: #fa4616;
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: default) {
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)}.";