@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.
Files changed (121) hide show
  1. package/dist/chunks/avatar-CiAvJNNs.js +99 -0
  2. package/dist/chunks/avatar-CiAvJNNs.js.map +1 -0
  3. package/dist/chunks/close-button-8f-oRJXt.js +420 -0
  4. package/dist/chunks/close-button-8f-oRJXt.js.map +1 -0
  5. package/dist/chunks/{cn-7uGUzCOM.js → cn-DTiB6ek_.js} +4 -2
  6. package/dist/chunks/{cn-7uGUzCOM.js.map → cn-DTiB6ek_.js.map} +1 -1
  7. package/dist/chunks/dialog-Bgb2Z1_v.js +141 -0
  8. package/dist/chunks/dialog-Bgb2Z1_v.js.map +1 -0
  9. package/dist/chunks/{input-DbJpdu6v.js → input-BSJGBUbf.js} +36 -36
  10. package/dist/chunks/input-BSJGBUbf.js.map +1 -0
  11. package/dist/chunks/menu-COLB_liS.js +205 -0
  12. package/dist/chunks/menu-COLB_liS.js.map +1 -0
  13. package/dist/chunks/{sidebar-CivriTLb.js → sidebar-16Pfn7IC.js} +12 -12
  14. package/dist/chunks/sidebar-16Pfn7IC.js.map +1 -0
  15. package/dist/chunks/spinner-Cy8bkyJf.js +54 -0
  16. package/dist/chunks/spinner-Cy8bkyJf.js.map +1 -0
  17. package/dist/components/accordion.js +21 -21
  18. package/dist/components/accordion.js.map +1 -1
  19. package/dist/components/alert-dialog.js +26 -26
  20. package/dist/components/alert-dialog.js.map +1 -1
  21. package/dist/components/autocomplete.js +46 -46
  22. package/dist/components/autocomplete.js.map +1 -1
  23. package/dist/components/avatar.js +1 -1
  24. package/dist/components/badge.js +1 -1
  25. package/dist/components/button.js +11 -11
  26. package/dist/components/checkbox.js +3 -3
  27. package/dist/components/checkbox.js.map +1 -1
  28. package/dist/components/collapsible.js +8 -8
  29. package/dist/components/collapsible.js.map +1 -1
  30. package/dist/components/combobox.js +69 -69
  31. package/dist/components/combobox.js.map +1 -1
  32. package/dist/components/context-menu.js +57 -44
  33. package/dist/components/context-menu.js.map +1 -1
  34. package/dist/components/dialog.js +3 -2
  35. package/dist/components/drawer.js +15 -15
  36. package/dist/components/drawer.js.map +1 -1
  37. package/dist/components/field.js +18 -18
  38. package/dist/components/field.js.map +1 -1
  39. package/dist/components/fieldset.js +9 -9
  40. package/dist/components/fieldset.js.map +1 -1
  41. package/dist/components/form.js +1 -1
  42. package/dist/components/input.js +1 -1
  43. package/dist/components/kbd.js +6 -6
  44. package/dist/components/kbd.js.map +1 -1
  45. package/dist/components/menu.js +6 -4
  46. package/dist/components/menubar.js +5 -5
  47. package/dist/components/menubar.js.map +1 -1
  48. package/dist/components/meter.js +20 -20
  49. package/dist/components/meter.js.map +1 -1
  50. package/dist/components/navigation-menu.js +8 -8
  51. package/dist/components/navigation-menu.js.map +1 -1
  52. package/dist/components/notification.js +24 -24
  53. package/dist/components/notification.js.map +1 -1
  54. package/dist/components/number-field.js +32 -32
  55. package/dist/components/number-field.js.map +1 -1
  56. package/dist/components/otp-field.js +5 -5
  57. package/dist/components/otp-field.js.map +1 -1
  58. package/dist/components/popover.js +10 -10
  59. package/dist/components/popover.js.map +1 -1
  60. package/dist/components/preview-card.js +8 -8
  61. package/dist/components/preview-card.js.map +1 -1
  62. package/dist/components/progress.js +25 -25
  63. package/dist/components/progress.js.map +1 -1
  64. package/dist/components/radio-group.js +13 -13
  65. package/dist/components/radio-group.js.map +1 -1
  66. package/dist/components/scroll-area.js +1 -1
  67. package/dist/components/select.js +27 -27
  68. package/dist/components/select.js.map +1 -1
  69. package/dist/components/separator.js +1 -1
  70. package/dist/components/slider.js +17 -17
  71. package/dist/components/slider.js.map +1 -1
  72. package/dist/components/spinner.js +6 -0
  73. package/dist/components/switch.js +10 -10
  74. package/dist/components/switch.js.map +1 -1
  75. package/dist/components/tabs.js +16 -16
  76. package/dist/components/tabs.js.map +1 -1
  77. package/dist/components/theme-toggle.js +199 -0
  78. package/dist/components/theme-toggle.js.map +1 -0
  79. package/dist/components/toast.js +24 -24
  80. package/dist/components/toast.js.map +1 -1
  81. package/dist/components/toggle-group.js +1 -1
  82. package/dist/components/toggle.js +5 -5
  83. package/dist/components/toggle.js.map +1 -1
  84. package/dist/components/toolbar.js +8 -8
  85. package/dist/components/toolbar.js.map +1 -1
  86. package/dist/components/tooltip.js +10 -10
  87. package/dist/components/tooltip.js.map +1 -1
  88. package/dist/index.js +29 -28
  89. package/dist/sections/sidebar.js +1 -1
  90. package/dist/src/components/avatar/avatar.d.ts +24 -2
  91. package/dist/src/components/avatar/index.d.ts +1 -1
  92. package/dist/src/components/button/button.d.ts +58 -44
  93. package/dist/src/components/button/index.d.ts +1 -1
  94. package/dist/src/components/dialog/dialog.d.ts +50 -7
  95. package/dist/src/components/dialog/index.d.ts +1 -1
  96. package/dist/src/components/menu/index.d.ts +1 -1
  97. package/dist/src/components/menu/menu-pending.d.ts +43 -0
  98. package/dist/src/components/spinner/index.d.ts +1 -0
  99. package/dist/src/components/spinner/spinner.d.ts +32 -0
  100. package/dist/src/components/theme-toggle/index.d.ts +1 -0
  101. package/dist/src/components/theme-toggle/theme-toggle.d.ts +77 -0
  102. package/dist/src/sections/sidebar/sidebar.d.ts +5 -6
  103. package/dist/utils.js +1 -1
  104. package/package.json +9 -1
  105. package/src/styles/fonts.css +14 -18
  106. package/src/styles/pho.css +11 -0
  107. package/src/styles/theme.css +182 -146
  108. package/dist/chunks/avatar-Bb4RZQIa.js +0 -53
  109. package/dist/chunks/avatar-Bb4RZQIa.js.map +0 -1
  110. package/dist/chunks/button-CQ4cZvkC.js +0 -365
  111. package/dist/chunks/button-CQ4cZvkC.js.map +0 -1
  112. package/dist/chunks/close-button-CNhn8z0w.js +0 -29
  113. package/dist/chunks/close-button-CNhn8z0w.js.map +0 -1
  114. package/dist/chunks/dialog-7oOe-eaO.js +0 -63
  115. package/dist/chunks/dialog-7oOe-eaO.js.map +0 -1
  116. package/dist/chunks/input-DbJpdu6v.js.map +0 -1
  117. package/dist/chunks/menu-BfaNHnOp.js +0 -101
  118. package/dist/chunks/menu-BfaNHnOp.js.map +0 -1
  119. package/dist/chunks/sidebar-CivriTLb.js.map +0 -1
  120. package/dist/src/components/context-menu/context-menu.d.ts +0 -34
  121. package/dist/src/components/menu/menu.d.ts +0 -47
