@opengovsg/oui 0.0.0-snapshot-20251002072708 → 0.0.0-snapshot-20251103063040
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 +8 -3
- package/dist/cjs/combo-box/combo-box.cjs +3 -1
- package/dist/cjs/date-picker/date-picker.cjs +2 -3
- package/dist/cjs/date-range-picker/date-range-picker.cjs +1 -1
- package/dist/cjs/index.cjs +18 -18
- package/dist/cjs/range-calendar/range-calendar.cjs +1 -1
- package/dist/cjs/select/select.cjs +1 -1
- package/dist/esm/banner/banner.js +8 -3
- package/dist/esm/combo-box/combo-box.js +3 -1
- package/dist/esm/date-picker/date-picker.js +2 -3
- package/dist/esm/date-range-picker/date-range-picker.js +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/range-calendar/range-calendar.js +1 -1
- package/dist/esm/select/select.js +1 -1
- package/dist/types/banner/banner.d.ts +1 -1
- package/dist/types/banner/banner.d.ts.map +1 -1
- package/dist/types/combo-box/combo-box.d.ts +2 -1
- package/dist/types/combo-box/combo-box.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -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 = {
|
|
@@ -43,6 +43,9 @@ const Banner = ({
|
|
|
43
43
|
if (startContentProp) {
|
|
44
44
|
return startContentProp;
|
|
45
45
|
}
|
|
46
|
+
if (startContentProp === null) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
46
49
|
switch (variant) {
|
|
47
50
|
case "info":
|
|
48
51
|
return /* @__PURE__ */ jsxRuntime.jsx(info.default, { className: styles.icon({ className: classNames?.icon }) });
|
|
@@ -58,7 +61,9 @@ const Banner = ({
|
|
|
58
61
|
}, [classNames?.icon, startContentProp, styles, variant]);
|
|
59
62
|
const bannerRef = $670gB$react.useRef(null);
|
|
60
63
|
const state = reactStately.useDisclosureState({
|
|
61
|
-
defaultExpanded
|
|
64
|
+
defaultExpanded,
|
|
65
|
+
isExpanded: disclosureProps.isExpanded,
|
|
66
|
+
onExpandedChange: disclosureProps.onExpandedChange
|
|
62
67
|
});
|
|
63
68
|
const { buttonProps, panelProps: bannerProps } = reactAria.useDisclosure(
|
|
64
69
|
disclosureProps,
|
|
@@ -76,7 +81,7 @@ const Banner = ({
|
|
|
76
81
|
...isDismissable ? bannerProps : {},
|
|
77
82
|
children: [
|
|
78
83
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.content({ className: classNames?.content }), children: [
|
|
79
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
84
|
+
startContent && /* @__PURE__ */ jsxRuntime.jsx(
|
|
80
85
|
"div",
|
|
81
86
|
{
|
|
82
87
|
className: styles.startContentWrapper({
|
|
@@ -75,6 +75,7 @@ function ComboBox(originalProps) {
|
|
|
75
75
|
dependencies,
|
|
76
76
|
onClear,
|
|
77
77
|
renderEmptyState: renderEmptyStateProp,
|
|
78
|
+
inputProps,
|
|
78
79
|
...props
|
|
79
80
|
} = _props;
|
|
80
81
|
const styles = ouiTheme.comboBoxStyles(variantProps);
|
|
@@ -135,7 +136,8 @@ function ComboBox(originalProps) {
|
|
|
135
136
|
className: ouiTheme.composeRenderProps(
|
|
136
137
|
classNames?.field,
|
|
137
138
|
(className, renderProps) => styles.field({ ...renderProps, className })
|
|
138
|
-
)
|
|
139
|
+
),
|
|
140
|
+
...inputProps
|
|
139
141
|
}
|
|
140
142
|
),
|
|
141
143
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6,14 +6,13 @@ 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
|
-
var calendar$1 = require('../calendar/calendar.cjs');
|
|
11
|
-
require('@internationalized/date');
|
|
12
9
|
var dateField = require('../date-field/date-field.cjs');
|
|
13
10
|
var field = require('../field/field.cjs');
|
|
14
11
|
var popover = require('../popover/popover.cjs');
|
|
15
12
|
var utils = require('../system/utils.cjs');
|
|
16
13
|
var calendar = require('../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/calendar.cjs');
|
|
14
|
+
var calendar$1 = require('../calendar/calendar.cjs');
|
|
15
|
+
var button = require('../button/button.cjs');
|
|
17
16
|
|
|
18
17
|
function DatePicker(originalProps) {
|
|
19
18
|
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');
|
|
@@ -24,10 +23,6 @@ var tagFieldItem = require('./tag-field/tag-field-item.cjs');
|
|
|
24
23
|
var select = require('./select/select.cjs');
|
|
25
24
|
var selectItem = require('./select/select-item.cjs');
|
|
26
25
|
var selectVariantContext = require('./select/select-variant-context.cjs');
|
|
27
|
-
var calendar = require('./calendar/calendar.cjs');
|
|
28
|
-
var calendarStyleContext = require('./calendar/calendar-style-context.cjs');
|
|
29
|
-
var utils = require('./calendar/utils.cjs');
|
|
30
|
-
var date = require('@internationalized/date');
|
|
31
26
|
var rangeCalendar = require('./range-calendar/range-calendar.cjs');
|
|
32
27
|
var menu = require('./menu/menu.cjs');
|
|
33
28
|
var popover = require('./popover/popover.cjs');
|
|
@@ -42,13 +37,17 @@ var paginationCursor = require('./pagination/pagination-cursor.cjs');
|
|
|
42
37
|
var paginationItem = require('./pagination/pagination-item.cjs');
|
|
43
38
|
var usePagination = require('./pagination/hooks/use-pagination.cjs');
|
|
44
39
|
var usePagination$1 = require('./pagination/use-pagination.cjs');
|
|
40
|
+
var button = require('./button/button.cjs');
|
|
45
41
|
var banner = require('./banner/banner.cjs');
|
|
46
42
|
var badge = require('./badge/badge.cjs');
|
|
43
|
+
var date = require('@internationalized/date');
|
|
44
|
+
var calendar = require('./calendar/calendar.cjs');
|
|
45
|
+
var calendarStyleContext = require('./calendar/calendar-style-context.cjs');
|
|
46
|
+
var utils = require('./calendar/utils.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;
|
|
@@ -76,18 +75,6 @@ exports.Select = select.Select;
|
|
|
76
75
|
exports.SelectItem = selectItem.SelectItem;
|
|
77
76
|
exports.SelectVariantContext = selectVariantContext.SelectVariantContext;
|
|
78
77
|
exports.useSelectVariantContext = selectVariantContext.useSelectVariantContext;
|
|
79
|
-
exports.Calendar = calendar.Calendar;
|
|
80
|
-
exports.CalendarStateWrapper = calendar.CalendarStateWrapper;
|
|
81
|
-
exports.CalendarStyleContext = calendarStyleContext.CalendarStyleContext;
|
|
82
|
-
exports.useCalendarStyleContext = calendarStyleContext.useCalendarStyleContext;
|
|
83
|
-
exports.getEraFormat = utils.getEraFormat;
|
|
84
|
-
exports.useGenerateLocalizedMonths = utils.useGenerateLocalizedMonths;
|
|
85
|
-
exports.useGenerateLocalizedYears = utils.useGenerateLocalizedYears;
|
|
86
|
-
exports.useLocalizedMonthYear = utils.useLocalizedMonthYear;
|
|
87
|
-
Object.defineProperty(exports, "CalendarDate", {
|
|
88
|
-
enumerable: true,
|
|
89
|
-
get: function () { return date.CalendarDate; }
|
|
90
|
-
});
|
|
91
78
|
exports.RangeCalendar = rangeCalendar.RangeCalendar;
|
|
92
79
|
exports.RangeCalendarCell = rangeCalendar.RangeCalendarCell;
|
|
93
80
|
exports.RangeCalendarStateWrapper = rangeCalendar.RangeCalendarStateWrapper;
|
|
@@ -120,5 +107,18 @@ exports.PaginationItem = paginationItem.PaginationItem;
|
|
|
120
107
|
exports.PaginationItemType = usePagination.PaginationItemType;
|
|
121
108
|
exports.CURSOR_TRANSITION_TIMEOUT = usePagination$1.CURSOR_TRANSITION_TIMEOUT;
|
|
122
109
|
exports.usePagination = usePagination$1.usePagination;
|
|
110
|
+
exports.Button = button.Button;
|
|
123
111
|
exports.Banner = banner.Banner;
|
|
124
112
|
exports.Badge = badge.Badge;
|
|
113
|
+
Object.defineProperty(exports, "CalendarDate", {
|
|
114
|
+
enumerable: true,
|
|
115
|
+
get: function () { return date.CalendarDate; }
|
|
116
|
+
});
|
|
117
|
+
exports.Calendar = calendar.Calendar;
|
|
118
|
+
exports.CalendarStateWrapper = calendar.CalendarStateWrapper;
|
|
119
|
+
exports.CalendarStyleContext = calendarStyleContext.CalendarStyleContext;
|
|
120
|
+
exports.useCalendarStyleContext = calendarStyleContext.useCalendarStyleContext;
|
|
121
|
+
exports.getEraFormat = utils.getEraFormat;
|
|
122
|
+
exports.useGenerateLocalizedMonths = utils.useGenerateLocalizedMonths;
|
|
123
|
+
exports.useGenerateLocalizedYears = utils.useGenerateLocalizedYears;
|
|
124
|
+
exports.useLocalizedMonthYear = utils.useLocalizedMonthYear;
|
|
@@ -8,12 +8,12 @@ var date = require('@internationalized/date');
|
|
|
8
8
|
var reactAriaComponents = require('react-aria-components');
|
|
9
9
|
var useDeepCompare = require('use-deep-compare');
|
|
10
10
|
var ouiTheme = require('@opengovsg/oui-theme');
|
|
11
|
-
var calendarStyleContext = require('../calendar/calendar-style-context.cjs');
|
|
12
11
|
var agnosticCalendarStateContext = require('../calendar/agnostic-calendar-state-context.cjs');
|
|
13
12
|
var calendarBottomContent = require('../calendar/calendar-bottom-content.cjs');
|
|
14
13
|
var calendarGridHeader = require('../calendar/calendar-grid-header.cjs');
|
|
15
14
|
var calendarHeader = require('../calendar/calendar-header.cjs');
|
|
16
15
|
var utils = require('../system/utils.cjs');
|
|
16
|
+
var calendarStyleContext = require('../calendar/calendar-style-context.cjs');
|
|
17
17
|
|
|
18
18
|
const RangeCalendar = utils.forwardRefGeneric(function RangeCalendar2(originalProps, ref) {
|
|
19
19
|
const [props, variantProps] = utils.mapPropsVariants(
|
|
@@ -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) {
|
|
@@ -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 = {
|
|
@@ -41,6 +41,9 @@ const Banner = ({
|
|
|
41
41
|
if (startContentProp) {
|
|
42
42
|
return startContentProp;
|
|
43
43
|
}
|
|
44
|
+
if (startContentProp === null) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
44
47
|
switch (variant) {
|
|
45
48
|
case "info":
|
|
46
49
|
return /* @__PURE__ */ jsx(Info, { className: styles.icon({ className: classNames?.icon }) });
|
|
@@ -56,7 +59,9 @@ const Banner = ({
|
|
|
56
59
|
}, [classNames?.icon, startContentProp, styles, variant]);
|
|
57
60
|
const bannerRef = useRef(null);
|
|
58
61
|
const state = useDisclosureState({
|
|
59
|
-
defaultExpanded
|
|
62
|
+
defaultExpanded,
|
|
63
|
+
isExpanded: disclosureProps.isExpanded,
|
|
64
|
+
onExpandedChange: disclosureProps.onExpandedChange
|
|
60
65
|
});
|
|
61
66
|
const { buttonProps, panelProps: bannerProps } = useDisclosure(
|
|
62
67
|
disclosureProps,
|
|
@@ -74,7 +79,7 @@ const Banner = ({
|
|
|
74
79
|
...isDismissable ? bannerProps : {},
|
|
75
80
|
children: [
|
|
76
81
|
/* @__PURE__ */ jsxs("div", { className: styles.content({ className: classNames?.content }), children: [
|
|
77
|
-
/* @__PURE__ */ jsx(
|
|
82
|
+
startContent && /* @__PURE__ */ jsx(
|
|
78
83
|
"div",
|
|
79
84
|
{
|
|
80
85
|
className: styles.startContentWrapper({
|
|
@@ -73,6 +73,7 @@ function ComboBox(originalProps) {
|
|
|
73
73
|
dependencies,
|
|
74
74
|
onClear,
|
|
75
75
|
renderEmptyState: renderEmptyStateProp,
|
|
76
|
+
inputProps,
|
|
76
77
|
...props
|
|
77
78
|
} = _props;
|
|
78
79
|
const styles = comboBoxStyles(variantProps);
|
|
@@ -133,7 +134,8 @@ function ComboBox(originalProps) {
|
|
|
133
134
|
className: composeRenderProps(
|
|
134
135
|
classNames?.field,
|
|
135
136
|
(className, renderProps) => styles.field({ ...renderProps, className })
|
|
136
|
-
)
|
|
137
|
+
),
|
|
138
|
+
...inputProps
|
|
137
139
|
}
|
|
138
140
|
),
|
|
139
141
|
/* @__PURE__ */ jsx(
|
|
@@ -4,14 +4,13 @@ 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
|
-
import { Calendar as Calendar$1 } from '../calendar/calendar.js';
|
|
9
|
-
import '@internationalized/date';
|
|
10
7
|
import { DateInput } from '../date-field/date-field.js';
|
|
11
8
|
import { Label, FieldGroup, Description, FieldError } from '../field/field.js';
|
|
12
9
|
import { Popover } from '../popover/popover.js';
|
|
13
10
|
import { mapPropsVariants } from '../system/utils.js';
|
|
14
11
|
import Calendar from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/calendar.js';
|
|
12
|
+
import { Calendar as Calendar$1 } from '../calendar/calendar.js';
|
|
13
|
+
import { Button } from '../button/button.js';
|
|
15
14
|
|
|
16
15
|
function DatePicker(originalProps) {
|
|
17
16
|
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';
|
|
@@ -22,10 +21,6 @@ export { TagFieldItem } from './tag-field/tag-field-item.js';
|
|
|
22
21
|
export { Select } from './select/select.js';
|
|
23
22
|
export { SelectItem } from './select/select-item.js';
|
|
24
23
|
export { SelectVariantContext, useSelectVariantContext } from './select/select-variant-context.js';
|
|
25
|
-
export { Calendar, CalendarStateWrapper } from './calendar/calendar.js';
|
|
26
|
-
export { CalendarStyleContext, useCalendarStyleContext } from './calendar/calendar-style-context.js';
|
|
27
|
-
export { getEraFormat, useGenerateLocalizedMonths, useGenerateLocalizedYears, useLocalizedMonthYear } from './calendar/utils.js';
|
|
28
|
-
export { CalendarDate } from '@internationalized/date';
|
|
29
24
|
export { RangeCalendar, RangeCalendarCell, RangeCalendarStateWrapper } from './range-calendar/range-calendar.js';
|
|
30
25
|
export { Menu, MenuItem, MenuSection, MenuSeparator, MenuTrigger, MenuVariantContext, SubmenuTrigger, useMenuVariantContext } from './menu/menu.js';
|
|
31
26
|
export { Popover } from './popover/popover.js';
|
|
@@ -40,5 +35,10 @@ export { PaginationCursor } from './pagination/pagination-cursor.js';
|
|
|
40
35
|
export { PaginationItem } from './pagination/pagination-item.js';
|
|
41
36
|
export { PaginationItemType } from './pagination/hooks/use-pagination.js';
|
|
42
37
|
export { CURSOR_TRANSITION_TIMEOUT, usePagination } from './pagination/use-pagination.js';
|
|
38
|
+
export { Button } from './button/button.js';
|
|
43
39
|
export { Banner } from './banner/banner.js';
|
|
44
40
|
export { Badge } from './badge/badge.js';
|
|
41
|
+
export { CalendarDate } from '@internationalized/date';
|
|
42
|
+
export { Calendar, CalendarStateWrapper } from './calendar/calendar.js';
|
|
43
|
+
export { CalendarStyleContext, useCalendarStyleContext } from './calendar/calendar-style-context.js';
|
|
44
|
+
export { getEraFormat, useGenerateLocalizedMonths, useGenerateLocalizedYears, useLocalizedMonthYear } from './calendar/utils.js';
|
|
@@ -6,12 +6,12 @@ import { CalendarDate, today, getLocalTimeZone, getDayOfWeek } from '@internatio
|
|
|
6
6
|
import { RangeCalendar as RangeCalendar$1, Provider, CalendarGrid, CalendarGridBody, Text, RangeCalendarStateContext, useLocale, CalendarCell } from 'react-aria-components';
|
|
7
7
|
import { useDeepCompareMemo } from 'use-deep-compare';
|
|
8
8
|
import { calendarStyles, composeRenderProps, cn, dataAttr } from '@opengovsg/oui-theme';
|
|
9
|
-
import { CalendarStyleContext, useCalendarStyleContext } from '../calendar/calendar-style-context.js';
|
|
10
9
|
import { AgnosticCalendarStateContext } from '../calendar/agnostic-calendar-state-context.js';
|
|
11
10
|
import { CalendarBottomContent } from '../calendar/calendar-bottom-content.js';
|
|
12
11
|
import { CalendarGridHeader } from '../calendar/calendar-grid-header.js';
|
|
13
12
|
import { CalendarHeader } from '../calendar/calendar-header.js';
|
|
14
13
|
import { forwardRefGeneric, mapPropsVariants } from '../system/utils.js';
|
|
14
|
+
import { CalendarStyleContext, useCalendarStyleContext } from '../calendar/calendar-style-context.js';
|
|
15
15
|
|
|
16
16
|
const RangeCalendar = forwardRefGeneric(function RangeCalendar2(originalProps, ref) {
|
|
17
17
|
const [props, variantProps] = mapPropsVariants(
|
|
@@ -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) {
|
|
@@ -6,7 +6,7 @@ interface BannerProps extends VariantProps<typeof bannerStyles>, AriaDisclosureP
|
|
|
6
6
|
/**
|
|
7
7
|
* The banner start content. Will default to the relevant icons based on the `variant` prop.
|
|
8
8
|
*/
|
|
9
|
-
startContent?: React.ReactNode;
|
|
9
|
+
startContent?: React.ReactNode | null;
|
|
10
10
|
children: ReactNode;
|
|
11
11
|
/**
|
|
12
12
|
* If provided, the dismiss button will be rendered.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../src/banner/banner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,mBAAmB,EAAoB,MAAM,YAAY,CAAA;AAMvE,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,YAAY,EACb,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAInD,UAAU,WACR,SAAQ,YAAY,CAAC,OAAO,YAAY,CAAC,EACvC,mBAAmB;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../src/banner/banner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,mBAAmB,EAAoB,MAAM,YAAY,CAAA;AAMvE,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,YAAY,EACb,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAInD,UAAU,WACR,SAAQ,YAAY,CAAC,OAAO,YAAY,CAAC,EACvC,mBAAmB;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAA;IACrC,QAAQ,EAAE,SAAS,CAAA;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAA;CACzC;AAiBD,eAAO,MAAM,MAAM,2IAUhB,WAAW,mDAsFb,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComboBoxProps as AriaComboBoxProps, ListBoxProps, ListLayoutOptions, ValidationResult } from "react-aria-components";
|
|
1
|
+
import type { ComboBoxProps as AriaComboBoxProps, InputProps, ListBoxProps, ListLayoutOptions, ValidationResult } from "react-aria-components";
|
|
2
2
|
import type { ComboBoxSlots, ComboBoxVariantProps, SlotsToClasses } from "@opengovsg/oui-theme";
|
|
3
3
|
export interface ComboBoxProps<T extends object> extends ComboBoxVariantProps, Omit<AriaComboBoxProps<T>, "children"> {
|
|
4
4
|
label?: React.ReactNode;
|
|
@@ -26,6 +26,7 @@ export interface ComboBoxProps<T extends object> extends ComboBoxVariantProps, O
|
|
|
26
26
|
onClear?: () => void;
|
|
27
27
|
renderEmptyState?: ListBoxProps<T>["renderEmptyState"];
|
|
28
28
|
children?: ListBoxProps<T>["children"];
|
|
29
|
+
inputProps?: Partial<InputProps>;
|
|
29
30
|
}
|
|
30
31
|
export declare function ComboBoxEmptyState({ size, className, }: Pick<ComboBoxVariantProps, "size"> & {
|
|
31
32
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combo-box.d.ts","sourceRoot":"","sources":["../../../src/combo-box/combo-box.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV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|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"type": "module",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"storybook": "9.1.6",
|
|
50
50
|
"tsx": "^4.20.3",
|
|
51
51
|
"typescript": "5.7.3",
|
|
52
|
-
"@opengovsg/oui-theme": "0.0.0-snapshot-
|
|
52
|
+
"@opengovsg/oui-theme": "0.0.0-snapshot-20251103063040",
|
|
53
53
|
"@oui/chromatic": "0.0.0",
|
|
54
54
|
"@oui/eslint-config": "0.0.0",
|
|
55
55
|
"@oui/prettier-config": "0.0.0",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"motion": ">=11.12.0 || >=12.0.0-alpha.1",
|
|
84
84
|
"react": ">= 18",
|
|
85
85
|
"react-aria-components": "^1.12.2",
|
|
86
|
-
"@opengovsg/oui-theme": "0.0.0-snapshot-
|
|
86
|
+
"@opengovsg/oui-theme": "0.0.0-snapshot-20251103063040"
|
|
87
87
|
},
|
|
88
88
|
"scripts": {
|
|
89
89
|
"build": "tsx ../../tooling/build-scripts/main.ts --dts --clean",
|