@planningcenter/tapestry 4.14.0 → 4.14.1-qa-1664.0
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/components/DataTable/ActiveFilters.d.ts +6 -1
- package/dist/components/DataTable/ActiveFilters.d.ts.map +1 -1
- package/dist/components/DataTable/ActiveFilters.js +18 -10
- package/dist/components/DataTable/ActiveFilters.js.map +1 -1
- package/dist/components/DataTable/CollectionEditorsStatic.js +2 -2
- package/dist/components/DataTable/CollectionEditorsStatic.js.map +1 -1
- package/dist/components/DataTable/DataTable.d.ts +8 -5
- package/dist/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.js +26 -14
- package/dist/components/DataTable/DataTable.js.map +1 -1
- package/dist/components/DataTable/DataTableColumn.d.ts +12 -3
- package/dist/components/DataTable/DataTableColumn.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableColumnTypes.js +4 -4
- package/dist/components/DataTable/DataTableColumnTypes.js.map +1 -1
- package/dist/components/DataTable/ResultsCount.d.ts +2 -2
- package/dist/components/DataTable/ResultsCount.d.ts.map +1 -1
- package/dist/components/DataTable/ResultsCount.js +8 -7
- package/dist/components/DataTable/ResultsCount.js.map +1 -1
- package/dist/components/DataTable/SelectAllBanner.d.ts.map +1 -1
- package/dist/components/DataTable/SelectAllBanner.js +5 -3
- package/dist/components/DataTable/SelectAllBanner.js.map +1 -1
- package/dist/components/DataTable/TableActions.d.ts.map +1 -1
- package/dist/components/DataTable/TableActions.js +5 -3
- package/dist/components/DataTable/TableActions.js.map +1 -1
- package/dist/components/DataTable/dateFilter.js +28 -10
- package/dist/components/DataTable/dateFilter.js.map +1 -1
- package/dist/components/DataTable/dayFilter.js +4 -3
- package/dist/components/DataTable/dayFilter.js.map +1 -1
- package/dist/components/DataTable/numberFilter.js +2 -2
- package/dist/components/DataTable/numberFilter.js.map +1 -1
- package/dist/components/DataTable/useIsNarrowViewport.d.ts.map +1 -1
- package/dist/components/DataTable/useIsNarrowViewport.js +3 -1
- package/dist/components/DataTable/useIsNarrowViewport.js.map +1 -1
- package/dist/components/DataTable/useResultsAnnouncement.d.ts.map +1 -1
- package/dist/components/DataTable/useResultsAnnouncement.js +3 -1
- package/dist/components/DataTable/useResultsAnnouncement.js.map +1 -1
- package/dist/components/DataTable/useSavedViewsClient.d.ts +9 -2
- package/dist/components/DataTable/useSavedViewsClient.d.ts.map +1 -1
- package/dist/components/DataTable/useSavedViewsClient.js +9 -2
- package/dist/components/DataTable/useSavedViewsClient.js.map +1 -1
- package/dist/components/DataTable/useShelfExpanded.d.ts +4 -3
- package/dist/components/DataTable/useShelfExpanded.d.ts.map +1 -1
- package/dist/components/DataTable/useShelfExpanded.js +21 -5
- package/dist/components/DataTable/useShelfExpanded.js.map +1 -1
- package/dist/components/DataTable/views.js +1 -4
- package/dist/components/DataTable/views.js.map +1 -1
- package/dist/components/button/ActionsDropdownIconButton.js +3 -3
- package/dist/components/button/ActionsDropdownIconButton.js.map +1 -1
- package/dist/components/button/BaseButton.js +4 -4
- package/dist/components/button/BaseButton.js.map +1 -1
- package/dist/components/button/Button.js +2 -2
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/button/DropdownButton.js +3 -3
- package/dist/components/button/DropdownButton.js.map +1 -1
- package/dist/components/button/DropdownIconButton.js +2 -2
- package/dist/components/button/DropdownIconButton.js.map +1 -1
- package/dist/components/button/IconButton.js +5 -5
- package/dist/components/button/IconButton.js.map +1 -1
- package/dist/components/button/LoadingButton.js +2 -2
- package/dist/components/button/LoadingButton.js.map +1 -1
- package/dist/components/button/PageHeaderActionsDropdownButton.js +3 -3
- package/dist/components/button/PageHeaderActionsDropdownButton.js.map +1 -1
- package/dist/components/combo-box/ComboBox.d.ts.map +1 -1
- package/dist/components/combo-box/ComboBox.js +46 -31
- package/dist/components/combo-box/ComboBox.js.map +1 -1
- package/dist/components/currency-input/CurrencyInput.d.ts +1 -1
- package/dist/components/currency-input/CurrencyInput.d.ts.map +1 -1
- package/dist/components/currency-input/CurrencyInput.js +4 -1
- package/dist/components/currency-input/CurrencyInput.js.map +1 -1
- package/dist/components/date-picker/DatePicker.d.ts +1 -1
- package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
- package/dist/components/date-picker/DatePicker.js +99 -96
- package/dist/components/date-picker/DatePicker.js.map +1 -1
- package/dist/components/dropdown/Dropdown.js +13 -13
- package/dist/components/dropdown/Dropdown.js.map +1 -1
- package/dist/components/field/Field.js +5 -5
- package/dist/components/field/Field.js.map +1 -1
- package/dist/components/internal/LoadingSpinner.js +2 -2
- package/dist/components/internal/LoadingSpinner.js.map +1 -1
- package/dist/components/internal/tooltip/Tooltip.js +8 -8
- package/dist/components/internal/tooltip/Tooltip.js.map +1 -1
- package/dist/components/link/BaseLink.js +3 -3
- package/dist/components/link/BaseLink.js.map +1 -1
- package/dist/components/link/IconLink.js +5 -5
- package/dist/components/link/IconLink.js.map +1 -1
- package/dist/components/link/Link.js +2 -2
- package/dist/components/link/Link.js.map +1 -1
- package/dist/components/number-stepper/NumberStepper.js +11 -11
- package/dist/components/number-stepper/NumberStepper.js.map +1 -1
- package/dist/components/page-header/PageHeader.js +10 -10
- package/dist/components/page-header/PageHeader.js.map +1 -1
- package/dist/components/search-input/SearchInput.js +6 -6
- package/dist/components/search-input/SearchInput.js.map +1 -1
- package/dist/components/segmented-control/IconSegment.js +1 -1
- package/dist/components/segmented-control/IconSegment.js.map +1 -1
- package/dist/components/select/Select.js +6 -6
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/select/SelectNative.js +6 -6
- package/dist/components/select/SelectNative.js.map +1 -1
- package/dist/components/select/SelectOptions.js +9 -9
- package/dist/components/select/SelectOptions.js.map +1 -1
- package/dist/components/select/SelectPopover.js +14 -14
- package/dist/components/select/SelectPopover.js.map +1 -1
- package/dist/components/sidenav/Sidenav.js +6 -6
- package/dist/components/sidenav/Sidenav.js.map +1 -1
- package/dist/components/sidenav/SidenavItem.js +2 -2
- package/dist/components/sidenav/SidenavItem.js.map +1 -1
- package/dist/components/sidenav/SidenavSection.js +7 -7
- package/dist/components/sidenav/SidenavSection.js.map +1 -1
- package/dist/components/sidenav/private/SidenavResponsiveHeader.js +6 -6
- package/dist/components/sidenav/private/SidenavResponsiveHeader.js.map +1 -1
- package/dist/components/sidenav/private/withSlotChildrenAsActions.js +7 -7
- package/dist/components/sidenav/private/withSlotChildrenAsActions.js.map +1 -1
- package/dist/components/time-field/TimeField.d.ts.map +1 -1
- package/dist/components/time-field/TimeField.js +13 -10
- package/dist/components/time-field/TimeField.js.map +1 -1
- package/dist/packages/tapestry-render/dist/buildComponent-DzY2PDMT.js +4 -4
- package/dist/packages/tapestry-render/dist/buildComponent-DzY2PDMT.js.map +1 -1
- package/dist/reactRender.css +1463 -1460
- package/dist/reactRender.css.map +1 -1
- package/dist/reactRenderLegacy.css +1463 -1460
- package/dist/reactRenderLegacy.css.map +1 -1
- package/dist/tapestryMount.css +1463 -1460
- package/dist/tapestryMount.css.map +1 -1
- package/dist/tapestryMountLegacy.css +1463 -1460
- package/dist/tapestryMountLegacy.css.map +1 -1
- package/dist/unstable.css +3 -0
- package/dist/unstable.css.map +1 -1
- package/dist/utilities/Icon.js +2 -2
- package/dist/utilities/Icon.js.map +1 -1
- package/dist/utilities/buttonLinkShared.js +2 -2
- package/dist/utilities/buttonLinkShared.js.map +1 -1
- package/dist/utilities/locale.d.ts +4 -4
- package/dist/utilities/locale.js +5 -5
- package/dist/utilities/locale.js.map +1 -1
- package/dist/utilities/useDateFieldLocale.js +2 -2
- package/dist/utilities/useDateFieldLocale.js.map +1 -1
- package/docs/components/DataTable.md +158 -0
- package/docs/llms.txt +3 -0
- package/package.json +8 -6
|
@@ -11,8 +11,8 @@ import Icon from '../../utilities/Icon.js';
|
|
|
11
11
|
import { useAnnounce } from '../../utilities/useAnnounce.js';
|
|
12
12
|
import { useId } from '../../utilities/useId.js';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import
|
|
15
|
-
import { ListBoxLoadMoreItem, ComboBox as ComboBox$1, Label,
|
|
14
|
+
import React__default, { useContext, useEffect } from 'react';
|
|
15
|
+
import { ListBoxLoadMoreItem, ComboBox as ComboBox$1, Label, Button, Popover, ListBox, Text, ListBoxItem, ListBoxSection, ComboBoxStateContext, Input, Collection } from 'react-aria-components/ComboBox';
|
|
16
16
|
import { Group } from 'react-aria-components/Group';
|
|
17
17
|
import { Header } from 'react-aria-components/Header';
|
|
18
18
|
|
|
@@ -21,7 +21,22 @@ function resolveEmptyState(value) {
|
|
|
21
21
|
}
|
|
22
22
|
function ClearButton() {
|
|
23
23
|
const state = useContext(ComboBoxStateContext);
|
|
24
|
-
return (
|
|
24
|
+
return (React__default.createElement(IconButton, { "aria-label": "Clear", className: "tds-combo-box-clear-button", "data-input-empty": !state?.inputValue ? true : undefined, icon: React__default.createElement(Icon, { "aria-hidden": true, className: "tds-combo-box-clear-icon", symbol: "general#x" }), kind: "neutral-inline", onClick: () => state?.setInputValue(""), onMouseDown: (event) => event.preventDefault(), tabIndex: -1 }));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* In multiple selection mode, Tab closes the list without changing the
|
|
28
|
+
* selection. React Aria would otherwise toggle the focused option, which
|
|
29
|
+
* removes a value when the list opened with a selected option focused.
|
|
30
|
+
*/
|
|
31
|
+
function ComboBoxInput(props) {
|
|
32
|
+
const state = useContext(ComboBoxStateContext);
|
|
33
|
+
return (React__default.createElement(Input, { ...props, onKeyDownCapture: (event) => {
|
|
34
|
+
if (event.key === "Tab" &&
|
|
35
|
+
state?.isOpen &&
|
|
36
|
+
state.selectionManager.selectionMode === "multiple") {
|
|
37
|
+
state.selectionManager.setFocusedKey(null);
|
|
38
|
+
}
|
|
39
|
+
} }));
|
|
25
40
|
}
|
|
26
41
|
function ErrorAnnouncement({ labelledBy }) {
|
|
27
42
|
const announce = useAnnounce();
|
|
@@ -36,7 +51,7 @@ function FilteringAnnouncement() {
|
|
|
36
51
|
const state = useContext(ComboBoxStateContext);
|
|
37
52
|
if (!state?.isOpen)
|
|
38
53
|
return null;
|
|
39
|
-
return
|
|
54
|
+
return React__default.createElement(LoadingAnnouncement, { key: state.inputValue, message: "Loading" });
|
|
40
55
|
}
|
|
41
56
|
/**
|
|
42
57
|
* A combo box combines a text input with a filterable popover
|
|
@@ -57,13 +72,13 @@ function ComboBox({ allowsEmptyCollection = true, children, className, descripti
|
|
|
57
72
|
"tds-combo-box--lg": size === "lg",
|
|
58
73
|
"tds-field--lg": size === "lg",
|
|
59
74
|
}, className);
|
|
60
|
-
const loadMoreItem = onLoadMore && (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
75
|
+
const loadMoreItem = onLoadMore && (React__default.createElement(ListBoxLoadMoreItem, { className: "tds-combo-box-load-more", isLoading: loadingState === "loadingMore", onLoadMore: onLoadMore },
|
|
76
|
+
React__default.createElement("span", { className: "tds-combo-box-loading-label--hidden" }, "Loading more"),
|
|
77
|
+
React__default.createElement(LoadingSpinner, null),
|
|
78
|
+
React__default.createElement(LoadingAnnouncement, { message: "Loading more" })));
|
|
64
79
|
const renderChildren = () => {
|
|
65
80
|
if (typeof children === "function") {
|
|
66
|
-
return (
|
|
81
|
+
return (React__default.createElement(Collection, { items: restProps.items ?? restProps.defaultItems }, children));
|
|
67
82
|
}
|
|
68
83
|
return children;
|
|
69
84
|
};
|
|
@@ -74,31 +89,31 @@ function ComboBox({ allowsEmptyCollection = true, children, className, descripti
|
|
|
74
89
|
// of function types (to allow narrower handlers like
|
|
75
90
|
// `setValue: (Key|null) => void`), which isn't assignable to RAC's
|
|
76
91
|
// single-function signature.
|
|
77
|
-
|
|
78
|
-
!hideLabel &&
|
|
79
|
-
|
|
80
|
-
showSearchIcon && (
|
|
81
|
-
|
|
82
|
-
menuTrigger !== "focus" && !readOnly && (
|
|
83
|
-
|
|
92
|
+
React__default.createElement(ComboBox$1, { ...restProps, allowsEmptyCollection: allowsEmptyCollection, "aria-label": hideLabel ? label : undefined, className: combinedClassName, defaultFilter: filter, isDisabled: disabled, isReadOnly: readOnly, isRequired: required, menuTrigger: menuTrigger, onChange: onChange },
|
|
93
|
+
!hideLabel && React__default.createElement(Label, { className: "tds-field-label" }, label),
|
|
94
|
+
React__default.createElement(Group, { className: "tds-field-control tds-combo-box-field" },
|
|
95
|
+
showSearchIcon && (React__default.createElement(Icon, { "aria-hidden": true, className: "tds-combo-box-search-icon", symbol: "general#search" })),
|
|
96
|
+
React__default.createElement(ComboBoxInput, { "aria-invalid": invalid || undefined, className: "tds-combo-box-input", placeholder: placeholder }),
|
|
97
|
+
menuTrigger !== "focus" && !readOnly && (React__default.createElement(Button, { className: "tds-combo-box-button tds-btn tds-btn--infield" },
|
|
98
|
+
React__default.createElement(Icon, { "aria-hidden": true, symbol: "general#down-caret" }))),
|
|
84
99
|
showClearButton &&
|
|
85
100
|
menuTrigger === "focus" &&
|
|
86
101
|
!readOnly &&
|
|
87
|
-
!disabled &&
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
? () => (
|
|
91
|
-
loadingState === "error" && (
|
|
92
|
-
loadingState === "loading" ? (
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
102
|
+
!disabled && React__default.createElement(ClearButton, null)),
|
|
103
|
+
React__default.createElement(Popover, { className: "tds-combo-box-popover" },
|
|
104
|
+
React__default.createElement(ListBox, { className: "tds-combo-box-list", renderEmptyState: allowsEmptyCollection
|
|
105
|
+
? () => (React__default.createElement("div", { className: "tds-combo-box-empty-state", id: emptyStateId },
|
|
106
|
+
loadingState === "error" && (React__default.createElement(ErrorAnnouncement, { labelledBy: emptyStateId })),
|
|
107
|
+
loadingState === "loading" ? (React__default.createElement(React__default.Fragment, null,
|
|
108
|
+
React__default.createElement("span", { className: "tds-combo-box-loading-label--hidden" }, "Loading"),
|
|
109
|
+
React__default.createElement(LoadingSpinner, null),
|
|
110
|
+
React__default.createElement(LoadingAnnouncement, { message: "Loading" }))) : (resolveEmptyState(renderEmptyState))))
|
|
96
111
|
: undefined },
|
|
97
112
|
renderChildren(),
|
|
98
113
|
loadMoreItem),
|
|
99
|
-
loadingState === "filtering" &&
|
|
100
|
-
description && (
|
|
101
|
-
|
|
114
|
+
loadingState === "filtering" && React__default.createElement(FilteringAnnouncement, null)),
|
|
115
|
+
description && (React__default.createElement(Text, { className: "tds-field-description", slot: "description" },
|
|
116
|
+
React__default.createElement(Icon, { "aria-hidden": true, className: "tds-field-description-invalid-icon", symbol: "general#exclamation-triangle" }),
|
|
102
117
|
description))));
|
|
103
118
|
}
|
|
104
119
|
/**
|
|
@@ -112,7 +127,7 @@ function ComboBox({ allowsEmptyCollection = true, children, className, descripti
|
|
|
112
127
|
* @see {@link https://planningcenter.github.io/tapestry/?path=/docs/forms-combobox--docs | Storybook Documentation}
|
|
113
128
|
*/
|
|
114
129
|
function ComboBoxItem({ className, disabled, ...restProps }) {
|
|
115
|
-
return (
|
|
130
|
+
return (React__default.createElement(ListBoxItem, { ...restProps, className: classNames("tds-combo-box-list-item", className), isDisabled: disabled }));
|
|
116
131
|
}
|
|
117
132
|
/**
|
|
118
133
|
* A group of related {@link ComboBoxItem}s within a {@link ComboBox}. Renders
|
|
@@ -122,8 +137,8 @@ function ComboBoxItem({ className, disabled, ...restProps }) {
|
|
|
122
137
|
* @see {@link https://planningcenter.github.io/tapestry/?path=/docs/forms-combobox--docs | Storybook Documentation}
|
|
123
138
|
*/
|
|
124
139
|
function ComboBoxSection({ children, className, title, ...restProps }) {
|
|
125
|
-
return (
|
|
126
|
-
title && (
|
|
140
|
+
return (React__default.createElement(ListBoxSection, { ...restProps, className: classNames("tds-combo-box-list-section", className) },
|
|
141
|
+
title && (React__default.createElement(Header, { className: "tds-combo-box-section-header" }, title)),
|
|
127
142
|
children));
|
|
128
143
|
}
|
|
129
144
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBox.js","sources":["../../../src/components/combo-box/ComboBox.tsx"],"sourcesContent":["import \"../button/btn.css\"\nimport \"../field/index.css\"\nimport \"./index.css\"\n\nimport { IconButton } from \"@components/button\"\nimport {\n LOADING_ANNOUNCEMENT_DELAY_MS,\n LoadingAnnouncement,\n} from \"@components/internal/LoadingAnnouncement\"\nimport LoadingSpinner from \"@components/internal/LoadingSpinner\"\nimport Icon from \"@utilities/Icon\"\nimport type { CombineAriaPropsWithCustomProps } from \"@utilities/reactAriaProps\"\nimport { useAnnounce } from \"@utilities/useAnnounce\"\nimport { useId } from \"@utilities/useId\"\nimport classNames from \"classnames\"\nimport React, { type ReactNode, useContext, useEffect } from \"react\"\nimport {\n Button,\n Collection,\n ComboBox as AriaComboBox,\n type ComboBoxProps as AriaComboBoxProps,\n ComboBoxStateContext,\n Input,\n type Key,\n Label,\n ListBox,\n ListBoxItem,\n type ListBoxItemProps,\n ListBoxLoadMoreItem,\n type ListBoxProps as AriaListBoxProps,\n ListBoxSection,\n type ListBoxSectionProps,\n Popover,\n Text,\n} from \"react-aria-components/ComboBox\"\nimport { Group } from \"react-aria-components/Group\"\nimport { Header } from \"react-aria-components/Header\"\n\nexport type ComboBoxSize = \"md\" | \"lg\"\n\nexport type ComboBoxLoadingState =\n | \"error\"\n | \"filtering\"\n | \"idle\"\n | \"loading\"\n | \"loadingMore\"\n | \"sorting\"\n\ntype ComboBoxChildren<T extends object> = NonNullable<\n AriaListBoxProps<T>[\"children\"]\n>\n\nexport interface ComboBoxProps<T extends object = object> {\n /**\n * If `true`, keeps typed text that does not match an option. Turn it on when\n * ComboBox is a standalone search and the suggestions are shortcuts. Leave it\n * off in forms, where the value needs to match one of the options.\n */\n allowsCustomValue?: boolean\n /** The contents of the listbox. */\n children: ComboBoxChildren<T>\n /** Helper text displayed below the component. Styled as error text when `invalid` is `true`. */\n description?: ReactNode\n /** Disables the field and trigger button. */\n disabled?: boolean\n /** Custom filter function for determining if an item should appear in the list. */\n filter?: (textValue: string, inputValue: string) => boolean\n /** If `true`, the `label` text is rendered as an `aria-label` instead of a visible label element. */\n hideLabel?: boolean\n /** Whether the input is in an invalid state. */\n invalid?: boolean\n /** Accessible label for the field. */\n label: string\n /**\n * Async loading state for the listbox.\n * - `\"loading\"`: while the collection is empty, replaces the empty state with a spinner.\n * - `\"loadingMore\"`: shows an inline spinner at the bottom of the listbox (use with `onLoadMore`).\n * - `\"filtering\"`: renders as `\"idle\"`, but tells screen reader users \"Loading\" when results are slow to arrive after typing stops.\n * - `\"error\"`: renders as `\"idle\"`, but reads the empty state (`renderEmptyState`) to screen reader users while the collection is empty.\n * - Other values render as `\"idle\"`.\n */\n loadingState?: ComboBoxLoadingState\n /**\n * The interaction that opens the popover.\n * - `\"input\"`: opens when the user enters text in the input.\n * - `\"focus\"`: opens when the user focuses (via click or keyboard) into the input.\n * - `\"manual\"`: opens only via the trigger button or arrow keys.\n * @default \"focus\"\n */\n menuTrigger?: \"focus\" | \"input\" | \"manual\"\n /**\n * Called when the selected value(s) change.\n * Receives `Key[]` when `selectionMode` is `\"multiple\"`, otherwise `Key | null`.\n */\n onChange?: ((value: Key | null) => void) | ((value: Key[]) => void)\n /** Called when the user scrolls near the bottom of the listbox. Pair with `loadingState` for infinite scroll. */\n onLoadMore?: () => void\n /** Placeholder text for the input. */\n placeholder?: string\n /** If `true`, allows the value to be read but not changed. */\n readOnly?: boolean\n /** Content to display when there are no items in the list. Defaults to \"No results\". */\n renderEmptyState?: ReactNode | (() => ReactNode)\n /** If `true`, appends an asterisk at the end of the label text. */\n required?: boolean\n /**\n * If `true`, renders a button after the input that clears its text. Only\n * applies when `menuTrigger` is `\"focus\"`, where no trigger button is rendered.\n */\n showClearButton?: boolean\n /** If `true`, renders a search icon before the input. */\n showSearchIcon?: boolean\n /** The size of the combo box. */\n size?: ComboBoxSize\n}\n\ntype AriaComboBoxPropsToOmit = \"slot\"\n\ntype AriaComboBoxPropsToInclude =\n | \"allowsEmptyCollection\"\n | \"defaultItems\"\n | \"defaultValue\"\n | \"disabledKeys\"\n | \"inputValue\"\n | \"items\"\n | \"name\"\n | \"onInputChange\"\n | \"selectionMode\"\n | \"value\"\n\nexport type ComboBoxElementProps<T extends object = object> =\n CombineAriaPropsWithCustomProps<\n AriaComboBoxProps<T, \"single\" | \"multiple\">,\n ComboBoxProps<T>,\n AriaComboBoxPropsToOmit,\n AriaComboBoxPropsToInclude\n >\n\nfunction resolveEmptyState(value: ReactNode | (() => ReactNode)): ReactNode {\n return typeof value === \"function\" ? value() : value\n}\n\nfunction ClearButton() {\n const state = useContext(ComboBoxStateContext)\n\n return (\n <IconButton\n aria-label=\"Clear\"\n className=\"tds-combo-box-clear-button\"\n data-input-empty={!state?.inputValue ? true : undefined}\n icon={\n <Icon\n aria-hidden\n className=\"tds-combo-box-clear-icon\"\n symbol=\"general#x\"\n />\n }\n kind=\"neutral-inline\"\n onClick={() => state?.setInputValue(\"\")}\n onMouseDown={(event) => event.preventDefault()}\n tabIndex={-1}\n />\n )\n}\n\nfunction ErrorAnnouncement({ labelledBy }: { labelledBy: string }) {\n const announce = useAnnounce()\n const inputValue = useContext(ComboBoxStateContext)?.inputValue\n\n useEffect(() => {\n const timeout = setTimeout(\n () => announce({ \"aria-labelledby\": labelledBy }),\n LOADING_ANNOUNCEMENT_DELAY_MS\n )\n return () => clearTimeout(timeout)\n }, [announce, inputValue, labelledBy])\n\n return null\n}\n\nfunction FilteringAnnouncement() {\n const state = useContext(ComboBoxStateContext)\n if (!state?.isOpen) return null\n\n return <LoadingAnnouncement key={state.inputValue} message=\"Loading\" />\n}\n\n/**\n * A combo box combines a text input with a filterable popover\n * listbox, allowing users to type to search and select from a list of options.\n *\n * It supports both single and multiple selection (`selectionMode`), custom filtering,\n * and asynchronous data loading with infinite scroll capabilities (`loadingState` and `onLoadMore`).\n * Collections can be either static or dynamic, managed via the `children`, `items`,\n * or `defaultItems` props. To construct the dropdown list, compose this component\n * with `ComboBoxItem` for individual options and `ComboBoxSection` for grouping.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/forms-combobox--docs | Storybook Documentation}\n */\nexport function ComboBox<T extends object>({\n allowsEmptyCollection = true,\n children,\n className,\n description,\n disabled,\n filter,\n hideLabel,\n invalid,\n label,\n loadingState,\n menuTrigger = \"focus\",\n onChange,\n onLoadMore,\n placeholder,\n readOnly,\n renderEmptyState = \"No results\",\n required,\n showClearButton,\n showSearchIcon,\n size = \"md\",\n ...restProps\n}: ComboBoxElementProps<T>) {\n const emptyStateId = `tds-combo-box-empty-state-${useId()}`\n const combinedClassName = classNames(\n \"tds-field tds-combo-box\",\n {\n \"tds-combo-box--lg\": size === \"lg\",\n \"tds-field--lg\": size === \"lg\",\n },\n className\n )\n\n const loadMoreItem = onLoadMore && (\n <ListBoxLoadMoreItem\n className=\"tds-combo-box-load-more\"\n isLoading={loadingState === \"loadingMore\"}\n onLoadMore={onLoadMore}\n >\n <span className=\"tds-combo-box-loading-label--hidden\">Loading more</span>\n <LoadingSpinner />\n <LoadingAnnouncement message=\"Loading more\" />\n </ListBoxLoadMoreItem>\n )\n\n const renderChildren = () => {\n if (typeof children === \"function\") {\n return (\n <Collection items={restProps.items ?? restProps.defaultItems}>\n {children}\n </Collection>\n )\n }\n return children\n }\n\n return (\n // React Aria's ComboBox is generic over selection mode (M). We instantiate\n // it with the union \"single\" | \"multiple\" so value/defaultValue/selectionMode\n // accept both shapes. onChange still needs a cast because our type is a union\n // of function types (to allow narrower handlers like\n // `setValue: (Key|null) => void`), which isn't assignable to RAC's\n // single-function signature.\n <AriaComboBox<T, \"single\" | \"multiple\">\n {...restProps}\n allowsEmptyCollection={allowsEmptyCollection}\n aria-label={hideLabel ? label : undefined}\n className={combinedClassName}\n defaultFilter={filter}\n isDisabled={disabled}\n isReadOnly={readOnly}\n isRequired={required}\n menuTrigger={menuTrigger}\n onChange={onChange as (value: Key | Key[] | null) => void}\n >\n {!hideLabel && <Label className=\"tds-field-label\">{label}</Label>}\n <Group className=\"tds-field-control tds-combo-box-field\">\n {showSearchIcon && (\n <Icon\n aria-hidden\n className=\"tds-combo-box-search-icon\"\n symbol=\"general#search\"\n />\n )}\n <Input\n aria-invalid={invalid || undefined}\n className=\"tds-combo-box-input\"\n placeholder={placeholder}\n />\n {menuTrigger !== \"focus\" && !readOnly && (\n <Button className=\"tds-combo-box-button tds-btn tds-btn--infield\">\n <Icon aria-hidden symbol=\"general#down-caret\" />\n </Button>\n )}\n {showClearButton &&\n menuTrigger === \"focus\" &&\n !readOnly &&\n !disabled && <ClearButton />}\n </Group>\n <Popover className=\"tds-combo-box-popover\">\n <ListBox\n className=\"tds-combo-box-list\"\n renderEmptyState={\n allowsEmptyCollection\n ? () => (\n <div className=\"tds-combo-box-empty-state\" id={emptyStateId}>\n {loadingState === \"error\" && (\n <ErrorAnnouncement labelledBy={emptyStateId} />\n )}\n {loadingState === \"loading\" ? (\n <>\n <span className=\"tds-combo-box-loading-label--hidden\">\n Loading\n </span>\n <LoadingSpinner />\n <LoadingAnnouncement message=\"Loading\" />\n </>\n ) : (\n resolveEmptyState(renderEmptyState)\n )}\n </div>\n )\n : undefined\n }\n >\n {renderChildren()}\n {loadMoreItem}\n </ListBox>\n {loadingState === \"filtering\" && <FilteringAnnouncement />}\n </Popover>\n {description && (\n <Text className=\"tds-field-description\" slot=\"description\">\n <Icon\n aria-hidden\n className=\"tds-field-description-invalid-icon\"\n symbol=\"general#exclamation-triangle\"\n />\n {description}\n </Text>\n )}\n </AriaComboBox>\n )\n}\n\nexport interface ComboBoxItemProps {\n /** Disables the item. */\n disabled?: boolean\n}\n\ntype AriaListBoxItemPropsToOmit = \"isDisabled\"\n\ntype AriaListBoxItemPropsToInclude = \"onAction\" | \"textValue\" | \"value\"\n\nexport type ComboBoxItemElementProps<T extends object = object> =\n CombineAriaPropsWithCustomProps<\n ListBoxItemProps<T>,\n ComboBoxItemProps,\n AriaListBoxItemPropsToOmit,\n AriaListBoxItemPropsToInclude\n >\n\n/**\n * A selectable option within a {@link ComboBox}. Renders as a listbox item.\n *\n * Provide an `id` (or `key` when rendering from a collection) to identify the\n * option, and `textValue` when the visible children are not plain text so\n * type-ahead and screen readers have a stable label to use.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/forms-combobox--docs | Storybook Documentation}\n */\nexport function ComboBoxItem<T extends object>({\n className,\n disabled,\n ...restProps\n}: ComboBoxItemElementProps<T>) {\n return (\n <ListBoxItem\n {...restProps}\n className={classNames(\"tds-combo-box-list-item\", className)}\n isDisabled={disabled}\n />\n )\n}\n\nexport interface ComboBoxSectionProps {\n /** The items rendered within the section. */\n children: ReactNode\n /** Optional heading text rendered above the section's items. */\n title?: string\n}\n\ntype AriaListBoxSectionPropsToInclude = \"dependencies\"\n\nexport type ComboBoxSectionElementProps<T extends object = object> =\n CombineAriaPropsWithCustomProps<\n ListBoxSectionProps<T>,\n ComboBoxSectionProps,\n never,\n AriaListBoxSectionPropsToInclude\n >\n\n/**\n * A group of related {@link ComboBoxItem}s within a {@link ComboBox}. Renders\n * an optional `title` heading above its items.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/forms-combobox--docs | Storybook Documentation}\n */\nexport function ComboBoxSection<T extends object>({\n children,\n className,\n title,\n ...restProps\n}: ComboBoxSectionElementProps<T>) {\n return (\n <ListBoxSection\n {...restProps}\n className={classNames(\"tds-combo-box-list-section\", className)}\n >\n {title && (\n <Header className=\"tds-combo-box-section-header\">{title}</Header>\n )}\n {children}\n </ListBoxSection>\n )\n}\n"],"names":["AriaComboBox"],"mappings":";;;;;;;;;;;;;;;;;;AA0IA,SAAS,iBAAiB,CAAC,KAAoC,EAAA;AAC7D,IAAA,OAAO,OAAO,KAAK,KAAK,UAAU,GAAG,KAAK,EAAE,GAAG,KAAK;AACtD;AAEA,SAAS,WAAW,GAAA;AAClB,IAAA,MAAM,KAAK,GAAG,UAAU,CAAC,oBAAoB,CAAC;AAE9C,IAAA,QACE,KAAA,CAAA,aAAA,CAAC,UAAU,EAAA,EAAA,YAAA,EACE,OAAO,EAClB,SAAS,EAAC,4BAA4B,EAAA,kBAAA,EACpB,CAAC,KAAK,EAAE,UAA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SAAU,eAAe,CAAmB,EAChD,QAAQ,EACR,SAAS,EACT,KAAK,EACL,GAAG,SAAS,EACmB,EAAA;AAC/B,IAAA,QACE,KAAA,CAAA,aAAA,CAAC,cAAc,EAAA,EAAA,GACT,SAAS,EACb,SAAS,EAAE,UAAU,CAAC,4BAA4B,EAAE,SAAS,CAAC,EAAA;QAE7D,KAAK,KACJ,KAAA,CAAA,aAAA,CAAC,MAAM,EAAA,EAAC,SAAS,EAAC,8BAA8B,EAAA,EAAE,KAAK,CAAU,CAClE;QACA,QAAQ,CACM;AAErB;;;;"}
|
|
1
|
+
{"version":3,"file":"ComboBox.js","sources":["../../../src/components/combo-box/ComboBox.tsx"],"sourcesContent":["import \"../button/btn.css\"\nimport \"../field/index.css\"\nimport \"./index.css\"\n\nimport { IconButton } from \"@components/button\"\nimport {\n LOADING_ANNOUNCEMENT_DELAY_MS,\n LoadingAnnouncement,\n} from \"@components/internal/LoadingAnnouncement\"\nimport LoadingSpinner from \"@components/internal/LoadingSpinner\"\nimport Icon from \"@utilities/Icon\"\nimport type { CombineAriaPropsWithCustomProps } from \"@utilities/reactAriaProps\"\nimport { useAnnounce } from \"@utilities/useAnnounce\"\nimport { useId } from \"@utilities/useId\"\nimport classNames from \"classnames\"\nimport React, { type ReactNode, useContext, useEffect } from \"react\"\nimport {\n Button,\n Collection,\n ComboBox as AriaComboBox,\n type ComboBoxProps as AriaComboBoxProps,\n ComboBoxStateContext,\n Input,\n type Key,\n Label,\n ListBox,\n ListBoxItem,\n type ListBoxItemProps,\n ListBoxLoadMoreItem,\n type ListBoxProps as AriaListBoxProps,\n ListBoxSection,\n type ListBoxSectionProps,\n Popover,\n Text,\n} from \"react-aria-components/ComboBox\"\nimport { Group } from \"react-aria-components/Group\"\nimport { Header } from \"react-aria-components/Header\"\n\nexport type ComboBoxSize = \"md\" | \"lg\"\n\nexport type ComboBoxLoadingState =\n | \"error\"\n | \"filtering\"\n | \"idle\"\n | \"loading\"\n | \"loadingMore\"\n | \"sorting\"\n\ntype ComboBoxChildren<T extends object> = NonNullable<\n AriaListBoxProps<T>[\"children\"]\n>\n\nexport interface ComboBoxProps<T extends object = object> {\n /**\n * If `true`, keeps typed text that does not match an option. Turn it on when\n * ComboBox is a standalone search and the suggestions are shortcuts. Leave it\n * off in forms, where the value needs to match one of the options.\n */\n allowsCustomValue?: boolean\n /** The contents of the listbox. */\n children: ComboBoxChildren<T>\n /** Helper text displayed below the component. Styled as error text when `invalid` is `true`. */\n description?: ReactNode\n /** Disables the field and trigger button. */\n disabled?: boolean\n /** Custom filter function for determining if an item should appear in the list. */\n filter?: (textValue: string, inputValue: string) => boolean\n /** If `true`, the `label` text is rendered as an `aria-label` instead of a visible label element. */\n hideLabel?: boolean\n /** Whether the input is in an invalid state. */\n invalid?: boolean\n /** Accessible label for the field. */\n label: string\n /**\n * Async loading state for the listbox.\n * - `\"loading\"`: while the collection is empty, replaces the empty state with a spinner.\n * - `\"loadingMore\"`: shows an inline spinner at the bottom of the listbox (use with `onLoadMore`).\n * - `\"filtering\"`: renders as `\"idle\"`, but tells screen reader users \"Loading\" when results are slow to arrive after typing stops.\n * - `\"error\"`: renders as `\"idle\"`, but reads the empty state (`renderEmptyState`) to screen reader users while the collection is empty.\n * - Other values render as `\"idle\"`.\n */\n loadingState?: ComboBoxLoadingState\n /**\n * The interaction that opens the popover.\n * - `\"input\"`: opens when the user enters text in the input.\n * - `\"focus\"`: opens when the user focuses (via click or keyboard) into the input.\n * - `\"manual\"`: opens only via the trigger button or arrow keys.\n * @default \"focus\"\n */\n menuTrigger?: \"focus\" | \"input\" | \"manual\"\n /**\n * Called when the selected value(s) change.\n * Receives `Key[]` when `selectionMode` is `\"multiple\"`, otherwise `Key | null`.\n */\n onChange?: ((value: Key | null) => void) | ((value: Key[]) => void)\n /** Called when the user scrolls near the bottom of the listbox. Pair with `loadingState` for infinite scroll. */\n onLoadMore?: () => void\n /** Placeholder text for the input. */\n placeholder?: string\n /** If `true`, allows the value to be read but not changed. */\n readOnly?: boolean\n /** Content to display when there are no items in the list. Defaults to \"No results\". */\n renderEmptyState?: ReactNode | (() => ReactNode)\n /** If `true`, appends an asterisk at the end of the label text. */\n required?: boolean\n /**\n * If `true`, renders a button after the input that clears its text. Only\n * applies when `menuTrigger` is `\"focus\"`, where no trigger button is rendered.\n */\n showClearButton?: boolean\n /** If `true`, renders a search icon before the input. */\n showSearchIcon?: boolean\n /** The size of the combo box. */\n size?: ComboBoxSize\n}\n\ntype AriaComboBoxPropsToOmit = \"slot\"\n\ntype AriaComboBoxPropsToInclude =\n | \"allowsEmptyCollection\"\n | \"defaultItems\"\n | \"defaultValue\"\n | \"disabledKeys\"\n | \"inputValue\"\n | \"items\"\n | \"name\"\n | \"onInputChange\"\n | \"selectionMode\"\n | \"value\"\n\nexport type ComboBoxElementProps<T extends object = object> =\n CombineAriaPropsWithCustomProps<\n AriaComboBoxProps<T, \"single\" | \"multiple\">,\n ComboBoxProps<T>,\n AriaComboBoxPropsToOmit,\n AriaComboBoxPropsToInclude\n >\n\nfunction resolveEmptyState(value: ReactNode | (() => ReactNode)): ReactNode {\n return typeof value === \"function\" ? value() : value\n}\n\nfunction ClearButton() {\n const state = useContext(ComboBoxStateContext)\n\n return (\n <IconButton\n aria-label=\"Clear\"\n className=\"tds-combo-box-clear-button\"\n data-input-empty={!state?.inputValue ? true : undefined}\n icon={\n <Icon\n aria-hidden\n className=\"tds-combo-box-clear-icon\"\n symbol=\"general#x\"\n />\n }\n kind=\"neutral-inline\"\n onClick={() => state?.setInputValue(\"\")}\n onMouseDown={(event) => event.preventDefault()}\n tabIndex={-1}\n />\n )\n}\n\n/**\n * In multiple selection mode, Tab closes the list without changing the\n * selection. React Aria would otherwise toggle the focused option, which\n * removes a value when the list opened with a selected option focused.\n */\nfunction ComboBoxInput(props: React.ComponentProps<typeof Input>) {\n const state = useContext(ComboBoxStateContext)\n\n return (\n <Input\n {...props}\n onKeyDownCapture={(event) => {\n if (\n event.key === \"Tab\" &&\n state?.isOpen &&\n state.selectionManager.selectionMode === \"multiple\"\n ) {\n state.selectionManager.setFocusedKey(null)\n }\n }}\n />\n )\n}\n\nfunction ErrorAnnouncement({ labelledBy }: { labelledBy: string }) {\n const announce = useAnnounce()\n const inputValue = useContext(ComboBoxStateContext)?.inputValue\n\n useEffect(() => {\n const timeout = setTimeout(\n () => announce({ \"aria-labelledby\": labelledBy }),\n LOADING_ANNOUNCEMENT_DELAY_MS\n )\n return () => clearTimeout(timeout)\n }, [announce, inputValue, labelledBy])\n\n return null\n}\n\nfunction FilteringAnnouncement() {\n const state = useContext(ComboBoxStateContext)\n if (!state?.isOpen) return null\n\n return <LoadingAnnouncement key={state.inputValue} message=\"Loading\" />\n}\n\n/**\n * A combo box combines a text input with a filterable popover\n * listbox, allowing users to type to search and select from a list of options.\n *\n * It supports both single and multiple selection (`selectionMode`), custom filtering,\n * and asynchronous data loading with infinite scroll capabilities (`loadingState` and `onLoadMore`).\n * Collections can be either static or dynamic, managed via the `children`, `items`,\n * or `defaultItems` props. To construct the dropdown list, compose this component\n * with `ComboBoxItem` for individual options and `ComboBoxSection` for grouping.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/forms-combobox--docs | Storybook Documentation}\n */\nexport function ComboBox<T extends object>({\n allowsEmptyCollection = true,\n children,\n className,\n description,\n disabled,\n filter,\n hideLabel,\n invalid,\n label,\n loadingState,\n menuTrigger = \"focus\",\n onChange,\n onLoadMore,\n placeholder,\n readOnly,\n renderEmptyState = \"No results\",\n required,\n showClearButton,\n showSearchIcon,\n size = \"md\",\n ...restProps\n}: ComboBoxElementProps<T>) {\n const emptyStateId = `tds-combo-box-empty-state-${useId()}`\n const combinedClassName = classNames(\n \"tds-field tds-combo-box\",\n {\n \"tds-combo-box--lg\": size === \"lg\",\n \"tds-field--lg\": size === \"lg\",\n },\n className\n )\n\n const loadMoreItem = onLoadMore && (\n <ListBoxLoadMoreItem\n className=\"tds-combo-box-load-more\"\n isLoading={loadingState === \"loadingMore\"}\n onLoadMore={onLoadMore}\n >\n <span className=\"tds-combo-box-loading-label--hidden\">Loading more</span>\n <LoadingSpinner />\n <LoadingAnnouncement message=\"Loading more\" />\n </ListBoxLoadMoreItem>\n )\n\n const renderChildren = () => {\n if (typeof children === \"function\") {\n return (\n <Collection items={restProps.items ?? restProps.defaultItems}>\n {children}\n </Collection>\n )\n }\n return children\n }\n\n return (\n // React Aria's ComboBox is generic over selection mode (M). We instantiate\n // it with the union \"single\" | \"multiple\" so value/defaultValue/selectionMode\n // accept both shapes. onChange still needs a cast because our type is a union\n // of function types (to allow narrower handlers like\n // `setValue: (Key|null) => void`), which isn't assignable to RAC's\n // single-function signature.\n <AriaComboBox<T, \"single\" | \"multiple\">\n {...restProps}\n allowsEmptyCollection={allowsEmptyCollection}\n aria-label={hideLabel ? label : undefined}\n className={combinedClassName}\n defaultFilter={filter}\n isDisabled={disabled}\n isReadOnly={readOnly}\n isRequired={required}\n menuTrigger={menuTrigger}\n onChange={onChange as (value: Key | Key[] | null) => void}\n >\n {!hideLabel && <Label className=\"tds-field-label\">{label}</Label>}\n <Group className=\"tds-field-control tds-combo-box-field\">\n {showSearchIcon && (\n <Icon\n aria-hidden\n className=\"tds-combo-box-search-icon\"\n symbol=\"general#search\"\n />\n )}\n <ComboBoxInput\n aria-invalid={invalid || undefined}\n className=\"tds-combo-box-input\"\n placeholder={placeholder}\n />\n {menuTrigger !== \"focus\" && !readOnly && (\n <Button className=\"tds-combo-box-button tds-btn tds-btn--infield\">\n <Icon aria-hidden symbol=\"general#down-caret\" />\n </Button>\n )}\n {showClearButton &&\n menuTrigger === \"focus\" &&\n !readOnly &&\n !disabled && <ClearButton />}\n </Group>\n <Popover className=\"tds-combo-box-popover\">\n <ListBox\n className=\"tds-combo-box-list\"\n renderEmptyState={\n allowsEmptyCollection\n ? () => (\n <div className=\"tds-combo-box-empty-state\" id={emptyStateId}>\n {loadingState === \"error\" && (\n <ErrorAnnouncement labelledBy={emptyStateId} />\n )}\n {loadingState === \"loading\" ? (\n <>\n <span className=\"tds-combo-box-loading-label--hidden\">\n Loading\n </span>\n <LoadingSpinner />\n <LoadingAnnouncement message=\"Loading\" />\n </>\n ) : (\n resolveEmptyState(renderEmptyState)\n )}\n </div>\n )\n : undefined\n }\n >\n {renderChildren()}\n {loadMoreItem}\n </ListBox>\n {loadingState === \"filtering\" && <FilteringAnnouncement />}\n </Popover>\n {description && (\n <Text className=\"tds-field-description\" slot=\"description\">\n <Icon\n aria-hidden\n className=\"tds-field-description-invalid-icon\"\n symbol=\"general#exclamation-triangle\"\n />\n {description}\n </Text>\n )}\n </AriaComboBox>\n )\n}\n\nexport interface ComboBoxItemProps {\n /** Disables the item. */\n disabled?: boolean\n}\n\ntype AriaListBoxItemPropsToOmit = \"isDisabled\"\n\ntype AriaListBoxItemPropsToInclude = \"onAction\" | \"textValue\" | \"value\"\n\nexport type ComboBoxItemElementProps<T extends object = object> =\n CombineAriaPropsWithCustomProps<\n ListBoxItemProps<T>,\n ComboBoxItemProps,\n AriaListBoxItemPropsToOmit,\n AriaListBoxItemPropsToInclude\n >\n\n/**\n * A selectable option within a {@link ComboBox}. Renders as a listbox item.\n *\n * Provide an `id` (or `key` when rendering from a collection) to identify the\n * option, and `textValue` when the visible children are not plain text so\n * type-ahead and screen readers have a stable label to use.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/forms-combobox--docs | Storybook Documentation}\n */\nexport function ComboBoxItem<T extends object>({\n className,\n disabled,\n ...restProps\n}: ComboBoxItemElementProps<T>) {\n return (\n <ListBoxItem\n {...restProps}\n className={classNames(\"tds-combo-box-list-item\", className)}\n isDisabled={disabled}\n />\n )\n}\n\nexport interface ComboBoxSectionProps {\n /** The items rendered within the section. */\n children: ReactNode\n /** Optional heading text rendered above the section's items. */\n title?: string\n}\n\ntype AriaListBoxSectionPropsToInclude = \"dependencies\"\n\nexport type ComboBoxSectionElementProps<T extends object = object> =\n CombineAriaPropsWithCustomProps<\n ListBoxSectionProps<T>,\n ComboBoxSectionProps,\n never,\n AriaListBoxSectionPropsToInclude\n >\n\n/**\n * A group of related {@link ComboBoxItem}s within a {@link ComboBox}. Renders\n * an optional `title` heading above its items.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/forms-combobox--docs | Storybook Documentation}\n */\nexport function ComboBoxSection<T extends object>({\n children,\n className,\n title,\n ...restProps\n}: ComboBoxSectionElementProps<T>) {\n return (\n <ListBoxSection\n {...restProps}\n className={classNames(\"tds-combo-box-list-section\", className)}\n >\n {title && (\n <Header className=\"tds-combo-box-section-header\">{title}</Header>\n )}\n {children}\n </ListBoxSection>\n )\n}\n"],"names":["React","AriaComboBox"],"mappings":";;;;;;;;;;;;;;;;;;AA0IA,SAAS,iBAAiB,CAAC,KAAoC,EAAA;AAC7D,IAAA,OAAO,OAAO,KAAK,KAAK,UAAU,GAAG,KAAK,EAAE,GAAG,KAAK;AACtD;AAEA,SAAS,WAAW,GAAA;AAClB,IAAA,MAAM,KAAK,GAAG,UAAU,CAAC,oBAAoB,CAAC;AAE9C,IAAA,QACEA,cAAA,CAAA,aAAA,CAAC,UAAU,EAAA,EAAA,YAAA,EACE,OAAO,EAClB,SAAS,EAAC,4BAA4B,EAAA,kBAAA,EACpB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,EACvD,IAAI,EACFA,cAAA,CAAA,aAAA,CAAC,IAAI,yBAEH,SAAS,EAAC,0BAA0B,EACpC,MAAM,EAAC,WAAW,EAAA,CAClB,EAEJ,IAAI,EAAC,gBAAgB,EACrB,OAAO,EAAE,MAAM,KAAK,EAAE,aAAa,CAAC,EAAE,CAAC,EACvC,WAAW,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,cAAc,EAAE,EAC9C,QAAQ,EAAE,EAAE,EAAA,CACZ;AAEN;AAEA;;;;AAIG;AACH,SAAS,aAAa,CAAC,KAAyC,EAAA;AAC9D,IAAA,MAAM,KAAK,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAE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AAA,CACpB;AAEN;AAmBA;;;;;;AAMG;AACG,SAAU,eAAe,CAAmB,EAChD,QAAQ,EACR,SAAS,EACT,KAAK,EACL,GAAG,SAAS,EACmB,EAAA;AAC/B,IAAA,QACEA,cAAA,CAAA,aAAA,CAAC,cAAc,EAAA,EAAA,GACT,SAAS,EACb,SAAS,EAAE,UAAU,CAAC,4BAA4B,EAAE,SAAS,CAAC,EAAA;QAE7D,KAAK,KACJA,cAAA,CAAA,aAAA,CAAC,MAAM,EAAA,EAAC,SAAS,EAAC,8BAA8B,EAAA,EAAE,KAAK,CAAU,CAClE;QACA,QAAQ,CACM;AAErB;;;;"}
|
|
@@ -13,7 +13,7 @@ interface CurrencyInputBaseProps {
|
|
|
13
13
|
expand?: boolean;
|
|
14
14
|
/** Triggers invalid state (error border, error description, aria-invalid). */
|
|
15
15
|
invalid?: boolean;
|
|
16
|
-
/** BCP 47 locale used to derive the prefix and the screen-reader currency name. Defaults to the
|
|
16
|
+
/** BCP 47 locale used to derive the prefix and the screen-reader currency name. Defaults to the Tapestry locale (the nearest `I18nProvider`, then `setLocale`, then the browser locale). Only visibly changes anything under `currencyDisplay="symbol"` — under the default `narrowSymbol` a bad locale silently falls back rather than throwing. */
|
|
17
17
|
locale?: string;
|
|
18
18
|
/** Visual size — cascades to the prefix and input via Field's font-size custom property. Defaults to 'md'. */
|
|
19
19
|
size?: CurrencyInputSize;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrencyInput.d.ts","sourceRoot":"","sources":["../../../src/components/currency-input/CurrencyInput.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"CurrencyInput.d.ts","sourceRoot":"","sources":["../../../src/components/currency-input/CurrencyInput.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAMpB,OAAO,KAAK,EAAE,EAAc,KAAK,mBAAmB,EAAE,MAAM,OAAO,CAAA;AAEnE,MAAM,MAAM,iBAAiB,G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
|
|
2
3
|
import { useId } from '../../utilities/useId.js';
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import React__default, { forwardRef } from 'react';
|
|
@@ -40,7 +41,9 @@ function currencyNameFor(currency, locale) {
|
|
|
40
41
|
* @component
|
|
41
42
|
* @see {@link https://planningcenter.github.io/tapestry/?path=/docs/forms-currencyinput--docs | Storybook Documentation}
|
|
42
43
|
*/
|
|
43
|
-
const CurrencyInput = forwardRef(function CurrencyInput({ "aria-labelledby": ariaLabelledBy, className, currency = "USD", currencyDisplay = "narrowSymbol", description, expand, hideLabel, id, invalid, label, locale, size = "md", ...restProps }, ref) {
|
|
44
|
+
const CurrencyInput = forwardRef(function CurrencyInput({ "aria-labelledby": ariaLabelledBy, className, currency = "USD", currencyDisplay = "narrowSymbol", description, expand, hideLabel, id, invalid, label, locale: localeProp, size = "md", ...restProps }, ref) {
|
|
45
|
+
const tapestryLocale = useTapestryLocale();
|
|
46
|
+
const locale = localeProp ?? tapestryLocale;
|
|
44
47
|
const stableId = useId();
|
|
45
48
|
const inputId = id || `tds-currency-input-${stableId}`;
|
|
46
49
|
const descriptionId = description ? `${inputId}-description` : undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrencyInput.js","sources":["../../../src/components/currency-input/CurrencyInput.tsx"],"sourcesContent":["import \"./index.css\"\n\nimport { Field } from \"@components/field\"\nimport { useId } from \"@utilities/useId\"\nimport classNames from \"classnames\"\nimport React, { forwardRef, type InputHTMLAttributes } from \"react\"\n\nexport type CurrencyInputSize = \"lg\" | \"md\"\n\nexport type CurrencyInputDisplay = \"code\" | \"narrowSymbol\" | \"symbol\"\n\nfunction symbolFor(\n currency: string,\n currencyDisplay: CurrencyInputDisplay,\n locale?: string\n): string {\n try {\n return (\n new Intl.NumberFormat(locale, {\n currency,\n currencyDisplay,\n style: \"currency\",\n })\n .formatToParts(0)\n .find((part) => part.type === \"currency\")?.value ?? currency\n )\n } catch {\n return currency\n }\n}\n\nconst UNKNOWN_CURRENCY_NAME = \"Unknown currency.\"\n\nfunction currencyNameFor(currency: string, locale?: string): string {\n if (!Intl.supportedValuesOf(\"currency\").includes(currency.toUpperCase())) {\n return UNKNOWN_CURRENCY_NAME\n }\n\n try {\n const name = new Intl.DisplayNames(locale, { type: \"currency\" }).of(\n currency\n )\n return name ? `${name}.` : UNKNOWN_CURRENCY_NAME\n } catch {\n return UNKNOWN_CURRENCY_NAME\n }\n}\n\ninterface CurrencyInputBaseProps {\n /** ISO 4217 currency code (e.g. `\"USD\"`, `\"CAD\"`, `\"EUR\"`). Defaults to `\"USD\"`. Drives both the visual prefix and the screen-reader-only currency name. Unrecognized codes degrade the visual prefix to the code itself rather than blanking the field; the screen-reader-only currency name instead falls back to a generic \"Unknown currency.\" */\n currency?: string\n /** How to render the visual prefix. Defaults to `\"narrowSymbol\"`. Passed straight to `Intl.NumberFormat`. */\n currencyDisplay?: CurrencyInputDisplay\n /** Helper text below the input. Styled as an error when `invalid`. */\n description?: React.ReactNode\n /** If true, sets `data-flex-expand` so the field grows/shrinks to fill a `Flex` row. */\n expand?: boolean\n /** Triggers invalid state (error border, error description, aria-invalid). */\n invalid?: boolean\n /** BCP 47 locale used to derive the prefix and the screen-reader currency name. Defaults to the
|
|
1
|
+
{"version":3,"file":"CurrencyInput.js","sources":["../../../src/components/currency-input/CurrencyInput.tsx"],"sourcesContent":["import \"./index.css\"\n\nimport { Field } from \"@components/field\"\nimport { useTapestryLocale } from \"@utilities/locale\"\nimport { useId } from \"@utilities/useId\"\nimport classNames from \"classnames\"\nimport React, { forwardRef, type InputHTMLAttributes } from \"react\"\n\nexport type CurrencyInputSize = \"lg\" | \"md\"\n\nexport type CurrencyInputDisplay = \"code\" | \"narrowSymbol\" | \"symbol\"\n\nfunction symbolFor(\n currency: string,\n currencyDisplay: CurrencyInputDisplay,\n locale?: string\n): string {\n try {\n return (\n new Intl.NumberFormat(locale, {\n currency,\n currencyDisplay,\n style: \"currency\",\n })\n .formatToParts(0)\n .find((part) => part.type === \"currency\")?.value ?? currency\n )\n } catch {\n return currency\n }\n}\n\nconst UNKNOWN_CURRENCY_NAME = \"Unknown currency.\"\n\nfunction currencyNameFor(currency: string, locale?: string): string {\n if (!Intl.supportedValuesOf(\"currency\").includes(currency.toUpperCase())) {\n return UNKNOWN_CURRENCY_NAME\n }\n\n try {\n const name = new Intl.DisplayNames(locale, { type: \"currency\" }).of(\n currency\n )\n return name ? `${name}.` : UNKNOWN_CURRENCY_NAME\n } catch {\n return UNKNOWN_CURRENCY_NAME\n }\n}\n\ninterface CurrencyInputBaseProps {\n /** ISO 4217 currency code (e.g. `\"USD\"`, `\"CAD\"`, `\"EUR\"`). Defaults to `\"USD\"`. Drives both the visual prefix and the screen-reader-only currency name. Unrecognized codes degrade the visual prefix to the code itself rather than blanking the field; the screen-reader-only currency name instead falls back to a generic \"Unknown currency.\" */\n currency?: string\n /** How to render the visual prefix. Defaults to `\"narrowSymbol\"`. Passed straight to `Intl.NumberFormat`. */\n currencyDisplay?: CurrencyInputDisplay\n /** Helper text below the input. Styled as an error when `invalid`. */\n description?: React.ReactNode\n /** If true, sets `data-flex-expand` so the field grows/shrinks to fill a `Flex` row. */\n expand?: boolean\n /** Triggers invalid state (error border, error description, aria-invalid). */\n invalid?: boolean\n /** BCP 47 locale used to derive the prefix and the screen-reader currency name. Defaults to the Tapestry locale (the nearest `I18nProvider`, then `setLocale`, then the browser locale). Only visibly changes anything under `currencyDisplay=\"symbol\"` — under the default `narrowSymbol` a bad locale silently falls back rather than throwing. */\n locale?: string\n /** Visual size — cascades to the prefix and input via Field's font-size custom property. Defaults to 'md'. */\n size?: CurrencyInputSize\n}\n\ninterface CurrencyInputWithLabel extends CurrencyInputBaseProps {\n \"aria-labelledby\"?: never\n /** If true, the label is visually hidden but remains in the DOM/AT tree. */\n hideLabel?: boolean\n /** The visible label. */\n label: React.ReactNode\n}\n\ninterface CurrencyInputWithAriaLabelledBy extends CurrencyInputBaseProps {\n \"aria-labelledby\": string\n hideLabel?: never\n label?: never\n}\n\nexport type CurrencyInputProps =\n | CurrencyInputWithAriaLabelledBy\n | CurrencyInputWithLabel\n\n/**\n * Combines standard HTML input attributes with CurrencyInput's own props.\n * `type` and `inputMode` are fixed and not exposed; `size` is redefined above.\n */\nexport type CurrencyInputElementProps = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n keyof CurrencyInputProps | \"inputMode\" | \"size\" | \"type\"\n> &\n CurrencyInputProps\n\n/**\n * A currency-prefixed text input — a plain `<input>` with a leading currency\n * symbol (`$`, `€`, `CA$`, …) derived from an ISO 4217 currency code. It is\n * presentational only: no masking, parsing, or rounding. Value in, value\n * out — callers keep whatever number handling they already have. Composes\n * `Field` directly for label, description, and state layout.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/forms-currencyinput--docs | Storybook Documentation}\n */\nexport const CurrencyInput = forwardRef<\n HTMLInputElement,\n CurrencyInputElementProps\n>(function CurrencyInput(\n {\n \"aria-labelledby\": ariaLabelledBy,\n className,\n currency = \"USD\",\n currencyDisplay = \"narrowSymbol\",\n description,\n expand,\n hideLabel,\n id,\n invalid,\n label,\n locale: localeProp,\n size = \"md\",\n ...restProps\n }: CurrencyInputElementProps,\n ref\n) {\n const tapestryLocale = useTapestryLocale()\n const locale = localeProp ?? tapestryLocale\n const stableId = useId()\n const inputId = id || `tds-currency-input-${stableId}`\n const descriptionId = description ? `${inputId}-description` : undefined\n const currencyNameId = `${inputId}-currency-name`\n const describedBy = [currencyNameId, descriptionId].filter(Boolean).join(\" \")\n\n const symbol = symbolFor(currency, currencyDisplay, locale)\n const currencyName = currencyNameFor(currency, locale)\n\n const fieldClassName = classNames(\n { \"tds-field--lg\": size === \"lg\" },\n className\n )\n\n const fieldLabelProps = ariaLabelledBy\n ? { \"aria-labelledby\": ariaLabelledBy }\n : { hideLabel, label }\n\n return (\n <Field\n {...fieldLabelProps}\n className={fieldClassName}\n description={description}\n expand={expand}\n id={inputId}\n >\n <div className=\"tds-currency-input-control\">\n <div aria-hidden=\"true\" className=\"tds-currency-input-prefix\">\n {symbol}\n </div>\n <input\n {...restProps}\n aria-describedby={describedBy}\n aria-invalid={invalid || undefined}\n aria-labelledby={ariaLabelledBy}\n id={inputId}\n inputMode=\"decimal\"\n ref={ref}\n type=\"text\"\n />\n </div>\n <div\n className=\"tds-currency-input-currency-name--hidden\"\n id={currencyNameId}\n >\n {currencyName}\n </div>\n </Field>\n )\n})\n\nCurrencyInput.displayName = \"CurrencyInput\"\n"],"names":["React"],"mappings":";;;;;;AAYA,SAAS,SAAS,CAChB,QAAgB,EAChB,eAAqC,EACrC,MAAe,EAAA;AAEf,IAAA,IAAI;AACF,QAAA,QACE,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;YAC5B,QAAQ;YACR,eAAe;AACf,YAAA,KAAK,EAAE,UAAU;SAClB;aACE,aAAa,CAAC,CAAC;AACf,aAAA,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,EAAE,KAAK,IAAI,QAAQ;IAElE;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,QAAQ;IACjB;AACF;AAEA,MAAM,qBAAqB,GAAG,mBAAmB;AAEjD,SAAS,eAAe,CAAC,QAAgB,EAAE,MAAe,EAAA;AACxD,IAAA,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,EAAE;AACxE,QAAA,OAAO,qBAAqB;IAC9B;AAEA,IAAA,IAAI;QACF,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC,EAAE,CACjE,QAAQ,CACT;QACD,OAAO,IAAI,GAAG,CAAA,EAAG,IAAI,CAAA,CAAA,CAAG,GAAG,qBAAqB;IAClD;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,qBAAqB;IAC9B;AAC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,EACxB,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,OAAO,EAAA;QAEXA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,4BAA4B,EAAA;AACzC,YAAAA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,aAAA,EAAiB,MAAM,EAAC,SAAS,EAAC,2BAA2B,EAAA,EAC1D,MAAM,CACH;YACNA,cAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EAAA,GACM,SAAS,EAAA,kBAAA,EACK,WAAW,EAAA,cAAA,EACf,OAAO,IAAI,SAAS,EAAA,iBAAA,EACjB,cAAc,EAC/B,EAAE,EAAE,OAAO,EACX,SAAS,EAAC,SAAS,EACnB,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,MAAM,EAAA,CACX,CACE;AACN,QAAAA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACE,SAAS,EAAC,0CAA0C,EACpD,EAAE,EAAE,cAAc,EAAA,EAEjB,YAAY,CACT,CACA;AAEZ,CAAC;AAED,aAAa,CAAC,WAAW,GAAG,eAAe;;;;"}
|
|
@@ -75,7 +75,7 @@ export type DatePickerElementProps = CombineAriaPropsWithCustomProps<AriaDatePic
|
|
|
75
75
|
* @see {@link https://planningcenter.github.io/tapestry/?path=/docs/forms-datepicker--docs | Storybook Documentation}
|
|
76
76
|
* @see {@link https://github.com/planningcenter/tapestry/tree/main/packages/tapestry-migration-cli | Migration CLI: Available}
|
|
77
77
|
*/
|
|
78
|
-
export declare function DatePicker({ className, defaultValue, description, disabled, firstDayOfWeek, formatDateOnBlur, hideLabel, invalid, isDateUnavailable, label, max, min, name, onBlur, onChange, onFocus, readOnly, required, size, value, alwaysShowFourDigitYear, ...restProps }: DatePickerElementProps): React.JSX.Element;
|
|
78
|
+
export declare function DatePicker({ className, defaultValue, description, disabled, firstDayOfWeek, formatDateOnBlur, hideLabel, invalid, isDateUnavailable, label, max, min, name, onBlur, onChange, onFocus, onOpenChange, readOnly, required, size, value, alwaysShowFourDigitYear, ...restProps }: DatePickerElementProps): React.JSX.Element;
|
|
79
79
|
export declare namespace DatePicker {
|
|
80
80
|
var displayName: string;
|
|
81
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/DatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAA;AAC1B,OAAO,oBAAoB,CAAA;AAC3B,OAAO,aAAa,CAAA;AAEpB,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/DatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAA;AAC1B,OAAO,oBAAoB,CAAA;AAC3B,OAAO,aAAa,CAAA;AAEpB,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,yBAAyB,CAAA;AAGhC,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAA;AAGhF,OAAO,KAAK,EAAE,EACZ,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AAGd,OAAO,EAUL,KAAK,eAAe,IAAI,mBAAmB,EAM5C,MAAM,kCAAkC,CAAA;AAQzC,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,CAAA;AAExC,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,MAAM,CAAA;AAepD,MAAM,WAAW,eAAe;IAC9B,4GAA4G;IAC5G,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,wFAAwF;IACxF,YAAY,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAA;IACzC,gGAAgG;IAChG,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,4FAA4F;IAC5F,cAAc,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,K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