@opengovsg/oui 0.0.55 → 0.0.56

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.
Files changed (29) hide show
  1. package/AGENTS.md +1 -1
  2. package/dist/cjs/button/button.cjs +8 -3
  3. package/dist/cjs/calendar/calendar-month-day-selector.cjs +1 -1
  4. package/dist/cjs/file-dropzone/file-dropzone.cjs +14 -3
  5. package/dist/cjs/govt-banner/govt-banner.cjs +63 -143
  6. package/dist/cjs/hooks/use-scroll-position.cjs +6 -6
  7. package/dist/cjs/navbar/use-navbar.cjs +5 -1
  8. package/dist/cjs/pagination/pagination.cjs +1 -1
  9. package/dist/cjs/tag-field/tag-field-list.cjs +1 -8
  10. package/dist/esm/button/button.js +8 -3
  11. package/dist/esm/calendar/calendar-month-day-selector.js +1 -1
  12. package/dist/esm/file-dropzone/file-dropzone.js +14 -3
  13. package/dist/esm/govt-banner/govt-banner.js +64 -144
  14. package/dist/esm/hooks/use-scroll-position.js +6 -6
  15. package/dist/esm/navbar/use-navbar.js +6 -2
  16. package/dist/esm/pagination/pagination.js +1 -1
  17. package/dist/esm/tag-field/tag-field-list.js +1 -8
  18. package/dist/types/button/button.d.ts +10 -0
  19. package/dist/types/button/button.d.ts.map +1 -1
  20. package/dist/types/file-dropzone/file-dropzone.d.ts.map +1 -1
  21. package/dist/types/file-dropzone/utils.d.ts.map +1 -1
  22. package/dist/types/govt-banner/govt-banner.d.ts +5 -14
  23. package/dist/types/govt-banner/govt-banner.d.ts.map +1 -1
  24. package/dist/types/hooks/use-scroll-position.d.ts +4 -2
  25. package/dist/types/hooks/use-scroll-position.d.ts.map +1 -1
  26. package/dist/types/navbar/use-navbar.d.ts.map +1 -1
  27. package/dist/types/pagination/pagination.d.ts.map +1 -1
  28. package/dist/types/tag-field/tag-field-list.d.ts.map +1 -1
  29. package/package.json +4 -4
package/AGENTS.md CHANGED
@@ -33,7 +33,7 @@ Component files land in `components/oui/`, shared utilities in `lib/oui/`. From
33
33
  ## Import
34
34
 
35
35
  ```tsx
36
- import { Button, Accordion, TextField } from "@opengovsg/oui"
36
+ import { Accordion, Button, TextField } from "@opengovsg/oui"
37
37
  ```
38
38
 
39
39
  Subpath imports also work (e.g., `import { Button } from "@opengovsg/oui/button"`).
@@ -32,6 +32,7 @@ const Button = $670gB$react.forwardRef(
32
32
  spinner: spinnerProp,
33
33
  isIconOnly,
34
34
  isAttached,
35
+ preserveWidth,
35
36
  ...props
36
37
  }, ref) => {
37
38
  const {
@@ -52,6 +53,7 @@ const Button = $670gB$react.forwardRef(
52
53
  const spinnerSize = buttonSpinnerSizeMap[size];
53
54
  return /* @__PURE__ */ jsxRuntime.jsx(spinner.Spinner, { size: spinnerSize });
54
55
  }, [size, spinnerProp]);
56
+ const shouldPreserveWidth = isPending && preserveWidth && !loadingText && !pendingElement;
55
57
  return /* @__PURE__ */ jsxRuntime.jsx(
56
58
  reactAriaComponents.Button,
57
59
  {
@@ -75,11 +77,14 @@ const Button = $670gB$react.forwardRef(
75
77
  ref,
76
78
  children: (renderProps) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
77
79
  children.renderChildren(renderProps, startContent),
78
- isPending && spinnerPlacement === "start" ? children.renderChildren(renderProps, spinner$1) : null,
79
- isPending ? null : children.renderChildren(renderProps, children$1),
80
+ isPending && !shouldPreserveWidth && spinnerPlacement === "start" ? children.renderChildren(renderProps, spinner$1) : null,
81
+ !isPending ? children.renderChildren(renderProps, children$1) : shouldPreserveWidth ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative inline-flex items-center justify-center", children: [
82
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "opacity-0", children: children.renderChildren(renderProps, children$1) }),
83
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute inset-0 flex items-center justify-center", children: children.renderChildren(renderProps, spinner$1) })
84
+ ] }) : null,
80
85
  isPending && loadingText ? loadingText : null,
81
86
  isPending && pendingElement ? children.renderChildren(renderProps, pendingElement) : null,
82
- isPending && spinnerPlacement === "end" ? children.renderChildren(renderProps, spinner$1) : null,
87
+ isPending && !shouldPreserveWidth && spinnerPlacement === "end" ? children.renderChildren(renderProps, spinner$1) : null,
83
88
  children.renderChildren(renderProps, endContent),
84
89
  !disableRipple && /* @__PURE__ */ jsxRuntime.jsx(ripple.Ripple, { onClear: onClearRipple, ripples })
85
90
  ] })
@@ -11,8 +11,8 @@ var select = require('../select/select.cjs');
11
11
  var selectItem = require('../select/select-item.cjs');
12
12
  var agnosticCalendarStateContext = require('./agnostic-calendar-state-context.cjs');
13
13
  var calendarStyleContext = require('./calendar-style-context.cjs');
14
- var useCalendarSelectors = require('./use-calendar-selectors.cjs');
15
14
  var i18n = require('./i18n.cjs');
15
+ var useCalendarSelectors = require('./use-calendar-selectors.cjs');
16
16
 
