@jobber/components 9.14.5 → 9.15.1

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.
@@ -1,303 +1,11 @@
1
1
  import * as React from 'react';
2
- import { q as useTimeout, d as useStableCallback, u as useBaseUiId, c as useIsoLayoutEffect, S as SafeReact, r as error, t as transitionStatusMapping, s as useTransitionStatus, l as useOpenChangeComplete } from './useScrollLock-es.js';
3
- import { a as useFormContext, u as useLabelableContext, D as DEFAULT_VALIDITY_STATE, L as LabelableContext, f as fieldValidityMapping, F as FieldRootContext, b as useFieldRootContext } from './useCompositeListItem-es.js';
4
- import { a as useRefWithInit, m as mergeProps, E as EMPTY_OBJECT, f as formatErrorMessage, u as useRenderElement } from './useRenderElement-es.js';
2
+ import { u as useBaseUiId, d as useStableCallback, c as useIsoLayoutEffect, S as SafeReact, l as error, t as transitionStatusMapping, m as useTransitionStatus, n as useOpenChangeComplete } from './useScrollLock-es.js';
3
+ import { u as useLabelableContext, L as LabelableContext, a as useFormContext, D as DEFAULT_VALIDITY_STATE, f as fieldValidityMapping, F as FieldRootContext, b as useFieldRootContext } from './useCompositeListItem-es.js';
4
+ import { f as formatErrorMessage, a as useRefWithInit, u as useRenderElement } from './useRenderElement-es.js';
5
+ import { g as getCombinedFieldValidityData, u as useFieldValidation, a as useFieldItemContext } from './useFieldValidation-es.js';
5
6
  import { jsx } from 'react/jsx-runtime';
6
7
  import { u as useLabel } from './useLabel-es.js';
7
8
 
