@oddmash/ui 0.3.0 → 0.4.1

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/dist/tokens.css CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated from tokens JSON. Run npm run tokens. */
1
+ /* Generated from tokens JSON. Run pnpm run tokens. */
2
2
  :root, :host, [data-om-theme="light"] {
3
3
  --om-primitive-color-white: #ffffff;
4
4
  --om-primitive-color-ink: #171717;
@@ -31,9 +31,11 @@
31
31
  --om-primitive-space-16: 16px;
32
32
  --om-primitive-space-24: 24px;
33
33
  --om-primitive-space-32: 32px;
34
- --om-primitive-radius-sm: 4px;
35
- --om-primitive-radius-md: 6px;
36
- --om-primitive-radius-lg: 8px;
34
+ --om-primitive-radius-sm: 6px;
35
+ --om-primitive-radius-md: 8px;
36
+ --om-primitive-radius-lg: 12px;
37
+ --om-primitive-radius-xl: 16px;
38
+ --om-primitive-radius-2xl: 24px;
37
39
  --om-primitive-radius-pill: 999px;
38
40
  --om-primitive-font-family: 'Geist Sans', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
39
41
  --om-primitive-font-size-sm: 13px;
@@ -73,6 +75,8 @@
73
75
  --om-semantic-radius-sm: var(--om-primitive-radius-sm);
74
76
  --om-semantic-radius-md: var(--om-primitive-radius-md);
75
77
  --om-semantic-radius-lg: var(--om-primitive-radius-lg);
78
+ --om-semantic-radius-xl: var(--om-primitive-radius-xl);
79
+ --om-semantic-radius-2xl: var(--om-primitive-radius-2xl);
76
80
  --om-semantic-radius-pill: var(--om-primitive-radius-pill);
77
81
  --om-semantic-font-family: var(--om-primitive-font-family);
78
82
  --om-semantic-font-size: var(--om-primitive-font-size-md);
@@ -119,9 +123,11 @@
119
123
  --om-primitive-space-16: 16px;
120
124
  --om-primitive-space-24: 24px;
121
125
  --om-primitive-space-32: 32px;
122
- --om-primitive-radius-sm: 4px;
123
- --om-primitive-radius-md: 6px;
124
- --om-primitive-radius-lg: 8px;
126
+ --om-primitive-radius-sm: 6px;
127
+ --om-primitive-radius-md: 8px;
128
+ --om-primitive-radius-lg: 12px;
129
+ --om-primitive-radius-xl: 16px;
130
+ --om-primitive-radius-2xl: 24px;
125
131
  --om-primitive-radius-pill: 999px;
126
132
  --om-primitive-font-family: 'Geist Sans', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
127
133
  --om-primitive-font-size-sm: 13px;
@@ -161,6 +167,8 @@
161
167
  --om-semantic-radius-sm: var(--om-primitive-radius-sm);
162
168
  --om-semantic-radius-md: var(--om-primitive-radius-md);
163
169
  --om-semantic-radius-lg: var(--om-primitive-radius-lg);
170
+ --om-semantic-radius-xl: var(--om-primitive-radius-xl);
171
+ --om-semantic-radius-2xl: var(--om-primitive-radius-2xl);
164
172
  --om-semantic-radius-pill: var(--om-primitive-radius-pill);
165
173
  --om-semantic-font-family: var(--om-primitive-font-family);
166
174
  --om-semantic-font-size: var(--om-primitive-font-size-md);
package/dist/tokens.d.ts CHANGED
@@ -21,6 +21,8 @@ declare const tokens: {
21
21
  readonly "radius.sm": "var(--om-semantic-radius-sm)";
22
22
  readonly "radius.md": "var(--om-semantic-radius-md)";
23
23
  readonly "radius.lg": "var(--om-semantic-radius-lg)";
24
+ readonly "radius.xl": "var(--om-semantic-radius-xl)";
25
+ readonly "radius.2xl": "var(--om-semantic-radius-2xl)";
24
26
  readonly "radius.pill": "var(--om-semantic-radius-pill)";
25
27
  readonly "font.family": "var(--om-semantic-font-family)";
26
28
  readonly "font.size": "var(--om-semantic-font-size)";
package/dist/tokens.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  tokens
4
- } from "./chunk-7A5VK567.js";
4
+ } from "./chunk-OGJ3KIBM.js";
5
5
  export {
6
6
  tokens
7
7
  };
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@oddmash/ui",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "Small, themeable React foundations for Oddmash tools.",
5
5
  "type": "module",
