@masterteam/components 0.0.25 → 0.0.27
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/drawer/index.d.ts +26 -0
- package/fesm2022/masterteam-components-drawer.mjs +50 -0
- package/fesm2022/masterteam-components-drawer.mjs.map +1 -0
- package/fesm2022/masterteam-components-module-summary-card.mjs +1 -2
- package/fesm2022/masterteam-components-module-summary-card.mjs.map +1 -1
- package/fesm2022/masterteam-components-tabs.mjs +5 -2
- package/fesm2022/masterteam-components-tabs.mjs.map +1 -1
- package/fesm2022/masterteam-components-user-search-field.mjs +139 -0
- package/fesm2022/masterteam-components-user-search-field.mjs.map +1 -0
- package/fesm2022/masterteam-components.mjs +16 -1
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/index.d.ts +17 -3
- package/package.json +36 -28
- package/tabs/index.d.ts +2 -1
- package/user-search-field/index.d.ts +57 -0
- package/assets/fonts/Inter-Black.woff2 +0 -0
- package/assets/fonts/Inter-BlackItalic.woff2 +0 -0
- package/assets/fonts/Inter-Bold.woff2 +0 -0
- package/assets/fonts/Inter-BoldItalic.woff2 +0 -0
- package/assets/fonts/Inter-ExtraBold.woff2 +0 -0
- package/assets/fonts/Inter-ExtraBoldItalic.woff2 +0 -0
- package/assets/fonts/Inter-ExtraLight.woff2 +0 -0
- package/assets/fonts/Inter-ExtraLightItalic.woff2 +0 -0
- package/assets/fonts/Inter-Italic.woff2 +0 -0
- package/assets/fonts/Inter-Light.woff2 +0 -0
- package/assets/fonts/Inter-LightItalic.woff2 +0 -0
- package/assets/fonts/Inter-Medium.woff2 +0 -0
- package/assets/fonts/Inter-MediumItalic.woff2 +0 -0
- package/assets/fonts/Inter-Regular.woff2 +0 -0
- package/assets/fonts/Inter-SemiBold.woff2 +0 -0
- package/assets/fonts/Inter-SemiBoldItalic.woff2 +0 -0
- package/assets/fonts/Inter-Thin.woff2 +0 -0
- package/assets/fonts/Inter-ThinItalic.woff2 +0 -0
- package/assets/fonts/InterDisplay-Black.woff2 +0 -0
- package/assets/fonts/InterDisplay-BlackItalic.woff2 +0 -0
- package/assets/fonts/InterDisplay-Bold.woff2 +0 -0
- package/assets/fonts/InterDisplay-BoldItalic.woff2 +0 -0
- package/assets/fonts/InterDisplay-ExtraBold.woff2 +0 -0
- package/assets/fonts/InterDisplay-ExtraBoldItalic.woff2 +0 -0
- package/assets/fonts/InterDisplay-ExtraLight.woff2 +0 -0
- package/assets/fonts/InterDisplay-ExtraLightItalic.woff2 +0 -0
- package/assets/fonts/InterDisplay-Italic.woff2 +0 -0
- package/assets/fonts/InterDisplay-Light.woff2 +0 -0
- package/assets/fonts/InterDisplay-LightItalic.woff2 +0 -0
- package/assets/fonts/InterDisplay-Medium.woff2 +0 -0
- package/assets/fonts/InterDisplay-MediumItalic.woff2 +0 -0
- package/assets/fonts/InterDisplay-Regular.woff2 +0 -0
- package/assets/fonts/InterDisplay-SemiBold.woff2 +0 -0
- package/assets/fonts/InterDisplay-SemiBoldItalic.woff2 +0 -0
- package/assets/fonts/InterDisplay-Thin.woff2 +0 -0
- package/assets/fonts/InterDisplay-ThinItalic.woff2 +0 -0
- package/assets/fonts/InterVariable-Italic.woff2 +0 -0
- package/assets/fonts/InterVariable.woff2 +0 -0
- package/assets/fonts/inter.css +0 -148
package/assets/common.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! tailwindcss v4.1.13 | 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-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-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-black:#000;--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);--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}.absolute{position:absolute}.relative{position:relative}.static{position:static}.top-full{top:100%}.right-0{right:calc(var(--spacing)*0)}.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}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.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-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-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)}}.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)}.py-1{padding-block:calc(var(--spacing)*1)}.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-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-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-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)}}.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))}.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-gray-50:hover{background-color:var(--color-gray-50)}.hover\:text-gray-600:hover{color:var(--color-gray-600)}.hover\:text-gray-700:hover{color:var(--color-gray-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}@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-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}
|
|
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-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-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-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-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-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)}}.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))}.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-gray-50:hover{background-color:var(--color-gray-50)}.hover\:text-gray-600:hover{color:var(--color-gray-600)}.hover\:text-gray-700:hover{color:var(--color-gray-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)}}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
declare class Drawer {
|
|
4
|
+
visible: _angular_core.ModelSignal<boolean>;
|
|
5
|
+
visibleChange: _angular_core.OutputEmitterRef<boolean>;
|
|
6
|
+
onShow: _angular_core.OutputEmitterRef<boolean>;
|
|
7
|
+
onHide: _angular_core.OutputEmitterRef<boolean>;
|
|
8
|
+
position: _angular_core.InputSignal<"left" | "right" | "top" | "bottom">;
|
|
9
|
+
fullScreen: _angular_core.InputSignal<boolean>;
|
|
10
|
+
closeOnEscape: _angular_core.InputSignal<boolean>;
|
|
11
|
+
blockScroll: _angular_core.InputSignal<boolean>;
|
|
12
|
+
dismissible: _angular_core.InputSignal<boolean>;
|
|
13
|
+
title: _angular_core.InputSignal<string>;
|
|
14
|
+
styleClass: _angular_core.InputSignal<string>;
|
|
15
|
+
transitionOptions: _angular_core.InputSignal<string>;
|
|
16
|
+
appendTo: _angular_core.InputSignal<string>;
|
|
17
|
+
modal: _angular_core.InputSignal<boolean>;
|
|
18
|
+
visibleChangeEvent(event: boolean): void;
|
|
19
|
+
onClose(): void;
|
|
20
|
+
onShowEvent(): void;
|
|
21
|
+
onHideEvent(): void;
|
|
22
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Drawer, never>;
|
|
23
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Drawer, "mt-drawer", never, { "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "fullScreen": { "alias": "fullScreen"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "blockScroll": { "alias": "blockScroll"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; "transitionOptions": { "alias": "transitionOptions"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "modal": { "alias": "modal"; "required": false; "isSignal": true; }; }, { "visible": "visibleChange"; "visibleChange": "visibleChange"; "onShow": "onShow"; "onHide": "onHide"; }, never, ["[content]", "[footer]"], true, never>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { Drawer };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Button } from '@masterteam/components/button';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { model, output, input, Component } from '@angular/core';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i1 from 'primeng/drawer';
|
|
6
|
+
import { DrawerModule } from 'primeng/drawer';
|
|
7
|
+
|
|
8
|
+
class Drawer {
|
|
9
|
+
visible = model(false, ...(ngDevMode ? [{ debugName: "visible" }] : []));
|
|
10
|
+
visibleChange = output();
|
|
11
|
+
onShow = output();
|
|
12
|
+
onHide = output();
|
|
13
|
+
position = input('right', ...(ngDevMode ? [{ debugName: "position" }] : []));
|
|
14
|
+
fullScreen = input(false, ...(ngDevMode ? [{ debugName: "fullScreen" }] : []));
|
|
15
|
+
closeOnEscape = input(false, ...(ngDevMode ? [{ debugName: "closeOnEscape" }] : []));
|
|
16
|
+
blockScroll = input(true, ...(ngDevMode ? [{ debugName: "blockScroll" }] : []));
|
|
17
|
+
dismissible = input(true, ...(ngDevMode ? [{ debugName: "dismissible" }] : []));
|
|
18
|
+
title = input('', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
19
|
+
styleClass = input('', ...(ngDevMode ? [{ debugName: "styleClass" }] : []));
|
|
20
|
+
transitionOptions = input('200ms cubic-bezier(0, 0, 1, 1)', ...(ngDevMode ? [{ debugName: "transitionOptions" }] : []));
|
|
21
|
+
appendTo = input('body', ...(ngDevMode ? [{ debugName: "appendTo" }] : []));
|
|
22
|
+
modal = input(true, ...(ngDevMode ? [{ debugName: "modal" }] : []));
|
|
23
|
+
visibleChangeEvent(event) {
|
|
24
|
+
this.visibleChange.emit(event);
|
|
25
|
+
}
|
|
26
|
+
onClose() {
|
|
27
|
+
this.visible.set(false);
|
|
28
|
+
this.visibleChange.emit(false);
|
|
29
|
+
this.onHide.emit(true);
|
|
30
|
+
}
|
|
31
|
+
onShowEvent() {
|
|
32
|
+
this.onShow.emit(true);
|
|
33
|
+
}
|
|
34
|
+
onHideEvent() {
|
|
35
|
+
this.onHide.emit(true);
|
|
36
|
+
}
|
|
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"] }] });
|
|
39
|
+
}
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: Drawer, decorators: [{
|
|
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" }]
|
|
43
|
+
}] });
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Generated bundle index. Do not edit.
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
export { Drawer };
|
|
50
|
+
//# sourceMappingURL=masterteam-components-drawer.mjs.map
|
|
@@ -0,0 +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,uDA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A,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,kqCAAA,EAAA;;;AER/C;;AAEG;;;;"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, model, booleanAttribute, output, Component } from '@angular/core';
|
|
3
3
|
import { Card } from '@masterteam/components/card';
|
|
4
|
-
import { Icon } from '@masterteam/icons';
|
|
5
4
|
import { ToggleField } from '@masterteam/components/toggle-field';
|
|
6
5
|
import { Button } from '@masterteam/components/button';
|
|
7
6
|
import { Avatar } from '@masterteam/components/avatar';
|
|
@@ -26,7 +25,7 @@ class ModuleSummaryCard {
|
|
|
26
25
|
}
|
|
27
26
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ModuleSummaryCard, decorators: [{
|
|
28
27
|
type: Component,
|
|
29
|
-
args: [{ selector: 'mt-module-summary-card', standalone: true, imports: [Card,
|
|
28
|
+
args: [{ selector: 'mt-module-summary-card', standalone: true, imports: [Card, Button, Avatar, ToggleField, FormsModule], template: "<mt-card headless>\n @if (showToggle()) {\n <div class=\"flex justify-end w-full\">\n <mt-toggle-field [(ngModel)]=\"active\" />\n </div>\n }\n\n <div class=\"content flex flex-col gap-5 items-center text-center\">\n @if (icon()) {\n <mt-avatar\n style=\"\n --p-avatar-background: var(--p-primary-50);\n --p-avatar-color: var(--p-primary-color);\n \"\n [icon]=\"icon()\"\n size=\"large\"\n shape=\"square\"\n ></mt-avatar>\n }\n <div class=\"flex flex-col gap-1\">\n @if (title()) {\n <div class=\"title text-lg font-semibold\">\n {{ title() }}\n </div>\n }\n @if (description()) {\n <div\n class=\"description text-sm text-muted-foreground secondary text-surface-500\"\n >\n {{ description() }}\n </div>\n }\n </div>\n\n <div>\n @if (showButton()) {\n <mt-button\n label=\"{{ buttonLabel() }}\"\n (onClick)=\"onButtonClick.emit($event)\"\n />\n }\n </div>\n </div>\n</mt-card>\n" }]
|
|
30
29
|
}] });
|
|
31
30
|
|
|
32
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-components-module-summary-card.mjs","sources":["../../../../packages/masterteam/components/module-summary-card/module-summary-card.ts","../../../../packages/masterteam/components/module-summary-card/module-summary-card.html","../../../../packages/masterteam/components/module-summary-card/masterteam-components-module-summary-card.ts"],"sourcesContent":["import {\n Component,\n input,\n model,\n output,\n booleanAttribute,\n} from '@angular/core';\nimport { Card } from '@masterteam/components/card';\nimport {
|
|
1
|
+
{"version":3,"file":"masterteam-components-module-summary-card.mjs","sources":["../../../../packages/masterteam/components/module-summary-card/module-summary-card.ts","../../../../packages/masterteam/components/module-summary-card/module-summary-card.html","../../../../packages/masterteam/components/module-summary-card/masterteam-components-module-summary-card.ts"],"sourcesContent":["import {\n Component,\n input,\n model,\n output,\n booleanAttribute,\n} from '@angular/core';\nimport { Card } from '@masterteam/components/card';\nimport { ToggleField } from '@masterteam/components/toggle-field';\nimport { Button } from '@masterteam/components/button';\nimport { Avatar } from '@masterteam/components/avatar';\nimport { FormsModule } from '@angular/forms';\nimport { MTIcon } from '@masterteam/icons';\n\n@Component({\n selector: 'mt-module-summary-card',\n standalone: true,\n templateUrl: './module-summary-card.html',\n styleUrl: './module-summary-card.scss',\n imports: [Card, Button, Avatar, ToggleField, FormsModule],\n})\nexport class ModuleSummaryCard {\n readonly icon = input<MTIcon>();\n readonly title = input<string>();\n readonly description = input<string>();\n readonly active = model<boolean>(false);\n readonly buttonLabel = input<string>('Action');\n readonly showToggle = input<boolean, unknown>(true, {\n transform: booleanAttribute,\n });\n readonly showButton = input<boolean, unknown>(true, {\n transform: booleanAttribute,\n });\n readonly onButtonClick = output<MouseEvent>();\n}\n","<mt-card headless>\n @if (showToggle()) {\n <div class=\"flex justify-end w-full\">\n <mt-toggle-field [(ngModel)]=\"active\" />\n </div>\n }\n\n <div class=\"content flex flex-col gap-5 items-center text-center\">\n @if (icon()) {\n <mt-avatar\n style=\"\n --p-avatar-background: var(--p-primary-50);\n --p-avatar-color: var(--p-primary-color);\n \"\n [icon]=\"icon()\"\n size=\"large\"\n shape=\"square\"\n ></mt-avatar>\n }\n <div class=\"flex flex-col gap-1\">\n @if (title()) {\n <div class=\"title text-lg font-semibold\">\n {{ title() }}\n </div>\n }\n @if (description()) {\n <div\n class=\"description text-sm text-muted-foreground secondary text-surface-500\"\n >\n {{ description() }}\n </div>\n }\n </div>\n\n <div>\n @if (showButton()) {\n <mt-button\n label=\"{{ buttonLabel() }}\"\n (onClick)=\"onButtonClick.emit($event)\"\n />\n }\n </div>\n </div>\n</mt-card>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAqBa,iBAAiB,CAAA;IACnB,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;IACtB,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;IACv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;;;"}
|
|
@@ -14,6 +14,9 @@ class Tabs {
|
|
|
14
14
|
fluid = input(false, ...(ngDevMode ? [{ debugName: "fluid", transform: booleanAttribute }] : [{
|
|
15
15
|
transform: booleanAttribute,
|
|
16
16
|
}]));
|
|
17
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{
|
|
18
|
+
transform: booleanAttribute,
|
|
19
|
+
}]));
|
|
17
20
|
// TODO: make a decision about this maybe we should remove it
|
|
18
21
|
constructor() {
|
|
19
22
|
effect(() => {
|
|
@@ -27,14 +30,14 @@ class Tabs {
|
|
|
27
30
|
this.onChange.emit(value);
|
|
28
31
|
}
|
|
29
32
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: Tabs, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
30
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.3", type: Tabs, isStandalone: true, selector: "mt-tabs", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { active: "activeChange", onChange: "onChange" }, host: { properties: { "class.w-full": "fluid()" }, classAttribute: "grid gap-1" }, ngImport: i0, template: "<p-selectbutton\n [options]=\"options()\"\n [(ngModel)]=\"active\"\n (ngModelChange)=\"onTabChange($event)\"\n [optionLabel]=\"optionLabel()\"\n [optionValue]=\"optionValue()\"\n styleClass=\"my-tabs-button\"\n [size]=\"size()\"\n [fluid]=\"fluid()\"\n unselectable\n/>\n", styles: [""], dependencies: [{ kind: "component", type: SelectButton, selector: "p-selectButton, p-selectbutton, p-select-button", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "unselectable", "tabindex", "multiple", "allowEmpty", "styleClass", "ariaLabelledBy", "dataKey", "autofocus", "size", "fluid"], outputs: ["onOptionClick", "onChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
33
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.3", type: Tabs, isStandalone: true, selector: "mt-tabs", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { active: "activeChange", onChange: "onChange" }, host: { properties: { "class.w-full": "fluid()" }, classAttribute: "grid gap-1" }, ngImport: i0, template: "<p-selectbutton\n [options]=\"options()\"\n [(ngModel)]=\"active\"\n (ngModelChange)=\"onTabChange($event)\"\n [optionLabel]=\"optionLabel()\"\n [optionValue]=\"optionValue()\"\n styleClass=\"my-tabs-button\"\n [size]=\"size()\"\n [fluid]=\"fluid()\"\n [disabled]=\"disabled()\"\n unselectable\n/>\n", styles: [""], dependencies: [{ kind: "component", type: SelectButton, selector: "p-selectButton, p-selectbutton, p-select-button", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "unselectable", "tabindex", "multiple", "allowEmpty", "styleClass", "ariaLabelledBy", "dataKey", "autofocus", "size", "fluid"], outputs: ["onOptionClick", "onChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
31
34
|
}
|
|
32
35
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: Tabs, decorators: [{
|
|
33
36
|
type: Component,
|
|
34
37
|
args: [{ selector: 'mt-tabs', standalone: true, imports: [SelectButton, FormsModule], host: {
|
|
35
38
|
class: 'grid gap-1',
|
|
36
39
|
'[class.w-full]': 'fluid()',
|
|
37
|
-
}, template: "<p-selectbutton\n [options]=\"options()\"\n [(ngModel)]=\"active\"\n (ngModelChange)=\"onTabChange($event)\"\n [optionLabel]=\"optionLabel()\"\n [optionValue]=\"optionValue()\"\n styleClass=\"my-tabs-button\"\n [size]=\"size()\"\n [fluid]=\"fluid()\"\n unselectable\n/>\n" }]
|
|
40
|
+
}, template: "<p-selectbutton\n [options]=\"options()\"\n [(ngModel)]=\"active\"\n (ngModelChange)=\"onTabChange($event)\"\n [optionLabel]=\"optionLabel()\"\n [optionValue]=\"optionValue()\"\n styleClass=\"my-tabs-button\"\n [size]=\"size()\"\n [fluid]=\"fluid()\"\n [disabled]=\"disabled()\"\n unselectable\n/>\n" }]
|
|
38
41
|
}], ctorParameters: () => [] });
|
|
39
42
|
|
|
40
43
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-components-tabs.mjs","sources":["../../../../packages/masterteam/components/tabs/tabs.ts","../../../../packages/masterteam/components/tabs/tabs.html","../../../../packages/masterteam/components/tabs/masterteam-components-tabs.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n input,\n effect,\n output,\n model,\n} from '@angular/core';\nimport { SelectButton } from 'primeng/selectbutton';\nimport { FormsModule } from '@angular/forms';\n\nexport interface OptionItem {\n label: string;\n value: any;\n}\n\n@Component({\n selector: 'mt-tabs',\n standalone: true,\n imports: [SelectButton, FormsModule],\n templateUrl: './tabs.html',\n styleUrls: ['./tabs.scss'],\n host: {\n class: 'grid gap-1',\n '[class.w-full]': 'fluid()',\n },\n})\nexport class Tabs {\n options = input<any[]>([]);\n optionLabel = input<string>('label');\n optionValue = input<string>('value');\n
|
|
1
|
+
{"version":3,"file":"masterteam-components-tabs.mjs","sources":["../../../../packages/masterteam/components/tabs/tabs.ts","../../../../packages/masterteam/components/tabs/tabs.html","../../../../packages/masterteam/components/tabs/masterteam-components-tabs.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n input,\n effect,\n output,\n model,\n} from '@angular/core';\nimport { SelectButton } from 'primeng/selectbutton';\nimport { FormsModule } from '@angular/forms';\n\nexport interface OptionItem {\n label: string;\n value: any;\n}\n\n@Component({\n selector: 'mt-tabs',\n standalone: true,\n imports: [SelectButton, FormsModule],\n templateUrl: './tabs.html',\n styleUrls: ['./tabs.scss'],\n host: {\n class: 'grid gap-1',\n '[class.w-full]': 'fluid()',\n },\n})\nexport class Tabs {\n options = input<any[]>([]);\n optionLabel = input<string>('label');\n optionValue = input<string>('value');\n active = model<any>(null);\n\n onChange = output<any>();\n\n readonly size = input<'small' | 'large' | undefined>();\n readonly fluid = input<boolean, unknown>(false, {\n transform: booleanAttribute,\n });\n disabled = input<boolean, unknown>(false, {\n transform: booleanAttribute,\n });\n\n // TODO: make a decision about this maybe we should remove it\n constructor() {\n effect(() => {\n const options = this.options();\n if (options && options.length > 0 && !this.active()) {\n this.active.set(options[0].value);\n }\n });\n }\n\n onTabChange(value: any) {\n this.onChange.emit(value);\n }\n}\n","<p-selectbutton\n [options]=\"options()\"\n [(ngModel)]=\"active\"\n (ngModelChange)=\"onTabChange($event)\"\n [optionLabel]=\"optionLabel()\"\n [optionValue]=\"optionValue()\"\n styleClass=\"my-tabs-button\"\n [size]=\"size()\"\n [fluid]=\"fluid()\"\n [disabled]=\"disabled()\"\n unselectable\n/>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MA2Ba,IAAI,CAAA;AACf,IAAA,OAAO,GAAG,KAAK,CAAQ,EAAE,mDAAC;AAC1B,IAAA,WAAW,GAAG,KAAK,CAAS,OAAO,uDAAC;AACpC,IAAA,WAAW,GAAG,KAAK,CAAS,OAAO,uDAAC;AACpC,IAAA,MAAM,GAAG,KAAK,CAAM,IAAI,kDAAC;IAEzB,QAAQ,GAAG,MAAM,EAAO;IAEf,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAiC;IAC7C,KAAK,GAAG,KAAK,CAAmB,KAAK,yCAC5C,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CADmB;AAC9C,YAAA,SAAS,EAAE,gBAAgB;AAC5B,SAAA,CAAA,CAAA,CAAC;IACF,QAAQ,GAAG,KAAK,CAAmB,KAAK,4CACtC,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CADa;AACxC,YAAA,SAAS,EAAE,gBAAgB;AAC5B,SAAA,CAAA,CAAA,CAAC;;AAGF,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;AAC9B,YAAA,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE;AACnD,gBAAA,IAAI,CAAC,MAAM,CAA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EAAA,QAAA,EAAA,uTAAA,EAAA;;;AEzBH;;AAEG;;;;"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, signal, inject, effect, HostBinding, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/forms';
|
|
4
|
+
import { Validators, NgControl, FormsModule } from '@angular/forms';
|
|
5
|
+
import * as i2 from 'primeng/autocomplete';
|
|
6
|
+
import { AutoCompleteModule } from 'primeng/autocomplete';
|
|
7
|
+
import * as i5 from 'primeng/inputgroup';
|
|
8
|
+
import { InputGroupModule } from 'primeng/inputgroup';
|
|
9
|
+
import * as i6 from 'primeng/inputgroupaddon';
|
|
10
|
+
import { InputGroupAddonModule } from 'primeng/inputgroupaddon';
|
|
11
|
+
import * as i4 from 'primeng/tooltip';
|
|
12
|
+
import { TooltipModule } from 'primeng/tooltip';
|
|
13
|
+
import { FieldValidation } from '@masterteam/components/field-validation';
|
|
14
|
+
import { isInvalid } from '@masterteam/components';
|
|
15
|
+
import { Icon } from '@masterteam/icons';
|
|
16
|
+
import { Subject, debounceTime, distinctUntilChanged, tap, switchMap, of } from 'rxjs';
|
|
17
|
+
import { HttpClient, HttpParams } from '@angular/common/http';
|
|
18
|
+
import { Avatar } from '@masterteam/components/avatar';
|
|
19
|
+
import * as i3 from 'primeng/api';
|
|
20
|
+
|
|
21
|
+
class UserSearchField {
|
|
22
|
+
hint = input(...(ngDevMode ? [undefined, { debugName: "hint" }] : []));
|
|
23
|
+
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
24
|
+
placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : []));
|
|
25
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
26
|
+
readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : []));
|
|
27
|
+
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : []));
|
|
28
|
+
apiUrl = input.required(...(ngDevMode ? [{ debugName: "apiUrl" }] : []));
|
|
29
|
+
dataKey = input('data', ...(ngDevMode ? [{ debugName: "dataKey" }] : []));
|
|
30
|
+
paramName = input('query', ...(ngDevMode ? [{ debugName: "paramName" }] : []));
|
|
31
|
+
styleClass;
|
|
32
|
+
requiredValidator = Validators.required;
|
|
33
|
+
value = signal(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
34
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
35
|
+
loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
36
|
+
size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
|
|
37
|
+
filteredUsers = signal([], ...(ngDevMode ? [{ debugName: "filteredUsers" }] : []));
|
|
38
|
+
searchTerms = new Subject();
|
|
39
|
+
subscription;
|
|
40
|
+
onTouched = () => { };
|
|
41
|
+
onModelChange = () => { };
|
|
42
|
+
ngControl = null;
|
|
43
|
+
http = inject(HttpClient);
|
|
44
|
+
isInvalid = isInvalid;
|
|
45
|
+
constructor() {
|
|
46
|
+
this.ngControl = inject(NgControl, { self: true, optional: true });
|
|
47
|
+
if (this.ngControl) {
|
|
48
|
+
this.ngControl.valueAccessor = this;
|
|
49
|
+
}
|
|
50
|
+
effect(() => {
|
|
51
|
+
if (this.ngControl?.control && this.required()) {
|
|
52
|
+
this.ngControl.control.addValidators(Validators.required);
|
|
53
|
+
this.ngControl.control.updateValueAndValidity();
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
ngOnInit() {
|
|
58
|
+
this.styleClass = this.class();
|
|
59
|
+
this.subscription = this.searchTerms
|
|
60
|
+
.pipe(debounceTime(300), distinctUntilChanged(), tap(() => this.loading.set(true)), switchMap((term) => {
|
|
61
|
+
if (!term) {
|
|
62
|
+
this.filteredUsers.set([]);
|
|
63
|
+
return of([]);
|
|
64
|
+
}
|
|
65
|
+
const params = new HttpParams().set(this.paramName(), term);
|
|
66
|
+
return this.http.get(this.apiUrl(), { params });
|
|
67
|
+
}))
|
|
68
|
+
.subscribe({
|
|
69
|
+
next: (users) => {
|
|
70
|
+
this.filteredUsers.set((users[this.dataKey()] ?? []));
|
|
71
|
+
this.loading.set(false);
|
|
72
|
+
},
|
|
73
|
+
error: (err) => {
|
|
74
|
+
console.error('API search failed:', err);
|
|
75
|
+
this.filteredUsers.set([]);
|
|
76
|
+
this.loading.set(false);
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
ngOnDestroy() {
|
|
81
|
+
this.subscription.unsubscribe();
|
|
82
|
+
}
|
|
83
|
+
search(event) {
|
|
84
|
+
this.loading.set(true);
|
|
85
|
+
this.searchTerms.next(event.query);
|
|
86
|
+
}
|
|
87
|
+
onSelect(event) {
|
|
88
|
+
const selectedUser = event.value;
|
|
89
|
+
this.value.set(selectedUser);
|
|
90
|
+
this.onModelChange(selectedUser);
|
|
91
|
+
this.onTouched();
|
|
92
|
+
this.loading.set(false);
|
|
93
|
+
}
|
|
94
|
+
onClear() {
|
|
95
|
+
this.value.set(null);
|
|
96
|
+
this.onModelChange(null);
|
|
97
|
+
this.filteredUsers.set([]);
|
|
98
|
+
this.loading.set(false);
|
|
99
|
+
}
|
|
100
|
+
writeValue(value) {
|
|
101
|
+
this.value.set(value);
|
|
102
|
+
}
|
|
103
|
+
registerOnChange(fn) {
|
|
104
|
+
this.onModelChange = fn;
|
|
105
|
+
}
|
|
106
|
+
registerOnTouched(fn) {
|
|
107
|
+
this.onTouched = fn;
|
|
108
|
+
}
|
|
109
|
+
setDisabledState(disabled) {
|
|
110
|
+
this.disabled.set(disabled);
|
|
111
|
+
}
|
|
112
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: UserSearchField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
113
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: UserSearchField, isStandalone: true, selector: "mt-user-search-field", inputs: { hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, apiUrl: { classPropertyName: "apiUrl", publicName: "apiUrl", isSignal: true, isRequired: true, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, paramName: { classPropertyName: "paramName", publicName: "paramName", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.styleClass" }, classAttribute: "grid gap-1" }, ngImport: i0, template: "@if (label()) {\n <label\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\n [for]=\"ngControl?.name || label()\"\n >\n {{ label() }}\n </label>\n}\n<div class=\"relative\">\n <p-inputgroup>\n <p-autoComplete\n #autocomplete=\"\"\n [suggestions]=\"filteredUsers()\"\n (completeMethod)=\"search($event)\"\n (onSelect)=\"onSelect($event)\"\n (onClear)=\"onClear()\"\n (onBlur)=\"onTouched()\"\n [ngModel]=\"value()?.displayName\"\n [disabled]=\"disabled() || readonly()\"\n [id]=\"ngControl?.name || label()\"\n [invalid]=\"isInvalid(ngControl?.control)\"\n [placeholder]=\"placeholder()\"\n class=\"w-full\"\n styleClass=\"w-full\"\n [dropdown]=\"false\"\n [size]=\"size()\"\n >\n <ng-template let-user pTemplate=\"item\">\n <div class=\"flex items-center gap-2\">\n <mt-avatar size=\"small\" icon=\"user.user-01\" />\n <div class=\"flex align-items-center gap-3\">\n <span class=\"font-medium\">{{ user.displayName }}</span>\n <medium class=\"text-gray-500\">{{ \"@\" + user.userName }}</medium>\n </div>\n </div>\n </ng-template>\n\n <!-- <ng-template let-user #pTemplate=\"selecteditem\">\n <div class=\"flex items-center gap-2\">\n <mt-avatar size=\"small\" icon=\"user.user-01\" />\n <div class=\"flex align-items-center gap-3\">\n <span class=\"font-medium\">{{ user.displayName }}</span>\n <medium class=\"text-gray-500\">{{ \"@\" + user.userName }}</medium>\n </div>\n </div>\n </ng-template> -->\n </p-autoComplete>\n @if (hint()) {\n <p-inputgroup-addon [pTooltip]=\"hint()\" tooltipPosition=\"top\">\n <mt-icon icon=\"general.help-circle\" />\n </p-inputgroup-addon>\n } @else {\n <p-inputgroup-addon tooltipPosition=\"top\">\n <mt-icon icon=\"user.user-03\" />\n </p-inputgroup-addon>\n }\n </p-inputgroup>\n\n @if (loading()) {\n <mt-icon\n icon=\"general.loading-01\"\n class=\"animate-spin absolute right-3 bg-white top-1/2 -translate-y-1/2\"\n />\n }\n</div>\n<mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AutoCompleteModule }, { kind: "component", type: i2.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "appendTo"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "ngmodule", type: InputGroupModule }, { kind: "component", type: i5.InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "ngmodule", type: InputGroupAddonModule }, { kind: "component", type: i6.InputGroupAddon, selector: "p-inputgroup-addon, p-inputGroupAddon", inputs: ["style", "styleClass"] }, { kind: "component", type: FieldValidation, selector: "mt-field-validation", inputs: ["control", "touched"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
114
|
+
}
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: UserSearchField, decorators: [{
|
|
116
|
+
type: Component,
|
|
117
|
+
args: [{ selector: 'mt-user-search-field', standalone: true, imports: [
|
|
118
|
+
FormsModule,
|
|
119
|
+
AutoCompleteModule,
|
|
120
|
+
TooltipModule,
|
|
121
|
+
InputGroupModule,
|
|
122
|
+
InputGroupAddonModule,
|
|
123
|
+
FieldValidation,
|
|
124
|
+
Icon,
|
|
125
|
+
Avatar,
|
|
126
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
127
|
+
class: 'grid gap-1',
|
|
128
|
+
}, template: "@if (label()) {\n <label\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\n [for]=\"ngControl?.name || label()\"\n >\n {{ label() }}\n </label>\n}\n<div class=\"relative\">\n <p-inputgroup>\n <p-autoComplete\n #autocomplete=\"\"\n [suggestions]=\"filteredUsers()\"\n (completeMethod)=\"search($event)\"\n (onSelect)=\"onSelect($event)\"\n (onClear)=\"onClear()\"\n (onBlur)=\"onTouched()\"\n [ngModel]=\"value()?.displayName\"\n [disabled]=\"disabled() || readonly()\"\n [id]=\"ngControl?.name || label()\"\n [invalid]=\"isInvalid(ngControl?.control)\"\n [placeholder]=\"placeholder()\"\n class=\"w-full\"\n styleClass=\"w-full\"\n [dropdown]=\"false\"\n [size]=\"size()\"\n >\n <ng-template let-user pTemplate=\"item\">\n <div class=\"flex items-center gap-2\">\n <mt-avatar size=\"small\" icon=\"user.user-01\" />\n <div class=\"flex align-items-center gap-3\">\n <span class=\"font-medium\">{{ user.displayName }}</span>\n <medium class=\"text-gray-500\">{{ \"@\" + user.userName }}</medium>\n </div>\n </div>\n </ng-template>\n\n <!-- <ng-template let-user #pTemplate=\"selecteditem\">\n <div class=\"flex items-center gap-2\">\n <mt-avatar size=\"small\" icon=\"user.user-01\" />\n <div class=\"flex align-items-center gap-3\">\n <span class=\"font-medium\">{{ user.displayName }}</span>\n <medium class=\"text-gray-500\">{{ \"@\" + user.userName }}</medium>\n </div>\n </div>\n </ng-template> -->\n </p-autoComplete>\n @if (hint()) {\n <p-inputgroup-addon [pTooltip]=\"hint()\" tooltipPosition=\"top\">\n <mt-icon icon=\"general.help-circle\" />\n </p-inputgroup-addon>\n } @else {\n <p-inputgroup-addon tooltipPosition=\"top\">\n <mt-icon icon=\"user.user-03\" />\n </p-inputgroup-addon>\n }\n </p-inputgroup>\n\n @if (loading()) {\n <mt-icon\n icon=\"general.loading-01\"\n class=\"animate-spin absolute right-3 bg-white top-1/2 -translate-y-1/2\"\n />\n }\n</div>\n<mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\n" }]
|
|
129
|
+
}], ctorParameters: () => [], propDecorators: { styleClass: [{
|
|
130
|
+
type: HostBinding,
|
|
131
|
+
args: ['class']
|
|
132
|
+
}] } });
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Generated bundle index. Do not edit.
|
|
136
|
+
*/
|
|
137
|
+
|
|
138
|
+
export { UserSearchField };
|
|
139
|
+
//# sourceMappingURL=masterteam-components-user-search-field.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"masterteam-components-user-search-field.mjs","sources":["../../../../packages/masterteam/components/user-search-field/user-search-field.ts","../../../../packages/masterteam/components/user-search-field/user-search-field.html","../../../../packages/masterteam/components/user-search-field/masterteam-components-user-search-field.ts"],"sourcesContent":["import {\n Component,\n HostBinding,\n signal,\n input,\n OnInit,\n inject,\n ChangeDetectionStrategy,\n effect,\n OnDestroy,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormsModule,\n NgControl,\n Validators,\n} from '@angular/forms';\nimport { AutoCompleteModule } from 'primeng/autocomplete';\nimport { InputGroupModule } from 'primeng/inputgroup';\nimport { InputGroupAddonModule } from 'primeng/inputgroupaddon';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { FieldValidation } from '@masterteam/components/field-validation';\nimport { isInvalid } from '@masterteam/components';\nimport { Icon } from '@masterteam/icons';\nimport {\n Subject,\n Subscription,\n debounceTime,\n distinctUntilChanged,\n switchMap,\n tap,\n of,\n} from 'rxjs';\nimport { HttpClient, HttpParams } from '@angular/common/http';\nimport { Avatar } from '@masterteam/components/avatar';\n\nexport interface User {\n isExternal: boolean;\n userId: string;\n displayName: string;\n userName: string;\n photo: string;\n}\n\n@Component({\n selector: 'mt-user-search-field',\n standalone: true,\n imports: [\n FormsModule,\n AutoCompleteModule,\n TooltipModule,\n InputGroupModule,\n InputGroupAddonModule,\n FieldValidation,\n Icon,\n Avatar,\n ],\n templateUrl: './user-search-field.html',\n styleUrls: ['./user-search-field.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'grid gap-1',\n },\n})\nexport class UserSearchField\n implements ControlValueAccessor, OnInit, OnDestroy\n{\n readonly hint = input<string>();\n readonly label = input<string>();\n readonly placeholder = input<string>();\n readonly class = input<string>('');\n readonly readonly = input<boolean>(false);\n readonly required = input<boolean>(false);\n readonly apiUrl = input.required<string>();\n readonly dataKey = input<string>('data');\n readonly paramName = input<string>('query');\n\n @HostBinding('class') styleClass: string;\n\n requiredValidator = Validators.required;\n value = signal<User | null>(null);\n disabled = signal<boolean>(false);\n loading = signal<boolean>(false);\n\n readonly size = input<'small' | 'large' | undefined>();\n\n filteredUsers = signal<User[]>([]);\n private searchTerms = new Subject<string>();\n private subscription: Subscription;\n\n onTouched: () => void = () => {};\n onModelChange: (value: any) => void = () => {};\n\n public ngControl: NgControl | null = null;\n private http = inject(HttpClient);\n\n isInvalid = isInvalid;\n\n constructor() {\n this.ngControl = inject(NgControl, { self: true, optional: true });\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n effect(() => {\n if (this.ngControl?.control && this.required()) {\n this.ngControl.control.addValidators(Validators.required);\n this.ngControl.control.updateValueAndValidity();\n }\n });\n }\n\n ngOnInit() {\n this.styleClass = this.class();\n\n this.subscription = this.searchTerms\n .pipe(\n debounceTime(300),\n distinctUntilChanged(),\n tap(() => this.loading.set(true)),\n switchMap((term: string) => {\n if (!term) {\n this.filteredUsers.set([]);\n return of([]);\n }\n const params = new HttpParams().set(this.paramName(), term);\n return this.http.get<any>(this.apiUrl(), { params });\n }),\n )\n .subscribe({\n next: (users) => {\n this.filteredUsers.set((users[this.dataKey()] ?? []) as User[]);\n this.loading.set(false);\n },\n error: (err) => {\n console.error('API search failed:', err);\n this.filteredUsers.set([]);\n this.loading.set(false);\n },\n });\n }\n\n ngOnDestroy() {\n this.subscription.unsubscribe();\n }\n\n search(event: { query: string }) {\n this.loading.set(true);\n this.searchTerms.next(event.query);\n }\n\n onSelect(event: { originalEvent: Event; value: User }) {\n const selectedUser = event.value;\n this.value.set(selectedUser);\n this.onModelChange(selectedUser);\n this.onTouched();\n this.loading.set(false);\n }\n\n onClear() {\n this.value.set(null);\n this.onModelChange(null);\n this.filteredUsers.set([]);\n this.loading.set(false);\n }\n\n writeValue(value: User | null): void {\n this.value.set(value);\n }\n\n registerOnChange(fn: (value: User | null) => void) {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: any) {\n this.onTouched = fn;\n }\n\n setDisabledState(disabled: boolean) {\n this.disabled.set(disabled);\n }\n}\n","@if (label()) {\n <label\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\n [for]=\"ngControl?.name || label()\"\n >\n {{ label() }}\n </label>\n}\n<div class=\"relative\">\n <p-inputgroup>\n <p-autoComplete\n #autocomplete=\"\"\n [suggestions]=\"filteredUsers()\"\n (completeMethod)=\"search($event)\"\n (onSelect)=\"onSelect($event)\"\n (onClear)=\"onClear()\"\n (onBlur)=\"onTouched()\"\n [ngModel]=\"value()?.displayName\"\n [disabled]=\"disabled() || readonly()\"\n [id]=\"ngControl?.name || label()\"\n [invalid]=\"isInvalid(ngControl?.control)\"\n [placeholder]=\"placeholder()\"\n class=\"w-full\"\n styleClass=\"w-full\"\n [dropdown]=\"false\"\n [size]=\"size()\"\n >\n <ng-template let-user pTemplate=\"item\">\n <div class=\"flex items-center gap-2\">\n <mt-avatar size=\"small\" icon=\"user.user-01\" />\n <div class=\"flex align-items-center gap-3\">\n <span class=\"font-medium\">{{ user.displayName }}</span>\n <medium class=\"text-gray-500\">{{ \"@\" + user.userName }}</medium>\n </div>\n </div>\n </ng-template>\n\n <!-- <ng-template let-user #pTemplate=\"selecteditem\">\n <div class=\"flex items-center gap-2\">\n <mt-avatar size=\"small\" icon=\"user.user-01\" />\n <div class=\"flex align-items-center gap-3\">\n <span class=\"font-medium\">{{ user.displayName }}</span>\n <medium class=\"text-gray-500\">{{ \"@\" + user.userName }}</medium>\n </div>\n </div>\n </ng-template> -->\n </p-autoComplete>\n @if (hint()) {\n <p-inputgroup-addon [pTooltip]=\"hint()\" tooltipPosition=\"top\">\n <mt-icon icon=\"general.help-circle\" />\n </p-inputgroup-addon>\n } @else {\n <p-inputgroup-addon tooltipPosition=\"top\">\n <mt-icon icon=\"user.user-03\" />\n </p-inputgroup-addon>\n }\n </p-inputgroup>\n\n @if (loading()) {\n <mt-icon\n icon=\"general.loading-01\"\n class=\"animate-spin absolute right-3 bg-white top-1/2 -translate-y-1/2\"\n />\n }\n</div>\n<mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;MAgEa,eAAe,CAAA;IAGjB,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;IACtB,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;IACvB,WAAW,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AAC7B,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC;AACzB,IAAA,QAAQ,GAAG,KAA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EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,uCAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACrB,eAAe,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACf,IAAI,sEACJ,MAAM,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,EAAA,OAAA,EAAA,OAAA,EAAA,WAAA,EAAA,eAAA,CAAA,EAAA,OAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FASG,eAAe,EAAA,UAAA,EAAA,CAAA;kBApB3B,SAAS;+BACE,sBAAsB,EAAA,UAAA,EACpB,IAAI,EAAA,OAAA,EACP;wBACP,WAAW;wBACX,kBAAkB;wBAClB,aAAa;wBACb,gBAAgB;wBAChB,qBAAqB;wBACrB,eAAe;wBACf,IAAI;wBACJ,MAAM;qBACP,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,KAAK,EAAE,YAAY;AACpB,qBAAA,EAAA,QAAA,EAAA,6uEAAA,EAAA;wDAeqB,UAAU,EAAA,CAAA;sBAA/B,WAAW;uBAAC,OAAO;;;AE7EtB;;AAEG;;;;"}
|
|
@@ -531,6 +531,21 @@ class RadioCardsFieldConfig extends BaseFieldConfig {
|
|
|
531
531
|
this.size = config.size || 'small';
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
|
+
class UserSearchFieldConfig extends BaseFieldConfig {
|
|
535
|
+
optionLabel;
|
|
536
|
+
optionValue;
|
|
537
|
+
size;
|
|
538
|
+
apiUrl;
|
|
539
|
+
constructor(config) {
|
|
540
|
+
super({ ...config, type: 'user-search' });
|
|
541
|
+
this.optionLabel = config.optionLabel || 'label';
|
|
542
|
+
this.optionValue = config.optionValue || 'value';
|
|
543
|
+
this.size = config.size || '';
|
|
544
|
+
this.hint = config.hint || '';
|
|
545
|
+
this.apiUrl = config.apiUrl || '';
|
|
546
|
+
this.placeholder = config.placeholder || 'Search';
|
|
547
|
+
}
|
|
548
|
+
}
|
|
534
549
|
class DateFieldConfig extends BaseFieldConfig {
|
|
535
550
|
dateFormat;
|
|
536
551
|
showTime;
|
|
@@ -736,5 +751,5 @@ function wrapValidatorWithMessage(validator, errorKey, message) {
|
|
|
736
751
|
* Generated bundle index. Do not edit.
|
|
737
752
|
*/
|
|
738
753
|
|
|
739
|
-
export { BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, DateFieldConfig, EditorFieldConfig, IconFieldConfig, MultiSelectFieldConfig, NumberFieldConfig, RadioButtonFieldConfig, RadioCardsFieldConfig, SelectFieldConfig, SliderFieldConfig, TextFieldConfig, TextareaFieldConfig, ToggleFieldConfig, ValidatorConfig, changePrimaryColor, createCustomValidator, generateTailwindPalette, isInvalid, provideMTComponents, provideMTMessages, wrapValidatorWithMessage };
|
|
754
|
+
export { BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, DateFieldConfig, EditorFieldConfig, IconFieldConfig, MultiSelectFieldConfig, NumberFieldConfig, RadioButtonFieldConfig, RadioCardsFieldConfig, SelectFieldConfig, SliderFieldConfig, TextFieldConfig, TextareaFieldConfig, ToggleFieldConfig, UserSearchFieldConfig, ValidatorConfig, changePrimaryColor, createCustomValidator, generateTailwindPalette, isInvalid, provideMTComponents, provideMTMessages, wrapValidatorWithMessage };
|
|
740
755
|
//# sourceMappingURL=masterteam-components.mjs.map
|