@paperless/core 2.18.0 → 2.18.2
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/dist/build/index.esm.js +1 -1
- package/dist/build/{p-b94bc701.entry.js → p-28aa7b28.entry.js} +2 -2
- package/dist/{paperless/p-9ec11e61.entry.js → build/p-458b268a.entry.js} +2 -2
- package/dist/build/{p-9ec11e61.entry.js.map → p-458b268a.entry.js.map} +1 -1
- package/dist/{paperless/p-6dc60fc9.entry.js → build/p-4f199fd5.entry.js} +2 -2
- package/dist/build/{p-520a265d.js → p-81ba2f91.js} +1 -1
- package/dist/build/p-DIDkQXzJ.js +2 -0
- package/dist/build/p-DIDkQXzJ.js.map +1 -0
- package/dist/build/p-button.p-icon.p-loader.entry.esm.js.map +1 -1
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/p-button.p-icon.p-loader.entry.cjs.js.map +1 -1
- package/dist/cjs/p-button_3.cjs.entry.js +4 -4
- package/dist/cjs/p-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/p-empty-state_8.cjs.entry.js +1 -1
- package/dist/cjs/p-table.cjs.entry.js +1 -1
- package/dist/cjs/table-helpers-NzNb7-i7.js +117 -0
- package/dist/cjs/table-helpers-NzNb7-i7.js.map +1 -0
- package/dist/collection/components/molecules/button/button.component.js +5 -5
- package/dist/collection/components/molecules/button/button.component.js.map +1 -1
- package/dist/collection/utils/table-helpers.js +42 -38
- package/dist/collection/utils/table-helpers.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-CT2cHZ7O.js → p-BWB7MxpW.js} +44 -40
- package/dist/components/p-BWB7MxpW.js.map +1 -0
- package/dist/components/{p-DtslqW6g.js → p-BqKXLcZb.js} +3 -3
- package/dist/components/{p-DtslqW6g.js.map → p-BqKXLcZb.js.map} +1 -1
- package/dist/components/{p-Lw_7l_n4.js → p-BsFb_hX4.js} +4 -4
- package/dist/components/{p-Lw_7l_n4.js.map → p-BsFb_hX4.js.map} +1 -1
- package/dist/components/{p-BrTUiyZW.js → p-CDJmZjDG.js} +6 -6
- package/dist/components/{p-BrTUiyZW.js.map → p-CDJmZjDG.js.map} +1 -1
- package/dist/components/{p-BZlZvtjK.js → p-CFIY22oV.js} +3 -3
- package/dist/components/{p-BZlZvtjK.js.map → p-CFIY22oV.js.map} +1 -1
- package/dist/components/{p-BupM6TXy.js → p-CRadQFtR.js} +3 -3
- package/dist/components/{p-BupM6TXy.js.map → p-CRadQFtR.js.map} +1 -1
- package/dist/components/{p-CEBFKdul.js → p-CcfOgVyY.js} +3 -3
- package/dist/components/{p-CEBFKdul.js.map → p-CcfOgVyY.js.map} +1 -1
- package/dist/components/{p-XoglNnlr.js → p-D7R1YUFy.js} +6 -6
- package/dist/components/{p-XoglNnlr.js.map → p-D7R1YUFy.js.map} +1 -1
- package/dist/components/{p-CKMtLokt.js → p-DMk-079N.js} +3 -3
- package/dist/components/{p-CKMtLokt.js.map → p-DMk-079N.js.map} +1 -1
- package/dist/components/{p-gNkAxCho.js → p-D_p65Zxm.js} +4 -4
- package/dist/components/{p-gNkAxCho.js.map → p-D_p65Zxm.js.map} +1 -1
- package/dist/components/{p-BsKPQOEM.js → p-DqSbhKx7.js} +5 -5
- package/dist/components/{p-BsKPQOEM.js.map → p-DqSbhKx7.js.map} +1 -1
- package/dist/components/{p-Dyc4CMNs.js → p-DvZcjOgI.js} +3 -3
- package/dist/components/{p-Dyc4CMNs.js.map → p-DvZcjOgI.js.map} +1 -1
- package/dist/components/p-attachment.js +1 -1
- package/dist/components/p-button.js +1 -1
- package/dist/components/p-calendar.js +1 -1
- package/dist/components/p-datepicker.js +3 -3
- package/dist/components/p-drawer-header.js +1 -1
- package/dist/components/p-drawer.js +2 -2
- package/dist/components/p-empty-state.js +1 -1
- package/dist/components/p-field.js +1 -1
- package/dist/components/p-modal-header.js +1 -1
- package/dist/components/p-modal.js +2 -2
- package/dist/components/p-navbar.js +1 -1
- package/dist/components/p-pagination-pages.js +1 -1
- package/dist/components/p-pagination.js +1 -1
- package/dist/components/p-profile.js +1 -1
- package/dist/components/p-select.js +2 -2
- package/dist/components/p-table-cell.js +1 -1
- package/dist/components/p-table-footer.js +1 -1
- package/dist/components/p-table-header.js +1 -1
- package/dist/components/p-table.js +9 -9
- package/dist/esm/index.js +1 -1
- package/dist/esm/p-button.p-icon.p-loader.entry.js.map +1 -1
- package/dist/esm/p-button_3.entry.js +4 -4
- package/dist/esm/p-button_3.entry.js.map +1 -1
- package/dist/esm/p-empty-state_8.entry.js +1 -1
- package/dist/esm/p-table.entry.js +1 -1
- package/dist/esm/table-helpers-DN6qBpAd.js +112 -0
- package/dist/esm/table-helpers-DN6qBpAd.js.map +1 -0
- package/dist/index.html +1 -1
- package/dist/paperless/index.esm.js +1 -1
- package/dist/paperless/{p-b94bc701.entry.js → p-28aa7b28.entry.js} +2 -2
- package/dist/{build/p-9ec11e61.entry.js → paperless/p-458b268a.entry.js} +2 -2
- package/dist/paperless/{p-9ec11e61.entry.js.map → p-458b268a.entry.js.map} +1 -1
- package/dist/{build/p-6dc60fc9.entry.js → paperless/p-4f199fd5.entry.js} +2 -2
- package/dist/paperless/p-DIDkQXzJ.js +2 -0
- package/dist/paperless/p-DIDkQXzJ.js.map +1 -0
- package/dist/paperless/p-button.p-icon.p-loader.entry.esm.js.map +1 -1
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/utils/table-helpers.d.ts +2 -2
- package/package.json +1 -1
- package/dist/build/p-C-WRzhFe.js +0 -2
- package/dist/build/p-C-WRzhFe.js.map +0 -1
- package/dist/cjs/table-helpers-Du9NM7La.js +0 -113
- package/dist/cjs/table-helpers-Du9NM7La.js.map +0 -1
- package/dist/components/p-CT2cHZ7O.js.map +0 -1
- package/dist/esm/table-helpers-DozDU2EV.js +0 -108
- package/dist/esm/table-helpers-DozDU2EV.js.map +0 -1
- package/dist/paperless/p-C-WRzhFe.js +0 -2
- package/dist/paperless/p-C-WRzhFe.js.map +0 -1
- /package/dist/build/{p-b94bc701.entry.js.map → p-28aa7b28.entry.js.map} +0 -0
- /package/dist/build/{p-6dc60fc9.entry.js.map → p-4f199fd5.entry.js.map} +0 -0
- /package/dist/paperless/{p-b94bc701.entry.js.map → p-28aa7b28.entry.js.map} +0 -0
- /package/dist/paperless/{p-6dc60fc9.entry.js.map → p-4f199fd5.entry.js.map} +0 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-mudu9vpz.js');
|
|
4
|
+
|
|
5
|
+
function isTableColumnSizesKey(x, k) {
|
|
6
|
+
return k in x;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const getTableCellColumnClasses = (definition, variant, checkboxOffset = false) => {
|
|
10
|
+
const sizes = definition ? getTableCellSizes(definition, variant) : {};
|
|
11
|
+
return {
|
|
12
|
+
"flex flex-shrink items-center gap-4 pr-4 last-of-type:pr-0": true,
|
|
13
|
+
"pl-8": checkboxOffset,
|
|
14
|
+
"justify-start": !definition?.align || definition?.align === "start",
|
|
15
|
+
"justify-center": definition?.align === "center",
|
|
16
|
+
"justify-end": definition?.align === "end",
|
|
17
|
+
"font-semibold": variant !== "header" && definition?.variant === "subject",
|
|
18
|
+
"text-storm-400 dark:text-hurricane-200": variant === "header" || variant === "header-secondary",
|
|
19
|
+
"text-storm-300 dark:text-hurricane-200": variant !== "header" &&
|
|
20
|
+
variant !== "header-secondary" &&
|
|
21
|
+
definition?.variant !== "subject" &&
|
|
22
|
+
definition?.variant !== "highlight",
|
|
23
|
+
"text-storm-500 dark:text-white": variant !== "header" &&
|
|
24
|
+
variant !== "header-secondary" &&
|
|
25
|
+
(definition?.variant === "subject" ||
|
|
26
|
+
definition?.variant === "highlight"),
|
|
27
|
+
...sizes,
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
const getTableCellSizes = ({ sizes, } /* Table Definition */, variant) => {
|
|
31
|
+
if (sizes === "auto" || !sizes) {
|
|
32
|
+
return {
|
|
33
|
+
"w-auto": true,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
if (sizes === "hidden") {
|
|
37
|
+
return {
|
|
38
|
+
hidden: true,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
if (typeof sizes === "object") {
|
|
42
|
+
sizes = sizes;
|
|
43
|
+
const classes = {};
|
|
44
|
+
let previousSize;
|
|
45
|
+
for (let size in sizes) {
|
|
46
|
+
if (!isTableColumnSizesKey(sizes, size)) {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const currentValue = sizes[size];
|
|
50
|
+
if (size === "default") {
|
|
51
|
+
if (sizes.default === "hidden") {
|
|
52
|
+
classes["hidden"] = true;
|
|
53
|
+
previousSize = size;
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
previousSize = size;
|
|
57
|
+
if (currentValue === 12 || currentValue === "full") {
|
|
58
|
+
classes[`w-full`] = true;
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
classes[`w-${sizes.default}/12`] = true;
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
const previousValue = previousSize ? sizes[previousSize] : null;
|
|
65
|
+
if (currentValue !== "hidden" &&
|
|
66
|
+
previousValue &&
|
|
67
|
+
previousValue === "hidden" &&
|
|
68
|
+
variant !== "actions") {
|
|
69
|
+
classes[`${size}:flex`] = true;
|
|
70
|
+
}
|
|
71
|
+
if (currentValue === "hidden" && variant !== "actions") {
|
|
72
|
+
classes[`${size}:hidden`] = true;
|
|
73
|
+
previousSize = size;
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
if (currentValue === 12 || currentValue === "full") {
|
|
77
|
+
classes[`${size}:w-full`] = true;
|
|
78
|
+
}
|
|
79
|
+
classes[`${size}:w-${currentValue}/12`] = true;
|
|
80
|
+
previousSize = size;
|
|
81
|
+
}
|
|
82
|
+
return classes;
|
|
83
|
+
}
|
|
84
|
+
if (sizes === 12 || sizes === "full") {
|
|
85
|
+
return {
|
|
86
|
+
"w-full": true,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
// is a number.
|
|
90
|
+
return {
|
|
91
|
+
[`w-${sizes}/12`]: true,
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
const floatingMenuContainerClass = index.cva(["sticky self-center"], {
|
|
95
|
+
variants: {
|
|
96
|
+
hasFooter: {
|
|
97
|
+
true: "mt-4 -mb-5 bottom-11 z-[3]",
|
|
98
|
+
false: "my-4 bottom-0",
|
|
99
|
+
},
|
|
100
|
+
active: {
|
|
101
|
+
false: "pointer-events-none animate-floating-menu-container-out",
|
|
102
|
+
true: "animate-floating-menu-container-in",
|
|
103
|
+
},
|
|
104
|
+
shown: {
|
|
105
|
+
false: "hidden",
|
|
106
|
+
true: "inline-block",
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
exports.floatingMenuContainerClass = floatingMenuContainerClass;
|
|
112
|
+
exports.getTableCellColumnClasses = getTableCellColumnClasses;
|
|
113
|
+
exports.getTableCellSizes = getTableCellSizes;
|
|
114
|
+
exports.isTableColumnSizesKey = isTableColumnSizesKey;
|
|
115
|
+
//# sourceMappingURL=table-helpers-NzNb7-i7.js.map
|
|
116
|
+
|
|
117
|
+
//# sourceMappingURL=table-helpers-NzNb7-i7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-helpers-NzNb7-i7.js","sources":["src/types/table.ts","src/utils/table-helpers.ts"],"sourcesContent":["export type QuickFilterTextFunction = () => string;\n\nexport interface QuickFilter {\n\tidentifier: string;\n\ttext: string | QuickFilterTextFunction;\n\tcount?: number;\n\tdefault?: boolean;\n}\n\nexport interface RowClickEvent {\n\titem: any;\n\tctrlDown: boolean;\n}\n\nexport interface TableDefinitionData {\n\tvalue: any;\n\titem: any;\n\tindex: number;\n\trowIndex: number;\n}\n\nexport type TableDefinitionTemplateFunc = (data: TableDefinitionData) => any;\n\nexport interface TableColumnSizes {\n\tdefault: number | 'hidden' | 'full';\n\ttablet?: number | 'hidden' | 'full';\n\t'desktop-xs'?: number | 'hidden' | 'full';\n\t'desktop-sm'?: number | 'hidden' | 'full';\n\tdesktop?: number | 'hidden' | 'full';\n\t'desktop-lg'?: number | 'hidden' | 'full';\n\t'desktop-xl'?: number | 'hidden' | 'full';\n}\n\nexport type TableColumnSizesKey =\n\t| 'default'\n\t| 'tablet'\n\t| 'desktop-xs'\n\t| 'desktop-sm'\n\t| 'desktop'\n\t| 'desktop-lg'\n\t| 'desktop-xl';\n\nexport function isTableColumnSizesKey(\n\tx: TableColumnSizes,\n\tk: PropertyKey\n): k is keyof TableColumnSizes {\n\treturn k in x;\n}\n","import { cva } from \"class-variance-authority\";\nimport { TableColumn } from \"../components/helpers/table/column/table-column.component\";\nimport {\n\tisTableColumnSizesKey,\n\tTableColumnSizes,\n\tTableColumnSizesKey,\n} from \"../types\";\n\nexport const getTableCellColumnClasses = (\n\tdefinition: any | TableColumn,\n\tvariant: \"default\" | \"header\" | \"loading\" | \"header-secondary\",\n\tcheckboxOffset = false,\n) => {\n\tconst sizes = definition ? getTableCellSizes(definition, variant) : {};\n\n\treturn {\n\t\t\"flex flex-shrink items-center gap-4 pr-4 last-of-type:pr-0\": true,\n\t\t\"pl-8\": checkboxOffset,\n\t\t\"justify-start\": !definition?.align || definition?.align === \"start\",\n\t\t\"justify-center\": definition?.align === \"center\",\n\t\t\"justify-end\": definition?.align === \"end\",\n\t\t\"font-semibold\": variant !== \"header\" && definition?.variant === \"subject\",\n\t\t\"text-storm-400 dark:text-hurricane-200\":\n\t\t\tvariant === \"header\" || variant === \"header-secondary\",\n\t\t\"text-storm-300 dark:text-hurricane-200\":\n\t\t\tvariant !== \"header\" &&\n\t\t\tvariant !== \"header-secondary\" &&\n\t\t\tdefinition?.variant !== \"subject\" &&\n\t\t\tdefinition?.variant !== \"highlight\",\n\t\t\"text-storm-500 dark:text-white\":\n\t\t\tvariant !== \"header\" &&\n\t\t\tvariant !== \"header-secondary\" &&\n\t\t\t(definition?.variant === \"subject\" ||\n\t\t\t\tdefinition?.variant === \"highlight\"),\n\t\t...sizes,\n\t};\n};\n\nexport const getTableCellSizes = (\n\t{\n\t\tsizes,\n\t}: {\n\t\tsizes: \"auto\" | \"hidden\" | \"full\" | number | TableColumnSizes;\n\t} /* Table Definition */,\n\tvariant: \"default\" | \"header\" | \"loading\" | \"actions\" | \"header-secondary\",\n) => {\n\tif (sizes === \"auto\" || !sizes) {\n\t\treturn {\n\t\t\t\"w-auto\": true,\n\t\t};\n\t}\n\n\tif (sizes === \"hidden\") {\n\t\treturn {\n\t\t\thidden: true,\n\t\t};\n\t}\n\n\tif (typeof sizes === \"object\") {\n\t\tsizes = sizes as TableColumnSizes;\n\t\tconst classes: any = {};\n\t\tlet previousSize: TableColumnSizesKey | undefined;\n\n\t\tfor (let size in sizes) {\n\t\t\tif (!isTableColumnSizesKey(sizes, size)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst currentValue = sizes[size];\n\n\t\t\tif (size === \"default\") {\n\t\t\t\tif (sizes.default === \"hidden\") {\n\t\t\t\t\tclasses[\"hidden\"] = true;\n\t\t\t\t\tpreviousSize = size;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tpreviousSize = size;\n\n\t\t\t\tif (currentValue === 12 || currentValue === \"full\") {\n\t\t\t\t\tclasses[`w-full`] = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tclasses[`w-${sizes.default}/12`] = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst previousValue = previousSize ? sizes[previousSize] : null;\n\t\t\tif (\n\t\t\t\tcurrentValue !== \"hidden\" &&\n\t\t\t\tpreviousValue &&\n\t\t\t\tpreviousValue === \"hidden\" &&\n\t\t\t\tvariant !== \"actions\"\n\t\t\t) {\n\t\t\t\tclasses[`${size}:flex`] = true;\n\t\t\t}\n\n\t\t\tif (currentValue === \"hidden\" && variant !== \"actions\") {\n\t\t\t\tclasses[`${size}:hidden`] = true;\n\t\t\t\tpreviousSize = size;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (currentValue === 12 || currentValue === \"full\") {\n\t\t\t\tclasses[`${size}:w-full`] = true;\n\t\t\t}\n\n\t\t\tclasses[`${size}:w-${currentValue}/12`] = true;\n\t\t\tpreviousSize = size;\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tif (sizes === 12 || sizes === \"full\") {\n\t\treturn {\n\t\t\t\"w-full\": true,\n\t\t};\n\t}\n\n\t// is a number.\n\treturn {\n\t\t[`w-${sizes}/12`]: true,\n\t};\n};\n\nexport const floatingMenuContainerClass = cva([\"sticky self-center\"], {\n\tvariants: {\n\t\thasFooter: {\n\t\t\ttrue: \"mt-4 -mb-5 bottom-11 z-[3]\",\n\t\t\tfalse: \"my-4 bottom-0\",\n\t\t},\n\t\tactive: {\n\t\t\tfalse: \"pointer-events-none animate-floating-menu-container-out\",\n\t\t\ttrue: \"animate-floating-menu-container-in\",\n\t\t},\n\t\tshown: {\n\t\t\tfalse: \"hidden\",\n\t\t\ttrue: \"inline-block\",\n\t\t},\n\t},\n});\n"],"names":["cva"],"mappings":";;;;AA0CgB,SAAA,qBAAqB,CACpC,CAAmB,EACnB,CAAc,EAAA;IAEd,OAAO,CAAC,IAAI,CAAC;AACd;;ACvCO,MAAM,yBAAyB,GAAG,CACxC,UAA6B,EAC7B,OAA8D,EAC9D,cAAc,GAAG,KAAK,KACnB;AACH,IAAA,MAAM,KAAK,GAAG,UAAU,GAAG,iBAAiB,CAAC,UAAU,EAAE,OAAO,CAAC,GAAG,EAAE;IAEtE,OAAO;AACN,QAAA,4DAA4D,EAAE,IAAI;AAClE,QAAA,MAAM,EAAE,cAAc;QACtB,eAAe,EAAE,CAAC,UAAU,EAAE,KAAK,IAAI,UAAU,EAAE,KAA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AA,EAAA,KAAK,CAAK,GAAA,CAAA,GAAG,IAAI;KACvB;AACF;MAEa,0BAA0B,GAAGA,SAAG,CAAC,CAAC,oBAAoB,CAAC,EAAE;AACrE,IAAA,QAAQ,EAAE;AACT,QAAA,SAAS,EAAE;AACV,YAAA,IAAI,EAAE,4BAA4B;AAClC,YAAA,KAAK,EAAE,eAAe;AACtB,SAAA;AACD,QAAA,MAAM,EAAE;AACP,YAAA,KAAK,EAAE,yDAAyD;AAChE,YAAA,IAAI,EAAE,oCAAoC;AAC1C,SAAA;AACD,QAAA,KAAK,EAAE;AACN,YAAA,KAAK,EAAE,QAAQ;AACf,YAAA,IAAI,EAAE,cAAc;AACpB,SAAA;AACD,KAAA;AACD,CAAA;;;;;;;"}
|
|
@@ -403,7 +403,7 @@ export class Button {
|
|
|
403
403
|
/**
|
|
404
404
|
* Wether to apply an underline
|
|
405
405
|
*/
|
|
406
|
-
underline =
|
|
406
|
+
underline = false;
|
|
407
407
|
/**
|
|
408
408
|
* The tab index to apply to the button
|
|
409
409
|
*/
|
|
@@ -510,7 +510,7 @@ export class Button {
|
|
|
510
510
|
: 'button';
|
|
511
511
|
const hostClass = cn('p-button inline-block', this.class);
|
|
512
512
|
const active = asBoolean(this.active) || hostClass?.includes('active');
|
|
513
|
-
return (h(ThemedHost, { key: '
|
|
513
|
+
return (h(ThemedHost, { key: 'f2a0ebc3e48139f589773dc2f21c40368ee0dc87', class: hostClass }, h(VariableTag, { key: '30279456c8ff2ca882ab6918c739baa54dc4427b', disabled: asBoolean(this.disabled), href: this.href, type: this.variant !== 'text' ? this.type : undefined, target: this.target, tabIndex: this.tabIndex, class: button({
|
|
514
514
|
variant: this.variant,
|
|
515
515
|
size: this.size,
|
|
516
516
|
loading: asBoolean(this.loading),
|
|
@@ -520,14 +520,14 @@ export class Button {
|
|
|
520
520
|
active,
|
|
521
521
|
error: asBoolean(this.error),
|
|
522
522
|
underline: asBoolean(this.underline) && VariableTag === 'a',
|
|
523
|
-
}) }, this.chevron && this.chevronPosition === 'start' && (h("p-icon", { key: '
|
|
523
|
+
}) }, this.chevron && this.chevronPosition === 'start' && (h("p-icon", { key: '9753ef87be206fb3ffda92ef05b50e2526aed588', variant: 'caret', rotate: this.chevron === 'up' ? 180 : 0 })), this.icon &&
|
|
524
524
|
this.iconPosition === 'start' &&
|
|
525
525
|
!(this.iconOnly && this.loading) &&
|
|
526
526
|
this._getIcon(), this.label ? this.label : h("slot", null), this.icon &&
|
|
527
527
|
this.iconPosition === 'end' &&
|
|
528
528
|
!this.loading &&
|
|
529
529
|
!this.chevron &&
|
|
530
|
-
this._getIcon(), this.chevron && !this.loading && this.chevronPosition === 'end' && (h("p-icon", { key: '
|
|
530
|
+
this._getIcon(), this.chevron && !this.loading && this.chevronPosition === 'end' && (h("p-icon", { key: '15d6a85d94fca7c4d0bdf811ece24e5cfd75e0ca', variant: 'caret', rotate: this.chevron === 'up' ? 180 : 0 })), this.loading && h("p-loader", { key: '197acf1429b7fe3aec3866b3a34c222e579f21f8', color: loaderColor }))));
|
|
531
531
|
}
|
|
532
532
|
handleClick(ev) {
|
|
533
533
|
if (this.loading || this.disabled) {
|
|
@@ -623,7 +623,7 @@ export class Button {
|
|
|
623
623
|
"getter": false,
|
|
624
624
|
"setter": false,
|
|
625
625
|
"reflect": false,
|
|
626
|
-
"defaultValue": "
|
|
626
|
+
"defaultValue": "false"
|
|
627
627
|
},
|
|
628
628
|
"tabIndex": {
|
|
629
629
|
"type": "number",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.component.js","sourceRoot":"","sources":["../../../../src/components/molecules/button/button.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,SAAS,EACT,KAAK,IAAI,YAAY,EAErB,CAAC,EACD,MAAM,EACN,IAAI,EACJ,OAAO,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CA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,CAAC;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import {\n\tComponent,\n\tEvent as StencilEvent,\n\tEventEmitter,\n\th,\n\tListen,\n\tProp,\n\tElement,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { ThemedHost } from '../../../internal/themed-host.component';\nimport { RotateOptions } from '../../../types/tailwind';\nimport { asBoolean } from '../../../utils/as-boolean';\nimport { cn } from '../../../utils/cn';\nimport { IconFlipOptions, IconVariant } from '../../atoms/icon/icon.component';\n\n/**\n<div class=\"text-inherit group-hover/button:text-inherit dark:text-inherit dark:group-hover/button:text-inherit\"></div>\n<div class=\"text-transparent group-hover/button:text-transparent dark:text-transparent dark:group-hover/button:text-transparent\"></div>\n<div class=\"text-current group-hover/button:text-current dark:text-current dark:group-hover/button:text-current\"></div>\n<div class=\"text-black group-hover/button:text-black dark:text-black dark:group-hover/button:text-black\"></div>\n<div class=\"text-white-500 group-hover/button:text-white-500 dark:text-white-500 dark:group-hover/button:text-white-500\"></div>\n<div class=\"text-white-600 group-hover/button:text-white-600 dark:text-white-600 dark:group-hover/button:text-white-600\"></div>\n<div class=\"text-white-700 group-hover/button:text-white-700 dark:text-white-700 dark:group-hover/button:text-white-700\"></div>\n<div class=\"text-white-800 group-hover/button:text-white-800 dark:text-white-800 dark:group-hover/button:text-white-800\"></div>\n<div class=\"text-white-DEFAULT group-hover/button:text-white-DEFAULT dark:text-white-DEFAULT dark:group-hover/button:text-white-DEFAULT\"></div>\n<div class=\"text-negative-red-50 group-hover/button:text-negative-red-50 dark:text-negative-red-50 dark:group-hover/button:text-negative-red-50\"></div>\n<div class=\"text-negative-red-100 group-hover/button:text-negative-red-100 dark:text-negative-red-100 dark:group-hover/button:text-negative-red-100\"></div>\n<div class=\"text-negative-red-500 group-hover/button:text-negative-red-500 dark:text-negative-red-500 dark:group-hover/button:text-negative-red-500\"></div>\n<div class=\"text-negative-red-700 group-hover/button:text-negative-red-700 dark:text-negative-red-700 dark:group-hover/button:text-negative-red-700\"></div>\n<div class=\"text-negative-red-800 group-hover/button:text-negative-red-800 dark:text-negative-red-800 dark:group-hover/button:text-negative-red-800\"></div>\n<div class=\"text-negative-red-alternative group-hover/button:text-negative-red-alternative dark:text-negative-red-alternative dark:group-hover/button:text-negative-red-alternative\"></div>\n<div class=\"text-positive-green-50 group-hover/button:text-positive-green-50 dark:text-positive-green-50 dark:group-hover/button:text-positive-green-50\"></div>\n<div class=\"text-positive-green-100 group-hover/button:text-positive-green-100 dark:text-positive-green-100 dark:group-hover/button:text-positive-green-100\"></div>\n<div class=\"text-positive-green-500 group-hover/button:text-positive-green-500 dark:text-positive-green-500 dark:group-hover/button:text-positive-green-500\"></div>\n<div class=\"text-positive-green-800 group-hover/button:text-positive-green-800 dark:text-positive-green-800 dark:group-hover/button:text-positive-green-800\"></div>\n<div class=\"text-positive-green-alternative group-hover/button:text-positive-green-alternative dark:text-positive-green-alternative dark:group-hover/button:text-positive-green-alternative\"></div>\n<div class=\"text-amber-50 group-hover/button:text-amber-50 dark:text-amber-50 dark:group-hover/button:text-amber-50\"></div>\n<div class=\"text-amber-100 group-hover/button:text-amber-100 dark:text-amber-100 dark:group-hover/button:text-amber-100\"></div>\n<div class=\"text-amber-500 group-hover/button:text-amber-500 dark:text-amber-500 dark:group-hover/button:text-amber-500\"></div>\n<div class=\"text-amber-800 group-hover/button:text-amber-800 dark:text-amber-800 dark:group-hover/button:text-amber-800\"></div>\n<div class=\"text-amber-alternative group-hover/button:text-amber-alternative dark:text-amber-alternative dark:group-hover/button:text-amber-alternative\"></div>\n<div class=\"text-indigo-50 group-hover/button:text-indigo-50 dark:text-indigo-50 dark:group-hover/button:text-indigo-50\"></div>\n<div class=\"text-indigo-100 group-hover/button:text-indigo-100 dark:text-indigo-100 dark:group-hover/button:text-indigo-100\"></div>\n<div class=\"text-indigo-200 group-hover/button:text-indigo-200 dark:text-indigo-200 dark:group-hover/button:text-indigo-200\"></div>\n<div class=\"text-indigo-300 group-hover/button:text-indigo-300 dark:text-indigo-300 dark:group-hover/button:text-indigo-300\"></div>\n<div class=\"text-indigo-400 group-hover/button:text-indigo-400 dark:text-indigo-400 dark:group-hover/button:text-indigo-400\"></div>\n<div class=\"text-indigo-500 group-hover/button:text-indigo-500 dark:text-indigo-500 dark:group-hover/button:text-indigo-500\"></div>\n<div class=\"text-indigo-600 group-hover/button:text-indigo-600 dark:text-indigo-600 dark:group-hover/button:text-indigo-600\"></div>\n<div class=\"text-indigo-700 group-hover/button:text-indigo-700 dark:text-indigo-700 dark:group-hover/button:text-indigo-700\"></div>\n<div class=\"text-indigo-800 group-hover/button:text-indigo-800 dark:text-indigo-800 dark:group-hover/button:text-indigo-800\"></div>\n<div class=\"text-indigo-900 group-hover/button:text-indigo-900 dark:text-indigo-900 dark:group-hover/button:text-indigo-900\"></div>\n<div class=\"text-storm-50 group-hover/button:text-storm-50 dark:text-storm-50 dark:group-hover/button:text-storm-50\"></div>\n<div class=\"text-storm-100 group-hover/button:text-storm-100 dark:text-storm-100 dark:group-hover/button:text-storm-100\"></div>\n<div class=\"text-storm-200 group-hover/button:text-storm-200 dark:text-storm-200 dark:group-hover/button:text-storm-200\"></div>\n<div class=\"text-storm-300 group-hover/button:text-storm-300 dark:text-storm-300 dark:group-hover/button:text-storm-300\"></div>\n<div class=\"text-storm-400 group-hover/button:text-storm-400 dark:text-storm-400 dark:group-hover/button:text-storm-400\"></div>\n<div class=\"text-storm-500 group-hover/button:text-storm-500 dark:text-storm-500 dark:group-hover/button:text-storm-500\"></div>\n<div class=\"text-storm-600 group-hover/button:text-storm-600 dark:text-storm-600 dark:group-hover/button:text-storm-600\"></div>\n<div class=\"text-storm-700 group-hover/button:text-storm-700 dark:text-storm-700 dark:group-hover/button:text-storm-700\"></div>\n<div class=\"text-storm-800 group-hover/button:text-storm-800 dark:text-storm-800 dark:group-hover/button:text-storm-800\"></div>\n<div class=\"text-hurricane-50 group-hover/button:text-hurricane-50 dark:text-hurricane-50 dark:group-hover/button:text-hurricane-50\"></div>\n<div class=\"text-hurricane-100 group-hover/button:text-hurricane-100 dark:text-hurricane-100 dark:group-hover/button:text-hurricane-100\"></div>\n<div class=\"text-hurricane-200 group-hover/button:text-hurricane-200 dark:text-hurricane-200 dark:group-hover/button:text-hurricane-200\"></div>\n<div class=\"text-hurricane-300 group-hover/button:text-hurricane-300 dark:text-hurricane-300 dark:group-hover/button:text-hurricane-300\"></div>\n<div class=\"text-hurricane-400 group-hover/button:text-hurricane-400 dark:text-hurricane-400 dark:group-hover/button:text-hurricane-400\"></div>\n<div class=\"text-hurricane-500 group-hover/button:text-hurricane-500 dark:text-hurricane-500 dark:group-hover/button:text-hurricane-500\"></div>\n<div class=\"text-hurricane-600 group-hover/button:text-hurricane-600 dark:text-hurricane-600 dark:group-hover/button:text-hurricane-600\"></div>\n<div class=\"text-hurricane-700 group-hover/button:text-hurricane-700 dark:text-hurricane-700 dark:group-hover/button:text-hurricane-700\"></div>\n<div class=\"text-hurricane-800 group-hover/button:text-hurricane-800 dark:text-hurricane-800 dark:group-hover/button:text-hurricane-800\"></div>\n<div class=\"text-hurricane-900 group-hover/button:text-hurricane-900 dark:text-hurricane-900 dark:group-hover/button:text-hurricane-900\"></div>\n<div class=\"text-off-white-50 group-hover/button:text-off-white-50 dark:text-off-white-50 dark:group-hover/button:text-off-white-50\"></div>\n<div class=\"text-off-white-100 group-hover/button:text-off-white-100 dark:text-off-white-100 dark:group-hover/button:text-off-white-100\"></div>\n<div class=\"text-off-white-200 group-hover/button:text-off-white-200 dark:text-off-white-200 dark:group-hover/button:text-off-white-200\"></div>\n<div class=\"text-off-white-300 group-hover/button:text-off-white-300 dark:text-off-white-300 dark:group-hover/button:text-off-white-300\"></div>\n<div class=\"text-off-white-400 group-hover/button:text-off-white-400 dark:text-off-white-400 dark:group-hover/button:text-off-white-400\"></div>\n<div class=\"text-off-white-500 group-hover/button:text-off-white-500 dark:text-off-white-500 dark:group-hover/button:text-off-white-500\"></div>\n<div class=\"text-off-white-600 group-hover/button:text-off-white-600 dark:text-off-white-600 dark:group-hover/button:text-off-white-600\"></div>\n<div class=\"text-off-white-700 group-hover/button:text-off-white-700 dark:text-off-white-700 dark:group-hover/button:text-off-white-700\"></div>\n<div class=\"text-off-white-800 group-hover/button:text-off-white-800 dark:text-off-white-800 dark:group-hover/button:text-off-white-800\"></div>\n**/\n\nconst button = cva(\n\t[\n\t\t'group/button',\n\t\t'font-semibold leading-4',\n\t\t'flex items-center justify-center',\n\t\t'cursor-pointer font-geist',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tprimary: ['border-storm-500/20', 'text-white'],\n\t\t\t\tsecondary: null,\n\t\t\t\ttext: null,\n\t\t\t\ttransparent: 'bg-transparent border-transparent',\n\t\t\t\tdropdown: null,\n\t\t\t},\n\t\t\tactive: {\n\t\t\t\ttrue: null,\n\t\t\t\tfalse: null,\n\t\t\t},\n\t\t\terror: {\n\t\t\t\ttrue: null,\n\t\t\t\tfalse: null,\n\t\t\t},\n\t\t\tloading: {\n\t\t\t\ttrue: 'cursor-wait',\n\t\t\t\tfalse: null,\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tsm: ['text-xs h-6 gap-1'],\n\t\t\t\tbase: ['text-sm h-8 gap-2'],\n\t\t\t\tlg: ['text-base h-10 gap-2'],\n\t\t\t},\n\t\t\tdisabled: {\n\t\t\t\ttrue: 'cursor-not-allowed border-transparent',\n\t\t\t\tfalse: null,\n\t\t\t},\n\t\t\tbuttonGroupPosition: {\n\t\t\t\tnone: null,\n\t\t\t\tstart: null,\n\t\t\t\tcenter: null,\n\t\t\t\tend: null,\n\t\t\t},\n\t\t\ticonOnly: {\n\t\t\t\ttrue: 'justify-center',\n\t\t\t\tfalse: 'w-inherit py-1',\n\t\t\t},\n\t\t\tunderline: {\n\t\t\t\ttrue: 'underline',\n\t\t\t\tfalse: 'no-underline',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t// variants\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\tclass: 'bg-white dark:bg-white/15',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['primary', 'secondary', 'dropdown'],\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'border',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['primary', 'secondary', 'transparent', 'dropdown'],\n\t\t\t\tbuttonGroupPosition: 'none',\n\t\t\t\tclass: 'rounded-lg',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['primary', 'secondary', 'transparent', 'dropdown'],\n\t\t\t\tbuttonGroupPosition: 'start',\n\t\t\t\tclass: 'rounded-s-lg',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['primary', 'secondary', 'transparent', 'dropdown'],\n\t\t\t\tbuttonGroupPosition: 'end',\n\t\t\t\tclass: 'rounded-e-lg',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\tdisabled: false,\n\t\t\t\terror: false,\n\t\t\t\tclass: 'text-storm-500 dark:text-white',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'primary',\n\t\t\t\tclass: 'dark:border-0 dark:active:border-0',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'primary',\n\t\t\t\tdisabled: true,\n\t\t\t\tclass: 'bg-indigo-200 dark:bg-indigo-600/30 dark:text-white/30',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'primary',\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'bg-indigo-600',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'primary',\n\t\t\t\tdisabled: false,\n\t\t\t\tloading: false,\n\t\t\t\tclass: [\n\t\t\t\t\t'active:border-storm-500/10 dark:active:ring-0 active:ring-2 active:text-white/60',\n\t\t\t\t\t'drop-shadow-primary-button hover:drop-shadow-2 hover:bg-indigo-700 active:ring-indigo-100',\n\t\t\t\t],\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'primary',\n\t\t\t\tdisabled: false,\n\t\t\t\tloading: false,\n\t\t\t\tactive: true,\n\t\t\t\tclass: 'ring ring-2',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'primary',\n\t\t\t\tdisabled: false,\n\t\t\t\tloading: false,\n\t\t\t\tactive: true,\n\t\t\t\tclass: 'ring-indigo-100',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\tdisabled: true,\n\t\t\t\tclass:\n\t\t\t\t\t'border bg-white-600 text-storm-100 dark:bg-white/5 dark:border-white/5 dark:text-hurricane-400',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'text-storm-500 dark:text-white',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\tdisabled: false,\n\t\t\t\tloading: false,\n\t\t\t\tclass: [\n\t\t\t\t\t'drop-shadow-1 hover:drop-shadow-1 hover:bg-white-600 active:ring-indigo-100 active:text-storm-500/60',\n\t\t\t\t\t'dark:hover:bg-white/25 dark:active:bg-white/25 dark:active:ring-0 dark:active:text-white/60',\n\t\t\t\t],\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\tdisabled: false,\n\t\t\t\tloading: false,\n\t\t\t\terror: false,\n\t\t\t\tclass: [\n\t\t\t\t\t'active:border-indigo-600 active:ring active:ring-2',\n\t\t\t\t\t'dark:active:ring-0',\n\t\t\t\t],\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\tdisabled: false,\n\t\t\t\tloading: false,\n\t\t\t\tactive: true,\n\t\t\t\terror: false,\n\t\t\t\tclass: ['border-indigo-600 ring ring-2 ring-indigo-100', 'dark:ring-0'],\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\terror: false,\n\t\t\t\tactive: false,\n\t\t\t\tclass: ['border-storm-500/20 dark:border-transparent'],\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\terror: true,\n\t\t\t\tclass: [\n\t\t\t\t\t'border border-negative-red-500 text-negative-red-800 ring ring-2 ring-negative-red-50 active:text-negative-red-800',\n\t\t\t\t\t'dark:ring-0 dark:border-negative-red-700 dark:text-negative-red-alternative',\n\t\t\t\t],\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tvariant: ['text', 'transparent'],\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'text-indigo-700 hover:text-indigo-800',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['text', 'transparent'],\n\t\t\t\tdisabled: true,\n\t\t\t\tclass: 'text-indigo-300',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['text', 'transparent'],\n\t\t\t\tdisabled: false,\n\t\t\t\tloading: false,\n\t\t\t\tclass: 'active:text-indigo-800',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tvariant: ['primary', 'secondary', 'transparent'],\n\t\t\t\tsize: ['base', 'sm'],\n\t\t\t\ticonOnly: false,\n\t\t\t\tclass: 'px-2',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['primary', 'secondary', 'transparent'],\n\t\t\t\tsize: 'lg',\n\t\t\t\ticonOnly: false,\n\t\t\t\tclass: 'px-3',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'dropdown',\n\t\t\t\ticonOnly: false,\n\t\t\t\tclass: 'p-2',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tvariant: ['primary', 'secondary', 'transparent', 'text'],\n\t\t\t\ticonOnly: false,\n\t\t\t\tclass: 'py-1',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tsize: 'sm',\n\t\t\t\ticonOnly: true,\n\t\t\t\tclass: 'w-6',\n\t\t\t},\n\t\t\t{\n\t\t\t\tsize: 'base',\n\t\t\t\ticonOnly: true,\n\t\t\t\tclass: 'w-8',\n\t\t\t},\n\t\t\t{\n\t\t\t\tsize: 'lg',\n\t\t\t\ticonOnly: true,\n\t\t\t\tclass: 'w-10',\n\t\t\t},\n\t\t],\n\t}\n);\n\nconst icon = cva([], {\n\tvariants: {\n\t\tsize: {\n\t\t\tsm: 'text-xs',\n\t\t\tbase: 'text-base',\n\t\t\tlg: 'text-base',\n\t\t},\n\t\tvariant: {\n\t\t\tprimary: null,\n\t\t\tsecondary: null,\n\t\t\ttext: null,\n\t\t\ttransparent: null,\n\t\t\tdropdown: null,\n\t\t},\n\t\tdisabled: {\n\t\t\ttrue: null,\n\t\t\tfalse: null,\n\t\t},\n\t\tactive: {\n\t\t\ttrue: null,\n\t\t\tfalse: null,\n\t\t},\n\t\terror: {\n\t\t\ttrue: null,\n\t\t\tfalse: null,\n\t\t},\n\t\ticonOnly: {\n\t\t\ttrue: null,\n\t\t\tfalse: null,\n\t\t},\n\t},\n\tcompoundVariants: [\n\t\t{\n\t\t\tvariant: 'primary',\n\t\t\tdisabled: false,\n\t\t\tactive: false,\n\t\t\terror: false,\n\t\t\tclass:\n\t\t\t\t'text-indigo-300 group-hover/button:text-white group-active/button:text-white/60',\n\t\t},\n\t\t{\n\t\t\tvariant: 'primary',\n\t\t\tdisabled: false,\n\t\t\tactive: true,\n\t\t\tclass: 'text-white/60',\n\t\t},\n\t\t{\n\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\tdisabled: false,\n\t\t\tactive: false,\n\t\t\terror: false,\n\t\t\tclass: [\n\t\t\t\t'text-storm-300 group-hover/button:text-storm-500 group-active/button:text-storm-500/60',\n\t\t\t\t'dark:group-hover/button:text-white dark:group-active/button:text-white/60',\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\tdisabled: false,\n\t\t\tactive: false,\n\t\t\ticonOnly: false,\n\t\t\terror: false,\n\t\t\tclass: 'dark:text-hurricane-200',\n\t\t},\n\t\t{\n\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\tdisabled: false,\n\t\t\tactive: false,\n\t\t\ticonOnly: true,\n\t\t\terror: false,\n\t\t\tclass: 'dark:text-white',\n\t\t},\n\t\t{\n\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\tdisabled: false,\n\t\t\tactive: true,\n\t\t\terror: false,\n\t\t\tclass: 'text-storm-500/60 dark:text-white/60',\n\t\t},\n\t\t{\n\t\t\tvariant: ['transparent', 'text'],\n\t\t\tdisabled: false,\n\t\t\tactive: false,\n\t\t\tclass:\n\t\t\t\t'text-indigo-500 group-hover/button:text-indigo-700 group-active/button:text-indigo-800',\n\t\t},\n\t\t{\n\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\tactive: false,\n\t\t\terror: true,\n\t\t\tclass:\n\t\t\t\t'text-negative-red-500 group-hover/button:text-negative-red-800 dark:text-negative-red-alternative',\n\t\t},\n\t\t{\n\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\tactive: true,\n\t\t\terror: true,\n\t\t\tclass: 'text-negative-red-800',\n\t\t},\n\t],\n});\n\nexport type ButtonVariant =\n\t| 'primary'\n\t| 'secondary'\n\t| 'transparent'\n\t| 'text'\n\t| 'dropdown';\n\n@Component({\n\ttag: 'p-button',\n\tstyleUrl: 'button.component.css',\n\tshadow: true,\n})\nexport class Button {\n\t/**\n\t * The label of the button (Can use slot)\n\t */\n\t@Prop() label?: string;\n\n\t/**\n\t * The type of the button\n\t */\n\t@Prop() as?: 'a' | 'button' = 'button';\n\n\t/**\n\t * Wether to apply an underline\n\t */\n\t@Prop() underline?: boolean = true;\n\n\t/**\n\t * The tab index to apply to the button\n\t */\n\t@Prop() tabIndex?: number;\n\n\t/**\n\t * The variant of the button\n\t */\n\t@Prop() variant?: ButtonVariant = 'primary';\n\n\t/**\n\t * Wether to force an active state\n\t */\n\t@Prop() active?: boolean = false;\n\n\t/**\n\t * Wether to show a error state\n\t */\n\t@Prop() error?: boolean = false;\n\n\t/**\n\t * Href in case of \"text\" version\n\t */\n\t@Prop() href?: string;\n\n\t/**\n\t * Target in case of \"text\" version\n\t */\n\t@Prop() target?: string;\n\n\t/**\n\t * The size of the button\n\t */\n\t@Prop() size?: 'sm' | 'base' | 'lg' = 'base';\n\n\t/**\n\t * The type of the button\n\t */\n\t@Prop() type?: 'button' | 'submit' = 'button';\n\n\t/**\n\t * Wether to show a loader or not\n\t */\n\t@Prop() loading?: boolean = false;\n\n\t/**\n\t * Wether to show a chevron or not\n\t */\n\t@Prop() chevron?: boolean | 'up' | 'down' = false;\n\n\t/**\n\t * Chevron position\n\t */\n\t@Prop() chevronPosition?: 'start' | 'end' = 'end';\n\n\t/**\n\t * Wether the button is disabled\n\t */\n\t@Prop() disabled?: boolean = false;\n\n\t/**\n\t * Icon to show on the button\n\t */\n\t@Prop() icon?: IconVariant;\n\n\t/**\n\t * Wether the button is icon only\n\t */\n\t@Prop() iconOnly?: boolean = false;\n\n\t/**\n\t * A class to apply to the icon\n\t */\n\t@Prop() iconClass?: string;\n\n\t/**\n\t * Icon position\n\t */\n\t@Prop() iconPosition?: 'start' | 'end' = 'start';\n\n\t/**\n\t * Icon flip\n\t */\n\t@Prop() iconFlip?: IconFlipOptions;\n\n\t/**\n\t * Icon rotate\n\t */\n\t@Prop() iconRotate?: RotateOptions;\n\n\t/**\n\t * Wether the button should inherit text styles\n\t */\n\t@Prop() inheritText?: boolean = false;\n\n\t/**\n\t * Position of the button in the button group, mostly un-used if not in a group\n\t */\n\t@Prop() buttonGroupPosition?: 'start' | 'center' | 'end' | 'none' = 'none';\n\n\t/**\n\t * The class of the container passed by parent\n\t */\n\t@Prop() class?: string;\n\n\t/**\n\t * Button click event\n\t */\n\t@StencilEvent({\n\t\tbubbles: false,\n\t})\n\tonClick: EventEmitter<MouseEvent>;\n\n\t@Element() private _host: HTMLElement;\n\n\trender() {\n\t\tlet loaderColor: 'white' | 'off-white' | 'indigo' | 'storm' = 'white';\n\t\tswitch (this.variant) {\n\t\t\tcase 'secondary':\n\t\t\tcase 'dropdown':\n\t\t\tcase 'transparent':\n\t\t\t\tloaderColor = 'off-white';\n\t\t\t\tbreak;\n\t\t\tcase 'text':\n\t\t\t\tloaderColor = 'storm';\n\t\t\t\tbreak;\n\t\t}\n\n\t\tconst VariableTag =\n\t\t\tthis.variant === 'text' || this.href?.length || this.as === 'a'\n\t\t\t\t? 'a'\n\t\t\t\t: 'button';\n\n\t\tconst hostClass = cn('p-button inline-block', this.class);\n\t\tconst active = asBoolean(this.active) || hostClass?.includes('active');\n\n\t\treturn (\n\t\t\t<ThemedHost class={hostClass}>\n\t\t\t\t<VariableTag\n\t\t\t\t\tdisabled={asBoolean(this.disabled)}\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttype={this.variant !== 'text' ? this.type : undefined}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\ttabIndex={this.tabIndex}\n\t\t\t\t\tclass={button({\n\t\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\t\tsize: this.size,\n\t\t\t\t\t\tloading: asBoolean(this.loading),\n\t\t\t\t\t\tdisabled: asBoolean(this.disabled),\n\t\t\t\t\t\tbuttonGroupPosition: this.buttonGroupPosition,\n\t\t\t\t\t\ticonOnly: asBoolean(this.iconOnly),\n\t\t\t\t\t\tactive,\n\t\t\t\t\t\terror: asBoolean(this.error),\n\t\t\t\t\t\tunderline: asBoolean(this.underline) && VariableTag === 'a',\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{this.chevron && this.chevronPosition === 'start' && (\n\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\tvariant='caret'\n\t\t\t\t\t\t\trotate={this.chevron === 'up' ? 180 : 0}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{this.icon &&\n\t\t\t\t\t\tthis.iconPosition === 'start' &&\n\t\t\t\t\t\t!(this.iconOnly && this.loading) &&\n\t\t\t\t\t\tthis._getIcon()}\n\n\t\t\t\t\t{this.label ? this.label : <slot />}\n\n\t\t\t\t\t{this.icon &&\n\t\t\t\t\t\tthis.iconPosition === 'end' &&\n\t\t\t\t\t\t!this.loading &&\n\t\t\t\t\t\t!this.chevron &&\n\t\t\t\t\t\tthis._getIcon()}\n\n\t\t\t\t\t{this.chevron && !this.loading && this.chevronPosition === 'end' && (\n\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\tvariant='caret'\n\t\t\t\t\t\t\trotate={this.chevron === 'up' ? 180 : 0}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{this.loading && <p-loader color={loaderColor} />}\n\t\t\t\t</VariableTag>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\t@Listen('click', { capture: true })\n\thandleClick(ev: MouseEvent) {\n\t\tif (this.loading || this.disabled) {\n\t\t\tev.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.type === 'submit') {\n\t\t\tthis._host.closest('form').requestSubmit();\n\t\t}\n\n\t\tthis.onClick.emit(ev);\n\t}\n\n\tprivate _getIcon() {\n\t\tif (!this.icon) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn (\n\t\t\t<p-icon\n\t\t\t\tclass={cn(\n\t\t\t\t\ticon({\n\t\t\t\t\t\tsize: this.size,\n\t\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\t\tdisabled: asBoolean(this.disabled),\n\t\t\t\t\t\tactive: asBoolean(this.active),\n\t\t\t\t\t\terror: asBoolean(this.error),\n\t\t\t\t\t\ticonOnly: asBoolean(this.iconOnly),\n\t\t\t\t\t}),\n\t\t\t\t\tthis.iconClass ?? ''\n\t\t\t\t)}\n\t\t\t\tvariant={this.icon}\n\t\t\t\tflip={this.iconFlip}\n\t\t\t\trotate={this.iconRotate}\n\t\t\t/>\n\t\t);\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"button.component.js","sourceRoot":"","sources":["../../../../src/components/molecules/button/button.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,SAAS,EACT,KAAK,IAAI,YAAY,EAErB,CAAC,EACD,MAAM,EACN,IAAI,EACJ,OAAO,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AAErE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAGvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AAEH,MAAM,MAAM,GAAG,GAAG,CACjB;IACC,cAAc;IACd,yBAAyB;IACzB,kCAAkC;IAClC,2BAA2B;CAC3B,EACD;IACC,QAAQ,EAAE;QACT,OAAO,EAAE;YACR,OAAO,EAAE,CAAC,qBAAqB,EAAE,YAAY,CAAC;YAC9C,SAAS,EAAE,IA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import {\n\tComponent,\n\tEvent as StencilEvent,\n\tEventEmitter,\n\th,\n\tListen,\n\tProp,\n\tElement,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { ThemedHost } from '../../../internal/themed-host.component';\nimport { RotateOptions } from '../../../types/tailwind';\nimport { asBoolean } from '../../../utils/as-boolean';\nimport { cn } from '../../../utils/cn';\nimport { IconFlipOptions, IconVariant } from '../../atoms/icon/icon.component';\n\n/**\n<div class=\"text-inherit group-hover/button:text-inherit dark:text-inherit dark:group-hover/button:text-inherit\"></div>\n<div class=\"text-transparent group-hover/button:text-transparent dark:text-transparent dark:group-hover/button:text-transparent\"></div>\n<div class=\"text-current group-hover/button:text-current dark:text-current dark:group-hover/button:text-current\"></div>\n<div class=\"text-black group-hover/button:text-black dark:text-black dark:group-hover/button:text-black\"></div>\n<div class=\"text-white-500 group-hover/button:text-white-500 dark:text-white-500 dark:group-hover/button:text-white-500\"></div>\n<div class=\"text-white-600 group-hover/button:text-white-600 dark:text-white-600 dark:group-hover/button:text-white-600\"></div>\n<div class=\"text-white-700 group-hover/button:text-white-700 dark:text-white-700 dark:group-hover/button:text-white-700\"></div>\n<div class=\"text-white-800 group-hover/button:text-white-800 dark:text-white-800 dark:group-hover/button:text-white-800\"></div>\n<div class=\"text-white-DEFAULT group-hover/button:text-white-DEFAULT dark:text-white-DEFAULT dark:group-hover/button:text-white-DEFAULT\"></div>\n<div class=\"text-negative-red-50 group-hover/button:text-negative-red-50 dark:text-negative-red-50 dark:group-hover/button:text-negative-red-50\"></div>\n<div class=\"text-negative-red-100 group-hover/button:text-negative-red-100 dark:text-negative-red-100 dark:group-hover/button:text-negative-red-100\"></div>\n<div class=\"text-negative-red-500 group-hover/button:text-negative-red-500 dark:text-negative-red-500 dark:group-hover/button:text-negative-red-500\"></div>\n<div class=\"text-negative-red-700 group-hover/button:text-negative-red-700 dark:text-negative-red-700 dark:group-hover/button:text-negative-red-700\"></div>\n<div class=\"text-negative-red-800 group-hover/button:text-negative-red-800 dark:text-negative-red-800 dark:group-hover/button:text-negative-red-800\"></div>\n<div class=\"text-negative-red-alternative group-hover/button:text-negative-red-alternative dark:text-negative-red-alternative dark:group-hover/button:text-negative-red-alternative\"></div>\n<div class=\"text-positive-green-50 group-hover/button:text-positive-green-50 dark:text-positive-green-50 dark:group-hover/button:text-positive-green-50\"></div>\n<div class=\"text-positive-green-100 group-hover/button:text-positive-green-100 dark:text-positive-green-100 dark:group-hover/button:text-positive-green-100\"></div>\n<div class=\"text-positive-green-500 group-hover/button:text-positive-green-500 dark:text-positive-green-500 dark:group-hover/button:text-positive-green-500\"></div>\n<div class=\"text-positive-green-800 group-hover/button:text-positive-green-800 dark:text-positive-green-800 dark:group-hover/button:text-positive-green-800\"></div>\n<div class=\"text-positive-green-alternative group-hover/button:text-positive-green-alternative dark:text-positive-green-alternative dark:group-hover/button:text-positive-green-alternative\"></div>\n<div class=\"text-amber-50 group-hover/button:text-amber-50 dark:text-amber-50 dark:group-hover/button:text-amber-50\"></div>\n<div class=\"text-amber-100 group-hover/button:text-amber-100 dark:text-amber-100 dark:group-hover/button:text-amber-100\"></div>\n<div class=\"text-amber-500 group-hover/button:text-amber-500 dark:text-amber-500 dark:group-hover/button:text-amber-500\"></div>\n<div class=\"text-amber-800 group-hover/button:text-amber-800 dark:text-amber-800 dark:group-hover/button:text-amber-800\"></div>\n<div class=\"text-amber-alternative group-hover/button:text-amber-alternative dark:text-amber-alternative dark:group-hover/button:text-amber-alternative\"></div>\n<div class=\"text-indigo-50 group-hover/button:text-indigo-50 dark:text-indigo-50 dark:group-hover/button:text-indigo-50\"></div>\n<div class=\"text-indigo-100 group-hover/button:text-indigo-100 dark:text-indigo-100 dark:group-hover/button:text-indigo-100\"></div>\n<div class=\"text-indigo-200 group-hover/button:text-indigo-200 dark:text-indigo-200 dark:group-hover/button:text-indigo-200\"></div>\n<div class=\"text-indigo-300 group-hover/button:text-indigo-300 dark:text-indigo-300 dark:group-hover/button:text-indigo-300\"></div>\n<div class=\"text-indigo-400 group-hover/button:text-indigo-400 dark:text-indigo-400 dark:group-hover/button:text-indigo-400\"></div>\n<div class=\"text-indigo-500 group-hover/button:text-indigo-500 dark:text-indigo-500 dark:group-hover/button:text-indigo-500\"></div>\n<div class=\"text-indigo-600 group-hover/button:text-indigo-600 dark:text-indigo-600 dark:group-hover/button:text-indigo-600\"></div>\n<div class=\"text-indigo-700 group-hover/button:text-indigo-700 dark:text-indigo-700 dark:group-hover/button:text-indigo-700\"></div>\n<div class=\"text-indigo-800 group-hover/button:text-indigo-800 dark:text-indigo-800 dark:group-hover/button:text-indigo-800\"></div>\n<div class=\"text-indigo-900 group-hover/button:text-indigo-900 dark:text-indigo-900 dark:group-hover/button:text-indigo-900\"></div>\n<div class=\"text-storm-50 group-hover/button:text-storm-50 dark:text-storm-50 dark:group-hover/button:text-storm-50\"></div>\n<div class=\"text-storm-100 group-hover/button:text-storm-100 dark:text-storm-100 dark:group-hover/button:text-storm-100\"></div>\n<div class=\"text-storm-200 group-hover/button:text-storm-200 dark:text-storm-200 dark:group-hover/button:text-storm-200\"></div>\n<div class=\"text-storm-300 group-hover/button:text-storm-300 dark:text-storm-300 dark:group-hover/button:text-storm-300\"></div>\n<div class=\"text-storm-400 group-hover/button:text-storm-400 dark:text-storm-400 dark:group-hover/button:text-storm-400\"></div>\n<div class=\"text-storm-500 group-hover/button:text-storm-500 dark:text-storm-500 dark:group-hover/button:text-storm-500\"></div>\n<div class=\"text-storm-600 group-hover/button:text-storm-600 dark:text-storm-600 dark:group-hover/button:text-storm-600\"></div>\n<div class=\"text-storm-700 group-hover/button:text-storm-700 dark:text-storm-700 dark:group-hover/button:text-storm-700\"></div>\n<div class=\"text-storm-800 group-hover/button:text-storm-800 dark:text-storm-800 dark:group-hover/button:text-storm-800\"></div>\n<div class=\"text-hurricane-50 group-hover/button:text-hurricane-50 dark:text-hurricane-50 dark:group-hover/button:text-hurricane-50\"></div>\n<div class=\"text-hurricane-100 group-hover/button:text-hurricane-100 dark:text-hurricane-100 dark:group-hover/button:text-hurricane-100\"></div>\n<div class=\"text-hurricane-200 group-hover/button:text-hurricane-200 dark:text-hurricane-200 dark:group-hover/button:text-hurricane-200\"></div>\n<div class=\"text-hurricane-300 group-hover/button:text-hurricane-300 dark:text-hurricane-300 dark:group-hover/button:text-hurricane-300\"></div>\n<div class=\"text-hurricane-400 group-hover/button:text-hurricane-400 dark:text-hurricane-400 dark:group-hover/button:text-hurricane-400\"></div>\n<div class=\"text-hurricane-500 group-hover/button:text-hurricane-500 dark:text-hurricane-500 dark:group-hover/button:text-hurricane-500\"></div>\n<div class=\"text-hurricane-600 group-hover/button:text-hurricane-600 dark:text-hurricane-600 dark:group-hover/button:text-hurricane-600\"></div>\n<div class=\"text-hurricane-700 group-hover/button:text-hurricane-700 dark:text-hurricane-700 dark:group-hover/button:text-hurricane-700\"></div>\n<div class=\"text-hurricane-800 group-hover/button:text-hurricane-800 dark:text-hurricane-800 dark:group-hover/button:text-hurricane-800\"></div>\n<div class=\"text-hurricane-900 group-hover/button:text-hurricane-900 dark:text-hurricane-900 dark:group-hover/button:text-hurricane-900\"></div>\n<div class=\"text-off-white-50 group-hover/button:text-off-white-50 dark:text-off-white-50 dark:group-hover/button:text-off-white-50\"></div>\n<div class=\"text-off-white-100 group-hover/button:text-off-white-100 dark:text-off-white-100 dark:group-hover/button:text-off-white-100\"></div>\n<div class=\"text-off-white-200 group-hover/button:text-off-white-200 dark:text-off-white-200 dark:group-hover/button:text-off-white-200\"></div>\n<div class=\"text-off-white-300 group-hover/button:text-off-white-300 dark:text-off-white-300 dark:group-hover/button:text-off-white-300\"></div>\n<div class=\"text-off-white-400 group-hover/button:text-off-white-400 dark:text-off-white-400 dark:group-hover/button:text-off-white-400\"></div>\n<div class=\"text-off-white-500 group-hover/button:text-off-white-500 dark:text-off-white-500 dark:group-hover/button:text-off-white-500\"></div>\n<div class=\"text-off-white-600 group-hover/button:text-off-white-600 dark:text-off-white-600 dark:group-hover/button:text-off-white-600\"></div>\n<div class=\"text-off-white-700 group-hover/button:text-off-white-700 dark:text-off-white-700 dark:group-hover/button:text-off-white-700\"></div>\n<div class=\"text-off-white-800 group-hover/button:text-off-white-800 dark:text-off-white-800 dark:group-hover/button:text-off-white-800\"></div>\n**/\n\nconst button = cva(\n\t[\n\t\t'group/button',\n\t\t'font-semibold leading-4',\n\t\t'flex items-center justify-center',\n\t\t'cursor-pointer font-geist',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tprimary: ['border-storm-500/20', 'text-white'],\n\t\t\t\tsecondary: null,\n\t\t\t\ttext: null,\n\t\t\t\ttransparent: 'bg-transparent border-transparent',\n\t\t\t\tdropdown: null,\n\t\t\t},\n\t\t\tactive: {\n\t\t\t\ttrue: null,\n\t\t\t\tfalse: null,\n\t\t\t},\n\t\t\terror: {\n\t\t\t\ttrue: null,\n\t\t\t\tfalse: null,\n\t\t\t},\n\t\t\tloading: {\n\t\t\t\ttrue: 'cursor-wait',\n\t\t\t\tfalse: null,\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tsm: ['text-xs h-6 gap-1'],\n\t\t\t\tbase: ['text-sm h-8 gap-2'],\n\t\t\t\tlg: ['text-base h-10 gap-2'],\n\t\t\t},\n\t\t\tdisabled: {\n\t\t\t\ttrue: 'cursor-not-allowed border-transparent',\n\t\t\t\tfalse: null,\n\t\t\t},\n\t\t\tbuttonGroupPosition: {\n\t\t\t\tnone: null,\n\t\t\t\tstart: null,\n\t\t\t\tcenter: null,\n\t\t\t\tend: null,\n\t\t\t},\n\t\t\ticonOnly: {\n\t\t\t\ttrue: 'justify-center',\n\t\t\t\tfalse: 'w-inherit py-1',\n\t\t\t},\n\t\t\tunderline: {\n\t\t\t\ttrue: 'underline',\n\t\t\t\tfalse: 'no-underline',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t// variants\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\tclass: 'bg-white dark:bg-white/15',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['primary', 'secondary', 'dropdown'],\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'border',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['primary', 'secondary', 'transparent', 'dropdown'],\n\t\t\t\tbuttonGroupPosition: 'none',\n\t\t\t\tclass: 'rounded-lg',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['primary', 'secondary', 'transparent', 'dropdown'],\n\t\t\t\tbuttonGroupPosition: 'start',\n\t\t\t\tclass: 'rounded-s-lg',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['primary', 'secondary', 'transparent', 'dropdown'],\n\t\t\t\tbuttonGroupPosition: 'end',\n\t\t\t\tclass: 'rounded-e-lg',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\tdisabled: false,\n\t\t\t\terror: false,\n\t\t\t\tclass: 'text-storm-500 dark:text-white',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'primary',\n\t\t\t\tclass: 'dark:border-0 dark:active:border-0',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'primary',\n\t\t\t\tdisabled: true,\n\t\t\t\tclass: 'bg-indigo-200 dark:bg-indigo-600/30 dark:text-white/30',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'primary',\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'bg-indigo-600',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'primary',\n\t\t\t\tdisabled: false,\n\t\t\t\tloading: false,\n\t\t\t\tclass: [\n\t\t\t\t\t'active:border-storm-500/10 dark:active:ring-0 active:ring-2 active:text-white/60',\n\t\t\t\t\t'drop-shadow-primary-button hover:drop-shadow-2 hover:bg-indigo-700 active:ring-indigo-100',\n\t\t\t\t],\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'primary',\n\t\t\t\tdisabled: false,\n\t\t\t\tloading: false,\n\t\t\t\tactive: true,\n\t\t\t\tclass: 'ring ring-2',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'primary',\n\t\t\t\tdisabled: false,\n\t\t\t\tloading: false,\n\t\t\t\tactive: true,\n\t\t\t\tclass: 'ring-indigo-100',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\tdisabled: true,\n\t\t\t\tclass:\n\t\t\t\t\t'border bg-white-600 text-storm-100 dark:bg-white/5 dark:border-white/5 dark:text-hurricane-400',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'text-storm-500 dark:text-white',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\tdisabled: false,\n\t\t\t\tloading: false,\n\t\t\t\tclass: [\n\t\t\t\t\t'drop-shadow-1 hover:drop-shadow-1 hover:bg-white-600 active:ring-indigo-100 active:text-storm-500/60',\n\t\t\t\t\t'dark:hover:bg-white/25 dark:active:bg-white/25 dark:active:ring-0 dark:active:text-white/60',\n\t\t\t\t],\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\tdisabled: false,\n\t\t\t\tloading: false,\n\t\t\t\terror: false,\n\t\t\t\tclass: [\n\t\t\t\t\t'active:border-indigo-600 active:ring active:ring-2',\n\t\t\t\t\t'dark:active:ring-0',\n\t\t\t\t],\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\tdisabled: false,\n\t\t\t\tloading: false,\n\t\t\t\tactive: true,\n\t\t\t\terror: false,\n\t\t\t\tclass: ['border-indigo-600 ring ring-2 ring-indigo-100', 'dark:ring-0'],\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\terror: false,\n\t\t\t\tactive: false,\n\t\t\t\tclass: ['border-storm-500/20 dark:border-transparent'],\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\terror: true,\n\t\t\t\tclass: [\n\t\t\t\t\t'border border-negative-red-500 text-negative-red-800 ring ring-2 ring-negative-red-50 active:text-negative-red-800',\n\t\t\t\t\t'dark:ring-0 dark:border-negative-red-700 dark:text-negative-red-alternative',\n\t\t\t\t],\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tvariant: ['text', 'transparent'],\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'text-indigo-700 hover:text-indigo-800',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['text', 'transparent'],\n\t\t\t\tdisabled: true,\n\t\t\t\tclass: 'text-indigo-300',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['text', 'transparent'],\n\t\t\t\tdisabled: false,\n\t\t\t\tloading: false,\n\t\t\t\tclass: 'active:text-indigo-800',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tvariant: ['primary', 'secondary', 'transparent'],\n\t\t\t\tsize: ['base', 'sm'],\n\t\t\t\ticonOnly: false,\n\t\t\t\tclass: 'px-2',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['primary', 'secondary', 'transparent'],\n\t\t\t\tsize: 'lg',\n\t\t\t\ticonOnly: false,\n\t\t\t\tclass: 'px-3',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'dropdown',\n\t\t\t\ticonOnly: false,\n\t\t\t\tclass: 'p-2',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tvariant: ['primary', 'secondary', 'transparent', 'text'],\n\t\t\t\ticonOnly: false,\n\t\t\t\tclass: 'py-1',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tsize: 'sm',\n\t\t\t\ticonOnly: true,\n\t\t\t\tclass: 'w-6',\n\t\t\t},\n\t\t\t{\n\t\t\t\tsize: 'base',\n\t\t\t\ticonOnly: true,\n\t\t\t\tclass: 'w-8',\n\t\t\t},\n\t\t\t{\n\t\t\t\tsize: 'lg',\n\t\t\t\ticonOnly: true,\n\t\t\t\tclass: 'w-10',\n\t\t\t},\n\t\t],\n\t}\n);\n\nconst icon = cva([], {\n\tvariants: {\n\t\tsize: {\n\t\t\tsm: 'text-xs',\n\t\t\tbase: 'text-base',\n\t\t\tlg: 'text-base',\n\t\t},\n\t\tvariant: {\n\t\t\tprimary: null,\n\t\t\tsecondary: null,\n\t\t\ttext: null,\n\t\t\ttransparent: null,\n\t\t\tdropdown: null,\n\t\t},\n\t\tdisabled: {\n\t\t\ttrue: null,\n\t\t\tfalse: null,\n\t\t},\n\t\tactive: {\n\t\t\ttrue: null,\n\t\t\tfalse: null,\n\t\t},\n\t\terror: {\n\t\t\ttrue: null,\n\t\t\tfalse: null,\n\t\t},\n\t\ticonOnly: {\n\t\t\ttrue: null,\n\t\t\tfalse: null,\n\t\t},\n\t},\n\tcompoundVariants: [\n\t\t{\n\t\t\tvariant: 'primary',\n\t\t\tdisabled: false,\n\t\t\tactive: false,\n\t\t\terror: false,\n\t\t\tclass:\n\t\t\t\t'text-indigo-300 group-hover/button:text-white group-active/button:text-white/60',\n\t\t},\n\t\t{\n\t\t\tvariant: 'primary',\n\t\t\tdisabled: false,\n\t\t\tactive: true,\n\t\t\tclass: 'text-white/60',\n\t\t},\n\t\t{\n\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\tdisabled: false,\n\t\t\tactive: false,\n\t\t\terror: false,\n\t\t\tclass: [\n\t\t\t\t'text-storm-300 group-hover/button:text-storm-500 group-active/button:text-storm-500/60',\n\t\t\t\t'dark:group-hover/button:text-white dark:group-active/button:text-white/60',\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\tdisabled: false,\n\t\t\tactive: false,\n\t\t\ticonOnly: false,\n\t\t\terror: false,\n\t\t\tclass: 'dark:text-hurricane-200',\n\t\t},\n\t\t{\n\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\tdisabled: false,\n\t\t\tactive: false,\n\t\t\ticonOnly: true,\n\t\t\terror: false,\n\t\t\tclass: 'dark:text-white',\n\t\t},\n\t\t{\n\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\tdisabled: false,\n\t\t\tactive: true,\n\t\t\terror: false,\n\t\t\tclass: 'text-storm-500/60 dark:text-white/60',\n\t\t},\n\t\t{\n\t\t\tvariant: ['transparent', 'text'],\n\t\t\tdisabled: false,\n\t\t\tactive: false,\n\t\t\tclass:\n\t\t\t\t'text-indigo-500 group-hover/button:text-indigo-700 group-active/button:text-indigo-800',\n\t\t},\n\t\t{\n\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\tactive: false,\n\t\t\terror: true,\n\t\t\tclass:\n\t\t\t\t'text-negative-red-500 group-hover/button:text-negative-red-800 dark:text-negative-red-alternative',\n\t\t},\n\t\t{\n\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\tactive: true,\n\t\t\terror: true,\n\t\t\tclass: 'text-negative-red-800',\n\t\t},\n\t],\n});\n\nexport type ButtonVariant =\n\t| 'primary'\n\t| 'secondary'\n\t| 'transparent'\n\t| 'text'\n\t| 'dropdown';\n\n@Component({\n\ttag: 'p-button',\n\tstyleUrl: 'button.component.css',\n\tshadow: true,\n})\nexport class Button {\n\t/**\n\t * The label of the button (Can use slot)\n\t */\n\t@Prop() label?: string;\n\n\t/**\n\t * The type of the button\n\t */\n\t@Prop() as?: 'a' | 'button' = 'button';\n\n\t/**\n\t * Wether to apply an underline\n\t */\n\t@Prop() underline?: boolean = false;\n\n\t/**\n\t * The tab index to apply to the button\n\t */\n\t@Prop() tabIndex?: number;\n\n\t/**\n\t * The variant of the button\n\t */\n\t@Prop() variant?: ButtonVariant = 'primary';\n\n\t/**\n\t * Wether to force an active state\n\t */\n\t@Prop() active?: boolean = false;\n\n\t/**\n\t * Wether to show a error state\n\t */\n\t@Prop() error?: boolean = false;\n\n\t/**\n\t * Href in case of \"text\" version\n\t */\n\t@Prop() href?: string;\n\n\t/**\n\t * Target in case of \"text\" version\n\t */\n\t@Prop() target?: string;\n\n\t/**\n\t * The size of the button\n\t */\n\t@Prop() size?: 'sm' | 'base' | 'lg' = 'base';\n\n\t/**\n\t * The type of the button\n\t */\n\t@Prop() type?: 'button' | 'submit' = 'button';\n\n\t/**\n\t * Wether to show a loader or not\n\t */\n\t@Prop() loading?: boolean = false;\n\n\t/**\n\t * Wether to show a chevron or not\n\t */\n\t@Prop() chevron?: boolean | 'up' | 'down' = false;\n\n\t/**\n\t * Chevron position\n\t */\n\t@Prop() chevronPosition?: 'start' | 'end' = 'end';\n\n\t/**\n\t * Wether the button is disabled\n\t */\n\t@Prop() disabled?: boolean = false;\n\n\t/**\n\t * Icon to show on the button\n\t */\n\t@Prop() icon?: IconVariant;\n\n\t/**\n\t * Wether the button is icon only\n\t */\n\t@Prop() iconOnly?: boolean = false;\n\n\t/**\n\t * A class to apply to the icon\n\t */\n\t@Prop() iconClass?: string;\n\n\t/**\n\t * Icon position\n\t */\n\t@Prop() iconPosition?: 'start' | 'end' = 'start';\n\n\t/**\n\t * Icon flip\n\t */\n\t@Prop() iconFlip?: IconFlipOptions;\n\n\t/**\n\t * Icon rotate\n\t */\n\t@Prop() iconRotate?: RotateOptions;\n\n\t/**\n\t * Wether the button should inherit text styles\n\t */\n\t@Prop() inheritText?: boolean = false;\n\n\t/**\n\t * Position of the button in the button group, mostly un-used if not in a group\n\t */\n\t@Prop() buttonGroupPosition?: 'start' | 'center' | 'end' | 'none' = 'none';\n\n\t/**\n\t * The class of the container passed by parent\n\t */\n\t@Prop() class?: string;\n\n\t/**\n\t * Button click event\n\t */\n\t@StencilEvent({\n\t\tbubbles: false,\n\t})\n\tonClick: EventEmitter<MouseEvent>;\n\n\t@Element() private _host: HTMLElement;\n\n\trender() {\n\t\tlet loaderColor: 'white' | 'off-white' | 'indigo' | 'storm' = 'white';\n\t\tswitch (this.variant) {\n\t\t\tcase 'secondary':\n\t\t\tcase 'dropdown':\n\t\t\tcase 'transparent':\n\t\t\t\tloaderColor = 'off-white';\n\t\t\t\tbreak;\n\t\t\tcase 'text':\n\t\t\t\tloaderColor = 'storm';\n\t\t\t\tbreak;\n\t\t}\n\n\t\tconst VariableTag =\n\t\t\tthis.variant === 'text' || this.href?.length || this.as === 'a'\n\t\t\t\t? 'a'\n\t\t\t\t: 'button';\n\n\t\tconst hostClass = cn('p-button inline-block', this.class);\n\t\tconst active = asBoolean(this.active) || hostClass?.includes('active');\n\n\t\treturn (\n\t\t\t<ThemedHost class={hostClass}>\n\t\t\t\t<VariableTag\n\t\t\t\t\tdisabled={asBoolean(this.disabled)}\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttype={this.variant !== 'text' ? this.type : undefined}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\ttabIndex={this.tabIndex}\n\t\t\t\t\tclass={button({\n\t\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\t\tsize: this.size,\n\t\t\t\t\t\tloading: asBoolean(this.loading),\n\t\t\t\t\t\tdisabled: asBoolean(this.disabled),\n\t\t\t\t\t\tbuttonGroupPosition: this.buttonGroupPosition,\n\t\t\t\t\t\ticonOnly: asBoolean(this.iconOnly),\n\t\t\t\t\t\tactive,\n\t\t\t\t\t\terror: asBoolean(this.error),\n\t\t\t\t\t\tunderline: asBoolean(this.underline) && VariableTag === 'a',\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{this.chevron && this.chevronPosition === 'start' && (\n\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\tvariant='caret'\n\t\t\t\t\t\t\trotate={this.chevron === 'up' ? 180 : 0}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{this.icon &&\n\t\t\t\t\t\tthis.iconPosition === 'start' &&\n\t\t\t\t\t\t!(this.iconOnly && this.loading) &&\n\t\t\t\t\t\tthis._getIcon()}\n\n\t\t\t\t\t{this.label ? this.label : <slot />}\n\n\t\t\t\t\t{this.icon &&\n\t\t\t\t\t\tthis.iconPosition === 'end' &&\n\t\t\t\t\t\t!this.loading &&\n\t\t\t\t\t\t!this.chevron &&\n\t\t\t\t\t\tthis._getIcon()}\n\n\t\t\t\t\t{this.chevron && !this.loading && this.chevronPosition === 'end' && (\n\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\tvariant='caret'\n\t\t\t\t\t\t\trotate={this.chevron === 'up' ? 180 : 0}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{this.loading && <p-loader color={loaderColor} />}\n\t\t\t\t</VariableTag>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\t@Listen('click', { capture: true })\n\thandleClick(ev: MouseEvent) {\n\t\tif (this.loading || this.disabled) {\n\t\t\tev.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.type === 'submit') {\n\t\t\tthis._host.closest('form').requestSubmit();\n\t\t}\n\n\t\tthis.onClick.emit(ev);\n\t}\n\n\tprivate _getIcon() {\n\t\tif (!this.icon) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn (\n\t\t\t<p-icon\n\t\t\t\tclass={cn(\n\t\t\t\t\ticon({\n\t\t\t\t\t\tsize: this.size,\n\t\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\t\tdisabled: asBoolean(this.disabled),\n\t\t\t\t\t\tactive: asBoolean(this.active),\n\t\t\t\t\t\terror: asBoolean(this.error),\n\t\t\t\t\t\ticonOnly: asBoolean(this.iconOnly),\n\t\t\t\t\t}),\n\t\t\t\t\tthis.iconClass ?? ''\n\t\t\t\t)}\n\t\t\t\tvariant={this.icon}\n\t\t\t\tflip={this.iconFlip}\n\t\t\t\trotate={this.iconRotate}\n\t\t\t/>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -3,36 +3,36 @@ import { isTableColumnSizesKey, } from "../types";
|
|
|
3
3
|
export const getTableCellColumnClasses = (definition, variant, checkboxOffset = false) => {
|
|
4
4
|
const sizes = definition ? getTableCellSizes(definition, variant) : {};
|
|
5
5
|
return {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
variant !==
|
|
15
|
-
definition?.variant !==
|
|
16
|
-
definition?.variant !==
|
|
17
|
-
|
|
18
|
-
variant !==
|
|
19
|
-
(definition?.variant ===
|
|
20
|
-
definition?.variant ===
|
|
6
|
+
"flex flex-shrink items-center gap-4 pr-4 last-of-type:pr-0": true,
|
|
7
|
+
"pl-8": checkboxOffset,
|
|
8
|
+
"justify-start": !definition?.align || definition?.align === "start",
|
|
9
|
+
"justify-center": definition?.align === "center",
|
|
10
|
+
"justify-end": definition?.align === "end",
|
|
11
|
+
"font-semibold": variant !== "header" && definition?.variant === "subject",
|
|
12
|
+
"text-storm-400 dark:text-hurricane-200": variant === "header" || variant === "header-secondary",
|
|
13
|
+
"text-storm-300 dark:text-hurricane-200": variant !== "header" &&
|
|
14
|
+
variant !== "header-secondary" &&
|
|
15
|
+
definition?.variant !== "subject" &&
|
|
16
|
+
definition?.variant !== "highlight",
|
|
17
|
+
"text-storm-500 dark:text-white": variant !== "header" &&
|
|
18
|
+
variant !== "header-secondary" &&
|
|
19
|
+
(definition?.variant === "subject" ||
|
|
20
|
+
definition?.variant === "highlight"),
|
|
21
21
|
...sizes,
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
export const getTableCellSizes = ({ sizes, } /* Table Definition */, variant) => {
|
|
25
|
-
if (sizes ===
|
|
25
|
+
if (sizes === "auto" || !sizes) {
|
|
26
26
|
return {
|
|
27
|
-
|
|
27
|
+
"w-auto": true,
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
if (sizes ===
|
|
30
|
+
if (sizes === "hidden") {
|
|
31
31
|
return {
|
|
32
32
|
hidden: true,
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
if (typeof sizes ===
|
|
35
|
+
if (typeof sizes === "object") {
|
|
36
36
|
sizes = sizes;
|
|
37
37
|
const classes = {};
|
|
38
38
|
let previousSize;
|
|
@@ -40,30 +40,34 @@ export const getTableCellSizes = ({ sizes, } /* Table Definition */, variant) =>
|
|
|
40
40
|
if (!isTableColumnSizesKey(sizes, size)) {
|
|
41
41
|
continue;
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
const currentValue = sizes[size];
|
|
44
|
+
if (size === "default") {
|
|
45
|
+
if (sizes.default === "hidden") {
|
|
46
|
+
classes["hidden"] = true;
|
|
46
47
|
previousSize = size;
|
|
47
48
|
continue;
|
|
48
49
|
}
|
|
49
|
-
classes[`w-${sizes.default}/12`] = true;
|
|
50
50
|
previousSize = size;
|
|
51
|
+
if (currentValue === 12 || currentValue === "full") {
|
|
52
|
+
classes[`w-full`] = true;
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
classes[`w-${sizes.default}/12`] = true;
|
|
51
56
|
continue;
|
|
52
57
|
}
|
|
53
|
-
const currentValue = sizes[size];
|
|
54
58
|
const previousValue = previousSize ? sizes[previousSize] : null;
|
|
55
|
-
if (currentValue !==
|
|
59
|
+
if (currentValue !== "hidden" &&
|
|
56
60
|
previousValue &&
|
|
57
|
-
previousValue ===
|
|
58
|
-
variant !==
|
|
61
|
+
previousValue === "hidden" &&
|
|
62
|
+
variant !== "actions") {
|
|
59
63
|
classes[`${size}:flex`] = true;
|
|
60
64
|
}
|
|
61
|
-
if (currentValue ===
|
|
65
|
+
if (currentValue === "hidden" && variant !== "actions") {
|
|
62
66
|
classes[`${size}:hidden`] = true;
|
|
63
67
|
previousSize = size;
|
|
64
68
|
continue;
|
|
65
69
|
}
|
|
66
|
-
if (currentValue === 12 || currentValue ===
|
|
70
|
+
if (currentValue === 12 || currentValue === "full") {
|
|
67
71
|
classes[`${size}:w-full`] = true;
|
|
68
72
|
}
|
|
69
73
|
classes[`${size}:w-${currentValue}/12`] = true;
|
|
@@ -71,9 +75,9 @@ export const getTableCellSizes = ({ sizes, } /* Table Definition */, variant) =>
|
|
|
71
75
|
}
|
|
72
76
|
return classes;
|
|
73
77
|
}
|
|
74
|
-
if (sizes === 12 || sizes ===
|
|
78
|
+
if (sizes === 12 || sizes === "full") {
|
|
75
79
|
return {
|
|
76
|
-
|
|
80
|
+
"w-full": true,
|
|
77
81
|
};
|
|
78
82
|
}
|
|
79
83
|
// is a number.
|
|
@@ -81,19 +85,19 @@ export const getTableCellSizes = ({ sizes, } /* Table Definition */, variant) =>
|
|
|
81
85
|
[`w-${sizes}/12`]: true,
|
|
82
86
|
};
|
|
83
87
|
};
|
|
84
|
-
export const floatingMenuContainerClass = cva([
|
|
88
|
+
export const floatingMenuContainerClass = cva(["sticky self-center"], {
|
|
85
89
|
variants: {
|
|
86
90
|
hasFooter: {
|
|
87
|
-
true:
|
|
88
|
-
false:
|
|
91
|
+
true: "mt-4 -mb-5 bottom-11 z-[3]",
|
|
92
|
+
false: "my-4 bottom-0",
|
|
89
93
|
},
|
|
90
94
|
active: {
|
|
91
|
-
false:
|
|
92
|
-
true:
|
|
95
|
+
false: "pointer-events-none animate-floating-menu-container-out",
|
|
96
|
+
true: "animate-floating-menu-container-in",
|
|
93
97
|
},
|
|
94
98
|
shown: {
|
|
95
|
-
false:
|
|
96
|
-
true:
|
|
99
|
+
false: "hidden",
|
|
100
|
+
true: "inline-block",
|
|
97
101
|
},
|
|
98
102
|
},
|
|
99
103
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-helpers.js","sourceRoot":"","sources":["../../src/ut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KAAK,KAAK,MAAM,EAAE,CAAC;QACtC,OAAO;YACN,QAAQ,EAAE,IAAI;SACd,CAAC;IACH,CAAC;IAED,eAAe;IACf,OAAO;QACN,CAAC,KAAK,KAAK,KAAK,CAAC,EAAE,IAAI;KACvB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAAC,CAAC,oBAAoB,CAAC,EAAE;IACrE,QAAQ,EAAE;QACT,SAAS,EAAE;YACV,IAAI,EAAE,4BAA4B;YAClC,KAAK,EAAE,eAAe;SACtB;QACD,MAAM,EAAE;YACP,KAAK,EAAE,yDAAyD;YAChE,IAAI,EAAE,oCAAoC;SAC1C;QACD,KAAK,EAAE;YACN,KAAK,EAAE,QAAQ;YACf,IAAI,EAAE,cAAc;SACpB;KACD;CACD,CAAC,CAAC","sourcesContent":["import { cva } from \"class-variance-authority\";\nimport { TableColumn } from \"../components/helpers/table/column/table-column.component\";\nimport {\n\tisTableColumnSizesKey,\n\tTableColumnSizes,\n\tTableColumnSizesKey,\n} from \"../types\";\n\nexport const getTableCellColumnClasses = (\n\tdefinition: any | TableColumn,\n\tvariant: \"default\" | \"header\" | \"loading\" | \"header-secondary\",\n\tcheckboxOffset = false,\n) => {\n\tconst sizes = definition ? getTableCellSizes(definition, variant) : {};\n\n\treturn {\n\t\t\"flex flex-shrink items-center gap-4 pr-4 last-of-type:pr-0\": true,\n\t\t\"pl-8\": checkboxOffset,\n\t\t\"justify-start\": !definition?.align || definition?.align === \"start\",\n\t\t\"justify-center\": definition?.align === \"center\",\n\t\t\"justify-end\": definition?.align === \"end\",\n\t\t\"font-semibold\": variant !== \"header\" && definition?.variant === \"subject\",\n\t\t\"text-storm-400 dark:text-hurricane-200\":\n\t\t\tvariant === \"header\" || variant === \"header-secondary\",\n\t\t\"text-storm-300 dark:text-hurricane-200\":\n\t\t\tvariant !== \"header\" &&\n\t\t\tvariant !== \"header-secondary\" &&\n\t\t\tdefinition?.variant !== \"subject\" &&\n\t\t\tdefinition?.variant !== \"highlight\",\n\t\t\"text-storm-500 dark:text-white\":\n\t\t\tvariant !== \"header\" &&\n\t\t\tvariant !== \"header-secondary\" &&\n\t\t\t(definition?.variant === \"subject\" ||\n\t\t\t\tdefinition?.variant === \"highlight\"),\n\t\t...sizes,\n\t};\n};\n\nexport const getTableCellSizes = (\n\t{\n\t\tsizes,\n\t}: {\n\t\tsizes: \"auto\" | \"hidden\" | \"full\" | number | TableColumnSizes;\n\t} /* Table Definition */,\n\tvariant: \"default\" | \"header\" | \"loading\" | \"actions\" | \"header-secondary\",\n) => {\n\tif (sizes === \"auto\" || !sizes) {\n\t\treturn {\n\t\t\t\"w-auto\": true,\n\t\t};\n\t}\n\n\tif (sizes === \"hidden\") {\n\t\treturn {\n\t\t\thidden: true,\n\t\t};\n\t}\n\n\tif (typeof sizes === \"object\") {\n\t\tsizes = sizes as TableColumnSizes;\n\t\tconst classes: any = {};\n\t\tlet previousSize: TableColumnSizesKey | undefined;\n\n\t\tfor (let size in sizes) {\n\t\t\tif (!isTableColumnSizesKey(sizes, size)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst currentValue = sizes[size];\n\n\t\t\tif (size === \"default\") {\n\t\t\t\tif (sizes.default === \"hidden\") {\n\t\t\t\t\tclasses[\"hidden\"] = true;\n\t\t\t\t\tpreviousSize = size;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tpreviousSize = size;\n\n\t\t\t\tif (currentValue === 12 || currentValue === \"full\") {\n\t\t\t\t\tclasses[`w-full`] = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tclasses[`w-${sizes.default}/12`] = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst previousValue = previousSize ? sizes[previousSize] : null;\n\t\t\tif (\n\t\t\t\tcurrentValue !== \"hidden\" &&\n\t\t\t\tpreviousValue &&\n\t\t\t\tpreviousValue === \"hidden\" &&\n\t\t\t\tvariant !== \"actions\"\n\t\t\t) {\n\t\t\t\tclasses[`${size}:flex`] = true;\n\t\t\t}\n\n\t\t\tif (currentValue === \"hidden\" && variant !== \"actions\") {\n\t\t\t\tclasses[`${size}:hidden`] = true;\n\t\t\t\tpreviousSize = size;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (currentValue === 12 || currentValue === \"full\") {\n\t\t\t\tclasses[`${size}:w-full`] = true;\n\t\t\t}\n\n\t\t\tclasses[`${size}:w-${currentValue}/12`] = true;\n\t\t\tpreviousSize = size;\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tif (sizes === 12 || sizes === \"full\") {\n\t\treturn {\n\t\t\t\"w-full\": true,\n\t\t};\n\t}\n\n\t// is a number.\n\treturn {\n\t\t[`w-${sizes}/12`]: true,\n\t};\n};\n\nexport const floatingMenuContainerClass = cva([\"sticky self-center\"], {\n\tvariants: {\n\t\thasFooter: {\n\t\t\ttrue: \"mt-4 -mb-5 bottom-11 z-[3]\",\n\t\t\tfalse: \"my-4 bottom-0\",\n\t\t},\n\t\tactive: {\n\t\t\tfalse: \"pointer-events-none animate-floating-menu-container-out\",\n\t\t\ttrue: \"animate-floating-menu-container-in\",\n\t\t},\n\t\tshown: {\n\t\t\tfalse: \"hidden\",\n\t\t\ttrue: \"inline-block\",\n\t\t},\n\t},\n});\n"]}
|
package/dist/components/index.js
CHANGED
|
@@ -2,7 +2,7 @@ export { g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOp
|
|
|
2
2
|
export { i as initTheme, o as onStateChange, b as state, a as stateLocaleOptions, s as stateThemeOptions } from './p-DnVMEz1h.js';
|
|
3
3
|
import { s as screens } from './p-B3sNjfzc.js';
|
|
4
4
|
export { g as getScreenSize, b as getScreenSizeInPixels, a as getScreenSizeInRem, d as isBetweenScreens, i as isBiggerThanScreen, j as isDesktop, f as isMobile, c as isSmallerThanScreen, h as isTablet, e as isTouchDevice } from './p-B3sNjfzc.js';
|
|
5
|
-
export { f as floatingMenuContainerClass, g as getTableCellColumnClasses, a as getTableCellSizes, i as isTableColumnSizesKey, o as objectGetByPath } from './p-
|
|
5
|
+
export { f as floatingMenuContainerClass, g as getTableCellColumnClasses, a as getTableCellSizes, i as isTableColumnSizesKey, o as objectGetByPath } from './p-BWB7MxpW.js';
|
|
6
6
|
export { t as tableColumSizesOptions } from './p-DdQ-S2l7.js';
|
|
7
7
|
export { I as IBAN_ICON_VARIANTS_ARRAY } from './p-By0EdXx2.js';
|
|
8
8
|
export { c as childOf, a as childOfComposed } from './p-BFSNj6hu.js';
|