8
- const FieldItemContext = /*#__PURE__*/React.createContext({
9
- disabled: false
10
- });
11
- if (process.env.NODE_ENV !== "production") FieldItemContext.displayName = "FieldItemContext";
12
- function useFieldItemContext() {
13
- const context = React.useContext(FieldItemContext);
14
- return context;
15
- }
16
-
17
- /**
18
- * Combines the field's client-side, stateful validity data with the external invalid state to
19
- * determine the field's true validity.
20
- */
21
- function getCombinedFieldValidityData(validityData, invalid) {
22
- return {
23
- ...validityData,
24
- state: {
25
- ...validityData.state,
26
- valid: !invalid && validityData.state.valid
27
- }
28
- };
29
- }
30
-
31
- const validityKeys = Object.keys(DEFAULT_VALIDITY_STATE);
32
- /**
33
- * Whether an input participates in the surrounding Base UI Form. Inputs that are effectively
34
- * disabled, or whose `form` attribute explicitly associates them with another form, are excluded.
35
- * DOM position only matters when it associates the input with a different form. Otherwise, field
36
- * registration is context-driven, so portaled inputs (for example inside a dialog) still belong to
37
- * the form for both validation and values projected into `onFormSubmit`.
38
- */
39
- function isEligibleInput(input, formElement) {
40
- if (input.matches(':disabled')) {
41
- return false;
42
- }
43
- if (!formElement || input.form === formElement) {
44
- return true;
45
- }
46
-
47
- // React context crosses portal boundaries. An unassociated portaled input still participates in
48
- // contextual validation, unless an explicit `form` attribute opts it out of the surrounding Form.
49
- return input.form === null && !input.hasAttribute('form');
50
- }
51
-
52
- /**
53
- * Picks the input whose native validity should represent a field that owns several inputs (such as a
54
- * checkbox or radio group). Prefers the first eligible currently-invalid input, where "first" follows
55
- * registration order (mount order), and otherwise returns the first eligible input.
56
- */
57
- function findRepresentativeInput(inputs, formElement) {
58
- let fallback = null;
59
- for (const input of inputs.keys()) {
60
- if (!isEligibleInput(input, formElement)) {
61
- continue;
62
- }
63
- if (!input.validity.valid) {
64
- return input;
65
- }
66
- fallback ??= input;
67
- }
68
- return fallback;
69
- }
70
- function clearCustomValidity(element, inputs) {
71
- for (const input of inputs.keys()) {
72
- input.setCustomValidity('');
73
- }
74
- element?.setCustomValidity('');
75
- }
76
- function useFieldValidation(params) {
77
- const {
78
- elementRef,
79
- formRef
80
- } = useFormContext();
81
- const {
82
- setValidityData,
83
- validate,
84
- validityData,
85
- validationDebounceTime,
86
- invalid,
87
- markedDirtyRef,
88
- state,
89
- shouldValidateOnChange,
90
- registeredFieldIdRef
91
- } = params;
92
- const {
93
- controlId,
94
- getDescriptionProps
95
- } = useLabelableContext();
96
- const timeout = useTimeout();
97
- const inputRef = React.useRef(null);
98
- const registeredInputs = useRefWithInit(() => new Map()).current;
99
- const validationCommitIdRef = React.useRef(0);
100
-
101
- // Groups register several inputs against a single field so focus, validation, and form-value
102
- // projection can use the same live controls. This also ensures a `required` checkbox can't be
103
- // satisfied by another input in the group, matching native per-checkbox behavior.
104
- const registerInput = React.useCallback((element, registration) => {
105
- registeredInputs.set(element, registration);
106
- return () => {
107
- registeredInputs.delete(element);
108
- };
109
- }, [registeredInputs]);
110
- const getInputControl = useStableCallback(() => {
111
- const element = findRepresentativeInput(registeredInputs, elementRef.current);
112
- return element && registeredInputs.get(element)?.controlRef.current || null;
113
- });
114
- const commit = useStableCallback(async (value, revalidate = false) => {
115
- validationCommitIdRef.current += 1;
116
- const validationCommitId = validationCommitIdRef.current;
117
- function updateRegisteredFieldValidity(nextValidityData, externalInvalid = invalid) {
118
- const fieldId = registeredFieldIdRef.current ?? controlId;
119
- if (fieldId == null) {
120
- return;
121
- }
122
- const currentFieldData = formRef.current.fields.get(fieldId);
123
- if (!currentFieldData) {
124
- return;
125
- }
126
- const validityDataWithFormErrors = getCombinedFieldValidityData(nextValidityData, externalInvalid);
127
- formRef.current.fields.set(fieldId, {
128
- ...currentFieldData,
129
- validityData: validityDataWithFormErrors
130
- });
131
- }
132
- function publishAllValid(input, externalInvalid) {
133
- const nextValidityData = {
134
- value,
135
- state: {
136
- ...DEFAULT_VALIDITY_STATE,
137
- valid: true
138
- },
139
- error: '',
140
- errors: [],
141
- initialValue: validityData.initialValue
142
- };
143
- clearCustomValidity(input, registeredInputs);
144
- updateRegisteredFieldValidity(nextValidityData, externalInvalid);
145
- setValidityData(nextValidityData);
146
- }
147
-
148
- // A field can own several inputs (such as a checkbox or radio group), but only the last-mounted
149
- // one wins the shared `inputRef`. Validate against the registry instead so every input counts;
150
- // `inputRef` is the fallback only when no inputs are registered.
151
- const element = registeredInputs.size > 0 ? findRepresentativeInput(registeredInputs, elementRef.current) : inputRef.current;
152
- // A field with no eligible input has no native constraint, but its custom validator still
153
- // applies to the logical value at the configured validation boundary.
154
-
155
- if (revalidate) {
156
- if (state.valid !== false || !element) {
157
- return;
158
- }
159
- const currentNativeValidity = element.validity;
160
- if (!currentNativeValidity.valueMissing) {
161
- // The 'valueMissing' (required) condition has been resolved by the user typing.
162
- // Temporarily mark the field as valid for this onChange event.
163
- // Other native errors (e.g., typeMismatch) will be caught by full validation on blur or submit.
164
- // The required value is now present; ignore stale external invalid state for this pass.
165
- publishAllValid(element, false);
166
- return;
167
- }
168
-
169
- // A stale custom error can coexist with valueMissing, but defer any other native errors.
170
- for (const key of validityKeys) {
171
- if (key !== 'valid' && key !== 'valueMissing' && key !== 'customError' && currentNativeValidity[key]) {
172
- return;
173
- }
174
- }
175
-
176
- // Value is still missing: publish the current native state so valueMissing and the changed
177
- // value are observable immediately. Full custom validation still waits for its boundary.
178
- }
179
- function getState(el) {
180
- const computedState = validityKeys.reduce((acc, key) => {
181
- acc[key] = el.validity[key];
182
- return acc;
183
- }, {});
184
- let hasOnlyValueMissingError = false;
185
- for (const key of validityKeys) {
186
- if (key === 'valid') {
187
- continue;
188
- }
189
- if (key === 'valueMissing' && computedState[key]) {
190
- hasOnlyValueMissingError = true;
191
- } else if (computedState[key]) {
192
- return computedState;
193
- }
194
- }
195
-
196
- // Only make `valueMissing` mark the field invalid if it's been changed
197
- // to reduce error noise.
198
- if (hasOnlyValueMissingError && !markedDirtyRef.current) {
199
- computedState.valid = true;
200
- computedState.valueMissing = false;
201
- }
202
- return computedState;
203
- }
204
- timeout.clear();
205
- let result = null;
206
- let validationErrors = [];
207
-
208
- // With no representative input the field carries no native constraint, so start from an
209
- // all-valid native state and let the custom `validate` result below decide the outcome.
210
- const nextState = element ? getState(element) : {
211
- ...DEFAULT_VALIDITY_STATE,
212
- valid: true
213
- };
214
- let defaultValidationMessage;
215
- const isValidatingOnChange = shouldValidateOnChange();
216
- if (element && element.validationMessage && !isValidatingOnChange) {
217
- // not validating on change, if there is a `validationMessage` from
218
- // native validity, set errors and skip calling the custom validate fn
219
- defaultValidationMessage = element.validationMessage;
220
- validationErrors = [element.validationMessage];
221
- } else {
222
- // call the validate function because either
223
- // - validating on change, or
224
- // - native constraint validations passed, custom validity check is next
225
- const formValues = Array.from(formRef.current.fields.values()).reduce((acc, field) => {
226
- if (field.name) {
227
- acc[field.name] = field.getValue();
228
- }
229
- return acc;
230
- }, {});
231
- const resultOrPromise = validate(value, formValues);
232
- if (typeof resultOrPromise === 'object' && resultOrPromise !== null && 'then' in resultOrPromise) {
233
- result = await resultOrPromise;
234
- if (validationCommitId !== validationCommitIdRef.current) {
235
- return;
236
- }
237
- } else {
238
- result = resultOrPromise;
239
- }
240
- if (result !== null) {
241
- nextState.valid = false;
242
- nextState.customError = true;
243
- if (Array.isArray(result)) {
244
- validationErrors = result;
245
- element?.setCustomValidity(result.join('\n'));
246
- } else if (result) {
247
- validationErrors = [result];
248
- element?.setCustomValidity(result);
249
- }
250
- } else if (isValidatingOnChange) {
251
- // validate function returned no errors, if validating on change
252
- // we need to clear the custom validity state
253
- clearCustomValidity(element, registeredInputs);
254
- nextState.customError = false;
255
- if (element && element.validationMessage) {
256
- defaultValidationMessage = element.validationMessage;
257
- validationErrors = [element.validationMessage];
258
- } else if ((!element || element.validity.valid) && !nextState.valid) {
259
- nextState.valid = true;
260
- }
261
- }
262
- }
263
- const nextValidityData = {
264
- value,
265
- state: nextState,
266
- error: defaultValidationMessage ?? (Array.isArray(result) ? result[0] : result ?? ''),
267
- errors: validationErrors,
268
- initialValue: validityData.initialValue
269
- };
270
-
271
- // Keep Form-level errors part of overall field validity for submit blocking/focus logic.
272
- updateRegisteredFieldValidity(nextValidityData);
273
- setValidityData(nextValidityData);
274
- });
275
- const change = useStableCallback(value => {
276
- timeout.clear();
277
- const validateOnChange = shouldValidateOnChange();
278
- if (validateOnChange && value !== '' && validationDebounceTime) {
279
- validationCommitIdRef.current += 1;
280
- timeout.start(validationDebounceTime, () => {
281
- commit(value);
282
- });
283
- } else {
284
- commit(value, !validateOnChange);
285
- }
286
- });
287
- const getValidationProps = React.useCallback((disabled, externalProps = {}) => mergeProps(getDescriptionProps(externalProps), state.valid === false && !state.disabled && !disabled ? {
288
- 'aria-invalid': true
289
- } : EMPTY_OBJECT), [getDescriptionProps, state.disabled, state.valid]);
290
- return React.useMemo(() => ({
291
- getValidationProps,
292
- inputRef,
293
- registeredInputs,
294
- registerInput,
295
- getInputControl,
296
- commit,
297
- change
298
- }), [getValidationProps, registeredInputs, registerInput, getInputControl, commit, change]);
299
- }
300
-
301
9
  const FieldsetRootContext = /*#__PURE__*/React.createContext(undefined);
