@knapsack/sandbox-components 4.75.2 → 4.75.3--canary.cda9f50.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.
@@ -1932,17 +1932,21 @@ body {
1932
1932
  width: 100%;
1933
1933
  margin: 0 auto;
1934
1934
  box-sizing: border-box;
1935
+ gap: 16px;
1936
+ gap: var(--spacing-large);
1937
+ }
1938
+
1939
+ .callout-content--reverse {
1940
+ flex-direction: column;
1935
1941
  }
1936
1942
 
1937
1943
  .callout-image {
1938
1944
  width: 100%;
1939
- height: auto;
1940
1945
  max-width: 100%;
1946
+ height: auto;
1941
1947
  max-height: 400px;
1942
1948
  -o-object-fit: contain;
1943
1949
  object-fit: contain;
1944
- margin-bottom: 40px;
1945
- margin-bottom: var(--spacing-xxlarge);
1946
1950
  }
1947
1951
 
1948
1952
  .callout-text-content {
@@ -1952,19 +1956,30 @@ body {
1952
1956
  box-sizing: border-box;
1953
1957
  padding: 0 12px;
1954
1958
  padding: 0 var(--spacing-medium);
1959
+ text-align: left;
1960
+ }
1961
+
1962
+ .callout-text {
1963
+ text-align: left;
1955
1964
  }
1956
1965
 
1966
+ /* Larger screens */
1967
+
1957
1968
  @media (min-width: 768px) {
1958
1969
  .callout-content {
1959
1970
  flex-direction: row;
1960
- justify-content: center;
1961
1971
  align-items: center;
1972
+ gap: 40px;
1973
+ gap: var(--spacing-xxlarge);
1974
+ }
1975
+
1976
+ .callout-content--reverse {
1977
+ flex-direction: row-reverse;
1962
1978
  }
1963
1979
 
1964
1980
  .callout-image {
1981
+ max-width: 40%;
1965
1982
  margin-bottom: 0;
1966
- margin-right: 16px;
1967
- margin-right: var(--spacing-large);
1968
1983
  }
1969
1984
 
1970
1985
  .callout-text-content {
@@ -4,6 +4,7 @@ export type CalloutProps = {
4
4
  body: string;
5
5
  children: React.ReactNode;
6
6
  imageSrc: string;
7
+ imageAlignment?: 'left' | 'right';
7
8
  };
8
- export declare const Callout: ({ heading, body, children, imageSrc, }: CalloutProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const Callout: ({ heading, body, children, imageSrc, imageAlignment, }: CalloutProps) => import("react/jsx-runtime").JSX.Element;
9
10
  //# sourceMappingURL=callout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"callout.d.ts","sourceRoot":"","sources":["../../src/react/callout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,OAAO,2CAKjB,YAAY,4CAkBd,CAAC"}
1
+ {"version":3,"file":"callout.d.ts","sourceRoot":"","sources":["../../src/react/callout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,OAAO,2DAMjB,YAAY,4CAsBd,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Text } from './text.js';
3
- export const Callout = ({ heading, body, children, imageSrc, }) => {
4
- return (_jsx("section", { className: "callout", children: _jsxs("div", { className: "callout-content", children: [_jsx("img", { className: "callout-image", src: imageSrc, alt: "Callout" }), _jsxs("div", { className: "callout-text-content", children: [_jsx(Text, { type: "headingLarge", spacingBottom: "medium", children: heading }), _jsx(Text, { type: "body", spacingBottom: "xlarge", children: body }), children] })] }) }));
3
+ export const Callout = ({ heading, body, children, imageSrc, imageAlignment = 'left', }) => {
4
+ return (_jsx("section", { className: "callout", children: _jsxs("div", { className: `callout-content ${imageAlignment === 'right' ? 'callout-content--reverse' : ''}`, children: [_jsx("img", { className: "callout-image", src: imageSrc, alt: "Callout" }), _jsxs("div", { className: "callout-text-content", children: [_jsx(Text, { type: "headingLarge", spacingBottom: "medium", children: heading }), _jsx(Text, { type: "body", spacingBottom: "xlarge", children: body }), children] })] }) }));
5
5
  };
6
6
  //# sourceMappingURL=callout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"callout.js","sourceRoot":"","sources":["../../src/react/callout.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AASjC,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EACtB,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,QAAQ,GACK,EAAE,EAAE;IACjB,OAAO,CACL,kBAAS,SAAS,EAAC,SAAS,YAC1B,eAAK,SAAS,EAAC,iBAAiB,aAC9B,cAAK,SAAS,EAAC,eAAe,EAAC,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAC,SAAS,GAAG,EAC9D,eAAK,SAAS,EAAC,sBAAsB,aACnC,KAAC,IAAI,IAAC,IAAI,EAAC,cAAc,EAAC,aAAa,EAAC,QAAQ,YAC7C,OAAO,GACH,EACP,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,EAAC,aAAa,EAAC,QAAQ,YACrC,IAAI,GACA,EAEN,QAAQ,IACL,IACF,GACE,CACX,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"callout.js","sourceRoot":"","sources":["../../src/react/callout.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAUjC,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EACtB,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,cAAc,GAAG,MAAM,GACV,EAAE,EAAE;IACjB,OAAO,CACL,kBAAS,SAAS,EAAC,SAAS,YAC1B,eACE,SAAS,EAAE,mBACT,cAAc,KAAK,OAAO,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,EAC5D,EAAE,aAEF,cAAK,SAAS,EAAC,eAAe,EAAC,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAC,SAAS,GAAG,EAC9D,eAAK,SAAS,EAAC,sBAAsB,aACnC,KAAC,IAAI,IAAC,IAAI,EAAC,cAAc,EAAC,aAAa,EAAC,QAAQ,YAC7C,OAAO,GACH,EACP,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,EAAC,aAAa,EAAC,QAAQ,YACrC,IAAI,GACA,EAEN,QAAQ,IACL,IACF,GACE,CACX,CAAC;AACJ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@knapsack/sandbox-components",
3
3
  "description": "",
4
- "version": "4.75.2",
4
+ "version": "4.75.3--canary.cda9f50.0",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  "./css": "./dist/css/ks-sandbox-styles.css",
@@ -48,11 +48,11 @@
48
48
  "vue": "^3.5.13"
49
49
  },
50
50
  "devDependencies": {
51
- "@knapsack/eslint-config-starter": "4.75.2",
52
- "@knapsack/postcss-config-starter": "4.75.2",
53
- "@knapsack/prettier-config": "4.75.2",
54
- "@knapsack/sandbox-tokens": "4.75.2",
55
- "@knapsack/typescript-config-starter": "4.75.2",
51
+ "@knapsack/eslint-config-starter": "4.75.3--canary.cda9f50.0",
52
+ "@knapsack/postcss-config-starter": "4.75.3--canary.cda9f50.0",
53
+ "@knapsack/prettier-config": "4.75.3--canary.cda9f50.0",
54
+ "@knapsack/sandbox-tokens": "4.75.3--canary.cda9f50.0",
55
+ "@knapsack/typescript-config-starter": "4.75.3--canary.cda9f50.0",
56
56
  "@types/node": "^20.17.17",
57
57
  "@types/react": "^18.3.18",
58
58
  "esbuild": "^0.24.0",
@@ -72,5 +72,5 @@
72
72
  "directory": "apps/ui/libs/sandbox-components",
73
73
  "type": "git"
74
74
  },
75
- "gitHead": "bf4e370563a958aaca1ab9e6257e9aacbfca33c2"
75
+ "gitHead": "cda9f505e28a99a25baabf8478b78066bc5a66e5"
76
76
  }
@@ -11,15 +11,19 @@
11
11
  width: 100%;
12
12
  margin: 0 auto;
13
13
  box-sizing: border-box;
14
+ gap: var(--spacing-large);
15
+ }
16
+
17
+ .callout-content--reverse {
18
+ flex-direction: column;
14
19
  }
15
20
 
16
21
  .callout-image {
17
22
  width: 100%;
18
- height: auto;
19
23
  max-width: 100%;
24
+ height: auto;
20
25
  max-height: 400px;
21
26
  object-fit: contain;
22
- margin-bottom: var(--spacing-xxlarge);
23
27
  }
24
28
 
25
29
  .callout-text-content {
@@ -28,18 +32,28 @@
28
32
  align-items: center;
29
33
  box-sizing: border-box;
30
34
  padding: 0 var(--spacing-medium);
35
+ text-align: left;
31
36
  }
32
37
 
38
+ .callout-text {
39
+ text-align: left;
40
+ }
41
+
42
+ /* Larger screens */
33
43
  @media (min-width: 768px) {
34
44
  .callout-content {
35
45
  flex-direction: row;
36
- justify-content: center;
37
46
  align-items: center;
47
+ gap: var(--spacing-xxlarge);
48
+ }
49
+
50
+ .callout-content--reverse {
51
+ flex-direction: row-reverse;
38
52
  }
39
53
 
40
54
  .callout-image {
55
+ max-width: 40%;
41
56
  margin-bottom: 0;
42
- margin-right: var(--spacing-large);
43
57
  }
44
58
 
45
59
  .callout-text-content {
@@ -6,6 +6,7 @@ export type CalloutProps = {
6
6
  body: string;
7
7
  children: React.ReactNode;
8
8
  imageSrc: string;
9
+ imageAlignment?: 'left' | 'right';
9
10
  };
10
11
 
11
12
  export const Callout = ({
@@ -13,10 +14,15 @@ export const Callout = ({
13
14
  body,
14
15
  children,
15
16
  imageSrc,
17
+ imageAlignment = 'left',
16
18
  }: CalloutProps) => {
17
19
  return (
18
20
  <section className="callout">
19
- <div className="callout-content">
21
+ <div
22
+ className={`callout-content ${
23
+ imageAlignment === 'right' ? 'callout-content--reverse' : ''
24
+ }`}
25
+ >
20
26
  <img className="callout-image" src={imageSrc} alt="Callout" />
21
27
  <div className="callout-text-content">
22
28
  <Text type="headingLarge" spacingBottom="medium">