@opengovsg/oui 0.0.52 → 0.0.54

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.
@@ -40,7 +40,7 @@ const Button = $670gB$react.forwardRef(
40
40
  ripples
41
41
  } = useRipple.useRipple();
42
42
  const spinner$1 = $670gB$react.useMemo(() => {
43
- if (spinnerProp) {
43
+ if (spinnerProp !== void 0) {
44
44
  return spinnerProp;
45
45
  }
46
46
  const buttonSpinnerSizeMap = {
@@ -27,7 +27,9 @@ function GovtBanner({
27
27
  );
28
28
  const { buttonProps } = reactAria.useButton(triggerProps, triggerRef);
29
29
  const { isFocusVisible, focusProps } = reactAria.useFocusRing();
30
- const slots = ouiTheme.govtBannerStyles();
30
+ const slots = ouiTheme.govtBannerStyles({
31
+ isExpanded: state.isExpanded
32
+ });
31
33
  return /* @__PURE__ */ jsxRuntime.jsxs(
32
34
  "div",
33
35
  {
@@ -15,10 +15,10 @@ const ModalBody = utils.forwardRef(function ModalBody2({ as, ...props }, ref) {
15
15
  Component,
16
16
  {
17
17
  ref,
18
+ ...props,
18
19
  className: slots.body({
19
20
  className: ouiTheme.cn(classNames?.body, props.className)
20
- }),
21
- ...props
21
+ })
22
22
  }
23
23
  );
24
24
  });
@@ -15,10 +15,10 @@ const ModalFooter = utils.forwardRef(function ModalFooter2({ as, ...props }, ref
15
15
  Component,
16
16
  {
17
17
  ref,
18
+ ...props,
18
19
  className: slots.footer({
19
20
  className: ouiTheme.cn(classNames?.footer, props.className)
20
- }),
21
- ...props
21
+ })
22
22
  }
23
23
  );
24
24
  });
@@ -38,7 +38,7 @@ const Button = forwardRef(
38
38
  ripples
39
39
  } = useRipple();
40
40
  const spinner = useMemo(() => {
41
- if (spinnerProp) {
41
+ if (spinnerProp !== void 0) {
42
42
  return spinnerProp;
43
43
  }
44
44
  const buttonSpinnerSizeMap = {
@@ -25,7 +25,9 @@ function GovtBanner({
25
25
  );
26
26
  const { buttonProps } = useButton(triggerProps, triggerRef);
27
27
  const { isFocusVisible, focusProps } = useFocusRing();
28
- const slots = govtBannerStyles();
28
+ const slots = govtBannerStyles({
29
+ isExpanded: state.isExpanded
30
+ });
29
31
  return /* @__PURE__ */ jsxs(
30
32
  "div",
31
33
  {
@@ -13,10 +13,10 @@ const ModalBody = forwardRef(function ModalBody2({ as, ...props }, ref) {
13
13
  Component,
14
14
  {
15
15
  ref,
16
+ ...props,
16
17
  className: slots.body({
17
18
  className: cn(classNames?.body, props.className)
18
- }),
19
- ...props
19
+ })
20
20
  }
21
21
  );
22
22
  });
@@ -13,10 +13,10 @@ const ModalFooter = forwardRef(function ModalFooter2({ as, ...props }, ref) {
13
13
  Component,
14
14
  {
15
15
  ref,
16
+ ...props,
16
17
  className: slots.footer({
17
18
  className: cn(classNames?.footer, props.className)
18
- }),
19
- ...props
19
+ })
20
20
  }
21
21
  );
22
22
  });
@@ -1 +1 @@
1
- {"version":3,"file":"govt-banner.d.ts","sourceRoot":"","sources":["../../../src/govt-banner/govt-banner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAM7C,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAG3E,UAAU,eAAgB,SAAQ,eAAe;IAC/C;;;;;OAKG;IACH,WAAW,CAAC,EAAE,YAAY,CACxB,YAAY,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAC5C,MAAM,CACP,CAAA;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,UAAU,CAAC,EAAE,cAAc,CAAC,eAAe,CAAC,CAAA;CAC7C;AAED,wBAAgB,UAAU,CAAC,EACzB,WAAW,EACX,UAAU,EACV,GAAG,KAAK,EACT,EAAE,eAAe,2CAkJjB"}
1
+ {"version":3,"file":"govt-banner.d.ts","sourceRoot":"","sources":["../../../src/govt-banner/govt-banner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAM7C,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAG3E,UAAU,eAAgB,SAAQ,eAAe;IAC/C;;;;;OAKG;IACH,WAAW,CAAC,EAAE,YAAY,CACxB,YAAY,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAC5C,MAAM,CACP,CAAA;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,UAAU,CAAC,EAAE,cAAc,CAAC,eAAe,CAAC,CAAA;CAC7C;AAED,wBAAgB,UAAU,CAAC,EACzB,WAAW,EACX,UAAU,EACV,GAAG,KAAK,EACT,EAAE,eAAe,2CAoJjB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengovsg/oui",
3
- "version": "0.0.52",
3
+ "version": "0.0.54",
4
4
  "sideEffects": false,
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "type": "module",
@@ -35,7 +35,7 @@
35
35
  "./package.json": "./package.json"
36
36
  },
37
37
  "devDependencies": {
38
- "@storybook/react-vite": "10.1.10",
38
+ "@storybook/react-vite": "10.2.10",
39
39
  "@types/lodash-es": "^4.17.12",
40
40
  "@types/prop-types": "^15.7.15",
41
41
  "@types/react": "^19.2.9",
@@ -47,14 +47,14 @@
47
47
  "prettier": "^3.5.3",
48
48
  "react": "^19.2.3",
49
49
  "react-aria-components": "^1.14.0",
50
- "storybook": "10.1.10",
50
+ "storybook": "10.2.10",
51
51
  "tsx": "^4.21.0",
52
52
  "typescript": "5.7.3",
53
- "@opengovsg/oui-theme": "0.0.52",
54
- "@oui/chromatic": "0.0.0",
55
53
  "@oui/eslint-config": "0.0.0",
56
54
  "@oui/prettier-config": "0.0.0",
57
- "@oui/typescript-config": "0.0.0"
55
+ "@oui/typescript-config": "0.0.0",
56
+ "@opengovsg/oui-theme": "0.0.54",
57
+ "@oui/chromatic": "0.0.0"
58
58
  },
59
59
  "dependencies": {
60
60
  "@internationalized/date": "^3.10.1",
@@ -90,7 +90,7 @@
90
90
  "motion": ">=11.12.0 || >=12.0.0-alpha.1",
91
91
  "react": ">= 18",
92
92
  "react-aria-components": "^1.14.0",
93
- "@opengovsg/oui-theme": "0.0.52"
93
+ "@opengovsg/oui-theme": "0.0.54"
94
94
  },
95
95
  "scripts": {
96
96
  "build": "tsx ../../tooling/build-scripts/main.ts --dts --clean",