@melodicdev/components 1.0.0 → 1.0.2

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.
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Bundle entry point — imports every component to trigger custom element registration.
3
+ * Used to build assets/melodic-components.js for CDN / script-tag usage.
4
+ *
5
+ * All theme functions, utilities, and services are also exported so they remain
6
+ * available when using the bundle programmatically:
7
+ *
8
+ * import { applyTheme, ToastService } from '.../melodic-components.js';
9
+ */
10
+ export * from './theme/index.js';
11
+ export * from './utils/index.js';
12
+ export * from './functions/index.js';
13
+ export * from './directives/index.js';
14
+ export * from './components/forms/button/index.js';
15
+ export * from './components/forms/button-group/index.js';
16
+ export * from './components/forms/input/index.js';
17
+ export * from './components/forms/textarea/index.js';
18
+ export * from './components/forms/checkbox/index.js';
19
+ export * from './components/forms/radio/index.js';
20
+ export * from './components/forms/radio-card-group/index.js';
21
+ export * from './components/forms/toggle/index.js';
22
+ export * from './components/forms/select/index.js';
23
+ export * from './components/forms/slider/index.js';
24
+ export * from './components/forms/form-field/index.js';
25
+ export * from './components/forms/date-picker/index.js';
26
+ export * from './components/feedback/spinner/index.js';
27
+ export * from './components/feedback/alert/index.js';
28
+ export * from './components/feedback/toast/index.js';
29
+ export * from './components/feedback/progress/index.js';
30
+ export * from './components/foundation/card/index.js';
31
+ export * from './components/foundation/divider/index.js';
32
+ export * from './components/foundation/stack/index.js';
33
+ export * from './components/foundation/container/index.js';
34
+ export * from './components/data-display/avatar/index.js';
35
+ export * from './components/data-display/badge/index.js';
36
+ export * from './components/data-display/badge-group/index.js';
37
+ export * from './components/data-display/tag/index.js';
38
+ export * from './components/data-display/list/index.js';
39
+ export * from './components/data-display/activity-feed/index.js';
40
+ export * from './components/data-display/table/index.js';
41
+ export * from './components/data-display/data-grid/index.js';
42
+ export * from './components/data-display/calendar-view/index.js';
43
+ export * from './components/general/icon/index.js';
44
+ export * from './components/navigation/tabs/index.js';
45
+ export * from './components/navigation/breadcrumb/index.js';
46
+ export * from './components/navigation/pagination/index.js';
47
+ export * from './components/navigation/sidebar/index.js';
48
+ export * from './components/navigation/steps/index.js';
49
+ export * from './components/overlays/dialog/index.js';
50
+ export * from './components/overlays/drawer/index.js';
51
+ export * from './components/overlays/dropdown/index.js';
52
+ export * from './components/overlays/tooltip/index.js';
53
+ export * from './components/overlays/popover/index.js';
54
+ export * from './components/sections/app-shell/index.js';
55
+ export * from './components/sections/hero/index.js';
56
+ export * from './components/sections/page-header/index.js';
57
+ export * from './components/pages/auth/index.js';
58
+ export * from './components/pages/dashboard/index.js';
59
+ //# sourceMappingURL=bundle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,oCAAoC,CAAC;AACnD,cAAc,0CAA0C,CAAC;AACzD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAClD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AAGxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AAGxD,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AACzD,cAAc,wCAAwC,CAAC;AACvD,cAAc,4CAA4C,CAAC;AAG3D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0CAA0C,CAAC;AACzD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,kDAAkD,CAAC;AACjE,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,kDAAkD,CAAC;AAGjE,cAAc,oCAAoC,CAAC;AAGnD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,0CAA0C,CAAC;AACzD,cAAc,wCAAwC,CAAC;AAGvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AAGvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AACpD,cAAc,4CAA4C,CAAC;AAG3D,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC"}
package/lib/bundle.js ADDED
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Bundle entry point — imports every component to trigger custom element registration.
3
+ * Used to build assets/melodic-components.js for CDN / script-tag usage.
4
+ *
5
+ * All theme functions, utilities, and services are also exported so they remain
6
+ * available when using the bundle programmatically:
7
+ *
8
+ * import { applyTheme, ToastService } from '.../melodic-components.js';
9
+ */
10
+ // Theme, utilities, functions, directives
11
+ export * from './theme/index.js';
12
+ export * from './utils/index.js';
13
+ export * from './functions/index.js';
14
+ export * from './directives/index.js';
15
+ // Forms
16
+ export * from './components/forms/button/index.js';
17
+ export * from './components/forms/button-group/index.js';
18
+ export * from './components/forms/input/index.js';
19
+ export * from './components/forms/textarea/index.js';
20
+ export * from './components/forms/checkbox/index.js';
21
+ export * from './components/forms/radio/index.js';
22
+ export * from './components/forms/radio-card-group/index.js';
23
+ export * from './components/forms/toggle/index.js';
24
+ export * from './components/forms/select/index.js';
25
+ export * from './components/forms/slider/index.js';
26
+ export * from './components/forms/form-field/index.js';
27
+ export * from './components/forms/date-picker/index.js';
28
+ // Feedback
29
+ export * from './components/feedback/spinner/index.js';
30
+ export * from './components/feedback/alert/index.js';
31
+ export * from './components/feedback/toast/index.js';
32
+ export * from './components/feedback/progress/index.js';
33
+ // Foundation
34
+ export * from './components/foundation/card/index.js';
35
+ export * from './components/foundation/divider/index.js';
36
+ export * from './components/foundation/stack/index.js';
37
+ export * from './components/foundation/container/index.js';
38
+ // Data Display
39
+ export * from './components/data-display/avatar/index.js';
40
+ export * from './components/data-display/badge/index.js';
41
+ export * from './components/data-display/badge-group/index.js';
42
+ export * from './components/data-display/tag/index.js';
43
+ export * from './components/data-display/list/index.js';
44
+ export * from './components/data-display/activity-feed/index.js';
45
+ export * from './components/data-display/table/index.js';
46
+ export * from './components/data-display/data-grid/index.js';
47
+ export * from './components/data-display/calendar-view/index.js';
48
+ // General
49
+ export * from './components/general/icon/index.js';
50
+ // Navigation
51
+ export * from './components/navigation/tabs/index.js';
52
+ export * from './components/navigation/breadcrumb/index.js';
53
+ export * from './components/navigation/pagination/index.js';
54
+ export * from './components/navigation/sidebar/index.js';
55
+ export * from './components/navigation/steps/index.js';
56
+ // Overlays
57
+ export * from './components/overlays/dialog/index.js';
58
+ export * from './components/overlays/drawer/index.js';
59
+ export * from './components/overlays/dropdown/index.js';
60
+ export * from './components/overlays/tooltip/index.js';
61
+ export * from './components/overlays/popover/index.js';
62
+ // Sections
63
+ export * from './components/sections/app-shell/index.js';
64
+ export * from './components/sections/hero/index.js';
65
+ export * from './components/sections/page-header/index.js';
66
+ // Pages
67
+ export * from './components/pages/auth/index.js';
68
+ export * from './components/pages/dashboard/index.js';
@@ -55,6 +55,8 @@ export declare class TabsComponent implements IElementRef, OnCreate, OnDestroy,
55
55
  _slottedTabs: HTMLElement[];
