le-kit 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,13 +7,11 @@ export { setAssetPath } from '../components/index';
7
7
 
8
8
  export { LeBox } from '../components/le-box';
9
9
  export { LeButton } from '../components/le-button';
10
- export { LeButton2 } from '../components/le-button2';
11
10
  export { LeCard } from '../components/le-card';
12
11
  export { LeCheckbox } from '../components/le-checkbox';
13
12
  export { LeComponent } from '../components/le-component';
14
13
  export { LeNumberInput } from '../components/le-number-input';
15
14
  export { LePopover } from '../components/le-popover';
16
- export { LePopover2 } from '../components/le-popover2';
17
15
  export { LePopup } from '../components/le-popup';
18
16
  export { LeRoundProgress } from '../components/le-round-progress';
19
17
  export { LeSlot } from '../components/le-slot';
@@ -11,13 +11,11 @@ export { setAssetPath } from '../components/index.js';
11
11
  // Component imports
12
12
  import { LeBox } from '../components/le-box.js';
13
13
  import { LeButton } from '../components/le-button.js';
14
- import { LeButton2 } from '../components/le-button2.js';
15
14
  import { LeCard } from '../components/le-card.js';
16
15
  import { LeCheckbox } from '../components/le-checkbox.js';
17
16
  import { LeComponent } from '../components/le-component.js';
18
17
  import { LeNumberInput } from '../components/le-number-input.js';
19
18
  import { LePopover } from '../components/le-popover.js';
20
- import { LePopover2 } from '../components/le-popover2.js';
21
19
  import { LePopup } from '../components/le-popup.js';
22
20
  import { LeRoundProgress } from '../components/le-round-progress.js';
23
21
  import { LeSlot } from '../components/le-slot.js';
