@lazhus/kg-ui 0.3.2 → 0.4.0
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.
- package/README.md +30 -24
- package/custom-elements.json +691 -53
- package/dist/components/kg-avatar.js +137 -0
- package/dist/components/kg-breadcrumbs.js +130 -0
- package/dist/components/kg-list.js +90 -0
- package/dist/components/kg-tag.js +121 -0
- package/dist/components/kg-tooltip.js +131 -0
- package/dist/components/kg-tree.js +121 -0
- package/dist/index.js +26 -11
- package/dist/kg-ui.css +1 -1
- package/package.json +1 -1
- package/types/components/kg-avatar.d.ts +28 -0
- package/types/components/kg-breadcrumbs.d.ts +25 -0
- package/types/components/kg-list.d.ts +20 -0
- package/types/components/kg-tag.d.ts +25 -0
- package/types/components/kg-tooltip.d.ts +28 -0
- package/types/components/kg-tree.d.ts +28 -0
- package/types/index.d.ts +62 -0
package/custom-elements.json
CHANGED
|
@@ -171,6 +171,227 @@
|
|
|
171
171
|
}
|
|
172
172
|
]
|
|
173
173
|
},
|
|
174
|
+
{
|
|
175
|
+
"kind": "javascript-module",
|
|
176
|
+
"path": "src/components/kg-avatar.js",
|
|
177
|
+
"declarations": [
|
|
178
|
+
{
|
|
179
|
+
"kind": "class",
|
|
180
|
+
"description": "",
|
|
181
|
+
"name": "kgavatar",
|
|
182
|
+
"members": [
|
|
183
|
+
{
|
|
184
|
+
"kind": "field",
|
|
185
|
+
"name": "properties",
|
|
186
|
+
"type": {
|
|
187
|
+
"text": "object"
|
|
188
|
+
},
|
|
189
|
+
"static": true,
|
|
190
|
+
"default": "{ src: { type: String }, alt: { type: String }, name: { type: String }, size: { type: String }, // tiny, small, medium, large, huge, massive shape: { type: String }, // circle, square, rounded status: { type: String }, // online, offline, away, busy badge: { type: String }, // numeric or simple dot color: { type: String }, // primary, secondary, tertiary, etc. or hex }"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"kind": "field",
|
|
194
|
+
"name": "styles",
|
|
195
|
+
"static": true,
|
|
196
|
+
"default": "css` :host { display: inline-block; vertical-align: middle; position: relative; line-height: 0; } .avatar-wrapper { display: flex; align-items: center; justify-content: center; background: var(--kg-bg-secondary, #eee); color: var(--kg-text-muted, #666); font-weight: 700; overflow: hidden; user-select: none; transition: all 0.2s ease; position: relative; } .avatar-img { width: 100%; height: 100%; object-fit: cover; } .initials { text-transform: uppercase; } /* Shapes */ .circle { border-radius: 50%; } .square { border-radius: 0; } .rounded { border-radius: var(--kg-radius-md, 8px); } /* Sizes */ .tiny { width: 24px; height: 24px; font-size: 0.7rem; } .small { width: 32px; height: 32px; font-size: 0.85rem; } .medium { width: 48px; height: 48px; font-size: 1.1rem; } .large { width: 64px; height: 64px; font-size: 1.5rem; } .huge { width: 96px; height: 96px; font-size: 2.2rem; } .massive { width: 128px; height: 128px; font-size: 3rem; } /* Status Badge */ .status-badge { position: absolute; bottom: 0; right: 0; width: 25%; height: 25%; border-radius: 50%; border: 2px solid var(--kg-bg, white); z-index: 1; } .online { background-color: #41ab34; } .offline { background-color: #9e9e9e; } .away { background-color: #fbb140; } .busy { background-color: #db2828; } .numeric-badge { position: absolute; top: -4px; right: -4px; background: #db2828; color: white; font-size: 10px; padding: 2px 6px; border-radius: 10px; border: 2px solid var(--kg-bg, white); font-weight: bold; line-height: 1; z-index: 2; } /* Semantic Colors for Avatar Background */ .primary { background-color: var(--kg-primary); color: white; } .secondary { background-color: var(--kg-secondary); color: white; } .tertiary { background-color: var(--kg-tertiary); color: white; } .error { background-color: #db2828; color: white; } .success { background-color: #41ab34; color: white; } .warning { background-color: #fbb140; color: white; } .info { background-color: #1367FF; color: white; } /* Custom Color Helper */ .custom-color { background-color: var(--avatar-bg); color: white; } `"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"kind": "method",
|
|
200
|
+
"name": "getInitials"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"kind": "method",
|
|
204
|
+
"name": "render"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"kind": "field",
|
|
208
|
+
"name": "size",
|
|
209
|
+
"type": {
|
|
210
|
+
"text": "string"
|
|
211
|
+
},
|
|
212
|
+
"default": "'medium'"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"kind": "field",
|
|
216
|
+
"name": "shape",
|
|
217
|
+
"type": {
|
|
218
|
+
"text": "string"
|
|
219
|
+
},
|
|
220
|
+
"default": "'circle'"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"kind": "field",
|
|
224
|
+
"name": "alt",
|
|
225
|
+
"type": {
|
|
226
|
+
"text": "string"
|
|
227
|
+
},
|
|
228
|
+
"default": "'Avatar'"
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
"superclass": {
|
|
232
|
+
"name": "LitElement",
|
|
233
|
+
"package": "lit"
|
|
234
|
+
},
|
|
235
|
+
"tagName": "kg-avatar",
|
|
236
|
+
"customElement": true
|
|
237
|
+
}
|
|
238
|
+
],
|
|
239
|
+
"exports": [
|
|
240
|
+
{
|
|
241
|
+
"kind": "js",
|
|
242
|
+
"name": "kgavatar",
|
|
243
|
+
"declaration": {
|
|
244
|
+
"name": "kgavatar",
|
|
245
|
+
"module": "src/components/kg-avatar.js"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"kind": "custom-element-definition",
|
|
250
|
+
"name": "kg-avatar",
|
|
251
|
+
"declaration": {
|
|
252
|
+
"name": "kgavatar",
|
|
253
|
+
"module": "src/components/kg-avatar.js"
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"kind": "javascript-module",
|
|
260
|
+
"path": "src/components/kg-breadcrumbs.js",
|
|
261
|
+
"declarations": [
|
|
262
|
+
{
|
|
263
|
+
"kind": "class",
|
|
264
|
+
"description": "",
|
|
265
|
+
"name": "kgbreadcrumbs",
|
|
266
|
+
"members": [
|
|
267
|
+
{
|
|
268
|
+
"kind": "field",
|
|
269
|
+
"name": "properties",
|
|
270
|
+
"type": {
|
|
271
|
+
"text": "object"
|
|
272
|
+
},
|
|
273
|
+
"static": true,
|
|
274
|
+
"default": "{ separator: { type: String }, }"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"kind": "field",
|
|
278
|
+
"name": "styles",
|
|
279
|
+
"static": true,
|
|
280
|
+
"default": "css` :host { display: block; } nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0; margin: 0; list-style: none; font-size: 0.9rem; color: var(--kg-text-muted, #666); } ::slotted(a), ::slotted(span) { display: flex; align-items: center; gap: 0.25rem; color: inherit; text-decoration: none; transition: color 0.2s; } ::slotted(a:hover) { color: var(--kg-primary, #41ab34); } ::slotted(.active) { color: var(--kg-text, #1a1a1a); font-weight: 600; pointer-events: none; } .separator { display: flex; align-items: center; user-select: none; font-size: 0.8em; opacity: 0.5; } `"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"kind": "method",
|
|
284
|
+
"name": "_handleSlotChange",
|
|
285
|
+
"parameters": [
|
|
286
|
+
{
|
|
287
|
+
"name": "e"
|
|
288
|
+
}
|
|
289
|
+
]
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"kind": "method",
|
|
293
|
+
"name": "render"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"kind": "field",
|
|
297
|
+
"name": "separator",
|
|
298
|
+
"type": {
|
|
299
|
+
"text": "string"
|
|
300
|
+
},
|
|
301
|
+
"default": "'/'"
|
|
302
|
+
}
|
|
303
|
+
],
|
|
304
|
+
"superclass": {
|
|
305
|
+
"name": "LitElement",
|
|
306
|
+
"package": "lit"
|
|
307
|
+
},
|
|
308
|
+
"tagName": "kg-breadcrumbs",
|
|
309
|
+
"customElement": true
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"kind": "class",
|
|
313
|
+
"description": "",
|
|
314
|
+
"name": "kgbreadcrumbitem",
|
|
315
|
+
"members": [
|
|
316
|
+
{
|
|
317
|
+
"kind": "field",
|
|
318
|
+
"name": "properties",
|
|
319
|
+
"type": {
|
|
320
|
+
"text": "object"
|
|
321
|
+
},
|
|
322
|
+
"static": true,
|
|
323
|
+
"default": "{ href: { type: String }, active: { type: Boolean, reflect: true }, separator: { type: String }, }"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"kind": "field",
|
|
327
|
+
"name": "styles",
|
|
328
|
+
"static": true,
|
|
329
|
+
"default": "css` :host { display: inline-flex; align-items: center; gap: 0.5rem; } .item { color: var(--kg-text-muted, #666); text-decoration: none; transition: color 0.2s; display: flex; align-items: center; gap: 0.4rem; cursor: pointer; } .item:hover { color: var(--kg-primary, #41ab34); } .item.active { color: var(--kg-text, #1a1a1a); font-weight: 600; pointer-events: none; } .separator { color: var(--kg-text-muted, #999); opacity: 0.6; font-size: 0.85em; user-select: none; margin: 0 2px; } :host(:last-child) .separator { display: none; } `"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"kind": "method",
|
|
333
|
+
"name": "render"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"kind": "field",
|
|
337
|
+
"name": "active",
|
|
338
|
+
"type": {
|
|
339
|
+
"text": "boolean"
|
|
340
|
+
},
|
|
341
|
+
"default": "false"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"kind": "field",
|
|
345
|
+
"name": "separator",
|
|
346
|
+
"type": {
|
|
347
|
+
"text": "string"
|
|
348
|
+
},
|
|
349
|
+
"default": "'/'"
|
|
350
|
+
}
|
|
351
|
+
],
|
|
352
|
+
"superclass": {
|
|
353
|
+
"name": "LitElement",
|
|
354
|
+
"package": "lit"
|
|
355
|
+
},
|
|
356
|
+
"tagName": "kg-breadcrumb-item",
|
|
357
|
+
"customElement": true
|
|
358
|
+
}
|
|
359
|
+
],
|
|
360
|
+
"exports": [
|
|
361
|
+
{
|
|
362
|
+
"kind": "js",
|
|
363
|
+
"name": "kgbreadcrumbs",
|
|
364
|
+
"declaration": {
|
|
365
|
+
"name": "kgbreadcrumbs",
|
|
366
|
+
"module": "src/components/kg-breadcrumbs.js"
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"kind": "js",
|
|
371
|
+
"name": "kgbreadcrumbitem",
|
|
372
|
+
"declaration": {
|
|
373
|
+
"name": "kgbreadcrumbitem",
|
|
374
|
+
"module": "src/components/kg-breadcrumbs.js"
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"kind": "custom-element-definition",
|
|
379
|
+
"name": "kg-breadcrumbs",
|
|
380
|
+
"declaration": {
|
|
381
|
+
"name": "kgbreadcrumbs",
|
|
382
|
+
"module": "src/components/kg-breadcrumbs.js"
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"kind": "custom-element-definition",
|
|
387
|
+
"name": "kg-breadcrumb-item",
|
|
388
|
+
"declaration": {
|
|
389
|
+
"name": "kgbreadcrumbitem",
|
|
390
|
+
"module": "src/components/kg-breadcrumbs.js"
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
]
|
|
394
|
+
},
|
|
174
395
|
{
|
|
175
396
|
"kind": "javascript-module",
|
|
176
397
|
"path": "src/components/kg-button.js",
|
|
@@ -2011,101 +2232,196 @@
|
|
|
2011
2232
|
},
|
|
2012
2233
|
{
|
|
2013
2234
|
"kind": "javascript-module",
|
|
2014
|
-
"path": "src/components/kg-
|
|
2235
|
+
"path": "src/components/kg-list.js",
|
|
2015
2236
|
"declarations": [
|
|
2016
2237
|
{
|
|
2017
2238
|
"kind": "class",
|
|
2018
2239
|
"description": "",
|
|
2019
|
-
"name": "
|
|
2240
|
+
"name": "kglist",
|
|
2020
2241
|
"members": [
|
|
2021
|
-
{
|
|
2022
|
-
"kind": "field",
|
|
2023
|
-
"name": "properties",
|
|
2024
|
-
"type": {
|
|
2025
|
-
"text": "object"
|
|
2026
|
-
},
|
|
2027
|
-
"static": true,
|
|
2028
|
-
"default": "{ src: { type: String }, text: { type: String }, visible: { type: Boolean, reflect: true }, glass: { type: Boolean, reflect: true } }"
|
|
2029
|
-
},
|
|
2030
2242
|
{
|
|
2031
2243
|
"kind": "field",
|
|
2032
2244
|
"name": "styles",
|
|
2033
2245
|
"static": true,
|
|
2034
|
-
"default": "css` :host {
|
|
2246
|
+
"default": "css` :host { display: block; width: 100%; } .list-container { display: flex; flex-direction: column; gap: 2px; } ::slotted(kg-list-item:not(:last-child)) { border-bottom: 1px solid var(--kg-border, #eee); } `"
|
|
2035
2247
|
},
|
|
2036
2248
|
{
|
|
2037
2249
|
"kind": "method",
|
|
2038
2250
|
"name": "render"
|
|
2039
|
-
}
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2251
|
+
}
|
|
2252
|
+
],
|
|
2253
|
+
"superclass": {
|
|
2254
|
+
"name": "LitElement",
|
|
2255
|
+
"package": "lit"
|
|
2256
|
+
},
|
|
2257
|
+
"tagName": "kg-list",
|
|
2258
|
+
"customElement": true
|
|
2259
|
+
},
|
|
2260
|
+
{
|
|
2261
|
+
"kind": "class",
|
|
2262
|
+
"description": "",
|
|
2263
|
+
"name": "kglistitem",
|
|
2264
|
+
"members": [
|
|
2048
2265
|
{
|
|
2049
2266
|
"kind": "field",
|
|
2050
|
-
"name": "
|
|
2267
|
+
"name": "properties",
|
|
2051
2268
|
"type": {
|
|
2052
|
-
"text": "
|
|
2269
|
+
"text": "object"
|
|
2053
2270
|
},
|
|
2054
|
-
"
|
|
2271
|
+
"static": true,
|
|
2272
|
+
"default": "{ active: { type: Boolean, reflect: true }, clickable: { type: Boolean, reflect: true }, }"
|
|
2055
2273
|
},
|
|
2056
2274
|
{
|
|
2057
2275
|
"kind": "field",
|
|
2058
|
-
"name": "
|
|
2059
|
-
"
|
|
2060
|
-
|
|
2061
|
-
},
|
|
2062
|
-
"default": "false"
|
|
2276
|
+
"name": "styles",
|
|
2277
|
+
"static": true,
|
|
2278
|
+
"default": "css` :host { display: block; } .item-wrapper { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; transition: all 0.2s ease; background: transparent; border-radius: var(--kg-radius-sm, 4px); } :host([clickable]) .item-wrapper { cursor: pointer; } :host([clickable]:hover) .item-wrapper { background: var(--kg-bg-secondary, rgba(0,0,0,0.03)); } :host([active]) .item-wrapper { background: var(--kg-bg-secondary, rgba(0,0,0,0.05)); border-left: 3px solid var(--kg-primary); } .content { flex: 1; display: flex; flex-direction: column; gap: 2px; } ::slotted([slot=\"header\"]) { margin: 0; font-weight: 600; font-size: 0.95rem; color: var(--kg-text); } ::slotted([slot=\"description\"]) { margin: 0; font-size: 0.85rem; color: var(--kg-text-muted); } `"
|
|
2063
2279
|
},
|
|
2064
2280
|
{
|
|
2065
|
-
"kind": "
|
|
2066
|
-
"name": "
|
|
2067
|
-
"type": {
|
|
2068
|
-
"text": "boolean"
|
|
2069
|
-
},
|
|
2070
|
-
"default": "false"
|
|
2281
|
+
"kind": "method",
|
|
2282
|
+
"name": "render"
|
|
2071
2283
|
}
|
|
2072
2284
|
],
|
|
2073
2285
|
"superclass": {
|
|
2074
2286
|
"name": "LitElement",
|
|
2075
2287
|
"package": "lit"
|
|
2076
2288
|
},
|
|
2077
|
-
"tagName": "kg-
|
|
2289
|
+
"tagName": "kg-list-item",
|
|
2078
2290
|
"customElement": true
|
|
2079
|
-
},
|
|
2080
|
-
{
|
|
2081
|
-
"kind": "variable",
|
|
2082
|
-
"name": "loader",
|
|
2083
|
-
"type": {
|
|
2084
|
-
"text": "object"
|
|
2085
|
-
},
|
|
2086
|
-
"default": "{ _instance: null, show(options = {}) { if (!this._instance) { this._instance = document.createElement('kg-loader'); document.body.appendChild(this._instance); } this._instance.src = options.src !== undefined ? options.src : ''; this._instance.text = options.text !== undefined ? options.text : ''; this._instance.glass = options.glass !== undefined ? options.glass : true; // Ensure styles are applied before making visible requestAnimationFrame(() => { this._instance.visible = true; }); }, hide() { if (this._instance) { this._instance.visible = false; } } }"
|
|
2087
2291
|
}
|
|
2088
2292
|
],
|
|
2089
2293
|
"exports": [
|
|
2090
2294
|
{
|
|
2091
2295
|
"kind": "js",
|
|
2092
|
-
"name": "
|
|
2296
|
+
"name": "kglist",
|
|
2093
2297
|
"declaration": {
|
|
2094
|
-
"name": "
|
|
2095
|
-
"module": "src/components/kg-
|
|
2298
|
+
"name": "kglist",
|
|
2299
|
+
"module": "src/components/kg-list.js"
|
|
2096
2300
|
}
|
|
2097
2301
|
},
|
|
2098
2302
|
{
|
|
2099
|
-
"kind": "
|
|
2100
|
-
"name": "
|
|
2303
|
+
"kind": "js",
|
|
2304
|
+
"name": "kglistitem",
|
|
2101
2305
|
"declaration": {
|
|
2102
|
-
"name": "
|
|
2103
|
-
"module": "src/components/kg-
|
|
2306
|
+
"name": "kglistitem",
|
|
2307
|
+
"module": "src/components/kg-list.js"
|
|
2104
2308
|
}
|
|
2105
2309
|
},
|
|
2106
2310
|
{
|
|
2107
|
-
"kind": "
|
|
2108
|
-
"name": "
|
|
2311
|
+
"kind": "custom-element-definition",
|
|
2312
|
+
"name": "kg-list",
|
|
2313
|
+
"declaration": {
|
|
2314
|
+
"name": "kglist",
|
|
2315
|
+
"module": "src/components/kg-list.js"
|
|
2316
|
+
}
|
|
2317
|
+
},
|
|
2318
|
+
{
|
|
2319
|
+
"kind": "custom-element-definition",
|
|
2320
|
+
"name": "kg-list-item",
|
|
2321
|
+
"declaration": {
|
|
2322
|
+
"name": "kglistitem",
|
|
2323
|
+
"module": "src/components/kg-list.js"
|
|
2324
|
+
}
|
|
2325
|
+
}
|
|
2326
|
+
]
|
|
2327
|
+
},
|
|
2328
|
+
{
|
|
2329
|
+
"kind": "javascript-module",
|
|
2330
|
+
"path": "src/components/kg-loader.js",
|
|
2331
|
+
"declarations": [
|
|
2332
|
+
{
|
|
2333
|
+
"kind": "class",
|
|
2334
|
+
"description": "",
|
|
2335
|
+
"name": "kgloader",
|
|
2336
|
+
"members": [
|
|
2337
|
+
{
|
|
2338
|
+
"kind": "field",
|
|
2339
|
+
"name": "properties",
|
|
2340
|
+
"type": {
|
|
2341
|
+
"text": "object"
|
|
2342
|
+
},
|
|
2343
|
+
"static": true,
|
|
2344
|
+
"default": "{ src: { type: String }, text: { type: String }, visible: { type: Boolean, reflect: true }, glass: { type: Boolean, reflect: true } }"
|
|
2345
|
+
},
|
|
2346
|
+
{
|
|
2347
|
+
"kind": "field",
|
|
2348
|
+
"name": "styles",
|
|
2349
|
+
"static": true,
|
|
2350
|
+
"default": "css` :host { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 999999; background-color: var(--kg-bg, #ffffff); visibility: hidden; opacity: 0; transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); pointer-events: none; } :host([visible]) { visibility: visible; opacity: 1; pointer-events: auto; } :host([glass]) { background-color: rgba(255, 255, 255, 0.4); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); } /* Dark Mode Support */ :host-context([data-theme='dark']) { background-color: #0f172a; } :host-context([data-theme='dark']):host([glass]) { background-color: rgba(15, 23, 42, 0.6); } .loader-container { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; } /* Decorative Orbits */ .orbit { position: absolute; border: 2px solid var(--kg-primary); border-radius: 50%; opacity: 0.1; pointer-events: none; } .orbit-1 { width: 140px; height: 140px; animation: rotate 3s linear infinite; border-top-color: transparent; } .orbit-2 { width: 180px; height: 180px; animation: rotate 5s linear reverse infinite; border-right-color: transparent; } @keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .loader-content { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; padding: 3rem; z-index: 2; } .image-wrapper { position: relative; min-width: 140px; min-height: 140px; display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(0.8); transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); transition-delay: 0.1s; } :host([visible]) .image-wrapper { opacity: 1; transform: scale(1); } .loader-image { max-width: 200px; max-height: 140px; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1)); } .loader-info { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; opacity: 0; transform: translateY(10px); transition: all 0.6s ease; transition-delay: 0.3s; width: 100%; max-width: 240px; } :host([visible]) .loader-info { opacity: 1; transform: translateY(0); } .loader-text { font-size: 1.25rem; font-weight: 700; color: var(--kg-text, #1e293b); letter-spacing: -0.01em; } :host-context([data-theme='dark']) .loader-text { color: #f8fafc; } `"
|
|
2351
|
+
},
|
|
2352
|
+
{
|
|
2353
|
+
"kind": "method",
|
|
2354
|
+
"name": "render"
|
|
2355
|
+
},
|
|
2356
|
+
{
|
|
2357
|
+
"kind": "field",
|
|
2358
|
+
"name": "src",
|
|
2359
|
+
"type": {
|
|
2360
|
+
"text": "string"
|
|
2361
|
+
},
|
|
2362
|
+
"default": "''"
|
|
2363
|
+
},
|
|
2364
|
+
{
|
|
2365
|
+
"kind": "field",
|
|
2366
|
+
"name": "text",
|
|
2367
|
+
"type": {
|
|
2368
|
+
"text": "string"
|
|
2369
|
+
},
|
|
2370
|
+
"default": "''"
|
|
2371
|
+
},
|
|
2372
|
+
{
|
|
2373
|
+
"kind": "field",
|
|
2374
|
+
"name": "visible",
|
|
2375
|
+
"type": {
|
|
2376
|
+
"text": "boolean"
|
|
2377
|
+
},
|
|
2378
|
+
"default": "false"
|
|
2379
|
+
},
|
|
2380
|
+
{
|
|
2381
|
+
"kind": "field",
|
|
2382
|
+
"name": "glass",
|
|
2383
|
+
"type": {
|
|
2384
|
+
"text": "boolean"
|
|
2385
|
+
},
|
|
2386
|
+
"default": "false"
|
|
2387
|
+
}
|
|
2388
|
+
],
|
|
2389
|
+
"superclass": {
|
|
2390
|
+
"name": "LitElement",
|
|
2391
|
+
"package": "lit"
|
|
2392
|
+
},
|
|
2393
|
+
"tagName": "kg-loader",
|
|
2394
|
+
"customElement": true
|
|
2395
|
+
},
|
|
2396
|
+
{
|
|
2397
|
+
"kind": "variable",
|
|
2398
|
+
"name": "loader",
|
|
2399
|
+
"type": {
|
|
2400
|
+
"text": "object"
|
|
2401
|
+
},
|
|
2402
|
+
"default": "{ _instance: null, show(options = {}) { if (!this._instance) { this._instance = document.createElement('kg-loader'); document.body.appendChild(this._instance); } this._instance.src = options.src !== undefined ? options.src : ''; this._instance.text = options.text !== undefined ? options.text : ''; this._instance.glass = options.glass !== undefined ? options.glass : true; // Ensure styles are applied before making visible requestAnimationFrame(() => { this._instance.visible = true; }); }, hide() { if (this._instance) { this._instance.visible = false; } } }"
|
|
2403
|
+
}
|
|
2404
|
+
],
|
|
2405
|
+
"exports": [
|
|
2406
|
+
{
|
|
2407
|
+
"kind": "js",
|
|
2408
|
+
"name": "kgloader",
|
|
2409
|
+
"declaration": {
|
|
2410
|
+
"name": "kgloader",
|
|
2411
|
+
"module": "src/components/kg-loader.js"
|
|
2412
|
+
}
|
|
2413
|
+
},
|
|
2414
|
+
{
|
|
2415
|
+
"kind": "custom-element-definition",
|
|
2416
|
+
"name": "kg-loader",
|
|
2417
|
+
"declaration": {
|
|
2418
|
+
"name": "kgloader",
|
|
2419
|
+
"module": "src/components/kg-loader.js"
|
|
2420
|
+
}
|
|
2421
|
+
},
|
|
2422
|
+
{
|
|
2423
|
+
"kind": "js",
|
|
2424
|
+
"name": "loader",
|
|
2109
2425
|
"declaration": {
|
|
2110
2426
|
"name": "loader",
|
|
2111
2427
|
"module": "src/components/kg-loader.js"
|
|
@@ -3470,6 +3786,95 @@
|
|
|
3470
3786
|
}
|
|
3471
3787
|
]
|
|
3472
3788
|
},
|
|
3789
|
+
{
|
|
3790
|
+
"kind": "javascript-module",
|
|
3791
|
+
"path": "src/components/kg-tag.js",
|
|
3792
|
+
"declarations": [
|
|
3793
|
+
{
|
|
3794
|
+
"kind": "class",
|
|
3795
|
+
"description": "",
|
|
3796
|
+
"name": "kgtag",
|
|
3797
|
+
"members": [
|
|
3798
|
+
{
|
|
3799
|
+
"kind": "field",
|
|
3800
|
+
"name": "properties",
|
|
3801
|
+
"type": {
|
|
3802
|
+
"text": "object"
|
|
3803
|
+
},
|
|
3804
|
+
"static": true,
|
|
3805
|
+
"default": "{ color: { type: String }, // primary, secondary, tertiary, error, success, info, warning size: { type: String }, // mini, tiny, small, medium, large pill: { type: Boolean }, basic: { type: Boolean }, closable: { type: Boolean }, }"
|
|
3806
|
+
},
|
|
3807
|
+
{
|
|
3808
|
+
"kind": "field",
|
|
3809
|
+
"name": "styles",
|
|
3810
|
+
"static": true,
|
|
3811
|
+
"default": "css` :host { display: inline-flex; } .tag { display: inline-flex; align-items: center; justify-content: center; padding: 0.25em 0.8em; border-radius: var(--kg-radius-sm, 4px); font-size: 0.85rem; font-weight: 600; line-height: 1; gap: 0.4em; background: var(--kg-bg-secondary, #eee); color: var(--kg-text, #333); border: 1px solid transparent; user-select: none; transition: all 0.2s ease; white-space: nowrap; } .pill { border-radius: 100px; } /* Sizes */ .mini { font-size: 0.65rem; padding: 0.2em 0.5em; } .tiny { font-size: 0.75rem; padding: 0.22em 0.6em; } .small { font-size: 0.8rem; padding: 0.25em 0.7em; } .medium { font-size: 0.9rem; padding: 0.3em 0.85em; } .large { font-size: 1rem; padding: 0.35em 1em; } /* Colors */ .primary { background: var(--kg-primary); color: white; } .secondary { background: var(--kg-secondary); color: white; } .tertiary { background: var(--kg-tertiary); color: white; } .error { background: #DB2828; color: white; } .success { background: #41ab34; color: white; } .warning { background: #FBB140; color: white; } /* Basic (Outlined) */ .basic { background: transparent; border-color: currentColor; color: var(--kg-text-muted); } .basic.primary { color: var(--kg-primary); } .basic.secondary { color: var(--kg-secondary); } .basic.tertiary { color: var(--kg-tertiary); } .basic.error { color: #DB2828; } .basic.success { color: #41ab34; } .close-icon { cursor: pointer; opacity: 0.7; display: flex; align-items: center; margin-right: -0.3em; font-size: 1.1em; } .close-icon:hover { opacity: 1; } /* Custom Colors */ .custom-color { background: var(--kg-tag-color); color: white; } .basic.custom-color { background: transparent; border-color: var(--kg-tag-color); color: var(--kg-tag-color); } `"
|
|
3812
|
+
},
|
|
3813
|
+
{
|
|
3814
|
+
"kind": "method",
|
|
3815
|
+
"name": "_handleClose",
|
|
3816
|
+
"parameters": [
|
|
3817
|
+
{
|
|
3818
|
+
"name": "e"
|
|
3819
|
+
}
|
|
3820
|
+
]
|
|
3821
|
+
},
|
|
3822
|
+
{
|
|
3823
|
+
"kind": "method",
|
|
3824
|
+
"name": "render"
|
|
3825
|
+
},
|
|
3826
|
+
{
|
|
3827
|
+
"kind": "field",
|
|
3828
|
+
"name": "size",
|
|
3829
|
+
"type": {
|
|
3830
|
+
"text": "string"
|
|
3831
|
+
},
|
|
3832
|
+
"default": "'medium'"
|
|
3833
|
+
},
|
|
3834
|
+
{
|
|
3835
|
+
"kind": "field",
|
|
3836
|
+
"name": "color",
|
|
3837
|
+
"type": {
|
|
3838
|
+
"text": "string"
|
|
3839
|
+
},
|
|
3840
|
+
"default": "''"
|
|
3841
|
+
}
|
|
3842
|
+
],
|
|
3843
|
+
"events": [
|
|
3844
|
+
{
|
|
3845
|
+
"name": "kg-close",
|
|
3846
|
+
"type": {
|
|
3847
|
+
"text": "CustomEvent"
|
|
3848
|
+
}
|
|
3849
|
+
}
|
|
3850
|
+
],
|
|
3851
|
+
"superclass": {
|
|
3852
|
+
"name": "LitElement",
|
|
3853
|
+
"package": "lit"
|
|
3854
|
+
},
|
|
3855
|
+
"tagName": "kg-tag",
|
|
3856
|
+
"customElement": true
|
|
3857
|
+
}
|
|
3858
|
+
],
|
|
3859
|
+
"exports": [
|
|
3860
|
+
{
|
|
3861
|
+
"kind": "js",
|
|
3862
|
+
"name": "kgtag",
|
|
3863
|
+
"declaration": {
|
|
3864
|
+
"name": "kgtag",
|
|
3865
|
+
"module": "src/components/kg-tag.js"
|
|
3866
|
+
}
|
|
3867
|
+
},
|
|
3868
|
+
{
|
|
3869
|
+
"kind": "custom-element-definition",
|
|
3870
|
+
"name": "kg-tag",
|
|
3871
|
+
"declaration": {
|
|
3872
|
+
"name": "kgtag",
|
|
3873
|
+
"module": "src/components/kg-tag.js"
|
|
3874
|
+
}
|
|
3875
|
+
}
|
|
3876
|
+
]
|
|
3877
|
+
},
|
|
3473
3878
|
{
|
|
3474
3879
|
"kind": "javascript-module",
|
|
3475
3880
|
"path": "src/components/kg-text.js",
|
|
@@ -3810,6 +4215,239 @@
|
|
|
3810
4215
|
}
|
|
3811
4216
|
}
|
|
3812
4217
|
]
|
|
4218
|
+
},
|
|
4219
|
+
{
|
|
4220
|
+
"kind": "javascript-module",
|
|
4221
|
+
"path": "src/components/kg-tooltip.js",
|
|
4222
|
+
"declarations": [
|
|
4223
|
+
{
|
|
4224
|
+
"kind": "class",
|
|
4225
|
+
"description": "",
|
|
4226
|
+
"name": "kgtooltip",
|
|
4227
|
+
"members": [
|
|
4228
|
+
{
|
|
4229
|
+
"kind": "field",
|
|
4230
|
+
"name": "properties",
|
|
4231
|
+
"type": {
|
|
4232
|
+
"text": "object"
|
|
4233
|
+
},
|
|
4234
|
+
"static": true,
|
|
4235
|
+
"default": "{ content: { type: String }, position: { type: String, reflect: true }, // top, bottom, left, right trigger: { type: String, reflect: true }, // hover, click visible: { type: Boolean, reflect: true }, }"
|
|
4236
|
+
},
|
|
4237
|
+
{
|
|
4238
|
+
"kind": "field",
|
|
4239
|
+
"name": "styles",
|
|
4240
|
+
"static": true,
|
|
4241
|
+
"default": "css` :host { display: inline-block; position: relative; } .tooltip-trigger { display: inline-block; cursor: pointer; } .tooltip-content { position: absolute; background: #333; color: white; padding: 0.5rem 0.75rem; border-radius: 6px; font-size: 0.85rem; white-space: nowrap; z-index: 1000; opacity: 0; visibility: hidden; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 4px 12px rgba(0,0,0,0.15); pointer-events: none; } /* Position Styles */ .top { bottom: 100%; left: 50%; transform: translateX(-50%) translateY(-8px); margin-bottom: 8px; } .bottom { top: 100%; left: 50%; transform: translateX(-50%) translateY(8px); margin-top: 8px; } .left { top: 50%; right: 100%; transform: translateY(-50%) translateX(-8px); margin-right: 8px; } .right { top: 50%; left: 100%; transform: translateY(-50%) translateX(8px); margin-left: 8px; } /* Arrow */ .tooltip-content::after { content: ''; position: absolute; border: 5px solid transparent; } .top::after { top: 100%; left: 50%; transform: translateX(-50%); border-top-color: #333; } .bottom::after { bottom: 100%; left: 50%; transform: translateX(-50%); border-bottom-color: #333; } .left::after { left: 100%; top: 50%; transform: translateY(-50%); border-left-color: #333; } .right::after { right: 100%; top: 50%; transform: translateY(-50%); border-right-color: #333; } /* Visibility Logic */ :host([trigger=\"hover\"]:hover) .tooltip-content, :host([visible]) .tooltip-content { opacity: 1; visibility: visible; } /* Transform Adjustment for Visible State */ :host([trigger=\"hover\"]:hover) .tooltip-content.top, :host([visible]) .tooltip-content.top { transform: translateX(-50%) translateY(-4px); } :host([trigger=\"hover\"]:hover) .tooltip-content.bottom, :host([visible]) .tooltip-content.bottom { transform: translateX(-50%) translateY(4px); } :host([trigger=\"hover\"]:hover) .tooltip-content.left, :host([visible]) .tooltip-content.left { transform: translateY(-50%) translateX(-4px); } :host([trigger=\"hover\"]:hover) .tooltip-content.right, :host([visible]) .tooltip-content.right { transform: translateY(-50%) translateX(4px); } `"
|
|
4242
|
+
},
|
|
4243
|
+
{
|
|
4244
|
+
"kind": "method",
|
|
4245
|
+
"name": "_show"
|
|
4246
|
+
},
|
|
4247
|
+
{
|
|
4248
|
+
"kind": "method",
|
|
4249
|
+
"name": "_hide"
|
|
4250
|
+
},
|
|
4251
|
+
{
|
|
4252
|
+
"kind": "method",
|
|
4253
|
+
"name": "_handleOutsideClick",
|
|
4254
|
+
"parameters": [
|
|
4255
|
+
{
|
|
4256
|
+
"name": "e"
|
|
4257
|
+
}
|
|
4258
|
+
]
|
|
4259
|
+
},
|
|
4260
|
+
{
|
|
4261
|
+
"kind": "method",
|
|
4262
|
+
"name": "render"
|
|
4263
|
+
},
|
|
4264
|
+
{
|
|
4265
|
+
"kind": "field",
|
|
4266
|
+
"name": "position",
|
|
4267
|
+
"type": {
|
|
4268
|
+
"text": "string"
|
|
4269
|
+
},
|
|
4270
|
+
"default": "'top'"
|
|
4271
|
+
},
|
|
4272
|
+
{
|
|
4273
|
+
"kind": "field",
|
|
4274
|
+
"name": "trigger",
|
|
4275
|
+
"type": {
|
|
4276
|
+
"text": "string"
|
|
4277
|
+
},
|
|
4278
|
+
"default": "'hover'"
|
|
4279
|
+
},
|
|
4280
|
+
{
|
|
4281
|
+
"kind": "field",
|
|
4282
|
+
"name": "visible",
|
|
4283
|
+
"type": {
|
|
4284
|
+
"text": "boolean"
|
|
4285
|
+
},
|
|
4286
|
+
"default": "false"
|
|
4287
|
+
}
|
|
4288
|
+
],
|
|
4289
|
+
"superclass": {
|
|
4290
|
+
"name": "LitElement",
|
|
4291
|
+
"package": "lit"
|
|
4292
|
+
},
|
|
4293
|
+
"tagName": "kg-tooltip",
|
|
4294
|
+
"customElement": true
|
|
4295
|
+
}
|
|
4296
|
+
],
|
|
4297
|
+
"exports": [
|
|
4298
|
+
{
|
|
4299
|
+
"kind": "js",
|
|
4300
|
+
"name": "kgtooltip",
|
|
4301
|
+
"declaration": {
|
|
4302
|
+
"name": "kgtooltip",
|
|
4303
|
+
"module": "src/components/kg-tooltip.js"
|
|
4304
|
+
}
|
|
4305
|
+
},
|
|
4306
|
+
{
|
|
4307
|
+
"kind": "custom-element-definition",
|
|
4308
|
+
"name": "kg-tooltip",
|
|
4309
|
+
"declaration": {
|
|
4310
|
+
"name": "kgtooltip",
|
|
4311
|
+
"module": "src/components/kg-tooltip.js"
|
|
4312
|
+
}
|
|
4313
|
+
}
|
|
4314
|
+
]
|
|
4315
|
+
},
|
|
4316
|
+
{
|
|
4317
|
+
"kind": "javascript-module",
|
|
4318
|
+
"path": "src/components/kg-tree.js",
|
|
4319
|
+
"declarations": [
|
|
4320
|
+
{
|
|
4321
|
+
"kind": "class",
|
|
4322
|
+
"description": "",
|
|
4323
|
+
"name": "kgtree",
|
|
4324
|
+
"members": [
|
|
4325
|
+
{
|
|
4326
|
+
"kind": "field",
|
|
4327
|
+
"name": "styles",
|
|
4328
|
+
"static": true,
|
|
4329
|
+
"default": "css` :host { display: block; width: 100%; user-select: none; } .tree-container { display: flex; flex-direction: column; } `"
|
|
4330
|
+
},
|
|
4331
|
+
{
|
|
4332
|
+
"kind": "method",
|
|
4333
|
+
"name": "render"
|
|
4334
|
+
}
|
|
4335
|
+
],
|
|
4336
|
+
"superclass": {
|
|
4337
|
+
"name": "LitElement",
|
|
4338
|
+
"package": "lit"
|
|
4339
|
+
},
|
|
4340
|
+
"tagName": "kg-tree",
|
|
4341
|
+
"customElement": true
|
|
4342
|
+
},
|
|
4343
|
+
{
|
|
4344
|
+
"kind": "class",
|
|
4345
|
+
"description": "",
|
|
4346
|
+
"name": "kgtreeitem",
|
|
4347
|
+
"members": [
|
|
4348
|
+
{
|
|
4349
|
+
"kind": "field",
|
|
4350
|
+
"name": "properties",
|
|
4351
|
+
"type": {
|
|
4352
|
+
"text": "object"
|
|
4353
|
+
},
|
|
4354
|
+
"static": true,
|
|
4355
|
+
"default": "{ label: { type: String }, expanded: { type: Boolean, reflect: true }, selected: { type: Boolean, reflect: true }, level: { type: Number }, page: { type: String }, // For doc navigation }"
|
|
4356
|
+
},
|
|
4357
|
+
{
|
|
4358
|
+
"kind": "field",
|
|
4359
|
+
"name": "styles",
|
|
4360
|
+
"static": true,
|
|
4361
|
+
"default": "css` :host { display: block; } .item-row { display: flex; align-items: center; padding: 0.4rem 0.5rem; cursor: pointer; border-radius: var(--kg-radius-sm, 4px); transition: all 0.2s; gap: 0.4rem; font-size: 0.9rem; color: var(--kg-text-muted); } .item-row:hover { background: var(--kg-bg-secondary, rgba(0,0,0,0.03)); color: var(--kg-text); } :host([selected]) > .item-row { background: var(--kg-bg-secondary, rgba(0,0,0,0.05)); color: var(--kg-primary); font-weight: 600; } .arrow { width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; transition: transform 0.2s; opacity: 0.5; } :host([expanded]) > .item-row .arrow { transform: rotate(90deg); } .arrow-placeholder { width: 16px; } .children { display: none; padding-left: 1.2rem; } :host([expanded]) > .children { display: block; } /* Icon slot styling */ ::slotted([slot=\"icon\"]) { width: 16px; height: 16px; opacity: 0.7; } `"
|
|
4362
|
+
},
|
|
4363
|
+
{
|
|
4364
|
+
"kind": "method",
|
|
4365
|
+
"name": "_toggle",
|
|
4366
|
+
"parameters": [
|
|
4367
|
+
{
|
|
4368
|
+
"name": "e"
|
|
4369
|
+
}
|
|
4370
|
+
]
|
|
4371
|
+
},
|
|
4372
|
+
{
|
|
4373
|
+
"kind": "method",
|
|
4374
|
+
"name": "render"
|
|
4375
|
+
},
|
|
4376
|
+
{
|
|
4377
|
+
"kind": "field",
|
|
4378
|
+
"name": "expanded",
|
|
4379
|
+
"type": {
|
|
4380
|
+
"text": "boolean"
|
|
4381
|
+
},
|
|
4382
|
+
"default": "false"
|
|
4383
|
+
},
|
|
4384
|
+
{
|
|
4385
|
+
"kind": "field",
|
|
4386
|
+
"name": "selected",
|
|
4387
|
+
"type": {
|
|
4388
|
+
"text": "boolean"
|
|
4389
|
+
},
|
|
4390
|
+
"default": "false"
|
|
4391
|
+
},
|
|
4392
|
+
{
|
|
4393
|
+
"kind": "field",
|
|
4394
|
+
"name": "level",
|
|
4395
|
+
"type": {
|
|
4396
|
+
"text": "number"
|
|
4397
|
+
},
|
|
4398
|
+
"default": "0"
|
|
4399
|
+
}
|
|
4400
|
+
],
|
|
4401
|
+
"events": [
|
|
4402
|
+
{
|
|
4403
|
+
"name": "kg-select",
|
|
4404
|
+
"type": {
|
|
4405
|
+
"text": "CustomEvent"
|
|
4406
|
+
}
|
|
4407
|
+
}
|
|
4408
|
+
],
|
|
4409
|
+
"superclass": {
|
|
4410
|
+
"name": "LitElement",
|
|
4411
|
+
"package": "lit"
|
|
4412
|
+
},
|
|
4413
|
+
"tagName": "kg-tree-item",
|
|
4414
|
+
"customElement": true
|
|
4415
|
+
}
|
|
4416
|
+
],
|
|
4417
|
+
"exports": [
|
|
4418
|
+
{
|
|
4419
|
+
"kind": "js",
|
|
4420
|
+
"name": "kgtree",
|
|
4421
|
+
"declaration": {
|
|
4422
|
+
"name": "kgtree",
|
|
4423
|
+
"module": "src/components/kg-tree.js"
|
|
4424
|
+
}
|
|
4425
|
+
},
|
|
4426
|
+
{
|
|
4427
|
+
"kind": "js",
|
|
4428
|
+
"name": "kgtreeitem",
|
|
4429
|
+
"declaration": {
|
|
4430
|
+
"name": "kgtreeitem",
|
|
4431
|
+
"module": "src/components/kg-tree.js"
|
|
4432
|
+
}
|
|
4433
|
+
},
|
|
4434
|
+
{
|
|
4435
|
+
"kind": "custom-element-definition",
|
|
4436
|
+
"name": "kg-tree",
|
|
4437
|
+
"declaration": {
|
|
4438
|
+
"name": "kgtree",
|
|
4439
|
+
"module": "src/components/kg-tree.js"
|
|
4440
|
+
}
|
|
4441
|
+
},
|
|
4442
|
+
{
|
|
4443
|
+
"kind": "custom-element-definition",
|
|
4444
|
+
"name": "kg-tree-item",
|
|
4445
|
+
"declaration": {
|
|
4446
|
+
"name": "kgtreeitem",
|
|
4447
|
+
"module": "src/components/kg-tree.js"
|
|
4448
|
+
}
|
|
4449
|
+
}
|
|
4450
|
+
]
|
|
3813
4451
|
}
|
|
3814
4452
|
]
|
|
3815
4453
|
}
|