@bwp-web/components 0.15.0 → 1.0.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.
- package/dist/BiampSegmentedButton/SegmentedButton.d.ts +10 -0
- package/dist/BiampSegmentedButton/SegmentedButton.d.ts.map +1 -0
- package/dist/BiampSegmentedButton/SegmentedButtonGroup.d.ts +8 -0
- package/dist/BiampSegmentedButton/SegmentedButtonGroup.d.ts.map +1 -0
- package/dist/BiampSegmentedButton/index.d.ts +3 -0
- package/dist/BiampSegmentedButton/index.d.ts.map +1 -0
- package/dist/index.cjs +66 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +64 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ButtonProps } from '@mui/material';
|
|
2
|
+
type Props = ButtonProps & {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
active?: boolean;
|
|
5
|
+
small?: boolean;
|
|
6
|
+
component?: React.ElementType;
|
|
7
|
+
};
|
|
8
|
+
export declare function SegmentedButton({ children, active, small, sx, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=SegmentedButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SegmentedButton.d.ts","sourceRoot":"","sources":["../../src/BiampSegmentedButton/SegmentedButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,WAAW,EAAY,MAAM,eAAe,CAAC;AAG9D,KAAK,KAAK,GAAG,WAAW,GAAG;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;CAC/B,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,MAAM,EACN,KAAK,EACL,EAAE,EACF,GAAG,KAAK,EACT,EAAE,KAAK,2CAmCP"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StackProps } from '@mui/material';
|
|
2
|
+
type Props = StackProps & {
|
|
3
|
+
children: React.ReactNode[];
|
|
4
|
+
component?: React.ElementType;
|
|
5
|
+
};
|
|
6
|
+
export declare function SegmentedButtonGroup({ children, sx, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=SegmentedButtonGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SegmentedButtonGroup.d.ts","sourceRoot":"","sources":["../../src/BiampSegmentedButton/SegmentedButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAY,MAAM,eAAe,CAAC;AAE5D,KAAK,KAAK,GAAG,UAAU,GAAG;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;CAC/B,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,2CAoBrE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/BiampSegmentedButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -67,6 +67,8 @@ __export(index_exports, {
|
|
|
67
67
|
BiampTableToolbarSearch: () => BiampTableToolbarSearch,
|
|
68
68
|
BiampTableTruncatedCell: () => BiampTableTruncatedCell,
|
|
69
69
|
BiampWrapper: () => BiampWrapper,
|
|
70
|
+
SegmentedButton: () => SegmentedButton,
|
|
71
|
+
SegmentedButtonGroup: () => SegmentedButtonGroup,
|
|
70
72
|
buildCsvString: () => buildCsvString,
|
|
71
73
|
exportToCsv: () => exportToCsv,
|
|
72
74
|
getColumnVisibilityDirtyCount: () => getColumnVisibilityDirtyCount,
|
|
@@ -1908,6 +1910,68 @@ function BiampBannerContent({ children, ...props }) {
|
|
|
1908
1910
|
function BiampBannerActions({ children, ...props }) {
|
|
1909
1911
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_material18.Box, { display: "flex", gap: 1, alignItems: "center", ...props, children });
|
|
1910
1912
|
}
|
|
1913
|
+
|
|
1914
|
+
// src/BiampSegmentedButton/SegmentedButton.tsx
|
|
1915
|
+
var import_material19 = require("@mui/material");
|
|
1916
|
+
var import_styles = require("@mui/material/styles");
|
|
1917
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1918
|
+
function SegmentedButton({
|
|
1919
|
+
children,
|
|
1920
|
+
active,
|
|
1921
|
+
small,
|
|
1922
|
+
sx,
|
|
1923
|
+
...props
|
|
1924
|
+
}) {
|
|
1925
|
+
const theme = (0, import_material19.useTheme)();
|
|
1926
|
+
const isDarkMode = theme.palette.mode === "dark";
|
|
1927
|
+
const backgroundColor = active ? isDarkMode ? theme.palette.grey[900] : theme.palette.common.white : "transparent";
|
|
1928
|
+
const textColor = active ? theme.palette.text.primary : theme.palette.text.secondary;
|
|
1929
|
+
const border = active ? "solid" : void 0;
|
|
1930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1931
|
+
import_material19.Button,
|
|
1932
|
+
{
|
|
1933
|
+
sx: {
|
|
1934
|
+
backgroundColor,
|
|
1935
|
+
color: textColor,
|
|
1936
|
+
borderRadius: "4px",
|
|
1937
|
+
border,
|
|
1938
|
+
borderColor: "divider",
|
|
1939
|
+
lineHeight: 1.5,
|
|
1940
|
+
px: 1.5,
|
|
1941
|
+
py: 0,
|
|
1942
|
+
height: small ? "22px" : "26px",
|
|
1943
|
+
...small && { fontSize: "12px", letterSpacing: "-0.24px" },
|
|
1944
|
+
boxShadow: active ? `0 1px 2px 0 ${(0, import_styles.alpha)(theme.palette.common.black, 0.05)} !important` : "none !important",
|
|
1945
|
+
...sx
|
|
1946
|
+
},
|
|
1947
|
+
...props,
|
|
1948
|
+
children
|
|
1949
|
+
}
|
|
1950
|
+
);
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
// src/BiampSegmentedButton/SegmentedButtonGroup.tsx
|
|
1954
|
+
var import_material20 = require("@mui/material");
|
|
1955
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1956
|
+
function SegmentedButtonGroup({ children, sx, ...props }) {
|
|
1957
|
+
const theme = (0, import_material20.useTheme)();
|
|
1958
|
+
const isDarkMode = theme.palette.mode === "dark";
|
|
1959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1960
|
+
import_material20.Stack,
|
|
1961
|
+
{
|
|
1962
|
+
direction: "row",
|
|
1963
|
+
p: 0.5,
|
|
1964
|
+
borderRadius: "6px",
|
|
1965
|
+
gap: 1,
|
|
1966
|
+
sx: {
|
|
1967
|
+
backgroundColor: isDarkMode ? theme.palette.grey[800] : theme.palette.grey[100],
|
|
1968
|
+
...sx
|
|
1969
|
+
},
|
|
1970
|
+
...props,
|
|
1971
|
+
children
|
|
1972
|
+
}
|
|
1973
|
+
);
|
|
1974
|
+
}
|
|
1911
1975
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1912
1976
|
0 && (module.exports = {
|
|
1913
1977
|
BIAMP_TABLE_DEBOUNCE_DELAY,
|
|
@@ -1947,6 +2011,8 @@ function BiampBannerActions({ children, ...props }) {
|
|
|
1947
2011
|
BiampTableToolbarSearch,
|
|
1948
2012
|
BiampTableTruncatedCell,
|
|
1949
2013
|
BiampWrapper,
|
|
2014
|
+
SegmentedButton,
|
|
2015
|
+
SegmentedButtonGroup,
|
|
1950
2016
|
buildCsvString,
|
|
1951
2017
|
exportToCsv,
|
|
1952
2018
|
getColumnVisibilityDirtyCount,
|