le-kit 0.1.12 → 0.1.13

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 (121) hide show
  1. package/custom-elements.json +1268 -1268
  2. package/dist/collection/assets/custom-elements.json +750 -750
  3. package/dist/components/index.d.ts +33 -0
  4. package/dist/components/index.js +113 -0
  5. package/dist/components/index.js.map +1 -0
  6. package/dist/components/le-box.d.ts +11 -0
  7. package/dist/components/le-box.js +257 -0
  8. package/dist/components/le-box.js.map +1 -0
  9. package/dist/components/le-button.d.ts +11 -0
  10. package/dist/components/le-button.js +9 -0
  11. package/dist/components/le-button.js.map +1 -0
  12. package/dist/components/le-button2.js +1149 -0
  13. package/dist/components/le-button2.js.map +1 -0
  14. package/dist/components/le-card.d.ts +11 -0
  15. package/dist/components/le-card.js +84 -0
  16. package/dist/components/le-card.js.map +1 -0
  17. package/dist/components/le-checkbox.d.ts +11 -0
  18. package/dist/components/le-checkbox.js +9 -0
  19. package/dist/components/le-checkbox.js.map +1 -0
  20. package/dist/components/le-component.d.ts +11 -0
  21. package/dist/components/le-component.js +9 -0
  22. package/dist/components/le-component.js.map +1 -0
  23. package/dist/components/le-number-input.d.ts +11 -0
  24. package/dist/components/le-number-input.js +272 -0
  25. package/dist/components/le-number-input.js.map +1 -0
  26. package/dist/components/le-popover.d.ts +11 -0
  27. package/dist/components/le-popover.js +9 -0
  28. package/dist/components/le-popover.js.map +1 -0
  29. package/dist/components/le-popover2.js +382 -0
  30. package/dist/components/le-popover2.js.map +1 -0
  31. package/dist/components/le-popup.d.ts +11 -0
  32. package/dist/components/le-popup.js +279 -0
  33. package/dist/components/le-popup.js.map +1 -0
  34. package/dist/components/le-round-progress.d.ts +11 -0
  35. package/dist/components/le-round-progress.js +135 -0
  36. package/dist/components/le-round-progress.js.map +1 -0
  37. package/dist/components/le-slot.d.ts +11 -0
  38. package/dist/components/le-slot.js +9 -0
  39. package/dist/components/le-slot.js.map +1 -0
  40. package/dist/components/le-stack.d.ts +11 -0
  41. package/dist/components/le-stack.js +199 -0
  42. package/dist/components/le-stack.js.map +1 -0
  43. package/dist/components/le-string-input.d.ts +11 -0
  44. package/dist/components/le-string-input.js +9 -0
  45. package/dist/components/le-string-input.js.map +1 -0
  46. package/dist/components/le-text.d.ts +11 -0
  47. package/dist/components/le-text.js +399 -0
  48. package/dist/components/le-text.js.map +1 -0
  49. package/dist/components/le-turntable.d.ts +11 -0
  50. package/dist/components/le-turntable.js +164 -0
  51. package/dist/components/le-turntable.js.map +1 -0
  52. package/dist/components/utils.js +310 -0
  53. package/dist/components/utils.js.map +1 -0
  54. package/dist/core/collection/assets/custom-elements.json +4305 -0
  55. package/dist/core/collection/themes/base.css +89 -0
  56. package/dist/core/collection/themes/dark.css +100 -0
  57. package/dist/core/collection/themes/default.css +108 -0
  58. package/dist/core/collection/themes/gradient.css +100 -0
  59. package/dist/core/collection/themes/index.css +413 -0
  60. package/dist/core/collection/themes/minimal.css +100 -0
  61. package/dist/core/collection/themes/warm.css +100 -0
  62. package/dist/core/components/index.d.ts +33 -0
  63. package/dist/core/components/index.js +113 -0
  64. package/dist/core/components/index.js.map +1 -0
  65. package/dist/core/components/le-box.d.ts +11 -0
  66. package/dist/core/components/le-box.js +225 -0
  67. package/dist/core/components/le-box.js.map +1 -0
  68. package/dist/core/components/le-button.d.ts +11 -0
  69. package/dist/core/components/le-button.js +9 -0
  70. package/dist/core/components/le-button.js.map +1 -0
  71. package/dist/core/components/le-button2.js +121 -0
  72. package/dist/core/components/le-button2.js.map +1 -0
  73. package/dist/core/components/le-card.d.ts +11 -0
  74. package/dist/core/components/le-card.js +52 -0
  75. package/dist/core/components/le-card.js.map +1 -0
  76. package/dist/core/components/le-checkbox.d.ts +11 -0
  77. package/dist/core/components/le-checkbox.js +87 -0
  78. package/dist/core/components/le-checkbox.js.map +1 -0
  79. package/dist/core/components/le-number-input.d.ts +11 -0
  80. package/dist/core/components/le-number-input.js +246 -0
  81. package/dist/core/components/le-number-input.js.map +1 -0
  82. package/dist/core/components/le-popover.d.ts +11 -0
  83. package/dist/core/components/le-popover.js +385 -0
  84. package/dist/core/components/le-popover.js.map +1 -0
  85. package/dist/core/components/le-popup.d.ts +11 -0
  86. package/dist/core/components/le-popup.js +253 -0
  87. package/dist/core/components/le-popup.js.map +1 -0
  88. package/dist/core/components/le-round-progress.d.ts +11 -0
  89. package/dist/core/components/le-round-progress.js +135 -0
  90. package/dist/core/components/le-round-progress.js.map +1 -0
  91. package/dist/core/components/le-stack.d.ts +11 -0
  92. package/dist/core/components/le-stack.js +167 -0
  93. package/dist/core/components/le-stack.js.map +1 -0
  94. package/dist/core/components/le-string-input.d.ts +11 -0
  95. package/dist/core/components/le-string-input.js +127 -0
  96. package/dist/core/components/le-string-input.js.map +1 -0
  97. package/dist/core/components/le-text.d.ts +11 -0
  98. package/dist/core/components/le-text.js +367 -0
  99. package/dist/core/components/le-text.js.map +1 -0
  100. package/dist/core/components/le-turntable.d.ts +11 -0
  101. package/dist/core/components/le-turntable.js +164 -0
  102. package/dist/core/components/le-turntable.js.map +1 -0
  103. package/dist/core/components/utils.js +310 -0
  104. package/dist/core/components/utils.js.map +1 -0
  105. package/dist/docs.json +1 -1
  106. package/dist/le-kit/assets/custom-elements.json +750 -750
  107. package/dist/le-kit/dist/collection/themes/base.css +89 -0
  108. package/dist/le-kit/dist/collection/themes/dark.css +100 -0
  109. package/dist/le-kit/dist/collection/themes/default.css +108 -0
  110. package/dist/le-kit/dist/collection/themes/gradient.css +100 -0
  111. package/dist/le-kit/dist/collection/themes/index.css +413 -0
  112. package/dist/le-kit/dist/collection/themes/minimal.css +100 -0
  113. package/dist/le-kit/dist/collection/themes/warm.css +100 -0
  114. package/package.json +2 -2
  115. /package/dist/{le-kit → collection/dist/collection}/themes/base.css +0 -0
  116. /package/dist/{le-kit → collection/dist/collection}/themes/dark.css +0 -0
  117. /package/dist/{le-kit → collection/dist/collection}/themes/default.css +0 -0
  118. /package/dist/{le-kit → collection/dist/collection}/themes/gradient.css +0 -0
  119. /package/dist/{le-kit → collection/dist/collection}/themes/index.css +0 -0
  120. /package/dist/{le-kit → collection/dist/collection}/themes/minimal.css +0 -0
  121. /package/dist/{le-kit → collection/dist/collection}/themes/warm.css +0 -0
