create-plasmic-app 0.0.133 → 0.0.134

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.
Files changed (53) hide show
  1. package/cpa-out/nextjs-app-codegen-js/app/dynamic/[slug]/page-client.jsx +7 -0
  2. package/cpa-out/nextjs-app-codegen-js/app/dynamic/[slug]/page.jsx +45 -0
  3. package/cpa-out/nextjs-app-codegen-js/app/layout.js +28 -0
  4. package/cpa-out/nextjs-app-codegen-js/app/layout.jsx +17 -0
  5. package/cpa-out/nextjs-app-codegen-js/app/page-client.jsx +7 -0
  6. package/cpa-out/nextjs-app-codegen-js/app/page.jsx +45 -0
  7. package/cpa-out/nextjs-app-codegen-js/app/plasmic-host/page.jsx +15 -0
  8. package/cpa-out/nextjs-app-codegen-js/components/Button.jsx +11 -0
  9. package/cpa-out/nextjs-app-codegen-js/components/RandomDynamicPageButton.jsx +24 -0
  10. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicButton.jsx +595 -0
  11. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +216 -0
  12. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicDynamicPageServer.jsx +56 -0
  13. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +26 -0
  14. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +251 -0
  15. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicHomepageServer.jsx +56 -0
  16. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +159 -0
  17. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/PlasmicStyleTokensProvider.jsx +15 -0
  18. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/icons/PlasmicIcon__CheckSvg.jsx +39 -0
  19. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx +37 -0
  20. package/cpa-out/nextjs-app-codegen-js/components/plasmic/create_plasmic_app/plasmic.jsx +11 -0
  21. package/cpa-out/nextjs-app-codegen-js/package.json +22 -0
  22. package/cpa-out/nextjs-app-codegen-js/plasmic.json +148 -0
  23. package/cpa-out/nextjs-app-codegen-ts/app/dynamic/[slug]/page-client.tsx +11 -0
  24. package/cpa-out/nextjs-app-codegen-ts/app/dynamic/[slug]/page.tsx +57 -0
  25. package/cpa-out/nextjs-app-codegen-ts/app/layout.tsx +19 -0
  26. package/cpa-out/nextjs-app-codegen-ts/app/page-client.tsx +11 -0
  27. package/cpa-out/nextjs-app-codegen-ts/app/page.tsx +54 -0
  28. package/cpa-out/nextjs-app-codegen-ts/app/plasmic-host/page.tsx +15 -0
  29. package/cpa-out/nextjs-app-codegen-ts/components/Button.tsx +35 -0
  30. package/cpa-out/nextjs-app-codegen-ts/components/RandomDynamicPageButton.tsx +44 -0
  31. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicButton.tsx +776 -0
  32. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +329 -0
  33. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicDynamicPageServer.tsx +77 -0
  34. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +30 -0
  35. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +366 -0
  36. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicHomepageServer.tsx +75 -0
  37. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +274 -0
  38. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/PlasmicStyleTokensProvider.tsx +19 -0
  39. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/icons/PlasmicIcon__CheckSvg.tsx +44 -0
  40. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +41 -0
  41. package/cpa-out/nextjs-app-codegen-ts/components/plasmic/create_plasmic_app/plasmic.tsx +14 -0
  42. package/cpa-out/nextjs-app-codegen-ts/package.json +26 -0
  43. package/cpa-out/nextjs-app-codegen-ts/plasmic.json +148 -0
  44. package/cpa-out/nextjs-app-codegen-ts/tsconfig.json +26 -0
  45. package/dist/index.js +31 -28
  46. package/dist/nextjs/nextjs.js +37 -11
  47. package/dist/nextjs/templates/app-codegen/layout.d.ts +2 -0
  48. package/dist/nextjs/templates/app-codegen/layout.js +27 -0
  49. package/package.json +2 -2
  50. package/run-cpa.ts +8 -9
  51. package/src/index.ts +31 -34
  52. package/src/nextjs/nextjs.ts +67 -28
  53. package/src/nextjs/templates/app-codegen/layout.ts +28 -0
