@thinkpixellab-public/px-vue 5.0.2 → 5.1.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.
- package/README.md +10 -15
- package/bases/PxBaseScroll.vue +0 -1
- package/components/PxColorPanel.vue +2 -1
- package/components/PxFloat.vue +8 -0
- package/components/PxSelectionBar.vue +0 -1
- package/components/PxValidator.vue +0 -1
- package/composables/loadGsap.js +10 -10
- package/package.json +59 -41
- package/plugins/common-client.js +0 -3
- package/plugins/common.js +0 -3
- package/utils/SharedHeightManager.js +2 -2
- package/utils/cardGridLayoutHelper.js +1 -1
- package/utils/scrollWatcher.js +6 -6
- package/utils/smootherCorners.js +33 -38
- package/.eslintrc.js +0 -14
- package/.prettierrc.json +0 -10
- package/.storybook/main.js +0 -26
- package/.storybook/manager-head.html +0 -0
- package/.storybook/manager.js +0 -6
- package/.storybook/preview-head.html +0 -3
- package/.storybook/preview.js +0 -26
- package/.storybook/preview.scss +0 -3
- package/.storybook/px-styles.config.scss +0 -26
- package/babel.config.js +0 -16
- package/chromatic.config.json +0 -5
- package/dev/data/fruits.js +0 -59
- package/dev/data/random.js +0 -13
- package/dev/demos/Demo-PxBaseDrag.vue +0 -94
- package/dev/demos/Demo-PxCardGrid.vue +0 -50
- package/dev/demos/Demo-PxContain.vue +0 -106
- package/dev/demos/Demo-PxFlip.vue +0 -104
- package/dev/demos/Demo-PxFloat.vue +0 -105
- package/dev/demos/Demo-PxMenu.vue +0 -94
- package/dev/demos/Demo-PxPivot.vue +0 -55
- package/dev/demos/Demo-PxSideDrawer.vue +0 -62
- package/dev/demos/Demo-PxSlideTransition.vue +0 -84
- package/dev/demos/Demo-PxSlides.vue +0 -142
- package/dev/demos/Demo-PxStylesPreview.vue +0 -41
- package/dev/demos/Demo-PxSwiper.vue +0 -36
- package/dev/demos/DemoPicker.vue +0 -77
- package/dev/dev.vue +0 -64
- package/dev/serve.js +0 -17
- package/stories/Intro.mdx +0 -1
- package/stories/PxAnimate.stories.js +0 -184
- package/stories/PxArrow.stories.js +0 -74
- package/stories/PxArrowScroller.stories.js +0 -38
- package/stories/PxAspect.stories.js +0 -66
- package/stories/PxAutoClamp.stories.js +0 -47
- package/stories/PxBackgroundFader.stories.js +0 -42
- package/stories/PxBalancedText.stories.js +0 -66
- package/stories/PxButton.stories.js +0 -83
- package/stories/PxCalendar.stories.js +0 -36
- package/stories/PxCard.stories.js +0 -31
- package/stories/PxCardGrid.stories.js +0 -60
- package/stories/PxClock.stories.js +0 -36
- package/stories/PxCodeSample.stories.js +0 -53
- package/stories/PxColorPalette.stories.js +0 -59
- package/stories/PxColorPanel.stories.js +0 -31
- package/stories/PxColorPicker.stories.js +0 -41
- package/stories/PxContain.stories.js +0 -80
- package/stories/PxCopyText.stories.js +0 -35
- package/stories/PxCorners.stories.js +0 -187
- package/stories/PxDatePicker.stories.js +0 -36
- package/stories/PxDropdown.stories.js +0 -56
- package/stories/PxExpander.stories.js +0 -33
- package/stories/PxFit.stories.js +0 -40
- package/stories/PxFlex.stories.js +0 -41
- package/stories/PxFlip.stories.js +0 -51
- package/stories/PxFloat.stories.js +0 -147
- package/stories/PxGsapScrubber.stories.js +0 -36
- package/stories/PxIcon.stories.js +0 -189
- package/stories/PxIconButton.stories.js +0 -87
- package/stories/PxImage.stories.js +0 -113
- package/stories/PxLabeledInput.stories.js +0 -44
- package/stories/PxMeasureContainer.stories.js +0 -50
- package/stories/PxMenu.stories.js +0 -99
- package/stories/PxPivot.stories.js +0 -42
- package/stories/PxPopupButton.stories.js +0 -69
- package/stories/PxProgressCircle.stories.js +0 -39
- package/stories/PxQrCode.stories.js +0 -36
- package/stories/PxRadioButton.stories.js +0 -35
- package/stories/PxResizer.stories.js +0 -40
- package/stories/PxScrubber.stories.js +0 -58
- package/stories/PxSideDrawer.stories.js +0 -36
- package/stories/PxSlides.stories.js +0 -65
- package/stories/PxSpinner.stories.js +0 -37
- package/stories/PxSticky.stories.js +0 -36
- package/stories/PxSvg.stories.js +0 -46
- package/stories/PxSvgRender.stories.js +0 -40
- package/stories/PxSyncHeight.stories.js +0 -48
- package/stories/PxTable.stories.js +0 -145
- package/stories/PxTextbox.stories.js +0 -59
- package/stories/PxToggle.stories.js +0 -77
- package/stories/PxToggleButton.stories.js +0 -109
- package/stories/PxToggleButtonList.stories.js +0 -102
- package/stories/PxToolPanel.stories.js +0 -351
- package/stories/PxTransition.stories.js +0 -74
- package/stories/PxTransitionExpand.stories.js +0 -36
- package/stories/PxTransitionItem.stories.js +0 -36
- package/stories/PxValidator.stories.js +0 -100
- package/stories/assets/alpha.svg +0 -6
- package/stories/assets/alphaNoSizing.svg +0 -6
- package/stories/assets/alphaSizeWidth.svg +0 -6
- package/stories/assets/px-01.jpg +0 -0
- package/stories/assets/px-02.jpg +0 -0
- package/stories/assets/px-03.jpg +0 -0
- package/stories/assets/px-04.jpg +0 -0
- package/stories/makestories.js +0 -65
- package/stories/svgIcon.stories.js +0 -67
- package/storybook/sb-sampledata.js +0 -664
- package/storybook/sb-styles.scss +0 -200
- package/storybook/sb-utils.js +0 -30
- package/test/MockComponent.vue +0 -12
- package/test/PxBaseColor.test.js +0 -54
- package/test/PxBaseItems.test.js +0 -95
- package/test/PxBaseItemsSelect.test.js +0 -470
- package/test/PxBaseUniqueId.test.js +0 -29
- package/test/PxBaseVariants.test.js +0 -166
- package/test/PxBaseVariantsOverride.test.js +0 -87
- package/test/animation.test.js +0 -120
- package/test/cssStr.test.js +0 -287
- package/test/utils.test.js +0 -60
- package/test/variants.test.js +0 -92
- package/vite.config.js +0 -37
- package/vue.config.js +0 -12
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import PxImage from '@/components/PxImage.vue';
|
|
2
|
-
import PxButton from '@/components/PxButton.vue';
|
|
3
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
4
|
-
import px01jpg from '@/stories/assets/px-01.jpg';
|
|
5
|
-
import px02jpg from '@/stories/assets/px-02.jpg';
|
|
6
|
-
import px03jpg from '@/stories/assets/px-03.jpg';
|
|
7
|
-
import px04jpg from '@/stories/assets/px-04.jpg';
|
|
8
|
-
|
|
9
|
-
const localImages = [px01jpg, px02jpg, px03jpg, px04jpg];
|
|
10
|
-
|
|
11
|
-
const largeImages = [
|
|
12
|
-
'https://images.unsplash.com/photo-1738969773091-abcf274f7e0a?q=80&w=3000',
|
|
13
|
-
'https://images.unsplash.com/photo-1738940251292-49709608c8aa?q=80&w=5970',
|
|
14
|
-
'https://images.unsplash.com/photo-1551692554-d83872f34d55?q=80&w=3226',
|
|
15
|
-
];
|
|
16
|
-
|
|
17
|
-
const images = localImages;
|
|
18
|
-
|
|
19
|
-
// REFERENCE:
|
|
20
|
-
//
|
|
21
|
-
// https://storybook.js.org/docs/get-started/frameworks/vue3-vite?renderer=vue
|
|
22
|
-
// https://storybook.js.org/docs/vue/essentials/controls#annotation?renderer=vue
|
|
23
|
-
// https://storybook.js.org/docs/vue/api/argtypes#available-properties?renderer=vue
|
|
24
|
-
//
|
|
25
|
-
// See preview.scss for helper styles.
|
|
26
|
-
|
|
27
|
-
export default {
|
|
28
|
-
title: 'PxImage',
|
|
29
|
-
component: PxImage,
|
|
30
|
-
|
|
31
|
-
// decorators: [ ... ],
|
|
32
|
-
|
|
33
|
-
// parameters: {
|
|
34
|
-
// layout: 'fullscreen', // centered, fullscreen, padded (default)
|
|
35
|
-
// },
|
|
36
|
-
|
|
37
|
-
argTypes: {
|
|
38
|
-
...extractArgTypes(PxImage),
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
args: {
|
|
42
|
-
fit: 'contain',
|
|
43
|
-
position: null,
|
|
44
|
-
cacheBuster: 'cb',
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export const Basic = {
|
|
49
|
-
render: (args, { argTypes }) => ({
|
|
50
|
-
components: { PxImage, PxButton },
|
|
51
|
-
|
|
52
|
-
data() {
|
|
53
|
-
return {
|
|
54
|
-
args,
|
|
55
|
-
currentSourceIndex: -1,
|
|
56
|
-
};
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
template: `
|
|
60
|
-
|
|
61
|
-
<div class="story-aspect-16-9" style="overflow: hidden;">
|
|
62
|
-
<PxImage :src="currentSrc" v-bind="args"></PxImage>
|
|
63
|
-
</div>
|
|
64
|
-
<br>
|
|
65
|
-
<p style="max-width: 50em">NOTE: when running with cache disabled, cross fades may appear jumpy because the image will be reloaded while it's fading in. To allow easier visualization of loading (without cache disabled), we a cache buster to the urls when testing (so don't run with cache disabled).</p>
|
|
66
|
-
<div style="display: flex; gap: 1em;">
|
|
67
|
-
<PxButton @click="nextSource">Next Source</PxButton>
|
|
68
|
-
<PxButton @click="clearSource">Clear</PxButton>
|
|
69
|
-
<PxButton @click="invalidSource">Error</PxButton>
|
|
70
|
-
</div>
|
|
71
|
-
|
|
72
|
-
`,
|
|
73
|
-
|
|
74
|
-
computed: {
|
|
75
|
-
currentSrc() {
|
|
76
|
-
if (this.currentSourceIndex == -999) {
|
|
77
|
-
return 'https://thisurldoesnotexist.com/faker-mc-fakerson-face.jpg';
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if (this.currentSourceIndex == -1) {
|
|
81
|
-
return null;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
const src = images[this.currentSourceIndex];
|
|
85
|
-
const sep = src.includes('?') ? '&' : '?';
|
|
86
|
-
const cacheBuster = `${sep}${this.cacheBuster}=${Date.now()}`;
|
|
87
|
-
|
|
88
|
-
return src + cacheBuster;
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
methods: {
|
|
92
|
-
nextSource() {
|
|
93
|
-
const current = Math.max(this.currentSourceIndex, -1);
|
|
94
|
-
this.currentSourceIndex = (current + 1) % images.length;
|
|
95
|
-
},
|
|
96
|
-
clearSource() {
|
|
97
|
-
this.currentSourceIndex = -1;
|
|
98
|
-
},
|
|
99
|
-
invalidSource() {
|
|
100
|
-
this.currentSourceIndex = -999;
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
}),
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
// export const CovertBottomRight = {
|
|
107
|
-
// ...Basic,
|
|
108
|
-
// args: { fit: 'cover', position: 'bottom right' },
|
|
109
|
-
// };
|
|
110
|
-
|
|
111
|
-
// export const Advanced = {
|
|
112
|
-
// ...Basic,
|
|
113
|
-
// };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// Reference:
|
|
2
|
-
// https://storybook.js.org/blog/storybook-7-docs/
|
|
3
|
-
// https://storybook.js.org/docs/7.5/writing-docs/autodocs
|
|
4
|
-
|
|
5
|
-
import PxLabeledInput from '@/components/PxLabeledInput.vue';
|
|
6
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
component: PxLabeledInput,
|
|
10
|
-
// decorators: [ ... ],
|
|
11
|
-
// parameters: { ... },
|
|
12
|
-
|
|
13
|
-
// https://storybook.js.org/docs/vue/essentials/controls#annotation
|
|
14
|
-
// https://storybook.js.org/docs/vue/api/argtypes#available-properties
|
|
15
|
-
argTypes: {
|
|
16
|
-
...extractArgTypes(PxLabeledInput),
|
|
17
|
-
// someProp: { type: 'select', options: ['one', 'two', 'three'] }
|
|
18
|
-
},
|
|
19
|
-
args: {
|
|
20
|
-
label: 'My Input',
|
|
21
|
-
// onClick: () => {}),
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const Basic = {
|
|
26
|
-
// name: 'Story Name',
|
|
27
|
-
render: (args, { argTypes }) => ({
|
|
28
|
-
components: { PxLabeledInput },
|
|
29
|
-
setup() {
|
|
30
|
-
return { args };
|
|
31
|
-
},
|
|
32
|
-
template: `
|
|
33
|
-
<PxLabeledInput v-bind="args">
|
|
34
|
-
<template #default="{id}">
|
|
35
|
-
<input :id="id" type="text" />
|
|
36
|
-
</template>
|
|
37
|
-
</PxLabeledInput>`,
|
|
38
|
-
}),
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
// export const Advanced = {
|
|
42
|
-
// ...Basic,
|
|
43
|
-
// // args: { ... },
|
|
44
|
-
// };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import PxMeasureContainer from '@/components/PxMeasureContainer.vue';
|
|
2
|
-
import PxResizer from '@/components/PxResizer.vue';
|
|
3
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'PxMeasureContainer',
|
|
7
|
-
component: PxMeasureContainer,
|
|
8
|
-
|
|
9
|
-
// decorators: [ ... ],
|
|
10
|
-
// parameters: { ... },
|
|
11
|
-
|
|
12
|
-
// https://storybook.js.org/docs/vue/essentials/controls#annotation
|
|
13
|
-
// https://storybook.js.org/docs/vue/api/argtypes#available-properties
|
|
14
|
-
argTypes: {
|
|
15
|
-
...extractArgTypes(PxMeasureContainer),
|
|
16
|
-
// someProp: { type: 'select', options: ['one', 'two', 'three'] }
|
|
17
|
-
},
|
|
18
|
-
args: {
|
|
19
|
-
// label: 'Hello',
|
|
20
|
-
// onClick: () => {}),
|
|
21
|
-
debug: true,
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const Basic = {
|
|
26
|
-
render: (args, { argTypes }) => ({
|
|
27
|
-
components: { PxMeasureContainer, PxResizer },
|
|
28
|
-
setup() {
|
|
29
|
-
return { args };
|
|
30
|
-
},
|
|
31
|
-
data() {
|
|
32
|
-
return {
|
|
33
|
-
size: { width: null, height: null },
|
|
34
|
-
};
|
|
35
|
-
},
|
|
36
|
-
template: `
|
|
37
|
-
<PxResizer :initialWidth="300" :initialHeight="300">
|
|
38
|
-
<PxMeasureContainer v-bind="args" >
|
|
39
|
-
<div class="story-aspect-16-9" />
|
|
40
|
-
</PxMeasureContainer>
|
|
41
|
-
|
|
42
|
-
</PxResizer>
|
|
43
|
-
`,
|
|
44
|
-
}),
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
// export const Advanced = {
|
|
48
|
-
// ...Basic,
|
|
49
|
-
// // args: { ... },
|
|
50
|
-
// };
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { PxMenu, contextMenuDirective } from '@/components/PxMenu.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'PxMenu',
|
|
6
|
-
component: PxMenu,
|
|
7
|
-
// decorators: [ ... ],
|
|
8
|
-
// parameters: { ... },
|
|
9
|
-
|
|
10
|
-
// https://storybook.js.org/docs/vue/essentials/controls#annotation
|
|
11
|
-
// https://storybook.js.org/docs/vue/api/argtypes#available-properties
|
|
12
|
-
argTypes: {
|
|
13
|
-
...extractArgTypes(PxMenu),
|
|
14
|
-
// someProp: { type: 'select', options: ['one', 'two', 'three'] }
|
|
15
|
-
},
|
|
16
|
-
args: {
|
|
17
|
-
// label: 'Hello',
|
|
18
|
-
// onClick: () => {}),
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const Basic = {
|
|
23
|
-
render: (args, { argTypes }) => ({
|
|
24
|
-
components: { PxMenu },
|
|
25
|
-
directives: {
|
|
26
|
-
contextMenu: contextMenuDirective,
|
|
27
|
-
menu: {
|
|
28
|
-
bind(el, binding, vnode) {
|
|
29
|
-
console.log('bind');
|
|
30
|
-
},
|
|
31
|
-
mounted() {
|
|
32
|
-
console.log('mounted');
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
setup() {
|
|
37
|
-
return { args };
|
|
38
|
-
},
|
|
39
|
-
template: `
|
|
40
|
-
|
|
41
|
-
<div>
|
|
42
|
-
<px-menu ref="mymenu" :items="[
|
|
43
|
-
{
|
|
44
|
-
id: 'copy',
|
|
45
|
-
|
|
46
|
-
label: 'Copy',
|
|
47
|
-
|
|
48
|
-
// function with a single arg which will be the context from the directive
|
|
49
|
-
handler: () => { console.log('copy') },
|
|
50
|
-
|
|
51
|
-
// visible / enabled can be a function or bool
|
|
52
|
-
enabled: (ctx) => ctx.isSomething,
|
|
53
|
-
visible: true
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
id: 'paste',
|
|
57
|
-
|
|
58
|
-
label: 'Paste (Disabled)',
|
|
59
|
-
|
|
60
|
-
// function with a single arg which will be the context from the directive
|
|
61
|
-
handler: (ctx) => { console.log('paste') },
|
|
62
|
-
|
|
63
|
-
// visible / enabled can be a function or bool
|
|
64
|
-
disabled: (ctx) => {return true},
|
|
65
|
-
visible: true
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
separator: true
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
id: 'advanced',
|
|
72
|
-
label: 'Advanced',
|
|
73
|
-
|
|
74
|
-
// TODO
|
|
75
|
-
|
|
76
|
-
items: [
|
|
77
|
-
{
|
|
78
|
-
id: 'advanced-copy',
|
|
79
|
-
label: 'Advanced Copy',
|
|
80
|
-
handler: () => { console.log('advanced copy') },
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
],
|
|
84
|
-
},
|
|
85
|
-
]" />
|
|
86
|
-
|
|
87
|
-
<div v-context-menu="'mymenu'" >
|
|
88
|
-
Right Click Me!
|
|
89
|
-
</div>
|
|
90
|
-
|
|
91
|
-
</div>
|
|
92
|
-
`,
|
|
93
|
-
}),
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
// export const Advanced = {
|
|
97
|
-
// ...Basic,
|
|
98
|
-
// // args: { ... },
|
|
99
|
-
// };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import PxPivot from '@/components/PxPivot.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
import { fruits, fruitsPlus } from '@/storybook/sb-sampledata.js';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
component: PxPivot,
|
|
7
|
-
argTypes: {
|
|
8
|
-
...extractArgTypes(PxPivot),
|
|
9
|
-
},
|
|
10
|
-
args: {
|
|
11
|
-
items: fruits,
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const Basic = {
|
|
16
|
-
// name: 'Story Name',
|
|
17
|
-
render: (args, { argTypes }) => ({
|
|
18
|
-
setup() {
|
|
19
|
-
return { args };
|
|
20
|
-
},
|
|
21
|
-
components: { PxPivot },
|
|
22
|
-
template: `<PxPivot v-bind="args" />`,
|
|
23
|
-
}),
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const Scrolls = {
|
|
27
|
-
render: (args, { argTypes }) => ({
|
|
28
|
-
setup() {
|
|
29
|
-
return { args };
|
|
30
|
-
},
|
|
31
|
-
components: { PxPivot },
|
|
32
|
-
template: `<div style="max-width: 800px; overflow:hidden; margin: 0 auto;"><PxPivot v-bind="args" /></div>`,
|
|
33
|
-
}),
|
|
34
|
-
args: {
|
|
35
|
-
items: fruitsPlus,
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
// export const Advanced = {
|
|
40
|
-
// ...Basic,
|
|
41
|
-
// // args: { ... },
|
|
42
|
-
// };
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import PxPopupButton from '@/components/PxPopupButton.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'PxPopupButton',
|
|
6
|
-
component: PxPopupButton,
|
|
7
|
-
// decorators: [ ... ],
|
|
8
|
-
// parameters: { ... },
|
|
9
|
-
|
|
10
|
-
// https://storybook.js.org/docs/vue/essentials/controls#annotation
|
|
11
|
-
// https://storybook.js.org/docs/vue/api/argtypes#available-properties
|
|
12
|
-
argTypes: {
|
|
13
|
-
...extractArgTypes(PxPopupButton),
|
|
14
|
-
// someProp: { type: 'select', options: ['one', 'two', 'three'] }
|
|
15
|
-
},
|
|
16
|
-
args: {
|
|
17
|
-
// label: 'Hello',
|
|
18
|
-
// onClick: () => {}),
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const Basic = {
|
|
23
|
-
render: (args, { argTypes }) => ({
|
|
24
|
-
components: { PxPopupButton },
|
|
25
|
-
setup() {
|
|
26
|
-
return { args };
|
|
27
|
-
},
|
|
28
|
-
template: `
|
|
29
|
-
<PxPopupButton v-bind="args">
|
|
30
|
-
<template #default>
|
|
31
|
-
Open Popup
|
|
32
|
-
</template>
|
|
33
|
-
<template #popup>
|
|
34
|
-
<div class="story-popup">
|
|
35
|
-
Popup content goes here!
|
|
36
|
-
</div>
|
|
37
|
-
</template>
|
|
38
|
-
|
|
39
|
-
</PxPopupButton>`,
|
|
40
|
-
}),
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export const Tooltip = {
|
|
44
|
-
render: (args, { argTypes }) => ({
|
|
45
|
-
components: { PxPopupButton },
|
|
46
|
-
setup() {
|
|
47
|
-
return { args };
|
|
48
|
-
},
|
|
49
|
-
template: `
|
|
50
|
-
<div style="padding: 50px 20px">
|
|
51
|
-
<PxPopupButton v-bind="args" trigger="hover" placement="top" tag="div">
|
|
52
|
-
<template #default>
|
|
53
|
-
Open Popup
|
|
54
|
-
</template>
|
|
55
|
-
<template #popup>
|
|
56
|
-
<div class="story-tooltip">
|
|
57
|
-
Tooltip content!
|
|
58
|
-
</div>
|
|
59
|
-
</template>
|
|
60
|
-
|
|
61
|
-
</PxPopupButton>
|
|
62
|
-
</div>`,
|
|
63
|
-
}),
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
// export const Advanced = {
|
|
67
|
-
// ...Basic,
|
|
68
|
-
// // args: { ... },
|
|
69
|
-
// };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import PxProgressCircle from '@/components/PxProgressCircle.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'PxProgressCircle',
|
|
6
|
-
component: PxProgressCircle,
|
|
7
|
-
// decorators: [ ... ],
|
|
8
|
-
// parameters: { ... },
|
|
9
|
-
|
|
10
|
-
// https://storybook.js.org/docs/vue/essentials/controls#annotation
|
|
11
|
-
// https://storybook.js.org/docs/vue/api/argtypes#available-properties
|
|
12
|
-
argTypes: {
|
|
13
|
-
...extractArgTypes(PxProgressCircle),
|
|
14
|
-
// someProp: { type: 'select', options: ['one', 'two', 'three'] }
|
|
15
|
-
},
|
|
16
|
-
args: {
|
|
17
|
-
// label: 'Hello',
|
|
18
|
-
// onClick: () => {}),
|
|
19
|
-
progress: 0.3,
|
|
20
|
-
strokeWidth: 5,
|
|
21
|
-
color: 'red',
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const Basic = {
|
|
26
|
-
render: (args, { argTypes }) => ({
|
|
27
|
-
components: { PxProgressCircle },
|
|
28
|
-
setup() {
|
|
29
|
-
return { args };
|
|
30
|
-
},
|
|
31
|
-
template: `
|
|
32
|
-
<PxProgressCircle :style="{width: '100px'}" v-bind="args"></PxProgressCircle>`,
|
|
33
|
-
}),
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
// export const Advanced = {
|
|
37
|
-
// ...Basic,
|
|
38
|
-
// // args: { ... },
|
|
39
|
-
// };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import PxQrCode from '@/components/PxQrCode.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'PxQrCode',
|
|
6
|
-
component: PxQrCode,
|
|
7
|
-
// decorators: [ ... ],
|
|
8
|
-
// parameters: { ... },
|
|
9
|
-
|
|
10
|
-
// https://storybook.js.org/docs/vue/essentials/controls#annotation
|
|
11
|
-
// https://storybook.js.org/docs/vue/api/argtypes#available-properties
|
|
12
|
-
argTypes: {
|
|
13
|
-
...extractArgTypes(PxQrCode),
|
|
14
|
-
// someProp: { type: 'select', options: ['one', 'two', 'three'] }
|
|
15
|
-
},
|
|
16
|
-
args: {
|
|
17
|
-
// label: 'Hello',
|
|
18
|
-
// onClick: () => {}),
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const Basic = {
|
|
23
|
-
render: (args, { argTypes }) => ({
|
|
24
|
-
components: { PxQrCode },
|
|
25
|
-
setup() {
|
|
26
|
-
return { args };
|
|
27
|
-
},
|
|
28
|
-
template: `
|
|
29
|
-
<PxQrCode v-bind="args"></PxQrCode>`,
|
|
30
|
-
}),
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
// export const Advanced = {
|
|
34
|
-
// ...Basic,
|
|
35
|
-
// // args: { ... },
|
|
36
|
-
// };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import PxRadioButton from '@/components/PxRadioButton.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
component: PxRadioButton,
|
|
6
|
-
// decorators: [ ... ],
|
|
7
|
-
// parameters: { ... },
|
|
8
|
-
|
|
9
|
-
// https://storybook.js.org/docs/vue/essentials/controls#annotation
|
|
10
|
-
// https://storybook.js.org/docs/vue/api/argtypes#available-properties
|
|
11
|
-
argTypes: {
|
|
12
|
-
...extractArgTypes(PxRadioButton),
|
|
13
|
-
// someProp: { type: 'select', options: ['one', 'two', 'three'] }
|
|
14
|
-
},
|
|
15
|
-
args: {
|
|
16
|
-
// label: 'Hello',
|
|
17
|
-
// onClick: () => {}),
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const Basic = {
|
|
22
|
-
// name: 'Story Name',
|
|
23
|
-
render: (args, { argTypes }) => ({
|
|
24
|
-
components: { PxRadioButton },
|
|
25
|
-
setup() {
|
|
26
|
-
return { args };
|
|
27
|
-
},
|
|
28
|
-
template: `<PxRadioButton v-bind="args">Toggle me</PxRadioButton>`,
|
|
29
|
-
}),
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
// export const Advanced = {
|
|
33
|
-
// ...Basic,
|
|
34
|
-
// // args: { ... },
|
|
35
|
-
// };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import PxResizer from '@/components/PxResizer.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'PxResizer',
|
|
6
|
-
component: PxResizer,
|
|
7
|
-
// decorators: [ ... ],
|
|
8
|
-
// parameters: { ... },
|
|
9
|
-
|
|
10
|
-
// https://storybook.js.org/docs/vue/essentials/controls#annotation
|
|
11
|
-
// https://storybook.js.org/docs/vue/api/argtypes#available-properties
|
|
12
|
-
argTypes: {
|
|
13
|
-
...extractArgTypes(PxResizer),
|
|
14
|
-
// someProp: { type: 'select', options: ['one', 'two', 'three'] }
|
|
15
|
-
},
|
|
16
|
-
args: {
|
|
17
|
-
initialWidth: 300,
|
|
18
|
-
initialHeight: 300,
|
|
19
|
-
// label: 'Hello',
|
|
20
|
-
// onClick: () => {}),
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export const Basic = {
|
|
25
|
-
render: (args, { argTypes }) => ({
|
|
26
|
-
components: { PxResizer },
|
|
27
|
-
setup() {
|
|
28
|
-
return { args };
|
|
29
|
-
},
|
|
30
|
-
template: `
|
|
31
|
-
<PxResizer v-bind="args" >
|
|
32
|
-
<div class="story-fill" style="border-radius: 100%" />
|
|
33
|
-
</PxResizer>`,
|
|
34
|
-
}),
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
// export const Advanced = {
|
|
38
|
-
// ...Basic,
|
|
39
|
-
// // args: { ... },
|
|
40
|
-
// };
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import PxScrubber from '@/components/PxScrubber.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'PxScrubber',
|
|
6
|
-
component: PxScrubber,
|
|
7
|
-
// decorators: [ ... ],
|
|
8
|
-
// parameters: { ... },
|
|
9
|
-
|
|
10
|
-
// https://storybook.js.org/docs/vue/essentials/controls#annotation
|
|
11
|
-
// https://storybook.js.org/docs/vue/api/argtypes#available-properties
|
|
12
|
-
argTypes: {
|
|
13
|
-
...extractArgTypes(PxScrubber),
|
|
14
|
-
},
|
|
15
|
-
props: {},
|
|
16
|
-
args: {
|
|
17
|
-
parentStyle: {},
|
|
18
|
-
// label: 'Hello',
|
|
19
|
-
// onClick: () => {}),
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const Basic = {
|
|
24
|
-
render: (args, { argTypes }) => ({
|
|
25
|
-
components: { PxScrubber },
|
|
26
|
-
data() {
|
|
27
|
-
return {
|
|
28
|
-
localProgress: 0.66,
|
|
29
|
-
parentStyle: {
|
|
30
|
-
...args.parentStyle,
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
},
|
|
34
|
-
setup() {
|
|
35
|
-
return { args };
|
|
36
|
-
},
|
|
37
|
-
template: `
|
|
38
|
-
<div :style="parentStyle">
|
|
39
|
-
<PxScrubber v-bind="args" v-model:progress="localProgress" style="width: 600px" ></PxScrubber>
|
|
40
|
-
</div>`,
|
|
41
|
-
}),
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export const CustomVars = {
|
|
45
|
-
...Basic,
|
|
46
|
-
args: {
|
|
47
|
-
parentStyle: {
|
|
48
|
-
'--px-scrubber-bg': 'lightblue',
|
|
49
|
-
'--px-scrubber-progress-bg': 'tomato',
|
|
50
|
-
'--px-scrubber-preview-bg': 'yellowgreen',
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
// export const Advanced = {
|
|
56
|
-
// ...Basic,
|
|
57
|
-
// // args: { ... },
|
|
58
|
-
// };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import PxSideDrawer from '@/components/PxSideDrawer.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'PxSideDrawer',
|
|
6
|
-
component: PxSideDrawer,
|
|
7
|
-
// decorators: [ ... ],
|
|
8
|
-
// parameters: { ... },
|
|
9
|
-
|
|
10
|
-
// https://storybook.js.org/docs/vue/essentials/controls#annotation
|
|
11
|
-
// https://storybook.js.org/docs/vue/api/argtypes#available-properties
|
|
12
|
-
argTypes: {
|
|
13
|
-
...extractArgTypes(PxSideDrawer),
|
|
14
|
-
// someProp: { type: 'select', options: ['one', 'two', 'three'] }
|
|
15
|
-
},
|
|
16
|
-
args: {
|
|
17
|
-
// label: 'Hello',
|
|
18
|
-
// onClick: () => {}),
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const Basic = {
|
|
23
|
-
render: (args, { argTypes }) => ({
|
|
24
|
-
components: { PxSideDrawer },
|
|
25
|
-
setup() {
|
|
26
|
-
return { args };
|
|
27
|
-
},
|
|
28
|
-
template: `
|
|
29
|
-
<PxSideDrawer v-bind="args"></PxSideDrawer>`,
|
|
30
|
-
}),
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
// export const Advanced = {
|
|
34
|
-
// ...Basic,
|
|
35
|
-
// // args: { ... },
|
|
36
|
-
// };
|