@paperless/core 2.13.1 → 2.13.3
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 +22 -0
- package/dist/build/index.esm.js +1 -1
- package/dist/build/index.esm.js.map +1 -1
- package/dist/build/p-2efda14f.entry.js +2 -0
- package/dist/build/p-2efda14f.entry.js.map +1 -0
- package/dist/build/{p-cdb231e9.js → p-7167f89b.js} +1 -1
- package/dist/{paperless/p-80f058e5.entry.js → build/p-78e5a085.entry.js} +2 -2
- package/dist/build/p-94dae829.entry.js +2 -0
- package/dist/build/p-94dae829.entry.js.map +1 -0
- package/dist/build/p-checkbox.p-dropdown.p-dropdown-menu-container.p-dropdown-menu-item.entry.esm.js.map +1 -1
- package/dist/build/p-datepicker.entry.esm.js.map +1 -1
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/p-checkbox.p-dropdown.p-dropdown-menu-container.p-dropdown-menu-item.entry.cjs.js.map +1 -1
- package/dist/cjs/p-checkbox_4.cjs.entry.js +13 -4
- package/dist/cjs/p-checkbox_4.cjs.entry.js.map +1 -1
- package/dist/cjs/p-datepicker.cjs.entry.js +3 -3
- package/dist/cjs/p-datepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/p-datepicker.entry.cjs.js.map +1 -1
- package/dist/cjs/p-helper_2.cjs.entry.js +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/collection/components/atoms/tooltip/tooltip.component.css +1 -1
- package/dist/collection/components/molecules/datepicker/datepicker.component.css +1 -1
- package/dist/collection/components/molecules/datepicker/datepicker.component.js +2 -2
- package/dist/collection/components/molecules/datepicker/datepicker.component.js.map +1 -1
- package/dist/collection/components/molecules/dropdown/dropdown.component.css +1 -1
- package/dist/collection/components/molecules/dropdown/dropdown.component.js +32 -3
- package/dist/collection/components/molecules/dropdown/dropdown.component.js.map +1 -1
- package/dist/collection/tailwind/theme/z-index.js +2 -2
- package/dist/collection/tailwind/theme/z-index.js.map +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-DBg0q8YP.js → p-BWP1J8P7.js} +6 -6
- package/dist/components/{p-DBg0q8YP.js.map → p-BWP1J8P7.js.map} +1 -1
- package/dist/components/{p-Bg3-_c4v.js → p-ByBq4ZO0.js} +3 -3
- package/dist/components/{p-Bg3-_c4v.js.map → p-ByBq4ZO0.js.map} +1 -1
- package/dist/components/{p-1TpRsovb.js → p-CUPpa-ib.js} +4 -4
- package/dist/components/{p-1TpRsovb.js.map → p-CUPpa-ib.js.map} +1 -1
- package/dist/components/{p-BOg3d2n1.js → p-CYATHl_a.js} +4 -4
- package/dist/components/{p-BOg3d2n1.js.map → p-CYATHl_a.js.map} +1 -1
- package/dist/components/{p-CAvUntoE.js → p-CeM-_6CM.js} +3 -3
- package/dist/components/{p-CAvUntoE.js.map → p-CeM-_6CM.js.map} +1 -1
- package/dist/components/{p-CfI6suo1.js → p-CsS0Qh_I.js} +17 -7
- package/dist/components/p-CsS0Qh_I.js.map +1 -0
- package/dist/components/{p-BgJXDL3C.js → p-DRR3gR1w.js} +3 -3
- package/dist/components/{p-BgJXDL3C.js.map → p-DRR3gR1w.js.map} +1 -1
- package/dist/components/{p-DWSMDsi3.js → p-Hk6_uWf_.js} +5 -5
- package/dist/components/{p-DWSMDsi3.js.map → p-Hk6_uWf_.js.map} +1 -1
- package/dist/components/{p-Di1xH1f1.js → p-WmvYLNeJ.js} +5 -5
- package/dist/components/{p-Di1xH1f1.js.map → p-WmvYLNeJ.js.map} +1 -1
- package/dist/components/{p-BeT6ilew.js → p-Yka0dtes.js} +3 -3
- package/dist/components/{p-BeT6ilew.js.map → p-Yka0dtes.js.map} +1 -1
- package/dist/components/p-attachment.js +3 -3
- package/dist/components/p-calendar.js +1 -1
- package/dist/components/p-datepicker.js +9 -9
- package/dist/components/p-datepicker.js.map +1 -1
- package/dist/components/p-dropdown.js +1 -1
- package/dist/components/p-field-container.js +1 -1
- package/dist/components/p-field.js +1 -1
- package/dist/components/p-helper.js +1 -1
- package/dist/components/p-pagination-size.js +1 -1
- package/dist/components/p-pagination.js +1 -1
- package/dist/components/p-profile.js +1 -1
- package/dist/components/p-select.js +5 -5
- package/dist/components/p-table-footer.js +1 -1
- package/dist/components/p-table-header.js +1 -1
- package/dist/components/p-table.js +9 -9
- package/dist/components/p-tooltip.js +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-checkbox.p-dropdown.p-dropdown-menu-container.p-dropdown-menu-item.entry.js.map +1 -1
- package/dist/esm/p-checkbox_4.entry.js +13 -4
- package/dist/esm/p-checkbox_4.entry.js.map +1 -1
- package/dist/esm/p-datepicker.entry.js +3 -3
- package/dist/esm/p-datepicker.entry.js.map +1 -1
- package/dist/esm/p-helper_2.entry.js +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/index.esm.js +1 -1
- package/dist/paperless/index.esm.js.map +1 -1
- package/dist/paperless/p-2efda14f.entry.js +2 -0
- package/dist/paperless/p-2efda14f.entry.js.map +1 -0
- package/dist/{build/p-80f058e5.entry.js → paperless/p-78e5a085.entry.js} +2 -2
- package/dist/paperless/p-94dae829.entry.js +2 -0
- package/dist/paperless/p-94dae829.entry.js.map +1 -0
- package/dist/paperless/p-checkbox.p-dropdown.p-dropdown-menu-container.p-dropdown-menu-item.entry.esm.js.map +1 -1
- package/dist/paperless/p-datepicker.entry.esm.js.map +1 -1
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/tailwind/theme/z-index.ts +4 -4
- package/dist/types/components/molecules/dropdown/dropdown.component.d.ts +4 -0
- package/dist/types/components.d.ts +8 -0
- package/dist/types/tailwind/theme/z-index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/build/p-80d1fdae.entry.js +0 -2
- package/dist/build/p-80d1fdae.entry.js.map +0 -1
- package/dist/build/p-be00067c.entry.js +0 -2
- package/dist/build/p-be00067c.entry.js.map +0 -1
- package/dist/components/p-CfI6suo1.js.map +0 -1
- package/dist/paperless/p-80d1fdae.entry.js +0 -2
- package/dist/paperless/p-80d1fdae.entry.js.map +0 -1
- package/dist/paperless/p-be00067c.entry.js +0 -2
- package/dist/paperless/p-be00067c.entry.js.map +0 -1
- /package/dist/build/{p-80f058e5.entry.js.map → p-78e5a085.entry.js.map} +0 -0
- /package/dist/paperless/{p-80f058e5.entry.js.map → p-78e5a085.entry.js.map} +0 -0
|
@@ -4,10 +4,10 @@ import { f as formatTranslation, g as getLocaleComponentStrings } from './p-DiJj
|
|
|
4
4
|
import { c as cn } from './p-CT54OXR2.js';
|
|
5
5
|
import { a as asBoolean } from './p-C5CTp9IA.js';
|
|
6
6
|
import { T as ThemedHost } from './p-7QA93RrV.js';
|
|
7
|
-
import { d as defineCustomElement$4 } from './p-
|
|
7
|
+
import { d as defineCustomElement$4 } from './p-CeM-_6CM.js';
|
|
8
8
|
import { d as defineCustomElement$3 } from './p-BHphGfv6.js';
|
|
9
9
|
import { d as defineCustomElement$2 } from './p-BFbLqg3-.js';
|
|
10
|
-
import { d as defineCustomElement$1 } from './p-
|
|
10
|
+
import { d as defineCustomElement$1 } from './p-DRR3gR1w.js';
|
|
11
11
|
|
|
12
12
|
const fieldContainerComponentCss = "*{box-sizing:border-box}.ml-auto{margin-left:auto!important}.flex{display:flex!important}.h-4{height:1rem!important}.h-5{height:1.25rem!important}.h-6{height:1.5rem!important}.h-8{height:2rem!important}.w-full{width:100%!important}.w-inherit{width:inherit!important}.min-w-0{min-width:0!important}.flex-shrink-0{flex-shrink:0!important}.cursor-auto{cursor:auto!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-col{flex-direction:column!important}.items-end{align-items:flex-end!important}.items-center{align-items:center!important}.justify-between{justify-content:space-between!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.overflow-hidden{overflow:hidden!important}.text-ellipsis{text-overflow:ellipsis!important}.rounded-lg{border-radius:.5rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-medium{font-weight:500!important}.font-normal{font-weight:400!important}.text-storm-200{--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}.text-storm-300{--tw-text-opacity:1!important;color:rgb(116 120 127/var(--tw-text-opacity,1))!important}.text-storm-500{color:rgb(24 30 41/var(--tw-text-opacity,1))!important}.text-storm-500,.text-white{--tw-text-opacity:1!important}.text-white{color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:85.375rem){.container{max-width:85.375rem}}@media (min-width:90rem){.container{max-width:90rem}}@media (min-width:96rem){.container{max-width:96rem}}@media (min-width:105rem){.container{max-width:105rem}}@media (min-width:120rem){.container{max-width:120rem}}@media (min-width:160rem){.container{max-width:160rem}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.empty\\:hidden:empty{display:none!important}.dark\\:text-hurricane-200:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}.dark\\:text-hurricane-300:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(116 120 127/var(--tw-text-opacity,1))!important}.dark\\:text-white:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.dark\\:text-hurricane-200:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}.dark\\:text-hurricane-300:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(116 120 127/var(--tw-text-opacity,1))!important}.dark\\:text-white:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}";
|
|
13
13
|
|
|
@@ -210,6 +210,6 @@ function defineCustomElement() {
|
|
|
210
210
|
defineCustomElement();
|
|
211
211
|
|
|
212
212
|
export { FieldContainer as F, defineCustomElement as d };
|
|
213
|
-
//# sourceMappingURL=p-
|
|
213
|
+
//# sourceMappingURL=p-CUPpa-ib.js.map
|
|
214
214
|
|
|
215
|
-
//# sourceMappingURL=p-
|
|
215
|
+
//# sourceMappingURL=p-CUPpa-ib.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-1TpRsovb.js","mappings":";;;;;;;;;;;AAAA,MAAM,0BAA0B,GAAG,2lGAA2lG;;ACoB9nG,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,mBAAmB,CAAC,EAAE;AACzC,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;AACR,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,KAAK,EAAE,IAAI;AACX,SAAA;AACD,QAAA,IAAI,EAAE;AACL,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,EAAE,EAAE,IAAI;AACR,SAAA;AACD,KAAA;AACD,IAAA,gBAAgB,EAAE;AACjB,QAAA;AACC,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,KAAK,EAAE,KAAK;AACZ,SAAA;AACD,QAAA;AACC,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,KAAK,EAAE,KAAK;AACZ,SAAA;AAED,QAAA;AACC,YAAA,OAAO,EAAE,OAAO;AAChB,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,KAAK,E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,GAAG,MAAM,yBAAyB,CAAC,IAAI,CAAC,GAAG,CAAC;;IAGlD,YAAY,GAAA;AACnB,QAAA,MAAM,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,0BAA0B,CAAC;AAC1E,QAAA,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,yBAAyB,CAAC;AACxE,QAAA,MAAM,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,0BAA0B,CAAC;AAC1E,QAAA,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,yBAAyB,CAAC;QAExE,MAAM,MAAM,GAAG,aAAa,GAAG,CAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,QAAQ,GAAG,GAAG,IAAI,CAAC,MAAM;QACnE,MAAM,KAAK,GAAG,YAAY,GAAG,CAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,OAAO,GAAG,GAAG,IAAI,CAAC,KAAK;QAE/D,MAAM,yBAAyB,GAC9B,YAAY;AACZ,aAAC,IAAI,CAAC,KAAK,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,KAAK,KAAK,MAAM,CAAC;QAExE,OAAO;YACN,aAAa;YACb,YAAY;YACZ,aAAa;YACb,YAAY;YACZ,MAAM;YACN,KAAK;YACL,yBAAyB;SACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/molecules/field/container/field-container.component.css?tag=p-field-container&encapsulation=shadow","src/components/molecules/field/container/field-container.component.tsx"],"sourcesContent":["","import { Placement } from '@floating-ui/dom';\nimport {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tListen,\n\tProp,\n\tState,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport {\n\tcn,\n\tformatTranslation,\n\tgetLocaleComponentStrings,\n} from '../../../../utils';\nimport { asBoolean } from '../../../../utils/as-boolean';\nimport { ThemedHost } from '../../../../internal/themed-host.component';\n\nconst loader = cva(['rounded-lg w-full'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tread: null,\n\t\t\twrite: null,\n\t\t},\n\t\tsize: {\n\t\t\tbase: null,\n\t\t\tsm: null,\n\t\t},\n\t},\n\tcompoundVariants: [\n\t\t{\n\t\t\tvariant: 'read',\n\t\t\tsize: 'base',\n\t\t\tclass: 'h-5',\n\t\t},\n\t\t{\n\t\t\tvariant: 'read',\n\t\t\tsize: 'sm',\n\t\t\tclass: 'h-4',\n\t\t},\n\n\t\t{\n\t\t\tvariant: 'write',\n\t\t\tsize: 'base',\n\t\t\tclass: 'h-8',\n\t\t},\n\t\t{\n\t\t\tvariant: 'write',\n\t\t\tsize: 'sm',\n\t\t\tclass: 'h-6',\n\t\t},\n\t],\n});\n\nexport type templateFunc = () => string;\n\n@Component({\n\ttag: 'p-field-container',\n\tstyleUrl: 'field-container.component.css',\n\tshadow: true,\n})\nexport class FieldContainer {\n\tprivate _defaultOptionalTemplate: templateFunc = () =>\n\t\tformatTranslation(this._locales.optional);\n\t/**\n\t * The id for the label\n\t */\n\t@Prop() id: string;\n\n\t/**\n\t * Align content to the start or end\n\t */\n\t@Prop() align: 'start' | 'end' = 'start';\n\n\t/**\n\t * The label of the input group\n\t */\n\t@Prop() label: string | HTMLSlotElement;\n\n\t/**\n\t * Wether the field container is in loading state\n\t */\n\t@Prop() loading: boolean = false;\n\n\t/**\n\t * The size of the loader\n\t */\n\t@Prop() loadingSize: 'base' | 'sm' = 'base';\n\n\t/**\n\t * The variant of the field container\n\t */\n\t@Prop() variant: 'read' | 'write';\n\n\t/**\n\t * The helper of the input group\n\t */\n\t@Prop() helper: string | HTMLSlotElement;\n\n\t/**\n\t * Wether the field is required\n\t */\n\t@Prop({ reflect: true }) required: boolean;\n\n\t/**\n\t * Wether to show optional when not required\n\t */\n\t@Prop({ reflect: true }) showOptional: boolean = true;\n\n\t/**\n\t * The helper of the input group\n\t */\n\t@Prop({ reflect: true }) error: string;\n\n\t/**\n\t * The placement of the error popover\n\t */\n\t@Prop() errorPlacement: Placement;\n\n\t/**\n\t * Force show the error tooltip\n\t */\n\t@Prop({ reflect: true }) forceShowTooltip: boolean = false;\n\n\t/**\n\t * The template for the optional text\n\t */\n\t@Prop() optionalTemplate: templateFunc = this._defaultOptionalTemplate;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@Event() focus: EventEmitter<void>;\n\n\t/**\n\t * Locales used for this component\n\t */\n\t@State() private _locales: any = {};\n\n\tcomponentWillLoad() {\n\t\tthis._setLocales();\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\thasHeaderSlot,\n\t\t\thasErrorSlot,\n\t\t\thelper,\n\t\t\tlabel,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t} = this._getSlotInfo();\n\n\t\tlet contentSlot = (\n\t\t\t<slot\n\t\t\t\tslot='trigger'\n\t\t\t\tname='content'\n\t\t\t/>\n\t\t);\n\n\t\tif (this.loading) {\n\t\t\tcontentSlot = (\n\t\t\t\t<p-loader\n\t\t\t\t\tvariant='ghost'\n\t\t\t\t\tclass={loader({ variant: this.variant, size: this.loadingSize })}\n\t\t\t\t\tslot='trigger'\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<ThemedHost>\n\t\t\t\t<label\n\t\t\t\t\thtmlFor={this.id}\n\t\t\t\t\tclass={cn('flex w-inherit flex-col gap-1', {\n\t\t\t\t\t\t'cursor-auto': this.variant === 'read',\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={cn('flex items-end justify-between gap-1 empty:hidden', {\n\t\t\t\t\t\t\t'flex-row-reverse': this.align === 'end',\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t{(!!label?.length || !!helper?.length) && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass='flex min-w-0 gap-2'\n\t\t\t\t\t\t\t\tonClick={() => this.focus.emit()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span class='min-w-0 overflow-hidden text-ellipsis text-xs font-medium text-storm-300 dark:text-hurricane-200'>\n\t\t\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t\t{helper && (\n\t\t\t\t\t\t\t\t\t<p-helper\n\t\t\t\t\t\t\t\t\t\tclass='flex flex-shrink-0'\n\t\t\t\t\t\t\t\t\t\tplacement='top'\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{helper}\n\t\t\t\t\t\t\t\t\t</p-helper>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{((!asBoolean(this.required) && asBoolean(this.showOptional)) ||\n\t\t\t\t\t\t\thasHeaderSlot) && (\n\t\t\t\t\t\t\t<div class='flex items-center gap-1'>\n\t\t\t\t\t\t\t\t{!asBoolean(this.required) &&\n\t\t\t\t\t\t\t\t\tasBoolean(this.showOptional) &&\n\t\t\t\t\t\t\t\t\tthis.variant === 'write' && (\n\t\t\t\t\t\t\t\t\t\t<span class='text-xs font-medium text-storm-200 dark:text-hurricane-300'>\n\t\t\t\t\t\t\t\t\t\t\t{this.optionalTemplate()}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{hasHeaderSlot && <slot name='header' />}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<p-tooltip\n\t\t\t\t\t\tclass={cn({\n\t\t\t\t\t\t\t'w-full': this.variant === 'write' || this.loading,\n\t\t\t\t\t\t\t'ml-auto': this.align === 'end',\n\t\t\t\t\t\t\t'font-normal': this.variant === 'read',\n\t\t\t\t\t\t\t'text-storm-500 dark:text-white': this.variant === 'read',\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tvariant='error'\n\t\t\t\t\t\tcontent={this.error}\n\t\t\t\t\t\tshow={\n\t\t\t\t\t\t\terrorAndErrorIsNotBoolean &&\n\t\t\t\t\t\t\tasBoolean(this.forceShowTooltip, false)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tenableUserInput={false}\n\t\t\t\t\t\tplacement={this.errorPlacement}\n\t\t\t\t\t>\n\t\t\t\t\t\t{hasErrorSlot && (\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\tname='error'\n\t\t\t\t\t\t\t\tslot='content'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{contentSlot}\n\t\t\t\t\t</p-tooltip>\n\t\t\t\t</label>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\t@Listen('localeChanged', { target: 'body' })\n\tprivate async _setLocales(): Promise<void> {\n\t\tthis._locales = await getLocaleComponentStrings(this._el);\n\t}\n\n\tprivate _getSlotInfo() {\n\t\tconst hasHelperSlot = !!this._el.querySelector(':scope > [slot=\"helper\"]');\n\t\tconst hasLabelSlot = !!this._el.querySelector(':scope > [slot=\"label\"]');\n\t\tconst hasHeaderSlot = !!this._el.querySelector(':scope > [slot=\"header\"]');\n\t\tconst hasErrorSlot = !!this._el.querySelector(':scope > [slot=\"error\"]');\n\n\t\tconst helper = hasHelperSlot ? <slot name='helper' /> : this.helper;\n\t\tconst label = hasLabelSlot ? <slot name='label' /> : this.label;\n\n\t\tconst errorAndErrorIsNotBoolean =\n\t\t\thasErrorSlot ||\n\t\t\t(this.error && typeof this.error === 'string' && this.error !== 'true');\n\n\t\treturn {\n\t\t\thasHelperSlot,\n\t\t\thasLabelSlot,\n\t\t\thasHeaderSlot,\n\t\t\thasErrorSlot,\n\t\t\thelper,\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ExE,MAAM,MAAM,GAAG,aAAa,GAAG,CAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,QAAQ,GAAG,GAAG,IAAI,CAAC,MAAM;QACnE,MAAM,KAAK,GAAG,YAAY,GAAG,CAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,OAAO,GAAG,GAAG,IAAI,CAAC,KAAK;QAE/D,MAAM,yBAAyB,GAC9B,YAAY;AACZ,aAAC,IAAI,CAAC,KAAK,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,KAAK,KAAK,MAAM,CAAC;QAExE,OAAO;YACN,aAAa;YACb,YAAY;YACZ,aAAa;YACb,YAAY;YACZ,MAAM;YACN,KAAK;YACL,yBAAyB;SACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/molecules/field/container/field-container.component.css?tag=p-field-container&encapsulation=shadow","src/components/molecules/field/container/field-container.component.tsx"],"sourcesContent":["","import { Placement } from '@floating-ui/dom';\nimport {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tListen,\n\tProp,\n\tState,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport {\n\tcn,\n\tformatTranslation,\n\tgetLocaleComponentStrings,\n} from '../../../../utils';\nimport { asBoolean } from '../../../../utils/as-boolean';\nimport { ThemedHost } from '../../../../internal/themed-host.component';\n\nconst loader = cva(['rounded-lg w-full'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tread: null,\n\t\t\twrite: null,\n\t\t},\n\t\tsize: {\n\t\t\tbase: null,\n\t\t\tsm: null,\n\t\t},\n\t},\n\tcompoundVariants: [\n\t\t{\n\t\t\tvariant: 'read',\n\t\t\tsize: 'base',\n\t\t\tclass: 'h-5',\n\t\t},\n\t\t{\n\t\t\tvariant: 'read',\n\t\t\tsize: 'sm',\n\t\t\tclass: 'h-4',\n\t\t},\n\n\t\t{\n\t\t\tvariant: 'write',\n\t\t\tsize: 'base',\n\t\t\tclass: 'h-8',\n\t\t},\n\t\t{\n\t\t\tvariant: 'write',\n\t\t\tsize: 'sm',\n\t\t\tclass: 'h-6',\n\t\t},\n\t],\n});\n\nexport type templateFunc = () => string;\n\n@Component({\n\ttag: 'p-field-container',\n\tstyleUrl: 'field-container.component.css',\n\tshadow: true,\n})\nexport class FieldContainer {\n\tprivate _defaultOptionalTemplate: templateFunc = () =>\n\t\tformatTranslation(this._locales.optional);\n\t/**\n\t * The id for the label\n\t */\n\t@Prop() id: string;\n\n\t/**\n\t * Align content to the start or end\n\t */\n\t@Prop() align: 'start' | 'end' = 'start';\n\n\t/**\n\t * The label of the input group\n\t */\n\t@Prop() label: string | HTMLSlotElement;\n\n\t/**\n\t * Wether the field container is in loading state\n\t */\n\t@Prop() loading: boolean = false;\n\n\t/**\n\t * The size of the loader\n\t */\n\t@Prop() loadingSize: 'base' | 'sm' = 'base';\n\n\t/**\n\t * The variant of the field container\n\t */\n\t@Prop() variant: 'read' | 'write';\n\n\t/**\n\t * The helper of the input group\n\t */\n\t@Prop() helper: string | HTMLSlotElement;\n\n\t/**\n\t * Wether the field is required\n\t */\n\t@Prop({ reflect: true }) required: boolean;\n\n\t/**\n\t * Wether to show optional when not required\n\t */\n\t@Prop({ reflect: true }) showOptional: boolean = true;\n\n\t/**\n\t * The helper of the input group\n\t */\n\t@Prop({ reflect: true }) error: string;\n\n\t/**\n\t * The placement of the error popover\n\t */\n\t@Prop() errorPlacement: Placement;\n\n\t/**\n\t * Force show the error tooltip\n\t */\n\t@Prop({ reflect: true }) forceShowTooltip: boolean = false;\n\n\t/**\n\t * The template for the optional text\n\t */\n\t@Prop() optionalTemplate: templateFunc = this._defaultOptionalTemplate;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@Event() focus: EventEmitter<void>;\n\n\t/**\n\t * Locales used for this component\n\t */\n\t@State() private _locales: any = {};\n\n\tcomponentWillLoad() {\n\t\tthis._setLocales();\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\thasHeaderSlot,\n\t\t\thasErrorSlot,\n\t\t\thelper,\n\t\t\tlabel,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t} = this._getSlotInfo();\n\n\t\tlet contentSlot = (\n\t\t\t<slot\n\t\t\t\tslot='trigger'\n\t\t\t\tname='content'\n\t\t\t/>\n\t\t);\n\n\t\tif (this.loading) {\n\t\t\tcontentSlot = (\n\t\t\t\t<p-loader\n\t\t\t\t\tvariant='ghost'\n\t\t\t\t\tclass={loader({ variant: this.variant, size: this.loadingSize })}\n\t\t\t\t\tslot='trigger'\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<ThemedHost>\n\t\t\t\t<label\n\t\t\t\t\thtmlFor={this.id}\n\t\t\t\t\tclass={cn('flex w-inherit flex-col gap-1', {\n\t\t\t\t\t\t'cursor-auto': this.variant === 'read',\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={cn('flex items-end justify-between gap-1 empty:hidden', {\n\t\t\t\t\t\t\t'flex-row-reverse': this.align === 'end',\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t{(!!label?.length || !!helper?.length) && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass='flex min-w-0 gap-2'\n\t\t\t\t\t\t\t\tonClick={() => this.focus.emit()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span class='min-w-0 overflow-hidden text-ellipsis text-xs font-medium text-storm-300 dark:text-hurricane-200'>\n\t\t\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t\t{helper && (\n\t\t\t\t\t\t\t\t\t<p-helper\n\t\t\t\t\t\t\t\t\t\tclass='flex flex-shrink-0'\n\t\t\t\t\t\t\t\t\t\tplacement='top'\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{helper}\n\t\t\t\t\t\t\t\t\t</p-helper>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{((!asBoolean(this.required) && asBoolean(this.showOptional)) ||\n\t\t\t\t\t\t\thasHeaderSlot) && (\n\t\t\t\t\t\t\t<div class='flex items-center gap-1'>\n\t\t\t\t\t\t\t\t{!asBoolean(this.required) &&\n\t\t\t\t\t\t\t\t\tasBoolean(this.showOptional) &&\n\t\t\t\t\t\t\t\t\tthis.variant === 'write' && (\n\t\t\t\t\t\t\t\t\t\t<span class='text-xs font-medium text-storm-200 dark:text-hurricane-300'>\n\t\t\t\t\t\t\t\t\t\t\t{this.optionalTemplate()}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{hasHeaderSlot && <slot name='header' />}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<p-tooltip\n\t\t\t\t\t\tclass={cn({\n\t\t\t\t\t\t\t'w-full': this.variant === 'write' || this.loading,\n\t\t\t\t\t\t\t'ml-auto': this.align === 'end',\n\t\t\t\t\t\t\t'font-normal': this.variant === 'read',\n\t\t\t\t\t\t\t'text-storm-500 dark:text-white': this.variant === 'read',\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tvariant='error'\n\t\t\t\t\t\tcontent={this.error}\n\t\t\t\t\t\tshow={\n\t\t\t\t\t\t\terrorAndErrorIsNotBoolean &&\n\t\t\t\t\t\t\tasBoolean(this.forceShowTooltip, false)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tenableUserInput={false}\n\t\t\t\t\t\tplacement={this.errorPlacement}\n\t\t\t\t\t>\n\t\t\t\t\t\t{hasErrorSlot && (\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\tname='error'\n\t\t\t\t\t\t\t\tslot='content'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{contentSlot}\n\t\t\t\t\t</p-tooltip>\n\t\t\t\t</label>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\t@Listen('localeChanged', { target: 'body' })\n\tprivate async _setLocales(): Promise<void> {\n\t\tthis._locales = await getLocaleComponentStrings(this._el);\n\t}\n\n\tprivate _getSlotInfo() {\n\t\tconst hasHelperSlot = !!this._el.querySelector(':scope > [slot=\"helper\"]');\n\t\tconst hasLabelSlot = !!this._el.querySelector(':scope > [slot=\"label\"]');\n\t\tconst hasHeaderSlot = !!this._el.querySelector(':scope > [slot=\"header\"]');\n\t\tconst hasErrorSlot = !!this._el.querySelector(':scope > [slot=\"error\"]');\n\n\t\tconst helper = hasHelperSlot ? <slot name='helper' /> : this.helper;\n\t\tconst label = hasLabelSlot ? <slot name='label' /> : this.label;\n\n\t\tconst errorAndErrorIsNotBoolean =\n\t\t\thasErrorSlot ||\n\t\t\t(this.error && typeof this.error === 'string' && this.error !== 'true');\n\n\t\treturn {\n\t\t\thasHelperSlot,\n\t\t\thasLabelSlot,\n\t\t\thasHeaderSlot,\n\t\t\thasErrorSlot,\n\t\t\thelper,\n\t\t\tlabel,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t};\n\t}\n}\n"],"version":3}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, F as Fragment } from './p-Dgl2kvBS.js';
|
|
2
2
|
import { c as cva } from './p-CBWjHURv.js';
|
|
3
|
-
import { d as defineCustomElement$1, a as defaultSize, b as defaultSizeOptions } from './p-
|
|
3
|
+
import { d as defineCustomElement$1, a as defaultSize, b as defaultSizeOptions } from './p-Yka0dtes.js';
|
|
4
4
|
import { T as ThemedHost } from './p-7QA93RrV.js';
|
|
5
5
|
import { d as defineCustomElement$9 } from './p-D1ZRTCkT.js';
|
|
6
6
|
import { d as defineCustomElement$8 } from './p-DzWmipVp.js';
|
|
7
|
-
import { d as defineCustomElement$7 } from './p-
|
|
7
|
+
import { d as defineCustomElement$7 } from './p-CsS0Qh_I.js';
|
|
8
8
|
import { d as defineCustomElement$6 } from './p-D2igmK5l.js';
|
|
9
9
|
import { d as defineCustomElement$5 } from './p-CLLXCnKM.js';
|
|
10
10
|
import { d as defineCustomElement$4 } from './p-BHphGfv6.js';
|
|
@@ -169,6 +169,6 @@ function defineCustomElement() {
|
|
|
169
169
|
defineCustomElement();
|
|
170
170
|
|
|
171
171
|
export { Pagination as P, defineCustomElement as d };
|
|
172
|
-
//# sourceMappingURL=p-
|
|
172
|
+
//# sourceMappingURL=p-CYATHl_a.js.map
|
|
173
173
|
|
|
174
|
-
//# sourceMappingURL=p-
|
|
174
|
+
//# sourceMappingURL=p-CYATHl_a.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-CYATHl_a.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,sBAAsB,GAAG,2vDAA2vD;;ACa1xD,MAAM,UAAU,GAAG,GAAG,CACrB;IACC,cAAc;IACd,oBAAoB;IACpB,cAAc;IACd,2DAA2D;IAC3D,iDAAiD;IACjD,KAAK;CACL,EACD;AACC,IAAA,QAAQ,EAAE;AACT,QAAA,MAAM,EAAE;AACP,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,IAAI,EAAE,QAAQ;AACd,SAAA;AACD,KAAA;AACD,CAAA,CACD;MAOY,UAAU,iBAAAA,kBAAA,CAAA,MAAA,UAAA,SAAAC,CAAA,CAAA;;;;;;;;;AACtB;;AAEG;IACK,gBAAgB,GAAY,IAAI;AAExC;;AAEG;IACK,oBAAoB,GAAY,IAAI;AAE5C;;AAEG;IACK,qBAAqB,GAAY,IAAI;AAE7C;;AAEG;IACqC,IAAI,GAAW,CAAC;AAExD;;AAEG;AACK,IAAA,KAAK;AAEb;;AAEG;IACK,QAAQ,GAAW,WAAW;AAEt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,EAAE,IAAI,CAAC,QAAQ,EACvB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACvC,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,EAC1D,aAAa,EAAE,CAAC,EAAE,MAAM,EAAE,KAAI;AAC7B,gBAAA,IAAI,CAAC,mBAAmB,GAAG,MAAM,GAAG,CAAC;AACrC,gBAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC;AAC9B,aAAC,EACA,CAAA,CACF,CACI,CACM;;AAIP,IAAA,eAAe,CAAC,CAAU,EAAA;QACjC,IAAI,CAAC,CAAC,EAAE;YACP;;AAGD,QAAA,IAAI,CAAC,QAAQ,GAAG,CAAC;QACjB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/molecules/pagination/pagination/pagination.component.css?tag=p-pagination&encapsulation=shadow","src/components/molecules/pagination/pagination/pagination.component.tsx"],"sourcesContent":["","import {\n\tComponent,\n\tEvent,\n\tEventEmitter,\n\tFragment,\n\th,\n\tProp,\n\tState,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { defaultSize, defaultSizeOptions } from '../size/constants';\nimport { ThemedHost } from '../../../../internal/themed-host.component';\n\nconst pagination = cva(\n\t[\n\t\t'p-pagination',\n\t\t'items-center gap-2',\n\t\t'rounded-full',\n\t\t'bg-off-white-300 border border-solid border-off-white-700',\n\t\t'dark:bg-hurricane-500 dark:border-hurricane-400',\n\t\t'p-1',\n\t],\n\t{\n\t\tvariants: {\n\t\t\thidden: {\n\t\t\t\tfalse: 'flex',\n\t\t\t\ttrue: 'hidden',\n\t\t\t},\n\t\t},\n\t}\n);\n\n@Component({\n\ttag: 'p-pagination',\n\tstyleUrl: 'pagination.component.css',\n\tshadow: true,\n})\nexport class Pagination {\n\t/**\n\t * Wether to hide when there is only 1 page available\n\t */\n\t@Prop() hideOnSinglePage: boolean = true;\n\n\t/**\n\t * Wether to enable pagination size select\n\t */\n\t@Prop() enablePaginationSize: boolean = true;\n\n\t/**\n\t * Wether to enable pagination pages\n\t */\n\t@Prop() enablePaginationPages: boolean = true;\n\n\t/**\n\t * The current page\n\t */\n\t@Prop({ mutable: true, reflect: true }) page: number = 1;\n\n\t/**\n\t * The total amount of items\n\t */\n\t@Prop() total!: number;\n\n\t/**\n\t * The amount of items per page\n\t */\n\t@Prop() pageSize: number = defaultSize;\n\n\t/**\n\t * The options for the page size\n\t */\n\t@Prop() pageSizeOptions: number[] = defaultSizeOptions;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tpageChange: EventEmitter<number>;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tpageSizeChange: EventEmitter<number>;\n\n\t/**\n\t * The pages that were generated\n\t */\n\t@Event({ bubbles: false }) pagesChange: EventEmitter<number>;\n\n\t@State() private _hasPaginationPages = true;\n\n\trender() {\n\t\tconst hidePageSizeSelect =\n\t\t\tthis.hideOnSinglePage && this.total <= this.pageSizeOptions?.[0];\n\n\t\treturn (\n\t\t\t<ThemedHost>\n\t\t\t\t<div\n\t\t\t\t\tclass={pagination({\n\t\t\t\t\t\thidden:\n\t\t\t\t\t\t\t(hidePageSizeSelect && !this._hasPaginationPages) ||\n\t\t\t\t\t\t\t(!this.enablePaginationSize && !this.enablePaginationPages),\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{this.enablePaginationPages && this.enablePaginationSize && (\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t<p-pagination-size\n\t\t\t\t\t\t\t\thidden={hidePageSizeSelect}\n\t\t\t\t\t\t\t\tsize={this.pageSize}\n\t\t\t\t\t\t\t\tsizeOptions={this.pageSizeOptions}\n\t\t\t\t\t\t\t\tonSizeChange={({ detail }) => this._changePageSize(detail)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t{!hidePageSizeSelect &&\n\t\t\t\t\t\t\t\tthis.hideOnSinglePage &&\n\t\t\t\t\t\t\t\tthis._hasPaginationPages && (\n\t\t\t\t\t\t\t\t\t<p-divider\n\t\t\t\t\t\t\t\t\t\tvariant='vertical'\n\t\t\t\t\t\t\t\t\t\tclass='mx-0 h-4 text-off-white-700 dark:text-hurricane-400'\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</Fragment>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{this.enablePaginationPages && (\n\t\t\t\t\t\t<p-pagination-pages\n\t\t\t\t\t\t\tpageSize={this.pageSize}\n\t\t\t\t\t\t\ttotal={this.total}\n\t\t\t\t\t\t\tpage={this.page}\n\t\t\t\t\t\t\thideOnSinglePage={this.hideOnSinglePage}\n\t\t\t\t\t\t\tonPageChange={({ detail }) => this.pageChange.emit(detail)}\n\t\t\t\t\t\t\tonPagesChange={({ detail }) => {\n\t\t\t\t\t\t\t\tthis._hasPaginationPages = detail > 1;\n\t\t\t\t\t\t\t\tthis.pagesChange.emit(detail);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\tprivate _changePageSize(s?: number) {\n\t\tif (!s) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pageSize = s;\n\t\tthis.pageSizeChange.emit(this.pageSize);\n\t}\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h } from './p-Dgl2kvBS.js';
|
|
2
2
|
import { T as ThemedHost } from './p-7QA93RrV.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './p-BHphGfv6.js';
|
|
4
|
-
import { d as defineCustomElement$1 } from './p-
|
|
4
|
+
import { d as defineCustomElement$1 } from './p-DRR3gR1w.js';
|
|
5
5
|
|
|
6
6
|
const helperComponentCss = ".inline-flex{display:inline-flex!important}.h-\\[0\\.875rem\\]{height:.875rem!important}.w-\\[0\\.875rem\\]{width:.875rem!important}*{box-sizing:border-box}:host{display:inline-flex;height:.875rem;width:.875rem}.absolute{position:absolute!important}.flex{display:flex!important}.cursor-pointer{cursor:pointer!important}.text-storm-300{--tw-text-opacity:1!important;color:rgb(116 120 127/var(--tw-text-opacity,1))!important}.hover\\:text-storm-500:hover{--tw-text-opacity:1!important;color:rgb(24 30 41/var(--tw-text-opacity,1))!important}.dark\\:text-hurricane-300:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(116 120 127/var(--tw-text-opacity,1))!important}.dark\\:hover\\:text-hurricane-200:hover:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}.dark\\:text-hurricane-300:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(116 120 127/var(--tw-text-opacity,1))!important}.dark\\:hover\\:text-hurricane-200:hover:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}";
|
|
7
7
|
|
|
@@ -53,6 +53,6 @@ function defineCustomElement() {
|
|
|
53
53
|
defineCustomElement();
|
|
54
54
|
|
|
55
55
|
export { Helper as H, defineCustomElement as d };
|
|
56
|
-
//# sourceMappingURL=p-
|
|
56
|
+
//# sourceMappingURL=p-CeM-_6CM.js.map
|
|
57
57
|
|
|
58
|
-
//# sourceMappingURL=p-
|
|
58
|
+
//# sourceMappingURL=p-CeM-_6CM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-CeM-_6CM.js","mappings":";;;;;AAAA,MAAM,kBAAkB,GAAG,otCAAotC;;MCSluC,MAAM,iBAAAA,kBAAA,CAAA,MAAA,MAAA,SAAAC,CAAA,CAAA;;;;;;AAClB;;AAEG;IACK,QAAQ,GAAa,UAAU;AAEvC;;AAEG;IACK,SAAS,GAAc,KAAK;IAEpC,MAAM,GAAA;QACL,QACC,EAAC,UAAU,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACV,CAAA,CAAA,WAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACC,KAAK,EAAC,MAAM,EACZ,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAA,EAEvB,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACC,IAAI,EAAC,IAAI,EACT,KAAK,EAAC,0GAA0G,EAChH,OAAO,EAAC,iBAAiB,EACzB,IAAI,EAAC,SAAS,EACb,CAAA,EAEF,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,SAAS,EAAA,EAClB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACH,CACK,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/atoms/helper/helper.component.css?tag=p-helper&encapsulation=shadow","src/components/atoms/helper/helper.component.tsx"],"sourcesContent":[":host {\n\t@apply inline-flex h-[0.875rem] w-[0.875rem];\n}\n","import { Placement, Strategy } from '@floating-ui/dom';\nimport { Component, h, Prop } from '@stencil/core';\nimport { ThemedHost } from '../../../internal/themed-host.component';\n\n@Component({\n\ttag: 'p-helper',\n\tstyleUrl: 'helper.component.css',\n\tshadow: true,\n})\nexport class Helper {\n\t/**\n\t * The strategy of the popover placement\n\t */\n\t@Prop() strategy: Strategy = 'absolute';\n\n\t/**\n\t * The placement of the helper popover\n\t */\n\t@Prop() placement: Placement = 'top';\n\n\trender() {\n\t\treturn (\n\t\t\t<ThemedHost>\n\t\t\t\t<p-tooltip\n\t\t\t\t\tclass='flex'\n\t\t\t\t\tplacement={this.placement}\n\t\t\t\t\tstrategy={this.strategy}\n\t\t\t\t>\n\t\t\t\t\t<p-icon\n\t\t\t\t\t\tsize='sm'\n\t\t\t\t\t\tclass='cursor-pointer text-storm-300 hover:text-storm-500 dark:text-hurricane-300 dark:hover:text-hurricane-200'\n\t\t\t\t\t\tvariant='question-circle'\n\t\t\t\t\t\tslot='trigger'\n\t\t\t\t\t/>\n\n\t\t\t\t\t<div slot='content'>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t</p-tooltip>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n}\n"],"version":3}
|
|
@@ -5,9 +5,9 @@ import { a as childOfComposed } from './p-BFSNj6hu.js';
|
|
|
5
5
|
import { c as cn } from './p-CT54OXR2.js';
|
|
6
6
|
import { d as defineCustomElement$1 } from './p-D2igmK5l.js';
|
|
7
7
|
|
|
8
|
-
const dropdownComponentCss = "*{box-sizing:border-box}.static{position:static!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.z-dropdown{z-index:200!important}.block{display:block!important}.hidden{display:none!important}.w-auto{width:auto!important}.w-full{width:100%!important}.max-w-\\[13\\.875rem\\]{max-width:13.875rem!important}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:85.375rem){.container{max-width:85.375rem}}@media (min-width:90rem){.container{max-width:90rem}}@media (min-width:96rem){.container{max-width:96rem}}@media (min-width:105rem){.container{max-width:105rem}}@media (min-width:120rem){.container{max-width:120rem}}@media (min-width:160rem){.container{max-width:160rem}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}";
|
|
8
|
+
const dropdownComponentCss = "*{box-sizing:border-box}.static{position:static!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.z-datepicker{z-index:401!important}.z-dropdown{z-index:200!important}.block{display:block!important}.hidden{display:none!important}.w-auto{width:auto!important}.w-full{width:100%!important}.max-w-\\[13\\.875rem\\]{max-width:13.875rem!important}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:85.375rem){.container{max-width:85.375rem}}@media (min-width:90rem){.container{max-width:90rem}}@media (min-width:96rem){.container{max-width:96rem}}@media (min-width:105rem){.container{max-width:105rem}}@media (min-width:120rem){.container{max-width:120rem}}@media (min-width:160rem){.container{max-width:160rem}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}";
|
|
9
9
|
|
|
10
|
-
const dropdownContainerClass = cva(['
|
|
10
|
+
const dropdownContainerClass = cva(['hidden'], {
|
|
11
11
|
variants: {
|
|
12
12
|
strategy: {
|
|
13
13
|
absolute: 'absolute',
|
|
@@ -21,6 +21,10 @@ const dropdownContainerClass = cva(['z-dropdown hidden'], {
|
|
|
21
21
|
false: null,
|
|
22
22
|
true: 'max-w-[13.875rem]',
|
|
23
23
|
},
|
|
24
|
+
isDatepicker: {
|
|
25
|
+
false: 'z-dropdown',
|
|
26
|
+
true: 'z-datepicker',
|
|
27
|
+
},
|
|
24
28
|
},
|
|
25
29
|
compoundVariants: [
|
|
26
30
|
{
|
|
@@ -101,6 +105,10 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends H {
|
|
|
101
105
|
* The class of the dropdown container
|
|
102
106
|
*/
|
|
103
107
|
containerClass;
|
|
108
|
+
/**
|
|
109
|
+
* Wether the dropdown container is a datepicker dropdown
|
|
110
|
+
*/
|
|
111
|
+
isDatepicker = false;
|
|
104
112
|
get _el() { return this; }
|
|
105
113
|
/**
|
|
106
114
|
* Open change event
|
|
@@ -127,11 +135,12 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends H {
|
|
|
127
135
|
this._checkItems();
|
|
128
136
|
}
|
|
129
137
|
render() {
|
|
130
|
-
return (h(Host, { key: '
|
|
138
|
+
return (h(Host, { key: 'd78bffe575a77739a800e8832f7ce0fa2c3e6541', class: 'relative' }, h("div", { key: '9f66c1f3bcb6a0d0315b27263027eff4c12b6d26', class: 'trigger', onClick: () => this._triggerClickHandler() }, h("slot", { key: 'e6c3e7586ad799522efc2344588112beedaa1ce6', name: 'trigger' })), h("div", { key: '4ba9a6fc4c4f77ddf4a02cc450280f8a5e950985', class: 'relative w-full' }, h("p-dropdown-menu-container", { key: '10a1bb82fd52e0e25f9de3f8ae3235cbdc84ea68', variant: this.variant, maxWidth: this.applyMaxWidth, fullWidth: this.applyFullWidth && !this.applyMaxWidth, allowOverflow: this.allowOverflow, scrollable: this.scrollable, class: cn(dropdownContainerClass({
|
|
131
139
|
strategy: this.strategy,
|
|
132
140
|
maxWidth: this.applyMaxWidth,
|
|
133
141
|
fullWidth: this.applyFullWidth && !this.applyMaxWidth,
|
|
134
|
-
|
|
142
|
+
isDatepicker: this.isDatepicker,
|
|
143
|
+
}), this.containerClass), ref: el => this._load(el), onClick: () => this._containerClickHandler(), role: 'popover', "data-placement": this.placement, "data-strategy": this.strategy }, h("slot", { key: '18fb93346e8882c945ece8d12a4e7594e5065453', name: 'items' })))));
|
|
135
144
|
}
|
|
136
145
|
_checkButtons(active = false) {
|
|
137
146
|
if (!this.applyChevron) {
|
|
@@ -273,7 +282,8 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends H {
|
|
|
273
282
|
"applyChevron": [4, "apply-chevron"],
|
|
274
283
|
"chevronPosition": [1, "chevron-position"],
|
|
275
284
|
"chevronDirection": [1, "chevron-direction"],
|
|
276
|
-
"containerClass": [1, "container-class"]
|
|
285
|
+
"containerClass": [1, "container-class"],
|
|
286
|
+
"isDatepicker": [4, "is-datepicker"]
|
|
277
287
|
}, [[6, "click", "documentClickHandler"]], {
|
|
278
288
|
"show": ["onShowChange"]
|
|
279
289
|
}]);
|
|
@@ -298,6 +308,6 @@ function defineCustomElement() {
|
|
|
298
308
|
defineCustomElement();
|
|
299
309
|
|
|
300
310
|
export { Dropdown as D, defineCustomElement as d };
|
|
301
|
-
//# sourceMappingURL=p-
|
|
311
|
+
//# sourceMappingURL=p-CsS0Qh_I.js.map
|
|
302
312
|
|
|
303
|
-
//# sourceMappingURL=p-
|
|
313
|
+
//# sourceMappingURL=p-CsS0Qh_I.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-CsS0Qh_I.js","mappings":";;;;;;;AAAA,MAAM,oBAAoB,GAAG,6qCAA6qC;;ACwB1sC,MAAM,sBAAsB,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE;AAC9C,IAAA,QAAQ,EAAE;AACT,QAAA,QAAQ,EAAE;AACT,YAAA,QAAQ,EAAE,UAAU;AACpB,YAAA,KAAK,EAAE,OAAO;AACd,SAAA;AACD,QAAA,SAAS,EAAE;AACV,YAAA,KAAK,EAAE,IAAI;AACX,YAAA,IAAI,EAAE,QAAQ;AACd,SAAA;AACD,QAAA,QAAQ,EAAE;AACT,YAAA,KAAK,EAAE,IAAI;AACX,YAAA,IAAI,EAAE,mBAAmB;AACzB,SAAA;AACD,QAAA,YAAY,EAAE;AACb,YAAA,KAAK,EAAE,YAAY;AACnB,YAAA,IAAI,EAAE,cAAc;AACpB,SAAA;AACD,KAAA;AACD,IAAA,gBAAgB,EAAE;AACjB,QAAA;AACC,YAAA,SAAS,EAAE,KAAK;AAChB,YAAA,QAAQ,EAAE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E;gBAC/B,GAAG,EAAE,CAAG,EAAA,CAAC,CAAI,EAAA,CAAA;gBACb,IAAI,EAAE,CAAG,EAAA,CAAC,CAAI,EAAA,CAAA;AACd,aAAA,CAAC;AACH,SAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/molecules/dropdown/dropdown.component.css?tag=p-dropdown&encapsulation=shadow","src/components/molecules/dropdown/dropdown.component.tsx"],"sourcesContent":["","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 { cva } from 'class-variance-authority';\nimport { childOfComposed } from '../../../utils/child-of';\nimport { cn } from '../../../utils';\n\nconst dropdownContainerClass = cva(['hidden'], {\n\tvariants: {\n\t\tstrategy: {\n\t\t\tabsolute: 'absolute',\n\t\t\tfixed: 'fixed',\n\t\t},\n\t\tfullWidth: {\n\t\t\tfalse: null,\n\t\t\ttrue: 'w-full',\n\t\t},\n\t\tmaxWidth: {\n\t\t\tfalse: null,\n\t\t\ttrue: 'max-w-[13.875rem]',\n\t\t},\n\t\tisDatepicker: {\n\t\t\tfalse: 'z-dropdown',\n\t\t\ttrue: 'z-datepicker',\n\t\t},\n\t},\n\tcompoundVariants: [\n\t\t{\n\t\t\tfullWidth: false,\n\t\t\tmaxWidth: true,\n\t\t\tclass: 'w-auto',\n\t\t},\n\t],\n});\n\n@Component({\n\ttag: 'p-dropdown',\n\tstyleUrl: 'dropdown.component.css',\n\tshadow: true,\n})\nexport class Dropdown {\n\t/**\n\t * The variant of the dropdown\n\t */\n\t@Prop() variant: 'default' | 'storm' = 'default';\n\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 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 open the dropdown manually\n\t */\n\t@Prop() manual: 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 class of the dropdown container\n\t */\n\t@Prop() containerClass: string;\n\n\t/**\n\t * Wether the dropdown container is a datepicker dropdown\n\t */\n\t@Prop() isDatepicker: boolean = false;\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 _menu: HTMLElement;\n\tprivate _cleanup: () => void;\n\n\tcomponentShouldUpdate() {\n\t\tthis._update();\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis._checkButtons();\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\tthis._checkItems();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='relative'>\n\t\t\t\t<div\n\t\t\t\t\tclass='trigger'\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<div class='relative w-full'>\n\t\t\t\t\t<p-dropdown-menu-container\n\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\tmaxWidth={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\tclass={cn(\n\t\t\t\t\t\t\tdropdownContainerClass({\n\t\t\t\t\t\t\t\tstrategy: this.strategy,\n\t\t\t\t\t\t\t\tmaxWidth: this.applyMaxWidth,\n\t\t\t\t\t\t\t\tfullWidth: this.applyFullWidth && !this.applyMaxWidth,\n\t\t\t\t\t\t\t\tisDatepicker: this.isDatepicker,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tthis.containerClass\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tref={el => this._load(el)}\n\t\t\t\t\t\tonClick={() => this._containerClickHandler()}\n\t\t\t\t\t\trole='popover'\n\t\t\t\t\t\tdata-placement={this.placement}\n\t\t\t\t\t\tdata-strategy={this.strategy}\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</div>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _checkButtons(active: boolean = false) {\n\t\tif (!this.applyChevron) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst buttons = this._el.querySelectorAll<HTMLPButtonElement>(\n\t\t\t'p-button[slot=\"trigger\"]'\n\t\t);\n\n\t\tconst isOpen = this._menu.getAttribute('data-show') !== null;\n\n\t\tfor (let button of [...buttons]) {\n\t\t\tbutton.disabled = this.disableTriggerClick;\n\t\t\tbutton.active = active;\n\n\t\t\tif (button.iconOnly) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tbutton.chevronPosition = this.chevronPosition;\n\t\t\tbutton.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? isOpen\n\t\t\t\t\t? 'down'\n\t\t\t\t\t: 'up'\n\t\t\t\t: isOpen\n\t\t\t\t? 'up'\n\t\t\t\t: 'down';\n\t\t}\n\t}\n\n\tprivate _checkItems() {\n\t\tconst items = this._el.querySelectorAll<HTMLPDropdownMenuItemElement>(\n\t\t\t'p-dropdown-menu-item'\n\t\t);\n\n\t\tfor (let item of [...items]) {\n\t\t\titem.variant = this.variant;\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(event) {\n\t\tif (\n\t\t\t!this._menu.hasAttribute('data-show') ||\n\t\t\tchildOfComposed(event, this._menu)\n\t\t) {\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.manual) {\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\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\t\tthis._checkButtons(true);\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\tthis._checkButtons(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}
|
|
@@ -3,7 +3,7 @@ import { a as autoUpdate, c as computePosition, o as offset, f as flip, s as shi
|
|
|
3
3
|
import { c as cva } from './p-CBWjHURv.js';
|
|
4
4
|
import { T as ThemedHost } from './p-7QA93RrV.js';
|
|
5
5
|
|
|
6
|
-
const tooltipComponentCss = ".relative{position:relative!important}.h-inherit{height:inherit!important}.w-inherit{width:inherit!important}*{box-sizing:border-box}:host{height:inherit;max-width:100%;position:relative;width:inherit}:host([data-filled]){cursor:pointer}:host(:not([data-filled])){cursor:auto}.pointer-events-none{pointer-events:none!important}.pointer-events-auto{pointer-events:auto!important}.visible{visibility:visible!important}.static{position:static!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.z-tooltip{z-index:
|
|
6
|
+
const tooltipComponentCss = ".relative{position:relative!important}.h-inherit{height:inherit!important}.w-inherit{width:inherit!important}*{box-sizing:border-box}:host{height:inherit;max-width:100%;position:relative;width:inherit}:host([data-filled]){cursor:pointer}:host(:not([data-filled])){cursor:auto}.pointer-events-none{pointer-events:none!important}.pointer-events-auto{pointer-events:auto!important}.visible{visibility:visible!important}.static{position:static!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.z-tooltip{z-index:400!important}.inline-block{display:inline-block!important}.flex{display:flex!important}.w-\\[2px\\]{width:2px!important}.w-full{width:100%!important}.w-max{width:max-content!important}.max-w-\\[14\\.5rem\\]{max-width:14.5rem!important}.max-w-\\[18rem\\]{max-width:18rem!important}.max-w-full{max-width:100%!important}.gap-2{gap:.5rem!important}.whitespace-normal{white-space:normal!important}.rounded-lg{border-radius:.5rem!important}.bg-negative-red-500{--tw-bg-opacity:1!important;background-color:rgb(230 30 30/var(--tw-bg-opacity,1))!important}.bg-storm-500{background-color:rgb(24 30 41/var(--tw-bg-opacity,1))!important}.bg-storm-500,.bg-white{--tw-bg-opacity:1!important}.bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.py-1{padding-bottom:.25rem!important;padding-top:.25rem!important}.py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.text-storm-300{color:rgb(116 120 127/var(--tw-text-opacity,1))!important}.text-storm-300,.text-white{--tw-text-opacity:1!important}.text-white{color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.opacity-0{opacity:0!important}.opacity-100{opacity:1!important}.blur{--tw-blur:blur(8px)!important}.blur,.drop-shadow-3{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}.drop-shadow-3{--tw-drop-shadow:drop-shadow(0 1px 1px rgba(0,2,2,.08)) drop-shadow(0 2px 2px rgba(0,2,2,.08)) drop-shadow(0 4px 4px rgba(0,2,2,.08))!important}.transition-opacity{transition-duration:.15s!important;transition-property:opacity!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.dark\\:bg-hurricane-800:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1!important;background-color:rgb(24 30 41/var(--tw-bg-opacity,1))!important}.dark\\:bg-negative-red-alternative:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1!important;background-color:rgb(255 92 92/var(--tw-bg-opacity,1))!important}.dark\\:bg-white:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.dark\\:text-hurricane-200:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}.dark\\:text-storm-300:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(116 120 127/var(--tw-text-opacity,1))!important}.dark\\:bg-hurricane-800:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1!important;background-color:rgb(24 30 41/var(--tw-bg-opacity,1))!important}.dark\\:bg-negative-red-alternative:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1!important;background-color:rgb(255 92 92/var(--tw-bg-opacity,1))!important}.dark\\:bg-white:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.dark\\:text-hurricane-200:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}.dark\\:text-storm-300:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(116 120 127/var(--tw-text-opacity,1))!important}";
|
|
7
7
|
|
|
8
8
|
const popover = cva([
|
|
9
9
|
'inline-block px-2',
|
|
@@ -246,6 +246,6 @@ function defineCustomElement() {
|
|
|
246
246
|
defineCustomElement();
|
|
247
247
|
|
|
248
248
|
export { Tooltip as T, defineCustomElement as d };
|
|
249
|
-
//# sourceMappingURL=p-
|
|
249
|
+
//# sourceMappingURL=p-DRR3gR1w.js.map
|
|
250
250
|
|
|
251
|
-
//# sourceMappingURL=p-
|
|
251
|
+
//# sourceMappingURL=p-DRR3gR1w.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-BgJXDL3C.js","mappings":";;;;;AAAA,MAAM,mBAAmB,GAAG,o+HAAo+H;;ACsBhgI,MAAM,OAAO,GAAG,GAAG,CAClB;IACC,mBAAmB;IACnB,SAAS;IACT,4CAA4C;IAC5C,YAAY;IAEZ,WAAW;IACX,qBAAqB;CACrB,EACD;AACC,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;AACR,YAAA,KAAK,EACJ,gFAAgF;AACjF,YAAA,KAAK,EAAE,eAAe;AACtB,YAAA,KAAK,EAAE,mBAAmB;AAC1B,SAAA;AACD,QAAA,QAAQ,EAAE;AACT,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,QAAQ,EAAE,UAAU;AACpB,SAAA;AACD,KAAA;AACD,IAAA,gBAAgB,EAAE;AACjB,QAAA;AACC,YAAA,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;AAC3B,YAAA,KAAK,EAA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CAAC,QAAQ;AAEvB,YAAA,UAAU,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC;AAClD,SAAA,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,KAAI;YAC/B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,GAAG,SAAS;YAC3C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;gBAClC,GAAG,EAAE,CAAG,EAAA,CAAC,CAAI,EAAA,CAAA;gBACb,IAAI,EAAE,CAAG,EAAA,CAAC,CAAI,EAAA,CAAA;AACd,aAAA,CAAC;AACH,SAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/atoms/tooltip/tooltip.component.css?tag=p-tooltip&encapsulation=shadow","src/components/atoms/tooltip/tooltip.component.tsx"],"sourcesContent":[":host {\n\t@apply relative h-inherit w-inherit max-w-full;\n}\n\n:host([data-filled]) {\n\t@apply cursor-pointer;\n}\n\n:host(:not([data-filled])) {\n\t@apply cursor-auto;\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\tListen,\n\tProp,\n\tWatch,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { ThemedHost } from '../../../internal/themed-host.component';\n\nconst popover = cva(\n\t[\n\t\t'inline-block px-2',\n\t\t'text-xs',\n\t\t'opacity-0 drop-shadow-3 transition-opacity',\n\t\t'rounded-lg',\n\n\t\t'z-tooltip',\n\t\t'pointer-events-none',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\thover:\n\t\t\t\t\t'bg-storm-500 dark:bg-white text-white dark:text-storm-300 py-1 max-w-[14.5rem]',\n\t\t\t\tclick: 'max-w-[18rem]',\n\t\t\t\terror: 'max-w-full w-full',\n\t\t\t},\n\t\t\tstrategy: {\n\t\t\t\tfixed: 'fixed',\n\t\t\t\tabsolute: 'absolute',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{\n\t\t\t\tvariant: ['hover', 'click'],\n\t\t\t\tclass: 'w-max',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['click', 'error'],\n\t\t\t\tclass:\n\t\t\t\t\t'bg-white dark:bg-hurricane-800 text-storm-300 dark:text-hurricane-200 py-2',\n\t\t\t},\n\t\t],\n\t}\n);\n\n@Component({\n\ttag: 'p-tooltip',\n\tstyleUrl: 'tooltip.component.css',\n\tshadow: true,\n})\nexport class Tooltip {\n\t/**\n\t * The variant of the popover\n\t */\n\t@Prop() variant: 'hover' | 'click' | 'error' = 'hover';\n\n\t/**\n\t * The content of the popover\n\t */\n\t@Prop() content: string;\n\n\t/**\n\t * The placement of the popover\n\t */\n\t@Prop() placement: Placement;\n\n\t/**\n\t * The offset of the popover\n\t */\n\t@Prop() offset: number = 8;\n\n\t/**\n\t * The strategy of the popover placement\n\t */\n\t@Prop() strategy: Strategy = 'absolute';\n\n\t/**\n\t * Wether the tooltip can be shown by user input\n\t */\n\t@Prop() enableUserInput: boolean = true;\n\n\t/**\n\t * Wether to show the popover\n\t */\n\t@Prop() show: boolean = false;\n\n\t/**\n\t * Wether to someone can manually close the popover\n\t */\n\t@Prop() canManuallyClose: boolean = true;\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\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _hasContentSlot = false;\n\n\tprivate _loaded = false;\n\tprivate _popover: HTMLElement;\n\tprivate _cleanup: () => void;\n\n\tcomponentWillLoad() {\n\t\tthis._hasContentSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"content\"]'\n\t\t);\n\t}\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\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<ThemedHost\n\t\t\t\tdata-filled={this.content?.length > 0 || this._hasContentSlot}\n\t\t\t>\n\t\t\t\t<slot name='trigger' />\n\t\t\t\t<div\n\t\t\t\t\tclass={popover({\n\t\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\t\tstrategy: this.strategy,\n\t\t\t\t\t})}\n\t\t\t\t\trole='popover'\n\t\t\t\t\tdata-placement={this.placement}\n\t\t\t\t\tref={el => this._load(el)}\n\t\t\t\t>\n\t\t\t\t\t<div class='flex gap-2 whitespace-normal'>\n\t\t\t\t\t\t{this.variant === 'error' && (\n\t\t\t\t\t\t\t<div class='w-[2px] bg-negative-red-500 dark:bg-negative-red-alternative'></div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.content ? this.content : <slot name='content' />}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\t@Listen('click', { capture: true })\n\tprotected clickHandler() {\n\t\tif (this.variant === 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._popover) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._popover.hasAttribute('data-show')) {\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() {\n\t\tif (this.variant === 'hover' || !this.canManuallyClose || this.show) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._popover) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._popover.hasAttribute('data-show')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\t@Listen('mouseenter')\n\t@Listen('focus')\n\tprotected mouseEnterHandler() {\n\t\tif (this.variant !== 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\t@Listen('mouseleave')\n\t@Listen('blur')\n\tprotected mouseLeaveHandler() {\n\t\tif (this.show || this.variant !== 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\t@Watch('show')\n\tonShowChange(show: boolean) {\n\t\tif (!this._popover) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (show && !this._popover.hasAttribute('data-show')) {\n\t\t\treturn this._show();\n\t\t}\n\n\t\treturn this._hide();\n\t}\n\n\t@Watch('content')\n\tonContentChange(content: string) {\n\t\tif (!content || content.length > 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\tprivate _show() {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this.content?.length && !this._hasContentSlot) {\n\t\t\tif (this._popover.hasAttribute('data-show')) {\n\t\t\t\tthis._hide();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis._cleanup = autoUpdate(this._el, this._popover, () => this._update());\n\n\t\t// Make the popover visible\n\t\tthis._popover.setAttribute('data-show', '');\n\n\t\tthis._popover.classList.remove('opacity-0', 'pointer-events-none');\n\t\tthis._popover.classList.add('opacity-100', 'pointer-events-auto');\n\n\t\t// Update its position\n\t\tthis.isOpen.emit(true);\n\t}\n\n\tprivate _hide() {\n\t\tif (!this._loaded) {\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._popover.removeAttribute('data-show');\n\n\t\tthis._popover.classList.remove('opacity-100', 'pointer-events-auto');\n\t\tthis._popover.classList.add('opacity-0', 'pointer-events-none');\n\n\t\tthis.isOpen.emit(false);\n\t}\n\n\tprivate _load(popover: HTMLElement) {\n\t\tthis._popover = popover;\n\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 _update() {\n\t\tif (!this._popover) {\n\t\t\treturn;\n\t\t}\n\n\t\tcomputePosition(this._el, this._popover, {\n\t\t\tplacement:\n\t\t\t\tthis.variant === 'error' && !this.placement\n\t\t\t\t\t? 'bottom-start'\n\t\t\t\t\t: this.placement ?? 'top',\n\t\t\tstrategy: this.strategy,\n\n\t\t\tmiddleware: [offset(this.offset), flip(), shift()],\n\t\t}).then(({ x, y, placement }) => {\n\t\t\tthis._popover.dataset.placement = placement;\n\t\t\tObject.assign(this._popover.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":"p-DRR3gR1w.js","mappings":";;;;;AAAA,MAAM,mBAAmB,GAAG,o+HAAo+H;;ACsBhgI,MAAM,OAAO,GAAG,GAAG,CAClB;IACC,mBAAmB;IACnB,SAAS;IACT,4CAA4C;IAC5C,YAAY;IAEZ,WAAW;IACX,qBAAqB;CACrB,EACD;AACC,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;AACR,YAAA,KAAK,EACJ,gFAAgF;AACjF,YAAA,KAAK,EAAE,eAAe;AACtB,YAAA,KAAK,EAAE,mBAAmB;AAC1B,SAAA;AACD,QAAA,QAAQ,EAAE;AACT,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,QAAQ,EAAE,UAAU;AACpB,SAAA;AACD,KAAA;AACD,IAAA,gBAAgB,EAAE;AACjB,QAAA;AACC,YAAA,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;AAC3B,YAAA,KAAK,EAAE,OAAO;AACd,SAAA;AACD,QAAA;AACC,YAA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CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC;AAClD,SAAA,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,KAAI;YAC/B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,GAAG,SAAS;YAC3C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;gBAClC,GAAG,EAAE,CAAG,EAAA,CAAC,CAAI,EAAA,CAAA;gBACb,IAAI,EAAE,CAAG,EAAA,CAAC,CAAI,EAAA,CAAA;AACd,aAAA,CAAC;AACH,SAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/atoms/tooltip/tooltip.component.css?tag=p-tooltip&encapsulation=shadow","src/components/atoms/tooltip/tooltip.component.tsx"],"sourcesContent":[":host {\n\t@apply relative h-inherit w-inherit max-w-full;\n}\n\n:host([data-filled]) {\n\t@apply cursor-pointer;\n}\n\n:host(:not([data-filled])) {\n\t@apply cursor-auto;\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\tListen,\n\tProp,\n\tWatch,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { ThemedHost } from '../../../internal/themed-host.component';\n\nconst popover = cva(\n\t[\n\t\t'inline-block px-2',\n\t\t'text-xs',\n\t\t'opacity-0 drop-shadow-3 transition-opacity',\n\t\t'rounded-lg',\n\n\t\t'z-tooltip',\n\t\t'pointer-events-none',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\thover:\n\t\t\t\t\t'bg-storm-500 dark:bg-white text-white dark:text-storm-300 py-1 max-w-[14.5rem]',\n\t\t\t\tclick: 'max-w-[18rem]',\n\t\t\t\terror: 'max-w-full w-full',\n\t\t\t},\n\t\t\tstrategy: {\n\t\t\t\tfixed: 'fixed',\n\t\t\t\tabsolute: 'absolute',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{\n\t\t\t\tvariant: ['hover', 'click'],\n\t\t\t\tclass: 'w-max',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['click', 'error'],\n\t\t\t\tclass:\n\t\t\t\t\t'bg-white dark:bg-hurricane-800 text-storm-300 dark:text-hurricane-200 py-2',\n\t\t\t},\n\t\t],\n\t}\n);\n\n@Component({\n\ttag: 'p-tooltip',\n\tstyleUrl: 'tooltip.component.css',\n\tshadow: true,\n})\nexport class Tooltip {\n\t/**\n\t * The variant of the popover\n\t */\n\t@Prop() variant: 'hover' | 'click' | 'error' = 'hover';\n\n\t/**\n\t * The content of the popover\n\t */\n\t@Prop() content: string;\n\n\t/**\n\t * The placement of the popover\n\t */\n\t@Prop() placement: Placement;\n\n\t/**\n\t * The offset of the popover\n\t */\n\t@Prop() offset: number = 8;\n\n\t/**\n\t * The strategy of the popover placement\n\t */\n\t@Prop() strategy: Strategy = 'absolute';\n\n\t/**\n\t * Wether the tooltip can be shown by user input\n\t */\n\t@Prop() enableUserInput: boolean = true;\n\n\t/**\n\t * Wether to show the popover\n\t */\n\t@Prop() show: boolean = false;\n\n\t/**\n\t * Wether to someone can manually close the popover\n\t */\n\t@Prop() canManuallyClose: boolean = true;\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\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _hasContentSlot = false;\n\n\tprivate _loaded = false;\n\tprivate _popover: HTMLElement;\n\tprivate _cleanup: () => void;\n\n\tcomponentWillLoad() {\n\t\tthis._hasContentSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"content\"]'\n\t\t);\n\t}\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\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<ThemedHost\n\t\t\t\tdata-filled={this.content?.length > 0 || this._hasContentSlot}\n\t\t\t>\n\t\t\t\t<slot name='trigger' />\n\t\t\t\t<div\n\t\t\t\t\tclass={popover({\n\t\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\t\tstrategy: this.strategy,\n\t\t\t\t\t})}\n\t\t\t\t\trole='popover'\n\t\t\t\t\tdata-placement={this.placement}\n\t\t\t\t\tref={el => this._load(el)}\n\t\t\t\t>\n\t\t\t\t\t<div class='flex gap-2 whitespace-normal'>\n\t\t\t\t\t\t{this.variant === 'error' && (\n\t\t\t\t\t\t\t<div class='w-[2px] bg-negative-red-500 dark:bg-negative-red-alternative'></div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.content ? this.content : <slot name='content' />}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\t@Listen('click', { capture: true })\n\tprotected clickHandler() {\n\t\tif (this.variant === 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._popover) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._popover.hasAttribute('data-show')) {\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() {\n\t\tif (this.variant === 'hover' || !this.canManuallyClose || this.show) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._popover) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._popover.hasAttribute('data-show')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\t@Listen('mouseenter')\n\t@Listen('focus')\n\tprotected mouseEnterHandler() {\n\t\tif (this.variant !== 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\t@Listen('mouseleave')\n\t@Listen('blur')\n\tprotected mouseLeaveHandler() {\n\t\tif (this.show || this.variant !== 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\t@Watch('show')\n\tonShowChange(show: boolean) {\n\t\tif (!this._popover) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (show && !this._popover.hasAttribute('data-show')) {\n\t\t\treturn this._show();\n\t\t}\n\n\t\treturn this._hide();\n\t}\n\n\t@Watch('content')\n\tonContentChange(content: string) {\n\t\tif (!content || content.length > 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\tprivate _show() {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this.content?.length && !this._hasContentSlot) {\n\t\t\tif (this._popover.hasAttribute('data-show')) {\n\t\t\t\tthis._hide();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis._cleanup = autoUpdate(this._el, this._popover, () => this._update());\n\n\t\t// Make the popover visible\n\t\tthis._popover.setAttribute('data-show', '');\n\n\t\tthis._popover.classList.remove('opacity-0', 'pointer-events-none');\n\t\tthis._popover.classList.add('opacity-100', 'pointer-events-auto');\n\n\t\t// Update its position\n\t\tthis.isOpen.emit(true);\n\t}\n\n\tprivate _hide() {\n\t\tif (!this._loaded) {\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._popover.removeAttribute('data-show');\n\n\t\tthis._popover.classList.remove('opacity-100', 'pointer-events-auto');\n\t\tthis._popover.classList.add('opacity-0', 'pointer-events-none');\n\n\t\tthis.isOpen.emit(false);\n\t}\n\n\tprivate _load(popover: HTMLElement) {\n\t\tthis._popover = popover;\n\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 _update() {\n\t\tif (!this._popover) {\n\t\t\treturn;\n\t\t}\n\n\t\tcomputePosition(this._el, this._popover, {\n\t\t\tplacement:\n\t\t\t\tthis.variant === 'error' && !this.placement\n\t\t\t\t\t? 'bottom-start'\n\t\t\t\t\t: this.placement ?? 'top',\n\t\t\tstrategy: this.strategy,\n\n\t\t\tmiddleware: [offset(this.offset), flip(), shift()],\n\t\t}).then(({ x, y, placement }) => {\n\t\t\tthis._popover.dataset.placement = placement;\n\t\t\tObject.assign(this._popover.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}
|
|
@@ -5,11 +5,11 @@ import { c as cn } from './p-CT54OXR2.js';
|
|
|
5
5
|
import { n as nonce } from './p-D9kEjsvZ.js';
|
|
6
6
|
import { T as ThemedHost } from './p-7QA93RrV.js';
|
|
7
7
|
import { d as defineCustomElement$6 } from './p-CbigFpjI.js';
|
|
8
|
-
import { d as defineCustomElement$5 } from './p-
|
|
9
|
-
import { d as defineCustomElement$4 } from './p-
|
|
8
|
+
import { d as defineCustomElement$5 } from './p-CUPpa-ib.js';
|
|
9
|
+
import { d as defineCustomElement$4 } from './p-CeM-_6CM.js';
|
|
10
10
|
import { d as defineCustomElement$3 } from './p-BHphGfv6.js';
|
|
11
11
|
import { d as defineCustomElement$2 } from './p-BFbLqg3-.js';
|
|
12
|
-
import { d as defineCustomElement$1 } from './p-
|
|
12
|
+
import { d as defineCustomElement$1 } from './p-DRR3gR1w.js';
|
|
13
13
|
|
|
14
14
|
const fieldComponentCss = "*{box-sizing:border-box}:host{input[type=number]{-moz-appearance:textfield}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;display:none}}.static{position:static!important}.relative{position:relative!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.flex{display:flex!important}.h-6{height:1.5rem!important}.h-8{height:2rem!important}.h-full{height:100%!important}.min-h-4{min-height:1rem!important}.min-h-5{min-height:1.25rem!important}.w-inherit{width:inherit!important}.min-w-0{min-width:0!important}.flex-1{flex:1 1 0%!important}.flex-shrink-0{flex-shrink:0!important}.cursor-not-allowed{cursor:not-allowed!important}.flex-wrap{flex-wrap:wrap!important}.items-start{align-items:flex-start!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.gap-2{gap:.5rem!important}.hyphens-auto{hyphens:auto!important}.break-normal{overflow-wrap:normal!important;word-break:normal!important}.rounded-lg{border-radius:.5rem!important}.border{border-width:1px!important}.border-0{border-width:0!important}.border-solid{border-style:solid!important}.border-none{border-style:none!important}.border-indigo-600{--tw-border-opacity:1!important;border-color:rgb(82 138 250/var(--tw-border-opacity,1))!important}.border-negative-red-500{--tw-border-opacity:1!important;border-color:rgb(230 30 30/var(--tw-border-opacity,1))!important}.border-storm-100{--tw-border-opacity:1!important;border-color:rgb(209 210 212/var(--tw-border-opacity,1))!important}.bg-transparent{background-color:transparent!important}.bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.bg-white,.bg-white-600{--tw-bg-opacity:1!important}.bg-white-600{background-color:rgb(250 250 250/var(--tw-bg-opacity,1))!important}.p-0{padding:0!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.text-center{text-align:center!important}.font-geist{font-family:Geist,serif!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.leading-6{line-height:1.5rem!important}.text-negative-red-500{--tw-text-opacity:1!important;color:rgb(230 30 30/var(--tw-text-opacity,1))!important}.text-negative-red-800{--tw-text-opacity:1!important;color:rgb(141 16 16/var(--tw-text-opacity,1))!important}.text-storm-100{--tw-text-opacity:1!important;color:rgb(209 210 212/var(--tw-text-opacity,1))!important}.text-storm-300{--tw-text-opacity:1!important;color:rgb(116 120 127/var(--tw-text-opacity,1))!important}.text-storm-500{--tw-text-opacity:1!important;color:rgb(24 30 41/var(--tw-text-opacity,1))!important}.outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.ring-indigo-100{--tw-ring-opacity:1!important;--tw-ring-color:rgb(227 236 254/var(--tw-ring-opacity,1))!important}.ring-negative-red-50{--tw-ring-opacity:1!important;--tw-ring-color:rgb(253 237 237/var(--tw-ring-opacity,1))!important}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:85.375rem){.container{max-width:85.375rem}}@media (min-width:90rem){.container{max-width:90rem}}@media (min-width:96rem){.container{max-width:96rem}}@media (min-width:105rem){.container{max-width:105rem}}@media (min-width:120rem){.container{max-width:120rem}}@media (min-width:160rem){.container{max-width:160rem}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.selection\\:bg-indigo-500 ::selection{--tw-bg-opacity:1!important;background-color:rgb(142 179 251/var(--tw-bg-opacity,1))!important}.selection\\:bg-negative-red-50 ::selection{--tw-bg-opacity:1!important;background-color:rgb(253 237 237/var(--tw-bg-opacity,1))!important}.selection\\:bg-indigo-500::selection{--tw-bg-opacity:1!important;background-color:rgb(142 179 251/var(--tw-bg-opacity,1))!important}.selection\\:bg-negative-red-50::selection{--tw-bg-opacity:1!important;background-color:rgb(253 237 237/var(--tw-bg-opacity,1))!important}.placeholder\\:text-sm::placeholder{font-size:.875rem!important;line-height:1.25rem!important}.placeholder\\:text-storm-500\\/40::placeholder{color:rgba(24,30,41,.4)!important}.focus\\:outline-none:focus{outline:2px solid transparent!important;outline-offset:2px!important}.dark\\:border-hurricane-400:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-border-opacity:1!important;border-color:rgb(70 75 84/var(--tw-border-opacity,1))!important}.dark\\:border-hurricane-500:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-border-opacity:1!important;border-color:rgb(54 60 70/var(--tw-border-opacity,1))!important}.dark\\:bg-hurricane-500:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1!important;background-color:rgb(54 60 70/var(--tw-bg-opacity,1))!important}.dark\\:bg-hurricane-600:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1!important;background-color:rgb(46 52 62/var(--tw-bg-opacity,1))!important}.dark\\:text-hurricane-200:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}.dark\\:text-hurricane-400:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(70 75 84/var(--tw-text-opacity,1))!important}.dark\\:text-white:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.dark\\:ring-0:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.dark\\:placeholder\\:text-hurricane-200:where(:host([data-theme=dark]),:host([data-theme=dark]) *)::placeholder{--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}.dark\\:border-hurricane-400:where([data-theme=dark],[data-theme=dark] *){--tw-border-opacity:1!important;border-color:rgb(70 75 84/var(--tw-border-opacity,1))!important}.dark\\:border-hurricane-500:where([data-theme=dark],[data-theme=dark] *){--tw-border-opacity:1!important;border-color:rgb(54 60 70/var(--tw-border-opacity,1))!important}.dark\\:bg-hurricane-500:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1!important;background-color:rgb(54 60 70/var(--tw-bg-opacity,1))!important}.dark\\:bg-hurricane-600:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1!important;background-color:rgb(46 52 62/var(--tw-bg-opacity,1))!important}.dark\\:text-hurricane-200:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}.dark\\:text-hurricane-400:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(70 75 84/var(--tw-text-opacity,1))!important}.dark\\:text-white:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.dark\\:ring-0:where([data-theme=dark],[data-theme=dark] *){--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.dark\\:placeholder\\:text-hurricane-200:where([data-theme=dark],[data-theme=dark] *)::placeholder{--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}";
|
|
15
15
|
|
|
@@ -588,6 +588,6 @@ function defineCustomElement() {
|
|
|
588
588
|
defineCustomElement();
|
|
589
589
|
|
|
590
590
|
export { Field as F, defineCustomElement as d };
|
|
591
|
-
//# sourceMappingURL=p-
|
|
591
|
+
//# sourceMappingURL=p-Hk6_uWf_.js.map
|
|
592
592
|
|
|
593
|
-
//# sourceMappingURL=p-
|
|
593
|
+
//# sourceMappingURL=p-Hk6_uWf_.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-DWSMDsi3.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,syQAAsyQ;;AC0Bh0Q,MAAM,KAAK,GAAG,GAAG,CAChB,CAAC,YAAY,EAAE,WAAW,EAAE,yBAAyB,EAAE,UAAU,CAAC,EAClE;AACC,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;AACR,YAAA,IAAI,EAAE,oEAAoE;AAC1E,YAAA,KAAK,EAAE,aAAa;AACpB,SAAA;AACD,QAAA,IAAI,EAAE;AACL,YAAA,EAAE,EAAE,IAAI;AACR,YAAA,IAAI,EAAE,IAAI;AACV,SAAA;AACD,QAAA,QAAQ,EAAE;AACT,YAAA,KAAK,EAAE,IAAI;AACX,YAAA,IAAI,EAAE,IAAI;AACV,SAAA;AACD,QAAA,OAAO,EAAE;AACR,YAAA,KAAK,EAAE,IAAI;AACX,YAAA,IAAI,EAAE,IAAI;AACV,SAAA;AACD,QAAA,KAAK,EAAE;AACN,YAAA,KAAK,EAAE,IAAI;AACX,YAAA,IAAI,EAAE,IAAI;AACV,SAAA;AACD,QAAA,UAAU,EAAE;AACX,YAAA,KAAK,EAAE,IAAI;AACX,YAAA,IAAI,EAAE,aAAa;AACnB,SAAA;AACD,KAAA;AACD,IAAA,gBAAgB,EAAE;AACjB,QAAA;AACC,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,OAAO,EAAE,OAAO;AAChB,YAAA,UAAU,EAAE,KAAK;AACjB,YAAA,KAAK,EAAE,KAAK;AACZ,SAAA;AACD,QAAA;AACC,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE,OAAO;AAChB,YAAA,UAAU,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/molecules/field/field/field.component.css?tag=p-field&encapsulation=shadow","src/components/molecules/field/field/field.component.tsx"],"sourcesContent":[":host {\n\tinput[type='number'] {\n\t\t-moz-appearance: textfield; /* Firefox */\n\t}\n\n\tinput::-webkit-outer-spin-button,\n\tinput::-webkit-inner-spin-button {\n\t\tdisplay: none;\n\t\t-webkit-appearance: none;\n\t}\n}\n","import { Placement } from '@floating-ui/dom';\nimport {\n\tAttachInternals,\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tListen,\n\tProp,\n\tState,\n\tWatch,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { HTMLInputTypeAttribute } from 'react';\nimport { RotateOptions } from '../../../../types/tailwind';\nimport { asBoolean } from '../../../../utils/as-boolean';\nimport { cn } from '../../../../utils/cn';\nimport { nonce } from '../../../../utils/nonce';\nimport {\n\tIconFlipOptions,\n\tIconVariant,\n} from '../../../atoms/icon/icon.component';\nimport { templateFunc } from '../container/field-container.component';\nimport { ThemedHost } from '../../../../internal/themed-host.component';\n\nconst field = cva(\n\t['flex gap-2', 'w-inherit', 'border-solid rounded-lg', 'relative'],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tread: 'border-0 items-start flex-wrap hyphens-auto break-normal leading-6',\n\t\t\t\twrite: 'border px-2',\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tsm: null,\n\t\t\t\tbase: null,\n\t\t\t},\n\t\t\tdisabled: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\tfocused: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\terror: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\tisTextarea: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: 'items-start',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{\n\t\t\t\tsize: 'sm',\n\t\t\t\tvariant: 'write',\n\t\t\t\tisTextarea: false,\n\t\t\t\tclass: 'h-6',\n\t\t\t},\n\t\t\t{\n\t\t\t\tsize: 'base',\n\t\t\t\tvariant: 'write',\n\t\t\t\tisTextarea: false,\n\t\t\t\tclass: 'h-8',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tsize: 'sm',\n\t\t\t\tvariant: 'read',\n\t\t\t\tclass: 'min-h-4 text-xs',\n\t\t\t},\n\t\t\t{\n\t\t\t\tsize: 'base',\n\t\t\t\tvariant: 'read',\n\t\t\t\tclass: 'min-h-5 text-sm',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tvariant: 'write',\n\t\t\t\tfocused: false,\n\t\t\t\terror: false,\n\t\t\t\tclass: 'border-storm-100 dark:border-hurricane-400',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'write',\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: true,\n\t\t\t\terror: false,\n\t\t\t\tclass:\n\t\t\t\t\t'border-indigo-600 ring dark:ring-0 ring-indigo-100 selection:bg-indigo-500',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tvariant: 'write',\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'bg-white dark:bg-hurricane-500',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'write',\n\t\t\t\tdisabled: true,\n\t\t\t\tclass:\n\t\t\t\t\t'bg-white-600 dark:bg-hurricane-600 dark:border-hurricane-500 cursor-not-allowed',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\terror: true,\n\t\t\t\tclass: 'border-negative-red-500',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: true,\n\t\t\t\terror: true,\n\t\t\t\tclass:\n\t\t\t\t\t'ring ring-negative-red-50 selection:bg-negative-red-50 dark:ring-0',\n\t\t\t},\n\t\t],\n\t}\n);\n\nconst input = cva(\n\t[\n\t\t'text-sm placeholder:text-sm placeholder:text-storm-500/40 dark:placeholder:text-hurricane-200',\n\t\t'border-none bg-transparent flex-1 min-w-0 p-0',\n\t\t'outline-none focus:outline-none',\n\t\t'font-geist',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tisTextarea: {\n\t\t\t\tfalse: 'h-full',\n\t\t\t\ttrue: 'mt-1',\n\t\t\t},\n\t\t\tdisabled: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: 'cursor-not-allowed',\n\t\t\t},\n\t\t\terror: {\n\t\t\t\tfalse: 'text-storm-500 dark:text-white',\n\t\t\t\ttrue: 'text-negative-red-500',\n\t\t\t},\n\t\t},\n\t}\n);\n\nconst prefixAndSuffix = cva(\n\t['flex flex-shrink-0 justify-center items-center text-center'],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tread: 'leading-6',\n\t\t\t\twrite: null,\n\t\t\t},\n\t\t\tdisabled: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: 'text-storm-100 dark:text-hurricane-400',\n\t\t\t},\n\t\t\tfocused: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\terror: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\tisText: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: 'text-sm',\n\t\t\t},\n\t\t\tisTextarea: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: 'mt-2',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: false,\n\t\t\t\terror: false,\n\t\t\t\tclass: 'text-storm-300 dark:text-hurricane-200',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: true,\n\t\t\t\terror: false,\n\t\t\t\tclass: 'text-storm-500 dark:text-white',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: false,\n\t\t\t\terror: true,\n\t\t\t\tclass: 'text-negative-red-500',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: true,\n\t\t\t\terror: true,\n\t\t\t\tclass: 'text-negative-red-800',\n\t\t\t},\n\t\t],\n\t}\n);\n\n@Component({\n\ttag: 'p-field',\n\tstyleUrl: './field.component.css',\n\tshadow: true,\n\tformAssociated: true,\n})\nexport class Field {\n\t/**\n\t * The alignment of the container\n\t */\n\t@Prop() align: 'start' | 'end' = 'start';\n\n\t/**\n\t * The variant of the field\n\t */\n\t@Prop() variant: 'read' | 'write' = 'write';\n\n\t/**\n\t * The id of the field\n\t */\n\t@Prop() id: string;\n\n\t/**\n\t * The size of the field\n\t */\n\t@Prop() size: 'sm' | 'base' = 'base';\n\n\t/**\n\t * The type of the field\n\t */\n\t@Prop() type: HTMLInputTypeAttribute | 'textarea' | 'slot' = 'text';\n\n\t/**\n\t * The size of the field\n\t */\n\t@Prop() properties: any | string = {};\n\n\t/**\n\t * The prefix of the field\n\t */\n\t@Prop() prefix: string;\n\n\t/**\n\t * The suffix of the field\n\t */\n\t@Prop() suffix: string;\n\n\t/**\n\t * Icon of the field\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * Icon flip */\n\t@Prop() iconFlip: IconFlipOptions;\n\n\t/**\n\t * Icon rotate\n\t */\n\t@Prop() iconRotate: RotateOptions;\n\n\t/**\n\t * Icon position\n\t */\n\t@Prop() iconPosition: 'start' | 'end' = 'start';\n\n\t/**\n\t * The value of the input\n\t */\n\t@Prop() value: string | number;\n\n\t/**\n\t * The label of the field\n\t */\n\t@Prop() label: string;\n\n\t/**\n\t * Wether the field is in loading state\n\t */\n\t@Prop() loading: boolean = false;\n\n\t/**\n\t * The placeholder of the input\n\t */\n\t@Prop() placeholder: string;\n\n\t/**\n\t * The helper of the field\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 = true;\n\n\t/**\n\t * Wether to show optional when not required\n\t */\n\t@Prop({ reflect: true }) showOptional: boolean = true;\n\n\t/**\n\t * Wether to show an add button when empty\n\t */\n\t@Prop({ reflect: true }) showAddOnEmpty: boolean = false;\n\n\t/**\n\t * The text to show on the add button\n\t */\n\t@Prop({ reflect: true }) addText: string = 'Add';\n\n\t/**\n\t * Wether to autofocus the field\n\t */\n\t@Prop({ reflect: true }) autofocus: boolean = false;\n\n\t/**\n\t * The error to display\n\t */\n\t@Prop({ reflect: true }) error: string;\n\n\t/**\n\t * Wether this component handles showing the error tooltip\n\t */\n\t@Prop({ reflect: true }) autoShowError = true;\n\n\t/**\n\t * The placement of the error popover\n\t */\n\t@Prop() errorPlacement: Placement;\n\n\t/**\n\t * Wether the field is disabled\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether the field is focused\n\t */\n\t@Prop({ reflect: true }) focused: boolean = false;\n\n\t/**\n\t * Force show the error tooltip\n\t */\n\t@Prop({ reflect: true }) forceShowTooltip: boolean = false;\n\n\t/**\n\t * Wether to select all text on focus\n\t */\n\t@Prop({ reflect: true }) selectAllOnFocus: boolean = true;\n\n\t/**\n\t * The method to use when focusing the input\n\t */\n\t@Prop() focusMethod: 'focus' | 'click' = 'focus';\n\n\t/**\n\t * The template for the optional text\n\t */\n\t@Prop() optionalTemplate: templateFunc;\n\n\t/**\n\t * Event whenever the value changes\n\t */\n\t@Event({ bubbles: false }) valueChange: EventEmitter<string | number>;\n\n\t/**\n\t * Event whenever the input ref changes\n\t */\n\t@Event() inputRefChange: EventEmitter<HTMLInputElement | HTMLTextAreaElement>;\n\n\t/**\n\t * Event whenever the value changes\n\t */\n\t@Event({ bubbles: false }) add: EventEmitter<void>;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _focused = false;\n\t@State() private _nonce = nonce(5);\n\n\t@AttachInternals() _internals: ElementInternals;\n\n\tprivate _inputRef: HTMLInputElement | HTMLTextAreaElement;\n\tprivate _lastValue: string | number | null;\n\n\tcomponentDidLoad() {\n\t\tthis._checkAutoFocus();\n\t}\n\n\tformResetCallback() {\n\t\tthis.value = null;\n\t\tthis.valueChange.emit(null);\n\t}\n\n\tformDisabledCallback(disabled: boolean) {\n\t\tif (!this._internals.form) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.disabled = disabled;\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tid,\n\t\t\tprefix,\n\t\t\tsuffix,\n\t\t\thasHeaderSlot,\n\t\t\thasLabelSlot,\n\t\t\thasHelperSlot,\n\t\t\thasErrorSlot,\n\t\t\thasValueSlot,\n\t\t} = this._getSlotInfo();\n\n\t\treturn (\n\t\t\t<ThemedHost>\n\t\t\t\t<p-field-container\n\t\t\t\t\tforceShowTooltip={\n\t\t\t\t\t\t(!!this.error?.length && !this._focused && this.autoShowError) ||\n\t\t\t\t\t\t(!!this.error?.length && this.forceShowTooltip)\n\t\t\t\t\t}\n\t\t\t\t\tid={id}\n\t\t\t\t\tlabel={this.label}\n\t\t\t\t\talign={this.align}\n\t\t\t\t\tloading={this.loading}\n\t\t\t\t\tloadingSize={this.size}\n\t\t\t\t\thelper={this.helper}\n\t\t\t\t\terror={this.error}\n\t\t\t\t\trequired={this.required}\n\t\t\t\t\tshowOptional={this.showOptional}\n\t\t\t\t\tvariant={this.variant}\n\t\t\t\t>\n\t\t\t\t\t{hasLabelSlot && (\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\tname='label'\n\t\t\t\t\t\t\tslot='label'\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{hasHeaderSlot && (\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\tname='header'\n\t\t\t\t\t\t\tslot='header'\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{hasHelperSlot && (\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\tname='helper'\n\t\t\t\t\t\t\tslot='helper'\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{hasErrorSlot && (\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\tname='error'\n\t\t\t\t\t\t\tslot='error'\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={field({\n\t\t\t\t\t\t\terror: !!this.error?.length,\n\t\t\t\t\t\t\tdisabled: asBoolean(this.disabled),\n\t\t\t\t\t\t\tfocused: asBoolean(this.focused) || this._focused,\n\t\t\t\t\t\t\tsize: this.size,\n\t\t\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\t\t\tisTextarea: this.type === 'textarea',\n\t\t\t\t\t\t})}\n\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\tthis.variant === 'read' && !hasValueSlot\n\t\t\t\t\t\t\t\t? `${this.value}`\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\tslot='content'\n\t\t\t\t\t>\n\t\t\t\t\t\t{(this.error?.length ||\n\t\t\t\t\t\t\tprefix ||\n\t\t\t\t\t\t\t(this.icon && this.iconPosition === 'start')) && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass={prefixAndSuffix({\n\t\t\t\t\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\t\t\t\t\terror: !!this.error?.length,\n\t\t\t\t\t\t\t\t\tdisabled: asBoolean(this.disabled),\n\t\t\t\t\t\t\t\t\tfocused: asBoolean(this.focused) || this._focused,\n\t\t\t\t\t\t\t\t\tisText: typeof suffix === 'string',\n\t\t\t\t\t\t\t\t\tisTextarea: this.type === 'textarea',\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\tonClick={() => this._focusInput()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{(this.icon && this.iconPosition === 'start') ||\n\t\t\t\t\t\t\t\tthis.error?.length ? (\n\t\t\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\t\t\tclass={cn('flex', {\n\t\t\t\t\t\t\t\t\t\t\t'mt-1': this.variant === 'read' && this.size === 'base',\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\tvariant={this.error?.length ? 'warning' : this.icon}\n\t\t\t\t\t\t\t\t\t\trotate={this.iconRotate}\n\t\t\t\t\t\t\t\t\t\tflip={this.iconFlip}\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\tprefix\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{this._getContent(hasValueSlot, id)}\n\n\t\t\t\t\t\t{(suffix || (this.icon && this.iconPosition === 'end')) && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass={prefixAndSuffix({\n\t\t\t\t\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\t\t\t\t\terror: !!this.error?.length,\n\t\t\t\t\t\t\t\t\tdisabled: asBoolean(this.disabled),\n\t\t\t\t\t\t\t\t\tfocused: asBoolean(this.focused) || this._focused,\n\t\t\t\t\t\t\t\t\tisText: typeof suffix === 'string',\n\t\t\t\t\t\t\t\t\tisTextarea: this.type === 'textarea',\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\tonClick={() => this._focusInput()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this.icon && this.iconPosition === 'end' ? (\n\t\t\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\t\t\tclass={cn('flex', {\n\t\t\t\t\t\t\t\t\t\t\t'mt-1': this.variant === 'read' && this.size === 'base',\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\tvariant={this.icon}\n\t\t\t\t\t\t\t\t\t\trotate={this.iconRotate}\n\t\t\t\t\t\t\t\t\t\tflip={this.iconFlip}\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\tsuffix\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</p-field-container>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\t@Watch('value')\n\twatchvalue(value: string | null) {\n\t\tif (!this._inputRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (value === this._lastValue) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._lastValue = value;\n\t\tthis._inputRef.value = value;\n\t}\n\n\t@Listen('focusin')\n\thandleFocusIn() {\n\t\tif (this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._focused = true;\n\t\tthis._selectAll();\n\t}\n\n\t@Listen('focusout')\n\thandleFocusOut() {\n\t\tif (this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._focused = false;\n\t}\n\n\t@Listen('keyup', { capture: true })\n\thandleKeyup(ev: KeyboardEvent) {\n\t\tif (this.disabled) {\n\t\t\tev.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._internals?.form) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.type === 'textarea' || ev.key !== 'Enter') {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._internals.form.requestSubmit();\n\t}\n\n\tprivate _getSlotInfo() {\n\t\tconst hasHelperSlot = !!this._el.querySelector(':scope > [slot=\"helper\"]');\n\t\tconst hasLabelSlot = !!this._el.querySelector(':scope > [slot=\"label\"]');\n\t\tconst hasPrefixSlot = !!this._el.querySelector(':scope > [slot=\"prefix\"]');\n\t\tconst hasSuffixSlot = !!this._el.querySelector(':scope > [slot=\"suffix\"]');\n\t\tconst hasHeaderSlot = !!this._el.querySelector(':scope > [slot=\"header\"]');\n\t\tconst hasErrorSlot = !!this._el.querySelector(':scope > [slot=\"error\"]');\n\t\tconst hasValueSlot = !!this._el.querySelector(':scope > [slot=\"value\"]');\n\n\t\tconst prefix = hasPrefixSlot ? <slot name='prefix' /> : this.prefix;\n\t\tconst suffix = hasSuffixSlot ? <slot name='suffix' /> : this.suffix;\n\n\t\tconst errorAndErrorIsNotBoolean =\n\t\t\tthis.error && typeof this.error === 'string' && this.error !== 'true';\n\n\t\tconst id = this.id?.length ? this.id : this._nonce;\n\n\t\treturn {\n\t\t\tid,\n\t\t\thasHelperSlot,\n\t\t\thasLabelSlot,\n\t\t\thasPrefixSlot,\n\t\t\thasSuffixSlot,\n\t\t\thasHeaderSlot,\n\t\t\thasErrorSlot,\n\t\t\thasValueSlot,\n\t\t\tprefix,\n\t\t\tsuffix,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t};\n\t}\n\n\tprivate _getContent(hasValueSlot = false, id: string) {\n\t\tif (this.variant === 'read') {\n\t\t\treturn hasValueSlot ? (\n\t\t\t\t<slot name='value' />\n\t\t\t) : !!this.value && `${this.value}`.length > 0 ? (\n\t\t\t\tthis.value\n\t\t\t) : this.showAddOnEmpty ? (\n\t\t\t\t<p-button\n\t\t\t\t\tvariant='text'\n\t\t\t\t\ticon='plus'\n\t\t\t\t\tsize='sm'\n\t\t\t\t\tonClick={() => this.add.emit()}\n\t\t\t\t>\n\t\t\t\t\t{this.addText}\n\t\t\t\t</p-button>\n\t\t\t) : (\n\t\t\t\t'—'\n\t\t\t);\n\t\t}\n\n\t\tif (this.type === 'slot') {\n\t\t\treturn <slot name='input' />;\n\t\t}\n\n\t\tconst props = {\n\t\t\tid,\n\t\t\tclass: input({\n\t\t\t\tdisabled: asBoolean(this.disabled),\n\t\t\t\tisTextarea: this.type === 'textarea',\n\t\t\t\terror: !!this.error?.length,\n\t\t\t}),\n\t\t\tvalue: this.value,\n\t\t\tplaceholder: this.placeholder,\n\t\t\tdisabled: this.disabled,\n\t\t\tonInput: (ev: InputEvent) => this._valueChange(ev),\n\t\t};\n\n\t\tlet properties = this.properties ?? {};\n\t\tif (typeof properties === 'string') {\n\t\t\tproperties = JSON.parse(this.properties);\n\t\t}\n\n\t\tif (this.type === 'textarea') {\n\t\t\treturn (\n\t\t\t\t<textarea\n\t\t\t\t\tref={ref => this._setInputRef(ref)}\n\t\t\t\t\t{...props}\n\t\t\t\t\t{...properties}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<input\n\t\t\t\ttype={this.type}\n\t\t\t\tref={ref => this._setInputRef(ref)}\n\t\t\t\t{...props}\n\t\t\t\t{...properties}\n\t\t\t/>\n\t\t);\n\t}\n\n\tprivate _setInputRef(ref: HTMLInputElement | HTMLTextAreaElement) {\n\t\tthis._inputRef = ref;\n\t\tthis.inputRefChange.emit(ref);\n\t}\n\n\tprivate _focusInput() {\n\t\tif (this._inputRef) {\n\t\t\tthis._inputRef.focus();\n\t\t\treturn;\n\t\t}\n\n\t\tconst input = this._el.querySelector(':scope > [slot=\"input\"]');\n\t\t(input as HTMLElement)[this.focusMethod]();\n\t}\n\n\tprivate _selectAll() {\n\t\tif (!this._inputRef || !this.selectAllOnFocus) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._inputRef.select();\n\t}\n\n\tprivate _valueChange(ev) {\n\t\tev.stopPropagation();\n\t\tconst target = (ev.originalTarget ?? ev.target) as\n\t\t\t| HTMLTextAreaElement\n\t\t\t| HTMLInputElement;\n\n\t\tconst value = target.value;\n\n\t\tthis._lastValue = value;\n\t\tthis.value = value;\n\t\tthis.valueChange.emit(value);\n\t\tthis._internals.setFormValue(target.value);\n\t}\n\n\tprivate _checkAutoFocus() {\n\t\tif (!this.autofocus) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._inputRef) {\n\t\t\tsetTimeout(() => this._checkAutoFocus(), 100);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._focusInput();\n\t}\n}\n"],"version":3}
|
|
1
|
+
{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,WAAW,GAAA;AAClB,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AACnB,YAAA,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;YACtB;;QAGD,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC9D,QAAA,KAAqB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;;IAGnC,UAAU,GAAA;QACjB,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE;YAC9C;;AAGD,QAAA,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;;AAGhB,IAAA,YAAY,CAAC,EAAE,EAAA;QACtB,EAAE,CAAC,eAAe,EAAE;QACpB,MAAM,MAAM,IAAI,EAAE,CAAC,cAAc,IAAI,EAAE,CAAC,MAAM,CAE3B;AAEnB,QAAA,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK;AAE1B,QAAA,IAAI,CAAC,UAAU,GAAG,KAAK;AACvB,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK;AAClB,QAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC;QAC5B,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC;;IAGnC,eAAe,GAAA;AACtB,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACpB;;AAGD,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACpB,UAAU,CAAC,MAAM,IAAI,CAAC,eAAe,EAAE,EAAE,GAAG,CAAC;YAC7C;;QAGD,IAAI,CAAC,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/molecules/field/field/field.component.css?tag=p-field&encapsulation=shadow","src/components/molecules/field/field/field.component.tsx"],"sourcesContent":[":host {\n\tinput[type='number'] {\n\t\t-moz-appearance: textfield; /* Firefox */\n\t}\n\n\tinput::-webkit-outer-spin-button,\n\tinput::-webkit-inner-spin-button {\n\t\tdisplay: none;\n\t\t-webkit-appearance: none;\n\t}\n}\n","import { Placement } from '@floating-ui/dom';\nimport {\n\tAttachInternals,\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tListen,\n\tProp,\n\tState,\n\tWatch,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { HTMLInputTypeAttribute } from 'react';\nimport { RotateOptions } from '../../../../types/tailwind';\nimport { asBoolean } from '../../../../utils/as-boolean';\nimport { cn } from '../../../../utils/cn';\nimport { nonce } from '../../../../utils/nonce';\nimport {\n\tIconFlipOptions,\n\tIconVariant,\n} from '../../../atoms/icon/icon.component';\nimport { templateFunc } from '../container/field-container.component';\nimport { ThemedHost } from '../../../../internal/themed-host.component';\n\nconst field = cva(\n\t['flex gap-2', 'w-inherit', 'border-solid rounded-lg', 'relative'],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tread: 'border-0 items-start flex-wrap hyphens-auto break-normal leading-6',\n\t\t\t\twrite: 'border px-2',\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tsm: null,\n\t\t\t\tbase: null,\n\t\t\t},\n\t\t\tdisabled: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\tfocused: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\terror: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\tisTextarea: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: 'items-start',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{\n\t\t\t\tsize: 'sm',\n\t\t\t\tvariant: 'write',\n\t\t\t\tisTextarea: false,\n\t\t\t\tclass: 'h-6',\n\t\t\t},\n\t\t\t{\n\t\t\t\tsize: 'base',\n\t\t\t\tvariant: 'write',\n\t\t\t\tisTextarea: false,\n\t\t\t\tclass: 'h-8',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tsize: 'sm',\n\t\t\t\tvariant: 'read',\n\t\t\t\tclass: 'min-h-4 text-xs',\n\t\t\t},\n\t\t\t{\n\t\t\t\tsize: 'base',\n\t\t\t\tvariant: 'read',\n\t\t\t\tclass: 'min-h-5 text-sm',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tvariant: 'write',\n\t\t\t\tfocused: false,\n\t\t\t\terror: false,\n\t\t\t\tclass: 'border-storm-100 dark:border-hurricane-400',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'write',\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: true,\n\t\t\t\terror: false,\n\t\t\t\tclass:\n\t\t\t\t\t'border-indigo-600 ring dark:ring-0 ring-indigo-100 selection:bg-indigo-500',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tvariant: 'write',\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'bg-white dark:bg-hurricane-500',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'write',\n\t\t\t\tdisabled: true,\n\t\t\t\tclass:\n\t\t\t\t\t'bg-white-600 dark:bg-hurricane-600 dark:border-hurricane-500 cursor-not-allowed',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\terror: true,\n\t\t\t\tclass: 'border-negative-red-500',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: true,\n\t\t\t\terror: true,\n\t\t\t\tclass:\n\t\t\t\t\t'ring ring-negative-red-50 selection:bg-negative-red-50 dark:ring-0',\n\t\t\t},\n\t\t],\n\t}\n);\n\nconst input = cva(\n\t[\n\t\t'text-sm placeholder:text-sm placeholder:text-storm-500/40 dark:placeholder:text-hurricane-200',\n\t\t'border-none bg-transparent flex-1 min-w-0 p-0',\n\t\t'outline-none focus:outline-none',\n\t\t'font-geist',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tisTextarea: {\n\t\t\t\tfalse: 'h-full',\n\t\t\t\ttrue: 'mt-1',\n\t\t\t},\n\t\t\tdisabled: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: 'cursor-not-allowed',\n\t\t\t},\n\t\t\terror: {\n\t\t\t\tfalse: 'text-storm-500 dark:text-white',\n\t\t\t\ttrue: 'text-negative-red-500',\n\t\t\t},\n\t\t},\n\t}\n);\n\nconst prefixAndSuffix = cva(\n\t['flex flex-shrink-0 justify-center items-center text-center'],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tread: 'leading-6',\n\t\t\t\twrite: null,\n\t\t\t},\n\t\t\tdisabled: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: 'text-storm-100 dark:text-hurricane-400',\n\t\t\t},\n\t\t\tfocused: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\terror: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\tisText: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: 'text-sm',\n\t\t\t},\n\t\t\tisTextarea: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: 'mt-2',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: false,\n\t\t\t\terror: false,\n\t\t\t\tclass: 'text-storm-300 dark:text-hurricane-200',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: true,\n\t\t\t\terror: false,\n\t\t\t\tclass: 'text-storm-500 dark:text-white',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: false,\n\t\t\t\terror: true,\n\t\t\t\tclass: 'text-negative-red-500',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: true,\n\t\t\t\terror: true,\n\t\t\t\tclass: 'text-negative-red-800',\n\t\t\t},\n\t\t],\n\t}\n);\n\n@Component({\n\ttag: 'p-field',\n\tstyleUrl: './field.component.css',\n\tshadow: true,\n\tformAssociated: true,\n})\nexport class Field {\n\t/**\n\t * The alignment of the container\n\t */\n\t@Prop() align: 'start' | 'end' = 'start';\n\n\t/**\n\t * The variant of the field\n\t */\n\t@Prop() variant: 'read' | 'write' = 'write';\n\n\t/**\n\t * The id of the field\n\t */\n\t@Prop() id: string;\n\n\t/**\n\t * The size of the field\n\t */\n\t@Prop() size: 'sm' | 'base' = 'base';\n\n\t/**\n\t * The type of the field\n\t */\n\t@Prop() type: HTMLInputTypeAttribute | 'textarea' | 'slot' = 'text';\n\n\t/**\n\t * The size of the field\n\t */\n\t@Prop() properties: any | string = {};\n\n\t/**\n\t * The prefix of the field\n\t */\n\t@Prop() prefix: string;\n\n\t/**\n\t * The suffix of the field\n\t */\n\t@Prop() suffix: string;\n\n\t/**\n\t * Icon of the field\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * Icon flip */\n\t@Prop() iconFlip: IconFlipOptions;\n\n\t/**\n\t * Icon rotate\n\t */\n\t@Prop() iconRotate: RotateOptions;\n\n\t/**\n\t * Icon position\n\t */\n\t@Prop() iconPosition: 'start' | 'end' = 'start';\n\n\t/**\n\t * The value of the input\n\t */\n\t@Prop() value: string | number;\n\n\t/**\n\t * The label of the field\n\t */\n\t@Prop() label: string;\n\n\t/**\n\t * Wether the field is in loading state\n\t */\n\t@Prop() loading: boolean = false;\n\n\t/**\n\t * The placeholder of the input\n\t */\n\t@Prop() placeholder: string;\n\n\t/**\n\t * The helper of the field\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 = true;\n\n\t/**\n\t * Wether to show optional when not required\n\t */\n\t@Prop({ reflect: true }) showOptional: boolean = true;\n\n\t/**\n\t * Wether to show an add button when empty\n\t */\n\t@Prop({ reflect: true }) showAddOnEmpty: boolean = false;\n\n\t/**\n\t * The text to show on the add button\n\t */\n\t@Prop({ reflect: true }) addText: string = 'Add';\n\n\t/**\n\t * Wether to autofocus the field\n\t */\n\t@Prop({ reflect: true }) autofocus: boolean = false;\n\n\t/**\n\t * The error to display\n\t */\n\t@Prop({ reflect: true }) error: string;\n\n\t/**\n\t * Wether this component handles showing the error tooltip\n\t */\n\t@Prop({ reflect: true }) autoShowError = true;\n\n\t/**\n\t * The placement of the error popover\n\t */\n\t@Prop() errorPlacement: Placement;\n\n\t/**\n\t * Wether the field is disabled\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether the field is focused\n\t */\n\t@Prop({ reflect: true }) focused: boolean = false;\n\n\t/**\n\t * Force show the error tooltip\n\t */\n\t@Prop({ reflect: true }) forceShowTooltip: boolean = false;\n\n\t/**\n\t * Wether to select all text on focus\n\t */\n\t@Prop({ reflect: true }) selectAllOnFocus: boolean = true;\n\n\t/**\n\t * The method to use when focusing the input\n\t */\n\t@Prop() focusMethod: 'focus' | 'click' = 'focus';\n\n\t/**\n\t * The template for the optional text\n\t */\n\t@Prop() optionalTemplate: templateFunc;\n\n\t/**\n\t * Event whenever the value changes\n\t */\n\t@Event({ bubbles: false }) valueChange: EventEmitter<string | number>;\n\n\t/**\n\t * Event whenever the input ref changes\n\t */\n\t@Event() inputRefChange: EventEmitter<HTMLInputElement | HTMLTextAreaElement>;\n\n\t/**\n\t * Event whenever the value changes\n\t */\n\t@Event({ bubbles: false }) add: EventEmitter<void>;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _focused = false;\n\t@State() private _nonce = nonce(5);\n\n\t@AttachInternals() _internals: ElementInternals;\n\n\tprivate _inputRef: HTMLInputElement | HTMLTextAreaElement;\n\tprivate _lastValue: string | number | null;\n\n\tcomponentDidLoad() {\n\t\tthis._checkAutoFocus();\n\t}\n\n\tformResetCallback() {\n\t\tthis.value = null;\n\t\tthis.valueChange.emit(null);\n\t}\n\n\tformDisabledCallback(disabled: boolean) {\n\t\tif (!this._internals.form) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.disabled = disabled;\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tid,\n\t\t\tprefix,\n\t\t\tsuffix,\n\t\t\thasHeaderSlot,\n\t\t\thasLabelSlot,\n\t\t\thasHelperSlot,\n\t\t\thasErrorSlot,\n\t\t\thasValueSlot,\n\t\t} = this._getSlotInfo();\n\n\t\treturn (\n\t\t\t<ThemedHost>\n\t\t\t\t<p-field-container\n\t\t\t\t\tforceShowTooltip={\n\t\t\t\t\t\t(!!this.error?.length && !this._focused && this.autoShowError) ||\n\t\t\t\t\t\t(!!this.error?.length && this.forceShowTooltip)\n\t\t\t\t\t}\n\t\t\t\t\tid={id}\n\t\t\t\t\tlabel={this.label}\n\t\t\t\t\talign={this.align}\n\t\t\t\t\tloading={this.loading}\n\t\t\t\t\tloadingSize={this.size}\n\t\t\t\t\thelper={this.helper}\n\t\t\t\t\terror={this.error}\n\t\t\t\t\trequired={this.required}\n\t\t\t\t\tshowOptional={this.showOptional}\n\t\t\t\t\tvariant={this.variant}\n\t\t\t\t>\n\t\t\t\t\t{hasLabelSlot && (\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\tname='label'\n\t\t\t\t\t\t\tslot='label'\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{hasHeaderSlot && (\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\tname='header'\n\t\t\t\t\t\t\tslot='header'\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{hasHelperSlot && (\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\tname='helper'\n\t\t\t\t\t\t\tslot='helper'\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{hasErrorSlot && (\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\tname='error'\n\t\t\t\t\t\t\tslot='error'\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={field({\n\t\t\t\t\t\t\terror: !!this.error?.length,\n\t\t\t\t\t\t\tdisabled: asBoolean(this.disabled),\n\t\t\t\t\t\t\tfocused: asBoolean(this.focused) || this._focused,\n\t\t\t\t\t\t\tsize: this.size,\n\t\t\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\t\t\tisTextarea: this.type === 'textarea',\n\t\t\t\t\t\t})}\n\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\tthis.variant === 'read' && !hasValueSlot\n\t\t\t\t\t\t\t\t? `${this.value}`\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\tslot='content'\n\t\t\t\t\t>\n\t\t\t\t\t\t{(this.error?.length ||\n\t\t\t\t\t\t\tprefix ||\n\t\t\t\t\t\t\t(this.icon && this.iconPosition === 'start')) && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass={prefixAndSuffix({\n\t\t\t\t\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\t\t\t\t\terror: !!this.error?.length,\n\t\t\t\t\t\t\t\t\tdisabled: asBoolean(this.disabled),\n\t\t\t\t\t\t\t\t\tfocused: asBoolean(this.focused) || this._focused,\n\t\t\t\t\t\t\t\t\tisText: typeof suffix === 'string',\n\t\t\t\t\t\t\t\t\tisTextarea: this.type === 'textarea',\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\tonClick={() => this._focusInput()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{(this.icon && this.iconPosition === 'start') ||\n\t\t\t\t\t\t\t\tthis.error?.length ? (\n\t\t\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\t\t\tclass={cn('flex', {\n\t\t\t\t\t\t\t\t\t\t\t'mt-1': this.variant === 'read' && this.size === 'base',\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\tvariant={this.error?.length ? 'warning' : this.icon}\n\t\t\t\t\t\t\t\t\t\trotate={this.iconRotate}\n\t\t\t\t\t\t\t\t\t\tflip={this.iconFlip}\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\tprefix\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{this._getContent(hasValueSlot, id)}\n\n\t\t\t\t\t\t{(suffix || (this.icon && this.iconPosition === 'end')) && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass={prefixAndSuffix({\n\t\t\t\t\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\t\t\t\t\terror: !!this.error?.length,\n\t\t\t\t\t\t\t\t\tdisabled: asBoolean(this.disabled),\n\t\t\t\t\t\t\t\t\tfocused: asBoolean(this.focused) || this._focused,\n\t\t\t\t\t\t\t\t\tisText: typeof suffix === 'string',\n\t\t\t\t\t\t\t\t\tisTextarea: this.type === 'textarea',\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\tonClick={() => this._focusInput()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this.icon && this.iconPosition === 'end' ? (\n\t\t\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\t\t\tclass={cn('flex', {\n\t\t\t\t\t\t\t\t\t\t\t'mt-1': this.variant === 'read' && this.size === 'base',\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\tvariant={this.icon}\n\t\t\t\t\t\t\t\t\t\trotate={this.iconRotate}\n\t\t\t\t\t\t\t\t\t\tflip={this.iconFlip}\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\tsuffix\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</p-field-container>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\t@Watch('value')\n\twatchvalue(value: string | null) {\n\t\tif (!this._inputRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (value === this._lastValue) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._lastValue = value;\n\t\tthis._inputRef.value = value;\n\t}\n\n\t@Listen('focusin')\n\thandleFocusIn() {\n\t\tif (this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._focused = true;\n\t\tthis._selectAll();\n\t}\n\n\t@Listen('focusout')\n\thandleFocusOut() {\n\t\tif (this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._focused = false;\n\t}\n\n\t@Listen('keyup', { capture: true })\n\thandleKeyup(ev: KeyboardEvent) {\n\t\tif (this.disabled) {\n\t\t\tev.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._internals?.form) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.type === 'textarea' || ev.key !== 'Enter') {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._internals.form.requestSubmit();\n\t}\n\n\tprivate _getSlotInfo() {\n\t\tconst hasHelperSlot = !!this._el.querySelector(':scope > [slot=\"helper\"]');\n\t\tconst hasLabelSlot = !!this._el.querySelector(':scope > [slot=\"label\"]');\n\t\tconst hasPrefixSlot = !!this._el.querySelector(':scope > [slot=\"prefix\"]');\n\t\tconst hasSuffixSlot = !!this._el.querySelector(':scope > [slot=\"suffix\"]');\n\t\tconst hasHeaderSlot = !!this._el.querySelector(':scope > [slot=\"header\"]');\n\t\tconst hasErrorSlot = !!this._el.querySelector(':scope > [slot=\"error\"]');\n\t\tconst hasValueSlot = !!this._el.querySelector(':scope > [slot=\"value\"]');\n\n\t\tconst prefix = hasPrefixSlot ? <slot name='prefix' /> : this.prefix;\n\t\tconst suffix = hasSuffixSlot ? <slot name='suffix' /> : this.suffix;\n\n\t\tconst errorAndErrorIsNotBoolean =\n\t\t\tthis.error && typeof this.error === 'string' && this.error !== 'true';\n\n\t\tconst id = this.id?.length ? this.id : this._nonce;\n\n\t\treturn {\n\t\t\tid,\n\t\t\thasHelperSlot,\n\t\t\thasLabelSlot,\n\t\t\thasPrefixSlot,\n\t\t\thasSuffixSlot,\n\t\t\thasHeaderSlot,\n\t\t\thasErrorSlot,\n\t\t\thasValueSlot,\n\t\t\tprefix,\n\t\t\tsuffix,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t};\n\t}\n\n\tprivate _getContent(hasValueSlot = false, id: string) {\n\t\tif (this.variant === 'read') {\n\t\t\treturn hasValueSlot ? (\n\t\t\t\t<slot name='value' />\n\t\t\t) : !!this.value && `${this.value}`.length > 0 ? (\n\t\t\t\tthis.value\n\t\t\t) : this.showAddOnEmpty ? (\n\t\t\t\t<p-button\n\t\t\t\t\tvariant='text'\n\t\t\t\t\ticon='plus'\n\t\t\t\t\tsize='sm'\n\t\t\t\t\tonClick={() => this.add.emit()}\n\t\t\t\t>\n\t\t\t\t\t{this.addText}\n\t\t\t\t</p-button>\n\t\t\t) : (\n\t\t\t\t'—'\n\t\t\t);\n\t\t}\n\n\t\tif (this.type === 'slot') {\n\t\t\treturn <slot name='input' />;\n\t\t}\n\n\t\tconst props = {\n\t\t\tid,\n\t\t\tclass: input({\n\t\t\t\tdisabled: asBoolean(this.disabled),\n\t\t\t\tisTextarea: this.type === 'textarea',\n\t\t\t\terror: !!this.error?.length,\n\t\t\t}),\n\t\t\tvalue: this.value,\n\t\t\tplaceholder: this.placeholder,\n\t\t\tdisabled: this.disabled,\n\t\t\tonInput: (ev: InputEvent) => this._valueChange(ev),\n\t\t};\n\n\t\tlet properties = this.properties ?? {};\n\t\tif (typeof properties === 'string') {\n\t\t\tproperties = JSON.parse(this.properties);\n\t\t}\n\n\t\tif (this.type === 'textarea') {\n\t\t\treturn (\n\t\t\t\t<textarea\n\t\t\t\t\tref={ref => this._setInputRef(ref)}\n\t\t\t\t\t{...props}\n\t\t\t\t\t{...properties}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<input\n\t\t\t\ttype={this.type}\n\t\t\t\tref={ref => this._setInputRef(ref)}\n\t\t\t\t{...props}\n\t\t\t\t{...properties}\n\t\t\t/>\n\t\t);\n\t}\n\n\tprivate _setInputRef(ref: HTMLInputElement | HTMLTextAreaElement) {\n\t\tthis._inputRef = ref;\n\t\tthis.inputRefChange.emit(ref);\n\t}\n\n\tprivate _focusInput() {\n\t\tif (this._inputRef) {\n\t\t\tthis._inputRef.focus();\n\t\t\treturn;\n\t\t}\n\n\t\tconst input = this._el.querySelector(':scope > [slot=\"input\"]');\n\t\t(input as HTMLElement)[this.focusMethod]();\n\t}\n\n\tprivate _selectAll() {\n\t\tif (!this._inputRef || !this.selectAllOnFocus) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._inputRef.select();\n\t}\n\n\tprivate _valueChange(ev) {\n\t\tev.stopPropagation();\n\t\tconst target = (ev.originalTarget ?? ev.target) as\n\t\t\t| HTMLTextAreaElement\n\t\t\t| HTMLInputElement;\n\n\t\tconst value = target.value;\n\n\t\tthis._lastValue = value;\n\t\tthis.value = value;\n\t\tthis.valueChange.emit(value);\n\t\tthis._internals.setFormValue(target.value);\n\t}\n\n\tprivate _checkAutoFocus() {\n\t\tif (!this.autofocus) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._inputRef) {\n\t\t\tsetTimeout(() => this._checkAutoFocus(), 100);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._focusInput();\n\t}\n}\n"],"version":3}
|