@photon-ai/pho-ui 0.7.1 → 1.0.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/dist/chunks/avatar-CiAvJNNs.js +99 -0
- package/dist/chunks/avatar-CiAvJNNs.js.map +1 -0
- package/dist/chunks/close-button-8f-oRJXt.js +420 -0
- package/dist/chunks/close-button-8f-oRJXt.js.map +1 -0
- package/dist/chunks/{cn-7uGUzCOM.js → cn-DTiB6ek_.js} +4 -2
- package/dist/chunks/{cn-7uGUzCOM.js.map → cn-DTiB6ek_.js.map} +1 -1
- package/dist/chunks/dialog-Bgb2Z1_v.js +141 -0
- package/dist/chunks/dialog-Bgb2Z1_v.js.map +1 -0
- package/dist/chunks/{input-DbJpdu6v.js → input-BSJGBUbf.js} +36 -36
- package/dist/chunks/input-BSJGBUbf.js.map +1 -0
- package/dist/chunks/menu-COLB_liS.js +205 -0
- package/dist/chunks/menu-COLB_liS.js.map +1 -0
- package/dist/chunks/{sidebar-CivriTLb.js → sidebar-16Pfn7IC.js} +12 -12
- package/dist/chunks/sidebar-16Pfn7IC.js.map +1 -0
- package/dist/chunks/spinner-Cy8bkyJf.js +54 -0
- package/dist/chunks/spinner-Cy8bkyJf.js.map +1 -0
- package/dist/components/accordion.js +21 -21
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert-dialog.js +26 -26
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/autocomplete.js +46 -46
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/avatar.js +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/button.js +11 -11
- package/dist/components/checkbox.js +3 -3
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/collapsible.js +8 -8
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/combobox.js +69 -69
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/context-menu.js +57 -44
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/dialog.js +3 -2
- package/dist/components/drawer.js +15 -15
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/field.js +18 -18
- package/dist/components/field.js.map +1 -1
- package/dist/components/fieldset.js +9 -9
- package/dist/components/fieldset.js.map +1 -1
- package/dist/components/form.js +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/kbd.js +6 -6
- package/dist/components/kbd.js.map +1 -1
- package/dist/components/menu.js +6 -4
- package/dist/components/menubar.js +5 -5
- package/dist/components/menubar.js.map +1 -1
- package/dist/components/meter.js +20 -20
- package/dist/components/meter.js.map +1 -1
- package/dist/components/navigation-menu.js +8 -8
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/notification.js +24 -24
- package/dist/components/notification.js.map +1 -1
- package/dist/components/number-field.js +32 -32
- package/dist/components/number-field.js.map +1 -1
- package/dist/components/otp-field.js +5 -5
- package/dist/components/otp-field.js.map +1 -1
- package/dist/components/popover.js +10 -10
- package/dist/components/popover.js.map +1 -1
- package/dist/components/preview-card.js +8 -8
- package/dist/components/preview-card.js.map +1 -1
- package/dist/components/progress.js +25 -25
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.js +13 -13
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/select.js +27 -27
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.js +1 -1
- package/dist/components/slider.js +17 -17
- package/dist/components/slider.js.map +1 -1
- package/dist/components/spinner.js +6 -0
- package/dist/components/switch.js +10 -10
- package/dist/components/switch.js.map +1 -1
- package/dist/components/tabs.js +16 -16
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/theme-toggle.js +199 -0
- package/dist/components/theme-toggle.js.map +1 -0
- package/dist/components/toast.js +24 -24
- package/dist/components/toast.js.map +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle.js +5 -5
- package/dist/components/toggle.js.map +1 -1
- package/dist/components/toolbar.js +8 -8
- package/dist/components/toolbar.js.map +1 -1
- package/dist/components/tooltip.js +10 -10
- package/dist/components/tooltip.js.map +1 -1
- package/dist/index.js +29 -28
- package/dist/sections/sidebar.js +1 -1
- package/dist/src/components/avatar/avatar.d.ts +24 -2
- package/dist/src/components/avatar/index.d.ts +1 -1
- package/dist/src/components/button/button.d.ts +58 -44
- package/dist/src/components/button/index.d.ts +1 -1
- package/dist/src/components/dialog/dialog.d.ts +50 -7
- package/dist/src/components/dialog/index.d.ts +1 -1
- package/dist/src/components/menu/index.d.ts +1 -1
- package/dist/src/components/menu/menu-pending.d.ts +43 -0
- package/dist/src/components/spinner/index.d.ts +1 -0
- package/dist/src/components/spinner/spinner.d.ts +32 -0
- package/dist/src/components/theme-toggle/index.d.ts +1 -0
- package/dist/src/components/theme-toggle/theme-toggle.d.ts +77 -0
- package/dist/src/sections/sidebar/sidebar.d.ts +5 -6
- package/dist/utils.js +1 -1
- package/package.json +9 -1
- package/src/styles/fonts.css +14 -18
- package/src/styles/pho.css +11 -0
- package/src/styles/theme.css +182 -146
- package/dist/chunks/avatar-Bb4RZQIa.js +0 -53
- package/dist/chunks/avatar-Bb4RZQIa.js.map +0 -1
- package/dist/chunks/button-CQ4cZvkC.js +0 -365
- package/dist/chunks/button-CQ4cZvkC.js.map +0 -1
- package/dist/chunks/close-button-CNhn8z0w.js +0 -29
- package/dist/chunks/close-button-CNhn8z0w.js.map +0 -1
- package/dist/chunks/dialog-7oOe-eaO.js +0 -63
- package/dist/chunks/dialog-7oOe-eaO.js.map +0 -1
- package/dist/chunks/input-DbJpdu6v.js.map +0 -1
- package/dist/chunks/menu-BfaNHnOp.js +0 -101
- package/dist/chunks/menu-BfaNHnOp.js.map +0 -1
- package/dist/chunks/sidebar-CivriTLb.js.map +0 -1
- package/dist/src/components/context-menu/context-menu.d.ts +0 -34
- package/dist/src/components/menu/menu.d.ts +0 -47
package/src/styles/theme.css
CHANGED
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
* `[data-mode="dark"]` = dark). No duplicated dark-mode override block.
|
|
11
11
|
*
|
|
12
12
|
* Values are extracted from photon.codes (Framer "Landing V1" color styles +
|
|
13
|
-
* published CSS) — the single source of truth
|
|
13
|
+
* published CSS) — the single source of truth — and authored in oklch (the
|
|
14
|
+
* exact sRGB equivalents of the site's hex values, so palette math and
|
|
15
|
+
* contrast repairs stay perceptual). The system is monochrome:
|
|
14
16
|
* black/white surfaces with an alpha-based text hierarchy. "Brand" is the
|
|
15
17
|
* high-contrast action color (black in light, white in dark — the site's
|
|
16
18
|
* button fill), not a hue. Functional reds/greens and the categorical accent
|
|
@@ -27,6 +29,10 @@
|
|
|
27
29
|
"PolySans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
|
|
28
30
|
Arial, sans-serif;
|
|
29
31
|
--font-display: var(--font-sans);
|
|
32
|
+
/* PolySans stylistic set 2 — the alternate display glyphs photon.codes
|
|
33
|
+
enables on headings. `font-display` = family + ss02; pair it with the
|
|
34
|
+
text-display-* sizes on titles. */
|
|
35
|
+
--font-display--font-feature-settings: "ss02";
|
|
30
36
|
/* Serif accent — the site's italicized editorial voice. */
|
|
31
37
|
--font-serif: "Instrument Serif", ui-serif, Georgia, serif;
|
|
32
38
|
--font-mono:
|
|
@@ -36,30 +42,31 @@
|
|
|
36
42
|
/* ================ Accent set (photon.codes palette) ================ */
|
|
37
43
|
/* The site's categorical colors — code syntax highlighting, charts,
|
|
38
44
|
avatars. Not for interactive states. */
|
|
39
|
-
--color-pho-yellow:
|
|
40
|
-
--color-pho-blue:
|
|
41
|
-
--color-pho-sky:
|
|
42
|
-
--color-pho-indigo:
|
|
43
|
-
--color-pho-purple:
|
|
44
|
-
--color-pho-green:
|
|
45
|
-
--color-pho-orange:
|
|
46
|
-
--color-pho-amber:
|
|
47
|
-
--color-pho-navy:
|
|
45
|
+
--color-pho-yellow: oklch(0.775 0.156 106.2);
|
|
46
|
+
--color-pho-blue: oklch(0.499 0.142 263.2);
|
|
47
|
+
--color-pho-sky: oklch(0.6 0.101 239.2);
|
|
48
|
+
--color-pho-indigo: oklch(0.639 0.146 269.6);
|
|
49
|
+
--color-pho-purple: oklch(0.69 0.213 307.5);
|
|
50
|
+
--color-pho-green: oklch(0.679 0.167 149.2);
|
|
51
|
+
--color-pho-orange: oklch(0.7 0.162 57.8);
|
|
52
|
+
--color-pho-amber: oklch(0.804 0.162 71.4);
|
|
53
|
+
--color-pho-navy: oklch(0.285 0.077 271.6);
|
|
48
54
|
|
|
49
55
|
/* ================== Functional anchors (site-exact) ================== */
|
|
50
|
-
--color-pho-red:
|
|
56
|
+
--color-pho-red: oklch(0.642 0.245 21.5); /* site Button error state */
|
|
51
57
|
|
|
52
58
|
/* =========================== Type scale =========================== */
|
|
53
|
-
/* CLOSED scale — the reset removes Tailwind's default sizes (text-
|
|
54
|
-
|
|
55
|
-
|
|
59
|
+
/* CLOSED scale — the reset removes Tailwind's default sizes (text-2xl, …)
|
|
60
|
+
so only these steps generate utilities. Body: xs/base/md/lg/xl =
|
|
61
|
+
12/14/16/18/20 (Pho `text-base` is 14px, not Tailwind's 16px default).
|
|
62
|
+
Display: xs/sm/base/md/lg/xl/2xl = 18/20/24/32/40/48/60.
|
|
56
63
|
NOTE: the reset wipes the whole --text-* prefix; every --text-color-pho-*
|
|
57
64
|
token is declared AFTER this point in the file, so it survives. */
|
|
58
65
|
--text-*: initial;
|
|
59
66
|
--text-xs: 0.75rem;
|
|
60
67
|
--text-xs--line-height: 1.125rem;
|
|
61
|
-
--text-
|
|
62
|
-
--text-
|
|
68
|
+
--text-base: 0.875rem;
|
|
69
|
+
--text-base--line-height: 1.25rem;
|
|
63
70
|
--text-md: 1rem;
|
|
64
71
|
--text-md--line-height: 1.5rem;
|
|
65
72
|
--text-lg: 1.125rem;
|
|
@@ -67,222 +74,251 @@
|
|
|
67
74
|
--text-xl: 1.25rem;
|
|
68
75
|
--text-xl--line-height: 1.875rem;
|
|
69
76
|
|
|
70
|
-
/* Display sizes —
|
|
71
|
-
|
|
72
|
-
--text-display-xs: 1.
|
|
73
|
-
--text-display-xs--line-height: 1.
|
|
77
|
+
/* Display sizes — headings run tight (lh 1.05–1.3) with -0.02em tracking,
|
|
78
|
+
-0.04em at hero sizes. Use for titles; body copy stays on text-*. */
|
|
79
|
+
--text-display-xs: 1.125rem;
|
|
80
|
+
--text-display-xs--line-height: 1.4625rem;
|
|
74
81
|
--text-display-xs--letter-spacing: -0.02em;
|
|
75
|
-
--text-display-sm:
|
|
76
|
-
--text-display-sm--line-height:
|
|
82
|
+
--text-display-sm: 1.25rem;
|
|
83
|
+
--text-display-sm--line-height: 1.625rem;
|
|
77
84
|
--text-display-sm--letter-spacing: -0.02em;
|
|
78
|
-
--text-display-
|
|
79
|
-
--text-display-
|
|
85
|
+
--text-display-base: 1.5rem;
|
|
86
|
+
--text-display-base--line-height: 1.95rem;
|
|
87
|
+
--text-display-base--letter-spacing: -0.02em;
|
|
88
|
+
--text-display-md: 2rem;
|
|
89
|
+
--text-display-md--line-height: 2.4rem;
|
|
80
90
|
--text-display-md--letter-spacing: -0.02em;
|
|
81
|
-
--text-display-lg:
|
|
82
|
-
--text-display-lg--line-height:
|
|
91
|
+
--text-display-lg: 2.5rem;
|
|
92
|
+
--text-display-lg--line-height: 2.75rem;
|
|
83
93
|
--text-display-lg--letter-spacing: -0.02em;
|
|
84
|
-
--text-display-xl:
|
|
85
|
-
--text-display-xl--line-height: 3.
|
|
86
|
-
--text-display-xl--letter-spacing: -0.
|
|
94
|
+
--text-display-xl: 3rem;
|
|
95
|
+
--text-display-xl--line-height: 3.15rem;
|
|
96
|
+
--text-display-xl--letter-spacing: -0.02em;
|
|
97
|
+
--text-display-2xl: 3.75rem;
|
|
98
|
+
--text-display-2xl--line-height: 3.9375rem;
|
|
99
|
+
--text-display-2xl--letter-spacing: -0.04em;
|
|
87
100
|
|
|
88
101
|
/* ========================== Font weights ========================== */
|
|
89
|
-
/* CLOSED set —
|
|
102
|
+
/* CLOSED set — three stops only; nothing else generates a utility:
|
|
90
103
|
font-light (300) display/marketing lines · font-normal (400) body ·
|
|
91
|
-
font-medium (
|
|
104
|
+
font-medium (550) UI controls, headings, and hero slogans (unified
|
|
105
|
+
former 500 + 600). font-semibold is gone — use font-medium. */
|
|
92
106
|
--font-weight-*: initial;
|
|
93
107
|
--font-weight-light: 300;
|
|
94
108
|
--font-weight-normal: 400;
|
|
95
|
-
--font-weight-medium:
|
|
96
|
-
--font-weight-semibold: 600;
|
|
109
|
+
--font-weight-medium: 550;
|
|
97
110
|
|
|
98
111
|
/* ============================= Radius ============================= */
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
--radius
|
|
103
|
-
--radius-
|
|
104
|
-
--radius-
|
|
105
|
-
--radius-
|
|
112
|
+
/* CLOSED set — three stops + Tailwind's rounded-full for pills:
|
|
113
|
+
sm (6px) small controls · base (12px) default controls/cards/popovers
|
|
114
|
+
· lg (16px) dialogs. */
|
|
115
|
+
--radius-*: initial;
|
|
116
|
+
--radius-sm: 0.375rem;
|
|
117
|
+
--radius-base: 0.75rem;
|
|
118
|
+
--radius-lg: 1rem;
|
|
106
119
|
|
|
107
120
|
/* ============================= Shadows ============================= */
|
|
108
121
|
/* Floating layers only (menus, popovers, dialogs). Cards and buttons are
|
|
109
122
|
flat on photon.codes — hairline borders carry the separation. */
|
|
110
|
-
--shadow-pho-xs: 0 1px 2px
|
|
123
|
+
--shadow-pho-xs: 0 1px 2px oklch(0 0 0 / 0.05);
|
|
111
124
|
--shadow-pho-sm:
|
|
112
|
-
0 1px 3px
|
|
125
|
+
0 1px 3px oklch(0 0 0 / 0.1), 0 1px 2px -1px oklch(0 0 0 / 0.1);
|
|
113
126
|
--shadow-pho-md:
|
|
114
|
-
0 4px 6px -1px
|
|
127
|
+
0 4px 6px -1px oklch(0 0 0 / 0.1), 0 2px 4px -2px oklch(0 0 0 / 0.06);
|
|
115
128
|
--shadow-pho-lg:
|
|
116
|
-
0 12px 16px -4px
|
|
129
|
+
0 12px 16px -4px oklch(0 0 0 / 0.08), 0 4px 6px -2px oklch(0 0 0 / 0.03);
|
|
117
130
|
--shadow-pho-xl:
|
|
118
|
-
0 20px 24px -4px
|
|
131
|
+
0 20px 24px -4px oklch(0 0 0 / 0.08), 0 8px 8px -4px oklch(0 0 0 / 0.03);
|
|
119
132
|
|
|
120
133
|
/* =================== Semantic: text (text-pho-*) =================== */
|
|
121
|
-
/*
|
|
122
|
-
|
|
134
|
+
/* Pure black/white stepped by alpha. One ink ladder for copy AND icons —
|
|
135
|
+
no separate text-fg-pho-* ramp. */
|
|
136
|
+
--text-color-pho-primary: light-dark(oklch(0 0 0), oklch(1 0 0));
|
|
137
|
+
/* Default UI chrome — menu items at rest, short labels, icons, nav, kbd.
|
|
138
|
+
75% holds at control size; hover pair +20 → 95%. */
|
|
123
139
|
--text-color-pho-secondary: light-dark(
|
|
124
|
-
|
|
125
|
-
|
|
140
|
+
oklch(0 0 0 / 0.75),
|
|
141
|
+
oklch(1 0 0 / 0.75)
|
|
126
142
|
);
|
|
127
143
|
--text-color-pho-secondary-hover: light-dark(
|
|
128
|
-
|
|
129
|
-
|
|
144
|
+
oklch(0 0 0 / 0.95),
|
|
145
|
+
oklch(1 0 0 / 0.95)
|
|
130
146
|
);
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
147
|
+
/* Supporting prose — Dialog/Field descriptions, empty states, captions.
|
|
148
|
+
55% composites to #737373 on white (4.7:1, last AA step). Not "muted":
|
|
149
|
+
it is real copy, just softer than UI chrome. */
|
|
150
|
+
--text-color-pho-description: light-dark(
|
|
151
|
+
oklch(0 0 0 / 0.55),
|
|
152
|
+
oklch(1 0 0 / 0.55)
|
|
134
153
|
);
|
|
135
|
-
--text-color-pho-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
);
|
|
139
|
-
--text-color-pho-quaternary: light-dark(
|
|
140
|
-
rgba(0, 0, 0, 0.4),
|
|
141
|
-
rgba(255, 255, 255, 0.4)
|
|
154
|
+
--text-color-pho-description-hover: light-dark(
|
|
155
|
+
oklch(0 0 0 / 0.75),
|
|
156
|
+
oklch(1 0 0 / 0.75)
|
|
142
157
|
);
|
|
143
158
|
--text-color-pho-placeholder: light-dark(
|
|
144
|
-
|
|
145
|
-
|
|
159
|
+
oklch(0 0 0 / 0.4),
|
|
160
|
+
oklch(1 0 0 / 0.4)
|
|
146
161
|
);
|
|
147
162
|
--text-color-pho-disabled: light-dark(
|
|
148
|
-
|
|
149
|
-
|
|
163
|
+
oklch(0 0 0 / 0.25),
|
|
164
|
+
oklch(1 0 0 / 0.25)
|
|
150
165
|
);
|
|
151
|
-
--text-color-pho-white:
|
|
166
|
+
--text-color-pho-white: oklch(1 0 0);
|
|
152
167
|
/* Content sitting on bg-pho-brand-solid (button labels, check marks…). */
|
|
153
|
-
--text-color-pho-on-brand: light-dark(
|
|
168
|
+
--text-color-pho-on-brand: light-dark(oklch(1 0 0), oklch(0 0 0));
|
|
154
169
|
/* Content sitting on bg-pho-inverse. */
|
|
155
|
-
--text-color-pho-inverse: light-dark(
|
|
156
|
-
--text-color-pho-brand: light-dark(
|
|
157
|
-
--text-color-pho-brand-hover: light-dark(
|
|
158
|
-
--text-color-pho-error: light-dark(
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
--text-color-pho-warning: light-dark(#a86a00, #ffab2a);
|
|
162
|
-
|
|
163
|
-
/* ============ Semantic: foreground/icons (text-fg-pho-*) ============ */
|
|
164
|
-
--text-color-fg-pho-primary: light-dark(#000, #fff);
|
|
165
|
-
--text-color-fg-pho-secondary: light-dark(
|
|
166
|
-
rgba(0, 0, 0, 0.75),
|
|
167
|
-
rgba(255, 255, 255, 0.75)
|
|
170
|
+
--text-color-pho-inverse: light-dark(oklch(1 0 0), oklch(0.173 0 0));
|
|
171
|
+
--text-color-pho-brand: light-dark(oklch(0 0 0), oklch(1 0 0));
|
|
172
|
+
--text-color-pho-brand-hover: light-dark(oklch(0 0 0), oklch(1 0 0));
|
|
173
|
+
--text-color-pho-error: light-dark(
|
|
174
|
+
oklch(0.565 0.212 20.2),
|
|
175
|
+
oklch(0.696 0.198 14.9)
|
|
168
176
|
);
|
|
169
|
-
--text-color-
|
|
170
|
-
|
|
171
|
-
|
|
177
|
+
--text-color-pho-error-hover: light-dark(
|
|
178
|
+
oklch(0.505 0.189 20),
|
|
179
|
+
oklch(0.749 0.155 11.2)
|
|
172
180
|
);
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
181
|
+
/* Success/warning light values are darkened from the site's #2a8a46/#a86a00
|
|
182
|
+
(L −0.012/−0.006, C and H untouched) — the originals sat at 4.35:1/4.44:1
|
|
183
|
+
on white, under the 4.5:1 AA floor for body-size state text. */
|
|
184
|
+
--text-color-pho-success: light-dark(
|
|
185
|
+
oklch(0.549 0.136 149.3),
|
|
186
|
+
oklch(0.735 0.162 150.5)
|
|
187
|
+
);
|
|
188
|
+
--text-color-pho-warning: light-dark(
|
|
189
|
+
oklch(0.572 0.125 69.8),
|
|
190
|
+
oklch(0.804 0.162 71.4)
|
|
176
191
|
);
|
|
177
|
-
--text-color-fg-pho-brand: light-dark(#000, #fff);
|
|
178
|
-
--text-color-fg-pho-error: light-dark(#e01e3d, #ff5c75);
|
|
179
192
|
|
|
180
193
|
/* =============== Semantic: background (bg-pho-*) =============== */
|
|
181
194
|
/* App/page canvas — the dashboard's backdrop (app.photon.codes sign-in).
|
|
182
195
|
Near-white neutral gray, warmer than the old #f5f5f7 (which had a faint
|
|
183
196
|
blue cast) and one step off the #fff card surface. */
|
|
184
|
-
--background-color-pho-page: light-dark(
|
|
197
|
+
--background-color-pho-page: light-dark(oklch(0.985 0 0), oklch(0 0 0));
|
|
185
198
|
/* Main surface: cards, inputs, panels — the site's "BG/Card". */
|
|
186
|
-
--background-color-pho-primary: light-dark(
|
|
187
|
-
--background-color-pho-primary-hover: light-dark(
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
199
|
+
--background-color-pho-primary: light-dark(oklch(1 0 0), oklch(0.173 0 0));
|
|
200
|
+
--background-color-pho-primary-hover: light-dark(
|
|
201
|
+
oklch(0.971 0.003 286.4),
|
|
202
|
+
oklch(0.218 0 0)
|
|
203
|
+
);
|
|
204
|
+
/* The single subtle surface — panels, tracks, chips, avatar fallbacks,
|
|
205
|
+
pressed toolbar buttons. Sits one step off the card in both modes
|
|
206
|
+
(raised in dark: 0.244 > 0.173). Transient highlight is NOT a gray step:
|
|
207
|
+
the menu-family highlight is bg-pho-ghost-hover. */
|
|
208
|
+
--background-color-pho-secondary: light-dark(
|
|
209
|
+
oklch(0.949 0 0),
|
|
210
|
+
oklch(0.244 0 0)
|
|
211
|
+
);
|
|
192
212
|
/* Inverted chip surface — the site's "msgbbl" (dark chip in light mode,
|
|
193
213
|
light chip in dark mode). Pair with text-pho-inverse. */
|
|
194
|
-
--background-color-pho-inverse: light-dark(
|
|
214
|
+
--background-color-pho-inverse: light-dark(
|
|
215
|
+
oklch(0.244 0 0),
|
|
216
|
+
oklch(0.949 0 0)
|
|
217
|
+
);
|
|
195
218
|
--background-color-pho-disabled: light-dark(
|
|
196
|
-
|
|
197
|
-
|
|
219
|
+
oklch(0 0 0 / 0.05),
|
|
220
|
+
oklch(1 0 0 / 0.05)
|
|
198
221
|
);
|
|
199
222
|
/* High-contrast action fill — the site's button. Pair with
|
|
200
223
|
text-pho-on-brand, never text-white. */
|
|
201
|
-
--background-color-pho-brand-solid: light-dark(
|
|
224
|
+
--background-color-pho-brand-solid: light-dark(oklch(0 0 0), oklch(1 0 0));
|
|
202
225
|
--background-color-pho-brand-solid-hover: light-dark(
|
|
203
|
-
|
|
204
|
-
|
|
226
|
+
oklch(0.173 0 0 / 0.85),
|
|
227
|
+
oklch(0.949 0 0)
|
|
205
228
|
);
|
|
206
229
|
--background-color-pho-brand-secondary: light-dark(
|
|
207
|
-
|
|
208
|
-
|
|
230
|
+
oklch(0 0 0 / 0.05),
|
|
231
|
+
oklch(1 0 0 / 0.05)
|
|
232
|
+
);
|
|
233
|
+
/* Knob/dot sitting on brand-solid (radio indicator, check marks…). */
|
|
234
|
+
--background-color-pho-on-brand: light-dark(oklch(1 0 0), oklch(0 0 0));
|
|
235
|
+
--background-color-pho-error-solid: oklch(0.642 0.245 21.5);
|
|
236
|
+
--background-color-pho-error-solid-hover: light-dark(
|
|
237
|
+
oklch(0.583 0.221 20.9),
|
|
238
|
+
oklch(0.671 0.219 17.7)
|
|
239
|
+
);
|
|
240
|
+
/* Functional "on" fill — Switch checked track. Same green in both modes
|
|
241
|
+
(from --color-pho-green); pair with a white thumb, never brand-solid
|
|
242
|
+
(which flips to white in dark and reads as a photographic negative). */
|
|
243
|
+
--background-color-pho-success-solid: oklch(0.679 0.167 149.2);
|
|
244
|
+
--background-color-pho-success-solid-hover: light-dark(
|
|
245
|
+
oklch(0.619 0.152 149.3),
|
|
246
|
+
oklch(0.72 0.162 149.5)
|
|
209
247
|
);
|
|
210
|
-
/* Knob/dot sitting on brand-solid (switch thumb, radio indicator). */
|
|
211
|
-
--background-color-pho-on-brand: light-dark(#fff, #000);
|
|
212
|
-
--background-color-pho-error-solid: #ff2244;
|
|
213
|
-
--background-color-pho-error-solid-hover: light-dark(#e01e3d, #ff4761);
|
|
214
248
|
--background-color-pho-error-primary: light-dark(
|
|
215
|
-
|
|
216
|
-
|
|
249
|
+
oklch(0.642 0.245 21.5 / 0.08),
|
|
250
|
+
oklch(0.642 0.245 21.5 / 0.15)
|
|
217
251
|
);
|
|
218
252
|
/* Quiet hover wash for ghost surfaces — the site's "Font/5%". */
|
|
219
253
|
--background-color-pho-ghost-hover: light-dark(
|
|
220
|
-
|
|
221
|
-
|
|
254
|
+
oklch(0 0 0 / 0.05),
|
|
255
|
+
oklch(1 0 0 / 0.05)
|
|
222
256
|
);
|
|
223
257
|
/* Modal/scrim backdrop. */
|
|
224
258
|
--background-color-pho-overlay: light-dark(
|
|
225
|
-
|
|
226
|
-
|
|
259
|
+
oklch(0 0 0 / 0.5),
|
|
260
|
+
oklch(0 0 0 / 0.6)
|
|
227
261
|
);
|
|
228
262
|
|
|
229
263
|
/* ================ Semantic: border (border-pho-*) ================ */
|
|
230
264
|
/* Strong edge — inputs, interactive outlines. */
|
|
231
265
|
--border-color-pho-primary: light-dark(
|
|
232
|
-
|
|
233
|
-
|
|
266
|
+
oklch(0 0 0 / 0.15),
|
|
267
|
+
oklch(1 0 0 / 0.15)
|
|
234
268
|
);
|
|
235
269
|
/* Hairline card stroke — the site's "BG/Card Stroke". */
|
|
236
|
-
--border-color-pho-secondary: light-dark(
|
|
270
|
+
--border-color-pho-secondary: light-dark(oklch(0.949 0 0), oklch(0.244 0 0));
|
|
237
271
|
--border-color-pho-tertiary: light-dark(
|
|
238
|
-
|
|
239
|
-
|
|
272
|
+
oklch(0 0 0 / 0.05),
|
|
273
|
+
oklch(1 0 0 / 0.05)
|
|
240
274
|
);
|
|
241
275
|
/* Selected/focus edge — monochrome at 40%, matching ring/outline-pho-brand. */
|
|
242
|
-
--border-color-pho-brand: light-dark(
|
|
243
|
-
rgba(0, 0, 0, 0.4),
|
|
244
|
-
rgba(255, 255, 255, 0.4)
|
|
245
|
-
);
|
|
276
|
+
--border-color-pho-brand: light-dark(oklch(0 0 0 / 0.4), oklch(1 0 0 / 0.4));
|
|
246
277
|
/* Hairline edge for elements ON a brand-solid fill (EffectButton pill). */
|
|
247
278
|
--border-color-pho-on-brand: light-dark(
|
|
248
|
-
|
|
249
|
-
|
|
279
|
+
oklch(1 0 0 / 0.15),
|
|
280
|
+
oklch(0 0 0 / 0.08)
|
|
250
281
|
);
|
|
251
|
-
--border-color-pho-error:
|
|
282
|
+
--border-color-pho-error: oklch(0.642 0.245 21.5);
|
|
252
283
|
--border-color-pho-error-subtle: light-dark(
|
|
253
|
-
|
|
254
|
-
|
|
284
|
+
oklch(0.642 0.245 21.5 / 0.3),
|
|
285
|
+
oklch(0.642 0.245 21.5 / 0.4)
|
|
255
286
|
);
|
|
256
287
|
/* Hairline interactive edge shared by hover/selected surfaces. */
|
|
257
288
|
--border-color-pho-interactive: light-dark(
|
|
258
|
-
|
|
259
|
-
|
|
289
|
+
oklch(0 0 0 / 0.1),
|
|
290
|
+
oklch(1 0 0 / 0.1)
|
|
260
291
|
);
|
|
261
292
|
|
|
262
293
|
/* ================== Semantic: ring (ring-pho-*) ================== */
|
|
263
294
|
--ring-color-pho-primary: light-dark(
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
);
|
|
267
|
-
--ring-color-pho-secondary: light-dark(#eee, #202020);
|
|
268
|
-
--ring-color-pho-brand: light-dark(
|
|
269
|
-
rgba(0, 0, 0, 0.4),
|
|
270
|
-
rgba(255, 255, 255, 0.4)
|
|
295
|
+
oklch(0 0 0 / 0.15),
|
|
296
|
+
oklch(1 0 0 / 0.15)
|
|
271
297
|
);
|
|
272
|
-
--ring-color-pho-
|
|
298
|
+
--ring-color-pho-secondary: light-dark(oklch(0.949 0 0), oklch(0.244 0 0));
|
|
299
|
+
--ring-color-pho-brand: light-dark(oklch(0 0 0 / 0.4), oklch(1 0 0 / 0.4));
|
|
300
|
+
--ring-color-pho-error: oklch(0.642 0.245 21.5);
|
|
273
301
|
--ring-color-pho-error-subtle: light-dark(
|
|
274
|
-
|
|
275
|
-
|
|
302
|
+
oklch(0.642 0.245 21.5 / 0.3),
|
|
303
|
+
oklch(0.642 0.245 21.5 / 0.4)
|
|
276
304
|
);
|
|
277
305
|
--ring-color-pho-interactive: light-dark(
|
|
278
|
-
|
|
279
|
-
|
|
306
|
+
oklch(0 0 0 / 0.1),
|
|
307
|
+
oklch(1 0 0 / 0.1)
|
|
280
308
|
);
|
|
281
309
|
|
|
282
310
|
/* ============== Semantic: outline (focus rings) ============== */
|
|
283
|
-
--outline-color-pho-brand: light-dark(
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
311
|
+
--outline-color-pho-brand: light-dark(oklch(0 0 0 / 0.4), oklch(1 0 0 / 0.4));
|
|
312
|
+
--outline-color-pho-error: oklch(0.642 0.245 21.5);
|
|
313
|
+
|
|
314
|
+
/* ==================== Animation: Spinner ==================== */
|
|
315
|
+
/* Slightly faster than Tailwind's 1s `animate-spin` — a quicker spinner
|
|
316
|
+
reads as faster loading. Linear: constant motion has no easing. */
|
|
317
|
+
--animate-pho-spinner: pho-spinner-rotate 800ms linear infinite;
|
|
318
|
+
|
|
319
|
+
@keyframes pho-spinner-rotate {
|
|
320
|
+
to {
|
|
321
|
+
transform: rotate(360deg);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
288
324
|
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { t } from "./cn-7uGUzCOM.js";
|
|
3
|
-
import { t as l } from "./resolve-variant-CcD8iG5l.js";
|
|
4
|
-
import "react";
|
|
5
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
-
import { Avatar as r } from "@base-ui/react/avatar";
|
|
7
|
-
var n = {
|
|
8
|
-
xs: {
|
|
9
|
-
classes: "size-6 text-[0.625rem]",
|
|
10
|
-
description: "Extra small — inline chips and rails"
|
|
11
|
-
},
|
|
12
|
-
sm: {
|
|
13
|
-
classes: "size-8 text-xs",
|
|
14
|
-
description: "Small — dense lists"
|
|
15
|
-
},
|
|
16
|
-
md: {
|
|
17
|
-
classes: "size-10 text-sm",
|
|
18
|
-
description: "Medium — the default"
|
|
19
|
-
},
|
|
20
|
-
lg: {
|
|
21
|
-
classes: "size-12 text-md",
|
|
22
|
-
description: "Large — profile headers"
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
function o({ className: e, size: s = "md", ...a }) {
|
|
26
|
-
return /* @__PURE__ */ i(r.Root, {
|
|
27
|
-
className: t("squircle bg-pho-tertiary text-pho-secondary relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full align-middle font-medium select-none", l(n, s), e),
|
|
28
|
-
...a
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
function c({ className: e, ...s }) {
|
|
32
|
-
return /* @__PURE__ */ i(r.Image, {
|
|
33
|
-
className: t("size-full object-cover", e),
|
|
34
|
-
...s
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
function m({ className: e, ...s }) {
|
|
38
|
-
return /* @__PURE__ */ i(r.Fallback, {
|
|
39
|
-
className: t("flex size-full items-center justify-center", e),
|
|
40
|
-
...s
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
var v = {
|
|
44
|
-
Root: o,
|
|
45
|
-
Image: c,
|
|
46
|
-
Fallback: m
|
|
47
|
-
};
|
|
48
|
-
export {
|
|
49
|
-
v as n,
|
|
50
|
-
n as t
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
//# sourceMappingURL=avatar-Bb4RZQIa.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"avatar-Bb4RZQIa.js","names":[],"sources":["../../src/components/avatar/avatar.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Avatar as BaseAvatar } from \"@base-ui/react/avatar\";\nimport { cn } from \"../../utils/cn\";\nimport { resolveVariant, type VariantMap } from \"../../utils/resolve-variant\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\n/** Size axis — four sizes, no `xl` (Geist-reductive). `md` is default. */\nexport const AVATAR_SIZES = {\n xs: {\n classes: \"size-6 text-[0.625rem]\",\n description: \"Extra small — inline chips and rails\",\n },\n sm: { classes: \"size-8 text-xs\", description: \"Small — dense lists\" },\n md: { classes: \"size-10 text-sm\", description: \"Medium — the default\" },\n lg: { classes: \"size-12 text-md\", description: \"Large — profile headers\" },\n} satisfies VariantMap;\n\nexport type AvatarSize = keyof typeof AVATAR_SIZES;\n\ninterface RootProps extends StyledProps<typeof BaseAvatar.Root> {\n /** Size variant. @default \"md\" */\n size?: AvatarSize;\n}\n\nfunction Root({ className, size = \"md\", ...props }: RootProps) {\n return (\n <BaseAvatar.Root\n className={cn(\n \"squircle bg-pho-tertiary text-pho-secondary relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full align-middle font-medium select-none\",\n resolveVariant(AVATAR_SIZES, size),\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Image({ className, ...props }: StyledProps<typeof BaseAvatar.Image>) {\n return (\n <BaseAvatar.Image\n className={cn(\"size-full object-cover\", className)}\n {...props}\n />\n );\n}\n\nfunction Fallback({\n className,\n ...props\n}: StyledProps<typeof BaseAvatar.Fallback>) {\n return (\n <BaseAvatar.Fallback\n className={cn(\"flex size-full items-center justify-center\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Avatar built on Base UI `Avatar`. Compose `Avatar.Image` with an\n * `Avatar.Fallback` (initials or icon) that shows while the image loads or if\n * it fails. Set `size` on `Avatar.Root`.\n */\nexport const Avatar = { Root, Image, Fallback };\n"],"mappings":";;;;;;AAcA,IAAa,IAAe;AAAA,EAC1B,IAAI;AAAA,IACF,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,IAAI;AAAA,IAAE,SAAS;AAAA,IAAkB,aAAa;AAAA,EAAsB;AAAA,EACpE,IAAI;AAAA,IAAE,SAAS;AAAA,IAAmB,aAAa;AAAA,EAAuB;AAAA,EACtE,IAAI;AAAA,IAAE,SAAS;AAAA,IAAmB,aAAa;AAAA,EAA0B;AAC3E;AASA,SAAS,EAAK,EAAE,WAAA,GAAW,MAAA,IAAO,MAAM,GAAG,EAAA,GAAoB;AAC7D,SACE,gBAAA,EAAC,EAAW,MAAZ;AAAA,IACE,WAAW,EACT,2KACA,EAAe,GAAc,CAAI,GACjC,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EAAE,WAAA,GAAW,GAAG,EAAA,GAA+C;AAC5E,SACE,gBAAA,EAAC,EAAW,OAAZ;AAAA,IACE,WAAW,EAAG,0BAA0B,CAAS;AAAA,IACjD,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAS,EAChB,WAAA,GACA,GAAG,EAAA,GACuC;AAC1C,SACE,gBAAA,EAAC,EAAW,UAAZ;AAAA,IACE,WAAW,EAAG,8CAA8C,CAAS;AAAA,IACrE,GAAI;AAAA,EACL,CAAA;AAEL;AAOA,IAAa,IAAS;AAAA,EAAE,MAAA;AAAA,EAAM,OAAA;AAAA,EAAO,UAAA;AAAS"}
|