@paperless/core 2.12.12 → 2.12.14
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/p-12ceb286.entry.js +2 -0
- package/dist/build/p-12ceb286.entry.js.map +1 -0
- package/dist/build/p-630b821d.entry.js +2 -0
- package/dist/build/p-630b821d.entry.js.map +1 -0
- package/dist/{paperless/p-e96b7452.entry.js → build/p-69fea92c.entry.js} +2 -2
- package/dist/build/p-D8FNwRNH.js +2 -0
- package/dist/build/p-D8FNwRNH.js.map +1 -0
- package/dist/build/p-button.p-icon.p-loader.entry.esm.js.map +1 -1
- package/dist/build/{p-22a831cd.entry.js → p-cbc3d273.entry.js} +2 -2
- package/dist/build/p-cbc3d273.entry.js.map +1 -0
- package/dist/build/{p-3deda660.js → p-d7e2150d.js} +1 -1
- package/dist/build/p-empty-state.p-floating-menu-container.p-table-cell.p-table-container.p-table-footer.p-table-header.p-table-row.p-table-row-actions-container.entry.esm.js.map +1 -1
- package/dist/build/p-field.p-field-container.entry.esm.js.map +1 -1
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/p-button.p-icon.p-loader.entry.cjs.js.map +1 -1
- package/dist/cjs/p-button_3.cjs.entry.js +25 -4
- package/dist/cjs/p-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/p-empty-state.p-floating-menu-container.p-table-cell.p-table-container.p-table-footer.p-table-header.p-table-row.p-table-row-actions-container.entry.cjs.js.map +1 -1
- package/dist/cjs/p-empty-state_8.cjs.entry.js +3 -3
- package/dist/cjs/p-empty-state_8.cjs.entry.js.map +1 -1
- package/dist/cjs/p-field.p-field-container.entry.cjs.js.map +1 -1
- package/dist/cjs/p-field_2.cjs.entry.js +6 -6
- package/dist/cjs/p-field_2.cjs.entry.js.map +1 -1
- package/dist/cjs/p-table.cjs.entry.js +1 -1
- package/dist/cjs/{table-helpers-Tue6kdrA.js → table-helpers-DyPa1NIG.js} +3 -3
- package/dist/cjs/table-helpers-DyPa1NIG.js.map +1 -0
- package/dist/collection/components/molecules/button/button.component.js +25 -4
- package/dist/collection/components/molecules/button/button.component.js.map +1 -1
- package/dist/collection/components/molecules/field/field/field.component.css +1 -1
- package/dist/collection/components/molecules/field/field/field.component.js +5 -5
- package/dist/collection/components/molecules/field/field/field.component.js.map +1 -1
- package/dist/collection/components/molecules/table/cell/table-cell.component.css +1 -1
- package/dist/collection/components/molecules/table/cell/table-cell.component.js +2 -2
- package/dist/collection/components/molecules/table/cell/table-cell.component.js.map +1 -1
- package/dist/collection/utils/table-helpers.js +1 -1
- package/dist/collection/utils/table-helpers.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-gJUNRhKk.js → p-1KS1K8BB.js} +3 -3
- package/dist/components/{p-gJUNRhKk.js.map → p-1KS1K8BB.js.map} +1 -1
- package/dist/components/{p-BKcCgjU1.js → p-9JVCnNTP.js} +9 -9
- package/dist/components/p-9JVCnNTP.js.map +1 -0
- package/dist/components/{p-gOTNTrIL.js → p-B45k5qcT.js} +4 -4
- package/dist/components/{p-gOTNTrIL.js.map → p-B45k5qcT.js.map} +1 -1
- package/dist/components/p-CLNMMTTp.js +112 -0
- package/dist/components/{p-yM044fjo.js.map → p-CLNMMTTp.js.map} +1 -1
- package/dist/components/{p-C-m1-8Yz.js → p-CZNONZKe.js} +3 -3
- package/dist/components/{p-C-m1-8Yz.js.map → p-CZNONZKe.js.map} +1 -1
- package/dist/components/{p-zjL3IIK8.js → p-CgOTs2ii.js} +3 -3
- package/dist/components/{p-zjL3IIK8.js.map → p-CgOTs2ii.js.map} +1 -1
- package/dist/components/{p-BdBmW6fy.js → p-Ds7nOoc6.js} +3 -3
- package/dist/components/{p-BdBmW6fy.js.map → p-Ds7nOoc6.js.map} +1 -1
- package/dist/components/p-attachment.js +1 -1
- package/dist/components/p-button.js +1 -1
- package/dist/components/p-calendar.js +1 -1
- package/dist/components/p-datepicker.js +3 -3
- package/dist/components/p-drawer-header.js +1 -1
- package/dist/components/p-drawer.js +2 -2
- package/dist/components/p-empty-state.js +1 -1
- package/dist/components/p-field.js +1 -1
- package/dist/components/{p-CgnxFCNr.js → p-mjB0gV5-.js} +27 -6
- package/dist/components/p-mjB0gV5-.js.map +1 -0
- package/dist/components/p-modal-header.js +1 -1
- package/dist/components/p-modal.js +2 -2
- package/dist/components/p-navbar.js +1 -1
- package/dist/components/p-profile.js +1 -1
- package/dist/components/p-select.js +2 -2
- package/dist/components/p-table-cell.js +1 -1
- package/dist/components/p-table-header.js +1 -1
- package/dist/components/p-table.js +6 -6
- package/dist/components/{p-DVhkaU1p.js → p-x2Yo8WX0.js} +3 -3
- package/dist/components/{p-DVhkaU1p.js.map → p-x2Yo8WX0.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/p-button.p-icon.p-loader.entry.js.map +1 -1
- package/dist/esm/p-button_3.entry.js +25 -4
- package/dist/esm/p-button_3.entry.js.map +1 -1
- package/dist/esm/p-empty-state.p-floating-menu-container.p-table-cell.p-table-container.p-table-footer.p-table-header.p-table-row.p-table-row-actions-container.entry.js.map +1 -1
- package/dist/esm/p-empty-state_8.entry.js +3 -3
- package/dist/esm/p-empty-state_8.entry.js.map +1 -1
- package/dist/esm/p-field.p-field-container.entry.js.map +1 -1
- package/dist/esm/p-field_2.entry.js +6 -6
- package/dist/esm/p-field_2.entry.js.map +1 -1
- package/dist/esm/p-table.entry.js +1 -1
- package/dist/esm/{table-helpers-D16Zz2qz.js → table-helpers-Cx32XkzF.js} +3 -3
- package/dist/esm/table-helpers-Cx32XkzF.js.map +1 -0
- package/dist/index.html +1 -1
- package/dist/paperless/index.esm.js +1 -1
- package/dist/paperless/p-12ceb286.entry.js +2 -0
- package/dist/paperless/p-12ceb286.entry.js.map +1 -0
- package/dist/paperless/p-630b821d.entry.js +2 -0
- package/dist/paperless/p-630b821d.entry.js.map +1 -0
- package/dist/{build/p-e96b7452.entry.js → paperless/p-69fea92c.entry.js} +2 -2
- package/dist/paperless/p-D8FNwRNH.js +2 -0
- package/dist/paperless/p-D8FNwRNH.js.map +1 -0
- package/dist/paperless/p-button.p-icon.p-loader.entry.esm.js.map +1 -1
- package/dist/paperless/{p-22a831cd.entry.js → p-cbc3d273.entry.js} +2 -2
- package/dist/paperless/p-cbc3d273.entry.js.map +1 -0
- package/dist/paperless/p-empty-state.p-floating-menu-container.p-table-cell.p-table-container.p-table-footer.p-table-header.p-table-row.p-table-row-actions-container.entry.esm.js.map +1 -1
- package/dist/paperless/p-field.p-field-container.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/package.json +1 -1
- package/dist/build/p-01fa45f8.entry.js +0 -2
- package/dist/build/p-01fa45f8.entry.js.map +0 -1
- package/dist/build/p-22a831cd.entry.js.map +0 -1
- package/dist/build/p-8130400b.entry.js +0 -2
- package/dist/build/p-8130400b.entry.js.map +0 -1
- package/dist/build/p-CWwnpT8r.js +0 -2
- package/dist/build/p-CWwnpT8r.js.map +0 -1
- package/dist/cjs/table-helpers-Tue6kdrA.js.map +0 -1
- package/dist/components/p-BKcCgjU1.js.map +0 -1
- package/dist/components/p-CgnxFCNr.js.map +0 -1
- package/dist/components/p-yM044fjo.js +0 -112
- package/dist/esm/table-helpers-D16Zz2qz.js.map +0 -1
- package/dist/paperless/p-01fa45f8.entry.js +0 -2
- package/dist/paperless/p-01fa45f8.entry.js.map +0 -1
- package/dist/paperless/p-22a831cd.entry.js.map +0 -1
- package/dist/paperless/p-8130400b.entry.js +0 -2
- package/dist/paperless/p-8130400b.entry.js.map +0 -1
- package/dist/paperless/p-CWwnpT8r.js +0 -2
- package/dist/paperless/p-CWwnpT8r.js.map +0 -1
- /package/dist/build/{p-e96b7452.entry.js.map → p-69fea92c.entry.js.map} +0 -0
- /package/dist/paperless/{p-e96b7452.entry.js.map → p-69fea92c.entry.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["buttonComponentCss","button","cva","variants","variant","primary","secondary","text","transparent","dropdown","active","true","false","error","loading","size","sm","base","lg","disabled","buttonGroupPosition","none","start","center","end","iconOnly","compoundVariants","class","icon","Button","label","as","href","target","type","chevron","chevronPosition","iconClass","iconPosition","iconFlip","iconRotate","inheritText","onClick","render","loaderColor","this","VariableTag","length","hostClass","cn","asBoolean","includes","h","ThemedHost","key","undefined","rotate","_getIcon","color","handleClick","ev","preventDefault","_host","closest","requestSubmit","emit","flip","iconComponentCss","horizontal","vertical","auto","xxs","xs","xl","transform","Icon","componentWillRender","icons","console","warn","hasTextSizeClass","test","_el","className","svg","style","title","innerHTML","loaderComponentCss","Loader","show","modalTitle","modalDescription","_show","_showSubscriber","componendDidLoad","_checkShow","componentShouldUpdate","loader","unsubscribe","subscribe"],"sources":["src/components/molecules/button/button.component.css?tag=p-button&encapsulation=shadow","src/components/molecules/button/button.component.tsx","src/components/atoms/icon/icon.component.css?tag=p-icon&encapsulation=shadow","src/components/atoms/icon/icon.component.tsx","src/components/atoms/loader/loader.component.scss?tag=p-loader&encapsulation=shadow","src/components/atoms/loader/loader.component.tsx"],"sourcesContent":[null,"import {\n\tComponent,\n\tEvent as StencilEvent,\n\tEventEmitter,\n\th,\n\tListen,\n\tProp,\n\tElement,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { ThemedHost } from '../../../internal/themed-host.component';\nimport { RotateOptions } from '../../../types/tailwind';\nimport { asBoolean } from '../../../utils/as-boolean';\nimport { cn } from '../../../utils/cn';\nimport { IconFlipOptions, IconVariant } from '../../atoms/icon/icon.component';\n\nconst button = cva(\n\t[\n\t\t'group/button',\n\t\t'font-semibold leading-4',\n\t\t'flex items-center justify-center',\n\t\t'cursor-pointer font-geist',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tprimary: ['border-storm-500/20', 'text-white'],\n\t\t\t\tsecondary: null,\n\t\t\t\ttext: null,\n\t\t\t\ttransparent: 'bg-transparent border-transparent',\n\t\t\t\tdropdown: null,\n\t\t\t},\n\t\t\tactive: {\n\t\t\t\ttrue: null,\n\t\t\t\tfalse: null,\n\t\t\t},\n\t\t\terror: {\n\t\t\t\ttrue: null,\n\t\t\t\tfalse: null,\n\t\t\t},\n\t\t\tloading: {\n\t\t\t\ttrue: 'cursor-wait',\n\t\t\t\tfalse: null,\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tsm: ['text-xs h-6 gap-1'],\n\t\t\t\tbase: ['text-sm h-8 gap-2'],\n\t\t\t\tlg: ['text-base h-10 gap-2'],\n\t\t\t},\n\t\t\tdisabled: {\n\t\t\t\ttrue: 'cursor-not-allowed border-transparent',\n\t\t\t\tfalse: null,\n\t\t\t},\n\t\t\tbuttonGroupPosition: {\n\t\t\t\tnone: null,\n\t\t\t\tstart: null,\n\t\t\t\tcenter: null,\n\t\t\t\tend: null,\n\t\t\t},\n\t\t\ticonOnly: {\n\t\t\t\ttrue: 'justify-center',\n\t\t\t\tfalse: 'w-inherit py-1',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t// variants\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\tclass: 'bg-white dark:bg-white/15',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['primary', 'secondary', 'dropdown'],\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'border',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['primary', 'secondary', 'transparent', 'dropdown'],\n\t\t\t\tbuttonGroupPosition: 'none',\n\t\t\t\tclass: 'rounded-lg',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['primary', 'secondary', 'transparent', 'dropdown'],\n\t\t\t\tbuttonGroupPosition: 'start',\n\t\t\t\tclass: 'rounded-s-lg',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['primary', 'secondary', 'transparent', 'dropdown'],\n\t\t\t\tbuttonGroupPosition: 'end',\n\t\t\t\tclass: 'rounded-e-lg',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\tdisabled: false,\n\t\t\t\terror: false,\n\t\t\t\tclass: 'text-storm-500 dark:text-white',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'primary',\n\t\t\t\tclass: 'dark:border-0 dark:active:border-0',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'primary',\n\t\t\t\tdisabled: true,\n\t\t\t\tclass: 'bg-indigo-200',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'primary',\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'bg-indigo-600',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'primary',\n\t\t\t\tdisabled: false,\n\t\t\t\tloading: false,\n\t\t\t\tclass: [\n\t\t\t\t\t'active:border-storm-500/10 dark:active:ring-0 active:ring-2 active:text-white/60',\n\t\t\t\t\t'drop-shadow-primary-button hover:drop-shadow-2 hover:bg-indigo-700 active:ring-indigo-100',\n\t\t\t\t],\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'primary',\n\t\t\t\tdisabled: false,\n\t\t\t\tloading: false,\n\t\t\t\tactive: true,\n\t\t\t\tclass: 'ring ring-2',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'primary',\n\t\t\t\tdisabled: false,\n\t\t\t\tloading: false,\n\t\t\t\tactive: true,\n\t\t\t\tclass: 'ring-indigo-100',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\tdisabled: true,\n\t\t\t\tclass:\n\t\t\t\t\t'border bg-white-600 text-storm-100 dark:bg-white/5 dark:border-white/5 dark:text-hurricane-400',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'text-storm-500 dark:text-white',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\tdisabled: false,\n\t\t\t\tloading: false,\n\t\t\t\tclass: [\n\t\t\t\t\t'drop-shadow-1 hover:drop-shadow-1 hover:bg-white-600 active:ring-indigo-100 active:text-storm-500/60',\n\t\t\t\t\t'dark:hover:bg-white/25 dark:active:bg-white/25 dark:active:ring-0 dark:active:text-white/60',\n\t\t\t\t],\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\tdisabled: false,\n\t\t\t\tloading: false,\n\t\t\t\terror: false,\n\t\t\t\tclass: [\n\t\t\t\t\t'active:border-indigo-600 active:ring active:ring-2',\n\t\t\t\t\t'dark:active:ring-0',\n\t\t\t\t],\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\tdisabled: false,\n\t\t\t\tloading: false,\n\t\t\t\tactive: true,\n\t\t\t\terror: false,\n\t\t\t\tclass: ['border-indigo-600 ring ring-2 ring-indigo-100', 'dark:ring-0'],\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\terror: false,\n\t\t\t\tactive: false,\n\t\t\t\tclass: ['border-storm-500/20 dark:border-transparent'],\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\t\terror: true,\n\t\t\t\tclass: [\n\t\t\t\t\t'border border-negative-red-500 text-negative-red-800 ring ring-2 ring-negative-red-50 active:text-negative-red-800',\n\t\t\t\t\t'dark:ring-0 dark:border-negative-red-700 dark:text-negative-red-alternative',\n\t\t\t\t],\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tvariant: ['text', 'transparent'],\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'text-indigo-700 hover:text-indigo-800',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['text', 'transparent'],\n\t\t\t\tdisabled: true,\n\t\t\t\tclass: 'text-indigo-300',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['text', 'transparent'],\n\t\t\t\tdisabled: false,\n\t\t\t\tloading: false,\n\t\t\t\tclass: 'active:text-indigo-800',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tvariant: ['primary', 'secondary', 'transparent'],\n\t\t\t\tsize: ['base', 'sm'],\n\t\t\t\ticonOnly: false,\n\t\t\t\tclass: 'px-2',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['primary', 'secondary', 'transparent'],\n\t\t\t\tsize: 'lg',\n\t\t\t\ticonOnly: false,\n\t\t\t\tclass: 'px-3',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'dropdown',\n\t\t\t\ticonOnly: false,\n\t\t\t\tclass: 'p-2',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tvariant: ['primary', 'secondary', 'transparent', 'text'],\n\t\t\t\ticonOnly: false,\n\t\t\t\tclass: 'py-1',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tsize: 'sm',\n\t\t\t\ticonOnly: true,\n\t\t\t\tclass: 'w-6',\n\t\t\t},\n\t\t\t{\n\t\t\t\tsize: 'base',\n\t\t\t\ticonOnly: true,\n\t\t\t\tclass: 'w-8',\n\t\t\t},\n\t\t\t{\n\t\t\t\tsize: 'lg',\n\t\t\t\ticonOnly: true,\n\t\t\t\tclass: 'w-10',\n\t\t\t},\n\t\t],\n\t}\n);\n\nconst icon = cva([], {\n\tvariants: {\n\t\tsize: {\n\t\t\tsm: 'text-xs',\n\t\t\tbase: 'text-base',\n\t\t\tlg: 'text-base',\n\t\t},\n\t\tvariant: {\n\t\t\tprimary: null,\n\t\t\tsecondary: null,\n\t\t\ttext: null,\n\t\t\ttransparent: null,\n\t\t\tdropdown: null,\n\t\t},\n\t\tdisabled: {\n\t\t\ttrue: null,\n\t\t\tfalse: null,\n\t\t},\n\t\tactive: {\n\t\t\ttrue: null,\n\t\t\tfalse: null,\n\t\t},\n\t\terror: {\n\t\t\ttrue: null,\n\t\t\tfalse: null,\n\t\t},\n\t},\n\tcompoundVariants: [\n\t\t{\n\t\t\tvariant: 'primary',\n\t\t\tdisabled: false,\n\t\t\tactive: false,\n\t\t\terror: false,\n\t\t\tclass:\n\t\t\t\t'text-indigo-300 group-hover/button:text-white group-active/button:text-white/60',\n\t\t},\n\t\t{\n\t\t\tvariant: 'primary',\n\t\t\tdisabled: false,\n\t\t\tactive: true,\n\t\t\tclass: 'text-white/60',\n\t\t},\n\t\t{\n\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\tdisabled: false,\n\t\t\tactive: false,\n\t\t\terror: false,\n\t\t\tclass: [\n\t\t\t\t'text-storm-300 group-hover/button:text-storm-500 group-active/button:text-storm-500/60',\n\t\t\t\t'dark:text-hurricane-200 dark:group-hover/button:text-white dark:group-active/button:text-white/60',\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\tdisabled: false,\n\t\t\tactive: true,\n\t\t\terror: false,\n\t\t\tclass: 'text-storm-500/60 dark:text-white/60',\n\t\t},\n\t\t{\n\t\t\tvariant: ['transparent', 'text'],\n\t\t\tdisabled: false,\n\t\t\tactive: false,\n\t\t\tclass:\n\t\t\t\t'text-indigo-500 group-hover/button:text-indigo-700 group-active/button:text-indigo-800',\n\t\t},\n\t\t{\n\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\tactive: false,\n\t\t\terror: true,\n\t\t\tclass:\n\t\t\t\t'text-negative-red-500 group-hover/button:text-negative-red-800 dark:text-negative-red-alternative',\n\t\t},\n\t\t{\n\t\t\tvariant: ['secondary', 'dropdown'],\n\t\t\tactive: true,\n\t\t\terror: true,\n\t\t\tclass: 'text-negative-red-800',\n\t\t},\n\t],\n});\n\nexport type ButtonVariant =\n\t| 'primary'\n\t| 'secondary'\n\t| 'transparent'\n\t| 'text'\n\t| 'dropdown';\n\n@Component({\n\ttag: 'p-button',\n\tstyleUrl: 'button.component.css',\n\tshadow: true,\n})\nexport class Button {\n\t/**\n\t * The label of the button (Can use slot)\n\t */\n\t@Prop() label?: string;\n\n\t/**\n\t * The type of the button\n\t */\n\t@Prop() as?: 'a' | 'button' = 'button';\n\n\t/**\n\t * The variant of the button\n\t */\n\t@Prop() variant?: ButtonVariant = 'primary';\n\n\t/**\n\t * Wether to force an active state\n\t */\n\t@Prop() active?: boolean = false;\n\n\t/**\n\t * Wether to show a error state\n\t */\n\t@Prop() error?: boolean = false;\n\n\t/**\n\t * Href in case of \"text\" version\n\t */\n\t@Prop() href?: string;\n\n\t/**\n\t * Target in case of \"text\" version\n\t */\n\t@Prop() target?: string;\n\n\t/**\n\t * The size of the button\n\t */\n\t@Prop() size?: 'sm' | 'base' | 'lg' = 'base';\n\n\t/**\n\t * The type of the button\n\t */\n\t@Prop() type?: 'button' | 'submit' = 'button';\n\n\t/**\n\t * Wether to show a loader or not\n\t */\n\t@Prop() loading?: boolean = false;\n\n\t/**\n\t * Wether to show a chevron or not\n\t */\n\t@Prop() chevron?: boolean | 'up' | 'down' = false;\n\n\t/**\n\t * Chevron position\n\t */\n\t@Prop() chevronPosition?: 'start' | 'end' = 'end';\n\n\t/**\n\t * Wether the button is disabled\n\t */\n\t@Prop() disabled?: boolean = false;\n\n\t/**\n\t * Icon to show on the button\n\t */\n\t@Prop() icon?: IconVariant;\n\n\t/**\n\t * Wether the button is icon only\n\t */\n\t@Prop() iconOnly?: boolean = false;\n\n\t/**\n\t * A class to apply to the icon\n\t */\n\t@Prop() iconClass?: string;\n\n\t/**\n\t * Icon position\n\t */\n\t@Prop() iconPosition?: 'start' | 'end' = 'start';\n\n\t/**\n\t * Icon flip\n\t */\n\t@Prop() iconFlip?: IconFlipOptions;\n\n\t/**\n\t * Icon rotate\n\t */\n\t@Prop() iconRotate?: RotateOptions;\n\n\t/**\n\t * Wether the button should inherit text styles\n\t */\n\t@Prop() inheritText?: boolean = false;\n\n\t/**\n\t * Position of the button in the button group, mostly un-used if not in a group\n\t */\n\t@Prop() buttonGroupPosition?: 'start' | 'center' | 'end' | 'none' = 'none';\n\n\t/**\n\t * The class of the container passed by parent\n\t */\n\t@Prop() class?: string;\n\n\t/**\n\t * Button click event\n\t */\n\t@StencilEvent({\n\t\tbubbles: false,\n\t})\n\tonClick: EventEmitter<MouseEvent>;\n\n\t@Element() private _host: HTMLElement;\n\n\trender() {\n\t\tlet loaderColor: 'white' | 'off-white' | 'indigo' | 'storm' = 'white';\n\t\tswitch (this.variant) {\n\t\t\tcase 'secondary':\n\t\t\tcase 'dropdown':\n\t\t\tcase 'transparent':\n\t\t\t\tloaderColor = 'off-white';\n\t\t\t\tbreak;\n\t\t\tcase 'text':\n\t\t\t\tloaderColor = 'storm';\n\t\t\t\tbreak;\n\t\t}\n\n\t\tconst VariableTag =\n\t\t\tthis.variant === 'text' || this.href?.length || this.as === 'a'\n\t\t\t\t? 'a'\n\t\t\t\t: 'button';\n\n\t\tconst hostClass = cn('p-button inline-block', this.class);\n\t\tconst active = asBoolean(this.active) || hostClass?.includes('active');\n\n\t\treturn (\n\t\t\t<ThemedHost class={hostClass}>\n\t\t\t\t<VariableTag\n\t\t\t\t\tdisabled={asBoolean(this.disabled)}\n\t\t\t\t\thref={this.href}\n\t\t\t\t\ttype={this.variant !== 'text' ? this.type : undefined}\n\t\t\t\t\ttarget={this.target}\n\t\t\t\t\tclass={button({\n\t\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\t\tsize: this.size,\n\t\t\t\t\t\tloading: asBoolean(this.loading),\n\t\t\t\t\t\tdisabled: asBoolean(this.disabled),\n\t\t\t\t\t\tbuttonGroupPosition: this.buttonGroupPosition,\n\t\t\t\t\t\ticonOnly: asBoolean(this.iconOnly),\n\t\t\t\t\t\tactive,\n\t\t\t\t\t\terror: asBoolean(this.error),\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{this.chevron && this.chevronPosition === 'start' && (\n\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\tvariant='caret'\n\t\t\t\t\t\t\trotate={this.chevron === 'up' ? 180 : 0}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{this.icon &&\n\t\t\t\t\t\tthis.iconPosition === 'start' &&\n\t\t\t\t\t\t!(this.iconOnly && this.loading) &&\n\t\t\t\t\t\tthis._getIcon()}\n\n\t\t\t\t\t{this.label ? this.label : <slot />}\n\n\t\t\t\t\t{this.icon &&\n\t\t\t\t\t\tthis.iconPosition === 'end' &&\n\t\t\t\t\t\t!this.loading &&\n\t\t\t\t\t\t!this.chevron &&\n\t\t\t\t\t\tthis._getIcon()}\n\n\t\t\t\t\t{this.chevron && !this.loading && this.chevronPosition === 'end' && (\n\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\tvariant='caret'\n\t\t\t\t\t\t\trotate={this.chevron === 'up' ? 180 : 0}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{this.loading && <p-loader color={loaderColor} />}\n\t\t\t\t</VariableTag>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\t@Listen('click', { capture: true })\n\thandleClick(ev: MouseEvent) {\n\t\tif (this.loading || this.disabled) {\n\t\t\tev.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.type === 'submit') {\n\t\t\tthis._host.closest('form').requestSubmit();\n\t\t}\n\n\t\tthis.onClick.emit(ev);\n\t}\n\n\tprivate _getIcon() {\n\t\tif (!this.icon) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn (\n\t\t\t<p-icon\n\t\t\t\tclass={cn(\n\t\t\t\t\ticon({\n\t\t\t\t\t\tsize: this.size,\n\t\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\t\tdisabled: asBoolean(this.disabled),\n\t\t\t\t\t\tactive: asBoolean(this.active),\n\t\t\t\t\t\terror: asBoolean(this.error),\n\t\t\t\t\t}),\n\t\t\t\t\tthis.iconClass ?? ''\n\t\t\t\t)}\n\t\t\t\tvariant={this.icon}\n\t\t\t\tflip={this.iconFlip}\n\t\t\t\trotate={this.iconRotate}\n\t\t\t/>\n\t\t);\n\t}\n}\n",":host {\n\t--tw-translate-y: 0px !important;\n\t--tw-translate-x: 0px !important;\n\n\t@apply inline-flex;\n}\n","import { Component, h, Prop, Element } from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { TextSizeOptions } from '../../../types/tailwind';\nimport { icons } from '../../../utils/icons';\n\nexport type IconVariant = keyof typeof icons;\nexport type IconFlipOptions = 'none' | 'horizontal' | 'vertical';\n\nconst icon = cva(['p-icon inline-flex', 'transform-gpu transition-transform'], {\n\tvariants: {\n\t\tflip: {\n\t\t\tnone: null,\n\t\t\thorizontal: 'scale-x-flip',\n\t\t\tvertical: 'scale-y-flip',\n\t\t},\n\t\tsize: {\n\t\t\tauto: null,\n\t\t\txxs: 'text-xxs',\n\t\t\txs: 'text-xs',\n\t\t\tsm: 'text-sm',\n\t\t\tbase: 'text-base',\n\t\t\tlg: 'text-lg',\n\t\t\txl: 'text-xl',\n\t\t\t'2xl': 'text-2xl',\n\t\t\t'3xl': 'text-3xl',\n\t\t\t'4xl': 'text-4xl',\n\t\t},\n\t\ttransform: {\n\t\t\ttrue: 'scale-[0.9999]',\n\t\t\tfalse: null,\n\t\t},\n\t},\n});\n\n@Component({\n\ttag: 'p-icon',\n\tstyleUrl: 'icon.component.css',\n\tshadow: true,\n})\nexport class Icon {\n\t/**\n\t * The icon the be displayed\n\t */\n\t@Prop() variant!: IconVariant;\n\n\t/**\n\t * The size of the icon, using tailwind sizes\n\t */\n\t@Prop() size: TextSizeOptions = 'base';\n\n\t/**\n\t * Wether to rotate the icon x degrees\n\t */\n\t@Prop() rotate: number = 0;\n\n\t/**\n\t * Wether to flip the icon horizontally or vertically\n\t */\n\t@Prop() flip: IconFlipOptions = 'none';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() _el: HTMLElement;\n\n\tcomponentWillRender() {\n\t\tconst icon = icons[this.variant];\n\t\tif (!icon && this.variant !== undefined) {\n\t\t\tconsole.warn(`[p-icon] Variant \"${this.variant}\" does not exist `);\n\t\t}\n\t}\n\n\trender() {\n\t\tconst hasTextSizeClass = /text-(xs|sm|base|lg|xl)/.test(this._el.className);\n\t\tconst svg = icons[this.variant];\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclass={icon({\n\t\t\t\t\tflip: this.flip,\n\t\t\t\t\tsize: hasTextSizeClass ? 'auto' : this.size,\n\t\t\t\t\ttransform: this.flip !== 'none' || this.rotate > 0 || this.rotate < 0,\n\t\t\t\t})}\n\t\t\t\tstyle={{\n\t\t\t\t\t'--tw-rotate': `${this.rotate}deg`,\n\t\t\t\t}}\n\t\t\t\ttitle={this.variant}\n\t\t\t\tinnerHTML={svg}\n\t\t\t></div>\n\t\t);\n\t}\n}\n",":host {\n\t.loader {\n\t\t@apply inline-block h-[1em] w-[1em] rounded-full;\n\t\t@apply border-2 border-solid;\n\t\tanimation: 500ms spin linear infinite;\n\n\t\twill-change: transform;\n\n\t\t&.color-indigo {\n\t\t\t@apply border-r-indigo-500/40 border-t-indigo-500 #{!important};\n\t\t}\n\n\t\t&.color-off-white {\n\t\t\t@apply border-off-white-600/40 border-t-off-white-800 #{!important};\n\t\t}\n\n\t\t&.color-white {\n\t\t\t@apply border-white/40 border-t-white #{!important};\n\t\t}\n\n\t\t&.color-storm {\n\t\t\t@apply border-r-storm-400 border-t-storm-700 #{!important};\n\t\t}\n\t}\n\n\t.loading-screen {\n\t\t@apply fixed left-0 top-0 h-screen-safe w-screen-safe;\n\t\t@apply flex items-center justify-center;\n\t\t@apply bg-off-white-200 dark:bg-hurricane-700;\n\n\t\tz-index: 1001;\n\n\t\t.content {\n\t\t\t@apply max-w-xs;\n\t\t}\n\t}\n}\n\n:host(.variant-ghost) {\n\t@apply box-border block;\n\n\twill-change: background, background-position-x, background-color;\n\n\tmin-height: 1em;\n\tmin-width: 1em;\n\n\t--loading-bg: #f7fafc;\n\t--loading-stripe: rgba(252, 253, 254, 1);\n\n\tbackground-color: var(--loading-bg);\n\tbackground: linear-gradient(\n\t\t\t100deg,\n\t\t\trgba(255, 255, 255, 0) 40%,\n\t\t\tvar(--loading-stripe) 50%,\n\t\t\trgba(255, 255, 255, 0) 60%\n\t\t)\n\t\tvar(--loading-bg);\n\tbackground-size: 200% 100%;\n\tbackground-position-x: 180%;\n\tanimation: 1s loading ease-in-out infinite;\n}\n\n:host(.variant-ghost[data-theme='dark']) {\n\t--loading-bg: #363c46;\n\t--loading-stripe: rgba(70, 75, 84, 1);\n}\n\n@keyframes loading {\n\tto {\n\t\tbackground-position-x: -20%;\n\t}\n}\n\n@keyframes spin {\n\t100% {\n\t\ttransform: rotate(1turn);\n\t}\n}\n","import { Component, h, Prop } from '@stencil/core';\nimport { Observable, Subscription } from 'rxjs';\nimport { ThemedHost } from '../../../internal/themed-host.component';\n\n@Component({\n\ttag: 'p-loader',\n\tstyleUrl: 'loader.component.scss',\n\tshadow: true,\n})\nexport class Loader {\n\t/**\n\t * Wether to show or hide the loader\n\t */\n\t@Prop() show: boolean | Observable<boolean> = true;\n\n\t/**\n\t * Variant of loader\n\t */\n\t@Prop() variant: 'inline' | 'full-width' | 'full-screen' | 'modal' | 'ghost' =\n\t\t'inline';\n\n\t/**\n\t * Color of the loader\n\t */\n\t@Prop() color: 'indigo' | 'white' | 'off-white' | 'storm' = 'indigo';\n\n\t/**\n\t * !NOT IMPLEMENTED! Modal title for modal variant\n\t */\n\t@Prop() modalTitle: string;\n\n\t/**\n\t * !NOT IMPLEMENTED! Modal description for modal variant\n\t */\n\t@Prop() modalDescription: string;\n\n\tprivate _show: boolean | Observable<boolean> = false;\n\tprivate _showSubscriber: Subscription;\n\n\tcomponendDidLoad() {\n\t\tthis._show = this.show;\n\t}\n\n\tcomponentWillRender() {\n\t\tthis._checkShow();\n\t}\n\n\tcomponentShouldUpdate() {\n\t\tthis._checkShow();\n\t}\n\n\trender() {\n\t\tif (!this._show) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.variant === 'ghost') {\n\t\t\treturn (\n\t\t\t\t<ThemedHost class='variant-ghost min-h-4 min-w-4 rounded-2xl'></ThemedHost>\n\t\t\t);\n\t\t}\n\n\t\tconst loader = <div class={`loader color-${this.color}`}></div>;\n\n\t\tif (this.variant === 'full-screen') {\n\t\t\treturn (\n\t\t\t\t<ThemedHost class='variant-full-screen'>\n\t\t\t\t\t<div class='loading-screen'>\n\t\t\t\t\t\t<div class='content'>\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</ThemedHost>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<ThemedHost\n\t\t\t\tclass={`variant-default flex ${\n\t\t\t\t\tthis.variant === 'full-width' && 'flex w-full justify-center text-4xl'\n\t\t\t\t}`}\n\t\t\t>\n\t\t\t\t{loader}\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\tprivate _checkShow() {\n\t\tif (this._showSubscriber) {\n\t\t\tthis._showSubscriber.unsubscribe();\n\t\t\tthis._showSubscriber = null;\n\t\t}\n\n\t\tif (typeof this.show !== 'boolean') {\n\t\t\tthis._showSubscriber = this.show?.subscribe(show => (this._show = show));\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show = this.show;\n\t}\n}\n"],"mappings":"6RAAA,MAAMA,EAAqB,0ldCgB3B,MAAMC,EAASC,EACd,CACC,eACA,0BACA,mCACA,6BAED,CACCC,SAAU,CACTC,QAAS,CACRC,QAAS,CAAC,sBAAuB,cACjCC,UAAW,KACXC,KAAM,KACNC,YAAa,oCACbC,SAAU,MAEXC,OAAQ,CACPC,KAAM,KACNC,MAAO,MAERC,MAAO,CACNF,KAAM,KACNC,MAAO,MAERE,QAAS,CACRH,KAAM,cACNC,MAAO,MAERG,KAAM,CACLC,GAAI,CAAC,qBACLC,KAAM,CAAC,qBACPC,GAAI,CAAC,yBAENC,SAAU,CACTR,KAAM,wCACNC,MAAO,MAERQ,oBAAqB,CACpBC,KAAM,KACNC,M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,CAC7B,OACCgD,EAACC,EAAU,CAAC1B,MAAM,6C,CAIpB,MAAMuE,EAAS9C,EAAA,OAAKzB,MAAO,gBAAgBkB,KAAKa,UAEhD,GAAIb,KAAKzC,UAAY,cAAe,CACnC,OACCgD,EAACC,EAAW,CAAA1B,MAAM,uBACjByB,EAAK,OAAAzB,MAAM,kBACVyB,EAAK,OAAAzB,MAAM,WACVyB,EAAA,e,CAOL,OACCA,EAACC,EAAU,CACV1B,MAAO,wBACNkB,KAAKzC,UAAY,cAAgB,yCAGjC8F,E,CAKI,UAAAF,GACP,GAAInD,KAAKiD,gBAAiB,CACzBjD,KAAKiD,gBAAgBK,cACrBtD,KAAKiD,gBAAkB,I,CAGxB,UAAWjD,KAAK6C,OAAS,UAAW,CACnC7C,KAAKiD,gBAAkBjD,KAAK6C,MAAMU,WAAUV,GAAS7C,KAAKgD,MAAQH,IAClE,M,CAGD7C,KAAKgD,MAAQhD,KAAK6C,I","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,g as r,h as a}from"./p-Dpmiv2da.js";import{c as i}from"./p-CBWjHURv.js";import{a as o}from"./p-C5CTp9IA.js";import{c as n}from"./p-CT54OXR2.js";import{n as s}from"./p-D9kEjsvZ.js";import{T as d}from"./p-C1iNEsnH.js";import{f as h,g as l}from"./p-DiJj8rmO.js";import"./p-ChV9xqsO.js";import"./p-BIwGgs9f.js";const m="*{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}.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-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-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-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-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}";const c=i(["flex gap-2","w-inherit","border-solid rounded-lg"],{variants:{variant:{read:"border-0 items-start flex-wrap hyphens-auto break-normal leading-6",write:"border px-2"},size:{sm:null,base:null},disabled:{false:null,true:null},focused:{false:null,true:null},error:{false:null,true:null},isTextarea:{false:null,true:"items-start"}},compoundVariants:[{size:"sm",variant:"write",isTextarea:false,class:"h-6"},{size:"base",variant:"write",isTextarea:false,class:"h-8"},{size:"sm",variant:"read",class:"min-h-4 text-xs"},{size:"base",variant:"read",class:"min-h-5 text-sm"},{variant:"write",focused:false,error:false,class:"border-storm-100 dark:border-hurricane-400"},{variant:"write",disabled:false,focused:true,error:false,class:"border-indigo-600 ring dark:ring-0 ring-indigo-100 selection:bg-indigo-500"},{variant:"write",disabled:false,class:"bg-white dark:bg-hurricane-500"},{variant:"write",disabled:true,class:"bg-white-600 dark:bg-hurricane-600 dark:border-hurricane-500 cursor-not-allowed"},{disabled:false,error:true,class:"border-negative-red-500"},{disabled:false,focused:true,error:true,class:"ring ring-negative-red-50 selection:bg-negative-red-50 dark:ring-0"}]});const p=i(["text-sm placeholder:text-sm placeholder:text-storm-500/40 dark:placeholder:text-hurricane-200","border-none bg-transparent flex-1 min-w-0 p-0","outline-none focus:outline-none","font-geist"],{variants:{isTextarea:{false:"h-full",true:"mt-1"},disabled:{false:null,true:"cursor-not-allowed"},error:{false:"text-storm-500 dark:text-white",true:"text-negative-red-500"}}});const w=i(["flex flex-shrink-0 justify-center items-center text-center"],{variants:{variant:{read:"leading-6",write:null},disabled:{false:null,true:"text-storm-100 dark:text-hurricane-400"},focused:{false:null,true:null},error:{false:null,true:null},isText:{false:null,true:"text-sm"},isTextarea:{false:null,true:"mt-2"}},compoundVariants:[{disabled:false,focused:false,error:false,class:"text-storm-300 dark:text-hurricane-300"},{disabled:false,focused:true,error:false,class:"text-storm-500 dark:text-white"},{disabled:false,focused:false,error:true,class:"text-negative-red-500"},{disabled:false,focused:true,error:true,class:"text-negative-red-800"}]});const f=class{constructor(r){t(this,r);this.valueChange=e(this,"valueChange",3);this.inputRefChange=e(this,"inputRefChange",7);this.add=e(this,"add",3);if(r.$hostElement$["s-ei"]){this._internals=r.$hostElement$["s-ei"]}else{this._internals=r.$hostElement$.attachInternals();r.$hostElement$["s-ei"]=this._internals}}align="start";variant="write";id;size="base";type="text";properties={};prefix;suffix;icon;iconFlip;iconRotate;iconPosition="start";value;label;loading=false;placeholder;helper;required=true;showOptional=true;showAddOnEmpty=false;addText="Add";autofocus=false;error;autoShowError=true;errorPlacement;disabled=false;focused=false;forceShowTooltip=false;selectAllOnFocus=true;focusMethod="focus";optionalTemplate;valueChange;inputRefChange;add;get _el(){return r(this)}_focused=false;_nonce=s(5);_internals;_inputRef;_lastValue;componentDidLoad(){this._checkAutoFocus()}formResetCallback(){this.value=null;this.valueChange.emit(null)}formDisabledCallback(t){if(!this._internals.form){return}this.disabled=t}render(){const{id:t,prefix:e,suffix:r,hasHeaderSlot:i,hasLabelSlot:s,hasHelperSlot:h,hasErrorSlot:l,hasValueSlot:m}=this._getSlotInfo();return a(d,{key:"6070034039c7877d3e1de5ded93f60159fccfa04"},a("p-field-container",{key:"68c3638db87c41fd5665547f45e8f2d51ee63b53",forceShowTooltip:!!this.error?.length&&!this._focused&&this.autoShowError||!!this.error?.length&&this.forceShowTooltip,id:t,label:this.label,align:this.align,loading:this.loading,loadingSize:this.size,helper:this.helper,error:this.error,required:this.required,showOptional:this.showOptional,variant:this.variant},s&&a("slot",{key:"8affa6f6debb6251390e13e1faeccf96a31bd648",name:"label",slot:"label"}),i&&a("slot",{key:"dee6f4e518607c82d6e524e3da8121e257865977",name:"header",slot:"header"}),h&&a("slot",{key:"4484e7e481039570af17f6d95c8658bac05e583e",name:"helper",slot:"helper"}),l&&a("slot",{key:"3301e280c6fe2be0353a9b83e1b898f88f69a2cd",name:"error",slot:"error"}),a("div",{key:"2f8830adf236fe127ce9f0c55c1781a50e5529b0",class:c({error:!!this.error?.length,disabled:o(this.disabled),focused:o(this.focused)||this._focused,size:this.size,variant:this.variant,isTextarea:this.type==="textarea"}),title:this.variant==="read"&&!m?`${this.value}`:undefined,slot:"content"},(this.error?.length||e||this.icon&&this.iconPosition==="start")&&a("div",{key:"6be4f7969b64a3e1a5df732205d9b290eb9c23b5",class:w({variant:this.variant,error:!!this.error?.length,disabled:o(this.disabled),focused:o(this.focused)||this._focused,isText:typeof r==="string",isTextarea:this.type==="textarea"}),onClick:()=>this._focusInput()},this.icon&&this.iconPosition==="start"||this.error?.length?a("p-icon",{class:n("flex",{"mt-1":this.variant==="read"&&this.size==="base"}),variant:this.error?.length?"warning":this.icon,rotate:this.iconRotate,flip:this.iconFlip}):e),this._getContent(m,t),(r||this.icon&&this.iconPosition==="end")&&a("div",{key:"c276c5883ee1eafdeda0d4db0b5e2ab30d02396d",class:w({variant:this.variant,error:!!this.error?.length,disabled:o(this.disabled),focused:o(this.focused)||this._focused,isText:typeof r==="string",isTextarea:this.type==="textarea"}),onClick:()=>this._focusInput()},this.icon&&this.iconPosition==="end"?a("p-icon",{class:n("flex",{"mt-1":this.variant==="read"&&this.size==="base"}),variant:this.icon,rotate:this.iconRotate,flip:this.iconFlip}):r))))}watchvalue(t){if(!this._inputRef){return}if(t===this._lastValue){return}this._lastValue=t;this._inputRef.value=t}handleFocusIn(){if(this.disabled){return}this._focused=true;this._selectAll()}handleFocusOut(){if(this.disabled){return}this._focused=false}handleKeyup(t){if(this.disabled){t.preventDefault();return}if(!this._internals?.form){return}if(this.type==="textarea"||t.key!=="Enter"){return}this._internals.form.requestSubmit()}_getSlotInfo(){const t=!!this._el.querySelector(':scope > [slot="helper"]');const e=!!this._el.querySelector(':scope > [slot="label"]');const r=!!this._el.querySelector(':scope > [slot="prefix"]');const i=!!this._el.querySelector(':scope > [slot="suffix"]');const o=!!this._el.querySelector(':scope > [slot="header"]');const n=!!this._el.querySelector(':scope > [slot="error"]');const s=!!this._el.querySelector(':scope > [slot="value"]');const d=r?a("slot",{name:"prefix"}):this.prefix;const h=i?a("slot",{name:"suffix"}):this.suffix;const l=this.error&&typeof this.error==="string"&&this.error!=="true";const m=this.id?.length?this.id:this._nonce;return{id:m,hasHelperSlot:t,hasLabelSlot:e,hasPrefixSlot:r,hasSuffixSlot:i,hasHeaderSlot:o,hasErrorSlot:n,hasValueSlot:s,prefix:d,suffix:h,errorAndErrorIsNotBoolean:l}}_getContent(t=false,e){if(this.variant==="read"){return t?a("slot",{name:"value"}):!!this.value&&`${this.value}`.length>0?this.value:this.showAddOnEmpty?a("p-button",{variant:"text",icon:"plus",size:"sm",onClick:()=>this.add.emit()},this.addText):"—"}if(this.type==="slot"){return a("slot",{name:"input"})}const r={id:e,class:p({disabled:o(this.disabled),isTextarea:this.type==="textarea",error:!!this.error?.length}),value:this.value,placeholder:this.placeholder,disabled:this.disabled,onInput:t=>this._valueChange(t)};let i=this.properties??{};if(typeof i==="string"){i=JSON.parse(this.properties)}if(this.type==="textarea"){return a("textarea",{ref:t=>this._setInputRef(t),...r,...i})}return a("input",{type:this.type,ref:t=>this._setInputRef(t),...r,...i})}_setInputRef(t){this._inputRef=t;this.inputRefChange.emit(t)}_focusInput(){if(this._inputRef){this._inputRef.focus();return}const t=this._el.querySelector(':scope > [slot="input"]');t[this.focusMethod]()}_selectAll(){if(!this._inputRef||!this.selectAllOnFocus){return}this._inputRef.select()}_valueChange(t){t.stopPropagation();const e=t.originalTarget??t.target;const r=e.value;this._lastValue=r;this.value=r;this.valueChange.emit(r);this._internals.setFormValue(e.value)}_checkAutoFocus(){if(!this.autofocus){return}if(!this._inputRef){setTimeout((()=>this._checkAutoFocus()),100);return}this._focusInput()}static get formAssociated(){return true}static get watchers(){return{value:["watchvalue"]}}};f.style=m;const b="*{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}";const x=i(["rounded-lg w-full"],{variants:{variant:{read:null,write:null},size:{base:null,sm:null}},compoundVariants:[{variant:"read",size:"base",class:"h-5"},{variant:"read",size:"sm",class:"h-4"},{variant:"write",size:"base",class:"h-8"},{variant:"write",size:"sm",class:"h-6"}]});const g=class{constructor(r){t(this,r);this.focus=e(this,"focus",7)}_defaultOptionalTemplate=()=>h(this._locales.optional);id;align="start";label;loading=false;loadingSize="base";variant;helper;required;showOptional=true;error;errorPlacement;forceShowTooltip=false;optionalTemplate=this._defaultOptionalTemplate;get _el(){return r(this)}focus;_locales={};componentWillLoad(){this._setLocales()}render(){const{hasHeaderSlot:t,hasErrorSlot:e,helper:r,label:i,errorAndErrorIsNotBoolean:s}=this._getSlotInfo();let h=a("slot",{key:"6db4734d0a8f69e4952904880813ec931c45e877",slot:"trigger",name:"content"});if(this.loading){h=a("p-loader",{key:"07f963ba944d8eb1c0e751fed55898dbd7c77ae2",variant:"ghost",class:x({variant:this.variant,size:this.loadingSize}),slot:"trigger"})}return a(d,{key:"0c01066b6835e30c5e5076486cbb43039f05eb8c"},a("label",{key:"b54558388e3bb77517bd4d5c73cf5d222c50e3c3",htmlFor:this.id,class:n("flex w-inherit flex-col gap-1",{"cursor-auto":this.variant==="read"})},a("div",{key:"68f1096a9b8f0e815e4771b9e40bcb4c9f4d8c96",class:n("flex items-end justify-between gap-1 empty:hidden",{"flex-row-reverse":this.align==="end"})},(!!i?.length||!!r?.length)&&a("div",{key:"4cfbcdea3f80c568d141112f305231c5313e3ddc",class:"flex min-w-0 gap-2",onClick:()=>this.focus.emit()},a("span",{key:"abd3f6c3f88a561e88cbc5bf146710dc634dd811",class:"min-w-0 overflow-hidden text-ellipsis text-xs font-medium text-storm-300 dark:text-hurricane-200"},i),r&&a("p-helper",{key:"2c451541c089dbff670c04f1d383c7afef7a76e6",class:"flex flex-shrink-0",placement:"top"},r)),(!o(this.required)&&o(this.showOptional)||t)&&a("div",{key:"0f63624491b2b81997c5954c98ad8009b10837fb",class:"flex items-center gap-1"},!o(this.required)&&o(this.showOptional)&&this.variant==="write"&&a("span",{key:"438271d7bed566b2c5b26e91d1cfe1101937cef4",class:"text-xs font-medium text-storm-200 dark:text-hurricane-300"},this.optionalTemplate()),t&&a("slot",{key:"d7be494f035a0e15b97d368a2f08934775446608",name:"header"}))),a("p-tooltip",{key:"733c671023a88cef98e3f957f02acb7368147c83",class:n({"w-full":this.variant==="write"||this.loading,"ml-auto":this.align==="end","font-normal":this.variant==="read","text-storm-500 dark:text-white":this.variant==="read"}),variant:"error",content:this.error,show:s&&o(this.forceShowTooltip,false),enableUserInput:false,placement:this.errorPlacement},e&&a("slot",{key:"6440f0359c94e69cc632a85087008439be6ad5c9",name:"error",slot:"content"}),h)))}async _setLocales(){this._locales=await l(this._el)}_getSlotInfo(){const t=!!this._el.querySelector(':scope > [slot="helper"]');const e=!!this._el.querySelector(':scope > [slot="label"]');const r=!!this._el.querySelector(':scope > [slot="header"]');const i=!!this._el.querySelector(':scope > [slot="error"]');const o=t?a("slot",{name:"helper"}):this.helper;const n=e?a("slot",{name:"label"}):this.label;const s=i||this.error&&typeof this.error==="string"&&this.error!=="true";return{hasHelperSlot:t,hasLabelSlot:e,hasHeaderSlot:r,hasErrorSlot:i,helper:o,label:n,errorAndErrorIsNotBoolean:s}}};g.style=b;export{f as p_field,g as p_field_container};
|
|
2
|
-
//# sourceMappingURL=p-8130400b.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["fieldComponentCss","field","cva","variants","variant","read","write","size","sm","base","disabled","false","true","focused","error","isTextarea","compoundVariants","class","input","prefixAndSuffix","isText","Field","align","id","type","properties","prefix","suffix","icon","iconFlip","iconRotate","iconPosition","value","label","loading","placeholder","helper","required","showOptional","showAddOnEmpty","addText","autofocus","autoShowError","errorPlacement","forceShowTooltip","selectAllOnFocus","focusMethod","optionalTemplate","valueChange","inputRefChange","add","_focused","_nonce","nonce","_internals","_inputRef","_lastValue","componentDidLoad","this","_checkAutoFocus","formResetCallback","emit","formDisabledCallback","form","render","hasHeaderSlot","hasLabelSlot","hasHelperSlot","hasErrorSlot","hasValueSlot","_getSlotInfo","h","ThemedHost","key","length","loadingSize","name","slot","asBoolean","title","undefined","onClick","_focusInput","cn","rotate","flip","_getContent","watchvalue","handleFocusIn","_selectAll","handleFocusOut","handleKeyup","ev","preventDefault","requestSubmit","_el","querySelector","hasPrefixSlot","hasSuffixSlot","errorAndErrorIsNotBoolean","props","onInput","_valueChange","JSON","parse","ref","_setInputRef","focus","select","stopPropagation","target","originalTarget","setFormValue","setTimeout","fieldContainerComponentCss","loader","FieldContainer","_defaultOptionalTemplate","formatTranslation","_locales","optional","componentWillLoad","_setLocales","contentSlot","htmlFor","placement","content","show","enableUserInput","getLocaleComponentStrings"],"sources":["src/components/molecules/field/field/field.component.css?tag=p-field&encapsulation=shadow","src/components/molecules/field/field/field.component.tsx","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":[":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(['flex gap-2', 'w-inherit', 'border-solid rounded-lg'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tread: 'border-0 items-start flex-wrap hyphens-auto break-normal leading-6',\n\t\t\twrite: 'border px-2',\n\t\t},\n\t\tsize: {\n\t\t\tsm: null,\n\t\t\tbase: null,\n\t\t},\n\t\tdisabled: {\n\t\t\tfalse: null,\n\t\t\ttrue: null,\n\t\t},\n\t\tfocused: {\n\t\t\tfalse: null,\n\t\t\ttrue: null,\n\t\t},\n\t\terror: {\n\t\t\tfalse: null,\n\t\t\ttrue: null,\n\t\t},\n\t\tisTextarea: {\n\t\t\tfalse: null,\n\t\t\ttrue: 'items-start',\n\t\t},\n\t},\n\tcompoundVariants: [\n\t\t{\n\t\t\tsize: 'sm',\n\t\t\tvariant: 'write',\n\t\t\tisTextarea: false,\n\t\t\tclass: 'h-6',\n\t\t},\n\t\t{\n\t\t\tsize: 'base',\n\t\t\tvariant: 'write',\n\t\t\tisTextarea: false,\n\t\t\tclass: 'h-8',\n\t\t},\n\n\t\t{\n\t\t\tsize: 'sm',\n\t\t\tvariant: 'read',\n\t\t\tclass: 'min-h-4 text-xs',\n\t\t},\n\t\t{\n\t\t\tsize: 'base',\n\t\t\tvariant: 'read',\n\t\t\tclass: 'min-h-5 text-sm',\n\t\t},\n\n\t\t{\n\t\t\tvariant: 'write',\n\t\t\tfocused: false,\n\t\t\terror: false,\n\t\t\tclass: 'border-storm-100 dark:border-hurricane-400',\n\t\t},\n\t\t{\n\t\t\tvariant: 'write',\n\t\t\tdisabled: false,\n\t\t\tfocused: true,\n\t\t\terror: false,\n\t\t\tclass:\n\t\t\t\t'border-indigo-600 ring dark:ring-0 ring-indigo-100 selection:bg-indigo-500',\n\t\t},\n\n\t\t{\n\t\t\tvariant: 'write',\n\t\t\tdisabled: false,\n\t\t\tclass: 'bg-white dark:bg-hurricane-500',\n\t\t},\n\t\t{\n\t\t\tvariant: 'write',\n\t\t\tdisabled: true,\n\t\t\tclass:\n\t\t\t\t'bg-white-600 dark:bg-hurricane-600 dark:border-hurricane-500 cursor-not-allowed',\n\t\t},\n\n\t\t{\n\t\t\tdisabled: false,\n\t\t\terror: true,\n\t\t\tclass: 'border-negative-red-500',\n\t\t},\n\t\t{\n\t\t\tdisabled: false,\n\t\t\tfocused: true,\n\t\t\terror: true,\n\t\t\tclass:\n\t\t\t\t'ring ring-negative-red-50 selection:bg-negative-red-50 dark:ring-0',\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-300',\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",null,"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"],"mappings":"wUAAA,MAAMA,EAAoB,iwQC0B1B,MAAMC,EAAQC,EAAI,CAAC,aAAc,YAAa,2BAA4B,CACzEC,SAAU,CACTC,QAAS,CACRC,KAAM,qEACNC,MAAO,eAERC,KAAM,CACLC,GAAI,KACJC,KAAM,MAEPC,SAAU,CACTC,MAAO,KACPC,KAAM,MAEPC,QAAS,CACRF,MAAO,KACPC,KAAM,MAEPE,MAAO,CACNH,MAAO,KACPC,KAAM,MAEPG,WAAY,CACXJ,MAAO,KACPC,KAAM,gBAGRI,iBAAkB,CACjB,CACCT,KAAM,KACNH,QAAS,QACTW,WAAY,MACZE,MAAO,OAER,CACCV,KAAM,OACNH,QAAS,QACTW,WAAY,MACZE,MAAO,OAGR,CACCV,KAAM,KACNH,QAAS,OACTa,MAAO,mBAER,CACCV,KAAM,OACNH,QAAS,OACTa,MAAO,mBAGR,CACCb,QAAS,QACTS,QAAS,MACTC,MAAO,MACPG,MAAO,8CAER,CACCb,QAAS,QACTM,SAAU,MACVG,QAAS,KACTC,MAAO,MACPG,MACC,8EAGF,CACCb,QAAS,QACTM,SAAU,MACVO,MAAO,kCAER,CACCb,QAAS,QACTM,SAAU,KACVO,MACC,mFAGF,CACCP,SAAU,MACVI,MAAO,KACPG,MAAO,2BAER,CACCP,SAAU,MACVG,QAAS,KACTC,MAAO,KACPG,MACC,yEAKJ,MAAMC,EAAQhB,EACb,CACC,gGACA,iDACA,kCACA,cAED,CACCC,SAAU,CACTY,WAAY,CACXJ,MAAO,SACPC,KAAM,QAEPF,SAAU,CACT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CAG9C,YAAAzB,GACP,MAAMH,IAAkBT,KAAKqC,IAAIC,cAAc,4BAC/C,MAAM9B,IAAiBR,KAAKqC,IAAIC,cAAc,2BAC9C,MAAM/B,IAAkBP,KAAKqC,IAAIC,cAAc,4BAC/C,MAAM5B,IAAiBV,KAAKqC,IAAIC,cAAc,2BAE9C,MAAM5D,EAAS+B,EAAgBI,EAAM,QAAAK,KAAK,WAAclB,KAAKtB,OAC7D,MAAMH,EAAQiC,EAAeK,EAAM,QAAAK,KAAK,UAAalB,KAAKzB,MAE1D,MAAMkE,EACL/B,GACCV,KAAK5C,cAAgB4C,KAAK5C,QAAU,UAAY4C,KAAK5C,QAAU,OAEjE,MAAO,CACNqD,gBACAD,eACAD,gBACAG,eACAhC,SACAH,QACAkE,4B","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as t}from"./p-CBWjHURv.js";function e(t,e){return e in t}const n=(t,e)=>{const n=t?r(t,e):{};return{"flex flex-shrink items-center gap-4":true,"justify-start":!t?.align||t?.align==="start","justify-center":t?.align==="center","justify-end":t?.align==="end","font-semibold":e!=="header"&&t?.variant==="subject","text-storm-400 dark:text-hurricane-200":e==="header","text-storm-300 dark:text-hurricane-200":e!=="header"&&t?.variant!=="subject"&&t?.variant!=="highlight","text-storm-500 dark:text-white":e!=="header"&&(t?.variant==="subject"||t?.variant==="highlight"),...n}};const r=({sizes:t},n)=>{if(t==="auto"||!t){return{"w-auto":true}}if(t==="hidden"){return{hidden:true}}if(typeof t==="object"){t=t;const r={};let i;for(let u in t){if(!e(t,u)){continue}if(u==="default"){if(t.default==="hidden"){r["hidden"]=true;i=u;continue}r[`w-${t.default}/12`]=true;i=u;continue}const o=t[u];const s=i?t[i]:null;if(o!=="hidden"&&s&&s==="hidden"&&n!=="actions"){r[`${u}:flex`]=true}if(o==="hidden"&&n!=="actions"){r[`${u}:hidden`]=true;i=u;continue}if(o===12||o==="full"){r[`${u}:w-full`]=true}r[`${u}:w-${o}/12`]=true;i=u}return r}if(t===12||t==="full"){return{"w-full":true}}return{[`w-${t}/12`]:true}};const i=t(["sticky self-center"],{variants:{hasFooter:{true:"mt-4 -mb-5 bottom-11 z-[3]",false:"my-4 bottom-0"},active:{false:"pointer-events-none animate-floating-menu-container-out",true:"animate-floating-menu-container-in"},shown:{false:"hidden",true:"inline-block"}}});export{r as a,i as f,n as g,e as i};
|
|
2
|
-
//# sourceMappingURL=p-CWwnpT8r.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"p-CWwnpT8r.js","sources":["src/types/table.ts","src/utils/table-helpers.ts"],"sourcesContent":["export type QuickFilterTextFunction = () => string;\n\nexport interface QuickFilter {\n\tidentifier: string;\n\ttext: string | QuickFilterTextFunction;\n\tcount?: number;\n\tdefault?: boolean;\n}\n\nexport interface RowClickEvent {\n\titem: any;\n\tctrlDown: boolean;\n}\n\nexport interface TableDefinitionData {\n\tvalue: any;\n\titem: any;\n\tindex: number;\n\trowIndex: number;\n}\n\nexport type TableDefinitionTemplateFunc = (data: TableDefinitionData) => any;\n\nexport interface TableColumnSizes {\n\tdefault: number | 'hidden' | 'full';\n\ttablet?: number | 'hidden' | 'full';\n\t'desktop-xs'?: number | 'hidden' | 'full';\n\t'desktop-sm'?: number | 'hidden' | 'full';\n\tdesktop?: number | 'hidden' | 'full';\n\t'desktop-lg'?: number | 'hidden' | 'full';\n\t'desktop-xl'?: number | 'hidden' | 'full';\n}\n\nexport type TableColumnSizesKey =\n\t| 'default'\n\t| 'tablet'\n\t| 'desktop-xs'\n\t| 'desktop-sm'\n\t| 'desktop'\n\t| 'desktop-lg'\n\t| 'desktop-xl';\n\nexport function isTableColumnSizesKey(\n\tx: TableColumnSizes,\n\tk: PropertyKey\n): k is keyof TableColumnSizes {\n\treturn k in x;\n}\n","import { cva } from 'class-variance-authority';\nimport { TableColumn } from '../components/helpers/table/column/table-column.component';\nimport {\n\tisTableColumnSizesKey,\n\tTableColumnSizes,\n\tTableColumnSizesKey,\n} from '../types';\n\nexport const getTableCellColumnClasses = (\n\tdefinition: any | TableColumn,\n\tvariant: 'default' | 'header' | 'loading'\n) => {\n\tconst sizes = definition ? getTableCellSizes(definition, variant) : {};\n\n\treturn {\n\t\t'flex flex-shrink items-center gap-4': true,\n\t\t'justify-start': !definition?.align || definition?.align === 'start',\n\t\t'justify-center': definition?.align === 'center',\n\t\t'justify-end': definition?.align === 'end',\n\t\t'font-semibold': variant !== 'header' && definition?.variant === 'subject',\n\t\t'text-storm-400 dark:text-hurricane-200': variant === 'header',\n\t\t'text-storm-300 dark:text-hurricane-200':\n\t\t\tvariant !== 'header' &&\n\t\t\tdefinition?.variant !== 'subject' &&\n\t\t\tdefinition?.variant !== 'highlight',\n\t\t'text-storm-500 dark:text-white':\n\t\t\tvariant !== 'header' &&\n\t\t\t(definition?.variant === 'subject' ||\n\t\t\t\tdefinition?.variant === 'highlight'),\n\t\t...sizes,\n\t};\n};\n\nexport const getTableCellSizes = (\n\t{\n\t\tsizes,\n\t}: {\n\t\tsizes: 'auto' | 'hidden' | 'full' | number | TableColumnSizes;\n\t} /* Table Definition */,\n\tvariant: 'default' | 'header' | 'loading' | 'actions'\n) => {\n\tif (sizes === 'auto' || !sizes) {\n\t\treturn {\n\t\t\t'w-auto': true,\n\t\t};\n\t}\n\n\tif (sizes === 'hidden') {\n\t\treturn {\n\t\t\thidden: true,\n\t\t};\n\t}\n\n\tif (typeof sizes === 'object') {\n\t\tsizes = sizes as TableColumnSizes;\n\t\tconst classes: any = {};\n\t\tlet previousSize: TableColumnSizesKey | undefined;\n\n\t\tfor (let size in sizes) {\n\t\t\tif (!isTableColumnSizesKey(sizes, size)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (size === 'default') {\n\t\t\t\tif (sizes.default === 'hidden') {\n\t\t\t\t\tclasses['hidden'] = true;\n\t\t\t\t\tpreviousSize = size;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tclasses[`w-${sizes.default}/12`] = true;\n\t\t\t\tpreviousSize = size;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst currentValue = sizes[size];\n\t\t\tconst previousValue = previousSize ? sizes[previousSize] : null;\n\t\t\tif (\n\t\t\t\tcurrentValue !== 'hidden' &&\n\t\t\t\tpreviousValue &&\n\t\t\t\tpreviousValue === 'hidden' &&\n\t\t\t\tvariant !== 'actions'\n\t\t\t) {\n\t\t\t\tclasses[`${size}:flex`] = true;\n\t\t\t}\n\n\t\t\tif (currentValue === 'hidden' && variant !== 'actions') {\n\t\t\t\tclasses[`${size}:hidden`] = true;\n\t\t\t\tpreviousSize = size;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (currentValue === 12 || currentValue === 'full') {\n\t\t\t\tclasses[`${size}:w-full`] = true;\n\t\t\t}\n\n\t\t\tclasses[`${size}:w-${currentValue}/12`] = true;\n\t\t\tpreviousSize = size;\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tif (sizes === 12 || sizes === 'full') {\n\t\treturn {\n\t\t\t'w-full': true,\n\t\t};\n\t}\n\n\t// is a number.\n\treturn {\n\t\t[`w-${sizes}/12`]: true,\n\t};\n};\n\nexport const floatingMenuContainerClass = cva(['sticky self-center'], {\n\tvariants: {\n\t\thasFooter: {\n\t\t\ttrue: 'mt-4 -mb-5 bottom-11 z-[3]',\n\t\t\tfalse: 'my-4 bottom-0',\n\t\t},\n\t\tactive: {\n\t\t\tfalse: 'pointer-events-none animate-floating-menu-container-out',\n\t\t\ttrue: 'animate-floating-menu-container-in',\n\t\t},\n\t\tshown: {\n\t\t\tfalse: 'hidden',\n\t\t\ttrue: 'inline-block',\n\t\t},\n\t},\n});\n"],"names":[],"mappings":";;AA0CgB,SAAA,qBAAqB,CACpC,CAAmB,EACnB,CAAc,EAAA;IAEd,OAAO,CAAC,IAAI,CAAC;AACd;;MCvCa,yBAAyB,GAAG,CACxC,UAA6B,EAC7B,OAAyC,KACtC;AACH,IAAA,MAAM,KAAK,G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