@logosphere-ui/core 0.0.0-alpha.28 → 0.0.0-alpha.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/{chatbot-CwHf1eku.cjs → chatbot-BUYrJbTR.cjs} +1 -1
  2. package/dist/{chatbot-C2ileads.js → chatbot-Cb2ByNkE.js} +2 -2
  3. package/dist/chatbot.cjs +1 -1
  4. package/dist/chatbot.js +1 -1
  5. package/dist/{combobox-Cr6GM34H.js → combobox-G4TVTGS7.js} +1 -1
  6. package/dist/{combobox-D-czaZJp.cjs → combobox-kdjsT5eX.cjs} +1 -1
  7. package/dist/combobox.cjs +1 -1
  8. package/dist/combobox.js +1 -1
  9. package/dist/{datepicker-BXVXSlQE.cjs → datepicker-Cf3gLMsu.cjs} +1 -1
  10. package/dist/{datepicker-VKOb2Ugl.js → datepicker-n5dZbuCD.js} +1 -1
  11. package/dist/datepicker.cjs +1 -1
  12. package/dist/datepicker.js +1 -1
  13. package/dist/formfield-CRcyUMvQ.cjs +33 -0
  14. package/dist/{formfield-BKzHa2GA.js → formfield-O327HYt0.js} +6 -6
  15. package/dist/formfield.cjs +1 -1
  16. package/dist/formfield.js +1 -1
  17. package/dist/index.cjs +1 -119
  18. package/dist/index.js +47 -358
  19. package/dist/index.umd.js +31 -31
  20. package/dist/{input-CnogTmTf.js → input-BJtn_iTC.js} +1 -1
  21. package/dist/{input-D-FMDWyw.cjs → input-DPTTu8ZR.cjs} +1 -1
  22. package/dist/input.cjs +1 -1
  23. package/dist/input.js +1 -1
  24. package/dist/left-menu.cjs +1 -1
  25. package/dist/left-menu.js +1 -1
  26. package/dist/{leftmenu-C90G5yoR.js → leftmenu-DpES_nr1.js} +1 -1
  27. package/dist/{leftmenu-DRJDdM_-.cjs → leftmenu-RcrjiF7g.cjs} +1 -1
  28. package/dist/{text-area-DFwnyopP.cjs → text-area-BztUgBL1.cjs} +1 -1
  29. package/dist/{text-area-BMtZEphr.js → text-area-DUg5BGQh.js} +1 -1
  30. package/dist/textarea.cjs +1 -1
  31. package/dist/textarea.js +1 -1
  32. package/dist/timepicker-BKUTi_AU.js +316 -0
  33. package/dist/timepicker-CRtoPBMn.cjs +119 -0
  34. package/dist/timepicker.cjs +1 -0
  35. package/dist/timepicker.js +4 -0
  36. package/package.json +1 -1
  37. package/dist/formfield-DguRklXe.cjs +0 -33
