@squiz/generic-browser-lib 1.56.1-alpha.3 → 1.56.1-alpha.31
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/lib/Modal/Modal.js
CHANGED
@@ -33,7 +33,7 @@ const react_aria_1 = require("react-aria");
|
|
33
33
|
function ModalContent({ children, ...props }) {
|
34
34
|
const ref = (0, react_1.useRef)(null);
|
35
35
|
const { dialogProps, titleProps } = (0, react_aria_1.useDialog)(props, ref);
|
36
|
-
return (react_1.default.createElement("div", { ...dialogProps, ref: ref, className: "z-50 relative bg-white rounded-lg h-screen lg:h-[calc(100vh-
|
36
|
+
return (react_1.default.createElement("div", { ...dialogProps, ref: ref, className: "z-50 relative bg-white rounded-lg h-screen lg:h-[calc(100vh-9rem)] w-screen max-w-[50rem] outline-0" }, children(titleProps)));
|
37
37
|
}
|
38
38
|
function Modal({ isDismissable, state, overlayProps, children, scope, ...props }) {
|
39
39
|
const ref = (0, react_1.useRef)(null);
|
@@ -43,7 +43,7 @@ const PreviewPanel = function ({ resource, previewModalOverlayProps, modalState,
|
|
43
43
|
const previewPanel = resource && (react_1.default.createElement(react_1.default.Fragment, null,
|
44
44
|
react_1.default.createElement("div", { className: "flex flex-col grow" }, ResourceComponent && react_1.default.createElement(ResourceComponent, { resource: resource, selectionCallback: selectionCallback })),
|
45
45
|
react_1.default.createElement("div", { className: "flex justify-end border-t border-gray-300" },
|
46
|
-
react_1.default.createElement("button", { type: "button", onClick: () => onSelect(resource), className: "rounded text-sm text-white bg-blue-300 py-2 px-2.5 m-5" }, "Select"))));
|
46
|
+
react_1.default.createElement("button", { type: "button", onClick: () => onSelect(resource), className: "rounded text-sm text-white bg-blue-300 py-2 px-2.5 m-5 font-bold" }, "Select"))));
|
47
47
|
return (react_1.default.createElement("div", { className: "squiz-gb-scope h-full" },
|
48
48
|
!isMobile && react_1.default.createElement("h3", { className: "sr-only" }, "Resource Details"),
|
49
49
|
resource === null && (react_1.default.createElement("div", { className: "max-sm:hidden flex flex-col h-full" },
|
package/lib/index.css
CHANGED
@@ -486,8 +486,8 @@
|
|
486
486
|
.squiz-gb-scope .w-screen {
|
487
487
|
width: 100vw;
|
488
488
|
}
|
489
|
-
.squiz-gb-scope .max-w
|
490
|
-
max-width:
|
489
|
+
.squiz-gb-scope .max-w-\[50rem\] {
|
490
|
+
max-width: 50rem;
|
491
491
|
}
|
492
492
|
.squiz-gb-scope .shrink-0 {
|
493
493
|
flex-shrink: 0;
|
@@ -868,7 +868,7 @@
|
|
868
868
|
}
|
869
869
|
}
|
870
870
|
@media (min-width: 1024px) {
|
871
|
-
.squiz-gb-scope .lg\:h-\[calc\(100vh-
|
872
|
-
height: calc(100vh -
|
871
|
+
.squiz-gb-scope .lg\:h-\[calc\(100vh-9rem\)\] {
|
872
|
+
height: calc(100vh - 9rem);
|
873
873
|
}
|
874
874
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@squiz/generic-browser-lib",
|
3
|
-
"version": "1.56.1-alpha.
|
3
|
+
"version": "1.56.1-alpha.31",
|
4
4
|
"description": "Package with reusable components used by resource/component browsers",
|
5
5
|
"main": "lib/index.js",
|
6
6
|
"types": "lib/index.d.ts",
|
@@ -21,13 +21,13 @@
|
|
21
21
|
"react-stately": "3.21.0"
|
22
22
|
},
|
23
23
|
"devDependencies": {
|
24
|
-
"@storybook/addon-essentials": "7.
|
25
|
-
"@storybook/addon-interactions": "7.
|
26
|
-
"@storybook/addon-links": "7.
|
24
|
+
"@storybook/addon-essentials": "^7.5.3",
|
25
|
+
"@storybook/addon-interactions": "^7.5.3",
|
26
|
+
"@storybook/addon-links": "^7.5.3",
|
27
27
|
"@storybook/addon-styling": "1.0.1",
|
28
|
-
"@storybook/blocks": "7.
|
29
|
-
"@storybook/react": "7.
|
30
|
-
"@storybook/react-vite": "7.
|
28
|
+
"@storybook/blocks": "^7.5.3",
|
29
|
+
"@storybook/react": "^7.5.3",
|
30
|
+
"@storybook/react-vite": "^7.5.3",
|
31
31
|
"@storybook/testing-library": "0.0.14-next.1",
|
32
32
|
"@testing-library/jest-dom": "5.16.5",
|
33
33
|
"@testing-library/react": "14.0.0",
|
@@ -49,11 +49,11 @@
|
|
49
49
|
"react": "18.2.0",
|
50
50
|
"react-dom": "18.2.0",
|
51
51
|
"rimraf": "4.1.2",
|
52
|
-
"storybook": "7.
|
52
|
+
"storybook": "^7.5.3",
|
53
53
|
"tailwindcss": "3.3.1",
|
54
54
|
"ts-jest": "29.0.5",
|
55
55
|
"typescript": "4.9.3",
|
56
|
-
"vite": "4.
|
56
|
+
"vite": "^4.5.0"
|
57
57
|
},
|
58
58
|
"peerDependencies": {
|
59
59
|
"@types/react": "^16.14.0 || ^17 || ^18",
|
@@ -72,5 +72,5 @@
|
|
72
72
|
"volta": {
|
73
73
|
"node": "18.15.0"
|
74
74
|
},
|
75
|
-
"gitHead": "
|
75
|
+
"gitHead": "3dcc1ab830dd1b1b101563f0622fc06b4184caf8"
|
76
76
|
}
|
package/src/Modal/Modal.tsx
CHANGED
@@ -21,7 +21,7 @@ function ModalContent({
|
|
21
21
|
<div
|
22
22
|
{...dialogProps}
|
23
23
|
ref={ref}
|
24
|
-
className="z-50 relative bg-white rounded-lg h-screen lg:h-[calc(100vh-
|
24
|
+
className="z-50 relative bg-white rounded-lg h-screen lg:h-[calc(100vh-9rem)] w-screen max-w-[50rem] outline-0"
|
25
25
|
>
|
26
26
|
{children(titleProps)}
|
27
27
|
</div>
|
@@ -45,7 +45,7 @@ export const PreviewPanel = function ({
|
|
45
45
|
<button
|
46
46
|
type="button"
|
47
47
|
onClick={() => onSelect(resource)}
|
48
|
-
className="rounded text-sm text-white bg-blue-300 py-2 px-2.5 m-5"
|
48
|
+
className="rounded text-sm text-white bg-blue-300 py-2 px-2.5 m-5 font-bold"
|
49
49
|
>
|
50
50
|
Select
|
51
51
|
</button>
|
package/tailwind.config.cjs
CHANGED
@@ -32,9 +32,6 @@ module.exports = {
|
|
32
32
|
'heading-3': ['1.125rem', '1.375rem'],
|
33
33
|
'heading-4': ['1rem', '1.25rem'],
|
34
34
|
},
|
35
|
-
fontFamily: {
|
36
|
-
base: 'Open Sans, Arial, sans-serif',
|
37
|
-
},
|
38
35
|
boxShadow: {
|
39
36
|
outline: '0 0 0 1px rgba(0,0,0,0.10)',
|
40
37
|
sm: '0 0 0 1px rgba(0,0,0,0.04), 0 1px 4px 2px rgba(0,0,0,0.08)',
|