@bwp-web/components 1.0.6 → 1.0.7
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/README.md +9 -1
- package/dist/BiampHeader/BiampHeader.d.ts +4 -3
- package/dist/BiampHeader/BiampHeader.d.ts.map +1 -1
- package/dist/UserInitialsIcon/UserInitialsIcon.d.ts +1 -1
- package/dist/UserInitialsIcon/UserInitialsIcon.d.ts.map +1 -1
- package/dist/index.cjs +6 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ For `BiampTable` only:
|
|
|
36
36
|
| `BiampHeaderActions` | Flex container for grouping action buttons and profile |
|
|
37
37
|
| `BiampHeaderButtonList` | Horizontal list with 4px gaps for header buttons |
|
|
38
38
|
| `BiampHeaderButton` | Selectable 40×40px icon button for header actions |
|
|
39
|
-
| `BiampHeaderProfile` | Profile image
|
|
39
|
+
| `BiampHeaderProfile` | Profile button with image or custom children (e.g. `UserInitialsIcon`) |
|
|
40
40
|
| `BiampAppPopover` | Styled popover for the app-launcher dialog |
|
|
41
41
|
| `BiampAppDialog` | Rounded dialog container for app-launcher grid |
|
|
42
42
|
| `BiampAppDialogItem` | Clickable app tile with children content and label |
|
|
@@ -217,6 +217,14 @@ Horizontal header container. Compose with `BiampHeaderTitle`, `BiampHeaderSearch
|
|
|
217
217
|
| `title` | `string` | Optional title text |
|
|
218
218
|
| `subtitle` | `string` | Optional subtitle text |
|
|
219
219
|
|
|
220
|
+
#### BiampHeaderProfile Props
|
|
221
|
+
|
|
222
|
+
| Prop | Type | Description |
|
|
223
|
+
| ---------- | ----------------- | ---------------------------------------------------------------------- |
|
|
224
|
+
| `image` | `string` | Optional profile image URL; when omitted, `children` are rendered |
|
|
225
|
+
| `children` | `React.ReactNode` | Fallback content when no `image` is provided (e.g. `UserInitialsIcon`) |
|
|
226
|
+
| `selected` | `boolean` | Whether the profile button is currently selected |
|
|
227
|
+
|
|
220
228
|
### UserInitialsIcon
|
|
221
229
|
|
|
222
230
|
An avatar-style icon that displays a user's initials over a deterministic background color. The color is seeded by the user's `id`, so the same user always gets the same color. The icon scales proportionally — font size adjusts automatically with `width`/`height`.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BoxProps, ListItemButtonProps, PopoverProps, StackProps, TextFieldProps } from '@mui/material';
|
|
2
|
-
import { JSX } from 'react';
|
|
2
|
+
import { JSX, ReactNode } from 'react';
|
|
3
3
|
type BiampHeaderProps = StackProps & {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
};
|
|
@@ -40,9 +40,10 @@ type BiampAppDialogItemProps = BoxProps & {
|
|
|
40
40
|
};
|
|
41
41
|
export declare function BiampAppDialogItem({ children, name, sx, ...props }: BiampAppDialogItemProps): import("react/jsx-runtime").JSX.Element;
|
|
42
42
|
type BiampHeaderProfileProps = ListItemButtonProps & {
|
|
43
|
-
image
|
|
43
|
+
image?: string;
|
|
44
|
+
children?: ReactNode;
|
|
44
45
|
selected?: boolean;
|
|
45
46
|
};
|
|
46
|
-
export declare function BiampHeaderProfile({ image, selected, sx, ...props }: BiampHeaderProfileProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export declare function BiampHeaderProfile({ image, selected, children, sx, ...props }: BiampHeaderProfileProps): import("react/jsx-runtime").JSX.Element;
|
|
47
48
|
export {};
|
|
48
49
|
//# sourceMappingURL=BiampHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BiampHeader.d.ts","sourceRoot":"","sources":["../../src/BiampHeader/BiampHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,EAGR,mBAAmB,EAEnB,YAAY,EAEZ,UAAU,EAEV,cAAc,EAEf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Bi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 -3,6 +3,6 @@ type Props = BoxProps & {
|
|
|
3
3
|
name: string;
|
|
4
4
|
id: string;
|
|
5
5
|
};
|
|
6
|
-
export declare function UserInitialsIcon({ name, id, width, height, sx, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function UserInitialsIcon({ name, id, width, height, borderRadius, sx, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=UserInitialsIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserInitialsIcon.d.ts","sourceRoot":"","sources":["../../src/UserInitialsIcon/UserInitialsIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,QAAQ,EAAc,MAAM,eAAe,CAAC;AAI1D,KAAK,KAAK,GAAG,QAAQ,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;
|
|
1
|
+
{"version":3,"file":"UserInitialsIcon.d.ts","sourceRoot":"","sources":["../../src/UserInitialsIcon/UserInitialsIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,QAAQ,EAAc,MAAM,eAAe,CAAC;AAI1D,KAAK,KAAK,GAAG,QAAQ,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAMF,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,EAAE,EACF,KAAoB,EACpB,MAAqB,EACrB,YAAoC,EACpC,EAAE,EACF,GAAG,KAAK,EACT,EAAE,KAAK,2CAkCP"}
|
package/dist/index.cjs
CHANGED
|
@@ -829,6 +829,7 @@ function BiampAppDialogItem({
|
|
|
829
829
|
function BiampHeaderProfile({
|
|
830
830
|
image,
|
|
831
831
|
selected,
|
|
832
|
+
children,
|
|
832
833
|
sx,
|
|
833
834
|
...props
|
|
834
835
|
}) {
|
|
@@ -849,7 +850,7 @@ function BiampHeaderProfile({
|
|
|
849
850
|
...sx
|
|
850
851
|
},
|
|
851
852
|
...props,
|
|
852
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
853
|
+
children: image ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
853
854
|
import_material3.Box,
|
|
854
855
|
{
|
|
855
856
|
component: "img",
|
|
@@ -862,7 +863,7 @@ function BiampHeaderProfile({
|
|
|
862
863
|
border: ({ palette }) => `0.6px solid var(--Divider-divider_primary, ${(0, import_material3.alpha)(palette.background.paper, 0.15)})`
|
|
863
864
|
}
|
|
864
865
|
}
|
|
865
|
-
)
|
|
866
|
+
) : children
|
|
866
867
|
}
|
|
867
868
|
);
|
|
868
869
|
}
|
|
@@ -2702,12 +2703,14 @@ var import_styles2 = require("@mui/material/styles");
|
|
|
2702
2703
|
var import_randomcolor = __toESM(require_randomColor(), 1);
|
|
2703
2704
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2704
2705
|
var DEFAULT_SIZE = 40;
|
|
2706
|
+
var DEFAULT_BORDER_RADIUS = 1.5;
|
|
2705
2707
|
var TEXT_RATIO = 0.4;
|
|
2706
2708
|
function UserInitialsIcon({
|
|
2707
2709
|
name,
|
|
2708
2710
|
id,
|
|
2709
2711
|
width = DEFAULT_SIZE,
|
|
2710
2712
|
height = DEFAULT_SIZE,
|
|
2713
|
+
borderRadius = DEFAULT_BORDER_RADIUS,
|
|
2711
2714
|
sx,
|
|
2712
2715
|
...props
|
|
2713
2716
|
}) {
|
|
@@ -2723,7 +2726,7 @@ function UserInitialsIcon({
|
|
|
2723
2726
|
width,
|
|
2724
2727
|
minHeight: height,
|
|
2725
2728
|
height,
|
|
2726
|
-
borderRadius
|
|
2729
|
+
borderRadius,
|
|
2727
2730
|
bgcolor: bgColor,
|
|
2728
2731
|
display: "flex",
|
|
2729
2732
|
alignItems: "center",
|