@@ -0,0 +1,113 @@
1
+ import { i as initializeMode } from './utils.js';
2
+ export { e as configureLeKit, g as generateId, f as getLeKitConfig, a as getMode, c as getTheme, p as parseCommaSeparated, b as setGlobalMode, d as setGlobalTheme, s as slotHasContent } from './utils.js';
3
+ export { getAssetPath, render, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
4
+
5
+ const globalScripts = initializeMode;
6
+
7
+ /**
8
+ * Programmatic API for le-popup component
9
+ *
10
+ * These functions allow you to show popups without manually creating elements.
11
+ *
12
+ * @example
13
+ * // Alert
14
+ * await leAlert('Something happened!');
15
+ *
16
+ * // Confirm
17
+ * const confirmed = await leConfirm('Are you sure?');
18
+ * if (confirmed) { ... }
19
+ *
20
+ * // Prompt
21
+ * const name = await lePrompt('What is your name?');
22
+ * if (name !== null) { ... }
23
+ */
24
+ /**
25
+ * Show an alert popup with a message
26
+ * @param message - The message to display
27
+ * @param options - Optional configuration
28
+ * @returns Promise that resolves when closed
29
+ *
30
+ * @example
31
+ * await leAlert('File saved successfully!');
32
+ * await leAlert('Error occurred', { title: 'Error', theme: 'dark' });
33
+ */
34
+ async function leAlert(message, options = {}) {
35
+ const popup = createPopupElement(message, { ...options, type: 'alert' });
36
+ document.body.appendChild(popup);
37
+ await popup.show();
38
+ popup.remove();
39
+ }
40
+ /**
41
+ * Show a confirm popup with OK/Cancel buttons
42
+ * @param message - The message to display
43
+ * @param options - Optional configuration
44
+ * @returns Promise that resolves to true (confirmed) or false (cancelled)
45
+ *
46
+ * @example
47
+ * const confirmed = await leConfirm('Delete this item?');
48
+ * if (confirmed) {
49
+ * deleteItem();
50
+ * }
51
+ */
52
+ async function leConfirm(message, options = {}) {
53
+ const popup = createPopupElement(message, { ...options, type: 'confirm' });
54
+ document.body.appendChild(popup);
55
+ const result = await popup.show();
56
+ popup.remove();
57
+ return result.confirmed;
58
+ }
59
+ /**
60
+ * Show a prompt popup with an input field
61
+ * @param message - The message to display
62
+ * @param options - Optional configuration (including defaultValue, placeholder)
63
+ * @returns Promise that resolves to the input value or null if cancelled
64
+ *
65
+ * @example
66
+ * const name = await lePrompt('Enter your name:', {
67
+ * title: 'Welcome',
68
+ * placeholder: 'John Doe',
69
+ * defaultValue: 'Guest'
70
+ * });
71
+ * if (name !== null) {
72
+ * greetUser(name);
73
+ * }
74
+ */
75
+ async function lePrompt(message, options = {}) {
76
+ const popup = createPopupElement(message, { ...options, type: 'prompt' });
77
+ document.body.appendChild(popup);
78
+ const result = await popup.show();
79
+ popup.remove();
80
+ return result.confirmed ? (result.value ?? '') : null;
81
+ }
82
+ /**
83
+ * Create a popup element with the given configuration
84
+ */
85
+ function createPopupElement(message, options) {
86
+ const popup = document.createElement('le-popup');
87
+ popup.message = message;
88
+ popup.type = options.type || 'alert';
89
+ if (options.title)
90
+ popup.popupTitle = options.title;
91
+ if (options.modal !== undefined)
92
+ popup.modal = options.modal;
93
+ if (options.position)
94
+ popup.position = options.position;
95
+ if (options.confirmText)
96
+ popup.confirmText = options.confirmText;
97
+ if (options.cancelText)
98
+ popup.cancelText = options.cancelText;
99
+ if (options.placeholder)
100
+ popup.placeholder = options.placeholder;
101
+ if (options.defaultValue)
102
+ popup.defaultValue = options.defaultValue;
103
+ if (options.theme)
104
+ popup.setAttribute('theme', options.theme);
105
+ return popup;
106
+ }
107
+
108
+ globalScripts();
109
+
110
+ export { leAlert, leConfirm, lePrompt };
111
+ //# sourceMappingURL=index.js.map
112
+
113
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"file":"index.js","mappings":";;;;AACO,MAAM,aAAa,GAAGA,cAAe;;ACD5C;;;;;;;;;;;;;;;;AAgBG;AAqCH;;;;;;;;;AASG;AACI,eAAe,OAAO,CAAC,OAAe,EAAE,UAAwB,EAAE,EAAA;AACvE,IAAA,MAAM,KAAK,GAAG,kBAAkB,CAAC,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACxE,IAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAEhC,IAAA,MAAM,KAAK,CAAC,IAAI,EAAE;IAClB,KAAK,CAAC,MAAM,EAAE;AAChB;AAEA;;;;;;;;;;;AAWG;AACI,eAAe,SAAS,CAAC,OAAe,EAAE,UAAwB,EAAE,EAAA;AACzE,IAAA,MAAM,KAAK,GAAG,kBAAkB,CAAC,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAC1E,IAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAEhC,IAAA,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,IAAI,EAAE;IACjC,KAAK,CAAC,MAAM,EAAE;IAEd,OAAO,MAAM,CAAC,SAAS;AACzB;AAEA;;;;;;;;;;;;;;;AAeG;AACI,eAAe,QAAQ,CAAC,OAAe,EAAE,UAAwB,EAAE,EAAA;AACxE,IAAA,MAAM,KAAK,GAAG,kBAAkB,CAAC,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AACzE,IAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAEhC,IAAA,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,IAAI,EAAE;IACjC,KAAK,CAAC,MAAM,EAAE;AAEd,IAAA,OAAO,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,KAAK,IAAI,EAAE,IAAI,IAAI;AACvD;AAEA;;AAEG;AACH,SAAS,kBAAkB,CAAC,OAAe,EAAE,OAAqB,EAAA;IAChE,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAuB;AAEtE,IAAA,KAAK,CAAC,OAAO,GAAG,OAAO;IACvB,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO;IAEpC,IAAI,OAAO,CAAC,KAAK;AAAE,QAAA,KAAK,CAAC,UAAU,GAAG,OAAO,CAAC,KAAK;AACnD,IAAA,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS;AAAE,QAAA,KAAK,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK;IAC5D,IAAI,OAAO,CAAC,QAAQ;AAAE,QAAA,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ;IACvD,IAAI,OAAO,CAAC,WAAW;AAAE,QAAA,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW;IAChE,IAAI,OAAO,CAAC,UAAU;AAAE,QAAA,KAAK,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU;IAC7D,IAAI,OAAO,CAAC,WAAW;AAAE,QAAA,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW;IAChE,IAAI,OAAO,CAAC,YAAY;AAAE,QAAA,KAAK,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY;IACnE,IAAI,OAAO,CAAC,KAAK;QAAE,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC;AAE7D,IAAA,OAAO,KAAK;AACd;;;;;;","names":["appGlobalScript"],"sources":["@stencil/core/internal/app-globals","src-core/components/le-popup/le-popup.api.ts"],"sourcesContent":["import appGlobalScript from '/Users/andreylechev/Projects/le-kit/src-core/global/app.ts';\nexport const globalScripts = appGlobalScript;\nexport const globalStyles = \":root{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--le-spacing-0:0;--le-spacing-1:0.25rem;--le-spacing-2:0.5rem;--le-spacing-3:0.75rem;--le-spacing-4:1rem;--le-spacing-5:1.25rem;--le-spacing-6:1.5rem;--le-spacing-8:2rem;--le-spacing-10:2.5rem;--le-spacing-12:3rem;--le-spacing-16:4rem;--le-font-family-base:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;--le-font-family-mono:'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;--le-font-size-xs:0.75rem;--le-font-size-sm:0.875rem;--le-font-size-md:1rem;--le-font-size-lg:1.125rem;--le-font-size-xl:1.25rem;--le-font-size-2xl:1.5rem;--le-font-size-3xl:1.875rem;--le-font-size-4xl:2.25rem;--le-font-weight-normal:400;--le-font-weight-medium:500;--le-font-weight-semibold:600;--le-font-weight-bold:700;--le-line-height-tight:1.25;--le-line-height-normal:1.5;--le-line-height-relaxed:1.75;--le-radius-none:0;--le-radius-xs:0.066rem;--le-radius-sm:0.125rem;--le-radius-md:0.25rem;--le-radius-lg:0.5rem;--le-radius-xl:0.75rem;--le-radius-2xl:1rem;--le-radius-full:9999px;--le-transition-fast:100ms;--le-transition-normal:200ms;--le-transition-slow:300ms;--le-transition-easing:cubic-bezier(0.4, 0, 0.2, 1);--le-z-dropdown:1000;--le-z-sticky:1020;--le-z-fixed:1030;--le-z-modal-backdrop:1040;--le-z-modal:1050;--le-z-popover:1060;--le-z-tooltip:1070}:root,[theme=\\\"default\\\"]{--le-color-primary:#0088ff;--le-color-primary-light:#4da6ff;--le-color-primary-dark:#0066cc;--le-color-primary-contrast:#ffffff;--le-color-secondary:#6c757d;--le-color-secondary-light:#868e96;--le-color-secondary-dark:#545b62;--le-color-secondary-contrast:#ffffff;--le-color-success:#28a745;--le-color-success-light:#48c764;--le-color-success-dark:#1e7e34;--le-color-success-contrast:#ffffff;--le-color-warning:#ffc107;--le-color-warning-light:#ffcd39;--le-color-warning-dark:#d39e00;--le-color-warning-contrast:#212529;--le-color-danger:#dc3545;--le-color-danger-light:#e4606d;--le-color-danger-dark:#bd2130;--le-color-danger-contrast:#ffffff;--le-color-info:#17a2b8;--le-color-info-light:#3ab0c3;--le-color-info-dark:#117a8b;--le-color-info-contrast:#ffffff;--le-color-white:#ffffff;--le-color-black:#000000;--le-color-gray-50:#fafafa;--le-color-gray-100:#f5f5f5;--le-color-gray-200:#eeeeee;--le-color-gray-300:#e0e0e0;--le-color-gray-400:#bdbdbd;--le-color-gray-500:#9e9e9e;--le-color-gray-600:#757575;--le-color-gray-700:#616161;--le-color-gray-800:#424242;--le-color-gray-900:#212121;--le-color-background:#ffffff;--le-color-background-secondary:#f5f5f5;--le-color-background-tertiary:#eeeeee;--le-color-surface:#ffffff;--le-color-surface-elevated:#ffffff;--le-color-text-primary:#212121;--le-color-text-secondary:#757575;--le-color-text-disabled:#9e9e9e;--le-color-text-inverse:#ffffff;--le-color-border:#e0e0e0;--le-color-border-light:#eeeeee;--le-color-border-dark:#bdbdbd;--le-border-width:2px;--le-color-border-input:#c4d6e6;--le-color-focus:rgba(0, 136, 255, 0.5);--le-radius-none:0;--le-radius-sm:0.125rem;--le-radius-md:0.25rem;--le-radius-lg:0.5rem;--le-radius-xl:0.75rem;--le-radius-2xl:1rem;--le-radius-full:9999px;--le-shadow-none:none;--le-shadow-sm:0 1px 2px rgba(0, 0, 0, 0.05);--le-shadow-md:0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);--le-shadow-lg:0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);--le-shadow-xl:0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);--le-shadow-2xl:0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04)}[theme=\\\"dark\\\"]{--le-color-primary:#4da6ff;--le-color-primary-light:#80c1ff;--le-color-primary-dark:#0088ff;--le-color-primary-contrast:#000000;--le-color-secondary:#868e96;--le-color-secondary-light:#adb5bd;--le-color-secondary-dark:#6c757d;--le-color-secondary-contrast:#000000;--le-color-success:#48c764;--le-color-success-light:#6dd587;--le-color-success-dark:#28a745;--le-color-success-contrast:#000000;--le-color-warning:#ffcd39;--le-color-warning-light:#ffda6a;--le-color-warning-dark:#ffc107;--le-color-warning-contrast:#000000;--le-color-danger:#e4606d;--le-color-danger-light:#ea868f;--le-color-danger-dark:#dc3545;--le-color-danger-contrast:#000000;--le-color-info:#3ab0c3;--le-color-info-light:#6dc4d3;--le-color-info-dark:#17a2b8;--le-color-info-contrast:#000000;--le-color-white:#ffffff;--le-color-black:#000000;--le-color-gray-50:#212121;--le-color-gray-100:#424242;--le-color-gray-200:#616161;--le-color-gray-300:#757575;--le-color-gray-400:#9e9e9e;--le-color-gray-500:#bdbdbd;--le-color-gray-600:#e0e0e0;--le-color-gray-700:#eeeeee;--le-color-gray-800:#f5f5f5;--le-color-gray-900:#fafafa;--le-color-background:#121212;--le-color-background-secondary:#1e1e1e;--le-color-background-tertiary:#2d2d2d;--le-color-surface:#1e1e1e;--le-color-surface-elevated:#2d2d2d;--le-color-text-primary:#ffffff;--le-color-text-secondary:#b3b3b3;--le-color-text-disabled:#666666;--le-color-text-inverse:#121212;--le-color-border:#333333;--le-color-border-light:#2d2d2d;--le-color-border-dark:#444444;--le-border-width:2px;--le-color-border-input:#515c6b;--le-color-focus:rgba(77, 166, 255, 0.5);--le-radius-none:0;--le-radius-sm:0.125rem;--le-radius-md:0.25rem;--le-radius-lg:0.5rem;--le-radius-xl:0.75rem;--le-radius-2xl:1rem;--le-radius-full:9999px;--le-shadow-none:none;--le-shadow-sm:0 1px 2px rgba(0, 0, 0, 0.3);--le-shadow-md:0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);--le-shadow-lg:0 4px 6px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);--le-shadow-xl:0 10px 15px rgba(0, 0, 0, 0.4), 0 4px 6px rgba(0, 0, 0, 0.3);--le-shadow-2xl:0 20px 25px rgba(0, 0, 0, 0.4), 0 10px 10px rgba(0, 0, 0, 0.3)}[theme=\\\"gradient\\\"]{--le-color-primary:#8b5cf6;--le-color-primary-light:#a78bfa;--le-color-primary-dark:#7c3aed;--le-color-primary-contrast:#ffffff;--le-color-secondary:#ec4899;--le-color-secondary-light:#f472b6;--le-color-secondary-dark:#db2777;--le-color-secondary-contrast:#ffffff;--le-color-success:#10b981;--le-color-success-light:#34d399;--le-color-success-dark:#059669;--le-color-success-contrast:#ffffff;--le-color-warning:#f59e0b;--le-color-warning-light:#fbbf24;--le-color-warning-dark:#d97706;--le-color-warning-contrast:#000000;--le-color-danger:#ef4444;--le-color-danger-light:#f87171;--le-color-danger-dark:#dc2626;--le-color-danger-contrast:#ffffff;--le-color-info:#06b6d4;--le-color-info-light:#22d3ee;--le-color-info-dark:#0891b2;--le-color-info-contrast:#ffffff;--le-color-white:#ffffff;--le-color-black:#000000;--le-color-gray-50:#faf5ff;--le-color-gray-100:#f3e8ff;--le-color-gray-200:#e9d5ff;--le-color-gray-300:#d8b4fe;--le-color-gray-400:#c084fc;--le-color-gray-500:#a855f7;--le-color-gray-600:#9333ea;--le-color-gray-700:#7e22ce;--le-color-gray-800:#6b21a8;--le-color-gray-900:#581c87;--le-color-background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);--le-color-background-secondary:rgba(255, 255, 255, 0.1);--le-color-background-tertiary:rgba(255, 255, 255, 0.05);--le-color-surface:rgba(255, 255, 255, 0.95);--le-color-surface-elevated:#ffffff;--le-color-text-primary:#1f2937;--le-color-text-secondary:#6b7280;--le-color-text-disabled:#9ca3af;--le-color-text-inverse:#ffffff;--le-color-border:rgba(139, 92, 246, 0.3);--le-color-border-light:rgba(139, 92, 246, 0.1);--le-color-border-dark:rgba(139, 92, 246, 0.5);--le-border-width:2px;--le-color-border-input:#eccddd;--le-color-focus:rgba(139, 92, 246, 0.5);--le-radius-none:0;--le-radius-sm:0.25rem;--le-radius-md:0.5rem;--le-radius-lg:1rem;--le-radius-xl:1.5rem;--le-radius-2xl:2rem;--le-radius-full:9999px;--le-shadow-none:none;--le-shadow-sm:0 1px 2px rgba(139, 92, 246, 0.1);--le-shadow-md:0 4px 6px rgba(139, 92, 246, 0.15), 0 2px 4px rgba(139, 92, 246, 0.1);--le-shadow-lg:0 10px 20px rgba(139, 92, 246, 0.2), 0 4px 8px rgba(139, 92, 246, 0.1);--le-shadow-xl:0 20px 40px rgba(139, 92, 246, 0.25), 0 8px 16px rgba(139, 92, 246, 0.15);--le-shadow-2xl:0 30px 60px rgba(139, 92, 246, 0.3), 0 15px 30px rgba(139, 92, 246, 0.2)}[theme=\\\"minimal\\\"]{--le-color-primary:#111827;--le-color-primary-light:#374151;--le-color-primary-dark:#030712;--le-color-primary-contrast:#ffffff;--le-color-secondary:#6b7280;--le-color-secondary-light:#9ca3af;--le-color-secondary-dark:#4b5563;--le-color-secondary-contrast:#ffffff;--le-color-success:#059669;--le-color-success-light:#10b981;--le-color-success-dark:#047857;--le-color-success-contrast:#ffffff;--le-color-warning:#d97706;--le-color-warning-light:#f59e0b;--le-color-warning-dark:#b45309;--le-color-warning-contrast:#ffffff;--le-color-danger:#dc2626;--le-color-danger-light:#ef4444;--le-color-danger-dark:#b91c1c;--le-color-danger-contrast:#ffffff;--le-color-info:#0284c7;--le-color-info-light:#0ea5e9;--le-color-info-dark:#0369a1;--le-color-info-contrast:#ffffff;--le-color-white:#ffffff;--le-color-black:#000000;--le-color-gray-50:#f9fafb;--le-color-gray-100:#f3f4f6;--le-color-gray-200:#e5e7eb;--le-color-gray-300:#d1d5db;--le-color-gray-400:#9ca3af;--le-color-gray-500:#6b7280;--le-color-gray-600:#4b5563;--le-color-gray-700:#374151;--le-color-gray-800:#1f2937;--le-color-gray-900:#111827;--le-color-background:#ffffff;--le-color-background-secondary:#fafafa;--le-color-background-tertiary:#f5f5f5;--le-color-surface:#ffffff;--le-color-surface-elevated:#ffffff;--le-color-text-primary:#111827;--le-color-text-secondary:#6b7280;--le-color-text-disabled:#9ca3af;--le-color-text-inverse:#ffffff;--le-color-border:#e5e7eb;--le-color-border-light:#f3f4f6;--le-color-border-dark:#d1d5db;--le-border-width:1px;--le-color-border-input:#c8cfdd;--le-color-focus:rgba(17, 24, 39, 0.3);--le-radius-none:0;--le-radius-sm:0;--le-radius-md:2px;--le-radius-lg:4px;--le-radius-xl:6px;--le-radius-2xl:8px;--le-radius-full:9999px;--le-shadow-none:none;--le-shadow-sm:none;--le-shadow-md:0 1px 2px rgba(0, 0, 0, 0.05);--le-shadow-lg:0 1px 3px rgba(0, 0, 0, 0.08);--le-shadow-xl:0 2px 4px rgba(0, 0, 0, 0.1);--le-shadow-2xl:0 4px 8px rgba(0, 0, 0, 0.1)}[theme=\\\"warm\\\"]{--le-color-primary:#ea580c;--le-color-primary-light:#fb923c;--le-color-primary-dark:#c2410c;--le-color-primary-contrast:#ffffff;--le-color-secondary:#b45309;--le-color-secondary-light:#d97706;--le-color-secondary-dark:#92400e;--le-color-secondary-contrast:#ffffff;--le-color-success:#16a34a;--le-color-success-light:#22c55e;--le-color-success-dark:#15803d;--le-color-success-contrast:#ffffff;--le-color-warning:#ca8a04;--le-color-warning-light:#eab308;--le-color-warning-dark:#a16207;--le-color-warning-contrast:#000000;--le-color-danger:#dc2626;--le-color-danger-light:#ef4444;--le-color-danger-dark:#b91c1c;--le-color-danger-contrast:#ffffff;--le-color-info:#0891b2;--le-color-info-light:#06b6d4;--le-color-info-dark:#0e7490;--le-color-info-contrast:#ffffff;--le-color-white:#ffffff;--le-color-black:#000000;--le-color-gray-50:#fffbeb;--le-color-gray-100:#fef3c7;--le-color-gray-200:#fde68a;--le-color-gray-300:#fcd34d;--le-color-gray-400:#fbbf24;--le-color-gray-500:#f59e0b;--le-color-gray-600:#d97706;--le-color-gray-700:#b45309;--le-color-gray-800:#92400e;--le-color-gray-900:#78350f;--le-color-background:#fffbeb;--le-color-background-secondary:#fef3c7;--le-color-background-tertiary:#fde68a;--le-color-surface:#ffffff;--le-color-surface-elevated:#ffffff;--le-color-text-primary:#78350f;--le-color-text-secondary:#92400e;--le-color-text-disabled:#d97706;--le-color-text-inverse:#ffffff;--le-color-border:#fcd34d;--le-color-border-light:#fde68a;--le-color-border-dark:#fbbf24;--le-border-width:2px;--le-color-border-input:#e7d4c4;--le-color-focus:rgba(234, 88, 12, 0.5);--le-radius-none:0;--le-radius-sm:0.125rem;--le-radius-md:0.375rem;--le-radius-lg:0.625rem;--le-radius-xl:0.875rem;--le-radius-2xl:1.125rem;--le-radius-full:9999px;--le-shadow-none:none;--le-shadow-sm:0 1px 2px rgba(234, 88, 12, 0.05);--le-shadow-md:0 4px 6px rgba(234, 88, 12, 0.1), 0 2px 4px rgba(234, 88, 12, 0.06);--le-shadow-lg:0 10px 15px rgba(234, 88, 12, 0.15), 0 4px 6px rgba(234, 88, 12, 0.08);--le-shadow-xl:0 20px 25px rgba(234, 88, 12, 0.15), 0 10px 10px rgba(234, 88, 12, 0.1);--le-shadow-2xl:0 25px 50px rgba(234, 88, 12, 0.2), 0 12px 24px rgba(234, 88, 12, 0.12)}:root{--le-space-xs:4px;--le-space-sm:8px;--le-space-md:16px;--le-space-lg:24px;--le-space-xl:32px;--le-space-2xl:48px;--le-space-3xl:64px;--le-font-family:system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;--le-font-family-mono:'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;--le-font-size-xs:0.75rem;--le-font-size-sm:0.875rem;--le-font-size-md:1rem;--le-font-size-lg:1.125rem;--le-font-size-xl:1.25rem;--le-font-size-2xl:1.5rem;--le-font-size-3xl:2rem;--le-font-size-4xl:2.5rem;--le-font-weight-normal:400;--le-font-weight-medium:500;--le-font-weight-semibold:600;--le-font-weight-bold:700;--le-line-height-tight:1.25;--le-line-height-normal:1.5;--le-line-height-relaxed:1.75;--le-transition-fast:150ms ease;--le-transition-normal:250ms ease;--le-transition-slow:400ms ease;--le-transition-bounce:400ms cubic-bezier(0.68, -0.55, 0.265, 1.55);--le-z-dropdown:1000;--le-z-sticky:1020;--le-z-fixed:1030;--le-z-modal-backdrop:1040;--le-z-modal:1050;--le-z-popover:1060;--le-z-tooltip:1070}:root,[theme=\\\"default\\\"]{--le-color-primary:#3b82f6;--le-color-primary-hover:#2563eb;--le-color-primary-active:#1d4ed8;--le-color-primary-subtle:#eff6ff;--le-color-on-primary:#ffffff;--le-color-secondary:#64748b;--le-color-secondary-hover:#475569;--le-color-secondary-active:#334155;--le-color-secondary-subtle:#f1f5f9;--le-color-on-secondary:#ffffff;--le-color-success:#22c55e;--le-color-success-subtle:#f0fdf4;--le-color-on-success:#ffffff;--le-color-warning:#f59e0b;--le-color-warning-subtle:#fffbeb;--le-color-on-warning:#000000;--le-color-error:#ef4444;--le-color-error-subtle:#fef2f2;--le-color-on-error:#ffffff;--le-color-info:#06b6d4;--le-color-info-subtle:#ecfeff;--le-color-on-info:#ffffff;--le-color-background:#ffffff;--le-color-surface:#ffffff;--le-color-surface-raised:#ffffff;--le-color-surface-overlay:rgba(0, 0, 0, 0.5);--le-color-text:#1e293b;--le-color-text-secondary:#64748b;--le-color-text-muted:#94a3b8;--le-color-text-inverse:#ffffff;--le-color-border:#e2e8f0;--le-color-border-strong:#cbd5e1;--le-color-border-focus:var(--le-color-primary);--le-radius-none:0;--le-radius-sm:4px;--le-radius-md:7px;--le-radius-lg:12px;--le-radius-xl:16px;--le-radius-2xl:24px;--le-radius-full:9999px;--le-shadow-sm:0 1px 2px 0 rgba(0, 0, 0, 0.05);--le-shadow-md:0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);--le-shadow-lg:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);--le-shadow-xl:0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);--le-shadow-focus:0 0 0 3px rgba(59, 130, 246, 0.3)}[theme=\\\"dark\\\"]{--le-color-primary:#60a5fa;--le-color-primary-hover:#93c5fd;--le-color-primary-active:#3b82f6;--le-color-primary-subtle:#1e3a5f;--le-color-on-primary:#0f172a;--le-color-secondary:#94a3b8;--le-color-secondary-hover:#cbd5e1;--le-color-secondary-active:#64748b;--le-color-secondary-subtle:#1e293b;--le-color-on-secondary:#0f172a;--le-color-success:#4ade80;--le-color-success-subtle:#14532d;--le-color-on-success:#0f172a;--le-color-warning:#fbbf24;--le-color-warning-subtle:#422006;--le-color-on-warning:#0f172a;--le-color-error:#f87171;--le-color-error-subtle:#450a0a;--le-color-on-error:#0f172a;--le-color-info:#22d3ee;--le-color-info-subtle:#164e63;--le-color-on-info:#0f172a;--le-color-background:#0f172a;--le-color-surface:#1e293b;--le-color-surface-raised:#334155;--le-color-surface-overlay:rgba(0, 0, 0, 0.7);--le-color-text:#f1f5f9;--le-color-text-secondary:#94a3b8;--le-color-text-muted:#64748b;--le-color-text-inverse:#0f172a;--le-color-border:#334155;--le-color-border-strong:#475569;--le-color-border-focus:var(--le-color-primary);--le-shadow-sm:0 1px 2px 0 rgba(0, 0, 0, 0.3);--le-shadow-md:0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);--le-shadow-lg:0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);--le-shadow-xl:0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);--le-shadow-focus:0 0 0 3px rgba(96, 165, 250, 0.4)}[theme=\\\"gradient\\\"]{--le-color-primary:#8b5cf6;--le-color-primary-hover:#a78bfa;--le-color-primary-active:#7c3aed;--le-color-primary-subtle:#f5f3ff;--le-color-on-primary:#ffffff;--le-color-secondary:#ec4899;--le-color-secondary-hover:#f472b6;--le-color-secondary-active:#db2777;--le-color-secondary-subtle:#fdf2f8;--le-color-on-secondary:#ffffff;--le-color-success:#10b981;--le-color-success-subtle:#ecfdf5;--le-color-on-success:#ffffff;--le-color-warning:#f59e0b;--le-color-warning-subtle:#fffbeb;--le-color-on-warning:#000000;--le-color-error:#f43f5e;--le-color-error-subtle:#fff1f2;--le-color-on-error:#ffffff;--le-color-info:#06b6d4;--le-color-info-subtle:#ecfeff;--le-color-on-info:#ffffff;--le-color-background:linear-gradient(135deg, #faf5ff 0%, #fdf2f8 50%, #fff7ed 100%);--le-color-surface:rgba(255, 255, 255, 0.9);--le-color-surface-raised:#ffffff;--le-color-surface-overlay:rgba(139, 92, 246, 0.3);--le-color-text:#1f2937;--le-color-text-secondary:#6b7280;--le-color-text-muted:#9ca3af;--le-color-text-inverse:#ffffff;--le-color-border:rgba(139, 92, 246, 0.2);--le-color-border-strong:rgba(139, 92, 246, 0.4);--le-color-border-focus:var(--le-color-primary);--le-radius-sm:6px;--le-radius-md:12px;--le-radius-lg:16px;--le-radius-xl:20px;--le-radius-2xl:28px;--le-shadow-sm:0 1px 3px 0 rgba(139, 92, 246, 0.1);--le-shadow-md:0 4px 6px -1px rgba(139, 92, 246, 0.15), 0 2px 4px -2px rgba(236, 72, 153, 0.1);--le-shadow-lg:0 10px 15px -3px rgba(139, 92, 246, 0.2), 0 4px 6px -4px rgba(236, 72, 153, 0.15);--le-shadow-xl:0 20px 25px -5px rgba(139, 92, 246, 0.25), 0 8px 10px -6px rgba(236, 72, 153, 0.2);--le-shadow-focus:0 0 0 3px rgba(139, 92, 246, 0.4)}[theme=\\\"minimal\\\"]{--le-color-primary:#374151;--le-color-primary-hover:#1f2937;--le-color-primary-active:#111827;--le-color-primary-subtle:#f3f4f6;--le-color-on-primary:#ffffff;--le-color-secondary:#9ca3af;--le-color-secondary-hover:#6b7280;--le-color-secondary-active:#4b5563;--le-color-secondary-subtle:#f9fafb;--le-color-on-secondary:#ffffff;--le-color-success:#059669;--le-color-success-subtle:#f0fdf4;--le-color-on-success:#ffffff;--le-color-warning:#d97706;--le-color-warning-subtle:#fffbeb;--le-color-on-warning:#ffffff;--le-color-error:#dc2626;--le-color-error-subtle:#fef2f2;--le-color-on-error:#ffffff;--le-color-info:#0891b2;--le-color-info-subtle:#ecfeff;--le-color-on-info:#ffffff;--le-color-background:#fafafa;--le-color-surface:#ffffff;--le-color-surface-raised:#ffffff;--le-color-surface-overlay:rgba(0, 0, 0, 0.4);--le-color-text:#111827;--le-color-text-secondary:#6b7280;--le-color-text-muted:#9ca3af;--le-color-text-inverse:#ffffff;--le-color-border:#e5e7eb;--le-color-border-strong:#d1d5db;--le-color-border-focus:var(--le-color-primary);--le-radius-none:0;--le-radius-sm:2px;--le-radius-md:4px;--le-radius-lg:6px;--le-radius-xl:8px;--le-radius-2xl:12px;--le-radius-full:9999px;--le-shadow-sm:0 1px 2px 0 rgba(0, 0, 0, 0.03);--le-shadow-md:0 2px 4px -1px rgba(0, 0, 0, 0.06);--le-shadow-lg:0 4px 8px -2px rgba(0, 0, 0, 0.08);--le-shadow-xl:0 8px 16px -4px rgba(0, 0, 0, 0.1);--le-shadow-focus:0 0 0 2px rgba(55, 65, 81, 0.2)}[theme=\\\"warm\\\"]{--le-color-primary:#ea580c;--le-color-primary-hover:#f97316;--le-color-primary-active:#c2410c;--le-color-primary-subtle:#fff7ed;--le-color-on-primary:#ffffff;--le-color-secondary:#78716c;--le-color-secondary-hover:#57534e;--le-color-secondary-active:#44403c;--le-color-secondary-subtle:#fafaf9;--le-color-on-secondary:#ffffff;--le-color-success:#65a30d;--le-color-success-subtle:#f7fee7;--le-color-on-success:#ffffff;--le-color-warning:#d97706;--le-color-warning-subtle:#fffbeb;--le-color-on-warning:#000000;--le-color-error:#dc2626;--le-color-error-subtle:#fef2f2;--le-color-on-error:#ffffff;--le-color-info:#0891b2;--le-color-info-subtle:#ecfeff;--le-color-on-info:#ffffff;--le-color-background:#fffbf5;--le-color-surface:#ffffff;--le-color-surface-raised:#ffffff;--le-color-surface-overlay:rgba(120, 53, 15, 0.4);--le-color-text:#292524;--le-color-text-secondary:#78716c;--le-color-text-muted:#a8a29e;--le-color-text-inverse:#ffffff;--le-color-border:#e7e5e4;--le-color-border-strong:#d6d3d1;--le-color-border-focus:var(--le-color-primary);--le-radius-sm:4px;--le-radius-md:8px;--le-radius-lg:12px;--le-radius-xl:16px;--le-radius-2xl:24px;--le-shadow-sm:0 1px 2px 0 rgba(120, 53, 15, 0.05);--le-shadow-md:0 4px 6px -1px rgba(120, 53, 15, 0.1), 0 2px 4px -2px rgba(120, 53, 15, 0.08);--le-shadow-lg:0 10px 15px -3px rgba(120, 53, 15, 0.12), 0 4px 6px -4px rgba(120, 53, 15, 0.1);--le-shadow-xl:0 20px 25px -5px rgba(120, 53, 15, 0.15), 0 8px 10px -6px rgba(120, 53, 15, 0.12);--le-shadow-focus:0 0 0 3px rgba(234, 88, 12, 0.3)}\";\n","/**\n * Programmatic API for le-popup component\n * \n * These functions allow you to show popups without manually creating elements.\n * \n * @example\n * // Alert\n * await leAlert('Something happened!');\n * \n * // Confirm\n * const confirmed = await leConfirm('Are you sure?');\n * if (confirmed) { ... }\n * \n * // Prompt\n * const name = await lePrompt('What is your name?');\n * if (name !== null) { ... }\n */\n\nimport type { PopupType, PopupPosition, PopupResult } from './le-popup';\n\n/**\n * Options for programmatic popup functions\n */\nexport interface PopupOptions {\n title?: string;\n type?: PopupType;\n modal?: boolean;\n position?: PopupPosition;\n confirmText?: string;\n cancelText?: string;\n placeholder?: string;\n defaultValue?: string;\n theme?: string;\n}\n\n/**\n * Interface for the le-popup custom element\n */\ninterface HTMLLePopupElement extends HTMLElement {\n open: boolean;\n type: PopupType;\n popupTitle?: string;\n message?: string;\n modal: boolean;\n position: PopupPosition;\n confirmText: string;\n cancelText: string;\n placeholder: string;\n defaultValue: string;\n show(): Promise<PopupResult>;\n hide(confirmed?: boolean): Promise<void>;\n}\n\n/**\n * Show an alert popup with a message\n * @param message - The message to display\n * @param options - Optional configuration\n * @returns Promise that resolves when closed\n * \n * @example\n * await leAlert('File saved successfully!');\n * await leAlert('Error occurred', { title: 'Error', theme: 'dark' });\n */\nexport async function leAlert(message: string, options: PopupOptions = {}): Promise<void> {\n const popup = createPopupElement(message, { ...options, type: 'alert' });\n document.body.appendChild(popup);\n \n await popup.show();\n popup.remove();\n}\n\n/**\n * Show a confirm popup with OK/Cancel buttons\n * @param message - The message to display\n * @param options - Optional configuration\n * @returns Promise that resolves to true (confirmed) or false (cancelled)\n * \n * @example\n * const confirmed = await leConfirm('Delete this item?');\n * if (confirmed) {\n * deleteItem();\n * }\n */\nexport async function leConfirm(message: string, options: PopupOptions = {}): Promise<boolean> {\n const popup = createPopupElement(message, { ...options, type: 'confirm' });\n document.body.appendChild(popup);\n \n const result = await popup.show();\n popup.remove();\n \n return result.confirmed;\n}\n\n/**\n * Show a prompt popup with an input field\n * @param message - The message to display\n * @param options - Optional configuration (including defaultValue, placeholder)\n * @returns Promise that resolves to the input value or null if cancelled\n * \n * @example\n * const name = await lePrompt('Enter your name:', { \n * title: 'Welcome',\n * placeholder: 'John Doe',\n * defaultValue: 'Guest'\n * });\n * if (name !== null) {\n * greetUser(name);\n * }\n */\nexport async function lePrompt(message: string, options: PopupOptions = {}): Promise<string | null> {\n const popup = createPopupElement(message, { ...options, type: 'prompt' });\n document.body.appendChild(popup);\n \n const result = await popup.show();\n popup.remove();\n \n return result.confirmed ? (result.value ?? '') : null;\n}\n\n/**\n * Create a popup element with the given configuration\n */\nfunction createPopupElement(message: string, options: PopupOptions): HTMLLePopupElement {\n const popup = document.createElement('le-popup') as HTMLLePopupElement;\n \n popup.message = message;\n popup.type = options.type || 'alert';\n \n if (options.title) popup.popupTitle = options.title;\n if (options.modal !== undefined) popup.modal = options.modal;\n if (options.position) popup.position = options.position;\n if (options.confirmText) popup.confirmText = options.confirmText;\n if (options.cancelText) popup.cancelText = options.cancelText;\n if (options.placeholder) popup.placeholder = options.placeholder;\n if (options.defaultValue) popup.defaultValue = options.defaultValue;\n if (options.theme) popup.setAttribute('theme', options.theme);\n \n return popup;\n}\n"],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../../dist/types/components";
2
+
3
+ interface LeBox extends Components.LeBox, HTMLElement {}
4
+ export const LeBox: {
5
+ prototype: LeBox;
6
+ new (): LeBox;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,225 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { h as classnames } from './utils.js';
3
+
4
+ const leBoxDefaultCss = ":host{display:block;box-sizing:border-box}:host([hidden]){display:none}.box{width:100%;height:100%;box-sizing:border-box}.content{width:100%;height:100%;box-sizing:border-box;background:var(--le-box-bg, transparent);border-radius:var(--le-box-border-radius, 0);padding:var(--le-box-padding, 0)}:host(.display-flex) .content{min-height:100%}";
5
+
6
+ const LeBox$1 = /*@__PURE__*/ proxyCustomElement(class LeBox extends HTMLElement {
7
+ constructor(registerHost) {
8
+ super();
9
+ if (registerHost !== false) {
10
+ this.__registerHost();
11
+ }
12
+ this.__attachShadow();
13
+ }
14
+ get el() { return this; }
15
+ /**
16
+ * Flex grow factor - how much the item should grow relative to siblings
17
+ * @min 0
18
+ */
19
+ grow = 0;
20
+ /**
21
+ * Flex shrink factor - how much the item should shrink relative to siblings
22
+ * @min 0
23
+ */
24
+ shrink = 1;
25
+ /**
26
+ * Flex basis - initial size before growing/shrinking (e.g., '200px', '25%', 'auto')
27
+ */
28
+ basis = 'auto';
29
+ /**
30
+ * Width of the box (CSS value like '100px', '50%', 'auto')
31
+ */
32
+ width;
33
+ /**
34
+ * Height of the box (CSS value)
35
+ */
36
+ height;
37
+ /**
38
+ * Minimum width constraint
39
+ */
40
+ minWidth;
41
+ /**
42
+ * Maximum width constraint
43
+ */
44
+ maxWidth;
45
+ /**
46
+ * Minimum height constraint
47
+ */
48
+ minHeight;
49
+ /**
50
+ * Maximum height constraint
51
+ */
52
+ maxHeight;
53
+ /**
54
+ * Background color or CSS value (e.g., '#f0f0f0', 'var(--le-color-primary-light)')
55
+ */
56
+ background;
57
+ /**
58
+ * Border radius (e.g., '8px', 'var(--le-radius-md)')
59
+ */
60
+ borderRadius;
61
+ /**
62
+ * Border style (e.g., '1px solid #ccc', '2px dashed var(--le-color-border)')
63
+ */
64
+ border;
65
+ /**
66
+ * Self-alignment override for this item on the cross axis
67
+ * @allowedValues auto | start | center | end | stretch | baseline
68
+ */
69
+ alignSelf = 'auto';
70
+ /**
71
+ * Internal horizontal alignment of content
72
+ * @allowedValues start | center | end | stretch
73
+ */
74
+ alignContent = 'stretch';
75
+ /**
76
+ * Internal vertical alignment of content
77
+ * @allowedValues start | center | end | stretch
78
+ */
79
+ justifyContent = 'start';
80
+ /**
81
+ * Padding inside the box (CSS value like '8px', '1rem')
82
+ */
83
+ padding;
84
+ /**
85
+ * Order in the flex container (lower values come first)
86
+ */
87
+ order;
88
+ /**
89
+ * Whether to display box content as flex (for internal alignment)
90
+ */
91
+ displayFlex = false;
92
+ /**
93
+ * Direction of internal flex layout when displayFlex is true
94
+ * @allowedValues horizontal | vertical
95
+ */
96
+ innerDirection = 'vertical';
97
+ /**
98
+ * Gap between internal flex items when displayFlex is true
99
+ */
100
+ innerGap;
101
+ getAlignSelf() {
102
+ const alignMap = {
103
+ auto: 'auto',
104
+ start: 'flex-start',
105
+ center: 'center',
106
+ end: 'flex-end',
107
+ stretch: 'stretch',
108
+ baseline: 'baseline',
109
+ };
110
+ return alignMap[this.alignSelf] || 'auto';
111
+ }
112
+ getContentAlign() {
113
+ const alignMap = {
114
+ start: 'flex-start',
115
+ center: 'center',
116
+ end: 'flex-end',
117
+ stretch: 'stretch',
118
+ };
119
+ return alignMap[this.alignContent] || 'stretch';
120
+ }
121
+ getContentJustify() {
122
+ const justifyMap = {
123
+ start: 'flex-start',
124
+ center: 'center',
125
+ end: 'flex-end',
126
+ stretch: 'stretch',
127
+ };
128
+ return justifyMap[this.justifyContent] || 'flex-start';
129
+ }
130
+ render() {
131
+ // Host styles for flex item behavior
132
+ const hostStyle = {
133
+ flexGrow: String(this.grow),
134
+ flexShrink: String(this.shrink),
135
+ flexBasis: this.basis,
136
+ alignSelf: this.getAlignSelf(),
137
+ };
138
+ if (this.width)
139
+ hostStyle.width = this.width;
140
+ if (this.height)
141
+ hostStyle.height = this.height;
142
+ if (this.minWidth)
143
+ hostStyle.minWidth = this.minWidth;
144
+ if (this.maxWidth)
145
+ hostStyle.maxWidth = this.maxWidth;
146
+ if (this.minHeight)
147
+ hostStyle.minHeight = this.minHeight;
148
+ if (this.maxHeight)
149
+ hostStyle.maxHeight = this.maxHeight;
150
+ if (this.order !== undefined)
151
+ hostStyle.order = String(this.order);
152
+ // Inner content styles
153
+ const contentStyle = {};
154
+ if (this.padding) {
155
+ contentStyle.padding = this.padding;
156
+ }
157
+ if (this.background) {
158
+ contentStyle.background = this.background;
159
+ }
160
+ if (this.borderRadius) {
161
+ contentStyle.borderRadius = this.borderRadius;
162
+ }
163
+ if (this.border) {
164
+ contentStyle.border = this.border;
165
+ }
166
+ if (this.displayFlex) {
167
+ contentStyle.display = 'flex';
168
+ contentStyle.flexDirection = this.innerDirection === 'vertical' ? 'column' : 'row';
169
+ contentStyle.alignItems = this.getContentAlign();
170
+ contentStyle.justifyContent = this.getContentJustify();
171
+ if (this.innerGap) {
172
+ contentStyle.gap = this.innerGap;
173
+ }
174
+ }
175
+ const hostClass = classnames({
176
+ 'has-grow': this.grow > 0,
177
+ 'display-flex': this.displayFlex,
178
+ [`inner-${this.innerDirection}`]: this.displayFlex,
179
+ });
180
+ return (h(Host, { key: '8a8db08fe79a0d6e135ea788a7447060b746bdc2', style: hostStyle, class: hostClass }, h("div", { key: 'c3b5aa4e4135d957c3a55bf4f76cadb395c6bb5b', class: "box", part: "box" }, h("div", { key: 'eebba217d0026a00d71541a898200445d5966393', class: "content", part: "content", style: contentStyle }, h("slot", { key: '7ebf91579244542495d5e7a01540ba61fb7aa080' })))));
181
+ }
182
+ static get style() { return leBoxDefaultCss; }
183
+ }, [769, "le-box", {
184
+ "grow": [2],
185
+ "shrink": [2],
186
+ "basis": [1],
187
+ "width": [1],
188
+ "height": [1],
189
+ "minWidth": [1, "min-width"],
190
+ "maxWidth": [1, "max-width"],
191
+ "minHeight": [1, "min-height"],
192
+ "maxHeight": [1, "max-height"],
193
+ "background": [1],
194
+ "borderRadius": [1, "border-radius"],
195
+ "border": [1],
196
+ "alignSelf": [1, "align-self"],
197
+ "alignContent": [1, "align-content"],
198
+ "justifyContent": [1, "justify-content"],
199
+ "padding": [1],
200
+ "order": [2],
201
+ "displayFlex": [4, "display-flex"],
202
+ "innerDirection": [1, "inner-direction"],
203
+ "innerGap": [1, "inner-gap"]
204
+ }]);
205
+ function defineCustomElement$1() {
206
+ if (typeof customElements === "undefined") {
207
+ return;
208
+ }
209
+ const components = ["le-box"];
210
+ components.forEach(tagName => { switch (tagName) {
211
+ case "le-box":
212
+ if (!customElements.get(tagName)) {
213
+ customElements.define(tagName, LeBox$1);
214
+ }
215
+ break;
216
+ } });
217
+ }
218
+
219
+ const LeBox = LeBox$1;
220
+ const defineCustomElement = defineCustomElement$1;
221
+
222
+ export { LeBox, defineCustomElement };
223
+ //# sourceMappingURL=le-box.js.map
224
+
225
+ //# sourceMappingURL=le-box.js.map
@@ -0,0 +1 @@
1
+ {"file":"le-box.js","mappings":";;;AAAA,MAAM,eAAe,GAAG,sVAAsV;;MC0BjWA,OAAK,iBAAAC,kBAAA,CAAA,MAAA,KAAA,SAAA,WAAA,CAAA;;;;;;;;;AAGhB;;;AAGG;IACK,IAAI,GAAW,CAAC;AAExB;;;AAGG;IACK,MAAM,GAAW,CAAC;AAE1B;;AAEG;IACK,KAAK,GAAW,MAAM;AAE9B;;AAEG;AACK,IAAA,KAAK;AAEb;;AAEG;AACK,IAAA,MAAM;AAEd;;AAEG;AACK,IAAA,QAAQ;AAEhB;;AAEG;AACK,IAAA,QAAQ;AAEhB;;AAEG;AACK,IAAA,SAAS;AAEjB;;AAEG;AACK,IAAA,SAAS;AAEjB;;AAEG;AACK,IAAA,UAAU;AAElB;;AAEG;AACK,IAAA,YAAY;AAEpB;;AAEG;AACK,IAAA,MAAM;AAEd;;;AAGG;IACK,SAAS,GAAiE,MAAM;AAExF;;;AAGG;IACK,YAAY,GAA2C,SAAS;AAExE;;;AAGG;IACK,cAAc,GAA2C,OAAO;AAExE;;AAEG;AACK,IAAA,OAAO;AAEf;;AAEG;AACK,IAAA,KAAK;AAEb;;AAEG;IACK,WAAW,GAAY,KAAK;AAEpC;;;AAGG;IACK,cAAc,GAA8B,UAAU;AAE9D;;AAEG;AACK,IAAA,QAAQ;IAER,YAAY,GAAA;AAClB,QAAA,MAAM,QAAQ,GAA2B;AACvC,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,KAAK,EAAE,YAAY;AACnB,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,GAAG,EAAE,UAAU;AACf,YAAA,OAAO,EAAE,SAAS;AAClB,YAAA,QAAQ,EAAE,UAAU;SACrB;QACD,OAAO,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,MAAM;;IAGnC,eAAe,GAAA;AACrB,QAAA,MAAM,QAAQ,GAA2B;AACvC,YAAA,KAAK,EAAE,YAAY;AACnB,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,GAAG,EAAE,UAAU;AACf,YAAA,OAAO,EAAE,SAAS;SACnB;QACD,OAAO,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,SAAS;;IAGzC,iBAAiB,GAAA;AACvB,QAAA,MAAM,UAAU,GAA2B;AACzC,YAAA,KAAK,EAAE,YAAY;AACnB,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,GAAG,EAAE,UAAU;AACf,YAAA,OAAO,EAAE,SAAS;SACnB;QACD,OAAO,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,YAAY;;IAGxD,MAAM,GAAA;;AAEJ,QAAA,MAAM,SAAS,GAA8B;AAC3C,YAAA,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;AAC3B,YAAA,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;YAC/B,SAAS,EAAE,IAAI,CAAC,KAAK;AACrB,YAAA,SAAS,EAAE,IAAI,CAAC,YAAY,EAAE;SAC/B;QAED,IAAI,IAAI,CAAC,KAAK;AAAE,YAAA,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK;QAC5C,IAAI,IAAI,CAAC,MAAM;AAAE,YAAA,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM;QAC/C,IAAI,IAAI,CAAC,QAAQ;AAAE,YAAA,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ;QACrD,IAAI,IAAI,CAAC,QAAQ;AAAE,YAAA,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ;QACrD,IAAI,IAAI,CAAC,SAAS;AAAE,YAAA,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS;QACxD,IAAI,IAAI,CAAC,SAAS;AAAE,YAAA,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS;AACxD,QAAA,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS;YAAE,SAAS,CAAC,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;;QAGlE,MAAM,YAAY,GAA8B,EAAE;AAElD,QAAA,IAAI,IAAI,CAAC,OAAO,EAAE;AAChB,YAAA,YAAY,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO;;AAErC,QAAA,IAAI,IAAI,CAAC,UAAU,EAAE;AACnB,YAAA,YAAY,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU;;AAE3C,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACrB,YAAA,YAAY,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY;;AAE/C,QAAA,IAAI,IAAI,CAAC,MAAM,EAAE;AACf,YAAA,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM;;AAGnC,QAAA,IAAI,IAAI,CAAC,WAAW,EAAE;AACpB,YAAA,YAAY,CAAC,OAAO,GAAG,MAAM;AAC7B,YAAA,YAAY,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,KAAK,UAAU,GAAG,QAAQ,GAAG,KAAK;AAClF,YAAA,YAAY,CAAC,UAAU,GAAG,IAAI,CAAC,eAAe,EAAE;AAChD,YAAA,YAAY,CAAC,cAAc,GAAG,IAAI,CAAC,iBAAiB,EAAE;AACtD,YAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;AACjB,gBAAA,YAAY,CAAC,GAAG,GAAG,IAAI,CAAC,QAAQ;;;QAIpC,MAAM,SAAS,GAAG,UAAU,CAAC;AAC3B,YAAA,UAAU,EAAE,IAAI,CAAC,IAAI,GAAG,CAAC;YACzB,cAAc,EAAE,IAAI,CAAC,WAAW;YAChC,CAAC,CAAA,MAAA,EAAS,IAAI,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,WAAW;AACnD,SAAA,CAAC;AAEF,QAAA,QACE,CAAC,CAAA,IAAI,EAAC,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAA,EAEpC,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,KAAK,EAAC,IAAI,EAAC,KAAK,EAAA,EACzB,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAE,YAAY,EAAA,EAEnD,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CAEX,CACF,CAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["LeBox","__stencil_proxyCustomElement"],"sources":["src-core/components/le-box/le-box.default.css?tag=le-box&encapsulation=shadow","src-core/components/le-box/le-box.tsx"],"sourcesContent":["/**\n * le-box default styles\n *\n * Flex item properties are applied inline via hostStyle.\n * This CSS handles visual styling and theming.\n */\n\n:host {\n display: block;\n box-sizing: border-box;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n/* Box container - full size by default */\n.box {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n}\n\n/* Content wrapper */\n.content {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n background: var(--le-box-bg, transparent);\n border-radius: var(--le-box-border-radius, 0);\n padding: var(--le-box-padding, 0);\n}\n\n/* When displayFlex is enabled, ensure content stretches */\n:host(.display-flex) .content {\n min-height: 100%;\n}\n","import { Component, Prop, h, Element, Host } from '@stencil/core';\nimport { classnames } from '../../utils/utils';\n\n/**\n * A flexible box component for use as a flex item within le-stack.\n *\n * `le-box` wraps content and provides flex item properties like grow, shrink,\n * basis, and self-alignment. It can also control its internal content alignment.\n *\n * @slot - Default slot for box content\n *\n * @cssprop --le-box-bg - Background color\n * @cssprop --le-box-padding - Padding inside the box\n * @cssprop --le-box-border-radius - Border radius\n *\n * @csspart box - The main box container\n * @csspart content - The inner content wrapper\n *\n * @cmsEditable true\n * @cmsCategory Layout\n */\n@Component({\n tag: 'le-box',\n styleUrl: 'le-box.default.css',\n shadow: true,\n})\nexport class LeBox {\n @Element() el: HTMLElement;\n\n /**\n * Flex grow factor - how much the item should grow relative to siblings\n * @min 0\n */\n @Prop() grow: number = 0;\n\n /**\n * Flex shrink factor - how much the item should shrink relative to siblings\n * @min 0\n */\n @Prop() shrink: number = 1;\n\n /**\n * Flex basis - initial size before growing/shrinking (e.g., '200px', '25%', 'auto')\n */\n @Prop() basis: string = 'auto';\n\n /**\n * Width of the box (CSS value like '100px', '50%', 'auto')\n */\n @Prop() width?: string;\n\n /**\n * Height of the box (CSS value)\n */\n @Prop() height?: string;\n\n /**\n * Minimum width constraint\n */\n @Prop() minWidth?: string;\n\n /**\n * Maximum width constraint\n */\n @Prop() maxWidth?: string;\n\n /**\n * Minimum height constraint\n */\n @Prop() minHeight?: string;\n\n /**\n * Maximum height constraint\n */\n @Prop() maxHeight?: string;\n\n /**\n * Background color or CSS value (e.g., '#f0f0f0', 'var(--le-color-primary-light)')\n */\n @Prop() background?: string;\n\n /**\n * Border radius (e.g., '8px', 'var(--le-radius-md)')\n */\n @Prop() borderRadius?: string;\n\n /**\n * Border style (e.g., '1px solid #ccc', '2px dashed var(--le-color-border)')\n */\n @Prop() border?: string;\n\n /**\n * Self-alignment override for this item on the cross axis\n * @allowedValues auto | start | center | end | stretch | baseline\n */\n @Prop() alignSelf: 'auto' | 'start' | 'center' | 'end' | 'stretch' | 'baseline' = 'auto';\n\n /**\n * Internal horizontal alignment of content\n * @allowedValues start | center | end | stretch\n */\n @Prop() alignContent: 'start' | 'center' | 'end' | 'stretch' = 'stretch';\n\n /**\n * Internal vertical alignment of content\n * @allowedValues start | center | end | stretch\n */\n @Prop() justifyContent: 'start' | 'center' | 'end' | 'stretch' = 'start';\n\n /**\n * Padding inside the box (CSS value like '8px', '1rem')\n */\n @Prop() padding?: string;\n\n /**\n * Order in the flex container (lower values come first)\n */\n @Prop() order?: number;\n\n /**\n * Whether to display box content as flex (for internal alignment)\n */\n @Prop() displayFlex: boolean = false;\n\n /**\n * Direction of internal flex layout when displayFlex is true\n * @allowedValues horizontal | vertical\n */\n @Prop() innerDirection: 'horizontal' | 'vertical' = 'vertical';\n\n /**\n * Gap between internal flex items when displayFlex is true\n */\n @Prop() innerGap?: string;\n\n private getAlignSelf(): string {\n const alignMap: Record<string, string> = {\n auto: 'auto',\n start: 'flex-start',\n center: 'center',\n end: 'flex-end',\n stretch: 'stretch',\n baseline: 'baseline',\n };\n return alignMap[this.alignSelf] || 'auto';\n }\n\n private getContentAlign(): string {\n const alignMap: Record<string, string> = {\n start: 'flex-start',\n center: 'center',\n end: 'flex-end',\n stretch: 'stretch',\n };\n return alignMap[this.alignContent] || 'stretch';\n }\n\n private getContentJustify(): string {\n const justifyMap: Record<string, string> = {\n start: 'flex-start',\n center: 'center',\n end: 'flex-end',\n stretch: 'stretch',\n };\n return justifyMap[this.justifyContent] || 'flex-start';\n }\n\n render() {\n // Host styles for flex item behavior\n const hostStyle: { [key: string]: string } = {\n flexGrow: String(this.grow),\n flexShrink: String(this.shrink),\n flexBasis: this.basis,\n alignSelf: this.getAlignSelf(),\n };\n\n if (this.width) hostStyle.width = this.width;\n if (this.height) hostStyle.height = this.height;\n if (this.minWidth) hostStyle.minWidth = this.minWidth;\n if (this.maxWidth) hostStyle.maxWidth = this.maxWidth;\n if (this.minHeight) hostStyle.minHeight = this.minHeight;\n if (this.maxHeight) hostStyle.maxHeight = this.maxHeight;\n if (this.order !== undefined) hostStyle.order = String(this.order);\n\n // Inner content styles\n const contentStyle: { [key: string]: string } = {};\n\n if (this.padding) {\n contentStyle.padding = this.padding;\n }\n if (this.background) {\n contentStyle.background = this.background;\n }\n if (this.borderRadius) {\n contentStyle.borderRadius = this.borderRadius;\n }\n if (this.border) {\n contentStyle.border = this.border;\n }\n\n if (this.displayFlex) {\n contentStyle.display = 'flex';\n contentStyle.flexDirection = this.innerDirection === 'vertical' ? 'column' : 'row';\n contentStyle.alignItems = this.getContentAlign();\n contentStyle.justifyContent = this.getContentJustify();\n if (this.innerGap) {\n contentStyle.gap = this.innerGap;\n }\n }\n\n const hostClass = classnames({\n 'has-grow': this.grow > 0,\n 'display-flex': this.displayFlex,\n [`inner-${this.innerDirection}`]: this.displayFlex,\n });\n\n return (\n <Host style={hostStyle} class={hostClass}>\n \n <div class=\"box\" part=\"box\">\n <div class=\"content\" part=\"content\" style={contentStyle}>\n \n <slot></slot>\n \n </div>\n </div>\n \n </Host>\n );\n }\n}\n"],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../../dist/types/components";
2
+
3
+ interface LeButton extends Components.LeButton, HTMLElement {}
4
+ export const LeButton: {
5
+ prototype: LeButton;
6
+ new (): LeButton;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,9 @@
1
+ import { L as LeButton$1, d as defineCustomElement$1 } from './le-button2.js';
2
+
3
+ const LeButton = LeButton$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { LeButton, defineCustomElement };
7
+ //# sourceMappingURL=le-button.js.map
8
+
9
+ //# sourceMappingURL=le-button.js.map
@@ -0,0 +1 @@
1
+ {"file":"le-button.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -0,0 +1,121 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host, Fragment } from '@stencil/core/internal/client';
2
+ import { h as classnames } from './utils.js';
3
+
4
+ const leButtonDefaultCss = ":host{display:inline-block;--le-button-border-radius:var(--le-radius-md);--le-button-padding-x:0.4rem;--le-button-padding-y:0.4rem;--le-button-small-padding:0.25rem;--le-button-font-size:var(--le-font-size-md);--le-button-font-weight:var(--le-font-weight-medium);--le-button-transition:var(--le-transition-fast);--le-button-icon-aspect-ratio:1;--_btn-bg:var(--le-color-primary);--_btn-bg-hover:var(--le-color-primary-dark);--_btn-bg-system:var(--le-color-black);--_btn-color:var(--le-color-primary-contrast);--_btn-border-color:var(--le-color-primary)}:host([full-width]){display:block;width:100%}.button{display:inline-flex;align-items:center;justify-content:center;gap:var(--le-spacing-3);width:100%;padding:var(--le-button-padding-y) var(--le-button-padding-x);border:1px solid var(--_btn-border-color);border-radius:var(--le-button-border-radius);background:var(--_btn-bg);color:var(--_btn-color);font-family:var(--le-font-family-base);font-size:var(--le-button-font-size);font-weight:var(--le-button-font-weight);line-height:var(--le-line-height-tight);text-decoration:none;cursor:pointer;transition:background-color var(--le-button-transition) var(--le-transition-easing),\n border-color var(--le-button-transition) var(--le-transition-easing),\n box-shadow var(--le-button-transition) var(--le-transition-easing),\n transform var(--le-button-transition) var(--le-transition-easing)}.button:hover:not(:disabled){background:var(--_btn-bg-hover);border-color:var(--_btn-bg-hover)}.button:active:not(:disabled){transform:translateY(1px)}.button:focus-visible{outline:2px solid var(--le-color-focus);outline-offset:2px}.button:disabled{opacity:0.5;cursor:not-allowed}:host(.color-primary){--_btn-bg:var(--le-color-primary);--_btn-bg-hover:var(--le-color-primary-dark);--_btn-color:var(--le-color-primary-contrast);--_btn-border-color:var(--le-color-primary)}:host(.color-secondary){--_btn-bg:var(--le-color-secondary);--_btn-bg-hover:var(--le-color-secondary-dark);--_btn-color:var(--le-color-secondary-contrast);--_btn-border-color:var(--le-color-secondary)}:host(.color-success){--_btn-bg:var(--le-color-success);--_btn-bg-hover:var(--le-color-success-dark);--_btn-color:var(--le-color-success-contrast);--_btn-border-color:var(--le-color-success)}:host(.color-warning){--_btn-bg:var(--le-color-warning);--_btn-bg-hover:var(--le-color-warning-dark);--_btn-color:var(--le-color-warning-contrast);--_btn-border-color:var(--le-color-warning)}:host(.color-danger){--_btn-bg:var(--le-color-danger);--_btn-bg-hover:var(--le-color-danger-dark);--_btn-color:var(--le-color-danger-contrast);--_btn-border-color:var(--le-color-danger)}:host(.color-info){--_btn-bg:var(--le-color-info);--_btn-bg-hover:var(--le-color-info-dark);--_btn-color:var(--le-color-info-contrast);--_btn-border-color:var(--le-color-info)}:host(.variant-solid) .button{box-shadow:var(--le-shadow-sm)}:host(.variant-solid) .button:hover:not(:disabled){box-shadow:var(--le-shadow-md)}:host(.variant-outlined) .button{background:transparent;color:var(--_btn-bg);border-color:var(--_btn-border-color)}:host(.variant-outlined) .button:hover:not(:disabled){background:var(--_btn-bg);color:var(--_btn-color)}:host(.variant-clear) .button{background:transparent;color:var(--_btn-bg);border-color:transparent}:host(.variant-clear) .button:hover:not(:disabled){background:var(--le-color-gray-100);border-color:transparent}:host(.variant-system) .button{background:transparent;color:var(--_btn-bg-system);border-color:transparent}:host(.size-small) .button{--le-button-padding-x:0.4rem;--le-button-padding-y:0.3rem;--le-button-padding-top:0.35rem;--le-button-font-size:var(--le-button-small-font-size, var(--le-font-size-xs))}:host(.size-large) .button{--le-button-padding-x:0.9rem;--le-button-padding-y:0.6rem;--le-button-font-size:var(--le-font-size-xl)}:host(.full-width){display:block;width:100%}:host(.selected) .button{box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.2)}:host(.variant-outlined.selected) .button,:host(.variant-clear.selected) .button{background:var(--_btn-bg);color:var(--_btn-color)}:host(.icon-only) .button{padding:0.5rem;padding-bottom:0.6rem;aspect-ratio:var(--le-button-icon-aspect-ratio, 1)}:host(.icon-only.size-small) .button{padding:var(--le-button-small-padding, 0.25rem)}:host(.icon-only.size-large) .button{padding:0.75rem}:host(.icon-only) .content{display:none}.content{display:inline}.content:empty{display:none}.icon-start,.icon-only,.icon-end{display:flex;align-items:center;justify-content:center}.icon-start:empty,.icon-only:empty,.icon-end:empty{display:none}::slotted([slot=\"icon-start\"]),::slotted([slot=\"icon-only\"]),::slotted([slot=\"icon-end\"]){display:flex;align-items:center;justify-content:center;width:1.125em;height:1.125em}";
5
+
6
+ const LeButton = /*@__PURE__*/ proxyCustomElement(class LeButton extends HTMLElement {
7
+ constructor(registerHost) {
8
+ super();
9
+ if (registerHost !== false) {
10
+ this.__registerHost();
11
+ }
12
+ this.__attachShadow();
13
+ this.leClick = createEvent(this, "click", 7);
14
+ }
15
+ get el() { return this; }
16
+ /**
17
+ * Mode of the popover should be 'default' for internal use
18
+ */
19
+ mode;
20
+ /**
21
+ * Button variant style
22
+ * @allowedValues solid | outlined | clear
23
+ */
24
+ variant = 'solid';
25
+ /**
26
+ * Button color theme (uses theme semantic colors)
27
+ * @allowedValues primary | secondary | success | warning | danger | info
28
+ */
29
+ color = 'primary';
30
+ /**
31
+ * Button size
32
+ * @allowedValues small | medium | large
33
+ */
34
+ size = 'medium';
35
+ /**
36
+ * Whether the button is in a selected/active state
37
+ */
38
+ selected = false;
39
+ /**
40
+ * Whether the button takes full width of its container
41
+ */
42
+ fullWidth = false;
43
+ /**
44
+ * Whether the button displays only an icon (square aspect ratio)
45
+ */
46
+ iconOnly = false;
47
+ /**
48
+ * Whether the button is disabled
49
+ */
50
+ disabled = false;
51
+ /**
52
+ * The button type attribute
53
+ * @allowedValues button | submit | reset
54
+ */
55
+ type = 'button';
56
+ /**
57
+ * Optional href to make the button act as a link
58
+ */
59
+ href;
60
+ /**
61
+ * Link target when href is set
62
+ */
63
+ target;
64
+ /**
65
+ * Emitted when the button is clicked.
66
+ * This is a custom event that wraps the native click but ensures the target is the le-button.
67
+ */
68
+ leClick;
69
+ handleClick = (event) => {
70
+ // We stop the internal button click from bubbling up
71
+ event.stopPropagation();
72
+ if (this.disabled) {
73
+ event.preventDefault();
74
+ return;
75
+ }
76
+ // And emit our own click event from the host element
77
+ this.leClick.emit(event);
78
+ };
79
+ render() {
80
+ const classes = classnames(`variant-${this.variant}`, `color-${this.color}`, `size-${this.size}`, {
81
+ 'selected': this.selected,
82
+ 'full-width': this.fullWidth,
83
+ 'icon-only': this.iconOnly,
84
+ 'disabled': this.disabled,
85
+ });
86
+ const TagType = this.href ? 'a' : 'button';
87
+ const attrs = this.href ? { href: this.href, target: this.target, role: 'button' } : { type: this.type, disabled: this.disabled };
88
+ return (h(Host, { key: 'b33f47d87026e4b76837f8ae9f7d51d22d1f86d9', class: classes }, h(TagType, { key: 'ad711cfb6c04e258761db1f724fdef2a67d91933', class: "button", part: "button", ...attrs, onClick: this.handleClick }, this.iconOnly ? (h("span", { class: "icon-start" }, h("slot", { name: "icon-only" }))) : (h(Fragment, null, h("span", { class: "icon-start" }, h("slot", { name: "icon-start" })), h("slot", null), h("span", { class: "icon-end" }, h("slot", { name: "icon-end" })))))));
89
+ }
90
+ static get style() { return leButtonDefaultCss; }
91
+ }, [769, "le-button", {
92
+ "mode": [1537],
93
+ "variant": [1],
94
+ "color": [1],
95
+ "size": [1],
96
+ "selected": [4],
97
+ "fullWidth": [516, "full-width"],
98
+ "iconOnly": [4, "icon-only"],
99
+ "disabled": [4],
100
+ "type": [1],
101
+ "href": [1],
102
+ "target": [1]
103
+ }]);
104
+ function defineCustomElement() {
105
+ if (typeof customElements === "undefined") {
106
+ return;
107
+ }
108
+ const components = ["le-button"];
109
+ components.forEach(tagName => { switch (tagName) {
110
+ case "le-button":
111
+ if (!customElements.get(tagName)) {
112
+ customElements.define(tagName, LeButton);
113
+ }
114
+ break;
115
+ } });
116
+ }
117
+
118
+ export { LeButton as L, defineCustomElement as d };
119
+ //# sourceMappingURL=le-button2.js.map
120
+
121
+ //# sourceMappingURL=le-button2.js.map
@@ -0,0 +1 @@
1
+ {"file":"le-button2.js","mappings":";;;AAAA,MAAM,kBAAkB,GAAG,woJAAwoJ;;MC2BtpJ,QAAQ,iBAAAA,kBAAA,CAAA,MAAA,QAAA,SAAA,WAAA,CAAA;;;;;;;;;;AAGnB;;AAEG;AACqC,IAAA,IAAI;AAE5C;;;AAGG;IACK,OAAO,GAA8C,OAAO;AAEpE;;;AAGG;IACK,KAAK,GAAwE,SAAS;AAE9F;;;AAGG;IACK,IAAI,GAAiC,QAAQ;AAErD;;AAEG;IACK,QAAQ,GAAY,KAAK;AAEjC;;AAEG;IACsB,SAAS,GAAY,KAAK;AAEnD;;AAEG;IACK,QAAQ,GAAY,KAAK;AAEjC;;AAEG;IACK,QAAQ,GAAY,KAAK;AAEjC;;;AAGG;IACK,IAAI,GAAkC,QAAQ;AAEtD;;AAEG;AACK,IAAA,IAAI;AAEZ;;AAEG;AACK,IAAA,MAAM;AAEd;;;AAGG;AAC4B,IAAA,OAAO;AAE9B,IAAA,WAAW,GAAG,CAAC,KAAmB,KAAI;;QAE5C,KAAK,CAAC,eAAe,EAAE;AAEvB,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,KAAK,CAAC,cAAc,EAAE;YACtB;;;AAIF,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;AAC1B,KAAC;IAED,MAAM,GAAA;QACJ,MAAM,OAAO,GAAG,UAAU,CAAC,WAAW,IAAI,CAAC,OAAO,CAAE,CAAA,EAAE,SAAS,IAAI,CAAC,KAAK,CAAE,CAAA,EAAE,QAAQ,IAAI,CAAC,IAAI,CAAA,CAAE,EAAE;YAChG,UAAU,EAAE,IAAI,CAAC,QAAQ;YACzB,YAAY,EAAE,IAAI,CAAC,SAAS;YAC5B,WAAW,EAAE,IAAI,CAAC,QAAQ;YAC1B,UAAU,EAAE,IAAI,CAAC,QAAQ;AAC1B,SAAA,CAAC;AAEF,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,QAAQ;AAC1C,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE;AAEjI,QAAA,QACE,CAAC,CAAA,IAAI,EAAE,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,OAAO,EAAA,EACnB,CAAA,CAAC,OAAO,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAA,GAAK,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,WAAW,EAAA,EACvE,IAAI,CAAC,QAAQ,IACZ,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,YAAY,EAAA,EACtB,CAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,WAAW,EAAQ,CAAA,CACzB,KAEP,CAAA,CAAC,QAAQ,EAAA,IAAA,EACP,CAAM,CAAA,MAAA,EAAA,EAAA,KAAK,EAAC,YAAY,EAAA,EACtB,CAAA,CAAA,MAAA,EAAA,EAAM,IAAI,EAAC,YAAY,EAAA,CAAQ,CAC1B,EAEL,CAAa,CAAA,MAAA,EAAA,IAAA,CAAA,EAEf,CAAM,CAAA,MAAA,EAAA,EAAA,KAAK,EAAC,UAAU,EAAA,EACpB,CAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,UAAU,EAAQ,CAAA,CACxB,CACE,CACZ,CACO,CACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement"],"sources":["src-core/components/le-button/le-button.default.css?tag=le-button&encapsulation=shadow","src-core/components/le-button/le-button.tsx"],"sourcesContent":["/**\n * Default mode styles for le-button\n * Uses global design tokens with component-specific overrides\n */\n:host {\n display: inline-block;\n \n /* Component-specific tokens */\n --le-button-border-radius: var(--le-radius-md);\n --le-button-padding-x: 0.4rem;\n --le-button-padding-y: 0.4rem;\n --le-button-small-padding: 0.25rem;\n --le-button-font-size: var(--le-font-size-md);\n --le-button-font-weight: var(--le-font-weight-medium);\n --le-button-transition: var(--le-transition-fast);\n --le-button-icon-aspect-ratio: 1;\n \n /* Internal state variables - set by color classes */\n --_btn-bg: var(--le-color-primary);\n --_btn-bg-hover: var(--le-color-primary-dark);\n --_btn-bg-system: var(--le-color-black);\n --_btn-color: var(--le-color-primary-contrast);\n --_btn-border-color: var(--le-color-primary);\n}\n\n:host([full-width]) {\n display: block;\n width: 100%;\n}\n\n.button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--le-spacing-3);\n width: 100%;\n padding: var(--le-button-padding-y) var(--le-button-padding-x);\n border: 1px solid var(--_btn-border-color);\n border-radius: var(--le-button-border-radius);\n background: var(--_btn-bg);\n color: var(--_btn-color);\n font-family: var(--le-font-family-base);\n font-size: var(--le-button-font-size);\n font-weight: var(--le-button-font-weight);\n line-height: var(--le-line-height-tight);\n text-decoration: none;\n cursor: pointer;\n transition: \n background-color var(--le-button-transition) var(--le-transition-easing),\n border-color var(--le-button-transition) var(--le-transition-easing),\n box-shadow var(--le-button-transition) var(--le-transition-easing),\n transform var(--le-button-transition) var(--le-transition-easing);\n}\n\n.button:hover:not(:disabled) {\n background: var(--_btn-bg-hover);\n border-color: var(--_btn-bg-hover);\n}\n\n.button:active:not(:disabled) {\n transform: translateY(1px);\n}\n\n.button:focus-visible {\n outline: 2px solid var(--le-color-focus);\n outline-offset: 2px;\n}\n\n.button:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* ===========================================\n * COLOR VARIANTS - Use theme semantic colors\n * =========================================== */\n\n/* Primary (default) */\n:host(.color-primary) {\n --_btn-bg: var(--le-color-primary);\n --_btn-bg-hover: var(--le-color-primary-dark);\n --_btn-color: var(--le-color-primary-contrast);\n --_btn-border-color: var(--le-color-primary);\n}\n\n/* Secondary */\n:host(.color-secondary) {\n --_btn-bg: var(--le-color-secondary);\n --_btn-bg-hover: var(--le-color-secondary-dark);\n --_btn-color: var(--le-color-secondary-contrast);\n --_btn-border-color: var(--le-color-secondary);\n}\n\n/* Success */\n:host(.color-success) {\n --_btn-bg: var(--le-color-success);\n --_btn-bg-hover: var(--le-color-success-dark);\n --_btn-color: var(--le-color-success-contrast);\n --_btn-border-color: var(--le-color-success);\n}\n\n/* Warning */\n:host(.color-warning) {\n --_btn-bg: var(--le-color-warning);\n --_btn-bg-hover: var(--le-color-warning-dark);\n --_btn-color: var(--le-color-warning-contrast);\n --_btn-border-color: var(--le-color-warning);\n}\n\n/* Danger */\n:host(.color-danger) {\n --_btn-bg: var(--le-color-danger);\n --_btn-bg-hover: var(--le-color-danger-dark);\n --_btn-color: var(--le-color-danger-contrast);\n --_btn-border-color: var(--le-color-danger);\n}\n\n/* Info */\n:host(.color-info) {\n --_btn-bg: var(--le-color-info);\n --_btn-bg-hover: var(--le-color-info-dark);\n --_btn-color: var(--le-color-info-contrast);\n --_btn-border-color: var(--le-color-info);\n}\n\n/* ===========================================\n * STYLE VARIANTS\n * =========================================== */\n\n/* Solid (default) - already styled by color classes */\n:host(.variant-solid) .button {\n box-shadow: var(--le-shadow-sm);\n}\n\n:host(.variant-solid) .button:hover:not(:disabled) {\n box-shadow: var(--le-shadow-md);\n}\n\n/* Outlined */\n:host(.variant-outlined) .button {\n background: transparent;\n color: var(--_btn-bg);\n border-color: var(--_btn-border-color);\n}\n\n:host(.variant-outlined) .button:hover:not(:disabled) {\n background: var(--_btn-bg);\n color: var(--_btn-color);\n}\n\n/* Clear (ghost) */\n:host(.variant-clear) .button {\n background: transparent;\n color: var(--_btn-bg);\n border-color: transparent;\n}\n\n:host(.variant-clear) .button:hover:not(:disabled) {\n background: var(--le-color-gray-100);\n border-color: transparent;\n}\n\n/* System (controls without access) */\n:host(.variant-system) .button {\n background: transparent;\n color: var(--_btn-bg-system);\n border-color: transparent;\n}\n\n/* ===========================================\n * SIZES\n * =========================================== */\n:host(.size-small) .button {\n --le-button-padding-x: 0.4rem;\n --le-button-padding-y: 0.3rem;\n --le-button-padding-top: 0.35rem;\n --le-button-font-size: var(--le-button-small-font-size, var(--le-font-size-xs));\n}\n\n:host(.size-large) .button {\n --le-button-padding-x: 0.9rem;\n --le-button-padding-y: 0.6rem;\n --le-button-font-size: var(--le-font-size-xl);\n}\n\n/* ===========================================\n * STATES & MODIFIERS\n * =========================================== */\n\n/* Full width */\n:host(.full-width) {\n display: block;\n width: 100%;\n}\n\n/* Selected state */\n:host(.selected) .button {\n box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);\n}\n\n:host(.variant-outlined.selected) .button,\n:host(.variant-clear.selected) .button {\n background: var(--_btn-bg);\n color: var(--_btn-color);\n}\n\n/* Icon only */\n:host(.icon-only) .button {\n padding: 0.5rem;\n padding-bottom: 0.6rem;\n aspect-ratio: var(--le-button-icon-aspect-ratio, 1);\n}\n\n:host(.icon-only.size-small) .button {\n padding: var(--le-button-small-padding, 0.25rem);\n}\n\n:host(.icon-only.size-large) .button {\n padding: 0.75rem;\n}\n\n/* Hide content in icon-only mode */\n:host(.icon-only) .content {\n display: none;\n}\n\n/* ===========================================\n * CONTENT (le-slot wrapper)\n * =========================================== */\n.content {\n display: inline;\n}\n\n.content:empty {\n display: none;\n}\n\n/* ===========================================\n * ICON WRAPPERS & SLOTS\n * =========================================== */\n.icon-start,\n.icon-only,\n.icon-end {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.icon-start:empty,\n.icon-only:empty,\n.icon-end:empty {\n display: none;\n}\n\n::slotted([slot=\"icon-start\"]),\n::slotted([slot=\"icon-only\"]),\n::slotted([slot=\"icon-end\"]) {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1.125em;\n height: 1.125em;\n}\n","import { Component, Prop, h, Element, Fragment, Event, EventEmitter , Host } from '@stencil/core';\nimport { classnames } from '../../utils/utils';\n\n/**\n * A flexible button component with multiple variants and states.\n *\n * @slot - Button text content\n * @slot icon-start - Icon before the text\n * @slot icon-end - Icon after the text\n *\n * @cssprop --le-button-bg - Button background color\n * @cssprop --le-button-color - Button text color\n * @cssprop --le-button-border-radius - Button border radius\n * @cssprop --le-button-padding-x - Button horizontal padding\n * @cssprop --le-button-padding-y - Button vertical padding\n *\n * @csspart button - The native button element\n * @csspart content - The button content wrapper\n *\n * @cmsEditable true\n * @cmsCategory Actions\n */\n@Component({\n tag: 'le-button',\n styleUrl: 'le-button.default.css',\n shadow: true,\n})\nexport class LeButton {\n @Element() el: HTMLElement;\n\n /**\n * Mode of the popover should be 'default' for internal use\n */\n @Prop({ mutable: true, reflect: true }) mode: 'default' | 'admin';\n\n /**\n * Button variant style\n * @allowedValues solid | outlined | clear\n */\n @Prop() variant: 'solid' | 'outlined' | 'clear' | 'system' = 'solid';\n\n /**\n * Button color theme (uses theme semantic colors)\n * @allowedValues primary | secondary | success | warning | danger | info\n */\n @Prop() color: 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' = 'primary';\n\n /**\n * Button size\n * @allowedValues small | medium | large\n */\n @Prop() size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Whether the button is in a selected/active state\n */\n @Prop() selected: boolean = false;\n\n /**\n * Whether the button takes full width of its container\n */\n @Prop({ reflect: true }) fullWidth: boolean = false;\n\n /**\n * Whether the button displays only an icon (square aspect ratio)\n */\n @Prop() iconOnly: boolean = false;\n\n /**\n * Whether the button is disabled\n */\n @Prop() disabled: boolean = false;\n\n /**\n * The button type attribute\n * @allowedValues button | submit | reset\n */\n @Prop() type: 'button' | 'submit' | 'reset' = 'button';\n\n /**\n * Optional href to make the button act as a link\n */\n @Prop() href?: string;\n\n /**\n * Link target when href is set\n */\n @Prop() target?: string;\n\n /**\n * Emitted when the button is clicked.\n * This is a custom event that wraps the native click but ensures the target is the le-button.\n */\n @Event({ eventName: 'click' }) leClick: EventEmitter<PointerEvent>;\n\n private handleClick = (event: PointerEvent) => {\n // We stop the internal button click from bubbling up\n event.stopPropagation();\n\n if (this.disabled) {\n event.preventDefault();\n return;\n }\n \n // And emit our own click event from the host element\n this.leClick.emit(event);\n };\n\n render() {\n const classes = classnames(`variant-${this.variant}`, `color-${this.color}`, `size-${this.size}`, {\n 'selected': this.selected,\n 'full-width': this.fullWidth,\n 'icon-only': this.iconOnly,\n 'disabled': this.disabled,\n });\n\n const TagType = this.href ? 'a' : 'button';\n const attrs = this.href ? { href: this.href, target: this.target, role: 'button' } : { type: this.type, disabled: this.disabled };\n\n return (\n <Host class={classes}>\n <TagType class=\"button\" part=\"button\" {...attrs} onClick={this.handleClick}>\n {this.iconOnly ? (\n <span class=\"icon-start\">\n <slot name=\"icon-only\"></slot>\n </span>\n ) : (\n <Fragment>\n <span class=\"icon-start\">\n <slot name=\"icon-start\"></slot>\n </span>\n \n <slot></slot>\n \n <span class=\"icon-end\">\n <slot name=\"icon-end\"></slot>\n </span>\n </Fragment>\n )}\n </TagType>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../../dist/types/components";
2
+
3
+ interface LeCard extends Components.LeCard, HTMLElement {}
4
+ export const LeCard: {
5
+ prototype: LeCard;
6
+ new (): LeCard;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;