@opengovsg/oui 0.0.24 → 0.0.26

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 (138) hide show
  1. package/dist/cjs/badge/badge.cjs +1 -1
  2. package/dist/cjs/banner/banner.cjs +3 -3
  3. package/dist/cjs/button/button.cjs +2 -2
  4. package/dist/cjs/calendar/calendar-header.cjs +2 -2
  5. package/dist/cjs/checkbox/checkbox.cjs +3 -3
  6. package/dist/cjs/combo-box/combo-box.cjs +5 -5
  7. package/dist/cjs/date-field/date-field.cjs +1 -1
  8. package/dist/cjs/date-picker/date-picker.cjs +3 -3
  9. package/dist/cjs/date-range-picker/date-range-picker.cjs +4 -4
  10. package/dist/cjs/field/field.cjs +1 -1
  11. package/dist/cjs/file-dropzone/file-dropzone.cjs +3 -3
  12. package/dist/cjs/file-dropzone/file-info.cjs +1 -1
  13. package/dist/cjs/govt-banner/govt-banner.cjs +4 -4
  14. package/dist/cjs/hooks/index.cjs +2 -0
  15. package/dist/cjs/hooks/use-draggable.cjs +88 -0
  16. package/dist/cjs/index.cjs +66 -51
  17. package/dist/cjs/menu/menu.cjs +3 -3
  18. package/dist/cjs/modal/i18n.cjs +19 -0
  19. package/dist/cjs/modal/index.cjs +19 -0
  20. package/dist/cjs/modal/modal-body.cjs +26 -0
  21. package/dist/cjs/modal/modal-content.cjs +54 -0
  22. package/dist/cjs/modal/modal-footer.cjs +27 -0
  23. package/dist/cjs/modal/modal-header.cjs +25 -0
  24. package/dist/cjs/modal/modal-variant-context.cjs +13 -0
  25. package/dist/cjs/modal/modal.cjs +66 -0
  26. package/dist/cjs/number-field/number-field.cjs +3 -3
  27. package/dist/cjs/pagination/pagination.cjs +3 -3
  28. package/dist/cjs/select/select.cjs +3 -3
  29. package/dist/cjs/system/utils.cjs +0 -48
  30. package/dist/cjs/tag-field/tag-field-tag-list.cjs +1 -1
  31. package/dist/cjs/tag-field/tag-field.cjs +4 -4
  32. package/dist/cjs/text-area-field/text-area-field.cjs +1 -1
  33. package/dist/cjs/text-field/text-field.cjs +1 -1
  34. package/dist/esm/badge/badge.js +1 -1
  35. package/dist/esm/banner/banner.js +3 -3
  36. package/dist/esm/button/button.js +2 -2
  37. package/dist/esm/calendar/calendar-header.js +2 -2
  38. package/dist/esm/checkbox/checkbox.js +3 -3
  39. package/dist/esm/combo-box/combo-box.js +5 -5
  40. package/dist/esm/date-field/date-field.js +1 -1
  41. package/dist/esm/date-picker/date-picker.js +3 -3
  42. package/dist/esm/date-range-picker/date-range-picker.js +4 -4
  43. package/dist/esm/field/field.js +1 -1
  44. package/dist/esm/file-dropzone/file-dropzone.js +3 -3
  45. package/dist/esm/file-dropzone/file-info.js +1 -1
  46. package/dist/esm/govt-banner/govt-banner.js +4 -4
  47. package/dist/esm/hooks/index.js +1 -0
  48. package/dist/esm/hooks/use-draggable.js +86 -0
  49. package/dist/esm/index.js +25 -18
  50. package/dist/esm/menu/menu.js +3 -3
  51. package/dist/esm/modal/i18n.js +17 -0
  52. package/dist/esm/modal/index.js +7 -0
  53. package/dist/esm/modal/modal-body.js +24 -0
  54. package/dist/esm/modal/modal-content.js +52 -0
  55. package/dist/esm/modal/modal-footer.js +25 -0
  56. package/dist/esm/modal/modal-header.js +23 -0
  57. package/dist/esm/modal/modal-variant-context.js +10 -0
  58. package/dist/esm/modal/modal.js +64 -0
  59. package/dist/esm/number-field/number-field.js +3 -3
  60. package/dist/esm/pagination/pagination.js +3 -3
  61. package/dist/esm/select/select.js +3 -3
  62. package/dist/esm/system/utils.js +2 -49
  63. package/dist/esm/tag-field/tag-field-tag-list.js +1 -1
  64. package/dist/esm/tag-field/tag-field.js +4 -4
  65. package/dist/esm/text-area-field/text-area-field.js +1 -1
  66. package/dist/esm/text-field/text-field.js +1 -1
  67. package/dist/types/badge/use-badge.d.ts +12 -12
  68. package/dist/types/hooks/index.d.ts +4 -1
  69. package/dist/types/hooks/index.d.ts.map +1 -1
  70. package/dist/types/hooks/use-draggable.d.ts +24 -0
  71. package/dist/types/hooks/use-draggable.d.ts.map +1 -0
  72. package/dist/types/index.d.mts +1 -0
  73. package/dist/types/index.d.ts +1 -0
  74. package/dist/types/index.d.ts.map +1 -1
  75. package/dist/types/modal/i18n.d.ts +3 -0
  76. package/dist/types/modal/i18n.d.ts.map +1 -0
  77. package/dist/types/modal/index.d.ts +12 -0
  78. package/dist/types/modal/index.d.ts.map +1 -0
  79. package/dist/types/modal/modal-body.d.ts +5 -0
  80. package/dist/types/modal/modal-body.d.ts.map +1 -0
  81. package/dist/types/modal/modal-content.d.ts +10 -0
  82. package/dist/types/modal/modal-content.d.ts.map +1 -0
  83. package/dist/types/modal/modal-footer.d.ts +5 -0
  84. package/dist/types/modal/modal-footer.d.ts.map +1 -0
  85. package/dist/types/modal/modal-header.d.ts +5 -0
  86. package/dist/types/modal/modal-header.d.ts.map +1 -0
  87. package/dist/types/modal/modal-variant-context.d.ts +8 -0
  88. package/dist/types/modal/modal-variant-context.d.ts.map +1 -0
  89. package/dist/types/modal/modal.d.ts +8 -0
  90. package/dist/types/modal/modal.d.ts.map +1 -0
  91. package/dist/types/pagination/use-pagination.d.ts +36 -36
  92. package/dist/types/system/utils.d.ts +1 -833
  93. package/dist/types/system/utils.d.ts.map +1 -1
  94. package/package.json +9 -9
  95. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/Icon.cjs +0 -0
  96. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/createLucideIcon.cjs +0 -0
  97. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/defaultAttributes.cjs +0 -0
  98. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/calendar.cjs +0 -0
  99. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/check.cjs +0 -0
  100. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/chevron-down.cjs +0 -0
  101. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/chevron-left.cjs +0 -0
  102. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs +0 -0
  103. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/chevron-up.cjs +0 -0
  104. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/chevrons-right.cjs +0 -0
  105. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/circle-alert.cjs +0 -0
  106. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/ellipsis.cjs +0 -0
  107. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/external-link.cjs +0 -0
  108. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/info.cjs +0 -0
  109. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/landmark.cjs +0 -0
  110. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/lock.cjs +0 -0
  111. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/minus.cjs +0 -0
  112. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/plus.cjs +0 -0
  113. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/trash-2.cjs +0 -0
  114. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/upload.cjs +0 -0
  115. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/x.cjs +0 -0
  116. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/shared/src/utils.cjs +0 -0
  117. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/Icon.js +0 -0
  118. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/createLucideIcon.js +0 -0
  119. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/defaultAttributes.js +0 -0
  120. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/calendar.js +0 -0
  121. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/check.js +0 -0
  122. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/chevron-down.js +0 -0
  123. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/chevron-left.js +0 -0
  124. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/chevron-right.js +0 -0
  125. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/chevron-up.js +0 -0
  126. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/chevrons-right.js +0 -0
  127. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/circle-alert.js +0 -0
  128. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/ellipsis.js +0 -0
  129. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/external-link.js +0 -0
  130. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/info.js +0 -0
  131. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/landmark.js +0 -0
  132. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/lock.js +0 -0
  133. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/minus.js +0 -0
  134. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/plus.js +0 -0
  135. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/trash-2.js +0 -0
  136. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/upload.js +0 -0
  137. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/icons/x.js +0 -0
  138. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.0.0 → lucide-react@0.475.0_react@19.2.1}/node_modules/lucide-react/dist/esm/shared/src/utils.js +0 -0
