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