@lazhus/kg-ui 0.2.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.
- package/README.md +128 -0
- package/custom-elements.json +3815 -0
- package/dist/components/kg-accordion-item.js +117 -0
- package/dist/components/kg-accordion.js +32 -0
- package/dist/components/kg-button.js +241 -0
- package/dist/components/kg-card.js +129 -0
- package/dist/components/kg-checkbox.js +147 -0
- package/dist/components/kg-colorpicker.js +240 -0
- package/dist/components/kg-column.js +48 -0
- package/dist/components/kg-datagrid.js +428 -0
- package/dist/components/kg-datepicker.js +650 -0
- package/dist/components/kg-divider.js +118 -0
- package/dist/components/kg-drawer.js +178 -0
- package/dist/components/kg-file-upload.js +274 -0
- package/dist/components/kg-grid.js +46 -0
- package/dist/components/kg-image.js +100 -0
- package/dist/components/kg-input.js +318 -0
- package/dist/components/kg-loader.js +175 -0
- package/dist/components/kg-modal.js +165 -0
- package/dist/components/kg-progress.js +82 -0
- package/dist/components/kg-radio-group.js +75 -0
- package/dist/components/kg-radio.js +121 -0
- package/dist/components/kg-row.js +42 -0
- package/dist/components/kg-select.js +331 -0
- package/dist/components/kg-skeleton.js +108 -0
- package/dist/components/kg-slider.js +196 -0
- package/dist/components/kg-spinner.js +79 -0
- package/dist/components/kg-stepper.js +214 -0
- package/dist/components/kg-switch.js +106 -0
- package/dist/components/kg-tab-panel.js +35 -0
- package/dist/components/kg-tabs.js +158 -0
- package/dist/components/kg-text.js +141 -0
- package/dist/components/kg-textarea.js +162 -0
- package/dist/components/kg-toast.js +200 -0
- package/dist/index.js +68 -0
- package/dist/kg-ui.css +1 -0
- package/package.json +57 -0
- package/types/components/kg-accordion-item.d.ts +25 -0
- package/types/components/kg-accordion.d.ts +22 -0
- package/types/components/kg-button.d.ts +34 -0
- package/types/components/kg-card.d.ts +31 -0
- package/types/components/kg-checkbox.d.ts +28 -0
- package/types/components/kg-colorpicker.d.ts +28 -0
- package/types/components/kg-column.d.ts +20 -0
- package/types/components/kg-datagrid.d.ts +55 -0
- package/types/components/kg-datepicker.d.ts +43 -0
- package/types/components/kg-divider.d.ts +34 -0
- package/types/components/kg-drawer.d.ts +31 -0
- package/types/components/kg-file-upload.d.ts +40 -0
- package/types/components/kg-grid.d.ts +20 -0
- package/types/components/kg-image.d.ts +40 -0
- package/types/components/kg-input.d.ts +34 -0
- package/types/components/kg-loader.d.ts +31 -0
- package/types/components/kg-modal.d.ts +31 -0
- package/types/components/kg-progress.d.ts +37 -0
- package/types/components/kg-radio-group.d.ts +25 -0
- package/types/components/kg-radio.d.ts +25 -0
- package/types/components/kg-row.d.ts +20 -0
- package/types/components/kg-select.d.ts +37 -0
- package/types/components/kg-skeleton.d.ts +34 -0
- package/types/components/kg-slider.d.ts +40 -0
- package/types/components/kg-spinner.d.ts +28 -0
- package/types/components/kg-stepper.d.ts +31 -0
- package/types/components/kg-switch.d.ts +28 -0
- package/types/components/kg-tab-panel.d.ts +28 -0
- package/types/components/kg-tabs.d.ts +25 -0
- package/types/components/kg-text.d.ts +31 -0
- package/types/components/kg-textarea.d.ts +43 -0
- package/types/components/kg-toast.d.ts +28 -0
- package/types/index.d.ts +335 -0
|
@@ -0,0 +1,3815 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "src/components/kg-accordion-item.js",
|
|
8
|
+
"declarations": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "class",
|
|
11
|
+
"description": "",
|
|
12
|
+
"name": "kgaccordionitem",
|
|
13
|
+
"slots": [
|
|
14
|
+
{
|
|
15
|
+
"description": "Content of the accordion item",
|
|
16
|
+
"name": ""
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"members": [
|
|
20
|
+
{
|
|
21
|
+
"kind": "field",
|
|
22
|
+
"name": "properties",
|
|
23
|
+
"type": {
|
|
24
|
+
"text": "object"
|
|
25
|
+
},
|
|
26
|
+
"static": true,
|
|
27
|
+
"default": "{ title: { type: String }, open: { type: Boolean, reflect: true }, disabled: { type: Boolean } }"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"kind": "field",
|
|
31
|
+
"name": "styles",
|
|
32
|
+
"static": true,
|
|
33
|
+
"default": "css` :host { display: block; border-bottom: 1px solid var(--kg-border); } :host(:last-child) { border-bottom: none; } .accordion-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; cursor: pointer; background: var(--kg-surface); transition: all 0.2s ease; user-select: none; } .accordion-header:hover { background: var(--kg-bg-secondary, rgba(0,0,0,0.02)); color: var(--kg-primary); } .title { font-weight: 600; font-size: 1rem; } .chevron { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); color: var(--kg-text-muted); } :host([open]) .chevron { transform: rotate(180deg); color: var(--kg-primary); } :host([open]) .accordion-header { color: var(--kg-primary); } .content-wrapper { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden; background: var(--kg-bg); } :host([open]) .content-wrapper { grid-template-rows: 1fr; } .content { min-height: 0; padding: 0 1.25rem; opacity: 0; transform: translateY(-10px); transition: all 0.3s ease; } :host([open]) .content { padding: 1.25rem; opacity: 1; transform: translateY(0); } .disabled { opacity: 0.5; cursor: not-allowed !important; pointer-events: none; } `"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"kind": "method",
|
|
37
|
+
"name": "_toggle"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"kind": "method",
|
|
41
|
+
"name": "render"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"kind": "field",
|
|
45
|
+
"name": "open",
|
|
46
|
+
"type": {
|
|
47
|
+
"text": "boolean"
|
|
48
|
+
},
|
|
49
|
+
"default": "false"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"kind": "field",
|
|
53
|
+
"name": "disabled",
|
|
54
|
+
"type": {
|
|
55
|
+
"text": "boolean"
|
|
56
|
+
},
|
|
57
|
+
"default": "false"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"events": [
|
|
61
|
+
{
|
|
62
|
+
"name": "kg-accordion-toggle",
|
|
63
|
+
"type": {
|
|
64
|
+
"text": "CustomEvent"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"superclass": {
|
|
69
|
+
"name": "LitElement",
|
|
70
|
+
"package": "lit"
|
|
71
|
+
},
|
|
72
|
+
"tagName": "kg-accordion-item",
|
|
73
|
+
"customElement": true
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"exports": [
|
|
77
|
+
{
|
|
78
|
+
"kind": "js",
|
|
79
|
+
"name": "kgaccordionitem",
|
|
80
|
+
"declaration": {
|
|
81
|
+
"name": "kgaccordionitem",
|
|
82
|
+
"module": "src/components/kg-accordion-item.js"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"kind": "custom-element-definition",
|
|
87
|
+
"name": "kg-accordion-item",
|
|
88
|
+
"declaration": {
|
|
89
|
+
"name": "kgaccordionitem",
|
|
90
|
+
"module": "src/components/kg-accordion-item.js"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"kind": "javascript-module",
|
|
97
|
+
"path": "src/components/kg-accordion.js",
|
|
98
|
+
"declarations": [
|
|
99
|
+
{
|
|
100
|
+
"kind": "class",
|
|
101
|
+
"description": "",
|
|
102
|
+
"name": "kgaccordion",
|
|
103
|
+
"slots": [
|
|
104
|
+
{
|
|
105
|
+
"description": "List of kg-accordion-item elements",
|
|
106
|
+
"name": ""
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"members": [
|
|
110
|
+
{
|
|
111
|
+
"kind": "field",
|
|
112
|
+
"name": "properties",
|
|
113
|
+
"type": {
|
|
114
|
+
"text": "object"
|
|
115
|
+
},
|
|
116
|
+
"static": true,
|
|
117
|
+
"default": "{ exclusive: { type: Boolean }, // If true, only one item can be open at a time }"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"kind": "field",
|
|
121
|
+
"name": "styles",
|
|
122
|
+
"static": true,
|
|
123
|
+
"default": "css` :host { display: block; border: 1px solid var(--kg-border); border-radius: var(--kg-radius-md, 8px); overflow: hidden; background: var(--kg-bg); } `"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"kind": "method",
|
|
127
|
+
"name": "_handleToggle",
|
|
128
|
+
"parameters": [
|
|
129
|
+
{
|
|
130
|
+
"name": "e"
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"kind": "method",
|
|
136
|
+
"name": "render"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"kind": "field",
|
|
140
|
+
"name": "exclusive",
|
|
141
|
+
"type": {
|
|
142
|
+
"text": "boolean"
|
|
143
|
+
},
|
|
144
|
+
"default": "false"
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
"superclass": {
|
|
148
|
+
"name": "LitElement",
|
|
149
|
+
"package": "lit"
|
|
150
|
+
},
|
|
151
|
+
"tagName": "kg-accordion",
|
|
152
|
+
"customElement": true
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"exports": [
|
|
156
|
+
{
|
|
157
|
+
"kind": "js",
|
|
158
|
+
"name": "kgaccordion",
|
|
159
|
+
"declaration": {
|
|
160
|
+
"name": "kgaccordion",
|
|
161
|
+
"module": "src/components/kg-accordion.js"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"kind": "custom-element-definition",
|
|
166
|
+
"name": "kg-accordion",
|
|
167
|
+
"declaration": {
|
|
168
|
+
"name": "kgaccordion",
|
|
169
|
+
"module": "src/components/kg-accordion.js"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"kind": "javascript-module",
|
|
176
|
+
"path": "src/components/kg-button.js",
|
|
177
|
+
"declarations": [
|
|
178
|
+
{
|
|
179
|
+
"kind": "class",
|
|
180
|
+
"description": "",
|
|
181
|
+
"name": "kgbutton",
|
|
182
|
+
"slots": [
|
|
183
|
+
{
|
|
184
|
+
"description": "Button content",
|
|
185
|
+
"name": ""
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"members": [
|
|
189
|
+
{
|
|
190
|
+
"kind": "field",
|
|
191
|
+
"name": "properties",
|
|
192
|
+
"type": {
|
|
193
|
+
"text": "object"
|
|
194
|
+
},
|
|
195
|
+
"static": true,
|
|
196
|
+
"default": "{ color: { type: String }, // primary, secondary, tertiary, red, green, etc. size: { type: String }, // mini, tiny, small, medium, large, big, huge, massive fullwidth: { type: Boolean }, circular: { type: Boolean }, square: { type: Boolean }, loading: { type: Boolean }, disabled: { type: Boolean }, basic: { type: Boolean }, inverted: { type: Boolean }, active: { type: Boolean }, text: { type: Boolean }, hasText: { type: Boolean, state: true }, hasLeft: { type: Boolean, state: true }, hasRight: { type: Boolean, state: true } }"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"kind": "field",
|
|
200
|
+
"name": "styles",
|
|
201
|
+
"static": true,
|
|
202
|
+
"default": "css` :host { display: inline-block; vertical-align: middle; } :host([fullwidth]) { display: block; margin: 0 0 0.5em 0; } button { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; min-height: var(--kg-form-height); height: var(--kg-form-height); outline: none; border: none; vertical-align: top; background: var(--kg-border); color: var(--kg-text); font-family: inherit; margin: 0; padding: 0 1.5em; line-height: 1; text-transform: none; text-shadow: none; font-weight: 700; font-style: normal; text-align: center; text-decoration: none; border-radius: 4px; box-shadow: 0 0 0 1px transparent inset; user-select: none; transition: all 0.2s ease; position: relative; gap: 0.5em; box-sizing: border-box; } /* Reset padding for icon-only buttons to ensure 1:1 aspect ratio */ button.icon-only { padding: 0 !important; width: var(--kg-form-height); height: var(--kg-form-height); gap: 0; flex-shrink: 0; } button.icon-only.circular { border-radius: 50%; } button:hover { filter: brightness(0.9); } button:active { filter: brightness(0.8); } /* Semantic Colors */ .primary { background-color: var(--kg-primary); color: #FFFFFF; } .secondary { background-color: var(--kg-secondary); color: #FFFFFF; } .tertiary { background-color: var(--kg-tertiary); color: #FFFFFF; } .error { background-color: #DB2828; color: #FFFFFF; } /* Custom Color Support */ .custom-color { background: var(--kg-custom-color) !important; color: #FFFFFF !important; border: none !important; } /* Variations */ .fullwidth { width: 100%; } .circular { border-radius: 10rem; } .square { padding: 0 !important; width: var(--kg-form-height); height: var(--kg-form-height); min-width: var(--kg-form-height); } .basic { background: transparent !important; box-shadow: 0 0 0 1px var(--kg-border) inset !important; color: var(--kg-text) !important; } .basic:hover { background: var(--kg-surface) !important; box-shadow: 0 0 0 1px var(--kg-text-muted) inset !important; } .basic.primary { color: var(--kg-primary) !important; box-shadow: 0 0 0 1px var(--kg-primary) inset !important; } .basic.secondary { color: var(--kg-secondary) !important; box-shadow: 0 0 0 1px var(--kg-secondary) inset !important; } .basic.tertiary { color: var(--kg-tertiary) !important; box-shadow: 0 0 0 1px var(--kg-tertiary) inset !important; } .basic.error { color: #DB2828 !important; box-shadow: 0 0 0 1px #DB2828 inset !important; } .text { background: transparent !important; border: none !important; box-shadow: none !important; color: var(--kg-text) !important; padding-left: 0.5em !important; padding-right: 0.5em !important; } .text:hover { background: var(--kg-surface) !important; color: var(--kg-primary) !important; } .text.primary { color: var(--kg-primary) !important; } .text.secondary { color: var(--kg-secondary) !important; } /* Sizes */ .mini { font-size: 0.7rem; padding: 0.4em 0.8em; } .tiny { font-size: 0.8rem; padding: 0.5em 1em; } .small { font-size: 0.9rem; padding: 0.6em 1.25em; } .medium { font-size: 1rem; padding: 0.78em 1.5em; } .large { font-size: 1.1rem; padding: 0.85em 1.75em; } .big { font-size: 1.25rem; padding: 0.9em 2em; } .huge { font-size: 1.4rem; padding: 1em 2.25em; } .massive { font-size: 1.6rem; padding: 1.1em 2.5em; } /* Loading */ .loading { cursor: default !important; pointer-events: none !important; color: transparent !important; } .loading::after { position: absolute; content: ''; top: 50%; left: 50%; width: 1.15em; height: 1.15em; border-radius: 50%; border: 0.2em solid rgba(0, 0, 0, 0.1); border-top-color: var(--kg-text); transform: translate(-50%, -50%); animation: button-spin 0.6s linear infinite; } /* Spinner colors for semantic/colored buttons */ .primary.loading::after, .secondary.loading::after, .tertiary.loading::after, .error.loading::after, .custom-color.loading::after { border-color: rgba(255, 255, 255, 0.3); border-top-color: #fff; } /* Basic buttons should use their respective semantic colors for the spinner */ .basic.primary.loading::after { border-top-color: var(--kg-primary); } .basic.secondary.loading::after { border-top-color: var(--kg-secondary); } .basic.tertiary.loading::after { border-top-color: var(--kg-tertiary); } .basic.error.loading::after { border-top-color: #DB2828; } @keyframes button-spin { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } } /* Disabled */ button:disabled { cursor: default !important; opacity: 0.45 !important; box-shadow: none !important; pointer-events: none !important; } `"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"kind": "method",
|
|
206
|
+
"name": "_handleSlotChange",
|
|
207
|
+
"parameters": [
|
|
208
|
+
{
|
|
209
|
+
"name": "e"
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"kind": "method",
|
|
215
|
+
"name": "render"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"kind": "method",
|
|
219
|
+
"name": "_handleClick",
|
|
220
|
+
"parameters": [
|
|
221
|
+
{
|
|
222
|
+
"name": "e"
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"kind": "field",
|
|
228
|
+
"name": "color",
|
|
229
|
+
"type": {
|
|
230
|
+
"text": "string"
|
|
231
|
+
},
|
|
232
|
+
"default": "''"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"kind": "field",
|
|
236
|
+
"name": "size",
|
|
237
|
+
"type": {
|
|
238
|
+
"text": "string"
|
|
239
|
+
},
|
|
240
|
+
"default": "'medium'"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"kind": "field",
|
|
244
|
+
"name": "hasText",
|
|
245
|
+
"type": {
|
|
246
|
+
"text": "boolean"
|
|
247
|
+
},
|
|
248
|
+
"default": "false"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"kind": "field",
|
|
252
|
+
"name": "hasLeft",
|
|
253
|
+
"type": {
|
|
254
|
+
"text": "boolean"
|
|
255
|
+
},
|
|
256
|
+
"default": "false"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"kind": "field",
|
|
260
|
+
"name": "hasRight",
|
|
261
|
+
"type": {
|
|
262
|
+
"text": "boolean"
|
|
263
|
+
},
|
|
264
|
+
"default": "false"
|
|
265
|
+
}
|
|
266
|
+
],
|
|
267
|
+
"superclass": {
|
|
268
|
+
"name": "LitElement",
|
|
269
|
+
"package": "lit"
|
|
270
|
+
},
|
|
271
|
+
"tagName": "kg-button",
|
|
272
|
+
"customElement": true
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
"exports": [
|
|
276
|
+
{
|
|
277
|
+
"kind": "js",
|
|
278
|
+
"name": "kgbutton",
|
|
279
|
+
"declaration": {
|
|
280
|
+
"name": "kgbutton",
|
|
281
|
+
"module": "src/components/kg-button.js"
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"kind": "custom-element-definition",
|
|
286
|
+
"name": "kg-button",
|
|
287
|
+
"declaration": {
|
|
288
|
+
"name": "kgbutton",
|
|
289
|
+
"module": "src/components/kg-button.js"
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
]
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"kind": "javascript-module",
|
|
296
|
+
"path": "src/components/kg-card.js",
|
|
297
|
+
"declarations": [
|
|
298
|
+
{
|
|
299
|
+
"kind": "class",
|
|
300
|
+
"description": "",
|
|
301
|
+
"name": "kgcard",
|
|
302
|
+
"slots": [
|
|
303
|
+
{
|
|
304
|
+
"description": "Card content",
|
|
305
|
+
"name": ""
|
|
306
|
+
}
|
|
307
|
+
],
|
|
308
|
+
"members": [
|
|
309
|
+
{
|
|
310
|
+
"kind": "field",
|
|
311
|
+
"name": "properties",
|
|
312
|
+
"type": {
|
|
313
|
+
"text": "object"
|
|
314
|
+
},
|
|
315
|
+
"static": true,
|
|
316
|
+
"default": "{ raised: { type: Boolean }, vertical: { type: Boolean }, inverted: { type: Boolean }, color: { type: String }, // primary, secondary, tertiary basic: { type: Boolean }, padded: { type: Boolean } }"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"kind": "field",
|
|
320
|
+
"name": "styles",
|
|
321
|
+
"static": true,
|
|
322
|
+
"default": "css` :host { display: block; margin: 1rem 0; } .ui-card { position: relative; background: var(--kg-bg); box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); border-radius: var(--kg-radius-lg, 12px); border: 1px solid var(--kg-border); color: var(--kg-text); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden; display: flex; flex-direction: column; } .card-header { padding: 1rem 1.25rem; background: var(--kg-surface); border-bottom: 1px solid var(--kg-border); font-weight: 700; font-size: 1.1rem; } .card-content { padding: 1.25rem; flex: 1; } .card-footer { padding: 0.75rem 1.25rem; background: var(--kg-surface); border-top: 1px solid var(--kg-border); font-size: 0.9rem; color: var(--kg-text-muted); } /* Variations */ .raised { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); } .raised:hover { transform: translateY(-4px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); } .basic { background: transparent; border: 1px dashed var(--kg-border); box-shadow: none; } .padded .card-content { padding: 2.5rem; } .inverted { background: #1B1C1D !important; color: #FFFFFF !important; border-color: #3d3e3f !important; } .inverted .card-header, .inverted .card-footer { background: rgba(255, 255, 255, 0.05) !important; border-color: rgba(255, 255, 255, 0.1) !important; color: #FFFFFF !important; } .inverted .card-footer { color: rgba(255, 255, 255, 0.6) !important; } /* States / Colors */ .primary { border-top: 4px solid var(--kg-primary); } .secondary { border-top: 4px solid var(--kg-secondary); } .tertiary { border-top: 4px solid var(--kg-tertiary); } `"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"kind": "method",
|
|
326
|
+
"name": "render"
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"kind": "field",
|
|
330
|
+
"name": "raised",
|
|
331
|
+
"type": {
|
|
332
|
+
"text": "boolean"
|
|
333
|
+
},
|
|
334
|
+
"default": "false"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"kind": "field",
|
|
338
|
+
"name": "inverted",
|
|
339
|
+
"type": {
|
|
340
|
+
"text": "boolean"
|
|
341
|
+
},
|
|
342
|
+
"default": "false"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"kind": "field",
|
|
346
|
+
"name": "basic",
|
|
347
|
+
"type": {
|
|
348
|
+
"text": "boolean"
|
|
349
|
+
},
|
|
350
|
+
"default": "false"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"kind": "field",
|
|
354
|
+
"name": "padded",
|
|
355
|
+
"type": {
|
|
356
|
+
"text": "boolean"
|
|
357
|
+
},
|
|
358
|
+
"default": "false"
|
|
359
|
+
}
|
|
360
|
+
],
|
|
361
|
+
"superclass": {
|
|
362
|
+
"name": "LitElement",
|
|
363
|
+
"package": "lit"
|
|
364
|
+
},
|
|
365
|
+
"tagName": "kg-card",
|
|
366
|
+
"customElement": true
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
"exports": [
|
|
370
|
+
{
|
|
371
|
+
"kind": "js",
|
|
372
|
+
"name": "kgcard",
|
|
373
|
+
"declaration": {
|
|
374
|
+
"name": "kgcard",
|
|
375
|
+
"module": "src/components/kg-card.js"
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"kind": "custom-element-definition",
|
|
380
|
+
"name": "kg-card",
|
|
381
|
+
"declaration": {
|
|
382
|
+
"name": "kgcard",
|
|
383
|
+
"module": "src/components/kg-card.js"
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
]
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"kind": "javascript-module",
|
|
390
|
+
"path": "src/components/kg-checkbox.js",
|
|
391
|
+
"declarations": [
|
|
392
|
+
{
|
|
393
|
+
"kind": "class",
|
|
394
|
+
"description": "",
|
|
395
|
+
"name": "kgcheckbox",
|
|
396
|
+
"members": [
|
|
397
|
+
{
|
|
398
|
+
"kind": "field",
|
|
399
|
+
"name": "properties",
|
|
400
|
+
"type": {
|
|
401
|
+
"text": "object"
|
|
402
|
+
},
|
|
403
|
+
"static": true,
|
|
404
|
+
"default": "{ checked: { type: Boolean, reflect: true }, label: { type: String }, disabled: { type: Boolean }, color: { type: String }, indeterminate: { type: Boolean } }"
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"kind": "field",
|
|
408
|
+
"name": "styles",
|
|
409
|
+
"static": true,
|
|
410
|
+
"default": "css` :host { display: inline-block; cursor: pointer; user-select: none; font-family: inherit; } .kg-checkbox-container { display: flex; align-items: center; gap: 10px; position: relative; } .checkbox-box { width: 20px; height: 20px; border: 2px solid var(--kg-border); border-radius: 6px; display: flex; align-items: center; justify-content: center; background: var(--kg-bg); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); position: relative; flex-shrink: 0; } .kg-checkbox-container:hover .checkbox-box { border-color: var(--checkbox-active-color, var(--kg-primary)); } .kg-checkbox-container.checked .checkbox-box { background: var(--checkbox-active-color, var(--kg-primary)); border-color: var(--checkbox-active-color, var(--kg-primary)); } /* Checkmark Icon */ .checkmark { width: 12px; height: 12px; color: white; opacity: 0; transform: scale(0.5) rotate(-45deg); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); } .checked .checkmark { opacity: 1; transform: scale(1) rotate(0); } /* Indeterminate state */ .checkbox-box::after { content: ''; position: absolute; width: 10px; height: 2px; background: white; border-radius: 1px; opacity: 0; transform: scaleX(0.5); transition: all 0.2s; } .kg-checkbox-container.indeterminate .checkbox-box { background: var(--kg-primary); border-color: var(--kg-primary); } .indeterminate .checkbox-box::after { opacity: 1; transform: scaleX(1); } .label-text { font-size: 0.95rem; color: var(--kg-text); transition: color 0.2s; } /* States */ .disabled { opacity: 0.5; cursor: not-allowed; } `"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"kind": "method",
|
|
414
|
+
"name": "toggle"
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"kind": "method",
|
|
418
|
+
"name": "render"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"kind": "field",
|
|
422
|
+
"name": "checked",
|
|
423
|
+
"type": {
|
|
424
|
+
"text": "boolean"
|
|
425
|
+
},
|
|
426
|
+
"default": "false"
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"kind": "field",
|
|
430
|
+
"name": "disabled",
|
|
431
|
+
"type": {
|
|
432
|
+
"text": "boolean"
|
|
433
|
+
},
|
|
434
|
+
"default": "false"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"kind": "field",
|
|
438
|
+
"name": "indeterminate",
|
|
439
|
+
"type": {
|
|
440
|
+
"text": "boolean"
|
|
441
|
+
},
|
|
442
|
+
"default": "false"
|
|
443
|
+
}
|
|
444
|
+
],
|
|
445
|
+
"events": [
|
|
446
|
+
{
|
|
447
|
+
"name": "change",
|
|
448
|
+
"type": {
|
|
449
|
+
"text": "CustomEvent"
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
],
|
|
453
|
+
"superclass": {
|
|
454
|
+
"name": "LitElement",
|
|
455
|
+
"package": "lit"
|
|
456
|
+
},
|
|
457
|
+
"tagName": "kg-checkbox",
|
|
458
|
+
"customElement": true
|
|
459
|
+
}
|
|
460
|
+
],
|
|
461
|
+
"exports": [
|
|
462
|
+
{
|
|
463
|
+
"kind": "js",
|
|
464
|
+
"name": "kgcheckbox",
|
|
465
|
+
"declaration": {
|
|
466
|
+
"name": "kgcheckbox",
|
|
467
|
+
"module": "src/components/kg-checkbox.js"
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"kind": "custom-element-definition",
|
|
472
|
+
"name": "kg-checkbox",
|
|
473
|
+
"declaration": {
|
|
474
|
+
"name": "kgcheckbox",
|
|
475
|
+
"module": "src/components/kg-checkbox.js"
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
]
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"kind": "javascript-module",
|
|
482
|
+
"path": "src/components/kg-colorpicker.js",
|
|
483
|
+
"declarations": [
|
|
484
|
+
{
|
|
485
|
+
"kind": "class",
|
|
486
|
+
"description": "",
|
|
487
|
+
"name": "kgcolorpicker",
|
|
488
|
+
"members": [
|
|
489
|
+
{
|
|
490
|
+
"kind": "field",
|
|
491
|
+
"name": "properties",
|
|
492
|
+
"type": {
|
|
493
|
+
"text": "object"
|
|
494
|
+
},
|
|
495
|
+
"static": true,
|
|
496
|
+
"default": "{ value: { type: String, reflect: true }, label: { type: String }, open: { type: Boolean }, disabled: { type: Boolean } }"
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"kind": "field",
|
|
500
|
+
"name": "styles",
|
|
501
|
+
"static": true,
|
|
502
|
+
"default": "css` :host { display: inline-block; font-family: inherit; } .kg-color-container { display: flex; flex-direction: column; gap: 6px; } .label-text { font-size: 0.875rem; font-weight: 600; color: var(--kg-text); opacity: 0.8; margin-left: 2px; } .picker-trigger { display: flex; align-items: center; gap: 10px; padding: 0 10px; height: var(--kg-form-height); background: var(--kg-surface); border: 1px solid var(--kg-border); border-radius: var(--kg-radius-md); cursor: pointer; transition: all 0.2s; box-sizing: border-box; } .picker-trigger:hover { border-color: var(--kg-primary); } .color-swatch { width: 24px; height: 24px; border-radius: 4px; border: 1px solid rgba(0,0,0,0.1); flex-shrink: 0; } .color-value { font-size: 0.9rem; font-family: monospace; color: var(--kg-text); flex: 1; } .picker-popup { position: absolute; top: calc(100% + 8px); left: 0; z-index: 1000; background: var(--kg-bg); border: 1px solid var(--kg-border); border-radius: var(--kg-radius-lg); box-shadow: var(--kg-shadow-lg); padding: 16px; display: none; width: 230px; box-sizing: border-box; } .picker-popup.open { display: block; animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1); } @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } .swatch-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 16px; } .preset-swatch { width: 100%; aspect-ratio: 1; border-radius: 6px; cursor: pointer; border: 1px solid rgba(0,0,0,0.1); transition: all 0.2s; box-sizing: border-box; } .preset-swatch:hover { transform: scale(1.15); box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 2; } .custom-input-container { border-top: 1px solid var(--kg-border); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; } .color-input-wrapper { display: flex; align-items: center; background: var(--kg-surface); border: 1px solid var(--kg-border); border-radius: 8px; padding: 4px; height: var(--kg-form-height); overflow: hidden; } input[type=\"color\"] { flex: 1; height: 100%; padding: 0; border: none; background: none; cursor: pointer; min-width: 40px; } .color-hex-label { font-family: monospace; font-size: 0.85rem; padding: 0 10px; color: var(--kg-text-muted); border-left: 1px solid var(--kg-border); } .disabled { opacity: 0.5; pointer-events: none; } `"
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
"kind": "method",
|
|
506
|
+
"name": "_handleOutsideClick",
|
|
507
|
+
"parameters": [
|
|
508
|
+
{
|
|
509
|
+
"name": "e"
|
|
510
|
+
}
|
|
511
|
+
]
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
"kind": "method",
|
|
515
|
+
"name": "_togglePopup",
|
|
516
|
+
"parameters": [
|
|
517
|
+
{
|
|
518
|
+
"name": "e"
|
|
519
|
+
}
|
|
520
|
+
]
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"kind": "method",
|
|
524
|
+
"name": "_selectColor",
|
|
525
|
+
"parameters": [
|
|
526
|
+
{
|
|
527
|
+
"name": "color"
|
|
528
|
+
}
|
|
529
|
+
]
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"kind": "method",
|
|
533
|
+
"name": "_handleInput",
|
|
534
|
+
"parameters": [
|
|
535
|
+
{
|
|
536
|
+
"name": "e"
|
|
537
|
+
}
|
|
538
|
+
]
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"kind": "method",
|
|
542
|
+
"name": "_dispatchChange"
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"kind": "method",
|
|
546
|
+
"name": "render"
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"kind": "field",
|
|
550
|
+
"name": "value",
|
|
551
|
+
"type": {
|
|
552
|
+
"text": "string"
|
|
553
|
+
},
|
|
554
|
+
"default": "'#1367FF'"
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
"kind": "field",
|
|
558
|
+
"name": "open",
|
|
559
|
+
"type": {
|
|
560
|
+
"text": "boolean"
|
|
561
|
+
},
|
|
562
|
+
"default": "false"
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
"kind": "field",
|
|
566
|
+
"name": "disabled",
|
|
567
|
+
"type": {
|
|
568
|
+
"text": "boolean"
|
|
569
|
+
},
|
|
570
|
+
"default": "false"
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
"kind": "field",
|
|
574
|
+
"name": "_presets",
|
|
575
|
+
"type": {
|
|
576
|
+
"text": "array"
|
|
577
|
+
},
|
|
578
|
+
"default": "[ '#1367FF', '#FF0000', '#00FF00', '#FFA500', '#800080', '#000000', '#FFFFFF', '#808080', '#FFC0CB', '#00FFFF', '#FFFF00', '#A52A2A', '#3498db', '#2ecc71', '#e74c3c', '#f1c40f', '#9b59b6', '#34495e' ]"
|
|
579
|
+
}
|
|
580
|
+
],
|
|
581
|
+
"events": [
|
|
582
|
+
{
|
|
583
|
+
"name": "change",
|
|
584
|
+
"type": {
|
|
585
|
+
"text": "CustomEvent"
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
],
|
|
589
|
+
"superclass": {
|
|
590
|
+
"name": "LitElement",
|
|
591
|
+
"package": "lit"
|
|
592
|
+
},
|
|
593
|
+
"tagName": "kg-colorpicker",
|
|
594
|
+
"customElement": true
|
|
595
|
+
}
|
|
596
|
+
],
|
|
597
|
+
"exports": [
|
|
598
|
+
{
|
|
599
|
+
"kind": "js",
|
|
600
|
+
"name": "kgcolorpicker",
|
|
601
|
+
"declaration": {
|
|
602
|
+
"name": "kgcolorpicker",
|
|
603
|
+
"module": "src/components/kg-colorpicker.js"
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"kind": "custom-element-definition",
|
|
608
|
+
"name": "kg-colorpicker",
|
|
609
|
+
"declaration": {
|
|
610
|
+
"name": "kgcolorpicker",
|
|
611
|
+
"module": "src/components/kg-colorpicker.js"
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
]
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
"kind": "javascript-module",
|
|
618
|
+
"path": "src/components/kg-column.js",
|
|
619
|
+
"declarations": [
|
|
620
|
+
{
|
|
621
|
+
"kind": "class",
|
|
622
|
+
"description": "",
|
|
623
|
+
"name": "kgcolumn",
|
|
624
|
+
"members": [
|
|
625
|
+
{
|
|
626
|
+
"kind": "field",
|
|
627
|
+
"name": "properties",
|
|
628
|
+
"type": {
|
|
629
|
+
"text": "object"
|
|
630
|
+
},
|
|
631
|
+
"static": true,
|
|
632
|
+
"default": "{ sm: { type: Number }, // mobile md: { type: Number }, // tablet lg: { type: Number }, // desktop (replaces width) floated: { type: String }, color: { type: String } }"
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
"kind": "field",
|
|
636
|
+
"name": "styles",
|
|
637
|
+
"static": true,
|
|
638
|
+
"default": "css` :host { display: block; box-sizing: border-box; min-height: 1px; padding: var(--kg-space-md); flex: 0 0 auto; width: var(--kg-col-lg, 100%); } :host([floated=\"right\"]) { margin-left: auto; } :host([floated=\"left\"]) { margin-right: auto; } @media (max-width: 768px) { :host { width: var(--kg-col-sm, 100%); } } @media (min-width: 769px) and (max-width: 1024px) { :host { width: var(--kg-col-md, var(--kg-col-lg, 100%)); } } `"
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
"kind": "method",
|
|
642
|
+
"name": "willUpdate",
|
|
643
|
+
"parameters": [
|
|
644
|
+
{
|
|
645
|
+
"name": "changedProperties"
|
|
646
|
+
}
|
|
647
|
+
]
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"kind": "method",
|
|
651
|
+
"name": "render"
|
|
652
|
+
}
|
|
653
|
+
],
|
|
654
|
+
"superclass": {
|
|
655
|
+
"name": "LitElement",
|
|
656
|
+
"package": "lit"
|
|
657
|
+
},
|
|
658
|
+
"tagName": "kg-column",
|
|
659
|
+
"customElement": true
|
|
660
|
+
}
|
|
661
|
+
],
|
|
662
|
+
"exports": [
|
|
663
|
+
{
|
|
664
|
+
"kind": "js",
|
|
665
|
+
"name": "kgcolumn",
|
|
666
|
+
"declaration": {
|
|
667
|
+
"name": "kgcolumn",
|
|
668
|
+
"module": "src/components/kg-column.js"
|
|
669
|
+
}
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
"kind": "custom-element-definition",
|
|
673
|
+
"name": "kg-column",
|
|
674
|
+
"declaration": {
|
|
675
|
+
"name": "kgcolumn",
|
|
676
|
+
"module": "src/components/kg-column.js"
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
]
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
"kind": "javascript-module",
|
|
683
|
+
"path": "src/components/kg-datagrid.js",
|
|
684
|
+
"declarations": [
|
|
685
|
+
{
|
|
686
|
+
"kind": "class",
|
|
687
|
+
"description": "",
|
|
688
|
+
"name": "kgdatagrid",
|
|
689
|
+
"members": [
|
|
690
|
+
{
|
|
691
|
+
"kind": "field",
|
|
692
|
+
"name": "properties",
|
|
693
|
+
"type": {
|
|
694
|
+
"text": "object"
|
|
695
|
+
},
|
|
696
|
+
"static": true,
|
|
697
|
+
"default": "{ columns: { type: Array }, // [{ label: 'Name', field: 'name', width: '100px', align: 'left', sortable: true }] data: { type: Array }, loading: { type: Boolean }, striped: { type: Boolean }, bordered: { type: Boolean }, hover: { type: Boolean }, selectable: { type: Boolean }, selectionMode: { type: String, attribute: 'selection-mode' }, // 'single' | 'multiple', default 'multiple' selectedRows: { type: Array, state: true }, // Sorting sortable: { type: Boolean }, // Global sort enable/disable _sortColumn: { type: String, state: true }, _sortDirection: { type: String, state: true }, // 'asc' | 'desc' // Pagination pagination: { type: Boolean }, pageSize: { type: Number, attribute: 'page-size' }, _currentPage: { type: Number, state: true } }"
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
"kind": "field",
|
|
701
|
+
"name": "styles",
|
|
702
|
+
"static": true,
|
|
703
|
+
"default": "css` :host { display: block; width: 100%; font-family: inherit; color: var(--kg-text); --datagrid-border: var(--kg-border, #e2e8f0); --datagrid-header-bg: var(--kg-surface, #f8fafc); --datagrid-selected-bg: rgba(var(--kg-primary-rgb, 65, 171, 52), 0.08); } .wrapper { display: flex; flex-direction: column; gap: 1rem; width: 100%; } .table-container { width: 100%; overflow-x: auto; border: 1px solid var(--datagrid-border); border-radius: var(--kg-radius-md, 8px); background: var(--kg-bg); } table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.9rem; } thead { background-color: var(--datagrid-header-bg); border-bottom: 2px solid var(--datagrid-border); } th { padding: 12px 16px; font-weight: 600; color: var(--kg-text-muted); white-space: nowrap; user-select: none; transition: background 0.2s; overflow: hidden; text-overflow: ellipsis; } th.sortable { cursor: pointer; } th.sortable:hover { background-color: rgba(0,0,0,0.03); color: var(--kg-text); } td { padding: 12px 16px; border-bottom: 1px solid var(--datagrid-border); transition: background 0.2s; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } tr:last-child td { border-bottom: none; } /* Modifiers */ :host([striped]) tbody tr:nth-child(even) { background-color: var(--kg-surface); } :host([bordered]) td, :host([bordered]) th { border-right: 1px solid var(--datagrid-border); } :host([bordered]) td:last-child, :host([bordered]) th:last-child { border-right: none; } tbody tr { transition: background-color 0.2s; } :host([hover]) tbody tr:hover { background-color: var(--datagrid-hover-bg, rgba(0, 0, 0, 0.04)); } /* Selection */ .checkbox-cell { width: 48px; text-align: center; padding: 0 8px; } /* kg-checkbox and kg-radio handle their own sizing and cursor */ tr.selected { background-color: var(--datagrid-selected-bg) !important; } /* Alignment */ .align-left { text-align: left; } .align-center { text-align: center; } .align-right { text-align: right; } /* Empty State */ .empty-state { padding: 3rem; text-align: center; color: var(--kg-text-muted); } /* Sort Icons */ .sort-icon { display: inline-block; margin-left: 4px; vertical-align: middle; opacity: 0.3; font-size: 0.8em; } th.sortable:hover .sort-icon { opacity: 0.7; } th.active-sort .sort-icon { opacity: 1; color: var(--kg-primary); } /* Pagination */ .pagination-footer { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--datagrid-border); margin-top: -1px; /* Overlap with table border if needed, or keeping it separate */ } .pagination-info { font-size: 0.85rem; color: var(--kg-text-muted); font-weight: 500; } .pagination-controls { display: flex; align-items: center; gap: 0.25rem; } `"
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
"kind": "method",
|
|
707
|
+
"name": "_handleSelectAll",
|
|
708
|
+
"parameters": [
|
|
709
|
+
{
|
|
710
|
+
"name": "e"
|
|
711
|
+
}
|
|
712
|
+
]
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
"kind": "method",
|
|
716
|
+
"name": "_handleRowSelect",
|
|
717
|
+
"parameters": [
|
|
718
|
+
{
|
|
719
|
+
"name": "row"
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
"name": "e"
|
|
723
|
+
}
|
|
724
|
+
]
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
"kind": "method",
|
|
728
|
+
"name": "_isSelected",
|
|
729
|
+
"parameters": [
|
|
730
|
+
{
|
|
731
|
+
"name": "row"
|
|
732
|
+
}
|
|
733
|
+
]
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
"kind": "method",
|
|
737
|
+
"name": "_emitSelectionChange"
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
"kind": "method",
|
|
741
|
+
"name": "_handleSort",
|
|
742
|
+
"parameters": [
|
|
743
|
+
{
|
|
744
|
+
"name": "column"
|
|
745
|
+
}
|
|
746
|
+
]
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
"kind": "method",
|
|
750
|
+
"name": "_getProcessedData"
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"kind": "method",
|
|
754
|
+
"name": "_changePage",
|
|
755
|
+
"parameters": [
|
|
756
|
+
{
|
|
757
|
+
"name": "newPage"
|
|
758
|
+
}
|
|
759
|
+
]
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
"kind": "method",
|
|
763
|
+
"name": "_renderCellContent",
|
|
764
|
+
"parameters": [
|
|
765
|
+
{
|
|
766
|
+
"name": "col"
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
"name": "row"
|
|
770
|
+
}
|
|
771
|
+
]
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
"kind": "method",
|
|
775
|
+
"name": "_renderHeaderContent",
|
|
776
|
+
"parameters": [
|
|
777
|
+
{
|
|
778
|
+
"name": "col"
|
|
779
|
+
}
|
|
780
|
+
]
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
"kind": "method",
|
|
784
|
+
"name": "render"
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
"kind": "field",
|
|
788
|
+
"name": "columns",
|
|
789
|
+
"type": {
|
|
790
|
+
"text": "array"
|
|
791
|
+
},
|
|
792
|
+
"default": "[]"
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
"kind": "field",
|
|
796
|
+
"name": "data",
|
|
797
|
+
"type": {
|
|
798
|
+
"text": "array"
|
|
799
|
+
},
|
|
800
|
+
"default": "[]"
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
"kind": "field",
|
|
804
|
+
"name": "loading",
|
|
805
|
+
"type": {
|
|
806
|
+
"text": "boolean"
|
|
807
|
+
},
|
|
808
|
+
"default": "false"
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
"kind": "field",
|
|
812
|
+
"name": "striped",
|
|
813
|
+
"type": {
|
|
814
|
+
"text": "boolean"
|
|
815
|
+
},
|
|
816
|
+
"default": "false"
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
"kind": "field",
|
|
820
|
+
"name": "bordered",
|
|
821
|
+
"type": {
|
|
822
|
+
"text": "boolean"
|
|
823
|
+
},
|
|
824
|
+
"default": "false"
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
"kind": "field",
|
|
828
|
+
"name": "hover",
|
|
829
|
+
"type": {
|
|
830
|
+
"text": "boolean"
|
|
831
|
+
},
|
|
832
|
+
"default": "true"
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
"kind": "field",
|
|
836
|
+
"name": "selectable",
|
|
837
|
+
"type": {
|
|
838
|
+
"text": "boolean"
|
|
839
|
+
},
|
|
840
|
+
"default": "false"
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
"kind": "field",
|
|
844
|
+
"name": "selectionMode",
|
|
845
|
+
"type": {
|
|
846
|
+
"text": "string"
|
|
847
|
+
},
|
|
848
|
+
"default": "'multiple'"
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
"kind": "field",
|
|
852
|
+
"name": "selectedRows",
|
|
853
|
+
"type": {
|
|
854
|
+
"text": "array"
|
|
855
|
+
},
|
|
856
|
+
"default": "[]"
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
"kind": "field",
|
|
860
|
+
"name": "sortable",
|
|
861
|
+
"type": {
|
|
862
|
+
"text": "boolean"
|
|
863
|
+
},
|
|
864
|
+
"default": "false"
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
"kind": "field",
|
|
868
|
+
"name": "pagination",
|
|
869
|
+
"type": {
|
|
870
|
+
"text": "boolean"
|
|
871
|
+
},
|
|
872
|
+
"default": "false"
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
"kind": "field",
|
|
876
|
+
"name": "pageSize",
|
|
877
|
+
"type": {
|
|
878
|
+
"text": "number"
|
|
879
|
+
},
|
|
880
|
+
"default": "10"
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
"kind": "field",
|
|
884
|
+
"name": "_currentPage",
|
|
885
|
+
"type": {
|
|
886
|
+
"text": "number"
|
|
887
|
+
},
|
|
888
|
+
"default": "1"
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
"kind": "field",
|
|
892
|
+
"name": "_sortColumn",
|
|
893
|
+
"type": {
|
|
894
|
+
"text": "null"
|
|
895
|
+
},
|
|
896
|
+
"default": "null"
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
"kind": "field",
|
|
900
|
+
"name": "_sortDirection",
|
|
901
|
+
"type": {
|
|
902
|
+
"text": "null"
|
|
903
|
+
},
|
|
904
|
+
"default": "null"
|
|
905
|
+
}
|
|
906
|
+
],
|
|
907
|
+
"events": [
|
|
908
|
+
{
|
|
909
|
+
"name": "selection-change",
|
|
910
|
+
"type": {
|
|
911
|
+
"text": "CustomEvent"
|
|
912
|
+
}
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
"name": "sort",
|
|
916
|
+
"type": {
|
|
917
|
+
"text": "CustomEvent"
|
|
918
|
+
}
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
"name": "page-change",
|
|
922
|
+
"type": {
|
|
923
|
+
"text": "CustomEvent"
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
],
|
|
927
|
+
"superclass": {
|
|
928
|
+
"name": "LitElement",
|
|
929
|
+
"package": "lit"
|
|
930
|
+
},
|
|
931
|
+
"tagName": "kg-datagrid",
|
|
932
|
+
"customElement": true
|
|
933
|
+
}
|
|
934
|
+
],
|
|
935
|
+
"exports": [
|
|
936
|
+
{
|
|
937
|
+
"kind": "js",
|
|
938
|
+
"name": "kgdatagrid",
|
|
939
|
+
"declaration": {
|
|
940
|
+
"name": "kgdatagrid",
|
|
941
|
+
"module": "src/components/kg-datagrid.js"
|
|
942
|
+
}
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
"kind": "custom-element-definition",
|
|
946
|
+
"name": "kg-datagrid",
|
|
947
|
+
"declaration": {
|
|
948
|
+
"name": "kgdatagrid",
|
|
949
|
+
"module": "src/components/kg-datagrid.js"
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
]
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
"kind": "javascript-module",
|
|
956
|
+
"path": "src/components/kg-datepicker.js",
|
|
957
|
+
"declarations": [
|
|
958
|
+
{
|
|
959
|
+
"kind": "class",
|
|
960
|
+
"description": "",
|
|
961
|
+
"name": "kgdatepicker",
|
|
962
|
+
"members": [
|
|
963
|
+
{
|
|
964
|
+
"kind": "field",
|
|
965
|
+
"name": "properties",
|
|
966
|
+
"type": {
|
|
967
|
+
"text": "object"
|
|
968
|
+
},
|
|
969
|
+
"static": true,
|
|
970
|
+
"default": "{ value: { type: String, reflect: true }, open: { type: Boolean, reflect: true }, disabled: { type: Boolean, reflect: true }, placeholder: { type: String }, label: { type: String }, showTime: { type: Boolean }, mode: { type: String }, // 'date', 'month', 'year' locale: { type: String }, min: { type: String }, max: { type: String }, _viewDate: { type: Object }, _selectedDate: { type: Object } }"
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
"kind": "field",
|
|
974
|
+
"name": "styles",
|
|
975
|
+
"static": true,
|
|
976
|
+
"default": "css` :host { display: inline-block; width: 100%; position: relative; font-family: inherit; } :host([disabled]) { pointer-events: none; } .datepicker-trigger { width: 100%; } .datepicker-popup { position: absolute; top: calc(100% + 8px); left: 0; z-index: 1000; background: var(--kg-bg); border: 1px solid var(--kg-border); border-radius: var(--kg-radius-lg); box-shadow: var(--kg-shadow-lg); padding: 1.25rem; width: 300px; display: none; user-select: none; animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1); } .datepicker-popup.open { display: block; } @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } /* Calendar Styles */ .calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; } .month-year { display: flex; gap: 4px; font-weight: 700; font-size: 1rem; color: var(--kg-text); } .header-select { background: transparent; border: none; color: inherit; font-family: inherit; font-weight: 700; font-size: 0.95rem; cursor: pointer; padding: 4px; border-radius: 4px; outline: none; transition: background 0.2s; -webkit-appearance: none; } .header-select:hover { background: var(--kg-surface); } .nav-btn { background: none; border: none; cursor: pointer; padding: 5px; border-radius: 6px; color: var(--kg-text-muted); display: flex; align-items: center; justify-content: center; transition: all 0.2s; } .nav-btn:hover { background: var(--kg-surface); color: var(--kg-text); } .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; } .weekday { text-align: center; font-size: 0.75rem; font-weight: 700; color: var(--kg-text-muted); padding-bottom: 0.5rem; } .day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 0.875rem; cursor: pointer; border-radius: 8px; transition: all 0.2s; color: var(--kg-text); } .day:hover:not(.other-month):not(.selected) { background: var(--kg-bg-secondary, rgba(0,0,0,0.05)); color: var(--kg-primary); transform: scale(1.1); z-index: 1; } .day.other-month { color: var(--kg-text-muted); opacity: 0.3; cursor: default; } .day.selected { background: var(--kg-primary); color: white; font-weight: 700; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); } .day.today { box-shadow: 0 0 0 2px var(--kg-primary) inset; color: var(--kg-primary); font-weight: 700; } .day.today.selected { color: white; border-color: rgba(255, 255, 255, 0.4); } .day.focused { background: var(--kg-surface); box-shadow: 0 0 0 2px var(--kg-primary) inset; } .day.selected.focused { background: var(--kg-primary); box-shadow: 0 0 0 2px rgba(255,255,255,0.4) inset; } .day.today.focused:not(.selected) { background: var(--kg-surface); } /* Time Picker Styles */ .time-picker { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--kg-border); display: flex; align-items: center; justify-content: center; gap: 8px; } .time-unit { display: flex; flex-direction: column; align-items: center; gap: 4px; } .time-select { background: var(--kg-surface); border: 1px solid var(--kg-border); color: var(--kg-text); padding: 6px 8px; border-radius: 6px; font-weight: 700; outline: none; cursor: pointer; } .time-separator { font-weight: 700; font-size: 1.25rem; color: var(--kg-text-muted); } .day.disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; background: transparent; color: var(--kg-text-muted); } /* Month/Year selector grids */ .selector-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 0.5rem; } .selector-item { padding: 10px 4px; text-align: center; border-radius: 8px; cursor: pointer; font-size: 0.9rem; color: var(--kg-text); transition: all 0.2s; font-weight: 500; } .selector-item:hover { background: var(--kg-bg-secondary, rgba(0,0,0,0.05)); color: var(--kg-primary); transform: translateY(-1px); } .selector-item.selected { background: var(--kg-primary); color: white; font-weight: 700; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); } `"
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
"kind": "method",
|
|
980
|
+
"name": "_handleOutsideClick",
|
|
981
|
+
"parameters": [
|
|
982
|
+
{
|
|
983
|
+
"name": "e"
|
|
984
|
+
}
|
|
985
|
+
]
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
"kind": "method",
|
|
989
|
+
"name": "togglePopup",
|
|
990
|
+
"parameters": [
|
|
991
|
+
{
|
|
992
|
+
"name": "e"
|
|
993
|
+
}
|
|
994
|
+
]
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
"kind": "method",
|
|
998
|
+
"name": "_handleInputKeydown",
|
|
999
|
+
"parameters": [
|
|
1000
|
+
{
|
|
1001
|
+
"name": "e"
|
|
1002
|
+
}
|
|
1003
|
+
]
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
"kind": "method",
|
|
1007
|
+
"name": "_getDateFormat"
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
"kind": "method",
|
|
1011
|
+
"name": "_handleManualInput",
|
|
1012
|
+
"parameters": [
|
|
1013
|
+
{
|
|
1014
|
+
"name": "e"
|
|
1015
|
+
}
|
|
1016
|
+
]
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
"kind": "method",
|
|
1020
|
+
"name": "_changeMonth",
|
|
1021
|
+
"parameters": [
|
|
1022
|
+
{
|
|
1023
|
+
"name": "delta"
|
|
1024
|
+
}
|
|
1025
|
+
]
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
"kind": "method",
|
|
1029
|
+
"name": "_setViewMonth",
|
|
1030
|
+
"parameters": [
|
|
1031
|
+
{
|
|
1032
|
+
"name": "month"
|
|
1033
|
+
}
|
|
1034
|
+
]
|
|
1035
|
+
},
|
|
1036
|
+
{
|
|
1037
|
+
"kind": "method",
|
|
1038
|
+
"name": "_setViewYear",
|
|
1039
|
+
"parameters": [
|
|
1040
|
+
{
|
|
1041
|
+
"name": "year"
|
|
1042
|
+
}
|
|
1043
|
+
]
|
|
1044
|
+
},
|
|
1045
|
+
{
|
|
1046
|
+
"kind": "method",
|
|
1047
|
+
"name": "_setTime",
|
|
1048
|
+
"parameters": [
|
|
1049
|
+
{
|
|
1050
|
+
"name": "type"
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
"name": "val"
|
|
1054
|
+
}
|
|
1055
|
+
]
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
"kind": "method",
|
|
1059
|
+
"name": "_formatValue",
|
|
1060
|
+
"parameters": [
|
|
1061
|
+
{
|
|
1062
|
+
"name": "date"
|
|
1063
|
+
}
|
|
1064
|
+
]
|
|
1065
|
+
},
|
|
1066
|
+
{
|
|
1067
|
+
"kind": "method",
|
|
1068
|
+
"name": "_handleToday",
|
|
1069
|
+
"parameters": [
|
|
1070
|
+
{
|
|
1071
|
+
"name": "e"
|
|
1072
|
+
}
|
|
1073
|
+
]
|
|
1074
|
+
},
|
|
1075
|
+
{
|
|
1076
|
+
"kind": "method",
|
|
1077
|
+
"name": "_handleDone",
|
|
1078
|
+
"parameters": [
|
|
1079
|
+
{
|
|
1080
|
+
"name": "e"
|
|
1081
|
+
}
|
|
1082
|
+
]
|
|
1083
|
+
},
|
|
1084
|
+
{
|
|
1085
|
+
"kind": "method",
|
|
1086
|
+
"name": "_handleKeydown",
|
|
1087
|
+
"parameters": [
|
|
1088
|
+
{
|
|
1089
|
+
"name": "e"
|
|
1090
|
+
}
|
|
1091
|
+
]
|
|
1092
|
+
},
|
|
1093
|
+
{
|
|
1094
|
+
"kind": "method",
|
|
1095
|
+
"name": "_parseDateStr",
|
|
1096
|
+
"parameters": [
|
|
1097
|
+
{
|
|
1098
|
+
"name": "str"
|
|
1099
|
+
}
|
|
1100
|
+
]
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
"kind": "method",
|
|
1104
|
+
"name": "_isDisabled",
|
|
1105
|
+
"parameters": [
|
|
1106
|
+
{
|
|
1107
|
+
"name": "date"
|
|
1108
|
+
}
|
|
1109
|
+
]
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
"kind": "method",
|
|
1113
|
+
"name": "_selectDate",
|
|
1114
|
+
"parameters": [
|
|
1115
|
+
{
|
|
1116
|
+
"name": "day"
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
"name": "isCurrentMonth"
|
|
1120
|
+
}
|
|
1121
|
+
]
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
"kind": "method",
|
|
1125
|
+
"name": "_selectMonth",
|
|
1126
|
+
"parameters": [
|
|
1127
|
+
{
|
|
1128
|
+
"name": "m"
|
|
1129
|
+
}
|
|
1130
|
+
]
|
|
1131
|
+
},
|
|
1132
|
+
{
|
|
1133
|
+
"kind": "method",
|
|
1134
|
+
"name": "_selectYear",
|
|
1135
|
+
"parameters": [
|
|
1136
|
+
{
|
|
1137
|
+
"name": "y"
|
|
1138
|
+
}
|
|
1139
|
+
]
|
|
1140
|
+
},
|
|
1141
|
+
{
|
|
1142
|
+
"kind": "method",
|
|
1143
|
+
"name": "_renderCalendar"
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
"kind": "method",
|
|
1147
|
+
"name": "_renderMonthView"
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
"kind": "method",
|
|
1151
|
+
"name": "_renderYearView"
|
|
1152
|
+
},
|
|
1153
|
+
{
|
|
1154
|
+
"kind": "method",
|
|
1155
|
+
"name": "render"
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
"kind": "field",
|
|
1159
|
+
"name": "open",
|
|
1160
|
+
"type": {
|
|
1161
|
+
"text": "boolean"
|
|
1162
|
+
},
|
|
1163
|
+
"default": "false"
|
|
1164
|
+
},
|
|
1165
|
+
{
|
|
1166
|
+
"kind": "field",
|
|
1167
|
+
"name": "disabled",
|
|
1168
|
+
"type": {
|
|
1169
|
+
"text": "boolean"
|
|
1170
|
+
},
|
|
1171
|
+
"default": "false"
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
"kind": "field",
|
|
1175
|
+
"name": "mode",
|
|
1176
|
+
"type": {
|
|
1177
|
+
"text": "string"
|
|
1178
|
+
},
|
|
1179
|
+
"default": "'date'"
|
|
1180
|
+
},
|
|
1181
|
+
{
|
|
1182
|
+
"kind": "field",
|
|
1183
|
+
"name": "locale",
|
|
1184
|
+
"type": {
|
|
1185
|
+
"text": "string"
|
|
1186
|
+
},
|
|
1187
|
+
"default": "'tr-TR'"
|
|
1188
|
+
},
|
|
1189
|
+
{
|
|
1190
|
+
"kind": "field",
|
|
1191
|
+
"name": "placeholder",
|
|
1192
|
+
"type": {
|
|
1193
|
+
"text": "string"
|
|
1194
|
+
},
|
|
1195
|
+
"default": "'Tarih seçiniz...'"
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
"kind": "field",
|
|
1199
|
+
"name": "min",
|
|
1200
|
+
"type": {
|
|
1201
|
+
"text": "string"
|
|
1202
|
+
},
|
|
1203
|
+
"default": "''"
|
|
1204
|
+
},
|
|
1205
|
+
{
|
|
1206
|
+
"kind": "field",
|
|
1207
|
+
"name": "max",
|
|
1208
|
+
"type": {
|
|
1209
|
+
"text": "string"
|
|
1210
|
+
},
|
|
1211
|
+
"default": "''"
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
"kind": "field",
|
|
1215
|
+
"name": "_viewDate",
|
|
1216
|
+
"default": "new Date()"
|
|
1217
|
+
},
|
|
1218
|
+
{
|
|
1219
|
+
"kind": "field",
|
|
1220
|
+
"name": "value",
|
|
1221
|
+
"type": {
|
|
1222
|
+
"text": "string"
|
|
1223
|
+
},
|
|
1224
|
+
"default": "''"
|
|
1225
|
+
}
|
|
1226
|
+
],
|
|
1227
|
+
"events": [
|
|
1228
|
+
{
|
|
1229
|
+
"name": "change",
|
|
1230
|
+
"type": {
|
|
1231
|
+
"text": "CustomEvent"
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
],
|
|
1235
|
+
"superclass": {
|
|
1236
|
+
"name": "LitElement",
|
|
1237
|
+
"package": "lit"
|
|
1238
|
+
},
|
|
1239
|
+
"tagName": "kg-datepicker",
|
|
1240
|
+
"customElement": true
|
|
1241
|
+
}
|
|
1242
|
+
],
|
|
1243
|
+
"exports": [
|
|
1244
|
+
{
|
|
1245
|
+
"kind": "js",
|
|
1246
|
+
"name": "kgdatepicker",
|
|
1247
|
+
"declaration": {
|
|
1248
|
+
"name": "kgdatepicker",
|
|
1249
|
+
"module": "src/components/kg-datepicker.js"
|
|
1250
|
+
}
|
|
1251
|
+
},
|
|
1252
|
+
{
|
|
1253
|
+
"kind": "custom-element-definition",
|
|
1254
|
+
"name": "kg-datepicker",
|
|
1255
|
+
"declaration": {
|
|
1256
|
+
"name": "kgdatepicker",
|
|
1257
|
+
"module": "src/components/kg-datepicker.js"
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
]
|
|
1261
|
+
},
|
|
1262
|
+
{
|
|
1263
|
+
"kind": "javascript-module",
|
|
1264
|
+
"path": "src/components/kg-divider.js",
|
|
1265
|
+
"declarations": [
|
|
1266
|
+
{
|
|
1267
|
+
"kind": "class",
|
|
1268
|
+
"description": "",
|
|
1269
|
+
"name": "kgdivider",
|
|
1270
|
+
"members": [
|
|
1271
|
+
{
|
|
1272
|
+
"kind": "field",
|
|
1273
|
+
"name": "properties",
|
|
1274
|
+
"type": {
|
|
1275
|
+
"text": "object"
|
|
1276
|
+
},
|
|
1277
|
+
"static": true,
|
|
1278
|
+
"default": "{ vertical: { type: Boolean }, dashed: { type: Boolean }, fitted: { type: Boolean }, inverted: { type: Boolean }, label: { type: String } }"
|
|
1279
|
+
},
|
|
1280
|
+
{
|
|
1281
|
+
"kind": "field",
|
|
1282
|
+
"name": "styles",
|
|
1283
|
+
"static": true,
|
|
1284
|
+
"default": "css` :host { display: block; width: 100%; } :host([vertical]) { display: inline-flex; vertical-align: middle; height: 1.5rem; width: auto; align-self: center; } .divider-container { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; } .divider-container.horizontal { flex-direction: row; margin: 1.5rem 0; } .divider-container.vertical { flex-direction: column; margin: 0 1rem; height: 100%; width: auto; } .line { flex: 1; border: 0; } .divider-container.horizontal .line { border-top: 1px solid var(--kg-border); height: 0; } .divider-container.vertical .line { border-left: 1px solid var(--kg-border); width: 0; height: 100%; } /* Dashed State */ .divider-container.dashed.horizontal .line { border-top-style: dashed; } .divider-container.dashed.vertical .line { border-left-style: dashed; } .label { padding: 0 1rem; font-size: 0.85rem; font-weight: 700; color: var(--kg-text-muted); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.1em; flex-shrink: 0; } .divider-container.vertical .label { padding: 0.5rem 0; writing-mode: vertical-lr; } .fitted { margin: 0 !important; } .inverted .line { border-color: rgba(255, 255, 255, 0.2); } .inverted .label { color: rgba(255, 255, 255, 0.6); } .no-label .label { display: none; } `"
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
"kind": "method",
|
|
1288
|
+
"name": "render"
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
"kind": "field",
|
|
1292
|
+
"name": "vertical",
|
|
1293
|
+
"type": {
|
|
1294
|
+
"text": "boolean"
|
|
1295
|
+
},
|
|
1296
|
+
"default": "false"
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
"kind": "field",
|
|
1300
|
+
"name": "dashed",
|
|
1301
|
+
"type": {
|
|
1302
|
+
"text": "boolean"
|
|
1303
|
+
},
|
|
1304
|
+
"default": "false"
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
"kind": "field",
|
|
1308
|
+
"name": "fitted",
|
|
1309
|
+
"type": {
|
|
1310
|
+
"text": "boolean"
|
|
1311
|
+
},
|
|
1312
|
+
"default": "false"
|
|
1313
|
+
},
|
|
1314
|
+
{
|
|
1315
|
+
"kind": "field",
|
|
1316
|
+
"name": "inverted",
|
|
1317
|
+
"type": {
|
|
1318
|
+
"text": "boolean"
|
|
1319
|
+
},
|
|
1320
|
+
"default": "false"
|
|
1321
|
+
},
|
|
1322
|
+
{
|
|
1323
|
+
"kind": "field",
|
|
1324
|
+
"name": "label",
|
|
1325
|
+
"type": {
|
|
1326
|
+
"text": "string"
|
|
1327
|
+
},
|
|
1328
|
+
"default": "''"
|
|
1329
|
+
}
|
|
1330
|
+
],
|
|
1331
|
+
"superclass": {
|
|
1332
|
+
"name": "LitElement",
|
|
1333
|
+
"package": "lit"
|
|
1334
|
+
},
|
|
1335
|
+
"tagName": "kg-divider",
|
|
1336
|
+
"customElement": true
|
|
1337
|
+
}
|
|
1338
|
+
],
|
|
1339
|
+
"exports": [
|
|
1340
|
+
{
|
|
1341
|
+
"kind": "js",
|
|
1342
|
+
"name": "kgdivider",
|
|
1343
|
+
"declaration": {
|
|
1344
|
+
"name": "kgdivider",
|
|
1345
|
+
"module": "src/components/kg-divider.js"
|
|
1346
|
+
}
|
|
1347
|
+
},
|
|
1348
|
+
{
|
|
1349
|
+
"kind": "custom-element-definition",
|
|
1350
|
+
"name": "kg-divider",
|
|
1351
|
+
"declaration": {
|
|
1352
|
+
"name": "kgdivider",
|
|
1353
|
+
"module": "src/components/kg-divider.js"
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
]
|
|
1357
|
+
},
|
|
1358
|
+
{
|
|
1359
|
+
"kind": "javascript-module",
|
|
1360
|
+
"path": "src/components/kg-drawer.js",
|
|
1361
|
+
"declarations": [
|
|
1362
|
+
{
|
|
1363
|
+
"kind": "class",
|
|
1364
|
+
"description": "",
|
|
1365
|
+
"name": "kgdrawer",
|
|
1366
|
+
"slots": [
|
|
1367
|
+
{
|
|
1368
|
+
"description": "Drawer content",
|
|
1369
|
+
"name": ""
|
|
1370
|
+
},
|
|
1371
|
+
{
|
|
1372
|
+
"description": "Optional header content",
|
|
1373
|
+
"name": "header"
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
"description": "Optional footer content",
|
|
1377
|
+
"name": "footer"
|
|
1378
|
+
}
|
|
1379
|
+
],
|
|
1380
|
+
"members": [
|
|
1381
|
+
{
|
|
1382
|
+
"kind": "field",
|
|
1383
|
+
"name": "properties",
|
|
1384
|
+
"type": {
|
|
1385
|
+
"text": "object"
|
|
1386
|
+
},
|
|
1387
|
+
"static": true,
|
|
1388
|
+
"default": "{ open: { type: Boolean, reflect: true }, placement: { type: String }, // left, right, top, bottom size: { type: String }, // small, medium, large, full noOverlay: { type: Boolean }, closable: { type: Boolean, converter: (value) => value !== 'false' } }"
|
|
1389
|
+
},
|
|
1390
|
+
{
|
|
1391
|
+
"kind": "field",
|
|
1392
|
+
"name": "styles",
|
|
1393
|
+
"static": true,
|
|
1394
|
+
"default": "css` :host { display: block; --kg-drawer-width: 350px; --kg-drawer-height: 350px; --kg-drawer-z-index: 1000; } .kg-drawer-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(4px); z-index: var(--kg-drawer-z-index); opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); } .kg-drawer-overlay.open { opacity: 1; visibility: visible; } .kg-drawer-content { position: fixed; background: var(--kg-bg); color: var(--kg-text); z-index: calc(var(--kg-drawer-z-index) + 1); box-shadow: var(--kg-shadow); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; box-sizing: border-box; } /* Placements */ .placement-right { top: 0; right: 0; width: var(--kg-drawer-width); height: 100%; transform: translateX(100%); } .placement-left { top: 0; left: 0; width: var(--kg-drawer-width); height: 100%; transform: translateX(-100%); } .placement-top { top: 0; left: 0; width: 100%; height: var(--kg-drawer-height); transform: translateY(-100%); } .placement-bottom { bottom: 0; left: 0; width: 100%; height: var(--kg-drawer-height); transform: translateY(100%); } /* Open States */ .open.placement-right, .open.placement-left { transform: translateX(0); } .open.placement-top, .open.placement-bottom { transform: translateY(0); } /* Sizes */ .size-small { --kg-drawer-width: 260px; --kg-drawer-height: 260px; } .size-medium { --kg-drawer-width: 400px; --kg-drawer-height: 400px; } .size-large { --kg-drawer-width: 600px; --kg-drawer-height: 600px; } .size-full { --kg-drawer-width: 100%; --kg-drawer-height: 100%; } .drawer-header { padding: var(--kg-space-md) var(--kg-space-lg); border-bottom: 1px solid var(--kg-border); display: flex; justify-content: space-between; align-items: center; } .drawer-body { padding: var(--kg-space-lg); flex: 1; overflow-y: auto; } .drawer-footer { padding: var(--kg-space-md) var(--kg-space-lg); border-top: 1px solid var(--kg-border); } .close-button { background: none; border: none; color: var(--kg-text-muted); cursor: pointer; font-size: 1.5rem; padding: 0.5rem; line-height: 1; border-radius: var(--kg-radius-sm); transition: all 0.2s; } .close-button:hover { background: var(--kg-surface); color: var(--kg-text); } `"
|
|
1395
|
+
},
|
|
1396
|
+
{
|
|
1397
|
+
"kind": "method",
|
|
1398
|
+
"name": "close"
|
|
1399
|
+
},
|
|
1400
|
+
{
|
|
1401
|
+
"kind": "method",
|
|
1402
|
+
"name": "_handleOverlayClick"
|
|
1403
|
+
},
|
|
1404
|
+
{
|
|
1405
|
+
"kind": "method",
|
|
1406
|
+
"name": "willUpdate",
|
|
1407
|
+
"parameters": [
|
|
1408
|
+
{
|
|
1409
|
+
"name": "changedProperties"
|
|
1410
|
+
}
|
|
1411
|
+
]
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
"kind": "method",
|
|
1415
|
+
"name": "render"
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
"kind": "field",
|
|
1419
|
+
"name": "open",
|
|
1420
|
+
"type": {
|
|
1421
|
+
"text": "boolean"
|
|
1422
|
+
},
|
|
1423
|
+
"default": "false"
|
|
1424
|
+
},
|
|
1425
|
+
{
|
|
1426
|
+
"kind": "field",
|
|
1427
|
+
"name": "placement",
|
|
1428
|
+
"type": {
|
|
1429
|
+
"text": "string"
|
|
1430
|
+
},
|
|
1431
|
+
"default": "'right'"
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
"kind": "field",
|
|
1435
|
+
"name": "size",
|
|
1436
|
+
"type": {
|
|
1437
|
+
"text": "string"
|
|
1438
|
+
},
|
|
1439
|
+
"default": "'medium'"
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
"kind": "field",
|
|
1443
|
+
"name": "closable",
|
|
1444
|
+
"type": {
|
|
1445
|
+
"text": "boolean"
|
|
1446
|
+
},
|
|
1447
|
+
"default": "true"
|
|
1448
|
+
}
|
|
1449
|
+
],
|
|
1450
|
+
"events": [
|
|
1451
|
+
{
|
|
1452
|
+
"name": "close",
|
|
1453
|
+
"type": {
|
|
1454
|
+
"text": "CustomEvent"
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
],
|
|
1458
|
+
"superclass": {
|
|
1459
|
+
"name": "LitElement",
|
|
1460
|
+
"package": "lit"
|
|
1461
|
+
},
|
|
1462
|
+
"tagName": "kg-drawer",
|
|
1463
|
+
"customElement": true
|
|
1464
|
+
}
|
|
1465
|
+
],
|
|
1466
|
+
"exports": [
|
|
1467
|
+
{
|
|
1468
|
+
"kind": "js",
|
|
1469
|
+
"name": "kgdrawer",
|
|
1470
|
+
"declaration": {
|
|
1471
|
+
"name": "kgdrawer",
|
|
1472
|
+
"module": "src/components/kg-drawer.js"
|
|
1473
|
+
}
|
|
1474
|
+
},
|
|
1475
|
+
{
|
|
1476
|
+
"kind": "custom-element-definition",
|
|
1477
|
+
"name": "kg-drawer",
|
|
1478
|
+
"declaration": {
|
|
1479
|
+
"name": "kgdrawer",
|
|
1480
|
+
"module": "src/components/kg-drawer.js"
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
]
|
|
1484
|
+
},
|
|
1485
|
+
{
|
|
1486
|
+
"kind": "javascript-module",
|
|
1487
|
+
"path": "src/components/kg-file-upload.js",
|
|
1488
|
+
"declarations": [
|
|
1489
|
+
{
|
|
1490
|
+
"kind": "class",
|
|
1491
|
+
"description": "",
|
|
1492
|
+
"name": "kgfileupload",
|
|
1493
|
+
"members": [
|
|
1494
|
+
{
|
|
1495
|
+
"kind": "field",
|
|
1496
|
+
"name": "properties",
|
|
1497
|
+
"type": {
|
|
1498
|
+
"text": "object"
|
|
1499
|
+
},
|
|
1500
|
+
"static": true,
|
|
1501
|
+
"default": "{ label: { type: String }, placeholder: { type: String }, accept: { type: String }, multiple: { type: Boolean }, disabled: { type: Boolean }, hideChips: { type: Boolean, attribute: 'hide-chips' }, files: { type: Array, state: true }, _previews: { state: true } }"
|
|
1502
|
+
},
|
|
1503
|
+
{
|
|
1504
|
+
"kind": "field",
|
|
1505
|
+
"name": "styles",
|
|
1506
|
+
"static": true,
|
|
1507
|
+
"default": "css` :host { display: block; width: 100%; font-family: inherit; } .container { display: flex; flex-direction: column; gap: 0.5rem; } .label { font-size: 0.85rem; font-weight: 600; color: var(--kg-text); } .upload-wrapper { display: flex; align-items: stretch; border: 2px solid var(--kg-border); border-radius: 10px; overflow: hidden; background: var(--kg-bg-primary); transition: all 0.2s ease; height: var(--kg-form-height); cursor: pointer; } .upload-wrapper:hover:not(.disabled) { border-color: var(--kg-primary); } .upload-wrapper.active { border-color: var(--kg-primary); box-shadow: 0 0 0 3px rgba(65, 171, 52, 0.1); } .upload-wrapper.disabled { opacity: 0.6; cursor: not-allowed; background: var(--kg-bg-secondary); } .file-display { flex: 1; display: flex; align-items: center; padding: 0 1rem; font-size: 0.9rem; color: var(--kg-text-muted); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .file-display.has-file { color: var(--kg-text); font-weight: 500; } .divider { width: 1px; background: var(--kg-border); margin: 8px 0; transition: background 0.2s ease; } .upload-wrapper:hover .divider { background: var(--kg-primary); opacity: 0.3; } .upload-btn { width: 48px; display: flex; align-items: center; justify-content: center; color: var(--kg-primary); background: transparent; transition: all 0.2s ease; } .upload-wrapper:hover .upload-btn { background: rgba(65, 171, 52, 0.05); } input[type=\"file\"] { display: none; } /* File Chips below for multiple */ .file-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; } .chip { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.75rem; background: var(--kg-bg-secondary); border: 1px solid var(--kg-border); border-radius: 20px; font-size: 0.8rem; animation: slideIn 0.2s ease; } .chip-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .chip-remove { cursor: pointer; color: var(--kg-text-muted); display: flex; align-items: center; } .chip-remove:hover { color: #e74c3c; } @keyframes slideIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } } .preview-thumb { width: 24px; height: 24px; object-fit: cover; border-radius: 4px; margin-right: 8px; border: 1px solid var(--kg-border); } .chip .preview-thumb { width: 20px; height: 20px; margin-right: 6px; } `"
|
|
1508
|
+
},
|
|
1509
|
+
{
|
|
1510
|
+
"kind": "method",
|
|
1511
|
+
"name": "updated",
|
|
1512
|
+
"parameters": [
|
|
1513
|
+
{
|
|
1514
|
+
"name": "changedProperties"
|
|
1515
|
+
}
|
|
1516
|
+
]
|
|
1517
|
+
},
|
|
1518
|
+
{
|
|
1519
|
+
"kind": "method",
|
|
1520
|
+
"name": "_revokePreviews"
|
|
1521
|
+
},
|
|
1522
|
+
{
|
|
1523
|
+
"kind": "method",
|
|
1524
|
+
"name": "_updatePreviews"
|
|
1525
|
+
},
|
|
1526
|
+
{
|
|
1527
|
+
"kind": "method",
|
|
1528
|
+
"name": "_handleFileChange",
|
|
1529
|
+
"parameters": [
|
|
1530
|
+
{
|
|
1531
|
+
"name": "e"
|
|
1532
|
+
}
|
|
1533
|
+
]
|
|
1534
|
+
},
|
|
1535
|
+
{
|
|
1536
|
+
"kind": "method",
|
|
1537
|
+
"name": "_addFiles",
|
|
1538
|
+
"parameters": [
|
|
1539
|
+
{
|
|
1540
|
+
"name": "newFiles"
|
|
1541
|
+
}
|
|
1542
|
+
]
|
|
1543
|
+
},
|
|
1544
|
+
{
|
|
1545
|
+
"kind": "method",
|
|
1546
|
+
"name": "_removeFile",
|
|
1547
|
+
"parameters": [
|
|
1548
|
+
{
|
|
1549
|
+
"name": "index"
|
|
1550
|
+
}
|
|
1551
|
+
]
|
|
1552
|
+
},
|
|
1553
|
+
{
|
|
1554
|
+
"kind": "method",
|
|
1555
|
+
"name": "_emitChange"
|
|
1556
|
+
},
|
|
1557
|
+
{
|
|
1558
|
+
"kind": "method",
|
|
1559
|
+
"name": "_triggerUpload"
|
|
1560
|
+
},
|
|
1561
|
+
{
|
|
1562
|
+
"kind": "method",
|
|
1563
|
+
"name": "_onDragOver",
|
|
1564
|
+
"parameters": [
|
|
1565
|
+
{
|
|
1566
|
+
"name": "e"
|
|
1567
|
+
}
|
|
1568
|
+
]
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
"kind": "method",
|
|
1572
|
+
"name": "_onDragLeave"
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
"kind": "method",
|
|
1576
|
+
"name": "_onDrop",
|
|
1577
|
+
"parameters": [
|
|
1578
|
+
{
|
|
1579
|
+
"name": "e"
|
|
1580
|
+
}
|
|
1581
|
+
]
|
|
1582
|
+
},
|
|
1583
|
+
{
|
|
1584
|
+
"kind": "method",
|
|
1585
|
+
"name": "render"
|
|
1586
|
+
},
|
|
1587
|
+
{
|
|
1588
|
+
"kind": "field",
|
|
1589
|
+
"name": "label",
|
|
1590
|
+
"type": {
|
|
1591
|
+
"text": "string"
|
|
1592
|
+
},
|
|
1593
|
+
"default": "''"
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
"kind": "field",
|
|
1597
|
+
"name": "placeholder",
|
|
1598
|
+
"type": {
|
|
1599
|
+
"text": "string"
|
|
1600
|
+
},
|
|
1601
|
+
"default": "'Dosya seçin...'"
|
|
1602
|
+
},
|
|
1603
|
+
{
|
|
1604
|
+
"kind": "field",
|
|
1605
|
+
"name": "accept",
|
|
1606
|
+
"type": {
|
|
1607
|
+
"text": "string"
|
|
1608
|
+
},
|
|
1609
|
+
"default": "'*'"
|
|
1610
|
+
},
|
|
1611
|
+
{
|
|
1612
|
+
"kind": "field",
|
|
1613
|
+
"name": "multiple",
|
|
1614
|
+
"type": {
|
|
1615
|
+
"text": "boolean"
|
|
1616
|
+
},
|
|
1617
|
+
"default": "false"
|
|
1618
|
+
},
|
|
1619
|
+
{
|
|
1620
|
+
"kind": "field",
|
|
1621
|
+
"name": "disabled",
|
|
1622
|
+
"type": {
|
|
1623
|
+
"text": "boolean"
|
|
1624
|
+
},
|
|
1625
|
+
"default": "false"
|
|
1626
|
+
},
|
|
1627
|
+
{
|
|
1628
|
+
"kind": "field",
|
|
1629
|
+
"name": "hideChips",
|
|
1630
|
+
"type": {
|
|
1631
|
+
"text": "boolean"
|
|
1632
|
+
},
|
|
1633
|
+
"default": "false"
|
|
1634
|
+
},
|
|
1635
|
+
{
|
|
1636
|
+
"kind": "field",
|
|
1637
|
+
"name": "files",
|
|
1638
|
+
"type": {
|
|
1639
|
+
"text": "array"
|
|
1640
|
+
},
|
|
1641
|
+
"default": "[]"
|
|
1642
|
+
},
|
|
1643
|
+
{
|
|
1644
|
+
"kind": "field",
|
|
1645
|
+
"name": "_previews",
|
|
1646
|
+
"default": "new Map()"
|
|
1647
|
+
}
|
|
1648
|
+
],
|
|
1649
|
+
"events": [
|
|
1650
|
+
{
|
|
1651
|
+
"name": "kg-change",
|
|
1652
|
+
"type": {
|
|
1653
|
+
"text": "CustomEvent"
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
],
|
|
1657
|
+
"superclass": {
|
|
1658
|
+
"name": "LitElement",
|
|
1659
|
+
"package": "lit"
|
|
1660
|
+
},
|
|
1661
|
+
"tagName": "kg-file-upload",
|
|
1662
|
+
"customElement": true
|
|
1663
|
+
}
|
|
1664
|
+
],
|
|
1665
|
+
"exports": [
|
|
1666
|
+
{
|
|
1667
|
+
"kind": "js",
|
|
1668
|
+
"name": "kgfileupload",
|
|
1669
|
+
"declaration": {
|
|
1670
|
+
"name": "kgfileupload",
|
|
1671
|
+
"module": "src/components/kg-file-upload.js"
|
|
1672
|
+
}
|
|
1673
|
+
},
|
|
1674
|
+
{
|
|
1675
|
+
"kind": "custom-element-definition",
|
|
1676
|
+
"name": "kg-file-upload",
|
|
1677
|
+
"declaration": {
|
|
1678
|
+
"name": "kgfileupload",
|
|
1679
|
+
"module": "src/components/kg-file-upload.js"
|
|
1680
|
+
}
|
|
1681
|
+
}
|
|
1682
|
+
]
|
|
1683
|
+
},
|
|
1684
|
+
{
|
|
1685
|
+
"kind": "javascript-module",
|
|
1686
|
+
"path": "src/components/kg-grid.js",
|
|
1687
|
+
"declarations": [
|
|
1688
|
+
{
|
|
1689
|
+
"kind": "class",
|
|
1690
|
+
"description": "",
|
|
1691
|
+
"name": "kggrid",
|
|
1692
|
+
"members": [
|
|
1693
|
+
{
|
|
1694
|
+
"kind": "field",
|
|
1695
|
+
"name": "properties",
|
|
1696
|
+
"type": {
|
|
1697
|
+
"text": "object"
|
|
1698
|
+
},
|
|
1699
|
+
"static": true,
|
|
1700
|
+
"default": "{ container: { type: Boolean }, // if true, acts as a centered container padded: { type: Boolean }, relaxed: { type: Boolean }, doubling: { type: Boolean }, stackable: { type: Boolean } }"
|
|
1701
|
+
},
|
|
1702
|
+
{
|
|
1703
|
+
"kind": "field",
|
|
1704
|
+
"name": "styles",
|
|
1705
|
+
"static": true,
|
|
1706
|
+
"default": "css` :host { display: block; width: 100%; box-sizing: border-box; } :host([container]) { max-width: 1200px; margin: 0 auto; padding-left: var(--kg-space-md); padding-right: var(--kg-space-md); } .ui-grid { display: flex; flex-direction: column; width: 100%; } :host([padded]) { padding: var(--kg-space-md) 0; } `"
|
|
1707
|
+
},
|
|
1708
|
+
{
|
|
1709
|
+
"kind": "method",
|
|
1710
|
+
"name": "render"
|
|
1711
|
+
}
|
|
1712
|
+
],
|
|
1713
|
+
"superclass": {
|
|
1714
|
+
"name": "LitElement",
|
|
1715
|
+
"package": "lit"
|
|
1716
|
+
},
|
|
1717
|
+
"tagName": "kg-grid",
|
|
1718
|
+
"customElement": true
|
|
1719
|
+
}
|
|
1720
|
+
],
|
|
1721
|
+
"exports": [
|
|
1722
|
+
{
|
|
1723
|
+
"kind": "js",
|
|
1724
|
+
"name": "kggrid",
|
|
1725
|
+
"declaration": {
|
|
1726
|
+
"name": "kggrid",
|
|
1727
|
+
"module": "src/components/kg-grid.js"
|
|
1728
|
+
}
|
|
1729
|
+
},
|
|
1730
|
+
{
|
|
1731
|
+
"kind": "custom-element-definition",
|
|
1732
|
+
"name": "kg-grid",
|
|
1733
|
+
"declaration": {
|
|
1734
|
+
"name": "kggrid",
|
|
1735
|
+
"module": "src/components/kg-grid.js"
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
]
|
|
1739
|
+
},
|
|
1740
|
+
{
|
|
1741
|
+
"kind": "javascript-module",
|
|
1742
|
+
"path": "src/components/kg-image.js",
|
|
1743
|
+
"declarations": [
|
|
1744
|
+
{
|
|
1745
|
+
"kind": "class",
|
|
1746
|
+
"description": "",
|
|
1747
|
+
"name": "kgimage",
|
|
1748
|
+
"members": [
|
|
1749
|
+
{
|
|
1750
|
+
"kind": "field",
|
|
1751
|
+
"name": "properties",
|
|
1752
|
+
"type": {
|
|
1753
|
+
"text": "object"
|
|
1754
|
+
},
|
|
1755
|
+
"static": true,
|
|
1756
|
+
"default": "{ src: { type: String }, alt: { type: String }, width: { type: String }, height: { type: String }, fit: { type: String }, // 'cover' | 'contain' | 'fill' | 'none' | 'scale-down' shape: { type: String }, // 'square' | 'circle' | 'rounded' lazy: { type: Boolean }, _error: { state: true } }"
|
|
1757
|
+
},
|
|
1758
|
+
{
|
|
1759
|
+
"kind": "field",
|
|
1760
|
+
"name": "styles",
|
|
1761
|
+
"static": true,
|
|
1762
|
+
"default": "css` :host { display: inline-block; line-height: 0; overflow: hidden; background-color: var(--kg-bg-secondary); } :host([shape=\"circle\"]) { border-radius: 50%; } :host([shape=\"rounded\"]) { border-radius: var(--kg-radius, 8px); } :host([shape=\"square\"]) { border-radius: 0; } .img-wrapper { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; } img { display: block; width: 100%; height: 100%; } .fallback { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--kg-text-muted); font-size: 0.8rem; } `"
|
|
1763
|
+
},
|
|
1764
|
+
{
|
|
1765
|
+
"kind": "method",
|
|
1766
|
+
"name": "willUpdate",
|
|
1767
|
+
"parameters": [
|
|
1768
|
+
{
|
|
1769
|
+
"name": "changedProperties"
|
|
1770
|
+
}
|
|
1771
|
+
]
|
|
1772
|
+
},
|
|
1773
|
+
{
|
|
1774
|
+
"kind": "method",
|
|
1775
|
+
"name": "render"
|
|
1776
|
+
},
|
|
1777
|
+
{
|
|
1778
|
+
"kind": "field",
|
|
1779
|
+
"name": "src",
|
|
1780
|
+
"type": {
|
|
1781
|
+
"text": "string"
|
|
1782
|
+
},
|
|
1783
|
+
"default": "''"
|
|
1784
|
+
},
|
|
1785
|
+
{
|
|
1786
|
+
"kind": "field",
|
|
1787
|
+
"name": "alt",
|
|
1788
|
+
"type": {
|
|
1789
|
+
"text": "string"
|
|
1790
|
+
},
|
|
1791
|
+
"default": "''"
|
|
1792
|
+
},
|
|
1793
|
+
{
|
|
1794
|
+
"kind": "field",
|
|
1795
|
+
"name": "width",
|
|
1796
|
+
"type": {
|
|
1797
|
+
"text": "string"
|
|
1798
|
+
},
|
|
1799
|
+
"default": "'100%'"
|
|
1800
|
+
},
|
|
1801
|
+
{
|
|
1802
|
+
"kind": "field",
|
|
1803
|
+
"name": "height",
|
|
1804
|
+
"type": {
|
|
1805
|
+
"text": "string"
|
|
1806
|
+
},
|
|
1807
|
+
"default": "'auto'"
|
|
1808
|
+
},
|
|
1809
|
+
{
|
|
1810
|
+
"kind": "field",
|
|
1811
|
+
"name": "fit",
|
|
1812
|
+
"type": {
|
|
1813
|
+
"text": "string"
|
|
1814
|
+
},
|
|
1815
|
+
"default": "'cover'"
|
|
1816
|
+
},
|
|
1817
|
+
{
|
|
1818
|
+
"kind": "field",
|
|
1819
|
+
"name": "shape",
|
|
1820
|
+
"type": {
|
|
1821
|
+
"text": "string"
|
|
1822
|
+
},
|
|
1823
|
+
"default": "'square'"
|
|
1824
|
+
},
|
|
1825
|
+
{
|
|
1826
|
+
"kind": "field",
|
|
1827
|
+
"name": "lazy",
|
|
1828
|
+
"type": {
|
|
1829
|
+
"text": "boolean"
|
|
1830
|
+
},
|
|
1831
|
+
"default": "false"
|
|
1832
|
+
},
|
|
1833
|
+
{
|
|
1834
|
+
"kind": "field",
|
|
1835
|
+
"name": "_error",
|
|
1836
|
+
"type": {
|
|
1837
|
+
"text": "boolean"
|
|
1838
|
+
},
|
|
1839
|
+
"default": "false"
|
|
1840
|
+
}
|
|
1841
|
+
],
|
|
1842
|
+
"superclass": {
|
|
1843
|
+
"name": "LitElement",
|
|
1844
|
+
"package": "lit"
|
|
1845
|
+
},
|
|
1846
|
+
"tagName": "kg-image",
|
|
1847
|
+
"customElement": true
|
|
1848
|
+
}
|
|
1849
|
+
],
|
|
1850
|
+
"exports": [
|
|
1851
|
+
{
|
|
1852
|
+
"kind": "js",
|
|
1853
|
+
"name": "kgimage",
|
|
1854
|
+
"declaration": {
|
|
1855
|
+
"name": "kgimage",
|
|
1856
|
+
"module": "src/components/kg-image.js"
|
|
1857
|
+
}
|
|
1858
|
+
},
|
|
1859
|
+
{
|
|
1860
|
+
"kind": "custom-element-definition",
|
|
1861
|
+
"name": "kg-image",
|
|
1862
|
+
"declaration": {
|
|
1863
|
+
"name": "kgimage",
|
|
1864
|
+
"module": "src/components/kg-image.js"
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1867
|
+
]
|
|
1868
|
+
},
|
|
1869
|
+
{
|
|
1870
|
+
"kind": "javascript-module",
|
|
1871
|
+
"path": "src/components/kg-input.js",
|
|
1872
|
+
"declarations": [
|
|
1873
|
+
{
|
|
1874
|
+
"kind": "class",
|
|
1875
|
+
"description": "",
|
|
1876
|
+
"name": "kginput",
|
|
1877
|
+
"members": [
|
|
1878
|
+
{
|
|
1879
|
+
"kind": "field",
|
|
1880
|
+
"name": "properties",
|
|
1881
|
+
"type": {
|
|
1882
|
+
"text": "object"
|
|
1883
|
+
},
|
|
1884
|
+
"static": true,
|
|
1885
|
+
"default": "{ value: { type: String }, label: { type: String }, placeholder: { type: String }, type: { type: String }, size: { type: String }, disabled: { type: Boolean }, loading: { type: Boolean }, error: { type: Boolean }, fullwidth: { type: Boolean, reflect: true }, inverted: { type: Boolean, reflect: true }, hasLeft: { type: Boolean, state: true }, hasRight: { type: Boolean, state: true }, _showPassword: { type: Boolean, state: true }, positive: { type: Boolean, reflect: true }, integer: { type: Boolean, reflect: true } }"
|
|
1886
|
+
},
|
|
1887
|
+
{
|
|
1888
|
+
"kind": "field",
|
|
1889
|
+
"name": "styles",
|
|
1890
|
+
"static": true,
|
|
1891
|
+
"default": "css` :host { display: inline-block; max-width: 100%; vertical-align: top; } :host([fullwidth]) { display: block; width: 100%; } .kg-input-container { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; } .input-label { font-size: 0.875rem; font-weight: 600; color: var(--kg-text); opacity: 0.8; margin-left: 2px; } .ui-input { display: inline-flex; width: 100%; color: var(--kg-text); font-family: inherit; } .input-wrapper { display: flex; width: 100%; align-items: stretch; min-height: var(--kg-form-height); background: var(--kg-surface); border: 1px solid var(--kg-border); border-radius: var(--kg-radius-md, 8px); transition: all 0.2s ease; overflow: hidden; position: relative; } .input-wrapper:focus-within { border-color: var(--kg-primary); background: var(--kg-bg); box-shadow: 0 0 0 2px rgba(65, 171, 52, 0.2); } input { margin: 0; flex: 1 1 auto; outline: none; -webkit-tap-highlight-color: rgba(0,0,0,0); text-align: left; line-height: var(--kg-form-height); height: var(--kg-form-height); font-family: inherit; padding: 0 1rem; background: transparent; border: none; color: inherit; min-width: 0; width: 100%; } input::placeholder { color: var(--kg-text-muted); opacity: 0.6; } /* Number input specific styling - hide spin buttons */ input[type=\"number\"]::-webkit-inner-spin-button, input[type=\"number\"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; } input[type=\"number\"] { -moz-appearance: textfield; } .label-container { display: flex; align-items: center; justify-content: center; background: var(--kg-bg-secondary, rgba(0,0,0,0.04)); padding: 0 0.8rem; min-height: var(--kg-form-height); color: var(--kg-text-muted); font-size: 0.9em; white-space: nowrap; user-select: none; transition: all 0.2s ease; font-family: inherit; } /* Secret Sauce: Hide container if it has no content but KEEP THE SLOT ACTIVE */ .label-container:not(.visible) { display: none; } .label-container.left { border-right: 1px solid var(--kg-border); } .label-container.right { border-left: 1px solid var(--kg-border); } .reveal-btn { display: flex; align-items: center; justify-content: center; padding: 0 0.8rem; cursor: pointer; color: var(--kg-text-muted); transition: color 0.2s; user-select: none; } .reveal-btn:hover { color: var(--kg-secondary); } /* States */ .disabled { opacity: 0.45; pointer-events: none; } .error .input-wrapper { border-color: #DB2828; background-color: rgba(219, 40, 40, 0.02); } .loading .input-wrapper::after { position: absolute; content: ''; top: 50%; right: var(--loading-offset, 1rem); margin-top: -0.5rem; width: 1rem; height: 1rem; border: 2px solid rgba(0, 0, 0, 0.1); border-top-color: var(--kg-secondary); border-radius: 50%; animation: input-spin 0.6s linear infinite; } @keyframes input-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } /* Sizes */ .mini input { font-size: 0.75rem; } .small input { font-size: 0.85rem; } .medium input { font-size: 1rem; } .large input { font-size: 1.15rem; } .massive input { font-size: 1.5rem; } /* Variations */ .fullwidth { width: 100%; } :host([inverted]) .input-label { color: rgba(255, 255, 255, 0.9); } :host([inverted]) .input-wrapper { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.15); color: #FFFFFF; } :host([inverted]) .input-wrapper:focus-within { background: rgba(255, 255, 255, 0.12); border-color: var(--kg-primary); } :host([inverted]) .label-container { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.15); color: rgba(255, 255, 255, 0.7); } :host([inverted]) input::placeholder { color: rgba(255, 255, 255, 0.5); } :host([inverted]) .reveal-btn { color: rgba(255, 255, 255, 0.6); } :host([inverted]) .reveal-btn:hover { color: var(--kg-secondary); } * { font-family: 'Century Gothic', 'Apple Gothic', 'CenturyGothic', sans-serif; } `"
|
|
1892
|
+
},
|
|
1893
|
+
{
|
|
1894
|
+
"kind": "method",
|
|
1895
|
+
"name": "_handleKeyDown",
|
|
1896
|
+
"parameters": [
|
|
1897
|
+
{
|
|
1898
|
+
"name": "e"
|
|
1899
|
+
}
|
|
1900
|
+
]
|
|
1901
|
+
},
|
|
1902
|
+
{
|
|
1903
|
+
"kind": "method",
|
|
1904
|
+
"name": "_handleInput",
|
|
1905
|
+
"parameters": [
|
|
1906
|
+
{
|
|
1907
|
+
"name": "e"
|
|
1908
|
+
}
|
|
1909
|
+
]
|
|
1910
|
+
},
|
|
1911
|
+
{
|
|
1912
|
+
"kind": "method",
|
|
1913
|
+
"name": "_handleSlotChange",
|
|
1914
|
+
"parameters": [
|
|
1915
|
+
{
|
|
1916
|
+
"name": "e"
|
|
1917
|
+
}
|
|
1918
|
+
]
|
|
1919
|
+
},
|
|
1920
|
+
{
|
|
1921
|
+
"kind": "method",
|
|
1922
|
+
"name": "_togglePassword"
|
|
1923
|
+
},
|
|
1924
|
+
{
|
|
1925
|
+
"kind": "method",
|
|
1926
|
+
"name": "render"
|
|
1927
|
+
},
|
|
1928
|
+
{
|
|
1929
|
+
"kind": "field",
|
|
1930
|
+
"name": "type",
|
|
1931
|
+
"type": {
|
|
1932
|
+
"text": "string"
|
|
1933
|
+
},
|
|
1934
|
+
"default": "'text'"
|
|
1935
|
+
},
|
|
1936
|
+
{
|
|
1937
|
+
"kind": "field",
|
|
1938
|
+
"name": "value",
|
|
1939
|
+
"type": {
|
|
1940
|
+
"text": "string"
|
|
1941
|
+
},
|
|
1942
|
+
"default": "''"
|
|
1943
|
+
},
|
|
1944
|
+
{
|
|
1945
|
+
"kind": "field",
|
|
1946
|
+
"name": "placeholder",
|
|
1947
|
+
"type": {
|
|
1948
|
+
"text": "string"
|
|
1949
|
+
},
|
|
1950
|
+
"default": "''"
|
|
1951
|
+
},
|
|
1952
|
+
{
|
|
1953
|
+
"kind": "field",
|
|
1954
|
+
"name": "hasLeft",
|
|
1955
|
+
"type": {
|
|
1956
|
+
"text": "boolean"
|
|
1957
|
+
},
|
|
1958
|
+
"default": "false"
|
|
1959
|
+
},
|
|
1960
|
+
{
|
|
1961
|
+
"kind": "field",
|
|
1962
|
+
"name": "hasRight",
|
|
1963
|
+
"type": {
|
|
1964
|
+
"text": "boolean"
|
|
1965
|
+
},
|
|
1966
|
+
"default": "false"
|
|
1967
|
+
},
|
|
1968
|
+
{
|
|
1969
|
+
"kind": "field",
|
|
1970
|
+
"name": "_showPassword",
|
|
1971
|
+
"type": {
|
|
1972
|
+
"text": "boolean"
|
|
1973
|
+
},
|
|
1974
|
+
"default": "false"
|
|
1975
|
+
}
|
|
1976
|
+
],
|
|
1977
|
+
"events": [
|
|
1978
|
+
{
|
|
1979
|
+
"name": "kg-input",
|
|
1980
|
+
"type": {
|
|
1981
|
+
"text": "CustomEvent"
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
],
|
|
1985
|
+
"superclass": {
|
|
1986
|
+
"name": "LitElement",
|
|
1987
|
+
"package": "lit"
|
|
1988
|
+
},
|
|
1989
|
+
"tagName": "kg-input",
|
|
1990
|
+
"customElement": true
|
|
1991
|
+
}
|
|
1992
|
+
],
|
|
1993
|
+
"exports": [
|
|
1994
|
+
{
|
|
1995
|
+
"kind": "js",
|
|
1996
|
+
"name": "kginput",
|
|
1997
|
+
"declaration": {
|
|
1998
|
+
"name": "kginput",
|
|
1999
|
+
"module": "src/components/kg-input.js"
|
|
2000
|
+
}
|
|
2001
|
+
},
|
|
2002
|
+
{
|
|
2003
|
+
"kind": "custom-element-definition",
|
|
2004
|
+
"name": "kg-input",
|
|
2005
|
+
"declaration": {
|
|
2006
|
+
"name": "kginput",
|
|
2007
|
+
"module": "src/components/kg-input.js"
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
]
|
|
2011
|
+
},
|
|
2012
|
+
{
|
|
2013
|
+
"kind": "javascript-module",
|
|
2014
|
+
"path": "src/components/kg-loader.js",
|
|
2015
|
+
"declarations": [
|
|
2016
|
+
{
|
|
2017
|
+
"kind": "class",
|
|
2018
|
+
"description": "",
|
|
2019
|
+
"name": "kgloader",
|
|
2020
|
+
"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
|
+
{
|
|
2031
|
+
"kind": "field",
|
|
2032
|
+
"name": "styles",
|
|
2033
|
+
"static": true,
|
|
2034
|
+
"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; } `"
|
|
2035
|
+
},
|
|
2036
|
+
{
|
|
2037
|
+
"kind": "method",
|
|
2038
|
+
"name": "render"
|
|
2039
|
+
},
|
|
2040
|
+
{
|
|
2041
|
+
"kind": "field",
|
|
2042
|
+
"name": "src",
|
|
2043
|
+
"type": {
|
|
2044
|
+
"text": "string"
|
|
2045
|
+
},
|
|
2046
|
+
"default": "''"
|
|
2047
|
+
},
|
|
2048
|
+
{
|
|
2049
|
+
"kind": "field",
|
|
2050
|
+
"name": "text",
|
|
2051
|
+
"type": {
|
|
2052
|
+
"text": "string"
|
|
2053
|
+
},
|
|
2054
|
+
"default": "''"
|
|
2055
|
+
},
|
|
2056
|
+
{
|
|
2057
|
+
"kind": "field",
|
|
2058
|
+
"name": "visible",
|
|
2059
|
+
"type": {
|
|
2060
|
+
"text": "boolean"
|
|
2061
|
+
},
|
|
2062
|
+
"default": "false"
|
|
2063
|
+
},
|
|
2064
|
+
{
|
|
2065
|
+
"kind": "field",
|
|
2066
|
+
"name": "glass",
|
|
2067
|
+
"type": {
|
|
2068
|
+
"text": "boolean"
|
|
2069
|
+
},
|
|
2070
|
+
"default": "false"
|
|
2071
|
+
}
|
|
2072
|
+
],
|
|
2073
|
+
"superclass": {
|
|
2074
|
+
"name": "LitElement",
|
|
2075
|
+
"package": "lit"
|
|
2076
|
+
},
|
|
2077
|
+
"tagName": "kg-loader",
|
|
2078
|
+
"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
|
+
}
|
|
2088
|
+
],
|
|
2089
|
+
"exports": [
|
|
2090
|
+
{
|
|
2091
|
+
"kind": "js",
|
|
2092
|
+
"name": "kgloader",
|
|
2093
|
+
"declaration": {
|
|
2094
|
+
"name": "kgloader",
|
|
2095
|
+
"module": "src/components/kg-loader.js"
|
|
2096
|
+
}
|
|
2097
|
+
},
|
|
2098
|
+
{
|
|
2099
|
+
"kind": "custom-element-definition",
|
|
2100
|
+
"name": "kg-loader",
|
|
2101
|
+
"declaration": {
|
|
2102
|
+
"name": "kgloader",
|
|
2103
|
+
"module": "src/components/kg-loader.js"
|
|
2104
|
+
}
|
|
2105
|
+
},
|
|
2106
|
+
{
|
|
2107
|
+
"kind": "js",
|
|
2108
|
+
"name": "loader",
|
|
2109
|
+
"declaration": {
|
|
2110
|
+
"name": "loader",
|
|
2111
|
+
"module": "src/components/kg-loader.js"
|
|
2112
|
+
}
|
|
2113
|
+
}
|
|
2114
|
+
]
|
|
2115
|
+
},
|
|
2116
|
+
{
|
|
2117
|
+
"kind": "javascript-module",
|
|
2118
|
+
"path": "src/components/kg-modal.js",
|
|
2119
|
+
"declarations": [
|
|
2120
|
+
{
|
|
2121
|
+
"kind": "class",
|
|
2122
|
+
"description": "",
|
|
2123
|
+
"name": "kgmodal",
|
|
2124
|
+
"slots": [
|
|
2125
|
+
{
|
|
2126
|
+
"description": "Modal content",
|
|
2127
|
+
"name": ""
|
|
2128
|
+
},
|
|
2129
|
+
{
|
|
2130
|
+
"description": "Modal header",
|
|
2131
|
+
"name": "header"
|
|
2132
|
+
},
|
|
2133
|
+
{
|
|
2134
|
+
"description": "Modal footer actions",
|
|
2135
|
+
"name": "footer"
|
|
2136
|
+
}
|
|
2137
|
+
],
|
|
2138
|
+
"members": [
|
|
2139
|
+
{
|
|
2140
|
+
"kind": "field",
|
|
2141
|
+
"name": "properties",
|
|
2142
|
+
"type": {
|
|
2143
|
+
"text": "object"
|
|
2144
|
+
},
|
|
2145
|
+
"static": true,
|
|
2146
|
+
"default": "{ open: { type: Boolean, reflect: true }, size: { type: String }, // mini, tiny, small, large, fullscreen closable: { type: Boolean, converter: (value) => value !== 'false' }, basic: { type: Boolean } }"
|
|
2147
|
+
},
|
|
2148
|
+
{
|
|
2149
|
+
"kind": "field",
|
|
2150
|
+
"name": "styles",
|
|
2151
|
+
"static": true,
|
|
2152
|
+
"default": "css` :host { display: block; --kg-modal-z-index: 2000; } .kg-modal-dimmer { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; z-index: var(--kg-modal-z-index); opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); padding: var(--kg-space-md); box-sizing: border-box; } .kg-modal-dimmer.open { opacity: 1; visibility: visible; } .kg-modal-content { background: var(--kg-bg); color: var(--kg-text); border-radius: var(--kg-radius-lg); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); width: 100%; max-width: 600px; transform: scale(0.95) translateY(10px); transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); display: flex; flex-direction: column; max-height: 90vh; overflow: hidden; } .kg-modal-dimmer.open .kg-modal-content { transform: scale(1) translateY(0); } /* Sizes */ .size-mini { max-width: 350px; } .size-tiny { max-width: 450px; } .size-small { max-width: 550px; } .size-large { max-width: 900px; } .size-fullscreen { max-width: 95vw; height: 95vh; } /* Basic style */ :host([basic]) .kg-modal-content { background: transparent; box-shadow: none; color: white; } .modal-header { padding: var(--kg-space-lg); font-size: 1.25rem; font-weight: 700; border-bottom: 1px solid var(--kg-border); display: flex; justify-content: space-between; align-items: center; } .modal-body { padding: var(--kg-space-lg); overflow-y: auto; flex: 1; } .modal-footer { padding: var(--kg-space-md) var(--kg-space-lg); border-top: 1px solid var(--kg-border); background: var(--kg-surface); display: flex; justify-content: flex-end; gap: 0.75rem; } .close-button { background: none; border: none; color: var(--kg-text-muted); cursor: pointer; font-size: 1.5rem; padding: 0.5rem; line-height: 1; border-radius: var(--kg-radius-sm); transition: all 0.2s; } .close-button:hover { background: var(--kg-surface); color: var(--kg-text); } `"
|
|
2153
|
+
},
|
|
2154
|
+
{
|
|
2155
|
+
"kind": "method",
|
|
2156
|
+
"name": "close"
|
|
2157
|
+
},
|
|
2158
|
+
{
|
|
2159
|
+
"kind": "method",
|
|
2160
|
+
"name": "_handleDimmerClick",
|
|
2161
|
+
"parameters": [
|
|
2162
|
+
{
|
|
2163
|
+
"name": "e"
|
|
2164
|
+
}
|
|
2165
|
+
]
|
|
2166
|
+
},
|
|
2167
|
+
{
|
|
2168
|
+
"kind": "method",
|
|
2169
|
+
"name": "willUpdate",
|
|
2170
|
+
"parameters": [
|
|
2171
|
+
{
|
|
2172
|
+
"name": "changedProperties"
|
|
2173
|
+
}
|
|
2174
|
+
]
|
|
2175
|
+
},
|
|
2176
|
+
{
|
|
2177
|
+
"kind": "method",
|
|
2178
|
+
"name": "render"
|
|
2179
|
+
},
|
|
2180
|
+
{
|
|
2181
|
+
"kind": "field",
|
|
2182
|
+
"name": "open",
|
|
2183
|
+
"type": {
|
|
2184
|
+
"text": "boolean"
|
|
2185
|
+
},
|
|
2186
|
+
"default": "false"
|
|
2187
|
+
},
|
|
2188
|
+
{
|
|
2189
|
+
"kind": "field",
|
|
2190
|
+
"name": "size",
|
|
2191
|
+
"type": {
|
|
2192
|
+
"text": "string"
|
|
2193
|
+
},
|
|
2194
|
+
"default": "'small'"
|
|
2195
|
+
},
|
|
2196
|
+
{
|
|
2197
|
+
"kind": "field",
|
|
2198
|
+
"name": "closable",
|
|
2199
|
+
"type": {
|
|
2200
|
+
"text": "boolean"
|
|
2201
|
+
},
|
|
2202
|
+
"default": "true"
|
|
2203
|
+
},
|
|
2204
|
+
{
|
|
2205
|
+
"kind": "field",
|
|
2206
|
+
"name": "basic",
|
|
2207
|
+
"type": {
|
|
2208
|
+
"text": "boolean"
|
|
2209
|
+
},
|
|
2210
|
+
"default": "false"
|
|
2211
|
+
}
|
|
2212
|
+
],
|
|
2213
|
+
"events": [
|
|
2214
|
+
{
|
|
2215
|
+
"name": "close",
|
|
2216
|
+
"type": {
|
|
2217
|
+
"text": "CustomEvent"
|
|
2218
|
+
}
|
|
2219
|
+
}
|
|
2220
|
+
],
|
|
2221
|
+
"superclass": {
|
|
2222
|
+
"name": "LitElement",
|
|
2223
|
+
"package": "lit"
|
|
2224
|
+
},
|
|
2225
|
+
"tagName": "kg-modal",
|
|
2226
|
+
"customElement": true
|
|
2227
|
+
}
|
|
2228
|
+
],
|
|
2229
|
+
"exports": [
|
|
2230
|
+
{
|
|
2231
|
+
"kind": "js",
|
|
2232
|
+
"name": "kgmodal",
|
|
2233
|
+
"declaration": {
|
|
2234
|
+
"name": "kgmodal",
|
|
2235
|
+
"module": "src/components/kg-modal.js"
|
|
2236
|
+
}
|
|
2237
|
+
},
|
|
2238
|
+
{
|
|
2239
|
+
"kind": "custom-element-definition",
|
|
2240
|
+
"name": "kg-modal",
|
|
2241
|
+
"declaration": {
|
|
2242
|
+
"name": "kgmodal",
|
|
2243
|
+
"module": "src/components/kg-modal.js"
|
|
2244
|
+
}
|
|
2245
|
+
}
|
|
2246
|
+
]
|
|
2247
|
+
},
|
|
2248
|
+
{
|
|
2249
|
+
"kind": "javascript-module",
|
|
2250
|
+
"path": "src/components/kg-progress.js",
|
|
2251
|
+
"declarations": [
|
|
2252
|
+
{
|
|
2253
|
+
"kind": "class",
|
|
2254
|
+
"description": "",
|
|
2255
|
+
"name": "kgprogress",
|
|
2256
|
+
"members": [
|
|
2257
|
+
{
|
|
2258
|
+
"kind": "field",
|
|
2259
|
+
"name": "properties",
|
|
2260
|
+
"type": {
|
|
2261
|
+
"text": "object"
|
|
2262
|
+
},
|
|
2263
|
+
"static": true,
|
|
2264
|
+
"default": "{ value: { type: Number }, max: { type: Number }, color: { type: String, reflect: true }, height: { type: String }, showValue: { type: Boolean }, indeterminate: { type: Boolean, reflect: true } }"
|
|
2265
|
+
},
|
|
2266
|
+
{
|
|
2267
|
+
"kind": "field",
|
|
2268
|
+
"name": "styles",
|
|
2269
|
+
"static": true,
|
|
2270
|
+
"default": "css` :host { display: block; width: 100%; margin: 0.5rem 0; } .progress-wrapper { width: 100%; background-color: var(--kg-bg-secondary, #eee); border-radius: 4px; overflow: hidden; position: relative; display: flex; align-items: center; } .progress-bar { height: 100%; background-color: var(--progress-color, var(--kg-primary)); border-radius: 4px; transition: width 0.3s ease; } .progress-label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 0.7rem; font-weight: 700; pointer-events: none; z-index: 1; color: white; text-shadow: 0 0 2px rgba(0,0,0,0.8); } /* Colors */ :host([color=\"primary\"]) { --progress-color: var(--kg-primary); } :host([color=\"secondary\"]) { --progress-color: var(--kg-secondary); } :host([color=\"tertiary\"]) { --progress-color: var(--kg-tertiary); } :host([color=\"error\"]) { --progress-color: #DB2828; } /* Indeterminate Animation */ :host([indeterminate]) .progress-bar { width: 30% !important; animation: indeterminate 1.5s infinite linear; position: absolute; } @keyframes indeterminate { 0% { left: -30%; } 100% { left: 100%; } } `"
|
|
2271
|
+
},
|
|
2272
|
+
{
|
|
2273
|
+
"kind": "method",
|
|
2274
|
+
"name": "render"
|
|
2275
|
+
},
|
|
2276
|
+
{
|
|
2277
|
+
"kind": "field",
|
|
2278
|
+
"name": "value",
|
|
2279
|
+
"type": {
|
|
2280
|
+
"text": "number"
|
|
2281
|
+
},
|
|
2282
|
+
"default": "0"
|
|
2283
|
+
},
|
|
2284
|
+
{
|
|
2285
|
+
"kind": "field",
|
|
2286
|
+
"name": "max",
|
|
2287
|
+
"type": {
|
|
2288
|
+
"text": "number"
|
|
2289
|
+
},
|
|
2290
|
+
"default": "100"
|
|
2291
|
+
},
|
|
2292
|
+
{
|
|
2293
|
+
"kind": "field",
|
|
2294
|
+
"name": "color",
|
|
2295
|
+
"type": {
|
|
2296
|
+
"text": "string"
|
|
2297
|
+
},
|
|
2298
|
+
"default": "'primary'"
|
|
2299
|
+
},
|
|
2300
|
+
{
|
|
2301
|
+
"kind": "field",
|
|
2302
|
+
"name": "height",
|
|
2303
|
+
"type": {
|
|
2304
|
+
"text": "string"
|
|
2305
|
+
},
|
|
2306
|
+
"default": "'12px'"
|
|
2307
|
+
},
|
|
2308
|
+
{
|
|
2309
|
+
"kind": "field",
|
|
2310
|
+
"name": "showValue",
|
|
2311
|
+
"type": {
|
|
2312
|
+
"text": "boolean"
|
|
2313
|
+
},
|
|
2314
|
+
"default": "false"
|
|
2315
|
+
},
|
|
2316
|
+
{
|
|
2317
|
+
"kind": "field",
|
|
2318
|
+
"name": "indeterminate",
|
|
2319
|
+
"type": {
|
|
2320
|
+
"text": "boolean"
|
|
2321
|
+
},
|
|
2322
|
+
"default": "false"
|
|
2323
|
+
}
|
|
2324
|
+
],
|
|
2325
|
+
"superclass": {
|
|
2326
|
+
"name": "LitElement",
|
|
2327
|
+
"package": "lit"
|
|
2328
|
+
},
|
|
2329
|
+
"tagName": "kg-progress",
|
|
2330
|
+
"customElement": true
|
|
2331
|
+
}
|
|
2332
|
+
],
|
|
2333
|
+
"exports": [
|
|
2334
|
+
{
|
|
2335
|
+
"kind": "js",
|
|
2336
|
+
"name": "kgprogress",
|
|
2337
|
+
"declaration": {
|
|
2338
|
+
"name": "kgprogress",
|
|
2339
|
+
"module": "src/components/kg-progress.js"
|
|
2340
|
+
}
|
|
2341
|
+
},
|
|
2342
|
+
{
|
|
2343
|
+
"kind": "custom-element-definition",
|
|
2344
|
+
"name": "kg-progress",
|
|
2345
|
+
"declaration": {
|
|
2346
|
+
"name": "kgprogress",
|
|
2347
|
+
"module": "src/components/kg-progress.js"
|
|
2348
|
+
}
|
|
2349
|
+
}
|
|
2350
|
+
]
|
|
2351
|
+
},
|
|
2352
|
+
{
|
|
2353
|
+
"kind": "javascript-module",
|
|
2354
|
+
"path": "src/components/kg-radio-group.js",
|
|
2355
|
+
"declarations": [
|
|
2356
|
+
{
|
|
2357
|
+
"kind": "class",
|
|
2358
|
+
"description": "",
|
|
2359
|
+
"name": "kgradiogroup",
|
|
2360
|
+
"members": [
|
|
2361
|
+
{
|
|
2362
|
+
"kind": "field",
|
|
2363
|
+
"name": "properties",
|
|
2364
|
+
"type": {
|
|
2365
|
+
"text": "object"
|
|
2366
|
+
},
|
|
2367
|
+
"static": true,
|
|
2368
|
+
"default": "{ value: { type: String, reflect: true }, direction: { type: String }, // horizontal, vertical label: { type: String } }"
|
|
2369
|
+
},
|
|
2370
|
+
{
|
|
2371
|
+
"kind": "field",
|
|
2372
|
+
"name": "styles",
|
|
2373
|
+
"static": true,
|
|
2374
|
+
"default": "css` :host { display: block; } .kg-radio-group-container { display: flex; gap: 16px; } .kg-radio-group-container.vertical { flex-direction: column; gap: 12px; } .kg-radio-group-container.horizontal { flex-direction: row; flex-wrap: wrap; } .group-label { font-size: 0.875rem; font-weight: 600; color: var(--kg-text-muted); margin-bottom: 0.75rem; display: block; text-transform: uppercase; letter-spacing: 0.05em; } `"
|
|
2375
|
+
},
|
|
2376
|
+
{
|
|
2377
|
+
"kind": "method",
|
|
2378
|
+
"name": "_handleRadioSelect",
|
|
2379
|
+
"parameters": [
|
|
2380
|
+
{
|
|
2381
|
+
"name": "e"
|
|
2382
|
+
}
|
|
2383
|
+
]
|
|
2384
|
+
},
|
|
2385
|
+
{
|
|
2386
|
+
"kind": "method",
|
|
2387
|
+
"name": "_updateChildren"
|
|
2388
|
+
},
|
|
2389
|
+
{
|
|
2390
|
+
"kind": "method",
|
|
2391
|
+
"name": "firstUpdated"
|
|
2392
|
+
},
|
|
2393
|
+
{
|
|
2394
|
+
"kind": "method",
|
|
2395
|
+
"name": "updated",
|
|
2396
|
+
"parameters": [
|
|
2397
|
+
{
|
|
2398
|
+
"name": "changedProperties"
|
|
2399
|
+
}
|
|
2400
|
+
]
|
|
2401
|
+
},
|
|
2402
|
+
{
|
|
2403
|
+
"kind": "method",
|
|
2404
|
+
"name": "render"
|
|
2405
|
+
},
|
|
2406
|
+
{
|
|
2407
|
+
"kind": "field",
|
|
2408
|
+
"name": "direction",
|
|
2409
|
+
"type": {
|
|
2410
|
+
"text": "string"
|
|
2411
|
+
},
|
|
2412
|
+
"default": "'vertical'"
|
|
2413
|
+
},
|
|
2414
|
+
{
|
|
2415
|
+
"kind": "field",
|
|
2416
|
+
"name": "value",
|
|
2417
|
+
"type": {
|
|
2418
|
+
"text": "string"
|
|
2419
|
+
},
|
|
2420
|
+
"default": "''"
|
|
2421
|
+
}
|
|
2422
|
+
],
|
|
2423
|
+
"events": [
|
|
2424
|
+
{
|
|
2425
|
+
"name": "change",
|
|
2426
|
+
"type": {
|
|
2427
|
+
"text": "CustomEvent"
|
|
2428
|
+
}
|
|
2429
|
+
}
|
|
2430
|
+
],
|
|
2431
|
+
"superclass": {
|
|
2432
|
+
"name": "LitElement",
|
|
2433
|
+
"package": "lit"
|
|
2434
|
+
},
|
|
2435
|
+
"tagName": "kg-radio-group",
|
|
2436
|
+
"customElement": true
|
|
2437
|
+
}
|
|
2438
|
+
],
|
|
2439
|
+
"exports": [
|
|
2440
|
+
{
|
|
2441
|
+
"kind": "js",
|
|
2442
|
+
"name": "kgradiogroup",
|
|
2443
|
+
"declaration": {
|
|
2444
|
+
"name": "kgradiogroup",
|
|
2445
|
+
"module": "src/components/kg-radio-group.js"
|
|
2446
|
+
}
|
|
2447
|
+
},
|
|
2448
|
+
{
|
|
2449
|
+
"kind": "custom-element-definition",
|
|
2450
|
+
"name": "kg-radio-group",
|
|
2451
|
+
"declaration": {
|
|
2452
|
+
"name": "kgradiogroup",
|
|
2453
|
+
"module": "src/components/kg-radio-group.js"
|
|
2454
|
+
}
|
|
2455
|
+
}
|
|
2456
|
+
]
|
|
2457
|
+
},
|
|
2458
|
+
{
|
|
2459
|
+
"kind": "javascript-module",
|
|
2460
|
+
"path": "src/components/kg-radio.js",
|
|
2461
|
+
"declarations": [
|
|
2462
|
+
{
|
|
2463
|
+
"kind": "class",
|
|
2464
|
+
"description": "",
|
|
2465
|
+
"name": "kgradio",
|
|
2466
|
+
"members": [
|
|
2467
|
+
{
|
|
2468
|
+
"kind": "field",
|
|
2469
|
+
"name": "properties",
|
|
2470
|
+
"type": {
|
|
2471
|
+
"text": "object"
|
|
2472
|
+
},
|
|
2473
|
+
"static": true,
|
|
2474
|
+
"default": "{ checked: { type: Boolean, reflect: true }, label: { type: String }, name: { type: String }, value: { type: String }, disabled: { type: Boolean }, color: { type: String } }"
|
|
2475
|
+
},
|
|
2476
|
+
{
|
|
2477
|
+
"kind": "field",
|
|
2478
|
+
"name": "styles",
|
|
2479
|
+
"static": true,
|
|
2480
|
+
"default": "css` :host { display: inline-block; cursor: pointer; user-select: none; font-family: inherit; } .kg-radio-container { display: flex; align-items: center; gap: 10px; position: relative; } .radio-circle { width: 20px; height: 20px; border: 2px solid var(--kg-border); border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--kg-bg); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); position: relative; flex-shrink: 0; } .kg-radio-container:hover .radio-circle { border-color: var(--radio-active-color, var(--kg-primary)); } .kg-radio-container.checked .radio-circle { border-color: var(--radio-active-color, var(--kg-primary)); } /* Inner Dot */ .radio-circle::after { content: ''; width: 10px; height: 10px; background: var(--radio-active-color, var(--kg-primary)); border-radius: 50%; transform: scale(0); transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .checked .radio-circle::after { transform: scale(1); } .label-text { font-size: 0.95rem; color: var(--kg-text); transition: color 0.2s; } /* States */ .disabled { opacity: 0.5; cursor: not-allowed; } .disabled .radio-circle { background: var(--kg-surface); } `"
|
|
2481
|
+
},
|
|
2482
|
+
{
|
|
2483
|
+
"kind": "method",
|
|
2484
|
+
"name": "_handleClick"
|
|
2485
|
+
},
|
|
2486
|
+
{
|
|
2487
|
+
"kind": "method",
|
|
2488
|
+
"name": "render"
|
|
2489
|
+
},
|
|
2490
|
+
{
|
|
2491
|
+
"kind": "field",
|
|
2492
|
+
"name": "checked",
|
|
2493
|
+
"type": {
|
|
2494
|
+
"text": "boolean"
|
|
2495
|
+
},
|
|
2496
|
+
"default": "false"
|
|
2497
|
+
},
|
|
2498
|
+
{
|
|
2499
|
+
"kind": "field",
|
|
2500
|
+
"name": "disabled",
|
|
2501
|
+
"type": {
|
|
2502
|
+
"text": "boolean"
|
|
2503
|
+
},
|
|
2504
|
+
"default": "false"
|
|
2505
|
+
}
|
|
2506
|
+
],
|
|
2507
|
+
"events": [
|
|
2508
|
+
{
|
|
2509
|
+
"name": "kg-radio-select",
|
|
2510
|
+
"type": {
|
|
2511
|
+
"text": "CustomEvent"
|
|
2512
|
+
}
|
|
2513
|
+
}
|
|
2514
|
+
],
|
|
2515
|
+
"superclass": {
|
|
2516
|
+
"name": "LitElement",
|
|
2517
|
+
"package": "lit"
|
|
2518
|
+
},
|
|
2519
|
+
"tagName": "kg-radio",
|
|
2520
|
+
"customElement": true
|
|
2521
|
+
}
|
|
2522
|
+
],
|
|
2523
|
+
"exports": [
|
|
2524
|
+
{
|
|
2525
|
+
"kind": "js",
|
|
2526
|
+
"name": "kgradio",
|
|
2527
|
+
"declaration": {
|
|
2528
|
+
"name": "kgradio",
|
|
2529
|
+
"module": "src/components/kg-radio.js"
|
|
2530
|
+
}
|
|
2531
|
+
},
|
|
2532
|
+
{
|
|
2533
|
+
"kind": "custom-element-definition",
|
|
2534
|
+
"name": "kg-radio",
|
|
2535
|
+
"declaration": {
|
|
2536
|
+
"name": "kgradio",
|
|
2537
|
+
"module": "src/components/kg-radio.js"
|
|
2538
|
+
}
|
|
2539
|
+
}
|
|
2540
|
+
]
|
|
2541
|
+
},
|
|
2542
|
+
{
|
|
2543
|
+
"kind": "javascript-module",
|
|
2544
|
+
"path": "src/components/kg-row.js",
|
|
2545
|
+
"declarations": [
|
|
2546
|
+
{
|
|
2547
|
+
"kind": "class",
|
|
2548
|
+
"description": "",
|
|
2549
|
+
"name": "kgrow",
|
|
2550
|
+
"members": [
|
|
2551
|
+
{
|
|
2552
|
+
"kind": "field",
|
|
2553
|
+
"name": "properties",
|
|
2554
|
+
"type": {
|
|
2555
|
+
"text": "object"
|
|
2556
|
+
},
|
|
2557
|
+
"static": true,
|
|
2558
|
+
"default": "{ columns: { type: Number }, // can force children to share columns stretched: { type: Boolean }, centered: { type: Boolean }, justify: { type: String } // start, center, end, space-between }"
|
|
2559
|
+
},
|
|
2560
|
+
{
|
|
2561
|
+
"kind": "field",
|
|
2562
|
+
"name": "styles",
|
|
2563
|
+
"static": true,
|
|
2564
|
+
"default": "css` :host { display: flex; flex-wrap: wrap; margin: 0 calc(var(--kg-space-md) * -1); box-sizing: border-box; } :host([centered]) { justify-content: center; } :host([justify=\"space-between\"]) { justify-content: space-between; } :host([justify=\"end\"]) { justify-content: flex-end; } :host([stretched]) { align-items: stretch; } /* Handle nesting if needed */ ::slotted(kg-column) { padding: var(--kg-space-md); } `"
|
|
2565
|
+
},
|
|
2566
|
+
{
|
|
2567
|
+
"kind": "method",
|
|
2568
|
+
"name": "render"
|
|
2569
|
+
}
|
|
2570
|
+
],
|
|
2571
|
+
"superclass": {
|
|
2572
|
+
"name": "LitElement",
|
|
2573
|
+
"package": "lit"
|
|
2574
|
+
},
|
|
2575
|
+
"tagName": "kg-row",
|
|
2576
|
+
"customElement": true
|
|
2577
|
+
}
|
|
2578
|
+
],
|
|
2579
|
+
"exports": [
|
|
2580
|
+
{
|
|
2581
|
+
"kind": "js",
|
|
2582
|
+
"name": "kgrow",
|
|
2583
|
+
"declaration": {
|
|
2584
|
+
"name": "kgrow",
|
|
2585
|
+
"module": "src/components/kg-row.js"
|
|
2586
|
+
}
|
|
2587
|
+
},
|
|
2588
|
+
{
|
|
2589
|
+
"kind": "custom-element-definition",
|
|
2590
|
+
"name": "kg-row",
|
|
2591
|
+
"declaration": {
|
|
2592
|
+
"name": "kgrow",
|
|
2593
|
+
"module": "src/components/kg-row.js"
|
|
2594
|
+
}
|
|
2595
|
+
}
|
|
2596
|
+
]
|
|
2597
|
+
},
|
|
2598
|
+
{
|
|
2599
|
+
"kind": "javascript-module",
|
|
2600
|
+
"path": "src/components/kg-select.js",
|
|
2601
|
+
"declarations": [
|
|
2602
|
+
{
|
|
2603
|
+
"kind": "class",
|
|
2604
|
+
"description": "",
|
|
2605
|
+
"name": "kgselect",
|
|
2606
|
+
"members": [
|
|
2607
|
+
{
|
|
2608
|
+
"kind": "field",
|
|
2609
|
+
"name": "properties",
|
|
2610
|
+
"type": {
|
|
2611
|
+
"text": "object"
|
|
2612
|
+
},
|
|
2613
|
+
"static": true,
|
|
2614
|
+
"default": "{ options: { type: Array }, value: { type: Object }, // Can be string or array placeholder: { type: String }, label: { type: String }, multiple: { type: Boolean }, disabled: { type: Boolean }, searchable: { type: Boolean }, _open: { type: Boolean, state: true }, _searchQuery: { type: String, state: true } }"
|
|
2615
|
+
},
|
|
2616
|
+
{
|
|
2617
|
+
"kind": "field",
|
|
2618
|
+
"name": "styles",
|
|
2619
|
+
"static": true,
|
|
2620
|
+
"default": "css` :host { display: inline-block; width: 100%; position: relative; font-family: inherit; user-select: none; } .kg-select-container { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; } .select-label { font-size: 0.875rem; font-weight: 600; color: var(--kg-text); opacity: 0.8; margin-left: 2px; } * { box-sizing: border-box; } .select-trigger { display: flex; align-items: center; justify-content: space-between; height: var(--kg-form-height); padding: 0 1rem; background: var(--kg-surface); border: 1px solid var(--kg-border); border-radius: var(--kg-radius-md, 8px); cursor: pointer; transition: all 0.2s ease; gap: 8px; flex-wrap: nowrap; overflow: hidden; } .select-trigger:hover { border-color: var(--kg-primary); } .select-trigger.open { border-color: var(--kg-primary); box-shadow: 0 0 0 2px rgba(65, 171, 52, 0.2); } .select-trigger.disabled { opacity: 0.5; cursor: not-allowed; background: var(--kg-bg-secondary); } .placeholder { color: var(--kg-text-muted); opacity: 0.6; } .selected-text { color: var(--kg-text); flex: 1; } .tags-container { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; } .tag { background: var(--kg-primary); color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; display: flex; align-items: center; gap: 4px; } .tag-remove { cursor: pointer; opacity: 0.8; } .tag-remove:hover { opacity: 1; } .chevron { transition: transform 0.2s ease; color: var(--kg-text-muted); flex-shrink: 0; } .open .chevron { transform: rotate(180deg); } /* Dropdown */ .select-dropdown { position: absolute; top: calc(100% + 5px); left: 0; width: 100%; background: var(--kg-surface); border: 1px solid var(--kg-border); border-radius: var(--kg-radius-md, 8px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); z-index: 1000; max-height: 300px; overflow-y: auto; display: none; animation: slideDown 0.2s ease-out; } .select-dropdown.visible { display: block; } @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } .search-container { padding: 8px; border-bottom: 1px solid var(--kg-border); position: sticky; top: 0; background: var(--kg-surface); z-index: 10; } .search-input { width: 100%; padding: 6px 10px; border: 1px solid var(--kg-border); border-radius: 4px; outline: none; font-family: inherit; font-size: 0.9rem; } .search-input:focus { border-color: var(--kg-primary); } .option-item { padding: 10px 16px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; transition: background 0.15s; color: var(--kg-text); } .option-item:hover { background: var(--kg-bg-secondary, rgba(0,0,0,0.04)); } .option-item.selected { background: rgba(var(--kg-primary-rgb, 19, 103, 255), 0.08); color: var(--kg-primary); font-weight: 600; } .no-results { padding: 16px; text-align: center; color: var(--kg-text-muted); font-size: 0.9rem; } .check-icon { width: 16px; height: 16px; } `"
|
|
2621
|
+
},
|
|
2622
|
+
{
|
|
2623
|
+
"kind": "method",
|
|
2624
|
+
"name": "_handleOutsideClick",
|
|
2625
|
+
"parameters": [
|
|
2626
|
+
{
|
|
2627
|
+
"name": "e"
|
|
2628
|
+
}
|
|
2629
|
+
]
|
|
2630
|
+
},
|
|
2631
|
+
{
|
|
2632
|
+
"kind": "method",
|
|
2633
|
+
"name": "_toggleDropdown",
|
|
2634
|
+
"parameters": [
|
|
2635
|
+
{
|
|
2636
|
+
"name": "e"
|
|
2637
|
+
}
|
|
2638
|
+
]
|
|
2639
|
+
},
|
|
2640
|
+
{
|
|
2641
|
+
"kind": "method",
|
|
2642
|
+
"name": "_closeDropdown"
|
|
2643
|
+
},
|
|
2644
|
+
{
|
|
2645
|
+
"kind": "method",
|
|
2646
|
+
"name": "_selectOption",
|
|
2647
|
+
"parameters": [
|
|
2648
|
+
{
|
|
2649
|
+
"name": "option"
|
|
2650
|
+
},
|
|
2651
|
+
{
|
|
2652
|
+
"name": "e"
|
|
2653
|
+
}
|
|
2654
|
+
]
|
|
2655
|
+
},
|
|
2656
|
+
{
|
|
2657
|
+
"kind": "method",
|
|
2658
|
+
"name": "_dispatchChange"
|
|
2659
|
+
},
|
|
2660
|
+
{
|
|
2661
|
+
"kind": "method",
|
|
2662
|
+
"name": "_handleSearch",
|
|
2663
|
+
"parameters": [
|
|
2664
|
+
{
|
|
2665
|
+
"name": "e"
|
|
2666
|
+
}
|
|
2667
|
+
]
|
|
2668
|
+
},
|
|
2669
|
+
{
|
|
2670
|
+
"kind": "method",
|
|
2671
|
+
"name": "_removeTag",
|
|
2672
|
+
"parameters": [
|
|
2673
|
+
{
|
|
2674
|
+
"name": "val"
|
|
2675
|
+
},
|
|
2676
|
+
{
|
|
2677
|
+
"name": "e"
|
|
2678
|
+
}
|
|
2679
|
+
]
|
|
2680
|
+
},
|
|
2681
|
+
{
|
|
2682
|
+
"kind": "method",
|
|
2683
|
+
"name": "render"
|
|
2684
|
+
},
|
|
2685
|
+
{
|
|
2686
|
+
"kind": "field",
|
|
2687
|
+
"name": "options",
|
|
2688
|
+
"type": {
|
|
2689
|
+
"text": "array"
|
|
2690
|
+
},
|
|
2691
|
+
"default": "[]"
|
|
2692
|
+
},
|
|
2693
|
+
{
|
|
2694
|
+
"kind": "field",
|
|
2695
|
+
"name": "value",
|
|
2696
|
+
"type": {
|
|
2697
|
+
"text": "null"
|
|
2698
|
+
},
|
|
2699
|
+
"default": "null"
|
|
2700
|
+
},
|
|
2701
|
+
{
|
|
2702
|
+
"kind": "field",
|
|
2703
|
+
"name": "placeholder",
|
|
2704
|
+
"type": {
|
|
2705
|
+
"text": "string"
|
|
2706
|
+
},
|
|
2707
|
+
"default": "'Seçiniz...'"
|
|
2708
|
+
},
|
|
2709
|
+
{
|
|
2710
|
+
"kind": "field",
|
|
2711
|
+
"name": "multiple",
|
|
2712
|
+
"type": {
|
|
2713
|
+
"text": "boolean"
|
|
2714
|
+
},
|
|
2715
|
+
"default": "false"
|
|
2716
|
+
},
|
|
2717
|
+
{
|
|
2718
|
+
"kind": "field",
|
|
2719
|
+
"name": "disabled",
|
|
2720
|
+
"type": {
|
|
2721
|
+
"text": "boolean"
|
|
2722
|
+
},
|
|
2723
|
+
"default": "false"
|
|
2724
|
+
},
|
|
2725
|
+
{
|
|
2726
|
+
"kind": "field",
|
|
2727
|
+
"name": "searchable",
|
|
2728
|
+
"type": {
|
|
2729
|
+
"text": "boolean"
|
|
2730
|
+
},
|
|
2731
|
+
"default": "false"
|
|
2732
|
+
},
|
|
2733
|
+
{
|
|
2734
|
+
"kind": "field",
|
|
2735
|
+
"name": "_open",
|
|
2736
|
+
"type": {
|
|
2737
|
+
"text": "boolean"
|
|
2738
|
+
},
|
|
2739
|
+
"default": "false"
|
|
2740
|
+
},
|
|
2741
|
+
{
|
|
2742
|
+
"kind": "field",
|
|
2743
|
+
"name": "_searchQuery",
|
|
2744
|
+
"type": {
|
|
2745
|
+
"text": "string"
|
|
2746
|
+
},
|
|
2747
|
+
"default": "''"
|
|
2748
|
+
}
|
|
2749
|
+
],
|
|
2750
|
+
"events": [
|
|
2751
|
+
{
|
|
2752
|
+
"name": "change",
|
|
2753
|
+
"type": {
|
|
2754
|
+
"text": "CustomEvent"
|
|
2755
|
+
}
|
|
2756
|
+
}
|
|
2757
|
+
],
|
|
2758
|
+
"superclass": {
|
|
2759
|
+
"name": "LitElement",
|
|
2760
|
+
"package": "lit"
|
|
2761
|
+
},
|
|
2762
|
+
"tagName": "kg-select",
|
|
2763
|
+
"customElement": true
|
|
2764
|
+
}
|
|
2765
|
+
],
|
|
2766
|
+
"exports": [
|
|
2767
|
+
{
|
|
2768
|
+
"kind": "js",
|
|
2769
|
+
"name": "kgselect",
|
|
2770
|
+
"declaration": {
|
|
2771
|
+
"name": "kgselect",
|
|
2772
|
+
"module": "src/components/kg-select.js"
|
|
2773
|
+
}
|
|
2774
|
+
},
|
|
2775
|
+
{
|
|
2776
|
+
"kind": "custom-element-definition",
|
|
2777
|
+
"name": "kg-select",
|
|
2778
|
+
"declaration": {
|
|
2779
|
+
"name": "kgselect",
|
|
2780
|
+
"module": "src/components/kg-select.js"
|
|
2781
|
+
}
|
|
2782
|
+
}
|
|
2783
|
+
]
|
|
2784
|
+
},
|
|
2785
|
+
{
|
|
2786
|
+
"kind": "javascript-module",
|
|
2787
|
+
"path": "src/components/kg-skeleton.js",
|
|
2788
|
+
"declarations": [
|
|
2789
|
+
{
|
|
2790
|
+
"kind": "class",
|
|
2791
|
+
"description": "",
|
|
2792
|
+
"name": "kgskeleton",
|
|
2793
|
+
"members": [
|
|
2794
|
+
{
|
|
2795
|
+
"kind": "field",
|
|
2796
|
+
"name": "properties",
|
|
2797
|
+
"type": {
|
|
2798
|
+
"text": "object"
|
|
2799
|
+
},
|
|
2800
|
+
"static": true,
|
|
2801
|
+
"default": "{ variant: { type: String }, // text, circle, rect animation: { type: String }, // pulse, wave, none width: { type: String }, height: { type: String }, borderRadius: { type: String, attribute: 'border-radius' } }"
|
|
2802
|
+
},
|
|
2803
|
+
{
|
|
2804
|
+
"kind": "field",
|
|
2805
|
+
"name": "styles",
|
|
2806
|
+
"static": true,
|
|
2807
|
+
"default": "css` :host { display: inline-block; vertical-align: middle; width: 100%; line-height: 0; } /* Circle ve Rect için width: fit-content olmalı */ :host([variant=\"circle\"]), :host([variant=\"rect\"]) { width: fit-content; } .skeleton { /* Light mode: Biraz daha belirgin, şık bir gri */ background-color: #ebebeb; position: relative; overflow: hidden; display: block; width: var(--skeleton-width, 100%); height: var(--skeleton-height, 1.2em); box-sizing: border-box; } /* Sadece Dark Mode seçiliyse renkleri değiştir */ :host-context([data-theme='dark']) .skeleton, [data-theme='dark'] .skeleton { background-color: rgba(255, 255, 255, 0.1); } /* Variants */ .skeleton.text { margin: 0.3em 0; height: 0.9em; border-radius: 4px; } .skeleton.circle { border-radius: 50%; } .skeleton.rect { border-radius: 8px; } /* Animations */ .skeleton.pulse { animation: pulse 1.5s ease-in-out infinite; } .skeleton.wave::after { content: \"\"; position: absolute; top: 0; right: 0; bottom: 0; left: 0; transform: translateX(-100%); /* Yumuşak parlayan dalga */ background-image: linear-gradient( 90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0) 100% ); animation: wave 1.5s infinite; } @keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } } @keyframes wave { 100% { transform: translateX(100%); } } `"
|
|
2808
|
+
},
|
|
2809
|
+
{
|
|
2810
|
+
"kind": "method",
|
|
2811
|
+
"name": "render"
|
|
2812
|
+
},
|
|
2813
|
+
{
|
|
2814
|
+
"kind": "field",
|
|
2815
|
+
"name": "variant",
|
|
2816
|
+
"type": {
|
|
2817
|
+
"text": "string"
|
|
2818
|
+
},
|
|
2819
|
+
"default": "'text'"
|
|
2820
|
+
},
|
|
2821
|
+
{
|
|
2822
|
+
"kind": "field",
|
|
2823
|
+
"name": "animation",
|
|
2824
|
+
"type": {
|
|
2825
|
+
"text": "string"
|
|
2826
|
+
},
|
|
2827
|
+
"default": "'pulse'"
|
|
2828
|
+
},
|
|
2829
|
+
{
|
|
2830
|
+
"kind": "field",
|
|
2831
|
+
"name": "width",
|
|
2832
|
+
"type": {
|
|
2833
|
+
"text": "string"
|
|
2834
|
+
},
|
|
2835
|
+
"default": "''"
|
|
2836
|
+
},
|
|
2837
|
+
{
|
|
2838
|
+
"kind": "field",
|
|
2839
|
+
"name": "height",
|
|
2840
|
+
"type": {
|
|
2841
|
+
"text": "string"
|
|
2842
|
+
},
|
|
2843
|
+
"default": "''"
|
|
2844
|
+
},
|
|
2845
|
+
{
|
|
2846
|
+
"kind": "field",
|
|
2847
|
+
"name": "borderRadius",
|
|
2848
|
+
"type": {
|
|
2849
|
+
"text": "string"
|
|
2850
|
+
},
|
|
2851
|
+
"default": "''"
|
|
2852
|
+
}
|
|
2853
|
+
],
|
|
2854
|
+
"superclass": {
|
|
2855
|
+
"name": "LitElement",
|
|
2856
|
+
"package": "lit"
|
|
2857
|
+
},
|
|
2858
|
+
"tagName": "kg-skeleton",
|
|
2859
|
+
"customElement": true
|
|
2860
|
+
}
|
|
2861
|
+
],
|
|
2862
|
+
"exports": [
|
|
2863
|
+
{
|
|
2864
|
+
"kind": "js",
|
|
2865
|
+
"name": "kgskeleton",
|
|
2866
|
+
"declaration": {
|
|
2867
|
+
"name": "kgskeleton",
|
|
2868
|
+
"module": "src/components/kg-skeleton.js"
|
|
2869
|
+
}
|
|
2870
|
+
},
|
|
2871
|
+
{
|
|
2872
|
+
"kind": "custom-element-definition",
|
|
2873
|
+
"name": "kg-skeleton",
|
|
2874
|
+
"declaration": {
|
|
2875
|
+
"name": "kgskeleton",
|
|
2876
|
+
"module": "src/components/kg-skeleton.js"
|
|
2877
|
+
}
|
|
2878
|
+
}
|
|
2879
|
+
]
|
|
2880
|
+
},
|
|
2881
|
+
{
|
|
2882
|
+
"kind": "javascript-module",
|
|
2883
|
+
"path": "src/components/kg-slider.js",
|
|
2884
|
+
"declarations": [
|
|
2885
|
+
{
|
|
2886
|
+
"kind": "class",
|
|
2887
|
+
"description": "",
|
|
2888
|
+
"name": "kgslider",
|
|
2889
|
+
"members": [
|
|
2890
|
+
{
|
|
2891
|
+
"kind": "field",
|
|
2892
|
+
"name": "properties",
|
|
2893
|
+
"type": {
|
|
2894
|
+
"text": "object"
|
|
2895
|
+
},
|
|
2896
|
+
"static": true,
|
|
2897
|
+
"default": "{ value: { type: Number, reflect: true }, min: { type: Number }, max: { type: Number }, step: { type: Number }, label: { type: String }, color: { type: String }, disabled: { type: Boolean, reflect: true }, hideValue: { type: Boolean, reflect: true, attribute: 'hide-value' }, showPins: { type: Boolean, attribute: 'show-pins' } }"
|
|
2898
|
+
},
|
|
2899
|
+
{
|
|
2900
|
+
"kind": "field",
|
|
2901
|
+
"name": "styles",
|
|
2902
|
+
"static": true,
|
|
2903
|
+
"default": "css` :host { display: block; margin: 1rem 0; font-family: inherit; } .kg-slider-container { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; } .slider-header { display: flex; justify-content: space-between; align-items: center; } .slider-label { font-size: 0.875rem; font-weight: 600; color: var(--kg-text); opacity: 0.8; } .current-value { font-size: 0.875rem; font-weight: 700; color: var(--slider-active-color, var(--kg-primary)); background: var(--kg-bg-secondary, rgba(0,0,0,0.04)); padding: 2px 8px; border-radius: 4px; min-width: 2.5rem; text-align: center; } .slider-wrapper { position: relative; display: flex; align-items: center; height: 24px; } input[type=\"range\"] { -webkit-appearance: none; width: 100%; background: transparent; margin: 0; cursor: pointer; } input[type=\"range\"]:focus { outline: none; } /* Track Styles */ input[type=\"range\"]::-webkit-slider-runnable-track { width: 100%; height: 6px; background: var(--kg-border); border-radius: 3px; transition: background 0.2s; } .checked-track { position: absolute; height: 6px; background: var(--slider-active-color, var(--kg-primary)); border-radius: 3px; pointer-events: none; left: 0; } /* Thumb Styles */ input[type=\"range\"]::-webkit-slider-thumb { -webkit-appearance: none; height: 20px; width: 20px; border-radius: 50%; background: white; border: 2px solid var(--slider-active-color, var(--kg-primary)); margin-top: -7px; /* Centers thumb on track */ box-shadow: 0 2px 4px rgba(0,0,0,0.1); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); position: relative; z-index: 2; } input[type=\"range\"]:not(:disabled):::-webkit-slider-thumb:hover { transform: scale(1.2); box-shadow: 0 0 0 6px rgba(var(--kg-primary-rgb, 19, 103, 255), 0.1); } input[type=\"range\"]:active::-webkit-slider-thumb { transform: scale(0.9); background: var(--slider-active-color, var(--kg-primary)); } /* Disabled State */ .disabled { opacity: 0.5; cursor: not-allowed; } .disabled input[type=\"range\"] { cursor: not-allowed; } .pins-container { position: absolute; width: 100%; height: 100%; display: flex; justify-content: space-between; align-items: center; pointer-events: none; z-index: 0; } .pin { width: 4px; height: 4px; background-color: var(--kg-text); opacity: 0.3; border-radius: 50%; } `"
|
|
2904
|
+
},
|
|
2905
|
+
{
|
|
2906
|
+
"kind": "method",
|
|
2907
|
+
"name": "_handleInput",
|
|
2908
|
+
"parameters": [
|
|
2909
|
+
{
|
|
2910
|
+
"name": "e"
|
|
2911
|
+
}
|
|
2912
|
+
]
|
|
2913
|
+
},
|
|
2914
|
+
{
|
|
2915
|
+
"kind": "method",
|
|
2916
|
+
"name": "render"
|
|
2917
|
+
},
|
|
2918
|
+
{
|
|
2919
|
+
"kind": "field",
|
|
2920
|
+
"name": "value",
|
|
2921
|
+
"type": {
|
|
2922
|
+
"text": "number"
|
|
2923
|
+
},
|
|
2924
|
+
"default": "50"
|
|
2925
|
+
},
|
|
2926
|
+
{
|
|
2927
|
+
"kind": "field",
|
|
2928
|
+
"name": "min",
|
|
2929
|
+
"type": {
|
|
2930
|
+
"text": "number"
|
|
2931
|
+
},
|
|
2932
|
+
"default": "0"
|
|
2933
|
+
},
|
|
2934
|
+
{
|
|
2935
|
+
"kind": "field",
|
|
2936
|
+
"name": "max",
|
|
2937
|
+
"type": {
|
|
2938
|
+
"text": "number"
|
|
2939
|
+
},
|
|
2940
|
+
"default": "100"
|
|
2941
|
+
},
|
|
2942
|
+
{
|
|
2943
|
+
"kind": "field",
|
|
2944
|
+
"name": "step",
|
|
2945
|
+
"type": {
|
|
2946
|
+
"text": "number"
|
|
2947
|
+
},
|
|
2948
|
+
"default": "1"
|
|
2949
|
+
},
|
|
2950
|
+
{
|
|
2951
|
+
"kind": "field",
|
|
2952
|
+
"name": "disabled",
|
|
2953
|
+
"type": {
|
|
2954
|
+
"text": "boolean"
|
|
2955
|
+
},
|
|
2956
|
+
"default": "false"
|
|
2957
|
+
},
|
|
2958
|
+
{
|
|
2959
|
+
"kind": "field",
|
|
2960
|
+
"name": "hideValue",
|
|
2961
|
+
"type": {
|
|
2962
|
+
"text": "boolean"
|
|
2963
|
+
},
|
|
2964
|
+
"default": "false"
|
|
2965
|
+
},
|
|
2966
|
+
{
|
|
2967
|
+
"kind": "field",
|
|
2968
|
+
"name": "showPins",
|
|
2969
|
+
"type": {
|
|
2970
|
+
"text": "boolean"
|
|
2971
|
+
},
|
|
2972
|
+
"default": "false"
|
|
2973
|
+
}
|
|
2974
|
+
],
|
|
2975
|
+
"events": [
|
|
2976
|
+
{
|
|
2977
|
+
"name": "kg-input",
|
|
2978
|
+
"type": {
|
|
2979
|
+
"text": "CustomEvent"
|
|
2980
|
+
}
|
|
2981
|
+
}
|
|
2982
|
+
],
|
|
2983
|
+
"superclass": {
|
|
2984
|
+
"name": "LitElement",
|
|
2985
|
+
"package": "lit"
|
|
2986
|
+
},
|
|
2987
|
+
"tagName": "kg-slider",
|
|
2988
|
+
"customElement": true
|
|
2989
|
+
}
|
|
2990
|
+
],
|
|
2991
|
+
"exports": [
|
|
2992
|
+
{
|
|
2993
|
+
"kind": "js",
|
|
2994
|
+
"name": "kgslider",
|
|
2995
|
+
"declaration": {
|
|
2996
|
+
"name": "kgslider",
|
|
2997
|
+
"module": "src/components/kg-slider.js"
|
|
2998
|
+
}
|
|
2999
|
+
},
|
|
3000
|
+
{
|
|
3001
|
+
"kind": "custom-element-definition",
|
|
3002
|
+
"name": "kg-slider",
|
|
3003
|
+
"declaration": {
|
|
3004
|
+
"name": "kgslider",
|
|
3005
|
+
"module": "src/components/kg-slider.js"
|
|
3006
|
+
}
|
|
3007
|
+
}
|
|
3008
|
+
]
|
|
3009
|
+
},
|
|
3010
|
+
{
|
|
3011
|
+
"kind": "javascript-module",
|
|
3012
|
+
"path": "src/components/kg-spinner.js",
|
|
3013
|
+
"declarations": [
|
|
3014
|
+
{
|
|
3015
|
+
"kind": "class",
|
|
3016
|
+
"description": "",
|
|
3017
|
+
"name": "kgspinner",
|
|
3018
|
+
"members": [
|
|
3019
|
+
{
|
|
3020
|
+
"kind": "field",
|
|
3021
|
+
"name": "properties",
|
|
3022
|
+
"type": {
|
|
3023
|
+
"text": "object"
|
|
3024
|
+
},
|
|
3025
|
+
"static": true,
|
|
3026
|
+
"default": "{ size: { type: String, reflect: true }, // 'small', 'medium', 'large' or custom px color: { type: String, reflect: true }, thickness: { type: Number } }"
|
|
3027
|
+
},
|
|
3028
|
+
{
|
|
3029
|
+
"kind": "field",
|
|
3030
|
+
"name": "styles",
|
|
3031
|
+
"static": true,
|
|
3032
|
+
"default": "css` :host { display: inline-flex; align-items: center; justify-content: center; line-height: 0; } .spinner { animation: rotate 1.5s linear infinite; transform-origin: center center; } circle { stroke: var(--spinner-color, var(--kg-primary)); stroke-dasharray: 1, 200; stroke-dashoffset: 0; animation: dash 1.5s ease-in-out infinite; stroke-linecap: round; fill: none; } @keyframes rotate { 100% { transform: rotate(360deg); } } @keyframes dash { 0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; } 50% { stroke-dasharray: 89, 200; stroke-dashoffset: -35px; } 100% { stroke-dasharray: 89, 200; stroke-dashoffset: -124px; } } /* Sizes */ :host([size=\"small\"]) .spinner { width: 16px; height: 16px; } :host([size=\"medium\"]) .spinner { width: 32px; height: 32px; } :host([size=\"large\"]) .spinner { width: 48px; height: 48px; } /* Colors */ :host([color=\"primary\"]) { --spinner-color: var(--kg-primary); } :host([color=\"secondary\"]) { --spinner-color: var(--kg-secondary); } :host([color=\"tertiary\"]) { --spinner-color: var(--kg-tertiary); } :host([color=\"error\"]) { --spinner-color: #DB2828; } :host([color=\"white\"]) { --spinner-color: white; } `"
|
|
3033
|
+
},
|
|
3034
|
+
{
|
|
3035
|
+
"kind": "method",
|
|
3036
|
+
"name": "render"
|
|
3037
|
+
},
|
|
3038
|
+
{
|
|
3039
|
+
"kind": "field",
|
|
3040
|
+
"name": "size",
|
|
3041
|
+
"type": {
|
|
3042
|
+
"text": "string"
|
|
3043
|
+
},
|
|
3044
|
+
"default": "'medium'"
|
|
3045
|
+
},
|
|
3046
|
+
{
|
|
3047
|
+
"kind": "field",
|
|
3048
|
+
"name": "color",
|
|
3049
|
+
"type": {
|
|
3050
|
+
"text": "string"
|
|
3051
|
+
},
|
|
3052
|
+
"default": "'primary'"
|
|
3053
|
+
},
|
|
3054
|
+
{
|
|
3055
|
+
"kind": "field",
|
|
3056
|
+
"name": "thickness",
|
|
3057
|
+
"type": {
|
|
3058
|
+
"text": "number"
|
|
3059
|
+
},
|
|
3060
|
+
"default": "4"
|
|
3061
|
+
}
|
|
3062
|
+
],
|
|
3063
|
+
"superclass": {
|
|
3064
|
+
"name": "LitElement",
|
|
3065
|
+
"package": "lit"
|
|
3066
|
+
},
|
|
3067
|
+
"tagName": "kg-spinner",
|
|
3068
|
+
"customElement": true
|
|
3069
|
+
}
|
|
3070
|
+
],
|
|
3071
|
+
"exports": [
|
|
3072
|
+
{
|
|
3073
|
+
"kind": "js",
|
|
3074
|
+
"name": "kgspinner",
|
|
3075
|
+
"declaration": {
|
|
3076
|
+
"name": "kgspinner",
|
|
3077
|
+
"module": "src/components/kg-spinner.js"
|
|
3078
|
+
}
|
|
3079
|
+
},
|
|
3080
|
+
{
|
|
3081
|
+
"kind": "custom-element-definition",
|
|
3082
|
+
"name": "kg-spinner",
|
|
3083
|
+
"declaration": {
|
|
3084
|
+
"name": "kgspinner",
|
|
3085
|
+
"module": "src/components/kg-spinner.js"
|
|
3086
|
+
}
|
|
3087
|
+
}
|
|
3088
|
+
]
|
|
3089
|
+
},
|
|
3090
|
+
{
|
|
3091
|
+
"kind": "javascript-module",
|
|
3092
|
+
"path": "src/components/kg-stepper.js",
|
|
3093
|
+
"declarations": [
|
|
3094
|
+
{
|
|
3095
|
+
"kind": "class",
|
|
3096
|
+
"description": "",
|
|
3097
|
+
"name": "kgstepper",
|
|
3098
|
+
"members": [
|
|
3099
|
+
{
|
|
3100
|
+
"kind": "field",
|
|
3101
|
+
"name": "properties",
|
|
3102
|
+
"type": {
|
|
3103
|
+
"text": "object"
|
|
3104
|
+
},
|
|
3105
|
+
"static": true,
|
|
3106
|
+
"default": "{ steps: { type: Array }, activeStep: { type: Number }, vertical: { type: Boolean }, clickable: { type: Boolean } }"
|
|
3107
|
+
},
|
|
3108
|
+
{
|
|
3109
|
+
"kind": "field",
|
|
3110
|
+
"name": "styles",
|
|
3111
|
+
"static": true,
|
|
3112
|
+
"default": "css` :host { display: block; width: 100%; font-family: inherit; } .stepper-container { display: flex; width: 100%; padding: 1rem 0; } .stepper-container.horizontal { flex-direction: row; align-items: flex-start; justify-content: space-between; } .stepper-container.vertical { flex-direction: column; gap: 0.5rem; } .step-item { display: flex; position: relative; flex: 1; } .horizontal .step-item { flex-direction: column; align-items: center; text-align: center; } .vertical .step-item { flex-direction: row; align-items: center; gap: 1rem; min-height: 60px; } /* Connection Lines */ .step-line { position: absolute; background: var(--kg-border); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1; } .horizontal .step-line { top: 16px; left: calc(50% + 20px); right: calc(-50% + 20px); height: 2px; } .vertical .step-line { left: 16px; top: 36px; bottom: -4px; width: 2px; } .step-item:last-child .step-line { display: none; } .step-line.active { background: var(--kg-primary); } /* Step Circle */ .step-circle { width: 34px; height: 34px; border-radius: 50%; background: var(--kg-bg); border: 2px solid var(--kg-border); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; color: var(--kg-text-muted); z-index: 2; transition: all 0.3s ease; cursor: default; } .step-item.clickable .step-circle { cursor: pointer; } .step-item.active .step-circle { border-color: var(--kg-primary); color: var(--kg-primary); box-shadow: 0 0 0 4px rgba(65, 171, 52, 0.1); } .step-item.completed .step-circle { background: var(--kg-primary); border-color: var(--kg-primary); color: white; } /* Content */ .step-content { margin-top: 0.75rem; z-index: 2; } .vertical .step-content { margin-top: 0; text-align: left; } .step-title { display: block; font-weight: 600; font-size: 0.95rem; color: var(--kg-text); transition: color 0.3s ease; } .step-item.active .step-title { color: var(--kg-primary); } .step-desc { display: block; font-size: 0.8rem; color: var(--kg-text-muted); margin-top: 2px; } /* Icons */ .check-icon { width: 18px; height: 18px; } .custom-icon-wrapper { display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; } .custom-icon-wrapper svg { width: 100%; height: 100%; } `"
|
|
3113
|
+
},
|
|
3114
|
+
{
|
|
3115
|
+
"kind": "method",
|
|
3116
|
+
"name": "_handleStepClick",
|
|
3117
|
+
"parameters": [
|
|
3118
|
+
{
|
|
3119
|
+
"name": "index"
|
|
3120
|
+
}
|
|
3121
|
+
]
|
|
3122
|
+
},
|
|
3123
|
+
{
|
|
3124
|
+
"kind": "method",
|
|
3125
|
+
"name": "render"
|
|
3126
|
+
},
|
|
3127
|
+
{
|
|
3128
|
+
"kind": "field",
|
|
3129
|
+
"name": "steps",
|
|
3130
|
+
"type": {
|
|
3131
|
+
"text": "array"
|
|
3132
|
+
},
|
|
3133
|
+
"default": "[]"
|
|
3134
|
+
},
|
|
3135
|
+
{
|
|
3136
|
+
"kind": "field",
|
|
3137
|
+
"name": "activeStep",
|
|
3138
|
+
"type": {
|
|
3139
|
+
"text": "number"
|
|
3140
|
+
},
|
|
3141
|
+
"default": "0"
|
|
3142
|
+
},
|
|
3143
|
+
{
|
|
3144
|
+
"kind": "field",
|
|
3145
|
+
"name": "vertical",
|
|
3146
|
+
"type": {
|
|
3147
|
+
"text": "boolean"
|
|
3148
|
+
},
|
|
3149
|
+
"default": "false"
|
|
3150
|
+
},
|
|
3151
|
+
{
|
|
3152
|
+
"kind": "field",
|
|
3153
|
+
"name": "clickable",
|
|
3154
|
+
"type": {
|
|
3155
|
+
"text": "boolean"
|
|
3156
|
+
},
|
|
3157
|
+
"default": "false"
|
|
3158
|
+
}
|
|
3159
|
+
],
|
|
3160
|
+
"events": [
|
|
3161
|
+
{
|
|
3162
|
+
"name": "kg-step-change",
|
|
3163
|
+
"type": {
|
|
3164
|
+
"text": "CustomEvent"
|
|
3165
|
+
}
|
|
3166
|
+
}
|
|
3167
|
+
],
|
|
3168
|
+
"superclass": {
|
|
3169
|
+
"name": "LitElement",
|
|
3170
|
+
"package": "lit"
|
|
3171
|
+
},
|
|
3172
|
+
"tagName": "kg-stepper",
|
|
3173
|
+
"customElement": true
|
|
3174
|
+
}
|
|
3175
|
+
],
|
|
3176
|
+
"exports": [
|
|
3177
|
+
{
|
|
3178
|
+
"kind": "js",
|
|
3179
|
+
"name": "kgstepper",
|
|
3180
|
+
"declaration": {
|
|
3181
|
+
"name": "kgstepper",
|
|
3182
|
+
"module": "src/components/kg-stepper.js"
|
|
3183
|
+
}
|
|
3184
|
+
},
|
|
3185
|
+
{
|
|
3186
|
+
"kind": "custom-element-definition",
|
|
3187
|
+
"name": "kg-stepper",
|
|
3188
|
+
"declaration": {
|
|
3189
|
+
"name": "kgstepper",
|
|
3190
|
+
"module": "src/components/kg-stepper.js"
|
|
3191
|
+
}
|
|
3192
|
+
}
|
|
3193
|
+
]
|
|
3194
|
+
},
|
|
3195
|
+
{
|
|
3196
|
+
"kind": "javascript-module",
|
|
3197
|
+
"path": "src/components/kg-switch.js",
|
|
3198
|
+
"declarations": [
|
|
3199
|
+
{
|
|
3200
|
+
"kind": "class",
|
|
3201
|
+
"description": "",
|
|
3202
|
+
"name": "kgswitch",
|
|
3203
|
+
"members": [
|
|
3204
|
+
{
|
|
3205
|
+
"kind": "field",
|
|
3206
|
+
"name": "properties",
|
|
3207
|
+
"type": {
|
|
3208
|
+
"text": "object"
|
|
3209
|
+
},
|
|
3210
|
+
"static": true,
|
|
3211
|
+
"default": "{ checked: { type: Boolean, reflect: true }, disabled: { type: Boolean }, label: { type: String }, color: { type: String } // primary, secondary, tertiary }"
|
|
3212
|
+
},
|
|
3213
|
+
{
|
|
3214
|
+
"kind": "field",
|
|
3215
|
+
"name": "styles",
|
|
3216
|
+
"static": true,
|
|
3217
|
+
"default": "css` :host { display: inline-block; vertical-align: middle; cursor: pointer; user-select: none; font-family: inherit; } :host([disabled]) { cursor: not-allowed; opacity: 0.5; } .kg-switch-wrapper { display: flex; align-items: center; gap: 0.75rem; } .kg-switch-track { position: relative; width: 44px; height: 24px; background: var(--kg-border); border-radius: 24px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: inset 0 2px 4px rgba(0,0,0,0.05); } .kg-switch-thumb { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: white; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); } /* Checked State */ :host([checked]) .kg-switch-track { background: var(--switch-active-color, var(--kg-primary)); } :host([checked]) .kg-switch-thumb { transform: translateX(20px); } .label { font-size: 0.95rem; font-weight: 500; color: var(--kg-text); } `"
|
|
3218
|
+
},
|
|
3219
|
+
{
|
|
3220
|
+
"kind": "method",
|
|
3221
|
+
"name": "_toggle"
|
|
3222
|
+
},
|
|
3223
|
+
{
|
|
3224
|
+
"kind": "method",
|
|
3225
|
+
"name": "render"
|
|
3226
|
+
},
|
|
3227
|
+
{
|
|
3228
|
+
"kind": "field",
|
|
3229
|
+
"name": "checked",
|
|
3230
|
+
"type": {
|
|
3231
|
+
"text": "boolean"
|
|
3232
|
+
},
|
|
3233
|
+
"default": "false"
|
|
3234
|
+
},
|
|
3235
|
+
{
|
|
3236
|
+
"kind": "field",
|
|
3237
|
+
"name": "disabled",
|
|
3238
|
+
"type": {
|
|
3239
|
+
"text": "boolean"
|
|
3240
|
+
},
|
|
3241
|
+
"default": "false"
|
|
3242
|
+
},
|
|
3243
|
+
{
|
|
3244
|
+
"kind": "field",
|
|
3245
|
+
"name": "color",
|
|
3246
|
+
"type": {
|
|
3247
|
+
"text": "string"
|
|
3248
|
+
},
|
|
3249
|
+
"default": "'primary'"
|
|
3250
|
+
}
|
|
3251
|
+
],
|
|
3252
|
+
"events": [
|
|
3253
|
+
{
|
|
3254
|
+
"name": "change",
|
|
3255
|
+
"type": {
|
|
3256
|
+
"text": "CustomEvent"
|
|
3257
|
+
}
|
|
3258
|
+
}
|
|
3259
|
+
],
|
|
3260
|
+
"superclass": {
|
|
3261
|
+
"name": "LitElement",
|
|
3262
|
+
"package": "lit"
|
|
3263
|
+
},
|
|
3264
|
+
"tagName": "kg-switch",
|
|
3265
|
+
"customElement": true
|
|
3266
|
+
}
|
|
3267
|
+
],
|
|
3268
|
+
"exports": [
|
|
3269
|
+
{
|
|
3270
|
+
"kind": "js",
|
|
3271
|
+
"name": "kgswitch",
|
|
3272
|
+
"declaration": {
|
|
3273
|
+
"name": "kgswitch",
|
|
3274
|
+
"module": "src/components/kg-switch.js"
|
|
3275
|
+
}
|
|
3276
|
+
},
|
|
3277
|
+
{
|
|
3278
|
+
"kind": "custom-element-definition",
|
|
3279
|
+
"name": "kg-switch",
|
|
3280
|
+
"declaration": {
|
|
3281
|
+
"name": "kgswitch",
|
|
3282
|
+
"module": "src/components/kg-switch.js"
|
|
3283
|
+
}
|
|
3284
|
+
}
|
|
3285
|
+
]
|
|
3286
|
+
},
|
|
3287
|
+
{
|
|
3288
|
+
"kind": "javascript-module",
|
|
3289
|
+
"path": "src/components/kg-tab-panel.js",
|
|
3290
|
+
"declarations": [
|
|
3291
|
+
{
|
|
3292
|
+
"kind": "class",
|
|
3293
|
+
"description": "",
|
|
3294
|
+
"name": "kgtabpanel",
|
|
3295
|
+
"members": [
|
|
3296
|
+
{
|
|
3297
|
+
"kind": "field",
|
|
3298
|
+
"name": "properties",
|
|
3299
|
+
"type": {
|
|
3300
|
+
"text": "object"
|
|
3301
|
+
},
|
|
3302
|
+
"static": true,
|
|
3303
|
+
"default": "{ value: { type: String }, label: { type: String }, active: { type: Boolean, reflect: true } }"
|
|
3304
|
+
},
|
|
3305
|
+
{
|
|
3306
|
+
"kind": "field",
|
|
3307
|
+
"name": "styles",
|
|
3308
|
+
"static": true,
|
|
3309
|
+
"default": "css` :host { display: none; width: 100%; height: 100%; animation: fadeIn 0.3s ease; } :host([active]) { display: block; } @keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } } `"
|
|
3310
|
+
},
|
|
3311
|
+
{
|
|
3312
|
+
"kind": "method",
|
|
3313
|
+
"name": "render"
|
|
3314
|
+
},
|
|
3315
|
+
{
|
|
3316
|
+
"kind": "field",
|
|
3317
|
+
"name": "value",
|
|
3318
|
+
"type": {
|
|
3319
|
+
"text": "string"
|
|
3320
|
+
},
|
|
3321
|
+
"default": "''"
|
|
3322
|
+
},
|
|
3323
|
+
{
|
|
3324
|
+
"kind": "field",
|
|
3325
|
+
"name": "label",
|
|
3326
|
+
"type": {
|
|
3327
|
+
"text": "string"
|
|
3328
|
+
},
|
|
3329
|
+
"default": "''"
|
|
3330
|
+
},
|
|
3331
|
+
{
|
|
3332
|
+
"kind": "field",
|
|
3333
|
+
"name": "active",
|
|
3334
|
+
"type": {
|
|
3335
|
+
"text": "boolean"
|
|
3336
|
+
},
|
|
3337
|
+
"default": "false"
|
|
3338
|
+
}
|
|
3339
|
+
],
|
|
3340
|
+
"superclass": {
|
|
3341
|
+
"name": "LitElement",
|
|
3342
|
+
"package": "lit"
|
|
3343
|
+
},
|
|
3344
|
+
"tagName": "kg-tab-panel",
|
|
3345
|
+
"customElement": true
|
|
3346
|
+
}
|
|
3347
|
+
],
|
|
3348
|
+
"exports": [
|
|
3349
|
+
{
|
|
3350
|
+
"kind": "js",
|
|
3351
|
+
"name": "kgtabpanel",
|
|
3352
|
+
"declaration": {
|
|
3353
|
+
"name": "kgtabpanel",
|
|
3354
|
+
"module": "src/components/kg-tab-panel.js"
|
|
3355
|
+
}
|
|
3356
|
+
},
|
|
3357
|
+
{
|
|
3358
|
+
"kind": "custom-element-definition",
|
|
3359
|
+
"name": "kg-tab-panel",
|
|
3360
|
+
"declaration": {
|
|
3361
|
+
"name": "kgtabpanel",
|
|
3362
|
+
"module": "src/components/kg-tab-panel.js"
|
|
3363
|
+
}
|
|
3364
|
+
}
|
|
3365
|
+
]
|
|
3366
|
+
},
|
|
3367
|
+
{
|
|
3368
|
+
"kind": "javascript-module",
|
|
3369
|
+
"path": "src/components/kg-tabs.js",
|
|
3370
|
+
"declarations": [
|
|
3371
|
+
{
|
|
3372
|
+
"kind": "class",
|
|
3373
|
+
"description": "",
|
|
3374
|
+
"name": "kgtabs",
|
|
3375
|
+
"members": [
|
|
3376
|
+
{
|
|
3377
|
+
"kind": "field",
|
|
3378
|
+
"name": "properties",
|
|
3379
|
+
"type": {
|
|
3380
|
+
"text": "object"
|
|
3381
|
+
},
|
|
3382
|
+
"static": true,
|
|
3383
|
+
"default": "{ activeTab: { type: String, reflect: true }, vertical: { type: Boolean, reflect: true } }"
|
|
3384
|
+
},
|
|
3385
|
+
{
|
|
3386
|
+
"kind": "field",
|
|
3387
|
+
"name": "styles",
|
|
3388
|
+
"static": true,
|
|
3389
|
+
"default": "css` :host { display: flex; flex-direction: column; width: 100%; font-family: inherit; } :host([vertical]) { flex-direction: row; } .tabs-header { display: flex; border-bottom: 2px solid var(--kg-border); gap: 0.5rem; padding: 0 0.5rem; overflow-x: auto; scrollbar-width: none; } :host([vertical]) .tabs-header { flex-direction: column; border-bottom: none; border-right: 2px solid var(--kg-border); padding: 0.5rem 0 0.5rem 0.5rem; gap: 0.25rem; min-width: 180px; } .tab-trigger { padding: 0.75rem 1.25rem; font-size: 0.9rem; font-weight: 600; color: var(--kg-text-muted); cursor: pointer; position: relative; white-space: nowrap; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); background: transparent; border: none; outline: none; border-radius: 8px 8px 0 0; margin-bottom: -2px; } :host([vertical]) .tab-trigger { padding: 0.75rem 1rem; text-align: left; border-radius: 8px 0 0 8px; margin-bottom: 0; margin-right: -2px; } .tab-trigger:hover { color: var(--kg-primary); background: rgba(65, 171, 52, 0.05); } .tab-trigger.active { color: var(--kg-primary); background: rgba(65, 171, 52, 0.08); } /* Standard Underline */ .tab-trigger::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 100%; height: 2px; background: var(--kg-primary); transform: scaleX(0); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); border-radius: 2px 2px 0 0; } :host([vertical]) .tab-trigger::after { bottom: 0; left: auto; right: -2px; width: 2px; height: 100%; transform: scaleY(0); border-radius: 2px 0 0 2px; } .tab-trigger.active::after { transform: scaleX(1); } :host([vertical]) .tab-trigger.active::after { transform: scaleY(1); } .tabs-content { padding: 1.5rem 0; flex: 1; } :host([vertical]) .tabs-content { padding: 0 1.5rem; } `"
|
|
3390
|
+
},
|
|
3391
|
+
{
|
|
3392
|
+
"kind": "method",
|
|
3393
|
+
"name": "firstUpdated"
|
|
3394
|
+
},
|
|
3395
|
+
{
|
|
3396
|
+
"kind": "method",
|
|
3397
|
+
"name": "updated",
|
|
3398
|
+
"parameters": [
|
|
3399
|
+
{
|
|
3400
|
+
"name": "changedProperties"
|
|
3401
|
+
}
|
|
3402
|
+
]
|
|
3403
|
+
},
|
|
3404
|
+
{
|
|
3405
|
+
"kind": "method",
|
|
3406
|
+
"name": "_handleTabClick",
|
|
3407
|
+
"parameters": [
|
|
3408
|
+
{
|
|
3409
|
+
"name": "value"
|
|
3410
|
+
}
|
|
3411
|
+
]
|
|
3412
|
+
},
|
|
3413
|
+
{
|
|
3414
|
+
"kind": "method",
|
|
3415
|
+
"name": "_updatePanels"
|
|
3416
|
+
},
|
|
3417
|
+
{
|
|
3418
|
+
"kind": "method",
|
|
3419
|
+
"name": "render"
|
|
3420
|
+
},
|
|
3421
|
+
{
|
|
3422
|
+
"kind": "field",
|
|
3423
|
+
"name": "activeTab",
|
|
3424
|
+
"type": {
|
|
3425
|
+
"text": "string"
|
|
3426
|
+
},
|
|
3427
|
+
"default": "''"
|
|
3428
|
+
},
|
|
3429
|
+
{
|
|
3430
|
+
"kind": "field",
|
|
3431
|
+
"name": "vertical",
|
|
3432
|
+
"type": {
|
|
3433
|
+
"text": "boolean"
|
|
3434
|
+
},
|
|
3435
|
+
"default": "false"
|
|
3436
|
+
}
|
|
3437
|
+
],
|
|
3438
|
+
"events": [
|
|
3439
|
+
{
|
|
3440
|
+
"name": "kg-tab-change",
|
|
3441
|
+
"type": {
|
|
3442
|
+
"text": "CustomEvent"
|
|
3443
|
+
}
|
|
3444
|
+
}
|
|
3445
|
+
],
|
|
3446
|
+
"superclass": {
|
|
3447
|
+
"name": "LitElement",
|
|
3448
|
+
"package": "lit"
|
|
3449
|
+
},
|
|
3450
|
+
"tagName": "kg-tabs",
|
|
3451
|
+
"customElement": true
|
|
3452
|
+
}
|
|
3453
|
+
],
|
|
3454
|
+
"exports": [
|
|
3455
|
+
{
|
|
3456
|
+
"kind": "js",
|
|
3457
|
+
"name": "kgtabs",
|
|
3458
|
+
"declaration": {
|
|
3459
|
+
"name": "kgtabs",
|
|
3460
|
+
"module": "src/components/kg-tabs.js"
|
|
3461
|
+
}
|
|
3462
|
+
},
|
|
3463
|
+
{
|
|
3464
|
+
"kind": "custom-element-definition",
|
|
3465
|
+
"name": "kg-tabs",
|
|
3466
|
+
"declaration": {
|
|
3467
|
+
"name": "kgtabs",
|
|
3468
|
+
"module": "src/components/kg-tabs.js"
|
|
3469
|
+
}
|
|
3470
|
+
}
|
|
3471
|
+
]
|
|
3472
|
+
},
|
|
3473
|
+
{
|
|
3474
|
+
"kind": "javascript-module",
|
|
3475
|
+
"path": "src/components/kg-text.js",
|
|
3476
|
+
"declarations": [
|
|
3477
|
+
{
|
|
3478
|
+
"kind": "class",
|
|
3479
|
+
"description": "",
|
|
3480
|
+
"name": "kgtext",
|
|
3481
|
+
"members": [
|
|
3482
|
+
{
|
|
3483
|
+
"kind": "field",
|
|
3484
|
+
"name": "properties",
|
|
3485
|
+
"type": {
|
|
3486
|
+
"text": "object"
|
|
3487
|
+
},
|
|
3488
|
+
"static": true,
|
|
3489
|
+
"default": "{ variant: { type: String }, // h1, h2, h3, h4, h5, h6, body, small, desc, caption color: { type: String }, // default, muted, primary, secondary, tertiary, error weight: { type: String }, // light, normal, medium, semibold, bold align: { type: String }, // left, center, right, justify as: { type: String }, // p, span, div, h1-h6 dividing: { type: Boolean }, disabled: { type: Boolean } }"
|
|
3490
|
+
},
|
|
3491
|
+
{
|
|
3492
|
+
"kind": "field",
|
|
3493
|
+
"name": "styles",
|
|
3494
|
+
"static": true,
|
|
3495
|
+
"default": "css` :host { display: block; font-family: 'Century Gothic', 'Apple Gothic', 'CenturyGothic', sans-serif; margin: 0; padding: 0; color: var(--kg-text); line-height: 1.6; } :host([as=\"span\"]) { display: inline; } .ui-text { margin: 0; padding: 0; transition: all 0.2s ease; } /* Headers */ .h1 { font-size: 2.5rem; font-weight: 700; line-height: 1.2; margin-bottom: 0.5em; } .h2 { font-size: 2rem; font-weight: 700; line-height: 1.25; margin-bottom: 0.5em; } .h3 { font-size: 1.5rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.5em; } .h4 { font-size: 1.25rem; font-weight: 700; line-height: 1.4; margin-bottom: 0.5em; } .h5 { font-size: 1.1rem; font-weight: 700; line-height: 1.4; margin-bottom: 0.5em; } .h6 { font-size: 1rem; font-weight: 700; line-height: 1.4; margin-bottom: 0.5em; } /* Body Variants */ .body { font-size: 1rem; } .small { font-size: 0.85rem; } .desc { font-size: 0.95rem; color: var(--kg-text-muted); line-height: 1.5; } .caption { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--kg-text-muted); } /* Features */ .dividing { padding-bottom: 0.25em; border-bottom: 1px solid var(--kg-border); margin-bottom: 1em; } /* Colors */ .muted { color: var(--kg-text-muted); } .primary { color: var(--kg-primary); } .secondary { color: var(--kg-secondary); } .tertiary { color: var(--kg-tertiary); } .error { color: #DB2828; } /* Weights */ .light { font-weight: 300; } .normal { font-weight: 400; } .medium { font-weight: 500; } .semibold { font-weight: 600; } .bold { font-weight: 700; } /* Alignment */ .center { text-align: center; } .right { text-align: right; } .justify { text-align: justify; } /* Disabled */ .disabled { opacity: 0.45; pointer-events: none; } /* Subheader integration if used inside or after kg-text */ ::slotted([slot=\"sub\"]) { display: block; font-weight: 400; font-size: 0.85em; color: var(--kg-text-muted); margin-top: 0.25em; } ::slotted([slot=\"icon\"]) { margin-right: 0.5em; opacity: 0.8; } .wrapper { display: flex; align-items: baseline; } `"
|
|
3496
|
+
},
|
|
3497
|
+
{
|
|
3498
|
+
"kind": "method",
|
|
3499
|
+
"name": "render"
|
|
3500
|
+
},
|
|
3501
|
+
{
|
|
3502
|
+
"kind": "field",
|
|
3503
|
+
"name": "variant",
|
|
3504
|
+
"type": {
|
|
3505
|
+
"text": "string"
|
|
3506
|
+
},
|
|
3507
|
+
"default": "'body'"
|
|
3508
|
+
},
|
|
3509
|
+
{
|
|
3510
|
+
"kind": "field",
|
|
3511
|
+
"name": "weight",
|
|
3512
|
+
"type": {
|
|
3513
|
+
"text": "string"
|
|
3514
|
+
},
|
|
3515
|
+
"default": "''"
|
|
3516
|
+
},
|
|
3517
|
+
{
|
|
3518
|
+
"kind": "field",
|
|
3519
|
+
"name": "align",
|
|
3520
|
+
"type": {
|
|
3521
|
+
"text": "string"
|
|
3522
|
+
},
|
|
3523
|
+
"default": "'left'"
|
|
3524
|
+
},
|
|
3525
|
+
{
|
|
3526
|
+
"kind": "field",
|
|
3527
|
+
"name": "dividing",
|
|
3528
|
+
"type": {
|
|
3529
|
+
"text": "boolean"
|
|
3530
|
+
},
|
|
3531
|
+
"default": "false"
|
|
3532
|
+
}
|
|
3533
|
+
],
|
|
3534
|
+
"superclass": {
|
|
3535
|
+
"name": "LitElement",
|
|
3536
|
+
"package": "lit"
|
|
3537
|
+
},
|
|
3538
|
+
"tagName": "kg-text",
|
|
3539
|
+
"customElement": true
|
|
3540
|
+
}
|
|
3541
|
+
],
|
|
3542
|
+
"exports": [
|
|
3543
|
+
{
|
|
3544
|
+
"kind": "js",
|
|
3545
|
+
"name": "kgtext",
|
|
3546
|
+
"declaration": {
|
|
3547
|
+
"name": "kgtext",
|
|
3548
|
+
"module": "src/components/kg-text.js"
|
|
3549
|
+
}
|
|
3550
|
+
},
|
|
3551
|
+
{
|
|
3552
|
+
"kind": "custom-element-definition",
|
|
3553
|
+
"name": "kg-text",
|
|
3554
|
+
"declaration": {
|
|
3555
|
+
"name": "kgtext",
|
|
3556
|
+
"module": "src/components/kg-text.js"
|
|
3557
|
+
}
|
|
3558
|
+
}
|
|
3559
|
+
]
|
|
3560
|
+
},
|
|
3561
|
+
{
|
|
3562
|
+
"kind": "javascript-module",
|
|
3563
|
+
"path": "src/components/kg-textarea.js",
|
|
3564
|
+
"declarations": [
|
|
3565
|
+
{
|
|
3566
|
+
"kind": "class",
|
|
3567
|
+
"description": "",
|
|
3568
|
+
"name": "kgtextarea",
|
|
3569
|
+
"members": [
|
|
3570
|
+
{
|
|
3571
|
+
"kind": "field",
|
|
3572
|
+
"name": "properties",
|
|
3573
|
+
"type": {
|
|
3574
|
+
"text": "object"
|
|
3575
|
+
},
|
|
3576
|
+
"static": true,
|
|
3577
|
+
"default": "{ value: { type: String }, label: { type: String }, placeholder: { type: String }, rows: { type: Number }, disabled: { type: Boolean, reflect: true }, error: { type: Boolean, reflect: true }, fullwidth: { type: Boolean, reflect: true }, inverted: { type: Boolean, reflect: true }, resize: { type: String, reflect: true } // none, both, horizontal, vertical }"
|
|
3578
|
+
},
|
|
3579
|
+
{
|
|
3580
|
+
"kind": "field",
|
|
3581
|
+
"name": "styles",
|
|
3582
|
+
"static": true,
|
|
3583
|
+
"default": "css` :host { display: inline-block; max-width: 100%; vertical-align: top; } :host([fullwidth]) { display: block; width: 100%; } /* Allow host to grow with content if resize is allowed */ :host([resize=\"both\"]), :host([resize=\"horizontal\"]) { display: inline-block; width: auto; min-width: 100px; } .kg-textarea-container { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; } .textarea-label { font-size: 0.875rem; font-weight: 600; color: var(--kg-text); opacity: 0.8; margin-left: 2px; } .ui-textarea { display: inline-flex; width: 100%; color: var(--kg-text); font-family: inherit; } .textarea-wrapper { display: flex; width: 100%; height: 100%; align-items: stretch; background: var(--kg-surface); border: 1px solid var(--kg-border); border-radius: var(--kg-radius-md, 8px); transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease; position: relative; } .textarea-wrapper:focus-within { border-color: var(--kg-primary); background: var(--kg-bg); box-shadow: 0 0 0 2px rgba(65, 171, 52, 0.2); } textarea { margin: 0; flex: 1 1 auto; outline: none; -webkit-tap-highlight-color: rgba(0,0,0,0); text-align: left; line-height: 1.5; font-family: inherit; padding: 0.75rem 1rem; background: transparent; border: none; color: inherit; min-width: 0; width: 100%; min-height: 5rem; } textarea::placeholder { color: var(--kg-text-muted); opacity: 0.6; } /* States */ .disabled { opacity: 0.45; pointer-events: none; } .error .textarea-wrapper { border-color: #DB2828; background-color: rgba(219, 40, 40, 0.02); } /* Variations */ :host([inverted]) .textarea-label { color: rgba(255, 255, 255, 0.9); } :host([inverted]) .textarea-wrapper { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.15); color: #FFFFFF; } :host([inverted]) .textarea-wrapper:focus-within { background: rgba(255, 255, 255, 0.12); border-color: var(--kg-primary); } :host([inverted]) textarea::placeholder { color: rgba(255, 255, 255, 0.5); } `"
|
|
3584
|
+
},
|
|
3585
|
+
{
|
|
3586
|
+
"kind": "method",
|
|
3587
|
+
"name": "_handleInput",
|
|
3588
|
+
"parameters": [
|
|
3589
|
+
{
|
|
3590
|
+
"name": "e"
|
|
3591
|
+
}
|
|
3592
|
+
]
|
|
3593
|
+
},
|
|
3594
|
+
{
|
|
3595
|
+
"kind": "method",
|
|
3596
|
+
"name": "render"
|
|
3597
|
+
},
|
|
3598
|
+
{
|
|
3599
|
+
"kind": "field",
|
|
3600
|
+
"name": "value",
|
|
3601
|
+
"type": {
|
|
3602
|
+
"text": "string"
|
|
3603
|
+
},
|
|
3604
|
+
"default": "''"
|
|
3605
|
+
},
|
|
3606
|
+
{
|
|
3607
|
+
"kind": "field",
|
|
3608
|
+
"name": "placeholder",
|
|
3609
|
+
"type": {
|
|
3610
|
+
"text": "string"
|
|
3611
|
+
},
|
|
3612
|
+
"default": "''"
|
|
3613
|
+
},
|
|
3614
|
+
{
|
|
3615
|
+
"kind": "field",
|
|
3616
|
+
"name": "rows",
|
|
3617
|
+
"type": {
|
|
3618
|
+
"text": "number"
|
|
3619
|
+
},
|
|
3620
|
+
"default": "3"
|
|
3621
|
+
},
|
|
3622
|
+
{
|
|
3623
|
+
"kind": "field",
|
|
3624
|
+
"name": "disabled",
|
|
3625
|
+
"type": {
|
|
3626
|
+
"text": "boolean"
|
|
3627
|
+
},
|
|
3628
|
+
"default": "false"
|
|
3629
|
+
},
|
|
3630
|
+
{
|
|
3631
|
+
"kind": "field",
|
|
3632
|
+
"name": "error",
|
|
3633
|
+
"type": {
|
|
3634
|
+
"text": "boolean"
|
|
3635
|
+
},
|
|
3636
|
+
"default": "false"
|
|
3637
|
+
},
|
|
3638
|
+
{
|
|
3639
|
+
"kind": "field",
|
|
3640
|
+
"name": "fullwidth",
|
|
3641
|
+
"type": {
|
|
3642
|
+
"text": "boolean"
|
|
3643
|
+
},
|
|
3644
|
+
"default": "false"
|
|
3645
|
+
},
|
|
3646
|
+
{
|
|
3647
|
+
"kind": "field",
|
|
3648
|
+
"name": "inverted",
|
|
3649
|
+
"type": {
|
|
3650
|
+
"text": "boolean"
|
|
3651
|
+
},
|
|
3652
|
+
"default": "false"
|
|
3653
|
+
},
|
|
3654
|
+
{
|
|
3655
|
+
"kind": "field",
|
|
3656
|
+
"name": "resize",
|
|
3657
|
+
"type": {
|
|
3658
|
+
"text": "string"
|
|
3659
|
+
},
|
|
3660
|
+
"default": "'vertical'"
|
|
3661
|
+
}
|
|
3662
|
+
],
|
|
3663
|
+
"events": [
|
|
3664
|
+
{
|
|
3665
|
+
"name": "kg-input",
|
|
3666
|
+
"type": {
|
|
3667
|
+
"text": "CustomEvent"
|
|
3668
|
+
}
|
|
3669
|
+
}
|
|
3670
|
+
],
|
|
3671
|
+
"superclass": {
|
|
3672
|
+
"name": "LitElement",
|
|
3673
|
+
"package": "lit"
|
|
3674
|
+
},
|
|
3675
|
+
"tagName": "kg-textarea",
|
|
3676
|
+
"customElement": true
|
|
3677
|
+
}
|
|
3678
|
+
],
|
|
3679
|
+
"exports": [
|
|
3680
|
+
{
|
|
3681
|
+
"kind": "js",
|
|
3682
|
+
"name": "kgtextarea",
|
|
3683
|
+
"declaration": {
|
|
3684
|
+
"name": "kgtextarea",
|
|
3685
|
+
"module": "src/components/kg-textarea.js"
|
|
3686
|
+
}
|
|
3687
|
+
},
|
|
3688
|
+
{
|
|
3689
|
+
"kind": "custom-element-definition",
|
|
3690
|
+
"name": "kg-textarea",
|
|
3691
|
+
"declaration": {
|
|
3692
|
+
"name": "kgtextarea",
|
|
3693
|
+
"module": "src/components/kg-textarea.js"
|
|
3694
|
+
}
|
|
3695
|
+
}
|
|
3696
|
+
]
|
|
3697
|
+
},
|
|
3698
|
+
{
|
|
3699
|
+
"kind": "javascript-module",
|
|
3700
|
+
"path": "src/components/kg-toast.js",
|
|
3701
|
+
"declarations": [
|
|
3702
|
+
{
|
|
3703
|
+
"kind": "class",
|
|
3704
|
+
"description": "",
|
|
3705
|
+
"name": "kgtoast",
|
|
3706
|
+
"members": [
|
|
3707
|
+
{
|
|
3708
|
+
"kind": "field",
|
|
3709
|
+
"name": "properties",
|
|
3710
|
+
"type": {
|
|
3711
|
+
"text": "object"
|
|
3712
|
+
},
|
|
3713
|
+
"static": true,
|
|
3714
|
+
"default": "{ color: { type: String, reflect: true }, title: { type: String }, message: { type: String }, duration: { type: Number }, visible: { type: Boolean, reflect: true }, }"
|
|
3715
|
+
},
|
|
3716
|
+
{
|
|
3717
|
+
"kind": "field",
|
|
3718
|
+
"name": "styles",
|
|
3719
|
+
"static": true,
|
|
3720
|
+
"default": "css` :host { --toast-accent: var(--kg-secondary); display: block; pointer-events: none; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); opacity: 0; transform: translateY(-20px) scale(0.95); margin-bottom: 0.75rem; } :host([visible]) { opacity: 1; transform: translateY(0) scale(1); } .toast-container { pointer-events: auto; min-width: 260px; max-width: 320px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: var(--kg-radius-md, 8px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); padding: 0.8rem 1rem; display: flex; flex-direction: column; gap: 0.2rem; position: relative; border-left: 5px solid var(--toast-accent); transition: all 0.3s ease; } .toast-header { font-weight: 700; font-size: 0.95rem; display: flex; justify-content: space-between; align-items: center; padding-right: 1.5rem; color: var(--toast-text-color, var(--kg-text)); } .toast-message { font-size: 0.85rem; line-height: 1.4; color: var(--toast-text-color, var(--kg-text)); opacity: 0.85; } .close-btn { position: absolute; top: 0.4rem; right: 0.4rem; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0.5; font-size: 0.8rem; transition: all 0.2s; border-radius: 50%; color: var(--toast-text-color, var(--kg-text)); } .close-btn:hover { opacity: 1; background: rgba(255, 255, 255, 0.1); } /* Glassmorphic Vibrant Colors */ :host([color=\"primary\"]) { --toast-accent: var(--kg-primary); --toast-bg: rgba(65, 171, 52, 0.15); --toast-text-color: #2b7122; } :host([color=\"secondary\"]) { --toast-accent: var(--kg-secondary); --toast-bg: rgba(19, 103, 255, 0.12); --toast-text-color: #0d46ad; } :host([color=\"tertiary\"]) { --toast-accent: var(--kg-tertiary); --toast-bg: rgba(251, 177, 64, 0.18); --toast-text-color: #8c5a00; } :host([color=\"error\"]) { --toast-accent: #DB2828; --toast-bg: rgba(219, 40, 40, 0.12); --toast-text-color: #b21e1e; } .toast-container { background-color: var(--toast-bg); } /* Dark Mode Text Adjustments */ :host-context([data-theme='dark']) { --toast-text-color: white; } :host-context([data-theme='dark']) :host([color=\"primary\"]) { --toast-bg: rgba(65, 171, 52, 0.25); } :host-context([data-theme='dark']) :host([color=\"secondary\"]) { --toast-bg: rgba(19, 103, 255, 0.2); } :host-context([data-theme='dark']) :host([color=\"tertiary\"]) { --toast-bg: rgba(251, 177, 64, 0.3); } :host-context([data-theme='dark']) :host([color=\"error\"]) { --toast-bg: rgba(219, 40, 40, 0.25); } /* Dark Mode Adjustment */ :host-context([data-theme='dark']) .toast-container { box-shadow: 0 15px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05) inset; } `"
|
|
3721
|
+
},
|
|
3722
|
+
{
|
|
3723
|
+
"kind": "method",
|
|
3724
|
+
"name": "close"
|
|
3725
|
+
},
|
|
3726
|
+
{
|
|
3727
|
+
"kind": "method",
|
|
3728
|
+
"name": "render"
|
|
3729
|
+
},
|
|
3730
|
+
{
|
|
3731
|
+
"kind": "field",
|
|
3732
|
+
"name": "duration",
|
|
3733
|
+
"type": {
|
|
3734
|
+
"text": "number"
|
|
3735
|
+
},
|
|
3736
|
+
"default": "3000"
|
|
3737
|
+
},
|
|
3738
|
+
{
|
|
3739
|
+
"kind": "field",
|
|
3740
|
+
"name": "visible",
|
|
3741
|
+
"type": {
|
|
3742
|
+
"text": "boolean"
|
|
3743
|
+
},
|
|
3744
|
+
"default": "false"
|
|
3745
|
+
},
|
|
3746
|
+
{
|
|
3747
|
+
"kind": "field",
|
|
3748
|
+
"name": "color",
|
|
3749
|
+
"type": {
|
|
3750
|
+
"text": "string"
|
|
3751
|
+
},
|
|
3752
|
+
"default": "'secondary'"
|
|
3753
|
+
},
|
|
3754
|
+
{
|
|
3755
|
+
"kind": "field",
|
|
3756
|
+
"name": "_timerId",
|
|
3757
|
+
"type": {
|
|
3758
|
+
"text": "null"
|
|
3759
|
+
},
|
|
3760
|
+
"default": "null"
|
|
3761
|
+
}
|
|
3762
|
+
],
|
|
3763
|
+
"events": [
|
|
3764
|
+
{
|
|
3765
|
+
"name": "kg-close",
|
|
3766
|
+
"type": {
|
|
3767
|
+
"text": "CustomEvent"
|
|
3768
|
+
}
|
|
3769
|
+
}
|
|
3770
|
+
],
|
|
3771
|
+
"superclass": {
|
|
3772
|
+
"name": "LitElement",
|
|
3773
|
+
"package": "lit"
|
|
3774
|
+
},
|
|
3775
|
+
"tagName": "kg-toast",
|
|
3776
|
+
"customElement": true
|
|
3777
|
+
},
|
|
3778
|
+
{
|
|
3779
|
+
"kind": "variable",
|
|
3780
|
+
"name": "toast",
|
|
3781
|
+
"type": {
|
|
3782
|
+
"text": "object"
|
|
3783
|
+
},
|
|
3784
|
+
"default": "{ show(options) { const position = options.position || 'top-right'; let container = document.querySelector(`.kg-toast-container.${position}`); if (!container) { container = document.createElement('div'); container.className = `kg-toast-container ${position}`; const isTop = position.includes('top'); const isBottom = position.includes('bottom'); const isLeft = position.includes('left'); const isMiddle = position.includes('middle') || position.includes('center'); let style = ` position: fixed; z-index: 99999; display: flex; flex-direction: column; pointer-events: none; width: 340px; ${isTop ? 'top: 1.5rem;' : 'bottom: 1.5rem;'} ${isBottom ? 'flex-direction: column-reverse;' : ''} `; if (isMiddle) { style += ` left: 50%; transform: translateX(-50%); align-items: center; `; } else if (isLeft) { style += 'left: 1.5rem;'; } else { style += 'right: 1.5rem;'; } container.setAttribute('style', style); document.body.appendChild(container); } const toastEl = document.createElement('kg-toast'); toastEl.title = options.title || 'Notification'; toastEl.message = options.message || ''; toastEl.color = options.color || 'secondary'; toastEl.duration = options.duration !== undefined ? options.duration : 4000; container.appendChild(toastEl); // Tiny delay to ensure the addition is rendered before animating requestAnimationFrame(() => { requestAnimationFrame(() => { toastEl.visible = true; }); }); toastEl.addEventListener('kg-close', () => { setTimeout(() => { if (toastEl.parentNode === container) { toastEl.remove(); } if (container.children.length === 0) { container.remove(); } }, 400); }); }, success(title, message) { this.show({ title, message, color: 'primary' }); }, error(title, message) { this.show({ title, message, color: 'error' }); }, info(title, message) { this.show({ title, message, color: 'secondary' }); }, warning(title, message) { this.show({ title, message, color: 'tertiary' }); } }"
|
|
3785
|
+
}
|
|
3786
|
+
],
|
|
3787
|
+
"exports": [
|
|
3788
|
+
{
|
|
3789
|
+
"kind": "js",
|
|
3790
|
+
"name": "kgtoast",
|
|
3791
|
+
"declaration": {
|
|
3792
|
+
"name": "kgtoast",
|
|
3793
|
+
"module": "src/components/kg-toast.js"
|
|
3794
|
+
}
|
|
3795
|
+
},
|
|
3796
|
+
{
|
|
3797
|
+
"kind": "custom-element-definition",
|
|
3798
|
+
"name": "kg-toast",
|
|
3799
|
+
"declaration": {
|
|
3800
|
+
"name": "kgtoast",
|
|
3801
|
+
"module": "src/components/kg-toast.js"
|
|
3802
|
+
}
|
|
3803
|
+
},
|
|
3804
|
+
{
|
|
3805
|
+
"kind": "js",
|
|
3806
|
+
"name": "toast",
|
|
3807
|
+
"declaration": {
|
|
3808
|
+
"name": "toast",
|
|
3809
|
+
"module": "src/components/kg-toast.js"
|
|
3810
|
+
}
|
|
3811
|
+
}
|
|
3812
|
+
]
|
|
3813
|
+
}
|
|
3814
|
+
]
|
|
3815
|
+
}
|