@bwp-web/components 0.13.6 → 0.14.0

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.
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ import { BoxProps, TypographyProps, type AlertColor } from '@mui/material';
3
+ export type BiampBannerProps = {
4
+ show: boolean;
5
+ children: React.ReactNode;
6
+ severity: AlertColor;
7
+ };
8
+ /**
9
+ * A full-width notification banner that slides in/out with a Collapse animation.
10
+ * Uses MUI's AlertColor severity to set background and text colors from the theme.
11
+ * Compose with `BiampBannerIcon`, `BiampBannerContent`, and `BiampBannerActions`.
12
+ */
13
+ export declare function BiampBanner({ show, children, severity }: BiampBannerProps): import("react/jsx-runtime").JSX.Element;
14
+ export type BiampBannerIconProps = {
15
+ severity?: AlertColor;
16
+ children?: React.ReactNode;
17
+ };
18
+ /**
19
+ * Icon slot for `BiampBanner`. Pass a `severity` to render the matching
20
+ * default icon, or pass `children` to render a custom icon.
21
+ */
22
+ export declare function BiampBannerIcon({ severity, children }: BiampBannerIconProps): import("react/jsx-runtime").JSX.Element;
23
+ /**
24
+ * Content slot for `BiampBanner`. Text is centered by default.
25
+ */
26
+ export declare function BiampBannerContent({ children, ...props }: TypographyProps): import("react/jsx-runtime").JSX.Element;
27
+ /**
28
+ * Actions slot for `BiampBanner`. Renders children in a horizontal flex row
29
+ * with 8px gap, aligned to the trailing edge of the banner.
30
+ */
31
+ export declare function BiampBannerActions({ children, ...props }: BoxProps): import("react/jsx-runtime").JSX.Element;
32
+ //# sourceMappingURL=BiampBanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BiampBanner.d.ts","sourceRoot":"","sources":["../../src/BiampBanner/BiampBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,QAAQ,EAGR,eAAe,EACf,KAAK,UAAU,EAChB,MAAM,eAAe,CAAC;AAQvB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,UAAU,CAAC;CACtB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,gBAAgB,2CAqBzE;AAUD,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,oBAAoB,2CAE3E;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAMzE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,QAAQ,2CAMlE"}
@@ -0,0 +1,2 @@
1
+ export { BiampBanner, BiampBannerIcon, BiampBannerContent, BiampBannerActions, type BiampBannerProps, type BiampBannerIconProps, } from './BiampBanner';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/BiampBanner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,GAC1B,MAAM,eAAe,CAAC"}
package/dist/index.cjs CHANGED
@@ -34,6 +34,10 @@ __export(index_exports, {
34
34
  BiampAppDialog: () => BiampAppDialog,
35
35
  BiampAppDialogItem: () => BiampAppDialogItem,
36
36
  BiampAppPopover: () => BiampAppPopover,
37
+ BiampBanner: () => BiampBanner,
38
+ BiampBannerActions: () => BiampBannerActions,
39
+ BiampBannerContent: () => BiampBannerContent,
40
+ BiampBannerIcon: () => BiampBannerIcon,
37
41
  BiampHeader: () => BiampHeader,
38
42
  BiampHeaderActions: () => BiampHeaderActions,
39
43
  BiampHeaderButton: () => BiampHeaderButton,
@@ -1865,12 +1869,55 @@ function downloadCsv(csvContent, filename) {
1865
1869
  document.body.removeChild(link);
1866
1870
  URL.revokeObjectURL(url);
1867
1871
  }
1872
+
1873
+ // src/BiampBanner/BiampBanner.tsx
1874
+ var import_material18 = require("@mui/material");
1875
+ var import_assets10 = require("@bwp-web/assets");
1876
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1877
+ function BiampBanner({ show, children, severity }) {
1878
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_material18.Collapse, { in: show, unmountOnExit: true, component: "aside", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1879
+ import_material18.Box,
1880
+ {
1881
+ bgcolor: ({ palette }) => palette.background[severity],
1882
+ display: "flex",
1883
+ flexDirection: "row",
1884
+ alignItems: "center",
1885
+ justifyContent: "space-between",
1886
+ gap: 1,
1887
+ px: { xs: 2, sm: 2.5 },
1888
+ minHeight: 48,
1889
+ sx: {
1890
+ borderBottom: ({ palette }) => `0.6px solid ${palette[severity].main}`
1891
+ },
1892
+ children
1893
+ }
1894
+ ) });
1895
+ }
1896
+ var iconMapping = {
1897
+ error: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_assets10.ErrorStatusIcon, { color: "error", sx: { width: 14, height: 14 } }),
1898
+ warning: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_assets10.WarningStatusIcon, { color: "warning", sx: { width: 16, height: 14 } }),
1899
+ success: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_assets10.SuccessStatusIcon, { color: "success", sx: { width: 14, height: 14 } }),
1900
+ info: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_assets10.InfoStatusIcon, { color: "info", sx: { width: 14, height: 14 } })
1901
+ };
1902
+ function BiampBannerIcon({ severity, children }) {
1903
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_jsx_runtime21.Fragment, { children: severity ? iconMapping[severity] : children });
1904
+ }
1905
+ function BiampBannerContent({ children, ...props }) {
1906
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_material18.Typography, { textAlign: "center", variant: "h3", ...props, children });
1907
+ }
1908
+ function BiampBannerActions({ children, ...props }) {
1909
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_material18.Box, { display: "flex", gap: 1, alignItems: "center", ...props, children });
1910
+ }
1868
1911
  // Annotate the CommonJS export names for ESM import in node:
1869
1912
  0 && (module.exports = {
1870
1913
  BIAMP_TABLE_DEBOUNCE_DELAY,
1871
1914
  BiampAppDialog,
1872
1915
  BiampAppDialogItem,
1873
1916
  BiampAppPopover,
1917
+ BiampBanner,
1918
+ BiampBannerActions,
1919
+ BiampBannerContent,
1920
+ BiampBannerIcon,
1874
1921
  BiampHeader,
1875
1922
  BiampHeaderActions,
1876
1923
  BiampHeaderButton,