@logosphere-ui/core 0.0.0-alpha.3 → 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 (150) hide show
  1. package/AGENTS.md +1118 -0
  2. package/dist/AGENTS.md +1118 -0
  3. package/dist/atoms/Badge/badge.d.ts +1 -1
  4. package/dist/atoms/FormField/formfield.d.ts +10 -0
  5. package/dist/badge-BD_MRIBd.js +72 -0
  6. package/dist/badge-BV2hTvrI.cjs +13 -0
  7. package/dist/badge.cjs +1 -1
  8. package/dist/badge.js +1 -1
  9. package/dist/{breadcrumb-B-4yqoJZ.js → breadcrumb-BB61Xt0s.js} +3 -3
  10. package/dist/breadcrumb.js +1 -1
  11. package/dist/button-DRZ4sG4T.cjs +10 -0
  12. package/dist/button-Uu9oaieg.js +58 -0
  13. package/dist/button.cjs +1 -1
  14. package/dist/button.js +1 -1
  15. package/dist/calendar-CBJ4mtlE.js +652 -0
  16. package/dist/calendar-Coc9E6lD.cjs +88 -0
  17. package/dist/calendar.cjs +1 -0
  18. package/dist/calendar.js +4 -0
  19. package/dist/card-BD8FkSTi.cjs +43 -0
  20. package/dist/{card-CUhlTJyJ.js → card-CAAhjIjf.js} +26 -25
  21. package/dist/card.cjs +1 -1
  22. package/dist/card.js +1 -1
  23. package/dist/chatbot-BUYrJbTR.cjs +183 -0
  24. package/dist/chatbot-Cb2ByNkE.js +564 -0
  25. package/dist/chatbot.cjs +1 -1
  26. package/dist/chatbot.js +2 -2
  27. package/dist/{checkbox-7Rb3WKGx.js → checkbox-g6kl2jGR.js} +4 -4
  28. package/dist/checkbox.js +1 -1
  29. package/dist/combobox-G4TVTGS7.js +387 -0
  30. package/dist/combobox-kdjsT5eX.cjs +107 -0
  31. package/dist/combobox.cjs +1 -1
  32. package/dist/combobox.js +1 -1
  33. package/dist/datepicker-Cf3gLMsu.cjs +85 -0
  34. package/dist/datepicker-n5dZbuCD.js +375 -0
  35. package/dist/datepicker.cjs +1 -1
  36. package/dist/datepicker.js +2 -2
  37. package/dist/{download-manager-A4fOxGWJ.js → download-manager-BPg-6Qfg.js} +4 -4
  38. package/dist/download-manager-DDeTYRPs.cjs +97 -0
  39. package/dist/download-manager.cjs +1 -1
  40. package/dist/download-manager.js +1 -1
  41. package/dist/drawer-CViKfr6O.js +114 -0
  42. package/dist/drawer-CjM-vX41.cjs +32 -0
  43. package/dist/drawer.cjs +1 -0
  44. package/dist/drawer.js +4 -0
  45. package/dist/formfield-CRcyUMvQ.cjs +33 -0
  46. package/dist/formfield-O327HYt0.js +154 -0
  47. package/dist/formfield.cjs +1 -1
  48. package/dist/formfield.js +1 -1
  49. package/dist/index.cjs +1 -1
  50. package/dist/index.d.ts +6 -0
  51. package/dist/index.js +43 -28
  52. package/dist/index.umd.js +1029 -512
  53. package/dist/input-BJtn_iTC.js +257 -0
  54. package/dist/input-DPTTu8ZR.cjs +59 -0
  55. package/dist/input.cjs +1 -1
  56. package/dist/input.js +1 -1
  57. package/dist/left-menu.cjs +1 -0
  58. package/dist/left-menu.js +5 -0
  59. package/dist/leftmenu-DpES_nr1.js +301 -0
  60. package/dist/leftmenu-RcrjiF7g.cjs +83 -0
  61. package/dist/modal-CsEaHz0h.cjs +84 -0
  62. package/dist/modal-DHzMgFVY.js +250 -0
  63. package/dist/modal.cjs +1 -1
  64. package/dist/modal.js +1 -1
  65. package/dist/molecules/Input/input.d.ts +7 -1
  66. package/dist/molecules/Pagination/index.d.ts +1 -0
  67. package/dist/molecules/Pagination/pagination.d.ts +60 -0
  68. package/dist/molecules/Popover/popover.d.ts +1 -0
  69. package/dist/molecules/Textarea/text-area.d.ts +5 -2
  70. package/dist/molecules/TimePicker/index.d.ts +2 -0
  71. package/dist/molecules/TimePicker/timepicker.d.ts +62 -0
  72. package/dist/organisms/Calendar/calendar.d.ts +54 -0
  73. package/dist/organisms/Calendar/index.d.ts +1 -0
  74. package/dist/organisms/Calendar/shared.d.ts +9 -0
  75. package/dist/organisms/Chatbot/chatbot.d.ts +10 -1
  76. package/dist/organisms/Chatbot/index.d.ts +1 -1
  77. package/dist/organisms/Combobox/combobox.d.ts +19 -0
  78. package/dist/organisms/DatePicker/datepicker.d.ts +33 -33
  79. package/dist/organisms/Drawer/drawer.d.ts +30 -0
  80. package/dist/organisms/Drawer/index.d.ts +1 -0
  81. package/dist/organisms/LeftMenu/index.d.ts +2 -0
  82. package/dist/organisms/LeftMenu/leftmenu-item.d.ts +14 -0
  83. package/dist/organisms/LeftMenu/leftmenu.d.ts +45 -0
  84. package/dist/organisms/Modal/modal.d.ts +29 -4
  85. package/dist/organisms/Toast/index.d.ts +2 -0
  86. package/dist/organisms/Toast/toast-container.d.ts +42 -0
  87. package/dist/organisms/Toast/toast.d.ts +48 -0
  88. package/dist/organisms/TreeMenu/index.d.ts +1 -0
  89. package/dist/organisms/TreeMenu/tree-menu.d.ts +41 -0
  90. package/dist/popover-BSfKsQni.js +143 -0
  91. package/dist/popover-DhEvLuOo.cjs +30 -0
  92. package/dist/popover.cjs +1 -1
  93. package/dist/popover.js +1 -1
  94. package/dist/styles/main.css +186 -182
  95. package/dist/switch-8RGGesy5.cjs +17 -0
  96. package/dist/switch-DNqPqH-R.js +64 -0
  97. package/dist/switch.cjs +1 -1
  98. package/dist/switch.js +1 -1
  99. package/dist/tab-BmrITzOL.cjs +40 -0
  100. package/dist/{tab-BKdN4xAz.js → tab-Ca_OyNqQ.js} +5 -5
  101. package/dist/tab.cjs +1 -1
  102. package/dist/tab.js +1 -1
  103. package/dist/text-area-BztUgBL1.cjs +51 -0
  104. package/dist/text-area-DUg5BGQh.js +235 -0
  105. package/dist/textarea.cjs +1 -1
  106. package/dist/textarea.js +1 -1
  107. package/dist/timepicker-BKUTi_AU.js +316 -0
  108. package/dist/timepicker-CRtoPBMn.cjs +119 -0
  109. package/dist/timepicker.cjs +1 -0
  110. package/dist/timepicker.js +4 -0
  111. package/dist/toast-container-CHrtU7X5.js +274 -0
  112. package/dist/toast-container-T77X56AG.cjs +64 -0
  113. package/dist/toast.cjs +1 -0
  114. package/dist/toast.js +6 -0
  115. package/dist/tree-menu-5dkAPsgJ.js +154 -0
  116. package/dist/tree-menu-CdNwvOjp.cjs +47 -0
  117. package/dist/tree-menu.cjs +1 -0
  118. package/dist/tree-menu.js +4 -0
  119. package/dist/ui-icon-DKZMrOTi.cjs +22 -0
  120. package/dist/ui-icon-DrrH0WhF.js +70 -0
  121. package/package.json +56 -12
  122. package/dist/badge-BbhaO73N.cjs +0 -13
  123. package/dist/badge-DE7Tgd8Z.js +0 -71
  124. package/dist/button-C1EwOosO.js +0 -58
  125. package/dist/button-CDRccsk9.cjs +0 -10
  126. package/dist/card-n8ka8Zk-.cjs +0 -43
  127. package/dist/chatbot-Ces7Xveb.js +0 -496
  128. package/dist/chatbot-oRwt64d8.cjs +0 -160
  129. package/dist/combobox-BJbI-Tgi.js +0 -268
  130. package/dist/combobox-pmE7bgEL.cjs +0 -99
  131. package/dist/datepicker-DFJx45C-.js +0 -750
  132. package/dist/datepicker-b9JGTTMx.cjs +0 -115
  133. package/dist/directive-Z_rhNYWK.js +0 -240
  134. package/dist/directive-ekjitgzi.cjs +0 -3
  135. package/dist/download-manager-BSIMTGaK.cjs +0 -97
  136. package/dist/formfield-D_7NFFoe.cjs +0 -27
  137. package/dist/formfield-d8fp9FTV.js +0 -118
  138. package/dist/input-ByllRq9M.js +0 -192
  139. package/dist/input-DsIOQPGV.cjs +0 -46
  140. package/dist/live-BX-yBGvT.cjs +0 -1
  141. package/dist/live-WTVSYE2F.js +0 -24
  142. package/dist/modal-Bfc6WQSL.js +0 -110
  143. package/dist/modal-DQ8VFL-P.cjs +0 -39
  144. package/dist/popover-C_Ob86CJ.cjs +0 -30
  145. package/dist/popover-D-FXdEdS.js +0 -1040
  146. package/dist/switch-Cpl53nRW.js +0 -64
  147. package/dist/switch-Rnnn10bn.cjs +0 -17
  148. package/dist/tab-DcjAlXzU.cjs +0 -40
  149. package/dist/text-area-CtZY3yLA.js +0 -204
  150. package/dist/text-area-DFDF5oos.cjs +0 -44
