@cdx-ui/components 0.0.1-beta.64 → 0.0.1-beta.66
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/lib/commonjs/components/AlertDialog/index.js +12 -10
- package/lib/commonjs/components/AlertDialog/index.js.map +1 -1
- package/lib/commonjs/components/Avatar/index.js +125 -25
- package/lib/commonjs/components/Avatar/index.js.map +1 -1
- package/lib/commonjs/components/Button/index.js +127 -28
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Button/styles.js +9 -3
- package/lib/commonjs/components/Button/styles.js.map +1 -1
- package/lib/commonjs/components/CLAUDE.md +115 -11
- package/lib/commonjs/components/Checkbox/index.js +69 -22
- package/lib/commonjs/components/Checkbox/index.js.map +1 -1
- package/lib/commonjs/components/Checkbox/styles.js +1 -1
- package/lib/commonjs/components/Checkbox/styles.js.map +1 -1
- package/lib/commonjs/components/Chip/index.js +44 -36
- package/lib/commonjs/components/Chip/index.js.map +1 -1
- package/lib/commonjs/components/Chip/styles.js +6 -35
- package/lib/commonjs/components/Chip/styles.js.map +1 -1
- package/lib/commonjs/components/Dialog/index.js +92 -72
- package/lib/commonjs/components/Dialog/index.js.map +1 -1
- package/lib/commonjs/components/Field/index.js +70 -26
- package/lib/commonjs/components/Field/index.js.map +1 -1
- package/lib/commonjs/components/Form/index.js +5 -12
- package/lib/commonjs/components/Form/index.js.map +1 -1
- package/lib/commonjs/components/IconButton/index.js +5 -33
- package/lib/commonjs/components/IconButton/index.js.map +1 -1
- package/lib/commonjs/components/Input/index.js +50 -20
- package/lib/commonjs/components/Input/index.js.map +1 -1
- package/lib/commonjs/components/Link/index.js +14 -7
- package/lib/commonjs/components/Link/index.js.map +1 -1
- package/lib/commonjs/components/ListItem/index.js +129 -54
- package/lib/commonjs/components/ListItem/index.js.map +1 -1
- package/lib/commonjs/components/OtpInput/index.js +94 -28
- package/lib/commonjs/components/OtpInput/index.js.map +1 -1
- package/lib/commonjs/components/ProgressBar/index.js +8 -13
- package/lib/commonjs/components/ProgressBar/index.js.map +1 -1
- package/lib/commonjs/components/Radio/index.js +51 -53
- package/lib/commonjs/components/Radio/index.js.map +1 -1
- package/lib/commonjs/components/Select/index.js +112 -46
- package/lib/commonjs/components/Select/index.js.map +1 -1
- package/lib/commonjs/components/Select/styles.js +2 -2
- package/lib/commonjs/components/Select/styles.js.map +1 -1
- package/lib/commonjs/components/Skeleton/index.js +37 -0
- package/lib/commonjs/components/Skeleton/index.js.map +1 -0
- package/lib/commonjs/components/Skeleton/styles.js +9 -0
- package/lib/commonjs/components/Skeleton/styles.js.map +1 -0
- package/lib/commonjs/components/Switch/BaseSwitch.js +23 -13
- package/lib/commonjs/components/Switch/BaseSwitch.js.map +1 -1
- package/lib/commonjs/components/Switch/BaseSwitch.web.js +25 -21
- package/lib/commonjs/components/Switch/BaseSwitch.web.js.map +1 -1
- package/lib/commonjs/components/Switch/index.js +34 -3
- package/lib/commonjs/components/Switch/index.js.map +1 -1
- package/lib/commonjs/components/Tile/index.js +150 -77
- package/lib/commonjs/components/Tile/index.js.map +1 -1
- package/lib/commonjs/components/index.js +12 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/figma/Chip.figma.js +2 -2
- package/lib/commonjs/figma/Chip.figma.js.map +1 -1
- package/lib/commonjs/utils/positionToDataIcon.js +41 -0
- package/lib/commonjs/utils/positionToDataIcon.js.map +1 -0
- package/lib/module/components/AlertDialog/index.js +13 -11
- package/lib/module/components/AlertDialog/index.js.map +1 -1
- package/lib/module/components/Avatar/index.js +128 -28
- package/lib/module/components/Avatar/index.js.map +1 -1
- package/lib/module/components/Button/index.js +130 -32
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Button/styles.js +8 -2
- package/lib/module/components/Button/styles.js.map +1 -1
- package/lib/module/components/CLAUDE.md +115 -11
- package/lib/module/components/Checkbox/index.js +72 -25
- package/lib/module/components/Checkbox/index.js.map +1 -1
- package/lib/module/components/Checkbox/styles.js +1 -1
- package/lib/module/components/Checkbox/styles.js.map +1 -1
- package/lib/module/components/Chip/index.js +47 -39
- package/lib/module/components/Chip/index.js.map +1 -1
- package/lib/module/components/Chip/styles.js +6 -35
- package/lib/module/components/Chip/styles.js.map +1 -1
- package/lib/module/components/Dialog/index.js +96 -76
- package/lib/module/components/Dialog/index.js.map +1 -1
- package/lib/module/components/Field/index.js +74 -31
- package/lib/module/components/Field/index.js.map +1 -1
- package/lib/module/components/Form/index.js +7 -14
- package/lib/module/components/Form/index.js.map +1 -1
- package/lib/module/components/IconButton/index.js +6 -34
- package/lib/module/components/IconButton/index.js.map +1 -1
- package/lib/module/components/Input/index.js +53 -23
- package/lib/module/components/Input/index.js.map +1 -1
- package/lib/module/components/Link/index.js +16 -8
- package/lib/module/components/Link/index.js.map +1 -1
- package/lib/module/components/ListItem/index.js +134 -59
- package/lib/module/components/ListItem/index.js.map +1 -1
- package/lib/module/components/OtpInput/index.js +94 -28
- package/lib/module/components/OtpInput/index.js.map +1 -1
- package/lib/module/components/ProgressBar/index.js +9 -14
- package/lib/module/components/ProgressBar/index.js.map +1 -1
- package/lib/module/components/Radio/index.js +54 -57
- package/lib/module/components/Radio/index.js.map +1 -1
- package/lib/module/components/Select/index.js +118 -52
- package/lib/module/components/Select/index.js.map +1 -1
- package/lib/module/components/Select/styles.js +2 -2
- package/lib/module/components/Select/styles.js.map +1 -1
- package/lib/module/components/Skeleton/index.js +32 -0
- package/lib/module/components/Skeleton/index.js.map +1 -0
- package/lib/module/components/Skeleton/styles.js +5 -0
- package/lib/module/components/Skeleton/styles.js.map +1 -0
- package/lib/module/components/Switch/BaseSwitch.js +24 -14
- package/lib/module/components/Switch/BaseSwitch.js.map +1 -1
- package/lib/module/components/Switch/BaseSwitch.web.js +26 -22
- package/lib/module/components/Switch/BaseSwitch.web.js.map +1 -1
- package/lib/module/components/Switch/index.js +35 -4
- package/lib/module/components/Switch/index.js.map +1 -1
- package/lib/module/components/Tile/index.js +155 -83
- package/lib/module/components/Tile/index.js.map +1 -1
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/figma/Chip.figma.js +2 -2
- package/lib/module/figma/Chip.figma.js.map +1 -1
- package/lib/module/utils/positionToDataIcon.js +38 -0
- package/lib/module/utils/positionToDataIcon.js.map +1 -0
- package/lib/typescript/components/AlertDialog/index.d.ts.map +1 -1
- package/lib/typescript/components/Avatar/index.d.ts +6 -2
- package/lib/typescript/components/Avatar/index.d.ts.map +1 -1
- package/lib/typescript/components/Button/index.d.ts +31 -8
- package/lib/typescript/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/components/Button/styles.d.ts +2 -1
- package/lib/typescript/components/Button/styles.d.ts.map +1 -1
- package/lib/typescript/components/Checkbox/index.d.ts +3 -1
- package/lib/typescript/components/Checkbox/index.d.ts.map +1 -1
- package/lib/typescript/components/Chip/index.d.ts +19 -9
- package/lib/typescript/components/Chip/index.d.ts.map +1 -1
- package/lib/typescript/components/Chip/styles.d.ts +0 -1
- package/lib/typescript/components/Chip/styles.d.ts.map +1 -1
- package/lib/typescript/components/Dialog/index.d.ts +12 -6
- package/lib/typescript/components/Dialog/index.d.ts.map +1 -1
- package/lib/typescript/components/Dialog/styles.d.ts +1 -1
- package/lib/typescript/components/Field/index.d.ts +14 -7
- package/lib/typescript/components/Field/index.d.ts.map +1 -1
- package/lib/typescript/components/Form/index.d.ts +4 -4
- package/lib/typescript/components/Form/index.d.ts.map +1 -1
- package/lib/typescript/components/IconButton/index.d.ts.map +1 -1
- package/lib/typescript/components/Input/index.d.ts +11 -3
- package/lib/typescript/components/Input/index.d.ts.map +1 -1
- package/lib/typescript/components/Link/index.d.ts +2 -0
- package/lib/typescript/components/Link/index.d.ts.map +1 -1
- package/lib/typescript/components/ListItem/index.d.ts +28 -6
- package/lib/typescript/components/ListItem/index.d.ts.map +1 -1
- package/lib/typescript/components/OtpInput/index.d.ts +1 -1
- package/lib/typescript/components/OtpInput/index.d.ts.map +1 -1
- package/lib/typescript/components/ProgressBar/index.d.ts +4 -4
- package/lib/typescript/components/ProgressBar/index.d.ts.map +1 -1
- package/lib/typescript/components/Radio/index.d.ts +4 -0
- package/lib/typescript/components/Radio/index.d.ts.map +1 -1
- package/lib/typescript/components/Select/index.d.ts +35 -2
- package/lib/typescript/components/Select/index.d.ts.map +1 -1
- package/lib/typescript/components/Select/styles.d.ts.map +1 -1
- package/lib/typescript/components/Skeleton/index.d.ts +9 -0
- package/lib/typescript/components/Skeleton/index.d.ts.map +1 -0
- package/lib/typescript/components/Skeleton/styles.d.ts +4 -0
- package/lib/typescript/components/Skeleton/styles.d.ts.map +1 -0
- package/lib/typescript/components/Switch/BaseSwitch.d.ts +12 -5
- package/lib/typescript/components/Switch/BaseSwitch.d.ts.map +1 -1
- package/lib/typescript/components/Switch/BaseSwitch.web.d.ts +11 -5
- package/lib/typescript/components/Switch/BaseSwitch.web.d.ts.map +1 -1
- package/lib/typescript/components/Switch/index.d.ts +5 -1
- package/lib/typescript/components/Switch/index.d.ts.map +1 -1
- package/lib/typescript/components/Tile/index.d.ts +8 -2
- package/lib/typescript/components/Tile/index.d.ts.map +1 -1
- package/lib/typescript/components/index.d.ts +1 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/utils/positionToDataIcon.d.ts +29 -0
- package/lib/typescript/utils/positionToDataIcon.d.ts.map +1 -0
- package/package.json +5 -5
- package/src/components/AlertDialog/index.tsx +13 -14
- package/src/components/Avatar/index.tsx +134 -44
- package/src/components/Button/index.tsx +216 -44
- package/src/components/Button/styles.ts +50 -38
- package/src/components/CLAUDE.md +115 -11
- package/src/components/Checkbox/index.tsx +93 -32
- package/src/components/Checkbox/styles.ts +1 -1
- package/src/components/Chip/index.tsx +88 -61
- package/src/components/Chip/styles.ts +6 -18
- package/src/components/Dialog/index.tsx +139 -99
- package/src/components/Field/index.tsx +113 -49
- package/src/components/Form/index.tsx +18 -14
- package/src/components/IconButton/index.tsx +7 -31
- package/src/components/Input/index.tsx +75 -32
- package/src/components/Link/index.tsx +38 -12
- package/src/components/ListItem/index.tsx +158 -73
- package/src/components/OtpInput/index.tsx +126 -43
- package/src/components/ProgressBar/index.tsx +11 -16
- package/src/components/Radio/index.tsx +76 -54
- package/src/components/Select/index.tsx +174 -59
- package/src/components/Select/styles.ts +1 -2
- package/src/components/Skeleton/index.tsx +42 -0
- package/src/components/Skeleton/styles.ts +5 -0
- package/src/components/Switch/BaseSwitch.tsx +38 -16
- package/src/components/Switch/BaseSwitch.web.tsx +28 -35
- package/src/components/Switch/index.tsx +51 -4
- package/src/components/Tile/index.tsx +145 -94
- package/src/components/index.ts +1 -0
- package/src/utils/positionToDataIcon.ts +34 -0
- package/lib/commonjs/components/Field/FieldLabel.js +0 -33
- package/lib/commonjs/components/Field/FieldLabel.js.map +0 -1
- package/lib/commonjs/components/Field/FieldLabel.web.js +0 -22
- package/lib/commonjs/components/Field/FieldLabel.web.js.map +0 -1
- package/lib/commonjs/components/Form/FormRoot.js +0 -25
- package/lib/commonjs/components/Form/FormRoot.js.map +0 -1
- package/lib/commonjs/components/Form/FormRoot.web.js +0 -17
- package/lib/commonjs/components/Form/FormRoot.web.js.map +0 -1
- package/lib/commonjs/components/Input/BaseInput.android.js +0 -20
- package/lib/commonjs/components/Input/BaseInput.android.js.map +0 -1
- package/lib/commonjs/components/Input/BaseInput.js +0 -13
- package/lib/commonjs/components/Input/BaseInput.js.map +0 -1
- package/lib/commonjs/components/Input/BaseInput.web.js +0 -50
- package/lib/commonjs/components/Input/BaseInput.web.js.map +0 -1
- package/lib/commonjs/components/Select/SelectTriggerHost.js +0 -10
- package/lib/commonjs/components/Select/SelectTriggerHost.js.map +0 -1
- package/lib/commonjs/components/Select/SelectTriggerHost.web.js +0 -102
- package/lib/commonjs/components/Select/SelectTriggerHost.web.js.map +0 -1
- package/lib/module/components/Field/FieldLabel.js +0 -29
- package/lib/module/components/Field/FieldLabel.js.map +0 -1
- package/lib/module/components/Field/FieldLabel.web.js +0 -17
- package/lib/module/components/Field/FieldLabel.web.js.map +0 -1
- package/lib/module/components/Form/FormRoot.js +0 -21
- package/lib/module/components/Form/FormRoot.js.map +0 -1
- package/lib/module/components/Form/FormRoot.web.js +0 -12
- package/lib/module/components/Form/FormRoot.web.js.map +0 -1
- package/lib/module/components/Input/BaseInput.android.js +0 -16
- package/lib/module/components/Input/BaseInput.android.js.map +0 -1
- package/lib/module/components/Input/BaseInput.js +0 -4
- package/lib/module/components/Input/BaseInput.js.map +0 -1
- package/lib/module/components/Input/BaseInput.web.js +0 -45
- package/lib/module/components/Input/BaseInput.web.js.map +0 -1
- package/lib/module/components/Select/SelectTriggerHost.js +0 -7
- package/lib/module/components/Select/SelectTriggerHost.js.map +0 -1
- package/lib/module/components/Select/SelectTriggerHost.web.js +0 -97
- package/lib/module/components/Select/SelectTriggerHost.web.js.map +0 -1
- package/lib/typescript/components/Field/FieldLabel.d.ts +0 -18
- package/lib/typescript/components/Field/FieldLabel.d.ts.map +0 -1
- package/lib/typescript/components/Field/FieldLabel.web.d.ts +0 -16
- package/lib/typescript/components/Field/FieldLabel.web.d.ts.map +0 -1
- package/lib/typescript/components/Form/FormRoot.d.ts +0 -14
- package/lib/typescript/components/Form/FormRoot.d.ts.map +0 -1
- package/lib/typescript/components/Form/FormRoot.web.d.ts +0 -10
- package/lib/typescript/components/Form/FormRoot.web.d.ts.map +0 -1
- package/lib/typescript/components/Input/BaseInput.android.d.ts +0 -3
- package/lib/typescript/components/Input/BaseInput.android.d.ts.map +0 -1
- package/lib/typescript/components/Input/BaseInput.d.ts +0 -2
- package/lib/typescript/components/Input/BaseInput.d.ts.map +0 -1
- package/lib/typescript/components/Input/BaseInput.web.d.ts +0 -3
- package/lib/typescript/components/Input/BaseInput.web.d.ts.map +0 -1
- package/lib/typescript/components/Select/SelectTriggerHost.d.ts +0 -3
- package/lib/typescript/components/Select/SelectTriggerHost.d.ts.map +0 -1
- package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts +0 -16
- package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts.map +0 -1
- package/src/components/Field/FieldLabel.tsx +0 -33
- package/src/components/Field/FieldLabel.web.tsx +0 -25
- package/src/components/Form/FormRoot.tsx +0 -20
- package/src/components/Form/FormRoot.web.tsx +0 -12
- package/src/components/Input/BaseInput.android.tsx +0 -13
- package/src/components/Input/BaseInput.tsx +0 -1
- package/src/components/Input/BaseInput.web.tsx +0 -41
- package/src/components/Select/SelectTriggerHost.tsx +0 -4
- package/src/components/Select/SelectTriggerHost.web.tsx +0 -143
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { forwardRef } from 'react';
|
|
4
|
-
import {
|
|
3
|
+
import { forwardRef, useMemo } from 'react';
|
|
4
|
+
import { Text, View } from 'react-native';
|
|
5
5
|
import { CheckCircle, Close as CloseIcon, EmergencyHome, Warning } from '@cdx-ui/icons';
|
|
6
|
-
import {
|
|
7
|
-
import { cn,
|
|
6
|
+
import { DialogClose as DialogClosePrimitive, DialogPopup as DialogPopupPrimitive, DialogRoot as DialogRootPrimitive, DialogTrigger as DialogTriggerPrimitive, Slot, dataAttributes, mergeDataAttributes, useDialog } from '@cdx-ui/primitives';
|
|
7
|
+
import { cn, ParentContext, useParentContext, useStyleContext } from '@cdx-ui/utils';
|
|
8
8
|
import { Icon } from '../Icon';
|
|
9
9
|
import { dialogCloseIconVariants, dialogCloseVariants, dialogContentVariants, dialogDescriptionVariants, dialogFooterVariants, dialogHeaderVariants, dialogOverlayVariants, dialogPopupVariants, dialogTextVariants, dialogTitleIconVariants, dialogTitleVariants } from './styles';
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -15,40 +15,8 @@ export { useDialog } from '@cdx-ui/primitives';
|
|
|
15
15
|
// =============================================================================
|
|
16
16
|
|
|
17
17
|
const SCOPE = 'DIALOG';
|
|
18
|
-
const Root = withStyleContext(View, SCOPE);
|
|
19
18
|
const useDialogStyleContext = () => useStyleContext(SCOPE);
|
|
20
19
|
|
|
21
|
-
// =============================================================================
|
|
22
|
-
// STYLED OVERLAY (internal — not consumer-facing)
|
|
23
|
-
// =============================================================================
|
|
24
|
-
|
|
25
|
-
const StyledOverlay = /*#__PURE__*/forwardRef(({
|
|
26
|
-
className,
|
|
27
|
-
...props
|
|
28
|
-
}, ref) => /*#__PURE__*/_jsx(Pressable, {
|
|
29
|
-
ref: ref,
|
|
30
|
-
className: cn(dialogOverlayVariants(), className),
|
|
31
|
-
...props
|
|
32
|
-
}));
|
|
33
|
-
StyledOverlay.displayName = 'Dialog.Overlay';
|
|
34
|
-
|
|
35
|
-
// =============================================================================
|
|
36
|
-
// CREATE DIALOG PRIMITIVE
|
|
37
|
-
// =============================================================================
|
|
38
|
-
|
|
39
|
-
const DialogPrimitive = createDialog({
|
|
40
|
-
Root,
|
|
41
|
-
Trigger: Pressable,
|
|
42
|
-
Overlay: StyledOverlay,
|
|
43
|
-
Popup: View,
|
|
44
|
-
Header: View,
|
|
45
|
-
Title: Text,
|
|
46
|
-
Description: Text,
|
|
47
|
-
Content: View,
|
|
48
|
-
Footer: View,
|
|
49
|
-
Close: Pressable
|
|
50
|
-
});
|
|
51
|
-
|
|
52
20
|
// =============================================================================
|
|
53
21
|
// STYLED ROOT
|
|
54
22
|
// =============================================================================
|
|
@@ -60,17 +28,29 @@ const DialogRoot = /*#__PURE__*/forwardRef(({
|
|
|
60
28
|
children,
|
|
61
29
|
style,
|
|
62
30
|
...props
|
|
63
|
-
}, ref) =>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
31
|
+
}, ref) => {
|
|
32
|
+
const parent = useParentContext();
|
|
33
|
+
const ctx = useMemo(() => ({
|
|
34
|
+
...parent,
|
|
35
|
+
[SCOPE]: {
|
|
36
|
+
size,
|
|
37
|
+
fullBleed
|
|
38
|
+
}
|
|
39
|
+
}), [parent, size, fullBleed]);
|
|
40
|
+
return /*#__PURE__*/_jsx(ParentContext.Provider, {
|
|
41
|
+
value: ctx,
|
|
42
|
+
children: /*#__PURE__*/_jsx(DialogRootPrimitive, {
|
|
43
|
+
ref: ref,
|
|
44
|
+
className: className,
|
|
45
|
+
style: style,
|
|
46
|
+
...props,
|
|
47
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
48
|
+
slot: 'dialog'
|
|
49
|
+
})),
|
|
50
|
+
children: children
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
});
|
|
74
54
|
DialogRoot.displayName = 'Dialog';
|
|
75
55
|
|
|
76
56
|
// =============================================================================
|
|
@@ -82,17 +62,20 @@ const DialogTrigger = /*#__PURE__*/forwardRef(({
|
|
|
82
62
|
children,
|
|
83
63
|
style,
|
|
84
64
|
...props
|
|
85
|
-
}, ref) => /*#__PURE__*/_jsx(
|
|
65
|
+
}, ref) => /*#__PURE__*/_jsx(DialogTriggerPrimitive, {
|
|
86
66
|
ref: ref,
|
|
87
67
|
className: className,
|
|
88
68
|
style: style,
|
|
89
69
|
...props,
|
|
70
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
71
|
+
slot: 'dialog-trigger'
|
|
72
|
+
})),
|
|
90
73
|
children: children
|
|
91
74
|
}));
|
|
92
75
|
DialogTrigger.displayName = 'Dialog.Trigger';
|
|
93
76
|
|
|
94
77
|
// =============================================================================
|
|
95
|
-
// STYLED POPUP
|
|
78
|
+
// STYLED POPUP
|
|
96
79
|
// =============================================================================
|
|
97
80
|
|
|
98
81
|
const DialogPopup = /*#__PURE__*/forwardRef(({
|
|
@@ -109,39 +92,49 @@ const DialogPopup = /*#__PURE__*/forwardRef(({
|
|
|
109
92
|
const computedClassName = cn(dialogPopupVariants({
|
|
110
93
|
size
|
|
111
94
|
}), className);
|
|
112
|
-
|
|
95
|
+
const overlayClassName = cn(dialogOverlayVariants());
|
|
96
|
+
return /*#__PURE__*/_jsx(DialogPopupPrimitive, {
|
|
113
97
|
ref: ref,
|
|
114
98
|
className: computedClassName,
|
|
115
99
|
style: style,
|
|
100
|
+
overlayClassName: overlayClassName,
|
|
116
101
|
...props,
|
|
102
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
103
|
+
slot: 'dialog-popup'
|
|
104
|
+
})),
|
|
117
105
|
children: children
|
|
118
106
|
});
|
|
119
107
|
});
|
|
120
108
|
DialogPopup.displayName = 'Dialog.Popup';
|
|
121
109
|
|
|
122
110
|
// =============================================================================
|
|
123
|
-
// STYLED HEADER
|
|
111
|
+
// STYLED HEADER (styled-only sub-slot)
|
|
124
112
|
// =============================================================================
|
|
125
113
|
|
|
126
114
|
const DialogHeader = /*#__PURE__*/forwardRef(({
|
|
115
|
+
asChild,
|
|
127
116
|
className,
|
|
128
117
|
children,
|
|
129
118
|
style,
|
|
130
119
|
...props
|
|
131
120
|
}, ref) => {
|
|
132
121
|
const computedClassName = cn(dialogHeaderVariants(), className);
|
|
133
|
-
|
|
122
|
+
const Comp = asChild ? Slot : View;
|
|
123
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
134
124
|
ref: ref,
|
|
135
125
|
className: computedClassName,
|
|
136
126
|
style: style,
|
|
137
127
|
...props,
|
|
128
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
129
|
+
slot: 'dialog-header'
|
|
130
|
+
})),
|
|
138
131
|
children: children
|
|
139
132
|
});
|
|
140
133
|
});
|
|
141
134
|
DialogHeader.displayName = 'Dialog.Header';
|
|
142
135
|
|
|
143
136
|
// =============================================================================
|
|
144
|
-
// STYLED TITLE
|
|
137
|
+
// STYLED TITLE (styled-only sub-slot with appearance variants)
|
|
145
138
|
// =============================================================================
|
|
146
139
|
|
|
147
140
|
const APPEARANCE_ICON_MAP = {
|
|
@@ -150,6 +143,7 @@ const APPEARANCE_ICON_MAP = {
|
|
|
150
143
|
success: CheckCircle
|
|
151
144
|
};
|
|
152
145
|
const DialogTitle = /*#__PURE__*/forwardRef(({
|
|
146
|
+
asChild,
|
|
153
147
|
appearance = 'default',
|
|
154
148
|
className,
|
|
155
149
|
children,
|
|
@@ -160,6 +154,17 @@ const DialogTitle = /*#__PURE__*/forwardRef(({
|
|
|
160
154
|
appearance
|
|
161
155
|
}), className);
|
|
162
156
|
const IconComponent = appearance && appearance in APPEARANCE_ICON_MAP ? APPEARANCE_ICON_MAP[appearance] : null;
|
|
157
|
+
const Comp = asChild ? Slot : Text;
|
|
158
|
+
const titleElement = /*#__PURE__*/_jsx(Comp, {
|
|
159
|
+
ref: ref,
|
|
160
|
+
className: computedClassName,
|
|
161
|
+
style: style,
|
|
162
|
+
...props,
|
|
163
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
164
|
+
slot: 'dialog-title'
|
|
165
|
+
})),
|
|
166
|
+
children: children
|
|
167
|
+
});
|
|
163
168
|
if (IconComponent) {
|
|
164
169
|
return /*#__PURE__*/_jsxs(View, {
|
|
165
170
|
className: "flex-row items-center gap-1",
|
|
@@ -168,51 +173,49 @@ const DialogTitle = /*#__PURE__*/forwardRef(({
|
|
|
168
173
|
className: dialogTitleIconVariants({
|
|
169
174
|
appearance
|
|
170
175
|
})
|
|
171
|
-
}),
|
|
172
|
-
ref: ref,
|
|
173
|
-
className: computedClassName,
|
|
174
|
-
style: style,
|
|
175
|
-
...props,
|
|
176
|
-
children: children
|
|
177
|
-
})]
|
|
176
|
+
}), titleElement]
|
|
178
177
|
});
|
|
179
178
|
}
|
|
180
|
-
return
|
|
181
|
-
ref: ref,
|
|
182
|
-
className: computedClassName,
|
|
183
|
-
style: style,
|
|
184
|
-
...props,
|
|
185
|
-
children: children
|
|
186
|
-
});
|
|
179
|
+
return titleElement;
|
|
187
180
|
});
|
|
188
181
|
DialogTitle.displayName = 'Dialog.Title';
|
|
189
182
|
|
|
190
183
|
// =============================================================================
|
|
191
|
-
// STYLED DESCRIPTION
|
|
184
|
+
// STYLED DESCRIPTION (styled-only sub-slot — reads dialog context for nativeID)
|
|
192
185
|
// =============================================================================
|
|
193
186
|
|
|
194
187
|
const DialogDescription = /*#__PURE__*/forwardRef(({
|
|
188
|
+
asChild,
|
|
195
189
|
className,
|
|
196
190
|
children,
|
|
197
191
|
style,
|
|
198
192
|
...props
|
|
199
193
|
}, ref) => {
|
|
194
|
+
const {
|
|
195
|
+
nativeID
|
|
196
|
+
} = useDialog();
|
|
200
197
|
const computedClassName = cn(dialogDescriptionVariants(), className);
|
|
201
|
-
|
|
198
|
+
const Comp = asChild ? Slot : Text;
|
|
199
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
202
200
|
ref: ref,
|
|
201
|
+
nativeID: `${nativeID}-description`,
|
|
203
202
|
className: computedClassName,
|
|
204
203
|
style: style,
|
|
205
204
|
...props,
|
|
205
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
206
|
+
slot: 'dialog-description'
|
|
207
|
+
})),
|
|
206
208
|
children: children
|
|
207
209
|
});
|
|
208
210
|
});
|
|
209
211
|
DialogDescription.displayName = 'Dialog.Description';
|
|
210
212
|
|
|
211
213
|
// =============================================================================
|
|
212
|
-
// STYLED CONTENT (
|
|
214
|
+
// STYLED CONTENT (styled-only sub-slot — reads variant context for fullBleed)
|
|
213
215
|
// =============================================================================
|
|
214
216
|
|
|
215
217
|
const DialogContent = /*#__PURE__*/forwardRef(({
|
|
218
|
+
asChild,
|
|
216
219
|
className,
|
|
217
220
|
children,
|
|
218
221
|
style,
|
|
@@ -224,53 +227,67 @@ const DialogContent = /*#__PURE__*/forwardRef(({
|
|
|
224
227
|
const computedClassName = cn(dialogContentVariants({
|
|
225
228
|
fullBleed: fullBleed ?? false
|
|
226
229
|
}), className);
|
|
227
|
-
|
|
230
|
+
const Comp = asChild ? Slot : View;
|
|
231
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
228
232
|
ref: ref,
|
|
229
233
|
className: computedClassName,
|
|
230
234
|
style: style,
|
|
231
235
|
...props,
|
|
236
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
237
|
+
slot: 'dialog-content'
|
|
238
|
+
})),
|
|
232
239
|
children: children
|
|
233
240
|
});
|
|
234
241
|
});
|
|
235
242
|
DialogContent.displayName = 'Dialog.Content';
|
|
236
243
|
|
|
237
244
|
// =============================================================================
|
|
238
|
-
// STYLED TEXT
|
|
245
|
+
// STYLED TEXT (convenience text styling, styled-only)
|
|
239
246
|
// =============================================================================
|
|
240
247
|
|
|
241
248
|
const DialogText = /*#__PURE__*/forwardRef(({
|
|
249
|
+
asChild,
|
|
242
250
|
className,
|
|
243
251
|
children,
|
|
244
252
|
style,
|
|
245
253
|
...props
|
|
246
254
|
}, ref) => {
|
|
247
255
|
const computedClassName = cn(dialogTextVariants(), className);
|
|
248
|
-
|
|
256
|
+
const Comp = asChild ? Slot : Text;
|
|
257
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
249
258
|
ref: ref,
|
|
250
259
|
className: computedClassName,
|
|
251
260
|
style: style,
|
|
252
261
|
...props,
|
|
262
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
263
|
+
slot: 'dialog-text'
|
|
264
|
+
})),
|
|
253
265
|
children: children
|
|
254
266
|
});
|
|
255
267
|
});
|
|
256
268
|
DialogText.displayName = 'Dialog.Text';
|
|
257
269
|
|
|
258
270
|
// =============================================================================
|
|
259
|
-
// STYLED FOOTER
|
|
271
|
+
// STYLED FOOTER (styled-only sub-slot)
|
|
260
272
|
// =============================================================================
|
|
261
273
|
|
|
262
274
|
const DialogFooter = /*#__PURE__*/forwardRef(({
|
|
275
|
+
asChild,
|
|
263
276
|
className,
|
|
264
277
|
children,
|
|
265
278
|
style,
|
|
266
279
|
...props
|
|
267
280
|
}, ref) => {
|
|
268
281
|
const computedClassName = cn(dialogFooterVariants(), className);
|
|
269
|
-
|
|
282
|
+
const Comp = asChild ? Slot : View;
|
|
283
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
270
284
|
ref: ref,
|
|
271
285
|
className: computedClassName,
|
|
272
286
|
style: style,
|
|
273
287
|
...props,
|
|
288
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
289
|
+
slot: 'dialog-footer'
|
|
290
|
+
})),
|
|
274
291
|
children: children
|
|
275
292
|
});
|
|
276
293
|
});
|
|
@@ -288,7 +305,7 @@ const DialogClose = /*#__PURE__*/forwardRef(({
|
|
|
288
305
|
...props
|
|
289
306
|
}, ref) => {
|
|
290
307
|
const computedClassName = cn(dialogCloseVariants(), className);
|
|
291
|
-
return /*#__PURE__*/_jsx(
|
|
308
|
+
return /*#__PURE__*/_jsx(DialogClosePrimitive, {
|
|
292
309
|
ref: ref,
|
|
293
310
|
className: computedClassName,
|
|
294
311
|
style: style,
|
|
@@ -296,6 +313,9 @@ const DialogClose = /*#__PURE__*/forwardRef(({
|
|
|
296
313
|
accessibilityRole: "button",
|
|
297
314
|
accessibilityLabel: accessibilityLabel,
|
|
298
315
|
...props,
|
|
316
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
317
|
+
slot: 'dialog-close'
|
|
318
|
+
})),
|
|
299
319
|
children: children ?? /*#__PURE__*/_jsx(Icon, {
|
|
300
320
|
as: CloseIcon,
|
|
301
321
|
className: dialogCloseIconVariants()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","
|
|
1
|
+
{"version":3,"names":["forwardRef","useMemo","Text","View","CheckCircle","Close","CloseIcon","EmergencyHome","Warning","DialogClose","DialogClosePrimitive","DialogPopup","DialogPopupPrimitive","DialogRoot","DialogRootPrimitive","DialogTrigger","DialogTriggerPrimitive","Slot","dataAttributes","mergeDataAttributes","useDialog","cn","ParentContext","useParentContext","useStyleContext","Icon","dialogCloseIconVariants","dialogCloseVariants","dialogContentVariants","dialogDescriptionVariants","dialogFooterVariants","dialogHeaderVariants","dialogOverlayVariants","dialogPopupVariants","dialogTextVariants","dialogTitleIconVariants","dialogTitleVariants","jsx","_jsx","jsxs","_jsxs","SCOPE","useDialogStyleContext","size","fullBleed","className","children","style","props","ref","parent","ctx","Provider","value","slot","displayName","sizeProp","contextSize","computedClassName","overlayClassName","DialogHeader","asChild","Comp","APPEARANCE_ICON_MAP","danger","warning","success","DialogTitle","appearance","IconComponent","titleElement","as","DialogDescription","nativeID","DialogContent","DialogText","DialogFooter","accessibilityLabel","hitSlop","accessibilityRole","Dialog","Object","assign","Trigger","Popup","Header","Title","Description","Content","Footer"],"sourceRoot":"../../../../src","sources":["components/Dialog/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,OAAO,QAAwB,OAAO;AAC3D,SAASC,IAAI,EAAEC,IAAI,QAAwC,cAAc;AACzE,SAASC,WAAW,EAAEC,KAAK,IAAIC,SAAS,EAAEC,aAAa,EAAEC,OAAO,QAAQ,eAAe;AACvF,SACEC,WAAW,IAAIC,oBAAoB,EACnCC,WAAW,IAAIC,oBAAoB,EACnCC,UAAU,IAAIC,mBAAmB,EACjCC,aAAa,IAAIC,sBAAsB,EACvCC,IAAI,EACJC,cAAc,EACdC,mBAAmB,EACnBC,SAAS,QAKJ,oBAAoB;AAC3B,SAASC,EAAE,EAAEC,aAAa,EAAEC,gBAAgB,EAAEC,eAAe,QAAQ,eAAe;AACpF,SAASC,IAAI,QAAQ,SAAS;AAC9B,SAGEC,uBAAuB,EACvBC,mBAAmB,EACnBC,qBAAqB,EACrBC,yBAAyB,EACzBC,oBAAoB,EACpBC,oBAAoB,EACpBC,qBAAqB,EACrBC,mBAAmB,EACnBC,kBAAkB,EAClBC,uBAAuB,EACvBC,mBAAmB,QACd,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAElB,SAASpB,SAAS,QAAQ,oBAAoB;;AAE9C;AACA;AACA;;AAEA,MAAMqB,KAAK,GAAG,QAAQ;AAEtB,MAAMC,qBAAqB,GAAGA,CAAA,KAAMlB,eAAe,CAACiB,KAAK,CAAuB;;AAEhF;AACA;AACA;;AAOA,MAAM5B,UAAU,gBAAGb,UAAU,CAC3B,CAAC;EAAE2C,IAAI,GAAG,IAAI;EAAEC,S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AAC8C,EAAE,EAAEjE,SAAU;MAACuC,SAAS,EAAEnB,uBAAuB,CAAC;IAAE,CAAE;EAAC,CACtD,CAAC;AAE3B,CACF,CAAC;AAEDjB,WAAW,CAAC8C,WAAW,GAAG,cAAc;;AAExC;AACA;AACA;;AAcA,OAAO,MAAMyB,MAAM,GAAGC,MAAM,CAACC,MAAM,CAACrE,UAAU,EAAE;EAC9CsE,OAAO,EAAEpE,aAAa;EACtBqE,KAAK,EAAEzE,WAAW;EAClB0E,MAAM,EAAEzB,YAAY;EACpB0B,KAAK,EAAEnB,WAAW;EAClBoB,WAAW,EAAEf,iBAAiB;EAC9BgB,OAAO,EAAEd,aAAa;EACtBxE,IAAI,EAAEyE,UAAU;EAChBc,MAAM,EAAEb,YAAY;EACpBvE,KAAK,EAAEI;AACT,CAAC,CAA4B","ignoreList":[]}
|
|
@@ -1,27 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { forwardRef } from 'react';
|
|
3
|
+
import { forwardRef, useEffect } from 'react';
|
|
4
4
|
import { Text, View } from 'react-native';
|
|
5
5
|
import { ErrorIcon } from '@cdx-ui/icons';
|
|
6
|
-
import {
|
|
7
|
-
import { cn
|
|
6
|
+
import { FieldLabel as FieldLabelPrimitive, FieldRoot as FieldRootPrimitive, Slot, dataAttributes, mergeDataAttributes, useFormControlContext } from '@cdx-ui/primitives';
|
|
7
|
+
import { cn } from '@cdx-ui/utils';
|
|
8
8
|
import { Icon } from '../Icon';
|
|
9
|
-
import {
|
|
10
|
-
import { fieldErrorIconVariants, fieldErrorTextVariants, fieldErrorVariants, fieldHelperVariants, fieldHelperTextVariants, fieldLabelVariants, fieldRootVariants } from './styles';
|
|
11
|
-
|
|
12
|
-
// =============================================================================
|
|
13
|
-
// PRIMITIVE
|
|
14
|
-
// =============================================================================
|
|
15
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
-
const FieldPrimitive = createField({
|
|
17
|
-
Root: View,
|
|
18
|
-
Label: BaseFieldLabel,
|
|
19
|
-
Helper: View,
|
|
20
|
-
HelperText: Text,
|
|
21
|
-
Error: View,
|
|
22
|
-
ErrorText: Text,
|
|
23
|
-
ErrorIcon: View
|
|
24
|
-
});
|
|
9
|
+
import { fieldErrorIconVariants, fieldErrorTextVariants, fieldErrorVariants, fieldHelperTextVariants, fieldHelperVariants, fieldLabelVariants, fieldRootVariants } from './styles';
|
|
25
10
|
|
|
26
11
|
// =============================================================================
|
|
27
12
|
// FIELD ROOT
|
|
@@ -30,7 +15,7 @@ const FieldPrimitive = createField({
|
|
|
30
15
|
/**
|
|
31
16
|
* Field wrapper + context. For **initial focus**, pass `autoFocus` on `Input.Field` (not here).
|
|
32
17
|
*/
|
|
33
|
-
|
|
18
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
34
19
|
const FieldRoot = /*#__PURE__*/forwardRef(({
|
|
35
20
|
className,
|
|
36
21
|
children,
|
|
@@ -38,11 +23,14 @@ const FieldRoot = /*#__PURE__*/forwardRef(({
|
|
|
38
23
|
...props
|
|
39
24
|
}, ref) => {
|
|
40
25
|
const computedClassName = cn(fieldRootVariants(), className);
|
|
41
|
-
return /*#__PURE__*/_jsx(
|
|
26
|
+
return /*#__PURE__*/_jsx(FieldRootPrimitive, {
|
|
42
27
|
ref: ref,
|
|
43
28
|
className: computedClassName,
|
|
44
29
|
style: style,
|
|
45
30
|
...props,
|
|
31
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
32
|
+
slot: 'field'
|
|
33
|
+
})),
|
|
46
34
|
children: children
|
|
47
35
|
});
|
|
48
36
|
});
|
|
@@ -66,7 +54,7 @@ const FieldLabel = /*#__PURE__*/forwardRef(({
|
|
|
66
54
|
// Native: inject text-content-action via context (group-has CSS handles web).
|
|
67
55
|
// native: prefix keeps this class inert on web so it never conflicts with text-content-primary.
|
|
68
56
|
const labelClassName = cn(fieldLabelVariants(), isLabelFocused && !isInvalid && 'native:text-content-action', className);
|
|
69
|
-
return /*#__PURE__*/_jsx(
|
|
57
|
+
return /*#__PURE__*/_jsx(FieldLabelPrimitive, {
|
|
70
58
|
ref: ref,
|
|
71
59
|
className: labelClassName,
|
|
72
60
|
style: style,
|
|
@@ -77,29 +65,56 @@ const FieldLabel = /*#__PURE__*/forwardRef(({
|
|
|
77
65
|
children: ' *'
|
|
78
66
|
}),
|
|
79
67
|
...props,
|
|
68
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
69
|
+
slot: 'field-label'
|
|
70
|
+
})),
|
|
80
71
|
children: children
|
|
81
72
|
});
|
|
82
73
|
});
|
|
83
74
|
FieldLabel.displayName = 'Field.Label';
|
|
84
75
|
|
|
85
76
|
// =============================================================================
|
|
86
|
-
// FIELD HELPER
|
|
77
|
+
// FIELD HELPER (styled-only — reads form context directly)
|
|
87
78
|
// =============================================================================
|
|
88
79
|
|
|
89
80
|
const FieldHelper = /*#__PURE__*/forwardRef(({
|
|
81
|
+
asChild,
|
|
90
82
|
className,
|
|
91
83
|
children,
|
|
92
84
|
style,
|
|
93
85
|
...props
|
|
94
86
|
}, ref) => {
|
|
87
|
+
const {
|
|
88
|
+
helpTextId,
|
|
89
|
+
setHasHelpText,
|
|
90
|
+
isInvalid
|
|
91
|
+
} = useFormControlContext();
|
|
92
|
+
useEffect(() => {
|
|
93
|
+
if (isInvalid) {
|
|
94
|
+
setHasHelpText?.(false);
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
97
|
+
setHasHelpText?.(true);
|
|
98
|
+
return () => {
|
|
99
|
+
setHasHelpText?.(false);
|
|
100
|
+
};
|
|
101
|
+
}, [setHasHelpText, isInvalid]);
|
|
102
|
+
if (isInvalid) {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
95
105
|
const containerClassName = cn(fieldHelperVariants(), className);
|
|
96
106
|
const textClassName = cn(fieldHelperTextVariants());
|
|
97
|
-
|
|
107
|
+
const Comp = asChild ? Slot : View;
|
|
108
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
98
109
|
ref: ref,
|
|
99
110
|
className: containerClassName,
|
|
100
111
|
style: style,
|
|
101
112
|
...props,
|
|
102
|
-
|
|
113
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
114
|
+
slot: 'field-helper'
|
|
115
|
+
})),
|
|
116
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
117
|
+
id: helpTextId,
|
|
103
118
|
className: textClassName,
|
|
104
119
|
children: children
|
|
105
120
|
})
|
|
@@ -108,7 +123,7 @@ const FieldHelper = /*#__PURE__*/forwardRef(({
|
|
|
108
123
|
FieldHelper.displayName = 'Field.Helper';
|
|
109
124
|
|
|
110
125
|
// =============================================================================
|
|
111
|
-
// FIELD ERROR (
|
|
126
|
+
// FIELD ERROR (styled-only — reads form context directly)
|
|
112
127
|
// =============================================================================
|
|
113
128
|
|
|
114
129
|
const FieldErrorIcon = ({
|
|
@@ -122,26 +137,54 @@ const FieldErrorIcon = ({
|
|
|
122
137
|
className: computedClassName,
|
|
123
138
|
style: style,
|
|
124
139
|
"aria-hidden": true,
|
|
125
|
-
...props
|
|
140
|
+
...props,
|
|
141
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
142
|
+
slot: 'field-error-icon'
|
|
143
|
+
}))
|
|
126
144
|
});
|
|
127
145
|
};
|
|
128
146
|
FieldErrorIcon.displayName = 'Field.ErrorIcon';
|
|
129
147
|
const FieldError = /*#__PURE__*/forwardRef(({
|
|
148
|
+
asChild,
|
|
130
149
|
className,
|
|
131
150
|
children,
|
|
132
151
|
style,
|
|
133
152
|
...props
|
|
134
153
|
}, ref) => {
|
|
154
|
+
const {
|
|
155
|
+
isInvalid,
|
|
156
|
+
feedbackId,
|
|
157
|
+
setHasFeedbackText
|
|
158
|
+
} = useFormControlContext();
|
|
159
|
+
const visible = Boolean(isInvalid && children);
|
|
160
|
+
useEffect(() => {
|
|
161
|
+
if (!visible) {
|
|
162
|
+
setHasFeedbackText?.(false);
|
|
163
|
+
return undefined;
|
|
164
|
+
}
|
|
165
|
+
setHasFeedbackText?.(true);
|
|
166
|
+
return () => {
|
|
167
|
+
setHasFeedbackText?.(false);
|
|
168
|
+
};
|
|
169
|
+
}, [setHasFeedbackText, visible]);
|
|
170
|
+
if (!visible) {
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
135
173
|
const containerClassName = cn(fieldErrorVariants(), className);
|
|
136
174
|
const textClassName = cn(fieldErrorTextVariants());
|
|
137
|
-
|
|
175
|
+
const Comp = asChild ? Slot : View;
|
|
176
|
+
return /*#__PURE__*/_jsxs(Comp, {
|
|
138
177
|
ref: ref,
|
|
178
|
+
id: feedbackId,
|
|
179
|
+
accessibilityRole: "alert",
|
|
180
|
+
accessibilityLiveRegion: "assertive",
|
|
139
181
|
className: containerClassName,
|
|
140
182
|
style: style,
|
|
141
183
|
...props,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}),
|
|
184
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
185
|
+
slot: 'field-error'
|
|
186
|
+
})),
|
|
187
|
+
children: [/*#__PURE__*/_jsx(FieldErrorIcon, {}), /*#__PURE__*/_jsx(Text, {
|
|
145
188
|
className: textClassName,
|
|
146
189
|
children: children
|
|
147
190
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","Text","View","ErrorIcon","
|
|
1
|
+
{"version":3,"names":["forwardRef","useEffect","Text","View","ErrorIcon","FieldLabel","FieldLabelPrimitive","FieldRoot","FieldRootPrimitive","Slot","dataAttributes","mergeDataAttributes","useFormControlContext","cn","Icon","fieldErrorIconVariants","fieldErrorTextVariants","fieldErrorVariants","fieldHelperTextVariants","fieldHelperVariants","fieldLabelVariants","fieldRootVariants","jsx","_jsx","jsxs","_jsxs","className","children","style","props","ref","computedClassName","slot","displayName","htmlFor","isLabelFocused","isInvalid","labelClassName","requiredIndicator","FieldHelper","asChild","helpTextId","setHasHelpText","undefined","containerClassName","textClassName","Comp","id","FieldErrorIcon","as","FieldError","feedbackId","setHasFeedbackText","visible","Boolean","accessibilityRole","accessibilityLiveRegion","Field","Object","assign","Label","Helper","Error"],"sourceRoot":"../../../../src","sources":["components/Field/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,SAAS,QAAwB,OAAO;AAC7D,SAASC,IAAI,EAAkBC,IAAI,QAAwB,cAAc;AACzE,SAASC,SAAS,QAAQ,eAAe;AACzC,SACEC,UAAU,IAAIC,mBAAmB,EACjCC,SAAS,IAAIC,kBAAkB,EAC/BC,IAAI,EACJC,cAAc,EACdC,mBAAmB,EACnBC,qBAAqB,QAGhB,oBAAoB;AAC3B,SAASC,EAAE,QAAQ,eAAe;AAClC,SAASC,IAAI,QAAQ,SAAS;AAC9B,SACEC,sBAAsB,EACtBC,sBAAsB,EACtBC,kBAAkB,EAClBC,uBAAuB,EACvBC,mBAAmB,EACnBC,kBAAkB,EAClBC,iBAAiB,QAKZ,UAAU;;AAEjB;AACA;AACA;;AAEA;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAKA,MAAMlB,SAAS,gBAAGP,UAAU,CAC1B,CAAC;EAAE0B,SAAS;EAAEC,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACjD,MAAMC,iBAAiB,GAAGlB,EAAE,CAACQ,iBAAiB,CAAC,CAAC,EAAEK,SAAS,CAAC;EAE5D,oBACEH,IAAA,CAACf,kBAAkB;IACjBsB,GAAG,EAAEA,GAAI;IACTJ,SAAS,EAAEK,iBAAkB;IAC7BH,KAAK,EAAEA,KAAM;IAAA,GACTC,KAAK;IAAA,GACLlB,mBAAmB,CAACkB,KAAK,EAAEnB,cAAc,CAAC;MAAEsB,IAAI,EAAE;IAAQ,CAAC,CAAC,CAAC;IAAAL,QAAA,EAEhEA;EAAQ,CACS,CAAC;AAEzB,CACF,CAAC;AAEDpB,SAAS,CAAC0B,WAAW,GAAG,OAAO;;AAE/B;AACA;AAC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