@atls-ui/theme 0.4.0 → 0.5.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
 
2
2
 
3
+ # [0.5.0](https://github.com/atls/hyperion/compare/@atls-ui/theme@0.4.0...@atls-ui/theme@0.5.0) (2026-08-25)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+
9
+ * **theme:** align subtle action colors ([58f91ae](https://github.com/atls/hyperion/commit/58f91ae9bd16334a6845fbd77fa23e40fe5e2155))
10
+
11
+ ### Features
12
+
13
+
14
+ * **theme:** add web elevation tokens ([2c6639e](https://github.com/atls/hyperion/commit/2c6639ec0422c2bebac0b40852af7325994f2364))
15
+ * **theme:** expose web elevations ([a3b8e7d](https://github.com/atls/hyperion/commit/a3b8e7d2df052b382ad7b4d3bba08e79ec9d35d4))
16
+
17
+
18
+
19
+
20
+
3
21
  # [0.4.0](https://github.com/atls/hyperion/compare/@atls-ui/theme@0.3.0...@atls-ui/theme@0.4.0) (2026-08-18)
4
22
 
5
23
 
package/dist/theme.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  import type { BordersTokens } from './tokens/index.js';
2
2
  import type { Colors } from './tokens/index.js';
3
+ import type { ElevationsTokens } from './tokens/index.js';
3
4
  import type { TypographyTokens } from './tokens/index.js';
4
5
  export interface Theme {
5
6
  borders: BordersTokens;
6
7
  colors: Colors;
8
+ elevations: ElevationsTokens;
7
9
  typography: TypographyTokens;
8
10
  }
9
11
  export declare const lightTheme: Theme;
package/dist/theme.js CHANGED
@@ -1,14 +1,17 @@
1
1
  import { borders } from './tokens/index.js';
2
2
  import { darkColors } from './tokens/index.js';
3
+ import { elevations } from './tokens/index.js';
3
4
  import { lightColors } from './tokens/index.js';
4
5
  import { typography } from './tokens/index.js';
5
6
  export const lightTheme = {
6
7
  borders: borders(lightColors),
7
8
  colors: lightColors,
9
+ elevations: elevations(lightColors),
8
10
  typography,
9
11
  };
10
12
  export const darkTheme = {
11
13
  borders: borders(darkColors),
12
14
  colors: darkColors,
15
+ elevations: elevations(darkColors),
13
16
  typography,
14
17
  };
@@ -4,7 +4,7 @@ export const darkColors = {
4
4
  hover: '#7AA7FF',
5
5
  pressed: '#3F74FF',
6
6
  disabled: '#5F8FFF',
7
- subtle: '#394A6B',
7
+ subtle: '#5F8FFF4D',
8
8
  },
9
9
  surface: {
10
10
  base: '#111111',
@@ -4,7 +4,7 @@ export const lightColors = {
4
4
  hover: '#1643A3',
5
5
  pressed: '#12357F',
6
6
  disabled: '#1E56C740',
7
- subtle: '#6B86C8',
7
+ subtle: '#1E56C740',
8
8
  },
9
9
  surface: {
10
10
  base: '#F8F9FF',
@@ -0,0 +1,13 @@
1
+ export declare const shadowBlurs: {
2
+ readonly xs5: "1px";
3
+ readonly xs4: "2px";
4
+ readonly xs3: "3px";
5
+ readonly xs2: "4px";
6
+ readonly xs: "5px";
7
+ readonly sm: "6px";
8
+ readonly md: "8px";
9
+ readonly lg: "12px";
10
+ readonly xl: "14px";
11
+ readonly xl2: "16px";
12
+ readonly xl3: "20px";
13
+ };
@@ -0,0 +1,13 @@
1
+ export const shadowBlurs = {
2
+ xs5: '1px',
3
+ xs4: '2px',
4
+ xs3: '3px',
5
+ xs2: '4px',
6
+ xs: '5px',
7
+ sm: '6px',
8
+ md: '8px',
9
+ lg: '12px',
10
+ xl: '14px',
11
+ xl2: '16px',
12
+ xl3: '20px',
13
+ };
@@ -0,0 +1,3 @@
1
+ import type { Colors } from '../colors/index.js';
2
+ import type { ElevationsTokens } from './interfaces.js';
3
+ export declare const elevations: (colors: Colors) => ElevationsTokens;
@@ -0,0 +1,155 @@
1
+ import { shadowBlurs } from './blurs.js';
2
+ import { shadowOffsets } from './offsets.js';
3
+ import { shadowSpreads } from './spreads.js';
4
+ import { createElevation } from './utils/index.js';
5
+ export const elevations = (colors) => ({
6
+ xs: {
7
+ default: createElevation({
8
+ color: colors.elevation.xs,
9
+ offsetY: shadowOffsets.xs,
10
+ blur: shadowBlurs.xs4,
11
+ }),
12
+ hover: createElevation({
13
+ color: colors.elevation.xs,
14
+ offsetY: shadowOffsets.xs,
15
+ blur: shadowBlurs.xs3,
16
+ spread: shadowSpreads.xs,
17
+ }, {
18
+ color: colors.action.subtle,
19
+ offsetX: shadowOffsets.xs,
20
+ offsetY: shadowOffsets.md,
21
+ blur: shadowBlurs.sm,
22
+ spread: shadowSpreads.negativeSm,
23
+ }),
24
+ pressed: createElevation({
25
+ color: colors.elevation.xs,
26
+ offsetY: shadowOffsets.xs,
27
+ blur: shadowBlurs.xs5,
28
+ inset: true,
29
+ }, {
30
+ color: colors.elevation.xs,
31
+ offsetY: shadowOffsets.xs,
32
+ blur: shadowBlurs.xs5,
33
+ spread: shadowSpreads.negativeXs,
34
+ }),
35
+ disabled: createElevation({
36
+ color: colors.elevation.xs,
37
+ offsetY: shadowOffsets.xs,
38
+ blur: shadowBlurs.xs5,
39
+ }),
40
+ },
41
+ sm: {
42
+ default: createElevation({
43
+ color: colors.elevation.sm,
44
+ offsetY: shadowOffsets.sm,
45
+ blur: shadowBlurs.sm,
46
+ }),
47
+ hover: createElevation({
48
+ color: colors.elevation.sm,
49
+ offsetY: shadowOffsets.sm,
50
+ blur: shadowBlurs.md,
51
+ spread: shadowSpreads.xs,
52
+ }, {
53
+ color: colors.action.subtle,
54
+ offsetX: shadowOffsets.xs,
55
+ offsetY: shadowOffsets.lg,
56
+ blur: shadowBlurs.md,
57
+ spread: shadowSpreads.negativeSm,
58
+ }),
59
+ pressed: createElevation({
60
+ color: colors.elevation.sm,
61
+ offsetY: shadowOffsets.xs,
62
+ blur: shadowBlurs.xs4,
63
+ inset: true,
64
+ }, {
65
+ color: colors.elevation.sm,
66
+ offsetY: shadowOffsets.xs,
67
+ blur: shadowBlurs.xs3,
68
+ spread: shadowSpreads.negativeSm,
69
+ }),
70
+ disabled: createElevation({
71
+ color: colors.elevation.sm,
72
+ offsetY: shadowOffsets.xs,
73
+ blur: shadowBlurs.xs4,
74
+ }),
75
+ },
76
+ md: {
77
+ default: createElevation({
78
+ color: colors.elevation.md,
79
+ offsetY: shadowOffsets.lg,
80
+ blur: shadowBlurs.lg,
81
+ }),
82
+ hover: createElevation({
83
+ color: colors.elevation.md,
84
+ offsetY: shadowOffsets.lg,
85
+ blur: shadowBlurs.xl,
86
+ }, {
87
+ color: colors.action.subtle,
88
+ offsetX: shadowOffsets.xs,
89
+ offsetY: shadowOffsets.xl,
90
+ blur: shadowBlurs.xl,
91
+ spread: shadowSpreads.negativeLg,
92
+ }),
93
+ pressed: createElevation({
94
+ color: colors.elevation.md,
95
+ offsetY: shadowOffsets.xs,
96
+ blur: shadowBlurs.xs3,
97
+ inset: true,
98
+ }, {
99
+ color: colors.elevation.md,
100
+ offsetY: shadowOffsets.sm,
101
+ blur: shadowBlurs.sm,
102
+ spread: shadowSpreads.negativeXs,
103
+ }),
104
+ disabled: createElevation({
105
+ color: colors.elevation.md,
106
+ offsetY: shadowOffsets.sm,
107
+ blur: shadowBlurs.xs,
108
+ }),
109
+ },
110
+ lg: {
111
+ default: createElevation({
112
+ color: colors.elevation.lg,
113
+ offsetY: shadowOffsets.xl,
114
+ blur: shadowBlurs.lg,
115
+ spread: shadowSpreads.negativeLg,
116
+ }),
117
+ hover: createElevation({
118
+ color: colors.elevation.lg,
119
+ offsetY: shadowOffsets.xl2,
120
+ blur: shadowBlurs.xl2,
121
+ spread: shadowSpreads.negativeLg,
122
+ }, {
123
+ color: colors.action.subtle,
124
+ offsetX: shadowOffsets.xs,
125
+ offsetY: shadowOffsets.xl,
126
+ blur: shadowBlurs.md,
127
+ spread: shadowSpreads.negativeXs,
128
+ }),
129
+ pressed: createElevation({
130
+ color: colors.elevation.lg,
131
+ offsetY: shadowOffsets.sm,
132
+ blur: shadowBlurs.xs2,
133
+ inset: true,
134
+ }, {
135
+ color: colors.elevation.lg,
136
+ offsetY: shadowOffsets.md,
137
+ blur: shadowBlurs.md,
138
+ spread: shadowSpreads.negativeLg,
139
+ }),
140
+ disabled: createElevation({
141
+ color: colors.elevation.lg,
142
+ offsetY: shadowOffsets.md,
143
+ blur: shadowBlurs.sm,
144
+ spread: shadowSpreads.negativeMd,
145
+ }),
146
+ },
147
+ modal: {
148
+ default: createElevation({
149
+ color: colors.elevation.md,
150
+ offsetY: shadowOffsets.xl3,
151
+ blur: shadowBlurs.xl3,
152
+ spread: shadowSpreads.negativeSm,
153
+ }),
154
+ },
155
+ });
@@ -0,0 +1,6 @@
1
+ export * from './blurs.js';
2
+ export * from './elevations.js';
3
+ export type * from './interfaces.js';
4
+ export * from './offsets.js';
5
+ export * from './spreads.js';
6
+ export * from './utils/index.js';
@@ -0,0 +1,5 @@
1
+ export * from "./blurs.js";
2
+ export * from "./elevations.js";
3
+ export * from "./offsets.js";
4
+ export * from "./spreads.js";
5
+ export * from "./utils/index.js";
@@ -0,0 +1,31 @@
1
+ import type { Properties } from 'csstype';
2
+ import type { shadowBlurs } from './blurs.js';
3
+ import type { shadowOffsets } from './offsets.js';
4
+ import type { shadowSpreads } from './spreads.js';
5
+ export type Elevation = NonNullable<Properties['boxShadow']>;
6
+ export type ShadowBlur = (typeof shadowBlurs)[keyof typeof shadowBlurs];
7
+ export type ShadowOffset = (typeof shadowOffsets)[keyof typeof shadowOffsets];
8
+ export type ShadowSpread = (typeof shadowSpreads)[keyof typeof shadowSpreads];
9
+ export interface ShadowOptions {
10
+ color: string;
11
+ offsetX?: ShadowOffset;
12
+ offsetY: ShadowOffset;
13
+ blur: ShadowBlur;
14
+ spread?: ShadowSpread;
15
+ inset?: boolean;
16
+ }
17
+ export interface ElevationStates {
18
+ default: Elevation;
19
+ }
20
+ export interface PressableElevationStates extends ElevationStates {
21
+ hover: Elevation;
22
+ pressed: Elevation;
23
+ disabled: Elevation;
24
+ }
25
+ export interface ElevationsTokens {
26
+ xs: PressableElevationStates;
27
+ sm: PressableElevationStates;
28
+ md: PressableElevationStates;
29
+ lg: PressableElevationStates;
30
+ modal: ElevationStates;
31
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ export declare const shadowOffsets: {
2
+ readonly none: "0";
3
+ readonly xs: "1px";
4
+ readonly sm: "2px";
5
+ readonly md: "3px";
6
+ readonly lg: "4px";
7
+ readonly xl: "6px";
8
+ readonly xl2: "7px";
9
+ readonly xl3: "12px";
10
+ };
@@ -0,0 +1,10 @@
1
+ export const shadowOffsets = {
2
+ none: '0',
3
+ xs: '1px',
4
+ sm: '2px',
5
+ md: '3px',
6
+ lg: '4px',
7
+ xl: '6px',
8
+ xl2: '7px',
9
+ xl3: '12px',
10
+ };
@@ -0,0 +1,8 @@
1
+ export declare const shadowSpreads: {
2
+ readonly negativeLg: "-4px";
3
+ readonly negativeMd: "-3px";
4
+ readonly negativeSm: "-2px";
5
+ readonly negativeXs: "-1px";
6
+ readonly none: "0";
7
+ readonly xs: "1px";
8
+ };
@@ -0,0 +1,8 @@
1
+ export const shadowSpreads = {
2
+ negativeLg: '-4px',
3
+ negativeMd: '-3px',
4
+ negativeSm: '-2px',
5
+ negativeXs: '-1px',
6
+ none: '0',
7
+ xs: '1px',
8
+ };
@@ -0,0 +1,3 @@
1
+ import type { Elevation } from '../interfaces.js';
2
+ import type { ShadowOptions } from '../interfaces.js';
3
+ export declare const createElevation: (...shadows: Array<ShadowOptions>) => Elevation;
@@ -0,0 +1,5 @@
1
+ import { shadowOffsets } from '../offsets.js';
2
+ import { shadowSpreads } from '../spreads.js';
3
+ export const createElevation = (...shadows) => shadows
4
+ .map(({ color, offsetX = shadowOffsets.none, offsetY, blur, spread = shadowSpreads.none, inset = false, }) => `${inset ? 'inset ' : ''}${offsetX} ${offsetY} ${blur} ${spread} ${color}`)
5
+ .join(', ');
@@ -0,0 +1 @@
1
+ export * from './createElevation.js';
@@ -0,0 +1 @@
1
+ export * from "./createElevation.js";
@@ -1,6 +1,7 @@
1
1
  export * from './animations.js';
2
2
  export * from './borders/index.js';
3
3
  export * from './colors/index.js';
4
+ export * from './elevation/index.js';
4
5
  export * from './layout/spaces.js';
5
6
  export * from './opacities.js';
6
7
  export * from './layout/radii.js';
@@ -1,6 +1,7 @@
1
1
  export * from "./animations.js";
2
2
  export * from "./borders/index.js";
3
3
  export * from "./colors/index.js";
4
+ export * from "./elevation/index.js";
4
5
  export * from "./layout/spaces.js";
5
6
  export * from "./opacities.js";
6
7
  export * from "./layout/radii.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atls-ui/theme",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "license": "BSD-3-Clause",
5
5
  "type": "module",
6
6
  "exports": {