create-plasmic-app 0.0.96 → 0.0.97

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