@@ -4,11 +4,11 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
4
  import { forwardRef, useMemo, useCallback } from 'react';
5
5
  import { useContextProps, MenuItem as MenuItem$1, composeRenderProps, Provider, Menu as Menu$1, MenuSection as MenuSection$1, Header, Collection, MenuTrigger as MenuTrigger$1, SubmenuTrigger as SubmenuTrigger$1, Separator } from 'react-aria-components';
6
6
  import { listBoxItemStyles, menuItemStyles, menuStyles, menuSectionStyles, menuDividerStyles } from '@opengovsg/oui-theme';
7
- import { Popover } from '../popover/popover.js';
8
7
  import { forwardRefGeneric, mapPropsVariants } from '../system/utils.js';
9
- import Check from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/check.js';
10
- import ChevronRight from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/chevron-right.js';
8
+ import Check from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.1/node_modules/lucide-react/dist/esm/icons/check.js';
9
+ import ChevronRight from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.1/node_modules/lucide-react/dist/esm/icons/chevron-right.js';
11
10
  import { createContext } from '../system/react-utils/context.js';
11
+ import { Popover } from '../popover/popover.js';
12
12
 
13
13
  const [MenuVariantContext, useMenuVariantContext] = createContext({
14
14
  name: "MenuVariantContext",
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ const i18nStrings = {
3
+ "en-SG": {
4
+ dismiss: "Dismiss"
5
+ },
6
+ "zh-SG": {
7
+ dismiss: "\u53D6\u6D88"
8
+ },
9
+ "ms-SG": {
10
+ dismiss: "Tutup"
11
+ },
12
+ "ta-SG": {
13
+ dismiss: "\u0BAE\u0BC2\u0B9F\u0BC1"
14
+ }
15
+ };
16
+
17
+ export { i18nStrings };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ export { Modal } from './modal.js';
3
+ export { ModalContent } from './modal-content.js';
4
+ export { ModalFooter } from './modal-footer.js';
5
+ export { ModalBody } from './modal-body.js';
6
+ export { ModalHeader } from './modal-header.js';
7
+ export { ModalVariantContext, useModalVariantContext } from './modal-variant-context.js';
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ "use client";
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import { useContext } from 'react';
5
+ import { cn } from '@opengovsg/oui-theme';
6
+ import { forwardRef } from '../system/utils.js';
7
+ import { ModalVariantContext } from './modal-variant-context.js';
8
+
9
+ const ModalBody = forwardRef(function ModalBody2({ as, ...props }, ref) {
10
+ const { slots, classNames } = useContext(ModalVariantContext);
11
+ const Component = as || "div";
12
+ return /* @__PURE__ */ jsx(
13
+ Component,
14
+ {
15
+ ref,
16
+ className: slots.body({
17
+ className: cn(classNames?.body, props.className)
18
+ }),
19
+ ...props
20
+ }
21
+ );
22
+ });
23
+
24
+ export { ModalBody };
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ "use client";
3
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
+ import { useContext, isValidElement } from 'react';
5
+ import { useMessageFormatter } from 'react-aria';
6
+ import { Dialog } from 'react-aria-components';
7
+ import { cn } from '@opengovsg/oui-theme';
8
+ import { i18nStrings } from './i18n.js';
9
+ import { ModalVariantContext } from './modal-variant-context.js';
10
+ import X from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.1/node_modules/lucide-react/dist/esm/icons/x.js';
11
+ import { Button } from '../button/button.js';
12
+
13
+ function ModalContent({
14
+ closeButtonContent: closeButtonContentProp,
15
+ hideCloseButton,
16
+ closeButtonProps,
17
+ ...props
18
+ }) {
19
+ const { slots, classNames, buttonSize } = useContext(ModalVariantContext);
20
+ const formatMessage = useMessageFormatter(i18nStrings);
21
+ const closeButtonContent = isValidElement(closeButtonContentProp) ? closeButtonContentProp : /* @__PURE__ */ jsx(X, {});
22
+ return /* @__PURE__ */ jsx(
23
+ Dialog,
24
+ {
25
+ ...props,
26
+ className: slots.dialog({
27
+ className: props.className ?? classNames?.dialog
28
+ }),
29
+ children: ({ close }) => /* @__PURE__ */ jsxs(Fragment, { children: [
30
+ !hideCloseButton && /* @__PURE__ */ jsx(
31
+ Button,
32
+ {
33
+ slot: "close",
34
+ isIconOnly: true,
35
+ "aria-label": formatMessage("dismiss"),
36
+ size: buttonSize,
37
+ variant: "clear",
38
+ color: "neutral",
39
+ ...closeButtonProps,
40
+ className: slots.closeButton({
41
+ className: cn(classNames?.closeButton, props.className)
42
+ }),
43
+ children: closeButtonContent
44
+ }
45
+ ),
46
+ typeof props.children === "function" ? props.children(close) : props.children
47
+ ] })
48
+ }
49
+ );
50
+ }
51
+
52
+ export { ModalContent };
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ "use client";
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import { useContext } from 'react';
5
+ import { cn } from '@opengovsg/oui-theme';
6
+ import { forwardRef } from '../system/utils.js';
7
+ import { ModalVariantContext } from './modal-variant-context.js';
8
+
9
+ const ModalFooter = forwardRef(function ModalFooter2({ as, ...props }, ref) {
10
+ const { slots, classNames } = useContext(ModalVariantContext);
11
+ const Component = as || "footer";
12
+ return /* @__PURE__ */ jsx(
13
+ Component,
14
+ {
15
+ ref,
16
+ className: slots.footer({
17
+ className: cn(classNames?.footer, props.className)
18
+ }),
19
+ ...props
20
+ }
21
+ );
22
+ });
23
+ ModalFooter.displayName = "ModalFooter";
24
+
25
+ export { ModalFooter };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ "use client";
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import { useContext } from 'react';
5
+ import { Heading } from 'react-aria-components';
6
+ import { cn } from '@opengovsg/oui-theme';
7
+ import { ModalVariantContext } from './modal-variant-context.js';
8
+
9
+ function ModalHeader(props) {
10
+ const { slots, classNames } = useContext(ModalVariantContext);
11
+ return /* @__PURE__ */ jsx(
12
+ Heading,
13
+ {
14
+ slot: "title",
15
+ ...props,
16
+ className: slots.header({
17
+ className: cn(classNames?.header, props.className)
18
+ })
19
+ }
20
+ );
21
+ }
22
+
23
+ export { ModalHeader };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ "use client";
3
+ import { createContext } from '../system/react-utils/context.js';
4
+
5
+ const [ModalVariantContext, useModalVariantContext] = createContext({
6
+ name: "ModalVariantContext",
7
+ strict: true
8
+ });
9
+
10
+ export { ModalVariantContext, useModalVariantContext };
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ "use client";
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import { forwardRef, useMemo } from 'react';
5
+ import { Provider, ModalOverlay, Modal as Modal$1 } from 'react-aria-components';
6
+ import { modalStyles, composeRenderProps } from '@opengovsg/oui-theme';
7
+ import { mapPropsVariants } from '../system/utils.js';
8
+ import { ModalVariantContext } from './modal-variant-context.js';
9
+
10
+ const Modal = forwardRef(function Modal2(originalProps, ref) {
11
+ const [{ classNames, ...props }, variantProps] = mapPropsVariants(
12
+ originalProps,
13
+ modalStyles.variantKeys
14
+ );
15
+ const { isDismissable = true } = props;
16
+ const slots = modalStyles(variantProps);
17
+ const buttonSize = useMemo(() => {
18
+ switch (variantProps.size) {
19
+ case "mobile":
20
+ return "md";
21
+ default: {
22
+ return "lg";
23
+ }
24
+ }
25
+ }, [variantProps.size]);
26
+ return /* @__PURE__ */ jsx(
27
+ Provider,
28
+ {
29
+ values: [
30
+ [
31
+ ModalVariantContext,
32
+ { ...variantProps, classNames, buttonSize, slots }
33
+ ]
34
+ ],
35
+ children: /* @__PURE__ */ jsx(
36
+ ModalOverlay,
37
+ {
38
+ ...props,
39
+ isDismissable,
40
+ className: composeRenderProps(
41
+ classNames?.overlay,
42
+ (className, renderProps) => slots.overlay({ className, ...renderProps })
43
+ ),
44
+ children: /* @__PURE__ */ jsx(
45
+ Modal$1,
46
+ {
47
+ ...props,
48
+ ref,
49
+ isDismissable,
50
+ "data-placement": variantProps.placement,
51
+ className: composeRenderProps(
52
+ props.className ?? classNames?.base,
53
+ (className, renderProps) => slots.base({ className, ...renderProps })
54
+ )
55
+ }
56
+ )
57
+ }
58
+ )
59
+ }
60
+ );
61
+ });
62
+ Modal.displayName = "Modal";
63
+
64
+ export { Modal };
@@ -3,11 +3,11 @@
3
3
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
4
4
  import { NumberField as NumberField$1 } from 'react-aria-components';
5
5
  import { numberFieldStyles, composeTailwindRenderProps, dataAttr, fieldBorderStyles, cn } from '@opengovsg/oui-theme';
6
+ import { mapPropsVariants } from '../system/utils.js';
7
+ import Minus from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.1/node_modules/lucide-react/dist/esm/icons/minus.js';
8
+ import Plus from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.1/node_modules/lucide-react/dist/esm/icons/plus.js';
6
9
  import { Label, FieldGroup, Description, FieldError } from '../field/field.js';
7
10
  import { Input } from '../input/input.js';
8
- import { mapPropsVariants } from '../system/utils.js';
9
- import Minus from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/minus.js';
10
- import Plus from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/plus.js';
11
11
  import { Button } from '../button/button.js';
12
12
 
13
13
  function NumberField(originalProps) {
@@ -9,9 +9,9 @@ import { PaginationItemType } from './hooks/use-pagination.js';
9
9
  import { PaginationCursor } from './pagination-cursor.js';
10
10
  import { PaginationItem } from './pagination-item.js';
11
11
  import { usePagination } from './use-pagination.js';
12
- import ChevronLeft from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/chevron-left.js';
13
- import Ellipsis from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/ellipsis.js';
14
- import ChevronsRight from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/chevrons-right.js';
12
+ import ChevronLeft from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.1/node_modules/lucide-react/dist/esm/icons/chevron-left.js';
13
+ import Ellipsis from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.1/node_modules/lucide-react/dist/esm/icons/ellipsis.js';
14
+ import ChevronsRight from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.1/node_modules/lucide-react/dist/esm/icons/chevrons-right.js';
15
15
 
16
16
  const Pagination = forwardRef((props, ref) => {
17
17
  const {
@@ -4,11 +4,11 @@ import { jsx, jsxs } from 'react/jsx-runtime';
4
4
  import { useMemo } from 'react';
5
5
  import { Provider, Select as Select$1, SelectValue, Virtualizer, ListLayout, ListBox } from 'react-aria-components';
6
6
  import { selectStyles, composeRenderProps } from '@opengovsg/oui-theme';
7
- import { Label, Description, FieldError } from '../field/field.js';
8
- import { Popover } from '../popover/popover.js';
9
7
  import { mapPropsVariants } from '../system/utils.js';
10
8
  import { SelectVariantContext } from './select-variant-context.js';
11
- import ChevronDown from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/chevron-down.js';
9
+ import { Label, Description, FieldError } from '../field/field.js';
10
+ import ChevronDown from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.1/node_modules/lucide-react/dist/esm/icons/chevron-down.js';
11
+ import { Popover } from '../popover/popover.js';
12
12
  import { Button } from '../button/button.js';
13
13
 
14
14
  const calculateEstimatedRowHeight = (size) => {
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- import { forwardRef as forwardRef$1, useMemo } from 'react';
2
+ import { forwardRef as forwardRef$1 } from 'react';
3
3
 
4
4
  function forwardRef(component) {
5
5
  return forwardRef$1(component);
@@ -26,53 +26,6 @@ const mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {
26
26
  }
27
27
  return [props, picked];
28
28
  };
29
- function useRenderProps(props) {
30
- const {
31
- className,
32
- style,
33
- children,
34
- defaultClassName = void 0,
35
- defaultChildren = void 0,
36
- defaultStyle,
37
- values
38
- } = props;
39
- return useMemo(() => {
40
- let computedClassName;
41
- let computedStyle;
42
- let computedChildren;
43
- if (typeof className === "function") {
44
- computedClassName = className({ ...values, defaultClassName });
45
- } else {
46
- computedClassName = className;
47
- }
48
- if (typeof style === "function") {
49
- computedStyle = style({ ...values, defaultStyle: defaultStyle || {} });
50
- } else {
51
- computedStyle = style;
52
- }
53
- if (typeof children === "function") {
54
- computedChildren = children({ ...values, defaultChildren });
55
- } else if (children == null) {
56
- computedChildren = defaultChildren;
57
- } else {
58
- computedChildren = children;
59
- }
60
- return {
61
- className: computedClassName ?? defaultClassName,
62
- style: computedStyle || defaultStyle ? { ...defaultStyle, ...computedStyle } : void 0,
63
- children: computedChildren ?? defaultChildren,
64
- "data-rac": ""
65
- };
66
- }, [
67
- className,
68
- style,
69
- children,
70
- defaultClassName,
71
- defaultChildren,
72
- defaultStyle,
73
- values
74
- ]);
75
- }
76
29
  function removeDataAttributes(props) {
77
30
  const prefix = /^(data-.*)$/;
78
31
  const filteredProps = {};
@@ -94,4 +47,4 @@ function pickAriaAttributes(props) {
94
47
  return filteredProps;
95
48
  }
96
49
 
97
- export { forwardRef, forwardRefGeneric, mapPropsVariants, pickAriaAttributes, removeDataAttributes, useRenderProps };
50
+ export { forwardRef, forwardRefGeneric, mapPropsVariants, pickAriaAttributes, removeDataAttributes };
@@ -2,7 +2,7 @@
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { useContext, useCallback } from 'react';
4
4
  import { TagFieldStateContext } from './tag-field-state-context.js';
5
- import X from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/x.js';
5
+ import X from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.1/node_modules/lucide-react/dist/esm/icons/x.js';
6
6
 
7
7
  const TagFieldTagList = ({
8
8
  classNames,
@@ -4,15 +4,15 @@ import { jsxs, jsx } from 'react/jsx-runtime';
4
4
  import { createElement } from 'react';
5
5
  import { composeRenderProps } from 'react-aria-components';
6
6
  import { tagFieldStyles } from '@opengovsg/oui-theme';
7
- import { Label, FieldGroup, Description, FieldError } from '../field/field.js';
8
- import { Input } from '../input/input.js';
9
- import { Popover } from '../popover/popover.js';
10
7
  import { TagFieldItem } from './tag-field-item.js';
11
8
  import { TagFieldList } from './tag-field-list.js';
12
9
  import { TagFieldRoot } from './tag-field-root.js';
13
10
  import { TagFieldTagList } from './tag-field-tag-list.js';
14
11
  import { TagFieldTrigger } from './tag-field-trigger.js';
15
- import ChevronDown from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/chevron-down.js';
12
+ import ChevronDown from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.1/node_modules/lucide-react/dist/esm/icons/chevron-down.js';
13
+ import { Label, FieldGroup, Description, FieldError } from '../field/field.js';
14
+ import { Input } from '../input/input.js';
15
+ import { Popover } from '../popover/popover.js';
16
16
 
17
17
  function TagField({
18
18
  classNames,
@@ -3,8 +3,8 @@
3
3
  import { jsxs, jsx } from 'react/jsx-runtime';
4
4
  import { TextField } from 'react-aria-components';
5
5
  import { composeTailwindRenderProps } from '@opengovsg/oui-theme';
6
- import { Label, Description, FieldError } from '../field/field.js';
7
6
  import { TextArea } from '../text-area/text-area.js';
7
+ import { Label, Description, FieldError } from '../field/field.js';
8
8
 
9
9
  function TextAreaField({
10
10
  label,
@@ -3,8 +3,8 @@
3
3
  import { jsxs, jsx } from 'react/jsx-runtime';
4
4
  import { TextField as TextField$1 } from 'react-aria-components';
5
5
  import { composeTailwindRenderProps } from '@opengovsg/oui-theme';
6
- import { Label, Description, FieldError } from '../field/field.js';
7
6
  import { Input } from '../input/input.js';
7
+ import { Label, Description, FieldError } from '../field/field.js';
8
8
 
9
9
  function TextField({
10
10
  label,
@@ -70,48 +70,48 @@ export declare function useBadge(originalProps: UseBadgeProps): {
70
70
  };
71
71
  }, undefined, "outline-offset-2 outline-none", unknown, unknown, undefined>>>;
72
72
  base: ((slotProps?: ({
73
+ isDisabled?: boolean | undefined;
73
74
  size?: "md" | "sm" | "xs" | undefined;
74
75
  color?: "sub" | "main" | "neutral" | "critical" | "warning" | "success" | undefined;
75
- radius?: "lg" | "md" | "sm" | "none" | "full" | undefined;
76
+ radius?: "none" | "lg" | "md" | "sm" | "full" | undefined;
76
77
  variant?: "solid" | "outline" | "dot" | "subtle" | undefined;
77
- isDisabled?: boolean | undefined;
78
78
  isCloseable?: boolean | undefined;
79
79
  } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string) & ((slotProps?: ({
80
+ isDisabled?: boolean | undefined;
80
81
  size?: "md" | "sm" | "xs" | undefined;
81
82
  color?: "sub" | "main" | "neutral" | "critical" | "warning" | "success" | undefined;
82
- radius?: "lg" | "md" | "sm" | "none" | "full" | undefined;
83
+ radius?: "none" | "lg" | "md" | "sm" | "full" | undefined;
83
84
  variant?: "solid" | "outline" | "dot" | "subtle" | undefined;
84
- isDisabled?: boolean | undefined;
85
85
  isCloseable?: boolean | undefined;
86
86
  } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string);
87
87
  dot: ((slotProps?: ({
88
+ isDisabled?: boolean | undefined;
88
89
  size?: "md" | "sm" | "xs" | undefined;
89
90
  color?: "sub" | "main" | "neutral" | "critical" | "warning" | "success" | undefined;
90
- radius?: "lg" | "md" | "sm" | "none" | "full" | undefined;
91
+ radius?: "none" | "lg" | "md" | "sm" | "full" | undefined;
91
92
  variant?: "solid" | "outline" | "dot" | "subtle" | undefined;
92
- isDisabled?: boolean | undefined;
93
93
  isCloseable?: boolean | undefined;
94
94
  } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string) & ((slotProps?: ({
95
+ isDisabled?: boolean | undefined;
95
96
  size?: "md" | "sm" | "xs" | undefined;
96
97
  color?: "sub" | "main" | "neutral" | "critical" | "warning" | "success" | undefined;
97
- radius?: "lg" | "md" | "sm" | "none" | "full" | undefined;
98
+ radius?: "none" | "lg" | "md" | "sm" | "full" | undefined;
98
99
  variant?: "solid" | "outline" | "dot" | "subtle" | undefined;
99
- isDisabled?: boolean | undefined;
100
100
  isCloseable?: boolean | undefined;
101
101
  } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string);
102
102
  content: ((slotProps?: ({
103
+ isDisabled?: boolean | undefined;
103
104
  size?: "md" | "sm" | "xs" | undefined;
104
105
  color?: "sub" | "main" | "neutral" | "critical" | "warning" | "success" | undefined;
105
- radius?: "lg" | "md" | "sm" | "none" | "full" | undefined;
106
+ radius?: "none" | "lg" | "md" | "sm" | "full" | undefined;
106
107
  variant?: "solid" | "outline" | "dot" | "subtle" | undefined;
107
- isDisabled?: boolean | undefined;
108
108
  isCloseable?: boolean | undefined;
109
109
  } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string) & ((slotProps?: ({
110
+ isDisabled?: boolean | undefined;
110
111
  size?: "md" | "sm" | "xs" | undefined;
111
112
  color?: "sub" | "main" | "neutral" | "critical" | "warning" | "success" | undefined;
112
- radius?: "lg" | "md" | "sm" | "none" | "full" | undefined;
113
+ radius?: "none" | "lg" | "md" | "sm" | "full" | undefined;
113
114
  variant?: "solid" | "outline" | "dot" | "subtle" | undefined;
114
- isDisabled?: boolean | undefined;
115
115
  isCloseable?: boolean | undefined;
116
116
  } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string);
117
117
  };
@@ -1,2 +1,5 @@
1
- export * from "./use-controllable-state";
1
+ export { useControllableState } from "./use-controllable-state";
2
+ export { useDraggable } from "./use-draggable";
3
+ export type { UseControllableStateProps } from "./use-controllable-state";
4
+ export type { UseDraggableProps } from "./use-draggable";
2
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C,YAAY,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AACzE,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA"}
@@ -0,0 +1,24 @@
1
+ import type { MoveResult } from "@react-aria/interactions";
2
+ export interface UseDraggableProps {
3
+ /**
4
+ * Ref to the moving target DOM node.
5
+ */
6
+ targetRef?: React.RefObject<HTMLElement | null>;
7
+ /**
8
+ * Whether to disable the target is draggable.
9
+ * @default false
10
+ */
11
+ isDisabled?: boolean;
12
+ /**
13
+ * Whether the target can overflow the viewport.
14
+ * @default false
15
+ */
16
+ canOverflow?: boolean;
17
+ }
18
+ /**
19
+ * A hook to make a target draggable.
20
+ * @param props UseDraggableProps
21
+ * @returns MoveResult for the drag DOM node.
22
+ */
23
+ export declare function useDraggable(props: UseDraggableProps): MoveResult;
24
+ //# sourceMappingURL=use-draggable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-draggable.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-draggable.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAiB,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAIzE,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAC/C;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,UAAU,CAmGjE"}
@@ -27,4 +27,5 @@ export * from "./checkbox";
27
27
  export * from "./pagination";
28
28
  export * from "./file-dropzone";
29
29
  export * from "./number-field";
30
+ export * from "./modal";
30
31
  //# sourceMappingURL=index.d.ts.map
@@ -27,4 +27,5 @@ export * from "./checkbox";
27
27
  export * from "./pagination";
28
28
  export * from "./file-dropzone";
29
29
  export * from "./number-field";
30
+ export * from "./modal";
30
31
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { LocalizedStrings } from "react-aria";
2
+ export declare const i18nStrings: LocalizedStrings;
3
+ //# sourceMappingURL=i18n.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../src/modal/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,eAAO,MAAM,WAAW,EAAE,gBAazB,CAAA"}
@@ -0,0 +1,12 @@
1
+ export { Modal } from "./modal";
2
+ export { ModalContent } from "./modal-content";
3
+ export { ModalFooter } from "./modal-footer";
4
+ export { ModalBody } from "./modal-body";
5
+ export { ModalHeader } from "./modal-header";
6
+ export type { ModalProps } from "./modal";
7
+ export type { ModalContentProps } from "./modal-content";
8
+ export type { ModalFooterProps } from "./modal-footer";
9
+ export type { ModalBodyProps } from "./modal-body";
10
+ export type { ModalHeaderProps } from "./modal-header";
11
+ export { ModalVariantContext, useModalVariantContext, } from "./modal-variant-context";
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAE5C,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACzC,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACxD,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACtD,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAClD,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEtD,OAAO,EACL,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,yBAAyB,CAAA"}
@@ -0,0 +1,5 @@
1
+ import type { HtmlUiProps } from "../system/types";
2
+ export interface ModalBodyProps extends HtmlUiProps<"div"> {
3
+ }
4
+ export declare const ModalBody: import("../system/utils").InternalForwardRefRenderFunction<import("../system/types").As, ModalBodyProps, never>;
5
+ //# sourceMappingURL=modal-body.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal-body.d.ts","sourceRoot":"","sources":["../../../src/modal/modal-body.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAKlD,MAAM,WAAW,cAAe,SAAQ,WAAW,CAAC,KAAK,CAAC;CAAG;AAE7D,eAAO,MAAM,SAAS,iHAiBpB,CAAA"}
@@ -0,0 +1,10 @@
1
+ import type { DialogProps } from "react-aria-components";
2
+ import type { ButtonProps } from "../button";
3
+ export interface ModalContentProps extends Omit<DialogProps, "children"> {
4
+ children: React.ReactNode | ((onClose: () => void) => React.ReactNode);
5
+ closeButtonContent?: React.ReactNode;
6
+ hideCloseButton?: boolean;
7
+ closeButtonProps?: Omit<ButtonProps, "className" | "slot">;
8
+ }
9
+ export declare function ModalContent({ closeButtonContent: closeButtonContentProp, hideCloseButton, closeButtonProps, ...props }: ModalContentProps): import("react/jsx-runtime").JSX.Element;
10
+ //# sourceMappingURL=modal-content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal-content.d.ts","sourceRoot":"","sources":["../../../src/modal/modal-content.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAQxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAK5C,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC;IACtE,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,OAAO,EAAE,MAAM,IAAI,KAAK,KAAK,CAAC,SAAS,CAAC,CAAA;IACtE,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACpC,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,gBAAgB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CAAC,CAAA;CAC3D;AAED,wBAAgB,YAAY,CAAC,EAC3B,kBAAkB,EAAE,sBAAsB,EAC1C,eAAe,EACf,gBAAgB,EAChB,GAAG,KAAK,EACT,EAAE,iBAAiB,2CA2CnB"}
@@ -0,0 +1,5 @@
1
+ import type { HtmlUiProps } from "../system/types";
2
+ export interface ModalFooterProps extends HtmlUiProps<"footer"> {
3
+ }
4
+ export declare const ModalFooter: import("../system/utils").InternalForwardRefRenderFunction<import("../system/types").As, ModalFooterProps, never>;
5
+ //# sourceMappingURL=modal-footer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal-footer.d.ts","sourceRoot":"","sources":["../../../src/modal/modal-footer.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAKlD,MAAM,WAAW,gBAAiB,SAAQ,WAAW,CAAC,QAAQ,CAAC;CAAG;AAElE,eAAO,MAAM,WAAW,mHAgBtB,CAAA"}
@@ -0,0 +1,5 @@
1
+ import type { HeadingProps } from "react-aria-components";
2
+ export interface ModalHeaderProps extends HeadingProps {
3
+ }
4
+ export declare function ModalHeader(props: ModalHeaderProps): import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=modal-header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal-header.d.ts","sourceRoot":"","sources":["../../../src/modal/modal-header.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AASzD,MAAM,WAAW,gBAAiB,SAAQ,YAAY;CAAG;AAEzD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAYlD"}
@@ -0,0 +1,8 @@
1
+ import type { ModalSlots, modalStyles, ModalVariantProps, SlotsToClasses } from "@opengovsg/oui-theme";
2
+ export interface ModalVariantContextValue extends ModalVariantProps {
3
+ classNames?: SlotsToClasses<ModalSlots>;
4
+ slots: ReturnType<typeof modalStyles>;
5
+ buttonSize: "md" | "lg";
6
+ }
7
+ export declare const ModalVariantContext: import("react").Context<ModalVariantContextValue>, useModalVariantContext: () => ModalVariantContextValue;
8
+ //# sourceMappingURL=modal-variant-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal-variant-context.d.ts","sourceRoot":"","sources":["../../../src/modal/modal-variant-context.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,cAAc,EACf,MAAM,sBAAsB,CAAA;AAI7B,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;IACjE,UAAU,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAA;IACvC,KAAK,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAA;IACrC,UAAU,EAAE,IAAI,GAAG,IAAI,CAAA;CACxB;AAED,eAAO,MAAO,mBAAmB,qDAAE,sBAAsB,gCAIrD,CAAA"}