@stencil-kit/core 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/cjs/{index-BrMvRGjk.js → index-q0fPnkdL.js} +116 -4
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/my-alert.cjs.entry.js +35 -0
  4. package/dist/cjs/my-badge.cjs.entry.js +2 -2
  5. package/dist/cjs/my-button.cjs.entry.js +2 -2
  6. package/dist/cjs/my-card.cjs.entry.js +2 -2
  7. package/dist/cjs/my-component.cjs.entry.js +2 -2
  8. package/dist/cjs/my-dropdown.cjs.entry.js +46 -0
  9. package/dist/cjs/my-input.cjs.entry.js +28 -0
  10. package/dist/cjs/my-modal.cjs.entry.js +36 -0
  11. package/dist/cjs/stencil-library.cjs.js +2 -2
  12. package/dist/collection/collection-manifest.json +5 -1
  13. package/dist/collection/components/my-alert/my-alert.css +96 -0
  14. package/dist/collection/components/my-alert/my-alert.js +122 -0
  15. package/dist/collection/components/my-badge/my-badge.js +1 -1
  16. package/dist/collection/components/my-button/my-button.js +1 -1
  17. package/dist/collection/components/my-card/my-card.js +1 -1
  18. package/dist/collection/components/my-component/my-component.js +1 -1
  19. package/dist/collection/components/my-dropdown/my-dropdown.css +111 -0
  20. package/dist/collection/components/my-dropdown/my-dropdown.js +199 -0
  21. package/dist/collection/components/my-input/my-input.css +58 -0
  22. package/dist/collection/components/my-input/my-input.js +204 -0
  23. package/dist/collection/components/my-modal/my-modal.css +88 -0
  24. package/dist/collection/components/my-modal/my-modal.js +119 -0
  25. package/dist/components/index.js +1 -1
  26. package/dist/components/my-alert.d.ts +11 -0
  27. package/dist/components/my-alert.js +1 -0
  28. package/dist/components/my-badge.js +1 -1
  29. package/dist/components/my-button.js +1 -1
  30. package/dist/components/my-card.js +1 -1
  31. package/dist/components/my-component.js +1 -1
  32. package/dist/components/my-dropdown.d.ts +11 -0
  33. package/dist/components/my-dropdown.js +1 -0
  34. package/dist/components/my-input.d.ts +11 -0
  35. package/dist/components/my-input.js +1 -0
  36. package/dist/components/my-modal.d.ts +11 -0
  37. package/dist/components/my-modal.js +1 -0
  38. package/dist/components/p-qbDrUNkY.js +1 -0
  39. package/dist/esm/{index-Bdf40fwG.js → index-Bvqd98ac.js} +116 -5
  40. package/dist/esm/loader.js +3 -3
  41. package/dist/esm/my-alert.entry.js +33 -0
  42. package/dist/esm/my-badge.entry.js +2 -2
  43. package/dist/esm/my-button.entry.js +2 -2
  44. package/dist/esm/my-card.entry.js +2 -2
  45. package/dist/esm/my-component.entry.js +2 -2
  46. package/dist/esm/my-dropdown.entry.js +44 -0
  47. package/dist/esm/my-input.entry.js +26 -0
  48. package/dist/esm/my-modal.entry.js +34 -0
  49. package/dist/esm/stencil-library.js +3 -3
  50. package/dist/stencil-library/{p-fd06de5e.entry.js → p-0e218303.entry.js} +1 -1
  51. package/dist/stencil-library/p-14e60a62.entry.js +1 -0
  52. package/dist/stencil-library/{p-b36446f6.entry.js → p-50dda3b7.entry.js} +1 -1
  53. package/dist/stencil-library/p-62c96402.entry.js +1 -0
  54. package/dist/stencil-library/p-9a704cf3.entry.js +1 -0
  55. package/dist/stencil-library/p-Bvqd98ac.js +2 -0
  56. package/dist/stencil-library/{p-ba774cf9.entry.js → p-cbbb85e5.entry.js} +1 -1
  57. package/dist/stencil-library/p-ddb7d070.entry.js +1 -0
  58. package/dist/stencil-library/p-e0eadca0.entry.js +1 -0
  59. package/dist/stencil-library/stencil-library.esm.js +1 -1
  60. package/dist/types/components/my-alert/my-alert.d.ts +11 -0
  61. package/dist/types/components/my-dropdown/my-dropdown.d.ts +19 -0
  62. package/dist/types/components/my-input/my-input.d.ts +13 -0
  63. package/dist/types/components/my-modal/my-modal.d.ts +10 -0
  64. package/dist/types/components.d.ts +299 -0
  65. package/package.json +2 -2
  66. package/dist/components/p-BJi3ojZX.js +0 -1
  67. package/dist/stencil-library/p-2b74a573.entry.js +0 -1
  68. package/dist/stencil-library/p-Bdf40fwG.js +0 -2
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const NAMESPACE = 'stencil-library';
4
- const BUILD = /* stencil-library */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, prop: true, propChangeCallback: false, updatable: true};
4
+ const BUILD = /* stencil-library */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, state: true, updatable: true};
5
5
 
