@paperless/core 1.42.4 → 1.43.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/CHANGELOG.md +25 -0
- package/dist/build/index.esm.js +1 -1
- package/dist/build/index.esm.js.map +1 -1
- package/dist/build/p-15f63841.js +2 -0
- package/dist/build/p-15f63841.js.map +1 -0
- package/dist/build/p-205dece4.entry.js +2 -0
- package/dist/build/p-205dece4.entry.js.map +1 -0
- package/dist/build/p-5aaf5bc2.entry.js +2 -0
- package/dist/build/p-5aaf5bc2.entry.js.map +1 -0
- package/dist/build/{p-1079ffc6.entry.js → p-e7826192.entry.js} +2 -2
- package/dist/build/p-e7826192.entry.js.map +1 -0
- package/dist/build/paperless.esm.js +1 -1
- package/dist/build/paperless.esm.js.map +1 -1
- package/dist/cjs/index-1fde8b14.js +4 -0
- package/dist/cjs/index.cjs.js +12 -52
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/p-floating-menu-container_8.cjs.entry.js +21 -8
- package/dist/cjs/p-floating-menu-container_8.cjs.entry.js.map +1 -1
- package/dist/cjs/p-table-row-action.cjs.entry.js +26 -0
- package/dist/cjs/p-table-row-action.cjs.entry.js.map +1 -0
- package/dist/cjs/p-table.cjs.entry.js +100 -38
- package/dist/cjs/p-table.cjs.entry.js.map +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/cjs/screens-84f01214.js +56 -0
- package/dist/cjs/screens-84f01214.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/atoms/floating-menu-item/floating-menu-item.component.css +1 -1
- package/dist/collection/components/atoms/floating-menu-item/floating-menu-item.component.js +19 -0
- package/dist/collection/components/atoms/floating-menu-item/floating-menu-item.component.js.map +1 -1
- package/dist/collection/components/helpers/table-row-action/table-row-action.component.js +182 -0
- package/dist/collection/components/helpers/table-row-action/table-row-action.component.js.map +1 -0
- package/dist/collection/components/molecules/table-cell/table-cell.component.css +1 -1
- package/dist/collection/components/molecules/table-cell/table-cell.component.js +37 -7
- package/dist/collection/components/molecules/table-cell/table-cell.component.js.map +1 -1
- package/dist/collection/components/molecules/table-row/table-row.component.js +1 -1
- package/dist/collection/components/molecules/table-row/table-row.component.js.map +1 -1
- package/dist/collection/components/organisms/table/table.component.css +1 -1
- package/dist/collection/components/organisms/table/table.component.js +115 -38
- package/dist/collection/components/organisms/table/table.component.js.map +1 -1
- package/dist/components/floating-menu-item.component.js +4 -2
- package/dist/components/floating-menu-item.component.js.map +1 -1
- package/dist/components/index.js +3 -42
- package/dist/components/index.js.map +1 -1
- package/dist/components/p-table-row-action.d.ts +11 -0
- package/dist/components/p-table-row-action.js +48 -0
- package/dist/components/p-table-row-action.js.map +1 -0
- package/dist/components/p-table.js +110 -41
- package/dist/components/p-table.js.map +1 -1
- package/dist/components/screens.js +44 -0
- package/dist/components/screens.js.map +1 -0
- package/dist/components/table-cell.component.js +19 -6
- package/dist/components/table-cell.component.js.map +1 -1
- package/dist/components/table-row.component.js +1 -1
- package/dist/components/table-row.component.js.map +1 -1
- package/dist/esm/index-7b917f6b.js +4 -0
- package/dist/esm/index.js +3 -42
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-floating-menu-container_8.entry.js +21 -8
- package/dist/esm/p-floating-menu-container_8.entry.js.map +1 -1
- package/dist/esm/p-table-row-action.entry.js +22 -0
- package/dist/esm/p-table-row-action.entry.js.map +1 -0
- package/dist/esm/p-table.entry.js +100 -38
- package/dist/esm/p-table.entry.js.map +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/esm/screens-64bd8af0.js +44 -0
- package/dist/esm/screens-64bd8af0.js.map +1 -0
- package/dist/index.html +1 -1
- package/dist/paperless/index.esm.js +1 -1
- package/dist/paperless/index.esm.js.map +1 -1
- package/dist/paperless/p-15f63841.js +2 -0
- package/dist/paperless/p-15f63841.js.map +1 -0
- package/dist/paperless/p-205dece4.entry.js +2 -0
- package/dist/paperless/p-205dece4.entry.js.map +1 -0
- package/dist/paperless/p-5aaf5bc2.entry.js +2 -0
- package/dist/paperless/p-5aaf5bc2.entry.js.map +1 -0
- package/dist/paperless/{p-1079ffc6.entry.js → p-e7826192.entry.js} +2 -2
- package/dist/paperless/p-e7826192.entry.js.map +1 -0
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/paperless/paperless.esm.js.map +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/atoms/floating-menu-item/floating-menu-item.component.d.ts +4 -0
- package/dist/types/components/helpers/table-row-action/table-row-action.component.d.ts +43 -0
- package/dist/types/components/molecules/table-cell/table-cell.component.d.ts +6 -1
- package/dist/types/components/organisms/table/table.component.d.ts +6 -1
- package/dist/types/components.d.ts +99 -4
- package/hydrate/index.js +197 -50
- package/package.json +1 -1
- package/dist/build/p-1079ffc6.entry.js.map +0 -1
- package/dist/build/p-a9ebacc8.entry.js +0 -2
- package/dist/build/p-a9ebacc8.entry.js.map +0 -1
- package/dist/paperless/p-1079ffc6.entry.js.map +0 -1
- package/dist/paperless/p-a9ebacc8.entry.js +0 -2
- package/dist/paperless/p-a9ebacc8.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"floating-menu-item.component.js","mappings":";;AAAA,MAAM,4BAA4B,GAAG
|
|
1
|
+
{"file":"floating-menu-item.component.js","mappings":";;AAAA,MAAM,4BAA4B,GAAG,+wBAA+wB;;MCOvyB,gBAAgB;;;;;iBAIc,IAAI;oBAKD,KAAK;;EAElD,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAC,sBAAsB,IACjC,eAAQ,CACF,EACN;GACF;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/atoms/floating-menu-item/floating-menu-item.component.scss?tag=p-floating-menu-item&encapsulation=shadow","src/components/atoms/floating-menu-item/floating-menu-item.component.tsx"],"sourcesContent":[":host {\n\t@apply flex h-6 items-center gap-2 whitespace-nowrap text-sm text-storm-vague;\n}\n\n:host([hover]) {\n\t@apply cursor-pointer font-semibold;\n}\n\n:host([disabled]),\n:host([disabled='true']) {\n\t@apply opacity-40 pointer-events-none;\n}\n\n:host([hover]:hover:not([disabled])) {\n\t@apply text-white;\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n\ttag: 'p-floating-menu-item',\n\tstyleUrl: 'floating-menu-item.component.scss',\n\tshadow: true,\n})\nexport class FloatingMenuItem {\n\t/**\n\t * Wether it should have a hover effect\n\t */\n\t@Prop({ reflect: true }) hover: boolean = true;\n\n\t/**\n\t * Wether the item is disabled\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-floating-menu-item\">\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}
|
package/dist/components/index.js
CHANGED
|
@@ -2,53 +2,14 @@ export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stenc
|
|
|
2
2
|
export { i as isTableColumnSizesKey, o as objectGetByPath } from './object-get-by-path.js';
|
|
3
3
|
export { c as childOf } from './child-of.js';
|
|
4
4
|
export { f as formatTranslation, g as getLocaleComponentStrings } from './localization.js';
|
|
5
|
+
import { s as screens } from './screens.js';
|
|
6
|
+
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 './screens.js';
|
|
5
7
|
|
|
6
8
|
const camelToSnakeCase = (str) => str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);
|
|
7
9
|
const snakeToCamelCase = (str) => str
|
|
8
10
|
.toLowerCase()
|
|
9
11
|
.replace(/([-_][a-z])/g, (group) => group.toUpperCase().replace('-', '').replace('_', ''));
|
|
10
12
|
|
|
11
|
-
const screens = {
|
|
12
|
-
tablet: '40rem',
|
|
13
|
-
'desktop-xs': '64rem',
|
|
14
|
-
'desktop-sm': '80rem',
|
|
15
|
-
desktop: '85.375rem',
|
|
16
|
-
'desktop-lg': '90rem',
|
|
17
|
-
'desktop-xl': '120rem',
|
|
18
|
-
// layout sizes
|
|
19
|
-
'layout-1280': '80rem',
|
|
20
|
-
'layout-1440': '90rem',
|
|
21
|
-
'layout-1536': '96rem',
|
|
22
|
-
'layout-1680': '105rem',
|
|
23
|
-
'layout-1920': '120rem',
|
|
24
|
-
'layout-2560': '160rem',
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const getScreenSize = (size) => screens[size];
|
|
28
|
-
const getScreenSizeInRem = (size) => {
|
|
29
|
-
const screen = getScreenSize(size);
|
|
30
|
-
return parseInt(screen.replace('rem', ''), 10);
|
|
31
|
-
};
|
|
32
|
-
const getScreenSizeInPixels = (size) => {
|
|
33
|
-
const rem = getScreenSizeInRem(size);
|
|
34
|
-
return rem * 16;
|
|
35
|
-
};
|
|
36
|
-
const isBiggerThanScreen = (size) => {
|
|
37
|
-
const pixels = getScreenSizeInPixels(size);
|
|
38
|
-
return window.innerWidth > pixels;
|
|
39
|
-
};
|
|
40
|
-
const isSmallerThanScreen = (size) => {
|
|
41
|
-
const pixels = getScreenSizeInPixels(size);
|
|
42
|
-
return window.innerWidth < pixels;
|
|
43
|
-
};
|
|
44
|
-
const isBetweenScreens = (smallSize, bigSize) => {
|
|
45
|
-
return isBiggerThanScreen(smallSize) && isSmallerThanScreen(bigSize);
|
|
46
|
-
};
|
|
47
|
-
const isTouchDevice = () => !!window.matchMedia('(pointer: coarse)').matches;
|
|
48
|
-
const isMobile = () => isTouchDevice() || isSmallerThanScreen('tablet');
|
|
49
|
-
const isTablet = () => isBetweenScreens('tablet', 'desktop-xs');
|
|
50
|
-
const isDesktop = () => isBiggerThanScreen('desktop-xs');
|
|
51
|
-
|
|
52
13
|
function getDefaultExportFromCjs (x) {
|
|
53
14
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
54
15
|
}
|
|
@@ -507,6 +468,6 @@ const paperless = plugin$1((pluginAPI) => {
|
|
|
507
468
|
],
|
|
508
469
|
});
|
|
509
470
|
|
|
510
|
-
export { camelToSnakeCase,
|
|
471
|
+
export { camelToSnakeCase, paperless, snakeToCamelCase };
|
|
511
472
|
|
|
512
473
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"index.js","mappings":";;;;;MAAa,gBAAgB,GAAG,CAAC,GAAG,KAChC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,KAAK,IAAI,MAAM,CAAC,WAAW,EAAE,EAAE,EAAE;MAErD,gBAAgB,GAAG,CAAC,GAAG,KAChC,GAAG;GACE,WAAW,EAAE;GACb,OAAO,CAAC,cAAc,EAAE,CAAC,KAAK,KAC3B,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;;ACPjE,gBAAe;EACd,MAAM,EAAE,OAAO;EACf,YAAY,EAAE,OAAO;EACrB,YAAY,EAAE,OAAO;EACrB,OAAO,EAAE,WAAW;EACpB,YAAY,EAAE,OAAO;EACrB,YAAY,EAAE,QAAQ;;EAGtB,aAAa,EAAE,OAAO;EACtB,aAAa,EAAE,OAAO;EACtB,aAAa,EAAE,OAAO;EACtB,aAAa,EAAE,QAAQ;EACvB,aAAa,EAAE,QAAQ;EACvB,aAAa,EAAE,QAAQ;CACvB;;MCXY,aAAa,GAAG,CAAC,IAAgB,KAAK,OAAO,CAAC,IAAI,EAAE;MAEpD,kBAAkB,GAAG,CAAC,IAAgB;EAClD,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;EACnC,OAAO,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AAChD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B,EACnB,kDAAkD,CAClD,CAAC;EACF,UAAU,CACT,kBAAkB,EAClB,iDAAiD,CACjD,CAAC;;EAEF,UAAU,CAAC,cAAc,EAAE;IAC1B,mCAAmC;IACnC,sBAAsB;GACtB,CAAC,CAAC;EACH,UAAU,CAAC,oBAAoB,EAAE;IAChC,kDAAkD;IAClD,sBAAsB;GACtB,CAAC,CAAC;EACH,UAAU,CAAC,mBAAmB,EAAE;IAC/B,iDAAiD;IACjD,sBAAsB;GACtB,CAAC,CAAC;AACJ,CAAC;;MCRY,SAAS,GAAGC,QAAM,CAC9B,CAAC,SAAS;EACT,QAAQ,CAAC,SAAS,CAAC,CAAC;EACpB,KAAK,CAAC,SAAS,CAAC,CAAC;AAClB,CAAC,EACD;EACC,KAAK,EAAE;IACN,MAAM;;IAEN,SAAS,EAAE,OAAO;IAClB,UAAU,EAAE,OAAO;IACnB,YAAY;;IAEZ,MAAM,kCACF,SAAS,KACZ,KAAK;cACLC,aAAM,EACN,QAAQ,EAAE,WAAW,CAAC,QAAQ,EAC9B,UAAU,EAAE,WAAW,CAAC,UAAU,EAClC,YAAY;MACZ,MAAM;MACN,OAAO,EACP,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,OAAO,GACP;GACD;EACD,OAAO,EAAE;IACR,OAAO,CAAC,2BAA2B,CAAC;IACpC,OAAO,CAAC,yBAAyB,CAAC;IAClC,QAAQ;IACR,KAAK;GACL;CACD;;;;","names":["require$$0","plugin","rotate"],"sources":["src/utils/transformers.ts","src/tailwind/theme/screens.ts","src/utils/screens.ts","../../node_modules/tailwindcss/lib/util/createPlugin.js","../../node_modules/tailwindcss/lib/public/create-plugin.js","../../node_modules/tailwindcss/plugin.js","src/tailwind/theme/colors.ts","src/tailwind/theme/shadows.ts","src/tailwind/theme/border-radius.ts","src/tailwind/theme/scale.ts","src/tailwind/theme/rotate.ts","src/tailwind/theme/typography.ts","src/tailwind/theme/backdrop-blur.ts","src/tailwind/theme/z-index.ts","src/tailwind/theme/animation.ts","src/tailwind/theme/width.ts","src/tailwind/theme/height.ts","src/tailwind/theme/spacing.ts","src/tailwind/plugins/safe-area.ts","src/tailwind/plugins/hover.ts","src/tailwind/paperless.ts"],"sourcesContent":["export const camelToSnakeCase = (str) =>\n str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);\n\nexport const snakeToCamelCase = (str) =>\n str\n .toLowerCase()\n .replace(/([-_][a-z])/g, (group) =>\n group.toUpperCase().replace('-', '').replace('_', '')\n );\n","export default {\n\ttablet: '40rem', // 640 px\n\t'desktop-xs': '64rem', // 1024 px\n\t'desktop-sm': '80rem', // 1360 px\n\tdesktop: '85.375rem', // 1366\n\t'desktop-lg': '90rem', // 1440\n\t'desktop-xl': '120rem', // 1920\n\n\t// layout sizes\n\t'layout-1280': '80rem',\n\t'layout-1440': '90rem',\n\t'layout-1536': '96rem',\n\t'layout-1680': '105rem',\n\t'layout-1920': '120rem',\n\t'layout-2560': '160rem',\n};\n","import screens from '../tailwind/theme/screens';\n\nexport type ScreenSize = keyof typeof screens;\n\nexport const getScreenSize = (size: ScreenSize) => screens[size];\n\nexport const getScreenSizeInRem = (size: ScreenSize) => {\n\tconst screen = getScreenSize(size);\n\treturn parseInt(screen.replace('rem', ''), 10);\n};\n\nexport const getScreenSizeInPixels = (size: ScreenSize) => {\n\tconst rem = getScreenSizeInRem(size);\n\treturn rem * 16;\n};\n\nexport const isBiggerThanScreen = (size: ScreenSize) => {\n\tconst pixels = getScreenSizeInPixels(size);\n\treturn window.innerWidth > pixels;\n};\n\nexport const isSmallerThanScreen = (size: ScreenSize) => {\n\tconst pixels = getScreenSizeInPixels(size);\n\treturn window.innerWidth < pixels;\n};\n\nexport const isBetweenScreens = (\n\tsmallSize: ScreenSize,\n\tbigSize: ScreenSize\n) => {\n\treturn isBiggerThanScreen(smallSize) && isSmallerThanScreen(bigSize);\n};\n\nexport const isTouchDevice = () =>\n\t!!window.matchMedia('(pointer: coarse)').matches;\nexport const isMobile = () => isTouchDevice() || isSmallerThanScreen('tablet');\nexport const isTablet = () => isBetweenScreens('tablet', 'desktop-xs');\nexport const isDesktop = () => isBiggerThanScreen('desktop-xs');\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nfunction createPlugin(plugin, config) {\n return {\n handler: plugin,\n config\n };\n}\ncreatePlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {\n const optionsFunction = function(options) {\n return {\n __options: options,\n handler: pluginFunction(options),\n config: configFunction(options)\n };\n };\n optionsFunction.__isOptionsFunction = true;\n // Expose plugin dependencies so that `object-hash` returns a different\n // value if anything here changes, to ensure a rebuild is triggered.\n optionsFunction.__pluginFunction = pluginFunction;\n optionsFunction.__configFunction = configFunction;\n return optionsFunction;\n};\nconst _default = createPlugin;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nconst _createPlugin = /*#__PURE__*/ _interop_require_default(require(\"../util/createPlugin\"));\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nconst _default = _createPlugin.default;\n","let createPlugin = require('./lib/public/create-plugin')\nmodule.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default\n","export default {\n\ttransparent: 'transparent',\n\tcurrent: 'currentColor',\n\tindigo: {\n\t\tdark: '#2C4BA9',\n\t\tDEFAULT: '#528AFA',\n\t\tlight: '#F1F6FF',\n\t},\n\tsky: {\n\t\tdark: '#30C2C9',\n\t\tDEFAULT: '#1EDAE3',\n\t\tlight: '#F5FEFF',\n\t\tvague: '#BBF4F6',\n\t},\n\tmystic: {\n\t\tblank: '#FFF',\n\t\tdark: '#DAE6F0',\n\t\tDEFAULT: '#F7FAFC',\n\t\tlight: '#FCFDFE',\n\t\tmedium: '#E3ECF3',\n\t},\n\tredberry: {\n\t\tdark: '#BD0F1E',\n\t\tDEFAULT: '#E63241',\n\t\tlight: '#FFE8EA',\n\t\tmedium: '#FF7D88',\n\t},\n\tstorm: {\n\t\tdark: '#272838',\n\t\tDEFAULT: '#51536B',\n\t\tlight: '#B0B2CB',\n\t\tmedium: '#80829E',\n\t\tvague: '#989AB7',\n\t},\n\tnegative: {\n\t\tdark: '#8A0F1D',\n\t\tDEFAULT: '#B91E28',\n\t\tlight: '#FFCCD3',\n\t},\n\tpositive: {\n\t\tdark: '#1DA360',\n\t\tDEFAULT: '#28D17C',\n\t\tlight: '#E5FFF2',\n\t},\n\tunbiased: {\n\t\tdark: '#FFA231',\n\t\tDEFAULT: '#FFC72D',\n\t\tlight: '#FFF6DC',\n\t},\n\twhite: '#FFF',\n\tblack: '#000',\n};\n","export default {\n\t'1': '0px 0.0625rem 0.05rem rgba(0,0,0, 0.5)',\n\t'2': '0px 0.0625rem 0.1125rem rgba(0,0,0, 0.65)',\n\t'3': '0px 0.0625rem 0.125rem rgba(0,0,0, 0.65)',\n\t'4': [\n\t\t'0px 0.3125rem 1rem rgba(0,24,98, 0.08)',\n\t\t'0px 0.0625rem 0.1875rem rgba(0,24,98, 0.13)',\n\t],\n\t'5': '0px 0.1875rem 1rem rgba(0,24,98, 0.3)',\n\ttransparent: 'transparent',\n\t'button-primary-hover': '0px 2px 4px rgba(44,75,169, 0.4)',\n\t'button-secondary-hover': '0px 2px 4px rgba(176,178,203, 0.4)',\n};\n","export default {\n\txxxlarge: '1.5625rem',\n\txxlarge: '0.75rem',\n\txlarge: '0.5625rem',\n\tlarge: '0.375rem',\n\tDEFAULT: '0.25rem',\n\tmedium: '0.25rem',\n\tsmall: '0.125rem',\n\tnone: '0',\n\tround: '100%',\n};\n","export default {\n\tflip: '-1',\n};\n","const rotateNumbers = {};\n\nfor (let i = 1; i < 360; i++) {\n\trotateNumbers[`${i}`] = `${i}deg`;\n\trotateNumbers[`-${i}`] = `-${i}deg`;\n}\n\nexport default rotateNumbers;\n","export default {\n\tfontSize: {\n\t\th1: '2.5rem',\n\t\th2: '2rem',\n\t\th3: '1.5rem',\n\t\th4: '1.25rem',\n\t\th5: '1.125rem',\n\t\tbody: '1rem',\n\t\t'body-2': '1.125rem',\n\t\txxs: '0.6875rem',\n\t},\n\tlineHeight: {\n\t\th1: '3rem',\n\t\th2: '2.5rem',\n\t\th3: '1.875rem',\n\t\th4: '1.625rem',\n\t\th5: '1.375rem',\n\t\tbody: '1.75rem',\n\t\t'body-2': '1.875rem',\n\t},\n};\n","export default {\n\txs: '2px',\n};\n","export default {\n\t'floating-menu': '190',\n\tdropdown: '200',\n\n\t'navbar-topbar': '280',\n\t'navbar-backdrop': '290',\n\tnavbar: '300',\n\n\tbackdrop: '490',\n\n\tdrawer: '500',\n\t'drawer-header': '501',\n\n\tmodal: '600',\n\n\ttooltip: '601',\n\n\ttoast: '700',\n};\n","export default {\n\tanimation: {\n\t\t'fade-in': 'forwards fadeIn .2s ease',\n\t\t'fade-out': 'forwards fadeOut .2s ease',\n\t\t'slide-in-right': 'forwards slideInRight .5s ease',\n\t\t'slide-in-left': 'forwards slideInLeft .5s ease',\n\t\t'slide-in-top': 'forwards slideInTop .25 ease',\n\t\t'slide-in-bottom': 'forwards slideInBottom .5s ease',\n\t\t'slide-in-right-small': 'forwards slideInRightSmall .5s ease',\n\t\t'slide-in-left-small': 'forwards slideInLeftSmall .5s ease',\n\t\t'slide-in-top-small': 'forwards slideInTopSmall .5s ease',\n\t\t'slide-in-bottom-small': 'forwards slideInBottomSmall .5s ease',\n\t\t'slide-out-right': 'forwards slideOutRight .2s ease',\n\t\t'slide-out-left': 'forwards slideOutLeft .2s ease',\n\t\t'slide-out-top': 'forwards slideOutTop .2s ease',\n\t\t'slide-out-bottom': 'forwards slideOutBottom .5s ease',\n\t\t'slide-out-top-small': 'forwards slideOutTopSmall .5s ease',\n\t\t'slide-out-bottom-small': 'forwards slideOutBottomSmall .5s ease',\n\t},\n\n\tkeyframes: {\n\t\tfadeIn: {\n\t\t\t'0%': { opacity: 0 },\n\t\t\t'100%': { opacity: 100 },\n\t\t},\n\t\tfadeOut: {\n\t\t\t'0%': { opacity: 100 },\n\t\t\t'100%': { opacity: 0 },\n\t\t},\n\t\tslideInRight: {\n\t\t\t'0%': { transform: 'translateX(100%)' },\n\t\t\t'100%': { transform: 'translateX(0)' },\n\t\t},\n\t\tslideInLeft: {\n\t\t\t'0%': { transform: 'translateX(-100%)' },\n\t\t\t'100%': { transform: 'translateX(0)' },\n\t\t},\n\t\tslideInTop: {\n\t\t\t'0%': { transform: 'translateY(-100%)' },\n\t\t\t'100%': { transform: 'translateY(0)' },\n\t\t},\n\t\tslideInBottom: {\n\t\t\t'0%': { transform: 'translateY(100%)' },\n\t\t\t'100%': { transform: 'translateY(0)' },\n\t\t},\n\t\tslideInRightSmall: {\n\t\t\t'0%': { transform: 'translateX(20%)' },\n\t\t\t'100%': { transform: 'translateX(0)' },\n\t\t},\n\t\tslideInLeftSmall: {\n\t\t\t'0%': { transform: 'translateX(-20%)' },\n\t\t\t'100%': { transform: 'translateX(0)' },\n\t\t},\n\t\tslideInTopSmall: {\n\t\t\t'0%': { transform: 'translateY(-20%)' },\n\t\t\t'100%': { transform: 'translateY(0)' },\n\t\t},\n\t\tslideInBottomSmall: {\n\t\t\t'0%': { transform: 'translateY(20%)' },\n\t\t\t'100%': { transform: 'translateY(0)' },\n\t\t},\n\t\tslideOutRight: {\n\t\t\t'0%': { transform: 'translateX(0)' },\n\t\t\t'100%': { transform: 'translateX(100%)' },\n\t\t},\n\t\tslideOutLeft: {\n\t\t\t'0%': { transform: 'translateX(0)' },\n\t\t\t'100%': { transform: 'translateX(-100%)' },\n\t\t},\n\t\tslideOutTop: {\n\t\t\t'0%': { transform: 'translateY(0)' },\n\t\t\t'100%': { transform: 'translateY(-100%)' },\n\t\t},\n\t\tslideOutBottom: {\n\t\t\t'0%': { transform: 'translateY(0)' },\n\t\t\t'100%': { transform: 'translateY(100%)' },\n\t\t},\n\t\tslideOutTopSmall: {\n\t\t\t'0%': { transform: 'translateY(0)' },\n\t\t\t'100%': { transform: 'translateY(-20%)' },\n\t\t},\n\t\tslideOutBottomSmall: {\n\t\t\t'0%': { transform: 'translateY(0)' },\n\t\t\t'100%': { transform: 'translateY(20%)' },\n\t\t},\n\t},\n};\n","export default {\n\twidth: {\n\t\tunset: 'unset',\n\n\t\t// default variant\n\t\t'content-mobile': '100%',\n\t\t'content-1280': '62rem',\n\t\t'content-1440': '71rem',\n\t\t'content-1536': '77rem',\n\t\t'content-1680': '83rem',\n\n\t\t// login variant\n\t\t'sidebar-desktop-login': '100%',\n\t\t'content-desktop-login': '21rem',\n\t},\n};\n","export default {\n\theight: {\n\t\tunset: 'unset',\n\t},\n};\n","export default {\n\t// default variant layout\n\t'content-mobile-x': '1rem',\n\t'content-mobile-y': '1.5rem',\n\n\t'content-desktop-x': '2rem',\n\t'content-desktop-y': '2rem',\n\n\t18: '4.5rem',\n};\n","const safeArea = ({ addUtilities }) => {\n\tconst utilities = {\n\t\t'.m-safe': {\n\t\t\tmarginTop: 'env(safe-area-inset-top)',\n\t\t\tmarginRight: 'env(safe-area-inset-right)',\n\t\t\tmarginBottom: 'env(safe-area-inset-bottom)',\n\t\t\tmarginLeft: 'env(safe-area-inset-left)',\n\t\t},\n\t\t'.mx-safe': {\n\t\t\tmarginRight: 'env(safe-area-inset-right)',\n\t\t\tmarginLeft: 'env(safe-area-inset-left)',\n\t\t},\n\t\t'.my-safe': {\n\t\t\tmarginTop: 'env(safe-area-inset-top)',\n\t\t\tmarginBottom: 'env(safe-area-inset-bottom)',\n\t\t},\n\t\t'.mt-safe': {\n\t\t\tmarginTop: 'env(safe-area-inset-top)',\n\t\t},\n\t\t'.mr-safe': {\n\t\t\tmarginRight: 'env(safe-area-inset-right)',\n\t\t},\n\t\t'.mb-safe': {\n\t\t\tmarginBottom: 'env(safe-area-inset-bottom)',\n\t\t},\n\t\t'.ml-safe': {\n\t\t\tmarginLeft: 'env(safe-area-inset-left)',\n\t\t},\n\t\t'.p-safe': {\n\t\t\tpaddingTop: 'env(safe-area-inset-top)',\n\t\t\tpaddingRight: 'env(safe-area-inset-right)',\n\t\t\tpaddingBottom: 'env(safe-area-inset-bottom)',\n\t\t\tpaddingLeft: 'env(safe-area-inset-left)',\n\t\t},\n\t\t'.px-safe': {\n\t\t\tpaddingRight: 'env(safe-area-inset-right)',\n\t\t\tpaddingLeft: 'env(safe-area-inset-left)',\n\t\t},\n\t\t'.py-safe': {\n\t\t\tpaddingTop: 'env(safe-area-inset-top)',\n\t\t\tpaddingBottom: 'env(safe-area-inset-bottom)',\n\t\t},\n\t\t'.pt-safe': {\n\t\t\tpaddingTop: 'env(safe-area-inset-top)',\n\t\t},\n\t\t'.pr-safe': {\n\t\t\tpaddingRight: 'env(safe-area-inset-right)',\n\t\t},\n\t\t'.pb-safe': {\n\t\t\tpaddingBottom: 'env(safe-area-inset-bottom)',\n\t\t},\n\t\t'.pl-safe': {\n\t\t\tpaddingLeft: 'env(safe-area-inset-left)',\n\t\t},\n\t\t'.min-h-screen': {\n\t\t\tminHeight: '100vh',\n\t\t},\n\t\t'.min-h-screen-safe': {\n\t\t\tminHeight:\n\t\t\t\t'calc(100vh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)))',\n\t\t},\n\t\t'.max-h-screen': {\n\t\t\tmaxHeight: '100vh',\n\t\t},\n\t\t'.max-h-screen-safe': {\n\t\t\tmaxHeight:\n\t\t\t\t'calc(100vh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)))',\n\t\t},\n\t\t'.h-screen-safe': {\n\t\t\theight: 'calc(100vh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)))',\n\t\t},\n\t\t'.min-w-screen': {\n\t\t\tminWidth: '100vw',\n\t\t},\n\t\t'.min-w-screen-safe': {\n\t\t\tminWidth:\n\t\t\t\t'calc(100vw - (env(safe-area-inset-left) + env(safe-area-inset-right)))',\n\t\t},\n\t\t'.max-w-screen': {\n\t\t\tmaxWidth: '100vw',\n\t\t},\n\t\t'.max-w-screen-safe': {\n\t\t\tmaxWidth:\n\t\t\t\t'calc(100vw - (env(safe-area-inset-left) + env(safe-area-inset-right)))',\n\t\t},\n\t\t'.w-screen-safe': {\n\t\t\twidth: 'calc(100vw - (env(safe-area-inset-left) + env(safe-area-inset-right)))',\n\t\t},\n\t};\n\n\taddUtilities(utilities);\n};\n\n// eslint-disable-next-line unicorn/prefer-module\nexport default safeArea;\n","const hover = ({ addVariant }) => {\n\t// Hover media queries\n\taddVariant('has-hover', '@media (hover: hover)');\n\taddVariant('no-hover', '@media (hover: none)');\n\t// Applied on hover if supported, never applied otherwise\n\taddVariant('hover-never', '@media (hover: hover) { &:hover }');\n\taddVariant(\n\t\t'group-hover-never',\n\t\t'@media (hover: hover) { :merge(.group):hover & }'\n\t);\n\taddVariant(\n\t\t'peer-hover-never',\n\t\t'@media (hover: hover) { :merge(.peer):hover & }'\n\t);\n\t// Applied on hover if supported, always applied otherwise\n\taddVariant('hover-always', [\n\t\t'@media (hover: hover) { &:hover }',\n\t\t'@media (hover: none)',\n\t]);\n\taddVariant('group-hover-always', [\n\t\t'@media (hover: hover) { :merge(.group):hover & }',\n\t\t'@media (hover: none)',\n\t]);\n\taddVariant('peer-hover-always', [\n\t\t'@media (hover: hover) { :merge(.peer):hover & }',\n\t\t'@media (hover: none)',\n\t]);\n};\n\nexport default hover;\n","import plugin from 'tailwindcss/plugin';\n\nimport colors from './theme/colors';\nimport shadows from './theme/shadows';\nimport borderRadius from './theme/border-radius';\nimport scale from './theme/scale';\nimport rotate from './theme/rotate';\nimport typeograhpy from './theme/typography';\nimport backdropBlur from './theme/backdrop-blur';\nimport zIndex from './theme/z-index';\nimport animation from './theme/animation';\nimport screens from './theme/screens';\nimport width from './theme/width';\nimport height from './theme/height';\nimport spacing from './theme/spacing';\n\nimport safeArea from './plugins/safe-area';\nimport hover from './plugins/hover';\n\nexport const paperless = plugin(\n\t(pluginAPI) => {\n\t\tsafeArea(pluginAPI);\n\t\thover(pluginAPI);\n\t},\n\t{\n\t\ttheme: {\n\t\t\tcolors,\n\t\t\t// @ts-ignore\n\t\t\tboxShadow: shadows,\n\t\t\tdropShadow: shadows,\n\t\t\tborderRadius,\n\t\t\t// @ts-ignore\n\t\t\textend: {\n\t\t\t\t...animation,\n\t\t\t\tscale,\n\t\t\t\trotate,\n\t\t\t\tfontSize: typeograhpy.fontSize,\n\t\t\t\tlineHeight: typeograhpy.lineHeight,\n\t\t\t\tbackdropBlur,\n\t\t\t\tzIndex,\n\t\t\t\tscreens,\n\t\t\t\twidth: width.width,\n\t\t\t\theight: height.height,\n\t\t\t\tspacing,\n\t\t\t},\n\t\t},\n\t\tplugins: [\n\t\t\trequire('@tailwindcss/aspect-ratio'),\n\t\t\trequire('tailwind-scrollbar-hide'),\n\t\t\tsafeArea,\n\t\t\thover,\n\t\t],\n\t}\n);\n"],"version":3}
|
|
1
|
+
{"file":"index.js","mappings":";;;;;;;MAAa,gBAAgB,GAAG,CAAC,GAAG,KAChC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,KAAK,IAAI,MAAM,CAAC,WAAW,EAAE,EAAE,EAAE;MAErD,gBAAgB,GAAG,CAAC,GAAG,KAChC,GAAG;GACE,WAAW,EAAE;GACb,OAAO,CAAC,cAAc,EAAE,CAAC,KAAK,KAC3B,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;ACNjE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE;AAC7C,IAAI,KAAK,EAAE,IAAI;AACf,CAAC,CAAC,CAAC;AACH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,SAAS,EAAE;AAC1C,IAAI,UAAU,EAAE,IAAI;AACpB,IAAI,GAAG,EAAE,WAAW;AACpB,QAAQ,OAAO,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U,EAAE,sBAAsB,CAAC,CAAC;;EAE/C,UAAU,CAAC,aAAa,EAAE,mCAAmC,CAAC,CAAC;EAC/D,UAAU,CACT,mBAAmB,EACnB,kDAAkD,CAClD,CAAC;EACF,UAAU,CACT,kBAAkB,EAClB,iDAAiD,CACjD,CAAC;;EAEF,UAAU,CAAC,cAAc,EAAE;IAC1B,mCAAmC;IACnC,sBAAsB;GACtB,CAAC,CAAC;EACH,UAAU,CAAC,oBAAoB,EAAE;IAChC,kDAAkD;IAClD,sBAAsB;GACtB,CAAC,CAAC;EACH,UAAU,CAAC,mBAAmB,EAAE;IAC/B,iDAAiD;IACjD,sBAAsB;GACtB,CAAC,CAAC;AACJ,CAAC;;MCRY,SAAS,GAAGC,QAAM,CAC9B,CAAC,SAAS;EACT,QAAQ,CAAC,SAAS,CAAC,CAAC;EACpB,KAAK,CAAC,SAAS,CAAC,CAAC;AAClB,CAAC,EACD;EACC,KAAK,EAAE;IACN,MAAM;;IAEN,SAAS,EAAE,OAAO;IAClB,UAAU,EAAE,OAAO;IACnB,YAAY;;IAEZ,MAAM,kCACF,SAAS,KACZ,KAAK;cACLC,aAAM,EACN,QAAQ,EAAE,WAAW,CAAC,QAAQ,EAC9B,UAAU,EAAE,WAAW,CAAC,UAAU,EAClC,YAAY;MACZ,MAAM;MACN,OAAO,EACP,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,OAAO,GACP;GACD;EACD,OAAO,EAAE;IACR,OAAO,CAAC,2BAA2B,CAAC;IACpC,OAAO,CAAC,yBAAyB,CAAC;IAClC,QAAQ;IACR,KAAK;GACL;CACD;;;;","names":["require$$0","plugin","rotate"],"sources":["src/utils/transformers.ts","../../node_modules/tailwindcss/lib/util/createPlugin.js","../../node_modules/tailwindcss/lib/public/create-plugin.js","../../node_modules/tailwindcss/plugin.js","src/tailwind/theme/colors.ts","src/tailwind/theme/shadows.ts","src/tailwind/theme/border-radius.ts","src/tailwind/theme/scale.ts","src/tailwind/theme/rotate.ts","src/tailwind/theme/typography.ts","src/tailwind/theme/backdrop-blur.ts","src/tailwind/theme/z-index.ts","src/tailwind/theme/animation.ts","src/tailwind/theme/width.ts","src/tailwind/theme/height.ts","src/tailwind/theme/spacing.ts","src/tailwind/plugins/safe-area.ts","src/tailwind/plugins/hover.ts","src/tailwind/paperless.ts"],"sourcesContent":["export const camelToSnakeCase = (str) =>\n str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);\n\nexport const snakeToCamelCase = (str) =>\n str\n .toLowerCase()\n .replace(/([-_][a-z])/g, (group) =>\n group.toUpperCase().replace('-', '').replace('_', '')\n );\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nfunction createPlugin(plugin, config) {\n return {\n handler: plugin,\n config\n };\n}\ncreatePlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {\n const optionsFunction = function(options) {\n return {\n __options: options,\n handler: pluginFunction(options),\n config: configFunction(options)\n };\n };\n optionsFunction.__isOptionsFunction = true;\n // Expose plugin dependencies so that `object-hash` returns a different\n // value if anything here changes, to ensure a rebuild is triggered.\n optionsFunction.__pluginFunction = pluginFunction;\n optionsFunction.__configFunction = configFunction;\n return optionsFunction;\n};\nconst _default = createPlugin;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nconst _createPlugin = /*#__PURE__*/ _interop_require_default(require(\"../util/createPlugin\"));\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nconst _default = _createPlugin.default;\n","let createPlugin = require('./lib/public/create-plugin')\nmodule.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default\n","export default {\n\ttransparent: 'transparent',\n\tcurrent: 'currentColor',\n\tindigo: {\n\t\tdark: '#2C4BA9',\n\t\tDEFAULT: '#528AFA',\n\t\tlight: '#F1F6FF',\n\t},\n\tsky: {\n\t\tdark: '#30C2C9',\n\t\tDEFAULT: '#1EDAE3',\n\t\tlight: '#F5FEFF',\n\t\tvague: '#BBF4F6',\n\t},\n\tmystic: {\n\t\tblank: '#FFF',\n\t\tdark: '#DAE6F0',\n\t\tDEFAULT: '#F7FAFC',\n\t\tlight: '#FCFDFE',\n\t\tmedium: '#E3ECF3',\n\t},\n\tredberry: {\n\t\tdark: '#BD0F1E',\n\t\tDEFAULT: '#E63241',\n\t\tlight: '#FFE8EA',\n\t\tmedium: '#FF7D88',\n\t},\n\tstorm: {\n\t\tdark: '#272838',\n\t\tDEFAULT: '#51536B',\n\t\tlight: '#B0B2CB',\n\t\tmedium: '#80829E',\n\t\tvague: '#989AB7',\n\t},\n\tnegative: {\n\t\tdark: '#8A0F1D',\n\t\tDEFAULT: '#B91E28',\n\t\tlight: '#FFCCD3',\n\t},\n\tpositive: {\n\t\tdark: '#1DA360',\n\t\tDEFAULT: '#28D17C',\n\t\tlight: '#E5FFF2',\n\t},\n\tunbiased: {\n\t\tdark: '#FFA231',\n\t\tDEFAULT: '#FFC72D',\n\t\tlight: '#FFF6DC',\n\t},\n\twhite: '#FFF',\n\tblack: '#000',\n};\n","export default {\n\t'1': '0px 0.0625rem 0.05rem rgba(0,0,0, 0.5)',\n\t'2': '0px 0.0625rem 0.1125rem rgba(0,0,0, 0.65)',\n\t'3': '0px 0.0625rem 0.125rem rgba(0,0,0, 0.65)',\n\t'4': [\n\t\t'0px 0.3125rem 1rem rgba(0,24,98, 0.08)',\n\t\t'0px 0.0625rem 0.1875rem rgba(0,24,98, 0.13)',\n\t],\n\t'5': '0px 0.1875rem 1rem rgba(0,24,98, 0.3)',\n\ttransparent: 'transparent',\n\t'button-primary-hover': '0px 2px 4px rgba(44,75,169, 0.4)',\n\t'button-secondary-hover': '0px 2px 4px rgba(176,178,203, 0.4)',\n};\n","export default {\n\txxxlarge: '1.5625rem',\n\txxlarge: '0.75rem',\n\txlarge: '0.5625rem',\n\tlarge: '0.375rem',\n\tDEFAULT: '0.25rem',\n\tmedium: '0.25rem',\n\tsmall: '0.125rem',\n\tnone: '0',\n\tround: '100%',\n};\n","export default {\n\tflip: '-1',\n};\n","const rotateNumbers = {};\n\nfor (let i = 1; i < 360; i++) {\n\trotateNumbers[`${i}`] = `${i}deg`;\n\trotateNumbers[`-${i}`] = `-${i}deg`;\n}\n\nexport default rotateNumbers;\n","export default {\n\tfontSize: {\n\t\th1: '2.5rem',\n\t\th2: '2rem',\n\t\th3: '1.5rem',\n\t\th4: '1.25rem',\n\t\th5: '1.125rem',\n\t\tbody: '1rem',\n\t\t'body-2': '1.125rem',\n\t\txxs: '0.6875rem',\n\t},\n\tlineHeight: {\n\t\th1: '3rem',\n\t\th2: '2.5rem',\n\t\th3: '1.875rem',\n\t\th4: '1.625rem',\n\t\th5: '1.375rem',\n\t\tbody: '1.75rem',\n\t\t'body-2': '1.875rem',\n\t},\n};\n","export default {\n\txs: '2px',\n};\n","export default {\n\t'floating-menu': '190',\n\tdropdown: '200',\n\n\t'navbar-topbar': '280',\n\t'navbar-backdrop': '290',\n\tnavbar: '300',\n\n\tbackdrop: '490',\n\n\tdrawer: '500',\n\t'drawer-header': '501',\n\n\tmodal: '600',\n\n\ttooltip: '601',\n\n\ttoast: '700',\n};\n","export default {\n\tanimation: {\n\t\t'fade-in': 'forwards fadeIn .2s ease',\n\t\t'fade-out': 'forwards fadeOut .2s ease',\n\t\t'slide-in-right': 'forwards slideInRight .5s ease',\n\t\t'slide-in-left': 'forwards slideInLeft .5s ease',\n\t\t'slide-in-top': 'forwards slideInTop .25 ease',\n\t\t'slide-in-bottom': 'forwards slideInBottom .5s ease',\n\t\t'slide-in-right-small': 'forwards slideInRightSmall .5s ease',\n\t\t'slide-in-left-small': 'forwards slideInLeftSmall .5s ease',\n\t\t'slide-in-top-small': 'forwards slideInTopSmall .5s ease',\n\t\t'slide-in-bottom-small': 'forwards slideInBottomSmall .5s ease',\n\t\t'slide-out-right': 'forwards slideOutRight .2s ease',\n\t\t'slide-out-left': 'forwards slideOutLeft .2s ease',\n\t\t'slide-out-top': 'forwards slideOutTop .2s ease',\n\t\t'slide-out-bottom': 'forwards slideOutBottom .5s ease',\n\t\t'slide-out-top-small': 'forwards slideOutTopSmall .5s ease',\n\t\t'slide-out-bottom-small': 'forwards slideOutBottomSmall .5s ease',\n\t},\n\n\tkeyframes: {\n\t\tfadeIn: {\n\t\t\t'0%': { opacity: 0 },\n\t\t\t'100%': { opacity: 100 },\n\t\t},\n\t\tfadeOut: {\n\t\t\t'0%': { opacity: 100 },\n\t\t\t'100%': { opacity: 0 },\n\t\t},\n\t\tslideInRight: {\n\t\t\t'0%': { transform: 'translateX(100%)' },\n\t\t\t'100%': { transform: 'translateX(0)' },\n\t\t},\n\t\tslideInLeft: {\n\t\t\t'0%': { transform: 'translateX(-100%)' },\n\t\t\t'100%': { transform: 'translateX(0)' },\n\t\t},\n\t\tslideInTop: {\n\t\t\t'0%': { transform: 'translateY(-100%)' },\n\t\t\t'100%': { transform: 'translateY(0)' },\n\t\t},\n\t\tslideInBottom: {\n\t\t\t'0%': { transform: 'translateY(100%)' },\n\t\t\t'100%': { transform: 'translateY(0)' },\n\t\t},\n\t\tslideInRightSmall: {\n\t\t\t'0%': { transform: 'translateX(20%)' },\n\t\t\t'100%': { transform: 'translateX(0)' },\n\t\t},\n\t\tslideInLeftSmall: {\n\t\t\t'0%': { transform: 'translateX(-20%)' },\n\t\t\t'100%': { transform: 'translateX(0)' },\n\t\t},\n\t\tslideInTopSmall: {\n\t\t\t'0%': { transform: 'translateY(-20%)' },\n\t\t\t'100%': { transform: 'translateY(0)' },\n\t\t},\n\t\tslideInBottomSmall: {\n\t\t\t'0%': { transform: 'translateY(20%)' },\n\t\t\t'100%': { transform: 'translateY(0)' },\n\t\t},\n\t\tslideOutRight: {\n\t\t\t'0%': { transform: 'translateX(0)' },\n\t\t\t'100%': { transform: 'translateX(100%)' },\n\t\t},\n\t\tslideOutLeft: {\n\t\t\t'0%': { transform: 'translateX(0)' },\n\t\t\t'100%': { transform: 'translateX(-100%)' },\n\t\t},\n\t\tslideOutTop: {\n\t\t\t'0%': { transform: 'translateY(0)' },\n\t\t\t'100%': { transform: 'translateY(-100%)' },\n\t\t},\n\t\tslideOutBottom: {\n\t\t\t'0%': { transform: 'translateY(0)' },\n\t\t\t'100%': { transform: 'translateY(100%)' },\n\t\t},\n\t\tslideOutTopSmall: {\n\t\t\t'0%': { transform: 'translateY(0)' },\n\t\t\t'100%': { transform: 'translateY(-20%)' },\n\t\t},\n\t\tslideOutBottomSmall: {\n\t\t\t'0%': { transform: 'translateY(0)' },\n\t\t\t'100%': { transform: 'translateY(20%)' },\n\t\t},\n\t},\n};\n","export default {\n\twidth: {\n\t\tunset: 'unset',\n\n\t\t// default variant\n\t\t'content-mobile': '100%',\n\t\t'content-1280': '62rem',\n\t\t'content-1440': '71rem',\n\t\t'content-1536': '77rem',\n\t\t'content-1680': '83rem',\n\n\t\t// login variant\n\t\t'sidebar-desktop-login': '100%',\n\t\t'content-desktop-login': '21rem',\n\t},\n};\n","export default {\n\theight: {\n\t\tunset: 'unset',\n\t},\n};\n","export default {\n\t// default variant layout\n\t'content-mobile-x': '1rem',\n\t'content-mobile-y': '1.5rem',\n\n\t'content-desktop-x': '2rem',\n\t'content-desktop-y': '2rem',\n\n\t18: '4.5rem',\n};\n","const safeArea = ({ addUtilities }) => {\n\tconst utilities = {\n\t\t'.m-safe': {\n\t\t\tmarginTop: 'env(safe-area-inset-top)',\n\t\t\tmarginRight: 'env(safe-area-inset-right)',\n\t\t\tmarginBottom: 'env(safe-area-inset-bottom)',\n\t\t\tmarginLeft: 'env(safe-area-inset-left)',\n\t\t},\n\t\t'.mx-safe': {\n\t\t\tmarginRight: 'env(safe-area-inset-right)',\n\t\t\tmarginLeft: 'env(safe-area-inset-left)',\n\t\t},\n\t\t'.my-safe': {\n\t\t\tmarginTop: 'env(safe-area-inset-top)',\n\t\t\tmarginBottom: 'env(safe-area-inset-bottom)',\n\t\t},\n\t\t'.mt-safe': {\n\t\t\tmarginTop: 'env(safe-area-inset-top)',\n\t\t},\n\t\t'.mr-safe': {\n\t\t\tmarginRight: 'env(safe-area-inset-right)',\n\t\t},\n\t\t'.mb-safe': {\n\t\t\tmarginBottom: 'env(safe-area-inset-bottom)',\n\t\t},\n\t\t'.ml-safe': {\n\t\t\tmarginLeft: 'env(safe-area-inset-left)',\n\t\t},\n\t\t'.p-safe': {\n\t\t\tpaddingTop: 'env(safe-area-inset-top)',\n\t\t\tpaddingRight: 'env(safe-area-inset-right)',\n\t\t\tpaddingBottom: 'env(safe-area-inset-bottom)',\n\t\t\tpaddingLeft: 'env(safe-area-inset-left)',\n\t\t},\n\t\t'.px-safe': {\n\t\t\tpaddingRight: 'env(safe-area-inset-right)',\n\t\t\tpaddingLeft: 'env(safe-area-inset-left)',\n\t\t},\n\t\t'.py-safe': {\n\t\t\tpaddingTop: 'env(safe-area-inset-top)',\n\t\t\tpaddingBottom: 'env(safe-area-inset-bottom)',\n\t\t},\n\t\t'.pt-safe': {\n\t\t\tpaddingTop: 'env(safe-area-inset-top)',\n\t\t},\n\t\t'.pr-safe': {\n\t\t\tpaddingRight: 'env(safe-area-inset-right)',\n\t\t},\n\t\t'.pb-safe': {\n\t\t\tpaddingBottom: 'env(safe-area-inset-bottom)',\n\t\t},\n\t\t'.pl-safe': {\n\t\t\tpaddingLeft: 'env(safe-area-inset-left)',\n\t\t},\n\t\t'.min-h-screen': {\n\t\t\tminHeight: '100vh',\n\t\t},\n\t\t'.min-h-screen-safe': {\n\t\t\tminHeight:\n\t\t\t\t'calc(100vh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)))',\n\t\t},\n\t\t'.max-h-screen': {\n\t\t\tmaxHeight: '100vh',\n\t\t},\n\t\t'.max-h-screen-safe': {\n\t\t\tmaxHeight:\n\t\t\t\t'calc(100vh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)))',\n\t\t},\n\t\t'.h-screen-safe': {\n\t\t\theight: 'calc(100vh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)))',\n\t\t},\n\t\t'.min-w-screen': {\n\t\t\tminWidth: '100vw',\n\t\t},\n\t\t'.min-w-screen-safe': {\n\t\t\tminWidth:\n\t\t\t\t'calc(100vw - (env(safe-area-inset-left) + env(safe-area-inset-right)))',\n\t\t},\n\t\t'.max-w-screen': {\n\t\t\tmaxWidth: '100vw',\n\t\t},\n\t\t'.max-w-screen-safe': {\n\t\t\tmaxWidth:\n\t\t\t\t'calc(100vw - (env(safe-area-inset-left) + env(safe-area-inset-right)))',\n\t\t},\n\t\t'.w-screen-safe': {\n\t\t\twidth: 'calc(100vw - (env(safe-area-inset-left) + env(safe-area-inset-right)))',\n\t\t},\n\t};\n\n\taddUtilities(utilities);\n};\n\n// eslint-disable-next-line unicorn/prefer-module\nexport default safeArea;\n","const hover = ({ addVariant }) => {\n\t// Hover media queries\n\taddVariant('has-hover', '@media (hover: hover)');\n\taddVariant('no-hover', '@media (hover: none)');\n\t// Applied on hover if supported, never applied otherwise\n\taddVariant('hover-never', '@media (hover: hover) { &:hover }');\n\taddVariant(\n\t\t'group-hover-never',\n\t\t'@media (hover: hover) { :merge(.group):hover & }'\n\t);\n\taddVariant(\n\t\t'peer-hover-never',\n\t\t'@media (hover: hover) { :merge(.peer):hover & }'\n\t);\n\t// Applied on hover if supported, always applied otherwise\n\taddVariant('hover-always', [\n\t\t'@media (hover: hover) { &:hover }',\n\t\t'@media (hover: none)',\n\t]);\n\taddVariant('group-hover-always', [\n\t\t'@media (hover: hover) { :merge(.group):hover & }',\n\t\t'@media (hover: none)',\n\t]);\n\taddVariant('peer-hover-always', [\n\t\t'@media (hover: hover) { :merge(.peer):hover & }',\n\t\t'@media (hover: none)',\n\t]);\n};\n\nexport default hover;\n","import plugin from 'tailwindcss/plugin';\n\nimport colors from './theme/colors';\nimport shadows from './theme/shadows';\nimport borderRadius from './theme/border-radius';\nimport scale from './theme/scale';\nimport rotate from './theme/rotate';\nimport typeograhpy from './theme/typography';\nimport backdropBlur from './theme/backdrop-blur';\nimport zIndex from './theme/z-index';\nimport animation from './theme/animation';\nimport screens from './theme/screens';\nimport width from './theme/width';\nimport height from './theme/height';\nimport spacing from './theme/spacing';\n\nimport safeArea from './plugins/safe-area';\nimport hover from './plugins/hover';\n\nexport const paperless = plugin(\n\t(pluginAPI) => {\n\t\tsafeArea(pluginAPI);\n\t\thover(pluginAPI);\n\t},\n\t{\n\t\ttheme: {\n\t\t\tcolors,\n\t\t\t// @ts-ignore\n\t\t\tboxShadow: shadows,\n\t\t\tdropShadow: shadows,\n\t\t\tborderRadius,\n\t\t\t// @ts-ignore\n\t\t\textend: {\n\t\t\t\t...animation,\n\t\t\t\tscale,\n\t\t\t\trotate,\n\t\t\t\tfontSize: typeograhpy.fontSize,\n\t\t\t\tlineHeight: typeograhpy.lineHeight,\n\t\t\t\tbackdropBlur,\n\t\t\t\tzIndex,\n\t\t\t\tscreens,\n\t\t\t\twidth: width.width,\n\t\t\t\theight: height.height,\n\t\t\t\tspacing,\n\t\t\t},\n\t\t},\n\t\tplugins: [\n\t\t\trequire('@tailwindcss/aspect-ratio'),\n\t\t\trequire('tailwind-scrollbar-hide'),\n\t\t\tsafeArea,\n\t\t\thover,\n\t\t],\n\t}\n);\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface PTableRowAction extends Components.PTableRowAction, HTMLElement {}
|
|
4
|
+
export const PTableRowAction: {
|
|
5
|
+
prototype: PTableRowAction;
|
|
6
|
+
new (): PTableRowAction;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const TableRowAction = /*@__PURE__*/ proxyCustomElement(class TableRowAction extends HTMLElement {
|
|
4
|
+
constructor() {
|
|
5
|
+
super();
|
|
6
|
+
this.__registerHost();
|
|
7
|
+
this.type = 'both';
|
|
8
|
+
this.icon = undefined;
|
|
9
|
+
this.iconOnly = false;
|
|
10
|
+
this.iconFlip = undefined;
|
|
11
|
+
this.iconRotate = undefined;
|
|
12
|
+
this.label = undefined;
|
|
13
|
+
this.action = undefined;
|
|
14
|
+
this.disabled = false;
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
}, [0, "p-table-row-action", {
|
|
20
|
+
"type": [1537],
|
|
21
|
+
"icon": [1],
|
|
22
|
+
"iconOnly": [4, "icon-only"],
|
|
23
|
+
"iconFlip": [1, "icon-flip"],
|
|
24
|
+
"iconRotate": [2, "icon-rotate"],
|
|
25
|
+
"label": [1],
|
|
26
|
+
"action": [16],
|
|
27
|
+
"disabled": [4]
|
|
28
|
+
}]);
|
|
29
|
+
function defineCustomElement$1() {
|
|
30
|
+
if (typeof customElements === "undefined") {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const components = ["p-table-row-action"];
|
|
34
|
+
components.forEach(tagName => { switch (tagName) {
|
|
35
|
+
case "p-table-row-action":
|
|
36
|
+
if (!customElements.get(tagName)) {
|
|
37
|
+
customElements.define(tagName, TableRowAction);
|
|
38
|
+
}
|
|
39
|
+
break;
|
|
40
|
+
} });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const PTableRowAction = TableRowAction;
|
|
44
|
+
const defineCustomElement = defineCustomElement$1;
|
|
45
|
+
|
|
46
|
+
export { PTableRowAction, defineCustomElement };
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=p-table-row-action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-table-row-action.js","mappings":";;MAea,cAAc;;;;gBAQzB,MAAM;;oBAUqB,KAAK;;;;;oBAyBL,KAAK;;EAEjC,MAAM;IACL,OAAO;GACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/helpers/table-row-action/table-row-action.component.tsx"],"sourcesContent":["import { Component, Prop } from '@stencil/core';\nimport {\n\tIconFlipOptions,\n\tIconVariant,\n\tRotateOptions,\n} from '../../../components';\n\nexport type TableRowActionFunc = {\n\t(item: any, multi: false): void;\n\t(item: any[], multi: true): void;\n};\n\n@Component({\n\ttag: 'p-table-row-action',\n})\nexport class TableRowAction {\n\t/**\n\t * The type of action\n\t * mutli = Only multi select action\n\t * single = Only an action on the row\n\t * both = Action on both locations\n\t */\n\t@Prop({ reflect: true, mutable: true }) type: 'both' | 'single' | 'multi' =\n\t\t'both';\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 * 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 * Label of the action\n\t */\n\t@Prop() label: string;\n\n\t/**\n\t * The action to trigger when used\n\t */\n\t@Prop() action: TableRowActionFunc;\n\n\t/**\n\t * Wether the action is disabled\n\t */\n\t@Prop() disabled: boolean = false;\n\n\trender() {\n\t\treturn;\n\t}\n}\n"],"version":3}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { f as formatTranslation, g as getLocaleComponentStrings } from './localization.js';
|
|
3
|
+
import { f as isMobile } from './screens.js';
|
|
3
4
|
import { a as defaultSize, b as defaultSizeOptions, d as defineCustomElement$c } from './page-size-select.component.js';
|
|
4
5
|
import { d as defineCustomElement$q } from './button.component.js';
|
|
5
6
|
import { d as defineCustomElement$p } from './divider.component.js';
|
|
@@ -26,7 +27,7 @@ import { d as defineCustomElement$4 } from './table-header.component.js';
|
|
|
26
27
|
import { d as defineCustomElement$3 } from './table-row.component.js';
|
|
27
28
|
import { d as defineCustomElement$2 } from './tooltip.component.js';
|
|
28
29
|
|
|
29
|
-
const tableComponentCss = ".fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.bottom-4{bottom:1rem!important}.left-1\\/2{left:50%!important}.flex{display:flex!important}.hidden{display:none!important}.flex-shrink{flex-shrink:1!important}.-translate-x-1\\/2{--tw-translate-x:-50%!important}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}*{box-sizing:border-box}p-table{display:flex;flex-direction:column;position:relative}p-table .p-input[type=checkbox]{flex-shrink:0}p-table p-table-container{position:relative}p-table p-table-container p-floating-menu-container{--tw-translate-x:-50%;animation:floatingMenuContainerIn .3s ease forwards!important;bottom:1rem;left:50%;position:fixed;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:40rem){p-table p-table-container p-floating-menu-container{bottom:4rem;position:absolute}}p-table p-table-container p-floating-menu-container:not(.shown){display:none}p-table p-table-container p-floating-menu-container.inactive{animation:floatingMenuContainerOut .3s ease forwards!important}p-table p-table-container p-floating-menu-container .hide-mobile{display:none}@media (min-width:40rem){p-table p-table-container p-floating-menu-container .hide-mobile{display:block}}@keyframes floatingMenuContainerOut{0%{display:flex;opacity:1;transform:translateY(0) translateX(-50%)}99%{display:flex;opacity:0;transform:translateY(100%) translateX(-50%)}to{display:none;opacity:0;transform:translateY(100%) translateX(-50%)}}@keyframes floatingMenuContainerIn{0%{display:none;opacity:0;transform:translateY(100%) translateX(-50%)}1%{display:flex;opacity:0;transform:translateY(100%) translateX(-50%)}to{display:flex;opacity:1;transform:translateY(0) translateX(-50%)}}@media (min-width:40rem){.tablet\\:block{display:block!important}}.static{position:static!important}.mx-0{margin-left:0!important;margin-right:0!important}.mb-14{margin-bottom:3.5rem!important}.mb-6{margin-bottom:1.5rem!important}.table{display:table!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.max-w-\\[20rem\\]{max-width:20rem!important}.flex-1{flex:1 1 0%!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.self-center{align-self:center!important}.rounded{border-radius:.25rem!important}.py-24{padding-bottom:6rem!important;padding-top:6rem!important}.text-center{text-align:center!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-semibold{font-weight:600!important}.text-storm{--tw-text-opacity:1!important;color:rgb(81 83 107/var(--tw-text-opacity))!important}.text-storm-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}.opacity-0{opacity:0!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}";
|
|
30
|
+
const tableComponentCss = ".fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.bottom-4{bottom:1rem!important}.left-1\\/2{left:50%!important}.flex{display:flex!important}.hidden{display:none!important}.flex-shrink{flex-shrink:1!important}.-translate-x-1\\/2{--tw-translate-x:-50%!important}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}*{box-sizing:border-box}p-table{display:flex;flex-direction:column;position:relative}p-table .p-input[type=checkbox]{flex-shrink:0}p-table p-table-container{position:relative}p-table p-table-container p-floating-menu-container{--tw-translate-x:-50%;animation:floatingMenuContainerIn .3s ease forwards!important;bottom:1rem;left:50%;position:fixed;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:40rem){p-table p-table-container p-floating-menu-container{bottom:4rem;position:absolute}}p-table p-table-container p-floating-menu-container:not(.shown){display:none}p-table p-table-container p-floating-menu-container.inactive{animation:floatingMenuContainerOut .3s ease forwards!important}p-table p-table-container p-floating-menu-container .hide-mobile{display:none}@media (min-width:40rem){p-table p-table-container p-floating-menu-container .hide-mobile{display:block}}@keyframes floatingMenuContainerOut{0%{display:flex;opacity:1;transform:translateY(0) translateX(-50%)}99%{display:flex;opacity:0;transform:translateY(100%) translateX(-50%)}to{display:none;opacity:0;transform:translateY(100%) translateX(-50%)}}@keyframes floatingMenuContainerIn{0%{display:none;opacity:0;transform:translateY(100%) translateX(-50%)}1%{display:flex;opacity:0;transform:translateY(100%) translateX(-50%)}to{display:flex;opacity:1;transform:translateY(0) translateX(-50%)}}@media (min-width:40rem){.tablet\\:block{display:block!important}}.static{position:static!important}.mx-0{margin-left:0!important;margin-right:0!important}.mb-14{margin-bottom:3.5rem!important}.mb-6{margin-bottom:1.5rem!important}.ml-auto{margin-left:auto!important}.table{display:table!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.max-w-\\[20rem\\]{max-width:20rem!important}.flex-1{flex:1 1 0%!important}.cursor-pointer{cursor:pointer!important}.resize{resize:both!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.gap-2{gap:.5rem!important}.self-center{align-self:center!important}.rounded{border-radius:.25rem!important}.py-24{padding-bottom:6rem!important;padding-top:6rem!important}.text-center{text-align:center!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-semibold{font-weight:600!important}.text-storm{--tw-text-opacity:1!important;color:rgb(81 83 107/var(--tw-text-opacity))!important}.text-storm-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}.opacity-0{opacity:0!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}";
|
|
30
31
|
|
|
31
32
|
const Table = /*@__PURE__*/ proxyCustomElement(class Table extends HTMLElement {
|
|
32
33
|
constructor() {
|
|
@@ -47,7 +48,6 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends HTMLElement {
|
|
|
47
48
|
this.emptyStateActionClick = createEvent(this, "emptyStateActionClick", 3);
|
|
48
49
|
this._ctrlDown = false;
|
|
49
50
|
this._hasCustomFilterSlot = false;
|
|
50
|
-
this._hasFloatingMenuItems = false;
|
|
51
51
|
this._floatingMenuShown = false;
|
|
52
52
|
this.items = undefined;
|
|
53
53
|
this.loading = false;
|
|
@@ -100,10 +100,14 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends HTMLElement {
|
|
|
100
100
|
this._locales = {};
|
|
101
101
|
this._columns = [];
|
|
102
102
|
this._items = [];
|
|
103
|
+
this._enableRowSelection = this.enableRowSelection;
|
|
104
|
+
this._rowSelectionLimit = undefined;
|
|
105
|
+
this._rowActionsFloating = [];
|
|
106
|
+
this._rowActionsRow = [];
|
|
103
107
|
}
|
|
104
108
|
componentWillLoad() {
|
|
105
109
|
this._hasCustomFilterSlot = !!this._el.querySelector(':scope > [slot="custom-filter"]');
|
|
106
|
-
this.
|
|
110
|
+
this._setRowSelectionData();
|
|
107
111
|
this._setLocales();
|
|
108
112
|
this._parseItems(this.items);
|
|
109
113
|
this._generateColumns();
|
|
@@ -112,7 +116,7 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends HTMLElement {
|
|
|
112
116
|
this.hasRendered.emit();
|
|
113
117
|
}
|
|
114
118
|
render() {
|
|
115
|
-
var _a, _b, _c;
|
|
119
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
116
120
|
return (h(Host, { class: "p-table" }, h("p-table-container", { shadow: this.shadow }, this.enableHeader && (h("p-table-header", {
|
|
117
121
|
// quick filters
|
|
118
122
|
quickFilters: this.quickFilters, activeQuickFilterIdentifier: this.activeQuickFilterIdentifier, onQuickFilter: ({ detail }) => this.quickFilter.emit(detail),
|
|
@@ -135,11 +139,16 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends HTMLElement {
|
|
|
135
139
|
enableExport: this.enableExport, onExport: () => this.export.emit(),
|
|
136
140
|
//loading
|
|
137
141
|
loading: this.footerLoading
|
|
138
|
-
})), this.enableFloatingMenu && this.
|
|
142
|
+
})), this.enableFloatingMenu && this._enableRowSelection ? (h("p-floating-menu-container", { usedInTable: true, class: `${((_b = this.selectedRows) === null || _b === void 0 ? void 0 : _b.length) ? '' : 'inactive'} ${this._floatingMenuShown ? 'shown' : ''}` }, h("p-floating-menu-item", { hover: false, slot: "floating-menu-item", class: ((_c = this._rowActionsFloating) === null || _c === void 0 ? void 0 : _c.length)
|
|
139
143
|
? 'hide-mobile'
|
|
140
|
-
: '' }, this.floatingMenuAmountSelectedTemplate((
|
|
144
|
+
: '' }, this.floatingMenuAmountSelectedTemplate((_d = this.selectedRows) === null || _d === void 0 ? void 0 : _d.length)), h("p-divider", { class: `mx-0 text-storm ${((_e = this._rowActionsFloating) === null || _e === void 0 ? void 0 : _e.length)
|
|
141
145
|
? 'hide-mobile'
|
|
142
|
-
: ''}`, variant: "vertical", slot: "floating-menu-item" }),
|
|
146
|
+
: ''}`, variant: "vertical", slot: "floating-menu-item" }), ((_f = this._rowActionsFloating) === null || _f === void 0 ? void 0 : _f.length) &&
|
|
147
|
+
this._rowActionsFloating.map((a) => (h("p-floating-menu-item", { slot: "floating-menu-item", disabled: a.disabled, onClick: () => !a.disabled &&
|
|
148
|
+
!!a.action &&
|
|
149
|
+
a.type === 'single'
|
|
150
|
+
? a.action(this.selectedRows[0], false)
|
|
151
|
+
: a.action(this.selectedRows, true) }, a.label, ' ', h("p-icon", { variant: a.icon, rotate: a.iconRotate, flip: a.iconFlip })))), ((_g = this._rowActionsFloating) === null || _g === void 0 ? void 0 : _g.length) && (h("p-divider", { class: "mx-0 text-storm", variant: "vertical", slot: "floating-menu-item" })), h("p-floating-menu-item", { slot: "floating-menu-item", onClick: () => this._selectAllChange(null, false) }, h("p-icon", { variant: "negative" })))) : (''))));
|
|
143
152
|
}
|
|
144
153
|
async _setLocales() {
|
|
145
154
|
this._locales = await getLocaleComponentStrings(this._el);
|
|
@@ -176,6 +185,44 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends HTMLElement {
|
|
|
176
185
|
}
|
|
177
186
|
this._items = JSON.parse(items);
|
|
178
187
|
}
|
|
188
|
+
_setRowSelectionData() {
|
|
189
|
+
if (this._resizeTimeout) {
|
|
190
|
+
clearTimeout(this._resizeTimeout);
|
|
191
|
+
}
|
|
192
|
+
// We add a timeout here because it's a lot easier on the machine to do these when someone is done
|
|
193
|
+
// resizing and playing around with their browser
|
|
194
|
+
this._resizeTimeout = setTimeout(() => {
|
|
195
|
+
var _a, _b;
|
|
196
|
+
const mobile = isMobile();
|
|
197
|
+
// we hack this to any[] to make it work..
|
|
198
|
+
const actions = Array.from(this._el.querySelectorAll(':scope > p-table-row-action'));
|
|
199
|
+
this._rowActionsRow = actions.filter((a) => a.type === 'both' || a.type === 'single');
|
|
200
|
+
this._rowActionsFloating = actions
|
|
201
|
+
.filter((a) => a.type === 'both' || a.type === 'multi' || mobile)
|
|
202
|
+
.map((a) => {
|
|
203
|
+
var _a;
|
|
204
|
+
if (a.type === 'single') {
|
|
205
|
+
a.disabled = ((_a = this.selectedRows) === null || _a === void 0 ? void 0 : _a.length) > 1;
|
|
206
|
+
}
|
|
207
|
+
return a;
|
|
208
|
+
});
|
|
209
|
+
let rowSelectionLimit = this.rowSelectionLimit;
|
|
210
|
+
if (mobile && // we're mobile
|
|
211
|
+
((_a = this._rowActionsFloating) === null || _a === void 0 ? void 0 : _a.length) && // we have atleast 1 item in _rowActionsFloating
|
|
212
|
+
((rowSelectionLimit !== undefined && this.enableRowSelection) ||
|
|
213
|
+
!this.enableRowSelection)) {
|
|
214
|
+
rowSelectionLimit = 1;
|
|
215
|
+
}
|
|
216
|
+
this._rowSelectionLimit = rowSelectionLimit;
|
|
217
|
+
let enableRowSelection = this.enableRowSelection;
|
|
218
|
+
if (mobile && // we're mobile
|
|
219
|
+
((_b = this._rowActionsFloating) === null || _b === void 0 ? void 0 : _b.length) && // we have atleast 1 item in _rowActionsFloating
|
|
220
|
+
!enableRowSelection) {
|
|
221
|
+
enableRowSelection = true;
|
|
222
|
+
}
|
|
223
|
+
this._enableRowSelection = enableRowSelection;
|
|
224
|
+
}, 200);
|
|
225
|
+
}
|
|
179
226
|
_generateColumns() {
|
|
180
227
|
const definitions = this._el.querySelectorAll('p-table-column');
|
|
181
228
|
const definitionsArray = Array.from(definitions);
|
|
@@ -191,19 +238,29 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends HTMLElement {
|
|
|
191
238
|
if (this.loading) {
|
|
192
239
|
return Array.from({
|
|
193
240
|
length: this.amountOfLoadingRows,
|
|
194
|
-
}, (_, i) => (h("p-table-row", { enableHover: this.
|
|
241
|
+
}, (_, i) => (h("p-table-row", { enableHover: this._enableRowSelection || this.enableRowClick }, this._getLoadingColumns(i))));
|
|
195
242
|
}
|
|
196
243
|
if (!this._items.length) {
|
|
197
244
|
return this._getEmptyState();
|
|
198
245
|
}
|
|
199
|
-
return this._items.map((item, index) => (h("p-table-row", { enableHover: this.
|
|
246
|
+
return this._items.map((item, index) => (h("p-table-row", { enableHover: this._enableRowSelection || this.enableRowClick, onClick: (ev) => this._rowClick(ev, index) }, this._getRowColumns(item, index))));
|
|
200
247
|
}
|
|
201
248
|
_getRowColumns(item, index) {
|
|
202
|
-
|
|
249
|
+
var _a;
|
|
250
|
+
const columns = this._columns.map((col, colIndex) => {
|
|
203
251
|
return (h("p-table-cell", { definition: col, item: item, checkbox: colIndex === 0 || col.hasCheckbox
|
|
204
252
|
? this._getCheckbox(index)
|
|
205
|
-
: null, index: colIndex, rowIndex: index }));
|
|
253
|
+
: null, index: colIndex, rowIndex: index, tableHasActions: !!this._rowActionsRow.length && !isMobile() }));
|
|
206
254
|
});
|
|
255
|
+
if (((_a = this._rowActionsRow) === null || _a === void 0 ? void 0 : _a.length) && !isMobile()) {
|
|
256
|
+
const lastDef = this._columns[this._columns.length - 1];
|
|
257
|
+
columns.push(h("p-table-cell", { variant: "actions", definition: lastDef, item: item, index: this._columns.length - 1, rowIndex: index, tableHasActions: !!this._rowActionsRow.length }, h("div", { slot: "actions", class: "flex ml-auto gap-2 items-center" }, this._rowActionsRow.map((a) => (h("p-tooltip", { content: a.label }, h("p-button", { "data-is-action": true, variant: "secondary", slot: "trigger", icon: a.icon, iconRotate: a.iconRotate, iconFlip: a.iconFlip, iconOnly: true, size: "small", onClick: () => {
|
|
258
|
+
var _a;
|
|
259
|
+
return typeof a.action === 'function' &&
|
|
260
|
+
((_a = a.action) === null || _a === void 0 ? void 0 : _a.call(a, item, false));
|
|
261
|
+
} })))))));
|
|
262
|
+
}
|
|
263
|
+
return columns;
|
|
207
264
|
}
|
|
208
265
|
_getLoadingColumns(index) {
|
|
209
266
|
return this._columns.map((col, colIndex) => {
|
|
@@ -213,21 +270,23 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends HTMLElement {
|
|
|
213
270
|
});
|
|
214
271
|
}
|
|
215
272
|
_getCheckbox(rowIndex, variant = 'default') {
|
|
216
|
-
|
|
273
|
+
var _a;
|
|
274
|
+
if (!this._enableRowSelection ||
|
|
275
|
+
(!this.selectionKey && !((_a = this._rowActionsFloating) === null || _a === void 0 ? void 0 : _a.length))) {
|
|
217
276
|
return;
|
|
218
277
|
}
|
|
219
278
|
if (variant === 'loading') {
|
|
220
279
|
return h("p-loader", { variant: "ghost", class: "h-6 w-6 rounded" });
|
|
221
280
|
}
|
|
222
281
|
if (variant === 'header') {
|
|
223
|
-
return (h("input", { class: `p-input ${this.
|
|
282
|
+
return (h("input", { class: `p-input ${this._rowSelectionLimit !== undefined && 'opacity-0'}`, type: "checkbox", onChange: (ev) => this._selectAllChange(ev), checked: this._selectionContainsAll(), indeterminate: this._selectionIndeterminate(), disabled: this._rowSelectionLimit !== undefined }));
|
|
224
283
|
}
|
|
225
284
|
const item = this._items[rowIndex];
|
|
226
|
-
const selectionContains = this._selectionContains(
|
|
285
|
+
const selectionContains = this._selectionContains(rowIndex);
|
|
227
286
|
return (h("input", { class: "p-input", type: "checkbox", onChange: (ev) => this._checkboxChange(ev === null || ev === void 0 ? void 0 : ev.target, rowIndex), disabled: (this.canSelectKey && !item[this.canSelectKey]) ||
|
|
228
|
-
(this.
|
|
287
|
+
(this._rowSelectionLimit !== undefined &&
|
|
229
288
|
!selectionContains &&
|
|
230
|
-
this.selectedRows.length === this.
|
|
289
|
+
this.selectedRows.length === this._rowSelectionLimit), checked: selectionContains }));
|
|
231
290
|
}
|
|
232
291
|
_getEmptyState() {
|
|
233
292
|
var _a;
|
|
@@ -238,7 +297,7 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends HTMLElement {
|
|
|
238
297
|
this.emptyStateActionClick.emit(null) }, h("p-illustration", { variant: "empty-state-add", class: "mb-6" }), h("p", { class: "text-storm-default font-semibold" }, this.emptyStateHeader()), h("p", { class: "mb-6 text-sm text-storm-medium" }, this.emptyStateContent()), this.enableEmptyStateAction && (h("p-button", { variant: "secondary", icon: "plus", size: "small" }, this.emptyStateAction()))));
|
|
239
298
|
}
|
|
240
299
|
_selectAllChange($event, forceValue) {
|
|
241
|
-
if (!this.
|
|
300
|
+
if (!this._enableRowSelection) {
|
|
242
301
|
return;
|
|
243
302
|
}
|
|
244
303
|
const value = forceValue === undefined
|
|
@@ -251,14 +310,14 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends HTMLElement {
|
|
|
251
310
|
if (this.canSelectKey && !row[this.canSelectKey]) {
|
|
252
311
|
continue;
|
|
253
312
|
}
|
|
254
|
-
if (this._selectionContains(
|
|
313
|
+
if (this._selectionContains(i)) {
|
|
255
314
|
continue;
|
|
256
315
|
}
|
|
257
316
|
toAdd.push(row);
|
|
258
317
|
this.rowSelected.emit(row);
|
|
259
|
-
if (this.
|
|
318
|
+
if (this._rowSelectionLimit !== undefined &&
|
|
260
319
|
this.selectedRows.length + toAdd.length ===
|
|
261
|
-
this.
|
|
320
|
+
this._rowSelectionLimit) {
|
|
262
321
|
break;
|
|
263
322
|
}
|
|
264
323
|
}
|
|
@@ -282,13 +341,13 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends HTMLElement {
|
|
|
282
341
|
this.selectedRowsChange.emit(this.selectedRows);
|
|
283
342
|
}
|
|
284
343
|
_checkboxChange(target, index) {
|
|
285
|
-
if (!this.
|
|
344
|
+
if (!this._enableRowSelection) {
|
|
286
345
|
return;
|
|
287
346
|
}
|
|
288
347
|
const value = this._getCheckedValue(target);
|
|
289
348
|
if (value &&
|
|
290
|
-
this.
|
|
291
|
-
this.selectedRows.length >= this.
|
|
349
|
+
this._rowSelectionLimit !== undefined &&
|
|
350
|
+
this.selectedRows.length >= this._rowSelectionLimit) {
|
|
292
351
|
target.checked = false;
|
|
293
352
|
return;
|
|
294
353
|
}
|
|
@@ -298,7 +357,10 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends HTMLElement {
|
|
|
298
357
|
return;
|
|
299
358
|
}
|
|
300
359
|
if (value) {
|
|
301
|
-
this.selectedRows = [
|
|
360
|
+
this.selectedRows = [
|
|
361
|
+
...this.selectedRows,
|
|
362
|
+
Object.assign(Object.assign({}, row), { index }),
|
|
363
|
+
];
|
|
302
364
|
this.selectedRowsChange.emit(this.selectedRows);
|
|
303
365
|
this.rowSelected.emit(row);
|
|
304
366
|
if (this.enableFloatingMenu && !this._floatingMenuShown) {
|
|
@@ -306,7 +368,7 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends HTMLElement {
|
|
|
306
368
|
}
|
|
307
369
|
return;
|
|
308
370
|
}
|
|
309
|
-
const indexOfToRemove = this._selectionContains(
|
|
371
|
+
const indexOfToRemove = this._selectionContains(index, true);
|
|
310
372
|
// we need to do this, because splice does not trigger the selection setter.
|
|
311
373
|
const selection = [...this.selectedRows];
|
|
312
374
|
selection.splice(indexOfToRemove, 1);
|
|
@@ -320,9 +382,8 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends HTMLElement {
|
|
|
320
382
|
_getSelectionValue(row, index) {
|
|
321
383
|
return this.selectionKey ? (row === null || row === void 0 ? void 0 : row[this.selectionKey]) || index : index;
|
|
322
384
|
}
|
|
323
|
-
_selectionContains(
|
|
324
|
-
const returnValue = this.selectedRows.findIndex((item) =>
|
|
325
|
-
this._getSelectionValue(item, index));
|
|
385
|
+
_selectionContains(index, returnIndex = false) {
|
|
386
|
+
const returnValue = this.selectedRows.findIndex((item) => item.index === index);
|
|
326
387
|
return !returnIndex ? returnValue >= 0 : returnValue;
|
|
327
388
|
}
|
|
328
389
|
_selectionContainsAll() {
|
|
@@ -331,13 +392,12 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends HTMLElement {
|
|
|
331
392
|
if (!((_a = this._items) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
332
393
|
return false;
|
|
333
394
|
}
|
|
334
|
-
if (this.
|
|
335
|
-
this.selectedRows.length === this.
|
|
395
|
+
if (this._rowSelectionLimit !== undefined &&
|
|
396
|
+
this.selectedRows.length === this._rowSelectionLimit) {
|
|
336
397
|
return true;
|
|
337
398
|
}
|
|
338
399
|
for (let i = 0; i < ((_b = this._items) === null || _b === void 0 ? void 0 : _b.length); i++) {
|
|
339
|
-
const
|
|
340
|
-
const contains = this._selectionContains(item, i);
|
|
400
|
+
const contains = this._selectionContains(i);
|
|
341
401
|
if (!contains) {
|
|
342
402
|
returnValue = false;
|
|
343
403
|
break;
|
|
@@ -350,14 +410,13 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends HTMLElement {
|
|
|
350
410
|
if (!((_a = this._items) === null || _a === void 0 ? void 0 : _a.length) || !((_b = this.selectedRows) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
351
411
|
return false;
|
|
352
412
|
}
|
|
353
|
-
if (this.
|
|
354
|
-
this.selectedRows.length === this.
|
|
413
|
+
if (this._rowSelectionLimit !== undefined &&
|
|
414
|
+
this.selectedRows.length === this._rowSelectionLimit) {
|
|
355
415
|
return false;
|
|
356
416
|
}
|
|
357
417
|
let containsCount = 0;
|
|
358
418
|
for (let i = 0; i < ((_c = this._items) === null || _c === void 0 ? void 0 : _c.length); i++) {
|
|
359
|
-
const
|
|
360
|
-
const contains = this._selectionContains(item, i);
|
|
419
|
+
const contains = this._selectionContains(i);
|
|
361
420
|
if (contains) {
|
|
362
421
|
containsCount++;
|
|
363
422
|
}
|
|
@@ -383,7 +442,7 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends HTMLElement {
|
|
|
383
442
|
});
|
|
384
443
|
return;
|
|
385
444
|
}
|
|
386
|
-
if (!this.
|
|
445
|
+
if (!this._enableRowSelection) {
|
|
387
446
|
return;
|
|
388
447
|
}
|
|
389
448
|
const checkbox = row === null || row === void 0 ? void 0 : row.querySelector('input[type="checkbox"]');
|
|
@@ -419,7 +478,10 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends HTMLElement {
|
|
|
419
478
|
}
|
|
420
479
|
get _el() { return this; }
|
|
421
480
|
static get watchers() { return {
|
|
422
|
-
"items": ["_parseItems"]
|
|
481
|
+
"items": ["_parseItems"],
|
|
482
|
+
"enableRowSelection": ["_setRowSelectionData"],
|
|
483
|
+
"rowSelectionLimit": ["_setRowSelectionData"],
|
|
484
|
+
"selectedRows": ["_setRowSelectionData"]
|
|
423
485
|
}; }
|
|
424
486
|
static get style() { return tableComponentCss; }
|
|
425
487
|
}, [4, "p-table", {
|
|
@@ -468,9 +530,16 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends HTMLElement {
|
|
|
468
530
|
"shadow": [4],
|
|
469
531
|
"_locales": [32],
|
|
470
532
|
"_columns": [32],
|
|
471
|
-
"_items": [32]
|
|
472
|
-
|
|
473
|
-
"
|
|
533
|
+
"_items": [32],
|
|
534
|
+
"_enableRowSelection": [32],
|
|
535
|
+
"_rowSelectionLimit": [32],
|
|
536
|
+
"_rowActionsFloating": [32],
|
|
537
|
+
"_rowActionsRow": [32]
|
|
538
|
+
}, [[16, "localeChanged", "_setLocales"], [16, "tableDefinitionChanged", "onTableDefinitionUpdated"], [4, "keydown", "keyDown"], [4, "keyup", "keyUp"], [4, "visibilitychange", "visibilityChange"], [9, "resize", "_setRowSelectionData"]], {
|
|
539
|
+
"items": ["_parseItems"],
|
|
540
|
+
"enableRowSelection": ["_setRowSelectionData"],
|
|
541
|
+
"rowSelectionLimit": ["_setRowSelectionData"],
|
|
542
|
+
"selectedRows": ["_setRowSelectionData"]
|
|
474
543
|
}]);
|
|
475
544
|
function defineCustomElement$1() {
|
|
476
545
|
if (typeof customElements === "undefined") {
|