@@ -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. The system is monochrome:
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: #c3bb26;
40
- --color-pho-blue: #365eb3;
41
- --color-pho-sky: #3f88b6;
42
- --color-pho-indigo: #6985e4;
43
- --color-pho-purple: #bf6eff;
44
- --color-pho-green: #36b35b;
45
- --color-pho-orange: #e78016;
46
- --color-pho-amber: #ffab2a;
47
- --color-pho-navy: #1d2650;
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: #ff2244; /* site Button error state */
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-base,
54
- text-2xl, …) so only these steps generate utilities. Body: 12/14/16/18/20.
55
- Display: 24/32/40/48/60, the heading steps measured on photon.codes.
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-sm: 0.875rem;
62
- --text-sm--line-height: 1.25rem;
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 — site headings run tight (lh 1.05–1.3) with -0.02em
71
- tracking, -0.04em at hero sizes. */
72
- --text-display-xs: 1.5rem;
73
- --text-display-xs--line-height: 1.95rem;
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: 2rem;
76
- --text-display-sm--line-height: 2.4rem;
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-md: 2.5rem;
79
- --text-display-md--line-height: 2.75rem;
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: 3rem;
82
- --text-display-lg--line-height: 3.15rem;
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: 3.75rem;
85
- --text-display-xl--line-height: 3.9375rem;
86
- --text-display-xl--letter-spacing: -0.04em;
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 — Pho ships four weights; nothing else generates a utility:
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 (500) UI controls · font-semibold (600) headings. */
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: 500;
96
- --font-weight-semibold: 600;
109
+ --font-weight-medium: 550;
97
110
 
98
111
  /* ============================= Radius ============================= */
