@prozorro/prozorro-ui 0.0.10-beta → 0.0.12-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-NkJWwZpV.js → Color-FRDS63T2-BVVRSzFu.js} +1 -1
- package/dist/app/assets/{Colors.stories-BYTBLsDR.js → Colors.stories-BV0C2AcY.js} +3 -3
- package/dist/app/assets/{DocsRenderer-LL677BLK-DT0XE5RB.js → DocsRenderer-LL677BLK-BvkMeFSH.js} +71 -71
- package/dist/app/assets/{Grid.stories-B3nKsUwh.js → Grid.stories-0uJYxh6v.js} +23 -2
- package/dist/app/assets/PzAccordion-BK8qPIGx.js +1 -0
- package/dist/app/assets/{PzAccordion.stories-cOAYUrCJ.js → PzAccordion.stories-CBJM1l8G.js} +2 -2
- package/dist/app/assets/PzAccordionTable.stories-0OZ08OCM.js +275 -0
- package/dist/app/assets/{PzArrayClamp.stories-Btd9xMHi.js → PzArrayClamp.stories-CVsbMoOI.js} +5 -5
- package/dist/app/assets/{PzBreadcrumb.stories-D54RjRCg.js → PzBreadcrumb.stories-AEkdP3Sx.js} +4 -4
- package/dist/app/assets/PzBtn-B9m7S5t4.js +1 -0
- package/dist/app/assets/{PzBtn.stories-xnSEsakq.js → PzBtn.stories-C0en9cjk.js} +2 -2
- package/dist/app/assets/PzCheckbox-4-y3QxIg.js +1 -0
- package/dist/app/assets/{PzCheckbox.stories-RN07sGno.js → PzCheckbox.stories-0AqtpX2R.js} +4 -4
- package/dist/app/assets/{PzCheckboxGroup.stories-KogRihCz.js → PzCheckboxGroup.stories-Bc2Q0qzm.js} +3 -3
- package/dist/app/assets/PzClamp-0zNrPrFL.css +1 -0
- package/dist/app/assets/PzClamp.stories-ClQxjI3w.js +1 -0
- package/dist/app/assets/PzCopyToClipboard-DYvP-lFq.css +1 -0
- package/dist/app/assets/PzCopyToClipboard.stories-DpySg5be.js +45 -0
- package/dist/app/assets/PzDate-B7IRRe08.js +1 -0
- package/dist/app/assets/PzDate-DzxkQx_5.css +1 -0
- package/dist/app/assets/PzDate.stories-BMKH61UJ.js +116 -0
- package/dist/app/assets/PzDateRange-DafT5WRv.css +1 -0
- package/dist/app/assets/PzDateRange.stories-DermFDVN.js +9 -0
- package/dist/app/assets/{PzDomHandler.stories-DAp97pdG.js → PzDomHandler.stories-BZmKmq7h.js} +3 -3
- package/dist/app/assets/{PzDropdown.stories-eClrzbYq.js → PzDropdown.stories-D21VL1Wl.js} +3 -3
- package/dist/app/assets/{PzFileInput.stories-Dg6-KAun.js → PzFileInput.stories-CdV-8Ur5.js} +4 -4
- package/dist/app/assets/{PzGrid.stories-DLm_q1Lw.js → PzGrid.stories-jBExFoH9.js} +1 -1
- package/dist/app/assets/PzHint-Cs9J6pTd.js +1 -0
- package/dist/app/assets/{PzHint.stories-C2oiTVIN.js → PzHint.stories-qTU73X-T.js} +2 -2
- package/dist/app/assets/{PzIcon-DTWQGv5c.js → PzIcon-4heVmbY5.js} +1 -1
- package/dist/app/assets/{PzIcon.stories-CT6OA9PM.js → PzIcon.stories-CHQJZBkl.js} +2 -2
- package/dist/app/assets/{PzImage.stories-BJL_3ef9.js → PzImage.stories-cr2I1Mv8.js} +3 -3
- package/dist/app/assets/{PzImageInput.stories-CTksIxMS.js → PzImageInput.stories-wOMiRK50.js} +4 -4
- package/dist/app/assets/{PzInfoBlockLayout.stories-BBkiY-o7.js → PzInfoBlockLayout.stories-DkIvXHsN.js} +3 -3
- package/dist/app/assets/PzInfoHint-DyFMEGP1.js +1 -0
- package/dist/app/assets/{PzInfoHint.stories-6f6FePkY.js → PzInfoHint.stories-CbQPKqr-.js} +3 -3
- package/dist/app/assets/{PzInput.stories-Bm_5Kj-P.js → PzInput.stories-DFL76csJ.js} +3 -3
- package/dist/app/assets/{PzInputDate.stories-Ccqq1p1p.js → PzInputDate.stories-DtbZSO2I.js} +3 -3
- package/dist/app/assets/{PzInputNumber.stories-DAQYW2cJ.js → PzInputNumber.stories-BnWkdIia.js} +3 -3
- package/dist/app/assets/{PzKeyValue.stories-BrV9VQaC.js → PzKeyValue.stories-D62cy2Nn.js} +4 -4
- package/dist/app/assets/PzLabel-BGjTUIxv.js +1 -0
- package/dist/app/assets/{PzLabel.stories-DvN_0fOj.js → PzLabel.stories-Bsn2on9n.js} +3 -3
- package/dist/app/assets/PzLink-PMftGlCf.js +1 -0
- package/dist/app/assets/{PzLink.stories-BnY0IvI7.js → PzLink.stories-uYyu1A1Y.js} +2 -2
- package/dist/app/assets/PzListNav-DRMKw6wp.css +1 -0
- package/dist/app/assets/PzListNav.stories-CzdiB1vJ.js +37 -0
- package/dist/app/assets/PzLoader-J7_Govh3.css +1 -0
- package/dist/app/assets/PzLoader.stories-BKbYZbCg.js +9 -0
- package/dist/app/assets/{PzModal.stories-Bq5YuGJo.js → PzModal.stories-D2Ix-15K.js} +3 -3
- package/dist/app/assets/PzMultiSelect-DeX8aBEQ.css +1 -0
- package/dist/app/assets/PzMultiSelect.stories-ZraFVUKD.js +453 -0
- package/dist/app/assets/{PzNav.stories-5KiqcPrd.js → PzNav.stories-G7KKxcZ2.js} +4 -4
- package/dist/app/assets/{PzNumberFormat.stories-QyheTXgc.js → PzNumberFormat.stories-Cbj23Stp.js} +2 -2
- package/dist/app/assets/PzPagination-DoBWX1Bo.js +1 -0
- package/dist/app/assets/PzPagination-k9D0Hxrx.css +1 -0
- package/dist/app/assets/{PzPagination-07CphuYh.css → PzPagination-ohvV8gN-.css} +1 -1
- package/dist/app/assets/PzPagination.stories-Cebi1pnM.js +83 -0
- package/dist/app/assets/{PzPriceFormat.stories-Clj4FRWT.js → PzPriceFormat.stories-BUxyBQoC.js} +2 -2
- package/dist/app/assets/{PzRadioGroup.stories-o8HE47Hq.js → PzRadioGroup.stories-BniR4fVs.js} +3 -3
- package/dist/app/assets/{PzRouterLink.stories-Dc_EnCBz.js → PzRouterLink.stories-DXaqIXWs.js} +3 -3
- package/dist/app/assets/{PzScrollTo.stories-4BSDyJ2p.js → PzScrollTo.stories-Ck6gWxiu.js} +2 -2
- package/dist/app/assets/{PzSearchResultItemLayout.stories-QRI-A0Zi.js → PzSearchResultItemLayout.stories-BUAZX2y1.js} +3 -3
- package/dist/app/assets/PzSelect-BwhRsTZd.css +1 -0
- package/dist/app/assets/PzSelect-CuDRkOrL.js +1 -0
- package/dist/app/assets/PzSelect-Del6HRlD.css +1 -0
- package/dist/app/assets/PzSelect.stories-BB855vvD.js +292 -0
- package/dist/app/assets/PzSkeleton-Cniu9lo6.js +1 -0
- package/dist/app/assets/{PzSkeleton.stories-Djp-bBqZ.js → PzSkeleton.stories-B2Am1ZYO.js} +2 -2
- package/dist/app/assets/PzStatus-C3v_r0Oj.js +1 -0
- package/dist/app/assets/{PzStatus.stories-BZ2XwRJs.js → PzStatus.stories-mQSY87YP.js} +2 -2
- package/dist/app/assets/PzTable-Bwa8_IhX.js +1 -0
- package/dist/app/assets/{PzTable.stories-C76ZN_A5.js → PzTable.stories-95TCj8y6.js} +3 -3
- package/dist/app/assets/{PzTabs.stories-DHf6EZU7.js → PzTabs.stories-n-w_IPjO.js} +5 -5
- package/dist/app/assets/PzTag-DkreR1ah.js +1 -0
- package/dist/app/assets/{PzTag.stories-BIrmr98f.js → PzTag.stories-B3pQ3jt7.js} +2 -2
- package/dist/app/assets/PzText-REfIJddB.js +1 -0
- package/dist/app/assets/{PzText.stories-Cr6TBVe6.js → PzText.stories-735Z3n9m.js} +8 -8
- package/dist/app/assets/PzTextClamp.stories-DeNGHabI.js +149 -0
- package/dist/app/assets/{PzTextarea.stories--ghqzz2f.js → PzTextarea.stories-CnHN5KKO.js} +3 -3
- package/dist/app/assets/{PzValidatorXSS.stories-zCaJ6Q__.js → PzValidatorXSS.stories-BwMdWW4N.js} +3 -3
- package/dist/app/assets/{Spacing-B5TnfKCB.css → Spacing-DDiZ9XB6.css} +1 -1
- package/dist/app/assets/{Spacing.stories-Dzeg7Tfn.js → Spacing.stories-DDQc5HL2.js} +29 -2
- package/dist/app/assets/Typography.stories-DvalSfqI.js +47 -0
- package/dist/app/assets/{WithTooltip-65CFNBJE-C0efi5Yj.js → WithTooltip-65CFNBJE-DkkeYwH0.js} +2 -2
- package/dist/app/assets/_plugin-vue_export-helper-DlAUqK2U.js +1 -0
- package/dist/app/assets/floating-vue-BNQ4rNf7.js +1 -0
- package/dist/app/assets/floating-vue-Bvgx7aQ5.js +1 -0
- package/dist/app/assets/{formatter-EIJCOSYU-Noau93iy.js → formatter-EIJCOSYU-DcIAKjRL.js} +1 -1
- package/dist/app/assets/iframe-4qk0Ss25.css +1 -0
- package/dist/app/assets/{iframe-Ckq2fQkL.js → iframe-BfW4-zQw.js} +141 -141
- package/dist/app/assets/index-02P5Hwc1.js +1 -0
- package/dist/app/assets/{syntaxhighlighter-OH4MV7E3-ByOORGJm.js → syntaxhighlighter-OH4MV7E3-Ceel2kqU.js} +3 -3
- package/dist/app/assets/text-clamp.esm-BHxuNfNm.js +1 -0
- package/dist/app/iframe.html +81 -76
- package/dist/app/index.json +1 -1
- package/dist/app/project.json +1 -1
- package/dist/app/sb-manager/globals-runtime.js +1 -1
- package/dist/components/Actions/PzCopyToClipboard/PzCopyToClipboard.vue.d.ts +33 -0
- package/dist/components/Actions/PzCopyToClipboard/index.d.ts +2 -0
- package/dist/components/Actions/PzCopyToClipboard/types.d.ts +17 -0
- package/dist/components/Actions/PzLink/configs.d.ts +1 -1
- package/dist/components/Display/PzClamp/PzClamp.vue.d.ts +8 -0
- package/dist/components/Display/PzClamp/index.d.ts +2 -0
- package/dist/components/Display/PzClamp/types.d.ts +7 -0
- package/dist/components/Display/PzDate/PzDate.vue.d.ts +5 -0
- package/dist/components/Display/PzDate/index.d.ts +2 -0
- package/dist/components/Display/PzDate/types.d.ts +5 -0
- package/dist/components/Display/PzDateRange/PzDateRange.vue.d.ts +9 -0
- package/dist/components/Display/PzDateRange/constants.d.ts +1 -0
- package/dist/components/Display/PzDateRange/index.d.ts +2 -0
- package/dist/components/Display/PzDateRange/types.d.ts +16 -0
- package/dist/components/Display/PzLoader/PzLoader.vue.d.ts +7 -0
- package/dist/components/Display/PzLoader/index.d.ts +2 -0
- package/dist/components/Display/PzLoader/types.d.ts +6 -0
- package/dist/components/Form/PzInput/PzInput.vue.d.ts +1 -1
- package/dist/components/Form/PzMultiSelect/PzMultiSelect.vue.d.ts +44 -0
- package/dist/components/Form/PzMultiSelect/constants.d.ts +1 -0
- package/dist/components/Form/PzMultiSelect/index.d.ts +2 -0
- package/dist/components/Form/PzMultiSelect/types.d.ts +22 -0
- package/dist/components/Form/PzSelect/PzSelect.vue.d.ts +42 -0
- package/dist/components/Form/PzSelect/configs.d.ts +1 -0
- package/dist/components/Form/PzSelect/constants.d.ts +1 -0
- package/dist/components/Form/PzSelect/index.d.ts +2 -0
- package/dist/components/Form/PzSelect/types.d.ts +22 -0
- package/dist/components/Form/shared/types.d.ts +7 -0
- package/dist/components/Navigation/PzListNav/PzListNav.vue.d.ts +15 -0
- package/dist/components/Navigation/PzListNav/index.d.ts +4 -0
- package/dist/components/Navigation/PzListNav/types.d.ts +9 -0
- package/dist/components/Navigation/shared/configs.d.ts +2 -0
- package/dist/components/Navigation/shared/constants.d.ts +8 -0
- package/dist/components/Popups/PzHint/PzHint.vue.d.ts +1 -1
- package/dist/components/Popups/PzInfoHint/PzInfoHint.vue.d.ts +1 -1
- package/dist/components/Popups/PzModal/PzModal.vue.d.ts +1 -1
- package/dist/components/Text/PzArrayClamp/PzArrayClamp.vue.d.ts +1 -1
- package/dist/components/Text/PzTextClamp/PzTextClamp.vue.d.ts +3 -3
- package/dist/index.d.ts +8 -0
- package/dist/package.json +1 -1
- package/dist/prozorro-ui.cjs +15 -15
- package/dist/prozorro-ui.js +8669 -7906
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/styles/_spacing.scss +30 -4
- package/dist/app/assets/PzAccordion-CTihyZc5.js +0 -1
- package/dist/app/assets/PzAccordionTable.stories-CVSn3lrC.js +0 -275
- package/dist/app/assets/PzBtn-Bz2NPCiD.js +0 -1
- package/dist/app/assets/PzCheckbox-DDIj_TyE.js +0 -1
- package/dist/app/assets/PzHint-BhuDfy-l.js +0 -1
- package/dist/app/assets/PzInfoHint-C-UyP8PR.js +0 -1
- package/dist/app/assets/PzLabel-jmQOAHGo.js +0 -1
- package/dist/app/assets/PzLink-CwtmibRx.js +0 -1
- package/dist/app/assets/PzPagination.stories-D_qRevIg.js +0 -83
- package/dist/app/assets/PzSkeleton-BMyhdGXq.js +0 -1
- package/dist/app/assets/PzStatus-rctea0Gb.js +0 -1
- package/dist/app/assets/PzTable-CzfehTN7.js +0 -1
- package/dist/app/assets/PzTag-DudHfisQ.js +0 -1
- package/dist/app/assets/PzText-BOcxbzaG.js +0 -1
- package/dist/app/assets/PzTextClamp.stories-CR0IRYLS.js +0 -149
- package/dist/app/assets/Typography.stories-GZEYS8Ny.js +0 -47
- package/dist/app/assets/floating-vue-D0dcONsr.js +0 -1
- package/dist/app/assets/iframe-B97zFSkg.css +0 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import{r as e,w as m}from"./iframe-BfW4-zQw.js";import{P as v}from"./PzText-REfIJddB.js";import{P as s}from"./PzPagination-DoBWX1Bo.js";import"./preload-helper-C1FmrZbK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./PzIcon-4heVmbY5.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
|
+
`);return`<script setup lang="ts">
|
|
3
|
+
import { ref } from "vue";
|
|
4
|
+
const currentPage = ref(${a.modelValue});
|
|
5
|
+
${b}
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<PzPagination
|
|
9
|
+
${t}
|
|
10
|
+
/>
|
|
11
|
+
</template>`},h={title:"Components/Navigation/PzPagination",component:s,parameters:{docs:{description:{component:"Use `PzPagination` for navigating paginated content. The component shows prev/next arrows, the first and last page, a window of pages around the current, and collapsing dots for large ranges."},source:{transform:(a,t)=>f(t.args??h.args)}}},args:{modelValue:1,total:1e3,perPage:10,radius:l},argTypes:{modelValue:{control:{type:"number",min:1},description:"Current active page (use with `v-model`)."},total:{control:{type:"number",min:0},description:"Total number of items."},perPage:{control:{type:"number",min:1},description:"Number of items per page."},radius:{control:{type:"number",min:1,max:5},description:"Number of page buttons shown on each side of the current page."}},render:a=>({components:{pzPagination:s,pzText:v},setup(){const t=e(a.modelValue),r=e(1),c=e(z),g=e(y),d=e(P);return m(()=>a.modelValue,u=>{t.value=u}),{args:a,page:t,pageFirst:r,pageMiddle:c,pageLast:g,pageFew:d}},template:`
|
|
12
|
+
<div class="pz-pagination-story">
|
|
13
|
+
<section class="pz-pagination-story-board">
|
|
14
|
+
<div class="pz-pagination-story-header">
|
|
15
|
+
<div>
|
|
16
|
+
<span class="pz-pagination-story-eyebrow">Component API</span>
|
|
17
|
+
<pz-text variant="h4-bold">Page navigation</pz-text>
|
|
18
|
+
</div>
|
|
19
|
+
<span class="pz-pagination-story-chip">page {{ page }} / {{ Math.ceil(args.total / args.perPage) }}</span>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<div class="pz-pagination-story-preview">
|
|
23
|
+
<div class="pz-pagination-story-current">
|
|
24
|
+
<span class="pz-pagination-story-current-label">Current page:</span>
|
|
25
|
+
<strong class="pz-pagination-story-current-value">{{ page }}</strong>
|
|
26
|
+
</div>
|
|
27
|
+
<pz-pagination
|
|
28
|
+
v-model="page"
|
|
29
|
+
:total="args.total"
|
|
30
|
+
:per-page="args.perPage"
|
|
31
|
+
:radius="args.radius"
|
|
32
|
+
/>
|
|
33
|
+
</div>
|
|
34
|
+
</section>
|
|
35
|
+
|
|
36
|
+
<section class="pz-pagination-story-gallery">
|
|
37
|
+
<div class="pz-pagination-story-header">
|
|
38
|
+
<div>
|
|
39
|
+
<span class="pz-pagination-story-eyebrow">States</span>
|
|
40
|
+
<pz-text variant="h4-bold">Page position variants</pz-text>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<div class="pz-pagination-story-grid">
|
|
45
|
+
<article class="pz-pagination-story-card">
|
|
46
|
+
<p class="pz-pagination-story-card-label">First page — right dots visible</p>
|
|
47
|
+
<div class="pz-pagination-story-current">
|
|
48
|
+
<span class="pz-pagination-story-current-label">Current page:</span>
|
|
49
|
+
<strong class="pz-pagination-story-current-value">{{ pageFirst }}</strong>
|
|
50
|
+
</div>
|
|
51
|
+
<pz-pagination v-model="pageFirst" :total="1000" :per-page="10" />
|
|
52
|
+
</article>
|
|
53
|
+
|
|
54
|
+
<article class="pz-pagination-story-card">
|
|
55
|
+
<p class="pz-pagination-story-card-label">Middle page — both dots visible</p>
|
|
56
|
+
<div class="pz-pagination-story-current">
|
|
57
|
+
<span class="pz-pagination-story-current-label">Current page:</span>
|
|
58
|
+
<strong class="pz-pagination-story-current-value">{{ pageMiddle }}</strong>
|
|
59
|
+
</div>
|
|
60
|
+
<pz-pagination v-model="pageMiddle" :total="1000" :per-page="10" />
|
|
61
|
+
</article>
|
|
62
|
+
|
|
63
|
+
<article class="pz-pagination-story-card">
|
|
64
|
+
<p class="pz-pagination-story-card-label">Last page — left dots visible</p>
|
|
65
|
+
<div class="pz-pagination-story-current">
|
|
66
|
+
<span class="pz-pagination-story-current-label">Current page:</span>
|
|
67
|
+
<strong class="pz-pagination-story-current-value">{{ pageLast }}</strong>
|
|
68
|
+
</div>
|
|
69
|
+
<pz-pagination v-model="pageLast" :total="1000" :per-page="10" />
|
|
70
|
+
</article>
|
|
71
|
+
|
|
72
|
+
<article class="pz-pagination-story-card">
|
|
73
|
+
<p class="pz-pagination-story-card-label">Few pages — no dots</p>
|
|
74
|
+
<div class="pz-pagination-story-current">
|
|
75
|
+
<span class="pz-pagination-story-current-label">Current page:</span>
|
|
76
|
+
<strong class="pz-pagination-story-current-value">{{ pageFew }}</strong>
|
|
77
|
+
</div>
|
|
78
|
+
<pz-pagination v-model="pageFew" :total="50" :per-page="10" />
|
|
79
|
+
</article>
|
|
80
|
+
</div>
|
|
81
|
+
</section>
|
|
82
|
+
</div>
|
|
83
|
+
`})},n={};var o,i,p;n.parameters={...n.parameters,docs:{...(o=n.parameters)==null?void 0:o.docs,source:{originalSource:"{}",...(p=(i=n.parameters)==null?void 0:i.docs)==null?void 0:p.source}}};const E=["Playground"];export{n as Playground,E as __namedExportsOrder,h as default};
|
package/dist/app/assets/{PzPriceFormat.stories-Clj4FRWT.js → PzPriceFormat.stories-BUxyBQoC.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-REfIJddB.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iframe-BfW4-zQw.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>
|
|
@@ -86,4 +86,4 @@ import{l as p}from"./lodash-CdDiHlzQ.js";import{P as c}from"./PzText-BOcxbzaG.js
|
|
|
86
86
|
</div>
|
|
87
87
|
\`
|
|
88
88
|
})
|
|
89
|
-
}`,...(l=(a=i.parameters)==null?void 0:a.docs)==null?void 0:l.source}}};const
|
|
89
|
+
}`,...(l=(a=i.parameters)==null?void 0:a.docs)==null?void 0:l.source}}};const z=["Usage"];export{i as Usage,z as __namedExportsOrder,P as default};
|
package/dist/app/assets/{PzRadioGroup.stories-o8HE47Hq.js → PzRadioGroup.stories-BniR4fVs.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as w,e as
|
|
1
|
+
import{d as w,e as i,F as k,A as S,f as b,o as n,k as p,l as g,E as _,t as C,J as v,y as R,r as f,w as O}from"./iframe-BfW4-zQw.js";import{P as $}from"./PzLabel-BGjTUIxv.js";import{P as L}from"./PzText-REfIJddB.js";import{_ as B}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./preload-helper-C1FmrZbK.js";const N=["aria-disabled"],q=["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,q))),128))],10,N))}}),z=B(c,[["__scopeId","data-v-1a5a6243"]]);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:L},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">
|
|
@@ -127,4 +127,4 @@ const selectedValue = ref("two");
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
}`,...(x=(P=u.parameters)==null?void 0:P.docs)==null?void 0:x.source}}};const
|
|
130
|
+
}`,...(x=(P=u.parameters)==null?void 0:P.docs)==null?void 0:x.source}}};const Q=["Playground"];export{u as Playground,Q as __namedExportsOrder,E as default};
|
package/dist/app/assets/{PzRouterLink.stories-Dc_EnCBz.js → PzRouterLink.stories-DXaqIXWs.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as g,
|
|
1
|
+
import{d as g,H as v,B as k,D as n,u as s,R as z,o as y,z as x,I as P,l as u,J as w,g as R,K as _}from"./iframe-BfW4-zQw.js";import{p as L,a as S}from"./configs-DshpCAYO.js";import{_ as V}from"./PzIcon-4heVmbY5.js";import{P as T}from"./PzText-REfIJddB.js";import{P as $}from"./PzLink-PMftGlCf.js";import"./preload-helper-C1FmrZbK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const l=g({name:"PzRouterLink",inheritAttrs:!1,__name:"PzRouterLink",props:{to:{},replace:{type:Boolean,default:!1},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}},setup(e){const t=e,o=v(),r=(a,p)=>{t.disabled||t.target!=="_self"||p(a)};return(a,p)=>(y(),k(s(z),{custom:"",to:t.to,replace:t.replace},{default:n(({href:m,navigate:h})=>[x(s($),w(s(o),{href:m,variant:t.variant,target:t.target,rel:t.rel,disabled:t.disabled,inline:t.inline,bold:t.bold,italic:t.italic,"line-through":t.lineThrough,onClick:b=>r(b,h)}),P({default:n(()=>[u(a.$slots,"default")]),_:2},[a.$slots.prefix?{name:"prefix",fn:n(()=>[u(a.$slots,"prefix")]),key:"0"}:void 0,a.$slots.suffix?{name:"suffix",fn:n(()=>[u(a.$slots,"suffix")]),key:"1"}:void 0]),1040,["href","variant","target","rel","disabled","inline","bold","italic","line-through","onClick"])]),_:3},8,["to","replace"]))}});l.__docgenInfo=Object.assign({displayName:l.name??l.__name},{name:"PzRouterLink",exportName:"default",displayName:"PzRouterLink",description:"",tags:{},props:[{name:"to",required:!0,type:{name:"PzRouterLinkTo"}},{name:"replace",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"variant",defaultValue:{func:!1,value:'"primary"'}},{name:"target",defaultValue:{func:!1,value:'"_self"'}},{name:"rel",defaultValue:{func:!1,value:"undefined"}},{name:"disabled",defaultValue:{func:!1,value:"false"}},{name:"inline",defaultValue:{func:!1,value:"true"}},{name:"bold",defaultValue:{func:!1,value:"false"}},{name:"italic",defaultValue:{func:!1,value:"false"}},{name:"lineThrough",defaultValue:{func:!1,value:"false"}}],slots:[{name:"prefix"},{name:"default"},{name:"suffix"}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Actions/PzRouterLink/PzRouterLink.vue"]});const A=e=>{const o=[`to="${typeof e.to=="string"?e.to:JSON.stringify(e.to)}"`,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,e.replace?':replace="true"':null].filter(a=>!!a).join(" "),r=[e.showPrefix?` <template #prefix>
|
|
2
2
|
<PzIcon name="arrow_back" size="16" />
|
|
3
3
|
</template>`:null,` ${e.label}`,e.showSuffix?` <template #suffix>
|
|
4
4
|
<PzIcon name="arrow_forward" size="16" />
|
|
@@ -7,7 +7,7 @@ import{d as g,x as v,i as k,j as n,y as s,R as z,o as y,q as x,z as P,l as u,A a
|
|
|
7
7
|
${r.join(`
|
|
8
8
|
`)}
|
|
9
9
|
</PzRouterLink>
|
|
10
|
-
</template>`},B={title:"Components/Actions/PzRouterLink",component:l,parameters:{prototype:{caption:"Router-aware link component",note:"Use `PzRouterLink` for in-app navigation with vue-router while keeping the same visual API as `PzLink`."},docs:{description:{component:"Use `PzRouterLink` when navigation should stay inside a Vue Router application without forcing a full page reload. It wraps `PzLink` and forwards the same visual props and slots."},source:{transform:(e,t)
|
|
10
|
+
</template>`},B={title:"Components/Actions/PzRouterLink",component:l,parameters:{prototype:{caption:"Router-aware link component",note:"Use `PzRouterLink` for in-app navigation with vue-router while keeping the same visual API as `PzLink`."},docs:{description:{component:"Use `PzRouterLink` when navigation should stay inside a Vue Router application without forcing a full page reload. It wraps `PzLink` and forwards the same visual props and slots."},source:{transform:(e,t)=>A(t.args??B.args)}}},args:{to:"/tenders/active",variant:"primary",target:"_self",disabled:!1,inline:!0,bold:!1,italic:!1,lineThrough:!1,replace:!1,label:"Open active tenders",showPrefix:!1,showSuffix:!0},argTypes:{to:{control:"text",description:"Vue Router target location."},variant:{control:"inline-radio",options:S,description:"Visual link treatment."},target:{control:"select",options:L,description:"Anchor target attribute. `_self` keeps router navigation enabled."},disabled:{control:"boolean",description:"Prevents navigation and applies disabled styling."},inline:{control:"boolean",description:"Renders inline-flex or block flex layout."},bold:{control:"boolean",description:"Applies stronger text weight."},italic:{control:"boolean",description:"Applies italic text style."},lineThrough:{control:"boolean",description:"Adds line-through decoration to the content."},replace:{control:"boolean",description:"Uses router replace navigation instead of push."},label:{control:"text",description:"Slot content preview text.",table:{category:"Slots"}},showPrefix:{control:"boolean",description:"Shows a prefix icon slot in the preview.",table:{category:"Slots"}},showSuffix:{control:"boolean",description:"Shows a suffix icon slot in the preview.",table:{category:"Slots"}}},render:e=>({components:{pzRouterLink:l,pzIcon:V,pzText:T},setup(){const t=_(),o=R(()=>t.fullPath);return{args:e,currentPath:o}},template:`
|
|
11
11
|
<div class="pz-link-story">
|
|
12
12
|
<section class="pz-link-story-board">
|
|
13
13
|
<div class="pz-link-story-header">
|
|
@@ -51,4 +51,4 @@ ${r.join(`
|
|
|
51
51
|
</div>
|
|
52
52
|
</section>
|
|
53
53
|
</div>
|
|
54
|
-
`})},i={};var c,f,d;i.parameters={...i.parameters,docs:{...(c=i.parameters)==null?void 0:c.docs,source:{originalSource:"{}",...(d=(f=i.parameters)==null?void 0:f.docs)==null?void 0:d.source}}};const
|
|
54
|
+
`})},i={};var c,f,d;i.parameters={...i.parameters,docs:{...(c=i.parameters)==null?void 0:c.docs,source:{originalSource:"{}",...(d=(f=i.parameters)==null?void 0:f.docs)==null?void 0:d.source}}};const J=["Playground"];export{i as Playground,J as __namedExportsOrder,B as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as a,w as p,
|
|
1
|
+
import{r as a,w as p,a0 as y}from"./iframe-BfW4-zQw.js";import{P as f}from"./PzText-REfIJddB.js";import"./preload-helper-C1FmrZbK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const g=["auto","instant","smooth"],b=2e3,z="pz-scroll-to-highlight",S="smooth",c=t=>typeof t=="number"?{offsetTop:t}:t??{},m=t=>{if(typeof window>"u"||typeof document>"u")return null;if(typeof t=="number")return t;const o=typeof t=="string"?document.querySelector(t):t instanceof HTMLElement?t:null;return o?window.scrollY+o.getBoundingClientRect().top:null},d=(t,o)=>{if(!t||typeof window>"u")return;const s=o.highlightClassName??z,e=o.highlightDuration??b;s&&(t.classList.add(s),window.setTimeout(()=>{t.classList.remove(s)},e))};class r{static moveById(o,s){if(typeof document>"u")return!1;const e=document.getElementById(o);if(!e)return!1;const n=r.moveToElement(e,s);return n&&d(e,c(s)),n}static moveToTop(o){return r.moveTo(0,o)}static moveTo(o,s){if(typeof window>"u")return!1;const e=c(s);return window.scrollTo({top:Math.max(o-(e.offsetTop??0),0),left:0,behavior:e.behavior??S}),!0}static moveByQuerySelector(o,s){if(typeof document>"u")return!1;const e=document.querySelector(o);if(!e)return!1;const n=r.moveToElement(e,s);return n&&d(e,c(s)),n}static moveToElement(o,s){const e=m(o);return e===null?!1:r.moveTo(e,s)}static move(o,s){const e=m(o);return e===null?!1:r.moveTo(e,s)}}const T=24,P="100vh",x=t=>{const o=[t.behavior!=="smooth"?`behavior: "${t.behavior}"`:null,t.offsetTop!==T?`offsetTop: ${t.offsetTop}`:null].filter(e=>!!e).join(", ");return`<script setup lang="ts">
|
|
2
2
|
import { PzScrollTo } from "@prozorro/prozorro-ui";
|
|
3
3
|
|
|
4
4
|
const scrollToTenderDocuments = (): void => {
|
|
@@ -78,4 +78,4 @@ const scrollToTenderDocuments = (): void => {
|
|
|
78
78
|
</article>
|
|
79
79
|
</section>
|
|
80
80
|
</div>
|
|
81
|
-
`})},i={};var u,h,v;i.parameters={...i.parameters,docs:{...(u=i.parameters)==null?void 0:u.docs,source:{originalSource:"{}",...(v=(h=i.parameters)==null?void 0:h.docs)==null?void 0:v.source}}};const
|
|
81
|
+
`})},i={};var u,h,v;i.parameters={...i.parameters,docs:{...(u=i.parameters)==null?void 0:u.docs,source:{originalSource:"{}",...(v=(h=i.parameters)==null?void 0:h.docs)==null?void 0:v.source}}};const D=["Playground"];export{i as Playground,D as __namedExportsOrder,L as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{P as p}from"./PzText-REfIJddB.js";import{d,B as m,D as y,C as h,o as z,k as a,l}from"./iframe-BfW4-zQw.js";import{_ as v}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./preload-helper-C1FmrZbK.js";const g={class:"pz-search-result-item-layout-surface"},b={class:"pz-search-result-item-layout-grid"},f={class:"pz-search-result-item-layout-main"},L={class:"pz-search-result-item-layout-aside"},o=d({name:"PzSearchResultItemLayout",__name:"PzSearchResultItemLayout",props:{as:{default:"li"}},setup(e){const t=e;return(s,R)=>(z(),m(h(t.as),{class:"pz-search-result-item-layout"},{default:y(()=>[a("div",g,[a("div",b,[a("div",f,[l(s.$slots,"first-col",{},void 0,!0)]),a("div",L,[l(s.$slots,"second-col",{},void 0,!0)])])])]),_:3}))}}),c=v(o,[["__scopeId","data-v-6b699261"]]);o.__docgenInfo=Object.assign({displayName:o.name??o.__name},{name:"PzSearchResultItemLayout",exportName:"default",displayName:"PzSearchResultItemLayout",description:"",tags:{},props:[{name:"as",required:!1,type:{name:"PzSearchResultItemLayoutTag"},defaultValue:{func:!1,value:'"li"'}}],slots:[{name:"first-col"},{name:"second-col"}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Layouts/PzSearchResultItemLayout/PzSearchResultItemLayout.vue"]});const _=["li","article","div"],I=[{id:"tenders",eyebrow:"Procurement results",title:"Tender search",resultLabel:"Знайдено більше 10 000 закупівель",sortLabel:"за замовчуванням",cards:[{id:"tender-1",title:"Вогнегасник ВП-5(з)",status:"Завершена",organization:'ДЕРЖАВНА УСТАНОВА "ЛУЦЬКИЙ СЛІДЧИЙ ІЗОЛЯТОР" • Луцьк',identifier:"ID: UA-2026-04-16-007213-a",metrics:[{id:"budget",label:"Очікувана вартість",value:"4 830,00 UAH",accent:"success"}]},{id:"tender-2",title:'Електрична енергія, без розподілу (постачальник "останньої надії")',status:"Підготовка угоди",organization:"Ратнівський дитячий садок №2 Ратнівської селищної ради • Ковельський р-н, селище міського типу Ратне",identifier:"ID: UA-2026-04-16-007209-a",metrics:[{id:"budget",label:"Очікувана вартість",value:"54 741,16 UAH",accent:"success"}]}]},{id:"qualifications",eyebrow:"Selection results",title:"Framework selection search",resultLabel:"Знайдено 470 відборів",sortLabel:"за замовчуванням",cards:[{id:"selection-1",title:"33730000-6 Офтальмологічні вироби та коригувальні лінзи",status:"Активний до 5 бер. 23:00",organization:"",identifier:"ID: UA-F-2026-04-06-000001",metrics:[{id:"clarification",label:"Уточнення до:",value:"20 квіт. 23:00"},{id:"published",label:"Оголошено:",value:"6 квіт. 2026"}]},{id:"selection-2",title:"33650000-1 Загальні протиінфекційні засоби для системного застосування",status:"Активний до 13 лют. 23:00",organization:"",identifier:"ID: UA-F-2026-03-17-000001",metrics:[{id:"clarification",label:"Уточнення до:",value:"31 бер. 23:00"},{id:"published",label:"Оголошено:",value:"17 бер. 2026"}]}]},{id:"plans",eyebrow:"Planning results",title:"Annual plan search",resultLabel:"Знайдено більше 10 000 планів",sortLabel:"за замовчуванням",cards:[{id:"plan-1",title:"ДК 021:2015 по коду: 22460000-2 Рекламні матеріали, каталоги товарів та посібники",status:"22460000-2: Рекламні матеріали, каталоги товарів та посібники",organization:"Державний ліцей з посиленою військово-фізичною підготовкою «Слобожанський»",identifier:"ID: UA-P-2026-04-16-009442-a",metrics:[{id:"budget",label:"Планова сума закупівлі",value:"700,00 UAH",accent:"success"},{id:"date",label:"Планова дата",value:"березень 2026"}]},{id:"plan-2",title:"Членський внесок за 2026 рік",status:"98100000-4: Послуги членських організацій",organization:"Ганнівська сільська рада Новоукраїнського району Кіровоградської області",identifier:"ID: UA-P-2026-04-16-009435-a",metrics:[{id:"budget",label:"Планова сума закупівлі",value:"3 572,00 UAH",accent:"success"},{id:"date",label:"Планова дата",value:"квітень 2026"}]}]}],S=e=>`<template>
|
|
2
2
|
<PzSearchResultItemLayout ${[e.as&&e.as!=="li"?`as="${e.as}"`:null].filter(s=>!!s).join(" ")}>
|
|
3
3
|
<template #first-col>
|
|
4
4
|
<a href="#">Result title</a>
|
|
@@ -14,7 +14,7 @@ import{_ as p,P as d}from"./PzText-BOcxbzaG.js";import{d as m,i as y,j as h,k as
|
|
|
14
14
|
</div>
|
|
15
15
|
</template>
|
|
16
16
|
</PzSearchResultItemLayout>
|
|
17
|
-
</template>`,P={title:"Components/Layouts/PzSearchResultItemLayout",component:c,parameters:{prototype:{caption:"Search result item layout",note:"Search-list card shell for procurement, selection, and planning results. The component owns spacing, card surface, and responsive column rhythm while consumers compose the inner content through slots."},docs:{description:{component:"Use `PzSearchResultItemLayout` as a structural primitive for search results with a wide content area and a compact metrics column. Fill the content through the `first-col` and `second-col` slots."},source:{transform:(e,t)=>S(t.args??P.args)}}},args:{as:"li"},argTypes:{as:{control:"select",options:_,description:"HTML tag used for the outer wrapper."}},render:e=>({components:{pzSearchResultItemLayout:c,pzText:
|
|
17
|
+
</template>`,P={title:"Components/Layouts/PzSearchResultItemLayout",component:c,parameters:{prototype:{caption:"Search result item layout",note:"Search-list card shell for procurement, selection, and planning results. The component owns spacing, card surface, and responsive column rhythm while consumers compose the inner content through slots."},docs:{description:{component:"Use `PzSearchResultItemLayout` as a structural primitive for search results with a wide content area and a compact metrics column. Fill the content through the `first-col` and `second-col` slots."},source:{transform:(e,t)=>S(t.args??P.args)}}},args:{as:"li"},argTypes:{as:{control:"select",options:_,description:"HTML tag used for the outer wrapper."}},render:e=>({components:{pzSearchResultItemLayout:c,pzText:p},setup(){return{args:e,searchResultGroups:I}},template:`
|
|
18
18
|
<section class="pz-search-result-layout-story">
|
|
19
19
|
<div class="pz-search-result-layout-story-hero">
|
|
20
20
|
<div>
|
|
@@ -109,4 +109,4 @@ import{_ as p,P as d}from"./PzText-BOcxbzaG.js";import{d as m,i as y,j as h,k as
|
|
|
109
109
|
</section>
|
|
110
110
|
</div>
|
|
111
111
|
</section>
|
|
112
|
-
`})},r={};var i,u,n;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:"{}",...(n=(u=r.parameters)==null?void 0:u.docs)==null?void 0:n.source}}};const
|
|
112
|
+
`})},r={};var i,u,n;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:"{}",...(n=(u=r.parameters)==null?void 0:u.docs)==null?void 0:n.source}}};const k=["Playground"];export{r as Playground,k as __namedExportsOrder,P as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.pz-select-story{display:grid;gap:var(--pz-space-24)}.pz-select-story-board,.pz-select-story-gallery{display:grid;gap:var(--pz-space-16);padding:var(--pz-space-24);border:1px solid color-mix(in srgb,var(--pz-color-grey-30) 72%,transparent);border-radius:var(--pz-space-24);background:radial-gradient(circle at top right,color-mix(in srgb,var(--pz-color-blue-50) 7%,transparent),transparent 34%),linear-gradient(180deg,color-mix(in srgb,var(--pz-color-white) 98%,transparent),color-mix(in srgb,var(--pz-color-grey-20) 92%,var(--pz-color-white)));box-shadow:0 18px 48px color-mix(in srgb,var(--pz-color-black-90) 7%,transparent),inset 0 1px color-mix(in srgb,var(--pz-color-white) 96%,transparent)}.pz-select-story-header{display:flex;align-items:start;justify-content:space-between;gap:var(--pz-space-16)}.pz-select-story-eyebrow,.pz-select-story-chip{display:inline-flex;align-items:center;width:fit-content;padding:var(--pz-space-8) var(--pz-space-16);border-radius:999px;background:color-mix(in srgb,var(--pz-color-blue-10) 92%,var(--pz-color-white));color:var(--pz-color-text-link-hover);font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase}.pz-select-story-preview{display:grid;gap:var(--pz-space-20);min-height:220px;padding:var(--pz-space-24);border:1px dashed color-mix(in srgb,var(--pz-color-grey-40) 70%,transparent);border-radius:var(--pz-space-20);background:linear-gradient(color-mix(in srgb,var(--pz-color-blue-50) 4%,transparent) 1px,transparent 1px),linear-gradient(90deg,color-mix(in srgb,var(--pz-color-blue-50) 4%,transparent) 1px,transparent 1px);background-size:28px 28px}.pz-select-story-stack{display:grid;gap:var(--pz-space-20);max-width:720px}.pz-select-story-inline-row{display:flex;align-items:center;gap:var(--pz-space-8);flex-wrap:wrap}.pz-select-story-value{color:var(--pz-color-text-secondary);font-size:var(--pz-font-size-14);font-weight:400;line-height:1.5}.pz-select-story-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--pz-space-16)}.pz-select-story-card{display:grid;gap:var(--pz-space-16);padding:var(--pz-space-20);border:1px solid color-mix(in srgb,var(--pz-color-grey-30) 74%,transparent);border-radius:var(--pz-space-20);background:color-mix(in srgb,var(--pz-color-white) 94%,transparent);box-shadow:0 12px 32px color-mix(in srgb,var(--pz-color-black-90) 5%,transparent)}.pz-select-story-note{color:var(--pz-color-text-secondary);font-size:var(--pz-font-size-12);font-weight:400;line-height:1.5}.pz-select-story-inline-card{align-content:start;min-height:220px}.pz-select-story-field-card{min-height:220px}.pz-select-story-disabled-card{background:linear-gradient(180deg,color-mix(in srgb,var(--pz-color-grey-20) 84%,var(--pz-color-white)),color-mix(in srgb,var(--pz-color-white) 98%,transparent))}@media (width <= 768px){.pz-select-story-grid{grid-template-columns:1fr}.pz-select-story-header{flex-direction:column}.pz-select-story-preview{min-height:auto}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as O,e as m,z as f,D as p,u as d,n as S,f as b,g as s,o as g,k as v,F as $,A as D,l as V,E as P,t as _,r as A,J as I}from"./iframe-BfW4-zQw.js";import{u as L}from"./index-02P5Hwc1.js";import{k as T}from"./floating-vue-Bvgx7aQ5.js";import{l as q}from"./lodash-CdDiHlzQ.js";import{_ as W}from"./PzIcon-4heVmbY5.js";import{P as R}from"./PzLabel-BGjTUIxv.js";import{_ as j}from"./_plugin-vue_export-helper-DlAUqK2U.js";const J=6,M=["id"],Z=["id","disabled","aria-controls","aria-expanded","aria-label"],G={class:"pz-select-trigger-text"},H=["id","aria-labelledby"],K=["id","aria-selected","disabled","onClick"],o=O({name:"PzSelect",__name:"PzSelect",props:{name:{},options:{},modelValue:{type:[String,Number,Boolean],default:void 0},label:{default:""},placeholder:{default:""},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},variant:{default:"field"},width:{default:void 0}},emits:["update:modelValue"],setup(l,{emit:x}){const a=l,k=x,y=A(null),{width:E}=L(y),i=s(()=>a.options.find(e=>q.isEqual(e.value,a.modelValue))),u=s(()=>a.variant==="field"),N=s(()=>{var e;return((e=i.value)==null?void 0:e.label)??a.placeholder}),w=s(()=>{var e;return a.label||((e=i.value)==null?void 0:e.label)||a.placeholder||a.name}),B=s(()=>{const e=Math.round(E.value);return!e||!u.value?{}:{inlineSize:`${String(e)}px`}}),c=e=>q.isEqual(e,a.modelValue),h=(e,r)=>e.id??`${a.name}-trigger-option-${String(r+1)}`,C=e=>({option:e,selected:c(e.value),disabled:!!e.disabled}),F=(e,r)=>{k("update:modelValue",e),r()};return(e,r)=>(g(),m("div",{id:l.name,class:b(["pz-select",{"is-field":u.value,"is-inline":!u.value}]),style:S({width:l.width})},[f(d(R),{label:a.label,for:l.name+"-trigger",required:a.required,disabled:a.disabled},{default:p(()=>[f(d(T),{class:"pz-select-dropdown",theme:"dropdown",placement:"bottom-start",container:"#"+l.name,distance:d(J),disabled:a.disabled},{default:p(({shown:n})=>[v("button",{id:l.name+"-trigger",ref_key:"triggerRef",ref:y,type:"button",class:b(["pz-select-trigger",{"is-open":n,"is-placeholder":!i.value}]),disabled:a.disabled,"aria-controls":l.name+"-menu","aria-expanded":n?"true":"false","aria-haspopup":"listbox","aria-label":a.label?void 0:w.value},[v("span",G,[V(e.$slots,"selected",{option:i.value,placeholder:a.placeholder},()=>[P(_(N.value),1)],!0)]),f(d(W),{name:"expand_more",size:"20",class:"pz-select-trigger-icon"})],10,Z)]),popper:p(({hide:n})=>[v("div",{id:l.name+"-menu",class:"pz-select-menu",style:S(B.value),role:"listbox","aria-labelledby":l.name+"-trigger"},[(g(!0),m($,null,D(a.options,(t,z)=>(g(),m("button",{id:h(t,z),key:h(t,z),type:"button",role:"option",class:b(["pz-select-option",{"is-active":c(t.value),"is-disabled":t.disabled}]),"aria-selected":c(t.value)?"true":"false",disabled:t.disabled,onClick:Q=>F(t.value,n)},[V(e.$slots,"default",I({ref_for:!0},C(t)),()=>[P(_(t.label),1)],!0)],10,K))),128))],12,H)]),_:3},8,["container","distance","disabled"])]),_:3},8,["label","for","required","disabled"])],14,M))}}),se=j(o,[["__scopeId","data-v-7b81ee27"]]);o.__docgenInfo=Object.assign({displayName:o.name??o.__name},{name:"PzSelect",exportName:"default",displayName:"PzSelect",description:"",tags:{},props:[{name:"name",required:!0,type:{name:"string"}},{name:"options",required:!0,type:{name:"Array",elements:[{name:"PzFormSelectOption"}]}},{name:"modelValue",required:!1,type:{name:"PzFormSelectValue"},defaultValue:{func:!1,value:"undefined"}},{name:"label",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}},{name:"placeholder",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}},{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:"variant",required:!1,type:{name:"PzSelectVariant"},defaultValue:{func:!1,value:'"field"'}},{name:"width",required:!1,type:{name:"string"},defaultValue:{func:!1,value:"undefined"}}],slots:[{name:"selected",scoped:!0,bindings:[{name:"option",title:"binding"},{name:"placeholder",title:"binding"}]},{name:"default",scoped:!0,bindings:[]}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Form/PzSelect/PzSelect.vue"]});export{se as P};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.pz-select[data-v-7b81ee27]{width:100%}.pz-select.is-inline[data-v-7b81ee27]{width:fit-content;max-width:100%}.pz-select.is-inline[data-v-7b81ee27] .pz-label{display:inline-flex;align-items:center;flex-wrap:wrap;gap:var(--pz-space-4);width:auto;max-width:100%}.pz-select.is-inline[data-v-7b81ee27] .pz-label-caption{color:var(--pz-color-text-secondary);font-size:var(--pz-font-size-14);font-weight:400;line-height:1.5}.pz-select-dropdown[data-v-7b81ee27]{width:100%}.pz-select.is-inline .pz-select-dropdown[data-v-7b81ee27]{width:auto;max-width:100%}.pz-select-trigger[data-v-7b81ee27]{display:inline-flex;align-items:center;justify-content:space-between;gap:var(--pz-space-8);width:100%;min-width:0;padding:10px var(--pz-space-12);border:1px solid var(--pz-color-blue-30);border-radius:5px;background:var(--pz-color-background-primary);color:var(--pz-color-text-primary);text-align:left;cursor:pointer;transition:border-color .16s ease,box-shadow .16s ease,color .16s ease,background-color .16s ease;font-size:var(--pz-font-size-14);font-weight:400;line-height:1.5}.pz-select-trigger[data-v-7b81ee27]:focus-visible{outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--pz-color-button-primary) 16%,transparent)}.pz-select-trigger[data-v-7b81ee27]:disabled{cursor:not-allowed}.pz-select-trigger-text[data-v-7b81ee27]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pz-select-trigger-icon[data-v-7b81ee27]{flex:0 0 auto;color:inherit;transition:transform .16s ease}.pz-select-trigger.is-open .pz-select-trigger-icon[data-v-7b81ee27]{transform:rotate(180deg)}.pz-select-menu[data-v-7b81ee27]{display:flex;flex-direction:column;inline-size:100%;max-inline-size:100%}.pz-select-option[data-v-7b81ee27]{display:flex;align-items:center;width:100%;min-width:0;padding:6px var(--pz-space-16);border:0;border-radius:0;background:transparent;color:var(--pz-color-text-primary);text-align:left;white-space:normal;overflow-wrap:anywhere;cursor:pointer;transition:background-color .16s ease,color .16s ease,font-weight .16s ease;font-size:var(--pz-font-size-14);font-weight:400;line-height:1.5}.pz-select-option[data-v-7b81ee27]:not(.is-active,.is-disabled):hover,.pz-select-option[data-v-7b81ee27]:not(.is-active,.is-disabled):focus-visible{background:var(--pz-color-blue-10);outline:none}.pz-select-option.is-active[data-v-7b81ee27]{background:var(--pz-color-blue-10);color:var(--pz-color-text-link-hover);font-size:var(--pz-font-size-14);font-weight:600;line-height:1.5}.pz-select-option.is-disabled[data-v-7b81ee27]{color:var(--pz-color-text-secondary);cursor:not-allowed}.pz-select.is-field .pz-select-trigger.is-placeholder[data-v-7b81ee27]{color:var(--pz-color-text-secondary)}.pz-select.is-field .pz-select-trigger[data-v-7b81ee27]:disabled{background:color-mix(in srgb,var(--pz-color-grey-20) 75%,var(--pz-color-white));color:var(--pz-color-text-secondary)}.pz-select.is-inline .pz-select-trigger[data-v-7b81ee27]{width:auto;max-width:100%;padding:0;border:0;border-radius:0;background:transparent;color:var(--pz-color-text-link);box-shadow:none}.pz-select.is-inline .pz-select-trigger[data-v-7b81ee27]:not(:disabled):hover,.pz-select.is-inline .pz-select-trigger[data-v-7b81ee27]:focus-visible{color:var(--pz-color-text-link-hover)}.pz-select.is-inline .pz-select-trigger.is-placeholder[data-v-7b81ee27]{color:var(--pz-color-text-link)}.pz-select.is-inline .pz-select-trigger[data-v-7b81ee27]:disabled{color:var(--pz-color-text-link-disabled)}.pz-select.is-inline .pz-select-menu[data-v-7b81ee27]{min-inline-size:168px}.pz-select .v-popper__inner{padding:0;border-radius:3px;border-color:var(--pz-color-blue-30);box-shadow:0 1px 8px #677b9359}
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
import{r as t,w as S}from"./iframe-BfW4-zQw.js";import{_ as h}from"./PzIcon-4heVmbY5.js";import{P as b}from"./PzText-REfIJddB.js";import{P as n}from"./PzSelect-CuDRkOrL.js";import"./preload-helper-C1FmrZbK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./index-02P5Hwc1.js";import"./floating-vue-Bvgx7aQ5.js";import"./lodash-CdDiHlzQ.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./PzLabel-BGjTUIxv.js";const O=["field","inline"],i=[{label:"Option 0",value:0},{label:"Option 1",value:1},{label:"Option 2",value:2},{label:"Option 3",value:3},{label:"Option 4",value:4},{label:"Option 5",value:5},{label:"Option 6",value:6},{label:"Option 7",value:7},{label:"Option 8",value:8},{label:"Option 9",value:9}],V=[{label:"Чернетка",value:"draft"},{label:"Активний тендер",value:"active"},{label:"Архів",value:"archive"}],P=[{label:"Пропозиція з коротким формулюванням",value:"short"},{label:"Пропозиція з довшою назвою для перевірки перенесення і ширини меню",value:"long"},{label:"Недоступний варіант",value:"disabled",disabled:!0}],r=3,k=e=>`<template>
|
|
2
|
+
<PzSelect
|
|
3
|
+
v-model="value"
|
|
4
|
+
${[`name="${e.name}"`,e.label?`label="${e.label}"`:null,e.placeholder?`placeholder="${e.placeholder}"`:null,e.variant!=="field"?`variant="${e.variant}"`:null,e.required?':required="true"':null,e.disabled?':disabled="true"':null].filter(a=>!!a).join(" ")}
|
|
5
|
+
:options="options"
|
|
6
|
+
/>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts">
|
|
10
|
+
import { ref } from "vue";
|
|
11
|
+
|
|
12
|
+
const options = [
|
|
13
|
+
{ label: "Option 0", value: 0 },
|
|
14
|
+
{ label: "Option 1", value: 1 },
|
|
15
|
+
{ label: "Option 2", value: 2 },
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
const value = ref(1);
|
|
19
|
+
<\/script>`,C={title:"Components/Form/PzSelect",component:n,parameters:{prototype:{caption:"Select component",note:"Refactored from the old app-level select into a public `PzSelect` with two preserved visual variants: boxed field and inline trigger."},docs:{description:{component:"Use `PzSelect` for single-choice dropdowns backed by primitive `value`s. The component replaces the old `config`/`slug` naming with `options`/`value`, keeps the two existing visual treatments as `field` and `inline`, and sizes its menu from the trigger width with `@vueuse/core`. Supports a default scoped slot for custom option rendering and a named `#selected` slot for custom trigger display."},source:{transform:(e,l)=>k(l.args??C.args)}}},args:{name:"pz-select-story",label:"Select",modelValue:3,options:i,placeholder:"enter value",required:!1,disabled:!1,variant:"field",width:void 0},argTypes:{name:{control:"text",description:"Stable field name used to derive trigger and menu ids."},label:{control:"text",description:"Visible label. For `inline`, it is rendered on the left of the trigger."},options:{control:!1,description:"Array of options with `label`, `value`, and optional `disabled` or `id`."},modelValue:{control:!1,description:"Currently selected primitive option value."},placeholder:{control:"text",description:"Text shown when no option is selected."},variant:{control:"inline-radio",options:O,description:"Boxed field or compact inline trigger."},required:{control:"boolean",description:"Adds the required indicator to the label."},disabled:{control:"boolean",description:"Disables the trigger and prevents the menu from opening."},width:{control:"text",description:"Optional explicit width applied to the component root."}},render:e=>({components:{pzSelect:n,pzText:b,pzIcon:h},setup(){const l=t(e.modelValue),a=t(void 0),z=t(r),f=t("active"),y=t(r),g=t(void 0),x=t("active");return S(()=>e.modelValue,w=>{l.value=w}),{args:e,denseOptions:P,fieldValue:z,filterValue:f,inlineValue:a,procurementOptions:i,slotInlineValue:x,slotOptionValue:y,slotSelectedValue:g,statusOptions:V,value:l}},template:`
|
|
20
|
+
<div class="pz-select-story">
|
|
21
|
+
<section class="pz-select-story-board">
|
|
22
|
+
<div class="pz-select-story-header">
|
|
23
|
+
<div>
|
|
24
|
+
<span class="pz-select-story-eyebrow">Component API</span>
|
|
25
|
+
<pz-text variant="h4-bold">Single select with preserved inline and field presentations</pz-text>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<span class="pz-select-story-chip">value-based API</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div class="pz-select-story-preview">
|
|
32
|
+
<div class="pz-select-story-stack">
|
|
33
|
+
<div class="pz-select-story-inline-row">
|
|
34
|
+
<pz-select
|
|
35
|
+
v-model="value"
|
|
36
|
+
:name="args.name + '-inline-demo'"
|
|
37
|
+
label="Select:"
|
|
38
|
+
placeholder="enter value"
|
|
39
|
+
variant="inline"
|
|
40
|
+
:options="args.options"
|
|
41
|
+
/>
|
|
42
|
+
|
|
43
|
+
<span class="pz-select-story-value">value: {{ value ?? "" }}</span>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<pz-select
|
|
47
|
+
v-model="value"
|
|
48
|
+
:name="args.name"
|
|
49
|
+
:label="args.label"
|
|
50
|
+
:placeholder="args.placeholder"
|
|
51
|
+
:variant="args.variant"
|
|
52
|
+
:required="args.required"
|
|
53
|
+
:disabled="args.disabled"
|
|
54
|
+
:options="args.options"
|
|
55
|
+
:width="args.width"
|
|
56
|
+
/>
|
|
57
|
+
|
|
58
|
+
<span class="pz-select-story-value">Current selected value: {{ value ?? "empty" }}</span>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</section>
|
|
62
|
+
|
|
63
|
+
<section class="pz-select-story-gallery">
|
|
64
|
+
<div class="pz-select-story-header">
|
|
65
|
+
<div>
|
|
66
|
+
<span class="pz-select-story-eyebrow">Patterns</span>
|
|
67
|
+
<pz-text variant="h4-bold">Usage example, density checks, and disabled state</pz-text>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<div class="pz-select-story-grid">
|
|
72
|
+
<article class="pz-select-story-card pz-select-story-inline-card">
|
|
73
|
+
<pz-select
|
|
74
|
+
v-model="inlineValue"
|
|
75
|
+
name="pz-select-inline-card"
|
|
76
|
+
label="Select:"
|
|
77
|
+
placeholder="enter value"
|
|
78
|
+
variant="inline"
|
|
79
|
+
:options="procurementOptions"
|
|
80
|
+
/>
|
|
81
|
+
|
|
82
|
+
<span class="pz-select-story-note">
|
|
83
|
+
Inline mode keeps the label and trigger on one line, matching the compact filter pattern from the reference screenshots.
|
|
84
|
+
</span>
|
|
85
|
+
</article>
|
|
86
|
+
|
|
87
|
+
<article class="pz-select-story-card pz-select-story-field-card">
|
|
88
|
+
<pz-select
|
|
89
|
+
v-model="fieldValue"
|
|
90
|
+
name="pz-select-field-card"
|
|
91
|
+
label="Select"
|
|
92
|
+
placeholder="enter value"
|
|
93
|
+
:options="procurementOptions"
|
|
94
|
+
/>
|
|
95
|
+
|
|
96
|
+
<span class="pz-select-story-note">
|
|
97
|
+
Field mode follows the rest of the form library: full-width trigger, muted placeholder, and dropdown width tied to the control.
|
|
98
|
+
</span>
|
|
99
|
+
</article>
|
|
100
|
+
|
|
101
|
+
<article class="pz-select-story-card">
|
|
102
|
+
<pz-text variant="body-semibold">Usage in a real filter row</pz-text>
|
|
103
|
+
|
|
104
|
+
<pz-select
|
|
105
|
+
v-model="filterValue"
|
|
106
|
+
name="pz-select-filter-card"
|
|
107
|
+
label="Статус:"
|
|
108
|
+
variant="inline"
|
|
109
|
+
:options="statusOptions"
|
|
110
|
+
/>
|
|
111
|
+
|
|
112
|
+
<span class="pz-select-story-note">
|
|
113
|
+
A realistic example: compact inline select for page-level filters where the selected status should stay visible without a boxed field.
|
|
114
|
+
</span>
|
|
115
|
+
</article>
|
|
116
|
+
|
|
117
|
+
<article class="pz-select-story-card pz-select-story-disabled-card">
|
|
118
|
+
<pz-select
|
|
119
|
+
model-value="disabled"
|
|
120
|
+
name="pz-select-dense-card"
|
|
121
|
+
label="Варіант з довгими назвами"
|
|
122
|
+
placeholder="Оберіть значення"
|
|
123
|
+
:options="denseOptions"
|
|
124
|
+
disabled
|
|
125
|
+
/>
|
|
126
|
+
|
|
127
|
+
<span class="pz-select-story-note">
|
|
128
|
+
Demonstrates long labels, disabled styling, and an unavailable option in the shared value-first option model.
|
|
129
|
+
</span>
|
|
130
|
+
</article>
|
|
131
|
+
</div>
|
|
132
|
+
</section>
|
|
133
|
+
|
|
134
|
+
<section class="pz-select-story-gallery">
|
|
135
|
+
<div class="pz-select-story-header">
|
|
136
|
+
<div>
|
|
137
|
+
<span class="pz-select-story-eyebrow">Slots</span>
|
|
138
|
+
<pz-text variant="h4-bold">Custom option and trigger rendering via scoped slots</pz-text>
|
|
139
|
+
</div>
|
|
140
|
+
<span class="pz-select-story-chip">scoped slots</span>
|
|
141
|
+
</div>
|
|
142
|
+
|
|
143
|
+
<div class="pz-select-story-grid">
|
|
144
|
+
<article class="pz-select-story-card">
|
|
145
|
+
<pz-text variant="body-semibold">#default slot — custom option row</pz-text>
|
|
146
|
+
|
|
147
|
+
<pz-select
|
|
148
|
+
v-model="slotOptionValue"
|
|
149
|
+
name="pz-select-slot-option"
|
|
150
|
+
label="With check icon"
|
|
151
|
+
placeholder="Choose an option"
|
|
152
|
+
:options="procurementOptions"
|
|
153
|
+
>
|
|
154
|
+
<template #default="{ option, selected }">
|
|
155
|
+
<pz-icon v-if="selected" name="check" size="16" />
|
|
156
|
+
<span style="flex:1">{{ option.label }}</span>
|
|
157
|
+
</template>
|
|
158
|
+
</pz-select>
|
|
159
|
+
|
|
160
|
+
<span class="pz-select-story-note">
|
|
161
|
+
The default slot receives <code>{ option, selected, disabled }</code> and replaces the option row content. Open the dropdown to see the checkmark next to the active item.
|
|
162
|
+
</span>
|
|
163
|
+
</article>
|
|
164
|
+
|
|
165
|
+
<article class="pz-select-story-card">
|
|
166
|
+
<pz-text variant="body-semibold">#selected slot — custom trigger text</pz-text>
|
|
167
|
+
|
|
168
|
+
<pz-select
|
|
169
|
+
v-model="slotSelectedValue"
|
|
170
|
+
name="pz-select-slot-selected"
|
|
171
|
+
label="With custom trigger"
|
|
172
|
+
placeholder="Choose a status"
|
|
173
|
+
:options="statusOptions"
|
|
174
|
+
>
|
|
175
|
+
<template #selected="{ option, placeholder }">
|
|
176
|
+
<span v-if="option" style="font-weight:600">→ {{ option.label }}</span>
|
|
177
|
+
<span v-else style="font-style:italic">{{ placeholder }}</span>
|
|
178
|
+
</template>
|
|
179
|
+
</pz-select>
|
|
180
|
+
|
|
181
|
+
<span class="pz-select-story-note">
|
|
182
|
+
The <code>#selected</code> slot receives <code>{ option, placeholder }</code> and controls the trigger button content. Here it renders an arrow prefix when a value is chosen and italic text when empty.
|
|
183
|
+
</span>
|
|
184
|
+
</article>
|
|
185
|
+
|
|
186
|
+
<article class="pz-select-story-card">
|
|
187
|
+
<pz-text variant="body-semibold">Both slots — inline variant</pz-text>
|
|
188
|
+
|
|
189
|
+
<div class="pz-select-story-inline-row">
|
|
190
|
+
<pz-select
|
|
191
|
+
v-model="slotInlineValue"
|
|
192
|
+
name="pz-select-slot-inline"
|
|
193
|
+
label="Status:"
|
|
194
|
+
variant="inline"
|
|
195
|
+
:options="statusOptions"
|
|
196
|
+
>
|
|
197
|
+
<template #selected="{ option, placeholder }">
|
|
198
|
+
<span>{{ option ? '● ' + option.label : placeholder }}</span>
|
|
199
|
+
</template>
|
|
200
|
+
|
|
201
|
+
<template #default="{ option, selected }">
|
|
202
|
+
<span style="flex:1">{{ option.label }}</span>
|
|
203
|
+
<pz-icon v-if="selected" name="check" size="16" />
|
|
204
|
+
</template>
|
|
205
|
+
</pz-select>
|
|
206
|
+
</div>
|
|
207
|
+
|
|
208
|
+
<span class="pz-select-story-note">
|
|
209
|
+
Both slots work in the inline variant. The <code>#selected</code> slot prepends a bullet to the active label; the <code>#default</code> slot adds a trailing checkmark inside the menu.
|
|
210
|
+
</span>
|
|
211
|
+
</article>
|
|
212
|
+
</div>
|
|
213
|
+
</section>
|
|
214
|
+
</div>
|
|
215
|
+
`})},o={parameters:{docs:{description:{story:"Interactive story for the refactored select. The preview shows the same `value` state in both variants, and the gallery documents filter usage, long labels, and disabled behavior."}}}},s={parameters:{docs:{description:{story:"PzSelect exposes a default scoped slot for each option row (`{ option, selected, disabled }`) and a named `#selected` slot for the trigger display (`{ option, placeholder }`). Both slots fall back to default rendering when unused."}}},render:()=>({components:{pzSelect:n,pzText:b,pzIcon:h},setup(){return{value:t(r),procurementOptions:i}},template:`
|
|
216
|
+
<div style="display:flex;flex-direction:column;gap:24px;max-width:320px">
|
|
217
|
+
<pz-text variant="body-semibold">Custom option slot + custom selected slot</pz-text>
|
|
218
|
+
|
|
219
|
+
<pz-select
|
|
220
|
+
v-model="value"
|
|
221
|
+
name="slots-demo"
|
|
222
|
+
label="Custom slots"
|
|
223
|
+
placeholder="Choose an option"
|
|
224
|
+
:options="procurementOptions"
|
|
225
|
+
>
|
|
226
|
+
<template #selected="{ option, placeholder }">
|
|
227
|
+
<span style="font-weight:600">{{ option ? option.label : placeholder }}</span>
|
|
228
|
+
</template>
|
|
229
|
+
|
|
230
|
+
<template #default="{ option, selected }">
|
|
231
|
+
<span style="flex:1">{{ option.label }}</span>
|
|
232
|
+
<pz-icon v-if="selected" name="check" size="16" />
|
|
233
|
+
</template>
|
|
234
|
+
</pz-select>
|
|
235
|
+
|
|
236
|
+
<span>Selected value: {{ value ?? "empty" }}</span>
|
|
237
|
+
</div>
|
|
238
|
+
`})};var p,c,d;o.parameters={...o.parameters,docs:{...(p=o.parameters)==null?void 0:p.docs,source:{originalSource:`{
|
|
239
|
+
parameters: {
|
|
240
|
+
docs: {
|
|
241
|
+
description: {
|
|
242
|
+
story: "Interactive story for the refactored select. The preview shows the same \`value\` state in both variants, and the gallery documents filter usage, long labels, and disabled behavior."
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}`,...(d=(c=o.parameters)==null?void 0:c.docs)==null?void 0:d.source}}};var u,m,v;s.parameters={...s.parameters,docs:{...(u=s.parameters)==null?void 0:u.docs,source:{originalSource:`{
|
|
247
|
+
parameters: {
|
|
248
|
+
docs: {
|
|
249
|
+
description: {
|
|
250
|
+
story: "PzSelect exposes a default scoped slot for each option row (\`{ option, selected, disabled }\`) and a named \`#selected\` slot for the trigger display (\`{ option, placeholder }\`). Both slots fall back to default rendering when unused."
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
render: () => ({
|
|
255
|
+
components: {
|
|
256
|
+
pzSelect: PzSelect,
|
|
257
|
+
pzText: PzText,
|
|
258
|
+
pzIcon: PzIcon
|
|
259
|
+
},
|
|
260
|
+
setup() {
|
|
261
|
+
const value = ref<PzFormSelectValue | undefined>(defaultFieldValue);
|
|
262
|
+
return {
|
|
263
|
+
value,
|
|
264
|
+
procurementOptions
|
|
265
|
+
};
|
|
266
|
+
},
|
|
267
|
+
template: \`
|
|
268
|
+
<div style="display:flex;flex-direction:column;gap:24px;max-width:320px">
|
|
269
|
+
<pz-text variant="body-semibold">Custom option slot + custom selected slot</pz-text>
|
|
270
|
+
|
|
271
|
+
<pz-select
|
|
272
|
+
v-model="value"
|
|
273
|
+
name="slots-demo"
|
|
274
|
+
label="Custom slots"
|
|
275
|
+
placeholder="Choose an option"
|
|
276
|
+
:options="procurementOptions"
|
|
277
|
+
>
|
|
278
|
+
<template #selected="{ option, placeholder }">
|
|
279
|
+
<span style="font-weight:600">{{ option ? option.label : placeholder }}</span>
|
|
280
|
+
</template>
|
|
281
|
+
|
|
282
|
+
<template #default="{ option, selected }">
|
|
283
|
+
<span style="flex:1">{{ option.label }}</span>
|
|
284
|
+
<pz-icon v-if="selected" name="check" size="16" />
|
|
285
|
+
</template>
|
|
286
|
+
</pz-select>
|
|
287
|
+
|
|
288
|
+
<span>Selected value: {{ value ?? "empty" }}</span>
|
|
289
|
+
</div>
|
|
290
|
+
\`
|
|
291
|
+
})
|
|
292
|
+
}`,...(v=(m=s.parameters)==null?void 0:m.docs)==null?void 0:v.source}}};const j=["Playground","WithSlots"];export{o as Playground,s as WithSlots,j as __namedExportsOrder,C as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as s,e as l,n as o,f as r,g as i,o as u}from"./iframe-BfW4-zQw.js";import{_ as d}from"./_plugin-vue_export-helper-DlAUqK2U.js";const e=s({name:"PzSkeleton",__name:"PzSkeleton",props:{width:{default:"100%"},height:{default:"16px"},radius:{default:"8px"},animated:{type:Boolean,default:!0}},setup(t){const a=t,n=i(()=>({width:a.width,height:a.height,borderRadius:a.radius}));return(p,m)=>(u(),l("div",{class:r(["pz-skeleton",{"pz-skeleton--static":!t.animated}]),style:o(n.value),"aria-hidden":"true"},null,6))}}),h=d(e,[["__scopeId","data-v-f3a7d77e"]]);e.__docgenInfo=Object.assign({displayName:e.name??e.__name},{name:"PzSkeleton",exportName:"default",displayName:"PzSkeleton",description:"",tags:{},props:[{name:"width",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'"100%"'}},{name:"height",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'"16px"'}},{name:"radius",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'"8px"'}},{name:"animated",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"true"}}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Display/PzSkeleton/PzSkeleton.vue"]});export{h as P};
|