@flamingo-stack/openframe-frontend-core 0.0.200-snapshot.20260520171313 → 0.0.200
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/{chunk-UCY537V4.cjs → chunk-C3M6R6JH.cjs} +527 -477
- package/dist/chunk-C3M6R6JH.cjs.map +1 -0
- package/dist/{chunk-55HF462A.js → chunk-TMD44IKJ.js} +2 -2
- package/dist/{chunk-3B43AHYE.cjs.map → chunk-TMD44IKJ.js.map} +1 -1
- package/dist/{chunk-3B43AHYE.cjs → chunk-V2FNIPZJ.cjs} +2 -2
- package/dist/chunk-V2FNIPZJ.cjs.map +1 -0
- package/dist/{chunk-CSW5GYBU.js → chunk-ZOM75JOY.js} +765 -715
- package/dist/chunk-ZOM75JOY.js.map +1 -0
- package/dist/components/features/index.cjs +5 -3
- package/dist/components/features/index.cjs.map +1 -1
- package/dist/components/features/index.d.ts +1 -0
- package/dist/components/features/index.d.ts.map +1 -1
- package/dist/components/features/index.js +4 -2
- package/dist/components/features/organization-icon.d.ts +80 -0
- package/dist/components/features/organization-icon.d.ts.map +1 -0
- package/dist/components/index.cjs +3 -3
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +4 -4
- package/dist/components/layout/title-block.d.ts.map +1 -1
- package/dist/components/navigation/index.cjs +3 -3
- package/dist/components/navigation/index.js +2 -2
- package/dist/components/ui/file-manager/index.cjs +50 -50
- package/dist/components/ui/file-manager/index.js +1 -1
- package/dist/components/ui/index.cjs +3 -5
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.d.ts +0 -1
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +2 -4
- package/dist/components/ui/organization-card.d.ts.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -4
- package/package.json +1 -1
- package/src/components/features/index.ts +1 -0
- package/src/components/features/organization-icon.tsx +175 -0
- package/src/components/layout/title-block.tsx +30 -6
- package/src/components/ui/button/button.tsx +1 -1
- package/src/components/ui/checkbox-block.tsx +13 -13
- package/src/components/ui/index.ts +0 -1
- package/src/components/ui/organization-card.tsx +8 -4
- package/src/stories/CheckboxBlock.stories.tsx +3 -1
- package/src/stories/OrganizationCard.stories.tsx +0 -14
- package/dist/chunk-55HF462A.js.map +0 -1
- package/dist/chunk-CSW5GYBU.js.map +0 -1
- package/dist/chunk-UCY537V4.cjs.map +0 -1
- package/dist/components/ui/entity-image.d.ts +0 -9
- package/dist/components/ui/entity-image.d.ts.map +0 -1
- package/src/components/ui/entity-image.tsx +0 -56
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export interface EntityImageProps {
|
|
2
|
-
src?: string | null;
|
|
3
|
-
alt?: string;
|
|
4
|
-
/** Overrides the initials source. Defaults to `alt`. */
|
|
5
|
-
fallbackText?: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function EntityImage({ src, alt, fallbackText, className }: EntityImageProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
//# sourceMappingURL=entity-image.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entity-image.d.ts","sourceRoot":"","sources":["../../../src/components/ui/entity-image.tsx"],"names":[],"mappings":"AAYA,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,WAAW,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,gBAAgB,2CAmClF"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import React from 'react'
|
|
4
|
-
import { cn } from '../../utils/cn'
|
|
5
|
-
|
|
6
|
-
function getInitials(name?: string): string {
|
|
7
|
-
if (!name) return ''
|
|
8
|
-
const words = name.trim().split(/\s+/)
|
|
9
|
-
if (words.length === 1) return words[0].charAt(0).toUpperCase()
|
|
10
|
-
return (words[0].charAt(0) + words[words.length - 1].charAt(0)).toUpperCase()
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface EntityImageProps {
|
|
14
|
-
src?: string | null
|
|
15
|
-
alt?: string
|
|
16
|
-
/** Overrides the initials source. Defaults to `alt`. */
|
|
17
|
-
fallbackText?: string
|
|
18
|
-
className?: string
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function EntityImage({ src, alt, fallbackText, className }: EntityImageProps) {
|
|
22
|
-
const [imageFailed, setImageFailed] = React.useState(false)
|
|
23
|
-
|
|
24
|
-
React.useEffect(() => {
|
|
25
|
-
setImageFailed(false)
|
|
26
|
-
}, [src])
|
|
27
|
-
|
|
28
|
-
const showFallback = imageFailed || !src
|
|
29
|
-
const initials = getInitials(fallbackText ?? alt)
|
|
30
|
-
|
|
31
|
-
if (showFallback) {
|
|
32
|
-
return (
|
|
33
|
-
<div
|
|
34
|
-
aria-label={alt}
|
|
35
|
-
className={cn(
|
|
36
|
-
'size-[52px] md:size-[60px] shrink-0 rounded-md border border-ods-border bg-ods-bg flex items-center justify-center text-ods-text-secondary text-h4 select-none',
|
|
37
|
-
className,
|
|
38
|
-
)}
|
|
39
|
-
>
|
|
40
|
-
{initials || '?'}
|
|
41
|
-
</div>
|
|
42
|
-
)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return (
|
|
46
|
-
<img
|
|
47
|
-
src={src ?? undefined}
|
|
48
|
-
alt={alt ?? ''}
|
|
49
|
-
onError={() => setImageFailed(true)}
|
|
50
|
-
className={cn(
|
|
51
|
-
'size-[52px] md:size-[60px] shrink-0 rounded-md border border-ods-border object-cover',
|
|
52
|
-
className,
|
|
53
|
-
)}
|
|
54
|
-
/>
|
|
55
|
-
)
|
|
56
|
-
}
|