@prozorro/prozorro-ui 0.0.48-beta → 0.1.0-beta
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/dist/app/assets/{Color-FRDS63T2-DGwiyhGG.js → Color-FRDS63T2-BVz2f00d.js} +1 -1
- package/dist/app/assets/{Colors.stories-C6tRL3RE.js → Colors.stories-Bqj7ISVt.js} +1 -1
- package/dist/app/assets/{Display.stories-oXy9YHbm.js → Display.stories-B5gIRakW.js} +1 -1
- package/dist/app/assets/{DocsRenderer-LL677BLK-DR0VDCnO.js → DocsRenderer-LL677BLK-BW6aJ_1X.js} +5 -5
- package/dist/app/assets/{Gap.stories-OcBZ5Obx.js → Gap.stories-CniqkF0M.js} +1 -1
- package/dist/app/assets/{Grid.stories-ORthsqGP.js → Grid.stories-FIukTec9.js} +1 -1
- package/dist/app/assets/{PzAccordion-ZGZtmY6Z.js → PzAccordion-j2KPhxkl.js} +1 -1
- package/dist/app/assets/{PzAccordion.stories-COdzTmcx.js → PzAccordion.stories-De5BvfSm.js} +1 -1
- package/dist/app/assets/PzAccordionTable.stories-CsWj-bBP.js +275 -0
- package/dist/app/assets/{PzArrayClamp-BzUXHyXV.css → PzArrayClamp-6pCo87AW.css} +1 -1
- package/dist/app/assets/{PzArrayClamp.stories-y4qdcbs2.js → PzArrayClamp.stories-BSyz8B47.js} +7 -7
- package/dist/app/assets/{PzBreadcrumb-CubvofiN.css → PzBreadcrumb-5IRljnPN.css} +1 -1
- package/dist/app/assets/{PzBreadcrumb.stories-C-Gnxhmj.js → PzBreadcrumb.stories-WrKsdOW9.js} +7 -7
- package/dist/app/assets/{PzBtn-3ZvQQBuK.js → PzBtn-Drnbf-hv.js} +1 -1
- package/dist/app/assets/{PzBtn.stories-GnJlWqFg.js → PzBtn.stories-DpKdGB3_.js} +1 -1
- package/dist/app/assets/{PzCheckbox-Cec3yT-X.js → PzCheckbox-BgVA2A5K.js} +1 -1
- package/dist/app/assets/{PzCheckbox.stories-ChNV6Fg0.js → PzCheckbox.stories-Bdu2y_6p.js} +1 -1
- package/dist/app/assets/{PzCheckboxGroup.stories-C43yzZyL.js → PzCheckboxGroup.stories-_ZK_xrjB.js} +3 -3
- package/dist/app/assets/PzCopyToClipboard-B2LO9HwW.css +1 -0
- package/dist/app/assets/PzCopyToClipboard-CtQGvRub.js +1 -0
- package/dist/app/assets/{PzCopyToClipboard-DofnjMUH.css → PzCopyToClipboard-DL0w8b6k.css} +1 -1
- package/dist/app/assets/PzCopyToClipboard.stories-oJRz-OBl.js +45 -0
- package/dist/app/assets/{PzDate-C8z_woUV.js → PzDate-C4NsinNg.js} +1 -1
- package/dist/app/assets/{PzDate.stories-CGqVByJ2.js → PzDate.stories-CQAvMqYX.js} +1 -1
- package/dist/app/assets/PzDateRange.stories-BmJVrmmM.js +9 -0
- package/dist/app/assets/{PzDomHandler.stories-22JWi4Pk.js → PzDomHandler.stories-CO1-Bgjp.js} +1 -1
- package/dist/app/assets/{PzDropdown.stories-COSplwRg.js → PzDropdown.stories-BncdFzYA.js} +3 -3
- package/dist/app/assets/{PzFileInput-Gac6BDfH.css → PzFileInput-rnctoVro.css} +1 -1
- package/dist/app/assets/{PzFileInput.stories-CzE1HF_5.js → PzFileInput.stories-AJDqwbJJ.js} +4 -4
- package/dist/app/assets/{PzGrid.stories-ByIb2SfH.js → PzGrid.stories-Cb67hM-g.js} +1 -1
- package/dist/app/assets/{PzHint-K4f9bbv4.js → PzHint-MA6f7oIU.js} +1 -1
- package/dist/app/assets/{PzHint.stories-CYPoWmOd.js → PzHint.stories-Dzn1mJDu.js} +1 -1
- package/dist/app/assets/{PzIcon-D_M29Jem.js → PzIcon-B6DKI9jR.js} +1 -1
- package/dist/app/assets/{PzIcon.stories-D-1U9HzF.js → PzIcon.stories-BprUm_Rr.js} +1 -1
- package/dist/app/assets/{PzImage.stories-Cyqp9_Ts.js → PzImage.stories-DzkaXp9y.js} +1 -1
- package/dist/app/assets/{PzImageInput-Xn8tHgIu.css → PzImageInput-DbgEYyxQ.css} +1 -1
- package/dist/app/assets/{PzImageInput.stories-Cv9hiX3A.js → PzImageInput.stories-B3lBLZ95.js} +4 -4
- package/dist/app/assets/{PzInfoBlockLayout.stories-mLOZ2BUl.js → PzInfoBlockLayout.stories-BVDKrECL.js} +2 -2
- package/dist/app/assets/PzInfoHint-CJq5yECH.css +1 -0
- package/dist/app/assets/PzInfoHint-DqQNQxBD.js +1 -0
- package/dist/app/assets/{PzInfoHint.stories-DGDVX4Vl.js → PzInfoHint.stories-D-C_-yH2.js} +3 -3
- package/dist/app/assets/{PzInput.stories-DRzqfsxV.js → PzInput.stories-DdHwlzhn.js} +3 -3
- package/dist/app/assets/{PzInputDate.stories-Cx-o9L-B.js → PzInputDate.stories-DjWamRsZ.js} +2 -2
- package/dist/app/assets/{PzInputNumber.stories-UPBL99Te.js → PzInputNumber.stories-BtBZRw3_.js} +3 -3
- package/dist/app/assets/PzKeyValue-CZOOY--K.js +1 -0
- package/dist/app/assets/{PzKeyValue.stories-DNKUjpj6.js → PzKeyValue.stories-BZmHYazM.js} +1 -1
- package/dist/app/assets/{PzLabel-Sk7Zfnxm.js → PzLabel-BDpZH4kX.js} +1 -1
- package/dist/app/assets/{PzLabel.stories-h137KH6Z.js → PzLabel.stories-C_lElhhL.js} +1 -1
- package/dist/app/assets/{PzLink-DUfO673p.js → PzLink-DpFdQYYh.js} +1 -1
- package/dist/app/assets/{PzLink.stories-Bal23npH.js → PzLink.stories-DaRb3tYd.js} +1 -1
- package/dist/app/assets/{PzListNav-fzVCtoPb.js → PzListNav-Cd3sDdJJ.js} +1 -1
- package/dist/app/assets/{PzListNav.stories-CjOGwy2_.js → PzListNav.stories-BW5mTNNu.js} +2 -2
- package/dist/app/assets/PzLoader-CwFuPxgP.css +1 -0
- package/dist/app/assets/PzLoader.stories-bZF_OC5v.js +9 -0
- package/dist/app/assets/PzMessages-B-LKEjuh.js +1 -0
- package/dist/app/assets/PzMessages.stories-D357hVjI.js +15 -0
- package/dist/app/assets/{PzModal-CnBWmDSc.css → PzModal-CrAwJgjU.css} +1 -1
- package/dist/app/assets/{PzModal.stories-DNr1FYLX.js → PzModal.stories-BBik0MMz.js} +8 -8
- package/dist/app/assets/{PzMultiSelect-Cfb6evRy.css → PzMultiSelect-BEXt5IOi.css} +1 -1
- package/dist/app/assets/{PzMultiSelect.stories-DdABvYVV.js → PzMultiSelect.stories-CmMH-lZl.js} +13 -13
- package/dist/app/assets/{PzNav.stories-DssZV4Fn.js → PzNav.stories-B9fCLP7H.js} +4 -4
- package/dist/app/assets/{PzNumberFormat.stories-DCzc0PDa.js → PzNumberFormat.stories-DwMjhEp5.js} +1 -1
- package/dist/app/assets/{PzPagination-DrdBvKcE.css → PzPagination-B1-6uy7o.css} +1 -1
- package/dist/app/assets/PzPagination-Cjrdt8eD.js +1 -0
- package/dist/app/assets/{PzPagination.stories-lo_0kD77.js → PzPagination.stories-DF06-Z_g.js} +2 -2
- package/dist/app/assets/{PzPaginationProvider.stories-C5CrTPLC.js → PzPaginationProvider.stories-BsxcJ4Gw.js} +2 -2
- package/dist/app/assets/{PzPriceFormat.stories-CNCQQ9FB.js → PzPriceFormat.stories-Dwbd5NWP.js} +1 -1
- package/dist/app/assets/{PzRadioGroup.stories-BB1uAgGt.js → PzRadioGroup.stories-C6ut-aeX.js} +2 -2
- package/dist/app/assets/{PzRouterLink.stories-CUKyZFlv.js → PzRouterLink.stories-CrO16wW6.js} +3 -3
- package/dist/app/assets/{PzScrollTo.stories-p19ZARL7.js → PzScrollTo.stories-mL--WFXj.js} +1 -1
- package/dist/app/assets/{PzSearchResultItemLayout.stories-BjEYwCDt.js → PzSearchResultItemLayout.stories-B8wizn8U.js} +1 -1
- package/dist/app/assets/PzSelect-Bf-GWA7x.js +1 -0
- package/dist/app/assets/{PzSelect.stories-Dr8u6y0g.js → PzSelect.stories-CVbDST1l.js} +1 -1
- package/dist/app/assets/{PzSkeleton-hGMlIe1N.js → PzSkeleton-djLtPALS.js} +1 -1
- package/dist/app/assets/{PzSkeleton.stories-Bu6iTcDi.js → PzSkeleton.stories-Cg9CmgiB.js} +1 -1
- package/dist/app/assets/{PzStatus-CZtMdZaT.js → PzStatus-DBgvFPIT.js} +1 -1
- package/dist/app/assets/{PzStatus.stories-BHuiK8zy.js → PzStatus.stories-Cm1S0Mck.js} +1 -1
- package/dist/app/assets/PzTable-Cwro4jnD.js +1 -0
- package/dist/app/assets/{PzTable-C59sd8hh.css → PzTable-DCIfmtm8.css} +1 -1
- package/dist/app/assets/{PzTable.stories-B2pVMF6l.js → PzTable.stories-DLcBKDhp.js} +3 -3
- package/dist/app/assets/PzTablePaginationProvider.stories-B0HDUohI.js +32 -0
- package/dist/app/assets/{PzTabs.stories-C1UH6KxI.js → PzTabs.stories-4bBKN-ug.js} +2 -2
- package/dist/app/assets/{PzTag-BdWYHSYV.js → PzTag-VsavdTWa.js} +1 -1
- package/dist/app/assets/{PzTag.stories-KF2LEV9t.js → PzTag.stories-zvomqWhr.js} +1 -1
- package/dist/app/assets/{PzText-D28wm55Y.js → PzText-BoQ90zAW.js} +1 -1
- package/dist/app/assets/{PzText.stories-Ax8x9D14.js → PzText.stories-sdVXnwKv.js} +1 -1
- package/dist/app/assets/{PzTextClamp-D9MjEcfh.css → PzTextClamp-DpdwWXt9.css} +1 -1
- package/dist/app/assets/PzTextClamp.stories-DCG6vgz5.js +150 -0
- package/dist/app/assets/{PzTextarea.stories-YtyiPANf.js → PzTextarea.stories-BMRUE73i.js} +5 -5
- package/dist/app/assets/{PzValidatorXSS.stories-iy7ESRaV.js → PzValidatorXSS.stories-aDwsXWzG.js} +1 -1
- package/dist/app/assets/{Spacing.stories-D1adSb8d.js → Spacing.stories-BX_Vc1F9.js} +1 -1
- package/dist/app/assets/{StaticPagination.composable-B65l6eaY.js → StaticPagination.composable-Ck7EHnzo.js} +1 -1
- package/dist/app/assets/{Typography.stories-CY9u_j9S.js → Typography.stories-DMi76uSN.js} +1 -1
- package/dist/app/assets/{WithTooltip-65CFNBJE-CxghxT7L.js → WithTooltip-65CFNBJE-D-QzTy-o.js} +1 -1
- package/dist/app/assets/configs-D5Kdbqb7.js +1 -0
- package/dist/app/assets/{floating-vue-BJ2OXy_O.js → floating-vue-DVoT3Xpy.js} +1 -1
- package/dist/app/assets/{floating-vue-C_PX9A2b.js → floating-vue-OkqMh8FV.js} +1 -1
- package/dist/app/assets/{formatter-EIJCOSYU-CdXcwTt0.js → formatter-EIJCOSYU-esurYlwa.js} +1 -1
- package/dist/app/assets/{iframe-Do6fIq0O.js → iframe-DU_JVmy2.js} +4 -4
- package/dist/app/assets/{index-xSygHBWW.js → index-Dh-7SPEm.js} +1 -1
- package/dist/app/assets/{syntaxhighlighter-OH4MV7E3-BoFCZ4Nr.js → syntaxhighlighter-OH4MV7E3-NRwygmmB.js} +1 -1
- package/dist/app/iframe.html +1 -1
- package/dist/app/index.json +1 -1
- package/dist/app/project.json +1 -1
- package/dist/components/Actions/PzCopyToClipboard/PzCopyToClipboard.vue.d.ts +0 -2
- package/dist/components/Display/PzLoader/PzLoader.vue.d.ts +0 -1
- package/dist/components/Form/PzFileInput/PzFileInput.vue.d.ts +0 -1
- package/dist/components/Form/PzImageInput/PzImageInput.vue.d.ts +0 -1
- package/dist/components/Form/PzMultiSelect/PzMultiSelect.vue.d.ts +0 -1
- package/dist/components/Form/shared/configs.d.ts +0 -15
- package/dist/components/Navigation/PzBreadcrumb/PzBreadcrumb.vue.d.ts +3 -3
- package/dist/components/Popups/PzModal/PzModal.vue.d.ts +0 -1
- package/dist/components/Popups/PzModal/constants.d.ts +0 -2
- package/dist/components/Text/PzArrayClamp/PzArrayClamp.vue.d.ts +0 -2
- package/dist/components/Text/PzTextClamp/PzTextClamp.vue.d.ts +0 -2
- package/dist/index.d.ts +1 -0
- package/dist/package.json +1 -1
- package/dist/prozorro-ui.cjs +14 -14
- package/dist/prozorro-ui.js +4595 -4477
- package/dist/services/PzMessages/PzMessages.d.ts +21 -0
- package/dist/services/PzMessages/constants.d.ts +11 -0
- package/dist/services/PzMessages/index.d.ts +2 -0
- package/dist/services/PzMessages/types.d.ts +95 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/app/assets/PzAccordionTable.stories-7XMDsSUZ.js +0 -275
- package/dist/app/assets/PzCopyToClipboard.stories-BeoHUszf.js +0 -45
- package/dist/app/assets/PzDateRange.stories-DTEKUrii.js +0 -9
- package/dist/app/assets/PzInfoHint-BotCQ26a.js +0 -1
- package/dist/app/assets/PzInfoHint-CWG8xkDj.css +0 -1
- package/dist/app/assets/PzKeyValue-C4V_BBbW.js +0 -1
- package/dist/app/assets/PzLoader-J7_Govh3.css +0 -1
- package/dist/app/assets/PzLoader.stories-CkmSVpVi.js +0 -9
- package/dist/app/assets/PzPagination-B_K2ZW4F.js +0 -1
- package/dist/app/assets/PzSelect-DtTfIM1x.js +0 -1
- package/dist/app/assets/PzTable-DgKlWdrk.js +0 -1
- package/dist/app/assets/PzTablePaginationProvider.stories-CN6uZcf6.js +0 -32
- package/dist/app/assets/PzTextClamp.stories-BsC8cDUD.js +0 -150
- package/dist/app/assets/configs-CZIaFchr.js +0 -1
- package/dist/components/Navigation/PzBreadcrumb/constants.d.ts +0 -4
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import{e as se,a3 as xe,w as x,a4 as fe,h as _e,o as q,f as ge,q as U,y as H,C as g,n as he,r as C,c as v,i as X,u as Z,x as G,g as ve,Z as ze,B as ye,t as be,p as we}from"./iframe-Do6fIq0O.js";import{P as oe}from"./PzText-D28wm55Y.js";import{p as Ce}from"./configs-B15JgQZ-.js";import{P as Le}from"./PzBtn-3ZvQQBuK.js";import{_ as Te}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./preload-helper-C1FmrZbK.js";var R=null;function Se(e){return R||(R=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a){return setTimeout(a,16)}).bind(window)),R(e)}var N=null;function Pe(e){N||(N=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(a){clearTimeout(a)}).bind(window)),N(e)}function Ee(e){var a=document.createElement("style");return a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e)),(document.querySelector("head")||document.body).appendChild(a),a}function z(e,a){a===void 0&&(a={});var t=document.createElement(e);return Object.keys(a).forEach(function(r){t[r]=a[r]}),t}function ie(e,a,t){var r=window.getComputedStyle(e,null)||{display:"none"};return r[a]}function O(e){if(!document.documentElement.contains(e))return{detached:!0,rendered:!1};for(var a=e;a!==document;){if(ie(a,"display")==="none")return{detached:!1,rendered:!1};a=a.parentNode}return{detached:!1,rendered:!0}}var ke='.resize-triggers{visibility:hidden;opacity:0;pointer-events:none}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:"";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}',A=0,L=null;function Re(e,a){e.__resize_mutation_handler__||(e.__resize_mutation_handler__=He.bind(e));var t=e.__resize_listeners__;if(!t){if(e.__resize_listeners__=[],window.ResizeObserver){var r=e.offsetWidth,i=e.offsetHeight,o=new ResizeObserver(function(){!e.__resize_observer_triggered__&&(e.__resize_observer_triggered__=!0,e.offsetWidth===r&&e.offsetHeight===i)||S(e)}),n=O(e),p=n.detached,d=n.rendered;e.__resize_observer_triggered__=p===!1&&d===!1,e.__resize_observer__=o,o.observe(e)}else if(e.attachEvent&&e.addEventListener)e.__resize_legacy_resize_handler__=function(){S(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(A||(L=Ee(ke)),Oe(e),e.__resize_rendered__=O(e).rendered,window.MutationObserver){var l=new MutationObserver(e.__resize_mutation_handler__);l.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),e.__resize_mutation_observer__=l}}e.__resize_listeners__.push(a),A++}function Ne(e,a){var t=e.__resize_listeners__;if(t){if(a&&t.splice(t.indexOf(a),1),!t.length||!a){if(e.detachEvent&&e.removeEventListener){e.detachEvent("onresize",e.__resize_legacy_resize_handler__),document.removeEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);return}e.__resize_observer__?(e.__resize_observer__.unobserve(e),e.__resize_observer__.disconnect(),e.__resize_observer__=null):(e.__resize_mutation_observer__&&(e.__resize_mutation_observer__.disconnect(),e.__resize_mutation_observer__=null),e.removeEventListener("scroll",B),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}!--A&&L&&L.parentNode.removeChild(L)}}function qe(e){var a=e.__resize_last__,t=a.width,r=a.height,i=e.offsetWidth,o=e.offsetHeight;return i!==t||o!==r?{width:i,height:o}:null}function He(){var e=O(this),a=e.rendered,t=e.detached;a!==this.__resize_rendered__&&(!t&&this.__resize_triggers__&&(F(this),this.addEventListener("scroll",B,!0)),this.__resize_rendered__=a,S(this))}function B(){var e=this;F(this),this.__resize_raf__&&Pe(this.__resize_raf__),this.__resize_raf__=Se(function(){var a=qe(e);a&&(e.__resize_last__=a,S(e))})}function S(e){!e||!e.__resize_listeners__||e.__resize_listeners__.forEach(function(a){a.call(e,e)})}function Oe(e){var a=ie(e,"position");(!a||a==="static")&&(e.style.position="relative"),e.__resize_old_position__=a,e.__resize_last__={};var t=z("div",{className:"resize-triggers"}),r=z("div",{className:"resize-expand-trigger"}),i=z("div"),o=z("div",{className:"resize-contract-trigger"});r.appendChild(i),t.appendChild(r),t.appendChild(o),e.appendChild(t),e.__resize_triggers__={triggers:t,expand:r,expandChild:i,contract:o},F(e),e.addEventListener("scroll",B,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}function F(e){var a=e.__resize_triggers__,t=a.expand,r=a.expandChild,i=a.contract,o=i.scrollWidth,n=i.scrollHeight,p=t.offsetWidth,d=t.offsetHeight,l=t.scrollWidth,f=t.scrollHeight;i.scrollLeft=o,i.scrollTop=n,r.style.width=p+1+"px",r.style.height=d+1+"px",t.scrollLeft=l,t.scrollTop=f}const Ae=["aria-label"];var le=se({__name:"text-clamp",props:{text:{type:String,required:!0},maxHeight:{type:[String,Number],required:!1},maxLines:{type:Number,required:!1},expanded:{type:Boolean,required:!1,default:!1},location:{type:String,required:!1,default:"end"},ellipsis:{type:String,required:!1,default:"…"},autoResize:{type:Boolean,required:!1,default:!1}},emits:["clamp-change","update:expanded"],setup(e,{emit:a}){const t=e,r=C(null),i=C(null),o=C(null),n=xe({offset:0,localExpanded:!!t.expanded,unregisterResizeCallback:null}),p=v(()=>{if(!n.localExpanded&&t.maxHeight)return typeof(t==null?void 0:t.maxHeight)=="number"?`${t==null?void 0:t.maxHeight}px`:t==null?void 0:t.maxHeight}),d=()=>{o.value&&(o.value.textContent=ue.value)},l=()=>{n.localExpanded||(d(),(h()||c.value)&&E())},f=()=>{t.text&&(n.offset=t.text.length,V(),t.autoResize&&r.value&&(Re(r.value,l),n.unregisterResizeCallback=()=>{r.value&&Ne(r.value,l)}),l())},V=()=>{var s;(s=n.unregisterResizeCallback)==null||s.call(n)},h=()=>!(!t.maxLines&&!t.maxHeight)&&!!r.value&&(!!(t.maxLines&&P()>t.maxLines)||!!(t.maxHeight&&r.value.scrollHeight>r.value.offsetHeight)),P=()=>i.value?Object.keys(Array.prototype.slice.call(i.value.getClientRects()).reduce((s,{top:u,bottom:_})=>{const m=`${u}/${_}`;return s[m]||(s[m]=!0),s},{})).length:0,E=(...s)=>{const[u=0,_=n.offset]=s;if(_-u<=3)return void de();const m=Math.floor((_+u)/2);k(m),h()?E(u,m):E(m,_)},k=s=>{n.offset=s,d()},de=()=>{pe(),ce()},pe=()=>{for(;(!h()||P()<2)&&n.offset<t.text.length;)j(1)},ce=()=>{for(;h()&&P()>1&&n.offset>0;)j(-1)},j=s=>{k(n.offset+s)},c=v(()=>!!t.text&&n.offset!==t.text.length);x(()=>c.value,s=>{setTimeout(()=>{a("clamp-change",s)},0)},{immediate:!0});const ue=v(()=>c.value?me.value:t.text),me=v(()=>{if(t.location==="start")return t.ellipsis+(t.text.slice(-n.offset)||"").trim();if(t.location==="middle"){const s=Math.floor(n.offset/2);return(t.text.slice(0,s)||"").trim()+t.ellipsis+(t.text.slice(-s)||"").trim()}return(t.text.slice(0,n.offset)||"").trim()+t.ellipsis}),D=()=>{n.localExpanded=!0},W=()=>{n.localExpanded=!1},I=()=>{n.localExpanded=!n.localExpanded};return x(()=>t.expanded,s=>{n.localExpanded=s}),x(()=>n.localExpanded,s=>{s?k(t.text.length):l(),t.expanded!==s&&a("update:expanded",s)}),x(()=>[t.maxLines,t.maxHeight,t.ellipsis,t.location,c.value].join(),()=>{X(()=>{l()})}),x(()=>[t.text,t.autoResize].join(),()=>{X(()=>{f()})}),fe(()=>{V()}),_e(()=>{f()}),(s,u)=>(q(),ge("div",{ref_key:"textClampRef",ref:r,class:"text-clamp",style:he({overflow:"hidden",maxHeight:g(p)})},[U("span",{ref_key:"contentRef",ref:i},[H(s.$slots,"before",{expand:D,collapse:W,toggle:I,clamped:g(c),expanded:n.localExpanded}),U("span",{ref_key:"textRef",ref:o,"aria-label":e.text},null,8,Ae),H(s.$slots,"after",{expand:D,collapse:W,toggle:I,clamped:g(c),expanded:n.localExpanded})],512)],4))}});le.__file="package/text-clamp.vue";const Me=e=>(e.install=function(a){a.component(e.__name,e)},e),$e=Me(le),Be=3,Fe="... ",T=se({name:"PzTextClamp",__name:"PzTextClamp",props:{text:{},maxContentLines:{default:Be},clampPostfix:{default:Fe},btnClass:{default:""},autoResize:{type:Boolean,default:!0},expanded:{type:Boolean,default:!1},expandLabel:{default:"Show more"},collapseLabel:{default:"Collapse"},typography:{}},emits:["update:expanded","clamp-change"],setup(e,{emit:a}){const t=a,r=o=>{t("update:expanded",o)},i=o=>{t("clamp-change",o)};return(o,n)=>(q(),Z(g($e),{text:e.text,"max-lines":e.maxContentLines,ellipsis:e.clampPostfix,expanded:e.expanded,"auto-resize":e.autoResize,class:ve(["pz-text-clamp",e.typography?`pz-typography--${e.typography}`:null]),"onUpdate:expanded":r,onClampChange:i},{after:G(({toggle:p,expanded:d,clamped:l})=>[H(o.$slots,"toggle",{toggle:p,expanded:d,clamped:l},()=>[l||d?(q(),Z(g(Le),{key:0,variant:"transparent",type:"button",typography:e.typography??"body-regular",class:"pz-text-clamp__btn",onClick:ze(p,["stop"])},{default:G(()=>[ye(be(d?e.collapseLabel:e.expandLabel),1)]),_:2},1032,["typography","onClick"])):we("",!0)],!0)]),_:3},8,["text","max-lines","ellipsis","expanded","auto-resize","class"]))}}),M=Te(T,[["__scopeId","data-v-82381675"]]);T.__docgenInfo=Object.assign({displayName:T.name??T.__name},{name:"PzTextClamp",exportName:"default",displayName:"PzTextClamp",description:"",tags:{},props:[{name:"text",required:!0,type:{name:"string"}},{name:"maxContentLines",required:!1,type:{name:"number"},defaultValue:{func:!1,value:"MAX_CONTENT_LINES"}},{name:"clampPostfix",required:!1,type:{name:"string"},defaultValue:{func:!1,value:"DEFAULT_CLAMP_POSTFIX"}},{name:"btnClass",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}},{name:"autoResize",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"expanded",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"expandLabel",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'"Show more"'}},{name:"collapseLabel",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'"Collapse"'}},{name:"typography",required:!1,type:{name:"PzTextVariant"}}],events:[{name:"update:expanded",type:{names:["boolean"]}},{name:"clamp-change",type:{names:["boolean"]}}],slots:[{name:"toggle",scoped:!0,bindings:[{name:"toggle",title:"binding"},{name:"expanded",title:"binding"},{name:"clamped",title:"binding"}]}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Text/PzTextClamp/PzTextClamp.vue"]});const $=[{kicker:"News teaser",title:"Two lines with default toggle",text:"The procurement framework for recovery projects should remain readable even when editors add dense context, supporting details, and legal clarifications into a single preview paragraph.",maxContentLines:2},{kicker:"Tender summary",title:"Three lines with longer body copy",text:"Prozorro teams often need the first block of text to stay compact inside cards, while still giving visitors a way to reveal the full explanation, deadlines, and rationale without leaving the page context.",maxContentLines:3},{kicker:"Always expanded",title:"Controlled expanded state",text:"This example starts opened to show that the wrapper supports v-model style control through update:expanded and still keeps the same text treatment as the collapsed variant.",maxContentLines:2,expanded:!0}],Ve=e=>`<template>
|
|
2
|
-
<PzTextClamp ${[`text="${e.text}"`,e.maxContentLines!==3?`:max-content-lines="${e.maxContentLines}"`:null,e.clampPostfix!=="... "?`clamp-postfix="${e.clampPostfix}"`:null,e.expandLabel!=="Show more"?`expand-label="${e.expandLabel}"`:null,e.collapseLabel!=="Collapse"?`collapse-label="${e.collapseLabel}"`:null,e.expanded?':expanded="true"':null].filter(t=>!!t).join(" ")} />
|
|
3
|
-
</template>`,je=()=>`<template>
|
|
4
|
-
<PzTextClamp
|
|
5
|
-
text="Long procurement summary that needs a custom action."
|
|
6
|
-
:max-content-lines="2"
|
|
7
|
-
>
|
|
8
|
-
<template #toggle="{ toggle, expanded, clamped }">
|
|
9
|
-
<button
|
|
10
|
-
v-if="clamped || expanded"
|
|
11
|
-
type="button"
|
|
12
|
-
class="custom-toggle"
|
|
13
|
-
@click="toggle"
|
|
14
|
-
>
|
|
15
|
-
{{ expanded ? "Hide details" : "Open full text" }}
|
|
16
|
-
</button>
|
|
17
|
-
</template>
|
|
18
|
-
</PzTextClamp>
|
|
19
|
-
</template>`,De={title:"Components/Text/PzTextClamp",component:M,parameters:{prototype:{caption:"Text clamp component",note:"Built as a thin wrapper over vue3-text-clamp, reusing the old text/max-lines/postfix/button-class contract and replacing app-specific translations with explicit labels and a toggle slot."},docs:{description:{component:"Use `PzTextClamp` for compact previews of long copy. It defaults to the `body-regular` text style, exposes the old clamp props, and supports toggle customization through `v-model:expanded` and the `toggle` slot."},source:{transform:(e,a)=>Ve(a.args??De.args)}}},args:{text:$[1].text,maxContentLines:3,clampPostfix:"... ",btnClass:"",autoResize:!0,expanded:!1,expandLabel:"Show more",collapseLabel:"Collapse",typography:void 0,title:"Long-form card description"},argTypes:{text:{control:"text",description:"Source text rendered by the clamp component."},maxContentLines:{control:{type:"number",min:1,max:8,step:1},description:"Maximum number of visible lines before the text is clamped."},clampPostfix:{control:"text",description:"String appended to the truncated text."},btnClass:{control:"text",description:"Additional class names applied to the default toggle button."},autoResize:{control:"boolean",description:"Recalculates clamping on layout changes."},expanded:{control:"boolean",description:"Controlled expanded state."},expandLabel:{control:"text",description:"Default label shown while the text is collapsed."},collapseLabel:{control:"text",description:"Default label shown while the text is expanded."},typography:{control:"select",options:[void 0,...Ce],description:"Overrides typography using a PzText variant."},title:{control:"text",description:"Preview heading used in the story only.",table:{category:"Story"}}},render:e=>({components:{pzText:oe,pzTextClamp:M},setup(){const a=C(!!e.expanded);return x(()=>e.expanded,t=>{a.value=!!t}),{args:e,expanded:a,clampStories:$}},template:`
|
|
20
|
-
<div class="pz-text-clamp-story">
|
|
21
|
-
<section class="pz-text-clamp-story-hero">
|
|
22
|
-
<div class="pz-text-clamp-story-copy">
|
|
23
|
-
<span class="pz-text-clamp-story-eyebrow">Body Regular by default</span>
|
|
24
|
-
<pz-text variant="h4-bold">{{ args.title }}</pz-text>
|
|
25
|
-
<pz-text variant="body-regular">
|
|
26
|
-
Clamp long editorial or procurement copy without creating new typography rules for each surface.
|
|
27
|
-
</pz-text>
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
<div class="pz-text-clamp-story-preview">
|
|
31
|
-
<pz-text variant="small-semibold" as="span" class="pz-text-clamp-story-chip">
|
|
32
|
-
{{ expanded ? "expanded" : "collapsed" }}
|
|
33
|
-
</pz-text>
|
|
34
|
-
|
|
35
|
-
<pz-text-clamp
|
|
36
|
-
:text="args.text"
|
|
37
|
-
:max-content-lines="args.maxContentLines"
|
|
38
|
-
:clamp-postfix="args.clampPostfix"
|
|
39
|
-
:btn-class="args.btnClass"
|
|
40
|
-
:auto-resize="args.autoResize"
|
|
41
|
-
:expanded="expanded"
|
|
42
|
-
:expand-label="args.expandLabel"
|
|
43
|
-
:collapse-label="args.collapseLabel"
|
|
44
|
-
:typography="args.typography"
|
|
45
|
-
@update:expanded="expanded = $event"
|
|
46
|
-
/>
|
|
47
|
-
</div>
|
|
48
|
-
</section>
|
|
49
|
-
|
|
50
|
-
<section class="pz-text-clamp-story-grid">
|
|
51
|
-
<article
|
|
52
|
-
v-for="item in clampStories"
|
|
53
|
-
:key="item.title"
|
|
54
|
-
class="pz-text-clamp-story-card"
|
|
55
|
-
>
|
|
56
|
-
<div class="pz-text-clamp-story-card-header">
|
|
57
|
-
<span class="pz-text-clamp-story-kicker">{{ item.kicker }}</span>
|
|
58
|
-
<pz-text variant="body-semibold">{{ item.title }}</pz-text>
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
<pz-text-clamp
|
|
62
|
-
:text="item.text"
|
|
63
|
-
:max-content-lines="item.maxContentLines"
|
|
64
|
-
:expanded="item.expanded"
|
|
65
|
-
/>
|
|
66
|
-
</article>
|
|
67
|
-
</section>
|
|
68
|
-
</div>
|
|
69
|
-
`})},y={},b={args:{text:$[0].text,maxContentLines:2,title:"News teaser"}},w={parameters:{docs:{source:{code:je()}}},render:()=>({components:{pzText:oe,pzTextClamp:M},setup(){return{text:"Publishing teams can replace the default inline action with a branded control while keeping the same clamp behavior and the same underlying library implementation."}},template:`
|
|
70
|
-
<div class="pz-text-clamp-story">
|
|
71
|
-
<section class="pz-text-clamp-story-hero">
|
|
72
|
-
<div class="pz-text-clamp-story-copy">
|
|
73
|
-
<span class="pz-text-clamp-story-eyebrow">Toggle slot</span>
|
|
74
|
-
<pz-text variant="h4-bold">Custom action content</pz-text>
|
|
75
|
-
</div>
|
|
76
|
-
|
|
77
|
-
<div class="pz-text-clamp-story-preview">
|
|
78
|
-
<pz-text-clamp
|
|
79
|
-
:text="text"
|
|
80
|
-
:max-content-lines="2"
|
|
81
|
-
>
|
|
82
|
-
<template #toggle="{ toggle, expanded, clamped }">
|
|
83
|
-
<button
|
|
84
|
-
v-if="clamped || expanded"
|
|
85
|
-
type="button"
|
|
86
|
-
class="pz-text-clamp-story-custom-toggle"
|
|
87
|
-
@click="toggle"
|
|
88
|
-
>
|
|
89
|
-
{{ expanded ? "Hide details" : "Open full text" }}
|
|
90
|
-
</button>
|
|
91
|
-
</template>
|
|
92
|
-
</pz-text-clamp>
|
|
93
|
-
</div>
|
|
94
|
-
</section>
|
|
95
|
-
</div>
|
|
96
|
-
`})};var J,K,Q;y.parameters={...y.parameters,docs:{...(J=y.parameters)==null?void 0:J.docs,source:{originalSource:"{}",...(Q=(K=y.parameters)==null?void 0:K.docs)==null?void 0:Q.source}}};var Y,ee,te;b.parameters={...b.parameters,docs:{...(Y=b.parameters)==null?void 0:Y.docs,source:{originalSource:`{
|
|
97
|
-
args: {
|
|
98
|
-
text: clampStories[0].text,
|
|
99
|
-
maxContentLines: 2,
|
|
100
|
-
title: "News teaser"
|
|
101
|
-
}
|
|
102
|
-
}`,...(te=(ee=b.parameters)==null?void 0:ee.docs)==null?void 0:te.source}}};var ae,ne,re;w.parameters={...w.parameters,docs:{...(ae=w.parameters)==null?void 0:ae.docs,source:{originalSource:`{
|
|
103
|
-
parameters: {
|
|
104
|
-
docs: {
|
|
105
|
-
source: {
|
|
106
|
-
code: buildSlotSource()
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
render: () => ({
|
|
111
|
-
components: {
|
|
112
|
-
pzText: PzText,
|
|
113
|
-
pzTextClamp: PzTextClamp
|
|
114
|
-
},
|
|
115
|
-
setup() {
|
|
116
|
-
const text = "Publishing teams can replace the default inline action with a branded control while keeping the same clamp behavior and the same underlying library implementation.";
|
|
117
|
-
return {
|
|
118
|
-
text
|
|
119
|
-
};
|
|
120
|
-
},
|
|
121
|
-
template: \`
|
|
122
|
-
<div class="pz-text-clamp-story">
|
|
123
|
-
<section class="pz-text-clamp-story-hero">
|
|
124
|
-
<div class="pz-text-clamp-story-copy">
|
|
125
|
-
<span class="pz-text-clamp-story-eyebrow">Toggle slot</span>
|
|
126
|
-
<pz-text variant="h4-bold">Custom action content</pz-text>
|
|
127
|
-
</div>
|
|
128
|
-
|
|
129
|
-
<div class="pz-text-clamp-story-preview">
|
|
130
|
-
<pz-text-clamp
|
|
131
|
-
:text="text"
|
|
132
|
-
:max-content-lines="2"
|
|
133
|
-
>
|
|
134
|
-
<template #toggle="{ toggle, expanded, clamped }">
|
|
135
|
-
<button
|
|
136
|
-
v-if="clamped || expanded"
|
|
137
|
-
type="button"
|
|
138
|
-
class="pz-text-clamp-story-custom-toggle"
|
|
139
|
-
@click="toggle"
|
|
140
|
-
>
|
|
141
|
-
{{ expanded ? "Hide details" : "Open full text" }}
|
|
142
|
-
</button>
|
|
143
|
-
</template>
|
|
144
|
-
</pz-text-clamp>
|
|
145
|
-
</div>
|
|
146
|
-
</section>
|
|
147
|
-
</div>
|
|
148
|
-
\`
|
|
149
|
-
})
|
|
150
|
-
}`,...(re=(ne=w.parameters)==null?void 0:ne.docs)==null?void 0:re.source}}};const Je=["Playground","TwoLines","CustomToggle"];export{w as CustomToggle,y as Playground,b as TwoLines,Je as __namedExportsOrder,De as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=["checkbox","switch"],o={acceptedExtensions:[".txt",".doc",".docx",".pdf"],maxSizeBytes:20971520,maxFiles:20},t={acceptedExtensions:[".png",".jpg",".jpeg"],maxSizeBytes:1024*1024,imageWidth:800,imageHeight:800},s={buttonLabel:"Додати документ",helperText:"Документ має бути у форматі .txt, .doc, .docx або .pdf, розміром до 20 МБ",invalidExtensionMessage:"Невірний формат документа",fileTooLargeMessage:"Розмір документа перевищує 20 МБ",removeButtonLabel:"Видалити документ"},a={buttonLabel:"Додати зображення",helperText:"Формат зображення має бути .png, .jpg або .jpeg, розміром до 1 МБ та 800x800 px",invalidExtensionMessage:"Невірний формат зображення",fileTooLargeMessage:"Розмір зображення перевищує 1 МБ",invalidDimensionsMessage:"Розмір зображення має бути 800x800 px",editButtonLabel:"Редагувати зображення"};export{s as a,o as b,a as c,t as d,e as p};
|