tinkiet 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion.d.ts +4 -0
- package/accordion/index.js +30 -38
- package/badge/badge.d.ts +2 -2
- package/badge/index.js +25 -5
- package/box/box.d.ts +1 -1
- package/box/focusable-box.d.ts +1 -1
- package/checkbox/checkbox.d.ts +5 -3
- package/checkbox/index.js +55 -42
- package/chip/chip.d.ts +15 -0
- package/chip/index.js +52 -7
- package/index.js +347 -178
- package/loading/index.js +107 -12
- package/loading/loading.d.ts +1 -0
- package/package.json +12 -6
- package/pages/index.js +38 -22
- package/pages/pages.d.ts +2 -0
- package/router/index.d.ts +48 -0
- package/router/index.js +246 -0
- package/router/route-matcher.d.ts +4 -0
- package/umd/tinkiet.min.js +137 -124
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as __WEBPACK_EXTERNAL_MODULE_lit__ from "lit";
|
|
2
2
|
import * as __WEBPACK_EXTERNAL_MODULE_lit_directives_if_defined_js_76c6050d__ from "lit/directives/if-defined.js";
|
|
3
|
-
import
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE_lit_directives_class_map_js_2f88e643__ from "lit/directives/class-map.js";
|
|
4
4
|
import { unsafeHTML as __WEBPACK_EXTERNAL_MODULE_lit_directives_unsafe_html_js_56553e3e_unsafeHTML__ } from "lit/directives/unsafe-html.js";
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE_lit_decorators_js_226d44c5__ from "lit/decorators.js";
|
|
6
6
|
/******/ var __webpack_modules__ = ({
|
|
@@ -514,8 +514,10 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
514
514
|
var external_lit_ = __webpack_require__(2927);
|
|
515
515
|
// EXTERNAL MODULE: external "lit/decorators.js"
|
|
516
516
|
var decorators_js_ = __webpack_require__(8899);
|
|
517
|
+
// EXTERNAL MODULE: external "lit/directives/class-map.js"
|
|
518
|
+
var class_map_js_ = __webpack_require__(4955);
|
|
517
519
|
;// ./tinkiet/badge/badge.scss
|
|
518
|
-
/* harmony default export */ const badge = ("*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:rgba(0,0,0,0);box-sizing:border-box}:host{display:inline-flex}:host .badge{background-color:hsl(var(--error));font-family:\"Trebuchet MS\",\"Lucida Sans Unicode\",\"Lucida Grande\",\"Lucida Sans\",Arial,sans-serif;color:hsl(var(--on-error));height:16px;min-width:16px;max-width:34px;border-radius:8px;padding:4px;font-size:10px;line-height:8px;text-align:center;white-space:nowrap;user-select:none;cursor:inherit}:host .badge.empty{height:6px;width:6px;min-width:6px;border-radius:100%}");
|
|
520
|
+
/* harmony default export */ const badge = ("*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:rgba(0,0,0,0);box-sizing:border-box}:host{display:inline-flex}:host .badge{background-color:var(--tk-badge-color, hsl(var(--error)));font-family:\"Trebuchet MS\",\"Lucida Sans Unicode\",\"Lucida Grande\",\"Lucida Sans\",Arial,sans-serif;color:var(--tk-badge-text-color, hsl(var(--on-error)));height:16px;min-width:16px;max-width:34px;border-radius:8px;padding:4px;font-size:10px;line-height:8px;text-align:center;white-space:nowrap;user-select:none;cursor:inherit}:host .badge.empty{height:6px;width:6px;min-width:6px;border-radius:100%}");
|
|
519
521
|
;// ./tinkiet/badge/badge.ts
|
|
520
522
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
521
523
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -526,26 +528,32 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
526
528
|
|
|
527
529
|
|
|
528
530
|
|
|
531
|
+
|
|
529
532
|
/**
|
|
530
533
|
* A badge WebComponent
|
|
531
|
-
* @cssprop --tk-badge-color -
|
|
532
|
-
* @cssprop --tk-badge-text-color -
|
|
534
|
+
* @cssprop --tk-badge-color - Badge background color (defaults to --primary)
|
|
535
|
+
* @cssprop --tk-badge-text-color - Badge text color (defaults to --on-primary)
|
|
533
536
|
*/
|
|
534
537
|
let TkBadge = class TkBadge extends external_lit_.LitElement {
|
|
538
|
+
constructor() {
|
|
539
|
+
super(...arguments);
|
|
540
|
+
this.label = "";
|
|
541
|
+
}
|
|
535
542
|
static get styles() {
|
|
536
543
|
return (0,external_lit_.css) `
|
|
537
544
|
${(0,external_lit_.unsafeCSS)(badge)}
|
|
538
545
|
`;
|
|
539
546
|
}
|
|
540
547
|
render() {
|
|
548
|
+
const isEmpty = this.label.trim().length === 0;
|
|
541
549
|
return (0,external_lit_.html) `
|
|
542
550
|
<slot></slot>
|
|
543
|
-
<div class
|
|
551
|
+
<div class=${(0,class_map_js_.classMap)({ badge: true, empty: isEmpty })}>${this.label}</div>
|
|
544
552
|
`;
|
|
545
553
|
}
|
|
546
554
|
};
|
|
547
555
|
__decorate([
|
|
548
|
-
(0,decorators_js_.property)()
|
|
556
|
+
(0,decorators_js_.property)({ type: String })
|
|
549
557
|
], TkBadge.prototype, "label", void 0);
|
|
550
558
|
TkBadge = __decorate([
|
|
551
559
|
(0,decorators_js_.customElement)("tk-badge")
|
|
@@ -568,8 +576,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
568
576
|
var external_lit_ = __webpack_require__(2927);
|
|
569
577
|
// EXTERNAL MODULE: external "lit/decorators.js"
|
|
570
578
|
var decorators_js_ = __webpack_require__(8899);
|
|
571
|
-
// EXTERNAL MODULE: external "lit/directives/
|
|
572
|
-
var
|
|
579
|
+
// EXTERNAL MODULE: external "lit/directives/class-map.js"
|
|
580
|
+
var class_map_js_ = __webpack_require__(4955);
|
|
573
581
|
// EXTERNAL MODULE: ./tinkiet/box/index.ts
|
|
574
582
|
var box = __webpack_require__(3433);
|
|
575
583
|
// EXTERNAL MODULE: ./tinkiet/utils/unique.ts
|
|
@@ -591,15 +599,22 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
591
599
|
|
|
592
600
|
let TkCheckbox = class TkCheckbox extends external_lit_.LitElement {
|
|
593
601
|
constructor() {
|
|
594
|
-
super(
|
|
602
|
+
super();
|
|
595
603
|
this._id = (0,unique/* uniqueID */.z)();
|
|
596
604
|
this.checked = false;
|
|
597
605
|
this.disabled = false;
|
|
606
|
+
this.indeterminate = false;
|
|
607
|
+
this.handleClick = this.handleClick.bind(this);
|
|
608
|
+
this.onKeyDown = this.onKeyDown.bind(this);
|
|
598
609
|
}
|
|
599
610
|
render() {
|
|
611
|
+
const containerClasses = {
|
|
612
|
+
state: true,
|
|
613
|
+
disabled: this.disabled
|
|
614
|
+
};
|
|
600
615
|
return (0,external_lit_.html) `
|
|
601
|
-
<tk-box direction="row" align-items="center">
|
|
602
|
-
<tk-box ripple tabindex="${this.disabled ? -1 : 0}" class
|
|
616
|
+
<tk-box direction="row" align-items="center" @click=${this.handleClick}>
|
|
617
|
+
<tk-box ripple tabindex="${this.disabled ? -1 : 0}" class=${(0,class_map_js_.classMap)(containerClasses)} @keydown=${this.onKeyDown}>
|
|
603
618
|
<div class="checkbox">
|
|
604
619
|
<svg id="checkmark" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" preserveAspectRatio="none" viewBox="0 0 24 24">
|
|
605
620
|
<path id="checkmark-path" fill="none" d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
|
|
@@ -609,33 +624,24 @@ let TkCheckbox = class TkCheckbox extends external_lit_.LitElement {
|
|
|
609
624
|
</tk-box>
|
|
610
625
|
<span class="label"><slot></slot></span>
|
|
611
626
|
</tk-box>
|
|
612
|
-
<input
|
|
613
|
-
id=${this._id}
|
|
614
|
-
slot="none"
|
|
615
|
-
style="display: none;"
|
|
616
|
-
?checked=${this.checked}
|
|
617
|
-
type="checkbox"
|
|
618
|
-
name="${(0,if_defined_js_.ifDefined)(this.name)}"
|
|
619
|
-
value="${(0,if_defined_js_.ifDefined)(this.value)}"
|
|
620
|
-
aria-hidden="true"
|
|
621
|
-
tabindex="-1"
|
|
622
|
-
/>
|
|
623
627
|
`;
|
|
624
628
|
}
|
|
625
|
-
connectedCallback() {
|
|
626
|
-
super.connectedCallback();
|
|
627
|
-
this.addEventListener("click", this.handleClick.bind(this));
|
|
628
|
-
this.addEventListener("keydown", this.onKeyDown.bind(this));
|
|
629
|
-
}
|
|
630
|
-
disconnectedCallback() {
|
|
631
|
-
super.disconnectedCallback();
|
|
632
|
-
this.removeEventListener("click", this.handleClick);
|
|
633
|
-
this.removeEventListener("keydown", this.onKeyDown);
|
|
634
|
-
}
|
|
635
629
|
firstUpdated() {
|
|
630
|
+
this.$input = document.createElement("input");
|
|
631
|
+
this.$input.type = "checkbox";
|
|
632
|
+
this.$input.slot = "none";
|
|
633
|
+
this.$input.style.display = "none";
|
|
634
|
+
this.$input.setAttribute("aria-hidden", "true");
|
|
635
|
+
this.$input.tabIndex = -1;
|
|
636
|
+
this.syncInput();
|
|
636
637
|
this.appendChild(this.$input);
|
|
637
638
|
}
|
|
639
|
+
updated() {
|
|
640
|
+
this.syncInput();
|
|
641
|
+
}
|
|
638
642
|
onKeyDown(e) {
|
|
643
|
+
if (this.disabled)
|
|
644
|
+
return;
|
|
639
645
|
if (e.code === "Space" || e.code === "Enter") {
|
|
640
646
|
e.preventDefault();
|
|
641
647
|
e.stopPropagation();
|
|
@@ -643,9 +649,24 @@ let TkCheckbox = class TkCheckbox extends external_lit_.LitElement {
|
|
|
643
649
|
}
|
|
644
650
|
}
|
|
645
651
|
handleClick() {
|
|
652
|
+
if (this.disabled)
|
|
653
|
+
return;
|
|
646
654
|
this.checked = !this.checked;
|
|
655
|
+
if (this.indeterminate)
|
|
656
|
+
this.indeterminate = false;
|
|
647
657
|
setTimeout(() => this.dispatchEvent(new Event("change", { bubbles: true, composed: true })));
|
|
648
658
|
}
|
|
659
|
+
syncInput() {
|
|
660
|
+
var _a, _b;
|
|
661
|
+
if (!this.$input)
|
|
662
|
+
return;
|
|
663
|
+
this.$input.id = this._id;
|
|
664
|
+
this.$input.name = (_a = this.name) !== null && _a !== void 0 ? _a : "";
|
|
665
|
+
this.$input.value = (_b = this.value) !== null && _b !== void 0 ? _b : "on";
|
|
666
|
+
this.$input.checked = this.checked;
|
|
667
|
+
this.$input.disabled = this.disabled;
|
|
668
|
+
this.$input.indeterminate = this.indeterminate;
|
|
669
|
+
}
|
|
649
670
|
};
|
|
650
671
|
TkCheckbox.styles = (0,external_lit_.css) `
|
|
651
672
|
${(0,external_lit_.unsafeCSS)(checkbox_checkbox)}
|
|
@@ -660,11 +681,11 @@ __decorate([
|
|
|
660
681
|
(0,decorators_js_.property)({ attribute: true, type: Boolean, reflect: true })
|
|
661
682
|
], TkCheckbox.prototype, "checked", void 0);
|
|
662
683
|
__decorate([
|
|
663
|
-
(0,decorators_js_.property)({ type: Boolean })
|
|
684
|
+
(0,decorators_js_.property)({ attribute: true, type: Boolean, reflect: true })
|
|
664
685
|
], TkCheckbox.prototype, "disabled", void 0);
|
|
665
686
|
__decorate([
|
|
666
|
-
(0,decorators_js_.
|
|
667
|
-
], TkCheckbox.prototype, "
|
|
687
|
+
(0,decorators_js_.property)({ attribute: true, type: Boolean, reflect: true })
|
|
688
|
+
], TkCheckbox.prototype, "indeterminate", void 0);
|
|
668
689
|
TkCheckbox = __decorate([
|
|
669
690
|
(0,decorators_js_.customElement)("tk-checkbox")
|
|
670
691
|
], TkCheckbox);
|
|
@@ -686,8 +707,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
686
707
|
var external_lit_ = __webpack_require__(2927);
|
|
687
708
|
// EXTERNAL MODULE: external "lit/decorators.js"
|
|
688
709
|
var decorators_js_ = __webpack_require__(8899);
|
|
689
|
-
// EXTERNAL MODULE: external "lit/directives/if-defined.js"
|
|
690
|
-
var if_defined_js_ = __webpack_require__(3517);
|
|
691
710
|
// EXTERNAL MODULE: ./tinkiet/box/index.ts
|
|
692
711
|
var box = __webpack_require__(3433);
|
|
693
712
|
// EXTERNAL MODULE: ./tinkiet/utils/unique.ts
|
|
@@ -729,7 +748,7 @@ __decorate([
|
|
|
729
748
|
], TkFocusableBox.prototype, "disabled", void 0);
|
|
730
749
|
|
|
731
750
|
;// ./tinkiet/accordion/accordion.scss
|
|
732
|
-
/* harmony default export */ const accordion = ("*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:rgba(0,0,0,0);box-sizing:border-box}:host .header{color:hsl(var(--on-surface));background-color:hsl(var(--surface-container-
|
|
751
|
+
/* harmony default export */ const accordion = ("*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:rgba(0,0,0,0);box-sizing:border-box}:host .header{position:relative;overflow:hidden;color:hsl(var(--on-surface));background-color:hsl(var(--surface-container-low));padding:16px;border:1px solid hsl(var(--outline-variant));border-radius:12px;box-shadow:0px 1px 2px 0px rgba(0,0,0,.3),0px 1px 3px 1px rgba(0,0,0,.15);gap:12px;cursor:pointer;transition:background-color var(--transition-duration-medium, 180ms) var(--transition-timing-function-deceleration-curve, cubic-bezier(0, 0, 0.2, 1)),color var(--transition-duration-medium, 180ms) var(--transition-timing-function-deceleration-curve, cubic-bezier(0, 0, 0.2, 1)),box-shadow var(--transition-duration-medium, 180ms) var(--transition-timing-function-deceleration-curve, cubic-bezier(0, 0, 0.2, 1)),border-color var(--transition-duration-medium, 180ms) var(--transition-timing-function-deceleration-curve, cubic-bezier(0, 0, 0.2, 1))}:host .header:after{transition:transform .3s var(--transition-timing-function-deceleration-curve, cubic-bezier(0, 0, 0.2, 1));content:\"▼\";display:inline-block;font-size:12px;margin-inline-start:8px}:host .header:before{content:\"\";position:absolute;inset:0;background:hsl(var(--on-surface));opacity:0;transition:opacity var(--transition-duration-medium, 180ms) var(--transition-timing-function-deceleration-curve, cubic-bezier(0, 0, 0.2, 1));pointer-events:none}:host .header .before{width:fit-content}:host .header .header-content{flex:1}:host .content{width:100%;margin:4px 0 0;padding:0 16px;opacity:0;visibility:hidden;max-height:0;overflow:hidden;transform:translateY(-8px);transition:max-height .28s var(--transition-timing-function-deceleration-curve, cubic-bezier(0, 0, 0.2, 1)),opacity .28s var(--transition-timing-function-deceleration-curve, cubic-bezier(0, 0, 0.2, 1)),transform .28s var(--transition-timing-function-deceleration-curve, cubic-bezier(0, 0, 0.2, 1));background:hsl(var(--surface-container-lowest));border-radius:0 0 12px 12px}:host h3,:host h5{margin:0}:host .header:hover:before{opacity:.08}:host .header:active:before{opacity:.12}:host .header:focus-visible{outline:none;border-color:hsl(var(--primary));box-shadow:0px 1px 2px 0px rgba(0,0,0,.3),0px 2px 6px 2px rgba(0,0,0,.15),0 0 0 3px hsl(var(--primary)/0.2)}:host([checked]) .header{background-color:hsl(var(--primary-container));color:hsl(var(--on-primary-container));border-color:hsl(var(--primary));box-shadow:0px 1px 2px 0px rgba(0,0,0,.3),0px 2px 6px 2px rgba(0,0,0,.15)}:host([checked]) .header:after{transform:rotate(180deg)}:host([checked]) .header:before{background:hsl(var(--on-primary-container))}:host([checked]) .content{opacity:1;visibility:visible;max-height:var(--tk-accordion-max-height, 1000px);padding:12px 16px;transform:translateY(0);transition:max-height .28s var(--transition-timing-function-deceleration-curve, cubic-bezier(0, 0, 0.2, 1)),opacity .28s var(--transition-timing-function-deceleration-curve, cubic-bezier(0, 0, 0.2, 1)),transform .28s var(--transition-timing-function-deceleration-curve, cubic-bezier(0, 0, 0.2, 1))}:host([pill]) .header{border-radius:9999px}@media(prefers-reduced-motion: reduce){:host .header:after{transition:none}:host .header:before{transition:none}:host .header{transition:none}:host .content{transition:none}}");
|
|
733
752
|
;// ./tinkiet/accordion/accordion.ts
|
|
734
753
|
var accordion_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
735
754
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -742,13 +761,7 @@ var accordion_decorate = (undefined && undefined.__decorate) || function (decora
|
|
|
742
761
|
|
|
743
762
|
|
|
744
763
|
|
|
745
|
-
|
|
746
764
|
let TkAccordion = class TkAccordion extends TkFocusableBox {
|
|
747
|
-
constructor() {
|
|
748
|
-
super(...arguments);
|
|
749
|
-
this.checked = false;
|
|
750
|
-
this.rippleHeader = false;
|
|
751
|
-
}
|
|
752
765
|
static get styles() {
|
|
753
766
|
return [
|
|
754
767
|
...box/* TkBox */.P.styles,
|
|
@@ -757,11 +770,17 @@ let TkAccordion = class TkAccordion extends TkFocusableBox {
|
|
|
757
770
|
`
|
|
758
771
|
];
|
|
759
772
|
}
|
|
773
|
+
constructor() {
|
|
774
|
+
super();
|
|
775
|
+
this.checked = false;
|
|
776
|
+
this.rippleHeader = false;
|
|
777
|
+
this.handleClick = this.handleClick.bind(this);
|
|
778
|
+
}
|
|
760
779
|
render() {
|
|
761
780
|
return (0,external_lit_.html) `
|
|
762
781
|
<tk-box margin="small">
|
|
763
782
|
<tk-box
|
|
764
|
-
@click=${this.handleClick
|
|
783
|
+
@click=${this.handleClick}
|
|
765
784
|
?ripple=${this.rippleHeader}
|
|
766
785
|
class="header"
|
|
767
786
|
direction="row"
|
|
@@ -779,22 +798,22 @@ let TkAccordion = class TkAccordion extends TkFocusableBox {
|
|
|
779
798
|
<slot></slot>
|
|
780
799
|
</tk-box>
|
|
781
800
|
</tk-box>
|
|
782
|
-
<input
|
|
783
|
-
id=${this.id}
|
|
784
|
-
slot="none"
|
|
785
|
-
style="display: none;"
|
|
786
|
-
type="radio"
|
|
787
|
-
?checked="${this.checked}"
|
|
788
|
-
?disabled="${this.disabled}"
|
|
789
|
-
name="${(0,if_defined_js_.ifDefined)(this.name)}"
|
|
790
|
-
aria-hidden="true"
|
|
791
|
-
tabindex="-1"
|
|
792
|
-
/>
|
|
793
801
|
`;
|
|
794
802
|
}
|
|
795
803
|
firstUpdated() {
|
|
804
|
+
this.$input = document.createElement("input");
|
|
805
|
+
this.$input.type = "radio";
|
|
806
|
+
this.$input.slot = "none";
|
|
807
|
+
this.$input.style.display = "none";
|
|
808
|
+
this.$input.setAttribute("aria-hidden", "true");
|
|
809
|
+
this.$input.tabIndex = -1;
|
|
810
|
+
this.syncInput();
|
|
796
811
|
this.appendChild(this.$input);
|
|
797
812
|
}
|
|
813
|
+
updated(changed) {
|
|
814
|
+
super.updated(changed);
|
|
815
|
+
this.syncInput();
|
|
816
|
+
}
|
|
798
817
|
onKeyDown(e) {
|
|
799
818
|
if (e.code === "Space" || e.code === "Enter") {
|
|
800
819
|
e.preventDefault();
|
|
@@ -808,7 +827,16 @@ let TkAccordion = class TkAccordion extends TkFocusableBox {
|
|
|
808
827
|
this.getRootNode()
|
|
809
828
|
.querySelectorAll(`tk-accordion[name="${this.name}"]`)
|
|
810
829
|
.forEach(el => (el != this ? (el.checked = false) : null));
|
|
811
|
-
this.dispatchEvent(new Event("change"));
|
|
830
|
+
this.dispatchEvent(new Event("change", { bubbles: true, composed: true }));
|
|
831
|
+
}
|
|
832
|
+
syncInput() {
|
|
833
|
+
var _a;
|
|
834
|
+
if (!this.$input)
|
|
835
|
+
return;
|
|
836
|
+
this.$input.id = this.id;
|
|
837
|
+
this.$input.name = (_a = this.name) !== null && _a !== void 0 ? _a : "";
|
|
838
|
+
this.$input.checked = this.checked;
|
|
839
|
+
this.$input.disabled = this.disabled;
|
|
812
840
|
}
|
|
813
841
|
};
|
|
814
842
|
accordion_decorate([
|
|
@@ -820,9 +848,6 @@ accordion_decorate([
|
|
|
820
848
|
accordion_decorate([
|
|
821
849
|
(0,decorators_js_.property)({ attribute: "ripple-header", type: Boolean })
|
|
822
850
|
], TkAccordion.prototype, "rippleHeader", void 0);
|
|
823
|
-
accordion_decorate([
|
|
824
|
-
(0,decorators_js_.query)("input")
|
|
825
|
-
], TkAccordion.prototype, "$input", void 0);
|
|
826
851
|
TkAccordion = accordion_decorate([
|
|
827
852
|
(0,decorators_js_.customElement)("tk-accordion")
|
|
828
853
|
], TkAccordion);
|
|
@@ -1099,7 +1124,7 @@ var x = (y) => {
|
|
|
1099
1124
|
var x = {}; __webpack_require__.d(x, y); return x
|
|
1100
1125
|
}
|
|
1101
1126
|
var y = (x) => (() => (x))
|
|
1102
|
-
module.exports = x({ ["LitElement"]: () => (__WEBPACK_EXTERNAL_MODULE_lit__.LitElement), ["css"]: () => (__WEBPACK_EXTERNAL_MODULE_lit__.css), ["html"]: () => (__WEBPACK_EXTERNAL_MODULE_lit__.html), ["unsafeCSS"]: () => (__WEBPACK_EXTERNAL_MODULE_lit__.unsafeCSS) });
|
|
1127
|
+
module.exports = x({ ["LitElement"]: () => (__WEBPACK_EXTERNAL_MODULE_lit__.LitElement), ["css"]: () => (__WEBPACK_EXTERNAL_MODULE_lit__.css), ["html"]: () => (__WEBPACK_EXTERNAL_MODULE_lit__.html), ["nothing"]: () => (__WEBPACK_EXTERNAL_MODULE_lit__.nothing), ["unsafeCSS"]: () => (__WEBPACK_EXTERNAL_MODULE_lit__.unsafeCSS) });
|
|
1103
1128
|
|
|
1104
1129
|
/***/ }),
|
|
1105
1130
|
|
|
@@ -1135,7 +1160,7 @@ var external_lit_ = __webpack_require__(2927);
|
|
|
1135
1160
|
// EXTERNAL MODULE: external "lit/decorators.js"
|
|
1136
1161
|
var decorators_js_ = __webpack_require__(8899);
|
|
1137
1162
|
;// ./tinkiet/chip/chip.scss
|
|
1138
|
-
/* harmony default export */ const chip = ("*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:rgba(0,0,0,0);box-sizing:border-box}
|
|
1163
|
+
/* harmony default export */ const chip = ("*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:rgba(0,0,0,0);box-sizing:border-box}.chip{display:inline-flex;align-items:center;border-radius:10px;padding:3px 10px;background:hsl(var(--surface-container-highest));border:1px solid hsl(var(--outline-variant));font-size:13px;height:30px;gap:6px;line-height:1;cursor:pointer}.chip.disabled{opacity:.4;pointer-events:none}.chip .leading{display:inline-flex;align-items:center}.chip .leading slot::slotted(*){display:inline-flex;align-items:center}.chip .label{white-space:nowrap;display:inline-flex;align-items:center;line-height:1}.chip .trailing{display:inline-flex;align-items:center}.chip .trailing slot::slotted(*){display:inline-flex;align-items:center}.chip .trailing .remove{background:none;border:none;cursor:pointer;font-size:13px;line-height:1;opacity:.7}.chip .trailing .remove:hover{opacity:1}");
|
|
1139
1164
|
;// ./tinkiet/chip/chip.ts
|
|
1140
1165
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1141
1166
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -1146,16 +1171,61 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
1146
1171
|
|
|
1147
1172
|
|
|
1148
1173
|
|
|
1174
|
+
/**
|
|
1175
|
+
* Material-style Chip component.
|
|
1176
|
+
*
|
|
1177
|
+
* Slots :
|
|
1178
|
+
* • default <slot> → label text
|
|
1179
|
+
* • <slot name="leading"> → leading icon / image
|
|
1180
|
+
* • <slot name="trailing"> → trailing icon (remove / action)
|
|
1181
|
+
*
|
|
1182
|
+
* Attributes :
|
|
1183
|
+
* • removable (boolean) → affiche un trailing icon automatique (ex: bouton X)
|
|
1184
|
+
* • disabled (boolean)
|
|
1185
|
+
*/
|
|
1149
1186
|
let TkChip = class TkChip extends external_lit_.LitElement {
|
|
1187
|
+
constructor() {
|
|
1188
|
+
super(...arguments);
|
|
1189
|
+
this.disabled = false;
|
|
1190
|
+
this.removable = false;
|
|
1191
|
+
}
|
|
1192
|
+
onRemove() {
|
|
1193
|
+
this.dispatchEvent(new CustomEvent("remove", { bubbles: true, composed: true }));
|
|
1194
|
+
}
|
|
1150
1195
|
render() {
|
|
1151
1196
|
return (0,external_lit_.html) `
|
|
1152
|
-
|
|
1153
|
-
|
|
1197
|
+
<div class="chip ${this.disabled ? "disabled" : ""}">
|
|
1198
|
+
|
|
1199
|
+
<!-- 3. LEADING ICON (optional) -->
|
|
1200
|
+
<span class="leading">
|
|
1201
|
+
<slot name="leading"></slot>
|
|
1202
|
+
</span>
|
|
1203
|
+
|
|
1204
|
+
<!-- 2. LABEL TEXT -->
|
|
1205
|
+
<span class="label">
|
|
1206
|
+
<slot></slot>
|
|
1207
|
+
</span>
|
|
1208
|
+
|
|
1209
|
+
<!-- 4. TRAILING ICON -->
|
|
1210
|
+
<span class="trailing">
|
|
1211
|
+
<slot name="trailing">
|
|
1212
|
+
${this.removable
|
|
1213
|
+
? (0,external_lit_.html) `<button class="remove" @click=${this.onRemove}>✕</button>`
|
|
1214
|
+
: ""}
|
|
1215
|
+
</slot>
|
|
1216
|
+
</span>
|
|
1217
|
+
|
|
1218
|
+
</div>
|
|
1219
|
+
`;
|
|
1154
1220
|
}
|
|
1155
1221
|
};
|
|
1156
|
-
TkChip.styles = (0,external_lit_.css)
|
|
1157
|
-
|
|
1158
|
-
|
|
1222
|
+
TkChip.styles = (0,external_lit_.css) `${(0,external_lit_.unsafeCSS)(chip)}`;
|
|
1223
|
+
__decorate([
|
|
1224
|
+
(0,decorators_js_.property)({ type: Boolean })
|
|
1225
|
+
], TkChip.prototype, "disabled", void 0);
|
|
1226
|
+
__decorate([
|
|
1227
|
+
(0,decorators_js_.property)({ type: Boolean })
|
|
1228
|
+
], TkChip.prototype, "removable", void 0);
|
|
1159
1229
|
TkChip = __decorate([
|
|
1160
1230
|
(0,decorators_js_.customElement)("tk-chip")
|
|
1161
1231
|
], TkChip);
|
|
@@ -1409,7 +1479,7 @@ module.exports = x({ ["ifDefined"]: () => (__WEBPACK_EXTERNAL_MODULE_lit_directi
|
|
|
1409
1479
|
/***/ 3572:
|
|
1410
1480
|
/***/ ((__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) => {
|
|
1411
1481
|
|
|
1412
|
-
/* harmony import */ var _loading__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1482
|
+
/* harmony import */ var _loading__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8895);
|
|
1413
1483
|
|
|
1414
1484
|
|
|
1415
1485
|
|
|
@@ -1442,93 +1512,6 @@ function uniqueID(length = 10) {
|
|
|
1442
1512
|
}
|
|
1443
1513
|
|
|
1444
1514
|
|
|
1445
|
-
/***/ }),
|
|
1446
|
-
|
|
1447
|
-
/***/ 4646:
|
|
1448
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
// EXPORTS
|
|
1452
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
1453
|
-
k: () => (/* binding */ TkLoading)
|
|
1454
|
-
});
|
|
1455
|
-
|
|
1456
|
-
// EXTERNAL MODULE: external "lit"
|
|
1457
|
-
var external_lit_ = __webpack_require__(2927);
|
|
1458
|
-
// EXTERNAL MODULE: external "lit/decorators.js"
|
|
1459
|
-
var decorators_js_ = __webpack_require__(8899);
|
|
1460
|
-
;// external "lit/directives/class-map.js"
|
|
1461
|
-
|
|
1462
|
-
// EXTERNAL MODULE: ./tinkiet/box/index.ts
|
|
1463
|
-
var box = __webpack_require__(3433);
|
|
1464
|
-
;// ./tinkiet/loading/loading.scss
|
|
1465
|
-
/* harmony default export */ const loading = ("*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:rgba(0,0,0,0);box-sizing:border-box}:host{--color: hsl(var(--primary));--background-color: var(--tk-loading-background-color, hsl(var(--surface-dim)))}:host([secondary]){--color: hsl(var(--secondary))}:host([error]){--color: hsl(var(--error))}.circle{display:inline-flex;animation:rotator 3s linear infinite;transform-origin:center;width:56px;height:56px}.circle .path{stroke-dasharray:265;stroke-dashoffset:0;transform-origin:center;stroke:var(--color);animation:dash 3s ease-in-out infinite}@keyframes rotator{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dashoffset:265}50%{stroke-dashoffset:65;transform:rotate(90deg)}100%{stroke-dashoffset:265;transform:rotate(360deg)}}:host([small]) .circle{width:20px;height:20px}:host([small]) .line{height:2px}:host([large]) .circle{width:96px;height:96px}:host([large]) .line{height:14px}.line{position:relative;background-color:var(--background-color);overflow:hidden;height:6px}.line .progress{background-color:var(--color);height:100%}.line .indeterminate{background-color:var(--color)}.line .indeterminate:before{content:\"\";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;animation:indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite}.line .indeterminate:after{content:\"\";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;animation:indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;animation-delay:1.15s}@keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}100%{left:100%;right:-90%}}@keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}100%{left:107%;right:-8%}}");
|
|
1466
|
-
;// ./tinkiet/loading/loading.ts
|
|
1467
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1468
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1469
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1470
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1471
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1472
|
-
};
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
let TkLoading = class TkLoading extends box/* TkBox */.P {
|
|
1479
|
-
constructor() {
|
|
1480
|
-
super(...arguments);
|
|
1481
|
-
this.circle = false;
|
|
1482
|
-
this.indeterminate = false;
|
|
1483
|
-
this.percent = 0;
|
|
1484
|
-
}
|
|
1485
|
-
static get styles() {
|
|
1486
|
-
return [
|
|
1487
|
-
...box/* TkBox */.P.styles,
|
|
1488
|
-
(0,external_lit_.css) `
|
|
1489
|
-
${(0,external_lit_.unsafeCSS)(loading)}
|
|
1490
|
-
`
|
|
1491
|
-
];
|
|
1492
|
-
}
|
|
1493
|
-
render() {
|
|
1494
|
-
return (0,external_lit_.html) `
|
|
1495
|
-
${this.circle
|
|
1496
|
-
? (0,external_lit_.html) `
|
|
1497
|
-
<svg class="circle" viewBox="0 0 100 100">
|
|
1498
|
-
<circle
|
|
1499
|
-
class=${__WEBPACK_EXTERNAL_MODULE_lit_directives_class_map_js_2f88e643_classMap__({ indeterminate: this.indeterminate, path: true })}
|
|
1500
|
-
fill="none"
|
|
1501
|
-
stroke-width="1em"
|
|
1502
|
-
stroke-linecap="butt"
|
|
1503
|
-
cx="50"
|
|
1504
|
-
cy="50"
|
|
1505
|
-
r="40"
|
|
1506
|
-
></circle>
|
|
1507
|
-
</svg>
|
|
1508
|
-
`
|
|
1509
|
-
: (0,external_lit_.html) `
|
|
1510
|
-
<div class="line">
|
|
1511
|
-
<div class=${__WEBPACK_EXTERNAL_MODULE_lit_directives_class_map_js_2f88e643_classMap__({ progress: true, indeterminate: this.indeterminate })} style="${`width:${this.percent}%;`}"></div>
|
|
1512
|
-
</div>
|
|
1513
|
-
`}
|
|
1514
|
-
`;
|
|
1515
|
-
}
|
|
1516
|
-
};
|
|
1517
|
-
__decorate([
|
|
1518
|
-
(0,decorators_js_.property)({ attribute: true, type: Boolean })
|
|
1519
|
-
], TkLoading.prototype, "circle", void 0);
|
|
1520
|
-
__decorate([
|
|
1521
|
-
(0,decorators_js_.property)({ attribute: true, type: Boolean })
|
|
1522
|
-
], TkLoading.prototype, "indeterminate", void 0);
|
|
1523
|
-
__decorate([
|
|
1524
|
-
(0,decorators_js_.property)({ attribute: true, type: Number })
|
|
1525
|
-
], TkLoading.prototype, "percent", void 0);
|
|
1526
|
-
TkLoading = __decorate([
|
|
1527
|
-
(0,decorators_js_.customElement)("tk-loading")
|
|
1528
|
-
], TkLoading);
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
1515
|
/***/ }),
|
|
1533
1516
|
|
|
1534
1517
|
/***/ 4686:
|
|
@@ -1598,6 +1581,17 @@ TkForm = __decorate([
|
|
|
1598
1581
|
|
|
1599
1582
|
|
|
1600
1583
|
|
|
1584
|
+
/***/ }),
|
|
1585
|
+
|
|
1586
|
+
/***/ 4955:
|
|
1587
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1588
|
+
|
|
1589
|
+
var x = (y) => {
|
|
1590
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
|
1591
|
+
}
|
|
1592
|
+
var y = (x) => (() => (x))
|
|
1593
|
+
module.exports = x({ ["classMap"]: () => (__WEBPACK_EXTERNAL_MODULE_lit_directives_class_map_js_2f88e643__.classMap) });
|
|
1594
|
+
|
|
1601
1595
|
/***/ }),
|
|
1602
1596
|
|
|
1603
1597
|
/***/ 5302:
|
|
@@ -3239,7 +3233,7 @@ var external_lit_ = __webpack_require__(2927);
|
|
|
3239
3233
|
// EXTERNAL MODULE: external "lit/decorators.js"
|
|
3240
3234
|
var decorators_js_ = __webpack_require__(8899);
|
|
3241
3235
|
;// ./tinkiet/pages/pages.scss
|
|
3242
|
-
/* harmony default export */ const pages = ("*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:rgba(0,0,0,0);box-sizing:border-box}");
|
|
3236
|
+
/* harmony default export */ const pages = ("*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:rgba(0,0,0,0);box-sizing:border-box}:host ::slotted([hidden]){display:none !important}");
|
|
3243
3237
|
;// ./tinkiet/pages/pages.ts
|
|
3244
3238
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
3245
3239
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -3259,7 +3253,9 @@ let TkPages = class TkPages extends external_lit_.LitElement {
|
|
|
3259
3253
|
this.scrollHistory = {};
|
|
3260
3254
|
}
|
|
3261
3255
|
set page(val) {
|
|
3262
|
-
|
|
3256
|
+
const oldVal = this._page;
|
|
3257
|
+
if (oldVal === val)
|
|
3258
|
+
return;
|
|
3263
3259
|
this._page = val;
|
|
3264
3260
|
if (oldVal && this.handleScroll) {
|
|
3265
3261
|
const el = this.querySelector(`[page=${oldVal}]`);
|
|
@@ -3273,6 +3269,17 @@ let TkPages = class TkPages extends external_lit_.LitElement {
|
|
|
3273
3269
|
get page() {
|
|
3274
3270
|
return this._page;
|
|
3275
3271
|
}
|
|
3272
|
+
firstUpdated() {
|
|
3273
|
+
var _a, _b;
|
|
3274
|
+
// If no page is set, pick the first child with a page attr or default to "default"
|
|
3275
|
+
if (!this.page) {
|
|
3276
|
+
const first = (_a = this.querySelector("[page]")) !== null && _a !== void 0 ? _a : this.querySelector(":scope > *");
|
|
3277
|
+
if (first) {
|
|
3278
|
+
this.page = (_b = first.getAttribute("page")) !== null && _b !== void 0 ? _b : "default";
|
|
3279
|
+
}
|
|
3280
|
+
}
|
|
3281
|
+
this.updatePages();
|
|
3282
|
+
}
|
|
3276
3283
|
render() {
|
|
3277
3284
|
return (0,external_lit_.html) `
|
|
3278
3285
|
<slot></slot>
|
|
@@ -3280,34 +3287,37 @@ let TkPages = class TkPages extends external_lit_.LitElement {
|
|
|
3280
3287
|
}
|
|
3281
3288
|
updated(props) {
|
|
3282
3289
|
if (props.has("page")) {
|
|
3283
|
-
this.
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3290
|
+
this.updatePages();
|
|
3291
|
+
}
|
|
3292
|
+
}
|
|
3293
|
+
updatePages() {
|
|
3294
|
+
const scrollElement = document.scrollingElement || document.documentElement;
|
|
3295
|
+
this.querySelectorAll(":scope > *").forEach(el => {
|
|
3296
|
+
var _a, _b;
|
|
3297
|
+
const elPageAttribute = (_a = el.getAttribute("page")) !== null && _a !== void 0 ? _a : "default";
|
|
3298
|
+
if (elPageAttribute === this.page) {
|
|
3299
|
+
el.removeAttribute("hidden");
|
|
3300
|
+
if (this.selected) {
|
|
3301
|
+
el.setAttribute(this.selected, "");
|
|
3295
3302
|
}
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
if (this.selected != "") {
|
|
3299
|
-
el.removeAttribute(this.selected);
|
|
3300
|
-
}
|
|
3303
|
+
if (this.handleScroll && !el.hasAttribute("no-scroll")) {
|
|
3304
|
+
scrollElement.scrollTop = (_b = this.scrollHistory[elPageAttribute]) !== null && _b !== void 0 ? _b : 0;
|
|
3301
3305
|
}
|
|
3302
|
-
}
|
|
3303
|
-
|
|
3306
|
+
}
|
|
3307
|
+
else {
|
|
3308
|
+
el.setAttribute("hidden", "");
|
|
3309
|
+
if (this.selected) {
|
|
3310
|
+
el.removeAttribute(this.selected);
|
|
3311
|
+
}
|
|
3312
|
+
}
|
|
3313
|
+
});
|
|
3304
3314
|
}
|
|
3305
3315
|
};
|
|
3306
3316
|
TkPages.styles = (0,external_lit_.css) `
|
|
3307
3317
|
${(0,external_lit_.unsafeCSS)(pages)}
|
|
3308
3318
|
`;
|
|
3309
3319
|
__decorate([
|
|
3310
|
-
(0,decorators_js_.property)({ attribute: "page", type: String })
|
|
3320
|
+
(0,decorators_js_.property)({ attribute: "page", type: String, reflect: true })
|
|
3311
3321
|
], TkPages.prototype, "page", null);
|
|
3312
3322
|
__decorate([
|
|
3313
3323
|
(0,decorators_js_.property)({ attribute: true, type: String })
|
|
@@ -3330,6 +3340,165 @@ TkPages = __decorate([
|
|
|
3330
3340
|
|
|
3331
3341
|
|
|
3332
3342
|
|
|
3343
|
+
/***/ }),
|
|
3344
|
+
|
|
3345
|
+
/***/ 8895:
|
|
3346
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3347
|
+
|
|
3348
|
+
|
|
3349
|
+
// EXPORTS
|
|
3350
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
3351
|
+
k: () => (/* binding */ TkLoading)
|
|
3352
|
+
});
|
|
3353
|
+
|
|
3354
|
+
// EXTERNAL MODULE: external "lit"
|
|
3355
|
+
var external_lit_ = __webpack_require__(2927);
|
|
3356
|
+
// EXTERNAL MODULE: external "lit/decorators.js"
|
|
3357
|
+
var decorators_js_ = __webpack_require__(8899);
|
|
3358
|
+
// EXTERNAL MODULE: external "lit/directives/class-map.js"
|
|
3359
|
+
var class_map_js_ = __webpack_require__(4955);
|
|
3360
|
+
;// ./node_modules/lit-html/lit-html.js
|
|
3361
|
+
/**
|
|
3362
|
+
* @license
|
|
3363
|
+
* Copyright 2017 Google LLC
|
|
3364
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3365
|
+
*/
|
|
3366
|
+
const t=globalThis,i=t.trustedTypes,s=i?i.createPolicy("lit-html",{createHTML:t=>t}):void 0,e="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o="?"+h,n=`<${o}>`,r=document,l=()=>r.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a=Array.isArray,u=t=>a(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),b=y(2),w=y(3),T=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),A=new WeakMap,C=r.createTreeWalker(r,129);function P(t,i){if(!a(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s?s.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?"!--"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m):void 0!==u[3]&&(c=m):c===m?">"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith("/>")?" ":"";l+=c===f?s+n:d>=0?(o.push(a),s.slice(0,d)+e+s.slice(d)+h+x):s+h+(-2===d?i:x)}return[P(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=C.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?H:"?"===e[1]?I:"@"===e[1]?L:k}),r.removeAttribute(t)}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i?i.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l())}}}else if(8===r.nodeType)if(r.data===o)d.push({type:2,index:c});else{let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1}c++}}static createElement(t,i){const s=r.createElement("template");return s.innerHTML=t,s}}function S(t,i,s=t,e){if(i===T)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S(t,h._$AS(t,i.values),h,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r).importNode(i,!0);C.currentNode=e;let h=C.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z(h,this,t)),this._$AV.push(i),l=s[++n]}o!==l?.index&&(h=C.nextNode(),o++)}return C.currentNode=r,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S(this,t,i),c(t)?t===E||null==t||""===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==E&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(P(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new M(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new N(t)),i}k(t){a(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l()),this.O(l()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=S(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===E?t=E:t!==E&&(t+=(r??"")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class H extends k{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===E?void 0:t}}class I extends k{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E)}}class L extends k{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=S(this,t,i,0)??E)===T)return;const s=this._$AH,e=t===E&&s!==E||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E&&(s===E||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const Z={M:e,P:h,A:o,C:1,L:V,R:M,D:u,V:S,I:R,H:k,N:I,U:L,B:H,F:z},j=t.litHtmlPolyfillSupport;j?.(N,R),(t.litHtmlVersions??=[]).push("3.3.1");const B=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(l(),t),t,void 0,s??{})}return h._$AI(t),h};
|
|
3367
|
+
//# sourceMappingURL=lit-html.js.map
|
|
3368
|
+
|
|
3369
|
+
;// ./node_modules/lit-html/directive.js
|
|
3370
|
+
/**
|
|
3371
|
+
* @license
|
|
3372
|
+
* Copyright 2017 Google LLC
|
|
3373
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3374
|
+
*/
|
|
3375
|
+
const directive_t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},directive_e=t=>(...e)=>({_$litDirective$:t,values:e});class directive_i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
3376
|
+
//# sourceMappingURL=directive.js.map
|
|
3377
|
+
|
|
3378
|
+
;// ./node_modules/lit-html/directives/style-map.js
|
|
3379
|
+
|
|
3380
|
+
/**
|
|
3381
|
+
* @license
|
|
3382
|
+
* Copyright 2018 Google LLC
|
|
3383
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3384
|
+
*/const style_map_n="important",style_map_i=" !"+style_map_n,style_map_o=directive_e(class extends directive_i{constructor(t){if(super(t),t.type!==directive_t.ATTRIBUTE||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[r]){const{style:s}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(r)),this.render(r);for(const t of this.ft)null==r[t]&&(this.ft.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in r){const e=r[t];if(null!=e){this.ft.add(t);const r="string"==typeof e&&e.endsWith(style_map_i);t.includes("-")||r?s.setProperty(t,r?e.slice(0,-11):e,r?style_map_n:""):s[t]=e}}return T}});
|
|
3385
|
+
//# sourceMappingURL=style-map.js.map
|
|
3386
|
+
|
|
3387
|
+
;// ./node_modules/lit/directives/style-map.js
|
|
3388
|
+
|
|
3389
|
+
//# sourceMappingURL=style-map.js.map
|
|
3390
|
+
|
|
3391
|
+
// EXTERNAL MODULE: external "lit/directives/if-defined.js"
|
|
3392
|
+
var if_defined_js_ = __webpack_require__(3517);
|
|
3393
|
+
// EXTERNAL MODULE: ./tinkiet/box/index.ts
|
|
3394
|
+
var box = __webpack_require__(3433);
|
|
3395
|
+
;// ./tinkiet/loading/loading.scss
|
|
3396
|
+
/* harmony default export */ const loading = ("*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:rgba(0,0,0,0);box-sizing:border-box}:host{--color: hsl(var(--primary));--background-color: var(--tk-loading-background-color, hsl(var(--surface-dim)))}:host([secondary]){--color: hsl(var(--secondary))}:host([error]){--color: hsl(var(--error))}.circle{display:inline-flex;animation:rotator 3s linear infinite;transform-origin:center;width:56px;height:56px}.circle .track{stroke:var(--background-color);opacity:.4}.circle .path{stroke-dasharray:265;stroke-dashoffset:0;transform-origin:center;stroke:var(--color);animation:dash 3s ease-in-out infinite}@keyframes rotator{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dashoffset:265}50%{stroke-dashoffset:65;transform:rotate(90deg)}100%{stroke-dashoffset:265;transform:rotate(360deg)}}:host([small]) .circle{width:20px;height:20px}:host([small]) .line{height:2px}:host([large]) .circle{width:96px;height:96px}:host([large]) .line{height:14px}.line{position:relative;background-color:var(--background-color);overflow:hidden;height:6px}.line .progress{background-color:var(--color);height:100%;position:relative;width:100%}.line .indeterminate{background-color:rgba(0,0,0,0);position:absolute;top:0;left:0;right:0;bottom:0}.line .indeterminate:before{content:\"\";position:absolute;background-color:var(--color);top:0;left:0;bottom:0;will-change:left,right;animation:indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite}.line .indeterminate:after{content:\"\";position:absolute;background-color:var(--color);top:0;left:0;bottom:0;will-change:left,right;animation:indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;animation-delay:1.15s}@keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}100%{left:100%;right:-90%}}@keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}100%{left:107%;right:-8%}}");
|
|
3397
|
+
;// ./tinkiet/loading/loading.ts
|
|
3398
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
3399
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3400
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3401
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3402
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3403
|
+
};
|
|
3404
|
+
|
|
3405
|
+
|
|
3406
|
+
|
|
3407
|
+
|
|
3408
|
+
|
|
3409
|
+
|
|
3410
|
+
|
|
3411
|
+
let TkLoading = class TkLoading extends box/* TkBox */.P {
|
|
3412
|
+
constructor() {
|
|
3413
|
+
super(...arguments);
|
|
3414
|
+
this.circle = false;
|
|
3415
|
+
this.indeterminate = false;
|
|
3416
|
+
this.percent = 0;
|
|
3417
|
+
}
|
|
3418
|
+
static get styles() {
|
|
3419
|
+
return [
|
|
3420
|
+
...box/* TkBox */.P.styles,
|
|
3421
|
+
(0,external_lit_.css) `
|
|
3422
|
+
${(0,external_lit_.unsafeCSS)(loading)}
|
|
3423
|
+
`
|
|
3424
|
+
];
|
|
3425
|
+
}
|
|
3426
|
+
render() {
|
|
3427
|
+
const percent = this.normalizePercent(this.percent);
|
|
3428
|
+
const radius = 40;
|
|
3429
|
+
const circumference = 2 * Math.PI * radius;
|
|
3430
|
+
const dashOffset = circumference * (1 - percent / 100);
|
|
3431
|
+
const isDeterminateCircle = this.circle && !this.indeterminate && this.hasAttribute("percent");
|
|
3432
|
+
const ariaValueNow = this.indeterminate ? undefined : percent;
|
|
3433
|
+
const circleStyle = isDeterminateCircle ? style_map_o({ animation: "none" }) : external_lit_.nothing;
|
|
3434
|
+
const progressStyle = isDeterminateCircle
|
|
3435
|
+
? style_map_o({
|
|
3436
|
+
animation: "none",
|
|
3437
|
+
strokeDasharray: `${circumference}`,
|
|
3438
|
+
strokeDashoffset: `${dashOffset}`
|
|
3439
|
+
})
|
|
3440
|
+
: external_lit_.nothing;
|
|
3441
|
+
return (0,external_lit_.html) `
|
|
3442
|
+
${this.circle
|
|
3443
|
+
? (0,external_lit_.html) `
|
|
3444
|
+
<svg
|
|
3445
|
+
class="circle"
|
|
3446
|
+
viewBox="0 0 100 100"
|
|
3447
|
+
role="progressbar"
|
|
3448
|
+
aria-valuemin="0"
|
|
3449
|
+
aria-valuemax="100"
|
|
3450
|
+
aria-valuenow=${(0,if_defined_js_.ifDefined)(ariaValueNow)}
|
|
3451
|
+
style=${circleStyle}
|
|
3452
|
+
>
|
|
3453
|
+
<circle class="track" fill="none" stroke-width="1em" cx="50" cy="50" r="40"></circle>
|
|
3454
|
+
<circle
|
|
3455
|
+
class=${(0,class_map_js_.classMap)({ indeterminate: this.indeterminate, path: true })}
|
|
3456
|
+
fill="none"
|
|
3457
|
+
stroke-width="1em"
|
|
3458
|
+
stroke-linecap="butt"
|
|
3459
|
+
cx="50"
|
|
3460
|
+
cy="50"
|
|
3461
|
+
r="40"
|
|
3462
|
+
style=${progressStyle}
|
|
3463
|
+
></circle>
|
|
3464
|
+
</svg>
|
|
3465
|
+
`
|
|
3466
|
+
: (0,external_lit_.html) `
|
|
3467
|
+
<div
|
|
3468
|
+
class="line"
|
|
3469
|
+
role="progressbar"
|
|
3470
|
+
aria-valuemin="0"
|
|
3471
|
+
aria-valuemax="100"
|
|
3472
|
+
aria-valuenow=${(0,if_defined_js_.ifDefined)(ariaValueNow)}
|
|
3473
|
+
>
|
|
3474
|
+
<div class=${(0,class_map_js_.classMap)({ progress: true, indeterminate: this.indeterminate })} style=${style_map_o(this.indeterminate ? { width: "100%" } : { width: `${percent}%` })}>
|
|
3475
|
+
${this.indeterminate ? (0,external_lit_.html) `<span class="visually-hidden">Loading</span>` : external_lit_.nothing}
|
|
3476
|
+
</div>
|
|
3477
|
+
</div>
|
|
3478
|
+
`}
|
|
3479
|
+
`;
|
|
3480
|
+
}
|
|
3481
|
+
normalizePercent(value) {
|
|
3482
|
+
if (!Number.isFinite(value))
|
|
3483
|
+
return 0;
|
|
3484
|
+
return Math.min(100, Math.max(0, value));
|
|
3485
|
+
}
|
|
3486
|
+
};
|
|
3487
|
+
__decorate([
|
|
3488
|
+
(0,decorators_js_.property)({ attribute: true, type: Boolean })
|
|
3489
|
+
], TkLoading.prototype, "circle", void 0);
|
|
3490
|
+
__decorate([
|
|
3491
|
+
(0,decorators_js_.property)({ attribute: true, type: Boolean })
|
|
3492
|
+
], TkLoading.prototype, "indeterminate", void 0);
|
|
3493
|
+
__decorate([
|
|
3494
|
+
(0,decorators_js_.property)({ attribute: true, type: Number })
|
|
3495
|
+
], TkLoading.prototype, "percent", void 0);
|
|
3496
|
+
TkLoading = __decorate([
|
|
3497
|
+
(0,decorators_js_.customElement)("tk-loading")
|
|
3498
|
+
], TkLoading);
|
|
3499
|
+
|
|
3500
|
+
|
|
3501
|
+
|
|
3333
3502
|
/***/ }),
|
|
3334
3503
|
|
|
3335
3504
|
/***/ 8899:
|
|
@@ -3583,7 +3752,7 @@ var __webpack_exports__ = {};
|
|
|
3583
3752
|
/* harmony import */ var _icon_icon__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(8758);
|
|
3584
3753
|
/* harmony import */ var _icon_icons__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(1587);
|
|
3585
3754
|
/* harmony import */ var _list_item_list_item__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(722);
|
|
3586
|
-
/* harmony import */ var _loading_loading__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(
|
|
3755
|
+
/* harmony import */ var _loading_loading__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(8895);
|
|
3587
3756
|
/* harmony import */ var _navigation_navigation_bar__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(2667);
|
|
3588
3757
|
/* harmony import */ var _navigation_navigation_item__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(3338);
|
|
3589
3758
|
/* harmony import */ var _topbar_topbar__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(1593);
|