@clerk/ui 1.0.0-snapshot.v20251217194100 → 1.0.0-snapshot.v20251218183643
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/dist/573_ui_b31bc8_1.0.0-snapshot.v20251218183643.js +1 -0
- package/dist/ClerkUi.js +2 -2
- package/dist/common/WalletInitialIcon.js +36 -0
- package/dist/common/WalletInitialIcon.js.map +1 -0
- package/dist/components/OrganizationProfile/MemberListTable.js +3 -1
- package/dist/components/OrganizationProfile/MemberListTable.js.map +1 -1
- package/dist/components/SessionTasks/tasks/TaskChooseOrganization/index.js +50 -21
- package/dist/components/SessionTasks/tasks/TaskChooseOrganization/index.js.map +1 -1
- package/dist/components/SignIn/AlternativeMethods.js +1 -1
- package/dist/components/SignIn/SignInFactorOneSolanaWalletsCard.js +79 -0
- package/dist/components/SignIn/SignInFactorOneSolanaWalletsCard.js.map +1 -0
- package/dist/components/SignIn/SignInSocialButtons.js +2 -1
- package/dist/components/SignIn/SignInSocialButtons.js.map +1 -1
- package/dist/components/SignIn/index.js +5 -0
- package/dist/components/SignIn/index.js.map +1 -1
- package/dist/components/SignUp/SignUpSocialButtons.js +2 -1
- package/dist/components/SignUp/SignUpSocialButtons.js.map +1 -1
- package/dist/components/SignUp/SignUpStartSolanaWalletsCard.js +79 -0
- package/dist/components/SignUp/SignUpStartSolanaWalletsCard.js.map +1 -0
- package/dist/components/SignUp/index.js +5 -0
- package/dist/components/SignUp/index.js.map +1 -1
- package/dist/components/UserProfile/Web3Form.js +62 -41
- package/dist/components/UserProfile/Web3Form.js.map +1 -1
- package/dist/components/UserProfile/Web3Section.js +1 -1
- package/dist/components/UserProfile/Web3Section.js.map +1 -1
- package/dist/components/UserProfile/Web3SelectSolanaWalletScreen.js +73 -0
- package/dist/components/UserProfile/Web3SelectSolanaWalletScreen.js.map +1 -0
- package/dist/components/devPrompts/EnableOrganizationsPrompt/index.js +173 -110
- package/dist/components/devPrompts/EnableOrganizationsPrompt/index.js.map +1 -1
- package/dist/customizables/elementDescriptors.js +10 -1
- package/dist/customizables/elementDescriptors.js.map +1 -1
- package/dist/elements/Web3SolanaWalletButtons.js +182 -0
- package/dist/elements/Web3SolanaWalletButtons.js.map +1 -0
- package/dist/elements/contexts/index.js.map +1 -1
- package/dist/{enableOrganizationsPrompt_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → enableOrganizationsPrompt_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +108 -22
- package/dist/index.js +1 -1
- package/dist/internal/appearance.d.ts +9 -0
- package/dist/internal/appearance.d.ts.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/lazyModules/components.d.ts +20 -20
- package/dist/lazyModules/components.d.ts.map +1 -1
- package/dist/sessionTasks_ui_b31bc8_1.0.0-snapshot.v20251218183643.js +1 -0
- package/dist/signin_ui_b31bc8_1.0.0-snapshot.v20251218183643.js +1 -0
- package/dist/signup_ui_b31bc8_1.0.0-snapshot.v20251218183643.js +1 -0
- package/dist/taskChooseOrganization_ui_b31bc8_1.0.0-snapshot.v20251218183643.js +1 -0
- package/dist/taskResetPassword_ui_b31bc8_1.0.0-snapshot.v20251218183643.js +1 -0
- package/dist/themes/shadcn.js +2 -2
- package/dist/themes/shadcn.js.map +1 -1
- package/dist/ui-common_ui_b31bc8_1.0.0-snapshot.v20251218183643.js +139 -0
- package/dist/ui.browser.js +3 -3
- package/dist/{userprofile_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → userprofile_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +2 -2
- package/dist/utils/web3CallbackErrorHandler.js +1 -1
- package/dist/utils/web3CallbackErrorHandler.js.map +1 -1
- package/dist/vendors_ui_b31bc8_1.0.0-snapshot.v20251218183643.js +20 -0
- package/dist/web3-solana-wallet-buttons_ui_b31bc8_1.0.0-snapshot.v20251218183643.js +143 -0
- package/package.json +10 -4
- package/dist/573_ui_cc41a8_1.0.0-snapshot.v20251217194100.js +0 -1
- package/dist/sessionTasks_ui_cc41a8_1.0.0-snapshot.v20251217194100.js +0 -1
- package/dist/signin_ui_cc41a8_1.0.0-snapshot.v20251217194100.js +0 -1
- package/dist/signup_ui_cc41a8_1.0.0-snapshot.v20251217194100.js +0 -1
- package/dist/taskChooseOrganization_ui_cc41a8_1.0.0-snapshot.v20251217194100.js +0 -1
- package/dist/taskResetPassword_ui_cc41a8_1.0.0-snapshot.v20251217194100.js +0 -1
- package/dist/ui-common_ui_cc41a8_1.0.0-snapshot.v20251217194100.js +0 -139
- package/dist/vendors_ui_cc41a8_1.0.0-snapshot.v20251217194100.js +0 -20
- /package/dist/{207_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → 207_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{217_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → 217_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{360_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → 360_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{444_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → 444_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{970_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → 970_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{apiKeys_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → apiKeys_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{blankcaptcha_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → blankcaptcha_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{checkout_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → checkout_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{copy-api-key-modal_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → copy-api-key-modal_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{createorganization_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → createorganization_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{framework_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → framework_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{impersonationfab_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → impersonationfab_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{keylessPrompt_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → keylessPrompt_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{oauthConsent_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → oauthConsent_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{onetap_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → onetap_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{op-api-keys-page_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → op-api-keys-page_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{op-billing-page_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → op-billing-page_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{op-plans-page_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → op-plans-page_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{organizationlist_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → organizationlist_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{organizationprofile_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → organizationprofile_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{organizationswitcher_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → organizationswitcher_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{payment-attempt-page_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → payment-attempt-page_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{planDetails_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → planDetails_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{prefetchorganizationlist_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → prefetchorganizationlist_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{pricingTable_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → pricingTable_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{revoke-api-key-modal_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → revoke-api-key-modal_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{statement-page_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → statement-page_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{subscriptionDetails_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → subscriptionDetails_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{up-api-keys-page_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → up-api-keys-page_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{up-billing-page_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → up-billing-page_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{up-plans-page_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → up-plans-page_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{useravatar_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → useravatar_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{userbutton_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → userbutton_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{userverification_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → userverification_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
- /package/dist/{waitlist_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → waitlist_ui_b31bc8_1.0.0-snapshot.v20251218183643.js} +0 -0
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { useEnvironment } from "../../../contexts/EnvironmentContext.js";
|
|
2
2
|
import { InternalThemeProvider } from "../../../styledSystem/InternalThemeProvider.js";
|
|
3
|
-
import {
|
|
4
|
-
import { Box, Flex, Span } from "../../../customizables/index.js";
|
|
3
|
+
import { Flex } from "../../../customizables/index.js";
|
|
5
4
|
import { Modal } from "../../../elements/Modal.js";
|
|
6
5
|
import { Portal } from "../../../elements/Portal.js";
|
|
7
6
|
import { ClerkLogoIcon, PromptContainer, PromptSuccessIcon, basePromptElementStyles } from "../shared.js";
|
|
8
|
-
import { forwardRef, useId, useLayoutEffect, useRef, useState } from "react";
|
|
7
|
+
import React, { forwardRef, useId, useLayoutEffect, useRef, useState } from "react";
|
|
9
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
10
|
-
import { useClerk } from "@clerk/shared/react";
|
|
9
|
+
import { createContextAndHook, useClerk } from "@clerk/shared/react";
|
|
11
10
|
import { css } from "@emotion/react";
|
|
12
11
|
|
|
13
12
|
//#region src/components/devPrompts/EnableOrganizationsPrompt/index.tsx
|
|
@@ -19,6 +18,7 @@ const EnableOrganizationsPromptInternal = ({ caller, onSuccess, onClose }) => {
|
|
|
19
18
|
const [allowPersonalAccount, setAllowPersonalAccount] = useState(false);
|
|
20
19
|
const initialFocusRef = useRef(null);
|
|
21
20
|
const environment = useEnvironment();
|
|
21
|
+
const radioGroupLabelId = useId();
|
|
22
22
|
const isComponent = !caller.startsWith("use");
|
|
23
23
|
const hasPersonalAccountsEnabled = typeof environment?.organizationSettings.forceOrganizationSelection !== "undefined";
|
|
24
24
|
const handleEnableOrganizations = () => {
|
|
@@ -91,6 +91,7 @@ const EnableOrganizationsPromptInternal = ({ caller, onSuccess, onClose }) => {
|
|
|
91
91
|
"."
|
|
92
92
|
]
|
|
93
93
|
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("p", {
|
|
94
|
+
id: radioGroupLabelId,
|
|
94
95
|
css: [basePromptElementStyles, css`
|
|
95
96
|
color: #b4b4b4;
|
|
96
97
|
font-size: 0.8125rem;
|
|
@@ -118,31 +119,32 @@ const EnableOrganizationsPromptInternal = ({ caller, onSuccess, onClose }) => {
|
|
|
118
119
|
children: "Learn more"
|
|
119
120
|
})] })
|
|
120
121
|
}),
|
|
121
|
-
hasPersonalAccountsEnabled && /* @__PURE__ */ jsx(
|
|
122
|
-
sx: (t) => ({
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
122
|
+
hasPersonalAccountsEnabled && !isEnabled && /* @__PURE__ */ jsx(Flex, {
|
|
123
|
+
sx: (t) => ({ marginTop: t.sizes.$2 }),
|
|
124
|
+
direction: "col",
|
|
125
|
+
children: /* @__PURE__ */ jsxs(RadioGroup, {
|
|
126
|
+
value: allowPersonalAccount ? "optional" : "required",
|
|
127
|
+
onChange: (value) => setAllowPersonalAccount(value === "optional"),
|
|
128
|
+
labelledBy: radioGroupLabelId,
|
|
129
|
+
children: [/* @__PURE__ */ jsx(RadioGroupItem, {
|
|
130
|
+
value: "required",
|
|
131
|
+
label: /* @__PURE__ */ jsxs(Flex, {
|
|
132
|
+
wrap: "wrap",
|
|
133
|
+
sx: (t) => ({
|
|
134
|
+
columnGap: t.sizes.$2,
|
|
135
|
+
rowGap: t.sizes.$1
|
|
136
|
+
}),
|
|
137
|
+
children: [/* @__PURE__ */ jsx("span", { children: "Membership required" }), /* @__PURE__ */ jsx(PromptBadge, { children: "Standard" })]
|
|
138
|
+
}),
|
|
139
|
+
description: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
140
|
+
className: "block",
|
|
141
|
+
children: "Users need to belong to at least one organization."
|
|
142
|
+
}), /* @__PURE__ */ jsx("span", { children: "Common for most B2B SaaS applications" })] })
|
|
143
|
+
}), /* @__PURE__ */ jsx(RadioGroupItem, {
|
|
144
|
+
value: "optional",
|
|
145
|
+
label: "Membership optional",
|
|
146
|
+
description: "Users can work outside of an organization with a personal account"
|
|
147
|
+
})]
|
|
146
148
|
})
|
|
147
149
|
})
|
|
148
150
|
]
|
|
@@ -267,103 +269,164 @@ const PromptButton = forwardRef(({ variant = "solid",...props }, ref) => {
|
|
|
267
269
|
...props
|
|
268
270
|
});
|
|
269
271
|
});
|
|
270
|
-
const
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
272
|
+
const PromptBadge = ({ children }) => {
|
|
273
|
+
return /* @__PURE__ */ jsx("span", {
|
|
274
|
+
css: css`
|
|
275
|
+
${basePromptElementStyles};
|
|
276
|
+
display: inline-flex;
|
|
277
|
+
align-items: center;
|
|
278
|
+
padding: 0.125rem 0.375rem;
|
|
279
|
+
border-radius: 0.25rem;
|
|
280
|
+
font-size: 0.6875rem;
|
|
281
|
+
font-weight: 500;
|
|
282
|
+
line-height: 1.23;
|
|
283
|
+
background-color: #ebebeb;
|
|
284
|
+
color: #2b2b34;
|
|
285
|
+
white-space: nowrap;
|
|
286
|
+
`,
|
|
287
|
+
children
|
|
288
|
+
});
|
|
289
|
+
};
|
|
290
|
+
const [RadioGroupContext, useRadioGroup] = createContextAndHook("RadioGroupContext");
|
|
291
|
+
const RadioGroup = ({ value, onChange, children, labelledBy }) => {
|
|
292
|
+
const name = useId();
|
|
293
|
+
const contextValue = React.useMemo(() => ({ value: {
|
|
294
|
+
name,
|
|
295
|
+
value,
|
|
296
|
+
onChange
|
|
297
|
+
} }), [
|
|
298
|
+
name,
|
|
299
|
+
value,
|
|
300
|
+
onChange
|
|
301
|
+
]);
|
|
302
|
+
return /* @__PURE__ */ jsx(RadioGroupContext.Provider, {
|
|
303
|
+
value: contextValue,
|
|
304
|
+
children: /* @__PURE__ */ jsx(Flex, {
|
|
305
|
+
role: "radiogroup",
|
|
306
|
+
direction: "col",
|
|
307
|
+
gap: 3,
|
|
308
|
+
"aria-orientation": "vertical",
|
|
309
|
+
"aria-labelledby": labelledBy,
|
|
310
|
+
children
|
|
311
|
+
})
|
|
312
|
+
});
|
|
313
|
+
};
|
|
314
|
+
const RADIO_INDICATOR_SIZE = "1rem";
|
|
315
|
+
const RADIO_GAP = "0.5rem";
|
|
316
|
+
const RadioGroupItem = ({ value, label, description }) => {
|
|
317
|
+
const { name, value: selectedValue, onChange } = useRadioGroup();
|
|
275
318
|
const descriptionId = useId();
|
|
276
|
-
const
|
|
277
|
-
const [internalChecked, setInternalChecked] = useState(!!defaultChecked);
|
|
278
|
-
const checked = isControlled ? controlledChecked : internalChecked;
|
|
279
|
-
const handleChange = (e) => {
|
|
280
|
-
if (!isControlled) setInternalChecked(e.target.checked);
|
|
281
|
-
onChange?.(e);
|
|
282
|
-
};
|
|
319
|
+
const checked = value === selectedValue;
|
|
283
320
|
return /* @__PURE__ */ jsxs(Flex, {
|
|
284
321
|
direction: "col",
|
|
285
322
|
gap: 1,
|
|
286
|
-
children: [/* @__PURE__ */ jsxs(
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
323
|
+
children: [/* @__PURE__ */ jsxs("label", {
|
|
324
|
+
css: css`
|
|
325
|
+
${basePromptElementStyles};
|
|
326
|
+
display: flex;
|
|
327
|
+
align-items: flex-start;
|
|
328
|
+
gap: ${RADIO_GAP};
|
|
329
|
+
cursor: pointer;
|
|
330
|
+
user-select: none;
|
|
331
|
+
|
|
332
|
+
&:has(input:focus-visible) > span:first-of-type {
|
|
333
|
+
outline: 2px solid white;
|
|
334
|
+
outline-offset: 2px;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
&:hover:has(input:not(:checked)) > span:first-of-type {
|
|
338
|
+
background-color: rgba(255, 255, 255, 0.08);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
&:hover:has(input:checked) > span:first-of-type {
|
|
342
|
+
background-color: rgba(108, 71, 255, 0.8);
|
|
343
|
+
background-color: color-mix(in srgb, #6c47ff 80%, transparent);
|
|
344
|
+
}
|
|
345
|
+
`,
|
|
303
346
|
children: [
|
|
304
347
|
/* @__PURE__ */ jsx("input", {
|
|
305
|
-
type: "
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
css:
|
|
312
|
-
|
|
348
|
+
type: "radio",
|
|
349
|
+
name,
|
|
350
|
+
value,
|
|
351
|
+
checked,
|
|
352
|
+
onChange: () => onChange(value),
|
|
353
|
+
"aria-describedby": description ? descriptionId : void 0,
|
|
354
|
+
css: css`
|
|
355
|
+
${basePromptElementStyles};
|
|
356
|
+
position: absolute;
|
|
357
|
+
width: 1px;
|
|
358
|
+
height: 1px;
|
|
359
|
+
padding: 0;
|
|
360
|
+
margin: -1px;
|
|
361
|
+
overflow: hidden;
|
|
362
|
+
clip: rect(0, 0, 0, 0);
|
|
363
|
+
white-space: nowrap;
|
|
364
|
+
border-width: 0;
|
|
365
|
+
`
|
|
313
366
|
}),
|
|
314
|
-
/* @__PURE__ */ jsx(
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
367
|
+
/* @__PURE__ */ jsx("span", {
|
|
368
|
+
"aria-hidden": "true",
|
|
369
|
+
css: css`
|
|
370
|
+
${basePromptElementStyles};
|
|
371
|
+
position: relative;
|
|
372
|
+
display: inline-flex;
|
|
373
|
+
align-items: center;
|
|
374
|
+
justify-content: center;
|
|
375
|
+
width: ${RADIO_INDICATOR_SIZE};
|
|
376
|
+
height: ${RADIO_INDICATOR_SIZE};
|
|
377
|
+
margin-top: 0.125rem;
|
|
378
|
+
flex-shrink: 0;
|
|
379
|
+
border-radius: 50%;
|
|
380
|
+
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
381
|
+
background-color: transparent;
|
|
382
|
+
transition: 120ms ease-in-out;
|
|
383
|
+
transition-property: border-color, background-color, box-shadow;
|
|
384
|
+
|
|
385
|
+
${checked && css`
|
|
386
|
+
border-width: 2px;
|
|
387
|
+
border-color: #6c47ff;
|
|
388
|
+
background-color: #6c47ff;
|
|
389
|
+
background-color: color-mix(in srgb, #6c47ff 100%, transparent);
|
|
390
|
+
box-shadow: 0 0 0 2px rgba(108, 71, 255, 0.2);
|
|
391
|
+
`}
|
|
392
|
+
|
|
393
|
+
&::after {
|
|
394
|
+
content: '';
|
|
395
|
+
position: absolute;
|
|
396
|
+
width: 0.375rem;
|
|
397
|
+
height: 0.375rem;
|
|
398
|
+
border-radius: 50%;
|
|
399
|
+
background-color: white;
|
|
400
|
+
opacity: ${checked ? 1 : 0};
|
|
401
|
+
transform: scale(${checked ? 1 : 0});
|
|
402
|
+
transition: 120ms ease-in-out;
|
|
403
|
+
transition-property: opacity, transform;
|
|
404
|
+
}
|
|
405
|
+
`
|
|
342
406
|
}),
|
|
343
407
|
/* @__PURE__ */ jsx("span", {
|
|
344
408
|
css: [basePromptElementStyles, css`
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
409
|
+
font-size: 0.875rem;
|
|
410
|
+
font-weight: 500;
|
|
411
|
+
line-height: 1.25;
|
|
412
|
+
color: white;
|
|
413
|
+
`],
|
|
350
414
|
children: label
|
|
351
415
|
})
|
|
352
416
|
]
|
|
353
|
-
}), description
|
|
417
|
+
}), description && /* @__PURE__ */ jsx("span", {
|
|
354
418
|
id: descriptionId,
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
}],
|
|
419
|
+
css: [basePromptElementStyles, css`
|
|
420
|
+
padding-inline-start: calc(${RADIO_INDICATOR_SIZE} + ${RADIO_GAP});
|
|
421
|
+
font-size: 0.75rem;
|
|
422
|
+
line-height: 1.33;
|
|
423
|
+
color: #c3c3c6;
|
|
424
|
+
text-wrap: pretty;
|
|
425
|
+
`],
|
|
363
426
|
children: description
|
|
364
|
-
})
|
|
427
|
+
})]
|
|
365
428
|
});
|
|
366
|
-
}
|
|
429
|
+
};
|
|
367
430
|
const Link = forwardRef(({ children, css: cssProp,...props }, ref) => {
|
|
368
431
|
return /* @__PURE__ */ jsx("a", {
|
|
369
432
|
ref,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["params: EnableEnvironmentSettingParams","frontFaceType: 'idle' | 'success'","backFaceType: 'warning' | 'success'"],"sources":["../../../../src/components/devPrompts/EnableOrganizationsPrompt/index.tsx"],"sourcesContent":["import { useClerk } from '@clerk/shared/react';\nimport type { __internal_EnableOrganizationsPromptProps, EnableEnvironmentSettingParams } from '@clerk/shared/types';\n// eslint-disable-next-line no-restricted-imports\nimport type { SerializedStyles } from '@emotion/react';\n// eslint-disable-next-line no-restricted-imports\nimport { css, type Theme } from '@emotion/react';\nimport { forwardRef, useId, useLayoutEffect, useRef, useState } from 'react';\n\nimport { useEnvironment } from '@/ui/contexts';\nimport { Modal } from '@/ui/elements/Modal';\nimport { common, InternalThemeProvider } from '@/ui/styledSystem';\n\nimport { Box, Flex, Span } from '../../../customizables';\nimport { Portal } from '../../../elements/Portal';\nimport { basePromptElementStyles, ClerkLogoIcon, PromptContainer, PromptSuccessIcon } from '../shared';\n\nconst organizationsDashboardUrl = 'https://dashboard.clerk.com/~/organizations-settings';\n\nconst EnableOrganizationsPromptInternal = ({\n caller,\n onSuccess,\n onClose,\n}: __internal_EnableOrganizationsPromptProps) => {\n const clerk = useClerk();\n const [isLoading, setIsLoading] = useState(false);\n const [isEnabled, setIsEnabled] = useState(false);\n const [allowPersonalAccount, setAllowPersonalAccount] = useState(false);\n\n const initialFocusRef = useRef<HTMLHeadingElement>(null);\n const environment = useEnvironment();\n\n const isComponent = !caller.startsWith('use');\n\n // 'forceOrganizationSelection' is omitted from the environment settings object if the instance does not have it available as a feature\n const hasPersonalAccountsEnabled =\n typeof environment?.organizationSettings.forceOrganizationSelection !== 'undefined';\n\n const handleEnableOrganizations = () => {\n setIsLoading(true);\n\n const params: EnableEnvironmentSettingParams = {\n enable_organizations: true,\n };\n\n if (hasPersonalAccountsEnabled) {\n params.organization_allow_personal_accounts = allowPersonalAccount;\n }\n\n void environment\n .__internal_enableEnvironmentSetting(params)\n .then(() => {\n setIsEnabled(true);\n setIsLoading(false);\n })\n .catch(() => {\n setIsLoading(false);\n });\n };\n\n return (\n <Portal>\n <Modal\n canCloseModal={false}\n containerSx={() => ({ alignItems: 'center' })}\n initialFocusRef={initialFocusRef}\n >\n <PromptContainer\n sx={() => ({\n display: 'flex',\n flexDirection: 'column',\n width: '30rem',\n maxWidth: 'calc(100vw - 2rem)',\n })}\n >\n <Flex\n direction='col'\n sx={t => ({\n padding: `${t.sizes.$4} ${t.sizes.$6}`,\n paddingBottom: t.sizes.$4,\n gap: t.sizes.$2,\n })}\n >\n <Flex\n as='header'\n align='center'\n sx={t => ({\n gap: t.sizes.$2,\n })}\n >\n <CoinFlip isEnabled={isEnabled} />\n\n <h1\n css={[\n basePromptElementStyles,\n css`\n color: white;\n font-size: 0.875rem;\n font-weight: 500;\n outline: none;\n `,\n ]}\n tabIndex={-1}\n ref={initialFocusRef}\n >\n {isEnabled ? 'Organizations feature enabled' : 'Organizations feature required'}\n </h1>\n </Flex>\n\n <Flex\n direction='col'\n align='start'\n sx={t => ({\n gap: t.sizes.$0x5,\n })}\n >\n {isEnabled ? (\n <p\n css={[\n basePromptElementStyles,\n css`\n color: #b4b4b4;\n font-size: 0.8125rem;\n font-weight: 400;\n line-height: 1.3;\n `,\n ]}\n >\n {clerk.user\n ? `The Organizations feature has been enabled for your application. A default organization named \"My Organization\" was created automatically. You can manage or rename it in your`\n : `The Organizations feature has been enabled for your application. You can manage it in your`}{' '}\n <Link\n href={organizationsDashboardUrl}\n target='_blank'\n rel='noopener noreferrer'\n >\n dashboard\n </Link>\n .\n </p>\n ) : (\n <>\n <p\n css={[\n basePromptElementStyles,\n css`\n color: #b4b4b4;\n font-size: 0.8125rem;\n font-weight: 400;\n line-height: 1.23;\n `,\n ]}\n >\n Enable Organizations to use{' '}\n <code\n css={[\n basePromptElementStyles,\n css`\n font-size: 0.75rem;\n color: white;\n font-family: monospace;\n line-height: 1.23;\n `,\n ]}\n >\n {isComponent ? `<${caller} />` : caller}\n </code>{' '}\n </p>\n\n <Link\n href='https://clerk.com/docs/guides/organizations/overview'\n target='_blank'\n rel='noopener noreferrer'\n >\n Learn more\n </Link>\n </>\n )}\n </Flex>\n\n {hasPersonalAccountsEnabled && (\n <Box\n sx={t => ({\n display: 'grid',\n gridTemplateRows: isEnabled ? '0fr' : '1fr',\n transition: `grid-template-rows ${t.transitionDuration.$slower} ${t.transitionTiming.$slowBezier}`,\n marginInline: '-0.5rem',\n overflow: 'hidden',\n })}\n {...(isEnabled && { inert: '' })}\n >\n <Flex\n sx={t => ({\n minHeight: 0,\n paddingInline: '0.5rem',\n opacity: isEnabled ? 0 : 1,\n transition: `opacity ${t.transitionDuration.$slower} ${t.transitionTiming.$slowBezier}`,\n })}\n >\n <Flex sx={t => ({ marginTop: t.sizes.$2 })}>\n <Switch\n label='Allow personal account'\n description='Allow users to work outside of an organization by providing a personal account. We do not recommend for B2B SaaS apps.'\n checked={allowPersonalAccount}\n onChange={() => setAllowPersonalAccount(prev => !prev)}\n />\n </Flex>\n </Flex>\n </Box>\n )}\n </Flex>\n\n <span\n css={css`\n height: 1px;\n display: block;\n width: calc(100% - 2px);\n margin-inline: auto;\n background-color: #151515;\n box-shadow: 0px 1px 0px 0px #424242;\n `}\n />\n\n <Flex\n justify='center'\n sx={t => ({\n padding: `${t.sizes.$4} ${t.sizes.$6}`,\n gap: t.sizes.$3,\n justifyContent: 'flex-end',\n })}\n >\n {isEnabled ? (\n <PromptButton\n variant='solid'\n onClick={() => {\n if (!clerk.user) {\n void clerk.redirectToSignIn();\n clerk.__internal_closeEnableOrganizationsPrompt?.();\n } else {\n onSuccess?.();\n }\n }}\n >\n {clerk.user ? 'Continue' : 'Sign in to continue'}\n </PromptButton>\n ) : (\n <>\n <PromptButton\n variant='outline'\n onClick={() => {\n clerk?.__internal_closeEnableOrganizationsPrompt?.();\n onClose?.();\n }}\n >\n I'll remove it myself\n </PromptButton>\n\n <PromptButton\n variant='solid'\n onClick={handleEnableOrganizations}\n disabled={isLoading}\n >\n Enable Organizations\n </PromptButton>\n </>\n )}\n </Flex>\n </PromptContainer>\n </Modal>\n </Portal>\n );\n};\n\n/**\n * A prompt that allows the user to enable the Organizations feature for their development instance\n * @internal\n */\nexport const EnableOrganizationsPrompt = (props: __internal_EnableOrganizationsPromptProps) => {\n return (\n <InternalThemeProvider>\n <EnableOrganizationsPromptInternal {...props} />\n </InternalThemeProvider>\n );\n};\n\nconst baseButtonStyles = css`\n ${basePromptElementStyles};\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 1.75rem;\n padding: 0.375rem 0.625rem;\n border-radius: 0.375rem;\n font-size: 0.75rem;\n font-weight: 500;\n letter-spacing: 0.12px;\n color: white;\n text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.32);\n white-space: nowrap;\n user-select: none;\n color: white;\n outline: none;\n\n &:not(:disabled) {\n transition: 120ms ease-in-out;\n transition-property: background-color, border-color, box-shadow, color;\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n &:focus-visible:not(:disabled) {\n outline: 2px solid white;\n outline-offset: 2px;\n }\n`;\n\nconst buttonSolidStyles = css`\n background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30.5%, rgba(0, 0, 0, 0.05) 100%), #454545;\n box-shadow:\n 0 0 3px 0 rgba(253, 224, 71, 0) inset,\n 0 0 0 1px rgba(255, 255, 255, 0.04) inset,\n 0 1px 0 0 rgba(255, 255, 255, 0.04) inset,\n 0 0 0 1px rgba(0, 0, 0, 0.12),\n 0 1.5px 2px 0 rgba(0, 0, 0, 0.48);\n\n &:hover:not(:disabled) {\n background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30.5%, rgba(0, 0, 0, 0.15) 100%), #5f5f5f;\n box-shadow:\n 0 0 3px 0 rgba(253, 224, 71, 0) inset,\n 0 0 0 1px rgba(255, 255, 255, 0.04) inset,\n 0 1px 0 0 rgba(255, 255, 255, 0.04) inset,\n 0 0 0 1px rgba(0, 0, 0, 0.12),\n 0 1.5px 2px 0 rgba(0, 0, 0, 0.48);\n }\n`;\n\nconst buttonOutlineStyles = css`\n border: 1px solid rgba(118, 118, 132, 0.25);\n background: rgba(69, 69, 69, 0.1);\n\n &:hover:not(:disabled) {\n border-color: rgba(118, 118, 132, 0.5);\n }\n`;\n\nconst buttonVariantStyles = {\n solid: buttonSolidStyles,\n outline: buttonOutlineStyles,\n} as const;\n\ntype PromptButtonVariant = keyof typeof buttonVariantStyles;\n\ntype PromptButtonProps = Pick<React.ComponentProps<'button'>, 'onClick' | 'children' | 'disabled'> & {\n variant?: PromptButtonVariant;\n};\n\nconst PromptButton = forwardRef<HTMLButtonElement, PromptButtonProps>(({ variant = 'solid', ...props }, ref) => {\n return (\n <button\n ref={ref}\n type='button'\n css={[baseButtonStyles, buttonVariantStyles[variant]]}\n {...props}\n />\n );\n});\n\ntype SwitchProps = React.ComponentProps<'input'> & {\n label: string;\n description?: string;\n};\n\nconst TRACK_PADDING = '2px';\nconst TRACK_INNER_WIDTH = (t: Theme) => t.sizes.$6;\nconst TRACK_HEIGHT = (t: Theme) => t.sizes.$4;\nconst THUMB_WIDTH = (t: Theme) => t.sizes.$3;\n\nconst Switch = forwardRef<HTMLInputElement, SwitchProps>(\n ({ label, description, checked: controlledChecked, defaultChecked, onChange, ...props }, ref) => {\n const descriptionId = useId();\n\n const isControlled = controlledChecked !== undefined;\n const [internalChecked, setInternalChecked] = useState(!!defaultChecked);\n const checked = isControlled ? controlledChecked : internalChecked;\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (!isControlled) {\n setInternalChecked(e.target.checked);\n }\n onChange?.(e);\n };\n\n return (\n <Flex\n direction='col'\n gap={1}\n >\n <Flex\n as='label'\n gap={2}\n align='center'\n sx={{\n isolation: 'isolate',\n userSelect: 'none',\n '&:has(input:focus-visible) > input + span': {\n outline: '2px solid white',\n outlineOffset: '2px',\n },\n '&:has(input:disabled) > input + span': {\n opacity: 0.6,\n cursor: 'not-allowed',\n pointerEvents: 'none',\n },\n }}\n >\n <input\n type='checkbox'\n {...props}\n ref={ref}\n role='switch'\n {...(isControlled ? { checked } : { defaultChecked })}\n onChange={handleChange}\n css={{ ...common.visuallyHidden() }}\n aria-describedby={description ? descriptionId : undefined}\n />\n <Span\n sx={t => {\n const trackWidth = `calc(${TRACK_INNER_WIDTH(t)} + ${TRACK_PADDING} + ${TRACK_PADDING})`;\n const trackHeight = `calc(${TRACK_HEIGHT(t)} + ${TRACK_PADDING})`;\n return {\n display: 'flex',\n alignItems: 'center',\n paddingInline: TRACK_PADDING,\n width: trackWidth,\n height: trackHeight,\n border: '1px solid rgba(255, 255, 255, 0.2)',\n backgroundColor: checked ? '#6C47FF' : 'rgba(0, 0, 0, 0.2)',\n borderRadius: 999,\n transition: 'background-color 0.2s ease-in-out',\n };\n }}\n >\n <Span\n sx={t => {\n const size = THUMB_WIDTH(t);\n const maxTranslateX = `calc(${TRACK_INNER_WIDTH(t)} - ${size} - ${TRACK_PADDING})`;\n return {\n width: size,\n height: size,\n borderRadius: 9999,\n backgroundColor: 'white',\n boxShadow: '0px 0px 0px 1px rgba(0, 0, 0, 0.1)',\n transform: `translateX(${checked ? maxTranslateX : '0'})`,\n transition: 'transform 0.2s ease-in-out',\n '@media (prefers-reduced-motion: reduce)': {\n transition: 'none',\n },\n };\n }}\n />\n </Span>\n <span\n css={[\n basePromptElementStyles,\n css`\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.25;\n color: white;\n `,\n ]}\n >\n {label}\n </span>\n </Flex>\n {description ? (\n <Span\n id={descriptionId}\n sx={t => [\n basePromptElementStyles,\n {\n display: 'block',\n paddingInlineStart: `calc(${TRACK_INNER_WIDTH(t)} + ${TRACK_PADDING} + ${TRACK_PADDING} + ${t.sizes.$2})`,\n fontSize: '0.75rem',\n lineHeight: '1.3333333333',\n color: '#c3c3c6',\n textWrap: 'pretty',\n },\n ]}\n >\n {description}\n </Span>\n ) : null}\n </Flex>\n );\n },\n);\n\nconst Link = forwardRef<HTMLAnchorElement, React.ComponentProps<'a'> & { css?: SerializedStyles }>(\n ({ children, css: cssProp, ...props }, ref) => {\n return (\n <a\n ref={ref}\n {...props}\n css={[\n basePromptElementStyles,\n css`\n color: #a8a8ff;\n font-size: inherit;\n font-weight: 500;\n line-height: 1.3;\n font-size: 0.8125rem;\n min-width: 0;\n `,\n cssProp,\n ]}\n >\n {children}\n </a>\n );\n },\n);\n\nconst CoinFlip = ({ isEnabled }: { isEnabled: boolean }) => {\n const [rotation, setRotation] = useState(0);\n\n useLayoutEffect(() => {\n if (isEnabled) {\n setRotation(r => (r === 0 ? 180 : 0));\n return;\n }\n\n const interval = setInterval(() => {\n setRotation(r => (r === 0 ? 180 : 0));\n }, 2000);\n\n return () => clearInterval(interval);\n }, [isEnabled]);\n\n let frontFaceType: 'idle' | 'success' = 'idle';\n let backFaceType: 'warning' | 'success' = 'warning';\n\n if (isEnabled) {\n if (rotation === 0) {\n frontFaceType = 'success';\n backFaceType = 'warning';\n } else {\n backFaceType = 'success';\n frontFaceType = 'idle';\n }\n }\n\n const renderContent = (type: 'idle' | 'warning' | 'success') => {\n switch (type) {\n case 'idle':\n return <ClerkLogoIcon />;\n case 'success':\n return (\n <PromptSuccessIcon\n css={css`\n width: 1.25rem;\n height: 1.25rem;\n `}\n />\n );\n case 'warning':\n return (\n <svg\n css={css`\n width: 1.25rem;\n height: 1.25rem;\n `}\n viewBox='0 0 20 20'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n opacity='0.2'\n d='M17.25 10C17.25 14.0041 14.0041 17.25 10 17.25C5.99594 17.25 2.75 14.0041 2.75 10C2.75 5.99594 5.99594 2.75 10 2.75C14.0041 2.75 17.25 5.99594 17.25 10Z'\n fill='#EAB308'\n />\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M10 3.5C6.41015 3.5 3.5 6.41015 3.5 10C3.5 13.5899 6.41015 16.5 10 16.5C13.5899 16.5 16.5 13.5899 16.5 10C16.5 6.41015 13.5899 3.5 10 3.5ZM2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10Z'\n fill='#EAB308'\n />\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M10 6C10.5523 6 11 6.44772 11 7V9C11 9.55228 10.5523 10 10 10C9.44772 10 9 9.55228 9 9V7C9 6.44772 9.44772 6 10 6Z'\n fill='#EAB308'\n />\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M10 12C10.5523 12 11 12.4477 11 13V13.01C11 13.5623 10.5523 14.01 10 14.01C9.44772 14.01 9 13.5623 9 13.01V13C9 12.4477 9.44772 12 10 12Z'\n fill='#EAB308'\n />\n </svg>\n );\n }\n };\n\n return (\n <div\n css={css`\n perspective: 1000px;\n width: 1.25rem;\n height: 1.25rem;\n `}\n >\n <div\n css={css`\n position: relative;\n width: 100%;\n height: 100%;\n transform-style: preserve-3d;\n transition: transform 0.6s ease-in-out;\n transform: rotateY(${rotation}deg);\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n `}\n >\n <span\n aria-hidden\n css={css`\n position: absolute;\n width: 100%;\n height: 100%;\n backface-visibility: hidden;\n display: flex;\n align-items: center;\n justify-content: center;\n -webkit-font-smoothing: antialiased;\n transform: rotateY(0deg);\n `}\n >\n {renderContent(frontFaceType)}\n </span>\n\n <span\n aria-hidden\n css={css`\n position: absolute;\n width: 100%;\n height: 100%;\n backface-visibility: hidden;\n transform: rotateY(180deg);\n display: flex;\n align-items: center;\n justify-content: center;\n -webkit-font-smoothing: antialiased;\n `}\n >\n {renderContent(backFaceType)}\n </span>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAgBA,MAAM,4BAA4B;AAElC,MAAM,qCAAqC,EACzC,QACA,WACA,cAC+C;CAC/C,MAAM,QAAQ,UAAU;CACxB,MAAM,CAAC,WAAW,gBAAgB,SAAS,MAAM;CACjD,MAAM,CAAC,WAAW,gBAAgB,SAAS,MAAM;CACjD,MAAM,CAAC,sBAAsB,2BAA2B,SAAS,MAAM;CAEvE,MAAM,kBAAkB,OAA2B,KAAK;CACxD,MAAM,cAAc,gBAAgB;CAEpC,MAAM,cAAc,CAAC,OAAO,WAAW,MAAM;CAG7C,MAAM,6BACJ,OAAO,aAAa,qBAAqB,+BAA+B;CAE1E,MAAM,kCAAkC;AACtC,eAAa,KAAK;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C;AAE1C,KAAI,UACF,KAAI,aAAa,GAAG;AAClB,kBAAgB;AAChB,iBAAe;QACV;AACL,iBAAe;AACf,kBAAgB;;CAIpB,MAAM,iBAAiB,SAAyC;AAC9D,UAAQ,MAAR;GACE,KAAK,OACH,QAAO,oBAAC,kBAAgB;GAC1B,KAAK,UACH,QACE,oBAAC,qBACC,KAAK,GAAG;;;gBAIR;GAEN,KAAK,UACH,QACE,qBAAC;IACC,KAAK,GAAG;;;;IAIR,SAAQ;IACR,MAAK;IACL,OAAM;;KAEN,oBAAC;MACC,SAAQ;MACR,GAAE;MACF,MAAK;OACL;KACF,oBAAC;MACC,UAAS;MACT,UAAS;MACT,GAAE;MACF,MAAK;OACL;KACF,oBAAC;MACC,UAAS;MACT,UAAS;MACT,GAAE;MACF,MAAK;OACL;KACF,oBAAC;MACC,UAAS;MACT,UAAS;MACT,GAAE;MACF,MAAK;OACL;;KACE;;;AAKd,QACE,oBAAC;EACC,KAAK,GAAG;;;;;YAMR,qBAAC;GACC,KAAK,GAAG;;;;;;+BAMe,SAAS;;;;;;cAOhC,oBAAC;IACC;IACA,KAAK,GAAG;;;;;;;;;;;cAYP,cAAc,cAAc;KACxB,EAEP,oBAAC;IACC;IACA,KAAK,GAAG;;;;;;;;;;;cAYP,cAAc,aAAa;KACvB;IACH;GACF"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["params: EnableEnvironmentSettingParams","frontFaceType: 'idle' | 'success'","backFaceType: 'warning' | 'success'"],"sources":["../../../../src/components/devPrompts/EnableOrganizationsPrompt/index.tsx"],"sourcesContent":["import { createContextAndHook, useClerk } from '@clerk/shared/react';\nimport type { __internal_EnableOrganizationsPromptProps, EnableEnvironmentSettingParams } from '@clerk/shared/types';\n// eslint-disable-next-line no-restricted-imports\nimport type { SerializedStyles } from '@emotion/react';\n// eslint-disable-next-line no-restricted-imports\nimport { css } from '@emotion/react';\nimport React, { forwardRef, useId, useLayoutEffect, useRef, useState } from 'react';\n\nimport { useEnvironment } from '@/ui/contexts';\nimport { Modal } from '@/ui/elements/Modal';\nimport { InternalThemeProvider } from '@/ui/styledSystem';\n\nimport { Flex } from '../../../customizables';\nimport { Portal } from '../../../elements/Portal';\nimport { basePromptElementStyles, ClerkLogoIcon, PromptContainer, PromptSuccessIcon } from '../shared';\n\nconst organizationsDashboardUrl = 'https://dashboard.clerk.com/~/organizations-settings';\n\nconst EnableOrganizationsPromptInternal = ({\n caller,\n onSuccess,\n onClose,\n}: __internal_EnableOrganizationsPromptProps): JSX.Element => {\n const clerk = useClerk();\n const [isLoading, setIsLoading] = useState(false);\n const [isEnabled, setIsEnabled] = useState(false);\n const [allowPersonalAccount, setAllowPersonalAccount] = useState(false);\n\n const initialFocusRef = useRef<HTMLHeadingElement>(null);\n const environment = useEnvironment();\n const radioGroupLabelId = useId();\n\n const isComponent = !caller.startsWith('use');\n\n // 'forceOrganizationSelection' is omitted from the environment settings object if the instance does not have it available as a feature\n const hasPersonalAccountsEnabled =\n typeof environment?.organizationSettings.forceOrganizationSelection !== 'undefined';\n\n const handleEnableOrganizations = () => {\n setIsLoading(true);\n\n const params: EnableEnvironmentSettingParams = {\n enable_organizations: true,\n };\n\n if (hasPersonalAccountsEnabled) {\n params.organization_allow_personal_accounts = allowPersonalAccount;\n }\n\n void environment\n .__internal_enableEnvironmentSetting(params)\n .then(() => {\n setIsEnabled(true);\n setIsLoading(false);\n })\n .catch(() => {\n setIsLoading(false);\n });\n };\n\n return (\n <Portal>\n <Modal\n canCloseModal={false}\n containerSx={() => ({ alignItems: 'center' })}\n initialFocusRef={initialFocusRef}\n >\n <PromptContainer\n sx={() => ({\n display: 'flex',\n flexDirection: 'column',\n width: '30rem',\n maxWidth: 'calc(100vw - 2rem)',\n })}\n >\n <Flex\n direction='col'\n sx={t => ({\n padding: `${t.sizes.$4} ${t.sizes.$6}`,\n paddingBottom: t.sizes.$4,\n gap: t.sizes.$2,\n })}\n >\n <Flex\n as='header'\n align='center'\n sx={t => ({\n gap: t.sizes.$2,\n })}\n >\n <CoinFlip isEnabled={isEnabled} />\n\n <h1\n css={[\n basePromptElementStyles,\n css`\n color: white;\n font-size: 0.875rem;\n font-weight: 500;\n outline: none;\n `,\n ]}\n tabIndex={-1}\n ref={initialFocusRef}\n >\n {isEnabled ? 'Organizations feature enabled' : 'Organizations feature required'}\n </h1>\n </Flex>\n\n <Flex\n direction='col'\n align='start'\n sx={t => ({\n gap: t.sizes.$0x5,\n })}\n >\n {isEnabled ? (\n <p\n css={[\n basePromptElementStyles,\n css`\n color: #b4b4b4;\n font-size: 0.8125rem;\n font-weight: 400;\n line-height: 1.3;\n `,\n ]}\n >\n {clerk.user\n ? `The Organizations feature has been enabled for your application. A default organization named \"My Organization\" was created automatically. You can manage or rename it in your`\n : `The Organizations feature has been enabled for your application. You can manage it in your`}{' '}\n <Link\n href={organizationsDashboardUrl}\n target='_blank'\n rel='noopener noreferrer'\n >\n dashboard\n </Link>\n .\n </p>\n ) : (\n <>\n <p\n id={radioGroupLabelId}\n css={[\n basePromptElementStyles,\n css`\n color: #b4b4b4;\n font-size: 0.8125rem;\n font-weight: 400;\n line-height: 1.23;\n `,\n ]}\n >\n Enable Organizations to use{' '}\n <code\n css={[\n basePromptElementStyles,\n css`\n font-size: 0.75rem;\n color: white;\n font-family: monospace;\n line-height: 1.23;\n `,\n ]}\n >\n {isComponent ? `<${caller} />` : caller}\n </code>{' '}\n </p>\n\n <Link\n href='https://clerk.com/docs/guides/organizations/overview'\n target='_blank'\n rel='noopener noreferrer'\n >\n Learn more\n </Link>\n </>\n )}\n </Flex>\n\n {hasPersonalAccountsEnabled && !isEnabled && (\n <Flex\n sx={t => ({ marginTop: t.sizes.$2 })}\n direction='col'\n >\n <RadioGroup\n value={allowPersonalAccount ? 'optional' : 'required'}\n onChange={value => setAllowPersonalAccount(value === 'optional')}\n labelledBy={radioGroupLabelId}\n >\n <RadioGroupItem\n value='required'\n label={\n <Flex\n wrap='wrap'\n sx={t => ({ columnGap: t.sizes.$2, rowGap: t.sizes.$1 })}\n >\n <span>Membership required</span>\n <PromptBadge>Standard</PromptBadge>\n </Flex>\n }\n description={\n <>\n <span className='block'>Users need to belong to at least one organization.</span>\n <span>Common for most B2B SaaS applications</span>\n </>\n }\n />\n <RadioGroupItem\n value='optional'\n label='Membership optional'\n description='Users can work outside of an organization with a personal account'\n />\n </RadioGroup>\n </Flex>\n )}\n </Flex>\n\n <span\n css={css`\n height: 1px;\n display: block;\n width: calc(100% - 2px);\n margin-inline: auto;\n background-color: #151515;\n box-shadow: 0px 1px 0px 0px #424242;\n `}\n />\n\n <Flex\n justify='center'\n sx={t => ({\n padding: `${t.sizes.$4} ${t.sizes.$6}`,\n gap: t.sizes.$3,\n justifyContent: 'flex-end',\n })}\n >\n {isEnabled ? (\n <PromptButton\n variant='solid'\n onClick={() => {\n if (!clerk.user) {\n void clerk.redirectToSignIn();\n clerk.__internal_closeEnableOrganizationsPrompt?.();\n } else {\n onSuccess?.();\n }\n }}\n >\n {clerk.user ? 'Continue' : 'Sign in to continue'}\n </PromptButton>\n ) : (\n <>\n <PromptButton\n variant='outline'\n onClick={() => {\n clerk?.__internal_closeEnableOrganizationsPrompt?.();\n onClose?.();\n }}\n >\n I'll remove it myself\n </PromptButton>\n\n <PromptButton\n variant='solid'\n onClick={handleEnableOrganizations}\n disabled={isLoading}\n >\n Enable Organizations\n </PromptButton>\n </>\n )}\n </Flex>\n </PromptContainer>\n </Modal>\n </Portal>\n );\n};\n\n/**\n * A prompt that allows the user to enable the Organizations feature for their development instance\n * @internal\n */\nexport const EnableOrganizationsPrompt = (props: __internal_EnableOrganizationsPromptProps): JSX.Element => {\n return (\n <InternalThemeProvider>\n <EnableOrganizationsPromptInternal {...props} />\n </InternalThemeProvider>\n );\n};\n\nconst baseButtonStyles = css`\n ${basePromptElementStyles};\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 1.75rem;\n padding: 0.375rem 0.625rem;\n border-radius: 0.375rem;\n font-size: 0.75rem;\n font-weight: 500;\n letter-spacing: 0.12px;\n color: white;\n text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.32);\n white-space: nowrap;\n user-select: none;\n color: white;\n outline: none;\n\n &:not(:disabled) {\n transition: 120ms ease-in-out;\n transition-property: background-color, border-color, box-shadow, color;\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n &:focus-visible:not(:disabled) {\n outline: 2px solid white;\n outline-offset: 2px;\n }\n`;\n\nconst buttonSolidStyles = css`\n background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30.5%, rgba(0, 0, 0, 0.05) 100%), #454545;\n box-shadow:\n 0 0 3px 0 rgba(253, 224, 71, 0) inset,\n 0 0 0 1px rgba(255, 255, 255, 0.04) inset,\n 0 1px 0 0 rgba(255, 255, 255, 0.04) inset,\n 0 0 0 1px rgba(0, 0, 0, 0.12),\n 0 1.5px 2px 0 rgba(0, 0, 0, 0.48);\n\n &:hover:not(:disabled) {\n background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30.5%, rgba(0, 0, 0, 0.15) 100%), #5f5f5f;\n box-shadow:\n 0 0 3px 0 rgba(253, 224, 71, 0) inset,\n 0 0 0 1px rgba(255, 255, 255, 0.04) inset,\n 0 1px 0 0 rgba(255, 255, 255, 0.04) inset,\n 0 0 0 1px rgba(0, 0, 0, 0.12),\n 0 1.5px 2px 0 rgba(0, 0, 0, 0.48);\n }\n`;\n\nconst buttonOutlineStyles = css`\n border: 1px solid rgba(118, 118, 132, 0.25);\n background: rgba(69, 69, 69, 0.1);\n\n &:hover:not(:disabled) {\n border-color: rgba(118, 118, 132, 0.5);\n }\n`;\n\nconst buttonVariantStyles = {\n solid: buttonSolidStyles,\n outline: buttonOutlineStyles,\n} as const;\n\ntype PromptButtonVariant = keyof typeof buttonVariantStyles;\n\ntype PromptButtonProps = Pick<React.ComponentProps<'button'>, 'onClick' | 'children' | 'disabled'> & {\n variant?: PromptButtonVariant;\n};\n\nconst PromptButton = forwardRef<HTMLButtonElement, PromptButtonProps>(({ variant = 'solid', ...props }, ref) => {\n return (\n <button\n ref={ref}\n type='button'\n css={[baseButtonStyles, buttonVariantStyles[variant]]}\n {...props}\n />\n );\n});\n\ntype PromptBadgeProps = {\n children: React.ReactNode;\n};\n\nconst PromptBadge = ({ children }: PromptBadgeProps): JSX.Element => {\n return (\n <span\n css={css`\n ${basePromptElementStyles};\n display: inline-flex;\n align-items: center;\n padding: 0.125rem 0.375rem;\n border-radius: 0.25rem;\n font-size: 0.6875rem;\n font-weight: 500;\n line-height: 1.23;\n background-color: #ebebeb;\n color: #2b2b34;\n white-space: nowrap;\n `}\n >\n {children}\n </span>\n );\n};\n\ntype RadioGroupContextValue = {\n name: string;\n value: string;\n onChange: (value: string) => void;\n};\n\nconst [RadioGroupContext, useRadioGroup] = createContextAndHook<RadioGroupContextValue>('RadioGroupContext');\n\ntype RadioGroupProps = {\n value: string;\n onChange: (value: string) => void;\n children: React.ReactNode;\n labelledBy?: string;\n};\n\nconst RadioGroup = ({ value, onChange, children, labelledBy }: RadioGroupProps): JSX.Element => {\n const name = useId();\n const contextValue = React.useMemo(() => ({ value: { name, value, onChange } }), [name, value, onChange]);\n\n return (\n <RadioGroupContext.Provider value={contextValue}>\n <Flex\n role='radiogroup'\n direction='col'\n gap={3}\n aria-orientation='vertical'\n aria-labelledby={labelledBy}\n >\n {children}\n </Flex>\n </RadioGroupContext.Provider>\n );\n};\n\ntype RadioGroupItemProps = {\n value: string;\n label: React.ReactNode;\n description?: React.ReactNode;\n};\n\nconst RADIO_INDICATOR_SIZE = '1rem';\nconst RADIO_GAP = '0.5rem';\n\nconst RadioGroupItem = ({ value, label, description }: RadioGroupItemProps): JSX.Element => {\n const { name, value: selectedValue, onChange } = useRadioGroup();\n const descriptionId = useId();\n const checked = value === selectedValue;\n\n return (\n <Flex\n direction='col'\n gap={1}\n >\n <label\n css={css`\n ${basePromptElementStyles};\n display: flex;\n align-items: flex-start;\n gap: ${RADIO_GAP};\n cursor: pointer;\n user-select: none;\n\n &:has(input:focus-visible) > span:first-of-type {\n outline: 2px solid white;\n outline-offset: 2px;\n }\n\n &:hover:has(input:not(:checked)) > span:first-of-type {\n background-color: rgba(255, 255, 255, 0.08);\n }\n\n &:hover:has(input:checked) > span:first-of-type {\n background-color: rgba(108, 71, 255, 0.8);\n background-color: color-mix(in srgb, #6c47ff 80%, transparent);\n }\n `}\n >\n <input\n type='radio'\n name={name}\n value={value}\n checked={checked}\n onChange={() => onChange(value)}\n aria-describedby={description ? descriptionId : undefined}\n css={css`\n ${basePromptElementStyles};\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n `}\n />\n\n <span\n aria-hidden='true'\n css={css`\n ${basePromptElementStyles};\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ${RADIO_INDICATOR_SIZE};\n height: ${RADIO_INDICATOR_SIZE};\n margin-top: 0.125rem;\n flex-shrink: 0;\n border-radius: 50%;\n border: 1px solid rgba(255, 255, 255, 0.3);\n background-color: transparent;\n transition: 120ms ease-in-out;\n transition-property: border-color, background-color, box-shadow;\n\n ${checked &&\n css`\n border-width: 2px;\n border-color: #6c47ff;\n background-color: #6c47ff;\n background-color: color-mix(in srgb, #6c47ff 100%, transparent);\n box-shadow: 0 0 0 2px rgba(108, 71, 255, 0.2);\n `}\n\n &::after {\n content: '';\n position: absolute;\n width: 0.375rem;\n height: 0.375rem;\n border-radius: 50%;\n background-color: white;\n opacity: ${checked ? 1 : 0};\n transform: scale(${checked ? 1 : 0});\n transition: 120ms ease-in-out;\n transition-property: opacity, transform;\n }\n `}\n />\n\n <span\n css={[\n basePromptElementStyles,\n css`\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.25;\n color: white;\n `,\n ]}\n >\n {label}\n </span>\n </label>\n\n {description && (\n <span\n id={descriptionId}\n css={[\n basePromptElementStyles,\n css`\n padding-inline-start: calc(${RADIO_INDICATOR_SIZE} + ${RADIO_GAP});\n font-size: 0.75rem;\n line-height: 1.33;\n color: #c3c3c6;\n text-wrap: pretty;\n `,\n ]}\n >\n {description}\n </span>\n )}\n </Flex>\n );\n};\n\nconst Link = forwardRef<HTMLAnchorElement, React.ComponentProps<'a'> & { css?: SerializedStyles }>(\n ({ children, css: cssProp, ...props }, ref) => {\n return (\n <a\n ref={ref}\n {...props}\n css={[\n basePromptElementStyles,\n css`\n color: #a8a8ff;\n font-size: inherit;\n font-weight: 500;\n line-height: 1.3;\n font-size: 0.8125rem;\n min-width: 0;\n `,\n cssProp,\n ]}\n >\n {children}\n </a>\n );\n },\n);\n\nconst CoinFlip = ({ isEnabled }: { isEnabled: boolean }): JSX.Element => {\n const [rotation, setRotation] = useState(0);\n\n useLayoutEffect(() => {\n if (isEnabled) {\n setRotation(r => (r === 0 ? 180 : 0));\n return;\n }\n\n const interval = setInterval(() => {\n setRotation(r => (r === 0 ? 180 : 0));\n }, 2000);\n\n return () => clearInterval(interval);\n }, [isEnabled]);\n\n let frontFaceType: 'idle' | 'success' = 'idle';\n let backFaceType: 'warning' | 'success' = 'warning';\n\n if (isEnabled) {\n if (rotation === 0) {\n frontFaceType = 'success';\n backFaceType = 'warning';\n } else {\n backFaceType = 'success';\n frontFaceType = 'idle';\n }\n }\n\n const renderContent = (type: 'idle' | 'warning' | 'success') => {\n switch (type) {\n case 'idle':\n return <ClerkLogoIcon />;\n case 'success':\n return (\n <PromptSuccessIcon\n css={css`\n width: 1.25rem;\n height: 1.25rem;\n `}\n />\n );\n case 'warning':\n return (\n <svg\n css={css`\n width: 1.25rem;\n height: 1.25rem;\n `}\n viewBox='0 0 20 20'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n opacity='0.2'\n d='M17.25 10C17.25 14.0041 14.0041 17.25 10 17.25C5.99594 17.25 2.75 14.0041 2.75 10C2.75 5.99594 5.99594 2.75 10 2.75C14.0041 2.75 17.25 5.99594 17.25 10Z'\n fill='#EAB308'\n />\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M10 3.5C6.41015 3.5 3.5 6.41015 3.5 10C3.5 13.5899 6.41015 16.5 10 16.5C13.5899 16.5 16.5 13.5899 16.5 10C16.5 6.41015 13.5899 3.5 10 3.5ZM2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10Z'\n fill='#EAB308'\n />\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M10 6C10.5523 6 11 6.44772 11 7V9C11 9.55228 10.5523 10 10 10C9.44772 10 9 9.55228 9 9V7C9 6.44772 9.44772 6 10 6Z'\n fill='#EAB308'\n />\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M10 12C10.5523 12 11 12.4477 11 13V13.01C11 13.5623 10.5523 14.01 10 14.01C9.44772 14.01 9 13.5623 9 13.01V13C9 12.4477 9.44772 12 10 12Z'\n fill='#EAB308'\n />\n </svg>\n );\n }\n };\n\n return (\n <div\n css={css`\n perspective: 1000px;\n width: 1.25rem;\n height: 1.25rem;\n `}\n >\n <div\n css={css`\n position: relative;\n width: 100%;\n height: 100%;\n transform-style: preserve-3d;\n transition: transform 0.6s ease-in-out;\n transform: rotateY(${rotation}deg);\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n `}\n >\n <span\n aria-hidden\n css={css`\n position: absolute;\n width: 100%;\n height: 100%;\n backface-visibility: hidden;\n display: flex;\n align-items: center;\n justify-content: center;\n -webkit-font-smoothing: antialiased;\n transform: rotateY(0deg);\n `}\n >\n {renderContent(frontFaceType)}\n </span>\n\n <span\n aria-hidden\n css={css`\n position: absolute;\n width: 100%;\n height: 100%;\n backface-visibility: hidden;\n transform: rotateY(180deg);\n display: flex;\n align-items: center;\n justify-content: center;\n -webkit-font-smoothing: antialiased;\n `}\n >\n {renderContent(backFaceType)}\n </span>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAgBA,MAAM,4BAA4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IAAIC,gBAAoC;CACxC,IAAIC,eAAsC;AAE1C,KAAI,UACF,KAAI,aAAa,GAAG;AAClB,kBAAgB;AAChB,iBAAe;QACV;AACL,iBAAe;AACf,kBAAgB;;CAIpB,MAAM,iBAAiB,SAAyC;AAC9D,UAAQ,MAAR;GACE,KAAK,OACH,QAAO,oBAAC,kBAAgB;GAC1B,KAAK,UACH,QACE,oBAAC,qBACC,KAAK,GAAG;;;gBAIR;GAEN,KAAK,UACH,QACE,qBAAC;IACC,KAAK,GAAG;;;;IAIR,SAAQ;IACR,MAAK;IACL,OAAM;;KAEN,oBAAC;MACC,SAAQ;MACR,GAAE;MACF,MAAK;OACL;KACF,oBAAC;MACC,UAAS;MACT,UAAS;MACT,GAAE;MACF,MAAK;OACL;KACF,oBAAC;MACC,UAAS;MACT,UAAS;MACT,GAAE;MACF,MAAK;OACL;KACF,oBAAC;MACC,UAAS;MACT,UAAS;MACT,GAAE;MACF,MAAK;OACL;;KACE;;;AAKd,QACE,oBAAC;EACC,KAAK,GAAG;;;;;YAMR,qBAAC;GACC,KAAK,GAAG;;;;;;+BAMe,SAAS;;;;;;cAOhC,oBAAC;IACC;IACA,KAAK,GAAG;;;;;;;;;;;cAYP,cAAc,cAAc;KACxB,EAEP,oBAAC;IACC;IACA,KAAK,GAAG;;;;;;;;;;;cAYP,cAAc,aAAa;KACvB;IACH;GACF"}
|
|
@@ -444,7 +444,16 @@ const APPEARANCE_KEYS = containsAllElementsConfigKeys([
|
|
|
444
444
|
"subscriptionDetailsDetailRowValue",
|
|
445
445
|
"enterpriseConnectionsRoot",
|
|
446
446
|
"enterpriseConnectionButton",
|
|
447
|
-
"enterpriseConnectionButtonText"
|
|
447
|
+
"enterpriseConnectionButtonText",
|
|
448
|
+
"web3SolanaWalletButtonsRoot",
|
|
449
|
+
"web3SolanaWalletButtons",
|
|
450
|
+
"web3SolanaWalletButtonsIconButton",
|
|
451
|
+
"web3SolanaWalletButtonsBlockButton",
|
|
452
|
+
"web3SolanaWalletButtonsBlockButtonText",
|
|
453
|
+
"web3SolanaWalletButtonsWalletIcon",
|
|
454
|
+
"web3SolanaWalletButtonsWalletInitialIcon",
|
|
455
|
+
"walletIcon",
|
|
456
|
+
"walletInitialIcon"
|
|
448
457
|
]).map(camelize);
|
|
449
458
|
/**
|
|
450
459
|
* Turns a key from the ElementsConfig object to a targettable classname
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elementDescriptors.js","names":[],"sources":["../../src/customizables/elementDescriptors.ts"],"sourcesContent":["import type { ElementObjectKey, ElementsConfig, IdSelectors, StateSelectors } from '../internal/appearance';\nimport { containsAllOfType } from '../utils/containsAllOf';\nimport { fromEntries } from '../utils/fromEntries';\n\nexport const CLASS_PREFIX = 'cl-';\nexport const ID_CLASS_PREFIX = 'cl-id-';\nexport const OBJ_KEY_DELIMITER = '__';\n\nconst containsAllElementsConfigKeys = containsAllOfType<keyof ElementsConfig>();\nconst camelize = (s: string) => s.replace(/-./g, x => x[1].toUpperCase());\n/**\n * This object is strictly typed using the ElementsConfig type\n * and is used as the single source of truth to generate the\n * descriptor map\n */\nexport const APPEARANCE_KEYS = containsAllElementsConfigKeys([\n 'button',\n 'input',\n 'checkbox',\n 'radio',\n 'table',\n\n 'rootBox',\n 'cardBox',\n 'card',\n 'footerItem',\n 'popoverBox',\n\n 'disclosureRoot',\n 'disclosureTrigger',\n 'disclosureContentRoot',\n 'disclosureContentInner',\n 'disclosureContent',\n\n 'lineItemsRoot',\n 'lineItemsDivider',\n 'lineItemsGroup',\n 'lineItemsTitle',\n 'lineItemsTitleDescription',\n 'lineItemsDescription',\n 'lineItemsDescriptionInner',\n 'lineItemsDescriptionSuffix',\n 'lineItemsDescriptionPrefix',\n 'lineItemsDescriptionText',\n 'lineItemsCopyButton',\n 'lineItemsDowngradeNotice',\n\n 'actionCard',\n\n 'logoBox',\n 'logoImage',\n\n 'header',\n 'headerTitle',\n 'headerSubtitle',\n 'headerBackLink',\n\n 'main',\n\n 'footer',\n 'footerAction',\n 'footerActionText',\n 'footerActionLink',\n 'footerPages',\n 'footerPagesLink',\n\n 'backRow',\n 'backLink',\n\n 'socialButtonsRoot',\n 'socialButtons',\n 'socialButtonsIconButton',\n 'socialButtonsBlockButton',\n 'socialButtonsBlockButtonText',\n 'socialButtonsProviderIcon',\n 'socialButtonsProviderInitialIcon',\n\n 'lastAuthenticationStrategyBadge',\n\n 'enterpriseButtonsProviderIcon',\n\n 'providerIcon',\n 'providerInitialIcon',\n\n 'alternativeMethods',\n 'alternativeMethodsBlockButton',\n 'alternativeMethodsBlockButtonText',\n 'alternativeMethodsBlockButtonArrow',\n\n 'checkoutFormLineItemsRoot',\n 'checkoutFormElementsRoot',\n\n 'checkoutSuccessRoot',\n 'checkoutSuccessRings',\n 'checkoutSuccessBadge',\n 'checkoutSuccessTitle',\n 'checkoutSuccessDescription',\n\n 'otpCodeField',\n 'otpCodeFieldInputs',\n 'otpCodeFieldInput',\n 'otpCodeFieldInputContainer',\n 'otpCodeFieldErrorText',\n 'otpCodeFieldSuccessText',\n 'formResendCodeLink',\n\n 'dividerRow',\n 'dividerColumn',\n 'dividerText',\n 'dividerLine',\n\n 'drawerBackdrop',\n 'drawerRoot',\n 'drawerContent',\n 'drawerHeader',\n 'drawerTitle',\n 'drawerBody',\n 'drawerFooter',\n 'drawerFooterTitle',\n 'drawerFooterDescription',\n 'drawerClose',\n 'drawerConfirmationBackdrop',\n 'drawerConfirmationRoot',\n 'drawerConfirmationTitle',\n 'drawerConfirmationDescription',\n 'drawerConfirmationActions',\n\n 'formHeader',\n 'formHeaderTitle',\n 'formHeaderSubtitle',\n\n 'verificationLinkStatusBox',\n 'verificationLinkStatusIconBox',\n 'verificationLinkStatusIcon',\n 'verificationLinkStatusText',\n\n 'form',\n 'formContainer',\n 'formFieldRow',\n 'formField',\n 'formFieldLabelRow',\n 'formFieldLabel',\n 'formFieldRadioGroup',\n 'formFieldRadioGroupItem',\n 'formFieldRadioInput',\n 'formFieldRadioLabel',\n 'formFieldRadioLabelTitle',\n 'formFieldRadioLabelDescription',\n 'formFieldCheckboxInput',\n 'formFieldCheckboxLabel',\n 'formFieldAction',\n 'formFieldInput',\n 'formFieldErrorText',\n 'formFieldWarningText',\n 'formFieldSuccessText',\n 'formFieldInfoText',\n 'formFieldHintText',\n 'formButtonPrimary',\n 'formButtonReset',\n 'formFieldInputGroup',\n 'formFieldInputShowPasswordButton',\n 'formFieldInputShowPasswordIcon',\n 'formFieldInputCopyToClipboardButton',\n 'formFieldInputCopyToClipboardIcon',\n\n 'phoneInputBox',\n 'formInputGroup',\n\n 'avatarBox',\n 'avatarImage',\n 'avatarImageActions',\n 'avatarImageActionsUpload',\n 'avatarImageActionsRemove',\n\n 'userButtonBox',\n 'userButtonOuterIdentifier',\n 'userButtonTrigger',\n 'userButtonAvatarBox',\n 'userButtonAvatarImage',\n 'userButtonPopoverRootBox',\n 'userButtonPopoverCard',\n 'userButtonPopoverMain',\n 'userButtonPopoverActions',\n 'userButtonPopoverActionButton',\n 'userButtonPopoverActionButtonIconBox',\n 'userButtonPopoverActionButtonIcon',\n 'userButtonPopoverCustomItemButton',\n 'userButtonPopoverCustomItemButtonIconBox',\n 'userButtonPopoverActionItemButtonIcon',\n 'userButtonPopoverFooter',\n 'userButtonPopoverFooterPagesLink',\n\n 'organizationSwitcherTrigger',\n 'organizationSwitcherTriggerIcon',\n 'organizationSwitcherPopoverRootBox',\n 'organizationSwitcherPopoverCard',\n 'organizationSwitcherPopoverMain',\n 'organizationSwitcherPopoverActions',\n 'organizationSwitcherPopoverInvitationActions',\n 'organizationSwitcherPopoverInvitationActionsBox',\n 'organizationSwitcherPopoverActionButton',\n 'organizationSwitcherPreviewButton',\n 'organizationSwitcherInvitationAcceptButton',\n 'organizationSwitcherPopoverActionButtonIconBox',\n 'organizationSwitcherPopoverActionButtonIcon',\n 'organizationSwitcherPopoverFooter',\n\n 'organizationProfileMembersSearchInputIcon',\n 'organizationProfileMembersSearchInput',\n\n 'organizationListPreviewItems',\n 'organizationListPreviewItem',\n 'organizationListPreviewButton',\n 'organizationListPreviewItemActionButton',\n 'organizationListCreateOrganizationActionButton',\n\n 'taskChooseOrganizationPreviewItem',\n 'taskChooseOrganizationPreviewItems',\n 'taskChooseOrganizationCreateOrganizationActionButton',\n 'taskChooseOrganizationPreviewButton',\n\n 'userAvatarBox',\n 'userAvatarImage',\n\n 'userPreview',\n 'userPreviewAvatarContainer',\n 'userPreviewAvatarBox',\n 'userPreviewAvatarImage',\n 'userPreviewAvatarIcon',\n 'userPreviewTextContainer',\n 'userPreviewMainIdentifier',\n 'userPreviewMainIdentifierText',\n 'userPreviewSecondaryIdentifier',\n\n 'organizationPreview',\n 'organizationPreviewAvatarContainer',\n 'organizationPreviewAvatarBox',\n 'organizationPreviewAvatarImage',\n 'organizationPreviewTextContainer',\n 'organizationPreviewMainIdentifier',\n 'organizationPreviewSecondaryIdentifier',\n\n 'organizationAvatarUploaderContainer',\n\n 'membersPageInviteButton',\n\n 'identityPreview',\n 'identityPreviewText',\n 'identityPreviewEditButton',\n 'identityPreviewEditButtonIcon',\n\n 'passkeyIcon',\n\n 'accountSwitcherActionButton',\n 'accountSwitcherActionButtonIconBox',\n 'accountSwitcherActionButtonIcon',\n\n 'pricingTable',\n 'pricingTableCard',\n 'pricingTableCardHeader',\n 'pricingTableCardTitleContainer',\n 'pricingTableCardTitle',\n 'pricingTableCardDescription',\n 'pricingTableCardBody',\n 'pricingTableCardStatusRow',\n 'pricingTableCardStatus',\n 'pricingTableCardFeatures',\n 'pricingTableCardFeaturesList',\n 'pricingTableCardFeaturesListItem',\n 'pricingTableCardFeaturesListItemContent',\n 'pricingTableCardFeaturesListItemTitle',\n 'pricingTableCardPeriodToggle',\n 'pricingTableCardFeeContainer',\n 'pricingTableCardFee',\n 'pricingTableCardFeePeriod',\n 'pricingTableCardFeePeriodNotice',\n 'pricingTableCardFooter',\n 'pricingTableCardFooterButton',\n 'pricingTableCardFooterNotice',\n\n 'pricingTableMatrix',\n 'pricingTableMatrixTable',\n 'pricingTableMatrixRowGroup',\n 'pricingTableMatrixRowGroupHeader',\n 'pricingTableMatrixRowGroupBody',\n 'pricingTableMatrixRow',\n 'pricingTableMatrixRowHeader',\n 'pricingTableMatrixRowBody',\n 'pricingTableMatrixColumnHeader',\n 'pricingTableMatrixCell',\n 'pricingTableMatrixCellFooter',\n 'pricingTableMatrixAvatar',\n 'pricingTableMatrixBadge',\n 'pricingTableMatrixPlanName',\n 'pricingTableMatrixFee',\n 'pricingTableMatrixFeePeriod',\n 'pricingTableMatrixFeePeriodNotice',\n 'pricingTableMatrixFeePeriodNoticeInner',\n 'pricingTableMatrixFeePeriodNoticeLabel',\n 'pricingTableMatrixFooter',\n\n 'planDetailHeader',\n 'planDetailAvatar',\n 'planDetailBadgeAvatarTitleDescriptionContainer',\n 'planDetailBadgeContainer',\n 'planDetailBadge',\n 'planDetailTitle',\n 'planDetailTitleDescriptionContainer',\n 'planDetailDescription',\n 'planDetailAction',\n 'planDetailFeeContainer',\n 'planDetailFee',\n 'planDetailFeePeriod',\n 'planDetailFeePeriodNotice',\n 'planDetailFeePeriodNoticeInner',\n 'planDetailFeePeriodNoticeLabel',\n 'planDetailCaption',\n 'planDetailFeatures',\n 'planDetailFeaturesList',\n 'planDetailFeaturesListItem',\n 'planDetailFeaturesListItemContent',\n 'planDetailFeaturesListItemTitle',\n 'planDetailFeaturesListItemDescription',\n 'planDetailPeriodToggle',\n\n 'segmentedControlRoot',\n 'segmentedControlButton',\n\n 'switchRoot',\n 'switchIndicator',\n 'switchThumb',\n 'switchLabel',\n\n 'alert',\n 'alertIcon',\n 'alertText',\n 'alertTextContainer',\n\n 'tagInputContainer',\n 'tagPillIcon',\n 'tagPillContainer',\n\n 'tabPanel',\n 'tabButton',\n 'tabListContainer',\n\n 'tableHead',\n 'tableBody',\n 'tableRow',\n 'tableHeaderCell',\n 'tableBodyCell',\n\n 'paginationButton',\n 'paginationButtonIcon',\n 'paginationRowText',\n\n 'selectButton',\n 'selectSearchInput',\n 'selectButtonIcon',\n 'selectOptionsContainer',\n 'selectOption',\n\n 'paymentMethodRow',\n 'paymentMethodRowIcon',\n 'paymentMethodRowText',\n 'paymentMethodRowType',\n 'paymentMethodRowValue',\n 'paymentMethodRowBadge',\n\n 'statementRoot',\n 'statementHeader',\n 'statementHeaderTitleContainer',\n 'statementHeaderTitle',\n 'statementHeaderBadge',\n 'statementBody',\n 'statementSection',\n 'statementSectionHeader',\n 'statementSectionHeaderTitle',\n 'statementSectionContent',\n 'statementSectionContentItem',\n 'statementSectionContentDetailsList',\n 'statementSectionContentDetailsListItem',\n 'statementSectionContentDetailsListItemLabelContainer',\n 'statementSectionContentDetailsListItemLabel',\n 'statementSectionContentDetailsListItemValue',\n 'statementSectionContentDetailsHeader',\n 'statementSectionContentDetailsHeaderItem',\n 'statementSectionContentDetailsHeaderItemIcon',\n 'statementSectionContentDetailsHeaderTitle',\n 'statementSectionContentDetailsHeaderDescription',\n 'statementSectionContentDetailsHeaderSecondaryTitle',\n 'statementSectionContentDetailsHeaderSecondaryDescription',\n 'statementFooter',\n 'statementFooterLabel',\n 'statementFooterValueContainer',\n 'statementFooterCurrency',\n 'statementFooterValue',\n 'statementCopyButton',\n 'menuButton',\n 'menuButtonEllipsis',\n 'menuButtonEllipsisBordered',\n 'menuList',\n 'menuItem',\n\n 'paymentAttemptRoot',\n 'paymentAttemptHeader',\n 'paymentAttemptHeaderTitleContainer',\n 'paymentAttemptHeaderTitle',\n 'paymentAttemptHeaderBadge',\n 'paymentAttemptBody',\n 'paymentAttemptFooter',\n 'paymentAttemptFooterLabel',\n 'paymentAttemptFooterValueContainer',\n 'paymentAttemptFooterCurrency',\n 'paymentAttemptFooterValue',\n 'paymentAttemptCopyButton',\n\n 'modalBackdrop',\n 'modalContent',\n 'modalCloseButton',\n\n 'profileSection',\n 'profileSectionItemList',\n 'profileSectionItem',\n 'profileSectionHeader',\n 'profileSectionTitle',\n 'profileSectionTitleText',\n 'profileSectionSubtitle',\n 'profileSectionSubtitleText',\n 'profileSectionContent',\n 'profileSectionPrimaryButton',\n 'profileSectionButtonGroup',\n 'profilePage',\n\n 'formattedPhoneNumber',\n 'formattedPhoneNumberFlag',\n 'formattedPhoneNumberText',\n\n 'formattedDate',\n\n 'scrollBox',\n\n 'navbar',\n 'navbarButtons',\n 'navbarButton',\n 'navbarButtonIcon',\n 'navbarButtonText',\n 'navbarMobileMenuRow',\n 'navbarMobileMenuButton',\n 'navbarMobileMenuButtonIcon',\n\n 'pageScrollBox',\n 'page',\n\n 'activeDevice',\n 'activeDeviceListItem',\n 'activeDeviceIcon',\n\n 'impersonationFab',\n 'impersonationFabIcon',\n 'impersonationFabIconContainer',\n 'impersonationFabTitle',\n 'impersonationFabActionLink',\n\n 'invitationsSentIconBox',\n 'invitationsSentIcon',\n\n 'qrCodeRow',\n 'qrCodeContainer',\n\n 'tooltip',\n 'tooltipContent',\n 'tooltipText',\n\n 'badge',\n 'notificationBadge',\n 'buttonArrowIcon',\n 'spinner',\n\n 'apiKeys',\n 'apiKeysHeader',\n 'apiKeysSearchBox',\n 'apiKeysSearchInput',\n 'apiKeysAddButton',\n 'apiKeysTable',\n 'apiKeysCopyButton',\n 'apiKeysRevealButton',\n 'apiKeysCreateForm',\n 'apiKeysCreateFormNameInput',\n 'apiKeysCreateFormDescriptionInput',\n 'apiKeysCreateFormExpirationInput',\n 'apiKeysCreateFormSubmitButton',\n 'apiKeysCreateFormExpirationCaption',\n 'apiKeysRevokeModal',\n 'apiKeysRevokeModalInput',\n 'apiKeysRevokeModalSubmitButton',\n 'apiKeysCopyModal',\n 'apiKeysCopyModalInput',\n 'apiKeysCopyModalSubmitButton',\n\n 'subscriptionDetailsCard',\n 'subscriptionDetailsCardHeader',\n 'subscriptionDetailsCardBadge',\n 'subscriptionDetailsCardTitle',\n 'subscriptionDetailsCardBody',\n 'subscriptionDetailsCardFooter',\n 'subscriptionDetailsCardActions',\n 'subscriptionDetailsActionButton',\n 'subscriptionDetailsCancelButton',\n 'subscriptionDetailsDetailRow',\n 'subscriptionDetailsDetailRowLabel',\n 'subscriptionDetailsDetailRowValue',\n\n 'enterpriseConnectionsRoot',\n 'enterpriseConnectionButton',\n 'enterpriseConnectionButtonText',\n] as const).map(camelize) as (keyof ElementsConfig)[];\n\ntype TargettableClassname<K extends keyof ElementsConfig> = `${typeof CLASS_PREFIX}${K}`;\ntype AllowedIds<T extends keyof ElementsConfig> = ElementsConfig[T]['ids'];\ntype AllowedStates<T extends keyof ElementsConfig> = ElementsConfig[T]['states'];\ntype ObjectKeyWithState<K extends keyof ElementsConfig> = StateSelectors<K, ElementsConfig[K]['states']>;\ntype ObjectKeyWithIds<K extends keyof ElementsConfig> = IdSelectors<K, ElementsConfig[K]['ids']>;\ntype ObjectKeyWithIdAndState<K extends keyof ElementsConfig> = StateSelectors<\n IdSelectors<K, ElementsConfig[K]['ids']>,\n ElementsConfig[K]['states']\n>;\n\nexport type ElementId<Id = string> = { id: Id; __type: 'id' };\nexport type ElementDescriptor<K extends keyof ElementsConfig = any> = {\n targettableClassname: TargettableClassname<K>;\n objectKey: ElementObjectKey<K>;\n getTargettableIdClassname: (params: { id: AllowedIds<K> | never }) => string;\n getObjectKeyWithState: (state: AllowedStates<K> | never) => ObjectKeyWithState<K>;\n getObjectKeyWithId: (param: ElementId<AllowedIds<K>> | never) => ObjectKeyWithIds<K>;\n getObjectKeyWithIdAndState: (id: ElementId<AllowedIds<K>>, state: AllowedStates<K>) => ObjectKeyWithIdAndState<K>;\n setId: <Id extends AllowedIds<K>>(id?: Id) => ElementId<Id> | undefined;\n};\n\ntype ElementDescriptors = { [k in keyof ElementsConfig as ElementObjectKey<k>]: ElementDescriptor<k> };\n\n/**\n * Turns a key from the ElementsConfig object to a targettable classname\n * socialButtons-buttonIcon -> cl-socialButtons-buttonIcon\n */\nconst toTargettableClassname = <K extends keyof ElementsConfig>(key: K): TargettableClassname<K> => {\n return (CLASS_PREFIX + (key as string)) as TargettableClassname<K>;\n};\n\n/**\n * Turns a key from the ElementsConfig object to a appearance.elements key\n * socialButtons-buttonIcon -> socialButtonsButtonIcon\n */\nconst toObjectKey = <K extends keyof ElementsConfig>(key: K): ElementObjectKey<K> => {\n return key.replace(/([-][a-z])/, match => match[1].toUpperCase()) as ElementObjectKey<K>;\n};\n\nconst createElementDescriptor = <K extends keyof ElementsConfig>(key: K): ElementDescriptor<K> => {\n const objectKey = toObjectKey(key);\n return {\n objectKey,\n targettableClassname: toTargettableClassname(key),\n // getTargettableIdClassname: params => ID_CLASS_PREFIX + params.id,\n getTargettableIdClassname: params => toTargettableClassname(key) + '__' + params.id,\n getObjectKeyWithState: state => (objectKey + OBJ_KEY_DELIMITER + state) as any,\n getObjectKeyWithId: idObj => (objectKey + OBJ_KEY_DELIMITER + idObj.id) as any,\n getObjectKeyWithIdAndState: (idObj, state) =>\n (objectKey + OBJ_KEY_DELIMITER + idObj.id + OBJ_KEY_DELIMITER + state) as any,\n setId: id => (id ? { id, __type: 'id' } : undefined),\n };\n};\n\nconst createDescriptorMap = <K extends keyof ElementsConfig>(keys = APPEARANCE_KEYS): ElementDescriptors => {\n const entries = keys.map(key => [toObjectKey(key), createElementDescriptor(key)]) as unknown as Array<\n [K, ElementDescriptor<K>]\n >;\n return fromEntries(entries) as unknown as ElementDescriptors;\n};\n\nexport const descriptors = createDescriptorMap();\n"],"mappings":";;;;AAIA,MAAa,eAAe;AAE5B,MAAa,oBAAoB;AAEjC,MAAM,gCAAgC,mBAAyC;AAC/E,MAAM,YAAY,MAAc,EAAE,QAAQ,QAAO,MAAK,EAAE,GAAG,aAAa,CAAC;;;;;;AAMzE,MAAa,kBAAkB,8BAA8B;CAC3D;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CAEA;CACA;CAEA;CACA;CACA;CACA;CAEA;CAEA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CAEA;CAEA;CACA;CAEA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CAEA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CAEA;CAEA;CACA;CACA;CACA;CAEA;CAEA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CAEA;CACA;CACA;CAEA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CAEA;CAEA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CAEA;CACA;CACA;CAEA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACD,CAAU,CAAC,IAAI,SAAS;;;;;AA6BzB,MAAM,0BAA0D,QAAoC;AAClG,QAAQ,eAAgB;;;;;;AAO1B,MAAM,eAA+C,QAAgC;AACnF,QAAO,IAAI,QAAQ,eAAc,UAAS,MAAM,GAAG,aAAa,CAAC;;AAGnE,MAAM,2BAA2D,QAAiC;CAChG,MAAM,YAAY,YAAY,IAAI;AAClC,QAAO;EACL;EACA,sBAAsB,uBAAuB,IAAI;EAEjD,4BAA2B,WAAU,uBAAuB,IAAI,GAAG,OAAO,OAAO;EACjF,wBAAuB,UAAU,YAAY,oBAAoB;EACjE,qBAAoB,UAAU,YAAY,oBAAoB,MAAM;EACpE,6BAA6B,OAAO,UACjC,YAAY,oBAAoB,MAAM,KAAK,oBAAoB;EAClE,QAAO,OAAO,KAAK;GAAE;GAAI,QAAQ;GAAM,GAAG;EAC3C;;AAGH,MAAM,uBAAuD,OAAO,oBAAwC;AAI1G,QAAO,YAHS,KAAK,KAAI,QAAO,CAAC,YAAY,IAAI,EAAE,wBAAwB,IAAI,CAAC,CAAC,CAGtD;;AAG7B,MAAa,cAAc,qBAAqB"}
|
|
1
|
+
{"version":3,"file":"elementDescriptors.js","names":[],"sources":["../../src/customizables/elementDescriptors.ts"],"sourcesContent":["import type { ElementObjectKey, ElementsConfig, IdSelectors, StateSelectors } from '../internal/appearance';\nimport { containsAllOfType } from '../utils/containsAllOf';\nimport { fromEntries } from '../utils/fromEntries';\n\nexport const CLASS_PREFIX = 'cl-';\nexport const ID_CLASS_PREFIX = 'cl-id-';\nexport const OBJ_KEY_DELIMITER = '__';\n\nconst containsAllElementsConfigKeys = containsAllOfType<keyof ElementsConfig>();\nconst camelize = (s: string) => s.replace(/-./g, x => x[1].toUpperCase());\n/**\n * This object is strictly typed using the ElementsConfig type\n * and is used as the single source of truth to generate the\n * descriptor map\n */\nexport const APPEARANCE_KEYS = containsAllElementsConfigKeys([\n 'button',\n 'input',\n 'checkbox',\n 'radio',\n 'table',\n\n 'rootBox',\n 'cardBox',\n 'card',\n 'footerItem',\n 'popoverBox',\n\n 'disclosureRoot',\n 'disclosureTrigger',\n 'disclosureContentRoot',\n 'disclosureContentInner',\n 'disclosureContent',\n\n 'lineItemsRoot',\n 'lineItemsDivider',\n 'lineItemsGroup',\n 'lineItemsTitle',\n 'lineItemsTitleDescription',\n 'lineItemsDescription',\n 'lineItemsDescriptionInner',\n 'lineItemsDescriptionSuffix',\n 'lineItemsDescriptionPrefix',\n 'lineItemsDescriptionText',\n 'lineItemsCopyButton',\n 'lineItemsDowngradeNotice',\n\n 'actionCard',\n\n 'logoBox',\n 'logoImage',\n\n 'header',\n 'headerTitle',\n 'headerSubtitle',\n 'headerBackLink',\n\n 'main',\n\n 'footer',\n 'footerAction',\n 'footerActionText',\n 'footerActionLink',\n 'footerPages',\n 'footerPagesLink',\n\n 'backRow',\n 'backLink',\n\n 'socialButtonsRoot',\n 'socialButtons',\n 'socialButtonsIconButton',\n 'socialButtonsBlockButton',\n 'socialButtonsBlockButtonText',\n 'socialButtonsProviderIcon',\n 'socialButtonsProviderInitialIcon',\n\n 'lastAuthenticationStrategyBadge',\n\n 'enterpriseButtonsProviderIcon',\n\n 'providerIcon',\n 'providerInitialIcon',\n\n 'alternativeMethods',\n 'alternativeMethodsBlockButton',\n 'alternativeMethodsBlockButtonText',\n 'alternativeMethodsBlockButtonArrow',\n\n 'checkoutFormLineItemsRoot',\n 'checkoutFormElementsRoot',\n\n 'checkoutSuccessRoot',\n 'checkoutSuccessRings',\n 'checkoutSuccessBadge',\n 'checkoutSuccessTitle',\n 'checkoutSuccessDescription',\n\n 'otpCodeField',\n 'otpCodeFieldInputs',\n 'otpCodeFieldInput',\n 'otpCodeFieldInputContainer',\n 'otpCodeFieldErrorText',\n 'otpCodeFieldSuccessText',\n 'formResendCodeLink',\n\n 'dividerRow',\n 'dividerColumn',\n 'dividerText',\n 'dividerLine',\n\n 'drawerBackdrop',\n 'drawerRoot',\n 'drawerContent',\n 'drawerHeader',\n 'drawerTitle',\n 'drawerBody',\n 'drawerFooter',\n 'drawerFooterTitle',\n 'drawerFooterDescription',\n 'drawerClose',\n 'drawerConfirmationBackdrop',\n 'drawerConfirmationRoot',\n 'drawerConfirmationTitle',\n 'drawerConfirmationDescription',\n 'drawerConfirmationActions',\n\n 'formHeader',\n 'formHeaderTitle',\n 'formHeaderSubtitle',\n\n 'verificationLinkStatusBox',\n 'verificationLinkStatusIconBox',\n 'verificationLinkStatusIcon',\n 'verificationLinkStatusText',\n\n 'form',\n 'formContainer',\n 'formFieldRow',\n 'formField',\n 'formFieldLabelRow',\n 'formFieldLabel',\n 'formFieldRadioGroup',\n 'formFieldRadioGroupItem',\n 'formFieldRadioInput',\n 'formFieldRadioLabel',\n 'formFieldRadioLabelTitle',\n 'formFieldRadioLabelDescription',\n 'formFieldCheckboxInput',\n 'formFieldCheckboxLabel',\n 'formFieldAction',\n 'formFieldInput',\n 'formFieldErrorText',\n 'formFieldWarningText',\n 'formFieldSuccessText',\n 'formFieldInfoText',\n 'formFieldHintText',\n 'formButtonPrimary',\n 'formButtonReset',\n 'formFieldInputGroup',\n 'formFieldInputShowPasswordButton',\n 'formFieldInputShowPasswordIcon',\n 'formFieldInputCopyToClipboardButton',\n 'formFieldInputCopyToClipboardIcon',\n\n 'phoneInputBox',\n 'formInputGroup',\n\n 'avatarBox',\n 'avatarImage',\n 'avatarImageActions',\n 'avatarImageActionsUpload',\n 'avatarImageActionsRemove',\n\n 'userButtonBox',\n 'userButtonOuterIdentifier',\n 'userButtonTrigger',\n 'userButtonAvatarBox',\n 'userButtonAvatarImage',\n 'userButtonPopoverRootBox',\n 'userButtonPopoverCard',\n 'userButtonPopoverMain',\n 'userButtonPopoverActions',\n 'userButtonPopoverActionButton',\n 'userButtonPopoverActionButtonIconBox',\n 'userButtonPopoverActionButtonIcon',\n 'userButtonPopoverCustomItemButton',\n 'userButtonPopoverCustomItemButtonIconBox',\n 'userButtonPopoverActionItemButtonIcon',\n 'userButtonPopoverFooter',\n 'userButtonPopoverFooterPagesLink',\n\n 'organizationSwitcherTrigger',\n 'organizationSwitcherTriggerIcon',\n 'organizationSwitcherPopoverRootBox',\n 'organizationSwitcherPopoverCard',\n 'organizationSwitcherPopoverMain',\n 'organizationSwitcherPopoverActions',\n 'organizationSwitcherPopoverInvitationActions',\n 'organizationSwitcherPopoverInvitationActionsBox',\n 'organizationSwitcherPopoverActionButton',\n 'organizationSwitcherPreviewButton',\n 'organizationSwitcherInvitationAcceptButton',\n 'organizationSwitcherPopoverActionButtonIconBox',\n 'organizationSwitcherPopoverActionButtonIcon',\n 'organizationSwitcherPopoverFooter',\n\n 'organizationProfileMembersSearchInputIcon',\n 'organizationProfileMembersSearchInput',\n\n 'organizationListPreviewItems',\n 'organizationListPreviewItem',\n 'organizationListPreviewButton',\n 'organizationListPreviewItemActionButton',\n 'organizationListCreateOrganizationActionButton',\n\n 'taskChooseOrganizationPreviewItem',\n 'taskChooseOrganizationPreviewItems',\n 'taskChooseOrganizationCreateOrganizationActionButton',\n 'taskChooseOrganizationPreviewButton',\n\n 'userAvatarBox',\n 'userAvatarImage',\n\n 'userPreview',\n 'userPreviewAvatarContainer',\n 'userPreviewAvatarBox',\n 'userPreviewAvatarImage',\n 'userPreviewAvatarIcon',\n 'userPreviewTextContainer',\n 'userPreviewMainIdentifier',\n 'userPreviewMainIdentifierText',\n 'userPreviewSecondaryIdentifier',\n\n 'organizationPreview',\n 'organizationPreviewAvatarContainer',\n 'organizationPreviewAvatarBox',\n 'organizationPreviewAvatarImage',\n 'organizationPreviewTextContainer',\n 'organizationPreviewMainIdentifier',\n 'organizationPreviewSecondaryIdentifier',\n\n 'organizationAvatarUploaderContainer',\n\n 'membersPageInviteButton',\n\n 'identityPreview',\n 'identityPreviewText',\n 'identityPreviewEditButton',\n 'identityPreviewEditButtonIcon',\n\n 'passkeyIcon',\n\n 'accountSwitcherActionButton',\n 'accountSwitcherActionButtonIconBox',\n 'accountSwitcherActionButtonIcon',\n\n 'pricingTable',\n 'pricingTableCard',\n 'pricingTableCardHeader',\n 'pricingTableCardTitleContainer',\n 'pricingTableCardTitle',\n 'pricingTableCardDescription',\n 'pricingTableCardBody',\n 'pricingTableCardStatusRow',\n 'pricingTableCardStatus',\n 'pricingTableCardFeatures',\n 'pricingTableCardFeaturesList',\n 'pricingTableCardFeaturesListItem',\n 'pricingTableCardFeaturesListItemContent',\n 'pricingTableCardFeaturesListItemTitle',\n 'pricingTableCardPeriodToggle',\n 'pricingTableCardFeeContainer',\n 'pricingTableCardFee',\n 'pricingTableCardFeePeriod',\n 'pricingTableCardFeePeriodNotice',\n 'pricingTableCardFooter',\n 'pricingTableCardFooterButton',\n 'pricingTableCardFooterNotice',\n\n 'pricingTableMatrix',\n 'pricingTableMatrixTable',\n 'pricingTableMatrixRowGroup',\n 'pricingTableMatrixRowGroupHeader',\n 'pricingTableMatrixRowGroupBody',\n 'pricingTableMatrixRow',\n 'pricingTableMatrixRowHeader',\n 'pricingTableMatrixRowBody',\n 'pricingTableMatrixColumnHeader',\n 'pricingTableMatrixCell',\n 'pricingTableMatrixCellFooter',\n 'pricingTableMatrixAvatar',\n 'pricingTableMatrixBadge',\n 'pricingTableMatrixPlanName',\n 'pricingTableMatrixFee',\n 'pricingTableMatrixFeePeriod',\n 'pricingTableMatrixFeePeriodNotice',\n 'pricingTableMatrixFeePeriodNoticeInner',\n 'pricingTableMatrixFeePeriodNoticeLabel',\n 'pricingTableMatrixFooter',\n\n 'planDetailHeader',\n 'planDetailAvatar',\n 'planDetailBadgeAvatarTitleDescriptionContainer',\n 'planDetailBadgeContainer',\n 'planDetailBadge',\n 'planDetailTitle',\n 'planDetailTitleDescriptionContainer',\n 'planDetailDescription',\n 'planDetailAction',\n 'planDetailFeeContainer',\n 'planDetailFee',\n 'planDetailFeePeriod',\n 'planDetailFeePeriodNotice',\n 'planDetailFeePeriodNoticeInner',\n 'planDetailFeePeriodNoticeLabel',\n 'planDetailCaption',\n 'planDetailFeatures',\n 'planDetailFeaturesList',\n 'planDetailFeaturesListItem',\n 'planDetailFeaturesListItemContent',\n 'planDetailFeaturesListItemTitle',\n 'planDetailFeaturesListItemDescription',\n 'planDetailPeriodToggle',\n\n 'segmentedControlRoot',\n 'segmentedControlButton',\n\n 'switchRoot',\n 'switchIndicator',\n 'switchThumb',\n 'switchLabel',\n\n 'alert',\n 'alertIcon',\n 'alertText',\n 'alertTextContainer',\n\n 'tagInputContainer',\n 'tagPillIcon',\n 'tagPillContainer',\n\n 'tabPanel',\n 'tabButton',\n 'tabListContainer',\n\n 'tableHead',\n 'tableBody',\n 'tableRow',\n 'tableHeaderCell',\n 'tableBodyCell',\n\n 'paginationButton',\n 'paginationButtonIcon',\n 'paginationRowText',\n\n 'selectButton',\n 'selectSearchInput',\n 'selectButtonIcon',\n 'selectOptionsContainer',\n 'selectOption',\n\n 'paymentMethodRow',\n 'paymentMethodRowIcon',\n 'paymentMethodRowText',\n 'paymentMethodRowType',\n 'paymentMethodRowValue',\n 'paymentMethodRowBadge',\n\n 'statementRoot',\n 'statementHeader',\n 'statementHeaderTitleContainer',\n 'statementHeaderTitle',\n 'statementHeaderBadge',\n 'statementBody',\n 'statementSection',\n 'statementSectionHeader',\n 'statementSectionHeaderTitle',\n 'statementSectionContent',\n 'statementSectionContentItem',\n 'statementSectionContentDetailsList',\n 'statementSectionContentDetailsListItem',\n 'statementSectionContentDetailsListItemLabelContainer',\n 'statementSectionContentDetailsListItemLabel',\n 'statementSectionContentDetailsListItemValue',\n 'statementSectionContentDetailsHeader',\n 'statementSectionContentDetailsHeaderItem',\n 'statementSectionContentDetailsHeaderItemIcon',\n 'statementSectionContentDetailsHeaderTitle',\n 'statementSectionContentDetailsHeaderDescription',\n 'statementSectionContentDetailsHeaderSecondaryTitle',\n 'statementSectionContentDetailsHeaderSecondaryDescription',\n 'statementFooter',\n 'statementFooterLabel',\n 'statementFooterValueContainer',\n 'statementFooterCurrency',\n 'statementFooterValue',\n 'statementCopyButton',\n 'menuButton',\n 'menuButtonEllipsis',\n 'menuButtonEllipsisBordered',\n 'menuList',\n 'menuItem',\n\n 'paymentAttemptRoot',\n 'paymentAttemptHeader',\n 'paymentAttemptHeaderTitleContainer',\n 'paymentAttemptHeaderTitle',\n 'paymentAttemptHeaderBadge',\n 'paymentAttemptBody',\n 'paymentAttemptFooter',\n 'paymentAttemptFooterLabel',\n 'paymentAttemptFooterValueContainer',\n 'paymentAttemptFooterCurrency',\n 'paymentAttemptFooterValue',\n 'paymentAttemptCopyButton',\n\n 'modalBackdrop',\n 'modalContent',\n 'modalCloseButton',\n\n 'profileSection',\n 'profileSectionItemList',\n 'profileSectionItem',\n 'profileSectionHeader',\n 'profileSectionTitle',\n 'profileSectionTitleText',\n 'profileSectionSubtitle',\n 'profileSectionSubtitleText',\n 'profileSectionContent',\n 'profileSectionPrimaryButton',\n 'profileSectionButtonGroup',\n 'profilePage',\n\n 'formattedPhoneNumber',\n 'formattedPhoneNumberFlag',\n 'formattedPhoneNumberText',\n\n 'formattedDate',\n\n 'scrollBox',\n\n 'navbar',\n 'navbarButtons',\n 'navbarButton',\n 'navbarButtonIcon',\n 'navbarButtonText',\n 'navbarMobileMenuRow',\n 'navbarMobileMenuButton',\n 'navbarMobileMenuButtonIcon',\n\n 'pageScrollBox',\n 'page',\n\n 'activeDevice',\n 'activeDeviceListItem',\n 'activeDeviceIcon',\n\n 'impersonationFab',\n 'impersonationFabIcon',\n 'impersonationFabIconContainer',\n 'impersonationFabTitle',\n 'impersonationFabActionLink',\n\n 'invitationsSentIconBox',\n 'invitationsSentIcon',\n\n 'qrCodeRow',\n 'qrCodeContainer',\n\n 'tooltip',\n 'tooltipContent',\n 'tooltipText',\n\n 'badge',\n 'notificationBadge',\n 'buttonArrowIcon',\n 'spinner',\n\n 'apiKeys',\n 'apiKeysHeader',\n 'apiKeysSearchBox',\n 'apiKeysSearchInput',\n 'apiKeysAddButton',\n 'apiKeysTable',\n 'apiKeysCopyButton',\n 'apiKeysRevealButton',\n 'apiKeysCreateForm',\n 'apiKeysCreateFormNameInput',\n 'apiKeysCreateFormDescriptionInput',\n 'apiKeysCreateFormExpirationInput',\n 'apiKeysCreateFormSubmitButton',\n 'apiKeysCreateFormExpirationCaption',\n 'apiKeysRevokeModal',\n 'apiKeysRevokeModalInput',\n 'apiKeysRevokeModalSubmitButton',\n 'apiKeysCopyModal',\n 'apiKeysCopyModalInput',\n 'apiKeysCopyModalSubmitButton',\n\n 'subscriptionDetailsCard',\n 'subscriptionDetailsCardHeader',\n 'subscriptionDetailsCardBadge',\n 'subscriptionDetailsCardTitle',\n 'subscriptionDetailsCardBody',\n 'subscriptionDetailsCardFooter',\n 'subscriptionDetailsCardActions',\n 'subscriptionDetailsActionButton',\n 'subscriptionDetailsCancelButton',\n 'subscriptionDetailsDetailRow',\n 'subscriptionDetailsDetailRowLabel',\n 'subscriptionDetailsDetailRowValue',\n\n 'enterpriseConnectionsRoot',\n 'enterpriseConnectionButton',\n 'enterpriseConnectionButtonText',\n\n 'web3SolanaWalletButtonsRoot',\n 'web3SolanaWalletButtons',\n 'web3SolanaWalletButtonsIconButton',\n 'web3SolanaWalletButtonsBlockButton',\n 'web3SolanaWalletButtonsBlockButtonText',\n 'web3SolanaWalletButtonsWalletIcon',\n 'web3SolanaWalletButtonsWalletInitialIcon',\n\n 'walletIcon',\n 'walletInitialIcon',\n] as const).map(camelize) as (keyof ElementsConfig)[];\n\ntype TargettableClassname<K extends keyof ElementsConfig> = `${typeof CLASS_PREFIX}${K}`;\ntype AllowedIds<T extends keyof ElementsConfig> = ElementsConfig[T]['ids'];\ntype AllowedStates<T extends keyof ElementsConfig> = ElementsConfig[T]['states'];\ntype ObjectKeyWithState<K extends keyof ElementsConfig> = StateSelectors<K, ElementsConfig[K]['states']>;\ntype ObjectKeyWithIds<K extends keyof ElementsConfig> = IdSelectors<K, ElementsConfig[K]['ids']>;\ntype ObjectKeyWithIdAndState<K extends keyof ElementsConfig> = StateSelectors<\n IdSelectors<K, ElementsConfig[K]['ids']>,\n ElementsConfig[K]['states']\n>;\n\nexport type ElementId<Id = string> = { id: Id; __type: 'id' };\nexport type ElementDescriptor<K extends keyof ElementsConfig = any> = {\n targettableClassname: TargettableClassname<K>;\n objectKey: ElementObjectKey<K>;\n getTargettableIdClassname: (params: { id: AllowedIds<K> | never }) => string;\n getObjectKeyWithState: (state: AllowedStates<K> | never) => ObjectKeyWithState<K>;\n getObjectKeyWithId: (param: ElementId<AllowedIds<K>> | never) => ObjectKeyWithIds<K>;\n getObjectKeyWithIdAndState: (id: ElementId<AllowedIds<K>>, state: AllowedStates<K>) => ObjectKeyWithIdAndState<K>;\n setId: <Id extends AllowedIds<K>>(id?: Id) => ElementId<Id> | undefined;\n};\n\ntype ElementDescriptors = { [k in keyof ElementsConfig as ElementObjectKey<k>]: ElementDescriptor<k> };\n\n/**\n * Turns a key from the ElementsConfig object to a targettable classname\n * socialButtons-buttonIcon -> cl-socialButtons-buttonIcon\n */\nconst toTargettableClassname = <K extends keyof ElementsConfig>(key: K): TargettableClassname<K> => {\n return (CLASS_PREFIX + (key as string)) as TargettableClassname<K>;\n};\n\n/**\n * Turns a key from the ElementsConfig object to a appearance.elements key\n * socialButtons-buttonIcon -> socialButtonsButtonIcon\n */\nconst toObjectKey = <K extends keyof ElementsConfig>(key: K): ElementObjectKey<K> => {\n return key.replace(/([-][a-z])/, match => match[1].toUpperCase()) as ElementObjectKey<K>;\n};\n\nconst createElementDescriptor = <K extends keyof ElementsConfig>(key: K): ElementDescriptor<K> => {\n const objectKey = toObjectKey(key);\n return {\n objectKey,\n targettableClassname: toTargettableClassname(key),\n // getTargettableIdClassname: params => ID_CLASS_PREFIX + params.id,\n getTargettableIdClassname: params => toTargettableClassname(key) + '__' + params.id,\n getObjectKeyWithState: state => (objectKey + OBJ_KEY_DELIMITER + state) as any,\n getObjectKeyWithId: idObj => (objectKey + OBJ_KEY_DELIMITER + idObj.id) as any,\n getObjectKeyWithIdAndState: (idObj, state) =>\n (objectKey + OBJ_KEY_DELIMITER + idObj.id + OBJ_KEY_DELIMITER + state) as any,\n setId: id => (id ? { id, __type: 'id' } : undefined),\n };\n};\n\nconst createDescriptorMap = <K extends keyof ElementsConfig>(keys = APPEARANCE_KEYS): ElementDescriptors => {\n const entries = keys.map(key => [toObjectKey(key), createElementDescriptor(key)]) as unknown as Array<\n [K, ElementDescriptor<K>]\n >;\n return fromEntries(entries) as unknown as ElementDescriptors;\n};\n\nexport const descriptors = createDescriptorMap();\n"],"mappings":";;;;AAIA,MAAa,eAAe;AAE5B,MAAa,oBAAoB;AAEjC,MAAM,gCAAgC,mBAAyC;AAC/E,MAAM,YAAY,MAAc,EAAE,QAAQ,QAAO,MAAK,EAAE,GAAG,aAAa,CAAC;;;;;;AAMzE,MAAa,kBAAkB,8BAA8B;CAC3D;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CAEA;CACA;CAEA;CACA;CACA;CACA;CAEA;CAEA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CAEA;CAEA;CACA;CAEA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CAEA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CAEA;CAEA;CACA;CACA;CACA;CAEA;CAEA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CAEA;CACA;CACA;CAEA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CAEA;CAEA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CAEA;CACA;CACA;CAEA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACD,CAAU,CAAC,IAAI,SAAS;;;;;AA6BzB,MAAM,0BAA0D,QAAoC;AAClG,QAAQ,eAAgB;;;;;;AAO1B,MAAM,eAA+C,QAAgC;AACnF,QAAO,IAAI,QAAQ,eAAc,UAAS,MAAM,GAAG,aAAa,CAAC;;AAGnE,MAAM,2BAA2D,QAAiC;CAChG,MAAM,YAAY,YAAY,IAAI;AAClC,QAAO;EACL;EACA,sBAAsB,uBAAuB,IAAI;EAEjD,4BAA2B,WAAU,uBAAuB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