@opengovsg/oui 0.0.14 → 0.0.15
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.
- package/dist/cjs/banner/banner.cjs +1 -1
- package/dist/cjs/date-picker/date-picker.cjs +1 -1
- package/dist/cjs/date-range-picker/date-range-picker.cjs +1 -1
- package/dist/cjs/index.cjs +6 -6
- package/dist/cjs/select/select.cjs +3 -3
- package/dist/esm/banner/banner.js +1 -1
- package/dist/esm/date-picker/date-picker.js +1 -1
- package/dist/esm/date-range-picker/date-range-picker.js +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/select/select.js +3 -3
- package/package.json +5 -4
|
@@ -7,9 +7,9 @@ var $670gB$react = require('react');
|
|
|
7
7
|
var reactAria = require('react-aria');
|
|
8
8
|
var reactStately = require('react-stately');
|
|
9
9
|
var ouiTheme = require('@opengovsg/oui-theme');
|
|
10
|
-
var button = require('../button/button.cjs');
|
|
11
10
|
var circleAlert = require('../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/circle-alert.cjs');
|
|
12
11
|
var info = require('../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/info.cjs');
|
|
12
|
+
var button = require('../button/button.cjs');
|
|
13
13
|
var x = require('../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/x.cjs');
|
|
14
14
|
|
|
15
15
|
const i18nStrings = {
|
|
@@ -6,7 +6,6 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
var $670gB$react = require('react');
|
|
7
7
|
var reactAriaComponents = require('react-aria-components');
|
|
8
8
|
var ouiTheme = require('@opengovsg/oui-theme');
|
|
9
|
-
var button = require('../button/button.cjs');
|
|
10
9
|
var calendar$1 = require('../calendar/calendar.cjs');
|
|
11
10
|
require('@internationalized/date');
|
|
12
11
|
var dateField = require('../date-field/date-field.cjs');
|
|
@@ -14,6 +13,7 @@ var field = require('../field/field.cjs');
|
|
|
14
13
|
var popover = require('../popover/popover.cjs');
|
|
15
14
|
var utils = require('../system/utils.cjs');
|
|
16
15
|
var calendar = require('../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/calendar.cjs');
|
|
16
|
+
var button = require('../button/button.cjs');
|
|
17
17
|
|
|
18
18
|
function DatePicker(originalProps) {
|
|
19
19
|
const [
|
|
@@ -7,13 +7,13 @@ var $670gB$react = require('react');
|
|
|
7
7
|
var date = require('@internationalized/date');
|
|
8
8
|
var reactAriaComponents = require('react-aria-components');
|
|
9
9
|
var ouiTheme = require('@opengovsg/oui-theme');
|
|
10
|
-
var button = require('../button/button.cjs');
|
|
11
10
|
var dateField = require('../date-field/date-field.cjs');
|
|
12
11
|
var field = require('../field/field.cjs');
|
|
13
12
|
var popover = require('../popover/popover.cjs');
|
|
14
13
|
var rangeCalendar = require('../range-calendar/range-calendar.cjs');
|
|
15
14
|
var utils = require('../system/utils.cjs');
|
|
16
15
|
var calendar = require('../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/calendar.cjs');
|
|
16
|
+
var button = require('../button/button.cjs');
|
|
17
17
|
|
|
18
18
|
function DateRangePicker(originalProps) {
|
|
19
19
|
const [
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var useControllableState = require('./hooks/use-controllable-state.cjs');
|
|
5
|
-
var button = require('./button/button.cjs');
|
|
6
5
|
var govtBanner = require('./govt-banner/govt-banner.cjs');
|
|
7
6
|
var ripple = require('./ripple/ripple.cjs');
|
|
8
7
|
var useRipple = require('./ripple/use-ripple.cjs');
|
|
@@ -19,13 +18,11 @@ var comboBox = require('./combo-box/combo-box.cjs');
|
|
|
19
18
|
var comboBoxFuzzy = require('./combo-box/combo-box-fuzzy.cjs');
|
|
20
19
|
var comboBoxItem = require('./combo-box/combo-box-item.cjs');
|
|
21
20
|
var comboBoxVariantContext = require('./combo-box/combo-box-variant-context.cjs');
|
|
22
|
-
var banner = require('./banner/banner.cjs');
|
|
23
21
|
var tagField = require('./tag-field/tag-field.cjs');
|
|
24
22
|
var tagFieldItem = require('./tag-field/tag-field-item.cjs');
|
|
25
23
|
var select = require('./select/select.cjs');
|
|
26
24
|
var selectItem = require('./select/select-item.cjs');
|
|
27
25
|
var selectVariantContext = require('./select/select-variant-context.cjs');
|
|
28
|
-
var badge = require('./badge/badge.cjs');
|
|
29
26
|
var calendar = require('./calendar/calendar.cjs');
|
|
30
27
|
var calendarStyleContext = require('./calendar/calendar-style-context.cjs');
|
|
31
28
|
var utils = require('./calendar/utils.cjs');
|
|
@@ -44,11 +41,13 @@ var paginationCursor = require('./pagination/pagination-cursor.cjs');
|
|
|
44
41
|
var paginationItem = require('./pagination/pagination-item.cjs');
|
|
45
42
|
var usePagination = require('./pagination/hooks/use-pagination.cjs');
|
|
46
43
|
var usePagination$1 = require('./pagination/use-pagination.cjs');
|
|
44
|
+
var button = require('./button/button.cjs');
|
|
45
|
+
var banner = require('./banner/banner.cjs');
|
|
46
|
+
var badge = require('./badge/badge.cjs');
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
exports.useControllableState = useControllableState.useControllableState;
|
|
51
|
-
exports.Button = button.Button;
|
|
52
51
|
exports.GovtBanner = govtBanner.GovtBanner;
|
|
53
52
|
exports.Ripple = ripple.Ripple;
|
|
54
53
|
exports.useRipple = useRipple.useRipple;
|
|
@@ -70,14 +69,12 @@ exports.ComboBoxFuzzy = comboBoxFuzzy.ComboBoxFuzzy;
|
|
|
70
69
|
exports.ComboBoxItem = comboBoxItem.ComboBoxItem;
|
|
71
70
|
exports.ComboBoxVariantContext = comboBoxVariantContext.ComboBoxVariantContext;
|
|
72
71
|
exports.useComboBoxVariantContext = comboBoxVariantContext.useComboBoxVariantContext;
|
|
73
|
-
exports.Banner = banner.Banner;
|
|
74
72
|
exports.TagField = tagField.TagField;
|
|
75
73
|
exports.TagFieldItem = tagFieldItem.TagFieldItem;
|
|
76
74
|
exports.Select = select.Select;
|
|
77
75
|
exports.SelectItem = selectItem.SelectItem;
|
|
78
76
|
exports.SelectVariantContext = selectVariantContext.SelectVariantContext;
|
|
79
77
|
exports.useSelectVariantContext = selectVariantContext.useSelectVariantContext;
|
|
80
|
-
exports.Badge = badge.Badge;
|
|
81
78
|
exports.Calendar = calendar.Calendar;
|
|
82
79
|
exports.CalendarStateWrapper = calendar.CalendarStateWrapper;
|
|
83
80
|
exports.CalendarStyleContext = calendarStyleContext.CalendarStyleContext;
|
|
@@ -122,3 +119,6 @@ exports.PaginationItem = paginationItem.PaginationItem;
|
|
|
122
119
|
exports.PaginationItemType = usePagination.PaginationItemType;
|
|
123
120
|
exports.CURSOR_TRANSITION_TIMEOUT = usePagination$1.CURSOR_TRANSITION_TIMEOUT;
|
|
124
121
|
exports.usePagination = usePagination$1.usePagination;
|
|
122
|
+
exports.Button = button.Button;
|
|
123
|
+
exports.Banner = banner.Banner;
|
|
124
|
+
exports.Badge = badge.Badge;
|
|
@@ -6,12 +6,12 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
var $670gB$react = require('react');
|
|
7
7
|
var reactAriaComponents = require('react-aria-components');
|
|
8
8
|
var ouiTheme = require('@opengovsg/oui-theme');
|
|
9
|
-
var button = require('../button/button.cjs');
|
|
10
9
|
var field = require('../field/field.cjs');
|
|
11
10
|
var popover = require('../popover/popover.cjs');
|
|
12
11
|
var utils = require('../system/utils.cjs');
|
|
13
12
|
var selectVariantContext = require('./select-variant-context.cjs');
|
|
14
13
|
var chevronDown = require('../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/chevron-down.cjs');
|
|
14
|
+
var button = require('../button/button.cjs');
|
|
15
15
|
|
|
16
16
|
const calculateEstimatedRowHeight = (size) => {
|
|
17
17
|
switch (size) {
|
|
@@ -47,11 +47,11 @@ function Select({
|
|
|
47
47
|
return /* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.Provider, { values: [[selectVariantContext.SelectVariantContext, variantProps]], children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
48
48
|
reactAriaComponents.Select,
|
|
49
49
|
{
|
|
50
|
+
...props,
|
|
50
51
|
className: ouiTheme.composeRenderProps(
|
|
51
|
-
props.className,
|
|
52
|
+
props.className ?? classNames?.base,
|
|
52
53
|
(className, renderProps) => styles.base({ className, ...renderProps })
|
|
53
54
|
),
|
|
54
|
-
...props,
|
|
55
55
|
children: [
|
|
56
56
|
label && /* @__PURE__ */ jsxRuntime.jsx(field.Label, { size: variantProps.size, className: classNames?.label, children: label }),
|
|
57
57
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -5,9 +5,9 @@ import { useMemo, useRef } from 'react';
|
|
|
5
5
|
import { useMessageFormatter, useDisclosure } from 'react-aria';
|
|
6
6
|
import { useDisclosureState } from 'react-stately';
|
|
7
7
|
import { bannerStyles } from '@opengovsg/oui-theme';
|
|
8
|
-
import { Button } from '../button/button.js';
|
|
9
8
|
import CircleAlert from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/circle-alert.js';
|
|
10
9
|
import Info from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/info.js';
|
|
10
|
+
import { Button } from '../button/button.js';
|
|
11
11
|
import X from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/x.js';
|
|
12
12
|
|
|
13
13
|
const i18nStrings = {
|
|
@@ -4,7 +4,6 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
4
4
|
import { useMemo } from 'react';
|
|
5
5
|
import { DatePicker as DatePicker$1, Dialog } from 'react-aria-components';
|
|
6
6
|
import { datePickerStyles, composeTailwindRenderProps } from '@opengovsg/oui-theme';
|
|
7
|
-
import { Button } from '../button/button.js';
|
|
8
7
|
import { Calendar as Calendar$1 } from '../calendar/calendar.js';
|
|
9
8
|
import '@internationalized/date';
|
|
10
9
|
import { DateInput } from '../date-field/date-field.js';
|
|
@@ -12,6 +11,7 @@ import { Label, FieldGroup, Description, FieldError } from '../field/field.js';
|
|
|
12
11
|
import { Popover } from '../popover/popover.js';
|
|
13
12
|
import { mapPropsVariants } from '../system/utils.js';
|
|
14
13
|
import Calendar from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/calendar.js';
|
|
14
|
+
import { Button } from '../button/button.js';
|
|
15
15
|
|
|
16
16
|
function DatePicker(originalProps) {
|
|
17
17
|
const [
|
|
@@ -5,13 +5,13 @@ import { useMemo } from 'react';
|
|
|
5
5
|
import { CalendarDate } from '@internationalized/date';
|
|
6
6
|
import { DateRangePicker as DateRangePicker$1, Dialog } from 'react-aria-components';
|
|
7
7
|
import { dateRangePickerStyles, composeTailwindRenderProps } from '@opengovsg/oui-theme';
|
|
8
|
-
import { Button } from '../button/button.js';
|
|
9
8
|
import { DateInput } from '../date-field/date-field.js';
|
|
10
9
|
import { Label, FieldGroup, Description, FieldError } from '../field/field.js';
|
|
11
10
|
import { Popover } from '../popover/popover.js';
|
|
12
11
|
import { RangeCalendar } from '../range-calendar/range-calendar.js';
|
|
13
12
|
import { mapPropsVariants } from '../system/utils.js';
|
|
14
13
|
import Calendar from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/calendar.js';
|
|
14
|
+
import { Button } from '../button/button.js';
|
|
15
15
|
|
|
16
16
|
function DateRangePicker(originalProps) {
|
|
17
17
|
const [
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
export { useControllableState } from './hooks/use-controllable-state.js';
|
|
3
|
-
export { Button } from './button/button.js';
|
|
4
3
|
export { GovtBanner } from './govt-banner/govt-banner.js';
|
|
5
4
|
export { Ripple } from './ripple/ripple.js';
|
|
6
5
|
export { useRipple } from './ripple/use-ripple.js';
|
|
@@ -17,13 +16,11 @@ export { ComboBox, ComboBoxEmptyState } from './combo-box/combo-box.js';
|
|
|
17
16
|
export { ComboBoxFuzzy } from './combo-box/combo-box-fuzzy.js';
|
|
18
17
|
export { ComboBoxItem } from './combo-box/combo-box-item.js';
|
|
19
18
|
export { ComboBoxVariantContext, useComboBoxVariantContext } from './combo-box/combo-box-variant-context.js';
|
|
20
|
-
export { Banner } from './banner/banner.js';
|
|
21
19
|
export { TagField } from './tag-field/tag-field.js';
|
|
22
20
|
export { TagFieldItem } from './tag-field/tag-field-item.js';
|
|
23
21
|
export { Select } from './select/select.js';
|
|
24
22
|
export { SelectItem } from './select/select-item.js';
|
|
25
23
|
export { SelectVariantContext, useSelectVariantContext } from './select/select-variant-context.js';
|
|
26
|
-
export { Badge } from './badge/badge.js';
|
|
27
24
|
export { Calendar, CalendarStateWrapper } from './calendar/calendar.js';
|
|
28
25
|
export { CalendarStyleContext, useCalendarStyleContext } from './calendar/calendar-style-context.js';
|
|
29
26
|
export { getEraFormat, useGenerateLocalizedMonths, useGenerateLocalizedYears, useLocalizedMonthYear } from './calendar/utils.js';
|
|
@@ -42,3 +39,6 @@ export { PaginationCursor } from './pagination/pagination-cursor.js';
|
|
|
42
39
|
export { PaginationItem } from './pagination/pagination-item.js';
|
|
43
40
|
export { PaginationItemType } from './pagination/hooks/use-pagination.js';
|
|
44
41
|
export { CURSOR_TRANSITION_TIMEOUT, usePagination } from './pagination/use-pagination.js';
|
|
42
|
+
export { Button } from './button/button.js';
|
|
43
|
+
export { Banner } from './banner/banner.js';
|
|
44
|
+
export { Badge } from './badge/badge.js';
|
|
@@ -4,12 +4,12 @@ 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 { Button } from '../button/button.js';
|
|
8
7
|
import { Label, Description, FieldError } from '../field/field.js';
|
|
9
8
|
import { Popover } from '../popover/popover.js';
|
|
10
9
|
import { mapPropsVariants } from '../system/utils.js';
|
|
11
10
|
import { SelectVariantContext } from './select-variant-context.js';
|
|
12
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';
|
|
12
|
+
import { Button } from '../button/button.js';
|
|
13
13
|
|
|
14
14
|
const calculateEstimatedRowHeight = (size) => {
|
|
15
15
|
switch (size) {
|
|
@@ -45,11 +45,11 @@ function Select({
|
|
|
45
45
|
return /* @__PURE__ */ jsx(Provider, { values: [[SelectVariantContext, variantProps]], children: /* @__PURE__ */ jsxs(
|
|
46
46
|
Select$1,
|
|
47
47
|
{
|
|
48
|
+
...props,
|
|
48
49
|
className: composeRenderProps(
|
|
49
|
-
props.className,
|
|
50
|
+
props.className ?? classNames?.base,
|
|
50
51
|
(className, renderProps) => styles.base({ className, ...renderProps })
|
|
51
52
|
),
|
|
52
|
-
...props,
|
|
53
53
|
children: [
|
|
54
54
|
label && /* @__PURE__ */ jsx(Label, { size: variantProps.size, className: classNames?.label, children: label }),
|
|
55
55
|
/* @__PURE__ */ jsxs(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengovsg/oui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"type": "module",
|
|
@@ -44,10 +44,11 @@
|
|
|
44
44
|
"lucide-react": "^0.475.0",
|
|
45
45
|
"motion": "^12.18.1",
|
|
46
46
|
"prettier": "^3.5.3",
|
|
47
|
+
"react": "^19.0.0",
|
|
47
48
|
"storybook": "9.1.1",
|
|
48
49
|
"tsx": "^4.20.3",
|
|
49
50
|
"typescript": "5.7.3",
|
|
50
|
-
"@opengovsg/oui-theme": "0.0.
|
|
51
|
+
"@opengovsg/oui-theme": "0.0.15",
|
|
51
52
|
"@oui/chromatic": "0.0.0",
|
|
52
53
|
"@oui/eslint-config": "0.0.0",
|
|
53
54
|
"@oui/prettier-config": "0.0.0",
|
|
@@ -69,7 +70,6 @@
|
|
|
69
70
|
"fuzzysort": "^3.1.0",
|
|
70
71
|
"lodash-es": "^4.17.21",
|
|
71
72
|
"nanoid": "^5.1.5",
|
|
72
|
-
"react": "^19.0.0",
|
|
73
73
|
"react-aria": "^3.41.1",
|
|
74
74
|
"react-aria-components": "^1.10.1",
|
|
75
75
|
"react-stately": "^3.39.0",
|
|
@@ -81,8 +81,9 @@
|
|
|
81
81
|
"prettier": "@oui/prettier-config",
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"motion": ">=11.12.0 || >=12.0.0-alpha.1",
|
|
84
|
+
"react": ">= 18",
|
|
84
85
|
"react-aria-components": "^1.10.1",
|
|
85
|
-
"@opengovsg/oui-theme": "0.0.
|
|
86
|
+
"@opengovsg/oui-theme": "0.0.15"
|
|
86
87
|
},
|
|
87
88
|
"scripts": {
|
|
88
89
|
"build": "tsx ../../tooling/build-scripts/main.ts --dts --clean",
|