@opengovsg/oui 0.0.26 → 0.0.28

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 (99) 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 +1 -1
  4. package/dist/cjs/calendar/calendar-header.cjs +2 -2
  5. package/dist/cjs/calendar/calendar-month-day-selector.cjs +2 -2
  6. package/dist/cjs/checkbox/checkbox.cjs +2 -2
  7. package/dist/cjs/combo-box/combo-box.cjs +3 -3
  8. package/dist/cjs/date-picker/date-picker.cjs +1 -1
  9. package/dist/cjs/date-range-picker/date-range-picker.cjs +1 -1
  10. package/dist/cjs/field/field.cjs +1 -1
  11. package/dist/cjs/file-dropzone/file-dropzone.cjs +1 -1
  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/index.cjs +33 -26
  15. package/dist/cjs/menu/menu.cjs +2 -2
  16. package/dist/cjs/modal/modal-content.cjs +1 -1
  17. package/dist/cjs/number-field/number-field.cjs +3 -3
  18. package/dist/cjs/pagination/pagination.cjs +3 -3
  19. package/dist/cjs/select/select.cjs +1 -1
  20. package/dist/cjs/tag-field/tag-field-tag-list.cjs +1 -1
  21. package/dist/cjs/tag-field/tag-field.cjs +2 -2
  22. package/dist/cjs/toast/index.cjs +13 -0
  23. package/dist/cjs/toast/toast.cjs +91 -0
  24. package/dist/esm/badge/badge.js +1 -1
  25. package/dist/esm/banner/banner.js +3 -3
  26. package/dist/esm/button/button.js +1 -1
  27. package/dist/esm/calendar/calendar-header.js +2 -2
  28. package/dist/esm/calendar/calendar-month-day-selector.js +2 -2
  29. package/dist/esm/checkbox/checkbox.js +2 -2
  30. package/dist/esm/combo-box/combo-box.js +3 -3
  31. package/dist/esm/date-picker/date-picker.js +1 -1
  32. package/dist/esm/date-range-picker/date-range-picker.js +1 -1
  33. package/dist/esm/field/field.js +1 -1
  34. package/dist/esm/file-dropzone/file-dropzone.js +1 -1
  35. package/dist/esm/file-dropzone/file-info.js +1 -1
  36. package/dist/esm/govt-banner/govt-banner.js +4 -4
  37. package/dist/esm/index.js +12 -10
  38. package/dist/esm/menu/menu.js +2 -2
  39. package/dist/esm/modal/modal-content.js +1 -1
  40. package/dist/esm/number-field/number-field.js +3 -3
  41. package/dist/esm/pagination/pagination.js +3 -3
  42. package/dist/esm/select/select.js +1 -1
  43. package/dist/esm/tag-field/tag-field-tag-list.js +1 -1
  44. package/dist/esm/tag-field/tag-field.js +2 -2
  45. package/dist/esm/toast/index.js +3 -0
  46. package/dist/esm/toast/toast.js +86 -0
  47. package/dist/types/index.d.mts +1 -0
  48. package/dist/types/index.d.ts +1 -0
  49. package/dist/types/index.d.ts.map +1 -1
  50. package/dist/types/spinner/use-spinner.d.ts +8 -8
  51. package/dist/types/toast/index.d.ts +3 -0
  52. package/dist/types/toast/index.d.ts.map +1 -0
  53. package/dist/types/toast/toast.d.ts +9 -0
  54. package/dist/types/toast/toast.d.ts.map +1 -0
  55. package/package.json +6 -5
  56. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/Icon.cjs +0 -0
  57. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/createLucideIcon.cjs +0 -0
  58. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/defaultAttributes.cjs +0 -0
  59. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/calendar.cjs +0 -0
  60. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/check.cjs +0 -0
  61. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/chevron-down.cjs +0 -0
  62. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/chevron-left.cjs +0 -0
  63. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs +0 -0
  64. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/chevron-up.cjs +0 -0
  65. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/chevrons-right.cjs +0 -0
  66. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/circle-alert.cjs +0 -0
  67. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/ellipsis.cjs +0 -0
  68. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/external-link.cjs +0 -0
  69. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/info.cjs +0 -0
  70. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/landmark.cjs +0 -0
  71. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/lock.cjs +0 -0
  72. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/minus.cjs +0 -0
  73. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/plus.cjs +0 -0
  74. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/trash-2.cjs +0 -0
  75. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/upload.cjs +0 -0
  76. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/x.cjs +0 -0
  77. /package/dist/cjs/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/shared/src/utils.cjs +0 -0
  78. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/Icon.js +0 -0
  79. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/createLucideIcon.js +0 -0
  80. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/defaultAttributes.js +0 -0
  81. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/calendar.js +0 -0
  82. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/check.js +0 -0
  83. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/chevron-down.js +0 -0
  84. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/chevron-left.js +0 -0
  85. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/chevron-right.js +0 -0
  86. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/chevron-up.js +0 -0
  87. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/chevrons-right.js +0 -0
  88. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/circle-alert.js +0 -0
  89. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/ellipsis.js +0 -0
  90. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/external-link.js +0 -0
  91. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/info.js +0 -0
  92. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/landmark.js +0 -0
  93. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/lock.js +0 -0
  94. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/minus.js +0 -0
  95. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/plus.js +0 -0
  96. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/trash-2.js +0 -0
  97. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/upload.js +0 -0
  98. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/icons/x.js +0 -0
  99. /package/dist/esm/node_modules/.pnpm/{lucide-react@0.475.0_react@19.2.1 → lucide-react@0.475.0_react@19.2.3}/node_modules/lucide-react/dist/esm/shared/src/utils.js +0 -0
