@ismou-workspace/ui 0.0.0-stage → 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.
Files changed (210) hide show
  1. package/dist/brand/app-brands.d.ts +38 -0
  2. package/dist/brand/app-brands.js +110 -0
  3. package/dist/brand/app-icon.d.ts +34 -0
  4. package/dist/brand/app-icon.js +65 -0
  5. package/dist/brand/app-logo.d.ts +14 -0
  6. package/dist/brand/app-logo.js +27 -0
  7. package/dist/brand/favicons/account.svg +1 -0
  8. package/dist/brand/favicons/admin.svg +1 -0
  9. package/dist/brand/favicons/bridge.svg +1 -0
  10. package/dist/brand/favicons/calendar.svg +1 -0
  11. package/dist/brand/favicons/contacts.svg +1 -0
  12. package/dist/brand/favicons/core.svg +1 -0
  13. package/dist/brand/favicons/drive.svg +1 -0
  14. package/dist/brand/favicons/office.svg +1 -0
  15. package/dist/brand/file-icons/archive.svg +1 -0
  16. package/dist/brand/file-icons/audio.svg +1 -0
  17. package/dist/brand/file-icons/code.svg +1 -0
  18. package/dist/brand/file-icons/diagram.svg +1 -0
  19. package/dist/brand/file-icons/document.svg +1 -0
  20. package/dist/brand/file-icons/form.svg +1 -0
  21. package/dist/brand/file-icons/image.svg +1 -0
  22. package/dist/brand/file-icons/markdown.svg +1 -0
  23. package/dist/brand/file-icons/other.svg +1 -0
  24. package/dist/brand/file-icons/pdf.svg +1 -0
  25. package/dist/brand/file-icons/presentation.svg +1 -0
  26. package/dist/brand/file-icons/spreadsheet.svg +1 -0
  27. package/dist/brand/file-icons/text.svg +1 -0
  28. package/dist/brand/file-icons/video.svg +1 -0
  29. package/dist/brand/grain-surface.d.ts +8 -0
  30. package/dist/brand/grain-surface.js +10 -0
  31. package/dist/brand/kind-icons.d.ts +36 -0
  32. package/dist/brand/kind-icons.js +149 -0
  33. package/dist/components/account-menu.d.ts +20 -0
  34. package/dist/components/account-menu.js +13 -0
  35. package/dist/components/alert.d.ts +10 -0
  36. package/dist/components/alert.js +28 -0
  37. package/dist/components/app-switcher.d.ts +21 -0
  38. package/dist/components/app-switcher.js +17 -0
  39. package/dist/components/area-selection.d.ts +21 -0
  40. package/dist/components/area-selection.js +91 -0
  41. package/dist/components/avatar-picker-dialog.d.ts +40 -0
  42. package/dist/components/avatar-picker-dialog.js +110 -0
  43. package/dist/components/avatar.d.ts +5 -0
  44. package/dist/components/avatar.js +10 -0
  45. package/dist/components/badge-list.d.ts +7 -0
  46. package/dist/components/badge-list.js +7 -0
  47. package/dist/components/badge.d.ts +9 -0
  48. package/dist/components/badge.js +32 -0
  49. package/dist/components/breadcrumbs.d.ts +20 -0
  50. package/dist/components/breadcrumbs.js +16 -0
  51. package/dist/components/button.d.ts +12 -0
  52. package/dist/components/button.js +38 -0
  53. package/dist/components/caption.d.ts +3 -0
  54. package/dist/components/caption.js +6 -0
  55. package/dist/components/card.d.ts +8 -0
  56. package/dist/components/card.js +23 -0
  57. package/dist/components/checkbox-field.d.ts +10 -0
  58. package/dist/components/checkbox-field.js +8 -0
  59. package/dist/components/checkbox.d.ts +3 -0
  60. package/dist/components/checkbox.js +7 -0
  61. package/dist/components/code.d.ts +16 -0
  62. package/dist/components/code.js +32 -0
  63. package/dist/components/color-dot.d.ts +11 -0
  64. package/dist/components/color-dot.js +34 -0
  65. package/dist/components/corner-mark.d.ts +14 -0
  66. package/dist/components/corner-mark.js +27 -0
  67. package/dist/components/date-range-field.d.ts +9 -0
  68. package/dist/components/date-range-field.js +9 -0
  69. package/dist/components/description-list.d.ts +11 -0
  70. package/dist/components/description-list.js +10 -0
  71. package/dist/components/dialog.d.ts +16 -0
  72. package/dist/components/dialog.js +38 -0
  73. package/dist/components/drag-and-drop.d.ts +60 -0
  74. package/dist/components/drag-and-drop.js +141 -0
  75. package/dist/components/dropdown-menu.d.ts +27 -0
  76. package/dist/components/dropdown-menu.js +44 -0
  77. package/dist/components/entity-avatar.d.ts +28 -0
  78. package/dist/components/entity-avatar.js +22 -0
  79. package/dist/components/entity-menu.d.ts +67 -0
  80. package/dist/components/entity-menu.js +74 -0
  81. package/dist/components/error-alert.d.ts +7 -0
  82. package/dist/components/error-alert.js +9 -0
  83. package/dist/components/event-chip.d.ts +16 -0
  84. package/dist/components/event-chip.js +19 -0
  85. package/dist/components/fab.d.ts +21 -0
  86. package/dist/components/fab.js +14 -0
  87. package/dist/components/file-drop-zone.d.ts +35 -0
  88. package/dist/components/file-drop-zone.js +44 -0
  89. package/dist/components/file-type-icon.d.ts +44 -0
  90. package/dist/components/file-type-icon.js +147 -0
  91. package/dist/components/icon-image.d.ts +10 -0
  92. package/dist/components/icon-image.js +11 -0
  93. package/dist/components/identity.d.ts +27 -0
  94. package/dist/components/identity.js +22 -0
  95. package/dist/components/inline-field.d.ts +40 -0
  96. package/dist/components/inline-field.js +110 -0
  97. package/dist/components/input.d.ts +17 -0
  98. package/dist/components/input.js +14 -0
  99. package/dist/components/item-list.d.ts +11 -0
  100. package/dist/components/item-list.js +15 -0
  101. package/dist/components/label.d.ts +3 -0
  102. package/dist/components/label.js +6 -0
  103. package/dist/components/mini-month.d.ts +15 -0
  104. package/dist/components/mini-month.js +35 -0
  105. package/dist/components/placeholder-avatar.d.ts +12 -0
  106. package/dist/components/placeholder-avatar.js +6 -0
  107. package/dist/components/popover.d.ts +7 -0
  108. package/dist/components/popover.js +16 -0
  109. package/dist/components/progress-list.d.ts +31 -0
  110. package/dist/components/progress-list.js +15 -0
  111. package/dist/components/progress-ring.d.ts +13 -0
  112. package/dist/components/progress-ring.js +14 -0
  113. package/dist/components/progress.d.ts +10 -0
  114. package/dist/components/progress.js +12 -0
  115. package/dist/components/search-box.d.ts +25 -0
  116. package/dist/components/search-box.js +56 -0
  117. package/dist/components/searchable-options.d.ts +32 -0
  118. package/dist/components/searchable-options.js +17 -0
  119. package/dist/components/section-label.d.ts +7 -0
  120. package/dist/components/section-label.js +8 -0
  121. package/dist/components/segmented-control.d.ts +21 -0
  122. package/dist/components/segmented-control.js +9 -0
  123. package/dist/components/select-menu.d.ts +38 -0
  124. package/dist/components/select-menu.js +26 -0
  125. package/dist/components/selection-bar.d.ts +17 -0
  126. package/dist/components/selection-bar.js +15 -0
  127. package/dist/components/separator.d.ts +3 -0
  128. package/dist/components/separator.js +6 -0
  129. package/dist/components/share-dialog.d.ts +63 -0
  130. package/dist/components/share-dialog.js +74 -0
  131. package/dist/components/sheet.d.ts +20 -0
  132. package/dist/components/sheet.js +24 -0
  133. package/dist/components/skeleton.d.ts +2 -0
  134. package/dist/components/skeleton.js +5 -0
  135. package/dist/components/spinner.d.ts +3 -0
  136. package/dist/components/spinner.js +8 -0
  137. package/dist/components/table.d.ts +7 -0
  138. package/dist/components/table.js +20 -0
  139. package/dist/components/text-link.d.ts +9 -0
  140. package/dist/components/text-link.js +9 -0
  141. package/dist/components/text.d.ts +13 -0
  142. package/dist/components/text.js +8 -0
  143. package/dist/components/toaster.d.ts +8 -0
  144. package/dist/components/toaster.js +27 -0
  145. package/dist/components/viewer-dialog.d.ts +37 -0
  146. package/dist/components/viewer-dialog.js +53 -0
  147. package/dist/index.d.ts +87 -0
  148. package/dist/index.js +87 -0
  149. package/dist/layout/app-frame.d.ts +42 -0
  150. package/dist/layout/app-frame.js +62 -0
  151. package/dist/layout/app-shell.d.ts +11 -0
  152. package/dist/layout/app-shell.js +7 -0
  153. package/dist/layout/document-title.d.ts +14 -0
  154. package/dist/layout/document-title.js +39 -0
  155. package/dist/layout/empty-state.d.ts +16 -0
  156. package/dist/layout/empty-state.js +19 -0
  157. package/dist/layout/entity-header.d.ts +14 -0
  158. package/dist/layout/entity-header.js +6 -0
  159. package/dist/layout/form-field.d.ts +10 -0
  160. package/dist/layout/form-field.js +9 -0
  161. package/dist/layout/form-grid.d.ts +6 -0
  162. package/dist/layout/form-grid.js +9 -0
  163. package/dist/layout/full-page-message.d.ts +10 -0
  164. package/dist/layout/full-page-message.js +5 -0
  165. package/dist/layout/full-page-surface.d.ts +12 -0
  166. package/dist/layout/full-page-surface.js +8 -0
  167. package/dist/layout/month-grid.d.ts +31 -0
  168. package/dist/layout/month-grid.js +12 -0
  169. package/dist/layout/page-header.d.ts +14 -0
  170. package/dist/layout/page-header.js +11 -0
  171. package/dist/layout/panel.d.ts +15 -0
  172. package/dist/layout/panel.js +12 -0
  173. package/dist/layout/retry-message.d.ts +8 -0
  174. package/dist/layout/retry-message.js +9 -0
  175. package/dist/layout/route-error-message.d.ts +9 -0
  176. package/dist/layout/route-error-message.js +9 -0
  177. package/dist/layout/row-list.d.ts +87 -0
  178. package/dist/layout/row-list.js +67 -0
  179. package/dist/layout/settings-section.d.ts +14 -0
  180. package/dist/layout/settings-section.js +11 -0
  181. package/dist/layout/sidebar-nav.d.ts +79 -0
  182. package/dist/layout/sidebar-nav.js +59 -0
  183. package/dist/layout/sign-in-layout.d.ts +19 -0
  184. package/dist/layout/sign-in-layout.js +11 -0
  185. package/dist/layout/sortable-row-list.d.ts +27 -0
  186. package/dist/layout/sortable-row-list.js +61 -0
  187. package/dist/layout/stack.d.ts +41 -0
  188. package/dist/layout/stack.js +51 -0
  189. package/dist/layout/tile-grid.d.ts +75 -0
  190. package/dist/layout/tile-grid.js +71 -0
  191. package/dist/layout/time-grid.d.ts +40 -0
  192. package/dist/layout/time-grid.js +63 -0
  193. package/dist/layout/use-favicon.d.ts +5 -0
  194. package/dist/layout/use-favicon.js +20 -0
  195. package/dist/lib/cn.d.ts +2 -0
  196. package/dist/lib/cn.js +5 -0
  197. package/dist/lib/initials.d.ts +2 -0
  198. package/dist/lib/initials.js +7 -0
  199. package/dist/mascot/mascot.d.ts +23 -0
  200. package/dist/mascot/mascot.definition.json +14 -0
  201. package/dist/mascot/mascot.js +49 -0
  202. package/dist/mascot/use-thinking-motion.d.ts +8 -0
  203. package/dist/mascot/use-thinking-motion.js +68 -0
  204. package/dist/styles.css +385 -0
  205. package/dist/vite/ismou-favicon.plugin.d.ts +10 -0
  206. package/dist/vite/ismou-favicon.plugin.js +67 -0
  207. package/dist/vite/phosphor-icons.plugin.d.ts +8 -0
  208. package/dist/vite/phosphor-icons.plugin.js +61 -0
  209. package/package.json +97 -3
  210. package/README.md +0 -3
