@gobolt/genesis 0.4.25 → 0.4.26

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.
@@ -9,6 +9,7 @@ export interface MessageProps {
9
9
  message: string;
10
10
  action?: MessageAction;
11
11
  size?: Extract<keyof typeof SIZE, "small" | "standard">;
12
+ isFullWidth?: boolean;
12
13
  }
13
- declare const Message: ({ state, message, action, size, }: MessageProps) => import("react/jsx-runtime").JSX.Element;
14
+ declare const Message: ({ state, message, action, size, isFullWidth, }: MessageProps) => import("react/jsx-runtime").JSX.Element;
14
15
  export default Message;
@@ -1,9 +1,11 @@
1
1
  export declare const MessageRow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
2
2
  state: string;
3
3
  size: string;
4
+ isFullWidth: boolean;
4
5
  }>> & string;
5
6
  export declare const MessageContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
6
7
  size?: string;
7
8
  action?: unknown;
9
+ isFullWidth?: boolean;
8
10
  }>> & string;
9
11
  export declare const ActionButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
package/dist/index.cjs CHANGED
@@ -78958,7 +78958,7 @@ const MessageRow = styled.div`
78958
78958
  gap: ${({ theme }) => theme.sizing.Size4}px;
78959
78959
  padding: ${({ theme }) => theme.sizing.Size3}px;
78960
78960
  background-color: ${({ theme, state }) => theme.colors.status[state].surface};
78961
- width: ${({ theme, state, size }) => size === "standard" ? "320px" : "240px"};
78961
+ width: ${({ theme, state, size, isFullWidth }) => isFullWidth ? "100%" : size === "standard" ? "320px" : "240px"};
78962
78962
  pointer-events: none;
78963
78963
  cursor: default;
78964
78964
  border-radius: ${({ theme }) => theme.borderRadius.BorderRadiusSm}px;
@@ -78968,7 +78968,7 @@ const MessageContent = styled.div`
78968
78968
  align-items: center;
78969
78969
  gap: ${({ theme }) => theme.sizing.Size2}px;
78970
78970
  flex: 1;
78971
- max-width: ${({ size, action }) => size === "standard" || !action ? "320px" : "240px"};
78971
+ max-width: ${({ size, action, isFullWidth }) => isFullWidth ? "100%" : size === "standard" || !action ? "320px" : "240px"};
78972
78972
 