17
17
  const CalendarMonthDaySelector = () => {
18
18
  const { slots, size, classNames } = calendarStyleContext.useCalendarStyleContext();
@@ -3,11 +3,11 @@
3
3
  'use strict';
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
- var reactDropzone = require('react-dropzone');
7
6
  var $670gB$react = require('react');
8
7
  var form = require('@react-stately/form');
9
8
  var reactAria = require('react-aria');
10
9
  var reactAriaComponents = require('react-aria-components');
10
+ var reactDropzone = require('react-dropzone');
11
11
  var ouiTheme = require('@opengovsg/oui-theme');
12
12
  var field = require('../field/field.cjs');
13
13
  var useControllableState = require('../hooks/use-controllable-state.cjs');
@@ -90,7 +90,11 @@ const FileDropzone = (originalProps) => {
90
90
  (file) => {
91
91
  const errors = [];
92
92
  if (maxFileSizeByType.length > 0) {
93
- const limit = utils$1.resolveMaxFileSize(file.type, maxFileSizeByType, maxFileSize);
93
+ const limit = utils$1.resolveMaxFileSize(
94
+ file.type,
95
+ maxFileSizeByType,
96
+ maxFileSize
97
+ );
94
98
  if (limit !== Number.POSITIVE_INFINITY && file.size > limit) {
95
99
  errors.push({
96
100
  code: reactDropzone.ErrorCode.FileTooLarge,
@@ -198,7 +202,14 @@ const FileDropzone = (originalProps) => {
198
202
  return `Minimum file size: ${utils$1.formatBytes(minFileSize, 2, fileSizeBase)}`;
199
203
  }
200
204
  return null;
201
- }, [maxFileSize, maxFileSizeByType, minFileSize, showFileSizeText, fileSizeBase, fileSizeTextOverride]);
205
+ }, [
206
+ maxFileSize,
207
+ maxFileSizeByType,
208
+ minFileSize,
209
+ showFileSizeText,
210
+ fileSizeBase,
211
+ fileSizeTextOverride
212
+ ]);
202
213
  const triggerFileSelector = $670gB$react.useCallback(() => {
203
214
  if (isDisabled || isReadOnly) return;
204
215
  dropzoneState.inputRef.current?.click();
@@ -46,7 +46,7 @@ function GovtBanner({
46
46
  /* @__PURE__ */ jsxRuntime.jsxs(
47
47
  "svg",
48
48
  {
49
- className: slots.crest({ className: classNames?.crest }),
49
+ className: slots.crest(),
50
50
  version: "1.1",
51
51
  viewBox: "0 0 32 32",
52
52
  xmlns: "http://www.w3.org/2000/svg",
@@ -60,163 +60,83 @@ function GovtBanner({
60
60
  ]
61
61
  }
62
62
  ),
63
- /* @__PURE__ */ jsxRuntime.jsxs(
64
- "div",
65
- {
66
- className: slots.mainContent({ className: classNames?.mainContent }),
67
- children: [
68
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "A Singapore Government Agency Website" }),
69
- environment ? /* @__PURE__ */ jsxRuntime.jsxs("b", { children: [
70
- "[NOTE: THIS IS A ",
71
- environment.toUpperCase(),
72
- " WEBSITE]"
73
- ] }) : null,
74
- /* @__PURE__ */ jsxRuntime.jsxs(
75
- "button",
76
- {
77
- className: slots.identifyButton({
78
- className: classNames?.identifyButton
79
- }),
80
- "data-focus-visible": ouiTheme.dataAttr(isFocusVisible),
81
- ref: triggerRef,
82
- type: "button",
83
- ...reactAria.mergeProps(buttonProps, focusProps),
84
- children: [
85
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: slots.link({ className: classNames?.link }), children: "How to identify" }),
86
- /* @__PURE__ */ jsxRuntime.jsx(
87
- chevronDown.default,
88
- {
89
- className: slots.chevron({ className: classNames?.chevron })
90
- }
91
- )
92
- ]
93
- }
94
- )
95
- ]
96
- }
97
- )
98
- ]
99
- }
100
- ),
101
- /* @__PURE__ */ jsxRuntime.jsx("div", { ref: panelRef, ...panelProps, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: slots.panel({ className: classNames?.panel }), children: [
102
- /* @__PURE__ */ jsxRuntime.jsxs(
103
- "div",
104
- {
105
- className: slots.panelGroup({
106
- className: classNames?.panelGroup
107
- }),
108
- children: [
109
- /* @__PURE__ */ jsxRuntime.jsx(
110
- landmark.default,
111
- {
112
- className: slots.panelIcon({ className: classNames?.panelIcon })
113
- }
114
- ),
63
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: slots.mainContent(), children: [
64
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "A Singapore Government Agency Website" }),
65
+ environment ? /* @__PURE__ */ jsxRuntime.jsxs("b", { children: [
66
+ "[NOTE: THIS IS A ",
67
+ environment.toUpperCase(),
68
+ " WEBSITE]"
69
+ ] }) : null,
115
70
  /* @__PURE__ */ jsxRuntime.jsxs(
116
- "div",
71
+ "button",
117
72
  {
118
- className: slots.panelSection({
119
- className: classNames?.panelSection
120
- }),
73
+ className: slots.identifyButton(),
74
+ "data-focus-visible": ouiTheme.dataAttr(isFocusVisible),
75
+ ref: triggerRef,
76
+ type: "button",
77
+ ...reactAria.mergeProps(buttonProps, focusProps),
121
78
  children: [
122
- /* @__PURE__ */ jsxRuntime.jsx(
123
- "div",
124
- {
125
- className: slots.panelHeader({
126
- className: classNames?.panelHeader
127
- }),
128
- children: "Official website links end with .gov.sg"
129
- }
130
- ),
131
- /* @__PURE__ */ jsxRuntime.jsxs("article", { children: [
132
- "Government agencies communicate via ",
133
- /* @__PURE__ */ jsxRuntime.jsx("b", { children: ".gov.sg" }),
134
- " websites (e.g. go.gov.sg/open).",
135
- " ",
136
- /* @__PURE__ */ jsxRuntime.jsxs(
137
- "a",
138
- {
139
- className: slots.link({ className: classNames?.link }),
140
- href: "https://www.gov.sg/trusted-sites#govsites",
141
- rel: "noreferrer",
142
- target: "_blank",
143
- children: [
144
- "Trusted websites",
145
- /* @__PURE__ */ jsxRuntime.jsx(
146
- externalLink.default,
147
- {
148
- "aria-hidden": true,
149
- className: slots.inlineIcon({
150
- className: ouiTheme.twMerge("ml-0.5", classNames?.inlineIcon)
151
- })
152
- }
153
- )
154
- ]
155
- }
156
- )
157
- ] })
79
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: slots.link(), children: "How to identify" }),
80
+ /* @__PURE__ */ jsxRuntime.jsx(chevronDown.default, { className: slots.chevron() })
158
81
  ]
159
82
  }
160
83
  )
161
- ]
162
- }
163
- ),
164
- /* @__PURE__ */ jsxRuntime.jsxs(
165
- "div",
166
- {
167
- className: slots.panelGroup({
168
- className: classNames?.panelGroup
169
- }),
170
- children: [
171
- /* @__PURE__ */ jsxRuntime.jsx(
172
- lock.default,
173
- {
174
- className: slots.panelIcon({ className: classNames?.panelIcon })
175
- }
176
- ),
84
+ ] })
85
+ ]
86
+ }
87
+ ),
88
+ /* @__PURE__ */ jsxRuntime.jsx("div", { ref: panelRef, ...panelProps, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: slots.panel(), children: [
89
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: slots.panelGroup(), children: [
90
+ /* @__PURE__ */ jsxRuntime.jsx(landmark.default, { className: slots.panelIcon() }),
91
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: slots.panelSection(), children: [
92
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: slots.panelHeader(), children: "Official website links end with .gov.sg" }),
93
+ /* @__PURE__ */ jsxRuntime.jsxs("article", { children: [
94
+ "Government agencies communicate via ",
95
+ /* @__PURE__ */ jsxRuntime.jsx("b", { children: ".gov.sg" }),
96
+ " websites (e.g. go.gov.sg/open).",
97
+ " ",
177
98
  /* @__PURE__ */ jsxRuntime.jsxs(
178
- "div",
99
+ "a",
179
100
  {
180
- className: slots.panelSection({
181
- className: classNames?.panelSection
182
- }),
101
+ className: slots.link(),
102
+ href: "https://www.gov.sg/trusted-sites#govsites",
103
+ rel: "noreferrer",
104
+ target: "_blank",
183
105
  children: [
106
+ "Trusted websites",
184
107
  /* @__PURE__ */ jsxRuntime.jsx(
185
- "p",
108
+ externalLink.default,
186
109
  {
187
- className: slots.panelHeader({
188
- className: classNames?.panelHeader
189
- }),
190
- children: "Secure websites use HTTPS"
110
+ "aria-hidden": true,
111
+ className: slots.inlineIcon({ className: "ml-0.5" })
191
112
  }
192
- ),
193
- /* @__PURE__ */ jsxRuntime.jsxs("article", { children: [
194
- "Look for a ",
195
- /* @__PURE__ */ jsxRuntime.jsx("b", { children: "lock" }),
196
- " ",
197
- /* @__PURE__ */ jsxRuntime.jsxs("span", { "aria-hidden": true, children: [
198
- "(",
199
- /* @__PURE__ */ jsxRuntime.jsx(
200
- lock.default,
201
- {
202
- className: slots.inlineIcon({
203
- className: classNames?.inlineIcon
204
- })
205
- }
206
- ),
207
- ")"
208
- ] }),
209
- " ",
210
- "or ",
211
- /* @__PURE__ */ jsxRuntime.jsx("b", { children: "https://" }),
212
- " as an added precaution. Share sensitive information only on official, secure websites."
213
- ] })
113
+ )
214
114
  ]
215
115
  }
216
116
  )
217
- ]
218
- }
219
- )
117
+ ] })
118
+ ] })
119
+ ] }),
120
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: slots.panelGroup(), children: [
121
+ /* @__PURE__ */ jsxRuntime.jsx(lock.default, { className: slots.panelIcon() }),
122
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: slots.panelSection(), children: [
123
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: slots.panelHeader(), children: "Secure websites use HTTPS" }),
124
+ /* @__PURE__ */ jsxRuntime.jsxs("article", { children: [
125
+ "Look for a ",
126
+ /* @__PURE__ */ jsxRuntime.jsx("b", { children: "lock" }),
127
+ " ",
128
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { "aria-hidden": true, children: [
129
+ "(",
130
+ /* @__PURE__ */ jsxRuntime.jsx(lock.default, { className: slots.inlineIcon() }),
131
+ ")"
132
+ ] }),
133
+ " ",
134
+ "or ",
135
+ /* @__PURE__ */ jsxRuntime.jsx("b", { children: "https://" }),
136
+ " as an added precaution. Share sensitive information only on official, secure websites."
137
+ ] })
138
+ ] })
139
+ ] })
220
140
  ] }) })
