Demo updates

This commit is contained in:
Tuğçe Küçükoğlu 2023-05-02 14:27:56 +03:00
parent 7ac501359f
commit 643059eb24
8 changed files with 86 additions and 64 deletions

View file

@ -5,13 +5,11 @@
<Button label="Block" @click="blocked = true" class="mr-2"></Button> <Button label="Block" @click="blocked = true" class="mr-2"></Button>
<Button label="Unblock" @click="blocked = false"></Button> <Button label="Unblock" @click="blocked = false"></Button>
</div> </div>
<BlockUI :blocked="blocked" :pt="{ root: { class: 'bg-red-100' } }"> <BlockUI :blocked="blocked" :pt="{ root: { class: 'surface-ground p-2 border-round-sm' } }">
<Panel header="Basic"> <p class="m-0">
<p class="m-0"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </p>
</p>
</Panel>
</BlockUI> </BlockUI>
</div> </div>
<DocSectionCode :code="code" /> <DocSectionCode :code="code" />
@ -24,26 +22,29 @@ export default {
blocked: false, blocked: false,
code: { code: {
basic: ` basic: `
<Badge value="2" <BlockUI :blocked="blocked" :pt="{ root: { class: 'surface-ground p-2 border-round-sm' } }">
:pt="{ <p class="m-0">
root: { class: 'bg-primary border-round-sm' } Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
}" Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
/>`, </p>
</BlockUI>`,
options: ` options: `
<template> <template>
<Badge value="2" <BlockUI :blocked="blocked" :pt="{ root: { class: 'surface-ground p-2 border-round-sm' } }">
:pt="{ <p class="m-0">
root: { class: 'bg-primary border-round-sm' } Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
}" Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
/> </p>
</BlockUI>
</template>`, </template>`,
composition: ` composition: `
<template> <template>
<Badge value="2" <BlockUI :blocked="blocked" :pt="{ root: { class: 'surface-ground p-2 border-round-sm' } }">
:pt="{ <p class="m-0">
root: { class: 'bg-primary border-round-sm' } Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
}" Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
/> </p>
</BlockUI>
</template>` </template>`
} }
}; };

View file