78973
78973
  .ant-typography {
78974
78974
  display: -webkit-box;
@@ -79035,7 +79035,8 @@ const Message = ({
79035
79035
  state = STATE.info,
79036
79036
  message: message2,
79037
79037
  action,
79038
- size = SIZE.standard
79038
+ size = SIZE.standard,
79039
+ isFullWidth = false
79039
79040
  }) => {
79040
79041
  const theme = styled.useTheme();
79041
79042
  const color2 = getIconColor$1(state, theme);
@@ -79043,8 +79044,8 @@ const Message = ({
79043
79044
  const [linkColor, setLinkColor] = React.useState(
79044
79045
  theme.colors.interactive.link.active
79045
79046
  );
79046
- return /* @__PURE__ */ jsxRuntime.jsxs(MessageRow, { state, size, children: [
79047
- /* @__PURE__ */ jsxRuntime.jsxs(MessageContent, { action, size, children: [
79047
+ return /* @__PURE__ */ jsxRuntime.jsxs(MessageRow, { state, size, isFullWidth, children: [
79048
+ /* @__PURE__ */ jsxRuntime.jsxs(MessageContent, { action, size, isFullWidth, children: [
79048
79049
  getIcon(state, color2),
79049
79050
  /* @__PURE__ */ jsxRuntime.jsx(
79050
79051
  Typography,
@@ -81612,7 +81613,7 @@ const Progress = ({
81612
81613
  ] });
81613
81614
  }
81614
81615
  if (isProgressCombined) {
81615
- const combinedPercent = getCombinedPercent(firstBarData, secondBarData);
81616
+ const combinedPercent = getCombinedPercent(firstBarData, secondBarData || null);
81616
81617
  const textColor = Number(combinedPercent) === 100 ? "green" : "black";
81617
81618
  const adjustedFirstBar = secondBarData?.value === 100 ? 100 : firstBarData?.value || 0;
81618
81619
  const firstBarStrokeColor = theme?.colors?.inputs?.progress?.[firstBarData?.status || "info"];
@@ -86753,7 +86754,7 @@ const mockColumns = [
86753
86754
  const textColor = record.isSelected ? "white" : "#6c6c6c";
86754
86755
  return React.createElement(Typography, {
86755
86756
  variant: "body2",
86756
- children: address,
86757
+ children: typeof address === "string" ? address : JSON.stringify(address),
86757
86758
  color: `${textColor}`
86758
86759
  });
86759
86760
  }
package/dist/index.js CHANGED
@@ -78940,7 +78940,7 @@ const MessageRow = styled.div`
78940
78940
  gap: ${({ theme }) => theme.sizing.Size4}px;
78941
78941
  padding: ${({ theme }) => theme.sizing.Size3}px;
78942
78942
  background-color: ${({ theme, state }) => theme.colors.status[state].surface};
78943
- width: ${({ theme, state, size }) => size === "standard" ? "320px" : "240px"};
78943
+ width: ${({ theme, state, size, isFullWidth }) => isFullWidth ? "100%" : size === "standard" ? "320px" : "240px"};
78944
78944
  pointer-events: none;
78945
78945
  cursor: default;
78946
78946
  border-radius: ${({ theme }) => theme.borderRadius.BorderRadiusSm}px;
@@ -78950,7 +78950,7 @@ const MessageContent = styled.div`
78950
78950
  align-items: center;
78951
78951
  gap: ${({ theme }) => theme.sizing.Size2}px;
78952
78952
  flex: 1;
78953
- max-width: ${({ size, action }) => size === "standard" || !action ? "320px" : "240px"};
78953
+ max-width: ${({ size, action, isFullWidth }) => isFullWidth ? "100%" : size === "standard" || !action ? "320px" : "240px"};
78954
78954
 
78955
78955
  .ant-typography {
78956
78956
  display: -webkit-box;
@@ -79017,7 +79017,8 @@ const Message = ({
79017
79017
  state = STATE.info,
79018
79018
  message: message2,
79019
79019
  action,
79020
- size = SIZE.standard
79020
+ size = SIZE.standard,
79021
+ isFullWidth = false
79021
79022
  }) => {
79022
79023
  const theme = useTheme$1();
79023
79024
  const color2 = getIconColor$1(state, theme);
@@ -79025,8 +79026,8 @@ const Message = ({
79025
79026
  const [linkColor, setLinkColor] = useState(
79026
79027
  theme.colors.interactive.link.active
79027
79028
  );
79028
- return /* @__PURE__ */ jsxs(MessageRow, { state, size, children: [
79029
- /* @__PURE__ */ jsxs(MessageContent, { action, size, children: [
79029
+ return /* @__PURE__ */ jsxs(MessageRow, { state, size, isFullWidth, children: [
79030
+ /* @__PURE__ */ jsxs(MessageContent, { action, size, isFullWidth, children: [
79030
79031
  getIcon(state, color2),
79031
79032
  /* @__PURE__ */ jsx(
79032
79033
  Typography,
@@ -81594,7 +81595,7 @@ const Progress = ({
81594
81595
  ] });
81595
81596
  }
81596
81597
  if (isProgressCombined) {
81597
- const combinedPercent = getCombinedPercent(firstBarData, secondBarData);
81598
+ const combinedPercent = getCombinedPercent(firstBarData, secondBarData || null);
81598
81599
  const textColor = Number(combinedPercent) === 100 ? "green" : "black";
81599
81600
  const adjustedFirstBar = secondBarData?.value === 100 ? 100 : firstBarData?.value || 0;
81600
81601
  const firstBarStrokeColor = theme?.colors?.inputs?.progress?.[firstBarData?.status || "info"];
@@ -86735,7 +86736,7 @@ const mockColumns = [
86735
86736
  const textColor = record.isSelected ? "white" : "#6c6c6c";
86736
86737
  return React__default.createElement(Typography, {
86737
86738
  variant: "body2",
86738
- children: address,
86739
+ children: typeof address === "string" ? address : JSON.stringify(address),
86739
86740
  color: `${textColor}`
86740
86741
  });
86741
86742
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobolt/genesis",
3
- "version": "0.4.25",
3
+ "version": "0.4.26",
4
4
  "description": "genesis design system",
5
5
  "author": "gobolt",
6
6
  "license": "MIT",