@mintplayer/web-components 3.2.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +10 -11
  2. package/accordion/index.mjs +14 -12
  3. package/card/index.mjs +7 -5
  4. package/card/src/mp-card.element.d.ts +7 -2
  5. package/carousel/index.mjs +10 -9
  6. package/checkbox/index.mjs +1 -1
  7. package/chunks/{datatable-Ce-UT16z.mjs → datatable-wRsV3aob.mjs} +31 -15
  8. package/chunks/{datetime-picker-BT6lb4qw.mjs → datetime-picker-BQGY51b5.mjs} +8 -7
  9. package/custom-elements.json +1856 -1192
  10. package/datatable/index.mjs +1 -1
  11. package/datatable/src/generated/mp-datatable.generated.d.ts +20 -2
  12. package/datatable/src/index.d.ts +1 -1
  13. package/datepicker/index.mjs +8 -7
  14. package/datetime-picker/index.mjs +1 -1
  15. package/dropdown-menu/index.mjs +14 -8
  16. package/file-manager/index.mjs +7 -6
  17. package/input-group/index.mjs +12 -10
  18. package/machine/index.mjs +8 -1
  19. package/machine/src/index.d.ts +1 -0
  20. package/machine/src/mark-links.d.ts +6 -0
  21. package/nav/index.d.ts +1 -0
  22. package/nav/index.mjs +126 -0
  23. package/nav/src/generated/index.d.ts +2 -0
  24. package/nav/src/generated/mp-nav-item.generated.d.ts +20 -0
  25. package/nav/src/generated/mp-nav.generated.d.ts +63 -0
  26. package/nav/src/generated/nav-item.view.generated.d.ts +10 -0
  27. package/nav/src/generated/nav.view.generated.d.ts +10 -0
  28. package/nav/src/index.d.ts +1 -0
  29. package/nav/src/nav-item.lit.d.ts +1 -0
  30. package/navbar/index.mjs +64 -56
  31. package/navbar/src/navbar-item.lit.d.ts +1 -0
  32. package/otp-input/index.mjs +8 -7
  33. package/package.json +10 -4
  34. package/phone-input/index.mjs +8 -7
  35. package/query-builder/index.mjs +14 -12
  36. package/scheduler/index.mjs +27 -26
  37. package/select/index.mjs +11 -10
  38. package/signature-pad/index.mjs +8 -7
  39. package/spinner/index.d.ts +1 -0
  40. package/spinner/index.mjs +63 -0
  41. package/spinner/src/generated/index.d.ts +1 -0
  42. package/spinner/src/generated/mp-spinner.generated.d.ts +51 -0
  43. package/spinner/src/generated/spinner.view.generated.d.ts +9 -0
  44. package/spinner/src/index.d.ts +1 -0
  45. package/timepicker/index.mjs +13 -12
  46. package/typeahead/index.mjs +21 -18
  47. package/theming/bs-theme-preboot.js +0 -1
  48. package/theming/color-mode.css +0 -37
@@ -1,13 +1,14 @@
1
1
  import { CoreController as e, booleanAttribute as t, numberAttribute as n, props as r, stringAttribute as i } from "../machine/index.mjs";
2
- import "../chunks/datetime-picker-BT6lb4qw.mjs";
2
+ import "../chunks/datetime-picker-BQGY51b5.mjs";
3
3
  import { LitElement as a, html as o, nothing as s } from "lit";
4
4
  import { installLightStyles as c } from "@mintplayer/ui-core/scoped-styles";
5
5
  import { repeat as l } from "lit/directives/repeat.js";
6
6
  import { styleMap as u } from "lit/directives/style-map.js";
7
- import { SchedulerStateManager as d, createInitialState as f, schedulerCore as p, schedulerScopedStyles as m } from "@mintplayer/ui-core/scheduler";
8
- import { generateEventId as h, generateGroupId as g, generateResourceId as _ } from "@mintplayer/ui-core/scheduler-core";
7
+ import { bootstrapForms as d } from "@mintplayer/ui-core/bootstrap/forms";
8
+ import { SchedulerStateManager as f, createInitialState as p, schedulerCore as m, schedulerScopedStyles as h } from "@mintplayer/ui-core/scheduler";
9
+ import { generateEventId as g, generateGroupId as _, generateResourceId as v } from "@mintplayer/ui-core/scheduler-core";
9
10
  //#region libs/mintplayer-web-components/scheduler/src/generated/sched-time-grid.view.generated.ts
