fiboui 1.0.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/README.md +141 -96
  2. package/dist/FineGrain-BTgNt7fN.js +29 -0
  3. package/dist/Link-DDzSPY1Q.js +88 -0
  4. package/dist/PluginManager-D5-ApsSN.js +111 -0
  5. package/dist/Router-i6Nc6qVs.js +386 -0
  6. package/dist/builder-6GkZlCaz.js +1894 -0
  7. package/dist/bundle-mjs-wppB-TKB.js +2760 -0
  8. package/dist/cli/bin.js +20 -0
  9. package/dist/cli/commands/generate/component.js +67 -0
  10. package/dist/cli/commands/generate/index.js +10 -0
  11. package/dist/cli/commands/generate/module.js +58 -0
  12. package/dist/cli/commands/generate/plugin.js +67 -0
  13. package/dist/cli/commands/init.js +58 -0
  14. package/dist/content.js +17 -0
  15. package/dist/core.js +33 -0
  16. package/dist/{effects-D16XdB_d.mjs → effects-CnevV566.js} +1 -0
  17. package/dist/index-BaX5zy8O.js +33 -0
  18. package/dist/index-C4xZywsh.js +1024 -0
  19. package/dist/index-C8y7FIYH.js +119 -0
  20. package/dist/index-CREALegH.js +1031 -0
  21. package/dist/index-CWz0hYog.js +778 -0
  22. package/dist/index-OLW4l8s8.js +1102 -0
  23. package/dist/index-zOfPHD00.js +90 -0
  24. package/dist/index.d.ts +43764 -6
  25. package/dist/index.js +2070 -0
  26. package/dist/interactive.js +12 -0
  27. package/dist/layout.js +18 -0
  28. package/dist/mount-rDUAHuDT.js +95 -0
  29. package/dist/navigation.js +13 -0
  30. package/dist/provider-B0eB-Wy7.js +286 -0
  31. package/dist/structure.js +15 -0
  32. package/dist/style.css +1 -1
  33. package/dist/style.js +1 -0
  34. package/dist/theme.js +9 -0
  35. package/package.json +88 -13
  36. package/dist/content/Alert/index.d.ts +0 -878
  37. package/dist/content/Avatar/index.d.ts +0 -886
  38. package/dist/content/Badge/index.d.ts +0 -887
  39. package/dist/content/Image/index.d.ts +0 -893
  40. package/dist/content/Label/index.d.ts +0 -879
  41. package/dist/content/Progress/index.d.ts +0 -898
  42. package/dist/content/Skeleton/index.d.ts +0 -879
  43. package/dist/content/Spinner/index.d.ts +0 -880
  44. package/dist/content/Text/index.d.ts +0 -878
  45. package/dist/content/index.d.ts +0 -9
  46. package/dist/core/StateWrapper.d.ts +0 -31
  47. package/dist/core/builder.d.ts +0 -58
  48. package/dist/core/component.d.ts +0 -7
  49. package/dist/core/effects.d.ts +0 -4
  50. package/dist/core/hooks.d.ts +0 -5
  51. package/dist/core/icons.d.ts +0 -11
  52. package/dist/core/index.d.ts +0 -6
  53. package/dist/core/state.d.ts +0 -86
  54. package/dist/core/types.d.ts +0 -51
  55. package/dist/demo.d.ts +0 -7
  56. package/dist/index.esm.js +0 -4777
  57. package/dist/index.umd.js +0 -251
  58. package/dist/interactive/Button/index.d.ts +0 -897
  59. package/dist/interactive/Checkbox/index.d.ts +0 -884
  60. package/dist/interactive/Combobox/index.d.ts +0 -898
  61. package/dist/interactive/RadioGroup/index.d.ts +0 -888
  62. package/dist/interactive/Select/index.d.ts +0 -895
  63. package/dist/interactive/Switch/index.d.ts +0 -881
  64. package/dist/interactive/TextField/index.d.ts +0 -893
  65. package/dist/interactive/Textarea/index.d.ts +0 -890
  66. package/dist/interactive/index.d.ts +0 -8
  67. package/dist/layout/Center/index.d.ts +0 -869
  68. package/dist/layout/Column/index.d.ts +0 -881
  69. package/dist/layout/Container/index.d.ts +0 -870
  70. package/dist/layout/DashboardLayout/index.d.ts +0 -870
  71. package/dist/layout/Header/index.d.ts +0 -870
  72. package/dist/layout/Line/index.d.ts +0 -872
  73. package/dist/layout/Row/index.d.ts +0 -879
  74. package/dist/layout/Scaffold/index.d.ts +0 -878
  75. package/dist/layout/ScrollView/index.d.ts +0 -879
  76. package/dist/layout/Sidebar/index.d.ts +0 -870
  77. package/dist/layout/Spacer/index.d.ts +0 -875
  78. package/dist/layout/StakentComponents.d.ts +0 -4
  79. package/dist/layout/index.d.ts +0 -11
  80. package/dist/structure/Banner/index.d.ts +0 -879
  81. package/dist/structure/Box/index.d.ts +0 -869
  82. package/dist/structure/Card/index.d.ts +0 -881
  83. package/dist/structure/Collapse/index.d.ts +0 -884
  84. package/dist/structure/Grid/index.d.ts +0 -1757
  85. package/dist/structure/List/index.d.ts +0 -888
  86. package/dist/structure/Table/index.d.ts +0 -895
  87. package/dist/structure/Tags/index.d.ts +0 -876
  88. package/dist/structure/cards/AssetCard/index.d.ts +0 -884
  89. package/dist/structure/cards/CollectionCard/index.d.ts +0 -880
  90. package/dist/structure/cards/ContentCard/index.d.ts +0 -884
  91. package/dist/structure/cards/ProfileCard/index.d.ts +0 -892
  92. package/dist/structure/cards/index.d.ts +0 -5
  93. package/dist/structure/cards/variants/index.d.ts +0 -3490
  94. package/dist/structure/index.d.ts +0 -9
  95. package/dist/theme/cupertino.d.ts +0 -3
  96. package/dist/theme/index.d.ts +0 -5
  97. package/dist/theme/material.d.ts +0 -3
  98. package/dist/theme/provider.d.ts +0 -16
  99. package/dist/theme/types.d.ts +0 -57
  100. package/dist/theme/web.d.ts +0 -3
  101. package/src/content/Alert/index.ts +0 -110
  102. package/src/content/Avatar/index.ts +0 -116
  103. package/src/content/Badge/index.ts +0 -162
  104. package/src/content/Image/index.ts +0 -137
  105. package/src/content/Label/index.ts +0 -66
  106. package/src/content/Progress/index.ts +0 -378
  107. package/src/content/Skeleton/index.ts +0 -71
  108. package/src/content/Spinner/index.ts +0 -139
  109. package/src/content/Text/index.ts +0 -74
  110. package/src/content/index.ts +0 -9
  111. package/src/core/StateWrapper.tsx +0 -131
  112. package/src/core/builder.ts +0 -301
  113. package/src/core/component.ts +0 -49
  114. package/src/core/effects.ts +0 -27
  115. package/src/core/hooks.ts +0 -48
  116. package/src/core/icons.tsx +0 -57
  117. package/src/core/index.ts +0 -6
  118. package/src/core/state.ts +0 -297
  119. package/src/core/types.ts +0 -62
  120. package/src/demo.tsx +0 -1050
  121. package/src/index.ts +0 -8
  122. package/src/interactive/Button/index.ts +0 -219
  123. package/src/interactive/Checkbox/index.ts +0 -145
  124. package/src/interactive/Combobox/index.ts +0 -278
  125. package/src/interactive/RadioGroup/index.ts +0 -124
  126. package/src/interactive/Select/index.ts +0 -227
  127. package/src/interactive/Switch/index.ts +0 -123
  128. package/src/interactive/TextField/index.ts +0 -223
  129. package/src/interactive/Textarea/index.ts +0 -129
  130. package/src/interactive/index.ts +0 -8
  131. package/src/layout/Center/index.ts +0 -34
  132. package/src/layout/Column/index.ts +0 -101
  133. package/src/layout/Container/index.ts +0 -28
  134. package/src/layout/DashboardLayout/index.ts +0 -106
  135. package/src/layout/Header/index.ts +0 -50
  136. package/src/layout/Line/index.ts +0 -41
  137. package/src/layout/Row/index.ts +0 -93
  138. package/src/layout/Scaffold/index.ts +0 -133
  139. package/src/layout/ScrollView/index.ts +0 -67
  140. package/src/layout/Sidebar/index.ts +0 -56
  141. package/src/layout/Spacer/index.ts +0 -46
  142. package/src/layout/StakentComponents.tsx +0 -57
  143. package/src/layout/index.ts +0 -11
  144. package/src/structure/Banner/index.ts +0 -92
  145. package/src/structure/Box/index.ts +0 -46
  146. package/src/structure/Card/index.ts +0 -113
  147. package/src/structure/Collapse/index.ts +0 -122
  148. package/src/structure/Grid/index.ts +0 -197
  149. package/src/structure/List/index.ts +0 -185
  150. package/src/structure/Table/index.ts +0 -165
  151. package/src/structure/Tags/index.ts +0 -69
  152. package/src/structure/cards/AssetCard/index.ts +0 -158
  153. package/src/structure/cards/CollectionCard/index.ts +0 -95
  154. package/src/structure/cards/ContentCard/index.ts +0 -127
  155. package/src/structure/cards/ProfileCard/index.ts +0 -152
  156. package/src/structure/cards/index.ts +0 -5
  157. package/src/structure/cards/variants/index.ts +0 -301
  158. package/src/structure/index.ts +0 -10
  159. package/src/styles/base.css +0 -186
  160. package/src/styles/core.css +0 -52
  161. package/src/styles/themes/cupertino.css +0 -197
  162. package/src/styles/themes/material.css +0 -322
  163. package/src/styles/themes/web.css +0 -196
  164. package/src/theme/cupertino.ts +0 -85
  165. package/src/theme/index.ts +0 -5
  166. package/src/theme/material.ts +0 -86
  167. package/src/theme/provider.tsx +0 -76
  168. package/src/theme/types.ts +0 -62
  169. package/src/theme/web.ts +0 -82
