@getflip/swirl-components 0.36.0 → 0.38.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/components.json +281 -22
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/swirl-action-list_3.cjs.entry.js +7 -2
- package/dist/cjs/swirl-app-layout_7.cjs.entry.js +16 -0
- package/dist/cjs/swirl-components.cjs.js +1 -1
- package/dist/cjs/swirl-console-layout.cjs.entry.js +1 -1
- package/dist/cjs/swirl-pagination.cjs.entry.js +20 -9
- package/dist/cjs/swirl-search.cjs.entry.js +3 -2
- package/dist/cjs/swirl-table-cell.cjs.entry.js +1 -1
- package/dist/cjs/swirl-table-column.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/swirl-box/swirl-box.js +104 -0
- package/dist/collection/components/swirl-console-layout/swirl-console-layout.css +4 -3
- package/dist/collection/components/swirl-pagination/swirl-pagination.css +20 -10
- package/dist/collection/components/swirl-pagination/swirl-pagination.js +61 -50
- package/dist/collection/components/swirl-search/swirl-search.css +8 -2
- package/dist/collection/components/swirl-search/swirl-search.js +25 -1
- package/dist/collection/components/swirl-separator/swirl-separator.css +0 -2
- package/dist/collection/components/swirl-separator/swirl-separator.js +35 -1
- package/dist/collection/components/swirl-table-cell/swirl-table-cell.css +0 -8
- package/dist/collection/components/swirl-table-column/swirl-table-column.css +0 -9
- package/dist/components/swirl-box2.js +21 -1
- package/dist/components/swirl-console-layout.js +1 -1
- package/dist/components/swirl-pagination.js +27 -22
- package/dist/components/swirl-search.js +5 -3
- package/dist/components/swirl-separator2.js +10 -3
- package/dist/components/swirl-table-cell.js +1 -1
- package/dist/components/swirl-table-column.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/swirl-action-list_3.entry.js +7 -2
- package/dist/esm/swirl-app-layout_7.entry.js +16 -0
- package/dist/esm/swirl-components.js +1 -1
- package/dist/esm/swirl-console-layout.entry.js +1 -1
- package/dist/esm/swirl-pagination.entry.js +20 -9
- package/dist/esm/swirl-search.entry.js +3 -2
- package/dist/esm/swirl-table-cell.entry.js +1 -1
- package/dist/esm/swirl-table-column.entry.js +1 -1
- package/dist/swirl-components/{p-da4958ec.entry.js → p-30e7d460.entry.js} +1 -1
- package/dist/swirl-components/p-3c2325ba.entry.js +1 -0
- package/dist/swirl-components/p-7d7f11e8.entry.js +1 -0
- package/dist/swirl-components/{p-c2167151.entry.js → p-94c348ae.entry.js} +1 -1
- package/dist/swirl-components/p-cbcc0e42.entry.js +1 -0
- package/dist/swirl-components/{p-16864f08.entry.js → p-d5032332.entry.js} +1 -1
- package/dist/swirl-components/p-dbe4ee1a.entry.js +1 -0
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/components/swirl-box/swirl-box.d.ts +4 -0
- package/dist/types/components/swirl-pagination/swirl-pagination.d.ts +7 -5
- package/dist/types/components/swirl-search/swirl-search.d.ts +2 -0
- package/dist/types/components/swirl-separator/swirl-separator.d.ts +2 -0
- package/dist/types/components.d.ts +20 -4
- package/package.json +1 -1
- package/vscode-data.json +179 -4
- package/dist/swirl-components/p-27566da1.entry.js +0 -1
- package/dist/swirl-components/p-50430bab.entry.js +0 -1
- package/dist/swirl-components/p-774483bc.entry.js +0 -1
- package/dist/swirl-components/p-968773d7.entry.js +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
+
export type SwirlSearchVariant = "filled" | "outline";
|
|
2
3
|
export declare class SwirlSearch {
|
|
3
4
|
autoFocus?: boolean;
|
|
4
5
|
clearButtonLabel?: string;
|
|
@@ -8,6 +9,7 @@ export declare class SwirlSearch {
|
|
|
8
9
|
label?: string;
|
|
9
10
|
placeholder?: string;
|
|
10
11
|
value?: string;
|
|
12
|
+
variant?: SwirlSearchVariant;
|
|
11
13
|
inputBlur: EventEmitter<FocusEvent>;
|
|
12
14
|
inputFocus: EventEmitter<FocusEvent>;
|
|
13
15
|
valueChange: EventEmitter<string>;
|
|
@@ -36,6 +36,8 @@ import { SwirlPopoverAnimation } from "./components/swirl-popover/swirl-popover"
|
|
|
36
36
|
import { Placement } from "@floating-ui/dom";
|
|
37
37
|
import { SwirlProgressIndicatorSize, SwirlProgressIndicatorVariant } from "./components/swirl-progress-indicator/swirl-progress-indicator";
|
|
38
38
|
import { SwirlRadioState } from "./components/swirl-radio/swirl-radio";
|
|
39
|
+
import { SwirlSearchVariant } from "./components/swirl-search/swirl-search";
|
|
40
|
+
import { SwirlSeparatorSpacing } from "./components/swirl-separator/swirl-separator";
|
|
39
41
|
import { SwirlSkeletonBoxBorderRadius } from "./components/swirl-skeleton-box/swirl-skeleton-box";
|
|
40
42
|
import { SwirlSkeletonTextSize } from "./components/swirl-skeleton-text/swirl-skeleton-text";
|
|
41
43
|
import { SwirlSpinnerSize } from "./components/swirl-spinner/swirl-spinner";
|
|
@@ -81,6 +83,8 @@ export { SwirlPopoverAnimation } from "./components/swirl-popover/swirl-popover"
|
|
|
81
83
|
export { Placement } from "@floating-ui/dom";
|
|
82
84
|
export { SwirlProgressIndicatorSize, SwirlProgressIndicatorVariant } from "./components/swirl-progress-indicator/swirl-progress-indicator";
|
|
83
85
|
export { SwirlRadioState } from "./components/swirl-radio/swirl-radio";
|
|
86
|
+
export { SwirlSearchVariant } from "./components/swirl-search/swirl-search";
|
|
87
|
+
export { SwirlSeparatorSpacing } from "./components/swirl-separator/swirl-separator";
|
|
84
88
|
export { SwirlSkeletonBoxBorderRadius } from "./components/swirl-skeleton-box/swirl-skeleton-box";
|
|
85
89
|
export { SwirlSkeletonTextSize } from "./components/swirl-skeleton-text/swirl-skeleton-text";
|
|
86
90
|
export { SwirlSpinnerSize } from "./components/swirl-spinner/swirl-spinner";
|
|
@@ -214,6 +218,10 @@ export namespace Components {
|
|
|
214
218
|
"maxWidth"?: string;
|
|
215
219
|
"overflow"?: SwirlBoxOverflow;
|
|
216
220
|
"padding"?: SwirlBoxPadding;
|
|
221
|
+
"paddingBlockEnd"?: SwirlBoxPadding;
|
|
222
|
+
"paddingBlockStart"?: SwirlBoxPadding;
|
|
223
|
+
"paddingInlineEnd"?: SwirlBoxPadding;
|
|
224
|
+
"paddingInlineStart"?: SwirlBoxPadding;
|
|
217
225
|
}
|
|
218
226
|
interface SwirlButton {
|
|
219
227
|
"disabled"?: boolean;
|
|
@@ -887,9 +895,9 @@ export namespace Components {
|
|
|
887
895
|
"label": string;
|
|
888
896
|
}
|
|
889
897
|
interface SwirlPagination {
|
|
890
|
-
"
|
|
891
|
-
"accessiblePrevButtonLabel"?: string;
|
|
898
|
+
"firstPageButtonLabel"?: string;
|
|
892
899
|
"label": string;
|
|
900
|
+
"lastPageButtonLabel"?: string;
|
|
893
901
|
"nextButtonLabel"?: string;
|
|
894
902
|
"page": number;
|
|
895
903
|
"pageLabel"?: string;
|
|
@@ -999,6 +1007,7 @@ export namespace Components {
|
|
|
999
1007
|
"label"?: string;
|
|
1000
1008
|
"placeholder"?: string;
|
|
1001
1009
|
"value"?: string;
|
|
1010
|
+
"variant"?: SwirlSearchVariant;
|
|
1002
1011
|
}
|
|
1003
1012
|
interface SwirlSelect {
|
|
1004
1013
|
"disabled"?: boolean;
|
|
@@ -1011,6 +1020,7 @@ export namespace Components {
|
|
|
1011
1020
|
"value"?: string[];
|
|
1012
1021
|
}
|
|
1013
1022
|
interface SwirlSeparator {
|
|
1023
|
+
"spacing"?: SwirlSeparatorSpacing;
|
|
1014
1024
|
}
|
|
1015
1025
|
interface SwirlShellLayout {
|
|
1016
1026
|
/**
|
|
@@ -2794,6 +2804,10 @@ declare namespace LocalJSX {
|
|
|
2794
2804
|
"maxWidth"?: string;
|
|
2795
2805
|
"overflow"?: SwirlBoxOverflow;
|
|
2796
2806
|
"padding"?: SwirlBoxPadding;
|
|
2807
|
+
"paddingBlockEnd"?: SwirlBoxPadding;
|
|
2808
|
+
"paddingBlockStart"?: SwirlBoxPadding;
|
|
2809
|
+
"paddingInlineEnd"?: SwirlBoxPadding;
|
|
2810
|
+
"paddingInlineStart"?: SwirlBoxPadding;
|
|
2797
2811
|
}
|
|
2798
2812
|
interface SwirlButton {
|
|
2799
2813
|
"disabled"?: boolean;
|
|
@@ -3405,9 +3419,9 @@ declare namespace LocalJSX {
|
|
|
3405
3419
|
"label": string;
|
|
3406
3420
|
}
|
|
3407
3421
|
interface SwirlPagination {
|
|
3408
|
-
"
|
|
3409
|
-
"accessiblePrevButtonLabel"?: string;
|
|
3422
|
+
"firstPageButtonLabel"?: string;
|
|
3410
3423
|
"label": string;
|
|
3424
|
+
"lastPageButtonLabel"?: string;
|
|
3411
3425
|
"nextButtonLabel"?: string;
|
|
3412
3426
|
"onSetPage"?: (event: SwirlPaginationCustomEvent<number>) => void;
|
|
3413
3427
|
"page": number;
|
|
@@ -3509,6 +3523,7 @@ declare namespace LocalJSX {
|
|
|
3509
3523
|
"onValueChange"?: (event: SwirlSearchCustomEvent<string>) => void;
|
|
3510
3524
|
"placeholder"?: string;
|
|
3511
3525
|
"value"?: string;
|
|
3526
|
+
"variant"?: SwirlSearchVariant;
|
|
3512
3527
|
}
|
|
3513
3528
|
interface SwirlSelect {
|
|
3514
3529
|
"disabled"?: boolean;
|
|
@@ -3522,6 +3537,7 @@ declare namespace LocalJSX {
|
|
|
3522
3537
|
"value"?: string[];
|
|
3523
3538
|
}
|
|
3524
3539
|
interface SwirlSeparator {
|
|
3540
|
+
"spacing"?: SwirlSeparatorSpacing;
|
|
3525
3541
|
}
|
|
3526
3542
|
interface SwirlShellLayout {
|
|
3527
3543
|
"hideSidebar"?: boolean;
|
package/package.json
CHANGED
package/vscode-data.json
CHANGED
|
@@ -624,6 +624,138 @@
|
|
|
624
624
|
"name": "8"
|
|
625
625
|
}
|
|
626
626
|
]
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
"name": "padding-block-end",
|
|
630
|
+
"description": "",
|
|
631
|
+
"values": [
|
|
632
|
+
{
|
|
633
|
+
"name": "0"
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
"name": "12"
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
"name": "16"
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
"name": "2"
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
"name": "20"
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
"name": "24"
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
"name": "32"
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
"name": "4"
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
"name": "8"
|
|
658
|
+
}
|
|
659
|
+
]
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
"name": "padding-block-start",
|
|
663
|
+
"description": "",
|
|
664
|
+
"values": [
|
|
665
|
+
{
|
|
666
|
+
"name": "0"
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
"name": "12"
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
"name": "16"
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
"name": "2"
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
"name": "20"
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
"name": "24"
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
"name": "32"
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
"name": "4"
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
"name": "8"
|
|
691
|
+
}
|
|
692
|
+
]
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
"name": "padding-inline-end",
|
|
696
|
+
"description": "",
|
|
697
|
+
"values": [
|
|
698
|
+
{
|
|
699
|
+
"name": "0"
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"name": "12"
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
"name": "16"
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
"name": "2"
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
"name": "20"
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
"name": "24"
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
"name": "32"
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
"name": "4"
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
"name": "8"
|
|
724
|
+
}
|
|
725
|
+
]
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"name": "padding-inline-start",
|
|
729
|
+
"description": "",
|
|
730
|
+
"values": [
|
|
731
|
+
{
|
|
732
|
+
"name": "0"
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
"name": "12"
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
"name": "16"
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
"name": "2"
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
"name": "20"
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
"name": "24"
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
"name": "32"
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"name": "4"
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
"name": "8"
|
|
757
|
+
}
|
|
758
|
+
]
|
|
627
759
|
}
|
|
628
760
|
]
|
|
629
761
|
},
|
|
@@ -3462,15 +3594,15 @@
|
|
|
3462
3594
|
},
|
|
3463
3595
|
"attributes": [
|
|
3464
3596
|
{
|
|
3465
|
-
"name": "
|
|
3597
|
+
"name": "first-page-button-label",
|
|
3466
3598
|
"description": ""
|
|
3467
3599
|
},
|
|
3468
3600
|
{
|
|
3469
|
-
"name": "
|
|
3601
|
+
"name": "label",
|
|
3470
3602
|
"description": ""
|
|
3471
3603
|
},
|
|
3472
3604
|
{
|
|
3473
|
-
"name": "label",
|
|
3605
|
+
"name": "last-page-button-label",
|
|
3474
3606
|
"description": ""
|
|
3475
3607
|
},
|
|
3476
3608
|
{
|
|
@@ -3926,6 +4058,18 @@
|
|
|
3926
4058
|
{
|
|
3927
4059
|
"name": "value",
|
|
3928
4060
|
"description": ""
|
|
4061
|
+
},
|
|
4062
|
+
{
|
|
4063
|
+
"name": "variant",
|
|
4064
|
+
"description": "",
|
|
4065
|
+
"values": [
|
|
4066
|
+
{
|
|
4067
|
+
"name": "filled"
|
|
4068
|
+
},
|
|
4069
|
+
{
|
|
4070
|
+
"name": "outline"
|
|
4071
|
+
}
|
|
4072
|
+
]
|
|
3929
4073
|
}
|
|
3930
4074
|
]
|
|
3931
4075
|
},
|
|
@@ -3972,7 +4116,38 @@
|
|
|
3972
4116
|
"kind": "markdown",
|
|
3973
4117
|
"value": ""
|
|
3974
4118
|
},
|
|
3975
|
-
"attributes": [
|
|
4119
|
+
"attributes": [
|
|
4120
|
+
{
|
|
4121
|
+
"name": "spacing",
|
|
4122
|
+
"description": "",
|
|
4123
|
+
"values": [
|
|
4124
|
+
{
|
|
4125
|
+
"name": "0"
|
|
4126
|
+
},
|
|
4127
|
+
{
|
|
4128
|
+
"name": "12"
|
|
4129
|
+
},
|
|
4130
|
+
{
|
|
4131
|
+
"name": "16"
|
|
4132
|
+
},
|
|
4133
|
+
{
|
|
4134
|
+
"name": "2"
|
|
4135
|
+
},
|
|
4136
|
+
{
|
|
4137
|
+
"name": "24"
|
|
4138
|
+
},
|
|
4139
|
+
{
|
|
4140
|
+
"name": "32"
|
|
4141
|
+
},
|
|
4142
|
+
{
|
|
4143
|
+
"name": "4"
|
|
4144
|
+
},
|
|
4145
|
+
{
|
|
4146
|
+
"name": "8"
|
|
4147
|
+
}
|
|
4148
|
+
]
|
|
4149
|
+
}
|
|
4150
|
+
]
|
|
3976
4151
|
},
|
|
3977
4152
|
{
|
|
3978
4153
|
"name": "swirl-shell-layout",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,h as a,H as r}from"./p-05c15d47.js";const o=class{constructor(a){s(this,a)}render(){return a(r,{class:"table-cell",role:"cell"},a("slot",null))}};o.style=":host{display:flex;overflow:auto;padding-top:var(--s-space-8);padding-right:var(--s-space-16);padding-bottom:var(--s-space-8);padding-left:var(--s-space-16);flex-basis:0;flex-grow:1;flex-shrink:1;align-items:center;background-color:var(--s-background-default);word-break:break-word;-webkit-hyphens:auto;hyphens:auto;transition:box-shadow 0.15s}:host(.table-cell--has-shadow-right){box-shadow:var(--swirl-table-sticky-right-shadow)}:host(.table-cell--has-shadow-left){box-shadow:var(--swirl-table-sticky-left-shadow)}:host(:first-child){border-left:var(--s-border-width-default) solid var(--s-border-default)}:host(:last-child){border-right:var(--s-border-width-default) solid var(--s-border-default)}:host *{box-sizing:border-box}";export{o as swirl_table_cell}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,h as t,H as r,g as e}from"./p-05c15d47.js";const i=class{constructor(t){s(this,t),this.sort=void 0,this.sortable=void 0,this.maxWidth=void 0,this.minWidth="fit-content",this.sticky=void 0,this.width=void 0}render(){const s={flex:Boolean(this.width)?`0 0 ${this.width}`:"",maxWidth:this.maxWidth||"",minWidth:this.minWidth||""};return t(r,{"aria-sort":this.sort,class:"table-column",role:"columnheader",style:s},t("span",null,t("slot",null)),this.sortable&&t("span",{class:"table-column__sort-indicator"},"ascending"===this.sort&&t("swirl-icon-arrow-upward",{"aria-hidden":"true",size:20}),"descending"===this.sort&&t("swirl-icon-arrow-downward",{"aria-hidden":"true",size:20}),!Boolean(this.sort)&&" "))}get el(){return e(this)}};i.style=":host{display:flex;overflow:hidden;padding-top:var(--s-space-12);padding-right:var(--s-space-16);padding-bottom:var(--s-space-12);padding-left:var(--s-space-16);flex-basis:0;flex-grow:1;flex-shrink:1;align-items:center;border-top:var(--s-border-width-default) solid var(--s-border-default);border-bottom:var(--s-border-width-default) solid var(--s-border-default);color:var(--s-text-subdued);background-color:var(--s-background-default);font-size:var(--s-font-size-sm);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-sm);white-space:nowrap;letter-spacing:var(--s-letter-spacing-tighter);text-overflow:ellipsis;transition:box-shadow 0.15s;gap:var(--s-space-8)}:host(:first-child){border-left:var(--s-border-width-default) solid var(--s-border-default)}:host(:last-child){border-right:var(--s-border-width-default) solid var(--s-border-default)}:host(.table-column--has-shadow-right){box-shadow:var(--swirl-table-sticky-right-shadow)}:host(.table-column--has-shadow-left){box-shadow:var(--swirl-table-sticky-left-shadow)}:host *{box-sizing:border-box}.table-column__sort-indicator{display:inline-flex;width:1.25rem;height:1.25rem;flex-grow:0;flex-shrink:0}";export{i as swirl_table_column}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,c as e,h as r,H as a}from"./p-05c15d47.js";import{c as i}from"./p-b7898321.js";import{g as c}from"./p-438b3941.js";const t=class{constructor(r){s(this,r),this.inputBlur=e(this,"inputBlur",7),this.inputFocus=e(this,"inputFocus",7),this.valueChange=e(this,"valueChange",7),this.desktopMediaQuery=c(),this.desktopMediaQueryHandler=s=>{this.forceIconProps(s.matches)},this.clear=()=>{this.input.value="",this.input.focus(),this.valueChange.emit("")},this.onBlur=s=>{this.inputBlur.emit(s)},this.onChange=s=>{this.valueChange.emit(s.target.value)},this.onFocus=s=>{this.inputFocus.emit(s)},this.autoFocus=void 0,this.clearButtonLabel="Clear search term",this.disabled=void 0,this.inputName=void 0,this.inputId=void 0,this.label=void 0,this.placeholder="Search …",this.value=void 0}componentDidLoad(){var s,e;this.forceIconProps(this.desktopMediaQuery.matches),null===(e=(s=this.desktopMediaQuery).addEventListener)||void 0===e||e.call(s,"change",this.desktopMediaQueryHandler)}disconnectedCallback(){var s,e;null===(e=(s=this.desktopMediaQuery).removeEventListener)||void 0===e||e.call(s,"change",this.desktopMediaQueryHandler)}forceIconProps(s){if(!Boolean(this.iconEl))return;const e=this.iconEl.children[0];null==e||e.setAttribute("size",s?"20":"24")}onKeyDown(s){"KeyK"!==s.code&&"Slash"!==s.code||!s.ctrlKey&&!s.metaKey||this.input.focus()}render(){const s=i("search",{"search--disabled":this.disabled});return r(a,null,r("span",{class:s,ref:s=>this.iconEl=s},r("swirl-icon-search",{class:"search__icon"}),r("input",{"aria-disabled":this.disabled?"true":void 0,"aria-label":this.label,autoComplete:"off",autoFocus:this.autoFocus,class:"search__input",disabled:this.disabled,id:this.inputId,inputMode:"search",name:this.inputName,onBlur:this.onBlur,onChange:this.onChange,onFocus:this.onFocus,placeholder:this.placeholder,ref:s=>this.input=s,type:"search",value:this.value}),!this.disabled&&r("button",{"aria-label":this.clearButtonLabel,class:"search__clear-button",onClick:this.clear,type:"button"},r("swirl-icon-cancel",null))))}};t.style=".sc-swirl-search-h{display:flex;width:100%}.sc-swirl-search-h *.sc-swirl-search{box-sizing:border-box}.search.sc-swirl-search{position:relative;display:flex;width:100%}.search--disabled.sc-swirl-search .search__icon.sc-swirl-search{color:var(--s-icon-disabled)}.search--disabled.sc-swirl-search .search__input.sc-swirl-search{color:var(--s-text-disabled)}.search--disabled.sc-swirl-search .search__input.sc-swirl-search::-moz-placeholder{color:var(--s-text-disabled)}.search--disabled.sc-swirl-search .search__input.sc-swirl-search::placeholder{color:var(--s-text-disabled)}.search__icon.sc-swirl-search{position:absolute;top:50%;left:var(--s-space-12);display:inline-flex;color:var(--s-icon-default);transform:translateY(-50%)}.search__input.sc-swirl-search{width:100%;height:2.5rem;padding-top:var(--s-space-8);padding-right:calc(var(--s-space-12) + 1.5rem + var(--s-space-8));padding-bottom:var(--s-space-8);padding-left:calc(var(--s-space-12) + 1.5rem + var(--s-space-8));border:none;border-radius:var(--s-border-radius-base);color:var(--s-text-default);background-color:var(--s-surface-raised-default);font:inherit;line-height:var(--s-line-height-base);caret-color:var(--s-border-highlight)}.search__input.sc-swirl-search:focus:not(:focus-visible){outline:none}.search__input.sc-swirl-search:focus-visible{outline-color:var(--s-focus-default)}.search__input.sc-swirl-search::-moz-placeholder{color:var(--s-text-subdued)}.search__input.sc-swirl-search::placeholder{color:var(--s-text-subdued)}.search__input.sc-swirl-search::-webkit-search-decoration,.search__input.sc-swirl-search::-webkit-search-cancel-button,.search__input.sc-swirl-search::-webkit-search-results-button,.search__input.sc-swirl-search::-webkit-search-results-decoration{-webkit-appearance:none;appearance:none}.search__input.sc-swirl-search:not(:-moz-placeholder-shown)+.search__clear-button.sc-swirl-search{display:inline-flex}.search__input.sc-swirl-search:not(:placeholder-shown)+.search__clear-button.sc-swirl-search{display:inline-flex}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.search__input.sc-swirl-search{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm);padding-left:calc(var(--s-space-8) + 1.5rem + var(--s-space-8))}}.search__clear-button.sc-swirl-search{position:absolute;top:50%;right:var(--s-space-12);display:none;padding:0;border:none;color:var(--s-icon-default);background-color:transparent;cursor:pointer;transform:translateY(-50%)}";export{t as swirl_search}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as a,h as t,H as s}from"./p-05c15d47.js";import{c as n}from"./p-b7898321.js";const e=class{constructor(t){i(this,t),this.setPage=a(this,"setPage",7),this.onPrevButtonClick=()=>{const i=Math.max(this.page-1,1);this.page!==i&&this.setPage.emit(i)},this.onNextButtonClick=()=>{const i=Math.min(this.page+1,this.pages);this.page!==i&&this.setPage.emit(i)},this.onSelect=i=>{const a=+i.target.value;this.page!==a&&this.setPage.emit(a)},this.accessibleNextButtonLabel="Next page",this.accessiblePrevButtonLabel="Previous page",this.nextButtonLabel="Next",this.pageLabel="out of",this.prevButtonLabel="Prev",this.label=void 0,this.page=void 0,this.pages=void 0,this.pageSelectLabel="Select a page",this.variant="default"}render(){const i="advanced"!==this.variant,a="simple"!==this.variant,e="advanced"===this.variant,o=`${this.page} ${this.pageLabel} ${this.pages}`,l=n("pagination",`pagination--variant-${this.variant}`);return t(s,null,t("nav",{"aria-label":this.label,class:l},t("ul",{class:"pagination__list",part:"pagination__list"},t("li",{class:"pagination__list-item"},t("swirl-button",{class:"pagination__prev-button",disabled:this.page<=1,swirlAriaLabel:this.accessiblePrevButtonLabel,hideLabel:i,icon:"<swirl-icon-chevron-left></swirl-icon-chevron-left>",intent:"primary",label:this.prevButtonLabel,onClick:this.onPrevButtonClick})),t("li",{class:"pagination__list-item"},a?t("span",null,e?t("span",{"aria-current":"page",class:"pagination__advanced-label"},t("span",{class:"pagination__page-select-container"},t("select",{"aria-label":this.pageSelectLabel,class:"pagination__page-select",onChange:this.onSelect},new Array(this.pages).fill(void 0).map(((i,a)=>a+1)).map((i=>t("option",{selected:this.page===i,value:String(i)},i)))),t("swirl-icon-expand-more",{"aria-hidden":"true",class:"pagination__page-select-icon",size:16})),t("span",{"aria-hidden":"true"},this.pageLabel," ",this.pages)):t("span",{"aria-current":"page"},o)):t("swirl-visually-hidden",null,t("span",{"aria-current":"page"},o))),t("li",{class:"pagination__list-item"},t("swirl-button",{class:"pagination__next-button",disabled:this.page>=this.pages,swirlAriaLabel:this.accessibleNextButtonLabel,hideLabel:i,icon:"<swirl-icon-chevron-right></swirl-icon-chevron-right>",iconPosition:"end",intent:"primary",label:this.nextButtonLabel,onClick:this.onNextButtonClick})))))}};e.style=":host{display:block;width:100%}:host *{box-sizing:border-box}.pagination{display:block;width:100%}.pagination--variant-simple .pagination__list{gap:0}.pagination__list{display:flex;margin:0;padding:0;justify-content:flex-start;align-items:center;line-height:var(--s-line-height-base);list-style:none;gap:var(--s-space-16)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.pagination__list{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm);gap:var(--s-space-8)}}.pagination__advanced-label{display:flex;align-items:center;white-space:nowrap;gap:var(--s-space-8)}.pagination__page-select-container{position:relative}.pagination__page-select{display:inline-flex;padding-right:var(--s-space-16);border:none;background-color:transparent;font:inherit;line-height:var(--s-line-height-base);text-align:center;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.pagination__page-select:focus:not(:focus-visible){outline:none}.pagination__page-select:focus-visible{outline-color:var(--s-focus-default)}.pagination__page-select-icon{position:absolute;top:50%;right:0;transform:translateY(-50%);pointer-events:none}";export{e as swirl_pagination}
|