@pelatform/starter.shared 0.2.3 → 0.2.5

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/index.d.ts CHANGED
@@ -1,14 +1,13 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ReactNode, CSSProperties, ComponentProps, PropsWithChildren } from 'react';
3
+ import { ReactNode, CSSProperties, ComponentProps, PropsWithChildren, ComponentType } from 'react';
4
4
  import { MenuItem } from 'pelatform-ui';
5
5
  import { NavItem, LanguageSwitcherProps } from 'pelatform-ui/components';
6
6
  export { Logo as LogoDefault } from 'pelatform-ui/components';
7
7
  import { Config } from '@pelatform/starter.config';
8
8
  import { AuthQueryOptions } from '@pelatform/starter.hook';
9
- import { AnyAuthClient, ApiKey } from '@pelatform/starter.utils';
10
- import { Toaster, Button, Input } from 'pelatform-ui/default';
11
- import { b as CardComponentProps, c as DialogComponentProps, C as CardClassNames, a as AvatarProps, d as ViewProps } from './view-B1v2TRLo.js';
9
+ import { AnyAuthClient, User, Workspace, ApiKey } from '@pelatform/starter.utils';
10
+ import { Toaster, Avatar, buttonVariants, Dialog, Card, Button, Input } from 'pelatform-ui/default';
12
11
  import { LucideIcon } from 'lucide-react';
13
12
 
