@opengovsg/oui 0.0.43 → 0.0.44

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.
@@ -11,7 +11,15 @@ var modalVariantContext = require('./modal-variant-context.cjs');
11
11
 
12
12
  const Modal = $670gB$react.forwardRef(function Modal2(originalProps, ref) {
13
13
  const [
14
- { classNames, isOpen, onOpenChange, isDismissable, defaultOpen, ...props },
14
+ {
15
+ classNames,
16
+ isOpen,
17
+ onOpenChange,
18
+ isDismissable,
19
+ isKeyboardDismissDisabled,
20
+ defaultOpen,
21
+ ...props
22
+ },
15
23
  variantProps
16
24
  ] = utils.mapPropsVariants(originalProps, ouiTheme.modalStyles.variantKeys);
17
25
  const slots = ouiTheme.modalStyles(variantProps);
@@ -39,6 +47,7 @@ const Modal = $670gB$react.forwardRef(function Modal2(originalProps, ref) {
39
47
  isOpen,
40
48
  onOpenChange,
41
49
  isDismissable,
50
+ isKeyboardDismissDisabled,
42
51
  defaultOpen,
43
52
  className: ouiTheme.composeRenderProps(
44
53
  classNames?.overlay,
@@ -50,6 +59,8 @@ const Modal = $670gB$react.forwardRef(function Modal2(originalProps, ref) {
50
59
  ...props,
51
60
  ref,
52
61
  "data-placement": variantProps.placement,
62
+ isDismissable,
63
+ isKeyboardDismissDisabled,
53
64
  className: ouiTheme.composeRenderProps(
54
65
  props.className ?? classNames?.base,
55
66
  (className, renderProps) => slots.base({ className, ...renderProps })
@@ -9,7 +9,15 @@ import { ModalVariantContext } from './modal-variant-context.js';
9
9
 
10
10
  const Modal = forwardRef(function Modal2(originalProps, ref) {
11
11
  const [
12
- { classNames, isOpen, onOpenChange, isDismissable, defaultOpen, ...props },
12
+ {
13
+ classNames,
14
+ isOpen,
15
+ onOpenChange,
16
+ isDismissable,
17
+ isKeyboardDismissDisabled,
18
+ defaultOpen,
19
+ ...props
20
+ },
13
21
  variantProps
14
22
  ] = mapPropsVariants(originalProps, modalStyles.variantKeys);
15
23
  const slots = modalStyles(variantProps);
@@ -37,6 +45,7 @@ const Modal = forwardRef(function Modal2(originalProps, ref) {
37
45
  isOpen,
38
46
  onOpenChange,
39
47
  isDismissable,
48
+ isKeyboardDismissDisabled,
40
49
  defaultOpen,
41
50
  className: composeRenderProps(
42
51
  classNames?.overlay,
@@ -48,6 +57,8 @@ const Modal = forwardRef(function Modal2(originalProps, ref) {
48
57
  ...props,
49
58
  ref,
50
59
  "data-placement": variantProps.placement,
60
+ isDismissable,
61
+ isKeyboardDismissDisabled,
51
62
  className: composeRenderProps(
52
63
  props.className ?? classNames?.base,
53
64
  (className, renderProps) => slots.base({ className, ...renderProps })
@@ -1 +1 @@
1
- {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/modal/modal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAQ9D,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,YAAY,EACb,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAsB,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAMtE,MAAM,WAAW,UACf,SAAQ,iBAAiB,EACvB,YAAY,CAAC,OAAO,WAAW,CAAC;IAClC,UAAU,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAA;CACxC;AAED,eAAO,MAAM,KAAK,uGAsDhB,CAAA"}
1
+ {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/modal/modal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAQ9D,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,YAAY,EACb,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAsB,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAMtE,MAAM,WAAW,UACf,SAAQ,iBAAiB,EACvB,YAAY,CAAC,OAAO,WAAW,CAAC;IAClC,UAAU,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAA;CACxC;AAED,eAAO,MAAM,KAAK,uGAiEhB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengovsg/oui",
3
- "version": "0.0.43",
3
+ "version": "0.0.44",
4
4
  "sideEffects": false,
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "type": "module",
@@ -50,7 +50,7 @@
50
50
  "storybook": "10.1.10",
51
51
  "tsx": "^4.21.0",
52
52
  "typescript": "5.7.3",
53
- "@opengovsg/oui-theme": "0.0.43",
53
+ "@opengovsg/oui-theme": "0.0.44",
54
54
  "@oui/chromatic": "0.0.0",
55
55
  "@oui/eslint-config": "0.0.0",
56
56
  "@oui/typescript-config": "0.0.0",
@@ -88,7 +88,7 @@
88
88
  "motion": ">=11.12.0 || >=12.0.0-alpha.1",
89
89
  "react": ">= 18",
90
90
  "react-aria-components": "^1.14.0",
91
- "@opengovsg/oui-theme": "0.0.43"
91
+ "@opengovsg/oui-theme": "0.0.44"
92
92
  },
93
93
  "scripts": {
94
94
  "build": "tsx ../../tooling/build-scripts/main.ts --dts --clean",