56
56
  /** Navigation event listener for routed mode */
57
57
  private readonly _handleNavigation;
58
+ /** Listener for ml:tab-click from slotted ml-tab elements */
59
+ private readonly _handleTabClick;
58
60
  onCreate(): void;
59
61
  onRender(): void;
60
62
  onDestroy(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.component.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/tabs/tabs.component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACnF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,qBAMa,aAAc,YAAW,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ;IAC/E,UAAU,EAAG,WAAW,CAAC;IAEzB,iCAAiC;IACjC,KAAK,SAAM;IAEX,qBAAqB;IACrB,OAAO,EAAE,WAAW,CAAU;IAE9B,mBAAmB;IACnB,IAAI,EAAE,IAAI,CAAQ;IAElB,sBAAsB;IACtB,WAAW,EAAE,eAAe,CAAgB;IAE5C,gCAAgC;IAChC,MAAM,UAAS;IAEf,kEAAkE;IAClE,IAAI,EAAE,SAAS,EAAE,CAAM;IAEvB,wCAAwC;IACxC,YAAY,EAAE,WAAW,EAAE,CAAM;IAEjC,gDAAgD;IAChD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAgC;IAElE,QAAQ,IAAI,IAAI;IAOhB,QAAQ,IAAI,IAAI;IAKhB,SAAS,IAAI,IAAI;IAMjB,8BAA8B;IAC9B,mBAAmB,GAAI,OAAO,KAAK,KAAG,IAAI,CAcxC;IAEF,uBAAuB;IACvB,cAAc,GAAI,UAAU,MAAM,EAAE,OAAO,MAAM,KAAG,IAAI,CAoBtD;IAEF,iCAAiC;IACjC,aAAa,GAAI,OAAO,aAAa,KAAG,IAAI,CAmC1C;IAEF,4CAA4C;IAC5C,UAAU,IAAI,SAAS,EAAE;IAczB,uBAAuB;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AA8B;IAC9B,mBAAmB,GAAI,OAAO,KAAK,KAAG,IAAI,CAcxC;IAEF,uBAAuB;IACvB,cAAc,GAAI,UAAU,MAAM,EAAE,OAAO,MAAM,KAAG,IAAI,CAoBtD;IAEF,iCAAiC;IACjC,aAAa,GAAI,OAAO,aAAa,KAAG,IAAI,CAmC1C;IAEF,4CAA4C;IAC5C,UAAU,IAAI,SAAS,EAAE;IAczB,uBAAuB;IACvB,OAAO,CAAC,aAAa;IAIrB,0CAA0C;IAC1C,OAAO,CAAC,eAAe;IAOvB,8BAA8B;IAC9B,OAAO,CAAC,qBAAqB;IAU7B,2BAA2B;IAC3B,OAAO,CAAC,QAAQ;IAMhB,2DAA2D;IAC3D,OAAO,CAAC,aAAa;IASrB,6CAA6C;IAC7C,OAAO,CAAC,YAAY;CAGpB"}
@@ -61,6 +61,11 @@ let TabsComponent = class TabsComponent {
61
61
  this._slottedTabs = [];
62
62
  /** Navigation event listener for routed mode */
63
63
  this._handleNavigation = this.onNavigation.bind(this);
64
+ /** Listener for ml:tab-click from slotted ml-tab elements */
65
+ this._handleTabClick = (event) => {
66
+ const { value, href } = event.detail;
67
+ this.handleTabClick(value, href);
68
+ };
64
69
  /** Handle tab slot changes */
65
70
  this.handleTabSlotChange = (event) => {
66
71
  const slot = event.target;
@@ -129,6 +134,7 @@ let TabsComponent = class TabsComponent {
129
134
  };
130
135
  }
131
136
  onCreate() {
137
+ this.elementRef.addEventListener('ml:tab-click', this._handleTabClick);
132
138
  if (this.routed) {
133
139
  window.addEventListener('NavigationEvent', this._handleNavigation);
134
140
  this.syncWithRoute();
@@ -139,6 +145,7 @@ let TabsComponent = class TabsComponent {
139
145
  this.updatePanelVisibility();
140
146
  }
141
147
  onDestroy() {
148
+ this.elementRef.removeEventListener('ml:tab-click', this._handleTabClick);
142
149
  if (this.routed) {
143
150
  window.removeEventListener('NavigationEvent', this._handleNavigation);
144
151
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melodicdev/components",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Themeable UI component library built on the Melodic Framework",
5
5
  "license": "MIT",
6
6
  "author": "Melodic Development",
@@ -235,7 +235,7 @@
235
235
  }
236
236
  },
237
237
  "scripts": {
238
- "build": "tsc -p tsconfig.build.json",
238
+ "build": "tsc -p tsconfig.build.json && node scripts/generate-css.mjs && vite build --config vite.config.bundle.ts --mode development && vite build --config vite.config.bundle.ts --mode production",
239
239
  "build:watch": "tsc -p tsconfig.build.json --watch",
240
240
  "prepublishOnly": "npm run build",
241
241
  "docs": "vite --config vite.config.docs.ts",