@gnist/design-system 3.5.0 → 3.5.4
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 +22 -0
- package/dist/components/inputs/textFields/TextArea.cjs +1 -1
- package/dist/components/inputs/textFields/TextArea.d.ts.map +1 -1
- package/dist/components/inputs/textFields/TextArea.js +1 -1
- package/dist/components/inputs/textFields/TextField.cjs +1 -1
- package/dist/components/inputs/textFields/TextField.d.ts.map +1 -1
- package/dist/components/inputs/textFields/TextField.js +1 -1
- package/dist/components/surfaces/modal/Modal.cjs +1 -1
- package/dist/components/surfaces/modal/Modal.d.ts.map +1 -1
- package/dist/components/surfaces/modal/Modal.js +3 -3
- package/dist/components/surfaces/modal/modal.css.cjs +4 -0
- package/dist/components/surfaces/modal/modal.css.d.ts +1 -0
- package/dist/components/surfaces/modal/modal.css.d.ts.map +1 -1
- package/dist/components/surfaces/modal/modal.css.js +4 -0
- package/dist/utilities/forms/formContext.cjs +2 -1
- package/dist/utilities/forms/formContext.d.ts.map +1 -1
- package/dist/utilities/forms/formContext.js +2 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
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
|
+
## [3.5.4](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@3.5.3...@gnist/design-system@3.5.4) (2025-06-27)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* setting type="button" for clickable trailingIcon in TextField and TextArea ([50f0983](https://github.com/mollerdigital/design-system-design-system/commit/50f0983e60e43782285da74b58c9abb3502ce514))
|
|
11
|
+
|
|
12
|
+
## [3.5.3](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@3.5.2...@gnist/design-system@3.5.3) (2025-06-27)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @gnist/design-system
|
|
15
|
+
|
|
16
|
+
## [3.5.2](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@3.5.1...@gnist/design-system@3.5.2) (2025-06-20)
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* changed styling of header in Modal component ([ab8413b](https://github.com/mollerdigital/design-system-design-system/commit/ab8413b63bfb91ab95649bcc81792cba9bf3613f))
|
|
21
|
+
|
|
22
|
+
## [3.5.1](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@3.5.0...@gnist/design-system@3.5.1) (2025-06-13)
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* fix not preventing newline in TextArea used inside FormProvider ([b960682](https://github.com/mollerdigital/design-system-design-system/commit/b96068223a017b63c3eeb7a8584126793196b15a))
|
|
27
|
+
|
|
6
28
|
## [3.5.0](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@3.4.2...@gnist/design-system@3.5.0) (2025-06-06)
|
|
7
29
|
|
|
8
30
|
### Features
|
|
@@ -64,7 +64,7 @@ const TextArea = React.forwardRef(function TextArea2({ counterText, visibleLines
|
|
|
64
64
|
}, children: jsxRuntime.jsx("span", { style: { position: "relative" }, children: props.label }) }), jsxRuntime.jsx("span", { style: { flexGrow: "1" } }), props.suffix && jsxRuntime.jsx("span", { ref: contentProps.suffixRef, "aria-hidden": true, className: suffixPrefix_css.suffixStyle, children: props.suffix }), props.trailingIcon && jsxRuntime.jsx(Icon.Icon, { icon: shared.isClickableIcon(props.trailingIcon) ? props.trailingIcon.icon : props.trailingIcon, className: atoms_css_js.atoms({ paddingLeft: "xxs" }) })] }), counterText && jsxRuntime.jsx("span", { "aria-hidden": true, className: textArea_css.wordCounterStyle, children: counterText })] }), props.trailingIcon && shared.isClickableIcon(props.trailingIcon) && jsxRuntime.jsx("button", { className: iconButtonOverlay_css.iconButtonOverlayRecipe({
|
|
65
65
|
placement: "right",
|
|
66
66
|
density: wrapperProps.density
|
|
67
|
-
}), title: props.trailingIcon.title, onClick: props.trailingIcon.onClick }), jsxRuntime.jsx(InputHelperText.InputHelperText, { id: contentProps.helperId, validity: props.validity, helperText: props.helperText, reserveSpaceForMessage: props.reserveSpaceForMessage, disabled: props.disabled })] });
|
|
67
|
+
}), title: props.trailingIcon.title, onClick: props.trailingIcon.onClick, type: "button" }), jsxRuntime.jsx(InputHelperText.InputHelperText, { id: contentProps.helperId, validity: props.validity, helperText: props.helperText, reserveSpaceForMessage: props.reserveSpaceForMessage, disabled: props.disabled })] });
|
|
68
68
|
});
|
|
69
69
|
const wordCount = (value, max) => `${value.trim().split(/\s/).filter((x) => !!x).length}/${max} words`;
|
|
70
70
|
const characterCount = (value, max) => `${value.trim().length}/${max}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/textFields/TextArea.tsx"],"names":[],"mappings":"AAKA,OAAO,EAA4B,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAezE,OAAO,EAGH,cAAc,EAEjB,MAAM,cAAc,CAAC;AAGtB,MAAM,MAAM,aAAa,GAAG,cAAc,GACtC,IAAI,CACA,sBAAsB,CAAC,mBAAmB,CAAC,EAC3C,aAAa,GAAG,OAAO,CAC1B,GAAG;IACA;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEN;;;;;;;;;;;EAWE;AACF,eAAO,MAAM,QAAQ;IA5Bb;;;;;;;OAOG;kBACW,MAAM;IACpB;;;OAGG;mBACY,MAAM;
|
|
1
|
+
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/textFields/TextArea.tsx"],"names":[],"mappings":"AAKA,OAAO,EAA4B,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAezE,OAAO,EAGH,cAAc,EAEjB,MAAM,cAAc,CAAC;AAGtB,MAAM,MAAM,aAAa,GAAG,cAAc,GACtC,IAAI,CACA,sBAAsB,CAAC,mBAAmB,CAAC,EAC3C,aAAa,GAAG,OAAO,CAC1B,GAAG;IACA;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEN;;;;;;;;;;;EAWE;AACF,eAAO,MAAM,QAAQ;IA5Bb;;;;;;;OAOG;kBACW,MAAM;IACpB;;;OAGG;mBACY,MAAM;mDAiK3B,CAAC;AAEH,eAAO,MAAM,SAAS,UAAW,MAAM,OAAO,MAAM,WAMjC,CAAC;AAEpB,eAAO,MAAM,cAAc,UAAW,MAAM,OAAO,MAAM,WACtB,CAAC"}
|
|
@@ -60,7 +60,7 @@ const TextArea = forwardRef(function TextArea2({ counterText, visibleLines: visi
|
|
|
60
60
|
}, children: jsx("span", { style: { position: "relative" }, children: props.label }) }), jsx("span", { style: { flexGrow: "1" } }), props.suffix && jsx("span", { ref: contentProps.suffixRef, "aria-hidden": true, className: suffixStyle, children: props.suffix }), props.trailingIcon && jsx(Icon, { icon: isClickableIcon(props.trailingIcon) ? props.trailingIcon.icon : props.trailingIcon, className: atoms({ paddingLeft: "xxs" }) })] }), counterText && jsx("span", { "aria-hidden": true, className: wordCounterStyle, children: counterText })] }), props.trailingIcon && isClickableIcon(props.trailingIcon) && jsx("button", { className: iconButtonOverlayRecipe({
|
|
61
61
|
placement: "right",
|
|
62
62
|
density: wrapperProps.density
|
|
63
|
-
}), title: props.trailingIcon.title, onClick: props.trailingIcon.onClick }), jsx(InputHelperText, { id: contentProps.helperId, validity: props.validity, helperText: props.helperText, reserveSpaceForMessage: props.reserveSpaceForMessage, disabled: props.disabled })] });
|
|
63
|
+
}), title: props.trailingIcon.title, onClick: props.trailingIcon.onClick, type: "button" }), jsx(InputHelperText, { id: contentProps.helperId, validity: props.validity, helperText: props.helperText, reserveSpaceForMessage: props.reserveSpaceForMessage, disabled: props.disabled })] });
|
|
64
64
|
});
|
|
65
65
|
const wordCount = (value, max) => `${value.trim().split(/\s/).filter((x) => !!x).length}/${max} words`;
|
|
66
66
|
const characterCount = (value, max) => `${value.trim().length}/${max}`;
|
|
@@ -54,6 +54,6 @@ const TextField = React.forwardRef(function TextField2(props, ref) {
|
|
|
54
54
|
}, children: jsxRuntime.jsx("span", { style: { position: "relative" }, children: props.label }) }), jsxRuntime.jsx("span", { style: { flexGrow: "1" } }), props.suffix && jsxRuntime.jsx("span", { ref: contentProps.suffixRef, "aria-hidden": true, className: suffixPrefix_css.suffixStyle, children: props.suffix }), props.trailingIcon && jsxRuntime.jsx(Icon.Icon, { icon: shared.isClickableIcon(props.trailingIcon) ? props.trailingIcon.icon : props.trailingIcon, className: atoms_css_js.atoms({ paddingLeft: "xxs" }) })] })] }), props.trailingIcon && shared.isClickableIcon(props.trailingIcon) && jsxRuntime.jsx("button", { className: iconButtonOverlay_css.iconButtonOverlayRecipe({
|
|
55
55
|
placement: "right",
|
|
56
56
|
density: wrapperProps.density
|
|
57
|
-
}), title: props.trailingIcon.title, onClick: props.trailingIcon.onClick }), jsxRuntime.jsx(InputHelperText.InputHelperText, { id: contentProps.helperId, validity: props.validity, helperText: props.helperText, reserveSpaceForMessage: props.reserveSpaceForMessage, disabled: props.disabled })] });
|
|
57
|
+
}), title: props.trailingIcon.title, onClick: props.trailingIcon.onClick, type: "button" }), jsxRuntime.jsx(InputHelperText.InputHelperText, { id: contentProps.helperId, validity: props.validity, helperText: props.helperText, reserveSpaceForMessage: props.reserveSpaceForMessage, disabled: props.disabled })] });
|
|
58
58
|
});
|
|
59
59
|
exports.TextField = TextField;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/textFields/TextField.tsx"],"names":[],"mappings":"AAIA,OAAO,EAA4B,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAetE,OAAO,EAGH,cAAc,EAEjB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,cAAc,GAAG,cAAc,GACvC,IAAI,CACA,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,aAAa,GAAG,OAAO,GAAG,MAAM,CACnC,GAAG;IACA;;;OAGG;IACH,IAAI,CAAC,EACC,OAAO,GACP,QAAQ,GACR,KAAK,GACL,MAAM,GACN,KAAK,GACL,UAAU,GACV,QAAQ,GACR,MAAM,GACN,MAAM,CAAC;CAChB,CAAC;AAEN;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS;IA3Bd;;;OAGG;WAEG,OAAO,GACP,QAAQ,GACR,KAAK,GACL,MAAM,GACN,KAAK,GACL,UAAU,GACV,QAAQ,GACR,MAAM,GACN,MAAM;
|
|
1
|
+
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/textFields/TextField.tsx"],"names":[],"mappings":"AAIA,OAAO,EAA4B,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAetE,OAAO,EAGH,cAAc,EAEjB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,cAAc,GAAG,cAAc,GACvC,IAAI,CACA,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,aAAa,GAAG,OAAO,GAAG,MAAM,CACnC,GAAG;IACA;;;OAGG;IACH,IAAI,CAAC,EACC,OAAO,GACP,QAAQ,GACR,KAAK,GACL,MAAM,GACN,KAAK,GACL,UAAU,GACV,QAAQ,GACR,MAAM,GACN,MAAM,CAAC;CAChB,CAAC;AAEN;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS;IA3Bd;;;OAGG;WAEG,OAAO,GACP,QAAQ,GACR,KAAK,GACL,MAAM,GACN,KAAK,GACL,UAAU,GACV,QAAQ,GACR,MAAM,GACN,MAAM;mDAuJlB,CAAC"}
|
|
@@ -50,7 +50,7 @@ const TextField = forwardRef(function TextField2(props, ref) {
|
|
|
50
50
|
}, children: jsx("span", { style: { position: "relative" }, children: props.label }) }), jsx("span", { style: { flexGrow: "1" } }), props.suffix && jsx("span", { ref: contentProps.suffixRef, "aria-hidden": true, className: suffixStyle, children: props.suffix }), props.trailingIcon && jsx(Icon, { icon: isClickableIcon(props.trailingIcon) ? props.trailingIcon.icon : props.trailingIcon, className: atoms({ paddingLeft: "xxs" }) })] })] }), props.trailingIcon && isClickableIcon(props.trailingIcon) && jsx("button", { className: iconButtonOverlayRecipe({
|
|
51
51
|
placement: "right",
|
|
52
52
|
density: wrapperProps.density
|
|
53
|
-
}), title: props.trailingIcon.title, onClick: props.trailingIcon.onClick }), jsx(InputHelperText, { id: contentProps.helperId, validity: props.validity, helperText: props.helperText, reserveSpaceForMessage: props.reserveSpaceForMessage, disabled: props.disabled })] });
|
|
53
|
+
}), title: props.trailingIcon.title, onClick: props.trailingIcon.onClick, type: "button" }), jsx(InputHelperText, { id: contentProps.helperId, validity: props.validity, helperText: props.helperText, reserveSpaceForMessage: props.reserveSpaceForMessage, disabled: props.disabled })] });
|
|
54
54
|
});
|
|
55
55
|
export {
|
|
56
56
|
TextField
|
|
@@ -95,7 +95,7 @@ const Modal = React__namespace.forwardRef(function Modal2({ children, title, isO
|
|
|
95
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
|
-
}), style: { backgroundColor }, children: [title ? jsxRuntime.jsx(index$1.
|
|
98
|
+
}), style: { backgroundColor }, children: [title ? jsxRuntime.jsx(index$1.LeadText, { "$as": "h2", className: modal_css.modalHeadingStyle, 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) => {
|
|
99
99
|
if (element) {
|
|
100
100
|
setContentHeight(element.offsetHeight);
|
|
101
101
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/modal/Modal.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,4CAAsE;AAIjG,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAKH,UAAU,
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/modal/Modal.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,4CAAsE;AAIjG,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAKH,UAAU,EAIb,uBAAmD;AAEpD,UAAU,MAAO,SAAQ,gBAAgB,CAAC,QAAQ,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACvB,uCAAuC;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,8CAA8C;IAC9C,MAAM,EAAE,OAAO,CAAC;IAChB,kCAAkC;IAClC,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6GAA6G;IAC7G,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,uFAAuF;IACvF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+GAA+G;IAC/G,eAAe,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC1C,4BAA4B;IAC5B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,qCAAqC;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAeD;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,KAAK,mFAkJhB,CAAC"}
|
|
@@ -12,13 +12,13 @@ import "../../actions/selectionControls/RadioButton.js";
|
|
|
12
12
|
import "../../actions/chips/ActionChip.js";
|
|
13
13
|
import "../../actions/chips/FilterChip.js";
|
|
14
14
|
import "../../actions/chips/TagChip.js";
|
|
15
|
-
import {
|
|
15
|
+
import { LeadText } from "../../../foundation/typography/index.js";
|
|
16
16
|
import { useTranslation } from "../../../translations/index.js";
|
|
17
17
|
import { tokens } from "@gnist/themes/tokens.css.js";
|
|
18
18
|
import * as React from "react";
|
|
19
19
|
import { useState, useRef, useEffect } from "react";
|
|
20
20
|
import { createPortal } from "react-dom";
|
|
21
|
-
import { modalStyle, backdropStyle, dialogRecipe, headerRowRecipe, contentContainerRecipe, actionRowRecipe } from "./modal.css.js";
|
|
21
|
+
import { modalStyle, backdropStyle, dialogRecipe, headerRowRecipe, modalHeadingStyle, contentContainerRecipe, actionRowRecipe } from "./modal.css.js";
|
|
22
22
|
const hasScroll = (size, height) => {
|
|
23
23
|
switch (size) {
|
|
24
24
|
case "fullscreen":
|
|
@@ -76,7 +76,7 @@ const Modal = React.forwardRef(function Modal2({ children, title, isOpen, handle
|
|
|
76
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
|
-
}), style: { backgroundColor }, children: [title ? jsx(
|
|
79
|
+
}), style: { backgroundColor }, children: [title ? jsx(LeadText, { "$as": "h2", className: modalHeadingStyle, 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) => {
|
|
80
80
|
if (element) {
|
|
81
81
|
setContentHeight(element.offsetHeight);
|
|
82
82
|
}
|
|
@@ -36,6 +36,9 @@ const modalStyle = css.style({
|
|
|
36
36
|
margin: 0,
|
|
37
37
|
padding: 0
|
|
38
38
|
});
|
|
39
|
+
const modalHeadingStyle = css.style({
|
|
40
|
+
fontWeight: tokens_css_js.tokens.typeface.weight.semibold
|
|
41
|
+
});
|
|
39
42
|
const dialogPadding = (size) => {
|
|
40
43
|
switch (size) {
|
|
41
44
|
case "fullscreen":
|
|
@@ -264,4 +267,5 @@ exports.backdropStyle = backdropStyle;
|
|
|
264
267
|
exports.contentContainerRecipe = contentContainerRecipe;
|
|
265
268
|
exports.dialogRecipe = dialogRecipe;
|
|
266
269
|
exports.headerRowRecipe = headerRowRecipe;
|
|
270
|
+
exports.modalHeadingStyle = modalHeadingStyle;
|
|
267
271
|
exports.modalStyle = modalStyle;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export type DialogSize = "small" | "medium" | "large" | "x-large" | "fullscreen";
|
|
2
2
|
export declare const backdropStyle: string;
|
|
3
3
|
export declare const modalStyle: string;
|
|
4
|
+
export declare const modalHeadingStyle: string;
|
|
4
5
|
export declare const dialogRecipe: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
5
6
|
size: {
|
|
6
7
|
fullscreen: {
|
|
@@ -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,GAChB,OAAO,GACP,QAAQ,GACR,OAAO,GACP,SAAS,GACT,YAAY,CAAC;AAEnB,eAAO,MAAM,aAAa,QASxB,CAAC;AAEH,eAAO,MAAM,UAAU,QAmBrB,CAAC;AAeH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0EvB,CAAC;AASH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;EAkC1B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;EAiEjC,CAAC;AAWH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;EA0C1B,CAAC"}
|
|
1
|
+
{"version":3,"file":"modal.css.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/modal/modal.css.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,UAAU,GAChB,OAAO,GACP,QAAQ,GACR,OAAO,GACP,SAAS,GACT,YAAY,CAAC;AAEnB,eAAO,MAAM,aAAa,QASxB,CAAC;AAEH,eAAO,MAAM,UAAU,QAmBrB,CAAC;AAEH,eAAO,MAAM,iBAAiB,QAE5B,CAAC;AAeH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0EvB,CAAC;AASH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;EAkC1B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;EAiEjC,CAAC;AAWH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;EA0C1B,CAAC"}
|
|
@@ -34,6 +34,9 @@ const modalStyle = style({
|
|
|
34
34
|
margin: 0,
|
|
35
35
|
padding: 0
|
|
36
36
|
});
|
|
37
|
+
const modalHeadingStyle = style({
|
|
38
|
+
fontWeight: tokens.typeface.weight.semibold
|
|
39
|
+
});
|
|
37
40
|
const dialogPadding = (size) => {
|
|
38
41
|
switch (size) {
|
|
39
42
|
case "fullscreen":
|
|
@@ -263,5 +266,6 @@ export {
|
|
|
263
266
|
contentContainerRecipe,
|
|
264
267
|
dialogRecipe,
|
|
265
268
|
headerRowRecipe,
|
|
269
|
+
modalHeadingStyle,
|
|
266
270
|
modalStyle
|
|
267
271
|
};
|
|
@@ -27,7 +27,8 @@ const Form = ({ onSubmit, submitOnEnter, children, ...rest }) => jsxRuntime.jsx(
|
|
|
27
27
|
event.preventDefault();
|
|
28
28
|
onSubmit == null ? void 0 : onSubmit();
|
|
29
29
|
}, ...rest, children: jsxRuntime.jsx("div", { role: "presentation", onKeyDown: (event) => {
|
|
30
|
-
|
|
30
|
+
const target = event.target;
|
|
31
|
+
if (event.key === "Enter" && target.tagName !== "TEXTAREA" && !submitOnEnter) {
|
|
31
32
|
event.preventDefault();
|
|
32
33
|
}
|
|
33
34
|
}, children }) });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formContext.d.ts","sourceRoot":"","sources":["../../../src/utilities/forms/formContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,UAAU,WAAW,CAAC,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;CAC3B;
|
|
1
|
+
{"version":3,"file":"formContext.d.ts","sourceRoot":"","sources":["../../../src/utilities/forms/formContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,UAAU,WAAW,CAAC,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;CAC3B;AA2CD,MAAM,WAAW,iBAAiB,CAAC,CAAC,CAChC,SAAQ,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7D;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;;;EAaE;AACF,wBAAgB,YAAY,CAAC,CAAC,EAAE,EAC5B,EAAE,EACF,IAAI,EACJ,QAAQ,EACR,iBAAyB,EACzB,aAAqB,EACrB,QAAQ,EACR,GAAG,IAAI,EACV,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,2CAuB/C;AAED,wBAAgB,OAAO,CAAC,CAAC,KACmB,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,CACrE"}
|
|
@@ -7,7 +7,8 @@ const Form = ({ onSubmit, submitOnEnter, children, ...rest }) => jsx("form", { o
|
|
|
7
7
|
event.preventDefault();
|
|
8
8
|
onSubmit == null ? void 0 : onSubmit();
|
|
9
9
|
}, ...rest, children: jsx("div", { role: "presentation", onKeyDown: (event) => {
|
|
10
|
-
|
|
10
|
+
const target = event.target;
|
|
11
|
+
if (event.key === "Enter" && target.tagName !== "TEXTAREA" && !submitOnEnter) {
|
|
11
12
|
event.preventDefault();
|
|
12
13
|
}
|
|
13
14
|
}, children }) });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gnist/design-system",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.4",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@formkit/auto-animate": "^0.8.2",
|
|
51
51
|
"@gnist/component-utils": "3.0.7",
|
|
52
|
-
"@gnist/themes": "^3.
|
|
52
|
+
"@gnist/themes": "^3.10.0",
|
|
53
53
|
"@mui/base": "^5.0.0-beta.70",
|
|
54
54
|
"@vanilla-extract/css": "^1.17.1",
|
|
55
55
|
"@vanilla-extract/css-utils": "^0.1.4",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"optional": true
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "ea0755b4250908c64a8d7dfc953f7132191f57ed"
|
|
107
107
|
}
|