@bethinkpl/design-system 26.12.1 → 26.14.0

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.
Files changed (52) hide show
  1. package/dist/design-system.umd.cjs +16 -16
  2. package/dist/design-system.umd.cjs.map +1 -1
  3. package/dist/lib/js/components/Avatar/Avatar.vue.d.ts +2 -0
  4. package/dist/lib/js/components/Chip/Chip.vue.d.ts +6 -5
  5. package/dist/lib/js/components/Drawer/DrawerHeader/DrawerHeader.vue.d.ts +3 -2
  6. package/dist/lib/js/components/Dropdown/Dropdown.vue.d.ts +1 -1
  7. package/dist/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue.d.ts +2 -2
  8. package/dist/lib/js/components/Pagination/Pagination.vue.d.ts +1 -1
  9. package/dist/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.vue.d.ts +13 -4
  10. package/dist/lib/js/components/TextGroup/TextGroup.vue.d.ts +1 -1
  11. package/dist/lib/js/components/Toggles/CounterToggle/CounterToggle.vue.d.ts +1 -1
  12. package/dist/lib/js/components/Tooltip/Tooltip.vue.d.ts +1 -1
  13. package/docs/assets/Avatar-DUThlKLV.js +1 -0
  14. package/docs/assets/Avatar.stories-Dwgdl1h5.js +38 -0
  15. package/docs/assets/BasicRichListItem-CEiYZukO.js +1 -0
  16. package/docs/assets/{BasicRichListItem.stories-W11x1b5C.js → BasicRichListItem.stories-ePDSld8d.js} +8 -4
  17. package/docs/assets/Chip-DmzVP4Nc.js +1 -0
  18. package/docs/assets/{Chip.stories-CmRxhdd5.js → Chip.stories-BHVdQEET.js} +1 -1
  19. package/docs/assets/{Color-ERTF36HU-D5EeXymG.js → Color-ERTF36HU-CUHUHSmH.js} +1 -1
  20. package/docs/assets/{DateBox.stories-CvwVbLiI.js → DateBox.stories-BP1Z4i2_.js} +1 -1
  21. package/docs/assets/{DatePicker-CYB-OeHU.js → DatePicker-Bc1APlab.js} +1 -1
  22. package/docs/assets/{DatePicker.stories-BCcRMVnc.js → DatePicker.stories-AUPbbqFP.js} +1 -1
  23. package/docs/assets/{DateRangePicker-BY0ptzDm.js → DateRangePicker-CNuyzpfG.js} +1 -1
  24. package/docs/assets/{DateRangePicker.stories-CMoP8mIZ.js → DateRangePicker.stories-BQFhc4cw.js} +1 -1
  25. package/docs/assets/{DocsRenderer-CFRXHY34-CTj1geou.js → DocsRenderer-CFRXHY34-BTRR5RRG.js} +5 -5
  26. package/docs/assets/{DrawerHeader-6iOWRU4r.js → DrawerHeader-CivXan1m.js} +1 -1
  27. package/docs/assets/{DrawerHeader.stories-BM2zQhqx.js → DrawerHeader.stories-B-6VXMB_.js} +1 -1
  28. package/docs/assets/{GroupRichListItem-B5zdEDgJ.js → GroupRichListItem-8v8vJXgH.js} +1 -1
  29. package/docs/assets/{GroupRichListItem.stories-CGh-ncpD.js → GroupRichListItem.stories-KjZ2JDho.js} +1 -1
  30. package/docs/assets/{OutlineItem.stories-DRj6zFWQ.js → OutlineItem.stories-wBYF6_YS.js} +1 -1
  31. package/docs/assets/{RichListItem.stories-BjOiMMyE.js → RichListItem.stories-C7rIgxO4.js} +1 -1
  32. package/docs/assets/{SelectionTile-7OHQEA9w.js → SelectionTile-D9A_Tf3q.js} +1 -1
  33. package/docs/assets/{SelectionTile.stories-B5SdFlYE.js → SelectionTile.stories-aEkis98r.js} +1 -1
  34. package/docs/assets/{iframe-C7WPYr8K.js → iframe-BmaPoam5.js} +6 -6
  35. package/docs/assets/{index-DUBuPvUa.js → index-g_7p32Ii.js} +1 -1
  36. package/docs/assets/{index-B4SBaA-m.js → index-z7xpE_Pa.js} +1 -1
  37. package/docs/assets/{preview-DQC24eOC.js → preview-DqmV_9DV.js} +1 -1
  38. package/docs/assets/{preview-H9MyyyLW.js → preview-Ds_xi8UF.js} +2 -2
  39. package/docs/iframe.html +1 -1
  40. package/docs/project.json +1 -1
  41. package/lib/js/components/Avatar/Avatar.spec.ts +16 -0
  42. package/lib/js/components/Avatar/Avatar.stories.ts +4 -0
  43. package/lib/js/components/Avatar/Avatar.vue +23 -5
  44. package/lib/js/components/Chip/Chip.vue +15 -16
  45. package/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.stories.ts +7 -4
  46. package/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.vue +14 -10
  47. package/lib/js/components/RichList/RichListItem/RichListItem.vue +11 -7
  48. package/package.json +1 -1
  49. package/docs/assets/Avatar-U_7Z6nZ2.js +0 -1
  50. package/docs/assets/Avatar.stories-CVysqINz.js +0 -37
  51. package/docs/assets/BasicRichListItem-CjGmKgW-.js +0 -1
  52. package/docs/assets/Chip-CkWK9-eU.js +0 -1
