@paperless/core 1.67.7 → 1.67.9
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 +23 -0
- package/dist/build/{p-3fca8a68.entry.js → p-32ec455c.entry.js} +2 -2
- package/dist/build/{p-3fca8a68.entry.js.map → p-32ec455c.entry.js.map} +1 -1
- package/dist/build/p-3e3a79b1.entry.js +2 -0
- package/dist/build/p-3e3a79b1.entry.js.map +1 -0
- package/dist/build/p-59014c4c.entry.js +2 -0
- package/dist/build/{p-ac60e1f8.entry.js.map → p-59014c4c.entry.js.map} +1 -1
- package/dist/build/{p-9d32d95a.entry.js → p-744f5a41.entry.js} +2 -2
- package/dist/build/{p-9d32d95a.entry.js.map → p-744f5a41.entry.js.map} +1 -1
- package/dist/build/p-a689640d.entry.js +2 -0
- package/dist/build/p-a689640d.entry.js.map +1 -0
- package/dist/build/p-f07e2154.entry.js +2 -0
- package/dist/{paperless/p-05d63d59.entry.js.map → build/p-f07e2154.entry.js.map} +1 -1
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/p-dropdown_2.cjs.entry.js +3 -3
- package/dist/cjs/p-dropdown_2.cjs.entry.js.map +1 -1
- package/dist/cjs/p-profile.cjs.entry.js +2 -2
- package/dist/cjs/p-profile.cjs.entry.js.map +1 -1
- package/dist/cjs/p-stepper-item.cjs.entry.js +1 -1
- package/dist/cjs/p-stepper-item.cjs.entry.js.map +1 -1
- package/dist/cjs/p-stepper.cjs.entry.js +7 -1
- package/dist/cjs/p-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/p-tab-item.cjs.entry.js +1 -1
- package/dist/cjs/p-tab-item.cjs.entry.js.map +1 -1
- package/dist/cjs/p-table.cjs.entry.js +1 -1
- package/dist/cjs/p-table.cjs.entry.js.map +1 -1
- package/dist/collection/components/atoms/stepper-item/stepper-item.component.css +1 -1
- package/dist/collection/components/atoms/tab-item/tab-item.component.css +1 -1
- package/dist/collection/components/molecules/dropdown/dropdown.component.css +1 -1
- package/dist/collection/components/molecules/dropdown/dropdown.component.js +2 -2
- package/dist/collection/components/molecules/dropdown/dropdown.component.js.map +1 -1
- package/dist/collection/components/molecules/profile/profile.component.css +1 -1
- package/dist/collection/components/molecules/profile/profile.component.js +1 -1
- package/dist/collection/components/molecules/profile/profile.component.js.map +1 -1
- package/dist/collection/components/molecules/stepper/stepper.component.js +7 -1
- package/dist/collection/components/molecules/stepper/stepper.component.js.map +1 -1
- package/dist/collection/components/organisms/table/table.component.css +1 -1
- package/dist/components/dropdown.component.js +3 -3
- package/dist/components/dropdown.component.js.map +1 -1
- package/dist/components/p-profile.js +2 -2
- package/dist/components/p-profile.js.map +1 -1
- package/dist/components/p-stepper-item.js +1 -1
- package/dist/components/p-stepper-item.js.map +1 -1
- package/dist/components/p-stepper.js +7 -1
- package/dist/components/p-stepper.js.map +1 -1
- package/dist/components/p-tab-item.js +1 -1
- package/dist/components/p-tab-item.js.map +1 -1
- package/dist/components/p-table.js +1 -1
- package/dist/components/p-table.js.map +1 -1
- package/dist/esm/p-dropdown_2.entry.js +3 -3
- package/dist/esm/p-dropdown_2.entry.js.map +1 -1
- package/dist/esm/p-profile.entry.js +2 -2
- package/dist/esm/p-profile.entry.js.map +1 -1
- package/dist/esm/p-stepper-item.entry.js +1 -1
- package/dist/esm/p-stepper-item.entry.js.map +1 -1
- package/dist/esm/p-stepper.entry.js +7 -1
- package/dist/esm/p-stepper.entry.js.map +1 -1
- package/dist/esm/p-tab-item.entry.js +1 -1
- package/dist/esm/p-tab-item.entry.js.map +1 -1
- package/dist/esm/p-table.entry.js +1 -1
- package/dist/esm/p-table.entry.js.map +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/{p-3fca8a68.entry.js → p-32ec455c.entry.js} +2 -2
- package/dist/paperless/{p-3fca8a68.entry.js.map → p-32ec455c.entry.js.map} +1 -1
- package/dist/paperless/p-3e3a79b1.entry.js +2 -0
- package/dist/paperless/p-3e3a79b1.entry.js.map +1 -0
- package/dist/paperless/p-59014c4c.entry.js +2 -0
- package/dist/paperless/{p-ac60e1f8.entry.js.map → p-59014c4c.entry.js.map} +1 -1
- package/dist/paperless/{p-9d32d95a.entry.js → p-744f5a41.entry.js} +2 -2
- package/dist/paperless/{p-9d32d95a.entry.js.map → p-744f5a41.entry.js.map} +1 -1
- package/dist/paperless/p-a689640d.entry.js +2 -0
- package/dist/paperless/p-a689640d.entry.js.map +1 -0
- package/dist/paperless/p-f07e2154.entry.js +2 -0
- package/dist/{build/p-05d63d59.entry.js.map → paperless/p-f07e2154.entry.js.map} +1 -1
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/hydrate/index.js +15 -9
- package/package.json +1 -1
- package/dist/build/p-05d63d59.entry.js +0 -2
- package/dist/build/p-1a725037.entry.js +0 -2
- package/dist/build/p-1a725037.entry.js.map +0 -1
- package/dist/build/p-ac60e1f8.entry.js +0 -2
- package/dist/build/p-b25507db.entry.js +0 -2
- package/dist/build/p-b25507db.entry.js.map +0 -1
- package/dist/paperless/p-05d63d59.entry.js +0 -2
- package/dist/paperless/p-1a725037.entry.js +0 -2
- package/dist/paperless/p-1a725037.entry.js.map +0 -1
- package/dist/paperless/p-ac60e1f8.entry.js +0 -2
- package/dist/paperless/p-b25507db.entry.js +0 -2
- package/dist/paperless/p-b25507db.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stepper.component.js","sourceRoot":"","sources":["../../../../src/components/molecules/stepper/stepper.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOzE,MAAM,OAAO,OAAO;;IA6BX,uBAAkB,GAAG,GAAG,EAAE;MACjC,IAAI,IAAI,CAAC,gBAAgB,EAAE;QAC1B,YAAY,CAAC,IAAI,CAAC,gBAAgB,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IAAI,CAAC,SAAS,CAAC;QAChC,IAAI,CAAC,KAAK;UACT,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"stepper.component.js","sourceRoot":"","sources":["../../../../src/components/molecules/stepper/stepper.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOzE,MAAM,OAAO,OAAO;;IA6BX,uBAAkB,GAAG,GAAG,EAAE;MACjC,IAAI,IAAI,CAAC,gBAAgB,EAAE;QAC1B,YAAY,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACpC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;OAC7B;MAED,IAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC;IACrE,CAAC,CAAC;IAEM,mBAAc,GAAG,KAAK,IAAI,EAAE;MACnC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;QACd,OAAO;OACP;MAED,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,CAAC;MAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;MAE1D,IAAI,gBAAgB,GAAG,KAAK,CAAC;MAC7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAG,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,CAAA,EAAE,CAAC,EAAE,EAAE;QACvC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAQ,CAAC;QAElC,IAAI,IAAI,CAAC,gBAAgB,EAAE;UAC1B,IAAI,CAAC,MAAM,GAAG,CAAC,KAAK,UAAU,CAAC;UAC/B,IAAI,CAAC,QAAQ,GA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AAC,CAAC;EACxC,CAAC;EAED,kBAAkB;IACjB,IAAI,IAAI,CAAC,eAAe,EAAE;MACzB,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC;KAClC;EACF,CAAC;EAED,MAAM;IACL,OAAO,CACN,EAAC,IAAI,IAAC,KAAK,EAAC,WAAW;MACtB,YAAM,YAAY,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,kBAAkB,EAAE,GAAI,CACjD,CACP,CAAC;EACH,CAAC;EAGS,mBAAmB;IAC5B,IAAI,CAAC,kBAAkB,EAAE,CAAC;EAC3B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\n\n@Component({\n\ttag: 'p-stepper',\n\tstyleUrl: 'stepper.component.scss',\n\tshadow: true,\n})\nexport class Stepper {\n\t/**\n\t * The currently active step\n\t */\n\t@Prop() activeStep: number = 1;\n\n\t/**\n\t * Wether to automatically apply active & finished to items\n\t */\n\t@Prop() enableAutoStatus: boolean = true;\n\n\t/**\n\t * The direction of the stepper\n\t */\n\t@Prop({ reflect: true }) direction: 'horizontal' | 'vertical' = 'horizontal';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop({ reflect: true }) contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _generateTimeout: NodeJS.Timer;\n\tprivate _resizeObserver: ResizeObserver;\n\n\tprivate _generateStepsOnce = () => {\n\t\tif (this._generateTimeout) {\n\t\t\tclearTimeout(this._generateTimeout);\n\t\t\tthis._generateTimeout = null;\n\t\t}\n\n\t\tthis._generateTimeout = setTimeout(() => this._generateSteps(), 50);\n\t};\n\n\tprivate _generateSteps = async () => {\n\t\tif (!this._el) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet activeStep = this.activeStep - 1 || 0;\n\t\tconst items = this._el.querySelectorAll('p-stepper-item');\n\n\t\tlet directionChanged = false;\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\tif (this.enableAutoStatus) {\n\t\t\t\titem.active = i === activeStep;\n\t\t\t\titem.finished = i < activeStep;\n\t\t\t}\n\n\t\t\tif (!this.activeStep || activeStep < 0) {\n\t\t\t\tif (item.active) {\n\t\t\t\t\tactiveStep = i;\n\t\t\t\t}\n\n\t\t\t\tif (activeStep < 0 && item.finished) {\n\t\t\t\t\tactiveStep = i + 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (item.direction !== this.direction && !directionChanged) {\n\t\t\t\tdirectionChanged = true;\n\t\t\t}\n\n\t\t\titem.direction = this.direction;\n\t\t\titem.align =\n\t\t\t\tthis.direction === 'vertical'\n\t\t\t\t\t? 'start'\n\t\t\t\t\t: i === 0\n\t\t\t\t\t? 'start'\n\t\t\t\t\t: i === items?.length - 1\n\t\t\t\t\t? 'end'\n\t\t\t\t\t: 'center';\n\t\t\titem.contentPosition = this.contentPosition;\n\t\t}\n\n\t\tif (directionChanged) {\n\t\t\t// super hacky way to ensure all elements that have a direction changed are re-rendered\n\t\t\tawait new Promise(resolve => setTimeout(resolve, 200));\n\t\t}\n\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\tif (i < items.length - 1) {\n\t\t\t\tlet nextItem = item.nextElementSibling;\n\n\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {\n\t\t\t\t\tconst stepperLine = document.createElement('p-stepper-line');\n\t\t\t\t\tthis._el.insertBefore(stepperLine, nextItem);\n\t\t\t\t\tthis._setStepperLineData(stepperLine, item, nextItem, i, activeStep);\n\n\t\t\t\t\tconst previous = stepperLine.previousElementSibling;\n\t\t\t\t\tif (previous && previous.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\t\tprevious.remove();\n\t\t\t\t\t}\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\tconst stepperLine = nextItem;\n\t\t\t\t\tnextItem = nextItem.nextElementSibling;\n\n\t\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {\n\t\t\t\t\t\tthis._setStepperLineData(\n\t\t\t\t\t\t\tstepperLine,\n\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\tnextItem,\n\t\t\t\t\t\t\ti,\n\t\t\t\t\t\t\tactiveStep\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i > 0) {\n\t\t\t\tconst previousItem = item.previousElementSibling;\n\t\t\t\tif (\n\t\t\t\t\tpreviousItem &&\n\t\t\t\t\tpreviousItem.tagName.toLowerCase() === 'p-stepper-line'\n\t\t\t\t) {\n\t\t\t\t\tpreviousItem.direction = this.direction;\n\t\t\t\t\tpreviousItem.active = item.active || item.finished;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst lines = this._el.querySelectorAll(\n\t\t\t'p-stepper-line:not(:has(+ p-stepper-item)), p-stepper-line:first-child'\n\t\t);\n\t\tfor (let j = lines.length - 1; j >= 0; j--) {\n\t\t\tconst line = lines.item(j);\n\t\t\tline.remove();\n\t\t}\n\t};\n\n\tprivate _setStepperLineData = (\n\t\tstepperLine: HTMLPStepperLineElement,\n\t\titem: HTMLPStepperItemElement,\n\t\tnextItem: HTMLPStepperItemElement,\n\t\ti: number,\n\t\tactiveStep: number\n\t) => {\n\t\tconst heightDiff = item.clientHeight / 2;\n\t\tconst heightDiffNext = nextItem.clientHeight / 2;\n\n\t\tstepperLine.direction = this.direction;\n\t\tstepperLine.active = i < activeStep;\n\n\t\tif (heightDiff > 0 && this.direction === 'vertical') {\n\t\t\tstepperLine.style.marginTop = `-${heightDiff / 16}rem`;\n\t\t\tstepperLine.style.marginBottom = `-${heightDiffNext / 16}rem`;\n\t\t\tstepperLine.style.minHeight = `calc(1rem + ${\n\t\t\t\t(heightDiff + heightDiffNext) / 16\n\t\t\t}rem)`;\n\t\t}\n\t};\n\n\tcomponentDidLoad() {\n\t\tthis._resizeObserver = new ResizeObserver(() => this._generateStepsOnce());\n\t\tthis._resizeObserver.observe(this._el);\n\t}\n\n\tdisconnectCallback() {\n\t\tif (this._resizeObserver) {\n\t\t\tthis._resizeObserver.disconnect();\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='p-stepper'>\n\t\t\t\t<slot onSlotchange={() => this._generateStepsOnce()} />\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Watch('activeStep')\n\tprotected _onActiveStepChange() {\n\t\tthis._generateStepsOnce();\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.bottom-4{bottom:1rem!important}.left-1\/2{left:50%!important}.flex{display:flex!important}.hidden{display:none!important}.flex-shrink{flex-shrink:1!important}.-translate-x-1\/2{--tw-translate-x:-50%!important}.-translate-x-1\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}*{box-sizing:border-box}p-table{display:flex;flex-direction:column;position:relative}p-table .p-input[type=checkbox]{flex-shrink:0}p-table p-table-container{position:relative}p-table p-table-container p-floating-menu-container{--tw-translate-x:-50%;animation:floatingMenuContainerIn .3s ease forwards!important;bottom:1rem;left:50%;position:fixed;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:40rem){p-table p-table-container p-floating-menu-container{bottom:4rem;position:absolute}}p-table p-table-container p-floating-menu-container:not(.shown){display:none}p-table p-table-container p-floating-menu-container.inactive{animation:floatingMenuContainerOut .3s ease forwards!important}@keyframes floatingMenuContainerOut{0%{display:flex;opacity:1;transform:translateY(0) translateX(-50%)}99%{display:flex;opacity:0;transform:translateY(100%) translateX(-50%)}to{display:none;opacity:0;transform:translateY(100%) translateX(-50%)}}@keyframes floatingMenuContainerIn{0%{display:none;opacity:0;transform:translateY(100%) translateX(-50%)}1%{display:flex;opacity:0;transform:translateY(100%) translateX(-50%)}to{display:flex;opacity:1;transform:translateY(0) translateX(-50%)}}.static{position:static!important}.mx-0{margin-left:0!important;margin-right:0!important}.mb-14{margin-bottom:3.5rem!important}.mb-6{margin-bottom:1.5rem!important}.ml-auto{margin-left:auto!important}.table{display:table!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.max-w-\[20rem\]{max-width:20rem!important}.flex-1{flex:1 1 0%!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.gap-2{gap:.5rem!important}.self-center{align-self:center!important}.rounded{border-radius:.25rem!important}.py-24{padding-bottom:6rem!important;padding-top:6rem!important}.text-center{text-align:center!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-semibold{font-weight:600!important}.text-storm{--tw-text-opacity:1!important;color:rgb(81 83 107/var(--tw-text-opacity))!important}.text-storm-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}.opacity-0{opacity:0!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}@media (min-width:40rem){.tablet\:flex{display:flex!important}}
|
|
1
|
+
.fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.bottom-4{bottom:1rem!important}.left-1\/2{left:50%!important}.flex{display:flex!important}.hidden{display:none!important}.flex-shrink{flex-shrink:1!important}.-translate-x-1\/2{--tw-translate-x:-50%!important}.-translate-x-1\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}*{box-sizing:border-box}p-table{display:flex;flex-direction:column;position:relative}p-table .p-input[type=checkbox]{flex-shrink:0}p-table p-table-container{position:relative}p-table p-table-container p-floating-menu-container{--tw-translate-x:-50%;animation:floatingMenuContainerIn .3s ease forwards!important;bottom:1rem;left:50%;position:fixed;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:40rem){p-table p-table-container p-floating-menu-container{bottom:4rem;position:absolute}}p-table p-table-container p-floating-menu-container:not(.shown){display:none}p-table p-table-container p-floating-menu-container.inactive{animation:floatingMenuContainerOut .3s ease forwards!important}@keyframes floatingMenuContainerOut{0%{display:flex;opacity:1;transform:translateY(0) translateX(-50%)}99%{display:flex;opacity:0;transform:translateY(100%) translateX(-50%)}to{display:none;opacity:0;transform:translateY(100%) translateX(-50%)}}@keyframes floatingMenuContainerIn{0%{display:none;opacity:0;transform:translateY(100%) translateX(-50%)}1%{display:flex;opacity:0;transform:translateY(100%) translateX(-50%)}to{display:flex;opacity:1;transform:translateY(0) translateX(-50%)}}.static{position:static!important}.mx-0{margin-left:0!important;margin-right:0!important}.mb-14{margin-bottom:3.5rem!important}.mb-6{margin-bottom:1.5rem!important}.ml-auto{margin-left:auto!important}.table{display:table!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.max-w-\[20rem\]{max-width:20rem!important}.flex-1{flex:1 1 0%!important}.cursor-pointer{cursor:pointer!important}.resize{resize:both!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.gap-2{gap:.5rem!important}.self-center{align-self:center!important}.rounded{border-radius:.25rem!important}.py-24{padding-bottom:6rem!important;padding-top:6rem!important}.text-center{text-align:center!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-semibold{font-weight:600!important}.text-storm{--tw-text-opacity:1!important;color:rgb(81 83 107/var(--tw-text-opacity))!important}.text-storm-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}.opacity-0{opacity:0!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}@media (min-width:40rem){.tablet\:flex{display:flex!important}}
|
|
@@ -4,7 +4,7 @@ import { c as childOf } from './child-of.js';
|
|
|
4
4
|
import { d as defineCustomElement$2 } from './dropdown-menu-container.component.js';
|
|
5
5
|
import { d as defineCustomElement$1 } from './portal.component.js';
|
|
6
6
|
|
|
7
|
-
const dropdownComponentCss = ".relative{position:relative!important}.block{display:block!important}.h-auto{height:auto!important}*{box-sizing:border-box}p-dropdown,p-dropdown .trigger{display:block;position:relative}p-dropdown .trigger{height:auto;width:auto}.visible{visibility:visible!important}.static{position:static!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.z-dropdown{z-index:200!important}.
|
|
7
|
+
const dropdownComponentCss = ".relative{position:relative!important}.block{display:block!important}.h-auto{height:auto!important}*{box-sizing:border-box}p-dropdown,p-dropdown .trigger{display:block;position:relative}p-dropdown .trigger{height:auto;width:auto}.visible{visibility:visible!important}.static{position:static!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.z-dropdown{z-index:200!important}.hidden{display:none!important}";
|
|
8
8
|
|
|
9
9
|
const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends HTMLElement {
|
|
10
10
|
constructor() {
|
|
@@ -128,7 +128,7 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends HTMLEle
|
|
|
128
128
|
this._cleanup = autoUpdate(this._el, this._menu, () => this._update());
|
|
129
129
|
this._menu.setAttribute('data-show', '');
|
|
130
130
|
this._menu.classList.remove('hidden');
|
|
131
|
-
this._menu.classList.add('
|
|
131
|
+
this._menu.classList.add('block');
|
|
132
132
|
this.isOpen.emit(true);
|
|
133
133
|
this._update();
|
|
134
134
|
}
|
|
@@ -142,7 +142,7 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends HTMLEle
|
|
|
142
142
|
}
|
|
143
143
|
// Hide the popover
|
|
144
144
|
this._menu.removeAttribute('data-show');
|
|
145
|
-
this._menu.classList.remove('
|
|
145
|
+
this._menu.classList.remove('block');
|
|
146
146
|
this._menu.classList.add('hidden');
|
|
147
147
|
this.isOpen.emit(false);
|
|
148
148
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dropdown.component.js","mappings":";;;;;;AAAA,MAAM,oBAAoB,GAAG,mdAAmd;;MC0Bne,QAAQ;;;;;IAyFZ,YAAO,GAAG,KAAK,CAAC;qBArFwB,cAAc;kBAKrC,CAAC;oBAKG,UAAU;gBAKf,KAAK;qBAKA,KAAK;0BAKA,KAAK;yBAKN,IAAI;0BAKH,IAAI;yBAKL,KAAK;sBAKc,KAAK;uBAK1B,KAAK;+BAKG,KAAK;wBAKZ,IAAI;2BAKO,KAAK;;;EAyBhD,qBAAqB;IACpB,IAAI,CAAC,OAAO,EAAE,CAAC;GACf;EAED,oBAAoB;IACnB,IAAI,IAAI,CAAC,QAAQ,EAAE;MAClB,IAAI,CAAC,QAAQ,EAAE,CAAC;MAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;KACrB;IAED,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;GACpB;EAED,kBAAkB;IACjB,IAAI,CAAC,aAAa,EAAE,CAAC;GACrB;EAED,MAAM;IACL,MAAM,sBAAsB,GAAG;MAC9B,KAAK,EAAE,qBACN,IAAI,CAAC,QAAQ,KAAK,OAAO,GAAG,OAAO,GAAG,UACv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C,WAAW,CAAC,CAAC;IACxC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACpC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAEnC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;GACxB;EAEO,OAAO;IACd,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;MAChB,OAAO;KACP;IAED,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE;MACrC,SAAS,EAAE,IAAI,CAAC,SAAS;MACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;MACvB,UAAU,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC;KAClD,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE;MAC3B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;MACzC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;QAC/B,GAAG,EAAE,GAAG,CAAC,IAAI;QACb,IAAI,EAAE,GAAG,CAAC,IAAI;OACd,CAAC,CAAC;KACH,CAAC,CAAC;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/molecules/dropdown/dropdown.component.scss?tag=p-dropdown","src/components/molecules/dropdown/dropdown.component.tsx"],"sourcesContent":["p-dropdown {\n\t@apply relative block;\n\n\t.trigger {\n\t\t@apply relative block h-auto w-auto;\n\t}\n}\n","import {\n\tautoUpdate,\n\tcomputePosition,\n\tflip,\n\toffset,\n\tPlacement,\n\tshift,\n\tStrategy,\n} from '@floating-ui/dom';\nimport {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tWatch,\n} from '@stencil/core';\nimport { childOf } from '../../../utils/child-of';\n\n@Component({\n\ttag: 'p-dropdown',\n\tstyleUrl: 'dropdown.component.scss',\n})\nexport class Dropdown {\n\t/**\n\t * The content of the dropdown menu\n\t */\n\t@Prop({ reflect: true }) placement: Placement = 'bottom-start';\n\n\t/**\n\t * The offset of the dropdown menu\n\t */\n\t@Prop() offset: number = 8;\n\n\t/**\n\t * The strategy of the dropdown placement\n\t */\n\t@Prop() strategy: Strategy = 'absolute';\n\n\t/**\n\t * Wether to show the dropdown menu\n\t */\n\t@Prop() show: boolean = false;\n\n\t/**\n\t * Wether to use a portal for the dropdown container\n\t */\n\t@Prop() usePortal: boolean = false;\n\n\t/**\n\t * Wether to automatically calculate the width of the menu based on the trigger\n\t */\n\t@Prop() calculateWidth: boolean = false;\n\n\t/**\n\t * Wether to apply the max width\n\t */\n\t@Prop() applyMaxWidth: boolean = true;\n\n\t/**\n\t * Wether to apply the full width\n\t */\n\t@Prop() applyFullWidth: boolean = true;\n\n\t/**\n\t * Wether to allow overflow in the container\n\t */\n\t@Prop() allowOverflow: boolean = false;\n\n\t/**\n\t * Wether the dropdown container should be scrollable when the threshold is met.\n\t */\n\t@Prop() scrollable: boolean | 'default' | 'large' = false;\n\n\t/**\n\t * Wether to automatically close the dropdown menu after clicking inside\n\t */\n\t@Prop() insideClick: boolean = false;\n\n\t/**\n\t * Wether to automatically close the dropdown menu after clicking inside\n\t */\n\t@Prop() disableTriggerClick: boolean = false;\n\n\t/**\n\t * Wether to apply chevron automatically\n\t */\n\t@Prop() applyChevron: boolean = true;\n\n\t/**\n\t * Chevron position\n\t */\n\t@Prop() chevronPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * Chevron direction\n\t */\n\t@Prop() chevronDirection: 'up' | 'down';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t/**\n\t * Open change event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tisOpen: EventEmitter<boolean>;\n\n\tprivate _loaded = false;\n\tprivate _trigger: HTMLElement;\n\tprivate _menu: HTMLElement;\n\tprivate _cleanup: () => void;\n\n\tcomponentShouldUpdate() {\n\t\tthis._update();\n\t}\n\n\tdisconnectedCallback() {\n\t\tif (this._cleanup) {\n\t\t\tthis._cleanup();\n\t\t\tthis._cleanup = null;\n\t\t}\n\n\t\tthis._menu.remove();\n\t}\n\n\tcomponentDidRender() {\n\t\tthis._checkButtons();\n\t}\n\n\trender() {\n\t\tconst dropdownContainerProps = {\n\t\t\tclass: `z-dropdown hidden ${\n\t\t\t\tthis.strategy === 'fixed' ? 'fixed' : 'absolute'\n\t\t\t}`,\n\t\t\tref: el => this._load(el),\n\t\t\tonClick: () => this._containerClickHandler(),\n\t\t\trole: 'popover',\n\t\t\t'data-placement': this.placement,\n\t\t\t'data-strategy': this.strategy,\n\t\t};\n\n\t\tlet dropdownContainer: HTMLElement;\n\n\t\tif (this.usePortal) {\n\t\t\tdropdownContainer = (\n\t\t\t\t<p-portal {...dropdownContainerProps}>\n\t\t\t\t\t<p-dropdown-menu-container\n\t\t\t\t\t\tmaxWidth={!this.calculateWidth && this.applyMaxWidth}\n\t\t\t\t\t\tfullWidth={this.applyFullWidth && !this.applyMaxWidth}\n\t\t\t\t\t\tallowOverflow={this.allowOverflow}\n\t\t\t\t\t\tscrollable={this.scrollable}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot name='items' />\n\t\t\t\t\t</p-dropdown-menu-container>\n\t\t\t\t</p-portal>\n\t\t\t);\n\t\t} else {\n\t\t\tdropdownContainer = (\n\t\t\t\t<p-dropdown-menu-container\n\t\t\t\t\tmaxWidth={!this.calculateWidth && this.applyMaxWidth}\n\t\t\t\t\tfullWidth={this.applyFullWidth && !this.applyMaxWidth}\n\t\t\t\t\tallowOverflow={this.allowOverflow}\n\t\t\t\t\tscrollable={this.scrollable}\n\t\t\t\t\t{...dropdownContainerProps}\n\t\t\t\t>\n\t\t\t\t\t<slot name='items' />\n\t\t\t\t</p-dropdown-menu-container>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class='p-dropdown'>\n\t\t\t\t<div\n\t\t\t\t\tclass='trigger'\n\t\t\t\t\tref={ref => (this._trigger = ref)}\n\t\t\t\t\tonClick={() => this._triggerClickHandler()}\n\t\t\t\t>\n\t\t\t\t\t<slot name='trigger' />\n\t\t\t\t</div>\n\t\t\t\t{dropdownContainer}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _checkButtons() {\n\t\tif (!this.applyChevron) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst children = this._el.querySelectorAll('p-button[slot=\"trigger\"]');\n\n\t\tfor (let child of [...children]) {\n\t\t\t(child as any).chevronPosition = this.chevronPosition;\n\t\t\t(child as any).chevron = this.chevronDirection\n\t\t\t\t? this.chevronDirection\n\t\t\t\t: this.placement.indexOf('top') >= 0\n\t\t\t\t? 'up'\n\t\t\t\t: 'down';\n\t\t}\n\t}\n\n\t@Watch('show')\n\tprotected onShowChange(show) {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!show) {\n\t\t\tthis._hide();\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\t@Listen('click', { target: 'document', capture: true })\n\tprotected documentClickHandler({ target }) {\n\t\tif (!this._menu.hasAttribute('data-show') || childOf(target, this._menu)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\tprivate _containerClickHandler() {\n\t\tif (this.insideClick) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._menu.hasAttribute('data-show')) {\n\t\t\tthis._hide();\n\t\t}\n\t}\n\n\tprivate _triggerClickHandler() {\n\t\tif (this.disableTriggerClick) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._menu.hasAttribute('data-show')) {\n\t\t\tthis._hide();\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\tprivate _load(popover: HTMLElement) {\n\t\tthis._menu = popover;\n\t\tif (popover) {\n\t\t\tthis._update();\n\t\t\tthis._loaded = true;\n\n\t\t\tif (this.show) {\n\t\t\t\tsetTimeout(() => this._show(), 100);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _show() {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make the popover visible\n\t\tif (this.calculateWidth) {\n\t\t\tthis._menu.style.width = `${this._trigger.clientWidth}px`;\n\t\t}\n\n\t\tthis._cleanup = autoUpdate(this._el, this._menu, () => this._update());\n\n\t\tthis._menu.setAttribute('data-show', '');\n\t\tthis._menu.classList.remove('hidden');\n\t\tthis._menu.classList.add('flex');\n\n\t\tthis.isOpen.emit(true);\n\n\t\tthis._update();\n\t}\n\n\tprivate _hide() {\n\t\tif (!this._loaded || this.show) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._cleanup) {\n\t\t\tthis._cleanup();\n\t\t\tthis._cleanup = null;\n\t\t}\n\n\t\t// Hide the popover\n\t\tthis._menu.removeAttribute('data-show');\n\t\tthis._menu.classList.remove('flex');\n\t\tthis._menu.classList.add('hidden');\n\n\t\tthis.isOpen.emit(false);\n\t}\n\n\tprivate _update() {\n\t\tif (!this._menu) {\n\t\t\treturn;\n\t\t}\n\n\t\tcomputePosition(this._el, this._menu, {\n\t\t\tplacement: this.placement,\n\t\t\tstrategy: this.strategy,\n\t\t\tmiddleware: [offset(this.offset), flip(), shift()],\n\t\t}).then(({ x, y, placement }) => {\n\t\t\tthis._menu.dataset.placement = placement;\n\t\t\tObject.assign(this._menu.style, {\n\t\t\t\ttop: `${y}px`,\n\t\t\t\tleft: `${x}px`,\n\t\t\t});\n\t\t});\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"dropdown.component.js","mappings":";;;;;;AAAA,MAAM,oBAAoB,GAAG,sbAAsb;;MC0Btc,QAAQ;;;;;IAyFZ,YAAO,GAAG,KAAK,CAAC;qBArFwB,cAAc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CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;MACzC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;QAC/B,GAAG,EAAE,GAAG,CAAC,IAAI;QACb,IAAI,EAAE,GAAG,CAAC,IAAI;OACd,CAAC,CAAC;KACH,CAAC,CAAC;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/molecules/dropdown/dropdown.component.scss?tag=p-dropdown","src/components/molecules/dropdown/dropdown.component.tsx"],"sourcesContent":["p-dropdown {\n\t@apply relative block;\n\n\t.trigger {\n\t\t@apply relative block h-auto w-auto;\n\t}\n}\n","import {\n\tautoUpdate,\n\tcomputePosition,\n\tflip,\n\toffset,\n\tPlacement,\n\tshift,\n\tStrategy,\n} from '@floating-ui/dom';\nimport {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tWatch,\n} from '@stencil/core';\nimport { childOf } from '../../../utils/child-of';\n\n@Component({\n\ttag: 'p-dropdown',\n\tstyleUrl: 'dropdown.component.scss',\n})\nexport class Dropdown {\n\t/**\n\t * The content of the dropdown menu\n\t */\n\t@Prop({ reflect: true }) placement: Placement = 'bottom-start';\n\n\t/**\n\t * The offset of the dropdown menu\n\t */\n\t@Prop() offset: number = 8;\n\n\t/**\n\t * The strategy of the dropdown placement\n\t */\n\t@Prop() strategy: Strategy = 'absolute';\n\n\t/**\n\t * Wether to show the dropdown menu\n\t */\n\t@Prop() show: boolean = false;\n\n\t/**\n\t * Wether to use a portal for the dropdown container\n\t */\n\t@Prop() usePortal: boolean = false;\n\n\t/**\n\t * Wether to automatically calculate the width of the menu based on the trigger\n\t */\n\t@Prop() calculateWidth: boolean = false;\n\n\t/**\n\t * Wether to apply the max width\n\t */\n\t@Prop() applyMaxWidth: boolean = true;\n\n\t/**\n\t * Wether to apply the full width\n\t */\n\t@Prop() applyFullWidth: boolean = true;\n\n\t/**\n\t * Wether to allow overflow in the container\n\t */\n\t@Prop() allowOverflow: boolean = false;\n\n\t/**\n\t * Wether the dropdown container should be scrollable when the threshold is met.\n\t */\n\t@Prop() scrollable: boolean | 'default' | 'large' = false;\n\n\t/**\n\t * Wether to automatically close the dropdown menu after clicking inside\n\t */\n\t@Prop() insideClick: boolean = false;\n\n\t/**\n\t * Wether to automatically close the dropdown menu after clicking inside\n\t */\n\t@Prop() disableTriggerClick: boolean = false;\n\n\t/**\n\t * Wether to apply chevron automatically\n\t */\n\t@Prop() applyChevron: boolean = true;\n\n\t/**\n\t * Chevron position\n\t */\n\t@Prop() chevronPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * Chevron direction\n\t */\n\t@Prop() chevronDirection: 'up' | 'down';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t/**\n\t * Open change event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tisOpen: EventEmitter<boolean>;\n\n\tprivate _loaded = false;\n\tprivate _trigger: HTMLElement;\n\tprivate _menu: HTMLElement;\n\tprivate _cleanup: () => void;\n\n\tcomponentShouldUpdate() {\n\t\tthis._update();\n\t}\n\n\tdisconnectedCallback() {\n\t\tif (this._cleanup) {\n\t\t\tthis._cleanup();\n\t\t\tthis._cleanup = null;\n\t\t}\n\n\t\tthis._menu.remove();\n\t}\n\n\tcomponentDidRender() {\n\t\tthis._checkButtons();\n\t}\n\n\trender() {\n\t\tconst dropdownContainerProps = {\n\t\t\tclass: `z-dropdown hidden ${\n\t\t\t\tthis.strategy === 'fixed' ? 'fixed' : 'absolute'\n\t\t\t}`,\n\t\t\tref: el => this._load(el),\n\t\t\tonClick: () => this._containerClickHandler(),\n\t\t\trole: 'popover',\n\t\t\t'data-placement': this.placement,\n\t\t\t'data-strategy': this.strategy,\n\t\t};\n\n\t\tlet dropdownContainer: HTMLElement;\n\n\t\tif (this.usePortal) {\n\t\t\tdropdownContainer = (\n\t\t\t\t<p-portal {...dropdownContainerProps}>\n\t\t\t\t\t<p-dropdown-menu-container\n\t\t\t\t\t\tmaxWidth={!this.calculateWidth && this.applyMaxWidth}\n\t\t\t\t\t\tfullWidth={this.applyFullWidth && !this.applyMaxWidth}\n\t\t\t\t\t\tallowOverflow={this.allowOverflow}\n\t\t\t\t\t\tscrollable={this.scrollable}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot name='items' />\n\t\t\t\t\t</p-dropdown-menu-container>\n\t\t\t\t</p-portal>\n\t\t\t);\n\t\t} else {\n\t\t\tdropdownContainer = (\n\t\t\t\t<p-dropdown-menu-container\n\t\t\t\t\tmaxWidth={!this.calculateWidth && this.applyMaxWidth}\n\t\t\t\t\tfullWidth={this.applyFullWidth && !this.applyMaxWidth}\n\t\t\t\t\tallowOverflow={this.allowOverflow}\n\t\t\t\t\tscrollable={this.scrollable}\n\t\t\t\t\t{...dropdownContainerProps}\n\t\t\t\t>\n\t\t\t\t\t<slot name='items' />\n\t\t\t\t</p-dropdown-menu-container>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class='p-dropdown'>\n\t\t\t\t<div\n\t\t\t\t\tclass='trigger'\n\t\t\t\t\tref={ref => (this._trigger = ref)}\n\t\t\t\t\tonClick={() => this._triggerClickHandler()}\n\t\t\t\t>\n\t\t\t\t\t<slot name='trigger' />\n\t\t\t\t</div>\n\t\t\t\t{dropdownContainer}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _checkButtons() {\n\t\tif (!this.applyChevron) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst children = this._el.querySelectorAll('p-button[slot=\"trigger\"]');\n\n\t\tfor (let child of [...children]) {\n\t\t\t(child as any).chevronPosition = this.chevronPosition;\n\t\t\t(child as any).chevron = this.chevronDirection\n\t\t\t\t? this.chevronDirection\n\t\t\t\t: this.placement.indexOf('top') >= 0\n\t\t\t\t? 'up'\n\t\t\t\t: 'down';\n\t\t}\n\t}\n\n\t@Watch('show')\n\tprotected onShowChange(show) {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!show) {\n\t\t\tthis._hide();\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\t@Listen('click', { target: 'document', capture: true })\n\tprotected documentClickHandler({ target }) {\n\t\tif (!this._menu.hasAttribute('data-show') || childOf(target, this._menu)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\tprivate _containerClickHandler() {\n\t\tif (this.insideClick) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._menu.hasAttribute('data-show')) {\n\t\t\tthis._hide();\n\t\t}\n\t}\n\n\tprivate _triggerClickHandler() {\n\t\tif (this.disableTriggerClick) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._menu.hasAttribute('data-show')) {\n\t\t\tthis._hide();\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\tprivate _load(popover: HTMLElement) {\n\t\tthis._menu = popover;\n\t\tif (popover) {\n\t\t\tthis._update();\n\t\t\tthis._loaded = true;\n\n\t\t\tif (this.show) {\n\t\t\t\tsetTimeout(() => this._show(), 100);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _show() {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make the popover visible\n\t\tif (this.calculateWidth) {\n\t\t\tthis._menu.style.width = `${this._trigger.clientWidth}px`;\n\t\t}\n\n\t\tthis._cleanup = autoUpdate(this._el, this._menu, () => this._update());\n\n\t\tthis._menu.setAttribute('data-show', '');\n\t\tthis._menu.classList.remove('hidden');\n\t\tthis._menu.classList.add('block');\n\n\t\tthis.isOpen.emit(true);\n\n\t\tthis._update();\n\t}\n\n\tprivate _hide() {\n\t\tif (!this._loaded || this.show) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._cleanup) {\n\t\t\tthis._cleanup();\n\t\t\tthis._cleanup = null;\n\t\t}\n\n\t\t// Hide the popover\n\t\tthis._menu.removeAttribute('data-show');\n\t\tthis._menu.classList.remove('block');\n\t\tthis._menu.classList.add('hidden');\n\n\t\tthis.isOpen.emit(false);\n\t}\n\n\tprivate _update() {\n\t\tif (!this._menu) {\n\t\t\treturn;\n\t\t}\n\n\t\tcomputePosition(this._el, this._menu, {\n\t\t\tplacement: this.placement,\n\t\t\tstrategy: this.strategy,\n\t\t\tmiddleware: [offset(this.offset), flip(), shift()],\n\t\t}).then(({ x, y, placement }) => {\n\t\t\tthis._menu.dataset.placement = placement;\n\t\t\tObject.assign(this._menu.style, {\n\t\t\t\ttop: `${y}px`,\n\t\t\t\tleft: `${x}px`,\n\t\t\t});\n\t\t});\n\t}\n}\n"],"version":3}
|
|
@@ -4,7 +4,7 @@ import { d as defineCustomElement$4 } from './dropdown-menu-container.component.
|
|
|
4
4
|
import { d as defineCustomElement$3 } from './icon.component.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './portal.component.js';
|
|
6
6
|
|
|
7
|
-
const profileComponentCss = ".flex{display:flex!important}.table{display:table!important}.h-\\[3\\.125rem\\]{height:3.125rem!important}.h-\\[4\\.125rem\\]{height:4.125rem!important}.h-\\[6\\.5rem\\]{height:6.5rem!important}.w-full{width:100%!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.overflow-hidden{overflow:hidden!important}.text-ellipsis{text-overflow:ellipsis!important}.rounded{border-radius:.25rem!important}.border{border-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}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}*{box-sizing:border-box}:host{display:flex}:host .content{align-items:center;display:flex;gap:.75rem;width:100%}:host .content .name{display:flex;flex-direction:column;justify-content:center;overflow:hidden}:host .content .name>:first-child{--tw-text-opacity:1;color:rgb(39 40 56/var(--tw-text-opacity));font-size:.875rem;font-weight:600;line-height:1.25rem}:host .content .name>:nth-child(2){--tw-text-opacity:1;color:rgb(152 154 183/var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem}:host .content .name ::slotted(*){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([size=xsmall]){height:1.5rem}:host([size=small]){height:2rem}:host([size=table]){height:2.5rem}:host([size=medium]){height:3.125rem}:host([size=large]){height:4rem}:host([size=xlarge]){height:6.5rem}:host(.has-dropdown){cursor:pointer}:host(.has-dropdown) .content{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important;border-radius:.25rem;border-style:solid!important;border-width:1px!important;padding:.5rem}:host(.has-dropdown[size=small]){height:3rem}:host(.has-dropdown[size=medium]){height:4.125rem}:host(.has-dropdown[size=large]){height:5rem}:host(.active) .content,:host(.has-dropdown:hover) .content{--tw-shadow:0px 0.3125rem 1rem rgba(0,24,98,.08),0px 0.0625rem 0.1875rem rgba(0,24,98,.13);--tw-shadow-colored:0px 0.3125rem 1rem var(--tw-shadow-color),0px 0.0625rem 0.1875rem var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:host(.active) .content p-icon{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity))}.static{position:static!important}.absolute{position:absolute!important}.ml-auto{margin-left:auto!important}.min-w-0{min-width:0!important}";
|
|
7
|
+
const profileComponentCss = ".flex{display:flex!important}.table{display:table!important}.h-\\[3\\.125rem\\]{height:3.125rem!important}.h-\\[4\\.125rem\\]{height:4.125rem!important}.h-\\[6\\.5rem\\]{height:6.5rem!important}.w-full{width:100%!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.overflow-hidden{overflow:hidden!important}.text-ellipsis{text-overflow:ellipsis!important}.rounded{border-radius:.25rem!important}.border{border-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}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}*{box-sizing:border-box}:host{display:flex}:host .profile-content{align-items:center;display:flex;gap:.75rem;width:100%}:host .profile-content .name{display:flex;flex-direction:column;justify-content:center;overflow:hidden}:host .profile-content .name>:first-child{--tw-text-opacity:1;color:rgb(39 40 56/var(--tw-text-opacity));font-size:.875rem;font-weight:600;line-height:1.25rem}:host .profile-content .name>:nth-child(2){--tw-text-opacity:1;color:rgb(152 154 183/var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem}:host .profile-content .name ::slotted(*){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([size=xsmall]){height:1.5rem}:host([size=small]){height:2rem}:host([size=table]){height:2.5rem}:host([size=medium]){height:3.125rem}:host([size=large]){height:4rem}:host([size=xlarge]){height:6.5rem}:host(.has-dropdown){cursor:pointer}:host(.has-dropdown) .profile-content{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important;border-radius:.25rem;border-style:solid!important;border-width:1px!important;padding:.5rem}:host(.has-dropdown[size=small]){height:3rem}:host(.has-dropdown[size=medium]){height:4.125rem}:host(.has-dropdown[size=large]){height:5rem}:host(.active) .profile-content,:host(.has-dropdown:hover) .profile-content{--tw-shadow:0px 0.3125rem 1rem rgba(0,24,98,.08),0px 0.0625rem 0.1875rem rgba(0,24,98,.13);--tw-shadow-colored:0px 0.3125rem 1rem var(--tw-shadow-color),0px 0.0625rem 0.1875rem var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:host(.active) .profile-content p-icon{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity))}.static{position:static!important}.absolute{position:absolute!important}.ml-auto{margin-left:auto!important}.min-w-0{min-width:0!important}";
|
|
8
8
|
|
|
9
9
|
const Profile = /*@__PURE__*/ proxyCustomElement(class Profile extends HTMLElement {
|
|
10
10
|
constructor() {
|
|
@@ -25,7 +25,7 @@ const Profile = /*@__PURE__*/ proxyCustomElement(class Profile extends HTMLEleme
|
|
|
25
25
|
return (h(Host, { class: `p-profile ${hasDropdownSlot && 'has-dropdown'} ${this._dropdownOpen && 'active'}` }, hasDropdownSlot ? (h("p-dropdown", { class: 'w-full min-w-0', strategy: 'absolute', placement: this.variant === 'user' ? 'top-end' : 'bottom-end', applyFullWidth: true, applyMaxWidth: false, onIsOpen: ev => (this._dropdownOpen = ev.detail) }, content, h("div", { slot: 'items' }, dropdownItems))) : (content)));
|
|
26
26
|
}
|
|
27
27
|
_getContent(hasDropdownSlot) {
|
|
28
|
-
return (h("div", { class: 'content', slot: 'trigger' }, h("slot", { name: 'avatar' }), h("div", { class: 'name' }, h("slot", { name: 'title' }), h("slot", { name: 'subtitle' })), hasDropdownSlot && this._getIcon()));
|
|
28
|
+
return (h("div", { class: 'profile-content', slot: 'trigger' }, h("slot", { name: 'avatar' }), h("div", { class: 'name' }, h("slot", { name: 'title' }), h("slot", { name: 'subtitle' })), hasDropdownSlot && this._getIcon()));
|
|
29
29
|
}
|
|
30
30
|
_updateAvatar() {
|
|
31
31
|
var _a, _b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-profile.js","mappings":";;;;;;AAAA,MAAM,mBAAmB,GAAG,
|
|
1
|
+
{"file":"p-profile.js","mappings":";;;;;;AAAA,MAAM,mBAAmB,GAAG,8iFAA8iF;;MCO7jF,OAAO;;;;;mBAImB,MAAM;gBAW9B,OAAO;yBAOY,KAAK;;EAEtC,mBAAmB;IAClB,IAAI,CAAC,aAAa,EAAE,CAAC;GACrB;EAED,MAAM;IACL,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAC/C,4BAA4B,CAC5B,CAAC;IACF,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;IAClD,MAAM,aAAa,GAAG,YAAM,IAAI,EAAC,UAAU,GAAG,CAAC;IAC/C,QACC,EAAC,IAAI,IACJ,KA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;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/molecules/profile/profile.component.scss?tag=p-profile&encapsulation=shadow","src/components/molecules/profile/profile.component.tsx"],"sourcesContent":[":host {\n\t@apply flex;\n\n\t.profile-content {\n\t\t@apply flex w-full items-center gap-3;\n\n\t\t.name {\n\t\t\t@apply flex flex-col justify-center overflow-hidden;\n\n\t\t\t> *:nth-child(1) {\n\t\t\t\t@apply text-sm text-storm-dark;\n\t\t\t\t@apply font-semibold;\n\t\t\t}\n\n\t\t\t> *:nth-child(2) {\n\t\t\t\t@apply text-sm text-storm-vague;\n\t\t\t}\n\n\t\t\t::slotted(*) {\n\t\t\t\t@apply overflow-hidden text-ellipsis whitespace-nowrap;\n\t\t\t}\n\t\t}\n\t}\n}\n\n:host([size='xsmall']) {\n\t@apply h-6;\n}\n\n:host([size='small']) {\n\t@apply h-8;\n}\n\n:host([size='table']) {\n\t@apply h-10;\n}\n\n:host([size='medium']) {\n\t@apply h-[3.125rem];\n}\n\n:host([size='large']) {\n\t@apply h-16;\n}\n\n:host([size='xlarge']) {\n\t@apply h-[6.5rem];\n}\n\n:host(.has-dropdown) {\n\t@apply cursor-pointer;\n\n\t.profile-content {\n\t\t@apply rounded p-2;\n\t\t@apply border border-solid border-mystic-dark #{!important};\n\t}\n}\n\n:host(.has-dropdown[size='small']) {\n\t@apply h-12;\n}\n\n:host(.has-dropdown[size='medium']) {\n\t@apply h-[4.125rem];\n}\n\n:host(.has-dropdown[size='large']) {\n\t@apply h-20;\n}\n\n:host(.has-dropdown:hover),\n:host(.active) {\n\t.profile-content {\n\t\t@apply shadow-4;\n\t}\n}\n\n:host(.active) {\n\t.profile-content {\n\t\tp-icon {\n\t\t\t@apply text-indigo;\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Prop, State } from '@stencil/core';\n\n@Component({\n\ttag: 'p-profile',\n\tstyleUrl: 'profile.component.scss',\n\tshadow: true,\n})\nexport class Profile {\n\t/**\n\t * The variant of the profile\n\t */\n\t@Prop() variant: 'company' | 'user' = 'user';\n\n\t/**\n\t * The size of the profile avatar\n\t */\n\t@Prop({ reflect: true }) size:\n\t\t| 'xsmall'\n\t\t| 'small'\n\t\t| 'table'\n\t\t| 'medium'\n\t\t| 'large'\n\t\t| 'xlarge' = 'small';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _dropdownOpen = false;\n\n\tcomponentWillRender() {\n\t\tthis._updateAvatar();\n\t}\n\n\trender() {\n\t\tconst hasDropdownSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"dropdown\"]'\n\t\t);\n\t\tconst content = this._getContent(hasDropdownSlot);\n\t\tconst dropdownItems = <slot name='dropdown' />;\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={`p-profile ${hasDropdownSlot && 'has-dropdown'} ${\n\t\t\t\t\tthis._dropdownOpen && 'active'\n\t\t\t\t}`}\n\t\t\t>\n\t\t\t\t{hasDropdownSlot ? (\n\t\t\t\t\t<p-dropdown\n\t\t\t\t\t\tclass='w-full min-w-0'\n\t\t\t\t\t\tstrategy='absolute'\n\t\t\t\t\t\tplacement={this.variant === 'user' ? 'top-end' : 'bottom-end'}\n\t\t\t\t\t\tapplyFullWidth={true}\n\t\t\t\t\t\tapplyMaxWidth={false}\n\t\t\t\t\t\tonIsOpen={ev => (this._dropdownOpen = ev.detail)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{content}\n\t\t\t\t\t\t<div slot='items'>{dropdownItems}</div>\n\t\t\t\t\t</p-dropdown>\n\t\t\t\t) : (\n\t\t\t\t\tcontent\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _getContent(hasDropdownSlot: boolean) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclass='profile-content'\n\t\t\t\tslot='trigger'\n\t\t\t>\n\t\t\t\t<slot name='avatar' />\n\t\t\t\t<div class='name'>\n\t\t\t\t\t<slot name='title' />\n\t\t\t\t\t<slot name='subtitle' />\n\t\t\t\t</div>\n\n\t\t\t\t{hasDropdownSlot && this._getIcon()}\n\t\t\t</div>\n\t\t);\n\t}\n\n\tprivate _updateAvatar() {\n\t\tconst avatar = this._el.querySelector(\n\t\t\t'p-avatar[slot=\"avatar\"]'\n\t\t) as HTMLPAvatarElement;\n\n\t\tif (!avatar) {\n\t\t\treturn;\n\t\t}\n\n\t\tavatar.variant = this.variant ?? avatar.variant;\n\t\tavatar.size = this.size ?? avatar?.size;\n\t}\n\n\tprivate _getIcon() {\n\t\treturn (\n\t\t\t<p-icon\n\t\t\t\tclass='ml-auto'\n\t\t\t\tvariant={this.variant === 'company' ? 'chevron' : 'more'}\n\t\t\t/>\n\t\t);\n\t}\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { d as defineCustomElement$2 } from './icon.component.js';
|
|
3
3
|
|
|
4
|
-
const stepperItemComponentCss = ".absolute{position:absolute!important}.relative{position:relative!important}.left-1\\/2{left:50%!important}.top-0{top:0!important}.order-2{order:2!important}.ml-0{margin-left:0!important}.mr-4{margin-right:1rem!important}.flex{display:flex!important}.h-4{height:1rem!important}.min-h-\\[1rem\\]{min-height:1rem!important}.w-4{width:1rem!important}.w-full{width:100%!important}.min-w-\\[calc\\(100\\%-2rem\\)\\]{min-width:calc(100% - 2rem)!important}.-translate-x-1\\/2{--tw-translate-x:-50%!important}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.items-end{align-items:flex-end!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.bg-mystic-dark{--tw-bg-opacity:1!important;background-color:rgb(218 230 240/var(--tw-bg-opacity))!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.transition{transition-duration:.15s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.duration-500{transition-duration:.5s!important}*{box-sizing:border-box}:host{align-items:flex-end;display:flex;justify-content:center;position:relative;width:100%}:host .content{--tw-text-opacity:1;color:rgb(176 178 203/var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem;min-width:calc(100% - 2rem);white-space:nowrap}:host .circle{--tw-bg-opacity:1;--tw-text-opacity:1;align-items:center;background-color:rgb(218 230 240/var(--tw-bg-opacity));border-radius:100%;color:rgb(255 255 255/var(--tw-text-opacity));display:flex;flex-shrink:0;height:1rem;justify-content:center;transition-duration:.5s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:1rem}:host .circle p-icon{display:flex!important;font-size:.625rem}:host([direction=horizontal]){flex:0;height:2.5rem}:host([direction=horizontal]) .content{min-width:0;order:1;position:absolute;top:0}:host([direction=horizontal]) .circle{order:2}:host([direction=vertical]){align-items:center;min-height:1rem}:host([direction=vertical]) .content{margin-left:1rem;order:2}:host([direction=vertical]) .circle{order:1}:host([active]) .content,:host([finished]) .content{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity))}:host([active]) .circle,:host([finished]) .circle{--tw-bg-opacity:1;background-color:rgb(82 138 250/var(--tw-bg-opacity))}:host([direction=horizontal][align=start]) .content{left:0}:host([direction=horizontal][align=end]) .content{right:0}:host([direction=horizontal][align=center]) .content{--tw-translate-x:-50%;left:50%;text-align:center;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))}:host([direction=vertical][content-position=start]){flex-direction:row-reverse}:host([direction=vertical][content-position=start]) .content{display:flex;justify-content:flex-end;margin-left:0;margin-right:1rem}";
|
|
4
|
+
const stepperItemComponentCss = ".absolute{position:absolute!important}.relative{position:relative!important}.left-1\\/2{left:50%!important}.top-0{top:0!important}.order-2{order:2!important}.ml-0{margin-left:0!important}.mr-4{margin-right:1rem!important}.flex{display:flex!important}.h-4{height:1rem!important}.min-h-\\[1rem\\]{min-height:1rem!important}.w-4{width:1rem!important}.w-full{width:100%!important}.min-w-\\[calc\\(100\\%-2rem\\)\\]{min-width:calc(100% - 2rem)!important}.-translate-x-1\\/2{--tw-translate-x:-50%!important}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.items-end{align-items:flex-end!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.bg-mystic-dark{--tw-bg-opacity:1!important;background-color:rgb(218 230 240/var(--tw-bg-opacity))!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.transition{transition-duration:.15s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.duration-500{transition-duration:.5s!important}*{box-sizing:border-box}:host{align-items:flex-end;display:flex;justify-content:center;position:relative;width:100%}:host .content{--tw-text-opacity:1;color:rgb(176 178 203/var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem;min-width:calc(100% - 2rem);white-space:nowrap}:host .circle{--tw-bg-opacity:1;--tw-text-opacity:1;align-items:center;background-color:rgb(218 230 240/var(--tw-bg-opacity));border-radius:100%;color:rgb(255 255 255/var(--tw-text-opacity));display:flex;flex-shrink:0;height:1rem;justify-content:center;transition-duration:.5s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:1rem}:host .circle p-icon{display:flex!important;font-size:.625rem}:host([direction=horizontal]){flex:0;height:2.5rem}:host([direction=horizontal]) .content{min-width:0;order:1;position:absolute;top:0}:host([direction=horizontal]) .circle{order:2}:host([direction=vertical]){align-items:center;min-height:1rem}:host([direction=vertical]) .content{margin-left:1rem;order:2}:host([direction=vertical]) .circle{order:1}:host([active]) .content,:host([finished]) .content{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity))}:host([active]) .circle,:host([finished]) .circle{--tw-bg-opacity:1;background-color:rgb(82 138 250/var(--tw-bg-opacity))}:host([direction=horizontal][align=start]) .content{left:0}:host([direction=horizontal][align=end]) .content{right:0}:host([direction=horizontal][align=center]) .content{--tw-translate-x:-50%;left:50%;text-align:center;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))}:host([direction=vertical][content-position=start]){flex-direction:row-reverse}:host([direction=vertical][content-position=start]) .content{display:flex;justify-content:flex-end;margin-left:0;margin-right:1rem}.static{position:static!important}";
|
|
5
5
|
|
|
6
6
|
const StepperItem = /*@__PURE__*/ proxyCustomElement(class StepperItem extends HTMLElement {
|
|
7
7
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-stepper-item.js","mappings":";;;AAAA,MAAM,uBAAuB,GAAG,
|
|
1
|
+
{"file":"p-stepper-item.js","mappings":";;;AAAA,MAAM,uBAAuB,GAAG,01GAA01G;;MCO72G,WAAW;;;;;iBAIsC,QAAQ;qBAMpE,YAAY;2BAK+C,KAAK;oBAKpB,KAAK;kBAKP,KAAK;;EAEhD,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAC,gBAAgB,IAC3B,WAAK,KAAK,EAAC,QAAQ,IACjB,IAAI,CAAC,QAAQ,IAAI,cAAQ,OAAO,EAAC,WAAW,GAAG,CAC3C,EACN,WAAK,KAAK,EAAC,SAAS,IACnB,YAAM,IAAI,EAAC,SAAS,GAAG,CAClB,CACA,EACN;GACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/atoms/stepper-item/stepper-item.component.scss?tag=p-stepper-item&encapsulation=shadow","src/components/atoms/stepper-item/stepper-item.component.tsx"],"sourcesContent":[":host {\n\t@apply relative flex w-full items-end justify-center;\n\n\t.content {\n\t\t@apply min-w-[calc(100%-2rem)] whitespace-nowrap;\n\t\t@apply text-sm text-storm-light;\n\t}\n\n\t.circle {\n\t\t@apply transition duration-500 ease-in-out;\n\t\t@apply flex items-center justify-center flex-shrink-0;\n\t\t@apply h-4 w-4 rounded-round;\n\t\t@apply bg-mystic-dark text-white;\n\n\t\tp-icon {\n\t\t\t@apply flex #{!important};\n\t\t\tfont-size: 0.625rem;\n\t\t}\n\t}\n}\n\n:host([direction='horizontal']) {\n\tflex: 0;\n\t@apply h-10;\n\n\t.content {\n\t\t@apply absolute top-0 min-w-0;\n\t\t@apply order-1;\n\t}\n\n\t.circle {\n\t\t@apply order-2;\n\t}\n}\n\n:host([direction='vertical']) {\n\t@apply min-h-[1rem] items-center;\n\n\t.content {\n\t\t@apply order-2 ml-4;\n\t}\n\n\t.circle {\n\t\t@apply order-1;\n\t}\n}\n\n:host([active]),\n:host([finished]) {\n\t.content {\n\t\t@apply text-indigo;\n\t}\n\n\t.circle {\n\t\t@apply bg-indigo;\n\t}\n}\n\n:host([direction='horizontal'][align='start']) {\n\t.content {\n\t\t@apply left-0;\n\t}\n}\n\n:host([direction='horizontal'][align='end']) {\n\t.content {\n\t\t@apply right-0;\n\t}\n}\n\n:host([direction='horizontal'][align='center']) {\n\t.content {\n\t\t@apply left-1/2 -translate-x-1/2 transform text-center;\n\t}\n}\n\n:host([direction='vertical'][content-position='start']) {\n\t@apply flex-row-reverse;\n\n\t.content {\n\t\t@apply ml-0 mr-4 flex justify-end;\n\t}\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n\ttag: 'p-stepper-item',\n\tstyleUrl: 'stepper-item.component.scss',\n\tshadow: true,\n})\nexport class StepperItem {\n\t/**\n\t * The alignment of the step content\n\t */\n\t@Prop({ reflect: true }) align: 'start' | 'center' | 'end' = 'center';\n\n\t/**\n\t * The direction of the stepper step\n\t */\n\t@Prop({ reflect: true }) direction: 'horizontal' | 'vertical' =\n\t\t'horizontal';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop({ reflect: true }) contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * Wether the step is finished\n\t */\n\t@Prop({ reflect: true }) finished: boolean = false;\n\n\t/**\n\t * Wether the step is active\n\t */\n\t@Prop({ reflect: true }) active: boolean = false;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-stepper-item\">\n\t\t\t\t<div class=\"circle\">\n\t\t\t\t\t{this.finished && <p-icon variant=\"checkmark\" />}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"content\">\n\t\t\t\t\t<slot name=\"content\" />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}
|
|
@@ -41,7 +41,13 @@ const Stepper = /*@__PURE__*/ proxyCustomElement(class Stepper extends HTMLEleme
|
|
|
41
41
|
}
|
|
42
42
|
item.direction = this.direction;
|
|
43
43
|
item.align =
|
|
44
|
-
|
|
44
|
+
this.direction === 'vertical'
|
|
45
|
+
? 'start'
|
|
46
|
+
: i === 0
|
|
47
|
+
? 'start'
|
|
48
|
+
: i === (items === null || items === void 0 ? void 0 : items.length) - 1
|
|
49
|
+
? 'end'
|
|
50
|
+
: 'center';
|
|
45
51
|
item.contentPosition = this.contentPosition;
|
|
46
52
|
}
|
|
47
53
|
if (directionChanged) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-stepper.js","mappings":";;;AAAA,MAAM,mBAAmB,GAAG,gfAAgf;;MCO/f,OAAO;;;;;IA6BX,uBAAkB,GAAG;MAC5B,IAAI,IAAI,CAAC,gBAAgB,E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C,WAAW,CAAC,MAAM,GAAG,CAAC,GAAG,UAAU,CAAC;MAEpC,IAAI,UAAU,GAAG,CAAC,IAAI,IAAI,CAAC,SAAS,KAAK,UAAU,EAAE;QACpD,WAAW,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,UAAU,GAAG,EAAE,KAAK,CAAC;QACvD,WAAW,CAAC,KAAK,CAAC,YAAY,GAAG,IAAI,cAAc,GAAG,EAAE,KAAK,CAAC;QAC9D,WAAW,CAAC,KAAK,CAAC,SAAS,GAAG,eAC7B,CAAC,UAAU,GAAG,cAAc,IAAI,EACjC,MAAM,CAAC;OACP;KACD,CAAC;sBAxJ2B,CAAC;4BAKM,IAAI;qBAKwB,YAAY;2BAKhB,KAAK;;EA2IjE,gBAAgB;IACf,IAAI,CAAC,eAAe,GAAG,IAAI,cAAc,CAAC,MAAM,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAC3E,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;GACvC;EAED,kBAAkB;IACjB,IAAI,IAAI,CAAC,eAAe,EAAE;MACzB,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC;KAClC;GACD;EAED,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAC,WAAW,IACtB,YAAM,YAAY,EAAE,MAAM,IAAI,CAAC,kBAAkB,EAAE,GAAI,CACjD,EACN;GACF;EAGS,mBAAmB;IAC5B,IAAI,CAAC,kBAAkB,EAAE,CAAC;GAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/molecules/stepper/stepper.component.scss?tag=p-stepper&encapsulation=shadow","src/components/molecules/stepper/stepper.component.tsx"],"sourcesContent":[":host {\n\t@apply flex;\n}\n\n:host([direction='horizontal']) {\n\t@apply h-auto items-end;\n}\n\n:host([direction='vertical']) {\n\t@apply flex-col flex-wrap items-start;\n\t@apply w-full min-h-full;\n}\n\n:host([direction='vertical'][content-position='start']) {\n\t@apply items-end;\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\n\n@Component({\n\ttag: 'p-stepper',\n\tstyleUrl: 'stepper.component.scss',\n\tshadow: true,\n})\nexport class Stepper {\n\t/**\n\t * The currently active step\n\t */\n\t@Prop() activeStep: number = 1;\n\n\t/**\n\t * Wether to automatically apply active & finished to items\n\t */\n\t@Prop() enableAutoStatus: boolean = true;\n\n\t/**\n\t * The direction of the stepper\n\t */\n\t@Prop({ reflect: true }) direction: 'horizontal' | 'vertical' = 'horizontal';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop({ reflect: true }) contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _generateTimeout: NodeJS.Timer;\n\tprivate _resizeObserver: ResizeObserver;\n\n\tprivate _generateStepsOnce = () => {\n\t\tif (this._generateTimeout) {\n\t\t\tclearTimeout(this._generateTimeout);\n\t\t\tthis._generateTimeout = null;\n\t\t}\n\n\t\tthis._generateTimeout = setTimeout(() => this._generateSteps(), 50);\n\t};\n\n\tprivate _generateSteps = async () => {\n\t\tif (!this._el) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet activeStep = this.activeStep - 1 || 0;\n\t\tconst items = this._el.querySelectorAll('p-stepper-item');\n\n\t\tlet directionChanged = false;\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\tif (this.enableAutoStatus) {\n\t\t\t\titem.active = i === activeStep;\n\t\t\t\titem.finished = i < activeStep;\n\t\t\t}\n\n\t\t\tif (!this.activeStep || activeStep < 0) {\n\t\t\t\tif (item.active) {\n\t\t\t\t\tactiveStep = i;\n\t\t\t\t}\n\n\t\t\t\tif (activeStep < 0 && item.finished) {\n\t\t\t\t\tactiveStep = i + 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (item.direction !== this.direction && !directionChanged) {\n\t\t\t\tdirectionChanged = true;\n\t\t\t}\n\n\t\t\titem.direction = this.direction;\n\t\t\titem.align =\n\t\t\t\ti === 0 ? 'start' : i === items?.length - 1 ? 'end' : 'center';\n\t\t\titem.contentPosition = this.contentPosition;\n\t\t}\n\n\t\tif (directionChanged) {\n\t\t\t// super hacky way to ensure all elements that have a direction changed are re-rendered\n\t\t\tawait new Promise(resolve => setTimeout(resolve, 200));\n\t\t}\n\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\tif (i < items.length - 1) {\n\t\t\t\tlet nextItem = item.nextElementSibling;\n\n\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {\n\t\t\t\t\tconst stepperLine = document.createElement('p-stepper-line');\n\t\t\t\t\tthis._el.insertBefore(stepperLine, nextItem);\n\t\t\t\t\tthis._setStepperLineData(stepperLine, item, nextItem, i, activeStep);\n\n\t\t\t\t\tconst previous = stepperLine.previousElementSibling;\n\t\t\t\t\tif (previous && previous.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\t\tprevious.remove();\n\t\t\t\t\t}\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\tconst stepperLine = nextItem;\n\t\t\t\t\tnextItem = nextItem.nextElementSibling;\n\n\t\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {\n\t\t\t\t\t\tthis._setStepperLineData(\n\t\t\t\t\t\t\tstepperLine,\n\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\tnextItem,\n\t\t\t\t\t\t\ti,\n\t\t\t\t\t\t\tactiveStep\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i > 0) {\n\t\t\t\tconst previousItem = item.previousElementSibling;\n\t\t\t\tif (\n\t\t\t\t\tpreviousItem &&\n\t\t\t\t\tpreviousItem.tagName.toLowerCase() === 'p-stepper-line'\n\t\t\t\t) {\n\t\t\t\t\tpreviousItem.direction = this.direction;\n\t\t\t\t\tpreviousItem.active = item.active || item.finished;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst lines = this._el.querySelectorAll(\n\t\t\t'p-stepper-line:not(:has(+ p-stepper-item)), p-stepper-line:first-child'\n\t\t);\n\t\tfor (let j = lines.length - 1; j >= 0; j--) {\n\t\t\tconst line = lines.item(j);\n\t\t\tline.remove();\n\t\t}\n\t};\n\n\tprivate _setStepperLineData = (\n\t\tstepperLine: HTMLPStepperLineElement,\n\t\titem: HTMLPStepperItemElement,\n\t\tnextItem: HTMLPStepperItemElement,\n\t\ti: number,\n\t\tactiveStep: number\n\t) => {\n\t\tconst heightDiff = item.clientHeight / 2;\n\t\tconst heightDiffNext = nextItem.clientHeight / 2;\n\n\t\tstepperLine.direction = this.direction;\n\t\tstepperLine.active = i < activeStep;\n\n\t\tif (heightDiff > 0 && this.direction === 'vertical') {\n\t\t\tstepperLine.style.marginTop = `-${heightDiff / 16}rem`;\n\t\t\tstepperLine.style.marginBottom = `-${heightDiffNext / 16}rem`;\n\t\t\tstepperLine.style.minHeight = `calc(1rem + ${\n\t\t\t\t(heightDiff + heightDiffNext) / 16\n\t\t\t}rem)`;\n\t\t}\n\t};\n\n\tcomponentDidLoad() {\n\t\tthis._resizeObserver = new ResizeObserver(() => this._generateStepsOnce());\n\t\tthis._resizeObserver.observe(this._el);\n\t}\n\n\tdisconnectCallback() {\n\t\tif (this._resizeObserver) {\n\t\t\tthis._resizeObserver.disconnect();\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='p-stepper'>\n\t\t\t\t<slot onSlotchange={() => this._generateStepsOnce()} />\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Watch('activeStep')\n\tprotected _onActiveStepChange() {\n\t\tthis._generateStepsOnce();\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"p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ecules/stepper/stepper.component.tsx"],"sourcesContent":[":host {\n\t@apply flex;\n}\n\n:host([direction='horizontal']) {\n\t@apply h-auto items-end;\n}\n\n:host([direction='vertical']) {\n\t@apply flex-col flex-wrap items-start;\n\t@apply w-full min-h-full;\n}\n\n:host([direction='vertical'][content-position='start']) {\n\t@apply items-end;\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\n\n@Component({\n\ttag: 'p-stepper',\n\tstyleUrl: 'stepper.component.scss',\n\tshadow: true,\n})\nexport class Stepper {\n\t/**\n\t * The currently active step\n\t */\n\t@Prop() activeStep: number = 1;\n\n\t/**\n\t * Wether to automatically apply active & finished to items\n\t */\n\t@Prop() enableAutoStatus: boolean = true;\n\n\t/**\n\t * The direction of the stepper\n\t */\n\t@Prop({ reflect: true }) direction: 'horizontal' | 'vertical' = 'horizontal';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop({ reflect: true }) contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _generateTimeout: NodeJS.Timer;\n\tprivate _resizeObserver: ResizeObserver;\n\n\tprivate _generateStepsOnce = () => {\n\t\tif (this._generateTimeout) {\n\t\t\tclearTimeout(this._generateTimeout);\n\t\t\tthis._generateTimeout = null;\n\t\t}\n\n\t\tthis._generateTimeout = setTimeout(() => this._generateSteps(), 50);\n\t};\n\n\tprivate _generateSteps = async () => {\n\t\tif (!this._el) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet activeStep = this.activeStep - 1 || 0;\n\t\tconst items = this._el.querySelectorAll('p-stepper-item');\n\n\t\tlet directionChanged = false;\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\tif (this.enableAutoStatus) {\n\t\t\t\titem.active = i === activeStep;\n\t\t\t\titem.finished = i < activeStep;\n\t\t\t}\n\n\t\t\tif (!this.activeStep || activeStep < 0) {\n\t\t\t\tif (item.active) {\n\t\t\t\t\tactiveStep = i;\n\t\t\t\t}\n\n\t\t\t\tif (activeStep < 0 && item.finished) {\n\t\t\t\t\tactiveStep = i + 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (item.direction !== this.direction && !directionChanged) {\n\t\t\t\tdirectionChanged = true;\n\t\t\t}\n\n\t\t\titem.direction = this.direction;\n\t\t\titem.align =\n\t\t\t\tthis.direction === 'vertical'\n\t\t\t\t\t? 'start'\n\t\t\t\t\t: i === 0\n\t\t\t\t\t? 'start'\n\t\t\t\t\t: i === items?.length - 1\n\t\t\t\t\t? 'end'\n\t\t\t\t\t: 'center';\n\t\t\titem.contentPosition = this.contentPosition;\n\t\t}\n\n\t\tif (directionChanged) {\n\t\t\t// super hacky way to ensure all elements that have a direction changed are re-rendered\n\t\t\tawait new Promise(resolve => setTimeout(resolve, 200));\n\t\t}\n\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\tif (i < items.length - 1) {\n\t\t\t\tlet nextItem = item.nextElementSibling;\n\n\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {\n\t\t\t\t\tconst stepperLine = document.createElement('p-stepper-line');\n\t\t\t\t\tthis._el.insertBefore(stepperLine, nextItem);\n\t\t\t\t\tthis._setStepperLineData(stepperLine, item, nextItem, i, activeStep);\n\n\t\t\t\t\tconst previous = stepperLine.previousElementSibling;\n\t\t\t\t\tif (previous && previous.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\t\tprevious.remove();\n\t\t\t\t\t}\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\tconst stepperLine = nextItem;\n\t\t\t\t\tnextItem = nextItem.nextElementSibling;\n\n\t\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {\n\t\t\t\t\t\tthis._setStepperLineData(\n\t\t\t\t\t\t\tstepperLine,\n\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\tnextItem,\n\t\t\t\t\t\t\ti,\n\t\t\t\t\t\t\tactiveStep\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i > 0) {\n\t\t\t\tconst previousItem = item.previousElementSibling;\n\t\t\t\tif (\n\t\t\t\t\tpreviousItem &&\n\t\t\t\t\tpreviousItem.tagName.toLowerCase() === 'p-stepper-line'\n\t\t\t\t) {\n\t\t\t\t\tpreviousItem.direction = this.direction;\n\t\t\t\t\tpreviousItem.active = item.active || item.finished;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst lines = this._el.querySelectorAll(\n\t\t\t'p-stepper-line:not(:has(+ p-stepper-item)), p-stepper-line:first-child'\n\t\t);\n\t\tfor (let j = lines.length - 1; j >= 0; j--) {\n\t\t\tconst line = lines.item(j);\n\t\t\tline.remove();\n\t\t}\n\t};\n\n\tprivate _setStepperLineData = (\n\t\tstepperLine: HTMLPStepperLineElement,\n\t\titem: HTMLPStepperItemElement,\n\t\tnextItem: HTMLPStepperItemElement,\n\t\ti: number,\n\t\tactiveStep: number\n\t) => {\n\t\tconst heightDiff = item.clientHeight / 2;\n\t\tconst heightDiffNext = nextItem.clientHeight / 2;\n\n\t\tstepperLine.direction = this.direction;\n\t\tstepperLine.active = i < activeStep;\n\n\t\tif (heightDiff > 0 && this.direction === 'vertical') {\n\t\t\tstepperLine.style.marginTop = `-${heightDiff / 16}rem`;\n\t\t\tstepperLine.style.marginBottom = `-${heightDiffNext / 16}rem`;\n\t\t\tstepperLine.style.minHeight = `calc(1rem + ${\n\t\t\t\t(heightDiff + heightDiffNext) / 16\n\t\t\t}rem)`;\n\t\t}\n\t};\n\n\tcomponentDidLoad() {\n\t\tthis._resizeObserver = new ResizeObserver(() => this._generateStepsOnce());\n\t\tthis._resizeObserver.observe(this._el);\n\t}\n\n\tdisconnectCallback() {\n\t\tif (this._resizeObserver) {\n\t\t\tthis._resizeObserver.disconnect();\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='p-stepper'>\n\t\t\t\t<slot onSlotchange={() => this._generateStepsOnce()} />\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Watch('activeStep')\n\tprotected _onActiveStepChange() {\n\t\tthis._generateStepsOnce();\n\t}\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const tabItemComponentCss = ".flex{display:flex!important}.h-10{height:2.5rem!important}.whitespace-nowrap{white-space:nowrap!important}.border-0{border-width:0!important}.border-b-2{border-bottom-width:2px!important}.border-indigo{--tw-border-opacity:1!important;border-color:rgb(82 138 250/var(--tw-border-opacity))!important}.border-transparent{border-color:transparent!important}.font-semibold{font-weight:600!important}.text-indigo{--tw-text-opacity:1!important;color:rgb(82 138 250/var(--tw-text-opacity))!important}*{box-sizing:border-box}:host{--tw-text-opacity:1;align-items:center;border-color:transparent!important;border-width:0 0 2px!important;color:rgb(128 130 158/var(--tw-text-opacity));cursor:pointer;display:flex;font-weight:600;height:2.5rem;white-space:nowrap}:host(.active){--tw-border-opacity:1!important;--tw-text-opacity:1!important;border-color:rgb(82 138 250/var(--tw-border-opacity))!important;color:rgb(82 138 250/var(--tw-text-opacity))!important}";
|
|
3
|
+
const tabItemComponentCss = ".flex{display:flex!important}.h-10{height:2.5rem!important}.whitespace-nowrap{white-space:nowrap!important}.border-0{border-width:0!important}.border-b-2{border-bottom-width:2px!important}.border-indigo{--tw-border-opacity:1!important;border-color:rgb(82 138 250/var(--tw-border-opacity))!important}.border-transparent{border-color:transparent!important}.font-semibold{font-weight:600!important}.text-indigo{--tw-text-opacity:1!important;color:rgb(82 138 250/var(--tw-text-opacity))!important}*{box-sizing:border-box}:host{--tw-text-opacity:1;align-items:center;border-color:transparent!important;border-width:0 0 2px!important;color:rgb(128 130 158/var(--tw-text-opacity));cursor:pointer;display:flex;font-weight:600;height:2.5rem;white-space:nowrap}:host(.active){--tw-border-opacity:1!important;--tw-text-opacity:1!important;border-color:rgb(82 138 250/var(--tw-border-opacity))!important;color:rgb(82 138 250/var(--tw-text-opacity))!important}.static{position:static!important}";
|
|
4
4
|
|
|
5
5
|
const TabItem = /*@__PURE__*/ proxyCustomElement(class TabItem extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-tab-item.js","mappings":";;AAAA,MAAM,mBAAmB,GAAG,
|
|
1
|
+
{"file":"p-tab-item.js","mappings":";;AAAA,MAAM,mBAAmB,GAAG,u9BAAu9B;;MCOt+B,OAAO;;;;;kBAIO,KAAK;;EAE/B,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAE,cAAc,IAAI,CAAC,MAAM,IAAI,QAAQ,EAAE,IACnD,eAAQ,CACF,EACN;GACF;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/atoms/tab-item/tab-item.component.scss?tag=p-tab-item&encapsulation=shadow","src/components/atoms/tab-item/tab-item.component.tsx"],"sourcesContent":[":host {\n\t@apply flex h-10 items-center;\n\t@apply whitespace-nowrap font-semibold text-storm-medium;\n\t@apply cursor-pointer;\n\t@apply border-0 border-b-2 border-transparent #{!important};\n}\n\n:host(.active) {\n\t@apply border-indigo text-indigo #{!important};\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n\ttag: 'p-tab-item',\n\tstyleUrl: 'tab-item.component.scss',\n\tshadow: true,\n})\nexport class TabItem {\n\t/**\n\t * Wether the tab item is active\n\t */\n\t@Prop() active: boolean = false;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={`p-tab-item ${this.active && 'active'}`}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}
|
|
@@ -28,7 +28,7 @@ import { d as defineCustomElement$4 } from './table-header.component.js';
|
|
|
28
28
|
import { d as defineCustomElement$3 } from './table-row.component.js';
|
|
29
29
|
import { d as defineCustomElement$2 } from './tooltip.component.js';
|
|
30
30
|
|
|
31
|
-
const tableComponentCss = ".fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.bottom-4{bottom:1rem!important}.left-1\\/2{left:50%!important}.flex{display:flex!important}.hidden{display:none!important}.flex-shrink{flex-shrink:1!important}.-translate-x-1\\/2{--tw-translate-x:-50%!important}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}*{box-sizing:border-box}p-table{display:flex;flex-direction:column;position:relative}p-table .p-input[type=checkbox]{flex-shrink:0}p-table p-table-container{position:relative}p-table p-table-container p-floating-menu-container{--tw-translate-x:-50%;animation:floatingMenuContainerIn .3s ease forwards!important;bottom:1rem;left:50%;position:fixed;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:40rem){p-table p-table-container p-floating-menu-container{bottom:4rem;position:absolute}}p-table p-table-container p-floating-menu-container:not(.shown){display:none}p-table p-table-container p-floating-menu-container.inactive{animation:floatingMenuContainerOut .3s ease forwards!important}@keyframes floatingMenuContainerOut{0%{display:flex;opacity:1;transform:translateY(0) translateX(-50%)}99%{display:flex;opacity:0;transform:translateY(100%) translateX(-50%)}to{display:none;opacity:0;transform:translateY(100%) translateX(-50%)}}@keyframes floatingMenuContainerIn{0%{display:none;opacity:0;transform:translateY(100%) translateX(-50%)}1%{display:flex;opacity:0;transform:translateY(100%) translateX(-50%)}to{display:flex;opacity:1;transform:translateY(0) translateX(-50%)}}.static{position:static!important}.mx-0{margin-left:0!important;margin-right:0!important}.mb-14{margin-bottom:3.5rem!important}.mb-6{margin-bottom:1.5rem!important}.ml-auto{margin-left:auto!important}.table{display:table!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.max-w-\\[20rem\\]{max-width:20rem!important}.flex-1{flex:1 1 0%!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.gap-2{gap:.5rem!important}.self-center{align-self:center!important}.rounded{border-radius:.25rem!important}.py-24{padding-bottom:6rem!important;padding-top:6rem!important}.text-center{text-align:center!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-semibold{font-weight:600!important}.text-storm{--tw-text-opacity:1!important;color:rgb(81 83 107/var(--tw-text-opacity))!important}.text-storm-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}.opacity-0{opacity:0!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}@media (min-width:40rem){.tablet\\:flex{display:flex!important}}";
|
|
31
|
+
const tableComponentCss = ".fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.bottom-4{bottom:1rem!important}.left-1\\/2{left:50%!important}.flex{display:flex!important}.hidden{display:none!important}.flex-shrink{flex-shrink:1!important}.-translate-x-1\\/2{--tw-translate-x:-50%!important}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}*{box-sizing:border-box}p-table{display:flex;flex-direction:column;position:relative}p-table .p-input[type=checkbox]{flex-shrink:0}p-table p-table-container{position:relative}p-table p-table-container p-floating-menu-container{--tw-translate-x:-50%;animation:floatingMenuContainerIn .3s ease forwards!important;bottom:1rem;left:50%;position:fixed;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:40rem){p-table p-table-container p-floating-menu-container{bottom:4rem;position:absolute}}p-table p-table-container p-floating-menu-container:not(.shown){display:none}p-table p-table-container p-floating-menu-container.inactive{animation:floatingMenuContainerOut .3s ease forwards!important}@keyframes floatingMenuContainerOut{0%{display:flex;opacity:1;transform:translateY(0) translateX(-50%)}99%{display:flex;opacity:0;transform:translateY(100%) translateX(-50%)}to{display:none;opacity:0;transform:translateY(100%) translateX(-50%)}}@keyframes floatingMenuContainerIn{0%{display:none;opacity:0;transform:translateY(100%) translateX(-50%)}1%{display:flex;opacity:0;transform:translateY(100%) translateX(-50%)}to{display:flex;opacity:1;transform:translateY(0) translateX(-50%)}}.static{position:static!important}.mx-0{margin-left:0!important;margin-right:0!important}.mb-14{margin-bottom:3.5rem!important}.mb-6{margin-bottom:1.5rem!important}.ml-auto{margin-left:auto!important}.table{display:table!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.max-w-\\[20rem\\]{max-width:20rem!important}.flex-1{flex:1 1 0%!important}.cursor-pointer{cursor:pointer!important}.resize{resize:both!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.gap-2{gap:.5rem!important}.self-center{align-self:center!important}.rounded{border-radius:.25rem!important}.py-24{padding-bottom:6rem!important;padding-top:6rem!important}.text-center{text-align:center!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-semibold{font-weight:600!important}.text-storm{--tw-text-opacity:1!important;color:rgb(81 83 107/var(--tw-text-opacity))!important}.text-storm-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}.opacity-0{opacity:0!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}@media (min-width:40rem){.tablet\\:flex{display:flex!important}}";
|
|
32
32
|
|
|
33
33
|
const Table = /*@__PURE__*/ proxyCustomElement(class Table extends HTMLElement {
|
|
34
34
|
constructor() {
|