@thinkpixellab-public/px-vue 5.0.3 → 5.2.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/PxSelectionBar.vue +0 -1
- package/components/PxValidator.vue +0 -1
- package/composables/loadGsap.js +10 -10
- package/package.json +60 -42
- 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,60 +0,0 @@
|
|
|
1
|
-
import PxCardGrid from '@/components/PxCardGrid.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
import { fruits } from '@/storybook/sb-sampledata.js';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'PxCardGrid',
|
|
7
|
-
component: PxCardGrid,
|
|
8
|
-
// decorators: [ ... ],
|
|
9
|
-
// parameters: { ... },
|
|
10
|
-
|
|
11
|
-
// https://storybook.js.org/docs/vue/essentials/controls#annotation
|
|
12
|
-
// https://storybook.js.org/docs/vue/api/argtypes#available-properties
|
|
13
|
-
argTypes: {
|
|
14
|
-
...extractArgTypes(PxCardGrid),
|
|
15
|
-
// someProp: { type: 'select', options: ['one', 'two', 'three'] }
|
|
16
|
-
},
|
|
17
|
-
args: {
|
|
18
|
-
// label: 'Hello',
|
|
19
|
-
// onClick: () => {}),
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const Basic = {
|
|
24
|
-
render: (args, { argTypes }) => ({
|
|
25
|
-
components: { PxCardGrid },
|
|
26
|
-
setup() {
|
|
27
|
-
return { args };
|
|
28
|
-
},
|
|
29
|
-
data() {
|
|
30
|
-
return {
|
|
31
|
-
fruits: fruits,
|
|
32
|
-
templates: {
|
|
33
|
-
4: ['== -- -----', '-- == -- --', '----- -- ==', '-- -- == --'],
|
|
34
|
-
3: ['== -- --', '-- -- ==', '-- == --'],
|
|
35
|
-
2: ['-- --', '-----', '== --'],
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
},
|
|
39
|
-
template: `
|
|
40
|
-
|
|
41
|
-
<PxCardGrid
|
|
42
|
-
:items="fruits"
|
|
43
|
-
:gap="30"
|
|
44
|
-
:maxColumns="4"
|
|
45
|
-
:debug="true"
|
|
46
|
-
:templates="templates"
|
|
47
|
-
:allowOrphans="false"
|
|
48
|
-
>
|
|
49
|
-
<template #default="{ item }">{{ item.name }}</template>
|
|
50
|
-
</PxCardGrid>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
`,
|
|
54
|
-
}),
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
// export const Advanced = {
|
|
58
|
-
// ...Basic,
|
|
59
|
-
// // args: { ... },
|
|
60
|
-
// };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import PxClock from '@/components/PxClock.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'PxClock',
|
|
6
|
-
component: PxClock,
|
|
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(PxClock),
|
|
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: { PxClock },
|
|
25
|
-
setup() {
|
|
26
|
-
return { args };
|
|
27
|
-
},
|
|
28
|
-
template: `
|
|
29
|
-
<PxClock v-bind="args"></PxClock>`,
|
|
30
|
-
}),
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
// export const Advanced = {
|
|
34
|
-
// ...Basic,
|
|
35
|
-
// // args: { ... },
|
|
36
|
-
// };
|
|
@@ -1,53 +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 PxCodeSample from '@/components/PxCodeSample.vue';
|
|
6
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
component: PxCodeSample,
|
|
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(PxCodeSample),
|
|
17
|
-
// someProp: { type: 'select', options: ['one', 'two', 'three'] }
|
|
18
|
-
},
|
|
19
|
-
args: {
|
|
20
|
-
// label: 'Hello',
|
|
21
|
-
// onClick: () => {}),
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const htmlSample = `
|
|
26
|
-
<div>
|
|
27
|
-
<h1>Hello World</h1>
|
|
28
|
-
<p>This is a paragraph</p>
|
|
29
|
-
</div>
|
|
30
|
-
`;
|
|
31
|
-
|
|
32
|
-
export const Basic = {
|
|
33
|
-
// name: 'Story Name',
|
|
34
|
-
render: (args, { argTypes }) => ({
|
|
35
|
-
components: { PxCodeSample },
|
|
36
|
-
setup() {
|
|
37
|
-
return { args };
|
|
38
|
-
},
|
|
39
|
-
data() {
|
|
40
|
-
return {
|
|
41
|
-
htmlSample,
|
|
42
|
-
};
|
|
43
|
-
},
|
|
44
|
-
template: `<PxCodeSample v-bind="args"
|
|
45
|
-
:code="htmlSample" :lang="'html'"
|
|
46
|
-
/>`,
|
|
47
|
-
}),
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
// export const Advanced = {
|
|
51
|
-
// ...Basic,
|
|
52
|
-
// // args: { ... },
|
|
53
|
-
// };
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import PxColorPalette from '@/components/PxColorPalette.vue';
|
|
2
|
-
|
|
3
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'PxColorPalette',
|
|
7
|
-
component: PxColorPalette,
|
|
8
|
-
// decorators: [ ... ],
|
|
9
|
-
// parameters: { ... },
|
|
10
|
-
|
|
11
|
-
// https://storybook.js.org/docs/vue/essentials/controls#annotation
|
|
12
|
-
// https://storybook.js.org/docs/vue/api/argtypes#available-properties
|
|
13
|
-
argTypes: {
|
|
14
|
-
...extractArgTypes(PxColorPalette),
|
|
15
|
-
// someProp: { type: 'select', options: ['one', 'two', 'three'] }
|
|
16
|
-
},
|
|
17
|
-
args: {
|
|
18
|
-
// label: 'Hello',
|
|
19
|
-
// onClick: () => {}),
|
|
20
|
-
color: 'black',
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export const Basic = {
|
|
25
|
-
render: (args, { argTypes }) => ({
|
|
26
|
-
components: { PxColorPalette },
|
|
27
|
-
setup() {
|
|
28
|
-
return { args };
|
|
29
|
-
},
|
|
30
|
-
data() {
|
|
31
|
-
return {
|
|
32
|
-
myPalette: ['lightblue', 'yellowgreen', 'gold', 'orangered', 'tomato'],
|
|
33
|
-
myColor: 'yellowgreen',
|
|
34
|
-
};
|
|
35
|
-
},
|
|
36
|
-
template: `
|
|
37
|
-
<PxColorPalette v-model:color="myColor" :palette="myPalette" format="name" pickerMode="none"></PxColorPalette>
|
|
38
|
-
<br>
|
|
39
|
-
<br>
|
|
40
|
-
<PxColorPalette v-model:color="myColor" :palette="myPalette" format="name" pickerMode="picker"></PxColorPalette>
|
|
41
|
-
<br>
|
|
42
|
-
<br>
|
|
43
|
-
<PxColorPalette v-model:color="myColor" :palette="myPalette" format="name" pickerMode="eyedropper"></PxColorPalette>
|
|
44
|
-
<br>
|
|
45
|
-
<br>
|
|
46
|
-
<PxColorPalette v-model:color="myColor" :palette="myPalette" format="name" pickerMode="eyedropper-only"></PxColorPalette>
|
|
47
|
-
<br>
|
|
48
|
-
<br>
|
|
49
|
-
|
|
50
|
-
{{myColor}}<br>
|
|
51
|
-
|
|
52
|
-
`,
|
|
53
|
-
}),
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
// export const Advanced = {
|
|
57
|
-
// ...Basic,
|
|
58
|
-
// // args: { ... },
|
|
59
|
-
// };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import PxColorPanel from '@/components/PxColorPanel.vue';
|
|
2
|
-
import PxTextbox from '@/components/PxTextbox.vue';
|
|
3
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'PxColorPanel',
|
|
7
|
-
component: PxColorPanel,
|
|
8
|
-
argTypes: {
|
|
9
|
-
...extractArgTypes(PxColorPanel),
|
|
10
|
-
},
|
|
11
|
-
args: {
|
|
12
|
-
color: 'black',
|
|
13
|
-
alphaEnabled: true,
|
|
14
|
-
format: 'hex8',
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const Basic = {
|
|
19
|
-
render: (args, { argTypes }) => ({
|
|
20
|
-
components: { PxColorPanel, PxTextbox },
|
|
21
|
-
data() {
|
|
22
|
-
return { args, myColor: 'purple' };
|
|
23
|
-
},
|
|
24
|
-
template: `
|
|
25
|
-
<PxColorPanel v-bind="args" v-model:color="myColor"></PxColorPanel>
|
|
26
|
-
<br>
|
|
27
|
-
{{myColor}}<br>
|
|
28
|
-
<PxTextbox v-model:value="myColor" variant="default">test</PxTextbox>
|
|
29
|
-
`,
|
|
30
|
-
}),
|
|
31
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import PxColorPicker from '@/components/PxColorPicker.vue';
|
|
2
|
-
import PxTextbox from '@/components/PxTextbox.vue';
|
|
3
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'PxColorPicker',
|
|
7
|
-
component: PxColorPicker,
|
|
8
|
-
// decorators: [ ... ],
|
|
9
|
-
// parameters: { ... },
|
|
10
|
-
|
|
11
|
-
// https://storybook.js.org/docs/vue/essentials/controls#annotation
|
|
12
|
-
// https://storybook.js.org/docs/vue/api/argtypes#available-properties
|
|
13
|
-
argTypes: {
|
|
14
|
-
...extractArgTypes(PxColorPicker),
|
|
15
|
-
},
|
|
16
|
-
args: {
|
|
17
|
-
color: 'black',
|
|
18
|
-
alphaEnabled: true,
|
|
19
|
-
format: 'hex8',
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const Basic = {
|
|
24
|
-
render: (args, { argTypes }) => ({
|
|
25
|
-
components: { PxColorPicker, PxTextbox },
|
|
26
|
-
data() {
|
|
27
|
-
return { args, myColor: 'purple' };
|
|
28
|
-
},
|
|
29
|
-
template: `
|
|
30
|
-
<PxColorPicker v-bind="args" v-model:color="myColor"></PxColorPicker>
|
|
31
|
-
<br>
|
|
32
|
-
{{myColor}}<br>
|
|
33
|
-
<PxTextbox v-model:value="myColor" variant="default">test</PxTextbox>
|
|
34
|
-
`,
|
|
35
|
-
}),
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
// export const Advanced = {
|
|
39
|
-
// ...Basic,
|
|
40
|
-
// // args: { ... },
|
|
41
|
-
// };
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import PxContain from '@/components/PxContain.vue';
|
|
2
|
-
import PxResizer from '@/components/PxResizer.vue';
|
|
3
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'PxContain',
|
|
7
|
-
component: PxContain,
|
|
8
|
-
// decorators: [ ... ],
|
|
9
|
-
// parameters: { ... },
|
|
10
|
-
|
|
11
|
-
// https://storybook.js.org/docs/vue/essentials/controls#annotation
|
|
12
|
-
// https://storybook.js.org/docs/vue/api/argtypes#available-properties
|
|
13
|
-
argTypes: {
|
|
14
|
-
...extractArgTypes(PxContain),
|
|
15
|
-
// someProp: { type: 'select', options: ['one', 'two', 'three'] }
|
|
16
|
-
},
|
|
17
|
-
args: {
|
|
18
|
-
// label: 'Hello',
|
|
19
|
-
// onClick: () => {}),
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const Basic = {
|
|
24
|
-
render: (args, { argTypes }) => ({
|
|
25
|
-
components: { PxResizer, PxContain },
|
|
26
|
-
setup() {
|
|
27
|
-
return { args };
|
|
28
|
-
},
|
|
29
|
-
template: `
|
|
30
|
-
|
|
31
|
-
<PxResizer :initialWidth="400" initialHeight="400" class="story-bounds" >
|
|
32
|
-
<PxContain #default="{width, height, left, top, scale}" :aspect="16/9" :naturalWidth="400" :round="true" :to-px="true" v-bind="args" >
|
|
33
|
-
<div class="story-fill story-flex" :style="{position: 'absolute', left: left, top: top, width: width, height: height}">
|
|
34
|
-
Scale {{Math.round(1000 * scale) / 1000}}
|
|
35
|
-
</div>
|
|
36
|
-
</PxContain>
|
|
37
|
-
</PxResizer>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
`,
|
|
41
|
-
}),
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export const ScaledContentExample = {
|
|
45
|
-
render: (args, { argTypes }) => ({
|
|
46
|
-
components: { PxResizer, PxContain },
|
|
47
|
-
setup() {
|
|
48
|
-
return { args };
|
|
49
|
-
},
|
|
50
|
-
template: `
|
|
51
|
-
<PxResizer :initialWidth="400" initialHeight="400" class="story-bounds" >
|
|
52
|
-
<PxContain #default="{width, height, left, top, scale}" :naturalWidth="1000" :naturalHeight="1000" :round="true" :to-px="true" v-bind="args" >
|
|
53
|
-
<div
|
|
54
|
-
class="story-fill"
|
|
55
|
-
:style="{
|
|
56
|
-
top,
|
|
57
|
-
left,
|
|
58
|
-
width: '1000px',
|
|
59
|
-
height: '1000px',
|
|
60
|
-
position: 'absolute',
|
|
61
|
-
transform: 'scale(' + scale + ')',
|
|
62
|
-
transformOrigin: '0 0',
|
|
63
|
-
fontSize: '50px',
|
|
64
|
-
}">
|
|
65
|
-
Outer natural size: 1000px x 1000px<br>
|
|
66
|
-
Font-size: 50px<br>
|
|
67
|
-
Scale {{Math.round(1000 * scale) / 1000}}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
<div style="width: 500px; height: 500px; background-color: rgba(0,0,0,0.5); top: 250px; left: 250px; position: absolute;">
|
|
71
|
-
Inner Rectangle Size: 500px x 500px
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
</PxContain>
|
|
75
|
-
</PxResizer>
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
`,
|
|
79
|
-
}),
|
|
80
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import PxCopyText from '@/components/PxCopyText.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'PxCopyText',
|
|
6
|
-
component: PxCopyText,
|
|
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(PxCopyText),
|
|
14
|
-
// someProp: { type: 'select', options: ['one', 'two', 'three'] }
|
|
15
|
-
},
|
|
16
|
-
args: {
|
|
17
|
-
text: 'Click to copy...',
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const Basic = {
|
|
22
|
-
render: (args, { argTypes }) => ({
|
|
23
|
-
components: { PxCopyText },
|
|
24
|
-
setup() {
|
|
25
|
-
return { args };
|
|
26
|
-
},
|
|
27
|
-
template: `
|
|
28
|
-
<PxCopyText v-bind="args"></PxCopyText>`,
|
|
29
|
-
}),
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
// export const Advanced = {
|
|
33
|
-
// ...Basic,
|
|
34
|
-
// // args: { ... },
|
|
35
|
-
// };
|
|
@@ -1,187 +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 PxCorners from '@/components/PxCorners.vue';
|
|
6
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
component: PxCorners,
|
|
10
|
-
// decorators: [ ... ],
|
|
11
|
-
// parameters: { ... },
|
|
12
|
-
|
|
13
|
-
// https://storybook.js.org/docs/7.0/vue/essentials/controls#annotation
|
|
14
|
-
// https://storybook.js.org/docs/7.0/vue/api/argtypes#available-properties
|
|
15
|
-
argTypes: {
|
|
16
|
-
...extractArgTypes(PxCorners),
|
|
17
|
-
// someProp: { type: 'select', options: ['one', 'two', 'three'] }
|
|
18
|
-
},
|
|
19
|
-
args: {
|
|
20
|
-
// label: 'Hello',
|
|
21
|
-
// onClick: () => {}),
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const Compare = {
|
|
26
|
-
// name: 'Story Name',
|
|
27
|
-
// parameters: {
|
|
28
|
-
// customCSS: `.myclass { border: 4px solid red; }`,
|
|
29
|
-
// },
|
|
30
|
-
render: (args, { argTypes }) => ({
|
|
31
|
-
components: { PxCorners },
|
|
32
|
-
setup() {
|
|
33
|
-
return { args };
|
|
34
|
-
},
|
|
35
|
-
template: `
|
|
36
|
-
<div class="story-flex" style=" position: relative;">
|
|
37
|
-
<div v-bind="args" class="story-bg-blue" style="border-radius: 50px; width: 200px; height: 200px;" />
|
|
38
|
-
<PxCorners v-bind="args" class="story-bg-orange" :radius="50" style="width: 200px; height: 200px;" />
|
|
39
|
-
</div>
|
|
40
|
-
`,
|
|
41
|
-
}),
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export const Basic = {
|
|
45
|
-
// name: 'Story Name',
|
|
46
|
-
// parameters: {
|
|
47
|
-
// customCSS: `.myclass { border: 4px solid red; }`,
|
|
48
|
-
// },
|
|
49
|
-
render: (args, { argTypes }) => ({
|
|
50
|
-
components: { PxCorners },
|
|
51
|
-
setup() {
|
|
52
|
-
return { args };
|
|
53
|
-
},
|
|
54
|
-
template: `<PxCorners v-bind="args" class="story-size-md story-bg-orange" :radius="40" :borderWidth="4" borderColor="black" />`,
|
|
55
|
-
}),
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export const Slot = {
|
|
59
|
-
// name: 'Story Name',
|
|
60
|
-
// parameters: {
|
|
61
|
-
// customCSS: `.myclass { border: 4px solid red; }`,
|
|
62
|
-
// },
|
|
63
|
-
render: (args, { argTypes }) => ({
|
|
64
|
-
components: { PxCorners },
|
|
65
|
-
setup() {
|
|
66
|
-
return { args };
|
|
67
|
-
},
|
|
68
|
-
template: `<PxCorners v-bind="args" class="story-size-md story-bg-blue story-center" :radius="40" > Slot content </PxCorners>`,
|
|
69
|
-
}),
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export const SlotWithBorder = {
|
|
73
|
-
// name: 'Story Name',
|
|
74
|
-
// parameters: {
|
|
75
|
-
// customCSS: `.myclass { border: 4px solid red; }`,
|
|
76
|
-
// },
|
|
77
|
-
render: (args, { argTypes }) => ({
|
|
78
|
-
components: { PxCorners },
|
|
79
|
-
setup() {
|
|
80
|
-
return { args };
|
|
81
|
-
},
|
|
82
|
-
template: `<PxCorners v-bind="args" class="story-size-md story-bg-blue story-center" :radius="40" :borderWidth="4"> Slot content </PxCorners>`,
|
|
83
|
-
}),
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export const HoverWithBorder = {
|
|
87
|
-
// name: 'Story Name',
|
|
88
|
-
// parameters: {
|
|
89
|
-
// customCSS: `.myclass { border: 4px solid red; }`,
|
|
90
|
-
// },
|
|
91
|
-
render: (args, { argTypes }) => ({
|
|
92
|
-
components: { PxCorners },
|
|
93
|
-
setup() {
|
|
94
|
-
return { args };
|
|
95
|
-
},
|
|
96
|
-
template: `<PxCorners v-bind="args" class="story-size-md story-bg-orange story-hover-bg-blue story-center" :radius="40" :borderWidth="10"> Slot content </PxCorners>`,
|
|
97
|
-
}),
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
export const AutoFromStyle = {
|
|
101
|
-
// name: 'Story Name',
|
|
102
|
-
// parameters: {
|
|
103
|
-
// customCSS: `.myclass { border: 4px solid red; }`,
|
|
104
|
-
// },
|
|
105
|
-
render: (args, { argTypes }) => ({
|
|
106
|
-
components: { PxCorners },
|
|
107
|
-
setup() {
|
|
108
|
-
return { args };
|
|
109
|
-
},
|
|
110
|
-
template: `<PxCorners :smoothingEnabled="true" v-bind="args" class="story-size-md story-bg-orange" style="border-radius: 40px; border: 4px solid black;" />`,
|
|
111
|
-
}),
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
export const AutoPercent = {
|
|
115
|
-
// name: 'Story Name',
|
|
116
|
-
// parameters: {
|
|
117
|
-
// customCSS: `.myclass { border: 4px solid red; }`,
|
|
118
|
-
// },
|
|
119
|
-
render: (args, { argTypes }) => ({
|
|
120
|
-
components: { PxCorners },
|
|
121
|
-
setup() {
|
|
122
|
-
return { args };
|
|
123
|
-
},
|
|
124
|
-
template: `
|
|
125
|
-
<div class="story-flex" style=" position: relative;">
|
|
126
|
-
<PxCorners :smoothingEnabled="true" v-bind="args" class="story-bg-orange story-center" style="width: 300px; height: 200px; border-radius: 20%;">
|
|
127
|
-
Style 20%
|
|
128
|
-
</PxCorners>
|
|
129
|
-
<PxCorners :smoothingEnabled="true" v-bind="args" class="story-bg-orange story-center" style="width: 300px; height: 200px;" :radius="60">
|
|
130
|
-
:radius 60px
|
|
131
|
-
</PxCorners>
|
|
132
|
-
<div class="story-bg-orange story-center" style="width: 300px; height: 200px; border-radius: 20%;">
|
|
133
|
-
Div 20%
|
|
134
|
-
</div>
|
|
135
|
-
<div class="story-bg-orange story-center" style="width: 300px; height: 200px; border-radius: 60px;">
|
|
136
|
-
Div 60px
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
|
-
`,
|
|
140
|
-
}),
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
export const Disabled = {
|
|
144
|
-
// name: 'Story Name',
|
|
145
|
-
// parameters: {
|
|
146
|
-
// customCSS: `.myclass { border: 4px solid red; }`,
|
|
147
|
-
// },
|
|
148
|
-
render: (args, { argTypes }) => ({
|
|
149
|
-
components: { PxCorners },
|
|
150
|
-
setup() {
|
|
151
|
-
return { args };
|
|
152
|
-
},
|
|
153
|
-
template: `<PxCorners :smoothingEnabled="false" v-bind="args" class="story-size-md story-bg-orange" :radius="40" :borderWidth="4" borderColor="black" />`,
|
|
154
|
-
}),
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
export const DisabledAutoFromStyle = {
|
|
158
|
-
// name: 'Story Name',
|
|
159
|
-
// parameters: {
|
|
160
|
-
// customCSS: `.myclass { border: 4px solid red; }`,
|
|
161
|
-
// },
|
|
162
|
-
render: (args, { argTypes }) => ({
|
|
163
|
-
components: { PxCorners },
|
|
164
|
-
setup() {
|
|
165
|
-
return { args };
|
|
166
|
-
},
|
|
167
|
-
template: `<PxCorners :smoothingEnabled="false" v-bind="args" class="story-size-md story-bg-orange" style="border-radius: 40px; border: 4px solid black;" />`,
|
|
168
|
-
}),
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
export const BasicMask = {
|
|
172
|
-
// name: 'Story Name',
|
|
173
|
-
// parameters: {
|
|
174
|
-
// customCSS: `.myclass { border: 4px solid red; }`,
|
|
175
|
-
// },
|
|
176
|
-
render: (args, { argTypes }) => ({
|
|
177
|
-
components: { PxCorners },
|
|
178
|
-
setup() {
|
|
179
|
-
return { args };
|
|
180
|
-
},
|
|
181
|
-
template: `<PxCorners v-bind="args" renderMode="mask" class="story-size-md story-bg-orange" :radius="40" :borderWidth="4" borderColor="black" />`,
|
|
182
|
-
}),
|
|
183
|
-
};
|
|
184
|
-
// export const Advanced = {
|
|
185
|
-
// ...Basic,
|
|
186
|
-
// // args: { ... },
|
|
187
|
-
// };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import PxDatePicker from '@/components/PxDatePicker.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'PxDatePicker',
|
|
6
|
-
component: PxDatePicker,
|
|
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(PxDatePicker),
|
|
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: { PxDatePicker },
|
|
25
|
-
setup() {
|
|
26
|
-
return { args };
|
|
27
|
-
},
|
|
28
|
-
template: `
|
|
29
|
-
<PxDatePicker v-bind="args"></PxDatePicker>`,
|
|
30
|
-
}),
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
// export const Advanced = {
|
|
34
|
-
// ...Basic,
|
|
35
|
-
// // args: { ... },
|
|
36
|
-
// };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import PxDropdown from '@/components/PxDropdown.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
import { fruits } from '@/storybook/sb-sampledata.js';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
component: PxDropdown,
|
|
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(PxDropdown),
|
|
14
|
-
// someProp: { type: 'select', options: ['one', 'two', 'three'] }
|
|
15
|
-
},
|
|
16
|
-
args: {
|
|
17
|
-
items: fruits,
|
|
18
|
-
// label: 'Hello',
|
|
19
|
-
// onClick: () => {}),
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const Basic = {
|
|
24
|
-
// name: 'Story Name',
|
|
25
|
-
render: (args, { argTypes }) => ({
|
|
26
|
-
setup() {
|
|
27
|
-
return { args };
|
|
28
|
-
},
|
|
29
|
-
data() {
|
|
30
|
-
return { sbSelected: this.sbInitialSelected };
|
|
31
|
-
},
|
|
32
|
-
components: { PxDropdown },
|
|
33
|
-
template: `
|
|
34
|
-
<p>Selected: {{ sbSelected }}</p>
|
|
35
|
-
<PxDropdown :items="args.items" :placeholder="args.placeholder" :variant="args.variant" v-model:selected="sbSelected" />
|
|
36
|
-
`,
|
|
37
|
-
}),
|
|
38
|
-
args: {
|
|
39
|
-
sbInitialSelected: fruits[1].id,
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export const Placeholder = {
|
|
44
|
-
...Basic,
|
|
45
|
-
args: { placeholder: 'Select a fruit...', sbInitialSelected: null },
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export const Outline = {
|
|
49
|
-
...Basic,
|
|
50
|
-
args: { variant: 'outline' },
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export const Reset = {
|
|
54
|
-
...Basic,
|
|
55
|
-
args: { variant: 'reset' },
|
|
56
|
-
};
|