@@ -0,0 +1,652 @@
1
+ import { unsafeCSS as Ye, css as ke, LitElement as De, html as C } from "lit";
2
+ import { property as D, state as q, customElement as Se } from "lit/decorators.js";
3
+ import "./ui-icon-DrrH0WhF.js";
4
+ import y from "dayjs";
5
+ const xe = ':host{display:block;font-family:var(--font-family-base)}.dp__calendar{display:block}.dp__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--spacing-3)}.dp__nav-btn{display:inline-flex;align-items:center;justify-content:center;padding:var(--spacing-2);border:none;background:none;border-radius:var(--radius-base);cursor:pointer;color:var(--color-body-text);transition:background-color var(--transition-speed-fast) var(--transition-timing)}.dp__nav-btn:hover{background-color:var(--color-light)}.dp__header-label{font-size:var(--font-size-xl);font-weight:var(--font-weight-semibold);letter-spacing:-.025em;-webkit-user-select:none;user-select:none;cursor:pointer;color:var(--color-body-text);transition:color var(--transition-speed-fast) var(--transition-timing)}.dp__header-label:hover{color:var(--color-primary)}.dp__weekdays{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;font-size:var(--font-size-sm);color:var(--color-tertiary);margin-bottom:var(--spacing-1);-webkit-user-select:none;user-select:none}.dp__weekday{padding:var(--spacing-1) 0}.dp__grid{display:grid;grid-template-columns:repeat(7,1fr);row-gap:2px;outline:none}.dp__day{position:relative;height:36px;display:flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;padding:0;min-width:0;border-radius:0;color:var(--color-body-text);font-family:var(--font-family-base)}.dp__day-num{position:relative;z-index:1;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-full);font-size:var(--font-size-sm);flex-shrink:0;transition:background-color var(--transition-speed-fast) var(--transition-timing),color var(--transition-speed-fast) var(--transition-timing)}.dp__day--range-start:before,.dp__day--range-end:before,.dp__day--range-between:before{content:"";position:absolute;top:2px;bottom:2px;background-color:color-mix(in srgb,var(--color-primary) 15%,transparent);z-index:0;pointer-events:none}.dp__day--range-start:before{left:50%;right:0}.dp__day--range-end:before{left:0;right:50%}.dp__day--range-between:before{left:0;right:0}.dp__day--out-of-month{opacity:.4}.dp__day--focused .dp__day-num{background-color:var(--color-light)}.dp__day--disabled{cursor:not-allowed;pointer-events:none}.dp__day--disabled .dp__day-num{color:var(--color-gray-300);background-color:var(--color-gray-50)}.dp__day--disabled-weekday{cursor:not-allowed;pointer-events:none}.dp__day--disabled-weekday .dp__day-num{color:var(--color-gray-300)}.dp__day--today .dp__day-num{background-color:var(--color-gray-200);color:var(--color-gray-800)}.dp__day--selected .dp__day-num{background-color:var(--color-primary);color:#fff}.dp__day--default:hover .dp__day-num{background-color:var(--color-light)}.dp__day--range-pending .dp__day-num,.dp__day--range-start .dp__day-num,.dp__day--range-end .dp__day-num{background-color:var(--color-primary);color:#fff}.dp__day--range-between .dp__day-num{color:var(--color-primary);background:transparent}.dp__month-grid,.dp__year-grid{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(4,1fr);gap:10px;margin-top:var(--spacing-3)}.dp__month-btn,.dp__year-btn{height:48px;display:flex;align-items:center;justify-content:center;border:none;border-radius:var(--radius-base);font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);font-family:var(--font-family-base);cursor:pointer;background:none;color:var(--color-body-text);transition:background-color var(--transition-speed-fast) var(--transition-timing),color var(--transition-speed-fast) var(--transition-timing)}.dp__month-btn:hover:not(.dp__month-btn--selected),.dp__year-btn:hover:not(.dp__year-btn--selected){background-color:var(--color-light)}.dp__month-btn--selected,.dp__year-btn--selected{background-color:var(--color-primary);color:#fff}.dp__month-btn--current:not(.dp__month-btn--selected),.dp__year-btn--current:not(.dp__year-btn--selected){background-color:var(--color-gray-200);color:var(--color-gray-800)}.dp__footer{display:flex;align-items:center;justify-content:space-evenly;margin-top:var(--spacing-4);padding-bottom:var(--spacing-3)}.dp__footer-btn{display:inline-flex;align-items:center;gap:var(--spacing-2);padding:var(--spacing-1) var(--spacing-2);font-size:var(--font-size-sm);color:var(--color-tertiary);border:none;border-radius:var(--radius-sm);background:none;cursor:pointer;font-family:var(--font-family-base);transition:background-color var(--transition-speed-fast) var(--transition-timing),color var(--transition-speed-fast) var(--transition-timing)}.dp__footer-btn:hover{background-color:var(--color-light);color:var(--color-body-text)}';
6
+ function G(e) {
7
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
8
+ }
9
+ var I = { exports: {} }, $e = I.exports, ue;
10
+ function Le() {
11
+ return ue || (ue = 1, (function(e, t) {
12
+ (function(r, a) {
13
+ e.exports = a();
14
+ })($e, (function() {
15
+ var r = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" };
16
+ return function(a, s, p) {
17
+ var i = s.prototype, l = i.format;
18
+ p.en.formats = r, i.format = function(c) {
19
+ c === void 0 && (c = "YYYY-MM-DDTHH:mm:ssZ");
20
+ var v = this.$locale().formats, h = (function(o, d) {
21
+ return o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(S, F, x) {
22
+ var n = x && x.toUpperCase();
23
+ return F || d[x] || r[x] || d[n].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(u, f, _) {
24
+ return f || _.slice(1);
25
+ }));
26
+ }));
27
+ })(c, v === void 0 ? {} : v);
28
+ return l.call(this, h);
29
+ };
30
+ };
31
+ }));
32
+ })(I)), I.exports;
33
+ }
34
+ var Ee = Le();
35
+ const Ce = /* @__PURE__ */ G(Ee);
36
+ var V = { exports: {} }, ze = V.exports, he;
37
+ function Ae() {
38
+ return he || (he = 1, (function(e, t) {
39
+ (function(r, a) {
40
+ e.exports = a();
41
+ })(ze, (function() {
42
+ var r = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, a = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, s = /\d/, p = /\d\d/, i = /\d\d?/, l = /\d*[^-_:/,()\s\d]+/, c = {}, v = function(n) {
43
+ return (n = +n) + (n > 68 ? 1900 : 2e3);
44
+ }, h = function(n) {
45
+ return function(u) {
46
+ this[n] = +u;
47
+ };
48
+ }, o = [/[+-]\d\d:?(\d\d)?|Z/, function(n) {
49
+ (this.zone || (this.zone = {})).offset = (function(u) {
50
+ if (!u || u === "Z") return 0;
51
+ var f = u.match(/([+-]|\d\d)/g), _ = 60 * f[1] + (+f[2] || 0);
52
+ return _ === 0 ? 0 : f[0] === "+" ? -_ : _;
53
+ })(n);
54
+ }], d = function(n) {
55
+ var u = c[n];
56
+ return u && (u.indexOf ? u : u.s.concat(u.f));
57
+ }, S = function(n, u) {
58
+ var f, _ = c.meridiem;
59
+ if (_) {
60
+ for (var Y = 1; Y <= 24; Y += 1) if (n.indexOf(_(Y, 0, u)) > -1) {
61
+ f = Y > 12;
62
+ break;
63
+ }
64
+ } else f = n === (u ? "pm" : "PM");
65
+ return f;
66
+ }, F = { A: [l, function(n) {
67
+ this.afternoon = S(n, !1);
68
+ }], a: [l, function(n) {
69
+ this.afternoon = S(n, !0);
70
+ }], Q: [s, function(n) {
71
+ this.month = 3 * (n - 1) + 1;
72
+ }], S: [s, function(n) {
73
+ this.milliseconds = 100 * +n;
74
+ }], SS: [p, function(n) {
75
+ this.milliseconds = 10 * +n;
76
+ }], SSS: [/\d{3}/, function(n) {
77
+ this.milliseconds = +n;
78
+ }], s: [i, h("seconds")], ss: [i, h("seconds")], m: [i, h("minutes")], mm: [i, h("minutes")], H: [i, h("hours")], h: [i, h("hours")], HH: [i, h("hours")], hh: [i, h("hours")], D: [i, h("day")], DD: [p, h("day")], Do: [l, function(n) {
79
+ var u = c.ordinal, f = n.match(/\d+/);
80
+ if (this.day = f[0], u) for (var _ = 1; _ <= 31; _ += 1) u(_).replace(/\[|\]/g, "") === n && (this.day = _);
81
+ }], w: [i, h("week")], ww: [p, h("week")], M: [i, h("month")], MM: [p, h("month")], MMM: [l, function(n) {
82
+ var u = d("months"), f = (d("monthsShort") || u.map((function(_) {
83
+ return _.slice(0, 3);
84
+ }))).indexOf(n) + 1;
85
+ if (f < 1) throw new Error();
86
+ this.month = f % 12 || f;
87
+ }], MMMM: [l, function(n) {
88
+ var u = d("months").indexOf(n) + 1;
89
+ if (u < 1) throw new Error();
90
+ this.month = u % 12 || u;
91
+ }], Y: [/[+-]?\d+/, h("year")], YY: [p, function(n) {
92
+ this.year = v(n);
93
+ }], YYYY: [/\d{4}/, h("year")], Z: o, ZZ: o };
94
+ function x(n) {
95
+ var u, f;
96
+ u = n, f = c && c.formats;
97
+ for (var _ = (n = u.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(H, z, $) {
98
+ var k = $ && $.toUpperCase();
99
+ return z || f[$] || r[$] || f[k].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(A, O, T) {
100
+ return O || T.slice(1);
101
+ }));
102
+ }))).match(a), Y = _.length, b = 0; b < Y; b += 1) {
103
+ var P = _[b], B = F[P], L = B && B[0], E = B && B[1];
104
+ _[b] = E ? { regex: L, parser: E } : P.replace(/^\[|\]$/g, "");
105
+ }
106
+ return function(H) {
107
+ for (var z = {}, $ = 0, k = 0; $ < Y; $ += 1) {
108
+ var A = _[$];
109
+ if (typeof A == "string") k += A.length;
110
+ else {
111
+ var O = A.regex, T = A.parser, U = H.slice(k), R = O.exec(U)[0];
112
+ T.call(z, R), H = H.replace(R, "");
113
+ }
114
+ }
115
+ return (function(j) {
116
+ var Z = j.afternoon;
117
+ if (Z !== void 0) {
118
+ var M = j.hours;
119
+ Z ? M < 12 && (j.hours += 12) : M === 12 && (j.hours = 0), delete j.afternoon;
120
+ }
121
+ })(z), z;
122
+ };
123
+ }
124
+ return function(n, u, f) {
125
+ f.p.customParseFormat = !0, n && n.parseTwoDigitYear && (v = n.parseTwoDigitYear);
126
+ var _ = u.prototype, Y = _.parse;
127
+ _.parse = function(b) {
128
+ var P = b.date, B = b.utc, L = b.args;
129
+ this.$u = B;
130
+ var E = L[1];
131
+ if (typeof E == "string") {
132
+ var H = L[2] === !0, z = L[3] === !0, $ = H || z, k = L[2];
133
+ z && (k = L[2]), c = this.$locale(), !H && k && (c = f.Ls[k]), this.$d = (function(U, R, j, Z) {
134
+ try {
135
+ if (["x", "X"].indexOf(R) > -1) return new Date((R === "X" ? 1e3 : 1) * U);
136
+ var M = x(R)(U), te = M.year, K = M.month, ge = M.day, ve = M.hours, be = M.minutes, Me = M.seconds, we = M.milliseconds, le = M.zone, ce = M.week, re = /* @__PURE__ */ new Date(), ne = ge || (te || K ? 1 : re.getDate()), ae = te || re.getFullYear(), N = 0;
137
+ te && !K || (N = K > 0 ? K - 1 : re.getMonth());
138
+ var W, oe = ve || 0, ie = be || 0, se = Me || 0, de = we || 0;
139
+ return le ? new Date(Date.UTC(ae, N, ne, oe, ie, se, de + 60 * le.offset * 1e3)) : j ? new Date(Date.UTC(ae, N, ne, oe, ie, se, de)) : (W = new Date(ae, N, ne, oe, ie, se, de), ce && (W = Z(W).week(ce).toDate()), W);
140
+ } catch {
141
+ return /* @__PURE__ */ new Date("");
142
+ }
143
+ })(P, E, B, f), this.init(), k && k !== !0 && (this.$L = this.locale(k).$L), $ && P != this.format(E) && (this.$d = /* @__PURE__ */ new Date("")), c = {};
144
+ } else if (E instanceof Array) for (var A = E.length, O = 1; O <= A; O += 1) {
145
+ L[1] = E[O - 1];
146
+ var T = f.apply(this, L);
147
+ if (T.isValid()) {
148
+ this.$d = T.$d, this.$L = T.$L, this.init();
149
+ break;
150
+ }
151
+ O === A && (this.$d = /* @__PURE__ */ new Date(""));
152
+ }
153
+ else Y.call(this, b);
154
+ };
155
+ };
156
+ }));
157
+ })(V)), V.exports;
158
+ }
159
+ var Oe = Ae();
160
+ const Pe = /* @__PURE__ */ G(Oe);
161
+ var Q = { exports: {} }, Be = Q.exports, _e;
162
+ function He() {
163
+ return _e || (_e = 1, (function(e, t) {
164
+ (function(r, a) {
165
+ e.exports = a();
166
+ })(Be, (function() {
167
+ return function(r, a, s) {
168
+ a.prototype.isBetween = function(p, i, l, c) {
169
+ var v = s(p), h = s(i), o = (c = c || "()")[0] === "(", d = c[1] === ")";
170
+ return (o ? this.isAfter(v, l) : !this.isBefore(v, l)) && (d ? this.isBefore(h, l) : !this.isAfter(h, l)) || (o ? this.isBefore(v, l) : !this.isAfter(v, l)) && (d ? this.isAfter(h, l) : !this.isBefore(h, l));
171
+ };
172
+ };
173
+ }));
174
+ })(Q)), Q.exports;
175
+ }
176
+ var Te = He();
177
+ const je = /* @__PURE__ */ G(Te);
178
+ var X = { exports: {} }, Fe = X.exports, fe;
179
+ function Re() {
180
+ return fe || (fe = 1, (function(e, t) {
181
+ (function(r, a) {
182
+ e.exports = a();
183
+ })(Fe, (function() {
184
+ var r = "week", a = "year";
185
+ return function(s, p, i) {
186
+ var l = p.prototype;
187
+ l.week = function(c) {
188
+ if (c === void 0 && (c = null), c !== null) return this.add(7 * (c - this.week()), "day");
189
+ var v = this.$locale().yearStart || 1;
190
+ if (this.month() === 11 && this.date() > 25) {
191
+ var h = i(this).startOf(a).add(1, a).date(v), o = i(this).endOf(r);
192
+ if (h.isBefore(o)) return 1;
193
+ }
194
+ var d = i(this).startOf(a).date(v).startOf(r).subtract(1, "millisecond"), S = this.diff(d, r, !0);
195
+ return S < 0 ? i(this).startOf("week").week() : Math.ceil(S);
196
+ }, l.weeks = function(c) {
197
+ return c === void 0 && (c = null), this.week(c);
198
+ };
199
+ };
200
+ }));
201
+ })(X)), X.exports;
202
+ }
203
+ var qe = Re();
204
+ const Ge = /* @__PURE__ */ G(qe);
205
+ var J = { exports: {} }, Ue = J.exports, pe;
206
+ function Ze() {
207
+ return pe || (pe = 1, (function(e, t) {
208
+ (function(r, a) {
209
+ e.exports = a();
210
+ })(Ue, (function() {
211
+ return function(r, a, s) {
212
+ var p = a.prototype, i = function(o) {
213
+ return o && (o.indexOf ? o : o.s);
214
+ }, l = function(o, d, S, F, x) {
215
+ var n = o.name ? o : o.$locale(), u = i(n[d]), f = i(n[S]), _ = u || f.map((function(b) {
216
+ return b.slice(0, F);
217
+ }));
218
+ if (!x) return _;
219
+ var Y = n.weekStart;
220
+ return _.map((function(b, P) {
221
+ return _[(P + (Y || 0)) % 7];
222
+ }));
223
+ }, c = function() {
224
+ return s.Ls[s.locale()];
225
+ }, v = function(o, d) {
226
+ return o.formats[d] || (function(S) {
227
+ return S.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(F, x, n) {
228
+ return x || n.slice(1);
229
+ }));
230
+ })(o.formats[d.toUpperCase()]);
231
+ }, h = function() {
232
+ var o = this;
233
+ return { months: function(d) {
234
+ return d ? d.format("MMMM") : l(o, "months");
235
+ }, monthsShort: function(d) {
236
+ return d ? d.format("MMM") : l(o, "monthsShort", "months", 3);
237
+ }, firstDayOfWeek: function() {
238
+ return o.$locale().weekStart || 0;
239
+ }, weekdays: function(d) {
240
+ return d ? d.format("dddd") : l(o, "weekdays");
241
+ }, weekdaysMin: function(d) {
242
+ return d ? d.format("dd") : l(o, "weekdaysMin", "weekdays", 2);
243
+ }, weekdaysShort: function(d) {
244
+ return d ? d.format("ddd") : l(o, "weekdaysShort", "weekdays", 3);
245
+ }, longDateFormat: function(d) {
246
+ return v(o.$locale(), d);
247
+ }, meridiem: this.$locale().meridiem, ordinal: this.$locale().ordinal };
248
+ };
249
+ p.localeData = function() {
250
+ return h.bind(this)();
251
+ }, s.localeData = function() {
252
+ var o = c();
253
+ return { firstDayOfWeek: function() {
254
+ return o.weekStart || 0;
255
+ }, weekdays: function() {
256
+ return s.weekdays();
257
+ }, weekdaysShort: function() {
258
+ return s.weekdaysShort();
259
+ }, weekdaysMin: function() {
260
+ return s.weekdaysMin();
261
+ }, months: function() {
262
+ return s.months();
263
+ }, monthsShort: function() {
264
+ return s.monthsShort();
265
+ }, longDateFormat: function(d) {
266
+ return v(o, d);
267
+ }, meridiem: o.meridiem, ordinal: o.ordinal };
268
+ }, s.months = function() {
269
+ return l(c(), "months");
270
+ }, s.monthsShort = function() {
271
+ return l(c(), "monthsShort", "months", 3);
272
+ }, s.weekdays = function(o) {
273
+ return l(c(), "weekdays", null, null, o);
274
+ }, s.weekdaysShort = function(o) {
275
+ return l(c(), "weekdaysShort", "weekdays", 3, o);
276
+ }, s.weekdaysMin = function(o) {
277
+ return l(c(), "weekdaysMin", "weekdays", 2, o);
278
+ };
279
+ };
280
+ }));
281
+ })(J)), J.exports;
282
+ }
283
+ var Ke = Ze();
284
+ const Ne = /* @__PURE__ */ G(Ke);
285
+ var ee = { exports: {} }, We = ee.exports, me;
286
+ function Ie() {
287
+ return me || (me = 1, (function(e, t) {
288
+ (function(r, a) {
289
+ e.exports = a(y);
290
+ })(We, (function(r) {
291
+ function a(i) {
292
+ return i && typeof i == "object" && "default" in i ? i : { default: i };
293
+ }
294
+ var s = a(r), p = { name: "tr", weekdays: "Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"), weekdaysShort: "Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"), weekdaysMin: "Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"), months: "Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"), monthsShort: "Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"), weekStart: 1, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "DD.MM.YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY HH:mm", LLLL: "dddd, D MMMM YYYY HH:mm" }, relativeTime: { future: "%s sonra", past: "%s önce", s: "birkaç saniye", m: "bir dakika", mm: "%d dakika", h: "bir saat", hh: "%d saat", d: "bir gün", dd: "%d gün", M: "bir ay", MM: "%d ay", y: "bir yıl", yy: "%d yıl" }, ordinal: function(i) {
295
+ return i + ".";
296
+ } };
297
+ return s.default.locale(p, null, !0), p;
298
+ }));
299
+ })(ee)), ee.exports;
300
+ }
301
+ Ie();
302
+ y.extend(Ce);
303
+ y.extend(Pe);
304
+ y.extend(je);
305
+ y.extend(Ge);
306
+ y.extend(Ne);
307
+ y.locale("tr");
308
+ const Ve = [
309
+ "DD/MM/YYYY",
310
+ "DD.MM.YYYY",
311
+ "DD MM YYYY",
312
+ "DD-MM-YYYY",
313
+ "DD/MM/YY",
314
+ "DD.MM.YY",
315
+ "DD MM YY",
316
+ "DD-MM-YY",
317
+ "YYYY-MM-DD",
318
+ "YYYY/MM/DD",
319
+ "YYYY.MM.DD",
320
+ "YYYY MM DD"
321
+ ], ye = y.weekdaysShort(), Qe = y.months(), Xe = [...ye.slice(1), ye[0]];
322
+ function w(e) {
323
+ if (!e) return null;
324
+ for (const r of Ve) {
325
+ const a = y(e, r, !0);
326
+ if (a.isValid()) return a;
327
+ }
328
+ const t = y(e);
329
+ return t.isValid() ? t : null;
330
+ }
331
+ var Je = Object.defineProperty, et = Object.getOwnPropertyDescriptor, g = (e, t, r, a) => {
332
+ for (var s = a > 1 ? void 0 : a ? et(t, r) : t, p = e.length - 1, i; p >= 0; p--)
333
+ (i = e[p]) && (s = (a ? i(t, r, s) : i(s)) || s);
334
+ return a && s && Je(t, r, s), s;
335
+ };
336
+ let m = class extends De {
337
+ constructor() {
338
+ super(...arguments), this.value = null, this.min = null, this.max = null, this.disabled = !1, this.rangeMode = !1, this.disabledDays = [], this.rangeStart = null, this.rangeEnd = null, this.closable = !1, this._cursor = y(), this._rangeStart = null, this._rangeEnd = null, this._hoverDate = null, this._viewMode = "calendar", this._clear = () => {
339
+ this._emitChange(null), this.rangeMode && (this._rangeStart = null, this._rangeEnd = null, this._emitStateChange());
340
+ }, this._today = () => {
341
+ const e = y();
342
+ this._withinBounds(e) && this._select(e);
343
+ }, this._navigatePrevious = () => {
344
+ switch (this._viewMode) {
345
+ case "calendar":
346
+ this._cursor = this._cursor.subtract(1, "month");
347
+ break;
348
+ case "month":
349
+ this._cursor = this._cursor.subtract(1, "year");
350
+ break;
351
+ case "year":
352
+ this._cursor = this._cursor.subtract(12, "year");
353
+ break;
354
+ }
355
+ }, this._navigateNext = () => {
356
+ switch (this._viewMode) {
357
+ case "calendar":
358
+ this._cursor = this._cursor.add(1, "month");
359
+ break;
360
+ case "month":
361
+ this._cursor = this._cursor.add(1, "year");
362
+ break;
363
+ case "year":
364
+ this._cursor = this._cursor.add(12, "year");
365
+ break;
366
+ }
367
+ }, this._handleHeaderClick = () => {
368
+ this._viewMode === "calendar" ? this._viewMode = "month" : this._viewMode === "month" && (this._viewMode = "year");
369
+ };
370
+ }
371
+ willUpdate(e) {
372
+ if (e.has("value") && !this.rangeMode) {
373
+ const t = w(this.value);
374
+ t && (this._cursor = t);
375
+ }
376
+ e.has("rangeStart") && (this._rangeStart = this.rangeStart), e.has("rangeEnd") && (this._rangeEnd = this.rangeEnd), (e.has("rangeStart") || e.has("rangeEnd")) && this.rangeMode && (this._cursor = w(this.rangeEnd)?.clone() ?? w(this.rangeStart)?.clone() ?? this._cursor);
377
+ }
378
+ focusGrid() {
379
+ this.renderRoot.querySelector("#grid")?.focus();
380
+ }
381
+ _emitStateChange() {
382
+ this.dispatchEvent(
383
+ new CustomEvent("calendar-state-change", {
384
+ detail: {
385
+ rangeStart: this._rangeStart,
386
+ rangeEnd: this._rangeEnd
387
+ }
388
+ })
389
+ );
390
+ }
391
+ _emitChange(e) {
392
+ this.value = e, this.dispatchEvent(new CustomEvent("change", { detail: { value: e } })), this.onChange?.(e);
393
+ }
394
+ _emitRangeChange() {
395
+ if (!this._rangeStart || !this._rangeEnd) return;
396
+ const e = { start: this._rangeStart, end: this._rangeEnd };
397
+ this.dispatchEvent(new CustomEvent("rangeChange", { detail: e })), this.onRangeChange?.(e);
398
+ }
399
+ _withinBounds(e) {
400
+ const t = w(this.min), r = w(this.max);
401
+ return !(t && e.isBefore(t, "day") || r && e.isAfter(r, "day") || this.disabledDays.includes(e.day()));
402
+ }
403
+ _getYears() {
404
+ const e = this._cursor.year() - 6;
405
+ return Array.from({ length: 12 }, (t, r) => e + r);
406
+ }
407
+ _getHeaderLabel() {
408
+ switch (this._viewMode) {
409
+ case "calendar":
410
+ return this._cursor.format("MMMM YYYY");
411
+ case "month":
412
+ return this._cursor.format("YYYY");
413
+ case "year": {
414
+ const e = this._getYears();
415
+ return `${e[0]}-${e[e.length - 1]}`;
416
+ }
417
+ }
418
+ }
419
+ _daysInGrid() {
420
+ const e = this._cursor.startOf("month"), t = e.subtract((e.day() + 6) % 7, "day");
421
+ return Array.from({ length: 42 }, (r, a) => t.add(a, "day"));
422
+ }
423
+ _isInRange(e) {
424
+ if (!this.rangeMode || !this._rangeStart || !this._rangeEnd) return null;
425
+ const t = w(this._rangeStart), r = w(this._rangeEnd);
426
+ return !t || !r ? null : e.isSame(t, "day") ? "start" : e.isSame(r, "day") ? "end" : e.isBetween(t, r, "day", "[]") ? "between" : null;
427
+ }
428
+ _getHoverPreview(e) {
429
+ if (!this.rangeMode || !this._rangeStart || this._rangeEnd || !this._hoverDate) return null;
430
+ const t = w(this._rangeStart);
431
+ if (!t) return null;
432
+ const r = this._hoverDate, a = r.isAfter(t, "day"), s = a ? t : r, p = a ? r : t;
433
+ return e.isSame(t, "day") ? "preview-start" : e.isSame(r, "day") ? "preview-end" : e.isAfter(s, "day") && e.isBefore(p, "day") ? "preview-between" : null;
434
+ }
435
+ _getDayClasses(e) {
436
+ const t = ["dp__day"];
437
+ if (!this._withinBounds(e))
438
+ return t.push(this.disabledDays.includes(e.day()) ? "dp__day--disabled-weekday" : "dp__day--disabled"), t.join(" ");
439
+ const r = this._isInRange(e);
440
+ if (r === "start")
441
+ return t.push("dp__day--range-start"), t.join(" ");
442
+ if (r === "end")
443
+ return t.push("dp__day--range-end"), t.join(" ");
444
+ if (r === "between")
445
+ return t.push("dp__day--range-between"), t.join(" ");
446
+ const a = this._getHoverPreview(e);
447
+ return a === "preview-start" ? (t.push("dp__day--range-start"), t.join(" ")) : a === "preview-end" ? (t.push("dp__day--range-end"), t.join(" ")) : a === "preview-between" ? (t.push("dp__day--range-between"), t.join(" ")) : this.rangeMode && this._rangeStart && !this._rangeEnd && e.isSame(w(this._rangeStart), "day") ? (t.push("dp__day--range-pending"), t.join(" ")) : (e.isSame(w(this.value), "day") ? t.push("dp__day--selected") : e.isSame(y(), "day") ? t.push("dp__day--today") : t.push("dp__day--default"), t.join(" "));
448
+ }
449
+ _select(e) {
450
+ if (!(this.disabled || !this._withinBounds(e))) {
451
+ if (this.rangeMode) {
452
+ if (!this._rangeStart) {
453
+ this._rangeStart = e.format("YYYY-MM-DD"), this._cursor = e, this._emitStateChange();
454
+ return;
455
+ }
456
+ if (!this._rangeEnd) {
457
+ const t = w(this._rangeStart);
458
+ t && e.isBefore(t, "day") ? (this._rangeEnd = this._rangeStart, this._rangeStart = e.format("YYYY-MM-DD")) : this._rangeEnd = e.format("YYYY-MM-DD"), this._cursor = e, this._viewMode = "calendar", this._emitStateChange(), this._emitRangeChange();
459
+ return;
460
+ }
461
+ this._rangeStart = e.format("YYYY-MM-DD"), this._rangeEnd = null, this._cursor = e, this._emitStateChange();
462
+ return;
463
+ }
464
+ this._emitChange(e.format("YYYY-MM-DD")), this._cursor = e, this._viewMode = "calendar";
465
+ }
466
+ }
467
+ _selectMonth(e) {
468
+ this._cursor = this._cursor.month(e), this._viewMode = "calendar";
469
+ }
470
+ _selectYear(e) {
471
+ this._cursor = this._cursor.year(e), this._viewMode = "month";
472
+ }
473
+ _keydownGrid(e) {
474
+ const t = { ArrowLeft: -1, ArrowRight: 1, ArrowUp: -7, ArrowDown: 7 };
475
+ e.key in t ? (e.preventDefault(), this._cursor = this._cursor.add(t[e.key], "day")) : e.key === "Enter" || e.key === " " ? (e.preventDefault(), this._select(this._cursor)) : e.key === "Escape" && this.closable ? (e.preventDefault(), this.dispatchEvent(new CustomEvent("close-request"))) : e.key === "PageUp" ? (e.preventDefault(), this._cursor = e.shiftKey ? this._cursor.subtract(1, "year") : this._cursor.subtract(1, "month")) : e.key === "PageDown" ? (e.preventDefault(), this._cursor = e.shiftKey ? this._cursor.add(1, "year") : this._cursor.add(1, "month")) : e.key === "Home" ? (e.preventDefault(), this._cursor = this._cursor.startOf("month")) : e.key === "End" && (e.preventDefault(), this._cursor = this._cursor.endOf("month"));
476
+ }
477
+ _renderCalendar(e) {
478
+ const t = this._daysInGrid();
479
+ return C`
480
+ <div class="dp__weekdays" role="row">
481
+ ${Xe.map((r) => C`<div class="dp__weekday" role="columnheader" aria-label=${r}>${r}</div>`)}
482
+ </div>
483
+ <div
484
+ id="grid"
485
+ tabindex="0"
486
+ class="dp__grid"
487
+ role="grid"
488
+ aria-label="Takvim"
489
+ @keydown=${this._keydownGrid}
490
+ @mouseleave=${() => {
491
+ this._hoverDate = null;
492
+ }}
493
+ >
494
+ ${t.map((r) => {
495
+ const a = r.month() === this._cursor.month(), s = e ? r.isSame(e, "day") : !1, p = r.isSame(this._cursor, "day"), i = !this._withinBounds(r), l = [
496
+ this._getDayClasses(r),
497
+ a ? "" : "dp__day--out-of-month",
498
+ p ? "dp__day--focused" : ""
499
+ ].filter(Boolean).join(" ");
500
+ return C`
501
+ <button
502
+ class=${l}
503
+ role="gridcell"
504
+ aria-selected=${s ? "true" : "false"}
505
+ aria-disabled=${i ? "true" : "false"}
506
+ tabindex=${p ? "0" : "-1"}
507
+ @click=${() => !i && this._select(r)}
508
+ @mouseenter=${() => {
509
+ this.rangeMode && this._rangeStart && !this._rangeEnd && (this._hoverDate = r);
510
+ }}
511
+ >
512
+ <span class="dp__day-num">${r.date()}</span>
513
+ </button>
514
+ `;
515
+ })}
516
+ </div>
517
+ `;
518
+ }
519
+ _renderMonthGrid() {
520
+ return C`
521
+ <div class="dp__month-grid" role="grid" aria-label="Ay seçimi">
522
+ ${Qe.map((e, t) => {
523
+ const r = t === this._cursor.month(), a = t === y().month() && this._cursor.year() === y().year();
524
+ return C`
525
+ <button
526
+ class="dp__month-btn ${r ? "dp__month-btn--selected" : ""} ${a && !r ? "dp__month-btn--current" : ""}"
527
+ role="gridcell"
528
+ aria-selected=${r ? "true" : "false"}
529
+ @click=${() => this._selectMonth(t)}
530
+ >
531
+ ${e}
532
+ </button>
533
+ `;
534
+ })}
535
+ </div>
536
+ `;
537
+ }
538
+ _renderYearGrid() {
539
+ return C`
540
+ <div class="dp__year-grid" role="grid" aria-label="Yıl seçimi">
541
+ ${this._getYears().map((e) => {
542
+ const t = e === this._cursor.year(), r = e === y().year();
543
+ return C`
544
+ <button
545
+ class="dp__year-btn ${t ? "dp__year-btn--selected" : ""} ${r && !t ? "dp__year-btn--current" : ""}"
546
+ role="gridcell"
547
+ aria-selected=${t ? "true" : "false"}
548
+ @click=${() => this._selectYear(e)}
549
+ >
550
+ ${e}
551
+ </button>
552
+ `;
553
+ })}
554
+ </div>
555
+ `;
556
+ }
557
+ render() {
558
+ const e = w(this.value);
559
+ return C`
560
+ <div class="dp__calendar">
561
+ <div class="dp__header">
562
+ <button class="dp__nav-btn" @click=${this._navigatePrevious} aria-label="Önceki">
563
+ <ui-icon name="uil-arrow-left" size="16"></ui-icon>
564
+ </button>
565
+ <span class="dp__header-label" @click=${this._handleHeaderClick} role="button" tabindex="0">
566
+ ${this._getHeaderLabel()}
567
+ </span>
568
+ <button class="dp__nav-btn" @click=${this._navigateNext} aria-label="Sonraki">
569
+ <ui-icon name="uil-arrow-right" size="16"></ui-icon>
570
+ </button>
571
+ </div>
572
+
573
+ ${this._viewMode === "calendar" ? this._renderCalendar(e) : this._viewMode === "month" ? this._renderMonthGrid() : this._renderYearGrid()}
574
+
575
+ <div class="dp__footer">
576
+ <button class="dp__footer-btn" @click=${this._today} aria-label="Bugün">
577
+ <ui-icon name="uil-calendar" size="14"></ui-icon>
578
+ </button>
579
+ <button class="dp__footer-btn" @click=${this._clear} aria-label="Temizle">
580
+ <ui-icon name="uil-trash" size="14"></ui-icon>
581
+ </button>
582
+ ${this.closable ? C`
583
+ <button
584
+ class="dp__footer-btn"
585
+ @click=${() => this.dispatchEvent(new CustomEvent("close-request"))}
586
+ aria-label="Kapat"
587
+ >
588
+ <ui-icon name="uil-times" size="14"></ui-icon>
589
+ </button>
590
+ ` : null}
591
+ </div>
592
+ </div>
593
+ `;
594
+ }
595
+ };
596
+ m.styles = [ke`${Ye(xe)}`];
597
+ g([
598
+ D({ type: String })
599
+ ], m.prototype, "value", 2);
600
+ g([
601
+ D({ type: String })
602
+ ], m.prototype, "min", 2);
603
+ g([
604
+ D({ type: String })
605
+ ], m.prototype, "max", 2);
606
+ g([
607
+ D({ type: Boolean })
608
+ ], m.prototype, "disabled", 2);
609
+ g([
610
+ D({ type: Boolean })
611
+ ], m.prototype, "rangeMode", 2);
612
+ g([
613
+ D({ type: Array })
614
+ ], m.prototype, "disabledDays", 2);
615
+ g([
616
+ D({ type: String })
617
+ ], m.prototype, "rangeStart", 2);
618
+ g([
619
+ D({ type: String })
620
+ ], m.prototype, "rangeEnd", 2);
621
+ g([
622
+ D({ type: Boolean })
623
+ ], m.prototype, "closable", 2);
624
+ g([
625
+ D({ attribute: !1 })
626
+ ], m.prototype, "onChange", 2);
627
+ g([
628
+ D({ attribute: !1 })
629
+ ], m.prototype, "onRangeChange", 2);
630
+ g([
631
+ q()
632
+ ], m.prototype, "_cursor", 2);
633
+ g([
634
+ q()
635
+ ], m.prototype, "_rangeStart", 2);
636
+ g([
637
+ q()
638
+ ], m.prototype, "_rangeEnd", 2);
639
+ g([
640
+ q()
641
+ ], m.prototype, "_hoverDate", 2);
642
+ g([
643
+ q()
644
+ ], m.prototype, "_viewMode", 2);
645
+ m = g([
646
+ Se("logosphere-calendar")
647
+ ], m);
648
+ export {
649
+ Ve as D,
650
+ m as L,
651
+ w as s
652
+ };