@designcrowd/fe-shared-lib 1.5.27-ENG-3954 → 1.5.27
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/.storybook-static/assets/Auth-BEjq1pFf.css +1 -0
- package/.storybook-static/assets/Auth.stories-6JyBk-uq.js +490 -0
- package/.storybook-static/assets/AuthCrazyDomains.stories-DM4RpsMO.js +73 -0
- package/.storybook-static/assets/Button-BkoQdoaq.css +1 -0
- package/.storybook-static/assets/Button-DUOSTNbh.js +1 -0
- package/.storybook-static/assets/ButtonGroup-DDPXuhxR.css +1 -0
- package/.storybook-static/assets/ButtonGroup.stories-DYoET5Zw.js +504 -0
- package/.storybook-static/assets/ButtonPrimary-Bu6bXb_c.css +1 -0
- package/.storybook-static/assets/ButtonPrimary-C1HLT2L3.js +1 -0
- package/.storybook-static/assets/Buttons.stories-aTFEest4.js +761 -0
- package/.storybook-static/assets/ButtonsCrazyDomains.stories-BDEdg2Ki.js +199 -0
- package/.storybook-static/assets/Checkbox.mixin-DkHpdvGa.js +1 -0
- package/.storybook-static/assets/Checkbox.stories-CA6Ke9oy.js +246 -0
- package/.storybook-static/assets/Checktile.stories-DAvOuYro.js +88 -0
- package/.storybook-static/assets/CollapsiblePanel.stories-Dn1XwwpU.js +56 -0
- package/.storybook-static/assets/ColorPicker.stories-DTkwaAKN.js +73 -0
- package/.storybook-static/assets/CopyToClipboardText.stories-CYAv-s36.js +32 -0
- package/.storybook-static/assets/Dropdown.stories-hHlWTMpq.js +159 -0
- package/.storybook-static/assets/DropdownItem-BIPkoata.js +1 -0
- package/.storybook-static/assets/DropdownItem-BV-BdThU.css +1 -0
- package/.storybook-static/assets/FormControl.mixin-Z8ORnl4_.js +1 -0
- package/.storybook-static/assets/HashRouteModal.stories-t0ZML3rG.js +64 -0
- package/.storybook-static/assets/HelloBar-YB27gvZE.js +1 -0
- package/.storybook-static/assets/HelloBar.stories-D4kmUZop.js +342 -0
- package/.storybook-static/assets/Icon-BKxOWZPO.js +145 -0
- package/.storybook-static/assets/Icon.stories-BqE4TmG1.js +151 -0
- package/.storybook-static/assets/Icon.stories-Fv8jSyX3.js +791 -0
- package/.storybook-static/assets/Loader-DLZpiqG9.js +1 -0
- package/.storybook-static/assets/LogoBusinessBrandColours-CeAaMKke.css +1 -0
- package/.storybook-static/assets/LogoBusinessBrandColours-CnS5MYDX.js +1 -0
- package/.storybook-static/assets/LogoBusinessBrandColours.stories-QdrZqhMQ.js +36 -0
- package/.storybook-static/assets/Masonry-C2MNiGg0.css +1 -0
- package/.storybook-static/assets/Masonry.stories-CYO67z8l.js +71 -0
- package/.storybook-static/assets/Modal-CGwEIF5R.css +1 -0
- package/.storybook-static/assets/Modal-DWDuRSAE.js +1 -0
- package/.storybook-static/assets/Modal.stories-uhl_4yGf.js +345 -0
- package/.storybook-static/assets/Notice.stories-BP3l1NFU.js +222 -0
- package/.storybook-static/assets/NumberStepper-Blffv09R.css +1 -0
- package/.storybook-static/assets/NumberStepper.stories-BeUZfA-C.js +64 -0
- package/.storybook-static/assets/PaymentConfigList-BpUMV6cp.css +1 -0
- package/.storybook-static/assets/PaymentConfigList.stories-CVHxg1ka.js +130 -0
- package/.storybook-static/assets/Picture-CPyaAiI1.js +1 -0
- package/.storybook-static/assets/Picture.stories-BdQ6Koo2.js +119 -0
- package/.storybook-static/assets/Pill-CpGZCb39.js +1 -0
- package/.storybook-static/assets/Pill.stories-BVDivYOY.js +18 -0
- package/.storybook-static/assets/PillBar-os4mJV3M.css +1 -0
- package/.storybook-static/assets/PillBar.stories-Dgp2DDmF.js +41 -0
- package/.storybook-static/assets/Price-BBo_v_DU.js +1 -0
- package/.storybook-static/assets/Price.stories-JstP9L09.js +358 -0
- package/.storybook-static/assets/PromoCard.stories-CWKGBEKG.js +299 -0
- package/.storybook-static/assets/PublishBrandPageModal-Q9-mNG1q.css +1 -0
- package/.storybook-static/assets/PublishBrandPageModal.stories-CYEZ4ls2.js +324 -0
- package/.storybook-static/assets/SearchBar.stories-CfVmuWji.js +12 -0
- package/.storybook-static/assets/Select-Dw-zvSUg.css +1 -0
- package/.storybook-static/assets/Select.stories-EdNZQHYu.js +108 -0
- package/.storybook-static/assets/SellDomainNameList.fixtures-LC6fjr_b.js +1 -0
- package/.storybook-static/assets/SellDomainNameListModal-C7mOVElo.js +1 -0
- package/.storybook-static/assets/SellDomainNameListModal-DH6khE10.css +1 -0
- package/.storybook-static/assets/SellDomainNameListModal.stories-DFwSK3G7.js +71 -0
- package/.storybook-static/assets/SellDomainNameListSearchResult-Cpxq0jDA.css +1 -0
- package/.storybook-static/assets/SellDomainNameListSearchResult-Cx22LEIX.js +1 -0
- package/.storybook-static/assets/SellDomainNameSearchWithResults-DFzBhj00.js +1 -0
- package/.storybook-static/assets/SellDomainNameSearchWithResults.stories-DKGuPPpj.js +37 -0
- package/.storybook-static/assets/SellDomainNameWidget.stories-DNnX4xt_.js +36 -0
- package/.storybook-static/assets/SignIn-CE_SoJx-.css +1 -0
- package/.storybook-static/assets/SignIn-IL0CRcdp.js +1 -0
- package/.storybook-static/assets/Slider-Cog2FFdj.css +1 -0
- package/.storybook-static/assets/Slider.stories-CMJ5ugMO.js +141 -0
- package/.storybook-static/assets/SparkleIcon.stories-BZksmQE5.js +547 -0
- package/.storybook-static/assets/StarRating-BtKh7pzm.css +1 -0
- package/.storybook-static/assets/StarRating.stories-ChJp556v.js +45 -0
- package/.storybook-static/assets/TabMenu.stories-wiuV4LXX.js +47 -0
- package/.storybook-static/assets/TextCopyField-Dzv5HIy6.js +1 -0
- package/.storybook-static/assets/TextCopyField.stories-CijK8qce.js +47 -0
- package/.storybook-static/assets/TextInput-BHzkiJOm.js +1 -0
- package/.storybook-static/assets/TextInput.stories-58ZMik7R.js +233 -0
- package/.storybook-static/assets/Textarea.stories-JRiJv3-v.js +207 -0
- package/.storybook-static/assets/Toggle.stories-CTp5mIN9.js +161 -0
- package/.storybook-static/assets/Tooltip-BhRZYr7B.js +1 -0
- package/.storybook-static/assets/Tooltip-DyXIgFQH.css +1 -0
- package/.storybook-static/assets/Tooltip.stories-DEHShenH.js +953 -0
- package/.storybook-static/assets/UploadYourLogoApplication-nGy7BMKH.css +9 -0
- package/.storybook-static/assets/UploadYourLogoApplication.stories-Cdk8mmFd.js +194 -0
- package/.storybook-static/assets/UploadYourLogoDropzone-BoFs5oM3.js +24 -0
- package/.storybook-static/assets/UploadYourLogoDropzone-DQqACf-e.css +1 -0
- package/.storybook-static/assets/UploadYourLogoDropzone.stories-BVr13-q9.js +55 -0
- package/.storybook-static/assets/UploadedLogoSearchResultCard.stories-BUMq40yJ.js +79 -0
- package/.storybook-static/assets/WebsiteContextualUpgradeModal-BaDRNoWw.css +1 -0
- package/.storybook-static/assets/WebsiteContextualUpgradeModal.stories-DsIAXVdb.js +211 -0
- package/.storybook-static/assets/_commonjsHelpers-D6-XlEtG.js +1 -0
- package/.storybook-static/assets/_plugin-vue_export-helper-DlAUqK2U.js +1 -0
- package/.storybook-static/assets/api-lSJGRrF2.js +1 -0
- package/.storybook-static/assets/axe-CVuRbXyi.js +30 -0
- package/.storybook-static/assets/brand-crowd-api.client-BI9zXww7.js +1 -0
- package/.storybook-static/assets/bundled-translations-BoWhEDU_.js +1 -0
- package/.storybook-static/assets/bundled-translations.de-DE-C4lqla4O.js +1 -0
- package/.storybook-static/assets/bundled-translations.es-ES-BxMIllUH.js +1 -0
- package/.storybook-static/assets/bundled-translations.fr-CA-MxZpyz0w.js +1 -0
- package/.storybook-static/assets/bundled-translations.fr-FR-N7UPCZVr.js +1 -0
- package/.storybook-static/assets/bundled-translations.pt-BR-C8tscYuG.js +1 -0
- package/.storybook-static/assets/bundled-translations.pt-PT-Dszj5Xfa.js +1 -0
- package/.storybook-static/assets/carousel-BelyIYOK.css +1 -0
- package/.storybook-static/assets/carousel.stories-IeFZNB6E.js +668 -0
- package/.storybook-static/assets/event-constants-CMO9VQVu.js +1 -0
- package/.storybook-static/assets/iframe-Dd7cBPzL.js +1126 -0
- package/.storybook-static/assets/index-Bz4la0P9.js +6 -0
- package/.storybook-static/assets/index-_aBqSnL8.js +29 -0
- package/.storybook-static/assets/matchers-7Z3WT2CE-OIiPHzXs.js +14 -0
- package/.storybook-static/assets/mediaQueryMixin-CISNqd93.js +1 -0
- package/.storybook-static/assets/tracking-ATsLLehC.js +1 -0
- package/.storybook-static/css/tailwind-brandCrowd.css +2508 -0
- package/.storybook-static/css/tailwind-brandPage.css +2188 -0
- package/.storybook-static/css/tailwind-crazyDomains.css +2508 -0
- package/.storybook-static/css/tailwind-designCom.css +2508 -0
- package/.storybook-static/css/tailwind-designCrowd.css +2508 -0
- package/.storybook-static/favicon.svg +1 -0
- package/.storybook-static/iframe.html +694 -0
- package/.storybook-static/index.html +156 -0
- package/.storybook-static/index.json +1 -0
- package/.storybook-static/nunito-sans-bold-italic.woff2 +0 -0
- package/.storybook-static/nunito-sans-bold.woff2 +0 -0
- package/.storybook-static/nunito-sans-italic.woff2 +0 -0
- package/.storybook-static/nunito-sans-regular.woff2 +0 -0
- package/.storybook-static/project.json +1 -0
- package/.storybook-static/sb-addons/a11y-1/manager-bundle.js +5 -0
- package/.storybook-static/sb-addons/links-2/manager-bundle.js +3 -0
- package/.storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +188 -0
- package/.storybook-static/sb-addons/themes-3/manager-bundle.js +3 -0
- package/.storybook-static/sb-common-assets/favicon.svg +1 -0
- package/.storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/.storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/.storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/.storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/.storybook-static/sb-manager/globals-module-info.js +797 -0
- package/.storybook-static/sb-manager/globals-runtime.js +72062 -0
- package/.storybook-static/sb-manager/globals.js +34 -0
- package/.storybook-static/sb-manager/runtime.js +13002 -0
- package/dist/css/tailwind-brandCrowd.css +113 -7
- package/dist/css/tailwind-brandPage.css +109 -7
- package/dist/css/tailwind-crazyDomains.css +113 -7
- package/dist/css/tailwind-designCom.css +113 -7
- package/dist/css/tailwind-designCrowd.css +113 -7
- package/package.json +1 -1
- package/src/atoms/components/Button/variants/ButtonGray.vue +7 -5
- package/src/atoms/components/Icon/Icon.stories.js +7 -2
- package/src/atoms/components/Icon/Icon.vue +15 -19
- package/src/atoms/components/Price/Price.stories.js +42 -21
- package/src/experiences/components/WebsitesContextualUpgradeModal/WebsiteContextualUpgradeModal.vue +4 -5
- package/tailwind.config.js +1 -1
- package/src/atoms/components/Icon/icons/crown-alt.vue +0 -5
- package/src/atoms/components/Icon/icons/crown.vue +0 -6
- package/src/experiences/components/SideNavigationPanel/MenuCta.vue +0 -62
- package/src/experiences/components/SideNavigationPanel/MenuItem.vue +0 -47
- package/src/experiences/components/SideNavigationPanel/SideNavigationPanel.stories.js +0 -219
- package/src/experiences/components/SideNavigationPanel/SideNavigationPanel.vue +0 -57
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component :is="componentTag" class="menu-item" :class="variantClasses" v-bind="componentAttrs" @click="handleClick">
|
|
3
|
-
<Icon v-if="icon" :name="icon" :size="iconSize" />
|
|
4
|
-
<span>{{ label }}</span>
|
|
5
|
-
</component>
|
|
6
|
-
</template>
|
|
7
|
-
|
|
8
|
-
<script setup lang="ts">
|
|
9
|
-
import { computed } from 'vue';
|
|
10
|
-
import Icon from '../../../atoms/components/Icon/Icon.vue';
|
|
11
|
-
|
|
12
|
-
type MenuCtaVariant = 'primary' | 'secondary' | 'empty';
|
|
13
|
-
|
|
14
|
-
interface MenuCtaProps {
|
|
15
|
-
label: string;
|
|
16
|
-
variant?: MenuCtaVariant;
|
|
17
|
-
icon?: string;
|
|
18
|
-
iconSize?: 'sm' | 'md' | 'lg';
|
|
19
|
-
url?: string;
|
|
20
|
-
action?: () => void;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const props = withDefaults(defineProps<MenuCtaProps>(), {
|
|
24
|
-
variant: 'primary',
|
|
25
|
-
iconSize: 'sm',
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
const emit = defineEmits<{
|
|
29
|
-
click: [event: MouseEvent];
|
|
30
|
-
}>();
|
|
31
|
-
|
|
32
|
-
const componentTag = computed(() => (props.action ? 'button' : 'a'));
|
|
33
|
-
|
|
34
|
-
const componentAttrs = computed(() => (props.action ? {} : { href: props.url }));
|
|
35
|
-
|
|
36
|
-
const variantClasses = computed(() => {
|
|
37
|
-
switch (props.variant) {
|
|
38
|
-
case 'primary':
|
|
39
|
-
return 'tw-bg-primary-500 tw-text-white hover:tw-bg-primary-700';
|
|
40
|
-
case 'secondary':
|
|
41
|
-
return 'tw-justify-center tw-bg-secondary-500 tw-text-white hover:tw-bg-secondary-700';
|
|
42
|
-
case 'empty':
|
|
43
|
-
return 'tw-justify-center tw-text-grayscale-700 hover:tw-bg-gray-600 tw-text-center';
|
|
44
|
-
default:
|
|
45
|
-
return '';
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
const handleClick = (event: MouseEvent) => {
|
|
50
|
-
if (props.action) {
|
|
51
|
-
props.action();
|
|
52
|
-
}
|
|
53
|
-
emit('click', event);
|
|
54
|
-
};
|
|
55
|
-
</script>
|
|
56
|
-
|
|
57
|
-
<style scoped>
|
|
58
|
-
.menu-item {
|
|
59
|
-
@apply tw-p-2 tw-flex tw-gap-2 tw-items-center tw-rounded-lg tw-font-normal tw-cursor-pointer;
|
|
60
|
-
height: 36px;
|
|
61
|
-
}
|
|
62
|
-
</style>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component
|
|
3
|
-
:is="componentTag"
|
|
4
|
-
class="menu-item"
|
|
5
|
-
:class="{ 'tw-bg-grayscale-400': isActive, 'hover:tw-bg-grayscale-300': !isActive }"
|
|
6
|
-
v-bind="componentAttrs"
|
|
7
|
-
@click="handleClick"
|
|
8
|
-
>
|
|
9
|
-
<Icon class="icon" :name="icon" size="sm" />
|
|
10
|
-
<span class="tw-text-md tw-font-medium tw-text-grayscale-700">{{ label }}</span>
|
|
11
|
-
</component>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script setup lang="ts">
|
|
15
|
-
import { computed } from 'vue';
|
|
16
|
-
import Icon from '../../../atoms/components/Icon/Icon.vue';
|
|
17
|
-
|
|
18
|
-
type IMenuItem = {
|
|
19
|
-
label: string;
|
|
20
|
-
url?: string;
|
|
21
|
-
action?: () => void;
|
|
22
|
-
icon: string;
|
|
23
|
-
isActive: boolean;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const props = defineProps<IMenuItem>();
|
|
27
|
-
|
|
28
|
-
const componentTag = computed(() => (props.action ? 'button' : 'a'));
|
|
29
|
-
|
|
30
|
-
const componentAttrs = computed(() => (props.action ? {} : { href: props.url }));
|
|
31
|
-
|
|
32
|
-
const handleClick = () => {
|
|
33
|
-
if (props.action) {
|
|
34
|
-
props.action();
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
</script>
|
|
38
|
-
|
|
39
|
-
<style scoped>
|
|
40
|
-
.menu-item {
|
|
41
|
-
@apply tw-p-2 tw-mb-1 tw-flex tw-gap-2 tw-items-center tw-rounded-lg tw-cursor-pointer;
|
|
42
|
-
height: 36px;
|
|
43
|
-
}
|
|
44
|
-
.icon svg {
|
|
45
|
-
color: var(--text-secondary, rgba(61, 61, 61, 1));
|
|
46
|
-
}
|
|
47
|
-
</style>
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import SideNavigationPanel from './SideNavigationPanel.vue';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Experiences/SideNavigationPanel',
|
|
5
|
-
component: SideNavigationPanel,
|
|
6
|
-
argTypes: {
|
|
7
|
-
menuItems: {
|
|
8
|
-
control: 'object',
|
|
9
|
-
description: 'Array of menu items with label, url, icon, and isActive properties',
|
|
10
|
-
},
|
|
11
|
-
createNewDesignCta: {
|
|
12
|
-
control: 'object',
|
|
13
|
-
description: 'CTA object for "Create New Design" button with url property',
|
|
14
|
-
},
|
|
15
|
-
upgradeCta: {
|
|
16
|
-
control: 'object',
|
|
17
|
-
description: 'CTA object for "Upgrade" button with url property',
|
|
18
|
-
},
|
|
19
|
-
rateCta: {
|
|
20
|
-
control: 'object',
|
|
21
|
-
description: 'CTA object for "Rate Design.com" button with action property',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
parameters: {
|
|
25
|
-
layout: 'fullscreen',
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
// Default menu items representing a typical navigation structure
|
|
30
|
-
const defaultMenuItems = [
|
|
31
|
-
{ label: 'Logos', icon: 'star-hollow', url: '#logos', isActive: true, action: undefined },
|
|
32
|
-
{ label: 'Designs', icon: 'designs', url: '#designs', isActive: false, action: undefined },
|
|
33
|
-
{ label: 'Printing', icon: 'printing', url: '#printing', isActive: false, action: undefined },
|
|
34
|
-
{ label: 'Websites', icon: 'website', url: '#websites', isActive: false, action: undefined },
|
|
35
|
-
{ label: 'Domains', icon: 'globe', url: '#domains', isActive: false, action: undefined },
|
|
36
|
-
{ label: 'Settings', icon: 'settings', url: '#settings', isActive: false, action: undefined },
|
|
37
|
-
];
|
|
38
|
-
|
|
39
|
-
const defaultCreateNewDesignCta = {
|
|
40
|
-
url: '#create-new-design',
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const defaultUpgradeCta = {
|
|
44
|
-
url: '#upgrade',
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
const defaultRateCta = {
|
|
48
|
-
action: () => console.log('Rate Design.com clicked'),
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const Template = (args) => ({
|
|
52
|
-
components: { SideNavigationPanel },
|
|
53
|
-
setup() {
|
|
54
|
-
return { args };
|
|
55
|
-
},
|
|
56
|
-
template: `
|
|
57
|
-
<div style="width: 100vw; height: 100vh; display: flex;">
|
|
58
|
-
<SideNavigationPanel v-bind="args" />
|
|
59
|
-
<div style="flex: 1; padding: 2rem; background: white;">
|
|
60
|
-
<h1 style="font-size: 2rem; margin-bottom: 1rem;">Content Area</h1>
|
|
61
|
-
<p>This is where your main content would appear. The side navigation panel is on the left.</p>
|
|
62
|
-
<p style="margin-top: 1rem;">Click on the menu items to see the active state change (in a real app).</p>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
`,
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
export const Default = Template.bind({});
|
|
69
|
-
Default.args = {
|
|
70
|
-
menuItems: defaultMenuItems,
|
|
71
|
-
createNewDesignCta: defaultCreateNewDesignCta,
|
|
72
|
-
upgradeCta: defaultUpgradeCta,
|
|
73
|
-
rateCta: defaultRateCta,
|
|
74
|
-
};
|
|
75
|
-
Default.parameters = {
|
|
76
|
-
docs: {
|
|
77
|
-
description: {
|
|
78
|
-
story: 'Default side navigation panel with all CTAs and the first menu item active.',
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export const DesignsActive = Template.bind({});
|
|
84
|
-
DesignsActive.args = {
|
|
85
|
-
menuItems: [
|
|
86
|
-
{ label: 'Logos', icon: 'star-hollow', url: '#logos', isActive: false, action: undefined },
|
|
87
|
-
{ label: 'Designs', icon: 'designs', url: '#designs', isActive: true, action: undefined },
|
|
88
|
-
{ label: 'Printing', icon: 'printing', url: '#printing', isActive: false, action: undefined },
|
|
89
|
-
{ label: 'Websites', icon: 'website', url: '#websites', isActive: false, action: undefined },
|
|
90
|
-
{ label: 'Domains', icon: 'globe', url: '#domains', isActive: false, action: undefined },
|
|
91
|
-
{ label: 'Settings', icon: 'settings', url: '#settings', isActive: false, action: undefined },
|
|
92
|
-
],
|
|
93
|
-
createNewDesignCta: defaultCreateNewDesignCta,
|
|
94
|
-
upgradeCta: defaultUpgradeCta,
|
|
95
|
-
rateCta: defaultRateCta,
|
|
96
|
-
};
|
|
97
|
-
DesignsActive.parameters = {
|
|
98
|
-
docs: {
|
|
99
|
-
description: {
|
|
100
|
-
story: 'Side navigation panel with the "Designs" menu item active.',
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export const SettingsActive = Template.bind({});
|
|
106
|
-
SettingsActive.args = {
|
|
107
|
-
menuItems: [
|
|
108
|
-
{ label: 'Logos', icon: 'star-hollow', url: '#logos', isActive: false, action: undefined },
|
|
109
|
-
{ label: 'Designs', icon: 'designs', url: '#designs', isActive: false, action: undefined },
|
|
110
|
-
{ label: 'Printing', icon: 'printing', url: '#printing', isActive: false, action: undefined },
|
|
111
|
-
{ label: 'Websites', icon: 'website', url: '#websites', isActive: false, action: undefined },
|
|
112
|
-
{ label: 'Domains', icon: 'globe', url: '#domains', isActive: false, action: undefined },
|
|
113
|
-
{ label: 'Settings', icon: 'settings', url: '#settings', isActive: true, action: undefined },
|
|
114
|
-
],
|
|
115
|
-
createNewDesignCta: defaultCreateNewDesignCta,
|
|
116
|
-
upgradeCta: defaultUpgradeCta,
|
|
117
|
-
rateCta: defaultRateCta,
|
|
118
|
-
};
|
|
119
|
-
SettingsActive.parameters = {
|
|
120
|
-
docs: {
|
|
121
|
-
description: {
|
|
122
|
-
story: 'Side navigation panel with the "Settings" menu item active.',
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
export const NoActiveItem = Template.bind({});
|
|
128
|
-
NoActiveItem.args = {
|
|
129
|
-
menuItems: [
|
|
130
|
-
{ label: 'Logos', icon: 'star-hollow', url: '#logos', isActive: false, action: undefined },
|
|
131
|
-
{ label: 'Designs', icon: 'designs', url: '#designs', isActive: false, action: undefined },
|
|
132
|
-
{ label: 'Printing', icon: 'printing', url: '#printing', isActive: false, action: undefined },
|
|
133
|
-
{ label: 'Websites', icon: 'website', url: '#websites', isActive: false, action: undefined },
|
|
134
|
-
{ label: 'Domains', icon: 'globe', url: '#domains', isActive: false, action: undefined },
|
|
135
|
-
{ label: 'Settings', icon: 'settings', url: '#settings', isActive: false, action: undefined },
|
|
136
|
-
],
|
|
137
|
-
createNewDesignCta: defaultCreateNewDesignCta,
|
|
138
|
-
upgradeCta: defaultUpgradeCta,
|
|
139
|
-
rateCta: defaultRateCta,
|
|
140
|
-
};
|
|
141
|
-
NoActiveItem.parameters = {
|
|
142
|
-
docs: {
|
|
143
|
-
description: {
|
|
144
|
-
story: 'Side navigation panel with no active menu item.',
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
export const WithActionBasedMenuItems = Template.bind({});
|
|
150
|
-
WithActionBasedMenuItems.args = {
|
|
151
|
-
menuItems: [
|
|
152
|
-
{ label: 'Logos', icon: 'star-hollow', url: '#logos', isActive: true, action: undefined },
|
|
153
|
-
{ label: 'Designs', icon: 'designs', url: '#designs', isActive: false, action: undefined },
|
|
154
|
-
{
|
|
155
|
-
label: 'Export Data',
|
|
156
|
-
icon: 'download',
|
|
157
|
-
url: undefined,
|
|
158
|
-
isActive: false,
|
|
159
|
-
action: () => console.log('Export data action triggered'),
|
|
160
|
-
},
|
|
161
|
-
{ label: 'Websites', icon: 'website', url: '#websites', isActive: false, action: undefined },
|
|
162
|
-
{ label: 'Settings', icon: 'settings', url: '#settings', isActive: false, action: undefined },
|
|
163
|
-
],
|
|
164
|
-
createNewDesignCta: defaultCreateNewDesignCta,
|
|
165
|
-
upgradeCta: defaultUpgradeCta,
|
|
166
|
-
rateCta: defaultRateCta,
|
|
167
|
-
};
|
|
168
|
-
WithActionBasedMenuItems.parameters = {
|
|
169
|
-
docs: {
|
|
170
|
-
description: {
|
|
171
|
-
story:
|
|
172
|
-
'Side navigation panel with an action-based menu item (Export Data) that triggers a function instead of navigation. Check console for action output.',
|
|
173
|
-
},
|
|
174
|
-
},
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
export const MinimalMenuItems = Template.bind({});
|
|
178
|
-
MinimalMenuItems.args = {
|
|
179
|
-
menuItems: [
|
|
180
|
-
{ label: 'Dashboard', icon: 'star-hollow', url: '#dashboard', isActive: true, action: undefined },
|
|
181
|
-
{ label: 'Projects', icon: 'designs', url: '#projects', isActive: false, action: undefined },
|
|
182
|
-
{ label: 'Help', icon: 'help', url: '#help', isActive: false, action: undefined },
|
|
183
|
-
],
|
|
184
|
-
createNewDesignCta: defaultCreateNewDesignCta,
|
|
185
|
-
upgradeCta: defaultUpgradeCta,
|
|
186
|
-
rateCta: defaultRateCta,
|
|
187
|
-
};
|
|
188
|
-
MinimalMenuItems.parameters = {
|
|
189
|
-
docs: {
|
|
190
|
-
description: {
|
|
191
|
-
story: 'Side navigation panel with a minimal set of menu items.',
|
|
192
|
-
},
|
|
193
|
-
},
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
export const ExtendedMenuItems = Template.bind({});
|
|
197
|
-
ExtendedMenuItems.args = {
|
|
198
|
-
menuItems: [
|
|
199
|
-
{ label: 'Logos', icon: 'star-hollow', url: '#logos', isActive: false, action: undefined },
|
|
200
|
-
{ label: 'Designs', icon: 'designs', url: '#designs', isActive: false, action: undefined },
|
|
201
|
-
{ label: 'Printing', icon: 'printing', url: '#printing', isActive: false, action: undefined },
|
|
202
|
-
{ label: 'Websites', icon: 'website', url: '#websites', isActive: true, action: undefined },
|
|
203
|
-
{ label: 'Domains', icon: 'globe', url: '#domains', isActive: false, action: undefined },
|
|
204
|
-
{ label: 'Marketing', icon: 'megaphone', url: '#marketing', isActive: false, action: undefined },
|
|
205
|
-
{ label: 'Analytics', icon: 'chart', url: '#analytics', isActive: false, action: undefined },
|
|
206
|
-
{ label: 'Billing', icon: 'creditcard', url: '#billing', isActive: false, action: undefined },
|
|
207
|
-
{ label: 'Settings', icon: 'settings', url: '#settings', isActive: false, action: undefined },
|
|
208
|
-
],
|
|
209
|
-
createNewDesignCta: defaultCreateNewDesignCta,
|
|
210
|
-
upgradeCta: defaultUpgradeCta,
|
|
211
|
-
rateCta: defaultRateCta,
|
|
212
|
-
};
|
|
213
|
-
ExtendedMenuItems.parameters = {
|
|
214
|
-
docs: {
|
|
215
|
-
description: {
|
|
216
|
-
story: 'Side navigation panel with an extended list of menu items to test scrolling behavior.',
|
|
217
|
-
},
|
|
218
|
-
},
|
|
219
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!-- Side Navigation Component following these figma designs: https://www.figma.com/design/UUZ56EQZbb1Ua9NBMm6Rt5/DCOM---My-Account-Left-Nav -->
|
|
3
|
-
<div class="sidebar">
|
|
4
|
-
<div class="menu tw-mb-4">
|
|
5
|
-
<MenuCta class="tw-mt-2 tw-mb-4" label="Create New Design" variant="primary" icon="plus" icon-size="xs" />
|
|
6
|
-
<div class="menuitemcontainer">
|
|
7
|
-
<MenuItem
|
|
8
|
-
v-for="item in menuItems"
|
|
9
|
-
:key="item.label"
|
|
10
|
-
:label="item.label"
|
|
11
|
-
:url="item.action ? '' : item.url"
|
|
12
|
-
:icon="item.icon"
|
|
13
|
-
:is-active="item.isActive"
|
|
14
|
-
/>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="ctas tw-flex tw-flex-col tw-gap-2">
|
|
18
|
-
<MenuCta label="Upgrade" variant="secondary" icon="crown" icon-size="sm" />
|
|
19
|
-
<MenuCta label="Rate Design.com" variant="empty" />
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
</template>
|
|
23
|
-
<script setup lang="ts">
|
|
24
|
-
import defineProps from 'vue';
|
|
25
|
-
import MenuCta from './MenuCta.vue';
|
|
26
|
-
import MenuItem from './MenuItem.vue';
|
|
27
|
-
|
|
28
|
-
type IMenuItem = {
|
|
29
|
-
label: string;
|
|
30
|
-
url: string | undefined;
|
|
31
|
-
action: Function | undefined; // might need to implement actions on menu items
|
|
32
|
-
icon: string;
|
|
33
|
-
isActive: Boolean;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const props = defineProps({
|
|
37
|
-
menuItems: {
|
|
38
|
-
type: Array<IMenuItem>,
|
|
39
|
-
required: true,
|
|
40
|
-
},
|
|
41
|
-
createNewDesignCta: {
|
|
42
|
-
type: Object,
|
|
43
|
-
required: true,
|
|
44
|
-
},
|
|
45
|
-
// ctaItems: {},
|
|
46
|
-
});
|
|
47
|
-
</script>
|
|
48
|
-
<style scoped>
|
|
49
|
-
.sidebar {
|
|
50
|
-
@apply tw-p-2 tw-flex tw-flex-col tw-h-full tw-justify-between tw-w-[14rem];
|
|
51
|
-
background-color: rgba(245, 245, 245, 1);
|
|
52
|
-
border-right: 1px rgba(227, 227, 227, 1) solid;
|
|
53
|
-
}
|
|
54
|
-
.ctas {
|
|
55
|
-
text-align: center;
|
|
56
|
-
}
|
|
57
|
-
</style>
|