6
+ "packageManager": "pnpm@11.25.0",
6
7
  "license": "MIT",
7
8
  "repository": {
8
9
  "type": "git",
@@ -125,6 +126,14 @@
125
126
  "./toast": {
126
127
  "types": "./dist/toast.d.ts",
127
128
  "import": "./dist/toast.js"
129
+ },
130
+ "./slider": {
131
+ "types": "./dist/slider.d.ts",
132
+ "import": "./dist/slider.js"
133
+ },
134
+ "./command-palette": {
135
+ "types": "./dist/command-palette.d.ts",
136
+ "import": "./dist/command-palette.js"
128
137
  }
129
138
  },
130
139
  "engines": {
@@ -133,15 +142,17 @@
133
142
  "scripts": {
134
143
  "tokens": "node --import tsx scripts/tokens.ts",
135
144
  "tokens:check": "node --import tsx scripts/tokens.ts --check",
136
- "build": "npm run tokens && tsup && sass --no-source-map src/styles.scss dist/styles.css && cp src/generated/tokens.css dist/tokens.css",
145
+ "build": "pnpm run tokens && tsup && sass --no-source-map src/styles.scss dist/styles.css && cp src/generated/tokens.css dist/tokens.css",
137
146
  "typecheck": "tsc --noEmit",
138
147
  "lint": "eslint .",
139
148
  "test": "vitest run",
140
149
  "demo": "vite --config demo/vite.config.ts",
141
150
  "build:demo": "vite build --config demo/vite.config.ts",
142
- "check": "npm run tokens:check && npm run build && npm run typecheck && npm run lint && npm test && npm run test:bundle && npm run build:demo",
151
+ "check": "pnpm run tokens:check && pnpm run build && pnpm run typecheck && pnpm run lint && pnpm test && pnpm run test:bundle && pnpm run build:demo",
143
152
  "test:browser": "playwright test",
144
- "prepare": "npm run build",
153
+ "test:a11y": "playwright test --grep \"accessibility|contrast\"",
154
+ "test:visual": "playwright test visual.spec.ts --project=chromium",
155
+ "prepare": "pnpm run build",
145
156
  "test:bundle": "node --import tsx scripts/bundle.ts"
146
157
  },
147
158
  "devDependencies": {
@@ -6,9 +6,9 @@
6
6
  "$value": {
7
7
  "colorSpace": "srgb",
8
8
  "components": [
9
- 1.0,
10
- 1.0,
11
- 1.0
9
+ 1,
10
+ 1,
11
+ 1
12
12
  ],
13
13
  "alpha": 1,
14
14
  "hex": "#ffffff"
@@ -201,7 +201,7 @@
201
201
  "$value": {
202
202
  "colorSpace": "srgb",
203
203
  "components": [
204
- 1.0,
204
+ 1,
205
205
  0.705882,
206
206
  0.670588
207
207
  ],
@@ -214,9 +214,9 @@
214
214
  "$value": {
215
215
  "colorSpace": "srgb",
216
216
  "components": [
217
- 0.0,
218
- 0.0,
219
- 0.0
217
+ 0,
218
+ 0,
219
+ 0
220
220
  ],
221
221
  "alpha": 1,
222
222
  "hex": "#000000"
@@ -294,7 +294,7 @@
294
294
  "components": [
295
295
  0.56862745,
296
296
  0.68627451,
297
- 1.0
297
+ 1
298
298
  ],
299
299
  "alpha": 1,
300
300
  "hex": "#91afff"
@@ -363,21 +363,35 @@
363
363
  "sm": {
364
364
  "$type": "dimension",
365
365
  "$value": {
366
- "value": 4,
366
+ "value": 6,
367
367
  "unit": "px"
368
368
  }
369
369
  },
370
370
  "md": {
371
371
  "$type": "dimension",
372
372
  "$value": {
373
- "value": 6,
373
+ "value": 8,
374
374
  "unit": "px"
375
375
  }
376
376
  },
377
377
  "lg": {
378
378
  "$type": "dimension",
379
379
  "$value": {
380
- "value": 8,
380
+ "value": 12,
381
+ "unit": "px"
382
+ }
383
+ },
384
+ "xl": {
385
+ "$type": "dimension",
386
+ "$value": {
387
+ "value": 16,
388
+ "unit": "px"
389
+ }
390
+ },
391
+ "2xl": {
392
+ "$type": "dimension",
393
+ "$value": {
394
+ "value": 24,
381
395
  "unit": "px"
382
396
  }
383
397
  },
@@ -93,6 +93,14 @@
93
93
  "$type": "dimension",
94
94
  "$value": "{primitive.radius.lg}"
95
95
  },
96
+ "xl": {
97
+ "$type": "dimension",
98
+ "$value": "{primitive.radius.xl}"
99
+ },
100
+ "2xl": {
101
+ "$type": "dimension",
102
+ "$value": "{primitive.radius.2xl}"
103
+ },
96
104
  "pill": {
97
105
  "$type": "dimension",
98
106
  "$value": "{primitive.radius.pill}"
@@ -93,6 +93,14 @@
93
93
  "$type": "dimension",
94
94
  "$value": "{primitive.radius.lg}"
95
95
  },
96
+ "xl": {
97
+ "$type": "dimension",
98
+ "$value": "{primitive.radius.xl}"
99
+ },
100
+ "2xl": {
101
+ "$type": "dimension",
102
+ "$value": "{primitive.radius.2xl}"
103
+ },
96
104
  "pill": {
97
105
  "$type": "dimension",
98
106
  "$value": "{primitive.radius.pill}"
@@ -1,24 +0,0 @@
1
- "use client";
2
- import {
3
- cx
4
- } from "./chunk-54STG2JB.js";
5
-
6
- // src/alert.tsx
7
- import { forwardRef } from "react";
8
- import { jsx } from "react/jsx-runtime";
9
- var Alert = /* @__PURE__ */ forwardRef(
10
- ({ className, tone = "neutral", ...props }, ref) => /* @__PURE__ */ jsx(
11
- "div",
12
- {
13
- ...props,
14
- ref,
15
- "data-tone": tone,
16
- className: cx("om-alert", className)
17
- }
18
- )
19
- );
20
- Alert.displayName = "Alert";
21
-
22
- export {
23
- Alert
24
- };
@@ -1,38 +0,0 @@
1
- "use client";
2
- import {
3
- cx
4
- } from "./chunk-54STG2JB.js";
5
-
6
- // src/toast.tsx
7
- import { forwardRef } from "react";
8
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
- var Toast = /* @__PURE__ */ forwardRef(
10
- ({
11
- open,
12
- title,
13
- onDismiss,
14
- dismissLabel = "Dismiss notification",
15
- tone = "neutral",
16
- children,
17
- className,
18
- ...props
19
- }, ref) => /* @__PURE__ */ jsx("div", { ...props, ref, className: cx("om-toast-region", className), children: /* @__PURE__ */ jsxs(
20
- "div",
21
- {
22
- className: open ? "om-toast" : void 0,
23
- "data-tone": open ? tone : void 0,
24
- children: [
25
- /* @__PURE__ */ jsx("div", { role: tone === "danger" ? "alert" : "status", "aria-atomic": "true", children: open && /* @__PURE__ */ jsxs(Fragment, { children: [
26
- /* @__PURE__ */ jsx("strong", { children: title }),
27
- children && /* @__PURE__ */ jsx("div", { children })
28
- ] }) }),
29
- open && /* @__PURE__ */ jsx("button", { type: "button", onClick: onDismiss, "aria-label": dismissLabel, children: "\xD7" })
30
- ]
31
- }
32
- ) })
33
- );
34
- Toast.displayName = "Toast";
35
-
36
- export {
37
- Toast
38
- };