@jonmilner/ui 0.1.0 → 0.1.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.
@@ -25,6 +25,11 @@ export declare const tokens: {
25
25
  lg: string;
26
26
  xl: string;
27
27
  };
28
+ container: {
29
+ prose: string;
30
+ page: string;
31
+ wide: string;
32
+ };
28
33
  radius: {
29
34
  none: string;
30
35
  sm: string;
@@ -23,13 +23,17 @@ var e = (e) => `${e / 16}rem`, t = Object.fromEntries([
23
23
  lg: e(48),
24
24
  xl: e(56)
25
25
  }, r = {
26
+ prose: e(640),
27
+ page: e(1024),
28
+ wide: e(1280)
29
+ }, i = {
26
30
  none: "0",
27
31
  sm: e(4),
28
32
  med: e(8),
29
33
  lg: e(12),
30
34
  xl: e(16),
31
35
  full: "9999px"
32
- }, i = {
36
+ }, a = {
33
37
  xs: e(12),
34
38
  sm: e(14),
35
39
  med: e(16),
@@ -38,16 +42,16 @@ var e = (e) => `${e / 16}rem`, t = Object.fromEntries([
38
42
  "2xl": e(24),
39
43
  "3xl": e(30),
40
44
  "4xl": e(36)
41
- }, a = {
45
+ }, o = {
42
46
  regular: "400",
43
47
  medium: "500",
44
48
  semibold: "600",
45
49
  bold: "700"
46
- }, o = {
50
+ }, s = {
47
51
  sm: "1.25",
48
52
  med: "1.5",
49
53
  lg: "1.75"
50
- }, s = {
54
+ }, c = {
51
55
  base: "0",
52
56
  raised: "1",
53
57
  dropdown: "1000",
@@ -57,42 +61,43 @@ var e = (e) => `${e / 16}rem`, t = Object.fromEntries([
57
61
  popover: "1400",
58
62
  toast: "1500",
59
63
  tooltip: "1600"
60
- }, c = {
64
+ }, l = {
61
65
  fast: "120ms",
62
66
  med: "200ms",
63
67
  slow: "320ms"
64
- }, l = {
68
+ }, u = {
65
69
  standard: "cubic-bezier(0.2, 0, 0, 1)",
66
70
  enter: "cubic-bezier(0, 0, 0, 1)",
67
71
  exit: "cubic-bezier(0.3, 0, 1, 1)"
68
- }, u = {
72
+ }, d = {
69
73
  sm: e(4),
70
74
  med: e(8),
71
75
  lg: e(16)
72
- }, d = {
76
+ }, f = {
73
77
  sm: "0.02",
74
78
  med: "0.05",
75
79
  lg: "0.1"
76
- }, f = (e) => `color-mix(in srgb, var(--color-shadow) ${e}%, transparent)`, p = {
77
- sm: `0 1px 2px ${f(12)}`,
78
- med: `0 2px 8px ${f(14)}, 0 1px 2px ${f(8)}`,
79
- lg: `0 8px 24px ${f(16)}, 0 2px 6px ${f(8)}`
80
- }, m = "0 0 0 1px color-mix(in srgb, var(--color-fg) 10%, transparent)";
81
- `${m}${f(40)}`, `${m}${f(48)}${f(32)}`, `${m}${f(56)}${f(32)}`, c.fast, c.fast, c.fast;
82
- var h = {
80
+ }, p = (e) => `color-mix(in srgb, var(--color-shadow) ${e}%, transparent)`, m = {
81
+ sm: `0 1px 2px ${p(12)}`,
82
+ med: `0 2px 8px ${p(14)}, 0 1px 2px ${p(8)}`,
83
+ lg: `0 8px 24px ${p(16)}, 0 2px 6px ${p(8)}`
84
+ }, h = "0 0 0 1px color-mix(in srgb, var(--color-fg) 10%, transparent)";
85
+ `${h}${p(40)}`, `${h}${p(48)}${p(32)}`, `${h}${p(56)}${p(32)}`, l.fast, l.fast, l.fast;
86
+ var g = {
83
87
  space: t,
84
88
  size: n,
85
- radius: r,
86
- fontSize: i,
87
- fontWeight: a,
88
- lineHeight: o,
89
- zIndex: s,
90
- duration: c,
91
- easing: l,
92
- distance: u,
93
- scale: d,
89
+ container: r,
90
+ radius: i,
91
+ fontSize: a,
92
+ fontWeight: o,
93
+ lineHeight: s,
94
+ zIndex: c,
95
+ duration: l,
96
+ easing: u,
97
+ distance: d,
98
+ scale: f,
94
99
  dir: "1",
95
- shadow: p
100
+ shadow: m
96
101
  };
97
102
  //#endregion
98
- export { u as distance, c as duration, l as easing, i as fontSize, a as fontWeight, o as lineHeight, r as radius, d as scale, p as shadow, n as size, t as space, h as tokens, s as zIndex };
103
+ export { r as container, d as distance, l as duration, u as easing, a as fontSize, o as fontWeight, s as lineHeight, i as radius, f as scale, m as shadow, n as size, t as space, g as tokens, c as zIndex };
package/dist/types.d.mts CHANGED
@@ -1,3 +1,7 @@
1
+ import { ComponentPropsWithRef, ElementType } from "react";
1
2
  //#region src/types.d.ts
2
3
  export type OmitEach<P, K extends PropertyKey> = P extends unknown ? Omit<P, K> : never;
4
+ export type PolymorphicProps<T extends ElementType, Own = object, Omitted extends PropertyKey = never> = {
5
+ as?: T;
6
+ } & Own & OmitEach<ComponentPropsWithRef<T>, "as" | keyof Own | Omitted>;
3
7
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jonmilner/ui",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "files": [
5
5
  "dist",
6
6
  "THIRD_PARTY_NOTICES.md"