302
10
  if (process.env.NODE_ENV !== "production") FieldsetRootContext.displayName = "FieldsetRootContext";
303
11
  function useFieldsetRootContext(optional = false) {
@@ -34,6 +34,7 @@ require('../useCompositeListItem-cjs.js');
34
34
  require('../NumberFieldInput-cjs.js');
35
35
  require('../stringifyLocale-cjs.js');
36
36
  require('../FieldDescription-cjs.js');
37
+ require('../useFieldValidation-cjs.js');
37
38
  require('../useLabel-cjs.js');
38
39
 
39
40
 
@@ -32,4 +32,5 @@ import '../useCompositeListItem-es.js';
32
32
  import '../NumberFieldInput-es.js';
33
33
  import '../stringifyLocale-es.js';
34
34
  import '../FieldDescription-es.js';
35
+ import '../useFieldValidation-es.js';
35
36
  import '../useLabel-es.js';
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { a as useRefWithInit, f as formatErrorMessage, u as useRenderElement, m as mergeProps, b as useMergedRefs, N as NOOP, E as EMPTY_OBJECT, c as EMPTY_ARRAY, w as warn } from './useRenderElement-es.js';
3
- import { bl as isMouseLikePointerType, q as useTimeout, I as getWindow, bm as mergeCleanups, y as addEventListener, e as getTarget, au as isElement, bn as isTypeableElement, bo as matchesFocusVisible, bp as isTargetInsideEnabledTrigger, h as createChangeEventDetails, bq as triggerFocus, br as createAttribute, D as activeElement, o as ownerDocument, a0 as contains, bs as mac, a9 as webkit, i as isHTMLElement, bt as triggerPress, bu as escapeKey, H as useOnMount, T as Timeout, aM as useFloatingTree, aJ as useFloatingParentNodeId, d as useStableCallback, c as useIsoLayoutEffect, bv as isInteractiveElement, bw as getNodeChildren, bx as triggerHover, w as useValueAsRef, p as popupTransitionStateMapping, ad as itemPress, by as dispatchClickWithModifiers, f as useButton, t as transitionStatusMapping, u as useBaseUiId, l as useOpenChangeComplete, Z as outsidePress, n as FloatingFocusManager, a2 as FloatingPortal, bz as useAnimationsFinished, bA as POPUP_COLLISION_AVOIDANCE, a3 as InternalBackdrop, a4 as inertValue, bB as FloatingNode, a5 as DROPDOWN_COLLISION_AVOIDANCE, bC as siblingOpen, v as useControlled, s as useTransitionStatus, aL as PopupTriggerMap, bD as FloatingTreeStore, X as ReactStore, bE as fastComponent, aI as useId, bF as useFloatingNodeId, R as useOpenInteractionType, b8 as useImplicitActiveTrigger, b9 as useOpenStateTransitions, bG as attachPreventUnmountOnClose, b5 as setPopupOpenState, Y as focusOut, aS as listNavigation, bH as useSyncedFloatingRootContext, k as imperativeAction, W as useDismiss, a7 as useDirection, bI as TYPEAHEAD_RESET_MS, F as FOCUSABLE_POPUP_PROPS, b4 as usePopupInteractionProps, ba as PopupHandleAttachment, bJ as FloatingTree, bK as useCompositeRootContext, a as isLastTraversableNode, b as getParentNode, bL as getTabbableBeforeElement, bM as isOutsideEvent, bN as getTabbableAfterElement, bO as getNextTabbable, bP as fastComponentRef, bb as useTriggerDataForwarding, a1 as cancelOpen, V as useClick, _ as pressableTriggerOpenStateMapping, bQ as FocusGuard, bR as PATIENT_CLICK_THRESHOLD, bS as useTriggerRegistration, S as SafeReact, be as triggerOpenStateMapping, bT as voiceOver } from './useScrollLock-es.js';
3
+ import { bl as isMouseLikePointerType, f as useTimeout, I as getWindow, bm as mergeCleanups, y as addEventListener, e as getTarget, au as isElement, bn as isTypeableElement, bo as matchesFocusVisible, bp as isTargetInsideEnabledTrigger, j as createChangeEventDetails, bq as triggerFocus, br as createAttribute, D as activeElement, o as ownerDocument, a0 as contains, bs as mac, a9 as webkit, i as isHTMLElement, bt as triggerPress, bu as escapeKey, H as useOnMount, T as Timeout, aM as useFloatingTree, aJ as useFloatingParentNodeId, d as useStableCallback, c as useIsoLayoutEffect, bv as isInteractiveElement, bw as getNodeChildren, bx as triggerHover, w as useValueAsRef, q as popupTransitionStateMapping, ad as itemPress, by as dispatchClickWithModifiers, h as useButton, t as transitionStatusMapping, u as useBaseUiId, n as useOpenChangeComplete, Z as outsidePress, s as FloatingFocusManager, a2 as FloatingPortal, bz as useAnimationsFinished, bA as POPUP_COLLISION_AVOIDANCE, a3 as InternalBackdrop, a4 as inertValue, bB as FloatingNode, a5 as DROPDOWN_COLLISION_AVOIDANCE, bC as siblingOpen, v as useControlled, m as useTransitionStatus, aL as PopupTriggerMap, bD as FloatingTreeStore, X as ReactStore, bE as fastComponent, aI as useId, bF as useFloatingNodeId, R as useOpenInteractionType, b8 as useImplicitActiveTrigger, b9 as useOpenStateTransitions, bG as attachPreventUnmountOnClose, b5 as setPopupOpenState, Y as focusOut, aS as listNavigation, bH as useSyncedFloatingRootContext, p as imperativeAction, W as useDismiss, a7 as useDirection, bI as TYPEAHEAD_RESET_MS, F as FOCUSABLE_POPUP_PROPS, b4 as usePopupInteractionProps, ba as PopupHandleAttachment, bJ as FloatingTree, bK as useCompositeRootContext, a as isLastTraversableNode, b as getParentNode, bL as getTabbableBeforeElement, bM as isOutsideEvent, bN as getTabbableAfterElement, bO as getNextTabbable, bP as fastComponentRef, bb as useTriggerDataForwarding, a1 as cancelOpen, V as useClick, _ as pressableTriggerOpenStateMapping, bQ as FocusGuard, bR as PATIENT_CLICK_THRESHOLD, bS as useTriggerRegistration, S as SafeReact, be as triggerOpenStateMapping, bT as voiceOver } from './useScrollLock-es.js';
4
4
  import { jsx, jsxs } from 'react/jsx-runtime';
5
5
  import { A as useCompositeListItem, z as getDisabledMountTransitionStyles, w as useAnchorPositioning, v as useAnchoredPopupScrollLock, x as usePositioner, C as CompositeList, j as useListNavigation, k as useTypeahead, p as isMouseWithinBounds } from './useCompositeListItem-es.js';
6
6
  import { u as useToolbarRootContext, l as isElementDisabled } from './SelectGroupLabel-es.js';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { v as useControlled, w as useValueAsRef, c as useIsoLayoutEffect, d as useStableCallback, x as ios, y as addEventListener, h as createChangeEventDetails, z as none, B as visuallyHiddenInput, C as visuallyHidden, D as activeElement, o as ownerDocument, E as wheel, G as createGenericEventDetails, H as useOnMount, T as Timeout, q as useTimeout, I as getWindow, f as useButton, J as incrementPress, K as decrementPress, L as useValueChanged, M as inputClear, N as inputBlur, O as inputChange, P as keyboard, S as SafeReact, Q as inputPaste } from './useScrollLock-es.js';
2
+ import { v as useControlled, w as useValueAsRef, c as useIsoLayoutEffect, d as useStableCallback, x as ios, y as addEventListener, j as createChangeEventDetails, z as none, B as visuallyHiddenInput, C as visuallyHidden, D as activeElement, o as ownerDocument, E as wheel, G as createGenericEventDetails, H as useOnMount, T as Timeout, f as useTimeout, I as getWindow, h as useButton, J as incrementPress, K as decrementPress, L as useValueChanged, M as inputClear, N as inputBlur, O as inputChange, P as keyboard, S as SafeReact, Q as inputPaste } from './useScrollLock-es.js';
3
3
  import { f as formatErrorMessage, b as useMergedRefs, u as useRenderElement, a as useRefWithInit, N as NOOP, w as warn } from './useRenderElement-es.js';
4
4
  import { f as fieldValidityMapping, b as useFieldRootContext, a as useFormContext, c as useLabelableId, u as useLabelableContext, d as useRegisterFieldControl } from './useCompositeListItem-es.js';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { E as EMPTY_OBJECT, N as NOOP, f as formatErrorMessage, u as useRenderElement, m as mergeProps } from './useRenderElement-es.js';
3
- import { aK as FloatingRootStore, aL as PopupTriggerMap, b3 as shimExports, a6 as popupStateMapping, t as transitionStatusMapping, a2 as FloatingPortal, a3 as InternalBackdrop, a4 as inertValue, W as useDismiss, e as getTarget, a0 as contains, b2 as useScrollLock, c as useIsoLayoutEffect, b4 as usePopupInteractionProps, X as ReactStore, b5 as setPopupOpenState, b6 as usePopupRootStore, b7 as usePopupRootSync, b8 as useImplicitActiveTrigger, b9 as useOpenStateTransitions, h as createChangeEventDetails, k as imperativeAction, ba as PopupHandleAttachment, u as useBaseUiId, bb as useTriggerDataForwarding, f as useButton, V as useClick, bc as useOpenMethodTriggerProps, bd as CLICK_TRIGGER_IDENTIFIER, be as triggerOpenStateMapping, p as popupTransitionStateMapping, bf as CommonPopupDataAttributes, d as useStableCallback, o as ownerDocument, S as SafeReact, r as error, l as useOpenChangeComplete, F as FOCUSABLE_POPUP_PROPS, n as FloatingFocusManager, v as useControlled, z as none, bg as android, I as getWindow, y as addEventListener, bh as closeWatcher, a8 as useAnimationFrame, au as isElement, D as activeElement, bi as TransitionStatusDataAttributes, bj as swipe, bk as BASE_UI_SWIPE_IGNORE_SELECTOR, q as useTimeout, a7 as useDirection, a9 as webkit } from './useScrollLock-es.js';
3
+ import { aK as FloatingRootStore, aL as PopupTriggerMap, b3 as shimExports, a6 as popupStateMapping, t as transitionStatusMapping, a2 as FloatingPortal, a3 as InternalBackdrop, a4 as inertValue, W as useDismiss, e as getTarget, a0 as contains, b2 as useScrollLock, c as useIsoLayoutEffect, b4 as usePopupInteractionProps, X as ReactStore, b5 as setPopupOpenState, b6 as usePopupRootStore, b7 as usePopupRootSync, b8 as useImplicitActiveTrigger, b9 as useOpenStateTransitions, j as createChangeEventDetails, p as imperativeAction, ba as PopupHandleAttachment, u as useBaseUiId, bb as useTriggerDataForwarding, h as useButton, V as useClick, bc as useOpenMethodTriggerProps, bd as CLICK_TRIGGER_IDENTIFIER, be as triggerOpenStateMapping, q as popupTransitionStateMapping, bf as CommonPopupDataAttributes, d as useStableCallback, o as ownerDocument, S as SafeReact, l as error, n as useOpenChangeComplete, F as FOCUSABLE_POPUP_PROPS, s as FloatingFocusManager, v as useControlled, z as none, bg as android, I as getWindow, y as addEventListener, bh as closeWatcher, a8 as useAnimationFrame, au as isElement, D as activeElement, bi as TransitionStatusDataAttributes, bj as swipe, bk as BASE_UI_SWIPE_IGNORE_SELECTOR, f as useTimeout, a7 as useDirection, a9 as webkit } from './useScrollLock-es.js';
4
4
  import { c as clamp, C as COMPOSITE_KEYS, u as useCSPContext, s as styleDisableScrollbar, n as normalizeScrollOffset } from './scrollEdges-es.js';
5
5
  import { jsx, jsxs } from 'react/jsx-runtime';
6
6
  import * as ReactDOM from 'react-dom';
@@ -28,6 +28,7 @@ require('../scrollable-cjs.js');
28
28
  require('../HelperText-cjs.js');
29
29
  require('../Text-cjs.js');
30
30
  require('../FieldDescription-cjs.js');
31
+ require('../useFieldValidation-cjs.js');
31
32
  require('../useLabel-cjs.js');
32
33
 
33
34
 
@@ -26,4 +26,5 @@ import '../scrollable-es.js';
26
26
  import '../HelperText-es.js';
27
27
  import '../Text-es.js';
28
28
  import '../FieldDescription-es.js';
29
+ import '../useFieldValidation-es.js';
29
30
  import '../useLabel-es.js';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { v as useControlled, s as useTransitionStatus, R as useOpenInteractionType, U as useStore, w as useValueAsRef, d as useStableCallback, c as useIsoLayoutEffect, L as useValueChanged, l as useOpenChangeComplete, V as useClick, W as useDismiss, F as FOCUSABLE_POPUP_PROPS, h as createChangeEventDetails, z as none, B as visuallyHiddenInput, C as visuallyHidden, X as ReactStore, Y as focusOut, Z as outsidePress, _ as pressableTriggerOpenStateMapping, f as useButton, q as useTimeout, $ as getFloatingFocusElement, a0 as contains, o as ownerDocument, a1 as cancelOpen, a2 as FloatingPortal, a3 as InternalBackdrop, a4 as inertValue, a5 as DROPDOWN_COLLISION_AVOIDANCE, a6 as popupStateMapping, t as transitionStatusMapping, a7 as useDirection, a8 as useAnimationFrame, I as getWindow, a9 as webkit, y as addEventListener, n as FloatingFocusManager, aa as rectToClientRect, ab as windowResize, ac as isVirtualClick, ad as itemPress, u as useBaseUiId } from './useScrollLock-es.js';
2
+ import { v as useControlled, m as useTransitionStatus, R as useOpenInteractionType, U as useStore, w as useValueAsRef, d as useStableCallback, c as useIsoLayoutEffect, L as useValueChanged, n as useOpenChangeComplete, V as useClick, W as useDismiss, F as FOCUSABLE_POPUP_PROPS, j as createChangeEventDetails, z as none, B as visuallyHiddenInput, C as visuallyHidden, X as ReactStore, Y as focusOut, Z as outsidePress, _ as pressableTriggerOpenStateMapping, h as useButton, f as useTimeout, $ as getFloatingFocusElement, a0 as contains, o as ownerDocument, a1 as cancelOpen, a2 as FloatingPortal, a3 as InternalBackdrop, a4 as inertValue, a5 as DROPDOWN_COLLISION_AVOIDANCE, a6 as popupStateMapping, t as transitionStatusMapping, a7 as useDirection, a8 as useAnimationFrame, I as getWindow, a9 as webkit, y as addEventListener, s as FloatingFocusManager, aa as rectToClientRect, ab as windowResize, ac as isVirtualClick, ad as itemPress, u as useBaseUiId } from './useScrollLock-es.js';
3
3
  import { f as formatErrorMessage, a as useRefWithInit, m as mergeProps, E as EMPTY_OBJECT, b as useMergedRefs, c as EMPTY_ARRAY, u as useRenderElement } from './useRenderElement-es.js';
4
4
  import { s as stringifyAsValue, h as hasNullItemLabel, e as compareItemEquality, a as useFormContext, b as useFieldRootContext, c as useLabelableId, d as useRegisterFieldControl, g as findItemIndex, i as useFloatingRootContext, j as useListNavigation, k as useTypeahead, l as useOnFirstRender, m as defaultItemEquality, n as stringifyAsLabel, o as areArraysEqual, f as fieldValidityMapping, u as useLabelableContext, r as resolveAriaLabelledBy, p as isMouseWithinBounds, q as resolveMultipleLabels, t as resolveSelectedLabel, v as useAnchoredPopupScrollLock, w as useAnchorPositioning, x as usePositioner, C as CompositeList, y as platform, z as getDisabledMountTransitionStyles, A as useCompositeListItem, B as removeItem } from './useCompositeListItem-es.js';
5
5
  import { g as getMaxScrollOffset, n as normalizeScrollOffset, u as useCSPContext, c as clamp, S as SCROLL_EDGE_TOLERANCE_PX, C as COMPOSITE_KEYS, s as styleDisableScrollbar } from './scrollEdges-es.js';
@@ -285,25 +285,26 @@ export function IconSizesExample() {
285
285
 
286
286
  ### Messaging
287
287
 
288
- | Icon | `Name` |
289
- | :--- | :---------------- |
290
- | | `chat` |
291
- | | `compose` |
292
- | | `conversation` |
293
- | | `email` |
294
- | | `emailInbound` |
295
- | | `emailOutbound` |
296
- | | `markSent` |
297
- | | `marketing` |
298
- | | `reminder` |
299
- | | `sendMessage` |
300
- | | `sms` |
301
- | | `sms2` |
302
- | | `smsInbound` |
303
- | | `smsOutbound` |
304
- | | `smsProgress` |
305
- | | `webchat` |
306
- | | `webchatProgress` |
288
+ | Icon | `Name` |
289
+ | :--- | :---------------------- |
290
+ | | `chat` |
291
+ | | `compose` |
292
+ | | `conversation` |
293
+ | | `email` |
294
+ | | `emailInbound` |
295
+ | | `emailOutbound` |
296
+ | | `markSent` |
297
+ | | `marketing` |
298
+ | | `reminder` |
299
+ | | `sendMessage` |
300
+ | | `sms` |
301
+ | | `sms2` |
302
+ | | `smsInbound` |
303
+ | | `smsOutbound` |
304
+ | | `smsProgress` |
305
+ | | `snoozeRecommendations` |
306
+ | | `webchat` |
307
+ | | `webchatProgress` |
307
308
 
308
309
  ### User
309
310
 
package/dist/index.cjs CHANGED
@@ -126,6 +126,7 @@ require('./scrollable-cjs.js');
126
126
  require('./useLabel-cjs.js');
127
127
  require('./HelperText-cjs.js');
128
128
  require('./FieldDescription-cjs.js');
129
+ require('./useFieldValidation-cjs.js');
129
130
  require('./useChildComponent-cjs.js');
130
131
  require('./InternalChipDismissible-cjs.js');
131
132
  require('./useScrollToActive-cjs.js');
package/dist/index.mjs CHANGED
@@ -124,6 +124,7 @@ import './scrollable-es.js';
124
124
  import './useLabel-es.js';
125
125
  import './HelperText-es.js';
126
126
  import './FieldDescription-es.js';
127
+ import './useFieldValidation-es.js';
127
128
  import './useChildComponent-es.js';
128
129
  import './InternalChipDismissible-es.js';
129
130
  import './useScrollToActive-es.js';