221
141
  ]
222
142
  }
@@ -12,19 +12,19 @@ function getScrollPosition(element) {
12
12
  return { x: element.scrollLeft, y: element.scrollTop };
13
13
  }
14
14
  const useScrollPosition = (props) => {
15
- const { elementRef, delay = 30, callback, isEnabled } = props;
15
+ const { element, delay = 30, callback, isEnabled } = props;
16
16
  const position = $670gB$react.useRef(
17
- isEnabled ? getScrollPosition(elementRef?.current) : { x: 0, y: 0 }
17
+ isEnabled ? getScrollPosition(element) : { x: 0, y: 0 }
18
18
  );
19
19
  const throttleTimeout = $670gB$react.useRef(null);
20
20
  const handler = $670gB$react.useCallback(() => {
21
- const currPos = getScrollPosition(elementRef?.current);
21
+ const currPos = getScrollPosition(element);
22
22
  if (typeof callback === "function") {
23
23
  callback({ prevPos: position.current, currPos });
24
24
  }
25
25
  position.current = currPos;
26
26
  throttleTimeout.current = null;
27
- }, [callback, elementRef]);
27
+ }, [callback, element]);
28
28
  $670gB$react.useEffect(() => {
29
29
  if (!isEnabled) return;
30
30
  const handleScroll = () => {
@@ -37,7 +37,7 @@ const useScrollPosition = (props) => {
37
37
  handler();
38
38
  }
39
39
  };
40
- const target = elementRef?.current || window;
40
+ const target = element || window;
41
41
  target.addEventListener("scroll", handleScroll);
42
42
  return () => {
43
43
  target.removeEventListener("scroll", handleScroll);
@@ -46,7 +46,7 @@ const useScrollPosition = (props) => {
46
46
  throttleTimeout.current = null;
47
47
  }
48
48
  };
49
- }, [elementRef?.current, delay, handler, isEnabled]);
49
+ }, [element, delay, handler, isEnabled]);
50
50
  return position.current;
51
51
  };
52
52
 