10
- function v({ grid: e, slots: t = {} }) {
11
+ function y({ grid: e, slots: t = {} }) {
11
12
  return o`
12
13
  <div data-mps="scheduler" ${r(e.headerRow)}>
13
14
  <div data-mps="scheduler" ${r(e.gutterSpace)}></div>
@@ -64,7 +65,7 @@ function v({ grid: e, slots: t = {} }) {
64
65
  }
65
66
  //#endregion
66
67
  //#region libs/mintplayer-web-components/scheduler/src/generated/sched-month.view.generated.ts
67
- function y({ month: e, slots: t = {} }) {
68
+ function b({ month: e, slots: t = {} }) {
68
69
  return o`
69
70
  <div data-mps="scheduler" ${r(e.headerRow)}>
70
71
  ${l(e.headers, (e) => e.key, (e) => o`
@@ -94,7 +95,7 @@ function y({ month: e, slots: t = {} }) {
94
95
  }
95
96
  //#endregion
96
97
  //#region libs/mintplayer-web-components/scheduler/src/generated/sched-year.view.generated.ts
97
- function b({ year: e, slots: t = {} }) {
98
+ function x({ year: e, slots: t = {} }) {
98
99
  return o`
99
100
  <div data-mps="scheduler" ${r(e.grid)}>
100
101
  ${l(e.months, (e) => e.key, (e) => o`
@@ -115,7 +116,7 @@ function b({ year: e, slots: t = {} }) {
115
116
  }
116
117
  //#endregion
117
118
  //#region libs/mintplayer-web-components/scheduler/src/generated/sched-timeline.view.generated.ts
118
- function x({ timeline: e, slots: t = {} }) {
119
+ function S({ timeline: e, slots: t = {} }) {
119
120
  return o`
120
121
  <div data-mps="scheduler" ${r(e.timeline)}>
121
122
  <div data-mps="scheduler" ${r(e.head)}>
@@ -197,7 +198,7 @@ function x({ timeline: e, slots: t = {} }) {
197
198
  }
198
199
  //#endregion
199
200
  //#region libs/mintplayer-web-components/scheduler/src/generated/sched-popover-event.view.generated.ts
200
- function S({ event: e, slots: t = {} }) {
201
+ function C({ event: e, slots: t = {} }) {
201
202
  return o`
202
203
  <li data-mps="scheduler" ${r(e.row)}>
203
204
  <button data-mps="scheduler" ${r(e.bag)}>
@@ -214,7 +215,7 @@ function S({ event: e, slots: t = {} }) {
214
215
  }
215
216
  //#endregion
216
217
  //#region libs/mintplayer-web-components/scheduler/src/generated/sched-popover.view.generated.ts
217
- function C({ popover: e, slots: t = {} }) {
218
+ function w({ popover: e, slots: t = {} }) {
218
219
  return o`
219
220
  <div data-mps="scheduler" ${r(e.bag)}>
220
221
  <div data-mps="scheduler" ${r(e.head)}>
@@ -232,7 +233,7 @@ function C({ popover: e, slots: t = {} }) {
232
233
  ${e.list ? o`
233
234
  <ul data-mps="scheduler" ${r(e.list)}>
234
235
  ${l(e.events, (e) => e.key, (e) => o`
235
- ${S({
236
+ ${C({
236
237
  event: e,
237
238
  slots: t
238
239
  })}
@@ -244,7 +245,7 @@ function C({ popover: e, slots: t = {} }) {
244
245
  <div data-mps="scheduler" ${r(e.headingBag)}>${e.heading}</div>
245
246
  <ul data-mps="scheduler" ${r(e.list)}>
246
247
  ${l(e.events, (e) => e.key, (e) => o`
247
- ${S({
248
+ ${C({
248
249
  event: e,
249
250
  slots: t
250
251
  })}
@@ -273,7 +274,7 @@ function C({ popover: e, slots: t = {} }) {
273
274
  }
274
275
  //#endregion
275
276
  //#region libs/mintplayer-web-components/scheduler/src/generated/sched-row-panel.view.generated.ts
276
- function w({ panel: e, slots: t = {} }) {
277
+ function T({ panel: e, slots: t = {} }) {
277
278
  return o`
278
279
  <div data-mps="scheduler" ${r(e.bag)}>
279
280
  ${l(e.actions, (e) => e.key, (e) => o`
@@ -292,7 +293,7 @@ function w({ panel: e, slots: t = {} }) {
292
293
  }
293
294
  //#endregion
294
295
  //#region libs/mintplayer-web-components/scheduler/src/generated/sched-editor.view.generated.ts
295
- function T({ editor: e, slots: t = {} }) {
296
+ function E({ editor: e, slots: t = {} }) {
296
297
  return o`
297
298
  <div data-mps="scheduler" ${r(e.bag)}>
298
299
  <div data-mps="scheduler" ${r(e.head)}>
@@ -332,7 +333,7 @@ function T({ editor: e, slots: t = {} }) {
332
333
  }
333
334
  //#endregion
334
335
  //#region libs/mintplayer-web-components/scheduler/src/generated/scheduler.view.generated.ts
335
- function E({ view: e, slots: t = {} }) {
336
+ function D({ view: e, slots: t = {} }) {
336
337
  return o`
337
338
  <div data-mps="scheduler" ${r(e.container)}>
338
339
  <div data-mps="scheduler" ${r(e.header)}>
@@ -350,25 +351,25 @@ function E({ view: e, slots: t = {} }) {
350
351
  </div>
351
352
  <div data-mps="scheduler" ${r(e.content)} style=${u(e.contentStyle)}>
352
353
  ${e.timeGrid ? o`
353
- ${v({
354
+ ${y({
354
355
  grid: e.timeGrid,
355
356
  slots: t
356
357
  })}
357
358
  ` : s}
358
359
  ${e.month ? o`
359
- ${y({
360
+ ${b({
360
361
  month: e.month,
361
362
  slots: t
362
363
  })}
363
364
  ` : s}
364
365
  ${e.year ? o`
365
- ${b({
366
+ ${x({
366
367
  year: e.year,
367
368
  slots: t
368
369
  })}
369
370
  ` : s}
370
371
  ${e.timeline ? o`
371
- ${x({
372
+ ${S({
372
373
  timeline: e.timeline,
373
374
  slots: t
374
375
  })}
@@ -385,19 +386,19 @@ function E({ view: e, slots: t = {} }) {
385
386
  <div data-mps="scheduler" ${r(e.kbdGrid)}>${e.kbdGridText}</div>
386
387
  <div data-mps="scheduler" ${r(e.kbdEvent)}>${e.kbdEventText}</div>
387
388
  ${e.popover ? o`
388
- ${C({
389
+ ${w({
389
390
  popover: e.popover,
390
391
  slots: t
391
392
  })}
392
393
  ` : s}
393
394
  ${e.rowPanel ? o`
394
- ${w({
395
+ ${T({
395
396
  panel: e.rowPanel,
396
397
  slots: t
397
398
  })}
398
399
  ` : s}
399
400
  ${e.editor ? o`
400
- ${T({
401
+ ${E({
401
402
  editor: e.editor,
402
403
  slots: t
403
404
  })}
@@ -407,7 +408,7 @@ function E({ view: e, slots: t = {} }) {
407
408
  }
408
409
  //#endregion
409
410
  //#region libs/mintplayer-web-components/scheduler/src/generated/mp-scheduler.generated.ts
410
- var D = class extends a {
411
+ var O = class extends a {
411
412
  static {
412
413
  this.properties = {
413
414
  events: { attribute: !1 },
@@ -451,7 +452,7 @@ var D = class extends a {
451
452
  selectedRange: { attribute: !1 }
452
453
  };
453
454
  }
454
- #e = new e(this, p, {
455
+ #e = new e(this, m, {
455
456
  idPrefix: "mp-scheduler",
456
457
  inputs: () => ({
457
458
  events: this.events,
@@ -486,7 +487,7 @@ var D = class extends a {
486
487
  return this;
487
488
  }
488
489
  render() {
489
- return E({ ...this.#e.props() });
490
+ return D({ ...this.#e.props() });
490
491
  }
491
492
  next(...e) {
492
493
  return this.#e.call("next", e);
@@ -522,6 +523,6 @@ var D = class extends a {
522
523
  return this.#e.call("refetchEvents", e);
523
524
  }
524
525
  };
525
- typeof document < "u" && document.head && c("scheduler", m), customElements.get("mp-scheduler") || customElements.define("mp-scheduler", D);
526
+ typeof document < "u" && document.head && (c(d.key, d.css, { order: d.order }), c("scheduler", h)), customElements.get("mp-scheduler") || customElements.define("mp-scheduler", O);
526
527
  //#endregion
527
- export { D as MpScheduler, d as SchedulerStateManager, f as createInitialState, h as generateEventId, g as generateGroupId, _ as generateResourceId };
528
+ export { O as MpScheduler, f as SchedulerStateManager, p as createInitialState, g as generateEventId, _ as generateGroupId, v as generateResourceId };
package/select/index.mjs CHANGED
@@ -2,12 +2,13 @@ import { CoreController as e, LightChildren as t, booleanAttribute as n, numberA
2
2
  import { LitElement as o, html as s, nothing as c } from "lit";
3
3
  import { installLightStyles as l } from "@mintplayer/ui-core/scoped-styles";
4
4
  import { repeat as u } from "lit/directives/repeat.js";
5
- import { selectCore as d, selectScopedStyles as f } from "@mintplayer/ui-core/select";
5
+ import { bootstrapForms as d } from "@mintplayer/ui-core/bootstrap/forms";
6
+ import { selectCore as f, selectScopedStyles as p } from "@mintplayer/ui-core/select";
6
7
  //#region libs/mintplayer-web-components/select/src/generated/select.view.generated.ts
7
- function p(e, t) {
8
+ function m(e, t) {
8
9
  return typeof e == "function" ? e(t) : e;
9
10
  }
10
- function m({ view: e, slots: t = {} }) {
11
+ function h({ view: e, slots: t = {} }) {
11
12
  return s`
12
13
  <select data-mps="select" ${i(e.select)}>
13
14
  ${e.rich && t.option ? s`
@@ -24,7 +25,7 @@ function m({ view: e, slots: t = {} }) {
24
25
  ${e.rich ? s`
25
26
  ${t.option === void 0 ? s`
26
27
  ${n.option.label}
27
- ` : p(t.option, { option: n.option })}
28
+ ` : m(t.option, { option: n.option })}
28
29
  ` : s`
29
30
  ${n.option.label}
30
31
  `}
@@ -37,7 +38,7 @@ function m({ view: e, slots: t = {} }) {
37
38
  ${e.rich ? s`
38
39
  ${t.option === void 0 ? s`
39
40
  ${n.option.label}
40
- ` : p(t.option, { option: n.option })}
41
+ ` : m(t.option, { option: n.option })}
41
42
  ` : s`
42
43
  ${n.option.label}
43
44
  `}
@@ -56,7 +57,7 @@ function m({ view: e, slots: t = {} }) {
56
57
  }
57
58
  //#endregion
58
59
  //#region libs/mintplayer-web-components/select/src/generated/mp-select.generated.ts
59
- var h = class extends o {
60
+ var g = class extends o {
60
61
  static {
61
62
  this.properties = {
62
63
  size: {
@@ -118,7 +119,7 @@ var h = class extends o {
118
119
  };
119
120
  }
120
121
  #e = new t(this);
121
- #t = new e(this, d, {
122
+ #t = new e(this, f, {
122
123
  idPrefix: "mp-select",
123
124
  inputs: () => ({
124
125
  size: this.size,
@@ -150,7 +151,7 @@ var h = class extends o {
150
151
  this.#e.capture();
151
152
  }
152
153
  render() {
153
- return m({
154
+ return h({
154
155
  ...this.#t.props(),
155
156
  slots: {
156
157
  ...this.#e.slots,
@@ -160,6 +161,6 @@ var h = class extends o {
160
161
  });
161
162
  }
162
163
  };
163
- typeof document < "u" && document.head && l("select", f), customElements.get("mp-select") || customElements.define("mp-select", h);
164
+ typeof document < "u" && document.head && (l(d.key, d.css, { order: d.order }), l("select", p)), customElements.get("mp-select") || customElements.define("mp-select", g);
164
165
  //#endregion
165
- export { h as MpSelect };
166
+ export { g as MpSelect };
@@ -1,9 +1,10 @@
1
1
  import { CoreController as e, booleanAttribute as t, numberAttribute as n, props as r, stringAttribute as i } from "../machine/index.mjs";
2
2
  import { LitElement as a, html as o, nothing as s } from "lit";
3
3
  import { installLightStyles as c } from "@mintplayer/ui-core/scoped-styles";
4
- import { signaturePadCore as l, signaturePadScopedStyles as u } from "@mintplayer/ui-core/signature-pad";
4
+ import { bootstrapForms as l } from "@mintplayer/ui-core/bootstrap/forms";
5
+ import { signaturePadCore as u, signaturePadScopedStyles as d } from "@mintplayer/ui-core/signature-pad";
5
6
  //#region libs/mintplayer-web-components/signature-pad/src/generated/signature-pad.view.generated.ts
6
- function d({ view: e, slots: t = {} }) {
7
+ function f({ view: e, slots: t = {} }) {
7
8
  return o`
8
9
  <canvas data-mps="signature-pad" ${r(e.canvas)}></canvas>
9
10
  <div data-mps="signature-pad" ${r(e.controls)}>
@@ -20,7 +21,7 @@ function d({ view: e, slots: t = {} }) {
20
21
  }
21
22
  //#endregion
22
23
  //#region libs/mintplayer-web-components/signature-pad/src/generated/mp-signature-pad.generated.ts
23
- var f = class extends a {
24
+ var p = class extends a {
24
25
  static {
25
26
  this.properties = {
26
27
  signature: { attribute: !1 },
@@ -66,7 +67,7 @@ var f = class extends a {
66
67
  labels: { attribute: !1 }
67
68
  };
68
69
  }
69
- #e = new e(this, l, {
70
+ #e = new e(this, u, {
70
71
  idPrefix: "mp-signature-pad",
71
72
  inputs: () => ({
72
73
  signature: this.signature,
@@ -93,7 +94,7 @@ var f = class extends a {
93
94
  return this;
94
95
  }
95
96
  render() {
96
- return d({ ...this.#e.props() });
97
+ return f({ ...this.#e.props() });
97
98
  }
98
99
  undo(...e) {
99
100
  return this.#e.call("undo", e);
@@ -105,6 +106,6 @@ var f = class extends a {
105
106
  return this.#e.call("focusInput", e);
106
107
  }
107
108
  };
108
- typeof document < "u" && document.head && c("signature-pad", u), customElements.get("mp-signature-pad") || customElements.define("mp-signature-pad", f);
109
+ typeof document < "u" && document.head && (c(l.key, l.css, { order: l.order }), c("signature-pad", d)), customElements.get("mp-signature-pad") || customElements.define("mp-signature-pad", p);
109
110
  //#endregion
110
- export { f as MpSignaturePad };
111
+ export { p as MpSignaturePad };
@@ -0,0 +1 @@
1
+ export * from './src';
@@ -0,0 +1,63 @@
1
+ import { CoreController as e, booleanAttribute as t, stringAttribute as n } from "../machine/index.mjs";
2
+ import { LitElement as r, html as i } from "lit";
3
+ import { installLightStyles as a } from "@mintplayer/ui-core/scoped-styles";
4
+ import { spinnerCore as o, spinnerScopedStyles as s } from "@mintplayer/ui-core/spinner";
5
+ import { bootstrapSpinners as c } from "@mintplayer/ui-core/bootstrap/spinners";
6
+ //#region libs/mintplayer-web-components/spinner/src/generated/spinner.view.generated.ts
7
+ function l({ root: e, label: t, slots: n = {} }) {
8
+ return i`
9
+ <span data-mps="spinner" class="visually-hidden">${t}</span>
10
+ `;
11
+ }
12
+ //#endregion
13
+ //#region libs/mintplayer-web-components/spinner/src/generated/mp-spinner.generated.ts
14
+ var u = class extends r {
15
+ static {
16
+ this.properties = {
17
+ type: {
18
+ type: String,
19
+ converter: n("border", ["border", "grow"]),
20
+ reflect: !0
21
+ },
22
+ color: {
23
+ type: String,
24
+ converter: n(null),
25
+ reflect: !0
26
+ },
27
+ small: {
28
+ type: Boolean,
29
+ converter: t(!1),
30
+ reflect: !0
31
+ },
32
+ label: {
33
+ type: String,
34
+ converter: n("Loading…")
35
+ }
36
+ };
37
+ }
38
+ #e = new e(this, o, {
39
+ idPrefix: "mp-spinner",
40
+ inputs: () => ({
41
+ type: this.type,
42
+ color: this.color,
43
+ small: this.small,
44
+ label: this.label
45
+ }),
46
+ hostBag: (e) => ({
47
+ ...e.root,
48
+ "data-mps": "spinner"
49
+ })
50
+ });
51
+ constructor() {
52
+ super(), this.type = "border", this.color = null, this.small = !1, this.label = "Loading…";
53
+ }
54
+ createRenderRoot() {
55
+ return this;
56
+ }
57
+ render() {
58
+ return l({ ...this.#e.props() });
59
+ }
60
+ };
61
+ typeof document < "u" && document.head && (a(c.key, c.css, { order: c.order }), a("spinner", s)), customElements.get("mp-spinner") || customElements.define("mp-spinner", u);
62
+ //#endregion
63
+ export { u as MpSpinner };
@@ -0,0 +1 @@
1
+ export { MpSpinner } from './mp-spinner.generated';
@@ -0,0 +1,51 @@
1
+ import { LitElement } from 'lit';
2
+ import { SpinnerInputs } from '@mintplayer/ui-core/spinner';
3
+ /** Bootstrap's spinner: a `role="status"` loading indicator whose visually hidden `label` a screen reader announces (#452). */
4
+ export declare class MpSpinner extends LitElement {
5
+ #private;
6
+ static properties: {
7
+ type: {
8
+ type: StringConstructor;
9
+ converter: {
10
+ fromAttribute: (value: string | null) => string;
11
+ toAttribute: (value: unknown) => string | null;
12
+ };
13
+ reflect: boolean;
14
+ };
15
+ color: {
16
+ type: StringConstructor;
17
+ converter: {
18
+ fromAttribute: (value: string | null) => string | null;
19
+ toAttribute: (value: unknown) => string | null;
20
+ };
21
+ reflect: boolean;
22
+ };
23
+ small: {
24
+ type: BooleanConstructor;
25
+ converter: {
26
+ fromAttribute: (value: string | null) => boolean;
27
+ toAttribute: (value: unknown) => string | null;
28
+ };
29
+ reflect: boolean;
30
+ };
31
+ label: {
32
+ type: StringConstructor;
33
+ converter: {
34
+ fromAttribute: (value: string | null) => string;
35
+ toAttribute: (value: unknown) => string | null;
36
+ };
37
+ };
38
+ };
39
+ type: SpinnerInputs['type'];
40
+ color: SpinnerInputs['color'];
41
+ small: SpinnerInputs['small'];
42
+ label: SpinnerInputs['label'];
43
+ constructor();
44
+ protected createRenderRoot(): HTMLElement;
45
+ render(): import('lit-html').TemplateResult;
46
+ }
47
+ declare global {
48
+ interface HTMLElementTagNameMap {
49
+ 'mp-spinner': MpSpinner;
50
+ }
51
+ }
@@ -0,0 +1,9 @@
1
+ import { TemplateResult } from 'lit';
2
+ import { SpinnerProps } from '@mintplayer/ui-core/spinner';
3
+ export type SpinnerTemplateProps = {
4
+ root: SpinnerProps['root'];
5
+ label: SpinnerProps['label'];
6
+ } & {
7
+ slots?: {};
8
+ };
9
+ export declare function spinnerTemplate({ root, label, slots }: SpinnerTemplateProps): TemplateResult;
@@ -0,0 +1 @@
1
+ export * from './generated';
@@ -2,9 +2,10 @@ import { CoreController as e, booleanAttribute as t, numberAttribute as n, props
2
2
  import { LitElement as a, html as o, nothing as s } from "lit";
3
3
  import { installLightStyles as c } from "@mintplayer/ui-core/scoped-styles";
4
4
  import { repeat as l } from "lit/directives/repeat.js";
5
- import { timeListCore as u, timepickerCore as d, timepickerScopedStyles as f } from "@mintplayer/ui-core/timepicker";
5
+ import { bootstrapForms as u } from "@mintplayer/ui-core/bootstrap/forms";
6
+ import { timeListCore as d, timepickerCore as f, timepickerScopedStyles as p } from "@mintplayer/ui-core/timepicker";
6
7
  //#region libs/mintplayer-web-components/timepicker/src/generated/time-list.view.generated.ts
7
- function p({ view: e, slots: t = {} }) {
8
+ function m({ view: e, slots: t = {} }) {
8
9
  return o`
9
10
  <ul data-mps="timepicker" ${r(e.list)}>
10
11
  ${l(e.slots, (e) => e.key, (e) => o`
@@ -17,7 +18,7 @@ function p({ view: e, slots: t = {} }) {
17
18
  }
18
19
  //#endregion
19
20
  //#region libs/mintplayer-web-components/timepicker/src/generated/mp-time-list.generated.ts
20
- var m = class extends a {
21
+ var h = class extends a {
21
22
  static {
22
23
  this.properties = {
23
24
  selectedTime: { attribute: !1 },
@@ -44,7 +45,7 @@ var m = class extends a {
44
45
  labels: { attribute: !1 }
45
46
  };
46
47
  }
47
- #e = new e(this, u, {
48
+ #e = new e(this, d, {
48
49
  idPrefix: "mp-time-list",
49
50
  inputs: () => ({
50
51
  selectedTime: this.selectedTime,
@@ -68,16 +69,16 @@ var m = class extends a {
68
69
  return this;
69
70
  }
70
71
  render() {
71
- return p({ ...this.#e.props() });
72
+ return m({ ...this.#e.props() });
72
73
  }
73
74
  focusList(...e) {
74
75
  return this.#e.call("focusList", e);
75
76
  }
76
77
  };
77
- typeof document < "u" && document.head && c("timepicker", f), customElements.get("mp-time-list") || customElements.define("mp-time-list", m);
78
+ typeof document < "u" && document.head && (c(u.key, u.css, { order: u.order }), c("timepicker", p)), customElements.get("mp-time-list") || customElements.define("mp-time-list", h);
78
79
  //#endregion
79
80
  //#region libs/mintplayer-web-components/timepicker/src/generated/timepicker.view.generated.ts
80
- function h({ view: e, slots: t = {} }) {
81
+ function g({ view: e, slots: t = {} }) {
81
82
  return o`
82
83
  <div data-mps="timepicker" ${r(e.group)}>
83
84
  <input data-mps="timepicker" ${r(e.input)}>
@@ -106,7 +107,7 @@ function h({ view: e, slots: t = {} }) {
106
107
  }
107
108
  //#endregion
108
109
  //#region libs/mintplayer-web-components/timepicker/src/generated/mp-timepicker.generated.ts
109
- var g = class extends a {
110
+ var _ = class extends a {
110
111
  static {
111
112
  this.properties = {
112
113
  selectedTime: { attribute: !1 },
@@ -157,7 +158,7 @@ var g = class extends a {
157
158
  labels: { attribute: !1 }
158
159
  };
159
160
  }
160
- #e = new e(this, d, {
161
+ #e = new e(this, f, {
161
162
  idPrefix: "mp-timepicker",
162
163
  inputs: () => ({
163
164
  selectedTime: this.selectedTime,
@@ -188,7 +189,7 @@ var g = class extends a {
188
189
  return this;
189
190
  }
190
191
  render() {
191
- return h({ ...this.#e.props() });
192
+ return g({ ...this.#e.props() });
192
193
  }
193
194
  open(...e) {
194
195
  return this.#e.call("open", e);
@@ -197,6 +198,6 @@ var g = class extends a {
197
198
  return this.#e.call("close", e);
198
199
  }
199
200
  };
200
- typeof document < "u" && document.head && c("timepicker", f), customElements.get("mp-timepicker") || customElements.define("mp-timepicker", g);
201
+ typeof document < "u" && document.head && (c(u.key, u.css, { order: u.order }), c("timepicker", p)), customElements.get("mp-timepicker") || customElements.define("mp-timepicker", _);
201
202
  //#endregion
202
- export { m as MpTimeList, g as MpTimepicker };
203
+ export { h as MpTimeList, _ as MpTimepicker };
@@ -3,11 +3,14 @@ import { installLightStyles as n, scopedHtml as r } from "../light-dom/index.mjs
3
3
  import { MachineController as i, props as a } from "../machine/index.mjs";
4
4
  import { LitElement as o, nothing as s } from "lit";
5
5
  import { trackOpenSide as c } from "@mintplayer/ui-core/overlay";
6
- import { repeat as l } from "lit/directives/repeat.js";
7
- import { live as u } from "lit/directives/live.js";
8
- import { TYPEAHEAD_SCOPE as d, TypeaheadMachine as f, connect as p, inMemoryTypeaheadProvider as m, typeaheadScopedStyles as h, typeaheadScopedStyles as g } from "@mintplayer/ui-core/typeahead";
6
+ import { installBootstrap as l } from "@mintplayer/ui-core/bootstrap";
7
+ import { repeat as u } from "lit/directives/repeat.js";
8
+ import { bootstrapForms as d } from "@mintplayer/ui-core/bootstrap/forms";
9
+ import { bootstrapDropdown as f } from "@mintplayer/ui-core/bootstrap/dropdown";
10
+ import { live as p } from "lit/directives/live.js";
11
+ import { TYPEAHEAD_SCOPE as m, TypeaheadMachine as h, connect as g, inMemoryTypeaheadProvider as _, typeaheadScopedStyles as v, typeaheadScopedStyles as y } from "@mintplayer/ui-core/typeahead";
9
12
  //#region libs/mintplayer-web-components/typeahead/src/components/mp-typeahead.ts
10
- var _ = r(d), v = 0, y = [
13
+ var b = r(m), x = 0, S = [
11
14
  "value",
12
15
  "name",
13
16
  "disabled",
@@ -18,15 +21,15 @@ var _ = r(d), v = 0, y = [
18
21
  "no-results-label",
19
22
  "error-text",
20
23
  "aria-label"
21
- ], b = class extends e(o) {
24
+ ], C = class extends e(o) {
22
25
  static get observedAttributes() {
23
- return [...super.observedAttributes ?? [], ...y];
26
+ return [...super.observedAttributes ?? [], ...S];
24
27
  }
25
28
  createRenderRoot() {
26
29
  return this;
27
30
  }
28
- #e = `mp-typeahead-${++v}`;
29
- #t = new i(this, new f({
31
+ #e = `mp-typeahead-${++x}`;
32
+ #t = new i(this, new h({
30
33
  id: this.#e,
31
34
  onChange: (e) => this.#d("value-change", { value: e }),
32
35
  onSelect: (e, t) => this.#d("select", {
@@ -39,7 +42,7 @@ var _ = r(d), v = 0, y = [
39
42
  onSearch: (e) => this.#d("search", { term: e }),
40
43
  onError: (e) => this.#d("load-error", { error: e })
41
44
  }));
42
- #n = new t(this, { referenceTarget: () => this.querySelector(`input[data-mps=${d}]`) });
45
+ #n = new t(this, { referenceTarget: () => this.querySelector(`input[data-mps=${m}]`) });
43
46
  #r = null;
44
47
  #i = !1;
45
48
  #a = "";
@@ -168,7 +171,7 @@ var _ = r(d), v = 0, y = [
168
171
  }
169
172
  #l = null;
170
173
  connectedCallback() {
171
- super.connectedCallback(), this.#l ??= c(this.machine, () => this.querySelector(`input[data-mps=${d}]`), () => this.querySelector(`ul[data-mps=${d}]`));
174
+ super.connectedCallback(), this.#l ??= c(this.machine, () => this.querySelector(`input[data-mps=${m}]`), () => this.querySelector(`ul[data-mps=${m}]`));
172
175
  }
173
176
  disconnectedCallback() {
174
177
  super.disconnectedCallback(), this.#l?.(), this.#l = null, queueMicrotask(() => {
@@ -179,17 +182,17 @@ var _ = r(d), v = 0, y = [
179
182
  this.querySelector("input")?.focus(e);
180
183
  }
181
184
  render() {
182
- let e = this.#t.state, t = p(e, this.#e, {
185
+ let e = this.#t.state, t = g(e, this.#e, {
183
186
  name: null,
184
187
  hydrated: !0
185
188
  }), { value: n, ...r } = t.input, i = this.machine;
186
- return _`
189
+ return b`
187
190
  <div class="mp-typeahead" ${a(t.root)}>
188
191
  <input
189
192
  class="form-control"
190
193
  type="text"
191
194
  ${a(r)}
192
- .value=${u(e.term)}
195
+ .value=${p(e.term)}
193
196
  @input=${(e) => i.setTerm(e.target.value)}
194
197
  @keydown=${(e) => {
195
198
  i.keydown(e.key, e) && e.preventDefault();
@@ -197,8 +200,8 @@ var _ = r(d), v = 0, y = [
197
200
  @blur=${() => i.blur()}
198
201
  />
199
202
  <ul class="dropdown-menu" ${a(t.listbox)}>
200
- ${t.status ? _`<li class="ta-status" ${a(t.status.attrs)}>${t.status.text}</li>` : s}
201
- ${l(e.items, (e, t) => i.itemKeyOf(e) ?? t, (n, r) => _`
203
+ ${t.status ? b`<li class="ta-status" ${a(t.status.attrs)}>${t.status.text}</li>` : s}
204
+ ${u(e.items, (e, t) => i.itemKeyOf(e) ?? t, (n, r) => b`
202
205
  <li
203
206
  class="dropdown-item"
204
207
  ${a(t.option(r))}
@@ -208,7 +211,7 @@ var _ = r(d), v = 0, y = [
208
211
  `)}
209
212
  </ul>
210
213
  <span class="visually-hidden" ${a(t.live.attrs)}>${t.live.text}</span>
211
- ${t.error ? _`<div class="ta-error" ${a(t.error.attrs)}>${t.error.text}</div>` : s}
214
+ ${t.error ? b`<div class="ta-error" ${a(t.error.attrs)}>${t.error.text}</div>` : s}
212
215
  </div>
213
216
  `;
214
217
  }
@@ -223,6 +226,6 @@ var _ = r(d), v = 0, y = [
223
226
  }));
224
227
  }
225
228
  };
226
- n(d, g), typeof customElements < "u" && !customElements.get("mp-typeahead") && customElements.define("mp-typeahead", b);
229
+ l(d, f), n(m, y), typeof customElements < "u" && !customElements.get("mp-typeahead") && customElements.define("mp-typeahead", C);
227
230
  //#endregion
228
- export { b as MpTypeahead, m as inMemoryTypeaheadProvider, h as typeaheadScopedStyles };
231
+ export { C as MpTypeahead, _ as inMemoryTypeaheadProvider, v as typeaheadScopedStyles };
@@ -1 +0,0 @@
1
- "use strict";(function(){var i="bs-theme-mode",l=/^[a-z0-9-]{1,32}$/i;function o(e){return typeof e=="string"&&l.test(e)}function c(e){try{return decodeURIComponent(e)}catch(t){return null}}function f(e){if(!e)return null;var t=i+"=",n=e.split(";").map(function(u){return u.trim()}).filter(function(u){return u.slice(0,t.length)===t});if(n.length===0)return null;var a=c(m(n[0].slice(t.length).trim()));return o(a)?a.toLowerCase():null}function m(e){return e.length>1&&e.charAt(0)==='"'&&e.charAt(e.length-1)==='"'?e.slice(1,-1):e}var s="bs-theme-default-mode";function h(e,t){return e==="auto"?t?"dark":"light":e}function d(e){if(!e||typeof e.querySelector!="function")return null;var t=e.querySelector('meta[name="'+s+'"]'),n=t?t.getAttribute("content"):null;return o(n)?n.toLowerCase():null}try{var r=document,E=f(r.cookie)||d(r)||"auto",M=!!(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);r.documentElement.setAttribute("data-bs-theme",h(E,M))}catch(e){}})();