package/dist/index.js CHANGED
@@ -1,360 +1,49 @@
1
- import { B as C } from "./button-Uu9oaieg.js";
2
- import { L as z } from "./badge-BD_MRIBd.js";
3
- import { C as E } from "./checkbox-g6kl2jGR.js";
4
- import { F as I } from "./formfield-BKzHa2GA.js";
5
- import { S as V } from "./switch-DNqPqH-R.js";
6
- import { B } from "./breadcrumb-BB61Xt0s.js";
7
- import { C as H } from "./card-CAAhjIjf.js";
8
- import { L as F } from "./input-CnogTmTf.js";
9
- import { P as N } from "./popover-BSfKsQni.js";
10
- import { T as U } from "./text-area-BMtZEphr.js";
11
- import { unsafeCSS as d, css as _, LitElement as m, html as h } from "lit";
12
- import { property as o, state as c, query as u, customElement as v } from "lit/decorators.js";
13
- import { createPopper as b } from "@popperjs/core";
14
- import "./ui-icon-DrrH0WhF.js";
15
- import { L as J } from "./chatbot-C2ileads.js";
16
- import { L as R } from "./calendar-CBJ4mtlE.js";
17
- import { C as X } from "./combobox-Cr6GM34H.js";
18
- import { L as Z } from "./datepicker-VKOb2Ugl.js";
19
- import { D as te } from "./drawer-CViKfr6O.js";
20
- import { D as re } from "./download-manager-BPg-6Qfg.js";
21
- import { L as se, a as ne } from "./leftmenu-C90G5yoR.js";
22
- import { M as pe } from "./modal-DHzMgFVY.js";
23
- import { L as ce, a as he, T as ue } from "./toast-container-CHrtU7X5.js";
24
- import { L as _e } from "./tab-Ca_OyNqQ.js";
25
- import { T as ve } from "./tree-menu-5dkAPsgJ.js";
26
- const g = ":host{display:block;width:100%}.timepicker__reference{display:block;width:100%}.timepicker__trigger{border:none;background:transparent;color:var(--color-tertiary);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0;flex-shrink:0;height:100%;min-height:32px;outline:none;border-radius:0 var(--radius-base) var(--radius-base) 0;transition:color var(--transition-speed-fast) var(--transition-timing),background-color var(--transition-speed-fast) var(--transition-timing)}.timepicker__trigger:hover{color:var(--color-body-text);background-color:var(--color-body-bg-hover)}.timepicker__trigger--active{color:var(--color-body-text)}.timepicker__trigger:disabled{pointer-events:none;opacity:.4}.timepicker__popup[popover]{position:fixed;inset:unset;margin:0;padding:0;border:none;width:240px;background-color:var(--color-body-bg);border-radius:12px;box-shadow:0 4px 16px #7878783d;overflow:hidden;z-index:var(--z-index-dropdown, 1000)}.timepicker__spinner{display:flex;flex-direction:row;align-items:stretch;padding:var(--spacing-1) var(--spacing-2)}.timepicker__col{flex:1;display:flex;flex-direction:column;padding:0px var(--spacing-5)}.timepicker__col--left{align-items:flex-start}.timepicker__col--right{align-items:flex-end}.timepicker__col--sep{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 var(--spacing-1)}.timepicker__spin-btn{height:32px;display:flex;align-items:center;justify-content:center;border:none;padding:var(--spacing-2);background:transparent;color:var(--color-secondary);border-radius:var(--radius-base);cursor:pointer;outline:none;box-sizing:border-box;transition:background-color var(--transition-speed-fast) var(--transition-timing),color var(--transition-speed-fast) var(--transition-timing)}.timepicker__spin-btn:hover{background-color:var(--color-body-bg-hover);color:var(--color-body-text)}.timepicker__spin-btn:active{background-color:var(--color-body-bg-active)}.timepicker__time-unit{height:32px;display:flex;align-items:center;justify-content:center;font-size:14px;font-family:var(--font-family-base);font-weight:var(--font-weight-regular);line-height:1.25rem;letter-spacing:-.14px;color:var(--color-body-text);text-align:center;box-sizing:border-box;padding:var(--spacing-2)}.timepicker__colon{height:32px;display:flex;align-items:center;justify-content:center;font-size:16px;font-family:var(--font-family-base);font-weight:var(--font-weight-medium);color:var(--color-secondary)}.timepicker__actions{display:flex;align-items:center;padding:var(--spacing-2);border-top:1px solid var(--color-border);gap:var(--spacing-1)}.timepicker__action-btn{flex:1 0 0;min-width:0;height:32px;display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;color:var(--color-secondary);border-radius:var(--radius-full);cursor:pointer;padding:var(--spacing-2);outline:none;transition:background-color var(--transition-speed-fast) var(--transition-timing),color var(--transition-speed-fast) var(--transition-timing)}.timepicker__action-btn:hover{background-color:var(--color-body-bg-hover);color:var(--color-body-text)}.timepicker__action-btn:active{background-color:var(--color-body-bg-active)}";
27
- var f = Object.defineProperty, k = Object.getOwnPropertyDescriptor, i = (e, r, n, a) => {
28
- for (var s = a > 1 ? void 0 : a ? k(r, n) : r, p = e.length - 1, l; p >= 0; p--)
29
- (l = e[p]) && (s = (a ? l(r, n, s) : l(s)) || s);
30
- return a && s && f(r, n, s), s;
31
- };
32
- let t = class extends m {
33
- constructor() {
34
- super(...arguments), this.value = "", this.label = "", this.helper = "", this.error = "", this.placeholder = "__:__", this.required = !1, this.disabled = !1, this.readonly = !1, this.size = "default", this.variant = "default", this._isOpen = !1, this._hour = 0, this._minute = 0, this._handleOutsideClick = (e) => {
35
- this._isOpen && !e.composedPath().includes(this) && (this._isOpen = !1);
36
- }, this._handleInputChange = (e) => {
37
- e.stopPropagation();
38
- const r = e.detail?.value ?? "";
39
- if (/^\d{2}:\d{2}$/.test(r)) {
40
- const [n, a] = this._parseValue(r);
41
- this._hour = n, this._minute = a;
42
- const s = `${this._pad(n)}:${this._pad(a)}`;
43
- this.value = s, this._emit(s);
44
- }
45
- }, this._handleInputClear = (e) => {
46
- e.stopPropagation(), this.value = "", this._hour = 0, this._minute = 0, this._emit(""), this.dispatchEvent(new CustomEvent("clear", { bubbles: !0, composed: !0 })), this._isOpen = !1;
47
- }, this._incrementHour = () => {
48
- this._hour = (this._hour + 1) % 24, this._syncValue();
49
- }, this._decrementHour = () => {
50
- this._hour = (this._hour - 1 + 24) % 24, this._syncValue();
51
- }, this._incrementMinute = () => {
52
- this._minute = (this._minute + 1) % 60, this._syncValue();
53
- }, this._decrementMinute = () => {
54
- this._minute = (this._minute - 1 + 60) % 60, this._syncValue();
55
- };
56
- }
57
- // ── Lifecycle ───────────────────────────────────────────────────────────────
58
- connectedCallback() {
59
- super.connectedCallback(), document.addEventListener("click", this._handleOutsideClick);
60
- }
61
- disconnectedCallback() {
62
- super.disconnectedCallback(), document.removeEventListener("click", this._handleOutsideClick), this._destroyPopper();
63
- }
64
- willUpdate(e) {
65
- if (e.has("value") && /^\d{1,2}:\d{2}$/.test(this.value)) {
66
- const [r, n] = this._parseValue(this.value);
67
- this._hour = r, this._minute = n;
68
- }
69
- }
70
- updated(e) {
71
- e.has("_isOpen") && (this._isOpen ? this.updateComplete.then(() => {
72
- this._showPopover(), this._updatePopper();
73
- }) : (this._hidePopover(), this._destroyPopper()));
74
- }
75
- // ── Value helpers ───────────────────────────────────────────────────────────
76
- _parseValue(e) {
77
- const r = e.match(/^(\d{1,2}):(\d{2})$/);
78
- return r ? [
79
- Math.min(23, Math.max(0, parseInt(r[1], 10))),
80
- Math.min(59, Math.max(0, parseInt(r[2], 10)))
81
- ] : [0, 0];
82
- }
83
- _pad(e) {
84
- return String(e).padStart(2, "0");
85
- }
86
- // ── Popper / Popover ────────────────────────────────────────────────────────
87
- _updatePopper() {
88
- !this._referenceEl || !this._popupEl || (this._popperInstance = b(this._referenceEl, this._popupEl, {
89
- placement: "bottom-start",
90
- modifiers: [
91
- { name: "offset", options: { offset: [0, 4] } },
92
- { name: "flip", options: { fallbackPlacements: ["top-start"] } },
93
- {
94
- name: "preventOverflow",
95
- options: { boundary: document.documentElement, padding: 8 }
96
- }
97
- ]
98
- }));
99
- }
100
- _destroyPopper() {
101
- this._popperInstance?.destroy(), this._popperInstance = void 0;
102
- }
103
- _showPopover() {
104
- this._popupEl?.showPopover?.();
105
- }
106
- _hidePopover() {
107
- const e = this._popupEl;
108
- try {
109
- e?.hidePopover?.();
110
- } catch {
111
- }
112
- }
113
- _togglePopup() {
114
- if (!(this.disabled || this.readonly))
115
- if (this._isOpen)
116
- this._isOpen = !1;
117
- else {
118
- const [e, r] = this._parseValue(this.value);
119
- this._hour = e, this._minute = r, this._isOpen = !0;
120
- }
121
- }
122
- _clearValue(e) {
123
- e?.stopPropagation(), this.value = "", this._hour = 0, this._minute = 0, this._emit(""), this.dispatchEvent(new CustomEvent("clear", { bubbles: !0, composed: !0 })), this._isOpen = !1;
124
- }
125
- _setNow() {
126
- const e = /* @__PURE__ */ new Date();
127
- this._hour = e.getHours(), this._minute = e.getMinutes(), this._syncValue();
128
- }
129
- _emit(e) {
130
- this.onChange?.(e), this.dispatchEvent(new CustomEvent("change", {
131
- bubbles: !0,
132
- composed: !0,
133
- detail: { value: e }
134
- }));
135
- }
136
- _syncValue() {
137
- const e = `${this._pad(this._hour)}:${this._pad(this._minute)}`;
138
- this.value = e, this._emit(e);
139
- }
140
- _startSpin(e) {
141
- e(), this._spinInterval = setInterval(e, 120);
142
- }
143
- _stopSpin() {
144
- clearInterval(this._spinInterval), this._spinInterval = void 0;
145
- }
146
- // ── Render ──────────────────────────────────────────────────────────────────
147
- _renderPopup() {
148
- return h`
149
- <div data-timepicker-popup popover="manual" class="timepicker__popup">
150
- <div class="timepicker__spinner">
151
- <!-- Sol sütun: saat -->
152
- <div class="timepicker__col timepicker__col--left">
153
- <button
154
- class="timepicker__spin-btn"
155
- @mousedown=${() => this._startSpin(this._incrementHour)}
156
- @mouseup=${this._stopSpin}
157
- @mouseleave=${this._stopSpin}
158
- @touchstart=${(e) => {
159
- e.preventDefault(), this._startSpin(this._incrementHour);
160
- }}
161
- @touchend=${this._stopSpin}
162
- tabindex="-1"
163
- aria-label="Saat artır"
164
- ><ui-icon name="uil-arrow-up" size="16"></ui-icon></button>
165
- <div class="timepicker__time-unit">${this._pad(this._hour)}</div>
166
- <button
167
- class="timepicker__spin-btn"
168
- @mousedown=${() => this._startSpin(this._decrementHour)}
169
- @mouseup=${this._stopSpin}
170
- @mouseleave=${this._stopSpin}
171
- @touchstart=${(e) => {
172
- e.preventDefault(), this._startSpin(this._decrementHour);
173
- }}
174
- @touchend=${this._stopSpin}
175
- tabindex="-1"
176
- aria-label="Saat azalt"
177
- ><ui-icon name="uil-arrow-down" size="16"></ui-icon></button>
178
- </div>
179
-
180
- <!-- Orta sütun: iki nokta -->
181
- <div class="timepicker__col timepicker__col--sep">
182
- <div class="timepicker__colon">:</div>
183
- </div>
184
-
185
- <!-- Sağ sütun: dakika -->
186
- <div class="timepicker__col timepicker__col--right">
187
- <button
188
- class="timepicker__spin-btn"
189
- @mousedown=${() => this._startSpin(this._incrementMinute)}
190
- @mouseup=${this._stopSpin}
191
- @mouseleave=${this._stopSpin}
192
- @touchstart=${(e) => {
193
- e.preventDefault(), this._startSpin(this._incrementMinute);
194
- }}
195
- @touchend=${this._stopSpin}
196
- tabindex="-1"
197
- aria-label="Dakika artır"
198
- ><ui-icon name="uil-arrow-up" size="16"></ui-icon></button>
199
- <div class="timepicker__time-unit">${this._pad(this._minute)}</div>
200
- <button
201
- class="timepicker__spin-btn"
202
- @mousedown=${() => this._startSpin(this._decrementMinute)}
203
- @mouseup=${this._stopSpin}
204
- @mouseleave=${this._stopSpin}
205
- @touchstart=${(e) => {
206
- e.preventDefault(), this._startSpin(this._decrementMinute);
207
- }}
208
- @touchend=${this._stopSpin}
209
- tabindex="-1"
210
- aria-label="Dakika azalt"
211
- ><ui-icon name="uil-arrow-down" size="16"></ui-icon></button>
212
- </div>
213
- </div>
214
-
215
- <!-- Action buttons -->
216
- <div class="timepicker__actions">
217
- <button
218
- class="timepicker__action-btn"
219
- @click=${this._setNow}
220
- title="Şu anki saati seç"
221
- >
222
- <ui-icon name="uil-calendar-alt" size="16"></ui-icon>
223
- </button>
224
- <button
225
- class="timepicker__action-btn"
226
- @click=${() => this._clearValue()}
227
- title="Temizle"
228
- >
229
- <ui-icon name="uil-trash" size="16"></ui-icon>
230
- </button>
231
- <button
232
- class="timepicker__action-btn"
233
- @click=${() => {
234
- this._isOpen = !1;
235
- }}
236
- title="Kapat"
237
- >
238
- <ui-icon name="uil-times" size="16"></ui-icon>
239
- </button>
240
- </div>
241
- </div>
242
- `;
243
- }
244
- render() {
245
- return h`
246
- <div class="timepicker__reference">
247
- <logosphere-input
248
- .label=${this.label}
249
- .helper=${this.helper}
250
- .error=${this.error}
251
- .required=${this.required}
252
- .disabled=${this.disabled}
253
- .readonly=${this.readonly}
254
- .size=${this.size}
255
- .variant=${this.variant}
256
- .placeholder=${this.placeholder}
257
- .value=${this.value}
258
- mask="00:00"
259
- @input=${this._handleInputChange}
260
- @clear=${this._handleInputClear}
261
- @change=${(e) => e.stopPropagation()}
262
- >
263
- <button
264
- slot="suffix"
265
- type="button"
266
- class="timepicker__trigger ${this._isOpen ? "timepicker__trigger--active" : ""}"
267
- @click=${this._togglePopup}
268
- ?disabled=${this.disabled}
269
- tabindex=${this.disabled ? "-1" : "0"}
270
- aria-label="Saat seç"
271
- aria-expanded=${this._isOpen ? "true" : "false"}
272
- >
273
- <ui-icon name="uil-clock" size="16"></ui-icon>
274
- </button>
275
- </logosphere-input>
276
- </div>
277
-
278
- ${this._renderPopup()}
279
- `;
280
- }
281
- };
282
- t.styles = [_`${d(g)}`];
283
- i([
284
- o({ type: String })
285
- ], t.prototype, "value", 2);
286
- i([
287
- o({ type: String })
288
- ], t.prototype, "label", 2);
289
- i([
290
- o({ type: String })
291
- ], t.prototype, "helper", 2);
292
- i([
293
- o({ type: String })
294
- ], t.prototype, "error", 2);
295
- i([
296
- o({ type: String })
297
- ], t.prototype, "placeholder", 2);
298
- i([
299
- o({ type: Boolean })
300
- ], t.prototype, "required", 2);
301
- i([
302
- o({ type: Boolean })
303
- ], t.prototype, "disabled", 2);
304
- i([
305
- o({ type: Boolean })
306
- ], t.prototype, "readonly", 2);
307
- i([
308
- o({ type: String })
309
- ], t.prototype, "size", 2);
310
- i([
311
- o({ type: String })
312
- ], t.prototype, "variant", 2);
313
- i([
314
- o({ attribute: !1 })
315
- ], t.prototype, "onChange", 2);
316
- i([
317
- c()
318
- ], t.prototype, "_isOpen", 2);
319
- i([
320
- c()
321
- ], t.prototype, "_hour", 2);
322
- i([
323
- c()
324
- ], t.prototype, "_minute", 2);
325
- i([
326
- u(".timepicker__reference")
327
- ], t.prototype, "_referenceEl", 2);
328
- i([
329
- u("[data-timepicker-popup]")
330
- ], t.prototype, "_popupEl", 2);
331
- t = i([
332
- v("logosphere-timepicker")
333
- ], t);
1
+ import { B as e } from "./button-Uu9oaieg.js";
2
+ import { L as t } from "./badge-BD_MRIBd.js";
3
+ import { C as p } from "./checkbox-g6kl2jGR.js";
4
+ import { F as x } from "./formfield-O327HYt0.js";
5
+ import { S as L } from "./switch-DNqPqH-R.js";
6
+ import { B as n } from "./breadcrumb-BB61Xt0s.js";
7
+ import { C as g } from "./card-CAAhjIjf.js";
8
+ import { L as d } from "./input-BJtn_iTC.js";
9
+ import { P as c } from "./popover-BSfKsQni.js";
10
+ import { T as B } from "./text-area-DUg5BGQh.js";
11
+ import { T as b } from "./timepicker-BKUTi_AU.js";
12
+ import { L as D } from "./chatbot-Cb2ByNkE.js";
13
+ import { L as k } from "./calendar-CBJ4mtlE.js";
14
+ import { C as F } from "./combobox-G4TVTGS7.js";
15
+ import { L as v } from "./datepicker-n5dZbuCD.js";
16
+ import { D as A } from "./drawer-CViKfr6O.js";
17
+ import { D as j } from "./download-manager-BPg-6Qfg.js";
18
+ import { L as y, a as z } from "./leftmenu-DpES_nr1.js";
19
+ import { M as H } from "./modal-DHzMgFVY.js";
20
+ import { L as K, a as N, T as O } from "./toast-container-CHrtU7X5.js";
21
+ import { L as R } from "./tab-Ca_OyNqQ.js";
22
+ import { T as V } from "./tree-menu-5dkAPsgJ.js";
334
23
  export {
335
- B as Breadcrumb,
336
- C as Button,
337
- H as Card,
338
- E as Checkbox,
339
- X as Combobox,
340
- re as DownloadManager,
341
- te as Drawer,
342
- I as FormField,
343
- se as LeftMenu,
344
- ne as LeftMenuItemElement,
345
- z as LogosphereBadge,
346
- R as LogosphereCalendar,
347
- J as LogosphereChatBot,
348
- Z as LogosphereDatePicker,
349
- F as LogosphereInput,
350
- _e as LogosphereTab,
351
- ce as LogosphereToast,
352
- he as LogosphereToastContainer,
353
- pe as Modal,
354
- N as Popover,
355
- V as Switch,
356
- U as TextArea,
357
- t as TimePicker,
358
- ue as ToastService,
359
- ve as TreeMenu
24
+ n as Breadcrumb,
25
+ e as Button,
26
+ g as Card,
27
+ p as Checkbox,
28
+ F as Combobox,
29
+ j as DownloadManager,
30
+ A as Drawer,
31
+ x as FormField,
32
+ y as LeftMenu,
33
+ z as LeftMenuItemElement,
34
+ t as LogosphereBadge,
35
+ k as LogosphereCalendar,
36
+ D as LogosphereChatBot,
37
+ v as LogosphereDatePicker,
38
+ d as LogosphereInput,
39
+ R as LogosphereTab,
40
+ K as LogosphereToast,
41
+ N as LogosphereToastContainer,
42
+ H as Modal,
43
+ c as Popover,
44
+ L as Switch,
45
+ B as TextArea,
46
+ b as TimePicker,
47
+ O as ToastService,
48
+ V as TreeMenu
360
49
  };