@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,184 +0,0 @@
|
|
|
1
|
-
import PxAnimate from '@/components/PxAnimate.vue';
|
|
2
|
-
import PxToggle from '@/components/PxToggle.vue';
|
|
3
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'PxAnimate',
|
|
7
|
-
component: PxAnimate,
|
|
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(PxAnimate),
|
|
15
|
-
// someProp: { type: 'select', options: ['one', 'two', 'three'] }
|
|
16
|
-
},
|
|
17
|
-
args: {
|
|
18
|
-
animation: 'up:50px zoomin',
|
|
19
|
-
duration: 0.3,
|
|
20
|
-
checked: false,
|
|
21
|
-
// label: 'Hello',
|
|
22
|
-
// onClick: () => {}),
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const Basic = {
|
|
27
|
-
render: (args, { argTypes }) => ({
|
|
28
|
-
components: { PxAnimate, PxToggle },
|
|
29
|
-
setup() {
|
|
30
|
-
return { args };
|
|
31
|
-
},
|
|
32
|
-
data() {
|
|
33
|
-
return {
|
|
34
|
-
checked: args.checked,
|
|
35
|
-
};
|
|
36
|
-
},
|
|
37
|
-
template: `
|
|
38
|
-
<div class="story-flex-vert">
|
|
39
|
-
<div class="story-flex-top">
|
|
40
|
-
|
|
41
|
-
<div class="story-flex-vert">
|
|
42
|
-
<div class="story-bounds" style="width: 6em; height: 6em">
|
|
43
|
-
<PxAnimate v-bind="args" v-model:active="checked" animation="up3d" class="story-square" />
|
|
44
|
-
</div>
|
|
45
|
-
"up3d"
|
|
46
|
-
</div>
|
|
47
|
-
<div class="story-flex-vert">
|
|
48
|
-
<div class="story-bounds" style="width: 6em; height: 6em">
|
|
49
|
-
<PxAnimate v-bind="args" v-model:active="checked" animation="down3d" class="story-square" />
|
|
50
|
-
</div>
|
|
51
|
-
"down3d"
|
|
52
|
-
</div>
|
|
53
|
-
<div class="story-flex-vert">
|
|
54
|
-
<div class="story-bounds" style="width: 6em; height: 6em">
|
|
55
|
-
<PxAnimate v-bind="args" v-model:active="checked" animation="right3d" class="story-square" />
|
|
56
|
-
</div>
|
|
57
|
-
"right3d"
|
|
58
|
-
</div>
|
|
59
|
-
<div class="story-flex-vert">
|
|
60
|
-
<div class="story-bounds" style="width: 6em; height: 6em">
|
|
61
|
-
<PxAnimate v-bind="args" v-model:active="checked" animation="left3d" class="story-square" />
|
|
62
|
-
</div>
|
|
63
|
-
"left3d"
|
|
64
|
-
</div>
|
|
65
|
-
|
|
66
|
-
<div class="story-flex-vert">
|
|
67
|
-
<div class="story-bounds" style="width: 6em; height: 6em">
|
|
68
|
-
<PxAnimate v-bind="args" v-model:active="checked" animation="right3d xl" easing="easeOutCirc" :duration="1" class="story-square" />
|
|
69
|
-
</div>
|
|
70
|
-
"right3d xl"
|
|
71
|
-
</div>
|
|
72
|
-
|
|
73
|
-
<div class="story-flex-vert">
|
|
74
|
-
<div class="story-bounds" style="width: 6em; height: 6em">
|
|
75
|
-
<PxAnimate v-bind="args" v-model:active="checked" animation="right3d sm" class="story-square" />
|
|
76
|
-
</div>
|
|
77
|
-
"right3d sm"
|
|
78
|
-
</div>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
<div class="story-flex-vert">
|
|
82
|
-
<div class="story-bounds" style="width: 6em; height: 6em">
|
|
83
|
-
<PxAnimate v-bind="args" v-model:active="checked" animation="right3d:45deg down3d:30deg fade left:15%" class="story-square" />
|
|
84
|
-
</div>
|
|
85
|
-
"right3d lg fade"
|
|
86
|
-
</div>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
<div class="story-flex-vert">
|
|
90
|
-
<div class="story-bounds" style="width: 6em; height: 6em">
|
|
91
|
-
<PxAnimate v-bind="args" v-model:active="checked" animation="up" class="story-circle" />
|
|
92
|
-
</div>
|
|
93
|
-
"up"
|
|
94
|
-
</div>
|
|
95
|
-
|
|
96
|
-
<div class="story-flex-vert">
|
|
97
|
-
<div class="story-bounds" style="width: 6em; height: 6em">
|
|
98
|
-
<PxAnimate v-bind="args" v-model:active="checked" animation="fade" class="story-circle" :invert="true" />
|
|
99
|
-
</div>
|
|
100
|
-
"fade" (invert)
|
|
101
|
-
</div>
|
|
102
|
-
|
|
103
|
-
<div class="story-flex-vert">
|
|
104
|
-
<div class="story-bounds" style="width: 6em; height: 6em">
|
|
105
|
-
<PxAnimate v-bind="args" v-model:active="checked" animation="fade scale:1.5" class="story-circle" :invert="true" />
|
|
106
|
-
</div>
|
|
107
|
-
"fade scale" (invert)
|
|
108
|
-
</div>
|
|
109
|
-
|
|
110
|
-
<div class="story-flex-vert">
|
|
111
|
-
<div class="story-bounds" style="width: 6em; height: 6em">
|
|
112
|
-
<PxAnimate v-bind="args" v-model:active="checked" animation="down" class="story-circle" />
|
|
113
|
-
</div>
|
|
114
|
-
"down"
|
|
115
|
-
</div>
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
|
|
119
|
-
<br>
|
|
120
|
-
<br>
|
|
121
|
-
|
|
122
|
-
<div class="story-flex-vert">
|
|
123
|
-
<div class="story-flex-top">
|
|
124
|
-
|
|
125
|
-
<div class="story-flex-vert">
|
|
126
|
-
<div class="story-bounds" style="width: 6em; height: 6em">
|
|
127
|
-
<PxAnimate v-bind="args" v-model:active="checked" animation="fade" class="story-circle" />
|
|
128
|
-
</div>
|
|
129
|
-
"fade"
|
|
130
|
-
</div>
|
|
131
|
-
|
|
132
|
-
<div class="story-flex-vert">
|
|
133
|
-
<div class="story-bounds" style="width: 6em; height: 6em">
|
|
134
|
-
<PxAnimate v-bind="args" v-model:active="checked" animation="zoomin" class="story-circle" />
|
|
135
|
-
</div>
|
|
136
|
-
"zoomin"
|
|
137
|
-
</div>
|
|
138
|
-
|
|
139
|
-
<div class="story-flex-vert">
|
|
140
|
-
<div class="story-bounds" style="width: 6em; height: 6em">
|
|
141
|
-
<PxAnimate v-bind="args" v-model:active="checked" animation="fadeout left up:50% zoom:-0.3" class="story-circle" />
|
|
142
|
-
</div>
|
|
143
|
-
mixed
|
|
144
|
-
</div>
|
|
145
|
-
|
|
146
|
-
<div class="story-flex-vert">
|
|
147
|
-
<div class="story-bounds" style="width: 6em; height: 6em">
|
|
148
|
-
<PxAnimate v-bind="args" v-model:active="checked" animation="up:50% zoom:-0.3" :duration="1" easing="easeOutExpo" class="story-circle" />
|
|
149
|
-
</div>
|
|
150
|
-
duration, easing
|
|
151
|
-
</div>
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
<div class="story-flex-vert">
|
|
155
|
-
<div class="story-bounds" style="width: 6em; height: 6em">
|
|
156
|
-
<PxAnimate :enabled="false" v-bind="args" v-model:active="checked" animation="fade" class="story-circle" />
|
|
157
|
-
</div>
|
|
158
|
-
disabled
|
|
159
|
-
</div>
|
|
160
|
-
|
|
161
|
-
<div class="story-flex-vert">
|
|
162
|
-
<div class="story-bounds" style="width: 6em; height: 6em">
|
|
163
|
-
<PxAnimate v-bind="args" v-model:active="checked" class="story-circle" animation="" />
|
|
164
|
-
</div>
|
|
165
|
-
no animation
|
|
166
|
-
</div>
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
</div>
|
|
170
|
-
<PxToggle v-model:checked="checked" />
|
|
171
|
-
</div>
|
|
172
|
-
`,
|
|
173
|
-
}),
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
export const StartsLoaded = {
|
|
177
|
-
...Basic,
|
|
178
|
-
args: { checked: true },
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
// export const Advanced = {
|
|
182
|
-
// ...Basic,
|
|
183
|
-
// // args: { ... },
|
|
184
|
-
// };
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import PxArrow from '@/components/PxArrow.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
component: PxArrow,
|
|
6
|
-
argTypes: {
|
|
7
|
-
...extractArgTypes(PxArrow),
|
|
8
|
-
},
|
|
9
|
-
args: {},
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const Basic = {
|
|
13
|
-
// name: 'Story Name',
|
|
14
|
-
render: (args, { argTypes }) => ({
|
|
15
|
-
components: { PxArrow },
|
|
16
|
-
setup() {
|
|
17
|
-
return { args };
|
|
18
|
-
},
|
|
19
|
-
template: `<PxArrow :style="{maxHeight: '10em'}" v-bind="args" />`,
|
|
20
|
-
}),
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const pointerAspect = {
|
|
24
|
-
...Basic,
|
|
25
|
-
args: { pointerAspect: 0.5 },
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const pointerSize = {
|
|
29
|
-
...Basic,
|
|
30
|
-
args: { pointerSize: 0.1 },
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const stemVisible = {
|
|
34
|
-
...Basic,
|
|
35
|
-
args: { stemVisible: false },
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export const angleNumeric = {
|
|
39
|
-
...Basic,
|
|
40
|
-
args: { angle: 90 },
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export const angleString = {
|
|
44
|
-
...Basic,
|
|
45
|
-
args: { angle: 'down' },
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export const strokeWidth = {
|
|
49
|
-
...Basic,
|
|
50
|
-
args: { strokeWidth: 10 },
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export const scaleStrokeWidth = {
|
|
54
|
-
...Basic,
|
|
55
|
-
args: { strokeWidth: 5, scaleStrokeWidth: false },
|
|
56
|
-
|
|
57
|
-
render: (args, { argTypes }) => ({
|
|
58
|
-
components: { PxArrow },
|
|
59
|
-
setup() {
|
|
60
|
-
return { args };
|
|
61
|
-
},
|
|
62
|
-
template: `
|
|
63
|
-
<div style="display: flex">
|
|
64
|
-
<PxArrow :style="{maxHeight: '2em'}" v-bind="args" :scaleStrokeWidth="true" />
|
|
65
|
-
<PxArrow :style="{maxHeight: '10em'}" v-bind="args" />
|
|
66
|
-
</div>
|
|
67
|
-
<br>
|
|
68
|
-
<div style="display: flex">
|
|
69
|
-
<PxArrow :style="{maxHeight: '2em'}" v-bind="args" :scaleStrokeWidth="false" />
|
|
70
|
-
<PxArrow :style="{maxHeight: '10em'}" v-bind="args" />
|
|
71
|
-
</div>
|
|
72
|
-
`,
|
|
73
|
-
}),
|
|
74
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import PxArrowScroller from '@/components/PxArrowScroller.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
component: PxArrowScroller,
|
|
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(PxArrowScroller),
|
|
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: { PxArrowScroller },
|
|
25
|
-
setup() {
|
|
26
|
-
return { args };
|
|
27
|
-
},
|
|
28
|
-
template: `
|
|
29
|
-
<PxArrowScroller v-bind="args">
|
|
30
|
-
<div class="story-gradient" :style="{width: '200vw', height: '200px'}" />
|
|
31
|
-
</PxArrowScroller>`,
|
|
32
|
-
}),
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
// export const Advanced = {
|
|
36
|
-
// ...Basic,
|
|
37
|
-
// // args: { ... },
|
|
38
|
-
// };
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import PxAspect from '@/components/PxAspect.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
component: PxAspect,
|
|
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(PxAspect),
|
|
13
|
-
},
|
|
14
|
-
args: {
|
|
15
|
-
aspect: '16:9',
|
|
16
|
-
// onClick: () => {}),
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const Basic = {
|
|
21
|
-
// name: 'Story Name',
|
|
22
|
-
render: (args, { argTypes }) => ({
|
|
23
|
-
components: { PxAspect },
|
|
24
|
-
setup() {
|
|
25
|
-
return { args };
|
|
26
|
-
},
|
|
27
|
-
template: `
|
|
28
|
-
<div :style="{height: '300px', width: '300px'}" class="story-bounds">
|
|
29
|
-
<PxAspect v-bind="args">
|
|
30
|
-
<div class="story-fill" />
|
|
31
|
-
</PxAspect>
|
|
32
|
-
</div>
|
|
33
|
-
`,
|
|
34
|
-
}),
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export const NumberTall = {
|
|
38
|
-
...Basic,
|
|
39
|
-
args: { aspect: 9 / 16 },
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export const AlignX = {
|
|
43
|
-
...Basic,
|
|
44
|
-
args: { aspect: 9 / 16, alignX: 0 },
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export const AlignY = {
|
|
48
|
-
...Basic,
|
|
49
|
-
args: { alignY: 'start' },
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export const Debug = {
|
|
53
|
-
...Basic,
|
|
54
|
-
args: { debug: true },
|
|
55
|
-
render: (args, { argTypes }) => ({
|
|
56
|
-
components: { PxAspect },
|
|
57
|
-
setup() {
|
|
58
|
-
return { args };
|
|
59
|
-
},
|
|
60
|
-
template: `
|
|
61
|
-
<div :style="{height: '300px', width: '300px'}" class="story-bounds">
|
|
62
|
-
<PxAspect v-bind="args" />
|
|
63
|
-
</div>
|
|
64
|
-
`,
|
|
65
|
-
}),
|
|
66
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import PxAutoClamp from '@/components/PxAutoClamp.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
component: PxAutoClamp,
|
|
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(PxAutoClamp),
|
|
13
|
-
// someProp: { type: 'select', options: ['one', 'two', 'three'] }
|
|
14
|
-
},
|
|
15
|
-
args: {
|
|
16
|
-
text: 'Lorem aspernatur exercitationem alias. Eaque nemo nemo quis nisi hic aut iure accusantium assumenda et voluptatem exercitationem consequatur non repellat. Et nam doloribus nulla iusto qui reiciendis dignissimos reprehenderit eaque aspernatur. Odio aut similique nam ullam et cupiditate expedita dolores corporis libero eius odit debitis. Eius nisi nihil quis doloremque.',
|
|
17
|
-
heightShort: '50px',
|
|
18
|
-
heightTall: '90px',
|
|
19
|
-
width: '300px',
|
|
20
|
-
// onClick: () => {}),
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export const Basic = {
|
|
25
|
-
// name: 'Story Name',
|
|
26
|
-
render: (args, { argTypes }) => ({
|
|
27
|
-
components: { PxAutoClamp },
|
|
28
|
-
setup() {
|
|
29
|
-
return { args };
|
|
30
|
-
},
|
|
31
|
-
template: `
|
|
32
|
-
<div style="display: flex; gap: 20px;">
|
|
33
|
-
<div class="story-bounds" :style="{height: args.heightTall, width: args.width}">
|
|
34
|
-
<PxAutoClamp :text="args.text" />
|
|
35
|
-
</div>
|
|
36
|
-
<div class="story-bounds" :style="{height: args.heightShort, width: args.width}">
|
|
37
|
-
<PxAutoClamp :text="args.text" />
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
`,
|
|
41
|
-
}),
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
// export const Advanced = {
|
|
45
|
-
// ...Basic,
|
|
46
|
-
// // args: { ... },
|
|
47
|
-
// };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import PxBackgroundFader from '@/components/PxBackgroundFader.vue';
|
|
2
|
-
import PxButton from '@/components/PxButton.vue';
|
|
3
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'PxBackgroundFader',
|
|
7
|
-
component: PxBackgroundFader,
|
|
8
|
-
|
|
9
|
-
argTypes: {
|
|
10
|
-
...extractArgTypes(PxBackgroundFader),
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const Basic = {
|
|
15
|
-
render: (args, { argTypes }) => ({
|
|
16
|
-
components: { PxBackgroundFader, PxButton },
|
|
17
|
-
|
|
18
|
-
data() {
|
|
19
|
-
return {
|
|
20
|
-
args,
|
|
21
|
-
currentBackground: 'story-bg-blue',
|
|
22
|
-
};
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
template: `
|
|
26
|
-
<div class="story-aspect-16-9" style="overflow: hidden;">
|
|
27
|
-
<PxBackgroundFader :background="currentBackground"></PxBackgroundFader>
|
|
28
|
-
<PxButton style="position: absolute; top: 1em; left: 1em; z-index: 1" @click="changeBackground">Fade</PxButton>
|
|
29
|
-
</div>
|
|
30
|
-
`,
|
|
31
|
-
|
|
32
|
-
methods: {
|
|
33
|
-
changeBackground() {
|
|
34
|
-
const backgrounds = 'story-bg-orange|story-bg-blue|story-bg-green|story-bg-gold'
|
|
35
|
-
.split('|')
|
|
36
|
-
.filter(c => c !== this.currentBackground);
|
|
37
|
-
this.currentBackground =
|
|
38
|
-
backgrounds[Math.floor(Math.random() * backgrounds.length)];
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
}),
|
|
42
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import PxBalancedText from '@/components/PxBalancedText.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
|
|
4
|
-
const title =
|
|
5
|
-
'Cras mattis consectetur purus sit amet fermentum maecenas. Faucibus mollis interdum.';
|
|
6
|
-
const html =
|
|
7
|
-
'<h2>Cras mattis <em style="color:purple;">consectetur purus sit amet</em> fermentum maecenas. Faucibus mollis interdum.</h2>';
|
|
8
|
-
const p2 =
|
|
9
|
-
'Cras justo odio, dapibus ac facilisis in, egestas eget quam. Curabitur blandit tempus porttitor. Nullam id dolor id nibh ultricies vehicula ut id elit. Cras mattis consectetur purus sit amet fermentum. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec sed odio dui.';
|
|
10
|
-
const p3 = 'Praesent commodo cursus magna, vel scelerisque nisl consectetur et.';
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
component: PxBalancedText,
|
|
14
|
-
// decorators: [ ... ],
|
|
15
|
-
// parameters: { ... },
|
|
16
|
-
|
|
17
|
-
// https://storybook.js.org/docs/vue/essentials/controls#annotation
|
|
18
|
-
// https://storybook.js.org/docs/vue/api/argtypes#available-properties
|
|
19
|
-
argTypes: {
|
|
20
|
-
...extractArgTypes(PxBalancedText),
|
|
21
|
-
// someProp: { type: 'select', options: ['one', 'two', 'three'] }
|
|
22
|
-
},
|
|
23
|
-
args: {
|
|
24
|
-
html: '',
|
|
25
|
-
slotContent: `${title}`,
|
|
26
|
-
width: 500,
|
|
27
|
-
textAlign: 'left',
|
|
28
|
-
enabled: true,
|
|
29
|
-
|
|
30
|
-
// onClick: () => {}),
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export const Basic = {
|
|
35
|
-
// name: 'Story Name',
|
|
36
|
-
render: (args, { argTypes }) => ({
|
|
37
|
-
components: { PxBalancedText },
|
|
38
|
-
setup() {
|
|
39
|
-
return { args };
|
|
40
|
-
},
|
|
41
|
-
template: `<div class="story-bounds" :style="{width: cssPx(args.width)}" ><PxBalancedText :textAlign="args.textAlign" :enabled="args.enabled" :html="args.html">{{args.slotContent}}</PxBalancedText></div>`,
|
|
42
|
-
}),
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export const Centered = {
|
|
46
|
-
...Basic,
|
|
47
|
-
args: {
|
|
48
|
-
textAlign: 'center',
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export const Disabled = {
|
|
53
|
-
...Basic,
|
|
54
|
-
args: {
|
|
55
|
-
enabled: false,
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export const HTML = {
|
|
60
|
-
...Basic,
|
|
61
|
-
args: {
|
|
62
|
-
width: 700,
|
|
63
|
-
slotContent: '',
|
|
64
|
-
html: html,
|
|
65
|
-
},
|
|
66
|
-
};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import PxButton from '@/components/PxButton.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
component: PxButton,
|
|
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(PxButton),
|
|
13
|
-
// someProp: { type: 'select', options: ['one', 'two', 'three'] }
|
|
14
|
-
},
|
|
15
|
-
args: {
|
|
16
|
-
label: 'Click',
|
|
17
|
-
// onClick: () => {}),
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const Basic = {
|
|
22
|
-
render: (args, { argTypes }) => {
|
|
23
|
-
return {
|
|
24
|
-
components: { PxButton },
|
|
25
|
-
setup() {
|
|
26
|
-
return { args };
|
|
27
|
-
},
|
|
28
|
-
template: `
|
|
29
|
-
<div class="story-flex">
|
|
30
|
-
<PxButton v-bind="args" />
|
|
31
|
-
</div>
|
|
32
|
-
`,
|
|
33
|
-
};
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export const States = {
|
|
38
|
-
render: (args, { argTypes }) => {
|
|
39
|
-
return {
|
|
40
|
-
components: { PxButton },
|
|
41
|
-
setup() {
|
|
42
|
-
return { args };
|
|
43
|
-
},
|
|
44
|
-
template: `
|
|
45
|
-
<div class="story-flex">
|
|
46
|
-
<PxButton v-bind="args" />
|
|
47
|
-
<PxButton data-hover v-bind="args" label="Hover" />
|
|
48
|
-
<PxButton data-active v-bind="args" label="Active" />
|
|
49
|
-
<PxButton data-focus v-bind="args" label="Focus" />
|
|
50
|
-
<PxButton v-bind="args" label="Disabled" :disabled="true" />
|
|
51
|
-
</div>
|
|
52
|
-
`,
|
|
53
|
-
};
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
States.parameters = {
|
|
58
|
-
pseudo: {
|
|
59
|
-
hover: ['[data-hover]'],
|
|
60
|
-
active: ['[data-active]'],
|
|
61
|
-
focusVisible: ['[data-focus]'],
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export const PillVariant = {
|
|
66
|
-
...States,
|
|
67
|
-
args: { variant: 'default pill', label: 'Longer Label' },
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export const OutlineVariant = {
|
|
71
|
-
...States,
|
|
72
|
-
args: { variant: 'outline' },
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export const OutlinePillVariant = {
|
|
76
|
-
...States,
|
|
77
|
-
args: { variant: 'outline pill', label: 'Longer Label' },
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export const BaseVariant = {
|
|
81
|
-
...States,
|
|
82
|
-
args: { variant: 'base', label: 'Label' },
|
|
83
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import PxCalendar from '@/components/PxCalendar.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'PxCalendar',
|
|
6
|
-
component: PxCalendar,
|
|
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(PxCalendar),
|
|
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: { PxCalendar },
|
|
25
|
-
setup() {
|
|
26
|
-
return { args };
|
|
27
|
-
},
|
|
28
|
-
template: `
|
|
29
|
-
<PxCalendar v-bind="args"></PxCalendar>`,
|
|
30
|
-
}),
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
// export const Advanced = {
|
|
34
|
-
// ...Basic,
|
|
35
|
-
// // args: { ... },
|
|
36
|
-
// };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import PxCard from '@/components/PxCard.vue';
|
|
2
|
-
import { extractArgTypes } from '@/storybook/sb-utils.js';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'PxCard',
|
|
6
|
-
component: PxCard,
|
|
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(PxCard),
|
|
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: { PxCard },
|
|
25
|
-
setup() {
|
|
26
|
-
return { args };
|
|
27
|
-
},
|
|
28
|
-
template: `
|
|
29
|
-
<PxCard v-bind="args"></PxCard>`,
|
|
30
|
-
}),
|
|
31
|
-
};
|