@melodicdev/components 1.3.0 → 1.5.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.
- package/assets/melodic-components.js +3550 -1656
- package/assets/melodic-components.js.map +1 -1
- package/assets/melodic-components.min.js +5497 -3605
- package/lib/components/data-display/activity-feed/activity-feed-item.component.d.ts +5 -3
- package/lib/components/data-display/activity-feed/activity-feed-item.component.d.ts.map +1 -1
- package/lib/components/data-display/activity-feed/activity-feed-item.component.js +6 -1
- package/lib/components/data-display/activity-feed/activity-feed-item.styles.d.ts.map +1 -1
- package/lib/components/data-display/activity-feed/activity-feed-item.styles.js +80 -31
- package/lib/components/data-display/activity-feed/activity-feed-item.template.d.ts.map +1 -1
- package/lib/components/data-display/activity-feed/activity-feed-item.template.js +2 -1
- package/lib/components/data-display/activity-feed/activity-feed.component.d.ts.map +1 -1
- package/lib/components/data-display/activity-feed/activity-feed.styles.d.ts.map +1 -1
- package/lib/components/data-display/activity-feed/activity-feed.styles.js +5 -1
- package/lib/components/data-display/avatar/avatar.component.d.ts.map +1 -1
- package/lib/components/data-display/avatar/avatar.styles.d.ts.map +1 -1
- package/lib/components/data-display/avatar/avatar.styles.js +18 -7
- package/lib/components/data-display/badge/badge.component.d.ts +2 -0
- package/lib/components/data-display/badge/badge.component.d.ts.map +1 -1
- package/lib/components/data-display/badge/badge.component.js +3 -1
- package/lib/components/data-display/badge/badge.styles.d.ts.map +1 -1
- package/lib/components/data-display/badge/badge.styles.js +35 -10
- package/lib/components/data-display/badge/badge.template.d.ts.map +1 -1
- package/lib/components/data-display/badge/badge.template.js +4 -1
- package/lib/components/data-display/badge-group/badge-group.component.d.ts.map +1 -1
- package/lib/components/data-display/badge-group/badge-group.styles.d.ts.map +1 -1
- package/lib/components/data-display/badge-group/badge-group.styles.js +29 -14
- package/lib/components/data-display/calendar-view/calendar-view.component.d.ts.map +1 -1
- package/lib/components/data-display/calendar-view/calendar-view.styles.d.ts.map +1 -1
- package/lib/components/data-display/calendar-view/calendar-view.styles.js +155 -89
- package/lib/components/data-display/data-grid/data-grid.component.d.ts.map +1 -1
- package/lib/components/data-display/data-grid/data-grid.styles.d.ts.map +1 -1
- package/lib/components/data-display/data-grid/data-grid.styles.js +117 -61
- package/lib/components/data-display/list/list-item.component.d.ts.map +1 -1
- package/lib/components/data-display/list/list-item.styles.d.ts.map +1 -1
- package/lib/components/data-display/list/list-item.styles.js +35 -13
- package/lib/components/data-display/list/list.component.d.ts.map +1 -1
- package/lib/components/data-display/list/list.styles.d.ts.map +1 -1
- package/lib/components/data-display/list/list.styles.js +5 -1
- package/lib/components/data-display/profile-card/index.d.ts +2 -0
- package/lib/components/data-display/profile-card/index.d.ts.map +1 -0
- package/lib/components/data-display/profile-card/index.js +1 -0
- package/lib/components/data-display/profile-card/profile-card.component.d.ts +61 -0
- package/lib/components/data-display/profile-card/profile-card.component.d.ts.map +1 -0
- package/lib/components/data-display/profile-card/profile-card.component.js +102 -0
- package/lib/components/data-display/profile-card/profile-card.styles.d.ts +2 -0
- package/lib/components/data-display/profile-card/profile-card.styles.d.ts.map +1 -0
- package/lib/components/data-display/profile-card/profile-card.styles.js +182 -0
- package/lib/components/data-display/profile-card/profile-card.template.d.ts +3 -0
- package/lib/components/data-display/profile-card/profile-card.template.d.ts.map +1 -0
- package/lib/components/data-display/profile-card/profile-card.template.js +52 -0
- package/lib/components/data-display/stat-card/index.d.ts +2 -0
- package/lib/components/data-display/stat-card/index.d.ts.map +1 -0
- package/lib/components/data-display/stat-card/index.js +1 -0
- package/lib/components/data-display/stat-card/stat-card.component.d.ts +45 -0
- package/lib/components/data-display/stat-card/stat-card.component.d.ts.map +1 -0
- package/lib/components/data-display/stat-card/stat-card.component.js +59 -0
- package/lib/components/data-display/stat-card/stat-card.styles.d.ts +2 -0
- package/lib/components/data-display/stat-card/stat-card.styles.d.ts.map +1 -0
- package/lib/components/data-display/stat-card/stat-card.styles.js +119 -0
- package/lib/components/data-display/stat-card/stat-card.template.d.ts +3 -0
- package/lib/components/data-display/stat-card/stat-card.template.d.ts.map +1 -0
- package/lib/components/data-display/stat-card/stat-card.template.js +27 -0
- package/lib/components/data-display/table/table.component.d.ts.map +1 -1
- package/lib/components/data-display/table/table.styles.d.ts.map +1 -1
- package/lib/components/data-display/table/table.styles.js +61 -23
- package/lib/components/data-display/tag/tag.component.d.ts.map +1 -1
- package/lib/components/data-display/tag/tag.styles.d.ts.map +1 -1
- package/lib/components/data-display/tag/tag.styles.js +62 -25
- package/lib/components/feedback/alert/alert.component.d.ts.map +1 -1
- package/lib/components/feedback/alert/alert.styles.d.ts.map +1 -1
- package/lib/components/feedback/alert/alert.styles.js +41 -17
- package/lib/components/feedback/progress/progress.component.d.ts.map +1 -1
- package/lib/components/feedback/progress/progress.styles.d.ts.map +1 -1
- package/lib/components/feedback/progress/progress.styles.js +112 -56
- package/lib/components/feedback/spinner/spinner.component.d.ts.map +1 -1
- package/lib/components/feedback/spinner/spinner.styles.d.ts.map +1 -1
- package/lib/components/feedback/spinner/spinner.styles.js +32 -16
- package/lib/components/feedback/toast/toast-container.component.d.ts.map +1 -1
- package/lib/components/feedback/toast/toast.component.d.ts.map +1 -1
- package/lib/components/feedback/toast/toast.service.d.ts.map +1 -1
- package/lib/components/feedback/toast/toast.styles.d.ts.map +1 -1
- package/lib/components/feedback/toast/toast.styles.js +69 -26
- package/lib/components/forms/autocomplete/autocomplete.component.d.ts.map +1 -1
- package/lib/components/forms/autocomplete/autocomplete.styles.d.ts.map +1 -1
- package/lib/components/forms/autocomplete/autocomplete.styles.js +164 -76
- package/lib/components/forms/button/button.component.d.ts.map +1 -1
- package/lib/components/forms/button/button.styles.d.ts.map +1 -1
- package/lib/components/forms/button/button.styles.js +141 -116
- package/lib/components/forms/button-group/button-group-item.component.d.ts.map +1 -1
- package/lib/components/forms/button-group/button-group.component.d.ts.map +1 -1
- package/lib/components/forms/button-group/button-group.styles.d.ts.map +1 -1
- package/lib/components/forms/button-group/button-group.styles.js +8 -2
- package/lib/components/forms/checkbox/checkbox.component.d.ts.map +1 -1
- package/lib/components/forms/checkbox/checkbox.styles.d.ts.map +1 -1
- package/lib/components/forms/checkbox/checkbox.styles.js +75 -41
- package/lib/components/forms/date-picker/calendar.component.d.ts.map +1 -1
- package/lib/components/forms/date-picker/calendar.styles.d.ts.map +1 -1
- package/lib/components/forms/date-picker/calendar.styles.js +108 -47
- package/lib/components/forms/date-picker/date-picker.component.d.ts.map +1 -1
- package/lib/components/forms/date-picker/date-picker.styles.d.ts.map +1 -1
- package/lib/components/forms/date-picker/date-picker.styles.js +96 -38
- package/lib/components/forms/date-time-picker/date-time-picker.component.d.ts.map +1 -1
- package/lib/components/forms/date-time-picker/date-time-picker.styles.d.ts.map +1 -1
- package/lib/components/forms/date-time-picker/date-time-picker.styles.js +65 -25
- package/lib/components/forms/file-upload/file-icon.component.d.ts.map +1 -1
- package/lib/components/forms/file-upload/file-upload-item.component.d.ts.map +1 -1
- package/lib/components/forms/file-upload/file-upload.component.d.ts +2 -2
- package/lib/components/forms/file-upload/file-upload.component.d.ts.map +1 -1
- package/lib/components/forms/file-upload/file-upload.component.js +3 -3
- package/lib/components/forms/file-upload/file-upload.styles.d.ts.map +1 -1
- package/lib/components/forms/file-upload/file-upload.styles.js +92 -39
- package/lib/components/forms/form-field/form-field.component.d.ts.map +1 -1
- package/lib/components/forms/form-field/form-field.styles.d.ts.map +1 -1
- package/lib/components/forms/form-field/form-field.styles.js +72 -29
- package/lib/components/forms/input/input.component.d.ts.map +1 -1
- package/lib/components/forms/input/input.styles.d.ts.map +1 -1
- package/lib/components/forms/input/input.styles.js +81 -29
- package/lib/components/forms/radio/radio-group.component.d.ts.map +1 -1
- package/lib/components/forms/radio/radio.component.d.ts.map +1 -1
- package/lib/components/forms/radio/radio.styles.d.ts.map +1 -1
- package/lib/components/forms/radio/radio.styles.js +85 -54
- package/lib/components/forms/radio-card-group/radio-card-group.component.d.ts.map +1 -1
- package/lib/components/forms/radio-card-group/radio-card-group.styles.d.ts.map +1 -1
- package/lib/components/forms/radio-card-group/radio-card-group.styles.js +34 -12
- package/lib/components/forms/radio-card-group/radio-card.component.d.ts.map +1 -1
- package/lib/components/forms/radio-card-group/radio-card.styles.d.ts.map +1 -1
- package/lib/components/forms/radio-card-group/radio-card.styles.js +108 -47
- package/lib/components/forms/select/select.component.d.ts.map +1 -1
- package/lib/components/forms/select/select.styles.d.ts.map +1 -1
- package/lib/components/forms/select/select.styles.js +152 -71
- package/lib/components/forms/slider/slider.component.d.ts.map +1 -1
- package/lib/components/forms/slider/slider.styles.d.ts.map +1 -1
- package/lib/components/forms/slider/slider.styles.js +77 -36
- package/lib/components/forms/textarea/textarea.component.d.ts.map +1 -1
- package/lib/components/forms/textarea/textarea.styles.d.ts.map +1 -1
- package/lib/components/forms/textarea/textarea.styles.js +79 -31
- package/lib/components/forms/time-picker/time-picker.component.d.ts.map +1 -1
- package/lib/components/forms/time-picker/time-picker.styles.d.ts.map +1 -1
- package/lib/components/forms/time-picker/time-picker.styles.js +196 -91
- package/lib/components/forms/toggle/toggle.component.d.ts.map +1 -1
- package/lib/components/forms/toggle/toggle.styles.d.ts.map +1 -1
- package/lib/components/forms/toggle/toggle.styles.js +84 -54
- package/lib/components/foundation/card/card.component.d.ts.map +1 -1
- package/lib/components/foundation/card/card.styles.d.ts.map +1 -1
- package/lib/components/foundation/card/card.styles.js +48 -17
- package/lib/components/foundation/container/container.component.d.ts.map +1 -1
- package/lib/components/foundation/divider/divider.component.d.ts.map +1 -1
- package/lib/components/foundation/divider/divider.styles.d.ts.map +1 -1
- package/lib/components/foundation/divider/divider.styles.js +24 -12
- package/lib/components/foundation/stack/stack.component.d.ts.map +1 -1
- package/lib/components/general/icon/icon.component.d.ts.map +1 -1
- package/lib/components/general/icon/icon.styles.d.ts.map +1 -1
- package/lib/components/general/icon/icon.styles.js +9 -2
- package/lib/components/navigation/breadcrumb/breadcrumb-item.component.d.ts.map +1 -1
- package/lib/components/navigation/breadcrumb/breadcrumb.component.d.ts.map +1 -1
- package/lib/components/navigation/breadcrumb/breadcrumb.styles.d.ts.map +1 -1
- package/lib/components/navigation/breadcrumb/breadcrumb.styles.js +4 -1
- package/lib/components/navigation/pagination/pagination.component.d.ts.map +1 -1
- package/lib/components/navigation/pagination/pagination.styles.d.ts.map +1 -1
- package/lib/components/navigation/pagination/pagination.styles.js +59 -23
- package/lib/components/navigation/sidebar/sidebar-group.component.d.ts.map +1 -1
- package/lib/components/navigation/sidebar/sidebar-item.component.d.ts +3 -1
- package/lib/components/navigation/sidebar/sidebar-item.component.d.ts.map +1 -1
- package/lib/components/navigation/sidebar/sidebar-item.component.js +3 -1
- package/lib/components/navigation/sidebar/sidebar-item.styles.d.ts.map +1 -1
- package/lib/components/navigation/sidebar/sidebar-item.styles.js +79 -33
- package/lib/components/navigation/sidebar/sidebar-item.template.js +1 -1
- package/lib/components/navigation/sidebar/sidebar.component.d.ts +1 -3
- package/lib/components/navigation/sidebar/sidebar.component.d.ts.map +1 -1
- package/lib/components/navigation/sidebar/sidebar.component.js +1 -5
- package/lib/components/navigation/sidebar/sidebar.styles.d.ts.map +1 -1
- package/lib/components/navigation/sidebar/sidebar.styles.js +154 -61
- package/lib/components/navigation/steps/step-panel.component.d.ts.map +1 -1
- package/lib/components/navigation/steps/step.component.d.ts.map +1 -1
- package/lib/components/navigation/steps/step.styles.d.ts.map +1 -1
- package/lib/components/navigation/steps/step.styles.js +149 -83
- package/lib/components/navigation/steps/steps.component.d.ts +1 -1
- package/lib/components/navigation/steps/steps.component.d.ts.map +1 -1
- package/lib/components/navigation/steps/steps.styles.d.ts.map +1 -1
- package/lib/components/navigation/steps/steps.styles.js +169 -91
- package/lib/components/navigation/tabs/tab-panel.component.d.ts.map +1 -1
- package/lib/components/navigation/tabs/tab.component.d.ts.map +1 -1
- package/lib/components/navigation/tabs/tab.styles.d.ts.map +1 -1
- package/lib/components/navigation/tabs/tab.styles.js +36 -12
- package/lib/components/navigation/tabs/tabs.component.d.ts +1 -1
- package/lib/components/navigation/tabs/tabs.component.d.ts.map +1 -1
- package/lib/components/navigation/tabs/tabs.styles.d.ts.map +1 -1
- package/lib/components/navigation/tabs/tabs.styles.js +126 -57
- package/lib/components/overlays/dialog/dialog-ref.class.d.ts.map +1 -1
- package/lib/components/overlays/dialog/dialog.component.d.ts.map +1 -1
- package/lib/components/overlays/dialog/dialog.service.d.ts.map +1 -1
- package/lib/components/overlays/dialog/dialog.styles.d.ts.map +1 -1
- package/lib/components/overlays/dialog/dialog.styles.js +73 -33
- package/lib/components/overlays/drawer/drawer.component.d.ts.map +1 -1
- package/lib/components/overlays/drawer/drawer.styles.d.ts.map +1 -1
- package/lib/components/overlays/drawer/drawer.styles.js +77 -33
- package/lib/components/overlays/dropdown/dropdown-group.component.d.ts.map +1 -1
- package/lib/components/overlays/dropdown/dropdown-item.component.d.ts.map +1 -1
- package/lib/components/overlays/dropdown/dropdown-item.styles.d.ts.map +1 -1
- package/lib/components/overlays/dropdown/dropdown-item.styles.js +43 -17
- package/lib/components/overlays/dropdown/dropdown.component.d.ts.map +1 -1
- package/lib/components/overlays/dropdown/dropdown.styles.d.ts.map +1 -1
- package/lib/components/overlays/dropdown/dropdown.styles.js +30 -15
- package/lib/components/overlays/popover/popover.component.d.ts.map +1 -1
- package/lib/components/overlays/popover/popover.styles.d.ts.map +1 -1
- package/lib/components/overlays/popover/popover.styles.js +29 -14
- package/lib/components/overlays/tooltip/tooltip.component.d.ts.map +1 -1
- package/lib/components/overlays/tooltip/tooltip.styles.d.ts.map +1 -1
- package/lib/components/overlays/tooltip/tooltip.styles.js +28 -12
- package/lib/components/pages/auth/auth-layout.styles.d.ts +1 -1
- package/lib/components/pages/auth/auth-layout.styles.d.ts.map +1 -1
- package/lib/components/pages/auth/auth-layout.styles.js +79 -31
- package/lib/components/pages/auth/login-page.component.d.ts.map +1 -1
- package/lib/components/pages/auth/signup-page.component.d.ts.map +1 -1
- package/lib/components/pages/dashboard/dashboard-page.component.d.ts.map +1 -1
- package/lib/components/pages/dashboard/dashboard-page.styles.d.ts.map +1 -1
- package/lib/components/pages/dashboard/dashboard-page.styles.js +34 -12
- package/lib/components/sections/app-shell/app-shell.component.d.ts.map +1 -1
- package/lib/components/sections/app-shell/app-shell.styles.d.ts.map +1 -1
- package/lib/components/sections/app-shell/app-shell.styles.js +54 -23
- package/lib/components/sections/hero/hero-section.component.d.ts.map +1 -1
- package/lib/components/sections/hero/hero-section.styles.d.ts.map +1 -1
- package/lib/components/sections/hero/hero-section.styles.js +97 -40
- package/lib/components/sections/page-header/page-header.component.d.ts.map +1 -1
- package/lib/components/sections/page-header/page-header.styles.d.ts.map +1 -1
- package/lib/components/sections/page-header/page-header.styles.js +62 -28
- package/lib/components/sections/page-section/index.d.ts +2 -0
- package/lib/components/sections/page-section/index.d.ts.map +1 -0
- package/lib/components/sections/page-section/index.js +1 -0
- package/lib/components/sections/page-section/page-section.component.d.ts +39 -0
- package/lib/components/sections/page-section/page-section.component.d.ts.map +1 -0
- package/lib/components/sections/page-section/page-section.component.js +56 -0
- package/lib/components/sections/page-section/page-section.styles.d.ts +2 -0
- package/lib/components/sections/page-section/page-section.styles.d.ts.map +1 -0
- package/lib/components/sections/page-section/page-section.styles.js +102 -0
- package/lib/components/sections/page-section/page-section.template.d.ts +3 -0
- package/lib/components/sections/page-section/page-section.template.d.ts.map +1 -0
- package/lib/components/sections/page-section/page-section.template.js +30 -0
- package/lib/utils/virtual-scroll/index.d.ts.map +1 -1
- package/package.json +13 -1
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { MelodicComponent } from '@melodicdev/core';
|
|
8
|
+
import { profileCardTemplate } from './profile-card.template.js';
|
|
9
|
+
import { profileCardStyles } from './profile-card.styles.js';
|
|
10
|
+
/**
|
|
11
|
+
* ml-profile-card - Identity card for person/entity detail pages
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```html
|
|
15
|
+
* <ml-profile-card
|
|
16
|
+
* name="Sarah Mitchell"
|
|
17
|
+
* subtitle="Member · Women's Ministry"
|
|
18
|
+
* avatar="https://example.com/photo.jpg"
|
|
19
|
+
* avatar-size="lg"
|
|
20
|
+
* >
|
|
21
|
+
* <div slot="details">
|
|
22
|
+
* <div class="detail-row"><ml-icon icon="envelope" size="sm"></ml-icon> sarah@example.com</div>
|
|
23
|
+
* <div class="detail-row"><ml-icon icon="phone" size="sm"></ml-icon> (555) 123-4567</div>
|
|
24
|
+
* </div>
|
|
25
|
+
* <div slot="tags">
|
|
26
|
+
* <ml-tag>Women's Ministry</ml-tag>
|
|
27
|
+
* <ml-tag>Choir</ml-tag>
|
|
28
|
+
* </div>
|
|
29
|
+
* <div slot="actions">
|
|
30
|
+
* <ml-button variant="primary">Message</ml-button>
|
|
31
|
+
* <ml-button variant="outline">Edit</ml-button>
|
|
32
|
+
* </div>
|
|
33
|
+
* <div slot="meta">
|
|
34
|
+
* <div>Member since: January 2019</div>
|
|
35
|
+
* <div>Birthday: March 15</div>
|
|
36
|
+
* </div>
|
|
37
|
+
* </ml-profile-card>
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @slot details - Contact info rows (icon + text pairs)
|
|
41
|
+
* @slot tags - Involvement/group tags
|
|
42
|
+
* @slot actions - Action buttons (Message, Edit, etc.)
|
|
43
|
+
* @slot meta - Detail fields (member since, birthday, family)
|
|
44
|
+
*
|
|
45
|
+
* @cssproperty --ml-profile-card-bg - Card background (default: var(--ml-color-surface))
|
|
46
|
+
* @cssproperty --ml-profile-card-banner-from - Banner gradient start color
|
|
47
|
+
* @cssproperty --ml-profile-card-banner-to - Banner gradient end color
|
|
48
|
+
*/
|
|
49
|
+
let ProfileCardComponent = class ProfileCardComponent {
|
|
50
|
+
constructor() {
|
|
51
|
+
/** Person name */
|
|
52
|
+
this.name = '';
|
|
53
|
+
/** Subtitle (e.g. "Member · Women's Ministry") */
|
|
54
|
+
this.subtitle = '';
|
|
55
|
+
/** Avatar image URL — falls back to initials derived from name */
|
|
56
|
+
this.avatar = '';
|
|
57
|
+
/** Avatar size */
|
|
58
|
+
this['avatar-size'] = 'lg';
|
|
59
|
+
/** Slot visibility flags (toggled via slotchange) */
|
|
60
|
+
this.hasDetails = false;
|
|
61
|
+
this.hasTags = false;
|
|
62
|
+
this.hasActions = false;
|
|
63
|
+
this.hasMeta = false;
|
|
64
|
+
}
|
|
65
|
+
/** Derive initials from name */
|
|
66
|
+
get initials() {
|
|
67
|
+
return this.name
|
|
68
|
+
.split(' ')
|
|
69
|
+
.map(part => part.charAt(0))
|
|
70
|
+
.join('')
|
|
71
|
+
.toUpperCase()
|
|
72
|
+
.slice(0, 2);
|
|
73
|
+
}
|
|
74
|
+
onCreate() {
|
|
75
|
+
const shadow = this.elementRef.shadowRoot;
|
|
76
|
+
if (!shadow)
|
|
77
|
+
return;
|
|
78
|
+
shadow.querySelectorAll('slot[name]').forEach(slot => {
|
|
79
|
+
slot.addEventListener('slotchange', () => {
|
|
80
|
+
const name = slot.getAttribute('name');
|
|
81
|
+
const hasContent = slot.assignedNodes().length > 0;
|
|
82
|
+
if (name === 'details')
|
|
83
|
+
this.hasDetails = hasContent;
|
|
84
|
+
else if (name === 'tags')
|
|
85
|
+
this.hasTags = hasContent;
|
|
86
|
+
else if (name === 'actions')
|
|
87
|
+
this.hasActions = hasContent;
|
|
88
|
+
else if (name === 'meta')
|
|
89
|
+
this.hasMeta = hasContent;
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
ProfileCardComponent = __decorate([
|
|
95
|
+
MelodicComponent({
|
|
96
|
+
selector: 'ml-profile-card',
|
|
97
|
+
template: profileCardTemplate,
|
|
98
|
+
styles: profileCardStyles,
|
|
99
|
+
attributes: ['name', 'subtitle', 'avatar', 'avatar-size']
|
|
100
|
+
})
|
|
101
|
+
], ProfileCardComponent);
|
|
102
|
+
export { ProfileCardComponent };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-card.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/data-display/profile-card/profile-card.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,iDAoL7B,CAAC"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { css } from '@melodicdev/core';
|
|
2
|
+
export const profileCardStyles = () => css `
|
|
3
|
+
:host {
|
|
4
|
+
display: block;
|
|
5
|
+
|
|
6
|
+
/* ── Profile Card: surface ── */
|
|
7
|
+
--ml-profile-card-bg: var(--ml-color-surface);
|
|
8
|
+
--ml-profile-card-border-width: var(--ml-border);
|
|
9
|
+
--ml-profile-card-border-color: var(--ml-color-border);
|
|
10
|
+
--ml-profile-card-radius: var(--ml-radius-lg);
|
|
11
|
+
|
|
12
|
+
/* ── Profile Card: banner ── */
|
|
13
|
+
--ml-profile-card-banner-height: 80px;
|
|
14
|
+
--ml-profile-card-banner-from: var(--ml-color-primary);
|
|
15
|
+
--ml-profile-card-banner-to: var(--ml-color-primary-hover, var(--ml-color-primary));
|
|
16
|
+
--ml-profile-card-banner-opacity: 0.85;
|
|
17
|
+
|
|
18
|
+
/* ── Profile Card: avatar ── */
|
|
19
|
+
--ml-profile-card-avatar-ring-color: var(--ml-color-border);
|
|
20
|
+
--ml-profile-card-avatar-shadow: var(--ml-shadow-md);
|
|
21
|
+
|
|
22
|
+
/* ── Profile Card: name ── */
|
|
23
|
+
--ml-profile-card-name-font: 'Cormorant Garamond', 'Georgia', serif;
|
|
24
|
+
--ml-profile-card-name-size: var(--ml-text-xl);
|
|
25
|
+
--ml-profile-card-name-weight: var(--ml-font-semibold);
|
|
26
|
+
--ml-profile-card-name-color: var(--ml-color-text);
|
|
27
|
+
|
|
28
|
+
/* ── Profile Card: subtitle ── */
|
|
29
|
+
--ml-profile-card-subtitle-font: var(--ml-font-sans);
|
|
30
|
+
--ml-profile-card-subtitle-size: var(--ml-text-sm);
|
|
31
|
+
--ml-profile-card-subtitle-color: var(--ml-color-text-muted);
|
|
32
|
+
|
|
33
|
+
/* ── Profile Card: section label ── */
|
|
34
|
+
--ml-profile-card-section-label-font: var(--ml-font-sans);
|
|
35
|
+
--ml-profile-card-section-label-size: var(--ml-text-xs);
|
|
36
|
+
--ml-profile-card-section-label-weight: var(--ml-font-semibold);
|
|
37
|
+
--ml-profile-card-section-label-color: var(--ml-color-text-muted);
|
|
38
|
+
|
|
39
|
+
/* ── Profile Card: details / meta text ── */
|
|
40
|
+
--ml-profile-card-detail-font: var(--ml-font-sans);
|
|
41
|
+
--ml-profile-card-detail-size: var(--ml-text-sm);
|
|
42
|
+
--ml-profile-card-detail-color: var(--ml-color-text-secondary);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ml-profile-card {
|
|
46
|
+
background-color: var(--ml-profile-card-bg);
|
|
47
|
+
border: var(--ml-profile-card-border-width) solid var(--ml-profile-card-border-color);
|
|
48
|
+
border-radius: var(--ml-profile-card-radius);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* Subtle gradient banner at top */
|
|
52
|
+
.ml-profile-card__banner {
|
|
53
|
+
height: var(--ml-profile-card-banner-height);
|
|
54
|
+
border-radius: var(--ml-profile-card-radius) var(--ml-profile-card-radius) 0 0;
|
|
55
|
+
background: linear-gradient(
|
|
56
|
+
135deg,
|
|
57
|
+
var(--ml-profile-card-banner-from),
|
|
58
|
+
var(--ml-profile-card-banner-to)
|
|
59
|
+
);
|
|
60
|
+
opacity: var(--ml-profile-card-banner-opacity);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* Centered identity area */
|
|
64
|
+
.ml-profile-card__identity {
|
|
65
|
+
position: relative;
|
|
66
|
+
z-index: 1;
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
align-items: center;
|
|
70
|
+
padding: 0 var(--ml-space-5) var(--ml-space-4);
|
|
71
|
+
margin-top: calc(var(--ml-space-10) * -1);
|
|
72
|
+
text-align: center;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.ml-profile-card__avatar {
|
|
76
|
+
display: inline-block;
|
|
77
|
+
margin-bottom: var(--ml-space-3);
|
|
78
|
+
border-radius: var(--ml-radius-full);
|
|
79
|
+
box-shadow: 0 0 0 4px var(--ml-profile-card-bg), 0 0 0 5px var(--ml-profile-card-avatar-ring-color), var(--ml-profile-card-avatar-shadow);
|
|
80
|
+
line-height: 0;
|
|
81
|
+
position: relative;
|
|
82
|
+
z-index: 1;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.ml-profile-card__avatar ml-avatar {
|
|
86
|
+
display: block;
|
|
87
|
+
--ml-avatar-border-color: var(--ml-color-border-muted, var(--ml-profile-card-border-color));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ml-profile-card__name {
|
|
91
|
+
margin: 0;
|
|
92
|
+
font-family: var(--ml-profile-card-name-font);
|
|
93
|
+
font-size: var(--ml-profile-card-name-size);
|
|
94
|
+
font-weight: var(--ml-profile-card-name-weight);
|
|
95
|
+
color: var(--ml-profile-card-name-color);
|
|
96
|
+
line-height: var(--ml-leading-tight);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.ml-profile-card__subtitle {
|
|
100
|
+
margin: var(--ml-space-1) 0 0;
|
|
101
|
+
font-family: var(--ml-profile-card-subtitle-font);
|
|
102
|
+
font-size: var(--ml-profile-card-subtitle-size);
|
|
103
|
+
color: var(--ml-profile-card-subtitle-color);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* Sections */
|
|
107
|
+
.ml-profile-card__section {
|
|
108
|
+
padding: var(--ml-space-4) var(--ml-space-5);
|
|
109
|
+
border-top: var(--ml-profile-card-border-width) solid var(--ml-profile-card-border-color);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.ml-profile-card__section--hidden {
|
|
113
|
+
display: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.ml-profile-card__section-label {
|
|
117
|
+
width: 100%;
|
|
118
|
+
font-family: var(--ml-profile-card-section-label-font);
|
|
119
|
+
font-size: var(--ml-profile-card-section-label-size);
|
|
120
|
+
font-weight: var(--ml-profile-card-section-label-weight);
|
|
121
|
+
color: var(--ml-profile-card-section-label-color);
|
|
122
|
+
text-transform: uppercase;
|
|
123
|
+
letter-spacing: 0.06em;
|
|
124
|
+
margin-bottom: var(--ml-space-1);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* Actions section */
|
|
128
|
+
.ml-profile-card__actions {
|
|
129
|
+
display: flex;
|
|
130
|
+
justify-content: center;
|
|
131
|
+
gap: var(--ml-space-3);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.ml-profile-card__actions.ml-profile-card__section--hidden {
|
|
135
|
+
display: none;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* Details section */
|
|
139
|
+
.ml-profile-card__details {
|
|
140
|
+
display: flex;
|
|
141
|
+
flex-direction: column;
|
|
142
|
+
gap: var(--ml-space-2);
|
|
143
|
+
font-family: var(--ml-profile-card-detail-font);
|
|
144
|
+
font-size: var(--ml-profile-card-detail-size);
|
|
145
|
+
color: var(--ml-profile-card-detail-color);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.ml-profile-card__details.ml-profile-card__section--hidden {
|
|
149
|
+
display: none;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.ml-profile-card__details ::slotted(*) {
|
|
153
|
+
display: flex;
|
|
154
|
+
align-items: center;
|
|
155
|
+
gap: var(--ml-space-2);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* Tags section */
|
|
159
|
+
.ml-profile-card__tags {
|
|
160
|
+
display: flex;
|
|
161
|
+
flex-wrap: wrap;
|
|
162
|
+
gap: var(--ml-space-2);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.ml-profile-card__tags.ml-profile-card__section--hidden {
|
|
166
|
+
display: none;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* Meta section */
|
|
170
|
+
.ml-profile-card__meta {
|
|
171
|
+
display: flex;
|
|
172
|
+
flex-direction: column;
|
|
173
|
+
gap: var(--ml-space-2);
|
|
174
|
+
font-family: var(--ml-profile-card-detail-font);
|
|
175
|
+
font-size: var(--ml-profile-card-detail-size);
|
|
176
|
+
color: var(--ml-profile-card-detail-color);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.ml-profile-card__meta.ml-profile-card__section--hidden {
|
|
180
|
+
display: none;
|
|
181
|
+
}
|
|
182
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-card.template.d.ts","sourceRoot":"","sources":["../../../../src/components/data-display/profile-card/profile-card.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAExE,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,oBAAoB,6CAkD1D"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { html, classMap, when } from '@melodicdev/core';
|
|
2
|
+
export function profileCardTemplate(c) {
|
|
3
|
+
return html `
|
|
4
|
+
<div class="ml-profile-card">
|
|
5
|
+
<div class="ml-profile-card__banner"></div>
|
|
6
|
+
<div class="ml-profile-card__identity">
|
|
7
|
+
<div class="ml-profile-card__avatar">
|
|
8
|
+
<ml-avatar
|
|
9
|
+
size=${c['avatar-size']}
|
|
10
|
+
src=${c.avatar}
|
|
11
|
+
initials=${c.initials}
|
|
12
|
+
></ml-avatar>
|
|
13
|
+
</div>
|
|
14
|
+
<h2 class="ml-profile-card__name">${c.name}</h2>
|
|
15
|
+
${when(!!c.subtitle, () => html `
|
|
16
|
+
<p class="ml-profile-card__subtitle">${c.subtitle}</p>
|
|
17
|
+
`)}
|
|
18
|
+
</div>
|
|
19
|
+
<div class=${classMap({
|
|
20
|
+
'ml-profile-card__section': true,
|
|
21
|
+
'ml-profile-card__actions': true,
|
|
22
|
+
'ml-profile-card__section--hidden': !c.hasActions
|
|
23
|
+
})}>
|
|
24
|
+
<slot name="actions"></slot>
|
|
25
|
+
</div>
|
|
26
|
+
<div class=${classMap({
|
|
27
|
+
'ml-profile-card__section': true,
|
|
28
|
+
'ml-profile-card__details': true,
|
|
29
|
+
'ml-profile-card__section--hidden': !c.hasDetails
|
|
30
|
+
})}>
|
|
31
|
+
<div class="ml-profile-card__section-label">Contact</div>
|
|
32
|
+
<slot name="details"></slot>
|
|
33
|
+
</div>
|
|
34
|
+
<div class=${classMap({
|
|
35
|
+
'ml-profile-card__section': true,
|
|
36
|
+
'ml-profile-card__tags': true,
|
|
37
|
+
'ml-profile-card__section--hidden': !c.hasTags
|
|
38
|
+
})}>
|
|
39
|
+
<div class="ml-profile-card__section-label">Involvement</div>
|
|
40
|
+
<slot name="tags"></slot>
|
|
41
|
+
</div>
|
|
42
|
+
<div class=${classMap({
|
|
43
|
+
'ml-profile-card__section': true,
|
|
44
|
+
'ml-profile-card__meta': true,
|
|
45
|
+
'ml-profile-card__section--hidden': !c.hasMeta
|
|
46
|
+
})}>
|
|
47
|
+
<div class="ml-profile-card__section-label">Details</div>
|
|
48
|
+
<slot name="meta"></slot>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
`;
|
|
52
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data-display/stat-card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { StatCardComponent } from './stat-card.component.js';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { IElementRef } from '@melodicdev/core';
|
|
2
|
+
type TrendDirection = 'up' | 'down' | 'neutral';
|
|
3
|
+
type ValueFont = 'serif' | 'sans';
|
|
4
|
+
/**
|
|
5
|
+
* ml-stat-card - Dashboard metric card with label, value, optional trend, and icon
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```html
|
|
9
|
+
* <ml-stat-card
|
|
10
|
+
* label="Total Members"
|
|
11
|
+
* value="1,247"
|
|
12
|
+
* trend="+6 this month"
|
|
13
|
+
* trend-direction="up"
|
|
14
|
+
* icon="users"
|
|
15
|
+
* ></ml-stat-card>
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @csspart value - The large value display
|
|
19
|
+
* @csspart label - The label text
|
|
20
|
+
* @csspart trend - The trend text
|
|
21
|
+
* @csspart icon - The icon container
|
|
22
|
+
*
|
|
23
|
+
* @cssproperty --ml-stat-card-bg - Card background color (default: var(--ml-color-surface))
|
|
24
|
+
* @cssproperty --ml-stat-card-icon-color - Icon color (default: var(--ml-color-text-tertiary))
|
|
25
|
+
* @cssproperty --ml-stat-card-value-color - Value text color (default: var(--ml-color-text))
|
|
26
|
+
*/
|
|
27
|
+
export declare class StatCardComponent implements IElementRef {
|
|
28
|
+
elementRef: HTMLElement;
|
|
29
|
+
/** Metric label */
|
|
30
|
+
label: string;
|
|
31
|
+
/** Display value */
|
|
32
|
+
value: string | number;
|
|
33
|
+
/** Trend text (e.g. "+6 this month") */
|
|
34
|
+
trend: string;
|
|
35
|
+
/** Trend direction for styling */
|
|
36
|
+
'trend-direction': TrendDirection;
|
|
37
|
+
/** Icon name (Phosphor icon) */
|
|
38
|
+
icon: string;
|
|
39
|
+
/** Icon color — CSS color value or token */
|
|
40
|
+
'icon-color': string;
|
|
41
|
+
/** Value font family */
|
|
42
|
+
'value-font': ValueFont;
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=stat-card.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stat-card.component.d.ts","sourceRoot":"","sources":["../../../../src/components/data-display/stat-card/stat-card.component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAIpD,KAAK,cAAc,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAAC;AAChD,KAAK,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAMa,iBAAkB,YAAW,WAAW;IAC7C,UAAU,EAAG,WAAW,CAAC;IAEhC,mBAAmB;IACZ,KAAK,SAAM;IAElB,oBAAoB;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAM;IAEnC,wCAAwC;IACjC,KAAK,SAAM;IAElB,kCAAkC;IAC3B,iBAAiB,EAAE,cAAc,CAAa;IAErD,gCAAgC;IACzB,IAAI,SAAM;IAEjB,4CAA4C;IACrC,YAAY,SAAM;IAEzB,wBAAwB;IACjB,YAAY,EAAE,SAAS,CAAW;CACzC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { MelodicComponent } from '@melodicdev/core';
|
|
8
|
+
import { statCardTemplate } from './stat-card.template.js';
|
|
9
|
+
import { statCardStyles } from './stat-card.styles.js';
|
|
10
|
+
/**
|
|
11
|
+
* ml-stat-card - Dashboard metric card with label, value, optional trend, and icon
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```html
|
|
15
|
+
* <ml-stat-card
|
|
16
|
+
* label="Total Members"
|
|
17
|
+
* value="1,247"
|
|
18
|
+
* trend="+6 this month"
|
|
19
|
+
* trend-direction="up"
|
|
20
|
+
* icon="users"
|
|
21
|
+
* ></ml-stat-card>
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @csspart value - The large value display
|
|
25
|
+
* @csspart label - The label text
|
|
26
|
+
* @csspart trend - The trend text
|
|
27
|
+
* @csspart icon - The icon container
|
|
28
|
+
*
|
|
29
|
+
* @cssproperty --ml-stat-card-bg - Card background color (default: var(--ml-color-surface))
|
|
30
|
+
* @cssproperty --ml-stat-card-icon-color - Icon color (default: var(--ml-color-text-tertiary))
|
|
31
|
+
* @cssproperty --ml-stat-card-value-color - Value text color (default: var(--ml-color-text))
|
|
32
|
+
*/
|
|
33
|
+
let StatCardComponent = class StatCardComponent {
|
|
34
|
+
constructor() {
|
|
35
|
+
/** Metric label */
|
|
36
|
+
this.label = '';
|
|
37
|
+
/** Display value */
|
|
38
|
+
this.value = '';
|
|
39
|
+
/** Trend text (e.g. "+6 this month") */
|
|
40
|
+
this.trend = '';
|
|
41
|
+
/** Trend direction for styling */
|
|
42
|
+
this['trend-direction'] = 'neutral';
|
|
43
|
+
/** Icon name (Phosphor icon) */
|
|
44
|
+
this.icon = '';
|
|
45
|
+
/** Icon color — CSS color value or token */
|
|
46
|
+
this['icon-color'] = '';
|
|
47
|
+
/** Value font family */
|
|
48
|
+
this['value-font'] = 'serif';
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
StatCardComponent = __decorate([
|
|
52
|
+
MelodicComponent({
|
|
53
|
+
selector: 'ml-stat-card',
|
|
54
|
+
template: statCardTemplate,
|
|
55
|
+
styles: statCardStyles,
|
|
56
|
+
attributes: ['label', 'value', 'trend', 'trend-direction', 'icon', 'icon-color', 'value-font']
|
|
57
|
+
})
|
|
58
|
+
], StatCardComponent);
|
|
59
|
+
export { StatCardComponent };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stat-card.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/data-display/stat-card/stat-card.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,iDAqH1B,CAAC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { css } from '@melodicdev/core';
|
|
2
|
+
export const statCardStyles = () => css `
|
|
3
|
+
:host {
|
|
4
|
+
display: block;
|
|
5
|
+
|
|
6
|
+
/* ── Stat Card: host ── */
|
|
7
|
+
--ml-stat-card-min-width: 200px;
|
|
8
|
+
|
|
9
|
+
/* ── Stat Card: surface ── */
|
|
10
|
+
--ml-stat-card-bg: var(--ml-color-surface);
|
|
11
|
+
--ml-stat-card-border-width: var(--ml-border);
|
|
12
|
+
--ml-stat-card-border-color: var(--ml-color-border);
|
|
13
|
+
--ml-stat-card-radius: var(--ml-radius-lg);
|
|
14
|
+
--ml-stat-card-padding: var(--ml-space-5) var(--ml-space-6);
|
|
15
|
+
--ml-stat-card-shadow: var(--ml-shadow-xs);
|
|
16
|
+
|
|
17
|
+
/* ── Stat Card: label ── */
|
|
18
|
+
--ml-stat-card-label-font: var(--ml-font-sans);
|
|
19
|
+
--ml-stat-card-label-size: var(--ml-text-xs);
|
|
20
|
+
--ml-stat-card-label-weight: var(--ml-font-semibold);
|
|
21
|
+
--ml-stat-card-label-color: var(--ml-color-text-muted);
|
|
22
|
+
|
|
23
|
+
/* ── Stat Card: icon ── */
|
|
24
|
+
--ml-stat-card-icon-size: 36px;
|
|
25
|
+
--ml-stat-card-icon-bg: var(--ml-color-surface-raised, var(--ml-color-surface-sunken));
|
|
26
|
+
--ml-stat-card-icon-color: var(--ml-color-text-tertiary);
|
|
27
|
+
--ml-stat-card-icon-radius: var(--ml-radius);
|
|
28
|
+
|
|
29
|
+
/* ── Stat Card: value ── */
|
|
30
|
+
--ml-stat-card-value-color: var(--ml-color-text);
|
|
31
|
+
--ml-stat-card-value-font: 'Cormorant Garamond', 'Georgia', serif;
|
|
32
|
+
--ml-stat-card-value-size: 2.5rem;
|
|
33
|
+
--ml-stat-card-value-weight: 300;
|
|
34
|
+
--ml-stat-card-value-sans-size: 2rem;
|
|
35
|
+
|
|
36
|
+
/* ── Stat Card: trend ── */
|
|
37
|
+
--ml-stat-card-trend-font: var(--ml-font-sans);
|
|
38
|
+
--ml-stat-card-trend-size: var(--ml-text-xs);
|
|
39
|
+
--ml-stat-card-trend-color: var(--ml-color-text-muted);
|
|
40
|
+
--ml-stat-card-trend-up-color: var(--ml-color-success);
|
|
41
|
+
--ml-stat-card-trend-down-color: var(--ml-color-error);
|
|
42
|
+
|
|
43
|
+
min-width: var(--ml-stat-card-min-width);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ml-stat-card {
|
|
47
|
+
background-color: var(--ml-stat-card-bg);
|
|
48
|
+
border: var(--ml-stat-card-border-width) solid var(--ml-stat-card-border-color);
|
|
49
|
+
border-radius: var(--ml-stat-card-radius);
|
|
50
|
+
padding: var(--ml-stat-card-padding);
|
|
51
|
+
box-shadow: var(--ml-stat-card-shadow);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.ml-stat-card__header {
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
justify-content: space-between;
|
|
58
|
+
gap: var(--ml-space-3);
|
|
59
|
+
margin-bottom: var(--ml-space-2);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ml-stat-card__label {
|
|
63
|
+
font-family: var(--ml-stat-card-label-font);
|
|
64
|
+
font-size: var(--ml-stat-card-label-size);
|
|
65
|
+
font-weight: var(--ml-stat-card-label-weight);
|
|
66
|
+
color: var(--ml-stat-card-label-color);
|
|
67
|
+
text-transform: uppercase;
|
|
68
|
+
letter-spacing: 0.05em;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.ml-stat-card__icon {
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
width: var(--ml-stat-card-icon-size);
|
|
76
|
+
height: var(--ml-stat-card-icon-size);
|
|
77
|
+
border-radius: var(--ml-stat-card-icon-radius);
|
|
78
|
+
background-color: var(--ml-stat-card-icon-bg);
|
|
79
|
+
color: var(--ml-stat-card-icon-color);
|
|
80
|
+
flex-shrink: 0;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.ml-stat-card__value {
|
|
84
|
+
color: var(--ml-stat-card-value-color);
|
|
85
|
+
line-height: 1.1;
|
|
86
|
+
margin-bottom: var(--ml-space-1);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.ml-stat-card__value--serif {
|
|
90
|
+
font-family: var(--ml-stat-card-value-font);
|
|
91
|
+
font-size: var(--ml-stat-card-value-size);
|
|
92
|
+
font-weight: var(--ml-stat-card-value-weight);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.ml-stat-card__value--sans {
|
|
96
|
+
font-family: var(--ml-font-sans);
|
|
97
|
+
font-size: var(--ml-stat-card-value-sans-size);
|
|
98
|
+
font-weight: var(--ml-font-bold);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.ml-stat-card__trend {
|
|
102
|
+
font-family: var(--ml-stat-card-trend-font);
|
|
103
|
+
font-size: var(--ml-stat-card-trend-size);
|
|
104
|
+
color: var(--ml-stat-card-trend-color);
|
|
105
|
+
line-height: var(--ml-leading-normal);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.ml-stat-card__trend--up {
|
|
109
|
+
color: var(--ml-stat-card-trend-up-color);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.ml-stat-card__trend--down {
|
|
113
|
+
color: var(--ml-stat-card-trend-down-color);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.ml-stat-card__trend--neutral {
|
|
117
|
+
color: var(--ml-stat-card-trend-color);
|
|
118
|
+
}
|
|
119
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stat-card.template.d.ts","sourceRoot":"","sources":["../../../../src/components/data-display/stat-card/stat-card.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,iBAAiB,6CA0BpD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { html, classMap, when } from '@melodicdev/core';
|
|
2
|
+
export function statCardTemplate(c) {
|
|
3
|
+
const iconStyle = c['icon-color'] ? `--ml-stat-card-icon-color: ${c['icon-color']}` : '';
|
|
4
|
+
return html `
|
|
5
|
+
<div class="ml-stat-card">
|
|
6
|
+
<div class="ml-stat-card__header">
|
|
7
|
+
<span class="ml-stat-card__label">${c.label}</span>
|
|
8
|
+
${when(!!c.icon, () => html `
|
|
9
|
+
<div class="ml-stat-card__icon" style=${iconStyle}>
|
|
10
|
+
<ml-icon icon=${c.icon} size="sm"></ml-icon>
|
|
11
|
+
</div>
|
|
12
|
+
`)}
|
|
13
|
+
</div>
|
|
14
|
+
<div class=${classMap({
|
|
15
|
+
'ml-stat-card__value': true,
|
|
16
|
+
'ml-stat-card__value--serif': c['value-font'] === 'serif',
|
|
17
|
+
'ml-stat-card__value--sans': c['value-font'] === 'sans'
|
|
18
|
+
})}>${c.value}</div>
|
|
19
|
+
${when(!!c.trend, () => html `
|
|
20
|
+
<div class=${classMap({
|
|
21
|
+
'ml-stat-card__trend': true,
|
|
22
|
+
[`ml-stat-card__trend--${c['trend-direction']}`]: true
|
|
23
|
+
})}>${c.trend}</div>
|
|
24
|
+
`)}
|
|
25
|
+
</div>
|
|
26
|
+
`;
|
|
27
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.component.d.ts","sourceRoot":"","sources":["../../../../src/components/data-display/table/table.component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACrG,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAiBnE;;;;;;;;;;;;;;GAcG;AACH,qBAMa,cAAe,YAAW,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,gBAAgB;
|
|
1
|
+
{"version":3,"file":"table.component.d.ts","sourceRoot":"","sources":["../../../../src/components/data-display/table/table.component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACrG,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAiBnE;;;;;;;;;;;;;;GAcG;AACH,qBAMa,cAAe,YAAW,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,gBAAgB;IAC3F,UAAU,EAAG,WAAW,CAAC;IAEhC,+DAA+D;IACxD,aAAa,UAAS;IAE7B,0CAA0C;IACnC,SAAS,UAAS;IAEzB,kDAAkD;IAC3C,gBAAgB,UAAS;IAEhC,0CAA0C;IACnC,UAAU,UAAS;IAE1B,kCAAkC;IAC3B,OAAO,UAAS;IAEvB,8BAA8B;IACvB,SAAS,UAAQ;IAExB,0BAA0B;IACnB,YAAY,UAAS;IAE5B,iBAAiB;IACV,IAAI,EAAE,IAAI,GAAG,IAAI,CAAQ;IAEhC,yBAAyB;IAClB,UAAU,SAAM;IAEvB,+BAA+B;IACxB,WAAW,SAAM;IAExB,2DAA2D;IACpD,OAAO,UAAS;IAEvB,yBAAyB;IAClB,OAAO,EAAE,WAAW,EAAE,CAAM;IAEnC,eAAe;IACR,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAM;IAE5C,kCAAkC;IAC3B,OAAO,SAAM;IAEpB,6BAA6B;IACtB,aAAa,EAAE,aAAa,CAAS;IAE5C,+BAA+B;IACxB,eAAe,EAAE,MAAM,EAAE,CAAM;IAI/B,UAAU,SAAK;IACf,QAAQ,SAAM;IAIrB,OAAO,CAAC,SAAS,CAAyB;IAC1C,OAAO,CAAC,SAAS,CAA4B;IAI7C,IAAW,SAAS,IAAI,MAAM,CAE7B;IAIM,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;IAMxE,MAAM,IAAI,IAAI;IAId,QAAQ,IAAI,IAAI;IAgBhB,QAAQ,IAAI,IAAI;IAiBhB,SAAS,IAAI,IAAI;IAOxB,OAAO,CAAC,eAAe;IAgBvB,gDAAgD;IAChD,IAAW,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAcjD;IAED,IAAW,WAAW,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAGlD;IAED,IAAW,eAAe,IAAI,MAAM,CAEnC;IAED,IAAW,kBAAkB,IAAI,MAAM,CAGtC;IAED,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED,IAAW,WAAW,IAAI,OAAO,CAEhC;IAED,IAAW,YAAY,IAAI,OAAO,CAEjC;IAEM,aAAa,GAAI,OAAO,MAAM,KAAG,OAAO,CAE7C;IAIK,UAAU,GAAI,QAAQ,WAAW,KAAG,IAAI,CAiB7C;IAEK,eAAe,QAAO,IAAI,CAO/B;IAEK,eAAe,GAAI,OAAO,MAAM,EAAE,OAAO,KAAK,KAAG,IAAI,CAQ1D;IAEK,cAAc,GAAI,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,MAAM,KAAG,IAAI,CAQzE;IAEF,OAAO,CAAC,UAAU;CASlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/data-display/table/table.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"table.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/data-display/table/table.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,iDAwRvB,CAAC"}
|