@@ -1 +1 @@
1
- import{d as y,c as s,a as i,b as n,e as v,g as l,n as r,j as u,f,r as o,o as a,l as S}from"./vue.esm-bundler-DmkhfO_9.js";import{D as _,a as C,I as T}from"./Button-yeAor0pZ.js";import{D,b as N,a as O}from"./Divider-CeZli6az.js";import{I as w}from"./IconButton-gTykCZIi.js";import{C as k}from"./Chip-CkWK9-eU.js";import{a as R,I as L,b as V}from"./Icon-BPz80dqH.js";import{_ as B}from"./_plugin-vue_export-helper-DlAUqK2U.js";const H={NEUTRAL_STRONG:"neutralStrong",NEUTRAL_WEAK:"neutralWeak"},p=y({name:"DrawerHeader",components:{DsButton:_,Divider:D,Icon:R,IconButton:w,Chip:k},props:{eyebrowText:{type:String,default:null},isInteractiveEyebrow:{type:Boolean,default:!1},eyebrowEllipsis:{type:Boolean,default:!1},title:{type:String,default:null},titleEllipsis:{type:Boolean,default:!1},titleColor:{type:String,default:H.NEUTRAL_STRONG},leftIcon:{type:[Object,null],default:null},chipLabel:{type:String,default:null},isClosable:{type:Boolean,default:!0},hasDivider:{type:Boolean,default:!1},isSecondLevel:{type:Boolean,default:!1}},emits:["backClicked","close","eyebrowClicked"],data(){return{BUTTON_TYPES:Object.freeze(C),DIVIDER_SIZES:Object.freeze(N),DIVIDER_PROMINENCES:Object.freeze(O),ICONS:Object.freeze(L),ICON_BUTTON_SIZES:Object.freeze(T),ICON_SIZES:Object.freeze(V)}}}),g={class:"ds-drawerHeader"},$={class:"ds-drawerHeader__titleWrapper"},A={class:"ds-drawerHeader__title"},h=["title"],z={key:3},U={key:1,class:"ds-drawerHeader__actions"};function j(e,t,Z,M,W,P){const c=o("ds-button"),m=o("icon"),E=o("chip"),I=o("icon-button"),b=o("divider");return a(),s("div",g,[i("div",$,[e.isSecondLevel?(a(),n(c,{key:0,"icon-left":e.ICONS.FA_CHEVRON_LEFT,type:e.BUTTON_TYPES.TEXT,class:"ds-drawerHeader__secondLevel",onClick:t[0]||(t[0]=d=>e.$emit("backClicked"))},{default:v(()=>t[3]||(t[3]=[S(" Wróć ")])),_:1},8,["icon-left","type"])):l("",!0),i("div",{class:r([{"-ds-hidden":e.isSecondLevel},"ds-drawerHeader__firstLevel"])},[e.eyebrowText?(a(),s("span",{key:0,class:r([{"-ds-isInteractive":e.isInteractiveEyebrow,"-ds-ellipsis":e.eyebrowEllipsis},"ds-drawerHeader__eyebrow"]),onClick:t[1]||(t[1]=d=>e.isInteractiveEyebrow&&e.$emit("eyebrowClicked"))},u(e.eyebrowText),3)):l("",!0),i("div",A,[e.leftIcon?(a(),n(m,{key:0,icon:e.leftIcon,size:e.ICON_SIZES.X_SMALL,class:"ds-drawerHeader__leftIcon"},null,8,["icon","size"])):l("",!0),e.title?(a(),s("span",{key:1,class:r(["ds-drawerHeader__titleText",{"-ds-ellipsis":e.titleEllipsis,[`-ds-${e.titleColor}`]:!0}]),title:e.titleEllipsis?e.title:void 0},u(e.title),11,h)):l("",!0),e.chipLabel?(a(),n(E,{key:2,label:e.chipLabel},null,8,["label"])):l("",!0),e.$slots.titleTrailing?(a(),s("div",z,[f(e.$slots,"titleTrailing",{},void 0,!0)])):l("",!0)])],2),e.$slots.actions?(a(),s("div",U,[f(e.$slots,"actions",{},void 0,!0)])):l("",!0),e.isClosable?(a(),n(I,{key:2,icon:e.ICONS.FA_XMARK,size:e.ICON_BUTTON_SIZES.MEDIUM,touchable:!1,onClick:t[2]||(t[2]=d=>e.$emit("close"))},null,8,["icon","size"])):l("",!0)]),e.hasDivider?(a(),n(b,{key:0,size:e.DIVIDER_SIZES.L,prominence:e.DIVIDER_PROMINENCES.WEAK},null,8,["size","prominence"])):l("",!0)])}const Q=B(p,[["render",j],["__scopeId","data-v-5b63b67e"]]);p.__docgenInfo={displayName:"DrawerHeader",exportName:"default",description:"",tags:{},props:[{name:"eyebrowText",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"isInteractiveEyebrow",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"eyebrowEllipsis",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"title",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"titleEllipsis",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"titleColor",type:{name:"DrawerHeaderTitleColor"},defaultValue:{func:!1,value:"DRAWER_HEADER_TITLE_COLORS.NEUTRAL_STRONG"}},{name:"leftIcon",type:{name:"object|null"},defaultValue:{func:!1,value:"null"}},{name:"chipLabel",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"isClosable",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"hasDivider",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"isSecondLevel",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"backClicked"},{name:"eyebrowClicked"},{name:"close"}],slots:[{name:"titleTrailing"},{name:"actions"}],sourceFiles:["/home/runner/work/design-system/design-system/lib/js/components/Drawer/DrawerHeader/DrawerHeader.vue"]};export{Q as D,H as a};
1
+ import{d as y,c as s,a as i,b as n,e as v,g as l,n as r,j as u,f,r as o,o as a,l as S}from"./vue.esm-bundler-DmkhfO_9.js";import{D as _,a as C,I as T}from"./Button-yeAor0pZ.js";import{D,b as N,a as O}from"./Divider-CeZli6az.js";import{I as w}from"./IconButton-gTykCZIi.js";import{C as k}from"./Chip-DmzVP4Nc.js";import{a as R,I as L,b as V}from"./Icon-BPz80dqH.js";import{_ as B}from"./_plugin-vue_export-helper-DlAUqK2U.js";const H={NEUTRAL_STRONG:"neutralStrong",NEUTRAL_WEAK:"neutralWeak"},p=y({name:"DrawerHeader",components:{DsButton:_,Divider:D,Icon:R,IconButton:w,Chip:k},props:{eyebrowText:{type:String,default:null},isInteractiveEyebrow:{type:Boolean,default:!1},eyebrowEllipsis:{type:Boolean,default:!1},title:{type:String,default:null},titleEllipsis:{type:Boolean,default:!1},titleColor:{type:String,default:H.NEUTRAL_STRONG},leftIcon:{type:[Object,null],default:null},chipLabel:{type:String,default:null},isClosable:{type:Boolean,default:!0},hasDivider:{type:Boolean,default:!1},isSecondLevel:{type:Boolean,default:!1}},emits:["backClicked","close","eyebrowClicked"],data(){return{BUTTON_TYPES:Object.freeze(C),DIVIDER_SIZES:Object.freeze(N),DIVIDER_PROMINENCES:Object.freeze(O),ICONS:Object.freeze(L),ICON_BUTTON_SIZES:Object.freeze(T),ICON_SIZES:Object.freeze(V)}}}),g={class:"ds-drawerHeader"},$={class:"ds-drawerHeader__titleWrapper"},A={class:"ds-drawerHeader__title"},h=["title"],z={key:3},U={key:1,class:"ds-drawerHeader__actions"};function j(e,t,Z,M,W,P){const c=o("ds-button"),m=o("icon"),E=o("chip"),I=o("icon-button"),b=o("divider");return a(),s("div",g,[i("div",$,[e.isSecondLevel?(a(),n(c,{key:0,"icon-left":e.ICONS.FA_CHEVRON_LEFT,type:e.BUTTON_TYPES.TEXT,class:"ds-drawerHeader__secondLevel",onClick:t[0]||(t[0]=d=>e.$emit("backClicked"))},{default:v(()=>t[3]||(t[3]=[S(" Wróć ")])),_:1},8,["icon-left","type"])):l("",!0),i("div",{class:r([{"-ds-hidden":e.isSecondLevel},"ds-drawerHeader__firstLevel"])},[e.eyebrowText?(a(),s("span",{key:0,class:r([{"-ds-isInteractive":e.isInteractiveEyebrow,"-ds-ellipsis":e.eyebrowEllipsis},"ds-drawerHeader__eyebrow"]),onClick:t[1]||(t[1]=d=>e.isInteractiveEyebrow&&e.$emit("eyebrowClicked"))},u(e.eyebrowText),3)):l("",!0),i("div",A,[e.leftIcon?(a(),n(m,{key:0,icon:e.leftIcon,size:e.ICON_SIZES.X_SMALL,class:"ds-drawerHeader__leftIcon"},null,8,["icon","size"])):l("",!0),e.title?(a(),s("span",{key:1,class:r(["ds-drawerHeader__titleText",{"-ds-ellipsis":e.titleEllipsis,[`-ds-${e.titleColor}`]:!0}]),title:e.titleEllipsis?e.title:void 0},u(e.title),11,h)):l("",!0),e.chipLabel?(a(),n(E,{key:2,label:e.chipLabel},null,8,["label"])):l("",!0),e.$slots.titleTrailing?(a(),s("div",z,[f(e.$slots,"titleTrailing",{},void 0,!0)])):l("",!0)])],2),e.$slots.actions?(a(),s("div",U,[f(e.$slots,"actions",{},void 0,!0)])):l("",!0),e.isClosable?(a(),n(I,{key:2,icon:e.ICONS.FA_XMARK,size:e.ICON_BUTTON_SIZES.MEDIUM,touchable:!1,onClick:t[2]||(t[2]=d=>e.$emit("close"))},null,8,["icon","size"])):l("",!0)]),e.hasDivider?(a(),n(b,{key:0,size:e.DIVIDER_SIZES.L,prominence:e.DIVIDER_PROMINENCES.WEAK},null,8,["size","prominence"])):l("",!0)])}const Q=B(p,[["render",j],["__scopeId","data-v-5b63b67e"]]);p.__docgenInfo={displayName:"DrawerHeader",exportName:"default",description:"",tags:{},props:[{name:"eyebrowText",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"isInteractiveEyebrow",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"eyebrowEllipsis",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"title",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"titleEllipsis",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"titleColor",type:{name:"DrawerHeaderTitleColor"},defaultValue:{func:!1,value:"DRAWER_HEADER_TITLE_COLORS.NEUTRAL_STRONG"}},{name:"leftIcon",type:{name:"object|null"},defaultValue:{func:!1,value:"null"}},{name:"chipLabel",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"isClosable",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"hasDivider",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"isSecondLevel",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"backClicked"},{name:"eyebrowClicked"},{name:"close"}],slots:[{name:"titleTrailing"},{name:"actions"}],sourceFiles:["/home/runner/work/design-system/design-system/lib/js/components/Drawer/DrawerHeader/DrawerHeader.vue"]};export{Q as D,H as a};
@@ -1,4 +1,4 @@
1
- import{D as o,a as r}from"./DrawerHeader-6iOWRU4r.js";import{I as n}from"./Icon-BPz80dqH.js";import"./vue.esm-bundler-DmkhfO_9.js";import"./Button-yeAor0pZ.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Divider-CeZli6az.js";import"./IconButton-gTykCZIi.js";import"./device-9fgosCm4.js";import"./Chip-CkWK9-eU.js";const I={title:"Components/Drawer/DrawerHeader",component:o},s=a=>({components:{DrawerHeader:o},setup(){return a},data(){return{ICONS:Object.freeze(n)}},template:`
1
+ import{D as o,a as r}from"./DrawerHeader-CivXan1m.js";import{I as n}from"./Icon-BPz80dqH.js";import"./vue.esm-bundler-DmkhfO_9.js";import"./Button-yeAor0pZ.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Divider-CeZli6az.js";import"./IconButton-gTykCZIi.js";import"./device-9fgosCm4.js";import"./Chip-DmzVP4Nc.js";const I={title:"Components/Drawer/DrawerHeader",component:o},s=a=>({components:{DrawerHeader:o},setup(){return a},data(){return{ICONS:Object.freeze(n)}},template:`
2
2
  <drawer-header
3
3
  :eyebrow-ellipsis="eyebrowEllipsis"
4
4
  :eyebrow-text="eyebrowText"
@@ -1 +1 @@
1
- import{d as g,t as D,c as l,f as o,g as s,a as d,n as i,k as f,x as c,s as p,b,r as C,o as t}from"./vue.esm-bundler-DmkhfO_9.js";import{D as M}from"./Checkbox-K_NwPnQU.js";import{D as V}from"./Divider-CeZli6az.js";import{a as $,I as v,c as U,b as z}from"./Icon-BPz80dqH.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.borderColorHex))return`-ds-border-${this.borderColor}`},borderColorStyle(){if(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:2,class:"ds-richListItem__iconWrapper"},Z={class:"ds-richListItem__content"},K={class:"ds-richListItem__rightContainer"},W={key:0,class:"ds-richListItem__metadata"},P={key:2,class:"ds-richListItem__checkbox"},Y={key:1,class:"ds-richListItem__metadata -ds-dimmable"};function X(e,a,A,O,k,N){const h=C("ds-icon"),_=C("ds-divider"),H=C("ds-checkbox");return t(),l("div",{class:i(["ds-richListItem",e.classList]),onClick:a[5]||(a[5]=u=>e.$emit("click",u))},[e.hasMedia&&e.isVertical?(t(),l("div",B,[o(e.$slots,"media",{},void 0,!0)])):s("",!0),d("div",j,[e.hasMedia&&e.isHorizontal?(t(),l("div",F,[o(e.$slots,"media",{},void 0,!0)])):s("",!0),e.isDraggable&&e.hasDraggableHandler?(t(),l("div",{key:1,class:i(["ds-richListItem__dragAndDrop",{[e.draggableIconClassName]:!!e.draggableIconClassName}])},[f(h,{icon:e.ICONS.FA_BARS,class:"ds-richListItem__dragAndDropIcon",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","size"])],2)):s("",!0),e.icon?(t(),l("div",w,[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",Z,[o(e.$slots,"content",{},void 0,!0)]),d("div",K,[e.$slots.metadata&&e.isHorizontal?(t(),l("div",W,[o(e.$slots,"metadata",{},void 0,!0)])):s("",!0),e.$slots.actions?(t(),l("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),o(e.$slots,"actions",{},void 0,!0)])):s("",!0),e.isSelectable?(t(),l("div",P,[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(),l("div",Y,[o(e.$slots,"metadata",{},void 0,!0)])):s("",!0),e.borderColorClass||e.borderColorStyle?(t(),l("div",{key:2,class:i(["ds-richListItem__border",e.borderColorClass]),style:p(e.borderColorStyle)},null,6)):s("",!0)],2)}const re=R(E,[["render",X],["__scopeId","data-v-a7c07753"]]);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 q={...y},S={...L},T=g({name:"GroupRichListItem",props:{isExpanded:{type:Boolean,default:!1},borderColor:{type:String,default:null,validator(e){return Object.values(q).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.borderColorHex))return`-ds-border-${this.borderColor}`},borderColorStyle(){if(this.borderColorHex)return{backgroundColor:this.borderColorHex}}}}),J={class:"ds-groupRichListItem__wrapper"},Q={class:"ds-groupRichListItem__parent"},x={key:0,class:"ds-groupRichListItem__children"};function ee(e,a,A,O,k,N){return t(),l("div",{class:i(["ds-groupRichListItem",e.classList])},[d("div",J,[d("div",Q,[o(e.$slots,"parent",{},void 0,!0)]),e.isExpanded?(t(),l("div",x,[o(e.$slots,"children",{},void 0,!0)])):s("",!0)]),e.borderColorClass||e.borderColorStyle?(t(),l("div",{key:0,class:i(["ds-groupRichListItem__border",e.borderColorClass]),style:p(e.borderColorStyle)},null,6)):s("",!0)],2)}const ie=R(T,[["render",ee],["__scopeId","data-v-0d83b403"]]);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{ie 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,q as h,re as i};
1
+ import{d as g,t as D,c as l,f as o,g as s,a as d,n as i,k as f,x as c,s as p,b,r as C,o as t}from"./vue.esm-bundler-DmkhfO_9.js";import{D as M}from"./Checkbox-K_NwPnQU.js";import{D as V}from"./Divider-CeZli6az.js";import{a as $,I as v,c as U,b as z}from"./Icon-BPz80dqH.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.borderColorHex))return`-ds-border-${this.borderColor}`},borderColorStyle(){if(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:2,class:"ds-richListItem__iconWrapper"},Z={class:"ds-richListItem__content"},K={class:"ds-richListItem__rightContainer"},W={key:0,class:"ds-richListItem__metadata"},P={key:2,class:"ds-richListItem__checkbox"},Y={key:1,class:"ds-richListItem__metadata -ds-dimmable"};function X(e,a,A,O,k,N){const h=C("ds-icon"),_=C("ds-divider"),H=C("ds-checkbox");return t(),l("div",{class:i(["ds-richListItem",e.classList]),onClick:a[5]||(a[5]=u=>e.$emit("click",u))},[e.hasMedia&&e.isVertical?(t(),l("div",B,[o(e.$slots,"media",{},void 0,!0)])):s("",!0),d("div",j,[e.hasMedia&&e.isHorizontal?(t(),l("div",F,[o(e.$slots,"media",{},void 0,!0)])):s("",!0),e.isDraggable&&e.hasDraggableHandler?(t(),l("div",{key:1,class:i(["ds-richListItem__dragAndDrop",{[e.draggableIconClassName]:!!e.draggableIconClassName}])},[f(h,{icon:e.ICONS.FA_BARS,class:"ds-richListItem__dragAndDropIcon",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","size"])],2)):s("",!0),e.icon?(t(),l("div",w,[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",Z,[o(e.$slots,"content",{},void 0,!0)]),d("div",K,[e.$slots.metadata&&e.isHorizontal?(t(),l("div",W,[o(e.$slots,"metadata",{},void 0,!0)])):s("",!0),e.$slots.actions?(t(),l("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),o(e.$slots,"actions",{},void 0,!0)])):s("",!0),e.isSelectable?(t(),l("div",P,[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(),l("div",Y,[o(e.$slots,"metadata",{},void 0,!0)])):s("",!0),e.borderColorClass||e.borderColorStyle?(t(),l("div",{key:2,class:i(["ds-richListItem__border",e.borderColorClass]),style:p(e.borderColorStyle)},null,6)):s("",!0)],2)}const re=R(E,[["render",X],["__scopeId","data-v-539a5ff5"]]);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 q={...y},S={...L},T=g({name:"GroupRichListItem",props:{isExpanded:{type:Boolean,default:!1},borderColor:{type:String,default:null,validator(e){return Object.values(q).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.borderColorHex))return`-ds-border-${this.borderColor}`},borderColorStyle(){if(this.borderColorHex)return{backgroundColor:this.borderColorHex}}}}),J={class:"ds-groupRichListItem__wrapper"},Q={class:"ds-groupRichListItem__parent"},x={key:0,class:"ds-groupRichListItem__children"};function ee(e,a,A,O,k,N){return t(),l("div",{class:i(["ds-groupRichListItem",e.classList])},[d("div",J,[d("div",Q,[o(e.$slots,"parent",{},void 0,!0)]),e.isExpanded?(t(),l("div",x,[o(e.$slots,"children",{},void 0,!0)])):s("",!0)]),e.borderColorClass||e.borderColorStyle?(t(),l("div",{key:0,class:i(["ds-groupRichListItem__border",e.borderColorClass]),style:p(e.borderColorStyle)},null,6)):s("",!0)],2)}const ie=R(T,[["render",ee],["__scopeId","data-v-0d83b403"]]);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{ie 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,q as h,re as i};
@@ -1,4 +1,4 @@
1
- import{G as n,g,a,c as s,h as D,f as _,i as b,R as S}from"./GroupRichListItem-B5zdEDgJ.js";import{D as T}from"./Divider-CeZli6az.js";import{c,I as d}from"./Icon-BPz80dqH.js";import"./vue.esm-bundler-DmkhfO_9.js";import"./Checkbox-K_NwPnQU.js";import"./SelectionControl-Xe-aYMrS.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const{useArgs:E}=__STORYBOOK_MODULE_PREVIEW_API__,N={title:"Components/RichList/GroupRichListItem",component:n,decorators:[e=>({template:'<div style="display: flex;padding: 16px;"><story/></div>'})]},x={isExpanded:!1,borderColor:null,borderColorHex:"",backgroundColor:g.NEUTRAL,parent_size:a.MEDIUM,parent_elevation:null,parent_isDimmed:!1,parent_isDraggable:!1,parent_hasDraggableHandler:!0,parent_icon:null,parent_iconColor:c.NEUTRAL_WEAK,parent_iconColorHex:"",parent_hasActionsSlotDivider:!0,parent_isSelectable:!0,parent_isSelected:!0,parent_state:s.DEFAULT,parent_isInteractive:!0,child_size:a.MEDIUM,child_elevation:null,child_isDimmed:!1,child_isDraggable:!1,child_hasDraggableHandler:!0,child_icon:null,child_iconColor:c.NEUTRAL_WEAK,child_iconColorHex:"",child_hasActionsSlotDivider:!0,child_isSelectable:!0,child_isSelected:!0,child_state:s.DEFAULT,child_isInteractive:!0},H={borderColor:{options:[null,...Object.values(D)],control:"select"},borderColorHex:{control:"text"},backgroundColor:{options:Object.values(g),control:"select"},parent_state:{options:Object.values(s),control:"select"},parent_size:{options:Object.values(a),control:"select"},parent_iconColor:{options:Object.values(c),control:"select"},parent_icon:{options:[null,...Object.keys(d)],control:"select"},parent_iconColorHex:{control:"text"},parent_elevation:{options:[null,...Object.values(_)],control:"select"},child_state:{options:Object.values(s),control:"select"},child_size:{options:Object.values(a),control:"select"},child_iconColor:{options:Object.values(c),control:"select"},child_icon:{options:[null,...Object.keys(d)],control:"select"},child_iconColorHex:{control:"text"},child_elevation:{options:[null,...Object.values(_)],control:"select"}},l="<template #content>Content slot</template><template #metadata>Metadata slot</template><template #actions>ACS</template>",v=e=>(e.argTypes=H,e.args=x,e.parameters={layout:"fullscreen",design:{type:"figma",url:"https://www.figma.com/file/izQdYyiBR1GQgFkaOIfIJI/LMS---DS-Components?type=design&node-id=8505-126430&mode=design&t=7Ay1DzrwONAPwSGv-4"}},e),L=e=>{const[O,t]=E();return{components:{GroupRichListItem:n,RichListItem:b,Divider:T},setup(){return e},data(){return{RICH_LIST_ITEM_TYPE:Object.freeze(S),RICH_LIST_ITEM_STATE:Object.freeze(s),ICONS:Object.freeze(d)}},methods:{updateParentIsSelected(i){t({parent_isSelected:i})},updateChildIsSelected(i){t({child_isSelected:i})},onClick(){t({isExpanded:!this.isExpanded})}},template:`
1
+ import{G as n,g,a,c as s,h as D,f as _,i as b,R as S}from"./GroupRichListItem-8v8vJXgH.js";import{D as T}from"./Divider-CeZli6az.js";import{c,I as d}from"./Icon-BPz80dqH.js";import"./vue.esm-bundler-DmkhfO_9.js";import"./Checkbox-K_NwPnQU.js";import"./SelectionControl-Xe-aYMrS.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const{useArgs:E}=__STORYBOOK_MODULE_PREVIEW_API__,N={title:"Components/RichList/GroupRichListItem",component:n,decorators:[e=>({template:'<div style="display: flex;padding: 16px;"><story/></div>'})]},x={isExpanded:!1,borderColor:null,borderColorHex:"",backgroundColor:g.NEUTRAL,parent_size:a.MEDIUM,parent_elevation:null,parent_isDimmed:!1,parent_isDraggable:!1,parent_hasDraggableHandler:!0,parent_icon:null,parent_iconColor:c.NEUTRAL_WEAK,parent_iconColorHex:"",parent_hasActionsSlotDivider:!0,parent_isSelectable:!0,parent_isSelected:!0,parent_state:s.DEFAULT,parent_isInteractive:!0,child_size:a.MEDIUM,child_elevation:null,child_isDimmed:!1,child_isDraggable:!1,child_hasDraggableHandler:!0,child_icon:null,child_iconColor:c.NEUTRAL_WEAK,child_iconColorHex:"",child_hasActionsSlotDivider:!0,child_isSelectable:!0,child_isSelected:!0,child_state:s.DEFAULT,child_isInteractive:!0},H={borderColor:{options:[null,...Object.values(D)],control:"select"},borderColorHex:{control:"text"},backgroundColor:{options:Object.values(g),control:"select"},parent_state:{options:Object.values(s),control:"select"},parent_size:{options:Object.values(a),control:"select"},parent_iconColor:{options:Object.values(c),control:"select"},parent_icon:{options:[null,...Object.keys(d)],control:"select"},parent_iconColorHex:{control:"text"},parent_elevation:{options:[null,...Object.values(_)],control:"select"},child_state:{options:Object.values(s),control:"select"},child_size:{options:Object.values(a),control:"select"},child_iconColor:{options:Object.values(c),control:"select"},child_icon:{options:[null,...Object.keys(d)],control:"select"},child_iconColorHex:{control:"text"},child_elevation:{options:[null,...Object.values(_)],control:"select"}},l="<template #content>Content slot</template><template #metadata>Metadata slot</template><template #actions>ACS</template>",v=e=>(e.argTypes=H,e.args=x,e.parameters={layout:"fullscreen",design:{type:"figma",url:"https://www.figma.com/file/izQdYyiBR1GQgFkaOIfIJI/LMS---DS-Components?type=design&node-id=8505-126430&mode=design&t=7Ay1DzrwONAPwSGv-4"}},e),L=e=>{const[O,t]=E();return{components:{GroupRichListItem:n,RichListItem:b,Divider:T},setup(){return e},data(){return{RICH_LIST_ITEM_TYPE:Object.freeze(S),RICH_LIST_ITEM_STATE:Object.freeze(s),ICONS:Object.freeze(d)}},methods:{updateParentIsSelected(i){t({parent_isSelected:i})},updateChildIsSelected(i){t({child_isSelected:i})},onClick(){t({isExpanded:!this.isExpanded})}},template:`
2
2
  <group-rich-list-item
