@oscarpalmer/oui 0.18.0 → 0.19.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 (44) hide show
  1. package/dist/css/badge.css +10 -10
  2. package/dist/css/button.css +9 -9
  3. package/dist/css/color.css +99 -99
  4. package/dist/css/content.css +1 -1
  5. package/dist/css/flex.css +39 -39
  6. package/dist/css/form.css +29 -56
  7. package/dist/css/message.css +6 -6
  8. package/dist/css/reset.css +3 -2
  9. package/dist/css/table.css +4 -4
  10. package/dist/css/tooltip.css +18 -1
  11. package/dist/js/attributable.full.js +29 -41
  12. package/dist/js/floatable.full.js +322 -337
  13. package/dist/js/focus-trap/embedded.full.js +252 -195
  14. package/dist/js/focus-trap/standalone.full.js +283 -238
  15. package/dist/js/index.js +3 -3
  16. package/dist/js/oui.full.js +1170 -1193
  17. package/dist/js/popover.full.js +568 -630
  18. package/dist/js/popover.js +1 -1
  19. package/dist/js/splitter.full.js +533 -369
  20. package/dist/js/splitter.js +2 -2
  21. package/dist/js/tooltip.full.js +488 -554
  22. package/dist/js/tooltip.js +1 -1
  23. package/package.json +19 -19
  24. package/src/css/a11y.scss +1 -1
  25. package/src/css/badge.scss +23 -19
  26. package/src/css/button.scss +9 -9
  27. package/src/css/color.scss +99 -99
  28. package/src/css/content.scss +6 -8
  29. package/src/css/flex.scss +21 -20
  30. package/src/css/form.scss +37 -60
  31. package/src/css/message.scss +8 -12
  32. package/src/css/mixins.scss +11 -12
  33. package/src/css/popover.scss +2 -2
  34. package/src/css/reset.scss +14 -14
  35. package/src/css/splitter.scss +15 -13
  36. package/src/css/table.scss +11 -11
  37. package/src/css/tooltip.scss +25 -4
  38. package/src/js/attributable.ts +3 -10
  39. package/src/js/floatable.ts +7 -25
  40. package/src/js/focus-trap/embedded.ts +6 -24
  41. package/src/js/popover.ts +3 -3
  42. package/src/js/splitter.ts +9 -39
  43. package/src/js/tooltip.ts +5 -17
  44. package/dist/css/value.css +0 -1
@@ -1,8 +1,8 @@
1
1
  import { attributable } from "./attributable.js";
2
2
  import { Floatable } from "./floatable.js";
3
- import { isNullableOrWhitespace } from "@oscarpalmer/atoms/is";
4
3
  import { on } from "@oscarpalmer/toretto/event";
5
4
  import { findAncestor } from "@oscarpalmer/toretto/find";
5
+ import { isNullableOrWhitespace } from "@oscarpalmer/atoms/is";
6
6
  var Tooltip = class {
7
7
  attributes;
8
8
  floatable;
package/package.json CHANGED
@@ -4,28 +4,28 @@
4
4
  "url": "https://oscarpalmer.se"
5
5
  },
6
6
  "dependencies": {
7
- "@oscarpalmer/atoms": "^0.112",
8
- "@oscarpalmer/toretto": "^0.24"
7
+ "@oscarpalmer/atoms": "^0.124",
8
+ "@oscarpalmer/toretto": "^0.34"
9
9
  },
10
10
  "description": "Styles, components, and utilities for building websites and applications.",
11
11
  "devDependencies": {
12
- "@biomejs/biome": "^2.2",
13
- "@rollup/plugin-node-resolve": "^16",
14
- "@rollup/plugin-typescript": "^12.1",
15
- "@types/node": "^24.7",
16
- "@vitest/coverage-istanbul": "^3.2",
12
+ "@types/node": "^25",
13
+ "@vitest/coverage-istanbul": "^4",
17
14
  "autoprefixer": "^10.4",
18
- "jsdom": "^27",
15
+ "jsdom": "^27.4",
16
+ "oxfmt": "^0.21",
17
+ "oxlint": "^1.36",
19
18
  "postcss-cli": "^11",
20
19
  "postcss-input-range": "^6",
21
20
  "postcss-scss": "^4",
22
- "rollup": "^4.52",
23
- "sass": "^1.93",
24
- "stylelint": "^16.25",
21
+ "rolldown": "1.0.0-beta.57",
22
+ "sass": "^1.97",
23
+ "stylelint": "^16.26",
24
+ "stylelint-config-standard-scss": "^16",
25
25
  "tslib": "^2.8",
26
26
  "typescript": "^5.9",
27
- "vite": "npm:rolldown-vite@latest",
28
- "vitest": "^3.2"
27
+ "vite": "8.0.0-beta.5",
28
+ "vitest": "^4"
29
29
  },
