@gnist/design-system 3.5.0 → 3.5.2

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 CHANGED
@@ -3,6 +3,18 @@
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.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)
7
+
8
+ ### Bug Fixes
9
+
10
+ * changed styling of header in Modal component ([ab8413b](https://github.com/mollerdigital/design-system-design-system/commit/ab8413b63bfb91ab95649bcc81792cba9bf3613f))
11
+
12
+ ## [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)
13
+
14
+ ### Bug Fixes
15
+
16
+ * fix not preventing newline in TextArea used inside FormProvider ([b960682](https://github.com/mollerdigital/design-system-design-system/commit/b96068223a017b63c3eeb7a8584126793196b15a))
17
+
6
18
  ## [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
19
 
8
20
  ### Features
@@ -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.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) => {
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,EAGb,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,mFAgJhB,CAAC"}
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 { Heading1Text } from "../../../foundation/typography/index.js";
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(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) => {
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
- if (event.key === "Enter" && !submitOnEnter) {
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,c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iB,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
- if (event.key === "Enter" && !submitOnEnter) {
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.0",
3
+ "version": "3.5.2",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -103,5 +103,5 @@
103
103
  "optional": true
104
104
  }
105
105
  },
106
- "gitHead": "f094a035db7287d854ff647be122e660c64e90f1"
106
+ "gitHead": "d0894c6556821aeb8c4653bc68ab9bff811deb7e"
107
107
  }