le-kit 0.1.4 → 0.1.5

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 (198) hide show
  1. package/dist/le-kit/assets/custom-elements.json +4305 -0
  2. package/dist/le-kit/index-Da-89pOc.js +4522 -0
  3. package/dist/le-kit/{index-D21JjI31.js.map → index-Da-89pOc.js.map} +1 -1
  4. package/dist/le-kit/index.esm.js +116 -2
  5. package/dist/le-kit/index.esm.js.map +1 -1
  6. package/dist/{esm → le-kit}/le-box.entry.js +3 -3
  7. package/dist/le-kit/le-button.entry.esm.js.map +1 -0
  8. package/dist/le-kit/le-button.entry.js +90 -0
  9. package/dist/{esm → le-kit}/le-card.entry.js +3 -3
  10. package/dist/le-kit/le-checkbox.entry.esm.js.map +1 -0
  11. package/dist/le-kit/le-checkbox.entry.js +59 -0
  12. package/dist/le-kit/le-component.entry.esm.js.map +1 -0
  13. package/dist/{collection/components/le-component/le-component.js → le-kit/le-component.entry.js} +19 -134
  14. package/dist/le-kit/le-kit.css +1010 -1
  15. package/dist/le-kit/le-kit.esm.js +48 -2
  16. package/dist/le-kit/le-kit.esm.js.map +1 -1
  17. package/dist/{esm → le-kit}/le-number-input.entry.js +5 -5
  18. package/dist/le-kit/le-popover.entry.esm.js.map +1 -0
  19. package/dist/{components/le-popover2.js → le-kit/le-popover.entry.js} +9 -45
  20. package/dist/{esm → le-kit}/le-popup.entry.js +6 -6
  21. package/dist/{esm → le-kit}/le-round-progress.entry.js +2 -2
  22. package/dist/le-kit/le-slot.entry.esm.js.map +1 -0
  23. package/dist/{collection/components/le-slot/le-slot.js → le-kit/le-slot.entry.js} +30 -279
  24. package/dist/{esm → le-kit}/le-stack.entry.js +3 -3
  25. package/dist/le-kit/le-string-input.entry.esm.js.map +1 -0
  26. package/dist/le-kit/le-string-input.entry.js +93 -0
  27. package/dist/{esm → le-kit}/le-text.entry.js +3 -3
  28. package/dist/{esm → le-kit}/le-turntable.entry.js +2 -2
  29. package/dist/{esm/utils-CJLZrrdC.js → le-kit/utils-FDOApZ53.js} +3 -3
  30. package/dist/le-kit/{utils-apol-Xc_.js.map → utils-FDOApZ53.js.map} +1 -1
  31. package/package.json +1 -1
  32. package/dist/cjs/index-CO4npcak.js +0 -1796
  33. package/dist/cjs/index-CO4npcak.js.map +0 -1
  34. package/dist/cjs/index.cjs.js +0 -117
  35. package/dist/cjs/index.cjs.js.map +0 -1
  36. package/dist/cjs/le-box.cjs.entry.js +0 -184
  37. package/dist/cjs/le-box.entry.cjs.js.map +0 -1
  38. package/dist/cjs/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.cjs.js.map +0 -1
  39. package/dist/cjs/le-button_6.cjs.entry.js +0 -1199
  40. package/dist/cjs/le-card.cjs.entry.js +0 -29
  41. package/dist/cjs/le-card.entry.cjs.js.map +0 -1
  42. package/dist/cjs/le-kit.cjs.js +0 -25
  43. package/dist/cjs/le-kit.cjs.js.map +0 -1
  44. package/dist/cjs/le-number-input.cjs.entry.js +0 -202
  45. package/dist/cjs/le-number-input.entry.cjs.js.map +0 -1
  46. package/dist/cjs/le-popup.cjs.entry.js +0 -212
  47. package/dist/cjs/le-popup.entry.cjs.js.map +0 -1
  48. package/dist/cjs/le-round-progress.cjs.entry.js +0 -106
  49. package/dist/cjs/le-round-progress.entry.cjs.js.map +0 -1
  50. package/dist/cjs/le-stack.cjs.entry.js +0 -135
  51. package/dist/cjs/le-stack.entry.cjs.js.map +0 -1
  52. package/dist/cjs/le-text.cjs.entry.js +0 -335
  53. package/dist/cjs/le-text.entry.cjs.js.map +0 -1
  54. package/dist/cjs/le-turntable.cjs.entry.js +0 -139
  55. package/dist/cjs/le-turntable.entry.cjs.js.map +0 -1
  56. package/dist/cjs/loader.cjs.js +0 -13
  57. package/dist/cjs/loader.cjs.js.map +0 -1
  58. package/dist/cjs/utils-BeT0iyCQ.js +0 -152
  59. package/dist/cjs/utils-BeT0iyCQ.js.map +0 -1
  60. package/dist/collection/collection-manifest.json +0 -26
  61. package/dist/collection/components/le-box/le-box.default.css +0 -37
  62. package/dist/collection/components/le-box/le-box.js +0 -614
  63. package/dist/collection/components/le-box/le-box.js.map +0 -1
  64. package/dist/collection/components/le-button/le-button.default.css +0 -263
  65. package/dist/collection/components/le-button/le-button.js +0 -368
  66. package/dist/collection/components/le-button/le-button.js.map +0 -1
  67. package/dist/collection/components/le-card/le-card.default.css +0 -74
  68. package/dist/collection/components/le-card/le-card.js +0 -102
  69. package/dist/collection/components/le-card/le-card.js.map +0 -1
  70. package/dist/collection/components/le-checkbox/le-checkbox.css +0 -93
  71. package/dist/collection/components/le-checkbox/le-checkbox.js +0 -192
  72. package/dist/collection/components/le-checkbox/le-checkbox.js.map +0 -1
  73. package/dist/collection/components/le-component/le-component.css +0 -189
  74. package/dist/collection/components/le-component/le-component.js.map +0 -1
  75. package/dist/collection/components/le-number-input/le-number-input.css +0 -135
  76. package/dist/collection/components/le-number-input/le-number-input.js +0 -515
  77. package/dist/collection/components/le-number-input/le-number-input.js.map +0 -1
  78. package/dist/collection/components/le-popover/le-popover.css +0 -143
  79. package/dist/collection/components/le-popover/le-popover.js +0 -693
  80. package/dist/collection/components/le-popover/le-popover.js.map +0 -1
  81. package/dist/collection/components/le-popup/le-popup.api.js +0 -101
  82. package/dist/collection/components/le-popup/le-popup.api.js.map +0 -1
  83. package/dist/collection/components/le-popup/le-popup.css +0 -222
  84. package/dist/collection/components/le-popup/le-popup.js +0 -596
  85. package/dist/collection/components/le-popup/le-popup.js.map +0 -1
  86. package/dist/collection/components/le-round-progress/le-round-progress.css +0 -34
  87. package/dist/collection/components/le-round-progress/le-round-progress.js +0 -184
  88. package/dist/collection/components/le-round-progress/le-round-progress.js.map +0 -1
  89. package/dist/collection/components/le-slot/le-slot.default.css +0 -222
  90. package/dist/collection/components/le-slot/le-slot.js.map +0 -1
  91. package/dist/collection/components/le-stack/le-stack.default.css +0 -37
  92. package/dist/collection/components/le-stack/le-stack.js +0 -389
  93. package/dist/collection/components/le-stack/le-stack.js.map +0 -1
  94. package/dist/collection/components/le-string-input/le-string-input.css +0 -83
  95. package/dist/collection/components/le-string-input/le-string-input.js +0 -359
  96. package/dist/collection/components/le-string-input/le-string-input.js.map +0 -1
  97. package/dist/collection/components/le-text/le-text.default.css +0 -169
  98. package/dist/collection/components/le-text/le-text.js +0 -475
  99. package/dist/collection/components/le-text/le-text.js.map +0 -1
  100. package/dist/collection/components/le-turntable/le-turntable.css +0 -10
  101. package/dist/collection/components/le-turntable/le-turntable.js +0 -210
  102. package/dist/collection/components/le-turntable/le-turntable.js.map +0 -1
  103. package/dist/collection/global/app.js +0 -130
  104. package/dist/collection/global/app.js.map +0 -1
  105. package/dist/collection/index.js +0 -15
  106. package/dist/collection/index.js.map +0 -1
  107. package/dist/collection/types/blocks.js +0 -115
  108. package/dist/collection/types/blocks.js.map +0 -1
  109. package/dist/collection/types/options.js +0 -2
  110. package/dist/collection/types/options.js.map +0 -1
  111. package/dist/collection/utils/utils.js +0 -141
  112. package/dist/collection/utils/utils.js.map +0 -1
  113. package/dist/components/index.js +0 -127
  114. package/dist/components/index.js.map +0 -1
  115. package/dist/components/le-box.js +0 -256
  116. package/dist/components/le-box.js.map +0 -1
  117. package/dist/components/le-button.js +0 -9
  118. package/dist/components/le-button.js.map +0 -1
  119. package/dist/components/le-button2.js +0 -1408
  120. package/dist/components/le-button2.js.map +0 -1
  121. package/dist/components/le-card.js +0 -83
  122. package/dist/components/le-card.js.map +0 -1
  123. package/dist/components/le-checkbox.js +0 -9
  124. package/dist/components/le-checkbox.js.map +0 -1
  125. package/dist/components/le-component.js +0 -9
  126. package/dist/components/le-component.js.map +0 -1
  127. package/dist/components/le-number-input.js +0 -271
  128. package/dist/components/le-number-input.js.map +0 -1
  129. package/dist/components/le-popover.js +0 -9
  130. package/dist/components/le-popover.js.map +0 -1
  131. package/dist/components/le-popover2.js.map +0 -1
  132. package/dist/components/le-popup.js +0 -279
  133. package/dist/components/le-popup.js.map +0 -1
  134. package/dist/components/le-round-progress.js +0 -135
  135. package/dist/components/le-round-progress.js.map +0 -1
  136. package/dist/components/le-slot.js +0 -9
  137. package/dist/components/le-slot.js.map +0 -1
  138. package/dist/components/le-stack.js +0 -198
  139. package/dist/components/le-stack.js.map +0 -1
  140. package/dist/components/le-string-input.js +0 -9
  141. package/dist/components/le-string-input.js.map +0 -1
  142. package/dist/components/le-text.js +0 -398
  143. package/dist/components/le-text.js.map +0 -1
  144. package/dist/components/le-turntable.js +0 -164
  145. package/dist/components/le-turntable.js.map +0 -1
  146. package/dist/docs.d.ts +0 -443
  147. package/dist/docs.json +0 -5185
  148. package/dist/esm/index-D71TXvJa.js +0 -1781
  149. package/dist/esm/index-D71TXvJa.js.map +0 -1
  150. package/dist/esm/index.js +0 -106
  151. package/dist/esm/index.js.map +0 -1
  152. package/dist/esm/le-box.entry.js.map +0 -1
  153. package/dist/esm/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.js.map +0 -1
  154. package/dist/esm/le-button_6.entry.js +0 -1192
  155. package/dist/esm/le-card.entry.js.map +0 -1
  156. package/dist/esm/le-kit.js +0 -21
  157. package/dist/esm/le-kit.js.map +0 -1
  158. package/dist/esm/le-number-input.entry.js.map +0 -1
  159. package/dist/esm/le-popup.entry.js.map +0 -1
  160. package/dist/esm/le-round-progress.entry.js.map +0 -1
  161. package/dist/esm/le-stack.entry.js.map +0 -1
  162. package/dist/esm/le-text.entry.js.map +0 -1
  163. package/dist/esm/le-turntable.entry.js.map +0 -1
  164. package/dist/esm/loader.js +0 -11
  165. package/dist/esm/loader.js.map +0 -1
  166. package/dist/esm/utils-CJLZrrdC.js.map +0 -1
  167. package/dist/index.cjs.js +0 -1
  168. package/dist/index.js +0 -1
  169. package/dist/le-kit/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.esm.js.map +0 -1
  170. package/dist/le-kit/p-024a764e.entry.js +0 -2
  171. package/dist/le-kit/p-024a764e.entry.js.map +0 -1
  172. package/dist/le-kit/p-073cf0b9.entry.js +0 -2
  173. package/dist/le-kit/p-073cf0b9.entry.js.map +0 -1
  174. package/dist/le-kit/p-0955b105.entry.js +0 -2
  175. package/dist/le-kit/p-0955b105.entry.js.map +0 -1
  176. package/dist/le-kit/p-18d79ee2.entry.js +0 -2
  177. package/dist/le-kit/p-18d79ee2.entry.js.map +0 -1
  178. package/dist/le-kit/p-4b1d3b6d.entry.js +0 -2
  179. package/dist/le-kit/p-4b1d3b6d.entry.js.map +0 -1
  180. package/dist/le-kit/p-79d179bd.entry.js +0 -2
  181. package/dist/le-kit/p-79d179bd.entry.js.map +0 -1
  182. package/dist/le-kit/p-D71TXvJa.js +0 -3
  183. package/dist/le-kit/p-D71TXvJa.js.map +0 -1
  184. package/dist/le-kit/p-c8a9288e.entry.js +0 -2
  185. package/dist/le-kit/p-c8a9288e.entry.js.map +0 -1
  186. package/dist/le-kit/p-cfc35bd3.entry.js +0 -2
  187. package/dist/le-kit/p-cfc35bd3.entry.js.map +0 -1
  188. package/dist/le-kit/p-d04da1f5.entry.js +0 -2
  189. package/dist/le-kit/p-d04da1f5.entry.js.map +0 -1
  190. package/dist/le-kit/p-qIai5-eB.js +0 -2
  191. package/dist/le-kit/p-qIai5-eB.js.map +0 -1
  192. package/dist/themes/base.css +0 -89
  193. package/dist/themes/dark.css +0 -100
  194. package/dist/themes/default.css +0 -108
  195. package/dist/themes/gradient.css +0 -100
  196. package/dist/themes/index.css +0 -413
  197. package/dist/themes/minimal.css +0 -100
  198. package/dist/themes/warm.css +0 -100