30
30
  "exports": {
31
31
  ".": {
@@ -72,13 +72,13 @@
72
72
  "url": "git+https://github.com/oscarpalmer/oui.git"
73
73
  },
74
74
  "scripts": {
75
- "build": "npm run clean && npm run build:css && npm run build:js",
75
+ "build": "npm run clean && npm run build:js && npm run build:css",
76
76
  "build:css": "npm run build:postcss && npx sass ./postcss:./dist/css --no-source-map",
77
77
  "build:postcss": "npx postcss ./src/css/*.scss -d ./postcss -u autoprefixer postcss-input-range --parser postcss-scss",
78
- "build:js": "npx vite build && npm run rollup:build && npx tsc",
78
+ "build:js": "npm run clean && npx vite build && npm run rolldown:build && npx tsc",
79
79
  "clean": "rm -rf ./dist && rm -rf ./types && rm -f ./tsconfig.tsbuildinfo",
80
- "rollup:build": "npx rollup -c",
81
- "rollup:watch": "npx rollup -c --watch",
80
+ "rolldown:build": "npx rolldown -c",
81
+ "rolldown:watch": "npx rolldown -c ./rolldown.config.js --watch",
82
82
  "test": "npx vitest --coverage",
83
83
  "watch:css": "npx sass ./postcss:./dist/css --no-source-map --watch",
84
84
  "watch:postcss": "npx postcss ./src/css/*.scss -d ./postcss -u autoprefixer postcss-input-range --parser postcss-scss --watch",
@@ -86,5 +86,5 @@
86
86
  },
87
87
  "type": "module",
88
88
  "types": "types/index.d.ts",
89
- "version": "0.18.0"
90
- }
89
+ "version": "0.19.0"
90
+ }
package/src/css/a11y.scss CHANGED
@@ -8,6 +8,6 @@
8
8
  }
9
9
 
10
10
  :where(&:not(:active, :focus, :focus-within)) {
11
- @include mixins.visuallyHidden;
11
+ @include mixins.visually-hidden;
12
12
  }
13
13
  }
@@ -14,72 +14,76 @@
14
14
 
15
15
  display: inline-flex;
16
16
  flex-flow: row nowrap;
17
- gap: .5em;
18
- background-color: color-mix(in oklab, var(--oui-background, var(--oui-gray-0)), transparent 25%);
17
+ gap: 0.5em;
18
+ background-color: color-mix(
19
+ in oklab,
20
+ var(--oui-background, var(--oui-gray-0)),
21
+ transparent 25%
22
+ );
19
23
  color: var(--oui-foreground, var(--oui-gray-8));
20
24
  line-height: 1.25;
21
25
  }
22
26
 
23
27
  :where(&-pill) {
24
28
  border-radius: 3em;
25
- padding: .5em 1em;
29
+ padding: 0.5em 1em;
26
30
  }
27
31
 
28
32
  :where(&-tag) {
29
- border-radius: .25em;
30
- padding: .5em .75em;
33
+ border-radius: 0.25em;
34
+ padding: 0.5em 0.75em;
31
35
  }
32
36
 