@@ -0,0 +1,385 @@
1
+ @import "tailwindcss";
2
+ @import "tw-animate-css";
3
+ @import "@fontsource-variable/geist";
4
+
5
+ /* Lets consuming apps generate the utilities used by these components. */
6
+ @source "./";
7
+
8
+ /*
9
+ * COLOR SYSTEM
10
+ *
11
+ * Palette: blue, cyan, green, violet, yellow, orange, red. One calm, human register (moderate chroma,
12
+ * never neon). Each colour has the same shades:
13
+ * --<c> the solid colour (fills, icons)
14
+ * --<c>-light/-dark the two ends of its texture gradient: same hue, a small lightness step
15
+ * --<c>-soft a pale tint, for backgrounds (alerts, badges)
16
+ * --<c>-foreground readable text on the tint or on white
17
+ * --<c>-deep a deep, quiet version, for large painted surfaces (sign-in)
18
+ * Utilities: `bg-blue`, `bg-blue-soft`, `text-blue-foreground`...
19
+ *
20
+ * Semantic aliases, identical in every app: info → blue, success → green, warning → yellow,
21
+ * danger → red (`destructive` is kept as an alias of danger). Each exposes the base, `-soft`
22
+ * and `-foreground` shades: `bg-danger-soft text-danger-foreground`.
23
+ *
24
+ * Primary: the app's own colour, picked from the palette with `data-primary` on the app root
25
+ * (`<html data-primary="green">`); blue when absent. Core = blue, account = orange, contacts = green, drive = blue, calendar = cyan, admin = red.
26
+ * Only three things use it: focus rings (the plain primary, `--ring`), primary buttons and the
27
+ * app's icon/favicon (both with the primary texture). The attribute works on any element,
28
+ * which is how an app icon keeps its colour on another app's page.
29
+ *
30
+ * Primary texture (`primary-texture`): the film grain (the hero) over a light gradient of the
31
+ * primary (`--primary-light` → `--primary-dark`). Used by primary buttons, app icons and
32
+ * favicons. Human rather than technological: a texture, never a multi-hue gradient. Beyond
33
+ * those, the grain stays rare: the sign-in painted half (`GrainSurface`) and nothing else (file
34
+ * icons draw their own, quieter, in `brand/kind-icons.ts`).
35
+ * The hex twins of the `-light/-dark` shades live in `brand/app-brands.ts` (favicons).
36
+ */
37
+
38
+ :root {
39
+ /*
40
+ * Radius rule: controls (buttons, inputs, menu items, skeletons) use `rounded-md`,
41
+ * surfaces (cards, dialogs, popovers, menus) use `rounded-xl`, badges and avatars are
42
+ * `rounded-full`. Two refinements: the 16px checkbox uses `rounded-sm` (md would turn it
43
+ * into a circle that reads as a radio), and inline alerts sit in between with `rounded-lg`.
44
+ * Brand glyphs (app icons, favicons) round every corner on their own 24px grid: feet and
45
+ * teeth like a control, apexes more generously.
46
+ * Every other step derives from `--radius`, so the whole scale moves as one.
47
+ */
48
+ --radius: 0.625rem;
49
+
50
+ /*
51
+ * The interface is light and calm: a barely tinted canvas (the page, behind the sidebar and
52
+ * the topbar, a touch of the app's primary in its grey), near-white panels on it, white
53
+ * surfaces, cool neutral greys.
54
+ */
55
+ /* Mostly grey, with a breath of the app's primary: each app's canvas feels like its own. */
56
+ --background: oklch(from var(--primary) 0.97 0.005 h);
57
+ --foreground: oklch(0.22 0.018 260);
58
+ --card: oklch(1 0 0);
59
+ --card-foreground: oklch(0.22 0.018 260);
60
+ --popover: oklch(1 0 0);
61
+ --popover-foreground: oklch(0.22 0.018 260);
62
+ --secondary: oklch(0.96 0.004 255);
63
+ --secondary-foreground: oklch(0.3 0.025 260);
64
+ --muted: oklch(0.965 0.004 255);
65
+ --muted-foreground: oklch(0.53 0.018 258);
66
+ --accent: oklch(0.955 0.005 255);
67
+ --accent-foreground: oklch(0.3 0.025 260);
68
+ --border: oklch(0.92 0.005 255);
69
+ --input: oklch(0.9 0.006 255);
70
+
71
+ /* The panels of the application frame (`Panel`): where the content of a page sits. */
72
+ --panel: oklch(1 0 0);
73
+ /* The sidebar's navigation, on the canvas. */
74
+ --sidebar-foreground: oklch(0.38 0.02 260);
75
+ --sidebar-accent: oklch(0.945 0.006 255);
76
+ --sidebar-accent-foreground: oklch(0.22 0.018 260);
77
+
78
+ /* Palette. */
79
+ --blue: oklch(0.52 0.17 262);
80
+ --blue-light: oklch(0.57 0.16 259);
81
+ --blue-dark: oklch(0.47 0.17 264);
82
+ --blue-soft: oklch(0.965 0.018 255);
83
+ --blue-foreground: oklch(0.44 0.15 262);
84
+ --blue-deep: oklch(0.31 0.1 263);
85
+
86
+ --cyan: oklch(0.6 0.1 205);
87
+ --cyan-light: oklch(0.65 0.1 200);
88
+ --cyan-dark: oklch(0.54 0.1 210);
89
+ --cyan-soft: oklch(0.965 0.02 200);
90
+ --cyan-foreground: oklch(0.45 0.08 210);
91
+ --cyan-deep: oklch(0.32 0.06 210);
92
+
93
+ --green: oklch(0.55 0.12 155);
94
+ --green-light: oklch(0.62 0.12 152);
95
+ --green-dark: oklch(0.5 0.11 157);
96
+ --green-soft: oklch(0.965 0.025 155);
97
+ --green-foreground: oklch(0.43 0.09 157);
98
+ --green-deep: oklch(0.31 0.06 158);
99
+
100
+ --violet: oklch(0.52 0.15 295);
101
+ --violet-light: oklch(0.58 0.14 293);
102
+ --violet-dark: oklch(0.47 0.15 297);
103
+ --violet-soft: oklch(0.965 0.02 295);
104
+ --violet-foreground: oklch(0.44 0.13 295);
105
+ --violet-deep: oklch(0.31 0.09 295);
106
+
107
+ --yellow: oklch(0.8 0.13 85);
108
+ --yellow-light: oklch(0.85 0.12 88);
109
+ --yellow-dark: oklch(0.74 0.13 80);
110
+ --yellow-soft: oklch(0.97 0.04 90);
111
+ --yellow-foreground: oklch(0.47 0.09 65);
112
+ --yellow-deep: oklch(0.35 0.06 75);
113
+
114
+ --orange: oklch(0.68 0.14 55);
115
+ --orange-light: oklch(0.73 0.13 58);
116
+ --orange-dark: oklch(0.62 0.15 50);
117
+ --orange-soft: oklch(0.965 0.03 60);
118
+ --orange-foreground: oklch(0.5 0.12 45);
119
+ --orange-deep: oklch(0.33 0.07 45);
120
+
121
+ --red: oklch(0.555 0.205 27);
122
+ --red-light: oklch(0.6 0.2 27);
123
+ --red-dark: oklch(0.5 0.2 26);
124
+ --red-soft: oklch(0.965 0.022 22);
125
+ --red-foreground: oklch(0.5 0.19 27);
126
+ --red-deep: oklch(0.32 0.11 26);
127
+
128
+ /* Semantic aliases: the same in every app. */
129
+ --info: var(--blue);
130
+ --info-soft: var(--blue-soft);
131
+ --info-foreground: var(--blue-foreground);
132
+ --success: var(--green);
133
+ --success-soft: var(--green-soft);
134
+ --success-foreground: var(--green-foreground);
135
+ --warning: var(--yellow);
136
+ --warning-soft: var(--yellow-soft);
137
+ --warning-foreground: var(--yellow-foreground);
138
+ --danger: var(--red);
139
+ --danger-soft: var(--red-soft);
140
+ --danger-foreground: var(--red-foreground);
141
+ --destructive: var(--danger);
142
+
143
+ /*
144
+ * Film grain: tiled SVG fractal noise, white with alpha, blended in `overlay`. It is the hero
145
+ * of the primary texture; the gradient under it stays quiet.
146
+ */
147
+ --grain-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
148
+ }
149
+
150
+ /*
151
+ * Primary. Every shade is declared in each block (not derived at :root), so a nested
152
+ * `data-primary` recomputes all of them for its subtree.
153
+ */
154
+ :root,
155
+ [data-primary="blue"] {
156
+ --primary: var(--blue);
157
+ --primary-light: var(--blue-light);
158
+ --primary-dark: var(--blue-dark);
159
+ --primary-soft: var(--blue-soft);
160
+ --primary-deep: var(--blue-deep);
161
+ --primary-foreground: oklch(0.99 0.004 250);
162
+ --ring: var(--primary);
163
+ }
164
+
165
+ [data-primary="cyan"] {
166
+ --primary: var(--cyan);
167
+ --primary-light: var(--cyan-light);
168
+ --primary-dark: var(--cyan-dark);
169
+ --primary-soft: var(--cyan-soft);
170
+ --primary-deep: var(--cyan-deep);
171
+ --primary-foreground: oklch(0.99 0.006 200);
172
+ --ring: var(--primary);
173
+ }
174
+
175
+ [data-primary="green"] {
176
+ --primary: var(--green);
177
+ --primary-light: var(--green-light);
178
+ --primary-dark: var(--green-dark);
179
+ --primary-soft: var(--green-soft);
180
+ --primary-deep: var(--green-deep);
181
+ --primary-foreground: oklch(0.99 0.006 155);
182
+ --ring: var(--primary);
183
+ }
184
+
185
+ [data-primary="violet"] {
186
+ --primary: var(--violet);
187
+ --primary-light: var(--violet-light);
188
+ --primary-dark: var(--violet-dark);
189
+ --primary-soft: var(--violet-soft);
190
+ --primary-deep: var(--violet-deep);
191
+ --primary-foreground: oklch(0.99 0.006 295);
192
+ --ring: var(--primary);
193
+ }
194
+
195
+ [data-primary="yellow"] {
196
+ --primary: var(--yellow);
197
+ --primary-light: var(--yellow-light);
198
+ --primary-dark: var(--yellow-dark);
199
+ --primary-soft: var(--yellow-soft);
200
+ --primary-deep: var(--yellow-deep);
201
+ /* Yellow is light: dark text, not white. */
202
+ --primary-foreground: oklch(0.3 0.06 70);
203
+ --ring: var(--primary);
204
+ }
205
+
206
+ [data-primary="orange"] {
207
+ --primary: var(--orange);
208
+ --primary-light: var(--orange-light);
209
+ --primary-dark: var(--orange-dark);
210
+ --primary-soft: var(--orange-soft);
211
+ --primary-deep: var(--orange-deep);
212
+ --primary-foreground: oklch(0.99 0.006 55);
213
+ --ring: var(--primary);
214
+ }
215
+
216
+ [data-primary="red"] {
217
+ --primary: var(--red);
218
+ --primary-light: var(--red-light);
219
+ --primary-dark: var(--red-dark);
220
+ --primary-soft: var(--red-soft);
221
+ --primary-deep: var(--red-deep);
222
+ --primary-foreground: oklch(0.99 0.006 25);
223
+ --ring: var(--primary);
224
+ }
225
+
226
+ /*
227
+ * The frame gutter: the one horizontal margin of the main panel, in every app and page.
228
+ * `AppFrame` pads its content and its topbar with it; full-bleed content reads it
229
+ * (`px-(--frame-gutter)`). Defined here only: apps never set it.
230
+ */
231
+ [data-slot="app-frame"] {
232
+ --frame-gutter: 1rem;
233
+
234
+ @media (width >= 48rem) {
235
+ --frame-gutter: 2rem;
236
+ }
237
+
238
+ @media (width >= 64rem) {
239
+ --frame-gutter: 2.5rem;
240
+ }
241
+ }
242
+
243
+ @theme inline {
244
+ --font-sans: "Geist Variable", ui-sans-serif, system-ui, sans-serif;
245
+
246
+ --radius-sm: calc(var(--radius) - 4px);
247
+ --radius-md: calc(var(--radius) - 2px);
248
+ --radius-lg: var(--radius);
249
+ --radius-xl: calc(var(--radius) + 4px);
250
+ --radius-2xl: calc(var(--radius) + 8px);
251
+ --radius-3xl: calc(var(--radius) + 12px);
252
+
253
+ --color-background: var(--background);
254
+ --color-foreground: var(--foreground);
255
+ --color-card: var(--card);
256
+ --color-card-foreground: var(--card-foreground);
257
+ --color-popover: var(--popover);
258
+ --color-popover-foreground: var(--popover-foreground);
259
+ --color-primary: var(--primary);
260
+ --color-primary-light: var(--primary-light);
261
+ --color-primary-dark: var(--primary-dark);
262
+ --color-primary-soft: var(--primary-soft);
263
+ --color-primary-deep: var(--primary-deep);
264
+ --color-primary-foreground: var(--primary-foreground);
265
+ --color-secondary: var(--secondary);
266
+ --color-secondary-foreground: var(--secondary-foreground);
267
+ --color-muted: var(--muted);
268
+ --color-muted-foreground: var(--muted-foreground);
269
+ --color-accent: var(--accent);
270
+ --color-accent-foreground: var(--accent-foreground);
271
+ --color-border: var(--border);
272
+ --color-input: var(--input);
273
+ --color-ring: var(--ring);
274
+ --color-panel: var(--panel);
275
+ --color-sidebar-foreground: var(--sidebar-foreground);
276
+ --color-sidebar-accent: var(--sidebar-accent);
277
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
278
+
279
+ --color-blue: var(--blue);
280
+ --color-blue-soft: var(--blue-soft);
281
+ --color-blue-foreground: var(--blue-foreground);
282
+ --color-cyan: var(--cyan);
283
+ --color-cyan-soft: var(--cyan-soft);
284
+ --color-cyan-foreground: var(--cyan-foreground);
285
+ --color-green: var(--green);
286
+ --color-green-soft: var(--green-soft);
287
+ --color-green-foreground: var(--green-foreground);
288
+ --color-violet: var(--violet);
289
+ --color-violet-soft: var(--violet-soft);
290
+ --color-violet-foreground: var(--violet-foreground);
291
+ --color-yellow: var(--yellow);
292
+ --color-yellow-soft: var(--yellow-soft);
293
+ --color-yellow-foreground: var(--yellow-foreground);
294
+ --color-orange: var(--orange);
295
+ --color-orange-soft: var(--orange-soft);
296
+ --color-orange-foreground: var(--orange-foreground);
297
+ --color-red: var(--red);
298
+ --color-red-soft: var(--red-soft);
299
+ --color-red-foreground: var(--red-foreground);
300
+
301
+ --color-info: var(--info);
302
+ --color-info-soft: var(--info-soft);
303
+ --color-info-foreground: var(--info-foreground);
304
+ --color-success: var(--success);
305
+ --color-success-soft: var(--success-soft);
306
+ --color-success-foreground: var(--success-foreground);
307
+ --color-warning: var(--warning);
308
+ --color-warning-soft: var(--warning-soft);
309
+ --color-warning-foreground: var(--warning-foreground);
310
+ --color-danger: var(--danger);
311
+ --color-danger-soft: var(--danger-soft);
312
+ --color-danger-foreground: var(--danger-foreground);
313
+ --color-destructive: var(--destructive);
314
+ }
315
+
316
+ /*
317
+ * The primary texture: the grain over a light gradient of the primary. Two noise scales,
318
+ * offset, so the tile never repeats visibly. Text on it is `--primary-foreground`.
319
+ */
320
+ @utility primary-texture {
321
+ background-color: var(--primary);
322
+ background-image:
323
+ var(--grain-noise), var(--grain-noise),
324
+ linear-gradient(165deg, var(--primary-light), var(--primary-dark));
325
+ background-size:
326
+ 72px 72px,
327
+ 44px 44px,
328
+ 100% 100%;
329
+ background-position:
330
+ 0 0,
331
+ 17px 29px,
332
+ 0 0;
333
+ background-blend-mode: overlay, soft-light, normal;
334
+ color: var(--primary-foreground);
335
+ }
336
+
337
+ /*
338
+ * The primary texture, toned down for controls (buttons, FABs): one grain layer in
339
+ * `soft-light` instead of overlay + soft-light, on a larger tile. On a mid-tone primary,
340
+ * overlay is at its strongest, and controls carry text: the full texture is kept for icons.
341
+ */
342
+ @utility primary-texture-subtle {
343
+ background-color: var(--primary);
344
+ background-image:
345
+ var(--grain-noise), linear-gradient(165deg, var(--primary-light), var(--primary-dark));
346
+ background-size:
347
+ 96px 96px,
348
+ 100% 100%;
349
+ background-blend-mode: soft-light, normal;
350
+ color: var(--primary-foreground);
351
+ }
352
+
353
+ /* The keyboard focus mark of every control: a soft ring in the focus colour. */
354
+ @utility focus-ring {
355
+ &:focus-visible {
356
+ outline: none;
357
+ @apply ring-3 ring-ring/50;
358
+ }
359
+ }
360
+
361
+ @layer base {
362
+ * {
363
+ @apply border-border outline-ring/50;
364
+ }
365
+ /*
366
+ * Tailwind resets buttons to the default arrow. Everything clickable shows the hand instead,
367
+ * so rows and items read as actionable (links already do).
368
+ */
369
+ button:not(:disabled),
370
+ [role="button"]:not([aria-disabled="true"]),
371
+ summary {
372
+ cursor: pointer;
373
+ }
374
+
375
+ body {
376
+ @apply bg-background font-sans text-foreground antialiased;
377
+ }
378
+ }
379
+
380
+ @layer components {
381
+ /* The band of `useAreaSelection`, drawn by @viselect over the page: a tint of the primary. */
382
+ .selection-area {
383
+ @apply rounded-sm border border-primary/50 bg-primary/10;
384
+ }
385
+ }
@@ -0,0 +1,10 @@
1
+ import type { Plugin } from 'vite';
2
+ import type { AppBrand } from '../brand/app-brands.ts';
3
+ /** The brand's favicon, as shipped in `src/brand/favicons/`. */
4
+ export declare function readAppFavicon(brand: AppBrand): string;
5
+ /**
6
+ * Gives a web client its app's favicon: emits the brand SVG as a hashed asset on build, serves
7
+ * it in development, and injects the `<link rel="icon">` into `index.html`. Use it in the app's
8
+ * `vite.config.ts`: `plugins: [react(), tailwindcss(), ismouFavicon('contacts')]`.
9
+ */
10
+ export declare function ismouFavicon(brand: AppBrand): Plugin;
@@ -0,0 +1,67 @@
1
+ /// <reference types="node" />
2
+ // Vite loads its config's dependencies with plain Node (type stripping, no bundling): this
3
+ // entry must not import sibling modules at runtime. It reads the shipped favicon files
4
+ // (kept in sync with `brand/app-brands.ts` by a test) and imports types only.
5
+ import { readFileSync } from 'node:fs';
6
+ import { join } from 'node:path';
7
+ /** A short content hash (FNV-1a), so a changed favicon gets a new URL. */
8
+ function contentHash(text) {
9
+ let hash = 0x811c9dc5;
10
+ for (let index = 0; index < text.length; index++) {
11
+ hash ^= text.charCodeAt(index);
12
+ hash = Math.imul(hash, 0x01000193);
13
+ }
14
+ return (hash >>> 0).toString(16).padStart(8, '0');
15
+ }
16
+ /** The brand's favicon, as shipped in `src/brand/favicons/`. */
17
+ export function readAppFavicon(brand) {
18
+ return readFileSync(join(import.meta.dirname, '..', 'brand', 'favicons', `${brand}.svg`), 'utf8');
19
+ }
20
+ /**
21
+ * Gives a web client its app's favicon: emits the brand SVG as a hashed asset on build, serves
22
+ * it in development, and injects the `<link rel="icon">` into `index.html`. Use it in the app's
23
+ * `vite.config.ts`: `plugins: [react(), tailwindcss(), ismouFavicon('contacts')]`.
24
+ */
25
+ export function ismouFavicon(brand) {
26
+ let base = '/';
27
+ let assetsDir = 'assets';
28
+ /** The favicon as shipped now, under a name of its content: read again whenever asked. */
29
+ function current() {
30
+ const source = readAppFavicon(brand);
31
+ const name = `favicon-${brand}-${contentHash(source)}.svg`;
32
+ return { source, fileName: assetsDir ? `${assetsDir}/${name}` : name };
33
+ }
34
+ return {
35
+ name: 'ismou-favicon',
36
+ configResolved(config) {
37
+ base = config.base;
38
+ assetsDir = config.build.assetsDir;
39
+ },
40
+ configureServer(server) {
41
+ // Read at each request: a redrawn mark shows at the next page load, without a restart.
42
+ server.middlewares.use((request, response, next) => {
43
+ const path = request.url?.split('?')[0] ?? '';
44
+ if (!path.startsWith(`/${assetsDir ? `${assetsDir}/` : ''}favicon-${brand}-`))
45
+ return next();
46
+ const { source, fileName } = current();
47
+ if (path !== `/${fileName}`)
48
+ return next();
49
+ response.setHeader('Content-Type', 'image/svg+xml');
50
+ response.end(source);
51
+ });
52
+ },
53
+ generateBundle() {
54
+ const { source, fileName } = current();
55
+ this.emitFile({ type: 'asset', fileName, source });
56
+ },
57
+ transformIndexHtml() {
58
+ return [
59
+ {
60
+ tag: 'link',
61
+ attrs: { rel: 'icon', type: 'image/svg+xml', href: `${base}${current().fileName}` },
62
+ injectTo: 'head',
63
+ },
64
+ ];
65
+ },
66
+ };
67
+ }
@@ -0,0 +1,8 @@
1
+ import type { Plugin } from 'vite';
2
+ /**
3
+ * Serves only the icons a page uses, in development. Phosphor's barrel pre-bundles into one
4
+ * module of every icon in every weight (megabytes the browser downloads and parses on each
5
+ * load): imports of it become imports of each icon's own module. Builds tree-shake the barrel
6
+ * already, so they are left alone. Use it in the app's `vite.config.ts` plugins.
7
+ */
8
+ export declare function phosphorIcons(): Plugin;
@@ -0,0 +1,61 @@
1
+ /// <reference types="node" />
2
+ // Vite loads its config's dependencies with plain Node (type stripping, no bundling): this
3
+ // entry imports nothing but Node and types.
4
+ import { readFileSync } from 'node:fs';
5
+ import { createRequire } from 'node:module';
6
+ import { dirname, join } from 'node:path';
7
+ const PACKAGE = '@phosphor-icons/react';
8
+ /** `import { A, B as C } from '@phosphor-icons/react'`, the types already stripped. */
9
+ const BARREL_IMPORT = /import\s*\{([^}]*)\}\s*from\s*["']@phosphor-icons\/react["'];?/g;
10
+ /** One line of the package's barrel: `import { Folder as x, FolderIcon as y } from "./csr/Folder.es.js";` */
11
+ const BARREL_LINE = /import\s*\{([^}]*)\}\s*from\s*"\.\/((?:csr|lib)\/[^"]+)\.es\.js"/g;
12
+ /** Where each name of the package comes from, as a deep import its `exports` allow. */
13
+ function readModulesByName() {
14
+ const entry = createRequire(import.meta.url).resolve(PACKAGE);
15
+ const barrel = readFileSync(join(dirname(entry), 'index.es.js'), 'utf8');
16
+ const modules = new Map();
17
+ for (const [, names = '', path = ''] of barrel.matchAll(BARREL_LINE)) {
18
+ for (const name of names.split(',')) {
19
+ const exported = name.trim().split(/\s+as\s+/)[0];
20
+ if (exported)
21
+ modules.set(exported, `${PACKAGE}/dist/${path}`);
22
+ }
23
+ }
24
+ return modules;
25
+ }
26
+ /**
27
+ * Serves only the icons a page uses, in development. Phosphor's barrel pre-bundles into one
28
+ * module of every icon in every weight (megabytes the browser downloads and parses on each
29
+ * load): imports of it become imports of each icon's own module. Builds tree-shake the barrel
30
+ * already, so they are left alone. Use it in the app's `vite.config.ts` plugins.
31
+ */
32
+ export function phosphorIcons() {
33
+ let modules;
34
+ return {
35
+ name: 'ismou:phosphor-icons',
36
+ apply: 'serve',
37
+ config: () => ({ optimizeDeps: { exclude: [PACKAGE] } }),
38
+ transform(code, id) {
39
+ if (id.includes('/node_modules/') || !code.includes(PACKAGE))
40
+ return null;
41
+ modules ??= readModulesByName();
42
+ const byModule = modules;
43
+ const rewritten = code.replace(BARREL_IMPORT, (whole, specifiers) => {
44
+ const imports = [];
45
+ for (const specifier of specifiers.split(',')) {
46
+ const [imported = '', local = imported] = specifier.trim().split(/\s+as\s+/);
47
+ if (!imported)
48
+ continue;
49
+ const module = byModule.get(imported);
50
+ // A name the map doesn't know keeps the whole import as it was.
51
+ if (!module)
52
+ return whole;
53
+ imports.push(`import { ${imported} as ${local} } from '${module}';`);
54
+ }
55
+ // On one line, as the import was: the lines below keep their numbers (source maps).
56
+ return imports.join(' ');
57
+ });
58
+ return rewritten === code ? null : { code: rewritten, map: null };
59
+ },
60
+ };
61
+ }
package/package.json CHANGED
@@ -1,6 +1,100 @@
1
1
  {
2
2
  "name": "@ismou-workspace/ui",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.1",
4
+ "type": "module",
5
+ "sideEffects": [
6
+ "**/*.css",
7
+ "**/*.svg"
8
+ ],
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "default": "./dist/index.js"
13
+ },
14
+ "./styles.css": "./dist/styles.css",
15
+ "./vite": {
16
+ "types": "./dist/vite/ismou-favicon.plugin.d.ts",
17
+ "default": "./dist/vite/ismou-favicon.plugin.js"
18
+ },
19
+ "./vite/phosphor-icons": {
20
+ "types": "./dist/vite/phosphor-icons.plugin.d.ts",
21
+ "default": "./dist/vite/phosphor-icons.plugin.js"
22
+ },
23
+ "./brand": {
24
+ "types": "./dist/brand/app-brands.d.ts",
25
+ "default": "./dist/brand/app-brands.js"
26
+ },
27
+ "./brand/kind-icons": {
28
+ "types": "./dist/brand/kind-icons.d.ts",
29
+ "default": "./dist/brand/kind-icons.js"
30
+ },
31
+ "./favicons/core.svg": "./dist/brand/favicons/core.svg",
32
+ "./favicons/account.svg": "./dist/brand/favicons/account.svg",
33
+ "./favicons/contacts.svg": "./dist/brand/favicons/contacts.svg",
34
+ "./favicons/drive.svg": "./dist/brand/favicons/drive.svg",
35
+ "./favicons/calendar.svg": "./dist/brand/favicons/calendar.svg",
36
+ "./favicons/bridge.svg": "./dist/brand/favicons/bridge.svg",
37
+ "./favicons/office.svg": "./dist/brand/favicons/office.svg",
38
+ "./favicons/admin.svg": "./dist/brand/favicons/admin.svg"
39
+ },
40
+ "dependencies": {
41
+ "@dnd-kit/core": "6.3.1",
42
+ "@dnd-kit/modifiers": "9.0.0",
43
+ "@dnd-kit/sortable": "10.0.0",
44
+ "@dnd-kit/utilities": "3.2.2",
45
+ "@fontsource-variable/geist": "5.3.0",
46
+ "@phosphor-icons/react": "2.1.10",
47
+ "@viselect/vanilla": "3.10.1",
48
+ "boring-avatars": "2.0.4",
49
+ "class-variance-authority": "0.7.1",
50
+ "clsx": "2.1.1",
51
+ "date-fns": "4.4.0",
52
+ "open-bot-avatar": "0.5.2",
53
+ "radix-ui": "1.8.1",
54
+ "react-dropzone": "20.2.1",
55
+ "sonner": "2.0.8",
56
+ "tailwind-merge": "3.7.3",
57
+ "tailwindcss": "4.3.5",
58
+ "tw-animate-css": "1.4.0",
59
+ "@ismou-workspace/translations": "^0.1.1"
60
+ },
61
+ "peerDependencies": {
62
+ "react": "19.3.1",
63
+ "react-dom": "19.3.1",
64
+ "vite": "8.4.1"
65
+ },
66
+ "peerDependenciesMeta": {
67
+ "vite": {
68
+ "optional": true
69
+ }
70
+ },
71
+ "devDependencies": {
72
+ "@testing-library/react": "16.3.3",
73
+ "@types/node": "26.6.11",
74
+ "@types/react": "19.3.3",
75
+ "@types/react-dom": "19.3.0",
76
+ "jsdom": "31.0.1",
77
+ "react": "19.3.1",
78
+ "react-dom": "19.3.1",
79
+ "typescript": "7.0.2",
80
+ "vite": "8.4.1",
81
+ "vitest": "5.1.2",
82
+ "@ismou-workspace/tsconfig": "^0.1.1"
83
+ },
84
+ "repository": {
85
+ "type": "git",
86
+ "url": "git+https://github.com/ismou-workspace/sdk.git",
87
+ "directory": "packages/ui"
88
+ },
89
+ "files": [
90
+ "dist"
91
+ ],
92
+ "publishConfig": {
93
+ "access": "public"
94
+ },
95
+ "scripts": {
96
+ "build": "tsc --project tsconfig.build.json && node ../../scripts/copy-assets.mjs",
97
+ "typecheck": "tsc --project tsconfig.json",
98
+ "test": "vitest run"
99
+ }
6
100
  }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.