@getflip/swirl-components 0.34.2 → 0.35.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 +246 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/swirl-card.cjs.entry.js +23 -1
- package/dist/cjs/swirl-components.cjs.js +1 -1
- package/dist/cjs/swirl-text.cjs.entry.js +181 -10
- package/dist/collection/assets/pdfjs/pdf.worker.min.js +22 -0
- package/dist/collection/components/swirl-card/swirl-card.js +133 -1
- package/dist/collection/components/swirl-text/swirl-text.js +19 -10
- package/dist/components/assets/pdfjs/pdf.worker.min.js +22 -0
- package/dist/components/swirl-card.js +28 -1
- package/dist/components/swirl-text2.js +181 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm/swirl-card.entry.js +23 -1
- package/dist/esm/swirl-components.js +1 -1
- package/dist/esm/swirl-text.entry.js +181 -10
- package/dist/swirl-components/p-5f05c203.entry.js +8 -0
- package/dist/swirl-components/p-c9a34a56.entry.js +1 -0
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/components/swirl-card/swirl-card.d.ts +6 -0
- package/dist/types/components/swirl-text/swirl-text.d.ts +1 -0
- package/dist/types/components.d.ts +12 -2
- package/package.json +2 -1
- package/vscode-data.json +165 -0
- package/dist/swirl-components/p-0f186daa.entry.js +0 -1
- package/dist/swirl-components/p-80610550.entry.js +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const swirlCardBorderRadiusTokens: readonly ["xs", "sm", "base", "l", "xl"];
|
|
2
2
|
export type SwirlCardBorderRadius = typeof swirlCardBorderRadiusTokens[number] | string;
|
|
3
3
|
export type SwirlCardJustifyContent = "start" | "center" | "end";
|
|
4
|
+
export type SwirlCardPadding = "0" | "2" | "4" | "8" | "12" | "16" | "20" | "24" | "32";
|
|
4
5
|
/**
|
|
5
6
|
* @slot slot - The card contents
|
|
6
7
|
*/
|
|
@@ -17,6 +18,11 @@ export declare class SwirlCard {
|
|
|
17
18
|
interactive?: boolean;
|
|
18
19
|
justifyContent?: SwirlCardJustifyContent;
|
|
19
20
|
linkTarget?: string;
|
|
21
|
+
padding?: SwirlCardPadding;
|
|
22
|
+
paddingBlockEnd?: SwirlCardPadding;
|
|
23
|
+
paddingBlockStart?: SwirlCardPadding;
|
|
24
|
+
paddingInlineEnd?: SwirlCardPadding;
|
|
25
|
+
paddingInlineStart?: SwirlCardPadding;
|
|
20
26
|
swirlAriaLabel?: string;
|
|
21
27
|
render(): any;
|
|
22
28
|
}
|
|
@@ -15,7 +15,7 @@ import { SwirlBannerAriaRole, SwirlBannerIntent, SwirlBannerSize } from "./compo
|
|
|
15
15
|
import { SwirlBoxOverflow, SwirlBoxPadding } from "./components/swirl-box/swirl-box";
|
|
16
16
|
import { SwirlButtonIconPosition, SwirlButtonIntent, SwirlButtonSize, SwirlButtonType, SwirlButtonVariant } from "./components/swirl-button/swirl-button";
|
|
17
17
|
import { SwirlButtonGroupOrientation } from "./components/swirl-button-group/swirl-button-group";
|
|
18
|
-
import { SwirlCardBorderRadius, SwirlCardJustifyContent } from "./components/swirl-card/swirl-card";
|
|
18
|
+
import { SwirlCardBorderRadius, SwirlCardJustifyContent, SwirlCardPadding } from "./components/swirl-card/swirl-card";
|
|
19
19
|
import { SwirlCheckboxState } from "./components/swirl-checkbox/swirl-checkbox";
|
|
20
20
|
import { SwirlChipIntent, SwirlChipVariant } from "./components/swirl-chip/swirl-chip";
|
|
21
21
|
import { SwirlColumnsSpacing } from "./components/swirl-columns/swirl-columns";
|
|
@@ -59,7 +59,7 @@ export { SwirlBannerAriaRole, SwirlBannerIntent, SwirlBannerSize } from "./compo
|
|
|
59
59
|
export { SwirlBoxOverflow, SwirlBoxPadding } from "./components/swirl-box/swirl-box";
|
|
60
60
|
export { SwirlButtonIconPosition, SwirlButtonIntent, SwirlButtonSize, SwirlButtonType, SwirlButtonVariant } from "./components/swirl-button/swirl-button";
|
|
61
61
|
export { SwirlButtonGroupOrientation } from "./components/swirl-button-group/swirl-button-group";
|
|
62
|
-
export { SwirlCardBorderRadius, SwirlCardJustifyContent } from "./components/swirl-card/swirl-card";
|
|
62
|
+
export { SwirlCardBorderRadius, SwirlCardJustifyContent, SwirlCardPadding } from "./components/swirl-card/swirl-card";
|
|
63
63
|
export { SwirlCheckboxState } from "./components/swirl-checkbox/swirl-checkbox";
|
|
64
64
|
export { SwirlChipIntent, SwirlChipVariant } from "./components/swirl-chip/swirl-chip";
|
|
65
65
|
export { SwirlColumnsSpacing } from "./components/swirl-columns/swirl-columns";
|
|
@@ -252,6 +252,11 @@ export namespace Components {
|
|
|
252
252
|
"isBorderless"?: boolean;
|
|
253
253
|
"justifyContent"?: SwirlCardJustifyContent;
|
|
254
254
|
"linkTarget"?: string;
|
|
255
|
+
"padding"?: SwirlCardPadding;
|
|
256
|
+
"paddingBlockEnd"?: SwirlCardPadding;
|
|
257
|
+
"paddingBlockStart"?: SwirlCardPadding;
|
|
258
|
+
"paddingInlineEnd"?: SwirlCardPadding;
|
|
259
|
+
"paddingInlineStart"?: SwirlCardPadding;
|
|
255
260
|
"swirlAriaLabel"?: string;
|
|
256
261
|
}
|
|
257
262
|
/**
|
|
@@ -2815,6 +2820,11 @@ declare namespace LocalJSX {
|
|
|
2815
2820
|
"isBorderless"?: boolean;
|
|
2816
2821
|
"justifyContent"?: SwirlCardJustifyContent;
|
|
2817
2822
|
"linkTarget"?: string;
|
|
2823
|
+
"padding"?: SwirlCardPadding;
|
|
2824
|
+
"paddingBlockEnd"?: SwirlCardPadding;
|
|
2825
|
+
"paddingBlockStart"?: SwirlCardPadding;
|
|
2826
|
+
"paddingInlineEnd"?: SwirlCardPadding;
|
|
2827
|
+
"paddingInlineStart"?: SwirlCardPadding;
|
|
2818
2828
|
"swirlAriaLabel"?: string;
|
|
2819
2829
|
}
|
|
2820
2830
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getflip/swirl-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"description": "Swirl Design System Web Component Library",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"maska": "^1.5.0",
|
|
56
56
|
"papaparse": "^5.3.2",
|
|
57
57
|
"pdfjs-dist": "^2.16.105",
|
|
58
|
+
"shave": "^5.0.2",
|
|
58
59
|
"sortablejs": "^1.15.0",
|
|
59
60
|
"wc-datepicker": "^0.5.1"
|
|
60
61
|
},
|
package/vscode-data.json
CHANGED
|
@@ -862,6 +862,171 @@
|
|
|
862
862
|
"name": "link-target",
|
|
863
863
|
"description": ""
|
|
864
864
|
},
|
|
865
|
+
{
|
|
866
|
+
"name": "padding",
|
|
867
|
+
"description": "",
|
|
868
|
+
"values": [
|
|
869
|
+
{
|
|
870
|
+
"name": "0"
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
"name": "12"
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
"name": "16"
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
"name": "2"
|
|
880
|
+
},
|
|
881
|
+
{
|
|
882
|
+
"name": "20"
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
"name": "24"
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"name": "32"
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
"name": "4"
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
"name": "8"
|
|
895
|
+
}
|
|
896
|
+
]
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
"name": "padding-block-end",
|
|
900
|
+
"description": "",
|
|
901
|
+
"values": [
|
|
902
|
+
{
|
|
903
|
+
"name": "0"
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
"name": "12"
|
|
907
|
+
},
|
|
908
|
+
{
|
|
909
|
+
"name": "16"
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
"name": "2"
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
"name": "20"
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
"name": "24"
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
"name": "32"
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
"name": "4"
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
"name": "8"
|
|
928
|
+
}
|
|
929
|
+
]
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
"name": "padding-block-start",
|
|
933
|
+
"description": "",
|
|
934
|
+
"values": [
|
|
935
|
+
{
|
|
936
|
+
"name": "0"
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
"name": "12"
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
"name": "16"
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
"name": "2"
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
"name": "20"
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
"name": "24"
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
"name": "32"
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
"name": "4"
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
"name": "8"
|
|
961
|
+
}
|
|
962
|
+
]
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
"name": "padding-inline-end",
|
|
966
|
+
"description": "",
|
|
967
|
+
"values": [
|
|
968
|
+
{
|
|
969
|
+
"name": "0"
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
"name": "12"
|
|
973
|
+
},
|
|
974
|
+
{
|
|
975
|
+
"name": "16"
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
"name": "2"
|
|
979
|
+
},
|
|
980
|
+
{
|
|
981
|
+
"name": "20"
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
"name": "24"
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
"name": "32"
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
"name": "4"
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
"name": "8"
|
|
994
|
+
}
|
|
995
|
+
]
|
|
996
|
+
},
|
|
997
|
+
{
|
|
998
|
+
"name": "padding-inline-start",
|
|
999
|
+
"description": "",
|
|
1000
|
+
"values": [
|
|
1001
|
+
{
|
|
1002
|
+
"name": "0"
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
"name": "12"
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
"name": "16"
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
"name": "2"
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
"name": "20"
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
"name": "24"
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
"name": "32"
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
"name": "4"
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
"name": "8"
|
|
1027
|
+
}
|
|
1028
|
+
]
|
|
1029
|
+
},
|
|
865
1030
|
{
|
|
866
1031
|
"name": "swirl-aria-label",
|
|
867
1032
|
"description": ""
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,H as s,g as i}from"./p-05c15d47.js";import{c as r}from"./p-b7898321.js";import{b as l}from"./p-f83a5757.js";const o=class{constructor(e){t(this,e),this.align="start",this.as="p",this.balance=void 0,this.color="default",this.fontStyle="normal",this.lines=void 0,this.size="base",this.truncate=void 0,this.weight="normal"}componentDidRender(){this.rebalance()}onWindowResize(){this.rebalance()}rebalance(){this.balance&&Boolean(this.textEl)&&l(this.textEl)}render(){const t=this.as,i=Boolean(this.lines)?{display:"-webkit-box","-webkit-line-clamp":String(this.lines),"-webkit-box-orient":"vertical",whiteSpace:"normal"}:void 0,l=r("text",`text--align-${this.align}`,`text--color-${this.color}`,`text--font-style-${this.fontStyle}`,`text--size-${this.size}`,`text--weight-${this.weight}`,{"text--truncate":this.truncate});return e(s,null,e(t,{class:l,ref:t=>this.textEl=t,style:i},e("slot",null)))}get el(){return i(this)}};o.style=".sc-swirl-text-h{display:block;max-width:100%}.sc-swirl-text-h *.sc-swirl-text{box-sizing:border-box}.text.sc-swirl-text{overflow:hidden;margin:0;padding:0}.text--align-start.sc-swirl-text{text-align:start}.text--align-center.sc-swirl-text{text-align:center}.text--align-end.sc-swirl-text{text-align:end}.text--color-default.sc-swirl-text{color:var(--s-text-default)}.text--color-subdued.sc-swirl-text{color:var(--s-text-subdued)}.text--color-critical.sc-swirl-text{color:var(--s-text-critical)}.text--color-success.sc-swirl-text{color:var(--s-text-success)}.text--color-warning.sc-swirl-text{color:var(--s-text-warning)}.text--size-sm.sc-swirl-text{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}.text--size-base.sc-swirl-text{font-size:var(--s-font-size-base);line-height:var(--s-line-height-base)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-base.sc-swirl-text{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.text--size-lg.sc-swirl-text{font-size:var(--s-font-size-lg);line-height:var(--s-line-height-lg)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-lg.sc-swirl-text{font-size:var(--s-font-size-base);line-height:var(--s-line-height-base)}}.text--weight-normal.sc-swirl-text{font-weight:var(--s-font-weight-normal)}.text--weight-medium.sc-swirl-text{font-weight:var(--s-font-weight-medium)}.text--weight-semibold.sc-swirl-text{font-weight:var(--s-font-weight-semibold)}.text--weight-bold.sc-swirl-text{font-weight:var(--s-font-weight-bold)}.text--font-style-normal.sc-swirl-text{font-style:normal}.text--font-style-italic.sc-swirl-text{font-style:italic}.text--truncate.sc-swirl-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}";export{o as swirl_text}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,h as e,H as t,g as i}from"./p-05c15d47.js";import{c as a}from"./p-b7898321.js";const s=["xs","sm","base","l","xl"],o=class{constructor(e){r(this,e),this.as="div",this.borderRadius="base",this.elevated=void 0,this.height=void 0,this.highlighted=void 0,this.href=void 0,this.imageAspectRatio=void 0,this.isBorderless=void 0,this.interactive=void 0,this.justifyContent="start",this.linkTarget=void 0,this.swirlAriaLabel=void 0}render(){const r=Boolean(this.href)?"a":this.as,i=Boolean(this.el.querySelector('[slot="image"]')),o={borderRadius:s.includes(this.borderRadius)?`var(--s-border-radius-${this.borderRadius})`:this.borderRadius,height:this.height},d=a("card",`card--justify-content-${this.justifyContent}`,{"card--elevated":this.elevated,"card--has-image":i,"card--highlighted":this.highlighted,"card--interactive":this.interactive||this.href,"card--is--borderless":this.isBorderless});return e(t,{styles:{height:this.height}},e(r,{"aria-label":this.swirlAriaLabel,class:d,href:this.href,rel:Boolean(this.href)&&"_blank"===this.linkTarget?"noreferrer":void 0,style:o,target:this.linkTarget},e("div",{class:"card__image",style:{aspectRatio:this.imageAspectRatio}},e("slot",{name:"image"})),e("div",{class:"card__body"},e("div",{class:"card__content"},e("slot",{name:"content"})))))}get el(){return i(this)}};o.style=":host{display:block}:host *{box-sizing:border-box}.card{display:flex;overflow:hidden;width:100%;margin:0;padding:0;border:var(--s-border-width-default) solid var(--s-border-default);border-radius:var(--s-border-radius-base);color:var(--s-text-default);background-color:var(--s-surface-default);font:inherit;text-decoration:none;flex-direction:column}a.card,button.card,.card--interactive{cursor:pointer}a.card:hover,button.card:hover,.card--interactive:hover{background-color:var(--s-surface-hovered)}a.card:active,button.card:active,.card--interactive:active{background-color:var(--s-surface-pressed)}a.card:focus:not(:focus-visible),button.card:focus:not(:focus-visible),.card--interactive:focus:not(:focus-visible){outline:none}a.card:focus-visible,button.card:focus-visible,.card--interactive:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-4)}.card--is--borderless{border:0}.card--elevated{border-color:transparent;box-shadow:0 0.75rem 1rem rgba(25, 26, 28, 0.12),\n 0 0.25rem 0.75rem rgba(25, 26, 28, 0.08)}.card--highlighted{border-width:0.1875rem;border-color:var(--s-border-highlight)}.card--justify-content-start .card__body{justify-content:flex-start}.card--justify-content-center .card__body{justify-content:center}.card--justify-content-end .card__body{justify-content:flex-end}:not(.card--has-image) .card__image{overflow:hidden;height:0}.content-section{padding:0 var(--s-space-16)}.card__image{overflow:hidden;min-height:0}.card__image ::slotted(img){display:inline-flex;width:100%;max-height:100%;-o-object-fit:cover;object-fit:cover}.card__body{display:flex;min-height:0;padding:var(--s-space-12) var(--s-space-16) var(--s-space-16);flex-grow:1;flex-direction:column;gap:var(--s-space-16)}";export{o as swirl_card}
|