@masterteam/components 0.0.29 → 0.0.31
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/assets/common.css +1 -1
- package/dialog/index.d.ts +1 -3
- package/dynamic-drawer/index.d.ts +52 -0
- package/fesm2022/masterteam-components-dialog.mjs +4 -5
- package/fesm2022/masterteam-components-dialog.mjs.map +1 -1
- package/fesm2022/masterteam-components-drawer.mjs +2 -2
- package/fesm2022/masterteam-components-drawer.mjs.map +1 -1
- package/fesm2022/masterteam-components-dynamic-drawer.mjs +172 -0
- package/fesm2022/masterteam-components-dynamic-drawer.mjs.map +1 -0
- package/fesm2022/masterteam-components-menu.mjs +49 -20
- package/fesm2022/masterteam-components-menu.mjs.map +1 -1
- package/fesm2022/masterteam-components-modal.mjs +50 -0
- package/fesm2022/masterteam-components-modal.mjs.map +1 -0
- package/menu/index.d.ts +9 -7
- package/modal/index.d.ts +18 -0
- package/package.json +61 -53
package/assets/common.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */
|
|
2
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-green-50:oklch(98.2% .018 155.826);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-blue-50:oklch(97% .014 254.604);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height:calc(1.5/1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-medium:500;--font-weight-semibold:600;--tracking-wider:.05em;--radius-md:.375rem;--radius-lg:.5rem;--radius-2xl:1rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components{label.required:after{content:"*";color:var(--p-red-500);padding-inline-start:2px}.dark label.required:after{color:var(--p-red-600)}}@layer utilities{.\@container{container-type:inline-size}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.static{position:static}.top-1\/2{top:50%}.top-full{top:100%}.right-0{right:calc(var(--spacing)*0)}.right-3{right:calc(var(--spacing)*3)}.z-10{z-index:10}.order-1{order:1}.col-span-6{grid-column:span 6/span 6}.m-0{margin:calc(var(--spacing)*0)}.ms-2{margin-inline-start:calc(var(--spacing)*2)}.mt-2{margin-top:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.table{display:table}.size-full{width:100%;height:100%}.h-full{height:100%}.w-12{width:calc(var(--spacing)*12)}.w-72{width:calc(var(--spacing)*72)}.w-full{width:100%}.min-w-full{min-width:100%}.flex-1{flex:1}.grow{flex-grow:1}.table-fixed{table-layout:fixed}.origin-top-right{transform-origin:100% 0}.-translate-y-1\/2{--tw-translate-y:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-5{gap:calc(var(--spacing)*5)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-gray-200>:not(:last-child)){border-color:var(--color-gray-200)}.overflow-x-auto{overflow-x:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-b-md{border-bottom-right-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.border,.border-1{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\(--p-content-border-color\){border-color:var(--p-content-border-color)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-500{border-color:var(--color-gray-500)}.border-primary-400{border-color:var(--p-primary-400)}@supports (color:color-mix(in lab, red, red)){.border-primary-400{border-color:color-mix(in srgb,var(--p-primary-400)calc(100%*1),transparent)}}.border-surface{border-color:var(--p-content-border-color)}.border-surface-200{border-color:var(--p-surface-200)}@supports (color:color-mix(in lab, red, red)){.border-surface-200{border-color:color-mix(in srgb,var(--p-surface-200)calc(100%*1),transparent)}}.border-surface-300{border-color:var(--p-surface-300)}@supports (color:color-mix(in lab, red, red)){.border-surface-300{border-color:color-mix(in srgb,var(--p-surface-300)calc(100%*1),transparent)}}.\!bg-white{background-color:var(--color-white)!important}.bg-content{background-color:var(--p-content-background)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-primary-50{background-color:var(--p-primary-50)}@supports (color:color-mix(in lab, red, red)){.bg-primary-50{background-color:color-mix(in srgb,var(--p-primary-50)calc(100%*1),transparent)}}.bg-surface-50{background-color:var(--p-surface-50)}@supports (color:color-mix(in lab, red, red)){.bg-surface-50{background-color:color-mix(in srgb,var(--p-surface-50)calc(100%*1),transparent)}}.bg-white{background-color:var(--color-white)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-8{padding:calc(var(--spacing)*8)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.py-5{padding-block:calc(var(--spacing)*5)}.text-center{text-align:center}.text-end{text-align:end}.text-right{text-align:right}.text-start{text-align:start}.align-middle{vertical-align:middle}.align-super\!{vertical-align:super!important}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[\.95rem\]{font-size:.95rem}.leading-none{--tw-leading:1;line-height:1}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-blue-600{color:var(--color-blue-600)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-green-600{color:var(--color-green-600)}.text-muted-color{color:var(--p-text-muted-color)}.text-primary-400{color:var(--p-primary-400)}@supports (color:color-mix(in lab, red, red)){.text-primary-400{color:color-mix(in srgb,var(--p-primary-400)calc(100%*1),transparent)}}.text-purple-600{color:var(--color-purple-600)}.text-red-600{color:var(--color-red-600)}.text-surface-500{color:var(--p-surface-500)}@supports (color:color-mix(in lab, red, red)){.text-surface-500{color:color-mix(in srgb,var(--p-surface-500)calc(100%*1),transparent)}}.text-yellow-600{color:var(--color-yellow-600)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.opacity-50{opacity:.5}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-black{--tw-ring-color:var(--color-black)}.ring-primary-200{--tw-ring-color:var(--p-primary-200)}@supports (color:color-mix(in lab, red, red)){.ring-primary-200{--tw-ring-color:color-mix(in srgb,var(--p-primary-200)calc(100%*1),transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}@media (hover:hover){.hover\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-green-50:hover{background-color:var(--color-green-50)}.hover\:bg-purple-50:hover{background-color:var(--color-purple-50)}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:bg-yellow-50:hover{background-color:var(--color-yellow-50)}.hover\:text-blue-700:hover{color:var(--color-blue-700)}.hover\:text-gray-600:hover{color:var(--color-gray-600)}.hover\:text-gray-700:hover{color:var(--color-gray-700)}.hover\:text-green-700:hover{color:var(--color-green-700)}.hover\:text-purple-700:hover{color:var(--color-purple-700)}.hover\:text-red-700:hover{color:var(--color-red-700)}.hover\:text-yellow-700:hover{color:var(--color-yellow-700)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}@container (min-width:28rem){.\@md\:col-span-3{grid-column:span 3/span 3}}@container (min-width:42rem){.\@2xl\:col-span-2{grid-column:span 2/span 2}}.dark\:border-surface-500:where(.dark,.dark *){border-color:var(--p-surface-500)}@supports (color:color-mix(in lab, red, red)){.dark\:border-surface-500:where(.dark,.dark *){border-color:color-mix(in srgb,var(--p-surface-500)calc(100%*1),transparent)}}.dark\:bg-primary-800:where(.dark,.dark *){background-color:var(--p-primary-800)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-primary-800:where(.dark,.dark *){background-color:color-mix(in srgb,var(--p-primary-800)calc(100%*1),transparent)}}.dark\:bg-surface-950:where(.dark,.dark *){background-color:var(--p-surface-950)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-surface-950:where(.dark,.dark *){background-color:color-mix(in srgb,var(--p-surface-950)calc(100%*1),transparent)}}.dark\:text-gray-50:where(.dark,.dark *){color:var(--color-gray-50)}.dark\:text-gray-100:where(.dark,.dark *){color:var(--color-gray-100)}.dark\:text-gray-200:where(.dark,.dark *){color:var(--color-gray-200)}@media (hover:hover){.dark\:hover\:bg-gray-800:where(.dark,.dark *):hover{background-color:var(--color-gray-800)}.dark\:hover\:bg-surface-950:where(.dark,.dark *):hover{background-color:var(--p-surface-950)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-surface-950:where(.dark,.dark *):hover{background-color:color-mix(in srgb,var(--p-surface-950)calc(100%*1),transparent)}}.dark\:hover\:text-gray-100:where(.dark,.dark *):hover{color:var(--color-gray-100)}}}:root{--app-background:var(--p-surface-100)}:root[class=dark]{--app-background:var(--p-surface-950)}body{background-color:var(--app-background)}.mt-dialog .p-dialog-header{background-color:var(--p-surface-100);border-radius:.75rem .75rem 0 0;padding:1rem 1.25rem}.mt-dialog .p-dialog-header .p-dialog-header-actions .p-dialog-close-button{background-color:#fff;border-radius:.3rem;justify-content:center;width:2rem;height:2rem}.mt-dialog .p-dialog-content{border-radius:.8rem;height:100%;overflow-y:hidden}.mt-dialog .p-dialog-content .mt-dialog-content{height:100%;padding-bottom:5rem;overflow:auto}.mt-dialog .p-dialog-content .mt-dialog-footer{background-color:var(--p-surface-100);justify-content:end;gap:10px;padding:.8rem 1.25rem;display:flex;position:sticky;bottom:0}.custom-drawer .p-drawer-header,.custom-drawer .p-drawer-content,.custom-drawer .p-drawer-footer{padding:0}@keyframes enter{0%{opacity:var(--p-enter-opacity,1);transform:translate3d(var(--p-enter-translate-x,0),var(--p-enter-translate-y,0),0)scale3d(var(--p-enter-scale,1),var(--p-enter-scale,1),var(--p-enter-scale,1))rotate(var(--p-enter-rotate,0))}}@keyframes leave{to{opacity:var(--p-leave-opacity,1);transform:translate3d(var(--p-leave-translate-x,0),var(--p-leave-translate-y,0),0)scale3d(var(--p-leave-scale,1),var(--p-leave-scale,1),var(--p-leave-scale,1))rotate(var(--p-leave-rotate,0))}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-green-50:oklch(98.2% .018 155.826);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-blue-50:oklch(97% .014 254.604);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height:calc(1.5/1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-medium:500;--font-weight-semibold:600;--tracking-wider:.05em;--radius-md:.375rem;--radius-lg:.5rem;--radius-2xl:1rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components{label.required:after{content:"*";color:var(--p-red-500);padding-inline-start:2px}.dark label.required:after{color:var(--p-red-600)}}@layer utilities{.\@container{container-type:inline-size}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.static{position:static}.top-1\/2{top:50%}.top-full{top:100%}.right-0{right:calc(var(--spacing)*0)}.right-3{right:calc(var(--spacing)*3)}.z-10{z-index:10}.order-1{order:1}.col-span-6{grid-column:span 6/span 6}.m-0{margin:calc(var(--spacing)*0)}.ms-2{margin-inline-start:calc(var(--spacing)*2)}.mt-2{margin-top:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.table{display:table}.size-full{width:100%;height:100%}.h-full{height:100%}.w-12{width:calc(var(--spacing)*12)}.w-72{width:calc(var(--spacing)*72)}.w-full{width:100%}.min-w-full{min-width:100%}.flex-1{flex:1}.grow{flex-grow:1}.table-fixed{table-layout:fixed}.origin-top-right{transform-origin:100% 0}.-translate-y-1\/2{--tw-translate-y:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-5{gap:calc(var(--spacing)*5)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-gray-200>:not(:last-child)){border-color:var(--color-gray-200)}.overflow-x-auto{overflow-x:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-b-md{border-bottom-right-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.border,.border-1{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\(--p-content-border-color\){border-color:var(--p-content-border-color)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-500{border-color:var(--color-gray-500)}.border-primary-400{border-color:var(--p-primary-400)}@supports (color:color-mix(in lab, red, red)){.border-primary-400{border-color:color-mix(in srgb,var(--p-primary-400)calc(100%*1),transparent)}}.border-surface{border-color:var(--p-content-border-color)}.border-surface-200{border-color:var(--p-surface-200)}@supports (color:color-mix(in lab, red, red)){.border-surface-200{border-color:color-mix(in srgb,var(--p-surface-200)calc(100%*1),transparent)}}.border-surface-300{border-color:var(--p-surface-300)}@supports (color:color-mix(in lab, red, red)){.border-surface-300{border-color:color-mix(in srgb,var(--p-surface-300)calc(100%*1),transparent)}}.\!bg-white{background-color:var(--color-white)!important}.bg-content{background-color:var(--p-content-background)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-primary-50{background-color:var(--p-primary-50)}@supports (color:color-mix(in lab, red, red)){.bg-primary-50{background-color:color-mix(in srgb,var(--p-primary-50)calc(100%*1),transparent)}}.bg-surface-50{background-color:var(--p-surface-50)}@supports (color:color-mix(in lab, red, red)){.bg-surface-50{background-color:color-mix(in srgb,var(--p-surface-50)calc(100%*1),transparent)}}.bg-white{background-color:var(--color-white)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-8{padding:calc(var(--spacing)*8)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.py-5{padding-block:calc(var(--spacing)*5)}.text-center{text-align:center}.text-end{text-align:end}.text-right{text-align:right}.text-start{text-align:start}.align-middle{vertical-align:middle}.align-super\!{vertical-align:super!important}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[\.95rem\]{font-size:.95rem}.leading-none{--tw-leading:1;line-height:1}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-blue-600{color:var(--color-blue-600)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-green-600{color:var(--color-green-600)}.text-muted-color{color:var(--p-text-muted-color)}.text-primary-400{color:var(--p-primary-400)}@supports (color:color-mix(in lab, red, red)){.text-primary-400{color:color-mix(in srgb,var(--p-primary-400)calc(100%*1),transparent)}}.text-primary-700{color:var(--p-primary-700)}@supports (color:color-mix(in lab, red, red)){.text-primary-700{color:color-mix(in srgb,var(--p-primary-700)calc(100%*1),transparent)}}.text-purple-600{color:var(--color-purple-600)}.text-red-600{color:var(--color-red-600)}.text-surface-500{color:var(--p-surface-500)}@supports (color:color-mix(in lab, red, red)){.text-surface-500{color:color-mix(in srgb,var(--p-surface-500)calc(100%*1),transparent)}}.text-yellow-600{color:var(--color-yellow-600)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.opacity-50{opacity:.5}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-black{--tw-ring-color:var(--color-black)}.ring-primary-200{--tw-ring-color:var(--p-primary-200)}@supports (color:color-mix(in lab, red, red)){.ring-primary-200{--tw-ring-color:color-mix(in srgb,var(--p-primary-200)calc(100%*1),transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}@media (hover:hover){.hover\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-green-50:hover{background-color:var(--color-green-50)}.hover\:bg-purple-50:hover{background-color:var(--color-purple-50)}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:bg-yellow-50:hover{background-color:var(--color-yellow-50)}.hover\:text-blue-700:hover{color:var(--color-blue-700)}.hover\:text-gray-600:hover{color:var(--color-gray-600)}.hover\:text-gray-700:hover{color:var(--color-gray-700)}.hover\:text-green-700:hover{color:var(--color-green-700)}.hover\:text-purple-700:hover{color:var(--color-purple-700)}.hover\:text-red-700:hover{color:var(--color-red-700)}.hover\:text-yellow-700:hover{color:var(--color-yellow-700)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}@container (min-width:28rem){.\@md\:col-span-3{grid-column:span 3/span 3}}@container (min-width:42rem){.\@2xl\:col-span-2{grid-column:span 2/span 2}}.dark\:border-surface-500:where(.dark,.dark *){border-color:var(--p-surface-500)}@supports (color:color-mix(in lab, red, red)){.dark\:border-surface-500:where(.dark,.dark *){border-color:color-mix(in srgb,var(--p-surface-500)calc(100%*1),transparent)}}.dark\:bg-primary-800:where(.dark,.dark *){background-color:var(--p-primary-800)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-primary-800:where(.dark,.dark *){background-color:color-mix(in srgb,var(--p-primary-800)calc(100%*1),transparent)}}.dark\:bg-primary-900\/20:where(.dark,.dark *){background-color:var(--p-primary-900)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-primary-900\/20:where(.dark,.dark *){background-color:color-mix(in oklab,color-mix(in srgb,var(--p-primary-900)calc(100%*1),transparent)20%,transparent)}}.dark\:bg-surface-950:where(.dark,.dark *){background-color:var(--p-surface-950)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-surface-950:where(.dark,.dark *){background-color:color-mix(in srgb,var(--p-surface-950)calc(100%*1),transparent)}}.dark\:text-gray-50:where(.dark,.dark *){color:var(--color-gray-50)}.dark\:text-gray-100:where(.dark,.dark *){color:var(--color-gray-100)}.dark\:text-gray-200:where(.dark,.dark *){color:var(--color-gray-200)}.dark\:text-primary-300:where(.dark,.dark *){color:var(--p-primary-300)}@supports (color:color-mix(in lab, red, red)){.dark\:text-primary-300:where(.dark,.dark *){color:color-mix(in srgb,var(--p-primary-300)calc(100%*1),transparent)}}@media (hover:hover){.dark\:hover\:bg-gray-800:where(.dark,.dark *):hover{background-color:var(--color-gray-800)}.dark\:hover\:bg-surface-950:where(.dark,.dark *):hover{background-color:var(--p-surface-950)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-surface-950:where(.dark,.dark *):hover{background-color:color-mix(in srgb,var(--p-surface-950)calc(100%*1),transparent)}}.dark\:hover\:text-gray-100:where(.dark,.dark *):hover{color:var(--color-gray-100)}}}:root{--app-background:var(--p-surface-100)}:root[class=dark]{--app-background:var(--p-surface-950)}body{background-color:var(--app-background)}.mt-dialog .p-dialog-header{background-color:var(--p-surface-100);border-radius:.75rem .75rem 0 0;padding:1rem 1.25rem}.mt-dialog .p-dialog-header .p-dialog-header-actions .p-dialog-close-button{background-color:#fff;border-radius:.3rem;justify-content:center;width:2rem;height:2rem}.mt-dialog .p-dialog-content{border-radius:.8rem;height:100%;overflow-y:hidden}.mt-dialog .p-dialog-content .mt-modal-content{height:100%;padding-bottom:5rem;overflow:auto}.mt-dialog .p-dialog-content .mt-modal-footer{background-color:var(--p-surface-100);justify-content:end;gap:10px;padding:.8rem 1.25rem;display:flex;position:sticky;bottom:0}.mt-drawer .p-drawer-content .mt-modal-content{height:calc(100% - 60px);overflow:auto}.mt-drawer .p-drawer-content .mt-modal-footer{border-top:1px solid var(--p-surface-200);justify-content:flex-end;gap:.5rem;height:15rem;padding:.75rem;display:flex}.mt-custom-drawer .p-drawer-header,.mt-custom-drawer .p-drawer-content,.mt-custom-drawer .p-drawer-footer,.mt-drawer .p-drawer-header,.mt-drawer .p-drawer-content,.mt-drawer .p-drawer-footer{padding:0}.mt-drawer .p-drawer-content,body:has(:is(.p-dialog-mask.p-overlay-mask,.p-drawer-mask.p-overlay-mask)){overflow:hidden}@keyframes enter{0%{opacity:var(--p-enter-opacity,1);transform:translate3d(var(--p-enter-translate-x,0),var(--p-enter-translate-y,0),0)scale3d(var(--p-enter-scale,1),var(--p-enter-scale,1),var(--p-enter-scale,1))rotate(var(--p-enter-rotate,0))}}@keyframes leave{to{opacity:var(--p-leave-opacity,1);transform:translate3d(var(--p-leave-translate-x,0),var(--p-leave-translate-y,0),0)scale3d(var(--p-leave-scale,1),var(--p-leave-scale,1),var(--p-leave-scale,1))rotate(var(--p-leave-rotate,0))}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}
|
package/dialog/index.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { DialogService as DialogService$1, DynamicDialogRef, DynamicDialogConfig } from 'primeng/dynamicdialog';
|
|
2
|
-
export { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
2
|
+
export { DynamicDialogConfig, DynamicDialogRef, DynamicDialogRef as ModalRef } from 'primeng/dynamicdialog';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
|
|
5
5
|
declare class DialogService extends DialogService$1 {
|
|
6
|
-
footerClass: string;
|
|
7
|
-
contentClass: string;
|
|
8
6
|
ref: DynamicDialogRef | undefined;
|
|
9
7
|
open(component: any, config?: DynamicDialogConfig): DynamicDialogRef<any>;
|
|
10
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, never>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Type, InjectionToken, Injector } from '@angular/core';
|
|
3
|
+
import { DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
4
|
+
|
|
5
|
+
interface DynamicDrawerConfigInterface {
|
|
6
|
+
header?: string;
|
|
7
|
+
position?: string;
|
|
8
|
+
data?: any;
|
|
9
|
+
fullScreen?: boolean;
|
|
10
|
+
modal?: boolean;
|
|
11
|
+
closable?: boolean;
|
|
12
|
+
closeOnEscape?: boolean;
|
|
13
|
+
dismissible?: boolean;
|
|
14
|
+
appendTo?: any;
|
|
15
|
+
transitionOptions?: string;
|
|
16
|
+
styleClass?: string;
|
|
17
|
+
inputValues?: any;
|
|
18
|
+
}
|
|
19
|
+
declare class DrawerService {
|
|
20
|
+
private appRef;
|
|
21
|
+
private env;
|
|
22
|
+
private rootInjector;
|
|
23
|
+
private destroyRef;
|
|
24
|
+
private doc;
|
|
25
|
+
private hostRef?;
|
|
26
|
+
defauiltConfig: DynamicDrawerConfigInterface;
|
|
27
|
+
open<T>(component: Type<any>, config?: DynamicDrawerConfigInterface): DynamicDialogRef<T>;
|
|
28
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DrawerService, never>;
|
|
29
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DrawerService>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare const DynamicDrawerConfig: InjectionToken<any>;
|
|
33
|
+
declare class DynamicDrawerHost {
|
|
34
|
+
visible: _angular_core.ModelSignal<boolean>;
|
|
35
|
+
cmp: _angular_core.WritableSignal<any>;
|
|
36
|
+
cfg: _angular_core.WritableSignal<any>;
|
|
37
|
+
cmpInputs: _angular_core.WritableSignal<Record<string, unknown>>;
|
|
38
|
+
childInjector: Injector;
|
|
39
|
+
private ref?;
|
|
40
|
+
connect(opts: {
|
|
41
|
+
component: any;
|
|
42
|
+
config?: any;
|
|
43
|
+
parent: Injector;
|
|
44
|
+
ref: DynamicDialogRef;
|
|
45
|
+
}): void;
|
|
46
|
+
handleHide(data?: null): void;
|
|
47
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DynamicDrawerHost, never>;
|
|
48
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DynamicDrawerHost, "mt-dynamic-drawer-host", never, { "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "connect": { "alias": "connect"; "required": true; }; }, { "visible": "visibleChange"; }, never, never, true, never>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { DrawerService, DynamicDrawerConfig, DynamicDrawerHost };
|
|
52
|
+
export type { DynamicDrawerConfigInterface };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { DialogService as DialogService$1 } from 'primeng/dynamicdialog';
|
|
2
|
-
export { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
2
|
+
export { DynamicDialogConfig, DynamicDialogRef, DynamicDialogRef as ModalRef } from 'primeng/dynamicdialog';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { Injectable } from '@angular/core';
|
|
5
5
|
|
|
6
6
|
class DialogService extends DialogService$1 {
|
|
7
|
-
footerClass = 'mt-dialog-footer';
|
|
8
|
-
contentClass = 'mt-dialog-content';
|
|
9
7
|
ref;
|
|
10
8
|
open(component, config) {
|
|
11
9
|
const defaultConfig = {
|
|
@@ -20,10 +18,11 @@ class DialogService extends DialogService$1 {
|
|
|
20
18
|
return this.ref;
|
|
21
19
|
}
|
|
22
20
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: DialogService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
23
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: DialogService });
|
|
21
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: DialogService, providedIn: 'root' });
|
|
24
22
|
}
|
|
25
23
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: DialogService, decorators: [{
|
|
26
|
-
type: Injectable
|
|
24
|
+
type: Injectable,
|
|
25
|
+
args: [{ providedIn: 'root' }]
|
|
27
26
|
}] });
|
|
28
27
|
|
|
29
28
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-components-dialog.mjs","sources":["../../../../packages/masterteam/components/dialog/dialog.ts","../../../../packages/masterteam/components/dialog/masterteam-components-dialog.ts"],"sourcesContent":["import {\n DialogService as PrimeNGDialogService,\n DynamicDialogConfig,\n DynamicDialogRef,\n} from 'primeng/dynamicdialog';\nimport { Injectable } from '@angular/core';\nexport {
|
|
1
|
+
{"version":3,"file":"masterteam-components-dialog.mjs","sources":["../../../../packages/masterteam/components/dialog/dialog.ts","../../../../packages/masterteam/components/dialog/masterteam-components-dialog.ts"],"sourcesContent":["import {\n DialogService as PrimeNGDialogService,\n DynamicDialogConfig,\n DynamicDialogRef,\n} from 'primeng/dynamicdialog';\nimport { Injectable } from '@angular/core';\nexport {\n DynamicDialogConfig,\n DynamicDialogRef as ModalRef,\n} from 'primeng/dynamicdialog';\nexport { DynamicDialogRef } from 'primeng/dynamicdialog';\n\n@Injectable({ providedIn: 'root' })\nexport class DialogService extends PrimeNGDialogService {\n ref: DynamicDialogRef | undefined;\n\n override open(component: any, config?: DynamicDialogConfig) {\n const defaultConfig = {\n closable: true,\n modal: true,\n };\n this.ref = super.open(component, {\n ...defaultConfig,\n ...config,\n styleClass: 'mt-dialog ' + config?.styleClass,\n });\n return this.ref;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["PrimeNGDialogService"],"mappings":";;;;;AAaM,MAAO,aAAc,SAAQA,eAAoB,CAAA;AACrD,IAAA,GAAG;IAEM,IAAI,CAAC,SAAc,EAAE,MAA4B,EAAA;AACxD,QAAA,MAAM,aAAa,GAAG;AACpB,YAAA,QAAQ,EAAE,IAAI;AACd,YAAA,KAAK,EAAE,IAAI;SACZ;QACD,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE;AAC/B,YAAA,GAAG,aAAa;AAChB,YAAA,GAAG,MAAM;AACT,YAAA,UAAU,EAAE,YAAY,GAAG,MAAM,EAAE,UAAU;AAC9C,SAAA,CAAC;QACF,OAAO,IAAI,CAAC,GAAG;IACjB;uGAdW,aAAa,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAb,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cADA,MAAM,EAAA,CAAA;;2FACnB,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACZlC;;AAEG;;;;"}
|
|
@@ -35,11 +35,11 @@ class Drawer {
|
|
|
35
35
|
this.onHide.emit(true);
|
|
36
36
|
}
|
|
37
37
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: Drawer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
38
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.3", type: Drawer, isStandalone: true, selector: "mt-drawer", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, fullScreen: { classPropertyName: "fullScreen", publicName: "fullScreen", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, blockScroll: { classPropertyName: "blockScroll", publicName: "blockScroll", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, transitionOptions: { classPropertyName: "transitionOptions", publicName: "transitionOptions", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", visibleChange: "visibleChange", onShow: "onShow", onHide: "onHide" }, ngImport: i0, template: "<p-drawer\n [(visible)]=\"visible\"\n [position]=\"position()\"\n [fullScreen]=\"fullScreen()\"\n [modal]=\"modal()\"\n [closable]=\"false\"\n [closeOnEscape]=\"closeOnEscape()\"\n [blockScroll]=\"blockScroll()\"\n [dismissible]=\"dismissible()\"\n [appendTo]=\"appendTo()\"\n [transitionOptions]=\"transitionOptions()\"\n [styleClass]=\"styleClass() + ' custom-drawer'\"\n (visibleChange)=\"visibleChangeEvent($event)\"\n (onShow)=\"onShowEvent()\"\n (onHide)=\"onHideEvent()\"\n>\n <ng-template #header>\n <div\n class=\"flex items-center justify-between px-5 w-full py-3 border-b border-surface\"\n >\n <h3 class=\"text-xl font-semibold\">{{ title() }}</h3>\n <mt-button\n (onClick)=\"onClose()\"\n variant=\"outlined\"\n styleClass=\"!bg-white\"\n icon=\"general.x-close\"\n severity=\"secondary\"\n >\n </mt-button>\n </div>\n </ng-template>\n\n <ng-content select=\"[content]\"></ng-content>\n\n <ng-template #footer>\n <div class=\"flex justify-end p-3 gap-2 border-t border-surface-200\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </ng-template>\n</p-drawer>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DrawerModule }, { kind: "component", type: i1.Drawer, selector: "p-drawer", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "closeButtonProps", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen", "header", "maskStyle", "closable"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }] });
|
|
38
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.3", type: Drawer, isStandalone: true, selector: "mt-drawer", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, fullScreen: { classPropertyName: "fullScreen", publicName: "fullScreen", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, blockScroll: { classPropertyName: "blockScroll", publicName: "blockScroll", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, transitionOptions: { classPropertyName: "transitionOptions", publicName: "transitionOptions", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", visibleChange: "visibleChange", onShow: "onShow", onHide: "onHide" }, ngImport: i0, template: "<p-drawer\n [(visible)]=\"visible\"\n [position]=\"position()\"\n [fullScreen]=\"fullScreen()\"\n [modal]=\"modal()\"\n [closable]=\"false\"\n [closeOnEscape]=\"closeOnEscape()\"\n [blockScroll]=\"blockScroll()\"\n [dismissible]=\"dismissible()\"\n [appendTo]=\"appendTo()\"\n [transitionOptions]=\"transitionOptions()\"\n [styleClass]=\"styleClass() + ' mt-custom-drawer'\"\n (visibleChange)=\"visibleChangeEvent($event)\"\n (onShow)=\"onShowEvent()\"\n (onHide)=\"onHideEvent()\"\n>\n <ng-template #header>\n <div\n class=\"flex items-center justify-between px-5 w-full py-3 border-b border-surface\"\n >\n <h3 class=\"text-xl font-semibold\">{{ title() }}</h3>\n <mt-button\n (onClick)=\"onClose()\"\n variant=\"outlined\"\n styleClass=\"!bg-white\"\n icon=\"general.x-close\"\n severity=\"secondary\"\n >\n </mt-button>\n </div>\n </ng-template>\n\n <ng-content select=\"[content]\"></ng-content>\n\n <ng-template #footer>\n <div class=\"flex justify-end p-3 gap-2 border-t border-surface-200\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </ng-template>\n</p-drawer>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DrawerModule }, { kind: "component", type: i1.Drawer, selector: "p-drawer", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "closeButtonProps", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen", "header", "maskStyle", "closable"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }] });
|
|
39
39
|
}
|
|
40
40
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: Drawer, decorators: [{
|
|
41
41
|
type: Component,
|
|
42
|
-
args: [{ selector: 'mt-drawer', standalone: true, imports: [CommonModule, DrawerModule, Button], template: "<p-drawer\n [(visible)]=\"visible\"\n [position]=\"position()\"\n [fullScreen]=\"fullScreen()\"\n [modal]=\"modal()\"\n [closable]=\"false\"\n [closeOnEscape]=\"closeOnEscape()\"\n [blockScroll]=\"blockScroll()\"\n [dismissible]=\"dismissible()\"\n [appendTo]=\"appendTo()\"\n [transitionOptions]=\"transitionOptions()\"\n [styleClass]=\"styleClass() + ' custom-drawer'\"\n (visibleChange)=\"visibleChangeEvent($event)\"\n (onShow)=\"onShowEvent()\"\n (onHide)=\"onHideEvent()\"\n>\n <ng-template #header>\n <div\n class=\"flex items-center justify-between px-5 w-full py-3 border-b border-surface\"\n >\n <h3 class=\"text-xl font-semibold\">{{ title() }}</h3>\n <mt-button\n (onClick)=\"onClose()\"\n variant=\"outlined\"\n styleClass=\"!bg-white\"\n icon=\"general.x-close\"\n severity=\"secondary\"\n >\n </mt-button>\n </div>\n </ng-template>\n\n <ng-content select=\"[content]\"></ng-content>\n\n <ng-template #footer>\n <div class=\"flex justify-end p-3 gap-2 border-t border-surface-200\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </ng-template>\n</p-drawer>\n" }]
|
|
42
|
+
args: [{ selector: 'mt-drawer', standalone: true, imports: [CommonModule, DrawerModule, Button], template: "<p-drawer\n [(visible)]=\"visible\"\n [position]=\"position()\"\n [fullScreen]=\"fullScreen()\"\n [modal]=\"modal()\"\n [closable]=\"false\"\n [closeOnEscape]=\"closeOnEscape()\"\n [blockScroll]=\"blockScroll()\"\n [dismissible]=\"dismissible()\"\n [appendTo]=\"appendTo()\"\n [transitionOptions]=\"transitionOptions()\"\n [styleClass]=\"styleClass() + ' mt-custom-drawer'\"\n (visibleChange)=\"visibleChangeEvent($event)\"\n (onShow)=\"onShowEvent()\"\n (onHide)=\"onHideEvent()\"\n>\n <ng-template #header>\n <div\n class=\"flex items-center justify-between px-5 w-full py-3 border-b border-surface\"\n >\n <h3 class=\"text-xl font-semibold\">{{ title() }}</h3>\n <mt-button\n (onClick)=\"onClose()\"\n variant=\"outlined\"\n styleClass=\"!bg-white\"\n icon=\"general.x-close\"\n severity=\"secondary\"\n >\n </mt-button>\n </div>\n </ng-template>\n\n <ng-content select=\"[content]\"></ng-content>\n\n <ng-template #footer>\n <div class=\"flex justify-end p-3 gap-2 border-t border-surface-200\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </ng-template>\n</p-drawer>\n" }]
|
|
43
43
|
}] });
|
|
44
44
|
|
|
45
45
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-components-drawer.mjs","sources":["../../../../packages/masterteam/components/drawer/drawer.ts","../../../../packages/masterteam/components/drawer/drawer.html","../../../../packages/masterteam/components/drawer/masterteam-components-drawer.ts"],"sourcesContent":["import { Button } from '@masterteam/components/button';\nimport { Component, input, output, model } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DrawerModule } from 'primeng/drawer';\n\n@Component({\n selector: 'mt-drawer',\n standalone: true,\n imports: [CommonModule, DrawerModule, Button],\n templateUrl: './drawer.html',\n styleUrls: ['./drawer.scss'],\n})\nexport class Drawer {\n visible = model<boolean>(false);\n visibleChange = output<boolean>();\n onShow = output<boolean>();\n onHide = output<boolean>();\n position = input<'left' | 'right' | 'top' | 'bottom'>('right');\n fullScreen = input<boolean>(false);\n closeOnEscape = input<boolean>(false);\n blockScroll = input<boolean>(true);\n dismissible = input<boolean>(true);\n title = input<string>('');\n styleClass = input<string>('');\n transitionOptions = input<string>('200ms cubic-bezier(0, 0, 1, 1)');\n appendTo = input<string>('body');\n modal = input<boolean>(true);\n\n visibleChangeEvent(event: boolean) {\n this.visibleChange.emit(event);\n }\n\n onClose() {\n this.visible.set(false);\n this.visibleChange.emit(false);\n this.onHide.emit(true);\n }\n onShowEvent() {\n this.onShow.emit(true);\n }\n onHideEvent() {\n this.onHide.emit(true);\n }\n}\n","<p-drawer\n [(visible)]=\"visible\"\n [position]=\"position()\"\n [fullScreen]=\"fullScreen()\"\n [modal]=\"modal()\"\n [closable]=\"false\"\n [closeOnEscape]=\"closeOnEscape()\"\n [blockScroll]=\"blockScroll()\"\n [dismissible]=\"dismissible()\"\n [appendTo]=\"appendTo()\"\n [transitionOptions]=\"transitionOptions()\"\n [styleClass]=\"styleClass() + ' custom-drawer'\"\n (visibleChange)=\"visibleChangeEvent($event)\"\n (onShow)=\"onShowEvent()\"\n (onHide)=\"onHideEvent()\"\n>\n <ng-template #header>\n <div\n class=\"flex items-center justify-between px-5 w-full py-3 border-b border-surface\"\n >\n <h3 class=\"text-xl font-semibold\">{{ title() }}</h3>\n <mt-button\n (onClick)=\"onClose()\"\n variant=\"outlined\"\n styleClass=\"!bg-white\"\n icon=\"general.x-close\"\n severity=\"secondary\"\n >\n </mt-button>\n </div>\n </ng-template>\n\n <ng-content select=\"[content]\"></ng-content>\n\n <ng-template #footer>\n <div class=\"flex justify-end p-3 gap-2 border-t border-surface-200\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </ng-template>\n</p-drawer>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAYa,MAAM,CAAA;AACjB,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,mDAAC;IAC/B,aAAa,GAAG,MAAM,EAAW;IACjC,MAAM,GAAG,MAAM,EAAW;IAC1B,MAAM,GAAG,MAAM,EAAW;AAC1B,IAAA,QAAQ,GAAG,KAAK,CAAsC,OAAO,oDAAC;AAC9D,IAAA,UAAU,GAAG,KAAK,CAAU,KAAK,sDAAC;AAClC,IAAA,aAAa,GAAG,KAAK,CAAU,KAAK,yDAAC;AACrC,IAAA,WAAW,GAAG,KAAK,CAAU,IAAI,uDAAC;AAClC,IAAA,WAAW,GAAG,KAAK,CAAU,IAAI,uDAAC;AAClC,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC;AACzB,IAAA,UAAU,GAAG,KAAK,CAAS,EAAE,sDAAC;AAC9B,IAAA,iBAAiB,GAAG,KAAK,CAAS,gCAAgC,6DAAC;AACnE,IAAA,QAAQ,GAAG,KAAK,CAAS,MAAM,oDAAC;AAChC,IAAA,KAAK,GAAG,KAAK,CAAU,IAAI,iDAAC;AAE5B,IAAA,kBAAkB,CAAC,KAAc,EAAA;AAC/B,QAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC;IAChC;IAEA,OAAO,GAAA;AACL,QAAA,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;AACvB,QAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC;AAC9B,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;IACxB;IACA,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;IACxB;IACA,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;IACxB;uGA9BW,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAN,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAM,0nDCZnB,
|
|
1
|
+
{"version":3,"file":"masterteam-components-drawer.mjs","sources":["../../../../packages/masterteam/components/drawer/drawer.ts","../../../../packages/masterteam/components/drawer/drawer.html","../../../../packages/masterteam/components/drawer/masterteam-components-drawer.ts"],"sourcesContent":["import { Button } from '@masterteam/components/button';\nimport { Component, input, output, model } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DrawerModule } from 'primeng/drawer';\n\n@Component({\n selector: 'mt-drawer',\n standalone: true,\n imports: [CommonModule, DrawerModule, Button],\n templateUrl: './drawer.html',\n styleUrls: ['./drawer.scss'],\n})\nexport class Drawer {\n visible = model<boolean>(false);\n visibleChange = output<boolean>();\n onShow = output<boolean>();\n onHide = output<boolean>();\n position = input<'left' | 'right' | 'top' | 'bottom'>('right');\n fullScreen = input<boolean>(false);\n closeOnEscape = input<boolean>(false);\n blockScroll = input<boolean>(true);\n dismissible = input<boolean>(true);\n title = input<string>('');\n styleClass = input<string>('');\n transitionOptions = input<string>('200ms cubic-bezier(0, 0, 1, 1)');\n appendTo = input<string>('body');\n modal = input<boolean>(true);\n\n visibleChangeEvent(event: boolean) {\n this.visibleChange.emit(event);\n }\n\n onClose() {\n this.visible.set(false);\n this.visibleChange.emit(false);\n this.onHide.emit(true);\n }\n onShowEvent() {\n this.onShow.emit(true);\n }\n onHideEvent() {\n this.onHide.emit(true);\n }\n}\n","<p-drawer\n [(visible)]=\"visible\"\n [position]=\"position()\"\n [fullScreen]=\"fullScreen()\"\n [modal]=\"modal()\"\n [closable]=\"false\"\n [closeOnEscape]=\"closeOnEscape()\"\n [blockScroll]=\"blockScroll()\"\n [dismissible]=\"dismissible()\"\n [appendTo]=\"appendTo()\"\n [transitionOptions]=\"transitionOptions()\"\n [styleClass]=\"styleClass() + ' mt-custom-drawer'\"\n (visibleChange)=\"visibleChangeEvent($event)\"\n (onShow)=\"onShowEvent()\"\n (onHide)=\"onHideEvent()\"\n>\n <ng-template #header>\n <div\n class=\"flex items-center justify-between px-5 w-full py-3 border-b border-surface\"\n >\n <h3 class=\"text-xl font-semibold\">{{ title() }}</h3>\n <mt-button\n (onClick)=\"onClose()\"\n variant=\"outlined\"\n styleClass=\"!bg-white\"\n icon=\"general.x-close\"\n severity=\"secondary\"\n >\n </mt-button>\n </div>\n </ng-template>\n\n <ng-content select=\"[content]\"></ng-content>\n\n <ng-template #footer>\n <div class=\"flex justify-end p-3 gap-2 border-t border-surface-200\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </ng-template>\n</p-drawer>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAYa,MAAM,CAAA;AACjB,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,mDAAC;IAC/B,aAAa,GAAG,MAAM,EAAW;IACjC,MAAM,GAAG,MAAM,EAAW;IAC1B,MAAM,GAAG,MAAM,E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AAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDhCY,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,YAAY,kaAAE,MAAM,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,SAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,UAAA,EAAA,OAAA,EAAA,SAAA,EAAA,eAAA,EAAA,MAAA,EAAA,SAAA,EAAA,WAAA,EAAA,OAAA,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,OAAA,EAAA,UAAA,EAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,EAAA,SAAA,EAAA,QAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAIjC,MAAM,EAAA,UAAA,EAAA,CAAA;kBAPlB,SAAS;+BACE,WAAW,EAAA,UAAA,EACT,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,YAAY,EAAE,MAAM,CAAC,EAAA,QAAA,EAAA,qqCAAA,EAAA;;;AER/C;;AAEG;;;;"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, model, signal, Injector, Input, Component, inject, ApplicationRef, EnvironmentInjector, DestroyRef, createComponent, Injectable } from '@angular/core';
|
|
3
|
+
import { NgComponentOutlet, DOCUMENT } from '@angular/common';
|
|
4
|
+
import { DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
5
|
+
import * as i1 from 'primeng/drawer';
|
|
6
|
+
import { DrawerModule } from 'primeng/drawer';
|
|
7
|
+
import { Button } from '@masterteam/components/button';
|
|
8
|
+
|
|
9
|
+
const DynamicDrawerConfig = new InjectionToken('DynamicDrawerConfig');
|
|
10
|
+
class DynamicDrawerHost {
|
|
11
|
+
visible = model(false, ...(ngDevMode ? [{ debugName: "visible" }] : []));
|
|
12
|
+
cmp = signal(null, ...(ngDevMode ? [{ debugName: "cmp" }] : []));
|
|
13
|
+
cfg = signal({}, ...(ngDevMode ? [{ debugName: "cfg" }] : []));
|
|
14
|
+
cmpInputs = signal({}, ...(ngDevMode ? [{ debugName: "cmpInputs" }] : []));
|
|
15
|
+
childInjector;
|
|
16
|
+
ref;
|
|
17
|
+
connect(opts) {
|
|
18
|
+
this.cmp.set(opts.component);
|
|
19
|
+
this.cfg.set(opts.config ?? {});
|
|
20
|
+
this.cmpInputs.set(opts.config?.inputValues ?? {});
|
|
21
|
+
this.ref = opts.ref;
|
|
22
|
+
this.childInjector = Injector.create({
|
|
23
|
+
parent: opts.parent,
|
|
24
|
+
providers: [
|
|
25
|
+
{ provide: DynamicDrawerConfig, useValue: opts.config ?? {} },
|
|
26
|
+
{ provide: DynamicDialogRef, useValue: opts.ref },
|
|
27
|
+
],
|
|
28
|
+
});
|
|
29
|
+
opts.ref.onClose.subscribe(() => {
|
|
30
|
+
this.visible.set(false);
|
|
31
|
+
});
|
|
32
|
+
this.visible.set(true);
|
|
33
|
+
}
|
|
34
|
+
handleHide(data = null) {
|
|
35
|
+
this.visible.set(false);
|
|
36
|
+
this.ref?.close(data);
|
|
37
|
+
}
|
|
38
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: DynamicDrawerHost, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
39
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.3", type: DynamicDrawerHost, isStandalone: true, selector: "mt-dynamic-drawer-host", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, connect: { classPropertyName: "connect", publicName: "connect", isSignal: false, isRequired: true, transformFunction: null } }, outputs: { visible: "visibleChange" }, ngImport: i0, template: `
|
|
40
|
+
<p-drawer
|
|
41
|
+
[(visible)]="visible"
|
|
42
|
+
[closable]="cfg()?.closable"
|
|
43
|
+
[position]="cfg()?.position"
|
|
44
|
+
[fullScreen]="cfg()?.fullScreen"
|
|
45
|
+
[modal]="cfg()?.modal"
|
|
46
|
+
[closeOnEscape]="cfg()?.closeOnEscape"
|
|
47
|
+
[dismissible]="cfg()?.dismissible"
|
|
48
|
+
[appendTo]="cfg()?.appendTo"
|
|
49
|
+
[transitionOptions]="cfg()?.transitionOptions"
|
|
50
|
+
[styleClass]="cfg()?.styleClass + ' mt-drawer'"
|
|
51
|
+
>
|
|
52
|
+
<ng-template #header>
|
|
53
|
+
<div
|
|
54
|
+
class="flex items-center justify-between px-5 w-full py-3 border-b border-surface"
|
|
55
|
+
>
|
|
56
|
+
<h3 class="text-xl font-semibold">{{ cfg()?.header }}</h3>
|
|
57
|
+
<mt-button
|
|
58
|
+
(onClick)="handleHide()"
|
|
59
|
+
variant="outlined"
|
|
60
|
+
styleClass="!bg-white"
|
|
61
|
+
icon="general.x-close"
|
|
62
|
+
severity="secondary"
|
|
63
|
+
>
|
|
64
|
+
</mt-button>
|
|
65
|
+
</div>
|
|
66
|
+
</ng-template>
|
|
67
|
+
|
|
68
|
+
<ng-container
|
|
69
|
+
*ngComponentOutlet="cmp(); injector: childInjector; inputs: cmpInputs()"
|
|
70
|
+
>
|
|
71
|
+
</ng-container>
|
|
72
|
+
</p-drawer>
|
|
73
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "ngmodule", type: DrawerModule }, { kind: "component", type: i1.Drawer, selector: "p-drawer", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "closeButtonProps", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen", "header", "maskStyle", "closable"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }] });
|
|
74
|
+
}
|
|
75
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: DynamicDrawerHost, decorators: [{
|
|
76
|
+
type: Component,
|
|
77
|
+
args: [{
|
|
78
|
+
selector: 'mt-dynamic-drawer-host',
|
|
79
|
+
standalone: true,
|
|
80
|
+
imports: [NgComponentOutlet, DrawerModule, Button],
|
|
81
|
+
template: `
|
|
82
|
+
<p-drawer
|
|
83
|
+
[(visible)]="visible"
|
|
84
|
+
[closable]="cfg()?.closable"
|
|
85
|
+
[position]="cfg()?.position"
|
|
86
|
+
[fullScreen]="cfg()?.fullScreen"
|
|
87
|
+
[modal]="cfg()?.modal"
|
|
88
|
+
[closeOnEscape]="cfg()?.closeOnEscape"
|
|
89
|
+
[dismissible]="cfg()?.dismissible"
|
|
90
|
+
[appendTo]="cfg()?.appendTo"
|
|
91
|
+
[transitionOptions]="cfg()?.transitionOptions"
|
|
92
|
+
[styleClass]="cfg()?.styleClass + ' mt-drawer'"
|
|
93
|
+
>
|
|
94
|
+
<ng-template #header>
|
|
95
|
+
<div
|
|
96
|
+
class="flex items-center justify-between px-5 w-full py-3 border-b border-surface"
|
|
97
|
+
>
|
|
98
|
+
<h3 class="text-xl font-semibold">{{ cfg()?.header }}</h3>
|
|
99
|
+
<mt-button
|
|
100
|
+
(onClick)="handleHide()"
|
|
101
|
+
variant="outlined"
|
|
102
|
+
styleClass="!bg-white"
|
|
103
|
+
icon="general.x-close"
|
|
104
|
+
severity="secondary"
|
|
105
|
+
>
|
|
106
|
+
</mt-button>
|
|
107
|
+
</div>
|
|
108
|
+
</ng-template>
|
|
109
|
+
|
|
110
|
+
<ng-container
|
|
111
|
+
*ngComponentOutlet="cmp(); injector: childInjector; inputs: cmpInputs()"
|
|
112
|
+
>
|
|
113
|
+
</ng-container>
|
|
114
|
+
</p-drawer>
|
|
115
|
+
`,
|
|
116
|
+
}]
|
|
117
|
+
}], propDecorators: { connect: [{
|
|
118
|
+
type: Input,
|
|
119
|
+
args: [{ required: true }]
|
|
120
|
+
}] } });
|
|
121
|
+
|
|
122
|
+
// dynamic-drawer.service.ts
|
|
123
|
+
class DrawerService {
|
|
124
|
+
appRef = inject(ApplicationRef);
|
|
125
|
+
env = inject(EnvironmentInjector);
|
|
126
|
+
rootInjector = inject(Injector);
|
|
127
|
+
destroyRef = inject(DestroyRef);
|
|
128
|
+
doc = inject(DOCUMENT);
|
|
129
|
+
hostRef;
|
|
130
|
+
defauiltConfig = {
|
|
131
|
+
position: 'right',
|
|
132
|
+
modal: true,
|
|
133
|
+
closable: false,
|
|
134
|
+
transitionOptions: '200ms cubic-bezier(0, 0, 1, 1)',
|
|
135
|
+
inputValues: {},
|
|
136
|
+
};
|
|
137
|
+
open(component, config = {}) {
|
|
138
|
+
config = { ...this.defauiltConfig, ...config };
|
|
139
|
+
this.hostRef = createComponent(DynamicDrawerHost, {
|
|
140
|
+
environmentInjector: this.env,
|
|
141
|
+
});
|
|
142
|
+
this.appRef.attachView(this.hostRef.hostView);
|
|
143
|
+
this.doc.body.appendChild(this.hostRef.location.nativeElement);
|
|
144
|
+
// auto-clean if app destroyed (SSR/hot-reload safety)
|
|
145
|
+
this.destroyRef.onDestroy(() => {
|
|
146
|
+
this.appRef.detachView(this.hostRef.hostView);
|
|
147
|
+
this.hostRef.destroy();
|
|
148
|
+
this.hostRef = undefined;
|
|
149
|
+
});
|
|
150
|
+
const ref = new DynamicDialogRef();
|
|
151
|
+
this.hostRef.instance.connect({
|
|
152
|
+
component,
|
|
153
|
+
config,
|
|
154
|
+
parent: this.rootInjector,
|
|
155
|
+
ref,
|
|
156
|
+
});
|
|
157
|
+
return ref;
|
|
158
|
+
}
|
|
159
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: DrawerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
160
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: DrawerService, providedIn: 'root' });
|
|
161
|
+
}
|
|
162
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: DrawerService, decorators: [{
|
|
163
|
+
type: Injectable,
|
|
164
|
+
args: [{ providedIn: 'root' }]
|
|
165
|
+
}] });
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Generated bundle index. Do not edit.
|
|
169
|
+
*/
|
|
170
|
+
|
|
171
|
+
export { DrawerService, DynamicDrawerConfig, DynamicDrawerHost };
|
|
172
|
+
//# sourceMappingURL=masterteam-components-dynamic-drawer.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"masterteam-components-dynamic-drawer.mjs","sources":["../../../../packages/masterteam/components/dynamic-drawer/dynamic-drawer-host.ts","../../../../packages/masterteam/components/dynamic-drawer/dynamic-drawer.ts","../../../../packages/masterteam/components/dynamic-drawer/masterteam-components-dynamic-drawer.ts"],"sourcesContent":["import { DynamicDialogRef } from 'primeng/dynamicdialog';\nimport { DrawerModule } from 'primeng/drawer';\nimport {\n Component,\n Injector,\n Input,\n signal,\n InjectionToken,\n model,\n} from '@angular/core';\nimport { NgComponentOutlet } from '@angular/common';\n\nexport const DynamicDrawerConfig = new InjectionToken<any>(\n 'DynamicDrawerConfig',\n);\nimport { Button } from '@masterteam/components/button';\n\n@Component({\n selector: 'mt-dynamic-drawer-host',\n standalone: true,\n imports: [NgComponentOutlet, DrawerModule, Button],\n template: `\n <p-drawer\n [(visible)]=\"visible\"\n [closable]=\"cfg()?.closable\"\n [position]=\"cfg()?.position\"\n [fullScreen]=\"cfg()?.fullScreen\"\n [modal]=\"cfg()?.modal\"\n [closeOnEscape]=\"cfg()?.closeOnEscape\"\n [dismissible]=\"cfg()?.dismissible\"\n [appendTo]=\"cfg()?.appendTo\"\n [transitionOptions]=\"cfg()?.transitionOptions\"\n [styleClass]=\"cfg()?.styleClass + ' mt-drawer'\"\n >\n <ng-template #header>\n <div\n class=\"flex items-center justify-between px-5 w-full py-3 border-b border-surface\"\n >\n <h3 class=\"text-xl font-semibold\">{{ cfg()?.header }}</h3>\n <mt-button\n (onClick)=\"handleHide()\"\n variant=\"outlined\"\n styleClass=\"!bg-white\"\n icon=\"general.x-close\"\n severity=\"secondary\"\n >\n </mt-button>\n </div>\n </ng-template>\n\n <ng-container\n *ngComponentOutlet=\"cmp(); injector: childInjector; inputs: cmpInputs()\"\n >\n </ng-container>\n </p-drawer>\n `,\n})\nexport class DynamicDrawerHost {\n public visible = model<boolean>(false);\n cmp = signal<any>(null);\n cfg = signal<any>({});\n cmpInputs = signal<Record<string, unknown>>({});\n childInjector!: Injector;\n private ref?: DynamicDialogRef;\n\n @Input({ required: true })\n connect(opts: {\n component: any;\n config?: any;\n parent: Injector;\n ref: DynamicDialogRef;\n }) {\n this.cmp.set(opts.component);\n this.cfg.set(opts.config ?? {});\n this.cmpInputs.set(opts.config?.inputValues ?? {});\n this.ref = opts.ref;\n this.childInjector = Injector.create({\n parent: opts.parent,\n providers: [\n { provide: DynamicDrawerConfig, useValue: opts.config ?? {} },\n { provide: DynamicDialogRef, useValue: opts.ref },\n ],\n });\n opts.ref.onClose.subscribe(() => {\n this.visible.set(false);\n });\n this.visible.set(true);\n }\n\n handleHide(data = null) {\n this.visible.set(false);\n this.ref?.close(data);\n }\n}\n","// dynamic-drawer.service.ts\nimport {\n Injectable,\n Type,\n createComponent,\n EnvironmentInjector,\n ApplicationRef,\n Injector,\n DestroyRef,\n inject,\n} from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { DynamicDrawerHost } from './dynamic-drawer-host';\nimport { DynamicDialogRef } from 'primeng/dynamicdialog';\n\nexport interface DynamicDrawerConfigInterface {\n header?: string;\n position?: string;\n data?: any;\n fullScreen?: boolean;\n modal?: boolean;\n closable?: boolean;\n closeOnEscape?: boolean;\n dismissible?: boolean;\n appendTo?: any;\n transitionOptions?: string;\n styleClass?: string;\n inputValues?: any;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DrawerService {\n private appRef = inject(ApplicationRef);\n private env = inject(EnvironmentInjector);\n private rootInjector = inject(Injector);\n private destroyRef = inject(DestroyRef);\n private doc = inject(DOCUMENT);\n private hostRef?: ReturnType<typeof createComponent<DynamicDrawerHost>>;\n defauiltConfig: DynamicDrawerConfigInterface = {\n position: 'right',\n modal: true,\n closable: false,\n transitionOptions: '200ms cubic-bezier(0, 0, 1, 1)',\n inputValues: {},\n };\n open<T>(\n component: Type<any>,\n config: DynamicDrawerConfigInterface = {},\n ): DynamicDialogRef<T> {\n config = { ...this.defauiltConfig, ...config };\n this.hostRef = createComponent(DynamicDrawerHost, {\n environmentInjector: this.env,\n });\n\n this.appRef.attachView(this.hostRef.hostView);\n this.doc.body.appendChild(this.hostRef.location.nativeElement);\n\n // auto-clean if app destroyed (SSR/hot-reload safety)\n this.destroyRef.onDestroy(() => {\n this.appRef.detachView(this.hostRef!.hostView);\n this.hostRef!.destroy();\n this.hostRef = undefined;\n });\n\n const ref = new DynamicDialogRef<T>();\n this.hostRef.instance.connect({\n component,\n config,\n parent: this.rootInjector,\n ref,\n });\n\n return ref;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAYa,mBAAmB,GAAG,IAAI,cAAc,CACnD,qBAAqB;MA4CV,iBAAiB,CAAA;AACrB,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,mDAAC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C,YAAY;YACzB,GAAG;AACJ,SAAA,CAAC;AAEF,QAAA,OAAO,GAAG;IACZ;uGA1CW,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAb,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cADA,MAAM,EAAA,CAAA;;2FACnB,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;AC9BlC;;AAEG;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { viewChild, contentChild, TemplateRef, input, booleanAttribute, output, computed, Component } from '@angular/core';
|
|
2
|
+
import { viewChild, contentChild, TemplateRef, input, booleanAttribute, model, output, computed, Component } from '@angular/core';
|
|
3
3
|
import { Menu as Menu$1 } from 'primeng/menu';
|
|
4
4
|
import * as i1 from 'primeng/api';
|
|
5
5
|
import { SharedModule } from 'primeng/api';
|
|
6
6
|
import { Icon } from '@masterteam/icons';
|
|
7
|
-
import {
|
|
7
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
8
8
|
|
|
9
9
|
class Menu {
|
|
10
10
|
menuRef = viewChild.required('menu', { read: Menu$1 });
|
|
@@ -31,25 +31,60 @@ class Menu {
|
|
|
31
31
|
ariaLabelledBy = input(...(ngDevMode ? [undefined, { debugName: "ariaLabelledBy" }] : []));
|
|
32
32
|
id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : []));
|
|
33
33
|
tabindex = input(0, ...(ngDevMode ? [{ debugName: "tabindex" }] : []));
|
|
34
|
+
activeItemId = model(...(ngDevMode ? [undefined, { debugName: "activeItemId" }] : []));
|
|
34
35
|
onShow = output();
|
|
35
36
|
onHide = output();
|
|
36
37
|
onBlur = output();
|
|
37
38
|
onFocus = output();
|
|
39
|
+
onItemSelect = output();
|
|
38
40
|
transformedModel = computed(() => {
|
|
39
|
-
return this.model().map((item) => this.transformMenuItem(item));
|
|
41
|
+
return this.model().map((item) => this.transformMenuItem(item, this.activeItemId()));
|
|
40
42
|
}, ...(ngDevMode ? [{ debugName: "transformedModel" }] : []));
|
|
41
|
-
|
|
43
|
+
toggle(event) {
|
|
44
|
+
this.menuRef().toggle(event);
|
|
45
|
+
}
|
|
46
|
+
show(event) {
|
|
47
|
+
this.menuRef().show(event);
|
|
48
|
+
}
|
|
49
|
+
hide() {
|
|
50
|
+
this.menuRef().hide();
|
|
51
|
+
}
|
|
52
|
+
getItemIcon(item) {
|
|
53
|
+
return item?.mtIcon;
|
|
54
|
+
}
|
|
55
|
+
transformMenuItem(item, activeId) {
|
|
42
56
|
const transformed = { ...item };
|
|
43
57
|
if (item.icon) {
|
|
44
58
|
transformed.mtIcon = item.icon;
|
|
45
59
|
delete transformed.icon;
|
|
46
60
|
}
|
|
47
|
-
|
|
48
|
-
|
|
61
|
+
const classes = [];
|
|
62
|
+
const isActive = activeId && item.id && item.id === activeId;
|
|
63
|
+
if (isActive) {
|
|
64
|
+
classes.push('bg-primary-50', 'text-primary-700', 'dark:bg-primary-900/20', 'dark:text-primary-300');
|
|
65
|
+
}
|
|
66
|
+
else if (item.severity) {
|
|
67
|
+
const severityClass = this.getSeverityClass(item.severity);
|
|
68
|
+
if (severityClass) {
|
|
69
|
+
classes.push(severityClass);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (item.styleClass) {
|
|
73
|
+
classes.push(item.styleClass);
|
|
49
74
|
}
|
|
75
|
+
transformed.computedClass = classes.join(' ');
|
|
50
76
|
if (item['items']) {
|
|
51
|
-
transformed['items'] = item['items'].map((subItem) => this.transformMenuItem(subItem));
|
|
77
|
+
transformed['items'] = item['items'].map((subItem) => this.transformMenuItem(subItem, activeId));
|
|
52
78
|
}
|
|
79
|
+
const originalCommand = transformed.command;
|
|
80
|
+
transformed.command = (event) => {
|
|
81
|
+
if (item.id) {
|
|
82
|
+
this.handleItemSelect(item);
|
|
83
|
+
}
|
|
84
|
+
if (originalCommand) {
|
|
85
|
+
originalCommand(event);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
53
88
|
return transformed;
|
|
54
89
|
}
|
|
55
90
|
getSeverityClass(severity) {
|
|
@@ -64,24 +99,18 @@ class Menu {
|
|
|
64
99
|
};
|
|
65
100
|
return severityMap[severity] || '';
|
|
66
101
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
this.
|
|
72
|
-
}
|
|
73
|
-
show(event) {
|
|
74
|
-
this.menuRef().show(event);
|
|
75
|
-
}
|
|
76
|
-
hide() {
|
|
77
|
-
this.menuRef().hide();
|
|
102
|
+
handleItemSelect(item) {
|
|
103
|
+
if (item.id) {
|
|
104
|
+
this.activeItemId.set(item.id);
|
|
105
|
+
}
|
|
106
|
+
this.onItemSelect.emit(item);
|
|
78
107
|
}
|
|
79
108
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: Menu, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
80
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: Menu, isStandalone: true, selector: "mt-menu", inputs: { model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null }, popup: { classPropertyName: "popup", publicName: "popup", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, autoZIndex: { classPropertyName: "autoZIndex", publicName: "autoZIndex", isSignal: true, isRequired: false, transformFunction: null }, baseZIndex: { classPropertyName: "baseZIndex", publicName: "baseZIndex", isSignal: true, isRequired: false, transformFunction: null }, showTransitionOptions: { classPropertyName: "showTransitionOptions", publicName: "showTransitionOptions", isSignal: true, isRequired: false, transformFunction: null }, hideTransitionOptions: { classPropertyName: "hideTransitionOptions", publicName: "hideTransitionOptions", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onShow: "onShow", onHide: "onHide", onBlur: "onBlur", onFocus: "onFocus" }, queries: [{ propertyName: "startTemplate", first: true, predicate: ["start"], descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "endTemplate", first: true, predicate: ["end"], descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "submenuHeaderTemplate", first: true, predicate: ["submenuheader"], descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "menuRef", first: true, predicate: ["menu"], descendants: true, read: Menu$1, isSignal: true }], ngImport: i0, template: "<p-menu\n #menu\n [model]=\"transformedModel()\"\n [popup]=\"popup()\"\n [appendTo]=\"appendTo()\"\n [style]=\"style()\"\n [styleClass]=\"styleClass()\"\n [autoZIndex]=\"autoZIndex()\"\n [baseZIndex]=\"baseZIndex()\"\n [showTransitionOptions]=\"showTransitionOptions()\"\n [hideTransitionOptions]=\"hideTransitionOptions()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [id]=\"id()\"\n [tabindex]=\"tabindex()\"\n (onShow)=\"onShow.emit($event)\"\n (onHide)=\"onHide.emit($event)\"\n (onBlur)=\"onBlur.emit($event)\"\n (onFocus)=\"onFocus.emit($event)\"\n>\n @if (startTemplate()) {\n <ng-template pTemplate=\"start\">\n <ng-container *ngTemplateOutlet=\"startTemplate()!\" />\n </ng-template>\n }\n\n @if (endTemplate()) {\n <ng-template pTemplate=\"end\">\n <ng-container *ngTemplateOutlet=\"endTemplate()!\" />\n </ng-template>\n }\n\n @if (headerTemplate()) {\n <ng-template pTemplate=\"header\">\n <ng-container *ngTemplateOutlet=\"headerTemplate()!\" />\n </ng-template>\n }\n\n @if (submenuHeaderTemplate()) {\n <ng-template pTemplate=\"submenuheader\" let-item>\n <ng-container\n *ngTemplateOutlet=\"\n submenuHeaderTemplate()!;\n context: { $implicit: item }\n \"\n />\n </ng-template>\n }\n\n <ng-template pTemplate=\"item\" let-item>\n <div\n class=\"flex gap-2 align-middle p-2 cursor-pointer rounded transition-colors\"\n [
|
|
109
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: Menu, isStandalone: true, selector: "mt-menu", inputs: { model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null }, popup: { classPropertyName: "popup", publicName: "popup", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, autoZIndex: { classPropertyName: "autoZIndex", publicName: "autoZIndex", isSignal: true, isRequired: false, transformFunction: null }, baseZIndex: { classPropertyName: "baseZIndex", publicName: "baseZIndex", isSignal: true, isRequired: false, transformFunction: null }, showTransitionOptions: { classPropertyName: "showTransitionOptions", publicName: "showTransitionOptions", isSignal: true, isRequired: false, transformFunction: null }, hideTransitionOptions: { classPropertyName: "hideTransitionOptions", publicName: "hideTransitionOptions", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, activeItemId: { classPropertyName: "activeItemId", publicName: "activeItemId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeItemId: "activeItemIdChange", onShow: "onShow", onHide: "onHide", onBlur: "onBlur", onFocus: "onFocus", onItemSelect: "onItemSelect" }, queries: [{ propertyName: "startTemplate", first: true, predicate: ["start"], descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "endTemplate", first: true, predicate: ["end"], descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "submenuHeaderTemplate", first: true, predicate: ["submenuheader"], descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "menuRef", first: true, predicate: ["menu"], descendants: true, read: Menu$1, isSignal: true }], ngImport: i0, template: "<p-menu\n #menu\n [model]=\"transformedModel()\"\n [popup]=\"popup()\"\n [appendTo]=\"appendTo()\"\n [style]=\"style()\"\n [styleClass]=\"styleClass()\"\n [autoZIndex]=\"autoZIndex()\"\n [baseZIndex]=\"baseZIndex()\"\n [showTransitionOptions]=\"showTransitionOptions()\"\n [hideTransitionOptions]=\"hideTransitionOptions()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [id]=\"id()\"\n [tabindex]=\"tabindex()\"\n (onShow)=\"onShow.emit($event)\"\n (onHide)=\"onHide.emit($event)\"\n (onBlur)=\"onBlur.emit($event)\"\n (onFocus)=\"onFocus.emit($event)\"\n>\n @if (startTemplate()) {\n <ng-template pTemplate=\"start\">\n <ng-container *ngTemplateOutlet=\"startTemplate()!\" />\n </ng-template>\n }\n\n @if (endTemplate()) {\n <ng-template pTemplate=\"end\">\n <ng-container *ngTemplateOutlet=\"endTemplate()!\" />\n </ng-template>\n }\n\n @if (headerTemplate()) {\n <ng-template pTemplate=\"header\">\n <ng-container *ngTemplateOutlet=\"headerTemplate()!\" />\n </ng-template>\n }\n\n @if (submenuHeaderTemplate()) {\n <ng-template pTemplate=\"submenuheader\" let-item>\n <ng-container\n *ngTemplateOutlet=\"\n submenuHeaderTemplate()!;\n context: { $implicit: item }\n \"\n />\n </ng-template>\n }\n\n <ng-template pTemplate=\"item\" let-item>\n <div\n class=\"flex gap-2 align-middle p-2 cursor-pointer rounded transition-colors\"\n [class]=\"item.computedClass\"\n >\n @if (getItemIcon(item)) {\n <mt-icon\n [icon]=\"getItemIcon(item)!\"\n class=\"p-menu-item-icon\"\n [style.color]=\"'inherit'\"\n />\n }\n @if (item.label) {\n <span class=\"p-menu-item-label\">{{ item.label }}</span>\n }\n @if (item.badge) {\n <span class=\"p-menu-item-badge\">{{ item.badge }}</span>\n }\n </div>\n </ng-template>\n</p-menu>\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "component", type: Menu$1, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex", "appendTo"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "ngmodule", type: SharedModule }, { kind: "directive", type: i1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
81
110
|
}
|
|
82
111
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: Menu, decorators: [{
|
|
83
112
|
type: Component,
|
|
84
|
-
args: [{ selector: 'mt-menu', standalone: true, imports: [Menu$1, Icon, SharedModule,
|
|
113
|
+
args: [{ selector: 'mt-menu', standalone: true, imports: [Menu$1, Icon, SharedModule, NgTemplateOutlet], template: "<p-menu\n #menu\n [model]=\"transformedModel()\"\n [popup]=\"popup()\"\n [appendTo]=\"appendTo()\"\n [style]=\"style()\"\n [styleClass]=\"styleClass()\"\n [autoZIndex]=\"autoZIndex()\"\n [baseZIndex]=\"baseZIndex()\"\n [showTransitionOptions]=\"showTransitionOptions()\"\n [hideTransitionOptions]=\"hideTransitionOptions()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [id]=\"id()\"\n [tabindex]=\"tabindex()\"\n (onShow)=\"onShow.emit($event)\"\n (onHide)=\"onHide.emit($event)\"\n (onBlur)=\"onBlur.emit($event)\"\n (onFocus)=\"onFocus.emit($event)\"\n>\n @if (startTemplate()) {\n <ng-template pTemplate=\"start\">\n <ng-container *ngTemplateOutlet=\"startTemplate()!\" />\n </ng-template>\n }\n\n @if (endTemplate()) {\n <ng-template pTemplate=\"end\">\n <ng-container *ngTemplateOutlet=\"endTemplate()!\" />\n </ng-template>\n }\n\n @if (headerTemplate()) {\n <ng-template pTemplate=\"header\">\n <ng-container *ngTemplateOutlet=\"headerTemplate()!\" />\n </ng-template>\n }\n\n @if (submenuHeaderTemplate()) {\n <ng-template pTemplate=\"submenuheader\" let-item>\n <ng-container\n *ngTemplateOutlet=\"\n submenuHeaderTemplate()!;\n context: { $implicit: item }\n \"\n />\n </ng-template>\n }\n\n <ng-template pTemplate=\"item\" let-item>\n <div\n class=\"flex gap-2 align-middle p-2 cursor-pointer rounded transition-colors\"\n [class]=\"item.computedClass\"\n >\n @if (getItemIcon(item)) {\n <mt-icon\n [icon]=\"getItemIcon(item)!\"\n class=\"p-menu-item-icon\"\n [style.color]=\"'inherit'\"\n />\n }\n @if (item.label) {\n <span class=\"p-menu-item-label\">{{ item.label }}</span>\n }\n @if (item.badge) {\n <span class=\"p-menu-item-badge\">{{ item.badge }}</span>\n }\n </div>\n </ng-template>\n</p-menu>\n", styles: [":host{display:contents}\n"] }]
|
|
85
114
|
}] });
|
|
86
115
|
|
|
87
116
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-components-menu.mjs","sources":["../../../../packages/masterteam/components/menu/menu.ts","../../../../packages/masterteam/components/menu/menu.html","../../../../packages/masterteam/components/menu/masterteam-components-menu.ts"],"sourcesContent":["import {\n Component,\n input,\n output,\n booleanAttribute,\n computed,\n viewChild,\n contentChild,\n TemplateRef,\n} from '@angular/core';\nimport { Menu as PrimeMenu } from 'primeng/menu';\nimport { MenuItem, SharedModule } from 'primeng/api';\nimport { Icon, MTIcon } from '@masterteam/icons';\nimport { ButtonSeverity } from 'primeng/button';\nimport { NgClass, NgTemplateOutlet } from '@angular/common';\n\nexport interface MTMenuItem extends Omit<MenuItem, 'icon'> {\n icon?: MTIcon;\n severity?: ButtonSeverity | 'danger';\n styleClass?: string;\n}\n\n@Component({\n selector: 'mt-menu',\n standalone: true,\n imports: [PrimeMenu, Icon, SharedModule, NgClass, NgTemplateOutlet],\n templateUrl: './menu.html',\n styleUrls: ['./menu.scss'],\n})\nexport class Menu {\n menuRef = viewChild.required('menu', { read: PrimeMenu });\n\n readonly startTemplate = contentChild('start', { read: TemplateRef });\n readonly endTemplate = contentChild('end', { read: TemplateRef });\n readonly headerTemplate = contentChild('header', { read: TemplateRef });\n readonly submenuHeaderTemplate = contentChild('submenuheader', {\n read: TemplateRef,\n });\n\n readonly model = input<MTMenuItem[]>([]);\n readonly popup = input<boolean, unknown>(true, {\n transform: booleanAttribute,\n });\n readonly appendTo = input<any>('body');\n readonly style = input<{ [klass: string]: any } | null>();\n readonly styleClass = input<string>();\n readonly autoZIndex = input<boolean, unknown>(true, {\n transform: booleanAttribute,\n });\n readonly baseZIndex = input<number>(0);\n readonly showTransitionOptions = input<string>(\n '0.12s cubic-bezier(0, 0, 0.2, 1)',\n );\n readonly hideTransitionOptions = input<string>('0.1s linear');\n readonly ariaLabel = input<string>();\n readonly ariaLabelledBy = input<string>();\n readonly id = input<string>();\n readonly tabindex = input<number>(0);\n\n readonly onShow = output<any>();\n readonly onHide = output<any>();\n readonly onBlur = output<Event>();\n readonly onFocus = output<Event>();\n\n transformedModel = computed(() => {\n return this.model().map((item) => this.transformMenuItem(item));\n });\n\n private transformMenuItem(item: MTMenuItem): any {\n const transformed: any = { ...item };\n\n if (item.icon) {\n transformed.mtIcon = item.icon;\n delete transformed.icon;\n }\n\n if (item.severity) {\n transformed.severityClass = this.getSeverityClass(item.severity);\n }\n\n if (item['items']) {\n transformed['items'] = item['items'].map((subItem: any) =>\n this.transformMenuItem(subItem as MTMenuItem),\n );\n }\n\n return transformed;\n }\n\n private getSeverityClass(severity: string): string {\n const severityMap: Record<string, string> = {\n danger: 'text-red-600 hover:bg-red-50 hover:text-red-700',\n warn: 'text-yellow-600 hover:bg-yellow-50 hover:text-yellow-700',\n success: 'text-green-600 hover:bg-green-50 hover:text-green-700',\n info: 'text-blue-600 hover:bg-blue-50 hover:text-blue-700',\n help: 'text-purple-600 hover:bg-purple-50 hover:text-purple-700',\n secondary: 'text-gray-600 hover:bg-gray-50 hover:text-gray-700',\n contrast: 'text-gray-900 hover:bg-gray-100',\n };\n\n return severityMap[severity] || '';\n }\n\n getItemIcon(item: any): MTIcon | undefined {\n return item?.mtIcon;\n }\n\n toggle(event: Event): void {\n this.menuRef().toggle(event);\n }\n\n show(event: Event): void {\n this.menuRef().show(event);\n }\n\n hide(): void {\n this.menuRef().hide();\n }\n}\n","<p-menu\n #menu\n [model]=\"transformedModel()\"\n [popup]=\"popup()\"\n [appendTo]=\"appendTo()\"\n [style]=\"style()\"\n [styleClass]=\"styleClass()\"\n [autoZIndex]=\"autoZIndex()\"\n [baseZIndex]=\"baseZIndex()\"\n [showTransitionOptions]=\"showTransitionOptions()\"\n [hideTransitionOptions]=\"hideTransitionOptions()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [id]=\"id()\"\n [tabindex]=\"tabindex()\"\n (onShow)=\"onShow.emit($event)\"\n (onHide)=\"onHide.emit($event)\"\n (onBlur)=\"onBlur.emit($event)\"\n (onFocus)=\"onFocus.emit($event)\"\n>\n @if (startTemplate()) {\n <ng-template pTemplate=\"start\">\n <ng-container *ngTemplateOutlet=\"startTemplate()!\" />\n </ng-template>\n }\n\n @if (endTemplate()) {\n <ng-template pTemplate=\"end\">\n <ng-container *ngTemplateOutlet=\"endTemplate()!\" />\n </ng-template>\n }\n\n @if (headerTemplate()) {\n <ng-template pTemplate=\"header\">\n <ng-container *ngTemplateOutlet=\"headerTemplate()!\" />\n </ng-template>\n }\n\n @if (submenuHeaderTemplate()) {\n <ng-template pTemplate=\"submenuheader\" let-item>\n <ng-container\n *ngTemplateOutlet=\"\n submenuHeaderTemplate()!;\n context: { $implicit: item }\n \"\n />\n </ng-template>\n }\n\n <ng-template pTemplate=\"item\" let-item>\n <div\n class=\"flex gap-2 align-middle p-2 cursor-pointer rounded transition-colors\"\n [ngClass]=\"[item.severityClass || '', item.styleClass || '']\"\n >\n @if (getItemIcon(item)) {\n <mt-icon\n [icon]=\"getItemIcon(item)!\"\n class=\"p-menu-item-icon\"\n [style.color]=\"'inherit'\"\n />\n }\n @if (item.label) {\n <span class=\"p-menu-item-label\">{{ item.label }}</span>\n }\n @if (item.badge) {\n <span class=\"p-menu-item-badge\">{{ item.badge }}</span>\n }\n </div>\n </ng-template>\n</p-menu>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["PrimeMenu"],"mappings":";;;;;;;;MA6Ba,IAAI,CAAA;AACf,IAAA,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,IAAI,EAAEA,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,QAAA,EAAA,SAAS,EAAA,UAAA,EACP,IAAI,EAAA,OAAA,EACP,CAACA,MAAS,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAAA,w8DAAA,EAAA,MAAA,EAAA,CAAA,2BAAA,CAAA,EAAA;;;AEzBrE;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"masterteam-components-menu.mjs","sources":["../../../../packages/masterteam/components/menu/menu.ts","../../../../packages/masterteam/components/menu/menu.html","../../../../packages/masterteam/components/menu/masterteam-components-menu.ts"],"sourcesContent":["import {\n Component,\n input,\n output,\n booleanAttribute,\n computed,\n viewChild,\n contentChild,\n TemplateRef,\n model,\n} from '@angular/core';\nimport { Menu as PrimeMenu } from 'primeng/menu';\nimport { MenuItem, SharedModule } from 'primeng/api';\nimport { Icon, MTIcon } from '@masterteam/icons';\nimport { ButtonSeverity } from 'primeng/button';\nimport { NgTemplateOutlet } from '@angular/common';\n\nexport interface MTMenuItem extends Omit<MenuItem, 'icon'> {\n icon?: MTIcon;\n severity?: ButtonSeverity | 'danger';\n styleClass?: string;\n id?: string | number;\n}\n\n@Component({\n selector: 'mt-menu',\n standalone: true,\n imports: [PrimeMenu, Icon, SharedModule, NgTemplateOutlet],\n templateUrl: './menu.html',\n styleUrls: ['./menu.scss'],\n})\nexport class Menu {\n menuRef = viewChild.required('menu', { read: PrimeMenu });\n\n readonly startTemplate = contentChild('start', { read: TemplateRef });\n readonly endTemplate = contentChild('end', { read: TemplateRef });\n readonly headerTemplate = contentChild('header', { read: TemplateRef });\n readonly submenuHeaderTemplate = contentChild('submenuheader', {\n read: TemplateRef,\n });\n\n readonly model = input<MTMenuItem[]>([]);\n readonly popup = input<boolean, unknown>(true, {\n transform: booleanAttribute,\n });\n readonly appendTo = input<any>('body');\n readonly style = input<Record<string, any> | null>();\n readonly styleClass = input<string>();\n readonly autoZIndex = input<boolean, unknown>(true, {\n transform: booleanAttribute,\n });\n readonly baseZIndex = input<number>(0);\n readonly showTransitionOptions = input<string>(\n '0.12s cubic-bezier(0, 0, 0.2, 1)',\n );\n readonly hideTransitionOptions = input<string>('0.1s linear');\n readonly ariaLabel = input<string>();\n readonly ariaLabelledBy = input<string>();\n readonly id = input<string>();\n readonly tabindex = input<number>(0);\n\n readonly activeItemId = model<string | number | undefined>();\n\n readonly onShow = output<any>();\n readonly onHide = output<any>();\n readonly onBlur = output<Event>();\n readonly onFocus = output<Event>();\n readonly onItemSelect = output<MTMenuItem>();\n\n transformedModel = computed(() => {\n return this.model().map((item) =>\n this.transformMenuItem(item, this.activeItemId()),\n );\n });\n\n toggle(event: Event): void {\n this.menuRef().toggle(event);\n }\n\n show(event: Event): void {\n this.menuRef().show(event);\n }\n\n hide(): void {\n this.menuRef().hide();\n }\n\n protected getItemIcon(item: any): MTIcon | undefined {\n return item?.mtIcon;\n }\n\n private transformMenuItem(item: MTMenuItem, activeId?: string | number): any {\n const transformed: any = { ...item };\n\n if (item.icon) {\n transformed.mtIcon = item.icon;\n delete transformed.icon;\n }\n\n const classes: string[] = [];\n const isActive = activeId && item.id && item.id === activeId;\n\n if (isActive) {\n classes.push(\n 'bg-primary-50',\n 'text-primary-700',\n 'dark:bg-primary-900/20',\n 'dark:text-primary-300',\n );\n } else if (item.severity) {\n const severityClass = this.getSeverityClass(item.severity);\n if (severityClass) {\n classes.push(severityClass);\n }\n }\n\n if (item.styleClass) {\n classes.push(item.styleClass);\n }\n\n transformed.computedClass = classes.join(' ');\n\n if (item['items']) {\n transformed['items'] = item['items'].map((subItem: any) =>\n this.transformMenuItem(subItem as MTMenuItem, activeId),\n );\n }\n\n const originalCommand = transformed.command;\n transformed.command = (event: any) => {\n if (item.id) {\n this.handleItemSelect(item);\n }\n\n if (originalCommand) {\n originalCommand(event);\n }\n };\n\n return transformed;\n }\n\n private getSeverityClass(severity: string): string {\n const severityMap: Record<string, string> = {\n danger: 'text-red-600 hover:bg-red-50 hover:text-red-700',\n warn: 'text-yellow-600 hover:bg-yellow-50 hover:text-yellow-700',\n success: 'text-green-600 hover:bg-green-50 hover:text-green-700',\n info: 'text-blue-600 hover:bg-blue-50 hover:text-blue-700',\n help: 'text-purple-600 hover:bg-purple-50 hover:text-purple-700',\n secondary: 'text-gray-600 hover:bg-gray-50 hover:text-gray-700',\n contrast: 'text-gray-900 hover:bg-gray-100',\n };\n\n return severityMap[severity] || '';\n }\n\n private handleItemSelect(item: MTMenuItem): void {\n if (item.id) {\n this.activeItemId.set(item.id);\n }\n this.onItemSelect.emit(item);\n }\n}\n","<p-menu\n #menu\n [model]=\"transformedModel()\"\n [popup]=\"popup()\"\n [appendTo]=\"appendTo()\"\n [style]=\"style()\"\n [styleClass]=\"styleClass()\"\n [autoZIndex]=\"autoZIndex()\"\n [baseZIndex]=\"baseZIndex()\"\n [showTransitionOptions]=\"showTransitionOptions()\"\n [hideTransitionOptions]=\"hideTransitionOptions()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [id]=\"id()\"\n [tabindex]=\"tabindex()\"\n (onShow)=\"onShow.emit($event)\"\n (onHide)=\"onHide.emit($event)\"\n (onBlur)=\"onBlur.emit($event)\"\n (onFocus)=\"onFocus.emit($event)\"\n>\n @if (startTemplate()) {\n <ng-template pTemplate=\"start\">\n <ng-container *ngTemplateOutlet=\"startTemplate()!\" />\n </ng-template>\n }\n\n @if (endTemplate()) {\n <ng-template pTemplate=\"end\">\n <ng-container *ngTemplateOutlet=\"endTemplate()!\" />\n </ng-template>\n }\n\n @if (headerTemplate()) {\n <ng-template pTemplate=\"header\">\n <ng-container *ngTemplateOutlet=\"headerTemplate()!\" />\n </ng-template>\n }\n\n @if (submenuHeaderTemplate()) {\n <ng-template pTemplate=\"submenuheader\" let-item>\n <ng-container\n *ngTemplateOutlet=\"\n submenuHeaderTemplate()!;\n context: { $implicit: item }\n \"\n />\n </ng-template>\n }\n\n <ng-template pTemplate=\"item\" let-item>\n <div\n class=\"flex gap-2 align-middle p-2 cursor-pointer rounded transition-colors\"\n [class]=\"item.computedClass\"\n >\n @if (getItemIcon(item)) {\n <mt-icon\n [icon]=\"getItemIcon(item)!\"\n class=\"p-menu-item-icon\"\n [style.color]=\"'inherit'\"\n />\n }\n @if (item.label) {\n <span class=\"p-menu-item-label\">{{ item.label }}</span>\n }\n @if (item.badge) {\n <span class=\"p-menu-item-badge\">{{ item.badge }}</span>\n }\n </div>\n </ng-template>\n</p-menu>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["PrimeMenu"],"mappings":";;;;;;;;MA+Ba,IAAI,CAAA;AACf,IAAA,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,IAAI,EAAEA,MAAS,EAAE,CAAC;AAEhD,IAAA,aAAa,GAAG,YAAY,CAAC,OAAO,iDAAI,IAAI,EAAE,WAAW,EAAA,CAAA,GAAA,CAAnB,EAAE,IAAI,EAAE,WAAW,EAAE,GAAC;AAC5D,IAAA,WAAW,GAAG,YAAY,CAAC,KAAK,+CAAI,IAAI,EAAE,WAAW,EAAA,CAAA,GAAA,CAAnB,EAAE,IAAI,EAAE,WAAW,EAAE,GAAC;AACxD,IAAA,cAAc,GAAG,YAAY,CAAC,QAAQ,kDAAI,IAAI,EAAE,WAAW,EAAA,CAAA,GAAA,CAAnB,EAAE,IAAI,EAAE,WAAW,EAAE,GAAC;IAC9D,qBAAqB,GAAG,YAAY,CAAC,eAAe,yDAC3D,IAAI,EAAE,WAAW,EAAA,CAAA,GAAA,CAD4C;AAC7D,YAAA,IAAI,EAAE,WAAW;AAClB,SAAA,CAAA,CAAA,CAAC;AAEO,IAAA,KAAK,GAAG,KAAK,CAAe,EAAE,iDAAC;IAC/B,KAAK,GAAG,KAAK,CAAmB,IAAI,yCAC3C,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CADkB;AAC7C,YAAA,SAAS,EAAE,gBAAgB;AAC5B,SAAA,CAAA,CAAA,CAAC;AACO,I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AA,EAAA,IAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,QAAA,EAAA,QAAA,EAAA,QAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,IAAI,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,YAAY,sIAAE,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAI9C,IAAI,EAAA,UAAA,EAAA,CAAA;kBAPhB,SAAS;+BACE,SAAS,EAAA,UAAA,EACP,IAAI,EAAA,OAAA,EACP,CAACA,MAAS,EAAE,IAAI,EAAE,YAAY,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAAA,u6DAAA,EAAA,MAAA,EAAA,CAAA,2BAAA,CAAA,EAAA;;;AE3B5D;;AAEG;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { DrawerService } from '@masterteam/components/dynamic-drawer';
|
|
2
|
+
import { DialogService } from '@masterteam/components/dialog';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { inject, Injectable } from '@angular/core';
|
|
5
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
6
|
+
|
|
7
|
+
class ModalService {
|
|
8
|
+
drawerService = inject(DrawerService);
|
|
9
|
+
dialogService = inject(DialogService);
|
|
10
|
+
dir = inject(Directionality, { optional: true });
|
|
11
|
+
footerClass = 'mt-modal-footer';
|
|
12
|
+
contentClass = 'mt-modal-content';
|
|
13
|
+
modalConfig;
|
|
14
|
+
openModal(component, modalType, config) {
|
|
15
|
+
let ref;
|
|
16
|
+
if (modalType === 'drawer') {
|
|
17
|
+
config.position = this.handelStartEndPosition(config.position);
|
|
18
|
+
console.log('Opening drawer with config:', config);
|
|
19
|
+
ref = this.drawerService.open(component, config);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
ref = this.dialogService.open(component, config);
|
|
23
|
+
}
|
|
24
|
+
return ref;
|
|
25
|
+
}
|
|
26
|
+
handelStartEndPosition(position) {
|
|
27
|
+
if (position === 'start') {
|
|
28
|
+
return this.dir?.value === 'rtl' ? 'right' : 'left';
|
|
29
|
+
}
|
|
30
|
+
else if (position === 'end') {
|
|
31
|
+
return this.dir?.value === 'rtl' ? 'left' : 'right';
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
return position || 'left';
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
38
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ModalService, providedIn: 'root' });
|
|
39
|
+
}
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ModalService, decorators: [{
|
|
41
|
+
type: Injectable,
|
|
42
|
+
args: [{ providedIn: 'root' }]
|
|
43
|
+
}] });
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Generated bundle index. Do not edit.
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
export { ModalService };
|
|
50
|
+
//# sourceMappingURL=masterteam-components-modal.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"masterteam-components-modal.mjs","sources":["../../../../packages/masterteam/components/modal/modal.ts","../../../../packages/masterteam/components/modal/masterteam-components-modal.ts"],"sourcesContent":["import {\n DynamicDrawerConfigInterface,\n DrawerService,\n} from '@masterteam/components/dynamic-drawer';\nimport {\n DynamicDialogConfig,\n DialogService,\n} from '@masterteam/components/dialog';\nimport { inject, Injectable } from '@angular/core';\nimport { Directionality } from '@angular/cdk/bidi'; // Import from Angular CDK\n\n@Injectable({ providedIn: 'root' })\nexport class ModalService {\n readonly drawerService: DrawerService = inject(DrawerService);\n readonly dialogService: DialogService = inject(DialogService);\n private dir = inject(Directionality, { optional: true });\n\n footerClass: string = 'mt-modal-footer';\n contentClass: string = 'mt-modal-content';\n modalConfig: any;\n\n openModal(\n component: any,\n modalType: 'drawer' | 'dialog',\n config: DynamicDialogConfig | DynamicDrawerConfigInterface,\n ) {\n let ref: any;\n if (modalType === 'drawer') {\n config.position = this.handelStartEndPosition(config.position);\n console.log('Opening drawer with config:', config);\n ref = this.drawerService.open(component, config);\n } else {\n ref = this.dialogService.open(component, config);\n }\n\n return ref;\n }\n\n handelStartEndPosition(position: string | undefined) {\n if (position === 'start') {\n return this.dir?.value === 'rtl' ? 'right' : 'left';\n } else if (position === 'end') {\n return this.dir?.value === 'rtl' ? 'left' : 'right';\n } else {\n return position || 'left';\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAYa,YAAY,CAAA;AACd,IAAA,aAAa,GAAkB,MAAM,CAAC,aAAa,CAAC;AACpD,IAAA,aAAa,GAAkB,MAAM,CAAC,aAAa,CAAC;IACrD,GAAG,GAAG,MAAM,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAExD,WAAW,GAAW,iBAAiB;IACvC,YAAY,GAAW,kBAAkB;AACzC,IAAA,WAAW;AAEX,IAAA,SAAS,CACP,SAAc,EACd,SAA8B,EAC9B,MAA0D,EAAA;AAE1D,QAAA,IAAI,GAAQ;AACZ,QAAA,IAAI,SAAS,KAAK,QAAQ,EAAE;YAC1B,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,sBAAsB,CAAC,MAAM,CAAC,QAAQ,CAAC;AAC9D,YAAA,OAAO,CAAC,GAAG,CAAC,6BAA6B,EAAE,MAAM,CAAC;YAClD,GAAG,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC;QAClD;aAAO;YACL,GAAG,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC;QAClD;AAEA,QAAA,OAAO,GAAG;IACZ;AAEA,IAAA,sBAAsB,CAAC,QAA4B,EAAA;AACjD,QAAA,IAAI,QAAQ,KAAK,OAAO,EAAE;AACxB,YAAA,OAAO,IAAI,CAAC,GAAG,EAAE,KAAK,KAAK,KAAK,GAAG,OAAO,GAAG,MAAM;QACrD;AAAO,aAAA,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC7B,YAAA,OAAO,IAAI,CAAC,GAAG,EAAE,KAAK,KAAK,KAAK,GAAG,MAAM,GAAG,OAAO;QACrD;aAAO;YACL,OAAO,QAAQ,IAAI,MAAM;QAC3B;IACF;uGAlCW,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cADC,MAAM,EAAA,CAAA;;2FACnB,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACXlC;;AAEG;;;;"}
|
package/menu/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ interface MTMenuItem extends Omit<MenuItem, 'icon'> {
|
|
|
9
9
|
icon?: MTIcon;
|
|
10
10
|
severity?: ButtonSeverity | 'danger';
|
|
11
11
|
styleClass?: string;
|
|
12
|
+
id?: string | number;
|
|
12
13
|
}
|
|
13
14
|
declare class Menu {
|
|
14
15
|
menuRef: _angular_core.Signal<Menu$1>;
|
|
@@ -19,9 +20,7 @@ declare class Menu {
|
|
|
19
20
|
readonly model: _angular_core.InputSignal<MTMenuItem[]>;
|
|
20
21
|
readonly popup: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
21
22
|
readonly appendTo: _angular_core.InputSignal<any>;
|
|
22
|
-
readonly style: _angular_core.InputSignal<
|
|
23
|
-
[klass: string]: any;
|
|
24
|
-
} | null | undefined>;
|
|
23
|
+
readonly style: _angular_core.InputSignal<Record<string, any> | null | undefined>;
|
|
25
24
|
readonly styleClass: _angular_core.InputSignal<string | undefined>;
|
|
26
25
|
readonly autoZIndex: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
27
26
|
readonly baseZIndex: _angular_core.InputSignal<number>;
|
|
@@ -31,19 +30,22 @@ declare class Menu {
|
|
|
31
30
|
readonly ariaLabelledBy: _angular_core.InputSignal<string | undefined>;
|
|
32
31
|
readonly id: _angular_core.InputSignal<string | undefined>;
|
|
33
32
|
readonly tabindex: _angular_core.InputSignal<number>;
|
|
33
|
+
readonly activeItemId: _angular_core.ModelSignal<string | number | undefined>;
|
|
34
34
|
readonly onShow: _angular_core.OutputEmitterRef<any>;
|
|
35
35
|
readonly onHide: _angular_core.OutputEmitterRef<any>;
|
|
36
36
|
readonly onBlur: _angular_core.OutputEmitterRef<Event>;
|
|
37
37
|
readonly onFocus: _angular_core.OutputEmitterRef<Event>;
|
|
38
|
+
readonly onItemSelect: _angular_core.OutputEmitterRef<MTMenuItem>;
|
|
38
39
|
transformedModel: _angular_core.Signal<any[]>;
|
|
39
|
-
private transformMenuItem;
|
|
40
|
-
private getSeverityClass;
|
|
41
|
-
getItemIcon(item: any): MTIcon | undefined;
|
|
42
40
|
toggle(event: Event): void;
|
|
43
41
|
show(event: Event): void;
|
|
44
42
|
hide(): void;
|
|
43
|
+
protected getItemIcon(item: any): MTIcon | undefined;
|
|
44
|
+
private transformMenuItem;
|
|
45
|
+
private getSeverityClass;
|
|
46
|
+
private handleItemSelect;
|
|
45
47
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Menu, never>;
|
|
46
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Menu, "mt-menu", never, { "model": { "alias": "model"; "required": false; "isSignal": true; }; "popup": { "alias": "popup"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; "autoZIndex": { "alias": "autoZIndex"; "required": false; "isSignal": true; }; "baseZIndex": { "alias": "baseZIndex"; "required": false; "isSignal": true; }; "showTransitionOptions": { "alias": "showTransitionOptions"; "required": false; "isSignal": true; }; "hideTransitionOptions": { "alias": "hideTransitionOptions"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; }, { "onShow": "onShow"; "onHide": "onHide"; "onBlur": "onBlur"; "onFocus": "onFocus"; }, ["startTemplate", "endTemplate", "headerTemplate", "submenuHeaderTemplate"], never, true, never>;
|
|
48
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Menu, "mt-menu", never, { "model": { "alias": "model"; "required": false; "isSignal": true; }; "popup": { "alias": "popup"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; "autoZIndex": { "alias": "autoZIndex"; "required": false; "isSignal": true; }; "baseZIndex": { "alias": "baseZIndex"; "required": false; "isSignal": true; }; "showTransitionOptions": { "alias": "showTransitionOptions"; "required": false; "isSignal": true; }; "hideTransitionOptions": { "alias": "hideTransitionOptions"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; "activeItemId": { "alias": "activeItemId"; "required": false; "isSignal": true; }; }, { "activeItemId": "activeItemIdChange"; "onShow": "onShow"; "onHide": "onHide"; "onBlur": "onBlur"; "onFocus": "onFocus"; "onItemSelect": "onItemSelect"; }, ["startTemplate", "endTemplate", "headerTemplate", "submenuHeaderTemplate"], never, true, never>;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
export { Menu };
|
package/modal/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DrawerService, DynamicDrawerConfigInterface } from '@masterteam/components/dynamic-drawer';
|
|
2
|
+
import { DialogService, DynamicDialogConfig } from '@masterteam/components/dialog';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
|
|
5
|
+
declare class ModalService {
|
|
6
|
+
readonly drawerService: DrawerService;
|
|
7
|
+
readonly dialogService: DialogService;
|
|
8
|
+
private dir;
|
|
9
|
+
footerClass: string;
|
|
10
|
+
contentClass: string;
|
|
11
|
+
modalConfig: any;
|
|
12
|
+
openModal(component: any, modalType: 'drawer' | 'dialog', config: DynamicDialogConfig | DynamicDrawerConfigInterface): any;
|
|
13
|
+
handelStartEndPosition(position: string | undefined): string;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ModalService>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { ModalService };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masterteam/components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.31",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"directory": ".",
|
|
6
6
|
"linkDirectory": false,
|
|
@@ -39,86 +39,94 @@
|
|
|
39
39
|
"types": "./index.d.ts",
|
|
40
40
|
"default": "./fesm2022/masterteam-components.mjs"
|
|
41
41
|
},
|
|
42
|
-
"./avatar": {
|
|
43
|
-
"types": "./avatar/index.d.ts",
|
|
44
|
-
"default": "./fesm2022/masterteam-components-avatar.mjs"
|
|
45
|
-
},
|
|
46
42
|
"./breadcrumb": {
|
|
47
43
|
"types": "./breadcrumb/index.d.ts",
|
|
48
44
|
"default": "./fesm2022/masterteam-components-breadcrumb.mjs"
|
|
49
45
|
},
|
|
50
|
-
"./
|
|
51
|
-
"types": "./
|
|
52
|
-
"default": "./fesm2022/masterteam-components-
|
|
46
|
+
"./button-group": {
|
|
47
|
+
"types": "./button-group/index.d.ts",
|
|
48
|
+
"default": "./fesm2022/masterteam-components-button-group.mjs"
|
|
53
49
|
},
|
|
54
50
|
"./button": {
|
|
55
51
|
"types": "./button/index.d.ts",
|
|
56
52
|
"default": "./fesm2022/masterteam-components-button.mjs"
|
|
57
53
|
},
|
|
58
|
-
"./
|
|
59
|
-
"types": "./
|
|
60
|
-
"default": "./fesm2022/masterteam-components-
|
|
61
|
-
},
|
|
62
|
-
"./chip": {
|
|
63
|
-
"types": "./chip/index.d.ts",
|
|
64
|
-
"default": "./fesm2022/masterteam-components-chip.mjs"
|
|
54
|
+
"./avatar": {
|
|
55
|
+
"types": "./avatar/index.d.ts",
|
|
56
|
+
"default": "./fesm2022/masterteam-components-avatar.mjs"
|
|
65
57
|
},
|
|
66
58
|
"./card": {
|
|
67
59
|
"types": "./card/index.d.ts",
|
|
68
60
|
"default": "./fesm2022/masterteam-components-card.mjs"
|
|
69
61
|
},
|
|
70
|
-
"./
|
|
71
|
-
"types": "./
|
|
72
|
-
"default": "./fesm2022/masterteam-components-
|
|
62
|
+
"./avatar-text": {
|
|
63
|
+
"types": "./avatar-text/index.d.ts",
|
|
64
|
+
"default": "./fesm2022/masterteam-components-avatar-text.mjs"
|
|
73
65
|
},
|
|
74
66
|
"./checkbox-field": {
|
|
75
67
|
"types": "./checkbox-field/index.d.ts",
|
|
76
68
|
"default": "./fesm2022/masterteam-components-checkbox-field.mjs"
|
|
77
69
|
},
|
|
70
|
+
"./color-picker-field": {
|
|
71
|
+
"types": "./color-picker-field/index.d.ts",
|
|
72
|
+
"default": "./fesm2022/masterteam-components-color-picker-field.mjs"
|
|
73
|
+
},
|
|
74
|
+
"./dialog": {
|
|
75
|
+
"types": "./dialog/index.d.ts",
|
|
76
|
+
"default": "./fesm2022/masterteam-components-dialog.mjs"
|
|
77
|
+
},
|
|
78
78
|
"./date-field": {
|
|
79
79
|
"types": "./date-field/index.d.ts",
|
|
80
80
|
"default": "./fesm2022/masterteam-components-date-field.mjs"
|
|
81
81
|
},
|
|
82
|
+
"./chip": {
|
|
83
|
+
"types": "./chip/index.d.ts",
|
|
84
|
+
"default": "./fesm2022/masterteam-components-chip.mjs"
|
|
85
|
+
},
|
|
86
|
+
"./dynamic-drawer": {
|
|
87
|
+
"types": "./dynamic-drawer/index.d.ts",
|
|
88
|
+
"default": "./fesm2022/masterteam-components-dynamic-drawer.mjs"
|
|
89
|
+
},
|
|
82
90
|
"./drawer": {
|
|
83
91
|
"types": "./drawer/index.d.ts",
|
|
84
92
|
"default": "./fesm2022/masterteam-components-drawer.mjs"
|
|
85
93
|
},
|
|
86
|
-
"./
|
|
87
|
-
"types": "./
|
|
88
|
-
"default": "./fesm2022/masterteam-components-
|
|
94
|
+
"./editor-field": {
|
|
95
|
+
"types": "./editor-field/index.d.ts",
|
|
96
|
+
"default": "./fesm2022/masterteam-components-editor-field.mjs"
|
|
89
97
|
},
|
|
90
98
|
"./field-validation": {
|
|
91
99
|
"types": "./field-validation/index.d.ts",
|
|
92
100
|
"default": "./fesm2022/masterteam-components-field-validation.mjs"
|
|
93
101
|
},
|
|
94
|
-
"./
|
|
95
|
-
"types": "./
|
|
96
|
-
"default": "./fesm2022/masterteam-components-
|
|
102
|
+
"./list": {
|
|
103
|
+
"types": "./list/index.d.ts",
|
|
104
|
+
"default": "./fesm2022/masterteam-components-list.mjs"
|
|
105
|
+
},
|
|
106
|
+
"./icon-field": {
|
|
107
|
+
"types": "./icon-field/index.d.ts",
|
|
108
|
+
"default": "./fesm2022/masterteam-components-icon-field.mjs"
|
|
97
109
|
},
|
|
98
110
|
"./formula-builder": {
|
|
99
111
|
"types": "./formula-builder/index.d.ts",
|
|
100
112
|
"default": "./fesm2022/masterteam-components-formula-builder.mjs"
|
|
101
113
|
},
|
|
102
|
-
"./
|
|
103
|
-
"types": "./
|
|
104
|
-
"default": "./fesm2022/masterteam-components-
|
|
114
|
+
"./modal": {
|
|
115
|
+
"types": "./modal/index.d.ts",
|
|
116
|
+
"default": "./fesm2022/masterteam-components-modal.mjs"
|
|
105
117
|
},
|
|
106
118
|
"./module-summary-card": {
|
|
107
119
|
"types": "./module-summary-card/index.d.ts",
|
|
108
120
|
"default": "./fesm2022/masterteam-components-module-summary-card.mjs"
|
|
109
121
|
},
|
|
110
|
-
"./menu": {
|
|
111
|
-
"types": "./menu/index.d.ts",
|
|
112
|
-
"default": "./fesm2022/masterteam-components-menu.mjs"
|
|
113
|
-
},
|
|
114
|
-
"./list": {
|
|
115
|
-
"types": "./list/index.d.ts",
|
|
116
|
-
"default": "./fesm2022/masterteam-components-list.mjs"
|
|
117
|
-
},
|
|
118
122
|
"./multi-select-field": {
|
|
119
123
|
"types": "./multi-select-field/index.d.ts",
|
|
120
124
|
"default": "./fesm2022/masterteam-components-multi-select-field.mjs"
|
|
121
125
|
},
|
|
126
|
+
"./menu": {
|
|
127
|
+
"types": "./menu/index.d.ts",
|
|
128
|
+
"default": "./fesm2022/masterteam-components-menu.mjs"
|
|
129
|
+
},
|
|
122
130
|
"./number-field": {
|
|
123
131
|
"types": "./number-field/index.d.ts",
|
|
124
132
|
"default": "./fesm2022/masterteam-components-number-field.mjs"
|
|
@@ -127,17 +135,13 @@
|
|
|
127
135
|
"types": "./paginator/index.d.ts",
|
|
128
136
|
"default": "./fesm2022/masterteam-components-paginator.mjs"
|
|
129
137
|
},
|
|
130
|
-
"./radio-cards": {
|
|
131
|
-
"types": "./radio-cards/index.d.ts",
|
|
132
|
-
"default": "./fesm2022/masterteam-components-radio-cards.mjs"
|
|
133
|
-
},
|
|
134
138
|
"./radio-button-field": {
|
|
135
139
|
"types": "./radio-button-field/index.d.ts",
|
|
136
140
|
"default": "./fesm2022/masterteam-components-radio-button-field.mjs"
|
|
137
141
|
},
|
|
138
|
-
"./
|
|
139
|
-
"types": "./
|
|
140
|
-
"default": "./fesm2022/masterteam-components-
|
|
142
|
+
"./radio-cards": {
|
|
143
|
+
"types": "./radio-cards/index.d.ts",
|
|
144
|
+
"default": "./fesm2022/masterteam-components-radio-cards.mjs"
|
|
141
145
|
},
|
|
142
146
|
"./radio-cards-field": {
|
|
143
147
|
"types": "./radio-cards-field/index.d.ts",
|
|
@@ -147,6 +151,14 @@
|
|
|
147
151
|
"types": "./slider-field/index.d.ts",
|
|
148
152
|
"default": "./fesm2022/masterteam-components-slider-field.mjs"
|
|
149
153
|
},
|
|
154
|
+
"./select-field": {
|
|
155
|
+
"types": "./select-field/index.d.ts",
|
|
156
|
+
"default": "./fesm2022/masterteam-components-select-field.mjs"
|
|
157
|
+
},
|
|
158
|
+
"./text-field": {
|
|
159
|
+
"types": "./text-field/index.d.ts",
|
|
160
|
+
"default": "./fesm2022/masterteam-components-text-field.mjs"
|
|
161
|
+
},
|
|
150
162
|
"./table": {
|
|
151
163
|
"types": "./table/index.d.ts",
|
|
152
164
|
"default": "./fesm2022/masterteam-components-table.mjs"
|
|
@@ -155,25 +167,21 @@
|
|
|
155
167
|
"types": "./tabs/index.d.ts",
|
|
156
168
|
"default": "./fesm2022/masterteam-components-tabs.mjs"
|
|
157
169
|
},
|
|
158
|
-
"./text-field": {
|
|
159
|
-
"types": "./text-field/index.d.ts",
|
|
160
|
-
"default": "./fesm2022/masterteam-components-text-field.mjs"
|
|
161
|
-
},
|
|
162
|
-
"./toast": {
|
|
163
|
-
"types": "./toast/index.d.ts",
|
|
164
|
-
"default": "./fesm2022/masterteam-components-toast.mjs"
|
|
165
|
-
},
|
|
166
170
|
"./textarea-field": {
|
|
167
171
|
"types": "./textarea-field/index.d.ts",
|
|
168
172
|
"default": "./fesm2022/masterteam-components-textarea-field.mjs"
|
|
169
173
|
},
|
|
174
|
+
"./tooltip": {
|
|
175
|
+
"types": "./tooltip/index.d.ts",
|
|
176
|
+
"default": "./fesm2022/masterteam-components-tooltip.mjs"
|
|
177
|
+
},
|
|
170
178
|
"./toggle-field": {
|
|
171
179
|
"types": "./toggle-field/index.d.ts",
|
|
172
180
|
"default": "./fesm2022/masterteam-components-toggle-field.mjs"
|
|
173
181
|
},
|
|
174
|
-
"./
|
|
175
|
-
"types": "./
|
|
176
|
-
"default": "./fesm2022/masterteam-components-
|
|
182
|
+
"./toast": {
|
|
183
|
+
"types": "./toast/index.d.ts",
|
|
184
|
+
"default": "./fesm2022/masterteam-components-toast.mjs"
|
|
177
185
|
},
|
|
178
186
|
"./user-search-field": {
|
|
179
187
|
"types": "./user-search-field/index.d.ts",
|