@@ -12,7 +12,7 @@ import { FileDropzoneStyleContext, FileDropzoneStateContext, useFileDropzoneStat
12
12
  import { FileInfo } from './file-info.js';
13
13
  import { formatErrorMessage, formatBytes } from './utils.js';
14
14
  import { useControllableState } from '../hooks/use-controllable-state.js';
15
- import Upload from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.1/node_modules/lucide-react/dist/esm/icons/upload.js';
15
+ import Upload from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/upload.js';
16
16
  import { Label, Description, FieldError } from '../field/field.js';
17
17
 
18
18
  const FileDropzone = (originalProps) => {
@@ -5,7 +5,7 @@ import { useState, useEffect } from 'react';
5
5
  import { fileInfoDropzoneStyles, cn } from '@opengovsg/oui-theme';
6
6
  import { useFileDropzoneStateContext, useFileDropzoneStyleContext } from './contexts.js';
7
7
  import { formatBytes } from './utils.js';
8
- import Trash2 from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.1/node_modules/lucide-react/dist/esm/icons/trash-2.js';
8
+ import Trash2 from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/trash-2.js';
9
9
  import { Button } from '../button/button.js';
10
10
 
11
11
  const FileInfo = ({ file, imagePreview, classNames }) => {
@@ -5,10 +5,10 @@ import { useRef } from 'react';
5
5
  import { useDisclosure, useButton, useFocusRing, mergeProps } from 'react-aria';
6
6
  import { useDisclosureState } from 'react-stately';
7
7
  import { govtBannerStyles, dataAttr, twMerge } from '@opengovsg/oui-theme';
8
- 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';
9
- import Landmark from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.1/node_modules/lucide-react/dist/esm/icons/landmark.js';
10
- import ExternalLink from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.1/node_modules/lucide-react/dist/esm/icons/external-link.js';
11
- import Lock from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.1/node_modules/lucide-react/dist/esm/icons/lock.js';
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
+ 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
+ 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';
11
+ import Lock from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/lock.js';
12
12
 
13
13
  function GovtBanner({
14
14
  environment,
package/dist/esm/index.js CHANGED
@@ -1,30 +1,30 @@
1
1
  "use strict";
2
- export { Spinner } from './spinner/spinner.js';
3
- export { useSpinner } from './spinner/use-spinner.js';
4
2
  export { Toggle } from './toggle/toggle.js';
5
- export { SkipNavLink } from './skip-nav-link/skip-nav-link.js';
3
+ export { Input } from './input/input.js';
6
4
  export { TextField } from './text-field/text-field.js';
7
5
  export { TextArea } from './text-area/text-area.js';
8
6
  export { TextAreaField } from './text-area-field/text-area-field.js';
9
- export { TagField } from './tag-field/tag-field.js';
10
- export { TagFieldItem } from './tag-field/tag-field-item.js';
11
- export { Select } from './select/select.js';
12
- export { SelectItem } from './select/select-item.js';
13
- export { SelectVariantContext, useSelectVariantContext } from './select/select-variant-context.js';
14
- export { Tab, TabList, TabPanel, Tabs, TabsVariantContext, useTabsVariantContext } from './tabs/tabs.js';
7
+ export { Toaster } from './toast/toast.js';
15
8
  export { useControllableState } from './hooks/use-controllable-state.js';
16
9
  export { useDraggable } from './hooks/use-draggable.js';
17
10
  export { Button } from './button/button.js';
18
11
  export { GovtBanner } from './govt-banner/govt-banner.js';
19
12
  export { Ripple } from './ripple/ripple.js';
20
13
  export { useRipple } from './ripple/use-ripple.js';
21
- export { Input } from './input/input.js';
14
+ export { Spinner } from './spinner/spinner.js';
15
+ export { useSpinner } from './spinner/use-spinner.js';
16
+ export { SkipNavLink } from './skip-nav-link/skip-nav-link.js';
22
17
  export { Description, FieldError, FieldErrorIcon, FieldGroup, Label } from './field/field.js';
23
18
  export { ComboBox, ComboBoxEmptyState } from './combo-box/combo-box.js';
24
19
  export { ComboBoxFuzzy } from './combo-box/combo-box-fuzzy.js';
25
20
  export { ComboBoxItem } from './combo-box/combo-box-item.js';
26
21
  export { ComboBoxVariantContext, useComboBoxVariantContext } from './combo-box/combo-box-variant-context.js';
27
22
  export { Banner } from './banner/banner.js';
23
+ export { TagField } from './tag-field/tag-field.js';
24
+ export { TagFieldItem } from './tag-field/tag-field-item.js';
25
+ export { Select } from './select/select.js';
26
+ export { SelectItem } from './select/select-item.js';
27
+ export { SelectVariantContext, useSelectVariantContext } from './select/select-variant-context.js';
28
28
  export { Badge } from './badge/badge.js';
29
29
  export { CalendarDate } from '@internationalized/date';
30
30
  export { Calendar, CalendarStateWrapper } from './calendar/calendar.js';
@@ -33,6 +33,7 @@ export { getEraFormat, useGenerateLocalizedMonths, useGenerateLocalizedYears, us
33
33
  export { RangeCalendar, RangeCalendarCell, RangeCalendarStateWrapper } from './range-calendar/range-calendar.js';
34
34
  export { Menu, MenuItem, MenuSection, MenuSeparator, MenuTrigger, MenuVariantContext, SubmenuTrigger, useMenuVariantContext } from './menu/menu.js';
35
35
  export { Popover } from './popover/popover.js';
36
+ export { Tab, TabList, TabPanel, Tabs, TabsVariantContext, useTabsVariantContext } from './tabs/tabs.js';
36
37
  export { DateField, DateInput } from './date-field/date-field.js';
37
38
  export { DatePicker } from './date-picker/date-picker.js';
38
39
  export { DateRangePicker } from './date-range-picker/date-range-picker.js';
@@ -53,3 +54,4 @@ export { ModalFooter } from './modal/modal-footer.js';
53
54
  export { ModalBody } from './modal/modal-body.js';
54
55
  export { ModalHeader } from './modal/modal-header.js';
55
56
  export { ModalVariantContext, useModalVariantContext } from './modal/modal-variant-context.js';
57
+ export { toast } from 'sonner';
@@ -5,8 +5,8 @@ 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
7
  import { forwardRefGeneric, mapPropsVariants } from '../system/utils.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';
8
+ import Check from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/check.js';
9
+ import ChevronRight from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-right.js';
10
10
  import { createContext } from '../system/react-utils/context.js';
11
11
  import { Popover } from '../popover/popover.js';
12
12
 
@@ -7,7 +7,7 @@ import { Dialog } from 'react-aria-components';
7
7
  import { cn } from '@opengovsg/oui-theme';
8
8
  import { i18nStrings } from './i18n.js';
9
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';
10
+ import X from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/x.js';
11
11
  import { Button } from '../button/button.js';
12
12
 
13
13
  function ModalContent({
@@ -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 { Input } from '../input/input.js';
6
7
  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';
8
+ import Minus from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/minus.js';
9
+ import Plus from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/plus.js';
9
10
  import { Label, FieldGroup, Description, FieldError } from '../field/field.js';
10
- import { Input } from '../input/input.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.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';
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
+ 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
+ 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';
15
15
 
16
16
  const Pagination = forwardRef((props, ref) => {
17
17
  const {
@@ -7,7 +7,7 @@ import { selectStyles, composeRenderProps } from '@opengovsg/oui-theme';
7
7
  import { mapPropsVariants } from '../system/utils.js';
8
8
  import { SelectVariantContext } from './select-variant-context.js';
9
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';
10
+ 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';
11
11
  import { Popover } from '../popover/popover.js';
12
12
  import { Button } from '../button/button.js';
13
13
 
@@ -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.2.1/node_modules/lucide-react/dist/esm/icons/x.js';
5
+ import X from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/x.js';
6
6
 
7
7
  const TagFieldTagList = ({
8
8
  classNames,
@@ -4,14 +4,14 @@ 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 { Input } from '../input/input.js';
7
8
  import { TagFieldItem } from './tag-field-item.js';
8
9
  import { TagFieldList } from './tag-field-list.js';
9
10
  import { TagFieldRoot } from './tag-field-root.js';
10
11
  import { TagFieldTagList } from './tag-field-tag-list.js';
11
12
  import { TagFieldTrigger } from './tag-field-trigger.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 ChevronDown from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-down.js';
13
14
  import { Label, FieldGroup, Description, FieldError } from '../field/field.js';
14
- import { Input } from '../input/input.js';
15
15
  import { Popover } from '../popover/popover.js';
16
16
 
17
17
  function TagField({
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ export { Toaster } from './toast.js';
3
+ export { toast } from 'sonner';
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ "use client";
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import { Toaster as Toaster$1 } from 'sonner';
5
+ export { toast } from 'sonner';
6
+ import { toastStyles } from '@opengovsg/oui-theme';
7
+ import { mapPropsVariants } from '../system/utils.js';
8
+ import X from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/x.js';
9
+ import { Spinner } from '../spinner/spinner.js';
10
+
11
+ function Toaster(originalProps) {
12
+ const [{ toastOptions, closeButton = true, ...props }, variantProps] = mapPropsVariants(originalProps, toastStyles.variantKeys);
13
+ const styles = toastStyles(variantProps);
14
+ return /* @__PURE__ */ jsx(
15
+ Toaster$1,
16
+ {
17
+ className: styles.base({
18
+ className: props.className ?? props.classNames?.base
19
+ }),
20
+ position: "top-center",
21
+ icons: {
22
+ loading: /* @__PURE__ */ jsx(Spinner, { size: "xs" }),
23
+ close: /* @__PURE__ */ jsx(X, {})
24
+ },
25
+ mobileOffset: 8,
26
+ offset: {
27
+ top: 8
28
+ },
29
+ closeButton,
30
+ toastOptions: {
31
+ classNames: {
32
+ toast: styles.toast({
33
+ className: props.classNames?.toast
34
+ }),
35
+ title: styles.title({
36
+ className: props.classNames?.title
37
+ }),
38
+ description: styles.description({
39
+ className: props.classNames?.description
40
+ }),
41
+ loader: styles.loader({
42
+ className: props.classNames?.loader
43
+ }),
44
+ closeButton: styles.closeButton({
45
+ className: props.classNames?.closeButton
46
+ }),
47
+ success: styles.success({
48
+ className: props.classNames?.success
49
+ }),
50
+ error: styles.error({
51
+ className: props.classNames?.error
52
+ }),
53
+ info: styles.info({
54
+ className: props.classNames?.info
55
+ }),
56
+ warning: styles.warning({
57
+ className: props.classNames?.warning
58
+ }),
59
+ loading: styles.loading({
60
+ className: props.classNames?.loading
61
+ }),
62
+ default: styles.default({
63
+ className: props.classNames?.default
64
+ }),
65
+ content: styles.content({
66
+ className: props.classNames?.content
67
+ }),
68
+ icon: styles.icon({
69
+ className: props.classNames?.icon
70
+ }),
71
+ actionButton: styles.actionButton({
72
+ className: props.classNames?.actionButton
73
+ }),
74
+ cancelButton: styles.cancelButton({
75
+ className: props.classNames?.cancelButton
76
+ })
77
+ },
78
+ unstyled: true,
79
+ ...toastOptions
80
+ },
81
+ ...props
82
+ }
83
+ );
84
+ }
85
+
86
+ export { Toaster };
@@ -28,4 +28,5 @@ export * from "./pagination";
28
28
  export * from "./file-dropzone";
29
29
  export * from "./number-field";
30
30
  export * from "./modal";
31
+ export * from "./toast";
31
32
  //# sourceMappingURL=index.d.ts.map
@@ -28,4 +28,5 @@ export * from "./pagination";
28
28
  export * from "./file-dropzone";
29
29
  export * from "./number-field";
30
30
  export * from "./modal";
31
+ export * from "./toast";
31
32
  //# 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;AAC9B,cAAc,SAAS,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;AACvB,cAAc,SAAS,CAAA"}
@@ -26,36 +26,36 @@ export interface UseSpinnerProps extends Omit<HtmlUiProps, "children">, SpinnerV
26
26
  export declare const useSpinner: (originalProps: UseSpinnerProps) => {
27
27
  slots: {
28
28
  base: (slotProps?: ({
29
- size?: "lg" | "md" | "sm" | undefined;
29
+ size?: "lg" | "md" | "sm" | "xs" | undefined;
30
30
  color?: "current" | "white" | undefined;
31
31
  } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string;
32
32
  wrapper: (slotProps?: ({
33
- size?: "lg" | "md" | "sm" | undefined;
33
+ size?: "lg" | "md" | "sm" | "xs" | undefined;
34
34
  color?: "current" | "white" | undefined;
35
35
  } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string;
36
36
  circle1: (slotProps?: ({
37
- size?: "lg" | "md" | "sm" | undefined;
37
+ size?: "lg" | "md" | "sm" | "xs" | undefined;
38
38
  color?: "current" | "white" | undefined;
39
39
  } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string;
40
40
  circle2: (slotProps?: ({
41
- size?: "lg" | "md" | "sm" | undefined;
41
+ size?: "lg" | "md" | "sm" | "xs" | undefined;
42
42
  color?: "current" | "white" | undefined;
43
43
  } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string;
44
44
  } & {
45
45
  base: (slotProps?: ({
46
- size?: "lg" | "md" | "sm" | undefined;
46
+ size?: "lg" | "md" | "sm" | "xs" | undefined;
47
47
  color?: "current" | "white" | undefined;
48
48
  } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string;
49
49
  wrapper: (slotProps?: ({
50
- size?: "lg" | "md" | "sm" | undefined;
50
+ size?: "lg" | "md" | "sm" | "xs" | undefined;
51
51
  color?: "current" | "white" | undefined;
52
52
  } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string;
53
53
  circle1: (slotProps?: ({
54
- size?: "lg" | "md" | "sm" | undefined;
54
+ size?: "lg" | "md" | "sm" | "xs" | undefined;
55
55
  color?: "current" | "white" | undefined;
56
56
  } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string;
57
57
  circle2: (slotProps?: ({
58
- size?: "lg" | "md" | "sm" | undefined;
58
+ size?: "lg" | "md" | "sm" | "xs" | undefined;
59
59
  color?: "current" | "white" | undefined;
60
60
  } & import("tailwind-variants").ClassProp<import("tailwind-merge").ClassNameValue>) | undefined) => string;
61
61
  } & {};
@@ -0,0 +1,3 @@
1
+ export { Toaster, toast } from "./toast";
2
+ export type { ToasterProps } from "./toast";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/toast/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACxC,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,9 @@
1
+ import type { ToasterProps as BaseToasterProps } from "sonner";
2
+ import type { SlotsToClasses, ToastSlots, VariantProps } from "@opengovsg/oui-theme";
3
+ import { toastStyles } from "@opengovsg/oui-theme";
4
+ export interface ToasterProps extends BaseToasterProps, VariantProps<typeof toastStyles> {
5
+ classNames?: SlotsToClasses<ToastSlots>;
6
+ }
7
+ export declare function Toaster(originalProps: ToasterProps): import("react/jsx-runtime").JSX.Element;
8
+ export { toast } from "sonner";
9
+ //# sourceMappingURL=toast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../src/toast/toast.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AAI9D,OAAO,KAAK,EACV,cAAc,EACd,UAAU,EACV,YAAY,EACb,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAKlD,MAAM,WAAW,YACf,SAAQ,gBAAgB,EACtB,YAAY,CAAC,OAAO,WAAW,CAAC;IAClC,UAAU,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAA;CACxC;AAED,wBAAgB,OAAO,CAAC,aAAa,EAAE,YAAY,2CA2ElD;AAED,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengovsg/oui",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "sideEffects": false,
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "type": "module",
@@ -45,15 +45,15 @@
45
45
  "lucide-react": "^0.475.0",
46
46
  "motion": "^12.18.1",
47
47
  "prettier": "^3.5.3",
48
- "react": "^19.2.1",
48
+ "react": "^19.2.3",
49
49
  "react-aria-components": "^1.13.0",
50
50
  "storybook": "10.1.2",
51
51
  "tsx": "^4.21.0",
52
52
  "typescript": "5.7.3",
53
- "@opengovsg/oui-theme": "0.0.26",
53
+ "@opengovsg/oui-theme": "0.0.28",
54
54
  "@oui/chromatic": "0.0.0",
55
- "@oui/eslint-config": "0.0.0",
56
55
  "@oui/prettier-config": "0.0.0",
56
+ "@oui/eslint-config": "0.0.0",
57
57
  "@oui/typescript-config": "0.0.0"
58
58
  },
59
59
  "dependencies": {
@@ -78,6 +78,7 @@
78
78
  "react-dropzone": "^14.3.8",
79
79
  "react-stately": "^3.41.0",
80
80
  "scroll-into-view-if-needed": "^3.1.0",
81
+ "sonner": "^2.0.7",
81
82
  "type-fest": "^4.41.0",
82
83
  "use-deep-compare": "^1.3.0",
83
84
  "usehooks-ts": "^3.1.1"
@@ -87,7 +88,7 @@
87
88
  "motion": ">=11.12.0 || >=12.0.0-alpha.1",
88
89
  "react": ">= 18",
89
90
  "react-aria-components": "^1.13.0",
90
- "@opengovsg/oui-theme": "0.0.26"
91
+ "@opengovsg/oui-theme": "0.0.28"
91
92
  },
92
93
  "scripts": {
93
94
  "build": "tsx ../../tooling/build-scripts/main.ts --dts --clean",