3
3
  :is-expanded="isExpanded"
4
4
  :border-color="borderColor"
@@ -1,4 +1,4 @@
1
- import{O as i,a,b as s,c as r}from"./OutlineItem-DqMRN7G1.js";import{C as d}from"./Chip-CkWK9-eU.js";import{I as t}from"./Icon-BPz80dqH.js";import"./vue.esm-bundler-DmkhfO_9.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./IconButton-gTykCZIi.js";import"./Button-yeAor0pZ.js";import"./device-9fgosCm4.js";const x={title:"Components/Outline/OutlineItem",component:i},p=c=>({components:{OutlineItem:i,DsChip:d},setup(){return c},data(){return{ICONS:Object.freeze(t)}},template:`
1
+ import{O as i,a,b as s,c as r}from"./OutlineItem-DqMRN7G1.js";import{C as d}from"./Chip-DmzVP4Nc.js";import{I as t}from"./Icon-BPz80dqH.js";import"./vue.esm-bundler-DmkhfO_9.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Button-yeAor0pZ.js";import"./IconButton-gTykCZIi.js";import"./device-9fgosCm4.js";const x={title:"Components/Outline/OutlineItem",component:i},p=c=>({components:{OutlineItem:i,DsChip:d},setup(){return c},data(){return{ICONS:Object.freeze(t)}},template:`
2
2
  <outline-item :label="label" :additional-text="additionalText" :size="size" :state="state"
3
3
  :icon-left="ICONS[iconLeft]" :icon-right="ICONS[iconRight]" :is-done="isDone"
4
4
  :is-selected="isSelected" :background-color="backgroundColor" :index="index"
@@ -1,4 +1,4 @@
1
- import{i as n,R as l,a as c,b as m,c as d,d as _,e as p,f}from"./GroupRichListItem-B5zdEDgJ.js";import{c as g,I as s}from"./Icon-BPz80dqH.js";import"./Avatar-U_7Z6nZ2.js";import"./Badge-DSmH78WU.js";import"./BadgeScore-GfZixoUY.js";import"./Banner-DDGfdClH.js";import"./Button-yeAor0pZ.js";import"./ToggleButton-eR3n1vbs.js";import"./Card-BzXb8FVb.js";import"./CardExpandable-t59MJJJ1.js";import"./DatePicker-CYB-OeHU.js";import"./DateRangePicker-BY0ptzDm.js";import"./Divider-CeZli6az.js";import"./FeatureIcon-Zls5aPDA.js";import"./IconButton-gTykCZIi.js";import"./string-CFc0pFCE.js";import"./Modal-D7RDnkRT.js";import"./ModalDialog-D-FrIv9r.js";import"./NumberInCircle-CYZFaZ00.js";import"./TabItem-Cceq5FQB.js";import"./Tile-DvjxsEPO.js";import"./Toast-DKAzASvr.js";import"./AccessStatus-BKJi9u47.js";import"./BlockadeStatus-D6w6lZhK.js";import"./SurveyToggle-BECsKZHH.js";import"./SurveyQuestionScale-I7rmD2z-.js";import"./SurveyQuestionOpenEnded-DUybHAVt.js";import"./SectionHeader-CwB5neO2.js";import"./PageHeader-C5oCP3S2.js";import"./SectionTitle-BQZh7aFs.js";import"./Drawer-BAhS1Aex.js";import"./DrawerContent-BC_l9IKr.js";import"./DrawerDivider-DuTuIbLz.js";import"./DrawerHeader-6iOWRU4r.js";import"./DrawerListItem-BCPF0NKt.js";import"./DrawerListItemGroup-BTfrsZ_p.js";import"./DrawerTile-CTrRTsz5.js";import"./DrawerSection-B6PrbMVD.js";import"./OutlineItem-DqMRN7G1.js";import"./OutlineDivider-DItdz99b.js";import"./OutlineSectionHeader-CtypBCqR.js";import"./Chip-CkWK9-eU.js";import"./CounterToggle-UTpNPOSH.js";import"./SelectList-T6eJOYPv.js";import"./SelectListItem-DPuR0fG2.js";import"./SelectListItemDivider-CTuILyj9.js";import"./SelectListItemToggle-Bd5zU5Vc.js";import"./SelectListItemTile-CWD-7N0p.js";import"./SelectListSectionTitle-BOCjrVHo.js";import"./SelectionTile-7OHQEA9w.js";import"./LoadingBar-C1yAImWt.js";import"./PopOver-DlmHqZVO.js";import"./Dropdown-B75bqkCY.js";import"./ProgressBar-DcRQqf-M.js";import"./ProgressDonutChart-O1ep3At7.js";import"./IconText-7zvo_ew8.js";import"./Pagination-xRPA6q3h.js";import"./OverlayHeader-D3BWUMCs.js";import"./Well-Chn1RK_x.js";import"./ThreeColumnLayout-CFf8NRwP.js";import"./BasicRichListItem-CjGmKgW-.js";import"./Switch-C8il24TP.js";import"./TextGroup-D5le3QVY.js";import"./Tooltip-DB8acOEc.js";import{I as y}from"./Image-B9jnhF_n.js";import"./Skeleton-DMxKKJ0Z.js";import{w as x}from"./decorator-CSnIf-k5.js";import"./vue.esm-bundler-DmkhfO_9.js";import"./Checkbox-K_NwPnQU.js";import"./SelectionControl-Xe-aYMrS.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./iframe-C7WPYr8K.js";import"../sb-preview/runtime.js";import"./device-9fgosCm4.js";import"./user-_JB5aHqq.js";import"./vue-popper-DQfdblyw.js";import"./_commonjsHelpers-Chg3vePA.js";import"./v4-BZawosSj.js";const{useArgs:S}=__STORYBOOK_MODULE_PREVIEW_API__,Xe={title:"Components/RichList/RichListItem",component:n,decorators:[e=>({components:{story:e},template:"<div style='display: flex;padding: 16px;'><story /></div>"}),x]},O=(e,a={})=>(e.argTypes={type:{options:Object.values(l),control:"select"},size:{options:Object.values(c),control:"select"},layout:{options:Object.values(m),control:{type:"select"}},state:{options:Object.values(d),control:"select"},iconColor:{options:Object.values(g),control:"select"},borderColor:{options:[null,...Object.values(_)],control:"select"},icon:{options:[null,...Object.keys(s)],control:"select"},iconColorHex:{control:"text"},borderColorHex:{control:"text"},content:{control:"text"},metadata:{control:"text"},actions:{control:"text"},draggableIconClassName:{control:"text"},backgroundColor:{options:[null,...Object.values(p)],control:"select"},elevation:{options:[null,...Object.values(f)],control:"select"}},e.args={size:c.MEDIUM,type:l.DEFAULT,layout:m.HORIZONTAL,backgroundColor:p.NEUTRAL,elevation:null,isDimmed:!1,isDraggable:!0,hasDraggableHandler:!0,icon:null,iconColor:g.NEUTRAL_WEAK,iconColorHex:"",hasActionsSlotDivider:!0,isSelectable:!0,isSelected:!0,borderColor:null,borderColorHex:"",state:d.DEFAULT,isInteractive:!0,draggableIconClassName:"draggableIconClassName-1",content:"Content Slot",metadata:"Metadata Slot",actions:"ACS",...a},e.parameters={actions:{handles:["icon-click","click","update:is-selected"]},layout:"fullscreen",design:{type:"figma",url:"https://www.figma.com/file/izQdYyiBR1GQgFkaOIfIJI/LMS---DS-Components?type=design&node-id=8507-129603&mode=design&t=dC5vBzU9RlP1j7G2-4"}},e),D=e=>{const[a,i]=S();return{components:{RichListItem:n},setup(){return e},data(){return{ICONS:Object.freeze(s)}},methods:{updateIsSelected(r){i({isSelected:r})}},template:`
1
+ import{i as n,R as l,a as c,b as m,c as d,d as _,e as p,f}from"./GroupRichListItem-8v8vJXgH.js";import{c as g,I as s}from"./Icon-BPz80dqH.js";import"./Avatar-DUThlKLV.js";import"./Badge-DSmH78WU.js";import"./BadgeScore-GfZixoUY.js";import"./Banner-DDGfdClH.js";import"./Button-yeAor0pZ.js";import"./ToggleButton-eR3n1vbs.js";import"./Card-BzXb8FVb.js";import"./CardExpandable-t59MJJJ1.js";import"./DatePicker-Bc1APlab.js";import"./DateRangePicker-CNuyzpfG.js";import"./Divider-CeZli6az.js";import"./FeatureIcon-Zls5aPDA.js";import"./IconButton-gTykCZIi.js";import"./string-CFc0pFCE.js";import"./Modal-D7RDnkRT.js";import"./ModalDialog-D-FrIv9r.js";import"./NumberInCircle-CYZFaZ00.js";import"./TabItem-Cceq5FQB.js";import"./Tile-DvjxsEPO.js";import"./Toast-DKAzASvr.js";import"./AccessStatus-BKJi9u47.js";import"./BlockadeStatus-D6w6lZhK.js";import"./SurveyToggle-BECsKZHH.js";import"./SurveyQuestionScale-I7rmD2z-.js";import"./SurveyQuestionOpenEnded-DUybHAVt.js";import"./SectionHeader-CwB5neO2.js";import"./PageHeader-C5oCP3S2.js";import"./SectionTitle-BQZh7aFs.js";import"./Drawer-BAhS1Aex.js";import"./DrawerContent-BC_l9IKr.js";import"./DrawerDivider-DuTuIbLz.js";import"./DrawerHeader-CivXan1m.js";import"./DrawerListItem-BCPF0NKt.js";import"./DrawerListItemGroup-BTfrsZ_p.js";import"./DrawerTile-CTrRTsz5.js";import"./DrawerSection-B6PrbMVD.js";import"./OutlineItem-DqMRN7G1.js";import"./OutlineDivider-DItdz99b.js";import"./OutlineSectionHeader-CtypBCqR.js";import"./Chip-DmzVP4Nc.js";import"./CounterToggle-UTpNPOSH.js";import"./SelectList-T6eJOYPv.js";import"./SelectListItem-DPuR0fG2.js";import"./SelectListItemDivider-CTuILyj9.js";import"./SelectListItemToggle-Bd5zU5Vc.js";import"./SelectListItemTile-CWD-7N0p.js";import"./SelectListSectionTitle-BOCjrVHo.js";import"./SelectionTile-D9A_Tf3q.js";import"./LoadingBar-C1yAImWt.js";import"./PopOver-DlmHqZVO.js";import"./Dropdown-B75bqkCY.js";import"./ProgressBar-DcRQqf-M.js";import"./ProgressDonutChart-O1ep3At7.js";import"./IconText-7zvo_ew8.js";import"./Pagination-xRPA6q3h.js";import"./OverlayHeader-D3BWUMCs.js";import"./Well-Chn1RK_x.js";import"./ThreeColumnLayout-CFf8NRwP.js";import"./BasicRichListItem-CEiYZukO.js";import"./Switch-C8il24TP.js";import"./TextGroup-D5le3QVY.js";import"./Tooltip-DB8acOEc.js";import{I as y}from"./Image-B9jnhF_n.js";import"./Skeleton-DMxKKJ0Z.js";import{w as x}from"./decorator-CSnIf-k5.js";import"./vue.esm-bundler-DmkhfO_9.js";import"./Checkbox-K_NwPnQU.js";import"./SelectionControl-Xe-aYMrS.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./iframe-BmaPoam5.js";import"../sb-preview/runtime.js";import"./device-9fgosCm4.js";import"./user-_JB5aHqq.js";import"./vue-popper-DQfdblyw.js";import"./_commonjsHelpers-Chg3vePA.js";import"./v4-BZawosSj.js";const{useArgs:S}=__STORYBOOK_MODULE_PREVIEW_API__,Xe={title:"Components/RichList/RichListItem",component:n,decorators:[e=>({components:{story:e},template:"<div style='display: flex;padding: 16px;'><story /></div>"}),x]},O=(e,a={})=>(e.argTypes={type:{options:Object.values(l),control:"select"},size:{options:Object.values(c),control:"select"},layout:{options:Object.values(m),control:{type:"select"}},state:{options:Object.values(d),control:"select"},iconColor:{options:Object.values(g),control:"select"},borderColor:{options:[null,...Object.values(_)],control:"select"},icon:{options:[null,...Object.keys(s)],control:"select"},iconColorHex:{control:"text"},borderColorHex:{control:"text"},content:{control:"text"},metadata:{control:"text"},actions:{control:"text"},draggableIconClassName:{control:"text"},backgroundColor:{options:[null,...Object.values(p)],control:"select"},elevation:{options:[null,...Object.values(f)],control:"select"}},e.args={size:c.MEDIUM,type:l.DEFAULT,layout:m.HORIZONTAL,backgroundColor:p.NEUTRAL,elevation:null,isDimmed:!1,isDraggable:!0,hasDraggableHandler:!0,icon:null,iconColor:g.NEUTRAL_WEAK,iconColorHex:"",hasActionsSlotDivider:!0,isSelectable:!0,isSelected:!0,borderColor:null,borderColorHex:"",state:d.DEFAULT,isInteractive:!0,draggableIconClassName:"draggableIconClassName-1",content:"Content Slot",metadata:"Metadata Slot",actions:"ACS",...a},e.parameters={actions:{handles:["icon-click","click","update:is-selected"]},layout:"fullscreen",design:{type:"figma",url:"https://www.figma.com/file/izQdYyiBR1GQgFkaOIfIJI/LMS---DS-Components?type=design&node-id=8507-129603&mode=design&t=dC5vBzU9RlP1j7G2-4"}},e),D=e=>{const[a,i]=S();return{components:{RichListItem:n},setup(){return e},data(){return{ICONS:Object.freeze(s)}},methods:{updateIsSelected(r){i({isSelected:r})}},template:`
2
2
  <rich-list-item
3
3
  :size="size"
4
4
  :type="type"
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Checkbox-K_NwPnQU.js","./vue.esm-bundler-DmkhfO_9.js","./SelectionControl-Xe-aYMrS.js","./Icon-BPz80dqH.js","./_plugin-vue_export-helper-DlAUqK2U.js","./RadioButton-CO43G0Ta.js"])))=>i.map(i=>d[i]);
2
- import{_ as d}from"./iframe-C7WPYr8K.js";import{d as L,y as u,t as O,c as r,a as i,b as c,z as m,j as p,g as T,n as _,r as f,o as n}from"./vue.esm-bundler-DmkhfO_9.js";import{a as C,I as E,b as N}from"./Icon-BPz80dqH.js";import{a as o,b as A,S as g}from"./SelectionControl-Xe-aYMrS.js";import{_ as D}from"./_plugin-vue_export-helper-DlAUqK2U.js";const a={RADIO_BUTTON:"radioButton",CHECKBOX:"checkbox"},t={DEFAULT:"default",DISABLED:"disabled",LOADING:"loading"},y={[t.DEFAULT]:o.DEFAULT,[t.LOADING]:o.LOADING,[t.DISABLED]:o.DISABLED},I=L({name:"SelectionTile",components:{SelectionControl:A,Icon:C,Checkbox:u(()=>d(()=>import("./Checkbox-K_NwPnQU.js").then(e=>e.b),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),RadioButton:u(()=>d(()=>import("./RadioButton-CO43G0Ta.js").then(e=>e.c),__vite__mapDeps([5,1,2,3,4]),import.meta.url))},props:{type:{type:String,default:a.RADIO_BUTTON,validator(e){return Object.values(a).includes(e)}},title:{type:String,required:!0},supportingText:{type:String,default:null},icon:{type:Object,default:null,validator(e){return Object.values(E).includes(O(e))}},isSelected:{type:Boolean,default:!1},state:{type:String,default:t.DEFAULT,validator(e){return Object.values(t).includes(e)}}},emits:["update:is-selected","icon-click"],data(){return{ICONS:Object.freeze(E),ICON_SIZES:Object.freeze(N),SELECTION_CONTROL_SIZE:Object.freeze(g),SELECTION_TILE_STATE:Object.freeze(t),SELECTION_TILE_TYPE:Object.freeze(a),SELECTION_CONTROL_STATE_MAP:y,inputIsFocused:!1}},computed:{isLoading(){return this.state===t.LOADING}},methods:{updateIsSelected(e){this.isLoading||this.state===t.DISABLED||this.$emit("update:is-selected",e)},onIconClick(e){this.isLoading||(e.stopPropagation(),this.$emit("icon-click"))},onInputFocus(){this.inputIsFocused=!0},onInputBlur(){this.inputIsFocused=!1}}}),b={class:"ds-selectionTile__wrapper"},v={class:"ds-selectionTile__textWrapper"},B={class:"ds-selectionTile__title"},k={key:0,class:"ds-selectionTile__supportingText"};function h(e,s,R,F,j,z){const S=f("icon");return n(),r("div",{class:_(["ds-selectionTile",[{"-ds-selected":e.isSelected,"-ds-default":e.state===e.SELECTION_TILE_STATE.DEFAULT,"-ds-disabled":e.state===e.SELECTION_TILE_STATE.DISABLED,"-ds-loading":e.isLoading,"-ds-focused":e.inputIsFocused&&!e.isLoading}]]),onClick:s[1]||(s[1]=l=>e.updateIsSelected(!e.isSelected))},[i("div",b,[(n(),c(m(e.type===e.SELECTION_TILE_TYPE.RADIO_BUTTON?"radio-button":"checkbox"),{size:e.SELECTION_CONTROL_SIZE.X_SMALL,"is-selected":e.isSelected,state:e.SELECTION_CONTROL_STATE_MAP[e.state],"onUpdate:isSelected":s[0]||(s[0]=l=>e.updateIsSelected(l)),"onInput:focus":e.onInputFocus,"onInput:blur":e.onInputBlur},null,40,["size","is-selected","state","onInput:focus","onInput:blur"])),i("div",v,[i("div",B,p(e.title),1),e.supportingText?(n(),r("div",k,p(e.supportingText),1)):T("",!0)])]),e.icon||e.isLoading?(n(),c(S,{key:0,class:"ds-selectionTile__icon",icon:e.isLoading?e.ICONS.FAD_SPINNER_THIRD:e.icon,size:e.ICON_SIZES.X_SMALL,spinning:e.isLoading,onClick:e.onIconClick},null,8,["icon","size","spinning","onClick"])):T("",!0)],2)}const G=D(I,[["render",h],["__scopeId","data-v-e2d48501"]]);I.__docgenInfo={displayName:"SelectionTile",exportName:"default",description:"",tags:{},props:[{name:"type",type:{name:"SelectionTileType"},defaultValue:{func:!1,value:"SELECTION_TILE_TYPE.RADIO_BUTTON"}},{name:"title",type:{name:"string"},required:!0},{name:"supportingText",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"icon",type:{name:"object"},defaultValue:{func:!1,value:"null"}},{name:"isSelected",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"state",type:{name:"SelectionTileState"},defaultValue:{func:!1,value:"SELECTION_TILE_STATE.DEFAULT"}}],events:[{name:"update:is-selected",type:{names:["undefined"]}},{name:"icon-click"}],sourceFiles:["/home/runner/work/design-system/design-system/lib/js/components/SelectionTile/SelectionTile.vue"]};export{G as S,a,t as b};
2
+ import{_ as d}from"./iframe-BmaPoam5.js";import{d as L,y as u,t as O,c as r,a as i,b as c,z as m,j as p,g as T,n as _,r as f,o as n}from"./vue.esm-bundler-DmkhfO_9.js";import{a as C,I as E,b as N}from"./Icon-BPz80dqH.js";import{a as o,b as A,S as g}from"./SelectionControl-Xe-aYMrS.js";import{_ as D}from"./_plugin-vue_export-helper-DlAUqK2U.js";const a={RADIO_BUTTON:"radioButton",CHECKBOX:"checkbox"},t={DEFAULT:"default",DISABLED:"disabled",LOADING:"loading"},y={[t.DEFAULT]:o.DEFAULT,[t.LOADING]:o.LOADING,[t.DISABLED]:o.DISABLED},I=L({name:"SelectionTile",components:{SelectionControl:A,Icon:C,Checkbox:u(()=>d(()=>import("./Checkbox-K_NwPnQU.js").then(e=>e.b),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),RadioButton:u(()=>d(()=>import("./RadioButton-CO43G0Ta.js").then(e=>e.c),__vite__mapDeps([5,1,2,3,4]),import.meta.url))},props:{type:{type:String,default:a.RADIO_BUTTON,validator(e){return Object.values(a).includes(e)}},title:{type:String,required:!0},supportingText:{type:String,default:null},icon:{type:Object,default:null,validator(e){return Object.values(E).includes(O(e))}},isSelected:{type:Boolean,default:!1},state:{type:String,default:t.DEFAULT,validator(e){return Object.values(t).includes(e)}}},emits:["update:is-selected","icon-click"],data(){return{ICONS:Object.freeze(E),ICON_SIZES:Object.freeze(N),SELECTION_CONTROL_SIZE:Object.freeze(g),SELECTION_TILE_STATE:Object.freeze(t),SELECTION_TILE_TYPE:Object.freeze(a),SELECTION_CONTROL_STATE_MAP:y,inputIsFocused:!1}},computed:{isLoading(){return this.state===t.LOADING}},methods:{updateIsSelected(e){this.isLoading||this.state===t.DISABLED||this.$emit("update:is-selected",e)},onIconClick(e){this.isLoading||(e.stopPropagation(),this.$emit("icon-click"))},onInputFocus(){this.inputIsFocused=!0},onInputBlur(){this.inputIsFocused=!1}}}),b={class:"ds-selectionTile__wrapper"},v={class:"ds-selectionTile__textWrapper"},B={class:"ds-selectionTile__title"},k={key:0,class:"ds-selectionTile__supportingText"};function h(e,s,R,F,j,z){const S=f("icon");return n(),r("div",{class:_(["ds-selectionTile",[{"-ds-selected":e.isSelected,"-ds-default":e.state===e.SELECTION_TILE_STATE.DEFAULT,"-ds-disabled":e.state===e.SELECTION_TILE_STATE.DISABLED,"-ds-loading":e.isLoading,"-ds-focused":e.inputIsFocused&&!e.isLoading}]]),onClick:s[1]||(s[1]=l=>e.updateIsSelected(!e.isSelected))},[i("div",b,[(n(),c(m(e.type===e.SELECTION_TILE_TYPE.RADIO_BUTTON?"radio-button":"checkbox"),{size:e.SELECTION_CONTROL_SIZE.X_SMALL,"is-selected":e.isSelected,state:e.SELECTION_CONTROL_STATE_MAP[e.state],"onUpdate:isSelected":s[0]||(s[0]=l=>e.updateIsSelected(l)),"onInput:focus":e.onInputFocus,"onInput:blur":e.onInputBlur},null,40,["size","is-selected","state","onInput:focus","onInput:blur"])),i("div",v,[i("div",B,p(e.title),1),e.supportingText?(n(),r("div",k,p(e.supportingText),1)):T("",!0)])]),e.icon||e.isLoading?(n(),c(S,{key:0,class:"ds-selectionTile__icon",icon:e.isLoading?e.ICONS.FAD_SPINNER_THIRD:e.icon,size:e.ICON_SIZES.X_SMALL,spinning:e.isLoading,onClick:e.onIconClick},null,8,["icon","size","spinning","onClick"])):T("",!0)],2)}const G=D(I,[["render",h],["__scopeId","data-v-e2d48501"]]);I.__docgenInfo={displayName:"SelectionTile",exportName:"default",description:"",tags:{},props:[{name:"type",type:{name:"SelectionTileType"},defaultValue:{func:!1,value:"SELECTION_TILE_TYPE.RADIO_BUTTON"}},{name:"title",type:{name:"string"},required:!0},{name:"supportingText",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"icon",type:{name:"object"},defaultValue:{func:!1,value:"null"}},{name:"isSelected",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"state",type:{name:"SelectionTileState"},defaultValue:{func:!1,value:"SELECTION_TILE_STATE.DEFAULT"}}],events:[{name:"update:is-selected",type:{names:["undefined"]}},{name:"icon-click"}],sourceFiles:["/home/runner/work/design-system/design-system/lib/js/components/SelectionTile/SelectionTile.vue"]};export{G as S,a,t as b};
@@ -1,4 +1,4 @@
1
- import{S as i,a as c,b as l}from"./SelectionTile-7OHQEA9w.js";import{I as r}from"./Icon-BPz80dqH.js";import{w as d}from"./decorator-CSnIf-k5.js";import"./iframe-C7WPYr8K.js";import"../sb-preview/runtime.js";import"./vue.esm-bundler-DmkhfO_9.js";import"./SelectionControl-Xe-aYMrS.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./v4-BZawosSj.js";const{useArgs:m}=__STORYBOOK_MODULE_PREVIEW_API__,k={title:"Components/SelectionTile",component:i,decorators:[t=>({components:{story:t},template:"<div style='display: flex; max-width: 300px;'><story /></div>"}),d]},S=t=>{const[u,p]=m();return{components:{SelectionTile:i},setup(){return t},methods:{onIsSelectedUpdated(a){p({isSelected:a})},onIconClick(){alert("Klik w ikonę")}},data(){return{ICONS:Object.freeze(r)}},template:`
1
+ import{S as i,a as c,b as l}from"./SelectionTile-D9A_Tf3q.js";import{I as r}from"./Icon-BPz80dqH.js";import{w as d}from"./decorator-CSnIf-k5.js";import"./iframe-BmaPoam5.js";import"../sb-preview/runtime.js";import"./vue.esm-bundler-DmkhfO_9.js";import"./SelectionControl-Xe-aYMrS.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./v4-BZawosSj.js";const{useArgs:m}=__STORYBOOK_MODULE_PREVIEW_API__,k={title:"Components/SelectionTile",component:i,decorators:[t=>({components:{story:t},template:"<div style='display: flex; max-width: 300px;'><story /></div>"}),d]},S=t=>{const[u,p]=m();return{components:{SelectionTile:i},setup(){return t},methods:{onIsSelectedUpdated(a){p({isSelected:a})},onIconClick(){alert("Klik w ikonę")}},data(){return{ICONS:Object.freeze(r)}},template:`
2
2
  <SelectionTile
3
3
  :title="title"
4
4
  :supporting-text="supportingText"