99
- --radius-xs: 0.125rem;
100
- --radius-sm: 0.25rem;
101
- --radius-md: 0.375rem;
102
- --radius-lg: 0.5rem;
103
- --radius-xl: 0.75rem;
104
- --radius-2xl: 1rem;
105
- --radius-3xl: 1.5rem;
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 rgba(0, 0, 0, 0.05);
123
+ --shadow-pho-xs: 0 1px 2px oklch(0 0 0 / 0.05);
111
124
  --shadow-pho-sm:
112
- 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
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 rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
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 rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
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 rgba(0, 0, 0, 0.08), 0 8px 8px -4px rgba(0, 0, 0, 0.03);
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
- /* The site's "Font/*" styles: pure black/white stepped by alpha. */
122
- --text-color-pho-primary: light-dark(#000, #fff);
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
- rgba(0, 0, 0, 0.75),
125
- rgba(255, 255, 255, 0.75)
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
- rgba(0, 0, 0, 0.85),
129
- rgba(255, 255, 255, 0.85)
144
+ oklch(0 0 0 / 0.95),
145
+ oklch(1 0 0 / 0.95)
130
146
  );
131
- --text-color-pho-tertiary: light-dark(
132
- rgba(0, 0, 0, 0.5),
133
- rgba(255, 255, 255, 0.5)
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-tertiary-hover: light-dark(
136
- rgba(0, 0, 0, 0.65),
137
- rgba(255, 255, 255, 0.65)
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
- rgba(0, 0, 0, 0.4),
145
- rgba(255, 255, 255, 0.4)
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
- rgba(0, 0, 0, 0.25),
149
- rgba(255, 255, 255, 0.25)
163
+ oklch(0 0 0 / 0.25),
164
+ oklch(1 0 0 / 0.25)
150
165
  );
151
- --text-color-pho-white: #fff;
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(#fff, #000);
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(#fff, #101010);
156
- --text-color-pho-brand: light-dark(#000, #fff);
157
- --text-color-pho-brand-hover: light-dark(#000, #fff);
158
- --text-color-pho-error: light-dark(#d61f3d, #ff5c75);
159
- --text-color-pho-error-hover: light-dark(#b81a34, #ff8095);
160
- --text-color-pho-success: light-dark(#2a8a46, #4cc571);
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-fg-pho-quaternary: light-dark(
170
- rgba(0, 0, 0, 0.3),
171
- rgba(255, 255, 255, 0.3)
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
- --text-color-fg-pho-quaternary-hover: light-dark(
174
- rgba(0, 0, 0, 0.45),
175
- rgba(255, 255, 255, 0.45)
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(#fafafa, #000);
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(#fff, #101010);
187
- --background-color-pho-primary-hover: light-dark(#f5f5f7, #1a1a1a);
188
- --background-color-pho-secondary: light-dark(#f5f5f7, #0b0b0b);
189
- --background-color-pho-secondary-hover: light-dark(#eee, #161616);
190
- --background-color-pho-tertiary: light-dark(#eee, #202020);
191
- --background-color-pho-quaternary: light-dark(#e2e2e4, #2e2e2e);
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(#202020, #eee);
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
- rgba(0, 0, 0, 0.05),
197
- rgba(255, 255, 255, 0.05)
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(#000, #fff);
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
- rgba(16, 16, 16, 0.85),
204
- #eee
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
- rgba(0, 0, 0, 0.05),
208
- rgba(255, 255, 255, 0.05)
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
- rgba(255, 34, 68, 0.08),
216
- rgba(255, 34, 68, 0.15)
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
- rgba(0, 0, 0, 0.05),
221
- rgba(255, 255, 255, 0.05)
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
- rgba(0, 0, 0, 0.5),
226
- rgba(0, 0, 0, 0.6)
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
- rgba(0, 0, 0, 0.15),
233
- rgba(255, 255, 255, 0.15)
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(#eee, #202020);
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
- rgba(0, 0, 0, 0.05),
239
- rgba(255, 255, 255, 0.05)
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
- rgba(255, 255, 255, 0.15),
249
- rgba(0, 0, 0, 0.08)
279
+ oklch(1 0 0 / 0.15),
280
+ oklch(0 0 0 / 0.08)
250
281
  );
251
- --border-color-pho-error: #ff2244;
282
+ --border-color-pho-error: oklch(0.642 0.245 21.5);
252
283
  --border-color-pho-error-subtle: light-dark(
253
- rgba(255, 34, 68, 0.3),
254
- rgba(255, 34, 68, 0.4)
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
- rgba(0, 0, 0, 0.1),
259
- rgba(255, 255, 255, 0.1)
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
- rgba(0, 0, 0, 0.15),
265
- rgba(255, 255, 255, 0.15)
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-error: #ff2244;
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
- rgba(255, 34, 68, 0.3),
275
- rgba(255, 34, 68, 0.4)
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
- rgba(0, 0, 0, 0.1),
279
- rgba(255, 255, 255, 0.1)
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
- rgba(0, 0, 0, 0.4),
285
- rgba(255, 255, 255, 0.4)
286
- );
287
- --outline-color-pho-error: #ff2244;
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"}