33
- :where(&-pill-small, &-tag-small) {
34
- font-size: .875em;
37
+ :where(&-pill--small, &-tag--small) {
38
+ font-size: 0.875em;
35
39
  }
36
40
 
37
- :where(&-pill-tiny, &-tag-tiny) {
41
+ :where(&-pill--tiny, &-tag--tiny) {
38
42
  color: color-mix(in oklab, var(--oui-foreground, var(--oui-gray-8)), transparent 12.5%);
39
- font-size: .75em;
43
+ font-size: 0.75em;
40
44
  }
41
45
 
42
- :where(&-pill-tiny) {
43
- padding: .25em .75em;
46
+ :where(&-pill--tiny) {
47
+ padding: 0.25em 0.75em;
44
48
  }
45
49
 
46
- :where(&-tag-tiny) {
47
- padding: .25em .5em;
50
+ :where(&-tag--tiny) {
51
+ padding: 0.25em 0.5em;
48
52
  }
49
53
 
50
54
  // Colors
51
55
 
52
- :where(&-pill-blue, &-tag-blue) {
56
+ :where(&-pill--blue, &-tag--blue) {
53
57
  --oui-background: var(--oui-blue-0);
54
58
  --oui-foreground: var(--oui-blue-8);
55
59
  --oui-shadow: var(--oui-blue-6);
56
60
  }
57
61
 
58
- :where(&-pill-green, &-tag-green) {
62
+ :where(&-pill--green, &-tag--green) {
59
63
  --oui-background: var(--oui-green-0);
60
64
  --oui-foreground: var(--oui-green-8);
61
65
  --oui-shadow: var(--oui-green-6);
62
66
  }
63
67
 
64
- :where(&-pill-orange, &-tag-orange) {
68
+ :where(&-pill--orange, &-tag--orange) {
65
69
  --oui-background: var(--oui-orange-0);
66
70
  --oui-foreground: var(--oui-orange-8);
67
71
  --oui-shadow: var(--oui-orange-6);
68
72
  }
69
73
 
70
- :where(&-pill-purple, &-tag-purple) {
74
+ :where(&-pill--purple, &-tag--purple) {
71
75
  --oui-background: var(--oui-purple-0);
72
76
  --oui-foreground: var(--oui-purple-8);
73
77
  --oui-shadow: var(--oui-purple-6);
74
78
  }
75
79
 
76
- :where(&-pill-red, &-tag-red) {
80
+ :where(&-pill--red, &-tag--red) {
77
81
  --oui-background: var(--oui-red-0);
78
82
  --oui-foreground: var(--oui-red-8);
79
83
  --oui-shadow: var(--oui-red-6);
80
84
  }
81
85
 
82
- :where(&-pill-yellow, &-tag-yellow) {
86
+ :where(&-pill--yellow, &-tag--yellow) {
83
87
  --oui-background: var(--oui-yellow-0);
84
88
  --oui-foreground: var(--oui-yellow-8);
85
89
  --oui-shadow: var(--oui-yellow-6);
@@ -7,54 +7,54 @@
7
7
  @include mixins.button;
8
8
  }
9
9
 
10
- :where(&-blue) {
10
+ :where(&--blue) {
11
11
  --oui-background-value: var(--oui-blue-2);
12
12
  --oui-foreground-value: var(--oui-blue-8);
13
13
  --oui-outline-value: var(--oui-blue-6);
14
14
  }
15
15
 
16
- :where(&-green) {
16
+ :where(&--green) {
17
17
  --oui-background-value: var(--oui-green-2);
18
18
  --oui-foreground-value: var(--oui-green-8);
19
19
  --oui-outline-value: var(--oui-green-6);
20
20
  }
21
21
 
22
- :where(&-orange) {
22
+ :where(&--orange) {
23
23
  --oui-background-value: var(--oui-orange-2);
24
24
  --oui-foreground-value: var(--oui-orange-8);
25
25
  --oui-outline-value: var(--oui-orange-6);
26
26
  }
27
27
 
28
- :where(&-purple) {
28
+ :where(&--purple) {
29
29
  --oui-background-value: var(--oui-purple-2);
30
30
  --oui-foreground-value: var(--oui-purple-8);
31
31
  --oui-outline-value: var(--oui-purple-6);
32
32
  }
33
33
 
34
- :where(&-red) {
34
+ :where(&--red) {
35
35
  --oui-background-value: var(--oui-red-2);
36
36
  --oui-foreground-value: var(--oui-red-8);
37
37
  --oui-outline-value: var(--oui-red-6);
38
38
  }
39
39
 
40
- :where(&-yellow) {
40
+ :where(&--yellow) {
41
41
  --oui-background-value: var(--oui-yellow-2);
42
42
  --oui-foreground-value: var(--oui-yellow-8);
43
43
  --oui-outline-value: var(--oui-yellow-6);
44
44
  }
45
45
 
46
- :where(&-rounded) {
46
+ :where(&--rounded) {
47
47
  padding: 0.5em 1em;
48
48
  flex-wrap: nowrap;
49
49
  border-radius: 5em;
50
50
  white-space: nowrap;
51
51
  }
52
52
 
53
- :where(&-small) {
53
+ :where(&--small) {
54
54
  font-size: 0.875em;
55
55
  }
56
56
 
57
- :where(&-tiny) {
57
+ :where(&--tiny) {
58
58
  --oui-foreground-percentage: 12.5%;
59
59
 
60
60
  font-size: 0.75em;
@@ -5,111 +5,111 @@
5
5
  :root {
6
6
  --oui-absolute: light-dark(white, black);
7
7
 
8
- --oui-blue-0: light-dark(oklch(0.99 0.01 260), oklch(0.2 0.08 250));
9
- --oui-blue-1: light-dark(oklch(0.98 0.02 259), oklch(0.25 0.09 251));
10
- --oui-blue-2: light-dark(oklch(0.95 0.03 258), oklch(0.32 0.1 252));
11
- --oui-blue-3: light-dark(oklch(0.90 0.04 257), oklch(0.40 0.09 253));
12
- --oui-blue-4: light-dark(oklch(0.80 0.06 256), oklch(0.5 0.08 254));
13
- --oui-blue-5: light-dark(oklch(0.70 0.08 255), oklch(0.6 0.07 255));
14
- --oui-blue-6: light-dark(oklch(0.60 0.1 254), oklch(0.7 0.06 256));
15
- --oui-blue-7: light-dark(oklch(0.50 0.12 253), oklch(0.8 0.05 257));
16
- --oui-blue-8: light-dark(oklch(0.42 0.11 252), oklch(0.85 0.04 258));
17
- --oui-blue-9: light-dark(oklch(0.35 0.1 251), oklch(0.9 0.03 259));
18
- --oui-blue-10: light-dark(oklch(0.3 0.09 250), oklch(0.95 0.02 260));
8
+ --oui-blue-0: light-dark(oklch(99% 0.01 260deg), oklch(20% 0.08 250deg));
9
+ --oui-blue-1: light-dark(oklch(98% 0.02 259deg), oklch(25% 0.09 251deg));
10
+ --oui-blue-2: light-dark(oklch(95% 0.03 258deg), oklch(32% 0.1 252deg));
11
+ --oui-blue-3: light-dark(oklch(90% 0.04 257deg), oklch(40% 0.09 253deg));
12
+ --oui-blue-4: light-dark(oklch(80% 0.06 256deg), oklch(50% 0.08 254deg));
13
+ --oui-blue-5: light-dark(oklch(70% 0.08 255deg), oklch(60% 0.07 255deg));
14
+ --oui-blue-6: light-dark(oklch(60% 0.1 254deg), oklch(70% 0.06 256deg));
15
+ --oui-blue-7: light-dark(oklch(50% 0.12 253deg), oklch(80% 0.05 257deg));
16
+ --oui-blue-8: light-dark(oklch(42% 0.11 252deg), oklch(85% 0.04 258deg));
17
+ --oui-blue-9: light-dark(oklch(35% 0.1 251deg), oklch(90% 0.03 259deg));
18
+ --oui-blue-10: light-dark(oklch(30% 0.09 250deg), oklch(95% 0.02 260deg));
19
19
 
20
- --oui-green-0: light-dark(oklch(0.99 0.01 150), oklch(0.2 0.08 140));
21
- --oui-green-1: light-dark(oklch(0.98 0.02 149), oklch(0.25 0.09 141));
22
- --oui-green-2: light-dark(oklch(0.95 0.03 148), oklch(0.32 0.1 142));
23
- --oui-green-3: light-dark(oklch(0.90 0.04 147), oklch(0.4 0.09 143));
24
- --oui-green-4: light-dark(oklch(0.80 0.06 146), oklch(0.5 0.08 144));
25
- --oui-green-5: light-dark(oklch(0.70 0.08 145), oklch(0.6 0.07 145));
26
- --oui-green-6: light-dark(oklch(0.60 0.1 144), oklch(0.7 0.06 146));
27
- --oui-green-7: light-dark(oklch(0.50 0.12 143), oklch(0.8 0.05 147));
28
- --oui-green-8: light-dark(oklch(0.42 0.11 142), oklch(0.85 0.04 148));
29
- --oui-green-9: light-dark(oklch(0.35 0.1 141), oklch(0.9 0.03 149));
30
- --oui-green-10: light-dark(oklch(0.3 0.09 140), oklch(0.95 0.02 150));
20
+ --oui-green-0: light-dark(oklch(99% 0.01 150deg), oklch(20% 0.08 140deg));
21
+ --oui-green-1: light-dark(oklch(98% 0.02 149deg), oklch(25% 0.09 141deg));
22
+ --oui-green-2: light-dark(oklch(95% 0.03 148deg), oklch(32% 0.1 142deg));
23
+ --oui-green-3: light-dark(oklch(90% 0.04 147deg), oklch(40% 0.09 143deg));
24
+ --oui-green-4: light-dark(oklch(80% 0.06 146deg), oklch(50% 0.08 144deg));
25
+ --oui-green-5: light-dark(oklch(70% 0.08 145deg), oklch(60% 0.07 145deg));
26
+ --oui-green-6: light-dark(oklch(60% 0.1 144deg), oklch(70% 0.06 146deg));
27
+ --oui-green-7: light-dark(oklch(50% 0.12 143deg), oklch(80% 0.05 147deg));
28
+ --oui-green-8: light-dark(oklch(42% 0.11 142deg), oklch(85% 0.04 148deg));
29
+ --oui-green-9: light-dark(oklch(35% 0.1 141deg), oklch(90% 0.03 149deg));
30
+ --oui-green-10: light-dark(oklch(30% 0.09 140deg), oklch(95% 0.02 150deg));
31
31
 
32
- --oui-orange-0: light-dark(oklch(0.99 0.02 60), oklch(0.2 0.08 50));
33
- --oui-orange-1: light-dark(oklch(0.985 0.035 59), oklch(0.25 0.09 51));
34
- --oui-orange-2: light-dark(oklch(0.97 0.05 58), oklch(0.32 0.1 52));
35
- --oui-orange-3: light-dark(oklch(0.93 0.07 57), oklch(0.4 0.09 53));
36
- --oui-orange-4: light-dark(oklch(0.87 0.1 56), oklch(0.5 0.08 54));
37
- --oui-orange-5: light-dark(oklch(0.76 0.11 55), oklch(0.6 0.07 55));
38
- --oui-orange-6: light-dark(oklch(0.65 0.12 54), oklch(0.7 0.06 56));
39
- --oui-orange-7: light-dark(oklch(0.55 0.14 53), oklch(0.8 0.05 57));
40
- --oui-orange-8: light-dark(oklch(0.45 0.12 52), oklch(0.85 0.04 58));
41
- --oui-orange-9: light-dark(oklch(0.375 0.11 51), oklch(0.9 0.03 59));
42
- --oui-orange-10: light-dark(oklch(0.3 0.09 50), oklch(0.95 0.02 60));
32
+ --oui-orange-0: light-dark(oklch(99% 0.02 60deg), oklch(20% 0.08 50deg));
33
+ --oui-orange-1: light-dark(oklch(98.5% 0.035 59deg), oklch(25% 0.09 51deg));
34
+ --oui-orange-2: light-dark(oklch(97% 0.05 58deg), oklch(32% 0.1 52deg));
35
+ --oui-orange-3: light-dark(oklch(93% 0.07 57deg), oklch(40% 0.09 53deg));
36
+ --oui-orange-4: light-dark(oklch(87% 0.1 56deg), oklch(50% 0.08 54deg));
37
+ --oui-orange-5: light-dark(oklch(76% 0.11 55deg), oklch(60% 0.07 55deg));
38
+ --oui-orange-6: light-dark(oklch(65% 0.12 54deg), oklch(70% 0.06 56deg));
39
+ --oui-orange-7: light-dark(oklch(55% 0.14 53deg), oklch(80% 0.05 57deg));
40
+ --oui-orange-8: light-dark(oklch(45% 0.12 52deg), oklch(85% 0.04 58deg));
41
+ --oui-orange-9: light-dark(oklch(37.5% 0.11 51deg), oklch(90% 0.03 59deg));
42
+ --oui-orange-10: light-dark(oklch(30% 0.09 50deg), oklch(95% 0.02 60deg));
43
43
 
44
- --oui-purple-0: light-dark(oklch(0.99 0.02 300), oklch(0.2 0.08 290));
45
- --oui-purple-1: light-dark(oklch(0.98 0.035 299), oklch(0.25 0.09 291));
46
- --oui-purple-2: light-dark(oklch(0.95 0.05 298), oklch(0.32 0.1 292));
47
- --oui-purple-3: light-dark(oklch(0.90 0.07 297), oklch(0.4 0.09 293));
48
- --oui-purple-4: light-dark(oklch(0.80 0.1 296), oklch(0.5 0.08 294));
49
- --oui-purple-5: light-dark(oklch(0.70 0.11 295), oklch(0.6 0.07 295));
50
- --oui-purple-6: light-dark(oklch(0.60 0.12 294), oklch(0.7 0.06 296));
51
- --oui-purple-7: light-dark(oklch(0.50 0.14 293), oklch(0.8 0.05 297));
52
- --oui-purple-8: light-dark(oklch(0.42 0.12 292), oklch(0.85 0.04 298));
53
- --oui-purple-9: light-dark(oklch(0.35 0.11 291), oklch(0.9 0.03 299));
54
- --oui-purple-10: light-dark(oklch(0.3 0.09 290), oklch(0.95 0.02 300));
44
+ --oui-purple-0: light-dark(oklch(99% 0.02 300deg), oklch(20% 0.08 290deg));
45
+ --oui-purple-1: light-dark(oklch(98% 0.035 299deg), oklch(25% 0.09 291deg));
46
+ --oui-purple-2: light-dark(oklch(95% 0.05 298deg), oklch(32% 0.1 292deg));
47
+ --oui-purple-3: light-dark(oklch(90% 0.07 297deg), oklch(40% 0.09 293deg));
48
+ --oui-purple-4: light-dark(oklch(80% 0.1 296deg), oklch(50% 0.08 294deg));
49
+ --oui-purple-5: light-dark(oklch(70% 0.11 295deg), oklch(60% 0.07 295deg));
50
+ --oui-purple-6: light-dark(oklch(60% 0.12 294deg), oklch(70% 0.06 296deg));
51
+ --oui-purple-7: light-dark(oklch(50% 0.14 293deg), oklch(80% 0.05 297deg));
52
+ --oui-purple-8: light-dark(oklch(42% 0.12 292deg), oklch(85% 0.04 298deg));
53
+ --oui-purple-9: light-dark(oklch(35% 0.11 291deg), oklch(90% 0.03 299deg));
54
+ --oui-purple-10: light-dark(oklch(30% 0.09 290deg), oklch(95% 0.02 300deg));
55
55
 
56
- --oui-red-0: light-dark(oklch(0.99 0.024 25), oklch(0.2 0.08 25));
57
- --oui-red-1: light-dark(oklch(0.985 0.032 24), oklch(0.25 0.09 24));
58
- --oui-red-2: light-dark(oklch(0.97 0.05 23), oklch(0.32 0.1 23));
59
- --oui-red-3: light-dark(oklch(0.93 0.07 22), oklch(0.4 0.09 22));
60
- --oui-red-4: light-dark(oklch(0.87 0.1 21), oklch(0.5 0.08 21));
61
- --oui-red-5: light-dark(oklch(0.76 0.11 20), oklch(0.6 0.07 20));
62
- --oui-red-6: light-dark(oklch(0.65 0.12 19), oklch(0.7 0.06 19));
63
- --oui-red-7: light-dark(oklch(0.55 0.14 18), oklch(0.8 0.05 18));
64
- --oui-red-8: light-dark(oklch(0.45 0.12 17), oklch(0.85 0.04 17));
65
- --oui-red-9: light-dark(oklch(0.375 0.11 16), oklch(0.9 0.03 16));
66
- --oui-red-10: light-dark(oklch(0.3 0.09 15), oklch(0.95 0.02 15));
56
+ --oui-red-0: light-dark(oklch(99% 0.024 25deg), oklch(20% 0.08 25deg));
57
+ --oui-red-1: light-dark(oklch(98.5% 0.032 24deg), oklch(25% 0.09 24deg));
58
+ --oui-red-2: light-dark(oklch(97% 0.05 23deg), oklch(32% 0.1 23deg));
59
+ --oui-red-3: light-dark(oklch(93% 0.07 22deg), oklch(40% 0.09 22deg));
60
+ --oui-red-4: light-dark(oklch(87% 0.1 21deg), oklch(50% 0.08 21deg));
61
+ --oui-red-5: light-dark(oklch(76% 0.11 20deg), oklch(60% 0.07 20deg));
62
+ --oui-red-6: light-dark(oklch(65% 0.12 19deg), oklch(70% 0.06 19deg));
63
+ --oui-red-7: light-dark(oklch(55% 0.14 18deg), oklch(80% 0.05 18deg));
64
+ --oui-red-8: light-dark(oklch(45% 0.12 17deg), oklch(85% 0.04 17deg));
65
+ --oui-red-9: light-dark(oklch(37.5% 0.11 16deg), oklch(90% 0.03 16deg));
66
+ --oui-red-10: light-dark(oklch(30% 0.09 15deg), oklch(95% 0.02 15deg));
67
67
 
68
- --oui-yellow-0: light-dark(oklch(0.99 0.02 100), oklch(0.2 0.08 90));
69
- --oui-yellow-1: light-dark(oklch(0.985 0.035 99), oklch(0.25 0.09 91));
70
- --oui-yellow-2: light-dark(oklch(0.97 0.05 98), oklch(0.33 0.1 92));
71
- --oui-yellow-3: light-dark(oklch(0.93 0.07 97), oklch(0.4 0.09 93));
72
- --oui-yellow-4: light-dark(oklch(0.87 0.1 96), oklch(0.5 0.08 94));
73
- --oui-yellow-5: light-dark(oklch(.78 0.11 95), oklch(0.6 0.07 95));
74
- --oui-yellow-6: light-dark(oklch(0.65 0.12 94), oklch(0.7 0.06 96));
75
- --oui-yellow-7: light-dark(oklch(0.55 0.14 93), oklch(0.8 0.05 97));
76
- --oui-yellow-8: light-dark(oklch(0.45 0.12 92), oklch(0.85 0.04 98));
77
- --oui-yellow-9: light-dark(oklch(0.375 0.11 91), oklch(0.9 0.03 99));
78
- --oui-yellow-10: light-dark(oklch(0.3 0.09 90), oklch(0.95 0.02 100));
68
+ --oui-yellow-0: light-dark(oklch(99% 0.02 100deg), oklch(20% 0.08 90deg));
69
+ --oui-yellow-1: light-dark(oklch(98.5% 0.035 99deg), oklch(25% 0.09 91deg));
70
+ --oui-yellow-2: light-dark(oklch(97% 0.05 98deg), oklch(32% 0.1 92deg));
71
+ --oui-yellow-3: light-dark(oklch(93% 0.07 97deg), oklch(40% 0.09 93deg));
72
+ --oui-yellow-4: light-dark(oklch(87% 0.1 96deg), oklch(50% 0.08 94deg));
73
+ --oui-yellow-5: light-dark(oklch(78% 0.11 95deg), oklch(60% 0.07 95deg));
74
+ --oui-yellow-6: light-dark(oklch(65% 0.12 94deg), oklch(70% 0.06 96deg));
75
+ --oui-yellow-7: light-dark(oklch(55% 0.14 93deg), oklch(80% 0.05 97deg));
76
+ --oui-yellow-8: light-dark(oklch(45% 0.12 92deg), oklch(85% 0.04 98deg));
77
+ --oui-yellow-9: light-dark(oklch(37.5% 0.11 91deg), oklch(90% 0.03 99deg));
78
+ --oui-yellow-10: light-dark(oklch(30% 0.09 90deg), oklch(95% 0.02 100deg));
79
79
 
80
- --oui-gray-0: light-dark(oklch(0.98 0 0), oklch(0.22 0 0));
81
- --oui-gray-1: light-dark(oklch(0.98 0 0), oklch(0.26 0 0));
82
- --oui-gray-2: light-dark(oklch(0.95 0 0), oklch(0.32 0 0));
83
- --oui-gray-3: light-dark(oklch(0.90 0 0), oklch(0.4 0 0));
84
- --oui-gray-4: light-dark(oklch(0.80 0 0), oklch(0.5 0 0));
85
- --oui-gray-5: light-dark(oklch(0.70 0 0), oklch(0.6 0 0));
86
- --oui-gray-6: light-dark(oklch(0.60 0 0), oklch(0.7 0 0));
87
- --oui-gray-7: light-dark(oklch(0.50 0 0), oklch(0.8 0 0));
88
- --oui-gray-8: light-dark(oklch(0.42 0 0), oklch(0.85 0 0));
89
- --oui-gray-9: light-dark(oklch(0.35 0 0), oklch(0.9 0 0));
90
- --oui-gray-10: light-dark(oklch(0.3 0 0), oklch(0.95 0 0));
80
+ --oui-gray-0: light-dark(oklch(98% 0 0deg), oklch(22% 0 0deg));
81
+ --oui-gray-1: light-dark(oklch(98% 0 0deg), oklch(26% 0 0deg));
82
+ --oui-gray-2: light-dark(oklch(95% 0 0deg), oklch(32% 0 0deg));
83
+ --oui-gray-3: light-dark(oklch(90% 0 0deg), oklch(40% 0 0deg));
84
+ --oui-gray-4: light-dark(oklch(80% 0 0deg), oklch(50% 0 0deg));
85
+ --oui-gray-5: light-dark(oklch(70% 0 0deg), oklch(60% 0 0deg));
86
+ --oui-gray-6: light-dark(oklch(60% 0 0deg), oklch(70% 0 0deg));
87
+ --oui-gray-7: light-dark(oklch(50% 0 0deg), oklch(80% 0 0deg));
88
+ --oui-gray-8: light-dark(oklch(42% 0 0deg), oklch(85% 0 0deg));
89
+ --oui-gray-9: light-dark(oklch(35% 0 0deg), oklch(90% 0 0deg));
90
+ --oui-gray-10: light-dark(oklch(30% 0 0deg), oklch(95% 0 0deg));
91
91
 
92
- --oui-slate-0: light-dark(oklch(0.99 0.0025 255), oklch(0.22 0.005 255));
93
- --oui-slate-1: light-dark(oklch(0.98 0.005 255), oklch(0.26 0.0075 255));
94
- --oui-slate-2: light-dark(oklch(0.95 0.0075 255), oklch(0.32 0.01 255));
95
- --oui-slate-3: light-dark(oklch(0.90 0.01 255), oklch(0.4 0.0125 255));
96
- --oui-slate-4: light-dark(oklch(0.80 0.015 255), oklch(0.5 0.015 255));
97
- --oui-slate-5: light-dark(oklch(0.70 0.02 255), oklch(0.6 0.02 255));
98
- --oui-slate-6: light-dark(oklch(0.60 0.015 255), oklch(0.7 0.015 255));
99
- --oui-slate-7: light-dark(oklch(0.50 0.0125 255), oklch(0.8 0.0125 255));
100
- --oui-slate-8: light-dark(oklch(0.42 0.01 255), oklch(0.85 0.01 255));
101
- --oui-slate-9: light-dark(oklch(0.35 0.0075 255), oklch(0.9 0.0075 255));
102
- --oui-slate-10: light-dark(oklch(0.3 0.005 255), oklch(0.95 0.005 255));
92
+ --oui-slate-0: light-dark(oklch(99% 0.0025 255deg), oklch(22% 0.005 255deg));
93
+ --oui-slate-1: light-dark(oklch(98% 0.005 255deg), oklch(26% 0.0075 255deg));
94
+ --oui-slate-2: light-dark(oklch(95% 0.0075 255deg), oklch(32% 0.01 255deg));
95
+ --oui-slate-3: light-dark(oklch(90% 0.01 255deg), oklch(40% 0.0125 255deg));
96
+ --oui-slate-4: light-dark(oklch(80% 0.015 255deg), oklch(50% 0.015 255deg));
97
+ --oui-slate-5: light-dark(oklch(70% 0.02 255deg), oklch(60% 0.02 255deg));
98
+ --oui-slate-6: light-dark(oklch(60% 0.015 255deg), oklch(70% 0.015 255deg));
99
+ --oui-slate-7: light-dark(oklch(50% 0.0125 255deg), oklch(80% 0.0125 255deg));
100
+ --oui-slate-8: light-dark(oklch(42% 0.01 255deg), oklch(85% 0.01 255deg));
101
+ --oui-slate-9: light-dark(oklch(35% 0.0075 255deg), oklch(90% 0.0075 255deg));
102
+ --oui-slate-10: light-dark(oklch(30% 0.005 255deg), oklch(95% 0.005 255deg));
103
103
 
104
- --oui-stone-0: light-dark(oklch(0.99 0.0033 95), oklch(0.22 0.005 95));
105
- --oui-stone-1: light-dark(oklch(0.98 0.0067 95), oklch(0.26 0.0075 95));
106
- --oui-stone-2: light-dark(oklch(0.95 0.01 95), oklch(0.32 0.01 95));
107
- --oui-stone-3: light-dark(oklch(0.90 0.0125 95), oklch(0.4 0.0125 95));
108
- --oui-stone-4: light-dark(oklch(0.80 0.015 95), oklch(0.5 0.015 95));
109
- --oui-stone-5: light-dark(oklch(0.70 0.02 95), oklch(0.6 0.02 95));
110
- --oui-stone-6: light-dark(oklch(0.60 0.015 95), oklch(0.7 0.015 95));
111
- --oui-stone-7: light-dark(oklch(0.50 0.0125 95), oklch(0.8 0.0125 95));
112
- --oui-stone-8: light-dark(oklch(0.42 0.01 95), oklch(0.85 0.01 95));
113
- --oui-stone-9: light-dark(oklch(0.35 0.0075 95), oklch(0.9 0.0075 95));
114
- --oui-stone-10: light-dark(oklch(0.3 0.005 95), oklch(0.95 0.005 95));
104
+ --oui-stone-0: light-dark(oklch(99% 0.0033 95deg), oklch(22% 0.005 95deg));
105
+ --oui-stone-1: light-dark(oklch(98% 0.0067 95deg), oklch(26% 0.0075 95deg));
106
+ --oui-stone-2: light-dark(oklch(95% 0.01 95deg), oklch(32% 0.01 95deg));
107
+ --oui-stone-3: light-dark(oklch(90% 0.0125 95deg), oklch(40% 0.0125 95deg));
108
+ --oui-stone-4: light-dark(oklch(80% 0.015 95deg), oklch(50% 0.015 95deg));
109
+ --oui-stone-5: light-dark(oklch(70% 0.02 95deg), oklch(60% 0.02 95deg));
110
+ --oui-stone-6: light-dark(oklch(60% 0.015 95deg), oklch(70% 0.015 95deg));
111
+ --oui-stone-7: light-dark(oklch(50% 0.0125 95deg), oklch(80% 0.0125 95deg));
112
+ --oui-stone-8: light-dark(oklch(42% 0.01 95deg), oklch(85% 0.01 95deg));
113
+ --oui-stone-9: light-dark(oklch(35% 0.0075 95deg), oklch(90% 0.0075 95deg));
114
+ --oui-stone-10: light-dark(oklch(30% 0.005 95deg), oklch(95% 0.005 95deg));
115
115
  }
@@ -3,7 +3,7 @@
3
3
  @use './mixins' as mixins;
4
4
 
5
5
  @mixin thumb($background, $shadow) {
6
- @include mixins.shadowSmall(
6
+ @include mixins.shadow-small(
7
7
  color-mix(in oklab, $shadow, transparent 33%),
8
8
  color-mix(in oklab, white, transparent 82.5%)
9
9
  );
@@ -38,14 +38,12 @@
38
38
  align-items: center;
39
39
  list-style: none;
40
40
  outline: 4px solid
41
- color-mix(
42
- in oklab,
43
- var(--oui-blue-6),
44
- transparent var(--oui-outline-percentage, 100%)
45
- );
41
+ color-mix(in oklab, var(--oui-blue-6), transparent var(--oui-outline-percentage, 100%));
46
42
  outline-offset: 0.25em;
47
43
  border-radius: 0.125em;
48
- transition: 0.125s ease-in-out, margin 0s;
44
+ transition:
45
+ 0.125s ease-in-out,
46
+ margin 0s;
49
47
  cursor: pointer;
50
48
 
51
49
  &::before {
@@ -53,7 +51,7 @@
53
51
  width: 1em;
54
52
  height: 1em;
55
53
  margin: 0 0.5em 0 0;
56
- background-color: currentColor;
54
+ background-color: currentcolor;
57
55
  mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='4'%3E%3Cpath d='M4 0h6L7 4'/%3E%3C/svg%3E");
58
56
  mask-size: contain;
59
57
  mask-position: center;
package/src/css/flex.scss CHANGED
@@ -15,19 +15,19 @@
15
15
  }
16
16
 
17
17
  .flow {
18
- :where(&-large) {
18
+ :where(&-large, &--large) {
19
19
  gap: var(--flow-gap-large, calc(2 * var(--flow-gap, 1rem)));
20
20
  }
21
21
 
22
- :where(&-nowrap) {
22
+ :where(&-nowrap, &--nowrap) {
23
23
  flex-wrap: nowrap;
24
24
  }
25
25
 
26
- :where(&-small) {
26
+ :where(&-small, &--small) {
27
27
  gap: var(--flow-gap-small, calc(0.5 * var(--flow-gap, 1rem)));
28
28
  }
29
29
 
30
- :where(&-text) {
30
+ :where(&-text, &--text) {
31
31
  gap: var(--flow-gap-text, 1em);
32
32
  }
33
33
  }
@@ -38,21 +38,22 @@
38
38
  }
39
39
 
40
40
  .stack {
41
- :where(&-large) {
41
+ :where(&-large, &--large) {
42
42
  gap: var(--stack-gap-large, calc(2 * var(--stack-gap, 1rem)));
43
43
  }
44
44
 
45
- :where(&-small) {
45
+ :where(&-small, &--small) {
46
46
  gap: var(--stack-gap-small, calc(0.5 * var(--stack-gap, 1rem)));
47
47
  }
48
48
 
49
- :where(&-text) {
49
+ :where(&-text, &--text) {
50
50
  gap: var(--stack-gap-text, 1em);
51
51
  }
52
52
  }
53
53
 
54
54
  .flex {
55
- &-reverse {
55
+ &-reverse,
56
+ &--reverse {
56
57
  :where(&[class^='flow' i], &[class*=' flow' i]) {
57
58
  flex-direction: row-reverse;
58
59
  }
@@ -63,20 +64,20 @@
63
64
  }
64
65
  }
65
66
 
66
- $alignmentOrigins: (
67
+ $alignment-origins: (
67
68
  c: 'content',
68
69
  i: 'items',
69
70
  s: 'self',
70
71
  );
71
72
 
72
- $alignmentValues: (
73
+ $alignment-values: (
73
74
  c: 'center',
74
75
  fe: 'flex-end',
75
76
  fs: 'flex-start',
76
77
  s: 'stretch',
77
78
  );
78
79
 
79
- $justificationValues: (
80
+ $justification-values: (
80
81
  sa: 'space-around',
81
82
  sb: 'space-between',
82
83
  se: 'space-evenly',
@@ -87,20 +88,20 @@ $types: (
87
88
  j: 'justify',
88
89
  );
89
90
 
90
- @each $typeKey, $typeValue in $types {
91
- @each $alignmentOriginKey, $alignmentOriginValue in $alignmentOrigins {
92
- .flex-#{$typeKey}#{$alignmentOriginKey} {
93
- @each $alignmentValueKey, $alignmentValueValue in $alignmentValues {
94
- :where(&-#{$alignmentValueKey}) {
95
- #{$typeValue}-#{$alignmentOriginValue}: #{$alignmentValueValue};
91
+ @each $type-key, $type-value in $types {
92
+ @each $alignment-origin-key, $alignment-origin-value in $alignment-origins {
93
+ .flex-#{$type-key}#{$alignment-origin-key} {
94
+ @each $alignment-value-key, $alignment-value-value in $alignment-values {
95
+ :where(&-#{$alignment-value-key}, &--#{$alignment-value-key}) {
96
+ #{$type-value}-#{$alignment-origin-value}: #{$alignment-value-value};
96
97
  }
97
98
  }
98
99
  }
99
100
  }
100
101
 
101
- @each $justificationKey, $justificationValue in $justificationValues {
102
- :where(.flex-#{$typeKey}c-#{$justificationKey}) {
103
- #{$typeValue}-content: #{$justificationValue};
102
+ @each $justification-key, $justification-value in $justification-values {
103
+ :where(.flex-#{$type-key}c-#{$justification-key}, .flex-#{$type-key}c--#{$justification-key}) {
104
+ #{$type-value}-content: #{$justification-value};
104
105
  }
105
106
  }
106
107
  }