@gnist/design-system 2.0.31 → 2.0.33
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/CHANGELOG.md +8 -0
- package/dist/components/inputs/dropdowns/SelectBase.cjs +2 -2
- package/dist/components/inputs/dropdowns/SelectBase.d.ts.map +1 -1
- package/dist/components/inputs/dropdowns/SelectBase.js +3 -3
- package/dist/components/surfaces/modal/Modal.cjs +1 -1
- package/dist/components/surfaces/modal/Modal.js +1 -1
- package/dist/components/surfaces/modal/modal.css.cjs +16 -20
- package/dist/components/surfaces/modal/modal.css.d.ts.map +1 -1
- package/dist/components/surfaces/modal/modal.css.js +16 -20
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## <small>2.0.33 (2025-03-27)</small>
|
|
7
|
+
|
|
8
|
+
* fix: modal is now compatible with safari and ios browsers ([d91081a](https://github.com/mollerdigital/design-system-design-system/commit/d91081a))
|
|
9
|
+
|
|
10
|
+
## <small>2.0.32 (2025-03-27)</small>
|
|
11
|
+
|
|
12
|
+
* fix: ownerState not recognised error for Select components ([cbdbd81](https://github.com/mollerdigital/design-system-design-system/commit/cbdbd81))
|
|
13
|
+
|
|
6
14
|
## <small>2.0.31 (2025-03-26)</small>
|
|
7
15
|
|
|
8
16
|
* fix: close modal with ESC key and unmount from DOM when not in use ([13d58a0](https://github.com/mollerdigital/design-system-design-system/commit/13d58a0))
|
|
@@ -37,8 +37,8 @@ const labelStyles_css = require("../shared-styles/labelStyles.css.cjs");
|
|
|
37
37
|
const select_css = require("./select.css.cjs");
|
|
38
38
|
const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
39
39
|
const classNames__default = /* @__PURE__ */ _interopDefaultCompat(classNames);
|
|
40
|
-
const listBoxComponent = componentUtils.component("listBox", select_css.listBoxStyle, "div");
|
|
41
|
-
const popUpComponent = componentUtils.component("popUp", select_css.popUpStyle, "div");
|
|
40
|
+
const listBoxComponent = base.prepareForSlot(componentUtils.component("listBox", select_css.listBoxStyle, "div"));
|
|
41
|
+
const popUpComponent = base.prepareForSlot(componentUtils.component("popUp", select_css.popUpStyle, "div"));
|
|
42
42
|
function SelectBase(props, isMultiple, ref) {
|
|
43
43
|
var _a, _b;
|
|
44
44
|
const { contentProps, wrapperProps, commonInputProps } = shared.useSelectInputLogic(props);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectBase.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/dropdowns/SelectBase.tsx"],"names":[],"mappings":"AAEA,OAAO,EACH,oBAAoB,EAGvB,qBAAyD;AAM1D,OAAO,EAAE,YAAY,EAAY,MAAM,OAAO,CAAC;AAqB/C,MAAM,WAAW,eAAe,CAAC,IAAI,CAAE,SAAQ,oBAAoB,CAAC,IAAI,CAAC;IACrE;;;OAGG;IACH,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC/C;
|
|
1
|
+
{"version":3,"file":"SelectBase.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/dropdowns/SelectBase.tsx"],"names":[],"mappings":"AAEA,OAAO,EACH,oBAAoB,EAGvB,qBAAyD;AAM1D,OAAO,EAAE,YAAY,EAAY,MAAM,OAAO,CAAC;AAqB/C,MAAM,WAAW,eAAe,CAAC,IAAI,CAAE,SAAQ,oBAAoB,CAAC,IAAI,CAAC;IACrE;;;OAGG;IACH,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC/C;AAOD,wBAAgB,UAAU,CAAC,CAAC,EACxB,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,EACzB,UAAU,EAAE,OAAO,EACnB,GAAG,EAAE,YAAY,CAAC,iBAAiB,CAAC,2CA4HvC"}
|
|
@@ -15,7 +15,7 @@ import "../../../foundation/typography/index.js";
|
|
|
15
15
|
import classNames from "classnames";
|
|
16
16
|
import "../../../foundation/logos/Logo.css.js";
|
|
17
17
|
import { atoms } from "@gnist/themes/atoms.css.js";
|
|
18
|
-
import { Select, Option } from "@mui/base";
|
|
18
|
+
import { prepareForSlot, Select, Option } from "@mui/base";
|
|
19
19
|
import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
20
20
|
import "../../actions/buttons/PrimaryButton.js";
|
|
21
21
|
import "../../actions/buttons/SecondaryButton.js";
|
|
@@ -33,8 +33,8 @@ import { inputFieldWrapperRecipe, inputContentWrapper, wrapperStyle } from "../s
|
|
|
33
33
|
import { postInputWidth, preInputWidth } from "../shared-styles/inputFieldConstants.css.js";
|
|
34
34
|
import { labelStyle } from "../shared-styles/labelStyles.css.js";
|
|
35
35
|
import { listBoxStyle, popUpStyle, selectStyle, optionStyle, optionBackground, singleOptionStyle } from "./select.css.js";
|
|
36
|
-
const listBoxComponent = component("listBox", listBoxStyle, "div");
|
|
37
|
-
const popUpComponent = component("popUp", popUpStyle, "div");
|
|
36
|
+
const listBoxComponent = prepareForSlot(component("listBox", listBoxStyle, "div"));
|
|
37
|
+
const popUpComponent = prepareForSlot(component("popUp", popUpStyle, "div"));
|
|
38
38
|
function SelectBase(props, isMultiple, ref) {
|
|
39
39
|
var _a, _b;
|
|
40
40
|
const { contentProps, wrapperProps, commonInputProps } = useSelectInputLogic(props);
|
|
@@ -92,7 +92,7 @@ const Modal = React__namespace.forwardRef(function Modal2({ children, title, isO
|
|
|
92
92
|
if (!renderComponent) {
|
|
93
93
|
return null;
|
|
94
94
|
}
|
|
95
|
-
return reactDom.createPortal(jsxRuntime.jsxs("dialog", { ref: dialogRef, className: modal_css.modalStyle, onClick: handleDialogClose, children: [jsxRuntime.jsx("div", { role: "presentation", className: modal_css.backdropStyle, onClick: handleBackdropClick }), jsxRuntime.jsxs("div", { ref, className: modal_css.dialogRecipe({ size }), ...rest, style: { backgroundColor }, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", { className: modal_css.headerRowRecipe({
|
|
95
|
+
return reactDom.createPortal(jsxRuntime.jsxs("dialog", { ref: dialogRef, className: isOpen ? modal_css.modalStyle : "", onClick: handleDialogClose, children: [jsxRuntime.jsx("div", { role: "presentation", className: modal_css.backdropStyle, onClick: handleBackdropClick }), jsxRuntime.jsxs("div", { ref, className: modal_css.dialogRecipe({ size }), ...rest, style: { backgroundColor }, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", { className: modal_css.headerRowRecipe({
|
|
96
96
|
size,
|
|
97
97
|
hasScroll: hasScroll(size, contentHeight)
|
|
98
98
|
}), style: { backgroundColor }, children: [title ? jsxRuntime.jsx(index$1.Heading1Text, { children: title }) : jsxRuntime.jsx("span", { "aria-hidden": true }), jsxRuntime.jsx(IconButton.IconButton, { icon: "close", label: text.dismissLabel, onClick: handleClose, disabled: (_a = primaryAction == null ? void 0 : primaryAction.loading) == null ? void 0 : _a.isLoading, autoFocus: true })] }), jsxRuntime.jsx("div", { ref: (element) => {
|
|
@@ -73,7 +73,7 @@ const Modal = React.forwardRef(function Modal2({ children, title, isOpen, handle
|
|
|
73
73
|
if (!renderComponent) {
|
|
74
74
|
return null;
|
|
75
75
|
}
|
|
76
|
-
return createPortal(jsxs("dialog", { ref: dialogRef, className: modalStyle, onClick: handleDialogClose, children: [jsx("div", { role: "presentation", className: backdropStyle, onClick: handleBackdropClick }), jsxs("div", { ref, className: dialogRecipe({ size }), ...rest, style: { backgroundColor }, children: [jsxs("div", { children: [jsxs("div", { className: headerRowRecipe({
|
|
76
|
+
return createPortal(jsxs("dialog", { ref: dialogRef, className: isOpen ? modalStyle : "", onClick: handleDialogClose, children: [jsx("div", { role: "presentation", className: backdropStyle, onClick: handleBackdropClick }), jsxs("div", { ref, className: dialogRecipe({ size }), ...rest, style: { backgroundColor }, children: [jsxs("div", { children: [jsxs("div", { className: headerRowRecipe({
|
|
77
77
|
size,
|
|
78
78
|
hasScroll: hasScroll(size, contentHeight)
|
|
79
79
|
}), style: { backgroundColor }, children: [title ? jsx(Heading1Text, { children: title }) : jsx("span", { "aria-hidden": true }), jsx(IconButton, { icon: "close", label: text.dismissLabel, onClick: handleClose, disabled: (_a = primaryAction == null ? void 0 : primaryAction.loading) == null ? void 0 : _a.isLoading, autoFocus: true })] }), jsx("div", { ref: (element) => {
|
|
@@ -17,26 +17,22 @@ const backdropStyle = css.style({
|
|
|
17
17
|
WebkitTapHighlightColor: "transparent"
|
|
18
18
|
});
|
|
19
19
|
const modalStyle = css.style({
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
justifyContent: "center",
|
|
37
|
-
isolation: "isolate"
|
|
38
|
-
}
|
|
39
|
-
}
|
|
20
|
+
position: "fixed",
|
|
21
|
+
zIndex: 1300,
|
|
22
|
+
right: 0,
|
|
23
|
+
bottom: 0,
|
|
24
|
+
top: 0,
|
|
25
|
+
left: 0,
|
|
26
|
+
width: "100%",
|
|
27
|
+
maxWidth: "unset",
|
|
28
|
+
maxHeight: "unset",
|
|
29
|
+
backgroundColor: "transparent",
|
|
30
|
+
border: "none",
|
|
31
|
+
height: "100%",
|
|
32
|
+
display: "flex",
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
justifyContent: "center",
|
|
35
|
+
isolation: "isolate"
|
|
40
36
|
});
|
|
41
37
|
const dialogPadding = (size) => {
|
|
42
38
|
switch (size) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.css.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/modal/modal.css.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,CAAC;AAErE,eAAO,MAAM,aAAa,QASxB,CAAC;AAEH,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"modal.css.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/modal/modal.css.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,CAAC;AAErE,eAAO,MAAM,aAAa,QASxB,CAAC;AAEH,eAAO,MAAM,UAAU,QAiBrB,CAAC;AAcH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;EA+DvB,CAAC;AASH,eAAO,MAAM,eAAe;;;;;;;;;;;;;EAiC1B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;EAwDjC,CAAC;AAWH,eAAO,MAAM,eAAe;;;;;;;;;;;;;EAyC1B,CAAC"}
|
|
@@ -15,26 +15,22 @@ const backdropStyle = style({
|
|
|
15
15
|
WebkitTapHighlightColor: "transparent"
|
|
16
16
|
});
|
|
17
17
|
const modalStyle = style({
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
justifyContent: "center",
|
|
35
|
-
isolation: "isolate"
|
|
36
|
-
}
|
|
37
|
-
}
|
|
18
|
+
position: "fixed",
|
|
19
|
+
zIndex: 1300,
|
|
20
|
+
right: 0,
|
|
21
|
+
bottom: 0,
|
|
22
|
+
top: 0,
|
|
23
|
+
left: 0,
|
|
24
|
+
width: "100%",
|
|
25
|
+
maxWidth: "unset",
|
|
26
|
+
maxHeight: "unset",
|
|
27
|
+
backgroundColor: "transparent",
|
|
28
|
+
border: "none",
|
|
29
|
+
height: "100%",
|
|
30
|
+
display: "flex",
|
|
31
|
+
alignItems: "center",
|
|
32
|
+
justifyContent: "center",
|
|
33
|
+
isolation: "isolate"
|
|
38
34
|
});
|
|
39
35
|
const dialogPadding = (size) => {
|
|
40
36
|
switch (size) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gnist/design-system",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.33",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -104,5 +104,5 @@
|
|
|
104
104
|
"optional": true
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "4e143c0723418c23cd27bb032fff0af1dad4627d"
|
|
108
108
|
}
|