@webority/ui-react 0.137.2 → 0.139.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/canvas-kit/kit.js +25006 -26451
- package/dist/canvas-kit/manifest.json +2009 -3223
- package/dist/canvas-kit/release.json +6 -6
- package/dist/components/AppFilterBar.js +1 -1
- package/dist/components/AppSelect.js +1 -1
- package/dist/components/AppTablePagination.js +1 -1
- package/dist/components/AppTour.js +1 -1
- package/dist/guidance.json +24 -690
- package/dist/types/components/AppSelect.d.ts +127 -41
- package/dist/types/components/AppTour.d.ts +4 -1
- package/dist/types/index.d.ts +0 -4
- package/dist/ui-react.js +1 -1
- package/package.json +7 -7
- package/dist/components/AppAutocomplete.js +0 -1
- package/dist/components/AppCountrySelect.js +0 -1
- package/dist/components/AppMultiSelect.js +0 -1
- package/dist/components/AppTagInput.js +0 -1
- package/dist/types/components/AppAutocomplete.d.ts +0 -103
- package/dist/types/components/AppCountrySelect.d.ts +0 -85
- package/dist/types/components/AppMultiSelect.d.ts +0 -101
- package/dist/types/components/AppTagInput.d.ts +0 -82
|
@@ -1,71 +1,154 @@
|
|
|
1
1
|
import "@webority/ui-elements/elements/select";
|
|
2
2
|
declare const AppSelect: import("react").ForwardRefExoticComponent<{
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* What the control does. single picks one option; multiple picks several and shows them as chips; search filters options as the user types, from options or a loadOptions loader; tag takes free-text chips with optional suggestions, validate, pattern and maxTags; country picks an ISO country code with its flag and dial code. value is a string in single, search and country modes, and a string array in multiple and tag modes.
|
|
5
|
+
* @default "single"
|
|
6
|
+
*/
|
|
7
|
+
mode?: "single" | "multiple" | "search" | "tag" | "country";
|
|
8
|
+
/**
|
|
9
|
+
* comfortable is the labelled form look. compact is the toolbar, sort and filter picker look: an inline width and a menu sized to its options. Pair compact with size sm.
|
|
10
|
+
* @default "comfortable"
|
|
11
|
+
*/
|
|
12
|
+
density?: "comfortable" | "compact";
|
|
13
|
+
/**
|
|
14
|
+
* Control size: sm, md or lg (32, 36 or 44px). md is the default.
|
|
15
|
+
* @default "md"
|
|
16
|
+
*/
|
|
17
|
+
size?: "sm" | "md" | "lg";
|
|
18
|
+
/** The selected value: a string in single, search and country modes, a string array in multiple and tag modes. Leaving it out clears the control. */
|
|
19
|
+
value?: string | string[];
|
|
20
|
+
/** The starting value of an uncontrolled field, the same shape as value. */
|
|
21
|
+
defaultValue?: string | string[];
|
|
22
|
+
onChange?: (value: string | string[], meta?: {
|
|
23
|
+
isCustom: boolean;
|
|
24
|
+
}) => void;
|
|
25
|
+
/**
|
|
26
|
+
* The choices. A label may be a node, such as CO2 with a subscript: it renders as static markup, and search and the option's accessible name use its text. In tag mode these are the suggestions.
|
|
5
27
|
* @default []
|
|
6
28
|
*/
|
|
7
29
|
options?: Array<{
|
|
8
30
|
value: string;
|
|
9
31
|
label?: import('react').ReactNode;
|
|
10
32
|
text?: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
meta?: string;
|
|
35
|
+
group?: string;
|
|
11
36
|
icon?: string;
|
|
37
|
+
avatar?: string;
|
|
38
|
+
initials?: string;
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
disabledHint?: string;
|
|
12
41
|
}>;
|
|
42
|
+
loadOptions?: (query: string, opts: {
|
|
43
|
+
signal: AbortSignal;
|
|
44
|
+
}) => Promise<Array<{
|
|
45
|
+
value: string;
|
|
46
|
+
label: string;
|
|
47
|
+
}>>;
|
|
48
|
+
validate?: (value: string) => true | string;
|
|
49
|
+
/** The text in the empty field. Left unset, the element's default for the mode applies: Select… in single, search and multiple, Add… in tag, Select country in country. */
|
|
50
|
+
placeholder?: string;
|
|
51
|
+
/** The placeholder of the search box in the menu. Left unset, the element's default applies: Search… in every mode except country, which shows Search countries… */
|
|
52
|
+
searchPlaceholder?: string;
|
|
13
53
|
/**
|
|
14
|
-
*
|
|
15
|
-
* @default ""
|
|
54
|
+
* Text shown in the menu when a search matches nothing.
|
|
55
|
+
* @default "No matches"
|
|
16
56
|
*/
|
|
17
|
-
|
|
57
|
+
emptyText?: string;
|
|
58
|
+
/** Show the search box in the menu. Multiple and country modes are searchable by default; passing false turns it off. Single mode is not searchable by default. */
|
|
59
|
+
searchable?: boolean;
|
|
18
60
|
/**
|
|
19
|
-
*
|
|
20
|
-
* @default
|
|
61
|
+
* Show a control that clears the chosen value.
|
|
62
|
+
* @default false
|
|
21
63
|
*/
|
|
22
|
-
|
|
23
|
-
/**
|
|
64
|
+
clearable?: boolean;
|
|
65
|
+
/** Icon name shown in the control. */
|
|
66
|
+
icon?: string;
|
|
67
|
+
/** Static text inside the control before the value, such as Sort:. Not prefix, which is the bordered affix box. */
|
|
68
|
+
valuePrefix?: string;
|
|
69
|
+
/** A bordered box before the select, such as +91 or Tag, in the same shell as an input's prefix. Single, search and country modes only; ignored with a dev warning in multiple and tag. */
|
|
24
70
|
prefix?: import('react').ReactNode;
|
|
25
|
-
/** A bordered box after the select, in the same shell as an input's suffix. */
|
|
71
|
+
/** A bordered box after the select, in the same shell as an input's suffix. Single, search and country modes only; ignored with a dev warning in multiple and tag. */
|
|
26
72
|
suffix?: import('react').ReactNode;
|
|
27
|
-
/** The selected option's value. Leaving it out clears the control. */
|
|
28
|
-
value?: string;
|
|
29
|
-
/** The starting value of an uncontrolled field. */
|
|
30
|
-
defaultValue?: string;
|
|
31
|
-
onChange?: (value: string) => void;
|
|
32
73
|
/**
|
|
33
|
-
*
|
|
34
|
-
* @default "
|
|
74
|
+
* Where the label rests. Off keeps it above the control. Border sits the label inside as a placeholder, then slides it onto the top border on focus or once a value is chosen. Above rests it above the box, clear of the border. Needs label. Single, search and country modes only; ignored with a dev warning in multiple and tag.
|
|
75
|
+
* @default "off"
|
|
35
76
|
*/
|
|
36
|
-
|
|
77
|
+
floatingLabel?: "off" | "border" | "above";
|
|
78
|
+
/** Search mode: the query length before the element asks for options. */
|
|
79
|
+
minChars?: number;
|
|
80
|
+
/** Search mode: milliseconds to wait after typing before the query is sent. */
|
|
81
|
+
debounce?: number;
|
|
37
82
|
/**
|
|
38
|
-
*
|
|
39
|
-
* @default
|
|
83
|
+
* Search mode: a typed value that matches no option can be chosen as its own value.
|
|
84
|
+
* @default false
|
|
40
85
|
*/
|
|
41
|
-
|
|
86
|
+
allowCustom?: boolean;
|
|
42
87
|
/**
|
|
43
|
-
*
|
|
44
|
-
* @default "
|
|
88
|
+
* Search mode: the row that adds a custom entry.
|
|
89
|
+
* @default "Add '{query}'"
|
|
45
90
|
*/
|
|
46
|
-
|
|
91
|
+
addLabel?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Search mode: the row shown while a query loads.
|
|
94
|
+
* @default "Searching…"
|
|
95
|
+
*/
|
|
96
|
+
searchingText?: string;
|
|
97
|
+
/** Search mode: the row shown while the query is shorter than minChars. Left unset, the element shows Type to search…. */
|
|
98
|
+
hintText?: string;
|
|
99
|
+
/** Search mode: the label of the current value when the options do not carry it. */
|
|
100
|
+
valueLabel?: string;
|
|
101
|
+
/** Search mode: the image of the current value. */
|
|
102
|
+
valueAvatar?: string;
|
|
103
|
+
/** Search mode: the initials of the current value. */
|
|
104
|
+
valueInitials?: string;
|
|
105
|
+
/** Tag mode: the most chips a value may hold. */
|
|
106
|
+
maxTags?: number;
|
|
47
107
|
/**
|
|
48
|
-
*
|
|
108
|
+
* Tag mode: keep a repeated entry. By default an entry equal to one already chosen, ignoring case, is refused.
|
|
49
109
|
* @default false
|
|
50
110
|
*/
|
|
51
|
-
|
|
111
|
+
allowDuplicates?: boolean;
|
|
112
|
+
/** Tag mode: characters that commit an entry, such as comma or semicolon, as one string. */
|
|
113
|
+
separators?: string;
|
|
114
|
+
/** Tag mode: a regular expression a typed entry must match. */
|
|
115
|
+
pattern?: string;
|
|
116
|
+
/** Tag mode: the message shown when pattern or validate refuses an entry. */
|
|
117
|
+
invalidMessage?: string;
|
|
52
118
|
/**
|
|
53
|
-
*
|
|
119
|
+
* Tag mode: the row that creates an entry.
|
|
120
|
+
* @default "Create '{text}'"
|
|
121
|
+
*/
|
|
122
|
+
createLabel?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Multiple mode: fold the chips past the first few into a +N chip.
|
|
54
125
|
* @default false
|
|
55
126
|
*/
|
|
56
|
-
|
|
127
|
+
collapseChips?: boolean;
|
|
57
128
|
/**
|
|
58
|
-
*
|
|
59
|
-
* @default "
|
|
129
|
+
* Multiple mode: the footer count.
|
|
130
|
+
* @default "{n} selected"
|
|
60
131
|
*/
|
|
61
|
-
|
|
62
|
-
/** Icon name shown in the control. */
|
|
63
|
-
icon?: string;
|
|
132
|
+
selectedText?: string;
|
|
64
133
|
/**
|
|
65
|
-
*
|
|
66
|
-
* @default "
|
|
134
|
+
* Multiple mode: the footer clear action.
|
|
135
|
+
* @default "Clear all"
|
|
67
136
|
*/
|
|
68
|
-
|
|
137
|
+
clearAllLabel?: string;
|
|
138
|
+
/** Country mode: the ISO alpha-2 codes to offer. Leaving it out offers every country. */
|
|
139
|
+
countries?: string[];
|
|
140
|
+
/** Country mode: the ISO alpha-2 codes shown first under a Suggested group. */
|
|
141
|
+
suggested?: string[];
|
|
142
|
+
/**
|
|
143
|
+
* Country mode: the group label for suggested countries.
|
|
144
|
+
* @default "Suggested"
|
|
145
|
+
*/
|
|
146
|
+
suggestedLabel?: string;
|
|
147
|
+
/**
|
|
148
|
+
* Country mode: the group label for the full list.
|
|
149
|
+
* @default "All countries"
|
|
150
|
+
*/
|
|
151
|
+
allCountriesLabel?: string;
|
|
69
152
|
/** Disables the control. */
|
|
70
153
|
disabled?: boolean;
|
|
71
154
|
/**
|
|
@@ -113,11 +196,14 @@ declare const AppSelect: import("react").ForwardRefExoticComponent<{
|
|
|
113
196
|
/** Form field name. */
|
|
114
197
|
name?: string;
|
|
115
198
|
/**
|
|
116
|
-
*
|
|
117
|
-
* @default
|
|
199
|
+
* Extra class names added to the control.
|
|
200
|
+
* @default ""
|
|
118
201
|
*/
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
|
|
122
|
-
|
|
202
|
+
className?: string;
|
|
203
|
+
/**
|
|
204
|
+
* Extra class names added to the .field wrapper.
|
|
205
|
+
* @default ""
|
|
206
|
+
*/
|
|
207
|
+
fieldClassName?: string;
|
|
208
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
123
209
|
export default AppSelect;
|
|
@@ -2,7 +2,7 @@ import "@webority/ui-elements/elements/tour";
|
|
|
2
2
|
declare const AppTour: import("react").ForwardRefExoticComponent<{
|
|
3
3
|
/** Runs the tour. Set it back to false from onClose. */
|
|
4
4
|
open: boolean;
|
|
5
|
-
onClose: (reason: 'finished' | 'skipped' | 'alreadySeen' | 'noTargets', details: {
|
|
5
|
+
onClose: (reason: 'finished' | 'skipped' | 'alreadySeen' | 'noTargets' | 'next', details: {
|
|
6
6
|
index: number | null;
|
|
7
7
|
position: number | null;
|
|
8
8
|
total: number | null;
|
|
@@ -40,12 +40,15 @@ declare const AppTour: import("react").ForwardRefExoticComponent<{
|
|
|
40
40
|
endTitle?: string;
|
|
41
41
|
endMessage?: string;
|
|
42
42
|
endButton?: string;
|
|
43
|
+
endNextLabel?: string;
|
|
43
44
|
};
|
|
44
45
|
/**
|
|
45
46
|
* Show the closing dialog after the last step.
|
|
46
47
|
* @default true
|
|
47
48
|
*/
|
|
48
49
|
endDialog?: boolean;
|
|
50
|
+
/** Where the closing dialog's next step goes; the step shows only with labels.endNextLabel set. */
|
|
51
|
+
endNextHref?: string;
|
|
49
52
|
/** Extra class names on the tour element. */
|
|
50
53
|
className?: string;
|
|
51
54
|
} & import("react").RefAttributes<any>>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export { default as AppActionIcon } from "./components/AppActionIcon.jsx";
|
|
|
7
7
|
export { default as AppAlert } from "./components/AppAlert.jsx";
|
|
8
8
|
export { default as AppAsyncBlock } from "./components/AppAsyncBlock.jsx";
|
|
9
9
|
export { default as AppAuthLayout } from "./components/AppAuthLayout.jsx";
|
|
10
|
-
export { default as AppAutocomplete } from "./components/AppAutocomplete.jsx";
|
|
11
10
|
export { default as AppAvatar } from "./components/AppAvatar.jsx";
|
|
12
11
|
export { default as AppAvatarGroup } from "./components/AppAvatarGroup.jsx";
|
|
13
12
|
export { default as AppBadge } from "./components/AppBadge.jsx";
|
|
@@ -38,7 +37,6 @@ export { default as AppConsentBanner } from "./components/AppConsentBanner.jsx";
|
|
|
38
37
|
export { default as AppContextMenu } from "./components/AppContextMenu.jsx";
|
|
39
38
|
export { default as AppCopyButton } from "./components/AppCopyButton.jsx";
|
|
40
39
|
export { default as AppCountryFlag } from "./components/AppCountryFlag.jsx";
|
|
41
|
-
export { default as AppCountrySelect } from "./components/AppCountrySelect.jsx";
|
|
42
40
|
export { default as AppDashboardCell } from "./components/AppDashboardCell.jsx";
|
|
43
41
|
export { default as AppDashboardGrid } from "./components/AppDashboardGrid.jsx";
|
|
44
42
|
export { default as AppDataTable } from "./components/AppDataTable.jsx";
|
|
@@ -81,7 +79,6 @@ export { default as AppMentionInput } from "./components/AppMentionInput.jsx";
|
|
|
81
79
|
export { default as AppMeter } from "./components/AppMeter.jsx";
|
|
82
80
|
export { default as AppMetricStrip } from "./components/AppMetricStrip.jsx";
|
|
83
81
|
export { default as AppModal } from "./components/AppModal.jsx";
|
|
84
|
-
export { default as AppMultiSelect } from "./components/AppMultiSelect.jsx";
|
|
85
82
|
export { default as AppNavigationMenu } from "./components/AppNavigationMenu.jsx";
|
|
86
83
|
export { default as AppNavList } from "./components/AppNavList.jsx";
|
|
87
84
|
export { default as AppNotificationCenter } from "./components/AppNotificationCenter.jsx";
|
|
@@ -143,7 +140,6 @@ export { default as AppSwitch } from "./components/AppSwitch.jsx";
|
|
|
143
140
|
export { default as AppTablePagination } from "./components/AppTablePagination.jsx";
|
|
144
141
|
export { default as AppTableToolbar } from "./components/AppTableToolbar.jsx";
|
|
145
142
|
export { default as AppTabs } from "./components/AppTabs.jsx";
|
|
146
|
-
export { default as AppTagInput } from "./components/AppTagInput.jsx";
|
|
147
143
|
export { default as AppTextarea } from "./components/AppTextarea.jsx";
|
|
148
144
|
export { default as AppThemeToggle } from "./components/AppThemeToggle.jsx";
|
|
149
145
|
export { default as AppTimeline } from "./components/AppTimeline.jsx";
|
package/dist/ui-react.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./components/AppAccordion.js";import t from"./components/AppAccountSwitcher.js";import n from"./components/AppActionIcon.js";import r from"./components/AppAlert.js";import i from"./components/AppAsyncBlock.js";import a from"./components/AppAuthLayout.js";import o from"./components/AppAutocomplete.js";import s from"./components/AppAvatar.js";import c from"./components/AppAvatarGroup.js";import l from"./components/AppBadge.js";import u from"./components/AppBanner.js";import d from"./components/AppBreadcrumbs.js";import f from"./components/AppButton.js";import p from"./components/AppButtonGroup.js";import m from"./components/AppCalendar.js";import h from"./components/AppCard.js";import g from"./components/AppCarousel.js";import _ from"./components/AppCell.js";import v from"./components/AppChart.js";import y from"./components/AppChartCard.js";import b from"./components/AppCheckbox.js";import x from"./components/AppChip.js";import S from"./components/AppChipGroup.js";import C from"./components/AppChoiceCard.js";import w from"./components/AppChoiceChip.js";import T from"./components/AppCodeBlock.js";import E from"./components/AppColorField.js";import D from"./components/AppColumnMenu.js";import O from"./components/AppCommandPalette.js";import k from"./components/AppCommentThread.js";import A from"./components/AppCompareTable.js";import j from"./components/AppConfirmDialog.js";import M,{useConfirm as N}from"./components/AppConfirmProvider.js";import P from"./components/AppConsentBanner.js";import F from"./components/AppContextMenu.js";import I from"./components/AppCopyButton.js";import L from"./components/AppCountryFlag.js";import R from"./components/AppCountrySelect.js";import z from"./components/AppDashboardCell.js";import B from"./components/AppDashboardGrid.js";import V from"./components/AppDataTable.js";import H from"./components/AppDatePicker.js";import U from"./components/AppDateRangePicker.js";import W from"./components/AppDescriptions.js";import G from"./components/AppDetailPane.js";import K from"./components/AppDrawer.js";import q from"./components/AppDropdown.js";import J from"./components/AppDropZone.js";import Y from"./components/AppDueDate.js";import X from"./components/AppEmptyState.js";import Z from"./components/AppErrorBoundary.js";import Q from"./components/AppErrorSummary.js";import $ from"./components/AppFileAttachment.js";import ee from"./components/AppFilePicker.js";import te from"./components/AppFileTiles.js";import ne from"./components/AppFileViewer.js";import re from"./components/AppFilterBar.js";import ie from"./components/AppFloatingButton.js";import ae from"./components/AppFloatingDock.js";import oe from"./components/AppFormActions.js";import se from"./components/AppFormRow.js";import ce from"./components/AppFormSection.js";import le from"./components/AppHoverCard.js";import ue,{iconNames as de,registerIcons as fe}from"./components/AppIcon.js";import pe from"./components/AppImagePicker.js";import me from"./components/AppInfoTip.js";import he from"./components/AppInlineEdit.js";import ge from"./components/AppInput.js";import _e from"./components/AppInputGroup.js";import ve from"./components/AppKanban.js";import ye from"./components/AppKbd.js";import be from"./components/AppKpiTile.js";import xe from"./components/AppLeadPopup.js";import Se from"./components/AppLightbox.js";import Ce from"./components/AppLink.js";import we from"./components/AppMarkdown.js";import Te from"./components/AppMentionInput.js";import Ee from"./components/AppMeter.js";import De from"./components/AppMetricStrip.js";import Oe from"./components/AppModal.js";import ke from"./components/AppMultiSelect.js";import Ae from"./components/AppNavigationMenu.js";import je from"./components/AppNavList.js";import Me from"./components/AppNotificationCenter.js";import Ne from"./components/AppNumberInput.js";import Pe from"./components/AppOnboardingChecklist.js";import Fe from"./components/AppOrgTree.js";import Ie from"./components/AppOtpInput.js";import Le from"./components/AppPageHeader.js";import Re from"./components/AppPhoneNumberInput.js";import ze from"./components/AppPopover.js";import Be from"./components/AppPricingCard.js";import Ve from"./components/AppProgress.js";import He from"./components/AppQrCode.js";import Ue from"./components/AppRadio.js";import We from"./components/AppRadioGroup.js";import Ge from"./components/AppRating.js";import Ke from"./components/AppRecordPager.js";import qe from"./components/AppRelativeTime.js";import Je from"./components/AppRepeater.js";import Ye from"./components/AppRequiredMark.js";import Xe from"./components/AppResizable.js";import Ze from"./components/AppResizableHandle.js";import Qe from"./components/AppResizablePanel.js";import $e from"./components/AppResourceCard.js";import et from"./components/AppResult.js";import tt from"./components/AppRichText.js";import nt from"./components/AppRollingNumber.js";import rt from"./components/AppRouteError.js";import it from"./components/AppRowSwitch.js";import at from"./components/AppScoreScale.js";import ot from"./components/AppScrollbar.js";import st from"./components/AppSearch.js";import ct from"./components/AppSectionCallToAction.js";import lt from"./components/AppSectionFaq.js";import ut from"./components/AppSectionFeatures.js";import dt from"./components/AppSectionHero.js";import ft from"./components/AppSectionLeadCapture.js";import pt from"./components/AppSectionLogos.js";import mt from"./components/AppSectionPricing.js";import ht from"./components/AppSectionTestimonials.js";import gt from"./components/AppSegmented.js";import _t from"./components/AppSelect.js";import vt from"./components/AppSeoHead.js";import yt from"./components/AppShell.js";import bt from"./components/AppShortcutLegend.js";import xt from"./components/AppShowMore.js";import St,{AppSkeletonRows as Ct}from"./components/AppSkeleton.js";import wt from"./components/AppSkeletonLines.js";import Tt from"./components/AppSlider.js";import Et from"./components/AppSortableList.js";import Dt from"./components/AppSparkline.js";import Ot from"./components/AppSpinner.js";import kt from"./components/AppSplash.js";import At from"./components/AppSplitButton.js";import jt from"./components/AppSplitView.js";import Mt from"./components/AppStatusBadge.js";import Nt from"./components/AppStepper.js";import Pt from"./components/AppSwitch.js";import Ft from"./components/AppTablePagination.js";import It from"./components/AppTableToolbar.js";import Lt from"./components/AppTabs.js";import Rt from"./components/AppTagInput.js";import zt from"./components/AppTextarea.js";import Bt from"./components/AppThemeToggle.js";import Vt from"./components/AppTimeline.js";import Ht from"./components/AppTimePicker.js";import Ut from"./components/AppToast.js";import Wt from"./components/AppToolbar.js";import Gt from"./components/AppTooltip.js";import Kt from"./components/AppTour.js";import qt from"./components/AppTreeView.js";import Jt from"./components/AppTruncate.js";import Yt from"./components/AppUpdateBar.js";import Xt from"./components/AppWhatsNew.js";import Zt from"./components/AppWizard.js";import Qt from"./components/AppWorkspaceSwitcher.js";import{MODAL_ICONS as $t}from"./components/ModalIcons.js";import{dismissAll as en,errorToast as tn,toast as nn}from"./components/toast.js";import rn from"./components/warnInvalidValue.js";import{useCommandPaletteShortcut as an}from"./lib/useCommandPaletteShortcut.js";import{useFloatingStack as on}from"./lib/useFloatingStack.js";import{useListShortcuts as sn}from"./lib/useListShortcuts.js";import{usePagination as cn}from"./lib/usePagination.js";import{useTableView as ln}from"./lib/useTableView.js";import{mentionedIds as un,parseMentionValue as dn}from"@webority/ui-elements/elements/mention-input";import{createLocalSeenStore as fn}from"@webority/ui-elements/elements/tour";import{postedMasked as pn,themeBootScript as mn}from"@webority/ui-elements/helpers";export{e as AppAccordion,t as AppAccountSwitcher,n as AppActionIcon,r as AppAlert,i as AppAsyncBlock,a as AppAuthLayout,o as AppAutocomplete,s as AppAvatar,c as AppAvatarGroup,l as AppBadge,u as AppBanner,d as AppBreadcrumbs,f as AppButton,p as AppButtonGroup,m as AppCalendar,h as AppCard,g as AppCarousel,_ as AppCell,v as AppChart,y as AppChartCard,b as AppCheckbox,x as AppChip,S as AppChipGroup,C as AppChoiceCard,w as AppChoiceChip,T as AppCodeBlock,E as AppColorField,D as AppColumnMenu,O as AppCommandPalette,k as AppCommentThread,A as AppCompareTable,j as AppConfirmDialog,M as AppConfirmProvider,P as AppConsentBanner,F as AppContextMenu,I as AppCopyButton,L as AppCountryFlag,R as AppCountrySelect,z as AppDashboardCell,B as AppDashboardGrid,V as AppDataTable,H as AppDatePicker,U as AppDateRangePicker,W as AppDescriptions,G as AppDetailPane,K as AppDrawer,J as AppDropZone,q as AppDropdown,Y as AppDueDate,X as AppEmptyState,Z as AppErrorBoundary,Q as AppErrorSummary,$ as AppFileAttachment,ee as AppFilePicker,te as AppFileTiles,ne as AppFileViewer,re as AppFilterBar,ie as AppFloatingButton,ae as AppFloatingDock,oe as AppFormActions,se as AppFormRow,ce as AppFormSection,le as AppHoverCard,ue as AppIcon,pe as AppImagePicker,me as AppInfoTip,he as AppInlineEdit,ge as AppInput,_e as AppInputGroup,ve as AppKanban,ye as AppKbd,be as AppKpiTile,xe as AppLeadPopup,Se as AppLightbox,Ce as AppLink,we as AppMarkdown,Te as AppMentionInput,Ee as AppMeter,De as AppMetricStrip,Oe as AppModal,ke as AppMultiSelect,je as AppNavList,Ae as AppNavigationMenu,Me as AppNotificationCenter,Ne as AppNumberInput,Pe as AppOnboardingChecklist,Fe as AppOrgTree,Ie as AppOtpInput,Le as AppPageHeader,Re as AppPhoneNumberInput,ze as AppPopover,Be as AppPricingCard,Ve as AppProgress,He as AppQrCode,Ue as AppRadio,We as AppRadioGroup,Ge as AppRating,Ke as AppRecordPager,qe as AppRelativeTime,Je as AppRepeater,Ye as AppRequiredMark,Xe as AppResizable,Ze as AppResizableHandle,Qe as AppResizablePanel,$e as AppResourceCard,et as AppResult,tt as AppRichText,nt as AppRollingNumber,rt as AppRouteError,it as AppRowSwitch,at as AppScoreScale,ot as AppScrollbar,st as AppSearch,ct as AppSectionCallToAction,lt as AppSectionFaq,ut as AppSectionFeatures,dt as AppSectionHero,ft as AppSectionLeadCapture,pt as AppSectionLogos,mt as AppSectionPricing,ht as AppSectionTestimonials,gt as AppSegmented,_t as AppSelect,vt as AppSeoHead,yt as AppShell,bt as AppShortcutLegend,xt as AppShowMore,St as AppSkeleton,wt as AppSkeletonLines,Ct as AppSkeletonRows,Tt as AppSlider,Et as AppSortableList,Dt as AppSparkline,Ot as AppSpinner,kt as AppSplash,At as AppSplitButton,jt as AppSplitView,Mt as AppStatusBadge,Nt as AppStepper,Pt as AppSwitch,Ft as AppTablePagination,It as AppTableToolbar,Lt as AppTabs,Rt as AppTagInput,zt as AppTextarea,Bt as AppThemeToggle,Ht as AppTimePicker,Vt as AppTimeline,Ut as AppToast,Wt as AppToolbar,Gt as AppTooltip,Kt as AppTour,qt as AppTreeView,Jt as AppTruncate,Yt as AppUpdateBar,Xt as AppWhatsNew,Zt as AppWizard,Qt as AppWorkspaceSwitcher,$t as MODAL_ICONS,fn as createLocalSeenStore,en as dismissAll,tn as errorToast,de as iconNames,un as mentionedIds,dn as parseMentionValue,pn as postedMasked,fe as registerIcons,mn as themeBootScript,nn as toast,an as useCommandPaletteShortcut,N as useConfirm,on as useFloatingStack,sn as useListShortcuts,cn as usePagination,ln as useTableView,rn as warnInvalidValue};
|
|
1
|
+
import e from"./components/AppAccordion.js";import t from"./components/AppAccountSwitcher.js";import n from"./components/AppActionIcon.js";import r from"./components/AppAlert.js";import i from"./components/AppAsyncBlock.js";import a from"./components/AppAuthLayout.js";import o from"./components/AppAvatar.js";import s from"./components/AppAvatarGroup.js";import c from"./components/AppBadge.js";import l from"./components/AppBanner.js";import u from"./components/AppBreadcrumbs.js";import d from"./components/AppButton.js";import f from"./components/AppButtonGroup.js";import p from"./components/AppCalendar.js";import m from"./components/AppCard.js";import h from"./components/AppCarousel.js";import g from"./components/AppCell.js";import _ from"./components/AppChart.js";import v from"./components/AppChartCard.js";import y from"./components/AppCheckbox.js";import b from"./components/AppChip.js";import x from"./components/AppChipGroup.js";import S from"./components/AppChoiceCard.js";import C from"./components/AppChoiceChip.js";import w from"./components/AppCodeBlock.js";import T from"./components/AppColorField.js";import E from"./components/AppColumnMenu.js";import D from"./components/AppCommandPalette.js";import O from"./components/AppCommentThread.js";import k from"./components/AppCompareTable.js";import A from"./components/AppConfirmDialog.js";import j,{useConfirm as M}from"./components/AppConfirmProvider.js";import N from"./components/AppConsentBanner.js";import P from"./components/AppContextMenu.js";import F from"./components/AppCopyButton.js";import I from"./components/AppCountryFlag.js";import L from"./components/AppDashboardCell.js";import R from"./components/AppDashboardGrid.js";import z from"./components/AppDataTable.js";import B from"./components/AppDatePicker.js";import V from"./components/AppDateRangePicker.js";import H from"./components/AppDescriptions.js";import U from"./components/AppDetailPane.js";import W from"./components/AppDrawer.js";import G from"./components/AppDropdown.js";import K from"./components/AppDropZone.js";import q from"./components/AppDueDate.js";import J from"./components/AppEmptyState.js";import Y from"./components/AppErrorBoundary.js";import X from"./components/AppErrorSummary.js";import Z from"./components/AppFileAttachment.js";import Q from"./components/AppFilePicker.js";import $ from"./components/AppFileTiles.js";import ee from"./components/AppFileViewer.js";import te from"./components/AppFilterBar.js";import ne from"./components/AppFloatingButton.js";import re from"./components/AppFloatingDock.js";import ie from"./components/AppFormActions.js";import ae from"./components/AppFormRow.js";import oe from"./components/AppFormSection.js";import se from"./components/AppHoverCard.js";import ce,{iconNames as le,registerIcons as ue}from"./components/AppIcon.js";import de from"./components/AppImagePicker.js";import fe from"./components/AppInfoTip.js";import pe from"./components/AppInlineEdit.js";import me from"./components/AppInput.js";import he from"./components/AppInputGroup.js";import ge from"./components/AppKanban.js";import _e from"./components/AppKbd.js";import ve from"./components/AppKpiTile.js";import ye from"./components/AppLeadPopup.js";import be from"./components/AppLightbox.js";import xe from"./components/AppLink.js";import Se from"./components/AppMarkdown.js";import Ce from"./components/AppMentionInput.js";import we from"./components/AppMeter.js";import Te from"./components/AppMetricStrip.js";import Ee from"./components/AppModal.js";import De from"./components/AppNavigationMenu.js";import Oe from"./components/AppNavList.js";import ke from"./components/AppNotificationCenter.js";import Ae from"./components/AppNumberInput.js";import je from"./components/AppOnboardingChecklist.js";import Me from"./components/AppOrgTree.js";import Ne from"./components/AppOtpInput.js";import Pe from"./components/AppPageHeader.js";import Fe from"./components/AppPhoneNumberInput.js";import Ie from"./components/AppPopover.js";import Le from"./components/AppPricingCard.js";import Re from"./components/AppProgress.js";import ze from"./components/AppQrCode.js";import Be from"./components/AppRadio.js";import Ve from"./components/AppRadioGroup.js";import He from"./components/AppRating.js";import Ue from"./components/AppRecordPager.js";import We from"./components/AppRelativeTime.js";import Ge from"./components/AppRepeater.js";import Ke from"./components/AppRequiredMark.js";import qe from"./components/AppResizable.js";import Je from"./components/AppResizableHandle.js";import Ye from"./components/AppResizablePanel.js";import Xe from"./components/AppResourceCard.js";import Ze from"./components/AppResult.js";import Qe from"./components/AppRichText.js";import $e from"./components/AppRollingNumber.js";import et from"./components/AppRouteError.js";import tt from"./components/AppRowSwitch.js";import nt from"./components/AppScoreScale.js";import rt from"./components/AppScrollbar.js";import it from"./components/AppSearch.js";import at from"./components/AppSectionCallToAction.js";import ot from"./components/AppSectionFaq.js";import st from"./components/AppSectionFeatures.js";import ct from"./components/AppSectionHero.js";import lt from"./components/AppSectionLeadCapture.js";import ut from"./components/AppSectionLogos.js";import dt from"./components/AppSectionPricing.js";import ft from"./components/AppSectionTestimonials.js";import pt from"./components/AppSegmented.js";import mt from"./components/AppSelect.js";import ht from"./components/AppSeoHead.js";import gt from"./components/AppShell.js";import _t from"./components/AppShortcutLegend.js";import vt from"./components/AppShowMore.js";import yt,{AppSkeletonRows as bt}from"./components/AppSkeleton.js";import xt from"./components/AppSkeletonLines.js";import St from"./components/AppSlider.js";import Ct from"./components/AppSortableList.js";import wt from"./components/AppSparkline.js";import Tt from"./components/AppSpinner.js";import Et from"./components/AppSplash.js";import Dt from"./components/AppSplitButton.js";import Ot from"./components/AppSplitView.js";import kt from"./components/AppStatusBadge.js";import At from"./components/AppStepper.js";import jt from"./components/AppSwitch.js";import Mt from"./components/AppTablePagination.js";import Nt from"./components/AppTableToolbar.js";import Pt from"./components/AppTabs.js";import Ft from"./components/AppTextarea.js";import It from"./components/AppThemeToggle.js";import Lt from"./components/AppTimeline.js";import Rt from"./components/AppTimePicker.js";import zt from"./components/AppToast.js";import Bt from"./components/AppToolbar.js";import Vt from"./components/AppTooltip.js";import Ht from"./components/AppTour.js";import Ut from"./components/AppTreeView.js";import Wt from"./components/AppTruncate.js";import Gt from"./components/AppUpdateBar.js";import Kt from"./components/AppWhatsNew.js";import qt from"./components/AppWizard.js";import Jt from"./components/AppWorkspaceSwitcher.js";import{MODAL_ICONS as Yt}from"./components/ModalIcons.js";import{dismissAll as Xt,errorToast as Zt,toast as Qt}from"./components/toast.js";import $t from"./components/warnInvalidValue.js";import{useCommandPaletteShortcut as en}from"./lib/useCommandPaletteShortcut.js";import{useFloatingStack as tn}from"./lib/useFloatingStack.js";import{useListShortcuts as nn}from"./lib/useListShortcuts.js";import{usePagination as rn}from"./lib/usePagination.js";import{useTableView as an}from"./lib/useTableView.js";import{mentionedIds as on,parseMentionValue as sn}from"@webority/ui-elements/elements/mention-input";import{createLocalSeenStore as cn}from"@webority/ui-elements/elements/tour";import{postedMasked as ln,themeBootScript as un}from"@webority/ui-elements/helpers";export{e as AppAccordion,t as AppAccountSwitcher,n as AppActionIcon,r as AppAlert,i as AppAsyncBlock,a as AppAuthLayout,o as AppAvatar,s as AppAvatarGroup,c as AppBadge,l as AppBanner,u as AppBreadcrumbs,d as AppButton,f as AppButtonGroup,p as AppCalendar,m as AppCard,h as AppCarousel,g as AppCell,_ as AppChart,v as AppChartCard,y as AppCheckbox,b as AppChip,x as AppChipGroup,S as AppChoiceCard,C as AppChoiceChip,w as AppCodeBlock,T as AppColorField,E as AppColumnMenu,D as AppCommandPalette,O as AppCommentThread,k as AppCompareTable,A as AppConfirmDialog,j as AppConfirmProvider,N as AppConsentBanner,P as AppContextMenu,F as AppCopyButton,I as AppCountryFlag,L as AppDashboardCell,R as AppDashboardGrid,z as AppDataTable,B as AppDatePicker,V as AppDateRangePicker,H as AppDescriptions,U as AppDetailPane,W as AppDrawer,K as AppDropZone,G as AppDropdown,q as AppDueDate,J as AppEmptyState,Y as AppErrorBoundary,X as AppErrorSummary,Z as AppFileAttachment,Q as AppFilePicker,$ as AppFileTiles,ee as AppFileViewer,te as AppFilterBar,ne as AppFloatingButton,re as AppFloatingDock,ie as AppFormActions,ae as AppFormRow,oe as AppFormSection,se as AppHoverCard,ce as AppIcon,de as AppImagePicker,fe as AppInfoTip,pe as AppInlineEdit,me as AppInput,he as AppInputGroup,ge as AppKanban,_e as AppKbd,ve as AppKpiTile,ye as AppLeadPopup,be as AppLightbox,xe as AppLink,Se as AppMarkdown,Ce as AppMentionInput,we as AppMeter,Te as AppMetricStrip,Ee as AppModal,Oe as AppNavList,De as AppNavigationMenu,ke as AppNotificationCenter,Ae as AppNumberInput,je as AppOnboardingChecklist,Me as AppOrgTree,Ne as AppOtpInput,Pe as AppPageHeader,Fe as AppPhoneNumberInput,Ie as AppPopover,Le as AppPricingCard,Re as AppProgress,ze as AppQrCode,Be as AppRadio,Ve as AppRadioGroup,He as AppRating,Ue as AppRecordPager,We as AppRelativeTime,Ge as AppRepeater,Ke as AppRequiredMark,qe as AppResizable,Je as AppResizableHandle,Ye as AppResizablePanel,Xe as AppResourceCard,Ze as AppResult,Qe as AppRichText,$e as AppRollingNumber,et as AppRouteError,tt as AppRowSwitch,nt as AppScoreScale,rt as AppScrollbar,it as AppSearch,at as AppSectionCallToAction,ot as AppSectionFaq,st as AppSectionFeatures,ct as AppSectionHero,lt as AppSectionLeadCapture,ut as AppSectionLogos,dt as AppSectionPricing,ft as AppSectionTestimonials,pt as AppSegmented,mt as AppSelect,ht as AppSeoHead,gt as AppShell,_t as AppShortcutLegend,vt as AppShowMore,yt as AppSkeleton,xt as AppSkeletonLines,bt as AppSkeletonRows,St as AppSlider,Ct as AppSortableList,wt as AppSparkline,Tt as AppSpinner,Et as AppSplash,Dt as AppSplitButton,Ot as AppSplitView,kt as AppStatusBadge,At as AppStepper,jt as AppSwitch,Mt as AppTablePagination,Nt as AppTableToolbar,Pt as AppTabs,Ft as AppTextarea,It as AppThemeToggle,Rt as AppTimePicker,Lt as AppTimeline,zt as AppToast,Bt as AppToolbar,Vt as AppTooltip,Ht as AppTour,Ut as AppTreeView,Wt as AppTruncate,Gt as AppUpdateBar,Kt as AppWhatsNew,qt as AppWizard,Jt as AppWorkspaceSwitcher,Yt as MODAL_ICONS,cn as createLocalSeenStore,Xt as dismissAll,Zt as errorToast,le as iconNames,on as mentionedIds,sn as parseMentionValue,ln as postedMasked,ue as registerIcons,un as themeBootScript,Qt as toast,en as useCommandPaletteShortcut,M as useConfirm,tn as useFloatingStack,nn as useListShortcuts,rn as usePagination,an as useTableView,$t as warnInvalidValue};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/ui-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.139.0",
|
|
4
4
|
"description": "Webority shared React component library — App* primitives on react-bootstrap + the @webority/theme design system.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
},
|
|
30
30
|
"sideEffects": false,
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@webority/markdown-core": "0.
|
|
33
|
-
"@webority/theme": "0.
|
|
34
|
-
"@webority/ui-elements": "0.
|
|
35
|
-
"@webority/web-core": "0.
|
|
32
|
+
"@webority/markdown-core": "0.139.0",
|
|
33
|
+
"@webority/theme": "0.139.0",
|
|
34
|
+
"@webority/ui-elements": "0.139.0",
|
|
35
|
+
"@webority/web-core": "0.139.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@webority/analytics": "^0.35.0",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"@vitejs/plugin-react": "^6.0.1",
|
|
51
51
|
"@vitest/coverage-v8": "5.0.1",
|
|
52
52
|
"@webority/analytics": "0.35.1",
|
|
53
|
-
"@webority/canvas-kit": "0.
|
|
54
|
-
"@webority/tokens": "0.
|
|
53
|
+
"@webority/canvas-kit": "0.139.0",
|
|
54
|
+
"@webority/tokens": "0.139.0",
|
|
55
55
|
"bootstrap": "5.3.3",
|
|
56
56
|
"jsdom": "30.1.1",
|
|
57
57
|
"react": "^19.2.6",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"../lib/FieldMessage.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppInfoTip.js";import r from"./AppRequiredMark.js";import i from"./useNodeLabels.js";import a,{optionsEqual as o}from"./useWuiControl.js";import s from"./warnInvalidValue.js";import ee from"./warnUnknownProps.js";import{forwardRef as c,useEffect as l,useId as u,useLayoutEffect as d,useRef as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import"@webority/ui-elements/elements/autocomplete";var h=[`sm`,`md`,`lg`],te=[],ne=(e,t)=>({...e,label:t}),g=(e,t,n)=>{if(n==null||t==null||t===``)return e;let r=String(t);return e.some(e=>String(e.value)===r)?e:[...e,{value:r,label:n}]},_=c(function(c,_){let{marker:v,props:y}=t(`AppAutocomplete`,c),{value:b,defaultValue:x,onChange:S,options:C,valueLabel:w,valueAvatar:T,valueInitials:E,loadOptions:D,placeholder:re=`Search…`,minChars:O,debounce:k,disabled:ie=!1,readOnly:ae=!1,loading:A=!1,open:j,size:M,allowCustom:N=!1,name:P,id:F,label:I,error:L,helperText:R,required:z=!1,optional:B=!1,optionalLabel:V=`(optional)`,help:H,helpLabel:U=`More information`,fieldClassName:W=``,...G}=y;ee(`AppAutocomplete`,G),s(`AppAutocomplete`,`size`,M,h);let K=typeof D==`function`,q=u(),J=F||q,{setRef:oe,innerRef:Y}=a({ref:_,value:b??(x===void 0?``:void 0),defaultValue:x,on:{change:e=>S?.(e.currentTarget.value,{isCustom:!!e.detail?.isCustom})}}),X=C||te,{portal:se,toElementOptions:Z}=i(X),Q=f(!1),$=f(D);return d(()=>{$.current=D}),l(()=>{let e=Y.current;if(!e||K&&Q.current)return;let t=Z(g(X,b,w),ne);o(t,e.options)||(e.options=t)},[X,K,Y,Z,b,w]),l(()=>{let e=Y.current;if(!e||!K||!Q.current)return;let t=e.options,n=g(t,b,w);n!==t&&(e.options=n)},[b,w,K,Y]),l(()=>{let e=Y.current;if(!e||!K)return;let t=0,n=null,r=async r=>{let i=++t;n?.abort(),n=typeof AbortController==`function`?new AbortController:null,e.loading=!0;try{let a=await $.current(r.detail.query,{signal:n?.signal});i===t&&(Q.current=!0,e.options=a||[])}catch{i===t&&(Q.current=!0,e.options=[])}finally{i===t&&(e.loading=!1)}};return e.addEventListener(`search`,r),()=>{t=-1,n?.abort(),e.removeEventListener(`search`,r),e.loading=!1}},[K,Y]),d(()=>{Y.current?.toggleAttribute(`loading`,!!A)}),/* @__PURE__ */ m(`div`,{...v,className:`field${W?` ${W}`:``}`,children:[I&&/* @__PURE__ */ m(`label`,{className:`label`,htmlFor:J,children:[I,B&&!z&&/* @__PURE__ */ p(`span`,{className:`label-optional`,children:` ${V}`}),z&&/* @__PURE__ */ p(r,{}),H&&/* @__PURE__ */ p(n,{label:U,children:H})]}),/* @__PURE__ */ p(`wui-autocomplete`,{"aria-label":typeof I==`string`?I:void 0,"aria-describedby":L?`${J}-error`:R?`${J}-hint`:void 0,"aria-invalid":L?`true`:void 0,id:J,ref:oe,name:P,placeholder:re,remote:K?``:void 0,"min-chars":O==null?void 0:String(O),debounce:k==null?void 0:String(k),size:M===`md`?void 0:M||void 0,"allow-custom":N?``:void 0,disabled:ie?``:void 0,readonly:ae?``:void 0,open:j?``:void 0,required:z?``:void 0,"value-avatar":T||void 0,"value-initials":E||void 0,...G}),se,/* @__PURE__ */ p(e,{error:L,hint:R,errorId:`${J}-error`,hintId:`${J}-hint`})]})});export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"../lib/FieldMessage.js";import{loadFlagStyles as t}from"../lib/flagStyles.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./AppInfoTip.js";import i from"./AppRequiredMark.js";import a from"./useWuiControl.js";import o from"./warnInvalidValue.js";import s from"./warnUnknownProps.js";import{cloneElement as c,forwardRef as l,useEffect as u,useId as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";import"@webority/ui-elements/elements/country-select";var m=[`sm`,`md`,`lg`],h=[`off`,`border`],g=l(function(l,g){let{marker:_,props:v}=n(`AppCountrySelect`,l),{value:y,onChange:b,countries:x,placeholder:S=`Select country`,searchPlaceholder:C=`Search countries...`,searchable:w=!0,clearable:T=!1,size:E=`md`,floatingLabel:D=`off`,disabled:O,open:k,label:A,required:j=!1,optional:M=!1,optionalLabel:N=`(optional)`,error:P,helperText:F,help:I,helpLabel:L=`More information`,id:R,name:z,className:B=``,fieldClassName:V=``,"aria-label":H,"aria-labelledby":U,"aria-describedby":W,...G}=v;s(`AppCountrySelect`,G),o(`AppCountrySelect`,`size`,E,m),o(`AppCountrySelect`,`floatingLabel`,D,h),u(()=>{t()},[]);let K=d(),{setRef:q}=a({ref:g,value:y??``,onChange:b}),J=R||K,Y=D!==`off`&&A,X=P&&J?`${J}-error`:void 0,Z=F&&J?`${J}-hint`:void 0,Q=/* @__PURE__ */ f(`wui-country-select`,{"aria-label":H||(typeof A==`string`?A:void 0),"aria-labelledby":U||void 0,"aria-describedby":X||Z||W||void 0,"aria-invalid":P?`true`:void 0,ref:q,id:J,name:z,countries:Array.isArray(x)?x.join(`,`):void 0,placeholder:Y?` `:S,"search-placeholder":C,searchable:w?``:void 0,clearable:T?``:void 0,size:E===`sm`||E===`lg`?E:void 0,disabled:O?``:void 0,open:k?``:void 0,required:j?``:void 0,className:B||void 0,...G});if(!A&&!P&&!F)return c(Q,_);let $=[`field`,V].filter(Boolean).join(` `);return/* @__PURE__ */ p(`div`,{..._,className:$,children:[A&&!Y&&/* @__PURE__ */ p(`label`,{className:`label`,htmlFor:J,children:[A,M&&!j&&/* @__PURE__ */ f(`span`,{className:`label-optional`,children:` ${N}`}),j&&/* @__PURE__ */ f(i,{}),I&&/* @__PURE__ */ f(r,{label:L,children:I})]}),Y?/* @__PURE__ */ p(`div`,{className:`field-float`,children:[Q,/* @__PURE__ */ p(`label`,{className:`float-label`,htmlFor:J,children:[A,M&&!j&&/* @__PURE__ */ f(`span`,{className:`label-optional`,children:` ${N}`}),j&&/* @__PURE__ */ f(i,{})]})]}):Q,/* @__PURE__ */ f(e,{error:P,hint:F,errorId:X,hintId:Z})]})});export{g as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"../lib/FieldMessage.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppInfoTip.js";import r from"./AppRequiredMark.js";import i from"./useNodeLabels.js";import a,{optionsEqual as o,readValues as s,writeValues as c}from"./useWuiControl.js";import l from"./warnInvalidValue.js";import ee from"./warnUnknownProps.js";import{forwardRef as u,useEffect as d,useId as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import"@webority/ui-elements/elements/multiselect";var h=[`sm`,`md`,`lg`],g=[],_=(e,t)=>({...e,label:t}),v=u(function(u,v){let{marker:te,props:y}=t(`AppMultiSelect`,u),{values:b,defaultValues:x,onChange:S,options:C,placeholder:w=`Select…`,searchPlaceholder:T=`Search…`,searchable:E=!0,disabled:D=!1,readOnly:O=!1,loading:k=!1,icon:A,size:j,collapseChips:M=!1,allowCustom:N=!1,validateCustom:P,customPattern:ne,customInvalidMessage:F,name:I,id:L,label:R,error:z,helperText:B,required:V=!1,optional:H=!1,optionalLabel:U=`(optional)`,help:W,helpLabel:G=`More information`,fieldClassName:K=``,...q}=y;ee(`AppMultiSelect`,q),l(`AppMultiSelect`,`size`,j,h);let J=f(),Y=L||J,{setRef:X,innerRef:Z}=a({ref:v,value:b,defaultValue:x,onChange:S,readValue:s,writeValue:c}),Q=C||g,{portal:re,toElementOptions:$}=i(Q);return d(()=>{let e=Z.current;if(!e)return;let t=$(Q,_);o(t,e.options)||(e.options=t)},[Q,Z,$]),d(()=>{let e=Z.current;e&&(e.validateCustom=P??null)},[P,Z]),/* @__PURE__ */ m(`div`,{...te,className:`field${K?` ${K}`:``}`,children:[R&&/* @__PURE__ */ m(`label`,{className:`label`,htmlFor:Y,children:[R,H&&!V&&/* @__PURE__ */ p(`span`,{className:`label-optional`,children:` ${U}`}),V&&/* @__PURE__ */ p(r,{}),W&&/* @__PURE__ */ p(n,{label:G,children:W})]}),/* @__PURE__ */ p(`wui-multiselect`,{"aria-label":typeof R==`string`?R:void 0,"aria-describedby":z?`${Y}-error`:B?`${Y}-hint`:void 0,"aria-invalid":z?`true`:void 0,id:Y,ref:X,name:I,placeholder:w,"search-placeholder":T,icon:A||void 0,size:j===`md`?void 0:j||void 0,"collapse-chips":M?``:void 0,"allow-custom":N?``:void 0,"custom-pattern":ne||void 0,"custom-invalid-message":F||void 0,searchable:E?``:void 0,disabled:D?``:void 0,readonly:O?``:void 0,loading:k?``:void 0,required:V?``:void 0,...q}),re,/* @__PURE__ */ p(e,{error:z,hint:B,errorId:`${Y}-error`,hintId:`${Y}-hint`})]})});export{v as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"../lib/FieldMessage.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppInfoTip.js";import r from"./AppRequiredMark.js";import i,{readValues as a,writeValues as o}from"./useWuiControl.js";import s from"./warnInvalidValue.js";import c from"./warnUnknownProps.js";import{forwardRef as l,useId as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import"@webority/ui-elements/elements/taginput";var p=[`sm`,`md`,`lg`],m=l(function(l,m){let{marker:h,props:g}=t(`AppTagInput`,l),{values:_,defaultValues:v,onChange:y,placeholder:b=`Add…`,name:x,label:S,error:C,helperText:w,required:T=!1,optional:E=!1,optionalLabel:D=`(optional)`,size:O,maxTags:k,allowDuplicates:A=!1,disabled:j=!1,readOnly:M=!1,loading:N=!1,id:P,ariaLabel:F,className:I=``,fieldClassName:L=``,help:R,helpLabel:z=`More information`,...B}=g;c(`AppTagInput`,B),s(`AppTagInput`,`size`,O,p);let V=u(),H=P||V,{setRef:U}=i({ref:m,value:_,defaultValue:v,onChange:y,readValue:a,writeValue:o});return/* @__PURE__ */ f(`div`,{...h,className:`field${L?` ${L}`:``}`,children:[S&&/* @__PURE__ */ f(`label`,{className:`label`,htmlFor:H,children:[S,E&&!T&&/* @__PURE__ */ d(`span`,{className:`label-optional`,children:` ${D}`}),T&&/* @__PURE__ */ d(r,{}),R&&/* @__PURE__ */ d(n,{label:z,children:R})]}),/* @__PURE__ */ d(`wui-taginput`,{"aria-label":F||(typeof S==`string`?S:void 0),"aria-describedby":C?`${H}-error`:w?`${H}-hint`:void 0,"aria-invalid":C?`true`:void 0,id:H,ref:U,name:x,placeholder:b,size:O===`md`?void 0:O||void 0,"max-tags":k===void 0?void 0:String(k),"allow-duplicates":A?``:void 0,disabled:j?``:void 0,readonly:M?``:void 0,loading:N?``:void 0,required:T?``:void 0,className:I||void 0,...B}),/* @__PURE__ */ d(e,{error:C,hint:w,errorId:`${H}-error`,hintId:`${H}-hint`})]})});export{m as default};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import "@webority/ui-elements/elements/autocomplete";
|
|
2
|
-
declare const AppAutocomplete: import("react").ForwardRefExoticComponent<{
|
|
3
|
-
/** The value of the selected option. */
|
|
4
|
-
value?: string;
|
|
5
|
-
/** The starting value of an uncontrolled field. */
|
|
6
|
-
defaultValue?: string;
|
|
7
|
-
onChange?: (value: string, meta?: {
|
|
8
|
-
isCustom: boolean;
|
|
9
|
-
}) => void;
|
|
10
|
-
/** The options to filter as the user types. Each has a value and a label, and may carry a photo or initials. */
|
|
11
|
-
options?: Array<{
|
|
12
|
-
value: string;
|
|
13
|
-
label: import('react').ReactNode;
|
|
14
|
-
avatar?: string;
|
|
15
|
-
initials?: string;
|
|
16
|
-
}>;
|
|
17
|
-
/** Text shown for the value when the options do not contain it, such as a selection loaded from the server. */
|
|
18
|
-
valueLabel?: string;
|
|
19
|
-
/** A photo URL shown beside the value when the options do not carry it. */
|
|
20
|
-
valueAvatar?: string;
|
|
21
|
-
/** Initials shown beside the value when the options do not carry them and there is no photo. */
|
|
22
|
-
valueInitials?: string;
|
|
23
|
-
loadOptions?: (query: string, opts?: {
|
|
24
|
-
signal?: AbortSignal;
|
|
25
|
-
}) => Promise<{
|
|
26
|
-
value: string;
|
|
27
|
-
label: string;
|
|
28
|
-
}[]>;
|
|
29
|
-
/**
|
|
30
|
-
* Placeholder text shown in the empty field.
|
|
31
|
-
* @default "Search…"
|
|
32
|
-
*/
|
|
33
|
-
placeholder?: string;
|
|
34
|
-
/** The least number of characters typed before a remote search starts. The default is 1 in remote mode. */
|
|
35
|
-
minChars?: number;
|
|
36
|
-
/** The wait in milliseconds before a remote search runs. The default is 250. */
|
|
37
|
-
debounce?: number;
|
|
38
|
-
/**
|
|
39
|
-
* Turns the field off.
|
|
40
|
-
* @default false
|
|
41
|
-
*/
|
|
42
|
-
disabled?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Shows the value but blocks editing. The value still posts.
|
|
45
|
-
* @default false
|
|
46
|
-
*/
|
|
47
|
-
readOnly?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Shows a busy state and blocks input while data loads.
|
|
50
|
-
* @default false
|
|
51
|
-
*/
|
|
52
|
-
loading?: boolean;
|
|
53
|
-
/** Shows the list open, for a design preview or a controlled caller. */
|
|
54
|
-
open?: boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Control size: sm, md or lg (32, 36 or 44px). md is the default.
|
|
57
|
-
* @default "md"
|
|
58
|
-
*/
|
|
59
|
-
size?: 'sm' | 'md' | 'lg';
|
|
60
|
-
/**
|
|
61
|
-
* Offers the typed text as its own row when it matches no option, so a new value can be added.
|
|
62
|
-
* @default false
|
|
63
|
-
*/
|
|
64
|
-
allowCustom?: boolean;
|
|
65
|
-
/** The form name of the control. */
|
|
66
|
-
name?: string;
|
|
67
|
-
/** The DOM id of the control and the target of the label. */
|
|
68
|
-
id?: string;
|
|
69
|
-
/** The label shown above the field. */
|
|
70
|
-
label?: import('react').ReactNode;
|
|
71
|
-
/** An error message shown under the field. */
|
|
72
|
-
error?: string;
|
|
73
|
-
/** Helper text shown under the field when there is no error. */
|
|
74
|
-
helperText?: string;
|
|
75
|
-
/**
|
|
76
|
-
* Marks the field as required, with the mark on the label.
|
|
77
|
-
* @default false
|
|
78
|
-
*/
|
|
79
|
-
required?: boolean;
|
|
80
|
-
/**
|
|
81
|
-
* Ends the label with (optional) when the field is not required. Required wins when both are set.
|
|
82
|
-
* @default false
|
|
83
|
-
*/
|
|
84
|
-
optional?: boolean;
|
|
85
|
-
/**
|
|
86
|
-
* Replaces the built-in English text, for other languages.
|
|
87
|
-
* @default "(optional)"
|
|
88
|
-
*/
|
|
89
|
-
optionalLabel?: string;
|
|
90
|
-
/** Help content shown in an info tip beside the label. */
|
|
91
|
-
help?: import('react').ReactNode;
|
|
92
|
-
/**
|
|
93
|
-
* The accessible name of that info tip.
|
|
94
|
-
* @default "More information"
|
|
95
|
-
*/
|
|
96
|
-
helpLabel?: string;
|
|
97
|
-
/**
|
|
98
|
-
* Extra classes on the field wrapper.
|
|
99
|
-
* @default ""
|
|
100
|
-
*/
|
|
101
|
-
fieldClassName?: string;
|
|
102
|
-
} & import("react").RefAttributes<HTMLElement>>;
|
|
103
|
-
export default AppAutocomplete;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import "@webority/ui-elements/elements/country-select";
|
|
2
|
-
declare const AppCountrySelect: import("react").ForwardRefExoticComponent<{
|
|
3
|
-
/** Selected ISO 3166-1 alpha-2 code, e.g. "IN". */
|
|
4
|
-
value?: string;
|
|
5
|
-
onChange?: (value: string) => void;
|
|
6
|
-
/** Limit the list to these ISO codes (alphabetical by name). Omitted, every country is listed. */
|
|
7
|
-
countries?: string[];
|
|
8
|
-
/**
|
|
9
|
-
* Show the search box in the menu.
|
|
10
|
-
* @default true
|
|
11
|
-
*/
|
|
12
|
-
searchable?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Control size, same as AppInput.
|
|
15
|
-
* @default "md"
|
|
16
|
-
*/
|
|
17
|
-
size?: 'sm' | 'md' | 'lg';
|
|
18
|
-
/**
|
|
19
|
-
* Class to apply to the control element.
|
|
20
|
-
* @default ""
|
|
21
|
-
*/
|
|
22
|
-
className?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Class to apply to the wrapper field div.
|
|
25
|
-
* @default ""
|
|
26
|
-
*/
|
|
27
|
-
fieldClassName?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Text shown in the empty field.
|
|
30
|
-
* @default "Select country"
|
|
31
|
-
*/
|
|
32
|
-
placeholder?: string;
|
|
33
|
-
/**
|
|
34
|
-
* Text shown in the search box of the menu.
|
|
35
|
-
* @default "Search countries..."
|
|
36
|
-
*/
|
|
37
|
-
searchPlaceholder?: string;
|
|
38
|
-
/**
|
|
39
|
-
* Show a control that clears the chosen country.
|
|
40
|
-
* @default false
|
|
41
|
-
*/
|
|
42
|
-
clearable?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Where the label rests. Off keeps it above the control. Border sits the label inside as a placeholder, then slides it onto the top border on focus or once a country is chosen. Needs `label`.
|
|
45
|
-
* @default "off"
|
|
46
|
-
*/
|
|
47
|
-
floatingLabel?: "off" | "border";
|
|
48
|
-
/** Disables the control. */
|
|
49
|
-
disabled?: boolean;
|
|
50
|
-
/** Shows the list open, for a design preview or a controlled caller. */
|
|
51
|
-
open?: boolean;
|
|
52
|
-
/** The visible field label. */
|
|
53
|
-
label?: import('react').ReactNode;
|
|
54
|
-
/**
|
|
55
|
-
* Marks the field required.
|
|
56
|
-
* @default false
|
|
57
|
-
*/
|
|
58
|
-
required?: boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Ends the label with (optional) when the field is not required. Required wins when both are set.
|
|
61
|
-
* @default false
|
|
62
|
-
*/
|
|
63
|
-
optional?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Replaces the built-in English text, for other languages.
|
|
66
|
-
* @default "(optional)"
|
|
67
|
-
*/
|
|
68
|
-
optionalLabel?: string;
|
|
69
|
-
/** Error message shown under the field; marks the control invalid. */
|
|
70
|
-
error?: string;
|
|
71
|
-
/** Helper text shown under the field when there is no error. */
|
|
72
|
-
helperText?: string;
|
|
73
|
-
/** Help content shown in an info tip beside the label. */
|
|
74
|
-
help?: import('react').ReactNode;
|
|
75
|
-
/**
|
|
76
|
-
* Accessible name for that info tip.
|
|
77
|
-
* @default "More information"
|
|
78
|
-
*/
|
|
79
|
-
helpLabel?: string;
|
|
80
|
-
/** DOM id for the control and the label's `for` target. */
|
|
81
|
-
id?: string;
|
|
82
|
-
/** Form field name. */
|
|
83
|
-
name?: string;
|
|
84
|
-
} & import("react").RefAttributes<any>>;
|
|
85
|
-
export default AppCountrySelect;
|