14
13
  declare function AuthLayout({ children, logo, disableFooter, signInHint, signInHref, }: {
@@ -139,6 +138,79 @@ interface SharedProvidersProps {
139
138
  }
140
139
  declare function SharedProviders({ children, locale, messages, timeZone, sonnerPosition, }: SharedProvidersProps): react_jsx_runtime.JSX.Element;
141
140
 
141
+ type AvatarClassNames = {
142
+ base?: string;
143
+ fallback?: string;
144
+ fallbackIcon?: string;
145
+ image?: string;
146
+ skeleton?: string;
147
+ };
148
+ interface AvatarProps extends ComponentProps<typeof Avatar> {
149
+ className?: string;
150
+ classNames?: AvatarClassNames;
151
+ image?: string;
152
+ isPending?: boolean;
153
+ size?: NonNullable<Parameters<typeof buttonVariants>[0]>["size"] | null | undefined;
154
+ user?: Partial<User> | null;
155
+ workspace?: Partial<Workspace> | null;
156
+ }
157
+
158
+ type DialogClassNames = {
159
+ content?: string;
160
+ header?: string;
161
+ footer?: string;
162
+ };
163
+ interface DialogComponentProps extends ComponentProps<typeof Dialog> {
164
+ className?: string;
165
+ children?: ReactNode;
166
+ classNames?: CardClassNames;
167
+ title?: string;
168
+ description?: string;
169
+ disableFooter?: boolean;
170
+ cancelButton?: boolean;
171
+ cancelButtonDisabled?: boolean;
172
+ button?: ReactNode;
173
+ }
174
+
175
+ type CardClassNames = {
176
+ base?: string;
177
+ cell?: string;
178
+ content?: string;
179
+ header?: string;
180
+ footer?: string;
181
+ grid?: string;
182
+ skeleton?: string;
183
+ title?: string;
184
+ description?: string;
185
+ instructions?: string;
186
+ error?: string;
187
+ label?: string;
188
+ input?: string;
189
+ checkbox?: string;
190
+ icon?: string;
191
+ button?: string;
192
+ primaryButton?: string;
193
+ secondaryButton?: string;
194
+ outlineButton?: string;
195
+ destructiveButton?: string;
196
+ avatar?: AvatarClassNames;
197
+ dialog?: DialogClassNames;
198
+ };
199
+ interface CardComponentProps extends Omit<ComponentProps<typeof Card>, "title" | "variant"> {
200
+ className?: string;
201
+ children?: ReactNode;
202
+ classNames?: CardClassNames;
203
+ title?: ReactNode;
204
+ description?: ReactNode;
205
+ instructions?: ReactNode;
206
+ actionLabel?: ReactNode;
207
+ action?: () => Promise<unknown> | unknown;
208
+ disabled?: boolean;
209
+ isDestructive?: boolean;
210
+ isPending?: boolean;
211
+ isSubmitting?: boolean;
212
+ }
213
+
142
214
  declare function CardComponent({ children, className, classNames, title, description, instructions, actionLabel, action, disabled, isDestructive, isPending, isSubmitting, ...props }: CardComponentProps): react_jsx_runtime.JSX.Element;
143
215
  declare function CardHeaderComponent({ className, classNames, title, description, isPending, }: CardComponentProps): react_jsx_runtime.JSX.Element;
144
216
  declare function CardFooterComponent({ className, classNames, instructions, actionLabel, action, disabled, isDestructive, isPending, isSubmitting, }: CardComponentProps): react_jsx_runtime.JSX.Element;
@@ -199,10 +271,127 @@ declare function UserMenu({ hiddenSwitcher }: {
199
271
  hiddenSwitcher?: boolean;
200
272
  }): react_jsx_runtime.JSX.Element;
201
273
 
274
+ type ViewClassNames = {
275
+ base?: string;
276
+ content?: string;
277
+ title?: string;
278
+ subtitle?: string;
279
+ skeleton?: string;
280
+ icon?: string;
281
+ avatar?: AvatarClassNames;
282
+ };
283
+ interface ViewProps {
284
+ className?: string;
285
+ classNames?: ViewClassNames;
286
+ isPending?: boolean;
287
+ size?: NonNullable<Parameters<typeof buttonVariants>[0]>["size"] | null | undefined;
288
+ user?: Partial<User> | null;
289
+ workspace?: Partial<Workspace> | null;
290
+ }
291
+
202
292
  declare function UserView({ className, classNames, isPending, size, user }: ViewProps): react_jsx_runtime.JSX.Element;
203
293
  declare function ApiKeyView({ className, classNames, apiKey }: ViewProps & {
204
294
  apiKey: ApiKey;
205
295
  }): react_jsx_runtime.JSX.Element;
206
296
  declare function WorkspaceView({ className, classNames, isPending, size, workspace }: ViewProps): react_jsx_runtime.JSX.Element;
207
297
 
208
- export { ApiKeyView, AuthLayout, CardActionComponent, CardComponent, CardFooterComponent, CardHeaderComponent, ConfigProvider, type ConfigProviderProps, DialogComponent, DialogFooterComponent, DisplayIdCard, EmptyState, type EmptyStateProps, Header, HeaderLeft, HeaderRight, HeaderSidebarMobile, LanguageSwitcher, LayoutLoader, LayoutProvider, type LayoutProviderProps, LayoutWrapper, LogoWithHref, LogoWithName, OTPInputGroup, PasswordInput, SharedProviders, type SharedProvidersProps, Sidebar, SidebarContent, SidebarContentMenu, SidebarHeaderBack, SignedInHint, SiteFooter, SiteHeader, SiteHeaderSecondary, SkeletonInputComponent, SkeletonViewComponent, Toolbar, UserAvatar, UserMenu, UserView, WorkspaceLogo, WorkspaceView };
298
+ declare const socialProviders: readonly [{
299
+ readonly provider: "apple";
300
+ readonly name: "Apple";
301
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
302
+ }, {
303
+ readonly provider: "discord";
304
+ readonly name: "Discord";
305
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
306
+ }, {
307
+ readonly provider: "dropbox";
308
+ readonly name: "Dropbox";
309
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
310
+ }, {
311
+ readonly provider: "facebook";
312
+ readonly name: "Facebook";
313
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
314
+ }, {
315
+ readonly provider: "github";
316
+ readonly name: "GitHub";
317
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
318
+ }, {
319
+ readonly provider: "gitlab";
320
+ readonly name: "GitLab";
321
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
322
+ }, {
323
+ readonly provider: "google";
324
+ readonly name: "Google";
325
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
326
+ }, {
327
+ readonly provider: "huggingface";
328
+ readonly name: "Hugging Face";
329
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
330
+ }, {
331
+ readonly provider: "kick";
332
+ readonly name: "Kick";
333
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
334
+ }, {
335
+ readonly provider: "linear";
336
+ readonly name: "Linear";
337
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
338
+ }, {
339
+ readonly provider: "linkedin";
340
+ readonly name: "LinkedIn";
341
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
342
+ }, {
343
+ readonly provider: "microsoft";
344
+ readonly name: "Microsoft";
345
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
346
+ }, {
347
+ readonly provider: "notion";
348
+ readonly name: "Notion";
349
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
350
+ }, {
351
+ readonly provider: "reddit";
352
+ readonly name: "Reddit";
353
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
354
+ }, {
355
+ readonly provider: "roblox";
356
+ readonly name: "Roblox";
357
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
358
+ }, {
359
+ readonly provider: "slack";
360
+ readonly name: "Slack";
361
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
362
+ }, {
363
+ readonly provider: "spotify";
364
+ readonly name: "Spotify";
365
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
366
+ }, {
367
+ readonly provider: "tiktok";
368
+ readonly name: "TikTok";
369
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
370
+ }, {
371
+ readonly provider: "twitch";
372
+ readonly name: "Twitch";
373
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
374
+ }, {
375
+ readonly provider: "vk";
376
+ readonly name: "VK";
377
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
378
+ }, {
379
+ readonly provider: "twitter";
380
+ readonly name: "X";
381
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
382
+ }, {
383
+ readonly provider: "zoom";
384
+ readonly name: "Zoom";
385
+ readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
386
+ }];
387
+
388
+ type ProviderIcon = ComponentType<{
389
+ className?: string;
390
+ }>;
391
+ type Provider = {
392
+ provider: string;
393
+ name: string;
394
+ icon?: ProviderIcon;
395
+ };
396
+
397
+ export { ApiKeyView, AuthLayout, type AvatarClassNames, type AvatarProps, CardActionComponent, type CardClassNames, CardComponent, type CardComponentProps, CardFooterComponent, CardHeaderComponent, ConfigProvider, type ConfigProviderProps, type DialogClassNames, DialogComponent, type DialogComponentProps, DialogFooterComponent, DisplayIdCard, EmptyState, type EmptyStateProps, Header, HeaderLeft, HeaderRight, HeaderSidebarMobile, LanguageSwitcher, LayoutLoader, LayoutProvider, type LayoutProviderProps, LayoutWrapper, LogoWithHref, LogoWithName, OTPInputGroup, PasswordInput, type Provider, type ProviderIcon, SharedProviders, type SharedProvidersProps, Sidebar, SidebarContent, SidebarContentMenu, SidebarHeaderBack, SignedInHint, SiteFooter, SiteHeader, SiteHeaderSecondary, SkeletonInputComponent, SkeletonViewComponent, Toolbar, UserAvatar, UserMenu, UserView, type ViewClassNames, type ViewProps, WorkspaceLogo, WorkspaceView, socialProviders };
package/dist/index.js CHANGED
@@ -153,7 +153,7 @@ function AuthLayout({
153
153
  signInHint = false,
154
154
  signInHref
155
155
  }) {
156
- const { app, path } = useConfig3();
156
+ const { path } = useConfig3();
157
157
  const pathname = usePathname();
158
158
  const t = useTranslations4();
159
159
  const footer = /* @__PURE__ */ jsxs4("p", { className: "px-20 py-4 text-center font-medium text-muted-foreground text-xs md:px-0", children: [
@@ -186,7 +186,6 @@ function AuthLayout({
186
186
  {
187
187
  className: "[&_.max-w-4xl]:max-w-sm [&_.max-w-4xl]:px-0",
188
188
  logo,
189
- logoHref: app.baseUrl,
190
189
  footer: disableFooter || pathname === path.auth.SIGN_OUT || pathname === path.auth.CALLBACK ? null : footer,
191
190
  children
192
191
  }
@@ -239,7 +238,7 @@ import {
239
238
  // src/components/view.tsx
240
239
  import { KeyRoundIcon } from "lucide-react";
241
240
  import { useLocale as useLocale2, useTranslations as useTranslations6 } from "next-intl";
242
- import { cn as cn4, getUserName as getUserName2 } from "pelatform-ui";
241
+ import { cn as cn4, formatDate, getUserName as getUserName2 } from "pelatform-ui";
243
242
  import { Skeleton as Skeleton2 } from "pelatform-ui/default";
244
243
 
245
244
  // src/components/avatar.tsx
@@ -419,16 +418,18 @@ function UserView({ className, classNames, isPending, size, user }) {
419
418
  ] });
420
419
  }
421
420
  function ApiKeyView({ className, classNames, apiKey }) {
422
- const t = useTranslations6();
423
421
  const locale = useLocale2();
422
+ const t = useTranslations6();
424
423
  const formatExpiration = () => {
425
424
  if (!apiKey.expiresAt) return t("common.time.neverExpires");
426
- const expiresDate = new Date(apiKey.expiresAt);
427
- return `${t("common.time.expires")} ${expiresDate.toLocaleDateString(locale ?? "en", {
428
- month: "short",
429
- day: "numeric",
430
- year: "numeric"
431
- })}`;
425
+ const expiresDate = formatDate(
426
+ new Date(apiKey.expiresAt),
427
+ {
428
+ month: "short"
429
+ },
430
+ locale ?? "en"
431
+ );
432
+ return `${t("common.time.expires")} ${expiresDate}`;
432
433
  };
433
434
  return /* @__PURE__ */ jsxs6("div", { className: cn4("flex items-center gap-3 truncate", className, classNames?.base), children: [
434
435
  /* @__PURE__ */ jsx8(KeyRoundIcon, { className: cn4("size-4 shrink-0", classNames?.icon) }),
@@ -688,7 +689,7 @@ function Sidebar({ children }) {
688
689
  if (isMobile) {
689
690
  return null;
690
691
  }
691
- return /* @__PURE__ */ jsxs9("aside", { className: "in-data-[sidebar-open=false]:-start-full fixed start-0 top-(--header-height) bottom-0 flex w-(--sidebar-width) shrink-0 flex-col items-stretch border-border border-e transition-all duration-300", children: [
692
+ return /* @__PURE__ */ jsxs9("aside", { className: "fixed in-data-[sidebar-open=false]:-start-full start-0 top-(--header-height) bottom-0 flex w-(--sidebar-width) shrink-0 flex-col items-stretch border-border border-e transition-all duration-300", children: [
692
693
  children,
693
694
  /* @__PURE__ */ jsx11("div", {})
694
695
  ] });
@@ -1592,6 +1593,121 @@ function PasswordInput({
1592
1593
  ] })
1593
1594
  ] });
1594
1595
  }
1596
+
1597
+ // src/lib/social-providers.ts
1598
+ import { Icons } from "pelatform-ui";
1599
+ var socialProviders = [
1600
+ {
1601
+ provider: "apple",
1602
+ name: "Apple",
1603
+ icon: Icons.Apple
1604
+ },
1605
+ {
1606
+ provider: "discord",
1607
+ name: "Discord",
1608
+ icon: Icons.Discord
1609
+ },
1610
+ {
1611
+ provider: "dropbox",
1612
+ name: "Dropbox",
1613
+ icon: Icons.Dropbox
1614
+ },
1615
+ {
1616
+ provider: "facebook",
1617
+ name: "Facebook",
1618
+ icon: Icons.FacebookColorful
1619
+ },
1620
+ {
1621
+ provider: "github",
1622
+ name: "GitHub",
1623
+ icon: Icons.Github
1624
+ },
1625
+ {
1626
+ provider: "gitlab",
1627
+ name: "GitLab",
1628
+ icon: Icons.Gitlab
1629
+ },
1630
+ {
1631
+ provider: "google",
1632
+ name: "Google",
1633
+ icon: Icons.GoogleColorful
1634
+ },
1635
+ {
1636
+ provider: "huggingface",
1637
+ name: "Hugging Face",
1638
+ icon: Icons.Huggingface
1639
+ },
1640
+ {
1641
+ provider: "kick",
1642
+ name: "Kick",
1643
+ icon: Icons.Kick
1644
+ },
1645
+ {
1646
+ provider: "linear",
1647
+ name: "Linear",
1648
+ icon: Icons.Linear
1649
+ },
1650
+ {
1651
+ provider: "linkedin",
1652
+ name: "LinkedIn",
1653
+ icon: Icons.LinkedinColorful
1654
+ },
1655
+ {
1656
+ provider: "microsoft",
1657
+ name: "Microsoft",
1658
+ icon: Icons.Microsoft
1659
+ },
1660
+ {
1661
+ provider: "notion",
1662
+ name: "Notion",
1663
+ icon: Icons.Notion
1664
+ },
1665
+ {
1666
+ provider: "reddit",
1667
+ name: "Reddit",
1668
+ icon: Icons.Reddit
1669
+ },
1670
+ {
1671
+ provider: "roblox",
1672
+ name: "Roblox",
1673
+ icon: Icons.Roblox
1674
+ },
1675
+ {
1676
+ provider: "slack",
1677
+ name: "Slack",
1678
+ icon: Icons.Slack
1679
+ },
1680
+ {
1681
+ provider: "spotify",
1682
+ name: "Spotify",
1683
+ icon: Icons.Spotify
1684
+ },
1685
+ {
1686
+ provider: "tiktok",
1687
+ name: "TikTok",
1688
+ icon: Icons.Tiktok
1689
+ },
1690
+ {
1691
+ provider: "twitch",
1692
+ name: "Twitch",
1693
+ icon: Icons.Twitch
1694
+ },
1695
+ {
1696
+ provider: "vk",
1697
+ name: "VK",
1698
+ icon: Icons.Vk
1699
+ },
1700
+ {
1701
+ provider: "twitter",
1702
+ name: "X",
1703
+ icon: Icons.X
1704
+ },
1705
+ {
1706
+ provider: "zoom",
1707
+ name: "Zoom",
1708
+ icon: Icons.Zoom
1709
+ }
1710
+ ];
1595
1711
  export {
1596
1712
  ApiKeyView,
1597
1713
  AuthLayout,
@@ -1633,5 +1749,6 @@ export {
1633
1749
  UserMenu,
1634
1750
  UserView,
1635
1751
  WorkspaceLogo,
1636
- WorkspaceView
1752
+ WorkspaceView,
1753
+ socialProviders
1637
1754
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pelatform/starter.shared",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "A part of SaaS starter kit for Pelatform applications.",
5
5
  "author": "Pelatform",
6
6
  "license": "MIT",
@@ -13,10 +13,6 @@
13
13
  ".": {
14
14
  "types": "./dist/index.d.ts",
15
15
  "default": "./dist/index.js"
16
- },
17
- "./extend": {
18
- "types": "./dist/extend.d.ts",
19
- "default": "./dist/extend.js"
20
16
  }
21
17
  },
22
18
  "scripts": {
@@ -41,13 +37,13 @@
41
37
  "devDependencies": {
42
38
  "@pelatform/starter.config": "0.2.1",
43
39
  "@pelatform/starter.hook": "0.2.1",
44
- "@pelatform/starter.utils": "0.2.2",
40
+ "@pelatform/starter.utils": "0.2.4",
45
41
  "@pelatform/tsconfig": "^0.1.3",
46
42
  "@types/react": "^19.2.7",
47
43
  "lucide-react": "^0.561.0",
48
44
  "next": "^16.0.10",
49
45
  "next-intl": "^4.6.0",
50
- "pelatform-ui": "^1.1.6",
46
+ "pelatform-ui": "^1.1.7",
51
47
  "react": "^19.2.3",
52
48
  "react-hook-form": "^7.68.0",
53
49
  "tsup": "^8.5.1"
package/dist/extend.d.ts DELETED
@@ -1,107 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as react from 'react';
3
- import { ComponentType } from 'react';
4
- export { A as AvatarClassNames, a as AvatarProps, C as CardClassNames, b as CardComponentProps, D as DialogClassNames, c as DialogComponentProps, V as ViewClassNames, d as ViewProps } from './view-B1v2TRLo.js';
5
- import 'pelatform-ui/default';
6
- import '@pelatform/starter.utils';
7
-
8
- declare const socialProviders: readonly [{
9
- readonly provider: "apple";
10
- readonly name: "Apple";
11
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
12
- }, {
13
- readonly provider: "discord";
14
- readonly name: "Discord";
15
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
16
- }, {
17
- readonly provider: "dropbox";
18
- readonly name: "Dropbox";
19
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
20
- }, {
21
- readonly provider: "facebook";
22
- readonly name: "Facebook";
23
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
24
- }, {
25
- readonly provider: "github";
26
- readonly name: "GitHub";
27
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
28
- }, {
29
- readonly provider: "gitlab";
30
- readonly name: "GitLab";
31
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
32
- }, {
33
- readonly provider: "google";
34
- readonly name: "Google";
35
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
36
- }, {
37
- readonly provider: "huggingface";
38
- readonly name: "Hugging Face";
39
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
40
- }, {
41
- readonly provider: "kick";
42
- readonly name: "Kick";
43
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
44
- }, {
45
- readonly provider: "linear";
46
- readonly name: "Linear";
47
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
48
- }, {
49
- readonly provider: "linkedin";
50
- readonly name: "LinkedIn";
51
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
52
- }, {
53
- readonly provider: "microsoft";
54
- readonly name: "Microsoft";
55
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
56
- }, {
57
- readonly provider: "notion";
58
- readonly name: "Notion";
59
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
60
- }, {
61
- readonly provider: "reddit";
62
- readonly name: "Reddit";
63
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
64
- }, {
65
- readonly provider: "roblox";
66
- readonly name: "Roblox";
67
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
68
- }, {
69
- readonly provider: "slack";
70
- readonly name: "Slack";
71
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
72
- }, {
73
- readonly provider: "spotify";
74
- readonly name: "Spotify";
75
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
76
- }, {
77
- readonly provider: "tiktok";
78
- readonly name: "TikTok";
79
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
80
- }, {
81
- readonly provider: "twitch";
82
- readonly name: "Twitch";
83
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
84
- }, {
85
- readonly provider: "vk";
86
- readonly name: "VK";
87
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
88
- }, {
89
- readonly provider: "twitter";
90
- readonly name: "X";
91
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
92
- }, {
93
- readonly provider: "zoom";
94
- readonly name: "Zoom";
95
- readonly icon: (props: react.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
96
- }];
97
-
98
- type ProviderIcon = ComponentType<{
99
- className?: string;
100
- }>;
101
- type Provider = {
102
- provider: string;
103
- name: string;
104
- icon?: ProviderIcon;
105
- };
106
-
107
- export { type Provider, type ProviderIcon, socialProviders };
package/dist/extend.js DELETED
@@ -1,117 +0,0 @@
1
- // src/lib/social-providers.ts
2
- import { Icons } from "pelatform-ui";
3
- var socialProviders = [
4
- {
5
- provider: "apple",
6
- name: "Apple",
7
- icon: Icons.Apple
8
- },
9
- {
10
- provider: "discord",
11
- name: "Discord",
12
- icon: Icons.Discord
13
- },
14
- {
15
- provider: "dropbox",
16
- name: "Dropbox",
17
- icon: Icons.Dropbox
18
- },
19
- {
20
- provider: "facebook",
21
- name: "Facebook",
22
- icon: Icons.FacebookColorful
23
- },
24
- {
25
- provider: "github",
26
- name: "GitHub",
27
- icon: Icons.Github
28
- },
29
- {
30
- provider: "gitlab",
31
- name: "GitLab",
32
- icon: Icons.Gitlab
33
- },
34
- {
35
- provider: "google",
36
- name: "Google",
37
- icon: Icons.GoogleColorful
38
- },
39
- {
40
- provider: "huggingface",
41
- name: "Hugging Face",
42
- icon: Icons.Huggingface
43
- },
44
- {
45
- provider: "kick",
46
- name: "Kick",
47
- icon: Icons.Kick
48
- },
49
- {
50
- provider: "linear",
51
- name: "Linear",
52
- icon: Icons.Linear
53
- },
54
- {
55
- provider: "linkedin",
56
- name: "LinkedIn",
57
- icon: Icons.LinkedinColorful
58
- },
59
- {
60
- provider: "microsoft",
61
- name: "Microsoft",
62
- icon: Icons.Microsoft
63
- },
64
- {
65
- provider: "notion",
66
- name: "Notion",
67
- icon: Icons.Notion
68
- },
69
- {
70
- provider: "reddit",
71
- name: "Reddit",
72
- icon: Icons.Reddit
73
- },
74
- {
75
- provider: "roblox",
76
- name: "Roblox",
77
- icon: Icons.Roblox
78
- },
79
- {
80
- provider: "slack",
81
- name: "Slack",
82
- icon: Icons.Slack
83
- },
84
- {
85
- provider: "spotify",
86
- name: "Spotify",
87
- icon: Icons.Spotify
88
- },
89
- {
90
- provider: "tiktok",
91
- name: "TikTok",
92
- icon: Icons.Tiktok
93
- },
94
- {
95
- provider: "twitch",
96
- name: "Twitch",
97
- icon: Icons.Twitch
98
- },
99
- {
100
- provider: "vk",
101
- name: "VK",
102
- icon: Icons.Vk
103
- },
104
- {
105
- provider: "twitter",
106
- name: "X",
107
- icon: Icons.X
108
- },
109
- {
110
- provider: "zoom",
111
- name: "Zoom",
112
- icon: Icons.Zoom
113
- }
114
- ];
115
- export {
116
- socialProviders
117
- };
@@ -1,96 +0,0 @@
1
- import { ComponentProps, ReactNode } from 'react';
2
- import { Avatar, buttonVariants, Dialog, Card } from 'pelatform-ui/default';
3
- import { User, Workspace } from '@pelatform/starter.utils';
4
-
5
- type AvatarClassNames = {
6
- base?: string;
7
- fallback?: string;
8
- fallbackIcon?: string;
9
- image?: string;
10
- skeleton?: string;
11
- };
12
- interface AvatarProps extends ComponentProps<typeof Avatar> {
13
- className?: string;
14
- classNames?: AvatarClassNames;
15
- image?: string;
16
- isPending?: boolean;
17
- size?: NonNullable<Parameters<typeof buttonVariants>[0]>["size"] | null | undefined;
18
- user?: Partial<User> | null;
19
- workspace?: Partial<Workspace> | null;
20
- }
21
-
22
- type DialogClassNames = {
23
- content?: string;
24
- header?: string;
25
- footer?: string;
26
- };
27
- interface DialogComponentProps extends ComponentProps<typeof Dialog> {
28
- className?: string;
29
- children?: ReactNode;
30
- classNames?: CardClassNames;
31
- title?: string;
32
- description?: string;
33
- disableFooter?: boolean;
34
- cancelButton?: boolean;
35
- cancelButtonDisabled?: boolean;
36
- button?: ReactNode;
37
- }
38
-
39
- type CardClassNames = {
40
- base?: string;
41
- cell?: string;
42
- content?: string;
43
- header?: string;
44
- footer?: string;
45
- grid?: string;
46
- skeleton?: string;
47
- title?: string;
48
- description?: string;
49
- instructions?: string;
50
- error?: string;
51
- label?: string;
52
- input?: string;
53
- checkbox?: string;
54
- icon?: string;
55
- button?: string;
56
- primaryButton?: string;
57
- secondaryButton?: string;
58
- outlineButton?: string;
59
- destructiveButton?: string;
60
- avatar?: AvatarClassNames;
61
- dialog?: DialogClassNames;
62
- };
63
- interface CardComponentProps extends Omit<ComponentProps<typeof Card>, "title" | "variant"> {
64
- className?: string;
65
- children?: ReactNode;
66
- classNames?: CardClassNames;
67
- title?: ReactNode;
68
- description?: ReactNode;
69
- instructions?: ReactNode;
70
- actionLabel?: ReactNode;
71
- action?: () => Promise<unknown> | unknown;
72
- disabled?: boolean;
73
- isDestructive?: boolean;
74
- isPending?: boolean;
75
- isSubmitting?: boolean;
76
- }
77
-
78
- type ViewClassNames = {
79
- base?: string;
80
- content?: string;
81
- title?: string;
82
- subtitle?: string;
83
- skeleton?: string;
84
- icon?: string;
85
- avatar?: AvatarClassNames;
86
- };
87
- interface ViewProps {
88
- className?: string;
89
- classNames?: ViewClassNames;
90
- isPending?: boolean;
91
- size?: NonNullable<Parameters<typeof buttonVariants>[0]>["size"] | null | undefined;
92
- user?: Partial<User> | null;
93
- workspace?: Partial<Workspace> | null;
94
- }
95
-
96
- export type { AvatarClassNames as A, CardClassNames as C, DialogClassNames as D, ViewClassNames as V, AvatarProps as a, CardComponentProps as b, DialogComponentProps as c, ViewProps as d };