@paperless/core 1.25.3 → 1.26.1
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/{p-6b8c23b3.entry.js → p-008f1920.entry.js} +2 -2
- package/dist/build/p-008f1920.entry.js.map +1 -0
- package/dist/build/{p-7d15ff9a.entry.js → p-0d71fc44.entry.js} +2 -2
- package/dist/build/p-0d71fc44.entry.js.map +1 -0
- package/dist/build/p-21e5da04.entry.js +2 -0
- package/dist/build/p-21e5da04.entry.js.map +1 -0
- package/dist/build/p-de4ae1ca.entry.js +2 -0
- package/dist/build/p-de4ae1ca.entry.js.map +1 -0
- package/dist/build/{p-fac13366.entry.js → p-fb45a664.entry.js} +2 -2
- package/dist/build/p-fb45a664.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/loader.cjs.js +1 -1
- package/dist/cjs/p-drawer.cjs.entry.js +3 -0
- package/dist/cjs/p-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/p-layout.cjs.entry.js +1 -1
- package/dist/cjs/p-layout.cjs.entry.js.map +1 -1
- package/dist/cjs/p-modal.cjs.entry.js +3 -0
- package/dist/cjs/p-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/p-navbar.cjs.entry.js +1 -1
- package/dist/cjs/p-navbar.cjs.entry.js.map +1 -1
- package/dist/cjs/p-select.cjs.entry.js +1 -0
- package/dist/cjs/p-select.cjs.entry.js.map +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/collection/components/atoms/layout/layout.component.css +1 -1
- package/dist/collection/components/atoms/layout/layout.component.js +2 -2
- package/dist/collection/components/atoms/layout/layout.component.js.map +1 -1
- package/dist/collection/components/molecules/select/select.component.js +1 -0
- package/dist/collection/components/molecules/select/select.component.js.map +1 -1
- package/dist/collection/components/organisms/drawer/drawer.component.js +12 -0
- package/dist/collection/components/organisms/drawer/drawer.component.js.map +1 -1
- package/dist/collection/components/organisms/modal/modal.component.js +12 -0
- package/dist/collection/components/organisms/modal/modal.component.js.map +1 -1
- package/dist/collection/components/organisms/navbar/navbar.component.css +1 -1
- package/dist/collection/tailwind/screens.js +14 -6
- package/dist/collection/tailwind/width.js +14 -19
- package/dist/components/p-drawer.js +4 -1
- package/dist/components/p-drawer.js.map +1 -1
- package/dist/components/p-layout.js +1 -1
- package/dist/components/p-layout.js.map +1 -1
- package/dist/components/p-modal.js +4 -1
- package/dist/components/p-modal.js.map +1 -1
- package/dist/components/p-navbar.js +1 -1
- package/dist/components/p-navbar.js.map +1 -1
- package/dist/components/p-select.js +1 -0
- package/dist/components/p-select.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-drawer.entry.js +3 -0
- package/dist/esm/p-drawer.entry.js.map +1 -1
- package/dist/esm/p-layout.entry.js +1 -1
- package/dist/esm/p-layout.entry.js.map +1 -1
- package/dist/esm/p-modal.entry.js +3 -0
- package/dist/esm/p-modal.entry.js.map +1 -1
- package/dist/esm/p-navbar.entry.js +1 -1
- package/dist/esm/p-navbar.entry.js.map +1 -1
- package/dist/esm/p-select.entry.js +1 -0
- package/dist/esm/p-select.entry.js.map +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/{p-6b8c23b3.entry.js → p-008f1920.entry.js} +2 -2
- package/dist/paperless/p-008f1920.entry.js.map +1 -0
- package/dist/paperless/{p-7d15ff9a.entry.js → p-0d71fc44.entry.js} +2 -2
- package/dist/paperless/p-0d71fc44.entry.js.map +1 -0
- package/dist/paperless/p-21e5da04.entry.js +2 -0
- package/dist/paperless/p-21e5da04.entry.js.map +1 -0
- package/dist/paperless/p-de4ae1ca.entry.js +2 -0
- package/dist/paperless/p-de4ae1ca.entry.js.map +1 -0
- package/dist/paperless/{p-fac13366.entry.js → p-fb45a664.entry.js} +2 -2
- package/dist/paperless/p-fb45a664.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/tailwind/screens.js +14 -6
- package/dist/tailwind/width.js +14 -19
- package/dist/types/components/atoms/layout/layout.component.d.ts +1 -1
- package/dist/types/components/organisms/drawer/drawer.component.d.ts +2 -1
- package/dist/types/components/organisms/modal/modal.component.d.ts +2 -1
- package/dist/types/components.d.ts +2 -2
- package/hydrate/index.js +11 -4
- package/package.json +1 -1
- package/dist/build/p-03090f03.entry.js +0 -2
- package/dist/build/p-03090f03.entry.js.map +0 -1
- package/dist/build/p-46a939e2.entry.js +0 -2
- package/dist/build/p-46a939e2.entry.js.map +0 -1
- package/dist/build/p-6b8c23b3.entry.js.map +0 -1
- package/dist/build/p-7d15ff9a.entry.js.map +0 -1
- package/dist/build/p-fac13366.entry.js.map +0 -1
- package/dist/paperless/p-03090f03.entry.js +0 -2
- package/dist/paperless/p-03090f03.entry.js.map +0 -1
- package/dist/paperless/p-46a939e2.entry.js +0 -2
- package/dist/paperless/p-46a939e2.entry.js.map +0 -1
- package/dist/paperless/p-6b8c23b3.entry.js.map +0 -1
- package/dist/paperless/p-7d15ff9a.entry.js.map +0 -1
- package/dist/paperless/p-fac13366.entry.js.map +0 -1
package/dist/tailwind/screens.js
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
tablet: '40rem', // 640 px
|
|
3
|
+
'desktop-xs': '64rem', // 1024 px
|
|
4
|
+
'desktop-sm': '80rem', // 1360 px
|
|
5
|
+
desktop: '85.375rem', // 1366
|
|
6
|
+
'desktop-lg': '90rem', // 1440
|
|
7
|
+
'desktop-xl': '120rem', // 1920
|
|
8
|
+
|
|
9
|
+
// layout sizes
|
|
10
|
+
'layout-1280': '80rem',
|
|
11
|
+
'layout-1440': '90rem',
|
|
12
|
+
'layout-1536': '96rem',
|
|
13
|
+
'layout-1680': '105rem',
|
|
14
|
+
'layout-1920': '120rem',
|
|
15
|
+
'layout-2560': '160rem',
|
|
8
16
|
};
|
package/dist/tailwind/width.js
CHANGED
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
width: {
|
|
3
|
+
unset: 'unset',
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
// default variant
|
|
6
|
+
'content-mobile': '100%',
|
|
7
|
+
'content-1280': '65rem',
|
|
8
|
+
'content-1440': '75rem',
|
|
9
|
+
'content-1536': '81rem',
|
|
10
|
+
'content-1680': '87rem',
|
|
11
|
+
'content-1920': '90rem',
|
|
12
|
+
'content-2560': '92.5rem',
|
|
8
13
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
'content-desktop-lg': '69rem',
|
|
14
|
-
'content-desktop-xl': '69rem',
|
|
15
|
-
|
|
16
|
-
// login variant
|
|
17
|
-
'sidebar-desktop-login': '100%',
|
|
18
|
-
'content-desktop-login': '30rem',
|
|
19
|
-
|
|
20
|
-
// office variant
|
|
21
|
-
'sidebar-office-desktop': '19.5rem'
|
|
22
|
-
},
|
|
14
|
+
// login variant
|
|
15
|
+
'sidebar-desktop-login': '100%',
|
|
16
|
+
'content-desktop-login': '30rem',
|
|
17
|
+
},
|
|
23
18
|
};
|
|
@@ -661,7 +661,7 @@ export namespace Components {
|
|
|
661
661
|
/**
|
|
662
662
|
* Variant of the layout
|
|
663
663
|
*/
|
|
664
|
-
"variant": 'default' | 'login'
|
|
664
|
+
"variant": 'default' | 'login';
|
|
665
665
|
}
|
|
666
666
|
interface PLoader {
|
|
667
667
|
/**
|
|
@@ -2722,7 +2722,7 @@ declare namespace LocalJSX {
|
|
|
2722
2722
|
/**
|
|
2723
2723
|
* Variant of the layout
|
|
2724
2724
|
*/
|
|
2725
|
-
"variant"?: 'default' | 'login'
|
|
2725
|
+
"variant"?: 'default' | 'login';
|
|
2726
2726
|
}
|
|
2727
2727
|
interface PLoader {
|
|
2728
2728
|
/**
|
package/hydrate/index.js
CHANGED
|
@@ -18128,6 +18128,9 @@ class Drawer {
|
|
|
18128
18128
|
this.closed.emit();
|
|
18129
18129
|
}, 250);
|
|
18130
18130
|
}
|
|
18131
|
+
handleCloseDrawer() {
|
|
18132
|
+
this.close();
|
|
18133
|
+
}
|
|
18131
18134
|
get _el() { return getElement(this); }
|
|
18132
18135
|
static get style() { return drawerComponentCss; }
|
|
18133
18136
|
static get cmpMeta() { return {
|
|
@@ -18143,7 +18146,7 @@ class Drawer {
|
|
|
18143
18146
|
"scrollLock": [4, "scroll-lock"],
|
|
18144
18147
|
"_closing": [32]
|
|
18145
18148
|
},
|
|
18146
|
-
"$listeners$":
|
|
18149
|
+
"$listeners$": [[8, "closeDrawer", "handleCloseDrawer"]],
|
|
18147
18150
|
"$lazyBundleId$": "-",
|
|
18148
18151
|
"$attrsToReflect$": []
|
|
18149
18152
|
}; }
|
|
@@ -20085,7 +20088,7 @@ class Label {
|
|
|
20085
20088
|
}; }
|
|
20086
20089
|
}
|
|
20087
20090
|
|
|
20088
|
-
const layoutComponentCss = "/*!@.relative*/.relative.sc-p-layout{position:relative!important}/*!@.sticky*/.sticky.sc-p-layout{position:sticky!important}/*!@.order-1*/.order-1.sc-p-layout{order:1!important}/*!@.order-2*/.order-2.sc-p-layout{order:2!important}/*!@.order-3*/.order-3.sc-p-layout{order:3!important}/*!@.box-border*/.box-border.sc-p-layout{box-sizing:border-box!important}/*!@.flex*/.flex.sc-p-layout{display:flex!important}/*!@.grid*/.grid.sc-p-layout{display:grid!important}/*!@.hidden*/.hidden.sc-p-layout{display:none!important}/*!@.h-full*/.h-full.sc-p-layout{height:100%!important}/*!@.h-screen*/.h-screen.sc-p-layout{height:100vh!important}/*!@.w-full*/.w-full.sc-p-layout{width:100%!important}/*!@.w-screen*/.w-screen.sc-p-layout{width:100vw!important}/*!@.w-
|
|
20091
|
+
const layoutComponentCss = "/*!@.relative*/.relative.sc-p-layout{position:relative!important}/*!@.sticky*/.sticky.sc-p-layout{position:sticky!important}/*!@.order-1*/.order-1.sc-p-layout{order:1!important}/*!@.order-2*/.order-2.sc-p-layout{order:2!important}/*!@.order-3*/.order-3.sc-p-layout{order:3!important}/*!@.box-border*/.box-border.sc-p-layout{box-sizing:border-box!important}/*!@.flex*/.flex.sc-p-layout{display:flex!important}/*!@.grid*/.grid.sc-p-layout{display:grid!important}/*!@.hidden*/.hidden.sc-p-layout{display:none!important}/*!@.h-full*/.h-full.sc-p-layout{height:100%!important}/*!@.h-screen*/.h-screen.sc-p-layout{height:100vh!important}/*!@.w-full*/.w-full.sc-p-layout{width:100%!important}/*!@.w-screen*/.w-screen.sc-p-layout{width:100vw!important}/*!@.w-unset*/.w-unset.sc-p-layout{width:unset!important}/*!@.flex-1*/.flex-1.sc-p-layout{flex:1 1 0%!important}/*!@.flex-col*/.flex-col.sc-p-layout{flex-direction:column!important}/*!@.content-start*/.content-start.sc-p-layout{align-content:flex-start!important}/*!@.items-center*/.items-center.sc-p-layout{align-items:center!important}/*!@.overflow-y-auto*/.overflow-y-auto.sc-p-layout{overflow-y:auto!important}/*!@.px-content-mobile-x*/.px-content-mobile-x.sc-p-layout{padding-left:1rem!important;padding-right:1rem!important}/*!@**/*.sc-p-layout{box-sizing:border-box}/*!@:host*/.sc-p-layout-h{align-content:flex-start;display:grid;gap:0;grid-template-areas:\"sidebar\" \"topbar\" \"content\";grid-template-columns:1fr;grid-template-rows:repeat(1fr,3);height:100vh;overflow:hidden;width:100vw}@media (min-width:80rem){/*!@:host*/.sc-p-layout-h{grid-template-areas:\"topbar topbar\" \"sidebar content\";grid-template-columns:auto 1fr;grid-template-rows:auto 1fr}}/*!@:host .content,:host .sidebar,:host .topbar*/.sc-p-layout-h .content.sc-p-layout,.sc-p-layout-h .sidebar.sc-p-layout,.sc-p-layout-h .topbar.sc-p-layout{align-self:flex-start}/*!@:host .topbar*/.sc-p-layout-h .topbar.sc-p-layout{grid-area:topbar;order:2;position:sticky;width:100%}@media (min-width:80rem){/*!@:host .topbar*/.sc-p-layout-h .topbar.sc-p-layout{order:1}}/*!@:host .sidebar*/.sc-p-layout-h .sidebar.sc-p-layout{box-sizing:border-box;display:flex;grid-area:sidebar;height:100%;order:1;width:100%}@media (min-width:80rem){/*!@:host .sidebar*/.sc-p-layout-h .sidebar.sc-p-layout{order:2;width:15rem}}@media (min-width:105rem){/*!@:host .sidebar*/.sc-p-layout-h .sidebar.sc-p-layout{width:18rem}}/*!@:host .content*/.sc-p-layout-h .content.sc-p-layout{display:flex;flex-direction:column;grid-area:content;height:100%;order:3;overflow-x:hidden;overflow-y:auto;padding:0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);position:relative}/*!@:host .content .inner-content*/.sc-p-layout-h .content.sc-p-layout .inner-content.sc-p-layout{padding:1.5rem 1rem;position:relative}@media (min-width:40rem){/*!@:host .content .inner-content*/.sc-p-layout-h .content.sc-p-layout .inner-content.sc-p-layout{padding:2rem}}@media (min-width:80rem){/*!@:host .content .inner-content*/.sc-p-layout-h .content.sc-p-layout .inner-content.sc-p-layout{padding:2rem 1.5rem 1.5rem;width:65rem}}@media (min-width:90rem){/*!@:host .content .inner-content*/.sc-p-layout-h .content.sc-p-layout .inner-content.sc-p-layout{padding:2rem;width:75rem}}@media (min-width:96rem){/*!@:host .content .inner-content*/.sc-p-layout-h .content.sc-p-layout .inner-content.sc-p-layout{width:81rem}}@media (min-width:105rem){/*!@:host .content .inner-content*/.sc-p-layout-h .content.sc-p-layout .inner-content.sc-p-layout{width:87rem}}@media (min-width:120rem){/*!@:host .content .inner-content*/.sc-p-layout-h .content.sc-p-layout .inner-content.sc-p-layout{padding-bottom:5rem;padding-left:5rem;padding-right:2rem;width:90rem}}@media (min-width:160rem){/*!@:host .content .inner-content*/.sc-p-layout-h .content.sc-p-layout .inner-content.sc-p-layout{padding-bottom:7.5rem;padding-left:7.5rem;padding-top:4rem;width:92.5rem}}/*!@:host(.variant-default) .content*/.variant-default.sc-p-layout-h .content.sc-p-layout{flex:1 1 0%}/*!@:host(.variant-login)*/.variant-login.sc-p-layout-h{grid-template-areas:\"topbar topbar\" \"content content\"}@media (min-width:80rem){/*!@:host(.variant-login)*/.variant-login.sc-p-layout-h{grid-template-areas:\"topbar topbar\" \"content sidebar\"}}/*!@:host(.variant-login) .sidebar*/.variant-login.sc-p-layout-h .sidebar.sc-p-layout{display:none;flex:1 1 0%;order:3;overflow:hidden;padding:.5rem;width:unset}@media (min-width:80rem){/*!@:host(.variant-login) .sidebar*/.variant-login.sc-p-layout-h .sidebar.sc-p-layout{display:flex}}/*!@:host(.variant-login) .sidebar .inner-content*/.variant-login.sc-p-layout-h .sidebar.sc-p-layout .inner-content.sc-p-layout{padding:.5rem}/*!@:host(.variant-login) .content*/.variant-login.sc-p-layout-h .content.sc-p-layout{align-items:center;order:3}@media (min-width:80rem){/*!@:host(.variant-login) .content*/.variant-login.sc-p-layout-h .content.sc-p-layout{justify-content:center;order:2}}/*!@:host(.variant-login) .content .inner-content*/.variant-login.sc-p-layout-h .content.sc-p-layout .inner-content.sc-p-layout{box-sizing:border-box;padding:calc(env(safe-area-inset-top) + 3.5rem) 1rem 1.5rem;width:100%}@media (min-width:64rem){/*!@:host(.variant-login) .content .inner-content*/.variant-login.sc-p-layout-h .content.sc-p-layout .inner-content.sc-p-layout{padding-bottom:0;padding-top:0}}@media (min-width:80rem){/*!@:host(.variant-login) .content .inner-content*/.variant-login.sc-p-layout-h .content.sc-p-layout .inner-content.sc-p-layout{padding-left:4.5rem;padding-right:4.5rem;padding-top:1.5rem}}@media (min-width:40rem){/*!@:host(.variant-login) .content .inner-content*/.variant-login.sc-p-layout-h .content.sc-p-layout .inner-content.sc-p-layout{width:30rem}}@media (min-width:80rem){/*!@.layout-1280\\:flex*/.layout-1280\\:flex.sc-p-layout{display:flex!important}/*!@.layout-1280\\:w-60*/.layout-1280\\:w-60.sc-p-layout{width:15rem!important}/*!@.layout-1280\\:w-content-1280*/.layout-1280\\:w-content-1280.sc-p-layout{width:65rem!important}/*!@.layout-1280\\:p-6*/.layout-1280\\:p-6.sc-p-layout{padding:1.5rem!important}/*!@.layout-1280\\:px-18*/.layout-1280\\:px-18.sc-p-layout{padding-left:4.5rem!important;padding-right:4.5rem!important}}@media (min-width:90rem){/*!@.layout-1440\\:w-content-1440*/.layout-1440\\:w-content-1440.sc-p-layout{width:75rem!important}}@media (min-width:120rem){/*!@.layout-1920\\:w-content-1920*/.layout-1920\\:w-content-1920.sc-p-layout{width:90rem!important}/*!@.layout-1920\\:pl-20*/.layout-1920\\:pl-20.sc-p-layout{padding-left:5rem!important}/*!@.layout-1920\\:pr-8*/.layout-1920\\:pr-8.sc-p-layout{padding-right:2rem!important}}@media (min-width:160rem){/*!@.layout-2560\\:w-content-2560*/.layout-2560\\:w-content-2560.sc-p-layout{width:92.5rem!important}/*!@.layout-2560\\:pb-\\[7\\.5rem\\]*/.layout-2560\\:pb-\\[7\\.5rem\\].sc-p-layout{padding-bottom:7.5rem!important}/*!@.layout-2560\\:pl-\\[7\\.5rem\\]*/.layout-2560\\:pl-\\[7\\.5rem\\].sc-p-layout{padding-left:7.5rem!important}/*!@.layout-2560\\:pt-16*/.layout-2560\\:pt-16.sc-p-layout{padding-top:4rem!important}}/*!@.static*/.static.sc-p-layout{position:static!important}";
|
|
20089
20092
|
|
|
20090
20093
|
class Layout {
|
|
20091
20094
|
constructor(hostRef) {
|
|
@@ -20219,6 +20222,9 @@ class Modal {
|
|
|
20219
20222
|
this.closed.emit();
|
|
20220
20223
|
}, 550);
|
|
20221
20224
|
}
|
|
20225
|
+
handleCloseModal() {
|
|
20226
|
+
this.close();
|
|
20227
|
+
}
|
|
20222
20228
|
get _el() { return getElement(this); }
|
|
20223
20229
|
static get cmpMeta() { return {
|
|
20224
20230
|
"$flags$": 9,
|
|
@@ -20236,7 +20242,7 @@ class Modal {
|
|
|
20236
20242
|
"padding": [4],
|
|
20237
20243
|
"_closing": [32]
|
|
20238
20244
|
},
|
|
20239
|
-
"$listeners$":
|
|
20245
|
+
"$listeners$": [[8, "closeModal", "handleCloseModal"]],
|
|
20240
20246
|
"$lazyBundleId$": "-",
|
|
20241
20247
|
"$attrsToReflect$": []
|
|
20242
20248
|
}; }
|
|
@@ -20426,7 +20432,7 @@ class ModalHeader {
|
|
|
20426
20432
|
}; }
|
|
20427
20433
|
}
|
|
20428
20434
|
|
|
20429
|
-
const navbarComponentCss = "/*!@.fixed*/.fixed.sc-p-navbar{position:fixed!important}/*!@.left-0*/.left-0.sc-p-navbar{left:0!important}/*!@.top-0*/.top-0.sc-p-navbar{top:0!important}/*!@.z-navbar*/.z-navbar.sc-p-navbar{z-index:300!important}/*!@.mt-auto*/.mt-auto.sc-p-navbar{margin-top:auto!important}/*!@.block*/.block.sc-p-navbar{display:block!important}/*!@.flex*/.flex.sc-p-navbar{display:flex!important}/*!@.hidden*/.hidden.sc-p-navbar{display:none!important}/*!@.h-screen*/.h-screen.sc-p-navbar{height:100vh!important}/*!@.w-60*/.w-60.sc-p-navbar{width:15rem!important}/*!@.w-full*/.w-full.sc-p-navbar{width:100%!important}/*!@.-translate-x-full*/.-translate-x-full.sc-p-navbar{--tw-translate-x:-100%!important;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}/*!@.transform-gpu*/.transform-gpu.sc-p-navbar{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) 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}/*!@.items-center*/.items-center.sc-p-navbar{align-items:center!important}/*!@.justify-between*/.justify-between.sc-p-navbar{justify-content:space-between!important}/*!@.border-0*/.border-0.sc-p-navbar{border-width:0!important}/*!@.border-b*/.border-b.sc-p-navbar{border-bottom-width:1px!important}/*!@.border-r*/.border-r.sc-p-navbar{border-right-width:1px!important}/*!@.border-solid*/.border-solid.sc-p-navbar{border-style:solid!important}/*!@.border-mystic-dark*/.border-mystic-dark.sc-p-navbar{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important}/*!@.px-4*/.px-4.sc-p-navbar{padding-left:1rem!important;padding-right:1rem!important}/*!@**/*.sc-p-navbar{box-sizing:border-box}/*!@:host*/.sc-p-navbar-h{max-height:calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));width:100%}@media (min-width:
|
|
20435
|
+
const navbarComponentCss = "/*!@.fixed*/.fixed.sc-p-navbar{position:fixed!important}/*!@.left-0*/.left-0.sc-p-navbar{left:0!important}/*!@.top-0*/.top-0.sc-p-navbar{top:0!important}/*!@.z-navbar*/.z-navbar.sc-p-navbar{z-index:300!important}/*!@.mt-auto*/.mt-auto.sc-p-navbar{margin-top:auto!important}/*!@.block*/.block.sc-p-navbar{display:block!important}/*!@.flex*/.flex.sc-p-navbar{display:flex!important}/*!@.hidden*/.hidden.sc-p-navbar{display:none!important}/*!@.h-screen*/.h-screen.sc-p-navbar{height:100vh!important}/*!@.w-60*/.w-60.sc-p-navbar{width:15rem!important}/*!@.w-full*/.w-full.sc-p-navbar{width:100%!important}/*!@.-translate-x-full*/.-translate-x-full.sc-p-navbar{--tw-translate-x:-100%!important;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}/*!@.transform-gpu*/.transform-gpu.sc-p-navbar{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) 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}/*!@.items-center*/.items-center.sc-p-navbar{align-items:center!important}/*!@.justify-between*/.justify-between.sc-p-navbar{justify-content:space-between!important}/*!@.border-0*/.border-0.sc-p-navbar{border-width:0!important}/*!@.border-b*/.border-b.sc-p-navbar{border-bottom-width:1px!important}/*!@.border-r*/.border-r.sc-p-navbar{border-right-width:1px!important}/*!@.border-solid*/.border-solid.sc-p-navbar{border-style:solid!important}/*!@.border-mystic-dark*/.border-mystic-dark.sc-p-navbar{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important}/*!@.px-4*/.px-4.sc-p-navbar{padding-left:1rem!important;padding-right:1rem!important}/*!@**/*.sc-p-navbar{box-sizing:border-box}/*!@:host*/.sc-p-navbar-h{max-height:calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));width:100%}@media (min-width:80rem){/*!@:host*/.sc-p-navbar-h{width:15rem}}@media (min-width:105rem){/*!@:host*/.sc-p-navbar-h{width:18rem}}/*!@:host .sidebar,:host .sidebar .company,:host .sidebar .content,:host .sidebar .user,:host .userbar*/.sc-p-navbar-h .sidebar.sc-p-navbar,.sc-p-navbar-h .sidebar.sc-p-navbar .company.sc-p-navbar,.sc-p-navbar-h .sidebar.sc-p-navbar .content.sc-p-navbar,.sc-p-navbar-h .sidebar.sc-p-navbar .user.sc-p-navbar,.sc-p-navbar-h .userbar.sc-p-navbar{display:flex;flex-direction:column;width:100%}/*!@:host .sidebar,:host .top-bar*/.sc-p-navbar-h .sidebar.sc-p-navbar,.sc-p-navbar-h .top-bar.sc-p-navbar{--tw-bg-opacity:1;--tw-border-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity));border-color:rgb(218 230 240/var(--tw-border-opacity))!important;border-style:solid!important;border-width:0!important}/*!@:host .sidebar*/.sc-p-navbar-h .sidebar.sc-p-navbar{--tw-bg-opacity:1;--tw-translate-x:-100%;background-color:rgb(255 255 255/var(--tw-bg-opacity));border-right-width:1px!important;gap:1.5rem;height:100vh;left:0;padding-bottom:1rem;padding-top:calc(env(safe-area-inset-top, 0) + 1rem);position:fixed;top:0;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));transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);width:15rem;will-change:transform;z-index:300}@media (min-width:80rem){/*!@:host .sidebar*/.sc-p-navbar-h .sidebar.sc-p-navbar{--tw-translate-x:0px;height:100%;position:relative;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));width:100%}}/*!@:host .sidebar .company,:host .sidebar .content,:host .sidebar .header,:host .sidebar .user*/.sc-p-navbar-h .sidebar.sc-p-navbar .company.sc-p-navbar,.sc-p-navbar-h .sidebar.sc-p-navbar .content.sc-p-navbar,.sc-p-navbar-h .sidebar.sc-p-navbar .header.sc-p-navbar,.sc-p-navbar-h .sidebar.sc-p-navbar .user.sc-p-navbar{padding-left:1rem;padding-right:1rem}/*!@:host .sidebar .header*/.sc-p-navbar-h .sidebar.sc-p-navbar .header.sc-p-navbar{align-items:center;display:flex;justify-content:space-between;width:100%}@media (min-width:80rem){/*!@:host .sidebar .header*/.sc-p-navbar-h .sidebar.sc-p-navbar .header.sc-p-navbar{display:none}}/*!@:host .sidebar .content*/.sc-p-navbar-h .sidebar.sc-p-navbar .content.sc-p-navbar{overflow-y:auto;scrollbar-color:#528afa #dae6f0;scrollbar-width:thin}/*!@:host .sidebar .content::-webkit-scrollbar*/.sc-p-navbar-h .sidebar.sc-p-navbar .content.sc-p-navbar::-webkit-scrollbar{width:.25rem}/*!@:host .sidebar .content::-webkit-scrollbar-track*/.sc-p-navbar-h .sidebar.sc-p-navbar .content.sc-p-navbar::-webkit-scrollbar-track{background:#dae6f0}/*!@:host .sidebar .content::-webkit-scrollbar-thumb*/.sc-p-navbar-h .sidebar.sc-p-navbar .content.sc-p-navbar::-webkit-scrollbar-thumb{background:#528afa}/*!@:host .sidebar .content::-webkit-scrollbar-thumb:hover*/.sc-p-navbar-h .sidebar.sc-p-navbar .content.sc-p-navbar::-webkit-scrollbar-thumb:hover{background:#528afa}/*!@:host .sidebar .user*/.sc-p-navbar-h .sidebar.sc-p-navbar .user.sc-p-navbar{display:none;margin-top:auto}@media (min-width:80rem){/*!@:host .sidebar .user*/.sc-p-navbar-h .sidebar.sc-p-navbar .user.sc-p-navbar{display:flex}}/*!@:host .sidebar.show*/.sc-p-navbar-h .sidebar.show.sc-p-navbar{--tw-translate-x:env(safe-area-inset-left,0)}/*!@:host .top-bar*/.sc-p-navbar-h .top-bar.sc-p-navbar{border-bottom-width:1px!important;display:flex;height:calc(env(safe-area-inset-top, 0) + 3rem);justify-content:space-between;padding:calc(env(safe-area-inset-top, 0) + .5rem) 1rem .5rem;width:100%}@media (min-width:80rem){/*!@:host .top-bar*/.sc-p-navbar-h .top-bar.sc-p-navbar{display:none}}/*!@:host p-backdrop*/.sc-p-navbar-h p-backdrop.sc-p-navbar{display:none}/*!@:host p-backdrop.show*/.sc-p-navbar-h p-backdrop.show.sc-p-navbar{display:block}@media (min-width:80rem){/*!@.layout-1280\\:relative*/.layout-1280\\:relative.sc-p-navbar{position:relative!important}/*!@.layout-1280\\:flex*/.layout-1280\\:flex.sc-p-navbar{display:flex!important}/*!@.layout-1280\\:hidden*/.layout-1280\\:hidden.sc-p-navbar{display:none!important}/*!@.layout-1280\\:h-full*/.layout-1280\\:h-full.sc-p-navbar{height:100%!important}/*!@.layout-1280\\:w-60*/.layout-1280\\:w-60.sc-p-navbar{width:15rem!important}}/*!@.static*/.static.sc-p-navbar{position:static!important}/*!@.z-navbar-backdrop*/.z-navbar-backdrop.sc-p-navbar{z-index:290!important}/*!@.m-0*/.m-0.sc-p-navbar{margin:0!important}/*!@.text-xl*/.text-xl.sc-p-navbar{font-size:1.25rem!important;line-height:1.75rem!important}/*!@.font-semibold*/.font-semibold.sc-p-navbar{font-weight:600!important}/*!@.text-storm-dark*/.text-storm-dark.sc-p-navbar{--tw-text-opacity:1!important;color:rgb(39 40 56/var(--tw-text-opacity))!important}@media (min-width:64rem){/*!@.desktop-xs\\:hidden*/.desktop-xs\\:hidden.sc-p-navbar{display:none!important}}";
|
|
20430
20436
|
|
|
20431
20437
|
class Navbar {
|
|
20432
20438
|
constructor(hostRef) {
|
|
@@ -21028,6 +21034,7 @@ class Select {
|
|
|
21028
21034
|
}
|
|
21029
21035
|
this.value = value;
|
|
21030
21036
|
if (!value.length) {
|
|
21037
|
+
this._selectedItem = [];
|
|
21031
21038
|
return;
|
|
21032
21039
|
}
|
|
21033
21040
|
this._selectedItem =
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,h as a,H as e}from"./p-e4d5e7a7.js";const r=".fixed{position:fixed!important}.left-0{left:0!important}.top-0{top:0!important}.z-navbar{z-index:300!important}.mt-auto{margin-top:auto!important}.block{display:block!important}.flex{display:flex!important}.hidden{display:none!important}.h-screen{height:100vh!important}.w-60{width:15rem!important}.w-full{width:100%!important}.-translate-x-full{--tw-translate-x:-100%!important;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}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) 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}.items-center{align-items:center!important}.justify-between{justify-content:space-between!important}.border-0{border-width:0!important}.border-b{border-bottom-width:1px!important}.border-r{border-right-width:1px!important}.border-solid{border-style:solid!important}.border-mystic-dark{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important}.px-4{padding-left:1rem!important;padding-right:1rem!important}*{box-sizing:border-box}:host{max-height:calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));width:100%}@media (min-width:64rem){:host{width:15rem}}:host .sidebar,:host .sidebar .company,:host .sidebar .content,:host .sidebar .user,:host .userbar{display:flex;flex-direction:column;width:100%}:host .sidebar,:host .top-bar{--tw-bg-opacity:1;--tw-border-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity));border-color:rgb(218 230 240/var(--tw-border-opacity))!important;border-style:solid!important;border-width:0!important}:host .sidebar{--tw-bg-opacity:1;--tw-translate-x:-100%;background-color:rgb(255 255 255/var(--tw-bg-opacity));border-right-width:1px!important;gap:1.5rem;height:100vh;left:0;padding-bottom:1rem;padding-top:calc(env(safe-area-inset-top, 0) + 1rem);position:fixed;top:0;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));transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);width:15rem;will-change:transform;z-index:300}@media (min-width:64rem){:host .sidebar{--tw-translate-x:0px;height:100%;position:relative;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));width:100%}}:host .sidebar .company,:host .sidebar .content,:host .sidebar .header,:host .sidebar .user{padding-left:1rem;padding-right:1rem}:host .sidebar .header{align-items:center;display:flex;justify-content:space-between;width:100%}@media (min-width:64rem){:host .sidebar .header{display:none}}:host .sidebar .content{overflow-y:auto;scrollbar-color:#528afa #dae6f0;scrollbar-width:thin}:host .sidebar .content::-webkit-scrollbar{width:.25rem}:host .sidebar .content::-webkit-scrollbar-track{background:#dae6f0}:host .sidebar .content::-webkit-scrollbar-thumb{background:#528afa}:host .sidebar .content::-webkit-scrollbar-thumb:hover{background:#528afa}:host .sidebar .user{display:none;margin-top:auto}@media (min-width:64rem){:host .sidebar .user{display:flex}}:host .sidebar.show{--tw-translate-x:env(safe-area-inset-left,0)}:host .top-bar{border-bottom-width:1px!important;display:flex;height:calc(env(safe-area-inset-top, 0) + 3rem);justify-content:space-between;padding:calc(env(safe-area-inset-top, 0) + .5rem) 1rem .5rem;width:100%}@media (min-width:64rem){:host .top-bar{display:none}}:host p-backdrop{display:none}:host p-backdrop.show{display:block}@media (min-width:64rem){.desktop-xs\\:relative{position:relative!important}.desktop-xs\\:flex{display:flex!important}.desktop-xs\\:hidden{display:none!important}.desktop-xs\\:h-full{height:100%!important}}.static{position:static!important}.z-navbar-backdrop{z-index:290!important}.m-0{margin:0!important}.text-xl{font-size:1.25rem!important;line-height:1.75rem!important}.font-semibold{font-weight:600!important}.text-storm-dark{--tw-text-opacity:1!important;color:rgb(39 40 56/var(--tw-text-opacity))!important}";const o=class{constructor(a){t(this,a);this.closeText="Close";this.menuText="Menu";this._showMenu=false}render(){return a(e,{class:"p-navbar"},a("p-backdrop",{applyBlur:true,class:`z-navbar-backdrop desktop-xs:hidden ${this._showMenu&&"show"}`,onClicked:()=>this._showMenu=false}),a("div",{class:`sidebar ${this._showMenu&&"show"}`},a("div",{class:"header"},a("p",{class:"text-xl m-0 font-semibold text-storm-dark"},this.menuText),a("p-button",{variant:"secondary",icon:"negative",iconPosition:"end",size:"small",onClick:()=>this._showMenu=false},this.closeText)),a("div",{class:"company"},a("slot",{name:"company"})),a("div",{class:"content"},a("slot",{name:"content"})),a("div",{class:"user"},a("slot",{name:"user"}))),a("div",{class:"top-bar"},a("p-button",{variant:"secondary",icon:"menu",size:"small",onClick:()=>this._showMenu=true},this.menuText),a("slot",{name:"topbar"})))}handleCloseNavbar(){this._showMenu=false}handleOpenNavbar(){this._showMenu=true}};o.style=r;export{o as p_navbar};
|
|
2
|
-
//# sourceMappingURL=p-03090f03.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["navbarComponentCss","Navbar","render","h","Host","class","applyBlur","this","_showMenu","onClicked","menuText","variant","icon","iconPosition","size","onClick","closeText","name","handleCloseNavbar","handleOpenNavbar"],"sources":["src/components/organisms/navbar/navbar.component.scss?tag=p-navbar&encapsulation=shadow","src/components/organisms/navbar/navbar.component.tsx"],"sourcesContent":["@import '../../../style/mixins';\n\n:host {\n\t@apply w-full max-h-screen-safe;\n\t@apply desktop-xs:w-60;\n\n\t.sidebar,\n\t.sidebar .company,\n\t.sidebar .content,\n\t.sidebar .user,\n\t.userbar {\n\t\t@apply flex w-full flex-col;\n\t}\n\n\t.sidebar,\n\t.top-bar {\n\t\t@apply bg-white;\n\t\t@apply border-0 border-solid border-mystic-dark #{!important};\n\t}\n\n\t.sidebar {\n\t\t@apply fixed top-0 left-0 z-navbar h-screen w-60 bg-white;\n\t\t@apply desktop-xs:relative desktop-xs:h-full desktop-xs:w-full;\n\t\t@apply gap-6;\n\n\t\t@apply will-change-transform;\n\t\t@apply -translate-x-full transform-gpu desktop-xs:translate-x-0;\n\n\t\t@apply py-4;\n\n\t\tpadding-top: calc(env(safe-area-inset-top, 0) + 1rem);\n\n\t\t@apply border-r #{!important};\n\n\t\t@apply transition-all;\n\n\t\t.company,\n\t\t.content,\n\t\t.user,\n\t\t.header {\n\t\t\t@apply px-4;\n\t\t}\n\n\t\t.header {\n\t\t\t@apply flex w-full items-center justify-between;\n\t\t\t@apply desktop-xs:hidden;\n\t\t}\n\n\t\t.content {\n\t\t\t@apply overflow-y-auto;\n\n\t\t\t@include scrollbarY();\n\t\t}\n\n\t\t.user {\n\t\t\t@apply mt-auto hidden;\n\t\t\t@apply desktop-xs:flex;\n\t\t}\n\n\t\t&.show {\n\t\t\t--tw-translate-x: env(safe-area-inset-left, 0);\n\t\t}\n\t}\n\n\t.top-bar {\n\t\t@apply flex w-full justify-between px-4 py-2;\n\n\t\tpadding-top: calc(env(safe-area-inset-top, 0) + 0.5rem);\n\t\theight: calc(env(safe-area-inset-top, 0) + 3rem);\n\n\t\t@apply border-b #{!important};\n\n\t\t@apply desktop-xs:hidden;\n\t}\n\n\tp-backdrop {\n\t\t@apply hidden;\n\n\t\t&.show {\n\t\t\t@apply block;\n\t\t}\n\t}\n}\n","import { Component, h, Host, Listen, Prop, State } from '@stencil/core';\n\n@Component({\n\ttag: 'p-navbar',\n\tstyleUrl: 'navbar.component.scss',\n\tshadow: true,\n})\nexport class Navbar {\n\t/**\n\t * The text to display for the close button\n\t */\n\t@Prop() closeText = 'Close';\n\n\t/**\n\t * The text to display for the menu button & sidebar title\n\t */\n\t@Prop() menuText = 'Menu';\n\n\t@State() private _showMenu = false;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-navbar\">\n\t\t\t\t<p-backdrop\n\t\t\t\t\tapplyBlur={true}\n\t\t\t\t\tclass={`z-navbar-backdrop desktop-xs:hidden ${\n\t\t\t\t\t\tthis._showMenu && 'show'\n\t\t\t\t\t}`}\n\t\t\t\t\tonClicked={() => (this._showMenu = false)}\n\t\t\t\t></p-backdrop>\n\t\t\t\t<div class={`sidebar ${this._showMenu && 'show'}`}>\n\t\t\t\t\t<div class=\"header\">\n\t\t\t\t\t\t<p class=\"text-xl m-0 font-semibold text-storm-dark\">\n\t\t\t\t\t\t\t{this.menuText}\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<p-button\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\ticon=\"negative\"\n\t\t\t\t\t\t\ticonPosition=\"end\"\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tonClick={() => (this._showMenu = false)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this.closeText}\n\t\t\t\t\t\t</p-button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"company\">\n\t\t\t\t\t\t<slot name=\"company\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"content\">\n\t\t\t\t\t\t<slot name=\"content\" />\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"user\">\n\t\t\t\t\t\t<slot name=\"user\" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"top-bar\">\n\t\t\t\t\t<p-button\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\ticon=\"menu\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tonClick={() => (this._showMenu = true)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.menuText}\n\t\t\t\t\t</p-button>\n\n\t\t\t\t\t<slot name=\"topbar\" />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('closeNavbar', { target: 'window' })\n\thandleCloseNavbar() {\n\t\tthis._showMenu = false;\n\t}\n\n\t@Listen('openNavbar', { target: 'window' })\n\thandleOpenNavbar() {\n\t\tthis._showMenu = true;\n\t}\n}\n"],"mappings":"kDAAA,MAAMA,EAAqB,y9I,MCOdC,EAAM,M,wCAIE,Q,cAKD,O,eAEU,K,CAE7B,MAAAC,GACC,OACCC,EAACC,EAAI,CAACC,MAAM,YACXF,EAAA,cACCG,UAAW,KACXD,MAAO,uCACNE,KAAKC,WAAa,SAEnBC,UAAW,IAAOF,KAAKC,UAAY,QAEpCL,EAAA,OAAKE,MAAO,WAAWE,KAAKC,WAAa,UACxCL,EAAA,OAAKE,MAAM,UACVF,EAAA,KAAGE,MAAM,6CACPE,KAAKG,UAGPP,EAAA,YACCQ,QAAQ,YACRC,KAAK,WACLC,aAAa,MACbC,KAAK,QACLC,QAAS,IAAOR,KAAKC,UAAY,OAEhCD,KAAKS,YAGRb,EAAA,OAAKE,MAAM,WACVF,EAAA,QAAMc,KAAK,aAEZd,EAAA,OAAKE,MAAM,WACVF,EAAA,QAAMc,KAAK,aAGZd,EAAA,OAAKE,MAAM,QACVF,EAAA,QAAMc,KAAK,WAIbd,EAAA,OAAKE,MAAM,WACVF,EAAA,YACCQ,QAAQ,YACRC,KAAK,OACLE,KAAK,QACLC,QAAS,IAAOR,KAAKC,UAAY,MAEhCD,KAAKG,UAGPP,EAAA,QAAMc,KAAK,Y,CAOf,iBAAAC,GACCX,KAAKC,UAAY,K,CAIlB,gBAAAW,GACCZ,KAAKC,UAAY,I"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,H as i}from"./p-e4d5e7a7.js";const n='.relative{position:relative!important}.sticky{position:sticky!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.box-border{box-sizing:border-box!important}.flex{display:flex!important}.grid{display:grid!important}.hidden{display:none!important}.h-full{height:100%!important}.h-screen{height:100vh!important}.w-full{width:100%!important}.w-screen{width:100vw!important}.w-sidebar-mobile{width:100%!important}.w-unset{width:unset!important}.flex-1{flex:1 1 0%!important}.flex-col{flex-direction:column!important}.content-start{align-content:flex-start!important}.items-center{align-items:center!important}.overflow-y-auto{overflow-y:auto!important}.px-content-mobile-x{padding-left:1rem!important;padding-right:1rem!important}*{box-sizing:border-box}:host{align-content:flex-start;display:grid;gap:0;grid-template-areas:"sidebar" "topbar" "content";grid-template-columns:1fr;grid-template-rows:repeat(1fr,3);height:100vh;overflow:hidden;width:100vw}@media (min-width:64rem){:host{grid-template-areas:"topbar topbar" "sidebar content";grid-template-columns:auto 1fr;grid-template-rows:auto 1fr}}:host .content,:host .sidebar,:host .topbar{align-self:flex-start}:host .topbar{grid-area:topbar;order:2;position:sticky;width:100%}@media (min-width:80rem){:host .topbar{order:1}}:host .sidebar{box-sizing:border-box;display:flex;grid-area:sidebar;height:100%;order:1;width:100%}@media (min-width:80rem){:host .sidebar{order:2;width:15rem}}:host .content{display:flex;flex-direction:column;grid-area:content;height:100%;order:3;overflow-x:hidden;overflow-y:auto;padding:0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);position:relative}:host .content .inner-content{padding:1.5rem 1rem;position:relative}@media (min-width:64rem){:host .content .inner-content{padding:2rem;width:100%}}@media (min-width:80rem){:host .content .inner-content{width:100%}}@media (min-width:85.375rem){:host .content .inner-content{width:69rem}}@media (min-width:90rem){:host .content .inner-content{width:69rem}}@media (min-width:120rem){:host .content .inner-content{width:69rem}}:host(.variant-default) .content{flex:1 1 0%}:host(.variant-login){grid-template-areas:"topbar topbar" "content content"}@media (min-width:64rem){:host(.variant-login){grid-template-areas:"topbar topbar" "content sidebar"}}:host(.variant-login) .sidebar{display:none;flex:1 1 0%;order:3;overflow:hidden;padding:.5rem;width:unset}@media (min-width:64rem){:host(.variant-login) .sidebar{display:flex}}:host(.variant-login) .sidebar .inner-content{padding:.5rem}:host(.variant-login) .content{align-items:center;order:3}@media (min-width:64rem){:host(.variant-login) .content{justify-content:center;order:2}}:host(.variant-login) .content .inner-content{box-sizing:border-box;padding:calc(env(safe-area-inset-top) + 3.5rem) 1rem 1.5rem;width:100%}@media (min-width:64rem){:host(.variant-login) .content .inner-content{padding:1.5rem 4.5rem 0}}@media (min-width:40rem){:host(.variant-login) .content .inner-content{width:30rem}}@media (min-width:80rem){:host(.variant-office) .sidebar{width:19.5rem}}@media (min-width:64rem){.desktop-xs\\:flex{display:flex!important}.desktop-xs\\:w-content-desktop-xs{width:100%!important}.desktop-xs\\:px-18{padding-left:4.5rem!important;padding-right:4.5rem!important}.desktop-xs\\:px-content-desktop-x{padding-left:2rem!important;padding-right:2rem!important}}@media (min-width:80rem){.desktop-sm\\:w-content-desktop-sm{width:100%!important}}@media (min-width:85.375rem){.desktop\\:w-content-desktop{width:69rem!important}}@media (min-width:90rem){.desktop-lg\\:w-content-desktop-lg{width:69rem!important}}.static{position:static!important}';const r=class{constructor(e){t(this,e);this.variant="default"}render(){return e(i,{class:`p-layout variant-${this.variant}`},e("div",{class:"topbar"},e("slot",{name:"topbar"})),e("div",{class:"sidebar"},e("slot",{name:"sidebar"})),e("div",{class:"content"},e("div",{class:"inner-content"},e("slot",{name:"content"}))))}};r.style=n;export{r as p_layout};
|
|
2
|
-
//# sourceMappingURL=p-46a939e2.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["layoutComponentCss","Layout","render","h","Host","class","this","variant","name"],"sources":["src/components/atoms/layout/layout.component.scss?tag=p-layout&encapsulation=shadow","src/components/atoms/layout/layout.component.tsx"],"sourcesContent":[":host {\n\t@apply grid h-screen w-screen content-start overflow-hidden;\n\n\tgrid-template-columns: 1fr;\n\tgrid-template-rows: repeat(1fr, 3);\n\tgap: 0;\n\tgrid-template-areas:\n\t\t'sidebar'\n\t\t'topbar'\n\t\t'content';\n\n\t@screen desktop-xs {\n\t\tgrid-template-columns: auto 1fr;\n\t\tgrid-template-rows: auto 1fr;\n\t\tgrid-template-areas:\n\t\t\t'topbar topbar'\n\t\t\t'sidebar content';\n\t}\n\n\t.topbar,\n\t.sidebar,\n\t.content {\n\t\t@apply self-start;\n\t}\n\n\t.topbar {\n\t\tgrid-area: topbar;\n\n\t\t@apply sticky w-full;\n\t\t@apply order-2 desktop-sm:order-1;\n\t}\n\n\t.sidebar {\n\t\tgrid-area: sidebar;\n\n\t\t@apply box-border flex h-full;\n\t\t@apply w-sidebar-mobile desktop-sm:w-sidebar-desktop;\n\t\t@apply order-1 desktop-sm:order-2;\n\t}\n\n\t.content {\n\t\tgrid-area: content;\n\n\t\t@apply relative flex h-full flex-col overflow-y-auto overflow-x-hidden;\n\t\t@apply order-3;\n\n\t\tpadding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom)\n\t\t\tenv(safe-area-inset-left);\n\n\t\t.inner-content {\n\t\t\t@apply relative pb-24;\n\n\t\t\t@apply px-content-mobile-x py-content-mobile-y;\n\t\t\t@apply desktop-xs:px-content-desktop-x desktop-xs:py-content-desktop-y;\n\n\t\t\t@apply desktop-xs:w-content-desktop-xs desktop-sm:w-content-desktop-sm desktop:w-content-desktop desktop-lg:w-content-desktop-lg desktop-xl:w-content-desktop-xl;\n\t\t}\n\t}\n}\n\n:host(.variant-default) {\n\t.content {\n\t\t@apply flex-1;\n\t}\n}\n\n:host(.variant-login) {\n\tgrid-template-areas:\n\t\t'topbar topbar'\n\t\t'content content';\n\n\t@screen desktop-xs {\n\t\tgrid-template-areas:\n\t\t\t'topbar topbar'\n\t\t\t'content sidebar';\n\t}\n\n\t.sidebar {\n\t\t@apply hidden w-unset desktop-xs:flex;\n\t\t@apply order-3 p-2;\n\t\t@apply flex-1 overflow-hidden;\n\n\t\t.inner-content {\n\t\t\t@apply p-2;\n\t\t}\n\t}\n\n\t.content {\n\t\t@apply order-3 desktop-xs:order-2;\n\t\t@apply items-center desktop-xs:justify-center;\n\n\t\t.inner-content {\n\t\t\t@apply box-border;\n\t\t\t@apply desktop-xs:px-18 desktop-xs:py-0;\n\t\t\t@apply w-full tablet:w-content-desktop-login;\n\n\t\t\t@apply px-content-mobile-x py-content-mobile-y;\n\t\t\tpadding-top: calc(env(safe-area-inset-top) + 3.5rem);\n\n\t\t\t@screen desktop-xs {\n\t\t\t\t@apply pt-content-mobile-y;\n\t\t\t}\n\t\t}\n\t}\n}\n\n:host(.variant-office) {\n\t.sidebar {\n\t\t@apply desktop-sm:w-sidebar-office-desktop;\n\t}\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n\ttag: 'p-layout',\n\tstyleUrl: 'layout.component.scss',\n\tshadow: true,\n})\nexport class Layout {\n\t/**\n\t * Variant of the layout\n\t */\n\t@Prop() variant: 'default' | 'login' | 'office' = 'default';\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={`p-layout variant-${this.variant}`}>\n\t\t\t\t<div class=\"topbar\">\n\t\t\t\t\t<slot name=\"topbar\" />\n\t\t\t\t</div>\n\t\t\t\t<div class=\"sidebar\">\n\t\t\t\t\t<slot name=\"sidebar\" />\n\t\t\t\t</div>\n\t\t\t\t<div class=\"content\">\n\t\t\t\t\t<div class=\"inner-content\">\n\t\t\t\t\t\t<slot name=\"content\" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"mappings":"kDAAA,MAAMA,EAAqB,ynH,MCOdC,EAAM,M,sCAIgC,S,CAElD,MAAAC,GACC,OACCC,EAACC,EAAI,CAACC,MAAO,oBAAoBC,KAAKC,WACrCJ,EAAA,OAAKE,MAAM,UACVF,EAAA,QAAMK,KAAK,YAEZL,EAAA,OAAKE,MAAM,WACVF,EAAA,QAAMK,KAAK,aAEZL,EAAA,OAAKE,MAAM,WACVF,EAAA,OAAKE,MAAM,iBACVF,EAAA,QAAMK,KAAK,c"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["selectComponentCss","Select","_items","this","items","loading","JSON","parse","displayKey","valueKey","map","str","value","text","_a","query","length","asyncFilter","filter","item","queryKey","_checkvalue","_identifierKey","slice","maxDisplayedItems","_displayValue","multi","_selectedItem","_b","i","_c","_d","selectionDisplayKey","identifierKey","componentDidLoad","Error","_setMultiContainerMaxWidth","_resizeObserver","ResizeObserver","_resizeDebounceTimer","clearTimeout","setTimeout","_checkSelectedItems","observe","_el","_valueChange","itemChanges","componentDidRender","disconnectedCallback","disconnect","render","h","Host","class","disableTriggerClick","calculateWidth","insideClick","scrollable","show","_showDropdown","onIsOpen","ev","_onDropdownOpen","slot","icon","size","prefix","label","helper","required","error","disabled","focused","focusMethod","type","placeholder","onFocus","_onFocus","onMouseDown","_onMouseDown","onClick","_onClick","ref","_inputRef","showChevron","variant","_getLoadingItems","_getItems","showAddItem","_getAddItem","_multiContainerRef","_selectValue","_amountHidden","documentClickHandler","target","childOf","_preselectItem","_showDropdownChanges","dropdownShown","emit","multiChanges","Array","isArray","valueChange","includes","autoSelectFirst","identifier","parsedValue","stringify","currentValue","currentParsedValue","find","itemIdentifier","parsedItemIdentifier","forceBlur","selectedItem","valueArray","includesIndex","findIndex","push","splice","_onBlur","preventDefault","blur","enableAutocomplete","force","_onAutoComplete","queryChange","key","toString","toLowerCase","indexOf","active","avatarKey","src","letters","avatarLettersKey","dropdownDisplayKey","emptyStateText","enableSelectAll","unshift","_selectAllChange","_allSelected","selectAllIcon","selectAllText","_getAutoCompleteItem","add","addItemText","enableHover","autocompletePlaceholder","onInput","autocompleteInputRef","style","maxWidth","clientWidth","containerRect","getBoundingClientRect","from","querySelectorAll","amountHidden","child","classList","remove","childRect","right","extra","querySelector","contains","detail","focus","selectAllChange"],"sources":["src/components/molecules/select/select.component.scss?tag=p-select","src/components/molecules/select/select.component.tsx"],"sourcesContent":["@import '../../../style/form/mixins';\n\np-select {\n\t@apply flex w-full flex-col relative text-ellipsis;\n\n\t.p-input {\n\t\t@include inputDefaultState();\n\t}\n\n\t.multi-container {\n\t\t@apply absolute bottom-0 left-0 h-10 flex gap-2 items-center px-2 py-4 overflow-hidden pointer-events-none w-full;\n\n\t\t&.size-small {\n\t\t\t@apply px-1 py-2 h-8;\n\t\t}\n\n\t\t.item {\n\t\t\t@apply bg-indigo-light rounded px-2 flex gap-2 items-center cursor-pointer text-indigo-dark h-[1.625rem] text-sm font-semibold pointer-events-auto whitespace-nowrap;\n\n\t\t\tp-icon {\n\t\t\t\t@apply text-indigo text-xs;\n\t\t\t}\n\t\t}\n\n\t\t.extra {\n\t\t\t@apply text-sm text-storm-medium pointer-events-none;\n\t\t}\n\t}\n}\n","import {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tState,\n\tWatch,\n} from '@stencil/core';\n\nimport { childOf } from '../../../utils';\nimport { IconVariant } from '../../atoms/icon/icon.component';\n\n@Component({\n\ttag: 'p-select',\n\tstyleUrl: 'select.component.scss',\n\tshadow: false,\n})\nexport class Select {\n\t/**\n\t * The items to show in the dropdown\n\t */\n\t@Prop() items: string | any[];\n\n\t/**\n\t * Wether to enable multi select\n\t */\n\t@Prop({ reflect: true }) multi: boolean;\n\n\t/**\n\t * Icon of the select box\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * The current query\n\t */\n\t@Prop() query: string;\n\n\t/**\n\t * The placeholder of the input\n\t */\n\t@Prop() placeholder: string;\n\n\t/**\n\t * The placeholder of the input used for auto complete\n\t */\n\t@Prop() autocompletePlaceholder: string = 'Search...';\n\n\t/**\n\t * The current value\n\t */\n\t@Prop() value: any;\n\n\t/**\n\t * The key of the object to display\n\t */\n\t@Prop() displayKey: string = 'text';\n\n\t/**\n\t * The key of the object to display in the dropdown (overwrites displayKey)\n\t */\n\t@Prop() dropdownDisplayKey: string | undefined;\n\n\t/**\n\t * The key of the object to display in the input (overwrites displayKey)\n\t */\n\t@Prop() selectionDisplayKey: string | undefined;\n\n\t/**\n\t * The key of the object to return\n\t */\n\t@Prop() valueKey: string;\n\n\t/**\n\t * The key of avatar within an item to show\n\t */\n\t@Prop() avatarKey: string;\n\n\t/**\n\t * The key of avatar letters within an item to show when the avatar url doesn't work\n\t */\n\t@Prop() avatarLettersKey: string;\n\n\t/**\n\t * The key to identify an object\n\t */\n\t@Prop() identifierKey: string;\n\n\t/**\n\t * The key of the object to display\n\t */\n\t@Prop() queryKey?: string;\n\n\t/**\n\t * Wether to automatically select the first item\n\t */\n\t@Prop() autoSelectFirst: boolean = true;\n\n\t/**\n\t * Wether to show the chevron or not\n\t */\n\t@Prop() showChevron: boolean = true;\n\n\t/**\n\t * The maximum amount of items to display\n\t */\n\t@Prop() maxDisplayedItems: number = 10;\n\n\t/**\n\t * Wether to enable autocomplete\n\t */\n\t@Prop() enableAutocomplete: boolean = true;\n\n\t/**\n\t * Wether the input uses async filtering\n\t */\n\t@Prop() asyncFilter: boolean = false;\n\n\t/**\n\t * Wether to show loading items\n\t */\n\t@Prop() loading: boolean = false;\n\n\t/**\n\t * Wether to show the select all item with multi select\n\t */\n\t@Prop() enableSelectAll: boolean = false;\n\n\t/**\n\t * The text of the select all item\n\t */\n\t@Prop() selectAllText: string = 'Select all';\n\n\t/**\n\t * The icon to prefix for select all\n\t */\n\t@Prop() selectAllIcon: IconVariant | undefined;\n\n\t/**\n\t * Event when the query of the autocomplete changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tqueryChange: EventEmitter<string>;\n\n\t/**\n\t * Event when the value changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tvalueChange: EventEmitter<any>;\n\n\t/**\n\t * Event when the select all item has been selected or not\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tselectAllChange: EventEmitter<any>;\n\n\t/**\n\t * Event when the dropdown shows\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tdropdownShown: EventEmitter<any>;\n\n\t/**\n\t * The size of the input group used by the select\n\t */\n\t@Prop() size: 'small' | 'medium' = 'medium';\n\n\t/**\n\t * The prefix of the input group used by the select\n\t */\n\t@Prop() prefix: string;\n\n\t/**\n\t * The label of the input group used by the select\n\t */\n\t@Prop() label: string;\n\n\t/**\n\t * The helper of the input group used by the select\n\t */\n\t@Prop() helper: string;\n\n\t/**\n\t * Wether the field is required\n\t */\n\t@Prop({ reflect: true }) required: boolean;\n\n\t/**\n\t * The helper of the input group used by the select\n\t */\n\t@Prop({ reflect: true }) error: string;\n\n\t/**\n\t * Wether the input group is disabled used by the select\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether to show a \"add\" item\n\t */\n\t@Prop() showAddItem: boolean = false;\n\n\t/**\n\t * The text to show when add item is being shown\n\t */\n\t@Prop() addItemText: string = 'Add item';\n\n\t/**\n\t * Event when the add item is clicked\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tadd: EventEmitter;\n\n\t/**\n\t * The text to show when items is empty\n\t */\n\t@Prop() emptyStateText: string = 'No items available';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _showDropdown: any = false;\n\t@State() private _selectedItem: any = null;\n\n\t@State() private _allSelected: boolean = false;\n\n\t@State() private _amountHidden = 0;\n\n\tprivate _inputRef: HTMLInputElement;\n\tprivate autocompleteInputRef: HTMLInputElement;\n\tprivate _multiContainerRef: HTMLElement;\n\n\tprivate _resizeObserver: ResizeObserver;\n\tprivate _resizeDebounceTimer: NodeJS.Timer;\n\n\tget _items() {\n\t\tif (!this.items || this.loading) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet items =\n\t\t\ttypeof this.items === 'string'\n\t\t\t\t? JSON.parse(this.items)\n\t\t\t\t: this.items;\n\n\t\tif (typeof items?.[0] === 'string') {\n\t\t\tthis.displayKey = 'text';\n\t\t\tthis.valueKey = 'value';\n\n\t\t\titems = items.map((str) => ({\n\t\t\t\tvalue: str,\n\t\t\t\ttext: str,\n\t\t\t}));\n\t\t}\n\n\t\tif (this.query?.length && !this.asyncFilter) {\n\t\t\titems = items.filter((item) => {\n\t\t\t\tif (this.queryKey) {\n\t\t\t\t\treturn this._checkvalue(this.queryKey, item);\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\tthis._checkvalue(this._identifierKey, item) ||\n\t\t\t\t\tthis._checkvalue(this.displayKey, item)\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\n\t\treturn items?.slice(0, this.maxDisplayedItems);\n\t}\n\n\tget _displayValue() {\n\t\tif (this.multi) {\n\t\t\tif (!this._selectedItem?.length) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\treturn this._selectedItem\n\t\t\t\t?.map((i) => i?.[this.displayKey])\n\t\t\t\t.filter((i) => !!i);\n\t\t}\n\n\t\treturn this._selectedItem?.[\n\t\t\tthis.selectionDisplayKey ?? this.displayKey\n\t\t];\n\t}\n\n\tget _identifierKey() {\n\t\treturn this.identifierKey ?? this.valueKey ?? 'value';\n\t}\n\n\tcomponentDidLoad() {\n\t\tif (!this.valueKey && !this.identifierKey) {\n\t\t\tthrow new Error('You must provide a valueKey or identifierKey');\n\t\t}\n\n\t\tif (this.multi) {\n\t\t\tthis._setMultiContainerMaxWidth();\n\n\t\t\tthis._resizeObserver = new ResizeObserver(() => {\n\t\t\t\tif (this._resizeDebounceTimer) {\n\t\t\t\t\tclearTimeout(this._resizeDebounceTimer);\n\t\t\t\t\tthis._resizeDebounceTimer = null;\n\t\t\t\t}\n\n\t\t\t\tthis._resizeDebounceTimer = setTimeout(() => {\n\t\t\t\t\tthis._setMultiContainerMaxWidth();\n\t\t\t\t\tthis._checkSelectedItems();\n\t\t\t\t}, 200);\n\t\t\t});\n\t\t\tthis._resizeObserver.observe(this._el);\n\t\t}\n\n\t\tif (this.value) {\n\t\t\tthis._valueChange();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.itemChanges();\n\t}\n\n\tcomponentDidRender() {\n\t\tif (this.multi) {\n\t\t\tthis._setMultiContainerMaxWidth();\n\t\t\tthis._checkSelectedItems();\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tif (this.multi) {\n\t\t\tthis._resizeObserver.disconnect();\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-select\">\n\t\t\t\t<p-dropdown\n\t\t\t\t\tdisableTriggerClick={true}\n\t\t\t\t\tcalculateWidth={true}\n\t\t\t\t\tinsideClick={true}\n\t\t\t\t\tscrollable={true}\n\t\t\t\t\tshow={this._showDropdown}\n\t\t\t\t\tonIsOpen={(ev) => this._onDropdownOpen(ev)}\n\t\t\t\t>\n\t\t\t\t\t<p-input-group\n\t\t\t\t\t\tslot=\"trigger\"\n\t\t\t\t\t\ticon={this.icon}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\tprefix={this.prefix}\n\t\t\t\t\t\tlabel={this.label}\n\t\t\t\t\t\thelper={this.helper}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\terror={this.error}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tfocused={this._showDropdown}\n\t\t\t\t\t\tfocusMethod=\"click\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tslot=\"input\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tthis.multi && this._displayValue?.length\n\t\t\t\t\t\t\t\t\t? ' '\n\t\t\t\t\t\t\t\t\t: this._displayValue\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tclass=\"p-input cursor-pointer read-only\"\n\t\t\t\t\t\t\tonFocus={(ev) => this._onFocus(ev)}\n\t\t\t\t\t\t\tonMouseDown={(ev) => this._onMouseDown(ev)}\n\t\t\t\t\t\t\tonClick={() => this._onClick()}\n\t\t\t\t\t\t\tref={(ref) => (this._inputRef = ref)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t{this.showChevron && (\n\t\t\t\t\t\t\t<p-icon variant=\"chevron\" slot=\"suffix\" />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</p-input-group>\n\t\t\t\t\t<div slot=\"items\">\n\t\t\t\t\t\t{this.loading\n\t\t\t\t\t\t\t? this._getLoadingItems()\n\t\t\t\t\t\t\t: this._getItems()}\n\t\t\t\t\t\t{this.showAddItem && this._getAddItem()}\n\t\t\t\t\t</div>\n\t\t\t\t</p-dropdown>\n\n\t\t\t\t{this.multi && this._selectedItem?.length > 0 && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={`multi-container size-${this.size}`}\n\t\t\t\t\t\tref={(ref) => (this._multiContainerRef = ref)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this._selectedItem.map((item) => (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass=\"item\"\n\t\t\t\t\t\t\t\tonClick={() => this._selectValue(item)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\titem[\n\t\t\t\t\t\t\t\t\t\tthis.selectionDisplayKey ??\n\t\t\t\t\t\t\t\t\t\t\tthis.displayKey\n\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t<p-icon variant=\"negative\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\n\t\t\t\t\t\t<div class=\"extra hidden\">+{this._amountHidden}</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('click', { target: 'document', capture: true })\n\tprotected documentClickHandler({ target }) {\n\t\tif (!this._showDropdown || childOf(target, this._el)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = false;\n\t}\n\n\t@Watch('value')\n\tprivate _valueChange() {\n\t\tthis._preselectItem();\n\t}\n\n\t@Watch('items')\n\tpublic itemChanges() {\n\t\tthis._preselectItem();\n\t}\n\n\t@Watch('_showDropdown')\n\tpublic _showDropdownChanges() {\n\t\tthis.dropdownShown.emit({\n\t\t\tvalue: this._showDropdown,\n\t\t\tquery: this.query,\n\t\t});\n\t}\n\n\t@Watch('multi')\n\tpublic multiChanges() {\n\t\tif (this._selectedItem && !Array.isArray(this._selectedItem)) {\n\t\t\tthis._selectedItem = [];\n\t\t}\n\t}\n\n\tprivate _preselectItem() {\n\t\tlet value =\n\t\t\ttypeof this.value === 'string' && this.multi\n\t\t\t\t? JSON.parse(this.value)\n\t\t\t\t: this.value;\n\n\t\tif (this.multi) {\n\t\t\tif (!Array.isArray(value)) {\n\t\t\t\tthis.value = [];\n\t\t\t\tthis.valueChange.emit(this.value);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.value = value;\n\t\t\tif (!value.length) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._selectedItem =\n\t\t\t\t!!this.valueKey && this.valueKey !== 'false'\n\t\t\t\t\t? this._items.filter((i) =>\n\t\t\t\t\t\t\tvalue.includes(i?.[this.valueKey])\n\t\t\t\t\t\t)\n\t\t\t\t\t: [...value];\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._selectedItem && !value && this.autoSelectFirst) {\n\t\t\tvalue = this._items[0];\n\t\t}\n\n\t\tconst identifier =\n\t\t\ttypeof value === 'object' && value !== null\n\t\t\t\t? value[this._identifierKey]\n\t\t\t\t: value;\n\t\tconst parsedValue =\n\t\t\ttypeof identifier === 'string' || typeof identifier === 'number'\n\t\t\t\t? identifier\n\t\t\t\t: JSON.stringify(identifier);\n\n\t\tconst currentValue = this._selectedItem\n\t\t\t? this._selectedItem?.[this._identifierKey]\n\t\t\t: null;\n\t\tconst currentParsedValue =\n\t\t\ttypeof currentValue === 'string' || typeof currentValue === 'number'\n\t\t\t\t? currentValue\n\t\t\t\t: JSON.stringify(currentValue);\n\n\t\tif (this._selectedItem && currentParsedValue === parsedValue) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._items?.length && value) {\n\t\t\tthis._selectValue(value, false);\n\t\t\treturn;\n\t\t}\n\n\t\tconst item = this._items.find((i) => {\n\t\t\tconst itemIdentifier = i?.[this._identifierKey];\n\t\t\tconst parsedItemIdentifier =\n\t\t\t\ttypeof itemIdentifier === 'string' ||\n\t\t\t\ttypeof itemIdentifier === 'number'\n\t\t\t\t\t? itemIdentifier\n\t\t\t\t\t: JSON.stringify(itemIdentifier);\n\n\t\t\treturn parsedItemIdentifier === parsedValue;\n\t\t});\n\n\t\tthis._selectValue(!!item ? item : value, false);\n\t}\n\n\tprivate _selectValue(item, forceBlur = true) {\n\t\tlet value =\n\t\t\t!!this.valueKey && this.valueKey !== 'false' && item !== null\n\t\t\t\t? item?.[this.valueKey]\n\t\t\t\t: item;\n\n\t\tif (this.multi) {\n\t\t\tif (!this._selectedItem || !Array.isArray(this._selectedItem)) {\n\t\t\t\tthis._selectedItem = [];\n\t\t\t}\n\n\t\t\tif (!this.value || !Array.isArray(this.value)) {\n\t\t\t\tthis.value = [];\n\t\t\t}\n\n\t\t\tconst selectedItem = [...this._selectedItem];\n\t\t\tconst valueArray = [...this.value];\n\n\t\t\tconst includesIndex = selectedItem.findIndex(\n\t\t\t\t(i) => i[this._identifierKey] === item[this._identifierKey]\n\t\t\t);\n\t\t\tif (includesIndex === -1) {\n\t\t\t\tselectedItem.push(item);\n\t\t\t\tvalueArray.push(value);\n\t\t\t} else {\n\t\t\t\tselectedItem.splice(includesIndex, 1);\n\t\t\t\tvalueArray.splice(includesIndex, 1);\n\t\t\t}\n\n\t\t\tthis._selectedItem = selectedItem;\n\t\t\tthis.value = valueArray;\n\t\t\tthis.valueChange.emit(valueArray);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._selectedItem = item;\n\t\tthis.value = value;\n\t\tthis.valueChange.emit(value);\n\n\t\tthis._onBlur(forceBlur);\n\t}\n\n\tprivate _onFocus(ev) {\n\t\tev.preventDefault();\n\t\tthis._inputRef.blur();\n\n\t\tif (!this._showDropdown) {\n\t\t\tthis._showDropdown = true;\n\t\t}\n\n\t\treturn;\n\t}\n\n\tprivate _onMouseDown(ev) {\n\t\tif (this.enableAutocomplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tev.preventDefault();\n\t}\n\n\tprivate _onClick() {\n\t\tif (this.enableAutocomplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = !this._showDropdown;\n\t}\n\n\tprivate _onBlur(force = false) {\n\t\tif (!this.enableAutocomplete && !force) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = false;\n\t}\n\n\tprivate _onAutoComplete(ev) {\n\t\tif (!this.enableAutocomplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = true;\n\n\t\tthis.query = ev.target.value;\n\t\tthis.queryChange.emit(ev.target.value);\n\t}\n\n\tprivate _checkvalue(key, item) {\n\t\treturn (\n\t\t\titem?.[key]\n\t\t\t\t?.toString()\n\t\t\t\t?.toLowerCase()\n\t\t\t\t.indexOf(this.query?.toLowerCase()) >= 0\n\t\t);\n\t}\n\n\tprivate _getItems() {\n\t\tlet items = this._items.map((item) => (\n\t\t\t<p-dropdown-menu-item\n\t\t\t\tonClick={() => this._selectValue(item)}\n\t\t\t\tactive={\n\t\t\t\t\tthis.multi &&\n\t\t\t\t\t!!this._selectedItem &&\n\t\t\t\t\tArray.isArray(this._selectedItem)\n\t\t\t\t\t\t? this._selectedItem.findIndex(\n\t\t\t\t\t\t\t\t(i) =>\n\t\t\t\t\t\t\t\t\ti[this._identifierKey] ===\n\t\t\t\t\t\t\t\t\titem[this._identifierKey]\n\t\t\t\t\t\t\t) >= 0\n\t\t\t\t\t\t: item[this._identifierKey] ===\n\t\t\t\t\t\t\tthis._selectedItem?.[this._identifierKey]\n\t\t\t\t}\n\t\t\t\tvariant={this.multi ? 'checkbox' : 'default'}\n\t\t\t>\n\t\t\t\t{this.avatarKey ? (\n\t\t\t\t\t<span class=\"flex items-center gap-2\">\n\t\t\t\t\t\t<p-avatar\n\t\t\t\t\t\t\tsize=\"xsmall\"\n\t\t\t\t\t\t\tsrc={item[this.avatarKey]}\n\t\t\t\t\t\t\tletters={item[this.avatarLettersKey]}\n\t\t\t\t\t\t></p-avatar>\n\t\t\t\t\t\t{item[this.dropdownDisplayKey ?? this.displayKey]}\n\t\t\t\t\t</span>\n\t\t\t\t) : (\n\t\t\t\t\titem[this.displayKey]\n\t\t\t\t)}\n\t\t\t</p-dropdown-menu-item>\n\t\t));\n\n\t\tif (!this._items.length) {\n\t\t\titems = [\n\t\t\t\t<p class=\"w-full p-2 text-storm-medium text-sm text-center\">\n\t\t\t\t\t{this.emptyStateText}\n\t\t\t\t</p>,\n\t\t\t];\n\t\t}\n\n\t\tif (this.enableSelectAll && this._items.length) {\n\t\t\titems.unshift(\n\t\t\t\t<p-dropdown-menu-item\n\t\t\t\t\tvariant=\"checkbox\"\n\t\t\t\t\tonClick={() => this._selectAllChange()}\n\t\t\t\t\tactive={this._allSelected}\n\t\t\t\t>\n\t\t\t\t\t{this.selectAllIcon?.length ? (\n\t\t\t\t\t\t<span class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t<div class=\"w-6 justify-center flex text-lg\">\n\t\t\t\t\t\t\t\t<p-icon variant={this.selectAllIcon} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{this.selectAllText}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) : (\n\t\t\t\t\t\tthis.selectAllText\n\t\t\t\t\t)}\n\t\t\t\t</p-dropdown-menu-item>\n\t\t\t);\n\t\t}\n\n\t\tif (this.enableAutocomplete) {\n\t\t\titems.unshift(this._getAutoCompleteItem());\n\t\t}\n\n\t\treturn items;\n\t}\n\n\tprivate _getAddItem() {\n\t\treturn (\n\t\t\t<p-dropdown-menu-item onClick={() => this.add.emit()}>\n\t\t\t\t<span class=\"text-indigo font-semibold flex gap-1 items-center\">\n\t\t\t\t\t{this.addItemText}\n\t\t\t\t\t<p-icon variant=\"plus\" />\n\t\t\t\t</span>\n\t\t\t</p-dropdown-menu-item>\n\t\t);\n\t}\n\n\tprivate _getLoadingItems() {\n\t\tconst items = [0, 0, 0].map(() => (\n\t\t\t<p-dropdown-menu-item enableHover={false}>\n\t\t\t\t<p-loader variant=\"ghost\" class=\"h-6 w-full rounded\" />\n\t\t\t</p-dropdown-menu-item>\n\t\t));\n\n\t\tif (this.enableAutocomplete) {\n\t\t\titems.unshift(this._getAutoCompleteItem());\n\t\t}\n\n\t\treturn items;\n\t}\n\n\tprivate _getAutoCompleteItem() {\n\t\treturn (\n\t\t\t<div class=\"bg-white sticky top-0 pt-2 pb-1 -mt-2\">\n\t\t\t\t<input\n\t\t\t\t\tclass=\"p-input size-small mb-2 sticky top-2\"\n\t\t\t\t\tplaceholder={this.autocompletePlaceholder}\n\t\t\t\t\tonInput={(ev) => this._onAutoComplete(ev)}\n\t\t\t\t\tref={(ref) => (this.autocompleteInputRef = ref)}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tprivate _setMultiContainerMaxWidth() {\n\t\tif (!this._inputRef || !this._multiContainerRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._multiContainerRef.style.maxWidth = `${this._inputRef.clientWidth - 16}px`;\n\t}\n\n\tprivate _checkSelectedItems() {\n\t\tif (!this._multiContainerRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst containerRect = this._multiContainerRef.getBoundingClientRect();\n\t\tconst items = Array.from(\n\t\t\tthis._multiContainerRef.querySelectorAll('.item')\n\t\t) as HTMLElement[];\n\n\t\tlet amountHidden = 0;\n\n\t\tfor (const child of items) {\n\t\t\tchild.classList.remove('hidden');\n\n\t\t\tconst childRect = child.getBoundingClientRect();\n\t\t\tif (childRect.right > containerRect.right) {\n\t\t\t\tchild.classList.add('hidden');\n\t\t\t\tamountHidden++;\n\t\t\t}\n\t\t}\n\n\t\tthis._amountHidden = amountHidden;\n\t\tconst extra = this._multiContainerRef.querySelector('.extra');\n\t\tif (!extra) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!extra.classList.contains('hidden')) {\n\t\t\textra.classList.add('hidden');\n\t\t}\n\n\t\tif (amountHidden > 0) {\n\t\t\textra.classList.remove('hidden');\n\t\t}\n\t}\n\n\tprivate _onDropdownOpen(ev) {\n\t\tif (!ev.detail || !this.autocompleteInputRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.autocompleteInputRef.focus();\n\t}\n\n\tprivate _selectAllChange() {\n\t\tthis._allSelected = !this._allSelected;\n\t\tthis.selectAllChange.emit(this._allSelected);\n\t}\n}\n"],"mappings":"oGAAA,MAAMA,EAAqB,itK,MCqBdC,EAAM,M,6WA6BwB,Y,qCAUb,O,gOAwCM,K,iBAKJ,K,uBAKK,G,wBAKE,K,iBAKP,M,aAKJ,M,qBAKQ,M,mBAKH,a,uCA0CG,S,4HA8BU,M,iBAKd,M,iBAKD,W,oBAaG,qB,mBAOK,M,mBACA,K,kBAEG,M,mBAER,C,CASjC,UAAIC,G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AAmBoE,iBAAiB,UAG1C,IAAIC,EAAe,EAEnB,IAAK,MAAMC,KAAS5J,EAAO,CAC1B4J,EAAMC,UAAUC,OAAO,UAEvB,MAAMC,EAAYH,EAAMJ,wBACxB,GAAIO,EAAUC,MAAQT,EAAcS,MAAO,CAC1CJ,EAAMC,UAAUf,IAAI,UACpBa,G,EAIF5J,KAAKyF,cAAgBmE,EACrB,MAAMM,EAAQlK,KAAKuF,mBAAmB4E,cAAc,UACpD,IAAKD,EAAO,CACX,M,CAGD,IAAKA,EAAMJ,UAAUM,SAAS,UAAW,CACxCF,EAAMJ,UAAUf,IAAI,S,CAGrB,GAAIa,EAAe,EAAG,CACrBM,EAAMJ,UAAUC,OAAO,S,EAIjB,eAAApG,CAAgBD,GACvB,IAAKA,EAAG2G,SAAWrK,KAAKoJ,qBAAsB,CAC7C,M,CAGDpJ,KAAKoJ,qBAAqBkB,O,CAGnB,gBAAA5B,GACP1I,KAAK2I,cAAgB3I,KAAK2I,aAC1B3I,KAAKuK,gBAAgBvE,KAAKhG,KAAK2I,a"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["drawerComponentCss","Drawer","this","_hasHeaderSlot","componentWillLoad","_el","querySelector","render","show","headerContent","h","name","bodyContent","Host","class","variant","applyBlur","onClicked","ev","_backdropClick","detail","closing","_closing","scrollLock","_a","header","length","showClose","onClose","close","backdropClickClose","closeClicked","emit","event","canClose","setTimeout","closed"],"sources":["src/components/organisms/drawer/drawer.component.scss?tag=p-drawer&encapsulation=shadow","src/components/organisms/drawer/drawer.component.tsx"],"sourcesContent":[":host {\n\t@apply block;\n}\n","import {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tProp,\n\tState,\n} from '@stencil/core';\n\n@Component({\n\ttag: 'p-drawer',\n\tstyleUrl: 'drawer.component.scss',\n\tshadow: true,\n})\nexport class Drawer {\n\t/**\n\t * The Header of the drawer\n\t */\n\t@Prop() header?: string;\n\n\t/**\n\t * Wether to show the drawer or not\n\t */\n\t@Prop() show: boolean = false;\n\n\t/**\n\t * Wether to apply blur to the backdrop\n\t */\n\t@Prop() applyBlur: boolean = false;\n\n\t/**\n\t * Wether to show the close on mobile in the header\n\t */\n\t@Prop() showClose = true;\n\n\t/**\n\t * Wether to hide the drawer when the backdrop is clicked\n\t */\n\t@Prop() backdropClickClose = true;\n\n\t/**\n\t * Wether the drawer can be closed\n\t */\n\t@Prop() canClose: boolean = true;\n\n\t/**\n\t * Wether we should scroll lock the body\n\t */\n\t@Prop() scrollLock: boolean = true;\n\n\t/**\n\t * Close click event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tcloseClicked: EventEmitter<{\n\t\tevent: MouseEvent;\n\t\tcanClose: boolean;\n\t}>;\n\n\t/**\n\t * Closed event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tclosed: EventEmitter<null>;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _hasHeaderSlot = false;\n\n\t@State() private _closing = false;\n\n\tcomponentWillLoad() {\n\t\tthis._hasHeaderSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"header\"]'\n\t\t);\n\t}\n\n\trender() {\n\t\tif (!this.show) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst headerContent = <slot name=\"header\" />;\n\t\tconst bodyContent = <slot name=\"content\" />;\n\n\t\treturn (\n\t\t\t<Host class=\"p-drawer\">\n\t\t\t\t<p-backdrop\n\t\t\t\t\tvariant=\"drawer\"\n\t\t\t\t\tapplyBlur={this.applyBlur}\n\t\t\t\t\tonClicked={(ev) => this._backdropClick(ev.detail)}\n\t\t\t\t\tclosing={this._closing}\n\t\t\t\t\tscrollLock={this.scrollLock}\n\t\t\t\t>\n\t\t\t\t\t<p-drawer-container closing={this._closing}>\n\t\t\t\t\t\t{(this.header?.length || this._hasHeaderSlot) && (\n\t\t\t\t\t\t\t<p-drawer-header\n\t\t\t\t\t\t\t\tshow-close={this.showClose}\n\t\t\t\t\t\t\t\tonClose={(ev) => this.close(ev.detail)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this._hasHeaderSlot\n\t\t\t\t\t\t\t\t\t? headerContent\n\t\t\t\t\t\t\t\t\t: this.header}\n\t\t\t\t\t\t\t</p-drawer-header>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<p-drawer-body>{bodyContent}</p-drawer-body>\n\t\t\t\t\t</p-drawer-container>\n\t\t\t\t</p-backdrop>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _backdropClick(ev) {\n\t\tif (!this.backdropClickClose) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.close(ev);\n\t}\n\n\tpublic close(ev: MouseEvent) {\n\t\tthis.closeClicked.emit({\n\t\t\tevent: ev,\n\t\t\tcanClose: this.canClose,\n\t\t});\n\n\t\tif (!this.canClose) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._closing = true;\n\n\t\tsetTimeout(() => {\n\t\t\tthis.show = false;\n\t\t\tthis._closing = false;\n\t\t\tthis.closed.emit();\n\t\t}, 250);\n\t}\n}\n"],"mappings":"gEAAA,MAAMA,EAAqB,gH,MCgBdC,EAAM,M,mGA4DVC,KAAAC,eAAiB,M,gCAnDD,M,eAKK,M,eAKT,K,wBAKS,K,cAKD,K,gBAKE,K,cA4BF,K,CAE5B,iBAAAC,GACCF,KAAKC,iBAAmBD,KAAKG,IAAIC,cAChC,2B,CAIF,MAAAC,G,MACC,IAAKL,KAAKM,KAAM,CACf,M,CAGD,MAAMC,EAAgBC,EAAA,QAAMC,KAAK,WACjC,MAAMC,EAAcF,EAAA,QAAMC,KAAK,YAE/B,OACCD,EAACG,EAAI,CAACC,MAAM,YACXJ,EAAA,cACCK,QAAQ,SACRC,UAAWd,KAAKc,UAChBC,UAAYC,GAAOhB,KAAKiB,eAAeD,EAAGE,QAC1CC,QAASnB,KAAKoB,SACdC,WAAYrB,KAAKqB,YAEjBb,EAAA,sBAAoBW,QAASnB,KAAKoB,aAC/BE,EAAAtB,KAAKuB,UAAM,MAAAD,SAAA,SAAAA,EAAEE,SAAUxB,KAAKC,iBAC7BO,EAAA,gCACaR,KAAKyB,UACjBC,QAAUV,GAAOhB,KAAK2B,MAAMX,EAAGE,SAE9BlB,KAAKC,eACHM,EACAP,KAAKuB,QAGVf,EAAA,qBAAgBE,K,CAOb,cAAAO,CAAeD,GACtB,IAAKhB,KAAK4B,mBAAoB,CAC7B,M,CAGD5B,KAAK2B,MAAMX,E,CAGL,KAAAW,CAAMX,GACZhB,KAAK6B,aAAaC,KAAK,CACtBC,MAAOf,EACPgB,SAAUhC,KAAKgC,WAGhB,IAAKhC,KAAKgC,SAAU,CACnB,M,CAGDhC,KAAKoB,SAAW,KAEhBa,YAAW,KACVjC,KAAKM,KAAO,MACZN,KAAKoB,SAAW,MAChBpB,KAAKkC,OAAOJ,MAAM,GAChB,I"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Modal","this","_hasFooterSlot","_hasHeaderSlot","componentWillLoad","_el","querySelector","render","show","headerContent","h","name","bodyContent","footerContent","Host","class","applyBlur","onClicked","ev","_backdropClick","detail","closing","_closing","scrollLock","size","_a","header","length","showClose","onClose","close","variant","rounded","padding","backdropClickClose","closeClicked","emit","setTimeout","closed"],"sources":["src/components/organisms/modal/modal.component.tsx"],"sourcesContent":["import {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tProp,\n\tState,\n} from '@stencil/core';\n\n@Component({\n\ttag: 'p-modal',\n\tshadow: true,\n})\nexport class Modal {\n\t/**\n\t * The size of the modal container\n\t */\n\t@Prop() size: 'sm' | 'md' | 'lg' | 'xl' = 'md';\n\n\t/**\n\t * The variant of the modal body\n\t */\n\t@Prop() variant: 'default' | 'table' | 'table-flush' = 'default';\n\n\t/**\n\t * The Header of the modal\n\t */\n\t@Prop() header?: string;\n\n\t/**\n\t * Wether to show the modal or not\n\t */\n\t@Prop() show: boolean = false;\n\n\t/**\n\t * Wether to apply blur to the backdrop\n\t */\n\t@Prop() applyBlur: boolean = false;\n\n\t/**\n\t * Wether to show the close button in the header\n\t */\n\t@Prop() showClose = true;\n\n\t/**\n\t * Wether to show the footer on mobile\n\t */\n\t@Prop() showMobileFooter = false;\n\n\t/**\n\t * Wether to hide the modal when the backdrop is clicked\n\t */\n\t@Prop() backdropClickClose = true;\n\n\t/**\n\t * Wether we should scroll lock the body\n\t */\n\t@Prop() scrollLock: boolean = true;\n\n\t/**\n\t * Wether the body should have padding\n\t */\n\t@Prop() padding: boolean = true;\n\n\t/**\n\t * Close click event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tcloseClicked: EventEmitter<MouseEvent>;\n\n\t/**\n\t * Closed event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tclosed: EventEmitter<null>;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _hasFooterSlot = false;\n\tprivate _hasHeaderSlot = false;\n\n\t@State() private _closing = false;\n\n\tcomponentWillLoad() {\n\t\tthis._hasFooterSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"footer\"]'\n\t\t);\n\t\tthis._hasHeaderSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"header\"]'\n\t\t);\n\t}\n\n\trender() {\n\t\tif (!this.show) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst headerContent = <slot name=\"header\" />;\n\t\tconst bodyContent = <slot name=\"content\" />;\n\t\tconst footerContent = <slot name=\"footer\" />;\n\n\t\treturn (\n\t\t\t<Host class=\"p-modal\">\n\t\t\t\t<p-backdrop\n\t\t\t\t\tapplyBlur={this.applyBlur}\n\t\t\t\t\tonClicked={(ev) => this._backdropClick(ev.detail)}\n\t\t\t\t\tclosing={this._closing}\n\t\t\t\t\tscrollLock={this.scrollLock}\n\t\t\t\t>\n\t\t\t\t\t<p-modal-container size={this.size} closing={this._closing}>\n\t\t\t\t\t\t{(this.header?.length || this._hasHeaderSlot) && (\n\t\t\t\t\t\t\t<p-modal-header\n\t\t\t\t\t\t\t\tshowClose={this.showClose}\n\t\t\t\t\t\t\t\tonClose={(ev) => this.close(ev.detail)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this._hasHeaderSlot\n\t\t\t\t\t\t\t\t\t? headerContent\n\t\t\t\t\t\t\t\t\t: this.header}\n\t\t\t\t\t\t\t</p-modal-header>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<p-modal-body\n\t\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\t\trounded={!this._hasFooterSlot}\n\t\t\t\t\t\t\tpadding={this.padding}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{bodyContent}\n\t\t\t\t\t\t</p-modal-body>\n\t\t\t\t\t\t{this._hasFooterSlot && (\n\t\t\t\t\t\t\t<p-modal-footer>{footerContent}</p-modal-footer>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</p-modal-container>\n\t\t\t\t</p-backdrop>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _backdropClick(ev: MouseEvent) {\n\t\tif (!this.backdropClickClose) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.close(ev);\n\t}\n\n\tpublic close(ev: MouseEvent) {\n\t\tthis.closeClicked.emit(ev);\n\n\t\tthis._closing = true;\n\n\t\tsetTimeout(() => {\n\t\t\tthis.show = false;\n\t\t\tthis._closing = false;\n\n\t\t\tthis.closed.emit();\n\t\t}, 550);\n\t}\n}\n"],"mappings":"sEAeaA,EAAK,M,mGAwETC,KAAAC,eAAiB,MACjBD,KAAAE,eAAiB,M,UArEiB,K,aAKa,U,gCAU/B,M,eAKK,M,eAKT,K,sBAKO,M,wBAKE,K,gBAKC,K,aAKH,K,cA0BC,K,CAE5B,iBAAAC,GACCH,KAAKC,iBAAmBD,KAAKI,IAAIC,cAChC,4BAEDL,KAAKE,iBAAmBF,KAAKI,IAAIC,cAChC,2B,CAIF,MAAAC,G,MACC,IAAKN,KAAKO,KAAM,CACf,M,CAGD,MAAMC,EAAgBC,EAAA,QAAMC,KAAK,WACjC,MAAMC,EAAcF,EAAA,QAAMC,KAAK,YAC/B,MAAME,EAAgBH,EAAA,QAAMC,KAAK,WAEjC,OACCD,EAACI,EAAI,CAACC,MAAM,WACXL,EAAA,cACCM,UAAWf,KAAKe,UAChBC,UAAYC,GAAOjB,KAAKkB,eAAeD,EAAGE,QAC1CC,QAASpB,KAAKqB,SACdC,WAAYtB,KAAKsB,YAEjBb,EAAA,qBAAmBc,KAAMvB,KAAKuB,KAAMH,QAASpB,KAAKqB,aAC/CG,EAAAxB,KAAKyB,UAAM,MAAAD,SAAA,SAAAA,EAAEE,SAAU1B,KAAKE,iBAC7BO,EAAA,kBACCkB,UAAW3B,KAAK2B,UAChBC,QAAUX,GAAOjB,KAAK6B,MAAMZ,EAAGE,SAE9BnB,KAAKE,eACHM,EACAR,KAAKyB,QAGVhB,EAAA,gBACCqB,QAAS9B,KAAK8B,QACdC,SAAU/B,KAAKC,eACf+B,QAAShC,KAAKgC,SAEbrB,GAEDX,KAAKC,gBACLQ,EAAA,sBAAiBG,K,CAQf,cAAAM,CAAeD,GACtB,IAAKjB,KAAKiC,mBAAoB,CAC7B,M,CAGDjC,KAAK6B,MAAMZ,E,CAGL,KAAAY,CAAMZ,GACZjB,KAAKkC,aAAaC,KAAKlB,GAEvBjB,KAAKqB,SAAW,KAEhBe,YAAW,KACVpC,KAAKO,KAAO,MACZP,KAAKqB,SAAW,MAEhBrB,KAAKqC,OAAOF,MAAM,GAChB,I"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,h as a,H as e}from"./p-e4d5e7a7.js";const r=".fixed{position:fixed!important}.left-0{left:0!important}.top-0{top:0!important}.z-navbar{z-index:300!important}.mt-auto{margin-top:auto!important}.block{display:block!important}.flex{display:flex!important}.hidden{display:none!important}.h-screen{height:100vh!important}.w-60{width:15rem!important}.w-full{width:100%!important}.-translate-x-full{--tw-translate-x:-100%!important;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}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) 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}.items-center{align-items:center!important}.justify-between{justify-content:space-between!important}.border-0{border-width:0!important}.border-b{border-bottom-width:1px!important}.border-r{border-right-width:1px!important}.border-solid{border-style:solid!important}.border-mystic-dark{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important}.px-4{padding-left:1rem!important;padding-right:1rem!important}*{box-sizing:border-box}:host{max-height:calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));width:100%}@media (min-width:64rem){:host{width:15rem}}:host .sidebar,:host .sidebar .company,:host .sidebar .content,:host .sidebar .user,:host .userbar{display:flex;flex-direction:column;width:100%}:host .sidebar,:host .top-bar{--tw-bg-opacity:1;--tw-border-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity));border-color:rgb(218 230 240/var(--tw-border-opacity))!important;border-style:solid!important;border-width:0!important}:host .sidebar{--tw-bg-opacity:1;--tw-translate-x:-100%;background-color:rgb(255 255 255/var(--tw-bg-opacity));border-right-width:1px!important;gap:1.5rem;height:100vh;left:0;padding-bottom:1rem;padding-top:calc(env(safe-area-inset-top, 0) + 1rem);position:fixed;top:0;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));transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);width:15rem;will-change:transform;z-index:300}@media (min-width:64rem){:host .sidebar{--tw-translate-x:0px;height:100%;position:relative;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));width:100%}}:host .sidebar .company,:host .sidebar .content,:host .sidebar .header,:host .sidebar .user{padding-left:1rem;padding-right:1rem}:host .sidebar .header{align-items:center;display:flex;justify-content:space-between;width:100%}@media (min-width:64rem){:host .sidebar .header{display:none}}:host .sidebar .content{overflow-y:auto;scrollbar-color:#528afa #dae6f0;scrollbar-width:thin}:host .sidebar .content::-webkit-scrollbar{width:.25rem}:host .sidebar .content::-webkit-scrollbar-track{background:#dae6f0}:host .sidebar .content::-webkit-scrollbar-thumb{background:#528afa}:host .sidebar .content::-webkit-scrollbar-thumb:hover{background:#528afa}:host .sidebar .user{display:none;margin-top:auto}@media (min-width:64rem){:host .sidebar .user{display:flex}}:host .sidebar.show{--tw-translate-x:env(safe-area-inset-left,0)}:host .top-bar{border-bottom-width:1px!important;display:flex;height:calc(env(safe-area-inset-top, 0) + 3rem);justify-content:space-between;padding:calc(env(safe-area-inset-top, 0) + .5rem) 1rem .5rem;width:100%}@media (min-width:64rem){:host .top-bar{display:none}}:host p-backdrop{display:none}:host p-backdrop.show{display:block}@media (min-width:64rem){.desktop-xs\\:relative{position:relative!important}.desktop-xs\\:flex{display:flex!important}.desktop-xs\\:hidden{display:none!important}.desktop-xs\\:h-full{height:100%!important}}.static{position:static!important}.z-navbar-backdrop{z-index:290!important}.m-0{margin:0!important}.text-xl{font-size:1.25rem!important;line-height:1.75rem!important}.font-semibold{font-weight:600!important}.text-storm-dark{--tw-text-opacity:1!important;color:rgb(39 40 56/var(--tw-text-opacity))!important}";const o=class{constructor(a){t(this,a);this.closeText="Close";this.menuText="Menu";this._showMenu=false}render(){return a(e,{class:"p-navbar"},a("p-backdrop",{applyBlur:true,class:`z-navbar-backdrop desktop-xs:hidden ${this._showMenu&&"show"}`,onClicked:()=>this._showMenu=false}),a("div",{class:`sidebar ${this._showMenu&&"show"}`},a("div",{class:"header"},a("p",{class:"text-xl m-0 font-semibold text-storm-dark"},this.menuText),a("p-button",{variant:"secondary",icon:"negative",iconPosition:"end",size:"small",onClick:()=>this._showMenu=false},this.closeText)),a("div",{class:"company"},a("slot",{name:"company"})),a("div",{class:"content"},a("slot",{name:"content"})),a("div",{class:"user"},a("slot",{name:"user"}))),a("div",{class:"top-bar"},a("p-button",{variant:"secondary",icon:"menu",size:"small",onClick:()=>this._showMenu=true},this.menuText),a("slot",{name:"topbar"})))}handleCloseNavbar(){this._showMenu=false}handleOpenNavbar(){this._showMenu=true}};o.style=r;export{o as p_navbar};
|
|
2
|
-
//# sourceMappingURL=p-03090f03.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["navbarComponentCss","Navbar","render","h","Host","class","applyBlur","this","_showMenu","onClicked","menuText","variant","icon","iconPosition","size","onClick","closeText","name","handleCloseNavbar","handleOpenNavbar"],"sources":["src/components/organisms/navbar/navbar.component.scss?tag=p-navbar&encapsulation=shadow","src/components/organisms/navbar/navbar.component.tsx"],"sourcesContent":["@import '../../../style/mixins';\n\n:host {\n\t@apply w-full max-h-screen-safe;\n\t@apply desktop-xs:w-60;\n\n\t.sidebar,\n\t.sidebar .company,\n\t.sidebar .content,\n\t.sidebar .user,\n\t.userbar {\n\t\t@apply flex w-full flex-col;\n\t}\n\n\t.sidebar,\n\t.top-bar {\n\t\t@apply bg-white;\n\t\t@apply border-0 border-solid border-mystic-dark #{!important};\n\t}\n\n\t.sidebar {\n\t\t@apply fixed top-0 left-0 z-navbar h-screen w-60 bg-white;\n\t\t@apply desktop-xs:relative desktop-xs:h-full desktop-xs:w-full;\n\t\t@apply gap-6;\n\n\t\t@apply will-change-transform;\n\t\t@apply -translate-x-full transform-gpu desktop-xs:translate-x-0;\n\n\t\t@apply py-4;\n\n\t\tpadding-top: calc(env(safe-area-inset-top, 0) + 1rem);\n\n\t\t@apply border-r #{!important};\n\n\t\t@apply transition-all;\n\n\t\t.company,\n\t\t.content,\n\t\t.user,\n\t\t.header {\n\t\t\t@apply px-4;\n\t\t}\n\n\t\t.header {\n\t\t\t@apply flex w-full items-center justify-between;\n\t\t\t@apply desktop-xs:hidden;\n\t\t}\n\n\t\t.content {\n\t\t\t@apply overflow-y-auto;\n\n\t\t\t@include scrollbarY();\n\t\t}\n\n\t\t.user {\n\t\t\t@apply mt-auto hidden;\n\t\t\t@apply desktop-xs:flex;\n\t\t}\n\n\t\t&.show {\n\t\t\t--tw-translate-x: env(safe-area-inset-left, 0);\n\t\t}\n\t}\n\n\t.top-bar {\n\t\t@apply flex w-full justify-between px-4 py-2;\n\n\t\tpadding-top: calc(env(safe-area-inset-top, 0) + 0.5rem);\n\t\theight: calc(env(safe-area-inset-top, 0) + 3rem);\n\n\t\t@apply border-b #{!important};\n\n\t\t@apply desktop-xs:hidden;\n\t}\n\n\tp-backdrop {\n\t\t@apply hidden;\n\n\t\t&.show {\n\t\t\t@apply block;\n\t\t}\n\t}\n}\n","import { Component, h, Host, Listen, Prop, State } from '@stencil/core';\n\n@Component({\n\ttag: 'p-navbar',\n\tstyleUrl: 'navbar.component.scss',\n\tshadow: true,\n})\nexport class Navbar {\n\t/**\n\t * The text to display for the close button\n\t */\n\t@Prop() closeText = 'Close';\n\n\t/**\n\t * The text to display for the menu button & sidebar title\n\t */\n\t@Prop() menuText = 'Menu';\n\n\t@State() private _showMenu = false;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-navbar\">\n\t\t\t\t<p-backdrop\n\t\t\t\t\tapplyBlur={true}\n\t\t\t\t\tclass={`z-navbar-backdrop desktop-xs:hidden ${\n\t\t\t\t\t\tthis._showMenu && 'show'\n\t\t\t\t\t}`}\n\t\t\t\t\tonClicked={() => (this._showMenu = false)}\n\t\t\t\t></p-backdrop>\n\t\t\t\t<div class={`sidebar ${this._showMenu && 'show'}`}>\n\t\t\t\t\t<div class=\"header\">\n\t\t\t\t\t\t<p class=\"text-xl m-0 font-semibold text-storm-dark\">\n\t\t\t\t\t\t\t{this.menuText}\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<p-button\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\ticon=\"negative\"\n\t\t\t\t\t\t\ticonPosition=\"end\"\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tonClick={() => (this._showMenu = false)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this.closeText}\n\t\t\t\t\t\t</p-button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"company\">\n\t\t\t\t\t\t<slot name=\"company\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"content\">\n\t\t\t\t\t\t<slot name=\"content\" />\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"user\">\n\t\t\t\t\t\t<slot name=\"user\" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"top-bar\">\n\t\t\t\t\t<p-button\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\ticon=\"menu\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tonClick={() => (this._showMenu = true)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.menuText}\n\t\t\t\t\t</p-button>\n\n\t\t\t\t\t<slot name=\"topbar\" />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('closeNavbar', { target: 'window' })\n\thandleCloseNavbar() {\n\t\tthis._showMenu = false;\n\t}\n\n\t@Listen('openNavbar', { target: 'window' })\n\thandleOpenNavbar() {\n\t\tthis._showMenu = true;\n\t}\n}\n"],"mappings":"kDAAA,MAAMA,EAAqB,y9I,MCOdC,EAAM,M,wCAIE,Q,cAKD,O,eAEU,K,CAE7B,MAAAC,GACC,OACCC,EAACC,EAAI,CAACC,MAAM,YACXF,EAAA,cACCG,UAAW,KACXD,MAAO,uCACNE,KAAKC,WAAa,SAEnBC,UAAW,IAAOF,KAAKC,UAAY,QAEpCL,EAAA,OAAKE,MAAO,WAAWE,KAAKC,WAAa,UACxCL,EAAA,OAAKE,MAAM,UACVF,EAAA,KAAGE,MAAM,6CACPE,KAAKG,UAGPP,EAAA,YACCQ,QAAQ,YACRC,KAAK,WACLC,aAAa,MACbC,KAAK,QACLC,QAAS,IAAOR,KAAKC,UAAY,OAEhCD,KAAKS,YAGRb,EAAA,OAAKE,MAAM,WACVF,EAAA,QAAMc,KAAK,aAEZd,EAAA,OAAKE,MAAM,WACVF,EAAA,QAAMc,KAAK,aAGZd,EAAA,OAAKE,MAAM,QACVF,EAAA,QAAMc,KAAK,WAIbd,EAAA,OAAKE,MAAM,WACVF,EAAA,YACCQ,QAAQ,YACRC,KAAK,OACLE,KAAK,QACLC,QAAS,IAAOR,KAAKC,UAAY,MAEhCD,KAAKG,UAGPP,EAAA,QAAMc,KAAK,Y,CAOf,iBAAAC,GACCX,KAAKC,UAAY,K,CAIlB,gBAAAW,GACCZ,KAAKC,UAAY,I"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,H as i}from"./p-e4d5e7a7.js";const n='.relative{position:relative!important}.sticky{position:sticky!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.box-border{box-sizing:border-box!important}.flex{display:flex!important}.grid{display:grid!important}.hidden{display:none!important}.h-full{height:100%!important}.h-screen{height:100vh!important}.w-full{width:100%!important}.w-screen{width:100vw!important}.w-sidebar-mobile{width:100%!important}.w-unset{width:unset!important}.flex-1{flex:1 1 0%!important}.flex-col{flex-direction:column!important}.content-start{align-content:flex-start!important}.items-center{align-items:center!important}.overflow-y-auto{overflow-y:auto!important}.px-content-mobile-x{padding-left:1rem!important;padding-right:1rem!important}*{box-sizing:border-box}:host{align-content:flex-start;display:grid;gap:0;grid-template-areas:"sidebar" "topbar" "content";grid-template-columns:1fr;grid-template-rows:repeat(1fr,3);height:100vh;overflow:hidden;width:100vw}@media (min-width:64rem){:host{grid-template-areas:"topbar topbar" "sidebar content";grid-template-columns:auto 1fr;grid-template-rows:auto 1fr}}:host .content,:host .sidebar,:host .topbar{align-self:flex-start}:host .topbar{grid-area:topbar;order:2;position:sticky;width:100%}@media (min-width:80rem){:host .topbar{order:1}}:host .sidebar{box-sizing:border-box;display:flex;grid-area:sidebar;height:100%;order:1;width:100%}@media (min-width:80rem){:host .sidebar{order:2;width:15rem}}:host .content{display:flex;flex-direction:column;grid-area:content;height:100%;order:3;overflow-x:hidden;overflow-y:auto;padding:0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);position:relative}:host .content .inner-content{padding:1.5rem 1rem;position:relative}@media (min-width:64rem){:host .content .inner-content{padding:2rem;width:100%}}@media (min-width:80rem){:host .content .inner-content{width:100%}}@media (min-width:85.375rem){:host .content .inner-content{width:69rem}}@media (min-width:90rem){:host .content .inner-content{width:69rem}}@media (min-width:120rem){:host .content .inner-content{width:69rem}}:host(.variant-default) .content{flex:1 1 0%}:host(.variant-login){grid-template-areas:"topbar topbar" "content content"}@media (min-width:64rem){:host(.variant-login){grid-template-areas:"topbar topbar" "content sidebar"}}:host(.variant-login) .sidebar{display:none;flex:1 1 0%;order:3;overflow:hidden;padding:.5rem;width:unset}@media (min-width:64rem){:host(.variant-login) .sidebar{display:flex}}:host(.variant-login) .sidebar .inner-content{padding:.5rem}:host(.variant-login) .content{align-items:center;order:3}@media (min-width:64rem){:host(.variant-login) .content{justify-content:center;order:2}}:host(.variant-login) .content .inner-content{box-sizing:border-box;padding:calc(env(safe-area-inset-top) + 3.5rem) 1rem 1.5rem;width:100%}@media (min-width:64rem){:host(.variant-login) .content .inner-content{padding:1.5rem 4.5rem 0}}@media (min-width:40rem){:host(.variant-login) .content .inner-content{width:30rem}}@media (min-width:80rem){:host(.variant-office) .sidebar{width:19.5rem}}@media (min-width:64rem){.desktop-xs\\:flex{display:flex!important}.desktop-xs\\:w-content-desktop-xs{width:100%!important}.desktop-xs\\:px-18{padding-left:4.5rem!important;padding-right:4.5rem!important}.desktop-xs\\:px-content-desktop-x{padding-left:2rem!important;padding-right:2rem!important}}@media (min-width:80rem){.desktop-sm\\:w-content-desktop-sm{width:100%!important}}@media (min-width:85.375rem){.desktop\\:w-content-desktop{width:69rem!important}}@media (min-width:90rem){.desktop-lg\\:w-content-desktop-lg{width:69rem!important}}.static{position:static!important}';const r=class{constructor(e){t(this,e);this.variant="default"}render(){return e(i,{class:`p-layout variant-${this.variant}`},e("div",{class:"topbar"},e("slot",{name:"topbar"})),e("div",{class:"sidebar"},e("slot",{name:"sidebar"})),e("div",{class:"content"},e("div",{class:"inner-content"},e("slot",{name:"content"}))))}};r.style=n;export{r as p_layout};
|
|
2
|
-
//# sourceMappingURL=p-46a939e2.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["layoutComponentCss","Layout","render","h","Host","class","this","variant","name"],"sources":["src/components/atoms/layout/layout.component.scss?tag=p-layout&encapsulation=shadow","src/components/atoms/layout/layout.component.tsx"],"sourcesContent":[":host {\n\t@apply grid h-screen w-screen content-start overflow-hidden;\n\n\tgrid-template-columns: 1fr;\n\tgrid-template-rows: repeat(1fr, 3);\n\tgap: 0;\n\tgrid-template-areas:\n\t\t'sidebar'\n\t\t'topbar'\n\t\t'content';\n\n\t@screen desktop-xs {\n\t\tgrid-template-columns: auto 1fr;\n\t\tgrid-template-rows: auto 1fr;\n\t\tgrid-template-areas:\n\t\t\t'topbar topbar'\n\t\t\t'sidebar content';\n\t}\n\n\t.topbar,\n\t.sidebar,\n\t.content {\n\t\t@apply self-start;\n\t}\n\n\t.topbar {\n\t\tgrid-area: topbar;\n\n\t\t@apply sticky w-full;\n\t\t@apply order-2 desktop-sm:order-1;\n\t}\n\n\t.sidebar {\n\t\tgrid-area: sidebar;\n\n\t\t@apply box-border flex h-full;\n\t\t@apply w-sidebar-mobile desktop-sm:w-sidebar-desktop;\n\t\t@apply order-1 desktop-sm:order-2;\n\t}\n\n\t.content {\n\t\tgrid-area: content;\n\n\t\t@apply relative flex h-full flex-col overflow-y-auto overflow-x-hidden;\n\t\t@apply order-3;\n\n\t\tpadding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom)\n\t\t\tenv(safe-area-inset-left);\n\n\t\t.inner-content {\n\t\t\t@apply relative pb-24;\n\n\t\t\t@apply px-content-mobile-x py-content-mobile-y;\n\t\t\t@apply desktop-xs:px-content-desktop-x desktop-xs:py-content-desktop-y;\n\n\t\t\t@apply desktop-xs:w-content-desktop-xs desktop-sm:w-content-desktop-sm desktop:w-content-desktop desktop-lg:w-content-desktop-lg desktop-xl:w-content-desktop-xl;\n\t\t}\n\t}\n}\n\n:host(.variant-default) {\n\t.content {\n\t\t@apply flex-1;\n\t}\n}\n\n:host(.variant-login) {\n\tgrid-template-areas:\n\t\t'topbar topbar'\n\t\t'content content';\n\n\t@screen desktop-xs {\n\t\tgrid-template-areas:\n\t\t\t'topbar topbar'\n\t\t\t'content sidebar';\n\t}\n\n\t.sidebar {\n\t\t@apply hidden w-unset desktop-xs:flex;\n\t\t@apply order-3 p-2;\n\t\t@apply flex-1 overflow-hidden;\n\n\t\t.inner-content {\n\t\t\t@apply p-2;\n\t\t}\n\t}\n\n\t.content {\n\t\t@apply order-3 desktop-xs:order-2;\n\t\t@apply items-center desktop-xs:justify-center;\n\n\t\t.inner-content {\n\t\t\t@apply box-border;\n\t\t\t@apply desktop-xs:px-18 desktop-xs:py-0;\n\t\t\t@apply w-full tablet:w-content-desktop-login;\n\n\t\t\t@apply px-content-mobile-x py-content-mobile-y;\n\t\t\tpadding-top: calc(env(safe-area-inset-top) + 3.5rem);\n\n\t\t\t@screen desktop-xs {\n\t\t\t\t@apply pt-content-mobile-y;\n\t\t\t}\n\t\t}\n\t}\n}\n\n:host(.variant-office) {\n\t.sidebar {\n\t\t@apply desktop-sm:w-sidebar-office-desktop;\n\t}\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n\ttag: 'p-layout',\n\tstyleUrl: 'layout.component.scss',\n\tshadow: true,\n})\nexport class Layout {\n\t/**\n\t * Variant of the layout\n\t */\n\t@Prop() variant: 'default' | 'login' | 'office' = 'default';\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={`p-layout variant-${this.variant}`}>\n\t\t\t\t<div class=\"topbar\">\n\t\t\t\t\t<slot name=\"topbar\" />\n\t\t\t\t</div>\n\t\t\t\t<div class=\"sidebar\">\n\t\t\t\t\t<slot name=\"sidebar\" />\n\t\t\t\t</div>\n\t\t\t\t<div class=\"content\">\n\t\t\t\t\t<div class=\"inner-content\">\n\t\t\t\t\t\t<slot name=\"content\" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"mappings":"kDAAA,MAAMA,EAAqB,ynH,MCOdC,EAAM,M,sCAIgC,S,CAElD,MAAAC,GACC,OACCC,EAACC,EAAI,CAACC,MAAO,oBAAoBC,KAAKC,WACrCJ,EAAA,OAAKE,MAAM,UACVF,EAAA,QAAMK,KAAK,YAEZL,EAAA,OAAKE,MAAM,WACVF,EAAA,QAAMK,KAAK,aAEZL,EAAA,OAAKE,MAAM,WACVF,EAAA,OAAKE,MAAM,iBACVF,EAAA,QAAMK,KAAK,c"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["selectComponentCss","Select","_items","this","items","loading","JSON","parse","displayKey","valueKey","map","str","value","text","_a","query","length","asyncFilter","filter","item","queryKey","_checkvalue","_identifierKey","slice","maxDisplayedItems","_displayValue","multi","_selectedItem","_b","i","_c","_d","selectionDisplayKey","identifierKey","componentDidLoad","Error","_setMultiContainerMaxWidth","_resizeObserver","ResizeObserver","_resizeDebounceTimer","clearTimeout","setTimeout","_checkSelectedItems","observe","_el","_valueChange","itemChanges","componentDidRender","disconnectedCallback","disconnect","render","h","Host","class","disableTriggerClick","calculateWidth","insideClick","scrollable","show","_showDropdown","onIsOpen","ev","_onDropdownOpen","slot","icon","size","prefix","label","helper","required","error","disabled","focused","focusMethod","type","placeholder","onFocus","_onFocus","onMouseDown","_onMouseDown","onClick","_onClick","ref","_inputRef","showChevron","variant","_getLoadingItems","_getItems","showAddItem","_getAddItem","_multiContainerRef","_selectValue","_amountHidden","documentClickHandler","target","childOf","_preselectItem","_showDropdownChanges","dropdownShown","emit","multiChanges","Array","isArray","valueChange","includes","autoSelectFirst","identifier","parsedValue","stringify","currentValue","currentParsedValue","find","itemIdentifier","parsedItemIdentifier","forceBlur","selectedItem","valueArray","includesIndex","findIndex","push","splice","_onBlur","preventDefault","blur","enableAutocomplete","force","_onAutoComplete","queryChange","key","toString","toLowerCase","indexOf","active","avatarKey","src","letters","avatarLettersKey","dropdownDisplayKey","emptyStateText","enableSelectAll","unshift","_selectAllChange","_allSelected","selectAllIcon","selectAllText","_getAutoCompleteItem","add","addItemText","enableHover","autocompletePlaceholder","onInput","autocompleteInputRef","style","maxWidth","clientWidth","containerRect","getBoundingClientRect","from","querySelectorAll","amountHidden","child","classList","remove","childRect","right","extra","querySelector","contains","detail","focus","selectAllChange"],"sources":["src/components/molecules/select/select.component.scss?tag=p-select","src/components/molecules/select/select.component.tsx"],"sourcesContent":["@import '../../../style/form/mixins';\n\np-select {\n\t@apply flex w-full flex-col relative text-ellipsis;\n\n\t.p-input {\n\t\t@include inputDefaultState();\n\t}\n\n\t.multi-container {\n\t\t@apply absolute bottom-0 left-0 h-10 flex gap-2 items-center px-2 py-4 overflow-hidden pointer-events-none w-full;\n\n\t\t&.size-small {\n\t\t\t@apply px-1 py-2 h-8;\n\t\t}\n\n\t\t.item {\n\t\t\t@apply bg-indigo-light rounded px-2 flex gap-2 items-center cursor-pointer text-indigo-dark h-[1.625rem] text-sm font-semibold pointer-events-auto whitespace-nowrap;\n\n\t\t\tp-icon {\n\t\t\t\t@apply text-indigo text-xs;\n\t\t\t}\n\t\t}\n\n\t\t.extra {\n\t\t\t@apply text-sm text-storm-medium pointer-events-none;\n\t\t}\n\t}\n}\n","import {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tState,\n\tWatch,\n} from '@stencil/core';\n\nimport { childOf } from '../../../utils';\nimport { IconVariant } from '../../atoms/icon/icon.component';\n\n@Component({\n\ttag: 'p-select',\n\tstyleUrl: 'select.component.scss',\n\tshadow: false,\n})\nexport class Select {\n\t/**\n\t * The items to show in the dropdown\n\t */\n\t@Prop() items: string | any[];\n\n\t/**\n\t * Wether to enable multi select\n\t */\n\t@Prop({ reflect: true }) multi: boolean;\n\n\t/**\n\t * Icon of the select box\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * The current query\n\t */\n\t@Prop() query: string;\n\n\t/**\n\t * The placeholder of the input\n\t */\n\t@Prop() placeholder: string;\n\n\t/**\n\t * The placeholder of the input used for auto complete\n\t */\n\t@Prop() autocompletePlaceholder: string = 'Search...';\n\n\t/**\n\t * The current value\n\t */\n\t@Prop() value: any;\n\n\t/**\n\t * The key of the object to display\n\t */\n\t@Prop() displayKey: string = 'text';\n\n\t/**\n\t * The key of the object to display in the dropdown (overwrites displayKey)\n\t */\n\t@Prop() dropdownDisplayKey: string | undefined;\n\n\t/**\n\t * The key of the object to display in the input (overwrites displayKey)\n\t */\n\t@Prop() selectionDisplayKey: string | undefined;\n\n\t/**\n\t * The key of the object to return\n\t */\n\t@Prop() valueKey: string;\n\n\t/**\n\t * The key of avatar within an item to show\n\t */\n\t@Prop() avatarKey: string;\n\n\t/**\n\t * The key of avatar letters within an item to show when the avatar url doesn't work\n\t */\n\t@Prop() avatarLettersKey: string;\n\n\t/**\n\t * The key to identify an object\n\t */\n\t@Prop() identifierKey: string;\n\n\t/**\n\t * The key of the object to display\n\t */\n\t@Prop() queryKey?: string;\n\n\t/**\n\t * Wether to automatically select the first item\n\t */\n\t@Prop() autoSelectFirst: boolean = true;\n\n\t/**\n\t * Wether to show the chevron or not\n\t */\n\t@Prop() showChevron: boolean = true;\n\n\t/**\n\t * The maximum amount of items to display\n\t */\n\t@Prop() maxDisplayedItems: number = 10;\n\n\t/**\n\t * Wether to enable autocomplete\n\t */\n\t@Prop() enableAutocomplete: boolean = true;\n\n\t/**\n\t * Wether the input uses async filtering\n\t */\n\t@Prop() asyncFilter: boolean = false;\n\n\t/**\n\t * Wether to show loading items\n\t */\n\t@Prop() loading: boolean = false;\n\n\t/**\n\t * Wether to show the select all item with multi select\n\t */\n\t@Prop() enableSelectAll: boolean = false;\n\n\t/**\n\t * The text of the select all item\n\t */\n\t@Prop() selectAllText: string = 'Select all';\n\n\t/**\n\t * The icon to prefix for select all\n\t */\n\t@Prop() selectAllIcon: IconVariant | undefined;\n\n\t/**\n\t * Event when the query of the autocomplete changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tqueryChange: EventEmitter<string>;\n\n\t/**\n\t * Event when the value changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tvalueChange: EventEmitter<any>;\n\n\t/**\n\t * Event when the select all item has been selected or not\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tselectAllChange: EventEmitter<any>;\n\n\t/**\n\t * Event when the dropdown shows\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tdropdownShown: EventEmitter<any>;\n\n\t/**\n\t * The size of the input group used by the select\n\t */\n\t@Prop() size: 'small' | 'medium' = 'medium';\n\n\t/**\n\t * The prefix of the input group used by the select\n\t */\n\t@Prop() prefix: string;\n\n\t/**\n\t * The label of the input group used by the select\n\t */\n\t@Prop() label: string;\n\n\t/**\n\t * The helper of the input group used by the select\n\t */\n\t@Prop() helper: string;\n\n\t/**\n\t * Wether the field is required\n\t */\n\t@Prop({ reflect: true }) required: boolean;\n\n\t/**\n\t * The helper of the input group used by the select\n\t */\n\t@Prop({ reflect: true }) error: string;\n\n\t/**\n\t * Wether the input group is disabled used by the select\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether to show a \"add\" item\n\t */\n\t@Prop() showAddItem: boolean = false;\n\n\t/**\n\t * The text to show when add item is being shown\n\t */\n\t@Prop() addItemText: string = 'Add item';\n\n\t/**\n\t * Event when the add item is clicked\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tadd: EventEmitter;\n\n\t/**\n\t * The text to show when items is empty\n\t */\n\t@Prop() emptyStateText: string = 'No items available';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _showDropdown: any = false;\n\t@State() private _selectedItem: any = null;\n\n\t@State() private _allSelected: boolean = false;\n\n\t@State() private _amountHidden = 0;\n\n\tprivate _inputRef: HTMLInputElement;\n\tprivate autocompleteInputRef: HTMLInputElement;\n\tprivate _multiContainerRef: HTMLElement;\n\n\tprivate _resizeObserver: ResizeObserver;\n\tprivate _resizeDebounceTimer: NodeJS.Timer;\n\n\tget _items() {\n\t\tif (!this.items || this.loading) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet items =\n\t\t\ttypeof this.items === 'string'\n\t\t\t\t? JSON.parse(this.items)\n\t\t\t\t: this.items;\n\n\t\tif (typeof items?.[0] === 'string') {\n\t\t\tthis.displayKey = 'text';\n\t\t\tthis.valueKey = 'value';\n\n\t\t\titems = items.map((str) => ({\n\t\t\t\tvalue: str,\n\t\t\t\ttext: str,\n\t\t\t}));\n\t\t}\n\n\t\tif (this.query?.length && !this.asyncFilter) {\n\t\t\titems = items.filter((item) => {\n\t\t\t\tif (this.queryKey) {\n\t\t\t\t\treturn this._checkvalue(this.queryKey, item);\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\tthis._checkvalue(this._identifierKey, item) ||\n\t\t\t\t\tthis._checkvalue(this.displayKey, item)\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\n\t\treturn items?.slice(0, this.maxDisplayedItems);\n\t}\n\n\tget _displayValue() {\n\t\tif (this.multi) {\n\t\t\tif (!this._selectedItem?.length) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\treturn this._selectedItem\n\t\t\t\t?.map((i) => i?.[this.displayKey])\n\t\t\t\t.filter((i) => !!i);\n\t\t}\n\n\t\treturn this._selectedItem?.[\n\t\t\tthis.selectionDisplayKey ?? this.displayKey\n\t\t];\n\t}\n\n\tget _identifierKey() {\n\t\treturn this.identifierKey ?? this.valueKey ?? 'value';\n\t}\n\n\tcomponentDidLoad() {\n\t\tif (!this.valueKey && !this.identifierKey) {\n\t\t\tthrow new Error('You must provide a valueKey or identifierKey');\n\t\t}\n\n\t\tif (this.multi) {\n\t\t\tthis._setMultiContainerMaxWidth();\n\n\t\t\tthis._resizeObserver = new ResizeObserver(() => {\n\t\t\t\tif (this._resizeDebounceTimer) {\n\t\t\t\t\tclearTimeout(this._resizeDebounceTimer);\n\t\t\t\t\tthis._resizeDebounceTimer = null;\n\t\t\t\t}\n\n\t\t\t\tthis._resizeDebounceTimer = setTimeout(() => {\n\t\t\t\t\tthis._setMultiContainerMaxWidth();\n\t\t\t\t\tthis._checkSelectedItems();\n\t\t\t\t}, 200);\n\t\t\t});\n\t\t\tthis._resizeObserver.observe(this._el);\n\t\t}\n\n\t\tif (this.value) {\n\t\t\tthis._valueChange();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.itemChanges();\n\t}\n\n\tcomponentDidRender() {\n\t\tif (this.multi) {\n\t\t\tthis._setMultiContainerMaxWidth();\n\t\t\tthis._checkSelectedItems();\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tif (this.multi) {\n\t\t\tthis._resizeObserver.disconnect();\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-select\">\n\t\t\t\t<p-dropdown\n\t\t\t\t\tdisableTriggerClick={true}\n\t\t\t\t\tcalculateWidth={true}\n\t\t\t\t\tinsideClick={true}\n\t\t\t\t\tscrollable={true}\n\t\t\t\t\tshow={this._showDropdown}\n\t\t\t\t\tonIsOpen={(ev) => this._onDropdownOpen(ev)}\n\t\t\t\t>\n\t\t\t\t\t<p-input-group\n\t\t\t\t\t\tslot=\"trigger\"\n\t\t\t\t\t\ticon={this.icon}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\tprefix={this.prefix}\n\t\t\t\t\t\tlabel={this.label}\n\t\t\t\t\t\thelper={this.helper}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\terror={this.error}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tfocused={this._showDropdown}\n\t\t\t\t\t\tfocusMethod=\"click\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tslot=\"input\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tthis.multi && this._displayValue?.length\n\t\t\t\t\t\t\t\t\t? ' '\n\t\t\t\t\t\t\t\t\t: this._displayValue\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tclass=\"p-input cursor-pointer read-only\"\n\t\t\t\t\t\t\tonFocus={(ev) => this._onFocus(ev)}\n\t\t\t\t\t\t\tonMouseDown={(ev) => this._onMouseDown(ev)}\n\t\t\t\t\t\t\tonClick={() => this._onClick()}\n\t\t\t\t\t\t\tref={(ref) => (this._inputRef = ref)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t{this.showChevron && (\n\t\t\t\t\t\t\t<p-icon variant=\"chevron\" slot=\"suffix\" />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</p-input-group>\n\t\t\t\t\t<div slot=\"items\">\n\t\t\t\t\t\t{this.loading\n\t\t\t\t\t\t\t? this._getLoadingItems()\n\t\t\t\t\t\t\t: this._getItems()}\n\t\t\t\t\t\t{this.showAddItem && this._getAddItem()}\n\t\t\t\t\t</div>\n\t\t\t\t</p-dropdown>\n\n\t\t\t\t{this.multi && this._selectedItem?.length > 0 && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={`multi-container size-${this.size}`}\n\t\t\t\t\t\tref={(ref) => (this._multiContainerRef = ref)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this._selectedItem.map((item) => (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass=\"item\"\n\t\t\t\t\t\t\t\tonClick={() => this._selectValue(item)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\titem[\n\t\t\t\t\t\t\t\t\t\tthis.selectionDisplayKey ??\n\t\t\t\t\t\t\t\t\t\t\tthis.displayKey\n\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t<p-icon variant=\"negative\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\n\t\t\t\t\t\t<div class=\"extra hidden\">+{this._amountHidden}</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('click', { target: 'document', capture: true })\n\tprotected documentClickHandler({ target }) {\n\t\tif (!this._showDropdown || childOf(target, this._el)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = false;\n\t}\n\n\t@Watch('value')\n\tprivate _valueChange() {\n\t\tthis._preselectItem();\n\t}\n\n\t@Watch('items')\n\tpublic itemChanges() {\n\t\tthis._preselectItem();\n\t}\n\n\t@Watch('_showDropdown')\n\tpublic _showDropdownChanges() {\n\t\tthis.dropdownShown.emit({\n\t\t\tvalue: this._showDropdown,\n\t\t\tquery: this.query,\n\t\t});\n\t}\n\n\t@Watch('multi')\n\tpublic multiChanges() {\n\t\tif (this._selectedItem && !Array.isArray(this._selectedItem)) {\n\t\t\tthis._selectedItem = [];\n\t\t}\n\t}\n\n\tprivate _preselectItem() {\n\t\tlet value =\n\t\t\ttypeof this.value === 'string' && this.multi\n\t\t\t\t? JSON.parse(this.value)\n\t\t\t\t: this.value;\n\n\t\tif (this.multi) {\n\t\t\tif (!Array.isArray(value)) {\n\t\t\t\tthis.value = [];\n\t\t\t\tthis.valueChange.emit(this.value);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.value = value;\n\t\t\tif (!value.length) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._selectedItem =\n\t\t\t\t!!this.valueKey && this.valueKey !== 'false'\n\t\t\t\t\t? this._items.filter((i) =>\n\t\t\t\t\t\t\tvalue.includes(i?.[this.valueKey])\n\t\t\t\t\t\t)\n\t\t\t\t\t: [...value];\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._selectedItem && !value && this.autoSelectFirst) {\n\t\t\tvalue = this._items[0];\n\t\t}\n\n\t\tconst identifier =\n\t\t\ttypeof value === 'object' && value !== null\n\t\t\t\t? value[this._identifierKey]\n\t\t\t\t: value;\n\t\tconst parsedValue =\n\t\t\ttypeof identifier === 'string' || typeof identifier === 'number'\n\t\t\t\t? identifier\n\t\t\t\t: JSON.stringify(identifier);\n\n\t\tconst currentValue = this._selectedItem\n\t\t\t? this._selectedItem?.[this._identifierKey]\n\t\t\t: null;\n\t\tconst currentParsedValue =\n\t\t\ttypeof currentValue === 'string' || typeof currentValue === 'number'\n\t\t\t\t? currentValue\n\t\t\t\t: JSON.stringify(currentValue);\n\n\t\tif (this._selectedItem && currentParsedValue === parsedValue) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._items?.length && value) {\n\t\t\tthis._selectValue(value, false);\n\t\t\treturn;\n\t\t}\n\n\t\tconst item = this._items.find((i) => {\n\t\t\tconst itemIdentifier = i?.[this._identifierKey];\n\t\t\tconst parsedItemIdentifier =\n\t\t\t\ttypeof itemIdentifier === 'string' ||\n\t\t\t\ttypeof itemIdentifier === 'number'\n\t\t\t\t\t? itemIdentifier\n\t\t\t\t\t: JSON.stringify(itemIdentifier);\n\n\t\t\treturn parsedItemIdentifier === parsedValue;\n\t\t});\n\n\t\tthis._selectValue(!!item ? item : value, false);\n\t}\n\n\tprivate _selectValue(item, forceBlur = true) {\n\t\tlet value =\n\t\t\t!!this.valueKey && this.valueKey !== 'false' && item !== null\n\t\t\t\t? item?.[this.valueKey]\n\t\t\t\t: item;\n\n\t\tif (this.multi) {\n\t\t\tif (!this._selectedItem || !Array.isArray(this._selectedItem)) {\n\t\t\t\tthis._selectedItem = [];\n\t\t\t}\n\n\t\t\tif (!this.value || !Array.isArray(this.value)) {\n\t\t\t\tthis.value = [];\n\t\t\t}\n\n\t\t\tconst selectedItem = [...this._selectedItem];\n\t\t\tconst valueArray = [...this.value];\n\n\t\t\tconst includesIndex = selectedItem.findIndex(\n\t\t\t\t(i) => i[this._identifierKey] === item[this._identifierKey]\n\t\t\t);\n\t\t\tif (includesIndex === -1) {\n\t\t\t\tselectedItem.push(item);\n\t\t\t\tvalueArray.push(value);\n\t\t\t} else {\n\t\t\t\tselectedItem.splice(includesIndex, 1);\n\t\t\t\tvalueArray.splice(includesIndex, 1);\n\t\t\t}\n\n\t\t\tthis._selectedItem = selectedItem;\n\t\t\tthis.value = valueArray;\n\t\t\tthis.valueChange.emit(valueArray);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._selectedItem = item;\n\t\tthis.value = value;\n\t\tthis.valueChange.emit(value);\n\n\t\tthis._onBlur(forceBlur);\n\t}\n\n\tprivate _onFocus(ev) {\n\t\tev.preventDefault();\n\t\tthis._inputRef.blur();\n\n\t\tif (!this._showDropdown) {\n\t\t\tthis._showDropdown = true;\n\t\t}\n\n\t\treturn;\n\t}\n\n\tprivate _onMouseDown(ev) {\n\t\tif (this.enableAutocomplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tev.preventDefault();\n\t}\n\n\tprivate _onClick() {\n\t\tif (this.enableAutocomplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = !this._showDropdown;\n\t}\n\n\tprivate _onBlur(force = false) {\n\t\tif (!this.enableAutocomplete && !force) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = false;\n\t}\n\n\tprivate _onAutoComplete(ev) {\n\t\tif (!this.enableAutocomplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = true;\n\n\t\tthis.query = ev.target.value;\n\t\tthis.queryChange.emit(ev.target.value);\n\t}\n\n\tprivate _checkvalue(key, item) {\n\t\treturn (\n\t\t\titem?.[key]\n\t\t\t\t?.toString()\n\t\t\t\t?.toLowerCase()\n\t\t\t\t.indexOf(this.query?.toLowerCase()) >= 0\n\t\t);\n\t}\n\n\tprivate _getItems() {\n\t\tlet items = this._items.map((item) => (\n\t\t\t<p-dropdown-menu-item\n\t\t\t\tonClick={() => this._selectValue(item)}\n\t\t\t\tactive={\n\t\t\t\t\tthis.multi &&\n\t\t\t\t\t!!this._selectedItem &&\n\t\t\t\t\tArray.isArray(this._selectedItem)\n\t\t\t\t\t\t? this._selectedItem.findIndex(\n\t\t\t\t\t\t\t\t(i) =>\n\t\t\t\t\t\t\t\t\ti[this._identifierKey] ===\n\t\t\t\t\t\t\t\t\titem[this._identifierKey]\n\t\t\t\t\t\t\t) >= 0\n\t\t\t\t\t\t: item[this._identifierKey] ===\n\t\t\t\t\t\t\tthis._selectedItem?.[this._identifierKey]\n\t\t\t\t}\n\t\t\t\tvariant={this.multi ? 'checkbox' : 'default'}\n\t\t\t>\n\t\t\t\t{this.avatarKey ? (\n\t\t\t\t\t<span class=\"flex items-center gap-2\">\n\t\t\t\t\t\t<p-avatar\n\t\t\t\t\t\t\tsize=\"xsmall\"\n\t\t\t\t\t\t\tsrc={item[this.avatarKey]}\n\t\t\t\t\t\t\tletters={item[this.avatarLettersKey]}\n\t\t\t\t\t\t></p-avatar>\n\t\t\t\t\t\t{item[this.dropdownDisplayKey ?? this.displayKey]}\n\t\t\t\t\t</span>\n\t\t\t\t) : (\n\t\t\t\t\titem[this.displayKey]\n\t\t\t\t)}\n\t\t\t</p-dropdown-menu-item>\n\t\t));\n\n\t\tif (!this._items.length) {\n\t\t\titems = [\n\t\t\t\t<p class=\"w-full p-2 text-storm-medium text-sm text-center\">\n\t\t\t\t\t{this.emptyStateText}\n\t\t\t\t</p>,\n\t\t\t];\n\t\t}\n\n\t\tif (this.enableSelectAll && this._items.length) {\n\t\t\titems.unshift(\n\t\t\t\t<p-dropdown-menu-item\n\t\t\t\t\tvariant=\"checkbox\"\n\t\t\t\t\tonClick={() => this._selectAllChange()}\n\t\t\t\t\tactive={this._allSelected}\n\t\t\t\t>\n\t\t\t\t\t{this.selectAllIcon?.length ? (\n\t\t\t\t\t\t<span class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t<div class=\"w-6 justify-center flex text-lg\">\n\t\t\t\t\t\t\t\t<p-icon variant={this.selectAllIcon} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{this.selectAllText}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) : (\n\t\t\t\t\t\tthis.selectAllText\n\t\t\t\t\t)}\n\t\t\t\t</p-dropdown-menu-item>\n\t\t\t);\n\t\t}\n\n\t\tif (this.enableAutocomplete) {\n\t\t\titems.unshift(this._getAutoCompleteItem());\n\t\t}\n\n\t\treturn items;\n\t}\n\n\tprivate _getAddItem() {\n\t\treturn (\n\t\t\t<p-dropdown-menu-item onClick={() => this.add.emit()}>\n\t\t\t\t<span class=\"text-indigo font-semibold flex gap-1 items-center\">\n\t\t\t\t\t{this.addItemText}\n\t\t\t\t\t<p-icon variant=\"plus\" />\n\t\t\t\t</span>\n\t\t\t</p-dropdown-menu-item>\n\t\t);\n\t}\n\n\tprivate _getLoadingItems() {\n\t\tconst items = [0, 0, 0].map(() => (\n\t\t\t<p-dropdown-menu-item enableHover={false}>\n\t\t\t\t<p-loader variant=\"ghost\" class=\"h-6 w-full rounded\" />\n\t\t\t</p-dropdown-menu-item>\n\t\t));\n\n\t\tif (this.enableAutocomplete) {\n\t\t\titems.unshift(this._getAutoCompleteItem());\n\t\t}\n\n\t\treturn items;\n\t}\n\n\tprivate _getAutoCompleteItem() {\n\t\treturn (\n\t\t\t<div class=\"bg-white sticky top-0 pt-2 pb-1 -mt-2\">\n\t\t\t\t<input\n\t\t\t\t\tclass=\"p-input size-small mb-2 sticky top-2\"\n\t\t\t\t\tplaceholder={this.autocompletePlaceholder}\n\t\t\t\t\tonInput={(ev) => this._onAutoComplete(ev)}\n\t\t\t\t\tref={(ref) => (this.autocompleteInputRef = ref)}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tprivate _setMultiContainerMaxWidth() {\n\t\tif (!this._inputRef || !this._multiContainerRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._multiContainerRef.style.maxWidth = `${this._inputRef.clientWidth - 16}px`;\n\t}\n\n\tprivate _checkSelectedItems() {\n\t\tif (!this._multiContainerRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst containerRect = this._multiContainerRef.getBoundingClientRect();\n\t\tconst items = Array.from(\n\t\t\tthis._multiContainerRef.querySelectorAll('.item')\n\t\t) as HTMLElement[];\n\n\t\tlet amountHidden = 0;\n\n\t\tfor (const child of items) {\n\t\t\tchild.classList.remove('hidden');\n\n\t\t\tconst childRect = child.getBoundingClientRect();\n\t\t\tif (childRect.right > containerRect.right) {\n\t\t\t\tchild.classList.add('hidden');\n\t\t\t\tamountHidden++;\n\t\t\t}\n\t\t}\n\n\t\tthis._amountHidden = amountHidden;\n\t\tconst extra = this._multiContainerRef.querySelector('.extra');\n\t\tif (!extra) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!extra.classList.contains('hidden')) {\n\t\t\textra.classList.add('hidden');\n\t\t}\n\n\t\tif (amountHidden > 0) {\n\t\t\textra.classList.remove('hidden');\n\t\t}\n\t}\n\n\tprivate _onDropdownOpen(ev) {\n\t\tif (!ev.detail || !this.autocompleteInputRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.autocompleteInputRef.focus();\n\t}\n\n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qB,IAAMA,GAAS/E,KAAKoJ,qBAAuBrE,I,CAMvC,0BAAA9C,GACP,IAAKjC,KAAKgF,YAAchF,KAAKuF,mBAAoB,CAChD,M,CAGDvF,KAAKuF,mBAAmB8D,MAAMC,SAAW,GAAGtJ,KAAKgF,UAAUuE,YAAc,M,CAGlE,mBAAAhH,GACP,IAAKvC,KAAKuF,mBAAoB,CAC7B,M,CAGD,MAAMiE,EAAgBxJ,KAAKuF,mBAAmBkE,wBAC9C,MAAMxJ,EAAQiG,MAAMwD,KACnB1J,KAAKuF,mBAAmBoE,iBAAiB,UAG1C,IAAIC,EAAe,EAEnB,IAAK,MAAMC,KAAS5J,EAAO,CAC1B4J,EAAMC,UAAUC,OAAO,UAEvB,MAAMC,EAAYH,EAAMJ,wBACxB,GAAIO,EAAUC,MAAQT,EAAcS,MAAO,CAC1CJ,EAAMC,UAAUf,IAAI,UACpBa,G,EAIF5J,KAAKyF,cAAgBmE,EACrB,MAAMM,EAAQlK,KAAKuF,mBAAmB4E,cAAc,UACpD,IAAKD,EAAO,CACX,M,CAGD,IAAKA,EAAMJ,UAAUM,SAAS,UAAW,CACxCF,EAAMJ,UAAUf,IAAI,S,CAGrB,GAAIa,EAAe,EAAG,CACrBM,EAAMJ,UAAUC,OAAO,S,EAIjB,eAAApG,CAAgBD,GACvB,IAAKA,EAAG2G,SAAWrK,KAAKoJ,qBAAsB,CAC7C,M,CAGDpJ,KAAKoJ,qBAAqBkB,O,CAGnB,gBAAA5B,GACP1I,KAAK2I,cAAgB3I,KAAK2I,aAC1B3I,KAAKuK,gBAAgBvE,KAAKhG,KAAK2I,a"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["drawerComponentCss","Drawer","this","_hasHeaderSlot","componentWillLoad","_el","querySelector","render","show","headerContent","h","name","bodyContent","Host","class","variant","applyBlur","onClicked","ev","_backdropClick","detail","closing","_closing","scrollLock","_a","header","length","showClose","onClose","close","backdropClickClose","closeClicked","emit","event","canClose","setTimeout","closed"],"sources":["src/components/organisms/drawer/drawer.component.scss?tag=p-drawer&encapsulation=shadow","src/components/organisms/drawer/drawer.component.tsx"],"sourcesContent":[":host {\n\t@apply block;\n}\n","import {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tProp,\n\tState,\n} from '@stencil/core';\n\n@Component({\n\ttag: 'p-drawer',\n\tstyleUrl: 'drawer.component.scss',\n\tshadow: true,\n})\nexport class Drawer {\n\t/**\n\t * The Header of the drawer\n\t */\n\t@Prop() header?: string;\n\n\t/**\n\t * Wether to show the drawer or not\n\t */\n\t@Prop() show: boolean = false;\n\n\t/**\n\t * Wether to apply blur to the backdrop\n\t */\n\t@Prop() applyBlur: boolean = false;\n\n\t/**\n\t * Wether to show the close on mobile in the header\n\t */\n\t@Prop() showClose = true;\n\n\t/**\n\t * Wether to hide the drawer when the backdrop is clicked\n\t */\n\t@Prop() backdropClickClose = true;\n\n\t/**\n\t * Wether the drawer can be closed\n\t */\n\t@Prop() canClose: boolean = true;\n\n\t/**\n\t * Wether we should scroll lock the body\n\t */\n\t@Prop() scrollLock: boolean = true;\n\n\t/**\n\t * Close click event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tcloseClicked: EventEmitter<{\n\t\tevent: MouseEvent;\n\t\tcanClose: boolean;\n\t}>;\n\n\t/**\n\t * Closed event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tclosed: EventEmitter<null>;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _hasHeaderSlot = false;\n\n\t@State() private _closing = false;\n\n\tcomponentWillLoad() {\n\t\tthis._hasHeaderSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"header\"]'\n\t\t);\n\t}\n\n\trender() {\n\t\tif (!this.show) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst headerContent = <slot name=\"header\" />;\n\t\tconst bodyContent = <slot name=\"content\" />;\n\n\t\treturn (\n\t\t\t<Host class=\"p-drawer\">\n\t\t\t\t<p-backdrop\n\t\t\t\t\tvariant=\"drawer\"\n\t\t\t\t\tapplyBlur={this.applyBlur}\n\t\t\t\t\tonClicked={(ev) => this._backdropClick(ev.detail)}\n\t\t\t\t\tclosing={this._closing}\n\t\t\t\t\tscrollLock={this.scrollLock}\n\t\t\t\t>\n\t\t\t\t\t<p-drawer-container closing={this._closing}>\n\t\t\t\t\t\t{(this.header?.length || this._hasHeaderSlot) && (\n\t\t\t\t\t\t\t<p-drawer-header\n\t\t\t\t\t\t\t\tshow-close={this.showClose}\n\t\t\t\t\t\t\t\tonClose={(ev) => this.close(ev.detail)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this._hasHeaderSlot\n\t\t\t\t\t\t\t\t\t? headerContent\n\t\t\t\t\t\t\t\t\t: this.header}\n\t\t\t\t\t\t\t</p-drawer-header>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<p-drawer-body>{bodyContent}</p-drawer-body>\n\t\t\t\t\t</p-drawer-container>\n\t\t\t\t</p-backdrop>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _backdropClick(ev) {\n\t\tif (!this.backdropClickClose) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.close(ev);\n\t}\n\n\tpublic close(ev: MouseEvent) {\n\t\tthis.closeClicked.emit({\n\t\t\tevent: ev,\n\t\t\tcanClose: this.canClose,\n\t\t});\n\n\t\tif (!this.canClose) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._closing = true;\n\n\t\tsetTimeout(() => {\n\t\t\tthis.show = false;\n\t\t\tthis._closing = false;\n\t\t\tthis.closed.emit();\n\t\t}, 250);\n\t}\n}\n"],"mappings":"gEAAA,MAAMA,EAAqB,gH,MCgBdC,EAAM,M,mGA4DVC,KAAAC,eAAiB,M,gCAnDD,M,eAKK,M,eAKT,K,wBAKS,K,cAKD,K,gBAKE,K,cA4BF,K,CAE5B,iBAAAC,GACCF,KAAKC,iBAAmBD,KAAKG,IAAIC,cAChC,2B,CAIF,MAAAC,G,MACC,IAAKL,KAAKM,KAAM,CACf,M,CAGD,MAAMC,EAAgBC,EAAA,QAAMC,KAAK,WACjC,MAAMC,EAAcF,EAAA,QAAMC,KAAK,YAE/B,OACCD,EAACG,EAAI,CAACC,MAAM,YACXJ,EAAA,cACCK,QAAQ,SACRC,UAAWd,KAAKc,UAChBC,UAAYC,GAAOhB,KAAKiB,eAAeD,EAAGE,QAC1CC,QAASnB,KAAKoB,SACdC,WAAYrB,KAAKqB,YAEjBb,EAAA,sBAAoBW,QAASnB,KAAKoB,aAC/BE,EAAAtB,KAAKuB,UAAM,MAAAD,SAAA,SAAAA,EAAEE,SAAUxB,KAAKC,iBAC7BO,EAAA,gCACaR,KAAKyB,UACjBC,QAAUV,GAAOhB,KAAK2B,MAAMX,EAAGE,SAE9BlB,KAAKC,eACHM,EACAP,KAAKuB,QAGVf,EAAA,qBAAgBE,K,CAOb,cAAAO,CAAeD,GACtB,IAAKhB,KAAK4B,mBAAoB,CAC7B,M,CAGD5B,KAAK2B,MAAMX,E,CAGL,KAAAW,CAAMX,GACZhB,KAAK6B,aAAaC,KAAK,CACtBC,MAAOf,EACPgB,SAAUhC,KAAKgC,WAGhB,IAAKhC,KAAKgC,SAAU,CACnB,M,CAGDhC,KAAKoB,SAAW,KAEhBa,YAAW,KACVjC,KAAKM,KAAO,MACZN,KAAKoB,SAAW,MAChBpB,KAAKkC,OAAOJ,MAAM,GAChB,I"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Modal","this","_hasFooterSlot","_hasHeaderSlot","componentWillLoad","_el","querySelector","render","show","headerContent","h","name","bodyContent","footerContent","Host","class","applyBlur","onClicked","ev","_backdropClick","detail","closing","_closing","scrollLock","size","_a","header","length","showClose","onClose","close","variant","rounded","padding","backdropClickClose","closeClicked","emit","setTimeout","closed"],"sources":["src/components/organisms/modal/modal.component.tsx"],"sourcesContent":["import {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tProp,\n\tState,\n} from '@stencil/core';\n\n@Component({\n\ttag: 'p-modal',\n\tshadow: true,\n})\nexport class Modal {\n\t/**\n\t * The size of the modal container\n\t */\n\t@Prop() size: 'sm' | 'md' | 'lg' | 'xl' = 'md';\n\n\t/**\n\t * The variant of the modal body\n\t */\n\t@Prop() variant: 'default' | 'table' | 'table-flush' = 'default';\n\n\t/**\n\t * The Header of the modal\n\t */\n\t@Prop() header?: string;\n\n\t/**\n\t * Wether to show the modal or not\n\t */\n\t@Prop() show: boolean = false;\n\n\t/**\n\t * Wether to apply blur to the backdrop\n\t */\n\t@Prop() applyBlur: boolean = false;\n\n\t/**\n\t * Wether to show the close button in the header\n\t */\n\t@Prop() showClose = true;\n\n\t/**\n\t * Wether to show the footer on mobile\n\t */\n\t@Prop() showMobileFooter = false;\n\n\t/**\n\t * Wether to hide the modal when the backdrop is clicked\n\t */\n\t@Prop() backdropClickClose = true;\n\n\t/**\n\t * Wether we should scroll lock the body\n\t */\n\t@Prop() scrollLock: boolean = true;\n\n\t/**\n\t * Wether the body should have padding\n\t */\n\t@Prop() padding: boolean = true;\n\n\t/**\n\t * Close click event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tcloseClicked: EventEmitter<MouseEvent>;\n\n\t/**\n\t * Closed event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tclosed: EventEmitter<null>;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _hasFooterSlot = false;\n\tprivate _hasHeaderSlot = false;\n\n\t@State() private _closing = false;\n\n\tcomponentWillLoad() {\n\t\tthis._hasFooterSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"footer\"]'\n\t\t);\n\t\tthis._hasHeaderSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"header\"]'\n\t\t);\n\t}\n\n\trender() {\n\t\tif (!this.show) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst headerContent = <slot name=\"header\" />;\n\t\tconst bodyContent = <slot name=\"content\" />;\n\t\tconst footerContent = <slot name=\"footer\" />;\n\n\t\treturn (\n\t\t\t<Host class=\"p-modal\">\n\t\t\t\t<p-backdrop\n\t\t\t\t\tapplyBlur={this.applyBlur}\n\t\t\t\t\tonClicked={(ev) => this._backdropClick(ev.detail)}\n\t\t\t\t\tclosing={this._closing}\n\t\t\t\t\tscrollLock={this.scrollLock}\n\t\t\t\t>\n\t\t\t\t\t<p-modal-container size={this.size} closing={this._closing}>\n\t\t\t\t\t\t{(this.header?.length || this._hasHeaderSlot) && (\n\t\t\t\t\t\t\t<p-modal-header\n\t\t\t\t\t\t\t\tshowClose={this.showClose}\n\t\t\t\t\t\t\t\tonClose={(ev) => this.close(ev.detail)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this._hasHeaderSlot\n\t\t\t\t\t\t\t\t\t? headerContent\n\t\t\t\t\t\t\t\t\t: this.header}\n\t\t\t\t\t\t\t</p-modal-header>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<p-modal-body\n\t\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\t\trounded={!this._hasFooterSlot}\n\t\t\t\t\t\t\tpadding={this.padding}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{bodyContent}\n\t\t\t\t\t\t</p-modal-body>\n\t\t\t\t\t\t{this._hasFooterSlot && (\n\t\t\t\t\t\t\t<p-modal-footer>{footerContent}</p-modal-footer>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</p-modal-container>\n\t\t\t\t</p-backdrop>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _backdropClick(ev: MouseEvent) {\n\t\tif (!this.backdropClickClose) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.close(ev);\n\t}\n\n\tpublic close(ev: MouseEvent) {\n\t\tthis.closeClicked.emit(ev);\n\n\t\tthis._closing = true;\n\n\t\tsetTimeout(() => {\n\t\t\tthis.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