le-kit 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/admin/index.d.ts +2 -0
  2. package/dist/admin/index.js +6 -0
  3. package/dist/admin/loader.js +9 -0
  4. package/dist/components/index.js +7 -2
  5. package/dist/components/index.js.map +1 -1
  6. package/dist/components/le-box.js +4 -4
  7. package/dist/components/le-box.js.map +1 -1
  8. package/dist/components/le-button.js +1 -1
  9. package/dist/{core/components/p-DxxFRStS.js → components/le-button2.js} +53 -15
  10. package/dist/components/le-button2.js.map +1 -0
  11. package/dist/components/le-card.js +4 -4
  12. package/dist/components/le-card.js.map +1 -1
  13. package/dist/components/le-checkbox.js +1 -1
  14. package/dist/components/le-component.js +1 -1
  15. package/dist/components/le-number-input.js +6 -6
  16. package/dist/components/le-number-input.js.map +1 -1
  17. package/dist/components/le-popover.js +1 -1
  18. package/dist/components/{p-CXeWQG7d.js → le-popover2.js} +6 -6
  19. package/dist/components/le-popover2.js.map +1 -0
  20. package/dist/components/le-popup.js +8 -8
  21. package/dist/components/le-popup.js.map +1 -1
  22. package/dist/components/le-round-progress.js +2 -2
  23. package/dist/components/le-round-progress.js.map +1 -1
  24. package/dist/components/le-slot.js +1 -1
  25. package/dist/components/le-stack.js +4 -4
  26. package/dist/components/le-stack.js.map +1 -1
  27. package/dist/components/le-string-input.js +1 -1
  28. package/dist/components/le-text.js +4 -4
  29. package/dist/components/le-text.js.map +1 -1
  30. package/dist/components/le-turntable.js +2 -2
  31. package/dist/components/le-turntable.js.map +1 -1
  32. package/dist/core/components/index.js +7 -2
  33. package/dist/core/components/index.js.map +1 -1
  34. package/dist/core/components/le-box.js +4 -4
  35. package/dist/core/components/le-box.js.map +1 -1
  36. package/dist/core/components/le-button.js +1 -1
  37. package/dist/{components/p-DxxFRStS.js → core/components/le-button2.js} +62 -74
  38. package/dist/core/components/le-button2.js.map +1 -0
  39. package/dist/core/components/le-card.js +4 -4
  40. package/dist/core/components/le-card.js.map +1 -1
  41. package/dist/core/components/le-checkbox.js +1 -1
  42. package/dist/core/components/le-number-input.js +6 -6
  43. package/dist/core/components/le-number-input.js.map +1 -1
  44. package/dist/core/components/le-popover.js +1 -1
  45. package/dist/core/components/{p-CXeWQG7d.js → le-popover2.js} +6 -6
  46. package/dist/core/components/le-popover2.js.map +1 -0
  47. package/dist/core/components/le-popup.js +8 -8
  48. package/dist/core/components/le-popup.js.map +1 -1
  49. package/dist/core/components/le-round-progress.js +2 -2
  50. package/dist/core/components/le-round-progress.js.map +1 -1
  51. package/dist/core/components/le-stack.js +4 -4
  52. package/dist/core/components/le-stack.js.map +1 -1
  53. package/dist/core/components/le-string-input.js +1 -1
  54. package/dist/core/components/le-text.js +4 -4
  55. package/dist/core/components/le-text.js.map +1 -1
  56. package/dist/core/components/le-turntable.js +2 -2
  57. package/dist/core/components/le-turntable.js.map +1 -1
  58. package/dist/core/index.d.ts +2 -0
  59. package/dist/core/index.js +6 -0
  60. package/dist/core/loader.js +9 -0
  61. package/dist/docs.json +3 -1
  62. package/package.json +42 -8
  63. package/readme.md +40 -29
  64. package/dist/components/p-CXeWQG7d.js.map +0 -1
  65. package/dist/components/p-DxxFRStS.js.map +0 -1
  66. package/dist/components/p-IPZGv1ea.js +0 -1442
  67. package/dist/components/p-IPZGv1ea.js.map +0 -1
  68. package/dist/core/components/p-CXeWQG7d.js.map +0 -1
  69. package/dist/core/components/p-DxxFRStS.js.map +0 -1
  70. package/dist/core/components/p-IPZGv1ea.js +0 -1442
  71. package/dist/core/components/p-IPZGv1ea.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "le-kit",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Themable web components library with CMS admin mode support",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -15,10 +15,18 @@
15
15
  "types": "./dist/types/index.d.ts"
16
16
  },
17
17
  "./core": {
18
+ "import": "./dist/core/loader.js",
19
+ "types": "./dist/core/index.d.ts"
20
+ },
21
+ "./core/define": {
18
22
  "import": "./dist/core/index.js",
19
23
  "types": "./dist/core/index.d.ts"
20
24
  },
21
25
  "./admin": {
26
+ "import": "./dist/admin/loader.js",
27
+ "types": "./dist/admin/index.d.ts"
28
+ },
29
+ "./admin/define": {
22
30
  "import": "./dist/admin/index.js",
23
31
  "types": "./dist/admin/index.d.ts"
24
32
  },
@@ -31,13 +39,39 @@
31
39
  "require": "./loader/index.cjs",
32
40
  "types": "./loader/index.d.ts"
33
41
  },
34
- "./themes": "./dist/themes/index.css",
35
- "./themes/base": "./dist/themes/base.css",
36
- "./themes/default": "./dist/themes/default.css",
37
- "./themes/dark": "./dist/themes/dark.css",
38
- "./themes/gradient": "./dist/themes/gradient.css",
39
- "./themes/minimal": "./dist/themes/minimal.css",
40
- "./themes/warm": "./dist/themes/warm.css"
42
+ "./themes/*.css": {
43
+ "style": "./dist/themes/*.css",
44
+ "default": "./dist/themes/*.css"
45
+ },
46
+ "./themes": {
47
+ "style": "./dist/themes/index.css",
48
+ "default": "./dist/themes/index.css"
49
+ },
50
+ "./themes/base": {
51
+ "style": "./dist/themes/base.css",
52
+ "default": "./dist/themes/base.css"
53
+ },
54
+ "./themes/default": {
55
+ "style": "./dist/themes/default.css",
56
+ "default": "./dist/themes/default.css"
57
+ },
58
+ "./themes/dark": {
59
+ "style": "./dist/themes/dark.css",
60
+ "default": "./dist/themes/dark.css"
61
+ },
62
+ "./themes/gradient": {
63
+ "style": "./dist/themes/gradient.css",
64
+ "default": "./dist/themes/gradient.css"
65
+ },
66
+ "./themes/minimal": {
67
+ "style": "./dist/themes/minimal.css",
68
+ "default": "./dist/themes/minimal.css"
69
+ },
70
+ "./themes/warm": {
71
+ "style": "./dist/themes/warm.css",
72
+ "default": "./dist/themes/warm.css"
73
+ },
74
+ "./dist/themes/*.css": "./dist/themes/*.css"
41
75
  },
