@flamingo-stack/openframe-frontend-core 0.0.200 → 0.0.201-snapshot.20260521140839

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 (57) hide show
  1. package/dist/{chunk-V2FNIPZJ.cjs → chunk-3B43AHYE.cjs} +2 -2
  2. package/dist/{chunk-TMD44IKJ.js.map → chunk-3B43AHYE.cjs.map} +1 -1
  3. package/dist/{chunk-TMD44IKJ.js → chunk-55HF462A.js} +2 -2
  4. package/dist/chunk-55HF462A.js.map +1 -0
  5. package/dist/{chunk-C3M6R6JH.cjs → chunk-DMUFJO4C.cjs} +797 -792
  6. package/dist/chunk-DMUFJO4C.cjs.map +1 -0
  7. package/dist/{chunk-ZOM75JOY.js → chunk-UZ2FOWW3.js} +4191 -4186
  8. package/dist/chunk-UZ2FOWW3.js.map +1 -0
  9. package/dist/components/features/index.cjs +13 -3
  10. package/dist/components/features/index.cjs.map +1 -1
  11. package/dist/components/features/index.d.ts +1 -1
  12. package/dist/components/features/index.d.ts.map +1 -1
  13. package/dist/components/features/index.js +16 -6
  14. package/dist/components/index.cjs +15 -3
  15. package/dist/components/index.cjs.map +1 -1
  16. package/dist/components/index.js +16 -4
  17. package/dist/components/layout/title-block.d.ts.map +1 -1
  18. package/dist/components/navigation/index.cjs +3 -3
  19. package/dist/components/navigation/index.js +2 -2
  20. package/dist/components/providers/theme-provider.d.ts +69 -0
  21. package/dist/components/providers/theme-provider.d.ts.map +1 -0
  22. package/dist/components/ui/entity-image.d.ts +9 -0
  23. package/dist/components/ui/entity-image.d.ts.map +1 -0
  24. package/dist/components/ui/file-manager/index.cjs +50 -50
  25. package/dist/components/ui/file-manager/index.js +1 -1
  26. package/dist/components/ui/index.cjs +5 -3
  27. package/dist/components/ui/index.cjs.map +1 -1
  28. package/dist/components/ui/index.d.ts +1 -0
  29. package/dist/components/ui/index.d.ts.map +1 -1
  30. package/dist/components/ui/index.js +4 -2
  31. package/dist/components/ui/organization-card.d.ts.map +1 -1
  32. package/dist/index.cjs +15 -3
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.js +16 -4
  35. package/package.json +1 -1
  36. package/src/components/features/index.ts +15 -1
  37. package/src/components/layout/title-block.tsx +6 -30
  38. package/src/components/providers/theme-provider.tsx +130 -0
  39. package/src/components/ui/button/button.tsx +1 -1
  40. package/src/components/ui/checkbox-block.tsx +13 -13
  41. package/src/components/ui/entity-image.tsx +56 -0
  42. package/src/components/ui/index.ts +1 -0
  43. package/src/components/ui/organization-card.tsx +4 -8
  44. package/src/stories/CheckboxBlock.stories.tsx +1 -3
  45. package/src/stories/OrganizationCard.stories.tsx +14 -0
  46. package/src/stories/Theme.stories.tsx +350 -0
  47. package/src/styles/README.md +271 -174
  48. package/src/styles/dark_theme.tokens.json +982 -0
  49. package/src/styles/light_theme.tokens.json +982 -0
  50. package/src/styles/ods-colors.css +225 -146
  51. package/dist/chunk-C3M6R6JH.cjs.map +0 -1
  52. package/dist/chunk-V2FNIPZJ.cjs.map +0 -1
  53. package/dist/chunk-ZOM75JOY.js.map +0 -1
  54. package/dist/components/features/organization-icon.d.ts +0 -80
  55. package/dist/components/features/organization-icon.d.ts.map +0 -1
  56. package/src/components/features/organization-icon.tsx +0 -175
  57. package/src/styles/ods_color_tokens.json +0 -302