@@ -0,0 +1,595 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ // @ts-nocheck
4
+ /* prettier-ignore-start */
5
+ /** @jsxRuntime classic */
6
+ /** @jsx createPlasmicElementProxy */
7
+ /** @jsxFrag React.Fragment */
8
+ // This class is auto-generated by Plasmic; please do not edit!
9
+ // Plasmic Project: 47tFXWjN2C4NyHFGGpaYQ3
10
+ // Component: TQcvW_pSKi3
11
+ "use client";
12
+ import * as React from "react";
13
+ import Link from "next/link";
14
+ import { useRouter } from "next/navigation";
15
+ import {
16
+ PlasmicLink as PlasmicLink__,
17
+ classNames,
18
+ createPlasmicElementProxy,
19
+ deriveRenderOpts,
20
+ hasVariant,
21
+ renderPlasmicSlot,
22
+ useDollarState,
23
+ useTrigger
24
+ } from "@plasmicapp/react-web";
25
+ import { useDataEnv } from "@plasmicapp/host";
26
+ import * as pp from "@plasmicapp/react-web";
27
+ import { _useStyleTokens } from "./PlasmicStyleTokensProvider"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/styleTokensProvider
28
+ import "@plasmicapp/react-web/lib/plasmic.css";
29
+ import projectcss from "./plasmic.module.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
30
+ import sty from "./PlasmicButton.module.css"; // plasmic-import: TQcvW_pSKi3/css
31
+ import CheckSvgIcon from "./icons/PlasmicIcon__CheckSvg"; // plasmic-import: gj-_D7n31Ho/icon
32
+ import IconIcon from "./icons/PlasmicIcon__Icon"; // plasmic-import: 6PNxx3YMyDQ/icon
33
+
34
+ createPlasmicElementProxy;
35
+
36
+ export const PlasmicButton__VariantProps = new Array(
37
+ "showStartIcon",
38
+ "showEndIcon",
39
+ "isDisabled",
40
+ "shape",
41
+ "size",
42
+ "color"
43
+ );
44
+
45
+ export const PlasmicButton__ArgProps = new Array(
46
+ "link",
47
+ "submitsForm",
48
+ "target",
49
+ "startIcon",
50
+ "children",
51
+ "endIcon"
52
+ );
53
+
54
+ const $$ = {};
55
+
56
+ function useNextRouter() {
57
+ try {
58
+ return useRouter();
59
+ } catch {}
60
+ return undefined;
61
+ }
62
+
63
+ function PlasmicButton__RenderFunc(props) {
64
+ const { variants, overrides, forNode } = props;
65
+ const args = React.useMemo(
66
+ () =>
67
+ Object.assign(
68
+ {},
69
+ Object.fromEntries(
70
+ Object.entries(props.args).filter(([_, v]) => v !== undefined)
71
+ )
72
+ ),
73
+ [props.args]
74
+ );
75
+ const $props = {
76
+ ...args,
77
+ ...variants
78
+ };
79
+ const __nextRouter = useNextRouter();
80
+ const $ctx = useDataEnv?.() || {};
81
+ const refsRef = React.useRef({});
82
+ const $refs = refsRef.current;
83
+ const stateSpecs = React.useMemo(
84
+ () => [
85
+ {
86
+ path: "showStartIcon",
87
+ type: "private",
88
+ variableType: "variant",
89
+ initFunc: ({ $props, $state, $queries, $q, $ctx }) =>
90
+ $props.showStartIcon
91
+ },
92
+ {
93
+ path: "showEndIcon",
94
+ type: "private",
95
+ variableType: "variant",
96
+ initFunc: ({ $props, $state, $queries, $q, $ctx }) => $props.showEndIcon
97
+ },
98
+ {
99
+ path: "isDisabled",
100
+ type: "private",
101
+ variableType: "variant",
102
+ initFunc: ({ $props, $state, $queries, $q, $ctx }) => $props.isDisabled
103
+ },
104
+ {
105
+ path: "shape",
106
+ type: "private",
107
+ variableType: "variant",
108
+ initFunc: ({ $props, $state, $queries, $q, $ctx }) => $props.shape
109
+ },
110
+ {
111
+ path: "size",
112
+ type: "private",
113
+ variableType: "variant",
114
+ initFunc: ({ $props, $state, $queries, $q, $ctx }) => $props.size
115
+ },
116
+ {
117
+ path: "color",
118
+ type: "private",
119
+ variableType: "variant",
120
+ initFunc: ({ $props, $state, $queries, $q, $ctx }) => $props.color
121
+ }
122
+ ],
123
+
124
+ [$props, $ctx, $refs]
125
+ );
126
+ const $state = useDollarState(stateSpecs, {
127
+ $props,
128
+ $ctx,
129
+ $queries: {},
130
+ $q: {},
131
+ $refs
132
+ });
133
+ const [isRootFocusVisibleWithin, triggerRootFocusVisibleWithinProps] =
134
+ useTrigger("useFocusVisibleWithin", {
135
+ isTextInput: false
136
+ });
137
+ const triggers = {
138
+ focusVisibleWithin_root: isRootFocusVisibleWithin
139
+ };
140
+ const styleTokensClassNames = _useStyleTokens();
141
+ return (
142
+ <button
143
+ data-plasmic-name={"root"}
144
+ data-plasmic-override={overrides.root}
145
+ data-plasmic-root={true}
146
+ data-plasmic-for-node={forNode}
147
+ className={classNames(
148
+ projectcss.all,
149
+ projectcss.button,
150
+ projectcss.root_reset,
151
+ projectcss.plasmic_default_styles,
152
+ projectcss.plasmic_mixins,
153
+ styleTokensClassNames,
154
+ sty.root,
155
+ {
156
+ [sty.root___focusVisibleWithin]: triggers.focusVisibleWithin_root,
157
+ [sty.rootcolor_blue]: hasVariant($state, "color", "blue"),
158
+ [sty.rootcolor_clear]: hasVariant($state, "color", "clear"),
159
+ [sty.rootcolor_green]: hasVariant($state, "color", "green"),
160
+ [sty.rootcolor_link]: hasVariant($state, "color", "link"),
161
+ [sty.rootcolor_link_size_minimal]:
162
+ hasVariant($state, "color", "link") &&
163
+ hasVariant($state, "size", "minimal"),
164
+ [sty.rootcolor_red]: hasVariant($state, "color", "red"),
165
+ [sty.rootcolor_sand]: hasVariant($state, "color", "sand"),
166
+ [sty.rootcolor_softBlue]: hasVariant($state, "color", "softBlue"),
167
+ [sty.rootcolor_softGreen]: hasVariant($state, "color", "softGreen"),
168
+ [sty.rootcolor_softRed]: hasVariant($state, "color", "softRed"),
169
+ [sty.rootcolor_softSand]: hasVariant($state, "color", "softSand"),
170
+ [sty.rootcolor_softYellow]: hasVariant($state, "color", "softYellow"),
171
+ [sty.rootcolor_white]: hasVariant($state, "color", "white"),
172
+ [sty.rootcolor_yellow]: hasVariant($state, "color", "yellow"),
173
+ [sty.rootisDisabled]: hasVariant($state, "isDisabled", "isDisabled"),
174
+ [sty.rootshape_round]: hasVariant($state, "shape", "round"),
175
+ [sty.rootshape_round_size_compact]:
176
+ hasVariant($state, "shape", "round") &&
177
+ hasVariant($state, "size", "compact"),
178
+ [sty.rootshape_rounded]: hasVariant($state, "shape", "rounded"),
179
+ [sty.rootshape_rounded_showStartIcon]:
180
+ hasVariant($state, "shape", "rounded") &&
181
+ hasVariant($state, "showStartIcon", "showStartIcon"),
182
+ [sty.rootshape_rounded_size_compact]:
183
+ hasVariant($state, "size", "compact") &&
184
+ hasVariant($state, "shape", "rounded"),
185
+ [sty.rootshape_sharp]: hasVariant($state, "shape", "sharp"),
186
+ [sty.rootshowEndIcon]: hasVariant(
187
+ $state,
188
+ "showEndIcon",
189
+ "showEndIcon"
190
+ ),
191
+ [sty.rootshowEndIcon_shape_rounded]:
192
+ hasVariant($state, "showEndIcon", "showEndIcon") &&
193
+ hasVariant($state, "shape", "rounded"),
194
+ [sty.rootshowEndIcon_size_compact]:
195
+ hasVariant($state, "size", "compact") &&
196
+ hasVariant($state, "showEndIcon", "showEndIcon"),
197
+ [sty.rootshowEndIcon_size_compact_showStartIcon]:
198
+ hasVariant($state, "size", "compact") &&
199
+ hasVariant($state, "showStartIcon", "showStartIcon") &&
200
+ hasVariant($state, "showEndIcon", "showEndIcon"),
201
+ [sty.rootshowStartIcon]: hasVariant(
202
+ $state,
203
+ "showStartIcon",
204
+ "showStartIcon"
205
+ ),
206
+ [sty.rootsize_compact]: hasVariant($state, "size", "compact"),
207
+ [sty.rootsize_compact_showStartIcon]:
208
+ hasVariant($state, "size", "compact") &&
209
+ hasVariant($state, "showStartIcon", "showStartIcon"),
210
+ [sty.rootsize_minimal]: hasVariant($state, "size", "minimal")
211
+ }
212
+ )}
213
+ data-plasmic-trigger-props={[triggerRootFocusVisibleWithinProps]}
214
+ >
215
+ {(hasVariant($state, "showStartIcon", "showStartIcon") ? true : false) ? (
216
+ <div
217
+ data-plasmic-name={"startIconContainer"}
218
+ data-plasmic-override={overrides.startIconContainer}
219
+ className={classNames(projectcss.all, sty.startIconContainer, {
220
+ [sty.startIconContainercolor_blue]: hasVariant(
221
+ $state,
222
+ "color",
223
+ "blue"
224
+ ),
225
+ [sty.startIconContainershape_rounded_showStartIcon]:
226
+ hasVariant($state, "shape", "rounded") &&
227
+ hasVariant($state, "showStartIcon", "showStartIcon"),
228
+ [sty.startIconContainershowStartIcon]: hasVariant(
229
+ $state,
230
+ "showStartIcon",
231
+ "showStartIcon"
232
+ )
233
+ })}
234
+ >
235
+ {renderPlasmicSlot({
236
+ defaultContents: (
237
+ <CheckSvgIcon
238
+ className={classNames(projectcss.all, sty.svg__s6Xxe)}
239
+ role={"img"}
240
+ />
241
+ ),
242
+
243
+ value: args.startIcon,
244
+ className: classNames(sty.slotTargetStartIcon, {
245
+ [sty.slotTargetStartIconcolor_blue]: hasVariant(
246
+ $state,
247
+ "color",
248
+ "blue"
249
+ ),
250
+ [sty.slotTargetStartIconcolor_clear]: hasVariant(
251
+ $state,
252
+ "color",
253
+ "clear"
254
+ ),
255
+ [sty.slotTargetStartIconcolor_link]: hasVariant(
256
+ $state,
257
+ "color",
258
+ "link"
259
+ ),
260
+ [sty.slotTargetStartIconcolor_softBlue]: hasVariant(
261
+ $state,
262
+ "color",
263
+ "softBlue"
264
+ ),
265
+ [sty.slotTargetStartIconcolor_softGreen]: hasVariant(
266
+ $state,
267
+ "color",
268
+ "softGreen"
269
+ ),
270
+ [sty.slotTargetStartIconcolor_softRed]: hasVariant(
271
+ $state,
272
+ "color",
273
+ "softRed"
274
+ ),
275
+ [sty.slotTargetStartIconcolor_softSand]: hasVariant(
276
+ $state,
277
+ "color",
278
+ "softSand"
279
+ ),
280
+ [sty.slotTargetStartIconcolor_softYellow]: hasVariant(
281
+ $state,
282
+ "color",
283
+ "softYellow"
284
+ ),
285
+ [sty.slotTargetStartIconcolor_white]: hasVariant(
286
+ $state,
287
+ "color",
288
+ "white"
289
+ ),
290
+ [sty.slotTargetStartIconcolor_yellow]: hasVariant(
291
+ $state,
292
+ "color",
293
+ "yellow"
294
+ ),
295
+ [sty.slotTargetStartIconshowStartIcon]: hasVariant(
296
+ $state,
297
+ "showStartIcon",
298
+ "showStartIcon"
299
+ )
300
+ })
301
+ })}
302
+ </div>
303
+ ) : null}
304
+ <div
305
+ data-plasmic-name={"contentContainer"}
306
+ data-plasmic-override={overrides.contentContainer}
307
+ className={classNames(projectcss.all, sty.contentContainer, {
308
+ [sty.contentContainer___focusVisibleWithin]:
309
+ triggers.focusVisibleWithin_root,
310
+ [sty.contentContainerisDisabled]: hasVariant(
311
+ $state,
312
+ "isDisabled",
313
+ "isDisabled"
314
+ ),
315
+ [sty.contentContainershape_rounded]: hasVariant(
316
+ $state,
317
+ "shape",
318
+ "rounded"
319
+ ),
320
+ [sty.contentContainershowEndIcon]: hasVariant(
321
+ $state,
322
+ "showEndIcon",
323
+ "showEndIcon"
324
+ )
325
+ })}
326
+ >
327
+ {renderPlasmicSlot({
328
+ defaultContents: "Button",
329
+ value: args.children,
330
+ className: classNames(sty.slotTargetChildren, {
331
+ [sty.slotTargetChildren___focusVisibleWithin]:
332
+ triggers.focusVisibleWithin_root,
333
+ [sty.slotTargetChildrencolor_blue]: hasVariant(
334
+ $state,
335
+ "color",
336
+ "blue"
337
+ ),
338
+ [sty.slotTargetChildrencolor_clear]: hasVariant(
339
+ $state,
340
+ "color",
341
+ "clear"
342
+ ),
343
+ [sty.slotTargetChildrencolor_green]: hasVariant(
344
+ $state,
345
+ "color",
346
+ "green"
347
+ ),
348
+ [sty.slotTargetChildrencolor_link]: hasVariant(
349
+ $state,
350
+ "color",
351
+ "link"
352
+ ),
353
+ [sty.slotTargetChildrencolor_link_size_minimal]:
354
+ hasVariant($state, "color", "link") &&
355
+ hasVariant($state, "size", "minimal"),
356
+ [sty.slotTargetChildrencolor_red]: hasVariant(
357
+ $state,
358
+ "color",
359
+ "red"
360
+ ),
361
+ [sty.slotTargetChildrencolor_sand]: hasVariant(
362
+ $state,
363
+ "color",
364
+ "sand"
365
+ ),
366
+ [sty.slotTargetChildrencolor_softBlue]: hasVariant(
367
+ $state,
368
+ "color",
369
+ "softBlue"
370
+ ),
371
+ [sty.slotTargetChildrencolor_softGreen]: hasVariant(
372
+ $state,
373
+ "color",
374
+ "softGreen"
375
+ ),
376
+ [sty.slotTargetChildrencolor_softRed]: hasVariant(
377
+ $state,
378
+ "color",
379
+ "softRed"
380
+ ),
381
+ [sty.slotTargetChildrencolor_softSand]: hasVariant(
382
+ $state,
383
+ "color",
384
+ "softSand"
385
+ ),
386
+ [sty.slotTargetChildrencolor_softYellow]: hasVariant(
387
+ $state,
388
+ "color",
389
+ "softYellow"
390
+ ),
391
+ [sty.slotTargetChildrencolor_white]: hasVariant(
392
+ $state,
393
+ "color",
394
+ "white"
395
+ ),
396
+ [sty.slotTargetChildrencolor_yellow]: hasVariant(
397
+ $state,
398
+ "color",
399
+ "yellow"
400
+ ),
401
+ [sty.slotTargetChildrenisDisabled]: hasVariant(
402
+ $state,
403
+ "isDisabled",
404
+ "isDisabled"
405
+ ),
406
+ [sty.slotTargetChildrenshape_rounded]: hasVariant(
407
+ $state,
408
+ "shape",
409
+ "rounded"
410
+ ),
411
+ [sty.slotTargetChildrenshowEndIcon]: hasVariant(
412
+ $state,
413
+ "showEndIcon",
414
+ "showEndIcon"
415
+ ),
416
+ [sty.slotTargetChildrenshowStartIcon]: hasVariant(
417
+ $state,
418
+ "showStartIcon",
419
+ "showStartIcon"
420
+ ),
421
+ [sty.slotTargetChildrensize_minimal]: hasVariant(
422
+ $state,
423
+ "size",
424
+ "minimal"
425
+ )
426
+ })
427
+ })}
428
+ </div>
429
+ {(hasVariant($state, "showEndIcon", "showEndIcon") ? true : false) ? (
430
+ <div
431
+ data-plasmic-name={"endIconContainer"}
432
+ data-plasmic-override={overrides.endIconContainer}
433
+ className={classNames(projectcss.all, sty.endIconContainer, {
434
+ [sty.endIconContainercolor_white]: hasVariant(
435
+ $state,
436
+ "color",
437
+ "white"
438
+ ),
439
+ [sty.endIconContainercolor_yellow]: hasVariant(
440
+ $state,
441
+ "color",
442
+ "yellow"
443
+ ),
444
+ [sty.endIconContainershowEndIcon]: hasVariant(
445
+ $state,
446
+ "showEndIcon",
447
+ "showEndIcon"
448
+ )
449
+ })}
450
+ >
451
+ {renderPlasmicSlot({
452
+ defaultContents: (
453
+ <IconIcon
454
+ className={classNames(projectcss.all, sty.svg__liJa)}
455
+ role={"img"}
456
+ />
457
+ ),
458
+
459
+ value: args.endIcon,
460
+ className: classNames(sty.slotTargetEndIcon, {
461
+ [sty.slotTargetEndIconcolor_clear]: hasVariant(
462
+ $state,
463
+ "color",
464
+ "clear"
465
+ ),
466
+ [sty.slotTargetEndIconcolor_link]: hasVariant(
467
+ $state,
468
+ "color",
469
+ "link"
470
+ ),
471
+ [sty.slotTargetEndIconcolor_softBlue]: hasVariant(
472
+ $state,
473
+ "color",
474
+ "softBlue"
475
+ ),
476
+ [sty.slotTargetEndIconcolor_softGreen]: hasVariant(
477
+ $state,
478
+ "color",
479
+ "softGreen"
480
+ ),
481
+ [sty.slotTargetEndIconcolor_softRed]: hasVariant(
482
+ $state,
483
+ "color",
484
+ "softRed"
485
+ ),
486
+ [sty.slotTargetEndIconcolor_softSand]: hasVariant(
487
+ $state,
488
+ "color",
489
+ "softSand"
490
+ ),
491
+ [sty.slotTargetEndIconcolor_softYellow]: hasVariant(
492
+ $state,
493
+ "color",
494
+ "softYellow"
495
+ ),
496
+ [sty.slotTargetEndIconcolor_white]: hasVariant(
497
+ $state,
498
+ "color",
499
+ "white"
500
+ ),
501
+ [sty.slotTargetEndIconcolor_yellow]: hasVariant(
502
+ $state,
503
+ "color",
504
+ "yellow"
505
+ ),
506
+ [sty.slotTargetEndIconshowEndIcon]: hasVariant(
507
+ $state,
508
+ "showEndIcon",
509
+ "showEndIcon"
510
+ )
511
+ })
512
+ })}
513
+ </div>
514
+ ) : null}
515
+ </button>
516
+ );
517
+ }
518
+
519
+ function useBehavior(props, ref) {
520
+ const b = pp.useButton(
521
+ PlasmicButton,
522
+ props,
523
+ {
524
+ showStartIconVariant: {
525
+ group: "showStartIcon",
526
+ variant: "showStartIcon"
527
+ },
528
+ showEndIconVariant: { group: "showEndIcon", variant: "showEndIcon" },
529
+ isDisabledVariant: { group: "isDisabled", variant: "isDisabled" },
530
+ contentSlot: "children",
531
+ startIconSlot: "startIcon",
532
+ endIconSlot: "endIcon",
533
+ root: "root"
534
+ },
535
+ ref
536
+ );
537
+ if (b.plasmicProps.overrides.root.as === "a") {
538
+ b.plasmicProps.overrides.root.as = PlasmicLink__;
539
+ b.plasmicProps.overrides.root.props.component = Link;
540
+ b.plasmicProps.overrides.root.props.platform = "nextjs";
541
+ }
542
+ return b;
543
+ }
544
+
545
+ const PlasmicDescendants = {
546
+ root: ["root", "startIconContainer", "contentContainer", "endIconContainer"],
547
+ startIconContainer: ["startIconContainer"],
548
+ contentContainer: ["contentContainer"],
549
+ endIconContainer: ["endIconContainer"]
550
+ };
551
+
552
+ function makeNodeComponent(nodeName) {
553
+ const func = function (props) {
554
+ const { variants, args, overrides } = React.useMemo(
555
+ () =>
556
+ deriveRenderOpts(props, {
557
+ name: nodeName,
558
+ descendantNames: PlasmicDescendants[nodeName],
559
+ internalArgPropNames: PlasmicButton__ArgProps,
560
+ internalVariantPropNames: PlasmicButton__VariantProps
561
+ }),
562
+ [props, nodeName]
563
+ );
564
+ return PlasmicButton__RenderFunc({
565
+ variants,
566
+ args,
567
+ overrides,
568
+ forNode: nodeName
569
+ });
570
+ };
571
+ if (nodeName === "root") {
572
+ func.displayName = "PlasmicButton";
573
+ } else {
574
+ func.displayName = `PlasmicButton.${nodeName}`;
575
+ }
576
+ return func;
577
+ }
578
+
579
+ export const PlasmicButton = Object.assign(
580
+ // Top-level PlasmicButton renders the root element
581
+ makeNodeComponent("root"),
582
+ {
583
+ // Helper components rendering sub-elements
584
+ startIconContainer: makeNodeComponent("startIconContainer"),
585
+ contentContainer: makeNodeComponent("contentContainer"),
586
+ endIconContainer: makeNodeComponent("endIconContainer"),
587
+ // Metadata about props expected for PlasmicButton
588
+ internalVariantProps: PlasmicButton__VariantProps,
589
+ internalArgProps: PlasmicButton__ArgProps,
590
+ useBehavior
591
+ }
592
+ );
593
+
594
+ export default PlasmicButton;
595
+ /* prettier-ignore-end */