6
6
  /*
7
7
  Stencil Client Platform v4.43.5 | MIT Licensed | https://stenciljs.com
@@ -60,7 +60,7 @@ var registerInstance = (lazyInstance, hostRef) => {
60
60
  if (!hostRef) return;
61
61
  lazyInstance.__stencil__getHostRef = () => hostRef;
62
62
  hostRef.$lazyInstance$ = lazyInstance;
63
- if (hostRef.$cmpMeta$.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.prop)) {
63
+ if (hostRef.$cmpMeta$.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.state)) {
64
64
  reWireGetterSetter(lazyInstance, hostRef);
65
65
  }
66
66
  };
@@ -419,6 +419,31 @@ var newVNode = (tag, text) => {
419
419
  var Host = {};
420
420
  var isHost = (node) => node && node.$tag$ === Host;
421
421
 
422
+ // src/runtime/normalize-watchers.ts
423
+ var normalizeWatchers = (raw) => {
424
+ if (!raw) return void 0;
425
+ const keys = Object.keys(raw);
426
+ if (keys.length === 0) return void 0;
427
+ let hasLegacy = false;
428
+ for (const propName of keys) {
429
+ if (hasLegacy) break;
430
+ for (const h2 of raw[propName]) {
431
+ if (typeof h2 === "string") {
432
+ hasLegacy = true;
433
+ break;
434
+ }
435
+ }
436
+ }
437
+ if (!hasLegacy) return raw;
438
+ const out = {};
439
+ for (const propName of keys) {
440
+ out[propName] = raw[propName].map(
441
+ (h2) => typeof h2 === "string" ? { [h2]: 0 } : h2
442
+ );
443
+ }
444
+ return out;
445
+ };
446
+
422
447
  // src/runtime/parse-property-value.ts
423
448
  var parsePropertyValue = (propValue, propType, isFormAssociated) => {
424
449
  if (propValue != null && !isComplexType(propValue)) {
@@ -434,6 +459,25 @@ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
434
459
  }
435
460
  return propValue;
436
461
  };
462
+ var getElement = (ref) => {
463
+ var _a;
464
+ return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
465
+ };
466
+
467
+ // src/runtime/event-emitter.ts
468
+ var createEvent = (ref, name, flags) => {
469
+ const elm = getElement(ref);
470
+ return {
471
+ emit: (detail) => {
472
+ return emitEvent(elm, name, {
473
+ bubbles: true,
474
+ composed: true,
475
+ cancelable: true,
476
+ detail
477
+ });
478
+ }
479
+ };
480
+ };
437
481
  var emitEvent = (elm, name, opts) => {
438
482
  const ev = plt.ce(name, opts);
439
483
  elm.dispatchEvent(ev);
@@ -444,7 +488,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
444
488
  return;
445
489
  }
446
490
  let isProp = isMemberInElement(elm, memberName);
447
- memberName.toLowerCase();
491
+ let ln = memberName.toLowerCase();
448
492
  if (memberName === "class") {
449
493
  const classList = elm.classList;
450
494
  const oldClasses = parseClassList(oldValue);
@@ -453,7 +497,25 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
453
497
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
454
498
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
455
499
  }
456
- } else if (memberName === "key") ; else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
500
+ } else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
501
+ if (memberName[2] === "-") {
502
+ memberName = memberName.slice(3);
503
+ } else if (isMemberInElement(win, ln)) {
504
+ memberName = ln.slice(2);
505
+ } else {
506
+ memberName = ln[2] + memberName.slice(3);
507
+ }
508
+ if (oldValue || newValue) {
509
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
510
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
511
+ if (oldValue) {
512
+ plt.rel(elm, memberName, oldValue, capture);
513
+ }
514
+ if (newValue) {
515
+ plt.ael(elm, memberName, newValue, capture);
516
+ }
517
+ }
518
+ } else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
457
519
  const propName = memberName.slice(5);
458
520
  let attrName;
459
521
  {
@@ -528,6 +590,8 @@ var parseClassList = (value) => {
528
590
  }
529
591
  return value.split(parseClassListRegex);
530
592
  };
593
+ var CAPTURE_EVENT_SUFFIX = "Capture";
594
+ var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
531
595
 
532
596
  // src/runtime/vdom/update-element.ts
533
597
  var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
@@ -983,6 +1047,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
983
1047
  `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
984
1048
  );
985
1049
  }
1050
+ const elm = hostRef.$hostElement$ ;
986
1051
  const oldVal = hostRef.$instanceValues$.get(propName);
987
1052
  const flags = hostRef.$flags$;
988
1053
  const instance = hostRef.$lazyInstance$ ;
@@ -993,6 +1058,27 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
993
1058
  const didValueChange = newVal !== oldVal && !areBothNaN;
994
1059
  if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
995
1060
  hostRef.$instanceValues$.set(propName, newVal);
1061
+ if (cmpMeta.$watchers$) {
1062
+ const watchMethods = cmpMeta.$watchers$[propName];
1063
+ if (watchMethods) {
1064
+ watchMethods.map((watcher) => {
1065
+ try {
1066
+ const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
1067
+ if (flags & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */) {
1068
+ if (!instance) {
1069
+ hostRef.$fetchedCbList$.push(() => {
1070
+ hostRef.$lazyInstance$[watchMethodName](newVal, oldVal, propName);
1071
+ });
1072
+ } else {
1073
+ instance[watchMethodName](newVal, oldVal, propName);
1074
+ }
1075
+ }
1076
+ } catch (e) {
1077
+ consoleError(e, elm);
1078
+ }
1079
+ });
1080
+ }
1081
+ }
996
1082
  if (flags & 2 /* hasRendered */) {
997
1083
  if (instance.componentShouldUpdate) {
998
1084
  const shouldUpdate = instance.componentShouldUpdate(newVal, oldVal, propName);
@@ -1012,6 +1098,17 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1012
1098
  var _a, _b;
1013
1099
  const prototype = Cstr.prototype;
1014
1100
  if (cmpMeta.$members$ || BUILD.propChangeCallback) {
1101
+ {
1102
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
1103
+ cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
1104
+ }
1105
+ if (Cstr.deserializers && !cmpMeta.$deserializers$) {
1106
+ cmpMeta.$deserializers$ = Cstr.deserializers;
1107
+ }
1108
+ if (Cstr.serializers && !cmpMeta.$serializers$) {
1109
+ cmpMeta.$serializers$ = Cstr.serializers;
1110
+ }
1111
+ }
1015
1112
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1016
1113
  members.map(([memberName, [memberFlags]]) => {
1017
1114
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
@@ -1164,6 +1261,11 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1164
1261
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
1165
1262
  }
1166
1263
  if (!Cstr.isProxied) {
1264
+ {
1265
+ cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
1266
+ cmpMeta.$serializers$ = Cstr.serializers;
1267
+ cmpMeta.$deserializers$ = Cstr.deserializers;
1268
+ }
1167
1269
  proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1168
1270
  Cstr.isProxied = true;
1169
1271
  }
@@ -1179,6 +1281,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1179
1281
  {
1180
1282
  hostRef.$flags$ &= -9 /* isConstructingInstance */;
1181
1283
  }
1284
+ {
1285
+ hostRef.$flags$ |= 128 /* isWatchReady */;
1286
+ }
1182
1287
  endNewInstance();
1183
1288
  {
1184
1289
  fireConnectedCallback(hostRef.$lazyInstance$, elm);
@@ -1310,6 +1415,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1310
1415
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
1311
1416
  lazyBundles.map((lazyBundle) => {
1312
1417
  lazyBundle[1].map((compactMeta) => {
1418
+ var _a2, _b;
1313
1419
  const cmpMeta = {
1314
1420
  $flags$: compactMeta[0],
1315
1421
  $tagName$: compactMeta[1],
@@ -1319,6 +1425,11 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1319
1425
  {
1320
1426
  cmpMeta.$members$ = compactMeta[2];
1321
1427
  }
1428
+ {
1429
+ cmpMeta.$watchers$ = normalizeWatchers(compactMeta[4]);
1430
+ cmpMeta.$serializers$ = (_a2 = compactMeta[5]) != null ? _a2 : {};
1431
+ cmpMeta.$deserializers$ = (_b = compactMeta[6]) != null ? _b : {};
1432
+ }
1322
1433
  const tagName = transformTag(cmpMeta.$tagName$);
1323
1434
  const HostElement = class extends HTMLElement {
1324
1435
  ["s-p"];
@@ -1424,6 +1535,7 @@ function transformTag(tag) {
1424
1535
  }
1425
1536
 
1426
1537
  exports.bootstrapLazy = bootstrapLazy;
1538
+ exports.createEvent = createEvent;
1427
1539
  exports.h = h;
1428
1540
  exports.promiseResolve = promiseResolve;
1429
1541
  exports.registerInstance = registerInstance;
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-BrMvRGjk.js');
3
+ var index = require('./index-q0fPnkdL.js');
4
4
  var appGlobals = require('./app-globals-V2Kpy_OQ.js');
5
5
 
6
6
  const defineCustomElements = async (win, options) => {
7
7
  if (typeof window === 'undefined') return undefined;
8
8
  await appGlobals.globalScripts();
9
- return index.bootstrapLazy([["my-badge.cjs",[[769,"my-badge",{"color":[1],"size":[1],"pill":[4]}]]],["my-button.cjs",[[769,"my-button",{"variant":[1],"size":[1],"disabled":[4]}]]],["my-card.cjs",[[769,"my-card",{"cardTitle":[1,"card-title"],"subtitle":[1],"elevation":[1]}]]],["my-component.cjs",[[513,"my-component",{"first":[1],"middle":[1],"last":[1]}]]]], options);
9
+ return index.bootstrapLazy([["my-alert.cjs",[[769,"my-alert",{"type":[1],"alertTitle":[1,"alert-title"],"dismissible":[4],"dismissed":[32]}]]],["my-badge.cjs",[[769,"my-badge",{"color":[1],"size":[1],"pill":[4]}]]],["my-button.cjs",[[769,"my-button",{"variant":[1],"size":[1],"disabled":[4]}]]],["my-card.cjs",[[769,"my-card",{"cardTitle":[1,"card-title"],"subtitle":[1],"elevation":[1]}]]],["my-component.cjs",[[513,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["my-dropdown.cjs",[[513,"my-dropdown",{"options":[1],"value":[1025],"placeholder":[1],"label":[1],"disabled":[4],"error":[1],"isOpen":[32]}]]],["my-input.cjs",[[513,"my-input",{"label":[1],"placeholder":[1],"value":[1],"type":[1],"error":[1],"disabled":[4],"required":[4]}]]],["my-modal.cjs",[[769,"my-modal",{"open":[1028],"modalTitle":[1,"modal-title"],"size":[1]},null,{"open":[{"handleOpenChange":0}]}]]]], options);
10
10
  };
11
11
 
12
12
  exports.setNonce = index.setNonce;
@@ -0,0 +1,35 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-q0fPnkdL.js');
4
+
5
+ const myAlertCss = () => `:host{display:block}.alert{display:flex;align-items:flex-start;gap:12px;padding:14px 16px;border-radius:8px;border-left:4px solid;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;font-size:14px;line-height:1.5}.alert-icon{font-size:16px;font-weight:700;flex-shrink:0;margin-top:1px}.alert-content{flex:1;display:flex;flex-direction:column;gap:2px}.alert-title{font-size:14px;font-weight:700}.alert-message{opacity:0.9}.alert-dismiss{background:none;border:none;font-size:14px;cursor:pointer;padding:0 4px;border-radius:4px;opacity:0.6;transition:opacity 0.15s;flex-shrink:0;line-height:1}.alert-dismiss:hover{opacity:1}.alert--success{background:#f0fdf4;border-color:#10b981;color:#065f46}.alert--success .alert-icon{color:#10b981}.alert--warning{background:#fffbeb;border-color:#f59e0b;color:#78350f}.alert--warning .alert-icon{color:#f59e0b}.alert--error{background:#fef2f2;border-color:#ef4444;color:#7f1d1d}.alert--error .alert-icon{color:#ef4444}.alert--info{background:#eff6ff;border-color:#3b82f6;color:#1e3a8a}.alert--info .alert-icon{color:#3b82f6}`;
6
+
7
+ const MyAlert = class {
8
+ constructor(hostRef) {
9
+ index.registerInstance(this, hostRef);
10
+ this.myDismiss = index.createEvent(this, "myDismiss");
11
+ }
12
+ type = 'info';
13
+ alertTitle = '';
14
+ dismissible = false;
15
+ dismissed = false;
16
+ myDismiss;
17
+ icons = {
18
+ success: '✓',
19
+ warning: '⚠',
20
+ error: '✕',
21
+ info: 'ℹ',
22
+ };
23
+ dismiss() {
24
+ this.dismissed = true;
25
+ this.myDismiss.emit();
26
+ }
27
+ render() {
28
+ if (this.dismissed)
29
+ return null;
30
+ return (index.h("div", { class: `alert alert--${this.type}`, role: "alert" }, index.h("span", { class: "alert-icon" }, this.icons[this.type]), index.h("div", { class: "alert-content" }, this.alertTitle && index.h("strong", { class: "alert-title" }, this.alertTitle), index.h("span", { class: "alert-message" }, index.h("slot", null))), this.dismissible && (index.h("button", { class: "alert-dismiss", onClick: () => this.dismiss() }, "\u2715"))));
31
+ }
32
+ };
33
+ MyAlert.style = myAlertCss();
34
+
35
+ exports.my_alert = MyAlert;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-BrMvRGjk.js');
3
+ var index = require('./index-q0fPnkdL.js');
4
4
 
5
5
  const myBadgeCss = () => `:host{display:inline-block}.badge{display:inline-flex;align-items:center;justify-content:center;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;font-weight:600;border-radius:4px;transition:all 0.2s ease}.badge--pill{border-radius:100px}.badge--small{padding:4px 8px;font-size:11px;line-height:1}.badge--medium{padding:6px 12px;font-size:13px;line-height:1}.badge--large{padding:8px 16px;font-size:15px;line-height:1}.badge--success{background-color:#10b981;color:white}.badge--warning{background-color:#f59e0b;color:white}.badge--error{background-color:#ef4444;color:white}.badge--info{background-color:#3b82f6;color:white}.badge--neutral{background-color:#6b7280;color:white}.badge:hover{opacity:0.9;transform:scale(1.05)}`;
6
6
 
@@ -21,7 +21,7 @@ const MyBadge = class {
21
21
  */
22
22
  pill = false;
23
23
  render() {
24
- return (index.h("span", { key: '33a316730b54199e32c7ecbd1160997411e5ff95', class: `badge badge--${this.color} badge--${this.size} ${this.pill ? 'badge--pill' : ''}` }, index.h("slot", { key: 'eb7a3e46ea27e7d714dcc60723ca7f5801204674' })));
24
+ return (index.h("span", { key: '9c76b0118c984ac578169d0f9df317fd3b99abcf', class: `badge badge--${this.color} badge--${this.size} ${this.pill ? 'badge--pill' : ''}` }, index.h("slot", { key: 'b98fb68c38ee63166be5dbb315d7b68faa0d0ce2' })));
25
25
  }
26
26
  };
27
27
  MyBadge.style = myBadgeCss();
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-BrMvRGjk.js');
3
+ var index = require('./index-q0fPnkdL.js');
4
4
 
5
5
  const myButtonCss = () => `:host{display:inline-block}.btn{font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;font-weight:600;border:none;border-radius:8px;cursor:pointer;transition:all 0.2s ease;text-align:center;display:inline-flex;align-items:center;justify-content:center;gap:8px}.btn:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 4px 12px rgba(0, 0, 0, 0.15)}.btn:active:not(:disabled){transform:translateY(0)}.btn:disabled{opacity:0.5;cursor:not-allowed}.btn--small{padding:8px 16px;font-size:14px}.btn--medium{padding:12px 24px;font-size:16px}.btn--large{padding:16px 32px;font-size:18px}.btn--primary{background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);color:white}.btn--primary:hover:not(:disabled){background:linear-gradient(135deg, #5568d3 0%, #63408a 100%)}.btn--secondary{background:linear-gradient(135deg, #f093fb 0%, #f5576c 100%);color:white}.btn--secondary:hover:not(:disabled){background:linear-gradient(135deg, #d97ee0 0%, #db4a5d 100%)}.btn--danger{background:linear-gradient(135deg, #fa709a 0%, #fee140 100%);color:#333}.btn--danger:hover:not(:disabled){background:linear-gradient(135deg, #e55d87 0%, #e5ca2b 100%)}`;
6
6
 
@@ -21,7 +21,7 @@ const MyButton = class {
21
21
  */
22
22
  disabled = false;
23
23
  render() {
24
- return (index.h("button", { key: '94d04ac3ac7441f76510463322200c2b7a01d569', class: `btn btn--${this.variant} btn--${this.size}`, disabled: this.disabled }, index.h("slot", { key: '80f6c9a56010f80635288b16804d33c780232da5' })));
24
+ return (index.h("button", { key: '37743c78738521a38d5d09dd486c38a9a21f8b5b', class: `btn btn--${this.variant} btn--${this.size}`, disabled: this.disabled }, index.h("slot", { key: '89e08ccf936a61509c8a4601324b8f1909dd6f59' })));
25
25
  }
26
26
  };
27
27
  MyButton.style = myButtonCss();
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-BrMvRGjk.js');
3
+ var index = require('./index-q0fPnkdL.js');
4
4
 
5
5
  const myCardCss = () => `:host{display:block}.card{background:white;border-radius:12px;overflow:hidden;transition:all 0.3s ease;border:1px solid #e5e7eb}.card:hover{transform:translateY(-4px)}.card--low{box-shadow:0 1px 3px rgba(0, 0, 0, 0.1)}.card--low:hover{box-shadow:0 4px 6px rgba(0, 0, 0, 0.1)}.card--medium{box-shadow:0 4px 6px rgba(0, 0, 0, 0.1)}.card--medium:hover{box-shadow:0 10px 15px rgba(0, 0, 0, 0.15)}.card--high{box-shadow:0 10px 15px rgba(0, 0, 0, 0.15)}.card--high:hover{box-shadow:0 20px 25px rgba(0, 0, 0, 0.2)}.card__header{padding:24px 24px 0}.card__title{margin:0;font-size:24px;font-weight:700;color:#1f2937;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif}.card__subtitle{margin:8px 0 0;font-size:14px;color:#6b7280;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif}.card__content{padding:24px;color:#374151;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;line-height:1.6}.card__footer{padding:0 24px 24px;display:flex;gap:12px;align-items:center}.card__footer:empty{display:none}`;
6
6
 
@@ -21,7 +21,7 @@ const MyCard = class {
21
21
  */
22
22
  elevation = 'medium';
23
23
  render() {
24
- return (index.h("div", { key: '771331816e786b93963b10dcc4577c89da6385c5', class: `card card--${this.elevation}` }, this.cardTitle && (index.h("div", { key: '525c2dfdda668cb45895f6f1e9b55e6923b9538d', class: "card__header" }, index.h("h3", { key: 'a3025832b6ce60e73dce68f575bca6fbb1143913', class: "card__title" }, this.cardTitle), this.subtitle && index.h("p", { key: '3c3f094449a06aa41b63db17b3ab27e7e29be437', class: "card__subtitle" }, this.subtitle))), index.h("div", { key: '628c69443cf48fb07ee98fde44c0c2f6de148ed5', class: "card__content" }, index.h("slot", { key: 'f0c2c156603f2179314e7c58aabefbeda3b2e911' })), index.h("div", { key: '8f5a30d595399c6a606a5cde67c393aca93e3d0d', class: "card__footer" }, index.h("slot", { key: '1cb72bdc25ce96673d85c9fc86ff5661975cd412', name: "footer" }))));
24
+ return (index.h("div", { key: '1cc6f81c704aacbb729869b8aaeb76e2b4d53ff3', class: `card card--${this.elevation}` }, this.cardTitle && (index.h("div", { key: 'c6d63ec9950cedd07fd0b48bb950ef56d9ac8345', class: "card__header" }, index.h("h3", { key: '0f74084a20a4526366f6ef72ee054171af37c9d7', class: "card__title" }, this.cardTitle), this.subtitle && index.h("p", { key: 'd74199debd939f6921cb464ac43ed7bae367a170', class: "card__subtitle" }, this.subtitle))), index.h("div", { key: '4a283a4606d514a7fd493ea32aa686e82cf2edf8', class: "card__content" }, index.h("slot", { key: 'fcfb442bf91417cbed4ffb3b4825df575669cde0' })), index.h("div", { key: '73e18535c4f4fea108c8f5f846eebaf7ec299f54', class: "card__footer" }, index.h("slot", { key: 'd66f75ecb97d1663a124c69c7956d6e6556b82fa', name: "footer" }))));
25
25
  }
26
26
  };
27
27
  MyCard.style = myCardCss();
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-BrMvRGjk.js');
3
+ var index = require('./index-q0fPnkdL.js');
4
4
  var index$1 = require('./index.cjs.js');
5
5
 
6
6
  const myComponentCss = () => `:host{display:block}`;
@@ -25,7 +25,7 @@ const MyComponent = class {
25
25
  return index$1.format(this.first, this.middle, this.last);
26
26
  }
27
27
  render() {
28
- return index.h("div", { key: '543ff9a15c7d307e7e59a1143b033faeee29b1cb' }, "Hello, World! I'm ", this.getText());
28
+ return index.h("div", { key: '5c6bcb6d7c69409ec822ac4a1c31816bdbbe2bc2' }, "Hello, World! I'm ", this.getText());
29
29
  }
30
30
  };
31
31
  MyComponent.style = myComponentCss();
@@ -0,0 +1,46 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-q0fPnkdL.js');
4
+
5
+ const myDropdownCss = () => `:host{display:block}.dropdown-wrapper{display:flex;flex-direction:column;gap:6px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif}.dropdown-label{font-size:14px;font-weight:600;color:#374151}.dropdown{position:relative}.dropdown-trigger{width:100%;padding:10px 14px;font-size:15px;border:2px solid #d1d5db;border-radius:8px;background:#fff;color:#111827;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px;transition:border-color 0.2s, box-shadow 0.2s;text-align:left;box-sizing:border-box}.dropdown-trigger:hover:not(:disabled){border-color:#667eea}.dropdown--open .dropdown-trigger{border-color:#667eea;box-shadow:0 0 0 3px rgba(102, 126, 234, 0.15)}.dropdown--disabled .dropdown-trigger{background:#f3f4f6;color:#9ca3af;cursor:not-allowed}.dropdown-placeholder{color:#9ca3af}.dropdown-arrow{font-size:11px;color:#6b7280;flex-shrink:0}.dropdown-menu{position:absolute;top:calc(100% + 4px);left:0;right:0;background:#fff;border:2px solid #667eea;border-radius:8px;box-shadow:0 8px 24px rgba(0, 0, 0, 0.12);list-style:none;margin:0;padding:4px;z-index:100;max-height:240px;overflow-y:auto}.dropdown-item{padding:10px 12px;border-radius:6px;cursor:pointer;font-size:15px;color:#111827;transition:background 0.15s}.dropdown-item:hover{background:#f3f4f6}.dropdown-item--selected{background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);color:white}.dropdown-item--selected:hover{background:linear-gradient(135deg, #5568d3 0%, #63408a 100%)}.dropdown-wrapper--error .dropdown-trigger{border-color:#ef4444}.dropdown-error{font-size:13px;color:#ef4444}`;
6
+
7
+ const MyDropdown = class {
8
+ constructor(hostRef) {
9
+ index.registerInstance(this, hostRef);
10
+ this.myChange = index.createEvent(this, "myChange");
11
+ }
12
+ options = [];
13
+ value = '';
14
+ placeholder = 'Select an option';
15
+ label = '';
16
+ disabled = false;
17
+ error = '';
18
+ isOpen = false;
19
+ myChange;
20
+ get parsedOptions() {
21
+ if (typeof this.options === 'string') {
22
+ try {
23
+ return JSON.parse(this.options);
24
+ }
25
+ catch {
26
+ return [];
27
+ }
28
+ }
29
+ return this.options;
30
+ }
31
+ get selectedLabel() {
32
+ const found = this.parsedOptions.find(o => o.value === this.value);
33
+ return found ? found.label : this.placeholder;
34
+ }
35
+ select(value) {
36
+ this.value = value;
37
+ this.myChange.emit(value);
38
+ this.isOpen = false;
39
+ }
40
+ render() {
41
+ return (index.h("div", { key: '5ba78bcc60f2eef7145873c29af8a2ff57c07728', class: `dropdown-wrapper ${this.error ? 'dropdown-wrapper--error' : ''}` }, this.label && index.h("label", { key: 'ebc13c625fd27fe64806fed5590aedefa9470b85', class: "dropdown-label" }, this.label), index.h("div", { key: '529ee15dc9ed0fcfde80f634bba4fe91ef250d5c', class: `dropdown ${this.isOpen ? 'dropdown--open' : ''} ${this.disabled ? 'dropdown--disabled' : ''}` }, index.h("button", { key: 'd5fe770674f4f6ef929febc373ddd1278ed91b1f', class: "dropdown-trigger", disabled: this.disabled, onClick: () => !this.disabled && (this.isOpen = !this.isOpen) }, index.h("span", { key: '02ed94363d6c142bad3b36b17ac5326a019485a9', class: !this.value ? 'dropdown-placeholder' : '' }, this.selectedLabel), index.h("span", { key: '10c1aed78e2655294b0ec0db17a178f86ddcc2bf', class: "dropdown-arrow" }, this.isOpen ? '▲' : '▼')), this.isOpen && (index.h("ul", { key: '4679e01162793d3dca7cdbc3cc932c2d33718d45', class: "dropdown-menu" }, this.parsedOptions.map(option => (index.h("li", { class: `dropdown-item ${option.value === this.value ? 'dropdown-item--selected' : ''}`, onClick: () => this.select(option.value) }, option.label)))))), this.error && index.h("span", { key: '71091a78c62997f1d64953b0a7251be9d184493d', class: "dropdown-error" }, this.error)));
42
+ }
43
+ };
44
+ MyDropdown.style = myDropdownCss();
45
+
46
+ exports.my_dropdown = MyDropdown;
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-q0fPnkdL.js');
4
+
5
+ const myInputCss = () => `:host{display:block}.input-wrapper{display:flex;flex-direction:column;gap:6px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif}.input-label{font-size:14px;font-weight:600;color:#374151}.input-required{color:#ef4444;margin-left:2px}.input-field{padding:10px 14px;font-size:15px;border:2px solid #d1d5db;border-radius:8px;outline:none;transition:border-color 0.2s ease, box-shadow 0.2s ease;background:#fff;color:#111827;width:100%;box-sizing:border-box}.input-field:focus{border-color:#667eea;box-shadow:0 0 0 3px rgba(102, 126, 234, 0.15)}.input-field:disabled{background:#f3f4f6;color:#9ca3af;cursor:not-allowed}.input-wrapper--error .input-field{border-color:#ef4444}.input-wrapper--error .input-field:focus{box-shadow:0 0 0 3px rgba(239, 68, 68, 0.15)}.input-error{font-size:13px;color:#ef4444}`;
6
+
7
+ const MyInput = class {
8
+ constructor(hostRef) {
9
+ index.registerInstance(this, hostRef);
10
+ this.myChange = index.createEvent(this, "myChange");
11
+ this.myBlur = index.createEvent(this, "myBlur");
12
+ }
13
+ label = '';
14
+ placeholder = '';
15
+ value = '';
16
+ type = 'text';
17
+ error = '';
18
+ disabled = false;
19
+ required = false;
20
+ myChange;
21
+ myBlur;
22
+ render() {
23
+ return (index.h("div", { key: '9ee947b792e9829d2aa329b5314ea61515e460b1', class: `input-wrapper ${this.error ? 'input-wrapper--error' : ''}` }, this.label && (index.h("label", { key: 'f0e912275821438feb4518ed2618a49971625470', class: "input-label" }, this.label, this.required && index.h("span", { key: 'c7033d3974315c8fd4a25b7f408f263852b47920', class: "input-required" }, "*"))), index.h("input", { key: 'e5858925769f01801051fe54da86bd805b3594e2', class: "input-field", type: this.type, placeholder: this.placeholder, value: this.value, disabled: this.disabled, onInput: (e) => this.myChange.emit(e.target.value), onBlur: () => this.myBlur.emit() }), this.error && index.h("span", { key: 'f07db0cbdc2d9d91a48ea3cb67e74cc56f039ee6', class: "input-error" }, this.error)));
24
+ }
25
+ };
26
+ MyInput.style = myInputCss();
27
+
28
+ exports.my_input = MyInput;
@@ -0,0 +1,36 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-q0fPnkdL.js');
4
+
5
+ const myModalCss = () => `:host{display:contents}.modal-overlay{position:fixed;inset:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:1000;padding:16px;box-sizing:border-box}.modal{background:#fff;border-radius:12px;box-shadow:0 20px 60px rgba(0, 0, 0, 0.3);display:flex;flex-direction:column;max-height:90vh;width:100%;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;animation:modal-in 0.2s ease}@keyframes modal-in{from{opacity:0;transform:scale(0.95) translateY(-10px)}to{opacity:1;transform:scale(1) translateY(0)}}.modal--small{max-width:400px}.modal--medium{max-width:560px}.modal--large{max-width:800px}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid #e5e7eb}.modal-title{font-size:18px;font-weight:700;color:#111827}.modal-close{background:none;border:none;font-size:18px;color:#6b7280;cursor:pointer;padding:4px 8px;border-radius:6px;line-height:1;transition:background 0.15s}.modal-close:hover{background:#f3f4f6;color:#111827}.modal-body{padding:24px;overflow-y:auto;flex:1;color:#374151;font-size:15px;line-height:1.6}.modal-footer{padding:16px 24px;border-top:1px solid #e5e7eb;display:flex;justify-content:flex-end;gap:12px}.modal-footer:empty{display:none}`;
6
+
7
+ const MyModal = class {
8
+ constructor(hostRef) {
9
+ index.registerInstance(this, hostRef);
10
+ this.myClose = index.createEvent(this, "myClose");
11
+ }
12
+ open = false;
13
+ modalTitle = '';
14
+ size = 'medium';
15
+ myClose;
16
+ handleOpenChange(open) {
17
+ document.body.style.overflow = open ? 'hidden' : '';
18
+ }
19
+ close() {
20
+ this.open = false;
21
+ this.myClose.emit();
22
+ }
23
+ render() {
24
+ if (!this.open)
25
+ return null;
26
+ return (index.h("div", { class: "modal-overlay", onClick: () => this.close() }, index.h("div", { class: `modal modal--${this.size}`, onClick: (e) => e.stopPropagation() }, index.h("div", { class: "modal-header" }, index.h("span", { class: "modal-title" }, this.modalTitle), index.h("button", { class: "modal-close", onClick: () => this.close() }, "\u2715")), index.h("div", { class: "modal-body" }, index.h("slot", null)), index.h("div", { class: "modal-footer" }, index.h("slot", { name: "footer" })))));
27
+ }
28
+ static get watchers() { return {
29
+ "open": [{
30
+ "handleOpenChange": 0
31
+ }]
32
+ }; }
33
+ };
34
+ MyModal.style = myModalCss();
35
+
36
+ exports.my_modal = MyModal;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-BrMvRGjk.js');
3
+ var index = require('./index-q0fPnkdL.js');
4
4
  var appGlobals = require('./app-globals-V2Kpy_OQ.js');
5
5
 
6
6
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["my-badge.cjs",[[769,"my-badge",{"color":[1],"size":[1],"pill":[4]}]]],["my-button.cjs",[[769,"my-button",{"variant":[1],"size":[1],"disabled":[4]}]]],["my-card.cjs",[[769,"my-card",{"cardTitle":[1,"card-title"],"subtitle":[1],"elevation":[1]}]]],["my-component.cjs",[[513,"my-component",{"first":[1],"middle":[1],"last":[1]}]]]], options);
22
+ return index.bootstrapLazy([["my-alert.cjs",[[769,"my-alert",{"type":[1],"alertTitle":[1,"alert-title"],"dismissible":[4],"dismissed":[32]}]]],["my-badge.cjs",[[769,"my-badge",{"color":[1],"size":[1],"pill":[4]}]]],["my-button.cjs",[[769,"my-button",{"variant":[1],"size":[1],"disabled":[4]}]]],["my-card.cjs",[[769,"my-card",{"cardTitle":[1,"card-title"],"subtitle":[1],"elevation":[1]}]]],["my-component.cjs",[[513,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["my-dropdown.cjs",[[513,"my-dropdown",{"options":[1],"value":[1025],"placeholder":[1],"label":[1],"disabled":[4],"error":[1],"isOpen":[32]}]]],["my-input.cjs",[[513,"my-input",{"label":[1],"placeholder":[1],"value":[1],"type":[1],"error":[1],"disabled":[4],"required":[4]}]]],["my-modal.cjs",[[769,"my-modal",{"open":[1028],"modalTitle":[1,"modal-title"],"size":[1]},null,{"open":[{"handleOpenChange":0}]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "entries": [
3
+ "components/my-dropdown/my-dropdown.js",
4
+ "components/my-alert/my-alert.js",
3
5
  "components/my-badge/my-badge.js",
4
6
  "components/my-button/my-button.js",
5
7
  "components/my-card/my-card.js",
6
- "components/my-component/my-component.js"
8
+ "components/my-component/my-component.js",
9
+ "components/my-input/my-input.js",
10
+ "components/my-modal/my-modal.js"
7
11
  ],
8
12
  "mixins": [],
9
13
  "compiler": {
@@ -0,0 +1,96 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
5
+ .alert {
6
+ display: flex;
7
+ align-items: flex-start;
8
+ gap: 12px;
9
+ padding: 14px 16px;
10
+ border-radius: 8px;
11
+ border-left: 4px solid;
12
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
13
+ font-size: 14px;
14
+ line-height: 1.5;
15
+ }
16
+
17
+ .alert-icon {
18
+ font-size: 16px;
19
+ font-weight: 700;
20
+ flex-shrink: 0;
21
+ margin-top: 1px;
22
+ }
23
+
24
+ .alert-content {
25
+ flex: 1;
26
+ display: flex;
27
+ flex-direction: column;
28
+ gap: 2px;
29
+ }
30
+
31
+ .alert-title {
32
+ font-size: 14px;
33
+ font-weight: 700;
34
+ }
35
+
36
+ .alert-message {
37
+ opacity: 0.9;
38
+ }
39
+
40
+ .alert-dismiss {
41
+ background: none;
42
+ border: none;
43
+ font-size: 14px;
44
+ cursor: pointer;
45
+ padding: 0 4px;
46
+ border-radius: 4px;
47
+ opacity: 0.6;
48
+ transition: opacity 0.15s;
49
+ flex-shrink: 0;
50
+ line-height: 1;
51
+ }
52
+
53
+ .alert-dismiss:hover {
54
+ opacity: 1;
55
+ }
56
+
57
+ /* Types */
58
+ .alert--success {
59
+ background: #f0fdf4;
60
+ border-color: #10b981;
61
+ color: #065f46;
62
+ }
63
+
64
+ .alert--success .alert-icon {
65
+ color: #10b981;
66
+ }
67
+
68
+ .alert--warning {
69
+ background: #fffbeb;
70
+ border-color: #f59e0b;
71
+ color: #78350f;
72
+ }
73
+
74
+ .alert--warning .alert-icon {
75
+ color: #f59e0b;
76
+ }
77
+
78
+ .alert--error {
79
+ background: #fef2f2;
80
+ border-color: #ef4444;
81
+ color: #7f1d1d;
82
+ }
83
+
84
+ .alert--error .alert-icon {
85
+ color: #ef4444;
86
+ }
87
+
88
+ .alert--info {
89
+ background: #eff6ff;
90
+ border-color: #3b82f6;
91
+ color: #1e3a8a;
92
+ }
93
+
94
+ .alert--info .alert-icon {
95
+ color: #3b82f6;
96
+ }