@@ -1,263 +0,0 @@
1
- /**
2
- * Default mode styles for le-button
3
- * Uses global design tokens with component-specific overrides
4
- */
5
- :host {
6
- display: inline-block;
7
-
8
- /* Component-specific tokens */
9
- --le-button-border-radius: var(--le-radius-md);
10
- --le-button-padding-x: 0.4rem;
11
- --le-button-padding-y: 0.4rem;
12
- --le-button-small-padding: 0.25rem;
13
- --le-button-font-size: var(--le-font-size-md);
14
- --le-button-font-weight: var(--le-font-weight-medium);
15
- --le-button-transition: var(--le-transition-fast);
16
- --le-button-icon-aspect-ratio: 1;
17
-
18
- /* Internal state variables - set by color classes */
19
- --_btn-bg: var(--le-color-primary);
20
- --_btn-bg-hover: var(--le-color-primary-dark);
21
- --_btn-bg-system: var(--le-color-black);
22
- --_btn-color: var(--le-color-primary-contrast);
23
- --_btn-border-color: var(--le-color-primary);
24
- }
25
-
26
- :host([full-width]) {
27
- display: block;
28
- width: 100%;
29
- }
30
-
31
- .button {
32
- display: inline-flex;
33
- align-items: center;
34
- justify-content: center;
35
- gap: var(--le-spacing-3);
36
- width: 100%;
37
- padding: var(--le-button-padding-y) var(--le-button-padding-x);
38
- border: 1px solid var(--_btn-border-color);
39
- border-radius: var(--le-button-border-radius);
40
- background: var(--_btn-bg);
41
- color: var(--_btn-color);
42
- font-family: var(--le-font-family-base);
43
- font-size: var(--le-button-font-size);
44
- font-weight: var(--le-button-font-weight);
45
- line-height: var(--le-line-height-tight);
46
- text-decoration: none;
47
- cursor: pointer;
48
- transition:
49
- background-color var(--le-button-transition) var(--le-transition-easing),
50
- border-color var(--le-button-transition) var(--le-transition-easing),
51
- box-shadow var(--le-button-transition) var(--le-transition-easing),
52
- transform var(--le-button-transition) var(--le-transition-easing);
53
- }
54
-
55
- .button:hover:not(:disabled) {
56
- background: var(--_btn-bg-hover);
57
- border-color: var(--_btn-bg-hover);
58
- }
59
-
60
- .button:active:not(:disabled) {
61
- transform: translateY(1px);
62
- }
63
-
64
- .button:focus-visible {
65
- outline: 2px solid var(--le-color-focus);
66
- outline-offset: 2px;
67
- }
68
-
69
- .button:disabled {
70
- opacity: 0.5;
71
- cursor: not-allowed;
72
- }
73
-
74
- /* ===========================================
75
- * COLOR VARIANTS - Use theme semantic colors
76
- * =========================================== */
77
-
78
- /* Primary (default) */
79
- :host > le-component.color-primary {
80
- --_btn-bg: var(--le-color-primary);
81
- --_btn-bg-hover: var(--le-color-primary-dark);
82
- --_btn-color: var(--le-color-primary-contrast);
83
- --_btn-border-color: var(--le-color-primary);
84
- }
85
-
86
- /* Secondary */
87
- :host > le-component.color-secondary {
88
- --_btn-bg: var(--le-color-secondary);
89
- --_btn-bg-hover: var(--le-color-secondary-dark);
90
- --_btn-color: var(--le-color-secondary-contrast);
91
- --_btn-border-color: var(--le-color-secondary);
92
- }
93
-
94
- /* Success */
95
- :host > le-component.color-success {
96
- --_btn-bg: var(--le-color-success);
97
- --_btn-bg-hover: var(--le-color-success-dark);
98
- --_btn-color: var(--le-color-success-contrast);
99
- --_btn-border-color: var(--le-color-success);
100
- }
101
-
102
- /* Warning */
103
- :host > le-component.color-warning {
104
- --_btn-bg: var(--le-color-warning);
105
- --_btn-bg-hover: var(--le-color-warning-dark);
106
- --_btn-color: var(--le-color-warning-contrast);
107
- --_btn-border-color: var(--le-color-warning);
108
- }
109
-
110
- /* Danger */
111
- :host > le-component.color-danger {
112
- --_btn-bg: var(--le-color-danger);
113
- --_btn-bg-hover: var(--le-color-danger-dark);
114
- --_btn-color: var(--le-color-danger-contrast);
115
- --_btn-border-color: var(--le-color-danger);
116
- }
117
-
118
- /* Info */
119
- :host > le-component.color-info {
120
- --_btn-bg: var(--le-color-info);
121
- --_btn-bg-hover: var(--le-color-info-dark);
122
- --_btn-color: var(--le-color-info-contrast);
123
- --_btn-border-color: var(--le-color-info);
124
- }
125
-
126
- /* ===========================================
127
- * STYLE VARIANTS
128
- * =========================================== */
129
-
130
- /* Solid (default) - already styled by color classes */
131
- :host > le-component.variant-solid .button {
132
- box-shadow: var(--le-shadow-sm);
133
- }
134
-
135
- :host > le-component.variant-solid .button:hover:not(:disabled) {
136
- box-shadow: var(--le-shadow-md);
137
- }
138
-
139
- /* Outlined */
140
- :host > le-component.variant-outlined .button {
141
- background: transparent;
142
- color: var(--_btn-bg);
143
- border-color: var(--_btn-border-color);
144
- }
145
-
146
- :host > le-component.variant-outlined .button:hover:not(:disabled) {
147
- background: var(--_btn-bg);
148
- color: var(--_btn-color);
149
- }
150
-
151
- /* Clear (ghost) */
152
- :host > le-component.variant-clear .button {
153
- background: transparent;
154
- color: var(--_btn-bg);
155
- border-color: transparent;
156
- }
157
-
158
- :host > le-component.variant-clear .button:hover:not(:disabled) {
159
- background: var(--le-color-gray-100);
160
- border-color: transparent;
161
- }
162
-
163
- /* System (controls without access) */
164
- :host > le-component.variant-system .button {
165
- background: transparent;
166
- color: var(--_btn-bg-system);
167
- border-color: transparent;
168
- }
169
-
170
- /* ===========================================
171
- * SIZES
172
- * =========================================== */
173
- :host > le-component.size-small .button {
174
- --le-button-padding-x: 0.4rem;
175
- --le-button-padding-y: 0.3rem;
176
- --le-button-padding-top: 0.35rem;
177
- --le-button-font-size: var(--le-button-small-font-size, var(--le-font-size-xs));
178
- }
179
-
180
- :host > le-component.size-large .button {
181
- --le-button-padding-x: 0.9rem;
182
- --le-button-padding-y: 0.6rem;
183
- --le-button-font-size: var(--le-font-size-xl);
184
- }
185
-
186
- /* ===========================================
187
- * STATES & MODIFIERS
188
- * =========================================== */
189
-
190
- /* Full width */
191
- :host > le-component.full-width {
192
- display: block;
193
- width: 100%;
194
- }
195
-
196
- /* Selected state */
197
- :host > le-component.selected .button {
198
- box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
199
- }
200
-
201
- :host > le-component.variant-outlined.selected .button,
202
- :host > le-component.variant-clear.selected .button {
203
- background: var(--_btn-bg);
204
- color: var(--_btn-color);
205
- }
206
-
207
- /* Icon only */
208
- :host > le-component.icon-only .button {
209
- padding: 0.5rem;
210
- padding-bottom: 0.6rem;
211
- aspect-ratio: var(--le-button-icon-aspect-ratio, 1);
212
- }
213
-
214
- :host > le-component.icon-only.size-small .button {
215
- padding: var(--le-button-small-padding, 0.25rem);
216
- }
217
-
218
- :host > le-component.icon-only.size-large .button {
219
- padding: 0.75rem;
220
- }
221
-
222
- /* Hide content in icon-only mode */
223
- :host > le-component.icon-only .content {
224
- display: none;
225
- }
226
-
227
- /* ===========================================
228
- * CONTENT (le-slot wrapper)
229
- * =========================================== */
230
- .content {
231
- display: inline;
232
- }
233
-
234
- .content:empty {
235
- display: none;
236
- }
237
-
238
- /* ===========================================
239
- * ICON WRAPPERS & SLOTS
240
- * =========================================== */
241
- .icon-start,
242
- .icon-only,
243
- .icon-end {
244
- display: flex;
245
- align-items: center;
246
- justify-content: center;
247
- }
248
-
249
- .icon-start:empty,
250
- .icon-only:empty,
251
- .icon-end:empty {
252
- display: none;
253
- }
254
-
255
- ::slotted([slot="icon-start"]),
256
- ::slotted([slot="icon-only"]),
257
- ::slotted([slot="icon-end"]) {
258
- display: flex;
259
- align-items: center;
260
- justify-content: center;
261
- width: 1.125em;
262
- height: 1.125em;
263
- }
@@ -1,368 +0,0 @@
1
- import { h, Fragment } from "@stencil/core";
2
- import { classnames } from "../../utils/utils";
3
- /**
4
- * A flexible button component with multiple variants and states.
5
- *
6
- * @slot - Button text content
7
- * @slot icon-start - Icon before the text
8
- * @slot icon-end - Icon after the text
9
- *
10
- * @cssprop --le-button-bg - Button background color
11
- * @cssprop --le-button-color - Button text color
12
- * @cssprop --le-button-border-radius - Button border radius
13
- * @cssprop --le-button-padding-x - Button horizontal padding
14
- * @cssprop --le-button-padding-y - Button vertical padding
15
- *
16
- * @csspart button - The native button element
17
- * @csspart content - The button content wrapper
18
- *
19
- * @cmsEditable true
20
- * @cmsCategory Actions
21
- */
22
- export class LeButton {
23
- el;
24
- /**
25
- * Mode of the popover should be 'default' for internal use
26
- */
27
- mode;
28
- /**
29
- * Button variant style
30
- * @allowedValues solid | outlined | clear
31
- */
32
- variant = 'solid';
33
- /**
34
- * Button color theme (uses theme semantic colors)
35
- * @allowedValues primary | secondary | success | warning | danger | info
36
- */
37
- color = 'primary';
38
- /**
39
- * Button size
40
- * @allowedValues small | medium | large
41
- */
42
- size = 'medium';
43
- /**
44
- * Whether the button is in a selected/active state
45
- */
46
- selected = false;
47
- /**
48
- * Whether the button takes full width of its container
49
- */
50
- fullWidth = false;
51
- /**
52
- * Whether the button displays only an icon (square aspect ratio)
53
- */
54
- iconOnly = false;
55
- /**
56
- * Whether the button is disabled
57
- */
58
- disabled = false;
59
- /**
60
- * The button type attribute
61
- * @allowedValues button | submit | reset
62
- */
63
- type = 'button';
64
- /**
65
- * Optional href to make the button act as a link
66
- */
67
- href;
68
- /**
69
- * Link target when href is set
70
- */
71
- target;
72
- /**
73
- * Emitted when the button is clicked.
74
- * This is a custom event that wraps the native click but ensures the target is the le-button.
75
- */
76
- leClick;
77
- handleClick = (event) => {
78
- // We stop the internal button click from bubbling up
79
- event.stopPropagation();
80
- if (this.disabled) {
81
- event.preventDefault();
82
- return;
83
- }
84
- // And emit our own click event from the host element
85
- this.leClick.emit(event);
86
- };
87
- render() {
88
- const classes = classnames(`variant-${this.variant}`, `color-${this.color}`, `size-${this.size}`, {
89
- 'selected': this.selected,
90
- 'full-width': this.fullWidth,
91
- 'icon-only': this.iconOnly,
92
- 'disabled': this.disabled,
93
- });
94
- const TagType = this.href ? 'a' : 'button';
95
- const attrs = this.href ? { href: this.href, target: this.target, role: 'button' } : { type: this.type, disabled: this.disabled };
96
- return (h("le-component", { key: '363dbfddf4a765bfd6f36ed16d0912e281153806', component: "le-button", hostClass: classes }, h(TagType, { key: 'e112acdff4278e976ad767bd1ea7c9ced5e85f43', 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("le-slot", { name: "", description: "Button text", type: "text", class: "content", part: "content" }, h("slot", null)), h("span", { class: "icon-end" }, h("slot", { name: "icon-end" })))))));
97
- }
98
- static get is() { return "le-button"; }
99
- static get encapsulation() { return "shadow"; }
100
- static get originalStyleUrls() {
101
- return {
102
- "$": ["le-button.default.css"]
103
- };
104
- }
105
- static get styleUrls() {
106
- return {
107
- "$": ["le-button.default.css"]
108
- };
109
- }
110
- static get properties() {
111
- return {
112
- "mode": {
113
- "type": "string",
114
- "mutable": true,
115
- "complexType": {
116
- "original": "'default' | 'admin'",
117
- "resolved": "\"admin\" | \"default\"",
118
- "references": {}
119
- },
120
- "required": false,
121
- "optional": false,
122
- "docs": {
123
- "tags": [],
124
- "text": "Mode of the popover should be 'default' for internal use"
125
- },
126
- "getter": false,
127
- "setter": false,
128
- "reflect": true,
129
- "attribute": "mode"
130
- },
131
- "variant": {
132
- "type": "string",
133
- "mutable": false,
134
- "complexType": {
135
- "original": "'solid' | 'outlined' | 'clear' | 'system'",
136
- "resolved": "\"clear\" | \"outlined\" | \"solid\" | \"system\"",
137
- "references": {}
138
- },
139
- "required": false,
140
- "optional": false,
141
- "docs": {
142
- "tags": [{
143
- "name": "allowedValues",
144
- "text": "solid | outlined | clear"
145
- }],
146
- "text": "Button variant style"
147
- },
148
- "getter": false,
149
- "setter": false,
150
- "reflect": false,
151
- "attribute": "variant",
152
- "defaultValue": "'solid'"
153
- },
154
- "color": {
155
- "type": "string",
156
- "mutable": false,
157
- "complexType": {
158
- "original": "'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info'",
159
- "resolved": "\"danger\" | \"info\" | \"primary\" | \"secondary\" | \"success\" | \"warning\"",
160
- "references": {}
161
- },
162
- "required": false,
163
- "optional": false,
164
- "docs": {
165
- "tags": [{
166
- "name": "allowedValues",
167
- "text": "primary | secondary | success | warning | danger | info"
168
- }],
169
- "text": "Button color theme (uses theme semantic colors)"
170
- },
171
- "getter": false,
172
- "setter": false,
173
- "reflect": false,
174
- "attribute": "color",
175
- "defaultValue": "'primary'"
176
- },
177
- "size": {
178
- "type": "string",
179
- "mutable": false,
180
- "complexType": {
181
- "original": "'small' | 'medium' | 'large'",
182
- "resolved": "\"large\" | \"medium\" | \"small\"",
183
- "references": {}
184
- },
185
- "required": false,
186
- "optional": false,
187
- "docs": {
188
- "tags": [{
189
- "name": "allowedValues",
190
- "text": "small | medium | large"
191
- }],
192
- "text": "Button size"
193
- },
194
- "getter": false,
195
- "setter": false,
196
- "reflect": false,
197
- "attribute": "size",
198
- "defaultValue": "'medium'"
199
- },
200
- "selected": {
201
- "type": "boolean",
202
- "mutable": false,
203
- "complexType": {
204
- "original": "boolean",
205
- "resolved": "boolean",
206
- "references": {}
207
- },
208
- "required": false,
209
- "optional": false,
210
- "docs": {
211
- "tags": [],
212
- "text": "Whether the button is in a selected/active state"
213
- },
214
- "getter": false,
215
- "setter": false,
216
- "reflect": false,
217
- "attribute": "selected",
218
- "defaultValue": "false"
219
- },
220
- "fullWidth": {
221
- "type": "boolean",
222
- "mutable": false,
223
- "complexType": {
224
- "original": "boolean",
225
- "resolved": "boolean",
226
- "references": {}
227
- },
228
- "required": false,
229
- "optional": false,
230
- "docs": {
231
- "tags": [],
232
- "text": "Whether the button takes full width of its container"
233
- },
234
- "getter": false,
235
- "setter": false,
236
- "reflect": true,
237
- "attribute": "full-width",
238
- "defaultValue": "false"
239
- },
240
- "iconOnly": {
241
- "type": "boolean",
242
- "mutable": false,
243
- "complexType": {
244
- "original": "boolean",
245
- "resolved": "boolean",
246
- "references": {}
247
- },
248
- "required": false,
249
- "optional": false,
250
- "docs": {
251
- "tags": [],
252
- "text": "Whether the button displays only an icon (square aspect ratio)"
253
- },
254
- "getter": false,
255
- "setter": false,
256
- "reflect": false,
257
- "attribute": "icon-only",
258
- "defaultValue": "false"
259
- },
260
- "disabled": {
261
- "type": "boolean",
262
- "mutable": false,
263
- "complexType": {
264
- "original": "boolean",
265
- "resolved": "boolean",
266
- "references": {}
267
- },
268
- "required": false,
269
- "optional": false,
270
- "docs": {
271
- "tags": [],
272
- "text": "Whether the button is disabled"
273
- },
274
- "getter": false,
275
- "setter": false,
276
- "reflect": false,
277
- "attribute": "disabled",
278
- "defaultValue": "false"
279
- },
280
- "type": {
281
- "type": "string",
282
- "mutable": false,
283
- "complexType": {
284
- "original": "'button' | 'submit' | 'reset'",
285
- "resolved": "\"button\" | \"reset\" | \"submit\"",
286
- "references": {}
287
- },
288
- "required": false,
289
- "optional": false,
290
- "docs": {
291
- "tags": [{
292
- "name": "allowedValues",
293
- "text": "button | submit | reset"
294
- }],
295
- "text": "The button type attribute"
296
- },
297
- "getter": false,
298
- "setter": false,
299
- "reflect": false,
300
- "attribute": "type",
301
- "defaultValue": "'button'"
302
- },
303
- "href": {
304
- "type": "string",
305
- "mutable": false,
306
- "complexType": {
307
- "original": "string",
308
- "resolved": "string",
309
- "references": {}
310
- },
311
- "required": false,
312
- "optional": true,
313
- "docs": {
314
- "tags": [],
315
- "text": "Optional href to make the button act as a link"
316
- },
317
- "getter": false,
318
- "setter": false,
319
- "reflect": false,
320
- "attribute": "href"
321
- },
322
- "target": {
323
- "type": "string",
324
- "mutable": false,
325
- "complexType": {
326
- "original": "string",
327
- "resolved": "string",
328
- "references": {}
329
- },
330
- "required": false,
331
- "optional": true,
332
- "docs": {
333
- "tags": [],
334
- "text": "Link target when href is set"
335
- },
336
- "getter": false,
337
- "setter": false,
338
- "reflect": false,
339
- "attribute": "target"
340
- }
341
- };
342
- }
343
- static get events() {
344
- return [{
345
- "method": "leClick",
346
- "name": "click",
347
- "bubbles": true,
348
- "cancelable": true,
349
- "composed": true,
350
- "docs": {
351
- "tags": [],
352
- "text": "Emitted when the button is clicked.\nThis is a custom event that wraps the native click but ensures the target is the le-button."
353
- },
354
- "complexType": {
355
- "original": "PointerEvent",
356
- "resolved": "PointerEvent",
357
- "references": {
358
- "PointerEvent": {
359
- "location": "global",
360
- "id": "global::PointerEvent"
361
- }
362
- }
363
- }
364
- }];
365
- }
366
- static get elementRef() { return "el"; }
367
- }
368
- //# sourceMappingURL=le-button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"le-button.js","sourceRoot":"","sources":["../../../src/components/le-button/le-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;;;;;;;;;;;;;;;;;GAkBG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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Element, Fragment, Event, EventEmitter } 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 <le-component component=\"le-button\" hostClass={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 <le-slot name=\"\" description=\"Button text\" type=\"text\" class=\"content\" part=\"content\">\n <slot></slot>\n </le-slot>\n <span class=\"icon-end\">\n <slot name=\"icon-end\"></slot>\n </span>\n </Fragment>\n )}\n </TagType>\n </le-component>\n );\n }\n}\n"]}