@ -6,7 +6,7 @@
ref="menu" ref="menu"
:model="items" :model="items"
:pt="{ :pt="{
action: ({ props, state, options }) => ({ class: options.active ? 'bg-primary-200' : options.focused ? 'bg-primary-300' : undefined }) action: ({ props, state, context }) => ({ class: context.active ? 'bg-primary-200' : context.focused ? 'bg-primary-300' : undefined })
}" }"
/> />
</div> </div>
@ -150,7 +150,7 @@ export default {
ref="menu" ref="menu"
:model="items" :model="items"
:pt="{ :pt="{
action: ({ props, state, options }) => ({ class: options.active ? 'bg-primary-200' : options.focused ? 'bg-primary-300' : undefined }) action: ({ props, state, context }) => ({ class: context.active ? 'bg-primary-200' : context.focused ? 'bg-primary-300' : undefined })
}" }"
/>`, />`,
options: ` options: `
@ -161,7 +161,7 @@ export default {
ref="menu" ref="menu"
:model="items" :model="items"
:pt="{ :pt="{
action: ({ props, state, options }) => ({ class: options.active ? 'bg-primary-200' : options.focused ? 'bg-primary-300' : undefined }) action: ({ props, state, context }) => ({ class: context.active ? 'bg-primary-200' : context.focused ? 'bg-primary-300' : undefined })
}" }"
/> />
</div> </div>
@ -314,7 +314,7 @@ export default {
ref="menu" ref="menu"
:model="items" :model="items"
:pt="{ :pt="{
action: ({ props, state, options }) => ({ class: options.active ? 'bg-primary-200' : options.focused ? 'bg-primary-300' : undefined }) action: ({ props, state, context }) => ({ class: context.active ? 'bg-primary-200' : context.focused ? 'bg-primary-300' : undefined })
}" }"
/> />
</div> </div>

View file

@ -4,8 +4,8 @@
<MegaMenu <MegaMenu
:model="items" :model="items"
:pt="{ :pt="{
action: ({ props, state, options }) => ({ action: ({ props, state, context }) => ({
class: options.active ? 'bg-primary-200 border-round-sm' : options.focused ? 'bg-primary-300 border-round-sm' : undefined class: context.active ? 'bg-primary-200 border-round-sm' : context.focused ? 'bg-primary-300 border-round-sm' : undefined
}) })
}" }"
/> />
@ -138,8 +138,8 @@ export default {
<MegaMenu <MegaMenu
:model="items" :model="items"
:pt="{ :pt="{
action: ({ props, state, options }) => ({ action: ({ props, state, context }) => ({
class: options.active ? 'bg-primary-200 border-round-sm' : options.focused ? 'bg-primary-300 border-round-sm' : undefined class: context.active ? 'bg-primary-200 border-round-sm' : context.focused ? 'bg-primary-300 border-round-sm' : undefined
}) })
}" }"
/>`, />`,
@ -149,8 +149,8 @@ export default {
<MegaMenu <MegaMenu
:model="items" :model="items"
:pt="{ :pt="{
action: ({ props, state, options }) => ({ action: ({ props, state, context }) => ({
class: options.active ? 'bg-primary-200 border-round-sm' : options.focused ? 'bg-primary-300 border-round-sm' : undefined class: context.active ? 'bg-primary-200 border-round-sm' : context.focused ? 'bg-primary-300 border-round-sm' : undefined
}) })
}" }"
/> />
@ -287,8 +287,8 @@ export default {
<MegaMenu <MegaMenu
:model="items" :model="items"
:pt="{ :pt="{
action: ({ props, state, options }) => ({ action: ({ props, state, context }) => ({
class: options.active ? 'bg-primary-200 border-round-sm' : options.focused ? 'bg-primary-300 border-round-sm' : undefined class: context.active ? 'bg-primary-200 border-round-sm' : context.focused ? 'bg-primary-300 border-round-sm' : undefined
}) })
}" }"
/> />

View file

@ -5,8 +5,8 @@
:model="items" :model="items"
:pt="{ :pt="{
submenuHeader: { class: 'text-surface-900' }, submenuHeader: { class: 'text-surface-900' },
action: ({ props, state, options }) => ({ action: ({ props, state, context }) => ({
class: options.focused ? 'bg-primary-400' : undefined class: context.focused ? 'bg-primary-400' : undefined
}) })
}" }"
/> />
@ -60,8 +60,8 @@ export default {
:model="items" :model="items"
:pt="{ :pt="{
submenuHeader: { class: 'text-surface-900' }, submenuHeader: { class: 'text-surface-900' },
action: ({ props, state, options }) => ({ action: ({ props, state, context }) => ({
class: options.focused ? 'bg-primary-400' : undefined class: context.focused ? 'bg-primary-400' : undefined
}) })
}" }"
/>`, />`,
@ -72,8 +72,8 @@ export default {
:model="items" :model="items"
:pt="{ :pt="{
submenuHeader: { class: 'text-surface-900' }, submenuHeader: { class: 'text-surface-900' },
action: ({ props, state, options }) => ({ action: ({ props, state, context }) => ({
class: options.focused ? 'bg-primary-400' : undefined class: context.focused ? 'bg-primary-400' : undefined
}) })
}" }"
/> />
@ -132,8 +132,8 @@ export default {
:model="items" :model="items"
:pt="{ :pt="{
submenuHeader: { class: 'text-surface-900' }, submenuHeader: { class: 'text-surface-900' },
action: ({ props, state, options }) => ({ action: ({ props, state, context }) => ({
class: options.focused ? 'bg-primary-400' : undefined class: context.focused ? 'bg-primary-400' : undefined
}) })
}" }"
/> />

View file

@ -4,8 +4,8 @@
<Menubar <Menubar
:model="items" :model="items"
:pt="{ :pt="{
action: ({ props, state, options }) => ({ action: ({ props, state, context }) => ({
class: options.active ? 'bg-primary-200 border-round-sm' : options.focused ? 'bg-primary-300 border-round-sm' : undefined class: context.active ? 'bg-primary-200 border-round-sm' : context.focused ? 'bg-primary-300 border-round-sm' : undefined
}) })
}" }"
/> />
@ -145,8 +145,8 @@ export default {
<Menubar <Menubar
:model="items" :model="items"
:pt="{ :pt="{
action: ({ props, state, options }) => ({ action: ({ props, state, context }) => ({
class: options.active ? 'bg-primary-200 border-round-sm' : options.focused ? 'bg-primary-300 border-round-sm' : undefined class: context.active ? 'bg-primary-200 border-round-sm' : context.focused ? 'bg-primary-300 border-round-sm' : undefined
}) })
}" }"
/>`, />`,
@ -156,8 +156,8 @@ export default {
<Menubar <Menubar
:model="items" :model="items"
:pt="{ :pt="{
action: ({ props, state, options }) => ({ action: ({ props, state, context }) => ({
class: options.active ? 'bg-primary-200 border-round-sm' : options.focused ? 'bg-primary-300 border-round-sm' : undefined class: context.active ? 'bg-primary-200 border-round-sm' : context.focused ? 'bg-primary-300 border-round-sm' : undefined
}) })
}" }"
/> />
@ -301,8 +301,8 @@ export default {
<Menubar <Menubar
:model="items" :model="items"
:pt="{ :pt="{
action: ({ props, state, options }) => ({ action: ({ props, state, context }) => ({
class: options.active ? 'bg-primary-200 border-round-sm' : options.focused ? 'bg-primary-300 border-round-sm' : undefined class: context.active ? 'bg-primary-200 border-round-sm' : context.focused ? 'bg-primary-300 border-round-sm' : undefined
}) })
}" }"
/> />

View file

@ -53,7 +53,7 @@ export default {
root: { class: 'surface-ground' } root: { class: 'surface-ground' }
} }
}" }"
/>`, />`,
options: ` options: `
<template> <template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">

View file

@ -4,8 +4,8 @@
<TabMenu <TabMenu
:model="items" :model="items"
:pt="{ :pt="{
action: ({ props, state, options }) => ({ action: ({ props, state, context }) => ({
class: options.order === state.d_activeIndex ? 'bg-primary' : undefined class: context.order === state.d_activeIndex ? 'bg-primary' : undefined
}) })
}" }"
/> />
@ -44,8 +44,8 @@ export default {
<TabMenu <TabMenu
:model="items" :model="items"
:pt="{ :pt="{
action: ({ props, state, index }) => ({ action: ({ props, state, context }) => ({
class: index === state.d_activeIndex ? 'bg-primary' : undefined class: context.order === state.d_activeIndex ? 'bg-primary' : undefined
}) })
}" }"
/>`, />`,
@ -55,8 +55,8 @@ export default {
<TabMenu <TabMenu
:model="items" :model="items"
:pt="{ :pt="{
action: ({ props, state, index }) => ({ action: ({ props, state, context }) => ({
class: index === state.d_activeIndex ? 'bg-primary' : undefined class: context.order === state.d_activeIndex ? 'bg-primary' : undefined
}) })
}" }"
/> />
@ -99,8 +99,8 @@ export default {
<TabMenu <TabMenu
:model="items" :model="items"
:pt="{ :pt="{
action: ({ props, state, index }) => ({ action: ({ props, state, context }) => ({
class: index === state.d_activeIndex ? 'bg-primary' : undefined class: context.order === state.d_activeIndex ? 'bg-primary' : undefined
}) })
}" }"
/> />

View file

@ -4,8 +4,8 @@
<TieredMenu <TieredMenu
:model="items" :model="items"
:pt="{ :pt="{
action: ({ props, state, options }) => ({ action: ({ props, state, context }) => ({
class: options.active ? 'bg-primary-200 border-round-sm' : options.focused ? 'bg-primary-300 border-round-sm' : undefined class: context.active ? 'bg-primary-200 border-round-sm' : context.focused ? 'bg-primary-300 border-round-sm' : undefined
}) })
}" }"
/> />
@ -145,11 +145,25 @@ export default {
], ],
code: { code: {
basic: ` basic: `
<TieredMenu :model="items" />`, <TieredMenu
:model="items"
:pt="{
action: ({ props, state, context }) => ({
class: context.active ? 'bg-primary-200 border-round-sm' : context.focused ? 'bg-primary-300 border-round-sm' : undefined
})
}"
/>`,
options: ` options: `
<template> <template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<TieredMenu :model="items" /> <TieredMenu
:model="items"
:pt="{
action: ({ props, state, context }) => ({
class: context.active ? 'bg-primary-200 border-round-sm' : context.focused ? 'bg-primary-300 border-round-sm' : undefined
})
}"
/>
</div> </div>
</template> </template>
@ -290,7 +304,14 @@ export default {
composition: ` composition: `
<template> <template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<TieredMenu :model="items" /> <TieredMenu
:model="items"
:pt="{
action: ({ props, state, context }) => ({
class: context.active ? 'bg-primary-200 border-round-sm' : context.focused ? 'bg-primary-300 border-round-sm' : undefined
})
}"
/>
</div> </div>
</template> </template>