@@ -30,13 +28,11 @@ import { LeTurntable } from '../components/le-turntable.js';
30
28
  export {
31
29
  LeBox,
32
30
  LeButton,
33
- LeButton2,
34
31
  LeCard,
35
32
  LeCheckbox,
36
33
  LeComponent,
37
34
  LeNumberInput,
38
35
  LePopover,
39
- LePopover2,
40
36
  LePopup,
41
37
  LeRoundProgress,
42
38
  LeSlot,
@@ -56,13 +52,11 @@ export function defineCustomElements(win = typeof window !== 'undefined' ? windo
56
52
  const components = [
57
53
  ['le-box', LeBox],
58
54
  ['le-button', LeButton],
59
- ['le-button2', LeButton2],
60
55
  ['le-card', LeCard],
61
56
  ['le-checkbox', LeCheckbox],
62
57
  ['le-component', LeComponent],
63
58
  ['le-number-input', LeNumberInput],
64
59
  ['le-popover', LePopover],
65
- ['le-popover2', LePopover2],
66
60
  ['le-popup', LePopup],
67
61
  ['le-round-progress', LeRoundProgress],
68
62
  ['le-slot', LeSlot],
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Le-Kit Admin - Auto-registering entry point
3
+ * Import this file to automatically register all admin components
4
+ *
5
+ * Usage: import 'le-kit/admin';
6
+ */
7
+ import { defineCustomElements } from './index.js';
8
+ defineCustomElements();
9
+ export * from './index.js';
@@ -5,12 +5,10 @@ export { LeBox, defineCustomElement as defineCustomElementLeBox } from './le-box
5
5
  export { LeButton, defineCustomElement as defineCustomElementLeButton } from './le-button.js';
6
6
  export { LeCard, defineCustomElement as defineCustomElementLeCard } from './le-card.js';
7
7
  export { LeCheckbox, defineCustomElement as defineCustomElementLeCheckbox } from './le-checkbox.js';
8
- export { LeComponent, defineCustomElement as defineCustomElementLeComponent } from './le-component.js';
9
8
  export { LeNumberInput, defineCustomElement as defineCustomElementLeNumberInput } from './le-number-input.js';
10
9
  export { LePopover, defineCustomElement as defineCustomElementLePopover } from './le-popover.js';
11
10
  export { LePopup, defineCustomElement as defineCustomElementLePopup } from './le-popup.js';
12
11
  export { LeRoundProgress, defineCustomElement as defineCustomElementLeRoundProgress } from './le-round-progress.js';
13
- export { LeSlot, defineCustomElement as defineCustomElementLeSlot } from './le-slot.js';
14
12
  export { LeStack, defineCustomElement as defineCustomElementLeStack } from './le-stack.js';
15
13
  export { LeStringInput, defineCustomElement as defineCustomElementLeStringInput } from './le-string-input.js';
16
14
  export { LeText, defineCustomElement as defineCustomElementLeText } from './le-text.js';
@@ -7,12 +7,10 @@ export { setAssetPath } from './stencil-runtime';
7
7
 
8
8
  export { LeBox } from './components/le-box';
9
9
  export { LeButton } from './components/le-button';
10
- export { LeButton2 } from './components/le-button2';
11
10
  export { LeCard } from './components/le-card';
12
11
  export { LeCheckbox } from './components/le-checkbox';
13
12
  export { LeNumberInput } from './components/le-number-input';
14
13
  export { LePopover } from './components/le-popover';
15
- export { LePopover2 } from './components/le-popover2';
16
14
  export { LePopup } from './components/le-popup';
17
15
  export { LeRoundProgress } from './components/le-round-progress';
18
16
  export { LeStack } from './components/le-stack';
@@ -11,12 +11,10 @@ export { setAssetPath } from './stencil-runtime.js';
11
11
  // Component imports
12
12
  import { LeBox } from './components/le-box.js';
13
13
  import { LeButton } from './components/le-button.js';
14
- import { LeButton2 } from './components/le-button2.js';
15
14
  import { LeCard } from './components/le-card.js';
16
15
  import { LeCheckbox } from './components/le-checkbox.js';
17
16
  import { LeNumberInput } from './components/le-number-input.js';
18
17
  import { LePopover } from './components/le-popover.js';
19
- import { LePopover2 } from './components/le-popover2.js';
20
18
  import { LePopup } from './components/le-popup.js';
21
19
  import { LeRoundProgress } from './components/le-round-progress.js';
22
20
  import { LeStack } from './components/le-stack.js';
@@ -28,12 +26,10 @@ import { LeTurntable } from './components/le-turntable.js';
28
26
  export {
29
27
  LeBox,
30
28
  LeButton,
31
- LeButton2,
32
29
  LeCard,
33
30
  LeCheckbox,
34
31
  LeNumberInput,
35
32
  LePopover,
36
- LePopover2,
37
33
  LePopup,
38
34
  LeRoundProgress,
39
35
  LeStack,
@@ -52,12 +48,10 @@ export function defineCustomElements(win = typeof window !== 'undefined' ? windo
52
48
  const components = [
53
49
  ['le-box', LeBox],
54
50
  ['le-button', LeButton],
55
- ['le-button2', LeButton2],
56
51
  ['le-card', LeCard],
57
52
  ['le-checkbox', LeCheckbox],
58
53
  ['le-number-input', LeNumberInput],
59
54
  ['le-popover', LePopover],
60
- ['le-popover2', LePopover2],
61
55
  ['le-popup', LePopup],
62
56
  ['le-round-progress', LeRoundProgress],
63
57
  ['le-stack', LeStack],
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Le-Kit Core - Auto-registering entry point
3
+ * Import this file to automatically register all core components
4
+ *
5
+ * Usage: import 'le-kit/core';
6
+ */
7
+ import { defineCustomElements } from './index.js';
8
+ defineCustomElements();
9
+ export * from './index.js';
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-12-13T17:39:35",
2
+ "timestamp": "2025-12-14T06:18:11",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.38.3",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "le-kit",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
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,36 +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 { defineCustomElements } from 'le-kit/core';
57
+ import { defineCustomElements } from 'le-kit/core/define';
65
58
  defineCustomElements();
66
59
  ```
67
60
 
68
- > **Note for Stencil apps**: If you're using le-kit in another Stencil project, use the lazy-loading import (`import 'le-kit'`) instead to avoid runtime conflicts.
69
-
70
- ### Option 4: Admin Build (CMS Editing)
61
+ ### Option 3: Admin Build (CMS Editing)
71
62
 
72
63
  Includes full CMS editing capabilities with inline editing and property panels.
73
64
 
74
65
  ```tsx
66
+ // Auto-registers all admin components
75
67
  import 'le-kit/admin';
76
68
  ```
77
69
 
@@ -82,28 +74,44 @@ import 'le-kit/admin';
82
74
  </html>
83
75
  ```
84
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
+
85
91
  ## Theming
86
92
 
87
- 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
88
96
 
89
97
  ```html
90
- <!-- Base tokens (required) -->
91
- <link rel="stylesheet" href="le-kit/dist/themes/base.css" />
92
-
93
- <!-- Choose a theme -->
94
- <link rel="stylesheet" href="le-kit/dist/themes/default.css" />
95
- <!-- or -->
96
- <link rel="stylesheet" href="le-kit/dist/themes/dark.css" />
97
- <link rel="stylesheet" href="le-kit/dist/themes/minimal.css" />
98
- <link rel="stylesheet" href="le-kit/dist/themes/warm.css" />
99
- <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" />
100
105
  ```
101
106
 
102
- Or import in JavaScript:
107
+ Available themes: `default`, `dark`, `minimal`, `warm`, `gradient`
108
+
109
+ ### Via JavaScript/CSS import
103
110
 
104
111
  ```tsx
105
- import 'le-kit/themes/base';
106
- 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';
107
115
  ```
108
116
 
109
117
  ### Custom Theming