@cdx-ui/components 0.0.1-beta.50 → 0.0.1-beta.52
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 +4 -3
- package/lib/commonjs/components/AlertDialog/index.js.map +1 -1
- package/lib/commonjs/components/Button/index.js +4 -0
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Button/styles.js +59 -0
- package/lib/commonjs/components/Button/styles.js.map +1 -1
- package/lib/commonjs/components/Dialog/index.js +71 -16
- package/lib/commonjs/components/Dialog/index.js.map +1 -1
- package/lib/commonjs/components/Dialog/styles.js +60 -14
- package/lib/commonjs/components/Dialog/styles.js.map +1 -1
- package/lib/commonjs/figma/AlertDialog.Description.figma.js +20 -0
- package/lib/commonjs/figma/AlertDialog.Description.figma.js.map +1 -0
- package/lib/commonjs/figma/AlertDialog.Footer.figma.js +41 -0
- package/lib/commonjs/figma/AlertDialog.Footer.figma.js.map +1 -0
- package/lib/commonjs/figma/AlertDialog.Header.figma.js +28 -0
- package/lib/commonjs/figma/AlertDialog.Header.figma.js.map +1 -0
- package/lib/commonjs/figma/AlertDialog.Text.figma.js +20 -0
- package/lib/commonjs/figma/AlertDialog.Text.figma.js.map +1 -0
- package/lib/commonjs/figma/AlertDialog.Title.figma.js +27 -0
- package/lib/commonjs/figma/AlertDialog.Title.figma.js.map +1 -0
- package/lib/commonjs/figma/AlertDialog.figma.js +43 -0
- package/lib/commonjs/figma/AlertDialog.figma.js.map +1 -0
- package/lib/commonjs/figma/Dialog.Description.figma.js +20 -0
- package/lib/commonjs/figma/Dialog.Description.figma.js.map +1 -0
- package/lib/commonjs/figma/Dialog.Footer.figma.js +30 -0
- package/lib/commonjs/figma/Dialog.Footer.figma.js.map +1 -0
- package/lib/commonjs/figma/Dialog.Header.figma.js +29 -0
- package/lib/commonjs/figma/Dialog.Header.figma.js.map +1 -0
- package/lib/commonjs/figma/Dialog.Text.figma.js +20 -0
- package/lib/commonjs/figma/Dialog.Text.figma.js.map +1 -0
- package/lib/commonjs/figma/Dialog.Title.figma.js +27 -0
- package/lib/commonjs/figma/Dialog.Title.figma.js.map +1 -0
- package/lib/commonjs/figma/Dialog.figma.js +51 -0
- package/lib/commonjs/figma/Dialog.figma.js.map +1 -0
- package/lib/commonjs/hooks/index.js +19 -0
- package/lib/commonjs/hooks/index.js.map +1 -0
- package/lib/commonjs/hooks/useForgeBottomTabScreenOptions.js +246 -0
- package/lib/commonjs/hooks/useForgeBottomTabScreenOptions.js.map +1 -0
- package/lib/commonjs/index.js +24 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/navigation/forgeTabIcon.js +43 -0
- package/lib/commonjs/navigation/forgeTabIcon.js.map +1 -0
- package/lib/commonjs/navigation/forgeTabIcon.native.js +35 -0
- package/lib/commonjs/navigation/forgeTabIcon.native.js.map +1 -0
- package/lib/commonjs/navigation/index.js +13 -0
- package/lib/commonjs/navigation/index.js.map +1 -0
- package/lib/commonjs/navigation/types.js +40 -0
- package/lib/commonjs/navigation/types.js.map +1 -0
- package/lib/module/components/AlertDialog/index.js +4 -3
- package/lib/module/components/AlertDialog/index.js.map +1 -1
- package/lib/module/components/Button/index.js +4 -0
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Button/styles.js +59 -0
- package/lib/module/components/Button/styles.js.map +1 -1
- package/lib/module/components/Dialog/index.js +74 -19
- package/lib/module/components/Dialog/index.js.map +1 -1
- package/lib/module/components/Dialog/styles.js +60 -14
- package/lib/module/components/Dialog/styles.js.map +1 -1
- package/lib/module/figma/AlertDialog.Description.figma.js +14 -0
- package/lib/module/figma/AlertDialog.Description.figma.js.map +1 -0
- package/lib/module/figma/AlertDialog.Footer.figma.js +35 -0
- package/lib/module/figma/AlertDialog.Footer.figma.js.map +1 -0
- package/lib/module/figma/AlertDialog.Header.figma.js +22 -0
- package/lib/module/figma/AlertDialog.Header.figma.js.map +1 -0
- package/lib/module/figma/AlertDialog.Text.figma.js +14 -0
- package/lib/module/figma/AlertDialog.Text.figma.js.map +1 -0
- package/lib/module/figma/AlertDialog.Title.figma.js +21 -0
- package/lib/module/figma/AlertDialog.Title.figma.js.map +1 -0
- package/lib/module/figma/AlertDialog.figma.js +37 -0
- package/lib/module/figma/AlertDialog.figma.js.map +1 -0
- package/lib/module/figma/Dialog.Description.figma.js +14 -0
- package/lib/module/figma/Dialog.Description.figma.js.map +1 -0
- package/lib/module/figma/Dialog.Footer.figma.js +24 -0
- package/lib/module/figma/Dialog.Footer.figma.js.map +1 -0
- package/lib/module/figma/Dialog.Header.figma.js +23 -0
- package/lib/module/figma/Dialog.Header.figma.js.map +1 -0
- package/lib/module/figma/Dialog.Text.figma.js +14 -0
- package/lib/module/figma/Dialog.Text.figma.js.map +1 -0
- package/lib/module/figma/Dialog.Title.figma.js +21 -0
- package/lib/module/figma/Dialog.Title.figma.js.map +1 -0
- package/lib/module/figma/Dialog.figma.js +45 -0
- package/lib/module/figma/Dialog.figma.js.map +1 -0
- package/lib/module/hooks/index.js +4 -0
- package/lib/module/hooks/index.js.map +1 -0
- package/lib/module/hooks/useForgeBottomTabScreenOptions.js +242 -0
- package/lib/module/hooks/useForgeBottomTabScreenOptions.js.map +1 -0
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigation/forgeTabIcon.js +39 -0
- package/lib/module/navigation/forgeTabIcon.js.map +1 -0
- package/lib/module/navigation/forgeTabIcon.native.js +31 -0
- package/lib/module/navigation/forgeTabIcon.native.js.map +1 -0
- package/lib/module/navigation/index.js +4 -0
- package/lib/module/navigation/index.js.map +1 -0
- package/lib/module/navigation/types.js +38 -0
- package/lib/module/navigation/types.js.map +1 -0
- package/lib/typescript/components/AlertDialog/index.d.ts +3 -2
- package/lib/typescript/components/AlertDialog/index.d.ts.map +1 -1
- package/lib/typescript/components/Avatar/styles.d.ts +4 -4
- package/lib/typescript/components/Button/styles.d.ts +2 -0
- package/lib/typescript/components/Button/styles.d.ts.map +1 -1
- package/lib/typescript/components/Dialog/index.d.ts +16 -10
- package/lib/typescript/components/Dialog/index.d.ts.map +1 -1
- package/lib/typescript/components/Dialog/styles.d.ts +16 -5
- package/lib/typescript/components/Dialog/styles.d.ts.map +1 -1
- package/lib/typescript/components/Heading/styles.d.ts +1 -1
- package/lib/typescript/components/Stack/styles.d.ts +2 -2
- package/lib/typescript/components/Text/styles.d.ts +1 -1
- package/lib/typescript/figma/AlertDialog.Description.figma.d.ts +8 -0
- package/lib/typescript/figma/AlertDialog.Description.figma.d.ts.map +1 -0
- package/lib/typescript/figma/AlertDialog.Footer.figma.d.ts +8 -0
- package/lib/typescript/figma/AlertDialog.Footer.figma.d.ts.map +1 -0
- package/lib/typescript/figma/AlertDialog.Header.figma.d.ts +8 -0
- package/lib/typescript/figma/AlertDialog.Header.figma.d.ts.map +1 -0
- package/lib/typescript/figma/AlertDialog.Text.figma.d.ts +8 -0
- package/lib/typescript/figma/AlertDialog.Text.figma.d.ts.map +1 -0
- package/lib/typescript/figma/AlertDialog.Title.figma.d.ts +8 -0
- package/lib/typescript/figma/AlertDialog.Title.figma.d.ts.map +1 -0
- package/lib/typescript/figma/AlertDialog.figma.d.ts +8 -0
- package/lib/typescript/figma/AlertDialog.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Dialog.Description.figma.d.ts +8 -0
- package/lib/typescript/figma/Dialog.Description.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Dialog.Footer.figma.d.ts +8 -0
- package/lib/typescript/figma/Dialog.Footer.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Dialog.Header.figma.d.ts +8 -0
- package/lib/typescript/figma/Dialog.Header.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Dialog.Text.figma.d.ts +8 -0
- package/lib/typescript/figma/Dialog.Text.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Dialog.Title.figma.d.ts +8 -0
- package/lib/typescript/figma/Dialog.Title.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Dialog.figma.d.ts +8 -0
- package/lib/typescript/figma/Dialog.figma.d.ts.map +1 -0
- package/lib/typescript/hooks/index.d.ts +2 -0
- package/lib/typescript/hooks/index.d.ts.map +1 -0
- package/lib/typescript/hooks/useForgeBottomTabScreenOptions.d.ts +137 -0
- package/lib/typescript/hooks/useForgeBottomTabScreenOptions.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/navigation/forgeTabIcon.d.ts +27 -0
- package/lib/typescript/navigation/forgeTabIcon.d.ts.map +1 -0
- package/lib/typescript/navigation/forgeTabIcon.native.d.ts +15 -0
- package/lib/typescript/navigation/forgeTabIcon.native.d.ts.map +1 -0
- package/lib/typescript/navigation/index.d.ts +4 -0
- package/lib/typescript/navigation/index.d.ts.map +1 -0
- package/lib/typescript/navigation/types.d.ts +37 -0
- package/lib/typescript/navigation/types.d.ts.map +1 -0
- package/package.json +6 -4
- package/src/components/AlertDialog/index.tsx +7 -5
- package/src/components/Button/index.tsx +2 -2
- package/src/components/Button/styles.ts +29 -0
- package/src/components/Dialog/index.tsx +95 -29
- package/src/components/Dialog/styles.ts +72 -30
- package/src/hooks/index.ts +5 -0
- package/src/hooks/useForgeBottomTabScreenOptions.ts +245 -0
- package/src/index.ts +2 -0
- package/src/navigation/forgeTabIcon.native.ts +36 -0
- package/src/navigation/forgeTabIcon.ts +33 -0
- package/src/navigation/index.ts +3 -0
- package/src/navigation/types.ts +55 -0
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { Pressable, Text, View } from 'react-native';
|
|
5
|
-
import { Close as CloseIcon } from '@cdx-ui/icons';
|
|
5
|
+
import { CheckCircle, Close as CloseIcon, EmergencyHome, Warning } from '@cdx-ui/icons';
|
|
6
6
|
import { createDialog } from '@cdx-ui/primitives';
|
|
7
7
|
import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
|
|
8
8
|
import { Icon } from '../Icon';
|
|
9
|
-
import {
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
import { dialogCloseIconVariants, dialogCloseVariants, dialogContentVariants, dialogDescriptionVariants, dialogFooterVariants, dialogHeaderVariants, dialogOverlayVariants, dialogPopupVariants, dialogTextVariants, dialogTitleIconVariants, dialogTitleVariants } from './styles';
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
11
|
export { useDialog } from '@cdx-ui/primitives';
|
|
12
12
|
|
|
13
13
|
// =============================================================================
|
|
@@ -40,11 +40,11 @@ const DialogPrimitive = createDialog({
|
|
|
40
40
|
Root,
|
|
41
41
|
Trigger: Pressable,
|
|
42
42
|
Overlay: StyledOverlay,
|
|
43
|
-
|
|
43
|
+
Popup: View,
|
|
44
44
|
Header: View,
|
|
45
45
|
Title: Text,
|
|
46
46
|
Description: Text,
|
|
47
|
-
|
|
47
|
+
Content: View,
|
|
48
48
|
Footer: View,
|
|
49
49
|
Close: Pressable
|
|
50
50
|
});
|
|
@@ -55,6 +55,7 @@ const DialogPrimitive = createDialog({
|
|
|
55
55
|
|
|
56
56
|
const DialogRoot = /*#__PURE__*/forwardRef(({
|
|
57
57
|
size = 'md',
|
|
58
|
+
fullBleed = false,
|
|
58
59
|
className,
|
|
59
60
|
children,
|
|
60
61
|
style,
|
|
@@ -64,7 +65,8 @@ const DialogRoot = /*#__PURE__*/forwardRef(({
|
|
|
64
65
|
className: className,
|
|
65
66
|
style: style,
|
|
66
67
|
context: {
|
|
67
|
-
size
|
|
68
|
+
size,
|
|
69
|
+
fullBleed
|
|
68
70
|
},
|
|
69
71
|
...props,
|
|
70
72
|
children: children
|
|
@@ -90,10 +92,10 @@ const DialogTrigger = /*#__PURE__*/forwardRef(({
|
|
|
90
92
|
DialogTrigger.displayName = 'Dialog.Trigger';
|
|
91
93
|
|
|
92
94
|
// =============================================================================
|
|
93
|
-
// STYLED
|
|
95
|
+
// STYLED POPUP (wraps DialogPrimitive.Popup)
|
|
94
96
|
// =============================================================================
|
|
95
97
|
|
|
96
|
-
const
|
|
98
|
+
const DialogPopup = /*#__PURE__*/forwardRef(({
|
|
97
99
|
size: sizeProp,
|
|
98
100
|
className,
|
|
99
101
|
children,
|
|
@@ -104,10 +106,10 @@ const DialogContent = /*#__PURE__*/forwardRef(({
|
|
|
104
106
|
size: contextSize
|
|
105
107
|
} = useDialogStyleContext();
|
|
106
108
|
const size = sizeProp ?? contextSize;
|
|
107
|
-
const computedClassName = cn(
|
|
109
|
+
const computedClassName = cn(dialogPopupVariants({
|
|
108
110
|
size
|
|
109
111
|
}), className);
|
|
110
|
-
return /*#__PURE__*/_jsx(DialogPrimitive.
|
|
112
|
+
return /*#__PURE__*/_jsx(DialogPrimitive.Popup, {
|
|
111
113
|
ref: ref,
|
|
112
114
|
className: computedClassName,
|
|
113
115
|
style: style,
|
|
@@ -115,7 +117,7 @@ const DialogContent = /*#__PURE__*/forwardRef(({
|
|
|
115
117
|
children: children
|
|
116
118
|
});
|
|
117
119
|
});
|
|
118
|
-
|
|
120
|
+
DialogPopup.displayName = 'Dialog.Popup';
|
|
119
121
|
|
|
120
122
|
// =============================================================================
|
|
121
123
|
// STYLED HEADER
|
|
@@ -142,13 +144,39 @@ DialogHeader.displayName = 'Dialog.Header';
|
|
|
142
144
|
// STYLED TITLE
|
|
143
145
|
// =============================================================================
|
|
144
146
|
|
|
147
|
+
const APPEARANCE_ICON_MAP = {
|
|
148
|
+
danger: EmergencyHome,
|
|
149
|
+
warning: Warning,
|
|
150
|
+
success: CheckCircle
|
|
151
|
+
};
|
|
145
152
|
const DialogTitle = /*#__PURE__*/forwardRef(({
|
|
153
|
+
appearance = 'default',
|
|
146
154
|
className,
|
|
147
155
|
children,
|
|
148
156
|
style,
|
|
149
157
|
...props
|
|
150
158
|
}, ref) => {
|
|
151
|
-
const computedClassName = cn(dialogTitleVariants(
|
|
159
|
+
const computedClassName = cn(dialogTitleVariants({
|
|
160
|
+
appearance
|
|
161
|
+
}), className);
|
|
162
|
+
const IconComponent = appearance && appearance in APPEARANCE_ICON_MAP ? APPEARANCE_ICON_MAP[appearance] : null;
|
|
163
|
+
if (IconComponent) {
|
|
164
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
165
|
+
className: "flex-row items-center gap-1",
|
|
166
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
167
|
+
as: IconComponent,
|
|
168
|
+
className: dialogTitleIconVariants({
|
|
169
|
+
appearance
|
|
170
|
+
})
|
|
171
|
+
}), /*#__PURE__*/_jsx(DialogPrimitive.Title, {
|
|
172
|
+
ref: ref,
|
|
173
|
+
className: computedClassName,
|
|
174
|
+
style: style,
|
|
175
|
+
...props,
|
|
176
|
+
children: children
|
|
177
|
+
})]
|
|
178
|
+
});
|
|
179
|
+
}
|
|
152
180
|
return /*#__PURE__*/_jsx(DialogPrimitive.Title, {
|
|
153
181
|
ref: ref,
|
|
154
182
|
className: computedClassName,
|
|
@@ -181,17 +209,22 @@ const DialogDescription = /*#__PURE__*/forwardRef(({
|
|
|
181
209
|
DialogDescription.displayName = 'Dialog.Description';
|
|
182
210
|
|
|
183
211
|
// =============================================================================
|
|
184
|
-
// STYLED
|
|
212
|
+
// STYLED CONTENT (wraps DialogPrimitive.Content)
|
|
185
213
|
// =============================================================================
|
|
186
214
|
|
|
187
|
-
const
|
|
215
|
+
const DialogContent = /*#__PURE__*/forwardRef(({
|
|
188
216
|
className,
|
|
189
217
|
children,
|
|
190
218
|
style,
|
|
191
219
|
...props
|
|
192
220
|
}, ref) => {
|
|
193
|
-
const
|
|
194
|
-
|
|
221
|
+
const {
|
|
222
|
+
fullBleed
|
|
223
|
+
} = useDialogStyleContext();
|
|
224
|
+
const computedClassName = cn(dialogContentVariants({
|
|
225
|
+
fullBleed: fullBleed ?? false
|
|
226
|
+
}), className);
|
|
227
|
+
return /*#__PURE__*/_jsx(DialogPrimitive.Content, {
|
|
195
228
|
ref: ref,
|
|
196
229
|
className: computedClassName,
|
|
197
230
|
style: style,
|
|
@@ -199,7 +232,28 @@ const DialogBody = /*#__PURE__*/forwardRef(({
|
|
|
199
232
|
children: children
|
|
200
233
|
});
|
|
201
234
|
});
|
|
202
|
-
|
|
235
|
+
DialogContent.displayName = 'Dialog.Content';
|
|
236
|
+
|
|
237
|
+
// =============================================================================
|
|
238
|
+
// STYLED TEXT
|
|
239
|
+
// =============================================================================
|
|
240
|
+
|
|
241
|
+
const DialogText = /*#__PURE__*/forwardRef(({
|
|
242
|
+
className,
|
|
243
|
+
children,
|
|
244
|
+
style,
|
|
245
|
+
...props
|
|
246
|
+
}, ref) => {
|
|
247
|
+
const computedClassName = cn(dialogTextVariants(), className);
|
|
248
|
+
return /*#__PURE__*/_jsx(Text, {
|
|
249
|
+
ref: ref,
|
|
250
|
+
className: computedClassName,
|
|
251
|
+
style: style,
|
|
252
|
+
...props,
|
|
253
|
+
children: children
|
|
254
|
+
});
|
|
255
|
+
});
|
|
256
|
+
DialogText.displayName = 'Dialog.Text';
|
|
203
257
|
|
|
204
258
|
// =============================================================================
|
|
205
259
|
// STYLED FOOTER
|
|
@@ -256,11 +310,12 @@ DialogClose.displayName = 'Dialog.Close';
|
|
|
256
310
|
|
|
257
311
|
export const Dialog = Object.assign(DialogRoot, {
|
|
258
312
|
Trigger: DialogTrigger,
|
|
259
|
-
|
|
313
|
+
Popup: DialogPopup,
|
|
260
314
|
Header: DialogHeader,
|
|
261
315
|
Title: DialogTitle,
|
|
262
316
|
Description: DialogDescription,
|
|
263
|
-
|
|
317
|
+
Content: DialogContent,
|
|
318
|
+
Text: DialogText,
|
|
264
319
|
Footer: DialogFooter,
|
|
265
320
|
Close: DialogClose
|
|
266
321
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","Pressable","Text","View","Close","CloseIcon","createDialog","cn","useStyleContext","withStyleContext","Icon","
|
|
1
|
+
{"version":3,"names":["forwardRef","Pressable","Text","View","CheckCircle","Close","CloseIcon","EmergencyHome","Warning","createDialog","cn","useStyleContext","withStyleContext","Icon","dialogCloseIconVariants","dialogCloseVariants","dialogContentVariants","dialogDescriptionVariants","dialogFooterVariants","dialogHeaderVariants","dialogOverlayVariants","dialogPopupVariants","dialogTextVariants","dialogTitleIconVariants","dialogTitleVariants","jsx","_jsx","jsxs","_jsxs","useDialog","SCOPE","Root","useDialogStyleContext","StyledOverlay","className","props","ref","displayName","DialogPrimitive","Trigger","Overlay","Popup","Header","Title","Description","Content","Footer","DialogRoot","size","fullBleed","children","style","context","DialogTrigger","DialogPopup","sizeProp","contextSize","computedClassName","DialogHeader","APPEARANCE_ICON_MAP","danger","warning","success","DialogTitle","appearance","IconComponent","as","DialogDescription","DialogContent","DialogText","DialogFooter","DialogClose","accessibilityLabel","hitSlop","accessibilityRole","Dialog","Object","assign"],"sourceRoot":"../../../../src","sources":["components/Dialog/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAClD,SACEC,SAAS,EACTC,IAAI,EACJC,IAAI,QAIC,cAAc;AACrB,SAASC,WAAW,EAAEC,KAAK,IAAIC,SAAS,EAAEC,aAAa,EAAEC,OAAO,QAAQ,eAAe;AACvF,SACEC,YAAY,QAUP,oBAAoB;AAC3B,SAASC,EAAE,EAAEC,eAAe,EAAEC,gBAAgB,QAAQ,eAAe;AACrE,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,SAASC,SAAS,QAAQ,oBAAoB;;AAE9C;AACA;AACA;;AAEA,MAAMC,KAAK,GAAG,QAAQ;AAEtB,MAAMC,IAAI,GAAGnB,gBAAg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/C,EAAE,CAACK,mBAAmB,CAAC,CAAC,EAAEmB,SAAS,CAAC;EAE9D,oBACER,IAAA,CAACY,eAAe,CAACjC,KAAK;IACpB+B,GAAG,EAAEA,GAAI;IACTF,SAAS,EAAEuB,iBAAkB;IAC7BN,KAAK,EAAEA,KAAM;IACbsB,OAAO,EAAE,EAAG;IACZC,iBAAiB,EAAC,QAAQ;IAC1BF,kBAAkB,EAAEA,kBAAmB;IAAA,GACnCrC,KAAK;IAAAe,QAAA,EAERA,QAAQ,iBAAIxB,IAAA,CAACb,IAAI;MAACqD,EAAE,EAAE5D,SAAU;MAAC4B,SAAS,EAAEpB,uBAAuB,CAAC;IAAE,CAAE;EAAC,CACrD,CAAC;AAE5B,CACF,CAAC;AAEDyD,WAAW,CAAClC,WAAW,GAAG,cAAc;;AAExC;AACA;AACA;;AAcA,OAAO,MAAMsC,MAAM,GAAGC,MAAM,CAACC,MAAM,CAAC9B,UAAU,EAAE;EAC9CR,OAAO,EAAEc,aAAa;EACtBZ,KAAK,EAAEa,WAAW;EAClBZ,MAAM,EAAEgB,YAAY;EACpBf,KAAK,EAAEoB,WAAW;EAClBnB,WAAW,EAAEuB,iBAAiB;EAC9BtB,OAAO,EAAEuB,aAAa;EACtBlE,IAAI,EAAEmE,UAAU;EAChBvB,MAAM,EAAEwB,YAAY;EACpBjE,KAAK,EAAEkE;AACT,CAAC,CAA4B","ignoreList":[]}
|
|
@@ -2,23 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
import { Platform } from 'react-native';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
|
-
import {
|
|
5
|
+
import { TRANSITION_COLORS } from '../../styles/primitives';
|
|
6
6
|
|
|
7
7
|
// ── Overlay ─────────────────────────────────────────────────
|
|
8
8
|
|
|
9
|
-
export const dialogOverlayVariants = cva(['absolute inset-0',
|
|
9
|
+
export const dialogOverlayVariants = cva(['absolute inset-0', 'bg-surface-backdrop']);
|
|
10
10
|
|
|
11
|
-
// ──
|
|
11
|
+
// ── Popup (renamed from dialogContentVariants) ──────────────
|
|
12
12
|
|
|
13
|
-
export const
|
|
14
|
-
web:
|
|
13
|
+
export const dialogPopupVariants = cva(['bg-surface-primary', 'rounded-lg', Platform.select({
|
|
14
|
+
web: 'shadow-lg',
|
|
15
15
|
default: ''
|
|
16
16
|
}), 'max-h-[85vh] overflow-hidden'], {
|
|
17
17
|
variants: {
|
|
18
18
|
size: {
|
|
19
|
+
xs: 'w-[90%] max-w-xs',
|
|
19
20
|
sm: 'w-[90%] max-w-sm',
|
|
20
21
|
md: 'w-[90%] max-w-md',
|
|
21
22
|
lg: 'w-[90%] max-w-lg',
|
|
23
|
+
xl: 'w-[90%] max-w-xl',
|
|
22
24
|
full: 'w-full mx-4'
|
|
23
25
|
}
|
|
24
26
|
},
|
|
@@ -29,32 +31,76 @@ export const dialogContentVariants = cva([COLOR_BG_PRIMARY, `border ${COLOR_BORD
|
|
|
29
31
|
|
|
30
32
|
// ── Header ──────────────────────────────────────────────────
|
|
31
33
|
|
|
32
|
-
export const dialogHeaderVariants = cva(['flex-
|
|
34
|
+
export const dialogHeaderVariants = cva(['flex-col items-start justify-between shrink-0', 'pl-6 pr-14 py-4']);
|
|
33
35
|
|
|
34
36
|
// ── Title ───────────────────────────────────────────────────
|
|
35
37
|
|
|
36
|
-
export const dialogTitleVariants = cva(['
|
|
38
|
+
export const dialogTitleVariants = cva(['heading-sm', 'text-content-primary'], {
|
|
39
|
+
variants: {
|
|
40
|
+
appearance: {
|
|
41
|
+
default: '',
|
|
42
|
+
danger: '',
|
|
43
|
+
warning: '',
|
|
44
|
+
success: ''
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
defaultVariants: {
|
|
48
|
+
appearance: 'default'
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// ── Title Icon ──────────────────────────────────────────────
|
|
53
|
+
|
|
54
|
+
export const dialogTitleIconVariants = cva(['size-5'], {
|
|
55
|
+
variants: {
|
|
56
|
+
appearance: {
|
|
57
|
+
default: '',
|
|
58
|
+
danger: 'text-content-danger',
|
|
59
|
+
warning: 'text-content-warning',
|
|
60
|
+
success: 'text-content-success'
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
defaultVariants: {
|
|
64
|
+
appearance: 'default'
|
|
65
|
+
}
|
|
66
|
+
});
|
|
37
67
|
|
|
38
68
|
// ── Description ─────────────────────────────────────────────
|
|
39
69
|
|
|
40
|
-
export const dialogDescriptionVariants = cva(['
|
|
70
|
+
export const dialogDescriptionVariants = cva(['body-sm mt-1', 'text-content-secondary']);
|
|
41
71
|
|
|
42
|
-
// ──
|
|
72
|
+
// ── Content (renamed from dialogBodyVariants) ───────────────
|
|
43
73
|
|
|
44
|
-
export const
|
|
74
|
+
export const dialogContentVariants = cva(['px-6 py-0 gap-2 shrink min-h-0'], {
|
|
75
|
+
variants: {
|
|
76
|
+
fullBleed: {
|
|
77
|
+
true: 'px-0',
|
|
78
|
+
false: ''
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
defaultVariants: {
|
|
82
|
+
fullBleed: false
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
// ── Text ────────────────────────────────────────────────────
|
|
87
|
+
|
|
88
|
+
export const dialogTextVariants = cva(['body-md', 'text-content-primary']);
|
|
45
89
|
|
|
46
90
|
// ── Footer ──────────────────────────────────────────────────
|
|
47
91
|
|
|
48
|
-
export const dialogFooterVariants = cva(['flex-row items-center justify-end shrink-0', 'gap-
|
|
92
|
+
export const dialogFooterVariants = cva(['flex-row items-center justify-end shrink-0', 'gap-2 px-6 pt-4 pb-6']);
|
|
49
93
|
|
|
50
94
|
// ── Close ───────────────────────────────────────────────────
|
|
51
95
|
|
|
52
|
-
export const dialogCloseVariants = cva(['
|
|
96
|
+
export const dialogCloseVariants = cva(['absolute right-[14px] top-[14px]', 'min-w-[32px] min-h-[32px] items-center justify-center', 'p-[6px] rounded-full', TRANSITION_COLORS, Platform.select({
|
|
53
97
|
default: 'data-[active=true]:opacity-70',
|
|
54
|
-
web: ['data-[hover=true]:bg-
|
|
98
|
+
web: ['data-[hover=true]:bg-surface-primary-hover', 'data-[active=true]:bg-surface-primary-active', 'data-[focus-visible=true]:ring-2 data-[focus-visible=true]:ring-stroke-focus data-[focus-visible=true]:ring-offset-2'].join(' ')
|
|
55
99
|
})]);
|
|
56
100
|
|
|
57
101
|
// ── Close Icon ──────────────────────────────────────────────
|
|
58
102
|
|
|
59
|
-
export const dialogCloseIconVariants = cva(['size-5 text-
|
|
103
|
+
export const dialogCloseIconVariants = cva(['size-5 text-content-tertiary']);
|
|
104
|
+
|
|
105
|
+
// ── Exported types ──────────────────────────────────────────
|
|
60
106
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","cva","
|
|
1
|
+
{"version":3,"names":["Platform","cva","TRANSITION_COLORS","dialogOverlayVariants","dialogPopupVariants","select","web","default","variants","size","xs","sm","md","lg","xl","full","defaultVariants","dialogHeaderVariants","dialogTitleVariants","appearance","danger","warning","success","dialogTitleIconVariants","dialogDescriptionVariants","dialogContentVariants","fullBleed","true","false","dialogTextVariants","dialogFooterVariants","dialogCloseVariants","join","dialogCloseIconVariants"],"sourceRoot":"../../../../src","sources":["components/Dialog/styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAA2B,0BAA0B;AACjE,SAASC,iBAAiB,QAAQ,yBAAyB;;AAE3D;;AAEA,OAAO,MAAMC,qBAAqB,GAAGF,GAAG,CAAC,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,CAAC;;AAErF;;AAEA,OAAO,MAAMG,mBAAmB,GAAGH,GAAG,CACpC,CACE,oBAAoB,EACpB,YAAY,EACZD,QAAQ,CAACK,MAAM,CAAC;EAAEC,GAAG,EAAE,WAAW;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,EAClD,8BAA8B,CAC/B,EACD;E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AAC;EACDZ,eAAe,EAAE;IACfU,SAAS,EAAE;EACb;AACF,CAAC,CAAC;;AAEF;;AAEA,OAAO,MAAMG,kBAAkB,GAAG5B,GAAG,CAAC,CAAC,SAAS,EAAE,sBAAsB,CAAC,CAAC;;AAE1E;;AAEA,OAAO,MAAM6B,oBAAoB,GAAG7B,GAAG,CAAC,CACtC,4CAA4C,EAC5C,sBAAsB,CACvB,CAAC;;AAEF;;AAEA,OAAO,MAAM8B,mBAAmB,GAAG9B,GAAG,CAAC,CACrC,kCAAkC,EAClC,uDAAuD,EACvD,sBAAsB,EACtBC,iBAAiB,EACjBF,QAAQ,CAACK,MAAM,CAAC;EACdE,OAAO,EAAE,+BAA+B;EACxCD,GAAG,EAAE,CACH,4CAA4C,EAC5C,8CAA8C,EAC9C,sHAAsH,CACvH,CAAC0B,IAAI,CAAC,GAAG;AACZ,CAAC,CAAC,CACH,CAAC;;AAEF;;AAEA,OAAO,MAAMC,uBAAuB,GAAGhC,GAAG,CAAC,CAAC,8BAA8B,CAAC,CAAC;;AAE5E","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=4821-871
|
|
4
|
+
// source=packages/components/src/components/AlertDialog/index.tsx
|
|
5
|
+
// component=AlertDialog.Description
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
const description = instance.findText('{description}').textContent;
|
|
9
|
+
export default {
|
|
10
|
+
id: 'alert-dialog-description',
|
|
11
|
+
imports: ["import { AlertDialog } from '@cdx-ui/components'"],
|
|
12
|
+
example: figma.code`<AlertDialog.Description>${description}</AlertDialog.Description>`
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=AlertDialog.Description.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","description","findText","textContent","id","imports","example","code"],"sourceRoot":"../../../src","sources":["figma/AlertDialog.Description.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;AAEvC,MAAMC,WAAW,GAAIF,QAAQ,CAACG,QAAQ,CAAC,eAAe,CAAC,CAAgCC,WAAW;AAElG,eAAe;EACbC,EAAE,EAAE,0BAA0B;EAC9BC,OAAO,EAAE,CAAC,kDAAkD,CAAC;EAC7DC,OAAO,EAAER,KAAK,CAACS,IAAI,4BAA4BN,WAAW;AAC5D,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=4821-964
|
|
4
|
+
// source=packages/components/src/components/AlertDialog/index.tsx
|
|
5
|
+
// component=AlertDialog.Footer
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
|
|
9
|
+
// Viewport is excluded (Figma-only framing).
|
|
10
|
+
const buttons = instance.getEnum('Buttons', {
|
|
11
|
+
'1': '1',
|
|
12
|
+
'2': '2',
|
|
13
|
+
'3': '3'
|
|
14
|
+
});
|
|
15
|
+
const cancelLabel = buttons !== '1' ? instance.findText('Button.Label', {
|
|
16
|
+
traverseInstances: true,
|
|
17
|
+
path: ['AlertDialog.Cancel']
|
|
18
|
+
}).textContent : null;
|
|
19
|
+
const secondaryInstance = buttons === '3' ? instance.findInstance('Button (Secondary)') : null;
|
|
20
|
+
const secondarySnippet = secondaryInstance?.type === 'INSTANCE' ? secondaryInstance.executeTemplate().example : null;
|
|
21
|
+
const actionLabel = instance.findText('Button.Label', {
|
|
22
|
+
traverseInstances: true,
|
|
23
|
+
path: ['AlertDialog.Action']
|
|
24
|
+
}).textContent;
|
|
25
|
+
export default {
|
|
26
|
+
id: 'alert-dialog-footer',
|
|
27
|
+
imports: ["import { AlertDialog } from '@cdx-ui/components'"],
|
|
28
|
+
example: figma.code`
|
|
29
|
+
<AlertDialog.Footer>
|
|
30
|
+
${buttons !== '1' ? figma.code`<AlertDialog.Cancel>${cancelLabel}</AlertDialog.Cancel>` : null}
|
|
31
|
+
${secondarySnippet}
|
|
32
|
+
<AlertDialog.Action>${actionLabel}</AlertDialog.Action>
|
|
33
|
+
</AlertDialog.Footer>`
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=AlertDialog.Footer.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","buttons","getEnum","cancelLabel","findText","traverseInstances","path","textContent","secondaryInstance","findInstance","secondarySnippet","type","executeTemplate","example","actionLabel","id","imports","code"],"sourceRoot":"../../../src","sources":["figma/AlertDialog.Footer.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;;AAEvC;AACA,MAAMC,OAAO,GAAGF,QAAQ,CAACG,OAAO,CAAC,SAAS,EAAE;EAC1C,GAAG,EAAE,GAAG;EACR,GAAG,EAAE,GAAG;EACR,GAAG,EAAE;AACP,CAAC,CAAC;AAEF,MAAMC,WAAW,GACfF,OAAO,KAAK,GAAG,GAETF,QAAQ,CAACK,QAAQ,CAAC,cAAc,EAAE;EAChCC,iBAAiB,EAAE,IAAI;EACvBC,IAAI,EAAE,CAAC,oBAAoB;AAC7B,CAAC,CAAC,CACFC,WAAW,GACb,IAAI;AAEV,MAAMC,iBAAiB,GAAGP,OAAO,KAAK,GAAG,GAAGF,QAAQ,CAACU,YAAY,CAAC,oBAAoB,CAAC,GAAG,IAAI;AAC9F,MAAMC,gBAAgB,GACpBF,iBAAiB,EAAEG,IAAI,KAAK,UAAU,GAAGH,iBAAiB,CAACI,eAAe,CAAC,CAAC,CAACC,OAAO,GAAG,IAAI;AAE7F,MAAMC,WAAW,GACff,QAAQ,CAACK,QAAQ,CAAC,cAAc,EAAE;EAChCC,iBAAiB,EAAE,IAAI;EACvBC,IAAI,EAAE,CAAC,oBAAoB;AAC7B,CAAC,CAAC,CACFC,WAAW;AAEb,eAAe;EACbQ,EAAE,EAAE,qBAAqB;EACzBC,OAAO,EAAE,CAAC,kDAAkD,CAAC;EAC7DH,OAAO,EAAEf,KAAK,CAACmB,IAAI;AACrB;AACA,IAAIhB,OAAO,KAAK,GAAG,GAAGH,KAAK,CAACmB,IAAI,uBAAuBd,WAAW,uBAAuB,GAAG,IAAI;AAChG,IAAIO,gBAAgB;AACpB,wBAAwBI,WAAW;AACnC;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=4821-893
|
|
4
|
+
// source=packages/components/src/components/AlertDialog/index.tsx
|
|
5
|
+
// component=AlertDialog.Header
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
const showDescription = instance.getBoolean('Show Description?');
|
|
9
|
+
const titleInstance = instance.findInstance('AlertDialog.Title');
|
|
10
|
+
const titleSnippet = titleInstance.type === 'INSTANCE' ? titleInstance.executeTemplate().example : null;
|
|
11
|
+
const descriptionInstance = instance.findInstance('AlertDialog.Description');
|
|
12
|
+
const descriptionSnippet = showDescription && descriptionInstance?.type === 'INSTANCE' ? descriptionInstance.executeTemplate().example : null;
|
|
13
|
+
export default {
|
|
14
|
+
id: 'alert-dialog-header',
|
|
15
|
+
imports: ["import { AlertDialog } from '@cdx-ui/components'"],
|
|
16
|
+
example: figma.code`
|
|
17
|
+
<AlertDialog.Header>
|
|
18
|
+
${titleSnippet}
|
|
19
|
+
${descriptionSnippet}
|
|
20
|
+
</AlertDialog.Header>`
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=AlertDialog.Header.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","showDescription","getBoolean","titleInstance","findInstance","titleSnippet","type","executeTemplate","example","descriptionInstance","descriptionSnippet","id","imports","code"],"sourceRoot":"../../../src","sources":["figma/AlertDialog.Header.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;AAEvC,MAAMC,eAAe,GAAGF,QAAQ,CAACG,UAAU,CAAC,mBAAmB,CAAC;AAEhE,MAAMC,aAAa,GAAGJ,QAAQ,CAACK,YAAY,CAAC,mBAAmB,CAAC;AAChE,MAAMC,YAAY,GAChBF,aAAa,CAACG,IAAI,KAAK,UAAU,GAAGH,aAAa,CAACI,eAAe,CAAC,CAAC,CAACC,OAAO,GAAG,IAAI;AAEpF,MAAMC,mBAAmB,GAAGV,QAAQ,CAACK,YAAY,CAAC,yBAAyB,CAAC;AAC5E,MAAMM,kBAAkB,GACtBT,eAAe,IAAIQ,mBAAmB,EAAEH,IAAI,KAAK,UAAU,GACvDG,mBAAmB,CAACF,eAAe,CAAC,CAAC,CAACC,OAAO,GAC7C,IAAI;AAEV,eAAe;EACbG,EAAE,EAAE,qBAAqB;EACzBC,OAAO,EAAE,CAAC,kDAAkD,CAAC;EAC7DJ,OAAO,EAAEV,KAAK,CAACe,IAAI;AACrB;AACA,IAAIR,YAAY;AAChB,IAAIK,kBAAkB;AACtB;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=4593-3771
|
|
4
|
+
// source=packages/components/src/components/AlertDialog/index.tsx
|
|
5
|
+
// component=AlertDialog.Text
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
const text = instance.findText('{text}').textContent;
|
|
9
|
+
export default {
|
|
10
|
+
id: 'alert-dialog-text',
|
|
11
|
+
imports: ["import { AlertDialog } from '@cdx-ui/components'"],
|
|
12
|
+
example: figma.code`<AlertDialog.Text>${text}</AlertDialog.Text>`
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=AlertDialog.Text.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","text","findText","textContent","id","imports","example","code"],"sourceRoot":"../../../src","sources":["figma/AlertDialog.Text.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;AAEvC,MAAMC,IAAI,GAAIF,QAAQ,CAACG,QAAQ,CAAC,QAAQ,CAAC,CAAgCC,WAAW;AAEpF,eAAe;EACbC,EAAE,EAAE,mBAAmB;EACvBC,OAAO,EAAE,CAAC,kDAAkD,CAAC;EAC7DC,OAAO,EAAER,KAAK,CAACS,IAAI,qBAAqBN,IAAI;AAC9C,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=4428-551
|
|
4
|
+
// source=packages/components/src/components/AlertDialog/index.tsx
|
|
5
|
+
// component=AlertDialog.Title
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
const appearance = instance.getEnum('appearance', {
|
|
9
|
+
default: undefined,
|
|
10
|
+
danger: 'danger',
|
|
11
|
+
warning: 'warning',
|
|
12
|
+
success: 'success'
|
|
13
|
+
});
|
|
14
|
+
const appearanceProp = figma.helpers.react.renderProp('appearance', appearance);
|
|
15
|
+
const title = instance.findText('{title}').textContent;
|
|
16
|
+
export default {
|
|
17
|
+
id: 'alert-dialog-title',
|
|
18
|
+
imports: ["import { AlertDialog } from '@cdx-ui/components'"],
|
|
19
|
+
example: figma.code`<AlertDialog.Title${appearanceProp}>${title}</AlertDialog.Title>`
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=AlertDialog.Title.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","appearance","getEnum","default","undefined","danger","warning","success","appearanceProp","helpers","react","renderProp","title","findText","textContent","id","imports","example","code"],"sourceRoot":"../../../src","sources":["figma/AlertDialog.Title.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;AAEvC,MAAMC,UAAU,GAAGF,QAAQ,CAACG,OAAO,CAAC,YAAY,EAAE;EAChDC,OAAO,EAAEC,SAAS;EAClBC,MAAM,EAAE,QAAQ;EAChBC,OAAO,EAAE,SAAS;EAClBC,OAAO,EAAE;AACX,CAAC,CAAC;AAEF,MAAMC,cAAc,GAAGV,KAAK,CAACW,OAAO,CAACC,KAAK,CAACC,UAAU,CAAC,YAAY,EAAEV,UAAU,CAAC;AAE/E,MAAMW,KAAK,GAAIb,QAAQ,CAACc,QAAQ,CAAC,SAAS,CAAC,CAAgCC,WAAW;AAEtF,eAAe;EACbC,EAAE,EAAE,oBAAoB;EACxBC,OAAO,EAAE,CAAC,kDAAkD,CAAC;EAC7DC,OAAO,EAAEnB,KAAK,CAACoB,IAAI,qBAAqBV,cAAc,IAAII,KAAK;AACjE,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=4428-496
|
|
4
|
+
// source=packages/components/src/components/AlertDialog/index.tsx
|
|
5
|
+
// component=AlertDialog
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
const size = instance.getEnum('size', {
|
|
9
|
+
xs: 'xs',
|
|
10
|
+
sm: 'sm',
|
|
11
|
+
md: 'md',
|
|
12
|
+
lg: 'lg',
|
|
13
|
+
xl: 'xl',
|
|
14
|
+
full: 'full'
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
// Delegate to nested Code Connect templates — each sub-component manages its own snippet.
|
|
18
|
+
const headerInstance = instance.findInstance('AlertDialog.Header');
|
|
19
|
+
const headerSnippet = headerInstance.type === 'INSTANCE' ? headerInstance.executeTemplate().example : null;
|
|
20
|
+
const contentSlot = instance.getSlot('AlertDialog.Content');
|
|
21
|
+
const contentChildren = contentSlot ? figma.helpers.react.renderChildren(contentSlot) : null;
|
|
22
|
+
const footerInstance = instance.findInstance('AlertDialog.Footer');
|
|
23
|
+
const footerSnippet = footerInstance.type === 'INSTANCE' ? footerInstance.executeTemplate().example : null;
|
|
24
|
+
export default {
|
|
25
|
+
id: 'alert-dialog',
|
|
26
|
+
imports: ["import { AlertDialog } from '@cdx-ui/components'"],
|
|
27
|
+
example: figma.code`
|
|
28
|
+
<AlertDialog size="${size}">
|
|
29
|
+
<AlertDialog.Trigger>{/* Trigger */}</AlertDialog.Trigger>
|
|
30
|
+
<AlertDialog.Popup>
|
|
31
|
+
${headerSnippet}
|
|
32
|
+
<AlertDialog.Content>${contentChildren}</AlertDialog.Content>
|
|
33
|
+
${footerSnippet}
|
|
34
|
+
</AlertDialog.Popup>
|
|
35
|
+
</AlertDialog>`
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=AlertDialog.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","size","getEnum","xs","sm","md","lg","xl","full","headerInstance","findInstance","headerSnippet","type","executeTemplate","example","contentSlot","getSlot","contentChildren","helpers","react","renderChildren","footerInstance","footerSnippet","id","imports","code"],"sourceRoot":"../../../src","sources":["figma/AlertDialog.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;AAEvC,MAAMC,IAAI,GAAGF,QAAQ,CAACG,OAAO,CAAC,MAAM,EAAE;EACpCC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA,MAAMC,cAAc,GAAGV,QAAQ,CAACW,YAAY,CAAC,oBAAoB,CAAC;AAClE,MAAMC,aAAa,GACjBF,cAAc,CAACG,IAAI,KAAK,UAAU,GAAGH,cAAc,CAACI,eAAe,CAAC,CAAC,CAACC,OAAO,GAAG,IAAI;AAEtF,MAAMC,WAAW,GAAGhB,QAAQ,CAACiB,OAAO,CAAC,qBAAqB,CAAC;AAC3D,MAAMC,eAAe,GAAGF,WAAW,GAAGjB,KAAK,CAACoB,OAAO,CAACC,KAAK,CAACC,cAAc,CAACL,WAAW,CAAC,GAAG,IAAI;AAE5F,MAAMM,cAAc,GAAGtB,QAAQ,CAACW,YAAY,CAAC,oBAAoB,CAAC;AAClE,MAAMY,aAAa,GACjBD,cAAc,CAACT,IAAI,KAAK,UAAU,GAAGS,cAAc,CAACR,eAAe,CAAC,CAAC,CAACC,OAAO,GAAG,IAAI;AAEtF,eAAe;EACbS,EAAE,EAAE,cAAc;EAClBC,OAAO,EAAE,CAAC,kDAAkD,CAAC;EAC7DV,OAAO,EAAEhB,KAAK,CAAC2B,IAAI;AACrB,qBAAqBxB,IAAI;AACzB;AACA;AACA,MAAMU,aAAa;AACnB,2BAA2BM,eAAe;AAC1C,MAAMK,aAAa;AACnB;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=4784-2588
|
|
4
|
+
// source=packages/components/src/components/Dialog/index.tsx
|
|
5
|
+
// component=Dialog.Description
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
const description = instance.findText('{description}').textContent;
|
|
9
|
+
export default {
|
|
10
|
+
id: 'dialog-description',
|
|
11
|
+
imports: ["import { Dialog } from '@cdx-ui/components'"],
|
|
12
|
+
example: figma.code`<Dialog.Description>${description}</Dialog.Description>`
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=Dialog.Description.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","description","findText","textContent","id","imports","example","code"],"sourceRoot":"../../../src","sources":["figma/Dialog.Description.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;AAEvC,MAAMC,WAAW,GAAIF,QAAQ,CAACG,QAAQ,CAAC,eAAe,CAAC,CAAgCC,WAAW;AAElG,eAAe;EACbC,EAAE,EAAE,oBAAoB;EACxBC,OAAO,EAAE,CAAC,6CAA6C,CAAC;EACxDC,OAAO,EAAER,KAAK,CAACS,IAAI,uBAAuBN,WAAW;AACvD,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=4784-2946
|
|
4
|
+
// source=packages/components/src/components/Dialog/index.tsx
|
|
5
|
+
// component=Dialog.Footer
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
const primaryButton = instance.findInstance('Button (Primary)');
|
|
9
|
+
const primarySnippet = primaryButton.type === 'INSTANCE' ? primaryButton.executeTemplate().example : null;
|
|
10
|
+
const secondaryButton = instance.findInstance('Button (Secondary)');
|
|
11
|
+
const secondarySnippet = secondaryButton.type === 'INSTANCE' ? secondaryButton.executeTemplate().example : null;
|
|
12
|
+
const tertiaryButton = instance.findInstance('Button (Tertiary)');
|
|
13
|
+
const tertiarySnippet = tertiaryButton.type === 'INSTANCE' ? tertiaryButton.executeTemplate().example : null;
|
|
14
|
+
export default {
|
|
15
|
+
id: 'dialog-footer',
|
|
16
|
+
imports: ["import { Dialog } from '@cdx-ui/components'"],
|
|
17
|
+
example: figma.code`
|
|
18
|
+
<Dialog.Footer>
|
|
19
|
+
${tertiarySnippet}
|
|
20
|
+
${secondarySnippet}
|
|
21
|
+
${primarySnippet}
|
|
22
|
+
</Dialog.Footer>`
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=Dialog.Footer.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","primaryButton","findInstance","primarySnippet","type","executeTemplate","example","secondaryButton","secondarySnippet","tertiaryButton","tertiarySnippet","id","imports","code"],"sourceRoot":"../../../src","sources":["figma/Dialog.Footer.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;AAEvC,MAAMC,aAAa,GAAGF,QAAQ,CAACG,YAAY,CAAC,kBAAkB,CAAC;AAC/D,MAAMC,cAAc,GAClBF,aAAa,CAACG,IAAI,KAAK,UAAU,GAAGH,aAAa,CAACI,eAAe,CAAC,CAAC,CAACC,OAAO,GAAG,IAAI;AAEpF,MAAMC,eAAe,GAAGR,QAAQ,CAACG,YAAY,CAAC,oBAAoB,CAAC;AACnE,MAAMM,gBAAgB,GACpBD,eAAe,CAACH,IAAI,KAAK,UAAU,GAAGG,eAAe,CAACF,eAAe,CAAC,CAAC,CAACC,OAAO,GAAG,IAAI;AAExF,MAAMG,cAAc,GAAGV,QAAQ,CAACG,YAAY,CAAC,mBAAmB,CAAC;AACjE,MAAMQ,eAAe,GACnBD,cAAc,CAACL,IAAI,KAAK,UAAU,GAAGK,cAAc,CAACJ,eAAe,CAAC,CAAC,CAACC,OAAO,GAAG,IAAI;AAEtF,eAAe;EACbK,EAAE,EAAE,eAAe;EACnBC,OAAO,EAAE,CAAC,6CAA6C,CAAC;EACxDN,OAAO,EAAER,KAAK,CAACe,IAAI;AACrB;AACA,IAAIH,eAAe;AACnB,IAAIF,gBAAgB;AACpB,IAAIL,cAAc;AAClB;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=4784-2618
|
|
4
|
+
// source=packages/components/src/components/Dialog/index.tsx
|
|
5
|
+
// component=Dialog.Header
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
const showDescription = instance.getBoolean('Show Description?');
|
|
9
|
+
const titleInstance = instance.findInstance('Dialog.Title');
|
|
10
|
+
const titleSnippet = titleInstance.type === 'INSTANCE' ? titleInstance.executeTemplate().example : null;
|
|
11
|
+
const descriptionInstance = instance.findInstance('Dialog.Description');
|
|
12
|
+
const descriptionSnippet = showDescription && descriptionInstance?.type === 'INSTANCE' ? descriptionInstance.executeTemplate().example : null;
|
|
13
|
+
export default {
|
|
14
|
+
id: 'dialog-header',
|
|
15
|
+
imports: ["import { Dialog } from '@cdx-ui/components'"],
|
|
16
|
+
example: figma.code`
|
|
17
|
+
<Dialog.Header>
|
|
18
|
+
${titleSnippet}
|
|
19
|
+
${descriptionSnippet}
|
|
20
|
+
<Dialog.Close />
|
|
21
|
+
</Dialog.Header>`
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=Dialog.Header.figma.js.map
|