@@ -70,8 +70,12 @@ function useNavbar(originalProps) {
70
70
  $670gB$react.useEffect(() => {
71
71
  navHeight.current = domRef.current?.offsetHeight || 0;
72
72
  }, [domRef]);
73
+ const [scrollElement, setScrollElement] = $670gB$react.useState(null);
74
+ $670gB$react.useLayoutEffect(() => {
75
+ setScrollElement(parentRef?.current ?? null);
76
+ }, [parentRef]);
73
77
  useScrollPosition.useScrollPosition({
74
- elementRef: parentRef,
78
+ element: scrollElement,
75
79
  isEnabled: shouldShowOnScrollUp || !disableScrollHandler,
76
80
  callback: ({ prevPos, currPos }) => {
77
81
  onScrollPositionChange?.(currPos.y);
@@ -7,10 +7,10 @@ var $670gB$react = require('react');
7
7
  var i18n = require('@react-aria/i18n');
8
8
  var ouiTheme = require('@opengovsg/oui-theme');
9
9
  var utils = require('../system/utils.cjs');
10
- var usePaginationBase = require('./use-pagination-base.cjs');
11
10
  var paginationCursor = require('./pagination-cursor.cjs');
12
11
  var paginationItem = require('./pagination-item.cjs');
13
12
  var usePagination = require('./use-pagination.cjs');
13
+ var usePaginationBase = require('./use-pagination-base.cjs');
14
14
  var chevronLeft = require('../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-left.cjs');
15
15
  var ellipsis = require('../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/ellipsis.cjs');
16
16
  var chevronsRight = require('../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevrons-right.cjs');
@@ -67,14 +67,7 @@ const TagFieldListInner = (props, ref) => {
67
67
  if (typeof props.children === "function") {
68
68
  return props.children({ ...childProps, itemProps });
69
69
  }
70
- return /* @__PURE__ */ $670gB$react.createElement(
71
- tagFieldItem.TagFieldItem,
72
- {
73
- ...childProps,
74
- ...itemProps,
75
- key
76
- }
77
- );
70
+ return /* @__PURE__ */ $670gB$react.createElement(tagFieldItem.TagFieldItem, { ...childProps, ...itemProps, key });
78
71
  }) });
79
72
  };
80
73
  const TagFieldList = utils.forwardRefGeneric(TagFieldListInner);
