@licklist/design 0.78.5-dev.33 → 0.78.5-dev.35
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/assets/Trend-Down.svg +3 -0
- package/dist/assets/Trend-Down.svg.js +16 -0
- package/dist/assets/Trend-Up.svg +3 -0
- package/dist/assets/Trend-Up.svg.js +16 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -0
- package/dist/v2/components/EntityHeader/EntityHeader.d.ts +13 -0
- package/dist/v2/components/EntityHeader/EntityHeader.d.ts.map +1 -0
- package/dist/v2/components/EntityHeader/EntityHeader.js +85 -0
- package/dist/v2/components/EntityHeader/EntityHeader.scss.js +6 -0
- package/dist/v2/components/EntityHeader/index.d.ts +2 -0
- package/dist/v2/components/EntityHeader/index.d.ts.map +1 -0
- package/dist/v2/components/Select/Select.d.ts +10 -0
- package/dist/v2/components/Select/Select.d.ts.map +1 -0
- package/dist/v2/components/Select/Select.js +128 -0
- package/dist/v2/components/Select/Select.scss.js +6 -0
- package/dist/v2/components/Select/index.d.ts +3 -0
- package/dist/v2/components/Select/index.d.ts.map +1 -0
- package/dist/v2/components/Tooltip/Tooltip.d.ts +21 -0
- package/dist/v2/components/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/v2/components/Tooltip/Tooltip.js +103 -0
- package/dist/v2/components/Tooltip/Tooltip.scss.js +6 -0
- package/dist/v2/components/Tooltip/index.d.ts +2 -0
- package/dist/v2/components/Tooltip/index.d.ts.map +1 -0
- package/dist/v2/components/UserAvatar/UserAvatar.d.ts +12 -0
- package/dist/v2/components/UserAvatar/UserAvatar.d.ts.map +1 -0
- package/dist/v2/components/UserAvatar/UserAvatar.js +77 -0
- package/dist/v2/components/UserAvatar/UserAvatar.scss.js +6 -0
- package/dist/v2/components/UserAvatar/index.d.ts +2 -0
- package/dist/v2/components/UserAvatar/index.d.ts.map +1 -0
- package/dist/v2/components/UserPanel/UserPanel.d.ts +17 -0
- package/dist/v2/components/UserPanel/UserPanel.d.ts.map +1 -0
- package/dist/v2/components/UserPanel/index.d.ts +3 -0
- package/dist/v2/components/UserPanel/index.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/blog-posts/Blog.d.ts +15 -0
- package/dist/v2/dashboard-analytics/blog-posts/Blog.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/blog-posts/Blog.js +103 -0
- package/dist/v2/dashboard-analytics/blog-posts/Blog.scss.js +6 -0
- package/dist/v2/dashboard-analytics/blog-posts/index.d.ts +3 -0
- package/dist/v2/dashboard-analytics/blog-posts/index.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/chart/Chart.d.ts +21 -0
- package/dist/v2/dashboard-analytics/chart/Chart.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/chart/Chart.js +733 -0
- package/dist/v2/dashboard-analytics/chart/Chart.scss.js +6 -0
- package/dist/v2/dashboard-analytics/chart/index.d.ts +3 -0
- package/dist/v2/dashboard-analytics/chart/index.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/dashboard/Dashboard.d.ts +57 -0
- package/dist/v2/dashboard-analytics/dashboard/Dashboard.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/dashboard/Dashboard.js +270 -0
- package/dist/v2/dashboard-analytics/dashboard/Dashboard.scss.js +6 -0
- package/dist/v2/dashboard-analytics/dashboard/index.d.ts +3 -0
- package/dist/v2/dashboard-analytics/dashboard/index.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/index.d.ts +13 -0
- package/dist/v2/dashboard-analytics/index.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/metric-card/MetricCard.d.ts +17 -0
- package/dist/v2/dashboard-analytics/metric-card/MetricCard.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/metric-card/MetricCard.js +65 -0
- package/dist/v2/dashboard-analytics/metric-card/MetricCard.scss.js +6 -0
- package/dist/v2/dashboard-analytics/metric-card/index.d.ts +3 -0
- package/dist/v2/dashboard-analytics/metric-card/index.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/venue-card/VenueCard.d.ts +12 -0
- package/dist/v2/dashboard-analytics/venue-card/VenueCard.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/venue-card/VenueCard.js +50 -0
- package/dist/v2/dashboard-analytics/venue-card/VenueCard.scss.js +6 -0
- package/dist/v2/dashboard-analytics/venue-card/index.d.ts +3 -0
- package/dist/v2/dashboard-analytics/venue-card/index.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.d.ts +25 -0
- package/dist/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.js +48 -0
- package/dist/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.scss.js +6 -0
- package/dist/v2/dashboard-analytics/venue-closed-card/index.d.ts +3 -0
- package/dist/v2/dashboard-analytics/venue-closed-card/index.d.ts.map +1 -0
- package/dist/v2/index.d.ts +7 -5
- package/dist/v2/index.d.ts.map +1 -1
- package/dist/v2/navigation/DashboardLayout/AdminSidebar.d.ts +10 -0
- package/dist/v2/navigation/DashboardLayout/AdminSidebar.d.ts.map +1 -0
- package/dist/v2/navigation/DashboardLayout/AdminSidebar.js +296 -0
- package/dist/v2/navigation/DashboardLayout/AdminSidebar.scss.js +6 -0
- package/dist/v2/navigation/DashboardLayout/DashboardFooter.d.ts +7 -0
- package/dist/v2/navigation/DashboardLayout/DashboardFooter.d.ts.map +1 -0
- package/dist/v2/navigation/DashboardLayout/DashboardFooter.js +34 -0
- package/dist/v2/navigation/DashboardLayout/DashboardFooter.scss.js +6 -0
- package/dist/v2/navigation/DashboardLayout/DashboardLayout.d.ts +34 -0
- package/dist/v2/navigation/DashboardLayout/DashboardLayout.d.ts.map +1 -0
- package/dist/v2/navigation/DashboardLayout/DashboardLayout.js +148 -0
- package/dist/v2/navigation/DashboardLayout/DashboardLayout.scss.js +6 -0
- package/dist/v2/navigation/DashboardLayout/ProviderSidebar.d.ts +15 -0
- package/dist/v2/navigation/DashboardLayout/ProviderSidebar.d.ts.map +1 -0
- package/dist/v2/navigation/DashboardLayout/ProviderSidebar.js +343 -0
- package/dist/v2/navigation/DashboardLayout/ProviderSidebar.scss.js +6 -0
- package/dist/v2/navigation/DashboardLayout/TopNavigation.d.ts +21 -0
- package/dist/v2/navigation/DashboardLayout/TopNavigation.d.ts.map +1 -0
- package/dist/v2/navigation/DashboardLayout/TopNavigation.js +453 -0
- package/dist/v2/navigation/DashboardLayout/TopNavigation.scss.js +6 -0
- package/dist/v2/navigation/DashboardLayout/assets/AdminLogo.png.js +3 -0
- package/dist/v2/navigation/DashboardLayout/assets/BookedLogo_Mark.png.js +3 -0
- package/dist/v2/navigation/DashboardLayout/index.d.ts +7 -0
- package/dist/v2/navigation/DashboardLayout/index.d.ts.map +1 -0
- package/dist/v2/styles/components/Button.scss +168 -0
- package/dist/v2/styles/form/NewInput.scss +172 -0
- package/dist/v2/styles/index.scss +4 -0
- package/dist/v2/styles/navigation/Navigation.scss +17 -0
- package/dist/v2/styles/navigation/NavigationItem.scss +86 -0
- package/dist/v2/styles/navigation/NavigationSection.scss +26 -0
- package/dist/v2/styles/navigation/_index.scss +9 -0
- package/dist/v2/styles/tokens/_colors.scss +554 -0
- package/dist/v2/styles/tokens/_sizes.scss +122 -0
- package/dist/v2/styles/tokens/_status.scss +108 -0
- package/dist/v2/styles/tokens/_typography.scss +146 -0
- package/package.json +5 -3
- package/rollup.config.js +1 -0
- package/src/assets/Trend-Down.svg +3 -0
- package/src/assets/Trend-Up.svg +3 -0
- package/src/index.ts +3 -1
- package/src/v2/components/EntityHeader/EntityHeader.scss +133 -0
- package/src/v2/components/EntityHeader/EntityHeader.stories.tsx +103 -0
- package/src/v2/components/EntityHeader/EntityHeader.tsx +76 -0
- package/src/v2/components/EntityHeader/index.ts +1 -0
- package/src/v2/components/Select/Select.scss +188 -0
- package/src/v2/components/Select/Select.stories.tsx +164 -0
- package/src/v2/components/Select/Select.tsx +56 -0
- package/src/v2/components/Select/index.ts +2 -0
- package/src/v2/components/Tooltip/Tooltip.scss +92 -0
- package/src/v2/components/Tooltip/Tooltip.stories.tsx +164 -0
- package/src/v2/components/Tooltip/Tooltip.tsx +64 -0
- package/src/v2/components/Tooltip/index.ts +8 -0
- package/src/v2/components/UserAvatar/UserAvatar.scss +62 -0
- package/src/v2/components/UserAvatar/UserAvatar.stories.tsx +94 -0
- package/src/v2/components/UserAvatar/UserAvatar.tsx +96 -0
- package/src/v2/components/UserAvatar/index.ts +1 -0
- package/src/v2/components/UserPanel/UserPanel.scss +195 -0
- package/src/v2/components/UserPanel/UserPanel.stories.tsx +66 -0
- package/src/v2/components/UserPanel/UserPanel.tsx +132 -0
- package/src/v2/components/UserPanel/index.ts +2 -0
- package/src/v2/dashboard-analytics/blog-posts/Blog.scss +92 -0
- package/src/v2/dashboard-analytics/blog-posts/Blog.stories.tsx +57 -0
- package/src/v2/dashboard-analytics/blog-posts/Blog.tsx +91 -0
- package/src/v2/dashboard-analytics/blog-posts/index.ts +2 -0
- package/src/v2/dashboard-analytics/chart/Chart.scss +424 -0
- package/src/v2/dashboard-analytics/chart/Chart.stories.tsx +157 -0
- package/src/v2/dashboard-analytics/chart/Chart.tsx +623 -0
- package/src/v2/dashboard-analytics/chart/index.ts +2 -0
- package/src/v2/dashboard-analytics/dashboard/Dashboard.scss +254 -0
- package/src/v2/dashboard-analytics/dashboard/Dashboard.stories.tsx +264 -0
- package/src/v2/dashboard-analytics/dashboard/Dashboard.tsx +248 -0
- package/src/v2/dashboard-analytics/dashboard/index.ts +2 -0
- package/src/v2/dashboard-analytics/index.ts +12 -0
- package/src/v2/dashboard-analytics/metric-card/MetricCard.scss +125 -0
- package/src/v2/dashboard-analytics/metric-card/MetricCard.stories.tsx +106 -0
- package/src/v2/dashboard-analytics/metric-card/MetricCard.tsx +72 -0
- package/src/v2/dashboard-analytics/metric-card/index.ts +2 -0
- package/src/v2/dashboard-analytics/venue-card/VenueCard.scss +112 -0
- package/src/v2/dashboard-analytics/venue-card/VenueCard.stories.tsx +40 -0
- package/src/v2/dashboard-analytics/venue-card/VenueCard.tsx +62 -0
- package/src/v2/dashboard-analytics/venue-card/index.ts +2 -0
- package/src/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.scss +129 -0
- package/src/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.stories.tsx +31 -0
- package/src/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.tsx +61 -0
- package/src/v2/dashboard-analytics/venue-closed-card/index.ts +2 -0
- package/src/v2/design-system/colors/ColorSystem.scss +439 -0
- package/src/v2/design-system/colors/ColorSystem.stories.tsx +730 -0
- package/src/v2/design-system/typography/Typography.scss +295 -0
- package/src/v2/design-system/typography/Typography.stories.tsx +109 -0
- package/src/v2/index.ts +11 -7
- package/src/v2/navigation/DashboardLayout/AdminSidebar.scss +207 -0
- package/src/v2/navigation/DashboardLayout/AdminSidebar.tsx +171 -0
- package/src/v2/navigation/DashboardLayout/DashboardFooter.scss +30 -0
- package/src/v2/navigation/DashboardLayout/DashboardFooter.tsx +25 -0
- package/src/v2/navigation/DashboardLayout/DashboardLayout.scss +91 -0
- package/src/v2/navigation/DashboardLayout/DashboardLayout.stories.tsx +370 -0
- package/src/v2/navigation/DashboardLayout/DashboardLayout.tsx +190 -0
- package/src/v2/navigation/DashboardLayout/ProviderSidebar.scss +266 -0
- package/src/v2/navigation/DashboardLayout/ProviderSidebar.tsx +234 -0
- package/src/v2/navigation/DashboardLayout/Sidebar.stories.tsx +220 -0
- package/src/v2/navigation/DashboardLayout/TopNavigation.scss +206 -0
- package/src/v2/navigation/DashboardLayout/TopNavigation.tsx +244 -0
- package/src/v2/navigation/DashboardLayout/assets/AdminLogo.png +0 -0
- package/src/v2/navigation/DashboardLayout/assets/BookedLogo_Mark.png +0 -0
- package/src/v2/navigation/DashboardLayout/index.ts +6 -0
- package/src/v2/styles/index.scss +0 -1
- package/src/v2/styles/tokens/_colors.scss +531 -98
- package/dist/v2/components/Colors/Colors.d.ts +0 -21
- package/dist/v2/components/Colors/Colors.d.ts.map +0 -1
- package/dist/v2/components/Colors/index.d.ts +0 -3
- package/dist/v2/components/Colors/index.d.ts.map +0 -1
- package/dist/v2/components/Typography/Typography.d.ts +0 -11
- package/dist/v2/components/Typography/Typography.d.ts.map +0 -1
- package/dist/v2/components/Typography/index.d.ts +0 -3
- package/dist/v2/components/Typography/index.d.ts.map +0 -1
- package/src/v2/components/Colors/Colors.scss +0 -64
- package/src/v2/components/Colors/Colors.stories.tsx +0 -143
- package/src/v2/components/Colors/Colors.tsx +0 -51
- package/src/v2/components/Colors/ColorsAliases.stories.tsx +0 -285
- package/src/v2/components/Colors/Sizes.stories.tsx +0 -141
- package/src/v2/components/Colors/index.ts +0 -2
- package/src/v2/components/Typography/Typography.scss +0 -72
- package/src/v2/components/Typography/Typography.stories.tsx +0 -266
- package/src/v2/components/Typography/Typography.tsx +0 -56
- package/src/v2/components/Typography/index.ts +0 -2
- package/src/v2/styles/tokens/_aliases.scss +0 -199
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/* Status/Alert Color tokens derived from Figma Alerts & Errors page
|
|
2
|
+
* Spec: https://www.figma.com/design/HPb8SEwQH2rrFAD2sRlKei/BKIT---Booked-Kit?node-id=167:968
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
/* Success/Green Status Colors */
|
|
7
|
+
--color-success-fill: #2d6b18;
|
|
8
|
+
--color-success-background: #eef9ea;
|
|
9
|
+
--color-success-border: #c9ecbd;
|
|
10
|
+
|
|
11
|
+
/* Error/Red Status Colors */
|
|
12
|
+
--color-error-fill: #cc3c35;
|
|
13
|
+
--color-error-background: #fceceb;
|
|
14
|
+
--color-error-border: #f5c4c2;
|
|
15
|
+
|
|
16
|
+
/* Alert/Warning/Yellow Status Colors */
|
|
17
|
+
--color-alert-fill: #fd7e14;
|
|
18
|
+
--color-alert-background: #fcf6e7;
|
|
19
|
+
--color-alert-border: #f6e3b4;
|
|
20
|
+
|
|
21
|
+
/* Info/Blue Status Colors */
|
|
22
|
+
--color-info-fill: #0e8ce2;
|
|
23
|
+
--color-info-background: #e7f4fc;
|
|
24
|
+
--color-info-border: #b4dbf6;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Legacy format for compatibility with existing alias system */
|
|
28
|
+
:root {
|
|
29
|
+
/* Surfaces - Status backgrounds */
|
|
30
|
+
--surfaces-status-background-success: var(--color-success-background);
|
|
31
|
+
--surfaces-status-background-error: var(--color-error-background);
|
|
32
|
+
--surfaces-status-background-alert: var(--color-alert-background);
|
|
33
|
+
--surfaces-status-background-info: var(--color-info-background);
|
|
34
|
+
|
|
35
|
+
/* Borders - Status borders */
|
|
36
|
+
--borders-status-border-success: var(--color-success-border);
|
|
37
|
+
--borders-status-border-error: var(--color-error-border);
|
|
38
|
+
--borders-status-border-alert: var(--color-alert-border);
|
|
39
|
+
--borders-status-border-info: var(--color-info-border);
|
|
40
|
+
|
|
41
|
+
/* Fills - Status icons/text */
|
|
42
|
+
--fills-status-fill-success: var(--color-success-fill);
|
|
43
|
+
--fills-status-fill-error: var(--color-error-fill);
|
|
44
|
+
--fills-status-fill-alert: var(--color-alert-fill);
|
|
45
|
+
--fills-status-fill-info: var(--color-info-fill);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* SCSS Map for status colors */
|
|
49
|
+
$status-colors: (
|
|
50
|
+
success: (
|
|
51
|
+
fill: var(--color-success-fill),
|
|
52
|
+
background: var(--color-success-background),
|
|
53
|
+
border: var(--color-success-border)
|
|
54
|
+
),
|
|
55
|
+
error: (
|
|
56
|
+
fill: var(--color-error-fill),
|
|
57
|
+
background: var(--color-error-background),
|
|
58
|
+
border: var(--color-error-border)
|
|
59
|
+
),
|
|
60
|
+
alert: (
|
|
61
|
+
fill: var(--color-alert-fill),
|
|
62
|
+
background: var(--color-alert-background),
|
|
63
|
+
border: var(--color-alert-border)
|
|
64
|
+
),
|
|
65
|
+
info: (
|
|
66
|
+
fill: var(--color-info-fill),
|
|
67
|
+
background: var(--color-info-background),
|
|
68
|
+
border: var(--color-info-border)
|
|
69
|
+
)
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
/* Mixins for status colors */
|
|
73
|
+
@mixin status-success() {
|
|
74
|
+
background-color: var(--surfaces-status-background-success);
|
|
75
|
+
border-color: var(--borders-status-border-success);
|
|
76
|
+
color: var(--fills-status-fill-success);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@mixin status-error() {
|
|
80
|
+
background-color: var(--surfaces-status-background-error);
|
|
81
|
+
border-color: var(--borders-status-border-error);
|
|
82
|
+
color: var(--fills-status-fill-error);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@mixin status-alert() {
|
|
86
|
+
background-color: var(--surfaces-status-background-alert);
|
|
87
|
+
border-color: var(--borders-status-border-alert);
|
|
88
|
+
color: var(--fills-status-fill-alert);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@mixin status-info() {
|
|
92
|
+
background-color: var(--surfaces-status-background-info);
|
|
93
|
+
border-color: var(--borders-status-border-info);
|
|
94
|
+
color: var(--fills-status-fill-info);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Helper mixin for getting status colors */
|
|
98
|
+
@function get-status-color($status, $type) {
|
|
99
|
+
$status-map: map-get($status-colors, $status);
|
|
100
|
+
@if $status-map {
|
|
101
|
+
$color: map-get($status-map, $type);
|
|
102
|
+
@if $color {
|
|
103
|
+
@return $color;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
@warn "Unknown status color: #{$status}.#{$type}";
|
|
107
|
+
@return null;
|
|
108
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/* Typography tokens and mixins derived from Figma
|
|
2
|
+
* Spec: https://www.figma.com/design/HPb8SEwQH2rrFAD2sRlKei/BKIT---Booked-Kit?node-id=30-95&m=dev
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
/* Families */
|
|
7
|
+
--font-family-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
|
|
8
|
+
--font-family-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
|
|
9
|
+
|
|
10
|
+
/* Headings Desktop */
|
|
11
|
+
--heading-xxl-size: 44px;
|
|
12
|
+
--heading-xxl-line: 48px;
|
|
13
|
+
--heading-xxl-weight: 600;
|
|
14
|
+
--heading-xl-size: 32px;
|
|
15
|
+
--heading-xl-line: 36px;
|
|
16
|
+
--heading-xl-weight: 700;
|
|
17
|
+
--heading-h1-size: 24px;
|
|
18
|
+
--heading-h1-line: 28px;
|
|
19
|
+
--heading-h1-weight: 600;
|
|
20
|
+
--heading-h2-size: 20px;
|
|
21
|
+
--heading-h2-line: 24px;
|
|
22
|
+
--heading-h2-weight: 600;
|
|
23
|
+
--heading-h3-size: 17px;
|
|
24
|
+
--heading-h3-line: 20px;
|
|
25
|
+
--heading-h3-weight: 600;
|
|
26
|
+
--heading-h4-size: 15px;
|
|
27
|
+
--heading-h4-line: 18px;
|
|
28
|
+
--heading-h4-weight: 600;
|
|
29
|
+
--heading-h5-size: 13px;
|
|
30
|
+
--heading-h5-line: 16px;
|
|
31
|
+
--heading-h5-weight: 500;
|
|
32
|
+
--heading-h6-size: 11px;
|
|
33
|
+
--heading-h6-line: 14px;
|
|
34
|
+
--heading-h6-weight: 500;
|
|
35
|
+
|
|
36
|
+
/* Headings Mobile */
|
|
37
|
+
--heading-xxl-mobile-size: 32px;
|
|
38
|
+
--heading-xxl-mobile-line: 36px;
|
|
39
|
+
--heading-xxl-mobile-weight: 600;
|
|
40
|
+
--heading-xl-mobile-size: 26px;
|
|
41
|
+
--heading-xl-mobile-line: 30px;
|
|
42
|
+
--heading-xl-mobile-weight: 700;
|
|
43
|
+
--heading-h1-mobile-size: 20px;
|
|
44
|
+
--heading-h1-mobile-line: 23px;
|
|
45
|
+
--heading-h1-mobile-weight: 600;
|
|
46
|
+
--heading-h2-mobile-size: 18px;
|
|
47
|
+
--heading-h2-mobile-line: 22px;
|
|
48
|
+
--heading-h2-mobile-weight: 600;
|
|
49
|
+
--heading-h3-mobile-size: 16px;
|
|
50
|
+
--heading-h3-mobile-line: 18px;
|
|
51
|
+
--heading-h3-mobile-weight: 600;
|
|
52
|
+
--heading-h4-mobile-size: 14px;
|
|
53
|
+
--heading-h4-mobile-line: 16px;
|
|
54
|
+
--heading-h4-mobile-weight: 600;
|
|
55
|
+
--heading-h5-mobile-size: 13px;
|
|
56
|
+
--heading-h5-mobile-line: 16px;
|
|
57
|
+
--heading-h5-mobile-weight: 500;
|
|
58
|
+
--heading-h6-mobile-size: 11px;
|
|
59
|
+
--heading-h6-mobile-line: 14px;
|
|
60
|
+
--heading-h6-mobile-weight: 500;
|
|
61
|
+
|
|
62
|
+
/* Body Desktop */
|
|
63
|
+
--text-xl-size: 20px;
|
|
64
|
+
--text-xl-line: 26px;
|
|
65
|
+
--text-xl-weight: 400;
|
|
66
|
+
--text-large-size: 18px;
|
|
67
|
+
--text-large-line: 24px;
|
|
68
|
+
--text-large-weight: 400;
|
|
69
|
+
--text-regular-size: 15px;
|
|
70
|
+
--text-regular-line: 20px;
|
|
71
|
+
--text-regular-weight: 400;
|
|
72
|
+
--text-small-size: 13px;
|
|
73
|
+
--text-small-line: 16px;
|
|
74
|
+
--text-small-weight: 400;
|
|
75
|
+
--text-small-emphasis-weight: 500;
|
|
76
|
+
--text-small-bold-weight: 600;
|
|
77
|
+
--text-xs-size: 10px;
|
|
78
|
+
--text-xs-line: 13px;
|
|
79
|
+
--text-xs-weight: 500;
|
|
80
|
+
--text-xs-bold-weight: 600;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Breakpoint: adjust if your system uses different breakpoints */
|
|
84
|
+
$bp-mobile-max: 767px;
|
|
85
|
+
|
|
86
|
+
/* Map of variants to CSS variable tuples: (size, line, weight) */
|
|
87
|
+
$typo-map: (
|
|
88
|
+
'heading.xxl': (var(--heading-xxl-size), var(--heading-xxl-line), var(--heading-xxl-weight), var(--font-family-sans)),
|
|
89
|
+
'heading.xl': (var(--heading-xl-size), var(--heading-xl-line), var(--heading-xl-weight), var(--font-family-sans)),
|
|
90
|
+
'heading.h1': (var(--heading-h1-size), var(--heading-h1-line), var(--heading-h1-weight), var(--font-family-sans)),
|
|
91
|
+
'heading.h2': (var(--heading-h2-size), var(--heading-h2-line), var(--heading-h2-weight), var(--font-family-sans)),
|
|
92
|
+
'heading.h3': (var(--heading-h3-size), var(--heading-h3-line), var(--heading-h3-weight), var(--font-family-sans)),
|
|
93
|
+
'heading.h4': (var(--heading-h4-size), var(--heading-h4-line), var(--heading-h4-weight), var(--font-family-sans)),
|
|
94
|
+
'heading.h5': (var(--heading-h5-size), var(--heading-h5-line), var(--heading-h5-weight), var(--font-family-sans)),
|
|
95
|
+
'heading.h6': (var(--heading-h6-size), var(--heading-h6-line), var(--heading-h6-weight), var(--font-family-sans)),
|
|
96
|
+
|
|
97
|
+
'heading.xxl.mobile': (var(--heading-xxl-mobile-size), var(--heading-xxl-mobile-line), var(--heading-xxl-mobile-weight), var(--font-family-sans)),
|
|
98
|
+
'heading.xl.mobile': (var(--heading-xl-mobile-size), var(--heading-xl-mobile-line), var(--heading-xl-mobile-weight), var(--font-family-sans)),
|
|
99
|
+
'heading.h1.mobile': (var(--heading-h1-mobile-size), var(--heading-h1-mobile-line), var(--heading-h1-mobile-weight), var(--font-family-sans)),
|
|
100
|
+
'heading.h2.mobile': (var(--heading-h2-mobile-size), var(--heading-h2-mobile-line), var(--heading-h2-mobile-weight), var(--font-family-sans)),
|
|
101
|
+
'heading.h3.mobile': (var(--heading-h3-mobile-size), var(--heading-h3-mobile-line), var(--heading-h3-mobile-weight), var(--font-family-sans)),
|
|
102
|
+
'heading.h4.mobile': (var(--heading-h4-mobile-size), var(--heading-h4-mobile-line), var(--heading-h4-mobile-weight), var(--font-family-sans)),
|
|
103
|
+
'heading.h5.mobile': (var(--heading-h5-mobile-size), var(--heading-h5-mobile-line), var(--heading-h5-mobile-weight), var(--font-family-sans)),
|
|
104
|
+
'heading.h6.mobile': (var(--heading-h6-mobile-size), var(--heading-h6-mobile-line), var(--heading-h6-mobile-weight), var(--font-family-sans)),
|
|
105
|
+
|
|
106
|
+
'text.xl': (var(--text-xl-size), var(--text-xl-line), var(--text-xl-weight), var(--font-family-sans)),
|
|
107
|
+
'text.large': (var(--text-large-size), var(--text-large-line), var(--text-large-weight), var(--font-family-sans)),
|
|
108
|
+
'text.regular': (var(--text-regular-size), var(--text-regular-line), var(--text-regular-weight), var(--font-family-sans)),
|
|
109
|
+
'text.small': (var(--text-small-size), var(--text-small-line), var(--text-small-weight), var(--font-family-sans)),
|
|
110
|
+
'text.small.emphasis': (var(--text-small-size), var(--text-small-line), var(--text-small-emphasis-weight), var(--font-family-sans)),
|
|
111
|
+
'text.small.bold': (var(--text-small-size), var(--text-small-line), var(--text-small-bold-weight), var(--font-family-sans)),
|
|
112
|
+
'text.xs': (var(--text-xs-size), var(--text-xs-line), var(--text-xs-weight), var(--font-family-sans)),
|
|
113
|
+
'text.xs.bold': (var(--text-xs-size), var(--text-xs-line), var(--text-xs-bold-weight), var(--font-family-sans))
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
@mixin apply-typo($tuple) {
|
|
117
|
+
$size: nth($tuple, 1);
|
|
118
|
+
$line: nth($tuple, 2);
|
|
119
|
+
$weight: nth($tuple, 3);
|
|
120
|
+
$family: nth($tuple, 4);
|
|
121
|
+
font-family: $family;
|
|
122
|
+
font-size: $size;
|
|
123
|
+
line-height: $line;
|
|
124
|
+
font-weight: $weight;
|
|
125
|
+
color: var(--labels-main-label-primary, #121E52);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@mixin typography($variant) {
|
|
129
|
+
@if map-has-key($typo-map, $variant) {
|
|
130
|
+
@include apply-typo(map-get($typo-map, $variant));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@else {
|
|
134
|
+
/* Fallback to regular text */
|
|
135
|
+
@include apply-typo(map-get($typo-map, 'text.regular'));
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Convenience mixin that switches to mobile variant under mobile breakpoint */
|
|
140
|
+
@mixin responsive-heading($desktopVariant, $mobileVariant) {
|
|
141
|
+
@include typography($desktopVariant);
|
|
142
|
+
|
|
143
|
+
@media (max-width: $bp-mobile-max) {
|
|
144
|
+
@include typography($mobileVariant);
|
|
145
|
+
}
|
|
146
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@licklist/design",
|
|
3
|
-
"version": "0.78.5-dev.
|
|
3
|
+
"version": "0.78.5-dev.35",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@licklist/core": "0.36.1-dev.
|
|
45
|
+
"@licklist/core": "0.36.1-dev.10",
|
|
46
46
|
"@licklist/eslint-config": "0.5.6",
|
|
47
47
|
"@licklist/plugins": "0.36.4-dev.13",
|
|
48
48
|
"clsx": "2.1.1",
|
|
@@ -64,13 +64,14 @@
|
|
|
64
64
|
"@dnd-kit/utilities": "2.0.0",
|
|
65
65
|
"@fortawesome/fontawesome-svg-core": "1.2.34",
|
|
66
66
|
"@fortawesome/free-solid-svg-icons": "5.15.2",
|
|
67
|
-
"@licklist/core": "0.36.1-dev.
|
|
67
|
+
"@licklist/core": "0.36.1-dev.10",
|
|
68
68
|
"@licklist/eslint-config": "0.5.6",
|
|
69
69
|
"@licklist/plugins": "0.36.4-dev.13",
|
|
70
70
|
"@mantine/core": "6.0.22",
|
|
71
71
|
"@mantine/hooks": "6.0.22",
|
|
72
72
|
"@mdx-js/react": "1.6.22",
|
|
73
73
|
"@popperjs/core": "2.11.8",
|
|
74
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
74
75
|
"@react-aria/utils": "3.9.0",
|
|
75
76
|
"@svgr/webpack": "^6.5.1",
|
|
76
77
|
"@tanstack/react-table": "8.10.6",
|
|
@@ -108,6 +109,7 @@
|
|
|
108
109
|
"i18next": "25.3.2",
|
|
109
110
|
"konva": "6.0.0",
|
|
110
111
|
"lodash": "4.17.21",
|
|
112
|
+
"lucide-react": "^0.555.0",
|
|
111
113
|
"luxon": "3.5.0",
|
|
112
114
|
"moment": "2.29.1",
|
|
113
115
|
"react-bootstrap": "1.6.1",
|
package/rollup.config.js
CHANGED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M27 23V16H25V19.4375L15.7686 8.35938C15.5453 8.0916 15.1984 7.95968 14.8535 8.01074C14.5086 8.06191 14.215 8.2892 14.0791 8.61035L9.30176 19.9014L5.33203 13.9453L3.66797 15.0547L8.66797 22.5547L8.75098 22.6631C8.96072 22.9001 9.2733 23.0253 9.59375 22.9951C9.95991 22.9606 10.2776 22.7284 10.4209 22.3896L15.2812 10.9014L23.6973 21H19V23H27Z" fill="currentColor"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M27 9.99982V16.9998H25V13.5623L15.7686 24.6404C15.5453 24.9082 15.1984 25.0401 14.8535 24.9891C14.5086 24.9379 14.215 24.7106 14.0791 24.3895L9.06934 12.5486L4.58789 15.8084L3.41211 14.1912L8.91211 10.1912L9.00781 10.1297C9.23732 9.99988 9.51055 9.9646 9.76758 10.0359C10.0615 10.1176 10.302 10.3293 10.4209 10.6102L15.2812 22.0984L23.6973 11.9998H19V9.99982H27Z" fill="currentColor"/>
|
|
3
|
+
</svg>
|
package/src/index.ts
CHANGED
|
@@ -45,4 +45,6 @@ export * from './fullscreen-loader'
|
|
|
45
45
|
export * from './pages'
|
|
46
46
|
export { default as RadioButton } from './customRadioButton/RadioButton'
|
|
47
47
|
export * from './PageNotFound'
|
|
48
|
-
export * from './UnderMaintenance'
|
|
48
|
+
export * from './UnderMaintenance'
|
|
49
|
+
export * from './v2/dashboard-analytics'
|
|
50
|
+
export * from './v2/navigation/DashboardLayout'
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
.entity-header {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 8px;
|
|
5
|
+
padding: 8px;
|
|
6
|
+
border-radius: 8px;
|
|
7
|
+
background: var(--surfaces-main-surface-secondary, #F4F4F7);
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
transition: background 0.2s ease;
|
|
10
|
+
width: 100%;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
|
|
13
|
+
&:hover {
|
|
14
|
+
background: var(--surfaces-main-surface-secondary-hover, #ECEDF2);
|
|
15
|
+
|
|
16
|
+
.entity-header__badge {
|
|
17
|
+
background: var(--surfaces-main-surface-tertiary-hover, #FFFFFF);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&:active {
|
|
22
|
+
background: var(--surfaces-main-surface-secondary-pressed, #E4E5EC);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&--collapsed {
|
|
26
|
+
justify-content: center;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&__avatar {
|
|
30
|
+
flex-shrink: 0;
|
|
31
|
+
border-radius: 50%;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
position: relative;
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&__image {
|
|
40
|
+
width: 100%;
|
|
41
|
+
height: 100%;
|
|
42
|
+
object-fit: cover;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&__placeholder {
|
|
46
|
+
width: 100%;
|
|
47
|
+
height: 100%;
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
position: relative;
|
|
52
|
+
|
|
53
|
+
svg {
|
|
54
|
+
position: absolute;
|
|
55
|
+
top: 0;
|
|
56
|
+
left: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
span {
|
|
60
|
+
font-family: var(--font-family-sans);
|
|
61
|
+
font-weight: 700;
|
|
62
|
+
color: var(--labels-main-label-secondary, #626A90);
|
|
63
|
+
position: relative;
|
|
64
|
+
z-index: 1;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&__text {
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
flex: 1;
|
|
72
|
+
gap: 4px;
|
|
73
|
+
min-width: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&__name {
|
|
77
|
+
margin: 0;
|
|
78
|
+
font-family: var(--font-family-sans);
|
|
79
|
+
font-size: 15px;
|
|
80
|
+
font-weight: 600;
|
|
81
|
+
line-height: 18px;
|
|
82
|
+
color: var(--labels-main-label-primary, #121E52);
|
|
83
|
+
white-space: nowrap;
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
text-overflow: ellipsis;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&__badge {
|
|
89
|
+
display: inline-flex;
|
|
90
|
+
align-items: center;
|
|
91
|
+
justify-content: center;
|
|
92
|
+
padding: 4px 8px;
|
|
93
|
+
background: var(--surfaces-main-surface-tertiary, #E8E9EF);
|
|
94
|
+
border-radius: 8px;
|
|
95
|
+
width: fit-content;
|
|
96
|
+
transition: background 0.2s ease;
|
|
97
|
+
|
|
98
|
+
span {
|
|
99
|
+
font-family: var(--font-family-mono);
|
|
100
|
+
font-size: 10px;
|
|
101
|
+
font-weight: 600;
|
|
102
|
+
line-height: 12px;
|
|
103
|
+
color: var(--labels-main-label-secondary, #626A90);
|
|
104
|
+
white-space: nowrap;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&--sm {
|
|
109
|
+
gap: 8px;
|
|
110
|
+
|
|
111
|
+
.entity-header__name {
|
|
112
|
+
font-size: 13px;
|
|
113
|
+
line-height: 16px;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.entity-header__badge span {
|
|
117
|
+
font-size: 9px;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&--lg {
|
|
122
|
+
gap: 16px;
|
|
123
|
+
|
|
124
|
+
.entity-header__name {
|
|
125
|
+
font-size: 18px;
|
|
126
|
+
line-height: 24px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.entity-header__badge span {
|
|
130
|
+
font-size: 11px;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { EntityHeader } from './EntityHeader'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'v2/Components/EntityHeader',
|
|
6
|
+
component: EntityHeader,
|
|
7
|
+
argTypes: {
|
|
8
|
+
name: { control: 'text' },
|
|
9
|
+
id: { control: 'text' },
|
|
10
|
+
idLabel: { control: 'text' },
|
|
11
|
+
imageUrl: { control: 'text' },
|
|
12
|
+
size: { control: 'select', options: ['sm', 'md', 'lg'] },
|
|
13
|
+
collapsed: { control: 'boolean' },
|
|
14
|
+
},
|
|
15
|
+
parameters: {
|
|
16
|
+
layout: 'centered',
|
|
17
|
+
},
|
|
18
|
+
} as Meta<typeof EntityHeader>
|
|
19
|
+
|
|
20
|
+
type Story = StoryObj<typeof EntityHeader>
|
|
21
|
+
|
|
22
|
+
export const Default: Story = {
|
|
23
|
+
args: {
|
|
24
|
+
name: "Sharky's Soft Play",
|
|
25
|
+
id: '01',
|
|
26
|
+
idLabel: 'Venue ID',
|
|
27
|
+
size: 'md',
|
|
28
|
+
collapsed: false,
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const WithImage: Story = {
|
|
33
|
+
args: {
|
|
34
|
+
name: "Sharky's Soft Play",
|
|
35
|
+
id: '01',
|
|
36
|
+
idLabel: 'Venue ID',
|
|
37
|
+
imageUrl: 'https://i.pravatar.cc/150?img=12',
|
|
38
|
+
size: 'md',
|
|
39
|
+
},
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const Collapsed: Story = {
|
|
43
|
+
args: {
|
|
44
|
+
name: "Sharky's Soft Play",
|
|
45
|
+
id: '01',
|
|
46
|
+
idLabel: 'Venue ID',
|
|
47
|
+
size: 'md',
|
|
48
|
+
collapsed: true,
|
|
49
|
+
},
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export const Small: Story = {
|
|
53
|
+
args: {
|
|
54
|
+
name: "Sharky's Soft Play",
|
|
55
|
+
id: '01',
|
|
56
|
+
idLabel: 'Venue ID',
|
|
57
|
+
size: 'sm',
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const Large: Story = {
|
|
62
|
+
args: {
|
|
63
|
+
name: "Sharky's Soft Play",
|
|
64
|
+
id: '01',
|
|
65
|
+
idLabel: 'Venue ID',
|
|
66
|
+
size: 'lg',
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const ProviderId: Story = {
|
|
71
|
+
args: {
|
|
72
|
+
name: 'Entertainment Group',
|
|
73
|
+
id: 'P-456',
|
|
74
|
+
idLabel: 'Provider ID',
|
|
75
|
+
size: 'md',
|
|
76
|
+
},
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export const CompanyId: Story = {
|
|
80
|
+
args: {
|
|
81
|
+
name: 'Acme Corporation',
|
|
82
|
+
id: 'C-789',
|
|
83
|
+
idLabel: 'Company ID',
|
|
84
|
+
size: 'md',
|
|
85
|
+
},
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export const NoId: Story = {
|
|
89
|
+
args: {
|
|
90
|
+
name: "Sharky's Soft Play",
|
|
91
|
+
size: 'md',
|
|
92
|
+
},
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export const AllSizes: Story = {
|
|
96
|
+
render: () => (
|
|
97
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '24px' }}>
|
|
98
|
+
<EntityHeader name="Sharky's Soft Play" id="01" idLabel="Venue ID" size="sm" />
|
|
99
|
+
<EntityHeader name="Sharky's Soft Play" id="01" idLabel="Venue ID" size="md" />
|
|
100
|
+
<EntityHeader name="Sharky's Soft Play" id="01" idLabel="Venue ID" size="lg" />
|
|
101
|
+
</div>
|
|
102
|
+
),
|
|
103
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import './EntityHeader.scss'
|
|
3
|
+
|
|
4
|
+
export interface EntityHeaderProps {
|
|
5
|
+
name: string
|
|
6
|
+
id?: string
|
|
7
|
+
idLabel?: string
|
|
8
|
+
imageUrl?: string
|
|
9
|
+
size?: 'sm' | 'md' | 'lg'
|
|
10
|
+
collapsed?: boolean
|
|
11
|
+
className?: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const EntityHeader: React.FC<EntityHeaderProps> = ({
|
|
15
|
+
name,
|
|
16
|
+
id,
|
|
17
|
+
idLabel = 'ID',
|
|
18
|
+
imageUrl,
|
|
19
|
+
size = 'md',
|
|
20
|
+
collapsed = false,
|
|
21
|
+
className = '',
|
|
22
|
+
}) => {
|
|
23
|
+
const sizeMap = {
|
|
24
|
+
sm: 32,
|
|
25
|
+
md: 47,
|
|
26
|
+
lg: 64,
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const fontSizeMap = {
|
|
30
|
+
sm: 12,
|
|
31
|
+
md: 18,
|
|
32
|
+
lg: 24,
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const dimension = sizeMap[size]
|
|
36
|
+
const initialFontSize = fontSizeMap[size]
|
|
37
|
+
const circleRadius = (dimension / 2) - 1 // Account for stroke width
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<div className={`entity-header entity-header--${size} ${collapsed ? 'entity-header--collapsed' : ''} ${className}`.trim()}>
|
|
41
|
+
<div
|
|
42
|
+
className="entity-header__avatar"
|
|
43
|
+
style={{ width: dimension, height: dimension }}
|
|
44
|
+
>
|
|
45
|
+
{imageUrl ? (
|
|
46
|
+
<img src={imageUrl} alt={name} className="entity-header__image" />
|
|
47
|
+
) : (
|
|
48
|
+
<div className="entity-header__placeholder">
|
|
49
|
+
<svg width={dimension} height={dimension} viewBox={`0 0 ${dimension} ${dimension}`} fill="none">
|
|
50
|
+
<circle
|
|
51
|
+
cx={dimension / 2}
|
|
52
|
+
cy={dimension / 2}
|
|
53
|
+
r={circleRadius}
|
|
54
|
+
fill="var(--fills-main-fill-secondary, #626A90)"
|
|
55
|
+
fillOpacity="0.2"
|
|
56
|
+
stroke="var(--fills-main-fill-secondary, #626A90)"
|
|
57
|
+
strokeWidth="2"
|
|
58
|
+
/>
|
|
59
|
+
</svg>
|
|
60
|
+
<span style={{ fontSize: initialFontSize }}>{name?.[0]?.toUpperCase() || 'S'}</span>
|
|
61
|
+
</div>
|
|
62
|
+
)}
|
|
63
|
+
</div>
|
|
64
|
+
{!collapsed && (
|
|
65
|
+
<div className="entity-header__text">
|
|
66
|
+
<h3 className="entity-header__name">{name}</h3>
|
|
67
|
+
{id && (
|
|
68
|
+
<div className="entity-header__badge">
|
|
69
|
+
<span>{idLabel}: {id}</span>
|
|
70
|
+
</div>
|
|
71
|
+
)}
|
|
72
|
+
</div>
|
|
73
|
+
)}
|
|
74
|
+
</div>
|
|
75
|
+
)
|
|
76
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { EntityHeader, type EntityHeaderProps } from './EntityHeader'
|