@@ -1,80 +0,0 @@
1
- export interface OrganizationIconProps {
2
- /**
3
- * Image URL - can be:
4
- * - Pre-fetched blob URL (starts with 'blob:')
5
- * - API path (starts with '/api/')
6
- * - Full URL (starts with 'http://' or 'https://')
7
- */
8
- imageUrl?: string | null;
9
- /**
10
- * Organization name for fallback initials and alt text
11
- */
12
- organizationName: string;
13
- /**
14
- * Size variant (matching VendorIcon sizes)
15
- * - xs: 24px (w-6 h-6)
16
- * - sm: 32px (w-8 h-8) - for devices table
17
- * - md: 40px (w-10 h-10) - for organizations table, dashboard (default)
18
- * - lg: 48px (w-12 h-12)
19
- * - l: 56px (w-14 h-14)
20
- * - xl: 64px (w-16 h-16) - for detail views
21
- */
22
- size?: 'xs' | 'sm' | 'md' | 'lg' | 'l' | 'xl';
23
- /**
24
- * Additional CSS classes
25
- */
26
- className?: string;
27
- /**
28
- * Show background container (default: true)
29
- */
30
- showBackground?: boolean;
31
- /**
32
- * Background style variant (default: 'dark')
33
- */
34
- backgroundStyle?: 'dark' | 'light' | 'white';
35
- }
36
- /**
37
- * OrganizationIcon - Reusable component for displaying organization logos
38
- *
39
- * Matches VendorIcon styling and behavior exactly for 100% visual parity.
40
- *
41
- * Features:
42
- * - **Dual-mode support:** Auto-detects pre-fetched blob URLs vs raw URLs
43
- * - **Automatic fallback:** Shows 2-letter initials if no image
44
- * - **Loading states:** Built-in loading indicator
45
- * - **Zero layout jumps:** Fixed dimensions prevent shifting
46
- * - **ODS styling:** Consistent theming with design tokens
47
- * - **Flexible sizing:** Six size variants (xs/sm/md/lg/l/xl)
48
- * - **Background variants:** dark (default), light, white
49
- *
50
- * Usage Examples:
51
- *
52
- * ```typescript
53
- * // With pre-fetched blob URL (from useBatchImages)
54
- * const fetchedImages = useBatchImages(imageUrls)
55
- * <OrganizationIcon
56
- * imageUrl={fetchedImages[org.imageUrl]}
57
- * organizationName={org.name}
58
- * size="md"
59
- * preFetched={true}
60
- * />
61
- *
62
- * // With automatic fetching (single image)
63
- * <OrganizationIcon
64
- * imageUrl={organization?.imageUrl}
65
- * organizationName={organization?.name || 'Organization'}
66
- * size="xl"
67
- * refreshKey={organization?.imageVersion}
68
- * />
69
- *
70
- * // Without background (inline with text)
71
- * <OrganizationIcon
72
- * imageUrl={org.imageUrl}
73
- * organizationName={org.name}
74
- * size="small-legacy"
75
- * showBackground={false}
76
- * />
77
- * ```
78
- */
79
- export declare function OrganizationIcon({ imageUrl, organizationName, size, className, showBackground, backgroundStyle, }: OrganizationIconProps): import("react/jsx-runtime").JSX.Element;
80
- //# sourceMappingURL=organization-icon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"organization-icon.d.ts","sourceRoot":"","sources":["../../../src/components/features/organization-icon.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAExB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAA;IAExB;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,CAAA;IAE7C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IAExB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAA;CAC7C;AAmCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,gBAAgB,EAChB,IAAW,EACX,SAAc,EACd,cAAqB,EACrB,eAAwB,GACzB,EAAE,qBAAqB,2CA2CvB"}
@@ -1,175 +0,0 @@
1
- 'use client'
2
-
3
- import React from 'react'
4
- import Image from 'next/image'
5
- import { cn } from "../../utils/cn"
6
- import { useAuthenticatedImage, type AuthenticatedImageConfig } from '../../hooks/use-authenticated-image'
7
-
8
- export interface OrganizationIconProps {
9
- /**
10
- * Image URL - can be:
11
- * - Pre-fetched blob URL (starts with 'blob:')
12
- * - API path (starts with '/api/')
13
- * - Full URL (starts with 'http://' or 'https://')
14
- */
15
- imageUrl?: string | null
16
-
17
- /**
18
- * Organization name for fallback initials and alt text
19
- */
20
- organizationName: string
21
-
22
- /**
23
- * Size variant (matching VendorIcon sizes)
24
- * - xs: 24px (w-6 h-6)
25
- * - sm: 32px (w-8 h-8) - for devices table
26
- * - md: 40px (w-10 h-10) - for organizations table, dashboard (default)
27
- * - lg: 48px (w-12 h-12)
28
- * - l: 56px (w-14 h-14)
29
- * - xl: 64px (w-16 h-16) - for detail views
30
- */
31
- size?: 'xs' | 'sm' | 'md' | 'lg' | 'l' | 'xl'
32
-
33
- /**
34
- * Additional CSS classes
35
- */
36
- className?: string
37
-
38
- /**
39
- * Show background container (default: true)
40
- */
41
- showBackground?: boolean
42
-
43
- /**
44
- * Background style variant (default: 'dark')
45
- */
46
- backgroundStyle?: 'dark' | 'light' | 'white'
47
- }
48
-
49
- /**
50
- * Size classes matching VendorIcon exactly
51
- */
52
- const sizeClasses = {
53
- xs: 'w-6 h-6',
54
- sm: 'w-8 h-8',
55
- md: 'w-10 h-10',
56
- lg: 'w-12 h-12',
57
- l: 'w-14 h-14',
58
- xl: 'w-16 h-16'
59
- }
60
-
61
- /**
62
- * Image size mapping matching VendorIcon exactly
63
- */
64
- const imageSizeMap = {
65
- xs: { width: 16, height: 16 },
66
- sm: { width: 20, height: 20 },
67
- md: { width: 32, height: 32 },
68
- lg: { width: 40, height: 40 },
69
- l: { width: 38, height: 38 },
70
- xl: { width: 40, height: 40 }
71
- }
72
-
73
- /**
74
- * Background style classes matching VendorIcon exactly
75
- */
76
- const backgroundClasses = {
77
- dark: 'bg-[#161616] border border-ods-border',
78
- light: 'bg-ods-card border border-ods-border',
79
- white: 'bg-white border border-[#E5E5E5]'
80
- }
81
-
82
- /**
83
- * OrganizationIcon - Reusable component for displaying organization logos
84
- *
85
- * Matches VendorIcon styling and behavior exactly for 100% visual parity.
86
- *
87
- * Features:
88
- * - **Dual-mode support:** Auto-detects pre-fetched blob URLs vs raw URLs
89
- * - **Automatic fallback:** Shows 2-letter initials if no image
90
- * - **Loading states:** Built-in loading indicator
91
- * - **Zero layout jumps:** Fixed dimensions prevent shifting
92
- * - **ODS styling:** Consistent theming with design tokens
93
- * - **Flexible sizing:** Six size variants (xs/sm/md/lg/l/xl)
94
- * - **Background variants:** dark (default), light, white
95
- *
96
- * Usage Examples:
97
- *
98
- * ```typescript
99
- * // With pre-fetched blob URL (from useBatchImages)
100
- * const fetchedImages = useBatchImages(imageUrls)
101
- * <OrganizationIcon
102
- * imageUrl={fetchedImages[org.imageUrl]}
103
- * organizationName={org.name}
104
- * size="md"
105
- * preFetched={true}
106
- * />
107
- *
108
- * // With automatic fetching (single image)
109
- * <OrganizationIcon
110
- * imageUrl={organization?.imageUrl}
111
- * organizationName={organization?.name || 'Organization'}
112
- * size="xl"
113
- * refreshKey={organization?.imageVersion}
114
- * />
115
- *
116
- * // Without background (inline with text)
117
- * <OrganizationIcon
118
- * imageUrl={org.imageUrl}
119
- * organizationName={org.name}
120
- * size="small-legacy"
121
- * showBackground={false}
122
- * />
123
- * ```
124
- */
125
- export function OrganizationIcon({
126
- imageUrl,
127
- organizationName,
128
- size = 'md',
129
- className = '',
130
- showBackground = true,
131
- backgroundStyle = 'dark',
132
- }: OrganizationIconProps) {
133
- const { width, height } = imageSizeMap[size]
134
-
135
- // Generate fallback initials (first 2 letters, matching VendorIcon)
136
- const initials = organizationName?.substring(0, 2) || '??'
137
-
138
- // Container classes matching VendorIcon exactly
139
- const containerClasses = cn(
140
- sizeClasses[size],
141
- 'rounded-lg flex items-center justify-center flex-shrink-0 relative',
142
- showBackground && backgroundClasses[backgroundStyle],
143
- !showBackground && 'overflow-hidden',
144
- className
145
- )
146
-
147
- return (
148
- <div className={containerClasses}>
149
- <div className={cn(
150
- 'flex items-center justify-center text-xs font-medium uppercase',
151
- imageUrl && 'hidden',
152
- backgroundStyle === 'white' ? 'text-ods-text-primary' : 'text-ods-text-secondary'
153
- )}>
154
- {initials}
155
- </div>
156
- {imageUrl && (
157
- <Image
158
- src={imageUrl}
159
- alt={`${initials}`}
160
- width={width}
161
- height={height}
162
- className={cn(
163
- 'absolute object-contain',
164
- showBackground ? 'p-1' : 'w-full h-full'
165
- )}
166
- onError={(e) => {
167
- e.currentTarget.style.display = 'none'
168
- const el = e.currentTarget.previousElementSibling as HTMLElement
169
- if (el) el.classList.remove('hidden')
170
- }}
171
- />
172
- )}
173
- </div>
174
- )
175
- }
@@ -1,302 +0,0 @@
1
- {
2
- "color": {
3
- "attention": {
4
- "green": {
5
- "success": {
6
- "value": "#5ea62e",
7
- "type": "color"
8
- },
9
- "success-action": {
10
- "value": "#4a921a",
11
- "type": "color"
12
- },
13
- "success-hover": {
14
- "value": "#549c24",
15
- "type": "color"
16
- },
17
- "success-secondary": {
18
- "value": "#2e461f",
19
- "type": "color"
20
- },
21
- "success-secondary-hover": {
22
- "value": "#385029",
23
- "type": "color"
24
- },
25
- "success-secondary-action": {
26
- "value": "#425a33",
27
- "type": "color"
28
- }
29
- },
30
- "red": {
31
- "error": {
32
- "value": "#f36666",
33
- "type": "color"
34
- },
35
- "error-action": {
36
- "value": "#df5252",
37
- "type": "color"
38
- },
39
- "error-hover": {
40
- "value": "#e95c5c",
41
- "type": "color"
42
- },
43
- "error-secondary": {
44
- "value": "#4a2121",
45
- "type": "color"
46
- },
47
- "error-secondary-hover": {
48
- "value": "#542b2b",
49
- "type": "color"
50
- },
51
- "error-secondary-action": {
52
- "value": "#5e3535",
53
- "type": "color"
54
- }
55
- },
56
- "yellow": {
57
- "warning": {
58
- "value": "#e1b32f",
59
- "type": "color"
60
- },
61
- "warning-action": {
62
- "value": "#cd9f1b",
63
- "type": "color"
64
- },
65
- "warning-hover": {
66
- "value": "#d7a925",
67
- "type": "color"
68
- },
69
- "warning-secondary": {
70
- "value": "#5a4d25",
71
- "type": "color"
72
- },
73
- "warning-secondary-hover": {
74
- "value": "#64572f",
75
- "type": "color"
76
- },
77
- "warning-secondary-action": {
78
- "value": "#6e6139",
79
- "type": "color"
80
- }
81
- }
82
- },
83
- "flamingo": {
84
- "cyan": {
85
- "base": {
86
- "value": "#5efaf0",
87
- "type": "color"
88
- },
89
- "action": {
90
- "value": "#4ae6dc",
91
- "type": "color"
92
- },
93
- "hover": {
94
- "value": "#54f0e6",
95
- "type": "color"
96
- },
97
- "secondary": {
98
- "value": "#058c83",
99
- "type": "color"
100
- },
101
- "secondary-hover": {
102
- "value": "#008279",
103
- "type": "color"
104
- },
105
- "secondary-action": {
106
- "value": "#00786f",
107
- "type": "color"
108
- },
109
- "dark": {
110
- "value": "#058c83",
111
- "type": "color"
112
- },
113
- "dark-action": {
114
- "value": "#00786f",
115
- "type": "color"
116
- },
117
- "dark-hover": {
118
- "value": "#008279",
119
- "type": "color"
120
- },
121
- "light": {
122
- "value": "#a1fbf5",
123
- "type": "color"
124
- },
125
- "light-action": {
126
- "value": "#8de7e1",
127
- "type": "color"
128
- },
129
- "light-hover": {
130
- "value": "#97f1eb",
131
- "type": "color"
132
- }
133
- },
134
- "pink": {
135
- "base": {
136
- "value": "#f357bb",
137
- "type": "color"
138
- },
139
- "action": {
140
- "value": "#df43a7",
141
- "type": "color"
142
- },
143
- "hover": {
144
- "value": "#e94db1",
145
- "type": "color"
146
- },
147
- "secondary": {
148
- "value": "#792b5d",
149
- "type": "color"
150
- },
151
- "secondary-hover": {
152
- "value": "#6f2153",
153
- "type": "color"
154
- },
155
- "secondary-action": {
156
- "value": "#651749",
157
- "type": "color"
158
- },
159
- "dark": {
160
- "value": "#792b5d",
161
- "type": "color"
162
- },
163
- "dark-action": {
164
- "value": "#651749",
165
- "type": "color"
166
- },
167
- "dark-hover": {
168
- "value": "#6f2153",
169
- "type": "color"
170
- },
171
- "light": {
172
- "value": "#f9abdd",
173
- "type": "color"
174
- },
175
- "light-action": {
176
- "value": "#e597c9",
177
- "type": "color"
178
- },
179
- "light-hover": {
180
- "value": "#efa1d3",
181
- "type": "color"
182
- }
183
- }
184
- },
185
- "open": {
186
- "yellow": {
187
- "base": {
188
- "value": "#ffc008",
189
- "type": "color"
190
- },
191
- "action": {
192
- "value": "#ebac00",
193
- "type": "color"
194
- },
195
- "hover": {
196
- "value": "#f5b600",
197
- "type": "color"
198
- },
199
- "secondary": {
200
- "value": "#7f6004",
201
- "type": "color"
202
- },
203
- "secondary-hover": {
204
- "value": "#755600",
205
- "type": "color"
206
- },
207
- "secondary-action": {
208
- "value": "#6b4c00",
209
- "type": "color"
210
- },
211
- "dark": {
212
- "value": "#ffe084",
213
- "type": "color"
214
- },
215
- "dark-action": {
216
- "value": "#ebcc70",
217
- "type": "color"
218
- },
219
- "dark-hover": {
220
- "value": "#f5d67a",
221
- "type": "color"
222
- },
223
- "light": {
224
- "value": "#7f6004",
225
- "type": "color"
226
- },
227
- "light-action": {
228
- "value": "#6b4c00",
229
- "type": "color"
230
- },
231
- "light-hover": {
232
- "value": "#755600",
233
- "type": "color"
234
- }
235
- }
236
- },
237
- "system": {
238
- "greys": {
239
- "background": {
240
- "value": "#161616",
241
- "type": "color"
242
- },
243
- "background-action": {
244
- "value": "#2a2a2a",
245
- "type": "color"
246
- },
247
- "background-hover": {
248
- "value": "#202020",
249
- "type": "color"
250
- },
251
- "black": {
252
- "value": "#212121",
253
- "type": "color"
254
- },
255
- "black-action": {
256
- "value": "#353535",
257
- "type": "color"
258
- },
259
- "black-hover": {
260
- "value": "#2b2b2b",
261
- "type": "color"
262
- },
263
- "grey": {
264
- "value": "#888888",
265
- "type": "color"
266
- },
267
- "grey-action": {
268
- "value": "#747474",
269
- "type": "color"
270
- },
271
- "grey-hover": {
272
- "value": "#7e7e7e",
273
- "type": "color"
274
- },
275
- "soft-grey": {
276
- "value": "#3a3a3a",
277
- "type": "color"
278
- },
279
- "soft-grey-action": {
280
- "value": "#4e4e4e",
281
- "type": "color"
282
- },
283
- "soft-grey-hover": {
284
- "value": "#444444",
285
- "type": "color"
286
- },
287
- "white": {
288
- "value": "#fafafa",
289
- "type": "color"
290
- },
291
- "white-action": {
292
- "value": "#f0f0f0",
293
- "type": "color"
294
- },
295
- "white-hover": {
296
- "value": "#f5f5f5",
297
- "type": "color"
298
- }
299
- }
300
- }
301
- }
302
- }