@bethinkpl/design-system 26.2.2 → 26.2.4
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/design-system.umd.cjs +7 -7
- package/dist/design-system.umd.cjs.map +1 -1
- package/dist/storybook/favicon.svg +1 -0
- package/dist/storybook/index.html +165 -0
- package/dist/storybook/index.json +1 -0
- package/dist/storybook/nunito-sans-bold-italic.woff2 +0 -0
- package/dist/storybook/nunito-sans-bold.woff2 +0 -0
- package/dist/storybook/nunito-sans-italic.woff2 +0 -0
- package/dist/storybook/nunito-sans-regular.woff2 +0 -0
- package/dist/storybook/sb-addons/actions-1/manager-bundle.js +3 -0
- package/dist/storybook/sb-addons/actions-1/manager-bundle.js.LEGAL.txt +0 -0
- package/dist/storybook/sb-addons/controls-3/manager-bundle.js +394 -0
- package/dist/storybook/sb-addons/controls-3/manager-bundle.js.LEGAL.txt +0 -0
- package/dist/storybook/sb-addons/designs-2/register-panel-bundle.js +665 -0
- package/dist/storybook/sb-addons/designs-2/register-panel-bundle.js.LEGAL.txt +127 -0
- package/dist/storybook/sb-addons/storybook-6/manager-bundle.js +3 -0
- package/dist/storybook/sb-addons/storybook-6/manager-bundle.js.LEGAL.txt +0 -0
- package/dist/storybook/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +3 -0
- package/dist/storybook/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js.LEGAL.txt +0 -0
- package/dist/storybook/sb-addons/storysource-4/manager-bundle.js +3 -0
- package/dist/storybook/sb-addons/storysource-4/manager-bundle.js.LEGAL.txt +0 -0
- package/dist/storybook/sb-addons/viewport-5/manager-bundle.js +3 -0
- package/dist/storybook/sb-addons/viewport-5/manager-bundle.js.LEGAL.txt +0 -0
- package/dist/storybook/sb-common-assets/favicon.svg +1 -0
- package/dist/storybook/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/dist/storybook/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/dist/storybook/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/dist/storybook/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/dist/storybook/sb-manager/globals-module-info.js +1006 -0
- package/dist/storybook/sb-manager/globals-runtime.js +54400 -0
- package/dist/storybook/sb-manager/globals.js +48 -0
- package/dist/storybook/sb-manager/runtime.js +12089 -0
- package/dist/storybook/sb-preview/globals.js +33 -0
- package/dist/storybook/sb-preview/runtime.js +9498 -0
- package/dist/storybook/~design-system/lib/fonts/lato/lato-ext-300.woff2 +0 -0
- package/dist/storybook/~design-system/lib/fonts/lato/lato-ext-700.woff2 +0 -0
- package/dist/storybook/~design-system/lib/fonts/lato/lato-ext.woff2 +0 -0
- package/dist/storybook/~design-system/lib/fonts/lato/lato-latin-300.woff2 +0 -0
- package/dist/storybook/~design-system/lib/fonts/lato/lato-latin-700.woff2 +0 -0
- package/dist/storybook/~design-system/lib/fonts/lato/lato-latin.woff2 +0 -0
- package/docs/assets/{Banner-CrcVtTA6.js → Banner-CKP6QLq7.js} +1 -1
- package/docs/assets/{Banner.stories-DrJfhoQX.js → Banner.stories-CSclVk5l.js} +1 -1
- package/docs/assets/{BasicRichListItem-BGCsDKGm.js → BasicRichListItem-BrctvsYu.js} +1 -1
- package/docs/assets/{BasicRichListItem.stories-CoDsthG-.js → BasicRichListItem.stories-7iv3WcxV.js} +1 -1
- package/docs/assets/{Color-ERTF36HU-DQFMuB9T.js → Color-ERTF36HU-D12h-CxJ.js} +1 -1
- package/docs/assets/DatePicker-DJlkbpv1.js +2 -0
- package/docs/assets/{DatePicker.stories-SkK1UYle.js → DatePicker.stories-BB2cRdGS.js} +1 -1
- package/docs/assets/{DateRangePicker-CAPEY0y3.js → DateRangePicker-CSyiSZb3.js} +1 -1
- package/docs/assets/{DateRangePicker.stories-CrNDA1Lq.js → DateRangePicker.stories-_EiYHUQg.js} +1 -1
- package/docs/assets/{DocsRenderer-CFRXHY34-D8iWQ1SK.js → DocsRenderer-CFRXHY34-BipAnbdT.js} +5 -5
- package/docs/assets/GroupRichListItem-ByTKILI0.js +1 -0
- package/docs/assets/{GroupRichListItem.stories-DwQP_oqX.js → GroupRichListItem.stories-DMua_uKP.js} +1 -1
- package/docs/assets/{RichListItem.stories-BTMYgGxX.js → RichListItem.stories-DXC1qEaB.js} +1 -1
- package/docs/assets/{SelectionTile-Be2rbLr5.js → SelectionTile-BVM_pPTl.js} +1 -1
- package/docs/assets/{SelectionTile.stories-BPsTTXAB.js → SelectionTile.stories-CkRcSde_.js} +1 -1
- package/docs/assets/{ToggleButton-BehxPJAN.js → ToggleButton-DjWccfum.js} +1 -1
- package/docs/assets/{ToggleButton.stories-Dm-X2v07.js → ToggleButton.stories-gR198g__.js} +1 -1
- package/docs/assets/{iframe-BVrI2R6j.js → iframe-cb3rle_L.js} +5 -5
- package/docs/assets/{index-CVcbOGcI.js → index-C3EaQzPU.js} +1 -1
- package/docs/assets/{index-CwAYglRo.js → index-CV7uOb4R.js} +1 -1
- package/docs/assets/{preview-D0XepLBk.js → preview-CMJ18cUL.js} +2 -2
- package/docs/assets/{preview-CCF2FhdL.js → preview-buvoF0KJ.js} +1 -1
- package/docs/iframe.html +1 -1
- package/docs/project.json +1 -1
- package/lib/js/components/Banner/Banner.vue +3 -0
- package/lib/js/components/DatePickers/DatePicker/DatePicker.composables.ts +0 -1
- package/lib/js/components/RichList/RichListItem/RichListItem.vue +12 -5
- package/lib/js/components/Toggles/ToggleButton/ToggleButton.vue +1 -0
- package/package.json +1 -1
- package/.yarnrc.yml +0 -1
- package/docs/assets/DatePicker-DrPI8Qx8.js +0 -2
- package/docs/assets/GroupRichListItem-LQNLl-ci.js +0 -1
package/docs/iframe.html
CHANGED
|
@@ -510,7 +510,7 @@
|
|
|
510
510
|
</script>
|
|
511
511
|
<link rel="stylesheet" href="./preview.css">
|
|
512
512
|
|
|
513
|
-
<script type="module" crossorigin src="./assets/iframe-
|
|
513
|
+
<script type="module" crossorigin src="./assets/iframe-cb3rle_L.js"></script>
|
|
514
514
|
</head>
|
|
515
515
|
|
|
516
516
|
<body>
|
package/docs/project.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"generatedAt":
|
|
1
|
+
{"generatedAt":1732282016824,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":true,"hasStorybookEslint":true,"refCount":0,"testPackages":{"@types/jest":"29.5.13","@vue/vue3-jest":"29.2.2","jest":"29.7.0","jest-environment-jsdom":"29.7.0","ts-jest":"29.0.5"},"packageManager":{"type":"yarn","version":"1.22.22"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/vue3-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/vue3","portableStoriesFileCount":2,"storybookVersion":"8.3.4","storybookVersionSpecifier":"^8.3.4","language":"typescript","storybookPackages":{"@storybook/vue3":{"version":"8.3.4"},"@storybook/vue3-vite":{"version":"8.3.4"},"eslint-plugin-storybook":{"version":"0.8.0"},"storybook":{"version":"8.3.4"}},"addons":{"@storybook/addon-actions":{"version":"8.3.4"},"@storybook/addon-designs":{"version":"8.0.3"},"@storybook/addon-docs":{"version":"8.3.4"},"@storybook/addon-controls":{"version":"8.3.4"},"@storybook/addon-storysource":{"version":"8.3.4"},"@storybook/addon-viewport":{"version":"8.3.4"}}}
|
|
@@ -81,6 +81,9 @@
|
|
|
81
81
|
$self: &;
|
|
82
82
|
|
|
83
83
|
container-type: inline-size;
|
|
84
|
+
// We need to manually set width when using inline-size inside flex containers, otherwise it'll collapse to 0px width:
|
|
85
|
+
// https://stackoverflow.com/a/73980194
|
|
86
|
+
width: 100%;
|
|
84
87
|
|
|
85
88
|
&__inner {
|
|
86
89
|
border-radius: $radius-m;
|
|
@@ -62,7 +62,6 @@ export function initFlatpickr({
|
|
|
62
62
|
disableMobile: true,
|
|
63
63
|
positionElement: datePickerElement,
|
|
64
64
|
ignoredFocusElements: [datePickerElement],
|
|
65
|
-
appendTo: datePickerElement,
|
|
66
65
|
position: FLATPICKR_POSITIONS[props.calendarPosition],
|
|
67
66
|
defaultDate: defaultDates,
|
|
68
67
|
disable: props.disableDates,
|
|
@@ -7,11 +7,14 @@
|
|
|
7
7
|
<div v-if="hasMedia && isHorizontal" class="ds-richListItem__mediaHorizontal">
|
|
8
8
|
<slot name="media" />
|
|
9
9
|
</div>
|
|
10
|
-
<div
|
|
10
|
+
<div
|
|
11
|
+
v-if="isDraggable && hasDraggableHandler"
|
|
12
|
+
class="ds-richListItem__dragAndDrop"
|
|
13
|
+
:class="{ [draggableIconClassName]: !!draggableIconClassName }"
|
|
14
|
+
>
|
|
11
15
|
<ds-icon
|
|
12
16
|
:icon="ICONS.FA_BARS"
|
|
13
17
|
class="ds-richListItem__dragAndDropIcon"
|
|
14
|
-
:class="{ [draggableIconClassName]: !!draggableIconClassName }"
|
|
15
18
|
:size="
|
|
16
19
|
size === RICH_LIST_ITEM_SIZE.SMALL
|
|
17
20
|
? ICON_SIZES.XX_SMALL
|
|
@@ -436,12 +439,16 @@ $rich-list-item-media-horizontal-height: 80px;
|
|
|
436
439
|
color: $color-neutral-icon-weak;
|
|
437
440
|
}
|
|
438
441
|
|
|
439
|
-
&
|
|
440
|
-
|
|
442
|
+
&__dragAndDrop {
|
|
443
|
+
#{$root}__dragAndDropIcon {
|
|
444
|
+
color: $color-neutral-icon-weak;
|
|
445
|
+
}
|
|
441
446
|
|
|
442
447
|
&:hover {
|
|
443
|
-
color: $color-neutral-icon-weak-hovered;
|
|
444
448
|
cursor: grab;
|
|
449
|
+
#{$root}__dragAndDropIcon {
|
|
450
|
+
color: $color-neutral-icon-weak-hovered;
|
|
451
|
+
}
|
|
445
452
|
}
|
|
446
453
|
|
|
447
454
|
&:active {
|
|
@@ -316,6 +316,7 @@ $toggle-button-colors: (
|
|
|
316
316
|
justify-content: center;
|
|
317
317
|
outline: 6px solid transparent;
|
|
318
318
|
pointer-events: none;
|
|
319
|
+
position: relative;
|
|
319
320
|
transition: color ease-in-out $default-transition-time,
|
|
320
321
|
border-color ease-in-out $default-transition-time,
|
|
321
322
|
background-color ease-in-out $default-transition-time,
|
package/package.json
CHANGED
package/.yarnrc.yml
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
nodeLinker: node-modules
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./pl-Cy1N1vsP.js","./_commonjsHelpers-Chg3vePA.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{d as R,t as b,r as O,o as a,c as o,a as n,k as m,h as l,b as P,n as c,F as C,g as L,q as S,C as F,w as B,f as K}from"./vue.esm-bundler-CzUSCRPq.js";import{b as U}from"./Tile-ByPW4b0z.js";import{a as j,I as D,b as G}from"./Icon-CQ850_cO.js";import{_ as N}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{_ as v}from"./iframe-BVrI2R6j.js";const I={NEUTRAL:"neutral",WARNING:"warning"},f={DEFAULT:"default",DISABLED:"disabled",LOADING:"loading"},r={TOP:"top",TOP_LEFT:"top-left",TOP_RIGHT:"top-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right"},g={BOX:"box",TILE:"tile"},h={[r.BOTTOM_LEFT]:"below left",[r.BOTTOM_RIGHT]:"below right",[r.BOTTOM]:"below",[r.TOP_LEFT]:"above left",[r.TOP_RIGHT]:"above right",[r.TOP]:"above"};function z(e){return e.toLocaleDateString(void 0,{dateStyle:void 0,timeStyle:void 0,weekday:"long"})}function H(e){return e.toLocaleDateString(void 0,{dateStyle:"medium",timeStyle:void 0})}function A(e){return e.toLocaleDateString(void 0,{month:"short",day:"2-digit"})}const w=R({name:"DatePickerBox",components:{DsIcon:j},props:{isInteractive:{type:Boolean,default:!0},placeholder:{type:String,default:"Ustaw"},startDate:{type:Date,default:null},endDate:{type:Date,default:null},startIcon:{type:Object,default:null,validate:e=>e===null||Object.values(D).includes(b(e))},endIcon:{type:Object,default:null,validate:e=>e===null||Object.values(D).includes(b(e))},areIconsHiddenOnMobile:{type:Boolean,default:!1},state:{type:String||null,default:f.DEFAULT},color:{type:String,default:I.NEUTRAL},startDateEyebrowText:{type:String,default:""},endDateEyebrowText:{type:String,default:""},isOpen:{type:Boolean,default:!1}},data(){return{ICONS:Object.freeze(D),ICON_SIZES:Object.freeze(G),DATE_PICKER_STATES:Object.freeze(f),DATE_PICKER_COLORS:Object.freeze(I)}},computed:{startDateText(){return this.startDate?A(this.startDate):this.placeholder},endDateText(){return A(this.endDate)}}}),$={class:"ds-datePickerBox__dateWrapper"},W={key:0,class:"ds-datePickerBox__eyebrow"},X={class:"ds-datePickerBox__date"},Y={class:"ds-datePickerBox__dateText"},Z={class:"ds-datePickerBox__dateWrapper"},q={key:0,class:"ds-datePickerBox__eyebrow"},J={class:"ds-datePickerBox__date"},Q={class:"ds-datePickerBox__dateText"},x={key:1,class:"ds-datePickerBox__loader"};function ee(e,d,i,p,t,u){const s=O("ds-icon");return a(),o("div",{class:c(["ds-datePickerBox",{"-ds-disabled":e.state===e.DATE_PICKER_STATES.DISABLED,"-ds-loading":e.state===e.DATE_PICKER_STATES.LOADING,"-ds-interactive":e.isInteractive,"-ds-warning":e.color===e.DATE_PICKER_COLORS.WARNING,"-ds-neutral":e.color===e.DATE_PICKER_COLORS.NEUTRAL,"-ds-isOpen":e.isOpen}])},[n("div",{class:c(["ds-datePickerBox__widthWrapper",{"-ds-has-icon":e.startIcon,"-ds-iconHiddenOnMobile":e.areIconsHiddenOnMobile}])},[n("div",$,[e.startDateEyebrowText?(a(),o("span",W,m(e.startDateEyebrowText),1)):l("",!0),n("div",X,[e.startIcon?(a(),P(s,{key:0,class:c(["ds-datePickerBox__icon",{"-ds-hiddenOnMobile":e.areIconsHiddenOnMobile}]),icon:e.startIcon,size:e.ICON_SIZES.XX_SMALL},null,8,["class","icon","size"])):l("",!0),n("span",Y,m(e.startDateText),1)])])],2),e.startDate&&e.endDate?(a(),o(C,{key:0},[d[0]||(d[0]=n("span",{class:"ds-datePickerBox__separator"},"–",-1)),n("div",{class:c(["ds-datePickerBox__widthWrapper -ds-justify-to-end",{"-ds-has-icon":e.endIcon,"-ds-iconHiddenOnMobile":e.areIconsHiddenOnMobile}])},[n("div",Z,[e.endDateEyebrowText?(a(),o("span",q,m(e.endDateEyebrowText),1)):l("",!0),n("div",J,[e.endIcon?(a(),P(s,{key:0,class:c(["ds-datePickerBox__icon",{"-ds-hiddenOnMobile":e.areIconsHiddenOnMobile}]),icon:e.endIcon,size:e.ICON_SIZES.XX_SMALL},null,8,["class","icon","size"])):l("",!0),n("span",Q,m(e.endDateText),1)])])],2)],64)):l("",!0),e.state===e.DATE_PICKER_STATES.LOADING?(a(),o("div",x,[L(s,{icon:e.ICONS.FAD_SPINNER_THIRD,size:e.ICON_SIZES.X_SMALL,spinning:""},null,8,["icon","size"])])):l("",!0)],2)}const te=N(w,[["render",ee],["__scopeId","data-v-cfb4bc6b"]]);w.__docgenInfo={displayName:"DatePickerBox",exportName:"default",description:"",tags:{},props:[{name:"isInteractive",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"placeholder",type:{name:"string"},defaultValue:{func:!1,value:"'Ustaw'"}},{name:"startDate",type:{name:"date"},defaultValue:{func:!1,value:"null"}},{name:"endDate",type:{name:"date"},defaultValue:{func:!1,value:"null"}},{name:"startIcon",type:{name:"object"},defaultValue:{func:!1,value:"null"}},{name:"endIcon",type:{name:"object"},defaultValue:{func:!1,value:"null"}},{name:"areIconsHiddenOnMobile",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"state",type:{name:"(String as PropType<DatePickerStates>) || null"},defaultValue:{func:!1,value:"DATE_PICKER_STATES.DEFAULT"}},{name:"color",type:{name:"DatePickerColors"},defaultValue:{func:!1,value:"DATE_PICKER_COLORS.NEUTRAL"}},{name:"startDateEyebrowText",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"endDateEyebrowText",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"isOpen",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],sourceFiles:["/home/runner/work/design-system/design-system/lib/js/components/DatePickers/DatePickerBox/DatePickerBox.vue"]};const ae=e=>e.charAt(0).toUpperCase()+e.slice(1);let y=null,k;function ne({props:e,onChange:d,defaultDates:i,mode:p="single"}){let t=null;const u=S(!1),s=async(T,_)=>{if(!t){if(!y)try{y=(await v(async()=>{const{default:E}=await import("./index-CBmJdl9t.js");return{default:E}},[],import.meta.url)).default,k=(await v(async()=>{const{Polish:E}=await import("./pl-Cy1N1vsP.js").then(V=>V.p);return{Polish:E}},__vite__mapDeps([0,1]),import.meta.url)).Polish}catch(E){console.error("Failed to load flatpickr",E);return}return t=y(T,{mode:p,locale:k,disableMobile:!0,positionElement:_,ignoredFocusElements:[_],appendTo:_,position:h[e.calendarPosition],defaultDate:i,disable:e.disableDates,minDate:e.minDate,maxDate:e.maxDate,onClose:[()=>{u.value=!1}],onOpen:[()=>{u.value=!0}],onChange:d}),t}};return F(()=>{t==null||t.destroy(),t=null}),B([()=>e.calendarPosition,()=>e.minDate,()=>e.maxDate,()=>e.disableDates,()=>i],()=>{t==null||t.set({position:h[e.calendarPosition],defaultDate:i,disable:e.disableDates,minDate:e.minDate,maxDate:e.maxDate})},{flush:"post"}),{datePicker:t,createDatePicker:s,isOpen:u,toggle:()=>{t==null||t.toggle()}}}const M=R({name:"DatePicker",components:{DsTile:U,DatePickerBox:te},props:{triggerType:{type:String,default:g.TILE},isInteractive:{type:Boolean,default:!0},placeholder:{type:String,default:"Wybierz datę"},date:{type:Date,default:null},label:{type:String,default:""},isLabelUppercase:{type:Boolean,default:!1},icon:{type:[Object,null],default:D.FA_CALENDAR_DAY,validator(e){return e===null||Object.values(D).includes(b(e))}},isIconHiddenOnMobile:{type:Boolean,default:!1},errorMessage:{type:String,default:""},state:{type:String,default:f.DEFAULT},color:{type:String,default:I.NEUTRAL},calendarPosition:{type:String,default:r.BOTTOM_LEFT},disableDates:{type:Array,default:()=>[]},minDate:{type:Date,default:null},maxDate:{type:Date,default:null}},emits:{"update:date":e=>!0},setup(e,{emit:d}){const i=S(),p=S(),t=_=>{d("update:date",_[0])},{isOpen:u,toggle:s,createDatePicker:T}=ne({props:e,onChange:t,defaultDates:e.date,mode:"single"});return B([()=>e.isInteractive,()=>e.state],async()=>{e.isInteractive&&e.state===f.DEFAULT&&await T(i.value,p.value)}),{flatpickrInputRef:i,datePickerRef:p,isOpen:u,toggleDatePicker:s,createDatePicker:T,DATE_PICKER_CALENDAR_POSITIONS:Object.freeze(r),DATE_PICKER_COLORS:Object.freeze(I),DATE_PICKER_STATES:Object.freeze(f),DATE_PICKER_TRIGGER_TYPES:Object.freeze(g)}},computed:{eyebrowText(){return this.date?ae(z(this.date)):""},text(){return this.date?H(this.date):this.placeholder},tileIcon(){return this.icon?this.isOpen.value?D.FA_CHEVRON_UP:this.icon:null}},async mounted(){this.isInteractive&&this.state===f.DEFAULT&&await this.createDatePicker(this.flatpickrInputRef,this.datePickerRef)},methods:{toggle(){this.isInteractive&&this.state===f.DEFAULT&&this.toggleDatePicker()}}}),se={class:"ds-datePicker__labelWrapper"},le={key:2,class:"ds-datePicker__errorMessage"},oe={ref:"flatpickrInputRef",class:"ds-datePicker__hiddenInput"};function ie(e,d,i,p,t,u){const s=O("ds-tile"),T=O("date-picker-box");return a(),o("div",{ref:"datePickerRef",class:c(["ds-datePicker",{"-ds-box":e.triggerType===e.DATE_PICKER_TRIGGER_TYPES.BOX}])},[e.triggerType===e.DATE_PICKER_TRIGGER_TYPES.TILE?(a(),o(C,{key:0},[n("div",se,[e.label?(a(),o("span",{key:0,class:c(["ds-datePicker__label",{"-ds-isUppercase":e.isLabelUppercase,"-ds-disabled":e.state===e.DATE_PICKER_STATES.DISABLED}])},m(e.label),3)):l("",!0),e.$slots.default?K(e.$slots,"default",{key:1},void 0,!0):l("",!0)]),L(s,{class:"ds-datePicker__tile",text:e.text,interactive:e.isInteractive,color:e.color,state:e.state,"icon-right":e.tileIcon,"is-icon-right-hidden-on-mobile":e.isIconHiddenOnMobile,"eyebrow-text":e.eyebrowText,onClick:e.toggle},null,8,["text","interactive","color","state","icon-right","is-icon-right-hidden-on-mobile","eyebrow-text","onClick"])],64)):(a(),P(T,{key:1,"is-interactive":e.isInteractive,placeholder:e.placeholder,"start-date":e.date,"start-icon":e.icon,"are-icons-hidden-on-mobile":e.isIconHiddenOnMobile,state:e.state,color:e.color,"start-date-eyebrow-text":e.eyebrowText,"is-open":e.isOpen,onClick:e.toggle},null,8,["is-interactive","placeholder","start-date","start-icon","are-icons-hidden-on-mobile","state","color","start-date-eyebrow-text","is-open","onClick"])),e.errorMessage?(a(),o("span",le,m(e.errorMessage),1)):l("",!0),n("input",oe,null,512)],2)}const pe=N(M,[["render",ie],["__scopeId","data-v-8913debc"]]);M.__docgenInfo={displayName:"DatePicker",exportName:"default",description:"",tags:{},props:[{name:"triggerType",type:{name:"DatePickerTriggerTypes"},defaultValue:{func:!1,value:"DATE_PICKER_TRIGGER_TYPES.TILE"}},{name:"isInteractive",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"placeholder",type:{name:"string"},defaultValue:{func:!1,value:"'Wybierz datę'"}},{name:"date",type:{name:"date"},defaultValue:{func:!1,value:"null"}},{name:"label",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"isLabelUppercase",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"icon",type:{name:"IconItem | null"},defaultValue:{func:!1,value:"ICONS.FA_CALENDAR_DAY"}},{name:"isIconHiddenOnMobile",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"errorMessage",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"state",type:{name:"DatePickerStates"},defaultValue:{func:!1,value:"DATE_PICKER_STATES.DEFAULT"}},{name:"color",type:{name:"DatePickerColors"},defaultValue:{func:!1,value:"DATE_PICKER_COLORS.NEUTRAL"}},{name:"calendarPosition",type:{name:"DatePickerCalendarPositions"},defaultValue:{func:!1,value:"DATE_PICKER_CALENDAR_POSITIONS.BOTTOM_LEFT"}},{name:"disableDates",type:{name:"Array<Date>"},defaultValue:{func:!0,value:"() => []"}},{name:"minDate",type:{name:"date"},defaultValue:{func:!1,value:"null"}},{name:"maxDate",type:{name:"date"},defaultValue:{func:!1,value:"null"}}],events:[{name:"update:date"}],slots:[{name:"default"}],sourceFiles:["/home/runner/work/design-system/design-system/lib/js/components/DatePickers/DatePicker/DatePicker.vue"]};export{pe as D,g as a,r as b,f as c,I as d,te as e,ae as f,ne as i,z as l};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as g,t as D,c as o,f as l,h as s,a as d,g as f,n as i,u as c,s as p,b,r as C,o as t}from"./vue.esm-bundler-CzUSCRPq.js";import{D as M}from"./Checkbox-KYcZTLuT.js";import{D as V}from"./Divider-ClNbKvxH.js";import{a as $,I as v,c as U,b as z}from"./Icon-CQ850_cO.js";import{_ as R}from"./_plugin-vue_export-helper-DlAUqK2U.js";const r={DEFAULT:"default",FLAT:"flat"},n={DEFAULT:"default",LOADING:"loading",DRAG:"drag"},m={SMALL:"small",MEDIUM:"medium"},y={DEFAULT:"default",PRIMARY:"primary",PRIMARY_WEAK:"primary-weak",NEUTRAL_HEAVY:"neutral-heavy",NEUTRAL_STRONG:"neutral-strong",NEUTRAL:"neutral",NEUTRAL_WEAK:"neutral-weak",NEUTRAL_GHOST:"neutral-ghost",DANGER:"danger",DANGER_WEAK:"danger-weak",FAIL:"fail",FAIL_WEAK:"fail-weak",WARNING:"warning",WARNING_WEAK:"warning-weak",SUCCESS:"success",SUCCESS_WEAK:"success-weak",INFO:"info",INFO_WEAK:"info-weak",ACCENT:"accent",ACCENT_WEAK:"accent-weak"},L={NEUTRAL:"neutral",NEUTRAL_WEAK:"neutral-weak"},G={SMALL:"small"},I={HORIZONTAL:"horizontal",VERTICAL:"vertical"},E=g({name:"RichListItem",components:{DsCheckbox:M,DsDivider:V,DsIcon:$},props:{type:{type:String,default:r.DEFAULT,validator(e){return Object.values(r).includes(e)}},layout:{type:String,default:I.HORIZONTAL,validator(e){return Object.values(I).includes(e)}},state:{type:String,default:n.DEFAULT,validator(e){return Object.values(n).includes(e)}},size:{type:String,default:m.MEDIUM,validator(e){return Object.values(m).includes(e)}},isInteractive:{type:Boolean,default:!0},isDimmed:{type:Boolean,default:!1},isDraggable:{type:Boolean,default:!0},icon:{type:Object,default:null,validator(e){return Object.values(v).includes(D(e))}},iconColor:{type:String,default:null,validator(e){return Object.values(U).includes(e)}},iconColorHex:{type:String,default:null},borderColor:{type:String,default:null,validator(e){return Object.values(y).includes(e)}},borderColorHex:{type:String,default:null},draggableIconClassName:{type:String,default:null},backgroundColor:{type:String,default:L.NEUTRAL,validator(e){return Object.values(L).includes(e)}},elevation:{type:String,default:null,validator(e){return Object.values(G).includes(e)}},hasDraggableHandler:{type:Boolean,default:!0},hasActionsSlotDivider:{type:Boolean,default:!0},isSelectable:{type:Boolean,default:!0},isSelected:{type:Boolean,default:!1}},emits:{"icon-click":()=>!0,click:()=>!0,"update:is-selected":e=>!0},data(){return{ICONS:Object.freeze(v),ICON_SIZES:Object.freeze(z),RICH_LIST_ITEM_TYPE:Object.freeze(r),RICH_LIST_ITEM_STATE:Object.freeze(n),RICH_LIST_ITEM_SIZE:Object.freeze(m)}},computed:{classList(){return{"-ds-default":this.type===r.DEFAULT,"-ds-flat":this.type===r.FLAT,"-ds-horizontal":this.isHorizontal,"-ds-verticalWithMedia":this.isVertical&&this.hasMedia,"-ds-vertical":this.isVertical,"-ds-loading":this.state===n.LOADING,"-ds-dimmed":this.isDimmed,"-ds-interactive":this.isInteractive,"-ds-small":this.size===m.SMALL,...this.backgroundColor&&this.type!==r.FLAT&&{[`-ds-background-${this.backgroundColor}`]:!0},...this.elevation&&this.type!==r.FLAT&&{[`-ds-elevation-${this.elevation}`]:!0},"-ds-draggable":this.isDraggable,"-ds-draggable-without-handler":this.isDraggable&&!this.hasDraggableHandler,"-ds-has-media":this.hasMedia,"-ds-drag":this.isDragging}},isHorizontal(){return this.layout===I.HORIZONTAL},isVertical(){return this.layout===I.VERTICAL},iconColorClass(){if(!(!this.iconColor||this.iconColor&&this.iconColorHex))return`-ds-${this.iconColor}`},iconColorStyle(){if(!(!this.iconColor||!this.iconColorHex))return{color:this.iconColorHex}},borderColorClass(){if(!(!this.borderColor||this.borderColor&&this.borderColorHex))return`-ds-border-${this.borderColor}`},borderColorStyle(){if(!(!this.borderColor&&!this.borderColorHex))return{backgroundColor:this.borderColorHex}},hasMedia(){return!!this.$slots.media},isDragging(){return this.isDraggable&&this.state===n.DRAG}}}),B={key:0,class:"ds-richListItem__mediaVertical -ds-dimmable"},j={class:"ds-richListItem__container -ds-dimmable"},F={key:0,class:"ds-richListItem__mediaHorizontal"},w={key:1,class:"ds-richListItem__dragAndDrop"},Z={key:2,class:"ds-richListItem__iconWrapper"},K={class:"ds-richListItem__content"},W={class:"ds-richListItem__rightContainer"},P={key:0,class:"ds-richListItem__metadata"},Y={key:2,class:"ds-richListItem__checkbox"},X={key:1,class:"ds-richListItem__metadata -ds-dimmable"};function q(e,a,A,O,k,N){const h=C("ds-icon"),_=C("ds-divider"),H=C("ds-checkbox");return t(),o("div",{class:i(["ds-richListItem",e.classList]),onClick:a[5]||(a[5]=u=>e.$emit("click",u))},[e.hasMedia&&e.isVertical?(t(),o("div",B,[l(e.$slots,"media",{},void 0,!0)])):s("",!0),d("div",j,[e.hasMedia&&e.isHorizontal?(t(),o("div",F,[l(e.$slots,"media",{},void 0,!0)])):s("",!0),e.isDraggable&&e.hasDraggableHandler?(t(),o("div",w,[f(h,{icon:e.ICONS.FA_BARS,class:i(["ds-richListItem__dragAndDropIcon",{[e.draggableIconClassName]:!!e.draggableIconClassName}]),size:e.size===e.RICH_LIST_ITEM_SIZE.SMALL?e.ICON_SIZES.XX_SMALL:e.ICON_SIZES.X_SMALL,onClick:a[0]||(a[0]=c(()=>{},["stop"]))},null,8,["icon","class","size"])])):s("",!0),e.icon?(t(),o("div",Z,[f(h,{icon:e.icon,class:i(["ds-richListItem__icon",e.iconColorClass]),size:e.size===e.RICH_LIST_ITEM_SIZE.SMALL?e.ICON_SIZES.XX_SMALL:e.ICON_SIZES.X_SMALL,style:p(e.iconColorStyle),onClick:a[1]||(a[1]=c(u=>e.$emit("icon-click"),["prevent"]))},null,8,["icon","size","class","style"])])):s("",!0),d("div",K,[l(e.$slots,"content",{},void 0,!0)]),d("div",W,[e.$slots.metadata&&e.isHorizontal?(t(),o("div",P,[l(e.$slots,"metadata",{},void 0,!0)])):s("",!0),e.$slots.actions?(t(),o("div",{key:1,class:"ds-richListItem__actionSlot",onClick:a[2]||(a[2]=c(()=>{},["stop"]))},[e.$slots.actions&&e.hasActionsSlotDivider&&e.isHorizontal?(t(),b(_,{key:0,"is-vertical":""})):s("",!0),l(e.$slots,"actions",{},void 0,!0)])):s("",!0),e.isSelectable?(t(),o("div",Y,[e.isHorizontal?(t(),b(_,{key:0,"is-vertical":""})):s("",!0),f(H,{"is-selected":e.isSelected,"onUpdate:isSelected":a[3]||(a[3]=u=>e.$emit("update:is-selected",u)),onClick:a[4]||(a[4]=c(()=>{},["stop"]))},null,8,["is-selected"])])):s("",!0)])]),e.$slots.metadata&&e.isVertical?(t(),o("div",X,[l(e.$slots,"metadata",{},void 0,!0)])):s("",!0),e.borderColorClass||e.borderColorStyle?(t(),o("div",{key:2,class:i(["ds-richListItem__border",e.borderColorClass]),style:p(e.borderColorStyle)},null,6)):s("",!0)],2)}const ie=R(E,[["render",q],["__scopeId","data-v-95720620"]]);E.__docgenInfo={displayName:"RichListItem",exportName:"default",description:"",tags:{},props:[{name:"type",type:{name:"RichListItemType"},defaultValue:{func:!1,value:"RICH_LIST_ITEM_TYPE.DEFAULT"}},{name:"layout",type:{name:"RichListItemLayout"},defaultValue:{func:!1,value:"RICH_LIST_ITEM_LAYOUT.HORIZONTAL"}},{name:"state",type:{name:"RichListItemState"},defaultValue:{func:!1,value:"RICH_LIST_ITEM_STATE.DEFAULT"}},{name:"size",type:{name:"RichListItemSize"},defaultValue:{func:!1,value:"RICH_LIST_ITEM_SIZE.MEDIUM"}},{name:"isInteractive",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"isDimmed",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"isDraggable",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"icon",type:{name:"IconItem"},defaultValue:{func:!1,value:"null"}},{name:"iconColor",type:{name:"IconColor"},defaultValue:{func:!1,value:"null"}},{name:"iconColorHex",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"borderColor",type:{name:"RichListItemBorderColor"},defaultValue:{func:!1,value:"null"}},{name:"borderColorHex",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"draggableIconClassName",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"backgroundColor",type:{name:"RichListItemBackgroundColor"},defaultValue:{func:!1,value:"RICH_LIST_ITEM_BACKGROUND_COLOR.NEUTRAL"}},{name:"elevation",type:{name:"RichListItemElevation"},defaultValue:{func:!1,value:"null"}},{name:"hasDraggableHandler",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"hasActionsSlotDivider",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"isSelectable",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"isSelected",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"click"},{name:"icon-click"},{name:"update:is-selected"}],slots:[{name:"media"},{name:"content"},{name:"metadata"},{name:"actions"}],sourceFiles:["/home/runner/work/design-system/design-system/lib/js/components/RichList/RichListItem/RichListItem.vue"]};const J={...y},S={...L},T=g({name:"GroupRichListItem",props:{isExpanded:{type:Boolean,default:!1},borderColor:{type:String,default:null,validator(e){return Object.values(J).includes(e)}},borderColorHex:{type:String,default:null},backgroundColor:{type:String,default:S.NEUTRAL,validator(e){return Object.values(S).includes(e)}}},computed:{classList(){return{...this.backgroundColor&&{[`-ds-background-${this.backgroundColor}`]:!0}}},borderColorClass(){if(!(!this.borderColor||this.borderColor&&this.borderColorHex))return`-ds-border-${this.borderColor}`},borderColorStyle(){if(!(!this.borderColor||!this.borderColorHex))return{backgroundColor:this.borderColorHex}}}}),Q={class:"ds-groupRichListItem__wrapper"},x={class:"ds-groupRichListItem__parent"},ee={key:0,class:"ds-groupRichListItem__children"};function te(e,a,A,O,k,N){return t(),o("div",{class:i(["ds-groupRichListItem",e.classList])},[d("div",Q,[d("div",x,[l(e.$slots,"parent",{},void 0,!0)]),e.isExpanded?(t(),o("div",ee,[l(e.$slots,"children",{},void 0,!0)])):s("",!0)]),e.borderColorClass||e.borderColorStyle?(t(),o("div",{key:0,class:i(["ds-groupRichListItem__border",e.borderColorClass]),style:p(e.borderColorStyle)},null,6)):s("",!0)],2)}const ne=R(T,[["render",te],["__scopeId","data-v-46a9680f"]]);T.__docgenInfo={displayName:"GroupRichListItem",exportName:"default",description:"",tags:{},props:[{name:"isExpanded",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"borderColor",type:{name:"GroupRichListItemBorderColor"},defaultValue:{func:!1,value:"null"}},{name:"borderColorHex",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"backgroundColor",type:{name:"GroupRichListItemBackgroundColor"},defaultValue:{func:!1,value:"GROUP_RICH_LIST_ITEM_BACKGROUND_COLOR.NEUTRAL"}}],slots:[{name:"parent"},{name:"children"}],sourceFiles:["/home/runner/work/design-system/design-system/lib/js/components/RichList/GroupRichListItem/GroupRichListItem.vue"]};export{ne as G,r as R,m as a,I as b,n as c,y as d,L as e,G as f,S as g,J as h,ie as i};
|