@prozorro/prozorro-ui 0.0.41-beta → 0.0.43-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-2obUEhCm.js → Color-FRDS63T2-DgnS4N6X.js} +1 -1
- package/dist/app/assets/{Colors.stories-BMbHMhGA.js → Colors.stories-6h4keQbq.js} +1 -1
- package/dist/app/assets/{Display.stories-BBjsLwDc.js → Display.stories-BFrXHEJ4.js} +1 -1
- package/dist/app/assets/{DocsRenderer-LL677BLK-CuOoqRZl.js → DocsRenderer-LL677BLK-Cba908TN.js} +5 -5
- package/dist/app/assets/Gap-BWNZxL-I.css +1 -0
- package/dist/app/assets/Gap.stories-JdFpzPby.js +150 -0
- package/dist/app/assets/{Grid.stories-CQZCZI5j.js → Grid.stories-B_-vP0Uk.js} +1 -1
- package/dist/app/assets/PzAccordion-BT9BQIFR.js +1 -0
- package/dist/app/assets/PzAccordion-C5E0-Y2-.css +1 -0
- package/dist/app/assets/PzAccordion-DlHGgAeU.css +1 -0
- package/dist/app/assets/{PzAccordion.stories-DOIXAlLU.js → PzAccordion.stories-rXmsbnEe.js} +98 -20
- package/dist/app/assets/{PzAccordionTable.stories-XpYTmVac.js → PzAccordionTable.stories-DubcW4ov.js} +1 -1
- package/dist/app/assets/{PzArrayClamp.stories-DRzMKk3Q.js → PzArrayClamp.stories-Doc19RiO.js} +4 -4
- package/dist/app/assets/{PzBreadcrumb.stories-DSwR6Zhy.js → PzBreadcrumb.stories-vbJqi27z.js} +1 -1
- package/dist/app/assets/{PzBtn-CHWxsUbf.js → PzBtn-1iB766YP.js} +1 -1
- package/dist/app/assets/{PzBtn.stories-DMcabHwY.js → PzBtn.stories-Cp7S8PKp.js} +1 -1
- package/dist/app/assets/{PzCheckbox-DUlY0-zQ.js → PzCheckbox-DiI37O2v.js} +1 -1
- package/dist/app/assets/{PzCheckbox.stories-CGIuN9RB.js → PzCheckbox.stories-D_gzp-Fc.js} +1 -1
- package/dist/app/assets/{PzCheckboxGroup.stories-DKXcZ7XR.js → PzCheckboxGroup.stories-h61QD6oS.js} +2 -2
- package/dist/app/assets/{PzCopyToClipboard.stories-BqX-I96y.js → PzCopyToClipboard.stories-Co2xtTa3.js} +3 -3
- package/dist/app/assets/{PzDate-CobC6sjl.js → PzDate-C1hX12A0.js} +1 -1
- package/dist/app/assets/{PzDate.stories-DJxtTIqM.js → PzDate.stories-CRhRBXki.js} +1 -1
- package/dist/app/assets/{PzDateRange.stories-BmAh9FKD.js → PzDateRange.stories-C0JsYde1.js} +1 -1
- package/dist/app/assets/{PzDomHandler.stories-BGQNF3RT.js → PzDomHandler.stories-D2YDz9DL.js} +1 -1
- package/dist/app/assets/{PzDropdown.stories-B5f5--_5.js → PzDropdown.stories-73_UT97U.js} +1 -1
- package/dist/app/assets/{PzFileInput.stories-b0DduB20.js → PzFileInput.stories-WfVEsGkL.js} +1 -1
- package/dist/app/assets/{PzGrid.stories-DRAb-gdp.js → PzGrid.stories-DQyXRmzE.js} +3 -3
- package/dist/app/assets/{PzHint-VbJ8_OEs.js → PzHint-BaZNmSVB.js} +1 -1
- package/dist/app/assets/{PzHint.stories-DIhWcr3O.js → PzHint.stories-CyePgPKY.js} +1 -1
- package/dist/app/assets/{PzIcon-C-3xKskM.js → PzIcon-DXFdpW2n.js} +1 -1
- package/dist/app/assets/{PzIcon.stories-DCEHxy8A.js → PzIcon.stories-CPsWG7Hc.js} +1 -1
- package/dist/app/assets/{PzImage.stories-CWf_nZnD.js → PzImage.stories-BmtpmrWC.js} +1 -1
- package/dist/app/assets/{PzImageInput.stories-DgvF_4Hf.js → PzImageInput.stories-Dc_hEAxk.js} +1 -1
- package/dist/app/assets/{PzInfoBlockLayout.stories-BUdFb8-m.js → PzInfoBlockLayout.stories-QkLgQifL.js} +2 -2
- package/dist/app/assets/{PzInfoHint-DhuMOgQr.js → PzInfoHint-D1LOs8WA.js} +1 -1
- package/dist/app/assets/{PzInfoHint.stories-CXpKqqmS.js → PzInfoHint.stories-B1zKIeLN.js} +1 -1
- package/dist/app/assets/{PzInput.stories-CaSEsE9F.js → PzInput.stories-D78FQMuF.js} +5 -5
- package/dist/app/assets/{PzInputDate.stories-BUZq7VSB.js → PzInputDate.stories-DjBRYU1c.js} +1 -1
- package/dist/app/assets/{PzInputNumber.stories-Dhjg4gA5.js → PzInputNumber.stories-L3BBQsmm.js} +2 -2
- package/dist/app/assets/{PzKeyValue-BOmUJdpo.js → PzKeyValue-CD_si4QT.js} +1 -1
- package/dist/app/assets/{PzKeyValue.stories-C4rWPP8T.js → PzKeyValue.stories-DjLxQvE1.js} +1 -1
- package/dist/app/assets/{PzLabel-CFLEBhzy.js → PzLabel-7yldZ-JH.js} +1 -1
- package/dist/app/assets/{PzLabel.stories-CCf1csl5.js → PzLabel.stories-LMNTXXJV.js} +1 -1
- package/dist/app/assets/{PzLink-XzzpwDDe.js → PzLink-AW4PfUcN.js} +1 -1
- package/dist/app/assets/{PzLink.stories-Bs0oj9Zr.js → PzLink.stories-rbVmErFx.js} +1 -1
- package/dist/app/assets/{PzListNav-Dqq7pboP.js → PzListNav-DQqdOfnh.js} +1 -1
- package/dist/app/assets/{PzListNav.stories-D2aip-cT.js → PzListNav.stories-B4FNbY01.js} +1 -1
- package/dist/app/assets/{PzLoader.stories-DY6PtBpi.js → PzLoader.stories-CaPTvZX3.js} +2 -2
- package/dist/app/assets/{PzModal.stories-DC0LT5Qz.js → PzModal.stories-BMLaFypv.js} +4 -4
- package/dist/app/assets/{PzMultiSelect.stories-enwvShW9.js → PzMultiSelect.stories-BofZoF1u.js} +1 -1
- package/dist/app/assets/{PzNav.stories-_me46xTg.js → PzNav.stories-BeH5RJYS.js} +1 -1
- package/dist/app/assets/{PzNumberFormat.stories-Tgzd7Ttu.js → PzNumberFormat.stories-wQu_Z09x.js} +1 -1
- package/dist/app/assets/{PzPagination-BdZP_alz.js → PzPagination-CMzxclWV.js} +1 -1
- package/dist/app/assets/{PzPagination.stories-COXfJ0CP.js → PzPagination.stories-Dtj0SvBl.js} +1 -1
- package/dist/app/assets/{PzPaginationProvider.stories-BY0X1zt3.js → PzPaginationProvider.stories-wUIxJ1BF.js} +1 -1
- package/dist/app/assets/{PzPriceFormat.stories-Bn7VyLHN.js → PzPriceFormat.stories-zk5JXBOv.js} +1 -1
- package/dist/app/assets/{PzRadioGroup.stories-CZg42y4W.js → PzRadioGroup.stories-DRGcBU0t.js} +2 -2
- package/dist/app/assets/{PzRouterLink.stories-w3FUezJW.js → PzRouterLink.stories-Y8mTuDEw.js} +2 -2
- package/dist/app/assets/{PzScrollTo.stories-BAwTBJOw.js → PzScrollTo.stories-BRsObVs-.js} +1 -1
- package/dist/app/assets/{PzSearchResultItemLayout.stories-C8PMflOD.js → PzSearchResultItemLayout.stories-f7vlTlqs.js} +1 -1
- package/dist/app/assets/PzSelect-Ca-HcznT.js +1 -0
- package/dist/app/assets/{PzSelect.stories-CpbpJZqk.js → PzSelect.stories-a4rVD6jh.js} +1 -1
- package/dist/app/assets/{PzSkeleton-e2shhmz6.js → PzSkeleton-LX0kJrLm.js} +1 -1
- package/dist/app/assets/{PzSkeleton.stories-Cn0fkZf3.js → PzSkeleton.stories-C2M8Q8b8.js} +1 -1
- package/dist/app/assets/{PzStatus-BgkfQHGk.js → PzStatus-DYGlvpqL.js} +1 -1
- package/dist/app/assets/{PzStatus.stories-BKqWeLtT.js → PzStatus.stories-BAFY9nMq.js} +1 -1
- package/dist/app/assets/{PzTable-D2LKFxwd.js → PzTable-DEGAWRou.js} +1 -1
- package/dist/app/assets/{PzTable.stories-D1ygOE5A.js → PzTable.stories-D9bP1zHY.js} +1 -1
- package/dist/app/assets/{PzTablePaginationProvider.stories-BWZ3CeB1.js → PzTablePaginationProvider.stories-D8EMzNeM.js} +1 -1
- package/dist/app/assets/{PzTabs.stories-BgBxGpKa.js → PzTabs.stories-DsN8kDSF.js} +1 -1
- package/dist/app/assets/{PzTag-DAOIn8mO.js → PzTag-BwhxzDXe.js} +1 -1
- package/dist/app/assets/{PzTag.stories-pmikPYMk.js → PzTag.stories-BF3jlKHL.js} +1 -1
- package/dist/app/assets/{PzText-DCaCG1Xi.js → PzText-8KvCoCEc.js} +1 -1
- package/dist/app/assets/{PzText.stories-D4pXngYq.js → PzText.stories-DJ24GCVA.js} +1 -1
- package/dist/app/assets/{PzTextClamp.stories-vFF78pFR.js → PzTextClamp.stories-DNSoARv9.js} +1 -1
- package/dist/app/assets/{PzTextarea.stories-Co3I3JKV.js → PzTextarea.stories-sIin_3f1.js} +3 -3
- package/dist/app/assets/{PzValidatorXSS.stories-C9NSjKBE.js → PzValidatorXSS.stories-Dg-CpV7R.js} +1 -1
- package/dist/app/assets/{Spacing.stories-BSGAAXnF.js → Spacing.stories-CFAVx5n2.js} +1 -1
- package/dist/app/assets/{StaticPagination.composable-DtYpvhgQ.js → StaticPagination.composable-CwElAiHW.js} +1 -1
- package/dist/app/assets/{Typography.stories-DeOre0Rr.js → Typography.stories-DHhdi7UW.js} +1 -1
- package/dist/app/assets/{WithTooltip-65CFNBJE-Hgwe5NHB.js → WithTooltip-65CFNBJE-hJfVU2ZG.js} +1 -1
- package/dist/app/assets/{floating-vue-C03hZ3mq.js → floating-vue-DG78MVHr.js} +1 -1
- package/dist/app/assets/{floating-vue-CspvJYvV.js → floating-vue-xuj-SMFP.js} +1 -1
- package/dist/app/assets/{formatter-EIJCOSYU-DsBeP-5V.js → formatter-EIJCOSYU-BYOnUjf2.js} +1 -1
- package/dist/app/assets/{iframe-ZPsq2dEK.css → iframe-BvXLovcC.css} +1 -1
- package/dist/app/assets/{iframe-CK_-siX_.js → iframe-iNMR-yGE.js} +4 -4
- package/dist/app/assets/{index-BW21p6n4.js → index-De1Uh725.js} +1 -1
- package/dist/app/assets/{syntaxhighlighter-OH4MV7E3-B_EgZCJm.js → syntaxhighlighter-OH4MV7E3-BqWsvx_m.js} +1 -1
- package/dist/app/iframe.html +2 -2
- package/dist/app/index.json +1 -1
- package/dist/app/project.json +1 -1
- package/dist/components/Layouts/PzAccordion/PzAccordion.vue.d.ts +1 -0
- package/dist/components/Layouts/PzAccordion/configs.d.ts +1 -0
- package/dist/components/Layouts/PzAccordion/index.d.ts +1 -1
- package/dist/components/Layouts/PzAccordion/types.d.ts +2 -0
- package/dist/package.json +1 -1
- package/dist/prozorro-ui.cjs +6 -6
- package/dist/prozorro-ui.js +1167 -1164
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/styles/base/_gap.scss +51 -0
- package/src/styles/main.scss +1 -0
- package/dist/app/assets/PzAccordion-BSQYPNjM.js +0 -1
- package/dist/app/assets/PzAccordion-CXBhi_gL.css +0 -1
- package/dist/app/assets/PzAccordion-c_zcspyL.css +0 -1
- package/dist/app/assets/PzSelect-DQhnNexa.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{e as P,V as I,f as u,
|
|
1
|
+
import{e as P,V as I,f as u,z as M,x as $,C as y,g as z,W as h,o as r,q as B,X as L,Y as E,t as c,u as N,p as b,r as l,w as T}from"./iframe-iNMR-yGE.js";import{P as w}from"./PzText-8KvCoCEc.js";import{_ as D}from"./PzIcon-DXFdpW2n.js";import{P as F}from"./PzLabel-7yldZ-JH.js";import{_ as O}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./preload-helper-C1FmrZbK.js";const U={class:"pz-input-wrap"},j=["id","placeholder","disabled","maxlength","type","required"],W=["id"],X={key:3,class:"pz-input-counter"},Y={key:0,class:"pz-input-error"},f=P({name:"PzInput",__name:"PzInput",props:h({name:{},modelValue:{},label:{default:""},icon:{default:""},inputClass:{default:""},errorMessage:{default:""},placeholder:{default:""},type:{default:"text"},counted:{type:Boolean,default:!1},maxSize:{default:255},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},isLightSkin:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:h(["focus","blur","icon-click","update:modelValue"],["update:modelValue"]),setup(e,{emit:t}){const n=t,o=I(e,"modelValue");return(s,a)=>(r(),u("div",{class:z(["pz-input",{light:e.isLightSkin,error:e.errorMessage,disabled:e.disabled}])},[M(y(F),{label:e.label,for:e.name,required:e.required,disabled:e.disabled},{default:$(()=>{var d;return[B("span",U,[e.editable?L((r(),u("input",{key:0,id:e.name,"onUpdate:modelValue":a[0]||(a[0]=i=>o.value=i),placeholder:e.placeholder,disabled:e.disabled,maxlength:e.counted?e.maxSize:void 0,type:e.type,required:e.required,class:z(["pz-input-control",[{"pz-input-control--with-icon":e.icon,"pz-input-control--counted":e.counted},e.inputClass]]),onBlur:a[1]||(a[1]=i=>n("blur")),onFocus:a[2]||(a[2]=i=>n("focus"))},null,42,j)),[[E,o.value]]):(r(),u("span",{key:1,id:e.name,class:"pz-input-readonly"},c(o.value),9,W)),e.icon?(r(),N(y(D),{key:2,name:e.icon,class:"pz-input-icon",onClick:a[3]||(a[3]=i=>n("icon-click",i))},null,8,["name"])):b("",!0),e.counted?(r(),u("span",X,c(((d=o.value)==null?void 0:d.length)||0)+"/"+c(e.maxSize),1)):b("",!0)]),e.errorMessage?(r(),u("span",Y,c(e.errorMessage),1)):b("",!0)]}),_:1},8,["label","for","required","disabled"])],2))}}),v=O(f,[["__scopeId","data-v-d1a46012"]]);f.__docgenInfo=Object.assign({displayName:f.name??f.__name},{name:"PzInput",exportName:"default",displayName:"PzInput",description:"",tags:{},props:[{name:"name",required:!0,type:{name:"string"}},{name:"modelValue",required:!0,type:{name:"string"}},{name:"label",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}},{name:"icon",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}},{name:"inputClass",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}},{name:"errorMessage",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}},{name:"placeholder",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}},{name:"type",required:!1,type:{name:"PzInputType"},defaultValue:{func:!1,value:'"text"'}},{name:"counted",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"maxSize",required:!1,type:{name:"number"},defaultValue:{func:!1,value:"255"}},{name:"required",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"disabled",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"editable",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"isLightSkin",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"focus"},{name:"blur"},{name:"icon-click",type:{names:["MouseEvent"]}},{name:"update:modelValue",type:{names:["string"]}}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Form/PzInput/PzInput.vue"]});const A=e=>`<template>
|
|
2
2
|
<PzInput
|
|
3
3
|
v-model="value"
|
|
4
4
|
${[`name="${e.name}"`,e.label?`label="${e.label}"`:null,e.placeholder?`placeholder="${e.placeholder}"`:null,e.type&&e.type!=="text"?`type="${e.type}"`:null,e.icon?`icon="${e.icon}"`:null,e.required?':required="true"':null,e.disabled?':disabled="true"':null,e.counted?':counted="true"':null,e.maxSize?`:max-size="${e.maxSize}"`:null,e.errorMessage?`error-message="${e.errorMessage}"`:null,e.isLightSkin?':is-light-skin="true"':null].filter(n=>!!n).join(" ")}
|
|
5
5
|
/>
|
|
6
|
-
</template>`,R={title:"Components/Form/PzInput",component:
|
|
6
|
+
</template>`,R={title:"Components/Form/PzInput",component:v,parameters:{docs:{description:{component:"Use `PzInput` for text-based form controls. It wraps a native `<input>` with `PzLabel`, supports icons, character counting, a readonly preview mode, and the standard disabled/error states."},source:{transform:(e,t)=>A(t.args??R.args)}}},args:{name:"pz-input-story",label:"Назва поля",modelValue:"",placeholder:"Введіть значення...",type:"text",errorMessage:"",icon:"",required:!1,disabled:!1,editable:!0,counted:!1,maxSize:255,isLightSkin:!1},argTypes:{name:{control:"text",description:"Native input `id`/`name`."},label:{control:"text",description:"Label text shown above the input."},modelValue:{control:"text",description:"Current value bound via `v-model` (required)."},placeholder:{control:"text",description:"Placeholder shown when the input is empty."},type:{control:"inline-radio",options:["text","email","password"],description:"Native input type."},icon:{control:"text",description:"Optional `PzIcon` name rendered inside the input."},errorMessage:{control:"text",description:"Validation message shown below the input; enables error styling."},required:{control:"boolean",description:"Marks the field as required in the label."},disabled:{control:"boolean",description:"Disables the input and applies muted styling."},editable:{control:"boolean",description:"When false, renders the value as readonly text instead of an input."},counted:{control:"boolean",description:"Shows a `length/maxSize` counter next to the input."},maxSize:{control:"number",description:"Maximum character length used by the counter and `maxlength`. Only enforced when `counted` is true."},isLightSkin:{control:"boolean",description:"Enables the light alternate layout."}},render:e=>({components:{pzInput:v,pzText:w},setup(){const t=l(e.modelValue??""),n=l(""),o=l(""),s=l(""),a=l(""),d=l(""),i=l("");return T(()=>e.modelValue,S=>{t.value=S??""}),{args:e,value:t,sharedValue:n,defaultValue:o,requiredValue:s,countedValue:a,iconValue:d,errorValue:i}},template:`
|
|
7
7
|
<div style="display: flex; flex-direction: column; gap: var(--pz-space-24); max-width: 480px;">
|
|
8
8
|
<section>
|
|
9
9
|
<pz-text variant="h4-bold">Component API</pz-text>
|
|
@@ -46,7 +46,7 @@ import{e as P,V as I,f as u,B as M,A as $,v as y,g as h,W as z,o as r,q as B,X a
|
|
|
46
46
|
<pz-input model-value="Текст, який не можна редагувати" name="input-readonly" label="Readonly" :editable="false" />
|
|
47
47
|
</section>
|
|
48
48
|
</div>
|
|
49
|
-
`})},p={parameters:{docs:{description:{story:"Інтерактивний приклад текстового інпуту. Нижче показано two-way binding та базові стани: required, counted, з іконкою, помилка, disabled і readonly."}}}},m={name:"Click event",parameters:{docs:{description:{story:"PzInput emits a `click` event with the native `MouseEvent`. Useful for triggering popovers, pickers, or read-only flows on input click."}}},render:()=>({components:{pzInput:
|
|
49
|
+
`})},p={parameters:{docs:{description:{story:"Інтерактивний приклад текстового інпуту. Нижче показано two-way binding та базові стани: required, counted, з іконкою, помилка, disabled і readonly."}}}},m={name:"Click event",parameters:{docs:{description:{story:"PzInput emits a `click` event with the native `MouseEvent`. Useful for triggering popovers, pickers, or read-only flows on input click."}}},render:()=>({components:{pzInput:v,pzText:w},setup(){const e=l(""),t=l(0),n=l("—");return{clickValue:e,clickCount:t,lastCoords:n,onClick:s=>{t.value+=1,n.value=`x: ${String(s.clientX)}, y: ${String(s.clientY)}`}}},template:`
|
|
50
50
|
<div style="display: flex; flex-direction: column; gap: var(--pz-space-16); max-width: 480px;">
|
|
51
51
|
<pz-text variant="h4-bold">@click</pz-text>
|
|
52
52
|
<pz-input
|
|
@@ -69,7 +69,7 @@ import{e as P,V as I,f as u,B as M,A as $,v as y,g as h,W as z,o as r,q as B,X a
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
}`,...(k=(x=p.parameters)==null?void 0:x.docs)==null?void 0:k.source}}};var V,q
|
|
72
|
+
}`,...(k=(x=p.parameters)==null?void 0:x.docs)==null?void 0:k.source}}};var V,C,q;m.parameters={...m.parameters,docs:{...(V=m.parameters)==null?void 0:V.docs,source:{originalSource:`{
|
|
73
73
|
name: "Click event",
|
|
74
74
|
parameters: {
|
|
75
75
|
docs: {
|
|
@@ -115,4 +115,4 @@ import{e as P,V as I,f as u,B as M,A as $,v as y,g as h,W as z,o as r,q as B,X a
|
|
|
115
115
|
</div>
|
|
116
116
|
\`
|
|
117
117
|
})
|
|
118
|
-
}`,...(
|
|
118
|
+
}`,...(q=(C=m.parameters)==null?void 0:C.docs)==null?void 0:q.source}}};const _=["Playground","ClickEvent"];export{m as ClickEvent,p as Playground,_ as __namedExportsOrder,R as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as
|
|
1
|
+
import{e as C,V as Y,f as i,z as h,x as $,C as y,g,W as x,o as s,Z as B,t as z,p as L,r as t,i as T,w as N}from"./iframe-iNMR-yGE.js";import{P as O}from"./PzText-8KvCoCEc.js";import{_ as R}from"./PzIcon-DXFdpW2n.js";import{P as E}from"./PzLabel-7yldZ-JH.js";import{_ as F}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./preload-helper-C1FmrZbK.js";const j={key:0,class:"pz-input-date-wrap"},A=["id","value","placeholder","disabled","required","min","max"],W=["id","value","placeholder","disabled","required"],U=["id"],Z={key:2,class:"pz-input-date-error"},p=C({name:"PzInputDate",__name:"PzInputDate",props:x({name:{},modelValue:{},label:{default:""},errorMessage:{default:""},placeholder:{default:""},min:{default:void 0},max:{default:void 0},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},isLightSkin:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:x(["focus","blur","update:modelValue"],["update:modelValue"]),setup(e,{emit:r}){const d=r,a=Y(e,"modelValue"),o=t(!1),f=t(null),u=t(null),b=/^(\d{4})-(\d{2})-(\d{2})$/,c=n=>{if(!n)return"";const l=b.exec(n);return l?`${l[3]}.${l[2]}.${l[1]}`:n},v=async()=>{var n,l;o.value||(o.value=!0,await T(),(n=u.value)==null||n.focus(),(l=u.value)==null||l.showPicker())},I=()=>{d("focus"),v()},D=()=>{v()},M=()=>{o.value=!1,d("blur")},P=n=>{const l=n.target;a.value=l.value||null},S=()=>{if(a.value){a.value=null;return}v()};return(n,l)=>(s(),i("div",{class:g(["pz-input-date",{light:e.isLightSkin,error:e.errorMessage,disabled:e.disabled}])},[h(y(E),{label:e.label,for:e.name,required:e.required,disabled:e.disabled},{default:$(()=>[e.editable?(s(),i("span",j,[o.value?(s(),i("input",{key:0,id:e.name,ref_key:"dateInputRef",ref:u,type:"date",value:a.value??"",placeholder:e.placeholder,disabled:e.disabled,required:e.required,min:e.min,max:e.max,class:"pz-input-date-control",onInput:P,onBlur:M},null,40,A)):(s(),i("input",{key:1,id:e.name,ref_key:"textInputRef",ref:f,type:"text",readonly:"",value:c(a.value),placeholder:e.placeholder,disabled:e.disabled,required:e.required,class:"pz-input-date-control",onFocus:I,onClick:D},null,40,W)),h(y(R),{name:a.value?"close":"event",class:g(["pz-input-date-icon",{"pz-input-date-icon--clear":a.value}]),onClick:B(S,["prevent"])},null,8,["name","class"])])):(s(),i("span",{key:1,id:e.name,class:"pz-input-date-readonly"},z(c(a.value)),9,U)),e.errorMessage?(s(),i("span",Z,z(e.errorMessage),1)):L("",!0)]),_:1},8,["label","for","required","disabled"])],2))}}),V=F(p,[["__scopeId","data-v-13e3fa69"]]);p.__docgenInfo=Object.assign({displayName:p.name??p.__name},{name:"PzInputDate",exportName:"default",displayName:"PzInputDate",description:"",tags:{},props:[{name:"name",required:!0,type:{name:"string"}},{name:"modelValue",required:!0,type:{name:"union",elements:[{name:"string"},{name:"null"}]}},{name:"label",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}},{name:"errorMessage",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}},{name:"placeholder",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}},{name:"min",required:!1,type:{name:"string"},defaultValue:{func:!1,value:"undefined"}},{name:"max",required:!1,type:{name:"string"},defaultValue:{func:!1,value:"undefined"}},{name:"required",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"disabled",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"editable",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"isLightSkin",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"focus"},{name:"blur"},{name:"update:modelValue",type:{names:["union"],elements:[{name:"string"},{name:"null"}]}}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Form/PzInputDate/PzInputDate.vue"]});const G=e=>`<template>
|
|
2
2
|
<PzInputDate
|
|
3
3
|
v-model="value"
|
|
4
4
|
${[`name="${e.name}"`,e.label?`label="${e.label}"`:null,e.placeholder?`placeholder="${e.placeholder}"`:null,e.min?`min="${e.min}"`:null,e.max?`max="${e.max}"`:null,e.required?':required="true"':null,e.disabled?':disabled="true"':null,e.editable===!1?':editable="false"':null,e.errorMessage?`error-message="${e.errorMessage}"`:null,e.isLightSkin?':is-light-skin="true"':null].filter(d=>!!d).join(" ")}
|
package/dist/app/assets/{PzInputNumber.stories-Dhjg4gA5.js → PzInputNumber.stories-L3BBQsmm.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{e as S,V as
|
|
1
|
+
import{e as S,V as L,f as i,z as B,x as C,C as F,g as $,W as z,o as d,t as V,p as O,c as x,r,w as T}from"./iframe-iNMR-yGE.js";import{P as D}from"./PzText-8KvCoCEc.js";import{P as A}from"./PzLabel-7yldZ-JH.js";import{P as E}from"./PzNumberFormat-D5xYsZ3A.js";import{_ as j}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./preload-helper-C1FmrZbK.js";import"./lodash-CdDiHlzQ.js";import"./_commonjsHelpers-Cpj98o6Y.js";const W=["id","value","placeholder","disabled","required"],U=["id"],K={key:2,class:"pz-input-number-error"},p=S({name:"PzInputNumber",__name:"PzInputNumber",props:z({name:{},modelValue:{},label:{default:""},placeholder:{default:""},errorMessage:{default:""},type:{default:"integer"},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},isLightSkin:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:z(["focus","blur","update:modelValue"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,u=L(e,"modelValue"),c=x(()=>n.type==="integer"?0:void 0),s=x(()=>new E(u.value??null,c.value).number),b=l=>{const a=l.match(/^-?\d+(\.\d+)?/);return a?a[0]:l},f=l=>{const a=b(l.replace(/\s+/g,""));return a==="-"?a:a!==""?Number(a):null},y=l=>{var h;const a=l.target,g=isFinite(Number(l.key)),k=n.type==="decimal"&&/\./g.test(l.key)&&!/\./g.test(a.value),M=/-/g.test(l.key)&&!/-/g.test(a.value)&&!((h=a.value)!=null&&h.length);g||k||M||l.preventDefault()},I=l=>{const a=l.target;u.value=f(a.value)};return(l,a)=>(d(),i("div",{class:$(["pz-input-number",{light:e.isLightSkin,error:e.errorMessage,disabled:e.disabled}])},[B(F(A),{label:e.label,for:e.name,required:e.required,disabled:e.disabled},{default:C(()=>[e.editable?(d(),i("input",{key:0,id:e.name,value:s.value,placeholder:e.placeholder,disabled:e.disabled,required:e.required,type:"text",class:"pz-input-number-control",onInput:I,onBlur:a[0]||(a[0]=g=>o("blur")),onFocus:a[1]||(a[1]=g=>o("focus")),onKeypress:y},null,40,W)):(d(),i("span",{key:1,id:e.name,class:"pz-input-number-readonly"},V(s.value),9,U)),e.errorMessage?(d(),i("span",K,V(e.errorMessage),1)):O("",!0)]),_:1},8,["label","for","required","disabled"])],2))}}),q=j(p,[["__scopeId","data-v-0104f54f"]]);p.__docgenInfo=Object.assign({displayName:p.name??p.__name},{name:"PzInputNumber",exportName:"default",displayName:"PzInputNumber",description:"",tags:{},props:[{name:"name",required:!0,type:{name:"string"}},{name:"modelValue",required:!0,type:{name:"PzInputNumberValue"}},{name:"label",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}},{name:"placeholder",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}},{name:"errorMessage",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}},{name:"type",required:!1,type:{name:"PzInputNumberType"},defaultValue:{func:!1,value:'"integer"'}},{name:"required",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"disabled",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"editable",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"isLightSkin",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"focus"},{name:"blur"},{name:"update:modelValue",type:{names:["PzInputNumberValue"]}}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Form/PzInputNumber/PzInputNumber.vue"]});const v=15e5,R=e=>`<template>
|
|
2
2
|
<PzInputNumber
|
|
3
3
|
v-model="value"
|
|
4
4
|
${[`name="${e.name}"`,e.label?`label="${e.label}"`:null,e.placeholder?`placeholder="${e.placeholder}"`:null,e.type&&e.type!=="integer"?`type="${e.type}"`:null,e.required?':required="true"':null,e.disabled?':disabled="true"':null,e.editable===!1?':editable="false"':null,e.errorMessage?`error-message="${e.errorMessage}"`:null,e.isLightSkin?':is-light-skin="true"':null].filter(n=>!!n).join(" ")}
|
|
5
5
|
/>
|
|
6
|
-
</template>`,G={title:"Components/Form/PzInputNumber",component:q,parameters:{docs:{description:{component:"Use `PzInputNumber` for numeric entry. It formats the displayed value via `PzNumberFormat`, accepts only digits (plus optional decimal separator and minus), and emits a `number | null` via `v-model`."},source:{transform:(e,t)=>R(t.args??G.args)}}},args:{name:"pz-input-number-story",label:"Сума",modelValue:"",placeholder:"Введіть число...",type:"integer",errorMessage:"",required:!1,disabled:!1,editable:!0,isLightSkin:!1},argTypes:{name:{control:"text",description:"Native input `id`/`name`."},label:{control:"text",description:"Label text shown above the input."},modelValue:{control:"text",description:"Current numeric value bound via `v-model` (required)."},placeholder:{control:"text",description:"Placeholder shown when the input is empty."},type:{control:"inline-radio",options:["integer","decimal"],description:"`integer` rounds to whole numbers; `decimal` allows one dot separator."},errorMessage:{control:"text",description:"Validation message shown below the input; enables error styling."},required:{control:"boolean",description:"Marks the field as required in the label."},disabled:{control:"boolean",description:"Disables the input and applies muted styling."},editable:{control:"boolean",description:"When false, renders the formatted value as readonly text instead of an input."},isLightSkin:{control:"boolean",description:"Enables the light alternate layout."}},render:e=>({components:{pzInputNumber:q,pzText:
|
|
6
|
+
</template>`,G={title:"Components/Form/PzInputNumber",component:q,parameters:{docs:{description:{component:"Use `PzInputNumber` for numeric entry. It formats the displayed value via `PzNumberFormat`, accepts only digits (plus optional decimal separator and minus), and emits a `number | null` via `v-model`."},source:{transform:(e,t)=>R(t.args??G.args)}}},args:{name:"pz-input-number-story",label:"Сума",modelValue:"",placeholder:"Введіть число...",type:"integer",errorMessage:"",required:!1,disabled:!1,editable:!0,isLightSkin:!1},argTypes:{name:{control:"text",description:"Native input `id`/`name`."},label:{control:"text",description:"Label text shown above the input."},modelValue:{control:"text",description:"Current numeric value bound via `v-model` (required)."},placeholder:{control:"text",description:"Placeholder shown when the input is empty."},type:{control:"inline-radio",options:["integer","decimal"],description:"`integer` rounds to whole numbers; `decimal` allows one dot separator."},errorMessage:{control:"text",description:"Validation message shown below the input; enables error styling."},required:{control:"boolean",description:"Marks the field as required in the label."},disabled:{control:"boolean",description:"Disables the input and applies muted styling."},editable:{control:"boolean",description:"When false, renders the formatted value as readonly text instead of an input."},isLightSkin:{control:"boolean",description:"Enables the light alternate layout."}},render:e=>({components:{pzInputNumber:q,pzText:D},setup(){const t=r(e.modelValue??""),n=r(v),o=r(""),u=r(""),c=r(v),s=r(""),b=r(""),f=v;return T(()=>e.modelValue,y=>{t.value=y??""}),{args:e,value:t,sharedValue:n,defaultValue:o,decimalValue:u,formattedValue:c,requiredValue:s,errorValue:b,readonlyValue:f}},template:`
|
|
7
7
|
<div style="display: flex; flex-direction: column; gap: var(--pz-space-24); max-width: 480px;">
|
|
8
8
|
<section>
|
|
9
9
|
<pz-text variant="h4-bold">Component API</pz-text>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as x,h as E,f as c,F as _,
|
|
1
|
+
import{e as x,h as E,f as c,F as _,A as D,r as v,a9 as R,o as m,q as d,n as z,y as P,B as S,t as $,g as A,p as N}from"./iframe-iNMR-yGE.js";import{g as q}from"./_commonjsHelpers-Cpj98o6Y.js";import{i as B,_ as I,a as p,b as M,c as w}from"./isArray-DPUC7i9_.js";import{l}from"./lodash-CdDiHlzQ.js";import{P as F}from"./PzDomHandler-BU7iMNnt.js";import{_ as O}from"./_plugin-vue_export-helper-DlAUqK2U.js";var G=I,L=B,X="[object Symbol]";function Z(e){return typeof e=="symbol"||L(e)&&G(e)==X}var g=Z,j=p,H=g,U=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,W=/^\w*$/;function J(e,t){if(j(e))return!1;var a=typeof e;return a=="number"||a=="symbol"||a=="boolean"||e==null||H(e)?!0:W.test(e)||!U.test(e)||t!=null&&e in Object(t)}var Q=J,T=M,Y="Expected a function";function b(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Y);var a=function(){var n=arguments,s=t?t.apply(this,n):n[0],o=a.cache;if(o.has(s))return o.get(s);var u=e.apply(this,n);return a.cache=o.set(s,u)||o,u};return a.cache=new(b.Cache||T),a}b.Cache=T;var ee=b,te=ee,ae=500;function ne(e){var t=te(e,function(n){return a.size===ae&&a.clear(),n}),a=t.cache;return t}var re=ne,ie=re,se=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/\\(\\)?/g,le=ie(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(se,function(a,n,s,o){t.push(s?o.replace(oe,"$1"):n||a)}),t}),ue=le;function ce(e,t){for(var a=-1,n=e==null?0:e.length,s=Array(n);++a<n;)s[a]=t(e[a],a,e);return s}var me=ce,k=w,ye=me,fe=p,de=g,C=k?k.prototype:void 0,K=C?C.toString:void 0;function V(e){if(typeof e=="string")return e;if(fe(e))return ye(e,V)+"";if(de(e))return K?K.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var pe=V,ge=pe;function be(e){return e==null?"":ge(e)}var he=be,_e=p,ve=Q,ze=ue,Pe=he;function Se(e,t){return _e(e)?e:ve(e,t)?[e]:ze(Pe(e))}var $e=Se,ke=g;function Ce(e){if(typeof e=="string"||ke(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Ke=Ce,Te=$e,Ve=Ke;function xe(e,t){t=Te(t,e);for(var a=0,n=t.length;e!=null&&a<n;)e=e[Ve(t[a++])];return a&&a==n?e:void 0}var Ee=xe,De=Ee;function Re(e,t,a){var n=e==null?void 0:De(e,t);return n===void 0?a:n}var Ae=Re;const Ne=q(Ae),qe={ref:"componentRef",class:"pz-key-value"},y=x({name:"PzKeyValue",__name:"PzKeyValue",props:{config:{},data:{},checkRequired:{type:Boolean,default:!0},flexDirection:{default:"column"},titleStyleClass:{default:""}},setup(e){const t=e,a=v([]),n=v("transparent"),s=R("componentRef");E(()=>{t.config.forEach(({key:r})=>{(!h(o(r))||!t.checkRequired)&&a.value.push(r)}),n.value=F.getParentNearestBackground(s.value)});const o=r=>{const f=Ne(l.pickBy(t.data,l.identity),r.split("-"),"");return h(f)?"":f},u=r=>o(r),h=r=>l.isNumber(r)||l.isBoolean(r)?!1:l.isEmpty(r);return(r,f)=>(m(),c("div",qe,[(m(!0),c(_,null,D(e.config,i=>(m(),c(_,null,[a.value.includes(i.key)?(m(),c("div",{key:i.id,class:"pz-key-value__item"},[d("h6",{class:A(["pz-key-value__title",[e.titleStyleClass,i.labelStyleClass]])},[d("span",{class:"pz-key-value__title-box",style:z({backgroundColor:n.value})},[P(r.$slots,`${i.key}_label`,{data:i.labelKey,source:e.data,item:i},()=>[S($(i.labelKey),1)],!0)],4)],2),d("div",{class:"pz-key-value__content",style:z({flexDirection:e.flexDirection})},[P(r.$slots,i.key,{data:u(i.key),source:e.data,item:i},()=>[S($(o(i.key)),1)],!0)],4)])):N("",!0)],64))),256))],512))}}),Ge=O(y,[["__scopeId","data-v-9ba625f4"]]);y.__docgenInfo=Object.assign({displayName:y.name??y.__name},{name:"PzKeyValue",exportName:"default",displayName:"PzKeyValue",description:"",tags:{},props:[{name:"config",required:!0,type:{name:"ReadonlyArray",elements:[{name:"PzKeyValueViewListItem",elements:[{name:"TKey"}]}]}},{name:"data",required:!0,type:{name:"TData"}},{name:"checkRequired",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"flexDirection",required:!1,type:{name:"PzKeyValueFlexDirection"},defaultValue:{func:!1,value:'"column"'}},{name:"titleStyleClass",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}}],slots:[{name:"`${item.key}_label`",scoped:!0,bindings:[{name:"name",title:"binding"},{name:"data",title:"binding"},{name:"source",title:"binding"},{name:"item",title:"binding"}]},{name:"item.key",scoped:!0,bindings:[{name:"name",title:"binding"},{name:"data",title:"binding"},{name:"source",title:"binding"},{name:"item",title:"binding"}]}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Display/PzKeyValue/PzKeyValue.vue"]});export{Ge as P};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{P as c}from"./PzText-
|
|
1
|
+
import{P as c}from"./PzText-8KvCoCEc.js";import{P as A}from"./PzKeyValue-CD_si4QT.js";import"./iframe-iNMR-yGE.js";import"./preload-helper-C1FmrZbK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./isArray-DPUC7i9_.js";import"./lodash-CdDiHlzQ.js";import"./PzDomHandler-BU7iMNnt.js";const d=A,O=A,T=["column","column-reverse","row","row-reverse"],i=[{id:"tender-id",key:"id",labelKey:"Tender ID"},{id:"tender-title",key:"title",labelKey:"Title"},{id:"tender-customer",key:"customer-name",labelKey:"Customer"},{id:"tender-amount",key:"amount",labelKey:"Expected value"},{id:"tender-status",key:"status",labelKey:"Status"},{id:"tender-note",key:"note",labelKey:"Note"}],l={id:"UA-2026-04-17-000123-a",title:"Закупівля медичного обладнання для лікарні №3",customer:{name:'ТОВ "АДМІНІСТРАЦІЯ ЗАКУПІВЕЛЬ"'},amount:"1 250 000,00 UAH",status:"Awaiting offers",note:""},p=[{id:"bid-supplier",key:"supplier",labelKey:"Bidder"},{id:"bid-amount",key:"amount",labelKey:"Amount"},{id:"bid-discount",key:"discount",labelKey:"Discount"},{id:"bid-submitted",key:"submittedAt",labelKey:"Submitted"},{id:"bid-winner",key:"isWinner",labelKey:"Winner"}],y={supplier:'ТОВ "ЕКО ЦЕНТР ПРОЕКТ"',amount:"98 000,00 UAH",discount:0,submittedAt:"17.04.2026 12:39",isWinner:!0},W=e=>`<template>
|
|
2
2
|
<PzKeyValue
|
|
3
3
|
${[':config="config"',':data="data"',e.flexDirection&&e.flexDirection!=="column"?`flex-direction="${e.flexDirection}"`:null,e.checkRequired===!1?':check-required="false"':null,e.titleStyleClass?`title-style-class="${e.titleStyleClass}"`:null].filter(E=>!!E).join(`
|
|
4
4
|
`)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as i,E as f,f as l,g as c,y as t,p as n,q as p,c as m,o as s,
|
|
1
|
+
import{e as i,E as f,f as l,g as c,y as t,p as n,q as p,c as m,o as s,B as b,t as _}from"./iframe-iNMR-yGE.js";import{_ as z}from"./_plugin-vue_export-helper-DlAUqK2U.js";const v=["for"],y={key:0,class:"pz-label-required","aria-hidden":"true"},q={class:"pz-label-control"},a=i({name:"PzLabel",__name:"PzLabel",props:{label:{default:""},for:{default:void 0},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(r){const e=r,d=f(),u=m(()=>!!(e.label||d.label));return(o,P)=>(s(),l("div",{class:c(["pz-label",{"is-disabled":e.disabled}])},[u.value?(s(),l("label",{key:0,class:"pz-label-caption",for:e.for},[t(o.$slots,"label",{},()=>[b(_(e.label),1)],!0),e.required?(s(),l("span",y," * ")):n("",!0)],8,v)):n("",!0),p("div",q,[t(o.$slots,"default",{},void 0,!0)])],2))}}),B=z(a,[["__scopeId","data-v-33a0a067"]]);a.__docgenInfo=Object.assign({displayName:a.name??a.__name},{name:"PzLabel",exportName:"default",displayName:"PzLabel",description:"",tags:{},props:[{name:"label",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}},{name:"for",required:!1,type:{name:"string"},defaultValue:{func:!1,value:"undefined"}},{name:"required",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"disabled",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],slots:[{name:"label"},{name:"default"}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Form/PzLabel/PzLabel.vue"]});export{B as P};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{P as d}from"./PzText-
|
|
1
|
+
import{P as d}from"./PzText-8KvCoCEc.js";import{P as r}from"./PzLabel-7yldZ-JH.js";import"./iframe-iNMR-yGE.js";import"./preload-helper-C1FmrZbK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const n=e=>{const a=[e.label?`label="${e.label}"`:null,e.for?`for="${e.for}"`:null,e.required?':required="true"':null,e.disabled?':disabled="true"':null].filter(t=>!!t).join(" "),p=[e.for?`id="${e.for}"`:null,e.placeholder?`placeholder="${e.placeholder}"`:null,e.disabled?"disabled":null].filter(t=>!!t).join(" ");return`<template>
|
|
2
2
|
<PzLabel ${a}>
|
|
3
3
|
<input ${p} />
|
|
4
4
|
</PzLabel>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as m,E as y,f as l,y as s,p as i,g as k,c as o,o as n}from"./iframe-
|
|
1
|
+
import{e as m,E as y,f as l,y as s,p as i,g as k,c as o,o as n}from"./iframe-iNMR-yGE.js";import{_ as b}from"./_plugin-vue_export-helper-DlAUqK2U.js";const v="noopener noreferrer",z=["href","target","rel","aria-disabled","tabindex"],h={key:0,class:"pz-link-prefix"},g={key:1,class:"pz-link-content"},_={key:2,class:"pz-link-suffix"},t=m({name:"PzLink",__name:"PzLink",props:{href:{},variant:{default:"primary"},target:{default:"_self"},rel:{default:void 0},disabled:{type:Boolean,default:!1},inline:{type:Boolean,default:!0},bold:{type:Boolean,default:!1},italic:{type:Boolean,default:!1},lineThrough:{type:Boolean,default:!1},typography:{}},setup(r){const u=y(),e=r,f=o(()=>!!u.default),d=o(()=>e.rel?e.rel:e.target==="_blank"?v:void 0),p=o(()=>[`pz-link--${e.variant}`,e.typography?`pz-typography--${e.typography}`:null,{"pz-link--inline":e.inline,"pz-link--block":!e.inline,"pz-link--disabled":e.disabled,"pz-link--bold":e.bold,"pz-link--italic":e.italic,"pz-link--line-through":e.lineThrough,"pz-link--icon-only":e.variant==="icon"&&!f.value}]),c=a=>{e.disabled&&(a.preventDefault(),a.stopPropagation())};return(a,P)=>(n(),l("a",{href:e.href,target:e.target,rel:d.value,"aria-disabled":e.disabled||void 0,tabindex:e.disabled?-1:void 0,class:k(["pz-link",p.value]),onClick:c},[a.$slots.prefix?(n(),l("span",h,[s(a.$slots,"prefix",{},void 0,!0)])):i("",!0),a.$slots.default?(n(),l("span",g,[s(a.$slots,"default",{},void 0,!0)])):i("",!0),a.$slots.suffix?(n(),l("span",_,[s(a.$slots,"suffix",{},void 0,!0)])):i("",!0)],10,z))}}),q=b(t,[["__scopeId","data-v-abddfea7"]]);t.__docgenInfo=Object.assign({displayName:t.name??t.__name},{name:"PzLink",exportName:"default",displayName:"PzLink",description:"",tags:{},props:[{name:"href",required:!0,type:{name:"string"}},{name:"variant",required:!1,type:{name:"PzLinkVariant"},defaultValue:{func:!1,value:'"primary"'}},{name:"target",required:!1,type:{name:"PzLinkTarget"},defaultValue:{func:!1,value:'"_self"'}},{name:"rel",required:!1,type:{name:"string"},defaultValue:{func:!1,value:"undefined"}},{name:"disabled",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"inline",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"bold",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"italic",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"lineThrough",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"typography",required:!1,type:{name:"PzTextVariant"}}],slots:[{name:"prefix"},{name:"default"},{name:"suffix"}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Actions/PzLink/PzLink.vue"]});export{q as P};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as p}from"./PzIcon-
|
|
1
|
+
import{_ as p}from"./PzIcon-DXFdpW2n.js";import{P as c}from"./PzText-8KvCoCEc.js";import{p as d}from"./configs-B15JgQZ-.js";import{p as f,a as m}from"./configs-DshpCAYO.js";import{P as o}from"./PzLink-AW4PfUcN.js";import"./iframe-iNMR-yGE.js";import"./preload-helper-C1FmrZbK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const u=[{variant:"primary",label:"Primary text link",suffix:"open_in_new"},{variant:"neutral",label:"Neutral navigation link"},{variant:"gray",label:"Gray meta link"},{variant:"button",label:"Button-like action",prefix:"description"},{variant:"icon",label:"Icon-led action",prefix:"launch"}],v=e=>{const t=[`href="${e.href}"`,e.variant!=="primary"?`variant="${e.variant}"`:null,e.target!=="_self"?`target="${e.target}"`:null,e.disabled?':disabled="true"':null,e.inline===!1?':inline="false"':null,e.bold?':bold="true"':null,e.italic?':italic="true"':null,e.lineThrough?':line-through="true"':null].filter(n=>!!n).join(" "),s=[e.showPrefix?` <template #prefix>
|
|
2
2
|
<PzIcon name="open_in_new" size="16" />
|
|
3
3
|
</template>`:null,` ${e.label}`,e.showSuffix?` <template #suffix>
|
|
4
4
|
<PzIcon name="arrow_forward" size="16" />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as P,r as c,h as b,w as v,f as I,
|
|
1
|
+
import{e as P,r as c,h as b,w as v,f as I,z as g,C as N,o as L}from"./iframe-iNMR-yGE.js";import{P as _}from"./PzSelect-Ca-HcznT.js";import{P as z}from"./PzPagination-CMzxclWV.js";import{_ as O}from"./_plugin-vue_export-helper-DlAUqK2U.js";var n=(e=>(e[e.FIVE=5]="FIVE",e[e.TEN=10]="TEN",e[e.TWENTY=20]="TWENTY",e[e.FIFTY=50]="FIFTY",e[e.ONE_HUNDRED=100]="ONE_HUNDRED",e[e.ONE_MILLION=1e6]="ONE_MILLION",e))(n||{});const F=[{label:"5",value:n.FIVE.toString()},{label:"10",value:n.TEN.toString()},{label:"20",value:n.TWENTY.toString()},{label:"50",value:n.FIFTY.toString()},{label:"100",value:n.ONE_HUNDRED.toString()},{label:"Всі",value:n.ONE_MILLION.toString()}],T={class:"pz-list-nav"},i=1,s=P({name:"PzListNav",__name:"PzListNav",props:{selectLabel:{default:"Показати рядків:"},total:{},options:{default:()=>F},perPage:{default:n.TEN},currentPage:{default:i}},emits:["onInput","onChangePerPage"],setup(e,{emit:d}){const a=e,o=d,r=c(a.currentPage),l=c(a.perPage);b(()=>{l.value=a.perPage,u()}),v(()=>a.perPage,()=>l.value=a.perPage),v(()=>a.total,()=>u());const u=()=>{const t=(r.value-i)*l.value,m=t+l.value;o("onInput",[t,m])},p=t=>{r.value=t,u(),o("onChangePerPage")},f=t=>{t!==void 0&&(l.value=Number(t),p(i),o("onChangePerPage"))};return(t,m)=>(L(),I("div",T,[g(N(z),{"model-value":r.value,total:a.total,"per-page":l.value,class:"pz-list-nav__paginate","onUpdate:modelValue":p},null,8,["model-value","total","per-page"]),g(N(_),{name:"pz-list-nav-per-page",variant:"inline",label:a.selectLabel,"model-value":String(l.value),options:a.options,class:"pz-list-nav__select","onUpdate:modelValue":f},null,8,["label","model-value","options"])]))}}),D=O(s,[["__scopeId","data-v-4aa62780"]]);s.__docgenInfo=Object.assign({displayName:s.name??s.__name},{name:"PzListNav",exportName:"default",displayName:"PzListNav",description:"",tags:{},props:[{name:"selectLabel",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'"Показати рядків:"'}},{name:"total",required:!0,type:{name:"number"}},{name:"options",required:!1,type:{name:"Array",elements:[{name:"PzFormSelectOption"}]},defaultValue:{func:!1,value:"() => ITEMS_PAGINATE_PER_PAGE_CONFIG"}},{name:"perPage",required:!1,type:{name:"ITEMS_PER_PAGE"},defaultValue:{func:!1,value:"ITEMS_PER_PAGE.TEN"}},{name:"currentPage",required:!1,type:{name:"number"},defaultValue:{func:!1,value:"DELTA"}}],events:[{name:"onInput",type:{names:["tuple"],elements:[{name:"number"},{name:"number"}]}},{name:"onChangePerPage"}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Navigation/PzListNav/PzListNav.vue"]});export{n as I,D as P,F as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as c,w as _}from"./iframe-
|
|
1
|
+
import{r as c,w as _}from"./iframe-iNMR-yGE.js";import{I as r,a as L,P as i}from"./PzListNav-DQqdOfnh.js";import"./preload-helper-C1FmrZbK.js";import"./PzSelect-Ca-HcznT.js";import"./index-De1Uh725.js";import"./floating-vue-xuj-SMFP.js";import"./lodash-CdDiHlzQ.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./PzIcon-DXFdpW2n.js";import"./PzLabel-7yldZ-JH.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./PzPagination-CMzxclWV.js";const S="<\/script>",h=e=>{const t=[`:total="${e.total}"`,e.selectLabel?`:select-label="'${e.selectLabel}'"`:null,e.perPage!==r.TEN?`:per-page="${e.perPage}"`:null,e.currentPage&&e.currentPage!==1?`:current-page="${e.currentPage}"`:null,'@on-input="range = $event"'].filter(p=>!!p).join(`
|
|
2
2
|
`);return`<script setup lang="ts">
|
|
3
3
|
import { ref } from "vue";
|
|
4
4
|
const range = ref<[number, number]>([0, 10]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as L,f as l,q as P,F as S,
|
|
1
|
+
import{e as L,f as l,q as P,F as S,A as x,C as h,g as V,o as t}from"./iframe-iNMR-yGE.js";import{_ as q}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./preload-helper-C1FmrZbK.js";const B=["aria-label"],C={class:"pz-loader__wrapper"},o=L({name:"PzLoader",__name:"PzLoader",props:{isSmall:{type:Boolean,default:!1},variant:{default:"primary"},label:{default:"Loading"}},setup(e){const z=Array.from({length:12},(v,n)=>n);return(v,n)=>(t(),l("div",{class:V(["pz-loader",{"pz-loader--small":e.isSmall,"pz-loader--grey":e.variant==="grey"}]),role:"status","aria-label":e.label},[P("div",C,[(t(!0),l(S,null,x(h(z),b=>(t(),l("div",{key:b,class:"pz-loader__item"}))),128))])],10,B))}}),i=q(o,[["__scopeId","data-v-e5d6adb3"]]);o.__docgenInfo=Object.assign({displayName:o.name??o.__name},{name:"PzLoader",exportName:"default",displayName:"PzLoader",description:"",tags:{},props:[{name:"isSmall",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"variant",required:!1,type:{name:"PzLoaderVariant"},defaultValue:{func:!1,value:'"primary"'}},{name:"label",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'"Loading"'}}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Display/PzLoader/PzLoader.vue"]});const D={title:"Components/Display/PzLoader",component:i,args:{isSmall:!1,variant:"primary",label:"Loading"},argTypes:{isSmall:{control:"boolean",description:"Displays the compact loader size."},variant:{control:"select",options:["primary","grey"],description:"Loader color variant."},label:{control:"text",description:"Accessible status label."}},render:e=>({components:{pzLoader:i},setup(){return{args:e}},template:'<pz-loader v-bind="args" />'})},a={},r={args:{isSmall:!0}},s={args:{variant:"grey"}};var d,c,m;a.parameters={...a.parameters,docs:{...(d=a.parameters)==null?void 0:d.docs,source:{originalSource:"{}",...(m=(c=a.parameters)==null?void 0:c.docs)==null?void 0:m.source}}};var p,u,f;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
isSmall: true
|
|
4
4
|
}
|
|
@@ -6,4 +6,4 @@ import{e as L,f as l,q as P,F as S,u as x,v as h,g as V,o as t}from"./iframe-CK_
|
|
|
6
6
|
args: {
|
|
7
7
|
variant: "grey"
|
|
8
8
|
}
|
|
9
|
-
}`,...(_=(y=s.parameters)==null?void 0:y.docs)==null?void 0:_.source}}};const
|
|
9
|
+
}`,...(_=(y=s.parameters)==null?void 0:y.docs)==null?void 0:_.source}}};const F=["Playground","Small","Grey"];export{s as Grey,a as Playground,r as Small,F as __namedExportsOrder,D as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as Z,E as G,w as
|
|
1
|
+
import{e as Z,E as G,w as A,G as H,u as _,f as n,q as v,Z as J,g as P,y as f,p as l,z as Q,C as k,O as X,a1 as Y,a2 as ee,c as r,o as s,x as oe,B as te,t as ae,r as F}from"./iframe-iNMR-yGE.js";import{P as O}from"./PzText-8KvCoCEc.js";import{_ as se}from"./PzIcon-DXFdpW2n.js";import{_ as le}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./preload-helper-C1FmrZbK.js";const ne=["compact","regular","wide","fullscreen"],re="close",de={id:"default",title:"",size:"regular",closeOnOverlay:!0,closeOnEscape:!0,showCloseButton:!0,closeLabel:"Close modal"},ie=["aria-labelledby","aria-describedby"],ce=["id"],pe=["aria-label"],ue=["id"],me={key:1,class:"pz-modal-footer"},m=Z({name:"PzModal",__name:"PzModal",props:ee({id:{},isOpen:{type:Boolean},title:{},size:{},closeOnOverlay:{type:Boolean},closeOnEscape:{type:Boolean},showCloseButton:{type:Boolean},closeLabel:{}},de),setup(e,{emit:t}){const d=G(),o=e,y=t,g=r(()=>`pz-modal-title-${o.id}`),w=r(()=>`pz-modal-description-${o.id}`),z=r(()=>!!(o.title||d.header)),K=r(()=>z.value||o.showCloseButton),R=r(()=>[`pz-modal-dialog--${o.size}`]);let M="";const x=a=>{if(!(typeof document>"u")){if(a){M=document.body.style.overflow,document.body.style.overflow="hidden";return}document.body.style.overflow=M}},b=()=>{y(re)},U=()=>{o.closeOnOverlay&&b()},W=()=>{o.closeOnEscape&&b()};return A(()=>o.isOpen,a=>{x(a)},{immediate:!0}),H(()=>{x(!1)}),(a,C)=>(s(),_(Y,{to:"body"},[o.isOpen?(s(),n("div",{key:0,class:"pz-modal",onKeydown:X(W,["esc"])},[v("div",{class:"pz-modal-overlay",onClick:U},[v("div",{ref:"dialogRef",class:P(["pz-modal-dialog",R.value]),role:"dialog","aria-modal":!0,"aria-labelledby":g.value,"aria-describedby":w.value,onClick:C[0]||(C[0]=J(()=>{},["stop"]))},[K.value?(s(),n("header",{key:0,class:P(["pz-modal-header",{"pz-modal-header--between":z.value}])},[z.value?(s(),n("div",{key:0,id:g.value,class:"pz-modal-title"},[f(a.$slots,"header",{},()=>[o.title?(s(),_(k(O),{key:0,variant:"h4-bold",as:"h2"},{default:oe(()=>[te(ae(o.title),1)]),_:1})):l("",!0)],!0)],8,ce)):l("",!0),o.showCloseButton?(s(),n("button",{key:1,type:"button",class:"pz-modal-close","aria-label":o.closeLabel,onClick:b},[Q(k(se),{name:"close",size:"24",label:"Close modal"})],8,pe)):l("",!0)],2)):l("",!0),v("div",{id:w.value,class:"pz-modal-body"},[f(a.$slots,"default",{},void 0,!0)],8,ue),a.$slots.footer?(s(),n("footer",me,[f(a.$slots,"footer",{},void 0,!0)])):l("",!0)],10,ie)])],32)):l("",!0)]))}}),h=le(m,[["__scopeId","data-v-a4294a35"]]);m.__docgenInfo=Object.assign({displayName:m.name??m.__name},{name:"PzModal",exportName:"default",displayName:"PzModal",description:"",tags:{},props:[{name:"id",required:!1,type:{name:"string"}},{name:"isOpen",required:!0,type:{name:"boolean"}},{name:"title",required:!1,type:{name:"string"}},{name:"size",required:!1,type:{name:"PzModalSize"}},{name:"closeOnOverlay",required:!1,type:{name:"boolean"}},{name:"closeOnEscape",required:!1,type:{name:"boolean"}},{name:"showCloseButton",required:!1,type:{name:"boolean"}},{name:"closeLabel",required:!1,type:{name:"string"}}],slots:[{name:"header"},{name:"default"},{name:"footer"}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Popups/PzModal/PzModal.vue"]});const ye=e=>`<template>
|
|
2
2
|
<PzModal ${[':is-open="true"',e.title?`title="${e.title}"`:null,e.size!=="regular"?`size="${e.size}"`:null,e.closeOnOverlay===!1?':close-on-overlay="false"':null,e.closeOnEscape===!1?':close-on-escape="false"':null,e.showCloseButton===!1?':show-close-button="false"':null].filter(d=>!!d).join(" ")}>
|
|
3
3
|
<p>Modal content</p>
|
|
4
4
|
</PzModal>
|
|
@@ -14,7 +14,7 @@ import{e as Z,E as G,w as V,G as H,x as _,f as n,q as v,Z as J,g as P,y as f,p a
|
|
|
14
14
|
|
|
15
15
|
<div>Document preview content</div>
|
|
16
16
|
</PzModal>
|
|
17
|
-
</template>`,be={title:"Components/Popups/PzModal",component:h,parameters:{prototype:{caption:"Modal component",note:"Based on the old isOpen/close modal, but rebuilt as a design-system dialog with overlay handling, sticky header and footer areas, and size variants for compact flows or document preview surfaces."},docs:{description:{component:"Use `PzModal` for dialogs, side-by-side review surfaces, and document preview overlays. The body content defaults to `body-regular`, while header and footer stay slot-driven for flexible composition."},source:{transform:(e,t)=>ye(t.args??be.args)}}},args:{id:"storybook-modal",isOpen:!1,title:"Документи тендера",size:"regular",closeOnOverlay:!0,closeOnEscape:!0,showCloseButton:!0,closeLabel:"Close modal",buttonLabel:"Open modal"},argTypes:{isOpen:{control:"boolean",description:"Controlled open state."},title:{control:"text",description:"Default title rendered in the header when the header slot is not used."},size:{control:"inline-radio",options:ne,description:"Dialog width preset."},closeOnOverlay:{control:"boolean",description:"Closes the dialog when the overlay is clicked."},closeOnEscape:{control:"boolean",description:"Closes the dialog on Escape."},showCloseButton:{control:"boolean",description:"Shows the close icon button in the header."},closeLabel:{control:"text",description:"Accessible label for the close button."},buttonLabel:{control:"text",description:"Story-only trigger label.",table:{category:"Story"}}},render:e=>({components:{pzModal:h,pzText:O},setup(){const t=F(!!e.isOpen);return
|
|
17
|
+
</template>`,be={title:"Components/Popups/PzModal",component:h,parameters:{prototype:{caption:"Modal component",note:"Based on the old isOpen/close modal, but rebuilt as a design-system dialog with overlay handling, sticky header and footer areas, and size variants for compact flows or document preview surfaces."},docs:{description:{component:"Use `PzModal` for dialogs, side-by-side review surfaces, and document preview overlays. The body content defaults to `body-regular`, while header and footer stay slot-driven for flexible composition."},source:{transform:(e,t)=>ye(t.args??be.args)}}},args:{id:"storybook-modal",isOpen:!1,title:"Документи тендера",size:"regular",closeOnOverlay:!0,closeOnEscape:!0,showCloseButton:!0,closeLabel:"Close modal",buttonLabel:"Open modal"},argTypes:{isOpen:{control:"boolean",description:"Controlled open state."},title:{control:"text",description:"Default title rendered in the header when the header slot is not used."},size:{control:"inline-radio",options:ne,description:"Dialog width preset."},closeOnOverlay:{control:"boolean",description:"Closes the dialog when the overlay is clicked."},closeOnEscape:{control:"boolean",description:"Closes the dialog on Escape."},showCloseButton:{control:"boolean",description:"Shows the close icon button in the header."},closeLabel:{control:"text",description:"Accessible label for the close button."},buttonLabel:{control:"text",description:"Story-only trigger label.",table:{category:"Story"}}},render:e=>({components:{pzModal:h,pzText:O},setup(){const t=F(!!e.isOpen);return A(()=>e.isOpen,y=>{t.value=!!y}),{args:e,isOpen:t,openModal:()=>{t.value=!0},closeModal:()=>{t.value=!1}}},template:`
|
|
18
18
|
<div class="pz-modal-story">
|
|
19
19
|
<section class="pz-modal-story-board">
|
|
20
20
|
<div class="pz-modal-story-copy">
|
|
@@ -105,7 +105,7 @@ import{e as Z,E as G,w as V,G as H,x as _,f as n,q as v,Z as J,g as P,y as f,p a
|
|
|
105
105
|
size: "wide",
|
|
106
106
|
buttonLabel: "Open wide modal"
|
|
107
107
|
}
|
|
108
|
-
}`,...(N=(q=p.parameters)==null?void 0:q.docs)==null?void 0:N.source}}};var I,j,
|
|
108
|
+
}`,...(N=(q=p.parameters)==null?void 0:q.docs)==null?void 0:N.source}}};var I,j,V;u.parameters={...u.parameters,docs:{...(I=u.parameters)==null?void 0:I.docs,source:{originalSource:`{
|
|
109
109
|
parameters: {
|
|
110
110
|
docs: {
|
|
111
111
|
source: {
|
|
@@ -165,4 +165,4 @@ import{e as Z,E as G,w as V,G as H,x as _,f as n,q as v,Z as J,g as P,y as f,p a
|
|
|
165
165
|
</div>
|
|
166
166
|
\`
|
|
167
167
|
})
|
|
168
|
-
}`,...(
|
|
168
|
+
}`,...(V=(j=u.parameters)==null?void 0:j.docs)==null?void 0:V.source}}};const we=["Playground","CompactInfo","WideReview","DocumentPreview"];export{c as CompactInfo,u as DocumentPreview,i as Playground,p as WideReview,we as __namedExportsOrder,be as default};
|
package/dist/app/assets/{PzMultiSelect.stories-enwvShW9.js → PzMultiSelect.stories-BofZoF1u.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as pe,f as V,
|
|
1
|
+
import{e as pe,f as V,z as P,x as T,C as g,n as k,o as q,q as i,F as de,A as ce,g as F,y as D,B as J,t as C,J as ue,r as o,c as f,w as me}from"./iframe-iNMR-yGE.js";import{_ as ne}from"./PzIcon-DXFdpW2n.js";import{P as ge}from"./PzTag-BwhxzDXe.js";import{P as d}from"./PzText-8KvCoCEc.js";import{u as fe}from"./index-De1Uh725.js";import{k as xe}from"./floating-vue-xuj-SMFP.js";import{l as $}from"./lodash-CdDiHlzQ.js";import{P as be}from"./PzLabel-7yldZ-JH.js";import{_ as ve}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./preload-helper-C1FmrZbK.js";import"./_commonjsHelpers-Cpj98o6Y.js";const he=6,ze=["id"],ye=["id","disabled","aria-controls","aria-expanded","aria-label"],Se={class:"pz-multi-select-trigger-text"},Oe=["id","aria-labelledby"],we={class:"pz-multi-select-options"},Ve=["for"],Pe=["id","name","checked","disabled","onChange"],Te={class:"pz-multi-select-option-text"},S=pe({name:"PzMultiSelect",__name:"PzMultiSelect",props:{name:{},options:{},modelValue:{default:()=>[]},label:{default:""},placeholder:{default:""},selectedLabel:{default:"{count} обрано"},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},width:{default:void 0}},emits:["update:modelValue"],setup(e,{emit:n}){const l=e,u=n,m=o(null),{width:ae}=fe(m),c=t=>l.modelValue.some(s=>$.isEqual(s,t)),oe=t=>{const s=c(t)?l.modelValue.filter(a=>!$.isEqual(a,t)):[...l.modelValue,t];u("update:modelValue",s)},N=f(()=>l.options.filter(t=>c(t.value))),L=f(()=>{var s;const t=l.modelValue.length;return t===0?l.placeholder:t===1?((s=N.value[0])==null?void 0:s.label)??l.placeholder:l.selectedLabel.replace("{count}",String(t))}),se=f(()=>l.label||L.value||l.placeholder||l.name),ie=f(()=>{const t=Math.round(ae.value);return t?{inlineSize:`${String(t)}px`}:{}}),O=(t,s)=>t.id??`${l.name}-multi-option-${String(s+1)}`,re=t=>({option:t,selected:c(t.value),disabled:!!t.disabled});return(t,s)=>(q(),V("div",{id:e.name,class:"pz-multi-select",style:k({width:e.width})},[P(g(be),{label:e.label,for:e.name+"-trigger",required:e.required,disabled:e.disabled},{default:T(()=>[P(g(xe),{class:"pz-multi-select-dropdown",theme:"dropdown",placement:"bottom-start",container:"#"+e.name,distance:g(he),disabled:e.disabled},{default:T(({shown:a})=>[i("button",{id:e.name+"-trigger",ref_key:"triggerRef",ref:m,type:"button",class:F(["pz-multi-select-trigger",{"is-open":a,"is-placeholder":!e.modelValue.length}]),disabled:e.disabled,"aria-controls":e.name+"-menu","aria-expanded":a?"true":"false","aria-haspopup":"listbox","aria-label":e.label?void 0:se.value},[i("span",Se,[D(t.$slots,"selected",{selectedOptions:N.value,placeholder:e.placeholder,count:e.modelValue.length},()=>[J(C(L.value),1)],!0)]),P(g(ne),{name:"expand_more",size:"20",class:"pz-multi-select-trigger-icon"})],10,ye)]),popper:T(()=>[i("div",{id:e.name+"-menu",class:"pz-multi-select-menu",style:k(ie.value),role:"group","aria-labelledby":e.name+"-trigger"},[i("div",we,[(q(!0),V(de,null,ce(l.options,(a,w)=>(q(),V("label",{key:O(a,w),for:O(a,w),class:F(["pz-multi-select-option",{"is-selected":c(a.value),"is-disabled":a.disabled}])},[i("input",{id:O(a,w),type:"checkbox",name:e.name+"-option",checked:c(a.value),disabled:a.disabled,class:"pz-multi-select-option-input",onChange:Fe=>oe(a.value)},null,40,Pe),s[0]||(s[0]=i("span",{class:"pz-multi-select-option-checkbox","aria-hidden":"true"},[i("svg",{class:"pz-multi-select-option-check",viewBox:"0 0 16 16",fill:"none"},[i("path",{d:"M3.5 8.25L6.5 11L12.5 5",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),i("span",Te,[D(t.$slots,"default",ue({ref_for:!0},re(a)),()=>[J(C(a.label),1)],!0)])],10,Ve))),128))])],12,Oe)]),_:3},8,["container","distance","disabled"])]),_:3},8,["label","for","required","disabled"])],12,ze))}}),r=ve(S,[["__scopeId","data-v-af4044c6"]]);S.__docgenInfo=Object.assign({displayName:S.name??S.__name},{name:"PzMultiSelect",exportName:"default",displayName:"PzMultiSelect",description:"",tags:{},props:[{name:"name",required:!0,type:{name:"string"}},{name:"options",required:!0,type:{name:"Array",elements:[{name:"PzFormSelectOption"}]}},{name:"modelValue",required:!0,type:{name:"Array",elements:[{name:"PzFormSelectValue"}]},defaultValue:{func:!1,value:"() => []"}},{name:"label",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}},{name:"placeholder",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}},{name:"selectedLabel",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'"{count} обрано"'}},{name:"disabled",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"required",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"width",required:!1,type:{name:"string"},defaultValue:{func:!1,value:"undefined"}}],slots:[{name:"selected",scoped:!0,bindings:[{name:"selected-options",title:"binding"},{name:"placeholder",title:"binding"},{name:"count",title:"binding"}]},{name:"default",scoped:!0,bindings:[]}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Form/PzMultiSelect/PzMultiSelect.vue"]});const p=[{label:"09000000-3 - Нафтопродукти, паливо, електроенергія та інші джерела енергії",value:"09000000-3"},{label:"09100000-0 - Паливо",value:"09100000-0"},{label:"09200000-1 - Нафта, вугілля і нафтопродукти",value:"09200000-1"},{label:"09300000-2 - Електрична, теплова, сонячна та атомна енергія",value:"09300000-2"},{label:"90900000-6 - Послуги з прибирання та санітарно-гігієнічні послуги",value:"90900000-6"}],M=[{label:"Чернетка",value:"draft"},{label:"Активний тендер",value:"active"},{label:"Архів",value:"archive"},{label:"Недоступний",value:"unavailable",disabled:!0}],qe=30,Me=2,I=["Будівництво","Послуги","Транспорт","Освіта","Енергія"],Ne=Array.from({length:qe},(e,n)=>{const l=I[n%I.length];return{label:`Категорія ${String(n+1).padStart(Me,"0")} — ${l}`,value:`category-${n+1}`}}),Le=e=>`<template>
|
|
2
2
|
<PzMultiSelect
|
|
3
3
|
v-model="value"
|
|
4
4
|
${[`name="${e.name}"`,e.label?`label="${e.label}"`:null,e.placeholder?`placeholder="${e.placeholder}"`:null,e.selectedLabel&&e.selectedLabel!=="{count} обрано"?`selected-label="${e.selectedLabel}"`:null,e.required?':required="true"':null,e.disabled?':disabled="true"':null].filter(l=>!!l).join(" ")}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as E,f as i,F,
|
|
1
|
+
import{e as E,f as i,F,A as O,g as p,o,u as A,x as B,y as h,B as x,t as b,C as V,R as j,c as L,K as W,h as z,a0 as y}from"./iframe-iNMR-yGE.js";import{P as g}from"./PzText-8KvCoCEc.js";import{p as Q}from"./configs-B15JgQZ-.js";import{_ as U}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./preload-helper-C1FmrZbK.js";const d=E({name:"PzNav",__name:"PzNav",props:{config:{},typography:{}},setup(e){const n=W(),r=e,q=a=>{const[s=""]=a.split("#");return s?s.startsWith("/")?s:`/${s}`:"/"},M=a=>a.startsWith("#")?a:q(a),f=a=>a.name===n.name,R=L(()=>!r.config.some(f)),u=a=>f(a)||R.value&&!!a.isDefault;return(a,s)=>(o(),i("ul",{class:p(["pz-nav",r.typography?`pz-typography--${r.typography}`:null])},[(o(!0),i(F,null,O(r.config,(t,$)=>(o(),i("li",{key:`${t.path}-${$}`,class:p(["pz-nav__item",[{disabled:t.disabled},{active:u(t)}]])},[t.disabled?(o(),i("span",{key:1,class:p(["pz-nav__text",{active:u(t)}])},[h(a.$slots,"view",{data:t},()=>[x(b(t.text),1)],!0)],2)):(o(),A(V(j),{key:0,to:M(t.path),class:p(["pz-nav__text",{active:u(t)}])},{default:B(()=>[h(a.$slots,"view",{data:t},()=>[x(b(t.text),1)],!0)]),_:2},1032,["to","class"]))],2))),128))],2))}}),m=U(d,[["__scopeId","data-v-ab9cd5ef"]]);d.__docgenInfo=Object.assign({displayName:d.name??d.__name},{name:"PzNav",exportName:"default",displayName:"PzNav",description:"",tags:{},props:[{name:"config",required:!0,type:{name:"Array",elements:[{name:"PzNavItem"}]}},{name:"typography",required:!1,type:{name:"PzTextVariant"}}],slots:[{name:"view",scoped:!0,bindings:[{name:"data",title:"binding"}]}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Navigation/PzNav/PzNav.vue"]});const N=[{path:"/market/procedures",name:"market-procedures",text:"Закупівлі",isDefault:!0},{path:"/market/contracts",name:"market-contracts",text:"Договори"},{path:"/market/plans",name:"market-plans",text:"Плани"},{path:"/market/selection",name:"market-selection",text:"Відбори"},{path:"/market/products",name:"market-products",text:"Товари"}],G=[{path:"/tender/details",name:"tender-details",text:"Деталі закупівлі",isDefault:!0},{path:"/tender/questions",name:"tender-questions",text:"Питання та вимоги (0)"},{path:"/tender/complaints",name:"tender-complaints",text:"Скарги (0)"},{path:"/tender/monitoring",name:"tender-monitoring",text:"Моніторинг (0)",disabled:!0}],H=[{path:"/archive/overview",name:"archive-overview",text:"Overview",isDefault:!0},{path:"/archive/history",name:"archive-history",text:"History",disabled:!0},{path:"/archive/files",name:"archive-files",text:"Files"}],J=e=>`<template>
|
|
2
2
|
<PzNav :config='${JSON.stringify(e.config,null,2)}' />
|
|
3
3
|
</template>`,K=()=>`<template>
|
|
4
4
|
<PzNav :config="config">
|
package/dist/app/assets/{PzNumberFormat.stories-Tgzd7Ttu.js → PzNumberFormat.stories-wQu_Z09x.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{P as o}from"./PzNumberFormat-D5xYsZ3A.js";import{P as a}from"./PzText-
|
|
1
|
+
import{P as o}from"./PzNumberFormat-D5xYsZ3A.js";import{P as a}from"./PzText-8KvCoCEc.js";import"./lodash-CdDiHlzQ.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iframe-iNMR-yGE.js";import"./preload-helper-C1FmrZbK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const x={title:"Utilities/PzNumberFormat",parameters:{docs:{description:{component:"The `PzNumberFormat` utility is used to format numbers consistently, adding division for thousands and handling decimals."}}}},e={render:()=>({components:{pzText:a},setup(){return{examples:[{value:1234567,description:"Millions without decimals"},{value:1234567891e-3,precision:2,description:"Millions with 2 decimals precision"},{value:"54321.1",description:"String input with 1 decimal"},{value:0,description:"Zero"},{value:"-",description:"Invalid/empty dash"},{value:null,description:"Null value"}].map(n=>({...n,result:new o(n.value,n.precision).number}))}},template:`
|
|
2
2
|
<div>
|
|
3
3
|
<pz-text variant="h4-semibold">PzNumberFormat Usage</pz-text>
|
|
4
4
|
<ul style="margin-top: 16px; padding-left: 20px;">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as F,f as o,q as s,
|
|
1
|
+
import{e as F,f as o,q as s,z as y,C as h,F as I,A as w,c as l,o as i,g as T,t as $}from"./iframe-iNMR-yGE.js";import{_ as V}from"./PzIcon-DXFdpW2n.js";import{_ as B}from"./_plugin-vue_export-helper-DlAUqK2U.js";const E={class:"pz-pagination","aria-label":"Pagination"},M={class:"pz-pagination__list"},S=["disabled"],j={key:0,class:"pz-pagination__dots","aria-hidden":"true"},A=["aria-current","onClick"],L=["disabled"],m=1,r=F({name:"PzPagination",__name:"PzPagination",props:{modelValue:{},total:{},perPage:{},radius:{default:2}},emits:["update:modelValue"],setup(p,{emit:k}){const a=p,u=k,_=l(()=>Math.ceil(a.total/a.perPage)),f=l(()=>a.modelValue<=1),P=l(()=>a.modelValue>=_.value),C=l(()=>{const t=_.value;if(t<=0)return[];if(t===1)return[{type:"page",page:m}];const c=a.modelValue,e=a.radius,d=m+1,b=t-1,z=Math.max(d,c-e),v=Math.min(b,c+e),n=[{type:"page",page:m}];z>d&&n.push({type:"dots",side:"left"});for(let g=z;g<=v;g++)n.push({type:"page",page:g});return v<b&&n.push({type:"dots",side:"right"}),n.push({type:"page",page:t}),n}),N=t=>{t!==a.modelValue&&u("update:modelValue",t)},x=()=>{f.value||u("update:modelValue",a.modelValue-1)},q=()=>{P.value||u("update:modelValue",a.modelValue+1)};return(t,c)=>(i(),o("nav",E,[s("ul",M,[s("li",null,[s("button",{type:"button",class:"pz-pagination__btn pz-pagination__btn--nav",disabled:f.value,"aria-label":"Попередня сторінка",onClick:x},[y(h(V),{name:"chevron_left",size:"24"})],8,S)]),(i(!0),o(I,null,w(C.value,e=>(i(),o("li",{key:e.type==="page"?`p-${e.page}`:`d-${e.side}`,class:"pz-pagination__item"},[e.type==="dots"?(i(),o("span",j," … ")):(i(),o("button",{key:1,type:"button",class:T(["pz-pagination__btn",{"pz-pagination__btn--active":e.page===p.modelValue}]),"aria-current":e.page===p.modelValue?"page":void 0,onClick:d=>N(e.page)},$(e.page),11,A))]))),128)),s("li",null,[s("button",{type:"button",class:"pz-pagination__btn pz-pagination__btn--nav",disabled:P.value,"aria-label":"Наступна сторінка",onClick:q},[y(h(V),{name:"chevron_right",size:"24"})],8,L)])])]))}}),R=B(r,[["__scopeId","data-v-f128b85c"]]);r.__docgenInfo=Object.assign({displayName:r.name??r.__name},{name:"PzPagination",exportName:"default",displayName:"PzPagination",description:"",tags:{},props:[{name:"modelValue",required:!0,type:{name:"number"}},{name:"total",required:!0,type:{name:"number"}},{name:"perPage",required:!0,type:{name:"number"}},{name:"radius",required:!1,type:{name:"number"},defaultValue:{func:!1,value:"2"}}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Navigation/PzPagination/PzPagination.vue"]});export{R as P};
|
package/dist/app/assets/{PzPagination.stories-COXfJ0CP.js → PzPagination.stories-Dtj0SvBl.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e,w as m}from"./iframe-
|
|
1
|
+
import{r as e,w as m}from"./iframe-iNMR-yGE.js";import{P as v}from"./PzText-8KvCoCEc.js";import{P as s}from"./PzPagination-CMzxclWV.js";import"./preload-helper-C1FmrZbK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./PzIcon-DXFdpW2n.js";const l=2,z=50,y=100,P=3,b="<\/script>",f=a=>{const t=[':model-value="currentPage"',`:total="${a.total}"`,`:per-page="${a.perPage}"`,a.radius!==l?`:radius="${a.radius}"`:null,'@update:model-value="currentPage = $event"'].filter(r=>!!r).join(`
|
|
2
2
|
`);return`<script setup lang="ts">
|
|
3
3
|
import { ref } from "vue";
|
|
4
4
|
const currentPage = ref(${a.modelValue});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{P as
|
|
1
|
+
import{P as A}from"./PzKeyValue-CD_si4QT.js";import{P as v}from"./PzText-8KvCoCEc.js";import{e as E,f as l,F as C,A as V,C as a,u as k,p as q,o as p,y as K}from"./iframe-iNMR-yGE.js";import{I,P as w}from"./PzListNav-DQqdOfnh.js";import{P as O}from"./PzScrollTo-KuzwcV-o.js";import{u as F}from"./StaticPagination.composable-CwElAiHW.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./isArray-DPUC7i9_.js";import"./lodash-CdDiHlzQ.js";import"./PzDomHandler-BU7iMNnt.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./preload-helper-C1FmrZbK.js";import"./PzSelect-Ca-HcznT.js";import"./index-De1Uh725.js";import"./floating-vue-xuj-SMFP.js";import"./PzIcon-DXFdpW2n.js";import"./PzLabel-7yldZ-JH.js";import"./PzPagination-CMzxclWV.js";const L={class:"pagination-provider"},n=E({name:"PzPaginationProvider",__name:"PzPaginationProvider",props:{perPage:{default:I.FIVE},data:{},navigationTopElement:{default:void 0},hasAutoScroll:{type:Boolean,default:!1}},setup(e){const t=e,{perPage:b,pageChanged:x,getItems:h,isPaginationAvailable:S,visibleRangeElements:T}=F(t),_=()=>{var r;t.hasAutoScroll&&O.moveByQuerySelector(".pagination-provider",((r=t.navigationTopElement)==null?void 0:r.offsetHeight)||0)};return(r,R)=>(p(),l("div",L,[(p(!0),l(C,null,V(a(h),(N,s)=>K(r.$slots,"item",{item:N,index:s,sequenceNumber:a(T)[0]+s})),256)),a(S)?(p(),k(a(w),{key:0,total:e.data.length,"per-page":a(b),class:"pz-mt-32",onOnInput:a(x),onOnChangePerPage:_},null,8,["total","per-page","onOnInput"])):q("",!0)]))}});n.__docgenInfo=Object.assign({displayName:n.name??n.__name},{name:"PzPaginationProvider",exportName:"default",displayName:"PzPaginationProvider",description:"",tags:{},props:[{name:"perPage",required:!1,type:{name:"number"},defaultValue:{func:!1,value:"ITEMS_PER_PAGE.FIVE"}},{name:"data",required:!0,type:{name:"Array",elements:[{name:"T"}]}},{name:"navigationTopElement",required:!1,type:{name:"HTMLElement"},defaultValue:{func:!1,value:"undefined"}},{name:"hasAutoScroll",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],slots:[{name:"item",scoped:!0,bindings:[{name:"item",title:"binding"},{name:"index",title:"binding"},{name:"sequence-number",title:"binding"}]}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Navigation/PzPaginationProvider/PzPaginationProvider.vue"]});const y=n,M=n,z=A,f=[{id:"row-id",key:"id",labelKey:"Tender ID"},{id:"row-title",key:"title",labelKey:"Title"},{id:"row-amount",key:"amount",labelKey:"Expected value"}],B=12,H=6,D=1e3,G=Array.from({length:B},(e,t)=>({id:`UA-2026-04-17-${String(t+1).padStart(H,"0")}-a`,title:`Закупівля №${t+1}`,amount:`${(t+1)*D} UAH`})),le={title:"Components/Navigation/PzPaginationProvider",component:M,parameters:{docs:{description:{component:"Generic static-pagination wrapper. Slices `data` into pages, exposes each page item through the `item` scoped slot (`{ item, index, sequenceNumber }`), and renders `PzListNav` when the data exceeds `perPage`. Here it is typed as `PzKeyValueData` and paired with `PzKeyValue`."}}},args:{data:G,perPage:5},argTypes:{data:{control:!1,description:"Full data array; the provider paginates it internally."},perPage:{control:{type:"number",min:1},description:"Items per page."}}},o={render:e=>({components:{pzPaginationProvider:y,pzKeyValue:z,pzText:v},setup(){return{args:e,config:f}},template:`
|
|
2
2
|
<div style="max-width: 640px;">
|
|
3
3
|
<pz-pagination-provider :data="args.data" :per-page="args.perPage">
|
|
4
4
|
<template #item="{ item, sequenceNumber }">
|
package/dist/app/assets/{PzPriceFormat.stories-Bn7VyLHN.js → PzPriceFormat.stories-zk5JXBOv.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{l as p}from"./lodash-CdDiHlzQ.js";import{P as c}from"./PzText-
|
|
1
|
+
import{l as p}from"./lodash-CdDiHlzQ.js";import{P as c}from"./PzText-8KvCoCEc.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iframe-iNMR-yGE.js";import"./preload-helper-C1FmrZbK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const n=100;class o{static minPriceStep(t,r){return!t||r===void 0?0:r/t}static multiplyByHundredPercent(t){if(!p.isNumber(t)&&p.isEmpty(t))return"";const r=parseFloat(t)*n;return`${Math.round(r*n)/n}%`}}const P={title:"Utilities/PzPriceFormat",parameters:{docs:{description:{component:"The `PzPriceFormat` static class provides common utilities for rendering pricing values such as minimum steps or formatting decimal percents into percent strings."}}}},i={render:()=>({components:{pzText:c},setup(){return{minPriceExamples:[{value:1e3,step:10,description:"Value 1000, minimal step 10"},{value:50,step:2,description:"Value 50, step 2"},{value:0,step:5,description:"Zero value"}].map(e=>({...e,result:o.minPriceStep(e.value,e.step)})),percentExamples:[{value:.12345,description:"Standard fractional"},{value:1,description:"Complete ratio"},{value:"0.55",description:"String fractional"}].map(e=>({...e,result:o.multiplyByHundredPercent(e.value)}))}},template:`
|
|
2
2
|
<div style="display: flex; flex-direction: column; gap: 24px;">
|
|
3
3
|
<section>
|
|
4
4
|
<pz-text variant="h4-semibold">minPriceStep</pz-text>
|
package/dist/app/assets/{PzRadioGroup.stories-CZg42y4W.js → PzRadioGroup.stories-DRGcBU0t.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as w,f as i,F as k,
|
|
1
|
+
import{e as w,f as i,F as k,A as S,g as b,o as n,q as p,y as g,B as _,t as C,J as v,p as R,r as f,w as O}from"./iframe-iNMR-yGE.js";import{P as $}from"./PzLabel-7yldZ-JH.js";import{P as B}from"./PzText-8KvCoCEc.js";import{_ as L}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./preload-helper-C1FmrZbK.js";const q=["aria-disabled"],N=["for"],A=["id","name","value","checked","disabled","onChange"],F={class:"pz-radio-group-label"},I={key:0,class:"pz-radio-group-content"},c=w({name:"PzRadioGroup",__name:"PzRadioGroup",props:{modelValue:{type:[String,Number,Boolean],default:void 0},name:{},disabled:{type:Boolean,default:!1},mode:{default:"default"},options:{default:()=>[]},optionClass:{default:""}},emits:["update:modelValue"],setup(e,{emit:s}){const l=e,m=s,V=o=>Object.is(l.modelValue,o),G=o=>m("update:modelValue",o),T=(o,d)=>o.id??`${l.name}-${String(d+1)}`,t=(o,d)=>({option:o,value:o.value,checked:V(o.value),disabled:!!(l.disabled||o.disabled),id:T(o,d),name:l.name});return(o,d)=>(n(),i("div",{class:b(["pz-radio-group",e.mode]),"aria-disabled":e.disabled,role:"radiogroup"},[(n(!0),i(k,null,S(e.options,(a,r)=>(n(),i("label",{key:t(a,r).id,class:b(["pz-radio-group-option",[e.optionClass,{disabled:t(a,r).disabled}]]),for:t(a,r).id},[p("input",{id:t(a,r).id,name:e.name,value:String(a.value),checked:t(a,r).checked,disabled:t(a,r).disabled,type:"radio",class:"pz-radio-group-input",onChange:J=>G(a.value)},null,40,A),d[0]||(d[0]=p("span",{class:"pz-radio-group-control","aria-hidden":"true"},[p("span",{class:"pz-radio-group-dot"})],-1)),p("span",F,[g(o.$slots,"default",v({ref_for:!0},t(a,r)),()=>[_(C(a.label),1)],!0)]),o.$slots.content&&t(a,r).checked?(n(),i("div",I,[g(o.$slots,"content",v({ref_for:!0},t(a,r)),void 0,!0)])):R("",!0)],10,N))),128))],10,q))}}),z=L(c,[["__scopeId","data-v-21d7c0d8"]]);c.__docgenInfo=Object.assign({displayName:c.name??c.__name},{name:"PzRadioGroup",exportName:"default",displayName:"PzRadioGroup",description:"",tags:{},props:[{name:"modelValue",required:!1,type:{name:"PzRadioGroupValue"},defaultValue:{func:!1,value:"undefined"}},{name:"name",required:!0,type:{name:"string"}},{name:"disabled",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"mode",required:!1,type:{name:"union",elements:[{name:'"default"'},{name:'"accordion"'}]},defaultValue:{func:!1,value:'"default"'}},{name:"options",required:!0,type:{name:"Array",elements:[{name:"PzRadioGroupOption"}]},defaultValue:{func:!1,value:"() => []"}},{name:"optionClass",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}}],slots:[{name:"default",scoped:!0,bindings:[]},{name:"content",scoped:!0,bindings:[]}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Form/PzRadioGroup/PzRadioGroup.vue"]});const y=[{label:"Text radiobutton",value:"one"},{label:"Text radiobutton",value:"two"},{label:"Text radiobutton",value:"three"},{label:"Text radiobutton",value:"four"}],j=[{label:"Text radiobutton",value:"one"},{label:"Text checkboxText checkboxText checkbox",value:"two"},{label:"Text radiobutton",value:"three"},{label:"Text radiobutton",value:"four"},{label:"Text radiobutton",value:"five"}],D=e=>{const s=[`name="${e.name}"`,e.mode!=="default"?`mode="${e.mode}"`:null,e.disabled?':disabled="true"':null].filter(l=>!!l).join(" ");return`<template>
|
|
2
2
|
<PzLabel label="${e.heading}">
|
|
3
3
|
<PzRadioGroup
|
|
4
4
|
v-model="selectedValue"
|
|
@@ -18,7 +18,7 @@ const options = [
|
|
|
18
18
|
];
|
|
19
19
|
|
|
20
20
|
const selectedValue = ref("two");
|
|
21
|
-
<\/script>`},E={title:"Components/Form/PzRadioGroup",component:z,parameters:{docs:{description:{component:"Use `PzRadioGroup` for single-choice lists backed by one primitive `value`. The component keeps the legacy accordion content pattern, but aligns the API and styling with the current `Pz*` form controls."},source:{transform:(e,s)=>D(s.args??E.args)}}},args:{heading:"Назва поля",modelValue:"two",options:y,name:"radio-group-story",mode:"default",disabled:!1,optionClass:""},argTypes:{modelValue:{control:!1,description:"Selected option value."},options:{control:!1,description:"Array of radio options with `label`, `value`, and optional `disabled`/`id`."},name:{control:"text",description:"Shared native input name."},mode:{control:"inline-radio",options:["default","accordion"],description:"Default stacked list or separated accordion-style list."},disabled:{control:"boolean",description:"Disables every option in the group."},optionClass:{control:"text",description:"Optional additional class applied to each option wrapper."},heading:{control:"text",description:"Story-only field label shown through `PzLabel`.",table:{category:"Story"}}},render:e=>({components:{pzLabel:$,pzRadioGroup:z,pzText:
|
|
21
|
+
<\/script>`},E={title:"Components/Form/PzRadioGroup",component:z,parameters:{docs:{description:{component:"Use `PzRadioGroup` for single-choice lists backed by one primitive `value`. The component keeps the legacy accordion content pattern, but aligns the API and styling with the current `Pz*` form controls."},source:{transform:(e,s)=>D(s.args??E.args)}}},args:{heading:"Назва поля",modelValue:"two",options:y,name:"radio-group-story",mode:"default",disabled:!1,optionClass:""},argTypes:{modelValue:{control:!1,description:"Selected option value."},options:{control:!1,description:"Array of radio options with `label`, `value`, and optional `disabled`/`id`."},name:{control:"text",description:"Shared native input name."},mode:{control:"inline-radio",options:["default","accordion"],description:"Default stacked list or separated accordion-style list."},disabled:{control:"boolean",description:"Disables every option in the group."},optionClass:{control:"text",description:"Optional additional class applied to each option wrapper."},heading:{control:"text",description:"Story-only field label shown through `PzLabel`.",table:{category:"Story"}}},render:e=>({components:{pzLabel:$,pzRadioGroup:z,pzText:B},setup(){const s=f(e.modelValue),l=f("two");return O(()=>e.modelValue,m=>{s.value=m}),{args:e,accordionValue:l,longLabelOptions:j,radioOptions:y,selectedValue:s}},template:`
|
|
22
22
|
<div class="pz-radio-group-story">
|
|
23
23
|
<section class="pz-radio-group-story-board">
|
|
24
24
|
<div class="pz-radio-group-story-header">
|