@@ -30,6 +30,7 @@ const Button = forwardRef(
30
30
  spinner: spinnerProp,
31
31
  isIconOnly,
32
32
  isAttached,
33
+ preserveWidth,
33
34
  ...props
34
35
  }, ref) => {
35
36
  const {
@@ -50,6 +51,7 @@ const Button = forwardRef(
50
51
  const spinnerSize = buttonSpinnerSizeMap[size];
51
52
  return /* @__PURE__ */ jsx(Spinner, { size: spinnerSize });
52
53
  }, [size, spinnerProp]);
54
+ const shouldPreserveWidth = isPending && preserveWidth && !loadingText && !pendingElement;
53
55
  return /* @__PURE__ */ jsx(
54
56
  Button$1,
55
57
  {
@@ -73,11 +75,14 @@ const Button = forwardRef(
73
75
  ref,
74
76
  children: (renderProps) => /* @__PURE__ */ jsxs(Fragment, { children: [
75
77
  renderChildren(renderProps, startContent),
76
- isPending && spinnerPlacement === "start" ? renderChildren(renderProps, spinner) : null,
77
- isPending ? null : renderChildren(renderProps, children),
78
+ isPending && !shouldPreserveWidth && spinnerPlacement === "start" ? renderChildren(renderProps, spinner) : null,
79
+ !isPending ? renderChildren(renderProps, children) : shouldPreserveWidth ? /* @__PURE__ */ jsxs("span", { className: "relative inline-flex items-center justify-center", children: [
80
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "opacity-0", children: renderChildren(renderProps, children) }),
81
+ /* @__PURE__ */ jsx("span", { className: "absolute inset-0 flex items-center justify-center", children: renderChildren(renderProps, spinner) })
82
+ ] }) : null,
78
83
  isPending && loadingText ? loadingText : null,
79
84
  isPending && pendingElement ? renderChildren(renderProps, pendingElement) : null,
80
- isPending && spinnerPlacement === "end" ? renderChildren(renderProps, spinner) : null,
85
+ isPending && !shouldPreserveWidth && spinnerPlacement === "end" ? renderChildren(renderProps, spinner) : null,
81
86
  renderChildren(renderProps, endContent),
82
87
  !disableRipple && /* @__PURE__ */ jsx(Ripple, { onClear: onClearRipple, ripples })
83
88
  ] })
@@ -9,8 +9,8 @@ import { Select } from '../select/select.js';
9
9
  import { SelectItem } from '../select/select-item.js';
10
10
  import { AgnosticCalendarStateContext } from './agnostic-calendar-state-context.js';
11
11
  import { useCalendarStyleContext } from './calendar-style-context.js';
12
- import { useCalendarSelectors } from './use-calendar-selectors.js';
13
12
  import { i18nStrings } from './i18n.js';
13
+ import { useCalendarSelectors } from './use-calendar-selectors.js';
14
14
 
15
15
  const CalendarMonthDaySelector = () => {
16
16
  const { slots, size, classNames } = useCalendarStyleContext();
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  "use client";
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
- import { ErrorCode, useDropzone } from 'react-dropzone';
5
4
  import { useCallback, useMemo, useEffect } from 'react';
6
5
  import { useFormValidationState } from '@react-stately/form';
7
6
  import { useField, useId } from 'react-aria';
8
7
  import { Provider, LabelContext, GroupContext, TextContext, FieldErrorContext, Group } from 'react-aria-components';
8
+ import { ErrorCode, useDropzone } from 'react-dropzone';
9
9
  import { fileDropzoneStyles, dataAttr } from '@opengovsg/oui-theme';
10
10
  import { Label, Description, FieldError } from '../field/field.js';
11
11
  import { useControllableState } from '../hooks/use-controllable-state.js';
@@ -88,7 +88,11 @@ const FileDropzone = (originalProps) => {
88
88
  (file) => {
89
89
  const errors = [];
90
90
  if (maxFileSizeByType.length > 0) {
91
- const limit = resolveMaxFileSize(file.type, maxFileSizeByType, maxFileSize);
91
+ const limit = resolveMaxFileSize(
92
+ file.type,
93
+ maxFileSizeByType,
94
+ maxFileSize
95
+ );
92
96
  if (limit !== Number.POSITIVE_INFINITY && file.size > limit) {
93
97
  errors.push({
94
98
  code: ErrorCode.FileTooLarge,
@@ -196,7 +200,14 @@ const FileDropzone = (originalProps) => {
196
200
  return `Minimum file size: ${formatBytes(minFileSize, 2, fileSizeBase)}`;
197
201
  }
198
202
  return null;
199
- }, [maxFileSize, maxFileSizeByType, minFileSize, showFileSizeText, fileSizeBase, fileSizeTextOverride]);
203
+ }, [
204
+ maxFileSize,
205
+ maxFileSizeByType,
206
+ minFileSize,
207
+ showFileSizeText,
208
+ fileSizeBase,
209
+ fileSizeTextOverride
210
+ ]);
200
211
  const triggerFileSelector = useCallback(() => {
201
212
  if (isDisabled || isReadOnly) return;
202
213
  dropzoneState.inputRef.current?.click();
@@ -4,7 +4,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
4
4
  import { useRef } from 'react';
5
5
  import { useDisclosure, useButton, useFocusRing, mergeProps } from 'react-aria';
6
6
  import { useDisclosureState } from 'react-stately';
7
- import { govtBannerStyles, dataAttr, twMerge } from '@opengovsg/oui-theme';
7
+ import { govtBannerStyles, dataAttr } from '@opengovsg/oui-theme';
8
8
  import ChevronDown from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-down.js';
9
9
  import Landmark from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/landmark.js';
10
10
  import ExternalLink from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/external-link.js';
@@ -44,7 +44,7 @@ function GovtBanner({
44
44
  /* @__PURE__ */ jsxs(
45
45
  "svg",
46
46
  {
47
- className: slots.crest({ className: classNames?.crest }),
47
+ className: slots.crest(),
48
48
  version: "1.1",
49
49
  viewBox: "0 0 32 32",
50
50
  xmlns: "http://www.w3.org/2000/svg",
@@ -58,163 +58,83 @@ function GovtBanner({
58
58
  ]
59
59
  }
60
60
  ),
61
- /* @__PURE__ */ jsxs(
62
- "div",
63
- {
64
- className: slots.mainContent({ className: classNames?.mainContent }),
65
- children: [
66
- /* @__PURE__ */ jsx("span", { children: "A Singapore Government Agency Website" }),
67
- environment ? /* @__PURE__ */ jsxs("b", { children: [
68
- "[NOTE: THIS IS A ",
69
- environment.toUpperCase(),
70
- " WEBSITE]"
71
- ] }) : null,
72
- /* @__PURE__ */ jsxs(
73
- "button",
74
- {
75
- className: slots.identifyButton({
76
- className: classNames?.identifyButton
77
- }),
78
- "data-focus-visible": dataAttr(isFocusVisible),
79
- ref: triggerRef,
80
- type: "button",
81
- ...mergeProps(buttonProps, focusProps),
82
- children: [
83
- /* @__PURE__ */ jsx("span", { className: slots.link({ className: classNames?.link }), children: "How to identify" }),
84
- /* @__PURE__ */ jsx(
85
- ChevronDown,
86
- {
87
- className: slots.chevron({ className: classNames?.chevron })
88
- }
89
- )
90
- ]
91
- }
92
- )
93
- ]
94
- }
95
- )
96
- ]
97
- }
98
- ),
99
- /* @__PURE__ */ jsx("div", { ref: panelRef, ...panelProps, children: /* @__PURE__ */ jsxs("div", { className: slots.panel({ className: classNames?.panel }), children: [
100
- /* @__PURE__ */ jsxs(
101
- "div",
102
- {
103
- className: slots.panelGroup({
104
- className: classNames?.panelGroup
105
- }),
106
- children: [
107
- /* @__PURE__ */ jsx(
108
- Landmark,
109
- {
110
- className: slots.panelIcon({ className: classNames?.panelIcon })
111
- }
112
- ),
61
+ /* @__PURE__ */ jsxs("div", { className: slots.mainContent(), children: [
62
+ /* @__PURE__ */ jsx("span", { children: "A Singapore Government Agency Website" }),
63
+ environment ? /* @__PURE__ */ jsxs("b", { children: [
64
+ "[NOTE: THIS IS A ",
65
+ environment.toUpperCase(),
66
+ " WEBSITE]"
67
+ ] }) : null,
113
68
  /* @__PURE__ */ jsxs(
114
- "div",
69
+ "button",
115
70
  {
116
- className: slots.panelSection({
117
- className: classNames?.panelSection
118
- }),
71
+ className: slots.identifyButton(),
72
+ "data-focus-visible": dataAttr(isFocusVisible),
73
+ ref: triggerRef,
74
+ type: "button",
75
+ ...mergeProps(buttonProps, focusProps),
119
76
  children: [
120
- /* @__PURE__ */ jsx(
121
- "div",
122
- {
123
- className: slots.panelHeader({
124
- className: classNames?.panelHeader
125
- }),
126
- children: "Official website links end with .gov.sg"
127
- }
128
- ),
129
- /* @__PURE__ */ jsxs("article", { children: [
130
- "Government agencies communicate via ",
131
- /* @__PURE__ */ jsx("b", { children: ".gov.sg" }),
132
- " websites (e.g. go.gov.sg/open).",
133
- " ",
134
- /* @__PURE__ */ jsxs(
135
- "a",
136
- {
137
- className: slots.link({ className: classNames?.link }),
138
- href: "https://www.gov.sg/trusted-sites#govsites",
139
- rel: "noreferrer",
140
- target: "_blank",
141
- children: [
142
- "Trusted websites",
143
- /* @__PURE__ */ jsx(
144
- ExternalLink,
145
- {
146
- "aria-hidden": true,
147
- className: slots.inlineIcon({
148
- className: twMerge("ml-0.5", classNames?.inlineIcon)
149
- })
150
- }
151
- )
152
- ]
153
- }
154
- )
155
- ] })
77
+ /* @__PURE__ */ jsx("span", { className: slots.link(), children: "How to identify" }),
78
+ /* @__PURE__ */ jsx(ChevronDown, { className: slots.chevron() })
156
79
  ]
157
80
  }
158
81
  )
159
- ]
160
- }
161
- ),
162
- /* @__PURE__ */ jsxs(
163
- "div",
164
- {
165
- className: slots.panelGroup({
166
- className: classNames?.panelGroup
167
- }),
168
- children: [
169
- /* @__PURE__ */ jsx(
170
- Lock,
171
- {
172
- className: slots.panelIcon({ className: classNames?.panelIcon })
173
- }
174
- ),
82
+ ] })
83
+ ]
84
+ }
85
+ ),
86
+ /* @__PURE__ */ jsx("div", { ref: panelRef, ...panelProps, children: /* @__PURE__ */ jsxs("div", { className: slots.panel(), children: [
87
+ /* @__PURE__ */ jsxs("div", { className: slots.panelGroup(), children: [
88
+ /* @__PURE__ */ jsx(Landmark, { className: slots.panelIcon() }),
89
+ /* @__PURE__ */ jsxs("div", { className: slots.panelSection(), children: [
90
+ /* @__PURE__ */ jsx("div", { className: slots.panelHeader(), children: "Official website links end with .gov.sg" }),
91
+ /* @__PURE__ */ jsxs("article", { children: [
92
+ "Government agencies communicate via ",
93
+ /* @__PURE__ */ jsx("b", { children: ".gov.sg" }),
94
+ " websites (e.g. go.gov.sg/open).",
95
+ " ",
175
96
  /* @__PURE__ */ jsxs(
176
- "div",
97
+ "a",
177
98
  {
178
- className: slots.panelSection({
179
- className: classNames?.panelSection
180
- }),
99
+ className: slots.link(),
100
+ href: "https://www.gov.sg/trusted-sites#govsites",
101
+ rel: "noreferrer",
102
+ target: "_blank",
181
103
  children: [
104
+ "Trusted websites",
182
105
  /* @__PURE__ */ jsx(
183
- "p",
106
+ ExternalLink,
184
107
  {
185
- className: slots.panelHeader({
186
- className: classNames?.panelHeader
187
- }),
188
- children: "Secure websites use HTTPS"
108
+ "aria-hidden": true,
109
+ className: slots.inlineIcon({ className: "ml-0.5" })
189
110
  }
190
- ),
191
- /* @__PURE__ */ jsxs("article", { children: [
192
- "Look for a ",
193
- /* @__PURE__ */ jsx("b", { children: "lock" }),
194
- " ",
195
- /* @__PURE__ */ jsxs("span", { "aria-hidden": true, children: [
196
- "(",
197
- /* @__PURE__ */ jsx(
198
- Lock,
199
- {
200
- className: slots.inlineIcon({
201
- className: classNames?.inlineIcon
202
- })
203
- }
204
- ),
205
- ")"
206
- ] }),
207
- " ",
208
- "or ",
209
- /* @__PURE__ */ jsx("b", { children: "https://" }),
210
- " as an added precaution. Share sensitive information only on official, secure websites."
211
- ] })
111
+ )
212
112
  ]
213
113
  }
214
114
  )
215
- ]
216
- }
217
- )
115
+ ] })
116
+ ] })
117
+ ] }),
118
+ /* @__PURE__ */ jsxs("div", { className: slots.panelGroup(), children: [
119
+ /* @__PURE__ */ jsx(Lock, { className: slots.panelIcon() }),
120
+ /* @__PURE__ */ jsxs("div", { className: slots.panelSection(), children: [
121
+ /* @__PURE__ */ jsx("p", { className: slots.panelHeader(), children: "Secure websites use HTTPS" }),
122
+ /* @__PURE__ */ jsxs("article", { children: [
123
+ "Look for a ",
124
+ /* @__PURE__ */ jsx("b", { children: "lock" }),
125
+ " ",
126
+ /* @__PURE__ */ jsxs("span", { "aria-hidden": true, children: [
127
+ "(",
128
+ /* @__PURE__ */ jsx(Lock, { className: slots.inlineIcon() }),
129
+ ")"
130
+ ] }),
131
+ " ",
132
+ "or ",
133
+ /* @__PURE__ */ jsx("b", { children: "https://" }),
134
+ " as an added precaution. Share sensitive information only on official, secure websites."
135
+ ] })
136
+ ] })
137
+ ] })
218
138
  ] }) })
219
139
  ]
220
140
  }
@@ -10,19 +10,19 @@ function getScrollPosition(element) {
10
10
  return { x: element.scrollLeft, y: element.scrollTop };
11
11
  }
12
12
  const useScrollPosition = (props) => {
13
- const { elementRef, delay = 30, callback, isEnabled } = props;
13
+ const { element, delay = 30, callback, isEnabled } = props;
14
14
  const position = useRef(
15
- isEnabled ? getScrollPosition(elementRef?.current) : { x: 0, y: 0 }
15
+ isEnabled ? getScrollPosition(element) : { x: 0, y: 0 }
16
16
  );
17
17
  const throttleTimeout = useRef(null);
18
18
  const handler = useCallback(() => {
19
- const currPos = getScrollPosition(elementRef?.current);
19
+ const currPos = getScrollPosition(element);
20
20
  if (typeof callback === "function") {
21
21
  callback({ prevPos: position.current, currPos });
22
22
  }
23
23
  position.current = currPos;
24
24
  throttleTimeout.current = null;
25
- }, [callback, elementRef]);
25
+ }, [callback, element]);
26
26
  useEffect(() => {
27
27
  if (!isEnabled) return;
28
28
  const handleScroll = () => {
@@ -35,7 +35,7 @@ const useScrollPosition = (props) => {
35
35
  handler();
36
36
  }
37
37
  };
38
- const target = elementRef?.current || window;
38
+ const target = element || window;
39
39
  target.addEventListener("scroll", handleScroll);
40
40
  return () => {
41
41
  target.removeEventListener("scroll", handleScroll);
@@ -44,7 +44,7 @@ const useScrollPosition = (props) => {
44
44
  throttleTimeout.current = null;
45
45
  }
46
46
  };
47
- }, [elementRef?.current, delay, handler, isEnabled]);
47
+ }, [element, delay, handler, isEnabled]);
48
48
  return position.current;
49
49
  };
50
50
 
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  "use client";
3
- import { useRef, useCallback, useState, useEffect } from 'react';
3
+ import { useRef, useCallback, useState, useEffect, useLayoutEffect } from 'react';
4
4
  import { usePreventScroll as $49c51c25361d4cd2$export$ee0f7cc6afcd1c18 } from '../node_modules/.pnpm/@react-aria_overlays@3.31.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@react-aria/overlays/dist/usePreventScroll.js';
5
5
  import { useResizeObserver, mergeProps } from '@react-aria/utils';
6
6
  import { useControlledState } from '@react-stately/utils';
@@ -68,8 +68,12 @@ function useNavbar(originalProps) {
68
68
  useEffect(() => {
69
69
  navHeight.current = domRef.current?.offsetHeight || 0;
70
70
  }, [domRef]);
71
+ const [scrollElement, setScrollElement] = useState(null);
72
+ useLayoutEffect(() => {
73
+ setScrollElement(parentRef?.current ?? null);
74
+ }, [parentRef]);
71
75
  useScrollPosition({
72
- elementRef: parentRef,
76
+ element: scrollElement,
73
77
  isEnabled: shouldShowOnScrollUp || !disableScrollHandler,
74
78
  callback: ({ prevPos, currPos }) => {
75
79
  onScrollPositionChange?.(currPos.y);
@@ -5,10 +5,10 @@ import { useCallback, createElement } from 'react';
5
5
  import { useLocale } from '@react-aria/i18n';
6
6
  import { cn, dataAttr } from '@opengovsg/oui-theme';
7
7
  import { forwardRef } from '../system/utils.js';
8
- import { PaginationItemType } from './use-pagination-base.js';
9
8
  import { PaginationCursor } from './pagination-cursor.js';
10
9
  import { PaginationItem } from './pagination-item.js';
11
10
  import { usePagination } from './use-pagination.js';
11
+ import { PaginationItemType } from './use-pagination-base.js';
12
12
  import ChevronLeft from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-left.js';
13
13
  import Ellipsis from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/ellipsis.js';
14
14
  import ChevronsRight from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevrons-right.js';
@@ -65,14 +65,7 @@ const TagFieldListInner = (props, ref) => {
65
65
  if (typeof props.children === "function") {
66
66
  return props.children({ ...childProps, itemProps });
67
67
  }
68
- return /* @__PURE__ */ createElement(
69
- TagFieldItem,
70
- {
71
- ...childProps,
72
- ...itemProps,
73
- key
74
- }
75
- );
68
+ return /* @__PURE__ */ createElement(TagFieldItem, { ...childProps, ...itemProps, key });
76
69
  }) });
77
70
  };
78
71
  const TagFieldList = forwardRefGeneric(TagFieldListInner);
@@ -41,6 +41,16 @@ export interface ButtonProps extends AriaButtonProps, ButtonVariantProps {
41
41
  * If true, you must provide an `aria-label` for accessibility.
42
42
  */
43
43
  isIconOnly?: boolean;
44
+ /**
45
+ * Whether to preserve the button's width while pending to prevent layout
46
+ * shift. When enabled, the children are kept in the layout (hidden via
47
+ * `opacity-0` and `aria-hidden`) and the spinner is overlaid on top.
48
+ *
49
+ * Only applies when no `loadingText` or `pendingElement` is provided, since
50
+ * those replace the children with content of a different width.
51
+ * @defaultValue false
52
+ */
53
+ preserveWidth?: boolean;
44
54
  }
45
55
  /**
46
56
  * You probably do not want to use this component if you are rendering a link.
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/button/button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,WAAW,IAAI,eAAe,EAC9B,WAAW,EACZ,MAAM,uBAAuB,CAAA;AAK9B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAQ9D,MAAM,WAAW,WAAY,SAAQ,eAAe,EAAE,kBAAkB;IACtE;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC,UAAU,CAAC,CAAA;IACnD;;OAEG;IACH,UAAU,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC,UAAU,CAAC,CAAA;IACjD;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC,UAAU,CAAC,CAAA;IAE9C;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;;OAGG;IACH,cAAc,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC,UAAU,CAAC,CAAA;IAErD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;IAElC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,2GAyFlB,CAAA"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/button/button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,WAAW,IAAI,eAAe,EAC9B,WAAW,EACZ,MAAM,uBAAuB,CAAA;AAK9B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAQ9D,MAAM,WAAW,WAAY,SAAQ,eAAe,EAAE,kBAAkB;IACtE;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC,UAAU,CAAC,CAAA;IACnD;;OAEG;IACH,UAAU,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC,UAAU,CAAC,CAAA;IACjD;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC,UAAU,CAAC,CAAA;IAE9C;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;;OAGG;IACH,cAAc,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC,UAAU,CAAC,CAAA;IAErD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;IAElC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,2GA2GlB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"file-dropzone.d.ts","sourceRoot":"","sources":["../../../src/file-dropzone/file-dropzone.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,UA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,CAAC,CAAC,MAAM,CAAC,UAC9B;IACN,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,QAAQ,GAAG,SAAS,CAAA;CACnC,WAgBF,CAAA"}
@@ -10,29 +10,20 @@ interface GovtBannerProps extends DisclosureProps {
10
10
  */
11
11
  environment?: LiteralUnion<"production" | "staging" | "uat" | "preview", string>;
12
12
  /**
13
- * List of classes to change the className of the element.
13
+ * List of classes to change the className of the element. Only the outer
14
+ * container slots can be overridden; the internal layout and styling are
15
+ * fixed to keep the banner consistent across applications.
14
16
  *
15
17
  * @example
16
18
  * ```text
17
19
  * Component: GovtBanner
18
20
  *
19
21
  * Class names:
20
- * - banner: the wrapper of the full government banner component,
22
+ * - banner: the wrapper of the full government banner component
21
23
  * - mainContentContainer: the wrapper of the main content of the banner
22
- * - crest: the SVG of the government crest
23
- * - mainContent: the main content of the banner
24
- * - link: link stylings
25
- * - identifyButton: for the "how to identify" button
26
- * - chevron: the chevron icon beside the "how to identify" button
27
- * - panel: the wrapper for the panel that appears when the "how to identify" button is clicked
28
- * - panelGroup: the wrapper for the panel group containing the icon and the panel section
29
- * - panelIcon: the icon in the panel group
30
- * - panelSection: the wrapper for the panel section containing the header and content
31
- * - panelHeader: the header in the panel section
32
- * - inlineIcon: the icon in the panel content
33
24
  * ```
34
25
  */
35
- classNames?: SlotsToClasses<GovtBannerSlots>;
26
+ classNames?: Pick<SlotsToClasses<GovtBannerSlots>, "banner" | "mainContentContainer">;
36
27
  }
37
28
  export declare function GovtBanner({ environment, classNames, ...props }: GovtBannerProps): import("react/jsx-runtime").JSX.Element;
38
29
  export {};
@@ -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,2CAoJjB"}
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;;;;;;;;;;;;;OAaG;IACH,UAAU,CAAC,EAAE,IAAI,CACf,cAAc,CAAC,eAAe,CAAC,EAC/B,QAAQ,GAAG,sBAAsB,CAClC,CAAA;CACF;AAED,wBAAgB,UAAU,CAAC,EACzB,WAAW,EACX,UAAU,EACV,GAAG,KAAK,EACT,EAAE,eAAe,2CAuGjB"}
@@ -14,9 +14,11 @@ export interface UseScrollPositionOptions {
14
14
  */
15
15
  isEnabled?: boolean;
16
16
  /**
17
- * The element to track the scroll position for.
17
+ * The element to track the scroll position for. Pass a `useState`-held
18
+ * element (via a callback ref) so the effect re-runs when the element
19
+ * mounts. Falls back to `window` when `null` or `undefined`.
18
20
  */
19
- elementRef?: React.RefObject<HTMLElement> | null;
21
+ element?: HTMLElement | null;
20
22
  /**
21
23
  * The callback function to be called when the scroll position changes.
22
24
  */
@@ -1 +1 @@
1
- {"version":3,"file":"use-scroll-position.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-scroll-position.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,WAAW,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAalD,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,IAAI,CAAA;IAChD;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,EACV,OAAO,EACP,OAAO,GACR,EAAE;QACD,OAAO,EAAE,WAAW,CAAA;QACpB,OAAO,EAAE,WAAW,CAAA;KACrB,KAAK,IAAI,CAAA;CACX;AAED,eAAO,MAAM,iBAAiB,UACrB,wBAAwB,KAC9B,WAiDF,CAAA"}
1
+ {"version":3,"file":"use-scroll-position.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-scroll-position.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,WAAW,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAalD,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,EACV,OAAO,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9B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B;;;OAGG;IACH,sBAAsB,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAA;IACzD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B;;;OAGG;IACH,WAAW,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAA;IACjD;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;IAC5C;;;OAGG;IACH,UAAU,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAA;CACzC;AAED,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,kBAAkB,CAAA;AAEvD,wBAAgB,SAAS,CAAC,aAAa,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmItD;AAED,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../src/pagination/pagination.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAQ1D,MAAM,WAAW,eAAgB,SAAQ,kBAAkB;CAAG;AAE9D,eAAO,MAAM,UAAU,2FAiRrB,CAAA"}
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../src/pagination/pagination.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAS1D,MAAM,WAAW,eAAgB,SAAQ,kBAAkB;CAAG;AAE9D,eAAO,MAAM,UAAU,2FAiRrB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"tag-field-list.d.ts","sourceRoot":"","sources":["../../../src/tag-field/tag-field-list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAIpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACzD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAKtD,MAAM,WAAW,wBACf,SAAQ,SAAS,EACf,UAAU,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,CAAC;IAC5D,cAAc,EAAE,WAAW,CAAC,WAAW,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CACzD;AAED,eAAO,MAAM,mBAAmB,mFAC+C,CAAA;AAE/E,UAAU,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAC1C,SAAQ,OAAO,CAAC,wBAAwB,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAA;IACnD,QAAQ,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAA;CAC3E;AAgFD,eAAO,MAAM,YAAY,GA9EE,CAAC,SAAS,MAAM,oFAqB9B,MAAO,SAyD4C,CAAA"}
1
+ {"version":3,"file":"tag-field-list.d.ts","sourceRoot":"","sources":["../../../src/tag-field/tag-field-list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAIpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACzD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAKtD,MAAM,WAAW,wBACf,SAAQ,SAAS,EACf,UAAU,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,CAAC;IAC5D,cAAc,EAAE,WAAW,CAAC,WAAW,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CACzD;AAED,eAAO,MAAM,mBAAmB,mFAC+C,CAAA;AAE/E,UAAU,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAC1C,SAAQ,OAAO,CAAC,wBAAwB,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAA;IACnD,QAAQ,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAA;CAC3E;AA0ED,eAAO,MAAM,YAAY,GAxEE,CAAC,SAAS,MAAM,oFAqB9B,MAAO,SAmD4C,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengovsg/oui",
3
- "version": "0.0.55",
3
+ "version": "0.0.56",
4
4
  "sideEffects": false,
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "type": "module",
@@ -51,8 +51,8 @@
51
51
  "storybook": "10.2.10",
52
52
  "tsx": "^4.21.0",
53
53
  "typescript": "5.7.3",
54
- "@opengovsg/oui-theme": "0.0.55",
55
54
  "@oui/chromatic": "0.0.0",
55
+ "@opengovsg/oui-theme": "0.0.56",
56
56
  "@oui/eslint-config": "0.0.0",
57
57
  "@oui/prettier-config": "0.0.0",
58
58
  "@oui/typescript-config": "0.0.0"
@@ -74,7 +74,7 @@
74
74
  "@tanstack/react-virtual": "^3.13.10",
75
75
  "downshift": "^9.0.9",
76
76
  "fuzzysort": "^3.1.0",
77
- "lodash-es": "^4.17.21",
77
+ "lodash-es": "^4.18.1",
78
78
  "nanoid": "^5.1.5",
79
79
  "react-aria": "^3.41.1",
80
80
  "react-dropzone": "^14.3.8",
@@ -91,7 +91,7 @@
91
91
  "motion": ">=11.12.0 || >=12.0.0-alpha.1",
92
92
  "react": ">= 18",
93
93
  "react-aria-components": "^1.14.0",
94
- "@opengovsg/oui-theme": "0.0.55"
94
+ "@opengovsg/oui-theme": "0.0.56"
95
95
  },
96
96
  "scripts": {
97
97
  "build": "tsx ../../tooling/build-scripts/main.ts --dts --clean",