42
76
  "repository": {
43
77
  "type": "git",
package/readme.md CHANGED
@@ -21,7 +21,7 @@ npm install le-kit
21
21
 
22
22
  ## Quick Start
23
23
 
24
- ### Option 1: Lazy Loading (Recommended)
24
+ ### Option 1: Lazy Loading (Recommended for Stencil apps)
25
25
 
26
26
  The easiest way to use Le-Kit. Components are automatically loaded on-demand.
27
27
 
@@ -42,33 +42,28 @@ The easiest way to use Le-Kit. Components are automatically loaded on-demand.
42
42
  </le-card>
43
43
  ```
44
44
 
45
- ### Option 2: Standalone Components (Tree-shakeable)
45
+ ### Option 2: Core Build (No Admin Code)
46
46
 
47
- Import only the components you need for smaller bundle sizes.
47
+ The core build has all CMS editing functionality stripped out at build time for the smallest possible bundle. Components are auto-registered on import.
48
48
 
49
49
  ```tsx
50
- // Import specific components
51
- import { defineCustomElement as defineCard } from 'le-kit/components/le-card';
52
- import { defineCustomElement as defineButton } from 'le-kit/components/le-button';
53
-
54
- // Register them
55
- defineCard();
56
- defineButton();
50
+ // Auto-registers all core components
51
+ import 'le-kit/core';
57
52
  ```
58
53
 
59
- ### Option 3: Core Build (No Admin Code)
60
-
61
- The core build has all CMS editing functionality stripped out at build time for the smallest possible bundle.
54
+ Or if you need to control when components are registered:
62
55
 
63
56
  ```tsx
64
- import 'le-kit/core';
57
+ import { defineCustomElements } from 'le-kit/core/define';
58
+ defineCustomElements();
65
59
  ```
66
60
 
67
- ### Option 4: Admin Build (CMS Editing)
61
+ ### Option 3: Admin Build (CMS Editing)
68
62
 
69
63
  Includes full CMS editing capabilities with inline editing and property panels.
70
64
 
71
65
  ```tsx
66
+ // Auto-registers all admin components
72
67
  import 'le-kit/admin';
73
68
  ```
74
69
 
@@ -79,28 +74,44 @@ import 'le-kit/admin';
79
74
  </html>
80
75
  ```
81
76
 
77
+ ### Option 4: Individual Components (Tree-shakeable)
78
+
79
+ Import only the components you need for smaller bundle sizes.
80
+
81
+ ```tsx
82
+ // Import specific components
83
+ import { defineCustomElement as defineCard } from 'le-kit/components/le-card';
84
+ import { defineCustomElement as defineButton } from 'le-kit/components/le-button';
85
+
86
+ // Register them
87
+ defineCard();
88
+ defineButton();
89
+ ```
90
+
82
91
  ## Theming
83
92
 
84
- Le-Kit ships with several built-in themes. Import the base styles plus your preferred theme:
93
+ Le-Kit ships with several built-in themes.
94
+
95
+ ### Via HTML link
85
96
 
86
97
  ```html
87
- <!-- Base tokens (required) -->
88
- <link rel="stylesheet" href="le-kit/dist/themes/base.css" />
89
-
90
- <!-- Choose a theme -->
91
- <link rel="stylesheet" href="le-kit/dist/themes/default.css" />
92
- <!-- or -->
93
- <link rel="stylesheet" href="le-kit/dist/themes/dark.css" />
94
- <link rel="stylesheet" href="le-kit/dist/themes/minimal.css" />
95
- <link rel="stylesheet" href="le-kit/dist/themes/warm.css" />
96
- <link rel="stylesheet" href="le-kit/dist/themes/gradient.css" />
98
+ <!-- From node_modules -->
99
+ <link rel="stylesheet" href="node_modules/le-kit/dist/themes/base.css" />
100
+ <link rel="stylesheet" href="node_modules/le-kit/dist/themes/default.css" />
101
+
102
+ <!-- Or use a CDN like unpkg -->
103
+ <link rel="stylesheet" href="https://unpkg.com/le-kit/dist/themes/base.css" />
104
+ <link rel="stylesheet" href="https://unpkg.com/le-kit/dist/themes/default.css" />
97
105
  ```
98
106
 
99
- Or import in JavaScript:
107
+ Available themes: `default`, `dark`, `minimal`, `warm`, `gradient`
108
+
109
+ ### Via JavaScript/CSS import
100
110
 
101
111
  ```tsx
102
- import 'le-kit/themes/base';
103
- import 'le-kit/themes/default';
112
+ // With a bundler that handles CSS imports
113
+ import 'le-kit/dist/themes/base.css';
114
+ import 'le-kit/dist/themes/default.css';
104
115
  ```
105
116
 
106
117
  ### Custom Theming
@@ -1 +0,0 @@
1
- {"file":"p-CXeWQG7d.js","mappings":";;AAAA,MAAM,YAAY,GAAG,uwHAAuwH;;MCmB/wH,SAAS,iBAAAA,kBAAA,CAAA,MAAA,SAAA,SAAAC,CAAA,CAAA;;;;;;;;;;;AAGpB;;AAEG;AACqC,IAAA,IA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ACP,CACJ,CACH;AAEN,YAAA,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,EAAE,EAAE,IAAI,CAAC,QAAQ,EACjB,KAAK,EAAC,oBAAoB,EAC1B,OAAO,EAAE,IAAI,CAAC,mBAAmB,GAAG,MAAM,GAAG,QAAQ,EACrD,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,EAClC,KAAK,EAAE,aAAa,EAAA,EAEnB,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,SAAS,MACnC,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,mBAAmB,EAAA,EAC3B,IAAI,CAAC,YAAY,IAAI,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,kBAAkB,EAAE,EAAA,IAAI,CAAC,YAAY,CAAQ,EAC9E,IAAI,CAAC,SAAS,KACb,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,kBAAkB,EACxB,OAAO,EAAE,MAAM,IAAI,CAAC,IAAI,EAAE,EAAA,YAAA,EACf,OAAO,EAAA,EAAA,QAAA,CAGX,CACV,CACG,CACP,EACD,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,iBAAiB,EAAA,EAC1B,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACT;SAET;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/le-popover/le-popover.css?tag=le-popover&encapsulation=shadow","src/components/le-popover/le-popover.tsx"],"sourcesContent":["/* ============================================\n le-popover.css\n Popover using native HTML Popover API\n ============================================ */\n\n:host {\n display: inline-block;\n position: relative;\n}\n\n/* ============================================\n Trigger\n ============================================ */\n\n.le-popover-trigger {\n display: inline-flex;\n cursor: pointer;\n}\n\n.le-popover-default-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n border: 1px solid var(--le-color-border, #e0e0e0);\n border-radius: var(--le-radius-md, 6px);\n background: var(--le-color-surface, #fff);\n color: var(--le-color-text-secondary, #666);\n font-size: 16px;\n cursor: pointer;\n transition: all var(--le-transition-fast, 0.15s ease);\n}\n\n.le-popover-default-trigger:hover {\n border-color: var(--le-color-primary, #2196f3);\n color: var(--le-color-primary, #2196f3);\n background: var(--le-color-primary-light, rgba(33, 150, 243, 0.1));\n}\n\n/* ============================================\n Popover Content (native popover)\n ============================================ */\n\n.le-popover-content {\n /* Reset native popover defaults */\n margin: 0;\n padding: 0;\n border: none;\n background: transparent;\n \n /* Positioning - will be set via JS */\n position: fixed;\n inset: unset;\n \n /* Styling */\n background: var(--le-color-surface, #ffffff);\n border: 1px solid var(--le-color-border, #e0e0e0);\n border-radius: var(--le-radius-lg, 8px);\n box-shadow: var(--le-shadow-lg, 0 4px 12px rgba(0, 0, 0, 0.15));\n overflow: hidden;\n font-family: var(--le-font-family, system-ui, -apple-system, sans-serif);\n font-size: var(--le-font-size-sm, 0.875rem);\n color: var(--le-color-text, #333);\n \n /* Animation */\n opacity: 0;\n transform: scale(0.95);\n transition: opacity 0.15s ease, transform 0.15s ease, display 0.15s ease allow-discrete;\n}\n\n/* When popover is open */\n.le-popover-content:popover-open {\n opacity: 1;\n transform: scale(1);\n}\n\n/* Starting style for animation (CSS Anchor Positioning spec) */\n@starting-style {\n .le-popover-content:popover-open {\n opacity: 0;\n transform: scale(0.95);\n }\n}\n\n/* ============================================\n Header\n ============================================ */\n\n.le-popover-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--le-space-xs, 4px) var(--le-space-xs, 4px) var(--le-space-xs, 4px) var(--le-space-sm, 8px);\n border-bottom: 1px solid var(--le-color-border, #e0e0e0);\n background: var(--le-color-surface-alt, #f9f9f9);\n min-height: 32px;\n}\n\n.le-popover-title {\n font-weight: var(--le-font-weight-semibold, 600);\n font-size: var(--le-font-size-sm, 0.875rem);\n color: var(--le-color-text, #333);\n}\n\n.le-popover-close {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n padding: 0;\n border: none;\n background: transparent;\n color: var(--le-color-text-secondary, #666);\n font-size: 18px;\n line-height: 1;\n cursor: pointer;\n border-radius: var(--le-radius-sm, 4px);\n transition: background-color 0.15s, color 0.15s;\n}\n\n.le-popover-close:hover {\n background: var(--le-color-surface-hover, rgba(0, 0, 0, 0.05));\n color: var(--le-color-text, #333);\n}\n\n/* ============================================\n Body\n ============================================ */\n\n.le-popover-body {\n padding: var(--le-space-md, 12px);\n}\n\n/* ============================================\n Scrollable content\n ============================================ */\n\n.le-popover-content[style*=\"overflow-y: auto\"] .le-popover-body {\n overflow-y: auto;\n}\n","import { Component, Prop, Method, Event, EventEmitter, State, h, Element } from '@stencil/core';\n\n/**\n * A popover component for displaying floating content.\n * \n * Uses the native HTML Popover API for proper layering with dialogs\n * and other top-layer elements. Falls back gracefully in older browsers.\n *\n * @slot - Content to display inside the popover\n * @slot trigger - Element that triggers the popover (optional)\n * \n * @cmsInternal true\n * @cmsCategory System\n */\n@Component({\n tag: 'le-popover',\n styleUrl: 'le-popover.css',\n shadow: true,\n})\nexport class LePopover {\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 * Whether the popover is currently open\n */\n @Prop({ mutable: true, reflect: true }) open: boolean = false;\n\n /**\n * Position of the popover relative to its trigger\n */\n @Prop() position: 'top' | 'bottom' | 'left' | 'right' | 'auto' = 'bottom';\n\n /**\n * Alignment of the popover\n */\n @Prop() align: 'start' | 'center' | 'end' = 'start';\n\n /**\n * Optional title for the popover header\n */\n @Prop() popoverTitle?: string;\n\n /**\n * Whether to show a close button in the header\n */\n @Prop() showClose: boolean = true;\n\n /**\n * Whether clicking outside closes the popover\n */\n @Prop() closeOnClickOutside: boolean = true;\n\n /**\n * Whether pressing Escape closes the popover\n */\n @Prop() closeOnEscape: boolean = true;\n\n /**\n * Offset from the trigger element (in pixels)\n */\n @Prop() offset: number = 8;\n\n /**\n * Fixed width for the popover (e.g., '300px', '20rem')\n */\n @Prop() width?: string;\n\n /**\n * Minimum width for the popover (e.g., '200px', '15rem')\n */\n @Prop() minWidth?: string = '200px';\n\n /**\n * Maximum width for the popover (e.g., '400px', '25rem')\n */\n @Prop() maxWidth?: string;\n\n /**\n * Emitted when the popover opens\n */\n @Event() lePopoverOpen: EventEmitter<void>;\n\n /**\n * Emitted when the popover closes\n */\n @Event() lePopoverClose: EventEmitter<void>;\n\n @State() private isPositioned: boolean = false;\n\n private triggerEl?: HTMLElement;\n private popoverEl?: HTMLElement;\n private uniqueId: string = `le-popover-${Math.random().toString(36).substr(2, 9)}`;\n private scrollParents: Element[] = [];\n\n componentDidLoad() {\n // Listen for toggle events from the native popover API\n this.popoverEl?.addEventListener('toggle', this.handlePopoverToggle as EventListener);\n \n // Listen for other popovers opening to close this one\n document.addEventListener('le-popover-will-open', this.handleOtherPopoverOpen);\n }\n\n disconnectedCallback() {\n this.popoverEl?.removeEventListener('toggle', this.handlePopoverToggle as EventListener);\n document.removeEventListener('le-popover-will-open', this.handleOtherPopoverOpen);\n this.removeScrollListeners();\n }\n\n /**\n * Find all scrollable parent elements\n */\n private getScrollParents(element: Element): Element[] {\n const scrollParents: Element[] = [];\n let parent = element.parentElement;\n \n while (parent) {\n const style = getComputedStyle(parent);\n const overflow = style.overflow + style.overflowY + style.overflowX;\n if (/(auto|scroll)/.test(overflow)) {\n scrollParents.push(parent);\n }\n parent = parent.parentElement;\n }\n \n // Always include window for page scroll\n return scrollParents;\n }\n\n /**\n * Add scroll listeners to all scrollable parents\n */\n private addScrollListeners() {\n if (!this.triggerEl) return;\n \n this.scrollParents = this.getScrollParents(this.triggerEl);\n \n // Listen to each scroll parent\n this.scrollParents.forEach(parent => {\n parent.addEventListener('scroll', this.handleScroll, { passive: true });\n });\n \n // Also listen to window scroll and resize\n window.addEventListener('scroll', this.handleScroll, { passive: true });\n window.addEventListener('resize', this.handleScroll, { passive: true });\n }\n\n /**\n * Remove scroll listeners\n */\n private removeScrollListeners() {\n this.scrollParents.forEach(parent => {\n parent.removeEventListener('scroll', this.handleScroll);\n });\n window.removeEventListener('scroll', this.handleScroll);\n window.removeEventListener('resize', this.handleScroll);\n this.scrollParents = [];\n }\n\n private handleScroll = () => {\n if (this.open) {\n this.updatePosition();\n }\n };\n\n private handlePopoverToggle = (event: ToggleEvent) => {\n if (event.newState === 'open') {\n this.open = true;\n this.addScrollListeners();\n this.updatePosition();\n this.lePopoverOpen.emit();\n } else {\n this.open = false;\n this.isPositioned = false;\n this.removeScrollListeners();\n this.lePopoverClose.emit();\n }\n };\n\n private handleOtherPopoverOpen = (event: Event) => {\n const customEvent = event as CustomEvent;\n if (customEvent.detail?.popover === this.el) return;\n \n if (this.open) {\n this.hide();\n }\n };\n\n /**\n * Opens the popover\n */\n @Method()\n async show() {\n document.dispatchEvent(new CustomEvent('le-popover-will-open', {\n detail: { popover: this.el }\n }));\n \n this.popoverEl?.showPopover();\n }\n\n /**\n * Closes the popover\n */\n @Method()\n async hide() {\n this.popoverEl?.hidePopover();\n }\n\n /**\n * Toggles the popover\n */\n @Method()\n async toggle() {\n if (this.open) {\n await this.hide();\n } else {\n await this.show();\n }\n }\n\n private handleTriggerClick = (event: MouseEvent) => {\n event.stopPropagation();\n this.toggle();\n };\n\n private updatePosition() {\n if (!this.triggerEl || !this.popoverEl) return;\n\n const triggerRect = this.triggerEl.getBoundingClientRect();\n const popoverRect = this.popoverEl.getBoundingClientRect();\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n const viewportPadding = 8;\n\n let position = this.position;\n let align = this.align;\n\n // Auto-position logic\n const spaceBelow = viewportHeight - triggerRect.bottom - viewportPadding;\n const spaceAbove = triggerRect.top - viewportPadding;\n const spaceRight = viewportWidth - triggerRect.right - viewportPadding;\n const spaceLeft = triggerRect.left - viewportPadding;\n\n if (position === 'auto') {\n if (spaceBelow >= popoverRect.height + this.offset) {\n position = 'bottom';\n } else if (spaceAbove >= popoverRect.height + this.offset) {\n position = 'top';\n } else if (spaceRight >= popoverRect.width + this.offset) {\n position = 'right';\n } else if (spaceLeft >= popoverRect.width + this.offset) {\n position = 'left';\n } else {\n const maxSpace = Math.max(spaceBelow, spaceAbove, spaceRight, spaceLeft);\n if (maxSpace === spaceBelow) position = 'bottom';\n else if (maxSpace === spaceAbove) position = 'top';\n else if (maxSpace === spaceRight) position = 'right';\n else position = 'left';\n }\n }\n\n // Adjust alignment for horizontal overflow\n if (position === 'top' || position === 'bottom') {\n if (align === 'start' && triggerRect.left + popoverRect.width > viewportWidth - viewportPadding) {\n align = 'end';\n } else if (align === 'end' && triggerRect.right - popoverRect.width < viewportPadding) {\n align = 'start';\n } else if (align === 'center') {\n const triggerCenter = triggerRect.left + triggerRect.width / 2;\n if (triggerCenter - popoverRect.width / 2 < viewportPadding) {\n align = 'start';\n } else if (triggerCenter + popoverRect.width / 2 > viewportWidth - viewportPadding) {\n align = 'end';\n }\n }\n }\n\n // Calculate position\n let top: number = 0;\n let left: number = 0;\n let maxHeight: number | null = null;\n\n switch (position) {\n case 'top':\n top = triggerRect.top - popoverRect.height - this.offset;\n if (top < viewportPadding) {\n maxHeight = triggerRect.top - this.offset - viewportPadding * 2;\n top = viewportPadding;\n }\n break;\n case 'bottom':\n top = triggerRect.bottom + this.offset;\n if (top + popoverRect.height > viewportHeight - viewportPadding) {\n maxHeight = viewportHeight - top - viewportPadding;\n }\n break;\n case 'left':\n left = triggerRect.left - popoverRect.width - this.offset;\n top = triggerRect.top;\n if (left < viewportPadding) left = viewportPadding;\n break;\n case 'right':\n left = triggerRect.right + this.offset;\n top = triggerRect.top;\n if (left + popoverRect.width > viewportWidth - viewportPadding) {\n left = viewportWidth - popoverRect.width - viewportPadding;\n }\n break;\n }\n\n // Calculate horizontal alignment for top/bottom\n if (position === 'top' || position === 'bottom') {\n switch (align) {\n case 'start':\n left = triggerRect.left;\n break;\n case 'center':\n left = triggerRect.left + triggerRect.width / 2 - popoverRect.width / 2;\n break;\n case 'end':\n left = triggerRect.right - popoverRect.width;\n break;\n }\n \n // Constrain to viewport\n if (left < viewportPadding) {\n left = viewportPadding;\n } else if (left + popoverRect.width > viewportWidth - viewportPadding) {\n left = viewportWidth - popoverRect.width - viewportPadding;\n }\n }\n\n // Calculate vertical alignment for left/right\n if (position === 'left' || position === 'right') {\n switch (align) {\n case 'start':\n top = triggerRect.top;\n break;\n case 'center':\n top = triggerRect.top + triggerRect.height / 2 - popoverRect.height / 2;\n break;\n case 'end':\n top = triggerRect.bottom - popoverRect.height;\n break;\n }\n \n if (top < viewportPadding) top = viewportPadding;\n if (top + popoverRect.height > viewportHeight - viewportPadding) {\n maxHeight = viewportHeight - top - viewportPadding;\n }\n }\n\n // Apply styles\n this.popoverEl.style.top = `${top}px`;\n this.popoverEl.style.left = `${left}px`;\n \n if (maxHeight !== null && maxHeight > 100) {\n this.popoverEl.style.maxHeight = `${maxHeight}px`;\n this.popoverEl.style.overflowY = 'auto';\n } else {\n this.popoverEl.style.maxHeight = '';\n this.popoverEl.style.overflowY = '';\n }\n\n this.isPositioned = true;\n }\n\n render() {\n const popoverStyles: Record<string, string> = {\n visibility: this.isPositioned ? 'visible' : 'hidden',\n };\n \n if (this.width) popoverStyles.width = this.width;\n if (this.minWidth) popoverStyles.minWidth = this.minWidth;\n if (this.maxWidth) popoverStyles.maxWidth = this.maxWidth;\n\n return [\n <div \n class=\"le-popover-trigger\" \n ref={(el) => (this.triggerEl = el)}\n onClick={this.handleTriggerClick}\n >\n <slot name=\"trigger\">\n <button type=\"button\" class=\"le-popover-default-trigger\">\n <span>⊕</span>\n </button>\n </slot>\n </div>,\n \n <div\n id={this.uniqueId}\n class=\"le-popover-content\"\n popover={this.closeOnClickOutside ? 'auto' : 'manual'}\n ref={(el) => (this.popoverEl = el)}\n style={popoverStyles}\n >\n {(this.popoverTitle || this.showClose) && (\n <div class=\"le-popover-header\">\n {this.popoverTitle && <span class=\"le-popover-title\">{this.popoverTitle}</span>}\n {this.showClose && (\n <button \n type=\"button\" \n class=\"le-popover-close\"\n onClick={() => this.hide()}\n aria-label=\"Close\"\n >\n ×\n </button>\n )}\n </div>\n )}\n <div class=\"le-popover-body\">\n <slot></slot>\n </div>\n </div>\n ];\n }\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"p-DxxFRStS.js","mappings":";;;AAkDA;;;;;;AAMG;AACG,SAAU,OAAO,CAAC,EAAe,EAAA;;IAErC,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC;IACvC,IAAI,OAAO,EAAE;AACX,QAAA,OAAO,OAAoB;;;IAI7B,IAAI,OAAO,GAAgB,EAAE;IAC7B,OAAO,OAAO,EAAE;;QAEd,IAAI,OAAO,YAAY,OAAO,IAAI,OAAO,CAAC,aAAa,EAAE;AACvD,YAAA,OAAO,GAAG,OAAO,CAAC,aAAa;YAC/B,MAAM,IAAI,GAAI,OAAuB,CAAC,YAAY,GAAG,MAAM,CAAC;YAC5D,IAAI,IAAI,EAAE;AACR,gBAAA,OAAO,IAAiB;;;aAErB;;AAEL,YAAA,MAAM,IAAI,GAAG,OAAO,CAAC,WAAW,EAAE;AAClC,YAAA,IAAI,IAAI,YAAY,UAAU,EAAE;;AAE9B,gBAAA,OAAO,GAAG,IAAI,CAAC,IAAI;gBACnB,MAAM,IAAI,GAAI,OAAuB,CAAC,YAAY,GAAG,MAAM,CAAC;gBAC5D,IAAI,IAAI,EAAE;AACR,oBAAA,OAAO,IAAiB;;;iBAErB;;gBAEL;;;;;IAMN,MAAM,QAAQ,GAAG,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,MAAM,CAAC;IAC9D,IAAI,QA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AAA,MAAA,EAAA,IAAA,CAAa,CACL,EACV,CAAM,CAAA,MAAA,EAAA,EAAA,KAAK,EAAC,UAAU,EAAA,EACpB,CAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,UAAU,EAAQ,CAAA,CACxB,CACE,CACZ,CACO,CACG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/global/app.ts","src/utils/utils.ts","src/components/le-string-input/le-string-input.css?tag=le-string-input&encapsulation=shadow","src/components/le-string-input/le-string-input.tsx","src/components/le-slot/le-slot.default.css?tag=le-slot&encapsulation=shadow","src/components/le-slot/le-slot.tsx","src/components/le-component/le-component.css?tag=le-component&encapsulation=shadow","src/components/le-component/le-component.tsx","src/components/le-checkbox/le-checkbox.css?tag=le-checkbox&encapsulation=shadow","src/components/le-checkbox/le-checkbox.tsx","src/components/le-button/le-button.default.css?tag=le-button&encapsulation=shadow","src/components/le-button/le-button.tsx"],"sourcesContent":["import { setMode } from '@stencil/core';\n\nexport type LeKitMode = 'default' | 'admin' | string;\nexport type LeKitTheme = 'default' | 'dark' | string;\n\n/**\n * Global mode initialization for le-kit components.\n *\n * Mode inheritance works as follows:\n * 1. Check the element's own `mode` attribute\n * 2. Traverse up the DOM to find a parent with `mode` attribute\n * 3. Check the document root element (html) for `mode` attribute\n * 4. Fall back to 'default'\n *\n * This allows setting mode at any level:\n * - `<html mode=\"admin\">` - all components in admin mode\n * - `<le-card mode=\"admin\">` - this card and its children in admin mode\n */\nfunction initializeMode() {\n setMode((el: HTMLElement): LeKitMode => {\n // 1. Check element's own mode attribute\n const ownMode = el.getAttribute('mode');\n if (ownMode) {\n return ownMode as LeKitMode;\n }\n\n // 2. Traverse up the DOM tree to find inherited mode\n let parent = el.parentElement;\n while (parent) {\n const parentMode = parent.getAttribute('mode');\n if (parentMode) {\n return parentMode as LeKitMode;\n }\n parent = parent.parentElement;\n }\n\n // 3. Check document root element\n const rootMode = document.documentElement.getAttribute('mode');\n if (rootMode) {\n return rootMode as LeKitMode;\n }\n\n // 4. Default mode\n return 'default';\n });\n}\n\n// Default export for Stencil global script\nexport default initializeMode;\n\n/**\n * Helper function to get the current mode for an element.\n * Can be used programmatically in components.\n * \n * This function traverses both regular DOM and shadow DOM boundaries\n * to find the nearest mode attribute.\n */\nexport function getMode(el: HTMLElement): LeKitMode {\n // Check element's own mode\n const ownMode = el.getAttribute('mode');\n if (ownMode) {\n return ownMode as LeKitMode;\n }\n\n // Traverse up DOM, crossing shadow boundaries\n let current: Node | null = el;\n while (current) {\n // Try parent element first\n if (current instanceof Element && current.parentElement) {\n current = current.parentElement;\n const mode = (current as HTMLElement).getAttribute?.('mode');\n if (mode) {\n return mode as LeKitMode;\n }\n } else {\n // No parent element - check if we're in a shadow root\n const root = current.getRootNode();\n if (root instanceof ShadowRoot) {\n // Cross the shadow boundary to the host element\n current = root.host;\n const mode = (current as HTMLElement).getAttribute?.('mode');\n if (mode) {\n return mode as LeKitMode;\n }\n } else {\n // We've reached the document root\n break;\n }\n }\n }\n\n // Check document root\n const rootMode = document.documentElement.getAttribute('mode');\n if (rootMode) {\n return rootMode as LeKitMode;\n }\n\n return 'default';\n}\n\n/**\n * Helper function to get the current theme for an element.\n * Theme inheritance works the same as mode - cascades through DOM.\n */\nexport function getTheme(el: HTMLElement): LeKitTheme {\n // Check element's own theme\n const ownTheme = el.getAttribute('theme');\n if (ownTheme) {\n return ownTheme as LeKitTheme;\n }\n\n // Traverse up DOM\n let parent = el.parentElement;\n while (parent) {\n const parentTheme = parent.getAttribute('theme');\n if (parentTheme) {\n return parentTheme as LeKitTheme;\n }\n parent = parent.parentElement;\n }\n\n // Check root\n const rootTheme = document.documentElement.getAttribute('theme');\n if (rootTheme) {\n return rootTheme as LeKitTheme;\n }\n\n return 'default';\n}\n\n/**\n * Helper function to set mode on the document root.\n * Useful for switching all components to admin mode.\n */\nexport function setGlobalMode(mode: LeKitMode): void {\n document.documentElement.setAttribute('mode', mode);\n}\n\n/**\n * Helper function to set theme on the document root.\n * Useful for switching all components to a different theme.\n */\nexport function setGlobalTheme(theme: LeKitTheme): void {\n document.documentElement.setAttribute('theme', theme);\n}\n","/**\n * Utility functions for le-kit components\n */\n\nimport { getMode } from '../global/app';\n\n/**\n * Generates a unique ID for component instances\n */\nexport function generateId(prefix: string = 'le'): string {\n return `${prefix}-${Math.random().toString(36).substring(2, 9)}`;\n}\n\n/**\n * Parses a comma-separated string into an array\n */\nexport function parseCommaSeparated(value: string | undefined): string[] {\n if (!value) return [];\n return value\n .split(',')\n .map(s => s.trim())\n .filter(Boolean);\n}\n\n/**\n * Checks if a slot has content\n */\nexport function slotHasContent(el: HTMLElement, slotName: string = ''): boolean {\n const selector = slotName ? `[slot=\"${slotName}\"]` : ':not([slot])';\n return el.querySelector(selector) !== null;\n}\n\n/**\n * Sets up a MutationObserver to track mode changes on ancestor elements.\n * Returns a cleanup function to disconnect the observer.\n * \n * If the element or any ancestor has an explicit `mode` attribute, that creates\n * a \"mode boundary\" - the mode is determined from that point, not from further up.\n * This allows components like le-popover to force default mode for their children.\n * \n * @param el - The component's host element\n * @param callback - Function to call when mode changes, receives the new mode\n * @returns Cleanup function to disconnect the observer\n * \n * @example\n * ```tsx\n * export class MyComponent {\n * @Element() el: HTMLElement;\n * @State() adminMode: boolean = false;\n * private disconnectModeObserver?: () => void;\n * \n * connectedCallback() {\n * this.disconnectModeObserver = observeModeChanges(this.el, (mode) => {\n * this.adminMode = mode === 'admin';\n * });\n * }\n * \n * disconnectedCallback() {\n * this.disconnectModeObserver?.();\n * }\n * }\n * ```\n */\nexport function observeModeChanges(\n el: HTMLElement,\n callback: (mode: string) => void\n): () => void {\n // Call immediately with current mode\n callback(getMode(el));\n\n // Set up observer for mode attribute changes\n const observer = new MutationObserver(() => {\n callback(getMode(el));\n });\n\n // Observe the element itself (for mode boundary changes)\n observer.observe(el, {\n attributes: true,\n attributeFilter: ['mode'],\n });\n\n // Observe document root\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['mode'],\n });\n\n // Traverse up, crossing shadow boundaries, and observe each element\n let current: Node | null = el;\n while (current) {\n if (current instanceof Element && current.parentElement) {\n current = current.parentElement;\n observer.observe(current, {\n attributes: true,\n attributeFilter: ['mode'],\n });\n // If this element has an explicit mode, it's a boundary\n if ((current as Element).hasAttribute('mode')) {\n break;\n }\n } else {\n // Check if we're in a shadow root\n const root = current.getRootNode();\n if (root instanceof ShadowRoot) {\n // Cross the shadow boundary and observe the host\n current = root.host;\n observer.observe(current, {\n attributes: true,\n attributeFilter: ['mode'],\n });\n // If the host has an explicit mode, it's a boundary\n if ((current as Element).hasAttribute('mode')) {\n break;\n }\n } else {\n break;\n }\n }\n }\n\n // Return cleanup function\n return () => observer.disconnect();\n}\n\n/**\n * Combines multiple class names into a single string, filtering out falsy values.\n * \n * @param classes - arguments of class names, undefined, arrays, objects with boolean values and nested combinations of these\n * @returns Combined class names string\n */\nexport function classnames(...classes: any[]): string {\n const result: string[] = [];\n\n classes.forEach(cls => {\n if (!cls) return;\n\n if (typeof cls === 'string') {\n result.push(cls);\n } else if (Array.isArray(cls)) {\n result.push(classnames(...cls));\n } else if (typeof cls === 'object') {\n Object.entries(cls).forEach(([key, value]) => {\n if (value) {\n result.push(key);\n }\n });\n }\n });\n\n return result.join(' ');\n}\n",":host {\n display: block;\n --le-input-bg: var(--le-color-surface, #ffffff);\n --le-input-color: var(--le-color-text-primary, #333333);\n --le-input-border: var(--le-border-width, 2px) solid var(--le-color-border-input, #007bff);\n --le-input-radius: var(--le-radius-sm, 4px);\n --le-input-padding: 2px 6px;\n --le-input-height: 1.5rem;\n --le-input-label-color: var(--le-color-text-primary, #333333);\n --le-input-desc-color: var(--le-color-text-secondary, #666666);\n --le-input-placeholder-color: #999999;\n}\n\n.le-input-wrapper {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.le-input-label {\n display: block;\n font-size: 0.9em;\n font-weight: 500;\n color: var(--le-input-label-color);\n margin-bottom: 2px;\n}\n\n.le-input-container {\n position: relative;\n display: flex;\n align-items: center;\n background: var(--le-input-bg);\n border: var(--le-input-border);\n border-radius: var(--le-input-radius);\n transition: border-color 0.2s;\n}\n\n.le-input-container:focus-within {\n outline: 2px solid var(--le-color-focus);\n outline-offset: 2px;\n}\n\n\n:host([disabled]) .le-input-container {\n opacity: 0.6;\n background-color: rgba(0,0,0,0.05);\n cursor: not-allowed;\n}\n\ninput {\n flex: 1;\n min-height: var(--le-input-height);\n padding: var(--le-input-padding);\n border: none;\n background: transparent;\n color: var(--le-input-color);\n font-family: inherit;\n font-size: inherit;\n outline: none;\n width: 100%;\n}\n\ninput::placeholder {\n color: var(--le-input-placeholder-color);\n}\n\n.icon-start, .icon-end {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 8px;\n color: var(--le-input-desc-color);\n}\n\n.le-input-description {\n font-size: 0.85em;\n color: var(--le-input-desc-color);\n margin-top: 2px;\n}\n\n.le-input-description::has(le-slot > slot[name=description]:empty) {\n display: none;\n}\n","import { Component, Prop, Event, EventEmitter, h, Element } from '@stencil/core';\nimport { classnames } from '../../utils/utils';\n\n/**\n * A text input component with support for labels, descriptions, icons, and external IDs.\n *\n * @slot - The label text for the input\n * @slot description - Additional description text displayed below the input\n * @slot icon-start - Icon to display at the start of the input\n * @slot icon-end - Icon to display at the end of the input\n *\n * @cssprop --le-input-bg - Input background color\n * @cssprop --le-input-color - Input text color\n * @cssprop --le-input-border - Input border style\n * @cssprop --le-input-border-focus - Input border style when focused\n * @cssprop --le-input-radius - Input border radius\n * @cssprop --le-input-padding - Input padding\n */\n@Component({\n tag: 'le-string-input',\n styleUrl: 'le-string-input.css',\n shadow: true,\n})\nexport class LeStringInput {\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 * The value of the input\n */\n @Prop({ mutable: true, reflect: true }) value: string;\n\n /**\n * The name of the input\n */\n @Prop() name: string;\n\n /**\n * The type of the input (text, email, password, etc.)\n */\n @Prop() type: 'text' | 'email' | 'password' | 'tel' | 'url' = 'text';\n\n /**\n * Label for the input\n */\n @Prop() label: string;\n\n /**\n * Icon for the start icon\n */\n @Prop() iconStart: string;\n\n /**\n * Icon for the end icon\n */\n @Prop() iconEnd: string;\n\n /**\n * Placeholder text\n */\n @Prop() placeholder: string;\n\n /**\n * Whether the input is disabled\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Whether the input is read-only\n */\n @Prop() readonly: boolean = false;\n\n /**\n * External ID for linking with external systems\n */\n @Prop() externalId: string;\n\n /**\n * Emitted when the value changes (on blur or Enter)\n */\n @Event({ eventName: 'change' }) leChange: EventEmitter<{ value: string; name: string; externalId: string }>;\n\n /**\n * Emitted when the input value changes (on keystroke)\n */\n @Event({ eventName: 'input' }) leInput: EventEmitter<{ value: string; name: string; externalId: string }>;\n\n private handleInput = (ev: Event) => {\n const input = ev.target as HTMLInputElement;\n this.value = input.value;\n this.leInput.emit({\n value: this.value,\n name: this.name,\n externalId: this.externalId\n });\n };\n\n private handleChange = (ev: Event) => {\n const input = ev.target as HTMLInputElement;\n this.value = input.value;\n this.leChange.emit({\n value: this.value,\n name: this.name,\n externalId: this.externalId\n });\n };\n\n private handleClick = (ev: Event) => {\n ev.stopPropagation();\n };\n\n render() {\n return (\n <le-component component=\"le-string-input\" hostClass={classnames({ 'disabled': this.disabled })}>\n <div class=\"le-input-wrapper\">\n {this.label && (\n <label class=\"le-input-label\" htmlFor={this.name}>{this.label}</label>\n )}\n \n <div class=\"le-input-container\">\n {this.iconStart && (\n <span class=\"icon-start\">{this.iconStart}</span>\n )}\n <input\n id={this.name}\n type={this.type}\n name={this.name}\n value={this.value}\n placeholder={this.placeholder}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n onChange={this.handleChange}\n onClick={this.handleClick}\n />\n {this.iconEnd && (\n <span class=\"icon-end\">{this.iconEnd}</span>\n )}\n </div>\n\n <div class=\"le-input-description\">\n <le-slot name=\"description\" type=\"text\" tag=\"p\" label=\"Description\">\n <slot name=\"description\"></slot>\n </le-slot>\n </div>\n </div>\n </le-component>\n );\n }\n}\n","/**\n * Styles for le-slot component\n * Uses :host(.admin-mode) to toggle between default and admin styles\n */\n\n/* ============================================\n DEFAULT MODE - Invisible passthrough\n ============================================ */\n:host {\n display: contents;\n --le-slot-border-color: #0088ff;\n --le-slot-bg-color: rgba(0, 136, 255, 0.05);\n --le-slot-header-bg: rgb(218, 238, 255);\n --le-slot-label-color: #0066cc;\n --le-slot-description-color: #666;\n --le-slot-required-color: #e53935;\n --le-slot-dropzone-min-height: 20px;\n --le-slot-dropzone-border-color: #ccc;\n}\n\n.le-slot-container,\n.le-slot-header,\n.le-slot-description,\n.le-slot-dropzone,\n.le-slot-input {\n display: none;\n}\n\n/* Hidden slot wrapper - keeps slot in DOM but invisible */\n.hidden-slot {\n display: none;\n}\n\n/* ============================================\n ADMIN MODE - Visible placeholder UI\n ============================================ */\n:host(.admin-mode) {\n display: block;\n flex: 1;\n}\n\n:host(.admin-mode) .le-slot-container {\n position: relative;\n display: flex;\n flex-direction: column;\n border: 2px dashed var(--le-slot-border-color);\n border-radius: 4px;\n background: var(--le-slot-bg-color);\n margin: 4px 0;\n}\n\n:host(.admin-mode) .le-slot-header {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 0 0 0 var(--le-spacing-1, 4px);\n background: var(--le-slot-header-bg);\n border-bottom: 1px solid var(--le-slot-border-color);\n font-size: var(--le-font-size-xs, 11px);\n font-weight: 400;\n text-transform: capitalize;\n}\n:host(.admin-mode) .le-slot-header-no-label {\n justify-content: flex-end;\n height: 16px;\n border: none;\n background-color: transparent;\n}\n\n.le-slot-label {\n color: var(--le-slot-label-color);\n text-align: start;\n overflow: hidden;\n width: 0;\n flex: 1 1 0%;\n}\n\n.le-slot-required {\n color: var(--le-slot-required-color);\n font-weight: bold;\n}\n\n:host(.admin-mode) .le-slot-description {\n display: block;\n padding: 4px 8px;\n font-size: 12px;\n color: var(--le-slot-description-color);\n font-style: italic;\n}\n:host(.admin-mode) .le-slot-description-icon {\n display: inline-block;\n font-size: 9px;\n line-height: 1;\n cursor: pointer;\n color: var(--le-slot-description-color);\n}\n\n:host(.admin-mode) .le-slot-dropzone {\n display: block;\n min-height: var(--le-slot-dropzone-min-height);\n padding: var(--le-spacing-1, 4px);\n position: relative;\n}\n\n:host(.admin-mode) .le-slot-dropzone:empty::before {\n content: 'Drop content here';\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n inset: 8px;\n border: 2px dashed var(--le-slot-dropzone-border-color);\n border-radius: 4px;\n color: #999;\n font-size: 12px;\n pointer-events: none;\n}\n\n/* Highlight when dragging over */\n:host(.admin-mode.drag-over) .le-slot-container {\n border-color: #00cc66;\n background: rgba(0, 204, 102, 0.1);\n}\n\n:host(.admin-mode.drag-over) .le-slot-dropzone:empty::before {\n border-color: #00cc66;\n color: #00cc66;\n content: 'Release to drop';\n}\n\n/* ============================================\n TEXT INPUT STYLES (Admin mode)\n ============================================ */\n:host(.admin-mode) .le-slot-input {\n display: block;\n padding: var(--le-spacing-1, 4px);\n}\n\n:host(.admin-mode) .le-slot-input input,\n:host(.admin-mode) .le-slot-input textarea {\n display: block;\n width: 100%;\n padding: 8px 10px;\n border: 1px solid var(--le-slot-dropzone-border-color);\n border-radius: 4px;\n font-family: inherit;\n font-size: 14px;\n line-height: 1.4;\n background: #fff;\n color: #333;\n box-sizing: border-box;\n transition: border-color 0.2s, box-shadow 0.2s;\n}\n\n:host(.admin-mode) .le-slot-input input:focus,\n:host(.admin-mode) .le-slot-input textarea:focus {\n outline: none;\n border-color: var(--le-slot-border-color);\n box-shadow: 0 0 0 3px rgba(0, 136, 255, 0.15);\n}\n\n:host(.admin-mode) .le-slot-input input::placeholder,\n:host(.admin-mode) .le-slot-input textarea::placeholder {\n color: #999;\n}\n\n:host(.admin-mode) .le-slot-input textarea {\n resize: vertical;\n min-height: 60px;\n}\n\n/* Hide the slot content in text/textarea mode - it's just for default value */\n:host(.admin-mode) .le-slot-input slot {\n display: none;\n}\n\n/* ============================================\n INVALID HTML STATE\n ============================================ */\n.le-slot-invalid {\n color: var(--le-slot-required-color);\n font-size: 10px;\n margin-left: auto;\n font-weight: normal;\n text-transform: none;\n}\n\n:host(.admin-mode) .le-slot-input.has-error input,\n:host(.admin-mode) .le-slot-input.has-error textarea {\n border-color: var(--le-slot-required-color);\n background: rgba(229, 57, 53, 0.05);\n}\n\n:host(.admin-mode) .le-slot-input.has-error input:focus,\n:host(.admin-mode) .le-slot-input.has-error textarea:focus {\n border-color: var(--le-slot-required-color);\n box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.15);\n}\n\n\n/* ========================================\n Component Picker (Add Button & Popover)\n ======================================== */\n.le-slot-add-btn {\n font-size: 24px;\n line-height: 0px;\n width: 12px;\n height: 12px;\n}\n\n.le-slot-header-no-label .le-slot-add-btn {\n font-size: 16px;\n}\n\n.le-slot-button {\n width: 20px;\n height: 20px;\n}\n\n:host(.admin-mode) .le-slot-header-no-label.le-slot-header-text {\n height: 0;\n}\n","import { Component, Prop, State, h, Host, Element, Event, EventEmitter } from '@stencil/core';\nimport { classnames, observeModeChanges } from '../../utils/utils';\n\n/**\n * Slot placeholder component for admin/CMS mode.\n *\n * This component renders a visual placeholder for slots when in admin mode,\n * allowing CMS systems to show available drop zones for content or inline editing.\n *\n * In non-admin mode, this component renders nothing and acts as a passthrough.\n *\n * @slot - Default slot for placeholder content or drop zone UI\n *\n * @cmsInternal true\n * @cmsCategory System\n */\n@Component({\n tag: 'le-slot',\n styleUrl: 'le-slot.default.css',\n shadow: true,\n})\nexport class LeSlot {\n @Element() el: HTMLElement;\n\n /**\n * The type of slot content.\n * - `slot`: Default, shows a dropzone for components (default)\n * - `text`: Shows a single-line text input\n * - `textarea`: Shows a multi-line text area\n */\n @Prop() type: 'slot' | 'text' | 'textarea' = 'slot';\n\n /**\n * The name of the slot this placeholder represents.\n * Should match the slot name in the parent component.\n */\n @Prop() name: string = '';\n\n /**\n * Label to display in admin mode.\n * If not provided, the slot name will be used.\n */\n @Prop() label?: string;\n\n /**\n * Description of what content this slot accepts.\n * Shown in admin mode to guide content editors.\n */\n @Prop() description?: string;\n\n /**\n * Comma-separated list of allowed component tags for this slot.\n * Used by CMS to filter available components.\n *\n * @example \"le-card,le-button,le-text\"\n */\n @Prop() allowedComponents?: string;\n\n /**\n * Whether multiple components can be dropped in this slot.\n */\n @Prop() multiple: boolean = true;\n\n /**\n * Whether this slot is required to have content.\n */\n @Prop() required: boolean = false;\n\n /**\n * Placeholder text for text/textarea inputs in admin mode.\n */\n @Prop() placeholder?: string;\n\n /**\n * The HTML tag to create when there's no slotted element.\n * Used with type=\"text\" or type=\"textarea\" to auto-create elements.\n * \n * @example \"h3\" - creates <h3 slot=\"header\">content</h3>\n * @example \"p\" - creates <p slot=\"content\">content</p>\n */\n @Prop() tag?: string;\n\n /**\n * CSS styles for the slot dropzone container.\n * Useful for layouts - e.g., \"flex-direction: row\" for horizontal stacks.\n * Only applies in admin mode for type=\"slot\".\n */\n @Prop() slotStyle?: string;\n\n /**\n * Internal state to track admin mode\n */\n @State() private adminMode: boolean = false;\n\n /**\n * Internal state for text input value (synced from slot content)\n */\n @State() private textValue: string = '';\n\n /**\n * Whether the current textValue contains valid HTML\n */\n @State() private isValidHtml: boolean = true;\n\n /**\n * Available components loaded from Custom Elements Manifest\n */\n @State() private availableComponents: ComponentInfo[] = [];\n\n /**\n * Whether the component picker popover is open\n */\n @State() private pickerOpen: boolean = false;\n\n /**\n * Reference to the slot element to access assignedNodes\n */\n private slotRef?: HTMLSlotElement;\n\n /**\n * The original slotted element (e.g., <h3 slot=\"header\">)\n */\n private slottedElement?: Element;\n\n /**\n * Emitted when text content changes in admin mode.\n * The event detail contains the new text value and validity.\n */\n @Event() leSlotChange: EventEmitter<{ name: string; value: string; isValid: boolean }>;\n\n private disconnectModeObserver?: () => void;\n\n connectedCallback() {\n this.disconnectModeObserver = observeModeChanges(this.el, (mode) => {\n const wasAdmin = this.adminMode;\n this.adminMode = mode === 'admin';\n \n // When entering admin mode, read content from slotted elements\n if (this.adminMode && !wasAdmin) {\n // Need to wait for render to access slot ref\n requestAnimationFrame(() => this.readSlottedContent());\n \n // Load available components for the component picker\n if (this.type === 'slot') {\n this.loadAvailableComponents();\n }\n }\n });\n }\n\n disconnectedCallback() {\n this.disconnectModeObserver?.();\n }\n\n /**\n * Flag to prevent re-reading content right after we updated it\n */\n private isUpdating: boolean = false;\n\n /**\n * Read content from slotted elements via assignedNodes()\n */\n private readSlottedContent() {\n if (!this.slotRef) return;\n \n // Skip if we just updated the content ourselves\n if (this.isUpdating) {\n this.isUpdating = false;\n return;\n }\n\n const assignedNodes = this.slotRef.assignedNodes({ flatten: true });\n \n // For text/textarea types, we want to edit the innerHTML of slotted elements\n if (this.type === 'text' || this.type === 'textarea') {\n // Find the first element node (skip text nodes that are just whitespace)\n const elementNode = assignedNodes.find(\n node => node.nodeType === Node.ELEMENT_NODE\n ) as Element | undefined;\n\n if (elementNode) {\n // Only update textValue if slotted element changed or we don't have one yet\n if (this.slottedElement !== elementNode) {\n this.slottedElement = elementNode;\n this.textValue = elementNode.innerHTML?.trim() || '';\n // console.log(`[le-slot \"${this.name}\"] Read slotted content:`, this.textValue);\n }\n } else {\n // No element, check for direct text content\n const textContent = assignedNodes\n .filter(node => node.nodeType === Node.TEXT_NODE)\n .map(node => node.textContent)\n .join('')\n .trim();\n \n if (textContent && !this.textValue) {\n this.textValue = textContent;\n // console.log(`[le-slot \"${this.name}\"] Read text content:`, this.textValue);\n }\n }\n }\n }\n\n /**\n * Validates if a string contains valid HTML\n */\n private validateHtml(html: string): boolean {\n // Empty string is valid\n if (!html.trim()) return true;\n \n // Create a template element to parse the HTML\n const template = document.createElement('template');\n template.innerHTML = html;\n \n // Check that we don't have obviously broken HTML\n // Count opening and closing tags for common elements\n const openTags = (html.match(/<[a-z][^>]*(?<!\\/)>/gi) || []).length;\n const closeTags = (html.match(/<\\/[a-z][^>]*>/gi) || []).length;\n const selfClosing = (html.match(/<[a-z][^>]*\\/>/gi) || []).length;\n \n // Simple validation: opening tags (minus self-closing) should roughly match closing tags\n // Allow some tolerance for void elements like <br>, <img>, etc.\n const voidElements = (html.match(/<(br|hr|img|input|meta|link|area|base|col|embed|param|source|track|wbr)[^>]*>/gi) || []).length;\n \n const effectiveOpenTags = openTags - selfClosing - voidElements;\n \n // If difference is too large, HTML is likely broken\n if (Math.abs(effectiveOpenTags - closeTags) > 1) {\n return false;\n }\n \n return true;\n }\n\n private handleTextInput = (event: Event) => {\n const target = event.target as HTMLInputElement | HTMLTextAreaElement;\n this.textValue = target.value;\n this.isValidHtml = this.validateHtml(this.textValue);\n\n if (this.isValidHtml) {\n // Set flag to prevent slotchange from re-reading what we just wrote\n this.isUpdating = true;\n\n console.log('Updating text value:', this.textValue, 'slottedElement:', this.slottedElement);\n\n if (this.slottedElement) {\n // Update existing slotted element's innerHTML\n this.slottedElement.innerHTML = this.textValue;\n } else if (this.tag && this.textValue) {\n // No slotted element exists\n // If the slot doesn't have a name, then it's the default slot\n // remove the existing non-slotted content (text nodes and elements without slot attribute)\n const rootNode = this.el.getRootNode();\n if (!this.name && rootNode instanceof ShadowRoot) {\n const hostComponent = rootNode.host;\n Array.from(hostComponent.childNodes).forEach(node => {\n if (node.nodeType === Node.TEXT_NODE || \n (node.nodeType === Node.ELEMENT_NODE && !(node as Element).hasAttribute('slot'))) {\n node.remove();\n }\n });\n }\n // create one using the specified tag\n this.createSlottedElement();\n } else if (this.textValue) {\n // no tag specified - just replace everything in the host component\n const rootNode = this.el.getRootNode();\n if (rootNode instanceof ShadowRoot) {\n const hostComponent = rootNode.host;\n hostComponent.innerHTML = this.textValue;\n }\n }\n }\n \n this.leSlotChange.emit({ \n name: this.name, \n value: this.textValue,\n isValid: this.isValidHtml \n });\n };\n\n /**\n * Create a new slotted element when none exists.\n * The element is appended to the host component's light DOM.\n */\n private createSlottedElement() {\n if (!this.tag) return;\n \n // Find the host component (le-card, etc.) by traversing up through shadow DOM\n // le-slot is inside le-card's shadow DOM, so we need to find le-card's host\n const rootNode = this.el.getRootNode();\n if (!(rootNode instanceof ShadowRoot)) return;\n \n const hostComponent = rootNode.host;\n if (!hostComponent) return;\n \n // Create the new element\n const newElement = document.createElement(this.tag);\n newElement.innerHTML = this.textValue;\n \n // Set the slot attribute if this is a named slot\n if (this.name) {\n newElement.setAttribute('slot', this.name);\n }\n \n // Append to the host component's light DOM\n hostComponent.appendChild(newElement);\n \n // Store reference to the new element\n this.slottedElement = newElement;\n \n // console.log(`[le-slot \"${this.name}\"] Created new <${this.tag}> element`);\n }\n\n /**\n * Load available components from Custom Elements Manifest\n */\n private async loadAvailableComponents() {\n try {\n const response = await fetch('/custom-elements.json');\n const manifest = await response.json();\n \n const components: ComponentInfo[] = [];\n const allowedList = this.allowedComponents?.split(',').map(s => s.trim()) || [];\n \n for (const module of manifest.modules) {\n for (const declaration of module.declarations || []) {\n if (declaration.tagName && declaration.customElement) {\n // Skip internal components (le-slot, le-component, le-popover)\n const isInternal = ['le-slot', 'le-component', 'le-popover'].includes(declaration.tagName);\n if (isInternal) continue;\n \n // If allowedComponents is specified, filter by it\n if (allowedList.length > 0 && !allowedList.includes(declaration.tagName)) {\n continue;\n }\n \n components.push({\n tagName: declaration.tagName,\n name: this.formatComponentName(declaration.tagName),\n description: declaration.description || '',\n });\n }\n }\n }\n \n this.availableComponents = components;\n } catch (error) {\n console.warn('[le-slot] Failed to load component manifest:', error);\n }\n }\n\n /**\n * Format a tag name into a display name\n * e.g., 'le-card' -> 'Card'\n */\n private formatComponentName(tagName: string): string {\n return tagName\n .replace(/^le-/, '')\n .split('-')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n }\n\n /**\n * Add a new component to the slot\n */\n private addComponent(tagName: string) {\n // Find the host component by traversing up through shadow DOM\n const rootNode = this.el.getRootNode();\n if (!(rootNode instanceof ShadowRoot)) return;\n \n const hostComponent = rootNode.host;\n if (!hostComponent) return;\n \n // Create the new component element\n const newElement = document.createElement(tagName);\n \n // Set the slot attribute if this is a named slot\n if (this.name) {\n newElement.setAttribute('slot', this.name);\n }\n \n // Append to the host component's light DOM\n hostComponent.appendChild(newElement);\n \n // Emit change event so the page can save\n this.leSlotChange.emit({\n name: this.name,\n value: hostComponent.innerHTML,\n isValid: true,\n });\n }\n\n /**\n * Handle slot change event to re-read content when nodes are assigned\n */\n private handleSlotChange = () => {\n this.readSlottedContent();\n };\n\n render() {\n const displayLabel = this.label || this.name;\n\n // Always render the same structure, CSS handles visibility via .admin-mode class\n return (\n <Host\n class={{ \n 'admin-mode': this.adminMode,\n 'invalid-html': !this.isValidHtml \n }}\n role={this.adminMode ? 'region' : undefined}\n aria-label={this.adminMode ? `Slot: ${displayLabel}` : undefined}\n data-slot-name={this.name}\n data-slot-type={this.type}\n data-allowed={this.allowedComponents}\n data-multiple={this.multiple}\n data-required={this.required}\n >\n {this.adminMode ? (\n <div class=\"le-slot-container\">\n <div class={classnames('le-slot-header', {\n 'le-slot-header-no-label': !displayLabel,\n 'le-slot-header-text': this.type === 'text',\n 'le-slot-header-error': !this.isValidHtml\n })}>\n {displayLabel && (\n <span class=\"le-slot-label\">\n {displayLabel}\n {this.required && <span class=\"le-slot-required\">*</span>}\n </span>\n )}\n {/* {this.description && <le-popover mode=\"default\" showClose={false} align=\"end\" position=\"bottom\">\n <span slot=\"trigger\" class=\"le-slot-description-icon\">ℹ️</span>\n {this.description}\n </le-popover>} */}\n {!this.isValidHtml && <span class=\"le-slot-invalid\">⚠ Invalid HTML</span>}\n {this.type === 'slot' && this.adminMode && (\n <le-popover \n mode=\"default\"\n showClose={true}\n align=\"start\"\n position=\"right\"\n popoverTitle=\"Add Component\"\n open={this.pickerOpen}\n onLePopoverOpen={() => this.pickerOpen = true}\n onLePopoverClose={() => this.pickerOpen = false}\n >\n <le-button\n type=\"button\"\n class=\"le-slot-button\"\n slot=\"trigger\"\n variant=\"clear\"\n size=\"small\"\n aria-label=\"Add component\"\n icon-only\n >\n <span class=\"le-slot-add-btn\" slot=\"icon-only\">+</span>\n </le-button>\n <div class=\"le-slot-picker\">\n {this.availableComponents.length > 0 ? (\n <ul class=\"le-slot-picker-list\">\n {this.availableComponents.map(component => (\n <li key={component.tagName}>\n <button\n class=\"le-slot-picker-item\"\n onClick={() => {\n this.addComponent(component.tagName);\n this.pickerOpen = false;\n }}\n >\n <span class=\"le-slot-picker-name\">{component.name}</span>\n {component.description && (\n <span class=\"le-slot-picker-desc\">{component.description}</span>\n )}\n </button>\n </li>\n ))}\n </ul>\n ) : (\n <div class=\"le-slot-picker-empty\">No components available</div>\n )}\n </div>\n </le-popover>\n )}\n </div>\n {this.renderContent()}\n </div>\n ) : (\n // In default mode, just pass through the slot - slotted content renders naturally\n // Note: We use unnamed slot here because named slots from parent component\n // are passed as le-slot's light DOM children\n <slot \n // ref={(el) => this.slotRef = el as HTMLSlotElement}\n // onSlotchange={this.handleSlotChange}\n ></slot>\n )}\n </Host>\n );\n }\n\n private renderContent() {\n // Create the slot element with ref for reading assignedNodes\n // Wrap in a hidden div since slot elements can't have style prop in Stencil\n // Note: We use unnamed slot here because named slots from parent component\n // are passed as le-slot's light DOM children\n const slotElement = (\n <div class=\"hidden-slot\">\n <slot \n ref={(el) => this.slotRef = el as HTMLSlotElement}\n onSlotchange={this.handleSlotChange}\n ></slot>\n </div>\n );\n\n switch (this.type) {\n case 'text':\n return (\n <div class={{ 'le-slot-input': true, 'has-error': !this.isValidHtml }}>\n <le-string-input\n mode=\"default\"\n value={this.textValue}\n placeholder={this.placeholder || `Enter ${this.label || this.name || 'text'}...`}\n onChange={this.handleTextInput}\n // required={this.required}\n ></le-string-input>\n {slotElement}\n </div>\n );\n\n case 'textarea':\n return (\n <div class={{ 'le-slot-input': true, 'has-error': !this.isValidHtml }}>\n <textarea\n value={this.textValue}\n placeholder={this.placeholder || `Enter ${this.label || this.name || 'text'}...`}\n onInput={this.handleTextInput}\n required={this.required}\n rows={3}\n ></textarea>\n {slotElement}\n </div>\n );\n\n case 'slot':\n default:\n // Parse slotStyle string into style object if provided\n const dropzoneStyle: { [key: string]: string } = {};\n if (this.slotStyle) {\n this.slotStyle.split(';').forEach(rule => {\n const [prop, value] = rule.split(':').map(s => s.trim());\n if (prop && value) {\n // Convert kebab-case to camelCase for style object\n const camelProp = prop.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());\n dropzoneStyle[camelProp] = value;\n }\n });\n }\n return (\n <div class=\"le-slot-dropzone\" style={dropzoneStyle}>\n <slot \n ref={(el) => this.slotRef = el as HTMLSlotElement}\n onSlotchange={this.handleSlotChange}\n ></slot>\n </div>\n );\n }\n }\n}\n\n/**\n * Component info from the manifest\n */\ninterface ComponentInfo {\n tagName: string;\n name: string;\n description: string;\n}\n","/**\n * le-component styles\n * \n * In default mode, the component is invisible (passthrough).\n * In admin mode, it shows a wrapper with header and settings.\n */\n\n:host {\n display: contents;\n}\n\n:host(.admin-mode) {\n display: block;\n}\n\n/* Admin mode wrapper */\n.le-component-wrapper {\n position: relative;\n border: 2px dashed var(--le-admin-border-color, #90caf9);\n border-radius: var(--le-radius-md, 8px);\n background: var(--le-admin-bg, rgba(144, 202, 249, 0.05));\n transition: border-color 0.2s ease, box-shadow 0.2s ease;\n}\n\n.le-component-wrapper:hover {\n border-color: var(--le-admin-border-hover, #42a5f5);\n box-shadow: 0 0 0 2px var(--le-admin-glow, rgba(66, 165, 245, 0.2));\n}\n\n/* Component header */\n.le-component-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--le-spacing-1, 4px);\n padding: 0 0 0 var(--le-spacing-1, 4px);\n background: var(--le-admin-header-bg, rgba(144, 202, 249, 0.15));\n border-bottom: 1px solid var(--le-admin-border-color, #90caf9);\n border-radius: var(--le-radius-md, 8px) var(--le-radius-md, 8px) 0 0;\n font-size: var(--le-font-size-xs, 11px);\n}\n\n.le-component-name {\n font-weight: var(--le-font-weight-medium, 500);\n color: var(--le-admin-text, #1976d2);\n text-transform: capitalize;\n text-align: start;\n overflow: hidden;\n width: 0;\n flex: 1 1 0%;\n}\n\n/* Component content area */\n.le-component-content {\n padding: var(--le-space-xs, 4px);\n}\n\n.le-component-trigger {\n font-size: 24px;\n line-height: 0px;\n width: 12px;\n height: 12px;\n}\n.le-component-button {\n width: 20px;\n}\n\n/* Property editor styles */\n.property-editor {\n display: flex;\n flex-direction: column;\n gap: var(--le-space-sm, 8px);\n max-width: 380px;\n}\n\n.property-field {\n display: flex;\n flex-direction: column;\n gap: var(--le-space-xs, 4px);\n}\n\n.property-field label {\n display: flex;\n flex-direction: column;\n gap: 2px;\n font-size: var(--le-font-size-sm, 13px);\n font-weight: var(--le-font-weight-medium, 500);\n color: var(--le-color-text, #333);\n}\n\n.property-hint {\n font-size: var(--le-font-size-xs, 11px);\n font-weight: normal;\n color: var(--le-color-text-secondary, #666);\n line-height: 1.3;\n}\n\n.property-field input[type=\"text\"],\n.property-field input[type=\"number\"],\n.property-field select {\n padding: var(--le-space-xs, 4px) var(--le-space-sm, 8px);\n border: 1px solid var(--le-color-border, #ddd);\n border-radius: var(--le-radius-md, 7px);\n font-size: var(--le-font-size-sm, 13px);\n font-family: inherit;\n background: var(--le-color-surface, #fff);\n color: var(--le-color-text, #333);\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\n\n.property-field input:focus,\n.property-field select:focus {\n outline: none;\n border-color: var(--le-color-primary, #1976d2);\n box-shadow: 0 0 0 2px var(--le-color-primary-light, rgba(25, 118, 210, 0.2));\n}\n\n/* Checkbox field */\n.property-field--checkbox {\n flex-direction: column;\n}\n\n.property-field--checkbox label {\n flex-direction: row;\n align-items: center;\n gap: var(--le-space-sm, 8px);\n cursor: pointer;\n}\n\n.property-field--checkbox input[type=\"checkbox\"] {\n width: 16px;\n height: 16px;\n margin: 0;\n cursor: pointer;\n accent-color: var(--le-color-primary, #1976d2);\n}\n\n.property-field--checkbox .property-hint {\n margin-left: 24px;\n}\n\n/* No properties message */\n.no-properties {\n margin: 0;\n padding: var(--le-space-sm, 8px);\n font-size: var(--le-font-size-sm, 13px);\n color: var(--le-color-text-secondary, #666);\n text-align: center;\n}\n\n/* Property editor container */\n.property-editor-container {\n display: flex;\n flex-direction: column;\n gap: var(--le-space-md, 12px);\n}\n\n/* Actions section at bottom of editor */\n.property-editor-actions {\n padding-top: var(--le-space-sm, 8px);\n border-top: 1px solid var(--le-color-border, #e5e5e5);\n}\n\n/* Delete component button */\n.delete-component-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--le-space-xs, 4px);\n width: 100%;\n padding: var(--le-space-sm, 8px) var(--le-space-md, 12px);\n border: 1px solid var(--le-color-danger, #e53935);\n border-radius: var(--le-radius-md, 6px);\n background: transparent;\n color: var(--le-color-danger, #e53935);\n font-size: var(--le-font-size-sm, 13px);\n font-weight: 500;\n cursor: pointer;\n transition: background-color 0.15s, color 0.15s;\n}\n\n.delete-component-btn:hover {\n background: var(--le-color-danger, #e53935);\n color: white;\n}\n\n.delete-component-btn:active {\n opacity: 0.9;\n}\n","import { Component, Prop, State, h, Host, Element } from '@stencil/core';\nimport { classnames, observeModeChanges } from '../../utils/utils';\n\n/**\n * Component wrapper for admin mode editing.\n *\n * This component is used internally by other components to provide admin-mode \n * editing capabilities. It wraps the component's rendered output and shows\n * a settings popover for editing properties.\n *\n * In default mode, it acts as a simple passthrough (display: contents).\n * In admin mode, it shows a border, component name header, and settings popover.\n *\n * The host element is found automatically by traversing up through the shadow DOM.\n *\n * Usage inside a component's render method:\n * ```tsx\n * render() {\n * return (\n * <le-component component=\"le-card\">\n * <Host>...</Host>\n * </le-component>\n * );\n * }\n * ```\n *\n * @slot - The component's rendered content\n *\n * @cmsInternal true\n * @cmsCategory System\n */\n@Component({\n tag: 'le-component',\n styleUrl: 'le-component.css',\n shadow: true,\n})\nexport class LeComponent {\n @Element() el: HTMLElement;\n\n /**\n * The tag name of the component (e.g., 'le-card').\n * Used to look up property metadata and display the component name.\n */\n @Prop() component!: string;\n\n /**\n * Optional display name for the component.\n * If not provided, the tag name will be formatted as the display name.\n */\n @Prop() displayName?: string;\n\n /**\n * Classes to apply to the host element.\n * Allows parent components to pass their styling classes.\n */\n @Prop() hostClass?: string;\n\n /**\n * Inline styles to apply to the host element.\n * Allows parent components to pass dynamic styles (e.g., flex properties).\n */\n @Prop() hostStyle?: { [key: string]: string };\n\n /**\n * Reference to the host element (found automatically from parent)\n */\n private hostElement?: HTMLElement;\n\n /**\n * Internal state to track admin mode\n */\n @State() private adminMode: boolean = false;\n\n /**\n * Component metadata loaded from Custom Elements Manifest\n */\n @State() private componentMeta: ComponentMetadata | null = null;\n\n /**\n * Current property values of the host component\n */\n @State() private propertyValues: Record<string, any> = {};\n\n private disconnectModeObserver?: () => void;\n\n connectedCallback() {\n // Find the host element - le-component is rendered inside the component's shadow DOM,\n // so we need to find the shadow root's host element\n this.findHostElement();\n\n this.disconnectModeObserver = observeModeChanges(this.el, (mode) => {\n this.adminMode = mode === 'admin';\n // Load metadata and refresh property values only when entering admin mode\n if (this.adminMode) {\n if (!this.componentMeta) {\n this.loadComponentMetadata();\n } else {\n this.readPropertyValues();\n }\n }\n });\n }\n\n /**\n * Find the host element by traversing up through shadow DOM\n */\n private findHostElement() {\n // Get the shadow root that contains this le-component\n const rootNode = this.el.getRootNode();\n if (rootNode instanceof ShadowRoot) {\n // The host of this shadow root is our target component (e.g., le-card)\n this.hostElement = rootNode.host as HTMLElement;\n }\n }\n\n componentDidLoad() {\n // Read initial property values from the host element\n this.readPropertyValues();\n }\n\n disconnectedCallback() {\n this.disconnectModeObserver?.();\n }\n\n /**\n * Formats a tag name into a display name\n * e.g., 'le-card' -> 'Card'\n */\n private formatDisplayName(tagName: string): string {\n return tagName\n .replace(/^le-/, '') // Remove 'le-' prefix\n .split('-')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n }\n\n /**\n * Load component metadata from the Custom Elements Manifest\n */\n private async loadComponentMetadata() {\n try {\n // Fetch the manifest - in production this would be bundled or cached\n const response = await fetch('/custom-elements.json');\n const manifest = await response.json();\n\n // Find the component definition\n for (const module of manifest.modules) {\n for (const declaration of module.declarations || []) {\n if (declaration.tagName === this.component) {\n const attributes = (declaration.attributes || []).filter(\n (attr: AttributeMetadata) => !this.isInternalAttribute(attr.name)\n );\n this.componentMeta = {\n tagName: declaration.tagName,\n description: declaration.description,\n attributes,\n };\n // console.log(`[le-component] Loaded metadata for ${this.component}:`, this.componentMeta);\n // Read property values after metadata is loaded\n this.readPropertyValues();\n return;\n }\n }\n }\n // console.warn(`[le-component] No metadata found for component: ${this.component}`);\n } catch (error) {\n // console.warn(`[le-component] Failed to load metadata for component: ${this.component}`, error);\n }\n }\n\n /**\n * Check if an attribute is internal (should not be shown in editor)\n */\n private isInternalAttribute(name: string): boolean {\n const internalAttrs = ['mode', 'theme', 'class', 'style', 'id', 'slot'];\n return internalAttrs.includes(name);\n }\n\n /**\n * Read current property values from the host element\n */\n private readPropertyValues() {\n if (!this.hostElement || !this.componentMeta) return;\n\n const values: Record<string, any> = {};\n for (const attr of this.componentMeta.attributes) {\n const value = this.hostElement.getAttribute(attr.name);\n values[attr.name] = this.parseAttributeValue(value, attr.type?.text);\n }\n this.propertyValues = values;\n }\n\n /**\n * Parse an attribute value based on its type\n */\n private parseAttributeValue(value: string | null, type?: string): any {\n if (value === null) return undefined;\n \n if (type === 'boolean') {\n return value !== null && value !== 'false';\n }\n if (type === 'number') {\n return parseFloat(value);\n }\n return value;\n }\n\n /**\n * Handle property value changes from the editor\n */\n private handlePropertyChange(attrName: string, value: any, type?: string) {\n if (!this.hostElement) return;\n\n // Update the host element's attribute\n if (type === 'boolean') {\n if (value) {\n this.hostElement.setAttribute(attrName, '');\n } else {\n this.hostElement.removeAttribute(attrName);\n }\n } else if (value === undefined || value === '') {\n this.hostElement.removeAttribute(attrName);\n } else {\n this.hostElement.setAttribute(attrName, String(value));\n }\n\n // Update local state\n this.propertyValues = { ...this.propertyValues, [attrName]: value };\n }\n\n /**\n * Delete this component from the DOM\n */\n private deleteComponent() {\n if (!this.hostElement) return;\n\n // Confirm deletion\n const name = this.displayName || this.formatDisplayName(this.component);\n if (!confirm(`Delete this ${name}?`)) return;\n\n // Remove the host element from its parent\n const parent = this.hostElement.parentElement;\n if (parent) {\n this.hostElement.remove();\n }\n }\n\n /**\n * Render the property editor form\n */\n private renderPropertyEditor() {\n const hasProperties = this.componentMeta && this.componentMeta.attributes.length > 0;\n\n return (\n <div class=\"property-editor-container\">\n {hasProperties ? (\n <form class=\"property-editor\" onSubmit={(e) => e.preventDefault()}>\n {this.componentMeta!.attributes.map(attr => this.renderPropertyField(attr))}\n </form>\n ) : (\n <p class=\"no-properties\">No editable properties</p>\n )}\n <div class=\"property-editor-actions\">\n <le-button\n type=\"button\"\n variant=\"outlined\"\n color=\"danger\"\n full-width\n onClick={() => this.deleteComponent()}\n >\n <span slot=\"icon-start\">🗑️</span>\n <span>Delete Component</span>\n </le-button>\n </div>\n </div>\n );\n }\n\n /**\n * Render a single property field based on its type\n */\n private renderPropertyField(attr: AttributeMetadata) {\n const value = this.propertyValues[attr.name];\n const type = attr.type?.text || 'string';\n\n // Check if type is a union of string literals (e.g., \"'default' | 'outlined' | 'elevated'\")\n const enumMatch = type.match(/^'[^']+'/);\n if (enumMatch) {\n const options = type.split('|').map(opt => opt.trim().replace(/'/g, ''));\n return (\n <div class=\"property-field\">\n <label htmlFor={`prop-${attr.name}`}>\n {attr.name}\n {attr.description && <span class=\"property-hint\">{attr.description}</span>}\n </label>\n <select\n id={`prop-${attr.name}`}\n onChange={(e) => this.handlePropertyChange(attr.name, (e.target as HTMLSelectElement).value, type)}\n >\n {options.map(opt => (\n <option value={opt} selected={value === opt || (!value && attr.default?.replace(/'/g, '') === opt)}>{opt}</option>\n ))}\n </select>\n </div>\n );\n }\n\n // Boolean type\n if (type === 'boolean') {\n return (\n <div class=\"property-field property-field--checkbox\">\n <le-checkbox\n name={`prop-${attr.name}`}\n checked={value === true || value === ''}\n onChange={(e) => this.handlePropertyChange(attr.name, (e.target as HTMLInputElement).checked, type)}\n >\n {attr.name}\n {attr.description && <div slot=\"description\">{attr.description}</div>}\n </le-checkbox>\n </div>\n );\n }\n\n // Number type\n if (type === 'number') {\n return (\n <div class=\"property-field\">\n <label htmlFor={`prop-${attr.name}`}>\n {attr.name}\n {attr.description && <span class=\"property-hint\">{attr.description}</span>}\n </label>\n <input\n type=\"number\"\n id={`prop-${attr.name}`}\n value={value ?? ''}\n placeholder={attr.default}\n onChange={(e) => this.handlePropertyChange(attr.name, (e.target as HTMLInputElement).value, type)}\n />\n </div>\n );\n }\n\n // Default: string/text input\n return (\n <div class=\"property-field\">\n <le-string-input\n name={`prop-${attr.name}`}\n label={attr.name}\n value={value ?? ''}\n placeholder={attr.default?.replace(/'/g, '')}\n onChange={(e: any) => this.handlePropertyChange(attr.name, e.detail.value, type)}\n >\n <span slot=\"description\">{attr.description}</span>\n </le-string-input>\n </div>\n );\n }\n\n render() {\n const name = this.displayName || this.formatDisplayName(this.component);\n\n // In default mode, just pass through content with host classes\n if (!this.adminMode) {\n return (\n <Host class={classnames(this.component, this.hostClass)} style={this.hostStyle}>\n <slot></slot>\n </Host>\n );\n }\n\n // In admin mode, show wrapper with header and settings\n return (\n <Host class={classnames(this.component, this.hostClass, 'admin-mode')} style={this.hostStyle}>\n <div class=\"le-component-wrapper\">\n <div class=\"le-component-header\">\n <span class=\"le-component-name\">{name}</span>\n <le-popover \n popoverTitle={`${name} Settings`}\n position=\"right\"\n align=\"start\"\n min-width=\"300px\"\n mode=\"default\"\n >\n <le-button\n type=\"button\"\n class=\"le-component-button\"\n slot=\"trigger\"\n variant=\"clear\"\n size=\"small\"\n aria-label=\"Edit component properties\"\n icon-only\n >\n <span class=\"le-component-trigger\" slot=\"icon-only\">⚙</span>\n </le-button>\n {this.renderPropertyEditor()}\n </le-popover>\n </div>\n <div class=\"le-component-content\">\n <slot></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n\n/**\n * Type definitions for component metadata\n */\ninterface ComponentMetadata {\n tagName: string;\n description?: string;\n attributes: AttributeMetadata[];\n}\n\ninterface AttributeMetadata {\n name: string;\n fieldName?: string;\n description?: string;\n default?: string;\n type?: {\n text: string;\n };\n}\n",":host {\n display: block;\n --le-checkbox-size: 18px;\n --le-checkbox-color: var(--le-color-primary, #007bff);\n --le-checkbox-label-color: var(--le-color-text-primary, #333);\n --le-checkbox-desc-color: var(--le-color-text-secondary, #666);\n --le-checkbox-border-radius: var(--le-radius-sm, 2px);\n --le-checkbox-marker-color: var(--le-color-surface, #fff);\n}\n\n.le-checkbox-wrapper {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.le-checkbox-label {\n display: inline-flex;\n align-items: flex-start;\n gap: 8px;\n cursor: pointer;\n user-select: none;\n}\n\n:host([disabled]) .le-checkbox-label {\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.le-checkbox-input {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 1.4em;\n}\n\ninput[type=\"checkbox\"] {\n appearance: none;\n -webkit-appearance: none;\n width: var(--le-checkbox-size);\n height: var(--le-checkbox-size);\n border: var(--le-border-width, 2px) solid var(--le-checkbox-color);\n border-radius: var(--le-checkbox-border-radius);\n margin: 0;\n margin-top: 2px; /* Align with text */\n position: relative;\n cursor: inherit;\n background-color: transparent;\n transition: background-color 0.2s, border-color 0.2s;\n}\n\ninput[type=\"checkbox\"]:checked {\n background-color: var(--le-checkbox-color);\n}\n\ninput[type=\"checkbox\"]:checked::after {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n bottom: calc(var(--le-checkbox-size) / 5);\n right: 0;\n margin: auto;\n width: calc(var(--le-checkbox-size) / 4);\n height: calc(var(--le-checkbox-size) / 2);\n border: solid var(--le-checkbox-marker-color, #fff);\n border-width: 0 calc(var(--le-checkbox-size) / 10) calc(var(--le-checkbox-size) / 10) 0;\n transform: rotate(45deg);\n}\n\ninput[type=\"checkbox\"]:focus-visible {\n outline: 2px solid var(--le-color-focus);\n outline-offset: 2px;\n}\n\n.le-checkbox-text {\n flex: 1;\n flex-wrap: wrap;\n color: var(--le-checkbox-label-color);\n line-height: 1.5;\n text-align: start;\n}\n\n.le-checkbox-description {\n margin-left: calc(var(--le-checkbox-size) + 8px);\n font-size: 0.875em;\n color: var(--le-checkbox-desc-color);\n line-height: 1.4;\n}\n\n:host [slot=\"description\"] {\n margin: 0;\n}\n","import { Component, Prop, Event, EventEmitter, h, Element } from '@stencil/core';\nimport { classnames } from '../../utils/utils';\n\n/**\n * A checkbox component with support for labels, descriptions, and external IDs.\n *\n * @slot - The label text for the checkbox\n * @slot description - Additional description text displayed below the label\n *\n * @cssprop --le-checkbox-size - Size of the checkbox input\n * @cssprop --le-checkbox-color - Color of the checkbox when checked\n * @cssprop --le-checkbox-label-color - Color of the label text\n * @cssprop --le-checkbox-desc-color - Color of the description text\n */\n@Component({\n tag: 'le-checkbox',\n styleUrl: 'le-checkbox.css',\n shadow: true,\n})\nexport class LeCheckbox {\n @Element() el: HTMLElement;\n\n /**\n * Whether the checkbox is checked\n */\n @Prop({ mutable: true, reflect: true }) checked: boolean = false;\n\n /**\n * Whether the checkbox is disabled\n */\n @Prop() disabled: boolean = false;\n\n /**\n * The name of the checkbox input\n */\n @Prop() name: string;\n\n /**\n * The value of the checkbox input\n */\n @Prop() value: string;\n\n /**\n * External ID for linking with external systems (e.g. database ID, PDF form field ID)\n */\n @Prop() externalId: string;\n\n /**\n * Emitted when the checked state changes\n */\n @Event({ eventName: 'change' }) leChange: EventEmitter<{ checked: boolean; value: string; name: string; externalId: string }>;\n\n private handleChange = (event: Event) => {\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 const input = event.target as HTMLInputElement;\n this.checked = input.checked;\n this.leChange.emit({\n checked: this.checked,\n value: this.value,\n name: this.name,\n externalId: this.externalId\n });\n };\n\n render() {\n return (\n <le-component component=\"le-checkbox\" hostClass={classnames({ 'disabled': this.disabled })}>\n <div class=\"le-checkbox-wrapper\">\n <label class=\"le-checkbox-label\">\n <span class=\"le-checkbox-input\">\n <input\n type=\"checkbox\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n onChange={this.handleChange}\n />\n </span>\n <span class=\"le-checkbox-text\">\n <le-slot name=\"\" type=\"text\" tag=\"span\">\n <slot></slot>\n </le-slot>\n </span>\n </label>\n \n <div class=\"le-checkbox-description\">\n <le-slot name=\"description\" type=\"text\" tag=\"div\" label=\"Description\">\n <slot name=\"description\"></slot>\n </le-slot>\n </div>\n </div>\n </le-component>\n );\n }\n}\n","/**\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 > le-component.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 > le-component.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 > le-component.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 > le-component.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 > le-component.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 > le-component.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 > le-component.variant-solid .button {\n box-shadow: var(--le-shadow-sm);\n}\n\n:host > le-component.variant-solid .button:hover:not(:disabled) {\n box-shadow: var(--le-shadow-md);\n}\n\n/* Outlined */\n:host > le-component.variant-outlined .button {\n background: transparent;\n color: var(--_btn-bg);\n border-color: var(--_btn-border-color);\n}\n\n:host > le-component.variant-outlined .button:hover:not(:disabled) {\n background: var(--_btn-bg);\n color: var(--_btn-color);\n}\n\n/* Clear (ghost) */\n:host > le-component.variant-clear .button {\n background: transparent;\n color: var(--_btn-bg);\n border-color: transparent;\n}\n\n:host > le-component.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 > le-component.variant-system .button {\n background: transparent;\n color: var(--_btn-bg-system);\n border-color: transparent;\n}\n\n/* ===========================================\n * SIZES\n * =========================================== */\n:host > le-component.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 > le-component.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 > le-component.full-width {\n display: block;\n width: 100%;\n}\n\n/* Selected state */\n:host > le-component.selected .button {\n box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);\n}\n\n:host > le-component.variant-outlined.selected .button,\n:host > le-component.variant-clear.selected .button {\n background: var(--_btn-bg);\n color: var(--_btn-color);\n}\n\n/* Icon only */\n:host > le-component.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 > le-component.icon-only.size-small .button {\n padding: var(--le-button-small-padding, 0.25rem);\n}\n\n:host > le-component.icon-only.size-large .button {\n padding: 0.75rem;\n}\n\n/* Hide content in icon-only mode */\n:host > le-component.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 } 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"],"version":3}