@opengovsg/oui 0.0.8 → 0.0.9
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/calendar/calendar-base.cjs +347 -0
- package/dist/cjs/calendar/calendar-style-context.cjs +38 -0
- package/dist/cjs/calendar/calendar.cjs +16 -0
- package/dist/cjs/calendar/index.cjs +22 -0
- package/dist/cjs/calendar/types.cjs +3 -0
- package/dist/cjs/calendar/utils.cjs +62 -0
- package/dist/cjs/index.cjs +20 -2
- package/dist/cjs/node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/{check.cjs → chevron-left.cjs} +3 -3
- package/dist/cjs/node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/{chevrons-up-down.cjs → chevron-right.cjs} +3 -6
- package/dist/cjs/select/select-item.cjs +11 -24
- package/dist/cjs/select/select.cjs +14 -6
- package/dist/cjs/system/utils.cjs +9 -6
- package/dist/cjs/tag-field/index.cjs +2 -0
- package/dist/cjs/tag-field/tag-field-item.cjs +28 -0
- package/dist/cjs/tag-field/tag-field-list.cjs +11 -22
- package/dist/cjs/tag-field/tag-field-tag-list.cjs +3 -2
- package/dist/cjs/tag-field/tag-field.cjs +3 -2
- package/dist/esm/calendar/calendar-base.js +343 -0
- package/dist/esm/calendar/calendar-style-context.js +34 -0
- package/dist/esm/calendar/calendar.js +14 -0
- package/dist/esm/calendar/index.js +5 -0
- package/dist/esm/calendar/types.js +1 -0
- package/dist/esm/calendar/utils.js +57 -0
- package/dist/esm/index.js +6 -1
- package/dist/esm/node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/{check.js → chevron-left.js} +3 -3
- package/dist/esm/node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/chevron-right.js +14 -0
- package/dist/esm/select/select-item.js +12 -25
- package/dist/esm/select/select.js +15 -7
- package/dist/esm/system/utils.js +9 -6
- package/dist/esm/tag-field/index.js +1 -0
- package/dist/esm/tag-field/tag-field-item.js +26 -0
- package/dist/esm/tag-field/tag-field-list.js +12 -22
- package/dist/esm/tag-field/tag-field-tag-list.js +3 -2
- package/dist/esm/tag-field/tag-field.js +4 -3
- package/dist/types/button/button.d.ts +5 -0
- package/dist/types/button/button.d.ts.map +1 -1
- package/dist/types/calendar/calendar-base.d.ts +14 -0
- package/dist/types/calendar/calendar-base.d.ts.map +1 -0
- package/dist/types/calendar/calendar-style-context.d.ts +1032 -0
- package/dist/types/calendar/calendar-style-context.d.ts.map +1 -0
- package/dist/types/calendar/calendar.d.ts +5 -0
- package/dist/types/calendar/calendar.d.ts.map +1 -0
- package/dist/types/calendar/index.d.ts +6 -0
- package/dist/types/calendar/index.d.ts.map +1 -0
- package/dist/types/calendar/types.d.ts +58 -0
- package/dist/types/calendar/types.d.ts.map +1 -0
- package/dist/types/calendar/utils.d.ts +13 -0
- package/dist/types/calendar/utils.d.ts.map +1 -0
- package/dist/types/index.d.mts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/select/select-item.d.ts.map +1 -1
- package/dist/types/select/select.d.ts.map +1 -1
- package/dist/types/system/utils.d.ts.map +1 -1
- package/dist/types/tag-field/index.d.ts +1 -0
- package/dist/types/tag-field/index.d.ts.map +1 -1
- package/dist/types/tag-field/tag-field-item.d.ts +7 -0
- package/dist/types/tag-field/tag-field-item.d.ts.map +1 -0
- package/dist/types/tag-field/tag-field-list.d.ts +2 -6
- package/dist/types/tag-field/tag-field-list.d.ts.map +1 -1
- package/dist/types/tag-field/tag-field-state-context.d.ts +1 -2
- package/dist/types/tag-field/tag-field-state-context.d.ts.map +1 -1
- package/dist/types/tag-field/tag-field-tag-list.d.ts.map +1 -1
- package/dist/types/tag-field/tag-field.d.ts.map +1 -1
- package/dist/types/tag-field/types.d.ts +6 -4
- package/dist/types/tag-field/types.d.ts.map +1 -1
- package/package.json +8 -7
- package/dist/esm/node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/chevrons-up-down.js +0 -17
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
export { Input } from './input/input.js';
|
|
3
2
|
export { useControllableState } from './hooks/use-controllable-state.js';
|
|
4
3
|
export { Button } from './button/button.js';
|
|
5
4
|
export { GovtBanner } from './govt-banner/govt-banner.js';
|
|
@@ -9,6 +8,7 @@ export { Spinner } from './spinner/spinner.js';
|
|
|
9
8
|
export { useSpinner } from './spinner/use-spinner.js';
|
|
10
9
|
export { Toggle } from './toggle/toggle.js';
|
|
11
10
|
export { SkipNavLink } from './skip-nav-link/skip-nav-link.js';
|
|
11
|
+
export { Input } from './input/input.js';
|
|
12
12
|
export { TextField } from './text-field/text-field.js';
|
|
13
13
|
export { Description, FieldError, FieldGroup, Label } from './field/field.js';
|
|
14
14
|
export { TextArea } from './text-area/text-area.js';
|
|
@@ -19,7 +19,12 @@ export { ComboBoxItem } from './combo-box/combo-box-item.js';
|
|
|
19
19
|
export { ComboBoxVariantContext, useComboBoxVariantContext } from './combo-box/combo-box-variant-context.js';
|
|
20
20
|
export { Banner } from './banner/banner.js';
|
|
21
21
|
export { TagField } from './tag-field/tag-field.js';
|
|
22
|
+
export { TagFieldItem } from './tag-field/tag-field-item.js';
|
|
22
23
|
export { Select } from './select/select.js';
|
|
23
24
|
export { SelectItem } from './select/select-item.js';
|
|
24
25
|
export { SelectVariantContext, useSelectVariantContext } from './select/select-variant-context.js';
|
|
25
26
|
export { Badge } from './badge/badge.js';
|
|
27
|
+
export { CalendarDate } from '@internationalized/date';
|
|
28
|
+
export { Calendar } from './calendar/calendar.js';
|
|
29
|
+
export { CalendarStyleContext, useCalendarStyleContext, useProvideCalendarStyles } from './calendar/calendar-style-context.js';
|
|
30
|
+
export { getEraFormat, useGenerateLocalizedMonths, useGenerateLocalizedYears, useLocalizedMonthYear } from './calendar/utils.js';
|
|
@@ -8,7 +8,7 @@ import createLucideIcon from '../createLucideIcon.js';
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
const __iconNode = [["path", { d: "
|
|
12
|
-
const
|
|
11
|
+
const __iconNode = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
|
|
12
|
+
const ChevronLeft = createLucideIcon("ChevronLeft", __iconNode);
|
|
13
13
|
|
|
14
|
-
export { __iconNode,
|
|
14
|
+
export { __iconNode, ChevronLeft as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import createLucideIcon from '../createLucideIcon.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @license lucide-react v0.475.0 - ISC
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the ISC license.
|
|
7
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
const __iconNode = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
12
|
+
const ChevronRight = createLucideIcon("ChevronRight", __iconNode);
|
|
13
|
+
|
|
14
|
+
export { __iconNode, ChevronRight as default };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
import { jsx
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { useContextProps, ListBoxItem } from 'react-aria-components';
|
|
5
5
|
import { selectItemStyles, composeRenderProps } from '@opengovsg/oui-theme';
|
|
6
6
|
import { forwardRef, mapPropsVariants } from '../system/utils.js';
|
|
7
7
|
import { SelectVariantContext } from './select-variant-context.js';
|
|
8
|
-
import Check from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/check.js';
|
|
9
8
|
|
|
10
9
|
const SelectItem = forwardRef(function SelectItem2({ classNames, ...originalProps }, ref) {
|
|
11
10
|
[originalProps, ref] = useContextProps(
|
|
@@ -21,6 +20,7 @@ const SelectItem = forwardRef(function SelectItem2({ classNames, ...originalProp
|
|
|
21
20
|
return /* @__PURE__ */ jsx(
|
|
22
21
|
ListBoxItem,
|
|
23
22
|
{
|
|
23
|
+
textValue: typeof props.children === "string" ? props.children : void 0,
|
|
24
24
|
...props,
|
|
25
25
|
ref,
|
|
26
26
|
className: composeRenderProps(
|
|
@@ -31,29 +31,16 @@ const SelectItem = forwardRef(function SelectItem2({ classNames, ...originalProp
|
|
|
31
31
|
if (typeof props.children === "function") {
|
|
32
32
|
return props.children(renderProps);
|
|
33
33
|
}
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
{
|
|
38
|
-
className:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
),
|
|
45
|
-
renderProps.isSelected && /* @__PURE__ */ jsx(
|
|
46
|
-
"span",
|
|
47
|
-
{
|
|
48
|
-
"aria-hidden": true,
|
|
49
|
-
className: styles.icon({
|
|
50
|
-
className: classNames?.icon,
|
|
51
|
-
...renderProps
|
|
52
|
-
}),
|
|
53
|
-
children: /* @__PURE__ */ jsx(Check, {})
|
|
54
|
-
}
|
|
55
|
-
)
|
|
56
|
-
] });
|
|
34
|
+
return /* @__PURE__ */ jsx(
|
|
35
|
+
"span",
|
|
36
|
+
{
|
|
37
|
+
className: styles.text({
|
|
38
|
+
className: classNames?.text,
|
|
39
|
+
...renderProps
|
|
40
|
+
}),
|
|
41
|
+
children: props.children
|
|
42
|
+
}
|
|
43
|
+
);
|
|
57
44
|
}
|
|
58
45
|
}
|
|
59
46
|
);
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
import { useMemo } from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { Provider, Select as Select$1, SelectValue, Popover, Virtualizer, ListLayout, ListBox } from 'react-aria-components';
|
|
6
6
|
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
|
-
import ChevronsUpDown from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/chevrons-up-down.js';
|
|
10
9
|
import { Label, Description } from '../field/field.js';
|
|
10
|
+
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';
|
|
11
11
|
import { Button } from '../button/button.js';
|
|
12
12
|
|
|
13
13
|
const calculateEstimatedRowHeight = (size) => {
|
|
@@ -32,13 +32,13 @@ function Select({
|
|
|
32
32
|
);
|
|
33
33
|
const { items, children, listLayoutOptions, ...props } = _props;
|
|
34
34
|
const styles = selectStyles(variantProps);
|
|
35
|
-
const
|
|
36
|
-
return
|
|
35
|
+
const layoutOptions = useMemo(() => {
|
|
36
|
+
return {
|
|
37
37
|
estimatedRowHeight: calculateEstimatedRowHeight(
|
|
38
38
|
variantProps.size ?? "md"
|
|
39
39
|
),
|
|
40
40
|
...listLayoutOptions
|
|
41
|
-
}
|
|
41
|
+
};
|
|
42
42
|
}, [listLayoutOptions, variantProps.size]);
|
|
43
43
|
return /* @__PURE__ */ jsx(Provider, { values: [[SelectVariantContext, variantProps]], children: /* @__PURE__ */ jsxs(
|
|
44
44
|
Select$1,
|
|
@@ -69,7 +69,14 @@ function Select({
|
|
|
69
69
|
})
|
|
70
70
|
}
|
|
71
71
|
),
|
|
72
|
-
/* @__PURE__ */ jsx(
|
|
72
|
+
/* @__PURE__ */ jsx(
|
|
73
|
+
ChevronDown,
|
|
74
|
+
{
|
|
75
|
+
className: styles.icon({
|
|
76
|
+
className: classNames?.icon
|
|
77
|
+
})
|
|
78
|
+
}
|
|
79
|
+
)
|
|
73
80
|
]
|
|
74
81
|
}
|
|
75
82
|
),
|
|
@@ -81,9 +88,10 @@ function Select({
|
|
|
81
88
|
children: description
|
|
82
89
|
}
|
|
83
90
|
),
|
|
84
|
-
/* @__PURE__ */ jsx(Popover, { className: styles.popover({ className: classNames?.popover }), children: /* @__PURE__ */ jsx(Virtualizer, { layout, children: /* @__PURE__ */ jsx(
|
|
91
|
+
/* @__PURE__ */ jsx(Popover, { className: styles.popover({ className: classNames?.popover }), children: /* @__PURE__ */ jsx(Virtualizer, { layout: ListLayout, layoutOptions, children: /* @__PURE__ */ jsx(
|
|
85
92
|
ListBox,
|
|
86
93
|
{
|
|
94
|
+
autoFocus: true,
|
|
87
95
|
items,
|
|
88
96
|
shouldFocusWrap: true,
|
|
89
97
|
className: composeRenderProps(
|
package/dist/esm/system/utils.js
CHANGED
|
@@ -11,12 +11,15 @@ const mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {
|
|
|
11
11
|
if (!variantKeys) {
|
|
12
12
|
return [props, {}];
|
|
13
13
|
}
|
|
14
|
-
const picked = variantKeys.reduce(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
const picked = variantKeys.reduce(
|
|
15
|
+
(acc, key) => {
|
|
16
|
+
if (key in props) {
|
|
17
|
+
return { ...acc, [key]: props[key] };
|
|
18
|
+
}
|
|
19
|
+
return acc;
|
|
20
|
+
},
|
|
21
|
+
{}
|
|
22
|
+
);
|
|
20
23
|
if (removeVariantProps) {
|
|
21
24
|
const omitted = Object.keys(props).filter((key) => !variantKeys.includes(key)).reduce((acc, key) => ({ ...acc, [key]: props[key] }), {});
|
|
22
25
|
return [omitted, picked];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
import { useContext } from 'react';
|
|
5
|
+
import { tagFieldItemStyles, dataAttr } from '@opengovsg/oui-theme';
|
|
6
|
+
import { forwardRefGeneric } from '../system/utils.js';
|
|
7
|
+
import { TagFieldStateContext } from './tag-field-state-context.js';
|
|
8
|
+
|
|
9
|
+
const TagFieldItemInner = ({ item, isHighlighted, classNames, ...itemProps }, ref) => {
|
|
10
|
+
const { itemToText, size } = useContext(TagFieldStateContext);
|
|
11
|
+
const styles = tagFieldItemStyles({ size });
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
"li",
|
|
14
|
+
{
|
|
15
|
+
ref,
|
|
16
|
+
...itemProps,
|
|
17
|
+
className: styles.container({ className: classNames?.container }),
|
|
18
|
+
"data-rac": true,
|
|
19
|
+
"data-hovered": dataAttr(isHighlighted),
|
|
20
|
+
children: /* @__PURE__ */ jsx("span", { className: styles.label({ className: classNames?.label }), children: itemToText(item) })
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
const TagFieldItem = forwardRefGeneric(TagFieldItemInner);
|
|
25
|
+
|
|
26
|
+
export { TagFieldItem };
|
|
@@ -3,27 +3,11 @@
|
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import { createContext, useContext, createElement } from 'react';
|
|
5
5
|
import { useContextProps } from 'react-aria-components';
|
|
6
|
-
import { tagFieldItemStyles, dataAttr } from '@opengovsg/oui-theme';
|
|
7
6
|
import { forwardRefGeneric } from '../system/utils.js';
|
|
7
|
+
import { TagFieldItem } from './tag-field-item.js';
|
|
8
8
|
import { TagFieldStateContext } from './tag-field-state-context.js';
|
|
9
9
|
|
|
10
10
|
const TagFieldListContext = createContext(null);
|
|
11
|
-
const TagFieldListItemInner = ({ item, isHighlighted, classNames, ...itemProps }, ref) => {
|
|
12
|
-
const { itemToText, size } = useContext(TagFieldStateContext);
|
|
13
|
-
const styles = tagFieldItemStyles({ size });
|
|
14
|
-
return /* @__PURE__ */ jsx(
|
|
15
|
-
"li",
|
|
16
|
-
{
|
|
17
|
-
ref,
|
|
18
|
-
...itemProps,
|
|
19
|
-
className: styles.container({ className: classNames?.container }),
|
|
20
|
-
"data-rac": true,
|
|
21
|
-
"data-hovered": dataAttr(isHighlighted),
|
|
22
|
-
children: /* @__PURE__ */ jsx("span", { className: styles.label({ className: classNames?.label }), children: itemToText(item) })
|
|
23
|
-
}
|
|
24
|
-
);
|
|
25
|
-
};
|
|
26
|
-
const TagFieldListItem = forwardRefGeneric(TagFieldListItemInner);
|
|
27
11
|
const TagFieldListInner = (props, ref) => {
|
|
28
12
|
[props, ref] = useContextProps(props, ref, TagFieldListContext);
|
|
29
13
|
const { items, getItemProps, highlightedIndex } = useContext(TagFieldStateContext);
|
|
@@ -55,16 +39,22 @@ const TagFieldListInner = (props, ref) => {
|
|
|
55
39
|
item,
|
|
56
40
|
isHighlighted: highlightedIndex === virtualRow.index,
|
|
57
41
|
key: virtualRow.key,
|
|
58
|
-
itemClassNames
|
|
59
|
-
...itemProps
|
|
42
|
+
classNames: itemClassNames
|
|
60
43
|
};
|
|
61
44
|
if (typeof props.children === "function") {
|
|
62
|
-
return props.children(childProps);
|
|
45
|
+
return props.children({ ...childProps, itemProps });
|
|
63
46
|
}
|
|
64
|
-
return /* @__PURE__ */ createElement(
|
|
47
|
+
return /* @__PURE__ */ createElement(
|
|
48
|
+
TagFieldItem,
|
|
49
|
+
{
|
|
50
|
+
...childProps,
|
|
51
|
+
...itemProps,
|
|
52
|
+
key: childProps.key
|
|
53
|
+
}
|
|
54
|
+
);
|
|
65
55
|
})
|
|
66
56
|
] }) });
|
|
67
57
|
};
|
|
68
58
|
const TagFieldList = forwardRefGeneric(TagFieldListInner);
|
|
69
59
|
|
|
70
|
-
export { TagFieldList, TagFieldListContext
|
|
60
|
+
export { TagFieldList, TagFieldListContext };
|
|
@@ -13,7 +13,8 @@ const TagFieldTagList = ({
|
|
|
13
13
|
getSelectedItemProps,
|
|
14
14
|
removeSelectedItem,
|
|
15
15
|
isDisabled,
|
|
16
|
-
isReadOnly
|
|
16
|
+
isReadOnly,
|
|
17
|
+
itemToText
|
|
17
18
|
} = useContext(TagFieldStateContext);
|
|
18
19
|
const handleRemoveSelectedItem = useCallback(
|
|
19
20
|
(item) => () => {
|
|
@@ -47,7 +48,7 @@ const TagFieldTagList = ({
|
|
|
47
48
|
className: classNames?.tag,
|
|
48
49
|
...itemProps,
|
|
49
50
|
children: [
|
|
50
|
-
/* @__PURE__ */ jsx("span", { className: classNames?.tagText, children: selectedItem
|
|
51
|
+
/* @__PURE__ */ jsx("span", { className: classNames?.tagText, children: itemToText(selectedItem) }),
|
|
51
52
|
/* @__PURE__ */ jsx(
|
|
52
53
|
X,
|
|
53
54
|
{
|
|
@@ -4,13 +4,14 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
4
4
|
import { createElement } from 'react';
|
|
5
5
|
import { composeRenderProps, Popover } from 'react-aria-components';
|
|
6
6
|
import { tagFieldStyles } from '@opengovsg/oui-theme';
|
|
7
|
-
import {
|
|
8
|
-
import { TagFieldList
|
|
7
|
+
import { TagFieldItem } from './tag-field-item.js';
|
|
8
|
+
import { TagFieldList } from './tag-field-list.js';
|
|
9
9
|
import { TagFieldRoot } from './tag-field-root.js';
|
|
10
10
|
import { TagFieldTagList } from './tag-field-tag-list.js';
|
|
11
11
|
import { TagFieldTrigger } from './tag-field-trigger.js';
|
|
12
12
|
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';
|
|
13
13
|
import { Label, FieldGroup, Description, FieldError } from '../field/field.js';
|
|
14
|
+
import { Input } from '../input/input.js';
|
|
14
15
|
|
|
15
16
|
function TagField({
|
|
16
17
|
classNames,
|
|
@@ -95,7 +96,7 @@ function TagField({
|
|
|
95
96
|
{
|
|
96
97
|
className: styles.list({ className: classNames?.list }),
|
|
97
98
|
itemClassNames: props.itemClassNames,
|
|
98
|
-
children: ({ key, ...props2 }) => children ? children({ key, ...props2 }) : /* @__PURE__ */ createElement(
|
|
99
|
+
children: ({ key, itemProps, ...props2 }) => children ? children({ key, itemProps, ...props2 }) : /* @__PURE__ */ createElement(TagFieldItem, { ...props2, ...itemProps, key })
|
|
99
100
|
}
|
|
100
101
|
) })
|
|
101
102
|
] });
|
|
@@ -30,6 +30,11 @@ export interface ButtonProps extends Omit<AriaButtonProps, "children">, ButtonVa
|
|
|
30
30
|
* @defaultValue "start"
|
|
31
31
|
*/
|
|
32
32
|
spinnerPlacement?: "start" | "end";
|
|
33
|
+
/**
|
|
34
|
+
* Whether the button only contains an icon.
|
|
35
|
+
* If true, you must provide an `aria-label` for accessibility.
|
|
36
|
+
*/
|
|
37
|
+
isIconOnly?: boolean;
|
|
33
38
|
}
|
|
34
39
|
/**
|
|
35
40
|
* You probably do not want to use this component if you are rendering a link.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/button/button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAK3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAO9D,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,EACvC,kBAAkB;IACpB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC9B;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAEzB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/button/button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAK3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAO9D,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,EACvC,kBAAkB;IACpB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC9B;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAEzB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;IAElC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,2GAwElB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ForwardedRef } from "react";
|
|
2
|
+
import type { DateValue } from "react-aria-components";
|
|
3
|
+
import type { CalendarProps } from "./types";
|
|
4
|
+
export interface CalendarBaseProps<T extends DateValue> extends CalendarProps<T> {
|
|
5
|
+
calendarRef: ForwardedRef<HTMLDivElement>;
|
|
6
|
+
}
|
|
7
|
+
export declare function CalendarBase<T extends DateValue>({ weekdayStyle, calendarRef, minValue, maxValue, bottomContent, showTodayButton, ...props }: CalendarBaseProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
interface CalendarHeaderProps {
|
|
9
|
+
offsetMonths?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function CalendarHeader({ offsetMonths }: CalendarHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function CalendarGridHeader(): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=calendar-base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-base.d.ts","sourceRoot":"","sources":["../../../src/calendar/calendar-base.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAsBtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AA6C5C,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,SAAS,CACpD,SAAQ,aAAa,CAAC,CAAC,CAAC;IACxB,WAAW,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;CAC1C;AAgED,wBAAgB,YAAY,CAAC,CAAC,SAAS,SAAS,EAAE,EAChD,YAAuB,EACvB,WAAW,EACX,QAAuC,EACvC,QAAyC,EACzC,aAAa,EACb,eAAsB,EACtB,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,CAAC,CAAC,2CAsEtB;AA+ED,UAAU,mBAAmB;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,wBAAgB,cAAc,CAAC,EAAE,YAAgB,EAAE,EAAE,mBAAmB,2CA8DvE;AAED,wBAAgB,kBAAkB,4CAiBjC"}
|