@@ -1,69 +0,0 @@
1
- import React, { ReactElement } from 'react';
2
- import { FiboBuilder, createBuilder } from '../../core/builder';
3
- import { BaseProps } from '../../core/types';
4
-
5
- interface TagItem {
6
- title: string;
7
- }
8
-
9
- const TagsInner = React.memo((props: any) => {
10
- const { items, className, style, ...rest } = props;
11
-
12
- const tags = items.map((item: TagItem, index: number) =>
13
- React.createElement(
14
- 'span',
15
- {
16
- key: index,
17
- className: 'fibo-tag',
18
- },
19
- item.title
20
- )
21
- );
22
-
23
- return React.createElement(
24
- 'div',
25
- {
26
- className,
27
- style,
28
- ...rest,
29
- },
30
- ...tags
31
- );
32
- });
33
-
34
- class TagsBuilder extends FiboBuilder {
35
- private _items: TagItem[] = [];
36
-
37
- constructor(items: TagItem[] = []) {
38
- super();
39
- this._items = items;
40
- }
41
-
42
- items(items: TagItem[]): this {
43
- this._items = items;
44
- return this;
45
- }
46
-
47
- build(): ReactElement {
48
- const className = ['fibo-tags', 'flex', 'gap-2', 'flex-wrap', ...this._classNames]
49
- .filter(Boolean)
50
- .join(' ');
51
-
52
- const props = {
53
- items: this._items,
54
- className: className,
55
- style: this.getStyle(),
56
- ...this._props
57
- };
58
- return React.createElement(TagsInner, props);
59
- }
60
- }
61
-
62
-
63
- export const Tags = createBuilder(TagsBuilder);
64
-
65
- export interface TagsProps extends BaseProps {
66
- items: TagItem[];
67
- }
68
-
69
- export type { TagItem };
@@ -1,158 +0,0 @@
1
- import React, { ReactElement } from 'react';
2
- import { FiboBuilder, createBuilder } from '../../../core/builder';
3
- import { BaseProps } from '../../../core/types';
4
- import { Box } from '../../Box';
5
- import { Text } from '../../../content/Text';
6
- import { Row } from '../../../layout/Row';
7
- import { Column } from '../../../layout/Column';
8
- import { Spacer } from '../../../layout/Spacer';
9
- import { Button } from '../../../interactive/Button';
10
- import { Card } from '../../Card';
11
- import { Badge } from '../../../content/Badge';
12
- import { Icons } from '../../../core/icons';
13
-
14
- const AssetCardInner = React.memo((props: any) => {
15
- const { image, title, price, likes, timeLeft, className, style, ...rest } = props;
16
-
17
- return Card()
18
- .classNames(['group', 'transition-all', 'duration-300', 'hover:-translate-y-1'])
19
- .style({
20
- width: '100%',
21
- borderRadius: '24px',
22
- border: 'none',
23
- boxShadow: '0 10px 40px -10px rgba(0,0,0,0.05)',
24
- padding: '16px',
25
- background: '#fff',
26
- ...style
27
- })
28
- .className(className)
29
- .props(rest)
30
- .children([
31
-
32
- Box().classNames(['relative', 'aspect-square', 'overflow-hidden', 'rounded-[20px]']).children([
33
- Box()
34
- .classNames(['w-full', 'h-full', 'bg-gray-200', 'bg-cover', 'bg-center'])
35
- .style({ backgroundImage: `url(${image})` })
36
- .build(),
37
-
38
-
39
- Box()
40
- .classNames(['absolute', 'top-3', 'right-3'])
41
- .children(
42
- Badge().variant("glass").shape("pill")
43
- .icon(Box().classNames(['text-gray-400', 'hover:text-red-500']).children(Icons.Heart).build())
44
- .text(`${likes}`)
45
- .build()
46
- ).build()
47
- ]).build(),
48
-
49
- Spacer().height(16).build(),
50
-
51
-
52
- Row().justifyContent("between").alignItems("start").children([
53
- Column().gap(4).children([
54
- Text(title).fontWeight(700).fontSize(18).color("#111827").build(),
55
- Badge().variant("neutral").text("Not for sale x1").build()
56
- ]).build(),
57
- Box().classNames(['text-gray-300']).children(Icons.More).build()
58
- ]).build(),
59
-
60
- Spacer().height(16).build(),
61
-
62
-
63
- Row().justifyContent("between").alignItems("center").children([
64
- Column().gap(4).children([
65
- Text("Current Bid").fontSize(11).fontWeight(600).color("#6B7280").build(),
66
- Row().gap(4).alignItems("center").children([
67
- Box().classNames(['text-blue-500']).children(Icons.Eth).build(),
68
- Text(`${price} ETH`).fontSize(15).fontWeight(700).color("#111827").build(),
69
- ]).build()
70
- ]).build(),
71
-
72
- Button("Place a bid")
73
- .variant("filled")
74
- .shape("pill")
75
- .shadow("soft")
76
- .style({
77
- backgroundColor: '#111827',
78
- color: '#fff',
79
- padding: '10px 20px',
80
- fontSize: '13px',
81
- fontWeight: 600
82
- })
83
- .build()
84
- ]).build(),
85
-
86
- Spacer().height(12).build(),
87
-
88
-
89
- timeLeft ?
90
- Badge()
91
- .variant("accent")
92
- .shape("rounded")
93
- .icon(Box().children(Icons.Clock).build())
94
- .text(timeLeft)
95
- .style({ width: '100%' })
96
- .build()
97
- : null
98
-
99
- ]).build();
100
- });
101
-
102
- class AssetCardBuilder extends FiboBuilder {
103
- private _image: string = '';
104
- private _title: string = '';
105
- private _price: string | number = '';
106
- private _likes: string | number = '';
107
- private _timeLeft?: string;
108
-
109
- image(url: string): this {
110
- this._image = url;
111
- return this;
112
- }
113
-
114
- title(text: string): this {
115
- this._title = text;
116
- return this;
117
- }
118
-
119
- price(value: string | number): this {
120
- this._price = value;
121
- return this;
122
- }
123
-
124
- likes(count: string | number): this {
125
- this._likes = count;
126
- return this;
127
- }
128
-
129
- timeLeft(time: string): this {
130
- this._timeLeft = time;
131
- return this;
132
- }
133
-
134
- build(): ReactElement {
135
- const props = {
136
- image: this._image,
137
- title: this._title,
138
- price: this._price,
139
- likes: this._likes,
140
- timeLeft: this._timeLeft,
141
- className: this.getClassName(),
142
- style: this.getStyle(),
143
- ...this._props
144
- };
145
- return React.createElement(AssetCardInner, props);
146
- }
147
- }
148
-
149
-
150
- export const AssetCard = createBuilder(AssetCardBuilder);
151
-
152
- export interface AssetCardProps extends BaseProps {
153
- image: string;
154
- title: string;
155
- price: string | number;
156
- likes: string | number;
157
- timeLeft?: string;
158
- }
@@ -1,95 +0,0 @@
1
- import React, { ReactElement } from 'react';
2
- import { FiboBuilder, createBuilder } from '../../../core/builder';
3
- import { BaseProps } from '../../../core/types';
4
- import { Box } from '../../Box';
5
- import { Text } from '../../../content/Text';
6
- import { Row } from '../../../layout/Row';
7
- import { Column } from '../../../layout/Column';
8
- import { Card } from '../../Card';
9
- import { Icons } from '../../../core/icons';
10
-
11
- const CollectionCardInner = React.memo((props: any) => {
12
- const { image, title, author, items, className, style, ...rest } = props;
13
-
14
- return Card()
15
- .classNames(['group', 'cursor-pointer'])
16
- .style({
17
- width: '100%',
18
- borderRadius: '24px',
19
- height: '320px',
20
- position: 'relative',
21
- overflow: 'hidden',
22
- border: 'none',
23
- ...style
24
- })
25
- .className(className)
26
- .props(rest)
27
- .children([
28
-
29
- Box().classNames(['absolute', 'inset-0', 'bg-cover', 'bg-center', 'transition-transform', 'duration-500'])
30
- .style({ backgroundImage: `url(${image})` }).build(),
31
-
32
-
33
- Box().classNames(['absolute', 'inset-0', 'bg-gradient-to-t', 'from-black/80', 'via-black/20', 'to-transparent']).build(),
34
-
35
-
36
- Column().classNames(['absolute', 'bottom-0', 'left-0', 'p-6']).gap(4).children([
37
- Text(items).color("white").fontSize(12).classNames(['opacity-90', 'mb-1', 'uppercase', 'tracking-wider']).fontWeight(600).build(),
38
- Text(title).color("white").fontSize(22).fontWeight(700).build(),
39
- Row().gap(6).alignItems("center").children([
40
- Text("Created by").color("white").fontSize(13).classNames(['opacity-80']).build(),
41
- Text(author).color("white").fontSize(13).fontWeight(600).build(),
42
- Icons.Verify
43
- ]).build()
44
- ]).build()
45
- ]).build();
46
- });
47
-
48
- class CollectionCardBuilder extends FiboBuilder {
49
- private _image: string = '';
50
- private _title: string = '';
51
- private _author: string = '';
52
- private _items: string = '';
53
-
54
- image(url: string): this {
55
- this._image = url;
56
- return this;
57
- }
58
-
59
- title(text: string): this {
60
- this._title = text;
61
- return this;
62
- }
63
-
64
- author(text: string): this {
65
- this._author = text;
66
- return this;
67
- }
68
-
69
- items(text: string): this {
70
- this._items = text;
71
- return this;
72
- }
73
-
74
- build(): ReactElement {
75
- const props = {
76
- image: this._image,
77
- title: this._title,
78
- author: this._author,
79
- items: this._items,
80
- className: this.getClassName(),
81
- style: this.getStyle(),
82
- ...this._props
83
- };
84
- return React.createElement(CollectionCardInner, props);
85
- }
86
- }
87
-
88
-
89
- export const CollectionCard = createBuilder(CollectionCardBuilder);
90
-
91
- export interface CollectionCardProps extends BaseProps {
92
- image: string;
93
- title: string;
94
- author: string;
95
- }
@@ -1,127 +0,0 @@
1
- import React, { ReactElement } from 'react';
2
- import { FiboBuilder, createBuilder } from '../../../core/builder';
3
- import { BaseProps } from '../../../core/types';
4
- import { Card } from '../../Card';
5
- import { Image } from '../../../content/Image';
6
- import { Text } from '../../../content/Text';
7
- import { Box } from '../../Box';
8
-
9
- const ContentCardInner = React.memo((props: any) => {
10
- const {
11
- image,
12
- title,
13
- description,
14
- date,
15
- source,
16
- className,
17
- style
18
- } = props;
19
-
20
- return Card()
21
- .className(`overflow-hidden hover:shadow-lg transition-shadow duration-300 ${className}`)
22
- .style(style)
23
- .children([
24
-
25
- image ? Image()
26
- .src(image)
27
- .className("w-full object-cover rounded-[20px] mb-4")
28
- .style({ height: '200px' })
29
- .build() : null,
30
-
31
-
32
- Box()
33
- .className("flex flex-col gap-2")
34
- .children([
35
-
36
- title ? Text(title)
37
- .fontSize(18)
38
- .fontWeight(700)
39
- .color("#111827")
40
- .lineHeight(1.25)
41
- .build() : null,
42
-
43
-
44
- description ? Text(description)
45
- .fontSize(14)
46
- .color("#4B5563")
47
- .lineHeight(1.5)
48
- .className("line-clamp-2")
49
- .build() : null,
50
-
51
-
52
- (source || date) ? Box()
53
- .className("flex items-center gap-2 mt-2")
54
- .children([
55
- Text(`${source ? source : ''}${source && date ? ' • ' : ''}${date ? date : ''}`)
56
- .fontSize(11)
57
- .fontWeight(600)
58
- .color("#9CA3AF")
59
- .textTransform("uppercase")
60
- .letterSpacing("0.05em")
61
- .build()
62
- ])
63
- .build() : null
64
- ])
65
- .build()
66
- ])
67
- .build();
68
- });
69
-
70
- class ContentCardBuilder extends FiboBuilder {
71
- private _image?: string;
72
- private _title?: string;
73
- private _description?: string;
74
- private _date?: string;
75
- private _source?: string;
76
-
77
- image(url: string): this {
78
- this._image = url;
79
- return this;
80
- }
81
-
82
- title(text: string): this {
83
- this._title = text;
84
- return this;
85
- }
86
-
87
- description(text: string): this {
88
- this._description = text;
89
- return this;
90
- }
91
-
92
- date(text: string): this {
93
- this._date = text;
94
- return this;
95
- }
96
-
97
- source(text: string): this {
98
- this._source = text;
99
- return this;
100
- }
101
-
102
- build(): ReactElement {
103
- const props = {
104
- image: this._image,
105
- title: this._title,
106
- description: this._description,
107
- date: this._date,
108
- source: this._source,
109
- className: this.getClassName(),
110
- style: this.getStyle(),
111
- ...this._props
112
- };
113
-
114
- return React.createElement(ContentCardInner, props);
115
- }
116
- }
117
-
118
-
119
- export const ContentCard = createBuilder(ContentCardBuilder);
120
-
121
- export interface ContentCardProps extends BaseProps {
122
- image?: string;
123
- title?: string;
124
- description?: string;
125
- date?: string;
126
- source?: string;
127
- }
@@ -1,152 +0,0 @@
1
- import React, { ReactElement } from 'react';
2
- import { FiboBuilder, createBuilder } from '../../../core/builder';
3
- import { BaseProps } from '../../../core/types';
4
- import { Box } from '../../Box';
5
- import { Text } from '../../../content/Text';
6
- import { Row } from '../../../layout/Row';
7
- import { Column } from '../../../layout/Column';
8
- import { Spacer } from '../../../layout/Spacer';
9
- import { Button } from '../../../interactive/Button';
10
- import { Card } from '../../Card';
11
- import { Avatar } from '../../../content/Avatar';
12
- import { Icons } from '../../../core/icons';
13
-
14
- const ProfileCardInner = React.memo((props: any) => {
15
- const { banner, avatar, name, handle, stats, className, style, ...rest } = props;
16
-
17
- return Card()
18
- .style({
19
- width: '100%',
20
- borderRadius: '24px',
21
- border: 'none',
22
- boxShadow: '0 10px 40px -10px rgba(0,0,0,0.05)',
23
- padding: '0',
24
- overflow: 'hidden',
25
- background: '#fff',
26
- ...style
27
- })
28
- .className(className)
29
- .props(rest)
30
- .children([
31
-
32
- Box()
33
- .style({ height: '100px', backgroundImage: `url(${banner})`, backgroundSize: 'cover', backgroundPosition: 'center' })
34
- .build(),
35
-
36
-
37
- Column().padding(20).alignItems("center").style({ marginTop: '-50px' }).children([
38
-
39
- Avatar()
40
- .image(avatar)
41
- .size(80)
42
- .border('4px solid #fff')
43
- .build(),
44
-
45
- Spacer().height(12).build(),
46
-
47
-
48
- Row().gap(6).alignItems("center").children([
49
- Text(name).fontWeight(700).fontSize(18).color("#111827").build(),
50
- Icons.Verify
51
- ]).build(),
52
-
53
- Text(handle).fontSize(13).color("#6B7280").style({ marginTop: '4px' }).build(),
54
-
55
- Spacer().height(16).build(),
56
-
57
-
58
- Button("+ Follow")
59
- .variant("filled")
60
- .shape("pill")
61
- .shadow("soft")
62
- .style({
63
- backgroundColor: '#3B82F6',
64
- color: '#fff',
65
- padding: '8px 24px',
66
- fontSize: '13px',
67
- fontWeight: 600
68
- })
69
- .build(),
70
-
71
- Spacer().height(24).build(),
72
-
73
-
74
- Row().classNames(['w-full', 'border-t', 'border-gray-100', 'pt-4']).justifyContent("between").children([
75
- Column().alignItems("center").gap(4).children([
76
- Text(stats.items).fontWeight(700).fontSize(14).build(),
77
- Text("Items").fontSize(11).color("#9CA3AF").build()
78
- ]).build(),
79
- Column().alignItems("center").gap(4).children([
80
- Text(stats.owners).fontWeight(700).fontSize(14).build(),
81
- Text("Owners").fontSize(11).color("#9CA3AF").build()
82
- ]).build(),
83
- Column().alignItems("center").gap(4).children([
84
- Row().alignItems("center").gap(2).children([
85
- Box().width(8).children(Icons.Eth).build(),
86
- Text(stats.floor).fontWeight(700).fontSize(14).build(),
87
- ]).build(),
88
- Text("Floor").fontSize(11).color("#9CA3AF").build()
89
- ]).build(),
90
- ]).build()
91
-
92
- ]).build()
93
- ]).build();
94
- });
95
-
96
- class ProfileCardBuilder extends FiboBuilder {
97
- private _banner: string = '';
98
- private _avatar: string = '';
99
- private _name: string = '';
100
- private _handle: string = '';
101
- private _stats: { items: string, owners: string, floor: string } = { items: '0', owners: '0', floor: '0' };
102
-
103
- banner(url: string): this {
104
- this._banner = url;
105
- return this;
106
- }
107
-
108
- avatar(url: string): this {
109
- this._avatar = url;
110
- return this;
111
- }
112
-
113
- name(text: string): this {
114
- this._name = text;
115
- return this;
116
- }
117
-
118
- handle(text: string): this {
119
- this._handle = text;
120
- return this;
121
- }
122
-
123
- stats(stats: { items: string, owners: string, floor: string }): this {
124
- this._stats = stats;
125
- return this;
126
- }
127
-
128
- build(): ReactElement {
129
- const props = {
130
- banner: this._banner,
131
- avatar: this._avatar,
132
- name: this._name,
133
- handle: this._handle,
134
- stats: this._stats,
135
- className: this.getClassName(),
136
- style: this.getStyle(),
137
- ...this._props
138
- };
139
- return React.createElement(ProfileCardInner, props);
140
- }
141
- }
142
-
143
-
144
- export const ProfileCard = createBuilder(ProfileCardBuilder);
145
-
146
- export interface ProfileCardProps extends BaseProps {
147
- banner: string;
148
- avatar: string;
149
- name: string;
150
- handle: string;
151
- stats: { items: string, owners: string, floor: string };
152
- }
@@ -1,5 +0,0 @@
1
- export * from './AssetCard';
2
- export * from './ProfileCard';
3
- export * from './CollectionCard';
4
- export * from './ContentCard';
5
- export * from './variants';