@kth/style 1.4.3 → 1.4.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kth/style",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "exports": {
@@ -21,7 +21,8 @@
21
21
  "build:components": "rollup -c",
22
22
  "dev": "rollup -cw",
23
23
  "test": "npm run test:lint",
24
- "test:lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0"
24
+ "test:lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
25
+ "version": "lerna version --no-private --ignore-changes '**' --force-publish @kth/style"
25
26
  },
26
27
  "files": [
27
28
  "scss",
@@ -3,31 +3,7 @@
3
3
  @use "../tokens/typography";
4
4
  @use "../tokens/colors.scss";
5
5
 
6
- $icon-size: calc(#{spacing.$space-24} + 2 * var(--space-inner-icon));
7
-
8
6
  @layer kth-style {
9
- // Buttons with only icon:
10
- .kth-icon-button {
11
- background: unset;
12
- border: none;
13
- padding: var(--space-inner-icon);
14
- width: $icon-size;
15
- height: $icon-size;
16
- border-radius: spacing.$space-4;
17
-
18
- &:hover {
19
- background: var(--color-secondary-hover);
20
- cursor: pointer;
21
- }
22
- }
23
-
24
- .kth-icon-button.close::before {
25
- @include icons.icon-close;
26
- width: 100%;
27
- height: 100%;
28
- background-color: var(--color-tertiary);
29
- }
30
-
31
7
  .kth-button {
32
8
  display: inline-flex;
33
9
  padding: spacing.$space-8 spacing.$space-16;
@@ -0,0 +1,28 @@
1
+ @use "../tokens/spacing";
2
+ @use "../tokens/icons";
3
+ @use "../tokens/colors.scss";
4
+
5
+ $icon-size: calc(#{spacing.$space-24} + 2 * var(--space-inner-icon));
6
+
7
+ @layer kth-style {
8
+ .kth-icon-button {
9
+ background: unset;
10
+ border: none;
11
+ padding: var(--space-inner-icon);
12
+ width: $icon-size;
13
+ height: $icon-size;
14
+ border-radius: spacing.$space-4;
15
+
16
+ &:hover {
17
+ background: var(--color-secondary-hover);
18
+ cursor: pointer;
19
+ }
20
+ }
21
+
22
+ .kth-icon-button.close::before {
23
+ @include icons.icon-close;
24
+ width: 100%;
25
+ height: 100%;
26
+ background-color: var(--color-tertiary);
27
+ }
28
+ }
@@ -15,13 +15,6 @@
15
15
  padding: spacing.$space-16 spacing.$space-16 spacing.$space-32
16
16
  spacing.$space-32;
17
17
 
18
- // TODO: tokenize the breakpoint
19
- @media (min-width: 82rem) {
20
- // TODO: tokenize formula
21
- // Remaining space to the right from the header's max-width + the heading's padding
22
- right: calc((100vw - 82rem) / 2 + spacing.$space-32);
23
- }
24
-
25
18
  // Let the dialog take up the remaining space
26
19
  @media (min-width: calc(22.5rem + spacing.$space-16 * 2)) {
27
20
  width: 22.5rem;
@@ -30,6 +23,13 @@
30
23
  right: clamp(spacing.$space-16, calc(100vw / 30), spacing.$space-32);
31
24
  }
32
25
 
26
+ // TODO: tokenize the breakpoint
27
+ @media (min-width: 82rem) {
28
+ // TODO: tokenize formula
29
+ // Remaining space to the right from the header's max-width + the heading's padding
30
+ right: calc((100vw - 82rem) / 2 + spacing.$space-32);
31
+ }
32
+
33
33
  &__content {
34
34
  display: flex;
35
35
  gap: spacing.$space-8;