@bwp-web/components 1.0.6 → 1.0.8
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 +9 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -4
- 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
|
@@ -731,7 +731,9 @@ function BiampAppPopover({
|
|
|
731
731
|
sx: {
|
|
732
732
|
borderRadius: "16px",
|
|
733
733
|
backgroundImage: "none",
|
|
734
|
-
|
|
734
|
+
outlineWidth: "0.6px",
|
|
735
|
+
outlineStyle: "solid",
|
|
736
|
+
outlineColor: ({ palette }) => palette.divider,
|
|
735
737
|
boxShadow: ({ palette }) => `0px 4px 24px 0px ${(0, import_material3.alpha)(palette.common.black, 0.15)};`
|
|
736
738
|
}
|
|
737
739
|
}
|
|
@@ -829,6 +831,7 @@ function BiampAppDialogItem({
|
|
|
829
831
|
function BiampHeaderProfile({
|
|
830
832
|
image,
|
|
831
833
|
selected,
|
|
834
|
+
children,
|
|
832
835
|
sx,
|
|
833
836
|
...props
|
|
834
837
|
}) {
|
|
@@ -849,7 +852,7 @@ function BiampHeaderProfile({
|
|
|
849
852
|
...sx
|
|
850
853
|
},
|
|
851
854
|
...props,
|
|
852
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
855
|
+
children: image ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
853
856
|
import_material3.Box,
|
|
854
857
|
{
|
|
855
858
|
component: "img",
|
|
@@ -862,7 +865,7 @@ function BiampHeaderProfile({
|
|
|
862
865
|
border: ({ palette }) => `0.6px solid var(--Divider-divider_primary, ${(0, import_material3.alpha)(palette.background.paper, 0.15)})`
|
|
863
866
|
}
|
|
864
867
|
}
|
|
865
|
-
)
|
|
868
|
+
) : children
|
|
866
869
|
}
|
|
867
870
|
);
|
|
868
871
|
}
|
|
@@ -2702,12 +2705,14 @@ var import_styles2 = require("@mui/material/styles");
|
|
|
2702
2705
|
var import_randomcolor = __toESM(require_randomColor(), 1);
|
|
2703
2706
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2704
2707
|
var DEFAULT_SIZE = 40;
|
|
2708
|
+
var DEFAULT_BORDER_RADIUS = 1.5;
|
|
2705
2709
|
var TEXT_RATIO = 0.4;
|
|
2706
2710
|
function UserInitialsIcon({
|
|
2707
2711
|
name,
|
|
2708
2712
|
id,
|
|
2709
2713
|
width = DEFAULT_SIZE,
|
|
2710
2714
|
height = DEFAULT_SIZE,
|
|
2715
|
+
borderRadius = DEFAULT_BORDER_RADIUS,
|
|
2711
2716
|
sx,
|
|
2712
2717
|
...props
|
|
2713
2718
|
}) {
|
|
@@ -2723,7 +2728,7 @@ function UserInitialsIcon({
|
|
|
2723
2728
|
width,
|
|
2724
2729
|
minHeight: height,
|
|
2725
2730
|
height,
|
|
2726
|
-
borderRadius
|
|
2731
|
+
borderRadius,
|
|
2727
2732
|
bgcolor: bgColor,
|
|
2728
2733
|
display: "flex",
|
|
2729
2734
|
alignItems: "center",
|